diff --git a/.clang-format b/.clang-format index 01110dc..73848e4 100644 --- a/.clang-format +++ b/.clang-format @@ -1,42 +1,3 @@ ---- -BasedOnStyle: Google -AlignAfterOpenBracket: Align -#AlignConsecutiveAssignments: 'true' -AlignEscapedNewlines: DontAlign -AllowShortFunctionsOnASingleLine: InlineOnly -AllowShortIfStatementsOnASingleLine: 'false' -AllowShortLoopsOnASingleLine: 'false' -BinPackParameters: 'true' -BreakBeforeBraces: Custom -ColumnLimit: '105' -ConstructorInitializerAllOnOneLineOrOnePerLine: 'true' -BreakConstructorInitializers: 'AfterColon' -ConstructorInitializerIndentWidth: '4' -ContinuationIndentWidth: '4' -Cpp11BracedListStyle: 'false' -DerivePointerAlignment: 'false' -IndentCaseLabels: 'false' -IndentWidth: '4' -NamespaceIndentation: All -PointerAlignment: Right -SpaceBeforeParens: Never -SpaceInEmptyParentheses: 'false' -SpacesInParentheses: 'true' -TabWidth: '4' -UseTab: ForIndentation -AccessModifierOffset: '-4' -IndentPPDirectives: 'AfterHash' -BraceWrapping: - AfterClass: true - AfterControlStatement: true - AfterEnum: true - AfterFunction: true - AfterNamespace: true - AfterObjCDeclaration: true - AfterStruct: true - AfterUnion: true - BeforeCatch: true - BeforeElse: true - IndentBraces: false - -... +BasedOnStyle: Microsoft +SortIncludes: false +IndentWidth: 2 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f9cb9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build/ +.vscode/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d673508 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "contrib/stb"] + path = contrib/stb + url = https://github.com/nothings/stb +[submodule "contrib/glfw"] + path = contrib/glfw + url = https://github.com/glfw/glfw.git +[submodule "contrib/gli"] + path = contrib/gli + url = https://github.com/g-truc/gli.git diff --git a/.hgignore b/.hgignore deleted file mode 100644 index 4ca4601..0000000 --- a/.hgignore +++ /dev/null @@ -1,9 +0,0 @@ -syntax: glob -build/ -bin/Debug -bin/MinSizeRel -bin/Release -bin/RelWithDebInfo -CMakeLists.txt.user -.git -*.pyc diff --git a/CMake/Bootstrap.cmake b/CMake/Bootstrap.cmake deleted file mode 100644 index c22a8a2..0000000 --- a/CMake/Bootstrap.cmake +++ /dev/null @@ -1,58 +0,0 @@ - -set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG" ) -set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG" ) - -if( NOT APPLE ) - if( CMAKE_BUILD_TYPE STREQUAL "" ) - set( CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "One of: Debug Release RelWithDebInfo MinSizeRel." FORCE ) - endif() -else() - set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.ogre3d.\${PRODUCT_NAME:rfc1034identifier}") -endif() - -if( NOT MSVC ) - set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1 -D_DEBUG=1 -g" ) - set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG" ) - set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -DNDEBUG" ) - set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g" ) - - set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG=1 -D_DEBUG=1 -g" ) - set( CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -Os -DNDEBUG" ) - set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -DNDEBUG" ) - set( CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O2 -g" ) - - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-overloaded-virtual" ) -endif() - -if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) - set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-limit-debug-info" ) -endif() - -# Determine if we are compiling for a 32bit or 64bit system -if( NOT APPLE ) - include(CheckTypeSize) - CHECK_TYPE_SIZE("void*" ARCH_PTR_SIZE BUILTIN_TYPES_ONLY) - if (ARCH_PTR_SIZE EQUAL 8) - set(PLATFORM_X64 TRUE) - else () - set(PLATFORM_X64 FALSE) - endif () -endif() - -if( MSVC ) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") - if( NOT PLATFORM_X64 ) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2") - endif() - add_definitions( -DUNICODE -D_UNICODE ) -endif() - -if( APPLE ) - macro( add_recursive dir retVal ) - file( GLOB_RECURSE ${retVal} FOLLOW_SYMLINKS ${dir}/*.h ${dir}/*.cpp ${dir}/*.c ${dir}/*.cc ${dir}/*.inl ${dir}/*.mm ${dir}/*.m ) - endmacro() -else() - macro( add_recursive dir retVal ) - file( GLOB_RECURSE ${retVal} FOLLOW_SYMLINKS ${dir}/*.h ${dir}/*.cpp ${dir}/*.c ${dir}/*.cc ${dir}/*.inl ) - endmacro() -endif() diff --git a/CMake/Dependencies/FindSDL2.cmake b/CMake/Dependencies/FindSDL2.cmake deleted file mode 100755 index 70e607a..0000000 --- a/CMake/Dependencies/FindSDL2.cmake +++ /dev/null @@ -1,193 +0,0 @@ -# Locate SDL2 library -# This module defines -# SDL2_LIBRARY, the name of the library to link against -# SDL2_FOUND, if false, do not try to link to SDL2 -# SDL2_INCLUDE_DIR, where to find SDL.h -# -# This module responds to the the flag: -# SDL2_BUILDING_LIBRARY -# If this is defined, then no SDL2_main will be linked in because -# only applications need main(). -# Otherwise, it is assumed you are building an application and this -# module will attempt to locate and set the the proper link flags -# as part of the returned SDL2_LIBRARY variable. -# -# Don't forget to include SDL2main.h and SDL2main.m your project for the -# OS X framework based version. (Other versions link to -lSDL2main which -# this module will try to find on your behalf.) Also for OS X, this -# module will automatically add the -framework Cocoa on your behalf. -# -# -# Additional Note: If you see an empty SDL2_LIBRARY_TEMP in your configuration -# and no SDL2_LIBRARY, it means CMake did not find your SDL2 library -# (SDL2.dll, libsdl2.so, SDL2.framework, etc). -# Set SDL2_LIBRARY_TEMP to point to your SDL2 library, and configure again. -# Similarly, if you see an empty SDL2MAIN_LIBRARY, you should set this value -# as appropriate. These values are used to generate the final SDL2_LIBRARY -# variable, but when these values are unset, SDL2_LIBRARY does not get created. -# -# -# $SDL2DIR is an environment variable that would -# correspond to the ./configure --prefix=$SDL2DIR -# used in building SDL2. -# l.e.galup 9-20-02 -# -# Modified by Eric Wing. -# Added code to assist with automated building by using environmental variables -# and providing a more controlled/consistent search behavior. -# Added new modifications to recognize OS X frameworks and -# additional Unix paths (FreeBSD, etc). -# Also corrected the header search path to follow "proper" SDL2 guidelines. -# Added a search for SDL2main which is needed by some platforms. -# Added a search for threads which is needed by some platforms. -# Added needed compile switches for MinGW. -# -# On OSX, this will prefer the Framework version (if found) over others. -# People will have to manually change the cache values of -# SDL2_LIBRARY to override this selection or set the CMake environment -# CMAKE_INCLUDE_PATH to modify the search paths. -# -# Note that the header path has changed from SDL2/SDL.h to just SDL.h -# This needed to change because "proper" SDL2 convention -# is #include "SDL.h", not . This is done for portability -# reasons because not all systems place things in SDL2/ (see FreeBSD). -# -# Ported by Johnny Patterson. This is a literal port for SDL2 of the FindSDL.cmake -# module with the minor edit of changing "SDL" to "SDL2" where necessary. This -# was not created for redistribution, and exists temporarily pending official -# SDL2 CMake modules. - -#============================================================================= -# Copyright 2003-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - - -FIND_PATH(SDL2_INCLUDE_DIR SDL.h - HINTS - $ENV{SDL2DIR} - PATH_SUFFIXES include/SDL2 include - PATHS - ~/Library/Frameworks - /Library/Frameworks - /usr/local/include/SDL2 - /usr/include/SDL2 - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt -) -#MESSAGE("SDL2_INCLUDE_DIR is ${SDL2_INCLUDE_DIR}") - -FIND_LIBRARY(SDL2_LIBRARY_TEMP - NAMES SDL2 - HINTS - $ENV{SDL2DIR} - PATH_SUFFIXES lib64 lib - PATHS - /sw - /opt/local - /opt/csw - /opt -) - -#MESSAGE("SDL2_LIBRARY_TEMP is ${SDL2_LIBRARY_TEMP}") - -IF(NOT SDL2_BUILDING_LIBRARY) - IF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework") - # Non-OS X framework versions expect you to also dynamically link to - # SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms - # seem to provide SDL2main for compatibility even though they don't - # necessarily need it. - FIND_LIBRARY(SDL2MAIN_LIBRARY - NAMES SDL2main - HINTS - $ENV{SDL2DIR} - PATH_SUFFIXES lib64 lib - PATHS - /sw - /opt/local - /opt/csw - /opt - ) - ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework") -ENDIF(NOT SDL2_BUILDING_LIBRARY) - -# SDL2 may require threads on your system. -# The Apple build may not need an explicit flag because one of the -# frameworks may already provide it. -# But for non-OSX systems, I will use the CMake Threads package. -IF(NOT APPLE) - FIND_PACKAGE(Threads) -ENDIF(NOT APPLE) - -# MinGW needs an additional library, mwindows -# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -lmwindows -# (Actually on second look, I think it only needs one of the m* libraries.) -IF(MINGW) - SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW") -ENDIF(MINGW) - -SET(SDL2_FOUND "NO") -IF(SDL2_LIBRARY_TEMP) - # For SDL2main - IF(NOT SDL2_BUILDING_LIBRARY) - IF(SDL2MAIN_LIBRARY) - SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP}) - ENDIF(SDL2MAIN_LIBRARY) - ENDIF(NOT SDL2_BUILDING_LIBRARY) - - # For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa. - # CMake doesn't display the -framework Cocoa string in the UI even - # though it actually is there if I modify a pre-used variable. - # I think it has something to do with the CACHE STRING. - # So I use a temporary variable until the end so I can set the - # "real" variable in one-shot. - IF(APPLE) - SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa") - ENDIF(APPLE) - - # For threads, as mentioned Apple doesn't need this. - # In fact, there seems to be a problem if I used the Threads package - # and try using this line, so I'm just skipping it entirely for OS X. - IF(NOT APPLE) - SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT}) - ENDIF(NOT APPLE) - - # For MinGW library - IF(MINGW) - SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP}) - ENDIF(MINGW) - - IF(WIN32) - SET(SDL2_LIBRARY_TEMP winmm imm32 version msimg32 ${SDL2_LIBRARY_TEMP}) - ENDIF(WIN32) - - # Set the final string here so the GUI reflects the final state. - SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found") - # Set the temp variable to INTERNAL so it is not seen in the CMake GUI - SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "") - - SET(SDL2_FOUND "YES") -ENDIF(SDL2_LIBRARY_TEMP) - -INCLUDE(FindPackageHandleStandardArgs) - -FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 - REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR) - -IF(SDL2_STATIC) - if (UNIX AND NOT APPLE) - EXECUTE_PROCESS(COMMAND sdl2-config --static-libs OUTPUT_VARIABLE SDL2_LINK_FLAGS) - STRING(REGEX REPLACE "(\r?\n)+$" "" SDL2_LINK_FLAGS "${SDL2_LINK_FLAGS}") - SET(SDL2_LIBRARY ${SDL2_LINK_FLAGS}) - ENDIF() -ENDIF(SDL2_STATIC) diff --git a/CMake/Dependencies/sdl2-config.cmake b/CMake/Dependencies/sdl2-config.cmake deleted file mode 100755 index 0f6d98f..0000000 --- a/CMake/Dependencies/sdl2-config.cmake +++ /dev/null @@ -1,21 +0,0 @@ -#set(SDL2_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/include") - -## Support both 32 and 64 bit builds -#if (${CMAKE_SIZEOF_VOID_P} MATCHES 8) -# set(SDL2_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/lib/x64/SDL2.lib;${CMAKE_CURRENT_LIST_DIR}/lib/x64/SDL2main.lib") -#else () -# set(SDL2_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/lib/x86/SDL2.lib;${CMAKE_CURRENT_LIST_DIR}/lib/x86/SDL2main.lib") -#endif () - -#string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES) - -set(SDL2_INCLUDE_DIRS "C:/Projects/SDK/OgreDeps/build/ogredeps/include/SDL2") - -# Support both 32 and 64 bit builds -if (${CMAKE_SIZEOF_VOID_P} MATCHES 8) - set(SDL2_LIBRARIES "C:/Projects/SDK/OgreDeps/build/ogredeps/lib/SDL2.lib;C:/Projects/SDK/OgreDeps/build/ogredeps/lib/SDL2main.lib") -else () - set(SDL2_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/lib/x86/SDL2.lib;${CMAKE_CURRENT_LIST_DIR}/lib/x86/SDL2main.lib") -endif () - -string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd9d00d..15df4a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,60 +4,15 @@ cmake_minimum_required( VERSION 3.5 ) project( betsy ) -set( EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}" ) +include( cmake/Bootstrap.cmake ) -include( CMake/Bootstrap.cmake ) +option(BUILD_TESTING "Enable testing" ON) -if( WIN32 ) - set( SDL2_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/SDL/Windows/include" ) - set( ARCH_SUFFIX "x64" ) - if( ${CMAKE_SIZEOF_VOID_P} EQUAL 4 ) - set( ARCH_SUFFIX "x86" ) - endif() - set( SDL2_LIBRARY - "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/SDL/Windows/lib/${ARCH_SUFFIX}/SDL2.lib" ) - set( SDL2_BINARY - "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/SDL/Windows/lib/${ARCH_SUFFIX}/SDL2.dll" ) - file( COPY ${SDL2_BINARY} DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/bin/Debug/" ) - file( COPY ${SDL2_BINARY} DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/bin/Release/" ) - file( COPY ${SDL2_BINARY} DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/bin/RelWithDebInfo/" ) - file( COPY ${SDL2_BINARY} DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/bin/MinSizeRel/" ) -else() - include( CMake/Dependencies/FindSDL2.cmake ) - find_package( SDL2 REQUIRED ) -endif() - -add_subdirectory( Dependencies ) - -include_directories( "./include" ) -include_directories( ${SDL2_INCLUDE_DIR} ) -include_directories( "./Dependencies/FreeImage/Source" ) - -add_recursive( ./src SOURCES ) -add_recursive( ./include HEADERS ) - -if( APPLE ) - file( GLOB_RECURSE RESOURCES ./src/*.storyboard ) - set( RESOURCES ${RESOURCES} ./Data/Resources.cfg ./bin/Data ) -endif() - -add_library( FreeImage_betsy ALIAS FreeImage ) - -add_executable( ${PROJECT_NAME} ${SOURCES} ${HEADERS} ${RESOURCES} ) - -target_link_libraries( ${PROJECT_NAME} ${SDL2_LIBRARY} FreeImage_betsy ) - -if( WIN32 ) - target_link_libraries( ${PROJECT_NAME} opengl32.lib ) -elseif( UNIX ) - target_link_libraries( ${PROJECT_NAME} dl ) -endif() - -if( APPLE ) - set_target_properties( ${PROJECT_NAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE "NO" ) - set_target_properties( ${PROJECT_NAME} PROPERTIES RESOURCE "${RESOURCES}" ) - set_target_properties( ${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/src/Info.plist ) - #set_target_properties( ${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_ICON_FILE SampleBrowser_OSX.icns) - set( CMAKE_EXE_LINKER_FLAGS "-framework Foundation -framework CoreGraphics -framework QuartzCore -framework UIKit -framework Metal -framework MetalKit -framework ModelIO" ) -endif() +add_subdirectory(contrib) +add_subdirectory(tools) +add_subdirectory(src) +if(BUILD_TESTING) + enable_testing() + add_subdirectory(tests) +endif() \ No newline at end of file diff --git a/Dependencies/CMakeLists.txt b/Dependencies/CMakeLists.txt deleted file mode 100644 index 2858de1..0000000 --- a/Dependencies/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ - -add_subdirectory( FreeImage ) - diff --git a/Dependencies/FreeImage/CMakeLists.txt b/Dependencies/FreeImage/CMakeLists.txt deleted file mode 100644 index bdd0891..0000000 --- a/Dependencies/FreeImage/CMakeLists.txt +++ /dev/null @@ -1,544 +0,0 @@ -project(FreeImage) - -set(FreeImage_SOURCES - Source/FreeImage/WuQuantizer.cpp - Source/FreeImage/tmoFattal02.cpp - Source/FreeImage/ConversionRGBAF.cpp - Source/FreeImage/PluginJP2.cpp - Source/FreeImage/PluginRAS.cpp - Source/FreeImage/MultiPage.cpp - Source/FreeImage/ConversionRGBA16.cpp - Source/FreeImage/PluginPFM.cpp - Source/FreeImage/PluginIFF.cpp - Source/FreeImage/Conversion.cpp - Source/FreeImage/ConversionRGB16.cpp - Source/FreeImage/NNQuantizer.cpp - Source/FreeImage/PluginPICT.cpp - Source/FreeImage/FreeImageIO.cpp - Source/FreeImage/Conversion32.cpp - Source/FreeImage/PluginMNG.cpp - Source/FreeImage/PluginJ2K.cpp - Source/FreeImage/ZLibInterface.cpp - Source/FreeImage/PluginXBM.cpp - Source/FreeImage/GetType.cpp - Source/FreeImage/PluginDDS.cpp - Source/FreeImage/ConversionFloat.cpp - Source/FreeImage/LFPQuantizer.cpp - Source/FreeImage/PluginPSD.cpp - Source/FreeImage/PluginWBMP.cpp - Source/FreeImage/Halftoning.cpp - Source/FreeImage/ConversionType.cpp - Source/FreeImage/BitmapAccess.cpp - Source/FreeImage/PluginPCX.cpp - Source/FreeImage/PluginHDR.cpp - Source/FreeImage/Conversion8.cpp - Source/FreeImage/Conversion24.cpp - Source/FreeImage/PluginG3.cpp - Source/FreeImage/PluginXPM.cpp - Source/FreeImage/PluginSGI.cpp - Source/FreeImage/PluginGIF.cpp - Source/FreeImage/ConversionUINT16.cpp - Source/FreeImage/PSDParser.cpp - Source/FreeImage/PluginPCD.cpp - Source/FreeImage/ConversionRGBF.cpp - Source/FreeImage/PluginPNM.cpp - Source/FreeImage/TIFFLogLuv.cpp - Source/FreeImage/Conversion4.cpp - Source/FreeImage/PluginBMP.cpp - Source/FreeImage/PluginTARGA.cpp - Source/FreeImage/Plugin.cpp - Source/FreeImage/tmoReinhard05.cpp - Source/FreeImage/PixelAccess.cpp - Source/FreeImage/Conversion16_565.cpp - Source/FreeImage/PluginPNG.cpp - Source/FreeImage/tmoColorConvert.cpp - Source/FreeImage/ColorLookup.cpp - Source/FreeImage/ToneMapping.cpp - Source/FreeImage/PluginEXR.cpp - Source/FreeImage/J2KHelper.cpp - Source/FreeImage/MNGHelper.cpp - Source/FreeImage/PluginTIFF.cpp - Source/FreeImage/PluginJPEG.cpp - Source/FreeImage/PluginJNG.cpp - Source/FreeImage/PluginKOALA.cpp - Source/FreeImage/PluginICO.cpp - Source/FreeImage/PluginCUT.cpp - Source/FreeImage/FreeImage.cpp - Source/FreeImage/Conversion16_555.cpp - Source/FreeImage/CacheFile.cpp - Source/FreeImage/MemoryIO.cpp - Source/FreeImage/tmoDrago03.cpp - Source/FreeImage/PluginWebP.cpp - Source/Metadata/TagConversion.cpp - Source/Metadata/IPTC.cpp - Source/Metadata/FIRational.cpp - Source/Metadata/XTIFF.cpp - Source/Metadata/FreeImageTag.cpp - Source/Metadata/TagLib.cpp - Source/Metadata/Exif.cpp - Source/OpenEXR/IexMath/IexMathFpu.cpp - Source/OpenEXR/IexMath/IexMathFloatExc.cpp - Source/OpenEXR/Half/eLut.cpp - Source/OpenEXR/Half/toFloat.cpp - Source/OpenEXR/Half/half.cpp - Source/OpenEXR/Imath/ImathMatrixAlgo.cpp - Source/OpenEXR/Imath/ImathShear.cpp - Source/OpenEXR/Imath/ImathFun.cpp - Source/OpenEXR/Imath/ImathColorAlgo.cpp - Source/OpenEXR/Imath/ImathRandom.cpp - Source/OpenEXR/Imath/ImathVec.cpp - Source/OpenEXR/Imath/ImathBox.cpp - Source/OpenEXR/IlmThread/IlmThreadPool.cpp - Source/OpenEXR/IlmImf/ImfTestFile.cpp - Source/OpenEXR/IlmImf/ImfPreviewImage.cpp - Source/OpenEXR/IlmImf/ImfStdIO.cpp - Source/OpenEXR/IlmImf/ImfOutputFile.cpp - Source/OpenEXR/IlmImf/ImfInputPart.cpp - Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp - Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp - Source/OpenEXR/IlmImf/ImfRleCompressor.cpp - Source/OpenEXR/IlmImf/ImfOutputPart.cpp - Source/OpenEXR/IlmImf/ImfMultiView.cpp - Source/OpenEXR/IlmImf/ImfWav.cpp - Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp - Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.cpp - Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp - Source/OpenEXR/IlmImf/ImfLut.cpp - Source/OpenEXR/IlmImf/ImfCompressor.cpp - Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp - Source/OpenEXR/IlmImf/ImfVecAttribute.cpp - Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp - Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.cpp - Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp - Source/OpenEXR/IlmImf/ImfKeyCode.cpp - Source/OpenEXR/IlmImf/ImfChromaticities.cpp - Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp - Source/OpenEXR/IlmImf/ImfAttribute.cpp - Source/OpenEXR/IlmImf/ImfFastHuf.cpp - Source/OpenEXR/IlmImf/ImfGenericInputFile.cpp - Source/OpenEXR/IlmImf/ImfChannelList.cpp - Source/OpenEXR/IlmImf/ImfVersion.cpp - Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp - Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.cpp - Source/OpenEXR/IlmImf/dwaLookups.cpp - Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.cpp - Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp - Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.cpp - Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp - Source/OpenEXR/IlmImf/ImfInputFile.cpp - Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp - Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.cpp - Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp - Source/OpenEXR/IlmImf/ImfInputPartData.cpp - Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp - Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.cpp - Source/OpenEXR/IlmImf/ImfThreading.cpp - Source/OpenEXR/IlmImf/ImfPizCompressor.cpp - Source/OpenEXR/IlmImf/ImfTileOffsets.cpp - Source/OpenEXR/IlmImf/ImfZipCompressor.cpp - Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.cpp - Source/OpenEXR/IlmImf/ImfTiledMisc.cpp - Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp - Source/OpenEXR/IlmImf/ImfIntAttribute.cpp - Source/OpenEXR/IlmImf/ImfRgbaYca.cpp - Source/OpenEXR/IlmImf/ImfPartType.cpp - Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp - Source/OpenEXR/IlmImf/ImfDeepFrameBuffer.cpp - Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.cpp - Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp - Source/OpenEXR/IlmImf/ImfEnvmap.cpp - Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp - Source/OpenEXR/IlmImf/ImfZip.cpp - Source/OpenEXR/IlmImf/ImfRle.cpp - Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp - Source/OpenEXR/IlmImf/ImfMisc.cpp - Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp - Source/OpenEXR/IlmImf/b44ExpLogTable.cpp - Source/OpenEXR/IlmImf/ImfIO.cpp - Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp - Source/OpenEXR/IlmImf/ImfConvert.cpp - Source/OpenEXR/IlmImf/ImfTiledInputPart.cpp - Source/OpenEXR/IlmImf/ImfStringAttribute.cpp - Source/OpenEXR/IlmImf/ImfHeader.cpp - Source/OpenEXR/IlmImf/ImfTimeCode.cpp - Source/OpenEXR/IlmImf/ImfAcesFile.cpp - Source/OpenEXR/IlmImf/ImfTiledOutputPart.cpp - Source/OpenEXR/IlmImf/ImfGenericOutputFile.cpp - Source/OpenEXR/IlmImf/ImfB44Compressor.cpp - Source/OpenEXR/IlmImf/ImfDwaCompressor.cpp - Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.cpp - Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp - Source/OpenEXR/IlmImf/ImfRgbaFile.cpp - Source/OpenEXR/IlmImf/ImfHuf.cpp - Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp - Source/OpenEXR/IlmImf/ImfRational.cpp - Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.cpp - Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp - Source/OpenEXR/IlmImf/ImfOutputPartData.cpp - Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp - Source/OpenEXR/IlmImf/ImfMultiPartInputFile.cpp - Source/OpenEXR/IlmImf/ImfDeepCompositing.cpp - Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp - Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp - Source/OpenEXR/Iex/IexBaseExc.cpp - Source/OpenEXR/Iex/IexThrowErrnoExc.cpp - Source/FreeImageToolkit/MultigridPoissonSolver.cpp - Source/FreeImageToolkit/Display.cpp - Source/FreeImageToolkit/BSplineRotate.cpp - Source/FreeImageToolkit/Channels.cpp - Source/FreeImageToolkit/Background.cpp - Source/FreeImageToolkit/Rescale.cpp - Source/FreeImageToolkit/Resize.cpp - Source/FreeImageToolkit/CopyPaste.cpp - Source/FreeImageToolkit/Colors.cpp - Source/FreeImageToolkit/ClassicRotate.cpp - Source/FreeImageToolkit/Flip.cpp - Source/FreeImageToolkit/JPEGTransform.cpp - - Source/ZLib/gzwrite.c - Source/ZLib/compress.c - Source/ZLib/deflate.c - Source/ZLib/inftrees.c - Source/ZLib/gzclose.c - Source/ZLib/gzlib.c - Source/ZLib/trees.c - Source/ZLib/inflate.c - Source/ZLib/infback.c - Source/ZLib/crc32.c - Source/ZLib/zutil.c - Source/ZLib/inffast.c - Source/ZLib/adler32.c - Source/ZLib/gzread.c - Source/ZLib/uncompr.c - Source/LibTIFF4/tif_warning.c - Source/LibTIFF4/tif_jpeg_12.c - Source/LibTIFF4/tif_predict.c - Source/LibTIFF4/tif_read.c - Source/LibTIFF4/tif_version.c - Source/LibTIFF4/tif_write.c - Source/LibTIFF4/tif_fax3sm.c - Source/LibTIFF4/tif_flush.c - Source/LibTIFF4/tif_thunder.c - Source/LibTIFF4/tif_compress.c - Source/LibTIFF4/tif_dirinfo.c - Source/LibTIFF4/tif_color.c - Source/LibTIFF4/tif_jpeg.c - Source/LibTIFF4/tif_dirwrite.c - Source/LibTIFF4/tif_ojpeg.c - Source/LibTIFF4/tif_pixarlog.c - Source/LibTIFF4/tif_print.c - Source/LibTIFF4/tif_luv.c - Source/LibTIFF4/tif_lzw.c - Source/LibTIFF4/tif_packbits.c - Source/LibTIFF4/tif_extension.c - Source/LibTIFF4/tif_open.c - Source/LibTIFF4/tif_dumpmode.c - Source/LibTIFF4/tif_fax3.c - Source/LibTIFF4/tif_dir.c - Source/LibTIFF4/tif_zip.c - Source/LibTIFF4/tif_jbig.c - Source/LibTIFF4/tif_swab.c - Source/LibTIFF4/tif_getimage.c - Source/LibTIFF4/tif_zstd.c - Source/LibTIFF4/tif_close.c - Source/LibTIFF4/tif_codec.c - Source/LibTIFF4/tif_next.c - Source/LibTIFF4/tif_aux.c - Source/LibTIFF4/tif_tile.c - Source/LibTIFF4/tif_dirread.c - Source/LibTIFF4/tif_strip.c - Source/LibTIFF4/tif_error.c - Source/LibTIFF4/tif_lzma.c - Source/LibTIFF4/mkg3states.c - Source/LibTIFF4/mkspans.c - Source/FreeImage/FreeImageC.c - Source/LibJPEG/wrbmp.c - Source/LibJPEG/rdjpgcom.c - Source/LibJPEG/wrppm.c - Source/LibJPEG/wrtarga.c - Source/LibJPEG/rdtarga.c - Source/LibJPEG/jccoefct.c - Source/LibJPEG/jdapistd.c - Source/LibJPEG/jcmarker.c - Source/LibJPEG/jcmainct.c - Source/LibJPEG/jdmainct.c - Source/LibJPEG/jcapistd.c - Source/LibJPEG/jdpostct.c - Source/LibJPEG/jcdctmgr.c - Source/LibJPEG/jccolor.c - Source/LibJPEG/jdatasrc.c - Source/LibJPEG/jdmaster.c - Source/LibJPEG/jdmarker.c - Source/LibJPEG/jdarith.c - Source/LibJPEG/jcparam.c - Source/LibJPEG/djpeg.c - Source/LibJPEG/jcmaster.c - Source/LibJPEG/wrjpgcom.c - Source/LibJPEG/jmemmgr.c - Source/LibJPEG/jcsample.c - Source/LibJPEG/jdsample.c - Source/LibJPEG/jcomapi.c - Source/LibJPEG/jdinput.c - Source/LibJPEG/cjpeg.c - Source/LibJPEG/jdatadst.c - Source/LibJPEG/jdcoefct.c - Source/LibJPEG/jmemname.c - Source/LibJPEG/jdcolor.c - Source/LibJPEG/jerror.c - Source/LibJPEG/jmemnobs.c - Source/LibJPEG/rdswitch.c - Source/LibJPEG/jdtrans.c - Source/LibJPEG/jidctfst.c - Source/LibJPEG/jfdctflt.c - Source/LibJPEG/jddctmgr.c - Source/LibJPEG/ckconfig.c - Source/LibJPEG/example.c - Source/LibJPEG/jidctflt.c - Source/LibJPEG/jpegtran.c - Source/LibJPEG/jctrans.c - Source/LibJPEG/rdppm.c - Source/LibJPEG/jaricom.c - Source/LibJPEG/jcapimin.c - Source/LibJPEG/jdmerge.c - Source/LibJPEG/rdbmp.c - Source/LibJPEG/jdhuff.c - Source/LibJPEG/rdcolmap.c - Source/LibJPEG/wrgif.c - Source/LibJPEG/jfdctfst.c - Source/LibJPEG/jchuff.c - Source/LibJPEG/wrrle.c - Source/LibJPEG/jutils.c - Source/LibJPEG/jidctint.c - Source/LibJPEG/cdjpeg.c - Source/LibJPEG/jquant2.c - Source/LibJPEG/rdgif.c - Source/LibJPEG/jcprepct.c - Source/LibJPEG/jdapimin.c - Source/LibJPEG/jcarith.c - Source/LibJPEG/jfdctint.c - Source/LibJPEG/jquant1.c - Source/LibJPEG/jcinit.c - Source/LibJPEG/jmemansi.c - Source/LibJPEG/transupp.c - Source/LibJPEG/rdrle.c - Source/LibPNG/pngget.c - Source/LibPNG/pngwutil.c - Source/LibPNG/pngrio.c - Source/LibPNG/pngwtran.c - Source/LibPNG/pngtest.c - Source/LibPNG/png.c - Source/LibPNG/pngmem.c - Source/LibPNG/example.c - Source/LibPNG/pngread.c - Source/LibPNG/pngwrite.c - Source/LibPNG/pngset.c - Source/LibPNG/pngwio.c - Source/LibPNG/pngpread.c - Source/LibPNG/pngrutil.c - Source/LibPNG/pngerror.c - Source/LibPNG/pngrtran.c - Source/LibPNG/pngtrans.c - Source/LibWebP/src/dsp/yuv_sse41.c - Source/LibWebP/src/dsp/filters_neon.c - Source/LibWebP/src/dsp/upsampling_mips_dsp_r2.c - Source/LibWebP/src/dsp/dec_neon.c - Source/LibWebP/src/dsp/alpha_processing_sse41.c - Source/LibWebP/src/dsp/enc_mips_dsp_r2.c - Source/LibWebP/src/dsp/enc_msa.c - Source/LibWebP/src/dsp/lossless_enc_sse41.c - Source/LibWebP/src/dsp/upsampling.c - Source/LibWebP/src/dsp/enc_mips32.c - Source/LibWebP/src/dsp/rescaler_mips32.c - Source/LibWebP/src/dsp/enc_sse41.c - Source/LibWebP/src/dsp/lossless_mips_dsp_r2.c - Source/LibWebP/src/dsp/yuv_mips_dsp_r2.c - Source/LibWebP/src/dsp/yuv_neon.c - Source/LibWebP/src/dsp/alpha_processing_neon.c - Source/LibWebP/src/dsp/dec_sse41.c - Source/LibWebP/src/dsp/filters_sse2.c - Source/LibWebP/src/dsp/rescaler_sse2.c - Source/LibWebP/src/dsp/filters.c - Source/LibWebP/src/dsp/yuv.c - Source/LibWebP/src/dsp/lossless_enc_neon.c - Source/LibWebP/src/dsp/lossless_msa.c - Source/LibWebP/src/dsp/upsampling_msa.c - Source/LibWebP/src/dsp/rescaler_neon.c - Source/LibWebP/src/dsp/alpha_processing.c - Source/LibWebP/src/dsp/filters_mips_dsp_r2.c - Source/LibWebP/src/dsp/enc_sse2.c - Source/LibWebP/src/dsp/alpha_processing_mips_dsp_r2.c - Source/LibWebP/src/dsp/rescaler_mips_dsp_r2.c - Source/LibWebP/src/dsp/lossless_enc.c - Source/LibWebP/src/dsp/lossless_neon.c - Source/LibWebP/src/dsp/filters_msa.c - Source/LibWebP/src/dsp/dec_mips32.c - Source/LibWebP/src/dsp/yuv_mips32.c - Source/LibWebP/src/dsp/lossless_enc_mips32.c - Source/LibWebP/src/dsp/dec.c - Source/LibWebP/src/dsp/enc.c - Source/LibWebP/src/dsp/upsampling_sse2.c - Source/LibWebP/src/dsp/upsampling_sse41.c - Source/LibWebP/src/dsp/alpha_processing_sse2.c - Source/LibWebP/src/dsp/yuv_sse2.c - Source/LibWebP/src/dsp/rescaler_msa.c - Source/LibWebP/src/dsp/lossless_enc_mips_dsp_r2.c - Source/LibWebP/src/dsp/cost_mips_dsp_r2.c - Source/LibWebP/src/dsp/dec_msa.c - Source/LibWebP/src/dsp/ssim_sse2.c - Source/LibWebP/src/dsp/enc_avx2.c - Source/LibWebP/src/dsp/cost.c - Source/LibWebP/src/dsp/lossless.c - Source/LibWebP/src/dsp/rescaler.c - Source/LibWebP/src/dsp/upsampling_neon.c - Source/LibWebP/src/dsp/ssim.c - Source/LibWebP/src/dsp/cpu.c - Source/LibWebP/src/dsp/cost_mips32.c - Source/LibWebP/src/dsp/enc_neon.c - Source/LibWebP/src/dsp/lossless_enc_msa.c - Source/LibWebP/src/dsp/lossless_sse2.c - Source/LibWebP/src/dsp/dec_clip_tables.c - Source/LibWebP/src/dsp/dec_mips_dsp_r2.c - Source/LibWebP/src/dsp/lossless_enc_sse2.c - Source/LibWebP/src/dsp/dec_sse2.c - Source/LibWebP/src/dsp/cost_sse2.c - Source/LibWebP/src/dec - Source/LibWebP/src/dec/vp8_dec.c - Source/LibWebP/src/dec/buffer_dec.c - Source/LibWebP/src/dec/idec_dec.c - Source/LibWebP/src/dec/quant_dec.c - Source/LibWebP/src/dec/frame_dec.c - Source/LibWebP/src/dec/tree_dec.c - Source/LibWebP/src/dec/alpha_dec.c - Source/LibWebP/src/dec/webp_dec.c - Source/LibWebP/src/dec/io_dec.c - Source/LibWebP/src/dec/vp8l_dec.c - Source/LibWebP/src/enc - Source/LibWebP/src/enc/frame_enc.c - Source/LibWebP/src/enc/near_lossless_enc.c - Source/LibWebP/src/enc/picture_tools_enc.c - Source/LibWebP/src/enc/backward_references_cost_enc.c - Source/LibWebP/src/enc/quant_enc.c - Source/LibWebP/src/enc/histogram_enc.c - Source/LibWebP/src/enc/webp_enc.c - Source/LibWebP/src/enc/picture_rescale_enc.c - Source/LibWebP/src/enc/picture_enc.c - Source/LibWebP/src/enc/iterator_enc.c - Source/LibWebP/src/enc/filter_enc.c - Source/LibWebP/src/enc/predictor_enc.c - Source/LibWebP/src/enc/cost_enc.c - Source/LibWebP/src/enc/picture_psnr_enc.c - Source/LibWebP/src/enc/vp8l_enc.c - Source/LibWebP/src/enc/syntax_enc.c - Source/LibWebP/src/enc/config_enc.c - Source/LibWebP/src/enc/tree_enc.c - Source/LibWebP/src/enc/alpha_enc.c - Source/LibWebP/src/enc/analysis_enc.c - Source/LibWebP/src/enc/token_enc.c - Source/LibWebP/src/enc/backward_references_enc.c - Source/LibWebP/src/enc/picture_csp_enc.c - Source/LibWebP/src/demux/anim_decode.c - Source/LibWebP/src/demux/demux.c - Source/LibWebP/src/mux/muxinternal.c - Source/LibWebP/src/mux/muxread.c - Source/LibWebP/src/mux/anim_encode.c - Source/LibWebP/src/mux/muxedit.c - Source/LibWebP/src/utils/filters_utils.c - Source/LibWebP/src/utils/huffman_utils.c - Source/LibWebP/src/utils/rescaler_utils.c - Source/LibWebP/src/utils/bit_writer_utils.c - Source/LibWebP/src/utils/bit_reader_utils.c - Source/LibWebP/src/utils/random_utils.c - Source/LibWebP/src/utils/color_cache_utils.c - Source/LibWebP/src/utils/utils.c - Source/LibWebP/src/utils/quant_levels_utils.c - Source/LibWebP/src/utils/huffman_encode_utils.c - Source/LibWebP/src/utils/thread_utils.c - Source/LibWebP/src/utils/quant_levels_dec_utils.c - Source/LibOpenJPEG/t1_generate_luts.c - Source/LibOpenJPEG/phix_manager.c - Source/LibOpenJPEG/openjpeg.c - Source/LibOpenJPEG/opj_clock.c - Source/LibOpenJPEG/thix_manager.c - Source/LibOpenJPEG/event.c - Source/LibOpenJPEG/tpix_manager.c - Source/LibOpenJPEG/function_list.c - Source/LibOpenJPEG/pi.c - Source/LibOpenJPEG/mqc.c - Source/LibOpenJPEG/tgt.c - Source/LibOpenJPEG/mct.c - Source/LibOpenJPEG/image.c - Source/LibOpenJPEG/ppix_manager.c - Source/LibOpenJPEG/raw.c - Source/LibOpenJPEG/t2.c - Source/LibOpenJPEG/tcd.c - Source/LibOpenJPEG/dwt.c - Source/LibOpenJPEG/jp2.c - Source/LibOpenJPEG/cio.c - Source/LibOpenJPEG/bio.c - Source/LibOpenJPEG/t1.c - Source/LibOpenJPEG/j2k.c - Source/LibOpenJPEG/invert.c - Source/LibOpenJPEG/cidx_manager.c -) - -if( WIN32 ) - set(FreeImage_SOURCES ${FreeImage_SOURCES} - Source/OpenEXR/IlmThread/IlmThreadSemaphoreWin32.cpp - Source/OpenEXR/IlmThread/IlmThreadMutexWin32.cpp - Source/OpenEXR/IlmThread/IlmThreadWin32.cpp - Source/LibTIFF4/tif_win32.c - ) -elseif( APPLE ) - set(FreeImage_SOURCES ${FreeImage_SOURCES} - Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp - Source/OpenEXR/IlmThread/IlmThreadSemaphorePosixCompat.cpp - Source/OpenEXR/IlmThread/IlmThreadPosix.cpp - Source/OpenEXR/IlmThread/IlmThreadMutex.cpp - Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp - Source/OpenEXR/IlmThread/IlmThread.cpp - Source/LibTIFF4/tif_unix.c - ) -else() - set(FreeImage_SOURCES ${FreeImage_SOURCES} - Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp - Source/OpenEXR/IlmThread/IlmThreadSemaphorePosix.cpp - Source/OpenEXR/IlmThread/IlmThreadPosix.cpp - Source/OpenEXR/IlmThread/IlmThreadMutex.cpp - Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp - Source/OpenEXR/IlmThread/IlmThread.cpp - ) -endif() - -# need include directories for FreeImage and all the sub libs -include_directories(Source) -include_directories(Source/FreeImage) -include_directories(Source/FreeImageToolkit) -include_directories(Source/LibJPEG) -include_directories(Source/LibOpenJPEG) -include_directories(Source/LibPNG) -include_directories(Source/LibTIFF4) -include_directories(Source/LibWebP) -include_directories(Source/Metadata) -include_directories(Source/OpenEXR) -include_directories(Source/OpenEXR/Half) -include_directories(Source/OpenEXR/Iex) -include_directories(Source/OpenEXR/IexMath) -include_directories(Source/OpenEXR/IlmImf) -include_directories(Source/OpenEXR/IlmThread) -include_directories(Source/OpenEXR/Imath) -include_directories(Source/ZLib) - -add_definitions(-DOPJ_STATIC -DFREEIMAGE_LIB -DNO_LCMS ) -if( WIN32 ) - add_definitions( -DMBCS -D_MBCS ) - remove_definitions( -DUNICODE -D_UNICODE ) -endif() -add_library(FreeImage STATIC ${FreeImage_SOURCES}) - -if (APPLE) - if(OGRE_BUILD_PLATFORM_APPLE_IOS) - set_target_properties(FreeImage PROPERTIES XCODE_ATTRIBUTE_GCC_THUMB_SUPPORT "NO") - endif() -endif() - - diff --git a/Dependencies/FreeImage/README.iphone b/Dependencies/FreeImage/README.iphone deleted file mode 100644 index 181912f..0000000 --- a/Dependencies/FreeImage/README.iphone +++ /dev/null @@ -1,19 +0,0 @@ -Makefile for iPhone - -found on the web, see -http://robertcarlsen.net/2009/03/16/openframeworks-iphone-586 -http://robertcarlsen.net/2009/03/25/openframeworks-iphone-libs-593 -http://4u.jeffcrouse.info/of/ - -See also : - -Makefile for XCode 4.6 and iOS SDK 6.1 -http://sourceforge.net/p/freeimage/discussion/36109/thread/1f345192/ - -Building the FreeImage lib for PIE and armv7 -http://forum.openframeworks.cc/t/building-the-freeimage-lib-for-pie-and-armv7/13714 - ------------------------------------------------------------------------------ - -Run "make -f Makefile.iphone". -This should build both the iPhone and iPhone Simulator libraries into the "Dist" folder. diff --git a/Dependencies/FreeImage/README.linux b/Dependencies/FreeImage/README.linux deleted file mode 100644 index 0e8659e..0000000 --- a/Dependencies/FreeImage/README.linux +++ /dev/null @@ -1,50 +0,0 @@ -Release Notes --------------- -This version of the library has been tested under the following OS: -- RedHat Linux 7.3, 8.0 and 9.0 -- Fedora Core 2 -- SuSE Linux Enterprise 8 and SuSE 9.0. -- Debian 4 - -You *do not* need to have any other third party library (libjpeg, libpng, libtiff, libmng and zlib) -installed on your /usr/lib directory in order to compile and use the library. -FreeImage uses its own versions of these libraries. This way, you can be sure that FreeImage will -always use the latest version of each third party library. - -The FreeImage makefile makes use of the gcc "-fvisibility=hidden" in order to avoid incompatibilities between -internal third party libraries and the OS libraries. You may have to remove this option if you're running an -old version of gcc. See also http://gcc.gnu.org/wiki/Visibility - -You should be able to link progams with the -lfreeimage option after the library is compiled and installed. -You can also statically link with libfreeimage.a. -If you use a really old version of gcc and it chokes on the CRs in the file, you can type 'make dos2unix' -to run all of the files through dos2unix which converts CRLF to LF. This no longer appears to be required -for RedHat 7.3 or 9. - -Please let me know how this works for you under other Linux distributions or any other *nix. - -Herve Drolon -FreeImage Project Manager - -Installation ------------- -Note: You will need to have root privileges in order to install the library in the /usr/lib directory. -The installation process is as simple as this : -1) Enter the FreeImage directory -2) Build the distribution : -make -make install -3) Clean all files produced during the build process -make clean - -Compiling FreeImagePlus ------------------------ -FreeImagePlus is a C++ wrapper for FreeImage. -To compile FreeImage as a C++ library, follow these steps : -1) Enter the FreeImage directory -2) Build the distribution : -make -f Makefile.fip -make -f Makefile.fip install -3) Clean all files produced during the build process -make -f Makefile.fip clean - diff --git a/Dependencies/FreeImage/README.md b/Dependencies/FreeImage/README.md deleted file mode 100644 index 15a42e1..0000000 --- a/Dependencies/FreeImage/README.md +++ /dev/null @@ -1,9 +0,0 @@ -What is FreeImage ? ------------------------------------------------------------------------------ -FreeImage is an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications. -FreeImage is easy to use, fast, multithreading safe, and cross-platform (works with Windows, Linux and Mac OS X). - -Thanks to it's ANSI C interface, FreeImage is usable in many languages including C, C++, VB, C#, Delphi, Java and also in common scripting languages such as Perl, Python, PHP, TCL, Lua or Ruby. - -The library comes in two versions: a binary DLL distribution that can be linked against any WIN32/WIN64 C/C++ compiler and a source distribution. -Workspace files for Microsoft Visual Studio provided, as well as makefiles for Linux, Mac OS X and other systems. diff --git a/Dependencies/FreeImage/README.minGW b/Dependencies/FreeImage/README.minGW deleted file mode 100644 index 30195c3..0000000 --- a/Dependencies/FreeImage/README.minGW +++ /dev/null @@ -1,236 +0,0 @@ -===================================================================== -Using the FreeImage library with the MinGW Compiler Suite -===================================================================== - -This file describes how to use the precompiled FreeImage library -FreeImage.dll with the MinGW port of the GNU Compiler Collection -(GCC), how to build this library from source using MinGW and how -to use this MinGW-built library with Microsoft Visual Studio. - -Contents: - -I. Prerequisites - -1. Using the precompiled FreeImage library with MinGW - -2. Building the FreeImage library with MinGW - -3. Using the MinGW FreeImage library with Microsoft Visual Studio - -4. Useful links - - ---------------------------------------------------------------------- -I. Prerequisites -===================================================================== - -The procedures described in this document have been developed and -tested using the following free tools: - -1. MinGW GCC Version 4.4.0 (Core and C++ including required libs) -2. MinGW GNU Binutils Version 2.19.1 -3. MinGW GNU Make Version 3.81-20080326-3 -4. MinGW Runtime Version 3.15.2 -5. MinGW API for MS-Windows Version 3.13 -6. GnuWin32 Package CoreUtils Version 5.3.0 (only for building) -7. GnuWin32 Package Sed Version 4.2 (only for creating the GCC - import library)* - -* Sed is only needed to create a GCC-native import library from - the MSVC import library FreeImage.lib. However, since MinGW now - supports linking against MSVC lib files, this process seems to - be obsolete. See section 1. - -Basically, no version dependent capabilities are used so, this -should also work with older versions of the tools mentioned above. -Similarly, the GnuWin32 packages (which I just prefer over MSYS) -could likely be replaced by a properly installed MSYS environment. - -Furthermore, the following preconditions should be met: - -1. The folders 'bin' under both the MinGW and the GnuWin32 - installation directory should have been added to the PATH - environment variable. Likely it is best adding these - directories permanently to PATH through the System - Properties dialog on the Control Panel. - -2. The MinGW Make package only provides a 'mingw32-make.exe' - executable. There is no alias 'make.exe'. However, make is - preconfigured to use 'make' as the default $(MAKE) command. - This seems to be a bug in the MinGW GNU Make distribution. - Thus, a copy of 'mingw32-make.exe' named 'make.exe' should - be placed into MinGW's 'bin' directory. - - - ---------------------------------------------------------------------- -1. Using the precompiled FreeImage library with MinGW -===================================================================== - -When using functions from C/C++, that reside in a DLL, the linker -needs a so called import library, which specifies, how to -dynamically link these external functions during runtime. However, -different linkers use different types or formats of these import -libraries. - -Since the precompiled FreeImage library was build with Microsoft -Visual Studio, in the past, some extra work was required to use it -from MinGW. An import library, that was compatible with GNU ld, -must have been created first. - -However, for several MinGW versions, the GNU linker ld also -supports linking against Microsoft Visual C++ import libraries -directly. So, this effectively makes any circulating HOWTO's on -how to create a GCC-compatible import library from a MSVC lib file -more or less obsolete. Additionally, MinGW does not require the -GCC/Linux usual lib prefix for libraries, so linking with MinGW -against the precompiled FreeImage DLL is as easy as with MSVC: - -1.) Open a DOS shell (run application cmd.exe) - -2.) Ensure, that the 'bin' folder of MinGW is added to the PATH - environment variable (see Prerequisites). - -3.) Link directly against the supplied lib file: - - C:\>gcc -oFreeImageTest.exe FreeImageTest.c -lFreeImage - -Nonetheless, for the sake of completeness, the following steps -describe how to create a native GCC import library: - -1.) Open a DOS shell (run application cmd.exe) - -2.) Ensure, that the 'bin' folders of both MinGW and GnuWin32 are - added to the PATH environment variable (see Prerequisites). - -3.) Create a .def file 'libfreeimage.def', that contains all symbols - exported by the FreeImage library: - - C:\>pexports FreeImage.dll | sed "s/^_//" > libfreeimage.def - -4.) Create the GCC compatible import library 'libfreeimage.a': - - C:\>dlltool --add-underscore -d libfreeimage.def -l libfreeimage.a - -5.) Use this library to link against with GCC: - - C:\>gcc -oFreeImageTest.exe FreeImageTest.c -lfreeimage - - - ---------------------------------------------------------------------- -2. Building the FreeImage library with MinGW -===================================================================== - -You *do not* need to have any other third party library (like -libjpeg, libpng, libtiff, libmng and zlib and others) installed on -your system in order to compile and use the library. FreeImage uses -its own versions of these libraries. This way, you can be sure that -FreeImage will always use the latest and properly tested versions -of of these third party libraries. - -In order to build the FreeImage library under Windows with MinGW -(GCC), ensure that all the prerequisites mentioned above are met. -The MinGW makefile aims to build a Windows DLL, that differs as -least as possible from the precompiled library that comes with the -FreeImage distribution. Thus, the build process also includes the -DLL version resource as well as the __stdcall attribute for all the -exported functions, including the MSVC-like function decorations -_FuncName@nn. - -When building the FreeImage DLL, of course, an import library is -generated, too. However, this input library is not in GCC's native -format, but in MSVC lib format, which makes it usable from both -MinGW and Microsoft Visual Studio with no further processing. - -The MinGW makefile can also be used to build a static library. -However, due to the different function export attributes needed -for both the dynamic and the shared library (DLL), this requires -a separate invocation of make, which in turn needs to rebuild every -source file after switching from dynamic to static and vice versa. -So, a 'make clean' is required each time, the library type is -changed. - -The type of library to build is specified by a variable named -FREEIMAGE_LIBRARY_TYPE, which may either be set directly in the -Makefile.mingw near line 18 or may be specified as an environment -variable. This variable may either take SHARED or STATIC to build -a dynamic link library (DLL) or a static library respectively. -Since this value is used to dynamically form the actual make target -internally, only uppercase values are valid. Defaults to SHARED. - -The MinGW makefile also supports the 'install' target. However, -this only copies the FreeImage dynamic link library (DLL) from the -Dist folder into the %SystemRoot%\system32 folder. So, invoking this -target only makes sense, if the DLL has been built before. - -Since there is neither a common system wide 'include' nor a 'lib' -directory available under Windows, the FreeImage header file -FreeImage.h as well as both the static library and the DLL import -library FreeImage.lib just remain in the 'Dist' folder. - -The following procedure creates the FreeImage dynamic link library -(DLL) from the sources, installs it and also creates a static -FreeImage library: - -1.) Open a DOS shell (run application cmd.exe) - -2.) Ensure, that the 'bin' folders of both MinGW and GnuWin32 are - added to the PATH environment variable (see Prerequisites). - -3.) Create the FreeImage dynamic link library (DLL): - - C:\>make - -4.) Install the FreeImage dynamic link library (DLL): - - C:\>make install - -5.) Clean all files produced by the recent build process: - - C:\>make clean - -6.) Create a static FreeImage library: - - C:\>set FREEIMAGE_LIBRARY_TYPE=STATIC - C:\>make - -You should be able to link progams with the -lFreeImage option -after the shared library is compiled and installed. You can also -link statically against FreeImage.a from MinGW. - - - ---------------------------------------------------------------------- -3. Using the MinGW FreeImage library with Microsoft Visual Studio -===================================================================== - -Since the MinGW makefile creates an import library in MSVC's lib -format, the produced shared library (DLL) can be used from both -MinGW and Microsoft Visual Studio with no further adaption. Just -link to the import library FreeImage.lib from either MinGW or -Microsoft Visual Studio. - - - ---------------------------------------------------------------------- -4. Useful links -===================================================================== - -- The MinGW homepage: - http://www.mingw.org/ - -- The GnuWin32 homepage: - http://gnuwin32.sourceforge.net/ - -- The GCC homepage and online documentation: - http://gcc.gnu.org/ - http://gcc.gnu.org/onlinedocs/ - -- The GNU Binutils homepage and online documentation: - http://www.gnu.org/software/binutils/ - http://sourceware.org/binutils/docs-2.19/ - -- The GNU Make homepage and online documentation: - http://www.gnu.org/software/make/ - http://www.gnu.org/software/make/manual/make.html diff --git a/Dependencies/FreeImage/README.osx b/Dependencies/FreeImage/README.osx deleted file mode 100644 index 16aba34..0000000 --- a/Dependencies/FreeImage/README.osx +++ /dev/null @@ -1,44 +0,0 @@ -Release Notes --------------- -This version of the library has been tested under OSX 10.3.9 PPC and OSX 10.4.8 Intel. - -While the makefiles will make a .dylib and a .a, it is recommended to simply staticly link with the .a file. - -FreeImage is now built as a Universal Binary and targets the 10.3.9 SDK for PPC and the 10.4u SDK for i386. -This means that you must have both of these SDKs installed and that you must be running on OSX 10.4+ to build FreeImage. -The library will run on 10.3 PPC, but probably not 10.2 or below anymore. wchar.h did not exist on 10.2. - -FreeImage is now built with gcc 4.0 and will thus only run on 10.3.9 or above (some libraries may not exist on 10.3.8 and below). - -The FreeImage makefile makes use of the gcc "-fvisibility=hidden" in order to avoid incompatibilities between -internal third party libraries and the OS libraries. This feature is available with gcc 4 or greater. - - -Ryan Rubley - -Building the Library --------------------- -Makefile detects the environment by calling 'uname'. Assuming this reports 'Darwin' on your system, Makefile will automatically -defer commands to Makefile.osx. If this doesn't work, type 'make -f Makefile.osx' in place of just 'make' - -The build process is as simple as this: -1) Enter the FreeImage directory -2) Build the distribution: -make -3) The libraries and header will be in the Dist directory when the build is finished - -To install FreeImage in the /usr/local/lib and /usr/local/include directories (not recommended): -make install - -To clean all files produced during the build process: -make clean - - -Additional notes ----------------- - -Building on Mac OS X Leopard : - -Install the xcode dev tools from the Leopard disk. -When installing the dev tools make sure to have installed 10.3.9 SDK (it's not selected by default). - diff --git a/Dependencies/FreeImage/README.solaris b/Dependencies/FreeImage/README.solaris deleted file mode 100644 index bf6431c..0000000 --- a/Dependencies/FreeImage/README.solaris +++ /dev/null @@ -1,67 +0,0 @@ -Release Notes --------------- -Hey folks, - -I just went through the process of building and using the freeimage library -on Solaris 9. Things don't work out of the box so I thought I would share my -experiences in case someone else wants to do the same. - -I'm using Solaris 9, and I have installed all the development libraries, make, -and the gcc 3.3.2 found on sunfreeware.com. - -You have to use the make from sunfreeware because the Solaris 9 make program -chokes hard on FreeImages makefiles. - -First thing I had to do was modify the main FreeImage makefile: - -1. go to the $(SHAREDLIB): line and replace the $(CC) line with the following. -(there are 2 corrections) - -$(CC) -s -G -Wl,-soname=$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES) - -The two changes are -G instead of -shared, and the = sign instead of a comma -after the -soname. - -2. change INSTALLDIR = /usr/lib to INSTALLDIR = /usr/local/lib - -This is because the sunfreeware tools assume the libs being built will reside -in /usr/local/lib and thus set the default linker search paths to that. Another -solution for this would be to use the -R and -L linker options, but I chose -the easy way :) - -That's it! You can now use freeimage. - -Also, if you have an autoconf/automake project that links against FreeImage, -you can use the following in your configure.in, it works rather well for me: - -AC_CHECK_LIB(freeimage-3.5.0, FreeImage_Initialise, [], - [AC_MSG_ERROR([libfreeimage-3.5.0.so required and missing. See -http://freeimage.sourceforge.net.]) ]) - -the AC_CHECK_LIB macro will not only find the library, it will automatically -link against it as well so you dont have to add it to your Makefile.am. - -I hope this helps someone! - ---- -ogtharox at users.sourceforge.net - - -Installation ------------- -Note: You will need to have root privileges in order to install the library in the /usr/local/lib directory. -The installation process is as simple as this : -1) Enter the FreeImage directory -2) Build the distribution : -make -f Makefile.solaris -make -f Makefile.solaris install -3) Clean all files produced during the build process -make -f Makefile.solaris clean - -Release Notes for Solaris/Sparc --------------------------------- -Under Solaris/Sparc, you will need to modify the following line : -COMPILERFLAGS = -O3 -modified into -COMPILERFLAGS = -O3 -DBYTE_ORDER=BIG_ENDIAN -D__BIG_ENDIAN__ - diff --git a/Dependencies/FreeImage/Source/CacheFile.h b/Dependencies/FreeImage/Source/CacheFile.h deleted file mode 100644 index 374e6ce..0000000 --- a/Dependencies/FreeImage/Source/CacheFile.h +++ /dev/null @@ -1,93 +0,0 @@ -// ========================================================== -// Multi-Page functions -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifndef FREEIMAGE_CACHEFILE_H -#define FREEIMAGE_CACHEFILE_H - -// ---------------------------------------------------------- - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- - -static const int CACHE_SIZE = 32; -static const int BLOCK_SIZE = (64 * 1024) - 8; - -// ---------------------------------------------------------- - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif // _WIN32 - -struct Block { - unsigned nr; - unsigned next; - BYTE *data; -}; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif // _WIN32 - -// ---------------------------------------------------------- - -class CacheFile { - typedef std::list PageCache; - typedef std::list::iterator PageCacheIt; - typedef std::map PageMap; - typedef std::map::iterator PageMapIt; - -public : - CacheFile(); - ~CacheFile(); - - BOOL open(const std::string& filename = "", BOOL keep_in_memory = TRUE); - void close(); - - BOOL readFile(BYTE *data, int nr, int size); - int writeFile(BYTE *data, int size); - void deleteFile(int nr); - -private : - void cleanupMemCache(); - int allocateBlock(); - Block *lockBlock(int nr); - BOOL unlockBlock(int nr); - BOOL deleteBlock(int nr); - -private : - FILE *m_file; - std::string m_filename; - std::list m_free_pages; - PageCache m_page_cache_mem; - PageCache m_page_cache_disk; - PageMap m_page_map; - int m_page_count; - Block *m_current_block; - BOOL m_keep_in_memory; -}; - -#endif // FREEIMAGE_CACHEFILE_H diff --git a/Dependencies/FreeImage/Source/FreeImage.h b/Dependencies/FreeImage/Source/FreeImage.h deleted file mode 100644 index 12182cd..0000000 --- a/Dependencies/FreeImage/Source/FreeImage.h +++ /dev/null @@ -1,1163 +0,0 @@ -// ========================================================== -// FreeImage 3 -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// -// Contributors: -// - see changes log named 'Whatsnew.txt', see header of each .h and .cpp file -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifndef FREEIMAGE_H -#define FREEIMAGE_H - -// Version information ------------------------------------------------------ - -#define FREEIMAGE_MAJOR_VERSION 3 -#define FREEIMAGE_MINOR_VERSION 18 -#define FREEIMAGE_RELEASE_SERIAL 0 - -// Compiler options --------------------------------------------------------- - -#include // needed for UNICODE functions - -#if defined(FREEIMAGE_LIB) - #define DLL_API - #define DLL_CALLCONV -#else - #if defined(_WIN32) || defined(__WIN32__) - #define DLL_CALLCONV __stdcall - // The following ifdef block is the standard way of creating macros which make exporting - // from a DLL simpler. All files within this DLL are compiled with the FREEIMAGE_EXPORTS - // symbol defined on the command line. this symbol should not be defined on any project - // that uses this DLL. This way any other project whose source files include this file see - // DLL_API functions as being imported from a DLL, wheras this DLL sees symbols - // defined with this macro as being exported. - #ifdef FREEIMAGE_EXPORTS - #define DLL_API __declspec(dllexport) - #else - #define DLL_API __declspec(dllimport) - #endif // FREEIMAGE_EXPORTS - #else - // try the gcc visibility support (see http://gcc.gnu.org/wiki/Visibility) - #if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) - #ifndef GCC_HASCLASSVISIBILITY - #define GCC_HASCLASSVISIBILITY - #endif - #endif // __GNUC__ - #define DLL_CALLCONV - #if defined(GCC_HASCLASSVISIBILITY) - #define DLL_API __attribute__ ((visibility("default"))) - #else - #define DLL_API - #endif - #endif // WIN32 / !WIN32 -#endif // FREEIMAGE_LIB - -// Endianness: -// Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined. -// If your big endian system isn't being detected, add an OS specific check -// or define any of FREEIMAGE_BIGENDIAN and FREEIMAGE_LITTLEENDIAN directly -// to specify the desired endianness. -#if (!defined(FREEIMAGE_BIGENDIAN) && !defined(FREEIMAGE_LITTLEENDIAN)) -#if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || (defined(__BYTE_ORDER) && __BYTE_ORDER==__ORDER_BIG_ENDIAN__) || defined(__BIG_ENDIAN__) - #define FREEIMAGE_BIGENDIAN - #endif // BYTE_ORDER -#endif // !FREEIMAGE_[BIG|LITTLE]ENDIAN - -// Color-Order: -// The specified order of color components red, green and blue affects 24- -// and 32-bit images of type FIT_BITMAP as well as the colors that are part -// of a color palette. All other images always use RGB order. By default, -// color order is coupled to endianness: -// little-endian -> BGR -// big-endian -> RGB -// However, you can always define FREEIMAGE_COLORORDER to any of the known -// orders FREEIMAGE_COLORORDER_BGR (0) and FREEIMAGE_COLORORDER_RGB (1) to -// specify your preferred color order. -#define FREEIMAGE_COLORORDER_BGR 0 -#define FREEIMAGE_COLORORDER_RGB 1 -#if (!defined(FREEIMAGE_COLORORDER)) || ((FREEIMAGE_COLORORDER != FREEIMAGE_COLORORDER_BGR) && (FREEIMAGE_COLORORDER != FREEIMAGE_COLORORDER_RGB)) - #if defined(FREEIMAGE_BIGENDIAN) - #define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_RGB - #else - #define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_BGR - #endif // FREEIMAGE_BIGENDIAN -#endif // FREEIMAGE_COLORORDER - -// Ensure 4-byte enums if we're using Borland C++ compilers -#if defined(__BORLANDC__) -#pragma option push -b -#endif - -// For C compatibility -------------------------------------------------------- - -#ifdef __cplusplus -#define FI_DEFAULT(x) = x -#define FI_ENUM(x) enum x -#define FI_STRUCT(x) struct x -#else -#define FI_DEFAULT(x) -#define FI_ENUM(x) typedef int x; enum x -#define FI_STRUCT(x) typedef struct x x; struct x -#endif - -// Bitmap types ------------------------------------------------------------- - -FI_STRUCT (FIBITMAP) { void *data; }; -FI_STRUCT (FIMULTIBITMAP) { void *data; }; - -// Types used in the library (directly copied from Windows) ----------------- - -#if defined(__MINGW32__) && defined(_WINDOWS_H) -#define _WINDOWS_ // prevent a bug in MinGW32 -#endif // __MINGW32__ - -#ifndef _WINDOWS_ -#define _WINDOWS_ - -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef NULL -#define NULL 0 -#endif - -#ifndef SEEK_SET -#define SEEK_SET 0 -#define SEEK_CUR 1 -#define SEEK_END 2 -#endif - -#ifndef _MSC_VER -// define portable types for 32-bit / 64-bit OS -#include -typedef int32_t BOOL; -typedef uint8_t BYTE; -typedef uint16_t WORD; -typedef uint32_t DWORD; -typedef int32_t LONG; -typedef int64_t INT64; -typedef uint64_t UINT64; -#else -// MS is not C99 ISO compliant -typedef long BOOL; -typedef unsigned char BYTE; -typedef unsigned short WORD; -typedef unsigned long DWORD; -typedef long LONG; -typedef signed __int64 INT64; -typedef unsigned __int64 UINT64; -#endif // _MSC_VER - -#if (defined(_WIN32) || defined(__WIN32__)) -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif // WIN32 - -typedef struct tagRGBQUAD { -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - BYTE rgbBlue; - BYTE rgbGreen; - BYTE rgbRed; -#else - BYTE rgbRed; - BYTE rgbGreen; - BYTE rgbBlue; -#endif // FREEIMAGE_COLORORDER - BYTE rgbReserved; -} RGBQUAD; - -typedef struct tagRGBTRIPLE { -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - BYTE rgbtBlue; - BYTE rgbtGreen; - BYTE rgbtRed; -#else - BYTE rgbtRed; - BYTE rgbtGreen; - BYTE rgbtBlue; -#endif // FREEIMAGE_COLORORDER -} RGBTRIPLE; - -#if (defined(_WIN32) || defined(__WIN32__)) -#pragma pack(pop) -#else -#pragma pack() -#endif // WIN32 - -typedef struct tagBITMAPINFOHEADER{ - DWORD biSize; - LONG biWidth; - LONG biHeight; - WORD biPlanes; - WORD biBitCount; - DWORD biCompression; - DWORD biSizeImage; - LONG biXPelsPerMeter; - LONG biYPelsPerMeter; - DWORD biClrUsed; - DWORD biClrImportant; -} BITMAPINFOHEADER, *PBITMAPINFOHEADER; - -typedef struct tagBITMAPINFO { - BITMAPINFOHEADER bmiHeader; - RGBQUAD bmiColors[1]; -} BITMAPINFO, *PBITMAPINFO; - -#endif // _WINDOWS_ - -// Types used in the library (specific to FreeImage) ------------------------ - -#if (defined(_WIN32) || defined(__WIN32__)) -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif // WIN32 - -/** 48-bit RGB -*/ -typedef struct tagFIRGB16 { - WORD red; - WORD green; - WORD blue; -} FIRGB16; - -/** 64-bit RGBA -*/ -typedef struct tagFIRGBA16 { - WORD red; - WORD green; - WORD blue; - WORD alpha; -} FIRGBA16; - -/** 96-bit RGB Float -*/ -typedef struct tagFIRGBF { - float red; - float green; - float blue; -} FIRGBF; - -/** 128-bit RGBA Float -*/ -typedef struct tagFIRGBAF { - float red; - float green; - float blue; - float alpha; -} FIRGBAF; - -/** Data structure for COMPLEX type (complex number) -*/ -typedef struct tagFICOMPLEX { - /// real part - double r; - /// imaginary part - double i; -} FICOMPLEX; - -#if (defined(_WIN32) || defined(__WIN32__)) -#pragma pack(pop) -#else -#pragma pack() -#endif // WIN32 - -// Indexes for byte arrays, masks and shifts for treating pixels as words --- -// These coincide with the order of RGBQUAD and RGBTRIPLE ------------------- - -#ifndef FREEIMAGE_BIGENDIAN -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR -// Little Endian (x86 / MS Windows, Linux) : BGR(A) order -#define FI_RGBA_RED 2 -#define FI_RGBA_GREEN 1 -#define FI_RGBA_BLUE 0 -#define FI_RGBA_ALPHA 3 -#define FI_RGBA_RED_MASK 0x00FF0000 -#define FI_RGBA_GREEN_MASK 0x0000FF00 -#define FI_RGBA_BLUE_MASK 0x000000FF -#define FI_RGBA_ALPHA_MASK 0xFF000000 -#define FI_RGBA_RED_SHIFT 16 -#define FI_RGBA_GREEN_SHIFT 8 -#define FI_RGBA_BLUE_SHIFT 0 -#define FI_RGBA_ALPHA_SHIFT 24 -#else -// Little Endian (x86 / MaxOSX) : RGB(A) order -#define FI_RGBA_RED 0 -#define FI_RGBA_GREEN 1 -#define FI_RGBA_BLUE 2 -#define FI_RGBA_ALPHA 3 -#define FI_RGBA_RED_MASK 0x000000FF -#define FI_RGBA_GREEN_MASK 0x0000FF00 -#define FI_RGBA_BLUE_MASK 0x00FF0000 -#define FI_RGBA_ALPHA_MASK 0xFF000000 -#define FI_RGBA_RED_SHIFT 0 -#define FI_RGBA_GREEN_SHIFT 8 -#define FI_RGBA_BLUE_SHIFT 16 -#define FI_RGBA_ALPHA_SHIFT 24 -#endif // FREEIMAGE_COLORORDER -#else -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR -// Big Endian (PPC / none) : BGR(A) order -#define FI_RGBA_RED 2 -#define FI_RGBA_GREEN 1 -#define FI_RGBA_BLUE 0 -#define FI_RGBA_ALPHA 3 -#define FI_RGBA_RED_MASK 0x0000FF00 -#define FI_RGBA_GREEN_MASK 0x00FF0000 -#define FI_RGBA_BLUE_MASK 0xFF000000 -#define FI_RGBA_ALPHA_MASK 0x000000FF -#define FI_RGBA_RED_SHIFT 8 -#define FI_RGBA_GREEN_SHIFT 16 -#define FI_RGBA_BLUE_SHIFT 24 -#define FI_RGBA_ALPHA_SHIFT 0 -#else -// Big Endian (PPC / Linux, MaxOSX) : RGB(A) order -#define FI_RGBA_RED 0 -#define FI_RGBA_GREEN 1 -#define FI_RGBA_BLUE 2 -#define FI_RGBA_ALPHA 3 -#define FI_RGBA_RED_MASK 0xFF000000 -#define FI_RGBA_GREEN_MASK 0x00FF0000 -#define FI_RGBA_BLUE_MASK 0x0000FF00 -#define FI_RGBA_ALPHA_MASK 0x000000FF -#define FI_RGBA_RED_SHIFT 24 -#define FI_RGBA_GREEN_SHIFT 16 -#define FI_RGBA_BLUE_SHIFT 8 -#define FI_RGBA_ALPHA_SHIFT 0 -#endif // FREEIMAGE_COLORORDER -#endif // FREEIMAGE_BIGENDIAN - -#define FI_RGBA_RGB_MASK (FI_RGBA_RED_MASK|FI_RGBA_GREEN_MASK|FI_RGBA_BLUE_MASK) - -// The 16bit macros only include masks and shifts, since each color element is not byte aligned - -#define FI16_555_RED_MASK 0x7C00 -#define FI16_555_GREEN_MASK 0x03E0 -#define FI16_555_BLUE_MASK 0x001F -#define FI16_555_RED_SHIFT 10 -#define FI16_555_GREEN_SHIFT 5 -#define FI16_555_BLUE_SHIFT 0 -#define FI16_565_RED_MASK 0xF800 -#define FI16_565_GREEN_MASK 0x07E0 -#define FI16_565_BLUE_MASK 0x001F -#define FI16_565_RED_SHIFT 11 -#define FI16_565_GREEN_SHIFT 5 -#define FI16_565_BLUE_SHIFT 0 - -// ICC profile support ------------------------------------------------------ - -#define FIICC_DEFAULT 0x00 -#define FIICC_COLOR_IS_CMYK 0x01 - -FI_STRUCT (FIICCPROFILE) { - WORD flags; //! info flag - DWORD size; //! profile's size measured in bytes - void *data; //! points to a block of contiguous memory containing the profile -}; - -// Important enums ---------------------------------------------------------- - -/** I/O image format identifiers. -*/ -FI_ENUM(FREE_IMAGE_FORMAT) { - FIF_UNKNOWN = -1, - FIF_BMP = 0, - FIF_ICO = 1, - FIF_JPEG = 2, - FIF_JNG = 3, - FIF_KOALA = 4, - FIF_LBM = 5, - FIF_IFF = FIF_LBM, - FIF_MNG = 6, - FIF_PBM = 7, - FIF_PBMRAW = 8, - FIF_PCD = 9, - FIF_PCX = 10, - FIF_PGM = 11, - FIF_PGMRAW = 12, - FIF_PNG = 13, - FIF_PPM = 14, - FIF_PPMRAW = 15, - FIF_RAS = 16, - FIF_TARGA = 17, - FIF_TIFF = 18, - FIF_WBMP = 19, - FIF_PSD = 20, - FIF_CUT = 21, - FIF_XBM = 22, - FIF_XPM = 23, - FIF_DDS = 24, - FIF_GIF = 25, - FIF_HDR = 26, - FIF_FAXG3 = 27, - FIF_SGI = 28, - FIF_EXR = 29, - FIF_J2K = 30, - FIF_JP2 = 31, - FIF_PFM = 32, - FIF_PICT = 33, - FIF_RAW = 34, - FIF_WEBP = 35, - FIF_JXR = 36 -}; - -/** Image type used in FreeImage. -*/ -FI_ENUM(FREE_IMAGE_TYPE) { - FIT_UNKNOWN = 0, //! unknown type - FIT_BITMAP = 1, //! standard image : 1-, 4-, 8-, 16-, 24-, 32-bit - FIT_UINT16 = 2, //! array of unsigned short : unsigned 16-bit - FIT_INT16 = 3, //! array of short : signed 16-bit - FIT_UINT32 = 4, //! array of unsigned long : unsigned 32-bit - FIT_INT32 = 5, //! array of long : signed 32-bit - FIT_FLOAT = 6, //! array of float : 32-bit IEEE floating point - FIT_DOUBLE = 7, //! array of double : 64-bit IEEE floating point - FIT_COMPLEX = 8, //! array of FICOMPLEX : 2 x 64-bit IEEE floating point - FIT_RGB16 = 9, //! 48-bit RGB image : 3 x 16-bit - FIT_RGBA16 = 10, //! 64-bit RGBA image : 4 x 16-bit - FIT_RGBF = 11, //! 96-bit RGB float image : 3 x 32-bit IEEE floating point - FIT_RGBAF = 12 //! 128-bit RGBA float image : 4 x 32-bit IEEE floating point -}; - -/** Image color type used in FreeImage. -*/ -FI_ENUM(FREE_IMAGE_COLOR_TYPE) { - FIC_MINISWHITE = 0, //! min value is white - FIC_MINISBLACK = 1, //! min value is black - FIC_RGB = 2, //! RGB color model - FIC_PALETTE = 3, //! color map indexed - FIC_RGBALPHA = 4, //! RGB color model with alpha channel - FIC_CMYK = 5 //! CMYK color model -}; - -/** Color quantization algorithms. -Constants used in FreeImage_ColorQuantize. -*/ -FI_ENUM(FREE_IMAGE_QUANTIZE) { - FIQ_WUQUANT = 0, //! Xiaolin Wu color quantization algorithm - FIQ_NNQUANT = 1, //! NeuQuant neural-net quantization algorithm by Anthony Dekker - FIQ_LFPQUANT = 2 //! Lossless Fast Pseudo-Quantization Algorithm by Carsten Klein -}; - -/** Dithering algorithms. -Constants used in FreeImage_Dither. -*/ -FI_ENUM(FREE_IMAGE_DITHER) { - FID_FS = 0, //! Floyd & Steinberg error diffusion - FID_BAYER4x4 = 1, //! Bayer ordered dispersed dot dithering (order 2 dithering matrix) - FID_BAYER8x8 = 2, //! Bayer ordered dispersed dot dithering (order 3 dithering matrix) - FID_CLUSTER6x6 = 3, //! Ordered clustered dot dithering (order 3 - 6x6 matrix) - FID_CLUSTER8x8 = 4, //! Ordered clustered dot dithering (order 4 - 8x8 matrix) - FID_CLUSTER16x16= 5, //! Ordered clustered dot dithering (order 8 - 16x16 matrix) - FID_BAYER16x16 = 6 //! Bayer ordered dispersed dot dithering (order 4 dithering matrix) -}; - -/** Lossless JPEG transformations -Constants used in FreeImage_JPEGTransform -*/ -FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { - FIJPEG_OP_NONE = 0, //! no transformation - FIJPEG_OP_FLIP_H = 1, //! horizontal flip - FIJPEG_OP_FLIP_V = 2, //! vertical flip - FIJPEG_OP_TRANSPOSE = 3, //! transpose across UL-to-LR axis - FIJPEG_OP_TRANSVERSE = 4, //! transpose across UR-to-LL axis - FIJPEG_OP_ROTATE_90 = 5, //! 90-degree clockwise rotation - FIJPEG_OP_ROTATE_180 = 6, //! 180-degree rotation - FIJPEG_OP_ROTATE_270 = 7 //! 270-degree clockwise (or 90 ccw) -}; - -/** Tone mapping operators. -Constants used in FreeImage_ToneMapping. -*/ -FI_ENUM(FREE_IMAGE_TMO) { - FITMO_DRAGO03 = 0, //! Adaptive logarithmic mapping (F. Drago, 2003) - FITMO_REINHARD05 = 1, //! Dynamic range reduction inspired by photoreceptor physiology (E. Reinhard, 2005) - FITMO_FATTAL02 = 2 //! Gradient domain high dynamic range compression (R. Fattal, 2002) -}; - -/** Upsampling / downsampling filters. -Constants used in FreeImage_Rescale. -*/ -FI_ENUM(FREE_IMAGE_FILTER) { - FILTER_BOX = 0, //! Box, pulse, Fourier window, 1st order (constant) b-spline - FILTER_BICUBIC = 1, //! Mitchell & Netravali's two-param cubic filter - FILTER_BILINEAR = 2, //! Bilinear filter - FILTER_BSPLINE = 3, //! 4th order (cubic) b-spline - FILTER_CATMULLROM = 4, //! Catmull-Rom spline, Overhauser spline - FILTER_LANCZOS3 = 5 //! Lanczos3 filter -}; - -/** Color channels. -Constants used in color manipulation routines. -*/ -FI_ENUM(FREE_IMAGE_COLOR_CHANNEL) { - FICC_RGB = 0, //! Use red, green and blue channels - FICC_RED = 1, //! Use red channel - FICC_GREEN = 2, //! Use green channel - FICC_BLUE = 3, //! Use blue channel - FICC_ALPHA = 4, //! Use alpha channel - FICC_BLACK = 5, //! Use black channel - FICC_REAL = 6, //! Complex images: use real part - FICC_IMAG = 7, //! Complex images: use imaginary part - FICC_MAG = 8, //! Complex images: use magnitude - FICC_PHASE = 9 //! Complex images: use phase -}; - -// Metadata support --------------------------------------------------------- - -/** - Tag data type information (based on TIFF specifications) - - Note: RATIONALs are the ratio of two 32-bit integer values. -*/ -FI_ENUM(FREE_IMAGE_MDTYPE) { - FIDT_NOTYPE = 0, //! placeholder - FIDT_BYTE = 1, //! 8-bit unsigned integer - FIDT_ASCII = 2, //! 8-bit bytes w/ last byte null - FIDT_SHORT = 3, //! 16-bit unsigned integer - FIDT_LONG = 4, //! 32-bit unsigned integer - FIDT_RATIONAL = 5, //! 64-bit unsigned fraction - FIDT_SBYTE = 6, //! 8-bit signed integer - FIDT_UNDEFINED = 7, //! 8-bit untyped data - FIDT_SSHORT = 8, //! 16-bit signed integer - FIDT_SLONG = 9, //! 32-bit signed integer - FIDT_SRATIONAL = 10, //! 64-bit signed fraction - FIDT_FLOAT = 11, //! 32-bit IEEE floating point - FIDT_DOUBLE = 12, //! 64-bit IEEE floating point - FIDT_IFD = 13, //! 32-bit unsigned integer (offset) - FIDT_PALETTE = 14, //! 32-bit RGBQUAD - FIDT_LONG8 = 16, //! 64-bit unsigned integer - FIDT_SLONG8 = 17, //! 64-bit signed integer - FIDT_IFD8 = 18 //! 64-bit unsigned integer (offset) -}; - -/** - Metadata models supported by FreeImage -*/ -FI_ENUM(FREE_IMAGE_MDMODEL) { - FIMD_NODATA = -1, - FIMD_COMMENTS = 0, //! single comment or keywords - FIMD_EXIF_MAIN = 1, //! Exif-TIFF metadata - FIMD_EXIF_EXIF = 2, //! Exif-specific metadata - FIMD_EXIF_GPS = 3, //! Exif GPS metadata - FIMD_EXIF_MAKERNOTE = 4, //! Exif maker note metadata - FIMD_EXIF_INTEROP = 5, //! Exif interoperability metadata - FIMD_IPTC = 6, //! IPTC/NAA metadata - FIMD_XMP = 7, //! Abobe XMP metadata - FIMD_GEOTIFF = 8, //! GeoTIFF metadata - FIMD_ANIMATION = 9, //! Animation metadata - FIMD_CUSTOM = 10, //! Used to attach other metadata types to a dib - FIMD_EXIF_RAW = 11 //! Exif metadata as a raw buffer -}; - -/** - Handle to a metadata model -*/ -FI_STRUCT (FIMETADATA) { void *data; }; - -/** - Handle to a FreeImage tag -*/ -FI_STRUCT (FITAG) { void *data; }; - -// File IO routines --------------------------------------------------------- - -#ifndef FREEIMAGE_IO -#define FREEIMAGE_IO - -typedef void* fi_handle; -typedef unsigned (DLL_CALLCONV *FI_ReadProc) (void *buffer, unsigned size, unsigned count, fi_handle handle); -typedef unsigned (DLL_CALLCONV *FI_WriteProc) (void *buffer, unsigned size, unsigned count, fi_handle handle); -typedef int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle, long offset, int origin); -typedef long (DLL_CALLCONV *FI_TellProc) (fi_handle handle); - -#if (defined(_WIN32) || defined(__WIN32__)) -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif // WIN32 - -FI_STRUCT(FreeImageIO) { - FI_ReadProc read_proc; //! pointer to the function used to read data - FI_WriteProc write_proc; //! pointer to the function used to write data - FI_SeekProc seek_proc; //! pointer to the function used to seek - FI_TellProc tell_proc; //! pointer to the function used to aquire the current position -}; - -#if (defined(_WIN32) || defined(__WIN32__)) -#pragma pack(pop) -#else -#pragma pack() -#endif // WIN32 - -/** -Handle to a memory I/O stream -*/ -FI_STRUCT (FIMEMORY) { void *data; }; - -#endif // FREEIMAGE_IO - -// Plugin routines ---------------------------------------------------------- - -#ifndef PLUGINS -#define PLUGINS - -typedef const char *(DLL_CALLCONV *FI_FormatProc)(void); -typedef const char *(DLL_CALLCONV *FI_DescriptionProc)(void); -typedef const char *(DLL_CALLCONV *FI_ExtensionListProc)(void); -typedef const char *(DLL_CALLCONV *FI_RegExprProc)(void); -typedef void *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read); -typedef void (DLL_CALLCONV *FI_CloseProc)(FreeImageIO *io, fi_handle handle, void *data); -typedef int (DLL_CALLCONV *FI_PageCountProc)(FreeImageIO *io, fi_handle handle, void *data); -typedef int (DLL_CALLCONV *FI_PageCapabilityProc)(FreeImageIO *io, fi_handle handle, void *data); -typedef FIBITMAP *(DLL_CALLCONV *FI_LoadProc)(FreeImageIO *io, fi_handle handle, int page, int flags, void *data); -typedef BOOL (DLL_CALLCONV *FI_SaveProc)(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data); -typedef BOOL (DLL_CALLCONV *FI_ValidateProc)(FreeImageIO *io, fi_handle handle); -typedef const char *(DLL_CALLCONV *FI_MimeProc)(void); -typedef BOOL (DLL_CALLCONV *FI_SupportsExportBPPProc)(int bpp); -typedef BOOL (DLL_CALLCONV *FI_SupportsExportTypeProc)(FREE_IMAGE_TYPE type); -typedef BOOL (DLL_CALLCONV *FI_SupportsICCProfilesProc)(void); -typedef BOOL (DLL_CALLCONV *FI_SupportsNoPixelsProc)(void); - -FI_STRUCT (Plugin) { - FI_FormatProc format_proc; - FI_DescriptionProc description_proc; - FI_ExtensionListProc extension_proc; - FI_RegExprProc regexpr_proc; - FI_OpenProc open_proc; - FI_CloseProc close_proc; - FI_PageCountProc pagecount_proc; - FI_PageCapabilityProc pagecapability_proc; - FI_LoadProc load_proc; - FI_SaveProc save_proc; - FI_ValidateProc validate_proc; - FI_MimeProc mime_proc; - FI_SupportsExportBPPProc supports_export_bpp_proc; - FI_SupportsExportTypeProc supports_export_type_proc; - FI_SupportsICCProfilesProc supports_icc_profiles_proc; - FI_SupportsNoPixelsProc supports_no_pixels_proc; -}; - -typedef void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin, int format_id); - -#endif // PLUGINS - - -// Load / Save flag constants ----------------------------------------------- - -#define FIF_LOAD_NOPIXELS 0x8000 //! loading: load the image header only (not supported by all plugins, default to full loading) - -#define BMP_DEFAULT 0 -#define BMP_SAVE_RLE 1 -#define CUT_DEFAULT 0 -#define DDS_DEFAULT 0 -#define EXR_DEFAULT 0 //! save data as half with piz-based wavelet compression -#define EXR_FLOAT 0x0001 //! save data as float instead of as half (not recommended) -#define EXR_NONE 0x0002 //! save with no compression -#define EXR_ZIP 0x0004 //! save with zlib compression, in blocks of 16 scan lines -#define EXR_PIZ 0x0008 //! save with piz-based wavelet compression -#define EXR_PXR24 0x0010 //! save with lossy 24-bit float compression -#define EXR_B44 0x0020 //! save with lossy 44% float compression - goes to 22% when combined with EXR_LC -#define EXR_LC 0x0040 //! save images with one luminance and two chroma channels, rather than as RGB (lossy compression) -#define FAXG3_DEFAULT 0 -#define GIF_DEFAULT 0 -#define GIF_LOAD256 1 //! load the image as a 256 color image with ununsed palette entries, if it's 16 or 2 color -#define GIF_PLAYBACK 2 //! 'Play' the GIF to generate each frame (as 32bpp) instead of returning raw frame data when loading -#define HDR_DEFAULT 0 -#define ICO_DEFAULT 0 -#define ICO_MAKEALPHA 1 //! convert to 32bpp and create an alpha channel from the AND-mask when loading -#define IFF_DEFAULT 0 -#define J2K_DEFAULT 0 //! save with a 16:1 rate -#define JP2_DEFAULT 0 //! save with a 16:1 rate -#define JPEG_DEFAULT 0 //! loading (see JPEG_FAST); saving (see JPEG_QUALITYGOOD|JPEG_SUBSAMPLING_420) -#define JPEG_FAST 0x0001 //! load the file as fast as possible, sacrificing some quality -#define JPEG_ACCURATE 0x0002 //! load the file with the best quality, sacrificing some speed -#define JPEG_CMYK 0x0004 //! load separated CMYK "as is" (use | to combine with other load flags) -#define JPEG_EXIFROTATE 0x0008 //! load and rotate according to Exif 'Orientation' tag if available -#define JPEG_GREYSCALE 0x0010 //! load and convert to a 8-bit greyscale image -#define JPEG_QUALITYSUPERB 0x80 //! save with superb quality (100:1) -#define JPEG_QUALITYGOOD 0x0100 //! save with good quality (75:1) -#define JPEG_QUALITYNORMAL 0x0200 //! save with normal quality (50:1) -#define JPEG_QUALITYAVERAGE 0x0400 //! save with average quality (25:1) -#define JPEG_QUALITYBAD 0x0800 //! save with bad quality (10:1) -#define JPEG_PROGRESSIVE 0x2000 //! save as a progressive-JPEG (use | to combine with other save flags) -#define JPEG_SUBSAMPLING_411 0x1000 //! save with high 4x1 chroma subsampling (4:1:1) -#define JPEG_SUBSAMPLING_420 0x4000 //! save with medium 2x2 medium chroma subsampling (4:2:0) - default value -#define JPEG_SUBSAMPLING_422 0x8000 //! save with low 2x1 chroma subsampling (4:2:2) -#define JPEG_SUBSAMPLING_444 0x10000 //! save with no chroma subsampling (4:4:4) -#define JPEG_OPTIMIZE 0x20000 //! on saving, compute optimal Huffman coding tables (can reduce a few percent of file size) -#define JPEG_BASELINE 0x40000 //! save basic JPEG, without metadata or any markers -#define KOALA_DEFAULT 0 -#define LBM_DEFAULT 0 -#define MNG_DEFAULT 0 -#define PCD_DEFAULT 0 -#define PCD_BASE 1 //! load the bitmap sized 768 x 512 -#define PCD_BASEDIV4 2 //! load the bitmap sized 384 x 256 -#define PCD_BASEDIV16 3 //! load the bitmap sized 192 x 128 -#define PCX_DEFAULT 0 -#define PFM_DEFAULT 0 -#define PICT_DEFAULT 0 -#define PNG_DEFAULT 0 -#define PNG_IGNOREGAMMA 1 //! loading: avoid gamma correction -#define PNG_Z_BEST_SPEED 0x0001 //! save using ZLib level 1 compression flag (default value is 6) -#define PNG_Z_DEFAULT_COMPRESSION 0x0006 //! save using ZLib level 6 compression flag (default recommended value) -#define PNG_Z_BEST_COMPRESSION 0x0009 //! save using ZLib level 9 compression flag (default value is 6) -#define PNG_Z_NO_COMPRESSION 0x0100 //! save without ZLib compression -#define PNG_INTERLACED 0x0200 //! save using Adam7 interlacing (use | to combine with other save flags) -#define PNM_DEFAULT 0 -#define PNM_SAVE_RAW 0 //! if set the writer saves in RAW format (i.e. P4, P5 or P6) -#define PNM_SAVE_ASCII 1 //! if set the writer saves in ASCII format (i.e. P1, P2 or P3) -#define PSD_DEFAULT 0 -#define PSD_CMYK 1 //! reads tags for separated CMYK (default is conversion to RGB) -#define PSD_LAB 2 //! reads tags for CIELab (default is conversion to RGB) -#define PSD_NONE 0x0100 //! save without any compression -#define PSD_RLE 0x0200 //! save using RLE compression -#define PSD_PSB 0x2000 //! save using Adobe Large Document Format (use | to combine with other save flags) -#define RAS_DEFAULT 0 -#define RAW_DEFAULT 0 //! load the file as linear RGB 48-bit -#define RAW_PREVIEW 1 //! try to load the embedded JPEG preview with included Exif Data or default to RGB 24-bit -#define RAW_DISPLAY 2 //! load the file as RGB 24-bit -#define RAW_HALFSIZE 4 //! output a half-size color image -#define RAW_UNPROCESSED 8 //! output a FIT_UINT16 raw Bayer image -#define SGI_DEFAULT 0 -#define TARGA_DEFAULT 0 -#define TARGA_LOAD_RGB888 1 //! if set the loader converts RGB555 and ARGB8888 -> RGB888. -#define TARGA_SAVE_RLE 2 //! if set, the writer saves with RLE compression -#define TIFF_DEFAULT 0 -#define TIFF_CMYK 0x0001 //! reads/stores tags for separated CMYK (use | to combine with compression flags) -#define TIFF_PACKBITS 0x0100 //! save using PACKBITS compression -#define TIFF_DEFLATE 0x0200 //! save using DEFLATE compression (a.k.a. ZLIB compression) -#define TIFF_ADOBE_DEFLATE 0x0400 //! save using ADOBE DEFLATE compression -#define TIFF_NONE 0x0800 //! save without any compression -#define TIFF_CCITTFAX3 0x1000 //! save using CCITT Group 3 fax encoding -#define TIFF_CCITTFAX4 0x2000 //! save using CCITT Group 4 fax encoding -#define TIFF_LZW 0x4000 //! save using LZW compression -#define TIFF_JPEG 0x8000 //! save using JPEG compression -#define TIFF_LOGLUV 0x10000 //! save using LogLuv compression -#define WBMP_DEFAULT 0 -#define XBM_DEFAULT 0 -#define XPM_DEFAULT 0 -#define WEBP_DEFAULT 0 //! save with good quality (75:1) -#define WEBP_LOSSLESS 0x100 //! save in lossless mode -#define JXR_DEFAULT 0 //! save with quality 80 and no chroma subsampling (4:4:4) -#define JXR_LOSSLESS 0x0064 //! save lossless -#define JXR_PROGRESSIVE 0x2000 //! save as a progressive-JXR (use | to combine with other save flags) - -// Background filling options --------------------------------------------------------- -// Constants used in FreeImage_FillBackground and FreeImage_EnlargeCanvas - -#define FI_COLOR_IS_RGB_COLOR 0x00 //! RGBQUAD color is a RGB color (contains no valid alpha channel) -#define FI_COLOR_IS_RGBA_COLOR 0x01 //! RGBQUAD color is a RGBA color (contains a valid alpha channel) -#define FI_COLOR_FIND_EQUAL_COLOR 0x02 //! For palettized images: lookup equal RGB color from palette -#define FI_COLOR_ALPHA_IS_INDEX 0x04 //! The color's rgbReserved member (alpha) contains the palette index to be used -#define FI_COLOR_PALETTE_SEARCH_MASK (FI_COLOR_FIND_EQUAL_COLOR | FI_COLOR_ALPHA_IS_INDEX) // No color lookup is performed - -// RescaleEx options --------------------------------------------------------- -// Constants used in FreeImage_RescaleEx - -#define FI_RESCALE_DEFAULT 0x00 //! default options; none of the following other options apply -#define FI_RESCALE_TRUE_COLOR 0x01 //! for non-transparent greyscale images, convert to 24-bit if src bitdepth <= 8 (default is a 8-bit greyscale image). -#define FI_RESCALE_OMIT_METADATA 0x02 //! do not copy metadata to the rescaled image - - -#ifdef __cplusplus -extern "C" { -#endif - -// Init / Error routines ---------------------------------------------------- - -DLL_API void DLL_CALLCONV FreeImage_Initialise(BOOL load_local_plugins_only FI_DEFAULT(FALSE)); -DLL_API void DLL_CALLCONV FreeImage_DeInitialise(void); - -// Version routines --------------------------------------------------------- - -DLL_API const char *DLL_CALLCONV FreeImage_GetVersion(void); -DLL_API const char *DLL_CALLCONV FreeImage_GetCopyrightMessage(void); - -// Message output functions ------------------------------------------------- - -typedef void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif, const char *msg); -typedef void (DLL_CALLCONV *FreeImage_OutputMessageFunctionStdCall)(FREE_IMAGE_FORMAT fif, const char *msg); - -DLL_API void DLL_CALLCONV FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf); -DLL_API void DLL_CALLCONV FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf); -DLL_API void DLL_CALLCONV FreeImage_OutputMessageProc(int fif, const char *fmt, ...); - -// Allocate / Clone / Unload routines --------------------------------------- - -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Allocate(int width, int height, int bpp, unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateT(FREE_IMAGE_TYPE type, int width, int height, int bpp FI_DEFAULT(8), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0)); -DLL_API FIBITMAP * DLL_CALLCONV FreeImage_Clone(FIBITMAP *dib); -DLL_API void DLL_CALLCONV FreeImage_Unload(FIBITMAP *dib); - -// Header loading routines -DLL_API BOOL DLL_CALLCONV FreeImage_HasPixels(FIBITMAP *dib); - -// Load / Save routines ----------------------------------------------------- - -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Load(FREE_IMAGE_FORMAT fif, const char *filename, int flags FI_DEFAULT(0)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadU(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0)); -DLL_API BOOL DLL_CALLCONV FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const char *filename, int flags FI_DEFAULT(0)); -DLL_API BOOL DLL_CALLCONV FreeImage_SaveU(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0)); -DLL_API BOOL DLL_CALLCONV FreeImage_SaveToHandle(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0)); - -// Memory I/O stream routines ----------------------------------------------- - -DLL_API FIMEMORY *DLL_CALLCONV FreeImage_OpenMemory(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0)); -DLL_API void DLL_CALLCONV FreeImage_CloseMemory(FIMEMORY *stream); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0)); -DLL_API BOOL DLL_CALLCONV FreeImage_SaveToMemory(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0)); -DLL_API long DLL_CALLCONV FreeImage_TellMemory(FIMEMORY *stream); -DLL_API BOOL DLL_CALLCONV FreeImage_SeekMemory(FIMEMORY *stream, long offset, int origin); -DLL_API BOOL DLL_CALLCONV FreeImage_AcquireMemory(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes); -DLL_API unsigned DLL_CALLCONV FreeImage_ReadMemory(void *buffer, unsigned size, unsigned count, FIMEMORY *stream); -DLL_API unsigned DLL_CALLCONV FreeImage_WriteMemory(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream); - -DLL_API FIMULTIBITMAP *DLL_CALLCONV FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0)); -DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToMemory(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FIMEMORY *stream, int flags); - -// Plugin Interface --------------------------------------------------------- - -DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterLocalPlugin(FI_InitProc proc_address, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0)); -DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterExternalPlugin(const char *path, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0)); -DLL_API int DLL_CALLCONV FreeImage_GetFIFCount(void); -DLL_API int DLL_CALLCONV FreeImage_SetPluginEnabled(FREE_IMAGE_FORMAT fif, BOOL enable); -DLL_API int DLL_CALLCONV FreeImage_IsPluginEnabled(FREE_IMAGE_FORMAT fif); -DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFormat(const char *format); -DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromMime(const char *mime); -DLL_API const char *DLL_CALLCONV FreeImage_GetFormatFromFIF(FREE_IMAGE_FORMAT fif); -DLL_API const char *DLL_CALLCONV FreeImage_GetFIFExtensionList(FREE_IMAGE_FORMAT fif); -DLL_API const char *DLL_CALLCONV FreeImage_GetFIFDescription(FREE_IMAGE_FORMAT fif); -DLL_API const char *DLL_CALLCONV FreeImage_GetFIFRegExpr(FREE_IMAGE_FORMAT fif); -DLL_API const char *DLL_CALLCONV FreeImage_GetFIFMimeType(FREE_IMAGE_FORMAT fif); -DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilename(const char *filename); -DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilenameU(const wchar_t *filename); -DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif); -DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsWriting(FREE_IMAGE_FORMAT fif); -DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportBPP(FREE_IMAGE_FORMAT fif, int bpp); -DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportType(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type); -DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsICCProfiles(FREE_IMAGE_FORMAT fif); -DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsNoPixels(FREE_IMAGE_FORMAT fif); - -// Multipaging interface ---------------------------------------------------- - -DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmap(FREE_IMAGE_FORMAT fif, const char *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory FI_DEFAULT(FALSE), int flags FI_DEFAULT(0)); -DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0)); -DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToHandle(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0)); -DLL_API BOOL DLL_CALLCONV FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0)); -DLL_API int DLL_CALLCONV FreeImage_GetPageCount(FIMULTIBITMAP *bitmap); -DLL_API void DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data); -DLL_API void DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data); -DLL_API void DLL_CALLCONV FreeImage_DeletePage(FIMULTIBITMAP *bitmap, int page); -DLL_API FIBITMAP * DLL_CALLCONV FreeImage_LockPage(FIMULTIBITMAP *bitmap, int page); -DLL_API void DLL_CALLCONV FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed); -DLL_API BOOL DLL_CALLCONV FreeImage_MovePage(FIMULTIBITMAP *bitmap, int target, int source); -DLL_API BOOL DLL_CALLCONV FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap, int *pages, int *count); - -// File type request routines ------------------------------------------------ - -DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileType(const char *filename, int size FI_DEFAULT(0)); -DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeU(const wchar_t *filename, int size FI_DEFAULT(0)); -DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromHandle(FreeImageIO *io, fi_handle handle, int size FI_DEFAULT(0)); -DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromMemory(FIMEMORY *stream, int size FI_DEFAULT(0)); - -DLL_API BOOL DLL_CALLCONV FreeImage_Validate(FREE_IMAGE_FORMAT fif, const char *filename); -DLL_API BOOL DLL_CALLCONV FreeImage_ValidateU(FREE_IMAGE_FORMAT fif, const wchar_t *filename); -DLL_API BOOL DLL_CALLCONV FreeImage_ValidateFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle); -DLL_API BOOL DLL_CALLCONV FreeImage_ValidateFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream); - - -// Image type request routine ----------------------------------------------- - -DLL_API FREE_IMAGE_TYPE DLL_CALLCONV FreeImage_GetImageType(FIBITMAP *dib); - -// FreeImage helper routines ------------------------------------------------ - -DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(void); -DLL_API BOOL DLL_CALLCONV FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue); -DLL_API BOOL DLL_CALLCONV FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue); - -// Pixel access routines ---------------------------------------------------- - -DLL_API BYTE *DLL_CALLCONV FreeImage_GetBits(FIBITMAP *dib); -DLL_API BYTE *DLL_CALLCONV FreeImage_GetScanLine(FIBITMAP *dib, int scanline); - -DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value); -DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value); -DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value); -DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value); - -// DIB info routines -------------------------------------------------------- - -DLL_API unsigned DLL_CALLCONV FreeImage_GetColorsUsed(FIBITMAP *dib); -DLL_API unsigned DLL_CALLCONV FreeImage_GetBPP(FIBITMAP *dib); -DLL_API unsigned DLL_CALLCONV FreeImage_GetWidth(FIBITMAP *dib); -DLL_API unsigned DLL_CALLCONV FreeImage_GetHeight(FIBITMAP *dib); -DLL_API unsigned DLL_CALLCONV FreeImage_GetLine(FIBITMAP *dib); -DLL_API unsigned DLL_CALLCONV FreeImage_GetPitch(FIBITMAP *dib); -DLL_API unsigned DLL_CALLCONV FreeImage_GetDIBSize(FIBITMAP *dib); -DLL_API unsigned DLL_CALLCONV FreeImage_GetMemorySize(FIBITMAP *dib); -DLL_API RGBQUAD *DLL_CALLCONV FreeImage_GetPalette(FIBITMAP *dib); - -DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterX(FIBITMAP *dib); -DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterY(FIBITMAP *dib); -DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterX(FIBITMAP *dib, unsigned res); -DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterY(FIBITMAP *dib, unsigned res); - -DLL_API BITMAPINFOHEADER *DLL_CALLCONV FreeImage_GetInfoHeader(FIBITMAP *dib); -DLL_API BITMAPINFO *DLL_CALLCONV FreeImage_GetInfo(FIBITMAP *dib); -DLL_API FREE_IMAGE_COLOR_TYPE DLL_CALLCONV FreeImage_GetColorType(FIBITMAP *dib); - -DLL_API unsigned DLL_CALLCONV FreeImage_GetRedMask(FIBITMAP *dib); -DLL_API unsigned DLL_CALLCONV FreeImage_GetGreenMask(FIBITMAP *dib); -DLL_API unsigned DLL_CALLCONV FreeImage_GetBlueMask(FIBITMAP *dib); - -DLL_API unsigned DLL_CALLCONV FreeImage_GetTransparencyCount(FIBITMAP *dib); -DLL_API BYTE * DLL_CALLCONV FreeImage_GetTransparencyTable(FIBITMAP *dib); -DLL_API void DLL_CALLCONV FreeImage_SetTransparent(FIBITMAP *dib, BOOL enabled); -DLL_API void DLL_CALLCONV FreeImage_SetTransparencyTable(FIBITMAP *dib, BYTE *table, int count); -DLL_API BOOL DLL_CALLCONV FreeImage_IsTransparent(FIBITMAP *dib); -DLL_API void DLL_CALLCONV FreeImage_SetTransparentIndex(FIBITMAP *dib, int index); -DLL_API int DLL_CALLCONV FreeImage_GetTransparentIndex(FIBITMAP *dib); - -DLL_API BOOL DLL_CALLCONV FreeImage_HasBackgroundColor(FIBITMAP *dib); -DLL_API BOOL DLL_CALLCONV FreeImage_GetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor); -DLL_API BOOL DLL_CALLCONV FreeImage_SetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor); - -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetThumbnail(FIBITMAP *dib); -DLL_API BOOL DLL_CALLCONV FreeImage_SetThumbnail(FIBITMAP *dib, FIBITMAP *thumbnail); - -// ICC profile routines ----------------------------------------------------- - -DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_GetICCProfile(FIBITMAP *dib); -DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_CreateICCProfile(FIBITMAP *dib, void *data, long size); -DLL_API void DLL_CALLCONV FreeImage_DestroyICCProfile(FIBITMAP *dib); - -// Line conversion routines ------------------------------------------------- - -DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To4(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To4(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_555(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_565(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To4(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To4(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To8(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To8(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_555(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_565(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To8(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To8(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_565_To16_555(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_555(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_555(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_555_To16_565(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_565(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_565(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_555(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_565(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To24(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To32MapTransparency(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette, BYTE *table, int transparent_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To32MapTransparency(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette, BYTE *table, int transparent_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To32MapTransparency(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette, BYTE *table, int transparent_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_555(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_565(BYTE *target, BYTE *source, int width_in_pixels); -DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To32(BYTE *target, BYTE *source, int width_in_pixels); - -// Smart conversion routines ------------------------------------------------ - -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo4Bits(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo8Bits(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToGreyscale(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits555(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits565(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo24Bits(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo32Bits(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantize(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantizeEx(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize FI_DEFAULT(FIQ_WUQUANT), int PaletteSize FI_DEFAULT(256), int ReserveSize FI_DEFAULT(0), RGBQUAD *ReservePalette FI_DEFAULT(NULL)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Threshold(FIBITMAP *dib, BYTE T); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Dither(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm); - -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertFromRawBits(BYTE *bits, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertFromRawBitsEx(BOOL copySource, BYTE *bits, FREE_IMAGE_TYPE type, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE)); -DLL_API void DLL_CALLCONV FreeImage_ConvertToRawBits(BYTE *bits, FIBITMAP *dib, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE)); - -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToFloat(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBF(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBAF(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToUINT16(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGB16(FIBITMAP *dib); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBA16(FIBITMAP *dib); - -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToStandardType(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToType(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE)); - -// Tone mapping operators --------------------------------------------------- - -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ToneMapping(FIBITMAP *dib, FREE_IMAGE_TMO tmo, double first_param FI_DEFAULT(0), double second_param FI_DEFAULT(0)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoDrago03(FIBITMAP *src, double gamma FI_DEFAULT(2.2), double exposure FI_DEFAULT(0)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05Ex(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0), double adaptation FI_DEFAULT(1), double color_correction FI_DEFAULT(0)); - -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoFattal02(FIBITMAP *src, double color_saturation FI_DEFAULT(0.5), double attenuation FI_DEFAULT(0.85)); - -// ZLib interface ----------------------------------------------------------- - -DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size); -DLL_API DWORD DLL_CALLCONV FreeImage_ZLibUncompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size); -DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size); -DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGUnzip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size); -DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size); - -// -------------------------------------------------------------------------- -// Metadata routines -// -------------------------------------------------------------------------- - -// tag creation / destruction -DLL_API FITAG *DLL_CALLCONV FreeImage_CreateTag(void); -DLL_API void DLL_CALLCONV FreeImage_DeleteTag(FITAG *tag); -DLL_API FITAG *DLL_CALLCONV FreeImage_CloneTag(FITAG *tag); - -// tag getters and setters -DLL_API const char *DLL_CALLCONV FreeImage_GetTagKey(FITAG *tag); -DLL_API const char *DLL_CALLCONV FreeImage_GetTagDescription(FITAG *tag); -DLL_API WORD DLL_CALLCONV FreeImage_GetTagID(FITAG *tag); -DLL_API FREE_IMAGE_MDTYPE DLL_CALLCONV FreeImage_GetTagType(FITAG *tag); -DLL_API DWORD DLL_CALLCONV FreeImage_GetTagCount(FITAG *tag); -DLL_API DWORD DLL_CALLCONV FreeImage_GetTagLength(FITAG *tag); -DLL_API const void *DLL_CALLCONV FreeImage_GetTagValue(FITAG *tag); - -DLL_API BOOL DLL_CALLCONV FreeImage_SetTagKey(FITAG *tag, const char *key); -DLL_API BOOL DLL_CALLCONV FreeImage_SetTagDescription(FITAG *tag, const char *description); -DLL_API BOOL DLL_CALLCONV FreeImage_SetTagID(FITAG *tag, WORD id); -DLL_API BOOL DLL_CALLCONV FreeImage_SetTagType(FITAG *tag, FREE_IMAGE_MDTYPE type); -DLL_API BOOL DLL_CALLCONV FreeImage_SetTagCount(FITAG *tag, DWORD count); -DLL_API BOOL DLL_CALLCONV FreeImage_SetTagLength(FITAG *tag, DWORD length); -DLL_API BOOL DLL_CALLCONV FreeImage_SetTagValue(FITAG *tag, const void *value); - -// iterator -DLL_API FIMETADATA *DLL_CALLCONV FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag); -DLL_API BOOL DLL_CALLCONV FreeImage_FindNextMetadata(FIMETADATA *mdhandle, FITAG **tag); -DLL_API void DLL_CALLCONV FreeImage_FindCloseMetadata(FIMETADATA *mdhandle); - -// metadata setter and getter -DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG *tag); -DLL_API BOOL DLL_CALLCONV FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG **tag); -DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadataKeyValue(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, const char *value); - -// helpers -DLL_API unsigned DLL_CALLCONV FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib); -DLL_API BOOL DLL_CALLCONV FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src); - -// tag to C string conversion -DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, FITAG *tag, char *Make FI_DEFAULT(NULL)); - -// -------------------------------------------------------------------------- -// JPEG lossless transformation routines -// -------------------------------------------------------------------------- - -DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); -DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); -DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom); -DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCropU(const wchar_t *src_file, const wchar_t *dst_file, int left, int top, int right, int bottom); -DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, fi_handle src_handle, FreeImageIO* dst_io, fi_handle dst_handle, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); -DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); -DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); -DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); - - -// -------------------------------------------------------------------------- -// Image manipulation toolkit -// -------------------------------------------------------------------------- - -// rotation and flipping -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rotate(FIBITMAP *dib, double angle, const void *bkcolor FI_DEFAULT(NULL)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateEx(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, BOOL use_mask); -DLL_API BOOL DLL_CALLCONV FreeImage_FlipHorizontal(FIBITMAP *dib); -DLL_API BOOL DLL_CALLCONV FreeImage_FlipVertical(FIBITMAP *dib); - -// upsampling / downsampling -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rescale(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter FI_DEFAULT(FILTER_CATMULLROM)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MakeThumbnail(FIBITMAP *dib, int max_pixel_size, BOOL convert FI_DEFAULT(TRUE)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RescaleRect(FIBITMAP *dib, int dst_width, int dst_height, int left, int top, int right, int bottom, FREE_IMAGE_FILTER filter FI_DEFAULT(FILTER_CATMULLROM), unsigned flags FI_DEFAULT(0)); - -// color manipulation routines (point operations) -DLL_API BOOL DLL_CALLCONV FreeImage_AdjustCurve(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel); -DLL_API BOOL DLL_CALLCONV FreeImage_AdjustGamma(FIBITMAP *dib, double gamma); -DLL_API BOOL DLL_CALLCONV FreeImage_AdjustBrightness(FIBITMAP *dib, double percentage); -DLL_API BOOL DLL_CALLCONV FreeImage_AdjustContrast(FIBITMAP *dib, double percentage); -DLL_API BOOL DLL_CALLCONV FreeImage_Invert(FIBITMAP *dib); -DLL_API BOOL DLL_CALLCONV FreeImage_GetHistogram(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel FI_DEFAULT(FICC_BLACK)); -DLL_API int DLL_CALLCONV FreeImage_GetAdjustColorsLookupTable(BYTE *LUT, double brightness, double contrast, double gamma, BOOL invert); -DLL_API BOOL DLL_CALLCONV FreeImage_AdjustColors(FIBITMAP *dib, double brightness, double contrast, double gamma, BOOL invert FI_DEFAULT(FALSE)); -DLL_API unsigned DLL_CALLCONV FreeImage_ApplyColorMapping(FIBITMAP *dib, RGBQUAD *srccolors, RGBQUAD *dstcolors, unsigned count, BOOL ignore_alpha, BOOL swap); -DLL_API unsigned DLL_CALLCONV FreeImage_SwapColors(FIBITMAP *dib, RGBQUAD *color_a, RGBQUAD *color_b, BOOL ignore_alpha); -DLL_API unsigned DLL_CALLCONV FreeImage_ApplyPaletteIndexMapping(FIBITMAP *dib, BYTE *srcindices, BYTE *dstindices, unsigned count, BOOL swap); -DLL_API unsigned DLL_CALLCONV FreeImage_SwapPaletteIndices(FIBITMAP *dib, BYTE *index_a, BYTE *index_b); - -// channel processing routines -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetChannel(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel); -DLL_API BOOL DLL_CALLCONV FreeImage_SetChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetComplexChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel); -DLL_API BOOL DLL_CALLCONV FreeImage_SetComplexChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel); - -// copy / paste / composite routines -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Copy(FIBITMAP *dib, int left, int top, int right, int bottom); -DLL_API BOOL DLL_CALLCONV FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_CreateView(FIBITMAP *dib, unsigned left, unsigned top, unsigned right, unsigned bottom); - -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Composite(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL)); -DLL_API BOOL DLL_CALLCONV FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib); - -// background filling routines -DLL_API BOOL DLL_CALLCONV FreeImage_FillBackground(FIBITMAP *dib, const void *color, int options FI_DEFAULT(0)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_EnlargeCanvas(FIBITMAP *src, int left, int top, int right, int bottom, const void *color, int options FI_DEFAULT(0)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateEx(int width, int height, int bpp, const RGBQUAD *color, int options FI_DEFAULT(0), const RGBQUAD *palette FI_DEFAULT(NULL), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0)); -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateExT(FREE_IMAGE_TYPE type, int width, int height, int bpp, const void *color, int options FI_DEFAULT(0), const RGBQUAD *palette FI_DEFAULT(NULL), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0)); - -// miscellaneous algorithms -DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MultigridPoissonSolver(FIBITMAP *Laplacian, int ncycle FI_DEFAULT(3)); - -// restore the borland-specific enum size option -#if defined(__BORLANDC__) -#pragma option pop -#endif - -#ifdef __cplusplus -} -#endif - -#endif // FREEIMAGE_H diff --git a/Dependencies/FreeImage/Source/FreeImage/BitmapAccess.cpp b/Dependencies/FreeImage/Source/FreeImage/BitmapAccess.cpp deleted file mode 100644 index 299ecf3..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/BitmapAccess.cpp +++ /dev/null @@ -1,1588 +0,0 @@ -// ========================================================== -// FreeImage implementation -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// - Detlev Vendt (detlev.vendt@brillit.de) -// - Petr Supina (psup@centrum.cz) -// - Carsten Klein (c.klein@datagis.com) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include -#if defined(_WIN32) || defined(_WIN64) || defined(__MINGW32__) -#include -#endif // _WIN32 || _WIN64 || __MINGW32__ - -#include "FreeImage.h" -#include "FreeImageIO.h" -#include "Utilities.h" -#include "MapIntrospector.h" - -#include "../Metadata/FreeImageTag.h" - -/** -Constants for the BITMAPINFOHEADER::biCompression field -BI_RGB: -The bitmap is in uncompressed red green blue (RGB) format that is not compressed and does not use color masks. -BI_BITFIELDS: -The bitmap is not compressed and the color table consists of three DWORD color masks that specify the red, green, and blue components, -respectively, of each pixel. This is valid when used with 16 and 32-bits per pixel bitmaps. -*/ -#ifndef _WINGDI_ -#define BI_RGB 0L -#define BI_BITFIELDS 3L -#endif // _WINGDI_ - -// ---------------------------------------------------------- -// Metadata definitions -// ---------------------------------------------------------- - -/** helper for map where value is a pointer to a FreeImage tag */ -typedef std::map TAGMAP; - -/** helper for map */ -typedef std::map METADATAMAP; - -/** helper for metadata iterator */ -FI_STRUCT (METADATAHEADER) { - long pos; //! current position when iterating the map - TAGMAP *tagmap; //! pointer to the tag map -}; - -// ---------------------------------------------------------- -// FIBITMAP definition -// ---------------------------------------------------------- - -/** -FreeImage header structure -*/ -FI_STRUCT (FREEIMAGEHEADER) { - /** data type - bitmap, array of long, double, complex, etc */ - FREE_IMAGE_TYPE type; - - /** background color used for RGB transparency */ - RGBQUAD bkgnd_color; - - /**@name transparency management */ - //@{ - /** - why another table ? for easy transparency table retrieval ! - transparency could be stored in the palette, which is better - overall, but it requires quite some changes and it will render - FreeImage_GetTransparencyTable obsolete in its current form; - */ - BYTE transparent_table[256]; - /** number of transparent colors */ - int transparency_count; - /** TRUE if the image is transparent */ - BOOL transparent; - //@} - - /** space to hold ICC profile */ - FIICCPROFILE iccProfile; - - /** contains a list of metadata models attached to the bitmap */ - METADATAMAP *metadata; - - /** FALSE if the FIBITMAP only contains the header and no pixel data */ - BOOL has_pixels; - - /** optionally contains a thumbnail attached to the bitmap */ - FIBITMAP *thumbnail; - - /**@name external pixel buffer management */ - //@{ - /** pointer to user provided pixels, NULL otherwise */ - BYTE *external_bits; - /** user provided pitch, 0 otherwise */ - unsigned external_pitch; - //@} - - //BYTE filler[1]; // fill to 32-bit alignment -}; - -// ---------------------------------------------------------- -// FREEIMAGERGBMASKS definition -// ---------------------------------------------------------- - -/** -RGB mask structure - mainly used for 16-bit RGB555 / RGB 565 FIBITMAP -*/ -FI_STRUCT (FREEIMAGERGBMASKS) { - unsigned red_mask; //! bit layout of the red components - unsigned green_mask; //! bit layout of the green components - unsigned blue_mask; //! bit layout of the blue components -}; - -// ---------------------------------------------------------- -// Memory allocation on a specified alignment boundary -// ---------------------------------------------------------- - -#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) - -void* FreeImage_Aligned_Malloc(size_t amount, size_t alignment) { - assert(alignment == FIBITMAP_ALIGNMENT); - return _aligned_malloc(amount, alignment); -} - -void FreeImage_Aligned_Free(void* mem) { - _aligned_free(mem); -} - -#elif defined (__MINGW32__) - -void* FreeImage_Aligned_Malloc(size_t amount, size_t alignment) { - assert(alignment == FIBITMAP_ALIGNMENT); - return __mingw_aligned_malloc (amount, alignment); -} - -void FreeImage_Aligned_Free(void* mem) { - __mingw_aligned_free (mem); -} - -#else - -void* FreeImage_Aligned_Malloc(size_t amount, size_t alignment) { - assert(alignment == FIBITMAP_ALIGNMENT); - /* - In some rare situations, the malloc routines can return misaligned memory. - The routine FreeImage_Aligned_Malloc allocates a bit more memory to do - aligned writes. Normally, it *should* allocate "alignment" extra memory and then writes - one dword back the true pointer. But if the memory manager returns a - misaligned block that is less than a dword from the next alignment, - then the writing back one dword will corrupt memory. - - For example, suppose that alignment is 16 and malloc returns the address 0xFFFF. - - 16 - 0xFFFF % 16 + 0xFFFF = 16 - 15 + 0xFFFF = 0x10000. - - Now, you subtract one dword from that and write and that will corrupt memory. - - That's why the code below allocates *two* alignments instead of one. - */ - void* mem_real = malloc(amount + 2 * alignment); - if(!mem_real) return NULL; - char* mem_align = (char*)((unsigned long)(2 * alignment - (unsigned long)mem_real % (unsigned long)alignment) + (unsigned long)mem_real); - *((long*)mem_align - 1) = (long)mem_real; - return mem_align; -} - -void FreeImage_Aligned_Free(void* mem) { - free((void*)*((long*)mem - 1)); -} - -#endif // _WIN32 || _WIN64 - -// ---------------------------------------------------------- -// FIBITMAP memory management -// ---------------------------------------------------------- - -/** -Calculate the size of a FreeImage image. -Align the palette and the pixels on a FIBITMAP_ALIGNMENT bytes alignment boundary. -This function includes a protection against malicious images, based on a KISS integer overflow detection mechanism. - -@param header_only If TRUE, calculate a 'header only' FIBITMAP size, otherwise calculate a full FIBITMAP size -@param width Image width -@param height Image height -@param bpp Number of bits-per-pixel -@param need_masks We only store the masks (and allocate memory for them) for 16-bit images of type FIT_BITMAP -@return Returns a size in BYTE units -@see FreeImage_AllocateBitmap -*/ -static size_t -FreeImage_GetInternalImageSize(BOOL header_only, unsigned width, unsigned height, unsigned bpp, BOOL need_masks) { - size_t dib_size = sizeof(FREEIMAGEHEADER); - dib_size += (dib_size % FIBITMAP_ALIGNMENT ? FIBITMAP_ALIGNMENT - dib_size % FIBITMAP_ALIGNMENT : 0); - dib_size += FIBITMAP_ALIGNMENT - sizeof(BITMAPINFOHEADER) % FIBITMAP_ALIGNMENT; - dib_size += sizeof(BITMAPINFOHEADER); - // palette is aligned on a 16 bytes boundary - dib_size += sizeof(RGBQUAD) * CalculateUsedPaletteEntries(bpp); - // we both add palette size and masks size if need_masks is true, since CalculateUsedPaletteEntries - // always returns 0 if need_masks is true (which is only true for 16 bit images). - dib_size += need_masks ? sizeof(DWORD) * 3 : 0; - dib_size += (dib_size % FIBITMAP_ALIGNMENT ? FIBITMAP_ALIGNMENT - dib_size % FIBITMAP_ALIGNMENT : 0); - - if(!header_only) { - const size_t header_size = dib_size; - - // pixels are aligned on a 16 bytes boundary - dib_size += (size_t)CalculatePitch(CalculateLine(width, bpp)) * (size_t)height; - - // check for possible malloc overflow using a KISS integer overflow detection mechanism - { - const double dPitch = floor( ((double)bpp * width + 31.0) / 32.0 ) * 4.0; - const double dImageSize = (double)header_size + dPitch * height; - if(dImageSize != (double)dib_size) { - // here, we are sure to encounter a malloc overflow: try to avoid it ... - return 0; - } - - /* - The following constant take into account the additionnal memory used by - aligned malloc functions as well as debug malloc functions. - It is supposed here that using a (8 * FIBITMAP_ALIGNMENT) risk margin will be enough - for the target compiler. - */ - const double FIBITMAP_MAX_MEMORY = (double)((size_t)-1) - 8 * FIBITMAP_ALIGNMENT; - - if(dImageSize > FIBITMAP_MAX_MEMORY) { - // avoid possible overflow inside C allocation functions - return 0; - } - } - } - - return dib_size; -} - -/** -Helper for 16-bit FIT_BITMAP -Returns a pointer to the bitmap's red-, green- and blue masks. -@param dib The bitmap to obtain masks from. -@return Returns a pointer to the bitmap's red-, green- and blue masks -or NULL, if no masks are present (e.g. for 24 bit images). -*/ -static FREEIMAGERGBMASKS * -FreeImage_GetRGBMasks(FIBITMAP *dib) { - return FreeImage_HasRGBMasks(dib) ? (FREEIMAGERGBMASKS *)(((BYTE *)FreeImage_GetInfoHeader(dib)) + sizeof(BITMAPINFOHEADER)) : NULL; -} - -/** -Internal FIBITMAP allocation. - -This function accepts (ext_bits, ext_pitch) arguments. If these are provided the FIBITMAP -will be allocated as "header only", but bits and pitch will be stored within the FREEIMAGEHEADER -and the resulting FIBITMAP will have pixels, i.e. HasPixels() will return TRUE. -- GetBits() and GetPitch return the correct values - either offsets or the stored values (user-provided bits and pitch). -- Clone() creates a new FIBITMAP with copy of the user pixel data. -- Unload's implementation does not need to change - it just release a "header only" dib. -Note that when using external data, the data does not need to have the same alignment as the default 4-byte alignment. -This enables the possibility to access buffers with, for instance, stricter alignment, -like the ones used in low-level APIs like OpenCL or intrinsics. - -@param header_only If TRUE, allocate a 'header only' FIBITMAP, otherwise allocate a full FIBITMAP -@param ext_bits Pointer to external user's pixel buffer if using wrapped buffer, NULL otherwise -@param ext_pitch Pointer to external user's pixel buffer pitch if using wrapped buffer, 0 otherwise -@param type Image type -@param width Image width -@param height Image height -@param bpp Number of bits per pixel -@param red_mask Image red mask -@param green_mask Image green mask -@param blue_mask Image blue mask -@return Returns the allocated FIBITMAP if successful, returns NULL otherwise -*/ -static FIBITMAP * -FreeImage_AllocateBitmap(BOOL header_only, BYTE *ext_bits, unsigned ext_pitch, FREE_IMAGE_TYPE type, int width, int height, int bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask) { - - // check input variables - width = abs(width); - height = abs(height); - if(!((width > 0) && (height > 0))) { - return NULL; - } - if(ext_bits) { - if(ext_pitch == 0) { - return NULL; - } - assert(header_only == FALSE); - } - - // we only store the masks (and allocate memory for them) for 16-bit images of type FIT_BITMAP - BOOL need_masks = FALSE; - - // check pixel bit depth - switch(type) { - case FIT_BITMAP: - switch(bpp) { - case 1: - case 4: - case 8: - break; - case 16: - need_masks = TRUE; - break; - case 24: - case 32: - break; - default: - bpp = 8; - break; - } - break; - case FIT_UINT16: - bpp = 8 * sizeof(unsigned short); - break; - case FIT_INT16: - bpp = 8 * sizeof(short); - break; - case FIT_UINT32: - bpp = 8 * sizeof(DWORD); - break; - case FIT_INT32: - bpp = 8 * sizeof(LONG); - break; - case FIT_FLOAT: - bpp = 8 * sizeof(float); - break; - case FIT_DOUBLE: - bpp = 8 * sizeof(double); - break; - case FIT_COMPLEX: - bpp = 8 * sizeof(FICOMPLEX); - break; - case FIT_RGB16: - bpp = 8 * sizeof(FIRGB16); - break; - case FIT_RGBA16: - bpp = 8 * sizeof(FIRGBA16); - break; - case FIT_RGBF: - bpp = 8 * sizeof(FIRGBF); - break; - case FIT_RGBAF: - bpp = 8 * sizeof(FIRGBAF); - break; - default: - return NULL; - } - - FIBITMAP *bitmap = (FIBITMAP *)malloc(sizeof(FIBITMAP)); - - if (bitmap != NULL) { - - // calculate the size of a FreeImage image - // align the palette and the pixels on a FIBITMAP_ALIGNMENT bytes alignment boundary - // palette is aligned on a 16 bytes boundary - // pixels are aligned on a 16 bytes boundary - - // when using a user provided pixel buffer, force a 'header only' allocation - - size_t dib_size = FreeImage_GetInternalImageSize(header_only || ext_bits, width, height, bpp, need_masks); - - if(dib_size == 0) { - // memory allocation will fail (probably a malloc overflow) - free(bitmap); - return NULL; - } - - bitmap->data = (BYTE *)FreeImage_Aligned_Malloc(dib_size * sizeof(BYTE), FIBITMAP_ALIGNMENT); - - if (bitmap->data != NULL) { - memset(bitmap->data, 0, dib_size); - - // write out the FREEIMAGEHEADER - - FREEIMAGEHEADER *fih = (FREEIMAGEHEADER *)bitmap->data; - - fih->type = type; - - memset(&fih->bkgnd_color, 0, sizeof(RGBQUAD)); - - fih->transparent = FALSE; - fih->transparency_count = 0; - memset(fih->transparent_table, 0xff, 256); - - fih->has_pixels = header_only ? FALSE : TRUE; - - // initialize FIICCPROFILE link - - FIICCPROFILE *iccProfile = FreeImage_GetICCProfile(bitmap); - iccProfile->size = 0; - iccProfile->data = 0; - iccProfile->flags = 0; - - // initialize metadata models list - - fih->metadata = new(std::nothrow) METADATAMAP; - - // initialize attached thumbnail - - fih->thumbnail = NULL; - - // store a pointer to user provided pixel buffer (if any) - - fih->external_bits = ext_bits; - fih->external_pitch = ext_pitch; - - // write out the BITMAPINFOHEADER - - BITMAPINFOHEADER *bih = FreeImage_GetInfoHeader(bitmap); - bih->biSize = sizeof(BITMAPINFOHEADER); - bih->biWidth = width; - bih->biHeight = height; - bih->biPlanes = 1; - bih->biCompression = need_masks ? BI_BITFIELDS : BI_RGB; - bih->biBitCount = (WORD)bpp; - bih->biClrUsed = CalculateUsedPaletteEntries(bpp); - bih->biClrImportant = bih->biClrUsed; - bih->biXPelsPerMeter = 2835; // 72 dpi - bih->biYPelsPerMeter = 2835; // 72 dpi - - if(bpp == 8) { - // build a default greyscale palette (very useful for image processing) - RGBQUAD *pal = FreeImage_GetPalette(bitmap); - for(int i = 0; i < 256; i++) { - pal[i].rgbRed = (BYTE)i; - pal[i].rgbGreen = (BYTE)i; - pal[i].rgbBlue = (BYTE)i; - } - } - - // just setting the masks (only if needed) just like the palette. - if (need_masks) { - FREEIMAGERGBMASKS *masks = FreeImage_GetRGBMasks(bitmap); - masks->red_mask = red_mask; - masks->green_mask = green_mask; - masks->blue_mask = blue_mask; - } - - return bitmap; - } - - free(bitmap); - } - - return NULL; -} - -FIBITMAP * DLL_CALLCONV -FreeImage_AllocateHeaderForBits(BYTE *ext_bits, unsigned ext_pitch, FREE_IMAGE_TYPE type, int width, int height, int bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask) { - return FreeImage_AllocateBitmap(FALSE, ext_bits, ext_pitch, type, width, height, bpp, red_mask, green_mask, blue_mask); -} - -FIBITMAP * DLL_CALLCONV -FreeImage_AllocateHeaderT(BOOL header_only, FREE_IMAGE_TYPE type, int width, int height, int bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask) { - return FreeImage_AllocateBitmap(header_only, NULL, 0, type, width, height, bpp, red_mask, green_mask, blue_mask); -} - -FIBITMAP * DLL_CALLCONV -FreeImage_AllocateHeader(BOOL header_only, int width, int height, int bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask) { - return FreeImage_AllocateBitmap(header_only, NULL, 0, FIT_BITMAP, width, height, bpp, red_mask, green_mask, blue_mask); -} - -FIBITMAP * DLL_CALLCONV -FreeImage_Allocate(int width, int height, int bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask) { - return FreeImage_AllocateBitmap(FALSE, NULL, 0, FIT_BITMAP, width, height, bpp, red_mask, green_mask, blue_mask); -} - -FIBITMAP * DLL_CALLCONV -FreeImage_AllocateT(FREE_IMAGE_TYPE type, int width, int height, int bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask) { - return FreeImage_AllocateBitmap(FALSE, NULL, 0, type, width, height, bpp, red_mask, green_mask, blue_mask); -} - -void DLL_CALLCONV -FreeImage_Unload(FIBITMAP *dib) { - if (NULL != dib) { - if (NULL != dib->data) { - // delete possible icc profile ... - if (FreeImage_GetICCProfile(dib)->data) { - free(FreeImage_GetICCProfile(dib)->data); - } - - // delete metadata models - METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata; - - for(METADATAMAP::iterator i = (*metadata).begin(); i != (*metadata).end(); i++) { - TAGMAP *tagmap = (*i).second; - - if(tagmap) { - for(TAGMAP::iterator j = tagmap->begin(); j != tagmap->end(); j++) { - FITAG *tag = (*j).second; - FreeImage_DeleteTag(tag); - } - - delete tagmap; - } - } - - delete metadata; - - // delete embedded thumbnail - FreeImage_Unload(FreeImage_GetThumbnail(dib)); - - // delete bitmap ... - FreeImage_Aligned_Free(dib->data); - } - - free(dib); // ... and the wrapper - } -} - -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_Clone(FIBITMAP *dib) { - if(!dib) { - return NULL; - } - - FREE_IMAGE_TYPE type = FreeImage_GetImageType(dib); - unsigned width = FreeImage_GetWidth(dib); - unsigned height = FreeImage_GetHeight(dib); - unsigned bpp = FreeImage_GetBPP(dib); - - // if the FIBITMAP is a wrapper to a user provided pixel buffer, get a pointer to this buffer - const BYTE *ext_bits = ((FREEIMAGEHEADER *)dib->data)->external_bits; - - // check for pixel availability ... - BOOL header_only = FreeImage_HasPixels(dib) ? FALSE : TRUE; - - // check whether this image has masks defined ... - BOOL need_masks = (bpp == 16 && type == FIT_BITMAP) ? TRUE : FALSE; - - // allocate a new dib - FIBITMAP *new_dib = FreeImage_AllocateHeaderT(header_only, type, width, height, bpp, - FreeImage_GetRedMask(dib), FreeImage_GetGreenMask(dib), FreeImage_GetBlueMask(dib)); - - if (new_dib) { - // save ICC profile links - FIICCPROFILE *src_iccProfile = FreeImage_GetICCProfile(dib); - FIICCPROFILE *dst_iccProfile = FreeImage_GetICCProfile(new_dib); - - // save metadata links - METADATAMAP *src_metadata = ((FREEIMAGEHEADER *)dib->data)->metadata; - METADATAMAP *dst_metadata = ((FREEIMAGEHEADER *)new_dib->data)->metadata; - - // calculate the size of the dst image - // align the palette and the pixels on a FIBITMAP_ALIGNMENT bytes alignment boundary - // palette is aligned on a 16 bytes boundary - // pixels are aligned on a 16 bytes boundary - - // when using a user provided pixel buffer, force a 'header only' calculation - - size_t dib_size = FreeImage_GetInternalImageSize(header_only || ext_bits, width, height, bpp, need_masks); - - // copy the bitmap + internal pointers (remember to restore new_dib internal pointers later) - memcpy(new_dib->data, dib->data, dib_size); - - // reset ICC profile link for new_dib - memset(dst_iccProfile, 0, sizeof(FIICCPROFILE)); - - // restore metadata link for new_dib - ((FREEIMAGEHEADER *)new_dib->data)->metadata = dst_metadata; - - // reset thumbnail link for new_dib - ((FREEIMAGEHEADER *)new_dib->data)->thumbnail = NULL; - - // reset external wrapped buffer link for new_dib - ((FREEIMAGEHEADER *)new_dib->data)->external_bits = NULL; - ((FREEIMAGEHEADER *)new_dib->data)->external_pitch = 0; - - // copy possible ICC profile - FreeImage_CreateICCProfile(new_dib, src_iccProfile->data, src_iccProfile->size); - dst_iccProfile->flags = src_iccProfile->flags; - - // copy metadata models - for(METADATAMAP::iterator i = (*src_metadata).begin(); i != (*src_metadata).end(); i++) { - int model = (*i).first; - TAGMAP *src_tagmap = (*i).second; - - if(src_tagmap) { - // create a metadata model - TAGMAP *dst_tagmap = new(std::nothrow) TAGMAP(); - - if(dst_tagmap) { - // fill the model - for(TAGMAP::iterator j = src_tagmap->begin(); j != src_tagmap->end(); j++) { - std::string dst_key = (*j).first; - FITAG *dst_tag = FreeImage_CloneTag( (*j).second ); - - // assign key and tag value - (*dst_tagmap)[dst_key] = dst_tag; - } - - // assign model and tagmap - (*dst_metadata)[model] = dst_tagmap; - } - } - } - - // copy the thumbnail - FreeImage_SetThumbnail(new_dib, FreeImage_GetThumbnail(dib)); - - // copy user provided pixel buffer (if any) - if(ext_bits) { - const unsigned pitch = FreeImage_GetPitch(dib); - const unsigned linesize = FreeImage_GetLine(dib); - for(unsigned y = 0; y < height; y++) { - memcpy(FreeImage_GetScanLine(new_dib, y), ext_bits, linesize); - ext_bits += pitch; - } - } - - return new_dib; - } - - return NULL; -} - -// ---------------------------------------------------------- - -BYTE * DLL_CALLCONV -FreeImage_GetBits(FIBITMAP *dib) { - if(!FreeImage_HasPixels(dib)) { - return NULL; - } - - if(((FREEIMAGEHEADER *)dib->data)->external_bits) { - return ((FREEIMAGEHEADER *)dib->data)->external_bits; - } - - // returns the pixels aligned on a FIBITMAP_ALIGNMENT bytes alignment boundary - size_t lp = (size_t)FreeImage_GetInfoHeader(dib); - lp += sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * FreeImage_GetColorsUsed(dib); - lp += FreeImage_HasRGBMasks(dib) ? sizeof(DWORD) * 3 : 0; - lp += (lp % FIBITMAP_ALIGNMENT ? FIBITMAP_ALIGNMENT - lp % FIBITMAP_ALIGNMENT : 0); - return (BYTE *)lp; -} - -// ---------------------------------------------------------- -// DIB information functions -// ---------------------------------------------------------- - -FIBITMAP* DLL_CALLCONV -FreeImage_GetThumbnail(FIBITMAP *dib) { - return (dib != NULL) ? ((FREEIMAGEHEADER *)dib->data)->thumbnail : NULL; -} - -BOOL DLL_CALLCONV -FreeImage_SetThumbnail(FIBITMAP *dib, FIBITMAP *thumbnail) { - if(dib == NULL) { - return FALSE; - } - FIBITMAP *currentThumbnail = ((FREEIMAGEHEADER *)dib->data)->thumbnail; - if(currentThumbnail == thumbnail) { - return TRUE; - } - FreeImage_Unload(currentThumbnail); - - ((FREEIMAGEHEADER *)dib->data)->thumbnail = FreeImage_HasPixels(thumbnail) ? FreeImage_Clone(thumbnail) : NULL; - - return TRUE; -} - -// ---------------------------------------------------------- - -FREE_IMAGE_COLOR_TYPE DLL_CALLCONV -FreeImage_GetColorType(FIBITMAP *dib) { - RGBQUAD *rgb; - - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - - // special bitmap type - if(image_type != FIT_BITMAP) { - switch(image_type) { - case FIT_UINT16: - { - // 16-bit greyscale TIF can be either FIC_MINISBLACK (the most common case) or FIC_MINISWHITE - // you can check this using EXIF_MAIN metadata - FITAG *photometricTag = NULL; - if(FreeImage_GetMetadata(FIMD_EXIF_MAIN, dib, "PhotometricInterpretation", &photometricTag)) { - const short *value = (short*)FreeImage_GetTagValue(photometricTag); - // PHOTOMETRIC_MINISWHITE = 0 => min value is white - // PHOTOMETRIC_MINISBLACK = 1 => min value is black - return (*value == 0) ? FIC_MINISWHITE : FIC_MINISBLACK; - } - return FIC_MINISBLACK; - } - break; - - case FIT_RGB16: - case FIT_RGBF: - return FIC_RGB; - - case FIT_RGBA16: - case FIT_RGBAF: - return (((FreeImage_GetICCProfile(dib)->flags) & FIICC_COLOR_IS_CMYK) == FIICC_COLOR_IS_CMYK) ? FIC_CMYK : FIC_RGBALPHA; - } - - return FIC_MINISBLACK; - } - - // standard image type - switch (FreeImage_GetBPP(dib)) { - case 1: - { - rgb = FreeImage_GetPalette(dib); - - if ((rgb->rgbRed == 0) && (rgb->rgbGreen == 0) && (rgb->rgbBlue == 0)) { - rgb++; - - if ((rgb->rgbRed == 255) && (rgb->rgbGreen == 255) && (rgb->rgbBlue == 255)) { - return FIC_MINISBLACK; - } - } - - if ((rgb->rgbRed == 255) && (rgb->rgbGreen == 255) && (rgb->rgbBlue == 255)) { - rgb++; - - if ((rgb->rgbRed == 0) && (rgb->rgbGreen == 0) && (rgb->rgbBlue == 0)) { - return FIC_MINISWHITE; - } - } - - return FIC_PALETTE; - } - - case 4: - case 8: // Check if the DIB has a color or a greyscale palette - { - int ncolors = FreeImage_GetColorsUsed(dib); - int minisblack = 1; - rgb = FreeImage_GetPalette(dib); - - for (int i = 0; i < ncolors; i++) { - if ((rgb->rgbRed != rgb->rgbGreen) || (rgb->rgbRed != rgb->rgbBlue)) { - return FIC_PALETTE; - } - - // The DIB has a color palette if the greyscale isn't a linear ramp - // Take care of reversed grey images - if (rgb->rgbRed != i) { - if ((ncolors-i-1) != rgb->rgbRed) { - return FIC_PALETTE; - } else { - minisblack = 0; - } - } - - rgb++; - } - - return minisblack ? FIC_MINISBLACK : FIC_MINISWHITE; - } - - case 16: - case 24: - return FIC_RGB; - - case 32: - { - if (((FreeImage_GetICCProfile(dib)->flags) & FIICC_COLOR_IS_CMYK) == FIICC_COLOR_IS_CMYK) { - return FIC_CMYK; - } - - if( FreeImage_HasPixels(dib) ) { - // check for fully opaque alpha layer - for (unsigned y = 0; y < FreeImage_GetHeight(dib); y++) { - rgb = (RGBQUAD *)FreeImage_GetScanLine(dib, y); - - for (unsigned x = 0; x < FreeImage_GetWidth(dib); x++) { - if (rgb[x].rgbReserved != 0xFF) { - return FIC_RGBALPHA; - } - } - } - return FIC_RGB; - } - - return FIC_RGBALPHA; - } - - default : - return FIC_MINISBLACK; - } -} - -// ---------------------------------------------------------- - -FREE_IMAGE_TYPE DLL_CALLCONV -FreeImage_GetImageType(FIBITMAP *dib) { - return (dib != NULL) ? ((FREEIMAGEHEADER *)dib->data)->type : FIT_UNKNOWN; -} - -// ---------------------------------------------------------- - -BOOL DLL_CALLCONV -FreeImage_HasPixels(FIBITMAP *dib) { - return (dib != NULL) ? ((FREEIMAGEHEADER *)dib->data)->has_pixels : FALSE; -} - -// ---------------------------------------------------------- - -BOOL DLL_CALLCONV -FreeImage_HasRGBMasks(FIBITMAP *dib) { - return dib && FreeImage_GetInfoHeader(dib)->biCompression == BI_BITFIELDS; -} - -unsigned DLL_CALLCONV -FreeImage_GetRedMask(FIBITMAP *dib) { - FREEIMAGERGBMASKS *masks = NULL; - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - switch(image_type) { - case FIT_BITMAP: - // check for 16-bit RGB (565 or 555) - masks = FreeImage_GetRGBMasks(dib); - if (masks) { - return masks->red_mask; - } - return FreeImage_GetBPP(dib) >= 24 ? FI_RGBA_RED_MASK : 0; - default: - return 0; - } -} - -unsigned DLL_CALLCONV -FreeImage_GetGreenMask(FIBITMAP *dib) { - FREEIMAGERGBMASKS *masks = NULL; - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - switch(image_type) { - case FIT_BITMAP: - // check for 16-bit RGB (565 or 555) - masks = FreeImage_GetRGBMasks(dib); - if (masks) { - return masks->green_mask; - } - return FreeImage_GetBPP(dib) >= 24 ? FI_RGBA_GREEN_MASK : 0; - default: - return 0; - } -} - -unsigned DLL_CALLCONV -FreeImage_GetBlueMask(FIBITMAP *dib) { - FREEIMAGERGBMASKS *masks = NULL; - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - switch(image_type) { - case FIT_BITMAP: - // check for 16-bit RGB (565 or 555) - masks = FreeImage_GetRGBMasks(dib); - if (masks) { - return masks->blue_mask; - } - return FreeImage_GetBPP(dib) >= 24 ? FI_RGBA_BLUE_MASK : 0; - default: - return 0; - } -} - -// ---------------------------------------------------------- - -BOOL DLL_CALLCONV -FreeImage_HasBackgroundColor(FIBITMAP *dib) { - if(dib) { - RGBQUAD *bkgnd_color = &((FREEIMAGEHEADER *)dib->data)->bkgnd_color; - return (bkgnd_color->rgbReserved != 0) ? TRUE : FALSE; - } - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_GetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor) { - if(dib && bkcolor) { - if(FreeImage_HasBackgroundColor(dib)) { - // get the background color - RGBQUAD *bkgnd_color = &((FREEIMAGEHEADER *)dib->data)->bkgnd_color; - memcpy(bkcolor, bkgnd_color, sizeof(RGBQUAD)); - // get the background index - if(FreeImage_GetBPP(dib) == 8) { - RGBQUAD *pal = FreeImage_GetPalette(dib); - for(unsigned i = 0; i < FreeImage_GetColorsUsed(dib); i++) { - if(bkgnd_color->rgbRed == pal[i].rgbRed) { - if(bkgnd_color->rgbGreen == pal[i].rgbGreen) { - if(bkgnd_color->rgbBlue == pal[i].rgbBlue) { - bkcolor->rgbReserved = (BYTE)i; - return TRUE; - } - } - } - } - } - - bkcolor->rgbReserved = 0; - - return TRUE; - } - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_SetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor) { - if(dib) { - RGBQUAD *bkgnd_color = &((FREEIMAGEHEADER *)dib->data)->bkgnd_color; - if(bkcolor) { - // set the background color - memcpy(bkgnd_color, bkcolor, sizeof(RGBQUAD)); - // enable the file background color - bkgnd_color->rgbReserved = 1; - } else { - // clear and disable the file background color - memset(bkgnd_color, 0, sizeof(RGBQUAD)); - } - return TRUE; - } - - return FALSE; -} - -// ---------------------------------------------------------- - -BOOL DLL_CALLCONV -FreeImage_IsTransparent(FIBITMAP *dib) { - if(dib) { - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - switch(image_type) { - case FIT_BITMAP: - if(FreeImage_GetBPP(dib) == 32) { - if(FreeImage_GetColorType(dib) == FIC_RGBALPHA) { - return TRUE; - } - } else { - return ((FREEIMAGEHEADER *)dib->data)->transparent ? TRUE : FALSE; - } - break; - case FIT_RGBA16: - case FIT_RGBAF: - return (((FreeImage_GetICCProfile(dib)->flags) & FIICC_COLOR_IS_CMYK) == FIICC_COLOR_IS_CMYK) ? FALSE : TRUE; - default: - break; - } - } - return FALSE; -} - -BYTE * DLL_CALLCONV -FreeImage_GetTransparencyTable(FIBITMAP *dib) { - return dib ? ((FREEIMAGEHEADER *)dib->data)->transparent_table : NULL; -} - -void DLL_CALLCONV -FreeImage_SetTransparent(FIBITMAP *dib, BOOL enabled) { - if (dib) { - if ((FreeImage_GetBPP(dib) <= 8) || (FreeImage_GetBPP(dib) == 32)) { - ((FREEIMAGEHEADER *)dib->data)->transparent = enabled; - } else { - ((FREEIMAGEHEADER *)dib->data)->transparent = FALSE; - } - } -} - -unsigned DLL_CALLCONV -FreeImage_GetTransparencyCount(FIBITMAP *dib) { - return dib ? ((FREEIMAGEHEADER *)dib->data)->transparency_count : 0; -} - -void DLL_CALLCONV -FreeImage_SetTransparencyTable(FIBITMAP *dib, BYTE *table, int count) { - if (dib) { - count = MAX(0, MIN(count, 256)); - if (FreeImage_GetBPP(dib) <= 8) { - ((FREEIMAGEHEADER *)dib->data)->transparent = (count > 0) ? TRUE : FALSE; - ((FREEIMAGEHEADER *)dib->data)->transparency_count = count; - - if (table) { - memcpy(((FREEIMAGEHEADER *)dib->data)->transparent_table, table, count); - } else { - memset(((FREEIMAGEHEADER *)dib->data)->transparent_table, 0xff, count); - } - } - } -} - -/** @brief Sets the index of the palette entry to be used as transparent color - for the image specified. Does nothing on high color images. - - This method sets the index of the palette entry to be used as single transparent - color for the image specified. This works on palletised images only and does - nothing for high color images. - - Although it is possible for palletised images to have more than one transparent - color, this method sets the palette entry specified as the single transparent - color for the image. All other colors will be set to be non-transparent by this - method. - - As with FreeImage_SetTransparencyTable(), this method also sets the image's - transparency property to TRUE (as it is set and obtained by - FreeImage_SetTransparent() and FreeImage_IsTransparent() respectively) for - palletised images. - - @param dib Input image, whose transparent color is to be set. - @param index The index of the palette entry to be set as transparent color. - */ -void DLL_CALLCONV -FreeImage_SetTransparentIndex(FIBITMAP *dib, int index) { - if (dib) { - int count = FreeImage_GetColorsUsed(dib); - if (count) { - BYTE *new_tt = (BYTE *)malloc(count * sizeof(BYTE)); - memset(new_tt, 0xFF, count); - if ((index >= 0) && (index < count)) { - new_tt[index] = 0x00; - } - FreeImage_SetTransparencyTable(dib, new_tt, count); - free(new_tt); - } - } -} - -/** @brief Returns the palette entry used as transparent color for the image - specified. Works for palletised images only and returns -1 for high color - images or if the image has no color set to be transparent. - - Although it is possible for palletised images to have more than one transparent - color, this function always returns the index of the first palette entry, set - to be transparent. - - @param dib Input image, whose transparent color is to be returned. - @return Returns the index of the palette entry used as transparent color for - the image specified or -1 if there is no transparent color found (e.g. the image - is a high color image). - */ -int DLL_CALLCONV -FreeImage_GetTransparentIndex(FIBITMAP *dib) { - int count = FreeImage_GetTransparencyCount(dib); - BYTE *tt = FreeImage_GetTransparencyTable(dib); - for (int i = 0; i < count; i++) { - if (tt[i] == 0) { - return i; - } - } - return -1; -} - -// ---------------------------------------------------------- - -FIICCPROFILE * DLL_CALLCONV -FreeImage_GetICCProfile(FIBITMAP *dib) { - FIICCPROFILE *profile = (dib) ? (FIICCPROFILE *)&((FREEIMAGEHEADER *)dib->data)->iccProfile : NULL; - return profile; -} - -FIICCPROFILE * DLL_CALLCONV -FreeImage_CreateICCProfile(FIBITMAP *dib, void *data, long size) { - // clear the profile but preserve profile->flags - FreeImage_DestroyICCProfile(dib); - // create the new profile - FIICCPROFILE *profile = FreeImage_GetICCProfile(dib); - if(size && profile) { - profile->data = malloc(size); - if(profile->data) { - memcpy(profile->data, data, profile->size = size); - } - } - return profile; -} - -void DLL_CALLCONV -FreeImage_DestroyICCProfile(FIBITMAP *dib) { - FIICCPROFILE *profile = FreeImage_GetICCProfile(dib); - if(profile) { - if (profile->data) { - free (profile->data); - } - // clear the profile but preserve profile->flags - profile->data = NULL; - profile->size = 0; - } - - // destroy also Exif-Main ICC profile - FreeImage_SetMetadata(FIMD_EXIF_MAIN, dib, "InterColorProfile", NULL); -} - -// ---------------------------------------------------------- - -unsigned DLL_CALLCONV -FreeImage_GetWidth(FIBITMAP *dib) { - return dib ? FreeImage_GetInfoHeader(dib)->biWidth : 0; -} - -unsigned DLL_CALLCONV -FreeImage_GetHeight(FIBITMAP *dib) { - return (dib) ? FreeImage_GetInfoHeader(dib)->biHeight : 0; -} - -unsigned DLL_CALLCONV -FreeImage_GetBPP(FIBITMAP *dib) { - return dib ? FreeImage_GetInfoHeader(dib)->biBitCount : 0; -} - -unsigned DLL_CALLCONV -FreeImage_GetLine(FIBITMAP *dib) { - return dib ? ((FreeImage_GetWidth(dib) * FreeImage_GetBPP(dib)) + 7) / 8 : 0; -} - -unsigned DLL_CALLCONV -FreeImage_GetPitch(FIBITMAP *dib) { - if(dib) { - FREEIMAGEHEADER *fih = (FREEIMAGEHEADER *)dib->data; - return fih->external_bits ? fih->external_pitch : (FreeImage_GetLine(dib) + 3 & ~3); - } - return 0; -} - -unsigned DLL_CALLCONV -FreeImage_GetColorsUsed(FIBITMAP *dib) { - return dib ? FreeImage_GetInfoHeader(dib)->biClrUsed : 0; -} - -unsigned DLL_CALLCONV -FreeImage_GetDIBSize(FIBITMAP *dib) { - return (dib) ? sizeof(BITMAPINFOHEADER) + (FreeImage_GetColorsUsed(dib) * sizeof(RGBQUAD)) + (FreeImage_GetPitch(dib) * FreeImage_GetHeight(dib)) : 0; -} - -RGBQUAD * DLL_CALLCONV -FreeImage_GetPalette(FIBITMAP *dib) { - return (dib && FreeImage_GetBPP(dib) < 16) ? (RGBQUAD *)(((BYTE *)FreeImage_GetInfoHeader(dib)) + sizeof(BITMAPINFOHEADER)) : NULL; -} - -unsigned DLL_CALLCONV -FreeImage_GetDotsPerMeterX(FIBITMAP *dib) { - return (dib) ? FreeImage_GetInfoHeader(dib)->biXPelsPerMeter : 0; -} - -unsigned DLL_CALLCONV -FreeImage_GetDotsPerMeterY(FIBITMAP *dib) { - return (dib) ? FreeImage_GetInfoHeader(dib)->biYPelsPerMeter : 0; -} - -void DLL_CALLCONV -FreeImage_SetDotsPerMeterX(FIBITMAP *dib, unsigned res) { - if(dib) { - FreeImage_GetInfoHeader(dib)->biXPelsPerMeter = res; - } -} - -void DLL_CALLCONV -FreeImage_SetDotsPerMeterY(FIBITMAP *dib, unsigned res) { - if(dib) { - FreeImage_GetInfoHeader(dib)->biYPelsPerMeter = res; - } -} - -BITMAPINFOHEADER * DLL_CALLCONV -FreeImage_GetInfoHeader(FIBITMAP *dib) { - if(!dib) { - return NULL; - } - size_t lp = (size_t)dib->data + sizeof(FREEIMAGEHEADER); - lp += (lp % FIBITMAP_ALIGNMENT ? FIBITMAP_ALIGNMENT - lp % FIBITMAP_ALIGNMENT : 0); - lp += FIBITMAP_ALIGNMENT - sizeof(BITMAPINFOHEADER) % FIBITMAP_ALIGNMENT; - return (BITMAPINFOHEADER *)lp; -} - -BITMAPINFO * DLL_CALLCONV -FreeImage_GetInfo(FIBITMAP *dib) { - return (BITMAPINFO *)FreeImage_GetInfoHeader(dib); -} - -// ---------------------------------------------------------- -// Metadata routines -// ---------------------------------------------------------- - -FIMETADATA * DLL_CALLCONV -FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag) { - if(!dib) { - return NULL; - } - - // get the metadata model - METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata; - TAGMAP *tagmap = NULL; - if( (*metadata).find(model) != (*metadata).end() ) { - tagmap = (*metadata)[model]; - } - if(tagmap) { - // allocate a handle - FIMETADATA *handle = (FIMETADATA *)malloc(sizeof(FIMETADATA)); - if(handle) { - // calculate the size of a METADATAHEADER - const size_t header_size = sizeof(METADATAHEADER); - - handle->data = (BYTE *)malloc(header_size); - - if(handle->data) { - memset(handle->data, 0, header_size); - - // write out the METADATAHEADER - METADATAHEADER *mdh = (METADATAHEADER *)handle->data; - - mdh->pos = 1; - mdh->tagmap = tagmap; - - // get the first element - TAGMAP::iterator i = tagmap->begin(); - *tag = (*i).second; - - return handle; - } - - free(handle); - } - } - - return NULL; -} - -BOOL DLL_CALLCONV -FreeImage_FindNextMetadata(FIMETADATA *mdhandle, FITAG **tag) { - if(!mdhandle) { - return FALSE; - } - - METADATAHEADER *mdh = (METADATAHEADER *)mdhandle->data; - TAGMAP *tagmap = mdh->tagmap; - - int current_pos = mdh->pos; - int mapsize = (int)tagmap->size(); - - if(current_pos < mapsize) { - // get the tag element at position pos - int count = 0; - - for(TAGMAP::iterator i = tagmap->begin(); i != tagmap->end(); i++) { - if(count == current_pos) { - *tag = (*i).second; - mdh->pos++; - break; - } - count++; - } - - return TRUE; - } - - return FALSE; -} - -void DLL_CALLCONV -FreeImage_FindCloseMetadata(FIMETADATA *mdhandle) { - if (NULL != mdhandle) { // delete the handle - if (NULL != mdhandle->data) { - free(mdhandle->data); - } - free(mdhandle); // ... and the wrapper - } -} - - -// ---------------------------------------------------------- - -BOOL DLL_CALLCONV -FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src) { - if(!src || !dst) { - return FALSE; - } - - // get metadata links - METADATAMAP *src_metadata = ((FREEIMAGEHEADER *)src->data)->metadata; - METADATAMAP *dst_metadata = ((FREEIMAGEHEADER *)dst->data)->metadata; - - // copy metadata models, *except* the FIMD_ANIMATION model - for(METADATAMAP::iterator i = (*src_metadata).begin(); i != (*src_metadata).end(); i++) { - int model = (*i).first; - if(model == (int)FIMD_ANIMATION) { - continue; - } - TAGMAP *src_tagmap = (*i).second; - - if(src_tagmap) { - if( dst_metadata->find(model) != dst_metadata->end() ) { - // destroy dst model - FreeImage_SetMetadata((FREE_IMAGE_MDMODEL)model, dst, NULL, NULL); - } - - // create a metadata model - TAGMAP *dst_tagmap = new(std::nothrow) TAGMAP(); - - if(dst_tagmap) { - // fill the model - for(TAGMAP::iterator j = src_tagmap->begin(); j != src_tagmap->end(); j++) { - std::string dst_key = (*j).first; - FITAG *dst_tag = FreeImage_CloneTag( (*j).second ); - - // assign key and tag value - (*dst_tagmap)[dst_key] = dst_tag; - } - - // assign model and tagmap - (*dst_metadata)[model] = dst_tagmap; - } - } - } - - // clone resolution - FreeImage_SetDotsPerMeterX(dst, FreeImage_GetDotsPerMeterX(src)); - FreeImage_SetDotsPerMeterY(dst, FreeImage_GetDotsPerMeterY(src)); - - return TRUE; -} - -// ---------------------------------------------------------- - -BOOL DLL_CALLCONV -FreeImage_SetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG *tag) { - if(!dib) { - return FALSE; - } - - TAGMAP *tagmap = NULL; - - // get the metadata model - METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata; - METADATAMAP::iterator model_iterator = metadata->find(model); - if (model_iterator != metadata->end()) { - tagmap = model_iterator->second; - } - - if(key != NULL) { - - if ((tag == NULL) && !tagmap) { - // remove a tag from an unknown tagmap, nothing to do - return TRUE; - } - - if(!tagmap) { - // this model, doesn't exist: create it - tagmap = new(std::nothrow) TAGMAP(); - (*metadata)[model] = tagmap; - } - - if(tag) { - // first check the tag - if(FreeImage_GetTagKey(tag) == NULL) { - FreeImage_SetTagKey(tag, key); - } else if(strcmp(key, FreeImage_GetTagKey(tag)) != 0) { - // set the tag key - FreeImage_SetTagKey(tag, key); - } - if(FreeImage_GetTagCount(tag) * FreeImage_TagDataWidth(FreeImage_GetTagType(tag)) != FreeImage_GetTagLength(tag)) { - FreeImage_OutputMessageProc(FIF_UNKNOWN, "Invalid data count for tag '%s'", key); - return FALSE; - } - - // fill the tag ID if possible and if it's needed - TagLib& tag_lib = TagLib::instance(); - switch(model) { - case FIMD_IPTC: - { - int id = tag_lib.getTagID(TagLib::IPTC, key); - /* - if(id == -1) { - FreeImage_OutputMessageProc(FIF_UNKNOWN, "IPTC: Invalid key '%s'", key); - } - */ - FreeImage_SetTagID(tag, (WORD)id); - } - break; - - default: - break; - } - - // delete existing tag - FITAG *old_tag = (*tagmap)[key]; - if(old_tag) { - FreeImage_DeleteTag(old_tag); - } - - // create a new tag - (*tagmap)[key] = FreeImage_CloneTag(tag); - } - else { - // delete existing tag - TAGMAP::iterator i = tagmap->find(key); - if(i != tagmap->end()) { - FITAG *old_tag = (*i).second; - FreeImage_DeleteTag(old_tag); - tagmap->erase(key); - } - } - } - else { - // destroy the metadata model - if(tagmap) { - for(TAGMAP::iterator i = tagmap->begin(); i != tagmap->end(); i++) { - FITAG *tag = (*i).second; - FreeImage_DeleteTag(tag); - } - - delete tagmap; - metadata->erase(model_iterator); - } - } - - return TRUE; -} - -BOOL DLL_CALLCONV -FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG **tag) { - if(!dib || !key || !tag) { - return FALSE; - } - - TAGMAP *tagmap = NULL; - *tag = NULL; - - // get the metadata model - METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata; - if(!(*metadata).empty()) { - METADATAMAP::iterator model_iterator = metadata->find(model); - if (model_iterator != metadata->end() ) { - // this model exists : try to get the requested tag - tagmap = model_iterator->second; - TAGMAP::iterator tag_iterator = tagmap->find(key); - if (tag_iterator != tagmap->end() ) { - // get the requested tag - *tag = tag_iterator->second; - } - } - } - - return (*tag != NULL) ? TRUE : FALSE; -} - -/** -Build and set a FITAG whose type is FIDT_ASCII. -@param model Metadata model to be filled -@param dib Image to be filled -@param key Tag key -@param value Tag value as a ASCII string -@return Returns TRUE if successful, returns FALSE otherwise -*/ -BOOL DLL_CALLCONV -FreeImage_SetMetadataKeyValue(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, const char *value) { - if(!dib || !key || !value) { - return FALSE; - } - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(tag) { - BOOL bSuccess = TRUE; - // fill the tag - DWORD tag_length = (DWORD)(strlen(value) + 1); - bSuccess &= FreeImage_SetTagKey(tag, key); - bSuccess &= FreeImage_SetTagLength(tag, tag_length); - bSuccess &= FreeImage_SetTagCount(tag, tag_length); - bSuccess &= FreeImage_SetTagType(tag, FIDT_ASCII); - bSuccess &= FreeImage_SetTagValue(tag, value); - if(bSuccess) { - // set the tag - bSuccess &= FreeImage_SetMetadata(model, dib, FreeImage_GetTagKey(tag), tag); - } - // delete the tag - FreeImage_DeleteTag(tag); - - return bSuccess; - } - - return FALSE; -} - -// ---------------------------------------------------------- - -unsigned DLL_CALLCONV -FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib) { - if(!dib) { - return FALSE; - } - - TAGMAP *tagmap = NULL; - - // get the metadata model - METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata; - if( (*metadata).find(model) != (*metadata).end() ) { - tagmap = (*metadata)[model]; - } - if(!tagmap) { - // this model, doesn't exist: return - return 0; - } - - // get the tag count - return (unsigned)tagmap->size(); -} - -// ---------------------------------------------------------- - -unsigned DLL_CALLCONV -FreeImage_GetMemorySize(FIBITMAP *dib) { - if (!dib) { - return 0; - } - FREEIMAGEHEADER *header = (FREEIMAGEHEADER *)dib->data; - BITMAPINFOHEADER *bih = FreeImage_GetInfoHeader(dib); - - BOOL header_only = !header->has_pixels || header->external_bits != NULL; - BOOL need_masks = bih->biCompression == BI_BITFIELDS; - unsigned width = bih->biWidth; - unsigned height = bih->biHeight; - unsigned bpp = bih->biBitCount; - - // start off with the size of the FIBITMAP structure - size_t size = sizeof(FIBITMAP); - - // add sizes of FREEIMAGEHEADER, BITMAPINFOHEADER, palette and DIB data - size += FreeImage_GetInternalImageSize(header_only, width, height, bpp, need_masks); - - // add ICC profile size - size += header->iccProfile.size; - - // add thumbnail image size - if (header->thumbnail) { - // we assume a thumbnail not having a thumbnail as well, - // so this recursive call should not create an infinite loop - size += FreeImage_GetMemorySize(header->thumbnail); - } - - // add metadata size - METADATAMAP *md = header->metadata; - if (!md) { - return (unsigned)size; - } - - // add size of METADATAMAP - size += sizeof(METADATAMAP); - - const size_t models = md->size(); - if (models == 0) { - return (unsigned)size; - } - - unsigned tags = 0; - - for (METADATAMAP::iterator i = md->begin(); i != md->end(); i++) { - TAGMAP *tm = i->second; - if (tm) { - for (TAGMAP::iterator j = tm->begin(); j != tm->end(); j++) { - ++tags; - const std::string & key = j->first; - size += key.capacity(); - size += FreeImage_GetTagMemorySize(j->second); - } - } - } - - // add size of all TAGMAP instances - size += models * sizeof(TAGMAP); - // add size of tree nodes in METADATAMAP - size += MapIntrospector::GetNodesMemorySize(models); - // add size of tree nodes in TAGMAP - size += MapIntrospector::GetNodesMemorySize(tags); - - return (unsigned)size; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/CacheFile.cpp b/Dependencies/FreeImage/Source/FreeImage/CacheFile.cpp deleted file mode 100644 index 173775f..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/CacheFile.cpp +++ /dev/null @@ -1,276 +0,0 @@ -// ========================================================== -// Multi-Page functions -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - checkered (checkered@users.sourceforge.net) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include "CacheFile.h" - -// ---------------------------------------------------------- - -CacheFile::CacheFile() : -m_file(NULL), -m_free_pages(), -m_page_cache_mem(), -m_page_cache_disk(), -m_page_map(), -m_page_count(0), -m_current_block(NULL), -m_keep_in_memory(TRUE) { -} - -CacheFile::~CacheFile() { - close(); -} - -BOOL -CacheFile::open(const std::string& filename, BOOL keep_in_memory) { - - assert(!m_file); - - m_filename = filename; - m_keep_in_memory = keep_in_memory; - - if ((!m_filename.empty()) && (!m_keep_in_memory)) { - m_file = fopen(m_filename.c_str(), "w+b"); - return (m_file != NULL); - } - - return (m_keep_in_memory == TRUE); -} - -void -CacheFile::close() { - // dispose the cache entries - - while (!m_page_cache_disk.empty()) { - Block *block = *m_page_cache_disk.begin(); - m_page_cache_disk.pop_front(); - delete [] block->data; - delete block; - } - while (!m_page_cache_mem.empty()) { - Block *block = *m_page_cache_mem.begin(); - m_page_cache_mem.pop_front(); - delete [] block->data; - delete block; - } - - if (m_file) { - // close the file - fclose(m_file); - m_file = NULL; - - // delete the file - remove(m_filename.c_str()); - } -} - -void -CacheFile::cleanupMemCache() { - if (!m_keep_in_memory) { - if (m_page_cache_mem.size() > CACHE_SIZE) { - // flush the least used block to file - - Block *old_block = m_page_cache_mem.back(); - fseek(m_file, old_block->nr * BLOCK_SIZE, SEEK_SET); - fwrite(old_block->data, BLOCK_SIZE, 1, m_file); - - // remove the data - - delete [] old_block->data; - old_block->data = NULL; - - // move the block to another list - - m_page_cache_disk.splice(m_page_cache_disk.begin(), m_page_cache_mem, --m_page_cache_mem.end()); - m_page_map[old_block->nr] = m_page_cache_disk.begin(); - } - } -} - -int -CacheFile::allocateBlock() { - Block *block = new Block; - block->data = new BYTE[BLOCK_SIZE]; - block->next = 0; - - if (!m_free_pages.empty()) { - block->nr = *m_free_pages.begin(); - m_free_pages.pop_front(); - } else { - block->nr = m_page_count++; - } - - m_page_cache_mem.push_front(block); - m_page_map[block->nr] = m_page_cache_mem.begin(); - - cleanupMemCache(); - - return block->nr; -} - -Block * -CacheFile::lockBlock(int nr) { - if (m_current_block == NULL) { - PageMapIt it = m_page_map.find(nr); - - if (it != m_page_map.end()) { - m_current_block = *(it->second); - - // the block is swapped out to disc. load it back - // and remove the block from the cache. it might get cached - // again as soon as the memory buffer fills up - - if (m_current_block->data == NULL) { - m_current_block->data = new BYTE[BLOCK_SIZE]; - - fseek(m_file, m_current_block->nr * BLOCK_SIZE, SEEK_SET); - fread(m_current_block->data, BLOCK_SIZE, 1, m_file); - - m_page_cache_mem.splice(m_page_cache_mem.begin(), m_page_cache_disk, it->second); - m_page_map[nr] = m_page_cache_mem.begin(); - } - - // if the memory cache size is too large, swap an item to disc - - cleanupMemCache(); - - // return the current block - - return m_current_block; - } - } - - return NULL; -} - -BOOL -CacheFile::unlockBlock(int nr) { - if (m_current_block) { - m_current_block = NULL; - return TRUE; - } - return FALSE; -} - -BOOL -CacheFile::deleteBlock(int nr) { - if (!m_current_block) { - PageMapIt it = m_page_map.find(nr); - - // remove block from cache - - if (it != m_page_map.end()) { - m_page_map.erase(nr); - } - - // add block to free page list - - m_free_pages.push_back(nr); - - return TRUE; - } - - return FALSE; -} - -BOOL -CacheFile::readFile(BYTE *data, int nr, int size) { - if ((data) && (size > 0)) { - int s = 0; - int block_nr = nr; - - do { - int copy_nr = block_nr; - - Block *block = lockBlock(copy_nr); - - block_nr = block->next; - - memcpy(data + s, block->data, (s + BLOCK_SIZE > size) ? size - s : BLOCK_SIZE); - - unlockBlock(copy_nr); - - s += BLOCK_SIZE; - } while (block_nr != 0); - - return TRUE; - } - - return FALSE; -} - -int -CacheFile::writeFile(BYTE *data, int size) { - if ((data) && (size > 0)) { - int nr_blocks_required = 1 + (size / BLOCK_SIZE); - int count = 0; - int s = 0; - int stored_alloc; - int alloc; - - stored_alloc = alloc = allocateBlock(); - - do { - int copy_alloc = alloc; - - Block *block = lockBlock(copy_alloc); - - block->next = 0; - - memcpy(block->data, data + s, (s + BLOCK_SIZE > size) ? size - s : BLOCK_SIZE); - - if (count + 1 < nr_blocks_required) - alloc = block->next = allocateBlock(); - - unlockBlock(copy_alloc); - - s += BLOCK_SIZE; - } while (++count < nr_blocks_required); - - return stored_alloc; - } - - return 0; -} - -void -CacheFile::deleteFile(int nr) { - do { - Block *block = lockBlock(nr); - - if (block == NULL) - break; - - int next = block->next; - - unlockBlock(nr); - - deleteBlock(nr); - - nr = next; - } while (nr != 0); -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/ColorLookup.cpp b/Dependencies/FreeImage/Source/FreeImage/ColorLookup.cpp deleted file mode 100644 index 0f4435a..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/ColorLookup.cpp +++ /dev/null @@ -1,785 +0,0 @@ -// ========================================================== -// X11 and SVG Color name lookup -// -// Design and implementation by -// - Karl-Heinz Bussian (khbussian@moss.de) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// RGB color names --------------------------------------------------------- - -typedef struct tagNamedColor { - const char *name; //! color name - BYTE r; //! red value - BYTE g; //! green value - BYTE b; //! blue value -} NamedColor; - -// -------------------------------------------------------------------------- - -/** -Helper function : perform a binary search on a color array -@param name Color name -@param color_array Color array -@param n Length of the color array -@return Returns the color index in the array if successful, returns -1 otherwise -*/ -static int -binsearch(const char *name, const NamedColor *color_array, int n) { - int cond, low, mid, high; - - low = 0; - high = n - 1; - while (low <= high) { - mid = (low + high) / 2; - if ((cond = strcmp(name, color_array[mid].name)) < 0) { - high = mid - 1; - } else if (cond > 0) { - low = mid + 1; - } else { - return mid; - } - } - return -1; -} - -/** -Perform a binary search on a color array -@param szColor Color name -@param color_array Color array -@param ncolors Length of the color array -@return Returns the color index in the array if successful, returns -1 otherwise -*/ -static int -FreeImage_LookupNamedColor(const char *szColor, const NamedColor *color_array, int ncolors) { - int i; - char color[64]; - - // make lower case name, squezze white space - - for (i = 0; szColor[i] && i < sizeof(color) - 1; i++) { - if (isspace(szColor[i])) { - continue; - } - if (isupper(szColor[i])) { - color[i] = (char)tolower(szColor[i]); - } else { - color[i] = szColor[i]; - } - } - color[i] = 0; - - return binsearch(color, color_array, ncolors); -} - -// ========================================================== -// X11 Color name lookup - -/** - This big list of color names was formed from the file: /usr/X11R6/lib/X11/rgb.txt - found on a standard Linux installation. -*/ - -static NamedColor X11ColorMap[] = { - { "aliceblue", 240, 248, 255 }, - { "antiquewhite", 250, 235, 215 }, - { "antiquewhite1", 255, 239, 219 }, - { "antiquewhite2", 238, 223, 204 }, - { "antiquewhite3", 205, 192, 176 }, - { "antiquewhite4", 139, 131, 120 }, - { "aquamarine", 127, 255, 212 }, - { "aquamarine1", 127, 255, 212 }, - { "aquamarine2", 118, 238, 198 }, - { "aquamarine3", 102, 205, 170 }, - { "aquamarine4", 69, 139, 116 }, - { "azure", 240, 255, 255 }, - { "azure1", 240, 255, 255 }, - { "azure2", 224, 238, 238 }, - { "azure3", 193, 205, 205 }, - { "azure4", 131, 139, 139 }, - { "beige", 245, 245, 220 }, - { "bisque", 255, 228, 196 }, - { "bisque1", 255, 228, 196 }, - { "bisque2", 238, 213, 183 }, - { "bisque3", 205, 183, 158 }, - { "bisque4", 139, 125, 107 }, - { "black", 0, 0, 0 }, - { "blanchedalmond", 255, 235, 205 }, - { "blue", 0, 0, 255 }, - { "blue1", 0, 0, 255 }, - { "blue2", 0, 0, 238 }, - { "blue3", 0, 0, 205 }, - { "blue4", 0, 0, 139 }, - { "blueviolet", 138, 43, 226 }, - { "brown", 165, 42, 42 }, - { "brown1", 255, 64, 64 }, - { "brown2", 238, 59, 59 }, - { "brown3", 205, 51, 51 }, - { "brown4", 139, 35, 35 }, - { "burlywood", 222, 184, 135 }, - { "burlywood1", 255, 211, 155 }, - { "burlywood2", 238, 197, 145 }, - { "burlywood3", 205, 170, 125 }, - { "burlywood4", 139, 115, 85 }, - { "cadetblue", 95, 158, 160 }, - { "cadetblue1", 152, 245, 255 }, - { "cadetblue2", 142, 229, 238 }, - { "cadetblue3", 122, 197, 205 }, - { "cadetblue4", 83, 134, 139 }, - { "chartreuse", 127, 255, 0 }, - { "chartreuse1", 127, 255, 0 }, - { "chartreuse2", 118, 238, 0 }, - { "chartreuse3", 102, 205, 0 }, - { "chartreuse4", 69, 139, 0 }, - { "chocolate", 210, 105, 30 }, - { "chocolate1", 255, 127, 36 }, - { "chocolate2", 238, 118, 33 }, - { "chocolate3", 205, 102, 29 }, - { "chocolate4", 139, 69, 19 }, - { "coral", 255, 127, 80 }, - { "coral1", 255, 114, 86 }, - { "coral2", 238, 106, 80 }, - { "coral3", 205, 91, 69 }, - { "coral4", 139, 62, 47 }, - { "cornflowerblue", 100, 149, 237 }, - { "cornsilk", 255, 248, 220 }, - { "cornsilk1", 255, 248, 220 }, - { "cornsilk2", 238, 232, 205 }, - { "cornsilk3", 205, 200, 177 }, - { "cornsilk4", 139, 136, 120 }, - { "cyan", 0, 255, 255 }, - { "cyan1", 0, 255, 255 }, - { "cyan2", 0, 238, 238 }, - { "cyan3", 0, 205, 205 }, - { "cyan4", 0, 139, 139 }, - { "darkblue", 0, 0, 139 }, - { "darkcyan", 0, 139, 139 }, - { "darkgoldenrod", 184, 134, 11 }, - { "darkgoldenrod1", 255, 185, 15 }, - { "darkgoldenrod2", 238, 173, 14 }, - { "darkgoldenrod3", 205, 149, 12 }, - { "darkgoldenrod4", 139, 101, 8 }, - { "darkgreen", 0, 100, 0 }, - { "darkkhaki", 189, 183, 107 }, - { "darkmagenta", 139, 0, 139 }, - { "darkolivegreen", 85, 107, 47 }, - { "darkolivegreen1", 202, 255, 112 }, - { "darkolivegreen2", 188, 238, 104 }, - { "darkolivegreen3", 162, 205, 90 }, - { "darkolivegreen4", 110, 139, 61 }, - { "darkorange", 255, 140, 0 }, - { "darkorange1", 255, 127, 0 }, - { "darkorange2", 238, 118, 0 }, - { "darkorange3", 205, 102, 0 }, - { "darkorange4", 139, 69, 0 }, - { "darkorchid", 153, 50, 204 }, - { "darkorchid1", 191, 62, 255 }, - { "darkorchid2", 178, 58, 238 }, - { "darkorchid3", 154, 50, 205 }, - { "darkorchid4", 104, 34, 139 }, - { "darkred", 139, 0, 0 }, - { "darksalmon", 233, 150, 122 }, - { "darkseagreen", 143, 188, 143 }, - { "darkseagreen1", 193, 255, 193 }, - { "darkseagreen2", 180, 238, 180 }, - { "darkseagreen3", 155, 205, 155 }, - { "darkseagreen4", 105, 139, 105 }, - { "darkslateblue", 72, 61, 139 }, - { "darkslategray", 47, 79, 79 }, - { "darkslategray1", 151, 255, 255 }, - { "darkslategray2", 141, 238, 238 }, - { "darkslategray3", 121, 205, 205 }, - { "darkslategray4", 82, 139, 139 }, - { "darkslategrey", 47, 79, 79 }, - { "darkturquoise", 0, 206, 209 }, - { "darkviolet", 148, 0, 211 }, - { "deeppink", 255, 20, 147 }, - { "deeppink1", 255, 20, 147 }, - { "deeppink2", 238, 18, 137 }, - { "deeppink3", 205, 16, 118 }, - { "deeppink4", 139, 10, 80 }, - { "deepskyblue", 0, 191, 255 }, - { "deepskyblue1", 0, 191, 255 }, - { "deepskyblue2", 0, 178, 238 }, - { "deepskyblue3", 0, 154, 205 }, - { "deepskyblue4", 0, 104, 139 }, - { "dimgray", 105, 105, 105 }, - { "dimgrey", 105, 105, 105 }, - { "dodgerblue", 30, 144, 255 }, - { "dodgerblue1", 30, 144, 255 }, - { "dodgerblue2", 28, 134, 238 }, - { "dodgerblue3", 24, 116, 205 }, - { "dodgerblue4", 16, 78, 139 }, - { "firebrick", 178, 34, 34 }, - { "firebrick1", 255, 48, 48 }, - { "firebrick2", 238, 44, 44 }, - { "firebrick3", 205, 38, 38 }, - { "firebrick4", 139, 26, 26 }, - { "floralwhite", 255, 250, 240 }, - { "forestgreen", 176, 48, 96 }, - { "gainsboro", 220, 220, 220 }, - { "ghostwhite", 248, 248, 255 }, - { "gold", 255, 215, 0 }, - { "gold1", 255, 215, 0 }, - { "gold2", 238, 201, 0 }, - { "gold3", 205, 173, 0 }, - { "gold4", 139, 117, 0 }, - { "goldenrod", 218, 165, 32 }, - { "goldenrod1", 255, 193, 37 }, - { "goldenrod2", 238, 180, 34 }, - { "goldenrod3", 205, 155, 29 }, - { "goldenrod4", 139, 105, 20 }, - { "gray", 190, 190, 190 }, - { "green", 0, 255, 0 }, - { "green1", 0, 255, 0 }, - { "green2", 0, 238, 0 }, - { "green3", 0, 205, 0 }, - { "green4", 0, 139, 0 }, - { "greenyellow", 173, 255, 47 }, - { "grey", 190, 190, 190 }, - { "honeydew", 240, 255, 240 }, - { "honeydew1", 240, 255, 240 }, - { "honeydew2", 224, 238, 224 }, - { "honeydew3", 193, 205, 193 }, - { "honeydew4", 131, 139, 131 }, - { "hotpink", 255, 105, 180 }, - { "hotpink1", 255, 110, 180 }, - { "hotpink2", 238, 106, 167 }, - { "hotpink3", 205, 96, 144 }, - { "hotpink4", 139, 58, 98 }, - { "indianred", 205, 92, 92 }, - { "indianred1", 255, 106, 106 }, - { "indianred2", 238, 99, 99 }, - { "indianred3", 205, 85, 85 }, - { "indianred4", 139, 58, 58 }, - { "ivory", 255, 255, 240 }, - { "ivory1", 255, 255, 240 }, - { "ivory2", 238, 238, 224 }, - { "ivory3", 205, 205, 193 }, - { "ivory4", 139, 139, 131 }, - { "khaki", 240, 230, 140 }, - { "khaki1", 255, 246, 143 }, - { "khaki2", 238, 230, 133 }, - { "khaki3", 205, 198, 115 }, - { "khaki4", 139, 134, 78 }, - { "lavender", 230, 230, 250 }, - { "lavenderblush", 255, 240, 245 }, - { "lavenderblush1", 255, 240, 245 }, - { "lavenderblush2", 238, 224, 229 }, - { "lavenderblush3", 205, 193, 197 }, - { "lavenderblush4", 139, 131, 134 }, - { "lawngreen", 124, 252, 0 }, - { "lemonchiffon", 255, 250, 205 }, - { "lemonchiffon1", 255, 250, 205 }, - { "lemonchiffon2", 238, 233, 191 }, - { "lemonchiffon3", 205, 201, 165 }, - { "lemonchiffon4", 139, 137, 112 }, - { "lightblue", 173, 216, 230 }, - { "lightblue1", 191, 239, 255 }, - { "lightblue2", 178, 223, 238 }, - { "lightblue3", 154, 192, 205 }, - { "lightblue4", 104, 131, 139 }, - { "lightcoral", 240, 128, 128 }, - { "lightcyan", 224, 255, 255 }, - { "lightcyan1", 224, 255, 255 }, - { "lightcyan2", 209, 238, 238 }, - { "lightcyan3", 180, 205, 205 }, - { "lightcyan4", 122, 139, 139 }, - { "lightgoldenrod", 238, 221, 130 }, - { "lightgoldenrod1", 255, 236, 139 }, - { "lightgoldenrod2", 238, 220, 130 }, - { "lightgoldenrod3", 205, 190, 112 }, - { "lightgoldenrod4", 139, 129, 76 }, - { "lightgoldenrodyellow", 250, 250, 210 }, - { "lightgray", 211, 211, 211 }, - { "lightgreen", 144, 238, 144 }, - { "lightgrey", 211, 211, 211 }, - { "lightpink", 255, 182, 193 }, - { "lightpink1", 255, 174, 185 }, - { "lightpink2", 238, 162, 173 }, - { "lightpink3", 205, 140, 149 }, - { "lightpink4", 139, 95, 101 }, - { "lightsalmon", 255, 160, 122 }, - { "lightsalmon1", 255, 160, 122 }, - { "lightsalmon2", 238, 149, 114 }, - { "lightsalmon3", 205, 129, 98 }, - { "lightsalmon4", 139, 87, 66 }, - { "lightseagreen", 32, 178, 170 }, - { "lightskyblue", 135, 206, 250 }, - { "lightskyblue1", 176, 226, 255 }, - { "lightskyblue2", 164, 211, 238 }, - { "lightskyblue3", 141, 182, 205 }, - { "lightskyblue4", 96, 123, 139 }, - { "lightslateblue", 132, 112, 255 }, - { "lightslategray", 119, 136, 153 }, - { "lightslategrey", 119, 136, 153 }, - { "lightsteelblue", 176, 196, 222 }, - { "lightsteelblue1", 202, 225, 255 }, - { "lightsteelblue2", 188, 210, 238 }, - { "lightsteelblue3", 162, 181, 205 }, - { "lightsteelblue4", 110, 123, 139 }, - { "lightyellow", 255, 255, 224 }, - { "lightyellow1", 255, 255, 224 }, - { "lightyellow2", 238, 238, 209 }, - { "lightyellow3", 205, 205, 180 }, - { "lightyellow4", 139, 139, 122 }, - { "limegreen", 50, 205, 50 }, - { "linen", 250, 240, 230 }, - { "magenta", 255, 0, 255 }, - { "magenta1", 255, 0, 255 }, - { "magenta2", 238, 0, 238 }, - { "magenta3", 205, 0, 205 }, - { "magenta4", 139, 0, 139 }, - { "maroon", 0, 255, 255 }, - { "maroon1", 255, 52, 179 }, - { "maroon2", 238, 48, 167 }, - { "maroon3", 205, 41, 144 }, - { "maroon4", 139, 28, 98 }, - { "mediumaquamarine", 102, 205, 170 }, - { "mediumblue", 0, 0, 205 }, - { "mediumorchid", 186, 85, 211 }, - { "mediumorchid1", 224, 102, 255 }, - { "mediumorchid2", 209, 95, 238 }, - { "mediumorchid3", 180, 82, 205 }, - { "mediumorchid4", 122, 55, 139 }, - { "mediumpurple", 147, 112, 219 }, - { "mediumpurple1", 171, 130, 255 }, - { "mediumpurple2", 159, 121, 238 }, - { "mediumpurple3", 137, 104, 205 }, - { "mediumpurple4", 93, 71, 139 }, - { "mediumseagreen", 60, 179, 113 }, - { "mediumslateblue", 123, 104, 238 }, - { "mediumspringgreen", 0, 250, 154 }, - { "mediumturquoise", 72, 209, 204 }, - { "mediumvioletred", 199, 21, 133 }, - { "midnightblue", 25, 25, 112 }, - { "mintcream", 245, 255, 250 }, - { "mistyrose", 255, 228, 225 }, - { "mistyrose1", 255, 228, 225 }, - { "mistyrose2", 238, 213, 210 }, - { "mistyrose3", 205, 183, 181 }, - { "mistyrose4", 139, 125, 123 }, - { "moccasin", 255, 228, 181 }, - { "navajowhite", 255, 222, 173 }, - { "navajowhite1", 255, 222, 173 }, - { "navajowhite2", 238, 207, 161 }, - { "navajowhite3", 205, 179, 139 }, - { "navajowhite4", 139, 121, 94 }, - { "navy", 0, 0, 128 }, - { "navyblue", 0, 0, 128 }, - { "oldlace", 253, 245, 230 }, - { "olivedrab", 107, 142, 35 }, - { "olivedrab1", 192, 255, 62 }, - { "olivedrab2", 179, 238, 58 }, - { "olivedrab3", 154, 205, 50 }, - { "olivedrab4", 105, 139, 34 }, - { "orange", 255, 165, 0 }, - { "orange1", 255, 165, 0 }, - { "orange2", 238, 154, 0 }, - { "orange3", 205, 133, 0 }, - { "orange4", 139, 90, 0 }, - { "orangered", 255, 69, 0 }, - { "orangered1", 255, 69, 0 }, - { "orangered2", 238, 64, 0 }, - { "orangered3", 205, 55, 0 }, - { "orangered4", 139, 37, 0 }, - { "orchid", 218, 112, 214 }, - { "orchid1", 255, 131, 250 }, - { "orchid2", 238, 122, 233 }, - { "orchid3", 205, 105, 201 }, - { "orchid4", 139, 71, 137 }, - { "palegoldenrod", 238, 232, 170 }, - { "palegreen", 152, 251, 152 }, - { "palegreen1", 154, 255, 154 }, - { "palegreen2", 144, 238, 144 }, - { "palegreen3", 124, 205, 124 }, - { "palegreen4", 84, 139, 84 }, - { "paleturquoise", 175, 238, 238 }, - { "paleturquoise1", 187, 255, 255 }, - { "paleturquoise2", 174, 238, 238 }, - { "paleturquoise3", 150, 205, 205 }, - { "paleturquoise4", 102, 139, 139 }, - { "palevioletred", 219, 112, 147 }, - { "palevioletred1", 255, 130, 171 }, - { "palevioletred2", 238, 121, 159 }, - { "palevioletred3", 205, 104, 137 }, - { "palevioletred4", 139, 71, 93 }, - { "papayawhip", 255, 239, 213 }, - { "peachpuff", 255, 218, 185 }, - { "peachpuff1", 255, 218, 185 }, - { "peachpuff2", 238, 203, 173 }, - { "peachpuff3", 205, 175, 149 }, - { "peachpuff4", 139, 119, 101 }, - { "peru", 205, 133, 63 }, - { "pink", 255, 192, 203 }, - { "pink1", 255, 181, 197 }, - { "pink2", 238, 169, 184 }, - { "pink3", 205, 145, 158 }, - { "pink4", 139, 99, 108 }, - { "plum", 221, 160, 221 }, - { "plum1", 255, 187, 255 }, - { "plum2", 238, 174, 238 }, - { "plum3", 205, 150, 205 }, - { "plum4", 139, 102, 139 }, - { "powderblue", 176, 224, 230 }, - { "purple", 160, 32, 240 }, - { "purple1", 155, 48, 255 }, - { "purple2", 145, 44, 238 }, - { "purple3", 125, 38, 205 }, - { "purple4", 85, 26, 139 }, - { "red", 255, 0, 0 }, - { "red1", 255, 0, 0 }, - { "red2", 238, 0, 0 }, - { "red3", 205, 0, 0 }, - { "red4", 139, 0, 0 }, - { "rosybrown", 188, 143, 143 }, - { "rosybrown1", 255, 193, 193 }, - { "rosybrown2", 238, 180, 180 }, - { "rosybrown3", 205, 155, 155 }, - { "rosybrown4", 139, 105, 105 }, - { "royalblue", 65, 105, 225 }, - { "royalblue1", 72, 118, 255 }, - { "royalblue2", 67, 110, 238 }, - { "royalblue3", 58, 95, 205 }, - { "royalblue4", 39, 64, 139 }, - { "saddlebrown", 139, 69, 19 }, - { "salmon", 250, 128, 114 }, - { "salmon1", 255, 140, 105 }, - { "salmon2", 238, 130, 98 }, - { "salmon3", 205, 112, 84 }, - { "salmon4", 139, 76, 57 }, - { "sandybrown", 244, 164, 96 }, - { "seagreen", 46, 139, 87 }, - { "seagreen1", 84, 255, 159 }, - { "seagreen2", 78, 238, 148 }, - { "seagreen3", 67, 205, 128 }, - { "seagreen4", 46, 139, 87 }, - { "seashell", 255, 245, 238 }, - { "seashell1", 255, 245, 238 }, - { "seashell2", 238, 229, 222 }, - { "seashell3", 205, 197, 191 }, - { "seashell4", 139, 134, 130 }, - { "sienna", 160, 82, 45 }, - { "sienna1", 255, 130, 71 }, - { "sienna2", 238, 121, 66 }, - { "sienna3", 205, 104, 57 }, - { "sienna4", 139, 71, 38 }, - { "skyblue", 135, 206, 235 }, - { "skyblue1", 135, 206, 255 }, - { "skyblue2", 126, 192, 238 }, - { "skyblue3", 108, 166, 205 }, - { "skyblue4", 74, 112, 139 }, - { "slateblue", 106, 90, 205 }, - { "slateblue1", 131, 111, 255 }, - { "slateblue2", 122, 103, 238 }, - { "slateblue3", 105, 89, 205 }, - { "slateblue4", 71, 60, 139 }, - { "slategray", 112, 128, 144 }, - { "slategray1", 198, 226, 255 }, - { "slategray2", 185, 211, 238 }, - { "slategray3", 159, 182, 205 }, - { "slategray4", 108, 123, 139 }, - { "slategrey", 112, 128, 144 }, - { "snow", 255, 250, 250 }, - { "snow1", 255, 250, 250 }, - { "snow2", 238, 233, 233 }, - { "snow3", 205, 201, 201 }, - { "snow4", 139, 137, 137 }, - { "springgreen", 0, 255, 127 }, - { "springgreen1", 0, 255, 127 }, - { "springgreen2", 0, 238, 118 }, - { "springgreen3", 0, 205, 102 }, - { "springgreen4", 0, 139, 69 }, - { "steelblue", 70, 130, 180 }, - { "steelblue1", 99, 184, 255 }, - { "steelblue2", 92, 172, 238 }, - { "steelblue3", 79, 148, 205 }, - { "steelblue4", 54, 100, 139 }, - { "tan", 210, 180, 140 }, - { "tan1", 255, 165, 79 }, - { "tan2", 238, 154, 73 }, - { "tan3", 205, 133, 63 }, - { "tan4", 139, 90, 43 }, - { "thistle", 216, 191, 216 }, - { "thistle1", 255, 225, 255 }, - { "thistle2", 238, 210, 238 }, - { "thistle3", 205, 181, 205 }, - { "thistle4", 139, 123, 139 }, - { "tomato", 255, 99, 71 }, - { "tomato1", 255, 99, 71 }, - { "tomato2", 238, 92, 66 }, - { "tomato3", 205, 79, 57 }, - { "tomato4", 139, 54, 38 }, - { "turquoise", 64, 224, 208 }, - { "turquoise1", 0, 245, 255 }, - { "turquoise2", 0, 229, 238 }, - { "turquoise3", 0, 197, 205 }, - { "turquoise4", 0, 134, 139 }, - { "violet", 238, 130, 238 }, - { "violetred", 208, 32, 144 }, - { "violetred1", 255, 62, 150 }, - { "violetred2", 238, 58, 140 }, - { "violetred3", 205, 50, 120 }, - { "violetred4", 139, 34, 82 }, - { "wheat", 245, 222, 179 }, - { "wheat1", 255, 231, 186 }, - { "wheat2", 238, 216, 174 }, - { "wheat3", 205, 186, 150 }, - { "wheat4", 139, 126, 102 }, - { "white", 255, 255, 255 }, - { "whitesmoke", 245, 245, 245 }, - { "yellow", 255, 255, 0 }, - { "yellow1", 255, 255, 0 }, - { "yellow2", 238, 238, 0 }, - { "yellow3", 205, 205, 0 }, - { "yellow4", 139, 139, 0 }, - { "yellowgreen", 154, 205, 50 } -}; - - -BOOL DLL_CALLCONV -FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue) { - int i; - - // lookup color - i = FreeImage_LookupNamedColor(szColor, X11ColorMap, sizeof(X11ColorMap)/sizeof(X11ColorMap[0])); - if (i >= 0) { - *nRed = X11ColorMap[i].r; - *nGreen = X11ColorMap[i].g; - *nBlue = X11ColorMap[i].b; - return TRUE; - } - - // not found, try for grey color with attached percent value - if ( (szColor[0] == 'g' || szColor[0] == 'G') && - (szColor[1] == 'r' || szColor[1] == 'R') && - (szColor[2] == 'e' || szColor[2] == 'E' || szColor[2] == 'a' || szColor[2] == 'A' ) && - (szColor[3] == 'y' || szColor[3] == 'Y' ) ) { - - // grey, or gray, num 1...100 - i = strtol(szColor+4, NULL, 10); - *nRed = (BYTE)(255.0/100.0 * i); - *nGreen = *nRed; - *nBlue = *nRed; - - return TRUE; - } - - // not found at all - *nRed = 0; - *nGreen = 0; - *nBlue = 0; - - return FALSE; -} - -// ========================================================== -// SVG Color name lookup - -/** - These are the colors defined in the SVG standard (I haven't checked - the final recommendation for changes) -*/ -static NamedColor SVGColorMap[] = { - { "aliceblue", 240, 248, 255 }, - { "antiquewhite", 250, 235, 215 }, - { "aqua", 0, 255, 255 }, - { "aquamarine", 127, 255, 212 }, - { "azure", 240, 255, 255 }, - { "beige", 245, 245, 220 }, - { "bisque", 255, 228, 196 }, - { "black", 0, 0, 0 }, - { "blanchedalmond", 255, 235, 205 }, - { "blue", 0, 0, 255 }, - { "blueviolet", 138, 43, 226 }, - { "brown", 165, 42, 42 }, - { "burlywood", 222, 184, 135 }, - { "cadetblue", 95, 158, 160 }, - { "chartreuse", 127, 255, 0 }, - { "chocolate", 210, 105, 30 }, - { "coral", 255, 127, 80 }, - { "cornflowerblue", 100, 149, 237 }, - { "cornsilk", 255, 248, 220 }, - { "crimson", 220, 20, 60 }, - { "cyan", 0, 255, 255 }, - { "darkblue", 0, 0, 139 }, - { "darkcyan", 0, 139, 139 }, - { "darkgoldenrod", 184, 134, 11 }, - { "darkgray", 169, 169, 169 }, - { "darkgreen", 0, 100, 0 }, - { "darkgrey", 169, 169, 169 }, - { "darkkhaki", 189, 183, 107 }, - { "darkmagenta", 139, 0, 139 }, - { "darkolivegreen", 85, 107, 47 }, - { "darkorange", 255, 140, 0 }, - { "darkorchid", 153, 50, 204 }, - { "darkred", 139, 0, 0 }, - { "darksalmon", 233, 150, 122 }, - { "darkseagreen", 143, 188, 143 }, - { "darkslateblue", 72, 61, 139 }, - { "darkslategray", 47, 79, 79 }, - { "darkslategrey", 47, 79, 79 }, - { "darkturquoise", 0, 206, 209 }, - { "darkviolet", 148, 0, 211 }, - { "deeppink", 255, 20, 147 }, - { "deepskyblue", 0, 191, 255 }, - { "dimgray", 105, 105, 105 }, - { "dimgrey", 105, 105, 105 }, - { "dodgerblue", 30, 144, 255 }, - { "firebrick", 178, 34, 34 }, - { "floralwhite", 255, 250, 240 }, - { "forestgreen", 34, 139, 34 }, - { "fuchsia", 255, 0, 255 }, - { "gainsboro", 220, 220, 220 }, - { "ghostwhite", 248, 248, 255 }, - { "gold", 255, 215, 0 }, - { "goldenrod", 218, 165, 32 }, - { "gray", 128, 128, 128 }, - { "green", 0, 128, 0 }, - { "greenyellow", 173, 255, 47 }, - { "grey", 128, 128, 128 }, - { "honeydew", 240, 255, 240 }, - { "hotpink", 255, 105, 180 }, - { "indianred", 205, 92, 92 }, - { "indigo", 75, 0, 130 }, - { "ivory", 255, 255, 240 }, - { "khaki", 240, 230, 140 }, - { "lavender", 230, 230, 250 }, - { "lavenderblush", 255, 240, 245 }, - { "lawngreen", 124, 252, 0 }, - { "lemonchiffon", 255, 250, 205 }, - { "lightblue", 173, 216, 230 }, - { "lightcoral", 240, 128, 128 }, - { "lightcyan", 224, 255, 255 }, - { "lightgoldenrodyellow", 250, 250, 210 }, - { "lightgray", 211, 211, 211 }, - { "lightgreen", 144, 238, 144 }, - { "lightgrey", 211, 211, 211 }, - { "lightpink", 255, 182, 193 }, - { "lightsalmon", 255, 160, 122 }, - { "lightseagreen", 32, 178, 170 }, - { "lightskyblue", 135, 206, 250 }, - { "lightslategray", 119, 136, 153 }, - { "lightslategrey", 119, 136, 153 }, - { "lightsteelblue", 176, 196, 222 }, - { "lightyellow", 255, 255, 224 }, - { "lime", 0, 255, 0 }, - { "limegreen", 50, 205, 50 }, - { "linen", 250, 240, 230 }, - { "magenta", 255, 0, 255 }, - { "maroon", 128, 0, 0 }, - { "mediumaquamarine", 102, 205, 170 }, - { "mediumblue", 0, 0, 205 }, - { "mediumorchid", 186, 85, 211 }, - { "mediumpurple", 147, 112, 219 }, - { "mediumseagreen", 60, 179, 113 }, - { "mediumslateblue", 123, 104, 238 }, - { "mediumspringgreen", 0, 250, 154 }, - { "mediumturquoise", 72, 209, 204 }, - { "mediumvioletred", 199, 21, 133 }, - { "midnightblue", 25, 25, 112 }, - { "mintcream", 245, 255, 250 }, - { "mistyrose", 255, 228, 225 }, - { "moccasin", 255, 228, 181 }, - { "navajowhite", 255, 222, 173 }, - { "navy", 0, 0, 128 }, - { "oldlace", 253, 245, 230 }, - { "olive", 128, 128, 0 }, - { "olivedrab", 107, 142, 35 }, - { "orange", 255, 165, 0 }, - { "orangered", 255, 69, 0 }, - { "orchid", 218, 112, 214 }, - { "palegoldenrod", 238, 232, 170 }, - { "palegreen", 152, 251, 152 }, - { "paleturquoise", 175, 238, 238 }, - { "palevioletred", 219, 112, 147 }, - { "papayawhip", 255, 239, 213 }, - { "peachpuff", 255, 218, 185 }, - { "peru", 205, 133, 63 }, - { "pink", 255, 192, 203 }, - { "plum", 221, 160, 221 }, - { "powderblue", 176, 224, 230 }, - { "purple", 128, 0, 128 }, - { "red", 255, 0, 0 }, - { "rosybrown", 188, 143, 143 }, - { "royalblue", 65, 105, 225 }, - { "saddlebrown", 139, 69, 19 }, - { "salmon", 250, 128, 114 }, - { "sandybrown", 244, 164, 96 }, - { "seagreen", 46, 139, 87 }, - { "seashell", 255, 245, 238 }, - { "sienna", 160, 82, 45 }, - { "silver", 192, 192, 192 }, - { "skyblue", 135, 206, 235 }, - { "slateblue", 106, 90, 205 }, - { "slategray", 112, 128, 144 }, - { "slategrey", 112, 128, 144 }, - { "snow", 255, 250, 250 }, - { "springgreen", 0, 255, 127 }, - { "steelblue", 70, 130, 180 }, - { "tan", 210, 180, 140 }, - { "teal", 0, 128, 128 }, - { "thistle", 216, 191, 216 }, - { "tomato", 255, 99, 71 }, - { "turquoise", 64, 224, 208 }, - { "violet", 238, 130, 238 }, - { "wheat", 245, 222, 179 }, - { "white", 255, 255, 255 }, - { "whitesmoke", 245, 245, 245 }, - { "yellow", 255, 255, 0 }, - { "yellowgreen", 154, 205, 50 } -}; - - -BOOL DLL_CALLCONV -FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue) { - int i; - - // lookup color - i = FreeImage_LookupNamedColor(szColor, SVGColorMap, sizeof(SVGColorMap)/sizeof(SVGColorMap[0])); - if (i >= 0) { - *nRed = SVGColorMap[i].r; - *nGreen = SVGColorMap[i].g; - *nBlue = SVGColorMap[i].b; - return TRUE; - } - - // not found, try for grey color with attached percent value - if ( (szColor[0] == 'g' || szColor[0] == 'G') && - (szColor[1] == 'r' || szColor[1] == 'R') && - (szColor[2] == 'e' || szColor[2] == 'E' || szColor[2] == 'a' || szColor[2] == 'A' ) && - (szColor[3] == 'y' || szColor[3] == 'Y' ) ) { - - // grey, or gray, num 1...100 - i = strtol(szColor+4, NULL, 10); - *nRed = (BYTE)(255.0/100.0 * i); - *nGreen = *nRed; - *nBlue = *nRed; - return TRUE; - } - - // not found at all - *nRed = 0; - *nGreen = 0; - *nBlue = 0; - - return FALSE; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/Conversion.cpp b/Dependencies/FreeImage/Source/FreeImage/Conversion.cpp deleted file mode 100644 index a3505b4..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/Conversion.cpp +++ /dev/null @@ -1,561 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Hervé Drolon (drolon@infonie.fr) -// - Jani Kajala (janik@remedy.fi) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// - Carsten Klein (cklein05@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "Quantizers.h" - -// ---------------------------------------------------------- - -#define CONVERT(from, to) case to : FreeImage_ConvertLine##from##To##to(bits, scanline, FreeImage_GetWidth(dib)); break; - -#define CONVERTWITHPALETTE(from, to) case to : FreeImage_ConvertLine##from##To##to(bits, scanline, FreeImage_GetWidth(dib), FreeImage_GetPalette(dib)); break; - -#define CONVERTTO32WITHPALETTE(from) case 32 : \ - if (bIsTransparent) { \ - FreeImage_ConvertLine##from##To32MapTransparency(bits, scanline, FreeImage_GetWidth(dib), FreeImage_GetPalette(dib), FreeImage_GetTransparencyTable(dib), FreeImage_GetTransparencyCount(dib)); \ - } else { \ - FreeImage_ConvertLine##from##To32(bits, scanline, FreeImage_GetWidth(dib), FreeImage_GetPalette(dib)); \ - } \ - break; - -#define CONVERTTO16(from) \ - case 16 : \ - if ((red_mask == FI16_555_RED_MASK) && (green_mask == FI16_555_GREEN_MASK) && (blue_mask == FI16_555_BLUE_MASK)) { \ - FreeImage_ConvertLine##from##To16_555(bits, scanline, FreeImage_GetWidth(dib)); \ - } else { \ - FreeImage_ConvertLine##from##To16_565(bits, scanline, FreeImage_GetWidth(dib)); \ - } \ - break; - -#define CONVERTTO16WITHPALETTE(from) \ - case 16 : \ - if ((red_mask == FI16_555_RED_MASK) && (green_mask == FI16_555_GREEN_MASK) && (blue_mask == FI16_555_BLUE_MASK)) { \ - FreeImage_ConvertLine##from##To16_555(bits, scanline, FreeImage_GetWidth(dib), FreeImage_GetPalette(dib)); \ - } else { \ - FreeImage_ConvertLine##from##To16_565(bits, scanline, FreeImage_GetWidth(dib), FreeImage_GetPalette(dib)); \ - } \ - break; - -// ========================================================== -// Utility functions declared in Utilities.h - -BOOL SwapRedBlue32(FIBITMAP* dib) { - if(FreeImage_GetImageType(dib) != FIT_BITMAP) { - return FALSE; - } - - const unsigned bytesperpixel = FreeImage_GetBPP(dib) / 8; - if(bytesperpixel > 4 || bytesperpixel < 3) { - return FALSE; - } - - const unsigned height = FreeImage_GetHeight(dib); - const unsigned pitch = FreeImage_GetPitch(dib); - const unsigned lineSize = FreeImage_GetLine(dib); - - BYTE* line = FreeImage_GetBits(dib); - for(unsigned y = 0; y < height; ++y, line += pitch) { - for(BYTE* pixel = line; pixel < line + lineSize ; pixel += bytesperpixel) { - INPLACESWAP(pixel[0], pixel[2]); - } - } - - return TRUE; -} - -// ---------------------------------------------------------- - -static inline void -assignRGB(WORD r, WORD g, WORD b, WORD* out) { - out[0] = r; - out[1] = g; - out[2] = b; -} - -static inline void -assignRGB(BYTE r, BYTE g, BYTE b, BYTE* out) { - out[FI_RGBA_RED] = r; - out[FI_RGBA_GREEN] = g; - out[FI_RGBA_BLUE] = b; -} - -/** -CMYK -> CMY -> RGB conversion from http://www.easyrgb.com/ - -CMYK to CMY [0-1]: C,M,Y * (1 - K) + K -CMY to RGB [0-1]: (1 - C,M,Y) - -=> R,G,B = (1 - C,M,Y) * (1 - K) -mapped to [0-MAX_VAL]: -(MAX_VAL - C,M,Y) * (MAX_VAL - K) / MAX_VAL -*/ -template -static inline void -CMYKToRGB(T C, T M, T Y, T K, T* out) { - unsigned max_val = std::numeric_limits::max(); - - unsigned r = (max_val - C) * (max_val - K) / max_val; - unsigned g = (max_val - M) * (max_val - K) / max_val; - unsigned b = (max_val - Y) * (max_val - K) / max_val; - - // clamp values to [0..max_val] - T red = (T)CLAMP(r, (unsigned)0, max_val); - T green = (T)CLAMP(g, (unsigned)0, max_val); - T blue = (T)CLAMP(b, (unsigned)0, max_val); - - assignRGB(red, green, blue, out); -} - -template -static void -_convertCMYKtoRGBA(unsigned width, unsigned height, BYTE* line_start, unsigned pitch, unsigned samplesperpixel) { - const BOOL hasBlack = (samplesperpixel > 3) ? TRUE : FALSE; - const T MAX_VAL = std::numeric_limits::max(); - - T K = 0; - for(unsigned y = 0; y < height; y++) { - T *line = (T*)line_start; - - for(unsigned x = 0; x < width; x++) { - if(hasBlack) { - K = line[FI_RGBA_ALPHA]; - line[FI_RGBA_ALPHA] = MAX_VAL; // TODO write the first extra channel as alpha! - } - - CMYKToRGB(line[0], line[1], line[2], K, line); - - line += samplesperpixel; - } - line_start += pitch; - } -} - -BOOL -ConvertCMYKtoRGBA(FIBITMAP* dib) { - if(!FreeImage_HasPixels(dib)) { - return FALSE; - } - - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - const unsigned bytesperpixel = FreeImage_GetBPP(dib)/8; - - unsigned channelSize = 1; - if (image_type == FIT_RGBA16 || image_type == FIT_RGB16) { - channelSize = sizeof(WORD); - } else if (!(image_type == FIT_BITMAP && (bytesperpixel > 2))) { - return FALSE; - } - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - BYTE *line_start = FreeImage_GetScanLine(dib, 0); - const unsigned pitch = FreeImage_GetPitch(dib); - - unsigned samplesperpixel = FreeImage_GetLine(dib) / width / channelSize; - - if(channelSize == sizeof(WORD)) { - _convertCMYKtoRGBA(width, height, line_start, pitch, samplesperpixel); - } else { - _convertCMYKtoRGBA(width, height, line_start, pitch, samplesperpixel); - } - - return TRUE; -} - -// ---------------------------------------------------------- - -/** -CIELab -> XYZ conversion from http://www.easyrgb.com/ -*/ -static void -CIELabToXYZ(float L, float a, float b, float *X, float *Y, float *Z) { - float pow_3; - - // CIELab -> XYZ conversion - // ------------------------ - float var_Y = (L + 16.F ) / 116.F; - float var_X = a / 500.F + var_Y; - float var_Z = var_Y - b / 200.F; - - pow_3 = powf(var_Y, 3); - if(pow_3 > 0.008856F) { - var_Y = pow_3; - } else { - var_Y = ( var_Y - 16.F / 116.F ) / 7.787F; - } - pow_3 = powf(var_X, 3); - if(pow_3 > 0.008856F) { - var_X = pow_3; - } else { - var_X = ( var_X - 16.F / 116.F ) / 7.787F; - } - pow_3 = powf(var_Z, 3); - if(pow_3 > 0.008856F) { - var_Z = pow_3; - } else { - var_Z = ( var_Z - 16.F / 116.F ) / 7.787F; - } - - static const float ref_X = 95.047F; - static const float ref_Y = 100.000F; - static const float ref_Z = 108.883F; - - *X = ref_X * var_X; // ref_X = 95.047 (Observer= 2°, Illuminant= D65) - *Y = ref_Y * var_Y; // ref_Y = 100.000 - *Z = ref_Z * var_Z; // ref_Z = 108.883 -} - -/** -XYZ -> RGB conversion from http://www.easyrgb.com/ -*/ -static void -XYZToRGB(float X, float Y, float Z, float *R, float *G, float *B) { - float var_X = X / 100; // X from 0 to 95.047 (Observer = 2°, Illuminant = D65) - float var_Y = Y / 100; // Y from 0 to 100.000 - float var_Z = Z / 100; // Z from 0 to 108.883 - - float var_R = var_X * 3.2406F + var_Y * -1.5372F + var_Z * -0.4986F; - float var_G = var_X * -0.9689F + var_Y * 1.8758F + var_Z * 0.0415F; - float var_B = var_X * 0.0557F + var_Y * -0.2040F + var_Z * 1.0570F; - - float exponent = 1.F / 2.4F; - - if(var_R > 0.0031308F) { - var_R = 1.055F * powf(var_R, exponent) - 0.055F; - } else { - var_R = 12.92F * var_R; - } - if(var_G > 0.0031308F) { - var_G = 1.055F * powf(var_G, exponent) - 0.055F; - } else { - var_G = 12.92F * var_G; - } - if(var_B > 0.0031308F) { - var_B = 1.055F * powf(var_B, exponent) - 0.055F; - } else { - var_B = 12.92F * var_B; - } - - *R = var_R; - *G = var_G; - *B = var_B; -} - -template -static void -CIELabToRGB(float L, float a, float b, T *rgb) { - float X, Y, Z; - float R, G, B; - const float max_val = std::numeric_limits::max(); - - CIELabToXYZ(L, a, b, &X, &Y, &Z); - XYZToRGB(X, Y, Z, &R, &G, &B); - - // clamp values to [0..max_val] - T red = (T)CLAMP(R * max_val, 0.0F, max_val); - T green = (T)CLAMP(G * max_val, 0.0F, max_val); - T blue = (T)CLAMP(B * max_val, 0.0F, max_val); - - assignRGB(red, green, blue, rgb); -} - -template -static void -_convertLABtoRGB(unsigned width, unsigned height, BYTE* line_start, unsigned pitch, unsigned samplesperpixel) { - const unsigned max_val = std::numeric_limits::max(); - const float sL = 100.F / max_val; - const float sa = 256.F / max_val; - const float sb = 256.F / max_val; - - for(unsigned y = 0; y < height; y++) { - T *line = (T*)line_start; - - for(unsigned x = 0; x < width; x++) { - CIELabToRGB(line[0]* sL, line[1]* sa - 128.F, line[2]* sb - 128.F, line); - - line += samplesperpixel; - } - line_start += pitch; - } -} - -BOOL -ConvertLABtoRGB(FIBITMAP* dib) { - if(!FreeImage_HasPixels(dib)) { - return FALSE; - } - - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - const unsigned bytesperpixel = FreeImage_GetBPP(dib) / 8; - - unsigned channelSize = 1; - if (image_type == FIT_RGBA16 || image_type == FIT_RGB16) { - channelSize = sizeof(WORD); - } else if (!(image_type == FIT_BITMAP && (bytesperpixel > 2))) { - return FALSE; - } - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - BYTE *line_start = FreeImage_GetScanLine(dib, 0); - const unsigned pitch = FreeImage_GetPitch(dib); - - unsigned samplesperpixel = FreeImage_GetLine(dib) / width / channelSize; - - if(channelSize == 1) { - _convertLABtoRGB(width, height, line_start, pitch, samplesperpixel); - } - else { - _convertLABtoRGB(width, height, line_start, pitch, samplesperpixel); - } - - return TRUE; -} - -// ---------------------------------------------------------- - -FIBITMAP* -RemoveAlphaChannel(FIBITMAP* src) { - - if(!FreeImage_HasPixels(src)) { - return NULL; - } - - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(src); - - switch(image_type) { - case FIT_BITMAP: - if(FreeImage_GetBPP(src) == 32) { - // convert to 24-bit - return FreeImage_ConvertTo24Bits(src); - } - break; - case FIT_RGBA16: - // convert to RGB16 - return FreeImage_ConvertToRGB16(src); - case FIT_RGBAF: - // convert to RGBF - return FreeImage_ConvertToRGBF(src); - default: - // unsupported image type - return NULL; - } - - return NULL; -} - - -// ========================================================== - -FIBITMAP * DLL_CALLCONV -FreeImage_ColorQuantize(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize) { - return FreeImage_ColorQuantizeEx(dib, quantize); -} - -FIBITMAP * DLL_CALLCONV -FreeImage_ColorQuantizeEx(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize, int PaletteSize, int ReserveSize, RGBQUAD *ReservePalette) { - if( PaletteSize < 2 ) PaletteSize = 2; - if( PaletteSize > 256 ) PaletteSize = 256; - if( ReserveSize < 0 ) ReserveSize = 0; - if( ReserveSize > PaletteSize ) ReserveSize = PaletteSize; - if (FreeImage_HasPixels(dib)) { - const unsigned bpp = FreeImage_GetBPP(dib); - if((FreeImage_GetImageType(dib) == FIT_BITMAP) && (bpp == 24 || bpp == 32)) { - switch(quantize) { - case FIQ_WUQUANT : - { - try { - WuQuantizer Q (dib); - FIBITMAP *dst = Q.Quantize(PaletteSize, ReserveSize, ReservePalette); - if(dst) { - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, dib); - } - return dst; - } catch (const char *) { - return NULL; - } - break; - } - case FIQ_NNQUANT : - { - if (bpp == 32) { - // 32-bit images not supported by NNQUANT - return NULL; - } - // sampling factor in range 1..30. - // 1 => slower (but better), 30 => faster. Default value is 1 - const int sampling = 1; - - NNQuantizer Q(PaletteSize); - FIBITMAP *dst = Q.Quantize(dib, ReserveSize, ReservePalette, sampling); - if(dst) { - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, dib); - } - return dst; - } - case FIQ_LFPQUANT : - { - LFPQuantizer Q(PaletteSize); - FIBITMAP *dst = Q.Quantize(dib, ReserveSize, ReservePalette); - if(dst) { - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, dib); - } - return dst; - } - } - } - } - - return NULL; -} - -// ========================================================== - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertFromRawBitsEx(BOOL copySource, BYTE *bits, FREE_IMAGE_TYPE type, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown) { - FIBITMAP *dib = NULL; - - if(copySource) { - // allocate a FIBITMAP with internally managed pixel buffer - dib = FreeImage_AllocateT(type, width, height, bpp, red_mask, green_mask, blue_mask); - if(!dib) { - return NULL; - } - // copy user provided pixel buffer into the dib - const unsigned linesize = FreeImage_GetLine(dib); - for(int y = 0; y < height; y++) { - memcpy(FreeImage_GetScanLine(dib, y), bits, linesize); - // next line in user's buffer - bits += pitch; - } - // flip pixels vertically if needed - if(topdown) { - FreeImage_FlipVertical(dib); - } - } - else { - // allocate a FIBITMAP using a wrapper to user provided pixel buffer - dib = FreeImage_AllocateHeaderForBits(bits, pitch, type, width, height, bpp, red_mask, green_mask, blue_mask); - if(!dib) { - return NULL; - } - // flip pixels vertically if needed - if(topdown) { - FreeImage_FlipVertical(dib); - } - } - - return dib; -} - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertFromRawBits(BYTE *bits, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown) { - return FreeImage_ConvertFromRawBitsEx(TRUE /* copySource */, bits, FIT_BITMAP, width, height, pitch, bpp, red_mask, green_mask, blue_mask, topdown); -} - -void DLL_CALLCONV -FreeImage_ConvertToRawBits(BYTE *bits, FIBITMAP *dib, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown) { - if (FreeImage_HasPixels(dib) && (bits != NULL)) { - for (unsigned i = 0; i < FreeImage_GetHeight(dib); ++i) { - BYTE *scanline = FreeImage_GetScanLine(dib, topdown ? (FreeImage_GetHeight(dib) - i - 1) : i); - - if ((bpp == 16) && (FreeImage_GetBPP(dib) == 16)) { - // convert 555 to 565 or vice versa - - if ((red_mask == FI16_555_RED_MASK) && (green_mask == FI16_555_GREEN_MASK) && (blue_mask == FI16_555_BLUE_MASK)) { - if ((FreeImage_GetRedMask(dib) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_565_BLUE_MASK)) { - FreeImage_ConvertLine16_565_To16_555(bits, scanline, FreeImage_GetWidth(dib)); - } else { - memcpy(bits, scanline, FreeImage_GetLine(dib)); - } - } else { - if ((FreeImage_GetRedMask(dib) == FI16_555_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_555_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_555_BLUE_MASK)) { - FreeImage_ConvertLine16_555_To16_565(bits, scanline, FreeImage_GetWidth(dib)); - } else { - memcpy(bits, scanline, FreeImage_GetLine(dib)); - } - } - } else if (FreeImage_GetBPP(dib) != bpp) { - BOOL bIsTransparent = FreeImage_IsTransparent(dib); - switch(FreeImage_GetBPP(dib)) { - case 1 : - switch(bpp) { - CONVERT(1, 8) - CONVERTTO16WITHPALETTE(1) - CONVERTWITHPALETTE(1, 24) - CONVERTTO32WITHPALETTE(1) - } - - break; - - case 4 : - switch(bpp) { - CONVERT(4, 8) - CONVERTTO16WITHPALETTE(4) - CONVERTWITHPALETTE(4, 24) - CONVERTTO32WITHPALETTE(4) - } - - break; - - case 8 : - switch(bpp) { - CONVERTTO16WITHPALETTE(8) - CONVERTWITHPALETTE(8, 24) - CONVERTTO32WITHPALETTE(8) - } - - break; - - case 24 : - switch(bpp) { - CONVERT(24, 8) - CONVERTTO16(24) - CONVERT(24, 32) - } - - break; - - case 32 : - switch(bpp) { - CONVERT(32, 8) - CONVERTTO16(32) - CONVERT(32, 24) - } - - break; - } - } else { - memcpy(bits, scanline, FreeImage_GetLine(dib)); - } - - bits += pitch; - } - } -} diff --git a/Dependencies/FreeImage/Source/FreeImage/Conversion16_555.cpp b/Dependencies/FreeImage/Source/FreeImage/Conversion16_555.cpp deleted file mode 100644 index abaf2f1..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/Conversion16_555.cpp +++ /dev/null @@ -1,209 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// - Jani Kajala (janik@remedy.fi) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- - -#define RGB555(b, g, r) ((((b) >> 3) << FI16_555_BLUE_SHIFT) | (((g) >> 3) << FI16_555_GREEN_SHIFT) | (((r) >> 3) << FI16_555_RED_SHIFT)) - -// ---------------------------------------------------------- -// internal conversions X to 16 bits (555) -// ---------------------------------------------------------- - -void DLL_CALLCONV -FreeImage_ConvertLine1To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - WORD *new_bits = (WORD *)target; - - for (int cols = 0; cols < width_in_pixels; cols++) { - int index = (source[cols >> 3] & (0x80 >> (cols & 0x07))) != 0 ? 1 : 0; - - new_bits[cols] = RGB555(palette[index].rgbBlue, palette[index].rgbGreen, palette[index].rgbRed); - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine4To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - WORD *new_bits = (WORD *)target; - BOOL lonibble = FALSE; - int x = 0; - - for (int cols = 0; cols < width_in_pixels; cols++) { - RGBQUAD *grab_palette; - - if (lonibble) { - grab_palette = palette + LOWNIBBLE(source[x++]); - } else { - grab_palette = palette + (HINIBBLE(source[x]) >> 4); - } - - new_bits[cols] = RGB555(grab_palette->rgbBlue, grab_palette->rgbGreen, grab_palette->rgbRed); - - lonibble = !lonibble; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine8To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - WORD *new_bits = (WORD *)target; - - for (int cols = 0; cols < width_in_pixels; cols++) { - RGBQUAD *grab_palette = palette + source[cols]; - - new_bits[cols] = RGB555(grab_palette->rgbBlue, grab_palette->rgbGreen, grab_palette->rgbRed); - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine16_565_To16_555(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *src_bits = (WORD *)source; - WORD *new_bits = (WORD *)target; - - for (int cols = 0; cols < width_in_pixels; cols++) { - new_bits[cols] = RGB555((((src_bits[cols] & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT) * 0xFF) / 0x1F, - (((src_bits[cols] & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT) * 0xFF) / 0x3F, - (((src_bits[cols] & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT) * 0xFF) / 0x1F); - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine24To16_555(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *new_bits = (WORD *)target; - - for (int cols = 0; cols < width_in_pixels; cols++) { - new_bits[cols] = RGB555(source[FI_RGBA_BLUE], source[FI_RGBA_GREEN], source[FI_RGBA_RED]); - - source += 3; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine32To16_555(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *new_bits = (WORD *)target; - - for (int cols = 0; cols < width_in_pixels; cols++) { - new_bits[cols] = RGB555(source[FI_RGBA_BLUE], source[FI_RGBA_GREEN], source[FI_RGBA_RED]); - - source += 4; - } -} - -// ---------------------------------------------------------- -// smart convert X to 16 bits -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertTo16Bits555(FIBITMAP *dib) { - if(!FreeImage_HasPixels(dib) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) return NULL; - - const int width = FreeImage_GetWidth(dib); - const int height = FreeImage_GetHeight(dib); - const int bpp = FreeImage_GetBPP(dib); - - if(bpp == 16) { - if ((FreeImage_GetRedMask(dib) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_565_BLUE_MASK)) { - // RGB 565 - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 16, FI16_555_RED_MASK, FI16_555_GREEN_MASK, FI16_555_BLUE_MASK); - if(new_dib == NULL) { - return NULL; - } - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine16_565_To16_555(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - return new_dib; - } else { - // RGB 555 - return FreeImage_Clone(dib); - } - } - else { - // other bpp cases => convert to RGB 555 - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 16, FI16_555_RED_MASK, FI16_555_GREEN_MASK, FI16_555_BLUE_MASK); - if(new_dib == NULL) { - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - switch (bpp) { - case 1 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine1To16_555(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - - return new_dib; - } - - case 4 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine4To16_555(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - - return new_dib; - } - - case 8 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine8To16_555(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - - return new_dib; - } - - case 24 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine24To16_555(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - - return new_dib; - } - - case 32 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine32To16_555(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - - return new_dib; - } - - default : - // unreachable code ... - FreeImage_Unload(new_dib); - break; - - } - } - - return NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/Conversion16_565.cpp b/Dependencies/FreeImage/Source/FreeImage/Conversion16_565.cpp deleted file mode 100644 index eb3dd9d..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/Conversion16_565.cpp +++ /dev/null @@ -1,204 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// - Jani Kajala (janik@remedy.fi) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// internal conversions X to 16 bits (565) -// ---------------------------------------------------------- - -void DLL_CALLCONV -FreeImage_ConvertLine1To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - WORD *new_bits = (WORD *)target; - - for (int cols = 0; cols < width_in_pixels; cols++) { - int index = (source[cols >> 3] & (0x80 >> (cols & 0x07))) != 0 ? 1 : 0; - - new_bits[cols] = RGB565(palette[index].rgbBlue, palette[index].rgbGreen, palette[index].rgbRed); - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine4To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - WORD *new_bits = (WORD *)target; - BOOL lonibble = FALSE; - int x = 0; - - for (int cols = 0; cols < width_in_pixels; cols++) { - RGBQUAD *grab_palette; - - if (lonibble) { - grab_palette = palette + LOWNIBBLE(source[x++]); - } else { - grab_palette = palette + (HINIBBLE(source[x]) >> 4); - } - - new_bits[cols] = RGB565(grab_palette->rgbBlue, grab_palette->rgbGreen, grab_palette->rgbRed); - - lonibble = !lonibble; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine8To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - WORD *new_bits = (WORD *)target; - - for (int cols = 0; cols < width_in_pixels; cols++) { - RGBQUAD *grab_palette = palette + source[cols]; - - new_bits[cols] = RGB565(grab_palette->rgbBlue, grab_palette->rgbGreen, grab_palette->rgbRed); - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine16_555_To16_565(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *src_bits = (WORD *)source; - WORD *new_bits = (WORD *)target; - - for (int cols = 0; cols < width_in_pixels; cols++) { - new_bits[cols] = RGB565((((src_bits[cols] & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) * 0xFF) / 0x1F, - (((src_bits[cols] & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) * 0xFF) / 0x1F, - (((src_bits[cols] & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) * 0xFF) / 0x1F); - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine24To16_565(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *new_bits = (WORD *)target; - - for (int cols = 0; cols < width_in_pixels; cols++) { - new_bits[cols] = RGB565(source[FI_RGBA_BLUE], source[FI_RGBA_GREEN], source[FI_RGBA_RED]); - - source += 3; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine32To16_565(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *new_bits = (WORD *)target; - - for (int cols = 0; cols < width_in_pixels; cols++) { - new_bits[cols] = RGB565(source[FI_RGBA_BLUE], source[FI_RGBA_GREEN], source[FI_RGBA_RED]); - - source += 4; - } -} - -// ---------------------------------------------------------- -// smart convert X to 16 bits (565) -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertTo16Bits565(FIBITMAP *dib) { - if(!FreeImage_HasPixels(dib) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) return NULL; - - const int width = FreeImage_GetWidth(dib); - const int height = FreeImage_GetHeight(dib); - const int bpp = FreeImage_GetBPP(dib); - - if(bpp == 16) { - if ((FreeImage_GetRedMask(dib) == FI16_555_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_555_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_555_BLUE_MASK)) { - // RGB 555 - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 16, FI16_565_RED_MASK, FI16_565_GREEN_MASK, FI16_565_BLUE_MASK); - if(new_dib == NULL) { - return NULL; - } - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine16_555_To16_565(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - return new_dib; - } else { - // RGB 565 - return FreeImage_Clone(dib); - } - } - else { - // other bpp cases => convert to RGB 565 - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 16, FI16_565_RED_MASK, FI16_565_GREEN_MASK, FI16_565_BLUE_MASK); - if(new_dib == NULL) { - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - switch (bpp) { - case 1 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine1To16_565(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - - return new_dib; - } - - case 4 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine4To16_565(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - - return new_dib; - } - - case 8 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine8To16_565(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - - return new_dib; - } - - case 24 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine24To16_565(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - - return new_dib; - } - - case 32 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine32To16_565(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - - return new_dib; - } - - default : - // unreachable code ... - FreeImage_Unload(new_dib); - break; - } - } - - return NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/Conversion24.cpp b/Dependencies/FreeImage/Source/FreeImage/Conversion24.cpp deleted file mode 100644 index 3b7a800..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/Conversion24.cpp +++ /dev/null @@ -1,252 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Dale Larson (dlarson@norsesoft.com) -// - Herv Drolon (drolon@infonie.fr) -// - Jani Kajala (janik@remedy.fi) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// internal conversions X to 24 bits -// ---------------------------------------------------------- - -void DLL_CALLCONV -FreeImage_ConvertLine1To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - for (int cols = 0; cols < width_in_pixels; cols++) { - BYTE index = (source[cols >> 3] & (0x80 >> (cols & 0x07))) != 0 ? 1 : 0; - - target[FI_RGBA_BLUE] = palette[index].rgbBlue; - target[FI_RGBA_GREEN] = palette[index].rgbGreen; - target[FI_RGBA_RED] = palette[index].rgbRed; - - target += 3; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine4To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - BOOL low_nibble = FALSE; - int x = 0; - - for (int cols = 0; cols < width_in_pixels; ++cols ) { - if (low_nibble) { - target[FI_RGBA_BLUE] = palette[LOWNIBBLE(source[x])].rgbBlue; - target[FI_RGBA_GREEN] = palette[LOWNIBBLE(source[x])].rgbGreen; - target[FI_RGBA_RED] = palette[LOWNIBBLE(source[x])].rgbRed; - - x++; - } else { - target[FI_RGBA_BLUE] = palette[HINIBBLE(source[x]) >> 4].rgbBlue; - target[FI_RGBA_GREEN] = palette[HINIBBLE(source[x]) >> 4].rgbGreen; - target[FI_RGBA_RED] = palette[HINIBBLE(source[x]) >> 4].rgbRed; - } - - low_nibble = !low_nibble; - - target += 3; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine8To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - for (int cols = 0; cols < width_in_pixels; cols++) { - target[FI_RGBA_BLUE] = palette[source[cols]].rgbBlue; - target[FI_RGBA_GREEN] = palette[source[cols]].rgbGreen; - target[FI_RGBA_RED] = palette[source[cols]].rgbRed; - - target += 3; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine16To24_555(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *bits = (WORD *)source; - - for (int cols = 0; cols < width_in_pixels; cols++) { - target[FI_RGBA_RED] = (BYTE)((((bits[cols] & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) * 0xFF) / 0x1F); - target[FI_RGBA_GREEN] = (BYTE)((((bits[cols] & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) * 0xFF) / 0x1F); - target[FI_RGBA_BLUE] = (BYTE)((((bits[cols] & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) * 0xFF) / 0x1F); - - target += 3; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine16To24_565(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *bits = (WORD *)source; - - for (int cols = 0; cols < width_in_pixels; cols++) { - target[FI_RGBA_RED] = (BYTE)((((bits[cols] & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT) * 0xFF) / 0x1F); - target[FI_RGBA_GREEN] = (BYTE)((((bits[cols] & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT) * 0xFF) / 0x3F); - target[FI_RGBA_BLUE] = (BYTE)((((bits[cols] & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT) * 0xFF) / 0x1F); - - target += 3; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine32To24(BYTE *target, BYTE *source, int width_in_pixels) { - for (int cols = 0; cols < width_in_pixels; cols++) { - target[FI_RGBA_BLUE] = source[FI_RGBA_BLUE]; - target[FI_RGBA_GREEN] = source[FI_RGBA_GREEN]; - target[FI_RGBA_RED] = source[FI_RGBA_RED]; - - target += 3; - source += 4; - } -} - -// ---------------------------------------------------------- -// smart convert X to 24 bits -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertTo24Bits(FIBITMAP *dib) { - if(!FreeImage_HasPixels(dib)) return NULL; - - const unsigned bpp = FreeImage_GetBPP(dib); - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - - if((image_type != FIT_BITMAP) && (image_type != FIT_RGB16) && (image_type != FIT_RGBA16)) { - return NULL; - } - - const int width = FreeImage_GetWidth(dib); - const int height = FreeImage_GetHeight(dib); - - if(image_type == FIT_BITMAP) { - if(bpp == 24) { - return FreeImage_Clone(dib); - } - - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(new_dib == NULL) { - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - switch(bpp) { - case 1 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine1To24(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - return new_dib; - } - - case 4 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine4To24(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - return new_dib; - } - - case 8 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine8To24(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - return new_dib; - } - - case 16 : - { - for (int rows = 0; rows < height; rows++) { - if ((FreeImage_GetRedMask(dib) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_565_BLUE_MASK)) { - FreeImage_ConvertLine16To24_565(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } else { - // includes case where all the masks are 0 - FreeImage_ConvertLine16To24_555(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - } - return new_dib; - } - - case 32 : - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine32To24(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - return new_dib; - } - } - - } else if(image_type == FIT_RGB16) { - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(new_dib == NULL) { - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - const unsigned src_pitch = FreeImage_GetPitch(dib); - const unsigned dst_pitch = FreeImage_GetPitch(new_dib); - const BYTE *src_bits = FreeImage_GetBits(dib); - BYTE *dst_bits = FreeImage_GetBits(new_dib); - for (int rows = 0; rows < height; rows++) { - const FIRGB16 *src_pixel = (FIRGB16*)src_bits; - RGBTRIPLE *dst_pixel = (RGBTRIPLE*)dst_bits; - for(int cols = 0; cols < width; cols++) { - dst_pixel[cols].rgbtRed = (BYTE)(src_pixel[cols].red >> 8); - dst_pixel[cols].rgbtGreen = (BYTE)(src_pixel[cols].green >> 8); - dst_pixel[cols].rgbtBlue = (BYTE)(src_pixel[cols].blue >> 8); - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - - return new_dib; - - } else if(image_type == FIT_RGBA16) { - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(new_dib == NULL) { - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - const unsigned src_pitch = FreeImage_GetPitch(dib); - const unsigned dst_pitch = FreeImage_GetPitch(new_dib); - const BYTE *src_bits = FreeImage_GetBits(dib); - BYTE *dst_bits = FreeImage_GetBits(new_dib); - for (int rows = 0; rows < height; rows++) { - const FIRGBA16 *src_pixel = (FIRGBA16*)src_bits; - RGBTRIPLE *dst_pixel = (RGBTRIPLE*)dst_bits; - for(int cols = 0; cols < width; cols++) { - dst_pixel[cols].rgbtRed = (BYTE)(src_pixel[cols].red >> 8); - dst_pixel[cols].rgbtGreen = (BYTE)(src_pixel[cols].green >> 8); - dst_pixel[cols].rgbtBlue = (BYTE)(src_pixel[cols].blue >> 8); - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - - return new_dib; - } - - return NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/Conversion32.cpp b/Dependencies/FreeImage/Source/FreeImage/Conversion32.cpp deleted file mode 100644 index de26abb..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/Conversion32.cpp +++ /dev/null @@ -1,345 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// - Jani Kajala (janik@remedy.fi) -// - Detlev Vendt (detlev.vendt@brillit.de) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// internal conversions X to 32 bits -// ---------------------------------------------------------- - -void DLL_CALLCONV -FreeImage_ConvertLine1To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - for (int cols = 0; cols < width_in_pixels; cols++) { - int index = (source[cols>>3] & (0x80 >> (cols & 0x07))) != 0 ? 1 : 0; - - target[FI_RGBA_BLUE] = palette[index].rgbBlue; - target[FI_RGBA_GREEN] = palette[index].rgbGreen; - target[FI_RGBA_RED] = palette[index].rgbRed; - target[FI_RGBA_ALPHA] = 0xFF; - target += 4; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine4To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - BOOL low_nibble = FALSE; - int x = 0; - - for (int cols = 0 ; cols < width_in_pixels ; ++cols) { - if (low_nibble) { - target[FI_RGBA_BLUE] = palette[LOWNIBBLE(source[x])].rgbBlue; - target[FI_RGBA_GREEN] = palette[LOWNIBBLE(source[x])].rgbGreen; - target[FI_RGBA_RED] = palette[LOWNIBBLE(source[x])].rgbRed; - - x++; - } else { - target[FI_RGBA_BLUE] = palette[HINIBBLE(source[x]) >> 4].rgbBlue; - target[FI_RGBA_GREEN] = palette[HINIBBLE(source[x]) >> 4].rgbGreen; - target[FI_RGBA_RED] = palette[HINIBBLE(source[x]) >> 4].rgbRed; - } - - low_nibble = !low_nibble; - - target[FI_RGBA_ALPHA] = 0xFF; - target += 4; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine8To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - for (int cols = 0; cols < width_in_pixels; cols++) { - target[FI_RGBA_BLUE] = palette[source[cols]].rgbBlue; - target[FI_RGBA_GREEN] = palette[source[cols]].rgbGreen; - target[FI_RGBA_RED] = palette[source[cols]].rgbRed; - target[FI_RGBA_ALPHA] = 0xFF; - target += 4; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine16To32_555(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *bits = (WORD *)source; - - for (int cols = 0; cols < width_in_pixels; cols++) { - target[FI_RGBA_RED] = (BYTE)((((bits[cols] & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) * 0xFF) / 0x1F); - target[FI_RGBA_GREEN] = (BYTE)((((bits[cols] & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) * 0xFF) / 0x1F); - target[FI_RGBA_BLUE] = (BYTE)((((bits[cols] & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) * 0xFF) / 0x1F); - target[FI_RGBA_ALPHA] = 0xFF; - target += 4; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine16To32_565(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *bits = (WORD *)source; - - for (int cols = 0; cols < width_in_pixels; cols++) { - target[FI_RGBA_RED] = (BYTE)((((bits[cols] & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT) * 0xFF) / 0x1F); - target[FI_RGBA_GREEN] = (BYTE)((((bits[cols] & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT) * 0xFF) / 0x3F); - target[FI_RGBA_BLUE] = (BYTE)((((bits[cols] & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT) * 0xFF) / 0x1F); - target[FI_RGBA_ALPHA] = 0xFF; - target += 4; - } -} -/* -void DLL_CALLCONV -FreeImage_ConvertLine24To32(BYTE *target, BYTE *source, int width_in_pixels) { - for (int cols = 0; cols < width_in_pixels; cols++) { - *(DWORD *)target = (*(DWORD *) source & FI_RGBA_RGB_MASK) | FI_RGBA_ALPHA_MASK; - target += 4; - source += 3; - } -} -*/ -/** -This unoptimized version of the conversion function avoid an undetermined bug with VC++ SP6. -The bug occurs in release mode only, when the image height is equal to 537 -(try e.g. a size of 432x537 to reproduce the bug with the optimized function). -*/ -void DLL_CALLCONV -FreeImage_ConvertLine24To32(BYTE *target, BYTE *source, int width_in_pixels) { - for (int cols = 0; cols < width_in_pixels; cols++) { - target[FI_RGBA_RED] = source[FI_RGBA_RED]; - target[FI_RGBA_GREEN] = source[FI_RGBA_GREEN]; - target[FI_RGBA_BLUE] = source[FI_RGBA_BLUE]; - target[FI_RGBA_ALPHA] = 0xFF; - target += 4; - source += 3; - } -} - -// ---------------------------------------------------------- - -void DLL_CALLCONV -FreeImage_ConvertLine1To32MapTransparency(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette, BYTE *table, int transparent_pixels) { - for (int cols = 0; cols < width_in_pixels; cols++) { - int index = (source[cols>>3] & (0x80 >> (cols & 0x07))) != 0 ? 1 : 0; - - target[FI_RGBA_BLUE] = palette[index].rgbBlue; - target[FI_RGBA_GREEN] = palette[index].rgbGreen; - target[FI_RGBA_RED] = palette[index].rgbRed; - target[FI_RGBA_ALPHA] = (index < transparent_pixels) ? table[index] : 255; - target += 4; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine4To32MapTransparency(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette, BYTE *table, int transparent_pixels) { - BOOL low_nibble = FALSE; - int x = 0; - - for (int cols = 0 ; cols < width_in_pixels ; ++cols) { - if (low_nibble) { - target[FI_RGBA_BLUE] = palette[LOWNIBBLE(source[x])].rgbBlue; - target[FI_RGBA_GREEN] = palette[LOWNIBBLE(source[x])].rgbGreen; - target[FI_RGBA_RED] = palette[LOWNIBBLE(source[x])].rgbRed; - target[FI_RGBA_ALPHA] = (LOWNIBBLE(source[x]) < transparent_pixels) ? table[LOWNIBBLE(source[x])] : 255; - - x++; - } else { - target[FI_RGBA_BLUE] = palette[HINIBBLE(source[x]) >> 4].rgbBlue; - target[FI_RGBA_GREEN] = palette[HINIBBLE(source[x]) >> 4].rgbGreen; - target[FI_RGBA_RED] = palette[HINIBBLE(source[x]) >> 4].rgbRed; - target[FI_RGBA_ALPHA] = (HINIBBLE(source[x] >> 4) < transparent_pixels) ? table[HINIBBLE(source[x]) >> 4] : 255; - } - - low_nibble = !low_nibble; - - target += 4; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine8To32MapTransparency(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette, BYTE *table, int transparent_pixels) { - for (int cols = 0; cols < width_in_pixels; cols++) { - target[FI_RGBA_BLUE] = palette[source[cols]].rgbBlue; - target[FI_RGBA_GREEN] = palette[source[cols]].rgbGreen; - target[FI_RGBA_RED] = palette[source[cols]].rgbRed; - target[FI_RGBA_ALPHA] = (source[cols] < transparent_pixels) ? table[source[cols]] : 255; - target += 4; - } -} - -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertTo32Bits(FIBITMAP *dib) { - if(!FreeImage_HasPixels(dib)) return NULL; - - const int bpp = FreeImage_GetBPP(dib); - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - - if((image_type != FIT_BITMAP) && (image_type != FIT_RGB16) && (image_type != FIT_RGBA16)) { - return NULL; - } - - const int width = FreeImage_GetWidth(dib); - const int height = FreeImage_GetHeight(dib); - - if(image_type == FIT_BITMAP) { - - if(bpp == 32) { - return FreeImage_Clone(dib); - } - - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 32, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(new_dib == NULL) { - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - BOOL bIsTransparent = FreeImage_IsTransparent(dib); - - switch(bpp) { - case 1: - { - if(bIsTransparent) { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine1To32MapTransparency(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib), FreeImage_GetTransparencyTable(dib), FreeImage_GetTransparencyCount(dib)); - } - } else { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine1To32(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - } - - return new_dib; - } - - case 4: - { - if(bIsTransparent) { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine4To32MapTransparency(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib), FreeImage_GetTransparencyTable(dib), FreeImage_GetTransparencyCount(dib)); - } - } else { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine4To32(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - } - - return new_dib; - } - - case 8: - { - if(bIsTransparent) { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine8To32MapTransparency(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib), FreeImage_GetTransparencyTable(dib), FreeImage_GetTransparencyCount(dib)); - } - } else { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine8To32(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - } - - return new_dib; - } - - case 16: - { - for (int rows = 0; rows < height; rows++) { - if ((FreeImage_GetRedMask(dib) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_565_BLUE_MASK)) { - FreeImage_ConvertLine16To32_565(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } else { - // includes case where all the masks are 0 - FreeImage_ConvertLine16To32_555(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - } - - return new_dib; - } - - case 24: - { - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine24To32(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - - return new_dib; - } - } - - } else if(image_type == FIT_RGB16) { - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 32, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(new_dib == NULL) { - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - const unsigned src_pitch = FreeImage_GetPitch(dib); - const unsigned dst_pitch = FreeImage_GetPitch(new_dib); - const BYTE *src_bits = FreeImage_GetBits(dib); - BYTE *dst_bits = FreeImage_GetBits(new_dib); - for (int rows = 0; rows < height; rows++) { - const FIRGB16 *src_pixel = (FIRGB16*)src_bits; - RGBQUAD *dst_pixel = (RGBQUAD*)dst_bits; - for(int cols = 0; cols < width; cols++) { - dst_pixel[cols].rgbRed = (BYTE)(src_pixel[cols].red >> 8); - dst_pixel[cols].rgbGreen = (BYTE)(src_pixel[cols].green >> 8); - dst_pixel[cols].rgbBlue = (BYTE)(src_pixel[cols].blue >> 8); - dst_pixel[cols].rgbReserved = (BYTE)0xFF; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - - return new_dib; - - } else if(image_type == FIT_RGBA16) { - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 32, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(new_dib == NULL) { - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - const unsigned src_pitch = FreeImage_GetPitch(dib); - const unsigned dst_pitch = FreeImage_GetPitch(new_dib); - const BYTE *src_bits = FreeImage_GetBits(dib); - BYTE *dst_bits = FreeImage_GetBits(new_dib); - for (int rows = 0; rows < height; rows++) { - const FIRGBA16 *src_pixel = (FIRGBA16*)src_bits; - RGBQUAD *dst_pixel = (RGBQUAD*)dst_bits; - for(int cols = 0; cols < width; cols++) { - dst_pixel[cols].rgbRed = (BYTE)(src_pixel[cols].red >> 8); - dst_pixel[cols].rgbGreen = (BYTE)(src_pixel[cols].green >> 8); - dst_pixel[cols].rgbBlue = (BYTE)(src_pixel[cols].blue >> 8); - dst_pixel[cols].rgbReserved = (BYTE)(src_pixel[cols].alpha >> 8); - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - - return new_dib; - } - - return NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/Conversion4.cpp b/Dependencies/FreeImage/Source/FreeImage/Conversion4.cpp deleted file mode 100644 index 13048b6..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/Conversion4.cpp +++ /dev/null @@ -1,246 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Riley McNiff (rmcniff@marexgroup.com) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// internal conversions X to 4 bits -// ---------------------------------------------------------- - -void DLL_CALLCONV -FreeImage_ConvertLine1To4(BYTE *target, BYTE *source, int width_in_pixels) { - BOOL hinibble = TRUE; - for (int cols = 0; cols < width_in_pixels; cols++){ - if (hinibble == TRUE){ - target[cols >> 1] = ((source[cols >> 3] & (0x80 >> (cols & 0x07))) != 0 ? 15 : 0) << 4; - } - else { - target[cols >> 1] |= ((source[cols >> 3] & (0x80 >> (cols & 0x07))) != 0 ? 15 : 0); - } - - hinibble = !hinibble; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine8To4(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette) { - BOOL hinibble = TRUE; - BYTE index; - - for (int cols = 0; cols < width_in_pixels; cols++){ - index = GREY(palette[source[cols]].rgbRed, palette[source[cols]].rgbGreen, palette[source[cols]].rgbBlue); - if (hinibble) { - target[cols >> 1] = (index & 0xF0); - } else { - target[cols >> 1] |= (index >> 4); - } - - hinibble = !hinibble; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine16To4_555(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *bits = (WORD *)source; - BOOL hinibble = TRUE; - - for (int cols = 0; cols < width_in_pixels; cols++) { - if (hinibble) { - target[cols >> 1] = GREY((((bits[cols] & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) * 0xFF) / 0x1F, - (((bits[cols] & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) * 0xFF) / 0x1F, - (((bits[cols] & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) * 0xFF) / 0x1F) - & 0xF0; - } else { - target[cols >> 1] |= GREY((((bits[cols] & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) * 0xFF) / 0x1F, - (((bits[cols] & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) * 0xFF) / 0x1F, - (((bits[cols] & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) * 0xFF) / 0x1F) - >> 4; - } - - hinibble = !hinibble; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine16To4_565(BYTE *target, BYTE *source, int width_in_pixels) { - WORD *bits = (WORD *)source; - BOOL hinibble = TRUE; - - for (int cols = 0; cols < width_in_pixels; cols++) { - if (hinibble) { - target[cols >> 1] = GREY((((bits[cols] & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT) * 0xFF) / 0x1F, - (((bits[cols] & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT) * 0xFF) / 0x3F, - (((bits[cols] & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT) * 0xFF) / 0x1F) - & 0xF0; - } else { - target[cols >> 1] |= GREY((((bits[cols] & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT) * 0xFF) / 0x1F, - (((bits[cols] & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT) * 0xFF) / 0x3F, - (((bits[cols] & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT) * 0xFF) / 0x1F) - >> 4; - } - - hinibble = !hinibble; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine24To4(BYTE *target, BYTE *source, int width_in_pixels) { - BOOL hinibble = TRUE; - - for (int cols = 0; cols < width_in_pixels; cols++) { - if (hinibble) { - target[cols >> 1] = GREY(source[FI_RGBA_RED], source[FI_RGBA_GREEN], source[FI_RGBA_BLUE]) & 0xF0; - } else { - target[cols >> 1] |= GREY(source[FI_RGBA_RED], source[FI_RGBA_GREEN], source[FI_RGBA_BLUE]) >> 4; - } - - source += 3; - hinibble = !hinibble; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine32To4(BYTE *target, BYTE *source, int width_in_pixels) { - BOOL hinibble = TRUE; - - for (int cols = 0; cols < width_in_pixels; cols++) { - if (hinibble) { - target[cols >> 1] = GREY(source[FI_RGBA_RED], source[FI_RGBA_GREEN], source[FI_RGBA_BLUE]) & 0xF0; - } else { - target[cols >> 1] |= GREY(source[FI_RGBA_RED], source[FI_RGBA_GREEN], source[FI_RGBA_BLUE]) >> 4; - } - - source += 4; - hinibble = !hinibble; - } -} - -// ---------------------------------------------------------- -// smart convert X to 4 bits -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertTo4Bits(FIBITMAP *dib) { - if(!FreeImage_HasPixels(dib)) return NULL; - - const int bpp = FreeImage_GetBPP(dib); - - if(bpp != 4) { - const int width = FreeImage_GetWidth(dib); - const int height = FreeImage_GetHeight(dib); - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 4); - - if(new_dib == NULL) { - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - // Build a greyscale palette (*always* needed for image processing) - - RGBQUAD *new_pal = FreeImage_GetPalette(new_dib); - - for(int i = 0; i < 16; i++) { - new_pal[i].rgbRed = (BYTE)((i << 4) + i); - new_pal[i].rgbGreen = (BYTE)((i << 4) + i); - new_pal[i].rgbBlue = (BYTE)((i << 4) + i); - } - - switch(bpp) { - case 1: - { - if(FreeImage_GetColorType(dib) == FIC_PALETTE) { - - // Copy the palette - - RGBQUAD *old_pal = FreeImage_GetPalette(dib); - memcpy(&new_pal[0], &old_pal[0], sizeof(RGBQUAD)); - memcpy(&new_pal[15], &old_pal[1], sizeof(RGBQUAD)); - - } - else if(FreeImage_GetColorType(dib) == FIC_MINISWHITE) { - - // Reverse the grayscale palette - - for(int i = 0; i < 16; i++) { - new_pal[i].rgbRed = new_pal[i].rgbGreen = new_pal[i].rgbBlue = (BYTE)(255 - ((i << 4) + i)); - } - } - - // Expand and copy the bitmap data - - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine1To4(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - return new_dib; - } - - case 8 : - { - // Expand and copy the bitmap data - - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine8To4(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width, FreeImage_GetPalette(dib)); - } - return new_dib; - } - - case 16 : - { - // Expand and copy the bitmap data - - for (int rows = 0; rows < height; rows++) { - if ((FreeImage_GetRedMask(dib) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_565_BLUE_MASK)) { - FreeImage_ConvertLine16To4_565(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } else { - FreeImage_ConvertLine16To4_555(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - } - - return new_dib; - } - - case 24 : - { - // Expand and copy the bitmap data - - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine24To4(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - return new_dib; - } - - case 32 : - { - // Expand and copy the bitmap data - - for (int rows = 0; rows < height; rows++) { - FreeImage_ConvertLine32To4(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - return new_dib; - } - } - } - - return FreeImage_Clone(dib); -} diff --git a/Dependencies/FreeImage/Source/FreeImage/Conversion8.cpp b/Dependencies/FreeImage/Source/FreeImage/Conversion8.cpp deleted file mode 100644 index c4f9b22..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/Conversion8.cpp +++ /dev/null @@ -1,305 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// - Jani Kajala (janik@remedy.fi) -// - Karl-Heinz Bussian (khbussian@moss.de) -// - Carsten Klein (cklein05@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// internal conversions X to 8 bits -// ---------------------------------------------------------- - -void DLL_CALLCONV -FreeImage_ConvertLine1To8(BYTE *target, BYTE *source, int width_in_pixels) { - for (unsigned cols = 0; cols < (unsigned)width_in_pixels; cols++) - target[cols] = (source[cols >> 3] & (0x80 >> (cols & 0x07))) != 0 ? 255 : 0; -} - -void DLL_CALLCONV -FreeImage_ConvertLine4To8(BYTE *target, BYTE *source, int width_in_pixels) { - unsigned count_new = 0; - unsigned count_org = 0; - BOOL hinibble = TRUE; - - while (count_new < (unsigned)width_in_pixels) { - if (hinibble) { - target[count_new] = (source[count_org] >> 4); - } else { - target[count_new] = (source[count_org] & 0x0F); - count_org++; - } - hinibble = !hinibble; - count_new++; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine16To8_555(BYTE *target, BYTE *source, int width_in_pixels) { - const WORD *const bits = (WORD *)source; - for (unsigned cols = 0; cols < (unsigned)width_in_pixels; cols++) { - target[cols] = GREY((((bits[cols] & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) * 0xFF) / 0x1F, - (((bits[cols] & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) * 0xFF) / 0x1F, - (((bits[cols] & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) * 0xFF) / 0x1F); - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine16To8_565(BYTE *target, BYTE *source, int width_in_pixels) { - const WORD *const bits = (WORD *)source; - for (unsigned cols = 0; cols < (unsigned)width_in_pixels; cols++) { - target[cols] = GREY((((bits[cols] & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT) * 0xFF) / 0x1F, - (((bits[cols] & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT) * 0xFF) / 0x3F, - (((bits[cols] & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT) * 0xFF) / 0x1F); - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine24To8(BYTE *target, BYTE *source, int width_in_pixels) { - for (unsigned cols = 0; cols < (unsigned)width_in_pixels; cols++) { - target[cols] = GREY(source[FI_RGBA_RED], source[FI_RGBA_GREEN], source[FI_RGBA_BLUE]); - source += 3; - } -} - -void DLL_CALLCONV -FreeImage_ConvertLine32To8(BYTE *target, BYTE *source, int width_in_pixels) { - for (unsigned cols = 0; cols < (unsigned)width_in_pixels; cols++) { - target[cols] = GREY(source[FI_RGBA_RED], source[FI_RGBA_GREEN], source[FI_RGBA_BLUE]); - source += 4; - } -} - -// ---------------------------------------------------------- -// smart convert X to 8 bits -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertTo8Bits(FIBITMAP *dib) { - if (!FreeImage_HasPixels(dib)) { - return NULL; - } - - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - if (image_type != FIT_BITMAP && image_type != FIT_UINT16) { - return NULL; - } - - const unsigned bpp = FreeImage_GetBPP(dib); - - if (bpp != 8) { - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - - // Allocate a destination image - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 8); - if (new_dib == NULL) { - return NULL; - } - - // Copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - // Palette of destination image has already been initialized - RGBQUAD *new_pal = FreeImage_GetPalette(new_dib); - - const FREE_IMAGE_COLOR_TYPE color_type = FreeImage_GetColorType(dib); - - if (image_type == FIT_BITMAP) { - - switch(bpp) { - case 1: - { - if (color_type == FIC_PALETTE) { - // Copy the palette - RGBQUAD *old_pal = FreeImage_GetPalette(dib); - new_pal[0] = old_pal[0]; - new_pal[255] = old_pal[1]; - - } else if (color_type == FIC_MINISWHITE) { - // Create a reverse grayscale palette - CREATE_GREYSCALE_PALETTE_REVERSE(new_pal, 256); - } - - // Expand and copy the bitmap data - for (unsigned rows = 0; rows < height; rows++) { - FreeImage_ConvertLine1To8(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - return new_dib; - } - - case 4 : - { - if (color_type == FIC_PALETTE) { - // Copy the palette - memcpy(new_pal, FreeImage_GetPalette(dib), 16 * sizeof(RGBQUAD)); - } - - // Expand and copy the bitmap data - for (unsigned rows = 0; rows < height; rows++) { - FreeImage_ConvertLine4To8(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - return new_dib; - } - - case 16 : - { - // Expand and copy the bitmap data - if (IS_FORMAT_RGB565(dib)) { - for (unsigned rows = 0; rows < height; rows++) { - FreeImage_ConvertLine16To8_565(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - } else { - for (unsigned rows = 0; rows < height; rows++) { - FreeImage_ConvertLine16To8_555(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - } - return new_dib; - } - - case 24 : - { - // Expand and copy the bitmap data - for (unsigned rows = 0; rows < height; rows++) { - FreeImage_ConvertLine24To8(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - return new_dib; - } - - case 32 : - { - // Expand and copy the bitmap data - for (unsigned rows = 0; rows < height; rows++) { - FreeImage_ConvertLine32To8(FreeImage_GetScanLine(new_dib, rows), FreeImage_GetScanLine(dib, rows), width); - } - return new_dib; - } - } - - } else if (image_type == FIT_UINT16) { - - const unsigned src_pitch = FreeImage_GetPitch(dib); - const unsigned dst_pitch = FreeImage_GetPitch(new_dib); - const BYTE *src_bits = FreeImage_GetBits(dib); - BYTE *dst_bits = FreeImage_GetBits(new_dib); - - for (unsigned rows = 0; rows < height; rows++) { - const WORD *const src_pixel = (WORD*)src_bits; - BYTE *dst_pixel = (BYTE*)dst_bits; - for(unsigned cols = 0; cols < width; cols++) { - dst_pixel[cols] = (BYTE)(src_pixel[cols] >> 8); - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - return new_dib; - } - - } // bpp != 8 - - return FreeImage_Clone(dib); -} - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertToGreyscale(FIBITMAP *dib) { - if (!FreeImage_HasPixels(dib)) { - return NULL; - } - - const FREE_IMAGE_COLOR_TYPE color_type = FreeImage_GetColorType(dib); - - if (color_type == FIC_PALETTE || color_type == FIC_MINISWHITE) { - - const unsigned bpp = FreeImage_GetBPP(dib); - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 8); - if (new_dib == NULL) { - return NULL; - } - - // Copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - // Create a greyscale palette - BYTE grey_pal[256]; - const RGBQUAD *pal = FreeImage_GetPalette(dib); - const unsigned size = CalculateUsedPaletteEntries(bpp); - for (unsigned i = 0; i < size; i++) { - grey_pal[i] = GREY(pal->rgbRed, pal->rgbGreen, pal->rgbBlue); - pal++; - } - - const BYTE *src_bits = FreeImage_GetBits(dib); - BYTE *dst_bits = FreeImage_GetBits(new_dib); - - const unsigned src_pitch = FreeImage_GetPitch(dib); - const unsigned dst_pitch = FreeImage_GetPitch(new_dib); - - switch(bpp) { - case 1: - { - for (unsigned y = 0; y < height; y++) { - for (unsigned x = 0; x < width; x++) { - const unsigned pixel = (src_bits[x >> 3] & (0x80 >> (x & 0x07))) != 0; - dst_bits[x] = grey_pal[pixel]; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case 4: - { - for (unsigned y = 0; y < height; y++) { - for (unsigned x = 0; x < width; x++) { - const unsigned pixel = x & 0x01 ? src_bits[x >> 1] & 0x0F : src_bits[x >> 1] >> 4; - dst_bits[x] = grey_pal[pixel]; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case 8: - { - for (unsigned y = 0; y < height; y++) { - for (unsigned x = 0; x < width; x++) { - dst_bits[x] = grey_pal[src_bits[x]]; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - } - return new_dib; - } - - // Convert the bitmap to 8-bit greyscale - return FreeImage_ConvertTo8Bits(dib); -} diff --git a/Dependencies/FreeImage/Source/FreeImage/ConversionFloat.cpp b/Dependencies/FreeImage/Source/FreeImage/ConversionFloat.cpp deleted file mode 100644 index a36a6d4..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/ConversionFloat.cpp +++ /dev/null @@ -1,194 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// smart convert X to Float -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertToFloat(FIBITMAP *dib) { - FIBITMAP *src = NULL; - FIBITMAP *dst = NULL; - - if(!FreeImage_HasPixels(dib)) return NULL; - - FREE_IMAGE_TYPE src_type = FreeImage_GetImageType(dib); - - // check for allowed conversions - switch(src_type) { - case FIT_BITMAP: - { - // allow conversion from 8-bit - if((FreeImage_GetBPP(dib) == 8) && (FreeImage_GetColorType(dib) == FIC_MINISBLACK)) { - src = dib; - } else { - src = FreeImage_ConvertToGreyscale(dib); - if(!src) return NULL; - } - break; - } - case FIT_UINT16: - case FIT_RGB16: - case FIT_RGBA16: - case FIT_RGBF: - case FIT_RGBAF: - src = dib; - break; - case FIT_FLOAT: - // float type : clone the src - return FreeImage_Clone(dib); - default: - return NULL; - } - - // allocate dst image - - const unsigned width = FreeImage_GetWidth(src); - const unsigned height = FreeImage_GetHeight(src); - - dst = FreeImage_AllocateT(FIT_FLOAT, width, height); - if(!dst) { - if(src != dib) { - FreeImage_Unload(src); - } - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - // convert from src type to float - - const unsigned src_pitch = FreeImage_GetPitch(src); - const unsigned dst_pitch = FreeImage_GetPitch(dst); - - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - switch(src_type) { - case FIT_BITMAP: - { - for(unsigned y = 0; y < height; y++) { - const BYTE *src_pixel = (BYTE*)src_bits; - float *dst_pixel = (float*)dst_bits; - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - dst_pixel[x] = (float)(src_pixel[x]) / 255; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_UINT16: - { - for(unsigned y = 0; y < height; y++) { - const WORD *src_pixel = (WORD*)src_bits; - float *dst_pixel = (float*)dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - dst_pixel[x] = (float)(src_pixel[x]) / 65535; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_RGB16: - { - for(unsigned y = 0; y < height; y++) { - const FIRGB16 *src_pixel = (FIRGB16*)src_bits; - float *dst_pixel = (float*)dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - dst_pixel[x] = LUMA_REC709(src_pixel[x].red, src_pixel[x].green, src_pixel[x].blue) / 65535.0F; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_RGBA16: - { - for(unsigned y = 0; y < height; y++) { - const FIRGBA16 *src_pixel = (FIRGBA16*)src_bits; - float *dst_pixel = (float*)dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - dst_pixel[x] = LUMA_REC709(src_pixel[x].red, src_pixel[x].green, src_pixel[x].blue) / 65535.0F; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_RGBF: - { - for(unsigned y = 0; y < height; y++) { - const FIRGBF *src_pixel = (FIRGBF*)src_bits; - float *dst_pixel = (float*)dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert (assume pixel values are in the range [0..1]) - dst_pixel[x] = LUMA_REC709(src_pixel[x].red, src_pixel[x].green, src_pixel[x].blue); - dst_pixel[x] = CLAMP(dst_pixel[x], 0.0F, 1.0F); - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_RGBAF: - { - for(unsigned y = 0; y < height; y++) { - const FIRGBAF *src_pixel = (FIRGBAF*)src_bits; - float *dst_pixel = (float*)dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert (assume pixel values are in the range [0..1]) - dst_pixel[x] = LUMA_REC709(src_pixel[x].red, src_pixel[x].green, src_pixel[x].blue); - dst_pixel[x] = CLAMP(dst_pixel[x], 0.0F, 1.0F); - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - } - - if(src != dib) { - FreeImage_Unload(src); - } - - return dst; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/ConversionRGB16.cpp b/Dependencies/FreeImage/Source/FreeImage/ConversionRGB16.cpp deleted file mode 100644 index 9e28205..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/ConversionRGB16.cpp +++ /dev/null @@ -1,144 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// smart convert X to RGB16 -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertToRGB16(FIBITMAP *dib) { - FIBITMAP *src = NULL; - FIBITMAP *dst = NULL; - - if(!FreeImage_HasPixels(dib)) return NULL; - - const FREE_IMAGE_TYPE src_type = FreeImage_GetImageType(dib); - - // check for allowed conversions - switch(src_type) { - case FIT_BITMAP: - { - // convert to 24-bit if needed - if((FreeImage_GetBPP(dib) == 24) || (FreeImage_GetBPP(dib) == 32)) { - src = dib; - } else { - src = FreeImage_ConvertTo24Bits(dib); - if(!src) return NULL; - } - break; - } - case FIT_UINT16: - // allow conversion from unsigned 16-bit - src = dib; - break; - case FIT_RGB16: - // RGB16 type : clone the src - return FreeImage_Clone(dib); - break; - case FIT_RGBA16: - // allow conversion from 64-bit RGBA (ignore the alpha channel) - src = dib; - break; - default: - return NULL; - } - - // allocate dst image - - const unsigned width = FreeImage_GetWidth(src); - const unsigned height = FreeImage_GetHeight(src); - - dst = FreeImage_AllocateT(FIT_RGB16, width, height); - if(!dst) { - if(src != dib) { - FreeImage_Unload(src); - } - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - // convert from src type to RGB16 - - switch(src_type) { - case FIT_BITMAP: - { - // Calculate the number of bytes per pixel (1 for 8-bit, 3 for 24-bit or 4 for 32-bit) - const unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - - for(unsigned y = 0; y < height; y++) { - const BYTE *src_bits = (BYTE*)FreeImage_GetScanLine(src, y); - FIRGB16 *dst_bits = (FIRGB16*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - dst_bits[x].red = src_bits[FI_RGBA_RED] << 8; - dst_bits[x].green = src_bits[FI_RGBA_GREEN] << 8; - dst_bits[x].blue = src_bits[FI_RGBA_BLUE] << 8; - src_bits += bytespp; - } - } - } - break; - - case FIT_UINT16: - { - for(unsigned y = 0; y < height; y++) { - const WORD *src_bits = (WORD*)FreeImage_GetScanLine(src, y); - FIRGB16 *dst_bits = (FIRGB16*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - // convert by copying greyscale channel to each R, G, B channels - dst_bits[x].red = src_bits[x]; - dst_bits[x].green = src_bits[x]; - dst_bits[x].blue = src_bits[x]; - } - } - } - break; - - case FIT_RGBA16: - { - for(unsigned y = 0; y < height; y++) { - const FIRGBA16 *src_bits = (FIRGBA16*)FreeImage_GetScanLine(src, y); - FIRGB16 *dst_bits = (FIRGB16*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - // convert and skip alpha channel - dst_bits[x].red = src_bits[x].red; - dst_bits[x].green = src_bits[x].green; - dst_bits[x].blue = src_bits[x].blue; - } - } - } - break; - - default: - break; - } - - if(src != dib) { - FreeImage_Unload(src); - } - - return dst; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/ConversionRGBA16.cpp b/Dependencies/FreeImage/Source/FreeImage/ConversionRGBA16.cpp deleted file mode 100644 index 7924bd9..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/ConversionRGBA16.cpp +++ /dev/null @@ -1,147 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// smart convert X to RGBA16 -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertToRGBA16(FIBITMAP *dib) { - FIBITMAP *src = NULL; - FIBITMAP *dst = NULL; - - if(!FreeImage_HasPixels(dib)) return NULL; - - const FREE_IMAGE_TYPE src_type = FreeImage_GetImageType(dib); - - // check for allowed conversions - switch(src_type) { - case FIT_BITMAP: - { - // convert to 32-bit if needed - if(FreeImage_GetBPP(dib) == 32) { - src = dib; - } else { - src = FreeImage_ConvertTo32Bits(dib); - if(!src) return NULL; - } - break; - } - case FIT_UINT16: - // allow conversion from unsigned 16-bit - src = dib; - break; - case FIT_RGB16: - // allow conversion from 48-bit RGB - src = dib; - break; - case FIT_RGBA16: - // RGBA16 type : clone the src - return FreeImage_Clone(dib); - break; - default: - return NULL; - } - - // allocate dst image - - const unsigned width = FreeImage_GetWidth(src); - const unsigned height = FreeImage_GetHeight(src); - - dst = FreeImage_AllocateT(FIT_RGBA16, width, height); - if(!dst) { - if(src != dib) { - FreeImage_Unload(src); - } - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - // convert from src type to RGBA16 - - switch(src_type) { - case FIT_BITMAP: - { - // Calculate the number of bytes per pixel (4 for 32-bit) - const unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - - for(unsigned y = 0; y < height; y++) { - const BYTE *src_bits = (BYTE*)FreeImage_GetScanLine(src, y); - FIRGBA16 *dst_bits = (FIRGBA16*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - dst_bits[x].red = src_bits[FI_RGBA_RED] << 8; - dst_bits[x].green = src_bits[FI_RGBA_GREEN] << 8; - dst_bits[x].blue = src_bits[FI_RGBA_BLUE] << 8; - dst_bits[x].alpha = src_bits[FI_RGBA_ALPHA] << 8; - src_bits += bytespp; - } - } - } - break; - - case FIT_UINT16: - { - for(unsigned y = 0; y < height; y++) { - const WORD *src_bits = (WORD*)FreeImage_GetScanLine(src, y); - FIRGBA16 *dst_bits = (FIRGBA16*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - // convert by copying greyscale channel to each R, G, B channels - dst_bits[x].red = src_bits[x]; - dst_bits[x].green = src_bits[x]; - dst_bits[x].blue = src_bits[x]; - dst_bits[x].alpha = 0xFFFF; - } - } - } - break; - - case FIT_RGB16: - { - for(unsigned y = 0; y < height; y++) { - const FIRGB16 *src_bits = (FIRGB16*)FreeImage_GetScanLine(src, y); - FIRGBA16 *dst_bits = (FIRGBA16*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - // convert pixels directly, while adding a "dummy" alpha of 1.0 - dst_bits[x].red = src_bits[x].red; - dst_bits[x].green = src_bits[x].green; - dst_bits[x].blue = src_bits[x].blue; - dst_bits[x].alpha = 0xFFFF; - } - } - } - break; - - default: - break; - } - - if(src != dib) { - FreeImage_Unload(src); - } - - return dst; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/ConversionRGBAF.cpp b/Dependencies/FreeImage/Source/FreeImage/ConversionRGBAF.cpp deleted file mode 100644 index 1e23aaa..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/ConversionRGBAF.cpp +++ /dev/null @@ -1,250 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Tanner Helland (tannerhelland@users.sf.net) -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// smart convert X to RGBAF -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertToRGBAF(FIBITMAP *dib) { - FIBITMAP *src = NULL; - FIBITMAP *dst = NULL; - - if(!FreeImage_HasPixels(dib)) return NULL; - - const FREE_IMAGE_TYPE src_type = FreeImage_GetImageType(dib); - - // check for allowed conversions - switch(src_type) { - case FIT_BITMAP: - { - // allow conversion from 32-bit - const FREE_IMAGE_COLOR_TYPE color_type = FreeImage_GetColorType(dib); - if(color_type != FIC_RGBALPHA) { - src = FreeImage_ConvertTo32Bits(dib); - if(!src) return NULL; - } else { - src = dib; - } - break; - } - case FIT_UINT16: - // allow conversion from 16-bit - src = dib; - break; - case FIT_RGB16: - // allow conversion from 48-bit RGB - src = dib; - break; - case FIT_RGBA16: - // allow conversion from 64-bit RGBA - src = dib; - break; - case FIT_FLOAT: - // allow conversion from 32-bit float - src = dib; - break; - case FIT_RGBF: - // allow conversion from 96-bit RGBF - src = dib; - break; - case FIT_RGBAF: - // RGBAF type : clone the src - return FreeImage_Clone(dib); - break; - default: - return NULL; - } - - // allocate dst image - - const unsigned width = FreeImage_GetWidth(src); - const unsigned height = FreeImage_GetHeight(src); - - dst = FreeImage_AllocateT(FIT_RGBAF, width, height); - if(!dst) { - if(src != dib) { - FreeImage_Unload(src); - } - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - // convert from src type to RGBAF - - const unsigned src_pitch = FreeImage_GetPitch(src); - const unsigned dst_pitch = FreeImage_GetPitch(dst); - - switch(src_type) { - case FIT_BITMAP: - { - // calculate the number of bytes per pixel (4 for 32-bit) - const unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const BYTE *src_pixel = (BYTE*)src_bits; - FIRGBAF *dst_pixel = (FIRGBAF*)dst_bits; - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - dst_pixel->red = (float)(src_pixel[FI_RGBA_RED]) / 255.0F; - dst_pixel->green = (float)(src_pixel[FI_RGBA_GREEN]) / 255.0F; - dst_pixel->blue = (float)(src_pixel[FI_RGBA_BLUE]) / 255.0F; - dst_pixel->alpha = (float)(src_pixel[FI_RGBA_ALPHA]) / 255.0F; - - src_pixel += bytespp; - dst_pixel++; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_UINT16: - { - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const WORD *src_pixel = (WORD*)src_bits; - FIRGBAF *dst_pixel = (FIRGBAF*)dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - const float dst_value = (float)src_pixel[x] / 65535.0F; - dst_pixel[x].red = dst_value; - dst_pixel[x].green = dst_value; - dst_pixel[x].blue = dst_value; - dst_pixel[x].alpha = 1.0F; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_RGB16: - { - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const FIRGB16 *src_pixel = (FIRGB16*)src_bits; - FIRGBAF *dst_pixel = (FIRGBAF*)dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.0F; - dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.0F; - dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.0F; - dst_pixel[x].alpha = 1.0F; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_RGBA16: - { - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const FIRGBA16 *src_pixel = (FIRGBA16*)src_bits; - FIRGBAF *dst_pixel = (FIRGBAF*)dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.0F; - dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.0F; - dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.0F; - dst_pixel[x].alpha = (float)(src_pixel[x].alpha) / 65535.0F; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_FLOAT: - { - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const float *src_pixel = (float*)src_bits; - FIRGBAF *dst_pixel = (FIRGBAF*)dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert by copying greyscale channel to each R, G, B channels - // assume float values are in [0..1] - const float value = CLAMP(src_pixel[x], 0.0F, 1.0F); - dst_pixel[x].red = value; - dst_pixel[x].green = value; - dst_pixel[x].blue = value; - dst_pixel[x].alpha = 1.0F; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_RGBF: - { - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const FIRGBF *src_pixel = (FIRGBF*)src_bits; - FIRGBAF *dst_pixel = (FIRGBAF*)dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert pixels directly, while adding a "dummy" alpha of 1.0 - dst_pixel[x].red = CLAMP(src_pixel[x].red, 0.0F, 1.0F); - dst_pixel[x].green = CLAMP(src_pixel[x].green, 0.0F, 1.0F); - dst_pixel[x].blue = CLAMP(src_pixel[x].blue, 0.0F, 1.0F); - dst_pixel[x].alpha = 1.0F; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - } - - if(src != dib) { - FreeImage_Unload(src); - } - - return dst; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/ConversionRGBF.cpp b/Dependencies/FreeImage/Source/FreeImage/ConversionRGBF.cpp deleted file mode 100644 index 230dd7b..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/ConversionRGBF.cpp +++ /dev/null @@ -1,243 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// smart convert X to RGBF -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertToRGBF(FIBITMAP *dib) { - FIBITMAP *src = NULL; - FIBITMAP *dst = NULL; - - if(!FreeImage_HasPixels(dib)) return NULL; - - const FREE_IMAGE_TYPE src_type = FreeImage_GetImageType(dib); - - // check for allowed conversions - switch(src_type) { - case FIT_BITMAP: - { - // allow conversion from 24- and 32-bit - const FREE_IMAGE_COLOR_TYPE color_type = FreeImage_GetColorType(dib); - if((color_type != FIC_RGB) && (color_type != FIC_RGBALPHA)) { - src = FreeImage_ConvertTo24Bits(dib); - if(!src) return NULL; - } else { - src = dib; - } - break; - } - case FIT_UINT16: - // allow conversion from 16-bit - src = dib; - break; - case FIT_RGB16: - // allow conversion from 48-bit RGB - src = dib; - break; - case FIT_RGBA16: - // allow conversion from 64-bit RGBA (ignore the alpha channel) - src = dib; - break; - case FIT_FLOAT: - // allow conversion from 32-bit float - src = dib; - break; - case FIT_RGBAF: - // allow conversion from 128-bit RGBAF - src = dib; - break; - case FIT_RGBF: - // RGBF type : clone the src - return FreeImage_Clone(dib); - break; - default: - return NULL; - } - - // allocate dst image - - const unsigned width = FreeImage_GetWidth(src); - const unsigned height = FreeImage_GetHeight(src); - - dst = FreeImage_AllocateT(FIT_RGBF, width, height); - if(!dst) { - if(src != dib) { - FreeImage_Unload(src); - } - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - // convert from src type to RGBF - - const unsigned src_pitch = FreeImage_GetPitch(src); - const unsigned dst_pitch = FreeImage_GetPitch(dst); - - switch(src_type) { - case FIT_BITMAP: - { - // calculate the number of bytes per pixel (3 for 24-bit or 4 for 32-bit) - const unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const BYTE *src_pixel = (BYTE*)src_bits; - FIRGBF *dst_pixel = (FIRGBF*)dst_bits; - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - dst_pixel->red = (float)(src_pixel[FI_RGBA_RED]) / 255.0F; - dst_pixel->green = (float)(src_pixel[FI_RGBA_GREEN]) / 255.0F; - dst_pixel->blue = (float)(src_pixel[FI_RGBA_BLUE]) / 255.0F; - - src_pixel += bytespp; - dst_pixel ++; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_UINT16: - { - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const WORD *src_pixel = (WORD*)src_bits; - FIRGBF *dst_pixel = (FIRGBF*)dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - const float dst_value = (float)src_pixel[x] / 65535.0F; - dst_pixel[x].red = dst_value; - dst_pixel[x].green = dst_value; - dst_pixel[x].blue = dst_value; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_RGB16: - { - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const FIRGB16 *src_pixel = (FIRGB16*) src_bits; - FIRGBF *dst_pixel = (FIRGBF*) dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.0F; - dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.0F; - dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.0F; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_RGBA16: - { - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const FIRGBA16 *src_pixel = (FIRGBA16*) src_bits; - FIRGBF *dst_pixel = (FIRGBF*) dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert and scale to the range [0..1] - dst_pixel[x].red = (float)(src_pixel[x].red) / 65535.0F; - dst_pixel[x].green = (float)(src_pixel[x].green) / 65535.0F; - dst_pixel[x].blue = (float)(src_pixel[x].blue) / 65535.0F; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_FLOAT: - { - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const float *src_pixel = (float*) src_bits; - FIRGBF *dst_pixel = (FIRGBF*) dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert by copying greyscale channel to each R, G, B channels - // assume float values are in [0..1] - const float value = CLAMP(src_pixel[x], 0.0F, 1.0F); - dst_pixel[x].red = value; - dst_pixel[x].green = value; - dst_pixel[x].blue = value; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - - case FIT_RGBAF: - { - const BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const FIRGBAF *src_pixel = (FIRGBAF*) src_bits; - FIRGBF *dst_pixel = (FIRGBF*) dst_bits; - - for(unsigned x = 0; x < width; x++) { - // convert and skip alpha channel - dst_pixel[x].red = CLAMP(src_pixel[x].red, 0.0F, 1.0F); - dst_pixel[x].green = CLAMP(src_pixel[x].green, 0.0F, 1.0F); - dst_pixel[x].blue = CLAMP(src_pixel[x].blue, 0.0F, 1.0F); - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - } - break; - } - - if(src != dib) { - FreeImage_Unload(src); - } - - return dst; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/ConversionType.cpp b/Dependencies/FreeImage/Source/FreeImage/ConversionType.cpp deleted file mode 100644 index a2ca90f..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/ConversionType.cpp +++ /dev/null @@ -1,699 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Tanner Helland (tannerhelland@users.sf.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- - -/** Convert a greyscale image of type Tsrc to type Tdst. - Conversion is done using standard C language casting convention. -*/ -template -class CONVERT_TYPE -{ -public: - FIBITMAP* convert(FIBITMAP *src, FREE_IMAGE_TYPE dst_type); -}; - -template FIBITMAP* -CONVERT_TYPE::convert(FIBITMAP *src, FREE_IMAGE_TYPE dst_type) { - - FIBITMAP *dst = NULL; - - unsigned width = FreeImage_GetWidth(src); - unsigned height = FreeImage_GetHeight(src); - unsigned bpp = FreeImage_GetBPP(src); - - // allocate dst image - - dst = FreeImage_AllocateT(dst_type, width, height, bpp, - FreeImage_GetRedMask(src), FreeImage_GetGreenMask(src), FreeImage_GetBlueMask(src)); - if(!dst) return NULL; - - // convert from src_type to dst_type - - for(unsigned y = 0; y < height; y++) { - const Tsrc *src_bits = reinterpret_cast(FreeImage_GetScanLine(src, y)); - Tdst *dst_bits = reinterpret_cast(FreeImage_GetScanLine(dst, y)); - - for(unsigned x = 0; x < width; x++) { - *dst_bits++ = static_cast(*src_bits++); - } - } - - return dst; -} - - -/** Convert a greyscale image of type Tsrc to a 8-bit grayscale dib. - Conversion is done using either a linear scaling from [min, max] to [0, 255] - or a rounding from src_pixel to (BYTE) MIN(255, MAX(0, q)) where int q = int(src_pixel + 0.5); -*/ -template -class CONVERT_TO_BYTE -{ -public: - FIBITMAP* convert(FIBITMAP *src, BOOL scale_linear); -}; - -template FIBITMAP* -CONVERT_TO_BYTE::convert(FIBITMAP *src, BOOL scale_linear) { - FIBITMAP *dst = NULL; - unsigned x, y; - - unsigned width = FreeImage_GetWidth(src); - unsigned height = FreeImage_GetHeight(src); - - // allocate a 8-bit dib - - dst = FreeImage_AllocateT(FIT_BITMAP, width, height, 8, 0, 0, 0); - if(!dst) return NULL; - - // build a greyscale palette - RGBQUAD *pal = FreeImage_GetPalette(dst); - for(int i = 0; i < 256; i++) { - pal[i].rgbRed = (BYTE)i; - pal[i].rgbGreen = (BYTE)i; - pal[i].rgbBlue = (BYTE)i; - } - - // convert the src image to dst - // (FIBITMAP are stored upside down) - if(scale_linear) { - Tsrc max, min; - double scale; - - // find the min and max value of the image - Tsrc l_min, l_max; - min = 255, max = 0; - for(y = 0; y < height; y++) { - Tsrc *bits = reinterpret_cast(FreeImage_GetScanLine(src, y)); - MAXMIN(bits, width, l_max, l_min); - if(l_max > max) max = l_max; - if(l_min < min) min = l_min; - } - if(max == min) { - max = 255; min = 0; - } - - // compute the scaling factor - scale = 255 / (double)(max - min); - - // scale to 8-bit - for(y = 0; y < height; y++) { - Tsrc *src_bits = reinterpret_cast(FreeImage_GetScanLine(src, y)); - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - for(x = 0; x < width; x++) { - dst_bits[x] = (BYTE)( scale * (src_bits[x] - min) + 0.5); - } - } - } else { - for(y = 0; y < height; y++) { - Tsrc *src_bits = reinterpret_cast(FreeImage_GetScanLine(src, y)); - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - for(x = 0; x < width; x++) { - // rounding - int q = int(src_bits[x] + 0.5); - dst_bits[x] = (BYTE) MIN(255, MAX(0, q)); - } - } - } - - return dst; -} - -/** Convert a greyscale image of type Tsrc to a FICOMPLEX dib. -*/ -template -class CONVERT_TO_COMPLEX -{ -public: - FIBITMAP* convert(FIBITMAP *src); -}; - -template FIBITMAP* -CONVERT_TO_COMPLEX::convert(FIBITMAP *src) { - FIBITMAP *dst = NULL; - - unsigned width = FreeImage_GetWidth(src); - unsigned height = FreeImage_GetHeight(src); - - // allocate dst image - - dst = FreeImage_AllocateT(FIT_COMPLEX, width, height); - if(!dst) return NULL; - - // convert from src_type to FIT_COMPLEX - - for(unsigned y = 0; y < height; y++) { - const Tsrc *src_bits = reinterpret_cast(FreeImage_GetScanLine(src, y)); - FICOMPLEX *dst_bits = (FICOMPLEX *)FreeImage_GetScanLine(dst, y); - - for(unsigned x = 0; x < width; x++) { - dst_bits[x].r = (double)src_bits[x]; - dst_bits[x].i = 0; - } - } - - return dst; -} - -// ---------------------------------------------------------- - -// Convert from type BYTE to type X -CONVERT_TYPE convertByteToUShort; -CONVERT_TYPE convertByteToShort; -CONVERT_TYPE convertByteToULong; -CONVERT_TYPE convertByteToLong; -CONVERT_TYPE convertByteToFloat; -CONVERT_TYPE convertByteToDouble; - -// Convert from type X to type BYTE -CONVERT_TO_BYTE convertUShortToByte; -CONVERT_TO_BYTE convertShortToByte; -CONVERT_TO_BYTE convertULongToByte; -CONVERT_TO_BYTE convertLongToByte; -CONVERT_TO_BYTE convertFloatToByte; -CONVERT_TO_BYTE convertDoubleToByte; - -// Convert from type X to type float -CONVERT_TYPE convertUShortToFloat; -CONVERT_TYPE convertShortToFloat; -CONVERT_TYPE convertULongToFloat; -CONVERT_TYPE convertLongToFloat; - -// Convert from type X to type double -CONVERT_TYPE convertUShortToDouble; -CONVERT_TYPE convertShortToDouble; -CONVERT_TYPE convertULongToDouble; -CONVERT_TYPE convertLongToDouble; -CONVERT_TYPE convertFloatToDouble; - -// Convert from type X to type FICOMPLEX -CONVERT_TO_COMPLEX convertByteToComplex; -CONVERT_TO_COMPLEX convertUShortToComplex; -CONVERT_TO_COMPLEX convertShortToComplex; -CONVERT_TO_COMPLEX convertULongToComplex; -CONVERT_TO_COMPLEX convertLongToComplex; -CONVERT_TO_COMPLEX convertFloatToComplex; -CONVERT_TO_COMPLEX convertDoubleToComplex; - -// ---------------------------------------------------------- - -// ---------------------------------------------------------- -// smart convert X to standard FIBITMAP -// ---------------------------------------------------------- - -/** Convert image of any type to a standard 8-bit greyscale image. -For standard images, a clone of the input image is returned. -When the scale_linear parameter is TRUE, conversion is done by scaling linearly -each pixel to an integer value between [0..255]. When it is FALSE, conversion is done -by rounding each float pixel to an integer between [0..255]. -For complex images, the magnitude is extracted as a double image, then converted according to the scale parameter. -@param image Image to convert -@param scale_linear Linear scaling / rounding switch -*/ -FIBITMAP* DLL_CALLCONV -FreeImage_ConvertToStandardType(FIBITMAP *src, BOOL scale_linear) { - FIBITMAP *dst = NULL; - - if(!src) return NULL; - - // convert from src_type to FIT_BITMAP - - const FREE_IMAGE_TYPE src_type = FreeImage_GetImageType(src); - - switch(src_type) { - case FIT_BITMAP: // standard image: 1-, 4-, 8-, 16-, 24-, 32-bit - dst = FreeImage_Clone(src); - break; - case FIT_UINT16: // array of unsigned short: unsigned 16-bit - dst = convertUShortToByte.convert(src, scale_linear); - break; - case FIT_INT16: // array of short: signed 16-bit - dst = convertShortToByte.convert(src, scale_linear); - break; - case FIT_UINT32: // array of unsigned long: unsigned 32-bit - dst = convertULongToByte.convert(src, scale_linear); - break; - case FIT_INT32: // array of long: signed 32-bit - dst = convertLongToByte.convert(src, scale_linear); - break; - case FIT_FLOAT: // array of float: 32-bit - dst = convertFloatToByte.convert(src, scale_linear); - break; - case FIT_DOUBLE: // array of double: 64-bit - dst = convertDoubleToByte.convert(src, scale_linear); - break; - case FIT_COMPLEX: // array of FICOMPLEX: 2 x 64-bit - { - // Convert to type FIT_DOUBLE - FIBITMAP *dib_double = FreeImage_GetComplexChannel(src, FICC_MAG); - if(dib_double) { - // Convert to a standard bitmap (linear scaling) - dst = convertDoubleToByte.convert(dib_double, scale_linear); - // Free image of type FIT_DOUBLE - FreeImage_Unload(dib_double); - } - } - break; - case FIT_RGB16: // 48-bit RGB image: 3 x 16-bit - break; - case FIT_RGBA16: // 64-bit RGBA image: 4 x 16-bit - break; - case FIT_RGBF: // 96-bit RGB float image: 3 x 32-bit IEEE floating point - break; - case FIT_RGBAF: // 128-bit RGBA float image: 4 x 32-bit IEEE floating point - break; - } - - if(NULL == dst) { - FreeImage_OutputMessageProc(FIF_UNKNOWN, "FREE_IMAGE_TYPE: Unable to convert from type %d to type %d.\n No such conversion exists.", src_type, FIT_BITMAP); - } else { - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - } - - return dst; -} - - - -// ---------------------------------------------------------- -// smart convert X to Y -// ---------------------------------------------------------- - -FIBITMAP* DLL_CALLCONV -FreeImage_ConvertToType(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear) { - FIBITMAP *dst = NULL; - - if(!FreeImage_HasPixels(src)) return NULL; - - // convert from src_type to dst_type - - const FREE_IMAGE_TYPE src_type = FreeImage_GetImageType(src); - - if(src_type == dst_type) { - return FreeImage_Clone(src); - } - - const unsigned src_bpp = FreeImage_GetBPP(src); - - switch(src_type) { - case FIT_BITMAP: - switch(dst_type) { - case FIT_UINT16: - dst = FreeImage_ConvertToUINT16(src); - break; - case FIT_INT16: - dst = (src_bpp == 8) ? convertByteToShort.convert(src, dst_type) : NULL; - break; - case FIT_UINT32: - dst = (src_bpp == 8) ? convertByteToULong.convert(src, dst_type) : NULL; - break; - case FIT_INT32: - dst = (src_bpp == 8) ? convertByteToLong.convert(src, dst_type) : NULL; - break; - case FIT_FLOAT: - dst = FreeImage_ConvertToFloat(src); - break; - case FIT_DOUBLE: - dst = (src_bpp == 8) ? convertByteToDouble.convert(src, dst_type) : NULL; - break; - case FIT_COMPLEX: - dst = (src_bpp == 8) ? convertByteToComplex.convert(src) : NULL; - break; - case FIT_RGB16: - dst = FreeImage_ConvertToRGB16(src); - break; - case FIT_RGBA16: - dst = FreeImage_ConvertToRGBA16(src); - break; - case FIT_RGBF: - dst = FreeImage_ConvertToRGBF(src); - break; - case FIT_RGBAF: - dst = FreeImage_ConvertToRGBAF(src); - break; - } - break; - case FIT_UINT16: - switch(dst_type) { - case FIT_BITMAP: - dst = FreeImage_ConvertToStandardType(src, scale_linear); - break; - case FIT_INT16: - break; - case FIT_UINT32: - break; - case FIT_INT32: - break; - case FIT_FLOAT: - dst = FreeImage_ConvertToFloat(src); - break; - case FIT_DOUBLE: - dst = convertUShortToDouble.convert(src, dst_type); - break; - case FIT_COMPLEX: - dst = convertUShortToComplex.convert(src); - break; - case FIT_RGB16: - dst = FreeImage_ConvertToRGB16(src); - break; - case FIT_RGBA16: - dst = FreeImage_ConvertToRGBA16(src); - break; - case FIT_RGBF: - dst = FreeImage_ConvertToRGBF(src); - break; - case FIT_RGBAF: - dst = FreeImage_ConvertToRGBAF(src); - break; - } - break; - case FIT_INT16: - switch(dst_type) { - case FIT_BITMAP: - dst = FreeImage_ConvertToStandardType(src, scale_linear); - break; - case FIT_UINT16: - break; - case FIT_UINT32: - break; - case FIT_INT32: - break; - case FIT_FLOAT: - dst = convertShortToFloat.convert(src, dst_type); - break; - case FIT_DOUBLE: - dst = convertShortToDouble.convert(src, dst_type); - break; - case FIT_COMPLEX: - dst = convertShortToComplex.convert(src); - break; - case FIT_RGB16: - break; - case FIT_RGBA16: - break; - case FIT_RGBF: - break; - case FIT_RGBAF: - break; - } - break; - case FIT_UINT32: - switch(dst_type) { - case FIT_BITMAP: - dst = FreeImage_ConvertToStandardType(src, scale_linear); - break; - case FIT_UINT16: - break; - case FIT_INT16: - break; - case FIT_INT32: - break; - case FIT_FLOAT: - dst = convertULongToFloat.convert(src, dst_type); - break; - case FIT_DOUBLE: - dst = convertULongToDouble.convert(src, dst_type); - break; - case FIT_COMPLEX: - dst = convertULongToComplex.convert(src); - break; - case FIT_RGB16: - break; - case FIT_RGBA16: - break; - case FIT_RGBF: - break; - case FIT_RGBAF: - break; - } - break; - case FIT_INT32: - switch(dst_type) { - case FIT_BITMAP: - dst = FreeImage_ConvertToStandardType(src, scale_linear); - break; - case FIT_UINT16: - break; - case FIT_INT16: - break; - case FIT_UINT32: - break; - case FIT_FLOAT: - dst = convertLongToFloat.convert(src, dst_type); - break; - case FIT_DOUBLE: - dst = convertLongToDouble.convert(src, dst_type); - break; - case FIT_COMPLEX: - dst = convertLongToComplex.convert(src); - break; - case FIT_RGB16: - break; - case FIT_RGBA16: - break; - case FIT_RGBF: - break; - case FIT_RGBAF: - break; - } - break; - case FIT_FLOAT: - switch(dst_type) { - case FIT_BITMAP: - dst = FreeImage_ConvertToStandardType(src, scale_linear); - break; - case FIT_UINT16: - break; - case FIT_INT16: - break; - case FIT_UINT32: - break; - case FIT_INT32: - break; - case FIT_DOUBLE: - dst = convertFloatToDouble.convert(src, dst_type); - break; - case FIT_COMPLEX: - dst = convertFloatToComplex.convert(src); - break; - case FIT_RGB16: - break; - case FIT_RGBA16: - break; - case FIT_RGBF: - dst = FreeImage_ConvertToRGBF(src); - break; - case FIT_RGBAF: - dst = FreeImage_ConvertToRGBAF(src); - break; - } - break; - case FIT_DOUBLE: - switch(dst_type) { - case FIT_BITMAP: - dst = FreeImage_ConvertToStandardType(src, scale_linear); - break; - case FIT_UINT16: - break; - case FIT_INT16: - break; - case FIT_UINT32: - break; - case FIT_INT32: - break; - case FIT_FLOAT: - break; - case FIT_COMPLEX: - dst = convertDoubleToComplex.convert(src); - break; - case FIT_RGB16: - break; - case FIT_RGBA16: - break; - case FIT_RGBF: - break; - case FIT_RGBAF: - break; - } - break; - case FIT_COMPLEX: - switch(dst_type) { - case FIT_BITMAP: - break; - case FIT_UINT16: - break; - case FIT_INT16: - break; - case FIT_UINT32: - break; - case FIT_INT32: - break; - case FIT_FLOAT: - break; - case FIT_DOUBLE: - break; - case FIT_RGB16: - break; - case FIT_RGBA16: - break; - case FIT_RGBF: - break; - case FIT_RGBAF: - break; - } - break; - case FIT_RGB16: - switch(dst_type) { - case FIT_BITMAP: - dst = FreeImage_ConvertTo24Bits(src); - break; - case FIT_UINT16: - dst = FreeImage_ConvertToUINT16(src); - break; - case FIT_INT16: - break; - case FIT_UINT32: - break; - case FIT_INT32: - break; - case FIT_FLOAT: - dst = FreeImage_ConvertToFloat(src); - break; - case FIT_DOUBLE: - break; - case FIT_COMPLEX: - break; - case FIT_RGBA16: - dst = FreeImage_ConvertToRGBA16(src); - break; - case FIT_RGBF: - dst = FreeImage_ConvertToRGBF(src); - break; - case FIT_RGBAF: - dst = FreeImage_ConvertToRGBAF(src); - break; - } - break; - case FIT_RGBA16: - switch(dst_type) { - case FIT_BITMAP: - dst = FreeImage_ConvertTo32Bits(src); - break; - case FIT_UINT16: - dst = FreeImage_ConvertToUINT16(src); - break; - case FIT_INT16: - break; - case FIT_UINT32: - break; - case FIT_INT32: - break; - case FIT_FLOAT: - dst = FreeImage_ConvertToFloat(src); - break; - case FIT_DOUBLE: - break; - case FIT_COMPLEX: - break; - case FIT_RGB16: - dst = FreeImage_ConvertToRGB16(src); - break; - case FIT_RGBF: - dst = FreeImage_ConvertToRGBF(src); - break; - case FIT_RGBAF: - dst = FreeImage_ConvertToRGBAF(src); - break; - } - break; - case FIT_RGBF: - switch(dst_type) { - case FIT_BITMAP: - break; - case FIT_UINT16: - break; - case FIT_INT16: - break; - case FIT_UINT32: - break; - case FIT_INT32: - break; - case FIT_FLOAT: - dst = FreeImage_ConvertToFloat(src); - break; - case FIT_DOUBLE: - break; - case FIT_COMPLEX: - break; - case FIT_RGB16: - break; - case FIT_RGBA16: - break; - case FIT_RGBAF: - dst = FreeImage_ConvertToRGBAF(src); - break; - } - break; - case FIT_RGBAF: - switch(dst_type) { - case FIT_BITMAP: - break; - case FIT_UINT16: - break; - case FIT_INT16: - break; - case FIT_UINT32: - break; - case FIT_INT32: - break; - case FIT_FLOAT: - dst = FreeImage_ConvertToFloat(src); - break; - case FIT_DOUBLE: - break; - case FIT_COMPLEX: - break; - case FIT_RGB16: - break; - case FIT_RGBA16: - break; - case FIT_RGBF: - dst = FreeImage_ConvertToRGBF(src); - break; - } - break; - } - - if(NULL == dst) { - FreeImage_OutputMessageProc(FIF_UNKNOWN, "FREE_IMAGE_TYPE: Unable to convert from type %d to type %d.\n No such conversion exists.", src_type, dst_type); - } else { - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - } - - return dst; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/ConversionUINT16.cpp b/Dependencies/FreeImage/Source/FreeImage/ConversionUINT16.cpp deleted file mode 100644 index e6492aa..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/ConversionUINT16.cpp +++ /dev/null @@ -1,134 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// smart convert X to UINT16 -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -FreeImage_ConvertToUINT16(FIBITMAP *dib) { - FIBITMAP *src = NULL; - FIBITMAP *dst = NULL; - - if(!FreeImage_HasPixels(dib)) return NULL; - - const FREE_IMAGE_TYPE src_type = FreeImage_GetImageType(dib); - - // check for allowed conversions - switch(src_type) { - case FIT_BITMAP: - { - // convert to greyscale if needed - if((FreeImage_GetBPP(dib) == 8) && (FreeImage_GetColorType(dib) == FIC_MINISBLACK)) { - src = dib; - } else { - src = FreeImage_ConvertToGreyscale(dib); - if(!src) return NULL; - } - break; - } - case FIT_UINT16: - // UINT16 type : clone the src - return FreeImage_Clone(dib); - break; - case FIT_RGB16: - // allow conversion from 48-bit RGB - src = dib; - break; - case FIT_RGBA16: - // allow conversion from 64-bit RGBA (ignore the alpha channel) - src = dib; - break; - default: - return NULL; - } - - // allocate dst image - - const unsigned width = FreeImage_GetWidth(src); - const unsigned height = FreeImage_GetHeight(src); - - dst = FreeImage_AllocateT(FIT_UINT16, width, height); - if(!dst) { - if(src != dib) { - FreeImage_Unload(src); - } - return NULL; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - // convert from src type to UINT16 - - switch(src_type) { - case FIT_BITMAP: - { - for(unsigned y = 0; y < height; y++) { - const BYTE *src_bits = (BYTE*)FreeImage_GetScanLine(src, y); - WORD *dst_bits = (WORD*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - dst_bits[x] = src_bits[x] << 8; - } - } - } - break; - - case FIT_RGB16: - { - for(unsigned y = 0; y < height; y++) { - const FIRGB16 *src_bits = (FIRGB16*)FreeImage_GetScanLine(src, y); - WORD *dst_bits = (WORD*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - // convert to grey - dst_bits[x] = (WORD)LUMA_REC709(src_bits[x].red, src_bits[x].green, src_bits[x].blue); - } - } - } - break; - - case FIT_RGBA16: - { - for(unsigned y = 0; y < height; y++) { - const FIRGBA16 *src_bits = (FIRGBA16*)FreeImage_GetScanLine(src, y); - WORD *dst_bits = (WORD*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - // convert to grey - dst_bits[x] = (WORD)LUMA_REC709(src_bits[x].red, src_bits[x].green, src_bits[x].blue); - } - } - } - break; - - default: - break; - } - - if(src != dib) { - FreeImage_Unload(src); - } - - return dst; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/FreeImage.cpp b/Dependencies/FreeImage/Source/FreeImage/FreeImage.cpp deleted file mode 100644 index 2de6077..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/FreeImage.cpp +++ /dev/null @@ -1,226 +0,0 @@ -// ========================================================== -// FreeImage implementation -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// - Karl-Heinz Bussian (khbussian@moss.de) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - - -#ifdef _WIN32 -#include -#endif - -#include "FreeImage.h" -#include "Utilities.h" - -//---------------------------------------------------------------------- - -static const char *s_copyright = "This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details"; - -//---------------------------------------------------------------------- - -#if defined(_WIN32) && !defined(__MINGW32__) -#ifndef FREEIMAGE_LIB - -BOOL APIENTRY -DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { - switch (ul_reason_for_call) { - case DLL_PROCESS_ATTACH : - FreeImage_Initialise(FALSE); - break; - - case DLL_PROCESS_DETACH : - FreeImage_DeInitialise(); - break; - - case DLL_THREAD_ATTACH : - case DLL_THREAD_DETACH : - break; - } - - return TRUE; -} - -#endif // FREEIMAGE_LIB - -#else // !_WIN32 -#ifndef FREEIMAGE_LIB - -void FreeImage_SO_Initialise() __attribute__((constructor)); -void FreeImage_SO_DeInitialise() __attribute__((destructor)); - -void FreeImage_SO_Initialise() { - FreeImage_Initialise(FALSE); -} - -void FreeImage_SO_DeInitialise() { - FreeImage_DeInitialise(); -} -#endif // FREEIMAGE_LIB - -#endif // _WIN32 - -//---------------------------------------------------------------------- - -const char * DLL_CALLCONV -FreeImage_GetVersion() { - static char s_version[16]; - sprintf(s_version, "%d.%d.%d", FREEIMAGE_MAJOR_VERSION, FREEIMAGE_MINOR_VERSION, FREEIMAGE_RELEASE_SERIAL); - return s_version; -} - -const char * DLL_CALLCONV -FreeImage_GetCopyrightMessage() { - return s_copyright; -} - -//---------------------------------------------------------------------- - -BOOL DLL_CALLCONV -FreeImage_IsLittleEndian() { - union { - DWORD i; - BYTE c[4]; - } u; - u.i = 1; - return (u.c[0] != 0); -} - -//---------------------------------------------------------------------- - -static FreeImage_OutputMessageFunction freeimage_outputmessage_proc = NULL; -static FreeImage_OutputMessageFunctionStdCall freeimage_outputmessagestdcall_proc = NULL; - -void DLL_CALLCONV -FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf) { - freeimage_outputmessage_proc = omf; -} - -void DLL_CALLCONV -FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf) { - freeimage_outputmessagestdcall_proc = omf; -} - -void DLL_CALLCONV -FreeImage_OutputMessageProc(int fif, const char *fmt, ...) { - const int MSG_SIZE = 512; // 512 bytes should be more than enough for a short message - - if ((fmt != NULL) && ((freeimage_outputmessage_proc != NULL) || (freeimage_outputmessagestdcall_proc != NULL))) { - char message[MSG_SIZE]; - memset(message, 0, MSG_SIZE); - - // initialize the optional parameter list - - va_list arg; - va_start(arg, fmt); - - // check the length of the format string - - int str_length = (int)( (strlen(fmt) > MSG_SIZE) ? MSG_SIZE : strlen(fmt) ); - - // parse the format string and put the result in 'message' - - for (int i = 0, j = 0; i < str_length; ++i) { - if (fmt[i] == '%') { - if (i + 1 < str_length) { - switch(tolower(fmt[i + 1])) { - case '%' : - message[j++] = '%'; - break; - - case 'o' : // octal numbers - { - char tmp[16]; - - _itoa(va_arg(arg, int), tmp, 8); - - strcat(message, tmp); - - j += (int)strlen(tmp); - - ++i; - - break; - } - - case 'i' : // decimal numbers - case 'd' : - { - char tmp[16]; - - _itoa(va_arg(arg, int), tmp, 10); - - strcat(message, tmp); - - j += (int)strlen(tmp); - - ++i; - - break; - } - - case 'x' : // hexadecimal numbers - { - char tmp[16]; - - _itoa(va_arg(arg, int), tmp, 16); - - strcat(message, tmp); - - j += (int)strlen(tmp); - - ++i; - - break; - } - - case 's' : // strings - { - char *tmp = va_arg(arg, char*); - - strcat(message, tmp); - - j += (int)strlen(tmp); - - ++i; - - break; - } - }; - } else { - message[j++] = fmt[i]; - } - } else { - message[j++] = fmt[i]; - }; - } - - // deinitialize the optional parameter list - - va_end(arg); - - // output the message to the user program - - if (freeimage_outputmessage_proc != NULL) - freeimage_outputmessage_proc((FREE_IMAGE_FORMAT)fif, message); - - if (freeimage_outputmessagestdcall_proc != NULL) - freeimage_outputmessagestdcall_proc((FREE_IMAGE_FORMAT)fif, message); - } -} diff --git a/Dependencies/FreeImage/Source/FreeImage/FreeImageC.c b/Dependencies/FreeImage/Source/FreeImage/FreeImageC.c deleted file mode 100644 index 9e81259..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/FreeImageC.c +++ /dev/null @@ -1,22 +0,0 @@ -// ========================================================== -// Use from c compiler test file -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" diff --git a/Dependencies/FreeImage/Source/FreeImage/FreeImageIO.cpp b/Dependencies/FreeImage/Source/FreeImage/FreeImageIO.cpp deleted file mode 100644 index 83394f0..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/FreeImageIO.cpp +++ /dev/null @@ -1,175 +0,0 @@ -// ========================================================== -// Input/Output functions -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "FreeImageIO.h" - -// ===================================================================== -// File IO functions -// ===================================================================== - -unsigned DLL_CALLCONV -_ReadProc(void *buffer, unsigned size, unsigned count, fi_handle handle) { - return (unsigned)fread(buffer, size, count, (FILE *)handle); -} - -unsigned DLL_CALLCONV -_WriteProc(void *buffer, unsigned size, unsigned count, fi_handle handle) { - return (unsigned)fwrite(buffer, size, count, (FILE *)handle); -} - -int DLL_CALLCONV -_SeekProc(fi_handle handle, long offset, int origin) { - return fseek((FILE *)handle, offset, origin); -} - -long DLL_CALLCONV -_TellProc(fi_handle handle) { - return ftell((FILE *)handle); -} - -// ---------------------------------------------------------- - -void -SetDefaultIO(FreeImageIO *io) { - io->read_proc = _ReadProc; - io->seek_proc = _SeekProc; - io->tell_proc = _TellProc; - io->write_proc = _WriteProc; -} - -// ===================================================================== -// Memory IO functions -// ===================================================================== - -unsigned DLL_CALLCONV -_MemoryReadProc(void *buffer, unsigned size, unsigned count, fi_handle handle) { - unsigned x; - - FIMEMORYHEADER *mem_header = (FIMEMORYHEADER*)(((FIMEMORY*)handle)->data); - - for(x = 0; x < count; x++) { - long remaining_bytes = mem_header->file_length - mem_header->current_position; - //if there isn't size bytes left to read, set pos to eof and return a short count - if( remaining_bytes < (long)size ) { - if(remaining_bytes > 0) { - memcpy( buffer, (char *)mem_header->data + mem_header->current_position, remaining_bytes ); - } - mem_header->current_position = mem_header->file_length; - break; - } - //copy size bytes count times - memcpy( buffer, (char *)mem_header->data + mem_header->current_position, size ); - mem_header->current_position += size; - buffer = (char *)buffer + size; - } - return x; -} - -unsigned DLL_CALLCONV -_MemoryWriteProc(void *buffer, unsigned size, unsigned count, fi_handle handle) { - void *newdata; - long newdatalen; - - FIMEMORYHEADER *mem_header = (FIMEMORYHEADER*)(((FIMEMORY*)handle)->data); - - //double the data block size if we need to - while( (mem_header->current_position + (long)(size * count)) >= mem_header->data_length ) { - //if we are at or above 1G, we cant double without going negative - if( mem_header->data_length & 0x40000000 ) { - //max 2G - if( mem_header->data_length == 0x7FFFFFFF ) { - return 0; - } - newdatalen = 0x7FFFFFFF; - } else if( mem_header->data_length == 0 ) { - //default to 4K if nothing yet - newdatalen = 4096; - } else { - //double size - newdatalen = mem_header->data_length << 1; - } - newdata = realloc( mem_header->data, newdatalen ); - if( !newdata ) { - return 0; - } - mem_header->data = newdata; - mem_header->data_length = newdatalen; - } - memcpy( (char *)mem_header->data + mem_header->current_position, buffer, size * count ); - mem_header->current_position += size * count; - if( mem_header->current_position > mem_header->file_length ) { - mem_header->file_length = mem_header->current_position; - } - return count; -} - -int DLL_CALLCONV -_MemorySeekProc(fi_handle handle, long offset, int origin) { - FIMEMORYHEADER *mem_header = (FIMEMORYHEADER*)(((FIMEMORY*)handle)->data); - - // you can use _MemorySeekProc to reposition the pointer anywhere in a file - // the pointer can also be positioned beyond the end of the file - - switch(origin) { //0 to filelen-1 are 'inside' the file - default: - case SEEK_SET: //can fseek() to 0-7FFFFFFF always - if( offset >= 0 ) { - mem_header->current_position = offset; - return 0; - } - break; - - case SEEK_CUR: - if( mem_header->current_position + offset >= 0 ) { - mem_header->current_position += offset; - return 0; - } - break; - - case SEEK_END: - if( mem_header->file_length + offset >= 0 ) { - mem_header->current_position = mem_header->file_length + offset; - return 0; - } - break; - } - - return -1; -} - -long DLL_CALLCONV -_MemoryTellProc(fi_handle handle) { - FIMEMORYHEADER *mem_header = (FIMEMORYHEADER*)(((FIMEMORY*)handle)->data); - - return mem_header->current_position; -} - -// ---------------------------------------------------------- - -void -SetMemoryIO(FreeImageIO *io) { - io->read_proc = _MemoryReadProc; - io->seek_proc = _MemorySeekProc; - io->tell_proc = _MemoryTellProc; - io->write_proc = _MemoryWriteProc; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/GetType.cpp b/Dependencies/FreeImage/Source/FreeImage/GetType.cpp deleted file mode 100644 index 0430b58..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/GetType.cpp +++ /dev/null @@ -1,165 +0,0 @@ -// ========================================================== -// GetType / Validate -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include "FreeImage.h" -#include "Utilities.h" -#include "FreeImageIO.h" -#include "Plugin.h" - -// ===================================================================== -// Generic stream file type access -// ===================================================================== - -FREE_IMAGE_FORMAT DLL_CALLCONV -FreeImage_GetFileTypeFromHandle(FreeImageIO *io, fi_handle handle, int size) { - if (handle != NULL) { - int fif_count = FreeImage_GetFIFCount(); - - for (int i = 0; i < fif_count; ++i) { - FREE_IMAGE_FORMAT fif = (FREE_IMAGE_FORMAT)i; - if (FreeImage_ValidateFIF(fif, io, handle)) { - if(fif == FIF_TIFF) { - // many camera raw files use a TIFF signature ... - // ... try to revalidate against FIF_RAW (even if it breaks the code genericity) - if (FreeImage_ValidateFIF(FIF_RAW, io, handle)) { - return FIF_RAW; - } - } - return fif; - } - } - } - - return FIF_UNKNOWN; -} - -// ===================================================================== -// File stream file type access -// ===================================================================== - -FREE_IMAGE_FORMAT DLL_CALLCONV -FreeImage_GetFileType(const char *filename, int size) { - FreeImageIO io; - SetDefaultIO(&io); - - FILE *handle = fopen(filename, "rb"); - - if (handle != NULL) { - FREE_IMAGE_FORMAT format = FreeImage_GetFileTypeFromHandle(&io, (fi_handle)handle, size); - - fclose(handle); - - return format; - } - - return FIF_UNKNOWN; -} - -FREE_IMAGE_FORMAT DLL_CALLCONV -FreeImage_GetFileTypeU(const wchar_t *filename, int size) { -#ifdef _WIN32 - FreeImageIO io; - SetDefaultIO(&io); - FILE *handle = _wfopen(filename, L"rb"); - - if (handle != NULL) { - FREE_IMAGE_FORMAT format = FreeImage_GetFileTypeFromHandle(&io, (fi_handle)handle, size); - - fclose(handle); - - return format; - } -#endif - return FIF_UNKNOWN; -} - -// ===================================================================== -// Memory stream file type access -// ===================================================================== - -FREE_IMAGE_FORMAT DLL_CALLCONV -FreeImage_GetFileTypeFromMemory(FIMEMORY *stream, int size) { - FreeImageIO io; - SetMemoryIO(&io); - - if (stream != NULL) { - return FreeImage_GetFileTypeFromHandle(&io, (fi_handle)stream, size); - } - - return FIF_UNKNOWN; -} - -// -------------------------------------------------------------------------- - -BOOL DLL_CALLCONV -FreeImage_ValidateFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle) { - return FreeImage_ValidateFIF(fif, io, handle); -} - -BOOL DLL_CALLCONV -FreeImage_Validate(FREE_IMAGE_FORMAT fif, const char *filename) { - FreeImageIO io; - SetDefaultIO(&io); - - FILE *handle = fopen(filename, "rb"); - - if (handle != NULL) { - BOOL bIsValidFIF = FreeImage_ValidateFromHandle(fif, &io, (fi_handle)handle); - fclose(handle); - return bIsValidFIF; - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_ValidateU(FREE_IMAGE_FORMAT fif, const wchar_t *filename) { -#ifdef _WIN32 - FreeImageIO io; - SetDefaultIO(&io); - FILE *handle = _wfopen(filename, L"rb"); - - if (handle != NULL) { - BOOL bIsValidFIF = FreeImage_ValidateFromHandle(fif, &io, (fi_handle)handle); - fclose(handle); - return bIsValidFIF; - } -#endif - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_ValidateFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream) { - FreeImageIO io; - SetMemoryIO(&io); - - if (stream != NULL) { - BOOL bIsValidFIF = FreeImage_ValidateFromHandle(fif, &io, (fi_handle)stream); - return bIsValidFIF; - } - - return FALSE; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/Halftoning.cpp b/Dependencies/FreeImage/Source/FreeImage/Halftoning.cpp deleted file mode 100644 index 313cc26..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/Halftoning.cpp +++ /dev/null @@ -1,474 +0,0 @@ -// ========================================================== -// Bitmap conversion routines -// Thresholding and halftoning functions -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Dennis Lim (dlkj@users.sourceforge.net) -// - Thomas Chmielewski (Chmielewski.Thomas@oce.de) -// -// Main reference : Ulichney, R., Digital Halftoning, The MIT Press, Cambridge, MA, 1987 -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -static const int WHITE = 255; -static const int BLACK = 0; - -// Floyd & Steinberg error diffusion dithering -// This algorithm use the following filter -// * 7 -// 3 5 1 (1/16) -static FIBITMAP* FloydSteinberg(FIBITMAP *dib) { - -#define RAND(RN) (((seed = 1103515245 * seed + 12345) >> 12) % (RN)) -#define INITERR(X, Y) (((int) X) - (((int) Y) ? WHITE : BLACK) + ((WHITE/2)-((int)X)) / 2) - - int seed = 0; - int x, y, p, pixel, threshold, error; - int width, height, pitch; - BYTE *bits, *new_bits; - FIBITMAP *new_dib = NULL; - - // allocate a 8-bit DIB - width = FreeImage_GetWidth(dib); - height = FreeImage_GetHeight(dib); - pitch = FreeImage_GetPitch(dib); - new_dib = FreeImage_Allocate(width, height, 8); - if(NULL == new_dib) return NULL; - - // allocate space for error arrays - int *lerr = (int*)malloc (width * sizeof(int)); - int *cerr = (int*)malloc (width * sizeof(int)); - memset(lerr, 0, width * sizeof(int)); - memset(cerr, 0, width * sizeof(int)); - - // left border - error = 0; - for(y = 0; y < height; y++) { - bits = FreeImage_GetScanLine(dib, y); - new_bits = FreeImage_GetScanLine(new_dib, y); - - threshold = (WHITE / 2 + RAND(129) - 64); - pixel = bits[0] + error; - p = (pixel > threshold) ? WHITE : BLACK; - error = pixel - p; - new_bits[0] = (BYTE)p; - } - // right border - error = 0; - for(y = 0; y < height; y++) { - bits = FreeImage_GetScanLine(dib, y); - new_bits = FreeImage_GetScanLine(new_dib, y); - - threshold = (WHITE / 2 + RAND(129) - 64); - pixel = bits[width-1] + error; - p = (pixel > threshold) ? WHITE : BLACK; - error = pixel - p; - new_bits[width-1] = (BYTE)p; - } - // top border - bits = FreeImage_GetBits(dib); - new_bits = FreeImage_GetBits(new_dib); - error = 0; - for(x = 0; x < width; x++) { - threshold = (WHITE / 2 + RAND(129) - 64); - pixel = bits[x] + error; - p = (pixel > threshold) ? WHITE : BLACK; - error = pixel - p; - new_bits[x] = (BYTE)p; - lerr[x] = INITERR(bits[x], p); - } - - // interior bits - for(y = 1; y < height; y++) { - // scan left to right - bits = FreeImage_GetScanLine(dib, y); - new_bits = FreeImage_GetScanLine(new_dib, y); - - cerr[0] = INITERR(bits[0], new_bits[0]); - for(x = 1; x < width - 1; x++) { - error = (lerr[x-1] + 5 * lerr[x] + 3 * lerr[x+1] + 7 * cerr[x-1]) / 16; - pixel = bits[x] + error; - if(pixel > (WHITE / 2)) { - new_bits[x] = WHITE; - cerr[x] = pixel - WHITE; - } else { - new_bits[x] = BLACK; - cerr[x] = pixel - BLACK; - } - } - // set errors for ends of the row - cerr[0] = INITERR (bits[0], new_bits[0]); - cerr[width - 1] = INITERR (bits[width - 1], new_bits[width - 1]); - - // swap error buffers - int *terr = lerr; lerr = cerr; cerr = terr; - } - - free(lerr); - free(cerr); - - return new_dib; -} - -// ========================================================== -// Bayer ordered dispersed dot dithering -// - -// Function taken from "Ordered Dithering, Stephen Hawley, Graphics Gems, Academic Press, 1990" -// This function is used to generate a Bayer dithering matrice whose dimension are 2^size by 2^size -// -static int dithervalue(int x, int y, int size) { - int d = 0; - /* - * calculate the dither value at a particular - * (x, y) over the size of the matrix. - */ - while (size-->0) { - /* Think of d as the density. At every iteration, - * d is shifted left one and a new bit is put in the - * low bit based on x and y. If x is odd and y is even, - * or x is even and y is odd, a bit is put in. This - * generates the checkerboard seen in dithering. - * This quantity is shifted left again and the low bit of - * y is added in. - * This whole thing interleaves a checkerboard bit pattern - * and y's bits, which is the value you want. - */ - d = (d <<1 | (x&1 ^ y&1))<<1 | y&1; - x >>= 1; - y >>= 1; - } - return d; -} - -// Ordered dithering with a Bayer matrix of size 2^order by 2^order -// -static FIBITMAP* OrderedDispersedDot(FIBITMAP *dib, int order) { - int x, y; - int width, height; - BYTE *bits, *new_bits; - FIBITMAP *new_dib = NULL; - - // allocate a 8-bit DIB - width = FreeImage_GetWidth(dib); - height = FreeImage_GetHeight(dib); - new_dib = FreeImage_Allocate(width, height, 8); - if(NULL == new_dib) return NULL; - - // build the dithering matrix - int l = (1 << order); // square of dither matrix order; the dimensions of the matrix - BYTE *matrix = (BYTE*)malloc(l*l * sizeof(BYTE)); - for(int i = 0; i < l*l; i++) { - // according to "Purdue University: Digital Image Processing Laboratory: Image Halftoning, April 30th, 2006 - matrix[i] = (BYTE)( 255 * (((double)dithervalue(i / l, i % l, order) + 0.5) / (l*l)) ); - } - - // perform the dithering - for(y = 0; y < height; y++) { - // scan left to right - bits = FreeImage_GetScanLine(dib, y); - new_bits = FreeImage_GetScanLine(new_dib, y); - for(x = 0; x < width; x++) { - if(bits[x] > matrix[(x % l) + l * (y % l)]) { - new_bits[x] = WHITE; - } else { - new_bits[x] = BLACK; - } - } - } - - free(matrix); - - return new_dib; -} - -// ========================================================== -// Ordered clustered dot dithering -// - -// NB : The predefined dither matrices are the same as matrices used in -// the Netpbm package (http://netpbm.sourceforge.net) and are defined in Ulichney's book. -// See also : The newsprint web site at http://www.cl.cam.ac.uk/~and1000/newsprint/ -// for more technical info on this dithering technique -// -static FIBITMAP* OrderedClusteredDot(FIBITMAP *dib, int order) { - // Order-3 clustered dithering matrix. - int cluster3[] = { - 9,11,10, 8, 6, 7, - 12,17,16, 5, 0, 1, - 13,14,15, 4, 3, 2, - 8, 6, 7, 9,11,10, - 5, 0, 1,12,17,16, - 4, 3, 2,13,14,15 - }; - - // Order-4 clustered dithering matrix. - int cluster4[] = { - 18,20,19,16,13,11,12,15, - 27,28,29,22, 4, 3, 2, 9, - 26,31,30,21, 5, 0, 1,10, - 23,25,24,17, 8, 6, 7,14, - 13,11,12,15,18,20,19,16, - 4, 3, 2, 9,27,28,29,22, - 5, 0, 1,10,26,31,30,21, - 8, 6, 7,14,23,25,24,17 - }; - - // Order-8 clustered dithering matrix. - int cluster8[] = { - 64, 69, 77, 87, 86, 76, 68, 67, 63, 58, 50, 40, 41, 51, 59, 60, - 70, 94,100,109,108, 99, 93, 75, 57, 33, 27, 18, 19, 28, 34, 52, - 78,101,114,116,115,112, 98, 83, 49, 26, 13, 11, 12, 15, 29, 44, - 88,110,123,124,125,118,107, 85, 39, 17, 4, 3, 2, 9, 20, 42, - 89,111,122,127,126,117,106, 84, 38, 16, 5, 0, 1, 10, 21, 43, - 79,102,119,121,120,113, 97, 82, 48, 25, 8, 6, 7, 14, 30, 45, - 71, 95,103,104,105, 96, 92, 74, 56, 32, 24, 23, 22, 31, 35, 53, - 65, 72, 80, 90, 91, 81, 73, 66, 62, 55, 47, 37, 36, 46, 54, 61, - 63, 58, 50, 40, 41, 51, 59, 60, 64, 69, 77, 87, 86, 76, 68, 67, - 57, 33, 27, 18, 19, 28, 34, 52, 70, 94,100,109,108, 99, 93, 75, - 49, 26, 13, 11, 12, 15, 29, 44, 78,101,114,116,115,112, 98, 83, - 39, 17, 4, 3, 2, 9, 20, 42, 88,110,123,124,125,118,107, 85, - 38, 16, 5, 0, 1, 10, 21, 43, 89,111,122,127,126,117,106, 84, - 48, 25, 8, 6, 7, 14, 30, 45, 79,102,119,121,120,113, 97, 82, - 56, 32, 24, 23, 22, 31, 35, 53, 71, 95,103,104,105, 96, 92, 74, - 62, 55, 47, 37, 36, 46, 54, 61, 65, 72, 80, 90, 91, 81, 73, 66 - }; - - int x, y, pixel; - int width, height; - BYTE *bits, *new_bits; - FIBITMAP *new_dib = NULL; - - // allocate a 8-bit DIB - width = FreeImage_GetWidth(dib); - height = FreeImage_GetHeight(dib); - new_dib = FreeImage_Allocate(width, height, 8); - if(NULL == new_dib) return NULL; - - // select the dithering matrix - int *matrix = NULL; - switch(order) { - case 3: - matrix = &cluster3[0]; - break; - case 4: - matrix = &cluster4[0]; - break; - case 8: - matrix = &cluster8[0]; - break; - default: - return NULL; - } - - // scale the dithering matrix - int l = 2 * order; - int scale = 256 / (l * order); - for(y = 0; y < l; y++) { - for(x = 0; x < l; x++) { - matrix[y*l + x] *= scale; - } - } - - // perform the dithering - for(y = 0; y < height; y++) { - // scan left to right - bits = FreeImage_GetScanLine(dib, y); - new_bits = FreeImage_GetScanLine(new_dib, y); - for(x = 0; x < width; x++) { - pixel = bits[x]; - if(pixel >= matrix[(y % l) + l * (x % l)]) { - new_bits[x] = WHITE; - } else { - new_bits[x] = BLACK; - } - } - } - - return new_dib; -} - - -// ========================================================== -// Halftoning function -// -FIBITMAP * DLL_CALLCONV -FreeImage_Dither(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm) { - FIBITMAP *input = NULL, *dib8 = NULL; - - if(!FreeImage_HasPixels(dib)) return NULL; - - const unsigned bpp = FreeImage_GetBPP(dib); - - if(bpp == 1) { - // Just clone the dib and adjust the palette if needed - FIBITMAP *new_dib = FreeImage_Clone(dib); - if(NULL == new_dib) return NULL; - if(FreeImage_GetColorType(new_dib) == FIC_PALETTE) { - // Build a monochrome palette - RGBQUAD *pal = FreeImage_GetPalette(new_dib); - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 0; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 255; - } - return new_dib; - } - - // Convert the input dib to a 8-bit greyscale dib - // - switch(bpp) { - case 8: - if(FreeImage_GetColorType(dib) == FIC_MINISBLACK) { - input = dib; - } else { - input = FreeImage_ConvertToGreyscale(dib); - } - break; - case 4: - case 16: - case 24: - case 32: - input = FreeImage_ConvertToGreyscale(dib); - break; - } - if(NULL == input) return NULL; - - // Apply the dithering algorithm - switch(algorithm) { - case FID_FS: - dib8 = FloydSteinberg(input); - break; - case FID_BAYER4x4: - dib8 = OrderedDispersedDot(input, 2); - break; - case FID_BAYER8x8: - dib8 = OrderedDispersedDot(input, 3); - break; - case FID_BAYER16x16: - dib8 = OrderedDispersedDot(input, 4); - break; - case FID_CLUSTER6x6: - dib8 = OrderedClusteredDot(input, 3); - break; - case FID_CLUSTER8x8: - dib8 = OrderedClusteredDot(input, 4); - break; - case FID_CLUSTER16x16: - dib8 = OrderedClusteredDot(input, 8); - break; - } - if(input != dib) { - FreeImage_Unload(input); - } - - // Build a greyscale palette (needed by threshold) - RGBQUAD *grey_pal = FreeImage_GetPalette(dib8); - for(int i = 0; i < 256; i++) { - grey_pal[i].rgbRed = (BYTE)i; - grey_pal[i].rgbGreen = (BYTE)i; - grey_pal[i].rgbBlue = (BYTE)i; - } - - // Convert to 1-bit - FIBITMAP *new_dib = FreeImage_Threshold(dib8, 128); - FreeImage_Unload(dib8); - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - return new_dib; -} - -// ========================================================== -// Thresholding function -// -FIBITMAP * DLL_CALLCONV -FreeImage_Threshold(FIBITMAP *dib, BYTE T) { - FIBITMAP *dib8 = NULL; - - if(!FreeImage_HasPixels(dib)) return NULL; - - const unsigned bpp = FreeImage_GetBPP(dib); - - if(bpp == 1) { - // Just clone the dib and adjust the palette if needed - FIBITMAP *new_dib = FreeImage_Clone(dib); - if(NULL == new_dib) return NULL; - if(FreeImage_GetColorType(new_dib) == FIC_PALETTE) { - // Build a monochrome palette - RGBQUAD *pal = FreeImage_GetPalette(new_dib); - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 0; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 255; - } - return new_dib; - } - - // Convert the input dib to a 8-bit greyscale dib - // - switch(bpp) { - case 8: - if(FreeImage_GetColorType(dib) == FIC_MINISBLACK) { - dib8 = dib; - } else { - dib8 = FreeImage_ConvertToGreyscale(dib); - } - break; - case 4: - case 16: - case 24: - case 32: - dib8 = FreeImage_ConvertToGreyscale(dib); - break; - } - if(NULL == dib8) return NULL; - - // Allocate a new 1-bit DIB - int width = FreeImage_GetWidth(dib); - int height = FreeImage_GetHeight(dib); - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 1); - if(NULL == new_dib) return NULL; - // Build a monochrome palette - RGBQUAD *pal = FreeImage_GetPalette(new_dib); - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 0; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 255; - - // Perform the thresholding - // - for(int y = 0; y < height; y++) { - BYTE *bits8 = FreeImage_GetScanLine(dib8, y); - BYTE *bits1 = FreeImage_GetScanLine(new_dib, y); - for(int x = 0; x < width; x++) { - if(bits8[x] < T) { - // Set bit(x, y) to 0 - bits1[x >> 3] &= (0xFF7F >> (x & 0x7)); - } else { - // Set bit(x, y) to 1 - bits1[x >> 3] |= (0x80 >> (x & 0x7)); - } - } - } - if(dib8 != dib) { - FreeImage_Unload(dib8); - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(new_dib, dib); - - return new_dib; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/J2KHelper.cpp b/Dependencies/FreeImage/Source/FreeImage/J2KHelper.cpp deleted file mode 100644 index 1776c3b..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/J2KHelper.cpp +++ /dev/null @@ -1,591 +0,0 @@ -// ========================================================== -// JPEG2000 helpers -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "../LibOpenJPEG/openjpeg.h" -#include "J2KHelper.h" - -// -------------------------------------------------------------------------- - -static OPJ_UINT64 -_LengthProc(J2KFIO_t *fio) { - long start_pos = fio->io->tell_proc(fio->handle); - fio->io->seek_proc(fio->handle, 0, SEEK_END); - unsigned file_length = fio->io->tell_proc(fio->handle) - start_pos; - fio->io->seek_proc(fio->handle, start_pos, SEEK_SET); - return (OPJ_UINT64)file_length; -} - -static OPJ_SIZE_T -_ReadProc(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data) { - J2KFIO_t *fio = (J2KFIO_t*)p_user_data; - OPJ_SIZE_T l_nb_read = fio->io->read_proc(p_buffer, 1, (unsigned)p_nb_bytes, fio->handle); - return l_nb_read ? l_nb_read : (OPJ_SIZE_T)-1; -} - -static OPJ_SIZE_T -_WriteProc(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data) { - J2KFIO_t *fio = (J2KFIO_t*)p_user_data; - return fio->io->write_proc(p_buffer, 1, (unsigned)p_nb_bytes, fio->handle); -} - -static OPJ_OFF_T -_SkipProc(OPJ_OFF_T p_nb_bytes, void *p_user_data) { - J2KFIO_t *fio = (J2KFIO_t*)p_user_data; - if( fio->io->seek_proc(fio->handle, (long)p_nb_bytes, SEEK_CUR) ) { - return -1; - } - return p_nb_bytes; -} - -static OPJ_BOOL -_SeekProc(OPJ_OFF_T p_nb_bytes, FILE * p_user_data) { - J2KFIO_t *fio = (J2KFIO_t*)p_user_data; - if( fio->io->seek_proc(fio->handle, (long)p_nb_bytes, SEEK_SET) ) { - return OPJ_FALSE; - } - return OPJ_TRUE; -} - -// -------------------------------------------------------------------------- - -J2KFIO_t* -opj_freeimage_stream_create(FreeImageIO *io, fi_handle handle, BOOL bRead) { - if(!handle) { - return NULL; - } - J2KFIO_t *fio = (J2KFIO_t*)malloc(sizeof(J2KFIO_t)); - if(fio) { - fio->io = io; - fio->handle = handle; - - opj_stream_t *l_stream = opj_stream_create(OPJ_J2K_STREAM_CHUNK_SIZE, bRead ? OPJ_TRUE : OPJ_FALSE); - if (l_stream) { - opj_stream_set_user_data(l_stream, fio, NULL); - opj_stream_set_user_data_length(l_stream, _LengthProc(fio)); - opj_stream_set_read_function(l_stream, (opj_stream_read_fn)_ReadProc); - opj_stream_set_write_function(l_stream, (opj_stream_write_fn)_WriteProc); - opj_stream_set_skip_function(l_stream, (opj_stream_skip_fn)_SkipProc); - opj_stream_set_seek_function(l_stream, (opj_stream_seek_fn)_SeekProc); - fio->stream = l_stream; - return fio; - } else { - free(fio); - } - } - - return NULL; -} - -void -opj_freeimage_stream_destroy(J2KFIO_t* fio) { - if(fio) { - if(fio->stream) { - opj_stream_destroy(fio->stream); - } - free(fio); - } -} - -// -------------------------------------------------------------------------- - -/** -Divide an integer by a power of 2 and round upwards -@return Returns a divided by 2^b -*/ -static int int_ceildivpow2(int a, int b) { - return (a + (1 << b) - 1) >> b; -} - -/** -Convert a OpenJPEG image to a FIBITMAP -@param format_id Plugin ID -@param image OpenJPEG image -@param header_only If TRUE, allocate a 'header only' FIBITMAP, otherwise allocate a full FIBITMAP -@return Returns the converted image if successful, returns NULL otherwise -*/ -FIBITMAP* J2KImageToFIBITMAP(int format_id, const opj_image_t *image, BOOL header_only) { - FIBITMAP *dib = NULL; - - try { - // compute image width and height - - //int w = int_ceildiv(image->x1 - image->x0, image->comps[0].dx); - int wr = image->comps[0].w; - int wrr = int_ceildivpow2(image->comps[0].w, image->comps[0].factor); - - //int h = int_ceildiv(image->y1 - image->y0, image->comps[0].dy); - //int hr = image->comps[0].h; - int hrr = int_ceildivpow2(image->comps[0].h, image->comps[0].factor); - - // check the number of components - - int numcomps = image->numcomps; - - BOOL bIsValid = TRUE; - for(int c = 0; c < numcomps - 1; c++) { - if( (image->comps[c].dx == image->comps[c+1].dx) && - (image->comps[c].dy == image->comps[c+1].dy) && - (image->comps[c].prec == image->comps[c+1].prec) ) { - continue; - } else { - bIsValid = FALSE; - break; - } - } - bIsValid &= ((numcomps == 1) || (numcomps == 3) || (numcomps == 4)); - if(!bIsValid) { - if(numcomps) { - FreeImage_OutputMessageProc(format_id, "Warning: image contains %d greyscale components. Only the first will be loaded.\n", numcomps); - numcomps = 1; - } else { - // unknown type - throw FI_MSG_ERROR_UNSUPPORTED_FORMAT; - } - } - - // create a new DIB - - if(image->comps[0].prec <= 8) { - switch(numcomps) { - case 1: - dib = FreeImage_AllocateHeader(header_only, wrr, hrr, 8); - break; - case 3: - dib = FreeImage_AllocateHeader(header_only, wrr, hrr, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - break; - case 4: - dib = FreeImage_AllocateHeader(header_only, wrr, hrr, 32, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - break; - } - } else if(image->comps[0].prec <= 16) { - switch(numcomps) { - case 1: - dib = FreeImage_AllocateHeaderT(header_only, FIT_UINT16, wrr, hrr); - break; - case 3: - dib = FreeImage_AllocateHeaderT(header_only, FIT_RGB16, wrr, hrr); - break; - case 4: - dib = FreeImage_AllocateHeaderT(header_only, FIT_RGBA16, wrr, hrr); - break; - } - } else { - throw FI_MSG_ERROR_UNSUPPORTED_FORMAT; - } - if(!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // "header only" FIBITMAP ? - if(header_only) { - return dib; - } - - if(image->comps[0].prec <= 8) { - if(numcomps == 1) { - // 8-bit greyscale - // ---------------------------------------------------------- - - // build a greyscale palette - - RGBQUAD *pal = FreeImage_GetPalette(dib); - for (int i = 0; i < 256; i++) { - pal[i].rgbRed = (BYTE)i; - pal[i].rgbGreen = (BYTE)i; - pal[i].rgbBlue = (BYTE)i; - } - - // load pixel data - - unsigned pixel_count = 0; - - for(int y = 0; y < hrr; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, hrr - 1 - y); - - for(int x = 0; x < wrr; x++) { - const unsigned pixel_pos = pixel_count / wrr * wr + pixel_count % wrr; - - int index = image->comps[0].data[pixel_pos]; - index += (image->comps[0].sgnd ? 1 << (image->comps[0].prec - 1) : 0); - - bits[x] = (BYTE)index; - - pixel_count++; - } - } - } - else if(numcomps == 3) { - - // 24-bit RGB - // ---------------------------------------------------------- - - // load pixel data - - unsigned pixel_count = 0; - - for(int y = 0; y < hrr; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, hrr - 1 - y); - - for(int x = 0; x < wrr; x++) { - const unsigned pixel_pos = pixel_count / wrr * wr + pixel_count % wrr; - - int r = image->comps[0].data[pixel_pos]; - r += (image->comps[0].sgnd ? 1 << (image->comps[0].prec - 1) : 0); - - int g = image->comps[1].data[pixel_pos]; - g += (image->comps[1].sgnd ? 1 << (image->comps[1].prec - 1) : 0); - - int b = image->comps[2].data[pixel_pos]; - b += (image->comps[2].sgnd ? 1 << (image->comps[2].prec - 1) : 0); - - bits[FI_RGBA_RED] = (BYTE)r; - bits[FI_RGBA_GREEN] = (BYTE)g; - bits[FI_RGBA_BLUE] = (BYTE)b; - bits += 3; - - pixel_count++; - } - } - } - else if(numcomps == 4) { - - // 32-bit RGBA - // ---------------------------------------------------------- - - // load pixel data - - unsigned pixel_count = 0; - - for(int y = 0; y < hrr; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, hrr - 1 - y); - - for(int x = 0; x < wrr; x++) { - const unsigned pixel_pos = pixel_count / wrr * wr + pixel_count % wrr; - - int r = image->comps[0].data[pixel_pos]; - r += (image->comps[0].sgnd ? 1 << (image->comps[0].prec - 1) : 0); - - int g = image->comps[1].data[pixel_pos]; - g += (image->comps[1].sgnd ? 1 << (image->comps[1].prec - 1) : 0); - - int b = image->comps[2].data[pixel_pos]; - b += (image->comps[2].sgnd ? 1 << (image->comps[2].prec - 1) : 0); - - int a = image->comps[3].data[pixel_pos]; - a += (image->comps[3].sgnd ? 1 << (image->comps[3].prec - 1) : 0); - - bits[FI_RGBA_RED] = (BYTE)r; - bits[FI_RGBA_GREEN] = (BYTE)g; - bits[FI_RGBA_BLUE] = (BYTE)b; - bits[FI_RGBA_ALPHA] = (BYTE)a; - bits += 4; - - pixel_count++; - } - } - } - } - else if(image->comps[0].prec <= 16) { - if(numcomps == 1) { - // 16-bit greyscale - // ---------------------------------------------------------- - - // load pixel data - - unsigned pixel_count = 0; - - for(int y = 0; y < hrr; y++) { - WORD *bits = (WORD*)FreeImage_GetScanLine(dib, hrr - 1 - y); - - for(int x = 0; x < wrr; x++) { - const unsigned pixel_pos = pixel_count / wrr * wr + pixel_count % wrr; - - int index = image->comps[0].data[pixel_pos]; - index += (image->comps[0].sgnd ? 1 << (image->comps[0].prec - 1) : 0); - - bits[x] = (WORD)index; - - pixel_count++; - } - } - } - else if(numcomps == 3) { - - // 48-bit RGB - // ---------------------------------------------------------- - - // load pixel data - - unsigned pixel_count = 0; - - for(int y = 0; y < hrr; y++) { - FIRGB16 *bits = (FIRGB16*)FreeImage_GetScanLine(dib, hrr - 1 - y); - - for(int x = 0; x < wrr; x++) { - const unsigned pixel_pos = pixel_count / wrr * wr + pixel_count % wrr; - - int r = image->comps[0].data[pixel_pos]; - r += (image->comps[0].sgnd ? 1 << (image->comps[0].prec - 1) : 0); - - int g = image->comps[1].data[pixel_pos]; - g += (image->comps[1].sgnd ? 1 << (image->comps[1].prec - 1) : 0); - - int b = image->comps[2].data[pixel_pos]; - b += (image->comps[2].sgnd ? 1 << (image->comps[2].prec - 1) : 0); - - bits[x].red = (WORD)r; - bits[x].green = (WORD)g; - bits[x].blue = (WORD)b; - - pixel_count++; - } - } - } - else if(numcomps == 4) { - - // 64-bit RGBA - // ---------------------------------------------------------- - - // load pixel data - - unsigned pixel_count = 0; - - for(int y = 0; y < hrr; y++) { - FIRGBA16 *bits = (FIRGBA16*)FreeImage_GetScanLine(dib, hrr - 1 - y); - - for(int x = 0; x < wrr; x++) { - const unsigned pixel_pos = pixel_count / wrr * wr + pixel_count % wrr; - - int r = image->comps[0].data[pixel_pos]; - r += (image->comps[0].sgnd ? 1 << (image->comps[0].prec - 1) : 0); - - int g = image->comps[1].data[pixel_pos]; - g += (image->comps[1].sgnd ? 1 << (image->comps[1].prec - 1) : 0); - - int b = image->comps[2].data[pixel_pos]; - b += (image->comps[2].sgnd ? 1 << (image->comps[2].prec - 1) : 0); - - int a = image->comps[3].data[pixel_pos]; - a += (image->comps[3].sgnd ? 1 << (image->comps[3].prec - 1) : 0); - - bits[x].red = (WORD)r; - bits[x].green = (WORD)g; - bits[x].blue = (WORD)b; - bits[x].alpha = (WORD)a; - - pixel_count++; - } - } - } - } - - return dib; - - } catch(const char *text) { - if(dib) FreeImage_Unload(dib); - FreeImage_OutputMessageProc(format_id, text); - return NULL; - } - -} - -/** -Convert a FIBITMAP to a OpenJPEG image -@param format_id Plugin ID -@param dib FreeImage image -@param parameters Compression parameters -@return Returns the converted image if successful, returns NULL otherwise -*/ -opj_image_t* FIBITMAPToJ2KImage(int format_id, FIBITMAP *dib, const opj_cparameters_t *parameters) { - int prec, numcomps, x, y, index; - OPJ_COLOR_SPACE color_space; - opj_image_cmptparm_t cmptparm[4]; // maximum of 4 components - opj_image_t *image = NULL; // image to encode - - try { - int w = FreeImage_GetWidth(dib); - int h = FreeImage_GetHeight(dib); - - // get image characteristics - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - - if(image_type == FIT_BITMAP) { - // standard image ... - prec = 8; - switch(FreeImage_GetColorType(dib)) { - case FIC_MINISBLACK: - numcomps = 1; - color_space = OPJ_CLRSPC_GRAY; - break; - case FIC_RGB: - if(FreeImage_GetBPP(dib) == 32) { - // 32-bit image with a fully opaque layer - numcomps = 4; - color_space = OPJ_CLRSPC_SRGB; - } else { - // 24-bit image - numcomps = 3; - color_space = OPJ_CLRSPC_SRGB; - } - break; - case FIC_RGBALPHA: - numcomps = 4; - color_space = OPJ_CLRSPC_SRGB; - break; - default: - return NULL; - } - } else { - // HDR image ... - prec = 16; - switch(image_type) { - case FIT_UINT16: - numcomps = 1; - color_space = OPJ_CLRSPC_GRAY; - break; - case FIT_RGB16: - numcomps = 3; - color_space = OPJ_CLRSPC_SRGB; - break; - case FIT_RGBA16: - numcomps = 4; - color_space = OPJ_CLRSPC_SRGB; - break; - default: - return NULL; - } - } - - // initialize image components - memset(&cmptparm[0], 0, 4 * sizeof(opj_image_cmptparm_t)); - for(int i = 0; i < numcomps; i++) { - cmptparm[i].dx = parameters->subsampling_dx; - cmptparm[i].dy = parameters->subsampling_dy; - cmptparm[i].w = w; - cmptparm[i].h = h; - cmptparm[i].prec = prec; - cmptparm[i].bpp = prec; - cmptparm[i].sgnd = 0; - } - // create the image - image = opj_image_create(numcomps, &cmptparm[0], color_space); - if(!image) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // set image offset and reference grid - image->x0 = parameters->image_offset_x0; - image->y0 = parameters->image_offset_y0; - image->x1 = parameters->image_offset_x0 + (w - 1) * parameters->subsampling_dx + 1; - image->y1 = parameters->image_offset_y0 + (h - 1) * parameters->subsampling_dy + 1; - - // set image data - if(prec == 8) { - switch(numcomps) { - case 1: - index = 0; - for(y = 0; y < h; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, h - 1 - y); - for(x = 0; x < w; x++) { - image->comps[0].data[index] = bits[x]; - index++; - } - } - break; - case 3: - index = 0; - for(y = 0; y < h; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, h - 1 - y); - for(x = 0; x < w; x++) { - image->comps[0].data[index] = bits[FI_RGBA_RED]; - image->comps[1].data[index] = bits[FI_RGBA_GREEN]; - image->comps[2].data[index] = bits[FI_RGBA_BLUE]; - bits += 3; - index++; - } - } - break; - case 4: - index = 0; - for(y = 0; y < h; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, h - 1 - y); - for(x = 0; x < w; x++) { - image->comps[0].data[index] = bits[FI_RGBA_RED]; - image->comps[1].data[index] = bits[FI_RGBA_GREEN]; - image->comps[2].data[index] = bits[FI_RGBA_BLUE]; - image->comps[3].data[index] = bits[FI_RGBA_ALPHA]; - bits += 4; - index++; - } - } - break; - } - } - else if(prec == 16) { - switch(numcomps) { - case 1: - index = 0; - for(y = 0; y < h; y++) { - WORD *bits = (WORD*)FreeImage_GetScanLine(dib, h - 1 - y); - for(x = 0; x < w; x++) { - image->comps[0].data[index] = bits[x]; - index++; - } - } - break; - case 3: - index = 0; - for(y = 0; y < h; y++) { - FIRGB16 *bits = (FIRGB16*)FreeImage_GetScanLine(dib, h - 1 - y); - for(x = 0; x < w; x++) { - image->comps[0].data[index] = bits[x].red; - image->comps[1].data[index] = bits[x].green; - image->comps[2].data[index] = bits[x].blue; - index++; - } - } - break; - case 4: - index = 0; - for(y = 0; y < h; y++) { - FIRGBA16 *bits = (FIRGBA16*)FreeImage_GetScanLine(dib, h - 1 - y); - for(x = 0; x < w; x++) { - image->comps[0].data[index] = bits[x].red; - image->comps[1].data[index] = bits[x].green; - image->comps[2].data[index] = bits[x].blue; - image->comps[3].data[index] = bits[x].alpha; - index++; - } - } - break; - } - } - - return image; - - } catch (const char *text) { - if(image) opj_image_destroy(image); - FreeImage_OutputMessageProc(format_id, text); - return NULL; - } -} diff --git a/Dependencies/FreeImage/Source/FreeImage/J2KHelper.h b/Dependencies/FreeImage/Source/FreeImage/J2KHelper.h deleted file mode 100644 index ab23d8a..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/J2KHelper.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef FREEIMAGE_J2K_HELPER_H -#define FREEIMAGE_J2K_HELPER_H - -// ========================================================== -// Helper functions (see J2KHelper.cpp) -// ========================================================== - -/** -FreeImageIO wrapper -*/ -typedef struct tagJ2KFIO_t { - FreeImageIO *io; //! FreeImage IO - fi_handle handle; //! FreeImage handle - opj_stream_t *stream; //! OpenJPEG stream -} J2KFIO_t; - -/** -Stream constructor -*/ -J2KFIO_t* opj_freeimage_stream_create(FreeImageIO *io, fi_handle handle, BOOL bRead); - -/** -Stream destructor -*/ -void opj_freeimage_stream_destroy(J2KFIO_t* fio); - -/** -Conversion opj_image_t => FIBITMAP -*/ -FIBITMAP* J2KImageToFIBITMAP(int format_id, const opj_image_t *image, BOOL header_only); -/** -Conversion FIBITMAP => opj_image_t -*/ -opj_image_t* FIBITMAPToJ2KImage(int format_id, FIBITMAP *dib, const opj_cparameters_t *parameters); - -#endif // FREEIMAGE_J2K_HELPER_H diff --git a/Dependencies/FreeImage/Source/FreeImage/LFPQuantizer.cpp b/Dependencies/FreeImage/Source/FreeImage/LFPQuantizer.cpp deleted file mode 100644 index 8b592c3..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/LFPQuantizer.cpp +++ /dev/null @@ -1,208 +0,0 @@ -// ========================================================== -// LFPQuantizer class implementation -// -// Design and implementation by -// - Carsten Klein (cklein05@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "Quantizers.h" -#include "FreeImage.h" -#include "Utilities.h" - -LFPQuantizer::LFPQuantizer(unsigned PaletteSize) : - m_size(0), m_limit(PaletteSize), m_index(0) { - m_map = new MapEntry[MAP_SIZE]; - memset(m_map, 0xFF, MAP_SIZE * sizeof(MapEntry)); -} - -LFPQuantizer::~LFPQuantizer() { - delete[] m_map; -} - -FIBITMAP* LFPQuantizer::Quantize(FIBITMAP *dib, int ReserveSize, RGBQUAD *ReservePalette) { - - if (ReserveSize > 0 && ReservePalette != NULL) { - AddReservePalette(ReservePalette, ReserveSize); - } - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - - FIBITMAP *dib8 = FreeImage_Allocate(width, height, 8); - if (dib8 == NULL) { - return NULL; - } - - const unsigned src_pitch = FreeImage_GetPitch(dib); - const unsigned dst_pitch = FreeImage_GetPitch(dib8); - - const BYTE * const src_bits = FreeImage_GetBits(dib); - BYTE * const dst_bits = FreeImage_GetBits(dib8); - - unsigned last_color = -1; - int last_index = 0; - - if (FreeImage_GetBPP(dib) == 24) { - - // Getting the source pixel as an unsigned int is much faster than - // working with FI_RGBA_xxx and shifting. However, this may fail - // for the very last pixel, since its rgbReserved member (alpha) - // may actually point to an address beyond the bitmap's memory. So, - // we do not process the last scanline in the first loop. - - // Process all but the last scanline. - for (unsigned y = 0; y < height - 1; ++y) { - BYTE *dst_line = dst_bits + y * dst_pitch; - const BYTE *src_line = src_bits + y * src_pitch; - for (unsigned x = 0; x < width; ++x) { - const unsigned color = *((unsigned *) src_line) & 0x00FFFFFF; - if (color != last_color) { - last_color = color; - last_index = GetIndexForColor(color); - if (last_index == -1) { - FreeImage_Unload(dib8); - return NULL; - } - } - dst_line[x] = last_index; - src_line += 3; - } - } - - // Process all but the last pixel of the last scanline. - BYTE *dst_line = dst_bits + (height - 1) * dst_pitch; - const BYTE *src_line = src_bits + (height - 1) * src_pitch; - for (unsigned x = 0; x < width - 1; ++x) { - const unsigned color = *((unsigned *) src_line) & 0x00FFFFFF; - if (color != last_color) { - last_color = color; - last_index = GetIndexForColor(color); - if (last_index == -1) { - FreeImage_Unload(dib8); - return NULL; - } - } - dst_line[x] = last_index; - src_line += 3; - } - - // Process the last pixel (src_line should already point to it). - const unsigned color = 0 | src_line[FI_RGBA_BLUE] << FI_RGBA_BLUE_SHIFT - | src_line[FI_RGBA_GREEN] << FI_RGBA_GREEN_SHIFT - | src_line[FI_RGBA_RED] << FI_RGBA_RED_SHIFT; - if (color != last_color) { - last_color = color; - last_index = GetIndexForColor(color); - if (last_index == -1) { - FreeImage_Unload(dib8); - return NULL; - } - } - dst_line[width - 1] = last_index; - - } else { - for (unsigned y = 0; y < height; ++y) { - BYTE *dst_line = dst_bits + y * dst_pitch; - const BYTE *src_line = src_bits + y * src_pitch; - for (unsigned x = 0; x < width; ++x) { - const unsigned color = *((unsigned *) src_line) & 0x00FFFFFF; - if (color != last_color) { - last_color = color; - last_index = GetIndexForColor(color); - if (last_index == -1) { - FreeImage_Unload(dib8); - return NULL; - } - } - dst_line[x] = last_index; - src_line += 4; - } - } - } - - WritePalette(FreeImage_GetPalette(dib8)); - return dib8; -} - -/** - * Returns the palette index of the specified color. Tries to put the - * color into the map, if it's not already present in the map. In that - * case, a new index is used for the color. Returns -1, if adding the - * color would exceed the desired maximum number of colors in the - * palette. - * @param color the color to get the index from - * @return the palette index of the specified color or -1, if there - * is no space left in the palette - */ -inline int LFPQuantizer::GetIndexForColor(unsigned color) { - unsigned bucket = hash(color) & (MAP_SIZE - 1); - while (m_map[bucket].color != color) { - if (m_map[bucket].color == EMPTY_BUCKET) { - if (m_size == m_limit) { - return -1; - } - m_map[bucket].color = color; - m_map[bucket].index = m_index++; - ++m_size; - break; - } - bucket = (bucket + 1) % MAP_SIZE; - } - return m_map[bucket].index; -} - -/** - * Adds the specified number of entries of the specified reserve - * palette to the newly created palette. - * @param *palette a pointer to the reserve palette to copy from - * @param size the number of entries to copy - */ -void LFPQuantizer::AddReservePalette(const void *palette, unsigned size) { - if (size > MAX_SIZE) { - size = MAX_SIZE; - } - unsigned *ppal = (unsigned *) palette; - const unsigned offset = m_limit - size; - for (unsigned i = 0; i < size; ++i) { - const unsigned color = *ppal++; - const unsigned index = i + offset; - unsigned bucket = hash(color) & (MAP_SIZE - 1); - while((m_map[bucket].color != EMPTY_BUCKET) && (m_map[bucket].color != color)) { - bucket = (bucket + 1) % MAP_SIZE; - } - if(m_map[bucket].color != color) { - m_map[bucket].color = color; - m_map[bucket].index = index; - } - } - m_size += size; -} - -/** - * Copies the newly created palette into the specified destination - * palette. Although unused palette entries are not overwritten in - * the destination palette, it is assumed to have space for at - * least 256 entries. - * @param palette a pointer to the destination palette - */ -void LFPQuantizer::WritePalette(void *palette) { - for (unsigned i = 0; i < MAP_SIZE; ++i) { - if (m_map[i].color != EMPTY_BUCKET) { - ((unsigned *) palette)[m_map[i].index] = m_map[i].color; - } - } -} diff --git a/Dependencies/FreeImage/Source/FreeImage/MNGHelper.cpp b/Dependencies/FreeImage/Source/FreeImage/MNGHelper.cpp deleted file mode 100644 index ed3664c..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/MNGHelper.cpp +++ /dev/null @@ -1,1320 +0,0 @@ -// ========================================================== -// MNG / JNG helpers -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -/** -References -http://www.libpng.org/pub/mng/spec/jng.html -http://www.w3.org/TR/PNG/ -http://libpng.org/pub/mng/spec/ -*/ - -// -------------------------------------------------------------------------- - -#define MNG_INCLUDE_JNG - -#ifdef MNG_INCLUDE_JNG -#define MNG_COLORTYPE_JPEGGRAY 8 /* JHDR */ -#define MNG_COLORTYPE_JPEGCOLOR 10 -#define MNG_COLORTYPE_JPEGGRAYA 12 -#define MNG_COLORTYPE_JPEGCOLORA 14 - -#define MNG_BITDEPTH_JPEG8 8 /* JHDR */ -#define MNG_BITDEPTH_JPEG12 12 -#define MNG_BITDEPTH_JPEG8AND12 20 - -#define MNG_COMPRESSION_BASELINEJPEG 8 /* JHDR */ - -#define MNG_INTERLACE_SEQUENTIAL 0 /* JHDR */ -#define MNG_INTERLACE_PROGRESSIVE 8 -#endif /* MNG_INCLUDE_JNG */ - -// -------------------------------------------------------------------------- - -#define JNG_SUPPORTED - -/** Size of a JDAT chunk on writing */ -const DWORD JPEG_CHUNK_SIZE = 8192; - -/** PNG signature */ -static const BYTE g_png_signature[8] = { 137, 80, 78, 71, 13, 10, 26, 10 }; -/** JNG signature */ -static const BYTE g_jng_signature[8] = { 139, 74, 78, 71, 13, 10, 26, 10 }; - -// -------------------------------------------------------------------------- - -/** Chunk type converted to enum */ -enum eChunckType { - UNKNOWN_CHUNCK, - MHDR, - BACK, - BASI, - CLIP, - CLON, - DEFI, - DHDR, - DISC, - ENDL, - FRAM, - IEND, - IHDR, - JHDR, - LOOP, - MAGN, - MEND, - MOVE, - PAST, - PLTE, - SAVE, - SEEK, - SHOW, - TERM, - bKGD, - cHRM, - gAMA, - iCCP, - nEED, - pHYg, - vpAg, - pHYs, - sBIT, - sRGB, - tRNS, - IDAT, - JDAT, - JDAA, - JdAA, - JSEP, - oFFs, - hIST, - iTXt, - sPLT, - sTER, - tEXt, - tIME, - zTXt -}; - -/** -Helper for map where value is a pointer to a string. -Used to store tEXt metadata. -*/ -typedef std::map tEXtMAP; - -// -------------------------------------------------------------------------- - -/* - Constant strings for known chunk types. If you need to add a chunk, - add a string holding the name here. To make the code more - portable, we use ASCII numbers like this, not characters. -*/ - -static BYTE mng_MHDR[5]={ 77, 72, 68, 82, (BYTE) '\0'}; -static BYTE mng_BACK[5]={ 66, 65, 67, 75, (BYTE) '\0'}; -static BYTE mng_BASI[5]={ 66, 65, 83, 73, (BYTE) '\0'}; -static BYTE mng_CLIP[5]={ 67, 76, 73, 80, (BYTE) '\0'}; -static BYTE mng_CLON[5]={ 67, 76, 79, 78, (BYTE) '\0'}; -static BYTE mng_DEFI[5]={ 68, 69, 70, 73, (BYTE) '\0'}; -static BYTE mng_DHDR[5]={ 68, 72, 68, 82, (BYTE) '\0'}; -static BYTE mng_DISC[5]={ 68, 73, 83, 67, (BYTE) '\0'}; -static BYTE mng_ENDL[5]={ 69, 78, 68, 76, (BYTE) '\0'}; -static BYTE mng_FRAM[5]={ 70, 82, 65, 77, (BYTE) '\0'}; -static BYTE mng_IEND[5]={ 73, 69, 78, 68, (BYTE) '\0'}; -static BYTE mng_IHDR[5]={ 73, 72, 68, 82, (BYTE) '\0'}; -static BYTE mng_JHDR[5]={ 74, 72, 68, 82, (BYTE) '\0'}; -static BYTE mng_LOOP[5]={ 76, 79, 79, 80, (BYTE) '\0'}; -static BYTE mng_MAGN[5]={ 77, 65, 71, 78, (BYTE) '\0'}; -static BYTE mng_MEND[5]={ 77, 69, 78, 68, (BYTE) '\0'}; -static BYTE mng_MOVE[5]={ 77, 79, 86, 69, (BYTE) '\0'}; -static BYTE mng_PAST[5]={ 80, 65, 83, 84, (BYTE) '\0'}; -static BYTE mng_PLTE[5]={ 80, 76, 84, 69, (BYTE) '\0'}; -static BYTE mng_SAVE[5]={ 83, 65, 86, 69, (BYTE) '\0'}; -static BYTE mng_SEEK[5]={ 83, 69, 69, 75, (BYTE) '\0'}; -static BYTE mng_SHOW[5]={ 83, 72, 79, 87, (BYTE) '\0'}; -static BYTE mng_TERM[5]={ 84, 69, 82, 77, (BYTE) '\0'}; -static BYTE mng_bKGD[5]={ 98, 75, 71, 68, (BYTE) '\0'}; -static BYTE mng_cHRM[5]={ 99, 72, 82, 77, (BYTE) '\0'}; -static BYTE mng_gAMA[5]={103, 65, 77, 65, (BYTE) '\0'}; -static BYTE mng_iCCP[5]={105, 67, 67, 80, (BYTE) '\0'}; -static BYTE mng_nEED[5]={110, 69, 69, 68, (BYTE) '\0'}; -static BYTE mng_pHYg[5]={112, 72, 89, 103, (BYTE) '\0'}; -static BYTE mng_vpAg[5]={118, 112, 65, 103, (BYTE) '\0'}; -static BYTE mng_pHYs[5]={112, 72, 89, 115, (BYTE) '\0'}; -static BYTE mng_sBIT[5]={115, 66, 73, 84, (BYTE) '\0'}; -static BYTE mng_sRGB[5]={115, 82, 71, 66, (BYTE) '\0'}; -static BYTE mng_tRNS[5]={116, 82, 78, 83, (BYTE) '\0'}; - -#if defined(JNG_SUPPORTED) -static BYTE mng_IDAT[5]={ 73, 68, 65, 84, (BYTE) '\0'}; -static BYTE mng_JDAT[5]={ 74, 68, 65, 84, (BYTE) '\0'}; -static BYTE mng_JDAA[5]={ 74, 68, 65, 65, (BYTE) '\0'}; -static BYTE mng_JdAA[5]={ 74, 100, 65, 65, (BYTE) '\0'}; -static BYTE mng_JSEP[5]={ 74, 83, 69, 80, (BYTE) '\0'}; -static BYTE mng_oFFs[5]={111, 70, 70, 115, (BYTE) '\0'}; -#endif - -static BYTE mng_hIST[5]={104, 73, 83, 84, (BYTE) '\0'}; -static BYTE mng_iTXt[5]={105, 84, 88, 116, (BYTE) '\0'}; -static BYTE mng_sPLT[5]={115, 80, 76, 84, (BYTE) '\0'}; -static BYTE mng_sTER[5]={115, 84, 69, 82, (BYTE) '\0'}; -static BYTE mng_tEXt[5]={116, 69, 88, 116, (BYTE) '\0'}; -static BYTE mng_tIME[5]={116, 73, 77, 69, (BYTE) '\0'}; -static BYTE mng_zTXt[5]={122, 84, 88, 116, (BYTE) '\0'}; - - -// -------------------------------------------------------------------------- - -/** -Convert a chunk name to a unique ID -*/ -static eChunckType -mng_GetChunckType(const BYTE *mChunkName) { - if(memcmp(mChunkName, mng_MHDR, 4) == 0) { - return MHDR; - } - if(memcmp(mChunkName, mng_LOOP, 4) == 0) { - return LOOP; - } - if(memcmp(mChunkName, mng_DEFI, 4) == 0) { - return DEFI; - } - if(memcmp(mChunkName, mng_PLTE, 4) == 0) { - return PLTE; - } - if(memcmp(mChunkName, mng_tRNS, 4) == 0) { - return tRNS; - } - if(memcmp(mChunkName, mng_IHDR, 4) == 0) { - return IHDR; - } - if(memcmp(mChunkName, mng_JHDR, 4) == 0) { - return JHDR; - } - if(memcmp(mChunkName, mng_MEND, 4) == 0) { - return MEND; - } - if(memcmp(mChunkName, mng_IEND, 4) == 0) { - return IEND; - } - if(memcmp(mChunkName, mng_JDAT, 4) == 0) { - return JDAT; - } - if(memcmp(mChunkName, mng_IDAT, 4) == 0) { - return IDAT; - } - if(memcmp(mChunkName, mng_JDAA, 4) == 0) { - return JDAA; - } - if(memcmp(mChunkName, mng_gAMA, 4) == 0) { - return gAMA; - } - if(memcmp(mChunkName, mng_pHYs, 4) == 0) { - return pHYs; - } - if(memcmp(mChunkName, mng_bKGD, 4) == 0) { - return bKGD; - } - if(memcmp(mChunkName, mng_tEXt, 4) == 0) { - return tEXt; - } - - return UNKNOWN_CHUNCK; -} - -inline void -mng_SwapShort(WORD *sp) { -#ifndef FREEIMAGE_BIGENDIAN - SwapShort(sp); -#endif -} - -inline void -mng_SwapLong(DWORD *lp) { -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(lp); -#endif -} - -/** -Returns the size, in bytes, of a FreeImageIO stream, from the current position. -*/ -static long -mng_LOF(FreeImageIO *io, fi_handle handle) { - long start_pos = io->tell_proc(handle); - io->seek_proc(handle, 0, SEEK_END); - long file_length = io->tell_proc(handle); - io->seek_proc(handle, start_pos, SEEK_SET); - return file_length; -} - -/** -Count the number of bytes in a PNG stream, from IHDR to IEND. -If successful, the stream position, as given by io->tell_proc(handle), -should be the end of the PNG stream at the return of the function. -@param io -@param handle -@param inPos -@param m_TotalBytesOfChunks -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -mng_CountPNGChunks(FreeImageIO *io, fi_handle handle, long inPos, unsigned *m_TotalBytesOfChunks) { - long mLOF; - long mPos; - BOOL mEnd = FALSE; - DWORD mLength = 0; - BYTE mChunkName[5]; - - *m_TotalBytesOfChunks = 0; - - // get the length of the file - mLOF = mng_LOF(io, handle); - - // go to the start of the file - io->seek_proc(handle, inPos, SEEK_SET); - - try { - // parse chunks - while(mEnd == FALSE) { - // chunk length - mPos = io->tell_proc(handle); - if(mPos + 4 > mLOF) { - throw(1); - } - io->read_proc(&mLength, 1, 4, handle); - mng_SwapLong(&mLength); - // chunk name - mPos = io->tell_proc(handle); - if(mPos + 4 > mLOF) { - throw(1); - } - io->read_proc(&mChunkName[0], 1, 4, handle); - mChunkName[4] = '\0'; - - // go to next chunk - mPos = io->tell_proc(handle); - // 4 = size of the CRC - if(mPos + (long)mLength + 4 > mLOF) { - throw(1); - } - io->seek_proc(handle, mLength + 4, SEEK_CUR); - - switch( mng_GetChunckType(mChunkName) ) { - case IHDR: - if(mLength != 13) { - throw(1); - } - break; - - case IEND: - mEnd = TRUE; - // the length below includes 4 bytes CRC, but no bytes for Length - *m_TotalBytesOfChunks = io->tell_proc(handle) - inPos; - break; - - case UNKNOWN_CHUNCK: - default: - break; - } - - } // while(!mEnd) - - return TRUE; - - } catch(int) { - return FALSE; - } -} - -/** -Retrieve the position of a chunk in a PNG stream -@param hPngMemory PNG stream handle -@param chunk_name Name of the chunk to be found -@param offset Start of the search in the stream -@param start_pos [returned value] Start position of the chunk -@param next_pos [returned value] Start position of the next chunk -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -mng_FindChunk(FIMEMORY *hPngMemory, BYTE *chunk_name, long offset, DWORD *start_pos, DWORD *next_pos) { - DWORD mLength = 0; - - BYTE *data = NULL; - DWORD size_in_bytes = 0; - - *start_pos = 0; - *next_pos = 0; - - // get a pointer to the stream buffer - FreeImage_AcquireMemory(hPngMemory, &data, &size_in_bytes); - if(!(data && size_in_bytes) || (size_in_bytes < 20) || (size_in_bytes - offset < 20)) { - // not enough space to read a signature(8 bytes) + a chunk(at least 12 bytes) - return FALSE; - } - - try { - - // skip the signature and/or any following chunk(s) - DWORD chunk_pos = offset; - - while(1) { - // get chunk length - if(chunk_pos + 4 > size_in_bytes) { - break; - } - - memcpy(&mLength, &data[chunk_pos], 4); - mng_SwapLong(&mLength); - chunk_pos += 4; - - const DWORD next_chunk_pos = chunk_pos + 4 + mLength + 4; - if(next_chunk_pos > size_in_bytes) { - break; - } - - // get chunk name - if(memcmp(&data[chunk_pos], chunk_name, 4) == 0) { - chunk_pos -= 4; // found chunk - *start_pos = chunk_pos; - *next_pos = next_chunk_pos; - return TRUE; - } - - chunk_pos = next_chunk_pos; - } - - return FALSE; - - } catch(int) { - return FALSE; - } -} - -/** -Remove a chunk located at (start_pos, next_pos) in the PNG stream -@param hPngMemory PNG stream handle -@param start_pos Start position of the chunk -@param next_pos Start position of the next chunk -@return Returns TRUE if successfull, returns FALSE otherwise -*/ -static BOOL -mng_CopyRemoveChunks(FIMEMORY *hPngMemory, DWORD start_pos, DWORD next_pos) { - BYTE *data = NULL; - DWORD size_in_bytes = 0; - - // length of the chunk to remove - DWORD chunk_length = next_pos - start_pos; - if(chunk_length == 0) { - return TRUE; - } - - // get a pointer to the stream buffer - FreeImage_AcquireMemory(hPngMemory, &data, &size_in_bytes); - if(!(data && size_in_bytes) || (size_in_bytes < 20) || (chunk_length >= size_in_bytes)) { - // not enough space to read a signature(8 bytes) + a chunk(at least 12 bytes) - return FALSE; - } - - // new file length - unsigned buffer_size = size_in_bytes + chunk_length; - - BYTE *buffer = (BYTE*)malloc(buffer_size * sizeof(BYTE)); - if(!buffer) { - return FALSE; - } - memcpy(&buffer[0], &data[0], start_pos); - memcpy(&buffer[start_pos], &data[next_pos], size_in_bytes - next_pos); - - // seek to the start of the stream - FreeImage_SeekMemory(hPngMemory, 0, SEEK_SET); - // re-write the stream - FreeImage_WriteMemory(buffer, 1, buffer_size, hPngMemory); - - free(buffer); - - return TRUE; -} - -/** -Insert a chunk just before the inNextChunkName chunk -@param hPngMemory PNG stream handle -@param start_pos Start position of the inNextChunkName chunk -@param next_pos Start position of the next chunk -@return Returns TRUE if successfull, returns FALSE otherwise -*/ -static BOOL -mng_CopyInsertChunks(FIMEMORY *hPngMemory, BYTE *inNextChunkName, BYTE *inInsertChunk, DWORD inChunkLength, DWORD start_pos, DWORD next_pos) { - BYTE *data = NULL; - DWORD size_in_bytes = 0; - - // length of the chunk to check - DWORD chunk_length = next_pos - start_pos; - if(chunk_length == 0) { - return TRUE; - } - - // get a pointer to the stream buffer - FreeImage_AcquireMemory(hPngMemory, &data, &size_in_bytes); - if(!(data && size_in_bytes) || (size_in_bytes < 20) || (chunk_length >= size_in_bytes)) { - // not enough space to read a signature(8 bytes) + a chunk(at least 12 bytes) - return FALSE; - } - - // new file length - unsigned buffer_size = inChunkLength + size_in_bytes; - - BYTE *buffer = (BYTE*)malloc(buffer_size * sizeof(BYTE)); - if(!buffer) { - return FALSE; - } - unsigned p = 0; - memcpy(&buffer[p], &data[0], start_pos); - p += start_pos; - memcpy(&buffer[p], inInsertChunk, inChunkLength); - p += inChunkLength; - memcpy(&buffer[p], &data[start_pos], size_in_bytes - start_pos); - - // seek to the start of the stream - FreeImage_SeekMemory(hPngMemory, 0, SEEK_SET); - // re-write the stream - FreeImage_WriteMemory(buffer, 1, buffer_size, hPngMemory); - - free(buffer); - - return TRUE; -} - -static BOOL -mng_RemoveChunk(FIMEMORY *hPngMemory, BYTE *chunk_name) { - BOOL bResult = FALSE; - - DWORD start_pos = 0; - DWORD next_pos = 0; - - bResult = mng_FindChunk(hPngMemory, chunk_name, 8, &start_pos, &next_pos); - if(!bResult) { - return FALSE; - } - - bResult = mng_CopyRemoveChunks(hPngMemory, start_pos, next_pos); - if(!bResult) { - return FALSE; - } - - return TRUE; -} - -static BOOL -mng_InsertChunk(FIMEMORY *hPngMemory, BYTE *inNextChunkName, BYTE *inInsertChunk, unsigned chunk_length) { - BOOL bResult = FALSE; - - DWORD start_pos = 0; - DWORD next_pos = 0; - - bResult = mng_FindChunk(hPngMemory, inNextChunkName, 8, &start_pos, &next_pos); - if(!bResult) { - return FALSE; - } - - bResult = mng_CopyInsertChunks(hPngMemory, inNextChunkName, inInsertChunk, chunk_length, start_pos, next_pos); - if(!bResult) { - return FALSE; - } - - return TRUE; -} - -static FIBITMAP* -mng_LoadFromMemoryHandle(FIMEMORY *hmem, int flags = 0) { - long offset = 0; - FIBITMAP *dib = NULL; - - if(hmem) { - // seek to the start of the stream - FreeImage_SeekMemory(hmem, offset, SEEK_SET); - - // check the file signature and deduce its format - // (the second argument is currently not used by FreeImage) - FREE_IMAGE_FORMAT fif = FreeImage_GetFileTypeFromMemory(hmem, 0); - if(fif != FIF_UNKNOWN) { - dib = FreeImage_LoadFromMemory(fif, hmem, flags); - } - } - - return dib; -} - -/** -Write a chunk in a PNG stream from the current position. -@param chunk_name Name of the chunk -@param chunk_data Chunk array -@param length Chunk length -@param hPngMemory PNG stream handle -*/ -static void -mng_WriteChunk(BYTE *chunk_name, BYTE *chunk_data, DWORD length, FIMEMORY *hPngMemory) { - DWORD crc_file = 0; - // write a PNG chunk ... - // - length - mng_SwapLong(&length); - FreeImage_WriteMemory(&length, 1, 4, hPngMemory); - mng_SwapLong(&length); - // - chunk name - FreeImage_WriteMemory(chunk_name, 1, 4, hPngMemory); - if(chunk_data && length) { - // - chunk data - FreeImage_WriteMemory(chunk_data, 1, length, hPngMemory); - // - crc - crc_file = FreeImage_ZLibCRC32(0, chunk_name, 4); - crc_file = FreeImage_ZLibCRC32(crc_file, chunk_data, length); - mng_SwapLong(&crc_file); - FreeImage_WriteMemory(&crc_file, 1, 4, hPngMemory); - } else { - // - crc - crc_file = FreeImage_ZLibCRC32(0, chunk_name, 4); - mng_SwapLong(&crc_file); - FreeImage_WriteMemory(&crc_file, 1, 4, hPngMemory); - } - -} - -/** -Wrap a IDAT chunk as a PNG stream. -The stream has the structure { g_png_signature, IHDR, IDAT, IEND } -The image is assumed to be a greyscale image. - -@param jng_width Image width -@param jng_height Image height -@param jng_alpha_sample_depth Bits per pixel -@param mChunk PNG grayscale IDAT format -@param mLength IDAT chunk length -@param hPngMemory Output memory stream -*/ -static void -mng_WritePNGStream(DWORD jng_width, DWORD jng_height, BYTE jng_alpha_sample_depth, BYTE *mChunk, DWORD mLength, FIMEMORY *hPngMemory) { - // PNG grayscale IDAT format - - BYTE data[14]; - - // wrap the IDAT chunk as a PNG stream - - // write PNG file signature - FreeImage_WriteMemory(g_png_signature, 1, 8, hPngMemory); - - // write a IHDR chunk ... - /* - The IHDR chunk must appear FIRST. It contains: - Width: 4 bytes - Height: 4 bytes - Bit depth: 1 byte - Color type: 1 byte - Compression method: 1 byte - Filter method: 1 byte - Interlace method: 1 byte - */ - // - chunk data - mng_SwapLong(&jng_width); - mng_SwapLong(&jng_height); - memcpy(&data[0], &jng_width, 4); - memcpy(&data[4], &jng_height, 4); - mng_SwapLong(&jng_width); - mng_SwapLong(&jng_height); - data[8] = jng_alpha_sample_depth; - data[9] = 0; // color_type gray (jng_color_type) - data[10] = 0; // compression method 0 (jng_alpha_compression_method) - data[11] = 0; // filter_method 0 (jng_alpha_filter_method) - data[12] = 0; // interlace_method 0 (jng_alpha_interlace_method) - - mng_WriteChunk(mng_IHDR, &data[0], 13, hPngMemory); - - // write a IDAT chunk ... - mng_WriteChunk(mng_IDAT, mChunk, mLength, hPngMemory); - - // write a IEND chunk ... - mng_WriteChunk(mng_IEND, NULL, 0, hPngMemory); - -} - -// -------------------------------------------------------------------------- - -/** -Build and set a FITAG whose type is FIDT_ASCII. -The tag must be destroyed by the caller using FreeImage_DeleteTag. -@param model Metadata model to be filled -@param dib Image to be filled -@param key Tag key -@param value Tag value -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -mng_SetKeyValue(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, const char *value) { - if(!dib || !key || !value) { - return FALSE; - } - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(tag) { - BOOL bSuccess = TRUE; - // fill the tag - DWORD tag_length = (DWORD)(strlen(value) + 1); - bSuccess &= FreeImage_SetTagKey(tag, key); - bSuccess &= FreeImage_SetTagLength(tag, tag_length); - bSuccess &= FreeImage_SetTagCount(tag, tag_length); - bSuccess &= FreeImage_SetTagType(tag, FIDT_ASCII); - bSuccess &= FreeImage_SetTagValue(tag, value); - if(bSuccess) { - // set the tag - FreeImage_SetMetadata(model, dib, FreeImage_GetTagKey(tag), tag); - } - FreeImage_DeleteTag(tag); - return bSuccess; - } - - return FALSE; -} - -/** -Read a tEXt chunk and extract the key/value pair. -@param key_value_pair [returned value] Array of key/value pairs -@param mChunk Chunk data -@param mLength Chunk length -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -mng_SetMetadata_tEXt(tEXtMAP &key_value_pair, const BYTE *mChunk, DWORD mLength) { - std::string key; - std::string value; - BYTE *buffer = (BYTE*)malloc(mLength * sizeof(BYTE)); - if(!buffer) { - return FALSE; - } - DWORD pos = 0; - - memset(buffer, 0, mLength * sizeof(BYTE)); - - for(DWORD i = 0; i < mLength; i++) { - buffer[pos++] = mChunk[i]; - if(mChunk[i] == '\0') { - if(key.size() == 0) { - key = (char*)buffer; - pos = 0; - memset(buffer, 0, mLength * sizeof(BYTE)); - } else { - break; - } - } - } - value = (char*)buffer; - free(buffer); - - key_value_pair[key] = value; - - return TRUE; -} - -// -------------------------------------------------------------------------- - -/** -Load a FIBITMAP from a MNG or a JNG stream -@param format_id ID of the caller -@param io Stream i/o functions -@param handle Stream handle -@param Offset Start of the first chunk -@param flags Loading flags -@return Returns a dib if successful, returns NULL otherwise -*/ -FIBITMAP* -mng_ReadChunks(int format_id, FreeImageIO *io, fi_handle handle, long Offset, int flags = 0) { - DWORD mLength = 0; - BYTE mChunkName[5]; - BYTE *mChunk = NULL; - DWORD crc_file; - long LastOffset; - long mOrigPos; - BYTE *PLTE_file_chunk = NULL; // whole PLTE chunk (lentgh, name, array, crc) - DWORD PLTE_file_size = 0; // size of PLTE chunk - - BOOL m_HasGlobalPalette = FALSE; // may turn to TRUE in PLTE chunk - unsigned m_TotalBytesOfChunks = 0; - FIBITMAP *dib = NULL; - FIBITMAP *dib_alpha = NULL; - - FIMEMORY *hJpegMemory = NULL; - FIMEMORY *hPngMemory = NULL; - FIMEMORY *hIDATMemory = NULL; - - // --- - DWORD jng_width = 0; - DWORD jng_height = 0; - BYTE jng_color_type = 0; - BYTE jng_image_sample_depth = 0; - BYTE jng_image_compression_method = 0; - - BYTE jng_alpha_sample_depth = 0; - BYTE jng_alpha_compression_method = 0; - BYTE jng_alpha_filter_method = 0; - BYTE jng_alpha_interlace_method = 0; - - DWORD mng_frame_width = 0; - DWORD mng_frame_height = 0; - DWORD mng_ticks_per_second = 0; - DWORD mng_nominal_layer_count = 0; - DWORD mng_nominal_frame_count = 0; - DWORD mng_nominal_play_time = 0; - DWORD mng_simplicity_profile = 0; - - - DWORD res_x = 2835; // 72 dpi - DWORD res_y = 2835; // 72 dpi - RGBQUAD rgbBkColor = {0, 0, 0, 0}; - WORD bk_red, bk_green, bk_blue; - BOOL hasBkColor = FALSE; - BOOL mHasIDAT = FALSE; - - tEXtMAP key_value_pair; - - // --- - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - // get the file size - const long mLOF = mng_LOF(io, handle); - // go to the first chunk - io->seek_proc(handle, Offset, SEEK_SET); - - try { - BOOL mEnd = FALSE; - - while(mEnd == FALSE) { - // start of the chunk - LastOffset = io->tell_proc(handle); - // read length - mLength = 0; - io->read_proc(&mLength, 1, sizeof(mLength), handle); - mng_SwapLong(&mLength); - // read name - io->read_proc(&mChunkName[0], 1, 4, handle); - mChunkName[4] = '\0'; - - if(mLength > 0) { - mChunk = (BYTE*)realloc(mChunk, mLength); - if(!mChunk) { - FreeImage_OutputMessageProc(format_id, "Error while parsing %s chunk: out of memory", mChunkName); - throw (const char*)NULL; - } - Offset = io->tell_proc(handle); - if(Offset + (long)mLength > mLOF) { - FreeImage_OutputMessageProc(format_id, "Error while parsing %s chunk: unexpected end of file", mChunkName); - throw (const char*)NULL; - } - // read chunk - io->read_proc(mChunk, 1, mLength, handle); - } - // read crc - io->read_proc(&crc_file, 1, sizeof(crc_file), handle); - mng_SwapLong(&crc_file); - // check crc - DWORD crc_check = FreeImage_ZLibCRC32(0, &mChunkName[0], 4); - crc_check = FreeImage_ZLibCRC32(crc_check, mChunk, mLength); - if(crc_check != crc_file) { - FreeImage_OutputMessageProc(format_id, "Error while parsing %s chunk: bad CRC", mChunkName); - throw (const char*)NULL; - } - - switch( mng_GetChunckType(mChunkName) ) { - case MHDR: - // The MHDR chunk is always first in all MNG datastreams except for those - // that consist of a single PNG or JNG datastream with a PNG or JNG signature. - if(mLength == 28) { - memcpy(&mng_frame_width, &mChunk[0], 4); - memcpy(&mng_frame_height, &mChunk[4], 4); - memcpy(&mng_ticks_per_second, &mChunk[8], 4); - memcpy(&mng_nominal_layer_count, &mChunk[12], 4); - memcpy(&mng_nominal_frame_count, &mChunk[16], 4); - memcpy(&mng_nominal_play_time, &mChunk[20], 4); - memcpy(&mng_simplicity_profile, &mChunk[24], 4); - - mng_SwapLong(&mng_frame_width); - mng_SwapLong(&mng_frame_height); - mng_SwapLong(&mng_ticks_per_second); - mng_SwapLong(&mng_nominal_layer_count); - mng_SwapLong(&mng_nominal_frame_count); - mng_SwapLong(&mng_nominal_play_time); - mng_SwapLong(&mng_simplicity_profile); - - } else { - FreeImage_OutputMessageProc(format_id, "Error while parsing %s chunk: size is %d instead of 28", mChunkName, mLength); - } - break; - - case MEND: - mEnd = TRUE; - break; - - case LOOP: - case ENDL: - break; - case DEFI: - break; - case SAVE: - case SEEK: - case TERM: - break; - case BACK: - break; - - // Global "PLTE" and "tRNS" (if any). PNG "PLTE" will be of 0 byte, as it uses global data. - case PLTE: // Global - m_HasGlobalPalette = TRUE; - PLTE_file_size = mLength + 12; // (lentgh, name, array, crc) = (4, 4, mLength, 4) - PLTE_file_chunk = (BYTE*)realloc(PLTE_file_chunk, PLTE_file_size); - if(!PLTE_file_chunk) { - FreeImage_OutputMessageProc(format_id, "Error while parsing %s chunk: out of memory", mChunkName); - throw (const char*)NULL; - } else { - mOrigPos = io->tell_proc(handle); - // seek to the start of the chunk - io->seek_proc(handle, LastOffset, SEEK_SET); - // load the whole chunk - io->read_proc(PLTE_file_chunk, 1, PLTE_file_size, handle); - // go to the start of the next chunk - io->seek_proc(handle, mOrigPos, SEEK_SET); - } - break; - - case tRNS: // Global - break; - - case IHDR: - Offset = LastOffset; - // parse the PNG file and get its file size - if(mng_CountPNGChunks(io, handle, Offset, &m_TotalBytesOfChunks) == FALSE) { - // reach an unexpected end of file - mEnd = TRUE; - FreeImage_OutputMessageProc(format_id, "Error while parsing %s chunk: unexpected end of PNG file", mChunkName); - break; - } - - // wrap the { IHDR, ..., IEND } chunks as a PNG stream - if(hPngMemory == NULL) { - hPngMemory = FreeImage_OpenMemory(); - } - - mOrigPos = io->tell_proc(handle); - - // write PNG file signature - FreeImage_SeekMemory(hPngMemory, 0, SEEK_SET); - FreeImage_WriteMemory(g_png_signature, 1, 8, hPngMemory); - - mChunk = (BYTE*)realloc(mChunk, m_TotalBytesOfChunks); - if(!mChunk) { - FreeImage_OutputMessageProc(format_id, "Error while parsing %s chunk: out of memory", mChunkName); - throw (const char*)NULL; - } - - // on calling CountPNGChunks earlier, we were in Offset pos, - // go back there - io->seek_proc(handle, Offset, SEEK_SET); - io->read_proc(mChunk, 1, m_TotalBytesOfChunks, handle); - // Put back to original pos - io->seek_proc(handle, mOrigPos, SEEK_SET); - // write the PNG chunks - FreeImage_WriteMemory(mChunk, 1, m_TotalBytesOfChunks, hPngMemory); - - // plug in global PLTE if local PLTE exists - if(m_HasGlobalPalette) { - // ensure we remove some local chunks, so that global - // "PLTE" can be inserted right before "IDAT". - mng_RemoveChunk(hPngMemory, mng_PLTE); - mng_RemoveChunk(hPngMemory, mng_tRNS); - mng_RemoveChunk(hPngMemory, mng_bKGD); - // insert global "PLTE" chunk in its entirety before "IDAT" - mng_InsertChunk(hPngMemory, mng_IDAT, PLTE_file_chunk, PLTE_file_size); - } - - if(dib) FreeImage_Unload(dib); - dib = mng_LoadFromMemoryHandle(hPngMemory, flags); - - // stop after the first image - mEnd = TRUE; - break; - - case JHDR: - if(mLength == 16) { - memcpy(&jng_width, &mChunk[0], 4); - memcpy(&jng_height, &mChunk[4], 4); - mng_SwapLong(&jng_width); - mng_SwapLong(&jng_height); - - jng_color_type = mChunk[8]; - jng_image_sample_depth = mChunk[9]; - jng_image_compression_method = mChunk[10]; - //BYTE jng_image_interlace_method = mChunk[11]; // for debug only - - jng_alpha_sample_depth = mChunk[12]; - jng_alpha_compression_method = mChunk[13]; - jng_alpha_filter_method = mChunk[14]; - jng_alpha_interlace_method = mChunk[15]; - } else { - FreeImage_OutputMessageProc(format_id, "Error while parsing %s chunk: invalid chunk length", mChunkName); - throw (const char*)NULL; - } - break; - - case JDAT: - if(hJpegMemory == NULL) { - hJpegMemory = FreeImage_OpenMemory(); - } - // as there may be several JDAT chunks, concatenate them - FreeImage_WriteMemory(mChunk, 1, mLength, hJpegMemory); - break; - - case IDAT: - if(!header_only && (jng_alpha_compression_method == 0)) { - // PNG grayscale IDAT format - if(hIDATMemory == NULL) { - hIDATMemory = FreeImage_OpenMemory(); - mHasIDAT = TRUE; - } - // as there may be several IDAT chunks, concatenate them - FreeImage_WriteMemory(mChunk, 1, mLength, hIDATMemory); - } - break; - - case IEND: - if(!hJpegMemory) { - mEnd = TRUE; - break; - } - // load the JPEG - if(dib) { - FreeImage_Unload(dib); - } - dib = mng_LoadFromMemoryHandle(hJpegMemory, flags); - - // load the PNG alpha layer - if(mHasIDAT) { - BYTE *data = NULL; - DWORD size_in_bytes = 0; - - // get a pointer to the IDAT buffer - FreeImage_AcquireMemory(hIDATMemory, &data, &size_in_bytes); - if(data && size_in_bytes) { - // wrap the IDAT chunk as a PNG stream - if(hPngMemory == NULL) { - hPngMemory = FreeImage_OpenMemory(); - } - mng_WritePNGStream(jng_width, jng_height, jng_alpha_sample_depth, data, size_in_bytes, hPngMemory); - // load the PNG - if(dib_alpha) { - FreeImage_Unload(dib_alpha); - } - dib_alpha = mng_LoadFromMemoryHandle(hPngMemory, flags); - } - } - // stop the parsing - mEnd = TRUE; - break; - - case JDAA: - break; - - case gAMA: - break; - - case pHYs: - // unit is pixels per meter - memcpy(&res_x, &mChunk[0], 4); - mng_SwapLong(&res_x); - memcpy(&res_y, &mChunk[4], 4); - mng_SwapLong(&res_y); - break; - - case bKGD: - memcpy(&bk_red, &mChunk[0], 2); - mng_SwapShort(&bk_red); - rgbBkColor.rgbRed = (BYTE)bk_red; - memcpy(&bk_green, &mChunk[2], 2); - mng_SwapShort(&bk_green); - rgbBkColor.rgbGreen = (BYTE)bk_green; - memcpy(&bk_blue, &mChunk[4], 2); - mng_SwapShort(&bk_blue); - rgbBkColor.rgbBlue = (BYTE)bk_blue; - hasBkColor = TRUE; - break; - - case tEXt: - mng_SetMetadata_tEXt(key_value_pair, mChunk, mLength); - break; - - case UNKNOWN_CHUNCK: - default: - break; - - - } // switch( GetChunckType ) - } // while(!mEnd) - - FreeImage_CloseMemory(hJpegMemory); - FreeImage_CloseMemory(hPngMemory); - FreeImage_CloseMemory(hIDATMemory); - free(mChunk); - free(PLTE_file_chunk); - - // convert to 32-bit if a transparent layer is available - if(!header_only && dib_alpha) { - FIBITMAP *dst = FreeImage_ConvertTo32Bits(dib); - if((FreeImage_GetBPP(dib_alpha) == 8) && (FreeImage_GetImageType(dib_alpha) == FIT_BITMAP)) { - FreeImage_SetChannel(dst, dib_alpha, FICC_ALPHA); - } else { - FIBITMAP *dst_alpha = FreeImage_ConvertTo8Bits(dib_alpha); - FreeImage_SetChannel(dst, dst_alpha, FICC_ALPHA); - FreeImage_Unload(dst_alpha); - } - FreeImage_Unload(dib); - dib = dst; - } - FreeImage_Unload(dib_alpha); - - if(dib) { - // set metadata - FreeImage_SetDotsPerMeterX(dib, res_x); - FreeImage_SetDotsPerMeterY(dib, res_y); - if(hasBkColor) { - FreeImage_SetBackgroundColor(dib, &rgbBkColor); - } - if(key_value_pair.size()) { - for(tEXtMAP::iterator j = key_value_pair.begin(); j != key_value_pair.end(); j++) { - std::string key = (*j).first; - std::string value = (*j).second; - mng_SetKeyValue(FIMD_COMMENTS, dib, key.c_str(), value.c_str()); - } - } - } - - return dib; - - } catch(const char *text) { - FreeImage_CloseMemory(hJpegMemory); - FreeImage_CloseMemory(hPngMemory); - FreeImage_CloseMemory(hIDATMemory); - free(mChunk); - free(PLTE_file_chunk); - FreeImage_Unload(dib); - FreeImage_Unload(dib_alpha); - if(text) { - FreeImage_OutputMessageProc(format_id, text); - } - return NULL; - } -} - -// -------------------------------------------------------------------------- - -/** -Write a FIBITMAP to a JNG stream -@param format_id ID of the caller -@param io Stream i/o functions -@param dib Image to be saved -@param handle Stream handle -@param flags Saving flags -@return Returns TRUE if successful, returns FALSE otherwise -*/ -BOOL -mng_WriteJNG(int format_id, FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int flags) { - DWORD jng_width = 0; - DWORD jng_height = 0; - BYTE jng_color_type = 0; - BYTE jng_image_sample_depth = 8; - BYTE jng_image_compression_method = 8; // 8: ISO-10918-1 Huffman-coded baseline JPEG. - BYTE jng_image_interlace_method = 0; - - BYTE jng_alpha_sample_depth = 0; - BYTE jng_alpha_compression_method = 0; - BYTE jng_alpha_filter_method = 0; - BYTE jng_alpha_interlace_method = 0; - - BYTE buffer[16]; - - FIMEMORY *hJngMemory = NULL; - FIMEMORY *hJpegMemory = NULL; - FIMEMORY *hPngMemory = NULL; - - FIBITMAP *dib_rgb = NULL; - FIBITMAP *dib_alpha = NULL; - - if(!dib || (FreeImage_GetImageType(dib) != FIT_BITMAP)) { - return FALSE; - } - - unsigned bpp = FreeImage_GetBPP(dib); - - switch(bpp) { - case 8: - if(FreeImage_GetColorType(dib) == FIC_MINISBLACK) { - dib_rgb = dib; - jng_color_type = MNG_COLORTYPE_JPEGGRAY; - } else { - // JPEG plugin will convert other types (FIC_MINISWHITE, FIC_PALETTE) to 24-bit on the fly - //dib_rgb = FreeImage_ConvertTo24Bits(dib); - dib_rgb = dib; - jng_color_type = MNG_COLORTYPE_JPEGCOLOR; - - } - break; - case 24: - dib_rgb = dib; - jng_color_type = MNG_COLORTYPE_JPEGCOLOR; - break; - case 32: - dib_rgb = FreeImage_ConvertTo24Bits(dib); - jng_color_type = MNG_COLORTYPE_JPEGCOLORA; - jng_alpha_sample_depth = 8; - break; - default: - return FALSE; - } - - jng_width = (DWORD)FreeImage_GetWidth(dib); - jng_height = (DWORD)FreeImage_GetHeight(dib); - - try { - hJngMemory = FreeImage_OpenMemory(); - - // --- write JNG file signature --- - FreeImage_WriteMemory(g_jng_signature, 1, 8, hJngMemory); - - // --- write a JHDR chunk --- - SwapLong(&jng_width); - SwapLong(&jng_height); - memcpy(&buffer[0], &jng_width, 4); - memcpy(&buffer[4], &jng_height, 4); - SwapLong(&jng_width); - SwapLong(&jng_height); - buffer[8] = jng_color_type; - buffer[9] = jng_image_sample_depth; - buffer[10] = jng_image_compression_method; - buffer[11] = jng_image_interlace_method; - buffer[12] = jng_alpha_sample_depth; - buffer[13] = jng_alpha_compression_method; - buffer[14] = jng_alpha_filter_method; - buffer[15] = jng_alpha_interlace_method; - mng_WriteChunk(mng_JHDR, &buffer[0], 16, hJngMemory); - - // --- write a sequence of JDAT chunks --- - hJpegMemory = FreeImage_OpenMemory(); - flags |= JPEG_BASELINE; - if(!FreeImage_SaveToMemory(FIF_JPEG, dib_rgb, hJpegMemory, flags)) { - throw (const char*)NULL; - } - if(dib_rgb != dib) { - FreeImage_Unload(dib_rgb); - dib_rgb = NULL; - } - { - BYTE *jpeg_data = NULL; - DWORD size_in_bytes = 0; - - // get a pointer to the stream buffer - FreeImage_AcquireMemory(hJpegMemory, &jpeg_data, &size_in_bytes); - // write chunks - for(DWORD k = 0; k < size_in_bytes;) { - DWORD bytes_left = size_in_bytes - k; - DWORD chunk_size = MIN(JPEG_CHUNK_SIZE, bytes_left); - mng_WriteChunk(mng_JDAT, &jpeg_data[k], chunk_size, hJngMemory); - k += chunk_size; - } - } - FreeImage_CloseMemory(hJpegMemory); - hJpegMemory = NULL; - - // --- write alpha layer as a sequence of IDAT chunk --- - if((bpp == 32) && (jng_color_type == MNG_COLORTYPE_JPEGCOLORA)) { - dib_alpha = FreeImage_GetChannel(dib, FICC_ALPHA); - - hPngMemory = FreeImage_OpenMemory(); - if(!FreeImage_SaveToMemory(FIF_PNG, dib_alpha, hPngMemory, PNG_DEFAULT)) { - throw (const char*)NULL; - } - FreeImage_Unload(dib_alpha); - dib_alpha = NULL; - // get the IDAT chunk - { - BOOL bResult = FALSE; - DWORD start_pos = 0; - DWORD next_pos = 0; - long offset = 8; - - do { - // find the next IDAT chunk from 'offset' position - bResult = mng_FindChunk(hPngMemory, mng_IDAT, offset, &start_pos, &next_pos); - if(!bResult) break; - - BYTE *png_data = NULL; - DWORD size_in_bytes = 0; - - // get a pointer to the stream buffer - FreeImage_AcquireMemory(hPngMemory, &png_data, &size_in_bytes); - // write the IDAT chunk - mng_WriteChunk(mng_IDAT, &png_data[start_pos+8], next_pos - start_pos - 12, hJngMemory); - - offset = next_pos; - - } while(bResult); - } - - FreeImage_CloseMemory(hPngMemory); - hPngMemory = NULL; - } - - // --- write a IEND chunk --- - mng_WriteChunk(mng_IEND, NULL, 0, hJngMemory); - - // write the JNG on output stream - { - BYTE *jng_data = NULL; - DWORD size_in_bytes = 0; - FreeImage_AcquireMemory(hJngMemory, &jng_data, &size_in_bytes); - io->write_proc(jng_data, 1, size_in_bytes, handle); - } - - FreeImage_CloseMemory(hJngMemory); - FreeImage_CloseMemory(hJpegMemory); - FreeImage_CloseMemory(hPngMemory); - - return TRUE; - - } catch(const char *text) { - FreeImage_CloseMemory(hJngMemory); - FreeImage_CloseMemory(hJpegMemory); - FreeImage_CloseMemory(hPngMemory); - if(dib_rgb && (dib_rgb != dib)) { - FreeImage_Unload(dib_rgb); - } - FreeImage_Unload(dib_alpha); - if(text) { - FreeImage_OutputMessageProc(format_id, text); - } - return FALSE; - } -} diff --git a/Dependencies/FreeImage/Source/FreeImage/MemoryIO.cpp b/Dependencies/FreeImage/Source/FreeImage/MemoryIO.cpp deleted file mode 100644 index 3ebcb28..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/MemoryIO.cpp +++ /dev/null @@ -1,221 +0,0 @@ -// ========================================================== -// Memory Input/Output functions -// -// Design and implementation by -// - Ryan Rubley -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "FreeImageIO.h" - -// ===================================================================== - - -// ===================================================================== -// Open and close a memory handle -// ===================================================================== - -FIMEMORY * DLL_CALLCONV -FreeImage_OpenMemory(BYTE *data, DWORD size_in_bytes) { - // allocate a memory handle - FIMEMORY *stream = (FIMEMORY*)malloc(sizeof(FIMEMORY)); - if(stream) { - stream->data = (BYTE*)malloc(sizeof(FIMEMORYHEADER)); - - if(stream->data) { - FIMEMORYHEADER *mem_header = (FIMEMORYHEADER*)(stream->data); - - // initialize the memory header - memset(mem_header, 0, sizeof(FIMEMORYHEADER)); - - if(data && size_in_bytes) { - // wrap a user buffer - mem_header->delete_me = FALSE; - mem_header->data = (BYTE*)data; - mem_header->data_length = mem_header->file_length = size_in_bytes; - } else { - mem_header->delete_me = TRUE; - } - - return stream; - } - free(stream); - } - - return NULL; -} - - -void DLL_CALLCONV -FreeImage_CloseMemory(FIMEMORY *stream) { - if(stream && stream->data) { - FIMEMORYHEADER *mem_header = (FIMEMORYHEADER*)(stream->data); - if(mem_header->delete_me) { - free(mem_header->data); - } - free(mem_header); - free(stream); - } -} - -// ===================================================================== -// Memory stream load/save functions -// ===================================================================== - -FIBITMAP * DLL_CALLCONV -FreeImage_LoadFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags) { - if (stream && stream->data) { - FreeImageIO io; - SetMemoryIO(&io); - - return FreeImage_LoadFromHandle(fif, &io, (fi_handle)stream, flags); - } - - return NULL; -} - - -BOOL DLL_CALLCONV -FreeImage_SaveToMemory(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags) { - if (stream) { - FreeImageIO io; - SetMemoryIO(&io); - - FIMEMORYHEADER *mem_header = (FIMEMORYHEADER*)(stream->data); - - if(mem_header->delete_me == TRUE) { - return FreeImage_SaveToHandle(fif, dib, &io, (fi_handle)stream, flags); - } else { - // do not save in a user buffer - FreeImage_OutputMessageProc(fif, "Memory buffer is read only"); - } - } - - return FALSE; -} - -// ===================================================================== -// Memory stream buffer access -// ===================================================================== - -BOOL DLL_CALLCONV -FreeImage_AcquireMemory(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes) { - if (stream) { - FIMEMORYHEADER *mem_header = (FIMEMORYHEADER*)(stream->data); - - *data = (BYTE*)mem_header->data; - *size_in_bytes = mem_header->file_length; - return TRUE; - } - - return FALSE; -} - -// ===================================================================== -// Seeking in Memory stream -// ===================================================================== - -/** -Moves the memory pointer to a specified location -@param stream Pointer to FIMEMORY structure -@param offset Number of bytes from origin -@param origin Initial position -@return Returns TRUE if successful, returns FALSE otherwise -*/ -BOOL DLL_CALLCONV -FreeImage_SeekMemory(FIMEMORY *stream, long offset, int origin) { - FreeImageIO io; - SetMemoryIO(&io); - - if (stream != NULL) { - int success = io.seek_proc((fi_handle)stream, offset, origin); - return (success == 0) ? TRUE : FALSE; - } - - return FALSE; -} - -/** -Gets the current position of a memory pointer -@param stream Target FIMEMORY structure -@return Returns the current file position if successful, -1 otherwise -*/ -long DLL_CALLCONV -FreeImage_TellMemory(FIMEMORY *stream) { - FreeImageIO io; - SetMemoryIO(&io); - - if (stream != NULL) { - return io.tell_proc((fi_handle)stream); - } - - return -1L; -} - -// ===================================================================== -// Reading or Writing in Memory stream -// ===================================================================== - -/** -Reads data from a memory stream -@param buffer Storage location for data -@param size Item size in bytes -@param count Maximum number of items to be read -@param stream Pointer to FIMEMORY structure -@return Returns the number of full items actually read, which may be less than count if an error occurs -*/ -unsigned DLL_CALLCONV -FreeImage_ReadMemory(void *buffer, unsigned size, unsigned count, FIMEMORY *stream) { - FreeImageIO io; - SetMemoryIO(&io); - - if (stream != NULL) { - return io.read_proc(buffer, size, count, stream); - } - - return 0; -} - -/** -Writes data to a memory stream. -@param buffer Pointer to data to be written -@param size Item size in bytes -@param count Maximum number of items to be written -@param stream Pointer to FIMEMORY structure -@return Returns the number of full items actually written, which may be less than count if an error occurs -*/ -unsigned DLL_CALLCONV -FreeImage_WriteMemory(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream) { - if (stream != NULL) { - FreeImageIO io; - SetMemoryIO(&io); - - FIMEMORYHEADER *mem_header = (FIMEMORYHEADER*)(((FIMEMORY*)stream)->data); - - if(mem_header->delete_me == TRUE) { - return io.write_proc((void *)buffer, size, count, stream); - } else { - // do not write in a user buffer - FreeImage_OutputMessageProc(FIF_UNKNOWN, "Memory buffer is read only"); - } - } - - return 0; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/MultiPage.cpp b/Dependencies/FreeImage/Source/FreeImage/MultiPage.cpp deleted file mode 100644 index 4f26051..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/MultiPage.cpp +++ /dev/null @@ -1,897 +0,0 @@ -// ========================================================== -// Multi-Page functions -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Laurent Rocher (rocherl@club-internet.fr) -// - Steve Johnson (steve@parisgroup.net) -// - Petr Pytelka (pyta@lightcomp.com) -// - Hervé Drolon (drolon@infonie.fr) -// - Vadim Alexandrov (vadimalexandrov@users.sourceforge.net -// - Martin Dyring-Andersen (mda@spamfighter.com) -// - Volodymyr Goncharov (volodymyr.goncharov@gmail.com) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include "CacheFile.h" -#include "FreeImageIO.h" -#include "Plugin.h" -#include "Utilities.h" -#include "FreeImage.h" - -namespace { - -// ---------------------------------------------------------- - -enum BlockType { BLOCK_CONTINUEUS, BLOCK_REFERENCE }; - -// ---------------------------------------------------------- - -class PageBlock { - - union { - struct { - int m_start; - int m_end; - }; - struct { - int m_reference; - int m_size; - }; - }; - -public: - BlockType m_type; - - PageBlock(BlockType type = BLOCK_CONTINUEUS, int val1 = -1, int val2 = -1) : m_type(type) - { - if(m_type == BLOCK_CONTINUEUS) - { - m_start = val1; - m_end = val2; - } - else - { - m_reference = val1; - m_size = val2; - } - } - - bool isValid() const { return !(m_type == BLOCK_CONTINUEUS && m_start == -1 && m_end == -1); } - /*explicit*/ operator bool() const { return isValid(); } - - int getStart() const { assert(isValid() && m_type == BLOCK_CONTINUEUS); return m_start; } - int getEnd() const { assert(isValid() && m_type == BLOCK_CONTINUEUS); return m_end; } - - bool isSinglePage() const { assert(isValid()); return m_type == BLOCK_CONTINUEUS ? (m_start == m_end) : true; } - int getPageCount() const { assert(isValid()); return m_type == BLOCK_CONTINUEUS ? (m_end - m_start + 1) : 1;} - - int getReference() const { assert(isValid() && m_type == BLOCK_REFERENCE); return m_reference; } - int getSize() const { assert(isValid() && m_type == BLOCK_REFERENCE); return m_size; } -}; - -// ---------------------------------------------------------- - -typedef std::list BlockList; -typedef BlockList::iterator BlockListIterator; - -// ---------------------------------------------------------- - -struct MULTIBITMAPHEADER { - - MULTIBITMAPHEADER() - : node(NULL) - , fif(FIF_UNKNOWN) - , handle(NULL) - , changed(FALSE) - , page_count(0) - , read_only(TRUE) - , cache_fif(fif) - , load_flags(0) - { - SetDefaultIO(&io); - } - - PluginNode *node; - FREE_IMAGE_FORMAT fif; - FreeImageIO io; - fi_handle handle; - CacheFile m_cachefile; - std::map locked_pages; - BOOL changed; - int page_count; - BlockList m_blocks; - std::string m_filename; - BOOL read_only; - FREE_IMAGE_FORMAT cache_fif; - int load_flags; -}; - -// ===================================================================== -// Helper functions -// ===================================================================== - -inline void -ReplaceExtension(std::string& dst_filename, const std::string& src_filename, const std::string& dst_extension) { - size_t lastDot = src_filename.find_last_of('.'); - if (lastDot == std::string::npos) { - dst_filename = src_filename; - dst_filename += "."; - dst_filename += dst_extension; - } - else { - dst_filename = src_filename.substr(0, lastDot + 1); - dst_filename += dst_extension; - } -} - -} //< ns - - -// ===================================================================== -// Internal Multipage functions -// ===================================================================== - -inline MULTIBITMAPHEADER * -FreeImage_GetMultiBitmapHeader(FIMULTIBITMAP *bitmap) { - return (MULTIBITMAPHEADER *)bitmap->data; -} - -static BlockListIterator DLL_CALLCONV -FreeImage_FindBlock(FIMULTIBITMAP *bitmap, int position) { - assert(NULL != bitmap); - - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - // step 1: find the block that matches the given position - - int prev_count = 0; - int count = 0; - BlockListIterator i; - - for (i = header->m_blocks.begin(); i != header->m_blocks.end(); ++i) { - prev_count = count; - - count += i->getPageCount(); - - if (count > position) { - break; - } - } - - // step 2: make sure we found the node. from here it gets a little complicated: - // * if the block is single page, just return it - // * if the block is a span of pages, split it in 3 new blocks - // and return the middle block, which is now a single page - - if ((i != header->m_blocks.end()) && (count > position)) { - - if (i->isSinglePage()) { - return i; - } - - const int item = i->getStart() + (position - prev_count); - - // left part - - if (item != i->getStart()) { - header->m_blocks.insert(i, PageBlock(BLOCK_CONTINUEUS, i->getStart(), item - 1)); - } - - // middle part - - BlockListIterator block_target = header->m_blocks.insert(i, PageBlock(BLOCK_CONTINUEUS, item, item)); - - // right part - - if (item != i->getEnd()) { - header->m_blocks.insert(i, PageBlock(BLOCK_CONTINUEUS, item + 1, i->getEnd())); - } - - // remove the old block that was just splitted - - header->m_blocks.erase(i); - - // return the splitted block - - return block_target; - } - - // we should never go here ... - assert(false); - return header->m_blocks.end(); -} - -int DLL_CALLCONV -FreeImage_InternalGetPageCount(FIMULTIBITMAP *bitmap) { - if (bitmap) { - if (((MULTIBITMAPHEADER *)bitmap->data)->handle) { - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - header->io.seek_proc(header->handle, 0, SEEK_SET); - - void *data = FreeImage_Open(header->node, &header->io, header->handle, TRUE); - - int page_count = (header->node->m_plugin->pagecount_proc != NULL) ? header->node->m_plugin->pagecount_proc(&header->io, header->handle, data) : 1; - - FreeImage_Close(header->node, &header->io, header->handle, data); - - return page_count; - } - } - - return 0; -} - -// ===================================================================== -// Multipage functions -// ===================================================================== - -FIMULTIBITMAP * DLL_CALLCONV -FreeImage_OpenMultiBitmap(FREE_IMAGE_FORMAT fif, const char *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory, int flags) { - - FILE *handle = NULL; - try { - // sanity check on the parameters - - if (create_new) { - read_only = FALSE; - } - - // retrieve the plugin list to find the node belonging to this plugin - - PluginList *list = FreeImage_GetPluginList(); - - if (list) { - PluginNode *node = list->FindNodeFromFIF(fif); - - if (node) { - if (!create_new) { - handle = fopen(filename, "rb"); - if (handle == NULL) { - return NULL; - } - } - - std::auto_ptr bitmap (new FIMULTIBITMAP); - std::auto_ptr header (new MULTIBITMAPHEADER); - header->m_filename = filename; - // io is default - header->node = node; - header->fif = fif; - header->handle = handle; - header->read_only = read_only; - header->cache_fif = fif; - header->load_flags = flags; - - // store the MULTIBITMAPHEADER in the surrounding FIMULTIBITMAP structure - - bitmap->data = header.get(); - - // cache the page count - - header->page_count = FreeImage_InternalGetPageCount(bitmap.get()); - - // allocate a continueus block to describe the bitmap - - if (!create_new) { - header->m_blocks.push_back(PageBlock(BLOCK_CONTINUEUS, 0, header->page_count - 1)); - } - - // set up the cache - - if (!read_only) { - std::string cache_name; - ReplaceExtension(cache_name, filename, "ficache"); - - if (!header->m_cachefile.open(cache_name, keep_cache_in_memory)) { - // an error occured ... - fclose(handle); - return NULL; - } - } - // return the multibitmap - // std::bad_alloc won't be thrown from here on - header.release(); // now owned by bitmap - return bitmap.release(); // now owned by caller - } - } - } catch (std::bad_alloc &) { - /** @todo report error */ - } - if (handle) { - fclose(handle); - } - return NULL; -} - -FIMULTIBITMAP * DLL_CALLCONV -FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags) { - try { - BOOL read_only = FALSE; // modifications (if any) will be stored into the memory cache - - if (io && handle) { - - // retrieve the plugin list to find the node belonging to this plugin - PluginList *list = FreeImage_GetPluginList(); - - if (list) { - PluginNode *node = list->FindNodeFromFIF(fif); - - if (node) { - std::auto_ptr bitmap (new FIMULTIBITMAP); - std::auto_ptr header (new MULTIBITMAPHEADER); - header->io = *io; - header->node = node; - header->fif = fif; - header->handle = handle; - header->read_only = read_only; - header->cache_fif = fif; - header->load_flags = flags; - - // store the MULTIBITMAPHEADER in the surrounding FIMULTIBITMAP structure - - bitmap->data = header.get(); - - // cache the page count - - header->page_count = FreeImage_InternalGetPageCount(bitmap.get()); - - // allocate a continueus block to describe the bitmap - - header->m_blocks.push_back(PageBlock(BLOCK_CONTINUEUS, 0, header->page_count - 1)); - - // no need to open cache - it is in-memory by default - - header.release(); - return bitmap.release(); - } - } - } - } catch (std::bad_alloc &) { - /** @todo report error */ - } - return NULL; -} - -BOOL DLL_CALLCONV -FreeImage_SaveMultiBitmapToHandle(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FreeImageIO *io, fi_handle handle, int flags) { - if(!bitmap || !bitmap->data || !io || !handle) { - return FALSE; - } - - BOOL success = TRUE; - - // retrieve the plugin list to find the node belonging to this plugin - PluginList *list = FreeImage_GetPluginList(); - - if (list) { - PluginNode *node = list->FindNodeFromFIF(fif); - - if(node) { - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - // dst data - void *data = FreeImage_Open(node, io, handle, FALSE); - // src data - void *data_read = NULL; - - if(header->handle) { - // open src - header->io.seek_proc(header->handle, 0, SEEK_SET); - data_read = FreeImage_Open(header->node, &header->io, header->handle, TRUE); - } - - // write all the pages to the file using handle and io - - int count = 0; - - for (BlockListIterator i = header->m_blocks.begin(); i != header->m_blocks.end(); i++) { - if (success) { - switch(i->m_type) { - case BLOCK_CONTINUEUS: - { - for (int j = i->getStart(); j <= i->getEnd(); j++) { - - // load the original source data - FIBITMAP *dib = header->node->m_plugin->load_proc(&header->io, header->handle, j, header->load_flags, data_read); - - // save the data - success = node->m_plugin->save_proc(io, dib, handle, count, flags, data); - count++; - - FreeImage_Unload(dib); - } - - break; - } - - case BLOCK_REFERENCE: - { - // read the compressed data - - BYTE *compressed_data = (BYTE*)malloc(i->getSize() * sizeof(BYTE)); - - header->m_cachefile.readFile((BYTE *)compressed_data, i->getReference(), i->getSize()); - - // uncompress the data - - FIMEMORY *hmem = FreeImage_OpenMemory(compressed_data, i->getSize()); - FIBITMAP *dib = FreeImage_LoadFromMemory(header->cache_fif, hmem, 0); - FreeImage_CloseMemory(hmem); - - // get rid of the buffer - free(compressed_data); - - // save the data - - success = node->m_plugin->save_proc(io, dib, handle, count, flags, data); - count++; - - // unload the dib - - FreeImage_Unload(dib); - - break; - } - } - } else { - break; - } - } - - // close the files - - FreeImage_Close(header->node, &header->io, header->handle, data_read); - - FreeImage_Close(node, io, handle, data); - - return success; - } - } - - return FALSE; -} - - -BOOL DLL_CALLCONV -FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap, int flags) { - if (bitmap) { - BOOL success = TRUE; - - if (bitmap->data) { - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - // saves changes only of images loaded directly from a file - if (header->changed && !header->m_filename.empty()) { - try { - // open a temp file - - std::string spool_name; - - ReplaceExtension(spool_name, header->m_filename, "fispool"); - - // open the spool file and the source file - - FILE *f = fopen(spool_name.c_str(), "w+b"); - - // saves changes - if (f == NULL) { - FreeImage_OutputMessageProc(header->fif, "Failed to open %s, %s", spool_name.c_str(), strerror(errno)); - success = FALSE; - } else { - success = FreeImage_SaveMultiBitmapToHandle(header->fif, bitmap, &header->io, (fi_handle)f, flags); - - // close the files - - if (fclose(f) != 0) { - success = FALSE; - FreeImage_OutputMessageProc(header->fif, "Failed to close %s, %s", spool_name.c_str(), strerror(errno)); - } - } - if (header->handle) { - fclose((FILE *)header->handle); - } - - // applies changes to the destination file - - if (success) { - remove(header->m_filename.c_str()); - success = (rename(spool_name.c_str(), header->m_filename.c_str()) == 0) ? TRUE:FALSE; - if(!success) { - FreeImage_OutputMessageProc(header->fif, "Failed to rename %s to %s", spool_name.c_str(), header->m_filename.c_str()); - } - } else { - remove(spool_name.c_str()); - } - } catch (std::bad_alloc &) { - success = FALSE; - } - - } else { - if (header->handle && !header->m_filename.empty()) { - fclose((FILE *)header->handle); - } - } - - // delete the last open bitmaps - - while (!header->locked_pages.empty()) { - FreeImage_Unload(header->locked_pages.begin()->first); - - header->locked_pages.erase(header->locked_pages.begin()->first); - } - - // delete the FIMULTIBITMAPHEADER - - delete header; - } - - delete bitmap; - - return success; - } - - return FALSE; -} - -int DLL_CALLCONV -FreeImage_GetPageCount(FIMULTIBITMAP *bitmap) { - if (bitmap) { - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - if (header->page_count == -1) { - header->page_count = 0; - - for (BlockListIterator i = header->m_blocks.begin(); i != header->m_blocks.end(); ++i) { - header->page_count += i->getPageCount(); - } - } - - return header->page_count; - } - - return 0; -} - -static PageBlock -FreeImage_SavePageToBlock(MULTIBITMAPHEADER *header, FIBITMAP *data) { - PageBlock res; - - if (header->read_only || !header->locked_pages.empty()) { - return res; - } - - DWORD compressed_size = 0; - BYTE *compressed_data = NULL; - - // compress the bitmap data - - // open a memory handle - FIMEMORY *hmem = FreeImage_OpenMemory(); - if(hmem==NULL) { - return res; - } - // save the file to memory - if(!FreeImage_SaveToMemory(header->cache_fif, data, hmem, 0)) { - FreeImage_CloseMemory(hmem); - return res; - } - // get the buffer from the memory stream - if(!FreeImage_AcquireMemory(hmem, &compressed_data, &compressed_size)) { - FreeImage_CloseMemory(hmem); - return res; - } - - // write the compressed data to the cache - int ref = header->m_cachefile.writeFile(compressed_data, compressed_size); - // get rid of the compressed data - FreeImage_CloseMemory(hmem); - - res = PageBlock(BLOCK_REFERENCE, ref, compressed_size); - - return res; -} - -void DLL_CALLCONV -FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data) { - if (!bitmap || !data) { - return; - } - - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - if(const PageBlock block = FreeImage_SavePageToBlock(header, data)) { - // add the block - header->m_blocks.push_back(block); - header->changed = TRUE; - header->page_count = -1; - } -} - -void DLL_CALLCONV -FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data) { - if (!bitmap || !data) { - return; - } - if (page >= FreeImage_GetPageCount(bitmap)) { - return; - } - - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - if(const PageBlock block = FreeImage_SavePageToBlock(header, data)) { - // add a block - if (page > 0) { - BlockListIterator block_source = FreeImage_FindBlock(bitmap, page); - header->m_blocks.insert(block_source, block); - } else { - header->m_blocks.push_front(block); - } - - header->changed = TRUE; - header->page_count = -1; - } -} - -void DLL_CALLCONV -FreeImage_DeletePage(FIMULTIBITMAP *bitmap, int page) { - if (bitmap) { - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - if ((!header->read_only) && (header->locked_pages.empty())) { - if (FreeImage_GetPageCount(bitmap) > 1) { - BlockListIterator i = FreeImage_FindBlock(bitmap, page); - - if (i != header->m_blocks.end()) { - switch(i->m_type) { - case BLOCK_CONTINUEUS : - header->m_blocks.erase(i); - break; - - case BLOCK_REFERENCE : - header->m_cachefile.deleteFile(i->getReference()); - header->m_blocks.erase(i); - break; - } - - header->changed = TRUE; - header->page_count = -1; - } - } - } - } -} - -FIBITMAP * DLL_CALLCONV -FreeImage_LockPage(FIMULTIBITMAP *bitmap, int page) { - if (bitmap) { - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - // only lock if the page wasn't locked before... - - for (std::map::iterator i = header->locked_pages.begin(); i != header->locked_pages.end(); ++i) { - if (i->second == page) { - return NULL; - } - } - - // open the bitmap - - header->io.seek_proc(header->handle, 0, SEEK_SET); - - void *data = FreeImage_Open(header->node, &header->io, header->handle, TRUE); - - // load the bitmap data - - if (data != NULL) { - FIBITMAP *dib = (header->node->m_plugin->load_proc != NULL) ? header->node->m_plugin->load_proc(&header->io, header->handle, page, header->load_flags, data) : NULL; - - // close the file - - FreeImage_Close(header->node, &header->io, header->handle, data); - - // if there was still another bitmap open, get rid of it - - if (dib) { - header->locked_pages[dib] = page; - - return dib; - } - - return NULL; - } - } - - return NULL; -} - -void DLL_CALLCONV -FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *page, BOOL changed) { - if ((bitmap) && (page)) { - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - // find out if the page we try to unlock is actually locked... - - if (header->locked_pages.find(page) != header->locked_pages.end()) { - // store the bitmap compressed in the cache for later writing - - if (changed && !header->read_only) { - header->changed = TRUE; - - // cut loose the block from the rest - - BlockListIterator i = FreeImage_FindBlock(bitmap, header->locked_pages[page]); - - // compress the data - - DWORD compressed_size = 0; - BYTE *compressed_data = NULL; - - // open a memory handle - FIMEMORY *hmem = FreeImage_OpenMemory(); - // save the page to memory - FreeImage_SaveToMemory(header->cache_fif, page, hmem, 0); - // get the buffer from the memory stream - FreeImage_AcquireMemory(hmem, &compressed_data, &compressed_size); - - // write the data to the cache - - if (i->m_type == BLOCK_REFERENCE) { - header->m_cachefile.deleteFile(i->getReference()); - } - - int iPage = header->m_cachefile.writeFile(compressed_data, compressed_size); - - *i = PageBlock(BLOCK_REFERENCE, iPage, compressed_size); - - // get rid of the compressed data - - FreeImage_CloseMemory(hmem); - } - - // reset the locked page so that another page can be locked - - FreeImage_Unload(page); - - header->locked_pages.erase(page); - } - } -} - -BOOL DLL_CALLCONV -FreeImage_MovePage(FIMULTIBITMAP *bitmap, int target, int source) { - if (bitmap) { - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - if ((!header->read_only) && (header->locked_pages.empty())) { - if ((target != source) && ((target >= 0) && (target < FreeImage_GetPageCount(bitmap))) && ((source >= 0) && (source < FreeImage_GetPageCount(bitmap)))) { - BlockListIterator block_source = FreeImage_FindBlock(bitmap, target); - BlockListIterator block_target = FreeImage_FindBlock(bitmap, source); - - header->m_blocks.insert(block_target, *block_source); - header->m_blocks.erase(block_source); - - header->changed = TRUE; - - return TRUE; - } - } - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap, int *pages, int *count) { - if ((bitmap) && (count)) { - MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap); - - if ((pages == NULL) || (*count == 0)) { - *count = (int)header->locked_pages.size(); - } else { - int c = 0; - - for (std::map::iterator i = header->locked_pages.begin(); i != header->locked_pages.end(); ++i) { - pages[c] = i->second; - - c++; - - if (c == *count) { - break; - } - } - } - - return TRUE; - } - - return FALSE; -} - -// ===================================================================== -// Memory IO Multipage functions -// ===================================================================== - -FIMULTIBITMAP * DLL_CALLCONV -FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags) { - BOOL read_only = FALSE; // modifications (if any) will be stored into the memory cache - - // retrieve the plugin list to find the node belonging to this plugin - - PluginList *list = FreeImage_GetPluginList(); - - if (list) { - PluginNode *node = list->FindNodeFromFIF(fif); - - if (node) { - - FIMULTIBITMAP *bitmap = new(std::nothrow) FIMULTIBITMAP; - - if (bitmap) { - MULTIBITMAPHEADER *header = new(std::nothrow) MULTIBITMAPHEADER; - - if (header) { - header->node = node; - header->fif = fif; - SetMemoryIO(&header->io); - header->handle = (fi_handle)stream; - header->read_only = read_only; - header->cache_fif = fif; - header->load_flags = flags; - - // store the MULTIBITMAPHEADER in the surrounding FIMULTIBITMAP structure - - bitmap->data = header; - - // cache the page count - - header->page_count = FreeImage_InternalGetPageCount(bitmap); - - // allocate a continueus block to describe the bitmap - - header->m_blocks.push_back(PageBlock(BLOCK_CONTINUEUS, 0, header->page_count - 1)); - - // no need to open cache - it is in-memory by default - - return bitmap; - } - - delete bitmap; - } - - } - } - - return NULL; -} - -BOOL DLL_CALLCONV -FreeImage_SaveMultiBitmapToMemory(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FIMEMORY *stream, int flags) { - if (stream && stream->data) { - FreeImageIO io; - SetMemoryIO(&io); - - return FreeImage_SaveMultiBitmapToHandle(fif, bitmap, &io, (fi_handle)stream, flags); - } - - return FALSE; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/NNQuantizer.cpp b/Dependencies/FreeImage/Source/FreeImage/NNQuantizer.cpp deleted file mode 100644 index f907c41..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/NNQuantizer.cpp +++ /dev/null @@ -1,507 +0,0 @@ -// NeuQuant Neural-Net Quantization Algorithm -// ------------------------------------------ -// -// Copyright (c) 1994 Anthony Dekker -// -// NEUQUANT Neural-Net quantization algorithm by Anthony Dekker, 1994. -// See "Kohonen neural networks for optimal colour quantization" -// in "Network: Computation in Neural Systems" Vol. 5 (1994) pp 351-367. -// for a discussion of the algorithm. -// -// Any party obtaining a copy of these files from the author, directly or -// indirectly, is granted, free of charge, a full and unrestricted irrevocable, -// world-wide, paid up, royalty-free, nonexclusive right and license to deal -// in this software and documentation files (the "Software"), including without -// limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons who receive -// copies from any such party to do so, with the only requirement being -// that this copyright notice remain intact. - -/////////////////////////////////////////////////////////////////////// -// History -// ------- -// January 2001: Adaptation of the Neural-Net Quantization Algorithm -// for the FreeImage 2 library -// Author: Herv Drolon (drolon@infonie.fr) -// March 2004: Adaptation for the FreeImage 3 library (port to big endian processors) -// Author: Herv Drolon (drolon@infonie.fr) -// April 2004: Algorithm rewritten as a C++ class. -// Fixed a bug in the algorithm with handling of 4-byte boundary alignment. -// Author: Herv Drolon (drolon@infonie.fr) -/////////////////////////////////////////////////////////////////////// - -#include "Quantizers.h" -#include "FreeImage.h" -#include "Utilities.h" - - -// Four primes near 500 - assume no image has a length so large -// that it is divisible by all four primes -// ========================================================== - -#define prime1 499 -#define prime2 491 -#define prime3 487 -#define prime4 503 - -// ---------------------------------------------------------------- - -NNQuantizer::NNQuantizer(int PaletteSize) -{ - netsize = PaletteSize; - maxnetpos = netsize - 1; - initrad = netsize < 8 ? 1 : (netsize >> 3); - initradius = (initrad * radiusbias); - - network = NULL; - - network = (pixel *)malloc(netsize * sizeof(pixel)); - bias = (int *)malloc(netsize * sizeof(int)); - freq = (int *)malloc(netsize * sizeof(int)); - radpower = (int *)malloc(initrad * sizeof(int)); - - if( !network || !bias || !freq || !radpower ) { - if(network) free(network); - if(bias) free(bias); - if(freq) free(freq); - if(radpower) free(radpower); - throw FI_MSG_ERROR_MEMORY; - } -} - -NNQuantizer::~NNQuantizer() -{ - if(network) free(network); - if(bias) free(bias); - if(freq) free(freq); - if(radpower) free(radpower); -} - -/////////////////////////////////////////////////////////////////////////// -// Initialise network in range (0,0,0) to (255,255,255) and set parameters -// ----------------------------------------------------------------------- - -void NNQuantizer::initnet() { - int i, *p; - - for (i = 0; i < netsize; i++) { - p = network[i]; - p[FI_RGBA_BLUE] = p[FI_RGBA_GREEN] = p[FI_RGBA_RED] = (i << (netbiasshift+8))/netsize; - freq[i] = intbias/netsize; /* 1/netsize */ - bias[i] = 0; - } -} - -/////////////////////////////////////////////////////////////////////////////////////// -// Unbias network to give byte values 0..255 and record position i to prepare for sort -// ------------------------------------------------------------------------------------ - -void NNQuantizer::unbiasnet() { - int i, j, temp; - - for (i = 0; i < netsize; i++) { - for (j = 0; j < 3; j++) { - // OLD CODE: network[i][j] >>= netbiasshift; - // Fix based on bug report by Juergen Weigert jw@suse.de - temp = (network[i][j] + (1 << (netbiasshift - 1))) >> netbiasshift; - if (temp > 255) temp = 255; - network[i][j] = temp; - } - network[i][3] = i; // record colour no - } -} - -////////////////////////////////////////////////////////////////////////////////// -// Insertion sort of network and building of netindex[0..255] (to do after unbias) -// ------------------------------------------------------------------------------- - -void NNQuantizer::inxbuild() { - int i,j,smallpos,smallval; - int *p,*q; - int previouscol,startpos; - - previouscol = 0; - startpos = 0; - for (i = 0; i < netsize; i++) { - p = network[i]; - smallpos = i; - smallval = p[FI_RGBA_GREEN]; // index on g - // find smallest in i..netsize-1 - for (j = i+1; j < netsize; j++) { - q = network[j]; - if (q[FI_RGBA_GREEN] < smallval) { // index on g - smallpos = j; - smallval = q[FI_RGBA_GREEN]; // index on g - } - } - q = network[smallpos]; - // swap p (i) and q (smallpos) entries - if (i != smallpos) { - j = q[FI_RGBA_BLUE]; q[FI_RGBA_BLUE] = p[FI_RGBA_BLUE]; p[FI_RGBA_BLUE] = j; - j = q[FI_RGBA_GREEN]; q[FI_RGBA_GREEN] = p[FI_RGBA_GREEN]; p[FI_RGBA_GREEN] = j; - j = q[FI_RGBA_RED]; q[FI_RGBA_RED] = p[FI_RGBA_RED]; p[FI_RGBA_RED] = j; - j = q[3]; q[3] = p[3]; p[3] = j; - } - // smallval entry is now in position i - if (smallval != previouscol) { - netindex[previouscol] = (startpos+i)>>1; - for (j = previouscol+1; j < smallval; j++) - netindex[j] = i; - previouscol = smallval; - startpos = i; - } - } - netindex[previouscol] = (startpos+maxnetpos)>>1; - for (j = previouscol+1; j < 256; j++) - netindex[j] = maxnetpos; // really 256 -} - -/////////////////////////////////////////////////////////////////////////////// -// Search for BGR values 0..255 (after net is unbiased) and return colour index -// ---------------------------------------------------------------------------- - -int NNQuantizer::inxsearch(int b, int g, int r) { - int i, j, dist, a, bestd; - int *p; - int best; - - bestd = 1000; // biggest possible dist is 256*3 - best = -1; - i = netindex[g]; // index on g - j = i-1; // start at netindex[g] and work outwards - - while ((i < netsize) || (j >= 0)) { - if (i < netsize) { - p = network[i]; - dist = p[FI_RGBA_GREEN] - g; // inx key - if (dist >= bestd) - i = netsize; // stop iter - else { - i++; - if (dist < 0) - dist = -dist; - a = p[FI_RGBA_BLUE] - b; - if (a < 0) - a = -a; - dist += a; - if (dist < bestd) { - a = p[FI_RGBA_RED] - r; - if (a<0) - a = -a; - dist += a; - if (dist < bestd) { - bestd = dist; - best = p[3]; - } - } - } - } - if (j >= 0) { - p = network[j]; - dist = g - p[FI_RGBA_GREEN]; // inx key - reverse dif - if (dist >= bestd) - j = -1; // stop iter - else { - j--; - if (dist < 0) - dist = -dist; - a = p[FI_RGBA_BLUE] - b; - if (a<0) - a = -a; - dist += a; - if (dist < bestd) { - a = p[FI_RGBA_RED] - r; - if (a<0) - a = -a; - dist += a; - if (dist < bestd) { - bestd = dist; - best = p[3]; - } - } - } - } - } - return best; -} - -/////////////////////////////// -// Search for biased BGR values -// ---------------------------- - -int NNQuantizer::contest(int b, int g, int r) { - // finds closest neuron (min dist) and updates freq - // finds best neuron (min dist-bias) and returns position - // for frequently chosen neurons, freq[i] is high and bias[i] is negative - // bias[i] = gamma*((1/netsize)-freq[i]) - - int i,dist,a,biasdist,betafreq; - int bestpos,bestbiaspos,bestd,bestbiasd; - int *p,*f, *n; - - bestd = ~(((int) 1)<<31); - bestbiasd = bestd; - bestpos = -1; - bestbiaspos = bestpos; - p = bias; - f = freq; - - for (i = 0; i < netsize; i++) { - n = network[i]; - dist = n[FI_RGBA_BLUE] - b; - if (dist < 0) - dist = -dist; - a = n[FI_RGBA_GREEN] - g; - if (a < 0) - a = -a; - dist += a; - a = n[FI_RGBA_RED] - r; - if (a < 0) - a = -a; - dist += a; - if (dist < bestd) { - bestd = dist; - bestpos = i; - } - biasdist = dist - ((*p)>>(intbiasshift-netbiasshift)); - if (biasdist < bestbiasd) { - bestbiasd = biasdist; - bestbiaspos = i; - } - betafreq = (*f >> betashift); - *f++ -= betafreq; - *p++ += (betafreq << gammashift); - } - freq[bestpos] += beta; - bias[bestpos] -= betagamma; - return bestbiaspos; -} - -/////////////////////////////////////////////////////// -// Move neuron i towards biased (b,g,r) by factor alpha -// ---------------------------------------------------- - -void NNQuantizer::altersingle(int alpha, int i, int b, int g, int r) { - int *n; - - n = network[i]; // alter hit neuron - n[FI_RGBA_BLUE] -= (alpha * (n[FI_RGBA_BLUE] - b)) / initalpha; - n[FI_RGBA_GREEN] -= (alpha * (n[FI_RGBA_GREEN] - g)) / initalpha; - n[FI_RGBA_RED] -= (alpha * (n[FI_RGBA_RED] - r)) / initalpha; -} - -//////////////////////////////////////////////////////////////////////////////////// -// Move adjacent neurons by precomputed alpha*(1-((i-j)^2/[r]^2)) in radpower[|i-j|] -// --------------------------------------------------------------------------------- - -void NNQuantizer::alterneigh(int rad, int i, int b, int g, int r) { - int j, k, lo, hi, a; - int *p, *q; - - lo = i - rad; if (lo < -1) lo = -1; - hi = i + rad; if (hi > netsize) hi = netsize; - - j = i+1; - k = i-1; - q = radpower; - while ((j < hi) || (k > lo)) { - a = (*(++q)); - if (j < hi) { - p = network[j]; - p[FI_RGBA_BLUE] -= (a * (p[FI_RGBA_BLUE] - b)) / alpharadbias; - p[FI_RGBA_GREEN] -= (a * (p[FI_RGBA_GREEN] - g)) / alpharadbias; - p[FI_RGBA_RED] -= (a * (p[FI_RGBA_RED] - r)) / alpharadbias; - j++; - } - if (k > lo) { - p = network[k]; - p[FI_RGBA_BLUE] -= (a * (p[FI_RGBA_BLUE] - b)) / alpharadbias; - p[FI_RGBA_GREEN] -= (a * (p[FI_RGBA_GREEN] - g)) / alpharadbias; - p[FI_RGBA_RED] -= (a * (p[FI_RGBA_RED] - r)) / alpharadbias; - k--; - } - } -} - -///////////////////// -// Main Learning Loop -// ------------------ - -/** - Get a pixel sample at position pos. Handle 4-byte boundary alignment. - @param pos pixel position in a WxHx3 pixel buffer - @param b blue pixel component - @param g green pixel component - @param r red pixel component -*/ -void NNQuantizer::getSample(long pos, int *b, int *g, int *r) { - // get equivalent pixel coordinates - // - assume it's a 24-bit image - - int x = pos % img_line; - int y = pos / img_line; - - BYTE *bits = FreeImage_GetScanLine(dib_ptr, y) + x; - - *b = bits[FI_RGBA_BLUE] << netbiasshift; - *g = bits[FI_RGBA_GREEN] << netbiasshift; - *r = bits[FI_RGBA_RED] << netbiasshift; -} - -void NNQuantizer::learn(int sampling_factor) { - int i, j, b, g, r; - int radius, rad, alpha, step, delta, samplepixels; - int alphadec; // biased by 10 bits - long pos, lengthcount; - - // image size as viewed by the scan algorithm - lengthcount = img_width * img_height * 3; - - // number of samples used for the learning phase - samplepixels = lengthcount / (3 * sampling_factor); - - // decrease learning rate after delta pixel presentations - delta = samplepixels / ncycles; - if(delta == 0) { - // avoid a 'divide by zero' error with very small images - delta = 1; - } - - // initialize learning parameters - alphadec = 30 + ((sampling_factor - 1) / 3); - alpha = initalpha; - radius = initradius; - - rad = radius >> radiusbiasshift; - if (rad <= 1) rad = 0; - for (i = 0; i < rad; i++) - radpower[i] = alpha*(((rad*rad - i*i)*radbias)/(rad*rad)); - - // initialize pseudo-random scan - if ((lengthcount % prime1) != 0) - step = 3*prime1; - else { - if ((lengthcount % prime2) != 0) - step = 3*prime2; - else { - if ((lengthcount % prime3) != 0) - step = 3*prime3; - else - step = 3*prime4; - } - } - - i = 0; // iteration - pos = 0; // pixel position - - while (i < samplepixels) { - // get next learning sample - getSample(pos, &b, &g, &r); - - // find winning neuron - j = contest(b, g, r); - - // alter winner - altersingle(alpha, j, b, g, r); - - // alter neighbours - if (rad) alterneigh(rad, j, b, g, r); - - // next sample - pos += step; - while (pos >= lengthcount) pos -= lengthcount; - - i++; - if (i % delta == 0) { - // decrease learning rate and also the neighborhood - alpha -= alpha / alphadec; - radius -= radius / radiusdec; - rad = radius >> radiusbiasshift; - if (rad <= 1) rad = 0; - for (j = 0; j < rad; j++) - radpower[j] = alpha * (((rad*rad - j*j) * radbias) / (rad*rad)); - } - } - -} - -////////////// -// Quantizer -// ----------- - -FIBITMAP* NNQuantizer::Quantize(FIBITMAP *dib, int ReserveSize, RGBQUAD *ReservePalette, int sampling) { - - if ((!dib) || (FreeImage_GetBPP(dib) != 24)) { - return NULL; - } - - // 1) Select a sampling factor in range 1..30 (input parameter 'sampling') - // 1 => slower, 30 => faster. Default value is 1 - - - // 2) Get DIB parameters - - dib_ptr = dib; - - img_width = FreeImage_GetWidth(dib); // DIB width - img_height = FreeImage_GetHeight(dib); // DIB height - img_line = FreeImage_GetLine(dib); // DIB line length in bytes (should be equal to 3 x W) - - // For small images, adjust the sampling factor to avoid a 'divide by zero' error later - // (see delta in learn() routine) - int adjust = (img_width * img_height) / ncycles; - if(sampling >= adjust) - sampling = 1; - - - // 3) Initialize the network and apply the learning algorithm - - if( netsize > ReserveSize ) { - netsize -= ReserveSize; - initnet(); - learn(sampling); - unbiasnet(); - netsize += ReserveSize; - } - - // 3.5) Overwrite the last few palette entries with the reserved ones - for (int i = 0; i < ReserveSize; i++) { - network[netsize - ReserveSize + i][FI_RGBA_BLUE] = ReservePalette[i].rgbBlue; - network[netsize - ReserveSize + i][FI_RGBA_GREEN] = ReservePalette[i].rgbGreen; - network[netsize - ReserveSize + i][FI_RGBA_RED] = ReservePalette[i].rgbRed; - network[netsize - ReserveSize + i][3] = netsize - ReserveSize + i; - } - - // 4) Allocate a new 8-bit DIB - - FIBITMAP *new_dib = FreeImage_Allocate(img_width, img_height, 8); - - if (new_dib == NULL) - return NULL; - - // 5) Write the quantized palette - - RGBQUAD *new_pal = FreeImage_GetPalette(new_dib); - - for (int j = 0; j < netsize; j++) { - new_pal[j].rgbBlue = (BYTE)network[j][FI_RGBA_BLUE]; - new_pal[j].rgbGreen = (BYTE)network[j][FI_RGBA_GREEN]; - new_pal[j].rgbRed = (BYTE)network[j][FI_RGBA_RED]; - } - - inxbuild(); - - // 6) Write output image using inxsearch(b,g,r) - - for (WORD rows = 0; rows < img_height; rows++) { - BYTE *new_bits = FreeImage_GetScanLine(new_dib, rows); - BYTE *bits = FreeImage_GetScanLine(dib_ptr, rows); - - for (WORD cols = 0; cols < img_width; cols++) { - new_bits[cols] = (BYTE)inxsearch(bits[FI_RGBA_BLUE], bits[FI_RGBA_GREEN], bits[FI_RGBA_RED]); - - bits += 3; - } - } - - return (FIBITMAP*) new_dib; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PSDParser.cpp b/Dependencies/FreeImage/Source/FreeImage/PSDParser.cpp deleted file mode 100644 index 5865216..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PSDParser.cpp +++ /dev/null @@ -1,2206 +0,0 @@ -// ========================================================== -// Photoshop Loader -// -// Design and implementation by -// - Hervé Drolon (drolon@infonie.fr) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// - Garrick Meeker (garrickmeeker@users.sourceforge.net) -// -// Based on LGPL code created and published by http://sourceforge.net/projects/elynx/ -// Format is now publicly documented at: -// https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/ -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "PSDParser.h" - -#include "../Metadata/FreeImageTag.h" - -// -------------------------------------------------------------------------- - -// PSD signature (= '8BPS') -#define PSD_SIGNATURE 0x38425053 -// Image resource block signature (= '8BIM') -#define PSD_RESOURCE 0x3842494D - -// PSD color modes -#define PSDP_BITMAP 0 -#define PSDP_GRAYSCALE 1 -#define PSDP_INDEXED 2 -#define PSDP_RGB 3 -#define PSDP_CMYK 4 -#define PSDP_MULTICHANNEL 7 -#define PSDP_DUOTONE 8 -#define PSDP_LAB 9 - -// PSD compression schemes -#define PSDP_COMPRESSION_NONE 0 //! Raw data -#define PSDP_COMPRESSION_RLE 1 //! RLE compression (same as TIFF packed bits) -#define PSDP_COMPRESSION_ZIP 2 //! ZIP compression without prediction -#define PSDP_COMPRESSION_ZIP_PREDICTION 3 //! ZIP compression with prediction - -/** -PSD image resources -*/ -enum { - //! Obsolete - Photoshop 2.0 - PSDP_RES_RESOLUTION_INFO_V2 = 1000, - //! ResolutionInfo structure - PSDP_RES_RESOLUTION_INFO = 1005, - //! DisplayInfo structure - PSDP_RES_DISPLAY_INFO = 1007, - //! IPTC-NAA record - PSDP_RES_IPTC_NAA = 1028, - //! (Photoshop 4.0) Thumbnail resource for Photoshop 4.0 only - PSDP_RES_THUMBNAIL_PS4 = 1033, - //! (Photoshop 4.0) Copyright flag - PSDP_RES_COPYRIGHT = 1034, - //! (Photoshop 5.0) Thumbnail resource (supersedes resource 1033) - PSDP_RES_THUMBNAIL = 1036, - //! (Photoshop 5.0) Global Angle - PSDP_RES_GLOBAL_ANGLE = 1037, - //! ICC profile - PSDP_RES_ICC_PROFILE = 1039, - //! (Photoshop 6.0) Indexed Color Table Count; 2 bytes for the number of colors in table that are actually defined - PSDP_RES_INDEXED_COLORS = 1046, - //! (Photoshop 6.0) Transparency Index. 2 bytes for the index of transparent color, if any. - PSDP_RES_TRANSPARENCY_INDEX = 1047, - //! (Photoshop 7.0) EXIF data 1 - PSDP_RES_EXIF1 = 1058, - //! (Photoshop 7.0) EXIF data 3 - PSDP_RES_EXIF3 = 1059, - //! (Photoshop 7.0) XMP metadata - PSDP_RES_XMP = 1060, - //! (Photoshop CS3) DisplayInfo structure - PSDP_RES_DISPLAY_INFO_FLT = 1077, -}; - -#define SAFE_DELETE_ARRAY(_p_) { if (NULL != (_p_)) { delete [] (_p_); (_p_) = NULL; } } - -// -------------------------------------------------------------------------- - -template -class PSDGetValue { -public: - static inline int get(const BYTE * iprBuffer) {} // error -}; - -template <> -class PSDGetValue<1> { -public: - static inline BYTE get(const BYTE * iprBuffer) { return iprBuffer[0]; } -}; - -template <> -class PSDGetValue<2> { -public: - static inline WORD get(const BYTE * iprBuffer) { - WORD v = ((const WORD*)iprBuffer)[0]; -#ifndef FREEIMAGE_BIGENDIAN - SwapShort(&v); -#endif - return (int)v; - } -}; - -template <> -class PSDGetValue<4> { -public: - static inline DWORD get(const BYTE * iprBuffer) { - DWORD v = ((const DWORD*)iprBuffer)[0]; -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(&v); -#endif - return v; - } -}; - -template <> -class PSDGetValue<8> { -public: - static inline UINT64 get(const BYTE * iprBuffer) { - UINT64 v = ((const UINT64*)iprBuffer)[0]; -#ifndef FREEIMAGE_BIGENDIAN - SwapInt64(&v); -#endif - return v; - } -}; - -#define psdGetValue(PTR, SIZE) PSDGetValue::get((PTR)) -#define psdGetLongValue(PTR, SIZE) PSDGetValue::get((PTR)) - -// -------------------------------------------------------------------------- - -static UINT64 -psdReadSize(FreeImageIO *io, fi_handle handle, const psdHeaderInfo& header) { - if(header._Version == 1) { - BYTE Length[4]; - io->read_proc(Length, sizeof(Length), 1, handle); - return psdGetLongValue(Length, sizeof(Length)); - } else { - BYTE Length[8]; - io->read_proc(Length, sizeof(Length), 1, handle); - return psdGetLongValue(Length, sizeof(Length)); - } -} - -// -------------------------------------------------------------------------- - -template -class PSDSetValue { -public: - static inline void set(BYTE * iprBuffer, int v) {} // error -}; - -template <> -class PSDSetValue<1> { -public: - static inline void set(BYTE * iprBuffer, BYTE v) { iprBuffer[0] = v; } -}; - -template <> -class PSDSetValue<2> { -public: - static inline void set(BYTE * iprBuffer, WORD v) { -#ifndef FREEIMAGE_BIGENDIAN - SwapShort(&v); -#endif - ((WORD*)iprBuffer)[0] = v; - } -}; - -template <> -class PSDSetValue<4> { -public: - static inline void set(const BYTE * iprBuffer, DWORD v) { -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(&v); -#endif - ((DWORD*)iprBuffer)[0] = v; - } -}; - -template <> -class PSDSetValue<8> { -public: - static inline void set(const BYTE * iprBuffer, UINT64 v) { -#ifndef FREEIMAGE_BIGENDIAN - SwapInt64(&v); -#endif - ((UINT64*)iprBuffer)[0] = v; - } -}; - -#define psdSetValue(PTR, SIZE, V) PSDSetValue::set((PTR), (V)) -#define psdSetLongValue(PTR, SIZE, V) PSDSetValue::set((PTR), (V)) - -// -------------------------------------------------------------------------- - -static inline bool -psdWriteSize(FreeImageIO *io, fi_handle handle, const psdHeaderInfo& header, UINT64 v) { - if(header._Version == 1) { - BYTE Length[4]; - psdSetLongValue(Length, sizeof(Length), (DWORD)v); - return (io->write_proc(Length, sizeof(Length), 1, handle) == 1); - } else { - BYTE Length[8]; - psdSetLongValue(Length, sizeof(Length), v); - return (io->write_proc(Length, sizeof(Length), 1, handle) == 1); - } -} - -/** -Return Exif metadata as a binary read-only buffer. -The buffer is owned by the function and MUST NOT be freed by the caller. -*/ -static BOOL -psd_write_exif_profile_raw(FIBITMAP *dib, BYTE **profile, unsigned *profile_size) { - // marker identifying string for Exif = "Exif\0\0" - // used by JPEG not PSD - BYTE exif_signature[6] = { 0x45, 0x78, 0x69, 0x66, 0x00, 0x00 }; - - FITAG *tag_exif = NULL; - FreeImage_GetMetadata(FIMD_EXIF_RAW, dib, g_TagLib_ExifRawFieldName, &tag_exif); - - if(tag_exif) { - const BYTE *tag_value = (BYTE*)FreeImage_GetTagValue(tag_exif); - - // verify the identifying string - if(memcmp(exif_signature, tag_value, sizeof(exif_signature)) != 0) { - // not an Exif profile - return FALSE; - } - - *profile = (BYTE*)tag_value + sizeof(exif_signature); - *profile_size = (unsigned)FreeImage_GetTagLength(tag_exif) - sizeof(exif_signature); - - return TRUE; - } - - return FALSE; -} - -static BOOL -psd_set_xmp_profile(FIBITMAP *dib, const BYTE *dataptr, unsigned int datalen) { - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if (tag) { - FreeImage_SetTagID(tag, PSDP_RES_XMP); - FreeImage_SetTagKey(tag, g_TagLib_XMPFieldName); - FreeImage_SetTagLength(tag, (DWORD)datalen); - FreeImage_SetTagCount(tag, (DWORD)datalen); - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagValue(tag, dataptr); - - // store the tag - FreeImage_SetMetadata(FIMD_XMP, dib, FreeImage_GetTagKey(tag), tag); - - // destroy the tag - FreeImage_DeleteTag(tag); - } - - return TRUE; -} - -/** -Return XMP metadata as a binary read-only buffer. -The buffer is owned by the function and MUST NOT be freed by the caller. -*/ -static BOOL -psd_get_xmp_profile(FIBITMAP *dib, BYTE **profile, unsigned *profile_size) { - FITAG *tag_xmp = NULL; - FreeImage_GetMetadata(FIMD_XMP, dib, g_TagLib_XMPFieldName, &tag_xmp); - - if(tag_xmp && (NULL != FreeImage_GetTagValue(tag_xmp))) { - - *profile = (BYTE*)FreeImage_GetTagValue(tag_xmp); - *profile_size = (unsigned)FreeImage_GetTagLength(tag_xmp); - - return TRUE; - } - - return FALSE; -} - -// -------------------------------------------------------------------------- - -psdHeaderInfo::psdHeaderInfo() : _Version(-1), _Channels(-1), _Height(-1), _Width(-1), _BitsPerChannel(-1), _ColourMode(-1) { -} - -psdHeaderInfo::~psdHeaderInfo() { -} - -bool psdHeaderInfo::Read(FreeImageIO *io, fi_handle handle) { - psdHeader header; - - const int n = (int)io->read_proc(&header, sizeof(header), 1, handle); - if(!n) { - return false; - } - - // check the signature - int nSignature = psdGetValue(header.Signature, sizeof(header.Signature)); - if (PSD_SIGNATURE == nSignature) { - // check the version - short nVersion = (short)psdGetValue( header.Version, sizeof(header.Version) ); - if (1 == nVersion || 2 == nVersion) { - _Version = nVersion; - // header.Reserved must be zero - BYTE psd_reserved[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - if(memcmp(header.Reserved, psd_reserved, 6) != 0) { - FreeImage_OutputMessageProc(FIF_PSD, "Warning: file header reserved member is not equal to zero"); - } - // read the header - _Channels = (short)psdGetValue( header.Channels, sizeof(header.Channels) ); - _Height = psdGetValue( header.Rows, sizeof(header.Rows) ); - _Width = psdGetValue( header.Columns, sizeof(header.Columns) ); - _BitsPerChannel = (short)psdGetValue( header.Depth, sizeof(header.Depth) ); - _ColourMode = (short)psdGetValue( header.Mode, sizeof(header.Mode) ); - if (_Version == 1 && (_Width > 30000 || _Height > 30000)) { - return false; - } - - return true; - } - } - - return false; -} - -bool psdHeaderInfo::Write(FreeImageIO *io, fi_handle handle) { - psdHeader header; - - psdSetValue(header.Signature, sizeof(header.Signature), PSD_SIGNATURE); - psdSetValue(header.Version, sizeof(header.Version), _Version); - memset(header.Reserved, 0, sizeof(header.Reserved)); - psdSetValue(header.Channels, sizeof(header.Channels), _Channels); - psdSetValue(header.Rows, sizeof(header.Rows), _Height); - psdSetValue(header.Columns, sizeof(header.Columns), _Width); - psdSetValue(header.Depth, sizeof(header.Depth), _BitsPerChannel); - psdSetValue(header.Mode, sizeof(header.Mode), _ColourMode); - return (io->write_proc(&header, sizeof(header), 1, handle) == 1); -} - -// -------------------------------------------------------------------------- - -psdColourModeData::psdColourModeData() : _Length(-1), _plColourData(NULL) { -} - -psdColourModeData::~psdColourModeData() { - SAFE_DELETE_ARRAY(_plColourData); -} - -bool psdColourModeData::Read(FreeImageIO *io, fi_handle handle) { - if (0 < _Length) { - SAFE_DELETE_ARRAY(_plColourData); - } - - BYTE Length[4]; - io->read_proc(Length, sizeof(Length), 1, handle); - - _Length = psdGetValue( Length, sizeof(_Length) ); - if (0 < _Length) { - _plColourData = new BYTE[_Length]; - io->read_proc(_plColourData, _Length, 1, handle); - } - - return true; -} - -bool psdColourModeData::Write(FreeImageIO *io, fi_handle handle) { - if(io->write_proc(&_Length, sizeof(_Length), 1, handle) != 1) { - return false; - } - if(0 < _Length) { - if(io->write_proc(_plColourData, _Length, 1, handle) != 1) { - return false; - } - } - return true; -} - -bool psdColourModeData::FillPalette(FIBITMAP *dib) { - RGBQUAD *pal = FreeImage_GetPalette(dib); - if(pal) { - for (int i = 0; i < 256; i++) { - pal[i].rgbRed = _plColourData[i + 0*256]; - pal[i].rgbGreen = _plColourData[i + 1*256]; - pal[i].rgbBlue = _plColourData[i + 2*256]; - } - return true; - } - return false; -} - -// -------------------------------------------------------------------------- - -psdImageResource::psdImageResource() : _plName (0) { - Reset(); -} - -psdImageResource::~psdImageResource() { - SAFE_DELETE_ARRAY(_plName); -} - -void psdImageResource::Reset() { - _Length = -1; - memset( _OSType, '\0', sizeof(_OSType) ); - _ID = -1; - SAFE_DELETE_ARRAY(_plName); - _Size = -1; -} - -bool psdImageResource::Write(FreeImageIO *io, fi_handle handle, int ID, int Size) { - BYTE ShortValue[2], IntValue[4]; - - _ID = ID; - _Size = Size; - psdSetValue((BYTE*)_OSType, sizeof(_OSType), PSD_RESOURCE); - if(io->write_proc(_OSType, sizeof(_OSType), 1, handle) != 1) { - return false; - } - psdSetValue(ShortValue, sizeof(ShortValue), _ID); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - psdSetValue(ShortValue, sizeof(ShortValue), 0); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - psdSetValue(IntValue, sizeof(IntValue), _Size); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - return true; -} - -// -------------------------------------------------------------------------- - -psdResolutionInfo::psdResolutionInfo() : _widthUnit(-1), _heightUnit(-1), _hRes(-1), _vRes(-1), _hResUnit(-1), _vResUnit(-1) { -} - -psdResolutionInfo::~psdResolutionInfo() { -} - -int psdResolutionInfo::Read(FreeImageIO *io, fi_handle handle) { - BYTE IntValue[4], ShortValue[2]; - int nBytes=0, n; - - // Horizontal resolution in pixels per inch. - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _hRes = (short)psdGetValue(ShortValue, sizeof(_hRes) ); - - // 1=display horizontal resolution in pixels per inch; 2=display horizontal resolution in pixels per cm. - n = (int)io->read_proc(IntValue, sizeof(IntValue), 1, handle); - nBytes += n * sizeof(IntValue); - _hResUnit = psdGetValue(IntValue, sizeof(_hResUnit) ); - - // Display width as 1=inches; 2=cm; 3=points; 4=picas; 5=columns. - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _widthUnit = (short)psdGetValue(ShortValue, sizeof(_widthUnit) ); - - // Vertical resolution in pixels per inch. - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _vRes = (short)psdGetValue(ShortValue, sizeof(_vRes) ); - - // 1=display vertical resolution in pixels per inch; 2=display vertical resolution in pixels per cm. - n = (int)io->read_proc(IntValue, sizeof(IntValue), 1, handle); - nBytes += n * sizeof(IntValue); - _vResUnit = psdGetValue(IntValue, sizeof(_vResUnit) ); - - // Display height as 1=inches; 2=cm; 3=points; 4=picas; 5=columns. - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _heightUnit = (short)psdGetValue(ShortValue, sizeof(_heightUnit) ); - - return nBytes; -} - -bool psdResolutionInfo::Write(FreeImageIO *io, fi_handle handle) { - BYTE IntValue[4], ShortValue[2]; - - if (!psdImageResource().Write(io, handle, PSDP_RES_RESOLUTION_INFO, 16)) { - return false; - } - - // Horizontal resolution in pixels per inch. - psdSetValue(ShortValue, sizeof(ShortValue), _hRes); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - - // 1=display horizontal resolution in pixels per inch; 2=display horizontal resolution in pixels per cm. - psdSetValue(IntValue, sizeof(IntValue), _hResUnit); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - - // Display width as 1=inches; 2=cm; 3=points; 4=picas; 5=columns. - psdSetValue(ShortValue, sizeof(ShortValue), _widthUnit); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - - // Vertical resolution in pixels per inch. - psdSetValue(ShortValue, sizeof(ShortValue), _vRes); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - - // 1=display vertical resolution in pixels per inch; 2=display vertical resolution in pixels per cm. - psdSetValue(IntValue, sizeof(IntValue), _vResUnit); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - - // Display height as 1=inches; 2=cm; 3=points; 4=picas; 5=columns. - psdSetValue(ShortValue, sizeof(ShortValue), _heightUnit); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - - return true; -} - -void psdResolutionInfo::GetResolutionInfo(unsigned &res_x, unsigned &res_y) { - if(_hResUnit == 1) { - // convert pixels / inch to pixel / m - res_x = (unsigned) (_hRes / 0.0254000 + 0.5); - } else if(_hResUnit == 2) { - // convert pixels / cm to pixel / m - res_x = (unsigned) (_hRes * 100.0 + 0.5); - } - - if(_vResUnit == 1) { - // convert pixels / inch to pixel / m - res_y = (unsigned) (_vRes / 0.0254000 + 0.5); - } else if(_vResUnit == 2) { - // convert pixels / cm to pixel / m - res_y = (unsigned) (_vRes * 100.0 + 0.5); - } -} - -// -------------------------------------------------------------------------- - -psdResolutionInfo_v2::psdResolutionInfo_v2() { - _Channels = _Rows = _Columns = _Depth = _Mode = -1; -} - -psdResolutionInfo_v2::~psdResolutionInfo_v2() { -} - -int psdResolutionInfo_v2::Read(FreeImageIO *io, fi_handle handle) { - BYTE ShortValue[2]; - int nBytes=0, n; - - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _Channels = (short)psdGetValue(ShortValue, sizeof(_Channels) ); - - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _Rows = (short)psdGetValue(ShortValue, sizeof(_Rows) ); - - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _Columns = (short)psdGetValue(ShortValue, sizeof(_Columns) ); - - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _Depth = (short)psdGetValue(ShortValue, sizeof(_Depth) ); - - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _Mode = (short)psdGetValue(ShortValue, sizeof(_Mode) ); - - return nBytes; -} - -bool psdResolutionInfo_v2::Write(FreeImageIO *io, fi_handle handle) { - BYTE ShortValue[2]; - - if(!psdImageResource().Write(io, handle, PSDP_RES_RESOLUTION_INFO_V2, 10)) - return false; - - psdSetValue(ShortValue, sizeof(ShortValue), _Channels); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - psdSetValue(ShortValue, sizeof(ShortValue), _Rows); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - psdSetValue(ShortValue, sizeof(ShortValue), _Columns); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - psdSetValue(ShortValue, sizeof(ShortValue), _Depth); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - psdSetValue(ShortValue, sizeof(ShortValue), _Mode); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - - return true; -} - -// -------------------------------------------------------------------------- - -psdDisplayInfo::psdDisplayInfo() { - _Opacity = _ColourSpace = -1; - for (unsigned n = 0; n < 4; ++n) { - _Colour[n] = 0; - } - _Kind = 0; - _padding = '0'; -} - -psdDisplayInfo::~psdDisplayInfo() { -} - -int psdDisplayInfo::Read(FreeImageIO *io, fi_handle handle) { - BYTE ShortValue[2]; - int nBytes=0, n; - - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _ColourSpace = (short)psdGetValue(ShortValue, sizeof(_ColourSpace) ); - - for (unsigned i = 0; i < 4; ++i) { - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _Colour[i] = (short)psdGetValue(ShortValue, sizeof(_Colour[i]) ); - } - - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _Opacity = (short)psdGetValue(ShortValue, sizeof(_Opacity) ); - if((_Opacity < 0) || (_Opacity > 100)) { - throw "Invalid DisplayInfo::Opacity value"; - } - - BYTE c[1]; - n = (int)io->read_proc(c, sizeof(c), 1, handle); - nBytes += n * sizeof(c); - _Kind = (BYTE)psdGetValue(c, sizeof(c)); - - n = (int)io->read_proc(c, sizeof(c), 1, handle); - nBytes += n * sizeof(c); - - _padding = (BYTE)psdGetValue(c, sizeof(c)); - if(_padding != 0) { - throw "Invalid DisplayInfo::Padding value"; - } - - return nBytes; -} - -bool psdDisplayInfo::Write(FreeImageIO *io, fi_handle handle) { - BYTE ShortValue[2]; - - if(!psdImageResource().Write(io, handle, PSDP_RES_DISPLAY_INFO, 14)) - return false; - - psdSetValue(ShortValue, sizeof(ShortValue), _ColourSpace); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - for (unsigned i = 0; i < 4; ++i) { - psdSetValue(ShortValue, sizeof(ShortValue), _Colour[i]); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - } - psdSetValue(ShortValue, sizeof(ShortValue), _Opacity); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - BYTE c[1]; - psdSetValue(c, sizeof(c), _Kind); - if(io->write_proc(c, sizeof(c), 1, handle) != 1) { - return false; - } - psdSetValue(c, sizeof(c), 0); - if(io->write_proc(c, sizeof(c), 1, handle) != 1) { - return false; - } - - return true; -} - -// -------------------------------------------------------------------------- - -psdThumbnail::psdThumbnail() : -_Format(-1), _Width(-1), _Height(-1), _WidthBytes(-1), _Size(-1), _CompressedSize(-1), _BitPerPixel(-1), _Planes(-1), _dib(NULL), _owned(true) { -} - -psdThumbnail::~psdThumbnail() { - if (_owned) FreeImage_Unload(_dib); -} - -void -psdThumbnail::Init() { - if (_dib != NULL) { - _Format = 1; - _Width = (int)FreeImage_GetWidth(_dib); - _Height = (int)FreeImage_GetHeight(_dib); - _BitPerPixel = 24; - _Planes = 1; - _WidthBytes = (_Width * _BitPerPixel + 31) / 32 * 4; - _Size = _WidthBytes * _Height * _Planes; - _CompressedSize = _Size; - } -} - -int psdThumbnail::Read(FreeImageIO *io, fi_handle handle, int iResourceSize, bool isBGR) { - BYTE ShortValue[2], IntValue[4]; - int nBytes=0, n; - - // remove the header size (28 bytes) from the total data size - int iTotalData = iResourceSize - 28; - - const long block_end = io->tell_proc(handle) + iTotalData; - - n = (int)io->read_proc(IntValue, sizeof(IntValue), 1, handle); - nBytes += n * sizeof(IntValue); - _Format = psdGetValue(IntValue, sizeof(_Format) ); - - n = (int)io->read_proc(IntValue, sizeof(IntValue), 1, handle); - nBytes += n * sizeof(IntValue); - _Width = psdGetValue(IntValue, sizeof(_Width) ); - - n = (int)io->read_proc(IntValue, sizeof(IntValue), 1, handle); - nBytes += n * sizeof(IntValue); - _Height = psdGetValue(IntValue, sizeof(_Height) ); - - n = (int)io->read_proc(IntValue, sizeof(IntValue), 1, handle); - nBytes += n * sizeof(IntValue); - _WidthBytes = psdGetValue(IntValue, sizeof(_WidthBytes) ); - - n = (int)io->read_proc(IntValue, sizeof(IntValue), 1, handle); - nBytes += n * sizeof(IntValue); - _Size = psdGetValue(IntValue, sizeof(_Size) ); - - n = (int)io->read_proc(IntValue, sizeof(IntValue), 1, handle); - nBytes += n * sizeof(IntValue); - _CompressedSize = psdGetValue(IntValue, sizeof(_CompressedSize) ); - - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _BitPerPixel = (short)psdGetValue(ShortValue, sizeof(_BitPerPixel) ); - - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _Planes = (short)psdGetValue(ShortValue, sizeof(_Planes) ); - - const long JFIF_startpos = io->tell_proc(handle); - - if(_dib) { - FreeImage_Unload(_dib); - } - - if(_Format == 1) { - // kJpegRGB thumbnail image - _dib = FreeImage_LoadFromHandle(FIF_JPEG, io, handle); - if(isBGR) { - SwapRedBlue32(_dib); - } - // HACK: manually go to end of thumbnail, because (for some reason) LoadFromHandle consumes more bytes then available! - io->seek_proc(handle, block_end, SEEK_SET); - } - else { - // kRawRGB thumbnail image - _dib = FreeImage_Allocate(_Width, _Height, _BitPerPixel); - BYTE* dst_line_start = FreeImage_GetScanLine(_dib, _Height - 1);//<*** flipped - BYTE* line_start = new BYTE[_WidthBytes]; - const unsigned dstLineSize = FreeImage_GetPitch(_dib); - for(unsigned h = 0; h < (unsigned)_Height; ++h, dst_line_start -= dstLineSize) {//<*** flipped - io->read_proc(line_start, _WidthBytes, 1, handle); - iTotalData -= _WidthBytes; - memcpy(dst_line_start, line_start, _Width * _BitPerPixel / 8); - } -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - SwapRedBlue32(_dib); -#endif - SAFE_DELETE_ARRAY(line_start); - - // skip any remaining data - io->seek_proc(handle, iTotalData, SEEK_CUR); - return iResourceSize; - } - - nBytes += (block_end - JFIF_startpos); - - return nBytes; -} - -bool psdThumbnail::Write(FreeImageIO *io, fi_handle handle, bool isBGR) { - BYTE ShortValue[2], IntValue[4]; - - const long res_start_pos = io->tell_proc(handle); - const int ID = isBGR ? PSDP_RES_THUMBNAIL_PS4 : PSDP_RES_THUMBNAIL; - if(!psdImageResource().Write(io, handle, ID, 0)) - return false; - - psdSetValue(IntValue, sizeof(IntValue), _Format); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - psdSetValue(IntValue, sizeof(IntValue), _Width); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - psdSetValue(IntValue, sizeof(IntValue), _Height); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - psdSetValue(IntValue, sizeof(IntValue), _WidthBytes); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - psdSetValue(IntValue, sizeof(IntValue), _Size); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - const long compressed_pos = io->tell_proc(handle); - psdSetValue(IntValue, sizeof(IntValue), _CompressedSize); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - psdSetValue(ShortValue, sizeof(ShortValue), _BitPerPixel); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - psdSetValue(ShortValue, sizeof(ShortValue), _Planes); - if(io->write_proc(ShortValue, sizeof(ShortValue), 1, handle) != 1) { - return false; - } - if(_Format == 1) { - // kJpegRGB thumbnail image - if(isBGR) { - SwapRedBlue32(_dib); - } - const long start_pos = io->tell_proc(handle); - FreeImage_SaveToHandle(FIF_JPEG, _dib, io, handle, JPEG_DEFAULT); - const long current_pos = io->tell_proc(handle); - _CompressedSize = (int)(current_pos - start_pos); - io->seek_proc(handle, compressed_pos, SEEK_SET); - psdSetValue(IntValue, sizeof(IntValue), _CompressedSize); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - io->seek_proc(handle, current_pos, SEEK_SET); - } - else { - // kRawRGB thumbnail image - // ### Unimplemented (should be trivial) - _CompressedSize = 0; - } - - int len = 28 + _CompressedSize; - - // Fix length of resource - io->seek_proc(handle, res_start_pos + 8, SEEK_SET); - psdSetValue(IntValue, sizeof(IntValue), len); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - io->seek_proc(handle, 0, SEEK_END); - - if((len % 2) != 0) { - BYTE data[1]; - data[0] = 0; - if(io->write_proc(data, sizeof(data), 1, handle) != 1) { - return false; - } - } - - return true; -} - -//--------------------------------------------------------------------------- - -psdICCProfile::psdICCProfile() : _ProfileSize(0), _ProfileData(NULL), _owned(true) { -} - -psdICCProfile::~psdICCProfile() { - clear(); -} - -void psdICCProfile::clear() { if (_owned) { SAFE_DELETE_ARRAY(_ProfileData); } else { _ProfileData = NULL; } _ProfileSize = 0;} - -int psdICCProfile::Read(FreeImageIO *io, fi_handle handle, int size) { - int nBytes = 0, n; - - clear(); - - _ProfileData = new (std::nothrow) BYTE[size]; - if(NULL != _ProfileData) { - n = (int)io->read_proc(_ProfileData, 1, size, handle); - _ProfileSize = size; - nBytes += n * sizeof(BYTE); - } - - return nBytes; -} - -bool psdICCProfile::Write(FreeImageIO *io, fi_handle handle) { - if(!psdImageResource().Write(io, handle, PSDP_RES_ICC_PROFILE, _ProfileSize)) - return false; - - if(NULL != _ProfileData) { - if(io->write_proc(_ProfileData, 1, _ProfileSize, handle) != _ProfileSize) { - return false; - } - if((_ProfileSize % 2) != 0) { - BYTE data[1]; - data[0] = 0; - if(io->write_proc(data, sizeof(data), 1, handle) != 1) { - return false; - } - } - } - - return true; -} - -//--------------------------------------------------------------------------- - -psdData::psdData() : _Size(0), _Data(NULL), _owned(true) { -} - -psdData::~psdData() { - clear(); -} - -void psdData::clear() { if (_owned) { SAFE_DELETE_ARRAY(_Data); } else { _Data = NULL; } _Size = 0;} - -int psdData::Read(FreeImageIO *io, fi_handle handle, int size) { - int nBytes = 0, n; - - clear(); - - _Data = new (std::nothrow) BYTE[size]; - if(NULL != _Data) { - n = (int)io->read_proc(_Data, 1, size, handle); - _Size = (unsigned)size; - nBytes += n * sizeof(BYTE); - } - - return nBytes; -} - -bool psdData::Write(FreeImageIO *io, fi_handle handle, int ID) { - if(!psdImageResource().Write(io, handle, ID, _Size)) - return false; - - if(NULL != _Data) { - if(io->write_proc(_Data, 1, _Size, handle) != _Size) { - return false; - } - if((_Size % 2) != 0) { - BYTE data[1]; - data[0] = 0; - if(io->write_proc(data, sizeof(data), 1, handle) != 1) { - return false; - } - } - } - - return true; -} - -//--------------------------------------------------------------------------- - -/** -Invert only color components, skipping Alpha/Black -(Can be useful as public/utility function) -*/ -static -BOOL invertColor(FIBITMAP* dib) { - FREE_IMAGE_TYPE type = FreeImage_GetImageType(dib); - const unsigned Bpp = FreeImage_GetBPP(dib)/8; - - if((type == FIT_BITMAP && Bpp == 4) || type == FIT_RGBA16) { - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - BYTE *line_start = FreeImage_GetScanLine(dib, 0); - const unsigned pitch = FreeImage_GetPitch(dib); - const unsigned triBpp = Bpp - (Bpp == 4 ? 1 : 2); - - for(unsigned y = 0; y < height; y++) { - BYTE *line = line_start; - - for(unsigned x = 0; x < width; x++) { - for(unsigned b=0; b < triBpp; ++b) { - line[b] = ~line[b]; - } - - line += Bpp; - } - line_start += pitch; - } - - return TRUE; - } - else { - return FreeImage_Invert(dib); - } -} - -//--------------------------------------------------------------------------- - -psdParser::psdParser() { - _bThumbnailFilled = false; - _bDisplayInfoFilled = false; - _bResolutionInfoFilled = false; - _bResolutionInfoFilled_v2 = false; - _bCopyright = false; - _GlobalAngle = 30; - _ColourCount = -1; - _TransparentIndex = -1; - _fi_flags = 0; - _fi_format_id = FIF_UNKNOWN; -} - -psdParser::~psdParser() { -} - -unsigned psdParser::GetChannelOffset(FIBITMAP* bitmap, unsigned c) const { - unsigned channelOffset = c; -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - // Swap R/B indices for BGR -> RGB - if(FreeImage_GetImageType(bitmap) == FIT_BITMAP && - _headerInfo._ColourMode == PSDP_RGB && - (c == 0 || c == 2)) { - channelOffset = (2 - c); - } -#endif - return channelOffset; -} - -bool psdParser::ReadLayerAndMaskInfoSection(FreeImageIO *io, fi_handle handle) { - bool bSuccess = true; - - UINT64 nTotalBytes = psdReadSize(io, handle, _headerInfo); - - // Hack to handle large PSB files without using fseeko(). - if (sizeof(long) < sizeof(UINT64)) { - const long offset = 0x10000000; - while (nTotalBytes > offset) { - if (io->seek_proc(handle, offset, SEEK_CUR) != 0) { - bSuccess = false; - break; - } - nTotalBytes -= offset; - } - } - if (bSuccess && nTotalBytes > 0) { - if (io->seek_proc(handle, (long)nTotalBytes, SEEK_CUR) != 0) - bSuccess = false; - } - - return bSuccess; -} - -bool psdParser::ReadImageResources(FreeImageIO *io, fi_handle handle, LONG length) { - psdImageResource oResource; - bool bSuccess = false; - - if(length > 0) { - oResource._Length = length; - } else { - BYTE Length[4]; - int n = (int)io->read_proc(Length, sizeof(Length), 1, handle); - - oResource._Length = psdGetValue( Length, sizeof(oResource._Length) ); - } - - int nBytes = 0; - int nTotalBytes = oResource._Length; - - while(nBytes < nTotalBytes) { - int n = 0; - oResource.Reset(); - - n = (int)io->read_proc(oResource._OSType, sizeof(oResource._OSType), 1, handle); - if(n != 1) { - FreeImage_OutputMessageProc(_fi_format_id, "This file contains damaged data causing an unexpected end-of-file - stop reading resources"); - return false; - } - nBytes += n * sizeof(oResource._OSType); - - if( (nBytes % 2) != 0 ) { - return false; - } - - int nOSType = psdGetValue((BYTE*)&oResource._OSType, sizeof(oResource._OSType)); - - if ( PSD_RESOURCE == nOSType ) { - BYTE ID[2]; - n = (int)io->read_proc(ID, sizeof(ID), 1, handle); - nBytes += n * sizeof(ID); - - oResource._ID = (short)psdGetValue( ID, sizeof(ID) ); - - BYTE SizeOfName; - n = (int)io->read_proc(&SizeOfName, sizeof(SizeOfName), 1, handle); - nBytes += n * sizeof(SizeOfName); - - int nSizeOfName = psdGetValue( &SizeOfName, sizeof(SizeOfName) ); - if ( 0 < nSizeOfName ) { - oResource._plName = new BYTE[nSizeOfName]; - n = (int)io->read_proc(oResource._plName, nSizeOfName, 1, handle); - nBytes += n * nSizeOfName; - } - - if ( 0 == (nSizeOfName % 2) ) { - n = (int)io->read_proc(&SizeOfName, sizeof(SizeOfName), 1, handle); - nBytes += n * sizeof(SizeOfName); - } - - BYTE Size[4]; - n = (int)io->read_proc(Size, sizeof(Size), 1, handle); - nBytes += n * sizeof(Size); - - oResource._Size = psdGetValue( Size, sizeof(oResource._Size) ); - - if ( 0 != (oResource._Size % 2) ) { - // resource data must be even - oResource._Size++; - } - if ( 0 < oResource._Size ) { - BYTE IntValue[4]; - BYTE ShortValue[2]; - - switch( oResource._ID ) { - case PSDP_RES_RESOLUTION_INFO_V2: - // Obsolete - Photoshop 2.0 - _bResolutionInfoFilled_v2 = true; - nBytes += _resolutionInfo_v2.Read(io, handle); - break; - - // ResolutionInfo structure - case PSDP_RES_RESOLUTION_INFO: - _bResolutionInfoFilled = true; - nBytes += _resolutionInfo.Read(io, handle); - break; - - // DisplayInfo structure - case PSDP_RES_DISPLAY_INFO: - _bDisplayInfoFilled = true; - nBytes += _displayInfo.Read(io, handle); - break; - - // IPTC-NAA record - case PSDP_RES_IPTC_NAA: - nBytes += _iptc.Read(io, handle, oResource._Size); - break; - // (Photoshop 4.0) Copyright flag - // Boolean indicating whether image is copyrighted. Can be set via Property suite or by user in File Info... - case PSDP_RES_COPYRIGHT: - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _bCopyright = (1 == psdGetValue(ShortValue, sizeof(ShortValue))); - break; - - // (Photoshop 4.0) Thumbnail resource for Photoshop 4.0 only - case PSDP_RES_THUMBNAIL_PS4: - // (Photoshop 5.0) Thumbnail resource (supersedes resource 1033) - case PSDP_RES_THUMBNAIL: - { - _bThumbnailFilled = true; - bool bBGR = (PSDP_RES_THUMBNAIL_PS4 == oResource._ID); - nBytes += _thumbnail.Read(io, handle, oResource._Size, bBGR); - break; - } - - // (Photoshop 5.0) Global Angle - // 4 bytes that contain an integer between 0 and 359, which is the global - // lighting angle for effects layer. If not present, assumed to be 30. - case PSDP_RES_GLOBAL_ANGLE: - n = (int)io->read_proc(IntValue, sizeof(IntValue), 1, handle); - nBytes += n * sizeof(IntValue); - _GlobalAngle = psdGetValue(IntValue, sizeof(_GlobalAngle) ); - break; - - // ICC profile - case PSDP_RES_ICC_PROFILE: - nBytes += _iccProfile.Read(io, handle, oResource._Size); - break; - - // (Photoshop 6.0) Indexed Color Table Count - // 2 bytes for the number of colors in table that are actually defined - case PSDP_RES_INDEXED_COLORS: - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _ColourCount = (short)psdGetValue(ShortValue, sizeof(ShortValue) ); - break; - - // (Photoshop 6.0) Transparency Index. - // 2 bytes for the index of transparent color, if any. - case PSDP_RES_TRANSPARENCY_INDEX: - n = (int)io->read_proc(ShortValue, sizeof(ShortValue), 1, handle); - nBytes += n * sizeof(ShortValue); - _TransparentIndex = (short)psdGetValue(ShortValue, sizeof(ShortValue) ); - break; - - // (Photoshop 7.0) EXIF data 1 - case PSDP_RES_EXIF1: - nBytes += _exif1.Read(io, handle, oResource._Size); - break; - // (Photoshop 7.0) EXIF data 3 - case PSDP_RES_EXIF3: - nBytes += _exif3.Read(io, handle, oResource._Size); - break; - // (Photoshop 7.0) XMP metadata - case PSDP_RES_XMP: - nBytes += _xmp.Read(io, handle, oResource._Size); - break; - default: - { - // skip resource - unsigned skip_length = MIN(oResource._Size, nTotalBytes - nBytes); - io->seek_proc(handle, skip_length, SEEK_CUR); - nBytes += skip_length; - } - break; - } - } - } - } - - if (nBytes == nTotalBytes) { - bSuccess = true; - } - - return bSuccess; - -} - -void psdParser::ReadImageLine(BYTE* dst, const BYTE* src, unsigned lineSize, unsigned dstBpp, unsigned bytes) { - switch (bytes) { - case 4: - { - DWORD* d = (DWORD*)dst; - const DWORD* s = (const DWORD*)src; - dstBpp /= 4; - while (lineSize > 0) { - DWORD v = *s++; -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(&v); -#endif - *d = v; - d += dstBpp; - lineSize -= 4; - } - break; - } - case 2: - { - WORD* d = (WORD*)dst; - const WORD* s = (const WORD*)src; - dstBpp /= 2; - while (lineSize > 0) { - WORD v = *s++; -#ifndef FREEIMAGE_BIGENDIAN - SwapShort(&v); -#endif - *d = v; - d += dstBpp; - lineSize -= 2; - } - break; - } - default: - if (dstBpp == 1) { - memcpy(dst, src, lineSize); - } else { - while (lineSize > 0) { - *dst = *src++; - dst += dstBpp; - lineSize--; - } - } - break; - } -} - -void psdParser::UnpackRLE(BYTE* line, const BYTE* rle_line, BYTE* line_end, unsigned srcSize) { - while (srcSize > 0) { - - int len = *rle_line++; - srcSize--; - - // NOTE len is signed byte in PackBits RLE - - if ( len < 128 ) { //<- MSB is not set - // uncompressed packet - - // (len + 1) bytes of data are copied - ++len; - - // assert we don't write beyound eol - memcpy(line, rle_line, line + len > line_end ? line_end - line : len); - line += len; - rle_line += len; - srcSize -= len; - } - else if ( len > 128 ) { //< MSB is set - // RLE compressed packet - - // One byte of data is repeated (–len + 1) times - - len ^= 0xFF; // same as (-len + 1) & 0xFF - len += 2; // - - // assert we don't write beyound eol - memset(line, *rle_line++, line + len > line_end ? line_end - line : len); - line += len; - srcSize--; - } - else if ( 128 == len ) { - // Do nothing - } - }//< rle_line -} - -FIBITMAP* psdParser::ReadImageData(FreeImageIO *io, fi_handle handle) { - if (handle == NULL) { - return NULL; - } - - bool header_only = (_fi_flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - WORD nCompression = 0; - if (io->read_proc(&nCompression, sizeof(nCompression), 1, handle) != 1) { - return NULL; - } - -#ifndef FREEIMAGE_BIGENDIAN - SwapShort(&nCompression); -#endif - - // PSDP_COMPRESSION_ZIP and PSDP_COMPRESSION_ZIP_PREDICTION - // are only valid for layer data, not the composited data. - if(nCompression != PSDP_COMPRESSION_NONE && - nCompression != PSDP_COMPRESSION_RLE) { - FreeImage_OutputMessageProc(_fi_format_id, "Unsupported compression %d", nCompression); - return NULL; - } - - const unsigned nWidth = _headerInfo._Width; - const unsigned nHeight = _headerInfo._Height; - const unsigned nChannels = _headerInfo._Channels; - const unsigned depth = _headerInfo._BitsPerChannel; - const unsigned bytes = (depth == 1) ? 1 : depth / 8; - - // channel(plane) line (BYTE aligned) - const unsigned lineSize = (_headerInfo._BitsPerChannel == 1) ? (nWidth + 7) / 8 : nWidth * bytes; - - if(nCompression == PSDP_COMPRESSION_RLE && depth > 16) { - FreeImage_OutputMessageProc(_fi_format_id, "Unsupported RLE with depth %d", depth); - return NULL; - } - - // build output buffer - - FIBITMAP* bitmap = NULL; - unsigned dstCh = 0; - - short mode = _headerInfo._ColourMode; - - if(mode == PSDP_MULTICHANNEL && nChannels < 3) { - // CM - mode = PSDP_GRAYSCALE; // C as gray, M as extra channel - } - - bool needPalette = false; - switch (mode) { - case PSDP_BITMAP: - case PSDP_DUOTONE: - case PSDP_INDEXED: - case PSDP_GRAYSCALE: - dstCh = 1; - switch(depth) { - case 16: - bitmap = FreeImage_AllocateHeaderT(header_only, FIT_UINT16, nWidth, nHeight, depth*dstCh); - break; - case 32: - bitmap = FreeImage_AllocateHeaderT(header_only, FIT_FLOAT, nWidth, nHeight, depth*dstCh); - break; - default: // 1-, 8- - needPalette = true; - bitmap = FreeImage_AllocateHeader(header_only, nWidth, nHeight, depth*dstCh); - break; - } - break; - case PSDP_RGB: - case PSDP_LAB: - case PSDP_CMYK : - case PSDP_MULTICHANNEL : - // force PSDP_MULTICHANNEL CMY as CMYK - dstCh = (mode == PSDP_MULTICHANNEL && !header_only) ? 4 : MIN(nChannels, 4); - if(dstCh < 3) { - throw "Invalid number of channels"; - } - - switch(depth) { - case 16: - bitmap = FreeImage_AllocateHeaderT(header_only, dstCh < 4 ? FIT_RGB16 : FIT_RGBA16, nWidth, nHeight, depth*dstCh); - break; - case 32: - bitmap = FreeImage_AllocateHeaderT(header_only, dstCh < 4 ? FIT_RGBF : FIT_RGBAF, nWidth, nHeight, depth*dstCh); - break; - default: - bitmap = FreeImage_AllocateHeader(header_only, nWidth, nHeight, depth*dstCh); - break; - } - break; - default: - throw "Unsupported color mode"; - break; - } - if(!bitmap) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // write thumbnail - FreeImage_SetThumbnail(bitmap, _thumbnail.getDib()); - - // @todo Add some metadata model - - if(header_only) { - return bitmap; - } - - // Load pixels data - - const unsigned dstChannels = dstCh; - - const unsigned dstBpp = (depth == 1) ? 1 : FreeImage_GetBPP(bitmap)/8; - const unsigned dstLineSize = FreeImage_GetPitch(bitmap); - BYTE* const dst_first_line = FreeImage_GetScanLine(bitmap, nHeight - 1);//<*** flipped - - BYTE* line_start = new BYTE[lineSize]; //< fileline cache - - switch ( nCompression ) { - case PSDP_COMPRESSION_NONE: // raw data - { - for(unsigned c = 0; c < nChannels; c++) { - if(c >= dstChannels) { - // @todo write extra channels - break; - } - - const unsigned channelOffset = GetChannelOffset(bitmap, c) * bytes; - - BYTE* dst_line_start = dst_first_line + channelOffset; - for(unsigned h = 0; h < nHeight; ++h, dst_line_start -= dstLineSize) {//<*** flipped - io->read_proc(line_start, lineSize, 1, handle); - ReadImageLine(dst_line_start, line_start, lineSize, dstBpp, bytes); - } //< h - }//< ch - - SAFE_DELETE_ARRAY(line_start); - - } - break; - - case PSDP_COMPRESSION_RLE: // RLE compression - { - - // The RLE-compressed data is preceeded by a 2-byte line size for each row in the data, - // store an array of these - // Version 2 has 4-byte line sizes. - - // later use this array as DWORD rleLineSizeList[nChannels][nHeight]; - DWORD *rleLineSizeList = new (std::nothrow) DWORD[nChannels*nHeight]; - - if(!rleLineSizeList) { - FreeImage_Unload(bitmap); - SAFE_DELETE_ARRAY(line_start); - throw std::bad_alloc(); - } - if(_headerInfo._Version == 1) { - WORD *rleLineSizeList2 = new (std::nothrow) WORD[nChannels*nHeight]; - if(!rleLineSizeList2) { - FreeImage_Unload(bitmap); - SAFE_DELETE_ARRAY(line_start); - throw std::bad_alloc(); - } - io->read_proc(rleLineSizeList2, 2, nChannels * nHeight, handle); - for(unsigned index = 0; index < nChannels * nHeight; ++index) { -#ifndef FREEIMAGE_BIGENDIAN - SwapShort(&rleLineSizeList2[index]); -#endif - rleLineSizeList[index] = rleLineSizeList2[index]; - } - SAFE_DELETE_ARRAY(rleLineSizeList2); - } else { - io->read_proc(rleLineSizeList, 4, nChannels * nHeight, handle); -#ifndef FREEIMAGE_BIGENDIAN - for(unsigned index = 0; index < nChannels * nHeight; ++index) { - SwapLong(&rleLineSizeList[index]); - } -#endif - } - - DWORD largestRLELine = 0; - for(unsigned ch = 0; ch < nChannels; ++ch) { - for(unsigned h = 0; h < nHeight; ++h) { - const unsigned index = ch * nHeight + h; - - if(largestRLELine < rleLineSizeList[index]) { - largestRLELine = rleLineSizeList[index]; - } - } - } - - BYTE* rle_line_start = new (std::nothrow) BYTE[largestRLELine]; - if(!rle_line_start) { - FreeImage_Unload(bitmap); - SAFE_DELETE_ARRAY(line_start); - SAFE_DELETE_ARRAY(rleLineSizeList); - throw std::bad_alloc(); - } - - // Read the RLE data - for (unsigned ch = 0; ch < nChannels; ch++) { - if(ch >= dstChannels) { - // @todo write to extra channels - break; - } - const BYTE* const line_end = line_start + lineSize; - - const unsigned channelOffset = GetChannelOffset(bitmap, ch) * bytes; - - BYTE* dst_line_start = dst_first_line + channelOffset; - for(unsigned h = 0; h < nHeight; ++h, dst_line_start -= dstLineSize) {//<*** flipped - const unsigned index = ch * nHeight + h; - - // - read and uncompress line - - - const DWORD rleLineSize = rleLineSizeList[index]; - - io->read_proc(rle_line_start, rleLineSize, 1, handle); - - // - write line to destination - - - UnpackRLE(line_start, rle_line_start, line_start + lineSize, rleLineSize); - ReadImageLine(dst_line_start, line_start, lineSize, dstBpp, bytes); - }//< h - }//< ch - - SAFE_DELETE_ARRAY(line_start); - SAFE_DELETE_ARRAY(rleLineSizeList); - SAFE_DELETE_ARRAY(rle_line_start); - } - break; - - /* - * If layer data is ever supported, do something like this: - * Compressed size comes from layer info section. - * Prediction means unzip, then each pixel value is a delta from the previous pixel. - * Horizontally only. - */ - /* - case PSDP_COMPRESSION_ZIP: // ZIP without prediction - case PSDP_COMPRESSION_ZIP_PREDICTION: // ZIP with prediction - { - BYTE *compressed = NULL; - size_t compressedSize = 0; - BYTE *uncompressed = new (std::nothrow) BYTE[nHeight * lineSize]; - if(!uncompressed) { - FreeImage_Unload(bitmap); - SAFE_DELETE_ARRAY(line_start); - throw std::bad_alloc(); - } - DWORD size = FreeImage_ZLibGUnzip(uncompressed, nHeight * lineSize, compressed, compressedSize); - } - break; - */ - default: // Unknown format - break; - - } - - // --- Further process the bitmap --- - - if((mode == PSDP_CMYK || mode == PSDP_MULTICHANNEL)) { - // CMYK values are "inverted", invert them back - - if(mode == PSDP_MULTICHANNEL) { - invertColor(bitmap); - } else { - FreeImage_Invert(bitmap); - } - - if((_fi_flags & PSD_CMYK) == PSD_CMYK) { - // keep as CMYK - - if(mode == PSDP_MULTICHANNEL) { - //### we force CMY to be CMYK, but CMY has no ICC. - // Create empty profile and add the flag. - FreeImage_CreateICCProfile(bitmap, NULL, 0); - FreeImage_GetICCProfile(bitmap)->flags |= FIICC_COLOR_IS_CMYK; - } - } - else { - // convert to RGB - - ConvertCMYKtoRGBA(bitmap); - - // The ICC Profile is no longer valid - _iccProfile.clear(); - - // remove the pending A if not present in source - if(nChannels == 4 || nChannels == 3 ) { - FIBITMAP* t = RemoveAlphaChannel(bitmap); - if(t) { - FreeImage_Unload(bitmap); - bitmap = t; - } // else: silently fail - } - } - } - else if ( mode == PSDP_LAB && !((_fi_flags & PSD_LAB) == PSD_LAB)) { - ConvertLABtoRGB(bitmap); - } - else { - if (needPalette && FreeImage_GetPalette(bitmap)) { - - if(mode == PSDP_BITMAP) { - CREATE_GREYSCALE_PALETTE_REVERSE(FreeImage_GetPalette(bitmap), 2); - } - else if(mode == PSDP_INDEXED) { - if(!_colourModeData._plColourData || _colourModeData._Length != 768 || _ColourCount < 0) { - FreeImage_OutputMessageProc(_fi_format_id, "Indexed image has no palette. Using the default grayscale one."); - } else { - _colourModeData.FillPalette(bitmap); - } - } - // GRAYSCALE, DUOTONE - use default grayscale palette - } - } - - return bitmap; -} - -bool psdParser::WriteLayerAndMaskInfoSection(FreeImageIO *io, fi_handle handle) { - // Short section with no layers. - BYTE IntValue[4]; - - UINT64 size; - if(_headerInfo._Version == 1) { - size = 8; - } else { - size = 12; - } - // Length of whole info. - if(!psdWriteSize(io, handle, _headerInfo, size)) { - return false; - } - // Length of layers info section. - if(!psdWriteSize(io, handle, _headerInfo, 0)) { - return false; - } - // Length of global layer mask info section. Always 4 bytes. - psdSetValue(IntValue, sizeof(IntValue), 0); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - // Additional layer information. - return true; -} - -void psdParser::WriteImageLine(BYTE* dst, const BYTE* src, unsigned lineSize, unsigned srcBpp, unsigned bytes) { - switch (bytes) { - case 4: - { - DWORD* d = (DWORD*)dst; - const DWORD* s = (const DWORD*)src; - srcBpp /= 4; - while (lineSize > 0) { - DWORD v = *s; -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(&v); -#endif - *d++ = v; - s += srcBpp; - lineSize -= 4; - } - break; - } - case 2: - { - WORD* d = (WORD*)dst; - const WORD* s = (const WORD*)src; - srcBpp /= 2; - while (lineSize > 0) { - WORD v = *s; -#ifndef FREEIMAGE_BIGENDIAN - SwapShort(&v); -#endif - *d++ = v; - s += srcBpp; - lineSize -= 2; - } - break; - } - default: - if (srcBpp == 1) { - memcpy(dst, src, lineSize); - } else { - while (lineSize > 0) { - *dst++ = *src; - src += srcBpp; - lineSize--; - } - } - break; - } -} - -unsigned psdParser::PackRLE(BYTE* line_start, const BYTE* src_line, unsigned srcSize) { - BYTE* line = line_start; - while (srcSize > 0) { - if(srcSize >= 2 && src_line[0] == src_line[1]) { - int len = 2; - while(len < 127 && len < (int)srcSize && src_line[0] == src_line[len]) - len++; - *line++ = (BYTE)((-len + 1) & 0xFF); - *line++ = src_line[0]; - src_line += len; - srcSize -= len; - } else { - // uncompressed packet - // (len + 1) bytes of data are copied - int len = 1; - while(len < 127 && len < (int)srcSize && - (len+2 >= (int)srcSize || // check to switch to a run instead - src_line[len] != src_line[len+1] || - src_line[len] != src_line[len+2])) - len++; - *line++ = (BYTE)(len - 1); - for(int i=0; i < len; i++) { - *line++ = *src_line; - src_line++; - } - srcSize -= len; - } - } - return (unsigned)(line - line_start); -} - -bool psdParser::WriteImageData(FreeImageIO *io, fi_handle handle, FIBITMAP* dib) { - if (handle == NULL) { - return false; - } - - FIBITMAP* cmyk_dib = NULL; - - if (_headerInfo._ColourMode == PSDP_CMYK) { - // CMYK values must be "inverted" - cmyk_dib = FreeImage_Clone(dib); - if (cmyk_dib == NULL) { - return false; - } - dib = cmyk_dib; - FreeImage_Invert(dib); - } - - int nCompression = PSDP_COMPRESSION_RLE; - if(_headerInfo._BitsPerChannel > 8) { - // RLE is nearly useless for 16-bit, as it only looks at 8-bit data for runs. - nCompression = PSDP_COMPRESSION_NONE; - } - if((_fi_flags & PSD_NONE) == PSD_NONE) { - nCompression = PSDP_COMPRESSION_NONE; - } else if((_fi_flags & PSD_RLE) == PSD_RLE) { - nCompression = PSDP_COMPRESSION_RLE; - if (_headerInfo._BitsPerChannel > 16) { - nCompression = PSDP_COMPRESSION_NONE; - } - } - - WORD CompressionValue = nCompression; -#ifndef FREEIMAGE_BIGENDIAN - SwapShort(&CompressionValue); -#endif - - if(io->write_proc(&CompressionValue, sizeof(CompressionValue), 1, handle) != 1) { - return false; - } - - const unsigned nWidth = _headerInfo._Width; - const unsigned nHeight = _headerInfo._Height; - const unsigned nChannels = _headerInfo._Channels; - const unsigned depth = _headerInfo._BitsPerChannel; - const unsigned bytes = (depth == 1) ? 1 : depth / 8; - - // channel(plane) line (BYTE aligned) - const unsigned lineSize = (_headerInfo._BitsPerChannel == 1) ? (nWidth + 7) / 8 : nWidth * bytes; - - const unsigned srcBpp = (depth == 1) ? 1 : FreeImage_GetBPP(dib)/8; - const unsigned srcLineSize = FreeImage_GetPitch(dib); - BYTE* const src_first_line = FreeImage_GetScanLine(dib, nHeight - 1);//<*** flipped - BYTE* line_start = new BYTE[lineSize]; //< fileline cache - - switch ( nCompression ) { - case PSDP_COMPRESSION_NONE: // raw data - { - for(unsigned c = 0; c < nChannels; c++) { - const unsigned channelOffset = GetChannelOffset(dib, c) * bytes; - - BYTE* src_line_start = src_first_line + channelOffset; - for(unsigned h = 0; h < nHeight; ++h, src_line_start -= srcLineSize) {//<*** flipped - WriteImageLine(line_start, src_line_start, lineSize, srcBpp, bytes); - if(io->write_proc(line_start, lineSize, 1, handle) != 1) { - return false; - } - } //< h - }//< ch - } - break; - - case PSDP_COMPRESSION_RLE: // RLE compression - { - // The RLE-compressed data is preceeded by a 2-byte line size for each row in the data, - // store an array of these - // Version 2 has 4-byte line sizes. - - // later use this array as WORD rleLineSizeList[nChannels][nHeight]; - // Every 127 bytes needs a length byte. - BYTE* rle_line_start = new BYTE[lineSize + ((nWidth + 126) / 127)]; //< RLE buffer - DWORD *rleLineSizeList = new (std::nothrow) DWORD[nChannels*nHeight]; - - if(!rleLineSizeList) { - SAFE_DELETE_ARRAY(line_start); - throw std::bad_alloc(); - } - memset(rleLineSizeList, 0, sizeof(DWORD)*nChannels*nHeight); - const long offsets_pos = io->tell_proc(handle); - if(_headerInfo._Version == 1) { - if(io->write_proc(rleLineSizeList, nChannels*nHeight*2, 1, handle) != 1) { - return false; - } - } else { - if(io->write_proc(rleLineSizeList, nChannels*nHeight*4, 1, handle) != 1) { - return false; - } - } - for(unsigned c = 0; c < nChannels; c++) { - const unsigned channelOffset = GetChannelOffset(dib, c) * bytes; - - BYTE* src_line_start = src_first_line + channelOffset; - for(unsigned h = 0; h < nHeight; ++h, src_line_start -= srcLineSize) {//<*** flipped - WriteImageLine(line_start, src_line_start, lineSize, srcBpp, bytes); - unsigned len = PackRLE(rle_line_start, line_start, lineSize); - rleLineSizeList[c * nHeight + h] = len; - if(io->write_proc(rle_line_start, len, 1, handle) != 1) { - return false; - } - } - } - SAFE_DELETE_ARRAY(rle_line_start); - // Fix length of resource - io->seek_proc(handle, offsets_pos, SEEK_SET); - if(_headerInfo._Version == 1) { - WORD *rleLineSizeList2 = new (std::nothrow) WORD[nChannels*nHeight]; - if(!rleLineSizeList2) { - SAFE_DELETE_ARRAY(line_start); - throw std::bad_alloc(); - } - for(unsigned index = 0; index < nChannels * nHeight; ++index) { - rleLineSizeList2[index] = (WORD)rleLineSizeList[index]; -#ifndef FREEIMAGE_BIGENDIAN - SwapShort(&rleLineSizeList2[index]); -#endif - } - if(io->write_proc(rleLineSizeList2, nChannels*nHeight*2, 1, handle) != 1) { - return false; - } - SAFE_DELETE_ARRAY(rleLineSizeList2); - } else { -#ifndef FREEIMAGE_BIGENDIAN - for(unsigned index = 0; index < nChannels * nHeight; ++index) { - SwapLong(&rleLineSizeList[index]); - } -#endif - if(io->write_proc(rleLineSizeList, nChannels*nHeight*4, 1, handle) != 1) { - return false; - } - } - io->seek_proc(handle, 0, SEEK_END); - } - break; - - case PSDP_COMPRESSION_ZIP: // ZIP without prediction - case PSDP_COMPRESSION_ZIP_PREDICTION: // ZIP with prediction - { - } - break; - - default: // Unknown format - break; - } - - SAFE_DELETE_ARRAY(line_start); - - if (cmyk_dib != NULL) { - FreeImage_Unload(cmyk_dib); - } - - return true; -} - -FIBITMAP* psdParser::Load(FreeImageIO *io, fi_handle handle, int s_format_id, int flags) { - FIBITMAP *Bitmap = NULL; - - _fi_flags = flags; - _fi_format_id = s_format_id; - - try { - if (NULL == handle) { - throw("Cannot open file"); - } - - if (!_headerInfo.Read(io, handle)) { - throw("Error in header"); - } - - if (!_colourModeData.Read(io, handle)) { - throw("Error in ColourMode Data"); - } - - if (!ReadImageResources(io, handle)) { - throw("Error in Image Resource"); - } - - if (!ReadLayerAndMaskInfoSection(io, handle)) { - throw("Error in Mask Info"); - } - - Bitmap = ReadImageData(io, handle); - if (NULL == Bitmap) { - throw("Error in Image Data"); - } - - // set resolution info - if(NULL != Bitmap) { - unsigned res_x = 2835; // 72 dpi - unsigned res_y = 2835; // 72 dpi - if (_bResolutionInfoFilled) { - _resolutionInfo.GetResolutionInfo(res_x, res_y); - } - FreeImage_SetDotsPerMeterX(Bitmap, res_x); - FreeImage_SetDotsPerMeterY(Bitmap, res_y); - } - - // set ICC profile - if(NULL != _iccProfile._ProfileData) { - FreeImage_CreateICCProfile(Bitmap, _iccProfile._ProfileData, _iccProfile._ProfileSize); - if ((flags & PSD_CMYK) == PSD_CMYK) { - short mode = _headerInfo._ColourMode; - if((mode == PSDP_CMYK) || (mode == PSDP_MULTICHANNEL)) { - FreeImage_GetICCProfile(Bitmap)->flags |= FIICC_COLOR_IS_CMYK; - } - } - } - - // Metadata - if(NULL != _iptc._Data) { - read_iptc_profile(Bitmap, _iptc._Data, _iptc._Size); - } - if(NULL != _exif1._Data) { - psd_read_exif_profile(Bitmap, _exif1._Data, _exif1._Size); - psd_read_exif_profile_raw(Bitmap, _exif1._Data, _exif1._Size); - } else if(NULL != _exif3._Data) { - // I have not found any files with this resource. - // Assume that we only want one Exif resource. - assert(false); - psd_read_exif_profile(Bitmap, _exif3._Data, _exif3._Size); - psd_read_exif_profile_raw(Bitmap, _exif3._Data, _exif3._Size); - } - - // XMP metadata - if(NULL != _xmp._Data) { - psd_set_xmp_profile(Bitmap, _xmp._Data, _xmp._Size); - } - - } catch(const char *text) { - FreeImage_OutputMessageProc(s_format_id, text); - } - catch(const std::exception& e) { - FreeImage_OutputMessageProc(s_format_id, "%s", e.what()); - } - - return Bitmap; -} - -bool psdParser::Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - if (!dib || !handle) { - return false; - } - - _fi_flags = flags; - - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - const unsigned bitsperpixel = FreeImage_GetBPP(dib); - - const FIICCPROFILE* iccProfile = FreeImage_GetICCProfile(dib); - - // setup out-variables based on dib and flag options - - unsigned bitspersample; - unsigned samplesperpixel; - short colourMode = PSDP_RGB; - - if(image_type == FIT_BITMAP) { - // standard image: 1-, 4-, 8-, 16-, 24-, 32-bit - if(bitsperpixel == 32) { - // 32-bit images : check for CMYK or alpha transparency - - if((((iccProfile->flags & FIICC_COLOR_IS_CMYK) == FIICC_COLOR_IS_CMYK) || ((flags & PSD_CMYK) == PSD_CMYK))) { - colourMode = PSDP_CMYK; - } - samplesperpixel = 4; - } else if(bitsperpixel == 24) { - samplesperpixel = 3; - } else if(bitsperpixel == 8) { - samplesperpixel = 1; - colourMode = PSDP_INDEXED; - } else if(bitsperpixel == 1) { - samplesperpixel = 1; - colourMode = PSDP_BITMAP; - } else { - return false; - } - bitspersample = bitsperpixel / samplesperpixel; - } else if(image_type == FIT_UINT16 || image_type == FIT_INT16) { - // Grayscale - samplesperpixel = 1; - bitspersample = bitsperpixel / samplesperpixel; - colourMode = PSDP_GRAYSCALE; - } else if(image_type == FIT_RGB16) { - // 48-bit RGB - samplesperpixel = 3; - bitspersample = bitsperpixel / samplesperpixel; - } else if(image_type == FIT_RGBA16) { - // 64-bit RGBA - samplesperpixel = 4; - bitspersample = bitsperpixel / samplesperpixel; - if((((iccProfile->flags & FIICC_COLOR_IS_CMYK) == FIICC_COLOR_IS_CMYK) || ((flags & PSD_CMYK) == PSD_CMYK))) { - colourMode = PSDP_CMYK; - } - } else if(image_type == FIT_RGBF) { - // 96-bit RGBF - samplesperpixel = 3; - bitspersample = bitsperpixel / samplesperpixel; - } else if (image_type == FIT_RGBAF) { - // 128-bit RGBAF - samplesperpixel = 4; - bitspersample = bitsperpixel / samplesperpixel; - } else { - // special image type (int, long, double, ...) - samplesperpixel = 1; - bitspersample = bitsperpixel; - } - - _headerInfo._Version = (((flags & PSD_PSB) == PSD_PSB) || width > 30000 || height > 30000) ? 2 : 1; - _headerInfo._Channels = samplesperpixel; - _headerInfo._Height = height; - _headerInfo._Width = width; - _headerInfo._BitsPerChannel = bitsperpixel / samplesperpixel; - _headerInfo._ColourMode = colourMode; - if(!_headerInfo.Write(io, handle)) return false; - - _colourModeData._Length = 0; - _colourModeData._plColourData = NULL; - if (FreeImage_GetPalette(dib) != NULL) { - RGBQUAD *pal = FreeImage_GetPalette(dib); - _colourModeData._Length = FreeImage_GetColorsUsed(dib) * 3; - _colourModeData._plColourData = new BYTE[_colourModeData._Length]; - for(unsigned i = 0; i < FreeImage_GetColorsUsed(dib); i++ ) { - _colourModeData._plColourData[i + 0*256] = pal[i].rgbRed; - _colourModeData._plColourData[i + 1*256] = pal[i].rgbGreen; - _colourModeData._plColourData[i + 2*256] = pal[i].rgbBlue; - } - } - - if (!_colourModeData.Write(io, handle)) { - return false; - } - - BYTE IntValue[4]; - const long res_start_pos = io->tell_proc(handle); - psdSetValue(IntValue, sizeof(IntValue), 0); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - - _resolutionInfo._hRes = (short) (0.5 + 0.0254 * FreeImage_GetDotsPerMeterX(dib)); - _resolutionInfo._hResUnit = 1; // inches - _resolutionInfo._widthUnit = 1; // inches - _resolutionInfo._vRes = (short) (0.5 + 0.0254 * FreeImage_GetDotsPerMeterY(dib)); - _resolutionInfo._vResUnit = 1; // inches - _resolutionInfo._heightUnit = 1; // inches - if (!_resolutionInfo.Write(io, handle)) { - return false; - } - - // psdResolutionInfo_v2 is obsolete - Photoshop 2.0 - - _displayInfo._ColourSpace = (colourMode == PSDP_CMYK) ? 2 : 0; - memset(_displayInfo._Colour, 0, sizeof(_displayInfo._Colour)); - _displayInfo._Opacity = 100; - _displayInfo._Kind = 0; - _displayInfo._padding = 0; - if (!_displayInfo.Write(io, handle)) { - return false; - } - - if(GetThumbnail() == NULL) { - _thumbnail._owned = false; - _thumbnail._dib = FreeImage_GetThumbnail(dib); - } - if(GetThumbnail() != NULL) { - _thumbnail.Init(); - if (!_thumbnail.Write(io, handle, false)) { - return false; - } - } - - if(iccProfile != NULL && iccProfile->size > 0) { - _iccProfile.clear(); - _iccProfile._owned = false; - _iccProfile._ProfileSize = iccProfile->size; - _iccProfile._ProfileData = (BYTE*)iccProfile->data; - if (!_iccProfile.Write(io, handle)) { - return false; - } - } - - if(write_iptc_profile(dib, &_iptc._Data, &_iptc._Size)) { - if (!_iptc.Write(io, handle, PSDP_RES_IPTC_NAA)) { - return false; - } - } - - if(psd_write_exif_profile_raw(dib, &_exif1._Data, &_exif1._Size)) { - _exif1._owned = false; - if (!_exif1.Write(io, handle, PSDP_RES_EXIF1)) { - return false; - } - } - - if(psd_get_xmp_profile(dib, &_xmp._Data, &_xmp._Size)) { - _xmp._owned = false; - if (!_xmp.Write(io, handle, PSDP_RES_XMP)) { - return false; - } - } - - // Fix length of resources - const long current_pos = io->tell_proc(handle); - psdSetValue(IntValue, sizeof(IntValue), (int)(current_pos - res_start_pos - 4)); - io->seek_proc(handle, res_start_pos, SEEK_SET); - if(io->write_proc(IntValue, sizeof(IntValue), 1, handle) != 1) { - return false; - } - io->seek_proc(handle, current_pos, SEEK_SET); - - if (!WriteLayerAndMaskInfoSection(io, handle)) { - return false; - } - if (!WriteImageData(io, handle, dib)) { - return false; - } - - return true; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PSDParser.h b/Dependencies/FreeImage/Source/FreeImage/PSDParser.h deleted file mode 100644 index 77aa626..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PSDParser.h +++ /dev/null @@ -1,341 +0,0 @@ -// ========================================================== -// Photoshop Loader -// -// Design and implementation by -// - Hervé Drolon (drolon@infonie.fr) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// - Garrick Meeker (garrickmeeker@users.sourceforge.net) -// -// Based on LGPL code created and published by http://sourceforge.net/projects/elynx/ -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifndef FREEIMAGE_PSDPARSER_H -#define FREEIMAGE_PSDPARSER_H - -/** -Table 2-12: File header section. -The file header contains the basic properties of the image. -*/ -typedef struct psdHeader { - BYTE Signature[4]; //! Always equal 8BPS, do not try to read the file if the signature does not match this value. - BYTE Version[2]; //! Version of file, PSD=1, PSB=2. - char Reserved[6]; //! Must be zero. - BYTE Channels[2]; //! Number of channels including any alpha channels, supported range is 1 to 24. - BYTE Rows[4]; //! The height of the image in pixels. Supported range is 1 to 30,000. - BYTE Columns[4]; //! The width of the image in pixels. Supported range is 1 to 30,000. - BYTE Depth[2]; //! The number of bits per channel. Supported values are 1, 8, and 16. - BYTE Mode[2]; //! Colour mode of the file, Bitmap=0, Grayscale=1, Indexed=2, RGB=3, CMYK=4, Multichannel=7, Duotone=8, Lab=9. -} psdHeader; - -/** -Table 2-12: HeaderInfo Color spaces -@see psdHeader -*/ -class psdHeaderInfo { -public: - short _Version; //! Version of file, PSD=1, PSB=2. - short _Channels; //! Number of channels including any alpha channels, supported range is 1 to 24. - int _Height; //! The height of the image in pixels. Supported range is 1 to 30,000. - int _Width; //! The width of the image in pixels. Supported range is 1 to 30,000. - short _BitsPerChannel;//! The number of bits per channel. Supported values are 1, 8, and 16. - short _ColourMode; //! Colour mode of the file, Bitmap=0, Grayscale=1, Indexed=2, RGB=3, CMYK=4, Multichannel=7, Duotone=8, Lab=9. - -public: - //! Default constructor - psdHeaderInfo(); - //! Destructor - ~psdHeaderInfo(); - /** - Read the psdHeader structure - @return Returns true if successful, false otherwise - */ - bool Read(FreeImageIO *io, fi_handle handle); - /** - Write the psdHeader structure - @return Returns true if successful, false otherwise - */ - bool Write(FreeImageIO *io, fi_handle handle); -}; - -/** -Table 2-13 Color mode data section - -Only indexed color and duotone have color mode data. For all other modes, -this section is just 4 bytes: the length field, which is set to zero. -For indexed color images, the length will be equal to 768, and the color data -will contain the color table for the image, in non-interleaved order. -For duotone images, the color data will contain the duotone specification, -the format of which is not documented. Other applications that read -Photoshop files can treat a duotone image as a grayscale image, and just -preserve the contents of the duotone information when reading and writing -the file. -*/ -class psdColourModeData { -public: - int _Length; //! The length of the following color data - BYTE * _plColourData; //! The color data - -public: - psdColourModeData(); - ~psdColourModeData(); - /** - @return Returns true if successful, false otherwise - */ - bool Read(FreeImageIO *io, fi_handle handle); - /** - @return Returns true if successful, false otherwise - */ - bool Write(FreeImageIO *io, fi_handle handle); - bool FillPalette(FIBITMAP *dib); -}; - -/** -Table 2-1: Image resource block -NB: Resource data is padded to make size even -*/ -class psdImageResource { -public: - int _Length; - char _OSType[4]; //! Photoshop always uses its signature, 8BIM - short _ID; //! Unique identifier. Image resource IDs on page 8 - BYTE * _plName; //! A pascal string, padded to make size even (a null name consists of two bytes of 0) - int _Size; //! Actual size of resource data. This does not include the Type, ID, Name or Size fields. - -public: - psdImageResource(); - ~psdImageResource(); - void Reset(); - bool Write(FreeImageIO *io, fi_handle handle, int ID, int Size); -}; - -/** -Table A-6: ResolutionInfo structure -This structure contains information about the resolution of an image. It is -written as an image resource. See the Document file formats chapter for more -details. -*/ -class psdResolutionInfo { -public: - short _widthUnit; //! Display width as 1=inches; 2=cm; 3=points; 4=picas; 5=columns. - short _heightUnit; //! Display height as 1=inches; 2=cm; 3=points; 4=picas; 5=columns. - short _hRes; //! Horizontal resolution in pixels per inch. - short _vRes; //! Vertical resolution in pixels per inch. - int _hResUnit; //! 1=display horizontal resolution in pixels per inch; 2=display horizontal resolution in pixels per cm. - int _vResUnit; //! 1=display vertical resolution in pixels per inch; 2=display vertical resolution in pixels per cm. - -public: - psdResolutionInfo(); - ~psdResolutionInfo(); - /** - @return Returns the number of bytes read - */ - int Read(FreeImageIO *io, fi_handle handle); - /** - @return Returns true if successful, false otherwise - */ - bool Write(FreeImageIO *io, fi_handle handle); - /** - @param res_x [out] X resolution in pixels/meter - @param res_y [out] Y resolution in pixels/meter - */ - void GetResolutionInfo(unsigned &res_x, unsigned &res_y); -}; - -// Obsolete - Photoshop 2.0 -class psdResolutionInfo_v2 { -public: - short _Channels; - short _Rows; - short _Columns; - short _Depth; - short _Mode; - -public: - psdResolutionInfo_v2(); - ~psdResolutionInfo_v2(); - /** - @return Returns the number of bytes read - */ - int Read(FreeImageIO *io, fi_handle handle); - /** - @return Returns true if successful, false otherwise - */ - bool Write(FreeImageIO *io, fi_handle handle); -}; - -/** -Table A-7: DisplayInfo Color spaces -This structure contains display information about each channel. It is written as an image resource. -*/ -class psdDisplayInfo { -public: - short _ColourSpace; - short _Colour[4]; - short _Opacity; //! 0..100 - BYTE _Kind; //! selected = 0, protected = 1 - BYTE _padding; //! should be zero - -public: - psdDisplayInfo(); - ~psdDisplayInfo(); - /** - @return Returns the number of bytes read - */ - int Read(FreeImageIO *io, fi_handle handle); - /** - @return Returns true if successful, false otherwise - */ - bool Write(FreeImageIO *io, fi_handle handle); -}; - -/** -Table 2-5: Thumbnail resource header -Adobe Photoshop 5.0 and later stores thumbnail information for preview -display in an image resource block. These resource blocks consist of an initial -28 byte header, followed by a JFIF thumbnail in RGB (red, green, blue) order -for both Macintosh and Windows. Adobe Photoshop 4.0 stored the -thumbnail information in the same format except the data section is BGR -(blue, green, red). The Adobe Photoshop 4.0 format is at resource ID 1033 -and the Adobe Photoshop 5.0 format is at resource ID 1036. -*/ -class psdThumbnail { -public: - int _Format; //! = 1 (kJpegRGB). Also supports kRawRGB (0). - int _Width; //! Width of thumbnail in pixels. - int _Height; //! Height of thumbnail in pixels. - int _WidthBytes; //! Padded row bytes as (width * bitspixel + 31) / 32 * 4. - int _Size; //! Total size as widthbytes * height * planes - int _CompressedSize; //! Size after compression. Used for consistentcy check. - short _BitPerPixel; //! = 24. Bits per pixel. - short _Planes; //! = 1. Number of planes. - FIBITMAP * _dib; //! JFIF data as uncompressed dib. Note: For resource ID 1033 the data is in BGR format. - bool _owned; - -public: - psdThumbnail(); - ~psdThumbnail(); - FIBITMAP* getDib() { return _dib; } - void Init(); - /** - @return Returns the number of bytes read - */ - int Read(FreeImageIO *io, fi_handle handle, int iResourceSize, bool isBGR); - /** - @return Returns true if successful, false otherwise - */ - bool Write(FreeImageIO *io, fi_handle handle, bool isBGR); - -private: - psdThumbnail(const psdThumbnail&); - psdThumbnail& operator=(const psdThumbnail&); -}; - -class psdICCProfile { -public: - int _ProfileSize; - BYTE * _ProfileData; - bool _owned; -public: - psdICCProfile(); - ~psdICCProfile(); - void clear(); - /** - @return Returns the number of bytes read - */ - int Read(FreeImageIO *io, fi_handle handle, int size); - /** - @return Returns true if successful, false otherwise - */ - bool Write(FreeImageIO *io, fi_handle handle); -}; - -class psdData { -public: - unsigned _Size; - BYTE * _Data; - bool _owned; -public: - psdData(); - ~psdData(); - void clear(); - /** - @return Returns the number of bytes read - */ - int Read(FreeImageIO *io, fi_handle handle, int size); - /** - @return Returns true if successful, false otherwise - */ - bool Write(FreeImageIO *io, fi_handle handle, int ID); -}; - -/** -PSD loader -*/ -class psdParser { -private: - psdHeaderInfo _headerInfo; - psdColourModeData _colourModeData; - psdResolutionInfo _resolutionInfo; - psdResolutionInfo_v2 _resolutionInfo_v2; - psdDisplayInfo _displayInfo; - psdThumbnail _thumbnail; - psdICCProfile _iccProfile; - psdData _iptc; - psdData _exif1; - psdData _exif3; - psdData _xmp; - - short _ColourCount; - short _TransparentIndex; - int _GlobalAngle; - bool _bResolutionInfoFilled; - bool _bResolutionInfoFilled_v2; - bool _bDisplayInfoFilled; - bool _bThumbnailFilled; - bool _bCopyright; - - int _fi_flags; - int _fi_format_id; - -private: - unsigned GetChannelOffset(FIBITMAP* bitmap, unsigned c) const; - /** Actually ignore it */ - bool ReadLayerAndMaskInfoSection(FreeImageIO *io, fi_handle handle); - void ReadImageLine(BYTE* dst, const BYTE* src, unsigned lineSize, unsigned dstBpp, unsigned bytes); - void UnpackRLE(BYTE* dst, const BYTE* src, BYTE* dst_end, unsigned srcSize); - FIBITMAP* ReadImageData(FreeImageIO *io, fi_handle handle); - bool WriteLayerAndMaskInfoSection(FreeImageIO *io, fi_handle handle); - void WriteImageLine(BYTE* dst, const BYTE* src, unsigned lineSize, unsigned srcBpp, unsigned bytes); - unsigned PackRLE(BYTE* line_start, const BYTE* src_line, unsigned srcSize); - bool WriteImageData(FreeImageIO *io, fi_handle handle, FIBITMAP* dib); - -public: - psdParser(); - ~psdParser(); - FIBITMAP* Load(FreeImageIO *io, fi_handle handle, int s_format_id, int flags=0); - bool Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data); - /** Also used by the TIFF plugin */ - bool ReadImageResources(FreeImageIO *io, fi_handle handle, LONG length=0); - /** Used by the TIFF plugin */ - FIBITMAP* GetThumbnail() { - return _thumbnail.getDib(); - } -}; - -#endif // FREEIMAGE_PSDPARSER_H - - diff --git a/Dependencies/FreeImage/Source/FreeImage/PixelAccess.cpp b/Dependencies/FreeImage/Source/FreeImage/PixelAccess.cpp deleted file mode 100644 index b5714b2..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PixelAccess.cpp +++ /dev/null @@ -1,197 +0,0 @@ -// ========================================================== -// Pixel access functions -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// - Ryan Rubley (ryan@lostreality.org) -// - Riley McNiff (rmcniff@marexgroup.com) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- - -BYTE * DLL_CALLCONV -FreeImage_GetScanLine(FIBITMAP *dib, int scanline) { - if(!FreeImage_HasPixels(dib)) { - return NULL; - } - return CalculateScanLine(FreeImage_GetBits(dib), FreeImage_GetPitch(dib), scanline); -} - -BOOL DLL_CALLCONV -FreeImage_GetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value) { - BYTE shift; - - if(!FreeImage_HasPixels(dib) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) - return FALSE; - - if((x < FreeImage_GetWidth(dib)) && (y < FreeImage_GetHeight(dib))) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - - switch(FreeImage_GetBPP(dib)) { - case 1: - *value = (bits[x >> 3] & (0x80 >> (x & 0x07))) != 0; - break; - case 4: - shift = (BYTE)((1 - x % 2) << 2); - *value = (bits[x >> 1] & (0x0F << shift)) >> shift; - break; - case 8: - *value = bits[x]; - break; - default: - return FALSE; - } - - return TRUE; - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_GetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value) { - if(!FreeImage_HasPixels(dib) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) - return FALSE; - - if((x < FreeImage_GetWidth(dib)) && (y < FreeImage_GetHeight(dib))) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - - switch(FreeImage_GetBPP(dib)) { - case 16: - { - bits += 2*x; - WORD *pixel = (WORD *)bits; - if((FreeImage_GetRedMask(dib) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_565_BLUE_MASK)) { - value->rgbBlue = (BYTE)((((*pixel & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT) * 0xFF) / 0x1F); - value->rgbGreen = (BYTE)((((*pixel & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT) * 0xFF) / 0x3F); - value->rgbRed = (BYTE)((((*pixel & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT) * 0xFF) / 0x1F); - value->rgbReserved = 0; - } else { - value->rgbBlue = (BYTE)((((*pixel & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) * 0xFF) / 0x1F); - value->rgbGreen = (BYTE)((((*pixel & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) * 0xFF) / 0x1F); - value->rgbRed = (BYTE)((((*pixel & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) * 0xFF) / 0x1F); - value->rgbReserved = 0; - } - break; - } - case 24: - bits += 3*x; - value->rgbBlue = bits[FI_RGBA_BLUE]; // B - value->rgbGreen = bits[FI_RGBA_GREEN]; // G - value->rgbRed = bits[FI_RGBA_RED]; // R - value->rgbReserved = 0; - break; - case 32: - bits += 4*x; - value->rgbBlue = bits[FI_RGBA_BLUE]; // B - value->rgbGreen = bits[FI_RGBA_GREEN]; // G - value->rgbRed = bits[FI_RGBA_RED]; // R - value->rgbReserved = bits[FI_RGBA_ALPHA]; // A - break; - default: - return FALSE; - } - - return TRUE; - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_SetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value) { - BYTE shift; - - if(!FreeImage_HasPixels(dib) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) - return FALSE; - - if((x < FreeImage_GetWidth(dib)) && (y < FreeImage_GetHeight(dib))) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - - switch(FreeImage_GetBPP(dib)) { - case 1: - *value ? bits[x >> 3] |= (0x80 >> (x & 0x7)) : bits[x >> 3] &= (0xFF7F >> (x & 0x7)); - break; - case 4: - shift = (BYTE)((1 - x % 2) << 2); - bits[x >> 1] &= ~(0x0F << shift); - bits[x >> 1] |= ((*value & 0x0F) << shift); - break; - case 8: - bits[x] = *value; - break; - default: - return FALSE; - } - - return TRUE; - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_SetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value) { - if(!FreeImage_HasPixels(dib) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) - return FALSE; - - if((x < FreeImage_GetWidth(dib)) && (y < FreeImage_GetHeight(dib))) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - - switch(FreeImage_GetBPP(dib)) { - case 16: - { - bits += 2*x; - WORD *pixel = (WORD *)bits; - if((FreeImage_GetRedMask(dib) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_565_BLUE_MASK)) { - *pixel = ((value->rgbBlue >> 3) << FI16_565_BLUE_SHIFT) | - ((value->rgbGreen >> 2) << FI16_565_GREEN_SHIFT) | - ((value->rgbRed >> 3) << FI16_565_RED_SHIFT); - } else { - *pixel = ((value->rgbBlue >> 3) << FI16_555_BLUE_SHIFT) | - ((value->rgbGreen >> 3) << FI16_555_GREEN_SHIFT) | - ((value->rgbRed >> 3) << FI16_555_RED_SHIFT); - } - break; - } - case 24: - bits += 3*x; - bits[FI_RGBA_BLUE] = value->rgbBlue; // B - bits[FI_RGBA_GREEN] = value->rgbGreen; // G - bits[FI_RGBA_RED] = value->rgbRed; // R - break; - case 32: - bits += 4*x; - bits[FI_RGBA_BLUE] = value->rgbBlue; // B - bits[FI_RGBA_GREEN] = value->rgbGreen; // G - bits[FI_RGBA_RED] = value->rgbRed; // R - bits[FI_RGBA_ALPHA] = value->rgbReserved; // A - break; - default: - return FALSE; - } - - return TRUE; - } - - return FALSE; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/Plugin.cpp b/Dependencies/FreeImage/Source/FreeImage/Plugin.cpp deleted file mode 100644 index 359a3cf..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/Plugin.cpp +++ /dev/null @@ -1,822 +0,0 @@ -// ===================================================================== -// FreeImage Plugin Interface -// -// Design and implementation by -// - Floris van den Berg (floris@geekhq.nl) -// - Rui Lopes (ruiglopes@yahoo.com) -// - Detlev Vendt (detlev.vendt@brillit.de) -// - Petr Pytelka (pyta@lightcomp.com) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ===================================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#ifdef _WIN32 -#include -#include -#else -#include -#endif // _WIN32 - -#include "FreeImage.h" -#include "Utilities.h" -#include "FreeImageIO.h" -#include "Plugin.h" - -#include "../Metadata/FreeImageTag.h" - -// ===================================================================== - -using namespace std; - -// ===================================================================== -// Plugin search list -// ===================================================================== - -const char * -s_search_list[] = { - "", - "plugins\\", -}; - -static int s_search_list_size = sizeof(s_search_list) / sizeof(char *); -static PluginList *s_plugins = NULL; -static int s_plugin_reference_count = 0; - - -// ===================================================================== -// Reimplementation of stricmp (it is not supported on some systems) -// ===================================================================== - -int -FreeImage_stricmp(const char *s1, const char *s2) { - int c1, c2; - - do { - c1 = tolower(*s1++); - c2 = tolower(*s2++); - } while (c1 && c1 == c2); - - return c1 - c2; -} - -// ===================================================================== -// Implementation of PluginList -// ===================================================================== - -PluginList::PluginList() : -m_plugin_map(), -m_node_count(0) { -} - -FREE_IMAGE_FORMAT -PluginList::AddNode(FI_InitProc init_proc, void *instance, const char *format, const char *description, const char *extension, const char *regexpr) { - if (init_proc != NULL) { - PluginNode *node = new(std::nothrow) PluginNode; - Plugin *plugin = new(std::nothrow) Plugin; - if(!node || !plugin) { - if(node) delete node; - if(plugin) delete plugin; - FreeImage_OutputMessageProc(FIF_UNKNOWN, FI_MSG_ERROR_MEMORY); - return FIF_UNKNOWN; - } - - memset(plugin, 0, sizeof(Plugin)); - - // fill-in the plugin structure - // note we have memset to 0, so all unset pointers should be NULL) - - init_proc(plugin, (int)m_plugin_map.size()); - - // get the format string (two possible ways) - - const char *the_format = NULL; - - if (format != NULL) { - the_format = format; - } else if (plugin->format_proc != NULL) { - the_format = plugin->format_proc(); - } - - // add the node if it wasn't there already - - if (the_format != NULL) { - node->m_id = (int)m_plugin_map.size(); - node->m_instance = instance; - node->m_plugin = plugin; - node->m_format = format; - node->m_description = description; - node->m_extension = extension; - node->m_regexpr = regexpr; - node->m_enabled = TRUE; - - m_plugin_map[(const int)m_plugin_map.size()] = node; - - return (FREE_IMAGE_FORMAT)node->m_id; - } - - // something went wrong while allocating the plugin... cleanup - - delete plugin; - delete node; - } - - return FIF_UNKNOWN; -} - -PluginNode * -PluginList::FindNodeFromFormat(const char *format) { - for (map::iterator i = m_plugin_map.begin(); i != m_plugin_map.end(); ++i) { - const char *the_format = ((*i).second->m_format != NULL) ? (*i).second->m_format : (*i).second->m_plugin->format_proc(); - - if ((*i).second->m_enabled) { - if (FreeImage_stricmp(the_format, format) == 0) { - return (*i).second; - } - } - } - - return NULL; -} - -PluginNode * -PluginList::FindNodeFromMime(const char *mime) { - for (map::iterator i = m_plugin_map.begin(); i != m_plugin_map.end(); ++i) { - const char *the_mime = ((*i).second->m_plugin->mime_proc != NULL) ? (*i).second->m_plugin->mime_proc() : ""; - - if ((*i).second->m_enabled) { - if ((the_mime != NULL) && (strcmp(the_mime, mime) == 0)) { - return (*i).second; - } - } - } - - return NULL; -} - -PluginNode * -PluginList::FindNodeFromFIF(int node_id) { - map::iterator i = m_plugin_map.find(node_id); - - if (i != m_plugin_map.end()) { - return (*i).second; - } - - return NULL; -} - -int -PluginList::Size() const { - return (int)m_plugin_map.size(); -} - -BOOL -PluginList::IsEmpty() const { - return m_plugin_map.empty(); -} - -PluginList::~PluginList() { - for (map::iterator i = m_plugin_map.begin(); i != m_plugin_map.end(); ++i) { -#ifdef _WIN32 - if ((*i).second->m_instance != NULL) { - FreeLibrary((HINSTANCE)(*i).second->m_instance); - } -#endif - delete (*i).second->m_plugin; - delete ((*i).second); - } -} - -// ===================================================================== -// Retrieve a pointer to the plugin list container -// ===================================================================== - -PluginList * DLL_CALLCONV -FreeImage_GetPluginList() { - return s_plugins; -} - -// ===================================================================== -// Plugin System Initialization -// ===================================================================== - -void DLL_CALLCONV -FreeImage_Initialise(BOOL load_local_plugins_only) { - if (s_plugin_reference_count++ == 0) { - - /* - Note: initialize all singletons here - in order to avoid race conditions with multi-threading - */ - - // initialise the TagLib singleton - TagLib& s = TagLib::instance(); - - // internal plugin initialization - - s_plugins = new(std::nothrow) PluginList; - - if (s_plugins) { - /* NOTE : - The order used to initialize internal plugins below MUST BE the same order - as the one used to define the FREE_IMAGE_FORMAT enum. - */ - s_plugins->AddNode(InitBMP); - s_plugins->AddNode(InitICO); - s_plugins->AddNode(InitJPEG); - s_plugins->AddNode(InitJNG); - s_plugins->AddNode(InitKOALA); - s_plugins->AddNode(InitIFF); - s_plugins->AddNode(InitMNG); - s_plugins->AddNode(InitPNM, NULL, "PBM", "Portable Bitmap (ASCII)", "pbm", "^P1"); - s_plugins->AddNode(InitPNM, NULL, "PBMRAW", "Portable Bitmap (RAW)", "pbm", "^P4"); - s_plugins->AddNode(InitPCD); - s_plugins->AddNode(InitPCX); - s_plugins->AddNode(InitPNM, NULL, "PGM", "Portable Greymap (ASCII)", "pgm", "^P2"); - s_plugins->AddNode(InitPNM, NULL, "PGMRAW", "Portable Greymap (RAW)", "pgm", "^P5"); - s_plugins->AddNode(InitPNG); - s_plugins->AddNode(InitPNM, NULL, "PPM", "Portable Pixelmap (ASCII)", "ppm", "^P3"); - s_plugins->AddNode(InitPNM, NULL, "PPMRAW", "Portable Pixelmap (RAW)", "ppm", "^P6"); - s_plugins->AddNode(InitRAS); - s_plugins->AddNode(InitTARGA); - s_plugins->AddNode(InitTIFF); - s_plugins->AddNode(InitWBMP); - s_plugins->AddNode(InitPSD); - s_plugins->AddNode(InitCUT); - s_plugins->AddNode(InitXBM); - s_plugins->AddNode(InitXPM); - s_plugins->AddNode(InitDDS); - s_plugins->AddNode(InitGIF); - s_plugins->AddNode(InitHDR); - s_plugins->AddNode(InitG3); - s_plugins->AddNode(InitSGI); - s_plugins->AddNode(InitEXR); - s_plugins->AddNode(InitJ2K); - s_plugins->AddNode(InitJP2); - s_plugins->AddNode(InitPFM); - s_plugins->AddNode(InitPICT); -// s_plugins->AddNode(InitRAW); - s_plugins->AddNode(InitWEBP); -#if !(defined(_MSC_VER) && (_MSC_VER <= 1310)) -// s_plugins->AddNode(InitJXR); -#endif // unsupported by MS Visual Studio 2003 !!! - - // external plugin initialization - -#ifdef _WIN32 - if (!load_local_plugins_only) { - int count = 0; - char buffer[MAX_PATH + 200]; - wchar_t current_dir[2 * _MAX_PATH], module[2 * _MAX_PATH]; - BOOL bOk = FALSE; - - // store the current directory. then set the directory to the application location - - if (GetCurrentDirectoryW(2 * _MAX_PATH, current_dir) != 0) { - if (GetModuleFileNameW(NULL, module, 2 * _MAX_PATH) != 0) { - wchar_t *last_point = wcsrchr(module, L'\\'); - - if (last_point) { - *last_point = L'\0'; - - bOk = SetCurrentDirectoryW(module); - } - } - } - - // search for plugins - - while (count < s_search_list_size) { - _finddata_t find_data; - long find_handle; - - strcpy(buffer, s_search_list[count]); - strcat(buffer, "*.fip"); - - if ((find_handle = (long)_findfirst(buffer, &find_data)) != -1L) { - do { - strcpy(buffer, s_search_list[count]); - strncat(buffer, find_data.name, MAX_PATH + 200); - - HINSTANCE instance = LoadLibrary(buffer); - - if (instance != NULL) { - FARPROC proc_address = GetProcAddress(instance, "_Init@8"); - - if (proc_address != NULL) { - s_plugins->AddNode((FI_InitProc)proc_address, (void *)instance); - } else { - FreeLibrary(instance); - } - } - } while (_findnext(find_handle, &find_data) != -1L); - - _findclose(find_handle); - } - - count++; - } - - // restore the current directory - - if (bOk) { - SetCurrentDirectoryW(current_dir); - } - } -#endif // _WIN32 - } - } -} - -void DLL_CALLCONV -FreeImage_DeInitialise() { - --s_plugin_reference_count; - - if (s_plugin_reference_count == 0) { - delete s_plugins; - } -} - -// ===================================================================== -// Open and close a bitmap -// ===================================================================== - -void * DLL_CALLCONV -FreeImage_Open(PluginNode *node, FreeImageIO *io, fi_handle handle, BOOL open_for_reading) { - if (node->m_plugin->open_proc != NULL) { - return node->m_plugin->open_proc(io, handle, open_for_reading); - } - - return NULL; -} - -void DLL_CALLCONV -FreeImage_Close(PluginNode *node, FreeImageIO *io, fi_handle handle, void *data) { - if (node->m_plugin->close_proc != NULL) { - node->m_plugin->close_proc(io, handle, data); - } -} - -// ===================================================================== -// Plugin System Load/Save Functions -// ===================================================================== - -FIBITMAP * DLL_CALLCONV -FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags) { - if ((fif >= 0) && (fif < FreeImage_GetFIFCount())) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - if (node != NULL) { - if(node->m_plugin->load_proc != NULL) { - void *data = FreeImage_Open(node, io, handle, TRUE); - - FIBITMAP *bitmap = node->m_plugin->load_proc(io, handle, -1, flags, data); - - FreeImage_Close(node, io, handle, data); - - return bitmap; - } - } - } - - return NULL; -} - -FIBITMAP * DLL_CALLCONV -FreeImage_Load(FREE_IMAGE_FORMAT fif, const char *filename, int flags) { - FreeImageIO io; - SetDefaultIO(&io); - - FILE *handle = fopen(filename, "rb"); - - if (handle) { - FIBITMAP *bitmap = FreeImage_LoadFromHandle(fif, &io, (fi_handle)handle, flags); - - fclose(handle); - - return bitmap; - } else { - FreeImage_OutputMessageProc((int)fif, "FreeImage_Load: failed to open file %s", filename); - } - - return NULL; -} - -FIBITMAP * DLL_CALLCONV -FreeImage_LoadU(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags) { - FreeImageIO io; - SetDefaultIO(&io); -#ifdef _WIN32 - FILE *handle = _wfopen(filename, L"rb"); - - if (handle) { - FIBITMAP *bitmap = FreeImage_LoadFromHandle(fif, &io, (fi_handle)handle, flags); - - fclose(handle); - - return bitmap; - } else { - FreeImage_OutputMessageProc((int)fif, "FreeImage_LoadU: failed to open input file"); - } -#endif - return NULL; -} - -BOOL DLL_CALLCONV -FreeImage_SaveToHandle(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags) { - // cannot save "header only" formats - if(FreeImage_HasPixels(dib) == FALSE) { - FreeImage_OutputMessageProc((int)fif, "FreeImage_SaveToHandle: cannot save \"header only\" formats"); - return FALSE; - } - - if ((fif >= 0) && (fif < FreeImage_GetFIFCount())) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - if (node) { - if(node->m_plugin->save_proc != NULL) { - void *data = FreeImage_Open(node, io, handle, FALSE); - - BOOL result = node->m_plugin->save_proc(io, dib, handle, -1, flags, data); - - FreeImage_Close(node, io, handle, data); - - return result; - } - } - } - - return FALSE; -} - - -BOOL DLL_CALLCONV -FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const char *filename, int flags) { - FreeImageIO io; - SetDefaultIO(&io); - - FILE *handle = fopen(filename, "w+b"); - - if (handle) { - BOOL success = FreeImage_SaveToHandle(fif, dib, &io, (fi_handle)handle, flags); - - fclose(handle); - - return success; - } else { - FreeImage_OutputMessageProc((int)fif, "FreeImage_Save: failed to open file %s", filename); - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_SaveU(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags) { - FreeImageIO io; - SetDefaultIO(&io); -#ifdef _WIN32 - FILE *handle = _wfopen(filename, L"w+b"); - - if (handle) { - BOOL success = FreeImage_SaveToHandle(fif, dib, &io, (fi_handle)handle, flags); - - fclose(handle); - - return success; - } else { - FreeImage_OutputMessageProc((int)fif, "FreeImage_SaveU: failed to open output file"); - } -#endif - return FALSE; -} - -// ===================================================================== -// Plugin construction + enable/disable functions -// ===================================================================== - -FREE_IMAGE_FORMAT DLL_CALLCONV -FreeImage_RegisterLocalPlugin(FI_InitProc proc_address, const char *format, const char *description, const char *extension, const char *regexpr) { - return s_plugins->AddNode(proc_address, NULL, format, description, extension, regexpr); -} - -#ifdef _WIN32 -FREE_IMAGE_FORMAT DLL_CALLCONV -FreeImage_RegisterExternalPlugin(const char *path, const char *format, const char *description, const char *extension, const char *regexpr) { - if (path != NULL) { - HINSTANCE instance = LoadLibrary(path); - - if (instance != NULL) { - FARPROC proc_address = GetProcAddress(instance, "_Init@8"); - - FREE_IMAGE_FORMAT result = s_plugins->AddNode((FI_InitProc)proc_address, (void *)instance, format, description, extension, regexpr); - - if (result == FIF_UNKNOWN) - FreeLibrary(instance); - - return result; - } - } - - return FIF_UNKNOWN; -} -#endif // _WIN32 - -int DLL_CALLCONV -FreeImage_SetPluginEnabled(FREE_IMAGE_FORMAT fif, BOOL enable) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - if (node != NULL) { - BOOL previous_state = node->m_enabled; - - node->m_enabled = enable; - - return previous_state; - } - } - - return -1; -} - -int DLL_CALLCONV -FreeImage_IsPluginEnabled(FREE_IMAGE_FORMAT fif) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? node->m_enabled : FALSE; - } - - return -1; -} - -// ===================================================================== -// Plugin Access Functions -// ===================================================================== - -int DLL_CALLCONV -FreeImage_GetFIFCount() { - return (s_plugins != NULL) ? s_plugins->Size() : 0; -} - -FREE_IMAGE_FORMAT DLL_CALLCONV -FreeImage_GetFIFFromFormat(const char *format) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFormat(format); - - return (node != NULL) ? (FREE_IMAGE_FORMAT)node->m_id : FIF_UNKNOWN; - } - - return FIF_UNKNOWN; -} - -FREE_IMAGE_FORMAT DLL_CALLCONV -FreeImage_GetFIFFromMime(const char *mime) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromMime(mime); - - return (node != NULL) ? (FREE_IMAGE_FORMAT)node->m_id : FIF_UNKNOWN; - } - - return FIF_UNKNOWN; -} - -const char * DLL_CALLCONV -FreeImage_GetFormatFromFIF(FREE_IMAGE_FORMAT fif) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? (node->m_format != NULL) ? node->m_format : node->m_plugin->format_proc() : NULL; - } - - return NULL; -} - -const char * DLL_CALLCONV -FreeImage_GetFIFMimeType(FREE_IMAGE_FORMAT fif) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? (node->m_plugin != NULL) ? ( node->m_plugin->mime_proc != NULL )? node->m_plugin->mime_proc() : NULL : NULL : NULL; - } - - return NULL; -} - -const char * DLL_CALLCONV -FreeImage_GetFIFExtensionList(FREE_IMAGE_FORMAT fif) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? (node->m_extension != NULL) ? node->m_extension : (node->m_plugin->extension_proc != NULL) ? node->m_plugin->extension_proc() : NULL : NULL; - } - - return NULL; -} - -const char * DLL_CALLCONV -FreeImage_GetFIFDescription(FREE_IMAGE_FORMAT fif) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? (node->m_description != NULL) ? node->m_description : (node->m_plugin->description_proc != NULL) ? node->m_plugin->description_proc() : NULL : NULL; - } - - return NULL; -} - -const char * DLL_CALLCONV -FreeImage_GetFIFRegExpr(FREE_IMAGE_FORMAT fif) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? (node->m_regexpr != NULL) ? node->m_regexpr : (node->m_plugin->regexpr_proc != NULL) ? node->m_plugin->regexpr_proc() : NULL : NULL; - } - - return NULL; -} - -BOOL DLL_CALLCONV -FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? node->m_plugin->load_proc != NULL : FALSE; - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_FIFSupportsWriting(FREE_IMAGE_FORMAT fif) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? node->m_plugin->save_proc != NULL : FALSE ; - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_FIFSupportsExportBPP(FREE_IMAGE_FORMAT fif, int depth) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? - (node->m_plugin->supports_export_bpp_proc != NULL) ? - node->m_plugin->supports_export_bpp_proc(depth) : FALSE : FALSE; - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_FIFSupportsExportType(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? - (node->m_plugin->supports_export_type_proc != NULL) ? - node->m_plugin->supports_export_type_proc(type) : FALSE : FALSE; - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_FIFSupportsICCProfiles(FREE_IMAGE_FORMAT fif) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? - (node->m_plugin->supports_icc_profiles_proc != NULL) ? - node->m_plugin->supports_icc_profiles_proc() : FALSE : FALSE; - } - - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_FIFSupportsNoPixels(FREE_IMAGE_FORMAT fif) { - if (s_plugins != NULL) { - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - return (node != NULL) ? - (node->m_plugin->supports_no_pixels_proc != NULL) ? - node->m_plugin->supports_no_pixels_proc() : FALSE : FALSE; - } - - return FALSE; -} - -FREE_IMAGE_FORMAT DLL_CALLCONV -FreeImage_GetFIFFromFilename(const char *filename) { - if (filename != NULL) { - const char *extension; - - // get the proper extension if we received a filename - - char *place = strrchr((char *)filename, '.'); - extension = (place != NULL) ? ++place : filename; - - // look for the extension in the plugin table - - for (int i = 0; i < FreeImage_GetFIFCount(); ++i) { - - if (s_plugins->FindNodeFromFIF(i)->m_enabled) { - - // compare the format id with the extension - - if (FreeImage_stricmp(FreeImage_GetFormatFromFIF((FREE_IMAGE_FORMAT)i), extension) == 0) { - return (FREE_IMAGE_FORMAT)i; - } else { - // make a copy of the extension list and split it - - char *copy = (char *)malloc(strlen(FreeImage_GetFIFExtensionList((FREE_IMAGE_FORMAT)i)) + 1); - memset(copy, 0, strlen(FreeImage_GetFIFExtensionList((FREE_IMAGE_FORMAT)i)) + 1); - memcpy(copy, FreeImage_GetFIFExtensionList((FREE_IMAGE_FORMAT)i), strlen(FreeImage_GetFIFExtensionList((FREE_IMAGE_FORMAT)i))); - - // get the first token - - char *token = strtok(copy, ","); - - while (token != NULL) { - if (FreeImage_stricmp(token, extension) == 0) { - free(copy); - - return (FREE_IMAGE_FORMAT)i; - } - - token = strtok(NULL, ","); - } - - // free the copy of the extension list - - free(copy); - } - } - } - } - - return FIF_UNKNOWN; -} - -FREE_IMAGE_FORMAT DLL_CALLCONV -FreeImage_GetFIFFromFilenameU(const wchar_t *filename) { -#ifdef _WIN32 - if (filename == NULL) return FIF_UNKNOWN; - - // get the proper extension if we received a filename - wchar_t *place = wcsrchr((wchar_t *)filename, '.'); - if (place == NULL) return FIF_UNKNOWN; - // convert to single character - no national chars in extensions - char *extension = (char *)malloc(wcslen(place)+1); - unsigned int i=0; - for(; i < wcslen(place); i++) // convert 16-bit to 8-bit - extension[i] = (char)(place[i] & 0x00FF); - // set terminating 0 - extension[i]=0; - FREE_IMAGE_FORMAT fRet = FreeImage_GetFIFFromFilename(extension); - free(extension); - - return fRet; -#else - return FIF_UNKNOWN; -#endif // _WIN32 -} - -BOOL DLL_CALLCONV -FreeImage_ValidateFIF(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle) { - if (s_plugins != NULL) { - BOOL validated = FALSE; - - PluginNode *node = s_plugins->FindNodeFromFIF(fif); - - if (node) { - long tell = io->tell_proc(handle); - - validated = (node != NULL) ? (node->m_enabled) ? (node->m_plugin->validate_proc != NULL) ? node->m_plugin->validate_proc(io, handle) : FALSE : FALSE : FALSE; - - io->seek_proc(handle, tell, SEEK_SET); - } - - return validated; - } - - return FALSE; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginBMP.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginBMP.cpp deleted file mode 100644 index 0fe8f56..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginBMP.cpp +++ /dev/null @@ -1,1525 +0,0 @@ -// ========================================================== -// BMP Loader and Writer -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Markus Loibl (markus.loibl@epost.de) -// - Martin Weber (martweb@gmx.net) -// - Herv Drolon (drolon@infonie.fr) -// - Michal Novotny (michal@etc.cz) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Constants + headers -// ---------------------------------------------------------- - -static const BYTE RLE_COMMAND = 0; -static const BYTE RLE_ENDOFLINE = 0; -static const BYTE RLE_ENDOFBITMAP = 1; -static const BYTE RLE_DELTA = 2; - -static const BYTE BI_RGB = 0; // compression: none -static const BYTE BI_RLE8 = 1; // compression: RLE 8-bit/pixel -static const BYTE BI_RLE4 = 2; // compression: RLE 4-bit/pixel -static const BYTE BI_BITFIELDS = 3; // compression: Bit field or Huffman 1D compression for BITMAPCOREHEADER2 -static const BYTE BI_JPEG = 4; // compression: JPEG or RLE-24 compression for BITMAPCOREHEADER2 -static const BYTE BI_PNG = 5; // compression: PNG -static const BYTE BI_ALPHABITFIELDS = 6; // compression: Bit field (this value is valid in Windows CE .NET 4.0 and later) - -// ---------------------------------------------------------- - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -typedef struct tagBITMAPCOREHEADER { - DWORD bcSize; - WORD bcWidth; - WORD bcHeight; - WORD bcPlanes; - WORD bcBitCnt; -} BITMAPCOREHEADER, *PBITMAPCOREHEADER; - -typedef struct tagBITMAPINFOOS2_1X_HEADER { - DWORD biSize; - WORD biWidth; - WORD biHeight; - WORD biPlanes; - WORD biBitCount; -} BITMAPINFOOS2_1X_HEADER, *PBITMAPINFOOS2_1X_HEADER; - -typedef struct tagBITMAPFILEHEADER { - WORD bfType; //! The file type - DWORD bfSize; //! The size, in bytes, of the bitmap file - WORD bfReserved1; //! Reserved; must be zero - WORD bfReserved2; //! Reserved; must be zero - DWORD bfOffBits; //! The offset, in bytes, from the beginning of the BITMAPFILEHEADER structure to the bitmap bits -} BITMAPFILEHEADER, *PBITMAPFILEHEADER; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Internal functions -// ========================================================== - -#ifdef FREEIMAGE_BIGENDIAN -static void -SwapInfoHeader(BITMAPINFOHEADER *header) { - SwapLong(&header->biSize); - SwapLong((DWORD *)&header->biWidth); - SwapLong((DWORD *)&header->biHeight); - SwapShort(&header->biPlanes); - SwapShort(&header->biBitCount); - SwapLong(&header->biCompression); - SwapLong(&header->biSizeImage); - SwapLong((DWORD *)&header->biXPelsPerMeter); - SwapLong((DWORD *)&header->biYPelsPerMeter); - SwapLong(&header->biClrUsed); - SwapLong(&header->biClrImportant); -} - -static void -SwapCoreHeader(BITMAPCOREHEADER *header) { - SwapLong(&header->bcSize); - SwapShort(&header->bcWidth); - SwapShort(&header->bcHeight); - SwapShort(&header->bcPlanes); - SwapShort(&header->bcBitCnt); -} - -static void -SwapOS21XHeader(BITMAPINFOOS2_1X_HEADER *header) { - SwapLong(&header->biSize); - SwapShort(&header->biWidth); - SwapShort(&header->biHeight); - SwapShort(&header->biPlanes); - SwapShort(&header->biBitCount); -} - -static void -SwapFileHeader(BITMAPFILEHEADER *header) { - SwapShort(&header->bfType); - SwapLong(&header->bfSize); - SwapShort(&header->bfReserved1); - SwapShort(&header->bfReserved2); - SwapLong(&header->bfOffBits); -} -#endif - -// -------------------------------------------------------------------------- - -/** -Load uncompressed image pixels for 1-, 4-, 8-, 16-, 24- and 32-bit dib -@param io FreeImage IO -@param handle FreeImage IO handle -@param dib Image to be loaded -@param height Image height -@param pitch Image pitch -@param bit_count Image bit-depth (1-, 4-, 8-, 16-, 24- or 32-bit) -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -LoadPixelData(FreeImageIO *io, fi_handle handle, FIBITMAP *dib, int height, unsigned pitch, unsigned bit_count) { - unsigned count = 0; - - // Load pixel data - // NB: height can be < 0 for BMP data - if (height > 0) { - count = io->read_proc((void *)FreeImage_GetBits(dib), height * pitch, 1, handle); - if(count != 1) { - return FALSE; - } - } else { - int positiveHeight = abs(height); - for (int c = 0; c < positiveHeight; ++c) { - count = io->read_proc((void *)FreeImage_GetScanLine(dib, positiveHeight - c - 1), pitch, 1, handle); - if(count != 1) { - return FALSE; - } - } - } - - // swap as needed -#ifdef FREEIMAGE_BIGENDIAN - if (bit_count == 16) { - for(unsigned y = 0; y < FreeImage_GetHeight(dib); y++) { - WORD *pixel = (WORD *)FreeImage_GetScanLine(dib, y); - for(unsigned x = 0; x < FreeImage_GetWidth(dib); x++) { - SwapShort(pixel); - pixel++; - } - } - } -#endif -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - if (bit_count == 24 || bit_count == 32) { - for(unsigned y = 0; y < FreeImage_GetHeight(dib); y++) { - BYTE *pixel = FreeImage_GetScanLine(dib, y); - for(unsigned x = 0; x < FreeImage_GetWidth(dib); x++) { - INPLACESWAP(pixel[0], pixel[2]); - pixel += (bit_count >> 3); - } - } - } -#endif - - return TRUE; -} - -/** -Load image pixels for 4-bit RLE compressed dib -@param io FreeImage IO -@param handle FreeImage IO handle -@param width Image width -@param height Image height -@param dib Image to be loaded -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -LoadPixelDataRLE4(FreeImageIO *io, fi_handle handle, int width, int height, FIBITMAP *dib) { - int status_byte = 0; - BYTE second_byte = 0; - int bits = 0; - - BYTE *pixels = NULL; // temporary 8-bit buffer - - try { - height = abs(height); - - pixels = (BYTE*)malloc(width * height * sizeof(BYTE)); - if(!pixels) throw(1); - memset(pixels, 0, width * height * sizeof(BYTE)); - - BYTE *q = pixels; - BYTE *end = pixels + height * width; - - for (int scanline = 0; scanline < height; ) { - if (q < pixels || q >= end) { - break; - } - if(io->read_proc(&status_byte, sizeof(BYTE), 1, handle) != 1) { - throw(1); - } - if (status_byte != 0) { - status_byte = (int)MIN((size_t)status_byte, (size_t)(end - q)); - // Encoded mode - if(io->read_proc(&second_byte, sizeof(BYTE), 1, handle) != 1) { - throw(1); - } - for (int i = 0; i < status_byte; i++) { - *q++=(BYTE)((i & 0x01) ? (second_byte & 0x0f) : ((second_byte >> 4) & 0x0f)); - } - bits += status_byte; - } - else { - // Escape mode - if(io->read_proc(&status_byte, sizeof(BYTE), 1, handle) != 1) { - throw(1); - } - switch (status_byte) { - case RLE_ENDOFLINE: - { - // End of line - bits = 0; - scanline++; - q = pixels + scanline*width; - } - break; - - case RLE_ENDOFBITMAP: - // End of bitmap - q = end; - break; - - case RLE_DELTA: - { - // read the delta values - - BYTE delta_x = 0; - BYTE delta_y = 0; - - if(io->read_proc(&delta_x, sizeof(BYTE), 1, handle) != 1) { - throw(1); - } - if(io->read_proc(&delta_y, sizeof(BYTE), 1, handle) != 1) { - throw(1); - } - - // apply them - - bits += delta_x; - scanline += delta_y; - q = pixels + scanline*width+bits; - } - break; - - default: - { - // Absolute mode - status_byte = (int)MIN((size_t)status_byte, (size_t)(end - q)); - for (int i = 0; i < status_byte; i++) { - if ((i & 0x01) == 0) { - if(io->read_proc(&second_byte, sizeof(BYTE), 1, handle) != 1) { - throw(1); - } - } - *q++=(BYTE)((i & 0x01) ? (second_byte & 0x0f) : ((second_byte >> 4) & 0x0f)); - } - bits += status_byte; - // Read pad byte - if (((status_byte & 0x03) == 1) || ((status_byte & 0x03) == 2)) { - BYTE padding = 0; - if(io->read_proc(&padding, sizeof(BYTE), 1, handle) != 1) { - throw(1); - } - } - } - break; - } - } - } - - { - // Convert to 4-bit - for(int y = 0; y < height; y++) { - const BYTE *src = (BYTE*)pixels + y * width; - BYTE *dst = FreeImage_GetScanLine(dib, y); - - BOOL hinibble = TRUE; - - for (int cols = 0; cols < width; cols++){ - if (hinibble) { - dst[cols >> 1] = (src[cols] << 4); - } else { - dst[cols >> 1] |= src[cols]; - } - - hinibble = !hinibble; - } - } - } - - free(pixels); - - return TRUE; - - } catch(int) { - if(pixels) free(pixels); - return FALSE; - } -} - -/** -Load image pixels for 8-bit RLE compressed dib -@param io FreeImage IO -@param handle FreeImage IO handle -@param width Image width -@param height Image height -@param dib Image to be loaded -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -LoadPixelDataRLE8(FreeImageIO *io, fi_handle handle, int width, int height, FIBITMAP *dib) { - BYTE status_byte = 0; - BYTE second_byte = 0; - int scanline = 0; - int bits = 0; - - for (;;) { - if( io->read_proc(&status_byte, sizeof(BYTE), 1, handle) != 1) { - return FALSE; - } - - switch (status_byte) { - case RLE_COMMAND : - if(io->read_proc(&status_byte, sizeof(BYTE), 1, handle) != 1) { - return FALSE; - } - - switch (status_byte) { - case RLE_ENDOFLINE : - bits = 0; - scanline++; - break; - - case RLE_ENDOFBITMAP : - return TRUE; - - case RLE_DELTA : - { - // read the delta values - - BYTE delta_x = 0; - BYTE delta_y = 0; - - if(io->read_proc(&delta_x, sizeof(BYTE), 1, handle) != 1) { - return FALSE; - } - if(io->read_proc(&delta_y, sizeof(BYTE), 1, handle) != 1) { - return FALSE; - } - - // apply them - - bits += delta_x; - scanline += delta_y; - - break; - } - - default : - { - if(scanline >= abs(height)) { - return TRUE; - } - - int count = MIN((int)status_byte, width - bits); - - BYTE *sline = FreeImage_GetScanLine(dib, scanline); - - if(io->read_proc((void *)(sline + bits), sizeof(BYTE) * count, 1, handle) != 1) { - return FALSE; - } - - // align run length to even number of bytes - - if ((status_byte & 1) == 1) { - if(io->read_proc(&second_byte, sizeof(BYTE), 1, handle) != 1) { - return FALSE; - } - } - - bits += status_byte; - - break; - } - } - - break; - - default : - { - if(scanline >= abs(height)) { - return TRUE; - } - - int count = MIN((int)status_byte, width - bits); - - BYTE *sline = FreeImage_GetScanLine(dib, scanline); - - if(io->read_proc(&second_byte, sizeof(BYTE), 1, handle) != 1) { - return FALSE; - } - - for (int i = 0; i < count; i++) { - *(sline + bits) = second_byte; - - bits++; - } - - break; - } - } - } -} - -// -------------------------------------------------------------------------- - -static FIBITMAP * -LoadWindowsBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bits_offset, int type) { - FIBITMAP *dib = NULL; - - try { - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - // load the info header - - BITMAPINFOHEADER bih; - - io->read_proc(&bih, sizeof(BITMAPINFOHEADER), 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapInfoHeader(&bih); -#endif - - // keep some general information about the bitmap - - unsigned used_colors = bih.biClrUsed; - int width = bih.biWidth; - int height = bih.biHeight; // WARNING: height can be < 0 => check each call using 'height' as a parameter - unsigned bit_count = bih.biBitCount; - unsigned compression = bih.biCompression; - unsigned pitch = CalculatePitch(CalculateLine(width, bit_count)); - - switch (bit_count) { - case 1 : - case 4 : - case 8 : - { - if ((used_colors == 0) || (used_colors > CalculateUsedPaletteEntries(bit_count))) { - used_colors = CalculateUsedPaletteEntries(bit_count); - } - - // allocate enough memory to hold the bitmap (header, palette, pixels) and read the palette - - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count); - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // set resolution information - FreeImage_SetDotsPerMeterX(dib, bih.biXPelsPerMeter); - FreeImage_SetDotsPerMeterY(dib, bih.biYPelsPerMeter); - - // seek to the end of the header (depending on the BMP header version) - // type == sizeof(BITMAPVxINFOHEADER) - switch(type) { - case 40: // sizeof(BITMAPINFOHEADER) - all Windows versions since Windows 3.0 - break; - case 52: // sizeof(BITMAPV2INFOHEADER) (undocumented) - case 56: // sizeof(BITMAPV3INFOHEADER) (undocumented) - case 108: // sizeof(BITMAPV4HEADER) - all Windows versions since Windows 95/NT4 (not supported) - case 124: // sizeof(BITMAPV5HEADER) - Windows 98/2000 and newer (not supported) - io->seek_proc(handle, (long)(type - sizeof(BITMAPINFOHEADER)), SEEK_CUR); - break; - } - - // load the palette - - io->read_proc(FreeImage_GetPalette(dib), used_colors * sizeof(RGBQUAD), 1, handle); -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - RGBQUAD *pal = FreeImage_GetPalette(dib); - for(int i = 0; i < used_colors; i++) { - INPLACESWAP(pal[i].rgbRed, pal[i].rgbBlue); - } -#endif - - if(header_only) { - // header only mode - return dib; - } - - // seek to the actual pixel data. - // this is needed because sometimes the palette is larger than the entries it contains predicts - io->seek_proc(handle, bitmap_bits_offset, SEEK_SET); - - // read the pixel data - - switch (compression) { - case BI_RGB : - if( LoadPixelData(io, handle, dib, height, pitch, bit_count) ) { - return dib; - } else { - throw "Error encountered while decoding BMP data"; - } - break; - - case BI_RLE4 : - if( LoadPixelDataRLE4(io, handle, width, height, dib) ) { - return dib; - } else { - throw "Error encountered while decoding RLE4 BMP data"; - } - break; - - case BI_RLE8 : - if( LoadPixelDataRLE8(io, handle, width, height, dib) ) { - return dib; - } else { - throw "Error encountered while decoding RLE8 BMP data"; - } - break; - - default : - throw FI_MSG_ERROR_UNSUPPORTED_COMPRESSION; - } - } - break; // 1-, 4-, 8-bit - - case 16 : - { - int use_bitfields = 0; - if (bih.biCompression == BI_BITFIELDS) use_bitfields = 3; - else if (bih.biCompression == BI_ALPHABITFIELDS) use_bitfields = 4; - else if (type == 52) use_bitfields = 3; - else if (type >= 56) use_bitfields = 4; - - if (use_bitfields > 0) { - DWORD bitfields[4]; - io->read_proc(bitfields, use_bitfields * sizeof(DWORD), 1, handle); - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, bitfields[0], bitfields[1], bitfields[2]); - } else { - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, FI16_555_RED_MASK, FI16_555_GREEN_MASK, FI16_555_BLUE_MASK); - } - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // set resolution information - FreeImage_SetDotsPerMeterX(dib, bih.biXPelsPerMeter); - FreeImage_SetDotsPerMeterY(dib, bih.biYPelsPerMeter); - - if(header_only) { - // header only mode - return dib; - } - - // seek to the actual pixel data - io->seek_proc(handle, bitmap_bits_offset, SEEK_SET); - - // load pixel data and swap as needed if OS is Big Endian - LoadPixelData(io, handle, dib, height, pitch, bit_count); - - return dib; - } - break; // 16-bit - - case 24 : - case 32 : - { - int use_bitfields = 0; - if (bih.biCompression == BI_BITFIELDS) use_bitfields = 3; - else if (bih.biCompression == BI_ALPHABITFIELDS) use_bitfields = 4; - else if (type == 52) use_bitfields = 3; - else if (type >= 56) use_bitfields = 4; - - if (use_bitfields > 0) { - DWORD bitfields[4]; - io->read_proc(bitfields, use_bitfields * sizeof(DWORD), 1, handle); - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, bitfields[0], bitfields[1], bitfields[2]); - } else { - if( bit_count == 32 ) { - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } else { - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } - } - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // set resolution information - FreeImage_SetDotsPerMeterX(dib, bih.biXPelsPerMeter); - FreeImage_SetDotsPerMeterY(dib, bih.biYPelsPerMeter); - - if(header_only) { - // header only mode - return dib; - } - - // Skip over the optional palette - // A 24 or 32 bit DIB may contain a palette for faster color reduction - // i.e. you can have (FreeImage_GetColorsUsed(dib) > 0) - - // seek to the actual pixel data - io->seek_proc(handle, bitmap_bits_offset, SEEK_SET); - - // read in the bitmap bits - // load pixel data and swap as needed if OS is Big Endian - LoadPixelData(io, handle, dib, height, pitch, bit_count); - - // check if the bitmap contains transparency, if so enable it in the header - - FreeImage_SetTransparent(dib, (FreeImage_GetColorType(dib) == FIC_RGBALPHA)); - - return dib; - } - break; // 24-, 32-bit - } - } catch(const char *message) { - if(dib) { - FreeImage_Unload(dib); - } - if(message) { - FreeImage_OutputMessageProc(s_format_id, message); - } - } - - return NULL; -} - -// -------------------------------------------------------------------------- - -static FIBITMAP * -LoadOS22XBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bits_offset) { - FIBITMAP *dib = NULL; - - try { - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - // load the info header - - BITMAPINFOHEADER bih; - - io->read_proc(&bih, sizeof(BITMAPINFOHEADER), 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapInfoHeader(&bih); -#endif - - // keep some general information about the bitmap - - unsigned used_colors = bih.biClrUsed; - int width = bih.biWidth; - int height = bih.biHeight; // WARNING: height can be < 0 => check each read_proc using 'height' as a parameter - unsigned bit_count = bih.biBitCount; - unsigned compression = bih.biCompression; - unsigned pitch = CalculatePitch(CalculateLine(width, bit_count)); - - switch (bit_count) { - case 1 : - case 4 : - case 8 : - { - if ((used_colors == 0) || (used_colors > CalculateUsedPaletteEntries(bit_count))) - used_colors = CalculateUsedPaletteEntries(bit_count); - - // allocate enough memory to hold the bitmap (header, palette, pixels) and read the palette - - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count); - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // set resolution information - FreeImage_SetDotsPerMeterX(dib, bih.biXPelsPerMeter); - FreeImage_SetDotsPerMeterY(dib, bih.biYPelsPerMeter); - - // load the palette - // note that it may contain RGB or RGBA values : we will calculate this - unsigned pal_size = (bitmap_bits_offset - sizeof(BITMAPFILEHEADER) - bih.biSize) / used_colors; - - io->seek_proc(handle, sizeof(BITMAPFILEHEADER) + bih.biSize, SEEK_SET); - - RGBQUAD *pal = FreeImage_GetPalette(dib); - - if(pal_size == 4) { - for (unsigned count = 0; count < used_colors; count++) { - FILE_BGRA bgra; - - io->read_proc(&bgra, sizeof(FILE_BGRA), 1, handle); - - pal[count].rgbRed = bgra.r; - pal[count].rgbGreen = bgra.g; - pal[count].rgbBlue = bgra.b; - } - } else if(pal_size == 3) { - for (unsigned count = 0; count < used_colors; count++) { - FILE_BGR bgr; - - io->read_proc(&bgr, sizeof(FILE_BGR), 1, handle); - - pal[count].rgbRed = bgr.r; - pal[count].rgbGreen = bgr.g; - pal[count].rgbBlue = bgr.b; - } - } - - if(header_only) { - // header only mode - return dib; - } - - // seek to the actual pixel data. - // this is needed because sometimes the palette is larger than the entries it contains predicts - - if (bitmap_bits_offset > (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + (used_colors * 3))) { - io->seek_proc(handle, bitmap_bits_offset, SEEK_SET); - } - - // read the pixel data - - switch (compression) { - case BI_RGB : - // load pixel data - LoadPixelData(io, handle, dib, height, pitch, bit_count); - return dib; - - case BI_RLE4 : - if( LoadPixelDataRLE4(io, handle, width, height, dib) ) { - return dib; - } else { - throw "Error encountered while decoding RLE4 BMP data"; - } - break; - - case BI_RLE8 : - if( LoadPixelDataRLE8(io, handle, width, height, dib) ) { - return dib; - } else { - throw "Error encountered while decoding RLE8 BMP data"; - } - break; - - default : - throw FI_MSG_ERROR_UNSUPPORTED_COMPRESSION; - } - } - - case 16 : - { - if (bih.biCompression == 3) { - DWORD bitfields[3]; - - io->read_proc(bitfields, 3 * sizeof(DWORD), 1, handle); - - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, bitfields[0], bitfields[1], bitfields[2]); - } else { - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, FI16_555_RED_MASK, FI16_555_GREEN_MASK, FI16_555_BLUE_MASK); - } - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // set resolution information - FreeImage_SetDotsPerMeterX(dib, bih.biXPelsPerMeter); - FreeImage_SetDotsPerMeterY(dib, bih.biYPelsPerMeter); - - if(header_only) { - // header only mode - return dib; - } - - if (bitmap_bits_offset > (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + (used_colors * 3))) { - io->seek_proc(handle, bitmap_bits_offset, SEEK_SET); - } - - // load pixel data and swap as needed if OS is Big Endian - LoadPixelData(io, handle, dib, height, pitch, bit_count); - - return dib; - } - - case 24 : - case 32 : - { - if( bit_count == 32 ) { - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } else { - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // set resolution information - FreeImage_SetDotsPerMeterX(dib, bih.biXPelsPerMeter); - FreeImage_SetDotsPerMeterY(dib, bih.biYPelsPerMeter); - - if(header_only) { - // header only mode - return dib; - } - - // Skip over the optional palette - // A 24 or 32 bit DIB may contain a palette for faster color reduction - - if (bitmap_bits_offset > (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + (used_colors * 3))) { - io->seek_proc(handle, bitmap_bits_offset, SEEK_SET); - } - - // read in the bitmap bits - // load pixel data and swap as needed if OS is Big Endian - LoadPixelData(io, handle, dib, height, pitch, bit_count); - - // check if the bitmap contains transparency, if so enable it in the header - - FreeImage_SetTransparent(dib, (FreeImage_GetColorType(dib) == FIC_RGBALPHA)); - - return dib; - } - } - } catch(const char *message) { - if(dib) - FreeImage_Unload(dib); - - FreeImage_OutputMessageProc(s_format_id, message); - } - - return NULL; -} - -// -------------------------------------------------------------------------- - -static FIBITMAP * -LoadOS21XBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bits_offset) { - FIBITMAP *dib = NULL; - - try { - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - BITMAPINFOOS2_1X_HEADER bios2_1x; - - io->read_proc(&bios2_1x, sizeof(BITMAPINFOOS2_1X_HEADER), 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapOS21XHeader(&bios2_1x); -#endif - // keep some general information about the bitmap - - unsigned used_colors = 0; - unsigned width = bios2_1x.biWidth; - unsigned height = bios2_1x.biHeight; // WARNING: height can be < 0 => check each read_proc using 'height' as a parameter - unsigned bit_count = bios2_1x.biBitCount; - unsigned pitch = CalculatePitch(CalculateLine(width, bit_count)); - - switch (bit_count) { - case 1 : - case 4 : - case 8 : - { - used_colors = CalculateUsedPaletteEntries(bit_count); - - // allocate enough memory to hold the bitmap (header, palette, pixels) and read the palette - - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count); - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // set resolution information to default values (72 dpi in english units) - FreeImage_SetDotsPerMeterX(dib, 2835); - FreeImage_SetDotsPerMeterY(dib, 2835); - - // load the palette - - RGBQUAD *pal = FreeImage_GetPalette(dib); - - for (unsigned count = 0; count < used_colors; count++) { - FILE_BGR bgr; - - io->read_proc(&bgr, sizeof(FILE_BGR), 1, handle); - - pal[count].rgbRed = bgr.r; - pal[count].rgbGreen = bgr.g; - pal[count].rgbBlue = bgr.b; - } - - if(header_only) { - // header only mode - return dib; - } - - // Skip over the optional palette - // A 24 or 32 bit DIB may contain a palette for faster color reduction - - io->seek_proc(handle, bitmap_bits_offset, SEEK_SET); - - // read the pixel data - - // load pixel data - LoadPixelData(io, handle, dib, height, pitch, bit_count); - - return dib; - } - - case 16 : - { - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, FI16_555_RED_MASK, FI16_555_GREEN_MASK, FI16_555_BLUE_MASK); - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // set resolution information to default values (72 dpi in english units) - FreeImage_SetDotsPerMeterX(dib, 2835); - FreeImage_SetDotsPerMeterY(dib, 2835); - - if(header_only) { - // header only mode - return dib; - } - - // load pixel data and swap as needed if OS is Big Endian - LoadPixelData(io, handle, dib, height, pitch, bit_count); - - return dib; - } - - case 24 : - case 32 : - { - if( bit_count == 32 ) { - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } else { - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // set resolution information to default values (72 dpi in english units) - FreeImage_SetDotsPerMeterX(dib, 2835); - FreeImage_SetDotsPerMeterY(dib, 2835); - - if(header_only) { - // header only mode - return dib; - } - - // Skip over the optional palette - // A 24 or 32 bit DIB may contain a palette for faster color reduction - - // load pixel data and swap as needed if OS is Big Endian - LoadPixelData(io, handle, dib, height, pitch, bit_count); - - // check if the bitmap contains transparency, if so enable it in the header - - FreeImage_SetTransparent(dib, (FreeImage_GetColorType(dib) == FIC_RGBALPHA)); - - return dib; - } - } - } catch(const char *message) { - if(dib) - FreeImage_Unload(dib); - - FreeImage_OutputMessageProc(s_format_id, message); - } - - return NULL; -} - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "BMP"; -} - -static const char * DLL_CALLCONV -Description() { - return "Windows or OS/2 Bitmap"; -} - -static const char * DLL_CALLCONV -Extension() { - return "bmp"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return "^BM"; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/bmp"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE bmp_signature1[] = { 0x42, 0x4D }; - BYTE bmp_signature2[] = { 0x42, 0x41 }; - BYTE signature[2] = { 0, 0 }; - - io->read_proc(signature, 1, sizeof(bmp_signature1), handle); - - if (memcmp(bmp_signature1, signature, sizeof(bmp_signature1)) == 0) - return TRUE; - - if (memcmp(bmp_signature2, signature, sizeof(bmp_signature2)) == 0) - return TRUE; - - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 1) || - (depth == 4) || - (depth == 8) || - (depth == 16) || - (depth == 24) || - (depth == 32) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return (type == FIT_BITMAP) ? TRUE : FALSE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - if (handle != NULL) { - BITMAPFILEHEADER bitmapfileheader; - DWORD type = 0; - - // we use this offset value to make seemingly absolute seeks relative in the file - - long offset_in_file = io->tell_proc(handle); - - // read the fileheader - - io->read_proc(&bitmapfileheader, sizeof(BITMAPFILEHEADER), 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapFileHeader(&bitmapfileheader); -#endif - - // check the signature - - if((bitmapfileheader.bfType != 0x4D42) && (bitmapfileheader.bfType != 0x4142)) { - FreeImage_OutputMessageProc(s_format_id, FI_MSG_ERROR_MAGIC_NUMBER); - return NULL; - } - - // read the first byte of the infoheader - - io->read_proc(&type, sizeof(DWORD), 1, handle); - io->seek_proc(handle, 0 - (long)sizeof(DWORD), SEEK_CUR); -#ifdef FREEIMAGE_BIGENDIAN - SwapLong(&type); -#endif - - // call the appropriate load function for the found bitmap type - - switch(type) { - case 12: - // OS/2 and also all Windows versions since Windows 3.0 - return LoadOS21XBMP(io, handle, flags, offset_in_file + bitmapfileheader.bfOffBits); - - case 64: - // OS/2 - return LoadOS22XBMP(io, handle, flags, offset_in_file + bitmapfileheader.bfOffBits); - - case 40: // BITMAPINFOHEADER - all Windows versions since Windows 3.0 - case 52: // BITMAPV2INFOHEADER (undocumented, partially supported) - case 56: // BITMAPV3INFOHEADER (undocumented, partially supported) - case 108: // BITMAPV4HEADER - all Windows versions since Windows 95/NT4 (partially supported) - case 124: // BITMAPV5HEADER - Windows 98/2000 and newer (partially supported) - return LoadWindowsBMP(io, handle, flags, offset_in_file + bitmapfileheader.bfOffBits, type); - - default: - break; - } - - FreeImage_OutputMessageProc(s_format_id, "unknown bmp subtype with id %d", type); - } - - return NULL; -} - -// ---------------------------------------------------------- - -/** -Encode a 8-bit source buffer into a 8-bit target buffer using a RLE compression algorithm. -The size of the target buffer must be equal to the size of the source buffer. -On return, the function will return the real size of the target buffer, which should be less that or equal to the source buffer size. -@param target 8-bit Target buffer -@param source 8-bit Source buffer -@param size Source/Target input buffer size -@return Returns the target buffer size -*/ -static int -RLEEncodeLine(BYTE *target, BYTE *source, int size) { - BYTE buffer[256]; - int buffer_size = 0; - int target_pos = 0; - - for (int i = 0; i < size; ++i) { - if ((i < size - 1) && (source[i] == source[i + 1])) { - // find a solid block of same bytes - - int j = i + 1; - int jmax = 254 + i; - - while ((j < size - 1) && (j < jmax) && (source[j] == source[j + 1])) - ++j; - - // if the block is larger than 3 bytes, use it - // else put the data into the larger pool - - if (((j - i) + 1) > 3) { - // don't forget to write what we already have in the buffer - - switch(buffer_size) { - case 0 : - break; - - case RLE_DELTA : - target[target_pos++] = 1; - target[target_pos++] = buffer[0]; - target[target_pos++] = 1; - target[target_pos++] = buffer[1]; - break; - - case RLE_ENDOFBITMAP : - target[target_pos++] = (BYTE)buffer_size; - target[target_pos++] = buffer[0]; - break; - - default : - target[target_pos++] = RLE_COMMAND; - target[target_pos++] = (BYTE)buffer_size; - memcpy(target + target_pos, buffer, buffer_size); - - // prepare for next run - - target_pos += buffer_size; - - if ((buffer_size & 1) == 1) - target_pos++; - - break; - } - - // write the continuous data - - target[target_pos++] = (BYTE)((j - i) + 1); - target[target_pos++] = source[i]; - - buffer_size = 0; - } else { - for (int k = 0; k < (j - i) + 1; ++k) { - buffer[buffer_size++] = source[i + k]; - - if (buffer_size == 254) { - // write what we have - - target[target_pos++] = RLE_COMMAND; - target[target_pos++] = (BYTE)buffer_size; - memcpy(target + target_pos, buffer, buffer_size); - - // prepare for next run - - target_pos += buffer_size; - buffer_size = 0; - } - } - } - - i = j; - } else { - buffer[buffer_size++] = source[i]; - } - - // write the buffer if it's full - - if (buffer_size == 254) { - target[target_pos++] = RLE_COMMAND; - target[target_pos++] = (BYTE)buffer_size; - memcpy(target + target_pos, buffer, buffer_size); - - // prepare for next run - - target_pos += buffer_size; - buffer_size = 0; - } - } - - // write the last bytes - - switch(buffer_size) { - case 0 : - break; - - case RLE_DELTA : - target[target_pos++] = 1; - target[target_pos++] = buffer[0]; - target[target_pos++] = 1; - target[target_pos++] = buffer[1]; - break; - - case RLE_ENDOFBITMAP : - target[target_pos++] = (BYTE)buffer_size; - target[target_pos++] = buffer[0]; - break; - - default : - target[target_pos++] = RLE_COMMAND; - target[target_pos++] = (BYTE)buffer_size; - memcpy(target + target_pos, buffer, buffer_size); - - // prepare for next run - - target_pos += buffer_size; - - if ((buffer_size & 1) == 1) - target_pos++; - - break; - } - - // write the END_OF_LINE marker - - target[target_pos++] = RLE_COMMAND; - target[target_pos++] = RLE_ENDOFLINE; - - // return the written size - - return target_pos; -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - if ((dib != NULL) && (handle != NULL)) { - // write the file header - - const unsigned dst_width = FreeImage_GetWidth(dib); - const unsigned dst_height = FreeImage_GetHeight(dib); - - // note that the dib may have been created using FreeImage_CreateView - // we need to recalculate the dst pitch here - const unsigned dst_bpp = FreeImage_GetBPP(dib); - const unsigned dst_pitch = CalculatePitch(CalculateLine(dst_width, dst_bpp)); - - BITMAPFILEHEADER bitmapfileheader; - bitmapfileheader.bfType = 0x4D42; - bitmapfileheader.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + FreeImage_GetColorsUsed(dib) * sizeof(RGBQUAD); - bitmapfileheader.bfSize = bitmapfileheader.bfOffBits + dst_height * dst_pitch; - bitmapfileheader.bfReserved1 = 0; - bitmapfileheader.bfReserved2 = 0; - - // take care of the bit fields data of any - - bool bit_fields = (dst_bpp == 16) ? true : false; - - if (bit_fields) { - bitmapfileheader.bfSize += 3 * sizeof(DWORD); - bitmapfileheader.bfOffBits += 3 * sizeof(DWORD); - } - -#ifdef FREEIMAGE_BIGENDIAN - SwapFileHeader(&bitmapfileheader); -#endif - if (io->write_proc(&bitmapfileheader, sizeof(BITMAPFILEHEADER), 1, handle) != 1) { - return FALSE; - } - - // update the bitmap info header - - BITMAPINFOHEADER bih; - memcpy(&bih, FreeImage_GetInfoHeader(dib), sizeof(BITMAPINFOHEADER)); - - if (bit_fields) { - bih.biCompression = BI_BITFIELDS; - } - else if ((bih.biBitCount == 8) && ((flags & BMP_SAVE_RLE) == BMP_SAVE_RLE)) { - bih.biCompression = BI_RLE8; - } - else { - bih.biCompression = BI_RGB; - } - - // write the bitmap info header - -#ifdef FREEIMAGE_BIGENDIAN - SwapInfoHeader(&bih); -#endif - if (io->write_proc(&bih, sizeof(BITMAPINFOHEADER), 1, handle) != 1) { - return FALSE; - } - - // write the bit fields when we are dealing with a 16 bit BMP - - if (bit_fields) { - DWORD d; - - d = FreeImage_GetRedMask(dib); - - if (io->write_proc(&d, sizeof(DWORD), 1, handle) != 1) { - return FALSE; - } - - d = FreeImage_GetGreenMask(dib); - - if (io->write_proc(&d, sizeof(DWORD), 1, handle) != 1) { - return FALSE; - } - - d = FreeImage_GetBlueMask(dib); - - if (io->write_proc(&d, sizeof(DWORD), 1, handle) != 1) { - return FALSE; - } - } - - // write the palette - - if (FreeImage_GetPalette(dib) != NULL) { - RGBQUAD *pal = FreeImage_GetPalette(dib); - FILE_BGRA bgra; - for(unsigned i = 0; i < FreeImage_GetColorsUsed(dib); i++ ) { - bgra.b = pal[i].rgbBlue; - bgra.g = pal[i].rgbGreen; - bgra.r = pal[i].rgbRed; - bgra.a = pal[i].rgbReserved; - if (io->write_proc(&bgra, sizeof(FILE_BGRA), 1, handle) != 1) { - return FALSE; - } - } - } - - // write the bitmap data... if RLE compression is enable, use it - - if ((dst_bpp == 8) && ((flags & BMP_SAVE_RLE) == BMP_SAVE_RLE)) { - BYTE *buffer = (BYTE*)malloc(dst_pitch * 2 * sizeof(BYTE)); - - for (unsigned i = 0; i < dst_height; ++i) { - int size = RLEEncodeLine(buffer, FreeImage_GetScanLine(dib, i), FreeImage_GetLine(dib)); - - if (io->write_proc(buffer, size, 1, handle) != 1) { - free(buffer); - return FALSE; - } - } - - buffer[0] = RLE_COMMAND; - buffer[1] = RLE_ENDOFBITMAP; - - if (io->write_proc(buffer, 2, 1, handle) != 1) { - free(buffer); - return FALSE; - } - - free(buffer); -#ifdef FREEIMAGE_BIGENDIAN - } else if (bpp == 16) { - int padding = dst_pitch - dst_width * sizeof(WORD); - WORD pad = 0; - WORD pixel; - for(unsigned y = 0; y < dst_height; y++) { - BYTE *line = FreeImage_GetScanLine(dib, y); - for(unsigned x = 0; x < dst_width; x++) { - pixel = ((WORD *)line)[x]; - SwapShort(&pixel); - if (io->write_proc(&pixel, sizeof(WORD), 1, handle) != 1) { - return FALSE; - } - } - if(padding != 0) { - if(io->write_proc(&pad, padding, 1, handle) != 1) { - return FALSE; - } - } - } -#endif -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - } else if (bpp == 24) { - int padding = dst_pitch - dst_width * sizeof(FILE_BGR); - DWORD pad = 0; - FILE_BGR bgr; - for(unsigned y = 0; y < dst_height; y++) { - BYTE *line = FreeImage_GetScanLine(dib, y); - for(unsigned x = 0; x < dst_width; x++) { - RGBTRIPLE *triple = ((RGBTRIPLE *)line)+x; - bgr.b = triple->rgbtBlue; - bgr.g = triple->rgbtGreen; - bgr.r = triple->rgbtRed; - if (io->write_proc(&bgr, sizeof(FILE_BGR), 1, handle) != 1) { - return FALSE; - } - } - if(padding != 0) { - if(io->write_proc(&pad, padding, 1, handle) != 1) { - return FALSE; - } - } - } - } else if (bpp == 32) { - FILE_BGRA bgra; - for(unsigned y = 0; y < dst_height; y++) { - BYTE *line = FreeImage_GetScanLine(dib, y); - for(unsigned x = 0; x < dst_width; x++) { - RGBQUAD *quad = ((RGBQUAD *)line)+x; - bgra.b = quad->rgbBlue; - bgra.g = quad->rgbGreen; - bgra.r = quad->rgbRed; - bgra.a = quad->rgbReserved; - if (io->write_proc(&bgra, sizeof(FILE_BGRA), 1, handle) != 1) { - return FALSE; - } - } - } -#endif - } - else if (FreeImage_GetPitch(dib) == dst_pitch) { - return (io->write_proc(FreeImage_GetBits(dib), dst_height * dst_pitch, 1, handle) != 1) ? FALSE : TRUE; - } - else { - for (unsigned y = 0; y < dst_height; y++) { - BYTE *line = (BYTE*)FreeImage_GetScanLine(dib, y); - - if (io->write_proc(line, dst_pitch, 1, handle) != 1) { - return FALSE; - } - } - } - - return TRUE; - - } else { - return FALSE; - } -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitBMP(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; // not implemented yet; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginCUT.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginCUT.cpp deleted file mode 100644 index 5dcd16b..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginCUT.cpp +++ /dev/null @@ -1,240 +0,0 @@ -// ========================================================== -// CUT Loader -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Constants + headers -// ---------------------------------------------------------- - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -typedef struct tagCUTHEADER { - WORD width; - WORD height; - LONG dummy; -} CUTHEADER; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "CUT"; -} - -static const char * DLL_CALLCONV -Description() { - return "Dr. Halo"; -} - -static const char * DLL_CALLCONV -Extension() { - return "cut"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-cut"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - FIBITMAP *dib = NULL; - - if(!handle) { - return NULL; - } - - try { - CUTHEADER header; - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - // read the cut header - - if(io->read_proc(&header, 1, sizeof(CUTHEADER), handle) != sizeof(CUTHEADER)) { - throw FI_MSG_ERROR_PARSING; - } - -#ifdef FREEIMAGE_BIGENDIAN - SwapShort((WORD *)&header.width); - SwapShort((WORD *)&header.height); -#endif - - if ((header.width == 0) || (header.height == 0)) { - return NULL; - } - - // allocate a new bitmap - - dib = FreeImage_AllocateHeader(header_only, header.width, header.height, 8); - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // stuff it with a palette - - RGBQUAD *palette = FreeImage_GetPalette(dib); - - for (int j = 0; j < 256; ++j) { - palette[j].rgbBlue = palette[j].rgbGreen = palette[j].rgbRed = (BYTE)j; - } - - if(header_only) { - // header only mode - return dib; - } - - // unpack the RLE bitmap bits - - BYTE *bits = FreeImage_GetScanLine(dib, header.height - 1); - - unsigned i = 0, k = 0; - unsigned pitch = FreeImage_GetPitch(dib); - unsigned size = header.width * header.height; - BYTE count = 0, run = 0; - - while (i < size) { - if(io->read_proc(&count, 1, sizeof(BYTE), handle) != 1) { - throw FI_MSG_ERROR_PARSING; - } - - if (count == 0) { - k = 0; - bits -= pitch; - - // paint shop pro adds two useless bytes here... - - io->read_proc(&count, 1, sizeof(BYTE), handle); - io->read_proc(&count, 1, sizeof(BYTE), handle); - - continue; - } - - if (count & 0x80) { - count &= ~(0x80); - - if(io->read_proc(&run, 1, sizeof(BYTE), handle) != 1) { - throw FI_MSG_ERROR_PARSING; - } - - if(k + count <= header.width) { - memset(bits + k, run, count); - } else { - throw FI_MSG_ERROR_PARSING; - } - } else { - if(k + count <= header.width) { - if(io->read_proc(&bits[k], count, sizeof(BYTE), handle) != 1) { - throw FI_MSG_ERROR_PARSING; - } - } else { - throw FI_MSG_ERROR_PARSING; - } - } - - k += count; - i += count; - } - - return dib; - - } catch(const char* text) { - if(dib) { - FreeImage_Unload(dib); - } - FreeImage_OutputMessageProc(s_format_id, text); - return NULL; - } -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitCUT(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginDDS.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginDDS.cpp deleted file mode 100644 index b6e09fb..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginDDS.cpp +++ /dev/null @@ -1,919 +0,0 @@ -// ========================================================== -// DDS Loader -// -// Design and implementation by -// - Volker Grtner (volkerg@gmx.at) -// - Sherman Wilcox -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Definitions for the RGB 444 format -// ---------------------------------------------------------- -#define FI16_444_RED_MASK 0x0F00 -#define FI16_444_GREEN_MASK 0x00F0 -#define FI16_444_BLUE_MASK 0x000F -#define FI16_444_RED_SHIFT 8 -#define FI16_444_GREEN_SHIFT 4 -#define FI16_444_BLUE_SHIFT 0 - -// ---------------------------------------------------------- -// Definitions for RGB16 handling -// ---------------------------------------------------------- - -/** -The list of possible 16-bit formats -*/ -typedef enum { - RGB_UNKNOWN = -1, - RGB444 = 1, - RGB555 = 2, - RGB565 = 3 -} DDSFormat16; - -/** -Get the 16-bit format of an image -@param dwRBitMask Red mask -@param dwGBitMask Green mask -@param dwBBitMask Blue mask -@return Returns the 16-bit format or RGB_UNKNOWN -*/ -static inline DDSFormat16 -GetRGB16Format(DWORD dwRBitMask, DWORD dwGBitMask, DWORD dwBBitMask) { - if ((dwRBitMask == FI16_444_RED_MASK) && (dwGBitMask == FI16_444_GREEN_MASK) && (dwBBitMask == FI16_444_BLUE_MASK)) { - return RGB444; - } - if ((dwRBitMask == FI16_555_RED_MASK) && (dwGBitMask == FI16_555_GREEN_MASK) && (dwBBitMask == FI16_555_BLUE_MASK)) { - return RGB555; - } - if ((dwRBitMask == FI16_565_RED_MASK) && (dwGBitMask == FI16_565_GREEN_MASK) && (dwBBitMask == FI16_565_BLUE_MASK)) { - return RGB565; - } - - return RGB_UNKNOWN; -} - -/** -Convert a 16-bit RGB line to a 24-bit RGB line -@param target 24-bit Destination line -@param source 16-bit Source line -@param format 16-bit format -@param width_in_pixels Size of the line in pixels -*/ -static void -ConvertLine16To24(BYTE *target, const WORD *source, DDSFormat16 format, int width_in_pixels) { - - // convert from RGB 16-bit to RGB 24-bit - switch (format) { - case RGB444: - for (int cols = 0; cols < width_in_pixels; cols++) { - // extract source RGB444 pixel, set to 24-bit target - target[FI_RGBA_BLUE] = (BYTE)((((source[cols] & FI16_444_BLUE_MASK) >> FI16_444_BLUE_SHIFT) * 0xFF) / 0x0F); - target[FI_RGBA_GREEN] = (BYTE)((((source[cols] & FI16_444_GREEN_MASK) >> FI16_444_GREEN_SHIFT) * 0xFF) / 0x0F); - target[FI_RGBA_RED] = (BYTE)((((source[cols] & FI16_444_RED_MASK) >> FI16_444_RED_SHIFT) * 0xFF) / 0x0F); - target += 3; - } - break; - - case RGB555: - for (int cols = 0; cols < width_in_pixels; cols++) { - target[FI_RGBA_RED] = (BYTE)((((source[cols] & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) * 0xFF) / 0x1F); - target[FI_RGBA_GREEN] = (BYTE)((((source[cols] & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) * 0xFF) / 0x1F); - target[FI_RGBA_BLUE] = (BYTE)((((source[cols] & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) * 0xFF) / 0x1F); - target += 3; - } - break; - - case RGB565: - for (int cols = 0; cols < width_in_pixels; cols++) { - target[FI_RGBA_RED] = (BYTE)((((source[cols] & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT) * 0xFF) / 0x1F); - target[FI_RGBA_GREEN] = (BYTE)((((source[cols] & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT) * 0xFF) / 0x3F); - target[FI_RGBA_BLUE] = (BYTE)((((source[cols] & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT) * 0xFF) / 0x1F); - target += 3; - } - break; - - default: - break; - } -} - -// ---------------------------------------------------------- -// Definitions for the DDS format -// ---------------------------------------------------------- - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -/** -DDS_PIXELFORMAT structure -*/ -typedef struct tagDDPIXELFORMAT { - /** - Size of this structure (must be 32) - */ - DWORD dwSize; - /** - Values which indicate what type of data is in the surface, see DDPF_* - */ - DWORD dwFlags; - /** - Four-character codes for specifying compressed or custom formats. Possible values include: DXT1, DXT2, DXT3, DXT4, or DXT5. - A FourCC of DX10 indicates the prescense of the DDS_HEADER_DXT10 extended header, and the dxgiFormat member of that structure - indicates the true format. When using a four-character code, dwFlags must include DDPF_FOURCC. - */ - DWORD dwFourCC; - /** - Number of bits in an RGB (possibly including alpha) format. Valid when dwFlags includes DDPF_RGB, DDPF_LUMINANCE, or DDPF_YUV. - */ - DWORD dwRGBBitCount; //! Total number of bits for RGB formats - /** - Red (or luminance or Y) mask for reading color data. For instance, given the A8R8G8B8 format, the red mask would be 0x00ff0000. - */ - DWORD dwRBitMask; - /** - Green (or U) mask for reading color data. For instance, given the A8R8G8B8 format, the green mask would be 0x0000ff00. - */ - DWORD dwGBitMask; - /** - Blue (or V) mask for reading color data. For instance, given the A8R8G8B8 format, the blue mask would be 0x000000ff. - */ - DWORD dwBBitMask; - /** - Alpha mask for reading alpha data. dwFlags must include DDPF_ALPHAPIXELS or DDPF_ALPHA. - For instance, given the A8R8G8B8 format, the alpha mask would be 0xff000000. - */ - DWORD dwRGBAlphaBitMask; -} DDPIXELFORMAT; - -/** DIRECTDRAW PIXELFORMAT FLAGS */ -enum { - /** Texture contains alpha data; dwRGBAlphaBitMask contains valid data. */ - DDPF_ALPHAPIXELS = 0x1, - /** Used in some older DDS files for alpha channel only uncompressed data (dwRGBBitCount contains the alpha channel bitcount; dwABitMask contains valid data) */ - DDPF_ALPHA = 0x2, - /** Texture contains compressed RGB data; dwFourCC contains valid data. */ - DDPF_FOURCC = 0x4, - /** Texture contains uncompressed RGB data; dwRGBBitCount and the RGB masks (dwRBitMask, dwGBitMask, dwBBitMask) contain valid data. */ - DDPF_RGB = 0x40, - /** - Used in some older DDS files for YUV uncompressed data (dwRGBBitCount contains the YUV bit count; - dwRBitMask contains the Y mask, dwGBitMask contains the U mask, dwBBitMask contains the V mask) - */ - DDPF_YUV = 0x200, - /** - Used in some older DDS files for single channel color uncompressed data (dwRGBBitCount contains the luminance channel bit count; - dwRBitMask contains the channel mask). Can be combined with DDPF_ALPHAPIXELS for a two channel DDS file. - */ - DDPF_LUMINANCE = 0x20000 -}; - -typedef struct tagDDCAPS2 { - DWORD dwCaps1; //! zero or more of the DDSCAPS_* members - DWORD dwCaps2; //! zero or more of the DDSCAPS2_* members - DWORD dwReserved[2]; -} DDCAPS2; - -/** -DIRECTDRAWSURFACE CAPABILITY FLAGS -*/ -enum { - /** Alpha only surface */ - DDSCAPS_ALPHA = 0x00000002, - /** - Optional; must be used on any file that contains more than one surface - (a mipmap, a cubic environment map, or mipmapped volume texture). - */ - DDSCAPS_COMPLEX = 0x8, - /** Used as texture (should always be set) */ - DDSCAPS_TEXTURE = 0x1000, - /** - Optional; should be used for a mipmap. - */ - DDSCAPS_MIPMAP = 0x400000 -}; - -/** -Additional detail about the surfaces stored. -*/ -enum { - DDSCAPS2_CUBEMAP = 0x200, //! Required for a cube map. - DDSCAPS2_CUBEMAP_POSITIVEX = 0x400, //! Required when these surfaces are stored in a cube map. - DDSCAPS2_CUBEMAP_NEGATIVEX = 0x800, //! Required when these surfaces are stored in a cube map. - DDSCAPS2_CUBEMAP_POSITIVEY = 0x1000, //! Required when these surfaces are stored in a cube map. - DDSCAPS2_CUBEMAP_NEGATIVEY = 0x2000, //! Required when these surfaces are stored in a cube map. - DDSCAPS2_CUBEMAP_POSITIVEZ = 0x4000, //! Required when these surfaces are stored in a cube map. - DDSCAPS2_CUBEMAP_NEGATIVEZ = 0x8000, //! Required when these surfaces are stored in a cube map. - DDSCAPS2_VOLUME = 0x200000 //! Required for a volume texture. -}; - -/** -DDS_HEADER structure -*/ -typedef struct tagDDSURFACEDESC2 { - /** Size of structure. This member must be set to 124 */ - DWORD dwSize; - /** Combination of the DDSD_* flags */ - DWORD dwFlags; - /** Surface height (in pixels) */ - DWORD dwHeight; - /** Surface width (in pixels) */ - DWORD dwWidth; - /** - The pitch or number of bytes per scan line in an uncompressed texture; - the total number of bytes in the top level texture for a compressed texture. - For information about how to compute the pitch, see the DDS File Layout section of the Programming Guide for DDS. - */ - DWORD dwPitchOrLinearSize; - /** Depth of a volume texture (in pixels), otherwise unused */ - DWORD dwDepth; - /** Number of mipmap levels, otherwise unused */ - DWORD dwMipMapCount; - /** Unused */ - DWORD dwReserved1[11]; - /** The pixel format(see DDS_PIXELFORMAT). */ - DDPIXELFORMAT ddspf; - /** Specifies the complexity of the surfaces stored. */ - DDCAPS2 ddsCaps; - DWORD dwReserved2; -} DDSURFACEDESC2; - -/** -Flags to indicate which members contain valid data. -*/ -enum { - DDSD_CAPS = 0x1, //! Required in every .dds file - DDSD_HEIGHT = 0x2, //! Required in every .dds file - DDSD_WIDTH = 0x4, //! Required in every .dds file - DDSD_PITCH = 0x8, //! Required when pitch is provided for an uncompressed texture - DDSD_ALPHABITDEPTH = 0x80, //! unknown use - DDSD_PIXELFORMAT = 0x1000, //! Required in every .dds file - DDSD_MIPMAPCOUNT = 0x20000, //! Required in a mipmapped texture - DDSD_LINEARSIZE = 0x80000, //! Required when pitch is provided for a compressed texture - DDSD_DEPTH = 0x800000 //! Required in a depth texture -}; - -typedef struct tagDDSHEADER { - DWORD dwMagic; //! FOURCC: "DDS " - DDSURFACEDESC2 surfaceDesc; -} DDSHEADER; - -#define MAKEFOURCC(ch0, ch1, ch2, ch3) \ - ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ - ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )) - -#define FOURCC_DXT1 MAKEFOURCC('D','X','T','1') -#define FOURCC_DXT2 MAKEFOURCC('D','X','T','2') -#define FOURCC_DXT3 MAKEFOURCC('D','X','T','3') -#define FOURCC_DXT4 MAKEFOURCC('D','X','T','4') -#define FOURCC_DXT5 MAKEFOURCC('D','X','T','5') - -// ---------------------------------------------------------- -// Structures used by DXT textures -// ---------------------------------------------------------- - -typedef struct tagColor8888 { - BYTE b; - BYTE g; - BYTE r; - BYTE a; -} Color8888; - -typedef struct tagColor565 { - WORD b : 5; - WORD g : 6; - WORD r : 5; -} Color565; - -typedef struct tagDXTColBlock { - Color565 colors[2]; - BYTE row[4]; -} DXTColBlock; - -typedef struct tagDXTAlphaBlockExplicit { - WORD row[4]; -} DXTAlphaBlockExplicit; - -typedef struct tagDXTAlphaBlock3BitLinear { - BYTE alpha[2]; - BYTE data[6]; -} DXTAlphaBlock3BitLinear; - -typedef struct tagDXT1Block { - DXTColBlock color; -} DXT1Block; - -typedef struct tagDXT3Block { // also used by dxt2 - DXTAlphaBlockExplicit alpha; - DXTColBlock color; -} DXT3Block; - -typedef struct tagDXT5Block { // also used by dxt4 - DXTAlphaBlock3BitLinear alpha; - DXTColBlock color; -} DXT5Block; - -#ifdef _WIN32 -# pragma pack(pop) -#else -# pragma pack() -#endif - -// ---------------------------------------------------------- -// Internal functions -// ---------------------------------------------------------- -#ifdef FREEIMAGE_BIGENDIAN -static void -SwapHeader(DDSHEADER *header) { - SwapLong(&header->dwMagic); - SwapLong(&header->surfaceDesc.dwSize); - SwapLong(&header->surfaceDesc.dwFlags); - SwapLong(&header->surfaceDesc.dwHeight); - SwapLong(&header->surfaceDesc.dwWidth); - SwapLong(&header->surfaceDesc.dwPitchOrLinearSize); - SwapLong(&header->surfaceDesc.dwDepth); - SwapLong(&header->surfaceDesc.dwMipMapCount); - for(int i=0; i<11; i++) { - SwapLong(&header->surfaceDesc.dwReserved1[i]); - } - SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwSize); - SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwFlags); - SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwFourCC); - SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRGBBitCount); - SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRBitMask); - SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwGBitMask); - SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwBBitMask); - SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRGBAlphaBitMask); - SwapLong(&header->surfaceDesc.ddsCaps.dwCaps1); - SwapLong(&header->surfaceDesc.ddsCaps.dwCaps2); - SwapLong(&header->surfaceDesc.ddsCaps.dwReserved[0]); - SwapLong(&header->surfaceDesc.ddsCaps.dwReserved[1]); - SwapLong(&header->surfaceDesc.dwReserved2); -} -#endif - -// ========================================================== - -/** -Get the 4 possible colors for a block -*/ -static void -GetBlockColors(const DXTColBlock *block, Color8888 colors[4], bool isDXT1) { - - // expand from 565 to 888 - for (int i = 0; i < 2; i++) { - colors[i].a = 0xFF; - /* - colors[i].r = (BYTE)(unsigned(block->colors[i].r) * 0xFF / 0x1F); - colors[i].g = (BYTE)(unsigned(block->colors[i].g) * 0xFF / 0x3F); - colors[i].b = (BYTE)(unsigned(block->colors[i].b) * 0xFF / 0x1F); - */ - colors[i].r = (BYTE)((unsigned(block->colors[i].r) << 3U) | (unsigned(block->colors[i].r) >> 2U)); - colors[i].g = (BYTE)((unsigned(block->colors[i].g) << 2U) | (unsigned(block->colors[i].g) >> 4U)); - colors[i].b = (BYTE)((unsigned(block->colors[i].b) << 3U) | (unsigned(block->colors[i].b) >> 2U)); - } - - const WORD *wCol = (WORD *)block->colors; - if ((wCol[0] > wCol[1]) || !isDXT1) { - // 4 color block - for (unsigned i = 0; i < 2; i++) { - colors[i + 2].a = 0xFF; - colors[i + 2].r = (BYTE)((unsigned(colors[0].r) * (2 - i) + unsigned(colors[1].r) * (1 + i)) / 3); - colors[i + 2].g = (BYTE)((unsigned(colors[0].g) * (2 - i) + unsigned(colors[1].g) * (1 + i)) / 3); - colors[i + 2].b = (BYTE)((unsigned(colors[0].b) * (2 - i) + unsigned(colors[1].b) * (1 + i)) / 3); - } - } - else { - // 3 color block, number 4 is transparent - colors[2].a = 0xFF; - colors[2].r = (BYTE)((unsigned(colors[0].r) + unsigned(colors[1].r)) / 2); - colors[2].g = (BYTE)((unsigned(colors[0].g) + unsigned(colors[1].g)) / 2); - colors[2].b = (BYTE)((unsigned(colors[0].b) + unsigned(colors[1].b)) / 2); - - colors[3].a = 0x00; - colors[3].g = 0x00; - colors[3].b = 0x00; - colors[3].r = 0x00; - } -} - -typedef struct DXT_INFO_1 { - typedef DXT1Block Block; - enum { - isDXT1 = 1, - bytesPerBlock = 8 - }; -} DXT_INFO_1; - -typedef struct DXT_INFO_3 { - typedef DXT3Block Block; - enum { - isDXT1 = 1, - bytesPerBlock = 16 - }; -} DXT_INFO_3; - -typedef struct DXT_INFO_5 { - typedef DXT5Block Block; - enum { - isDXT1 = 1, - bytesPerBlock = 16 - }; -} DXT_INFO_5; - -/** -Base decoder -*/ -template class DXT_BLOCKDECODER_BASE { -protected: - Color8888 m_colors[4]; - const typename DXT_INFO::Block *m_pBlock; - unsigned m_colorRow; - -public: - void Setup(const BYTE *pBlock) { - // get a pointer to the block - m_pBlock = (const typename DXT_INFO::Block *)pBlock; - - // get the 4 possible colors for a block - GetBlockColors(&m_pBlock->color, m_colors, DXT_INFO::isDXT1); - } - - /** - Update y scanline - */ - void SetY(const int y) { - m_colorRow = m_pBlock->color.row[y]; - } - - /** - Get Color at (x, y) where y is set by SetY - @see SetY - */ - void GetColor(const int x, Color8888 *color) { - unsigned bits = (m_colorRow >> (x * 2)) & 3; - memcpy(color, &m_colors[bits], sizeof(Color8888)); - } - -}; - -class DXT_BLOCKDECODER_1 : public DXT_BLOCKDECODER_BASE { -public: - typedef DXT_INFO_1 INFO; -}; - -class DXT_BLOCKDECODER_3 : public DXT_BLOCKDECODER_BASE { -public: - typedef DXT_BLOCKDECODER_BASE base; - typedef DXT_INFO_3 INFO; - -protected: - unsigned m_alphaRow; - -public: - void SetY(int y) { - base::SetY(y); - m_alphaRow = m_pBlock->alpha.row[y]; - } - - /** - Get the color at (x, y) where y is set by SetY - @see SetY - */ - void GetColor(int x, Color8888 *color) { - base::GetColor(x, color); - const unsigned bits = (m_alphaRow >> (x * 4)) & 0xF; - color->a = (BYTE)((bits * 0xFF) / 0xF); - } -}; - -class DXT_BLOCKDECODER_5 : public DXT_BLOCKDECODER_BASE { -public: - typedef DXT_BLOCKDECODER_BASE base; - typedef DXT_INFO_5 INFO; - -protected: - unsigned m_alphas[8]; - unsigned m_alphaBits; - int m_offset; - -public: - void Setup (const BYTE *pBlock) { - base::Setup (pBlock); - - const DXTAlphaBlock3BitLinear &block = m_pBlock->alpha; - m_alphas[0] = block.alpha[0]; - m_alphas[1] = block.alpha[1]; - if (m_alphas[0] > m_alphas[1]) { - // 8 alpha block - for (int i = 0; i < 6; i++) { - m_alphas[i + 2] = ((6 - i) * m_alphas[0] + (1 + i) * m_alphas[1] + 3) / 7; - } - } - else { - // 6 alpha block - for (int i = 0; i < 4; i++) { - m_alphas[i + 2] = ((4 - i) * m_alphas[0] + (1 + i) * m_alphas[1] + 2) / 5; - } - m_alphas[6] = 0; - m_alphas[7] = 0xFF; - } - } - - void SetY(const int y) { - base::SetY(y); - const int i = y / 2; - const DXTAlphaBlock3BitLinear &block = m_pBlock->alpha; - const BYTE *data = &block.data[i * 3]; - m_alphaBits = unsigned(data[0]) | (unsigned(data[1]) << 8) | (unsigned(data[2]) << 16); - m_offset = (y & 1) * 12; - } - - /** - Get the color at (x, y) where y is set by SetY - @see SetY - */ - void GetColor(int x, Color8888 *color) { - base::GetColor(x, color); - unsigned bits = (m_alphaBits >> (x * 3 + m_offset)) & 7; - color->a = (BYTE)m_alphas[bits]; - } -}; - -template void DecodeDXTBlock (BYTE *dstData, const BYTE *srcBlock, long dstPitch, int bw, int bh) { - DECODER decoder; - decoder.Setup(srcBlock); - for (int y = 0; y < bh; y++) { - BYTE *dst = dstData - y * dstPitch; - // update scanline - decoder.SetY(y); - for (int x = 0; x < bw; x++) { - // GetColor(x, y, dst) - Color8888 *color = (Color8888*)dst; - decoder.GetColor(x, color); - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - INPLACESWAP(dst[FI_RGBA_RED], dst[FI_RGBA_BLUE]); -#endif - dst += 4; - } - } -} - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Internal functions -// ========================================================== - -/** -@param desc DDS_HEADER structure -@param io FreeImage IO -@param handle FreeImage handle -*/ -static FIBITMAP * -LoadRGB(const DDSURFACEDESC2 *desc, FreeImageIO *io, fi_handle handle) { - FIBITMAP *dib = NULL; - DDSFormat16 format16 = RGB_UNKNOWN; // for 16-bit formats - - const DDPIXELFORMAT *ddspf = &(desc->ddspf); - - // it is perfectly valid for an uncompressed DDS file to have a width or height which is not a multiple of 4 - // (only the packed image formats need to be a multiple of 4) - const int width = (int)desc->dwWidth; - const int height = (int)desc->dwHeight; - - // check the bitdepth, then allocate a new dib - const int bpp = (int)ddspf->dwRGBBitCount; - if (bpp == 16) { - // get the 16-bit format - format16 = GetRGB16Format(ddspf->dwRBitMask, ddspf->dwGBitMask, ddspf->dwBBitMask); - // allocate a 24-bit dib, conversion from 16- to 24-bit will be done later - dib = FreeImage_Allocate(width, height, 24); - } - else { - dib = FreeImage_Allocate(width, height, bpp, ddspf->dwRBitMask, ddspf->dwGBitMask, ddspf->dwBBitMask); - } - if (dib == NULL) { - return NULL; - } - - // read the file - // ------------------------------------------------------------------------- - - const int line = CalculateLine(width, bpp); - const int filePitch = ((desc->dwFlags & DDSD_PITCH) == DDSD_PITCH) ? (int)desc->dwPitchOrLinearSize : line; - const long delta = (long)filePitch - (long)line; - - if (bpp == 16) { - BYTE *pixels = (BYTE*)malloc(line * sizeof(BYTE)); - if (pixels) { - for (int y = 0; y < height; y++) { - BYTE *dst_bits = FreeImage_GetScanLine(dib, height - y - 1); - // get the 16-bit RGB pixels - io->read_proc(pixels, 1, line, handle); - io->seek_proc(handle, delta, SEEK_CUR); - // convert to 24-bit - ConvertLine16To24(dst_bits, (const WORD*)pixels, format16, width); - } - } - free(pixels); - } - else { - for (int y = 0; y < height; y++) { - BYTE *pixels = FreeImage_GetScanLine(dib, height - y - 1); - io->read_proc(pixels, 1, line, handle); - io->seek_proc(handle, delta, SEEK_CUR); - } - } - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - // Calculate the number of bytes per pixel (3 for 24-bit or 4 for 32-bit) - const int bytespp = FreeImage_GetLine(dib) / width; - - for (int y = 0; y < height; y++) { - BYTE *pixels = FreeImage_GetScanLine(dib, y); - for (int x = 0; x < width; x++) { - INPLACESWAP(pixels[FI_RGBA_RED], pixels[FI_RGBA_BLUE]); - pixels += bytespp; - } - } -#endif - - // enable transparency - BOOL bIsTransparent = (bpp != 16) && ((ddspf->dwFlags & DDPF_ALPHAPIXELS) == DDPF_ALPHAPIXELS) ? TRUE : FALSE; - FreeImage_SetTransparent(dib, bIsTransparent); - - if (!bIsTransparent && bpp == 32) { - // no transparency: convert to 24-bit - FIBITMAP *old = dib; - dib = FreeImage_ConvertTo24Bits(old); - FreeImage_Unload(old); - } - - return dib; -} - -/** -@param io FreeImage IO -@param handle FreeImage handle -@param dib Returned dib (already allocated) -@param width Image width -@param height Image height -*/ -template static void -LoadDXT_Helper(FreeImageIO *io, fi_handle handle, FIBITMAP *dib, int width, int height) { - typedef typename DECODER::INFO INFO; - typedef typename INFO::Block Block; - - // get the size of a line in bytes - int line = CalculateLine(width, FreeImage_GetBPP(dib)); - - Block *input_buffer = new(std::nothrow) Block[(width + 3) / 4]; - if (!input_buffer) { - return; - } - - const int widthRest = (int) width & 3; - const int heightRest = (int) height & 3; - const int inputLine = (width + 3) / 4; - int y = 0; - - if (height >= 4) { - for (; y < height; y += 4) { - io->read_proc (input_buffer, sizeof(typename INFO::Block), inputLine, handle); - // TODO: probably need some endian work here - const BYTE *pbSrc = (BYTE *)input_buffer; - BYTE *pbDst = FreeImage_GetScanLine (dib, height - y - 1); - - if (width >= 4) { - for (int x = 0; x < width; x += 4) { - DecodeDXTBlock(pbDst, pbSrc, line, 4, 4); - pbSrc += INFO::bytesPerBlock; - pbDst += 16; // 4 * 4; - } - } - if (widthRest) { - DecodeDXTBlock(pbDst, pbSrc, line, widthRest, 4); - } - } - } - if (heightRest) { - io->read_proc (input_buffer, sizeof (typename INFO::Block), inputLine, handle); - // TODO: probably need some endian work here - const BYTE *pbSrc = (BYTE *)input_buffer; - BYTE *pbDst = FreeImage_GetScanLine (dib, height - y - 1); - - if (width >= 4) { - for (int x = 0; x < width; x += 4) { - DecodeDXTBlock(pbDst, pbSrc, line, 4, heightRest); - pbSrc += INFO::bytesPerBlock; - pbDst += 16; // 4 * 4; - } - } - if (widthRest) { - DecodeDXTBlock(pbDst, pbSrc, line, widthRest, heightRest); - } - - } - - delete [] input_buffer; -} - -/** -@param decoder_type Decoder to be used, either 1 (DXT1), 3 (DXT3) or 5 (DXT5) -@param desc DDS_HEADER structure -@param io FreeImage IO -@param handle FreeImage handle -*/ -static FIBITMAP * -LoadDXT(int decoder_type, const DDSURFACEDESC2 *desc, FreeImageIO *io, fi_handle handle) { - // get image size, rounded to 32-bit - int width = (int)desc->dwWidth & ~3; - int height = (int)desc->dwHeight & ~3; - - // allocate a 32-bit dib - FIBITMAP *dib = FreeImage_Allocate(width, height, 32, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if (dib == NULL) { - return NULL; - } - - // select the right decoder, then decode the image - switch (decoder_type) { - case 1: - LoadDXT_Helper(io, handle, dib, width, height); - break; - case 3: - LoadDXT_Helper(io, handle, dib, width, height); - break; - case 5: - LoadDXT_Helper(io, handle, dib, width, height); - break; - default: - break; - } - - return dib; -} -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "DDS"; -} - -static const char * DLL_CALLCONV -Description() { - return "DirectX Surface"; -} - -static const char * DLL_CALLCONV -Extension() { - return "dds"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-dds"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - DDSHEADER header; - memset(&header, 0, sizeof(header)); - io->read_proc(&header, 1, sizeof(header), handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapHeader(&header); -#endif - if (header.dwMagic != MAKEFOURCC('D', 'D', 'S', ' ')) { - return FALSE; - } - if (header.surfaceDesc.dwSize != sizeof(header.surfaceDesc) || header.surfaceDesc.ddspf.dwSize != sizeof(header.surfaceDesc.ddspf)) { - return FALSE; - } - return TRUE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -// ---------------------------------------------------------- - -static void * DLL_CALLCONV -Open(FreeImageIO *io, fi_handle handle, BOOL read) { - return NULL; -} - -static void DLL_CALLCONV -Close(FreeImageIO *io, fi_handle handle, void *data) { -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - DDSHEADER header; - FIBITMAP *dib = NULL; - - memset(&header, 0, sizeof(header)); - io->read_proc(&header, 1, sizeof(header), handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapHeader(&header); -#endif - - // values which indicate what type of data is in the surface, see DDPF_* - const DWORD dwFlags = header.surfaceDesc.ddspf.dwFlags; - - const DDSURFACEDESC2 *surfaceDesc = &(header.surfaceDesc); - - if ((dwFlags & DDPF_RGB) == DDPF_RGB) { - // uncompressed data - dib = LoadRGB(surfaceDesc, io, handle); - } - else if ((dwFlags & DDPF_FOURCC) == DDPF_FOURCC) { - // compressed data - switch (surfaceDesc->ddspf.dwFourCC) { - case FOURCC_DXT1: - dib = LoadDXT(1, surfaceDesc, io, handle); - break; - case FOURCC_DXT3: - dib = LoadDXT(3, surfaceDesc, io, handle); - break; - case FOURCC_DXT5: - dib = LoadDXT(5, surfaceDesc, io, handle); - break; - } - } - - return dib; -} - -/* -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - return FALSE; -} -*/ - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitDDS(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = Open; - plugin->close_proc = Close; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; //Save; // not implemented (yet?) - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginEXR.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginEXR.cpp deleted file mode 100644 index b286430..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginEXR.cpp +++ /dev/null @@ -1,773 +0,0 @@ -// ========================================================== -// EXR Loader and writer -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -#ifdef _MSC_VER -// OpenEXR has many problems with MSVC warnings (why not just correct them ?), just ignore one of them -#pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning) -#endif - -#include "../OpenEXR/IlmImf/ImfIO.h" -#include "../OpenEXR/Iex/Iex.h" -#include "../OpenEXR/IlmImf/ImfOutputFile.h" -#include "../OpenEXR/IlmImf/ImfInputFile.h" -#include "../OpenEXR/IlmImf/ImfRgbaFile.h" -#include "../OpenEXR/IlmImf/ImfChannelList.h" -#include "../OpenEXR/IlmImf/ImfRgba.h" -#include "../OpenEXR/IlmImf/ImfArray.h" -#include "../OpenEXR/IlmImf/ImfPreviewImage.h" -#include "../OpenEXR/Half/half.h" - - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ---------------------------------------------------------- - -/** -FreeImage input stream wrapper -@see Imf_2_2::IStream -*/ -class C_IStream : public Imf::IStream { -private: - FreeImageIO *_io; - fi_handle _handle; - -public: - C_IStream (FreeImageIO *io, fi_handle handle) : - Imf::IStream(""), _io (io), _handle(handle) { - } - - virtual bool read (char c[/*n*/], int n) { - return ((unsigned)n != _io->read_proc(c, 1, n, _handle)); - } - - virtual Imath::Int64 tellg() { - return _io->tell_proc(_handle); - } - - virtual void seekg(Imath::Int64 pos) { - _io->seek_proc(_handle, (unsigned)pos, SEEK_SET); - } - - virtual void clear() { - } -}; - -// ---------------------------------------------------------- - -/** -FreeImage output stream wrapper -@see Imf_2_2::OStream -*/ -class C_OStream : public Imf::OStream { -private: - FreeImageIO *_io; - fi_handle _handle; - -public: - C_OStream (FreeImageIO *io, fi_handle handle) : - Imf::OStream(""), _io (io), _handle(handle) { - } - - virtual void write(const char c[/*n*/], int n) { - if((unsigned)n != _io->write_proc((void*)&c[0], 1, n, _handle)) { - Iex::throwErrnoExc(); - } - } - - virtual Imath::Int64 tellp() { - return _io->tell_proc(_handle); - } - - virtual void seekp(Imath::Int64 pos) { - _io->seek_proc(_handle, (unsigned)pos, SEEK_SET); - } -}; - -// ---------------------------------------------------------- - - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "EXR"; -} - -static const char * DLL_CALLCONV -Description() { - return "ILM OpenEXR"; -} - -static const char * DLL_CALLCONV -Extension() { - return "exr"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-exr"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE exr_signature[] = { 0x76, 0x2F, 0x31, 0x01 }; - BYTE signature[] = { 0, 0, 0, 0 }; - - io->read_proc(signature, 1, 4, handle); - return (memcmp(exr_signature, signature, 4) == 0); -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return ( - (type == FIT_FLOAT) || - (type == FIT_RGBF) || - (type == FIT_RGBAF) - ); -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// -------------------------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - bool bUseRgbaInterface = false; - FIBITMAP *dib = NULL; - - if(!handle) { - return NULL; - } - - try { - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - // save the stream starting point - const long stream_start = io->tell_proc(handle); - - // wrap the FreeImage IO stream - C_IStream istream(io, handle); - - // open the file - Imf::InputFile file(istream); - - // get file info - const Imath::Box2i &dataWindow = file.header().dataWindow(); - int width = dataWindow.max.x - dataWindow.min.x + 1; - int height = dataWindow.max.y - dataWindow.min.y + 1; - - //const Imf::Compression &compression = file.header().compression(); - - const Imf::ChannelList &channels = file.header().channels(); - - // check the number of components and check for a coherent format - - std::string exr_color_model; - Imf::PixelType pixel_type = Imf::HALF; - FREE_IMAGE_TYPE image_type = FIT_UNKNOWN; - int components = 0; - bool bMixedComponents = false; - - for (Imf::ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i) { - components++; - if(components == 1) { - exr_color_model += i.name(); - pixel_type = i.channel().type; - } else { - exr_color_model += "/"; - exr_color_model += i.name(); - if (i.channel().type != pixel_type) { - bMixedComponents = true; - } - } - } - - if(bMixedComponents) { - bool bHandled = false; - // we may have a RGBZ or RGBAZ image ... - if(components > 4) { - if(channels.findChannel("R") && channels.findChannel("G") && channels.findChannel("B") && channels.findChannel("A")) { - std::string msg = "Warning: converting color model " + exr_color_model + " to RGBA color model"; - FreeImage_OutputMessageProc(s_format_id, msg.c_str()); - bHandled = true; - } - } - else if(components > 3) { - if(channels.findChannel("R") && channels.findChannel("G") && channels.findChannel("B")) { - std::string msg = "Warning: converting color model " + exr_color_model + " to RGB color model"; - FreeImage_OutputMessageProc(s_format_id, msg.c_str()); - bHandled = true; - } - } - if(!bHandled) { - THROW (Iex::InputExc, "Unable to handle mixed component types (color model = " << exr_color_model << ")"); - } - } - - switch(pixel_type) { - case Imf::UINT: - THROW (Iex::InputExc, "Unsupported format: UINT"); - break; - case Imf::HALF: - case Imf::FLOAT: - default: - break; - } - - // check for supported image color models - // -------------------------------------------------------------- - - if((components == 1) || (components == 2)) { - // if the image is gray-alpha (YA), ignore the alpha channel - if((components == 1) && channels.findChannel("Y")) { - image_type = FIT_FLOAT; - components = 1; - } else { - std::string msg = "Warning: loading color model " + exr_color_model + " as Y color model"; - FreeImage_OutputMessageProc(s_format_id, msg.c_str()); - image_type = FIT_FLOAT; - // ignore the other channel - components = 1; - } - } else if(components == 3) { - if(channels.findChannel("R") && channels.findChannel("G") && channels.findChannel("B")) { - image_type = FIT_RGBF; - } - else if(channels.findChannel("BY") && channels.findChannel("RY") && channels.findChannel("Y")) { - image_type = FIT_RGBF; - bUseRgbaInterface = true; - } - } else if(components >= 4) { - if(channels.findChannel("R") && channels.findChannel("G") && channels.findChannel("B")) { - if(channels.findChannel("A")) { - if(components > 4) { - std::string msg = "Warning: converting color model " + exr_color_model + " to RGBA color model"; - FreeImage_OutputMessageProc(s_format_id, msg.c_str()); - } - image_type = FIT_RGBAF; - // ignore other layers if there is more than one alpha layer - components = 4; - } else { - std::string msg = "Warning: converting color model " + exr_color_model + " to RGB color model"; - FreeImage_OutputMessageProc(s_format_id, msg.c_str()); - - image_type = FIT_RGBF; - // ignore other channels - components = 3; - } - } - } - - if(image_type == FIT_UNKNOWN) { - THROW (Iex::InputExc, "Unsupported color model: " << exr_color_model); - } - - // allocate a new dib - dib = FreeImage_AllocateHeaderT(header_only, image_type, width, height, 0); - if(!dib) THROW (Iex::NullExc, FI_MSG_ERROR_MEMORY); - - // try to load the preview image - // -------------------------------------------------------------- - - if(file.header().hasPreviewImage()) { - const Imf::PreviewImage& preview = file.header().previewImage(); - const unsigned thWidth = preview.width(); - const unsigned thHeight = preview.height(); - - FIBITMAP* thumbnail = FreeImage_Allocate(thWidth, thHeight, 32); - if(thumbnail) { - const Imf::PreviewRgba *src_line = preview.pixels(); - BYTE *dst_line = FreeImage_GetScanLine(thumbnail, thHeight - 1); - const unsigned dstPitch = FreeImage_GetPitch(thumbnail); - - for (unsigned y = 0; y < thHeight; ++y) { - const Imf::PreviewRgba *src_pixel = src_line; - RGBQUAD* dst_pixel = (RGBQUAD*)dst_line; - - for(unsigned x = 0; x < thWidth; ++x) { - dst_pixel->rgbRed = src_pixel->r; - dst_pixel->rgbGreen = src_pixel->g; - dst_pixel->rgbBlue = src_pixel->b; - dst_pixel->rgbReserved = src_pixel->a; - src_pixel++; - dst_pixel++; - } - src_line += thWidth; - dst_line -= dstPitch; - } - FreeImage_SetThumbnail(dib, thumbnail); - FreeImage_Unload(thumbnail); - } - } - - if(header_only) { - // header only mode - return dib; - } - - // load pixels - // -------------------------------------------------------------- - - const BYTE *bits = FreeImage_GetBits(dib); // pointer to our pixel buffer - const size_t bytespp = sizeof(float) * components; // size of our pixel in bytes - const unsigned pitch = FreeImage_GetPitch(dib); // size of our yStride in bytes - - Imf::PixelType pixelType = Imf::FLOAT; // load as float data type; - - if(bUseRgbaInterface) { - // use the RGBA interface (used when loading RY BY Y images ) - - const int chunk_size = 16; - - BYTE *scanline = (BYTE*)bits; - - // re-open using the RGBA interface - io->seek_proc(handle, stream_start, SEEK_SET); - Imf::RgbaInputFile rgbaFile(istream); - - // read the file in chunks - Imath::Box2i dw = dataWindow; - Imf::Array2D chunk(chunk_size, width); - while (dw.min.y <= dw.max.y) { - // read a chunk - rgbaFile.setFrameBuffer (&chunk[0][0] - dw.min.x - dw.min.y * width, 1, width); - rgbaFile.readPixels (dw.min.y, MIN(dw.min.y + chunk_size - 1, dw.max.y)); - // fill the dib - const int y_max = ((dw.max.y - dw.min.y) <= chunk_size) ? (dw.max.y - dw.min.y) : chunk_size; - for(int y = 0; y < y_max; y++) { - FIRGBF *pixel = (FIRGBF*)scanline; - const Imf::Rgba *half_rgba = chunk[y]; - for(int x = 0; x < width; x++) { - // convert from half to float - pixel[x].red = half_rgba[x].r; - pixel[x].green = half_rgba[x].g; - pixel[x].blue = half_rgba[x].b; - } - // next line - scanline += pitch; - } - // next chunk - dw.min.y += chunk_size; - } - - } else { - // use the low level interface - - // build a frame buffer (i.e. what we want on output) - Imf::FrameBuffer frameBuffer; - - // allow dataWindow with minimal bounds different form zero - size_t offset = - dataWindow.min.x * bytespp - dataWindow.min.y * pitch; - - if(components == 1) { - frameBuffer.insert ("Y", // name - Imf::Slice (pixelType, // type - (char*)(bits + offset), // base - bytespp, // xStride - pitch, // yStride - 1, 1, // x/y sampling - 0.0)); // fillValue - } else if((components == 3) || (components == 4)) { - const char *channel_name[4] = { "R", "G", "B", "A" }; - - for(int c = 0; c < components; c++) { - frameBuffer.insert ( - channel_name[c], // name - Imf::Slice (pixelType, // type - (char*)(bits + c * sizeof(float) + offset), // base - bytespp, // xStride - pitch, // yStride - 1, 1, // x/y sampling - 0.0)); // fillValue - } - } - - // read the file - file.setFrameBuffer(frameBuffer); - file.readPixels(dataWindow.min.y, dataWindow.max.y); - } - - // lastly, flip dib lines - FreeImage_FlipVertical(dib); - - } - catch(Iex::BaseExc & e) { - if(dib != NULL) { - FreeImage_Unload(dib); - } - FreeImage_OutputMessageProc(s_format_id, e.what()); - return NULL; - } - - return dib; -} - -/** -Set the preview image using the dib embedded thumbnail -*/ -static BOOL -SetPreviewImage(FIBITMAP *dib, Imf::Header& header) { - if(!FreeImage_GetThumbnail(dib)) { - return FALSE; - } - FIBITMAP* thumbnail = FreeImage_GetThumbnail(dib); - - if((FreeImage_GetImageType(thumbnail) != FIT_BITMAP) || (FreeImage_GetBPP(thumbnail) != 32)) { - // invalid thumbnail - ignore it - FreeImage_OutputMessageProc(s_format_id, FI_MSG_WARNING_INVALID_THUMBNAIL); - } else { - const unsigned thWidth = FreeImage_GetWidth(thumbnail); - const unsigned thHeight = FreeImage_GetHeight(thumbnail); - - Imf::PreviewImage preview(thWidth, thHeight); - - // copy thumbnail to 32-bit RGBA preview image - - const BYTE* src_line = FreeImage_GetScanLine(thumbnail, thHeight - 1); - Imf::PreviewRgba* dst_line = preview.pixels(); - const unsigned srcPitch = FreeImage_GetPitch(thumbnail); - - for (unsigned y = 0; y < thHeight; y++) { - const RGBQUAD* src_pixel = (RGBQUAD*)src_line; - Imf::PreviewRgba* dst_pixel = dst_line; - - for(unsigned x = 0; x < thWidth; x++) { - dst_pixel->r = src_pixel->rgbRed; - dst_pixel->g = src_pixel->rgbGreen; - dst_pixel->b = src_pixel->rgbBlue; - dst_pixel->a = src_pixel->rgbReserved; - - src_pixel++; - dst_pixel++; - } - - src_line -= srcPitch; - dst_line += thWidth; - } - - header.setPreviewImage(preview); - } - - return TRUE; -} - -/** -Save using EXR_LC compression (works only with RGB[A]F images) -*/ -static BOOL -SaveAsEXR_LC(C_OStream& ostream, FIBITMAP *dib, Imf::Header& header, int width, int height) { - int x, y; - Imf::RgbaChannels rgbaChannels; - - try { - - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - - // convert from float to half - Imf::Array2D pixels(height, width); - switch(image_type) { - case FIT_RGBF: - rgbaChannels = Imf::WRITE_YC; - for(y = 0; y < height; y++) { - FIRGBF *src_bits = (FIRGBF*)FreeImage_GetScanLine(dib, height - 1 - y); - for(x = 0; x < width; x++) { - Imf::Rgba &dst_bits = pixels[y][x]; - dst_bits.r = src_bits[x].red; - dst_bits.g = src_bits[x].green; - dst_bits.b = src_bits[x].blue; - } - } - break; - case FIT_RGBAF: - rgbaChannels = Imf::WRITE_YCA; - for(y = 0; y < height; y++) { - FIRGBAF *src_bits = (FIRGBAF*)FreeImage_GetScanLine(dib, height - 1 - y); - for(x = 0; x < width; x++) { - Imf::Rgba &dst_bits = pixels[y][x]; - dst_bits.r = src_bits[x].red; - dst_bits.g = src_bits[x].green; - dst_bits.b = src_bits[x].blue; - dst_bits.a = src_bits[x].alpha; - } - } - break; - default: - THROW (Iex::IoExc, "Bad image type"); - break; - } - - // write the data - Imf::RgbaOutputFile file(ostream, header, rgbaChannels); - file.setFrameBuffer (&pixels[0][0], 1, width); - file.writePixels (height); - - return TRUE; - - } catch(Iex::BaseExc & e) { - FreeImage_OutputMessageProc(s_format_id, e.what()); - - return FALSE; - } - -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - const char *channel_name[4] = { "R", "G", "B", "A" }; - BOOL bIsFlipped = FALSE; - half *halfData = NULL; - - if(!dib || !handle) return FALSE; - - try { - // check for EXR_LC compression and verify that the format is RGB - if((flags & EXR_LC) == EXR_LC) { - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - if(((image_type != FIT_RGBF) && (image_type != FIT_RGBAF)) || ((flags & EXR_FLOAT) == EXR_FLOAT)) { - THROW (Iex::IoExc, "EXR_LC compression is only available with RGB[A]F images"); - } - if((FreeImage_GetWidth(dib) % 2) || (FreeImage_GetHeight(dib) % 2)) { - THROW (Iex::IoExc, "EXR_LC compression only works when the width and height are a multiple of 2"); - } - } - - // wrap the FreeImage IO stream - C_OStream ostream(io, handle); - - // compression - Imf::Compression compress; - if((flags & EXR_NONE) == EXR_NONE) { - // no compression - compress = Imf::NO_COMPRESSION; - } else if((flags & EXR_ZIP) == EXR_ZIP) { - // zlib compression, in blocks of 16 scan lines - compress = Imf::ZIP_COMPRESSION; - } else if((flags & EXR_PIZ) == EXR_PIZ) { - // piz-based wavelet compression - compress = Imf::PIZ_COMPRESSION; - } else if((flags & EXR_PXR24) == EXR_PXR24) { - // lossy 24-bit float compression - compress = Imf::PXR24_COMPRESSION; - } else if((flags & EXR_B44) == EXR_B44) { - // lossy 44% float compression - compress = Imf::B44_COMPRESSION; - } else { - // default value - compress = Imf::PIZ_COMPRESSION; - } - - // create the header - int width = FreeImage_GetWidth(dib); - int height = FreeImage_GetHeight(dib); - int dx = 0, dy = 0; - - Imath::Box2i dataWindow (Imath::V2i (0, 0), Imath::V2i (width - 1, height - 1)); - Imath::Box2i displayWindow (Imath::V2i (-dx, -dy), Imath::V2i (width - dx - 1, height - dy - 1)); - - Imf::Header header = Imf::Header(displayWindow, dataWindow, 1, - Imath::V2f(0,0), 1, - Imf::INCREASING_Y, compress); - - // handle thumbnail - SetPreviewImage(dib, header); - - // check for EXR_LC compression - if((flags & EXR_LC) == EXR_LC) { - return SaveAsEXR_LC(ostream, dib, header, width, height); - } - - // output pixel type - Imf::PixelType pixelType; - if((flags & EXR_FLOAT) == EXR_FLOAT) { - pixelType = Imf::FLOAT; // save as float data type - } else { - // default value - pixelType = Imf::HALF; // save as half data type - } - - // check the data type and number of channels - int components = 0; - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - switch(image_type) { - case FIT_FLOAT: - components = 1; - // insert luminance channel - header.channels().insert ("Y", Imf::Channel(pixelType)); - break; - case FIT_RGBF: - components = 3; - for(int c = 0; c < components; c++) { - // insert R, G and B channels - header.channels().insert (channel_name[c], Imf::Channel(pixelType)); - } - break; - case FIT_RGBAF: - components = 4; - for(int c = 0; c < components; c++) { - // insert R, G, B and A channels - header.channels().insert (channel_name[c], Imf::Channel(pixelType)); - } - break; - default: - THROW (Iex::ArgExc, "Cannot save: invalid data type.\nConvert the image to float before saving as OpenEXR."); - } - - // build a frame buffer (i.e. what we have on input) - Imf::FrameBuffer frameBuffer; - - BYTE *bits = NULL; // pointer to our pixel buffer - size_t bytespp = 0; // size of our pixel in bytes - size_t bytespc = 0; // size of our pixel component in bytes - unsigned pitch = 0; // size of our yStride in bytes - - - if(pixelType == Imf::HALF) { - // convert from float to half - halfData = new(std::nothrow) half[width * height * components]; - if(!halfData) { - THROW (Iex::NullExc, FI_MSG_ERROR_MEMORY); - } - - for(int y = 0; y < height; y++) { - float *src_bits = (float*)FreeImage_GetScanLine(dib, height - 1 - y); - half *dst_bits = halfData + y * width * components; - for(int x = 0; x < width; x++) { - for(int c = 0; c < components; c++) { - dst_bits[c] = src_bits[c]; - } - src_bits += components; - dst_bits += components; - } - } - bits = (BYTE*)halfData; - bytespc = sizeof(half); - bytespp = sizeof(half) * components; - pitch = sizeof(half) * width * components; - } else if(pixelType == Imf::FLOAT) { - // invert dib scanlines - bIsFlipped = FreeImage_FlipVertical(dib); - - bits = FreeImage_GetBits(dib); - bytespc = sizeof(float); - bytespp = sizeof(float) * components; - pitch = FreeImage_GetPitch(dib); - } - - if(image_type == FIT_FLOAT) { - frameBuffer.insert ("Y", // name - Imf::Slice (pixelType, // type - (char*)(bits), // base - bytespp, // xStride - pitch)); // yStride - } else if((image_type == FIT_RGBF) || (image_type == FIT_RGBAF)) { - for(int c = 0; c < components; c++) { - char *channel_base = (char*)(bits) + c*bytespc; - frameBuffer.insert (channel_name[c],// name - Imf::Slice (pixelType, // type - channel_base, // base - bytespp, // xStride - pitch)); // yStride - } - } - - // write the data - Imf::OutputFile file (ostream, header); - file.setFrameBuffer (frameBuffer); - file.writePixels (height); - - if(halfData != NULL) { - delete[] halfData; - } - if(bIsFlipped) { - // invert dib scanlines - FreeImage_FlipVertical(dib); - } - - return TRUE; - - } catch(Iex::BaseExc & e) { - if(halfData != NULL) { - delete[] halfData; - } - if(bIsFlipped) { - // invert dib scanlines - FreeImage_FlipVertical(dib); - } - - FreeImage_OutputMessageProc(s_format_id, e.what()); - - return FALSE; - } -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitEXR(Plugin *plugin, int format_id) { - s_format_id = format_id; - - // initialize the OpenEXR library - // note that this OpenEXR function produce so called "false memory leaks" - // see http://lists.nongnu.org/archive/html/openexr-devel/2013-11/msg00000.html - Imf::staticInitialize(); - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginG3.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginG3.cpp deleted file mode 100644 index 0a083b4..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginG3.cpp +++ /dev/null @@ -1,433 +0,0 @@ -// ========================================================== -// G3 Fax Loader -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Petr Pytelka (pyta@lightcomp.com) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "../LibTIFF4/tiffiop.h" - -#include "FreeImage.h" -#include "Utilities.h" - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Constant/Macro declarations -// ========================================================== - -#define G3_DEFAULT_WIDTH 1728 - -#define TIFFhowmany8(x) (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3) - -// ========================================================== -// libtiff interface -// ========================================================== - -static tmsize_t -_g3ReadProc(thandle_t handle, void *buf, tmsize_t size) { - // returns an error when reading the TIFF header - return 0; -} - -static tmsize_t -_g3WriteProc(thandle_t handle, void *buf, tmsize_t size) { - // returns ok when writing the TIFF header - return size; -} - -static toff_t -_g3SeekProc(thandle_t handle, toff_t off, int whence) { - return 0; -} - -static int -_g3CloseProc(thandle_t handle) { - return 0; -} - -static toff_t -_g3SizeProc(thandle_t handle) { - return 0; -} - -static int -_g3MapProc(thandle_t, void** base, toff_t* size) { - return 0; -} - -static void -_g3UnmapProc(thandle_t, void* base, toff_t size) { -} - -// -------------------------------------------------------------- - -static tmsize_t -G3GetFileSize(FreeImageIO *io, fi_handle handle) { - long currentPos = io->tell_proc(handle); - io->seek_proc(handle, 0, SEEK_END); - long fileSize = io->tell_proc(handle); - io->seek_proc(handle, currentPos, SEEK_SET); - return fileSize; -} - -static BOOL -G3ReadFile(FreeImageIO *io, fi_handle handle, uint8 *tif_rawdata, tmsize_t tif_rawdatasize) { - return ((tmsize_t)(io->read_proc(tif_rawdata, (unsigned)tif_rawdatasize, 1, handle) * tif_rawdatasize) == tif_rawdatasize); -} - -// ========================================================== -// Internal functions -// ========================================================== - -static int -copyFaxFile(FreeImageIO *io, fi_handle handle, TIFF* tifin, uint32 xsize, int stretch, FIMEMORY *memory) { - BYTE *rowbuf = NULL; - BYTE *refbuf = NULL; - uint32 row; - uint16 badrun; - uint16 badfaxrun; - uint32 badfaxlines; - int ok; - - try { - - uint32 linesize = TIFFhowmany8(xsize); - rowbuf = (BYTE*) _TIFFmalloc(linesize); - refbuf = (BYTE*) _TIFFmalloc(linesize); - if (rowbuf == NULL || refbuf == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - tifin->tif_rawdatasize = G3GetFileSize(io, handle); - tifin->tif_rawdata = (tidata_t) _TIFFmalloc(tifin->tif_rawdatasize); - if (tifin->tif_rawdata == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - if(!G3ReadFile(io, handle, tifin->tif_rawdata, tifin->tif_rawdatasize)) { - throw "Read error at scanline 0"; - } - tifin->tif_rawcp = tifin->tif_rawdata; - tifin->tif_rawcc = tifin->tif_rawdatasize; - - (*tifin->tif_setupdecode)(tifin); - (*tifin->tif_predecode)(tifin, (uint16) 0); - tifin->tif_row = 0; - badfaxlines = 0; - badfaxrun = 0; - - _TIFFmemset(refbuf, 0, linesize); - row = 0; - badrun = 0; // current run of bad lines - while (tifin->tif_rawcc > 0) { - ok = (*tifin->tif_decoderow)(tifin, rowbuf, linesize, 0); - if (!ok) { - badfaxlines++; - badrun++; - // regenerate line from previous good line - _TIFFmemcpy(rowbuf, refbuf, linesize); - } else { - if (badrun > badfaxrun) - badfaxrun = badrun; - badrun = 0; - _TIFFmemcpy(refbuf, rowbuf, linesize); - } - tifin->tif_row++; - - FreeImage_WriteMemory(rowbuf, linesize, 1, memory); - row++; - if (stretch) { - FreeImage_WriteMemory(rowbuf, linesize, 1, memory); - row++; - } - } - if (badrun > badfaxrun) - badfaxrun = badrun; - - _TIFFfree(tifin->tif_rawdata); - tifin->tif_rawdata = NULL; - - _TIFFfree(rowbuf); - _TIFFfree(refbuf); - - /* - if (verbose) { - fprintf(stderr, "%d rows in input\n", rows); - fprintf(stderr, "%ld total bad rows\n", (long) badfaxlines); - fprintf(stderr, "%d max consecutive bad rows\n", badfaxrun); - } - */ - - } catch(const char *message) { - if(rowbuf) _TIFFfree(rowbuf); - if(refbuf) _TIFFfree(refbuf); - if(tifin->tif_rawdata) { - _TIFFfree(tifin->tif_rawdata); - tifin->tif_rawdata = NULL; - } - FreeImage_OutputMessageProc(s_format_id, message); - - return -1; - } - - return (row); -} - - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "G3"; -} - -static const char * DLL_CALLCONV -Description() { - return "Raw fax format CCITT G.3"; -} - -static const char * DLL_CALLCONV -Extension() { - return "g3"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; // there is now reasonable regexp for raw G3 -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/fax-g3"; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - TIFF *faxTIFF = NULL; - FIBITMAP *dib = NULL; - FIMEMORY *memory = NULL; - - //int verbose = 0; - int stretch = 0; - int rows; - float resX = 204.0; - float resY = 196.0; - - uint32 xsize = G3_DEFAULT_WIDTH; - int compression_in = COMPRESSION_CCITTFAX3; - int fillorder_in = FILLORDER_LSB2MSB; - uint32 group3options_in = 0; // 1d-encoded - uint32 group4options_in = 0; // compressed - int photometric_in = PHOTOMETRIC_MINISWHITE; - - if(handle==NULL) return NULL; - - try { - // set default load options - - compression_in = COMPRESSION_CCITTFAX3; // input is g3-encoded - group3options_in &= ~GROUP3OPT_2DENCODING; // input is 1d-encoded (g3 only) - fillorder_in = FILLORDER_MSB2LSB; // input has msb-to-lsb fillorder - - /* - Original input-related fax2tiff options - - while ((c = getopt(argc, argv, "R:X:o:1234ABLMPUW5678abcflmprsuvwz?")) != -1) { - switch (c) { - // input-related options - case '3': // input is g3-encoded - compression_in = COMPRESSION_CCITTFAX3; - break; - case '4': // input is g4-encoded - compression_in = COMPRESSION_CCITTFAX4; - break; - case 'U': // input is uncompressed (g3 and g4) - group3options_in |= GROUP3OPT_UNCOMPRESSED; - group4options_in |= GROUP4OPT_UNCOMPRESSED; - break; - case '1': // input is 1d-encoded (g3 only) - group3options_in &= ~GROUP3OPT_2DENCODING; - break; - case '2': // input is 2d-encoded (g3 only) - group3options_in |= GROUP3OPT_2DENCODING; - break; - case 'P': // input has not-aligned EOL (g3 only) - group3options_in &= ~GROUP3OPT_FILLBITS; - break; - case 'A': // input has aligned EOL (g3 only) - group3options_in |= GROUP3OPT_FILLBITS; - break; - case 'W': // input has 0 mean white - photometric_in = PHOTOMETRIC_MINISWHITE; - break; - case 'B': // input has 0 mean black - photometric_in = PHOTOMETRIC_MINISBLACK; - break; - case 'L': // input has lsb-to-msb fillorder - fillorder_in = FILLORDER_LSB2MSB; - break; - case 'M': // input has msb-to-lsb fillorder - fillorder_in = FILLORDER_MSB2LSB; - break; - case 'R': // input resolution - resY = (float) atof(optarg); - break; - case 'X': // input width - xsize = (uint32) atoi(optarg); - break; - - // output-related options - case 's': // stretch image by dup'ng scanlines - stretch = 1; - break; - case 'v': // -v for info - verbose++; - break; - } - } - - */ - - // open a temporary memory buffer to save decoded scanlines - memory = FreeImage_OpenMemory(); - if(!memory) throw FI_MSG_ERROR_MEMORY; - - // wrap the raw fax file - faxTIFF = TIFFClientOpen("(FakeInput)", "w", - // TIFFClientOpen() fails if we don't set existing value here - NULL, - _g3ReadProc, _g3WriteProc, - _g3SeekProc, _g3CloseProc, - _g3SizeProc, _g3MapProc, - _g3UnmapProc); - - if (faxTIFF == NULL) { - throw "Can not create fake input file"; - } - TIFFSetMode(faxTIFF, O_RDONLY); - TIFFSetField(faxTIFF, TIFFTAG_IMAGEWIDTH, xsize); - TIFFSetField(faxTIFF, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(faxTIFF, TIFFTAG_BITSPERSAMPLE, 1); - TIFFSetField(faxTIFF, TIFFTAG_FILLORDER, fillorder_in); - TIFFSetField(faxTIFF, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(faxTIFF, TIFFTAG_PHOTOMETRIC, photometric_in); - TIFFSetField(faxTIFF, TIFFTAG_YRESOLUTION, resY); - TIFFSetField(faxTIFF, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); - - // NB: this must be done after directory info is setup - TIFFSetField(faxTIFF, TIFFTAG_COMPRESSION, compression_in); - if (compression_in == COMPRESSION_CCITTFAX3) - TIFFSetField(faxTIFF, TIFFTAG_GROUP3OPTIONS, group3options_in); - else if (compression_in == COMPRESSION_CCITTFAX4) - TIFFSetField(faxTIFF, TIFFTAG_GROUP4OPTIONS, group4options_in); - - resX = 204; - if (!stretch) { - TIFFGetField(faxTIFF, TIFFTAG_YRESOLUTION, &resY); - } else { - resY = 196; - } - - // decode the raw fax data - rows = copyFaxFile(io, handle, faxTIFF, xsize, stretch, memory); - if(rows <= 0) throw "Error when decoding raw fax file : check the decoder options"; - - - // allocate the output dib - dib = FreeImage_Allocate(xsize, rows, 1); - unsigned pitch = FreeImage_GetPitch(dib); - uint32 linesize = TIFFhowmany8(xsize); - - // fill the bitmap structure ... - // ... palette - RGBQUAD *pal = FreeImage_GetPalette(dib); - if(photometric_in == PHOTOMETRIC_MINISWHITE) { - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 255; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 0; - } else { - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 0; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 255; - } - // ... resolution - FreeImage_SetDotsPerMeterX(dib, (unsigned)(resX/0.0254000 + 0.5)); - FreeImage_SetDotsPerMeterY(dib, (unsigned)(resY/0.0254000 + 0.5)); - - // read the decoded scanline and fill the bitmap data - FreeImage_SeekMemory(memory, 0, SEEK_SET); - BYTE *bits = FreeImage_GetScanLine(dib, rows - 1); - for(int k = 0; k < rows; k++) { - FreeImage_ReadMemory(bits, linesize, 1, memory); - bits -= pitch; - } - - // free the TIFF wrapper - TIFFClose(faxTIFF); - - // free the memory buffer - FreeImage_CloseMemory(memory); - - } catch(const char *message) { - if(memory) FreeImage_CloseMemory(memory); - if(faxTIFF) TIFFClose(faxTIFF); - if(dib) FreeImage_Unload(dib); - FreeImage_OutputMessageProc(s_format_id, message); - return NULL; - } - - return dib; - -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitG3(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = NULL; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = NULL; - plugin->supports_icc_profiles_proc = NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginGIF.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginGIF.cpp deleted file mode 100644 index 59523c7..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginGIF.cpp +++ /dev/null @@ -1,1405 +0,0 @@ -// ========================================================== -// GIF Loader and Writer -// -// Design and implementation by -// - Ryan Rubley -// - Raphal Gaquer -// - Aaron Shumate -// -// References -// http://www.w3.org/Graphics/GIF/spec-gif87.txt -// http://www.w3.org/Graphics/GIF/spec-gif89a.txt -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include "FreeImage.h" -#include "Utilities.h" -#include "../Metadata/FreeImageTag.h" - -// ========================================================== -// Metadata declarations -// ========================================================== - -#define GIF_DISPOSAL_UNSPECIFIED 0 -#define GIF_DISPOSAL_LEAVE 1 -#define GIF_DISPOSAL_BACKGROUND 2 -#define GIF_DISPOSAL_PREVIOUS 3 - -// ========================================================== -// Constant/Typedef declarations -// ========================================================== - - -struct GIFinfo { - BOOL read; - //only really used when reading - size_t global_color_table_offset; - int global_color_table_size; - BYTE background_color; - std::vector application_extension_offsets; - std::vector comment_extension_offsets; - std::vector graphic_control_extension_offsets; - std::vector image_descriptor_offsets; - - GIFinfo() : read(0), global_color_table_offset(0), global_color_table_size(0), background_color(0) - { - } -}; - -struct PageInfo { - PageInfo(int d, int l, int t, int w, int h) { - disposal_method = d; left = (WORD)l; top = (WORD)t; width = (WORD)w; height = (WORD)h; - } - int disposal_method; - WORD left, top, width, height; -}; - -//GIF defines a max of 12 bits per code -#define MAX_LZW_CODE 4096 - -class StringTable -{ -public: - StringTable(); - ~StringTable(); - void Initialize(int minCodeSize); - BYTE *FillInputBuffer(int len); - void CompressStart(int bpp, int width); - int CompressEnd(BYTE *buf); //0-4 bytes - bool Compress(BYTE *buf, int *len); - bool Decompress(BYTE *buf, int *len); - void Done(void); - -protected: - bool m_done; - - int m_minCodeSize, m_clearCode, m_endCode, m_nextCode; - - int m_bpp, m_slack; //Compressor information - - int m_prefix; //Compressor state variable - int m_codeSize, m_codeMask; //Compressor/Decompressor state variables - int m_oldCode; //Decompressor state variable - int m_partial, m_partialSize; //Compressor/Decompressor bit buffer - - int firstPixelPassed; // A specific flag that indicates if the first pixel - // of the whole image had already been read - - std::string m_strings[MAX_LZW_CODE]; //This is what is really the "string table" data for the Decompressor - int* m_strmap; - - //input buffer - BYTE *m_buffer; - int m_bufferSize, m_bufferRealSize, m_bufferPos, m_bufferShift; - - void ClearCompressorTable(void); - void ClearDecompressorTable(void); -}; - -#define GIF_PACKED_LSD_HAVEGCT 0x80 -#define GIF_PACKED_LSD_COLORRES 0x70 -#define GIF_PACKED_LSD_GCTSORTED 0x08 -#define GIF_PACKED_LSD_GCTSIZE 0x07 -#define GIF_PACKED_ID_HAVELCT 0x80 -#define GIF_PACKED_ID_INTERLACED 0x40 -#define GIF_PACKED_ID_LCTSORTED 0x20 -#define GIF_PACKED_ID_RESERVED 0x18 -#define GIF_PACKED_ID_LCTSIZE 0x07 -#define GIF_PACKED_GCE_RESERVED 0xE0 -#define GIF_PACKED_GCE_DISPOSAL 0x1C -#define GIF_PACKED_GCE_WAITINPUT 0x02 -#define GIF_PACKED_GCE_HAVETRANS 0x01 - -#define GIF_BLOCK_IMAGE_DESCRIPTOR 0x2C -#define GIF_BLOCK_EXTENSION 0x21 -#define GIF_BLOCK_TRAILER 0x3B - -#define GIF_EXT_PLAINTEXT 0x01 -#define GIF_EXT_GRAPHIC_CONTROL 0xF9 -#define GIF_EXT_COMMENT 0xFE -#define GIF_EXT_APPLICATION 0xFF - -#define GIF_INTERLACE_PASSES 4 -static int g_GifInterlaceOffset[GIF_INTERLACE_PASSES] = {0, 4, 2, 1}; -static int g_GifInterlaceIncrement[GIF_INTERLACE_PASSES] = {8, 8, 4, 2}; - -// ========================================================== -// Helpers Functions -// ========================================================== - -static BOOL -FreeImage_SetMetadataEx(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, WORD id, FREE_IMAGE_MDTYPE type, DWORD count, DWORD length, const void *value) -{ - BOOL bResult = FALSE; - FITAG *tag = FreeImage_CreateTag(); - if(tag) { - FreeImage_SetTagKey(tag, key); - FreeImage_SetTagID(tag, id); - FreeImage_SetTagType(tag, type); - FreeImage_SetTagCount(tag, count); - FreeImage_SetTagLength(tag, length); - FreeImage_SetTagValue(tag, value); - if(model == FIMD_ANIMATION) { - TagLib& s = TagLib::instance(); - // get the tag description - const char *description = s.getTagDescription(TagLib::ANIMATION, id); - FreeImage_SetTagDescription(tag, description); - } - // store the tag - bResult = FreeImage_SetMetadata(model, dib, key, tag); - FreeImage_DeleteTag(tag); - } - return bResult; -} - -static BOOL -FreeImage_GetMetadataEx(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FREE_IMAGE_MDTYPE type, FITAG **tag) -{ - if( FreeImage_GetMetadata(model, dib, key, tag) ) { - if( FreeImage_GetTagType(*tag) == type ) { - return TRUE; - } - } - return FALSE; -} - -StringTable::StringTable() -{ - m_buffer = NULL; - firstPixelPassed = 0; // Still no pixel read - // Maximum number of entries in the map is MAX_LZW_CODE * 256 - // (aka 2**12 * 2**8 => a 20 bits key) - // This Map could be optmized to only handle MAX_LZW_CODE * 2**(m_bpp) - m_strmap = new(std::nothrow) int[1<<20]; -} - -StringTable::~StringTable() -{ - if( m_buffer != NULL ) { - delete [] m_buffer; - } - if( m_strmap != NULL ) { - delete [] m_strmap; - m_strmap = NULL; - } -} - -void StringTable::Initialize(int minCodeSize) -{ - m_done = false; - - m_bpp = 8; - m_minCodeSize = minCodeSize; - m_clearCode = 1 << m_minCodeSize; - if(m_clearCode > MAX_LZW_CODE) { - m_clearCode = MAX_LZW_CODE; - } - m_endCode = m_clearCode + 1; - - m_partial = 0; - m_partialSize = 0; - - m_bufferSize = 0; - ClearCompressorTable(); - ClearDecompressorTable(); -} - -BYTE *StringTable::FillInputBuffer(int len) -{ - if( m_buffer == NULL ) { - m_buffer = new(std::nothrow) BYTE[len]; - m_bufferRealSize = len; - } else if( len > m_bufferRealSize ) { - delete [] m_buffer; - m_buffer = new(std::nothrow) BYTE[len]; - m_bufferRealSize = len; - } - m_bufferSize = len; - m_bufferPos = 0; - m_bufferShift = 8 - m_bpp; - return m_buffer; -} - -void StringTable::CompressStart(int bpp, int width) -{ - m_bpp = bpp; - m_slack = (8 - ((width * bpp) % 8)) % 8; - - m_partial |= m_clearCode << m_partialSize; - m_partialSize += m_codeSize; - ClearCompressorTable(); -} - -int StringTable::CompressEnd(BYTE *buf) -{ - int len = 0; - - //output code for remaining prefix - m_partial |= m_prefix << m_partialSize; - m_partialSize += m_codeSize; - while( m_partialSize >= 8 ) { - *buf++ = (BYTE)m_partial; - m_partial >>= 8; - m_partialSize -= 8; - len++; - } - - //add the end of information code and flush the entire buffer out - m_partial |= m_endCode << m_partialSize; - m_partialSize += m_codeSize; - while( m_partialSize > 0 ) { - *buf++ = (BYTE)m_partial; - m_partial >>= 8; - m_partialSize -= 8; - len++; - } - - //most this can be is 4 bytes. 7 bits in m_partial to start + 12 for the - //last code + 12 for the end code = 31 bits total. - return len; -} - -bool StringTable::Compress(BYTE *buf, int *len) -{ - if( m_bufferSize == 0 || m_done ) { - return false; - } - - int mask = (1 << m_bpp) - 1; - BYTE *bufpos = buf; - while( m_bufferPos < m_bufferSize ) { - //get the current pixel value - char ch = (char)((m_buffer[m_bufferPos] >> m_bufferShift) & mask); - - // The next prefix is : - // | - int nextprefix = (((m_prefix)<<8)&0xFFF00) + (ch & 0x000FF); - if(firstPixelPassed) { - - if( m_strmap[nextprefix] > 0) { - m_prefix = m_strmap[nextprefix]; - } else { - m_partial |= m_prefix << m_partialSize; - m_partialSize += m_codeSize; - //grab full bytes for the output buffer - while( m_partialSize >= 8 && bufpos - buf < *len ) { - *bufpos++ = (BYTE)m_partial; - m_partial >>= 8; - m_partialSize -= 8; - } - - //add the code to the "table map" - m_strmap[nextprefix] = m_nextCode; - - //increment the next highest valid code, increase the code size - if( m_nextCode == (1 << m_codeSize) ) { - m_codeSize++; - } - m_nextCode++; - - //if we're out of codes, restart the string table - if( m_nextCode == MAX_LZW_CODE ) { - m_partial |= m_clearCode << m_partialSize; - m_partialSize += m_codeSize; - ClearCompressorTable(); - } - - // Only keep the 8 lowest bits (prevent problems with "negative chars") - m_prefix = ch & 0x000FF; - } - - //increment to the next pixel - if( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack) ) { - m_bufferShift -= m_bpp; - } else { - m_bufferPos++; - m_bufferShift = 8 - m_bpp; - } - - //jump out here if the output buffer is full - if( bufpos - buf == *len ) { - return true; - } - - } else { - // Specific behavior for the first pixel of the whole image - - firstPixelPassed=1; - // Only keep the 8 lowest bits (prevent problems with "negative chars") - m_prefix = ch & 0x000FF; - - //increment to the next pixel - if( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack) ) { - m_bufferShift -= m_bpp; - } else { - m_bufferPos++; - m_bufferShift = 8 - m_bpp; - } - - //jump out here if the output buffer is full - if( bufpos - buf == *len ) { - return true; - } - } - } - - m_bufferSize = 0; - *len = (int)(bufpos - buf); - - return true; -} - -bool StringTable::Decompress(BYTE *buf, int *len) -{ - if( m_bufferSize == 0 || m_done ) { - return false; - } - - BYTE *bufpos = buf; - for( ; m_bufferPos < m_bufferSize; m_bufferPos++ ) { - m_partial |= (int)m_buffer[m_bufferPos] << m_partialSize; - m_partialSize += 8; - while( m_partialSize >= m_codeSize ) { - int code = m_partial & m_codeMask; - m_partial >>= m_codeSize; - m_partialSize -= m_codeSize; - - if( code > m_nextCode || /*(m_nextCode == MAX_LZW_CODE && code != m_clearCode) || */code == m_endCode ) { - m_done = true; - *len = (int)(bufpos - buf); - return true; - } - if( code == m_clearCode ) { - ClearDecompressorTable(); - continue; - } - - //add new string to string table, if not the first pass since a clear code - if( m_oldCode != MAX_LZW_CODE && m_nextCode < MAX_LZW_CODE) { - m_strings[m_nextCode] = m_strings[m_oldCode] + m_strings[code == m_nextCode ? m_oldCode : code][0]; - } - - if( (int)m_strings[code].size() > *len - (bufpos - buf) ) { - //out of space, stuff the code back in for next time - m_partial <<= m_codeSize; - m_partialSize += m_codeSize; - m_partial |= code; - m_bufferPos++; - *len = (int)(bufpos - buf); - return true; - } - - //output the string into the buffer - memcpy(bufpos, m_strings[code].data(), m_strings[code].size()); - bufpos += m_strings[code].size(); - - //increment the next highest valid code, add a bit to the mask if we need to increase the code size - if( m_oldCode != MAX_LZW_CODE && m_nextCode < MAX_LZW_CODE ) { - if( ++m_nextCode < MAX_LZW_CODE ) { - if( (m_nextCode & m_codeMask) == 0 ) { - m_codeSize++; - m_codeMask |= m_nextCode; - } - } - } - - m_oldCode = code; - } - } - - m_bufferSize = 0; - *len = (int)(bufpos - buf); - - return true; -} - -void StringTable::Done(void) -{ - m_done = true; -} - -void StringTable::ClearCompressorTable(void) -{ - if(m_strmap) { - memset(m_strmap, 0xFF, sizeof(unsigned int)*(1<<20)); - } - m_nextCode = m_endCode + 1; - - m_prefix = 0; - m_codeSize = m_minCodeSize + 1; -} - -void StringTable::ClearDecompressorTable(void) -{ - for( int i = 0; i < m_clearCode; i++ ) { - m_strings[i].resize(1); - m_strings[i][0] = (char)i; - } - m_nextCode = m_endCode + 1; - - m_codeSize = m_minCodeSize + 1; - m_codeMask = (1 << m_codeSize) - 1; - m_oldCode = MAX_LZW_CODE; -} - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "GIF"; -} - -static const char * DLL_CALLCONV -Description() { - return "Graphics Interchange Format"; -} - -static const char * DLL_CALLCONV -Extension() { - return "gif"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return "^GIF"; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/gif"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE GIF89a[] = { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61 }; // ASCII code for "GIF89a" - BYTE GIF87a[] = { 0x47, 0x49, 0x46, 0x38, 0x37, 0x61 }; // ASCII code for "GIF87a" - BYTE signature[6] = { 0, 0, 0, 0, 0, 0 }; - - io->read_proc(signature, 1, 6, handle); - - if (memcmp(GIF89a, signature, 6) == 0) - return TRUE; - if (memcmp(GIF87a, signature, 6) == 0) - return TRUE; - - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return (depth == 1) || - (depth == 4) || - (depth == 8); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return (type == FIT_BITMAP) ? TRUE : FALSE; -} - -// ---------------------------------------------------------- - -static void *DLL_CALLCONV -Open(FreeImageIO *io, fi_handle handle, BOOL read) { - GIFinfo *info = new(std::nothrow) GIFinfo; - if( info == NULL ) { - return NULL; - } - - // set Read/Write mode - info->read = read; - - if( read ) { - try { - // read Header (6 bytes) - if( !Validate(io, handle) ) { - throw FI_MSG_ERROR_MAGIC_NUMBER; - } - - //Logical Screen Descriptor - io->seek_proc(handle, 4, SEEK_CUR); - BYTE packed; - if( io->read_proc(&packed, 1, 1, handle) < 1 ) { - throw "EOF reading Logical Screen Descriptor"; - } - if( io->read_proc(&info->background_color, 1, 1, handle) < 1 ) { - throw "EOF reading Logical Screen Descriptor"; - } - io->seek_proc(handle, 1, SEEK_CUR); - - //Global Color Table - if( packed & GIF_PACKED_LSD_HAVEGCT ) { - info->global_color_table_offset = io->tell_proc(handle); - info->global_color_table_size = 2 << (packed & GIF_PACKED_LSD_GCTSIZE); - io->seek_proc(handle, 3 * info->global_color_table_size, SEEK_CUR); - } - - //Scan through all the rest of the blocks, saving offsets - size_t gce_offset = 0; - BYTE block = 0; - while( block != GIF_BLOCK_TRAILER ) { - if( io->read_proc(&block, 1, 1, handle) < 1 ) { - throw "EOF reading blocks"; - } - if( block == GIF_BLOCK_IMAGE_DESCRIPTOR ) { - info->image_descriptor_offsets.push_back(io->tell_proc(handle)); - //GCE may be 0, meaning no GCE preceded this ID - info->graphic_control_extension_offsets.push_back(gce_offset); - gce_offset = 0; - - io->seek_proc(handle, 8, SEEK_CUR); - if( io->read_proc(&packed, 1, 1, handle) < 1 ) { - throw "EOF reading Image Descriptor"; - } - - //Local Color Table - if( packed & GIF_PACKED_ID_HAVELCT ) { - io->seek_proc(handle, 3 * (2 << (packed & GIF_PACKED_ID_LCTSIZE)), SEEK_CUR); - } - - //LZW Minimum Code Size - io->seek_proc(handle, 1, SEEK_CUR); - } else if( block == GIF_BLOCK_EXTENSION ) { - BYTE ext; - if( io->read_proc(&ext, 1, 1, handle) < 1 ) { - throw "EOF reading extension"; - } - - if( ext == GIF_EXT_GRAPHIC_CONTROL ) { - //overwrite previous offset if more than one GCE found before an ID - gce_offset = io->tell_proc(handle); - } else if( ext == GIF_EXT_COMMENT ) { - info->comment_extension_offsets.push_back(io->tell_proc(handle)); - } else if( ext == GIF_EXT_APPLICATION ) { - info->application_extension_offsets.push_back(io->tell_proc(handle)); - } - } else if( block == GIF_BLOCK_TRAILER ) { - continue; - } else { - throw "Invalid GIF block found"; - } - - //Data Sub-blocks - BYTE len; - if( io->read_proc(&len, 1, 1, handle) < 1 ) { - throw "EOF reading sub-block"; - } - while( len != 0 ) { - io->seek_proc(handle, len, SEEK_CUR); - if( io->read_proc(&len, 1, 1, handle) < 1 ) { - throw "EOF reading sub-block"; - } - } - } - } catch (const char *msg) { - FreeImage_OutputMessageProc(s_format_id, msg); - delete info; - return NULL; - } - } else { - //Header - io->write_proc((void *)"GIF89a", 6, 1, handle); - } - - return info; -} - -static void DLL_CALLCONV -Close(FreeImageIO *io, fi_handle handle, void *data) { - if( data == NULL ) { - return; - } - GIFinfo *info = (GIFinfo *)data; - - if( !info->read ) { - //Trailer - BYTE b = GIF_BLOCK_TRAILER; - io->write_proc(&b, 1, 1, handle); - } - - delete info; -} - -static int DLL_CALLCONV -PageCount(FreeImageIO *io, fi_handle handle, void *data) { - if( data == NULL ) { - return 0; - } - GIFinfo *info = (GIFinfo *)data; - - return (int) info->image_descriptor_offsets.size(); -} - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - if( data == NULL ) { - return NULL; - } - GIFinfo *info = (GIFinfo *)data; - - if( page == -1 ) { - page = 0; - } - if( page < 0 || page >= (int)info->image_descriptor_offsets.size() ) { - return NULL; - } - - FIBITMAP *dib = NULL; - try { - bool have_transparent = false, no_local_palette = false, interlaced = false; - int disposal_method = GIF_DISPOSAL_LEAVE, delay_time = 0, transparent_color = 0; - WORD left, top, width, height; - BYTE packed, b; - WORD w; - - //playback pages to generate what the user would see for this frame - if( (flags & GIF_PLAYBACK) == GIF_PLAYBACK ) { - //Logical Screen Descriptor - io->seek_proc(handle, 6, SEEK_SET); - WORD logicalwidth, logicalheight; - io->read_proc(&logicalwidth, 2, 1, handle); - io->read_proc(&logicalheight, 2, 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&logicalwidth); - SwapShort(&logicalheight); -#endif - //set the background color with 0 alpha - RGBQUAD background; - if( info->global_color_table_offset != 0 && info->background_color < info->global_color_table_size ) { - io->seek_proc(handle, (long)(info->global_color_table_offset + (info->background_color * 3)), SEEK_SET); - io->read_proc(&background.rgbRed, 1, 1, handle); - io->read_proc(&background.rgbGreen, 1, 1, handle); - io->read_proc(&background.rgbBlue, 1, 1, handle); - } else { - background.rgbRed = 0; - background.rgbGreen = 0; - background.rgbBlue = 0; - } - background.rgbReserved = 0; - - //allocate entire logical area - dib = FreeImage_Allocate(logicalwidth, logicalheight, 32); - if( dib == NULL ) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - //fill with background color to start - int x, y; - RGBQUAD *scanline; - for( y = 0; y < logicalheight; y++ ) { - scanline = (RGBQUAD *)FreeImage_GetScanLine(dib, y); - for( x = 0; x < logicalwidth; x++ ) { - *scanline++ = background; - } - } - - //cache some info about each of the pages so we can avoid decoding as many of them as possible - std::vector pageinfo; - int start = page, end = page; - while( start >= 0 ) { - //Graphic Control Extension - io->seek_proc(handle, (long)(info->graphic_control_extension_offsets[start] + 1), SEEK_SET); - io->read_proc(&packed, 1, 1, handle); - have_transparent = (packed & GIF_PACKED_GCE_HAVETRANS) ? true : false; - disposal_method = (packed & GIF_PACKED_GCE_DISPOSAL) >> 2; - //Image Descriptor - io->seek_proc(handle, (long)(info->image_descriptor_offsets[start]), SEEK_SET); - io->read_proc(&left, 2, 1, handle); - io->read_proc(&top, 2, 1, handle); - io->read_proc(&width, 2, 1, handle); - io->read_proc(&height, 2, 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&left); - SwapShort(&top); - SwapShort(&width); - SwapShort(&height); -#endif - - pageinfo.push_back(PageInfo(disposal_method, left, top, width, height)); - - if( start != end ) { - if( left == 0 && top == 0 && width == logicalwidth && height == logicalheight ) { - if( disposal_method == GIF_DISPOSAL_BACKGROUND ) { - pageinfo.pop_back(); - start++; - break; - } else if( disposal_method != GIF_DISPOSAL_PREVIOUS ) { - if( !have_transparent ) { - break; - } - } - } - } - start--; - } - if( start < 0 ) { - start = 0; - } - - //draw each page into the logical area - delay_time = 0; - for( page = start; page <= end; page++ ) { - PageInfo &info = pageinfo[end - page]; - //things we can skip having to decode - if( page != end ) { - if( info.disposal_method == GIF_DISPOSAL_PREVIOUS ) { - continue; - } - if( info.disposal_method == GIF_DISPOSAL_BACKGROUND ) { - for( y = 0; y < info.height; y++ ) { - const int scanidx = logicalheight - (y + info.top) - 1; - if ( scanidx < 0 ) { - break; // If data is corrupt, don't calculate in invalid scanline - } - scanline = (RGBQUAD *)FreeImage_GetScanLine(dib, scanidx) + info.left; - for( x = 0; x < info.width; x++ ) { - *scanline++ = background; - } - } - continue; - } - } - - //decode page - FIBITMAP *pagedib = Load(io, handle, page, GIF_LOAD256, data); - if( pagedib != NULL ) { - RGBQUAD *pal = FreeImage_GetPalette(pagedib); - have_transparent = false; - if( FreeImage_IsTransparent(pagedib) ) { - int count = FreeImage_GetTransparencyCount(pagedib); - BYTE *table = FreeImage_GetTransparencyTable(pagedib); - for( int i = 0; i < count; i++ ) { - if( table[i] == 0 ) { - have_transparent = true; - transparent_color = i; - break; - } - } - } - //copy page data into logical buffer, with full alpha opaqueness - for( y = 0; y < info.height; y++ ) { - const int scanidx = logicalheight - (y + info.top) - 1; - if ( scanidx < 0 ) { - break; // If data is corrupt, don't calculate in invalid scanline - } - scanline = (RGBQUAD *)FreeImage_GetScanLine(dib, scanidx) + info.left; - BYTE *pageline = FreeImage_GetScanLine(pagedib, info.height - y - 1); - for( x = 0; x < info.width; x++ ) { - if( !have_transparent || *pageline != transparent_color ) { - *scanline = pal[*pageline]; - scanline->rgbReserved = 255; - } - scanline++; - pageline++; - } - } - //copy frame time - if( page == end ) { - FITAG *tag; - if( FreeImage_GetMetadataEx(FIMD_ANIMATION, pagedib, "FrameTime", FIDT_LONG, &tag) ) { - delay_time = *(LONG *)FreeImage_GetTagValue(tag); - } - } - FreeImage_Unload(pagedib); - } - } - - //setup frame time - FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "FrameTime", ANIMTAG_FRAMETIME, FIDT_LONG, 1, 4, &delay_time); - return dib; - } - - //get the actual frame image data for a single frame - - //Image Descriptor - io->seek_proc(handle, (long)info->image_descriptor_offsets[page], SEEK_SET); - io->read_proc(&left, 2, 1, handle); - io->read_proc(&top, 2, 1, handle); - io->read_proc(&width, 2, 1, handle); - io->read_proc(&height, 2, 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&left); - SwapShort(&top); - SwapShort(&width); - SwapShort(&height); -#endif - io->read_proc(&packed, 1, 1, handle); - interlaced = (packed & GIF_PACKED_ID_INTERLACED) ? true : false; - no_local_palette = (packed & GIF_PACKED_ID_HAVELCT) ? false : true; - - int bpp = 8; - if( (flags & GIF_LOAD256) == 0 ) { - if( !no_local_palette ) { - int size = 2 << (packed & GIF_PACKED_ID_LCTSIZE); - if( size <= 2 ) bpp = 1; - else if( size <= 16 ) bpp = 4; - } else if( info->global_color_table_offset != 0 ) { - if( info->global_color_table_size <= 2 ) bpp = 1; - else if( info->global_color_table_size <= 16 ) bpp = 4; - } - } - dib = FreeImage_Allocate(width, height, bpp); - if( dib == NULL ) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "FrameLeft", ANIMTAG_FRAMELEFT, FIDT_SHORT, 1, 2, &left); - FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "FrameTop", ANIMTAG_FRAMETOP, FIDT_SHORT, 1, 2, &top); - b = no_local_palette ? 1 : 0; - FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "NoLocalPalette", ANIMTAG_NOLOCALPALETTE, FIDT_BYTE, 1, 1, &b); - b = interlaced ? 1 : 0; - FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "Interlaced", ANIMTAG_INTERLACED, FIDT_BYTE, 1, 1, &b); - - //Palette - RGBQUAD *pal = FreeImage_GetPalette(dib); - if( !no_local_palette ) { - int size = 2 << (packed & GIF_PACKED_ID_LCTSIZE); - - int i = 0; - while( i < size ) { - io->read_proc(&pal[i].rgbRed, 1, 1, handle); - io->read_proc(&pal[i].rgbGreen, 1, 1, handle); - io->read_proc(&pal[i].rgbBlue, 1, 1, handle); - i++; - } - } else if( info->global_color_table_offset != 0 ) { - long pos = io->tell_proc(handle); - io->seek_proc(handle, (long)info->global_color_table_offset, SEEK_SET); - - int i = 0; - while( i < info->global_color_table_size ) { - io->read_proc(&pal[i].rgbRed, 1, 1, handle); - io->read_proc(&pal[i].rgbGreen, 1, 1, handle); - io->read_proc(&pal[i].rgbBlue, 1, 1, handle); - i++; - } - - io->seek_proc(handle, pos, SEEK_SET); - } else { - //its legal to have no palette, but we're going to generate *something* - for( int i = 0; i < 256; i++ ) { - pal[i].rgbRed = (BYTE)i; - pal[i].rgbGreen = (BYTE)i; - pal[i].rgbBlue = (BYTE)i; - } - } - - //LZW Minimum Code Size - io->read_proc(&b, 1, 1, handle); - StringTable *stringtable = new(std::nothrow) StringTable; - stringtable->Initialize(b); - - //Image Data Sub-blocks - int x = 0, xpos = 0, y = 0, shift = 8 - bpp, mask = (1 << bpp) - 1, interlacepass = 0; - BYTE *scanline = FreeImage_GetScanLine(dib, height - 1); - BYTE buf[4096]; - io->read_proc(&b, 1, 1, handle); - while( b ) { - io->read_proc(stringtable->FillInputBuffer(b), b, 1, handle); - int size = sizeof(buf); - while( stringtable->Decompress(buf, &size) ) { - for( int i = 0; i < size; i++ ) { - scanline[xpos] |= (buf[i] & mask) << shift; - if( shift > 0 ) { - shift -= bpp; - } else { - xpos++; - shift = 8 - bpp; - } - if( ++x >= width ) { - if( interlaced ) { - y += g_GifInterlaceIncrement[interlacepass]; - if( y >= height && ++interlacepass < GIF_INTERLACE_PASSES ) { - y = g_GifInterlaceOffset[interlacepass]; - } - } else { - y++; - } - if( y >= height ) { - stringtable->Done(); - break; - } - x = xpos = 0; - shift = 8 - bpp; - scanline = FreeImage_GetScanLine(dib, height - y - 1); - } - } - size = sizeof(buf); - } - io->read_proc(&b, 1, 1, handle); - } - - if( page == 0 ) { - size_t idx; - - //Logical Screen Descriptor - io->seek_proc(handle, 6, SEEK_SET); - WORD logicalwidth, logicalheight; - io->read_proc(&logicalwidth, 2, 1, handle); - io->read_proc(&logicalheight, 2, 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&logicalwidth); - SwapShort(&logicalheight); -#endif - FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "LogicalWidth", ANIMTAG_LOGICALWIDTH, FIDT_SHORT, 1, 2, &logicalwidth); - FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "LogicalHeight", ANIMTAG_LOGICALHEIGHT, FIDT_SHORT, 1, 2, &logicalheight); - - //Global Color Table - if( info->global_color_table_offset != 0 ) { - RGBQUAD globalpalette[256]; - io->seek_proc(handle, (long)info->global_color_table_offset, SEEK_SET); - int i = 0; - while( i < info->global_color_table_size ) { - io->read_proc(&globalpalette[i].rgbRed, 1, 1, handle); - io->read_proc(&globalpalette[i].rgbGreen, 1, 1, handle); - io->read_proc(&globalpalette[i].rgbBlue, 1, 1, handle); - globalpalette[i].rgbReserved = 0; - i++; - } - FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "GlobalPalette", ANIMTAG_GLOBALPALETTE, FIDT_PALETTE, info->global_color_table_size, info->global_color_table_size * 4, globalpalette); - //background color - if( info->background_color < info->global_color_table_size ) { - FreeImage_SetBackgroundColor(dib, &globalpalette[info->background_color]); - } - } - - //Application Extension - LONG loop = 1; //If no AE with a loop count is found, the default must be 1 - for( idx = 0; idx < info->application_extension_offsets.size(); idx++ ) { - io->seek_proc(handle, (long)info->application_extension_offsets[idx], SEEK_SET); - io->read_proc(&b, 1, 1, handle); - if( b == 11 ) { //All AEs start with an 11 byte sub-block to determine what type of AE it is - char buf[11]; - io->read_proc(buf, 11, 1, handle); - if( !memcmp(buf, "NETSCAPE2.0", 11) || !memcmp(buf, "ANIMEXTS1.0", 11) ) { //Not everybody recognizes ANIMEXTS1.0 but it is valid - io->read_proc(&b, 1, 1, handle); - if( b == 3 ) { //we're supposed to have a 3 byte sub-block now - io->read_proc(&b, 1, 1, handle); //this should be 0x01 but isn't really important - io->read_proc(&w, 2, 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&w); -#endif - loop = w; - if( loop > 0 ) loop++; - break; - } - } - } - } - FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "Loop", ANIMTAG_LOOP, FIDT_LONG, 1, 4, &loop); - - //Comment Extension - for( idx = 0; idx < info->comment_extension_offsets.size(); idx++ ) { - io->seek_proc(handle, (long)info->comment_extension_offsets[idx], SEEK_SET); - std::string comment; - char buf[255]; - io->read_proc(&b, 1, 1, handle); - while( b ) { - io->read_proc(buf, b, 1, handle); - comment.append(buf, b); - io->read_proc(&b, 1, 1, handle); - } - comment.append(1, '\0'); - sprintf(buf, "Comment%zd", idx); - DWORD comment_size = (DWORD)comment.size(); - FreeImage_SetMetadataEx(FIMD_COMMENTS, dib, buf, 1, FIDT_ASCII, comment_size, comment_size, comment.c_str()); - } - } - - //Graphic Control Extension - if( info->graphic_control_extension_offsets[page] != 0 ) { - io->seek_proc(handle, (long)(info->graphic_control_extension_offsets[page] + 1), SEEK_SET); - io->read_proc(&packed, 1, 1, handle); - io->read_proc(&w, 2, 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&w); -#endif - io->read_proc(&b, 1, 1, handle); - have_transparent = (packed & GIF_PACKED_GCE_HAVETRANS) ? true : false; - disposal_method = (packed & GIF_PACKED_GCE_DISPOSAL) >> 2; - delay_time = w * 10; //convert cs to ms - transparent_color = b; - if( have_transparent ) { - int size = 1 << bpp; - if( transparent_color <= size ) { - BYTE table[256]; - memset(table, 0xFF, size); - table[transparent_color] = 0; - FreeImage_SetTransparencyTable(dib, table, size); - } - } - } - FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "FrameTime", ANIMTAG_FRAMETIME, FIDT_LONG, 1, 4, &delay_time); - b = (BYTE)disposal_method; - FreeImage_SetMetadataEx(FIMD_ANIMATION, dib, "DisposalMethod", ANIMTAG_DISPOSALMETHOD, FIDT_BYTE, 1, 1, &b); - - delete stringtable; - - } catch (const char *msg) { - if( dib != NULL ) { - FreeImage_Unload(dib); - } - FreeImage_OutputMessageProc(s_format_id, msg); - return NULL; - } - - return dib; -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - if( data == NULL ) { - return FALSE; - } - //GIFinfo *info = (GIFinfo *)data; - - if( page == -1 ) { - page = 0; - } - - try { - BYTE packed, b; - WORD w; - FITAG *tag; - - int bpp = FreeImage_GetBPP(dib); - if( bpp != 1 && bpp != 4 && bpp != 8 ) { - throw "Only 1, 4, or 8 bpp images supported"; - } - - bool have_transparent = false, no_local_palette = false, interlaced = false; - int disposal_method = GIF_DISPOSAL_BACKGROUND, delay_time = 100, transparent_color = 0; - WORD left = 0, top = 0, width = (WORD)FreeImage_GetWidth(dib), height = (WORD)FreeImage_GetHeight(dib); - WORD output_height = height; - if( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameLeft", FIDT_SHORT, &tag) ) { - left = *(WORD *)FreeImage_GetTagValue(tag); - } - if( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTop", FIDT_SHORT, &tag) ) { - top = *(WORD *)FreeImage_GetTagValue(tag); - } - if( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "NoLocalPalette", FIDT_BYTE, &tag) ) { - no_local_palette = *(BYTE *)FreeImage_GetTagValue(tag) ? true : false; - } - if( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Interlaced", FIDT_BYTE, &tag) ) { - interlaced = *(BYTE *)FreeImage_GetTagValue(tag) ? true : false; - } - if( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTime", FIDT_LONG, &tag) ) { - delay_time = *(LONG *)FreeImage_GetTagValue(tag); - } - if( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "DisposalMethod", FIDT_BYTE, &tag) ) { - disposal_method = *(BYTE *)FreeImage_GetTagValue(tag); - } - - RGBQUAD *pal = FreeImage_GetPalette(dib); -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&left); - SwapShort(&top); - SwapShort(&width); - SwapShort(&height); -#endif - - if( page == 0 ) { - //gather some info - WORD logicalwidth = width; // width has already been swapped... - if( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalWidth", FIDT_SHORT, &tag) ) { - logicalwidth = *(WORD *)FreeImage_GetTagValue(tag); -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&logicalwidth); -#endif - } - WORD logicalheight = height; // height has already been swapped... - if( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalHeight", FIDT_SHORT, &tag) ) { - logicalheight = *(WORD *)FreeImage_GetTagValue(tag); -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&logicalheight); -#endif - } - RGBQUAD *globalpalette = NULL; - int globalpalette_size = 0; - if( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "GlobalPalette", FIDT_PALETTE, &tag) ) { - globalpalette_size = FreeImage_GetTagCount(tag); - if( globalpalette_size >= 2 ) { - globalpalette = (RGBQUAD *)FreeImage_GetTagValue(tag); - } - } - - //Logical Screen Descriptor - io->write_proc(&logicalwidth, 2, 1, handle); - io->write_proc(&logicalheight, 2, 1, handle); - packed = GIF_PACKED_LSD_COLORRES; - b = 0; - RGBQUAD background_color; - if( globalpalette != NULL ) { - packed |= GIF_PACKED_LSD_HAVEGCT; - if( globalpalette_size < 4 ) { - globalpalette_size = 2; - packed |= 0 & GIF_PACKED_LSD_GCTSIZE; - } else if( globalpalette_size < 8 ) { - globalpalette_size = 4; - packed |= 1 & GIF_PACKED_LSD_GCTSIZE; - } else if( globalpalette_size < 16 ) { - globalpalette_size = 8; - packed |= 2 & GIF_PACKED_LSD_GCTSIZE; - } else if( globalpalette_size < 32 ) { - globalpalette_size = 16; - packed |= 3 & GIF_PACKED_LSD_GCTSIZE; - } else if( globalpalette_size < 64 ) { - globalpalette_size = 32; - packed |= 4 & GIF_PACKED_LSD_GCTSIZE; - } else if( globalpalette_size < 128 ) { - globalpalette_size = 64; - packed |= 5 & GIF_PACKED_LSD_GCTSIZE; - } else if( globalpalette_size < 256 ) { - globalpalette_size = 128; - packed |= 6 & GIF_PACKED_LSD_GCTSIZE; - } else { - globalpalette_size = 256; - packed |= 7 & GIF_PACKED_LSD_GCTSIZE; - } - if( FreeImage_GetBackgroundColor(dib, &background_color) ) { - for( int i = 0; i < globalpalette_size; i++ ) { - if( background_color.rgbRed == globalpalette[i].rgbRed && - background_color.rgbGreen == globalpalette[i].rgbGreen && - background_color.rgbBlue == globalpalette[i].rgbBlue ) { - - b = (BYTE)i; - break; - } - } - } - } else { - packed |= (bpp - 1) & GIF_PACKED_LSD_GCTSIZE; - } - io->write_proc(&packed, 1, 1, handle); - io->write_proc(&b, 1, 1, handle); - b = 0; - io->write_proc(&b, 1, 1, handle); - - //Global Color Table - if( globalpalette != NULL ) { - int i = 0; - while( i < globalpalette_size ) { - io->write_proc(&globalpalette[i].rgbRed, 1, 1, handle); - io->write_proc(&globalpalette[i].rgbGreen, 1, 1, handle); - io->write_proc(&globalpalette[i].rgbBlue, 1, 1, handle); - i++; - } - } - - //Application Extension - LONG loop = 0; - if( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Loop", FIDT_LONG, &tag) ) { - loop = *(LONG *)FreeImage_GetTagValue(tag); - } - if( loop != 1 ) { - //the Netscape extension is really "repeats" not "loops" - if( loop > 1 ) loop--; - if( loop > 0xFFFF ) loop = 0xFFFF; - w = (WORD)loop; -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&w); -#endif - io->write_proc((void *)"\x21\xFF\x0BNETSCAPE2.0\x03\x01", 16, 1, handle); - io->write_proc(&w, 2, 1, handle); - b = 0; - io->write_proc(&b, 1, 1, handle); - } - - //Comment Extension - FIMETADATA *mdhandle = NULL; - FITAG *tag = NULL; - mdhandle = FreeImage_FindFirstMetadata(FIMD_COMMENTS, dib, &tag); - if( mdhandle ) { - do { - if( FreeImage_GetTagType(tag) == FIDT_ASCII ) { - int length = FreeImage_GetTagLength(tag) - 1; - char *value = (char *)FreeImage_GetTagValue(tag); - io->write_proc((void *)"\x21\xFE", 2, 1, handle); - while( length > 0 ) { - b = (BYTE)(length >= 255 ? 255 : length); - io->write_proc(&b, 1, 1, handle); - io->write_proc(value, b, 1, handle); - value += b; - length -= b; - } - b = 0; - io->write_proc(&b, 1, 1, handle); - } - } while(FreeImage_FindNextMetadata(mdhandle, &tag)); - - FreeImage_FindCloseMetadata(mdhandle); - } - } - - //Graphic Control Extension - if( FreeImage_IsTransparent(dib) ) { - int count = FreeImage_GetTransparencyCount(dib); - BYTE *table = FreeImage_GetTransparencyTable(dib); - for( int i = 0; i < count; i++ ) { - if( table[i] == 0 ) { - have_transparent = true; - transparent_color = i; - break; - } - } - } - io->write_proc((void *)"\x21\xF9\x04", 3, 1, handle); - b = (BYTE)((disposal_method << 2) & GIF_PACKED_GCE_DISPOSAL); - if( have_transparent ) b |= GIF_PACKED_GCE_HAVETRANS; - io->write_proc(&b, 1, 1, handle); - //Notes about delay time for GIFs: - //IE5/IE6 have a minimum and default of 100ms - //Mozilla/Firefox/Netscape 6+/Opera have a minimum of 20ms and a default of 100ms if <20ms is specified or the GCE is absent - //Netscape 4 has a minimum of 10ms if 0ms is specified, but will use 0ms if the GCE is absent - w = (WORD)(delay_time / 10); //convert ms to cs -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&w); -#endif - io->write_proc(&w, 2, 1, handle); - b = (BYTE)transparent_color; - io->write_proc(&b, 1, 1, handle); - b = 0; - io->write_proc(&b, 1, 1, handle); - - //Image Descriptor - b = GIF_BLOCK_IMAGE_DESCRIPTOR; - io->write_proc(&b, 1, 1, handle); - io->write_proc(&left, 2, 1, handle); - io->write_proc(&top, 2, 1, handle); - io->write_proc(&width, 2, 1, handle); - io->write_proc(&height, 2, 1, handle); - packed = 0; - if( !no_local_palette ) packed |= GIF_PACKED_ID_HAVELCT | ((bpp - 1) & GIF_PACKED_ID_LCTSIZE); - if( interlaced ) packed |= GIF_PACKED_ID_INTERLACED; - io->write_proc(&packed, 1, 1, handle); - - //Local Color Table - if( !no_local_palette ) { - int palsize = 1 << bpp; - for( int i = 0; i < palsize; i++ ) { - io->write_proc(&pal[i].rgbRed, 1, 1, handle); - io->write_proc(&pal[i].rgbGreen, 1, 1, handle); - io->write_proc(&pal[i].rgbBlue, 1, 1, handle); - } - } - - - //LZW Minimum Code Size - b = (BYTE)(bpp == 1 ? 2 : bpp); - io->write_proc(&b, 1, 1, handle); - StringTable *stringtable = new(std::nothrow) StringTable; - stringtable->Initialize(b); - stringtable->CompressStart(bpp, width); - - //Image Data Sub-blocks - int y = 0, interlacepass = 0, line = FreeImage_GetLine(dib); - BYTE buf[255], *bufptr = buf; //255 is the max sub-block length - int size = sizeof(buf); - b = sizeof(buf); - while( y < output_height ) { - memcpy(stringtable->FillInputBuffer(line), FreeImage_GetScanLine(dib, output_height - y - 1), line); - while( stringtable->Compress(bufptr, &size) ) { - bufptr += size; - if( bufptr - buf == sizeof(buf) ) { - io->write_proc(&b, 1, 1, handle); - io->write_proc(buf, sizeof(buf), 1, handle); - size = sizeof(buf); - bufptr = buf; - } else { - size = (int)(sizeof(buf) - (bufptr - buf)); - } - } - if( interlaced ) { - y += g_GifInterlaceIncrement[interlacepass]; - if( y >= output_height && ++interlacepass < GIF_INTERLACE_PASSES ) { - y = g_GifInterlaceOffset[interlacepass]; - } - } else { - y++; - } - } - size = (int)(bufptr - buf); - BYTE last[4]; - w = (WORD)stringtable->CompressEnd(last); - if( size + w >= sizeof(buf) ) { - //one last full size sub-block - io->write_proc(&b, 1, 1, handle); - io->write_proc(buf, size, 1, handle); - io->write_proc(last, sizeof(buf) - size, 1, handle); - //and possibly a tiny additional sub-block - b = (BYTE)(w - (sizeof(buf) - size)); - if( b > 0 ) { - io->write_proc(&b, 1, 1, handle); - io->write_proc(last + w - b, b, 1, handle); - } - } else { - //last sub-block less than full size - b = (BYTE)(size + w); - io->write_proc(&b, 1, 1, handle); - io->write_proc(buf, size, 1, handle); - io->write_proc(last, w, 1, handle); - } - - //Block Terminator - b = 0; - io->write_proc(&b, 1, 1, handle); - - delete stringtable; - - } catch (const char *msg) { - FreeImage_OutputMessageProc(s_format_id, msg); - return FALSE; - } - - return TRUE; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitGIF(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = Open; - plugin->close_proc = Close; - plugin->pagecount_proc = PageCount; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginHDR.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginHDR.cpp deleted file mode 100644 index f18c790..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginHDR.cpp +++ /dev/null @@ -1,742 +0,0 @@ -// ========================================================== -// HDR Loader and writer -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// RGBE library -// ========================================================== - -// ---------------------------------------------------------- - -// maximum size of a line in the header -#define HDR_MAXLINE 256 - -// flags indicating which fields in an rgbeHeaderInfo are valid -#define RGBE_VALID_PROGRAMTYPE 0x01 -#define RGBE_VALID_COMMENT 0x02 -#define RGBE_VALID_GAMMA 0x04 -#define RGBE_VALID_EXPOSURE 0x08 - -// offsets to red, green, and blue components in a data (float) pixel -#define RGBE_DATA_RED 0 -#define RGBE_DATA_GREEN 1 -#define RGBE_DATA_BLUE 2 - -// ---------------------------------------------------------- -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -typedef struct tagHeaderInfo { - int valid; // indicate which fields are valid - char programtype[16]; // listed at beginning of file to identify it after "#?". defaults to "RGBE" - char comment[HDR_MAXLINE]; // comment beginning with "# " - float gamma; // image has already been gamma corrected with given gamma. defaults to 1.0 (no correction) - float exposure; // a value of 1.0 in an image corresponds to watts/steradian/m^2. defaults to 1.0 -} rgbeHeaderInfo; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif - -typedef enum { - rgbe_read_error, - rgbe_write_error, - rgbe_format_error, - rgbe_memory_error -} rgbe_error_code; - -// ---------------------------------------------------------- -// Prototypes -// ---------------------------------------------------------- - -static BOOL rgbe_Error(rgbe_error_code error_code, const char *msg); -static BOOL rgbe_GetLine(FreeImageIO *io, fi_handle handle, char *buffer, int length); -static inline void rgbe_FloatToRGBE(BYTE rgbe[4], FIRGBF *rgbf); -static inline void rgbe_RGBEToFloat(FIRGBF *rgbf, BYTE rgbe[4]); -static BOOL rgbe_ReadHeader(FreeImageIO *io, fi_handle handle, unsigned *width, unsigned *height, rgbeHeaderInfo *header_info); -static BOOL rgbe_WriteHeader(FreeImageIO *io, fi_handle handle, unsigned width, unsigned height, rgbeHeaderInfo *info); -static BOOL rgbe_ReadPixels(FreeImageIO *io, fi_handle handle, FIRGBF *data, unsigned numpixels); -static BOOL rgbe_WritePixels(FreeImageIO *io, fi_handle handle, FIRGBF *data, unsigned numpixels); -static BOOL rgbe_ReadPixels_RLE(FreeImageIO *io, fi_handle handle, FIRGBF *data, int scanline_width, unsigned num_scanlines); -static BOOL rgbe_WriteBytes_RLE(FreeImageIO *io, fi_handle handle, BYTE *data, int numbytes); -static BOOL rgbe_WritePixels_RLE(FreeImageIO *io, fi_handle handle, FIRGBF *data, unsigned scanline_width, unsigned num_scanlines); -static BOOL rgbe_ReadMetadata(FIBITMAP *dib, rgbeHeaderInfo *header_info); -static BOOL rgbe_WriteMetadata(FIBITMAP *dib, rgbeHeaderInfo *header_info); - -// ---------------------------------------------------------- - -/** -Default error routine. change this to change error handling -*/ -static BOOL -rgbe_Error(rgbe_error_code error_code, const char *msg) { - switch (error_code) { - case rgbe_read_error: - FreeImage_OutputMessageProc(s_format_id, "RGBE read error"); - break; - case rgbe_write_error: - FreeImage_OutputMessageProc(s_format_id, "RGBE write error"); - break; - case rgbe_format_error: - FreeImage_OutputMessageProc(s_format_id, "RGBE bad file format: %s\n", msg); - break; - case rgbe_memory_error: - default: - FreeImage_OutputMessageProc(s_format_id, "RGBE error: %s\n",msg); - } - - return FALSE; -} - -/** -Get a line from a ASCII io stream -*/ -static BOOL -rgbe_GetLine(FreeImageIO *io, fi_handle handle, char *buffer, int length) { - int i; - memset(buffer, 0, length); - for(i = 0; i < length; i++) { - if (!io->read_proc(&buffer[i], 1, 1, handle)) { - return FALSE; - } - if (buffer[i] == 0x0A) { - break; - } - } - - return (i < length) ? TRUE : FALSE; -} - -/** -Standard conversion from float pixels to rgbe pixels. -Note: you can remove the "inline"s if your compiler complains about it -*/ -static inline void -rgbe_FloatToRGBE(BYTE rgbe[4], FIRGBF *rgbf) { - float v = rgbf->red; - if (rgbf->green > v) { - v = rgbf->green; - } - if (rgbf->blue > v) { - v = rgbf->blue; - } - if (v < 1e-32) { - rgbe[0] = rgbe[1] = rgbe[2] = rgbe[3] = 0; - } - else { - int e; - v = (float)(frexp(v, &e) * 256.0 / v); - rgbe[0] = (BYTE) (rgbf->red * v); - rgbe[1] = (BYTE) (rgbf->green * v); - rgbe[2] = (BYTE) (rgbf->blue * v); - rgbe[3] = (BYTE) (e + 128); - } -} - -/** -Standard conversion from rgbe to float pixels. -Note: Ward uses ldexp(col+0.5,exp-(128+8)). -However we wanted pixels in the range [0,1] to map back into the range [0,1]. -*/ -static inline void -rgbe_RGBEToFloat(FIRGBF *rgbf, BYTE rgbe[4]) { - if (rgbe[3]) { // nonzero pixel - const float f = (float)(ldexp(1.0, rgbe[3] - (int)(128+8))); - rgbf->red = rgbe[0] * f; - rgbf->green = rgbe[1] * f; - rgbf->blue = rgbe[2] * f; - } - else { - rgbf->red = rgbf->green = rgbf->blue = 0; - } -} - -/** -Minimal header reading. Modify if you want to parse more information -*/ -static BOOL -rgbe_ReadHeader(FreeImageIO *io, fi_handle handle, unsigned *width, unsigned *height, rgbeHeaderInfo *header_info) { - char buf[HDR_MAXLINE]; - float tempf; - int i; - BOOL bFormatFound = FALSE; - BOOL bHeaderFound = FALSE; - - header_info->valid = 0; - header_info->programtype[0] = 0; - header_info->gamma = 1.0; - header_info->exposure = 1.0; - - // get the first line - if (!rgbe_GetLine(io, handle, buf, HDR_MAXLINE)) { - return rgbe_Error(rgbe_read_error, NULL); - } - - // check the signature - - if ((buf[0] != '#')||(buf[1] != '?')) { - // if you don't want to require the magic token then comment the next line - return rgbe_Error(rgbe_format_error,"bad initial token"); - } - else { - header_info->valid |= RGBE_VALID_PROGRAMTYPE; - for(i = 0; i < sizeof(header_info->programtype) - 1; i++) { - if ((buf[i + 2] == 0) || isspace(buf[i + 2])) { - break; - } - header_info->programtype[i] = buf[i+2]; - } - header_info->programtype[i] = 0; - } - - for(;;) { - // get next line - if (!rgbe_GetLine(io, handle, buf, HDR_MAXLINE)) { - return rgbe_Error(rgbe_read_error, NULL); - } - - if((buf[0] == 0) || (buf[0] == '\n')) { - // end of header so break out of loop - bHeaderFound = TRUE; - break; - } - else if(strcmp(buf,"FORMAT=32-bit_rle_rgbe\n") == 0) { - bFormatFound = TRUE; - } - else if(sscanf(buf, "GAMMA=%g", &tempf) == 1) { - header_info->gamma = tempf; - header_info->valid |= RGBE_VALID_GAMMA; - } - else if(sscanf(buf,"EXPOSURE=%g",&tempf) == 1) { - header_info->exposure = tempf; - header_info->valid |= RGBE_VALID_EXPOSURE; - } - else if((buf[0] == '#') && (buf[1] == 0x20)) { - header_info->valid |= RGBE_VALID_COMMENT; - strcpy(header_info->comment, buf); - } - } - if(!bHeaderFound || !bFormatFound) { - return rgbe_Error(rgbe_format_error, "invalid header"); - } - - // get next line - if (!rgbe_GetLine(io, handle, buf, HDR_MAXLINE)) { - return rgbe_Error(rgbe_read_error, NULL); - } - - // get the image width & height - if(sscanf(buf,"-Y %d +X %d", height, width) < 2) { - if(sscanf(buf,"+X %d +Y %d", height, width) < 2) { - return rgbe_Error(rgbe_format_error, "missing image size specifier"); - } - } - - return TRUE; -} - -/** - default minimal header. modify if you want more information in header -*/ -static BOOL -rgbe_WriteHeader(FreeImageIO *io, fi_handle handle, unsigned width, unsigned height, rgbeHeaderInfo *info) { - char buffer[HDR_MAXLINE]; - - const char *programtype = "RADIANCE"; - - if(info && (info->valid & RGBE_VALID_PROGRAMTYPE)) { - programtype = info->programtype; - } - // The #? is to identify file type, the programtype is optional - sprintf(buffer, "#?%s\n", programtype); - if (io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1) { - return rgbe_Error(rgbe_write_error, NULL); - } - sprintf(buffer, "%s\n", info->comment); - if (io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1) { - return rgbe_Error(rgbe_write_error, NULL); - } - sprintf(buffer, "FORMAT=32-bit_rle_rgbe\n"); - if (io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1) { - return rgbe_Error(rgbe_write_error, NULL); - } - if(info && (info->valid & RGBE_VALID_GAMMA)) { - sprintf(buffer, "GAMMA=%g\n", info->gamma); - if (io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1) { - return rgbe_Error(rgbe_write_error, NULL); - } - } - if(info && (info->valid & RGBE_VALID_EXPOSURE)) { - sprintf(buffer,"EXPOSURE=%g\n", info->exposure); - if (io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1) { - return rgbe_Error(rgbe_write_error, NULL); - } - } - sprintf(buffer, "\n-Y %d +X %d\n", height, width); - if (io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1) { - return rgbe_Error(rgbe_write_error, NULL); - } - - return TRUE; -} - -static BOOL -rgbe_ReadMetadata(FIBITMAP *dib, rgbeHeaderInfo *header_info) { - return TRUE; -} -static BOOL -rgbe_WriteMetadata(FIBITMAP *dib, rgbeHeaderInfo *header_info) { - header_info->gamma = 1; - header_info->valid |= RGBE_VALID_GAMMA; - header_info->exposure = 1; // default value - header_info->valid |= RGBE_VALID_EXPOSURE; - - return TRUE; -} - -/** -Simple read routine. Will not correctly handle run length encoding -*/ -static BOOL -rgbe_ReadPixels(FreeImageIO *io, fi_handle handle, FIRGBF *data, unsigned numpixels) { - BYTE rgbe[4]; - - for(unsigned x = 0; x < numpixels; x++) { - if(io->read_proc(rgbe, 1, sizeof(rgbe), handle) < 1) { - return rgbe_Error(rgbe_read_error, NULL); - } - rgbe_RGBEToFloat(&data[x], rgbe); - } - - return TRUE; -} - -/** - Simple write routine that does not use run length encoding. - These routines can be made faster by allocating a larger buffer and - fread-ing and fwrite-ing the data in larger chunks. -*/ -static BOOL -rgbe_WritePixels(FreeImageIO *io, fi_handle handle, FIRGBF *data, unsigned numpixels) { - BYTE rgbe[4]; - - for(unsigned x = 0; x < numpixels; x++) { - rgbe_FloatToRGBE(rgbe, &data[x]); - if (io->write_proc(rgbe, sizeof(rgbe), 1, handle) < 1) { - return rgbe_Error(rgbe_write_error, NULL); - } - } - - return TRUE; -} - -static BOOL -rgbe_ReadPixels_RLE(FreeImageIO *io, fi_handle handle, FIRGBF *data, int scanline_width, unsigned num_scanlines) { - BYTE rgbe[4], *scanline_buffer, *ptr, *ptr_end; - int i, count; - BYTE buf[2]; - - if ((scanline_width < 8)||(scanline_width > 0x7fff)) { - // run length encoding is not allowed so read flat - return rgbe_ReadPixels(io, handle, data, scanline_width * num_scanlines); - } - scanline_buffer = NULL; - // read in each successive scanline - while(num_scanlines > 0) { - if(io->read_proc(rgbe, 1, sizeof(rgbe), handle) < 1) { - free(scanline_buffer); - return rgbe_Error(rgbe_read_error,NULL); - } - if((rgbe[0] != 2) || (rgbe[1] != 2) || (rgbe[2] & 0x80)) { - // this file is not run length encoded - rgbe_RGBEToFloat(data, rgbe); - data ++; - free(scanline_buffer); - return rgbe_ReadPixels(io, handle, data, scanline_width * num_scanlines - 1); - } - if((((int)rgbe[2]) << 8 | rgbe[3]) != scanline_width) { - free(scanline_buffer); - return rgbe_Error(rgbe_format_error,"wrong scanline width"); - } - if(scanline_buffer == NULL) { - scanline_buffer = (BYTE*)malloc(sizeof(BYTE) * 4 * scanline_width); - if(scanline_buffer == NULL) { - return rgbe_Error(rgbe_memory_error, "unable to allocate buffer space"); - } - } - - ptr = &scanline_buffer[0]; - // read each of the four channels for the scanline into the buffer - for(i = 0; i < 4; i++) { - ptr_end = &scanline_buffer[(i+1)*scanline_width]; - while(ptr < ptr_end) { - if(io->read_proc(buf, 1, 2 * sizeof(BYTE), handle) < 1) { - free(scanline_buffer); - return rgbe_Error(rgbe_read_error, NULL); - } - if(buf[0] > 128) { - // a run of the same value - count = buf[0] - 128; - if((count == 0) || (count > ptr_end - ptr)) { - free(scanline_buffer); - return rgbe_Error(rgbe_format_error, "bad scanline data"); - } - while (count-- > 0) { - *ptr++ = buf[1]; - } - } - else { - // a non-run - count = buf[0]; - if((count == 0) || (count > ptr_end - ptr)) { - free(scanline_buffer); - return rgbe_Error(rgbe_format_error, "bad scanline data"); - } - *ptr++ = buf[1]; - if(--count > 0) { - if(io->read_proc(ptr, 1, sizeof(BYTE) * count, handle) < 1) { - free(scanline_buffer); - return rgbe_Error(rgbe_read_error, NULL); - } - ptr += count; - } - } - } - } - // now convert data from buffer into floats - for(i = 0; i < scanline_width; i++) { - rgbe[0] = scanline_buffer[i]; - rgbe[1] = scanline_buffer[i+scanline_width]; - rgbe[2] = scanline_buffer[i+2*scanline_width]; - rgbe[3] = scanline_buffer[i+3*scanline_width]; - rgbe_RGBEToFloat(data, rgbe); - data ++; - } - - num_scanlines--; - } - - free(scanline_buffer); - - return TRUE; -} - -/** - The code below is only needed for the run-length encoded files. - Run length encoding adds considerable complexity but does - save some space. For each scanline, each channel (r,g,b,e) is - encoded separately for better compression. - @return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -rgbe_WriteBytes_RLE(FreeImageIO *io, fi_handle handle, BYTE *data, int numbytes) { - static const int MINRUNLENGTH = 4; - int cur, beg_run, run_count, old_run_count, nonrun_count; - BYTE buf[2]; - - cur = 0; - while(cur < numbytes) { - beg_run = cur; - // find next run of length at least 4 if one exists - run_count = old_run_count = 0; - while((run_count < MINRUNLENGTH) && (beg_run < numbytes)) { - beg_run += run_count; - old_run_count = run_count; - run_count = 1; - while((beg_run + run_count < numbytes) && (run_count < 127) && (data[beg_run] == data[beg_run + run_count])) { - run_count++; - } - } - // if data before next big run is a short run then write it as such - if ((old_run_count > 1)&&(old_run_count == beg_run - cur)) { - buf[0] = (BYTE)(128 + old_run_count); // write short run - buf[1] = data[cur]; - if (io->write_proc(buf, 2 * sizeof(BYTE), 1, handle) < 1) { - return rgbe_Error(rgbe_write_error, NULL); - } - cur = beg_run; - } - // write out bytes until we reach the start of the next run - while(cur < beg_run) { - nonrun_count = beg_run - cur; - if (nonrun_count > 128) { - nonrun_count = 128; - } - buf[0] = (BYTE)nonrun_count; - if (io->write_proc(buf, sizeof(buf[0]), 1, handle) < 1) { - return rgbe_Error(rgbe_write_error, NULL); - } - if (io->write_proc(&data[cur], sizeof(data[0]) * nonrun_count, 1, handle) < 1) { - return rgbe_Error(rgbe_write_error, NULL); - } - cur += nonrun_count; - } - // write out next run if one was found - if (run_count >= MINRUNLENGTH) { - buf[0] = (BYTE)(128 + run_count); - buf[1] = data[beg_run]; - if (io->write_proc(buf, sizeof(buf[0]) * 2, 1, handle) < 1) { - return rgbe_Error(rgbe_write_error, NULL); - } - cur += run_count; - } - } - - return TRUE; -} - -static BOOL -rgbe_WritePixels_RLE(FreeImageIO *io, fi_handle handle, FIRGBF *data, unsigned scanline_width, unsigned num_scanlines) { - BYTE rgbe[4]; - BYTE *buffer; - - if ((scanline_width < 8)||(scanline_width > 0x7fff)) { - // run length encoding is not allowed so write flat - return rgbe_WritePixels(io, handle, data, scanline_width * num_scanlines); - } - buffer = (BYTE*)malloc(sizeof(BYTE) * 4 * scanline_width); - if (buffer == NULL) { - // no buffer space so write flat - return rgbe_WritePixels(io, handle, data, scanline_width * num_scanlines); - } - while(num_scanlines-- > 0) { - rgbe[0] = (BYTE)2; - rgbe[1] = (BYTE)2; - rgbe[2] = (BYTE)(scanline_width >> 8); - rgbe[3] = (BYTE)(scanline_width & 0xFF); - if(io->write_proc(rgbe, sizeof(rgbe), 1, handle) < 1) { - free(buffer); - return rgbe_Error(rgbe_write_error, NULL); - } - for(unsigned x = 0; x < scanline_width; x++) { - rgbe_FloatToRGBE(rgbe, data); - buffer[x] = rgbe[0]; - buffer[x+scanline_width] = rgbe[1]; - buffer[x+2*scanline_width] = rgbe[2]; - buffer[x+3*scanline_width] = rgbe[3]; - data ++; - } - // write out each of the four channels separately run length encoded - // first red, then green, then blue, then exponent - for(int i = 0; i < 4; i++) { - BOOL bOK = rgbe_WriteBytes_RLE(io, handle, &buffer[i*scanline_width], scanline_width); - if(!bOK) { - free(buffer); - return bOK; - } - } - } - free(buffer); - - return TRUE; -} - - -// ---------------------------------------------------------- - - - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "HDR"; -} - -static const char * DLL_CALLCONV -Description() { - return "High Dynamic Range Image"; -} - -static const char * DLL_CALLCONV -Extension() { - return "hdr"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/vnd.radiance"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE hdr_signature[] = { '#', '?' }; - BYTE signature[] = { 0, 0 }; - - io->read_proc(signature, 1, 2, handle); - - return (memcmp(hdr_signature, signature, 2) == 0); -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return (type == FIT_RGBF) ? TRUE : FALSE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// -------------------------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - FIBITMAP *dib = NULL; - - if(!handle) { - return NULL; - } - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - try { - - rgbeHeaderInfo header_info; - unsigned width, height; - - // Read the header - if(rgbe_ReadHeader(io, handle, &width, &height, &header_info) == FALSE) { - return NULL; - } - - // allocate a RGBF image - dib = FreeImage_AllocateHeaderT(header_only, FIT_RGBF, width, height); - if(!dib) { - throw FI_MSG_ERROR_MEMORY; - } - - // set the metadata as comments - rgbe_ReadMetadata(dib, &header_info); - - if(header_only) { - // header only mode - return dib; - } - - // read the image pixels and fill the dib - - for(unsigned y = 0; y < height; y++) { - FIRGBF *scanline = (FIRGBF*)FreeImage_GetScanLine(dib, height - 1 - y); - if(!rgbe_ReadPixels_RLE(io, handle, scanline, width, 1)) { - FreeImage_Unload(dib); - return NULL; - } - } - - } - catch(const char *text) { - if(dib != NULL) { - FreeImage_Unload(dib); - } - FreeImage_OutputMessageProc(s_format_id, text); - } - - return dib; -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - if(!dib) return FALSE; - - FREE_IMAGE_TYPE src_type = FreeImage_GetImageType(dib); - if(src_type != FIT_RGBF) { - FreeImage_OutputMessageProc(s_format_id, "FREE_IMAGE_TYPE: Unable to convert from type %d to type %d.\n No such conversion exists.", src_type, FIT_RGBF); - return FALSE; - } - - unsigned width = FreeImage_GetWidth(dib); - unsigned height = FreeImage_GetHeight(dib); - - // write the header - - rgbeHeaderInfo header_info; - memset(&header_info, 0, sizeof(rgbeHeaderInfo)); - // fill the header with correct gamma and exposure - rgbe_WriteMetadata(dib, &header_info); - // fill a comment - sprintf(header_info.comment, "# Made with FreeImage %s", FreeImage_GetVersion()); - if(!rgbe_WriteHeader(io, handle, width, height, &header_info)) { - return FALSE; - } - - // write each scanline - - for(unsigned y = 0; y < height; y++) { - FIRGBF *scanline = (FIRGBF*)FreeImage_GetScanLine(dib, height - 1 - y); - if(!rgbe_WritePixels_RLE(io, handle, scanline, width, 1)) { - return FALSE; - } - } - - return TRUE; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitHDR(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginICO.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginICO.cpp deleted file mode 100644 index c818379..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginICO.cpp +++ /dev/null @@ -1,824 +0,0 @@ -// ========================================================== -// ICO Loader and Writer -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Constants + headers -// ---------------------------------------------------------- - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -// These next two structs represent how the icon information is stored -// in an ICO file. - -typedef struct tagICONHEADER { - WORD idReserved; // reserved - WORD idType; // resource type (1 for icons) - WORD idCount; // how many images? -} ICONHEADER; - -typedef struct tagICONDIRECTORYENTRY { - BYTE bWidth; // width of the image - BYTE bHeight; // height of the image (times 2) - BYTE bColorCount; // number of colors in image (0 if >=8bpp) - BYTE bReserved; // reserved - WORD wPlanes; // color Planes - WORD wBitCount; // bits per pixel - DWORD dwBytesInRes; // how many bytes in this resource? - DWORD dwImageOffset; // where in the file is this image -} ICONDIRENTRY; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif - -// ========================================================== -// Static helpers -// ========================================================== - -/** How wide, in bytes, would this many bits be, DWORD aligned ? -*/ -static int -WidthBytes(int bits) { - return ((((bits) + 31)>>5)<<2); -} - -/** Calculates the size of a single icon image -@return Returns the size for that image -*/ -static DWORD -CalculateImageSize(FIBITMAP* icon_dib) { - DWORD dwNumBytes = 0; - - unsigned colors = FreeImage_GetColorsUsed(icon_dib); - unsigned width = FreeImage_GetWidth(icon_dib); - unsigned height = FreeImage_GetHeight(icon_dib); - unsigned pitch = FreeImage_GetPitch(icon_dib); - - dwNumBytes = sizeof( BITMAPINFOHEADER ); // header - dwNumBytes += colors * sizeof(RGBQUAD); // palette - dwNumBytes += height * pitch; // XOR mask - dwNumBytes += height * WidthBytes(width); // AND mask - - return dwNumBytes; -} - -/** Calculates the file offset for an icon image -@return Returns the file offset for that image -*/ -static DWORD -CalculateImageOffset(std::vector& vPages, int nIndex ) { - DWORD dwSize; - - // calculate the ICO header size - dwSize = sizeof(ICONHEADER); - // add the ICONDIRENTRY's - dwSize += (DWORD)( vPages.size() * sizeof(ICONDIRENTRY) ); - // add the sizes of the previous images - for(int k = 0; k < nIndex; k++) { - FIBITMAP *icon_dib = (FIBITMAP*)vPages[k]; - dwSize += CalculateImageSize(icon_dib); - } - - return dwSize; -} - -/** -Vista icon support -@return Returns TRUE if the bitmap data is stored in PNG format -*/ -static BOOL -IsPNG(FreeImageIO *io, fi_handle handle) { - BYTE png_signature[8] = { 137, 80, 78, 71, 13, 10, 26, 10 }; - BYTE signature[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - - long tell = io->tell_proc(handle); - io->read_proc(&signature, 1, 8, handle); - BOOL bIsPNG = (memcmp(png_signature, signature, 8) == 0); - io->seek_proc(handle, tell, SEEK_SET); - - return bIsPNG; -} - -#ifdef FREEIMAGE_BIGENDIAN -static void -SwapInfoHeader(BITMAPINFOHEADER *header) { - SwapLong(&header->biSize); - SwapLong((DWORD *)&header->biWidth); - SwapLong((DWORD *)&header->biHeight); - SwapShort(&header->biPlanes); - SwapShort(&header->biBitCount); - SwapLong(&header->biCompression); - SwapLong(&header->biSizeImage); - SwapLong((DWORD *)&header->biXPelsPerMeter); - SwapLong((DWORD *)&header->biYPelsPerMeter); - SwapLong(&header->biClrUsed); - SwapLong(&header->biClrImportant); -} - -static void -SwapIconHeader(ICONHEADER *header) { - SwapShort(&header->idReserved); - SwapShort(&header->idType); - SwapShort(&header->idCount); -} - -static void -SwapIconDirEntries(ICONDIRENTRY *ent, int num) { - while(num) { - SwapShort(&ent->wPlanes); - SwapShort(&ent->wBitCount); - SwapLong(&ent->dwBytesInRes); - SwapLong(&ent->dwImageOffset); - num--; - ent++; - } -} -#endif - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "ICO"; -} - -static const char * DLL_CALLCONV -Description() { - return "Windows Icon"; -} - -static const char * DLL_CALLCONV -Extension() { - return "ico"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/vnd.microsoft.icon"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - ICONHEADER icon_header; - - io->read_proc(&icon_header, sizeof(ICONHEADER), 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapIconHeader(&icon_header); -#endif - - return ((icon_header.idReserved == 0) && (icon_header.idType == 1) && (icon_header.idCount > 0)); -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 1) || - (depth == 4) || - (depth == 8) || - (depth == 16) || - (depth == 24) || - (depth == 32) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return (type == FIT_BITMAP) ? TRUE : FALSE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static void * DLL_CALLCONV -Open(FreeImageIO *io, fi_handle handle, BOOL read) { - // Allocate memory for the header structure - ICONHEADER *lpIH = (ICONHEADER*)malloc(sizeof(ICONHEADER)); - if(lpIH == NULL) { - return NULL; - } - - if (read) { - // Read in the header - io->read_proc(lpIH, 1, sizeof(ICONHEADER), handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapIconHeader(lpIH); -#endif - - if(!(lpIH->idReserved == 0) || !(lpIH->idType == 1)) { - // Not an ICO file - free(lpIH); - return NULL; - } - } - else { - // Fill the header - lpIH->idReserved = 0; - lpIH->idType = 1; - lpIH->idCount = 0; - } - - return lpIH; -} - -static void DLL_CALLCONV -Close(FreeImageIO *io, fi_handle handle, void *data) { - // free the header structure - ICONHEADER *lpIH = (ICONHEADER*)data; - free(lpIH); -} - -// ---------------------------------------------------------- - -static int DLL_CALLCONV -PageCount(FreeImageIO *io, fi_handle handle, void *data) { - ICONHEADER *lpIH = (ICONHEADER*)data; - - if(lpIH) { - return lpIH->idCount; - } - return 1; -} - -// ---------------------------------------------------------- - -static FIBITMAP* -LoadStandardIcon(FreeImageIO *io, fi_handle handle, int flags, BOOL header_only) { - FIBITMAP *dib = NULL; - - // load the BITMAPINFOHEADER - BITMAPINFOHEADER bmih; - io->read_proc(&bmih, sizeof(BITMAPINFOHEADER), 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapInfoHeader(&bmih); -#endif - - // allocate the bitmap - int width = bmih.biWidth; - int height = bmih.biHeight / 2; // height == xor + and mask - unsigned bit_count = bmih.biBitCount; - unsigned line = CalculateLine(width, bit_count); - unsigned pitch = CalculatePitch(line); - - // allocate memory for one icon - - dib = FreeImage_AllocateHeader(header_only, width, height, bit_count); - - if (dib == NULL) { - return NULL; - } - - if( bmih.biBitCount <= 8 ) { - // read the palette data - io->read_proc(FreeImage_GetPalette(dib), CalculateUsedPaletteEntries(bit_count) * sizeof(RGBQUAD), 1, handle); -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - RGBQUAD *pal = FreeImage_GetPalette(dib); - for(unsigned i = 0; i < CalculateUsedPaletteEntries(bit_count); i++) { - INPLACESWAP(pal[i].rgbRed, pal[i].rgbBlue); - } -#endif - } - - if(header_only) { - // header only mode - return dib; - } - - // read the icon - io->read_proc(FreeImage_GetBits(dib), height * pitch, 1, handle); - -#ifdef FREEIMAGE_BIGENDIAN - if (bit_count == 16) { - for(int y = 0; y < height; y++) { - WORD *pixel = (WORD *)FreeImage_GetScanLine(dib, y); - for(int x = 0; x < width; x++) { - SwapShort(pixel); - pixel++; - } - } - } -#endif -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - if (bit_count == 24 || bit_count == 32) { - for(int y = 0; y < height; y++) { - BYTE *pixel = FreeImage_GetScanLine(dib, y); - for(int x = 0; x < width; x++) { - INPLACESWAP(pixel[0], pixel[2]); - pixel += (bit_count>>3); - } - } - } -#endif - // bitmap has been loaded successfully! - - // convert to 32bpp and generate an alpha channel - // apply the AND mask only if the image is not 32 bpp - if(((flags & ICO_MAKEALPHA) == ICO_MAKEALPHA) && (bit_count < 32)) { - FIBITMAP *dib32 = FreeImage_ConvertTo32Bits(dib); - FreeImage_Unload(dib); - - if (dib32 == NULL) { - return NULL; - } - - int width_and = WidthBytes(width); - BYTE *line_and = (BYTE *)malloc(width_and); - - if( line_and == NULL ) { - FreeImage_Unload(dib32); - return NULL; - } - - //loop through each line of the AND-mask generating the alpha channel, invert XOR-mask - for(int y = 0; y < height; y++) { - RGBQUAD *quad = (RGBQUAD *)FreeImage_GetScanLine(dib32, y); - io->read_proc(line_and, width_and, 1, handle); - for(int x = 0; x < width; x++) { - quad->rgbReserved = (line_and[x>>3] & (0x80 >> (x & 0x07))) != 0 ? 0 : 0xFF; - if( quad->rgbReserved == 0 ) { - quad->rgbBlue ^= 0xFF; - quad->rgbGreen ^= 0xFF; - quad->rgbRed ^= 0xFF; - } - quad++; - } - } - free(line_and); - - return dib32; - } - - return dib; -} - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - if (page == -1) { - page = 0; - } - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - if (handle != NULL) { - FIBITMAP *dib = NULL; - - // get the icon header - ICONHEADER *icon_header = (ICONHEADER*)data; - - if (icon_header) { - // load the icon descriptions - ICONDIRENTRY *icon_list = (ICONDIRENTRY*)malloc(icon_header->idCount * sizeof(ICONDIRENTRY)); - if(icon_list == NULL) { - return NULL; - } - io->seek_proc(handle, sizeof(ICONHEADER), SEEK_SET); - io->read_proc(icon_list, icon_header->idCount * sizeof(ICONDIRENTRY), 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapIconDirEntries(icon_list, icon_header->idCount); -#endif - - // load the requested icon - if (page < icon_header->idCount) { - // seek to the start of the bitmap data for the icon - io->seek_proc(handle, icon_list[page].dwImageOffset, SEEK_SET); - - if( IsPNG(io, handle) ) { - // Vista icon support - // see http://blogs.msdn.com/b/oldnewthing/archive/2010/10/22/10079192.aspx - dib = FreeImage_LoadFromHandle(FIF_PNG, io, handle, header_only ? FIF_LOAD_NOPIXELS : PNG_DEFAULT); - } - else { - // standard icon support - // see http://msdn.microsoft.com/en-us/library/ms997538.aspx - // see http://blogs.msdn.com/b/oldnewthing/archive/2010/10/18/10077133.aspx - dib = LoadStandardIcon(io, handle, flags, header_only); - } - - free(icon_list); - - return dib; - - } else { - free(icon_list); - FreeImage_OutputMessageProc(s_format_id, "Page doesn't exist"); - } - } else { - FreeImage_OutputMessageProc(s_format_id, "File is not an ICO file"); - } - } - - return NULL; -} - -// ---------------------------------------------------------- - -static BOOL -SaveStandardIcon(FreeImageIO *io, FIBITMAP *dib, fi_handle handle) { - BITMAPINFOHEADER *bmih = NULL; - - // write the BITMAPINFOHEADER - bmih = FreeImage_GetInfoHeader(dib); - bmih->biHeight *= 2; // height == xor + and mask -#ifdef FREEIMAGE_BIGENDIAN - SwapInfoHeader(bmih); -#endif - io->write_proc(bmih, sizeof(BITMAPINFOHEADER), 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapInfoHeader(bmih); -#endif - bmih->biHeight /= 2; - - // write the palette data - if (FreeImage_GetPalette(dib) != NULL) { - RGBQUAD *pal = FreeImage_GetPalette(dib); - FILE_BGRA bgra; - for(unsigned i = 0; i < FreeImage_GetColorsUsed(dib); i++) { - bgra.b = pal[i].rgbBlue; - bgra.g = pal[i].rgbGreen; - bgra.r = pal[i].rgbRed; - bgra.a = pal[i].rgbReserved; - io->write_proc(&bgra, sizeof(FILE_BGRA), 1, handle); - } - } - - // write the bits - int width = bmih->biWidth; - int height = bmih->biHeight; - unsigned bit_count = bmih->biBitCount; - unsigned line = CalculateLine(width, bit_count); - unsigned pitch = CalculatePitch(line); - int size_xor = height * pitch; - int size_and = height * WidthBytes(width); - - // XOR mask -#ifdef FREEIMAGE_BIGENDIAN - if (bit_count == 16) { - WORD pixel; - for(unsigned y = 0; y < FreeImage_GetHeight(dib); y++) { - BYTE *line = FreeImage_GetScanLine(dib, y); - for(unsigned x = 0; x < FreeImage_GetWidth(dib); x++) { - pixel = ((WORD *)line)[x]; - SwapShort(&pixel); - if (io->write_proc(&pixel, sizeof(WORD), 1, handle) != 1) - return FALSE; - } - } - } else -#endif -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - if (bit_count == 24) { - FILE_BGR bgr; - for(unsigned y = 0; y < FreeImage_GetHeight(dib); y++) { - BYTE *line = FreeImage_GetScanLine(dib, y); - for(unsigned x = 0; x < FreeImage_GetWidth(dib); x++) { - RGBTRIPLE *triple = ((RGBTRIPLE *)line)+x; - bgr.b = triple->rgbtBlue; - bgr.g = triple->rgbtGreen; - bgr.r = triple->rgbtRed; - if (io->write_proc(&bgr, sizeof(FILE_BGR), 1, handle) != 1) - return FALSE; - } - } - } else if (bit_count == 32) { - FILE_BGRA bgra; - for(unsigned y = 0; y < FreeImage_GetHeight(dib); y++) { - BYTE *line = FreeImage_GetScanLine(dib, y); - for(unsigned x = 0; x < FreeImage_GetWidth(dib); x++) { - RGBQUAD *quad = ((RGBQUAD *)line)+x; - bgra.b = quad->rgbBlue; - bgra.g = quad->rgbGreen; - bgra.r = quad->rgbRed; - bgra.a = quad->rgbReserved; - if (io->write_proc(&bgra, sizeof(FILE_BGRA), 1, handle) != 1) - return FALSE; - } - } - } else -#endif -#if defined(FREEIMAGE_BIGENDIAN) || FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - { -#endif - BYTE *xor_mask = FreeImage_GetBits(dib); - io->write_proc(xor_mask, size_xor, 1, handle); -#if defined(FREEIMAGE_BIGENDIAN) || FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - } -#endif - // AND mask - BYTE *and_mask = (BYTE*)malloc(size_and); - if(!and_mask) { - return FALSE; - } - - if(FreeImage_IsTransparent(dib)) { - - if(bit_count == 32) { - // create the AND mask from the alpha channel - - int width_and = WidthBytes(width); - BYTE *and_bits = and_mask; - - // clear the mask - memset(and_mask, 0, size_and); - - for(int y = 0; y < height; y++) { - RGBQUAD *bits = (RGBQUAD*)FreeImage_GetScanLine(dib, y); - - for(int x = 0; x < width; x++) { - if(bits[x].rgbReserved != 0xFF) { - // set any transparent color to full transparency - and_bits[x >> 3] |= (0x80 >> (x & 0x7)); - } - } - - and_bits += width_and; - } - } - else if(bit_count <= 8) { - // create the AND mask from the transparency table - - BYTE *trns = FreeImage_GetTransparencyTable(dib); - - int width_and = WidthBytes(width); - BYTE *and_bits = and_mask; - - // clear the mask - memset(and_mask, 0, size_and); - - switch(FreeImage_GetBPP(dib)) { - case 1: - { - for(int y = 0; y < height; y++) { - BYTE *bits = (BYTE*)FreeImage_GetScanLine(dib, y); - for(int x = 0; x < width; x++) { - // get pixel at (x, y) - BYTE index = (bits[x >> 3] & (0x80 >> (x & 0x07))) != 0; - if(trns[index] != 0xFF) { - // set any transparent color to full transparency - and_bits[x >> 3] |= (0x80 >> (x & 0x7)); - } - } - and_bits += width_and; - } - } - break; - - case 4: - { - for(int y = 0; y < height; y++) { - BYTE *bits = (BYTE*)FreeImage_GetScanLine(dib, y); - for(int x = 0; x < width; x++) { - // get pixel at (x, y) - BYTE shift = (BYTE)((1 - x % 2) << 2); - BYTE index = (bits[x >> 1] & (0x0F << shift)) >> shift; - if(trns[index] != 0xFF) { - // set any transparent color to full transparency - and_bits[x >> 3] |= (0x80 >> (x & 0x7)); - } - } - and_bits += width_and; - } - } - break; - - case 8: - { - for(int y = 0; y < height; y++) { - BYTE *bits = (BYTE*)FreeImage_GetScanLine(dib, y); - for(int x = 0; x < width; x++) { - // get pixel at (x, y) - BYTE index = bits[x]; - if(trns[index] != 0xFF) { - // set any transparent color to full transparency - and_bits[x >> 3] |= (0x80 >> (x & 0x7)); - } - } - and_bits += width_and; - } - } - break; - - } - } - } - else { - // empty AND mask - memset(and_mask, 0, size_and); - } - - io->write_proc(and_mask, size_and, 1, handle); - free(and_mask); - - return TRUE; -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - ICONHEADER *icon_header = NULL; - std::vector vPages; - int k; - - if(!dib || !handle || !data) { - return FALSE; - } - - // check format limits - unsigned w = FreeImage_GetWidth(dib); - unsigned h = FreeImage_GetHeight(dib); - if((w < 16) || (w > 256) || (h < 16) || (h > 256) || (w != h)) { - FreeImage_OutputMessageProc(s_format_id, "Unsupported icon size: width x height = %d x %d", w, h); - return FALSE; - } - - if (page == -1) { - page = 0; - } - - // get the icon header - icon_header = (ICONHEADER*)data; - - try { - FIBITMAP *icon_dib = NULL; - - // load all icons - for(k = 0; k < icon_header->idCount; k++) { - icon_dib = Load(io, handle, k, flags, data); - if(!icon_dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - vPages.push_back(icon_dib); - } - - // add the page - icon_dib = FreeImage_Clone(dib); - vPages.push_back(icon_dib); - icon_header->idCount++; - - // write the header - io->seek_proc(handle, 0, SEEK_SET); -#ifdef FREEIMAGE_BIGENDIAN - SwapIconHeader(icon_header); -#endif - io->write_proc(icon_header, sizeof(ICONHEADER), 1, handle); -#ifdef FREEIMAGE_BIGENDIAN - SwapIconHeader(icon_header); -#endif - - // write all icons - // ... - - // save the icon descriptions - - ICONDIRENTRY *icon_list = (ICONDIRENTRY *)malloc(icon_header->idCount * sizeof(ICONDIRENTRY)); - if(!icon_list) { - throw FI_MSG_ERROR_MEMORY; - } - memset(icon_list, 0, icon_header->idCount * sizeof(ICONDIRENTRY)); - - for(k = 0; k < icon_header->idCount; k++) { - icon_dib = (FIBITMAP*)vPages[k]; - - // convert internal format to ICONDIRENTRY - // take into account Vista icons whose size is 256x256 - const BITMAPINFOHEADER *bmih = FreeImage_GetInfoHeader(icon_dib); - icon_list[k].bWidth = (bmih->biWidth > 255) ? 0 : (BYTE)bmih->biWidth; - icon_list[k].bHeight = (bmih->biHeight > 255) ? 0 : (BYTE)bmih->biHeight; - icon_list[k].bReserved = 0; - icon_list[k].wPlanes = bmih->biPlanes; - icon_list[k].wBitCount = bmih->biBitCount; - if( (icon_list[k].wPlanes * icon_list[k].wBitCount) >= 8 ) { - icon_list[k].bColorCount = 0; - } else { - icon_list[k].bColorCount = (BYTE)(1 << (icon_list[k].wPlanes * icon_list[k].wBitCount)); - } - // initial guess (correct only for standard icons) - icon_list[k].dwBytesInRes = CalculateImageSize(icon_dib); - icon_list[k].dwImageOffset = CalculateImageOffset(vPages, k); - } - - // make a room for icon dir entries, until later update - const long directory_start = io->tell_proc(handle); - io->write_proc(icon_list, sizeof(ICONDIRENTRY) * icon_header->idCount, 1, handle); - - // write the image bits for each image - - DWORD dwImageOffset = (DWORD)io->tell_proc(handle); - - for(k = 0; k < icon_header->idCount; k++) { - icon_dib = (FIBITMAP*)vPages[k]; - - if((icon_list[k].bWidth == 0) && (icon_list[k].bHeight == 0)) { - // Vista icon support - FreeImage_SaveToHandle(FIF_PNG, icon_dib, io, handle, PNG_DEFAULT); - } - else { - // standard icon support - // see http://msdn.microsoft.com/en-us/library/ms997538.aspx - SaveStandardIcon(io, icon_dib, handle); - } - - // update ICONDIRENTRY members - DWORD dwBytesInRes = (DWORD)io->tell_proc(handle) - dwImageOffset; - icon_list[k].dwImageOffset = dwImageOffset; - icon_list[k].dwBytesInRes = dwBytesInRes; - dwImageOffset += dwBytesInRes; - } - - // update the icon descriptions - const long current_pos = io->tell_proc(handle); - io->seek_proc(handle, directory_start, SEEK_SET); -#ifdef FREEIMAGE_BIGENDIAN - SwapIconDirEntries(icon_list, icon_header->idCount); -#endif - io->write_proc(icon_list, sizeof(ICONDIRENTRY) * icon_header->idCount, 1, handle); - io->seek_proc(handle, current_pos, SEEK_SET); - - free(icon_list); - - // free the vector class - for(k = 0; k < icon_header->idCount; k++) { - icon_dib = (FIBITMAP*)vPages[k]; - FreeImage_Unload(icon_dib); - } - - return TRUE; - - } catch(const char *text) { - // free the vector class - for(size_t k = 0; k < vPages.size(); k++) { - FIBITMAP *icon_dib = (FIBITMAP*)vPages[k]; - FreeImage_Unload(icon_dib); - } - FreeImage_OutputMessageProc(s_format_id, text); - return FALSE; - } -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitICO(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = Open; - plugin->close_proc = Close; - plugin->pagecount_proc = PageCount; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginIFF.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginIFF.cpp deleted file mode 100644 index ae1f903..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginIFF.cpp +++ /dev/null @@ -1,459 +0,0 @@ -// ========================================================== -// Deluxe Paint Loader -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Mark Sibly (marksibly@blitzbasic.com) -// - Aaron Shumate (trek@startreker.com) -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Internal typedefs and structures -// ---------------------------------------------------------- - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -typedef struct { - WORD w, h; /* raster width & height in pixels */ - WORD x, y; /* position for this image */ - BYTE nPlanes; /* # source bitplanes */ - BYTE masking; /* masking technique */ - BYTE compression; /* compression algorithm */ - BYTE pad1; /* UNUSED. For consistency, put 0 here.*/ - WORD transparentColor; /* transparent "color number" */ - BYTE xAspect, yAspect; /* aspect ratio, a rational number x/y */ - WORD pageWidth, pageHeight; /* source "page" size in pixels */ -} BMHD; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif - -#ifndef FREEIMAGE_BIGENDIAN -static void -SwapHeader(BMHD *header) { - SwapShort(&header->w); - SwapShort(&header->h); - SwapShort(&header->x); - SwapShort(&header->y); - SwapShort(&header->transparentColor); - SwapShort(&header->pageWidth); - SwapShort(&header->pageHeight); -} -#endif - -// ---------------------------------------------------------- - -/* IFF chunk IDs */ - -typedef DWORD IFF_ID; - -#define MAKE_ID(a, b, c, d) ((IFF_ID)(a)<<24 | (IFF_ID)(b)<<16 | (IFF_ID)(c)<<8 | (IFF_ID)(d)) - -#define ID_FORM MAKE_ID('F', 'O', 'R', 'M') /* EA IFF 85 group identifier */ -#define ID_CAT MAKE_ID('C', 'A', 'T', ' ') /* EA IFF 85 group identifier */ -#define ID_LIST MAKE_ID('L', 'I', 'S', 'T') /* EA IFF 85 group identifier */ -#define ID_PROP MAKE_ID('P', 'R', 'O', 'P') /* EA IFF 85 group identifier */ -#define ID_END MAKE_ID('E', 'N', 'D', ' ') /* unofficial END-of-FORM identifier (see Amiga RKM Devices Ed.3 page 376) */ - -#define ID_ILBM MAKE_ID('I', 'L', 'B', 'M') /* EA IFF 85 raster bitmap form */ -#define ID_DEEP MAKE_ID('D', 'E', 'E', 'P') /* Chunky pixel image files (Used in TV Paint) */ -#define ID_RGB8 MAKE_ID('R', 'G', 'B', '8') /* RGB image forms, Turbo Silver (Impulse) */ -#define ID_RGBN MAKE_ID('R', 'G', 'B', 'N') /* RGB image forms, Turbo Silver (Impulse) */ -#define ID_PBM MAKE_ID('P', 'B', 'M', ' ') /* 256-color chunky format (DPaint 2 ?) */ -#define ID_ACBM MAKE_ID('A', 'C', 'B', 'M') /* Amiga Contiguous Bitmap (AmigaBasic) */ -/* generic */ -#define ID_FVER MAKE_ID('F', 'V', 'E', 'R') /* AmigaOS version string */ -#define ID_JUNK MAKE_ID('J', 'U', 'N', 'K') /* always ignore this chunk */ -#define ID_ANNO MAKE_ID('A', 'N', 'N', 'O') /* EA IFF 85 Generic Annotation chunk */ -#define ID_AUTH MAKE_ID('A', 'U', 'T', 'H') /* EA IFF 85 Generic Author chunk */ -#define ID_CHRS MAKE_ID('C', 'H', 'R', 'S') /* EA IFF 85 Generic character string chunk */ -#define ID_NAME MAKE_ID('N', 'A', 'M', 'E') /* EA IFF 85 Generic Name of art, music, etc. chunk */ -#define ID_TEXT MAKE_ID('T', 'E', 'X', 'T') /* EA IFF 85 Generic unformatted ASCII text chunk */ -#define ID_copy MAKE_ID('(', 'c', ')', ' ') /* EA IFF 85 Generic Copyright text chunk */ -/* ILBM chunks */ -#define ID_BMHD MAKE_ID('B', 'M', 'H', 'D') /* ILBM BitmapHeader */ -#define ID_CMAP MAKE_ID('C', 'M', 'A', 'P') /* ILBM 8bit RGB colormap */ -#define ID_GRAB MAKE_ID('G', 'R', 'A', 'B') /* ILBM "hotspot" coordiantes */ -#define ID_DEST MAKE_ID('D', 'E', 'S', 'T') /* ILBM destination image info */ -#define ID_SPRT MAKE_ID('S', 'P', 'R', 'T') /* ILBM sprite identifier */ -#define ID_CAMG MAKE_ID('C', 'A', 'M', 'G') /* Amiga viewportmodes */ -#define ID_BODY MAKE_ID('B', 'O', 'D', 'Y') /* ILBM image data */ -#define ID_CRNG MAKE_ID('C', 'R', 'N', 'G') /* color cycling */ -#define ID_CCRT MAKE_ID('C', 'C', 'R', 'T') /* color cycling */ -#define ID_CLUT MAKE_ID('C', 'L', 'U', 'T') /* Color Lookup Table chunk */ -#define ID_DPI MAKE_ID('D', 'P', 'I', ' ') /* Dots per inch chunk */ -#define ID_DPPV MAKE_ID('D', 'P', 'P', 'V') /* DPaint perspective chunk (EA) */ -#define ID_DRNG MAKE_ID('D', 'R', 'N', 'G') /* DPaint IV enhanced color cycle chunk (EA) */ -#define ID_EPSF MAKE_ID('E', 'P', 'S', 'F') /* Encapsulated Postscript chunk */ -#define ID_CMYK MAKE_ID('C', 'M', 'Y', 'K') /* Cyan, Magenta, Yellow, & Black color map (Soft-Logik) */ -#define ID_CNAM MAKE_ID('C', 'N', 'A', 'M') /* Color naming chunk (Soft-Logik) */ -#define ID_PCHG MAKE_ID('P', 'C', 'H', 'G') /* Line by line palette control information (Sebastiano Vigna) */ -#define ID_PRVW MAKE_ID('P', 'R', 'V', 'W') /* A mini duplicate ILBM used for preview (Gary Bonham) */ -#define ID_XBMI MAKE_ID('X', 'B', 'M', 'I') /* eXtended BitMap Information (Soft-Logik) */ -#define ID_CTBL MAKE_ID('C', 'T', 'B', 'L') /* Newtek Dynamic Ham color chunk */ -#define ID_DYCP MAKE_ID('D', 'Y', 'C', 'P') /* Newtek Dynamic Ham chunk */ -#define ID_SHAM MAKE_ID('S', 'H', 'A', 'M') /* Sliced HAM color chunk */ -#define ID_ABIT MAKE_ID('A', 'B', 'I', 'T') /* ACBM body chunk */ -#define ID_DCOL MAKE_ID('D', 'C', 'O', 'L') /* unofficial direct color */ - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "IFF"; -} - -static const char * DLL_CALLCONV -Description() { - return "IFF Interleaved Bitmap"; -} - -static const char * DLL_CALLCONV -Extension() { - return "iff,lbm"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-iff"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - DWORD type = 0; - - // read chunk type - io->read_proc(&type, 4, 1, handle); -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(&type); -#endif - - if(type != ID_FORM) - return FALSE; - - // skip 4 bytes - io->read_proc(&type, 4, 1, handle); - - // read chunk type - io->read_proc(&type, 4, 1, handle); -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(&type); -#endif - - // File format : ID_PBM = Packed Bitmap, ID_ILBM = Interleaved Bitmap - return (type == ID_ILBM) || (type == ID_PBM); -} - - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - if (handle != NULL) { - FIBITMAP *dib = NULL; - - DWORD type, size; - - io->read_proc(&type, 4, 1, handle); -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(&type); -#endif - - if(type != ID_FORM) - return NULL; - - io->read_proc(&size, 4, 1, handle); -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(&size); -#endif - - io->read_proc(&type, 4, 1, handle); -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(&type); -#endif - - if((type != ID_ILBM) && (type != ID_PBM)) - return NULL; - - size -= 4; - - unsigned width = 0, height = 0, planes = 0, depth = 0, comp = 0; - - while (size) { - DWORD ch_type,ch_size; - - io->read_proc(&ch_type, 4, 1, handle); -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(&ch_type); -#endif - - io->read_proc(&ch_size,4,1,handle ); -#ifndef FREEIMAGE_BIGENDIAN - SwapLong(&ch_size); -#endif - - unsigned ch_end = io->tell_proc(handle) + ch_size; - - if (ch_type == ID_BMHD) { // Bitmap Header - if (dib) - FreeImage_Unload(dib); - - BMHD bmhd; - - io->read_proc(&bmhd, sizeof(bmhd), 1, handle); -#ifndef FREEIMAGE_BIGENDIAN - SwapHeader(&bmhd); -#endif - - width = bmhd.w; - height = bmhd.h; - planes = bmhd.nPlanes; - comp = bmhd.compression; - - if(bmhd.masking & 1) - planes++; // there is a mask ( 'stencil' ) - - if (planes > 8 && planes != 24) - return NULL; - - depth = planes > 8 ? 24 : 8; - - if( depth == 24 ) { - dib = FreeImage_Allocate(width, height, depth, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } else { - dib = FreeImage_Allocate(width, height, depth); - } - } else if (ch_type == ID_CMAP) { // Palette (Color Map) - if (!dib) - return NULL; - - RGBQUAD *pal = FreeImage_GetPalette(dib); - if(pal != NULL) { - unsigned palette_entries = MIN((unsigned)ch_size / 3, FreeImage_GetColorsUsed(dib)); - for (unsigned k = 0; k < palette_entries; k++) { - io->read_proc(&pal[k].rgbRed, 1, 1, handle ); - io->read_proc(&pal[k].rgbGreen, 1, 1, handle ); - io->read_proc(&pal[k].rgbBlue, 1, 1, handle ); - } - } - } else if (ch_type == ID_BODY) { - if (!dib) - return NULL; - - if (type == ID_PBM) { - // NON INTERLACED (LBM) - - unsigned line = FreeImage_GetLine(dib) + 1 & ~1; - - for (unsigned i = 0; i < FreeImage_GetHeight(dib); i++) { - BYTE *bits = FreeImage_GetScanLine(dib, FreeImage_GetHeight(dib) - i - 1); - - if (comp == 1) { - // use RLE compression - - DWORD number_of_bytes_written = 0; - BYTE rle_count; - BYTE byte; - - while (number_of_bytes_written < line) { - io->read_proc(&rle_count, 1, 1, handle); - - if (rle_count < 128) { - for (int k = 0; k < rle_count + 1; k++) { - io->read_proc(&byte, 1, 1, handle); - - bits[number_of_bytes_written++] += byte; - } - } else if (rle_count > 128) { - io->read_proc(&byte, 1, 1, handle); - - for (int k = 0; k < 257 - rle_count; k++) { - bits[number_of_bytes_written++] += byte; - } - } - } - } else { - // don't use compression - - io->read_proc(bits, line, 1, handle); - } - } - - return dib; - } else { - // INTERLACED (ILBM) - - unsigned pixel_size = depth/8; - unsigned n_width=(width+15)&~15; - unsigned plane_size = n_width/8; - unsigned src_size = plane_size * planes; - BYTE *src = (BYTE*)malloc(src_size); - BYTE *dest = FreeImage_GetBits(dib); - - dest += FreeImage_GetPitch(dib) * height; - - for (unsigned y = 0; y < height; y++) { - dest -= FreeImage_GetPitch(dib); - - // read all planes in one hit, - // 'coz PSP compresses across planes... - - if (comp) { - // unpacker algorithm - - for(unsigned x = 0; x < src_size;) { - // read the next source byte into t - signed char t = 0; - io->read_proc(&t, 1, 1, handle); - - if (t >= 0) { - // t = [0..127] => copy the next t+1 bytes literally - unsigned size_to_read = t + 1; - - if((size_to_read + x) > src_size) { - // sanity check for buffer overruns - size_to_read = src_size - x; - io->read_proc(src + x, size_to_read, 1, handle); - x += (t + 1); - } else { - io->read_proc(src + x, size_to_read, 1, handle); - x += size_to_read; - } - } else if (t != -128) { - // t = [-1..-127] => replicate the next byte -t+1 times - BYTE b = 0; - io->read_proc(&b, 1, 1, handle); - unsigned size_to_copy = (unsigned)(-(int)t + 1); - - if((size_to_copy + x) > src_size) { - // sanity check for buffer overruns - size_to_copy = src_size - x; - memset(src + x, b, size_to_copy); - x += (unsigned)(-(int)t + 1); - } else { - memset(src + x, b, size_to_copy); - x += size_to_copy; - } - } - // t = -128 => noop - } - } else { - io->read_proc(src, src_size, 1, handle); - } - - // lazy planar->chunky... - - for (unsigned x = 0; x < width; x++) { - for (unsigned n = 0; n < planes; n++) { - BYTE bit = (BYTE)( src[n * plane_size + (x / 8)] >> ((x^7) & 7) ); - - dest[x * pixel_size + (n / 8)] |= (bit & 1) << (n & 7); - } - } - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - if (depth == 24) { - for (unsigned x = 0; x < width; ++x){ - INPLACESWAP(dest[x * 3], dest[x * 3 + 2]); - } - } -#endif - } - - free(src); - - return dib; - } - } - - // Every odd-length chunk is followed by a 0 pad byte. This pad - // byte is not counted in ch_size. - if (ch_size & 1) { - ch_size++; - ch_end++; - } - - io->seek_proc(handle, ch_end - io->tell_proc(handle), SEEK_CUR); - - size -= ch_size + 8; - } - - if (dib) - FreeImage_Unload(dib); - } - - return 0; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitIFF(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginJ2K.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginJ2K.cpp deleted file mode 100644 index b8bcfc8..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginJ2K.cpp +++ /dev/null @@ -1,328 +0,0 @@ -// ========================================================== -// JPEG2000 J2K codestream Loader and Writer -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "../LibOpenJPEG/openjpeg.h" -#include "J2KHelper.h" - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Internal functions -// ========================================================== - -/** -OpenJPEG Error callback -*/ -static void j2k_error_callback(const char *msg, void *client_data) { - FreeImage_OutputMessageProc(s_format_id, "Error: %s", msg); -} -/** -OpenJPEG Warning callback -*/ -static void j2k_warning_callback(const char *msg, void *client_data) { - FreeImage_OutputMessageProc(s_format_id, "Warning: %s", msg); -} - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "J2K"; -} - -static const char * DLL_CALLCONV -Description() { - return "JPEG-2000 codestream"; -} - -static const char * DLL_CALLCONV -Extension() { - return "j2k,j2c"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/j2k"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE jpc_signature[] = { 0xFF, 0x4F }; - BYTE signature[2] = { 0, 0 }; - - long tell = io->tell_proc(handle); - io->read_proc(signature, 1, sizeof(jpc_signature), handle); - io->seek_proc(handle, tell, SEEK_SET); - - return (memcmp(jpc_signature, signature, sizeof(jpc_signature)) == 0); -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 8) || - (depth == 24) || - (depth == 32) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return ( - (type == FIT_BITMAP) || - (type == FIT_UINT16) || - (type == FIT_RGB16) || - (type == FIT_RGBA16) - ); -} - -// ---------------------------------------------------------- - -static void * DLL_CALLCONV -Open(FreeImageIO *io, fi_handle handle, BOOL read) { - // create the stream wrapper - J2KFIO_t *fio = opj_freeimage_stream_create(io, handle, read); - return fio; -} - -static void DLL_CALLCONV -Close(FreeImageIO *io, fi_handle handle, void *data) { - // destroy the stream wrapper - J2KFIO_t *fio = (J2KFIO_t*)data; - opj_freeimage_stream_destroy(fio); -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - J2KFIO_t *fio = (J2KFIO_t*)data; - if (handle && fio) { - opj_codec_t *d_codec = NULL; // handle to a decompressor - opj_dparameters_t parameters; // decompression parameters - opj_image_t *image = NULL; // decoded image - - FIBITMAP *dib = NULL; - - // check the file format - if(!Validate(io, handle)) { - return NULL; - } - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - // get the OpenJPEG stream - opj_stream_t *d_stream = fio->stream; - - // set decoding parameters to default values - opj_set_default_decoder_parameters(¶meters); - - try { - // decode the JPEG-2000 codestream - - // get a decoder handle - d_codec = opj_create_decompress(OPJ_CODEC_J2K); - - // configure the event callbacks - // catch events using our callbacks (no local context needed here) - opj_set_info_handler(d_codec, NULL, NULL); - opj_set_warning_handler(d_codec, j2k_warning_callback, NULL); - opj_set_error_handler(d_codec, j2k_error_callback, NULL); - - // setup the decoder decoding parameters using user parameters - if( !opj_setup_decoder(d_codec, ¶meters) ) { - throw "Failed to setup the decoder\n"; - } - - // read the main header of the codestream and if necessary the JP2 boxes - if( !opj_read_header(d_stream, d_codec, &image)) { - throw "Failed to read the header\n"; - } - - // --- header only mode - - if (header_only) { - // create output image - dib = J2KImageToFIBITMAP(s_format_id, image, header_only); - if(!dib) { - throw "Failed to import JPEG2000 image"; - } - // clean-up and return header data - opj_destroy_codec(d_codec); - opj_image_destroy(image); - return dib; - } - - // decode the stream and fill the image structure - if( !( opj_decode(d_codec, d_stream, image) && opj_end_decompress(d_codec, d_stream) ) ) { - throw "Failed to decode image!\n"; - } - - // free the codec context - opj_destroy_codec(d_codec); - d_codec = NULL; - - // create output image - dib = J2KImageToFIBITMAP(s_format_id, image, header_only); - if(!dib) { - throw "Failed to import JPEG2000 image"; - } - - // free image data structure - opj_image_destroy(image); - - return dib; - - } catch (const char *text) { - if(dib) { - FreeImage_Unload(dib); - } - // free remaining structures - opj_destroy_codec(d_codec); - opj_image_destroy(image); - - FreeImage_OutputMessageProc(s_format_id, text); - - return NULL; - } - } - - return NULL; -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - J2KFIO_t *fio = (J2KFIO_t*)data; - if (dib && handle && fio) { - BOOL bSuccess; - opj_codec_t *c_codec = NULL; // handle to a compressor - opj_cparameters_t parameters; // compression parameters - opj_image_t *image = NULL; // image to encode - - // get the OpenJPEG stream - opj_stream_t *c_stream = fio->stream; - - // set encoding parameters to default values - opj_set_default_encoder_parameters(¶meters); - - try { - parameters.tcp_numlayers = 0; - // if no rate entered, apply a 16:1 rate by default - if(flags == J2K_DEFAULT) { - parameters.tcp_rates[0] = (float)16; - } else { - // for now, the flags parameter is only used to specify the rate - parameters.tcp_rates[0] = (float)(flags & 0x3FF); - } - parameters.tcp_numlayers++; - parameters.cp_disto_alloc = 1; - - // convert the dib to a OpenJPEG image - image = FIBITMAPToJ2KImage(s_format_id, dib, ¶meters); - if(!image) { - return FALSE; - } - - // decide if MCT should be used - parameters.tcp_mct = (image->numcomps == 3) ? 1 : 0; - - // encode the destination image - - // get a J2K compressor handle - c_codec = opj_create_compress(OPJ_CODEC_J2K); - - // configure the event callbacks - // catch events using our callbacks (no local context needed here) - opj_set_info_handler(c_codec, NULL, NULL); - opj_set_warning_handler(c_codec, j2k_warning_callback, NULL); - opj_set_error_handler(c_codec, j2k_error_callback, NULL); - - // setup the encoder parameters using the current image and using user parameters - opj_setup_encoder(c_codec, ¶meters, image); - - // encode the image - bSuccess = opj_start_compress(c_codec, image, c_stream); - if(bSuccess) { - bSuccess = bSuccess && opj_encode(c_codec, c_stream); - if(bSuccess) { - bSuccess = bSuccess && opj_end_compress(c_codec, c_stream); - } - } - if (!bSuccess) { - throw "Failed to encode image"; - } - - // free remaining compression structures - opj_destroy_codec(c_codec); - - // free image data - opj_image_destroy(image); - - return TRUE; - - } catch (const char *text) { - if(c_codec) opj_destroy_codec(c_codec); - if(image) opj_image_destroy(image); - FreeImage_OutputMessageProc(s_format_id, text); - return FALSE; - } - } - - return FALSE; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitJ2K(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = Open; - plugin->close_proc = Close; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginJNG.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginJNG.cpp deleted file mode 100644 index 817e731..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginJNG.cpp +++ /dev/null @@ -1,162 +0,0 @@ -// ========================================================== -// JNG loader -// -// Design and implementation by -// - Herve Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ---------------------------------------------------------- - -#define JNG_SIGNATURE_SIZE 8 // size of the signature - -// ---------------------------------------------------------- - -// ---------------------------------------------------------- -// mng interface (see MNGHelper.cpp) -// ---------------------------------------------------------- - -FIBITMAP* mng_ReadChunks(int format_id, FreeImageIO *io, fi_handle handle, long Offset, int flags = 0); -BOOL mng_WriteJNG(int format_id, FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int flags); - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "JNG"; -} - -static const char * DLL_CALLCONV -Description() { - return "JPEG Network Graphics"; -} - -static const char * DLL_CALLCONV -Extension() { - return "jng"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-mng"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE jng_signature[8] = { 139, 74, 78, 71, 13, 10, 26, 10 }; - BYTE signature[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - - io->read_proc(&signature, 1, JNG_SIGNATURE_SIZE, handle); - - return (memcmp(jng_signature, signature, JNG_SIGNATURE_SIZE) == 0) ? TRUE : FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 8) || - (depth == 24) || - (depth == 32) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return (type == FIT_BITMAP) ? TRUE : FALSE; -} - -static BOOL DLL_CALLCONV -SupportsICCProfiles() { - return TRUE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - - -// ---------------------------------------------------------- - -static void * DLL_CALLCONV -Open(FreeImageIO *io, fi_handle handle, BOOL read) { - return NULL; -} - -static void DLL_CALLCONV -Close(FreeImageIO *io, fi_handle handle, void *data) { -} - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - long offset = JNG_SIGNATURE_SIZE; // move to skip first 8 bytes of signature - - // check the signature (8 bytes) - if(Validate(io, handle) == FALSE) { - return NULL; - } - - // parse chunks and decode a jng or mng bitmap - return mng_ReadChunks(s_format_id, io, handle, offset, flags); -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - - return mng_WriteJNG(s_format_id, io, dib, handle, flags); -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitJNG(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = Open; - plugin->close_proc = Close; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = SupportsICCProfiles; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginJP2.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginJP2.cpp deleted file mode 100644 index 742fe2c..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginJP2.cpp +++ /dev/null @@ -1,328 +0,0 @@ -// ========================================================== -// JPEG2000 JP2 file format Loader and Writer -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "../LibOpenJPEG/openjpeg.h" -#include "J2KHelper.h" - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Internal functions -// ========================================================== - -/** -OpenJPEG Error callback -*/ -static void jp2_error_callback(const char *msg, void *client_data) { - FreeImage_OutputMessageProc(s_format_id, "Error: %s", msg); -} -/** -OpenJPEG Warning callback -*/ -static void jp2_warning_callback(const char *msg, void *client_data) { - FreeImage_OutputMessageProc(s_format_id, "Warning: %s", msg); -} - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "JP2"; -} - -static const char * DLL_CALLCONV -Description() { - return "JPEG-2000 File Format"; -} - -static const char * DLL_CALLCONV -Extension() { - return "jp2"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/jp2"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE jp2_signature[] = { 0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A }; - BYTE signature[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - - long tell = io->tell_proc(handle); - io->read_proc(signature, 1, sizeof(jp2_signature), handle); - io->seek_proc(handle, tell, SEEK_SET); - - return (memcmp(jp2_signature, signature, sizeof(jp2_signature)) == 0); -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 8) || - (depth == 24) || - (depth == 32) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return ( - (type == FIT_BITMAP) || - (type == FIT_UINT16) || - (type == FIT_RGB16) || - (type == FIT_RGBA16) - ); -} - -// ---------------------------------------------------------- - -static void * DLL_CALLCONV -Open(FreeImageIO *io, fi_handle handle, BOOL read) { - // create the stream wrapper - J2KFIO_t *fio = opj_freeimage_stream_create(io, handle, read); - return fio; -} - -static void DLL_CALLCONV -Close(FreeImageIO *io, fi_handle handle, void *data) { - // destroy the stream wrapper - J2KFIO_t *fio = (J2KFIO_t*)data; - opj_freeimage_stream_destroy(fio); -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - J2KFIO_t *fio = (J2KFIO_t*)data; - if (handle && fio) { - opj_codec_t *d_codec = NULL; // handle to a decompressor - opj_dparameters_t parameters; // decompression parameters - opj_image_t *image = NULL; // decoded image - - FIBITMAP *dib = NULL; - - // check the file format - if(!Validate(io, handle)) { - return NULL; - } - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - // get the OpenJPEG stream - opj_stream_t *d_stream = fio->stream; - - // set decoding parameters to default values - opj_set_default_decoder_parameters(¶meters); - - try { - // decode the JPEG-2000 file - - // get a decoder handle - d_codec = opj_create_decompress(OPJ_CODEC_JP2); - - // configure the event callbacks - // catch events using our callbacks (no local context needed here) - opj_set_info_handler(d_codec, NULL, NULL); - opj_set_warning_handler(d_codec, jp2_warning_callback, NULL); - opj_set_error_handler(d_codec, jp2_error_callback, NULL); - - // setup the decoder decoding parameters using user parameters - if( !opj_setup_decoder(d_codec, ¶meters) ) { - throw "Failed to setup the decoder\n"; - } - - // read the main header of the codestream and if necessary the JP2 boxes - if( !opj_read_header(d_stream, d_codec, &image)) { - throw "Failed to read the header\n"; - } - - // --- header only mode - - if (header_only) { - // create output image - dib = J2KImageToFIBITMAP(s_format_id, image, header_only); - if(!dib) { - throw "Failed to import JPEG2000 image"; - } - // clean-up and return header data - opj_destroy_codec(d_codec); - opj_image_destroy(image); - return dib; - } - - // decode the stream and fill the image structure - if( !( opj_decode(d_codec, d_stream, image) && opj_end_decompress(d_codec, d_stream) ) ) { - throw "Failed to decode image!\n"; - } - - // free the codec context - opj_destroy_codec(d_codec); - d_codec = NULL; - - // create output image - dib = J2KImageToFIBITMAP(s_format_id, image, header_only); - if(!dib) { - throw "Failed to import JPEG2000 image"; - } - - // free image data structure - opj_image_destroy(image); - - return dib; - - } catch (const char *text) { - if(dib) { - FreeImage_Unload(dib); - } - // free remaining structures - opj_destroy_codec(d_codec); - opj_image_destroy(image); - - FreeImage_OutputMessageProc(s_format_id, text); - - return NULL; - } - } - - return NULL; -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - J2KFIO_t *fio = (J2KFIO_t*)data; - if (dib && handle && fio) { - BOOL bSuccess; - opj_codec_t *c_codec = NULL; // handle to a compressor - opj_cparameters_t parameters; // compression parameters - opj_image_t *image = NULL; // image to encode - - // get the OpenJPEG stream - opj_stream_t *c_stream = fio->stream; - - // set encoding parameters to default values - opj_set_default_encoder_parameters(¶meters); - - try { - parameters.tcp_numlayers = 0; - // if no rate entered, apply a 16:1 rate by default - if(flags == JP2_DEFAULT) { - parameters.tcp_rates[0] = (float)16; - } else { - // for now, the flags parameter is only used to specify the rate - parameters.tcp_rates[0] = (float)(flags & 0x3FF); - } - parameters.tcp_numlayers++; - parameters.cp_disto_alloc = 1; - - // convert the dib to a OpenJPEG image - image = FIBITMAPToJ2KImage(s_format_id, dib, ¶meters); - if(!image) { - return FALSE; - } - - // decide if MCT should be used - parameters.tcp_mct = (image->numcomps == 3) ? 1 : 0; - - // encode the destination image - - // get a JP2 compressor handle - c_codec = opj_create_compress(OPJ_CODEC_JP2); - - // configure the event callbacks - // catch events using our callbacks (no local context needed here) - opj_set_info_handler(c_codec, NULL, NULL); - opj_set_warning_handler(c_codec, jp2_warning_callback, NULL); - opj_set_error_handler(c_codec, jp2_error_callback, NULL); - - // setup the encoder parameters using the current image and using user parameters - opj_setup_encoder(c_codec, ¶meters, image); - - // encode the image - bSuccess = opj_start_compress(c_codec, image, c_stream); - if(bSuccess) { - bSuccess = bSuccess && opj_encode(c_codec, c_stream); - if(bSuccess) { - bSuccess = bSuccess && opj_end_compress(c_codec, c_stream); - } - } - if (!bSuccess) { - throw "Failed to encode image"; - } - - // free remaining compression structures - opj_destroy_codec(c_codec); - - // free image data - opj_image_destroy(image); - - return TRUE; - - } catch (const char *text) { - if(c_codec) opj_destroy_codec(c_codec); - if(image) opj_image_destroy(image); - FreeImage_OutputMessageProc(s_format_id, text); - return FALSE; - } - } - - return FALSE; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitJP2(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = Open; - plugin->close_proc = Close; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginJPEG.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginJPEG.cpp deleted file mode 100644 index 8db177d..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginJPEG.cpp +++ /dev/null @@ -1,1741 +0,0 @@ -// ========================================================== -// JPEG Loader and writer -// Based on code developed by The Independent JPEG Group -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Jan L. Nauta (jln@magentammt.com) -// - Markus Loibl (markus.loibl@epost.de) -// - Karl-Heinz Bussian (khbussian@moss.de) -// - Herv Drolon (drolon@infonie.fr) -// - Jascha Wetzel (jascha@mainia.de) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -extern "C" { -#define XMD_H -#undef FAR -#include - -#include "../LibJPEG/jinclude.h" -#include "../LibJPEG/jpeglib.h" -#include "../LibJPEG/jerror.h" -} - -#include "FreeImage.h" -#include "Utilities.h" - -#include "../Metadata/FreeImageTag.h" - - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ---------------------------------------------------------- -// Constant declarations -// ---------------------------------------------------------- - -#define INPUT_BUF_SIZE 4096 // choose an efficiently fread'able size -#define OUTPUT_BUF_SIZE 4096 // choose an efficiently fwrite'able size - -#define EXIF_MARKER (JPEG_APP0+1) // EXIF marker / Adobe XMP marker -#define ICC_MARKER (JPEG_APP0+2) // ICC profile marker -#define IPTC_MARKER (JPEG_APP0+13) // IPTC marker / BIM marker - -#define ICC_HEADER_SIZE 14 // size of non-profile data in APP2 -#define MAX_BYTES_IN_MARKER 65533L // maximum data length of a JPEG marker -#define MAX_DATA_BYTES_IN_MARKER 65519L // maximum data length of a JPEG APP2 marker - -#define MAX_JFXX_THUMB_SIZE (MAX_BYTES_IN_MARKER - 5 - 1) - -#define JFXX_TYPE_JPEG 0x10 // JFIF extension marker: JPEG-compressed thumbnail image -#define JFXX_TYPE_8bit 0x11 // JFIF extension marker: palette thumbnail image -#define JFXX_TYPE_24bit 0x13 // JFIF extension marker: RGB thumbnail image - -// ---------------------------------------------------------- -// Typedef declarations -// ---------------------------------------------------------- - -typedef struct tagErrorManager { - /// "public" fields - struct jpeg_error_mgr pub; - /// for return to caller - jmp_buf setjmp_buffer; -} ErrorManager; - -typedef struct tagSourceManager { - /// public fields - struct jpeg_source_mgr pub; - /// source stream - fi_handle infile; - FreeImageIO *m_io; - /// start of buffer - JOCTET * buffer; - /// have we gotten any data yet ? - boolean start_of_file; -} SourceManager; - -typedef struct tagDestinationManager { - /// public fields - struct jpeg_destination_mgr pub; - /// destination stream - fi_handle outfile; - FreeImageIO *m_io; - /// start of buffer - JOCTET * buffer; -} DestinationManager; - -typedef SourceManager* freeimage_src_ptr; -typedef DestinationManager* freeimage_dst_ptr; -typedef ErrorManager* freeimage_error_ptr; - -// ---------------------------------------------------------- -// Error handling -// ---------------------------------------------------------- - -/** Fatal errors (print message and exit) */ -static inline void -JPEG_EXIT(j_common_ptr cinfo, int code) { - freeimage_error_ptr error_ptr = (freeimage_error_ptr)cinfo->err; - error_ptr->pub.msg_code = code; - error_ptr->pub.error_exit(cinfo); -} - -/** Nonfatal errors (we can keep going, but the data is probably corrupt) */ -static inline void -JPEG_WARNING(j_common_ptr cinfo, int code) { - freeimage_error_ptr error_ptr = (freeimage_error_ptr)cinfo->err; - error_ptr->pub.msg_code = code; - error_ptr->pub.emit_message(cinfo, -1); -} - -/** - Receives control for a fatal error. Information sufficient to - generate the error message has been stored in cinfo->err; call - output_message to display it. Control must NOT return to the caller; - generally this routine will exit() or longjmp() somewhere. -*/ -METHODDEF(void) -jpeg_error_exit (j_common_ptr cinfo) { - freeimage_error_ptr error_ptr = (freeimage_error_ptr)cinfo->err; - - // always display the message - error_ptr->pub.output_message(cinfo); - - // allow JPEG with unknown markers - if(error_ptr->pub.msg_code != JERR_UNKNOWN_MARKER) { - - // let the memory manager delete any temp files before we die - jpeg_destroy(cinfo); - - // return control to the setjmp point - longjmp(error_ptr->setjmp_buffer, 1); - } -} - -/** - Actual output of any JPEG message. Note that this method does not know - how to generate a message, only where to send it. -*/ -METHODDEF(void) -jpeg_output_message (j_common_ptr cinfo) { - char buffer[JMSG_LENGTH_MAX]; - freeimage_error_ptr error_ptr = (freeimage_error_ptr)cinfo->err; - - // create the message - error_ptr->pub.format_message(cinfo, buffer); - // send it to user's message proc - FreeImage_OutputMessageProc(s_format_id, buffer); -} - -// ---------------------------------------------------------- -// Destination manager -// ---------------------------------------------------------- - -/** - Initialize destination. This is called by jpeg_start_compress() - before any data is actually written. It must initialize - next_output_byte and free_in_buffer. free_in_buffer must be - initialized to a positive value. -*/ -METHODDEF(void) -init_destination (j_compress_ptr cinfo) { - freeimage_dst_ptr dest = (freeimage_dst_ptr) cinfo->dest; - - dest->buffer = (JOCTET *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - OUTPUT_BUF_SIZE * sizeof(JOCTET)); - - dest->pub.next_output_byte = dest->buffer; - dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; -} - -/** - This is called whenever the buffer has filled (free_in_buffer - reaches zero). In typical applications, it should write out the - *entire* buffer (use the saved start address and buffer length; - ignore the current state of next_output_byte and free_in_buffer). - Then reset the pointer & count to the start of the buffer, and - return TRUE indicating that the buffer has been dumped. - free_in_buffer must be set to a positive value when TRUE is - returned. A FALSE return should only be used when I/O suspension is - desired. -*/ -METHODDEF(boolean) -empty_output_buffer (j_compress_ptr cinfo) { - freeimage_dst_ptr dest = (freeimage_dst_ptr) cinfo->dest; - - if (dest->m_io->write_proc(dest->buffer, 1, OUTPUT_BUF_SIZE, dest->outfile) != OUTPUT_BUF_SIZE) { - // let the memory manager delete any temp files before we die - jpeg_destroy((j_common_ptr)cinfo); - - JPEG_EXIT((j_common_ptr)cinfo, JERR_FILE_WRITE); - } - - dest->pub.next_output_byte = dest->buffer; - dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; - - return TRUE; -} - -/** - Terminate destination --- called by jpeg_finish_compress() after all - data has been written. In most applications, this must flush any - data remaining in the buffer. Use either next_output_byte or - free_in_buffer to determine how much data is in the buffer. -*/ -METHODDEF(void) -term_destination (j_compress_ptr cinfo) { - freeimage_dst_ptr dest = (freeimage_dst_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 (dest->m_io->write_proc(dest->buffer, 1, (unsigned int)datacount, dest->outfile) != datacount) { - // let the memory manager delete any temp files before we die - jpeg_destroy((j_common_ptr)cinfo); - - JPEG_EXIT((j_common_ptr)cinfo, JERR_FILE_WRITE); - } - } -} - -// ---------------------------------------------------------- -// Source manager -// ---------------------------------------------------------- - -/** - Initialize source. This is called by jpeg_read_header() before any - data is actually read. Unlike init_destination(), it may leave - bytes_in_buffer set to 0 (in which case a fill_input_buffer() call - will occur immediately). -*/ -METHODDEF(void) -init_source (j_decompress_ptr cinfo) { - freeimage_src_ptr src = (freeimage_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; -} - -/** - This is called whenever bytes_in_buffer has reached zero and more - data is wanted. In typical applications, it should read fresh data - into the buffer (ignoring the current state of next_input_byte and - 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. bytes_in_buffer MUST be set to a positive value - if TRUE is returned. A FALSE return should only be used when I/O - suspension is desired. -*/ -METHODDEF(boolean) -fill_input_buffer (j_decompress_ptr cinfo) { - freeimage_src_ptr src = (freeimage_src_ptr) cinfo->src; - - size_t nbytes = src->m_io->read_proc(src->buffer, 1, INPUT_BUF_SIZE, src->infile); - - if (nbytes <= 0) { - if (src->start_of_file) { - // treat empty input file as fatal error - - // let the memory manager delete any temp files before we die - jpeg_destroy((j_common_ptr)cinfo); - - JPEG_EXIT((j_common_ptr)cinfo, JERR_INPUT_EMPTY); - } - - JPEG_WARNING((j_common_ptr)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; -} - -/** - Skip num_bytes worth of data. The buffer pointer and count should - be advanced over num_bytes input bytes, refilling the buffer as - needed. This is used to skip over a potentially large amount of - uninteresting data (such as an APPn marker). In some applications - it may be possible to optimize away the reading of the skipped data, - but it's not clear that being smart is worth much trouble; large - skips are uncommon. bytes_in_buffer may be zero on return. - A zero or negative skip count should be treated as a no-op. -*/ -METHODDEF(void) -skip_input_data (j_decompress_ptr cinfo, long num_bytes) { - freeimage_src_ptr src = (freeimage_src_ptr) cinfo->src; - - /* 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) { - while (num_bytes > (long) src->pub.bytes_in_buffer) { - num_bytes -= (long) src->pub.bytes_in_buffer; - - (void) fill_input_buffer(cinfo); - - /* note we assume that fill_input_buffer will never return FALSE, - * so suspension need not be handled. - */ - } - - src->pub.next_input_byte += (size_t) num_bytes; - src->pub.bytes_in_buffer -= (size_t) num_bytes; - } -} - -/** - 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 -} - -// ---------------------------------------------------------- -// Source manager & Destination manager setup -// ---------------------------------------------------------- - -/** - 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_freeimage_src (j_decompress_ptr cinfo, fi_handle infile, FreeImageIO *io) { - freeimage_src_ptr src; - - // allocate memory for the buffer. is released automatically in the end - - if (cinfo->src == NULL) { - cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(SourceManager)); - - src = (freeimage_src_ptr) cinfo->src; - - src->buffer = (JOCTET *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_PERMANENT, INPUT_BUF_SIZE * sizeof(JOCTET)); - } - - // initialize the jpeg pointer struct with pointers to functions - - src = (freeimage_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->m_io = io; - src->pub.bytes_in_buffer = 0; // forces fill_input_buffer on first read - src->pub.next_input_byte = NULL; // until buffer loaded -} - -/** - 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_freeimage_dst (j_compress_ptr cinfo, fi_handle outfile, FreeImageIO *io) { - freeimage_dst_ptr dest; - - if (cinfo->dest == NULL) { - cinfo->dest = (struct jpeg_destination_mgr *)(*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(DestinationManager)); - } - - dest = (freeimage_dst_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; - dest->m_io = io; -} - -// ---------------------------------------------------------- -// Special markers read functions -// ---------------------------------------------------------- - -/** - Read JPEG_COM marker (comment) -*/ -static BOOL -jpeg_read_comment(FIBITMAP *dib, const BYTE *dataptr, unsigned int datalen) { - size_t length = datalen; - BYTE *profile = (BYTE*)dataptr; - - // read the comment - char *value = (char*)malloc((length + 1) * sizeof(char)); - if(value == NULL) return FALSE; - memcpy(value, profile, length); - value[length] = '\0'; - - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(tag) { - unsigned int count = (unsigned int)length + 1; // includes the null value - - FreeImage_SetTagID(tag, JPEG_COM); - FreeImage_SetTagKey(tag, "Comment"); - FreeImage_SetTagLength(tag, count); - FreeImage_SetTagCount(tag, count); - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagValue(tag, value); - - // store the tag - FreeImage_SetMetadata(FIMD_COMMENTS, dib, FreeImage_GetTagKey(tag), tag); - - // destroy the tag - FreeImage_DeleteTag(tag); - } - - free(value); - - return TRUE; -} - -/** - Read JPEG_APP2 marker (ICC profile) -*/ - -/** -Handy subroutine to test whether a saved marker is an ICC profile marker. -*/ -static BOOL -marker_is_icc(jpeg_saved_marker_ptr marker) { - // marker identifying string "ICC_PROFILE" (null-terminated) - const BYTE icc_signature[12] = { 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00 }; - - if(marker->marker == ICC_MARKER) { - // verify the identifying string - if(marker->data_length >= ICC_HEADER_SIZE) { - if(memcmp(icc_signature, marker->data, sizeof(icc_signature)) == 0) { - return TRUE; - } - } - } - - return FALSE; -} - -/** - See if there was an ICC profile in the JPEG file being read; - if so, reassemble and return the profile data. - - TRUE is returned if an ICC profile was found, FALSE if not. - If TRUE is returned, *icc_data_ptr is set to point to the - returned data, and *icc_data_len is set to its length. - - IMPORTANT: the data at **icc_data_ptr has been allocated with malloc() - and must be freed by the caller with free() when the caller no longer - needs it. (Alternatively, we could write this routine to use the - IJG library's memory allocator, so that the data would be freed implicitly - at jpeg_finish_decompress() time. But it seems likely that many apps - will prefer to have the data stick around after decompression finishes.) - - NOTE: if the file contains invalid ICC APP2 markers, we just silently - return FALSE. You might want to issue an error message instead. -*/ -static BOOL -jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) { - jpeg_saved_marker_ptr marker; - int num_markers = 0; - int seq_no; - JOCTET *icc_data; - unsigned total_length; - - const int MAX_SEQ_NO = 255; // sufficient since marker numbers are bytes - BYTE marker_present[MAX_SEQ_NO+1]; // 1 if marker found - unsigned data_length[MAX_SEQ_NO+1]; // size of profile data in marker - unsigned data_offset[MAX_SEQ_NO+1]; // offset for data in marker - - *icc_data_ptr = NULL; // avoid confusion if FALSE return - *icc_data_len = 0; - - /** - this first pass over the saved markers discovers whether there are - any ICC markers and verifies the consistency of the marker numbering. - */ - - memset(marker_present, 0, (MAX_SEQ_NO + 1)); - - for(marker = cinfo->marker_list; marker != NULL; marker = marker->next) { - if (marker_is_icc(marker)) { - if (num_markers == 0) { - // number of markers - num_markers = GETJOCTET(marker->data[13]); - } - else if (num_markers != GETJOCTET(marker->data[13])) { - return FALSE; // inconsistent num_markers fields - } - // sequence number - seq_no = GETJOCTET(marker->data[12]); - if (seq_no <= 0 || seq_no > num_markers) { - return FALSE; // bogus sequence number - } - if (marker_present[seq_no]) { - return FALSE; // duplicate sequence numbers - } - marker_present[seq_no] = 1; - data_length[seq_no] = marker->data_length - ICC_HEADER_SIZE; - } - } - - if (num_markers == 0) - return FALSE; - - /** - check for missing markers, count total space needed, - compute offset of each marker's part of the data. - */ - - total_length = 0; - for(seq_no = 1; seq_no <= num_markers; seq_no++) { - if (marker_present[seq_no] == 0) { - return FALSE; // missing sequence number - } - data_offset[seq_no] = total_length; - total_length += data_length[seq_no]; - } - - if (total_length <= 0) - return FALSE; // found only empty markers ? - - // allocate space for assembled data - icc_data = (JOCTET *) malloc(total_length * sizeof(JOCTET)); - if (icc_data == NULL) - return FALSE; // out of memory - - // and fill it in - for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { - if (marker_is_icc(marker)) { - JOCTET FAR *src_ptr; - JOCTET *dst_ptr; - unsigned length; - seq_no = GETJOCTET(marker->data[12]); - dst_ptr = icc_data + data_offset[seq_no]; - src_ptr = marker->data + ICC_HEADER_SIZE; - length = data_length[seq_no]; - while (length--) { - *dst_ptr++ = *src_ptr++; - } - } - } - - *icc_data_ptr = icc_data; - *icc_data_len = total_length; - - return TRUE; -} - -/** - Read JPEG_APPD marker (IPTC or Adobe Photoshop profile) -*/ -static BOOL -jpeg_read_iptc_profile(FIBITMAP *dib, const BYTE *dataptr, unsigned int datalen) { - return read_iptc_profile(dib, dataptr, datalen); -} - -/** - Read JPEG_APP1 marker (XMP profile) - @param dib Input FIBITMAP - @param dataptr Pointer to the APP1 marker - @param datalen APP1 marker length - @return Returns TRUE if successful, FALSE otherwise -*/ -static BOOL -jpeg_read_xmp_profile(FIBITMAP *dib, const BYTE *dataptr, unsigned int datalen) { - // marker identifying string for XMP (null terminated) - const char *xmp_signature = "http://ns.adobe.com/xap/1.0/"; - // XMP signature is 29 bytes long - const size_t xmp_signature_size = strlen(xmp_signature) + 1; - - size_t length = datalen; - BYTE *profile = (BYTE*)dataptr; - - if(length <= xmp_signature_size) { - // avoid reading corrupted or empty data - return FALSE; - } - - // verify the identifying string - - if(memcmp(xmp_signature, profile, strlen(xmp_signature)) == 0) { - // XMP profile - - profile += xmp_signature_size; - length -= xmp_signature_size; - - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(tag) { - FreeImage_SetTagID(tag, JPEG_APP0+1); // 0xFFE1 - FreeImage_SetTagKey(tag, g_TagLib_XMPFieldName); - FreeImage_SetTagLength(tag, (DWORD)length); - FreeImage_SetTagCount(tag, (DWORD)length); - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagValue(tag, profile); - - // store the tag - FreeImage_SetMetadata(FIMD_XMP, dib, FreeImage_GetTagKey(tag), tag); - - // destroy the tag - FreeImage_DeleteTag(tag); - } - - return TRUE; - } - - return FALSE; -} - -/** - Read JFIF "JFXX" extension APP0 marker - @param dib Input FIBITMAP - @param dataptr Pointer to the APP0 marker - @param datalen APP0 marker length - @return Returns TRUE if successful, FALSE otherwise -*/ -static BOOL -jpeg_read_jfxx(FIBITMAP *dib, const BYTE *dataptr, unsigned int datalen) { - if(datalen < 6) { - return FALSE; - } - - const int id_length = 5; - const BYTE *data = dataptr + id_length; - unsigned remaining = datalen - id_length; - - const BYTE type = *data; - ++data, --remaining; - - switch(type) { - case JFXX_TYPE_JPEG: - { - // load the thumbnail - FIMEMORY* hmem = FreeImage_OpenMemory(const_cast(data), remaining); - FIBITMAP* thumbnail = FreeImage_LoadFromMemory(FIF_JPEG, hmem); - FreeImage_CloseMemory(hmem); - // store the thumbnail - FreeImage_SetThumbnail(dib, thumbnail); - // then delete it - FreeImage_Unload(thumbnail); - break; - } - case JFXX_TYPE_8bit: - // colormapped uncompressed thumbnail (no supported) - break; - case JFXX_TYPE_24bit: - // truecolor uncompressed thumbnail (no supported) - break; - default: - break; - } - - return TRUE; -} - - -/** - Read JPEG special markers -*/ -static BOOL -read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) { - jpeg_saved_marker_ptr marker; - - for(marker = cinfo->marker_list; marker != NULL; marker = marker->next) { - switch(marker->marker) { - case JPEG_APP0: - // JFIF is handled by libjpeg already, handle JFXX - if(memcmp(marker->data, "JFIF" , 5) == 0) { - continue; - } - if(memcmp(marker->data, "JFXX" , 5) == 0) { - if(!cinfo->saw_JFIF_marker || cinfo->JFIF_minor_version < 2) { - FreeImage_OutputMessageProc(s_format_id, "Warning: non-standard JFXX segment"); - } - jpeg_read_jfxx(dib, marker->data, marker->data_length); - } - // other values such as 'Picasa' : ignore safely unknown APP0 marker - break; - case JPEG_COM: - // JPEG comment - jpeg_read_comment(dib, marker->data, marker->data_length); - break; - case EXIF_MARKER: - // Exif or Adobe XMP profile - jpeg_read_exif_profile(dib, marker->data, marker->data_length); - jpeg_read_xmp_profile(dib, marker->data, marker->data_length); - jpeg_read_exif_profile_raw(dib, marker->data, marker->data_length); - break; - case IPTC_MARKER: - // IPTC/NAA or Adobe Photoshop profile - jpeg_read_iptc_profile(dib, marker->data, marker->data_length); - break; - } - } - - // ICC profile - BYTE *icc_profile = NULL; - unsigned icc_length = 0; - - if( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) { - // copy ICC profile data - FreeImage_CreateICCProfile(dib, icc_profile, icc_length); - // clean up - free(icc_profile); - } - - return TRUE; -} - -// ---------------------------------------------------------- -// Special markers write functions -// ---------------------------------------------------------- - -/** - Write JPEG_COM marker (comment) -*/ -static BOOL -jpeg_write_comment(j_compress_ptr cinfo, FIBITMAP *dib) { - FITAG *tag = NULL; - - // write user comment as a JPEG_COM marker - FreeImage_GetMetadata(FIMD_COMMENTS, dib, "Comment", &tag); - if(tag) { - const char *tag_value = (char*)FreeImage_GetTagValue(tag); - - if(NULL != tag_value) { - for(long i = 0; i < (long)strlen(tag_value); i+= MAX_BYTES_IN_MARKER) { - jpeg_write_marker(cinfo, JPEG_COM, (BYTE*)tag_value + i, MIN((long)strlen(tag_value + i), MAX_BYTES_IN_MARKER)); - } - return TRUE; - } - } - return FALSE; -} - -/** - Write JPEG_APP2 marker (ICC profile) -*/ -static BOOL -jpeg_write_icc_profile(j_compress_ptr cinfo, FIBITMAP *dib) { - // marker identifying string "ICC_PROFILE" (null-terminated) - BYTE icc_signature[12] = { 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00 }; - - FIICCPROFILE *iccProfile = FreeImage_GetICCProfile(dib); - - if (iccProfile->size && iccProfile->data) { - // ICC_HEADER_SIZE: ICC signature is 'ICC_PROFILE' + 2 bytes - - BYTE *profile = (BYTE*)malloc((iccProfile->size + ICC_HEADER_SIZE) * sizeof(BYTE)); - if(profile == NULL) return FALSE; - memcpy(profile, icc_signature, 12); - - for(long i = 0; i < (long)iccProfile->size; i += MAX_DATA_BYTES_IN_MARKER) { - unsigned length = MIN((long)(iccProfile->size - i), MAX_DATA_BYTES_IN_MARKER); - // sequence number - profile[12] = (BYTE) ((i / MAX_DATA_BYTES_IN_MARKER) + 1); - // number of markers - profile[13] = (BYTE) (iccProfile->size / MAX_DATA_BYTES_IN_MARKER + 1); - - memcpy(profile + ICC_HEADER_SIZE, (BYTE*)iccProfile->data + i, length); - jpeg_write_marker(cinfo, ICC_MARKER, profile, (length + ICC_HEADER_SIZE)); - } - - free(profile); - - return TRUE; - } - - return FALSE; -} - -/** - Write JPEG_APPD marker (IPTC or Adobe Photoshop profile) - @return Returns TRUE if successful, FALSE otherwise -*/ -static BOOL -jpeg_write_iptc_profile(j_compress_ptr cinfo, FIBITMAP *dib) { - //const char *ps_header = "Photoshop 3.0\x08BIM\x04\x04\x0\x0\x0\x0"; - const unsigned tag_length = 26; - - if(FreeImage_GetMetadataCount(FIMD_IPTC, dib)) { - BYTE *profile = NULL; - unsigned profile_size = 0; - - // create a binary profile - if(write_iptc_profile(dib, &profile, &profile_size)) { - - // write the profile - for(long i = 0; i < (long)profile_size; i += 65517L) { - unsigned length = MIN((long)profile_size - i, 65517L); - unsigned roundup = length & 0x01; // needed for Photoshop - BYTE *iptc_profile = (BYTE*)malloc(length + roundup + tag_length); - if(iptc_profile == NULL) break; - // Photoshop identification string - memcpy(&iptc_profile[0], "Photoshop 3.0\x0", 14); - // 8BIM segment type - memcpy(&iptc_profile[14], "8BIM\x04\x04\x0\x0\x0\x0", 10); - // segment size - iptc_profile[24] = (BYTE)(length >> 8); - iptc_profile[25] = (BYTE)(length & 0xFF); - // segment data - memcpy(&iptc_profile[tag_length], &profile[i], length); - if(roundup) - iptc_profile[length + tag_length] = 0; - jpeg_write_marker(cinfo, IPTC_MARKER, iptc_profile, length + roundup + tag_length); - free(iptc_profile); - } - - // release profile - free(profile); - - return TRUE; - } - } - - return FALSE; -} - -/** - Write JPEG_APP1 marker (XMP profile) - @return Returns TRUE if successful, FALSE otherwise -*/ -static BOOL -jpeg_write_xmp_profile(j_compress_ptr cinfo, FIBITMAP *dib) { - // marker identifying string for XMP (null terminated) - const char *xmp_signature = "http://ns.adobe.com/xap/1.0/"; - - FITAG *tag_xmp = NULL; - FreeImage_GetMetadata(FIMD_XMP, dib, g_TagLib_XMPFieldName, &tag_xmp); - - if(tag_xmp) { - const BYTE *tag_value = (BYTE*)FreeImage_GetTagValue(tag_xmp); - - if(NULL != tag_value) { - // XMP signature is 29 bytes long - unsigned int xmp_header_size = (unsigned int)strlen(xmp_signature) + 1; - - DWORD tag_length = FreeImage_GetTagLength(tag_xmp); - - BYTE *profile = (BYTE*)malloc((tag_length + xmp_header_size) * sizeof(BYTE)); - if(profile == NULL) return FALSE; - memcpy(profile, xmp_signature, xmp_header_size); - - for(DWORD i = 0; i < tag_length; i += 65504L) { - unsigned length = MIN((long)(tag_length - i), 65504L); - - memcpy(profile + xmp_header_size, tag_value + i, length); - jpeg_write_marker(cinfo, EXIF_MARKER, profile, (length + xmp_header_size)); - } - - free(profile); - - return TRUE; - } - } - - return FALSE; -} - -/** - Write JPEG_APP1 marker (Exif profile) - @return Returns TRUE if successful, FALSE otherwise -*/ -static BOOL -jpeg_write_exif_profile_raw(j_compress_ptr cinfo, FIBITMAP *dib) { - // marker identifying string for Exif = "Exif\0\0" - BYTE exif_signature[6] = { 0x45, 0x78, 0x69, 0x66, 0x00, 0x00 }; - - FITAG *tag_exif = NULL; - FreeImage_GetMetadata(FIMD_EXIF_RAW, dib, g_TagLib_ExifRawFieldName, &tag_exif); - - if(tag_exif) { - const BYTE *tag_value = (BYTE*)FreeImage_GetTagValue(tag_exif); - - // verify the identifying string - if(memcmp(exif_signature, tag_value, sizeof(exif_signature)) != 0) { - // not an Exif profile - return FALSE; - } - - if(NULL != tag_value) { - DWORD tag_length = FreeImage_GetTagLength(tag_exif); - - BYTE *profile = (BYTE*)malloc(tag_length * sizeof(BYTE)); - if(profile == NULL) return FALSE; - - for(DWORD i = 0; i < tag_length; i += 65504L) { - unsigned length = MIN((long)(tag_length - i), 65504L); - - memcpy(profile, tag_value + i, length); - jpeg_write_marker(cinfo, EXIF_MARKER, profile, length); - } - - free(profile); - - return TRUE; - } - } - - return FALSE; -} - -/** - Write thumbnail (JFXX segment, JPEG compressed) -*/ -static BOOL -jpeg_write_jfxx(j_compress_ptr cinfo, FIBITMAP *dib) { - // get the thumbnail to be stored - FIBITMAP* thumbnail = FreeImage_GetThumbnail(dib); - if(!thumbnail) { - return TRUE; - } - // check for a compatible output format - if((FreeImage_GetImageType(thumbnail) != FIT_BITMAP) || (FreeImage_GetBPP(thumbnail) != 8) && (FreeImage_GetBPP(thumbnail) != 24)) { - FreeImage_OutputMessageProc(s_format_id, FI_MSG_WARNING_INVALID_THUMBNAIL); - return FALSE; - } - - // stores the thumbnail as a baseline JPEG into a memory block - // return the memory block only if its size is within JFXX marker size limit! - FIMEMORY *stream = FreeImage_OpenMemory(); - - if(FreeImage_SaveToMemory(FIF_JPEG, thumbnail, stream, JPEG_BASELINE)) { - // check that the memory block size is within JFXX marker size limit - FreeImage_SeekMemory(stream, 0, SEEK_END); - const long eof = FreeImage_TellMemory(stream); - if(eof > MAX_JFXX_THUMB_SIZE) { - FreeImage_OutputMessageProc(s_format_id, "Warning: attached thumbnail is %d bytes larger than maximum supported size - Thumbnail saving aborted", eof - MAX_JFXX_THUMB_SIZE); - FreeImage_CloseMemory(stream); - return FALSE; - } - } else { - FreeImage_CloseMemory(stream); - return FALSE; - } - - BYTE* thData = NULL; - DWORD thSize = 0; - - FreeImage_AcquireMemory(stream, &thData, &thSize); - - BYTE id_length = 5; //< "JFXX" - BYTE type = JFXX_TYPE_JPEG; - - DWORD totalsize = id_length + sizeof(type) + thSize; - jpeg_write_m_header(cinfo, JPEG_APP0, totalsize); - - jpeg_write_m_byte(cinfo, 'J'); - jpeg_write_m_byte(cinfo, 'F'); - jpeg_write_m_byte(cinfo, 'X'); - jpeg_write_m_byte(cinfo, 'X'); - jpeg_write_m_byte(cinfo, '\0'); - - jpeg_write_m_byte(cinfo, type); - - // write thumbnail to destination. - // We "cram it straight into the data destination module", because write_m_byte is slow - - freeimage_dst_ptr dest = (freeimage_dst_ptr) cinfo->dest; - - BYTE* & out = dest->pub.next_output_byte; - size_t & bufRemain = dest->pub.free_in_buffer; - - const BYTE *thData_end = thData + thSize; - - while(thData < thData_end) { - *(out)++ = *(thData)++; - if (--bufRemain == 0) { - // buffer full - flush - if (!dest->pub.empty_output_buffer(cinfo)) { - break; - } - } - } - - FreeImage_CloseMemory(stream); - - return TRUE; -} - -/** - Write JPEG special markers -*/ -static BOOL -write_markers(j_compress_ptr cinfo, FIBITMAP *dib) { - // write thumbnail as a JFXX marker - jpeg_write_jfxx(cinfo, dib); - - // write user comment as a JPEG_COM marker - jpeg_write_comment(cinfo, dib); - - // write ICC profile - jpeg_write_icc_profile(cinfo, dib); - - // write IPTC profile - jpeg_write_iptc_profile(cinfo, dib); - - // write Adobe XMP profile - jpeg_write_xmp_profile(cinfo, dib); - - // write Exif raw data - jpeg_write_exif_profile_raw(cinfo, dib); - - return TRUE; -} - -// ------------------------------------------------------------ -// Keep original size info when using scale option on loading -// ------------------------------------------------------------ -static void -store_size_info(FIBITMAP *dib, JDIMENSION width, JDIMENSION height) { - char buffer[256]; - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(tag) { - size_t length = 0; - // set the original width - sprintf(buffer, "%d", (int)width); - length = strlen(buffer) + 1; // include the NULL/0 value - FreeImage_SetTagKey(tag, "OriginalJPEGWidth"); - FreeImage_SetTagLength(tag, (DWORD)length); - FreeImage_SetTagCount(tag, (DWORD)length); - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagValue(tag, buffer); - FreeImage_SetMetadata(FIMD_COMMENTS, dib, FreeImage_GetTagKey(tag), tag); - // set the original height - sprintf(buffer, "%d", (int)height); - length = strlen(buffer) + 1; // include the NULL/0 value - FreeImage_SetTagKey(tag, "OriginalJPEGHeight"); - FreeImage_SetTagLength(tag, (DWORD)length); - FreeImage_SetTagCount(tag, (DWORD)length); - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagValue(tag, buffer); - FreeImage_SetMetadata(FIMD_COMMENTS, dib, FreeImage_GetTagKey(tag), tag); - // destroy the tag - FreeImage_DeleteTag(tag); - } -} - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "JPEG"; -} - -static const char * DLL_CALLCONV -Description() { - return "JPEG - JFIF Compliant"; -} - -static const char * DLL_CALLCONV -Extension() { - return "jpg,jif,jpeg,jpe"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return "^\377\330\377"; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/jpeg"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE jpeg_signature[] = { 0xFF, 0xD8 }; - BYTE signature[2] = { 0, 0 }; - - io->read_proc(signature, 1, sizeof(jpeg_signature), handle); - - return (memcmp(jpeg_signature, signature, sizeof(jpeg_signature)) == 0); -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 8) || - (depth == 24) || - (depth == 32) // only if 32-bit CMYK - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return (type == FIT_BITMAP) ? TRUE : FALSE; -} - -static BOOL DLL_CALLCONV -SupportsICCProfiles() { - return TRUE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - if (handle) { - FIBITMAP *dib = NULL; - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - // set up the jpeglib structures - - struct jpeg_decompress_struct cinfo; - ErrorManager fi_error_mgr; - - try { - - // step 1: allocate and initialize JPEG decompression object - - // we set up the normal JPEG error routines, then override error_exit & output_message - cinfo.err = jpeg_std_error(&fi_error_mgr.pub); - fi_error_mgr.pub.error_exit = jpeg_error_exit; - fi_error_mgr.pub.output_message = jpeg_output_message; - - // establish the setjmp return context for jpeg_error_exit to use - if (setjmp(fi_error_mgr.setjmp_buffer)) { - // If we get here, the JPEG code has signaled an error. - // We need to clean up the JPEG object, close the input file, and return. - jpeg_destroy_decompress(&cinfo); - throw (const char*)NULL; - } - - jpeg_create_decompress(&cinfo); - - // step 2a: specify data source (eg, a handle) - - jpeg_freeimage_src(&cinfo, handle, io); - - // step 2b: save special markers for later reading - - jpeg_save_markers(&cinfo, JPEG_COM, 0xFFFF); - for(int m = 0; m < 16; m++) { - jpeg_save_markers(&cinfo, JPEG_APP0 + m, 0xFFFF); - } - - // step 3: read handle parameters with jpeg_read_header() - - jpeg_read_header(&cinfo, TRUE); - - // step 4: set parameters for decompression - - unsigned int scale_denom = 1; // fraction by which to scale image - int requested_size = flags >> 16; // requested user size in pixels - if(requested_size > 0) { - // the JPEG codec can perform x2, x4 or x8 scaling on loading - // try to find the more appropriate scaling according to user's need - double scale = MAX((double)cinfo.image_width, (double)cinfo.image_height) / (double)requested_size; - if(scale >= 8) { - scale_denom = 8; - } else if(scale >= 4) { - scale_denom = 4; - } else if(scale >= 2) { - scale_denom = 2; - } - } - cinfo.scale_num = 1; - cinfo.scale_denom = scale_denom; - - if ((flags & JPEG_ACCURATE) != JPEG_ACCURATE) { - cinfo.dct_method = JDCT_IFAST; - cinfo.do_fancy_upsampling = FALSE; - } - - if ((flags & JPEG_GREYSCALE) == JPEG_GREYSCALE) { - // force loading as a 8-bit greyscale image - cinfo.out_color_space = JCS_GRAYSCALE; - } - - // step 5a: start decompressor and calculate output width and height - - jpeg_start_decompress(&cinfo); - - // step 5b: allocate dib and init header - - if((cinfo.output_components == 4) && (cinfo.out_color_space == JCS_CMYK)) { - // CMYK image - if((flags & JPEG_CMYK) == JPEG_CMYK) { - // load as CMYK - dib = FreeImage_AllocateHeader(header_only, cinfo.output_width, cinfo.output_height, 32, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(!dib) throw FI_MSG_ERROR_DIB_MEMORY; - FreeImage_GetICCProfile(dib)->flags |= FIICC_COLOR_IS_CMYK; - } else { - // load as CMYK and convert to RGB - dib = FreeImage_AllocateHeader(header_only, cinfo.output_width, cinfo.output_height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(!dib) throw FI_MSG_ERROR_DIB_MEMORY; - } - } else { - // RGB or greyscale image - dib = FreeImage_AllocateHeader(header_only, cinfo.output_width, cinfo.output_height, 8 * cinfo.output_components, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(!dib) throw FI_MSG_ERROR_DIB_MEMORY; - - if (cinfo.output_components == 1) { - // build a greyscale palette - RGBQUAD *colors = FreeImage_GetPalette(dib); - - for (int i = 0; i < 256; i++) { - colors[i].rgbRed = (BYTE)i; - colors[i].rgbGreen = (BYTE)i; - colors[i].rgbBlue = (BYTE)i; - } - } - } - if(scale_denom != 1) { - // store original size info if a scaling was requested - store_size_info(dib, cinfo.image_width, cinfo.image_height); - } - - // step 5c: handle metrices - - if (cinfo.density_unit == 1) { - // dots/inch - FreeImage_SetDotsPerMeterX(dib, (unsigned) (((float)cinfo.X_density) / 0.0254000 + 0.5)); - FreeImage_SetDotsPerMeterY(dib, (unsigned) (((float)cinfo.Y_density) / 0.0254000 + 0.5)); - } else if (cinfo.density_unit == 2) { - // dots/cm - FreeImage_SetDotsPerMeterX(dib, (unsigned) (cinfo.X_density * 100)); - FreeImage_SetDotsPerMeterY(dib, (unsigned) (cinfo.Y_density * 100)); - } - - // step 6: read special markers - - read_markers(&cinfo, dib); - - // --- header only mode => clean-up and return - - if (header_only) { - // release JPEG decompression object - jpeg_destroy_decompress(&cinfo); - // return header data - return dib; - } - - // step 7a: while (scan lines remain to be read) jpeg_read_scanlines(...); - - if((cinfo.out_color_space == JCS_CMYK) && ((flags & JPEG_CMYK) != JPEG_CMYK)) { - // convert from CMYK to RGB - - JSAMPARRAY buffer; // output row buffer - unsigned row_stride; // physical row width in output buffer - - // JSAMPLEs per row in output buffer - row_stride = cinfo.output_width * cinfo.output_components; - // make a one-row-high sample array that will go away when done with image - buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); - - while (cinfo.output_scanline < cinfo.output_height) { - JSAMPROW src = buffer[0]; - JSAMPROW dst = FreeImage_GetScanLine(dib, cinfo.output_height - cinfo.output_scanline - 1); - - jpeg_read_scanlines(&cinfo, buffer, 1); - - for(unsigned x = 0; x < cinfo.output_width; x++) { - WORD K = (WORD)src[3]; - dst[FI_RGBA_RED] = (BYTE)((K * src[0]) / 255); // C -> R - dst[FI_RGBA_GREEN] = (BYTE)((K * src[1]) / 255); // M -> G - dst[FI_RGBA_BLUE] = (BYTE)((K * src[2]) / 255); // Y -> B - src += 4; - dst += 3; - } - } - - // if original image is CMYK but is converted to RGB, remove ICC profile from Exif-TIFF metadata - FreeImage_SetMetadata(FIMD_EXIF_MAIN, dib, "InterColorProfile", NULL); - - } else if((cinfo.out_color_space == JCS_CMYK) && ((flags & JPEG_CMYK) == JPEG_CMYK)) { - // convert from LibJPEG CMYK to standard CMYK - - JSAMPARRAY buffer; // output row buffer - unsigned row_stride; // physical row width in output buffer - - // JSAMPLEs per row in output buffer - row_stride = cinfo.output_width * cinfo.output_components; - // make a one-row-high sample array that will go away when done with image - buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); - - while (cinfo.output_scanline < cinfo.output_height) { - JSAMPROW src = buffer[0]; - JSAMPROW dst = FreeImage_GetScanLine(dib, cinfo.output_height - cinfo.output_scanline - 1); - - jpeg_read_scanlines(&cinfo, buffer, 1); - - for(unsigned x = 0; x < cinfo.output_width; x++) { - // CMYK pixels are inverted - dst[0] = ~src[0]; // C - dst[1] = ~src[1]; // M - dst[2] = ~src[2]; // Y - dst[3] = ~src[3]; // K - src += 4; - dst += 4; - } - } - - } else { - // normal case (RGB or greyscale image) - - while (cinfo.output_scanline < cinfo.output_height) { - JSAMPROW dst = FreeImage_GetScanLine(dib, cinfo.output_height - cinfo.output_scanline - 1); - - jpeg_read_scanlines(&cinfo, &dst, 1); - } - - // step 7b: swap red and blue components (see LibJPEG/jmorecfg.h: #define RGB_RED, ...) - // The default behavior of the JPEG library is kept "as is" because LibTIFF uses - // LibJPEG "as is". - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - SwapRedBlue32(dib); -#endif - } - - // step 8: finish decompression - - jpeg_finish_decompress(&cinfo); - - // step 9: release JPEG decompression object - - jpeg_destroy_decompress(&cinfo); - - // check for automatic Exif rotation - if(!header_only && ((flags & JPEG_EXIFROTATE) == JPEG_EXIFROTATE)) { - RotateExif(&dib); - } - - // everything went well. return the loaded dib - - return dib; - - } catch (const char *text) { - jpeg_destroy_decompress(&cinfo); - if(NULL != dib) { - FreeImage_Unload(dib); - } - if(NULL != text) { - FreeImage_OutputMessageProc(s_format_id, text); - } - } - } - - return NULL; -} - -// ---------------------------------------------------------- - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - if ((dib) && (handle)) { - try { - // Check dib format - - const char *sError = "only 24-bit RGB, 8-bit greyscale/palette or 32-bit CMYK bitmaps can be saved as JPEG"; - - FREE_IMAGE_COLOR_TYPE color_type = FreeImage_GetColorType(dib); - WORD bpp = (WORD)FreeImage_GetBPP(dib); - - if ((bpp != 24) && (bpp != 8) && !(bpp == 32 && (color_type == FIC_CMYK))) { - throw sError; - } - - if(bpp == 8) { - // allow grey, reverse grey and palette - if ((color_type != FIC_MINISBLACK) && (color_type != FIC_MINISWHITE) && (color_type != FIC_PALETTE)) { - throw sError; - } - } - - - struct jpeg_compress_struct cinfo; - ErrorManager fi_error_mgr; - - // Step 1: allocate and initialize JPEG compression object - - // we set up the normal JPEG error routines, then override error_exit & output_message - cinfo.err = jpeg_std_error(&fi_error_mgr.pub); - fi_error_mgr.pub.error_exit = jpeg_error_exit; - fi_error_mgr.pub.output_message = jpeg_output_message; - - // establish the setjmp return context for jpeg_error_exit to use - if (setjmp(fi_error_mgr.setjmp_buffer)) { - // If we get here, the JPEG code has signaled an error. - // We need to clean up the JPEG object, close the input file, and return. - jpeg_destroy_compress(&cinfo); - throw (const char*)NULL; - } - - // Now we can initialize the JPEG compression object - - jpeg_create_compress(&cinfo); - - // Step 2: specify data destination (eg, a file) - - jpeg_freeimage_dst(&cinfo, handle, io); - - // Step 3: set parameters for compression - - cinfo.image_width = FreeImage_GetWidth(dib); - cinfo.image_height = FreeImage_GetHeight(dib); - - switch(color_type) { - case FIC_MINISBLACK : - case FIC_MINISWHITE : - cinfo.in_color_space = JCS_GRAYSCALE; - cinfo.input_components = 1; - break; - case FIC_CMYK: - cinfo.in_color_space = JCS_CMYK; - cinfo.input_components = 4; - break; - default : - cinfo.in_color_space = JCS_RGB; - cinfo.input_components = 3; - break; - } - - jpeg_set_defaults(&cinfo); - - // progressive-JPEG support - if((flags & JPEG_PROGRESSIVE) == JPEG_PROGRESSIVE) { - jpeg_simple_progression(&cinfo); - } - - // compute optimal Huffman coding tables for the image - if((flags & JPEG_OPTIMIZE) == JPEG_OPTIMIZE) { - cinfo.optimize_coding = TRUE; - } - - // Set JFIF density parameters from the DIB data - - cinfo.X_density = (UINT16) (0.5 + 0.0254 * FreeImage_GetDotsPerMeterX(dib)); - cinfo.Y_density = (UINT16) (0.5 + 0.0254 * FreeImage_GetDotsPerMeterY(dib)); - cinfo.density_unit = 1; // dots / inch - - // thumbnail support (JFIF 1.02 extension markers) - if(FreeImage_GetThumbnail(dib) != NULL) { - cinfo.write_JFIF_header = static_cast(1); //<### force it, though when color is CMYK it will be incorrect - cinfo.JFIF_minor_version = 2; - } - - // baseline JPEG support - if ((flags & JPEG_BASELINE) == JPEG_BASELINE) { - cinfo.write_JFIF_header = static_cast(0); // No marker for non-JFIF colorspaces - cinfo.write_Adobe_marker = static_cast(0); // write no Adobe marker by default - } - - // set subsampling options if required - - if(cinfo.in_color_space == JCS_RGB) { - if((flags & JPEG_SUBSAMPLING_411) == JPEG_SUBSAMPLING_411) { - // 4:1:1 (4x1 1x1 1x1) - CrH 25% - CbH 25% - CrV 100% - CbV 100% - // the horizontal color resolution is quartered - cinfo.comp_info[0].h_samp_factor = 4; // Y - cinfo.comp_info[0].v_samp_factor = 1; - cinfo.comp_info[1].h_samp_factor = 1; // Cb - cinfo.comp_info[1].v_samp_factor = 1; - cinfo.comp_info[2].h_samp_factor = 1; // Cr - cinfo.comp_info[2].v_samp_factor = 1; - } else if((flags & JPEG_SUBSAMPLING_420) == JPEG_SUBSAMPLING_420) { - // 4:2:0 (2x2 1x1 1x1) - CrH 50% - CbH 50% - CrV 50% - CbV 50% - // the chrominance resolution in both the horizontal and vertical directions is cut in half - cinfo.comp_info[0].h_samp_factor = 2; // Y - cinfo.comp_info[0].v_samp_factor = 2; - cinfo.comp_info[1].h_samp_factor = 1; // Cb - cinfo.comp_info[1].v_samp_factor = 1; - cinfo.comp_info[2].h_samp_factor = 1; // Cr - cinfo.comp_info[2].v_samp_factor = 1; - } else if((flags & JPEG_SUBSAMPLING_422) == JPEG_SUBSAMPLING_422){ //2x1 (low) - // 4:2:2 (2x1 1x1 1x1) - CrH 50% - CbH 50% - CrV 100% - CbV 100% - // half of the horizontal resolution in the chrominance is dropped (Cb & Cr), - // while the full resolution is retained in the vertical direction, with respect to the luminance - cinfo.comp_info[0].h_samp_factor = 2; // Y - cinfo.comp_info[0].v_samp_factor = 1; - cinfo.comp_info[1].h_samp_factor = 1; // Cb - cinfo.comp_info[1].v_samp_factor = 1; - cinfo.comp_info[2].h_samp_factor = 1; // Cr - cinfo.comp_info[2].v_samp_factor = 1; - } - else if((flags & JPEG_SUBSAMPLING_444) == JPEG_SUBSAMPLING_444){ //1x1 (no subsampling) - // 4:4:4 (1x1 1x1 1x1) - CrH 100% - CbH 100% - CrV 100% - CbV 100% - // the resolution of chrominance information (Cb & Cr) is preserved - // at the same rate as the luminance (Y) information - cinfo.comp_info[0].h_samp_factor = 1; // Y - cinfo.comp_info[0].v_samp_factor = 1; - cinfo.comp_info[1].h_samp_factor = 1; // Cb - cinfo.comp_info[1].v_samp_factor = 1; - cinfo.comp_info[2].h_samp_factor = 1; // Cr - cinfo.comp_info[2].v_samp_factor = 1; - } - } - - // Step 4: set quality - // the first 7 bits are reserved for low level quality settings - // the other bits are high level (i.e. enum-ish) - - int quality; - - if ((flags & JPEG_QUALITYBAD) == JPEG_QUALITYBAD) { - quality = 10; - } else if ((flags & JPEG_QUALITYAVERAGE) == JPEG_QUALITYAVERAGE) { - quality = 25; - } else if ((flags & JPEG_QUALITYNORMAL) == JPEG_QUALITYNORMAL) { - quality = 50; - } else if ((flags & JPEG_QUALITYGOOD) == JPEG_QUALITYGOOD) { - quality = 75; - } else if ((flags & JPEG_QUALITYSUPERB) == JPEG_QUALITYSUPERB) { - quality = 100; - } else { - if ((flags & 0x7F) == 0) { - quality = 75; - } else { - quality = flags & 0x7F; - } - } - - jpeg_set_quality(&cinfo, quality, TRUE); /* limit to baseline-JPEG values */ - - // Step 5: Start compressor - - jpeg_start_compress(&cinfo, TRUE); - - // Step 6: Write special markers - - if ((flags & JPEG_BASELINE) != JPEG_BASELINE) { - write_markers(&cinfo, dib); - } - - // Step 7: while (scan lines remain to be written) - - if(color_type == FIC_RGB) { - // 24-bit RGB image : need to swap red and blue channels - unsigned pitch = FreeImage_GetPitch(dib); - BYTE *target = (BYTE*)malloc(pitch * sizeof(BYTE)); - if (target == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - while (cinfo.next_scanline < cinfo.image_height) { - // get a copy of the scanline - memcpy(target, FreeImage_GetScanLine(dib, FreeImage_GetHeight(dib) - cinfo.next_scanline - 1), pitch); -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - // swap R and B channels - BYTE *target_p = target; - for(unsigned x = 0; x < cinfo.image_width; x++) { - INPLACESWAP(target_p[0], target_p[2]); - target_p += 3; - } -#endif - // write the scanline - jpeg_write_scanlines(&cinfo, &target, 1); - } - free(target); - } - else if(color_type == FIC_CMYK) { - unsigned pitch = FreeImage_GetPitch(dib); - BYTE *target = (BYTE*)malloc(pitch * sizeof(BYTE)); - if (target == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - while (cinfo.next_scanline < cinfo.image_height) { - // get a copy of the scanline - memcpy(target, FreeImage_GetScanLine(dib, FreeImage_GetHeight(dib) - cinfo.next_scanline - 1), pitch); - - BYTE *target_p = target; - for(unsigned x = 0; x < cinfo.image_width; x++) { - // CMYK pixels are inverted - target_p[0] = ~target_p[0]; // C - target_p[1] = ~target_p[1]; // M - target_p[2] = ~target_p[2]; // Y - target_p[3] = ~target_p[3]; // K - - target_p += 4; - } - - // write the scanline - jpeg_write_scanlines(&cinfo, &target, 1); - } - free(target); - } - else if(color_type == FIC_MINISBLACK) { - // 8-bit standard greyscale images - while (cinfo.next_scanline < cinfo.image_height) { - JSAMPROW b = FreeImage_GetScanLine(dib, FreeImage_GetHeight(dib) - cinfo.next_scanline - 1); - - jpeg_write_scanlines(&cinfo, &b, 1); - } - } - else if(color_type == FIC_PALETTE) { - // 8-bit palettized images are converted to 24-bit images - RGBQUAD *palette = FreeImage_GetPalette(dib); - BYTE *target = (BYTE*)malloc(cinfo.image_width * 3); - if (target == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - while (cinfo.next_scanline < cinfo.image_height) { - BYTE *source = FreeImage_GetScanLine(dib, FreeImage_GetHeight(dib) - cinfo.next_scanline - 1); - FreeImage_ConvertLine8To24(target, source, cinfo.image_width, palette); - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - // swap R and B channels - BYTE *target_p = target; - for(unsigned x = 0; x < cinfo.image_width; x++) { - INPLACESWAP(target_p[0], target_p[2]); - target_p += 3; - } -#endif - - - jpeg_write_scanlines(&cinfo, &target, 1); - } - - free(target); - } - else if(color_type == FIC_MINISWHITE) { - // reverse 8-bit greyscale image, so reverse grey value on the fly - unsigned i; - BYTE reverse[256]; - BYTE *target = (BYTE *)malloc(cinfo.image_width); - if (target == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - for(i = 0; i < 256; i++) { - reverse[i] = (BYTE)(255 - i); - } - - while(cinfo.next_scanline < cinfo.image_height) { - BYTE *source = FreeImage_GetScanLine(dib, FreeImage_GetHeight(dib) - cinfo.next_scanline - 1); - for(i = 0; i < cinfo.image_width; i++) { - target[i] = reverse[ source[i] ]; - } - jpeg_write_scanlines(&cinfo, &target, 1); - } - - free(target); - } - - // Step 8: Finish compression - - jpeg_finish_compress(&cinfo); - - // Step 9: release JPEG compression object - - jpeg_destroy_compress(&cinfo); - - return TRUE; - - } catch (const char *text) { - if(text) { - FreeImage_OutputMessageProc(s_format_id, text); - } - return FALSE; - } - } - - return FALSE; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitJPEG(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = SupportsICCProfiles; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginJXR.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginJXR.cpp deleted file mode 100644 index 0e14e09..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginJXR.cpp +++ /dev/null @@ -1,1475 +0,0 @@ -// ========================================================== -// JPEG XR Loader & Writer -// -// Design and implementation by -// - Herve Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "../Metadata/FreeImageTag.h" - -#include "../LibJXR/jxrgluelib/JXRGlue.h" - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// FreeImageIO interface (I/O streaming functions) -// ========================================================== - -/** -JXR wrapper for FreeImage I/O handle -*/ -typedef struct tagFreeImageJXRIO { - FreeImageIO *io; - fi_handle handle; -} FreeImageJXRIO; - -static ERR -_jxr_io_Read(WMPStream* pWS, void* pv, size_t cb) { - FreeImageJXRIO *fio = (FreeImageJXRIO*)pWS->state.pvObj; - return (fio->io->read_proc(pv, (unsigned)cb, 1, fio->handle) == 1) ? WMP_errSuccess : WMP_errFileIO; -} - -static ERR -_jxr_io_Write(WMPStream* pWS, const void* pv, size_t cb) { - FreeImageJXRIO *fio = (FreeImageJXRIO*)pWS->state.pvObj; - if(0 != cb) { - return (fio->io->write_proc((void*)pv, (unsigned)cb, 1, fio->handle) == 1) ? WMP_errSuccess : WMP_errFileIO; - } - return WMP_errFileIO; -} - -static ERR -_jxr_io_SetPos(WMPStream* pWS, size_t offPos) { - FreeImageJXRIO *fio = (FreeImageJXRIO*)pWS->state.pvObj; - return (fio->io->seek_proc(fio->handle, (long)offPos, SEEK_SET) == 0) ? WMP_errSuccess : WMP_errFileIO; -} - -static ERR -_jxr_io_GetPos(WMPStream* pWS, size_t* poffPos) { - FreeImageJXRIO *fio = (FreeImageJXRIO*)pWS->state.pvObj; - long lOff = fio->io->tell_proc(fio->handle); - if(lOff == -1) { - return WMP_errFileIO; - } - *poffPos = (size_t)lOff; - return WMP_errSuccess; -} - -static Bool -_jxr_io_EOS(WMPStream* pWS) { - FreeImageJXRIO *fio = (FreeImageJXRIO*)pWS->state.pvObj; - long currentPos = fio->io->tell_proc(fio->handle); - fio->io->seek_proc(fio->handle, 0, SEEK_END); - long fileRemaining = fio->io->tell_proc(fio->handle) - currentPos; - fio->io->seek_proc(fio->handle, currentPos, SEEK_SET); - return (fileRemaining > 0); -} - -static ERR -_jxr_io_Close(WMPStream** ppWS) { - WMPStream *pWS = *ppWS; - // HACK : we use fMem to avoid a stream destruction by the library - // because FreeImage MUST HAVE the ownership of the stream - // see _jxr_io_Create - if(pWS && pWS->fMem) { - free(pWS); - *ppWS = NULL; - } - return WMP_errSuccess; -} - -static ERR -_jxr_io_Create(WMPStream **ppWS, FreeImageJXRIO *jxr_io) { - *ppWS = (WMPStream*)calloc(1, sizeof(**ppWS)); - if(*ppWS) { - WMPStream *pWS = *ppWS; - - pWS->state.pvObj = jxr_io; - pWS->Close = _jxr_io_Close; - pWS->EOS = _jxr_io_EOS; - pWS->Read = _jxr_io_Read; - pWS->Write = _jxr_io_Write; - pWS->SetPos = _jxr_io_SetPos; - pWS->GetPos = _jxr_io_GetPos; - - // HACK : we use fMem to avoid a stream destruction by the library - // because FreeImage MUST HAVE the ownership of the stream - // see _jxr_io_Close - pWS->fMem = FALSE; - - return WMP_errSuccess; - } - return WMP_errOutOfMemory; -} - -// ========================================================== -// JPEG XR Error handling -// ========================================================== - -static const char* -JXR_ErrorMessage(const int error) { - switch(error) { - case WMP_errNotYetImplemented: - case WMP_errAbstractMethod: - return "Not yet implemented"; - case WMP_errOutOfMemory: - return "Out of memory"; - case WMP_errFileIO: - return "File I/O error"; - case WMP_errBufferOverflow: - return "Buffer overflow"; - case WMP_errInvalidParameter: - return "Invalid parameter"; - case WMP_errInvalidArgument: - return "Invalid argument"; - case WMP_errUnsupportedFormat: - return "Unsupported format"; - case WMP_errIncorrectCodecVersion: - return "Incorrect codec version"; - case WMP_errIndexNotFound: - return "Format converter: Index not found"; - case WMP_errOutOfSequence: - return "Metadata: Out of sequence"; - case WMP_errMustBeMultipleOf16LinesUntilLastCall: - return "Must be multiple of 16 lines until last call"; - case WMP_errPlanarAlphaBandedEncRequiresTempFile: - return "Planar alpha banded encoder requires temp files"; - case WMP_errAlphaModeCannotBeTranscoded: - return "Alpha mode cannot be transcoded"; - case WMP_errIncorrectCodecSubVersion: - return "Incorrect codec subversion"; - case WMP_errFail: - case WMP_errNotInitialized: - default: - return "Invalid instruction - please contact the FreeImage team"; - } -} - -// ========================================================== -// Helper functions & macro -// ========================================================== - -#define JXR_CHECK(error_code) \ - if(error_code < 0) { \ - const char *error_message = JXR_ErrorMessage(error_code); \ - throw error_message; \ - } - -// -------------------------------------------------------------------------- - -/** -Input conversions natively understood by FreeImage -@see GetNativePixelFormat -*/ -typedef struct tagJXRInputConversion { - BITDEPTH_BITS bdBitDepth; - U32 cbitUnit; - FREE_IMAGE_TYPE image_type; - unsigned red_mask; - unsigned green_mask; - unsigned blue_mask; -} JXRInputConversion; - -/** -Conversion table for native FreeImage formats -@see GetNativePixelFormat -*/ -static JXRInputConversion s_FreeImagePixelInfo[] = { - // 1-bit bitmap - { BD_1, 1, FIT_BITMAP, 0, 0, 0 }, - // 8-, 24-, 32-bit bitmap - { BD_8, 8, FIT_BITMAP, 0, 0, 0 }, - { BD_8, 24, FIT_BITMAP, 0, 0, 0 }, - { BD_8, 32, FIT_BITMAP, 0, 0, 0 }, - // 16-bit RGB 565 - { BD_565, 16, FIT_BITMAP, FI16_565_RED_MASK, FI16_565_GREEN_MASK, FI16_565_BLUE_MASK }, - // 16-bit RGB 555 - { BD_5, 16, FIT_BITMAP, FI16_555_RED_MASK, FI16_555_GREEN_MASK, FI16_555_BLUE_MASK }, - // 16-bit greyscale, RGB16, RGBA16 bitmap - { BD_16, 16, FIT_UINT16, 0, 0, 0 }, - { BD_16, 48, FIT_RGB16, 0, 0, 0 }, - { BD_16, 64, FIT_RGBA16, 0, 0, 0 }, - // 32-bit float, RGBF, RGBAF bitmap - { BD_32F, 32, FIT_FLOAT, 0, 0, 0 }, - { BD_32F, 96, FIT_RGBF, 0, 0, 0 }, - { BD_32F, 128, FIT_RGBAF, 0, 0, 0 } -}; - -/** -Scan input pixelInfo specifications and return the equivalent FreeImage info for loading -@param pixelInfo Image specifications -@param out_guid_format (returned value) output pixel format -@param image_type (returned value) Image type -@param bpp (returned value) Image bit depth -@param red_mask (returned value) RGB mask -@param green_mask (returned value) RGB mask -@param blue_mask (returned value) RGB mask -@return Returns WMP_errSuccess if successful, returns WMP_errFail otherwise -@see GetInputPixelFormat -*/ -static ERR -GetNativePixelFormat(const PKPixelInfo *pixelInfo, PKPixelFormatGUID *out_guid_format, FREE_IMAGE_TYPE *image_type, unsigned *bpp, unsigned *red_mask, unsigned *green_mask, unsigned *blue_mask) { - const unsigned s_FreeImagePixelInfoSize = (unsigned)sizeof(s_FreeImagePixelInfo) / sizeof(*(s_FreeImagePixelInfo)); - - for(unsigned i = 0; i < s_FreeImagePixelInfoSize; i++) { - if(pixelInfo->bdBitDepth == s_FreeImagePixelInfo[i].bdBitDepth) { - if(pixelInfo->cbitUnit == s_FreeImagePixelInfo[i].cbitUnit) { - // found ! now get dst image format specifications - memcpy(out_guid_format, pixelInfo->pGUIDPixFmt, sizeof(PKPixelFormatGUID)); - *image_type = s_FreeImagePixelInfo[i].image_type; - *bpp = s_FreeImagePixelInfo[i].cbitUnit; - *red_mask = s_FreeImagePixelInfo[i].red_mask; - *green_mask = s_FreeImagePixelInfo[i].green_mask; - *blue_mask = s_FreeImagePixelInfo[i].blue_mask; - return WMP_errSuccess; - } - } - } - - // not found : need pixel format conversion - return WMP_errFail; -} - -/** -Scan input file guid format and return the equivalent FreeImage info & target guid format for loading -@param pDecoder Decoder handle -@param guid_format (returned value) Output pixel format -@param image_type (returned value) Image type -@param bpp (returned value) Image bit depth -@param red_mask (returned value) RGB mask -@param green_mask (returned value) RGB mask -@param blue_mask (returned value) RGB mask -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static ERR -GetInputPixelFormat(PKImageDecode *pDecoder, PKPixelFormatGUID *guid_format, FREE_IMAGE_TYPE *image_type, unsigned *bpp, unsigned *red_mask, unsigned *green_mask, unsigned *blue_mask) { - ERR error_code = 0; // error code as returned by the interface - PKPixelInfo pixelInfo; // image specifications - - try { - // get input file pixel format ... - PKPixelFormatGUID pguidSourcePF; - error_code = pDecoder->GetPixelFormat(pDecoder, &pguidSourcePF); - JXR_CHECK(error_code); - pixelInfo.pGUIDPixFmt = &pguidSourcePF; - // ... check for a supported format and get the format specifications - error_code = PixelFormatLookup(&pixelInfo, LOOKUP_FORWARD); - JXR_CHECK(error_code); - - // search for an equivalent native FreeImage format - error_code = GetNativePixelFormat(&pixelInfo, guid_format, image_type, bpp, red_mask, green_mask, blue_mask); - - if(error_code != WMP_errSuccess) { - // try to find a suitable conversion function ... - const PKPixelFormatGUID *ppguidTargetPF = NULL; // target pixel format - unsigned iIndex = 0; // first available conversion function - do { - error_code = PKFormatConverter_EnumConversions(&pguidSourcePF, iIndex, &ppguidTargetPF); - if(error_code == WMP_errSuccess) { - // found a conversion function, is the converted format a native FreeImage format ? - pixelInfo.pGUIDPixFmt = ppguidTargetPF; - error_code = PixelFormatLookup(&pixelInfo, LOOKUP_FORWARD); - JXR_CHECK(error_code); - error_code = GetNativePixelFormat(&pixelInfo, guid_format, image_type, bpp, red_mask, green_mask, blue_mask); - if(error_code == WMP_errSuccess) { - break; - } - } - // try next conversion function - iIndex++; - } while(error_code != WMP_errIndexNotFound); - - } - - return (error_code == WMP_errSuccess) ? WMP_errSuccess : WMP_errUnsupportedFormat; - - } catch(...) { - return error_code; - } -} - -// -------------------------------------------------------------------------- - -/** -Scan input dib format and return the equivalent PKPixelFormatGUID format for saving -@param dib Image to be saved -@param guid_format (returned value) GUID format -@param bHasAlpha (returned value) TRUE if an alpha layer is present -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static ERR -GetOutputPixelFormat(FIBITMAP *dib, PKPixelFormatGUID *guid_format, BOOL *bHasAlpha) { - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - const unsigned bpp = FreeImage_GetBPP(dib); - const FREE_IMAGE_COLOR_TYPE color_type = FreeImage_GetColorType(dib); - - *guid_format = GUID_PKPixelFormatDontCare; - *bHasAlpha = FALSE; - - switch(image_type) { - case FIT_BITMAP: // standard image : 1-, 4-, 8-, 16-, 24-, 32-bit - switch(bpp) { - case 1: - // assume FIC_MINISBLACK - if(color_type == FIC_MINISBLACK) { - *guid_format = GUID_PKPixelFormatBlackWhite; - } - break; - case 8: - // assume FIC_MINISBLACK - if(color_type == FIC_MINISBLACK) { - *guid_format = GUID_PKPixelFormat8bppGray; - } - break; - case 16: - if ((FreeImage_GetRedMask(dib) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_565_BLUE_MASK)) { - *guid_format = GUID_PKPixelFormat16bppRGB565; - } else { - // includes case where all the masks are 0 - *guid_format = GUID_PKPixelFormat16bppRGB555; - } - break; -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - case 24: - *guid_format = GUID_PKPixelFormat24bppBGR; - break; - case 32: - *guid_format = GUID_PKPixelFormat32bppBGRA; - *bHasAlpha = TRUE; - break; -#elif FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - case 24: - *guid_format = GUID_PKPixelFormat24bppRGB; - break; - case 32: - *guid_format = GUID_PKPixelFormat32bppRGBA; - *bHasAlpha = TRUE; - break; -#endif - case 4: - default: - // not supported - break; - } - break; - case FIT_UINT16: // array of unsigned short : unsigned 16-bit - *guid_format = GUID_PKPixelFormat16bppGray; - break; - case FIT_FLOAT: // array of float : 32-bit IEEE floating point - *guid_format = GUID_PKPixelFormat32bppGrayFloat; - break; - case FIT_RGB16: // 48-bit RGB image : 3 x 16-bit - *guid_format = GUID_PKPixelFormat48bppRGB; - break; - case FIT_RGBA16: // 64-bit RGBA image : 4 x 16-bit - *guid_format = GUID_PKPixelFormat64bppRGBA; - *bHasAlpha = TRUE; - break; - case FIT_RGBF: // 96-bit RGB float image : 3 x 32-bit IEEE floating point - *guid_format = GUID_PKPixelFormat96bppRGBFloat; - break; - case FIT_RGBAF: // 128-bit RGBA float image : 4 x 32-bit IEEE floating point - *guid_format = GUID_PKPixelFormat128bppRGBAFloat; - *bHasAlpha = TRUE; - break; - - case FIT_INT16: // array of short : signed 16-bit - case FIT_UINT32: // array of unsigned long : unsigned 32-bit - case FIT_INT32: // array of long : signed 32-bit - case FIT_DOUBLE: // array of double : 64-bit IEEE floating point - case FIT_COMPLEX: // array of FICOMPLEX : 2 x 64-bit IEEE floating point - - default: - // unsupported format - break; - } - - return (*guid_format != GUID_PKPixelFormatDontCare) ? WMP_errSuccess : WMP_errUnsupportedFormat; -} - -// ========================================================== -// Metadata loading -// ========================================================== - -/** -Read a JPEG-XR IFD as a buffer -@see ReadMetadata -*/ -static ERR -ReadProfile(WMPStream* pStream, unsigned cbByteCount, unsigned uOffset, BYTE **ppbProfile) { - // (re-)allocate profile buffer - BYTE *pbProfile = *ppbProfile; - pbProfile = (BYTE*)realloc(pbProfile, cbByteCount); - if(!pbProfile) { - return WMP_errOutOfMemory; - } - // read the profile - if(WMP_errSuccess == pStream->SetPos(pStream, uOffset)) { - if(WMP_errSuccess == pStream->Read(pStream, pbProfile, cbByteCount)) { - *ppbProfile = pbProfile; - return WMP_errSuccess; - } - } - return WMP_errFileIO; -} - -/** -Convert a DPKPROPVARIANT to a FITAG, then store the tag as FIMD_EXIF_MAIN -@see ReadDescriptiveMetadata -*/ -static BOOL -ReadPropVariant(WORD tag_id, const DPKPROPVARIANT & varSrc, FIBITMAP *dib) { - DWORD dwSize; - - if(varSrc.vt == DPKVT_EMPTY) { - return FALSE; - } - - // get the tag key - TagLib& s = TagLib::instance(); - const char *key = s.getTagFieldName(TagLib::EXIF_MAIN, tag_id, NULL); - if(!key) { - return FALSE; - } - - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(tag) { - // set tag ID - FreeImage_SetTagID(tag, tag_id); - // set tag type, count, length and value - switch (varSrc.vt) { - case DPKVT_LPSTR: - FreeImage_SetTagType(tag, FIDT_ASCII); - dwSize = (DWORD)strlen(varSrc.VT.pszVal) + 1; - FreeImage_SetTagCount(tag, dwSize); - FreeImage_SetTagLength(tag, dwSize); - FreeImage_SetTagValue(tag, varSrc.VT.pszVal); - break; - - case DPKVT_LPWSTR: - FreeImage_SetTagType(tag, FIDT_UNDEFINED); - dwSize = (DWORD)(sizeof(U16) * (wcslen((wchar_t *) varSrc.VT.pwszVal) + 1)); // +1 for NULL term - FreeImage_SetTagCount(tag, dwSize); - FreeImage_SetTagLength(tag, dwSize); - FreeImage_SetTagValue(tag, varSrc.VT.pwszVal); - break; - - case DPKVT_UI2: - FreeImage_SetTagType(tag, FIDT_SHORT); - FreeImage_SetTagCount(tag, 1); - FreeImage_SetTagLength(tag, 2); - FreeImage_SetTagValue(tag, &varSrc.VT.uiVal); - break; - - case DPKVT_UI4: - FreeImage_SetTagType(tag, FIDT_LONG); - FreeImage_SetTagCount(tag, 1); - FreeImage_SetTagLength(tag, 4); - FreeImage_SetTagValue(tag, &varSrc.VT.ulVal); - break; - - default: - assert(FALSE); // This case is not handled - break; - } - // get the tag desctiption - const char *description = s.getTagDescription(TagLib::EXIF_MAIN, tag_id); - FreeImage_SetTagDescription(tag, description); - - // store the tag - FreeImage_SetMetadata(FIMD_EXIF_MAIN, dib, key, tag); - - FreeImage_DeleteTag(tag); - } - return TRUE; -} - -/** -Read JPEG-XR descriptive metadata and store as EXIF_MAIN metadata -@see ReadPropVariant -*/ -static ERR -ReadDescriptiveMetadata(PKImageDecode *pID, FIBITMAP *dib) { - // get Exif TIFF metadata - const DESCRIPTIVEMETADATA *pDescMetadata = &pID->WMP.sDescMetadata; - // convert metadata to FITAG and store into the EXIF_MAIN metadata model - ReadPropVariant(WMP_tagImageDescription, pDescMetadata->pvarImageDescription, dib); - ReadPropVariant(WMP_tagCameraMake, pDescMetadata->pvarCameraMake, dib); - ReadPropVariant(WMP_tagCameraModel, pDescMetadata->pvarCameraModel, dib); - ReadPropVariant(WMP_tagSoftware, pDescMetadata->pvarSoftware, dib); - ReadPropVariant(WMP_tagDateTime, pDescMetadata->pvarDateTime, dib); - ReadPropVariant(WMP_tagArtist, pDescMetadata->pvarArtist, dib); - ReadPropVariant(WMP_tagCopyright, pDescMetadata->pvarCopyright, dib); - ReadPropVariant(WMP_tagRatingStars, pDescMetadata->pvarRatingStars, dib); - ReadPropVariant(WMP_tagRatingValue, pDescMetadata->pvarRatingValue, dib); - ReadPropVariant(WMP_tagCaption, pDescMetadata->pvarCaption, dib); - ReadPropVariant(WMP_tagDocumentName, pDescMetadata->pvarDocumentName, dib); - ReadPropVariant(WMP_tagPageName, pDescMetadata->pvarPageName, dib); - ReadPropVariant(WMP_tagPageNumber, pDescMetadata->pvarPageNumber, dib); - ReadPropVariant(WMP_tagHostComputer, pDescMetadata->pvarHostComputer, dib); - return WMP_errSuccess; -} - -/** -Read ICC, XMP, Exif, Exif-GPS, IPTC, descriptive (i.e. Exif-TIFF) metadata -@see ReadProfile, ReadDescriptiveMetadata -*/ -static ERR -ReadMetadata(PKImageDecode *pID, FIBITMAP *dib) { - ERR error_code = 0; // error code as returned by the interface - size_t currentPos = 0; // current stream position - - WMPStream *pStream = pID->pStream; - WmpDEMisc *wmiDEMisc = &pID->WMP.wmiDEMisc; - BYTE *pbProfile = NULL; - - try { - // save current position - error_code = pStream->GetPos(pStream, ¤tPos); - JXR_CHECK(error_code); - - // ICC profile - if(0 != wmiDEMisc->uColorProfileByteCount) { - unsigned cbByteCount = wmiDEMisc->uColorProfileByteCount; - unsigned uOffset = wmiDEMisc->uColorProfileOffset; - error_code = ReadProfile(pStream, cbByteCount, uOffset, &pbProfile); - JXR_CHECK(error_code); - FreeImage_CreateICCProfile(dib, pbProfile, cbByteCount); - } - - // XMP metadata - if(0 != wmiDEMisc->uXMPMetadataByteCount) { - unsigned cbByteCount = wmiDEMisc->uXMPMetadataByteCount; - unsigned uOffset = wmiDEMisc->uXMPMetadataOffset; - error_code = ReadProfile(pStream, cbByteCount, uOffset, &pbProfile); - JXR_CHECK(error_code); - // store the tag as XMP - FITAG *tag = FreeImage_CreateTag(); - if(tag) { - FreeImage_SetTagLength(tag, cbByteCount); - FreeImage_SetTagCount(tag, cbByteCount); - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagValue(tag, pbProfile); - FreeImage_SetTagKey(tag, g_TagLib_XMPFieldName); - FreeImage_SetMetadata(FIMD_XMP, dib, FreeImage_GetTagKey(tag), tag); - FreeImage_DeleteTag(tag); - } - } - - // IPTC metadata - if(0 != wmiDEMisc->uIPTCNAAMetadataByteCount) { - unsigned cbByteCount = wmiDEMisc->uIPTCNAAMetadataByteCount; - unsigned uOffset = wmiDEMisc->uIPTCNAAMetadataOffset; - error_code = ReadProfile(pStream, cbByteCount, uOffset, &pbProfile); - JXR_CHECK(error_code); - // decode the IPTC profile - read_iptc_profile(dib, pbProfile, cbByteCount); - } - - // Exif metadata - if(0 != wmiDEMisc->uEXIFMetadataByteCount) { - unsigned cbByteCount = wmiDEMisc->uEXIFMetadataByteCount; - unsigned uOffset = wmiDEMisc->uEXIFMetadataOffset; - error_code = ReadProfile(pStream, cbByteCount, uOffset, &pbProfile); - JXR_CHECK(error_code); - // decode the Exif profile - jpegxr_read_exif_profile(dib, pbProfile, cbByteCount, uOffset); - } - - // Exif-GPS metadata - if(0 != wmiDEMisc->uGPSInfoMetadataByteCount) { - unsigned cbByteCount = wmiDEMisc->uGPSInfoMetadataByteCount; - unsigned uOffset = wmiDEMisc->uGPSInfoMetadataOffset; - error_code = ReadProfile(pStream, cbByteCount, uOffset, &pbProfile); - JXR_CHECK(error_code); - // decode the Exif-GPS profile - jpegxr_read_exif_gps_profile(dib, pbProfile, cbByteCount, uOffset); - } - - // free profile buffer - free(pbProfile); - // restore initial position - error_code = pID->pStream->SetPos(pID->pStream, currentPos); - JXR_CHECK(error_code); - - // as a LAST STEP, read descriptive metadata - // these metadata overwrite possible identical Exif-TIFF metadata - // that could have been read inside the Exif IFD - - return ReadDescriptiveMetadata(pID, dib); - - } catch(...) { - // free profile buffer - free(pbProfile); - if(currentPos) { - // restore initial position - pStream->SetPos(pStream, currentPos); - } - return error_code; - } -} - -// ========================================================== -// Metadata saving -// ========================================================== - -/** -Convert a FITAG (coming from FIMD_EXIF_MAIN) to a DPKPROPVARIANT. -No allocation is needed here, the function just copy pointers when needed. -@see WriteDescriptiveMetadata -*/ -static BOOL -WritePropVariant(FIBITMAP *dib, WORD tag_id, DPKPROPVARIANT & varDst) { - FITAG *tag = NULL; - - TagLib& s = TagLib::instance(); - - // clear output DPKPROPVARIANT - varDst.vt = DPKVT_EMPTY; - - // given the tag id, get the tag key - const char *key = s.getTagFieldName(TagLib::EXIF_MAIN, tag_id, NULL); - // then, get the tag info - if(!FreeImage_GetMetadata(FIMD_EXIF_MAIN, dib, key, &tag)) { - return FALSE; - } - - // set the tag value - switch(FreeImage_GetTagType(tag)) { - case FIDT_ASCII: - varDst.vt = DPKVT_LPSTR; - varDst.VT.pszVal = (char*)FreeImage_GetTagValue(tag); - break; - case FIDT_BYTE: - case FIDT_UNDEFINED: - varDst.vt = DPKVT_LPWSTR; - varDst.VT.pwszVal = (U16*)FreeImage_GetTagValue(tag); - break; - case FIDT_SHORT: - varDst.vt = DPKVT_UI2; - varDst.VT.uiVal = *((U16*)FreeImage_GetTagValue(tag)); - break; - case FIDT_LONG: - varDst.vt = DPKVT_UI4; - varDst.VT.ulVal = *((U32*)FreeImage_GetTagValue(tag)); - break; - default: - break; - } - - return TRUE; -} - -/** -Write EXIF_MAIN metadata to JPEG-XR descriptive metadata -@see WritePropVariant -*/ -static ERR -WriteDescriptiveMetadata(PKImageEncode *pIE, FIBITMAP *dib) { - ERR error_code = 0; // error code as returned by the interface - DESCRIPTIVEMETADATA DescMetadata; - - // fill the DESCRIPTIVEMETADATA structure (use pointers to arrays when needed) - WritePropVariant(dib, WMP_tagImageDescription, DescMetadata.pvarImageDescription); - WritePropVariant(dib, WMP_tagCameraMake, DescMetadata.pvarCameraMake); - WritePropVariant(dib, WMP_tagCameraModel, DescMetadata.pvarCameraModel); - WritePropVariant(dib, WMP_tagSoftware, DescMetadata.pvarSoftware); - WritePropVariant(dib, WMP_tagDateTime, DescMetadata.pvarDateTime); - WritePropVariant(dib, WMP_tagArtist, DescMetadata.pvarArtist); - WritePropVariant(dib, WMP_tagCopyright, DescMetadata.pvarCopyright); - WritePropVariant(dib, WMP_tagRatingStars, DescMetadata.pvarRatingStars); - WritePropVariant(dib, WMP_tagRatingValue, DescMetadata.pvarRatingValue); - WritePropVariant(dib, WMP_tagCaption, DescMetadata.pvarCaption); - WritePropVariant(dib, WMP_tagDocumentName, DescMetadata.pvarDocumentName); - WritePropVariant(dib, WMP_tagPageName, DescMetadata.pvarPageName); - WritePropVariant(dib, WMP_tagPageNumber, DescMetadata.pvarPageNumber); - WritePropVariant(dib, WMP_tagHostComputer, DescMetadata.pvarHostComputer); - - // copy the structure to the encoder - error_code = pIE->SetDescriptiveMetadata(pIE, &DescMetadata); - - // no need to free anything here - return error_code; -} - -/** -Write ICC, XMP, Exif, Exif-GPS, IPTC, descriptive (i.e. Exif-TIFF) metadata -*/ -static ERR -WriteMetadata(PKImageEncode *pIE, FIBITMAP *dib) { - ERR error_code = 0; // error code as returned by the interface - BYTE *profile = NULL; - unsigned profile_size = 0; - - try { - // write ICC profile - { - FIICCPROFILE *iccProfile = FreeImage_GetICCProfile(dib); - if(iccProfile->data) { - error_code = pIE->SetColorContext(pIE, (U8*)iccProfile->data, iccProfile->size); - JXR_CHECK(error_code); - } - } - - // write descriptive metadata - if(FreeImage_GetMetadataCount(FIMD_EXIF_MAIN, dib)) { - error_code = WriteDescriptiveMetadata(pIE, dib); - JXR_CHECK(error_code); - } - - // write IPTC metadata - if(FreeImage_GetMetadataCount(FIMD_IPTC, dib)) { - // create a binary profile - if(write_iptc_profile(dib, &profile, &profile_size)) { - // write the profile - error_code = PKImageEncode_SetIPTCNAAMetadata_WMP(pIE, profile, profile_size); - JXR_CHECK(error_code); - // release profile - free(profile); - profile = NULL; - } - } - - // write XMP metadata - { - FITAG *tag_xmp = NULL; - if(FreeImage_GetMetadata(FIMD_XMP, dib, g_TagLib_XMPFieldName, &tag_xmp)) { - error_code = PKImageEncode_SetXMPMetadata_WMP(pIE, (BYTE*)FreeImage_GetTagValue(tag_xmp), FreeImage_GetTagLength(tag_xmp)); - JXR_CHECK(error_code); - } - } - - // write Exif metadata - { - if(tiff_get_ifd_profile(dib, FIMD_EXIF_EXIF, &profile, &profile_size)) { - error_code = PKImageEncode_SetEXIFMetadata_WMP(pIE, profile, profile_size); - JXR_CHECK(error_code); - // release profile - free(profile); - profile = NULL; - } - } - - // write Exif GPS metadata - { - if(tiff_get_ifd_profile(dib, FIMD_EXIF_GPS, &profile, &profile_size)) { - error_code = PKImageEncode_SetGPSInfoMetadata_WMP(pIE, profile, profile_size); - JXR_CHECK(error_code); - // release profile - free(profile); - profile = NULL; - } - } - - return WMP_errSuccess; - - } catch(...) { - free(profile); - return error_code; - } -} - - - -// ========================================================== -// Quantization tables (Y, U, V, YHP, UHP, VHP), -// optimized for PSNR -// ========================================================== - -static const int DPK_QPS_420[11][6] = { // for 8 bit only - { 66, 65, 70, 72, 72, 77 }, - { 59, 58, 63, 64, 63, 68 }, - { 52, 51, 57, 56, 56, 61 }, - { 48, 48, 54, 51, 50, 55 }, - { 43, 44, 48, 46, 46, 49 }, - { 37, 37, 42, 38, 38, 43 }, - { 26, 28, 31, 27, 28, 31 }, - { 16, 17, 22, 16, 17, 21 }, - { 10, 11, 13, 10, 10, 13 }, - { 5, 5, 6, 5, 5, 6 }, - { 2, 2, 3, 2, 2, 2 } -}; - -static const int DPK_QPS_8[12][6] = { - { 67, 79, 86, 72, 90, 98 }, - { 59, 74, 80, 64, 83, 89 }, - { 53, 68, 75, 57, 76, 83 }, - { 49, 64, 71, 53, 70, 77 }, - { 45, 60, 67, 48, 67, 74 }, - { 40, 56, 62, 42, 59, 66 }, - { 33, 49, 55, 35, 51, 58 }, - { 27, 44, 49, 28, 45, 50 }, - { 20, 36, 42, 20, 38, 44 }, - { 13, 27, 34, 13, 28, 34 }, - { 7, 17, 21, 8, 17, 21 }, // Photoshop 100% - { 2, 5, 6, 2, 5, 6 } -}; - -static const int DPK_QPS_16[11][6] = { - { 197, 203, 210, 202, 207, 213 }, - { 174, 188, 193, 180, 189, 196 }, - { 152, 167, 173, 156, 169, 174 }, - { 135, 152, 157, 137, 153, 158 }, - { 119, 137, 141, 119, 138, 142 }, - { 102, 120, 125, 100, 120, 124 }, - { 82, 98, 104, 79, 98, 103 }, - { 60, 76, 81, 58, 76, 81 }, - { 39, 52, 58, 36, 52, 58 }, - { 16, 27, 33, 14, 27, 33 }, - { 5, 8, 9, 4, 7, 8 } -}; - -static const int DPK_QPS_16f[11][6] = { - { 148, 177, 171, 165, 187, 191 }, - { 133, 155, 153, 147, 172, 181 }, - { 114, 133, 138, 130, 157, 167 }, - { 97, 118, 120, 109, 137, 144 }, - { 76, 98, 103, 85, 115, 121 }, - { 63, 86, 91, 62, 96, 99 }, - { 46, 68, 71, 43, 73, 75 }, - { 29, 48, 52, 27, 48, 51 }, - { 16, 30, 35, 14, 29, 34 }, - { 8, 14, 17, 7, 13, 17 }, - { 3, 5, 7, 3, 5, 6 } -}; - -static const int DPK_QPS_32f[11][6] = { - { 194, 206, 209, 204, 211, 217 }, - { 175, 187, 196, 186, 193, 205 }, - { 157, 170, 177, 167, 180, 190 }, - { 133, 152, 156, 144, 163, 168 }, - { 116, 138, 142, 117, 143, 148 }, - { 98, 120, 123, 96, 123, 126 }, - { 80, 99, 102, 78, 99, 102 }, - { 65, 79, 84, 63, 79, 84 }, - { 48, 61, 67, 45, 60, 66 }, - { 27, 41, 46, 24, 40, 45 }, - { 3, 22, 24, 2, 21, 22 } -}; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "JPEG-XR"; -} - -static const char * DLL_CALLCONV -Description() { - return "JPEG XR image format"; -} - -static const char * DLL_CALLCONV -Extension() { - return "jxr,wdp,hdp"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/vnd.ms-photo"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE jxr_signature[3] = { 0x49, 0x49, 0xBC }; - BYTE signature[3] = { 0, 0, 0 }; - - io->read_proc(&signature, 1, 3, handle); - - return (memcmp(jxr_signature, signature, 3) == 0); -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 1) || - (depth == 8) || - (depth == 16) || - (depth == 24) || - (depth == 32) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return ( - (type == FIT_BITMAP) || - (type == FIT_UINT16) || - (type == FIT_RGB16) || - (type == FIT_RGBA16) || - (type == FIT_FLOAT) || - (type == FIT_RGBF) || - (type == FIT_RGBAF) - ); -} - -static BOOL DLL_CALLCONV -SupportsICCProfiles() { - return TRUE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ========================================================== -// Open & Close -// ========================================================== - -static void * DLL_CALLCONV -Open(FreeImageIO *io, fi_handle handle, BOOL read) { - WMPStream *pStream = NULL; // stream interface - if(io && handle) { - // allocate the FreeImageIO stream wrapper - FreeImageJXRIO *jxr_io = (FreeImageJXRIO*)malloc(sizeof(FreeImageJXRIO)); - if(jxr_io) { - jxr_io->io = io; - jxr_io->handle = handle; - // create a JXR stream wrapper - if(_jxr_io_Create(&pStream, jxr_io) != WMP_errSuccess) { - free(jxr_io); - return NULL; - } - } - } - return pStream; -} - -static void DLL_CALLCONV -Close(FreeImageIO *io, fi_handle handle, void *data) { - WMPStream *pStream = (WMPStream*)data; - if(pStream) { - // free the FreeImageIO stream wrapper - FreeImageJXRIO *jxr_io = (FreeImageJXRIO*)pStream->state.pvObj; - free(jxr_io); - // free the JXR stream wrapper - pStream->fMem = TRUE; - _jxr_io_Close(&pStream); - } -} - -// ========================================================== -// Load -// ========================================================== - -/** -Set decoder parameters -@param pDecoder Decoder handle -@param flags FreeImage load flags -*/ -static void -SetDecoderParameters(PKImageDecode *pDecoder, int flags) { - // load image & alpha for formats with alpha - pDecoder->WMP.wmiSCP.uAlphaMode = 2; - // more options to come ... -} - -/** -Copy or convert & copy decoded pixels into the dib -@param pDecoder Decoder handle -@param out_guid_format Target guid format -@param dib Output dib -@param width Image width -@param height Image height -@return Returns 0 if successful, returns ERR otherwise -*/ -static ERR -CopyPixels(PKImageDecode *pDecoder, PKPixelFormatGUID out_guid_format, FIBITMAP *dib, int width, int height) { - PKFormatConverter *pConverter = NULL; // pixel format converter - ERR error_code = 0; // error code as returned by the interface - BYTE *pb = NULL; // local buffer used for pixel format conversion - - // image dimensions - const PKRect rect = {0, 0, width, height}; - - try { - // get input file pixel format ... - PKPixelFormatGUID in_guid_format; - error_code = pDecoder->GetPixelFormat(pDecoder, &in_guid_format); - JXR_CHECK(error_code); - - // is a format conversion needed ? - - if(IsEqualGUID(out_guid_format, in_guid_format)) { - // no conversion, load bytes "as is" ... - - // get a pointer to dst pixel data - BYTE *dib_bits = FreeImage_GetBits(dib); - - // get dst pitch (count of BYTE for stride) - const unsigned cbStride = FreeImage_GetPitch(dib); - - // decode and copy bits to dst array - error_code = pDecoder->Copy(pDecoder, &rect, dib_bits, cbStride); - JXR_CHECK(error_code); - } - else { - // we need to use the conversion API ... - - // allocate the pixel format converter - error_code = PKCodecFactory_CreateFormatConverter(&pConverter); - JXR_CHECK(error_code); - - // set the conversion function - error_code = pConverter->Initialize(pConverter, pDecoder, NULL, out_guid_format); - JXR_CHECK(error_code); - - // get the maximum stride - unsigned cbStride = 0; - { - PKPixelInfo pPIFrom; - PKPixelInfo pPITo; - - pPIFrom.pGUIDPixFmt = &in_guid_format; - error_code = PixelFormatLookup(&pPIFrom, LOOKUP_FORWARD); - JXR_CHECK(error_code); - - pPITo.pGUIDPixFmt = &out_guid_format; - error_code = PixelFormatLookup(&pPITo, LOOKUP_FORWARD); - JXR_CHECK(error_code); - - unsigned cbStrideFrom = ((pPIFrom.cbitUnit + 7) >> 3) * width; - unsigned cbStrideTo = ((pPITo.cbitUnit + 7) >> 3) * width; - cbStride = MAX(cbStrideFrom, cbStrideTo); - } - - // allocate a local decoder / encoder buffer - error_code = PKAllocAligned((void **) &pb, cbStride * height, 128); - JXR_CHECK(error_code); - - // copy / convert pixels - error_code = pConverter->Copy(pConverter, &rect, pb, cbStride); - JXR_CHECK(error_code); - - // now copy pixels into the dib - const size_t line_size = FreeImage_GetLine(dib); - for(int y = 0; y < height; y++) { - BYTE *src_bits = (BYTE*)(pb + y * cbStride); - BYTE *dst_bits = (BYTE*)FreeImage_GetScanLine(dib, y); - memcpy(dst_bits, src_bits, line_size); - } - - // free the local buffer - PKFreeAligned((void **) &pb); - - // free the pixel format converter - PKFormatConverter_Release(&pConverter); - } - - // FreeImage DIB are upside-down relative to usual graphic conventions - FreeImage_FlipVertical(dib); - - // post-processing ... - // ------------------- - - // swap RGB as needed - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - if(IsEqualGUID(out_guid_format, GUID_PKPixelFormat24bppRGB) || IsEqualGUID(out_guid_format, GUID_PKPixelFormat32bppRGB)) { - SwapRedBlue32(dib); - } -#elif FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - if(IsEqualGUID(out_guid_format, GUID_PKPixelFormat24bppBGR) || IsEqualGUID(out_guid_format, GUID_PKPixelFormat32bppBGR)) { - SwapRedBlue32(dib); - } -#endif - - return WMP_errSuccess; - - } catch(...) { - // free the local buffer - PKFreeAligned((void **) &pb); - // free the pixel format converter - PKFormatConverter_Release(&pConverter); - - return error_code; - } -} - -// -------------------------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - PKImageDecode *pDecoder = NULL; // decoder interface - ERR error_code = 0; // error code as returned by the interface - PKPixelFormatGUID guid_format; // loaded pixel format (== input file pixel format if no conversion needed) - - FREE_IMAGE_TYPE image_type = FIT_UNKNOWN; // input image type - unsigned bpp = 0; // input image bit depth - FIBITMAP *dib = NULL; - - // get the I/O stream wrapper - WMPStream *pDecodeStream = (WMPStream*)data; - - if(!handle || !pDecodeStream) { - return NULL; - } - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - try { - int width, height; // image dimensions (in pixels) - - // create a JXR decoder interface and initialize function pointers with *_WMP functions - error_code = PKImageDecode_Create_WMP(&pDecoder); - JXR_CHECK(error_code); - - // attach the stream to the decoder ... - // ... then read the image container and the metadata - error_code = pDecoder->Initialize(pDecoder, pDecodeStream); - JXR_CHECK(error_code); - - // set decoder parameters - SetDecoderParameters(pDecoder, flags); - - // get dst image format specifications - unsigned red_mask = 0, green_mask = 0, blue_mask = 0; - error_code = GetInputPixelFormat(pDecoder, &guid_format, &image_type, &bpp, &red_mask, &green_mask, &blue_mask); - JXR_CHECK(error_code); - - // get image dimensions - pDecoder->GetSize(pDecoder, &width, &height); - - // allocate dst image - { - dib = FreeImage_AllocateHeaderT(header_only, image_type, width, height, bpp, red_mask, green_mask, blue_mask); - if(!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - if(FreeImage_GetBPP(dib) == 1) { - // BD_1 - build a FIC_MINISBLACK palette - RGBQUAD *pal = FreeImage_GetPalette(dib); - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 0; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 255; - } - } - - // get image resolution - { - float resX, resY; // image resolution (in dots per inch) - // convert from English units, i.e. dots per inch to universal units, i.e. dots per meter - pDecoder->GetResolution(pDecoder, &resX, &resY); - FreeImage_SetDotsPerMeterX(dib, (unsigned)(resX / 0.0254F + 0.5F)); - FreeImage_SetDotsPerMeterY(dib, (unsigned)(resY / 0.0254F + 0.5F)); - } - - // get metadata & ICC profile - error_code = ReadMetadata(pDecoder, dib); - JXR_CHECK(error_code); - - if(header_only) { - // header only mode ... - - // free the decoder - pDecoder->Release(&pDecoder); - assert(pDecoder == NULL); - - return dib; - } - - // copy pixels into the dib, perform pixel conversion if needed - error_code = CopyPixels(pDecoder, guid_format, dib, width, height); - JXR_CHECK(error_code); - - // free the decoder - pDecoder->Release(&pDecoder); - assert(pDecoder == NULL); - - return dib; - - } catch (const char *message) { - // unload the dib - FreeImage_Unload(dib); - // free the decoder - pDecoder->Release(&pDecoder); - - if(NULL != message) { - FreeImage_OutputMessageProc(s_format_id, message); - } - } - - return NULL; -} - -// ========================================================== -// Save -// ========================================================== - -/** -Configure compression parameters - -ImageQuality Q (BD==1) Q (BD==8) Q (BD==16) Q (BD==32F) Subsample Overlap -[0.0, 0.4] 8-IQ*5 (see table) (see table) (see table) 4:4:4 2 -(0.4, 0.8) 8-IQ*5 (see table) (see table) (see table) 4:4:4 1 -[0.8, 1.0) 8-IQ*5 (see table) (see table) (see table) 4:4:4 1 -[1.0, 1.0] 1 1 1 1 4:4:4 0 - -@param wmiSCP Encoder parameters -@param pixelInfo Image specifications -@param fltImageQuality Image output quality in [0..1), 1 means lossless -*/ -static void -SetCompression(CWMIStrCodecParam *wmiSCP, const PKPixelInfo *pixelInfo, float fltImageQuality) { - if(fltImageQuality < 1.0F) { - // overlap - if(fltImageQuality >= 0.5F) { - wmiSCP->olOverlap = OL_ONE; - } else { - wmiSCP->olOverlap = OL_TWO; - } - // chroma sub-sampling - if(fltImageQuality >= 0.5F || pixelInfo->uBitsPerSample > 8) { - wmiSCP->cfColorFormat = YUV_444; - } else { - wmiSCP->cfColorFormat = YUV_420; - } - - // bit depth - if(pixelInfo->bdBitDepth == BD_1) { - wmiSCP->uiDefaultQPIndex = (U8)(8 - 5.0F * fltImageQuality + 0.5F); - } - else { - // remap [0.8, 0.866, 0.933, 1.0] to [0.8, 0.9, 1.0, 1.1] - // to use 8-bit DPK QP table (0.933 == Photoshop JPEG 100) - if(fltImageQuality > 0.8F && pixelInfo->bdBitDepth == BD_8 && wmiSCP->cfColorFormat != YUV_420 && wmiSCP->cfColorFormat != YUV_422) { - fltImageQuality = 0.8F + (fltImageQuality - 0.8F) * 1.5F; - } - - const int qi = (int) (10.0F * fltImageQuality); - const float qf = 10.0F * fltImageQuality - (float)qi; - - const int *pQPs = - (wmiSCP->cfColorFormat == YUV_420 || wmiSCP->cfColorFormat == YUV_422) ? - DPK_QPS_420[qi] : - (pixelInfo->bdBitDepth == BD_8 ? DPK_QPS_8[qi] : - (pixelInfo->bdBitDepth == BD_16 ? DPK_QPS_16[qi] : - (pixelInfo->bdBitDepth == BD_16F ? DPK_QPS_16f[qi] : - DPK_QPS_32f[qi]))); - - wmiSCP->uiDefaultQPIndex = (U8) (0.5F + (float) pQPs[0] * (1.0F - qf) + (float) (pQPs + 6)[0] * qf); - wmiSCP->uiDefaultQPIndexU = (U8) (0.5F + (float) pQPs[1] * (1.0F - qf) + (float) (pQPs + 6)[1] * qf); - wmiSCP->uiDefaultQPIndexV = (U8) (0.5F + (float) pQPs[2] * (1.0F - qf) + (float) (pQPs + 6)[2] * qf); - wmiSCP->uiDefaultQPIndexYHP = (U8) (0.5F + (float) pQPs[3] * (1.0F - qf) + (float) (pQPs + 6)[3] * qf); - wmiSCP->uiDefaultQPIndexUHP = (U8) (0.5F + (float) pQPs[4] * (1.0F - qf) + (float) (pQPs + 6)[4] * qf); - wmiSCP->uiDefaultQPIndexVHP = (U8) (0.5F + (float) pQPs[5] * (1.0F - qf) + (float) (pQPs + 6)[5] * qf); - } - } // fltImageQuality < 1.0F - else { - // lossless mode - wmiSCP->uiDefaultQPIndex = 1; - } -} - -/** -Set encoder parameters -@param wmiSCP Encoder parameters -@param pixelInfo Image specifications -@param flags FreeImage save flags -@param bHasAlpha TRUE if an alpha layer is present -*/ -static void -SetEncoderParameters(CWMIStrCodecParam *wmiSCP, const PKPixelInfo *pixelInfo, int flags, BOOL bHasAlpha) { - float fltImageQuality = 1.0F; - - // all values have been set to zero by the API - // update default values for some attributes - wmiSCP->cfColorFormat = YUV_444; // color format - wmiSCP->bdBitDepth = BD_LONG; // internal bit depth - wmiSCP->bfBitstreamFormat = SPATIAL; // compressed image data in spatial order - wmiSCP->bProgressiveMode = FALSE; // sequential mode - wmiSCP->olOverlap = OL_ONE; // single level overlap processing - wmiSCP->cNumOfSliceMinus1H = 0; // # of horizontal slices - wmiSCP->cNumOfSliceMinus1V = 0; // # of vertical slices - wmiSCP->sbSubband = SB_ALL; // keep all subbands - wmiSCP->uAlphaMode = 0; // 0:no alpha 1: alpha only else: something + alpha - wmiSCP->uiDefaultQPIndex = 1; // quantization for grey or rgb layer(s), 1: lossless - wmiSCP->uiDefaultQPIndexAlpha = 1; // quantization for alpha layer, 1: lossless - - // process the flags - // ----------------- - - // progressive mode - if((flags & JXR_PROGRESSIVE) == JXR_PROGRESSIVE) { - // turn on progressive mode (instead of sequential mode) - wmiSCP->bProgressiveMode = TRUE; - } - - // quality in [0.01 - 1.0), 1.0 means lossless - default is 0.80 - int quality = flags & 0x7F; - if(quality == 0) { - // defaut to 0.80 - fltImageQuality = 0.8F; - } else if((flags & JXR_LOSSLESS) == JXR_LOSSLESS) { - fltImageQuality = 1.0F; - } else { - quality = (quality >= 100) ? 100 : quality; - fltImageQuality = quality / 100.0F; - } - SetCompression(wmiSCP, pixelInfo, fltImageQuality); - - // alpha compression - if(bHasAlpha) { - wmiSCP->uAlphaMode = 2; // encode with a planar alpha channel - } -} - -// -------------------------------------------------------------------------- - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - BOOL bIsFlipped = FALSE; // FreeImage DIB are upside-down relative to usual graphic conventions - PKPixelFormatGUID guid_format; // image format - PKPixelInfo pixelInfo; // image specifications - BOOL bHasAlpha = FALSE; // is alpha layer present ? - - PKImageEncode *pEncoder = NULL; // encoder interface - ERR error_code = 0; // error code as returned by the interface - - // get the I/O stream wrapper - WMPStream *pEncodeStream = (WMPStream*)data; - - if(!dib || !handle || !pEncodeStream) { - return FALSE; - } - - try { - // get image dimensions - unsigned width = FreeImage_GetWidth(dib); - unsigned height = FreeImage_GetHeight(dib); - - // check JPEG-XR limits - if((width < MB_WIDTH_PIXEL) || (height < MB_HEIGHT_PIXEL)) { - FreeImage_OutputMessageProc(s_format_id, "Unsupported image size: width x height = %d x %d", width, height); - throw (const char*)NULL; - } - - // get output pixel format - error_code = GetOutputPixelFormat(dib, &guid_format, &bHasAlpha); - JXR_CHECK(error_code); - pixelInfo.pGUIDPixFmt = &guid_format; - error_code = PixelFormatLookup(&pixelInfo, LOOKUP_FORWARD); - JXR_CHECK(error_code); - - // create a JXR encoder interface and initialize function pointers with *_WMP functions - error_code = PKImageEncode_Create_WMP(&pEncoder); - JXR_CHECK(error_code); - - // attach the stream to the encoder and set all encoder parameters to zero ... - error_code = pEncoder->Initialize(pEncoder, pEncodeStream, &pEncoder->WMP.wmiSCP, sizeof(CWMIStrCodecParam)); - JXR_CHECK(error_code); - - // ... then configure the encoder - SetEncoderParameters(&pEncoder->WMP.wmiSCP, &pixelInfo, flags, bHasAlpha); - - // set pixel format - pEncoder->SetPixelFormat(pEncoder, guid_format); - - // set image size - pEncoder->SetSize(pEncoder, width, height); - - // set resolution (convert from universal units to English units) - float resX = (float)(unsigned)(0.5F + 0.0254F * FreeImage_GetDotsPerMeterX(dib)); - float resY = (float)(unsigned)(0.5F + 0.0254F * FreeImage_GetDotsPerMeterY(dib)); - pEncoder->SetResolution(pEncoder, resX, resY); - - // set metadata - WriteMetadata(pEncoder, dib); - - // write metadata & pixels - // ----------------------- - - // dib coordinates are upside-down relative to usual conventions - bIsFlipped = FreeImage_FlipVertical(dib); - - // get a pointer to dst pixel data - BYTE *dib_bits = FreeImage_GetBits(dib); - - // get dst pitch (count of BYTE for stride) - const unsigned cbStride = FreeImage_GetPitch(dib); - - // write metadata + pixels on output - error_code = pEncoder->WritePixels(pEncoder, height, dib_bits, cbStride); - JXR_CHECK(error_code); - - // recover dib coordinates - FreeImage_FlipVertical(dib); - - // free the encoder - pEncoder->Release(&pEncoder); - assert(pEncoder == NULL); - - return TRUE; - - } catch (const char *message) { - if(bIsFlipped) { - // recover dib coordinates - FreeImage_FlipVertical(dib); - } - if(pEncoder) { - // free the encoder - pEncoder->Release(&pEncoder); - assert(pEncoder == NULL); - } - if(NULL != message) { - FreeImage_OutputMessageProc(s_format_id, message); - } - } - - return FALSE; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitJXR(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = Open; - plugin->close_proc = Close; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = SupportsICCProfiles; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginKOALA.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginKOALA.cpp deleted file mode 100644 index 6c3ae52..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginKOALA.cpp +++ /dev/null @@ -1,243 +0,0 @@ -// ========================================================== -// KOALA Loader -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Constants + headers -// ---------------------------------------------------------- - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -typedef struct tagKOALA { - BYTE image[8000]; // pixmap image - BYTE colour1[1000]; // first colourmap (colour 1 and 2) - BYTE colour2[1000]; // second colourmap (colour 3) - BYTE background; // background colour -} koala_t; - -struct colour_t { - int r; - int g; - int b; -}; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif - -// ---------------------------------------------------------- - -#define CBM_WIDTH 320 -#define CBM_HEIGHT 200 - -// ---------------------------------------------------------- - -const colour_t c64colours[16] = { - { 0, 0, 0 }, // Black - { 255, 255, 255 }, // White - { 170, 17, 17 }, // Red - { 12, 204, 204 }, // Cyan - { 221, 51, 221 }, // Purple - { 0, 187, 0 }, // Green - { 0, 0, 204 }, // Blue - { 255, 255, 140 }, // Yellow - { 204, 119, 34 }, // Orange - { 136, 68, 0 }, // Brown - { 255, 153, 136 }, // Light red - { 92, 92, 92 }, // Gray 1 - { 170, 170, 170 }, // Gray 2 - { 140, 255, 178 }, // Light green - { 39, 148, 255 }, // Light blue - { 196, 196, 196 } // Gray 3 -}; - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -const char * DLL_CALLCONV -Format() { - return "KOALA"; -} - -const char * DLL_CALLCONV -Description() { - return "C64 Koala Graphics"; -} - -const char * DLL_CALLCONV -Extension() { - return "koa"; -} - -const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-koala"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE koala_signature[] = { 0x00, 0x60 }; - BYTE signature[2] = { 0, 0 }; - - io->read_proc(signature, 1, sizeof(koala_signature), handle); - - return (memcmp(koala_signature, signature, sizeof(koala_signature)) == 0); -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -// ---------------------------------------------------------- - -FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - if (handle) { - koala_t image; - - // read the load address - - unsigned char load_address[2]; // highbit, lowbit - - io->read_proc(&load_address, 1, 2, handle); - - // if the load address is correct, skip it. otherwise ignore the load address - - if ((load_address[0] != 0x00) || (load_address[1] != 0x60)) { - ((BYTE *)&image)[0] = load_address[0]; - ((BYTE *)&image)[1] = load_address[1]; - - io->read_proc((BYTE *)&image + 2, 1, 10001 - 2, handle); - } else { - io->read_proc(&image, 1, 10001, handle); - } - - // build DIB in memory - - FIBITMAP *dib = FreeImage_Allocate(CBM_WIDTH, CBM_HEIGHT, 4); - - if (dib) { - // write out the commodore 64 color palette - - RGBQUAD *palette = FreeImage_GetPalette(dib); - - for (int i = 0; i < 16; i++) { - palette[i].rgbBlue = (BYTE)c64colours[i].b; - palette[i].rgbGreen = (BYTE)c64colours[i].g; - palette[i].rgbRed = (BYTE)c64colours[i].r; - } - - // write out bitmap data - - BYTE pixel_mask[4] = { 0xc0, 0x30, 0x0c, 0x03 }; - BYTE pixel_displacement[4] = { 6, 4, 2, 0 }; - int pixel, index, colourindex; - unsigned char found_color = 0; - - for (int y = 0; y < 200; y++) { - for (int x = 0; x < 160; x++) { - // Get value of pixel at (x,y) - - index = (x / 4) * 8 + (y % 8) + (y / 8) * CBM_WIDTH; - colourindex = (x / 4) + (y / 8) * 40; - pixel = (image.image[index] & pixel_mask[x % 4]) >> pixel_displacement[x % 4]; - - // Retrieve RGB values - - switch (pixel) { - case 0: // Background - found_color = image.background; - break; - - case 1: // Colour 1 - found_color = image.colour1[colourindex] >> 4; - break; - - case 2: // Colour 2 - found_color = image.colour1[colourindex] & 0xf; - break; - - case 3: // Colour 3 - found_color = image.colour2[colourindex] & 0xf; - break; - }; - - *(FreeImage_GetScanLine(dib, CBM_HEIGHT - y - 1) + x) = (found_color << 4) | found_color; - } - } - - return dib; - } - } - - return NULL; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitKOALA(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginMNG.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginMNG.cpp deleted file mode 100644 index 6d2f50e..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginMNG.cpp +++ /dev/null @@ -1,153 +0,0 @@ -// ========================================================== -// MNG loader -// -// Design and implementation by -// - Herve Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ---------------------------------------------------------- - -#define MNG_SIGNATURE_SIZE 8 // size of the signature - -// ---------------------------------------------------------- - -// ---------------------------------------------------------- -// mng interface (see MNGHelper.cpp) -// ---------------------------------------------------------- - -FIBITMAP* mng_ReadChunks(int format_id, FreeImageIO *io, fi_handle handle, long Offset, int flags = 0); - - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "MNG"; -} - -static const char * DLL_CALLCONV -Description() { - return "Multiple-image Network Graphics"; -} - -static const char * DLL_CALLCONV -Extension() { - return "mng"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "video/x-mng"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE mng_signature[8] = { 138, 77, 78, 71, 13, 10, 26, 10 }; - BYTE signature[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - - io->read_proc(&signature, 1, MNG_SIGNATURE_SIZE, handle); - - return (memcmp(mng_signature, signature, MNG_SIGNATURE_SIZE) == 0) ? TRUE : FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsICCProfiles() { - return TRUE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return FALSE; -} - - -// ---------------------------------------------------------- - -static void * DLL_CALLCONV -Open(FreeImageIO *io, fi_handle handle, BOOL read) { - return NULL; -} - -static void DLL_CALLCONV -Close(FreeImageIO *io, fi_handle handle, void *data) { -} - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - long offset = MNG_SIGNATURE_SIZE; // move to skip first 8 bytes of signature - - // check the signature (8 bytes) - if(Validate(io, handle) == FALSE) { - return NULL; - } - - // parse chunks and decode a jng or mng bitmap - return mng_ReadChunks(s_format_id, io, handle, offset, flags); -} - - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitMNG(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = Open; - plugin->close_proc = Close; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = SupportsICCProfiles; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginPCD.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginPCD.cpp deleted file mode 100644 index ff0c5b8..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginPCD.cpp +++ /dev/null @@ -1,251 +0,0 @@ -// ========================================================== -// Kodak PhotoCD Loader -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// -// Based on pascal code developed by Alex Kwak -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ========================================================== -// Internal functions -// ========================================================== - -static int -clamp(double x) { - int a = (int)floor(x + 0.5); - return (a < 0) ? 0 : (a > 255) ? 255 : a; -} - -static void -YUV2RGB(int y, int cb, int cr, int &r, int &g, int &b) { - double c11 = 0.0054980 * 256.0; - double c12 = 0.0000001 * 256.0; - double c13 = 0.0051681 * 256.0; - double c21 = 0.0054980 * 256.0; - double c22 = -0.0015446 * 256.0; - double c23 = -0.0026325 * 256.0; - double c31 = 0.0054980 * 256.0; - double c32 = 0.0079533 * 256.0; - double c33 = 0.0000001 * 256.0; - - r = clamp(c11 * y + c12 * (cb - 156) + c13 * (cr - 137)); - g = clamp(c21 * y + c22 * (cb - 156) + c23 * (cr - 137)); - b = clamp(c31 * y + c32 * (cb - 156) + c33 * (cr - 137)); -} - -static BOOL -VerticalOrientation(FreeImageIO *io, fi_handle handle) { - char buffer[128]; - - io->read_proc(buffer, 128, 1, handle); - - return (buffer[72] & 63) == 8; -} - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "PCD"; -} - -static const char * DLL_CALLCONV -Description() { - return "Kodak PhotoCD"; -} - -static const char * DLL_CALLCONV -Extension() { - return "pcd"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-photo-cd"; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - FIBITMAP *dib = NULL; - unsigned width; - unsigned height; - const unsigned bpp = 24; - int scan_line_add = 1; - int start_scan_line = 0; - - BYTE *y1 = NULL, *y2 = NULL, *cbcr = NULL; - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - // to make absolute seeks possible we store the current position in the file - - long offset_in_file = io->tell_proc(handle); - long seek = 0; - - // decide which bitmap in the cabinet to load - - switch (flags) { - case PCD_BASEDIV4 : - seek = 0x2000; - width = 192; - height = 128; - break; - - case PCD_BASEDIV16 : - seek = 0xB800; - width = 384; - height = 256; - break; - - default : - seek = 0x30000; - width = 768; - height = 512; - break; - } - - try { - // allocate the dib and write out the header - dib = FreeImage_AllocateHeader(header_only, width, height, bpp, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(!dib) throw FI_MSG_ERROR_DIB_MEMORY; - - if(header_only) { - return dib; - } - - // check if the PCD is bottom-up - - if (VerticalOrientation(io, handle)) { - scan_line_add = -1; - start_scan_line = height - 1; - } - - // temporary stuff to load PCD - - BYTE *y1 = (BYTE*)malloc(width * sizeof(BYTE)); - BYTE *y2 = (BYTE*)malloc(width * sizeof(BYTE)); - BYTE *cbcr = (BYTE*)malloc(width * sizeof(BYTE)); - if(!y1 || !y2 || !cbcr) throw FI_MSG_ERROR_MEMORY; - - BYTE *yl[] = { y1, y2 }; - - // seek to the part where the bitmap data begins - - io->seek_proc(handle, offset_in_file, SEEK_SET); - io->seek_proc(handle, seek, SEEK_CUR); - - // read the data - - for (unsigned y = 0; y < height / 2; y++) { - io->read_proc(y1, width, 1, handle); - io->read_proc(y2, width, 1, handle); - io->read_proc(cbcr, width, 1, handle); - - for (int i = 0; i < 2; i++) { - BYTE *bits = FreeImage_GetScanLine(dib, start_scan_line); - for (unsigned x = 0; x < width; x++) { - int r, g, b; - - YUV2RGB(yl[i][x], cbcr[x / 2], cbcr[(width / 2) + (x / 2)], r, g, b); - - bits[FI_RGBA_BLUE] = (BYTE)b; - bits[FI_RGBA_GREEN] = (BYTE)g; - bits[FI_RGBA_RED] = (BYTE)r; - bits += 3; - } - - start_scan_line += scan_line_add; - } - } - - free(cbcr); - free(y2); - free(y1); - - return dib; - - } catch(const char *text) { - if(dib) FreeImage_Unload(dib); - if(cbcr) free(cbcr); - if(y2) free(y2); - if(y1) free(y1); - - FreeImage_OutputMessageProc(s_format_id, text); - - return NULL; - } -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitPCD(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = NULL; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginPCX.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginPCX.cpp deleted file mode 100644 index dcda627..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginPCX.cpp +++ /dev/null @@ -1,701 +0,0 @@ -// ========================================================== -// PCX Loader -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Jani Kajala (janik@remedy.fi) -// - Markus Loibl (markus.loibl@epost.de) -// - Herv Drolon (drolon@infonie.fr) -// - Juergen Riecker (j.riecker@gmx.de) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Constants + headers -// ---------------------------------------------------------- - -#define PCX_IO_BUF_SIZE 2048 - -// ---------------------------------------------------------- - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -/** -PCX header -*/ -typedef struct tagPCXHEADER { - BYTE manufacturer; // Magic number (0x0A = ZSoft Z) - BYTE version; // Version 0 == 2.5 - // 2 == 2.8 with palette info - // 3 == 2.8 without palette info - // 5 == 3.0 with palette info - BYTE encoding; // Encoding: 0 = uncompressed, 1 = PCX bIsRLE compressed - BYTE bpp; // Bits per pixel per plane (only 1 or 8) - WORD window[4]; // left, upper, right,lower pixel coord. - WORD hdpi; // Horizontal resolution - WORD vdpi; // Vertical resolution - BYTE color_map[48]; // Colormap for 16-color images - BYTE reserved; - BYTE planes; // Number of planes (1, 3 or 4) - WORD bytes_per_line; // Bytes per row (always even) - WORD palette_info; // Palette information (1 = color or b&w; 2 = gray scale) - WORD h_screen_size; - WORD v_screen_size; - BYTE filler[54]; // Reserved filler -} PCXHEADER; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif - -// ========================================================== -// Internal functions -// ========================================================== - -/** -Try to validate a PCX signature. -Note that a PCX file cannot be trusted by its signature. -We use other information from the PCX header to improve the trust we have with this file. -@return Returns TRUE if PCX signature is OK, returns FALSE otherwise -*/ -static BOOL -pcx_validate(FreeImageIO *io, fi_handle handle) { - BYTE pcx_signature = 0x0A; - BYTE signature[4] = { 0, 0, 0, 0 }; - - if(io->read_proc(&signature, 1, 4, handle) != 4) { - return FALSE; - } - // magic number (0x0A = ZSoft Z) - if(signature[0] == pcx_signature) { - // version - if(signature[1] <= 5) { - // encoding - if((signature[2] == 0) || (signature[2] == 1)) { - // bits per pixel per plane - if((signature[3] == 1) || (signature[3] == 8)) { - return TRUE; - } - } - } - } - - return FALSE; -} - -/** -Read either run-length encoded or normal image data - -THIS IS HOW RUNTIME LENGTH ENCODING WORKS IN PCX: -1) If the upper 2 bits of a byte are set, the lower 6 bits specify the count for the next byte -2) If the upper 2 bits of the byte are clear, the byte is actual data with a count of 1 - -Note that a scanline always has an even number of bytes - -@param io FreeImage IO -@param handle FreeImage handle -@param buffer -@param length -@param bIsRLE -@param ReadBuf -@param ReadPos -@return -*/ -static unsigned -readLine(FreeImageIO *io, fi_handle handle, BYTE *buffer, unsigned length, BOOL bIsRLE, BYTE * ReadBuf, int * ReadPos) { - BYTE count = 0; - BYTE value = 0; - unsigned written = 0; - - if (bIsRLE) { - // run-length encoded read - - while (length--) { - if (count == 0) { - if (*ReadPos >= PCX_IO_BUF_SIZE - 1 ) { - if (*ReadPos == PCX_IO_BUF_SIZE - 1) { - // we still have one BYTE, copy it to the start pos - *ReadBuf = ReadBuf[PCX_IO_BUF_SIZE - 1]; - io->read_proc(ReadBuf + 1, 1, PCX_IO_BUF_SIZE - 1, handle); - } else { - // read the complete buffer - io->read_proc(ReadBuf, 1, PCX_IO_BUF_SIZE, handle); - } - - *ReadPos = 0; - } - - value = *(ReadBuf + (*ReadPos)++); - - if ((value & 0xC0) == 0xC0) { - count = value & 0x3F; - value = *(ReadBuf + (*ReadPos)++); - } else { - count = 1; - } - } - - count--; - - *(buffer + written++) = value; - } - - } else { - // normal read - - written = io->read_proc(buffer, length, 1, handle); - } - - return written; -} - -#ifdef FREEIMAGE_BIGENDIAN -static void -SwapHeader(PCXHEADER *header) { - SwapShort(&header->window[0]); - SwapShort(&header->window[1]); - SwapShort(&header->window[2]); - SwapShort(&header->window[3]); - SwapShort(&header->hdpi); - SwapShort(&header->vdpi); - SwapShort(&header->bytes_per_line); - SwapShort(&header->palette_info); - SwapShort(&header->h_screen_size); - SwapShort(&header->v_screen_size); -} -#endif - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -/*! - Returns the format string for the plugin. Each plugin, - both internal in the DLL and external in a .fip file, must have - a unique format string to be addressable. -*/ - -static const char * DLL_CALLCONV -Format() { - return "PCX"; -} - -/*! - Returns a description string for the plugin. Though a - description is not necessary per-se, - it is advised to return an unique string in order to tell the - user what type of bitmaps this plugin will read and/or write. -*/ - -static const char * DLL_CALLCONV -Description() { - return "Zsoft Paintbrush"; -} - -/*! - Returns a comma separated list of file - extensions indicating what files this plugin can open. The - list, being used by FreeImage_GetFIFFromFilename, is usually - used as a last resort in finding the type of the bitmap we - are dealing with. Best is to check the first few bytes on - the low-level bits level first and compare them with a known - signature . If this fails, FreeImage_GetFIFFromFilename can be - used. -*/ - -static const char * DLL_CALLCONV -Extension() { - return "pcx"; -} - -/*! - Returns an (optional) regular expression to help - software identifying a bitmap type. The - expression can be applied to the first few bytes (header) of - the bitmap. FreeImage is not capable of processing regular expression itself, - but FreeImageQt, the FreeImage Trolltech support library, can. If RegExpr - returns NULL, FreeImageQt will automatically bypass Trolltech's regular - expression support and use its internal functions to find the bitmap type. -*/ - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-pcx"; -} - -/*! - Validates a bitmap by reading the first few bytes - and comparing them with a known bitmap signature. - TRUE is returned if the bytes match the signature, FALSE otherwise. - The Validate function is used by using FreeImage_GetFileType. - - Note: a plugin can safely read data any data from the bitmap without seeking back - to the original entry point; the entry point is stored prior to calling this - function and restored after. - - Note: because of FreeImage's io redirection support, the header for the bitmap - must be on the start of the bitmap or at least on a known part in the bitmap. It is - forbidden to seek to the end of the bitmap or to a point relative to the end of a bitmap, - because the end of the bitmap is not always known. -*/ - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - return pcx_validate(io, handle); -} - -/*! - This function is used to 'ask' the plugin if it can write - a bitmap in a certain bitdepth. Different bitmap types have different - capabilities, for example not all formats allow writing in palettized mode. - This function is there provide an uniform interface to the plugin's - capabilities. SupportsExportDepth returns TRUE if the plugin support writing - in the asked bitdepth, or FALSE if it doesn't. The function also - returns FALSE if bitmap saving is not supported by the plugin at all. -*/ - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -/*! - Loads a bitmap into memory. On entry it is assumed that - the bitmap to be loaded is of the correct type. If the bitmap - is of an incorrect type, the plugin might not gracefully fail but - crash or enter an endless loop. It is also assumed that all - the bitmap data is available at one time. If the bitmap is not complete, - for example because it is being downloaded while loaded, the plugin - might also not gracefully fail. - - The Load function has the following parameters: - - The first parameter (FreeImageIO *io) is a structure providing - function pointers in order to make use of FreeImage's IO redirection. Using - FreeImage's file i/o functions instead of standard ones it is garantueed - that all bitmap types, both current and future ones, can be loaded from - memory, file cabinets, the internet and more. The second parameter (fi_handle handle) - is a companion of FreeImageIO and can be best compared with the standard FILE* type, - in a generalized form. - - The third parameter (int page) indicates wether we will be loading a certain page - in the bitmap or if we will load the default one. This parameter is only used if - the plugin supports multi-paged bitmaps, e.g. cabinet bitmaps that contain a series - of images or pages. If the plugin does support multi-paging, the page parameter - can contain either a number higher or equal to 0 to load a certain page, or -1 to - load the default page. If the plugin does not support multi-paging, - the page parameter is always -1. - - The fourth parameter (int flags) manipulates the load function to load a bitmap - in a certain way. Every plugin has a different flag parameter with different meanings. - - The last parameter (void *data) can contain a special data block used when - the file is read multi-paged. Because not every plugin supports multi-paging - not every plugin will use the data parameter and it will be set to NULL.However, - when the plugin does support multi-paging the parameter contains a pointer to a - block of data allocated by the Open function. -*/ - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - FIBITMAP *dib = NULL; - BYTE *bits; // Pointer to dib data - RGBQUAD *pal; // Pointer to dib palette - BYTE *line = NULL; // PCX raster line - BYTE *ReadBuf = NULL; // buffer; - BOOL bIsRLE; // True if the file is run-length encoded - - if(!handle) { - return NULL; - } - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - try { - // check PCX identifier - // (note: should have been already validated using FreeImage_GetFileType but check again) - { - long start_pos = io->tell_proc(handle); - BOOL bValidated = pcx_validate(io, handle); - io->seek_proc(handle, start_pos, SEEK_SET); - if(!bValidated) { - throw FI_MSG_ERROR_MAGIC_NUMBER; - } - } - - PCXHEADER header; - - // process the header - if(io->read_proc(&header, sizeof(PCXHEADER), 1, handle) != 1) { - throw FI_MSG_ERROR_PARSING; - } -#ifdef FREEIMAGE_BIGENDIAN - SwapHeader(&header); -#endif - - // process the window - const WORD *window = header.window; // left, upper, right,lower pixel coord. - const int left = window[0]; - const int top = window[1]; - const int right = window[2]; - const int bottom = window[3]; - - // check image size - if((left >= right) || (top >= bottom)) { - throw FI_MSG_ERROR_PARSING; - } - - const unsigned width = right - left + 1; - const unsigned height = bottom - top + 1; - const unsigned bitcount = header.bpp * header.planes; - - // allocate a new dib - switch(bitcount) { - case 1: - case 4: - case 8: - dib = FreeImage_AllocateHeader(header_only, width, height, bitcount); - break; - case 24: - dib = FreeImage_AllocateHeader(header_only, width, height, bitcount, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - break; - default: - throw FI_MSG_ERROR_DIB_MEMORY; - break; - } - - // if the dib couldn't be allocated, throw an error - if (!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // metrics handling code - - FreeImage_SetDotsPerMeterX(dib, (unsigned) (((float)header.hdpi) / 0.0254000 + 0.5)); - FreeImage_SetDotsPerMeterY(dib, (unsigned) (((float)header.vdpi) / 0.0254000 + 0.5)); - - // Set up the palette if needed - // ---------------------------- - - switch(bitcount) { - case 1: - { - pal = FreeImage_GetPalette(dib); - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 0; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 255; - break; - } - - case 4: - { - pal = FreeImage_GetPalette(dib); - - BYTE *pColormap = &header.color_map[0]; - - for (int i = 0; i < 16; i++) { - pal[i].rgbRed = pColormap[0]; - pal[i].rgbGreen = pColormap[1]; - pal[i].rgbBlue = pColormap[2]; - pColormap += 3; - } - - break; - } - - case 8: - { - BYTE palette_id; - - io->seek_proc(handle, -769L, SEEK_END); - io->read_proc(&palette_id, 1, 1, handle); - - if (palette_id == 0x0C) { - BYTE *cmap = (BYTE*)malloc(768 * sizeof(BYTE)); - - if(cmap) { - io->read_proc(cmap, 768, 1, handle); - - pal = FreeImage_GetPalette(dib); - BYTE *pColormap = &cmap[0]; - - for(int i = 0; i < 256; i++) { - pal[i].rgbRed = pColormap[0]; - pal[i].rgbGreen = pColormap[1]; - pal[i].rgbBlue = pColormap[2]; - pColormap += 3; - } - - free(cmap); - } - - } - - // wrong palette ID, perhaps a gray scale is needed ? - - else if (header.palette_info == 2) { - pal = FreeImage_GetPalette(dib); - - for(int i = 0; i < 256; i++) { - pal[i].rgbRed = (BYTE)i; - pal[i].rgbGreen = (BYTE)i; - pal[i].rgbBlue = (BYTE)i; - } - } - - io->seek_proc(handle, (long)sizeof(PCXHEADER), SEEK_SET); - } - break; - } - - if(header_only) { - // header only mode - return dib; - } - - // calculate the line length for the PCX and the dib - - // length of raster line in bytes - const unsigned lineLength = header.bytes_per_line * header.planes; - // length of dib line (rounded to DWORD) in bytes - const unsigned pitch = FreeImage_GetPitch(dib); - - // run-length encoding ? - - bIsRLE = (header.encoding == 1) ? TRUE : FALSE; - - // load image data - // --------------- - - line = (BYTE*)malloc(lineLength * sizeof(BYTE)); - if(!line) { - throw FI_MSG_ERROR_MEMORY; - } - - ReadBuf = (BYTE*)malloc(PCX_IO_BUF_SIZE * sizeof(BYTE)); - if(!ReadBuf) { - throw FI_MSG_ERROR_MEMORY; - } - - bits = FreeImage_GetScanLine(dib, height - 1); - - int ReadPos = PCX_IO_BUF_SIZE; - - if ((header.planes == 1) && ((header.bpp == 1) || (header.bpp == 8))) { - BYTE skip; - unsigned written; - - for (unsigned y = 0; y < height; y++) { - // do a safe copy of the scanline into 'line' - written = readLine(io, handle, line, lineLength, bIsRLE, ReadBuf, &ReadPos); - // sometimes (already encountered), PCX images can have a lineLength > pitch - memcpy(bits, line, MIN(pitch, lineLength)); - - // skip trailing garbage at the end of the scanline - - for (unsigned count = written; count < lineLength; count++) { - if (ReadPos < PCX_IO_BUF_SIZE) { - ReadPos++; - } else { - io->read_proc(&skip, sizeof(BYTE), 1, handle); - } - } - - bits -= pitch; - } - } else if ((header.planes == 4) && (header.bpp == 1)) { - BYTE bit, mask, skip; - unsigned index; - BYTE *buffer; - - buffer = (BYTE*)malloc(width * sizeof(BYTE)); - if(!buffer) { - throw FI_MSG_ERROR_MEMORY; - } - - for (unsigned y = 0; y < height; y++) { - unsigned written = readLine(io, handle, line, lineLength, bIsRLE, ReadBuf, &ReadPos); - - // build a nibble using the 4 planes - - memset(buffer, 0, width * sizeof(BYTE)); - - for(int plane = 0; plane < 4; plane++) { - bit = (BYTE)(1 << plane); - - for (unsigned x = 0; x < width; x++) { - index = (unsigned)((x / 8) + plane * header.bytes_per_line); - mask = (BYTE)(0x80 >> (x & 0x07)); - buffer[x] |= (line[index] & mask) ? bit : 0; - } - } - - // then write the dib row - - for (unsigned x = 0; x < width / 2; x++) { - bits[x] = (buffer[2*x] << 4) | buffer[2*x+1]; - } - - // skip trailing garbage at the end of the scanline - - for (unsigned count = written; count < lineLength; count++) { - if (ReadPos < PCX_IO_BUF_SIZE) { - ReadPos++; - } else { - io->read_proc(&skip, sizeof(BYTE), 1, handle); - } - } - - bits -= pitch; - } - - free(buffer); - - } else if((header.planes == 3) && (header.bpp == 8)) { - BYTE *pLine; - - for (unsigned y = 0; y < height; y++) { - readLine(io, handle, line, lineLength, bIsRLE, ReadBuf, &ReadPos); - - // convert the plane stream to BGR (RRRRGGGGBBBB -> BGRBGRBGRBGR) - // well, now with the FI_RGBA_x macros, on BIGENDIAN we convert to RGB - - pLine = line; - unsigned x; - - for (x = 0; x < width; x++) { - bits[x * 3 + FI_RGBA_RED] = pLine[x]; - } - pLine += header.bytes_per_line; - - for (x = 0; x < width; x++) { - bits[x * 3 + FI_RGBA_GREEN] = pLine[x]; - } - pLine += header.bytes_per_line; - - for (x = 0; x < width; x++) { - bits[x * 3 + FI_RGBA_BLUE] = pLine[x]; - } - pLine += header.bytes_per_line; - - bits -= pitch; - } - } else { - throw FI_MSG_ERROR_UNSUPPORTED_FORMAT; - } - - free(line); - free(ReadBuf); - - return dib; - - } catch (const char *text) { - // free allocated memory - - if (dib != NULL) { - FreeImage_Unload(dib); - } - if (line != NULL) { - free(line); - } - if (ReadBuf != NULL) { - free(ReadBuf); - } - - FreeImage_OutputMessageProc(s_format_id, text); - } - - return NULL; -} - -// ========================================================== -// Init -// ========================================================== - -/*! - Initialises the plugin. The first parameter (Plugin *plugin) - contains a pointer to a pre-allocated Plugin structure - wherein pointers to the available plugin functions - has to be stored. The second parameter (int format_id) is an identification - number that the plugin may use to show plugin specific warning messages - or other information to the user. The plugin number - is generated by FreeImage and can differ everytime the plugin is - initialised. - - If you want to create your own plugin you have to take some - rules into account. Plugin functions have to be compiled - __stdcall using the multithreaded c runtime libraries. Throwing - exceptions in plugin functions is allowed, as long as those exceptions - are being caught inside the same plugin. It is forbidden for a plugin - function to directly call FreeImage functions or to allocate memory - and pass it to the main DLL. Exception to this rule is the special file data - block that may be allocated the Open function. Allocating a FIBITMAP inside a - plugin can be using the function allocate_proc in the FreeImage structure, - which will allocate the memory using the DLL's c runtime library. -*/ - -void DLL_CALLCONV -InitPCX(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginPFM.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginPFM.cpp deleted file mode 100644 index ea3c46b..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginPFM.cpp +++ /dev/null @@ -1,409 +0,0 @@ -// ========================================================== -// PFM Loader and Writer -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ========================================================== -// Internal functions -// ========================================================== - -/** maximum size of a line in the header */ -#define PFM_MAXLINE 256 - -/** Big endian / Little endian float conversion */ -#define REVERSEBYTES(source, dest) \ -{ \ - char *j = (char *) source; \ - char *dj = (char *) dest; \ - dj[0] = j[3]; \ - dj[1] = j[2]; \ - dj[2] = j[1]; \ - dj[3] = j[0]; \ -} - -/** -Get a line from a ASCII io stream -*/ -static BOOL -pfm_get_line(FreeImageIO *io, fi_handle handle, char *buffer, int length) { - int i; - memset(buffer, 0, length); - for(i = 0; i < length; i++) { - if(!io->read_proc(&buffer[i], 1, 1, handle)) - return FALSE; - if(buffer[i] == 0x0A) - break; - } - - return (i < length) ? TRUE : FALSE; -} - -/** -Get an integer value from the actual position pointed by handle -*/ -static int -pfm_get_int(FreeImageIO *io, fi_handle handle) { - char c = 0; - BOOL bFirstChar; - - // skip forward to start of next number - - if(!io->read_proc(&c, 1, 1, handle)) { - throw FI_MSG_ERROR_PARSING; - } - - while (1) { - // eat comments - - if (c == '#') { - // if we're at a comment, read to end of line - - bFirstChar = TRUE; - - while (1) { - if(!io->read_proc(&c, 1, 1, handle)) { - throw FI_MSG_ERROR_PARSING; - } - - if (bFirstChar && c == ' ') { - // loop off 1 sp after # - bFirstChar = FALSE; - } else if (c == '\n') { - break; - } - } - } - - if (c >= '0' && c <='9') { - // we've found what we were looking for - break; - } - - if(!io->read_proc(&c, 1, 1, handle)) { - throw FI_MSG_ERROR_PARSING; - } - } - - // we're at the start of a number, continue until we hit a non-number - - int i = 0; - - while (1) { - i = (i * 10) + (c - '0'); - - if(!io->read_proc(&c, 1, 1, handle)) { - throw FI_MSG_ERROR_PARSING; - } - - if (c < '0' || c > '9') { - break; - } - } - - return i; -} - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "PFM"; -} - -static const char * DLL_CALLCONV -Description() { - return "Portable floatmap"; -} - -static const char * DLL_CALLCONV -Extension() { - return "pfm"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-portable-floatmap"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE pfm_id1[] = { 0x50, 0x46 }; - BYTE pfm_id2[] = { 0x50, 0x66 }; - BYTE signature[2] = { 0, 0 }; - - io->read_proc(signature, 1, sizeof(pfm_id1), handle); - - if (memcmp(pfm_id1, signature, sizeof(pfm_id1)) == 0) - return TRUE; - - if (memcmp(pfm_id2, signature, sizeof(pfm_id2)) == 0) - return TRUE; - - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return ( - (type == FIT_FLOAT) || - (type == FIT_RGBF) - ); -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - char line_buffer[PFM_MAXLINE]; - char id_one = 0, id_two = 0; - FIBITMAP *dib = NULL; - float *lineBuffer = NULL; - - if (!handle) { - return NULL; - } - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - try { - FREE_IMAGE_TYPE image_type = FIT_UNKNOWN; - - // Read the first two bytes of the file to determine the file format - // "PF" = color image - // "Pf" = greyscale image - - io->read_proc(&id_one, 1, 1, handle); - io->read_proc(&id_two, 1, 1, handle); - - if(id_one == 'P') { - if(id_two == 'F') { - image_type = FIT_RGBF; - } else if(id_two == 'f') { - image_type = FIT_FLOAT; - } - } - if(image_type == FIT_UNKNOWN) { - // signature error - throw FI_MSG_ERROR_MAGIC_NUMBER; - } - - // Read the header information: width, height and the scale value - unsigned width = (unsigned) pfm_get_int(io, handle); - unsigned height = (unsigned) pfm_get_int(io, handle); - float scalefactor = 1; - - BOOL bResult = pfm_get_line(io, handle, line_buffer, PFM_MAXLINE); - if(bResult) { - bResult = (sscanf(line_buffer, "%f", &scalefactor) == 1) ? TRUE : FALSE; - } - if(!bResult) { - throw "Read error: invalid PFM header"; - } - - // Create a new DIB - dib = FreeImage_AllocateHeaderT(header_only, image_type, width, height); - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - if(header_only) { - // header only mode - return dib; - } - - // Read the image... - - if(image_type == FIT_RGBF) { - const unsigned lineWidth = 3 * width; - lineBuffer = (float*)malloc(lineWidth * sizeof(float)); - if(!lineBuffer) { - throw FI_MSG_ERROR_MEMORY; - } - - for (unsigned y = 0; y < height; y++) { - FIRGBF *bits = (FIRGBF*)FreeImage_GetScanLine(dib, height - 1 - y); - - if(io->read_proc(lineBuffer, sizeof(float), lineWidth, handle) != lineWidth) { - throw "Read error"; - } - float *channel = lineBuffer; - if(scalefactor > 0) { - // MSB - for (unsigned x = 0; x < width; x++) { - REVERSEBYTES(channel++, &bits[x].red); - REVERSEBYTES(channel++, &bits[x].green); - REVERSEBYTES(channel++, &bits[x].blue); - } - } else { - // LSB - for (unsigned x = 0; x < width; x++) { - bits[x].red = *channel++; - bits[x].green = *channel++; - bits[x].blue = *channel++; - } - } - } - - free(lineBuffer); - lineBuffer = NULL; - - } else if(image_type == FIT_FLOAT) { - const unsigned lineWidth = width; - lineBuffer = (float*)malloc(lineWidth * sizeof(float)); - if(!lineBuffer) { - throw FI_MSG_ERROR_MEMORY; - } - - for (unsigned y = 0; y < height; y++) { - float *bits = (float*)FreeImage_GetScanLine(dib, height - 1 - y); - - if(io->read_proc(lineBuffer, sizeof(float), lineWidth, handle) != lineWidth) { - throw "Read error"; - } - float *channel = lineBuffer; - if(scalefactor > 0) { - // MSB - File is Big endian - for (unsigned x = 0; x < width; x++) { - REVERSEBYTES(channel++, &bits[x]); - } - } else { - // LSB - File is Little Endian - for (unsigned x = 0; x < width; x++) { - bits[x] = *channel++; - } - } - } - - free(lineBuffer); - lineBuffer = NULL; - } - - return dib; - - } catch (const char *text) { - if(lineBuffer) free(lineBuffer); - if(dib) FreeImage_Unload(dib); - - if(NULL != text) { - FreeImage_OutputMessageProc(s_format_id, text); - } - - return NULL; - } - -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - if(!dib || !handle) return FALSE; - - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - if((image_type != FIT_RGBF) && (image_type != FIT_FLOAT)) { - return FALSE; - } - - unsigned width = FreeImage_GetWidth(dib); - unsigned height = FreeImage_GetHeight(dib); - unsigned lineWidth = FreeImage_GetLine(dib); - - // save image as Little Endian - const float scalefactor = -1.0F; - - char buffer[PFM_MAXLINE]; // temporary buffer whose size should be enough for what we need - - // Find the appropriate magic number for this file type - - char magic = 0; - - switch(image_type) { - case FIT_RGBF: - magic = 'F'; // RGBF - break; - case FIT_FLOAT: - magic = 'f'; // float greyscale - break; - default: - return FALSE; - } - - // Write the header info - - sprintf(buffer, "P%c\n%d %d\n%f\n", magic, width, height, scalefactor); - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - - // Write the image data - for (unsigned y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - io->write_proc(bits, 1, lineWidth, handle); - } - - return TRUE; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitPFM(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginPICT.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginPICT.cpp deleted file mode 100644 index 371056d..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginPICT.cpp +++ /dev/null @@ -1,1343 +0,0 @@ -// ========================================================== -// Apple Macintosh QuickDraw/PICT Loader -// -// Design and implementation by -// - Amir Ebrahimi (amir@unity3d.com) -// -// Based on PICT loading code from paintlib (http://www.paintlib.de/paintlib/). -// -// Paintlib License: -// The paintlib source code and all documentation are copyright (c) 1996-2002 -// Ulrich von Zadow and other contributors. -// -// The paintlib source code is supplied "AS IS". Ulrich von Zadow and other -// contributors disclaim all warranties, expressed or implied, including, without -// limitation, the warranties of merchantability and of fitness for any purpose. -// The authors assume no liability for direct, indirect, incidental, special, -// exemplary, or consequential damages, which may result from the use of paintlib, -// 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. -// 4. Executables containing paintlib or parts of it must state that the software -// "contains paintlib code. paintlib is copyright (c) 1996-2002 Ulrich von Zadow -// and other contributors.". This notice must be displayed in at least one place -// where the copyright for the software itself is displayed. The documentation must -// also contain this notice. -// -// Bug fixes were made to the original code to support version 2 PICT files -// properly. -// -// Additional resources: -// http://developer.apple.com/documentation/mac/QuickDraw/QuickDraw-458.html -// http://www.fileformat.info/format/macpict/egff.htm -// -// Notes (http://lists.apple.com/archives/java-dev/2006/Apr/msg00588.html): -// There are three main types of PICT files: -// - Version 1 -// - Version 2 -// - Extended Version 2 -// -// Some things to look out for: -// - The bounds and target DPI are stored in a different place in all three. -// - Some of the values are fixed-point shorts ( short / 65536f ) -// - Values are big endian -// - All of this may be *preceded* by a 512 byte header--sometimes it is -// there, and sometimes it isn't. You just have to check for the magic -// values in both places. -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ========================================================== -// Plugin Interface -// ========================================================== -static int s_format_id; - -static const int outputMessageSize = 256; - -// ========================================================== -// Internal functions -// ========================================================== - -static BYTE -Read8(FreeImageIO *io, fi_handle handle) { - BYTE i = 0; - io->read_proc(&i, 1, 1, handle); - return i; -} - -static WORD -Read16(FreeImageIO *io, fi_handle handle) { - // reads a two-byte big-endian integer from the given file and returns its value. - // assumes unsigned. - - unsigned hi = Read8(io, handle); - unsigned lo = Read8(io, handle); - return (WORD)(lo + (hi << 8)); -} - -static unsigned -Read32(FreeImageIO *io, fi_handle handle) { - // reads a four-byte big-endian integer from the given file and returns its value. - // assumes unsigned. - - unsigned b3 = Read8(io, handle); - unsigned b2 = Read8(io, handle); - unsigned b1 = Read8(io, handle); - unsigned b0 = Read8(io, handle); - return (b3 << 24) + (b2 << 16) + (b1 << 8) + b0; -} - -// ---------------------------------------------------------- - -struct OpDef -{ - const char * name; - int len; - const char * description; -}; - -// for reserved opcodes -#define res(length) { "reserved", (length), "reserved for Apple use" } -#define RGB_LEN 6 -#define WORD_LEN -1 -#define NA 0 - -static OpDef optable[] = -{ -/* 0x00 */ { "NOP", 0, "nop" }, -/* 0x01 */ { "Clip", NA, "clip" }, -/* 0x02 */ { "BkPat", 8, "background pattern" }, -/* 0x03 */ { "TxFont", 2, "text font (word)" }, -/* 0x04 */ { "TxFace", 1, "text face (byte)" }, -/* 0x05 */ { "TxMode", 2, "text mode (word)" }, -/* 0x06 */ { "SpExtra", 4, "space extra (fixed point)" }, -/* 0x07 */ { "PnSize", 4, "pen size (point)" }, -/* 0x08 */ { "PnMode", 2, "pen mode (word)" }, -/* 0x09 */ { "PnPat", 8, "pen pattern" }, -/* 0x0a */ { "FillPat", 8, "fill pattern" }, -/* 0x0b */ { "OvSize", 4, "oval size (point)" }, -/* 0x0c */ { "Origin", 4, "dh, dv (word)" }, -/* 0x0d */ { "TxSize", 2, "text size (word)" }, -/* 0x0e */ { "FgColor", 4, "foreground color (longword)" }, -/* 0x0f */ { "BkColor", 4, "background color (longword)" }, -/* 0x10 */ { "TxRatio", 8, "numerator (point), denominator (point)" }, -/* 0x11 */ { "Version", 1, "version (byte)" }, -/* 0x12 */ { "BkPixPat", NA, "color background pattern" }, -/* 0x13 */ { "PnPixPat", NA, "color pen pattern" }, -/* 0x14 */ { "FillPixPat", NA, "color fill pattern" }, -/* 0x15 */ { "PnLocHFrac", 2, "fractional pen position" }, -/* 0x16 */ { "ChExtra", 2, "extra for each character" }, -/* 0x17 */ res(0), -/* 0x18 */ res(0), -/* 0x19 */ res(0), -/* 0x1a */ { "RGBFgCol", RGB_LEN, "RGB foreColor" }, -/* 0x1b */ { "RGBBkCol", RGB_LEN, "RGB backColor" }, -/* 0x1c */ { "HiliteMode", 0, "hilite mode flag" }, -/* 0x1d */ { "HiliteColor", RGB_LEN, "RGB hilite color" }, -/* 0x1e */ { "DefHilite", 0, "Use default hilite color" }, -/* 0x1f */ { "OpColor", 6, "RGB OpColor for arithmetic modes" }, -/* 0x20 */ { "Line", 8, "pnLoc (point), newPt (point)" }, -/* 0x21 */ { "LineFrom", 4, "newPt (point)" }, -/* 0x22 */ { "ShortLine", 6, "pnLoc (point, dh, dv (-128 .. 127))" }, -/* 0x23 */ { "ShortLineFrom", 2, "dh, dv (-128 .. 127)" }, -/* 0x24 */ res(WORD_LEN), -/* 0x25 */ res(WORD_LEN), -/* 0x26 */ res(WORD_LEN), -/* 0x27 */ res(WORD_LEN), -/* 0x28 */ { "LongText", NA, "txLoc (point), count (0..255), text" }, -/* 0x29 */ { "DHText", NA, "dh (0..255), count (0..255), text" }, -/* 0x2a */ { "DVText", NA, "dv (0..255), count (0..255), text" }, -/* 0x2b */ { "DHDVText", NA, "dh, dv (0..255), count (0..255), text" }, -/* 0x2c */ res(WORD_LEN), -/* 0x2d */ res(WORD_LEN), -/* 0x2e */ res(WORD_LEN), -/* 0x2f */ res(WORD_LEN), -/* 0x30 */ { "frameRect", 8, "rect" }, -/* 0x31 */ { "paintRect", 8, "rect" }, -/* 0x32 */ { "eraseRect", 8, "rect" }, -/* 0x33 */ { "invertRect", 8, "rect" }, -/* 0x34 */ { "fillRect", 8, "rect" }, -/* 0x35 */ res(8), -/* 0x36 */ res(8), -/* 0x37 */ res(8), -/* 0x38 */ { "frameSameRect", 0, "rect" }, -/* 0x39 */ { "paintSameRect", 0, "rect" }, -/* 0x3a */ { "eraseSameRect", 0, "rect" }, -/* 0x3b */ { "invertSameRect", 0, "rect" }, -/* 0x3c */ { "fillSameRect", 0, "rect" }, -/* 0x3d */ res(0), -/* 0x3e */ res(0), -/* 0x3f */ res(0), -/* 0x40 */ { "frameRRect", 8, "rect" }, -/* 0x41 */ { "paintRRect", 8, "rect" }, -/* 0x42 */ { "eraseRRect", 8, "rect" }, -/* 0x43 */ { "invertRRect", 8, "rect" }, -/* 0x44 */ { "fillRRrect", 8, "rect" }, -/* 0x45 */ res(8), -/* 0x46 */ res(8), -/* 0x47 */ res(8), -/* 0x48 */ { "frameSameRRect", 0, "rect" }, -/* 0x49 */ { "paintSameRRect", 0, "rect" }, -/* 0x4a */ { "eraseSameRRect", 0, "rect" }, -/* 0x4b */ { "invertSameRRect", 0, "rect" }, -/* 0x4c */ { "fillSameRRect", 0, "rect" }, -/* 0x4d */ res(0), -/* 0x4e */ res(0), -/* 0x4f */ res(0), -/* 0x50 */ { "frameOval", 8, "rect" }, -/* 0x51 */ { "paintOval", 8, "rect" }, -/* 0x52 */ { "eraseOval", 8, "rect" }, -/* 0x53 */ { "invertOval", 8, "rect" }, -/* 0x54 */ { "fillOval", 8, "rect" }, -/* 0x55 */ res(8), -/* 0x56 */ res(8), -/* 0x57 */ res(8), -/* 0x58 */ { "frameSameOval", 0, "rect" }, -/* 0x59 */ { "paintSameOval", 0, "rect" }, -/* 0x5a */ { "eraseSameOval", 0, "rect" }, -/* 0x5b */ { "invertSameOval", 0, "rect" }, -/* 0x5c */ { "fillSameOval", 0, "rect" }, -/* 0x5d */ res(0), -/* 0x5e */ res(0), -/* 0x5f */ res(0), -/* 0x60 */ { "frameArc", 12, "rect, startAngle, arcAngle" }, -/* 0x61 */ { "paintArc", 12, "rect, startAngle, arcAngle" }, -/* 0x62 */ { "eraseArc", 12, "rect, startAngle, arcAngle" }, -/* 0x63 */ { "invertArc", 12, "rect, startAngle, arcAngle" }, -/* 0x64 */ { "fillArc", 12, "rect, startAngle, arcAngle" }, -/* 0x65 */ res(12), -/* 0x66 */ res(12), -/* 0x67 */ res(12), -/* 0x68 */ { "frameSameArc", 4, "rect, startAngle, arcAngle" }, -/* 0x69 */ { "paintSameArc", 4, "rect, startAngle, arcAngle" }, -/* 0x6a */ { "eraseSameArc", 4, "rect, startAngle, arcAngle" }, -/* 0x6b */ { "invertSameArc", 4, "rect, startAngle, arcAngle" }, -/* 0x6c */ { "fillSameArc", 4, "rect, startAngle, arcAngle" }, -/* 0x6d */ res(4), -/* 0x6e */ res(4), -/* 0x6f */ res(4), -/* 0x70 */ { "framePoly", NA, "poly" }, -/* 0x71 */ { "paintPoly", NA, "poly" }, -/* 0x72 */ { "erasePoly", NA, "poly" }, -/* 0x73 */ { "invertPoly", NA, "poly" }, -/* 0x74 */ { "fillPoly", NA, "poly" }, -/* 0x75 */ res(NA), -/* 0x76 */ res(NA), -/* 0x77 */ res(NA), -/* 0x78 */ { "frameSamePoly", 0, "poly (NYI)" }, -/* 0x79 */ { "paintSamePoly", 0, "poly (NYI)" }, -/* 0x7a */ { "eraseSamePoly", 0, "poly (NYI)" }, -/* 0x7b */ { "invertSamePoly", 0, "poly (NYI)" }, -/* 0x7c */ { "fillSamePoly", 0, "poly (NYI)" }, -/* 0x7d */ res(0), -/* 0x7e */ res(0), -/* 0x7f */ res(0), -/* 0x80 */ { "frameRgn", NA, "region" }, -/* 0x81 */ { "paintRgn", NA, "region" }, -/* 0x82 */ { "eraseRgn", NA, "region" }, -/* 0x83 */ { "invertRgn", NA, "region" }, -/* 0x84 */ { "fillRgn", NA, "region" }, -/* 0x85 */ res(NA), -/* 0x86 */ res(NA), -/* 0x87 */ res(NA), -/* 0x88 */ { "frameSameRgn", 0, "region (NYI)" }, -/* 0x89 */ { "paintSameRgn", 0, "region (NYI)" }, -/* 0x8a */ { "eraseSameRgn", 0, "region (NYI)" }, -/* 0x8b */ { "invertSameRgn", 0, "region (NYI)" }, -/* 0x8c */ { "fillSameRgn", 0, "region (NYI)" }, -/* 0x8d */ res(0), -/* 0x8e */ res(0), -/* 0x8f */ res(0), -/* 0x90 */ { "BitsRect", NA, "copybits, rect clipped" }, -/* 0x91 */ { "BitsRgn", NA, "copybits, rgn clipped" }, -/* 0x92 */ res(WORD_LEN), -/* 0x93 */ res(WORD_LEN), -/* 0x94 */ res(WORD_LEN), -/* 0x95 */ res(WORD_LEN), -/* 0x96 */ res(WORD_LEN), -/* 0x97 */ res(WORD_LEN), -/* 0x98 */ { "PackBitsRect", NA, "packed copybits, rect clipped" }, -/* 0x99 */ { "PackBitsRgn", NA, "packed copybits, rgn clipped" }, -/* 0x9a */ { "Opcode_9A", NA, "the mysterious opcode 9A" }, -/* 0x9b */ res(WORD_LEN), -/* 0x9c */ res(WORD_LEN), -/* 0x9d */ res(WORD_LEN), -/* 0x9e */ res(WORD_LEN), -/* 0x9f */ res(WORD_LEN), -/* 0xa0 */ { "ShortComment", 2, "kind (word)" }, -/* 0xa1 */ { "LongComment", NA, "kind (word), size (word), data" } -}; - -// ---------------------------------------------------------- - -struct MacRect -{ - WORD top; - WORD left; - WORD bottom; - WORD right; -}; - -struct MacpixMap -{ - // Ptr baseAddr // Not used in file. - // short rowBytes // read in seperatly. - struct MacRect Bounds; - WORD version; - WORD packType; - LONG packSize; - LONG hRes; - LONG vRes; - WORD pixelType; - WORD pixelSize; - WORD cmpCount; - WORD cmpSize; - LONG planeBytes; - LONG pmTable; - LONG pmReserved; -}; - -struct MacRGBColour -{ - WORD red; - WORD green; - WORD blue; -}; - -struct MacPoint -{ - WORD x; - WORD y; -}; - -struct MacPattern // Klaube -{ - BYTE pix[64]; -}; - -// ---------------------------------------------------------- - -static void -ReadRect( FreeImageIO *io, fi_handle handle, MacRect* rect ) { - rect->top = Read16( io, handle ); - rect->left = Read16( io, handle ); - rect->bottom = Read16( io, handle ); - rect->right = Read16( io, handle ); -} - -static void -ReadPixmap( FreeImageIO *io, fi_handle handle, MacpixMap* pPixMap ) { - pPixMap->version = Read16( io, handle ); - pPixMap->packType = Read16( io, handle ); - pPixMap->packSize = Read32( io, handle ); - pPixMap->hRes = Read16( io, handle ); - Read16( io, handle ); - pPixMap->vRes = Read16( io, handle ); - Read16( io, handle ); - pPixMap->pixelType = Read16( io, handle ); - pPixMap->pixelSize = Read16( io, handle ); - pPixMap->cmpCount = Read16( io, handle ); - pPixMap->cmpSize = Read16( io, handle ); - pPixMap->planeBytes = Read32( io, handle ); - pPixMap->pmTable = Read32( io, handle ); - pPixMap->pmReserved = Read32( io, handle ); -} - -/** -Reads a mac color table into a bitmap palette. -*/ -static void -ReadColorTable( FreeImageIO *io, fi_handle handle, WORD* pNumColors, RGBQUAD* pPal ) { - LONG ctSeed; - WORD ctFlags; - WORD val; - int i; - - ctSeed = Read32( io, handle ); - ctFlags = Read16( io, handle ); - WORD numColors = Read16( io, handle )+1; - *pNumColors = numColors; - - for (i = 0; i < numColors; i++) { - val = Read16( io, handle ); - if (ctFlags & 0x8000) { - // The indicies in a device colour table are bogus and - // usually == 0, so I assume we allocate up the list of - // colours in order. - val = (WORD)i; - } - if (val >= numColors) { - throw "pixel value greater than color table size."; - } - // Mac colour tables contain 16-bit values for R, G, and B... - pPal[val].rgbRed = ((BYTE) (((WORD) (Read16( io, handle )) >> 8) & 0xFF)); - pPal[val].rgbGreen = ((BYTE) (((WORD) (Read16( io, handle )) >> 8) & 0xFF)); - pPal[val].rgbBlue = ((BYTE) (((WORD) (Read16( io, handle )) >> 8) & 0xFF)); - } -} - -/** -skips unneeded packbits. -pixelSize == Source bits per pixel. -*/ -static void -SkipBits( FreeImageIO *io, fi_handle handle, MacRect* bounds, WORD rowBytes, int pixelSize ) { - int i; - WORD pixwidth; // bytes per row when uncompressed. - - int height = bounds->bottom - bounds->top; - int width = bounds->right - bounds->left; - - // High bit of rowBytes is flag. - if (pixelSize <= 8) { - rowBytes &= 0x7fff; - } - pixwidth = (WORD)width; - - if (pixelSize == 16) { - pixwidth *= 2; - } - if (rowBytes == 0) { - rowBytes = pixwidth; - } - if (rowBytes < 8) { - io->seek_proc( handle, rowBytes*height, SEEK_CUR ); - } - else { - for (i = 0; i < height; i++) { - int lineLen; // length of source line in bytes. - if (rowBytes > 250) { - lineLen = Read16( io, handle ); - } else { - lineLen = Read8( io, handle ); - } - io->seek_proc( handle, lineLen, SEEK_CUR ); - } - } -} - -/** -Skip polygon or region -*/ -static void -SkipPolyOrRegion( FreeImageIO *io, fi_handle handle ) { - WORD len = Read16( io, handle ) - 2; - io->seek_proc(handle, len, SEEK_CUR); -} - -/** -Width in bytes for 8 bpp or less. -Width in pixels for 16 bpp. -Expands Width units to 32-bit pixel data. -*/ -static void -expandBuf( FreeImageIO *io, fi_handle handle, int width, int bpp, BYTE* dst ) { - switch (bpp) { - case 16: - for ( int i=0; i> 5) & 31)*8; // Green - dst[ FI_RGBA_RED ] = ((src >> 10) & 31)*8; // Red - dst[ FI_RGBA_ALPHA ] = 0xFF; // Alpha - dst += 4; - } - break; - default: - throw "Bad bits per pixel in expandBuf."; - } -} - -/** -Expands Width units to 8-bit pixel data. -Max. 8 bpp source format. -*/ -static void -expandBuf8( FreeImageIO *io, fi_handle handle, int width, int bpp, BYTE* dst ) -{ - switch (bpp) { - case 8: - io->read_proc( dst, width, 1, handle ); - break; - case 4: - for (int i = 0; i < width; i++) { - WORD src = Read8( io, handle ); - *dst = (src >> 4) & 15; - *(dst+1) = (src & 15); - dst += 2; - } - if (width & 1) { // Odd Width? - WORD src = Read8( io, handle ); - *dst = (src >> 4) & 15; - dst++; - } - break; - case 2: - for (int i = 0; i < width; i++) { - WORD src = Read8( io, handle ); - *dst = (src >> 6) & 3; - *(dst+1) = (src >> 4) & 3; - *(dst+2) = (src >> 2) & 3; - *(dst+3) = (src & 3); - dst += 4; - } - if (width & 3) { // Check for leftover pixels - for (int i = 6; i > 8 - (width & 3) * 2; i -= 2) { - WORD src = Read8( io, handle ); - *dst = (src >> i) & 3; - dst++; - } - } - break; - case 1: - for (int i = 0; i < width; i++) { - WORD src = Read8( io, handle ); - *dst = (src >> 7) & 1; - *(dst+1) = (src >> 6) & 1; - *(dst+2) = (src >> 5) & 1; - *(dst+3) = (src >> 4) & 1; - *(dst+4) = (src >> 3) & 1; - *(dst+5) = (src >> 2) & 1; - *(dst+6) = (src >> 1) & 1; - *(dst+7) = (src & 1); - dst += 8; - } - if (width & 7) { // Check for leftover pixels - for (int i = 7; i > (8-width & 7); i--) { - WORD src = Read8( io, handle ); - *dst = (src >> i) & 1; - dst++; - } - } - break; - default: - throw "Bad bits per pixel in expandBuf8."; - } -} - -static BYTE* -UnpackPictRow( FreeImageIO *io, fi_handle handle, BYTE* pLineBuf, int width, int rowBytes, int srcBytes ) { - - if (rowBytes < 8) { // Ah-ha! The bits aren't actually packed. This will be easy. - io->read_proc( pLineBuf, rowBytes, 1, handle ); - } - else { - BYTE* pCurPixel = pLineBuf; - - // Unpack RLE. The data is packed bytewise. - for (int j = 0; j < srcBytes; ) { - BYTE FlagCounter = Read8( io, handle ); - if (FlagCounter & 0x80) { - if (FlagCounter == 0x80) { - // Special case: repeat value of 0. - // Apple says ignore. - j++; - } else { - // Packed data. - int len = ((FlagCounter ^ 255) & 255) + 2; - BYTE p = Read8( io, handle ); - memset( pCurPixel, p, len); - pCurPixel += len; - j += 2; - } - } - else { - // Unpacked data - int len = (FlagCounter & 255) + 1; - io->read_proc( pCurPixel, len, 1, handle ); - pCurPixel += len; - j += len + 1; - } - } - } - - return pLineBuf; -} - -/** -This routine decompresses BitsRects with a packType of 4 (and 32 bits per pixel). -In this format, each line is separated into 8-bit-bitplanes and then compressed via RLE. -To decode, the routine decompresses each line & then juggles the bytes around to get pixel-oriented data. -NumBitPlanes == 3 if RGB, 4 if RGBA -*/ -static void -Unpack32Bits( FreeImageIO *io, fi_handle handle, FIBITMAP* dib, MacRect* bounds, WORD rowBytes, int numPlanes ) { - int height = bounds->bottom - bounds->top; - int width = bounds->right - bounds->left; - - if (rowBytes == 0) { - rowBytes = (WORD)( width * 4 ); - } - - BYTE* pLineBuf = (BYTE*)malloc( rowBytes ); // Let's allocate enough for 4 bit planes - if ( pLineBuf ) { - try { - for ( int i = 0; i < height; i++ ) { - // for each line do... - int linelen; // length of source line in bytes. - if (rowBytes > 250) { - linelen = Read16( io, handle ); - } else { - linelen = Read8( io, handle); - } - - BYTE* pBuf = UnpackPictRow( io, handle, pLineBuf, width, rowBytes, linelen ); - - // Convert plane-oriented data into pixel-oriented data & - // copy into destination bitmap. - BYTE* dst = (BYTE*)FreeImage_GetScanLine( dib, height - 1 - i); - - if ( numPlanes == 3 ) { - for ( int j = 0; j < width; j++ ) { - // For each pixel in line... - dst[ FI_RGBA_BLUE ] = (*(pBuf+width*2)); // Blue - dst[ FI_RGBA_GREEN ] = (*(pBuf+width)); // Green - dst[ FI_RGBA_RED ] = (*pBuf); // Red - dst[ FI_RGBA_ALPHA ] = (0xFF); - dst += 4; - pBuf++; - } - } else { - for ( int j = 0; j < width; j++ ) { - // For each pixel in line... - dst[ FI_RGBA_BLUE ] = (*(pBuf+width*3)); // Blue - dst[ FI_RGBA_GREEN ] = (*(pBuf+width*2)); // Green - dst[ FI_RGBA_RED ] = (*(pBuf+width)); // Red - dst[ FI_RGBA_ALPHA ] = (*pBuf); - dst += 4; - pBuf++; - } - } - } - } - catch( ... ) { - free( pLineBuf ); - throw; - } - } - free( pLineBuf ); -} - -/** -Decompression routine for 8 bpp. -rowBytes is the number of bytes each source row would take if it were uncompressed. -This _isn't_ equal to the number of pixels in the row - it seems apple pads the data to a word boundary and then compresses it. -Of course, we have to decompress the excess data and then throw it away. -*/ -static void -Unpack8Bits( FreeImageIO *io, fi_handle handle, FIBITMAP* dib, MacRect* bounds, WORD rowBytes ) { - int height = bounds->bottom - bounds->top; - int width = bounds->right - bounds->left; - - // High bit of rowBytes is flag. - rowBytes &= 0x7fff; - - if (rowBytes == 0) { - rowBytes = (WORD)width; - } - - for ( int i = 0; i < height; i++ ) { - int linelen; // length of source line in bytes. - if (rowBytes > 250) { - linelen = Read16( io, handle ); - } else { - linelen = Read8( io, handle ); - } - BYTE* dst = (BYTE*)FreeImage_GetScanLine( dib, height - 1 - i); - dst = UnpackPictRow( io, handle, dst, width, rowBytes, linelen ); - } -} - -/** -Decompression routine for everything but 8 & 32 bpp. -This routine is slower than the two routines above since it has to deal with a lot of special cases :-(. -It's also a bit chaotic because of these special cases... -unpack8bits is basically a dumber version of unpackbits. -pixelSize == Source bits per pixel. -*/ -static void -UnpackBits( FreeImageIO *io, fi_handle handle, FIBITMAP* dib, MacRect* bounds, WORD rowBytes, int pixelSize ) { - WORD pixwidth; // bytes per row when uncompressed. - int pkpixsize; - int PixelPerRLEUnit; - - char outputMessage[ outputMessageSize ] = ""; - - int height = bounds->bottom - bounds->top; - int width = bounds->right - bounds->left; - - // High bit of rowBytes is flag. - if (pixelSize <= 8) { - rowBytes &= 0x7fff; - } - - pixwidth = (WORD)width; - pkpixsize = 1; // RLE unit: one byte for everything... - if (pixelSize == 16) { // ...except 16 bpp. - pkpixsize = 2; - pixwidth *= 2; - } - - if (rowBytes == 0) { - rowBytes = pixwidth; - } - - { - // I allocate the temporary line buffer here. I allocate too - // much memory to compensate for sloppy (& hence fast) decompression. - switch (pixelSize) { - case 1: - PixelPerRLEUnit = 8; - break; - case 2: - PixelPerRLEUnit = 4; - break; - case 4: - PixelPerRLEUnit = 2; - break; - case 8: - PixelPerRLEUnit = 1; - break; - case 16: - PixelPerRLEUnit = 1; - break; - default: - sprintf( outputMessage, "Illegal bpp value in unpackbits: %d\n", pixelSize ); - throw outputMessage; - } - - if (rowBytes < 8) { - // ah-ha! The bits aren't actually packed. This will be easy. - for ( int i = 0; i < height; i++ ) { - BYTE* dst = (BYTE*)FreeImage_GetScanLine( dib, height - 1 - i); - if (pixelSize == 16) { - expandBuf( io, handle, width, pixelSize, dst ); - } else { - expandBuf8( io, handle, width, pixelSize, dst ); - } - } - } - else { - for ( int i = 0; i < height; i++ ) { - // For each line do... - int linelen; // length of source line in bytes. - if (rowBytes > 250) { - linelen = Read16( io, handle ); - } else { - linelen = Read8( io, handle ); - } - - BYTE* dst = (BYTE*)FreeImage_GetScanLine( dib, height - 1 - i); - BYTE FlagCounter; - - // Unpack RLE. The data is packed bytewise - except for - // 16 bpp data, which is packed per pixel :-(. - for ( int j = 0; j < linelen; ) { - FlagCounter = Read8( io, handle ); - if (FlagCounter & 0x80) { - if (FlagCounter == 0x80) { - // Special case: repeat value of 0. - // Apple says ignore. - j++; - } - else { - // Packed data. - int len = ((FlagCounter ^ 255) & 255) + 2; - - // This is slow for some formats... - if (pixelSize == 16) { - expandBuf( io, handle, 1, pixelSize, dst ); - for ( int k = 1; k < len; k++ ) { - // Repeat the pixel len times. - memcpy( dst+(k*4*PixelPerRLEUnit), dst, 4*PixelPerRLEUnit); - } - dst += len*4*PixelPerRLEUnit; - } - else { - expandBuf8( io, handle, 1, pixelSize, dst ); - for ( int k = 1; k < len; k++ ) { - // Repeat the expanded byte len times. - memcpy( dst+(k*PixelPerRLEUnit), dst, PixelPerRLEUnit); - } - dst += len*PixelPerRLEUnit; - } - j += pkpixsize + 1; - } - } - else { - // Unpacked data - int len = (FlagCounter & 255) + 1; - if (pixelSize == 16) { - expandBuf( io, handle, len, pixelSize, dst ); - dst += len*4*PixelPerRLEUnit; - } - else { - expandBuf8( io, handle, len, pixelSize, dst ); - dst += len*PixelPerRLEUnit; - } - j += ( len * pkpixsize ) + 1; - } - } - } - } - } -} - -static void -DecodeOp9a( FreeImageIO *io, fi_handle handle, FIBITMAP* dib, MacpixMap* pixMap ) { - // Do the actual unpacking. - switch ( pixMap->pixelSize ) { - case 32: - Unpack32Bits( io, handle, dib, &pixMap->Bounds, 0, pixMap->cmpCount ); - break; - case 8: - Unpack8Bits( io, handle, dib, &pixMap->Bounds, 0 ); - break; - default: - UnpackBits( io, handle, dib, &pixMap->Bounds, 0, pixMap->pixelSize ); - } -} - -static void -DecodeBitmap( FreeImageIO *io, fi_handle handle, FIBITMAP* dib, BOOL isRegion, MacRect* bounds, WORD rowBytes ) { - WORD mode = Read16( io, handle ); - - if ( isRegion ) { - SkipPolyOrRegion( io, handle ); - } - - RGBQUAD* pal = FreeImage_GetPalette( dib ); - if ( !pal ) { - throw "No palette for bitmap!"; - } - - for (int i = 0; i < 2; i++) { - unsigned char val = i ? 0xFF : 0x0; - pal[i].rgbRed = val; - pal[i].rgbGreen = val; - pal[i].rgbBlue = val; - } - - UnpackBits( io, handle, dib, bounds, rowBytes, 1 ); -} - -static void -DecodePixmap( FreeImageIO *io, fi_handle handle, FIBITMAP* dib, BOOL isRegion, MacpixMap* pixMap, WORD rowBytes ) { - // Read mac colour table into windows palette. - WORD numColors; // Palette size. - RGBQUAD ct[256]; - - ReadColorTable( io, handle, &numColors, ct ); - if ( FreeImage_GetBPP( dib ) == 8 ) { - RGBQUAD* pal = FreeImage_GetPalette( dib ); - if ( !pal ) { - throw "No palette for bitmap!"; - } - - for (int i = 0; i < numColors; i++) { - pal[i].rgbRed = ct[ i ].rgbRed; - pal[i].rgbGreen = ct[ i ].rgbGreen; - pal[i].rgbBlue = ct[ i ].rgbBlue; - } - } - - // Ignore source & destination rectangle as well as transfer mode. - MacRect tempRect; - ReadRect( io, handle, &tempRect ); - ReadRect( io, handle, &tempRect ); - WORD mode = Read16( io, handle ); - - if ( isRegion) { - SkipPolyOrRegion( io, handle ); - } - - switch ( pixMap->pixelSize ) { - case 32: - Unpack32Bits( io, handle, dib, &pixMap->Bounds, rowBytes, pixMap->cmpCount ); - break; - case 8: - Unpack8Bits( io, handle, dib, &pixMap->Bounds, rowBytes ); - break; - default: - UnpackBits( io, handle, dib, &pixMap->Bounds, rowBytes, pixMap->pixelSize ); - } -} - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "PICT"; -} - -static const char * DLL_CALLCONV -Description() { - return "Macintosh PICT"; -} - -static const char * DLL_CALLCONV -Extension() { - return "pct,pict,pic"; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-pict"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - if(io->seek_proc(handle, 522, SEEK_SET) == 0) { - BYTE pict_signature[] = { 0x00, 0x11, 0x02, 0xFF, 0x0C, 0X00 }; - BYTE signature[6]; - - if(io->read_proc(signature, 1, sizeof(pict_signature), handle)) { - // v1.0 files have 0x11 (version operator) followed by 0x01 (version number) - // v2.0 files have 0x0011 (version operator) followed by 0x02ff (version number) - // and additionally 0x0c00 as a header opcode - // Currently, we are only supporting v2.0 - return (memcmp(pict_signature, signature, sizeof(pict_signature)) == 0); - } else { - return FALSE; - } - } - - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsICCProfiles() { - return FALSE; -} - -/** -This plugin decodes macintosh PICT files with 1,2,4,8,16 and 32 bits per pixel as well as PICT/JPEG. -If an alpha channel is present in a 32-bit-PICT, it is decoded as well. -The PICT format is a general picture file format and can contain a lot of other elements besides bitmaps. -These elements are ignored. -*/ -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - char outputMessage[ outputMessageSize ] = ""; - FIBITMAP* dib = NULL; - try { - // Skip empty 512 byte header. - if ( !io->seek_proc(handle, 512, SEEK_CUR) == 0 ) - return NULL; - - // Read PICT header - Read16( io, handle ); // Skip version 1 picture size - - MacRect frame; - ReadRect( io, handle, &frame ); - - BYTE b = 0; - while ((b = Read8(io, handle)) == 0); - if ( b != 0x11 ) { - throw "invalid header: version number missing."; - } - - int version = Read8( io, handle ); - if ( version == 2 && Read8( io, handle ) != 0xff ) { - throw "invalid header: illegal version number."; - } - - enum PICTType {none, op9a, jpeg, pixmap, bitmap}; - PICTType pictType = none; - - MacRect bounds; - MacpixMap pixMap; - int hRes = 0x480000; // in pixels/inch (72 by default == 0x480000 in fixed point) - int vRes = 0x480000; // in pixels/inch (72 by default == 0x480000 in fixed point) - WORD rowBytes = 0; - BOOL isRegion = FALSE; - BOOL done = FALSE; - long currentPos = 0; - - while ( !done ) { - WORD opcode = 0; - - // get the current stream position (used to avoid infinite loops) - currentPos = io->tell_proc(handle); - - if ((version == 1) || ((io->tell_proc( handle ) % 2) != 0)) { - // align to word for version 2 - opcode = Read8( io, handle ); - } - if (version == 2) { - opcode = Read16( io, handle ); - } - - if (opcode == 0xFF || opcode == 0xFFFF) { - done = TRUE; - throw "PICT contained only vector data!"; - } - else if (opcode < 0xa2) { - switch (opcode) { - case 0x01: - { - // skip clipping rectangle - MacRect clipRect; - WORD len = Read16( io, handle ); - - if (len == 0x000a) { - /* null rgn */ - ReadRect( io, handle, &clipRect ); - } else { - io->seek_proc(handle, len - 2, SEEK_CUR); - } - break; - } - case 0x12: - case 0x13: - case 0x14: - { - // skip pattern definition - WORD patType; - WORD rowBytes; - MacpixMap p; - WORD numColors; - - patType = Read16( io, handle ); - - switch( patType ) { - case 2: - io->seek_proc(handle, 8, SEEK_CUR); - io->seek_proc(handle, 5, SEEK_CUR); - break; - case 1: - { - io->seek_proc(handle, 8, SEEK_CUR); - rowBytes = Read16( io, handle ); - ReadRect( io, handle, &p.Bounds ); - ReadPixmap( io, handle, &p); - - RGBQUAD ct[256]; - ReadColorTable(io, handle, &numColors, ct ); - SkipBits( io, handle, &p.Bounds, rowBytes, p.pixelSize ); - break; - } - default: - throw "Unknown pattern type."; - } - - break; - } - case 0x70: - case 0x71: - case 0x72: - case 0x73: - case 0x74: - case 0x75: - case 0x76: - case 0x77: - { - SkipPolyOrRegion( io, handle ); - break; - } - case 0x90: - case 0x98: - { - // Bitmap/pixmap data clipped by a rectangle. - rowBytes = Read16( io, handle ); // Bytes per row in source when uncompressed. - isRegion = FALSE; - - if ( rowBytes & 0x8000) { - pictType = pixmap; - } else { - pictType = bitmap; - } - done = TRUE; - break; - } - case 0x91: - case 0x99: - { - // Bitmap/pixmap data clipped by a region. - rowBytes = Read16( io, handle ); // Bytes per row in source when uncompressed. - isRegion = TRUE; - - if ( rowBytes & 0x8000) { - pictType = pixmap; - } else { - pictType = bitmap; - } - done = TRUE; - break; - } - case 0x9a: - { - // DirectBitsRect. - Read32( io, handle ); // Skip fake len and fake EOF. - Read16( io, handle ); // bogus row bytes. - - // Read in the PixMap fields. - ReadRect( io, handle, &pixMap.Bounds ); - ReadPixmap( io, handle, &pixMap ); - - // Ignore source & destination rectangle as well as transfer mode. - MacRect dummy; - ReadRect( io, handle, &dummy ); - ReadRect( io, handle, &dummy ); - WORD mode = Read16( io, handle ); - - pictType=op9a; - done = TRUE; - break; - } - case 0xa1: - { - // long comment - WORD type; - WORD len; - - type = Read16( io, handle ); - len = Read16( io, handle); - if (len > 0) { - io->seek_proc(handle, len, SEEK_CUR); - } - break; - } - default: - // No function => skip to next opcode - if (optable[opcode].len == WORD_LEN) { - WORD len = Read16( io, handle ); - io->seek_proc(handle, len, SEEK_CUR); - } else { - io->seek_proc(handle, optable[opcode].len, SEEK_CUR); - } - break; - } - } - else if (opcode == 0xc00) { - // version 2 header (26 bytes) - WORD minorVersion = Read16( io, handle ); // always FFFE (-2) for extended version 2 - Read16( io, handle ); // reserved - hRes = Read32( io, handle ); // original horizontal resolution in pixels/inch - vRes = Read32( io, handle ); // original horizontal resolution in pixels/inch - MacRect dummy; - ReadRect( io, handle, &dummy ); // frame bounds at original resolution - Read32( io, handle ); // reserved - } - else if (opcode == 0x8200) { - // jpeg - long opLen = Read32( io, handle ); - BOOL found = FALSE; - int i = 0; - - // skip to JPEG header. - while ( !found && i < opLen ) { -// io->seek_proc( handle, 24, SEEK_CUR ); -// MacRect dummy; -// ReadRect( io, handle, &dummy ); -// io->seek_proc( handle, 122, SEEK_CUR ); -// found = TRUE; - BYTE data[ 2 ]; - if( io->read_proc( data, 2, 1, handle ) ) { - io->seek_proc( handle, -2, SEEK_CUR ); - - if ( data[0] == 0xFF && data[1] == 0xD8 ) { - found = TRUE; - } else { - Read8( io, handle ); - i++; - } - } - } - - if ( found ) { - // Pass the data to the JPEG decoder. - pictType = jpeg; - } else { - throw "PICT file contains unrecognized quicktime data."; - } - done = TRUE; - } - else if (opcode >= 0xa2 && opcode <= 0xaf) { - // reserved - WORD len = Read16( io, handle ); - io->seek_proc(handle, len, SEEK_CUR); - } - else if ((opcode >= 0xb0 && opcode <= 0xcf) || (opcode >= 0x8000 && opcode <= 0x80ff)) { - // just a reserved opcode, no data - } - else if ((opcode >= 0xd0 && opcode <= 0xfe) || opcode >= 8100) { - // reserved - LONG len = Read32( io, handle ); - io->seek_proc(handle, len, SEEK_CUR); - } - else if (opcode >= 0x100 && opcode <= 0x7fff) { - // reserved - io->seek_proc(handle, ((opcode >> 7) & 255), SEEK_CUR); - } - else { - sprintf( outputMessage, "Can't handle opcode %x.\n", opcode ); - throw outputMessage; - } - - if(currentPos == io->tell_proc(handle)) { - // we probaly reached the end of file as we can no longer move forward ... - throw "Invalid PICT file"; - } - } - - switch ( pictType ) { - case op9a: - { - bounds = pixMap.Bounds; - int width = bounds.right - bounds.left; - int height = bounds.bottom - bounds.top; - - if ( pixMap.pixelSize > 8 ) { - dib = FreeImage_Allocate( width, height, 32, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } else { - dib = FreeImage_Allocate( width, height, 8); - } - hRes = pixMap.hRes << 16; - vRes = pixMap.vRes << 16; - break; - } - - case jpeg: - { - dib = FreeImage_LoadFromHandle( FIF_JPEG, io, handle ); - break; - } - - case pixmap: - { - // Decode version 2 pixmap - ReadRect( io, handle, &pixMap.Bounds ); - ReadPixmap( io, handle, &pixMap ); - - bounds = pixMap.Bounds; - int width = bounds.right - bounds.left; - int height = bounds.bottom - bounds.top; - - if ( pixMap.pixelSize > 8 ) { - dib = FreeImage_Allocate( width, height, 32, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } else { - dib = FreeImage_Allocate( width, height, 8); - } - hRes = pixMap.hRes << 16; - vRes = pixMap.vRes << 16; - break; - } - - case bitmap: - { - // Decode version 1 bitmap: 1 bpp. - MacRect srcRect; - MacRect dstRect; - WORD width; // Width in pixels - WORD height; // Height in pixels - - ReadRect( io, handle, &bounds ); - ReadRect( io, handle, &srcRect ); - ReadRect( io, handle, &dstRect ); - - width = bounds.right - bounds.left; - height = bounds.bottom - bounds.top; - - dib = FreeImage_Allocate(width, height, 8); - break; - } - } - - if ( dib ) { - // need to convert resolution figures from fixed point, pixels/inch - // to floating point, pixels/meter. - float hres_ppm = hRes * ((float)39.4 / (float)65536.0); - float vres_ppm = vRes * ((float)39.4 / (float)65536.0); - - FreeImage_SetDotsPerMeterX( dib, (LONG)hres_ppm ); - FreeImage_SetDotsPerMeterY( dib, (LONG)vres_ppm ); - - switch( pictType ) { - case op9a: - DecodeOp9a( io, handle, dib, &pixMap ); - break; - case jpeg: - // Already decoded if the embedded format was valid. - break; - case pixmap: - DecodePixmap( io, handle, dib, isRegion, &pixMap, rowBytes ); - break; - case bitmap: - DecodeBitmap( io, handle, dib, isRegion, &bounds, rowBytes ); - break; - default: - throw "invalid pict type"; - } - } - - return dib; - } - catch(const char *message) { - FreeImage_Unload( dib ); - FreeImage_OutputMessageProc(s_format_id, message); - } - - return NULL; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitPICT(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = NULL; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = SupportsICCProfiles; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginPNG.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginPNG.cpp deleted file mode 100644 index 661f160..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginPNG.cpp +++ /dev/null @@ -1,1121 +0,0 @@ -// ========================================================== -// PNG Loader and Writer -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herve Drolon (drolon@infonie.fr) -// - Detlev Vendt (detlev.vendt@brillit.de) -// - Aaron Shumate (trek@startreker.com) -// - Tanner Helland (tannerhelland@users.sf.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include "FreeImage.h" -#include "Utilities.h" - -#include "../Metadata/FreeImageTag.h" - -// ---------------------------------------------------------- - -#define PNG_BYTES_TO_CHECK 8 - -#undef PNG_Z_DEFAULT_COMPRESSION // already used in ../LibPNG/pnglibconf.h - -// ---------------------------------------------------------- - -#include "../ZLib/zlib.h" -#include "../LibPNG/png.h" - -// ---------------------------------------------------------- - -typedef struct { - FreeImageIO *s_io; - fi_handle s_handle; -} fi_ioStructure, *pfi_ioStructure; - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// libpng interface -// ========================================================== - -static void -_ReadProc(png_structp png_ptr, unsigned char *data, png_size_t size) { - pfi_ioStructure pfio = (pfi_ioStructure)png_get_io_ptr(png_ptr); - unsigned n = pfio->s_io->read_proc(data, (unsigned int)size, 1, pfio->s_handle); - if(size && (n == 0)) { - throw "Read error: invalid or corrupted PNG file"; - } -} - -static void -_WriteProc(png_structp png_ptr, unsigned char *data, png_size_t size) { - pfi_ioStructure pfio = (pfi_ioStructure)png_get_io_ptr(png_ptr); - pfio->s_io->write_proc(data, (unsigned int)size, 1, pfio->s_handle); -} - -static void -_FlushProc(png_structp png_ptr) { - (png_structp)png_ptr; - // empty flush implementation -} - -static void -error_handler(png_structp png_ptr, const char *error) { - FreeImage_OutputMessageProc(s_format_id, error); - png_longjmp(png_ptr, 1); -} - -// in FreeImage warnings disabled - -static void -warning_handler(png_structp png_ptr, const char *warning) { - (png_structp)png_ptr; - (char*)warning; -} - -// ========================================================== -// Metadata routines -// ========================================================== - -static BOOL -ReadMetadata(png_structp png_ptr, png_infop info_ptr, FIBITMAP *dib) { - // XMP keyword - const char *g_png_xmp_keyword = "XML:com.adobe.xmp"; - - FITAG *tag = NULL; - png_textp text_ptr = NULL; - png_timep mod_time = NULL; - int num_text = 0; - - // iTXt/tEXt/zTXt chuncks - if(png_get_text(png_ptr, info_ptr, &text_ptr, &num_text) > 0) { - for(int i = 0; i < num_text; i++) { - // create a tag - tag = FreeImage_CreateTag(); - if(!tag) return FALSE; - - DWORD tag_length = (DWORD) MAX(text_ptr[i].text_length, text_ptr[i].itxt_length); - - FreeImage_SetTagLength(tag, tag_length); - FreeImage_SetTagCount(tag, tag_length); - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagValue(tag, text_ptr[i].text); - - if(strcmp(text_ptr[i].key, g_png_xmp_keyword) == 0) { - // store the tag as XMP - FreeImage_SetTagKey(tag, g_TagLib_XMPFieldName); - FreeImage_SetMetadata(FIMD_XMP, dib, FreeImage_GetTagKey(tag), tag); - } else { - // store the tag as a comment - FreeImage_SetTagKey(tag, text_ptr[i].key); - FreeImage_SetMetadata(FIMD_COMMENTS, dib, FreeImage_GetTagKey(tag), tag); - } - - // destroy the tag - FreeImage_DeleteTag(tag); - } - } - - // timestamp chunk - if(png_get_tIME(png_ptr, info_ptr, &mod_time)) { - char timestamp[32]; - // create a tag - tag = FreeImage_CreateTag(); - if(!tag) return FALSE; - - // convert as 'yyyy:MM:dd hh:mm:ss' - sprintf(timestamp, "%4d:%02d:%02d %2d:%02d:%02d", mod_time->year, mod_time->month, mod_time->day, mod_time->hour, mod_time->minute, mod_time->second); - - DWORD tag_length = (DWORD)strlen(timestamp) + 1; - FreeImage_SetTagLength(tag, tag_length); - FreeImage_SetTagCount(tag, tag_length); - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagID(tag, TAG_DATETIME); - FreeImage_SetTagValue(tag, timestamp); - - // store the tag as Exif-TIFF - FreeImage_SetTagKey(tag, "DateTime"); - FreeImage_SetMetadata(FIMD_EXIF_MAIN, dib, FreeImage_GetTagKey(tag), tag); - - // destroy the tag - FreeImage_DeleteTag(tag); - } - - return TRUE; -} - -static BOOL -WriteMetadata(png_structp png_ptr, png_infop info_ptr, FIBITMAP *dib) { - // XMP keyword - const char *g_png_xmp_keyword = "XML:com.adobe.xmp"; - - FITAG *tag = NULL; - FIMETADATA *mdhandle = NULL; - BOOL bResult = TRUE; - - png_text text_metadata; - png_time mod_time; - - // set the 'Comments' metadata as iTXt chuncks - - mdhandle = FreeImage_FindFirstMetadata(FIMD_COMMENTS, dib, &tag); - - if(mdhandle) { - do { - memset(&text_metadata, 0, sizeof(png_text)); - text_metadata.compression = 1; // iTXt, none - text_metadata.key = (char*)FreeImage_GetTagKey(tag); // keyword, 1-79 character description of "text" - text_metadata.text = (char*)FreeImage_GetTagValue(tag); // comment, may be an empty string (ie "") - text_metadata.text_length = FreeImage_GetTagLength(tag);// length of the text string - text_metadata.itxt_length = FreeImage_GetTagLength(tag);// length of the itxt string - text_metadata.lang = 0; // language code, 0-79 characters or a NULL pointer - text_metadata.lang_key = 0; // keyword translated UTF-8 string, 0 or more chars or a NULL pointer - - // set the tag - png_set_text(png_ptr, info_ptr, &text_metadata, 1); - - } while(FreeImage_FindNextMetadata(mdhandle, &tag)); - - FreeImage_FindCloseMetadata(mdhandle); - bResult &= TRUE; - } - - // set the 'XMP' metadata as iTXt chuncks - tag = NULL; - FreeImage_GetMetadata(FIMD_XMP, dib, g_TagLib_XMPFieldName, &tag); - if(tag && FreeImage_GetTagLength(tag)) { - memset(&text_metadata, 0, sizeof(png_text)); - text_metadata.compression = 1; // iTXt, none - text_metadata.key = (char*)g_png_xmp_keyword; // keyword, 1-79 character description of "text" - text_metadata.text = (char*)FreeImage_GetTagValue(tag); // comment, may be an empty string (ie "") - text_metadata.text_length = FreeImage_GetTagLength(tag);// length of the text string - text_metadata.itxt_length = FreeImage_GetTagLength(tag);// length of the itxt string - text_metadata.lang = 0; // language code, 0-79 characters or a NULL pointer - text_metadata.lang_key = 0; // keyword translated UTF-8 string, 0 or more chars or a NULL pointer - - // set the tag - png_set_text(png_ptr, info_ptr, &text_metadata, 1); - bResult &= TRUE; - } - - // set the Exif-TIFF 'DateTime' metadata as a tIME chunk - tag = NULL; - FreeImage_GetMetadata(FIMD_EXIF_MAIN, dib, "DateTime", &tag); - if(tag && FreeImage_GetTagLength(tag)) { - int year, month, day, hour, minute, second; - const char *value = (char*)FreeImage_GetTagValue(tag); - if(sscanf(value, "%4d:%02d:%02d %2d:%02d:%02d", &year, &month, &day, &hour, &minute, &second) == 6) { - mod_time.year = (png_uint_16)year; - mod_time.month = (png_byte)month; - mod_time.day = (png_byte)day; - mod_time.hour = (png_byte)hour; - mod_time.minute = (png_byte)minute; - mod_time.second = (png_byte)second; - png_set_tIME (png_ptr, info_ptr, &mod_time); - } - } - - return bResult; -} - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "PNG"; -} - -static const char * DLL_CALLCONV -Description() { - return "Portable Network Graphics"; -} - -static const char * DLL_CALLCONV -Extension() { - return "png"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return "^.PNG\r"; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/png"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE png_signature[8] = { 137, 80, 78, 71, 13, 10, 26, 10 }; - BYTE signature[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - - io->read_proc(&signature, 1, 8, handle); - - return (memcmp(png_signature, signature, 8) == 0); -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 1) || - (depth == 4) || - (depth == 8) || - (depth == 24) || - (depth == 32) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return ( - (type == FIT_BITMAP) || - (type == FIT_UINT16) || - (type == FIT_RGB16) || - (type == FIT_RGBA16) - ); -} - -static BOOL DLL_CALLCONV -SupportsICCProfiles() { - return TRUE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// -------------------------------------------------------------------------- - -/** -Configure the decoder so that decoded pixels are compatible with a FREE_IMAGE_TYPE format. -Set conversion instructions as needed. -@param png_ptr PNG handle -@param info_ptr PNG info handle -@param flags Decoder flags -@param output_image_type Returned FreeImage converted image type -@return Returns TRUE if successful, returns FALSE otherwise -@see png_read_update_info -*/ -static BOOL -ConfigureDecoder(png_structp png_ptr, png_infop info_ptr, int flags, FREE_IMAGE_TYPE *output_image_type) { - // get original image info - const int color_type = png_get_color_type(png_ptr, info_ptr); - const int bit_depth = png_get_bit_depth(png_ptr, info_ptr); - const int pixel_depth = bit_depth * png_get_channels(png_ptr, info_ptr); - - FREE_IMAGE_TYPE image_type = FIT_BITMAP; // assume standard image type - - // check for transparency table or single transparent color - BOOL bIsTransparent = png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) == PNG_INFO_tRNS ? TRUE : FALSE; - - // check allowed combinations of colour type and bit depth - // then get converted FreeImage type - - switch(color_type) { - case PNG_COLOR_TYPE_GRAY: // color type '0', bitdepth = 1, 2, 4, 8, 16 - switch(bit_depth) { - case 1: - case 2: - case 4: - case 8: - // expand grayscale images to the full 8-bit from 2-bit/pixel - if (pixel_depth == 2) { - png_set_expand_gray_1_2_4_to_8(png_ptr); - } - - // if a tRNS chunk is provided, we must also expand the grayscale data to 8-bits, - // this allows us to make use of the transparency table with existing FreeImage methods - if (bIsTransparent && (pixel_depth < 8)) { - png_set_expand_gray_1_2_4_to_8(png_ptr); - } - break; - - case 16: - image_type = (pixel_depth == 16) ? FIT_UINT16 : FIT_UNKNOWN; - - // 16-bit grayscale images can contain a transparent value (shade) - // if found, expand the transparent value to a full alpha channel - if (bIsTransparent && (image_type != FIT_UNKNOWN)) { - // expand tRNS to a full alpha channel - png_set_tRNS_to_alpha(png_ptr); - - // expand new 16-bit gray + 16-bit alpha to full 64-bit RGBA - png_set_gray_to_rgb(png_ptr); - - image_type = FIT_RGBA16; - } - break; - - default: - image_type = FIT_UNKNOWN; - break; - } - break; - - case PNG_COLOR_TYPE_RGB: // color type '2', bitdepth = 8, 16 - switch(bit_depth) { - case 8: - image_type = (pixel_depth == 24) ? FIT_BITMAP : FIT_UNKNOWN; - break; - case 16: - image_type = (pixel_depth == 48) ? FIT_RGB16 : FIT_UNKNOWN; - break; - default: - image_type = FIT_UNKNOWN; - break; - } - // sometimes, 24- or 48-bit images may contain transparency information - // check for this use case and convert to an alpha-compatible format - if (bIsTransparent && (image_type != FIT_UNKNOWN)) { - // if the image is 24-bit RGB, mark it as 32-bit; if it is 48-bit, mark it as 64-bit - image_type = (pixel_depth == 24) ? FIT_BITMAP : (pixel_depth == 48) ? FIT_RGBA16 : FIT_UNKNOWN; - // expand tRNS chunk to alpha channel - png_set_tRNS_to_alpha(png_ptr); - } - break; - - case PNG_COLOR_TYPE_PALETTE: // color type '3', bitdepth = 1, 2, 4, 8 - switch(bit_depth) { - case 1: - case 2: - case 4: - case 8: - // expand palette images to the full 8 bits from 2 bits/pixel - if (pixel_depth == 2) { - png_set_packing(png_ptr); - } - - // if a tRNS chunk is provided, we must also expand the palletized data to 8-bits, - // this allows us to make use of the transparency table with existing FreeImage methods - if (bIsTransparent && (pixel_depth < 8)) { - png_set_packing(png_ptr); - } - break; - - default: - image_type = FIT_UNKNOWN; - break; - } - break; - - case PNG_COLOR_TYPE_GRAY_ALPHA: // color type '4', bitdepth = 8, 16 - switch(bit_depth) { - case 8: - // 8-bit grayscale + 8-bit alpha => convert to 32-bit RGBA - image_type = (pixel_depth == 16) ? FIT_BITMAP : FIT_UNKNOWN; - break; - case 16: - // 16-bit grayscale + 16-bit alpha => convert to 64-bit RGBA - image_type = (pixel_depth == 32) ? FIT_RGBA16 : FIT_UNKNOWN; - break; - default: - image_type = FIT_UNKNOWN; - break; - } - // expand 8-bit greyscale + 8-bit alpha to 32-bit - // expand 16-bit greyscale + 16-bit alpha to 64-bit - png_set_gray_to_rgb(png_ptr); - break; - - case PNG_COLOR_TYPE_RGB_ALPHA: // color type '6', bitdepth = 8, 16 - switch(bit_depth) { - case 8: - break; - case 16: - image_type = (pixel_depth == 64) ? FIT_RGBA16 : FIT_UNKNOWN; - break; - default: - image_type = FIT_UNKNOWN; - break; - } - break; - } - - // check for unknown or invalid formats - if(image_type == FIT_UNKNOWN) { - *output_image_type = image_type; - return FALSE; - } - -#ifndef FREEIMAGE_BIGENDIAN - if((image_type == FIT_UINT16) || (image_type == FIT_RGB16) || (image_type == FIT_RGBA16)) { - // turn on 16-bit byte swapping - png_set_swap(png_ptr); - } -#endif - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - if((image_type == FIT_BITMAP) && ((color_type == PNG_COLOR_TYPE_RGB) || (color_type == PNG_COLOR_TYPE_RGB_ALPHA))) { - // flip the RGB pixels to BGR (or RGBA to BGRA) - png_set_bgr(png_ptr); - } -#endif - - // gamma correction - // unlike the example in the libpng documentation, we have *no* idea where - // this file may have come from--so if it doesn't have a file gamma, don't - // do any correction ("do no harm") - - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_gAMA)) { - double gamma = 0; - double screen_gamma = 2.2; - - if (png_get_gAMA(png_ptr, info_ptr, &gamma) && ( flags & PNG_IGNOREGAMMA ) != PNG_IGNOREGAMMA) { - png_set_gamma(png_ptr, screen_gamma, gamma); - } - } - - // all transformations have been registered; now update info_ptr data - png_read_update_info(png_ptr, info_ptr); - - // return the output image type - *output_image_type = image_type; - - return TRUE; -} - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - png_structp png_ptr = NULL; - png_infop info_ptr = NULL; - png_uint_32 width, height; - int color_type; - int bit_depth; - int pixel_depth = 0; // pixel_depth = bit_depth * channels - - FIBITMAP *dib = NULL; - png_bytepp row_pointers = NULL; - - fi_ioStructure fio; - fio.s_handle = handle; - fio.s_io = io; - - if (handle) { - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - try { - // check to see if the file is in fact a PNG file - - BYTE png_check[PNG_BYTES_TO_CHECK]; - - io->read_proc(png_check, PNG_BYTES_TO_CHECK, 1, handle); - - if (png_sig_cmp(png_check, (png_size_t)0, PNG_BYTES_TO_CHECK) != 0) { - return NULL; // Bad signature - } - - // create the chunk manage structure - - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, error_handler, warning_handler); - - if (!png_ptr) { - return NULL; - } - - // create the info structure - - info_ptr = png_create_info_struct(png_ptr); - - if (!info_ptr) { - png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL); - return NULL; - } - - // init the IO - - png_set_read_fn(png_ptr, &fio, _ReadProc); - - // PNG errors will be redirected here - - if (setjmp(png_jmpbuf(png_ptr))) { - // assume error_handler was called before by the PNG library - throw((const char*)NULL); - } - - // because we have already read the signature... - - png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); - - // read the IHDR chunk - - png_read_info(png_ptr, info_ptr); - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL); - - // configure the decoder - - FREE_IMAGE_TYPE image_type = FIT_BITMAP; - - if(!ConfigureDecoder(png_ptr, info_ptr, flags, &image_type)) { - throw FI_MSG_ERROR_UNSUPPORTED_FORMAT; - } - - // update image info - - color_type = png_get_color_type(png_ptr, info_ptr); - bit_depth = png_get_bit_depth(png_ptr, info_ptr); - pixel_depth = bit_depth * png_get_channels(png_ptr, info_ptr); - - // create a dib and write the bitmap header - // set up the dib palette, if needed - - switch (color_type) { - case PNG_COLOR_TYPE_RGB: - case PNG_COLOR_TYPE_RGB_ALPHA: - dib = FreeImage_AllocateHeaderT(header_only, image_type, width, height, pixel_depth, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - break; - - case PNG_COLOR_TYPE_PALETTE: - dib = FreeImage_AllocateHeaderT(header_only, image_type, width, height, pixel_depth, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(dib) { - png_colorp png_palette = NULL; - int palette_entries = 0; - - png_get_PLTE(png_ptr,info_ptr, &png_palette, &palette_entries); - - palette_entries = MIN((unsigned)palette_entries, FreeImage_GetColorsUsed(dib)); - - // store the palette - - RGBQUAD *palette = FreeImage_GetPalette(dib); - for(int i = 0; i < palette_entries; i++) { - palette[i].rgbRed = png_palette[i].red; - palette[i].rgbGreen = png_palette[i].green; - palette[i].rgbBlue = png_palette[i].blue; - } - } - break; - - case PNG_COLOR_TYPE_GRAY: - dib = FreeImage_AllocateHeaderT(header_only, image_type, width, height, pixel_depth, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - - if(dib && (pixel_depth <= 8)) { - RGBQUAD *palette = FreeImage_GetPalette(dib); - const int palette_entries = 1 << pixel_depth; - - for(int i = 0; i < palette_entries; i++) { - palette[i].rgbRed = - palette[i].rgbGreen = - palette[i].rgbBlue = (BYTE)((i * 255) / (palette_entries - 1)); - } - } - break; - - default: - throw FI_MSG_ERROR_UNSUPPORTED_FORMAT; - } - - if(!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // store the transparency table - - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { - // array of alpha (transparency) entries for palette - png_bytep trans_alpha = NULL; - // number of transparent entries - int num_trans = 0; - // graylevel or color sample values of the single transparent color for non-paletted images - png_color_16p trans_color = NULL; - - png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color); - - if((color_type == PNG_COLOR_TYPE_GRAY) && trans_color) { - // single transparent color - if (trans_color->gray < 256) { - BYTE table[256]; - memset(table, 0xFF, 256); - table[trans_color->gray] = 0; - FreeImage_SetTransparencyTable(dib, table, 256); - } - // check for a full transparency table, too - else if ((trans_alpha) && (pixel_depth <= 8)) { - FreeImage_SetTransparencyTable(dib, (BYTE *)trans_alpha, num_trans); - } - - } else if((color_type == PNG_COLOR_TYPE_PALETTE) && trans_alpha) { - // transparency table - FreeImage_SetTransparencyTable(dib, (BYTE *)trans_alpha, num_trans); - } - } - - // store the background color (only supported for FIT_BITMAP types) - - if ((image_type == FIT_BITMAP) && png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD)) { - // Get the background color to draw transparent and alpha images over. - // Note that even if the PNG file supplies a background, you are not required to - // use it - you should use the (solid) application background if it has one. - - png_color_16p image_background = NULL; - RGBQUAD rgbBkColor; - - if (png_get_bKGD(png_ptr, info_ptr, &image_background)) { - rgbBkColor.rgbRed = (BYTE)image_background->red; - rgbBkColor.rgbGreen = (BYTE)image_background->green; - rgbBkColor.rgbBlue = (BYTE)image_background->blue; - rgbBkColor.rgbReserved = 0; - - FreeImage_SetBackgroundColor(dib, &rgbBkColor); - } - } - - // get physical resolution - - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_pHYs)) { - png_uint_32 res_x, res_y; - - // we'll overload this var and use 0 to mean no phys data, - // since if it's not in meters we can't use it anyway - - int res_unit_type = PNG_RESOLUTION_UNKNOWN; - - png_get_pHYs(png_ptr,info_ptr, &res_x, &res_y, &res_unit_type); - - if (res_unit_type == PNG_RESOLUTION_METER) { - FreeImage_SetDotsPerMeterX(dib, res_x); - FreeImage_SetDotsPerMeterY(dib, res_y); - } - } - - // get possible ICC profile - - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_iCCP)) { - png_charp profile_name = NULL; - png_bytep profile_data = NULL; - png_uint_32 profile_length = 0; - int compression_type; - - png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, &profile_data, &profile_length); - - // copy ICC profile data (must be done after FreeImage_AllocateHeader) - - FreeImage_CreateICCProfile(dib, profile_data, profile_length); - } - - // --- header only mode => clean-up and return - - if (header_only) { - // get possible metadata (it can be located both before and after the image data) - ReadMetadata(png_ptr, info_ptr, dib); - if (png_ptr) { - // clean up after the read, and free any memory allocated - REQUIRED - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - } - return dib; - } - - // set the individual row_pointers to point at the correct offsets - - row_pointers = (png_bytepp)malloc(height * sizeof(png_bytep)); - - if (!row_pointers) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - FreeImage_Unload(dib); - return NULL; - } - - // read in the bitmap bits via the pointer table - // allow loading of PNG with minor errors (such as images with several IDAT chunks) - - for (png_uint_32 k = 0; k < height; k++) { - row_pointers[height - 1 - k] = FreeImage_GetScanLine(dib, k); - } - - png_set_benign_errors(png_ptr, 1); - png_read_image(png_ptr, row_pointers); - - // check if the bitmap contains transparency, if so enable it in the header - - if (FreeImage_GetBPP(dib) == 32) { - if (FreeImage_GetColorType(dib) == FIC_RGBALPHA) { - FreeImage_SetTransparent(dib, TRUE); - } else { - FreeImage_SetTransparent(dib, FALSE); - } - } - - // cleanup - - if (row_pointers) { - free(row_pointers); - row_pointers = NULL; - } - - // read the rest of the file, getting any additional chunks in info_ptr - - png_read_end(png_ptr, info_ptr); - - // get possible metadata (it can be located both before and after the image data) - - ReadMetadata(png_ptr, info_ptr, dib); - - if (png_ptr) { - // clean up after the read, and free any memory allocated - REQUIRED - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - } - - return dib; - - } catch (const char *text) { - if (png_ptr) { - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - } - if (row_pointers) { - free(row_pointers); - } - if (dib) { - FreeImage_Unload(dib); - } - if (NULL != text) { - FreeImage_OutputMessageProc(s_format_id, text); - } - - return NULL; - } - } - - return NULL; -} - -// -------------------------------------------------------------------------- - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - png_structp png_ptr; - png_infop info_ptr; - png_colorp palette = NULL; - png_uint_32 width, height; - BOOL has_alpha_channel = FALSE; - - RGBQUAD *pal; // pointer to dib palette - int bit_depth, pixel_depth; // pixel_depth = bit_depth * channels - int palette_entries; - int interlace_type; - - fi_ioStructure fio; - fio.s_handle = handle; - fio.s_io = io; - - if ((dib) && (handle)) { - try { - // create the chunk manage structure - - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, error_handler, warning_handler); - - if (!png_ptr) { - return FALSE; - } - - // allocate/initialize the image information data. - - info_ptr = png_create_info_struct(png_ptr); - - if (!info_ptr) { - png_destroy_write_struct(&png_ptr, (png_infopp)NULL); - return FALSE; - } - - // Set error handling. REQUIRED if you aren't supplying your own - // error handling functions in the png_create_write_struct() call. - - if (setjmp(png_jmpbuf(png_ptr))) { - // if we get here, we had a problem reading the file - - png_destroy_write_struct(&png_ptr, &info_ptr); - - return FALSE; - } - - // init the IO - - png_set_write_fn(png_ptr, &fio, _WriteProc, _FlushProc); - - // set physical resolution - - png_uint_32 res_x = (png_uint_32)FreeImage_GetDotsPerMeterX(dib); - png_uint_32 res_y = (png_uint_32)FreeImage_GetDotsPerMeterY(dib); - - if ((res_x > 0) && (res_y > 0)) { - png_set_pHYs(png_ptr, info_ptr, res_x, res_y, PNG_RESOLUTION_METER); - } - - // Set the image information here. Width and height are up to 2^31, - // bit_depth is one of 1, 2, 4, 8, or 16, but valid values also depend on - // the color_type selected. color_type is one of PNG_COLOR_TYPE_GRAY, - // PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB, - // or PNG_COLOR_TYPE_RGB_ALPHA. interlace is either PNG_INTERLACE_NONE or - // PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST - // currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED - - width = FreeImage_GetWidth(dib); - height = FreeImage_GetHeight(dib); - pixel_depth = FreeImage_GetBPP(dib); - - BOOL bInterlaced = FALSE; - if( (flags & PNG_INTERLACED) == PNG_INTERLACED) { - interlace_type = PNG_INTERLACE_ADAM7; - bInterlaced = TRUE; - } else { - interlace_type = PNG_INTERLACE_NONE; - } - - // set the ZLIB compression level or default to PNG default compression level (ZLIB level = 6) - int zlib_level = flags & 0x0F; - if((zlib_level >= 1) && (zlib_level <= 9)) { - png_set_compression_level(png_ptr, zlib_level); - } else if((flags & PNG_Z_NO_COMPRESSION) == PNG_Z_NO_COMPRESSION) { - png_set_compression_level(png_ptr, Z_NO_COMPRESSION); - } - - // filtered strategy works better for high color images - if(pixel_depth >= 16){ - png_set_compression_strategy(png_ptr, Z_FILTERED); - png_set_filter(png_ptr, 0, PNG_FILTER_NONE|PNG_FILTER_SUB|PNG_FILTER_PAETH); - } else { - png_set_compression_strategy(png_ptr, Z_DEFAULT_STRATEGY); - } - - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - if(image_type == FIT_BITMAP) { - // standard image type - bit_depth = (pixel_depth > 8) ? 8 : pixel_depth; - } else { - // 16-bit greyscale or 16-bit RGB(A) - bit_depth = 16; - } - - // check for transparent images - BOOL bIsTransparent = - (image_type == FIT_BITMAP) && FreeImage_IsTransparent(dib) && (FreeImage_GetTransparencyCount(dib) > 0) ? TRUE : FALSE; - - switch (FreeImage_GetColorType(dib)) { - case FIC_MINISWHITE: - if(!bIsTransparent) { - // Invert monochrome files to have 0 as black and 1 as white (no break here) - png_set_invert_mono(png_ptr); - } - // (fall through) - - case FIC_MINISBLACK: - if(!bIsTransparent) { - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, - PNG_COLOR_TYPE_GRAY, interlace_type, - PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - break; - } - // If a monochrome image is transparent, save it with a palette - // (fall through) - - case FIC_PALETTE: - { - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, - PNG_COLOR_TYPE_PALETTE, interlace_type, - PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - - // set the palette - - palette_entries = 1 << bit_depth; - palette = (png_colorp)png_malloc(png_ptr, palette_entries * sizeof (png_color)); - pal = FreeImage_GetPalette(dib); - - for (int i = 0; i < palette_entries; i++) { - palette[i].red = pal[i].rgbRed; - palette[i].green = pal[i].rgbGreen; - palette[i].blue = pal[i].rgbBlue; - } - - png_set_PLTE(png_ptr, info_ptr, palette, palette_entries); - - // You must not free palette here, because png_set_PLTE only makes a link to - // the palette that you malloced. Wait until you are about to destroy - // the png structure. - - break; - } - - case FIC_RGBALPHA : - has_alpha_channel = TRUE; - - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, - PNG_COLOR_TYPE_RGBA, interlace_type, - PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - // flip BGR pixels to RGB - if(image_type == FIT_BITMAP) { - png_set_bgr(png_ptr); - } -#endif - break; - - case FIC_RGB: - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, - PNG_COLOR_TYPE_RGB, interlace_type, - PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - // flip BGR pixels to RGB - if(image_type == FIT_BITMAP) { - png_set_bgr(png_ptr); - } -#endif - break; - - case FIC_CMYK: - break; - } - - // write possible ICC profile - - FIICCPROFILE *iccProfile = FreeImage_GetICCProfile(dib); - if (iccProfile->size && iccProfile->data) { - // skip ICC profile check - png_set_option(png_ptr, PNG_SKIP_sRGB_CHECK_PROFILE, 1); - png_set_iCCP(png_ptr, info_ptr, "Embedded Profile", 0, (png_const_bytep)iccProfile->data, iccProfile->size); - } - - // write metadata - - WriteMetadata(png_ptr, info_ptr, dib); - - // Optional gamma chunk is strongly suggested if you have any guess - // as to the correct gamma of the image. - // png_set_gAMA(png_ptr, info_ptr, gamma); - - // set the transparency table - - if (bIsTransparent) { - png_set_tRNS(png_ptr, info_ptr, FreeImage_GetTransparencyTable(dib), FreeImage_GetTransparencyCount(dib), NULL); - } - - // set the background color - - if(FreeImage_HasBackgroundColor(dib)) { - png_color_16 image_background; - RGBQUAD rgbBkColor; - - FreeImage_GetBackgroundColor(dib, &rgbBkColor); - memset(&image_background, 0, sizeof(png_color_16)); - image_background.blue = rgbBkColor.rgbBlue; - image_background.green = rgbBkColor.rgbGreen; - image_background.red = rgbBkColor.rgbRed; - image_background.index = rgbBkColor.rgbReserved; - - png_set_bKGD(png_ptr, info_ptr, &image_background); - } - - // Write the file header information. - - png_write_info(png_ptr, info_ptr); - - // write out the image data - -#ifndef FREEIMAGE_BIGENDIAN - if (bit_depth == 16) { - // turn on 16 bit byte swapping - png_set_swap(png_ptr); - } -#endif - - int number_passes = 1; - if (bInterlaced) { - number_passes = png_set_interlace_handling(png_ptr); - } - - if ((pixel_depth == 32) && (!has_alpha_channel)) { - BYTE *buffer = (BYTE *)malloc(width * 3); - - // transparent conversion to 24-bit - // the number of passes is either 1 for non-interlaced images, or 7 for interlaced images - for (int pass = 0; pass < number_passes; pass++) { - for (png_uint_32 k = 0; k < height; k++) { - FreeImage_ConvertLine32To24(buffer, FreeImage_GetScanLine(dib, height - k - 1), width); - png_write_row(png_ptr, buffer); - } - } - free(buffer); - } else { - // the number of passes is either 1 for non-interlaced images, or 7 for interlaced images - for (int pass = 0; pass < number_passes; pass++) { - for (png_uint_32 k = 0; k < height; k++) { - png_write_row(png_ptr, FreeImage_GetScanLine(dib, height - k - 1)); - } - } - } - - // It is REQUIRED to call this to finish writing the rest of the file - // Bug with png_flush - - png_write_end(png_ptr, info_ptr); - - // clean up after the write, and free any memory allocated - if (palette) { - png_free(png_ptr, palette); - } - - png_destroy_write_struct(&png_ptr, &info_ptr); - - return TRUE; - - } catch (const char *text) { - if(png_ptr) { - png_destroy_write_struct(&png_ptr, &info_ptr); - } - FreeImage_OutputMessageProc(s_format_id, text); - } - } - - return FALSE; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitPNG(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = SupportsICCProfiles; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginPNM.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginPNM.cpp deleted file mode 100644 index 3b4d0de..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginPNM.cpp +++ /dev/null @@ -1,838 +0,0 @@ -// ========================================================== -// PNM (PPM, PGM, PBM) Loader and Writer -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ========================================================== -// Internal functions -// ========================================================== - -/** -Get an integer value from the actual position pointed by handle -*/ -static int -GetInt(FreeImageIO *io, fi_handle handle) { - char c = 0; - BOOL bFirstChar; - - // skip forward to start of next number - - if(!io->read_proc(&c, 1, 1, handle)) { - throw FI_MSG_ERROR_PARSING; - } - - while (1) { - // eat comments - - if (c == '#') { - // if we're at a comment, read to end of line - - bFirstChar = TRUE; - - while (1) { - if(!io->read_proc(&c, 1, 1, handle)) { - throw FI_MSG_ERROR_PARSING; - } - - if (bFirstChar && c == ' ') { - // loop off 1 sp after # - bFirstChar = FALSE; - } else if (c == '\n') { - break; - } - } - } - - if (c >= '0' && c <='9') { - // we've found what we were looking for - break; - } - - if(!io->read_proc(&c, 1, 1, handle)) { - throw FI_MSG_ERROR_PARSING; - } - } - - // we're at the start of a number, continue until we hit a non-number - - int i = 0; - - while (1) { - i = (i * 10) + (c - '0'); - - if(!io->read_proc(&c, 1, 1, handle)) { - throw FI_MSG_ERROR_PARSING; - } - - if (c < '0' || c > '9') { - break; - } - } - - return i; -} - -/** -Read a WORD value taking into account the endianess issue -*/ -static inline WORD -ReadWord(FreeImageIO *io, fi_handle handle) { - WORD level = 0; - io->read_proc(&level, 2, 1, handle); -#ifndef FREEIMAGE_BIGENDIAN - SwapShort(&level); // PNM uses the big endian convention -#endif - return level; -} - -/** -Write a WORD value taking into account the endianess issue -*/ -static inline void -WriteWord(FreeImageIO *io, fi_handle handle, const WORD value) { - WORD level = value; -#ifndef FREEIMAGE_BIGENDIAN - SwapShort(&level); // PNM uses the big endian convention -#endif - io->write_proc(&level, 2, 1, handle); -} - - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "PNM"; -} - -static const char * DLL_CALLCONV -Description() { - return "Portable Network Media"; -} - -static const char * DLL_CALLCONV -Extension() { - return "pbm,pgm,ppm"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/freeimage-pnm"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE pbm_id1[] = { 0x50, 0x31 }; - BYTE pbm_id2[] = { 0x50, 0x34 }; - BYTE pgm_id1[] = { 0x50, 0x32 }; - BYTE pgm_id2[] = { 0x50, 0x35 }; - BYTE ppm_id1[] = { 0x50, 0x33 }; - BYTE ppm_id2[] = { 0x50, 0x36 }; - BYTE signature[2] = { 0, 0 }; - - io->read_proc(signature, 1, sizeof(pbm_id1), handle); - - if (memcmp(pbm_id1, signature, sizeof(pbm_id1)) == 0) - return TRUE; - - if (memcmp(pbm_id2, signature, sizeof(pbm_id2)) == 0) - return TRUE; - - if (memcmp(pgm_id1, signature, sizeof(pgm_id1)) == 0) - return TRUE; - - if (memcmp(pgm_id2, signature, sizeof(pgm_id2)) == 0) - return TRUE; - - if (memcmp(ppm_id1, signature, sizeof(ppm_id1)) == 0) - return TRUE; - - if (memcmp(ppm_id2, signature, sizeof(ppm_id2)) == 0) - return TRUE; - - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 1) || - (depth == 8) || - (depth == 24) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return ( - (type == FIT_BITMAP) || - (type == FIT_UINT16) || - (type == FIT_RGB16) - ); -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - char id_one = 0, id_two = 0; - int x, y; - FIBITMAP *dib = NULL; - RGBQUAD *pal; // pointer to dib palette - int i; - - if (!handle) { - return NULL; - } - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - try { - FREE_IMAGE_TYPE image_type = FIT_BITMAP; // standard image: 1-, 8-, 24-bit - - // Read the first two bytes of the file to determine the file format - // "P1" = ascii bitmap, "P2" = ascii greymap, "P3" = ascii pixmap, - // "P4" = raw bitmap, "P5" = raw greymap, "P6" = raw pixmap - - io->read_proc(&id_one, 1, 1, handle); - io->read_proc(&id_two, 1, 1, handle); - - if ((id_one != 'P') || (id_two < '1') || (id_two > '6')) { - // signature error - throw FI_MSG_ERROR_MAGIC_NUMBER; - } - - // Read the header information: width, height and the 'max' value if any - - int width = GetInt(io, handle); - int height = GetInt(io, handle); - int maxval = 1; - - if((id_two == '2') || (id_two == '5') || (id_two == '3') || (id_two == '6')) { - maxval = GetInt(io, handle); - if((maxval <= 0) || (maxval > 65535)) { - FreeImage_OutputMessageProc(s_format_id, "Invalid max value : %d", maxval); - throw (const char*)NULL; - } - } - - // Create a new DIB - - switch (id_two) { - case '1': - case '4': - // 1-bit - dib = FreeImage_AllocateHeader(header_only, width, height, 1); - break; - - case '2': - case '5': - if(maxval > 255) { - // 16-bit greyscale - image_type = FIT_UINT16; - dib = FreeImage_AllocateHeaderT(header_only, image_type, width, height); - } else { - // 8-bit greyscale - dib = FreeImage_AllocateHeader(header_only, width, height, 8); - } - break; - - case '3': - case '6': - if(maxval > 255) { - // 48-bit RGB - image_type = FIT_RGB16; - dib = FreeImage_AllocateHeaderT(header_only, image_type, width, height); - } else { - // 24-bit RGB - dib = FreeImage_AllocateHeader(header_only, width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } - break; - } - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // Build a greyscale palette if needed - - if(image_type == FIT_BITMAP) { - switch(id_two) { - case '1': - case '4': - pal = FreeImage_GetPalette(dib); - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 0; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 255; - break; - - case '2': - case '5': - pal = FreeImage_GetPalette(dib); - for (i = 0; i < 256; i++) { - pal[i].rgbRed = - pal[i].rgbGreen = - pal[i].rgbBlue = (BYTE)i; - } - break; - - default: - break; - } - } - - if(header_only) { - // header only mode - return dib; - } - - // Read the image... - - switch(id_two) { - case '1': - case '4': - // write the bitmap data - - if (id_two == '1') { // ASCII bitmap - for (y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - if (GetInt(io, handle) == 0) - bits[x >> 3] |= (0x80 >> (x & 0x7)); - else - bits[x >> 3] &= (0xFF7F >> (x & 0x7)); - } - } - } else { // Raw bitmap - int line = CalculateLine(width, 1); - - for (y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < line; x++) { - io->read_proc(&bits[x], 1, 1, handle); - - bits[x] = ~bits[x]; - } - } - } - - return dib; - - case '2': - case '5': - if(image_type == FIT_BITMAP) { - // write the bitmap data - - if(id_two == '2') { // ASCII greymap - int level = 0; - - for (y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - level = GetInt(io, handle); - bits[x] = (BYTE)((255 * level) / maxval); - } - } - } else { // Raw greymap - BYTE level = 0; - - for (y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - io->read_proc(&level, 1, 1, handle); - bits[x] = (BYTE)((255 * (int)level) / maxval); - } - } - } - } - else if(image_type == FIT_UINT16) { - // write the bitmap data - - if(id_two == '2') { // ASCII greymap - int level = 0; - - for (y = 0; y < height; y++) { - WORD *bits = (WORD*)FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - level = GetInt(io, handle); - bits[x] = (WORD)((65535 * (double)level) / maxval); - } - } - } else { // Raw greymap - WORD level = 0; - - for (y = 0; y < height; y++) { - WORD *bits = (WORD*)FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - level = ReadWord(io, handle); - bits[x] = (WORD)((65535 * (double)level) / maxval); - } - } - } - } - - return dib; - - case '3': - case '6': - if(image_type == FIT_BITMAP) { - // write the bitmap data - - if (id_two == '3') { // ASCII pixmap - int level = 0; - - for (y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - level = GetInt(io, handle); - bits[FI_RGBA_RED] = (BYTE)((255 * level) / maxval); // R - level = GetInt(io, handle); - bits[FI_RGBA_GREEN] = (BYTE)((255 * level) / maxval); // G - level = GetInt(io, handle); - bits[FI_RGBA_BLUE] = (BYTE)((255 * level) / maxval); // B - - bits += 3; - } - } - } else { // Raw pixmap - BYTE level = 0; - - for (y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - io->read_proc(&level, 1, 1, handle); - bits[FI_RGBA_RED] = (BYTE)((255 * (int)level) / maxval); // R - - io->read_proc(&level, 1, 1, handle); - bits[FI_RGBA_GREEN] = (BYTE)((255 * (int)level) / maxval); // G - - io->read_proc(&level, 1, 1, handle); - bits[FI_RGBA_BLUE] = (BYTE)((255 * (int)level) / maxval); // B - - bits += 3; - } - } - } - } - else if(image_type == FIT_RGB16) { - // write the bitmap data - - if (id_two == '3') { // ASCII pixmap - int level = 0; - - for (y = 0; y < height; y++) { - FIRGB16 *bits = (FIRGB16*)FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - level = GetInt(io, handle); - bits[x].red = (WORD)((65535 * (double)level) / maxval); // R - level = GetInt(io, handle); - bits[x].green = (WORD)((65535 * (double)level) / maxval); // G - level = GetInt(io, handle); - bits[x].blue = (WORD)((65535 * (double)level) / maxval); // B - } - } - } else { // Raw pixmap - WORD level = 0; - - for (y = 0; y < height; y++) { - FIRGB16 *bits = (FIRGB16*)FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - level = ReadWord(io, handle); - bits[x].red = (WORD)((65535 * (double)level) / maxval); // R - level = ReadWord(io, handle); - bits[x].green = (WORD)((65535 * (double)level) / maxval); // G - level = ReadWord(io, handle); - bits[x].blue = (WORD)((65535 * (double)level) / maxval); // B - } - } - } - } - - return dib; - } - - } catch (const char *text) { - if(dib) FreeImage_Unload(dib); - - if(NULL != text) { - switch(id_two) { - case '1': - case '4': - FreeImage_OutputMessageProc(s_format_id, text); - break; - - case '2': - case '5': - FreeImage_OutputMessageProc(s_format_id, text); - break; - - case '3': - case '6': - FreeImage_OutputMessageProc(s_format_id, text); - break; - } - } - } - - return NULL; -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - // ---------------------------------------------------------- - // PNM Saving - // ---------------------------------------------------------- - // - // Output format : - // - // Bit depth flags file format - // ------------- -------------- ----------- - // 1-bit / pixel PNM_SAVE_ASCII PBM (P1) - // 1-bit / pixel PNM_SAVE_RAW PBM (P4) - // 8-bit / pixel PNM_SAVE_ASCII PGM (P2) - // 8-bit / pixel PNM_SAVE_RAW PGM (P5) - // 24-bit / pixel PNM_SAVE_ASCII PPM (P3) - // 24-bit / pixel PNM_SAVE_RAW PPM (P6) - // ---------------------------------------------------------- - - int x, y; - - char buffer[256]; // temporary buffer whose size should be enough for what we need - - if(!dib || !handle) return FALSE; - - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - - int bpp = FreeImage_GetBPP(dib); - int width = FreeImage_GetWidth(dib); - int height = FreeImage_GetHeight(dib); - - // Find the appropriate magic number for this file type - - int magic = 0; - int maxval = 255; - - switch(image_type) { - case FIT_BITMAP: - switch (bpp) { - case 1 : - magic = 1; // PBM file (B & W) - break; - case 8 : - magic = 2; // PGM file (Greyscale) - break; - - case 24 : - magic = 3; // PPM file (RGB) - break; - - default: - return FALSE; // Invalid bit depth - } - break; - - case FIT_UINT16: - magic = 2; // PGM file (Greyscale) - maxval = 65535; - break; - - case FIT_RGB16: - magic = 3; // PPM file (RGB) - maxval = 65535; - break; - - default: - return FALSE; - } - - - if (flags == PNM_SAVE_RAW) - magic += 3; - - // Write the header info - - sprintf(buffer, "P%d\n%d %d\n", magic, width, height); - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - - if (bpp != 1) { - sprintf(buffer, "%d\n", maxval); - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - } - - // Write the image data - /////////////////////// - - if(image_type == FIT_BITMAP) { - switch(bpp) { - case 24 : // 24-bit RGB, 3 bytes per pixel - { - if (flags == PNM_SAVE_RAW) { - for (y = 0; y < height; y++) { - // write the scanline to disc - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - io->write_proc(&bits[FI_RGBA_RED], 1, 1, handle); // R - io->write_proc(&bits[FI_RGBA_GREEN], 1, 1, handle); // G - io->write_proc(&bits[FI_RGBA_BLUE], 1, 1, handle); // B - - bits += 3; - } - } - } else { - int length = 0; - - for (y = 0; y < height; y++) { - // write the scanline to disc - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - sprintf(buffer, "%3d %3d %3d ", bits[FI_RGBA_RED], bits[FI_RGBA_GREEN], bits[FI_RGBA_BLUE]); - - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - - length += 12; - - if(length > 58) { - // No line should be longer than 70 characters - sprintf(buffer, "\n"); - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - length = 0; - } - - bits += 3; - } - } - - } - } - break; - - case 8: // 8-bit greyscale - { - if (flags == PNM_SAVE_RAW) { - for (y = 0; y < height; y++) { - // write the scanline to disc - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - io->write_proc(&bits[x], 1, 1, handle); - } - } - } else { - int length = 0; - - for (y = 0; y < height; y++) { - // write the scanline to disc - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - sprintf(buffer, "%3d ", bits[x]); - - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - - length += 4; - - if (length > 66) { - // No line should be longer than 70 characters - sprintf(buffer, "\n"); - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - length = 0; - } - } - } - } - } - break; - - case 1: // 1-bit B & W - { - int color; - - if (flags == PNM_SAVE_RAW) { - for(y = 0; y < height; y++) { - // write the scanline to disc - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for(x = 0; x < (int)FreeImage_GetLine(dib); x++) - io->write_proc(&bits[x], 1, 1, handle); - } - } else { - int length = 0; - - for (y = 0; y < height; y++) { - // write the scanline to disc - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < (int)FreeImage_GetLine(dib) * 8; x++) { - color = (bits[x>>3] & (0x80 >> (x & 0x07))) != 0; - - sprintf(buffer, "%c ", color ? '1':'0'); - - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - - length += 2; - - if (length > 68) { - // No line should be longer than 70 characters - sprintf(buffer, "\n"); - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - length = 0; - } - } - } - } - } - - break; - } - } // if(FIT_BITMAP) - - else if(image_type == FIT_UINT16) { // 16-bit greyscale - if (flags == PNM_SAVE_RAW) { - for (y = 0; y < height; y++) { - // write the scanline to disc - WORD *bits = (WORD*)FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - WriteWord(io, handle, bits[x]); - } - } - } else { - int length = 0; - - for (y = 0; y < height; y++) { - // write the scanline to disc - WORD *bits = (WORD*)FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - sprintf(buffer, "%5d ", bits[x]); - - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - - length += 6; - - if (length > 64) { - // No line should be longer than 70 characters - sprintf(buffer, "\n"); - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - length = 0; - } - } - } - } - } - - else if(image_type == FIT_RGB16) { // 48-bit RGB - if (flags == PNM_SAVE_RAW) { - for (y = 0; y < height; y++) { - // write the scanline to disc - FIRGB16 *bits = (FIRGB16*)FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - WriteWord(io, handle, bits[x].red); // R - WriteWord(io, handle, bits[x].green); // G - WriteWord(io, handle, bits[x].blue); // B - } - } - } else { - int length = 0; - - for (y = 0; y < height; y++) { - // write the scanline to disc - FIRGB16 *bits = (FIRGB16*)FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < width; x++) { - sprintf(buffer, "%5d %5d %5d ", bits[x].red, bits[x].green, bits[x].blue); - - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - - length += 18; - - if(length > 52) { - // No line should be longer than 70 characters - sprintf(buffer, "\n"); - io->write_proc(&buffer, (unsigned int)strlen(buffer), 1, handle); - length = 0; - } - } - } - - } - } - - return TRUE; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitPNM(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginPSD.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginPSD.cpp deleted file mode 100644 index e5b5ffa..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginPSD.cpp +++ /dev/null @@ -1,169 +0,0 @@ -// ========================================================== -// Photoshop Loader -// -// Design and implementation by -// - Hervé Drolon (drolon@infonie.fr) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// - Garrick Meeker (garrickmeeker@users.sourceforge.net) -// -// Based on LGPL code created and published by http://sourceforge.net/projects/elynx/ -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "PSDParser.h" - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "PSD"; -} - -static const char * DLL_CALLCONV -Description() { - return "Adobe Photoshop"; -} - -static const char * DLL_CALLCONV -Extension() { - return "psd,psb"; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/vnd.adobe.photoshop"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE psd_id[] = { 0x38, 0x42, 0x50, 0x53 }; - BYTE signature[4] = { 0, 0, 0, 0 }; - - io->read_proc(signature, 1, 4, handle); - - if(memcmp(psd_id, signature, 4) == 0) - return TRUE; - - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 1) || - (depth == 8) || - (depth == 24) || - (depth == 32) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return ( - (type == FIT_BITMAP) || - (type == FIT_UINT16) || - (type == FIT_INT16) || - (type == FIT_FLOAT) || - (type == FIT_RGB16) || - (type == FIT_RGBA16) || - (type == FIT_RGBF) || - (type == FIT_RGBAF) - ); -} - -static BOOL DLL_CALLCONV -SupportsICCProfiles() { - return TRUE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - if(!handle) { - return NULL; - } - try { - psdParser parser; - - FIBITMAP *dib = parser.Load(io, handle, s_format_id, flags); - - return dib; - - } catch(const char *text) { - FreeImage_OutputMessageProc(s_format_id, text); - return NULL; - } -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - if(!handle) { - return NULL; - } - try { - psdParser parser; - - bool b = parser.Save(io, dib, handle, page, flags, data); - - return b; - - } catch(const char *text) { - FreeImage_OutputMessageProc(s_format_id, text); - return FALSE; - } -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitPSD(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = NULL; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = SupportsICCProfiles; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginRAS.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginRAS.cpp deleted file mode 100644 index 08fd558..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginRAS.cpp +++ /dev/null @@ -1,512 +0,0 @@ -// ========================================================== -// Sun rasterfile Loader -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Constants + headers -// ---------------------------------------------------------- - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -typedef struct tagSUNHEADER { - DWORD magic; // Magic number - DWORD width; // Image width in pixels - DWORD height; // Image height in pixels - DWORD depth; // Depth (1, 8, 24 or 32 bits) of each pixel - DWORD length; // Image length (in bytes) - DWORD type; // Format of file (see RT_* below) - DWORD maptype; // Type of colormap (see RMT_* below) - DWORD maplength; // Length of colormap (in bytes) -} SUNHEADER; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif - -// ---------------------------------------------------------- - -// Following the header is the colormap, for maplength bytes (unless maplength is zero), -// then the image. Each row of the image is rounded to 2 bytes. - -#define RAS_MAGIC 0x59A66A95 // Magic number for Sun rasterfiles - -// Sun supported type's - -#define RT_OLD 0 // Old format (raw image in 68000 byte order) -#define RT_STANDARD 1 // Raw image in 68000 byte order -#define RT_BYTE_ENCODED 2 // Run-length encoding of bytes -#define RT_FORMAT_RGB 3 // XRGB or RGB instead of XBGR or BGR -#define RT_FORMAT_TIFF 4 // TIFF <-> standard rasterfile -#define RT_FORMAT_IFF 5 // IFF (TAAC format) <-> standard rasterfile - -#define RT_EXPERIMENTAL 0xffff // Reserved for testing - -// These are the possible colormap types. -// if it's in RGB format, the map is made up of three byte arrays -// (red, green, then blue) that are each 1/3 of the colormap length. - -#define RMT_NONE 0 // maplength is expected to be 0 -#define RMT_EQUAL_RGB 1 // red[maplength/3], green[maplength/3], blue[maplength/3] -#define RMT_RAW 2 // Raw colormap -#define RESC 128 // Run-length encoding escape character - -// ----- NOTES ----- -// Each line of the image is rounded out to a multiple of 16 bits. -// This corresponds to the rounding convention used by the memory pixrect -// package (/usr/include/pixrect/memvar.h) of the SunWindows system. -// The ras_encoding field (always set to 0 by Sun's supported software) -// was renamed to ras_length in release 2.0. As a result, rasterfiles -// of type 0 generated by the old software claim to have 0 length; for -// compatibility, code reading rasterfiles must be prepared to compute the -// TRUE length from the width, height, and depth fields. - -// ========================================================== -// Internal functions -// ========================================================== - -static void -ReadData(FreeImageIO *io, fi_handle handle, BYTE *buf, DWORD length, BOOL rle) { - // Read either Run-Length Encoded or normal image data - - static BYTE repchar, remaining= 0; - - if (rle) { - // Run-length encoded read - - while(length--) { - if (remaining) { - remaining--; - *(buf++)= repchar; - } else { - io->read_proc(&repchar, 1, 1, handle); - - if (repchar == RESC) { - io->read_proc(&remaining, 1, 1, handle); - - if (remaining == 0) { - *(buf++)= RESC; - } else { - io->read_proc(&repchar, 1, 1, handle); - - *(buf++)= repchar; - } - } else { - *(buf++)= repchar; - } - } - } - } else { - // Normal read - - io->read_proc(buf, length, 1, handle); - } -} - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "RAS"; -} - -static const char * DLL_CALLCONV -Description() { - return "Sun Raster Image"; -} - -static const char * DLL_CALLCONV -Extension() { - return "ras"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-cmu-raster"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE ras_signature[] = { 0x59, 0xA6, 0x6A, 0x95 }; - BYTE signature[4] = { 0, 0, 0, 0 }; - - io->read_proc(signature, 1, sizeof(ras_signature), handle); - - return (memcmp(ras_signature, signature, sizeof(ras_signature)) == 0); -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - SUNHEADER header; // Sun file header - WORD linelength; // Length of raster line in bytes - WORD fill; // Number of fill bytes per raster line - BOOL rle; // TRUE if RLE file - BOOL isRGB; // TRUE if file type is RT_FORMAT_RGB - BYTE fillchar; - - FIBITMAP *dib = NULL; - BYTE *bits; // Pointer to dib data - WORD x, y; - - if(!handle) { - return NULL; - } - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - try { - // Read SUN raster header - - io->read_proc(&header, sizeof(SUNHEADER), 1, handle); - -#ifndef FREEIMAGE_BIGENDIAN - // SUN rasterfiles are big endian only - - SwapLong(&header.magic); - SwapLong(&header.width); - SwapLong(&header.height); - SwapLong(&header.depth); - SwapLong(&header.length); - SwapLong(&header.type); - SwapLong(&header.maptype); - SwapLong(&header.maplength); -#endif - - // Verify SUN identifier - - if (header.magic != RAS_MAGIC) { - throw FI_MSG_ERROR_MAGIC_NUMBER; - } - - // Allocate a new DIB - - switch(header.depth) { - case 1: - case 8: - dib = FreeImage_AllocateHeader(header_only, header.width, header.height, header.depth); - break; - - case 24: - dib = FreeImage_AllocateHeader(header_only, header.width, header.height, header.depth, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - break; - - case 32: - dib = FreeImage_AllocateHeader(header_only, header.width, header.height, header.depth, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - break; - } - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // Check the file format - - rle = FALSE; - isRGB = FALSE; - - switch(header.type) { - case RT_OLD: - case RT_STANDARD: - case RT_FORMAT_TIFF: // I don't even know what these format are... - case RT_FORMAT_IFF: //The TIFF and IFF format types indicate that the raster - //file was originally converted from either of these file formats. - //so lets at least try to process them as RT_STANDARD - break; - - case RT_BYTE_ENCODED: - rle = TRUE; - break; - - case RT_FORMAT_RGB: - isRGB = TRUE; - break; - - default: - throw FI_MSG_ERROR_UNSUPPORTED_FORMAT; - } - - // set up the colormap if needed - - switch(header.maptype) { - case RMT_NONE : - { - if (header.depth < 24) { - // Create linear color ramp - - RGBQUAD *pal = FreeImage_GetPalette(dib); - - int numcolors = 1 << header.depth; - - for (int i = 0; i < numcolors; i++) { - pal[i].rgbRed = (BYTE)((255 * i) / (numcolors - 1)); - pal[i].rgbGreen = (BYTE)((255 * i) / (numcolors - 1)); - pal[i].rgbBlue = (BYTE)((255 * i) / (numcolors - 1)); - } - } - - break; - } - - case RMT_EQUAL_RGB: - { - BYTE *r, *g, *b; - - // Read SUN raster colormap - - int numcolors = 1 << header.depth; - if((DWORD)(3 * numcolors) > header.maplength) { - // some RAS may have less colors than the full palette - numcolors = header.maplength / 3; - } else { - throw "Invalid palette"; - } - - r = (BYTE*)malloc(3 * numcolors * sizeof(BYTE)); - g = r + numcolors; - b = g + numcolors; - - RGBQUAD *pal = FreeImage_GetPalette(dib); - - io->read_proc(r, 3 * numcolors, 1, handle); - - for (int i = 0; i < numcolors; i++) { - pal[i].rgbRed = r[i]; - pal[i].rgbGreen = g[i]; - pal[i].rgbBlue = b[i]; - } - - free(r); - break; - } - - case RMT_RAW: - { - BYTE *colormap; - - // Read (skip) SUN raster colormap. - - colormap = (BYTE *)malloc(header.maplength * sizeof(BYTE)); - - io->read_proc(colormap, header.maplength, 1, handle); - - free(colormap); - break; - } - } - - if(header_only) { - // header only mode - return dib; - } - - // Calculate the line + pitch - // Each row is multiple of 16 bits (2 bytes). - - if (header.depth == 1) { - linelength = (WORD)((header.width / 8) + (header.width % 8 ? 1 : 0)); - } else { - linelength = (WORD)header.width; - } - - fill = (linelength % 2) ? 1 : 0; - - unsigned pitch = FreeImage_GetPitch(dib); - - // Read the image data - - switch(header.depth) { - case 1: - case 8: - { - bits = FreeImage_GetBits(dib) + (header.height - 1) * pitch; - - for (y = 0; y < header.height; y++) { - ReadData(io, handle, bits, linelength, rle); - - bits -= pitch; - - if (fill) { - ReadData(io, handle, &fillchar, fill, rle); - } - } - - break; - } - - case 24: - { - BYTE *buf, *bp; - - buf = (BYTE*)malloc(header.width * 3); - - for (y = 0; y < header.height; y++) { - bits = FreeImage_GetBits(dib) + (header.height - 1 - y) * pitch; - - ReadData(io, handle, buf, header.width * 3, rle); - - bp = buf; - - if (isRGB) { - for (x = 0; x < header.width; x++) { - bits[FI_RGBA_RED] = *(bp++); // red - bits[FI_RGBA_GREEN] = *(bp++); // green - bits[FI_RGBA_BLUE] = *(bp++); // blue - - bits += 3; - } - } else { - for (x = 0; x < header.width; x++) { - bits[FI_RGBA_RED] = *(bp + 2); // red - bits[FI_RGBA_GREEN] = *(bp + 1);// green - bits[FI_RGBA_BLUE] = *bp; // blue - - bits += 3; bp += 3; - } - } - - if (fill) { - ReadData(io, handle, &fillchar, fill, rle); - } - } - - free(buf); - break; - } - - case 32: - { - BYTE *buf, *bp; - - buf = (BYTE*)malloc(header.width * 4); - - for (y = 0; y < header.height; y++) { - bits = FreeImage_GetBits(dib) + (header.height - 1 - y) * pitch; - - ReadData(io, handle, buf, header.width * 4, rle); - - bp = buf; - - if (isRGB) { - for (x = 0; x < header.width; x++) { - bits[FI_RGBA_ALPHA] = *(bp++); // alpha - bits[FI_RGBA_RED] = *(bp++); // red - bits[FI_RGBA_GREEN] = *(bp++); // green - bits[FI_RGBA_BLUE] = *(bp++); // blue - - bits += 4; - } - } - else { - for (x = 0; x < header.width; x++) { - bits[FI_RGBA_RED] = *(bp + 3); // red - bits[FI_RGBA_GREEN] = *(bp + 2); // green - bits[FI_RGBA_BLUE] = *(bp + 1); // blue - bits[FI_RGBA_ALPHA] = *bp; // alpha - - bits += 4; - bp += 4; - } - } - - if (fill) { - ReadData(io, handle, &fillchar, fill, rle); - } - } - - free(buf); - break; - } - } - - return dib; - - } catch (const char *text) { - if(dib) { - FreeImage_Unload(dib); - } - FreeImage_OutputMessageProc(s_format_id, text); - } - - return NULL; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitRAS(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginRAW.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginRAW.cpp deleted file mode 100644 index e9bd5bf..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginRAW.cpp +++ /dev/null @@ -1,793 +0,0 @@ -// ========================================================== -// RAW camera image loader -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "../LibRawLite/libraw/libraw.h" - -#include "FreeImage.h" -#include "Utilities.h" -#include "../Metadata/FreeImageTag.h" - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Internal functions -// ========================================================== - -// ---------------------------------------------------------- -// FreeImage datastream wrapper -// ---------------------------------------------------------- - -class LibRaw_freeimage_datastream : public LibRaw_abstract_datastream { -private: - FreeImageIO *_io; - fi_handle _handle; - long _eof; - INT64 _fsize; - -public: - LibRaw_freeimage_datastream(FreeImageIO *io, fi_handle handle) : _io(io), _handle(handle) { - long start_pos = io->tell_proc(handle); - io->seek_proc(handle, 0, SEEK_END); - _eof = io->tell_proc(handle); - _fsize = _eof - start_pos; - io->seek_proc(handle, start_pos, SEEK_SET); - } - - ~LibRaw_freeimage_datastream() { - } - - int valid() { - return (_io && _handle); - } - - int read(void *buffer, size_t size, size_t count) { - if(substream) return substream->read(buffer, size, count); - return _io->read_proc(buffer, (unsigned)size, (unsigned)count, _handle); - } - - int seek(INT64 offset, int origin) { - if(substream) return substream->seek(offset, origin); - return _io->seek_proc(_handle, (long)offset, origin); - } - - INT64 tell() { - if(substream) return substream->tell(); - return _io->tell_proc(_handle); - } - - INT64 size() { - return _fsize; - } - - int get_char() { - int c = 0; - if(substream) return substream->get_char(); - if(!_io->read_proc(&c, 1, 1, _handle)) return -1; - return c; - } - - char* gets(char *buffer, int length) { - if (substream) return substream->gets(buffer, length); - memset(buffer, 0, length); - for(int i = 0; i < length; i++) { - if(!_io->read_proc(&buffer[i], 1, 1, _handle)) - return NULL; - if(buffer[i] == 0x0A) - break; - } - return buffer; - } - - int scanf_one(const char *fmt, void* val) { - std::string buffer; - char element = 0; - bool bDone = false; - if(substream) return substream->scanf_one(fmt,val); - do { - if(_io->read_proc(&element, 1, 1, _handle) == 1) { - switch(element) { - case '0': - case '\n': - case ' ': - case '\t': - bDone = true; - break; - default: - break; - } - buffer.append(&element, 1); - } else { - return 0; - } - } while(!bDone); - - return sscanf(buffer.c_str(), fmt, val); - } - - int eof() { - if(substream) return substream->eof(); - return (_io->tell_proc(_handle) >= _eof); - } - - void * make_jas_stream() { - return NULL; - } -}; - -// ---------------------------------------------------------- - -/** -Convert a processed raw data array to a FIBITMAP -@param RawProcessor LibRaw handle containing the processed raw image -@return Returns the converted dib if successfull, returns NULL otherwise -*/ -static FIBITMAP * -libraw_ConvertProcessedRawToDib(LibRaw *RawProcessor) { - FIBITMAP *dib = NULL; - int width, height, colors, bpp; - - try { - int bgr = 0; // pixel copy order: RGB if (bgr == 0) and BGR otherwise - - // get image info - RawProcessor->get_mem_image_format(&width, &height, &colors, &bpp); - - // only 3-color images supported... - if(colors != 3) { - throw "LibRaw : only 3-color images supported"; - } - - if(bpp == 16) { - // allocate output dib - dib = FreeImage_AllocateT(FIT_RGB16, width, height); - if(!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - } else if(bpp == 8) { -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - bgr = 1; // only useful for FIT_BITMAP types -#endif - - // allocate output dib - dib = FreeImage_AllocateT(FIT_BITMAP, width, height, 24); - if(!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - } - - // copy post-processed bitmap data into FIBITMAP buffer - if(RawProcessor->copy_mem_image(FreeImage_GetBits(dib), FreeImage_GetPitch(dib), bgr) != LIBRAW_SUCCESS) { - throw "LibRaw : failed to copy data into dib"; - } - - // flip vertically - FreeImage_FlipVertical(dib); - - return dib; - - } catch(const char *text) { - FreeImage_Unload(dib); - FreeImage_OutputMessageProc(s_format_id, text); - return NULL; - } -} - - -/** -Convert a processed raw image to a FIBITMAP -@param image Processed raw image -@return Returns the converted dib if successfull, returns NULL otherwise -@see libraw_LoadEmbeddedPreview -*/ -static FIBITMAP * -libraw_ConvertProcessedImageToDib(libraw_processed_image_t *image) { - FIBITMAP *dib = NULL; - - try { - unsigned width = image->width; - unsigned height = image->height; - unsigned bpp = image->bits; - if(bpp == 16) { - // allocate output dib - dib = FreeImage_AllocateT(FIT_RGB16, width, height); - if(!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - // write data - WORD *raw_data = (WORD*)image->data; - for(unsigned y = 0; y < height; y++) { - FIRGB16 *output = (FIRGB16*)FreeImage_GetScanLine(dib, height - 1 - y); - for(unsigned x = 0; x < width; x++) { - output[x].red = raw_data[0]; - output[x].green = raw_data[1]; - output[x].blue = raw_data[2]; - raw_data += 3; - } - } - } else if(bpp == 8) { - // allocate output dib - dib = FreeImage_AllocateT(FIT_BITMAP, width, height, 24); - if(!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - // write data - BYTE *raw_data = (BYTE*)image->data; - for(unsigned y = 0; y < height; y++) { - RGBTRIPLE *output = (RGBTRIPLE*)FreeImage_GetScanLine(dib, height - 1 - y); - for(unsigned x = 0; x < width; x++) { - output[x].rgbtRed = raw_data[0]; - output[x].rgbtGreen = raw_data[1]; - output[x].rgbtBlue = raw_data[2]; - raw_data += 3; - } - } - } - - return dib; - - } catch(const char *text) { - FreeImage_Unload(dib); - FreeImage_OutputMessageProc(s_format_id, text); - return NULL; - } -} - -/** -Get the embedded JPEG preview image from RAW picture with included Exif Data. -@param RawProcessor Libraw handle -@param flags JPEG load flags -@return Returns the loaded dib if successfull, returns NULL otherwise -*/ -static FIBITMAP * -libraw_LoadEmbeddedPreview(LibRaw *RawProcessor, int flags) { - FIBITMAP *dib = NULL; - libraw_processed_image_t *thumb_image = NULL; - - try { - // unpack data - if(RawProcessor->unpack_thumb() != LIBRAW_SUCCESS) { - // run silently "LibRaw : failed to run unpack_thumb" - return NULL; - } - - // retrieve thumb image - int error_code = 0; - thumb_image = RawProcessor->dcraw_make_mem_thumb(&error_code); - if(thumb_image) { - if(thumb_image->type != LIBRAW_IMAGE_BITMAP) { - // attach the binary data to a memory stream - FIMEMORY *hmem = FreeImage_OpenMemory((BYTE*)thumb_image->data, (DWORD)thumb_image->data_size); - // get the file type - FREE_IMAGE_FORMAT fif = FreeImage_GetFileTypeFromMemory(hmem, 0); - if(fif == FIF_JPEG) { - // rotate according to Exif orientation - flags |= JPEG_EXIFROTATE; - } - // load an image from the memory stream - dib = FreeImage_LoadFromMemory(fif, hmem, flags); - // close the stream - FreeImage_CloseMemory(hmem); - } else if((flags & FIF_LOAD_NOPIXELS) != FIF_LOAD_NOPIXELS) { - // convert processed data to output dib - dib = libraw_ConvertProcessedImageToDib(thumb_image); - } - } else { - throw "LibRaw : failed to run dcraw_make_mem_thumb"; - } - - // clean-up and return - RawProcessor->dcraw_clear_mem(thumb_image); - - return dib; - - } catch(const char *text) { - // clean-up and return - if(thumb_image) { - RawProcessor->dcraw_clear_mem(thumb_image); - } - if(text != NULL) { - FreeImage_OutputMessageProc(s_format_id, text); - } - } - - return NULL; -} -/** -Load raw data and convert to FIBITMAP -@param RawProcessor Libraw handle -@param bitspersample Output bitdepth (8- or 16-bit) -@return Returns the loaded dib if successfull, returns NULL otherwise -*/ -static FIBITMAP * -libraw_LoadRawData(LibRaw *RawProcessor, int bitspersample) { - FIBITMAP *dib = NULL; - - try { - // set decoding parameters - // ----------------------- - - // (-6) 16-bit or 8-bit - RawProcessor->imgdata.params.output_bps = bitspersample; - // (-g power toe_slope) - if(bitspersample == 16) { - // set -g 1 1 for linear curve - RawProcessor->imgdata.params.gamm[0] = 1; - RawProcessor->imgdata.params.gamm[1] = 1; - } else if(bitspersample == 8) { - // by default settings for rec. BT.709 are used: power 2.222 (i.e. gamm[0]=1/2.222) and slope 4.5 - RawProcessor->imgdata.params.gamm[0] = 1/2.222; - RawProcessor->imgdata.params.gamm[1] = 4.5; - } - // (-W) Don't use automatic increase of brightness by histogram - RawProcessor->imgdata.params.no_auto_bright = 1; - // (-a) Use automatic white balance obtained after averaging over the entire image - RawProcessor->imgdata.params.use_auto_wb = 1; - // (-q 3) Adaptive homogeneity-directed demosaicing algorithm (AHD) - RawProcessor->imgdata.params.user_qual = 3; - - // ----------------------- - - // unpack data - if(RawProcessor->unpack() != LIBRAW_SUCCESS) { - throw "LibRaw : failed to unpack data"; - } - - // process data (... most consuming task ...) - if(RawProcessor->dcraw_process() != LIBRAW_SUCCESS) { - throw "LibRaw : failed to process data"; - } - - // retrieve processed image - dib = libraw_ConvertProcessedRawToDib(RawProcessor); - - return dib; - - } catch(const char *text) { - FreeImage_OutputMessageProc(s_format_id, text); - return NULL; - } -} - -/** -Load the Bayer matrix (unprocessed raw data) as a FIT_UINT16 image. -Note that some formats don't have a Bayer matrix (e.g. Foveon, Canon sRAW, demosaiced DNG files). -@param RawProcessor Libraw handle -@return Returns the loaded dib if successfull, returns NULL otherwise -*/ -static FIBITMAP * -libraw_LoadUnprocessedData(LibRaw *RawProcessor) { - FIBITMAP *dib = NULL; - - try { - // unpack data - if(RawProcessor->unpack() != LIBRAW_SUCCESS) { - throw "LibRaw : failed to unpack data"; - } - - // check for a supported Bayer format - if(!(RawProcessor->imgdata.idata.filters || RawProcessor->imgdata.idata.colors == 1)) { - throw "LibRaw : only Bayer-pattern RAW files are supported"; - } - - // allocate output dib - const unsigned width = RawProcessor->imgdata.sizes.raw_width; - const unsigned height = RawProcessor->imgdata.sizes.raw_height; - const size_t line_size = width * sizeof(WORD); - const WORD *src_bits = (WORD*)RawProcessor->imgdata.rawdata.raw_image; - - if(src_bits) { - dib = FreeImage_AllocateT(FIT_UINT16, width, height); - } - if(!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // retrieve the raw image - for(unsigned y = 0; y < height; y++) { - WORD *dst_bits = (WORD*)FreeImage_GetScanLine(dib, height - 1 - y); - memcpy(dst_bits, src_bits, line_size); - src_bits += width; - } - - // store metadata needed for post-processing - { - char value[512]; - - const libraw_image_sizes_t *sizes = &RawProcessor->imgdata.sizes; - - // image output width & height - { - sprintf(value, "%d", sizes->iwidth); - FreeImage_SetMetadataKeyValue(FIMD_COMMENTS, dib, "Raw.Output.Width", value); - - sprintf(value, "%d", sizes->iheight); - FreeImage_SetMetadataKeyValue(FIMD_COMMENTS, dib, "Raw.Output.Height", value); - } - - // image output frame - { - const unsigned f_left = sizes->left_margin; - const unsigned f_top = sizes->top_margin; - const unsigned f_width = sizes->width; - const unsigned f_height = sizes->height; - - sprintf(value, "%d", f_left); - FreeImage_SetMetadataKeyValue(FIMD_COMMENTS, dib, "Raw.Frame.Left", value); - - sprintf(value, "%d", f_top); - FreeImage_SetMetadataKeyValue(FIMD_COMMENTS, dib, "Raw.Frame.Top", value); - - sprintf(value, "%d", f_width); - FreeImage_SetMetadataKeyValue(FIMD_COMMENTS, dib, "Raw.Frame.Width", value); - - sprintf(value, "%d", f_height); - FreeImage_SetMetadataKeyValue(FIMD_COMMENTS, dib, "Raw.Frame.Height", value); - } - - // Bayer pattern - // Mask describing the order of color pixels in the matrix. - // This field describe 16 pixels (8 rows with two pixels in each, from left to right and from top to bottom). - - if(RawProcessor->imgdata.idata.filters) { - // description of colors numbered from 0 to 3 (RGBG,RGBE,GMCY, or GBTG) - char *cdesc = RawProcessor->imgdata.idata.cdesc; - if(!cdesc[3]) { - cdesc[3] = 'G'; - } - char *pattern = &value[0]; - for(int i = 0; i < 16; i++) { - pattern[i] = cdesc[ RawProcessor->fcol(i >> 1, i & 1) ]; - } - pattern[16] = 0; - - FreeImage_SetMetadataKeyValue(FIMD_COMMENTS, dib, "Raw.BayerPattern", value); - } - } - - return dib; - - } catch(const char *text) { - FreeImage_Unload(dib); - FreeImage_OutputMessageProc(s_format_id, text); - return NULL; - } -} - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "RAW"; -} - -static const char * DLL_CALLCONV -Description() { - return "RAW camera image"; -} - -static const char * DLL_CALLCONV -Extension() { - /** - Below are known RAW file extensions that you can check using FreeImage_GetFIFFromFormat. - If a file extension is not listed, that doesn't mean that you cannot load it. - Using FreeImage_GetFileType is the best way to know if a RAW file format is supported. - */ - static const char *raw_extensions = - "3fr," // Hasselblad Digital Camera Raw Image Format. - "arw," // Sony Digital Camera Raw Image Format for Alpha devices. - "bay," // Casio Digital Camera Raw File Format. - "bmq," // NuCore Raw Image File. - "cap," // Phase One Digital Camera Raw Image Format. - "cine," // Phantom Software Raw Image File. - "cr2," // Canon Digital Camera RAW Image Format version 2.0. These images are based on the TIFF image standard. - "crw," // Canon Digital Camera RAW Image Format version 1.0. - "cs1," // Sinar Capture Shop Raw Image File. - "dc2," // Kodak DC25 Digital Camera File. - "dcr," // Kodak Digital Camera Raw Image Format for these models: Kodak DSC Pro SLR/c, Kodak DSC Pro SLR/n, Kodak DSC Pro 14N, Kodak DSC PRO 14nx. - "drf," // Kodak Digital Camera Raw Image Format. - "dsc," // Kodak Digital Camera Raw Image Format. - "dng," // Adobe Digital Negative: DNG is publicly available archival format for the raw files generated by digital cameras. By addressing the lack of an open standard for the raw files created by individual camera models, DNG helps ensure that photographers will be able to access their files in the future. - "erf," // Epson Digital Camera Raw Image Format. - "fff," // Imacon Digital Camera Raw Image Format. - "ia," // Sinar Raw Image File. - "iiq," // Phase One Digital Camera Raw Image Format. - "k25," // Kodak DC25 Digital Camera Raw Image Format. - "kc2," // Kodak DCS200 Digital Camera Raw Image Format. - "kdc," // Kodak Digital Camera Raw Image Format. - "mdc," // Minolta RD175 Digital Camera Raw Image Format. - "mef," // Mamiya Digital Camera Raw Image Format. - "mos," // Leaf Raw Image File. - "mrw," // Minolta Dimage Digital Camera Raw Image Format. - "nef," // Nikon Digital Camera Raw Image Format. - "nrw," // Nikon Digital Camera Raw Image Format. - "orf," // Olympus Digital Camera Raw Image Format. - "pef," // Pentax Digital Camera Raw Image Format. - "ptx," // Pentax Digital Camera Raw Image Format. - "pxn," // Logitech Digital Camera Raw Image Format. - "qtk," // Apple Quicktake 100/150 Digital Camera Raw Image Format. - "raf," // Fuji Digital Camera Raw Image Format. - "raw," // Panasonic Digital Camera Image Format. - "rdc," // Digital Foto Maker Raw Image File. - "rw2," // Panasonic LX3 Digital Camera Raw Image Format. - "rwl," // Leica Camera Raw Image Format. - "rwz," // Rawzor Digital Camera Raw Image Format. - "sr2," // Sony Digital Camera Raw Image Format. - "srf," // Sony Digital Camera Raw Image Format for DSC-F828 8 megapixel digital camera or Sony DSC-R1. - "srw," // Samsung Raw Image Format. - "sti," // Sinar Capture Shop Raw Image File. - "x3f"; // Sigma Digital Camera Raw Image Format for devices based on Foveon X3 direct image sensor. - return raw_extensions; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-dcraw"; -} - -static BOOL -HasMagicHeader(FreeImageIO *io, fi_handle handle) { - const unsigned signature_size = 32; - BYTE signature[signature_size] = { 0 }; - /* - note: classic TIFF signature is - { 0x49, 0x49, 0x2A, 0x00 } Classic TIFF, little-endian - { 0x4D, 0x4D, 0x00, 0x2A } Classic TIFF, big-endian - */ - // Canon (CR2), little-endian byte order - const BYTE CR2_II[] = { 0x49, 0x49, 0x2A, 0x00, 0x10, 0x00, 0x00, 0x00, 0x43, 0x52, 0x02, 0x00 }; - // Canon (CRW), little-endian byte order - const BYTE CRW_II[] = { 0x49, 0x49, 0x1A, 0x00, 0x00, 0x00, 0x48, 0x45, 0x41, 0x50, 0x43, 0x43, 0x44, 0x52, 0x02, 0x00 }; - // Minolta (MRW) - const BYTE MRW[] = { 0x00, 0x4D, 0x52, 0x4D, 0x00 }; - // Olympus (ORF), little-endian byte order - const BYTE ORF_IIRS[] = { 0x49, 0x49, 0x52, 0x53, 0x08, 0x00, 0x00, 0x00 }; - const BYTE ORF_IIRO[] = { 0x49, 0x49, 0x52, 0x4F, 0x08, 0x00, 0x00, 0x00 }; - // Olympus (ORF), big-endian byte order - const BYTE ORF_MMOR[] = { 0x4D, 0x4D, 0x4F, 0x52, 0x00, 0x00, 0x00, 0x08 }; - // Fujifilm (RAF) - const BYTE RAF[] = { 0x46, 0x55, 0x4A, 0x49, 0x46, 0x49, 0x4C, 0x4D, 0x43, 0x43, 0x44, 0x2D, 0x52, 0x41, 0x57, 0x20 }; - // Panasonic (RW2) or Leica (RWL), little-endian byte order - const BYTE RWx_II[] = { 0x49, 0x49, 0x55, 0x00, 0x18, 0x00, 0x00, 0x00, 0x88, 0xE7, 0x74, 0xD8, 0xF8, 0x25, 0x1D, 0x4D, 0x94, 0x7A, 0x6E, 0x77, 0x82, 0x2B, 0x5D, 0x6A }; - // Panasonic (RAW) or Leica (RAW), little-endian byte order - const BYTE RAW_II[] = { 0x49, 0x49, 0x55, 0x00, 0x08, 0x00, 0x00, 0x00, 0x22, 0x00, 0x01, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00 }; - // Foveon (X3F) - const BYTE X3F[] = { 0x46, 0x4F, 0x56, 0x62 }; - - if(io->read_proc(signature, 1, signature_size, handle) != signature_size) { - return FALSE; - } - if(memcmp(CR2_II, signature, 12) == 0) - return TRUE; - if(memcmp(CRW_II, signature, 16) == 0) - return TRUE; - if(memcmp(MRW, signature, 5) == 0) - return TRUE; - if(memcmp(ORF_IIRS, signature, 8) == 0) - return TRUE; - if(memcmp(ORF_IIRO, signature, 8) == 0) - return TRUE; - if(memcmp(ORF_MMOR, signature, 8) == 0) - return TRUE; - if(memcmp(RAF, signature, 16) == 0) - return TRUE; - if(memcmp(RWx_II, signature, 24) == 0) - return TRUE; - if(memcmp(RAW_II, signature, 18) == 0) - return TRUE; - if(memcmp(X3F, signature, 4) == 0) - return TRUE; - - return FALSE; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - // some RAW files have a magic signature (most of them have a TIFF signature) - // try to check this in order to speed up the file identification - { - long tell = io->tell_proc(handle); - if( HasMagicHeader(io, handle) ) { - return TRUE; - } else { - io->seek_proc(handle, tell, SEEK_SET); - } - } - - // no magic signature : we need to open the file (it will take more time to identify it) - // do not declare RawProcessor on the stack as it may be huge (300 KB) - { - LibRaw *RawProcessor = new(std::nothrow) LibRaw; - - if(RawProcessor) { - BOOL bSuccess = TRUE; - - // wrap the input datastream - LibRaw_freeimage_datastream datastream(io, handle); - - // open the datastream - if(RawProcessor->open_datastream(&datastream) != LIBRAW_SUCCESS) { - bSuccess = FALSE; // LibRaw : failed to open input stream (unknown format) - } - - // clean-up internal memory allocations - RawProcessor->recycle(); - delete RawProcessor; - - return bSuccess; - } - } - - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsICCProfiles() { - return TRUE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - FIBITMAP *dib = NULL; - LibRaw *RawProcessor = NULL; - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - try { - // do not declare RawProcessor on the stack as it may be huge (300 KB) - RawProcessor = new(std::nothrow) LibRaw; - if(!RawProcessor) { - throw FI_MSG_ERROR_MEMORY; - } - - // wrap the input datastream - LibRaw_freeimage_datastream datastream(io, handle); - - // set decoding parameters - // the following parameters affect data reading - // -------------------------------------------- - - // (-s [0..N-1]) Select one raw image from input file - RawProcessor->imgdata.params.shot_select = 0; - // (-w) Use camera white balance, if possible (otherwise, fallback to auto_wb) - RawProcessor->imgdata.params.use_camera_wb = 1; - // (-M) Use any color matrix from the camera metadata. This option only affects Olympus, Leaf, and Phase One cameras. - RawProcessor->imgdata.params.use_camera_matrix = 1; - // (-h) outputs the image in 50% size - RawProcessor->imgdata.params.half_size = ((flags & RAW_HALFSIZE) == RAW_HALFSIZE) ? 1 : 0; - - // open the datastream - if(RawProcessor->open_datastream(&datastream) != LIBRAW_SUCCESS) { - throw "LibRaw : failed to open input stream (unknown format)"; - } - - if(header_only) { - // header only mode - dib = FreeImage_AllocateHeaderT(header_only, FIT_RGB16, RawProcessor->imgdata.sizes.width, RawProcessor->imgdata.sizes.height); - } - else if((flags & RAW_UNPROCESSED) == RAW_UNPROCESSED) { - // load raw data without post-processing (i.e. as a Bayer matrix) - dib = libraw_LoadUnprocessedData(RawProcessor); - } - else if((flags & RAW_PREVIEW) == RAW_PREVIEW) { - // try to get the embedded JPEG - dib = libraw_LoadEmbeddedPreview(RawProcessor, 0); - if(!dib) { - // no JPEG preview: try to load as 8-bit/sample (i.e. RGB 24-bit) - dib = libraw_LoadRawData(RawProcessor, 8); - } - } - else if((flags & RAW_DISPLAY) == RAW_DISPLAY) { - // load raw data as 8-bit/sample (i.e. RGB 24-bit) - dib = libraw_LoadRawData(RawProcessor, 8); - } - else { - // default: load raw data as linear 16-bit/sample (i.e. RGB 48-bit) - dib = libraw_LoadRawData(RawProcessor, 16); - } - - // save ICC profile if present - if(dib && (NULL != RawProcessor->imgdata.color.profile)) { - FreeImage_CreateICCProfile(dib, RawProcessor->imgdata.color.profile, RawProcessor->imgdata.color.profile_length); - } - - // try to get JPEG embedded Exif metadata - if(dib && !((flags & RAW_PREVIEW) == RAW_PREVIEW)) { - FIBITMAP *metadata_dib = libraw_LoadEmbeddedPreview(RawProcessor, FIF_LOAD_NOPIXELS); - if(metadata_dib) { - FreeImage_CloneMetadata(dib, metadata_dib); - FreeImage_Unload(metadata_dib); - } - } - - // clean-up internal memory allocations - RawProcessor->recycle(); - delete RawProcessor; - - return dib; - - } catch(const char *text) { - if(RawProcessor) { - RawProcessor->recycle(); - delete RawProcessor; - } - if(dib) { - FreeImage_Unload(dib); - } - FreeImage_OutputMessageProc(s_format_id, text); - } - - return NULL; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitRAW(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = SupportsICCProfiles; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginSGI.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginSGI.cpp deleted file mode 100644 index 35fd2ec..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginSGI.cpp +++ /dev/null @@ -1,425 +0,0 @@ -// ========================================================== -// SGI Loader -// -// Design and implementation by -// - Sherman Wilcox -// - Noam Gat -// -// References : -// ------------ -// - The SGI Image File Format, Version 1.0 -// http://astronomy.swin.edu.au/~pbourke/dataformats/sgirgb/sgiversion.html -// - SGI RGB Image Format -// http://astronomy.swin.edu.au/~pbourke/dataformats/sgirgb/ -// -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Constants + headers -// ---------------------------------------------------------- - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -typedef struct tagSGIHeader { - /** IRIS image file magic number. This should be decimal 474. */ - WORD magic; - /** Storage format: 0 for uncompressed, 1 for RLE compression. */ - BYTE storage; - /** Number of bytes per pixel channel. Legally 1 or 2. */ - BYTE bpc; - /** - Number of dimensions. Legally 1, 2, or 3. - 1 means a single row, XSIZE long - 2 means a single 2D image - 3 means multiple 2D images - */ - WORD dimension; - /** X size in pixels */ - WORD xsize; - /** Y size in pixels */ - WORD ysize; - /** - Number of channels. - 1 indicates greyscale - 3 indicates RGB - 4 indicates RGB and Alpha - */ - WORD zsize; - /** Minimum pixel value. This is the lowest pixel value in the image.*/ - LONG pixmin; - /** Maximum pixel value. This is the highest pixel value in the image.*/ - LONG pixmax; - /** Ignored. Normally set to 0. */ - char dummy[4]; - /** Image name. Must be null terminated, therefore at most 79 bytes. */ - char imagename[80]; - /** - Colormap ID. - 0 - normal mode - 1 - dithered, 3 mits for red and green, 2 for blue, obsolete - 2 - index colour, obsolete - 3 - not an image but a colourmap - */ - LONG colormap; - /** Ignored. Should be set to 0, makes the header 512 bytes. */ - char reserved[404]; -} SGIHeader; - -typedef struct tagRLEStatus { - int cnt; - int val; -} RLEStatus; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif - -static const char *SGI_LESS_THAN_HEADER_LENGTH = "Incorrect header size"; -static const char *SGI_16_BIT_COMPONENTS_NOT_SUPPORTED = "No 16 bit support"; -static const char *SGI_COLORMAPS_NOT_SUPPORTED = "No colormap support"; -static const char *SGI_EOF_IN_RLE_INDEX = "EOF in run length encoding"; -static const char *SGI_EOF_IN_IMAGE_DATA = "EOF in image data"; -static const char *SGI_INVALID_CHANNEL_COUNT = "Invalid channel count"; - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -#ifndef FREEIMAGE_BIGENDIAN -static void -SwapHeader(SGIHeader *header) { - SwapShort(&header->magic); - SwapShort(&header->dimension); - SwapShort(&header->xsize); - SwapShort(&header->ysize); - SwapShort(&header->zsize); - SwapLong((DWORD*)&header->pixmin); - SwapLong((DWORD*)&header->pixmax); - SwapLong((DWORD*)&header->colormap); -} -#endif - -static int -get_rlechar(FreeImageIO *io, fi_handle handle, RLEStatus *pstatus) { - if (!pstatus->cnt) { - int cnt = 0; - while (0 == cnt) { - BYTE packed = 0; - if(io->read_proc(&packed, sizeof(BYTE), 1, handle) < 1) { - return EOF; - } - cnt = packed; - } - if (cnt == EOF) { - return EOF; - } - pstatus->cnt = cnt & 0x7F; - if (cnt & 0x80) { - pstatus->val = -1; - } else { - BYTE packed = 0; - if(io->read_proc(&packed, sizeof(BYTE), 1, handle) < 1) { - return EOF; - } - pstatus->val = packed; - } - } - pstatus->cnt--; - if (pstatus->val == -1) { - BYTE packed = 0; - if(io->read_proc(&packed, sizeof(BYTE), 1, handle) < 1) { - return EOF; - } - return packed; - } - else { - return pstatus->val; - } -} - -static const char * DLL_CALLCONV -Format() { - return "SGI"; -} - -static const char * DLL_CALLCONV -Description() { - return "SGI Image Format"; -} - -static const char * DLL_CALLCONV -Extension() { - return "sgi,rgb,rgba,bw"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-sgi"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE sgi_signature[2] = { 0x01, 0xDA }; - BYTE signature[2] = { 0, 0 }; - - io->read_proc(signature, 1, sizeof(sgi_signature), handle); - - return (memcmp(sgi_signature, signature, sizeof(sgi_signature)) == 0); -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - int width = 0, height = 0, zsize = 0; - int i, dim; - int bitcount; - SGIHeader sgiHeader; - RLEStatus my_rle_status; - FIBITMAP *dib = NULL; - LONG *pRowIndex = NULL; - - try { - // read the header - memset(&sgiHeader, 0, sizeof(SGIHeader)); - if(io->read_proc(&sgiHeader, 1, sizeof(SGIHeader), handle) < sizeof(SGIHeader)) { - throw SGI_LESS_THAN_HEADER_LENGTH; - } -#ifndef FREEIMAGE_BIGENDIAN - SwapHeader(&sgiHeader); -#endif - if(sgiHeader.magic != 474) { - throw FI_MSG_ERROR_MAGIC_NUMBER; - } - - BOOL bIsRLE = (sgiHeader.storage == 1) ? TRUE : FALSE; - - // check for unsupported image types - if (sgiHeader.bpc != 1) { - // Expected one byte per color component - throw SGI_16_BIT_COMPONENTS_NOT_SUPPORTED; - } - if (sgiHeader.colormap != 0) { - // Indexed or dithered images not supported - throw SGI_COLORMAPS_NOT_SUPPORTED; - } - - // get the width & height - dim = sgiHeader.dimension; - width = sgiHeader.xsize; - if (dim < 3) { - zsize = 1; - } else { - zsize = sgiHeader.zsize; - } - - if (dim < 2) { - height = 1; - } else { - height = sgiHeader.ysize; - } - - if(bIsRLE) { - // read the Offset Tables - int index_len = height * zsize; - pRowIndex = (LONG*)malloc(index_len * sizeof(LONG)); - if(!pRowIndex) { - throw FI_MSG_ERROR_MEMORY; - } - - if ((unsigned)index_len != io->read_proc(pRowIndex, sizeof(LONG), index_len, handle)) { - throw SGI_EOF_IN_RLE_INDEX; - } - -#ifndef FREEIMAGE_BIGENDIAN - // Fix byte order in index - for (i = 0; i < index_len; i++) { - SwapLong((DWORD*)&pRowIndex[i]); - } -#endif - // Discard row size index - for (i = 0; i < (int)(index_len * sizeof(LONG)); i++) { - BYTE packed = 0; - if( io->read_proc(&packed, sizeof(BYTE), 1, handle) < 1 ) { - throw SGI_EOF_IN_RLE_INDEX; - } - } - } - - switch(zsize) { - case 1: - bitcount = 8; - break; - case 2: - //Grayscale+Alpha. Need to fake RGBA - bitcount = 32; - break; - case 3: - bitcount = 24; - break; - case 4: - bitcount = 32; - break; - default: - throw SGI_INVALID_CHANNEL_COUNT; - } - - dib = FreeImage_Allocate(width, height, bitcount); - if(!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - if (bitcount == 8) { - // 8-bit SGI files are grayscale images, so we'll generate - // a grayscale palette. - RGBQUAD *pclrs = FreeImage_GetPalette(dib); - for (i = 0; i < 256; i++) { - pclrs[i].rgbRed = (BYTE)i; - pclrs[i].rgbGreen = (BYTE)i; - pclrs[i].rgbBlue = (BYTE)i; - pclrs[i].rgbReserved = 0; - } - } - - // decode the image - - memset(&my_rle_status, 0, sizeof(RLEStatus)); - - int ns = FreeImage_GetPitch(dib); - BYTE *pStartRow = FreeImage_GetScanLine(dib, 0); - int offset_table[] = { 2, 1, 0, 3 }; - int numChannels = zsize; - if (zsize < 3) { - offset_table[0] = 0; - } - if (zsize == 2) - { - //This is how faked grayscale+alpha works. - //First channel goes into first - //second channel goes into alpha (4th channel) - //Two channels are left empty and will be copied later - offset_table[1] = 3; - numChannels = 4; - } - - LONG *pri = pRowIndex; - for (i = 0; i < zsize; i++) { - BYTE *pRow = pStartRow + offset_table[i]; - for (int j = 0; j < height; j++, pRow += ns, pri++) { - BYTE *p = pRow; - if (bIsRLE) { - my_rle_status.cnt = 0; - io->seek_proc(handle, *pri, SEEK_SET); - } - for (int k = 0; k < width; k++, p += numChannels) { - int ch; - BYTE packed = 0; - if (bIsRLE) { - ch = get_rlechar(io, handle, &my_rle_status); - packed = (BYTE)ch; - } - else { - ch = io->read_proc(&packed, sizeof(BYTE), 1, handle); - } - if (ch == EOF) { - throw SGI_EOF_IN_IMAGE_DATA; - } - *p = packed; - } - } - } - - if (zsize == 2) - { - BYTE *pRow = pStartRow; - //If faking RGBA from grayscale + alpha, copy first channel to second and third - for (int i=0; iformat_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginTARGA.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginTARGA.cpp deleted file mode 100644 index 9e0f610..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginTARGA.cpp +++ /dev/null @@ -1,1596 +0,0 @@ -// ========================================================== -// TARGA Loader and Writer -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Jani Kajala (janik@remedy.fi) -// - Martin Weber (martweb@gmx.net) -// - Machiel ten Brinke (brinkem@uni-one.nl) -// - Peter Lemmens (peter.lemmens@planetinternet.be) -// - Hervé Drolon (drolon@infonie.fr) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Constants + headers -// ---------------------------------------------------------- - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -typedef struct tagTGAHEADER { - BYTE id_length; //! length of the image ID field - BYTE color_map_type; //! whether a color map is included - BYTE image_type; //! compression and color types - - WORD cm_first_entry; //! first entry index (offset into the color map table) - WORD cm_length; //! color map length (number of entries) - BYTE cm_size; //! color map entry size, in bits (number of bits per pixel) - - WORD is_xorigin; //! X-origin of image (absolute coordinate of lower-left corner for displays where origin is at the lower left) - WORD is_yorigin; //! Y-origin of image (as for X-origin) - WORD is_width; //! image width - WORD is_height; //! image height - BYTE is_pixel_depth; //! bits per pixel - BYTE is_image_descriptor; //! image descriptor, bits 3-0 give the alpha channel depth, bits 5-4 give direction -} TGAHEADER; - -typedef struct tagTGAEXTENSIONAREA { - WORD extension_size; // Size in bytes of the extension area, always 495 - char author_name[41]; // Name of the author. If not used, bytes should be set to NULL (\0) or spaces - char author_comments[324]; // A comment, organized as four lines, each consisting of 80 characters plus a NULL - WORD datetime_stamp[6]; // Date and time at which the image was created - char job_name[41]; // Job ID - WORD job_time[3]; // Hours, minutes and seconds spent creating the file (for billing, etc.) - char software_id[41]; // The application that created the file - BYTE software_version[3]; - DWORD key_color; - WORD pixel_aspect_ratio[2]; - WORD gamma_value[2]; - DWORD color_correction_offset; // Number of bytes from the beginning of the file to the color correction table if present - DWORD postage_stamp_offset; // Number of bytes from the beginning of the file to the postage stamp image if present - DWORD scan_line_offset; // Number of bytes from the beginning of the file to the scan lines table if present - BYTE attributes_type; // Specifies the alpha channel -} TGAEXTENSIONAREA; - -typedef struct tagTGAFOOTER { - DWORD extension_offset; // extension area offset : offset in bytes from the beginning of the file - DWORD developer_offset; // developer directory offset : offset in bytes from the beginning of the file - char signature[18]; // signature string : contains "TRUEVISION-XFILE.\0" -} TGAFOOTER; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif - -static const char *FI_MSG_ERROR_CORRUPTED = "Image data corrupted"; - -// ---------------------------------------------------------- -// Image type -// -#define TGA_NULL 0 // no image data included -#define TGA_CMAP 1 // uncompressed, color-mapped image -#define TGA_RGB 2 // uncompressed, true-color image -#define TGA_MONO 3 // uncompressed, black-and-white image -#define TGA_RLECMAP 9 // run-length encoded, color-mapped image -#define TGA_RLERGB 10 // run-length encoded, true-color image -#define TGA_RLEMONO 11 // run-length encoded, black-and-white image -#define TGA_CMPCMAP 32 // compressed (Huffman/Delta/RLE) color-mapped image (e.g., VDA/D) - Obsolete -#define TGA_CMPCMAP4 33 // compressed (Huffman/Delta/RLE) color-mapped four pass image (e.g., VDA/D) - Obsolete - -// ========================================================== -// Thumbnail functions -// ========================================================== - -class TargaThumbnail -{ -public: - TargaThumbnail() : _w(0), _h(0), _depth(0), _data(NULL) { - } - ~TargaThumbnail() { - if(_data) { - free(_data); - } - } - - BOOL isNull() const { - return (_data == NULL); - } - - BOOL read(FreeImageIO *io, fi_handle handle, size_t size) { - io->read_proc(&_w, 1, 1, handle); - io->read_proc(&_h, 1, 1, handle); - - const size_t sizeofData = size - 2; - _data = (BYTE*)malloc(sizeofData); - if(_data) { - return (io->read_proc(_data, 1, (unsigned)sizeofData, handle) == sizeofData); - } - return FALSE; - } - - void setDepth(BYTE dp) { - _depth = dp; - } - - FIBITMAP* toFIBITMAP(); - -private: - BYTE _w; - BYTE _h; - BYTE _depth; - BYTE* _data; -}; - -#ifdef FREEIMAGE_BIGENDIAN -static void -swapShortPixels(FIBITMAP* dib) { - if(FreeImage_GetImageType(dib) != FIT_BITMAP) { - return; - } - - const unsigned Bpp = FreeImage_GetBPP(dib)/8; - if(Bpp != 2) { - return; - } - - BYTE* bits = FreeImage_GetBits(dib); - const unsigned height = FreeImage_GetHeight(dib); - const unsigned pitch = FreeImage_GetPitch(dib); - - BYTE* line = bits; - for(unsigned y = 0; y < height; y++, line += pitch) { - for(BYTE* pixel = line; pixel < line + pitch ; pixel += Bpp) { - SwapShort((WORD*)pixel); - } - } -} -#endif // FREEIMAGE_BIGENDIAN - -FIBITMAP* TargaThumbnail::toFIBITMAP() { - if(isNull() || _depth == 0) { - return NULL; - } - - const unsigned line_size = _depth * _w / 8; - FIBITMAP* dib = FreeImage_Allocate(_w, _h, _depth); - if(!dib) { - return NULL; - } - - const BYTE* line = _data; - const BYTE height = _h; - for (BYTE h = 0; h < height; ++h, line += line_size) { - BYTE* dst_line = FreeImage_GetScanLine(dib, height - 1 - h); - memcpy(dst_line, line, line_size); - } - -#ifdef FREEIMAGE_BIGENDIAN - swapShortPixels(dib); -#endif - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - SwapRedBlue32(dib); -#endif - - return dib; -} -// ========================================================== -// Internal functions -// ========================================================== - -/** This class is used when loading RLE compressed images, it implements io cache of fixed size. - In general RLE compressed images *should* be compressed line by line with line sizes stored in Scan Line Table section. - In reality, however there are images not obeying the specification, compressing image data continuously across lines, - making it impossible to load the file cached at every line. -*/ -class IOCache -{ -public: - IOCache(FreeImageIO *io, fi_handle handle, size_t size) : - _ptr(NULL), _begin(NULL), _end(NULL), _size(size), _io(io), _handle(handle) { - _begin = (BYTE*)malloc(size); - if (_begin) { - _end = _begin + _size; - _ptr = _end; // will force refill on first access - } - } - - ~IOCache() { - if (_begin != NULL) { - free(_begin); - } - } - - BOOL isNull() { return _begin == NULL;} - - inline - BYTE getByte() { - if (_ptr >= _end) { - // need refill - _ptr = _begin; - _io->read_proc(_ptr, sizeof(BYTE), (unsigned)_size, _handle); //### EOF - no problem? - } - - BYTE result = *_ptr; - - _ptr++; - - return result; - } - - inline - BYTE* getBytes(size_t count /*must be < _size!*/) { - if (_ptr + count >= _end) { - - // need refill - - // 'count' bytes might span two cache bounds, - // SEEK back to add the remains of the current cache again into the new one - - long read = long(_ptr - _begin); - long remaining = long(_size - read); - - _io->seek_proc(_handle, -remaining, SEEK_CUR); - - _ptr = _begin; - _io->read_proc(_ptr, sizeof(BYTE), (unsigned)_size, _handle); //### EOF - no problem? - } - - BYTE *result = _ptr; - - _ptr += count; - - return result; - } - -private: - IOCache& operator=(const IOCache& src); // deleted - IOCache(const IOCache& other); // deleted - -private: - BYTE *_ptr; - BYTE *_begin; - BYTE *_end; - const size_t _size; - const FreeImageIO *_io; - const fi_handle _handle; -}; - -#ifdef FREEIMAGE_BIGENDIAN -static void -SwapHeader(TGAHEADER *header) { - SwapShort(&header->cm_first_entry); - SwapShort(&header->cm_length); - SwapShort(&header->is_xorigin); - SwapShort(&header->is_yorigin); - SwapShort(&header->is_width); - SwapShort(&header->is_height); -} - -static void -SwapExtensionArea(TGAEXTENSIONAREA *ex) { - SwapShort(&ex->extension_size); - SwapShort(&ex->datetime_stamp[0]); - SwapShort(&ex->datetime_stamp[1]); - SwapShort(&ex->datetime_stamp[2]); - SwapShort(&ex->datetime_stamp[3]); - SwapShort(&ex->datetime_stamp[4]); - SwapShort(&ex->datetime_stamp[5]); - SwapShort(&ex->job_time[0]); - SwapShort(&ex->job_time[1]); - SwapShort(&ex->job_time[2]); - SwapLong (&ex->key_color); - SwapShort(&ex->pixel_aspect_ratio[0]); - SwapShort(&ex->pixel_aspect_ratio[1]); - SwapShort(&ex->gamma_value[0]); - SwapShort(&ex->gamma_value[1]); - SwapLong (&ex->color_correction_offset); - SwapLong (&ex->postage_stamp_offset); - SwapLong (&ex->scan_line_offset); -} - -static void -SwapFooter(TGAFOOTER *footer) { - SwapLong(&footer->extension_offset); - SwapLong(&footer->developer_offset); -} - -#endif // FREEIMAGE_BIGENDIAN - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "TARGA"; -} - -static const char * DLL_CALLCONV -Description() { - return "Truevision Targa"; -} - -static const char * DLL_CALLCONV -Extension() { - return "tga,targa"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-tga"; -} - -static BOOL -isTARGA20(FreeImageIO *io, fi_handle handle) { - const unsigned sizeofSig = 18; - BYTE signature[sizeofSig] = { 0 }; - // tga_signature = "TRUEVISION-XFILE." (TGA 2.0 only) - BYTE tga_signature[sizeofSig] = { 84, 82, 85, 69, 86, 73, 83, 73, 79, 78, 45, 88, 70, 73, 76, 69, 46, 0 }; - // get the start offset - const long start_offset = io->tell_proc(handle); - // get the end-of-file - io->seek_proc(handle, 0, SEEK_END); - const long eof = io->tell_proc(handle); - // read the signature - const long start_of_signature = start_offset + eof - sizeofSig; - if (start_of_signature > 0) { - io->seek_proc(handle, start_of_signature, SEEK_SET); - io->read_proc(&signature, 1, sizeofSig, handle); - } - // rewind - io->seek_proc(handle, start_offset, SEEK_SET); - - return (memcmp(tga_signature, signature, sizeofSig) == 0); -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - if(isTARGA20(io, handle)) { - return TRUE; - } - - // not a 2.0 image, try testing if it's a valid TGA anyway (not robust) - { - const long start_offset = io->tell_proc(handle); - - // get the header - TGAHEADER header; - if (io->read_proc(&header, sizeof(tagTGAHEADER), 1, handle) < 1) { - return FALSE; - } -#ifdef FREEIMAGE_BIGENDIAN - SwapHeader(&header); -#endif - // rewind - io->seek_proc(handle, start_offset, SEEK_SET); - - // the color map type should be a 0 or a 1... - if(header.color_map_type != 0 && header.color_map_type != 1) { - return FALSE; - } - // if the color map type is 1 then we validate the map entry information... - if(header.color_map_type == 1) { - // it doesn't make any sense if the first entry is larger than the color map table - if(header.cm_first_entry >= header.cm_length) { - return FALSE; - } - // check header.cm_size, don't allow 0 or anything bigger than 32 - if(header.cm_size == 0 || header.cm_size > 32) { - return FALSE; - } - } - // the width/height shouldn't be 0, right ? - if(header.is_width == 0 || header.is_height == 0) { - return FALSE; - } - // let's now verify all the types that are supported by FreeImage (this is our final verification) - switch(header.image_type) { - case TGA_CMAP: - case TGA_RGB: - case TGA_MONO: - case TGA_RLECMAP: - case TGA_RLERGB: - case TGA_RLEMONO: - switch(header.is_pixel_depth) { - case 8 : - case 16: - case 24: - case 32: - return TRUE; - default: - return FALSE; - } - break; - default: - return FALSE; - } - } -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 8) || - (depth == 16) || - (depth == 24) || - (depth == 32) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return (type == FIT_BITMAP) ? TRUE : FALSE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -/** -Used for all 32 and 24 bit loading of uncompressed images -*/ -static void -loadTrueColor(FIBITMAP* dib, int width, int height, int file_pixel_size, FreeImageIO* io, fi_handle handle, BOOL as24bit) { - const int pixel_size = as24bit ? 3 : file_pixel_size; - - // input line cache - BYTE* file_line = (BYTE*)malloc( width * file_pixel_size); - - if (!file_line) { - throw FI_MSG_ERROR_MEMORY; - } - - for (int y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - io->read_proc(file_line, file_pixel_size, width, handle); - BYTE *bgra = file_line; - - for (int x = 0; x < width; x++) { - - bits[FI_RGBA_BLUE] = bgra[0]; - bits[FI_RGBA_GREEN] = bgra[1]; - bits[FI_RGBA_RED] = bgra[2]; - - if (!as24bit) { - bits[FI_RGBA_ALPHA] = bgra[3]; - } - - bgra += file_pixel_size; - - bits += pixel_size; - } - } - - free(file_line); -} - -/** -For the generic RLE loader we need to abstract away the pixel format. -We use a specific overload based on bits-per-pixel for each type of pixel -*/ - -template -inline static void -_assignPixel(BYTE* bits, BYTE* val, BOOL as24bit = FALSE) { - // static assert should go here - assert(FALSE); -} - -template <> -inline void -_assignPixel<8>(BYTE* bits, BYTE* val, BOOL as24bit) { - *bits = *val; -} - -template <> -inline void -_assignPixel<16>(BYTE* bits, BYTE* val, BOOL as24bit) { - WORD value(*reinterpret_cast(val)); - -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&value); -#endif - - if (as24bit) { - bits[FI_RGBA_BLUE] = (BYTE)((((value & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) * 0xFF) / 0x1F); - bits[FI_RGBA_GREEN] = (BYTE)((((value & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) * 0xFF) / 0x1F); - bits[FI_RGBA_RED] = (BYTE)((((value & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) * 0xFF) / 0x1F); - - } else { - *reinterpret_cast(bits) = 0x7FFF & value; - } -} - -template <> -inline void -_assignPixel<24>(BYTE* bits, BYTE* val, BOOL as24bit) { - bits[FI_RGBA_BLUE] = val[0]; - bits[FI_RGBA_GREEN] = val[1]; - bits[FI_RGBA_RED] = val[2]; -} - -template <> -inline void -_assignPixel<32>(BYTE* bits, BYTE* val, BOOL as24bit) { - if (as24bit) { - _assignPixel<24>(bits, val, TRUE); - - } else { -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - *(reinterpret_cast(bits)) = *(reinterpret_cast (val)); -#else // NOTE This is faster then doing reinterpret_cast to int + INPLACESWAP ! - bits[FI_RGBA_BLUE] = val[0]; - bits[FI_RGBA_GREEN] = val[1]; - bits[FI_RGBA_RED] = val[2]; - bits[FI_RGBA_ALPHA] = val[3]; -#endif - } -} - -/** -Generic RLE loader -*/ -template -static void -loadRLE(FIBITMAP* dib, int width, int height, FreeImageIO* io, fi_handle handle, long eof, BOOL as24bit) { - const int file_pixel_size = bPP/8; - const int pixel_size = as24bit ? 3 : file_pixel_size; - - const BYTE bpp = as24bit ? 24 : bPP; - const int line_size = CalculateLine(width, bpp); - - // Note, many of the params can be computed inside the function. - // However, because this is a template function, it will lead to redundant code duplication. - - BYTE rle; - BYTE *line_bits; - - // this is used to guard against writing beyond the end of the image (on corrupted rle block) - const BYTE* dib_end = FreeImage_GetScanLine(dib, height);//< one-past-end row - - // Compute the rough size of a line... - long pixels_offset = io->tell_proc(handle); - long sz = ((eof - pixels_offset) / height); - - // ...and allocate cache of this size (yields good results) - IOCache cache(io, handle, sz); - if(cache.isNull()) { - FreeImage_Unload(dib); - dib = NULL; - return; - } - - int x = 0, y = 0; - - line_bits = FreeImage_GetScanLine(dib, y); - - while (y < height) { - - rle = cache.getByte(); - - BOOL has_rle = rle & 0x80; - rle &= ~0x80; // remove type-bit - - BYTE packet_count = rle + 1; - - //packet_count might be corrupt, test if we are not about to write beyond the last image bit - - if ((line_bits+x) + packet_count*pixel_size > dib_end) { - FreeImage_OutputMessageProc(s_format_id, FI_MSG_ERROR_CORRUPTED); - // return what is left from the bitmap - return; - } - - if (has_rle) { - - // read a pixel value from file... - BYTE *val = cache.getBytes(file_pixel_size); - - //...and fill packet_count pixels with it - - for (int ix = 0; ix < packet_count; ix++) { - _assignPixel((line_bits+x), val, as24bit); - x += pixel_size; - - if (x >= line_size) { - x = 0; - y++; - line_bits = FreeImage_GetScanLine(dib, y); - } - } - - } else { - // no rle commpresion - - // copy packet_count pixels from file to dib - for (int ix = 0; ix < packet_count; ix++) { - BYTE *val = cache.getBytes(file_pixel_size); - _assignPixel((line_bits+x), val, as24bit); - x += pixel_size; - - if (x >= line_size) { - x = 0; - y++; - line_bits = FreeImage_GetScanLine(dib, y); - } - } //< packet_count - } //< has_rle - - } //< while height - -} - -// -------------------------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - FIBITMAP *dib = NULL; - - if (!handle) { - return NULL; - } - - try { - - const BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - // remember the start offset - long start_offset = io->tell_proc(handle); - - // remember end-of-file (used for RLE cache) - io->seek_proc(handle, 0, SEEK_END); - long eof = io->tell_proc(handle); - io->seek_proc(handle, start_offset, SEEK_SET); - - // read and process the bitmap's footer - - TargaThumbnail thumbnail; - if(isTARGA20(io, handle)) { - TGAFOOTER footer; - const long footer_offset = start_offset + eof - sizeof(footer); - - io->seek_proc(handle, footer_offset, SEEK_SET); - io->read_proc(&footer, sizeof(tagTGAFOOTER), 1, handle); - -#ifdef FREEIMAGE_BIGENDIAN - SwapFooter(&footer); -#endif - BOOL hasExtensionArea = footer.extension_offset > 0; - if(hasExtensionArea) { - TGAEXTENSIONAREA extensionarea; - io->seek_proc(handle, footer.extension_offset, SEEK_SET); - io->read_proc(&extensionarea, sizeof(extensionarea), 1, handle); - -#ifdef FREEIMAGE_BIGENDIAN - SwapExtensionArea(&extensionarea); -#endif - - DWORD postage_stamp_offset = extensionarea.postage_stamp_offset; - BOOL hasThumbnail = (postage_stamp_offset > 0) && (postage_stamp_offset < (DWORD)footer_offset); - if(hasThumbnail) { - io->seek_proc(handle, postage_stamp_offset, SEEK_SET); - thumbnail.read(io, handle, footer_offset - postage_stamp_offset); - } - } - } - - // read and process the bitmap's header - - TGAHEADER header; - - io->seek_proc(handle, start_offset, SEEK_SET); - io->read_proc(&header, sizeof(tagTGAHEADER), 1, handle); - -#ifdef FREEIMAGE_BIGENDIAN - SwapHeader(&header); -#endif - - thumbnail.setDepth(header.is_pixel_depth); - - const int line = CalculateLine(header.is_width, header.is_pixel_depth); - const int pixel_bits = header.is_pixel_depth; - const int pixel_size = pixel_bits/8; - - int fliphoriz = (header.is_image_descriptor & 0x10) ? 1 : 0; - int flipvert = (header.is_image_descriptor & 0x20) ? 1 : 0; - - // skip comment - io->seek_proc(handle, header.id_length, SEEK_CUR); - - switch (header.is_pixel_depth) { - case 8 : { - dib = FreeImage_AllocateHeader(header_only, header.is_width, header.is_height, 8); - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // read the palette (even if header only) - - RGBQUAD *palette = FreeImage_GetPalette(dib); - - if (header.color_map_type > 0) { - unsigned count, csize; - - // calculate the color map size - csize = header.cm_length * header.cm_size / 8; - - // read the color map - BYTE *cmap = (BYTE*)malloc(csize * sizeof(BYTE)); - if (cmap == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - io->read_proc(cmap, sizeof(BYTE), csize, handle); - - // build the palette - - switch (header.cm_size) { - case 16: { - WORD *rgb555 = (WORD*)&cmap[0]; - unsigned start = (unsigned)header.cm_first_entry; - unsigned stop = MIN((unsigned)256, (unsigned)header.cm_length); - - for (count = start; count < stop; count++) { - palette[count].rgbRed = (BYTE)((((*rgb555 & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) * 0xFF) / 0x1F); - palette[count].rgbGreen = (BYTE)((((*rgb555 & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) * 0xFF) / 0x1F); - palette[count].rgbBlue = (BYTE)((((*rgb555 & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) * 0xFF) / 0x1F); - rgb555++; - } - } - break; - - case 24: { - FILE_BGR *bgr = (FILE_BGR*)&cmap[0]; - unsigned start = (unsigned)header.cm_first_entry; - unsigned stop = MIN((unsigned)256, (unsigned)header.cm_length); - - for (count = start; count < stop; count++) { - palette[count].rgbBlue = bgr->b; - palette[count].rgbGreen = bgr->g; - palette[count].rgbRed = bgr->r; - bgr++; - } - } - break; - - case 32: { - BYTE trns[256]; - - // clear the transparency table - memset(trns, 0xFF, 256); - - FILE_BGRA *bgra = (FILE_BGRA*)&cmap[0]; - unsigned start = (unsigned)header.cm_first_entry; - unsigned stop = MIN((unsigned)256, (unsigned)header.cm_length); - - for (count = start; count < stop; count++) { - palette[count].rgbBlue = bgra->b; - palette[count].rgbGreen = bgra->g; - palette[count].rgbRed = bgra->r; - // alpha - trns[count] = bgra->a; - bgra++; - } - - // set the tranparency table - FreeImage_SetTransparencyTable(dib, trns, 256); - } - break; - - } // switch(header.cm_size) - - free(cmap); - } - - // handle thumbnail - - FIBITMAP* th = thumbnail.toFIBITMAP(); - if(th) { - RGBQUAD* pal = FreeImage_GetPalette(dib); - RGBQUAD* dst_pal = FreeImage_GetPalette(th); - if(dst_pal && pal) { - for(unsigned i = 0; i < FreeImage_GetColorsUsed(dib); i++) { - dst_pal[i] = pal[i]; - } - } - - FreeImage_SetTransparencyTable(th, FreeImage_GetTransparencyTable(dib), FreeImage_GetTransparencyCount(dib)); - - FreeImage_SetThumbnail(dib, th); - FreeImage_Unload(th); - } - - if(header_only) { - return dib; - } - - // read in the bitmap bits - - switch (header.image_type) { - case TGA_CMAP: - case TGA_MONO: { - BYTE *bits = NULL; - - for (unsigned count = 0; count < header.is_height; count++) { - bits = FreeImage_GetScanLine(dib, count); - io->read_proc(bits, sizeof(BYTE), line, handle); - } - } - break; - - case TGA_RLECMAP: - case TGA_RLEMONO: { //(8 bit) - loadRLE<8>(dib, header.is_width, header.is_height, io, handle, eof, FALSE); - } - break; - - default : - FreeImage_Unload(dib); - return NULL; - } - } - break; // header.is_pixel_depth == 8 - - case 15 : - - case 16 : { - int pixel_bits = 16; - - // allocate the dib - - if (TARGA_LOAD_RGB888 & flags) { - pixel_bits = 24; - dib = FreeImage_AllocateHeader(header_only, header.is_width, header.is_height, pixel_bits, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - - } else { - dib = FreeImage_AllocateHeader(header_only, header.is_width, header.is_height, pixel_bits, FI16_555_RED_MASK, FI16_555_GREEN_MASK, FI16_555_BLUE_MASK); - } - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // handle thumbnail - - FIBITMAP* th = thumbnail.toFIBITMAP(); - if(th) { - if(TARGA_LOAD_RGB888 & flags) { - FIBITMAP* t = FreeImage_ConvertTo24Bits(th); - FreeImage_Unload(th); - th = t; - } - - FreeImage_SetThumbnail(dib, th); - FreeImage_Unload(th); - } - - if(header_only) { - return dib; - } - - int line = CalculateLine(header.is_width, pixel_bits); - - const unsigned pixel_size = unsigned(pixel_bits) / 8; - const unsigned src_pixel_size = sizeof(WORD); - - // note header.cm_size is a misleading name, it should be seen as header.cm_bits - // ignore current position in file and set filepointer explicitly from the beginning of the file - - int garblen = 0; - - if (header.color_map_type != 0) { - garblen = (int)((header.cm_size + 7) / 8) * header.cm_length; /* should byte align */ - - } else { - garblen = 0; - } - - io->seek_proc(handle, start_offset, SEEK_SET); - io->seek_proc(handle, sizeof(tagTGAHEADER) + header.id_length + garblen, SEEK_SET); - - // read in the bitmap bits - - switch (header.image_type) { - case TGA_RGB: { //(16 bit) - // input line cache - BYTE *in_line = (BYTE*)malloc(header.is_width * sizeof(WORD)); - - if (!in_line) - throw FI_MSG_ERROR_MEMORY; - - const int h = header.is_height; - - for (int y = 0; y < h; y++) { - - BYTE *bits = FreeImage_GetScanLine(dib, y); - io->read_proc(in_line, src_pixel_size, header.is_width, handle); - - BYTE *val = in_line; - for (int x = 0; x < line; x += pixel_size) { - - _assignPixel<16>(bits+x, val, TARGA_LOAD_RGB888 & flags); - - val += src_pixel_size; - } - } - - free(in_line); - } - break; - - case TGA_RLERGB: { //(16 bit) - loadRLE<16>(dib, header.is_width, header.is_height, io, handle, eof, TARGA_LOAD_RGB888 & flags); - } - break; - - default : - FreeImage_Unload(dib); - return NULL; - } - } - break; // header.is_pixel_depth == 15 or 16 - - case 24 : { - - dib = FreeImage_AllocateHeader(header_only, header.is_width, header.is_height, pixel_bits, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - FIBITMAP* th = thumbnail.toFIBITMAP(); - if(th) { - FreeImage_SetThumbnail(dib, th); - FreeImage_Unload(th); - } - - if(header_only) { - return dib; - } - - // read in the bitmap bits - - switch (header.image_type) { - case TGA_RGB: { //(24 bit) - //uncompressed - loadTrueColor(dib, header.is_width, header.is_height, pixel_size,io, handle, TRUE); - } - break; - - case TGA_RLERGB: { //(24 bit) - loadRLE<24>(dib, header.is_width, header.is_height, io, handle, eof, TRUE); - } - break; - - default : - FreeImage_Unload(dib); - return NULL; - } - } - break; // header.is_pixel_depth == 24 - - case 32 : { - int pixel_bits = 32; - - if (TARGA_LOAD_RGB888 & flags) { - pixel_bits = 24; - } - - dib = FreeImage_AllocateHeader(header_only, header.is_width, header.is_height, pixel_bits, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - - if (dib == NULL) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // handle thumbnail - - FIBITMAP* th = thumbnail.toFIBITMAP(); - if(th) { - if(TARGA_LOAD_RGB888 & flags) { - FIBITMAP* t = FreeImage_ConvertTo24Bits(th); - FreeImage_Unload(th); - th = t; - } - FreeImage_SetThumbnail(dib, th); - FreeImage_Unload(th); - } - - if(header_only) { - return dib; - } - - // read in the bitmap bits - - switch (header.image_type) { - case TGA_RGB: { //(32 bit) - // uncompressed - loadTrueColor(dib, header.is_width, header.is_height, 4 /*file_pixel_size*/, io, handle, TARGA_LOAD_RGB888 & flags); - } - break; - - case TGA_RLERGB: { //(32 bit) - loadRLE<32>(dib, header.is_width, header.is_height, io, handle, eof, TARGA_LOAD_RGB888 & flags); - } - break; - - default : - FreeImage_Unload(dib); - return NULL; - } - } - break; // header.is_pixel_depth == 32 - - } // switch(header.is_pixel_depth) - - if (flipvert) { - FreeImage_FlipVertical(dib); - } - - if (fliphoriz) { - FreeImage_FlipHorizontal(dib); - } - - return dib; - - } catch (const char *message) { - if (dib) { - FreeImage_Unload(dib); - } - - FreeImage_OutputMessageProc(s_format_id, message); - - return NULL; - } -} - -// -------------------------------------------------------------------------- - -static BOOL -hasValidThumbnail(FIBITMAP* dib) { - FIBITMAP* thumbnail = FreeImage_GetThumbnail(dib); - - return thumbnail - && SupportsExportType(FreeImage_GetImageType(thumbnail)) - && SupportsExportDepth(FreeImage_GetBPP(thumbnail)) - // Requirements according to the specification: - && FreeImage_GetBPP(thumbnail) == FreeImage_GetBPP(dib) - && FreeImage_GetImageType(thumbnail) == FreeImage_GetImageType(dib) - && FreeImage_GetWidth(thumbnail) <= 255 - && FreeImage_GetHeight(thumbnail) <= 255; -} - -/** -Writes the ready RLE packet to buffer -*/ -static inline void -flushPacket(BYTE*& dest, unsigned pixel_size, BYTE* packet_begin, BYTE*& packet, BYTE& packet_count, BOOL& has_rle) { - if (packet_count) { - const BYTE type_bit = has_rle ? 0x80 : 0x0; - const BYTE write_count = has_rle ? 1 : packet_count; - - // build packet header: zero-based count + type bit - assert(packet_count >= 1); - BYTE rle = packet_count - 1; - rle |= type_bit; - - // write packet header - *dest = rle; - ++dest; - - // write packet data - memcpy(dest, packet_begin, write_count * pixel_size); - dest += write_count * pixel_size; - - // reset state - packet_count = 0; - packet = packet_begin; - has_rle = FALSE; - } -} - - -static inline void -writeToPacket(BYTE* packet, BYTE* pixel, unsigned pixel_size) { - // Take care of channel and byte order here, because packet will be flushed straight to the file - switch (pixel_size) { - case 1: - *packet = *pixel; - break; - - case 2: { - WORD val(*(WORD*)pixel); -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&val); -#endif - *(WORD*)packet = val; - } - break; - - case 3: { - packet[0] = pixel[FI_RGBA_BLUE]; - packet[1] = pixel[FI_RGBA_GREEN]; - packet[2] = pixel[FI_RGBA_RED]; - } - break; - - case 4: { -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - *(reinterpret_cast(packet)) = *(reinterpret_cast (pixel)); -#else - packet[0] = pixel[FI_RGBA_BLUE]; - packet[1] = pixel[FI_RGBA_GREEN]; - packet[2] = pixel[FI_RGBA_RED]; - packet[3] = pixel[FI_RGBA_ALPHA]; -#endif - } - break; - - default: - assert(FALSE); - } -} - -static inline BOOL -isEqualPixel(BYTE* lhs, BYTE* rhs, unsigned pixel_size) { - switch (pixel_size) { - case 1: - return *lhs == *rhs; - - case 2: - return *(WORD*)lhs == *(WORD*)rhs; - - case 3: - return *(WORD*)lhs == *(WORD*)rhs && lhs[2] == rhs[2]; - - case 4: - return *(unsigned*)lhs == *(unsigned*)rhs; - - default: - assert(FALSE); - return FALSE; - } -} - -static void -saveRLE(FIBITMAP* dib, FreeImageIO* io, fi_handle handle) { - // Image is compressed line by line, packets don't span multiple lines (TGA2.0 recommendation) - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - const unsigned pixel_size = FreeImage_GetBPP(dib)/8; - const unsigned line_size = FreeImage_GetLine(dib); - - const BYTE max_packet_size = 128; - BYTE packet_count = 0; - BOOL has_rle = FALSE; - - // packet (compressed or not) to be written to line - - BYTE* const packet_begin = (BYTE*)malloc(max_packet_size * pixel_size); - BYTE* packet = packet_begin; - - // line to be written to disk - // Note: we need some extra bytes for anti-commpressed lines. The worst case is: - // 8 bit images were every 3th pixel is different. - // Rle packet becomes two pixels, but nothing is compressed: two byte pixels are transformed into byte header and byte pixel value - // After every rle packet there is a non-rle packet of one pixel: an extra byte for the header will be added for it - // In the end we gain no bytes from compression, but also must insert a byte at every 3th pixel - - // add extra space for anti-commpressed lines - size_t extra_space = (size_t)ceil(width / 3.0); - BYTE* const line_begin = (BYTE*)malloc(width * pixel_size + extra_space); - BYTE* line = line_begin; - - BYTE *current = (BYTE*)malloc(pixel_size); - BYTE *next = (BYTE*)malloc(pixel_size); - - for(unsigned y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - - // rewind line pointer - line = line_begin; - - for(unsigned x = 0; x < line_size; x += pixel_size) { - - AssignPixel(current, (bits + x), pixel_size); - - // read next pixel from dib - - if( x + 1*pixel_size < line_size) { - AssignPixel(next, (bits + x + 1*pixel_size), pixel_size); - - } else { - // last pixel in line - - // include current pixel and flush - if(!has_rle) { - - writeToPacket(packet, current, pixel_size); - packet += pixel_size; - - } - - assert(packet_count < max_packet_size); - - ++packet_count; - - flushPacket(line, pixel_size, packet_begin, packet, packet_count, has_rle); - - // start anew on next line - break; - } - - if(isEqualPixel(current, next, pixel_size)) { - - // has rle - - if(!has_rle) { - // flush non rle packet - - flushPacket(line, pixel_size, packet_begin, packet, packet_count, has_rle); - - // start a rle packet - - has_rle = TRUE; - - writeToPacket(packet, current, pixel_size); - packet += pixel_size; - } - - // otherwise do nothing. We will just increase the count at the end - - } else { - - // no rle - - if(has_rle) { - // flush rle packet - - // include current pixel first - assert(packet_count < max_packet_size); - ++packet_count; - - flushPacket(line, pixel_size, packet_begin, packet, packet_count, has_rle); - - // start anew on the next pixel - continue; - - } else { - - writeToPacket(packet, current, pixel_size); - packet += pixel_size; - } - - } - - // increase counter on every pixel - - ++packet_count; - - if(packet_count == max_packet_size) { - flushPacket(line, pixel_size, packet_begin, packet, packet_count, has_rle); - } - - }//for width - - // write line to disk - io->write_proc(line_begin, 1, (unsigned)(line - line_begin), handle); - - }//for height - - free(line_begin); - free(packet_begin); - free(current); - free(next); -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - if ((dib == NULL) || (handle == NULL)) { - return FALSE; - } - - RGBQUAD *palette = FreeImage_GetPalette(dib); - const unsigned bpp = FreeImage_GetBPP(dib); - - // write the file header - - TGAHEADER header; - - header.id_length = 0; - header.cm_first_entry = 0; - header.is_xorigin = 0; - header.is_yorigin = 0; - header.is_width = (WORD)FreeImage_GetWidth(dib); - header.is_height = (WORD)FreeImage_GetHeight(dib); - header.is_pixel_depth = (BYTE)bpp; - header.is_image_descriptor = (bpp == 32 ? 8 : 0); - - if (palette) { - header.color_map_type = 1; - header.image_type = (TARGA_SAVE_RLE & flags) ? TGA_RLECMAP : TGA_CMAP; - header.cm_length = (WORD)(1 << bpp); - - if (FreeImage_IsTransparent(dib)) { - header.cm_size = 32; - } else { - header.cm_size = 24; - } - - } else { - header.color_map_type = 0; - header.image_type = (TARGA_SAVE_RLE & flags) ? TGA_RLERGB : TGA_RGB; - header.cm_length = 0; - header.cm_size = 0; - } - - // write the header - -#ifdef FREEIMAGE_BIGENDIAN - SwapHeader(&header); -#endif - - io->write_proc(&header, sizeof(header), 1, handle); - -#ifdef FREEIMAGE_BIGENDIAN - SwapHeader(&header); -#endif - - // write the palette - - if (palette) { - if (FreeImage_IsTransparent(dib)) { - FILE_BGRA *bgra_pal = (FILE_BGRA*)malloc(header.cm_length * sizeof(FILE_BGRA)); - - // get the transparency table - BYTE *trns = FreeImage_GetTransparencyTable(dib); - - for (unsigned i = 0; i < header.cm_length; i++) { - bgra_pal[i].b = palette[i].rgbBlue; - bgra_pal[i].g = palette[i].rgbGreen; - bgra_pal[i].r = palette[i].rgbRed; - bgra_pal[i].a = trns[i]; - } - - io->write_proc(bgra_pal, sizeof(FILE_BGRA), header.cm_length, handle); - - free(bgra_pal); - - } else { - FILE_BGR *bgr_pal = (FILE_BGR*)malloc(header.cm_length * sizeof(FILE_BGR)); - - for (unsigned i = 0; i < header.cm_length; i++) { - bgr_pal[i].b = palette[i].rgbBlue; - bgr_pal[i].g = palette[i].rgbGreen; - bgr_pal[i].r = palette[i].rgbRed; - } - - io->write_proc(bgr_pal, sizeof(FILE_BGR), header.cm_length, handle); - - free(bgr_pal); - } - } - - // write the data bits - - - if (TARGA_SAVE_RLE & flags) { - - saveRLE(dib, io, handle); - - } else { - - // -- no rle compression -- - - const unsigned width = header.is_width; - const unsigned height = header.is_height; - const unsigned pixel_size = bpp/8; - - BYTE *line, *const line_begin = (BYTE*)malloc(width * pixel_size); - BYTE *line_source = line_begin; - - for (unsigned y = 0; y < height; y++) { - BYTE *scanline = FreeImage_GetScanLine(dib, y); - - // rewind the line pointer - line = line_begin; - - switch (bpp) { - case 8: { - // don't copy line, read straight from dib - line_source = scanline; - } - break; - - case 16: { - for (unsigned x = 0; x < width; x++) { - WORD pixel = *(((WORD *)scanline) + x); - -#ifdef FREEIMAGE_BIGENDIAN - SwapShort(&pixel); -#endif - *(WORD*)line = pixel; - - line += pixel_size; - } - } - break; - - case 24: { - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - line_source = scanline; -#else - for (unsigned x = 0; x < width; ++x) { - RGBTRIPLE* trip = ((RGBTRIPLE *)scanline) + x; - line[0] = trip->rgbtBlue; - line[1] = trip->rgbtGreen; - line[2] = trip->rgbtRed; - - line += pixel_size; - } -#endif - } - break; - - case 32: { - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - line_source = scanline; -#else - for (unsigned x = 0; x < width; ++x) { - RGBQUAD* quad = ((RGBQUAD *)scanline) + x; - line[0] = quad->rgbBlue; - line[1] = quad->rgbGreen; - line[2] = quad->rgbRed; - line[3] = quad->rgbReserved; - - line += pixel_size; - } -#endif - } - break; - - }//switch(bpp) - - // write line to disk - - io->write_proc(line_source, pixel_size, width, handle); - - }//for height - - free(line_begin); - } - - - long extension_offset = 0 ; - if(hasValidThumbnail(dib)) { - // write extension area - - extension_offset = io->tell_proc(handle); - - TGAEXTENSIONAREA ex; - memset(&ex, 0, sizeof(ex)); - - assert(sizeof(ex) == 495); - ex.extension_size = sizeof(ex); - ex.postage_stamp_offset = extension_offset + ex.extension_size + 0 /*< no Scan Line Table*/; - ex.attributes_type = FreeImage_GetBPP(dib) == 32 ? 3 /*< useful Alpha channel data*/ : 0 /*< no Alpha data*/; - -#ifdef FREEIMAGE_BIGENDIAN - SwapExtensionArea(&ex); -#endif - - io->write_proc(&ex, sizeof(ex), 1, handle); - - // (no Scan Line Table) - - // write thumbnail - - io->seek_proc(handle, ex.postage_stamp_offset, SEEK_SET); - - FIBITMAP* thumbnail = FreeImage_GetThumbnail(dib); - BYTE width = (BYTE)FreeImage_GetWidth(thumbnail); - BYTE height = (BYTE)FreeImage_GetHeight(thumbnail); - - io->write_proc(&width, 1, 1, handle); - io->write_proc(&height, 1, 1, handle); - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB - SwapRedBlue32(dib); -#endif - -#ifdef FREEIMAGE_BIGENDIAN - swapShortPixels(dib); -#endif - - const unsigned line_size = FreeImage_GetLine(thumbnail); - - for (BYTE h = 0; h < height; ++h) { - BYTE* src_line = FreeImage_GetScanLine(thumbnail, height - 1 - h); - io->write_proc(src_line, 1, line_size, handle); - } - } - - // (no Color Correction Table) - - // write the footer - - TGAFOOTER footer; - footer.extension_offset = extension_offset; - footer.developer_offset = 0; - strcpy(footer.signature, "TRUEVISION-XFILE."); - - -#ifdef FREEIMAGE_BIGENDIAN - SwapFooter(&footer); -#endif - - io->write_proc(&footer, sizeof(footer), 1, handle); - - return TRUE; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitTARGA(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginTIFF.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginTIFF.cpp deleted file mode 100644 index 5068d94..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginTIFF.cpp +++ /dev/null @@ -1,2675 +0,0 @@ -// ========================================================== -// TIFF Loader and Writer -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Hervé Drolon (drolon@infonie.fr) -// - Markus Loibl (markus.loibl@epost.de) -// - Luca Piergentili (l.pierge@terra.es) -// - Detlev Vendt (detlev.vendt@brillit.de) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#ifdef unix -#undef unix -#endif -#ifdef __unix -#undef __unix -#endif - -#include "FreeImage.h" -#include "Utilities.h" -#include "../LibTIFF4/tiffiop.h" -#include "../Metadata/FreeImageTag.h" -#include "../OpenEXR/Half/half.h" - -#include "FreeImageIO.h" -#include "PSDParser.h" - -// -------------------------------------------------------------------------- -// GeoTIFF profile (see XTIFF.cpp) -// -------------------------------------------------------------------------- -void XTIFFInitialize(); -BOOL tiff_read_geotiff_profile(TIFF *tif, FIBITMAP *dib); -BOOL tiff_write_geotiff_profile(TIFF *tif, FIBITMAP *dib); - -// -------------------------------------------------------------------------- -// TIFF Exif profile (see XTIFF.cpp) -// ---------------------------------------------------------- -BOOL tiff_read_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib); -BOOL tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib); - -// -------------------------------------------------------------------------- -// LogLuv conversion functions interface (see TIFFLogLuv.cpp) -// -------------------------------------------------------------------------- -void tiff_ConvertLineXYZToRGB(BYTE *target, BYTE *source, double stonits, int width_in_pixels); -void tiff_ConvertLineRGBToXYZ(BYTE *target, BYTE *source, int width_in_pixels); - -// ---------------------------------------------------------- - -/** Supported loading methods */ -typedef enum { - LoadAsRBGA = 0, - LoadAsCMYK = 1, - LoadAs8BitTrns = 2, - LoadAsGenericStrip = 3, - LoadAsTiled = 4, - LoadAsLogLuv = 5, - LoadAsHalfFloat = 6 -} TIFFLoadMethod; - -// ---------------------------------------------------------- -// local prototypes -// ---------------------------------------------------------- - -static tmsize_t _tiffReadProc(thandle_t handle, void* buf, tmsize_t size); -static tmsize_t _tiffWriteProc(thandle_t handle, void* buf, tmsize_t size); -static toff_t _tiffSeekProc(thandle_t handle, toff_t off, int whence); -static int _tiffCloseProc(thandle_t fd); -static int _tiffMapProc(thandle_t fd, void** pbase, toff_t* psize); -static void _tiffUnmapProc(thandle_t fd, void* base, toff_t size); - -static uint16 CheckColormap(int n, uint16* r, uint16* g, uint16* b); -static uint16 GetPhotometric(FIBITMAP *dib); - -static void ReadResolution(TIFF *tiff, FIBITMAP *dib); -static void WriteResolution(TIFF *tiff, FIBITMAP *dib); - -static void ReadPalette(TIFF *tiff, uint16 photometric, uint16 bitspersample, FIBITMAP *dib); - -static FIBITMAP* CreateImageType(BOOL header_only, FREE_IMAGE_TYPE fit, int width, int height, uint16 bitspersample, uint16 samplesperpixel); -static FREE_IMAGE_TYPE ReadImageType(TIFF *tiff, uint16 bitspersample, uint16 samplesperpixel); -static void WriteImageType(TIFF *tiff, FREE_IMAGE_TYPE fit); - -static void WriteCompression(TIFF *tiff, uint16 bitspersample, uint16 samplesperpixel, uint16 photometric, int flags); - -static BOOL tiff_read_iptc_profile(TIFF *tiff, FIBITMAP *dib); -static BOOL tiff_read_xmp_profile(TIFF *tiff, FIBITMAP *dib); -static BOOL tiff_read_exif_profile(FreeImageIO *io, fi_handle handle, TIFF *tiff, FIBITMAP *dib); -static void ReadMetadata(FreeImageIO *io, fi_handle handle, TIFF *tiff, FIBITMAP *dib); - -static BOOL tiff_write_iptc_profile(TIFF *tiff, FIBITMAP *dib); -static BOOL tiff_write_xmp_profile(TIFF *tiff, FIBITMAP *dib); -static void WriteMetadata(TIFF *tiff, FIBITMAP *dib); - -static TIFFLoadMethod FindLoadMethod(TIFF *tif, uint16 photometric, uint16 bitspersample, uint16 samplesperpixel, FREE_IMAGE_TYPE image_type, int flags); - -static void ReadThumbnail(FreeImageIO *io, fi_handle handle, void *data, TIFF *tiff, FIBITMAP *dib); - - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -typedef struct { - FreeImageIO *io; - fi_handle handle; - TIFF *tif; -} fi_TIFFIO; - -// ---------------------------------------------------------- -// libtiff interface -// ---------------------------------------------------------- - -static tmsize_t -_tiffReadProc(thandle_t handle, void *buf, tmsize_t size) { - fi_TIFFIO *fio = (fi_TIFFIO*)handle; - return fio->io->read_proc(buf, (unsigned)size, 1, fio->handle) * size; -} - -static tmsize_t -_tiffWriteProc(thandle_t handle, void *buf, tmsize_t size) { - fi_TIFFIO *fio = (fi_TIFFIO*)handle; - return fio->io->write_proc(buf, (unsigned)size, 1, fio->handle) * size; -} - -static toff_t -_tiffSeekProc(thandle_t handle, toff_t off, int whence) { - fi_TIFFIO *fio = (fi_TIFFIO*)handle; - fio->io->seek_proc(fio->handle, (long)off, whence); - return fio->io->tell_proc(fio->handle); -} - -static int -_tiffCloseProc(thandle_t fd) { - return 0; -} - -#include - -static toff_t -_tiffSizeProc(thandle_t handle) { - fi_TIFFIO *fio = (fi_TIFFIO*)handle; - long currPos = fio->io->tell_proc(fio->handle); - fio->io->seek_proc(fio->handle, 0, SEEK_END); - long fileSize = fio->io->tell_proc(fio->handle); - fio->io->seek_proc(fio->handle, currPos, SEEK_SET); - return fileSize; -} - -static int -_tiffMapProc(thandle_t, void** base, toff_t* size) { - return 0; -} - -static void -_tiffUnmapProc(thandle_t, void* base, toff_t size) { -} - -/** -Open a TIFF file descriptor for reading or writing -@param handle File handle -@param name Name of the file handle -@param mode Specifies if the file is to be opened for reading ("r") or writing ("w") -*/ -TIFF * -TIFFFdOpen(thandle_t handle, const char *name, const char *mode) { - TIFF *tif; - - // Open the file; the callback will set everything up - tif = TIFFClientOpen(name, mode, handle, - _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc, - _tiffSizeProc, _tiffMapProc, _tiffUnmapProc); - - return tif; -} - -/** -Open a TIFF file for reading or writing -@param name -@param mode -*/ -TIFF* -TIFFOpen(const char* name, const char* mode) { - return 0; -} - -// ---------------------------------------------------------- -// TIFF library FreeImage-specific routines. -// ---------------------------------------------------------- - -void* -_TIFFmalloc(tmsize_t s) { - return malloc(s); -} - -void* -_TIFFcalloc(tmsize_t nmemb, tmsize_t siz) { - if (nmemb == 0 || siz == 0) { - return ((void *)NULL); - } - return calloc((size_t)nmemb, (size_t)siz); -} - -void -_TIFFfree(void *p) { - free(p); -} - -void* -_TIFFrealloc(void* p, tmsize_t s) { - return realloc(p, s); -} - -void -_TIFFmemset(void* p, int v, tmsize_t c) { - memset(p, v, (size_t) c); -} - -void -_TIFFmemcpy(void* d, const void* s, tmsize_t c) { - memcpy(d, s, (size_t) c); -} - -int -_TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) { - return (memcmp(p1, p2, (size_t) c)); -} - -// ---------------------------------------------------------- -// in FreeImage warnings and errors are disabled -// ---------------------------------------------------------- - -static void -msdosWarningHandler(const char* module, const char* fmt, va_list ap) { -} - -TIFFErrorHandler _TIFFwarningHandler = msdosWarningHandler; - -static void -msdosErrorHandler(const char* module, const char* fmt, va_list ap) { - - // use this for diagnostic only (do not use otherwise, even in DEBUG mode) - /* - if (module != NULL) { - char msg[1024]; - vsprintf(msg, fmt, ap); - FreeImage_OutputMessageProc(s_format_id, "%s: %s", module, msg); - } - */ -} - -TIFFErrorHandler _TIFFerrorHandler = msdosErrorHandler; - -// ---------------------------------------------------------- - -#define CVT(x) (((x) * 255L) / ((1L<<16)-1)) -#define SCALE(x) (((x)*((1L<<16)-1))/255) - -// ========================================================== -// Internal functions -// ========================================================== - -static uint16 -CheckColormap(int n, uint16* r, uint16* g, uint16* b) { - while (n-- > 0) { - if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256) { - return 16; - } - } - - return 8; -} - -/** -Get the TIFFTAG_PHOTOMETRIC value from the dib -*/ -static uint16 -GetPhotometric(FIBITMAP *dib) { - FREE_IMAGE_COLOR_TYPE color_type = FreeImage_GetColorType(dib); - switch(color_type) { - case FIC_MINISWHITE: // min value is white - return PHOTOMETRIC_MINISWHITE; - case FIC_MINISBLACK: // min value is black - return PHOTOMETRIC_MINISBLACK; - case FIC_PALETTE: // color map indexed - return PHOTOMETRIC_PALETTE; - case FIC_RGB: // RGB color model - case FIC_RGBALPHA: // RGB color model with alpha channel - return PHOTOMETRIC_RGB; - case FIC_CMYK: // CMYK color model - return PHOTOMETRIC_RGB; // default to RGB unless the save flag is set to TIFF_CMYK - default: - return PHOTOMETRIC_MINISBLACK; - } -} - -/** -Get the resolution from the TIFF and fill the dib with universal units -*/ -static void -ReadResolution(TIFF *tiff, FIBITMAP *dib) { - float fResX = 300.0; - float fResY = 300.0; - uint16 resUnit = RESUNIT_INCH; - - TIFFGetField(tiff, TIFFTAG_RESOLUTIONUNIT, &resUnit); - TIFFGetField(tiff, TIFFTAG_XRESOLUTION, &fResX); - TIFFGetField(tiff, TIFFTAG_YRESOLUTION, &fResY); - - // If we don't have a valid resolution unit and valid resolution is specified then assume inch - if (resUnit == RESUNIT_NONE && fResX > 0.0 && fResY > 0.0) { - resUnit = RESUNIT_INCH; - } - if (resUnit == RESUNIT_INCH) { - FreeImage_SetDotsPerMeterX(dib, (unsigned) (fResX/0.0254000 + 0.5)); - FreeImage_SetDotsPerMeterY(dib, (unsigned) (fResY/0.0254000 + 0.5)); - } else if(resUnit == RESUNIT_CENTIMETER) { - FreeImage_SetDotsPerMeterX(dib, (unsigned) (fResX*100.0 + 0.5)); - FreeImage_SetDotsPerMeterY(dib, (unsigned) (fResY*100.0 + 0.5)); - } -} - -/** -Set the resolution to the TIFF using english units -*/ -static void -WriteResolution(TIFF *tiff, FIBITMAP *dib) { - double res; - - TIFFSetField(tiff, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); - - res = (unsigned long) (0.5 + 0.0254 * FreeImage_GetDotsPerMeterX(dib)); - TIFFSetField(tiff, TIFFTAG_XRESOLUTION, res); - - res = (unsigned long) (0.5 + 0.0254 * FreeImage_GetDotsPerMeterY(dib)); - TIFFSetField(tiff, TIFFTAG_YRESOLUTION, res); -} - -/** -Fill the dib palette according to the TIFF photometric -*/ -static void -ReadPalette(TIFF *tiff, uint16 photometric, uint16 bitspersample, FIBITMAP *dib) { - RGBQUAD *pal = FreeImage_GetPalette(dib); - - switch(photometric) { - case PHOTOMETRIC_MINISBLACK: // bitmap and greyscale image types - case PHOTOMETRIC_MINISWHITE: - // Monochrome image - - if (bitspersample == 1) { - if (photometric == PHOTOMETRIC_MINISWHITE) { - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 255; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 0; - } else { - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 0; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 255; - } - - } else if ((bitspersample == 4) ||(bitspersample == 8)) { - // need to build the scale for greyscale images - int ncolors = FreeImage_GetColorsUsed(dib); - - if (photometric == PHOTOMETRIC_MINISBLACK) { - for (int i = 0; i < ncolors; i++) { - pal[i].rgbRed = - pal[i].rgbGreen = - pal[i].rgbBlue = (BYTE)(i*(255/(ncolors-1))); - } - } else { - for (int i = 0; i < ncolors; i++) { - pal[i].rgbRed = - pal[i].rgbGreen = - pal[i].rgbBlue = (BYTE)(255-i*(255/(ncolors-1))); - } - } - } - - break; - - case PHOTOMETRIC_PALETTE: // color map indexed - uint16 *red; - uint16 *green; - uint16 *blue; - - TIFFGetField(tiff, TIFFTAG_COLORMAP, &red, &green, &blue); - - // load the palette in the DIB - - if (CheckColormap(1<= 0; i--) { - pal[i].rgbRed =(BYTE) CVT(red[i]); - pal[i].rgbGreen = (BYTE) CVT(green[i]); - pal[i].rgbBlue = (BYTE) CVT(blue[i]); - } - } else { - for (int i = (1 << bitspersample) - 1; i >= 0; i--) { - pal[i].rgbRed = (BYTE) red[i]; - pal[i].rgbGreen = (BYTE) green[i]; - pal[i].rgbBlue = (BYTE) blue[i]; - } - } - - break; - } -} - -/** -Allocate a FIBITMAP -@param header_only If TRUE, allocate a 'header only' FIBITMAP, otherwise allocate a full FIBITMAP -@param fit Image type -@param width Image width in pixels -@param height Image height in pixels -@param bitspersample # bits per sample -@param samplesperpixel # samples per pixel -@return Returns the allocated image if successful, returns NULL otherwise -*/ -static FIBITMAP* -CreateImageType(BOOL header_only, FREE_IMAGE_TYPE fit, int width, int height, uint16 bitspersample, uint16 samplesperpixel) { - FIBITMAP *dib = NULL; - - if((width < 0) || (height < 0)) { - // check for malicious images - return NULL; - } - - int bpp = bitspersample * samplesperpixel; - - if(fit == FIT_BITMAP) { - // standard bitmap type - - if(bpp == 16) { - - if((samplesperpixel == 2) && (bitspersample == 8)) { - // 8-bit indexed + 8-bit alpha channel -> convert to 8-bit transparent - dib = FreeImage_AllocateHeader(header_only, width, height, 8); - } else { - // 16-bit RGB -> expect it to be 565 - dib = FreeImage_AllocateHeader(header_only, width, height, bpp, FI16_565_RED_MASK, FI16_565_GREEN_MASK, FI16_565_BLUE_MASK); - } - - } - else { - - dib = FreeImage_AllocateHeader(header_only, width, height, MIN(bpp, 32), FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } - - - } else { - // other bitmap types - - dib = FreeImage_AllocateHeaderT(header_only, fit, width, height, bpp); - } - - return dib; -} - -/** -Read the TIFFTAG_SAMPLEFORMAT tag and convert to FREE_IMAGE_TYPE -@param tiff LibTIFF TIFF Handle -@param bitspersample # bit per sample -@param samplesperpixel # samples per pixel -@return Returns the image type as a FREE_IMAGE_TYPE value -*/ -static FREE_IMAGE_TYPE -ReadImageType(TIFF *tiff, uint16 bitspersample, uint16 samplesperpixel) { - uint16 sampleformat = 0; - FREE_IMAGE_TYPE fit = FIT_BITMAP ; - - uint16 bpp = bitspersample * samplesperpixel; - - // try the sampleformat tag - if(TIFFGetField(tiff, TIFFTAG_SAMPLEFORMAT, &sampleformat)) { - - switch (sampleformat) { - case SAMPLEFORMAT_UINT: - switch (bpp) { - case 1: - case 4: - case 8: - case 24: - fit = FIT_BITMAP; - break; - case 16: - // 8-bit + alpha or 16-bit greyscale - if(samplesperpixel == 2) { - fit = FIT_BITMAP; - } else { - fit = FIT_UINT16; - } - break; - case 32: - if(samplesperpixel == 4) { - fit = FIT_BITMAP; - } else { - fit = FIT_UINT32; - } - break; - case 48: - if(samplesperpixel == 3) { - fit = FIT_RGB16; - } - break; - case 64: - if(samplesperpixel == 4) { - fit = FIT_RGBA16; - } - break; - } - break; - - case SAMPLEFORMAT_INT: - switch (bpp) { - case 16: - if(samplesperpixel == 3) { - fit = FIT_BITMAP; - } else { - fit = FIT_INT16; - } - break; - case 32: - fit = FIT_INT32; - break; - } - break; - - case SAMPLEFORMAT_IEEEFP: - switch (bpp) { - case 32: - fit = FIT_FLOAT; - break; - case 48: - // 3 x half float => convert to RGBF - if((samplesperpixel == 3) && (bitspersample == 16)) { - fit = FIT_RGBF; - } - break; - case 64: - if(samplesperpixel == 2) { - fit = FIT_FLOAT; - } else { - fit = FIT_DOUBLE; - } - break; - case 96: - fit = FIT_RGBF; - break; - default: - if(bpp >= 128) { - fit = FIT_RGBAF; - } - break; - } - break; - case SAMPLEFORMAT_COMPLEXIEEEFP: - switch (bpp) { - case 64: - break; - case 128: - fit = FIT_COMPLEX; - break; - } - break; - - } - } - // no sampleformat tag : assume SAMPLEFORMAT_UINT - else { - if(samplesperpixel == 1) { - switch (bpp) { - case 16: - fit = FIT_UINT16; - break; - - case 32: - fit = FIT_UINT32; - break; - } - } - else if(samplesperpixel == 3) { - if(bpp == 48) fit = FIT_RGB16; - } - else if(samplesperpixel >= 4) { - if(bitspersample == 16) { - fit = FIT_RGBA16; - } - } - - } - - return fit; -} - -/** -Convert FREE_IMAGE_TYPE and write TIFFTAG_SAMPLEFORMAT -@param tiff LibTIFF TIFF Handle -@param fit Image type as a FREE_IMAGE_TYPE value -*/ -static void -WriteImageType(TIFF *tiff, FREE_IMAGE_TYPE fit) { - switch(fit) { - case FIT_BITMAP: // standard image: 1-, 4-, 8-, 16-, 24-, 32-bit - case FIT_UINT16: // array of unsigned short : unsigned 16-bit - case FIT_UINT32: // array of unsigned long : unsigned 32-bit - case FIT_RGB16: // 48-bit RGB image : 3 x 16-bit - case FIT_RGBA16: // 64-bit RGBA image : 4 x 16-bit - TIFFSetField(tiff, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT); - break; - - case FIT_INT16: // array of short : signed 16-bit - case FIT_INT32: // array of long : signed 32-bit - TIFFSetField(tiff, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_INT); - break; - - case FIT_FLOAT: // array of float : 32-bit - case FIT_DOUBLE: // array of double : 64-bit - case FIT_RGBF: // 96-bit RGB float image : 3 x 32-bit IEEE floating point - case FIT_RGBAF: // 128-bit RGBA float image : 4 x 32-bit IEEE floating point - TIFFSetField(tiff, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP); - break; - - case FIT_COMPLEX: // array of COMPLEX : 2 x 64-bit - TIFFSetField(tiff, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_COMPLEXIEEEFP); - break; - } -} - -/** -Select the compression algorithm -@param tiff LibTIFF TIFF Handle -@param -*/ -static void -WriteCompression(TIFF *tiff, uint16 bitspersample, uint16 samplesperpixel, uint16 photometric, int flags) { - uint16 compression; - uint16 bitsperpixel = bitspersample * samplesperpixel; - - if(photometric == PHOTOMETRIC_LOGLUV) { - compression = COMPRESSION_SGILOG; - } else if ((flags & TIFF_PACKBITS) == TIFF_PACKBITS) { - compression = COMPRESSION_PACKBITS; - } else if ((flags & TIFF_DEFLATE) == TIFF_DEFLATE) { - compression = COMPRESSION_DEFLATE; - } else if ((flags & TIFF_ADOBE_DEFLATE) == TIFF_ADOBE_DEFLATE) { - compression = COMPRESSION_ADOBE_DEFLATE; - } else if ((flags & TIFF_NONE) == TIFF_NONE) { - compression = COMPRESSION_NONE; - } else if ((bitsperpixel == 1) && ((flags & TIFF_CCITTFAX3) == TIFF_CCITTFAX3)) { - compression = COMPRESSION_CCITTFAX3; - } else if ((bitsperpixel == 1) && ((flags & TIFF_CCITTFAX4) == TIFF_CCITTFAX4)) { - compression = COMPRESSION_CCITTFAX4; - } else if ((flags & TIFF_LZW) == TIFF_LZW) { - compression = COMPRESSION_LZW; - } else if ((flags & TIFF_JPEG) == TIFF_JPEG) { - if(((bitsperpixel == 8) && (photometric != PHOTOMETRIC_PALETTE)) || (bitsperpixel == 24)) { - compression = COMPRESSION_JPEG; - // RowsPerStrip must be multiple of 8 for JPEG - uint32 rowsperstrip = (uint32) -1; - rowsperstrip = TIFFDefaultStripSize(tiff, rowsperstrip); - rowsperstrip = rowsperstrip + (8 - (rowsperstrip % 8)); - // overwrite previous RowsPerStrip - TIFFSetField(tiff, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - } else { - // default to LZW - compression = COMPRESSION_LZW; - } - } - else { - // default compression scheme - - switch(bitsperpixel) { - case 1: - compression = COMPRESSION_CCITTFAX4; - break; - - case 4: - case 8: - case 16: - case 24: - case 32: - compression = COMPRESSION_LZW; - break; - case 48: - case 64: - case 96: - case 128: - compression = COMPRESSION_LZW; - break; - - default : - compression = COMPRESSION_NONE; - break; - } - } - - TIFFSetField(tiff, TIFFTAG_COMPRESSION, compression); - - if(compression == COMPRESSION_LZW) { - // This option is only meaningful with LZW compression: a predictor value of 2 - // causes each scanline of the output image to undergo horizontal differencing - // before it is encoded; a value of 1 forces each scanline to be encoded without differencing. - - // Found on LibTIFF mailing list : - // LZW without differencing works well for 1-bit images, 4-bit grayscale images, - // and many palette-color images. But natural 24-bit color images and some 8-bit - // grayscale images do much better with differencing. - - if((bitspersample == 8) || (bitspersample == 16)) { - if ((bitsperpixel >= 8) && (photometric != PHOTOMETRIC_PALETTE)) { - TIFFSetField(tiff, TIFFTAG_PREDICTOR, 2); - } else { - TIFFSetField(tiff, TIFFTAG_PREDICTOR, 1); - } - } else { - TIFFSetField(tiff, TIFFTAG_PREDICTOR, 1); - } - } - else if((compression == COMPRESSION_CCITTFAX3) || (compression == COMPRESSION_CCITTFAX4)) { - uint32 imageLength = 0; - TIFFGetField(tiff, TIFFTAG_IMAGELENGTH, &imageLength); - // overwrite previous RowsPerStrip - TIFFSetField(tiff, TIFFTAG_ROWSPERSTRIP, imageLength); - - if(compression == COMPRESSION_CCITTFAX3) { - // try to be compliant with the TIFF Class F specification - // that documents the TIFF tags specific to FAX applications - // see http://palimpsest.stanford.edu/bytopic/imaging/std/tiff-f.html - uint32 group3options = GROUP3OPT_2DENCODING | GROUP3OPT_FILLBITS; - TIFFSetField(tiff, TIFFTAG_GROUP3OPTIONS, group3options); // 2d-encoded, has aligned EOL - TIFFSetField(tiff, TIFFTAG_FILLORDER, FILLORDER_LSB2MSB); // lsb-to-msb fillorder - } - } -} - -// ========================================================== -// TIFF metadata routines -// ========================================================== - -/** - Read the TIFFTAG_RICHTIFFIPTC tag (IPTC/NAA or Adobe Photoshop profile) -*/ -static BOOL -tiff_read_iptc_profile(TIFF *tiff, FIBITMAP *dib) { - BYTE *profile = NULL; - uint32 profile_size = 0; - - if(TIFFGetField(tiff,TIFFTAG_RICHTIFFIPTC, &profile_size, &profile) == 1) { - if (TIFFIsByteSwapped(tiff) != 0) { - TIFFSwabArrayOfLong((uint32 *) profile, (unsigned long)profile_size); - } - - return read_iptc_profile(dib, profile, 4 * profile_size); - } - - return FALSE; -} - -/** - Read the TIFFTAG_XMLPACKET tag (XMP profile) - @param dib Input FIBITMAP - @param tiff LibTIFF TIFF handle - @return Returns TRUE if successful, FALSE otherwise -*/ -static BOOL -tiff_read_xmp_profile(TIFF *tiff, FIBITMAP *dib) { - BYTE *profile = NULL; - uint32 profile_size = 0; - - if (TIFFGetField(tiff, TIFFTAG_XMLPACKET, &profile_size, &profile) == 1) { - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(!tag) return FALSE; - - FreeImage_SetTagID(tag, TIFFTAG_XMLPACKET); // 700 - FreeImage_SetTagKey(tag, g_TagLib_XMPFieldName); - FreeImage_SetTagLength(tag, profile_size); - FreeImage_SetTagCount(tag, profile_size); - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagValue(tag, profile); - - // store the tag - FreeImage_SetMetadata(FIMD_XMP, dib, FreeImage_GetTagKey(tag), tag); - - // destroy the tag - FreeImage_DeleteTag(tag); - - return TRUE; - } - - return FALSE; -} - -/** - Read the Exif profile embedded in a TIFF - @param dib Input FIBITMAP - @param tiff LibTIFF TIFF handle - @return Returns TRUE if successful, FALSE otherwise -*/ -static BOOL -tiff_read_exif_profile(FreeImageIO *io, fi_handle handle, TIFF *tiff, FIBITMAP *dib) { - BOOL bResult = FALSE; - toff_t exif_offset = 0; - - // read EXIF-TIFF tags - bResult = tiff_read_exif_tags(tiff, TagLib::EXIF_MAIN, dib); - - // get the IFD offset - if(TIFFGetField(tiff, TIFFTAG_EXIFIFD, &exif_offset)) { - - const long tell_pos = io->tell_proc(handle); - const uint16 cur_dir = TIFFCurrentDirectory(tiff); - - // read EXIF tags - if (TIFFReadEXIFDirectory(tiff, exif_offset)) { - // read all known exif tags - bResult = tiff_read_exif_tags(tiff, TagLib::EXIF_EXIF, dib); - } - - io->seek_proc(handle, tell_pos, SEEK_SET); - TIFFSetDirectory(tiff, cur_dir); - } - - return bResult; -} - -/** -Read TIFF special profiles -*/ -static void -ReadMetadata(FreeImageIO *io, fi_handle handle, TIFF *tiff, FIBITMAP *dib) { - - // IPTC/NAA - tiff_read_iptc_profile(tiff, dib); - - // Adobe XMP - tiff_read_xmp_profile(tiff, dib); - - // GeoTIFF - tiff_read_geotiff_profile(tiff, dib); - - // Exif-TIFF - tiff_read_exif_profile(io, handle, tiff, dib); -} - -// ---------------------------------------------------------- - -/** - Write the TIFFTAG_RICHTIFFIPTC tag (IPTC/NAA or Adobe Photoshop profile) -*/ -static BOOL -tiff_write_iptc_profile(TIFF *tiff, FIBITMAP *dib) { - if(FreeImage_GetMetadataCount(FIMD_IPTC, dib)) { - BYTE *profile = NULL; - uint32 profile_size = 0; - // create a binary profile - if(write_iptc_profile(dib, &profile, &profile_size)) { - uint32 iptc_size = profile_size; - iptc_size += (4-(iptc_size & 0x03)); // Round up for long word alignment - BYTE *iptc_profile = (BYTE*)malloc(iptc_size); - if(!iptc_profile) { - free(profile); - return FALSE; - } - memset(iptc_profile, 0, iptc_size); - memcpy(iptc_profile, profile, profile_size); - if (TIFFIsByteSwapped(tiff)) { - TIFFSwabArrayOfLong((uint32 *) iptc_profile, (unsigned long)iptc_size/4); - } - // Tag is type TIFF_LONG so byte length is divided by four - TIFFSetField(tiff, TIFFTAG_RICHTIFFIPTC, iptc_size/4, iptc_profile); - // release the profile data - free(iptc_profile); - free(profile); - - return TRUE; - } - } - - return FALSE; -} - -/** - Write the TIFFTAG_XMLPACKET tag (XMP profile) - @param dib Input FIBITMAP - @param tiff LibTIFF TIFF handle - @return Returns TRUE if successful, FALSE otherwise -*/ -static BOOL -tiff_write_xmp_profile(TIFF *tiff, FIBITMAP *dib) { - FITAG *tag_xmp = NULL; - FreeImage_GetMetadata(FIMD_XMP, dib, g_TagLib_XMPFieldName, &tag_xmp); - - if(tag_xmp && (NULL != FreeImage_GetTagValue(tag_xmp))) { - - TIFFSetField(tiff, TIFFTAG_XMLPACKET, (uint32)FreeImage_GetTagLength(tag_xmp), (BYTE*)FreeImage_GetTagValue(tag_xmp)); - - return TRUE; - } - - return FALSE; -} - -/** - Write the Exif profile to TIFF - @param dib Input FIBITMAP - @param tiff LibTIFF TIFF handle - @return Returns TRUE if successful, FALSE otherwise -*/ -static BOOL -tiff_write_exif_profile(TIFF *tiff, FIBITMAP *dib) { - BOOL bResult = FALSE; - - // write EXIF_MAIN tags, EXIF_EXIF not supported yet - bResult = tiff_write_exif_tags(tiff, TagLib::EXIF_MAIN, dib); - - return bResult; -} - -/** -Write TIFF special profiles -*/ -static void -WriteMetadata(TIFF *tiff, FIBITMAP *dib) { - // IPTC - tiff_write_iptc_profile(tiff, dib); - - // Adobe XMP - tiff_write_xmp_profile(tiff, dib); - - // EXIF_MAIN tags - tiff_write_exif_profile(tiff, dib); - - // GeoTIFF tags - tiff_write_geotiff_profile(tiff, dib); -} - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "TIFF"; -} - -static const char * DLL_CALLCONV -Description() { - return "Tagged Image File Format"; -} - -static const char * DLL_CALLCONV -Extension() { - return "tif,tiff"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return "^[MI][MI][\\x01*][\\x01*]"; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/tiff"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE tiff_id1[] = { 0x49, 0x49, 0x2A, 0x00 }; // Classic TIFF, little-endian - BYTE tiff_id2[] = { 0x4D, 0x4D, 0x00, 0x2A }; // Classic TIFF, big-endian - BYTE tiff_id3[] = { 0x49, 0x49, 0x2B, 0x00 }; // Big TIFF, little-endian - BYTE tiff_id4[] = { 0x4D, 0x4D, 0x00, 0x2B }; // Big TIFF, big-endian - BYTE signature[4] = { 0, 0, 0, 0 }; - - io->read_proc(signature, 1, 4, handle); - - if(memcmp(tiff_id1, signature, 4) == 0) - return TRUE; - if(memcmp(tiff_id2, signature, 4) == 0) - return TRUE; - if(memcmp(tiff_id3, signature, 4) == 0) - return TRUE; - if(memcmp(tiff_id4, signature, 4) == 0) - return TRUE; - - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 1) || - (depth == 4) || - (depth == 8) || - (depth == 24) || - (depth == 32) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return ( - (type == FIT_BITMAP) || - (type == FIT_UINT16) || - (type == FIT_INT16) || - (type == FIT_UINT32) || - (type == FIT_INT32) || - (type == FIT_FLOAT) || - (type == FIT_DOUBLE) || - (type == FIT_COMPLEX) || - (type == FIT_RGB16) || - (type == FIT_RGBA16) || - (type == FIT_RGBF) || - (type == FIT_RGBAF) - ); -} - -static BOOL DLL_CALLCONV -SupportsICCProfiles() { - return TRUE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static void * DLL_CALLCONV -Open(FreeImageIO *io, fi_handle handle, BOOL read) { - // wrapper for TIFF I/O - fi_TIFFIO *fio = (fi_TIFFIO*)malloc(sizeof(fi_TIFFIO)); - if(!fio) return NULL; - fio->io = io; - fio->handle = handle; - - if (read) { - fio->tif = TIFFFdOpen((thandle_t)fio, "", "r"); - } else { - // mode = "w" : write Classic TIFF - // mode = "w8" : write Big TIFF - fio->tif = TIFFFdOpen((thandle_t)fio, "", "w"); - } - if(fio->tif == NULL) { - free(fio); - FreeImage_OutputMessageProc(s_format_id, "Error while opening TIFF: data is invalid"); - return NULL; - } - return fio; -} - -static void DLL_CALLCONV -Close(FreeImageIO *io, fi_handle handle, void *data) { - if(data) { - fi_TIFFIO *fio = (fi_TIFFIO*)data; - TIFFClose(fio->tif); - free(fio); - } -} - -// ---------------------------------------------------------- - -static int DLL_CALLCONV -PageCount(FreeImageIO *io, fi_handle handle, void *data) { - if(data) { - fi_TIFFIO *fio = (fi_TIFFIO*)data; - TIFF *tif = (TIFF *)fio->tif; - int nr_ifd = 0; - - do { - nr_ifd++; - } while (TIFFReadDirectory(tif)); - - return nr_ifd; - } - - return 0; -} - -// ---------------------------------------------------------- - -/** -check for uncommon bitspersample values (e.g. 10, 12, ...) -@param photometric TIFFTAG_PHOTOMETRIC tiff tag -@param bitspersample TIFFTAG_BITSPERSAMPLE tiff tag -@param samplesperpixel TIFFTAG_SAMPLESPERPIXEL tiff tag -@return Returns FALSE if a uncommon bit-depth is encountered, returns TRUE otherwise -*/ -static BOOL -IsValidBitsPerSample(uint16 photometric, uint16 bitspersample, uint16 samplesperpixel) { - - switch(bitspersample) { - case 1: - case 4: - if((photometric == PHOTOMETRIC_MINISWHITE) || (photometric == PHOTOMETRIC_MINISBLACK) || (photometric == PHOTOMETRIC_PALETTE)) { - return TRUE; - } else { - return FALSE; - } - break; - case 8: - return TRUE; - case 16: - if(photometric != PHOTOMETRIC_PALETTE) { - return TRUE; - } else { - return FALSE; - } - break; - case 32: - if((photometric == PHOTOMETRIC_MINISWHITE) || (photometric == PHOTOMETRIC_MINISBLACK) || (photometric == PHOTOMETRIC_LOGLUV)) { - return TRUE; - } else if((photometric == PHOTOMETRIC_RGB) && (samplesperpixel == 3) || (samplesperpixel == 4)) { - // RGB[A]F - return TRUE; - } else { - return FALSE; - } - break; - case 64: - case 128: - if(photometric == PHOTOMETRIC_MINISBLACK) { - return TRUE; - } else { - return FALSE; - } - break; - default: - return FALSE; - } -} - -static TIFFLoadMethod -FindLoadMethod(TIFF *tif, FREE_IMAGE_TYPE image_type, int flags) { - uint16 bitspersample = (uint16)-1; - uint16 samplesperpixel = (uint16)-1; - uint16 photometric = (uint16)-1; - uint16 planar_config = (uint16)-1; - - TIFFLoadMethod loadMethod = LoadAsGenericStrip; - - TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric); - TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); - TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample); - TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planar_config); - - BOOL bIsTiled = (TIFFIsTiled(tif) == 0) ? FALSE:TRUE; - - switch(photometric) { - // convert to 24 or 32 bits RGB if the image is full color - case PHOTOMETRIC_RGB: - if((image_type == FIT_RGB16) || (image_type == FIT_RGBA16)) { - // load 48-bit RGB and 64-bit RGBA without conversion - loadMethod = LoadAsGenericStrip; - } - else if(image_type == FIT_RGBF) { - if((samplesperpixel == 3) && (bitspersample == 16)) { - // load 3 x 16-bit half as RGBF - loadMethod = LoadAsHalfFloat; - } - } - break; - case PHOTOMETRIC_YCBCR: - case PHOTOMETRIC_CIELAB: - case PHOTOMETRIC_ICCLAB: - case PHOTOMETRIC_ITULAB: - loadMethod = LoadAsRBGA; - break; - case PHOTOMETRIC_LOGLUV: - loadMethod = LoadAsLogLuv; - break; - case PHOTOMETRIC_SEPARATED: - // if image is PHOTOMETRIC_SEPARATED _and_ comes with an ICC profile, - // then the image should preserve its original (CMYK) colour model and - // should be read as CMYK (to keep the match of pixel and profile and - // to avoid multiple conversions. Conversion can be done by changing - // the profile from it's original CMYK to an RGB profile with an - // apropriate color management system. Works with non-tiled TIFFs. - if(!bIsTiled) { - loadMethod = LoadAsCMYK; - } - break; - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - case PHOTOMETRIC_PALETTE: - // When samplesperpixel = 2 and bitspersample = 8, set the image as a - // 8-bit indexed image + 8-bit alpha layer image - // and convert to a 8-bit image with a transparency table - if((samplesperpixel > 1) && (bitspersample == 8)) { - loadMethod = LoadAs8BitTrns; - } else { - loadMethod = LoadAsGenericStrip; - } - break; - default: - loadMethod = LoadAsGenericStrip; - break; - } - - if((loadMethod == LoadAsGenericStrip) && bIsTiled) { - loadMethod = LoadAsTiled; - } - - return loadMethod; -} - -// ========================================================== -// TIFF thumbnail routines -// ========================================================== - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data); - -/** -Read embedded thumbnail -*/ -static void -ReadThumbnail(FreeImageIO *io, fi_handle handle, void *data, TIFF *tiff, FIBITMAP *dib) { - FIBITMAP* thumbnail = NULL; - - // read exif thumbnail (IFD 1) ... - - /* - // this code can cause unwanted recursion causing an overflow, it is thus disabled until we have a better solution - // do we really need to read a thumbnail from the Exif segment ? knowing that TIFF store the thumbnail in the subIFD ... - // - toff_t exif_offset = 0; - if(TIFFGetField(tiff, TIFFTAG_EXIFIFD, &exif_offset)) { - - if(!TIFFLastDirectory(tiff)) { - // save current position - const long tell_pos = io->tell_proc(handle); - const uint16 cur_dir = TIFFCurrentDirectory(tiff); - - // load the thumbnail - int page = 1; - int flags = TIFF_DEFAULT; - thumbnail = Load(io, handle, page, flags, data); - // store the thumbnail (remember to release it before return) - FreeImage_SetThumbnail(dib, thumbnail); - - // restore current position - io->seek_proc(handle, tell_pos, SEEK_SET); - TIFFSetDirectory(tiff, cur_dir); - } - } - */ - - // ... or read the first subIFD - - if(!thumbnail) { - uint16 subIFD_count = 0; - toff_t* subIFD_offsets = NULL; - - // This will also read the first (and only) subIFD from a Photoshop-created "pyramid" file. - // Subsequent, smaller images are 'nextIFD' in that subIFD. Currently we only load the first one. - - if(TIFFGetField(tiff, TIFFTAG_SUBIFD, &subIFD_count, &subIFD_offsets)) { - if(subIFD_count > 0) { - // save current position - const long tell_pos = io->tell_proc(handle); - const uint16 cur_dir = TIFFCurrentDirectory(tiff); - - if(TIFFSetSubDirectory(tiff, subIFD_offsets[0])) { - // load the thumbnail - int page = -1; - int flags = TIFF_DEFAULT; - thumbnail = Load(io, handle, page, flags, data); - // store the thumbnail (remember to release it before return) - FreeImage_SetThumbnail(dib, thumbnail); - } - - // restore current position - io->seek_proc(handle, tell_pos, SEEK_SET); - TIFFSetDirectory(tiff, cur_dir); - } - } - } - - // ... or read Photoshop thumbnail - - if(!thumbnail) { - uint32 ps_size = 0; - void *ps_data = NULL; - - if(TIFFGetField(tiff, TIFFTAG_PHOTOSHOP, &ps_size, &ps_data)) { - FIMEMORY *handle = FreeImage_OpenMemory((BYTE*)ps_data, ps_size); - - FreeImageIO io; - SetMemoryIO(&io); - - psdParser parser; - parser.ReadImageResources(&io, handle, ps_size); - - FreeImage_SetThumbnail(dib, parser.GetThumbnail()); - - FreeImage_CloseMemory(handle); - } - } - - // release thumbnail - FreeImage_Unload(thumbnail); -} - -// -------------------------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - if (!handle || !data ) { - return NULL; - } - - TIFF *tif = NULL; - uint32 height = 0; - uint32 width = 0; - uint16 bitspersample = 1; - uint16 samplesperpixel = 1; - uint32 rowsperstrip = (uint32)-1; - uint16 photometric = PHOTOMETRIC_MINISWHITE; - uint16 compression = (uint16)-1; - uint16 planar_config; - - FIBITMAP *dib = NULL; - uint32 iccSize = 0; // ICC profile length - void *iccBuf = NULL; // ICC profile data - - const BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - try { - fi_TIFFIO *fio = (fi_TIFFIO*)data; - tif = fio->tif; - - if (page != -1) { - if (!tif || !TIFFSetDirectory(tif, (uint16)page)) { - throw "Error encountered while opening TIFF file"; - } - } - - const BOOL asCMYK = (flags & TIFF_CMYK) == TIFF_CMYK; - - // first, get the photometric, the compression and basic metadata - // --------------------------------------------------------------------------------- - - TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric); - TIFFGetField(tif, TIFFTAG_COMPRESSION, &compression); - - // check for HDR formats - // --------------------------------------------------------------------------------- - - if(photometric == PHOTOMETRIC_LOGLUV) { - // check the compression - if(compression != COMPRESSION_SGILOG && compression != COMPRESSION_SGILOG24) { - throw "Only support SGILOG compressed LogLuv data"; - } - // set decoder to output in IEEE 32-bit float XYZ values - TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_FLOAT); - } - - // --------------------------------------------------------------------------------- - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height); - TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); - TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample); - TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - TIFFGetField(tif, TIFFTAG_ICCPROFILE, &iccSize, &iccBuf); - TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planar_config); - - // check for unsupported formats - // --------------------------------------------------------------------------------- - - if(IsValidBitsPerSample(photometric, bitspersample, samplesperpixel) == FALSE) { - FreeImage_OutputMessageProc(s_format_id, - "Unable to handle this format: bitspersample = %d, samplesperpixel = %d, photometric = %d", - (int)bitspersample, (int)samplesperpixel, (int)photometric); - throw (char*)NULL; - } - - // --------------------------------------------------------------------------------- - - // get image data type - - FREE_IMAGE_TYPE image_type = ReadImageType(tif, bitspersample, samplesperpixel); - - // get the most appropriate loading method - - TIFFLoadMethod loadMethod = FindLoadMethod(tif, image_type, flags); - - // --------------------------------------------------------------------------------- - - if(loadMethod == LoadAsRBGA) { - // --------------------------------------------------------------------------------- - // RGB[A] loading using the TIFFReadRGBAImage() API - // --------------------------------------------------------------------------------- - - BOOL has_alpha = FALSE; - - // Read the whole image into one big RGBA buffer and then - // convert it to a DIB. This is using the traditional - // TIFFReadRGBAImage() API that we trust. - - uint32 *raster = NULL; - - if(!header_only) { - - raster = (uint32*)_TIFFmalloc(width * height * sizeof(uint32)); - if (raster == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - // read the image in one chunk into an RGBA array - - if (!TIFFReadRGBAImage(tif, width, height, raster, 1)) { - _TIFFfree(raster); - throw FI_MSG_ERROR_UNSUPPORTED_FORMAT; - } - } - // TIFFReadRGBAImage always deliveres 3 or 4 samples per pixel images - // (RGB or RGBA, see below). Cut-off possibly present channels (additional - // alpha channels) from e.g. Photoshop. Any CMYK(A..) is now treated as RGB, - // any additional alpha channel on RGB(AA..) is lost on conversion to RGB(A) - - if(samplesperpixel > 4) { // TODO Write to Extra Channels - FreeImage_OutputMessageProc(s_format_id, "Warning: %d additional alpha channel(s) ignored", samplesperpixel-4); - samplesperpixel = 4; - } - - // create a new DIB (take care of different samples-per-pixel in case - // of converted CMYK image (RGB conversion is on sample per pixel less) - - if (photometric == PHOTOMETRIC_SEPARATED && samplesperpixel == 4) { - samplesperpixel = 3; - } - - dib = CreateImageType(header_only, image_type, width, height, bitspersample, samplesperpixel); - if (dib == NULL) { - // free the raster pointer and output an error if allocation failed - if(raster) { - _TIFFfree(raster); - } - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // fill in the resolution (english or universal) - - ReadResolution(tif, dib); - - if(!header_only) { - - // read the raster lines and save them in the DIB - // with RGB mode, we have to change the order of the 3 samples RGB - // We use macros for extracting components from the packed ABGR - // form returned by TIFFReadRGBAImage. - - uint32 *row = &raster[0]; - - if (samplesperpixel == 4) { - // 32-bit RGBA - for (uint32 y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - for (uint32 x = 0; x < width; x++) { - bits[FI_RGBA_BLUE] = (BYTE)TIFFGetB(row[x]); - bits[FI_RGBA_GREEN] = (BYTE)TIFFGetG(row[x]); - bits[FI_RGBA_RED] = (BYTE)TIFFGetR(row[x]); - bits[FI_RGBA_ALPHA] = (BYTE)TIFFGetA(row[x]); - - if (bits[FI_RGBA_ALPHA] != 0) { - has_alpha = TRUE; - } - - bits += 4; - } - row += width; - } - } else { - // 24-bit RGB - for (uint32 y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - for (uint32 x = 0; x < width; x++) { - bits[FI_RGBA_BLUE] = (BYTE)TIFFGetB(row[x]); - bits[FI_RGBA_GREEN] = (BYTE)TIFFGetG(row[x]); - bits[FI_RGBA_RED] = (BYTE)TIFFGetR(row[x]); - - bits += 3; - } - row += width; - } - } - - _TIFFfree(raster); - } - - // ### Not correct when header only - FreeImage_SetTransparent(dib, has_alpha); - - } else if(loadMethod == LoadAs8BitTrns) { - // --------------------------------------------------------------------------------- - // 8-bit + 8-bit alpha layer loading - // --------------------------------------------------------------------------------- - - // create a new 8-bit DIB - dib = CreateImageType(header_only, image_type, width, height, bitspersample, MIN(2, samplesperpixel)); - if (dib == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - // fill in the resolution (english or universal) - - ReadResolution(tif, dib); - - // set up the colormap based on photometric - - ReadPalette(tif, photometric, bitspersample, dib); - - // calculate the line + pitch (separate for scr & dest) - - const tmsize_t src_line = TIFFScanlineSize(tif); - // here, the pitch is 2x less than the original as we only keep the first layer - int dst_pitch = FreeImage_GetPitch(dib); - - // transparency table for 8-bit + 8-bit alpha images - - BYTE trns[256]; - // clear the transparency table - memset(trns, 0xFF, 256 * sizeof(BYTE)); - - // In the tiff file the lines are saved from up to down - // In a DIB the lines must be saved from down to up - - BYTE *bits = FreeImage_GetScanLine(dib, height - 1); - - // read the tiff lines and save them in the DIB - - if(planar_config == PLANARCONFIG_CONTIG && !header_only) { - - BYTE *buf = (BYTE*)malloc(TIFFStripSize(tif) * sizeof(BYTE)); - if(buf == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - for (uint32 y = 0; y < height; y += rowsperstrip) { - int32 nrow = (y + rowsperstrip > height ? height - y : rowsperstrip); - - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, 0), buf, nrow * src_line) == -1) { - free(buf); - throw FI_MSG_ERROR_PARSING; - } - for (int l = 0; l < nrow; l++) { - BYTE *p = bits; - BYTE *b = buf + l * src_line; - - for(uint32 x = 0; x < (uint32)(src_line / samplesperpixel); x++) { - // copy the 8-bit layer - *p = b[0]; - // convert the 8-bit alpha layer to a trns table - trns[ b[0] ] = b[1]; - - p++; - b += samplesperpixel; - } - bits -= dst_pitch; - } - } - - free(buf); - } - else if(planar_config == PLANARCONFIG_SEPARATE && !header_only) { - tmsize_t stripsize = TIFFStripSize(tif) * sizeof(BYTE); - BYTE *buf = (BYTE*)malloc(2 * stripsize); - if(buf == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - BYTE *grey = buf; - BYTE *alpha = buf + stripsize; - - for (uint32 y = 0; y < height; y += rowsperstrip) { - int32 nrow = (y + rowsperstrip > height ? height - y : rowsperstrip); - - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, 0), grey, nrow * src_line) == -1) { - free(buf); - throw FI_MSG_ERROR_PARSING; - } - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, 1), alpha, nrow * src_line) == -1) { - free(buf); - throw FI_MSG_ERROR_PARSING; - } - - for (int l = 0; l < nrow; l++) { - BYTE *p = bits; - BYTE *g = grey + l * src_line; - BYTE *a = alpha + l * src_line; - - for(uint32 x = 0; x < (uint32)(src_line); x++) { - // copy the 8-bit layer - *p = g[0]; - // convert the 8-bit alpha layer to a trns table - trns[ g[0] ] = a[0]; - - p++; - g++; - a++; - } - bits -= dst_pitch; - } - } - - free(buf); - - } - - FreeImage_SetTransparencyTable(dib, &trns[0], 256); - FreeImage_SetTransparent(dib, TRUE); - - } else if(loadMethod == LoadAsCMYK) { - // --------------------------------------------------------------------------------- - // CMYK loading - // --------------------------------------------------------------------------------- - - // At this place, samplesperpixel could be > 4, esp. when a CMYK(A) format - // is recognized. Where all other formats are handled straight-forward, this - // format has to be handled special - - BOOL isCMYKA = (photometric == PHOTOMETRIC_SEPARATED) && (samplesperpixel > 4); - - // We use a temp dib to store the alpha for the CMYKA to RGBA conversion - // NOTE this is until we have Extra channels implementation. - // Also then it will be possible to merge LoadAsCMYK with LoadAsGenericStrip - - FIBITMAP *alpha = NULL; - unsigned alpha_pitch = 0; - BYTE *alpha_bits = NULL; - unsigned alpha_Bpp = 0; - - if(isCMYKA && !asCMYK && !header_only) { - if(bitspersample == 16) { - alpha = FreeImage_AllocateT(FIT_UINT16, width, height); - } else if (bitspersample == 8) { - alpha = FreeImage_Allocate(width, height, 8); - } - - if(!alpha) { - FreeImage_OutputMessageProc(s_format_id, "Failed to allocate temporary alpha channel"); - } else { - alpha_bits = FreeImage_GetScanLine(alpha, height - 1); - alpha_pitch = FreeImage_GetPitch(alpha); - alpha_Bpp = FreeImage_GetBPP(alpha) / 8; - } - - } - - // create a new DIB - const uint16 chCount = MIN(samplesperpixel, 4); - dib = CreateImageType(header_only, image_type, width, height, bitspersample, chCount); - if (dib == NULL) { - FreeImage_Unload(alpha); - throw FI_MSG_ERROR_MEMORY; - } - - // fill in the resolution (english or universal) - - ReadResolution(tif, dib); - - if(!header_only) { - - // calculate the line + pitch (separate for scr & dest) - - const tmsize_t src_line = TIFFScanlineSize(tif); - const tmsize_t dst_line = FreeImage_GetLine(dib); - const unsigned dib_pitch = FreeImage_GetPitch(dib); - const unsigned dibBpp = FreeImage_GetBPP(dib) / 8; - const unsigned Bpc = dibBpp / chCount; - const unsigned srcBpp = bitspersample * samplesperpixel / 8; - - assert(Bpc <= 2); //< CMYK is only BYTE or SHORT - - // In the tiff file the lines are save from up to down - // In a DIB the lines must be saved from down to up - - BYTE *bits = FreeImage_GetScanLine(dib, height - 1); - - // read the tiff lines and save them in the DIB - - BYTE *buf = (BYTE*)malloc(TIFFStripSize(tif) * sizeof(BYTE)); - if(buf == NULL) { - FreeImage_Unload(alpha); - throw FI_MSG_ERROR_MEMORY; - } - - if(planar_config == PLANARCONFIG_CONTIG) { - - // - loop for strip blocks - - - for (uint32 y = 0; y < height; y += rowsperstrip) { - const int32 strips = (y + rowsperstrip > height ? height - y : rowsperstrip); - - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, 0), buf, strips * src_line) == -1) { - free(buf); - FreeImage_Unload(alpha); - throw FI_MSG_ERROR_PARSING; - } - - // - loop for strips - - - if(src_line != dst_line) { - // CMYKA+ - if(alpha) { - for (int l = 0; l < strips; l++) { - for(BYTE *pixel = bits, *al_pixel = alpha_bits, *src_pixel = buf + l * src_line; pixel < bits + dib_pitch; pixel += dibBpp, al_pixel += alpha_Bpp, src_pixel += srcBpp) { - // copy pixel byte by byte - BYTE b = 0; - for( ; b < dibBpp; ++b) { - pixel[b] = src_pixel[b]; - } - // TODO write the remaining bytes to extra channel(s) - - // HACK write the first alpha to a separate dib (assume BYTE or WORD) - al_pixel[0] = src_pixel[b]; - if(Bpc > 1) { - al_pixel[1] = src_pixel[b + 1]; - } - - } - bits -= dib_pitch; - alpha_bits -= alpha_pitch; - } - } - else { - // alpha/extra channels alloc failed - for (int l = 0; l < strips; l++) { - for(BYTE* pixel = bits, * src_pixel = buf + l * src_line; pixel < bits + dst_line; pixel += dibBpp, src_pixel += srcBpp) { - AssignPixel(pixel, src_pixel, dibBpp); - } - bits -= dib_pitch; - } - } - } - else { - // CMYK to CMYK - for (int l = 0; l < strips; l++) { - BYTE *b = buf + l * src_line; - memcpy(bits, b, src_line); - bits -= dib_pitch; - } - } - - } // height - - } - else if(planar_config == PLANARCONFIG_SEPARATE) { - - BYTE *dib_strip = bits; - BYTE *al_strip = alpha_bits; - - // - loop for strip blocks - - - for (uint32 y = 0; y < height; y += rowsperstrip) { - const int32 strips = (y + rowsperstrip > height ? height - y : rowsperstrip); - - // - loop for channels (planes) - - - for(uint16 sample = 0; sample < samplesperpixel; sample++) { - - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, sample), buf, strips * src_line) == -1) { - free(buf); - FreeImage_Unload(alpha); - throw FI_MSG_ERROR_PARSING; - } - - BYTE *dst_strip = dib_strip; - unsigned dst_pitch = dib_pitch; - uint16 ch = sample; - unsigned Bpp = dibBpp; - - if(sample >= chCount) { - // TODO Write to Extra Channel - - // HACK redirect write to temp alpha - if(alpha && sample == chCount) { - - dst_strip = al_strip; - dst_pitch = alpha_pitch; - - ch = 0; - Bpp = alpha_Bpp; - } - else { - break; - } - } - - const unsigned channelOffset = ch * Bpc; - - // - loop for strips in block - - - BYTE *src_line_begin = buf; - BYTE *dst_line_begin = dst_strip; - for (int l = 0; l < strips; l++, src_line_begin += src_line, dst_line_begin -= dst_pitch ) { - // - loop for pixels in strip - - - const BYTE* const src_line_end = src_line_begin + src_line; - for (BYTE *src_bits = src_line_begin, * dst_bits = dst_line_begin; src_bits < src_line_end; src_bits += Bpc, dst_bits += Bpp) { - AssignPixel(dst_bits + channelOffset, src_bits, Bpc); - } // line - - } // strips - - } // channels - - // done with a strip block, incr to the next - dib_strip -= strips * dib_pitch; - al_strip -= strips * alpha_pitch; - - } //< height - - } - - free(buf); - - if(!asCMYK) { - ConvertCMYKtoRGBA(dib); - - // The ICC Profile is invalid, clear it - iccSize = 0; - iccBuf = NULL; - - if(isCMYKA) { - // HACK until we have Extra channels. (ConvertCMYKtoRGBA will then do the work) - - FreeImage_SetChannel(dib, alpha, FICC_ALPHA); - FreeImage_Unload(alpha); - alpha = NULL; - } - else { - FIBITMAP *t = RemoveAlphaChannel(dib); - if(t) { - FreeImage_Unload(dib); - dib = t; - } - else { - FreeImage_OutputMessageProc(s_format_id, "Cannot allocate memory for buffer. CMYK image converted to RGB + pending Alpha"); - } - } - } - - } // !header_only - - } else if(loadMethod == LoadAsGenericStrip) { - // --------------------------------------------------------------------------------- - // Generic loading - // --------------------------------------------------------------------------------- - - // create a new DIB - const uint16 chCount = MIN(samplesperpixel, 4); - dib = CreateImageType(header_only, image_type, width, height, bitspersample, chCount); - if (dib == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - // fill in the resolution (english or universal) - - ReadResolution(tif, dib); - - // set up the colormap based on photometric - - ReadPalette(tif, photometric, bitspersample, dib); - - if(!header_only) { - // calculate the line + pitch (separate for scr & dest) - - const tmsize_t src_line = TIFFScanlineSize(tif); - const tmsize_t dst_line = FreeImage_GetLine(dib); - const unsigned dst_pitch = FreeImage_GetPitch(dib); - const unsigned Bpp = FreeImage_GetBPP(dib) / 8; - const unsigned srcBpp = bitspersample * samplesperpixel / 8; - - // In the tiff file the lines are save from up to down - // In a DIB the lines must be saved from down to up - - BYTE *bits = FreeImage_GetScanLine(dib, height - 1); - - // read the tiff lines and save them in the DIB - - BYTE *buf = (BYTE*)malloc(TIFFStripSize(tif) * sizeof(BYTE)); - if(buf == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - memset(buf, 0, TIFFStripSize(tif) * sizeof(BYTE)); - - BOOL bThrowMessage = FALSE; - - if(planar_config == PLANARCONFIG_CONTIG) { - - for (uint32 y = 0; y < height; y += rowsperstrip) { - int32 strips = (y + rowsperstrip > height ? height - y : rowsperstrip); - - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, 0), buf, strips * src_line) == -1) { - // ignore errors as they can be frequent and not really valid errors, especially with fax images - bThrowMessage = TRUE; - /* - free(buf); - throw FI_MSG_ERROR_PARSING; - */ - } - if(src_line == dst_line) { - // channel count match - for (int l = 0; l < strips; l++) { - memcpy(bits, buf + l * src_line, src_line); - bits -= dst_pitch; - } - } - else { - for (int l = 0; l < strips; l++) { - for(BYTE *pixel = bits, *src_pixel = buf + l * src_line; pixel < bits + dst_pitch; pixel += Bpp, src_pixel += srcBpp) { - AssignPixel(pixel, src_pixel, Bpp); - } - bits -= dst_pitch; - } - } - } - } - else if(planar_config == PLANARCONFIG_SEPARATE) { - - const unsigned Bpc = bitspersample / 8; - BYTE* dib_strip = bits; - // - loop for strip blocks - - - for (uint32 y = 0; y < height; y += rowsperstrip) { - const int32 strips = (y + rowsperstrip > height ? height - y : rowsperstrip); - - // - loop for channels (planes) - - - for(uint16 sample = 0; sample < samplesperpixel; sample++) { - - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, sample), buf, strips * src_line) == -1) { - // ignore errors as they can be frequent and not really valid errors, especially with fax images - bThrowMessage = TRUE; - } - - if(sample >= chCount) { - // TODO Write to Extra Channel - break; - } - - const unsigned channelOffset = sample * Bpc; - - // - loop for strips in block - - - BYTE* src_line_begin = buf; - BYTE* dst_line_begin = dib_strip; - for (int l = 0; l < strips; l++, src_line_begin += src_line, dst_line_begin -= dst_pitch ) { - - // - loop for pixels in strip - - - const BYTE* const src_line_end = src_line_begin + src_line; - - for (BYTE* src_bits = src_line_begin, * dst_bits = dst_line_begin; src_bits < src_line_end; src_bits += Bpc, dst_bits += Bpp) { - // actually assigns channel - AssignPixel(dst_bits + channelOffset, src_bits, Bpc); - } // line - - } // strips - - } // channels - - // done with a strip block, incr to the next - dib_strip -= strips * dst_pitch; - - } // height - - } - free(buf); - - if(bThrowMessage) { - FreeImage_OutputMessageProc(s_format_id, "Warning: parsing error. Image may be incomplete or contain invalid data !"); - } - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - SwapRedBlue32(dib); -#endif - - } // !header only - - } else if(loadMethod == LoadAsTiled) { - // --------------------------------------------------------------------------------- - // Tiled image loading - // --------------------------------------------------------------------------------- - - uint32 tileWidth, tileHeight; - uint32 src_line = 0; - - // create a new DIB - dib = CreateImageType( header_only, image_type, width, height, bitspersample, samplesperpixel); - if (dib == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - // fill in the resolution (english or universal) - - ReadResolution(tif, dib); - - // set up the colormap based on photometric - - ReadPalette(tif, photometric, bitspersample, dib); - - // get the tile geometry - if(!TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tileWidth) || !TIFFGetField(tif, TIFFTAG_TILELENGTH, &tileHeight)) { - throw "Invalid tiled TIFF image"; - } - - // read the tiff lines and save them in the DIB - - if(planar_config == PLANARCONFIG_CONTIG && !header_only) { - - // get the maximum number of bytes required to contain a tile - tmsize_t tileSize = TIFFTileSize(tif); - - // allocate tile buffer - BYTE *tileBuffer = (BYTE*)malloc(tileSize * sizeof(BYTE)); - if(tileBuffer == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - // calculate src line and dst pitch - int dst_pitch = FreeImage_GetPitch(dib); - uint32 tileRowSize = (uint32)TIFFTileRowSize(tif); - uint32 imageRowSize = (uint32)TIFFScanlineSize(tif); - - - // In the tiff file the lines are saved from up to down - // In a DIB the lines must be saved from down to up - - BYTE *bits = FreeImage_GetScanLine(dib, height - 1); - - for (uint32 y = 0; y < height; y += tileHeight) { - int32 nrows = (y + tileHeight > height ? height - y : tileHeight); - - for (uint32 x = 0, rowSize = 0; x < width; x += tileWidth, rowSize += tileRowSize) { - memset(tileBuffer, 0, tileSize); - - // read one tile - if (TIFFReadTile(tif, tileBuffer, x, y, 0, 0) < 0) { - free(tileBuffer); - throw "Corrupted tiled TIFF file"; - } - // convert to strip - if(x + tileWidth > width) { - src_line = imageRowSize - rowSize; - } else { - src_line = tileRowSize; - } - BYTE *src_bits = tileBuffer; - BYTE *dst_bits = bits + rowSize; - for(int k = 0; k < nrows; k++) { - memcpy(dst_bits, src_bits, src_line); - src_bits += tileRowSize; - dst_bits -= dst_pitch; - } - } - - bits -= nrows * dst_pitch; - } - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - SwapRedBlue32(dib); -#endif - free(tileBuffer); - } - else if(planar_config == PLANARCONFIG_SEPARATE) { - throw "Separated tiled TIFF images are not supported"; - } - - - } else if(loadMethod == LoadAsLogLuv) { - // --------------------------------------------------------------------------------- - // RGBF LogLuv compressed loading - // --------------------------------------------------------------------------------- - - double stonits; // input conversion to nits - if (!TIFFGetField(tif, TIFFTAG_STONITS, &stonits)) { - stonits = 1; - } - - // create a new DIB - dib = CreateImageType(header_only, image_type, width, height, bitspersample, samplesperpixel); - if (dib == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - // fill in the resolution (english or universal) - - ReadResolution(tif, dib); - - if(planar_config == PLANARCONFIG_CONTIG && !header_only) { - // calculate the line + pitch (separate for scr & dest) - - tmsize_t src_line = TIFFScanlineSize(tif); - int dst_pitch = FreeImage_GetPitch(dib); - - // In the tiff file the lines are save from up to down - // In a DIB the lines must be saved from down to up - - BYTE *bits = FreeImage_GetScanLine(dib, height - 1); - - // read the tiff lines and save them in the DIB - - BYTE *buf = (BYTE*)malloc(TIFFStripSize(tif) * sizeof(BYTE)); - if(buf == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - for (uint32 y = 0; y < height; y += rowsperstrip) { - int32 nrow = (y + rowsperstrip > height ? height - y : rowsperstrip); - - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, 0), buf, nrow * src_line) == -1) { - free(buf); - throw FI_MSG_ERROR_PARSING; - } - // convert from XYZ to RGB - for (int l = 0; l < nrow; l++) { - tiff_ConvertLineXYZToRGB(bits, buf + l * src_line, stonits, width); - bits -= dst_pitch; - } - } - - free(buf); - } - else if(planar_config == PLANARCONFIG_SEPARATE) { - // this cannot happen according to the LogLuv specification - throw "Unable to handle PLANARCONFIG_SEPARATE LogLuv images"; - } - - } else if(loadMethod == LoadAsHalfFloat) { - // --------------------------------------------------------------------------------- - // RGBF loading from a half format - // --------------------------------------------------------------------------------- - - // create a new DIB - dib = CreateImageType(header_only, image_type, width, height, bitspersample, samplesperpixel); - if (dib == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - // fill in the resolution (english or universal) - - ReadResolution(tif, dib); - - if(!header_only) { - - // calculate the line + pitch (separate for scr & dest) - - tmsize_t src_line = TIFFScanlineSize(tif); - unsigned dst_pitch = FreeImage_GetPitch(dib); - - // In the tiff file the lines are save from up to down - // In a DIB the lines must be saved from down to up - - BYTE *bits = FreeImage_GetScanLine(dib, height - 1); - - // read the tiff lines and save them in the DIB - - if(planar_config == PLANARCONFIG_CONTIG) { - - BYTE *buf = (BYTE*)malloc(TIFFStripSize(tif) * sizeof(BYTE)); - if(buf == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - for (uint32 y = 0; y < height; y += rowsperstrip) { - uint32 nrow = (y + rowsperstrip > height ? height - y : rowsperstrip); - - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, 0), buf, nrow * src_line) == -1) { - free(buf); - throw FI_MSG_ERROR_PARSING; - } - - // convert from half (16-bit) to float (32-bit) - // !!! use OpenEXR half helper class - - half half_value; - - for (uint32 l = 0; l < nrow; l++) { - WORD *src_pixel = (WORD*)(buf + l * src_line); - float *dst_pixel = (float*)bits; - - for(tmsize_t x = 0; x < (tmsize_t)(src_line / sizeof(WORD)); x++) { - half_value.setBits(src_pixel[x]); - dst_pixel[x] = half_value; - } - - bits -= dst_pitch; - } - } - - free(buf); - } - else if(planar_config == PLANARCONFIG_SEPARATE) { - // this use case was never encountered yet - throw "Unable to handle PLANARCONFIG_SEPARATE RGB half float images"; - } - - } // !header only - - } else { - // --------------------------------------------------------------------------------- - // Unknown or unsupported format - // --------------------------------------------------------------------------------- - - throw FI_MSG_ERROR_UNSUPPORTED_FORMAT; - } - - // copy TIFF metadata (must be done after FreeImage_Allocate) - - ReadMetadata(io, handle, tif, dib); - - // copy ICC profile data (must be done after FreeImage_Allocate) - - FreeImage_CreateICCProfile(dib, iccBuf, iccSize); - if (photometric == PHOTOMETRIC_SEPARATED) { - if (asCMYK) { - // set the ICC profile as CMYK - FreeImage_GetICCProfile(dib)->flags |= FIICC_COLOR_IS_CMYK; - } - else { - // if original image is CMYK but is converted to RGB, remove ICC profile from Exif-TIFF metadata - FreeImage_SetMetadata(FIMD_EXIF_MAIN, dib, "InterColorProfile", NULL); - } - } - - // copy TIFF thumbnail (must be done after FreeImage_Allocate) - - ReadThumbnail(io, handle, data, tif, dib); - - return dib; - - } catch (const char *message) { - if(dib) { - FreeImage_Unload(dib); - } - if(message) { - FreeImage_OutputMessageProc(s_format_id, message); - } - return NULL; - } - -} - -// -------------------------------------------------------------------------- - -/** -Save a single image into a TIF - -@param io FreeImage IO -@param dib The dib to be saved -@param handle FreeImage handle -@param page Page number -@param flags FreeImage TIFF save flag -@param data TIFF plugin context -@param ifd TIFF Image File Directory (0 means save image, > 0 && (page == -1) means save thumbnail) -@param ifdCount 1 if no thumbnail to save, 2 if image + thumbnail to save -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -SaveOneTIFF(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data, unsigned ifd, unsigned ifdCount) { - if (!dib || !handle || !data) { - return FALSE; - } - - try { - fi_TIFFIO *fio = (fi_TIFFIO*)data; - TIFF *out = fio->tif; - - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - - const uint32 width = FreeImage_GetWidth(dib); - const uint32 height = FreeImage_GetHeight(dib); - const uint16 bitsperpixel = (uint16)FreeImage_GetBPP(dib); - - const FIICCPROFILE* iccProfile = FreeImage_GetICCProfile(dib); - - // setup out-variables based on dib and flag options - - uint16 bitspersample; - uint16 samplesperpixel; - uint16 photometric; - - if(image_type == FIT_BITMAP) { - // standard image: 1-, 4-, 8-, 16-, 24-, 32-bit - - samplesperpixel = ((bitsperpixel == 24) ? 3 : ((bitsperpixel == 32) ? 4 : 1)); - bitspersample = bitsperpixel / samplesperpixel; - photometric = GetPhotometric(dib); - - if((bitsperpixel == 8) && FreeImage_IsTransparent(dib)) { - // 8-bit transparent picture : convert later to 8-bit + 8-bit alpha - samplesperpixel = 2; - bitspersample = 8; - } - else if(bitsperpixel == 32) { - // 32-bit images : check for CMYK or alpha transparency - - if((((iccProfile->flags & FIICC_COLOR_IS_CMYK) == FIICC_COLOR_IS_CMYK) || ((flags & TIFF_CMYK) == TIFF_CMYK))) { - // CMYK support - photometric = PHOTOMETRIC_SEPARATED; - TIFFSetField(out, TIFFTAG_INKSET, INKSET_CMYK); - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, 4); - } - else if(photometric == PHOTOMETRIC_RGB) { - // transparency mask support - uint16 sampleinfo[1]; - // unassociated alpha data is transparency information - sampleinfo[0] = EXTRASAMPLE_UNASSALPHA; - TIFFSetField(out, TIFFTAG_EXTRASAMPLES, 1, sampleinfo); - } - } - } else if(image_type == FIT_RGB16) { - // 48-bit RGB - - samplesperpixel = 3; - bitspersample = bitsperpixel / samplesperpixel; - photometric = PHOTOMETRIC_RGB; - } else if(image_type == FIT_RGBA16) { - // 64-bit RGBA - - samplesperpixel = 4; - bitspersample = bitsperpixel / samplesperpixel; - if((((iccProfile->flags & FIICC_COLOR_IS_CMYK) == FIICC_COLOR_IS_CMYK) || ((flags & TIFF_CMYK) == TIFF_CMYK))) { - // CMYK support - photometric = PHOTOMETRIC_SEPARATED; - TIFFSetField(out, TIFFTAG_INKSET, INKSET_CMYK); - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, 4); - } - else { - photometric = PHOTOMETRIC_RGB; - // transparency mask support - uint16 sampleinfo[1]; - // unassociated alpha data is transparency information - sampleinfo[0] = EXTRASAMPLE_UNASSALPHA; - TIFFSetField(out, TIFFTAG_EXTRASAMPLES, 1, sampleinfo); - } - } else if(image_type == FIT_RGBF) { - // 96-bit RGBF => store with a LogLuv encoding ? - - samplesperpixel = 3; - bitspersample = bitsperpixel / samplesperpixel; - // the library converts to and from floating-point XYZ CIE values - if((flags & TIFF_LOGLUV) == TIFF_LOGLUV) { - photometric = PHOTOMETRIC_LOGLUV; - TIFFSetField(out, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_FLOAT); - // TIFFSetField(out, TIFFTAG_STONITS, 1.0); // assume unknown - } - else { - // store with default compression (LZW) or with input compression flag - photometric = PHOTOMETRIC_RGB; - } - - } else if (image_type == FIT_RGBAF) { - // 128-bit RGBAF => store with default compression (LZW) or with input compression flag - - samplesperpixel = 4; - bitspersample = bitsperpixel / samplesperpixel; - photometric = PHOTOMETRIC_RGB; - } else { - // special image type (int, long, double, ...) - - samplesperpixel = 1; - bitspersample = bitsperpixel; - photometric = PHOTOMETRIC_MINISBLACK; - } - - // set image data type - - WriteImageType(out, image_type); - - // write possible ICC profile - - if (iccProfile->size && iccProfile->data) { - TIFFSetField(out, TIFFTAG_ICCPROFILE, iccProfile->size, iccProfile->data); - } - - // handle standard width/height/bpp stuff - - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, height); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, samplesperpixel); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, bitspersample); - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); // single image plane - TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - TIFFSetField(out, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB); - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(out, (uint32) -1)); - - // handle metrics - - WriteResolution(out, dib); - - // multi-paging - - if (page >= 0) { - char page_number[20]; - sprintf(page_number, "Page %d", page); - - TIFFSetField(out, TIFFTAG_SUBFILETYPE, (uint32)FILETYPE_PAGE); - TIFFSetField(out, TIFFTAG_PAGENUMBER, (uint16)page, (uint16)0); - TIFFSetField(out, TIFFTAG_PAGENAME, page_number); - - } else { - // is it a thumbnail ? - TIFFSetField(out, TIFFTAG_SUBFILETYPE, (ifd == 0) ? (uint32)0 : (uint32)FILETYPE_REDUCEDIMAGE); - } - - // palettes (image colormaps are automatically scaled to 16-bits) - - if (photometric == PHOTOMETRIC_PALETTE) { - uint16 *r, *g, *b; - uint16 nColors = (uint16)FreeImage_GetColorsUsed(dib); - RGBQUAD *pal = FreeImage_GetPalette(dib); - - r = (uint16 *) _TIFFmalloc(sizeof(uint16) * 3 * nColors); - if(r == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - g = r + nColors; - b = g + nColors; - - for (int i = nColors - 1; i >= 0; i--) { - r[i] = SCALE((uint16)pal[i].rgbRed); - g[i] = SCALE((uint16)pal[i].rgbGreen); - b[i] = SCALE((uint16)pal[i].rgbBlue); - } - - TIFFSetField(out, TIFFTAG_COLORMAP, r, g, b); - - _TIFFfree(r); - } - - // compression tag - - WriteCompression(out, bitspersample, samplesperpixel, photometric, flags); - - // metadata - - WriteMetadata(out, dib); - - // thumbnail tag - - if((ifd == 0) && (ifdCount > 1)) { - uint16 nsubifd = 1; - uint64 subifd[1]; - subifd[0] = 0; - TIFFSetField(out, TIFFTAG_SUBIFD, nsubifd, subifd); - } - - // read the DIB lines from bottom to top - // and save them in the TIF - // ------------------------------------- - - const uint32 pitch = FreeImage_GetPitch(dib); - - if(image_type == FIT_BITMAP) { - // standard bitmap type - - switch(bitsperpixel) { - case 1 : - case 4 : - case 8 : - { - if((bitsperpixel == 8) && FreeImage_IsTransparent(dib)) { - // 8-bit transparent picture : convert to 8-bit + 8-bit alpha - - // get the transparency table - BYTE *trns = FreeImage_GetTransparencyTable(dib); - - BYTE *buffer = (BYTE *)malloc(2 * width * sizeof(BYTE)); - if(buffer == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - for (int y = height - 1; y >= 0; y--) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - - BYTE *p = bits, *b = buffer; - - for(uint32 x = 0; x < width; x++) { - // copy the 8-bit layer - b[0] = *p; - // convert the trns table to a 8-bit alpha layer - b[1] = trns[ b[0] ]; - - p++; - b += samplesperpixel; - } - - // write the scanline to disc - - TIFFWriteScanline(out, buffer, height - y - 1, 0); - } - - free(buffer); - } - else { - // other cases - BYTE *buffer = (BYTE *)malloc(pitch * sizeof(BYTE)); - if(buffer == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - for (uint32 y = 0; y < height; y++) { - // get a copy of the scanline - memcpy(buffer, FreeImage_GetScanLine(dib, height - y - 1), pitch); - // write the scanline to disc - TIFFWriteScanline(out, buffer, y, 0); - } - free(buffer); - } - - break; - } - - case 24: - case 32: - { - BYTE *buffer = (BYTE *)malloc(pitch * sizeof(BYTE)); - if(buffer == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - for (uint32 y = 0; y < height; y++) { - // get a copy of the scanline - - memcpy(buffer, FreeImage_GetScanLine(dib, height - y - 1), pitch); - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - if (photometric != PHOTOMETRIC_SEPARATED) { - // TIFFs store color data RGB(A) instead of BGR(A) - - BYTE *pBuf = buffer; - - for (uint32 x = 0; x < width; x++) { - INPLACESWAP(pBuf[0], pBuf[2]); - pBuf += samplesperpixel; - } - } -#endif - // write the scanline to disc - - TIFFWriteScanline(out, buffer, y, 0); - } - - free(buffer); - - break; - } - }//< switch (bitsperpixel) - - } else if(image_type == FIT_RGBF && (flags & TIFF_LOGLUV) == TIFF_LOGLUV) { - // RGBF image => store as XYZ using a LogLuv encoding - - BYTE *buffer = (BYTE *)malloc(pitch * sizeof(BYTE)); - if(buffer == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - for (uint32 y = 0; y < height; y++) { - // get a copy of the scanline and convert from RGB to XYZ - tiff_ConvertLineRGBToXYZ(buffer, FreeImage_GetScanLine(dib, height - y - 1), width); - // write the scanline to disc - TIFFWriteScanline(out, buffer, y, 0); - } - free(buffer); - } else { - // just dump the dib (tiff supports all dib types) - - BYTE *buffer = (BYTE *)malloc(pitch * sizeof(BYTE)); - if(buffer == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - for (uint32 y = 0; y < height; y++) { - // get a copy of the scanline - memcpy(buffer, FreeImage_GetScanLine(dib, height - y - 1), pitch); - // write the scanline to disc - TIFFWriteScanline(out, buffer, y, 0); - } - free(buffer); - } - - // write out the directory tag if we wrote a page other than -1 or if we have a thumbnail to write later - - if( (page >= 0) || ((ifd == 0) && (ifdCount > 1)) ) { - TIFFWriteDirectory(out); - // else: TIFFClose will WriteDirectory - } - - return TRUE; - - } catch(const char *text) { - FreeImage_OutputMessageProc(s_format_id, text); - return FALSE; - } -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - BOOL bResult = FALSE; - - // handle thumbnail as SubIFD - const BOOL bHasThumbnail = (FreeImage_GetThumbnail(dib) != NULL); - const unsigned ifdCount = bHasThumbnail ? 2 : 1; - - FIBITMAP *bitmap = dib; - - for(unsigned ifd = 0; ifd < ifdCount; ifd++) { - // redirect dib to thumbnail for the second pass - if(ifd == 1) { - bitmap = FreeImage_GetThumbnail(dib); - } - - bResult = SaveOneTIFF(io, bitmap, handle, page, flags, data, ifd, ifdCount); - if(!bResult) { - return FALSE; - } - } - - return bResult; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitTIFF(Plugin *plugin, int format_id) { - s_format_id = format_id; - - // Set up the callback for extended TIFF directory tag support (see XTIFF.cpp) - // Must be called before using libtiff - XTIFFInitialize(); - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = Open; - plugin->close_proc = Close; - plugin->pagecount_proc = PageCount; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = SupportsICCProfiles; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginWBMP.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginWBMP.cpp deleted file mode 100644 index 2ff8f02..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginWBMP.cpp +++ /dev/null @@ -1,372 +0,0 @@ -// ========================================================== -// Wireless Bitmap Format Loader and Writer -// -// Design and implementation by -// - Herv Drolon -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Wireless Bitmap Format -// ---------------------- -// The WBMP format enables graphical information to be sent to a variety of handsets. -// The WBMP format is terminal independent and describes only graphical information. - -// IMPLEMENTATION NOTES: -// ------------------------ -// The WBMP format is configured according to a type field value (TypeField below), -// which maps to all relevant image encoding information, such as: -// Pixel organisation and encoding -// Palette organisation and encoding -// Compression characteristics -// Animation encoding -// For each TypeField value, all relevant image characteristics are -// fully specified as part of the WAP documentation. -// Currently, a simple compact, monochrome image format is defined -// within the WBMP type space : -// -// Image Type Identifier, multi-byte integer 0 -// Image Format description 0 B/W, no compression -// ------------------------------------------------------------------------------- - -// WBMP Header - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif - -typedef struct tagWBMPHEADER { - WORD TypeField; // Image type identifier of multi-byte length - BYTE FixHeaderField; // Octet of general header information - BYTE ExtHeaderFields; // Zero or more extension header fields - WORD Width; // Multi-byte width field - WORD Height; // Multi-byte height field -} WBMPHEADER; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif - -// The extension headers may be of type binary 00 through binary 11, defined as follows. - -// - Type 00 indicates a multi-byte bitfield used to specify additional header information. -// The first bit is set if a type 00, extension header is set if more data follows. -// The other bits are reserved for future use. -// - Type 01 - reserved for future use. -// - Type 10 - reserved for future use. -// - Type 11 indicates a sequence of parameter/value pairs. These can be used for -// optimisations and special purpose extensions, eg, animation image formats. -// The parameter size tells the length (1-8 bytes) of the following parameter name. -// The value size gives the length (1-16 bytes) of the following parameter value. -// The concatenation flag indicates whether another parameter/value pair will follow -// after reading the specified bytes of data. - -// ========================================================== -// Internal functions -// ========================================================== - -static DWORD -multiByteRead(FreeImageIO *io, fi_handle handle) { - // Multi-byte encoding / decoding - // ------------------------------- - // A multi-byte integer consists of a series of octets, where the most significant bit - // is the continuation flag, and the remaining seven bits are a scalar value. - // The continuation flag is used to indicate that an octet is not the end of the multi-byte - // sequence. - - DWORD Out = 0; - BYTE In = 0; - - while (io->read_proc(&In, 1, 1, handle)) { - Out += (In & 0x7F); - - if ((In & 0x80) == 0x00) - break; - - Out <<= 7; - } - - return Out; -} - -static void -multiByteWrite(FreeImageIO *io, fi_handle handle, DWORD In) { - BYTE Out, k = 1; - - while (In & (0x7F << 7*k)) - k++; - - while (k > 1) { - k--; - - Out = (BYTE)(0x80 | (In >> 7*k) & 0xFF); - - io->write_proc(&Out, 1, 1, handle); - } - - Out = (BYTE)(In & 0x7F); - - io->write_proc(&Out, 1, 1, handle); -} - -static void -readExtHeader(FreeImageIO *io, fi_handle handle, BYTE b) { - // Extension header fields - // ------------------------ - // Read the extension header fields - // (since we don't use them for the moment, we skip them). - - switch (b & 0x60) { - // Type 00: read multi-byte bitfield - - case 0x00: - { - DWORD info = multiByteRead(io, handle); - break; - } - - // Type 11: read a sequence of parameter/value pairs. - - case 0x60: - { - BYTE sizeParamIdent = (b & 0x70) >> 4; // Size of Parameter Identifier (in bytes) - BYTE sizeParamValue = (b & 0x0F); // Size of Parameter Value (in bytes) - - BYTE *Ident = (BYTE*)malloc(sizeParamIdent * sizeof(BYTE)); - BYTE *Value = (BYTE*)malloc(sizeParamValue * sizeof(BYTE)); - - io->read_proc(Ident, sizeParamIdent, 1, handle); - io->read_proc(Value, sizeParamValue, 1, handle); - - free(Ident); - free(Value); - break; - } - - // reserved for future use - - case 0x20: // Type 01 - case 0x40: // Type 10 - break; - } -} - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "WBMP"; -} - -static const char * DLL_CALLCONV -Description() { - return "Wireless Bitmap"; -} - -static const char * DLL_CALLCONV -Extension() { - return "wap,wbmp,wbm"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/vnd.wap.wbmp"; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 1) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return (type == FIT_BITMAP) ? TRUE : FALSE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - WORD x, y, width, height; - FIBITMAP *dib; - BYTE *bits; // pointer to dib data - RGBQUAD *pal; // pointer to dib palette - - WBMPHEADER header; - - if (handle) { - try { - // Read header information - // ----------------------- - - // Type - - header.TypeField = (WORD)multiByteRead(io, handle); - - if (header.TypeField != 0) { - throw FI_MSG_ERROR_UNSUPPORTED_FORMAT; - } - - // FixHeaderField - - io->read_proc(&header.FixHeaderField, 1, 1, handle); - - // ExtHeaderFields - // 1 = more will follow, 0 = last octet - - if (header.FixHeaderField & 0x80) { - header.ExtHeaderFields = 0x80; - - while(header.ExtHeaderFields & 0x80) { - io->read_proc(&header.ExtHeaderFields, 1, 1, handle); - - readExtHeader(io, handle, header.ExtHeaderFields); - } - } - - // width & height - - width = (WORD)multiByteRead(io, handle); - height = (WORD)multiByteRead(io, handle); - - // Allocate a new dib - - dib = FreeImage_Allocate(width, height, 1); - if (!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - // write the palette data - - pal = FreeImage_GetPalette(dib); - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 0; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 255; - - // read the bitmap data - - int line = FreeImage_GetLine(dib); - - for (y = 0; y < height; y++) { - bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for (x = 0; x < line; x++) { - io->read_proc(&bits[x], 1, 1, handle); - } - } - - return dib; - - } catch(const char *text) { - FreeImage_OutputMessageProc(s_format_id, text); - - return NULL; - } - - } - - return NULL; -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - BYTE *bits; // pointer to dib data - - if ((dib) && (handle)) { - try { - if (FreeImage_GetBPP(dib) != 1) - throw "Only 1-bit depth bitmaps can be saved as WBMP"; - - // write the header - - WBMPHEADER header; - header.TypeField = 0; // Type 0: B/W, no compression - header.FixHeaderField = 0; // No ExtHeaderField - header.Width = (WORD)FreeImage_GetWidth(dib); // Image width - header.Height = (WORD)FreeImage_GetHeight(dib); // Image height - - multiByteWrite(io, handle, header.TypeField); - - io->write_proc(&header.FixHeaderField, 1, 1, handle); - - multiByteWrite(io, handle, header.Width); - multiByteWrite(io, handle, header.Height); - - // write the bitmap data - - WORD linelength = (WORD)FreeImage_GetLine(dib); - - for (WORD y = 0; y < header.Height; y++) { - bits = FreeImage_GetScanLine(dib, header.Height - 1 - y); - - io->write_proc(&bits[0], linelength, 1, handle); - } - - return TRUE; - - } catch (const char* text) { - FreeImage_OutputMessageProc(s_format_id, text); - } - } - - return FALSE; -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitWBMP(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = NULL; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginWebP.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginWebP.cpp deleted file mode 100644 index 7c9f62f..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginWebP.cpp +++ /dev/null @@ -1,697 +0,0 @@ -// ========================================================== -// Google WebP Loader & Writer -// -// Design and implementation by -// - Herve Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -#include "../Metadata/FreeImageTag.h" - -#include "../LibWebP/src/webp/decode.h" -#include "../LibWebP/src/webp/encode.h" -#include "../LibWebP/src/webp/mux.h" - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ---------------------------------------------------------- -// Helpers for the load function -// ---------------------------------------------------------- - -/** -Read the whole file into memory -*/ -static BOOL -ReadFileToWebPData(FreeImageIO *io, fi_handle handle, WebPData * const bitstream) { - uint8_t *raw_data = NULL; - - try { - // Read the input file and put it in memory - long start_pos = io->tell_proc(handle); - io->seek_proc(handle, 0, SEEK_END); - size_t file_length = (size_t)(io->tell_proc(handle) - start_pos); - io->seek_proc(handle, start_pos, SEEK_SET); - raw_data = (uint8_t*)malloc(file_length * sizeof(uint8_t)); - if(!raw_data) { - throw FI_MSG_ERROR_MEMORY; - } - if(io->read_proc(raw_data, 1, (unsigned)file_length, handle) != file_length) { - throw "Error while reading input stream"; - } - - // copy pointers (must be released later using free) - bitstream->bytes = raw_data; - bitstream->size = file_length; - - return TRUE; - - } catch(const char *text) { - if(raw_data) { - free(raw_data); - } - memset(bitstream, 0, sizeof(WebPData)); - if(NULL != text) { - FreeImage_OutputMessageProc(s_format_id, text); - } - return FALSE; - } -} - -// ---------------------------------------------------------- -// Helpers for the save function -// ---------------------------------------------------------- - -/** -Output function. Should return 1 if writing was successful. -data/data_size is the segment of data to write, and 'picture' is for -reference (and so one can make use of picture->custom_ptr). -*/ -static int -WebP_MemoryWriter(const BYTE *data, size_t data_size, const WebPPicture* const picture) { - FIMEMORY *hmem = (FIMEMORY*)picture->custom_ptr; - return data_size ? (FreeImage_WriteMemory(data, 1, (unsigned)data_size, hmem) == data_size) : 0; -} - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "WebP"; -} - -static const char * DLL_CALLCONV -Description() { - return "Google WebP image format"; -} - -static const char * DLL_CALLCONV -Extension() { - return "webp"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/webp"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - BYTE riff_signature[4] = { 0x52, 0x49, 0x46, 0x46 }; - BYTE webp_signature[4] = { 0x57, 0x45, 0x42, 0x50 }; - BYTE signature[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - - io->read_proc(signature, 1, 12, handle); - - if(memcmp(riff_signature, signature, 4) == 0) { - if(memcmp(webp_signature, signature + 8, 4) == 0) { - return TRUE; - } - } - - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 24) || - (depth == 32) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return (type == FIT_BITMAP) ? TRUE : FALSE; -} - -static BOOL DLL_CALLCONV -SupportsICCProfiles() { - return TRUE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static void * DLL_CALLCONV -Open(FreeImageIO *io, fi_handle handle, BOOL read) { - WebPMux *mux = NULL; - int copy_data = 1; // 1 : copy data into the mux, 0 : keep a link to local data - - if(read) { - // create the MUX object from the input stream - WebPData bitstream; - // read the input file and put it in memory - if(!ReadFileToWebPData(io, handle, &bitstream)) { - return NULL; - } - // create the MUX object - mux = WebPMuxCreate(&bitstream, copy_data); - // no longer needed since copy_data == 1 - free((void*)bitstream.bytes); - if(mux == NULL) { - FreeImage_OutputMessageProc(s_format_id, "Failed to create mux object from file"); - return NULL; - } - } else { - // creates an empty mux object - mux = WebPMuxNew(); - if(mux == NULL) { - FreeImage_OutputMessageProc(s_format_id, "Failed to create empty mux object"); - return NULL; - } - } - - return mux; -} - -static void DLL_CALLCONV -Close(FreeImageIO *io, fi_handle handle, void *data) { - WebPMux *mux = (WebPMux*)data; - if(mux != NULL) { - // free the MUX object - WebPMuxDelete(mux); - } -} - -// ---------------------------------------------------------- - -/** -Decode a WebP image and returns a FIBITMAP image -@param webp_image Raw WebP image -@param flags FreeImage load flags -@return Returns a dib if successfull, returns NULL otherwise -*/ -static FIBITMAP * -DecodeImage(WebPData *webp_image, int flags) { - FIBITMAP *dib = NULL; - - const uint8_t* data = webp_image->bytes; // raw image data - const size_t data_size = webp_image->size; // raw image size - - VP8StatusCode webp_status = VP8_STATUS_OK; - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - // Main object storing the configuration for advanced decoding - WebPDecoderConfig decoder_config; - // Output buffer - WebPDecBuffer* const output_buffer = &decoder_config.output; - // Features gathered from the bitstream - WebPBitstreamFeatures* const bitstream = &decoder_config.input; - - try { - // Initialize the configuration as empty - // This function must always be called first, unless WebPGetFeatures() is to be called - if(!WebPInitDecoderConfig(&decoder_config)) { - throw "Library version mismatch"; - } - - // Retrieve features from the bitstream - // The bitstream structure is filled with information gathered from the bitstream - webp_status = WebPGetFeatures(data, data_size, bitstream); - if(webp_status != VP8_STATUS_OK) { - throw FI_MSG_ERROR_PARSING; - } - - // Allocate output dib - - unsigned bpp = bitstream->has_alpha ? 32 : 24; - unsigned width = (unsigned)bitstream->width; - unsigned height = (unsigned)bitstream->height; - - dib = FreeImage_AllocateHeader(header_only, width, height, bpp, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } - - if(header_only) { - WebPFreeDecBuffer(output_buffer); - return dib; - } - - // --- Set decoding options --- - - // use multi-threaded decoding - decoder_config.options.use_threads = 1; - // set output color space - output_buffer->colorspace = bitstream->has_alpha ? MODE_BGRA : MODE_BGR; - - // --- - - // decode the input stream, taking 'config' into account. - - webp_status = WebPDecode(data, data_size, &decoder_config); - if(webp_status != VP8_STATUS_OK) { - throw FI_MSG_ERROR_PARSING; - } - - // fill the dib with the decoded data - - const BYTE *src_bitmap = output_buffer->u.RGBA.rgba; - const unsigned src_pitch = (unsigned)output_buffer->u.RGBA.stride; - - switch(bpp) { - case 24: - for(unsigned y = 0; y < height; y++) { - const BYTE *src_bits = src_bitmap + y * src_pitch; - BYTE *dst_bits = (BYTE*)FreeImage_GetScanLine(dib, height-1-y); - for(unsigned x = 0; x < width; x++) { - dst_bits[FI_RGBA_BLUE] = src_bits[0]; // B - dst_bits[FI_RGBA_GREEN] = src_bits[1]; // G - dst_bits[FI_RGBA_RED] = src_bits[2]; // R - src_bits += 3; - dst_bits += 3; - } - } - break; - case 32: - for(unsigned y = 0; y < height; y++) { - const BYTE *src_bits = src_bitmap + y * src_pitch; - BYTE *dst_bits = (BYTE*)FreeImage_GetScanLine(dib, height-1-y); - for(unsigned x = 0; x < width; x++) { - dst_bits[FI_RGBA_BLUE] = src_bits[0]; // B - dst_bits[FI_RGBA_GREEN] = src_bits[1]; // G - dst_bits[FI_RGBA_RED] = src_bits[2]; // R - dst_bits[FI_RGBA_ALPHA] = src_bits[3]; // A - src_bits += 4; - dst_bits += 4; - } - } - break; - } - - // Free the decoder - WebPFreeDecBuffer(output_buffer); - - return dib; - - } catch (const char *text) { - if(dib) { - FreeImage_Unload(dib); - } - WebPFreeDecBuffer(output_buffer); - - if(NULL != text) { - FreeImage_OutputMessageProc(s_format_id, text); - } - - return NULL; - } -} - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - WebPMux *mux = NULL; - WebPMuxFrameInfo webp_frame = { 0 }; // raw image - WebPData color_profile; // ICC raw data - WebPData xmp_metadata; // XMP raw data - WebPData exif_metadata; // EXIF raw data - FIBITMAP *dib = NULL; - WebPMuxError error_status; - - if(!handle) { - return NULL; - } - - try { - // get the MUX object - mux = (WebPMux*)data; - if(!mux) { - throw (1); - } - - // gets the feature flags from the mux object - uint32_t webp_flags = 0; - error_status = WebPMuxGetFeatures(mux, &webp_flags); - if(error_status != WEBP_MUX_OK) { - throw (1); - } - - // get image data - error_status = WebPMuxGetFrame(mux, 1, &webp_frame); - - if(error_status == WEBP_MUX_OK) { - // decode the data (can be limited to the header if flags uses FIF_LOAD_NOPIXELS) - dib = DecodeImage(&webp_frame.bitstream, flags); - if(!dib) { - throw (1); - } - - // get ICC profile - if(webp_flags & ICCP_FLAG) { - error_status = WebPMuxGetChunk(mux, "ICCP", &color_profile); - if(error_status == WEBP_MUX_OK) { - FreeImage_CreateICCProfile(dib, (void*)color_profile.bytes, (long)color_profile.size); - } - } - - // get XMP metadata - if(webp_flags & XMP_FLAG) { - error_status = WebPMuxGetChunk(mux, "XMP ", &xmp_metadata); - if(error_status == WEBP_MUX_OK) { - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(tag) { - FreeImage_SetTagKey(tag, g_TagLib_XMPFieldName); - FreeImage_SetTagLength(tag, (DWORD)xmp_metadata.size); - FreeImage_SetTagCount(tag, (DWORD)xmp_metadata.size); - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagValue(tag, xmp_metadata.bytes); - - // store the tag - FreeImage_SetMetadata(FIMD_XMP, dib, FreeImage_GetTagKey(tag), tag); - - // destroy the tag - FreeImage_DeleteTag(tag); - } - } - } - - // get Exif metadata - if(webp_flags & EXIF_FLAG) { - error_status = WebPMuxGetChunk(mux, "EXIF", &exif_metadata); - if(error_status == WEBP_MUX_OK) { - // read the Exif raw data as a blob - jpeg_read_exif_profile_raw(dib, exif_metadata.bytes, (unsigned)exif_metadata.size); - // read and decode the Exif data - jpeg_read_exif_profile(dib, exif_metadata.bytes, (unsigned)exif_metadata.size); - } - } - } - - WebPDataClear(&webp_frame.bitstream); - - return dib; - - } catch(int) { - WebPDataClear(&webp_frame.bitstream); - return NULL; - } -} - -// -------------------------------------------------------------------------- - -/** -Encode a FIBITMAP to a WebP image -@param hmem Memory output stream, containing on return the encoded image -@param dib The FIBITMAP to encode -@param flags FreeImage save flags -@return Returns TRUE if successfull, returns FALSE otherwise -*/ -static BOOL -EncodeImage(FIMEMORY *hmem, FIBITMAP *dib, int flags) { - WebPPicture picture; // Input buffer - WebPConfig config; // Coding parameters - - BOOL bIsFlipped = FALSE; - - try { - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - const unsigned bpp = FreeImage_GetBPP(dib); - const unsigned pitch = FreeImage_GetPitch(dib); - - // check image type - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - - if( !((image_type == FIT_BITMAP) && ((bpp == 24) || (bpp == 32))) ) { - throw FI_MSG_ERROR_UNSUPPORTED_FORMAT; - } - - // check format limits - if(MAX(width, height) > WEBP_MAX_DIMENSION) { - FreeImage_OutputMessageProc(s_format_id, "Unsupported image size: width x height = %d x %d", width, height); - return FALSE; - } - - // Initialize output I/O - if(WebPPictureInit(&picture) == 1) { - picture.writer = WebP_MemoryWriter; - picture.custom_ptr = hmem; - picture.width = (int)width; - picture.height = (int)height; - } else { - throw "Couldn't initialize WebPPicture"; - } - - // --- Set encoding parameters --- - - // Initialize encoding parameters to default values - WebPConfigInit(&config); - - // quality/speed trade-off (0=fast, 6=slower-better) - config.method = 6; - - if((flags & WEBP_LOSSLESS) == WEBP_LOSSLESS) { - // lossless encoding - config.lossless = 1; - picture.use_argb = 1; - } else if((flags & 0x7F) > 0) { - // lossy encoding - config.lossless = 0; - // quality is between 1 (smallest file) and 100 (biggest) - default to 75 - config.quality = (float)(flags & 0x7F); - if(config.quality > 100) { - config.quality = 100; - } - } - - // validate encoding parameters - if(WebPValidateConfig(&config) == 0) { - throw "Failed to initialize encoder"; - } - - // --- Perform encoding --- - - // Invert dib scanlines - bIsFlipped = FreeImage_FlipVertical(dib); - - - // convert dib buffer to output stream - - const BYTE *bits = FreeImage_GetBits(dib); - -#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - switch(bpp) { - case 24: - WebPPictureImportBGR(&picture, bits, pitch); - break; - case 32: - WebPPictureImportBGRA(&picture, bits, pitch); - break; - } -#else - switch(bpp) { - case 24: - WebPPictureImportRGB(&picture, bits, pitch); - break; - case 32: - WebPPictureImportRGBA(&picture, bits, pitch); - break; - } - -#endif // FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR - - if(!WebPEncode(&config, &picture)) { - throw "Failed to encode image"; - } - - WebPPictureFree(&picture); - - if(bIsFlipped) { - // invert dib scanlines - FreeImage_FlipVertical(dib); - } - - return TRUE; - - } catch (const char* text) { - - WebPPictureFree(&picture); - - if(bIsFlipped) { - // invert dib scanlines - FreeImage_FlipVertical(dib); - } - - if(NULL != text) { - FreeImage_OutputMessageProc(s_format_id, text); - } - } - - return FALSE; -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - WebPMux *mux = NULL; - FIMEMORY *hmem = NULL; - WebPData webp_image; - WebPData output_data = { 0 }; - WebPMuxError error_status; - - int copy_data = 1; // 1 : copy data into the mux, 0 : keep a link to local data - - if(!dib || !handle || !data) { - return FALSE; - } - - try { - - // get the MUX object - mux = (WebPMux*)data; - if(!mux) { - return FALSE; - } - - // --- prepare image data --- - - // encode image as a WebP blob - hmem = FreeImage_OpenMemory(); - if(!hmem || !EncodeImage(hmem, dib, flags)) { - throw (1); - } - // store the blob into the mux - BYTE *data = NULL; - DWORD data_size = 0; - FreeImage_AcquireMemory(hmem, &data, &data_size); - webp_image.bytes = data; - webp_image.size = data_size; - error_status = WebPMuxSetImage(mux, &webp_image, copy_data); - // no longer needed since copy_data == 1 - FreeImage_CloseMemory(hmem); - hmem = NULL; - if(error_status != WEBP_MUX_OK) { - throw (1); - } - - // --- set metadata --- - - // set ICC color profile - { - FIICCPROFILE *iccProfile = FreeImage_GetICCProfile(dib); - if (iccProfile->size && iccProfile->data) { - WebPData icc_profile; - icc_profile.bytes = (uint8_t*)iccProfile->data; - icc_profile.size = (size_t)iccProfile->size; - error_status = WebPMuxSetChunk(mux, "ICCP", &icc_profile, copy_data); - if(error_status != WEBP_MUX_OK) { - throw (1); - } - } - } - - // set XMP metadata - { - FITAG *tag = NULL; - if(FreeImage_GetMetadata(FIMD_XMP, dib, g_TagLib_XMPFieldName, &tag)) { - WebPData xmp_profile; - xmp_profile.bytes = (uint8_t*)FreeImage_GetTagValue(tag); - xmp_profile.size = (size_t)FreeImage_GetTagLength(tag); - error_status = WebPMuxSetChunk(mux, "XMP ", &xmp_profile, copy_data); - if(error_status != WEBP_MUX_OK) { - throw (1); - } - } - } - - // set Exif metadata - { - FITAG *tag = NULL; - if(FreeImage_GetMetadata(FIMD_EXIF_RAW, dib, g_TagLib_ExifRawFieldName, &tag)) { - WebPData exif_profile; - exif_profile.bytes = (uint8_t*)FreeImage_GetTagValue(tag); - exif_profile.size = (size_t)FreeImage_GetTagLength(tag); - error_status = WebPMuxSetChunk(mux, "EXIF", &exif_profile, copy_data); - if(error_status != WEBP_MUX_OK) { - throw (1); - } - } - } - - // get data from mux in WebP RIFF format - error_status = WebPMuxAssemble(mux, &output_data); - if(error_status != WEBP_MUX_OK) { - FreeImage_OutputMessageProc(s_format_id, "Failed to create webp output file"); - throw (1); - } - - // write the file to the output stream - if(io->write_proc((void*)output_data.bytes, 1, (unsigned)output_data.size, handle) != output_data.size) { - FreeImage_OutputMessageProc(s_format_id, "Failed to write webp output file"); - throw (1); - } - - // free WebP output file - WebPDataClear(&output_data); - - return TRUE; - - } catch(int) { - if(hmem) { - FreeImage_CloseMemory(hmem); - } - - WebPDataClear(&output_data); - - return FALSE; - } -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitWEBP(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = Open; - plugin->close_proc = Close; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = SupportsICCProfiles; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginXBM.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginXBM.cpp deleted file mode 100644 index 0aac48c..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginXBM.cpp +++ /dev/null @@ -1,399 +0,0 @@ -// ========================================================== -// XBM Loader -// -// Design and implementation by -// - Herv Drolon -// part of the code adapted from the netPBM package (xbmtopbm.c) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// -// -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ========================================================== -// Internal functions -// ========================================================== - -#define MAX_LINE 512 - -static const char *ERR_XBM_SYNTAX = "Syntax error"; -static const char *ERR_XBM_LINE = "Line too long"; -static const char *ERR_XBM_DECL = "Unable to find a line in the file containing the start of C array declaration (\"static char\" or whatever)"; -static const char *ERR_XBM_EOFREAD = "EOF / read error"; -static const char *ERR_XBM_WIDTH = "Invalid width"; -static const char *ERR_XBM_HEIGHT = "Invalid height"; -static const char *ERR_XBM_MEMORY = "Out of memory"; - -/** -Get a string from a stream. -Read the string from the current stream to the first newline character. -The result stored in str is appended with a null character. -@param str Storage location for data -@param n Maximum number of characters to read -@param io Pointer to the FreeImageIO structure -@param handle Handle to the stream -@return Returns str. NULL is returned to indicate an error or an end-of-file condition. -*/ -static char* -readLine(char *str, int n, FreeImageIO *io, fi_handle handle) { - char c; - int count, i = 0; - do { - count = io->read_proc(&c, 1, 1, handle); - str[i++] = c; - } while((c != '\n') && (i < n)); - if(count <= 0) - return NULL; - str[i] = '\0'; - return str; -} - -/** -Get a char from the stream -@param io Pointer to the FreeImageIO structure -@param handle Handle to the stream -@return Returns the next character in the stream -*/ -static int -readChar(FreeImageIO *io, fi_handle handle) { - BYTE c; - io->read_proc(&c, 1, 1, handle); - return c; -} - -/** -Read an XBM file into a buffer -@param io Pointer to the FreeImageIO structure -@param handle Handle to the stream -@param widthP (return value) Pointer to the bitmap width -@param heightP (return value) Pointer to the bitmap height -@param dataP (return value) Pointer to the bitmap buffer -@return Returns NULL if OK, returns an error message otherwise -*/ -static const char* -readXBMFile(FreeImageIO *io, fi_handle handle, int *widthP, int *heightP, char **dataP) { - char line[MAX_LINE], name_and_type[MAX_LINE]; - char* ptr; - char* t; - int version = 0; - int raster_length, v; - int bytes, bytes_per_line, padding; - int c1, c2, value1, value2; - int hex_table[256]; - BOOL found_declaration; - /* in scanning through the bitmap file, we have found the first - line of the C declaration of the array (the "static char ..." - or whatever line) - */ - BOOL eof; // we've encountered end of file while searching file - - *widthP = *heightP = -1; - - found_declaration = FALSE; // haven't found it yet; haven't even looked - eof = FALSE; // haven't encountered end of file yet - - while(!found_declaration && !eof) { - - if( readLine(line, MAX_LINE, io, handle) == NULL) { - eof = TRUE; - } - else { - if( strlen( line ) == MAX_LINE - 1 ) - return( ERR_XBM_LINE ); - if( sscanf(line, "#define %s %d", name_and_type, &v) == 2 ) { - if( ( t = strrchr( name_and_type, '_' ) ) == NULL ) - t = name_and_type; - else - t++; - if ( ! strcmp( "width", t ) ) - *widthP = v; - else if ( ! strcmp( "height", t ) ) - *heightP = v; - continue; - } - - if( sscanf( line, "static short %s = {", name_and_type ) == 1 ) { - version = 10; - found_declaration = TRUE; - } - else if( sscanf( line, "static char %s = {", name_and_type ) == 1 ) { - version = 11; - found_declaration = TRUE; - } - else if(sscanf(line, "static unsigned char %s = {", name_and_type ) == 1 ) { - version = 11; - found_declaration = TRUE; - } - } - } - - if(!found_declaration) - return( ERR_XBM_DECL ); - - if(*widthP == -1 ) - return( ERR_XBM_WIDTH ); - if( *heightP == -1 ) - return( ERR_XBM_HEIGHT ); - - padding = 0; - if ( ((*widthP % 16) >= 1) && ((*widthP % 16) <= 8) && (version == 10) ) - padding = 1; - - bytes_per_line = (*widthP + 7) / 8 + padding; - - raster_length = bytes_per_line * *heightP; - *dataP = (char*) malloc( raster_length ); - if ( *dataP == (char*) 0 ) - return( ERR_XBM_MEMORY ); - - // initialize hex_table - for ( c1 = 0; c1 < 256; c1++ ) { - hex_table[c1] = 256; - } - hex_table['0'] = 0; - hex_table['1'] = 1; - hex_table['2'] = 2; - hex_table['3'] = 3; - hex_table['4'] = 4; - hex_table['5'] = 5; - hex_table['6'] = 6; - hex_table['7'] = 7; - hex_table['8'] = 8; - hex_table['9'] = 9; - hex_table['A'] = 10; - hex_table['B'] = 11; - hex_table['C'] = 12; - hex_table['D'] = 13; - hex_table['E'] = 14; - hex_table['F'] = 15; - hex_table['a'] = 10; - hex_table['b'] = 11; - hex_table['c'] = 12; - hex_table['d'] = 13; - hex_table['e'] = 14; - hex_table['f'] = 15; - - if(version == 10) { - for( bytes = 0, ptr = *dataP; bytes < raster_length; bytes += 2 ) { - while( ( c1 = readChar(io, handle) ) != 'x' ) { - if ( c1 == EOF ) - return( ERR_XBM_EOFREAD ); - } - - c1 = readChar(io, handle); - c2 = readChar(io, handle); - if( c1 == EOF || c2 == EOF ) - return( ERR_XBM_EOFREAD ); - value1 = ( hex_table[c1] << 4 ) + hex_table[c2]; - if ( value1 >= 256 ) - return( ERR_XBM_SYNTAX ); - c1 = readChar(io, handle); - c2 = readChar(io, handle); - if( c1 == EOF || c2 == EOF ) - return( ERR_XBM_EOFREAD ); - value2 = ( hex_table[c1] << 4 ) + hex_table[c2]; - if ( value2 >= 256 ) - return( ERR_XBM_SYNTAX ); - *ptr++ = (char)value2; - if ( ( ! padding ) || ( ( bytes + 2 ) % bytes_per_line ) ) - *ptr++ = (char)value1; - } - } - else { - for(bytes = 0, ptr = *dataP; bytes < raster_length; bytes++ ) { - /* - ** skip until digit is found - */ - for( ; ; ) { - c1 = readChar(io, handle); - if ( c1 == EOF ) - return( ERR_XBM_EOFREAD ); - value1 = hex_table[c1]; - if ( value1 != 256 ) - break; - } - /* - ** loop on digits - */ - for( ; ; ) { - c2 = readChar(io, handle); - if ( c2 == EOF ) - return( ERR_XBM_EOFREAD ); - value2 = hex_table[c2]; - if ( value2 != 256 ) { - value1 = (value1 << 4) | value2; - if ( value1 >= 256 ) - return( ERR_XBM_SYNTAX ); - } - else if ( c2 == 'x' || c2 == 'X' ) { - if ( value1 == 0 ) - continue; - else return( ERR_XBM_SYNTAX ); - } - else break; - } - *ptr++ = (char)value1; - } - } - - return NULL; -} - -// ========================================================== -// Plugin Interface -// ========================================================== - -static int s_format_id; - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "XBM"; -} - -static const char * DLL_CALLCONV -Description() { - return "X11 Bitmap Format"; -} - -static const char * DLL_CALLCONV -Extension() { - return "xbm"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return NULL; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-xbitmap"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - char magic[8]; - if(readLine(magic, 7, io, handle)) { - if(strcmp(magic, "#define") == 0) - return TRUE; - } - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return FALSE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - char *buffer = NULL; - int width, height; - FIBITMAP *dib = NULL; - - try { - - // load the bitmap data - const char* error = readXBMFile(io, handle, &width, &height, &buffer); - // Microsoft doesn't implement throw between functions :( - if(error) throw (char*)error; - - - // allocate a new dib - dib = FreeImage_Allocate(width, height, 1); - if(!dib) throw (char*)ERR_XBM_MEMORY; - - // write the palette data - RGBQUAD *pal = FreeImage_GetPalette(dib); - pal[0].rgbRed = pal[0].rgbGreen = pal[0].rgbBlue = 0; - pal[1].rgbRed = pal[1].rgbGreen = pal[1].rgbBlue = 255; - - // copy the bitmap - BYTE *bP = (BYTE*)buffer; - for(int y = 0; y < height; y++) { - BYTE count = 0; - BYTE mask = 1; - BYTE *bits = FreeImage_GetScanLine(dib, height - 1 - y); - - for(int x = 0; x < width; x++) { - if(count >= 8) { - bP++; - count = 0; - mask = 1; - } - if(*bP & mask) { - // Set bit(x, y) to 0 - bits[x >> 3] &= (0xFF7F >> (x & 0x7)); - } else { - // Set bit(x, y) to 1 - bits[x >> 3] |= (0x80 >> (x & 0x7)); - } - count++; - mask <<= 1; - } - bP++; - } - - free(buffer); - return dib; - - } catch(const char *text) { - if(buffer) free(buffer); - if(dib) FreeImage_Unload(dib); - FreeImage_OutputMessageProc(s_format_id, text); - return NULL; - } -} - - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitXBM(Plugin *plugin, int format_id) { - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = NULL; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/PluginXPM.cpp b/Dependencies/FreeImage/Source/FreeImage/PluginXPM.cpp deleted file mode 100644 index cc7bd07..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/PluginXPM.cpp +++ /dev/null @@ -1,492 +0,0 @@ -// ========================================================== -// XPM Loader and Writer -// -// Design and implementation by -// - Ryan Rubley (ryan@lostreality.org) -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -// IMPLEMENTATION NOTES: -// ------------------------ -// Initial design and implementation by -// - Karl-Heinz Bussian (khbussian@moss.de) -// - Herv Drolon (drolon@infonie.fr) -// Completely rewritten from scratch by Ryan Rubley (ryan@lostreality.org) -// in order to address the following major fixes: -// * Supports any number of chars per pixel (not just 1 or 2) -// * Files with 2 chars per pixel but <= 256colors are loaded as 256 color (not 24bit) -// * Loads much faster, uses much less memory -// * supports #rgb #rrrgggbbb and #rrrrggggbbbb colors (not just #rrggbb) -// * supports symbolic color names -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ========================================================== -// Plugin Interface -// ========================================================== -static int s_format_id; - -// ========================================================== -// Internal Functions -// ========================================================== - -// read in and skip all junk until we find a certain char -static BOOL -FindChar(FreeImageIO *io, fi_handle handle, BYTE look_for) { - BYTE c; - io->read_proc(&c, sizeof(BYTE), 1, handle); - while(c != look_for) { - if( io->read_proc(&c, sizeof(BYTE), 1, handle) != 1 ) - return FALSE; - } - return TRUE; -} - -// find start of string, read data until ending quote found, allocate memory and return a string -static char * -ReadString(FreeImageIO *io, fi_handle handle) { - if( !FindChar(io, handle,'"') ) - return NULL; - BYTE c; - std::string s; - io->read_proc(&c, sizeof(BYTE), 1, handle); - while(c != '"') { - s += c; - if( io->read_proc(&c, sizeof(BYTE), 1, handle) != 1 ) - return NULL; - } - char *cstr = (char *)malloc(s.length()+1); - strcpy(cstr,s.c_str()); - return cstr; -} - -static char * -Base92(unsigned int num) { - static char b92[16]; //enough for more then 64 bits - static char digit[] = " .XoO+@#$%&*=-;:>,<1234567890qwertyuipasdfghjklzxcvbnmMNBVCZASDFGHJKLPIUYTREWQ!~^/()_`'][{}|"; - b92[15] = '\0'; - int i = 14; - do { - b92[i--] = digit[num % 92]; - num /= 92; - } while( num && i >= 0 ); - return b92+i+1; -} - -// ========================================================== -// Plugin Implementation -// ========================================================== - -static const char * DLL_CALLCONV -Format() { - return "XPM"; -} - -static const char * DLL_CALLCONV -Description() { - return "X11 Pixmap Format"; -} - -static const char * DLL_CALLCONV -Extension() { - return "xpm"; -} - -static const char * DLL_CALLCONV -RegExpr() { - return "^[ \\t]*/\\* XPM \\*/[ \\t]$"; -} - -static const char * DLL_CALLCONV -MimeType() { - return "image/x-xpixmap"; -} - -static BOOL DLL_CALLCONV -Validate(FreeImageIO *io, fi_handle handle) { - char buffer[256]; - - // checks the first 256 characters for the magic string - int count = io->read_proc(buffer, 1, 256, handle); - if(count <= 9) return FALSE; - for(int i = 0; i < (count - 9); i++) { - if(strncmp(&buffer[i], "/* XPM */", 9) == 0) - return TRUE; - } - return FALSE; -} - -static BOOL DLL_CALLCONV -SupportsExportDepth(int depth) { - return ( - (depth == 8) || - (depth == 24) - ); -} - -static BOOL DLL_CALLCONV -SupportsExportType(FREE_IMAGE_TYPE type) { - return (type == FIT_BITMAP) ? TRUE : FALSE; -} - -static BOOL DLL_CALLCONV -SupportsNoPixels() { - return TRUE; -} - -// ---------------------------------------------------------- - -static FIBITMAP * DLL_CALLCONV -Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - char msg[256]; - FIBITMAP *dib = NULL; - - if (!handle) return NULL; - - try { - char *str; - - BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS; - - //find the starting brace - if( !FindChar(io, handle,'{') ) - throw "Could not find starting brace"; - - //read info string - str = ReadString(io, handle); - if(!str) - throw "Error reading info string"; - - int width, height, colors, cpp; - if( sscanf(str, "%d %d %d %d", &width, &height, &colors, &cpp) != 4 ) { - free(str); - throw "Improperly formed info string"; - } - free(str); - - // check info string - if((width <= 0) || (height <= 0) || (colors <= 0) || (cpp <= 0)) { - throw "Improperly formed info string"; - } - - if (colors > 256) { - dib = FreeImage_AllocateHeader(header_only, width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } else { - dib = FreeImage_AllocateHeader(header_only, width, height, 8); - } - - //build a map of color chars to rgb values - std::map rawpal; //will store index in Alpha if 8bpp - for(int i = 0; i < colors; i++ ) { - FILE_RGBA rgba; - - str = ReadString(io, handle); - if(!str || (strlen(str) < (size_t)cpp)) - throw "Error reading color strings"; - - std::string chrs(str,cpp); //create a string for the color chars using the first cpp chars - char *keys = str + cpp; //the color keys for these chars start after the first cpp chars - - //translate all the tabs to spaces - char *tmp = keys; - while( strchr(tmp,'\t') ) { - tmp = strchr(tmp,'\t'); - *tmp++ = ' '; - } - - //prefer the color visual - if( strstr(keys," c ") ) { - char *clr = strstr(keys," c ") + 3; - while( *clr == ' ' ) clr++; //find the start of the hex rgb value - if( *clr == '#' ) { - int red = 0, green = 0, blue = 0, n; - clr++; - //end string at first space, if any found - if( strchr(clr,' ') ) - *(strchr(clr,' ')) = '\0'; - //parse hex color, it can be #rgb #rrggbb #rrrgggbbb or #rrrrggggbbbb - switch( strlen(clr) ) { - case 3: n = sscanf(clr,"%01x%01x%01x",&red,&green,&blue); - red |= (red << 4); - green |= (green << 4); - blue |= (blue << 4); - break; - case 6: n = sscanf(clr,"%02x%02x%02x",&red,&green,&blue); - break; - case 9: n = sscanf(clr,"%03x%03x%03x",&red,&green,&blue); - red >>= 4; - green >>= 4; - blue >>= 4; - break; - case 12: n = sscanf(clr,"%04x%04x%04x",&red,&green,&blue); - red >>= 8; - green >>= 8; - blue >>= 8; - break; - default: - n = 0; - break; - } - if( n != 3 ) { - free(str); - throw "Improperly formed hex color value"; - } - rgba.r = (BYTE)red; - rgba.g = (BYTE)green; - rgba.b = (BYTE)blue; - } else if( !strncmp(clr,"None",4) || !strncmp(clr,"none",4) ) { - rgba.r = rgba.g = rgba.b = 0xFF; - } else { - char *tmp = clr; - - //scan forward for each space, if its " x " or " xx " end the string there - //this means its probably some other visual data beyond that point and not - //part of the color name. How many named color end with a 1 or 2 character - //word? Probably none in our list at least. - while( (tmp = strchr(tmp,' ')) != NULL ) { - if( tmp[1] != ' ' ) { - if( (tmp[2] == ' ') || (tmp[2] != ' ' && tmp[3] == ' ') ) { - tmp[0] = '\0'; - break; - } - } - tmp++; - } - - //remove any trailing spaces - tmp = clr+strlen(clr)-1; - while( *tmp == ' ' ) { - *tmp = '\0'; - tmp--; - } - - if (!FreeImage_LookupX11Color(clr, &rgba.r, &rgba.g, &rgba.b)) { - sprintf(msg, "Unknown color name '%s'", str); - free(str); - throw msg; - } - } - } else { - free(str); - throw "Only color visuals are supported"; - } - - //add color to map - rgba.a = (BYTE)((colors > 256) ? 0 : i); - rawpal[chrs] = rgba; - - //build palette if needed - if( colors <= 256 ) { - RGBQUAD *pal = FreeImage_GetPalette(dib); - pal[i].rgbBlue = rgba.b; - pal[i].rgbGreen = rgba.g; - pal[i].rgbRed = rgba.r; - } - - free(str); - } - //done parsing color map - - if(header_only) { - // header only mode - return dib; - } - - //read in pixel data - for(int y = 0; y < height; y++ ) { - BYTE *line = FreeImage_GetScanLine(dib, height - y - 1); - str = ReadString(io, handle); - if(!str) - throw "Error reading pixel strings"; - char *pixel_ptr = str; - - for(int x = 0; x < width; x++ ) { - //locate the chars in the color map - std::string chrs(pixel_ptr,cpp); - FILE_RGBA rgba = rawpal[chrs]; - - if( colors > 256 ) { - line[FI_RGBA_BLUE] = rgba.b; - line[FI_RGBA_GREEN] = rgba.g; - line[FI_RGBA_RED] = rgba.r; - line += 3; - } else { - *line = rgba.a; - line++; - } - - pixel_ptr += cpp; - } - - free(str); - } - //done reading pixel data - - return dib; - } catch(const char *text) { - FreeImage_OutputMessageProc(s_format_id, text); - - if( dib != NULL ) - FreeImage_Unload(dib); - - return NULL; - } -} - -static BOOL DLL_CALLCONV -Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { - if ((dib != NULL) && (handle != NULL)) { - char header[] = "/* XPM */\nstatic char *freeimage[] = {\n/* width height num_colors chars_per_pixel */\n\"", - start_colors[] = "\",\n/* colors */\n\"", - start_pixels[] = "\",\n/* pixels */\n\"", - new_line[] = "\",\n\"", - footer[] = "\"\n};\n", - buf[256]; //256 is more then enough to sprintf 4 ints into, or the base-92 chars and #rrggbb line - - if( io->write_proc(header, (unsigned int)strlen(header), 1, handle) != 1 ) - return FALSE; - - int width = FreeImage_GetWidth(dib), height = FreeImage_GetHeight(dib), bpp = FreeImage_GetBPP(dib); - RGBQUAD *pal = FreeImage_GetPalette(dib); - int x,y; - - //map base92 chrs to the rgb value to create the palette - std::map chrs2color; - //map 8bpp index or 24bpp rgb value to the base92 chrs to create pixel data - typedef union { - DWORD index; - FILE_RGBA rgba; - } DWORDRGBA; - std::map color2chrs; - - //loop thru entire dib, if new color, inc num_colors and add to both maps - int num_colors = 0; - for(y = 0; y < height; y++ ) { - BYTE *line = FreeImage_GetScanLine(dib, height - y - 1); - for(x = 0; x < width; x++ ) { - FILE_RGB rgb; - DWORDRGBA u; - if( bpp > 8 ) { - u.rgba.b = rgb.b = line[FI_RGBA_BLUE]; - u.rgba.g = rgb.g = line[FI_RGBA_GREEN]; - u.rgba.r = rgb.r = line[FI_RGBA_RED]; - u.rgba.a = 0; - line += 3; - } else { - u.index = *line; - rgb.b = pal[u.index].rgbBlue; - rgb.g = pal[u.index].rgbGreen; - rgb.r = pal[u.index].rgbRed; - line++; - } - if( color2chrs.find(u.index) == color2chrs.end() ) { //new color - std::string chrs(Base92(num_colors)); - color2chrs[u.index] = chrs; - chrs2color[num_colors] = rgb; - num_colors++; - } - } - } - - int cpp = (int)(log((double)num_colors)/log(92.0)) + 1; - - sprintf(buf, "%d %d %d %d", FreeImage_GetWidth(dib), FreeImage_GetHeight(dib), num_colors, cpp ); - if( io->write_proc(buf, (unsigned int)strlen(buf), 1, handle) != 1 ) - return FALSE; - - if( io->write_proc(start_colors, (unsigned int)strlen(start_colors), 1, handle) != 1 ) - return FALSE; - - //write colors, using map of chrs->rgb - for(x = 0; x < num_colors; x++ ) { - sprintf(buf, "%*s c #%02x%02x%02x", cpp, Base92(x), chrs2color[x].r, chrs2color[x].g, chrs2color[x].b ); - if( io->write_proc(buf, (unsigned int)strlen(buf), 1, handle) != 1 ) - return FALSE; - if( x == num_colors - 1 ) { - if( io->write_proc(start_pixels, (unsigned int)strlen(start_pixels), 1, handle) != 1 ) - return FALSE; - } else { - if( io->write_proc(new_line, (unsigned int)strlen(new_line), 1, handle) != 1 ) - return FALSE; - } - } - - - //write pixels, using map of rgb(if 24bpp) or index(if 8bpp)->chrs - for(y = 0; y < height; y++ ) { - BYTE *line = FreeImage_GetScanLine(dib, height - y - 1); - for(x = 0; x < width; x++ ) { - DWORDRGBA u; - if( bpp > 8 ) { - u.rgba.b = line[FI_RGBA_BLUE]; - u.rgba.g = line[FI_RGBA_GREEN]; - u.rgba.r = line[FI_RGBA_RED]; - u.rgba.a = 0; - line += 3; - } else { - u.index = *line; - line++; - } - sprintf(buf, "%*s", cpp, (char *)color2chrs[u.index].c_str()); - if( io->write_proc(buf, cpp, 1, handle) != 1 ) - return FALSE; - } - if( y == height - 1 ) { - if( io->write_proc(footer, (unsigned int)strlen(footer), 1, handle) != 1 ) - return FALSE; - } else { - if( io->write_proc(new_line, (unsigned int)strlen(new_line), 1, handle) != 1 ) - return FALSE; - } - } - - return TRUE; - } else { - return FALSE; - } -} - -// ========================================================== -// Init -// ========================================================== - -void DLL_CALLCONV -InitXPM(Plugin *plugin, int format_id) -{ - s_format_id = format_id; - - plugin->format_proc = Format; - plugin->description_proc = Description; - plugin->extension_proc = Extension; - plugin->regexpr_proc = RegExpr; - plugin->open_proc = NULL; - plugin->close_proc = NULL; - plugin->pagecount_proc = NULL; - plugin->pagecapability_proc = NULL; - plugin->load_proc = Load; - plugin->save_proc = Save; - plugin->validate_proc = Validate; - plugin->mime_proc = MimeType; - plugin->supports_export_bpp_proc = SupportsExportDepth; - plugin->supports_export_type_proc = SupportsExportType; - plugin->supports_icc_profiles_proc = NULL; - plugin->supports_no_pixels_proc = SupportsNoPixels; -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/TIFFLogLuv.cpp b/Dependencies/FreeImage/Source/FreeImage/TIFFLogLuv.cpp deleted file mode 100644 index 124b25f..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/TIFFLogLuv.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// ========================================================== -// XYZ to RGB TIFF conversion routines -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -void tiff_ConvertLineXYZToRGB(BYTE *target, BYTE *source, double stonits, int width_in_pixels) { - FIRGBF *rgbf = (FIRGBF*)target; - float *xyz = (float*)source; - - for (int cols = 0; cols < width_in_pixels; cols++) { - // assume CCIR-709 primaries (matrix from tif_luv.c) - // LOG Luv XYZ (D65) -> sRGB (CIE Illuminant E) - rgbf->red = (float)( 2.690*xyz[0] + -1.276*xyz[1] + -0.414*xyz[2]); - rgbf->green = (float)(-1.022*xyz[0] + 1.978*xyz[1] + 0.044*xyz[2]); - rgbf->blue = (float)( 0.061*xyz[0] + -0.224*xyz[1] + 1.163*xyz[2]); - - /* - if (stonits != 0.0) { - rgbf->red = (float)(rgbf->red * stonits); - rgbf->green = (float)(rgbf->green * stonits); - rgbf->blue = (float)(rgbf->blue * stonits); - } - */ - - rgbf++; - xyz += 3; - } -} - -void tiff_ConvertLineRGBToXYZ(BYTE *target, BYTE *source, int width_in_pixels) { - FIRGBF *rgbf = (FIRGBF*)source; - float *xyz = (float*)target; - - for (int cols = 0; cols < width_in_pixels; cols++) { - // assume CCIR-709 primaries, whitepoint x = 1/3 y = 1/3 (D_E) - // "The LogLuv Encoding for Full Gamut, High Dynamic Range Images" - // sRGB ( CIE Illuminant E ) -> LOG Luv XYZ (D65) - xyz[0] = (float)(0.497*rgbf->red + 0.339*rgbf->green + 0.164*rgbf->blue); - xyz[1] = (float)(0.256*rgbf->red + 0.678*rgbf->green + 0.066*rgbf->blue); - xyz[2] = (float)(0.023*rgbf->red + 0.113*rgbf->green + 0.864*rgbf->blue); - - rgbf++; - xyz += 3; - } -} - diff --git a/Dependencies/FreeImage/Source/FreeImage/ToneMapping.cpp b/Dependencies/FreeImage/Source/FreeImage/ToneMapping.cpp deleted file mode 100644 index 27f8c95..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/ToneMapping.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// ========================================================== -// Tone mapping operators -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -/** -Performs a tone mapping on a 48-bit RGB or a 96-bit RGBF image and returns a 24-bit image. -The meaning of the parameters depends on the choosen algorithm. -When both parameters are set to zero, a default set of parameters is used. -@param dib Input RGB/RGBF image -@param tmo Tone mapping operator -@param first_param First parameter of the algorithm -@param second_param Second parameter of the algorithm -return Returns a 24-bit tone mapped image if successful, returns NULL otherwise -*/ -FIBITMAP * DLL_CALLCONV -FreeImage_ToneMapping(FIBITMAP *dib, FREE_IMAGE_TMO tmo, double first_param, double second_param) { - if(FreeImage_HasPixels(dib)) { - switch(tmo) { - // Adaptive logarithmic mapping (F. Drago, 2003) - case FITMO_DRAGO03: - if((first_param == 0) && (second_param == 0)) { - // use default values (gamma = 2.2, exposure = 0) - return FreeImage_TmoDrago03(dib, 2.2, 0); - } else { - // use user's value - return FreeImage_TmoDrago03(dib, first_param, second_param); - } - break; - // Dynamic range reduction inspired by photoreceptor phhysiology (E. Reinhard, 2005) - case FITMO_REINHARD05: - if((first_param == 0) && (second_param == 0)) { - // use default values by setting intensity to 0 and contrast to 0 - return FreeImage_TmoReinhard05(dib, 0, 0); - } else { - // use user's value - return FreeImage_TmoReinhard05(dib, first_param, second_param); - } - break; - // Gradient Domain HDR Compression (R. Fattal, 2002) - case FITMO_FATTAL02: - if((first_param == 0) && (second_param == 0)) { - // use default values by setting color saturation to 0.5 and attenuation to 0.85 - return FreeImage_TmoFattal02(dib, 0.5, 0.85); - } else { - // use user's value - return FreeImage_TmoFattal02(dib, first_param, second_param); - } - break; - } - } - - return NULL; -} - - diff --git a/Dependencies/FreeImage/Source/FreeImage/WuQuantizer.cpp b/Dependencies/FreeImage/Source/FreeImage/WuQuantizer.cpp deleted file mode 100644 index 66d3706..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/WuQuantizer.cpp +++ /dev/null @@ -1,559 +0,0 @@ -/////////////////////////////////////////////////////////////////////// -// C Implementation of Wu's Color Quantizer (v. 2) -// (see Graphics Gems vol. II, pp. 126-133) -// -// Author: Xiaolin Wu -// Dept. of Computer Science -// Univ. of Western Ontario -// London, Ontario N6A 5B7 -// wu@csd.uwo.ca -// -// Algorithm: Greedy orthogonal bipartition of RGB space for variance -// minimization aided by inclusion-exclusion tricks. -// For speed no nearest neighbor search is done. Slightly -// better performance can be expected by more sophisticated -// but more expensive versions. -// -// The author thanks Tom Lane at Tom_Lane@G.GP.CS.CMU.EDU for much of -// additional documentation and a cure to a previous bug. -// -// Free to distribute, comments and suggestions are appreciated. -/////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////// -// History -// ------- -// July 2000: C++ Implementation of Wu's Color Quantizer -// and adaptation for the FreeImage 2 Library -// Author: Herv Drolon (drolon@infonie.fr) -// March 2004: Adaptation for the FreeImage 3 library (port to big endian processors) -// Author: Herv Drolon (drolon@infonie.fr) -/////////////////////////////////////////////////////////////////////// - -#include "Quantizers.h" -#include "FreeImage.h" -#include "Utilities.h" - -/////////////////////////////////////////////////////////////////////// - -// Size of a 3D array : 33 x 33 x 33 -#define SIZE_3D 35937 - -// 3D array indexation -#define INDEX(r, g, b) ((r << 10) + (r << 6) + r + (g << 5) + g + b) - -#define MAXCOLOR 256 - -// Constructor / Destructor - -WuQuantizer::WuQuantizer(FIBITMAP *dib) { - width = FreeImage_GetWidth(dib); - height = FreeImage_GetHeight(dib); - pitch = FreeImage_GetPitch(dib); - m_dib = dib; - - gm2 = NULL; - wt = mr = mg = mb = NULL; - Qadd = NULL; - - // Allocate 3D arrays - gm2 = (float*)malloc(SIZE_3D * sizeof(float)); - wt = (LONG*)malloc(SIZE_3D * sizeof(LONG)); - mr = (LONG*)malloc(SIZE_3D * sizeof(LONG)); - mg = (LONG*)malloc(SIZE_3D * sizeof(LONG)); - mb = (LONG*)malloc(SIZE_3D * sizeof(LONG)); - - // Allocate Qadd - Qadd = (WORD *)malloc(sizeof(WORD) * width * height); - - if(!gm2 || !wt || !mr || !mg || !mb || !Qadd) { - if(gm2) free(gm2); - if(wt) free(wt); - if(mr) free(mr); - if(mg) free(mg); - if(mb) free(mb); - if(Qadd) free(Qadd); - throw FI_MSG_ERROR_MEMORY; - } - memset(gm2, 0, SIZE_3D * sizeof(float)); - memset(wt, 0, SIZE_3D * sizeof(LONG)); - memset(mr, 0, SIZE_3D * sizeof(LONG)); - memset(mg, 0, SIZE_3D * sizeof(LONG)); - memset(mb, 0, SIZE_3D * sizeof(LONG)); - memset(Qadd, 0, sizeof(WORD) * width * height); -} - -WuQuantizer::~WuQuantizer() { - if(gm2) free(gm2); - if(wt) free(wt); - if(mr) free(mr); - if(mg) free(mg); - if(mb) free(mb); - if(Qadd) free(Qadd); -} - - -// Histogram is in elements 1..HISTSIZE along each axis, -// element 0 is for base or marginal value -// NB: these must start out 0! - -// Build 3-D color histogram of counts, r/g/b, c^2 -void -WuQuantizer::Hist3D(LONG *vwt, LONG *vmr, LONG *vmg, LONG *vmb, float *m2, int ReserveSize, RGBQUAD *ReservePalette) { - int ind = 0; - int inr, ing, inb, table[256]; - int i; - unsigned y, x; - - for(i = 0; i < 256; i++) - table[i] = i * i; - - if (FreeImage_GetBPP(m_dib) == 24) { - for(y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(m_dib, y); - - for(x = 0; x < width; x++) { - inr = (bits[FI_RGBA_RED] >> 3) + 1; - ing = (bits[FI_RGBA_GREEN] >> 3) + 1; - inb = (bits[FI_RGBA_BLUE] >> 3) + 1; - ind = INDEX(inr, ing, inb); - Qadd[y*width + x] = (WORD)ind; - // [inr][ing][inb] - vwt[ind]++; - vmr[ind] += bits[FI_RGBA_RED]; - vmg[ind] += bits[FI_RGBA_GREEN]; - vmb[ind] += bits[FI_RGBA_BLUE]; - m2[ind] += (float)(table[bits[FI_RGBA_RED]] + table[bits[FI_RGBA_GREEN]] + table[bits[FI_RGBA_BLUE]]); - bits += 3; - } - } - } else { - for(y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(m_dib, y); - - for(x = 0; x < width; x++) { - inr = (bits[FI_RGBA_RED] >> 3) + 1; - ing = (bits[FI_RGBA_GREEN] >> 3) + 1; - inb = (bits[FI_RGBA_BLUE] >> 3) + 1; - ind = INDEX(inr, ing, inb); - Qadd[y*width + x] = (WORD)ind; - // [inr][ing][inb] - vwt[ind]++; - vmr[ind] += bits[FI_RGBA_RED]; - vmg[ind] += bits[FI_RGBA_GREEN]; - vmb[ind] += bits[FI_RGBA_BLUE]; - m2[ind] += (float)(table[bits[FI_RGBA_RED]] + table[bits[FI_RGBA_GREEN]] + table[bits[FI_RGBA_BLUE]]); - bits += 4; - } - } - } - - if( ReserveSize > 0 ) { - int max = 0; - for(i = 0; i < SIZE_3D; i++) { - if( vwt[i] > max ) max = vwt[i]; - } - max++; - for(i = 0; i < ReserveSize; i++) { - inr = (ReservePalette[i].rgbRed >> 3) + 1; - ing = (ReservePalette[i].rgbGreen >> 3) + 1; - inb = (ReservePalette[i].rgbBlue >> 3) + 1; - ind = INDEX(inr, ing, inb); - wt[ind] = max; - mr[ind] = max * ReservePalette[i].rgbRed; - mg[ind] = max * ReservePalette[i].rgbGreen; - mb[ind] = max * ReservePalette[i].rgbBlue; - gm2[ind] = (float)max * (float)(table[ReservePalette[i].rgbRed] + table[ReservePalette[i].rgbGreen] + table[ReservePalette[i].rgbBlue]); - } - } -} - - -// At conclusion of the histogram step, we can interpret -// wt[r][g][b] = sum over voxel of P(c) -// mr[r][g][b] = sum over voxel of r*P(c) , similarly for mg, mb -// m2[r][g][b] = sum over voxel of c^2*P(c) -// Actually each of these should be divided by 'ImageSize' to give the usual -// interpretation of P() as ranging from 0 to 1, but we needn't do that here. - - -// We now convert histogram into moments so that we can rapidly calculate -// the sums of the above quantities over any desired box. - -// Compute cumulative moments -void -WuQuantizer::M3D(LONG *vwt, LONG *vmr, LONG *vmg, LONG *vmb, float *m2) { - unsigned ind1, ind2; - BYTE i, r, g, b; - LONG line, line_r, line_g, line_b; - LONG area[33], area_r[33], area_g[33], area_b[33]; - float line2, area2[33]; - - for(r = 1; r <= 32; r++) { - for(i = 0; i <= 32; i++) { - area2[i] = 0; - area[i] = area_r[i] = area_g[i] = area_b[i] = 0; - } - for(g = 1; g <= 32; g++) { - line2 = 0; - line = line_r = line_g = line_b = 0; - for(b = 1; b <= 32; b++) { - ind1 = INDEX(r, g, b); // [r][g][b] - line += vwt[ind1]; - line_r += vmr[ind1]; - line_g += vmg[ind1]; - line_b += vmb[ind1]; - line2 += m2[ind1]; - area[b] += line; - area_r[b] += line_r; - area_g[b] += line_g; - area_b[b] += line_b; - area2[b] += line2; - ind2 = ind1 - 1089; // [r-1][g][b] - vwt[ind1] = vwt[ind2] + area[b]; - vmr[ind1] = vmr[ind2] + area_r[b]; - vmg[ind1] = vmg[ind2] + area_g[b]; - vmb[ind1] = vmb[ind2] + area_b[b]; - m2[ind1] = m2[ind2] + area2[b]; - } - } - } -} - -// Compute sum over a box of any given statistic -LONG -WuQuantizer::Vol( Box *cube, LONG *mmt ) { - return( mmt[INDEX(cube->r1, cube->g1, cube->b1)] - - mmt[INDEX(cube->r1, cube->g1, cube->b0)] - - mmt[INDEX(cube->r1, cube->g0, cube->b1)] - + mmt[INDEX(cube->r1, cube->g0, cube->b0)] - - mmt[INDEX(cube->r0, cube->g1, cube->b1)] - + mmt[INDEX(cube->r0, cube->g1, cube->b0)] - + mmt[INDEX(cube->r0, cube->g0, cube->b1)] - - mmt[INDEX(cube->r0, cube->g0, cube->b0)] ); -} - -// The next two routines allow a slightly more efficient calculation -// of Vol() for a proposed subbox of a given box. The sum of Top() -// and Bottom() is the Vol() of a subbox split in the given direction -// and with the specified new upper bound. - - -// Compute part of Vol(cube, mmt) that doesn't depend on r1, g1, or b1 -// (depending on dir) - -LONG -WuQuantizer::Bottom(Box *cube, BYTE dir, LONG *mmt) { - switch(dir) - { - case FI_RGBA_RED: - return( - mmt[INDEX(cube->r0, cube->g1, cube->b1)] - + mmt[INDEX(cube->r0, cube->g1, cube->b0)] - + mmt[INDEX(cube->r0, cube->g0, cube->b1)] - - mmt[INDEX(cube->r0, cube->g0, cube->b0)] ); - break; - case FI_RGBA_GREEN: - return( - mmt[INDEX(cube->r1, cube->g0, cube->b1)] - + mmt[INDEX(cube->r1, cube->g0, cube->b0)] - + mmt[INDEX(cube->r0, cube->g0, cube->b1)] - - mmt[INDEX(cube->r0, cube->g0, cube->b0)] ); - break; - case FI_RGBA_BLUE: - return( - mmt[INDEX(cube->r1, cube->g1, cube->b0)] - + mmt[INDEX(cube->r1, cube->g0, cube->b0)] - + mmt[INDEX(cube->r0, cube->g1, cube->b0)] - - mmt[INDEX(cube->r0, cube->g0, cube->b0)] ); - break; - } - - return 0; -} - - -// Compute remainder of Vol(cube, mmt), substituting pos for -// r1, g1, or b1 (depending on dir) - -LONG -WuQuantizer::Top(Box *cube, BYTE dir, int pos, LONG *mmt) { - switch(dir) - { - case FI_RGBA_RED: - return( mmt[INDEX(pos, cube->g1, cube->b1)] - -mmt[INDEX(pos, cube->g1, cube->b0)] - -mmt[INDEX(pos, cube->g0, cube->b1)] - +mmt[INDEX(pos, cube->g0, cube->b0)] ); - break; - case FI_RGBA_GREEN: - return( mmt[INDEX(cube->r1, pos, cube->b1)] - -mmt[INDEX(cube->r1, pos, cube->b0)] - -mmt[INDEX(cube->r0, pos, cube->b1)] - +mmt[INDEX(cube->r0, pos, cube->b0)] ); - break; - case FI_RGBA_BLUE: - return( mmt[INDEX(cube->r1, cube->g1, pos)] - -mmt[INDEX(cube->r1, cube->g0, pos)] - -mmt[INDEX(cube->r0, cube->g1, pos)] - +mmt[INDEX(cube->r0, cube->g0, pos)] ); - break; - } - - return 0; -} - -// Compute the weighted variance of a box -// NB: as with the raw statistics, this is really the variance * ImageSize - -float -WuQuantizer::Var(Box *cube) { - float dr = (float) Vol(cube, mr); - float dg = (float) Vol(cube, mg); - float db = (float) Vol(cube, mb); - float xx = gm2[INDEX(cube->r1, cube->g1, cube->b1)] - -gm2[INDEX(cube->r1, cube->g1, cube->b0)] - -gm2[INDEX(cube->r1, cube->g0, cube->b1)] - +gm2[INDEX(cube->r1, cube->g0, cube->b0)] - -gm2[INDEX(cube->r0, cube->g1, cube->b1)] - +gm2[INDEX(cube->r0, cube->g1, cube->b0)] - +gm2[INDEX(cube->r0, cube->g0, cube->b1)] - -gm2[INDEX(cube->r0, cube->g0, cube->b0)]; - - return (xx - (dr*dr+dg*dg+db*db)/(float)Vol(cube,wt)); -} - -// We want to minimize the sum of the variances of two subboxes. -// The sum(c^2) terms can be ignored since their sum over both subboxes -// is the same (the sum for the whole box) no matter where we split. -// The remaining terms have a minus sign in the variance formula, -// so we drop the minus sign and MAXIMIZE the sum of the two terms. - -float -WuQuantizer::Maximize(Box *cube, BYTE dir, int first, int last , int *cut, LONG whole_r, LONG whole_g, LONG whole_b, LONG whole_w) { - LONG half_r, half_g, half_b, half_w; - int i; - float temp; - - LONG base_r = Bottom(cube, dir, mr); - LONG base_g = Bottom(cube, dir, mg); - LONG base_b = Bottom(cube, dir, mb); - LONG base_w = Bottom(cube, dir, wt); - - float max = 0.0; - - *cut = -1; - - for (i = first; i < last; i++) { - half_r = base_r + Top(cube, dir, i, mr); - half_g = base_g + Top(cube, dir, i, mg); - half_b = base_b + Top(cube, dir, i, mb); - half_w = base_w + Top(cube, dir, i, wt); - - // now half_x is sum over lower half of box, if split at i - - if (half_w == 0) { // subbox could be empty of pixels! - continue; // never split into an empty box - } else { - temp = ((float)half_r*half_r + (float)half_g*half_g + (float)half_b*half_b)/half_w; - } - - half_r = whole_r - half_r; - half_g = whole_g - half_g; - half_b = whole_b - half_b; - half_w = whole_w - half_w; - - if (half_w == 0) { // subbox could be empty of pixels! - continue; // never split into an empty box - } else { - temp += ((float)half_r*half_r + (float)half_g*half_g + (float)half_b*half_b)/half_w; - } - - if (temp > max) { - max=temp; - *cut=i; - } - } - - return max; -} - -bool -WuQuantizer::Cut(Box *set1, Box *set2) { - BYTE dir; - int cutr, cutg, cutb; - - LONG whole_r = Vol(set1, mr); - LONG whole_g = Vol(set1, mg); - LONG whole_b = Vol(set1, mb); - LONG whole_w = Vol(set1, wt); - - float maxr = Maximize(set1, FI_RGBA_RED, set1->r0+1, set1->r1, &cutr, whole_r, whole_g, whole_b, whole_w); - float maxg = Maximize(set1, FI_RGBA_GREEN, set1->g0+1, set1->g1, &cutg, whole_r, whole_g, whole_b, whole_w); - float maxb = Maximize(set1, FI_RGBA_BLUE, set1->b0+1, set1->b1, &cutb, whole_r, whole_g, whole_b, whole_w); - - if ((maxr >= maxg) && (maxr >= maxb)) { - dir = FI_RGBA_RED; - - if (cutr < 0) { - return false; // can't split the box - } - } else if ((maxg >= maxr) && (maxg>=maxb)) { - dir = FI_RGBA_GREEN; - } else { - dir = FI_RGBA_BLUE; - } - - set2->r1 = set1->r1; - set2->g1 = set1->g1; - set2->b1 = set1->b1; - - switch (dir) { - case FI_RGBA_RED: - set2->r0 = set1->r1 = cutr; - set2->g0 = set1->g0; - set2->b0 = set1->b0; - break; - - case FI_RGBA_GREEN: - set2->g0 = set1->g1 = cutg; - set2->r0 = set1->r0; - set2->b0 = set1->b0; - break; - - case FI_RGBA_BLUE: - set2->b0 = set1->b1 = cutb; - set2->r0 = set1->r0; - set2->g0 = set1->g0; - break; - } - - set1->vol = (set1->r1-set1->r0)*(set1->g1-set1->g0)*(set1->b1-set1->b0); - set2->vol = (set2->r1-set2->r0)*(set2->g1-set2->g0)*(set2->b1-set2->b0); - - return true; -} - - -void -WuQuantizer::Mark(Box *cube, int label, BYTE *tag) { - for (int r = cube->r0 + 1; r <= cube->r1; r++) { - for (int g = cube->g0 + 1; g <= cube->g1; g++) { - for (int b = cube->b0 + 1; b <= cube->b1; b++) { - tag[INDEX(r, g, b)] = (BYTE)label; - } - } - } -} - -// Wu Quantization algorithm -FIBITMAP * -WuQuantizer::Quantize(int PaletteSize, int ReserveSize, RGBQUAD *ReservePalette) { - BYTE *tag = NULL; - - try { - Box cube[MAXCOLOR]; - int next; - LONG i, weight; - int k; - float vv[MAXCOLOR], temp; - - // Compute 3D histogram - - Hist3D(wt, mr, mg, mb, gm2, ReserveSize, ReservePalette); - - // Compute moments - - M3D(wt, mr, mg, mb, gm2); - - cube[0].r0 = cube[0].g0 = cube[0].b0 = 0; - cube[0].r1 = cube[0].g1 = cube[0].b1 = 32; - next = 0; - - for (i = 1; i < PaletteSize; i++) { - if(Cut(&cube[next], &cube[i])) { - // volume test ensures we won't try to cut one-cell box - vv[next] = (cube[next].vol > 1) ? Var(&cube[next]) : 0; - vv[i] = (cube[i].vol > 1) ? Var(&cube[i]) : 0; - } else { - vv[next] = 0.0; // don't try to split this box again - i--; // didn't create box i - } - - next = 0; temp = vv[0]; - - for (k = 1; k <= i; k++) { - if (vv[k] > temp) { - temp = vv[k]; next = k; - } - } - - if (temp <= 0.0) { - PaletteSize = i + 1; - - // Error: "Only got 'PaletteSize' boxes" - - break; - } - } - - // Partition done - - // the space for array gm2 can be freed now - - free(gm2); - - gm2 = NULL; - - // Allocate a new dib - - FIBITMAP *new_dib = FreeImage_Allocate(width, height, 8); - - if (new_dib == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - - // create an optimized palette - - RGBQUAD *new_pal = FreeImage_GetPalette(new_dib); - - tag = (BYTE*) malloc(SIZE_3D * sizeof(BYTE)); - if (tag == NULL) { - throw FI_MSG_ERROR_MEMORY; - } - memset(tag, 0, SIZE_3D * sizeof(BYTE)); - - for (k = 0; k < PaletteSize ; k++) { - Mark(&cube[k], k, tag); - weight = Vol(&cube[k], wt); - - if (weight) { - new_pal[k].rgbRed = (BYTE)(((float)Vol(&cube[k], mr) / (float)weight) + 0.5f); - new_pal[k].rgbGreen = (BYTE)(((float)Vol(&cube[k], mg) / (float)weight) + 0.5f); - new_pal[k].rgbBlue = (BYTE)(((float)Vol(&cube[k], mb) / (float)weight) + 0.5f); - } else { - // Error: bogus box 'k' - - new_pal[k].rgbRed = new_pal[k].rgbGreen = new_pal[k].rgbBlue = 0; - } - } - - int npitch = FreeImage_GetPitch(new_dib); - - for (unsigned y = 0; y < height; y++) { - BYTE *new_bits = FreeImage_GetBits(new_dib) + (y * npitch); - - for (unsigned x = 0; x < width; x++) { - new_bits[x] = tag[Qadd[y*width + x]]; - } - } - - // output 'new_pal' as color look-up table contents, - // 'new_bits' as the quantized image (array of table addresses). - - free(tag); - - return (FIBITMAP*) new_dib; - } catch(...) { - free(tag); - } - - return NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/ZLibInterface.cpp b/Dependencies/FreeImage/Source/FreeImage/ZLibInterface.cpp deleted file mode 100644 index 3ab6d32..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/ZLibInterface.cpp +++ /dev/null @@ -1,223 +0,0 @@ -// ========================================================== -// ZLib library interface -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "../ZLib/zlib.h" -#include "FreeImage.h" -#include "Utilities.h" -#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */ - -/** -Compresses a source buffer into a target buffer, using the ZLib library. -Upon entry, target_size is the total size of the destination buffer, -which must be at least 0.1% larger than source_size plus 12 bytes. - -@param target Destination buffer -@param target_size Size of the destination buffer, in bytes -@param source Source buffer -@param source_size Size of the source buffer, in bytes -@return Returns the actual size of the compressed buffer, returns 0 if an error occured -@see FreeImage_ZLibUncompress -*/ -DWORD DLL_CALLCONV -FreeImage_ZLibCompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size) { - uLongf dest_len = (uLongf)target_size; - - int zerr = compress(target, &dest_len, source, source_size); - switch(zerr) { - case Z_MEM_ERROR: // not enough memory - case Z_BUF_ERROR: // not enough room in the output buffer - FreeImage_OutputMessageProc(FIF_UNKNOWN, "Zlib error : %s", zError(zerr)); - return 0; - case Z_OK: - return dest_len; - } - - return 0; -} - -/** -Decompresses a source buffer into a target buffer, using the ZLib library. -Upon entry, target_size 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. - -@param target Destination buffer -@param target_size Size of the destination buffer, in bytes -@param source Source buffer -@param source_size Size of the source buffer, in bytes -@return Returns the actual size of the uncompressed buffer, returns 0 if an error occured -@see FreeImage_ZLibCompress -*/ -DWORD DLL_CALLCONV -FreeImage_ZLibUncompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size) { - uLongf dest_len = (uLongf)target_size; - - int zerr = uncompress(target, &dest_len, source, source_size); - switch(zerr) { - case Z_MEM_ERROR: // not enough memory - case Z_BUF_ERROR: // not enough room in the output buffer - case Z_DATA_ERROR: // input data was corrupted - FreeImage_OutputMessageProc(FIF_UNKNOWN, "Zlib error : %s", zError(zerr)); - return 0; - case Z_OK: - return dest_len; - } - - return 0; -} - -/** -Compresses a source buffer into a target buffer, using the ZLib library. -On success, the target buffer contains a GZIP compatible layout. -Upon entry, target_size is the total size of the destination buffer, -which must be at least 0.1% larger than source_size plus 24 bytes. - -@param target Destination buffer -@param target_size Size of the destination buffer, in bytes -@param source Source buffer -@param source_size Size of the source buffer, in bytes -@return Returns the actual size of the compressed buffer, returns 0 if an error occured -@see FreeImage_ZLibCompress -*/ -DWORD DLL_CALLCONV -FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size) { - uLongf dest_len = (uLongf)target_size - 12; - DWORD crc = crc32(0L, NULL, 0); - - // set up header (stolen from zlib/gzio.c) - sprintf((char *)target, "%c%c%c%c%c%c%c%c", 0x1f, 0x8b, - Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/); - int zerr = compress2(target + 8, &dest_len, source, source_size, Z_BEST_COMPRESSION); - switch(zerr) { - case Z_MEM_ERROR: // not enough memory - case Z_BUF_ERROR: // not enough room in the output buffer - FreeImage_OutputMessageProc(FIF_UNKNOWN, "Zlib error : %s", zError(zerr)); - return 0; - case Z_OK: { - // patch header, setup crc and length (stolen from mod_trace_output) - BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code - crc = crc32(crc, source, source_size); - memcpy(target + 4 + dest_len, &crc, 4); - memcpy(target + 8 + dest_len, &source_size, 4); - return dest_len + 12; - } - } - return 0; -} - -/** -Decompresses a gzipped source buffer into a target buffer, using the ZLib library. -Upon entry, target_size 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. - -@param target Destination buffer -@param target_size Size of the destination buffer, in bytes -@param source Source buffer -@param source_size Size of the source buffer, in bytes -@return Returns the actual size of the uncompressed buffer, returns 0 if an error occured -@see FreeImage_ZLibGZip -*/ - -static int get_byte(z_stream *stream) { - if (stream->avail_in <= 0) return EOF; - stream->avail_in--; - return *(stream->next_in)++; -} - -static int checkheader(z_stream *stream) { - int flags, c; - DWORD len; - - if (get_byte(stream) != 0x1f || get_byte(stream) != 0x8b) - return Z_DATA_ERROR; - if (get_byte(stream) != Z_DEFLATED || ((flags = get_byte(stream)) & 0xE0) != 0) - return Z_DATA_ERROR; - for (len = 0; len < 6; len++) (void)get_byte(stream); - - if ((flags & 0x04) != 0) { /* skip the extra field */ - len = (DWORD)get_byte(stream); - len += ((DWORD)get_byte(stream)) << 8; - /* len is garbage if EOF but the loop below will quit anyway */ - while (len-- != 0 && get_byte(stream) != EOF) ; - } - if ((flags & 0x08) != 0) { /* skip the original file name */ - while ((c = get_byte(stream)) != 0 && c != EOF) ; - } - if ((flags & 0x10) != 0) { /* skip the .gz file comment */ - while ((c = get_byte(stream)) != 0 && c != EOF) ; - } - if ((flags & 0x02) != 0) { /* skip the header crc */ - for (len = 0; len < 2; len++) (void)get_byte(stream); - } - return Z_OK; -} - -DWORD DLL_CALLCONV -FreeImage_ZLibGUnzip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size) { - DWORD src_len = source_size; - DWORD dest_len = target_size; - int zerr = Z_DATA_ERROR; - - if (src_len > 0) { - z_stream stream; - memset(&stream, 0, sizeof (stream)); - if ((zerr = inflateInit2(&stream, -MAX_WBITS)) == Z_OK) { - stream.next_in = source; - stream.avail_in = source_size; - - stream.next_out = target; - stream.avail_out = target_size; - - if ((zerr = checkheader(&stream)) == Z_OK) { - zerr = inflate (&stream, Z_NO_FLUSH); - dest_len = target_size - stream.avail_out; - - if (zerr == Z_OK || zerr == Z_STREAM_END) - inflateEnd(&stream); - } - } - } - if (zerr != Z_OK && zerr != Z_STREAM_END) { - FreeImage_OutputMessageProc(FIF_UNKNOWN, "Zlib error : %s", zError(zerr)); - return 0; - } - return dest_len; -} - -/** -Update a running crc from source and return the updated crc, using the ZLib library. -If source is NULL, this function returns the required initial value for the crc. - -@param crc Running crc value -@param source Source buffer -@param source_size Size of the source buffer, in bytes -@return Returns the new crc value -*/ -DWORD DLL_CALLCONV -FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size) { - - return crc32(crc, source, source_size); -} diff --git a/Dependencies/FreeImage/Source/FreeImage/tmoColorConvert.cpp b/Dependencies/FreeImage/Source/FreeImage/tmoColorConvert.cpp deleted file mode 100644 index 6b103a0..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/tmoColorConvert.cpp +++ /dev/null @@ -1,479 +0,0 @@ -// ========================================================== -// High Dynamic Range bitmap conversion routines -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "ToneMapping.h" - -// ---------------------------------------------------------- -// Convert RGB to and from Yxy, same as in Reinhard et al. SIGGRAPH 2002 -// References : -// [1] Radiance Home Page [Online] http://radsite.lbl.gov/radiance/HOME.html -// [2] E. Reinhard, M. Stark, P. Shirley, and J. Ferwerda, -// Photographic Tone Reproduction for Digital Images, ACM Transactions on Graphics, -// 21(3):267-276, 2002 (Proceedings of SIGGRAPH 2002). -// [3] J. Tumblin and H.E. Rushmeier, -// Tone Reproduction for Realistic Images. IEEE Computer Graphics and Applications, -// 13(6):42-48, 1993. -// ---------------------------------------------------------- - -/** -nominal CRT primaries -*/ -/* -static const float CIE_x_r = 0.640F; -static const float CIE_y_r = 0.330F; -static const float CIE_x_g = 0.290F; -static const float CIE_y_g = 0.600F; -static const float CIE_x_b = 0.150F; -static const float CIE_y_b = 0.060F; -static const float CIE_x_w = 0.3333F; // use true white -static const float CIE_y_w = 0.3333F; -*/ -/** -sRGB primaries -*/ -static const float CIE_x_r = 0.640F; -static const float CIE_y_r = 0.330F; -static const float CIE_x_g = 0.300F; -static const float CIE_y_g = 0.600F; -static const float CIE_x_b = 0.150F; -static const float CIE_y_b = 0.060F; -static const float CIE_x_w = 0.3127F; // Illuminant D65 -static const float CIE_y_w = 0.3290F; - -static const float CIE_D = ( CIE_x_r*(CIE_y_g - CIE_y_b) + CIE_x_g*(CIE_y_b - CIE_y_r) + CIE_x_b*(CIE_y_r - CIE_y_g) ); -static const float CIE_C_rD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_g - CIE_y_b) - CIE_y_w*(CIE_x_g - CIE_x_b) + CIE_x_g*CIE_y_b - CIE_x_b*CIE_y_g) ); -static const float CIE_C_gD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_b - CIE_y_r) - CIE_y_w*(CIE_x_b - CIE_x_r) - CIE_x_r*CIE_y_b + CIE_x_b*CIE_y_r) ); -static const float CIE_C_bD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_r - CIE_y_g) - CIE_y_w*(CIE_x_r - CIE_x_g) + CIE_x_r*CIE_y_g - CIE_x_g*CIE_y_r) ); - -/** -RGB to XYZ (no white balance) -*/ -static const float RGB2XYZ[3][3] = { - { CIE_x_r*CIE_C_rD / CIE_D, - CIE_x_g*CIE_C_gD / CIE_D, - CIE_x_b*CIE_C_bD / CIE_D - }, - { CIE_y_r*CIE_C_rD / CIE_D, - CIE_y_g*CIE_C_gD / CIE_D, - CIE_y_b*CIE_C_bD / CIE_D - }, - { (1 - CIE_x_r-CIE_y_r)*CIE_C_rD / CIE_D, - (1 - CIE_x_g-CIE_y_g)*CIE_C_gD / CIE_D, - (1 - CIE_x_b-CIE_y_b)*CIE_C_bD / CIE_D - } -}; - -/** -XYZ to RGB (no white balance) -*/ -static const float XYZ2RGB[3][3] = { - {(CIE_y_g - CIE_y_b - CIE_x_b*CIE_y_g + CIE_y_b*CIE_x_g) / CIE_C_rD, - (CIE_x_b - CIE_x_g - CIE_x_b*CIE_y_g + CIE_x_g*CIE_y_b) / CIE_C_rD, - (CIE_x_g*CIE_y_b - CIE_x_b*CIE_y_g) / CIE_C_rD - }, - {(CIE_y_b - CIE_y_r - CIE_y_b*CIE_x_r + CIE_y_r*CIE_x_b) / CIE_C_gD, - (CIE_x_r - CIE_x_b - CIE_x_r*CIE_y_b + CIE_x_b*CIE_y_r) / CIE_C_gD, - (CIE_x_b*CIE_y_r - CIE_x_r*CIE_y_b) / CIE_C_gD - }, - {(CIE_y_r - CIE_y_g - CIE_y_r*CIE_x_g + CIE_y_g*CIE_x_r) / CIE_C_bD, - (CIE_x_g - CIE_x_r - CIE_x_g*CIE_y_r + CIE_x_r*CIE_y_g) / CIE_C_bD, - (CIE_x_r*CIE_y_g - CIE_x_g*CIE_y_r) / CIE_C_bD - } -}; - -/** -This gives approximately the following matrices : - -static const float RGB2XYZ[3][3] = { - { 0.41239083F, 0.35758433F, 0.18048081F }, - { 0.21263903F, 0.71516865F, 0.072192319F }, - { 0.019330820F, 0.11919473F, 0.95053220F } -}; -static const float XYZ2RGB[3][3] = { - { 3.2409699F, -1.5373832F, -0.49861079F }, - { -0.96924376F, 1.8759676F, 0.041555084F }, - { 0.055630036F, -0.20397687F, 1.0569715F } -}; -*/ - -// ---------------------------------------------------------- - -static const float EPSILON = 1e-06F; -static const float INF = 1e+10F; - -/** -Convert in-place floating point RGB data to Yxy.
-On output, pixel->red == Y, pixel->green == x, pixel->blue == y -@param dib Input RGBF / Output Yxy image -@return Returns TRUE if successful, returns FALSE otherwise -*/ -BOOL -ConvertInPlaceRGBFToYxy(FIBITMAP *dib) { - float result[3]; - - if(FreeImage_GetImageType(dib) != FIT_RGBF) - return FALSE; - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - const unsigned pitch = FreeImage_GetPitch(dib); - - BYTE *bits = (BYTE*)FreeImage_GetBits(dib); - for(unsigned y = 0; y < height; y++) { - FIRGBF *pixel = (FIRGBF*)bits; - for(unsigned x = 0; x < width; x++) { - result[0] = result[1] = result[2] = 0; - for (int i = 0; i < 3; i++) { - result[i] += RGB2XYZ[i][0] * pixel[x].red; - result[i] += RGB2XYZ[i][1] * pixel[x].green; - result[i] += RGB2XYZ[i][2] * pixel[x].blue; - } - const float W = result[0] + result[1] + result[2]; - const float Y = result[1]; - if(W > 0) { - pixel[x].red = Y; // Y - pixel[x].green = result[0] / W; // x - pixel[x].blue = result[1] / W; // y - } else { - pixel[x].red = pixel[x].green = pixel[x].blue = 0; - } - } - // next line - bits += pitch; - } - - return TRUE; -} - -/** -Convert in-place Yxy image to floating point RGB data.
-On input, pixel->red == Y, pixel->green == x, pixel->blue == y -@param dib Input Yxy / Output RGBF image -@return Returns TRUE if successful, returns FALSE otherwise -*/ -BOOL -ConvertInPlaceYxyToRGBF(FIBITMAP *dib) { - float result[3]; - float X, Y, Z; - - if(FreeImage_GetImageType(dib) != FIT_RGBF) - return FALSE; - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - const unsigned pitch = FreeImage_GetPitch(dib); - - BYTE *bits = (BYTE*)FreeImage_GetBits(dib); - for(unsigned y = 0; y < height; y++) { - FIRGBF *pixel = (FIRGBF*)bits; - for(unsigned x = 0; x < width; x++) { - Y = pixel[x].red; // Y - result[1] = pixel[x].green; // x - result[2] = pixel[x].blue; // y - if ((Y > EPSILON) && (result[1] > EPSILON) && (result[2] > EPSILON)) { - X = (result[1] * Y) / result[2]; - Z = (X / result[1]) - X - Y; - } else { - X = Z = EPSILON; - } - pixel[x].red = X; - pixel[x].green = Y; - pixel[x].blue = Z; - result[0] = result[1] = result[2] = 0; - for (int i = 0; i < 3; i++) { - result[i] += XYZ2RGB[i][0] * pixel[x].red; - result[i] += XYZ2RGB[i][1] * pixel[x].green; - result[i] += XYZ2RGB[i][2] * pixel[x].blue; - } - pixel[x].red = result[0]; // R - pixel[x].green = result[1]; // G - pixel[x].blue = result[2]; // B - } - // next line - bits += pitch; - } - - return TRUE; -} - -/** -Get the maximum, minimum and average luminance.
-On input, pixel->red == Y, pixel->green == x, pixel->blue == y -@param Yxy Source Yxy image to analyze -@param maxLum Maximum luminance -@param minLum Minimum luminance -@param worldLum Average luminance (world adaptation luminance) -@return Returns TRUE if successful, returns FALSE otherwise -*/ -BOOL -LuminanceFromYxy(FIBITMAP *Yxy, float *maxLum, float *minLum, float *worldLum) { - if(FreeImage_GetImageType(Yxy) != FIT_RGBF) - return FALSE; - - const unsigned width = FreeImage_GetWidth(Yxy); - const unsigned height = FreeImage_GetHeight(Yxy); - const unsigned pitch = FreeImage_GetPitch(Yxy); - - float max_lum = 0, min_lum = 0; - double sum = 0; - - BYTE *bits = (BYTE*)FreeImage_GetBits(Yxy); - for(unsigned y = 0; y < height; y++) { - const FIRGBF *pixel = (FIRGBF*)bits; - for(unsigned x = 0; x < width; x++) { - const float Y = MAX(0.0F, pixel[x].red);// avoid negative values - max_lum = (max_lum < Y) ? Y : max_lum; // max Luminance in the scene - min_lum = (min_lum < Y) ? min_lum : Y; // min Luminance in the scene - sum += log(2.3e-5F + Y); // contrast constant in Tumblin paper - } - // next line - bits += pitch; - } - // maximum luminance - *maxLum = max_lum; - // minimum luminance - *minLum = min_lum; - // average log luminance - double avgLogLum = (sum / (width * height)); - // world adaptation luminance - *worldLum = (float)exp(avgLogLum); - - return TRUE; -} - -/** -Clamp RGBF image highest values to display white, -then convert to 24-bit RGB -*/ -FIBITMAP* -ClampConvertRGBFTo24(FIBITMAP *src) { - if(FreeImage_GetImageType(src) != FIT_RGBF) - return FALSE; - - const unsigned width = FreeImage_GetWidth(src); - const unsigned height = FreeImage_GetHeight(src); - - FIBITMAP *dst = FreeImage_Allocate(width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(!dst) return NULL; - - const unsigned src_pitch = FreeImage_GetPitch(src); - const unsigned dst_pitch = FreeImage_GetPitch(dst); - - BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const FIRGBF *src_pixel = (FIRGBF*)src_bits; - BYTE *dst_pixel = (BYTE*)dst_bits; - for(unsigned x = 0; x < width; x++) { - const float red = (src_pixel[x].red > 1) ? 1 : src_pixel[x].red; - const float green = (src_pixel[x].green > 1) ? 1 : src_pixel[x].green; - const float blue = (src_pixel[x].blue > 1) ? 1 : src_pixel[x].blue; - - dst_pixel[FI_RGBA_RED] = (BYTE)(255.0F * red + 0.5F); - dst_pixel[FI_RGBA_GREEN] = (BYTE)(255.0F * green + 0.5F); - dst_pixel[FI_RGBA_BLUE] = (BYTE)(255.0F * blue + 0.5F); - dst_pixel += 3; - } - src_bits += src_pitch; - dst_bits += dst_pitch; - } - - return dst; -} - -/** -Extract the luminance channel L from a RGBF image. -Luminance is calculated from the sRGB model (RGB2XYZ matrix) -using a D65 white point : -L = ( 0.2126 * r ) + ( 0.7152 * g ) + ( 0.0722 * b ) -Reference : -A Standard Default Color Space for the Internet - sRGB. -[online] http://www.w3.org/Graphics/Color/sRGB -*/ -FIBITMAP* -ConvertRGBFToY(FIBITMAP *src) { - if(FreeImage_GetImageType(src) != FIT_RGBF) - return FALSE; - - const unsigned width = FreeImage_GetWidth(src); - const unsigned height = FreeImage_GetHeight(src); - - FIBITMAP *dst = FreeImage_AllocateT(FIT_FLOAT, width, height); - if(!dst) return NULL; - - const unsigned src_pitch = FreeImage_GetPitch(src); - const unsigned dst_pitch = FreeImage_GetPitch(dst); - - - BYTE *src_bits = (BYTE*)FreeImage_GetBits(src); - BYTE *dst_bits = (BYTE*)FreeImage_GetBits(dst); - - for(unsigned y = 0; y < height; y++) { - const FIRGBF *src_pixel = (FIRGBF*)src_bits; - float *dst_pixel = (float*)dst_bits; - for(unsigned x = 0; x < width; x++) { - const float L = LUMA_REC709(src_pixel[x].red, src_pixel[x].green, src_pixel[x].blue); - dst_pixel[x] = (L > 0) ? L : 0; - } - // next line - src_bits += src_pitch; - dst_bits += dst_pitch; - } - - return dst; -} - -/** -Get the maximum, minimum, average luminance and log average luminance from a Y image -@param dib Source Y image to analyze -@param maxLum Maximum luminance -@param minLum Minimum luminance -@param Lav Average luminance -@param Llav Log average luminance (also known as 'world adaptation luminance') -@return Returns TRUE if successful, returns FALSE otherwise -@see ConvertRGBFToY, FreeImage_TmoReinhard05Ex -*/ -BOOL -LuminanceFromY(FIBITMAP *dib, float *maxLum, float *minLum, float *Lav, float *Llav) { - if(FreeImage_GetImageType(dib) != FIT_FLOAT) - return FALSE; - - unsigned width = FreeImage_GetWidth(dib); - unsigned height = FreeImage_GetHeight(dib); - unsigned pitch = FreeImage_GetPitch(dib); - - float max_lum = -1e20F, min_lum = 1e20F; - double sumLum = 0, sumLogLum = 0; - - BYTE *bits = (BYTE*)FreeImage_GetBits(dib); - for(unsigned y = 0; y < height; y++) { - const float *pixel = (float*)bits; - for(unsigned x = 0; x < width; x++) { - const float Y = pixel[x]; - max_lum = (max_lum < Y) ? Y : max_lum; // max Luminance in the scene - min_lum = ((Y > 0) && (min_lum < Y)) ? min_lum : Y; // min Luminance in the scene - sumLum += Y; // average luminance - sumLogLum += log(2.3e-5F + Y); // contrast constant in Tumblin paper - } - // next line - bits += pitch; - } - - // maximum luminance - *maxLum = max_lum; - // minimum luminance - *minLum = min_lum; - // average luminance - *Lav = (float)(sumLum / (width * height)); - // average log luminance, a.k.a. world adaptation luminance - *Llav = (float)exp(sumLogLum / (width * height)); - - return TRUE; -} -// -------------------------------------------------------------------------- - -static void findMaxMinPercentile(FIBITMAP *Y, float minPrct, float *minLum, float maxPrct, float *maxLum) { - int x, y; - int width = FreeImage_GetWidth(Y); - int height = FreeImage_GetHeight(Y); - int pitch = FreeImage_GetPitch(Y); - - std::vector vY(width * height); - - BYTE *bits = (BYTE*)FreeImage_GetBits(Y); - for(y = 0; y < height; y++) { - float *pixel = (float*)bits; - for(x = 0; x < width; x++) { - if(pixel[x] != 0) { - vY.push_back(pixel[x]); - } - } - bits += pitch; - } - - std::sort(vY.begin(), vY.end()); - - *minLum = vY.at( int(minPrct * vY.size()) ); - *maxLum = vY.at( int(maxPrct * vY.size()) ); -} - -/** -Clipping function
-Remove any extremely bright and/or extremely dark pixels -and normalize between 0 and 1. -@param Y Input/Output image -@param minPrct Minimum percentile -@param maxPrct Maximum percentile -*/ -void -NormalizeY(FIBITMAP *Y, float minPrct, float maxPrct) { - int x, y; - float maxLum, minLum; - - if(minPrct > maxPrct) { - // swap values - float t = minPrct; minPrct = maxPrct; maxPrct = t; - } - if(minPrct < 0) minPrct = 0; - if(maxPrct > 1) maxPrct = 1; - - int width = FreeImage_GetWidth(Y); - int height = FreeImage_GetHeight(Y); - int pitch = FreeImage_GetPitch(Y); - - // find max & min luminance values - if((minPrct > 0) || (maxPrct < 1)) { - maxLum = 0, minLum = 0; - findMaxMinPercentile(Y, minPrct, &minLum, maxPrct, &maxLum); - } else { - maxLum = -1e20F, minLum = 1e20F; - BYTE *bits = (BYTE*)FreeImage_GetBits(Y); - for(y = 0; y < height; y++) { - const float *pixel = (float*)bits; - for(x = 0; x < width; x++) { - const float value = pixel[x]; - maxLum = (maxLum < value) ? value : maxLum; // max Luminance in the scene - minLum = (minLum < value) ? minLum : value; // min Luminance in the scene - } - // next line - bits += pitch; - } - } - if(maxLum == minLum) return; - - // normalize to range 0..1 - const float divider = maxLum - minLum; - BYTE *bits = (BYTE*)FreeImage_GetBits(Y); - for(y = 0; y < height; y++) { - float *pixel = (float*)bits; - for(x = 0; x < width; x++) { - pixel[x] = (pixel[x] - minLum) / divider; - if(pixel[x] <= 0) pixel[x] = EPSILON; - if(pixel[x] > 1) pixel[x] = 1; - } - // next line - bits += pitch; - } -} diff --git a/Dependencies/FreeImage/Source/FreeImage/tmoDrago03.cpp b/Dependencies/FreeImage/Source/FreeImage/tmoDrago03.cpp deleted file mode 100644 index d46a8c8..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/tmoDrago03.cpp +++ /dev/null @@ -1,295 +0,0 @@ -// ========================================================== -// Tone mapping operator (Drago, 2003) -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "ToneMapping.h" - -// ---------------------------------------------------------- -// Logarithmic mapping operator -// Reference: -// [1] F. Drago, K. Myszkowski, T. Annen, and N. Chiba, -// Adaptive Logarithmic Mapping for Displaying High Contrast Scenes, -// Eurographics 2003. -// ---------------------------------------------------------- - -/** -Bias function -*/ -static inline double -biasFunction(const double b, const double x) { - return pow (x, b); // pow(x, log(bias)/log(0.5) -} - -/** -Pad approximation of log(x + 1) -x(6+x)/(6+4x) good if x < 1 -x*(6 + 0.7662x)/(5.9897 + 3.7658x) between 1 and 2 -See http://www.nezumi.demon.co.uk/consult/logx.htm -*/ -static inline double -pade_log(const double x) { - if(x < 1) { - return (x * (6 + x) / (6 + 4 * x)); - } else if(x < 2) { - return (x * (6 + 0.7662 * x) / (5.9897 + 3.7658 * x)); - } - return log(x + 1); -} - -/** -Log mapping operator -@param dib Input / Output Yxy image -@param maxLum Maximum luminance -@param avgLum Average luminance (world adaptation luminance) -@param biasParam Bias parameter (a zero value default to 0.85) -@param exposure Exposure parameter (default to 0) -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -ToneMappingDrago03(FIBITMAP *dib, const float maxLum, const float avgLum, float biasParam, const float exposure) { - const float LOG05 = -0.693147F; // log(0.5) - - double Lmax, divider, interpol, biasP; - unsigned x, y; - double L; - - if(FreeImage_GetImageType(dib) != FIT_RGBF) - return FALSE; - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - const unsigned pitch = FreeImage_GetPitch(dib); - - - // arbitrary Bias Parameter - if(biasParam == 0) - biasParam = 0.85F; - - // normalize maximum luminance by average luminance - Lmax = maxLum / avgLum; - - divider = log10(Lmax+1); - biasP = log(biasParam)/LOG05; - -#if !defined(DRAGO03_FAST) - - /** - Normal tone mapping of every pixel - further acceleration is obtained by a Pad approximation of log(x + 1) - */ - BYTE *bits = (BYTE*)FreeImage_GetBits(dib); - for(y = 0; y < height; y++) { - FIRGBF *pixel = (FIRGBF*)bits; - for(x = 0; x < width; x++) { - double Yw = pixel[x].red / avgLum; - Yw *= exposure; - interpol = log(2 + biasFunction(biasP, Yw / Lmax) * 8); - L = pade_log(Yw);// log(Yw + 1) - pixel[x].red = (float)((L / interpol) / divider); - } - // next line - bits += pitch; - } - -#else - unsigned index; - int i, j; - - unsigned max_width = width - (width % 3); - unsigned max_height = height - (height % 3); - unsigned fpitch = pitch / sizeof(FIRGBF); - - /** - fast tone mapping - split the image into 3x3 pixel tiles and perform the computation for each group of 9 pixels - further acceleration is obtained by a Pad approximation of log(x + 1) - => produce artifacts and not so faster, so the code has been disabled - */ -#define PIXEL(x, y) image[y*fpitch + x].red - - FIRGBF *image = (FIRGBF*)FreeImage_GetBits(dib); - for(y = 0; y < max_height; y += 3) { - for(x = 0; x < max_width; x += 3) { - double average = 0; - for(i = 0; i < 3; i++) { - for(j = 0; j < 3; j++) { - index = (y + i)*fpitch + (x + j); - image[index].red /= (float)avgLum; - image[index].red *= exposure; - average += image[index].red; - } - } - average = average / 9 - PIXEL(x, y); - if(average > -1 && average < 1) { - interpol = log(2 + pow(PIXEL(x + 1, y + 1) / Lmax, biasP) * 8); - for(i = 0; i < 3; i++) { - for(j = 0; j < 3; j++) { - index = (y + i)*fpitch + (x + j); - L = pade_log(image[index].red);// log(image[index].red + 1) - image[index].red = (float)((L / interpol) / divider); - } - } - } - else { - for(i = 0; i < 3; i++) { - for(j = 0; j < 3; j++) { - index = (y + i)*fpitch + (x + j); - interpol = log(2 + pow(image[index].red / Lmax, biasP) * 8); - L = pade_log(image[index].red);// log(image[index].red + 1) - image[index].red = (float)((L / interpol) / divider); - } - } - } - } //x - } // y - - /** - Normal tone mapping of every pixel for the remaining right and bottom bands - */ - BYTE *bits; - - // right band - bits = (BYTE*)FreeImage_GetBits(dib); - for(y = 0; y < height; y++) { - FIRGBF *pixel = (FIRGBF*)bits; - for(x = max_width; x < width; x++) { - double Yw = pixel[x].red / avgLum; - Yw *= exposure; - interpol = log(2 + biasFunction(biasP, Yw / Lmax) * 8); - L = pade_log(Yw);// log(Yw + 1) - pixel[x].red = (float)((L / interpol) / divider); - } - // next line - bits += pitch; - } - // bottom band - bits = (BYTE*)FreeImage_GetBits(dib); - for(y = max_height; y < height; y++) { - FIRGBF *pixel = (FIRGBF*)bits; - for(x = 0; x < max_width; x++) { - double Yw = pixel[x].red / avgLum; - Yw *= exposure; - interpol = log(2 + biasFunction(biasP, Yw / Lmax) * 8); - L = pade_log(Yw);// log(Yw + 1) - pixel[x].red = (float)((L / interpol) / divider); - } - // next line - bits += pitch; - } - -#endif // DRAGO03_FAST - - return TRUE; -} - -/** -Custom gamma correction based on the ITU-R BT.709 standard -@param dib RGBF image to be corrected -@param gammaval Gamma value (2.2 is a good default value) -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -REC709GammaCorrection(FIBITMAP *dib, const float gammaval) { - if(FreeImage_GetImageType(dib) != FIT_RGBF) - return FALSE; - - float slope = 4.5F; - float start = 0.018F; - - const float fgamma = (float)((0.45 / gammaval) * 2); - if(gammaval >= 2.1F) { - start = (float)(0.018 / ((gammaval - 2) * 7.5)); - slope = (float)(4.5 * ((gammaval - 2) * 7.5)); - } else if (gammaval <= 1.9F) { - start = (float)(0.018 * ((2 - gammaval) * 7.5)); - slope = (float)(4.5 / ((2 - gammaval) * 7.5)); - } - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - const unsigned pitch = FreeImage_GetPitch(dib); - - BYTE *bits = (BYTE*)FreeImage_GetBits(dib); - for(unsigned y = 0; y < height; y++) { - float *pixel = (float*)bits; - for(unsigned x = 0; x < width; x++) { - for(int i = 0; i < 3; i++) { - *pixel = (*pixel <= start) ? *pixel * slope : (1.099F * pow(*pixel, fgamma) - 0.099F); - pixel++; - } - } - bits += pitch; - } - - return TRUE; -} - -// ---------------------------------------------------------- -// Main algorithm -// ---------------------------------------------------------- - -/** -Apply the Adaptive Logarithmic Mapping operator to a HDR image and convert to 24-bit RGB -@param src Input RGB16 or RGB[A]F image -@param gamma Gamma correction (gamma > 0). 1 means no correction, 2.2 in the original paper. -@param exposure Exposure parameter (0 means no correction, 0 in the original paper) -@return Returns a 24-bit RGB image if successful, returns NULL otherwise -*/ -FIBITMAP* DLL_CALLCONV -FreeImage_TmoDrago03(FIBITMAP *src, double gamma, double exposure) { - float maxLum, minLum, avgLum; - - if(!FreeImage_HasPixels(src)) return NULL; - - // working RGBF variable - FIBITMAP *dib = NULL; - - dib = FreeImage_ConvertToRGBF(src); - if(!dib) return NULL; - - // default algorithm parameters - const float biasParam = 0.85F; - const float expoParam = (float)pow(2.0, exposure); //default exposure is 1, 2^0 - - // convert to Yxy - ConvertInPlaceRGBFToYxy(dib); - // get the luminance - LuminanceFromYxy(dib, &maxLum, &minLum, &avgLum); - // perform the tone mapping - ToneMappingDrago03(dib, maxLum, avgLum, biasParam, expoParam); - // convert back to RGBF - ConvertInPlaceYxyToRGBF(dib); - if(gamma != 1) { - // perform gamma correction - REC709GammaCorrection(dib, (float)gamma); - } - // clamp image highest values to display white, then convert to 24-bit RGB - FIBITMAP *dst = ClampConvertRGBFTo24(dib); - - // clean-up and return - FreeImage_Unload(dib); - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - return dst; -} diff --git a/Dependencies/FreeImage/Source/FreeImage/tmoFattal02.cpp b/Dependencies/FreeImage/Source/FreeImage/tmoFattal02.cpp deleted file mode 100644 index c63f91f..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/tmoFattal02.cpp +++ /dev/null @@ -1,689 +0,0 @@ -// ========================================================== -// Tone mapping operator (Fattal, 2002) -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "ToneMapping.h" - -// ---------------------------------------------------------- -// Gradient domain HDR compression -// Reference: -// [1] R. Fattal, D. Lischinski, and M.Werman, -// Gradient domain high dynamic range compression, -// ACM Transactions on Graphics, special issue on Proc. of ACM SIGGRAPH 2002, -// San Antonio, Texas, vol. 21(3), pp. 257-266, 2002. -// ---------------------------------------------------------- - -static const float EPSILON = 1e-4F; - -/** -Performs a 5 by 5 gaussian filtering using two 1D convolutions, -followed by a subsampling by 2. -@param dib Input image -@return Returns a blurred image of size SIZE(dib)/2 -@see GaussianPyramid -*/ -static FIBITMAP* GaussianLevel5x5(FIBITMAP *dib) { - FIBITMAP *h_dib = NULL, *v_dib = NULL, *dst = NULL; - float *src_pixel, *dst_pixel; - - try { - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - if(image_type != FIT_FLOAT) throw(1); - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - - h_dib = FreeImage_AllocateT(image_type, width, height); - v_dib = FreeImage_AllocateT(image_type, width, height); - if(!h_dib || !v_dib) throw(1); - - const unsigned pitch = FreeImage_GetPitch(dib) / sizeof(float); - - // horizontal convolution dib -> h_dib - - src_pixel = (float*)FreeImage_GetBits(dib); - dst_pixel = (float*)FreeImage_GetBits(h_dib); - - for(unsigned y = 0; y < height; y++) { - // work on line y - for(unsigned x = 2; x < width - 2; x++) { - dst_pixel[x] = src_pixel[x-2] + src_pixel[x+2] + 4 * (src_pixel[x-1] + src_pixel[x+1]) + 6 * src_pixel[x]; - dst_pixel[x] /= 16; - } - // boundary mirroring - dst_pixel[0] = (2 * src_pixel[2] + 8 * src_pixel[1] + 6 * src_pixel[0]) / 16; - dst_pixel[1] = (src_pixel[3] + 4 * (src_pixel[0] + src_pixel[2]) + 7 * src_pixel[1]) / 16; - dst_pixel[width-2] = (src_pixel[width-4] + 5 * src_pixel[width-1] + 4 * src_pixel[width-3] + 6 * src_pixel[width-2]) / 16; - dst_pixel[width-1] = (src_pixel[width-3] + 5 * src_pixel[width-2] + 10 * src_pixel[width-1]) / 16; - - // next line - src_pixel += pitch; - dst_pixel += pitch; - } - - // vertical convolution h_dib -> v_dib - - src_pixel = (float*)FreeImage_GetBits(h_dib); - dst_pixel = (float*)FreeImage_GetBits(v_dib); - - for(unsigned x = 0; x < width; x++) { - // work on column x - for(unsigned y = 2; y < height - 2; y++) { - const unsigned index = y*pitch + x; - dst_pixel[index] = src_pixel[index-2*pitch] + src_pixel[index+2*pitch] + 4 * (src_pixel[index-pitch] + src_pixel[index+pitch]) + 6 * src_pixel[index]; - dst_pixel[index] /= 16; - } - // boundary mirroring - dst_pixel[x] = (2 * src_pixel[x+2*pitch] + 8 * src_pixel[x+pitch] + 6 * src_pixel[x]) / 16; - dst_pixel[x+pitch] = (src_pixel[x+3*pitch] + 4 * (src_pixel[x] + src_pixel[x+2*pitch]) + 7 * src_pixel[x+pitch]) / 16; - dst_pixel[(height-2)*pitch+x] = (src_pixel[(height-4)*pitch+x] + 5 * src_pixel[(height-1)*pitch+x] + 4 * src_pixel[(height-3)*pitch+x] + 6 * src_pixel[(height-2)*pitch+x]) / 16; - dst_pixel[(height-1)*pitch+x] = (src_pixel[(height-3)*pitch+x] + 5 * src_pixel[(height-2)*pitch+x] + 10 * src_pixel[(height-1)*pitch+x]) / 16; - } - - FreeImage_Unload(h_dib); h_dib = NULL; - - // perform downsampling - - dst = FreeImage_Rescale(v_dib, width/2, height/2, FILTER_BILINEAR); - - FreeImage_Unload(v_dib); - - return dst; - - } catch(int) { - if(h_dib) FreeImage_Unload(h_dib); - if(v_dib) FreeImage_Unload(v_dib); - if(dst) FreeImage_Unload(dst); - return NULL; - } -} - -/** -Compute a Gaussian pyramid using the specified number of levels. -@param H Original bitmap -@param pyramid Resulting pyramid array -@param nlevels Number of resolution levels -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL GaussianPyramid(FIBITMAP *H, FIBITMAP **pyramid, int nlevels) { - try { - // first level is the original image - pyramid[0] = FreeImage_Clone(H); - if(pyramid[0] == NULL) throw(1); - // compute next levels - for(int k = 1; k < nlevels; k++) { - pyramid[k] = GaussianLevel5x5(pyramid[k-1]); - if(pyramid[k] == NULL) throw(1); - } - return TRUE; - } catch(int) { - for(int k = 0; k < nlevels; k++) { - if(pyramid[k] != NULL) { - FreeImage_Unload(pyramid[k]); - pyramid[k] = NULL; - } - } - return FALSE; - } -} - -/** -Compute the gradient magnitude of an input image H using central differences, -and returns the average gradient. -@param H Input image -@param avgGrad [out] Average gradient -@param k Level number -@return Returns the gradient magnitude if successful, returns NULL otherwise -@see GradientPyramid -*/ -static FIBITMAP* GradientLevel(FIBITMAP *H, float *avgGrad, int k) { - FIBITMAP *G = NULL; - - try { - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(H); - if(image_type != FIT_FLOAT) throw(1); - - const unsigned width = FreeImage_GetWidth(H); - const unsigned height = FreeImage_GetHeight(H); - - G = FreeImage_AllocateT(image_type, width, height); - if(!G) throw(1); - - const unsigned pitch = FreeImage_GetPitch(H) / sizeof(float); - - const float divider = (float)(1 << (k + 1)); - float average = 0; - - float *src_pixel = (float*)FreeImage_GetBits(H); - float *dst_pixel = (float*)FreeImage_GetBits(G); - - for(unsigned y = 0; y < height; y++) { - const unsigned n = (y == 0 ? 0 : y-1); - const unsigned s = (y+1 == height ? y : y+1); - for(unsigned x = 0; x < width; x++) { - const unsigned w = (x == 0 ? 0 : x-1); - const unsigned e = (x+1 == width ? x : x+1); - // central difference - const float gx = (src_pixel[y*pitch+e] - src_pixel[y*pitch+w]) / divider; // [Hk(x+1, y) - Hk(x-1, y)] / 2**(k+1) - const float gy = (src_pixel[s*pitch+x] - src_pixel[n*pitch+x]) / divider; // [Hk(x, y+1) - Hk(x, y-1)] / 2**(k+1) - // gradient - dst_pixel[x] = sqrt(gx*gx + gy*gy); - // average gradient - average += dst_pixel[x]; - } - // next line - dst_pixel += pitch; - } - - *avgGrad = average / (width * height); - - return G; - - } catch(int) { - if(G) FreeImage_Unload(G); - return NULL; - } -} - -/** -Calculate gradient magnitude and its average value on each pyramid level -@param pyramid Gaussian pyramid (nlevels levels) -@param nlevels Number of levels -@param gradients [out] Gradient pyramid (nlevels levels) -@param avgGrad [out] Average gradient on each level (array of size nlevels) -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL GradientPyramid(FIBITMAP **pyramid, int nlevels, FIBITMAP **gradients, float *avgGrad) { - try { - for(int k = 0; k < nlevels; k++) { - FIBITMAP *Hk = pyramid[k]; - gradients[k] = GradientLevel(Hk, &avgGrad[k], k); - if(gradients[k] == NULL) throw(1); - } - return TRUE; - } catch(int) { - for(int k = 0; k < nlevels; k++) { - if(gradients[k] != NULL) { - FreeImage_Unload(gradients[k]); - gradients[k] = NULL; - } - } - return FALSE; - } -} - -/** -Compute the gradient attenuation function PHI(x, y) -@param gradients Gradient pyramid (nlevels levels) -@param avgGrad Average gradient on each level (array of size nlevels) -@param nlevels Number of levels -@param alpha Parameter alpha in the paper -@param beta Parameter beta in the paper -@return Returns the attenuation matrix Phi if successful, returns NULL otherwise -*/ -static FIBITMAP* PhiMatrix(FIBITMAP **gradients, float *avgGrad, int nlevels, float alpha, float beta) { - float *src_pixel, *dst_pixel; - FIBITMAP **phi = NULL; - - try { - phi = (FIBITMAP**)malloc(nlevels * sizeof(FIBITMAP*)); - if(!phi) throw(1); - memset(phi, 0, nlevels * sizeof(FIBITMAP*)); - - for(int k = nlevels-1; k >= 0; k--) { - // compute phi(k) - - FIBITMAP *Gk = gradients[k]; - - const unsigned width = FreeImage_GetWidth(Gk); - const unsigned height = FreeImage_GetHeight(Gk); - const unsigned pitch = FreeImage_GetPitch(Gk) / sizeof(float); - - // parameter alpha is 0.1 times the average gradient magnitude - // also, note the factor of 2**k in the denominator; - // that is there to correct for the fact that an average gradient avgGrad(H) over 2**k pixels - // in the original image will appear as a gradient grad(Hk) = 2**k*avgGrad(H) over a single pixel in Hk. - float ALPHA = alpha * avgGrad[k] * (float)((int)1 << k); - if(ALPHA == 0) ALPHA = EPSILON; - - phi[k] = FreeImage_AllocateT(FIT_FLOAT, width, height); - if(!phi[k]) throw(1); - - src_pixel = (float*)FreeImage_GetBits(Gk); - dst_pixel = (float*)FreeImage_GetBits(phi[k]); - for(unsigned y = 0; y < height; y++) { - for(unsigned x = 0; x < width; x++) { - // compute (alpha / grad) * (grad / alpha) ** beta - const float v = src_pixel[x] / ALPHA; - const float value = (float)pow((float)v, (float)(beta-1)); - dst_pixel[x] = (value > 1) ? 1 : value; - } - // next line - src_pixel += pitch; - dst_pixel += pitch; - } - - if(k < nlevels-1) { - // compute PHI(k) = L( PHI(k+1) ) * phi(k) - FIBITMAP *L = FreeImage_Rescale(phi[k+1], width, height, FILTER_BILINEAR); - if(!L) throw(1); - - src_pixel = (float*)FreeImage_GetBits(L); - dst_pixel = (float*)FreeImage_GetBits(phi[k]); - for(unsigned y = 0; y < height; y++) { - for(unsigned x = 0; x < width; x++) { - dst_pixel[x] *= src_pixel[x]; - } - // next line - src_pixel += pitch; - dst_pixel += pitch; - } - - FreeImage_Unload(L); - - // PHI(k+1) is no longer needed - FreeImage_Unload(phi[k+1]); - phi[k+1] = NULL; - } - - // next level - } - - // get the final result and return - FIBITMAP *dst = phi[0]; - - free(phi); - - return dst; - - } catch(int) { - if(phi) { - for(int k = nlevels-1; k >= 0; k--) { - if(phi[k]) FreeImage_Unload(phi[k]); - } - free(phi); - } - return NULL; - } -} - -/** -Compute gradients in x and y directions, attenuate them with the attenuation matrix, -then compute the divergence div G from the attenuated gradient. -@param H Normalized luminance -@param PHI Attenuation matrix -@return Returns the divergence matrix if successful, returns NULL otherwise -*/ -static FIBITMAP* Divergence(FIBITMAP *H, FIBITMAP *PHI) { - FIBITMAP *Gx = NULL, *Gy = NULL, *divG = NULL; - float *phi, *h, *gx, *gy, *divg; - - try { - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(H); - if(image_type != FIT_FLOAT) throw(1); - - const unsigned width = FreeImage_GetWidth(H); - const unsigned height = FreeImage_GetHeight(H); - - Gx = FreeImage_AllocateT(image_type, width, height); - if(!Gx) throw(1); - Gy = FreeImage_AllocateT(image_type, width, height); - if(!Gy) throw(1); - - const unsigned pitch = FreeImage_GetPitch(H) / sizeof(float); - - // perform gradient attenuation - - phi = (float*)FreeImage_GetBits(PHI); - h = (float*)FreeImage_GetBits(H); - gx = (float*)FreeImage_GetBits(Gx); - gy = (float*)FreeImage_GetBits(Gy); - - for(unsigned y = 0; y < height; y++) { - const unsigned s = (y+1 == height ? y : y+1); - for(unsigned x = 0; x < width; x++) { - const unsigned e = (x+1 == width ? x : x+1); - // forward difference - const unsigned index = y*pitch + x; - const float phi_xy = phi[index]; - const float h_xy = h[index]; - gx[x] = (h[y*pitch+e] - h_xy) * phi_xy; // [H(x+1, y) - H(x, y)] * PHI(x, y) - gy[x] = (h[s*pitch+x] - h_xy) * phi_xy; // [H(x, y+1) - H(x, y)] * PHI(x, y) - } - // next line - gx += pitch; - gy += pitch; - } - - // calculate the divergence - - divG = FreeImage_AllocateT(image_type, width, height); - if(!divG) throw(1); - - gx = (float*)FreeImage_GetBits(Gx); - gy = (float*)FreeImage_GetBits(Gy); - divg = (float*)FreeImage_GetBits(divG); - - for(unsigned y = 0; y < height; y++) { - for(unsigned x = 0; x < width; x++) { - // backward difference approximation - // divG = Gx(x, y) - Gx(x-1, y) + Gy(x, y) - Gy(x, y-1) - const unsigned index = y*pitch + x; - divg[index] = gx[index] + gy[index]; - if(x > 0) divg[index] -= gx[index-1]; - if(y > 0) divg[index] -= gy[index-pitch]; - } - } - - // no longer needed ... - FreeImage_Unload(Gx); - FreeImage_Unload(Gy); - - // return the divergence - return divG; - - } catch(int) { - if(Gx) FreeImage_Unload(Gx); - if(Gy) FreeImage_Unload(Gy); - if(divG) FreeImage_Unload(divG); - return NULL; - } -} - -/** -Given the luminance channel, find max & min luminance values, -normalize to range 0..100 and take the logarithm. -@param Y Image luminance -@return Returns the normalized luminance H if successful, returns NULL otherwise -*/ -static FIBITMAP* LogLuminance(FIBITMAP *Y) { - FIBITMAP *H = NULL; - - try { - // get the luminance channel - FIBITMAP *H = FreeImage_Clone(Y); - if(!H) throw(1); - - const unsigned width = FreeImage_GetWidth(H); - const unsigned height = FreeImage_GetHeight(H); - const unsigned pitch = FreeImage_GetPitch(H); - - // find max & min luminance values - float maxLum = -1e20F, minLum = 1e20F; - - BYTE *bits = (BYTE*)FreeImage_GetBits(H); - for(unsigned y = 0; y < height; y++) { - const float *pixel = (float*)bits; - for(unsigned x = 0; x < width; x++) { - const float value = pixel[x]; - maxLum = (maxLum < value) ? value : maxLum; // max Luminance in the scene - minLum = (minLum < value) ? minLum : value; // min Luminance in the scene - } - // next line - bits += pitch; - } - if(maxLum == minLum) throw(1); - - // normalize to range 0..100 and take the logarithm - const float scale = 100.F / (maxLum - minLum); - bits = (BYTE*)FreeImage_GetBits(H); - for(unsigned y = 0; y < height; y++) { - float *pixel = (float*)bits; - for(unsigned x = 0; x < width; x++) { - const float value = (pixel[x] - minLum) * scale; - pixel[x] = log(value + EPSILON); - } - // next line - bits += pitch; - } - - return H; - - } catch(int) { - if(H) FreeImage_Unload(H); - return NULL; - } -} - -/** -Given a normalized luminance, perform exponentiation and recover the log compressed image -@param Y Input/Output luminance image -*/ -static void ExpLuminance(FIBITMAP *Y) { - const unsigned width = FreeImage_GetWidth(Y); - const unsigned height = FreeImage_GetHeight(Y); - const unsigned pitch = FreeImage_GetPitch(Y); - - BYTE *bits = (BYTE*)FreeImage_GetBits(Y); - for(unsigned y = 0; y < height; y++) { - float *pixel = (float*)bits; - for(unsigned x = 0; x < width; x++) { - pixel[x] = exp(pixel[x]) - EPSILON; - } - bits += pitch; - } -} - -// -------------------------------------------------------------------------- - -/** -Gradient Domain HDR tone mapping operator -@param Y Image luminance values -@param alpha Parameter alpha of the paper (suggested value is 0.1) -@param beta Parameter beta of the paper (suggested value is between 0.8 and 0.9) -@return returns the tone mapped luminance -*/ -static FIBITMAP* tmoFattal02(FIBITMAP *Y, float alpha, float beta) { - const unsigned MIN_PYRAMID_SIZE = 32; // minimun size (width or height) of the coarsest level of the pyramid - - FIBITMAP *H = NULL; - FIBITMAP **pyramid = NULL; - FIBITMAP **gradients = NULL; - FIBITMAP *phy = NULL; - FIBITMAP *divG = NULL; - FIBITMAP *U = NULL; - float *avgGrad = NULL; - - int k; - int nlevels = 0; - - try { - // get the normalized luminance - FIBITMAP *H = LogLuminance(Y); - if(!H) throw(1); - - // get the number of levels for the pyramid - const unsigned width = FreeImage_GetWidth(H); - const unsigned height = FreeImage_GetHeight(H); - unsigned minsize = MIN(width, height); - while(minsize >= MIN_PYRAMID_SIZE) { - nlevels++; - minsize /= 2; - } - - // create the Gaussian pyramid - pyramid = (FIBITMAP**)malloc(nlevels * sizeof(FIBITMAP*)); - if(!pyramid) throw(1); - memset(pyramid, 0, nlevels * sizeof(FIBITMAP*)); - - if(!GaussianPyramid(H, pyramid, nlevels)) throw(1); - - // calculate gradient magnitude and its average value on each pyramid level - gradients = (FIBITMAP**)malloc(nlevels * sizeof(FIBITMAP*)); - if(!gradients) throw(1); - memset(gradients, 0, nlevels * sizeof(FIBITMAP*)); - avgGrad = (float*)malloc(nlevels * sizeof(float)); - if(!avgGrad) throw(1); - - if(!GradientPyramid(pyramid, nlevels, gradients, avgGrad)) throw(1); - - // free the Gaussian pyramid - for(k = 0; k < nlevels; k++) { - if(pyramid[k]) FreeImage_Unload(pyramid[k]); - } - free(pyramid); pyramid = NULL; - - // compute the gradient attenuation function PHI(x, y) - phy = PhiMatrix(gradients, avgGrad, nlevels, alpha, beta); - if(!phy) throw(1); - - // free the gradient pyramid - for(k = 0; k < nlevels; k++) { - if(gradients[k]) FreeImage_Unload(gradients[k]); - } - free(gradients); gradients = NULL; - free(avgGrad); avgGrad = NULL; - - // compute gradients in x and y directions, attenuate them with the attenuation matrix, - // then compute the divergence div G from the attenuated gradient. - divG = Divergence(H, phy); - if(!divG) throw(1); - - // H & phy no longer needed - FreeImage_Unload(H); H = NULL; - FreeImage_Unload(phy); phy = NULL; - - // solve the PDE (Poisson equation) using a multigrid solver and 3 cycles - FIBITMAP *U = FreeImage_MultigridPoissonSolver(divG, 3); - if(!U) throw(1); - - FreeImage_Unload(divG); - - // perform exponentiation and recover the log compressed image - ExpLuminance(U); - - return U; - - } catch(int) { - if(H) FreeImage_Unload(H); - if(pyramid) { - for(int i = 0; i < nlevels; i++) { - if(pyramid[i]) FreeImage_Unload(pyramid[i]); - } - free(pyramid); - } - if(gradients) { - for(int i = 0; i < nlevels; i++) { - if(gradients[i]) FreeImage_Unload(gradients[i]); - } - free(gradients); - } - if(avgGrad) free(avgGrad); - if(phy) FreeImage_Unload(phy); - if(divG) FreeImage_Unload(divG); - if(U) FreeImage_Unload(U); - - return NULL; - } -} - -// ---------------------------------------------------------- -// Main algorithm -// ---------------------------------------------------------- - -/** -Apply the Gradient Domain High Dynamic Range Compression to a RGBF image and convert to 24-bit RGB -@param dib Input RGBF / RGB16 image -@param color_saturation Color saturation (s parameter in the paper) in [0.4..0.6] -@param attenuation Atenuation factor (beta parameter in the paper) in [0.8..0.9] -@return Returns a 24-bit RGB image if successful, returns NULL otherwise -*/ -FIBITMAP* DLL_CALLCONV -FreeImage_TmoFattal02(FIBITMAP *dib, double color_saturation, double attenuation) { - const float alpha = 0.1F; // parameter alpha = 0.1 - const float beta = (float)MAX(0.8, MIN(0.9, attenuation)); // parameter beta = [0.8..0.9] - const float s = (float)MAX(0.4, MIN(0.6, color_saturation));// exponent s controls color saturation = [0.4..0.6] - - FIBITMAP *src = NULL; - FIBITMAP *Yin = NULL; - FIBITMAP *Yout = NULL; - FIBITMAP *dst = NULL; - - if(!FreeImage_HasPixels(dib)) return NULL; - - try { - - // convert to RGBF - src = FreeImage_ConvertToRGBF(dib); - if(!src) throw(1); - - // get the luminance channel - Yin = ConvertRGBFToY(src); - if(!Yin) throw(1); - - // perform the tone mapping - Yout = tmoFattal02(Yin, alpha, beta); - if(!Yout) throw(1); - - // clip low and high values and normalize to [0..1] - //NormalizeY(Yout, 0.001F, 0.995F); - NormalizeY(Yout, 0, 1); - - // compress the dynamic range - - const unsigned width = FreeImage_GetWidth(src); - const unsigned height = FreeImage_GetHeight(src); - - const unsigned rgb_pitch = FreeImage_GetPitch(src); - const unsigned y_pitch = FreeImage_GetPitch(Yin); - - BYTE *bits = (BYTE*)FreeImage_GetBits(src); - BYTE *bits_yin = (BYTE*)FreeImage_GetBits(Yin); - BYTE *bits_yout = (BYTE*)FreeImage_GetBits(Yout); - - for(unsigned y = 0; y < height; y++) { - float *Lin = (float*)bits_yin; - float *Lout = (float*)bits_yout; - float *color = (float*)bits; - for(unsigned x = 0; x < width; x++) { - for(unsigned c = 0; c < 3; c++) { - *color = (Lin[x] > 0) ? pow(*color/Lin[x], s) * Lout[x] : 0; - color++; - } - } - bits += rgb_pitch; - bits_yin += y_pitch; - bits_yout += y_pitch; - } - - // not needed anymore - FreeImage_Unload(Yin); Yin = NULL; - FreeImage_Unload(Yout); Yout = NULL; - - // clamp image highest values to display white, then convert to 24-bit RGB - dst = ClampConvertRGBFTo24(src); - - // clean-up and return - FreeImage_Unload(src); src = NULL; - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, dib); - - return dst; - - } catch(int) { - if(src) FreeImage_Unload(src); - if(Yin) FreeImage_Unload(Yin); - if(Yout) FreeImage_Unload(Yout); - return NULL; - } -} diff --git a/Dependencies/FreeImage/Source/FreeImage/tmoReinhard05.cpp b/Dependencies/FreeImage/Source/FreeImage/tmoReinhard05.cpp deleted file mode 100644 index f91b41c..0000000 --- a/Dependencies/FreeImage/Source/FreeImage/tmoReinhard05.cpp +++ /dev/null @@ -1,260 +0,0 @@ -// ========================================================== -// Tone mapping operator (Reinhard, 2005) -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "ToneMapping.h" - -// ---------------------------------------------------------- -// Global and/or local tone mapping operator -// References: -// [1] Erik Reinhard and Kate Devlin, 'Dynamic Range Reduction Inspired by Photoreceptor Physiology', -// IEEE Transactions on Visualization and Computer Graphics, 11(1), Jan/Feb 2005. -// [2] Erik Reinhard, 'Parameter estimation for photographic tone reproduction', -// Journal of Graphics Tools, vol. 7, no. 1, pp. 4551, 2003. -// ---------------------------------------------------------- - -/** -Tone mapping operator -@param dib Input / Output RGBF image -@param Y Input luminance image version of dib -@param f Overall intensity in range [-8:8] : default to 0 -@param m Contrast in range [0.3:1) : default to 0 -@param a Adaptation in range [0:1] : default to 1 -@param c Color correction in range [0:1] : default to 0 -@return Returns TRUE if successful, returns FALSE otherwise -@see LuminanceFromY -*/ -static BOOL -ToneMappingReinhard05(FIBITMAP *dib, FIBITMAP *Y, float f, float m, float a, float c) { - float Cav[3]; // channel average - float Lav = 0; // average luminance - float Llav = 0; // log average luminance - float minLum = 1; // min luminance - float maxLum = 1; // max luminance - - float L; // pixel luminance - float I_g, I_l; // global and local light adaptation - float I_a; // interpolated pixel light adaptation - float k; // key (low-key means overall dark image, high-key means overall light image) - - // check input parameters - - if((FreeImage_GetImageType(dib) != FIT_RGBF) || (FreeImage_GetImageType(Y) != FIT_FLOAT)) { - return FALSE; - } - - if(f < -8) f = -8; if(f > 8) f = 8; - if(m < 0) m = 0; if(m > 1) m = 1; - if(a < 0) a = 0; if(a > 1) a = 1; - if(c < 0) c = 0; if(c > 1) c = 1; - - const unsigned width = FreeImage_GetWidth(dib); - const unsigned height = FreeImage_GetHeight(dib); - - const unsigned dib_pitch = FreeImage_GetPitch(dib); - const unsigned y_pitch = FreeImage_GetPitch(Y); - - int i; - unsigned x, y; - BYTE *bits = NULL, *Ybits = NULL; - - // get statistics about the data (but only if its really needed) - - f = exp(-f); - if((m == 0) || (a != 1) && (c != 1)) { - // avoid these calculations if its not needed after ... - LuminanceFromY(Y, &maxLum, &minLum, &Lav, &Llav); - k = (log(maxLum) - Llav) / (log(maxLum) - log(minLum)); - if(k < 0) { - // pow(k, 1.4F) is undefined ... - // there's an ambiguity about the calculation of Llav between Reinhard papers and the various implementations ... - // try another world adaptation luminance formula using instead 'worldLum = log(Llav)' - k = (log(maxLum) - log(Llav)) / (log(maxLum) - log(minLum)); - if(k < 0) m = 0.3F; - } - } - m = (m > 0) ? m : (float)(0.3 + 0.7 * pow(k, 1.4F)); - - float max_color = -1e6F; - float min_color = +1e6F; - - // tone map image - - bits = (BYTE*)FreeImage_GetBits(dib); - Ybits = (BYTE*)FreeImage_GetBits(Y); - - if((a == 1) && (c == 0)) { - // when using default values, use a fastest code - - for(y = 0; y < height; y++) { - float *Y = (float*)Ybits; - float *color = (float*)bits; - - for(x = 0; x < width; x++) { - I_a = Y[x]; // luminance(x, y) - for (i = 0; i < 3; i++) { - *color /= ( *color + pow(f * I_a, m) ); - - max_color = (*color > max_color) ? *color : max_color; - min_color = (*color < min_color) ? *color : min_color; - - color++; - } - } - // next line - bits += dib_pitch; - Ybits += y_pitch; - } - } else { - // complete algorithm - - // channel averages - - Cav[0] = Cav[1] = Cav[2] = 0; - if((a != 1) && (c != 0)) { - // channel averages are not needed when (a == 1) or (c == 0) - bits = (BYTE*)FreeImage_GetBits(dib); - for(y = 0; y < height; y++) { - float *color = (float*)bits; - for(x = 0; x < width; x++) { - for(i = 0; i < 3; i++) { - Cav[i] += *color; - color++; - } - } - // next line - bits += dib_pitch; - } - const float image_size = (float)width * height; - for(i = 0; i < 3; i++) { - Cav[i] /= image_size; - } - } - - // perform tone mapping - - bits = (BYTE*)FreeImage_GetBits(dib); - for(y = 0; y < height; y++) { - const float *Y = (float*)Ybits; - float *color = (float*)bits; - - for(x = 0; x < width; x++) { - L = Y[x]; // luminance(x, y) - for (i = 0; i < 3; i++) { - I_l = c * *color + (1-c) * L; - I_g = c * Cav[i] + (1-c) * Lav; - I_a = a * I_l + (1-a) * I_g; - *color /= ( *color + pow(f * I_a, m) ); - - max_color = (*color > max_color) ? *color : max_color; - min_color = (*color < min_color) ? *color : min_color; - - color++; - } - } - // next line - bits += dib_pitch; - Ybits += y_pitch; - } - } - - // normalize intensities - - if(max_color != min_color) { - bits = (BYTE*)FreeImage_GetBits(dib); - const float range = max_color - min_color; - for(y = 0; y < height; y++) { - float *color = (float*)bits; - for(x = 0; x < width; x++) { - for(i = 0; i < 3; i++) { - *color = (*color - min_color) / range; - color++; - } - } - // next line - bits += dib_pitch; - } - } - - return TRUE; -} - -// ---------------------------------------------------------- -// Main algorithm -// ---------------------------------------------------------- - -/** -Apply the global/local tone mapping operator to a RGBF image and convert to 24-bit RGB
-User parameters control intensity, contrast, and level of adaptation -@param src Input RGBF image -@param intensity Overall intensity in range [-8:8] : default to 0 -@param contrast Contrast in range [0.3:1) : default to 0 -@param adaptation Adaptation in range [0:1] : default to 1 -@param color_correction Color correction in range [0:1] : default to 0 -@return Returns a 24-bit RGB image if successful, returns NULL otherwise -*/ -FIBITMAP* DLL_CALLCONV -FreeImage_TmoReinhard05Ex(FIBITMAP *src, double intensity, double contrast, double adaptation, double color_correction) { - if(!FreeImage_HasPixels(src)) return NULL; - - // working RGBF variable - FIBITMAP *dib = NULL, *Y = NULL; - - dib = FreeImage_ConvertToRGBF(src); - if(!dib) return NULL; - - // get the Luminance channel - Y = ConvertRGBFToY(dib); - if(!Y) { - FreeImage_Unload(dib); - return NULL; - } - - // perform the tone mapping - ToneMappingReinhard05(dib, Y, (float)intensity, (float)contrast, (float)adaptation, (float)color_correction); - // not needed anymore - FreeImage_Unload(Y); - // clamp image highest values to display white, then convert to 24-bit RGB - FIBITMAP *dst = ClampConvertRGBFTo24(dib); - - // clean-up and return - FreeImage_Unload(dib); - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - return dst; -} - -/** -Apply the global tone mapping operator to a RGBF image and convert to 24-bit RGB
-User parameters control intensity and contrast -@param src Input RGBF image -@param intensity Overall intensity in range [-8:8] : default to 0 -@param contrast Contrast in range [0.3:1) : default to 0 -@return Returns a 24-bit RGB image if successful, returns NULL otherwise -*/ -FIBITMAP* DLL_CALLCONV -FreeImage_TmoReinhard05(FIBITMAP *src, double intensity, double contrast) { - return FreeImage_TmoReinhard05Ex(src, intensity, contrast, 1, 0); -} diff --git a/Dependencies/FreeImage/Source/FreeImageIO.h b/Dependencies/FreeImage/Source/FreeImageIO.h deleted file mode 100644 index 3fcf6be..0000000 --- a/Dependencies/FreeImage/Source/FreeImageIO.h +++ /dev/null @@ -1,63 +0,0 @@ -// ========================================================== -// Input/Output functions -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifndef FREEIMAGE_IO_H -#define FREEIMAGE_IO_H - -#ifndef FREEIMAGE_H -#include "FreeImage.h" -#endif - -// ---------------------------------------------------------- - -FI_STRUCT (FIMEMORYHEADER) { - /** - Flag used to remember to delete the 'data' buffer. - When the buffer is a wrapped buffer, it is read-only, no need to delete it. - When the buffer is a read/write buffer, it is allocated dynamically and must be deleted when no longer needed. - */ - BOOL delete_me; - /** - file_length is equal to the input buffer size when the buffer is a wrapped buffer, i.e. file_length == data_length. - file_length is the amount of the written bytes when the buffer is a read/write buffer. - */ - long file_length; - /** - When using read-only input buffers, data_length is equal to the input buffer size, i.e. the file_length. - When using read/write buffers, data_length is the size of the allocated buffer, - whose size is greater than or equal to file_length. - */ - long data_length; - /** - start buffer address - */ - void *data; - /** - Current position into the memory stream - */ - long current_position; -}; - -void SetDefaultIO(FreeImageIO *io); - -void SetMemoryIO(FreeImageIO *io); - -#endif // !FREEIMAGE_IO_H diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/BSplineRotate.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/BSplineRotate.cpp deleted file mode 100644 index 690db87..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/BSplineRotate.cpp +++ /dev/null @@ -1,730 +0,0 @@ -// ========================================================== -// Bitmap rotation using B-Splines -// -// Design and implementation by -// - Philippe Thvenaz (philippe.thevenaz@epfl.ch) -// Adaptation for FreeImage by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -/* -========================================================== -This code was taken and adapted from the following reference : - -[1] Philippe Thvenaz, Spline interpolation, a C source code -implementation. http://bigwww.epfl.ch/thevenaz/ - -It implements ideas described in the following papers : - -[2] Unser M., Splines: A Perfect Fit for Signal and Image Processing. -IEEE Signal Processing Magazine, vol. 16, no. 6, pp. 22-38, November 1999. - -[3] Unser M., Aldroubi A., Eden M., B-Spline Signal Processing: Part I--Theory. -IEEE Transactions on Signal Processing, vol. 41, no. 2, pp. 821-832, February 1993. - -[4] Unser M., Aldroubi A., Eden M., B-Spline Signal Processing: Part II--Efficient Design and Applications. -IEEE Transactions on Signal Processing, vol. 41, no. 2, pp. 834-848, February 1993. - -========================================================== -*/ - - -#include -#include "FreeImage.h" -#include "Utilities.h" - -#define PI ((double)3.14159265358979323846264338327950288419716939937510) - -#define ROTATE_QUADRATIC 2L // Use B-splines of degree 2 (quadratic interpolation) -#define ROTATE_CUBIC 3L // Use B-splines of degree 3 (cubic interpolation) -#define ROTATE_QUARTIC 4L // Use B-splines of degree 4 (quartic interpolation) -#define ROTATE_QUINTIC 5L // Use B-splines of degree 5 (quintic interpolation) - - -///////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Prototypes definition - -static void ConvertToInterpolationCoefficients(double *c, long DataLength, double *z, long NbPoles, double Tolerance); -static double InitialCausalCoefficient(double *c, long DataLength, double z, double Tolerance); -static void GetColumn(double *Image, long Width, long x, double *Line, long Height); -static void GetRow(double *Image, long y, double *Line, long Width); -static double InitialAntiCausalCoefficient(double *c, long DataLength, double z); -static void PutColumn(double *Image, long Width, long x, double *Line, long Height); -static void PutRow(double *Image, long y, double *Line, long Width); -static bool SamplesToCoefficients(double *Image, long Width, long Height, long spline_degree); -static double InterpolatedValue(double *Bcoeff, long Width, long Height, double x, double y, long spline_degree); - -static FIBITMAP * Rotate8Bit(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, long spline_degree, BOOL use_mask); - -///////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Coefficients routines - -/** - ConvertToInterpolationCoefficients - - @param c Input samples --> output coefficients - @param DataLength Number of samples or coefficients - @param z Poles - @param NbPoles Number of poles - @param Tolerance Admissible relative error -*/ -static void -ConvertToInterpolationCoefficients(double *c, long DataLength, double *z, long NbPoles, double Tolerance) { - double Lambda = 1; - long n, k; - - // special case required by mirror boundaries - if(DataLength == 1L) { - return; - } - // compute the overall gain - for(k = 0L; k < NbPoles; k++) { - Lambda = Lambda * (1.0 - z[k]) * (1.0 - 1.0 / z[k]); - } - // apply the gain - for (n = 0L; n < DataLength; n++) { - c[n] *= Lambda; - } - // loop over all poles - for (k = 0L; k < NbPoles; k++) { - // causal initialization - c[0] = InitialCausalCoefficient(c, DataLength, z[k], Tolerance); - // causal recursion - for (n = 1L; n < DataLength; n++) { - c[n] += z[k] * c[n - 1L]; - } - // anticausal initialization - c[DataLength - 1L] = InitialAntiCausalCoefficient(c, DataLength, z[k]); - // anticausal recursion - for (n = DataLength - 2L; 0 <= n; n--) { - c[n] = z[k] * (c[n + 1L] - c[n]); - } - } -} - -/** - InitialCausalCoefficient - - @param c Coefficients - @param DataLength Number of coefficients - @param z Actual pole - @param Tolerance Admissible relative error - @return -*/ -static double -InitialCausalCoefficient(double *c, long DataLength, double z, double Tolerance) { - double Sum, zn, z2n, iz; - long n, Horizon; - - // this initialization corresponds to mirror boundaries - Horizon = DataLength; - if(Tolerance > 0) { - Horizon = (long)ceil(log(Tolerance) / log(fabs(z))); - } - if(Horizon < DataLength) { - // accelerated loop - zn = z; - Sum = c[0]; - for (n = 1L; n < Horizon; n++) { - Sum += zn * c[n]; - zn *= z; - } - return(Sum); - } - else { - // full loop - zn = z; - iz = 1.0 / z; - z2n = pow(z, (double)(DataLength - 1L)); - Sum = c[0] + z2n * c[DataLength - 1L]; - z2n *= z2n * iz; - for (n = 1L; n <= DataLength - 2L; n++) { - Sum += (zn + z2n) * c[n]; - zn *= z; - z2n *= iz; - } - return(Sum / (1.0 - zn * zn)); - } -} - -/** - GetColumn - - @param Image Input image array - @param Width Width of the image - @param x x coordinate of the selected line - @param Line Output linear array - @param Height Length of the line -*/ -static void -GetColumn(double *Image, long Width, long x, double *Line, long Height) { - long y; - - Image = Image + x; - for(y = 0L; y < Height; y++) { - Line[y] = (double)*Image; - Image += Width; - } -} - -/** - GetRow - - @param Image Input image array - @param y y coordinate of the selected line - @param Line Output linear array - @param Width Length of the line -*/ -static void -GetRow(double *Image, long y, double *Line, long Width) { - long x; - - Image = Image + (y * Width); - for(x = 0L; x < Width; x++) { - Line[x] = (double)*Image++; - } -} - -/** - InitialAntiCausalCoefficient - - @param c Coefficients - @param DataLength Number of samples or coefficients - @param z Actual pole - @return -*/ -static double -InitialAntiCausalCoefficient(double *c, long DataLength, double z) { - // this initialization corresponds to mirror boundaries - return((z / (z * z - 1.0)) * (z * c[DataLength - 2L] + c[DataLength - 1L])); -} - -/** - PutColumn - - @param Image Output image array - @param Width Width of the image - @param x x coordinate of the selected line - @param Line Input linear array - @param Height Length of the line and height of the image -*/ -static void -PutColumn(double *Image, long Width, long x, double *Line, long Height) { - long y; - - Image = Image + x; - for(y = 0L; y < Height; y++) { - *Image = (double)Line[y]; - Image += Width; - } -} - -/** - PutRow - - @param Image Output image array - @param y y coordinate of the selected line - @param Line Input linear array - @param Width length of the line and width of the image -*/ -static void -PutRow(double *Image, long y, double *Line, long Width) { - long x; - - Image = Image + (y * Width); - for(x = 0L; x < Width; x++) { - *Image++ = (double)Line[x]; - } -} - -/** - SamplesToCoefficients.
- Implement the algorithm that converts the image samples into B-spline coefficients. - This efficient procedure essentially relies on the three papers cited above; - data are processed in-place. - Even though this algorithm is robust with respect to quantization, - we advocate the use of a floating-point format for the data. - - @param Image Input / Output image (in-place processing) - @param Width Width of the image - @param Height Height of the image - @param spline_degree Degree of the spline model - @return Returns true if success, false otherwise -*/ -static bool -SamplesToCoefficients(double *Image, long Width, long Height, long spline_degree) { - double *Line; - double Pole[2]; - long NbPoles; - long x, y; - - // recover the poles from a lookup table - switch (spline_degree) { - case 2L: - NbPoles = 1L; - Pole[0] = sqrt(8.0) - 3.0; - break; - case 3L: - NbPoles = 1L; - Pole[0] = sqrt(3.0) - 2.0; - break; - case 4L: - NbPoles = 2L; - Pole[0] = sqrt(664.0 - sqrt(438976.0)) + sqrt(304.0) - 19.0; - Pole[1] = sqrt(664.0 + sqrt(438976.0)) - sqrt(304.0) - 19.0; - break; - case 5L: - NbPoles = 2L; - Pole[0] = sqrt(135.0 / 2.0 - sqrt(17745.0 / 4.0)) + sqrt(105.0 / 4.0) - - 13.0 / 2.0; - Pole[1] = sqrt(135.0 / 2.0 + sqrt(17745.0 / 4.0)) - sqrt(105.0 / 4.0) - - 13.0 / 2.0; - break; - default: - // Invalid spline degree - return false; - } - - // convert the image samples into interpolation coefficients - - // in-place separable process, along x - Line = (double *)malloc(Width * sizeof(double)); - if (Line == NULL) { - // Row allocation failed - return false; - } - for (y = 0L; y < Height; y++) { - GetRow(Image, y, Line, Width); - ConvertToInterpolationCoefficients(Line, Width, Pole, NbPoles, DBL_EPSILON); - PutRow(Image, y, Line, Width); - } - free(Line); - - // in-place separable process, along y - Line = (double *)malloc(Height * sizeof(double)); - if (Line == NULL) { - // Column allocation failed - return false; - } - for (x = 0L; x < Width; x++) { - GetColumn(Image, Width, x, Line, Height); - ConvertToInterpolationCoefficients(Line, Height, Pole, NbPoles, DBL_EPSILON); - PutColumn(Image, Width, x, Line, Height); - } - free(Line); - - return true; -} - -///////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Interpolation routines - -/** -Perform the bidimensional interpolation of an image. -Given an array of spline coefficients, return the value of -the underlying continuous spline model, sampled at the location (x, y). -The model degree can be 2 (quadratic), 3 (cubic), 4 (quartic), or 5 (quintic). - -@param Bcoeff Input B-spline array of coefficients -@param Width Width of the image -@param Height Height of the image -@param x x coordinate where to interpolate -@param y y coordinate where to interpolate -@param spline_degree Degree of the spline model -@return Returns the value of the underlying continuous spline model, -sampled at the location (x, y) -*/ -static double -InterpolatedValue(double *Bcoeff, long Width, long Height, double x, double y, long spline_degree) { - double *p; - double xWeight[6], yWeight[6]; - double interpolated; - double w, w2, w4, t, t0, t1; - long xIndex[6], yIndex[6]; - long Width2 = 2L * Width - 2L, Height2 = 2L * Height - 2L; - long i, j, k; - - // compute the interpolation indexes - if (spline_degree & 1L) { - i = (long)floor(x) - spline_degree / 2L; - j = (long)floor(y) - spline_degree / 2L; - for(k = 0; k <= spline_degree; k++) { - xIndex[k] = i++; - yIndex[k] = j++; - } - } - else { - i = (long)floor(x + 0.5) - spline_degree / 2L; - j = (long)floor(y + 0.5) - spline_degree / 2L; - for (k = 0; k <= spline_degree; k++) { - xIndex[k] = i++; - yIndex[k] = j++; - } - } - - // compute the interpolation weights - switch (spline_degree) { - case 2L: - /* x */ - w = x - (double)xIndex[1]; - xWeight[1] = 3.0 / 4.0 - w * w; - xWeight[2] = (1.0 / 2.0) * (w - xWeight[1] + 1.0); - xWeight[0] = 1.0 - xWeight[1] - xWeight[2]; - /* y */ - w = y - (double)yIndex[1]; - yWeight[1] = 3.0 / 4.0 - w * w; - yWeight[2] = (1.0 / 2.0) * (w - yWeight[1] + 1.0); - yWeight[0] = 1.0 - yWeight[1] - yWeight[2]; - break; - case 3L: - /* x */ - w = x - (double)xIndex[1]; - xWeight[3] = (1.0 / 6.0) * w * w * w; - xWeight[0] = (1.0 / 6.0) + (1.0 / 2.0) * w * (w - 1.0) - xWeight[3]; - xWeight[2] = w + xWeight[0] - 2.0 * xWeight[3]; - xWeight[1] = 1.0 - xWeight[0] - xWeight[2] - xWeight[3]; - /* y */ - w = y - (double)yIndex[1]; - yWeight[3] = (1.0 / 6.0) * w * w * w; - yWeight[0] = (1.0 / 6.0) + (1.0 / 2.0) * w * (w - 1.0) - yWeight[3]; - yWeight[2] = w + yWeight[0] - 2.0 * yWeight[3]; - yWeight[1] = 1.0 - yWeight[0] - yWeight[2] - yWeight[3]; - break; - case 4L: - /* x */ - w = x - (double)xIndex[2]; - w2 = w * w; - t = (1.0 / 6.0) * w2; - xWeight[0] = 1.0 / 2.0 - w; - xWeight[0] *= xWeight[0]; - xWeight[0] *= (1.0 / 24.0) * xWeight[0]; - t0 = w * (t - 11.0 / 24.0); - t1 = 19.0 / 96.0 + w2 * (1.0 / 4.0 - t); - xWeight[1] = t1 + t0; - xWeight[3] = t1 - t0; - xWeight[4] = xWeight[0] + t0 + (1.0 / 2.0) * w; - xWeight[2] = 1.0 - xWeight[0] - xWeight[1] - xWeight[3] - xWeight[4]; - /* y */ - w = y - (double)yIndex[2]; - w2 = w * w; - t = (1.0 / 6.0) * w2; - yWeight[0] = 1.0 / 2.0 - w; - yWeight[0] *= yWeight[0]; - yWeight[0] *= (1.0 / 24.0) * yWeight[0]; - t0 = w * (t - 11.0 / 24.0); - t1 = 19.0 / 96.0 + w2 * (1.0 / 4.0 - t); - yWeight[1] = t1 + t0; - yWeight[3] = t1 - t0; - yWeight[4] = yWeight[0] + t0 + (1.0 / 2.0) * w; - yWeight[2] = 1.0 - yWeight[0] - yWeight[1] - yWeight[3] - yWeight[4]; - break; - case 5L: - /* x */ - w = x - (double)xIndex[2]; - w2 = w * w; - xWeight[5] = (1.0 / 120.0) * w * w2 * w2; - w2 -= w; - w4 = w2 * w2; - w -= 1.0 / 2.0; - t = w2 * (w2 - 3.0); - xWeight[0] = (1.0 / 24.0) * (1.0 / 5.0 + w2 + w4) - xWeight[5]; - t0 = (1.0 / 24.0) * (w2 * (w2 - 5.0) + 46.0 / 5.0); - t1 = (-1.0 / 12.0) * w * (t + 4.0); - xWeight[2] = t0 + t1; - xWeight[3] = t0 - t1; - t0 = (1.0 / 16.0) * (9.0 / 5.0 - t); - t1 = (1.0 / 24.0) * w * (w4 - w2 - 5.0); - xWeight[1] = t0 + t1; - xWeight[4] = t0 - t1; - /* y */ - w = y - (double)yIndex[2]; - w2 = w * w; - yWeight[5] = (1.0 / 120.0) * w * w2 * w2; - w2 -= w; - w4 = w2 * w2; - w -= 1.0 / 2.0; - t = w2 * (w2 - 3.0); - yWeight[0] = (1.0 / 24.0) * (1.0 / 5.0 + w2 + w4) - yWeight[5]; - t0 = (1.0 / 24.0) * (w2 * (w2 - 5.0) + 46.0 / 5.0); - t1 = (-1.0 / 12.0) * w * (t + 4.0); - yWeight[2] = t0 + t1; - yWeight[3] = t0 - t1; - t0 = (1.0 / 16.0) * (9.0 / 5.0 - t); - t1 = (1.0 / 24.0) * w * (w4 - w2 - 5.0); - yWeight[1] = t0 + t1; - yWeight[4] = t0 - t1; - break; - default: - // Invalid spline degree - return 0; - } - - // apply the mirror boundary conditions - for(k = 0; k <= spline_degree; k++) { - xIndex[k] = (Width == 1L) ? (0L) : ((xIndex[k] < 0L) ? - (-xIndex[k] - Width2 * ((-xIndex[k]) / Width2)) - : (xIndex[k] - Width2 * (xIndex[k] / Width2))); - if (Width <= xIndex[k]) { - xIndex[k] = Width2 - xIndex[k]; - } - yIndex[k] = (Height == 1L) ? (0L) : ((yIndex[k] < 0L) ? - (-yIndex[k] - Height2 * ((-yIndex[k]) / Height2)) - : (yIndex[k] - Height2 * (yIndex[k] / Height2))); - if (Height <= yIndex[k]) { - yIndex[k] = Height2 - yIndex[k]; - } - } - - // perform interpolation - interpolated = 0.0; - for(j = 0; j <= spline_degree; j++) { - p = Bcoeff + (yIndex[j] * Width); - w = 0.0; - for(i = 0; i <= spline_degree; i++) { - w += xWeight[i] * p[xIndex[i]]; - } - interpolated += yWeight[j] * w; - } - - return interpolated; -} - -///////////////////////////////////////////////////////////////////////////////////////////////////////////// -// FreeImage implementation - - -/** - Image translation and rotation using B-Splines. - - @param dib Input 8-bit greyscale image - @param angle Output image rotation in degree - @param x_shift Output image horizontal shift - @param y_shift Output image vertical shift - @param x_origin Output origin of the x-axis - @param y_origin Output origin of the y-axis - @param spline_degree Output degree of the B-spline model - @param use_mask Whether or not to mask the image - @return Returns the translated & rotated dib if successful, returns NULL otherwise -*/ -static FIBITMAP * -Rotate8Bit(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, long spline_degree, BOOL use_mask) { - double *ImageRasterArray; - double p; - double a11, a12, a21, a22; - double x0, y0, x1, y1; - long x, y; - long spline; - bool bResult; - - int bpp = FreeImage_GetBPP(dib); - if(bpp != 8) { - return NULL; - } - - int width = FreeImage_GetWidth(dib); - int height = FreeImage_GetHeight(dib); - switch(spline_degree) { - case ROTATE_QUADRATIC: - spline = 2L; // Use splines of degree 2 (quadratic interpolation) - break; - case ROTATE_CUBIC: - spline = 3L; // Use splines of degree 3 (cubic interpolation) - break; - case ROTATE_QUARTIC: - spline = 4L; // Use splines of degree 4 (quartic interpolation) - break; - case ROTATE_QUINTIC: - spline = 5L; // Use splines of degree 5 (quintic interpolation) - break; - default: - spline = 3L; - } - - // allocate output image - FIBITMAP *dst = FreeImage_Allocate(width, height, bpp); - if(!dst) - return NULL; - // buid a grey scale palette - RGBQUAD *pal = FreeImage_GetPalette(dst); - for(int i = 0; i < 256; i++) { - pal[i].rgbRed = pal[i].rgbGreen = pal[i].rgbBlue = (BYTE)i; - } - - // allocate a temporary array - ImageRasterArray = (double*)malloc(width * height * sizeof(double)); - if(!ImageRasterArray) { - FreeImage_Unload(dst); - return NULL; - } - // copy data samples - for(y = 0; y < height; y++) { - double *pImage = &ImageRasterArray[y*width]; - BYTE *src_bits = FreeImage_GetScanLine(dib, height-1-y); - - for(x = 0; x < width; x++) { - pImage[x] = (double)src_bits[x]; - } - } - - // convert between a representation based on image samples - // and a representation based on image B-spline coefficients - bResult = SamplesToCoefficients(ImageRasterArray, width, height, spline); - if(!bResult) { - FreeImage_Unload(dst); - free(ImageRasterArray); - return NULL; - } - - // prepare the geometry - angle *= PI / 180.0; - a11 = cos(angle); - a12 = -sin(angle); - a21 = sin(angle); - a22 = cos(angle); - x0 = a11 * (x_shift + x_origin) + a12 * (y_shift + y_origin); - y0 = a21 * (x_shift + x_origin) + a22 * (y_shift + y_origin); - x_shift = x_origin - x0; - y_shift = y_origin - y0; - - // visit all pixels of the output image and assign their value - for(y = 0; y < height; y++) { - BYTE *dst_bits = FreeImage_GetScanLine(dst, height-1-y); - - x0 = a12 * (double)y + x_shift; - y0 = a22 * (double)y + y_shift; - - for(x = 0; x < width; x++) { - x1 = x0 + a11 * (double)x; - y1 = y0 + a21 * (double)x; - if(use_mask) { - if((x1 <= -0.5) || (((double)width - 0.5) <= x1) || (y1 <= -0.5) || (((double)height - 0.5) <= y1)) { - p = 0; - } - else { - p = (double)InterpolatedValue(ImageRasterArray, width, height, x1, y1, spline); - } - } - else { - p = (double)InterpolatedValue(ImageRasterArray, width, height, x1, y1, spline); - } - // clamp and convert to BYTE - dst_bits[x] = (BYTE)MIN(MAX((int)0, (int)(p + 0.5)), (int)255); - } - } - - // free working array and return - free(ImageRasterArray); - - return dst; -} - -/** - Image rotation using a 3rd order (cubic) B-Splines. - - @param dib Input dib (8, 24 or 32-bit) - @param angle Output image rotation - @param x_shift Output image horizontal shift - @param y_shift Output image vertical shift - @param x_origin Output origin of the x-axis - @param y_origin Output origin of the y-axis - @param use_mask Whether or not to mask the image - @return Returns the translated & rotated dib if successful, returns NULL otherwise -*/ -FIBITMAP * DLL_CALLCONV -FreeImage_RotateEx(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, BOOL use_mask) { - - int x, y, bpp; - int channel, nb_channels; - BYTE *src_bits, *dst_bits; - FIBITMAP *src8 = NULL, *dst8 = NULL, *dst = NULL; - - if(!FreeImage_HasPixels(dib)) return NULL; - - try { - - bpp = FreeImage_GetBPP(dib); - - if(bpp == 8) { - FIBITMAP *dst_8 = Rotate8Bit(dib, angle, x_shift, y_shift, x_origin, y_origin, ROTATE_CUBIC, use_mask); - if(dst_8) { - // copy metadata from src to dst - FreeImage_CloneMetadata(dst_8, dib); - } - return dst_8; - } - if((bpp == 24) || (bpp == 32)) { - // allocate dst image - int width = FreeImage_GetWidth(dib); - int height = FreeImage_GetHeight(dib); - if( bpp == 24 ) { - dst = FreeImage_Allocate(width, height, bpp, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } else { - dst = FreeImage_Allocate(width, height, bpp, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } - if(!dst) throw(1); - - // allocate a temporary 8-bit dib (no need to build a palette) - src8 = FreeImage_Allocate(width, height, 8); - if(!src8) throw(1); - - // process each channel separately - // ------------------------------- - nb_channels = (bpp / 8); - - for(channel = 0; channel < nb_channels; channel++) { - // extract channel from source dib - for(y = 0; y < height; y++) { - src_bits = FreeImage_GetScanLine(dib, y); - dst_bits = FreeImage_GetScanLine(src8, y); - for(x = 0; x < width; x++) { - dst_bits[x] = src_bits[channel]; - src_bits += nb_channels; - } - } - - // process channel - dst8 = Rotate8Bit(src8, angle, x_shift, y_shift, x_origin, y_origin, ROTATE_CUBIC, use_mask); - if(!dst8) throw(1); - - // insert channel to destination dib - for(y = 0; y < height; y++) { - src_bits = FreeImage_GetScanLine(dst8, y); - dst_bits = FreeImage_GetScanLine(dst, y); - for(x = 0; x < width; x++) { - dst_bits[channel] = src_bits[x]; - dst_bits += nb_channels; - } - } - - FreeImage_Unload(dst8); - } - - FreeImage_Unload(src8); - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, dib); - - return dst; - } - } catch(int) { - if(src8) FreeImage_Unload(src8); - if(dst8) FreeImage_Unload(dst8); - if(dst) FreeImage_Unload(dst); - } - - return NULL; -} diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/Background.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/Background.cpp deleted file mode 100644 index 29a0171..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/Background.cpp +++ /dev/null @@ -1,895 +0,0 @@ -// ========================================================== -// Background filling routines -// -// Design and implementation by -// - Carsten Klein (c.klein@datagis.com) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -/** @brief Determines, whether a palletized image is visually greyscale or not. - - Unlike with FreeImage_GetColorType, which returns either FIC_MINISBLACK or - FIC_MINISWHITE for a greyscale image with a linear ramp palette, the return - value of this function does not depend on the palette's order, but only on the - palette's individual colors. - @param dib The image to be tested. - @return Returns TRUE if the palette of the image specified contains only - greyscales, FALSE otherwise. - */ -static BOOL -IsVisualGreyscaleImage(FIBITMAP *dib) { - - switch (FreeImage_GetBPP(dib)) { - case 1: - case 4: - case 8: { - unsigned ncolors = FreeImage_GetColorsUsed(dib); - RGBQUAD *rgb = FreeImage_GetPalette(dib); - for (unsigned i = 0; i< ncolors; i++) { - if ((rgb->rgbRed != rgb->rgbGreen) || (rgb->rgbRed != rgb->rgbBlue)) { - return FALSE; - } - } - return TRUE; - } - default: { - return (FreeImage_GetColorType(dib) == FIC_MINISBLACK); - } - } -} - -/** @brief Looks up a specified color in a FIBITMAP's palette and returns the color's - palette index or -1 if the color was not found. - - Unlike with FreeImage_GetColorType, which returns either FIC_MINISBLACK or - FIC_MINISWHITE for a greyscale image with a linear ramp palette, the return - value of this function does not depend on the palette's order, but only on the - palette's individual colors. - @param dib The image, whose palette should be searched through. - @param color The color to be searched in the palette. - @param options Options that affect the color search process. - @param color_type A pointer, that optionally specifies the image's color type as - returned by FreeImage_GetColorType. If invalid or NULL, this function determines the - color type with FreeImage_GetColorType. - @return Returns the specified color's palette index, the color's rgbReserved member - if option FI_COLOR_ALPHA_IS_INDEX was specified or -1, if the color was not found - in the image's palette or if the specified image is non-palletized. - */ -static int -GetPaletteIndex(FIBITMAP *dib, const RGBQUAD *color, int options, FREE_IMAGE_COLOR_TYPE *color_type) { - - int result = -1; - - if ((!dib) || (!color)) { - return result; - } - - int bpp = FreeImage_GetBPP(dib); - - // First check trivial case: return color->rgbReserved if only - // FI_COLOR_ALPHA_IS_INDEX is set. - if ((options & FI_COLOR_ALPHA_IS_INDEX) == FI_COLOR_ALPHA_IS_INDEX) { - if (bpp == 1) { - return color->rgbReserved & 0x01; - } else if (bpp == 4) { - return color->rgbReserved & 0x0F; - } - return color->rgbReserved; - } - - if (bpp == 8) { - FREE_IMAGE_COLOR_TYPE ct = - (color_type == NULL || *color_type < 0) ? - FreeImage_GetColorType(dib) : *color_type; - if (ct == FIC_MINISBLACK) { - return GREY(color->rgbRed, color->rgbGreen, color->rgbBlue); - } - if (ct == FIC_MINISWHITE) { - return 255 - GREY(color->rgbRed, color->rgbGreen, color->rgbBlue); - } - } else if (bpp > 8) { - // for palettized images only - return result; - } - - if (options & FI_COLOR_FIND_EQUAL_COLOR) { - - // Option FI_COLOR_ALPHA_IS_INDEX is implicit here so, set - // index to color->rgbReserved - result = color->rgbReserved; - if (bpp == 1) { - result &= 0x01; - } else if (bpp == 4) { - result &= 0x0F; - } - - unsigned ucolor; - if (!IsVisualGreyscaleImage(dib)) { - ucolor = (*((unsigned *)color)) & 0xFFFFFF; - } else { - ucolor = GREY(color->rgbRed, color->rgbGreen, color->rgbBlue) * 0x010101; - //ucolor = (ucolor | (ucolor << 8) | (ucolor << 16)); - } - unsigned ncolors = FreeImage_GetColorsUsed(dib); - unsigned *palette = (unsigned *)FreeImage_GetPalette(dib); - for (unsigned i = 0; i < ncolors; i++) { - if ((palette[i] & 0xFFFFFF) == ucolor) { - result = i; - break; - } - } - } else { - unsigned minimum = UINT_MAX; - unsigned ncolors = FreeImage_GetColorsUsed(dib); - BYTE *palette = (BYTE *)FreeImage_GetPalette(dib); - BYTE red, green, blue; - if (!IsVisualGreyscaleImage(dib)) { - red = color->rgbRed; - green = color->rgbGreen; - blue = color->rgbBlue; - } else { - red = GREY(color->rgbRed, color->rgbGreen, color->rgbBlue); - green = blue = red; - } - for (unsigned i = 0; i < ncolors; i++) { - unsigned m = abs(palette[FI_RGBA_BLUE] - blue) - + abs(palette[FI_RGBA_GREEN] - green) - + abs(palette[FI_RGBA_RED] - red); - if (m < minimum) { - minimum = m; - result = i; - if (m == 0) { - break; - } - } - palette += sizeof(RGBQUAD); - } - } - return result; -} - -/** @brief Blends an alpha-transparent foreground color over an opaque background - color. - - This function blends the alpha-transparent foreground color fgcolor over the - background color bgcolor. The background color is considered fully opaque, - whatever it's alpha value contains, whereas the foreground color is considered - to be a real RGBA color with an alpha value, which is used for the blend - operation. The resulting color is returned through the blended parameter. - @param bgcolor The background color for the blend operation. - @param fgcolor The foreground color for the blend operation. This color's alpha - value, stored in the rgbReserved member, is the alpha value used for the blend - operation. - @param blended This out parameter takes the blended color and so, returns it to - the caller. This color's alpha value will be 0xFF (255) so, the blended color - itself has no transparency. The this argument is not changed, if the function - fails. - @return Returns TRUE on success, FALSE otherwise. This function fails if any of - the color arguments is a null pointer. - */ -static BOOL -GetAlphaBlendedColor(const RGBQUAD *bgcolor, const RGBQUAD *fgcolor, RGBQUAD *blended) { - - if ((!bgcolor) || (!fgcolor) || (!blended)) { - return FALSE; - } - - BYTE alpha = fgcolor->rgbReserved; - BYTE not_alpha = ~alpha; - - blended->rgbRed = (BYTE)( ((WORD)fgcolor->rgbRed * alpha + not_alpha * (WORD)bgcolor->rgbRed) >> 8 ); - blended->rgbGreen = (BYTE)( ((WORD)fgcolor->rgbGreen * alpha + not_alpha * (WORD)bgcolor->rgbGreen) >> 8) ; - blended->rgbBlue = (BYTE)(((WORD)fgcolor->rgbBlue * alpha + not_alpha * (WORD)bgcolor->rgbBlue) >> 8); - blended->rgbReserved = 0xFF; - - return TRUE; -} - -/** @brief Fills a FIT_BITMAP image with the specified color. - - This function does the dirty work for FreeImage_FillBackground for FIT_BITMAP - images. - @param dib The image to be filled. - @param color The color, the specified image should be filled with. - @param options Options that affect the color search process for palletized images. - @return Returns TRUE on success, FALSE otherwise. This function fails if any of - the dib and color is NULL or the provided image is not a FIT_BITMAP image. - */ -static BOOL -FillBackgroundBitmap(FIBITMAP *dib, const RGBQUAD *color, int options) { - - if ((!dib) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) { - return FALSE;; - } - - if (!color) { - return FALSE; - } - - const RGBQUAD *color_intl = color; - unsigned bpp = FreeImage_GetBPP(dib); - unsigned width = FreeImage_GetWidth(dib); - unsigned height = FreeImage_GetHeight(dib); - - FREE_IMAGE_COLOR_TYPE color_type = FreeImage_GetColorType(dib); - - // get a pointer to the first scanline (bottom line) - BYTE *src_bits = FreeImage_GetScanLine(dib, 0); - BYTE *dst_bits = src_bits; - - BOOL supports_alpha = ((bpp >= 24) || ((bpp == 8) && (color_type != FIC_PALETTE))); - - // Check for RGBA case if bitmap supports alpha - // blending (8-bit greyscale, 24- or 32-bit images) - if (supports_alpha && (options & FI_COLOR_IS_RGBA_COLOR)) { - - if (color->rgbReserved == 0) { - // the fill color is fully transparent; we are done - return TRUE; - } - - // Only if the fill color is NOT fully opaque, draw it with - // the (much) slower FreeImage_DrawLine function and return. - // Since we do not have the FreeImage_DrawLine function in this - // release, just assume to have an unicolor background and fill - // all with an 'alpha-blended' color. - if (color->rgbReserved < 255) { - - // If we will draw on an unicolor background, it's - // faster to draw opaque with an alpha blended color. - // So, first get the color from the first pixel in the - // image (bottom-left pixel). - RGBQUAD bgcolor; - if (bpp == 8) { - bgcolor = FreeImage_GetPalette(dib)[*src_bits]; - } else { - bgcolor.rgbBlue = src_bits[FI_RGBA_BLUE]; - bgcolor.rgbGreen = src_bits[FI_RGBA_GREEN]; - bgcolor.rgbRed = src_bits[FI_RGBA_RED]; - bgcolor.rgbReserved = 0xFF; - } - RGBQUAD blend; - GetAlphaBlendedColor(&bgcolor, color_intl, &blend); - color_intl = &blend; - } - } - - int index = (bpp <= 8) ? GetPaletteIndex(dib, color_intl, options, &color_type) : 0; - if (index == -1) { - // No palette index found for a palletized - // image. This should never happen... - return FALSE; - } - - // first, build the first scanline (line 0) - switch (bpp) { - case 1: { - unsigned bytes = (width / 8); - memset(dst_bits, ((index == 1) ? 0xFF : 0x00), bytes); - //int n = width % 8; - int n = width & 7; - if (n) { - if (index == 1) { - // set n leftmost bits - dst_bits[bytes] |= (0xFF << (8 - n)); - } else { - // clear n leftmost bits - dst_bits[bytes] &= (0xFF >> n); - } - } - break; - } - case 4: { - unsigned bytes = (width / 2); - memset(dst_bits, (index | (index << 4)), bytes); - //if (bytes % 2) { - if (bytes & 1) { - dst_bits[bytes] &= 0x0F; - dst_bits[bytes] |= (index << 4); - } - break; - } - case 8: { - memset(dst_bits, index, FreeImage_GetLine(dib)); - break; - } - case 16: { - WORD wcolor = RGBQUAD_TO_WORD(dib, color_intl); - for (unsigned x = 0; x < width; x++) { - ((WORD *)dst_bits)[x] = wcolor; - } - break; - } - case 24: { - RGBTRIPLE rgbt = *((RGBTRIPLE *)color_intl); - for (unsigned x = 0; x < width; x++) { - ((RGBTRIPLE *)dst_bits)[x] = rgbt; - } - break; - } - case 32: { - RGBQUAD rgbq; - rgbq.rgbBlue = ((RGBTRIPLE *)color_intl)->rgbtBlue; - rgbq.rgbGreen = ((RGBTRIPLE *)color_intl)->rgbtGreen; - rgbq.rgbRed = ((RGBTRIPLE *)color_intl)->rgbtRed; - rgbq.rgbReserved = 0xFF; - for (unsigned x = 0; x < width; x++) { - ((RGBQUAD *)dst_bits)[x] = rgbq; - } - break; - } - default: - return FALSE; - } - - // Then, copy the first scanline into all following scanlines. - // 'src_bits' is a pointer to the first scanline and is already - // set up correctly. - if (src_bits) { - unsigned pitch = FreeImage_GetPitch(dib); - unsigned bytes = FreeImage_GetLine(dib); - dst_bits = src_bits + pitch; - for (unsigned y = 1; y < height; y++) { - memcpy(dst_bits, src_bits, bytes); - dst_bits += pitch; - } - } - return TRUE; -} - -/** @brief Fills an image with the specified color. - - This function sets all pixels of an image to the color provided through the color - parameter. Since this should work for all image types supported by FreeImage, the - pointer color must point to a memory location, which is at least as large as the - image's color value, if this size is greater than 4 bytes. As the color is specified - by an RGBQUAD structure for all images of type FIT_BITMAP (including all palletized - images), the smallest possible size of this memory is the size of the RGBQUAD structure, - which uses 4 bytes. - - So, color must point to a double, if the image to be filled is of type FIT_DOUBLE and - point to a RGBF structure if the image is of type FIT_RGBF and so on. - - However, the fill color is always specified through a RGBQUAD structure for all images - of type FIT_BITMAP. So, for 32- and 24-bit images, the red, green and blue members of - the RGBQUAD structure are directly used for the image's red, green and blue channel - respectively. Although alpha transparent RGBQUAD colors are supported, the alpha channel - of a 32-bit image never gets modified by this function. A fill color with an alpha value - smaller than 255 gets blended with the image's actual background color, which is determined - from the image's bottom-left pixel. So, currently using alpha enabled colors, assumes the - image to be unicolor before the fill operation. However, the RGBQUAD's rgbReserved member is - only taken into account, if option FI_COLOR_IS_RGBA_COLOR has been specified. - - For 16-bit images, the red-, green- and blue components of the specified color are - transparently translated into either the 16-bit 555 or 565 representation. This depends - on the image's actual red- green- and blue masks. - - Special attention must be payed for palletized images. Generally, the RGB color specified - is looked up in the image's palette. The found palette index is then used to fill the image. - There are some option flags, that affect this lookup process: - - no option specified (0x00) Uses the color, that is nearest to the specified color. - This is the default behavior and should always find a - color in the palette. However, the visual result may - far from what was expected and mainly depends on the - image's palette. - - FI_COLOR_FIND_EQUAL_COLOR (0x02) Searches the image's palette for the specified color - but only uses the returned palette index, if the specified - color exactly matches the palette entry. Of course, - depending on the image's actual palette entries, this - operation may fail. In this case, the function falls back - to option FI_COLOR_ALPHA_IS_INDEX and uses the RGBQUAD's - rgbReserved member (or its low nibble for 4-bit images - or its least significant bit (LSB) for 1-bit images) as - the palette index used for the fill operation. - - FI_COLOR_ALPHA_IS_INDEX (0x04) Does not perform any color lookup from the palette, but - uses the RGBQUAD's alpha channel member rgbReserved as - the palette index to be used for the fill operation. - However, for 4-bit images, only the low nibble of the - rgbReserved member are used and for 1-bit images, only - the least significant bit (LSB) is used. - - This function fails if any of dib and color is NULL. - - @param dib The image to be filled. - @param color A pointer to the color value to be used for filling the image. The - memory pointed to by this pointer is always assumed to be at least as large as the - image's color value, but never smaller than the size of an RGBQUAD structure. - @param options Options that affect the color search process for palletized images. - @return Returns TRUE on success, FALSE otherwise. This function fails if any of - dib and color is NULL. - */ -BOOL DLL_CALLCONV -FreeImage_FillBackground(FIBITMAP *dib, const void *color, int options) { - - if (!FreeImage_HasPixels(dib)) { - return FALSE; - } - - if (!color) { - return FALSE; - } - - // handle FIT_BITMAP images with FreeImage_FillBackground() - if (FreeImage_GetImageType(dib) == FIT_BITMAP) { - return FillBackgroundBitmap(dib, (RGBQUAD *)color, options); - } - - // first, construct the first scanline (bottom line) - unsigned bytespp = (FreeImage_GetBPP(dib) / 8); - BYTE *src_bits = FreeImage_GetScanLine(dib, 0); - BYTE *dst_bits = src_bits; - for (unsigned x = 0; x < FreeImage_GetWidth(dib); x++) { - memcpy(dst_bits, color, bytespp); - dst_bits += bytespp; - } - - // then, copy the first scanline into all following scanlines - unsigned height = FreeImage_GetHeight(dib); - unsigned pitch = FreeImage_GetPitch(dib); - unsigned bytes = FreeImage_GetLine(dib); - dst_bits = src_bits + pitch; - for (unsigned y = 1; y < height; y++) { - memcpy(dst_bits, src_bits, bytes); - dst_bits += pitch; - } - return TRUE; -} - -/** @brief Allocates a new image of the specified type, width, height and bit depth and - optionally fills it with the specified color. - - This function is an extension to FreeImage_AllocateT, which additionally supports specifying - a palette to be set for the newly create image, as well as specifying a background color, - the newly created image should initially be filled with. - - Basically, this function internally relies on function FreeImage_AllocateT, followed by a - call to FreeImage_FillBackground. This is why both parameters color and options behave the - same as it is documented for function FreeImage_FillBackground. So, please refer to the - documentation of FreeImage_FillBackground to learn more about parameters color and options. - - The palette specified through parameter palette is only copied to the newly created - image, if its image type is FIT_BITMAP and the desired bit depth is smaller than or equal - to 8 bits per pixel. In other words, the palette parameter is only taken into account for - palletized images. However, if the preceding conditions match and if palette is not NULL, - the memory pointed to by the palette pointer is assumed to be at least as large as size - of a fully populated palette for the desired bit depth. So, for an 8-bit image, this size - is 256 x sizeof(RGBQUAD), for an 4-bit image it is 16 x sizeof(RGBQUAD) and it is - 2 x sizeof(RGBQUAD) for a 1-bit image. In other words, this function does not support - partial palettes. - - However, specifying a palette is not necessarily needed, even for palletized images. This - function is capable of implicitly creating a palette, if parameter palette is NULL. If the - specified background color is a greyscale value (red = green = blue) or if option - FI_COLOR_ALPHA_IS_INDEX is specified, a greyscale palette is created. For a 1-bit image, only - if the specified background color is either black or white, a monochrome palette, consisting - of black and white only is created. In any case, the darker colors are stored at the smaller - palette indices. - - If the specified background color is not a greyscale value, or is neither black nor white - for a 1-bit image, solely this single color is injected into the otherwise black-initialized - palette. For this operation, option FI_COLOR_ALPHA_IS_INDEX is implicit, so the specified - color is applied to the palette entry, specified by the background color's rgbReserved - member. The image is then filled with this palette index. - - This function returns a newly created image as function FreeImage_AllocateT does, if both - parameters color and palette are NULL. If only color is NULL, the palette pointed to by - parameter palette is initially set for the new image, if a palletized image of type - FIT_BITMAP is created. However, in the latter case, this function returns an image, whose - pixels are all initialized with zeros so, the image will be filled with the color of the - first palette entry. - - @param type Specifies the image type of the new image. - @param width The desired width in pixels of the new image. - @param height The desired height in pixels of the new image. - @param bpp The desired bit depth of the new image. - @param color A pointer to the color value to be used for filling the image. The - memory pointed to by this pointer is always assumed to be at least as large as the - image's color value but never smaller than the size of an RGBQUAD structure. - @param options Options that affect the color search process for palletized images. - @param red_mask Specifies the bits used to store the red components of a pixel. - @param green_mask Specifies the bits used to store the green components of a pixel. - @param blue_mask Specifies the bits used to store the blue components of a pixel. - @return Returns a pointer to a newly allocated image on success, NULL otherwise. - */ -FIBITMAP * DLL_CALLCONV -FreeImage_AllocateExT(FREE_IMAGE_TYPE type, int width, int height, int bpp, const void *color, int options, const RGBQUAD *palette, unsigned red_mask, unsigned green_mask, unsigned blue_mask) { - - FIBITMAP *bitmap = FreeImage_AllocateT(type, width, height, bpp, red_mask, green_mask, blue_mask); - - if (!color) { - if ((palette) && (type == FIT_BITMAP) && (bpp <= 8)) { - memcpy(FreeImage_GetPalette(bitmap), palette, FreeImage_GetColorsUsed(bitmap) * sizeof(RGBQUAD)); - } - return bitmap; - } - - if (bitmap != NULL) { - - // Only fill the new bitmap if the specified color - // differs from "black", that is not all bytes of the - // color are equal to zero. - switch (bpp) { - case 1: { - // although 1-bit implies FIT_BITMAP, better get an unsigned - // color and palette - unsigned *urgb = (unsigned *)color; - unsigned *upal = (unsigned *)FreeImage_GetPalette(bitmap); - RGBQUAD rgbq = RGBQUAD(); - - if (palette != NULL) { - // clone the specified palette - memcpy(FreeImage_GetPalette(bitmap), palette, 2 * sizeof(RGBQUAD)); - } else if (options & FI_COLOR_ALPHA_IS_INDEX) { - CREATE_GREYSCALE_PALETTE(upal, 2); - } else { - // check, whether the specified color is either black or white - if ((*urgb & 0xFFFFFF) == 0x000000) { - // in any case build a FIC_MINISBLACK palette - CREATE_GREYSCALE_PALETTE(upal, 2); - color = &rgbq; - } else if ((*urgb & 0xFFFFFF) == 0xFFFFFF) { - // in any case build a FIC_MINISBLACK palette - CREATE_GREYSCALE_PALETTE(upal, 2); - rgbq.rgbReserved = 1; - color = &rgbq; - } else { - // Otherwise inject the specified color into the so far - // black-only palette. We use color->rgbReserved as the - // desired palette index. - BYTE index = ((RGBQUAD *)color)->rgbReserved & 0x01; - upal[index] = *urgb & 0x00FFFFFF; - } - options |= FI_COLOR_ALPHA_IS_INDEX; - } - // and defer to FreeImage_FillBackground - FreeImage_FillBackground(bitmap, color, options); - break; - } - case 4: { - // 4-bit implies FIT_BITMAP so, get a RGBQUAD color - RGBQUAD *rgb = (RGBQUAD *)color; - RGBQUAD *pal = FreeImage_GetPalette(bitmap); - RGBQUAD rgbq = RGBQUAD(); - - if (palette != NULL) { - // clone the specified palette - memcpy(pal, palette, 16 * sizeof(RGBQUAD)); - } else if (options & FI_COLOR_ALPHA_IS_INDEX) { - CREATE_GREYSCALE_PALETTE(pal, 16); - } else { - // check, whether the specified color is a grey one - if ((rgb->rgbRed == rgb->rgbGreen) && (rgb->rgbRed == rgb->rgbBlue)) { - // if so, build a greyscale palette - CREATE_GREYSCALE_PALETTE(pal, 16); - rgbq.rgbReserved = rgb->rgbRed >> 4; - color = &rgbq; - } else { - // Otherwise inject the specified color into the so far - // black-only palette. We use color->rgbReserved as the - // desired palette index. - BYTE index = (rgb->rgbReserved & 0x0F); - ((unsigned *)pal)[index] = *((unsigned *)rgb) & 0x00FFFFFF; - } - options |= FI_COLOR_ALPHA_IS_INDEX; - } - // and defer to FreeImage_FillBackground - FreeImage_FillBackground(bitmap, color, options); - break; - } - case 8: { - // 8-bit implies FIT_BITMAP so, get a RGBQUAD color - RGBQUAD *rgb = (RGBQUAD *)color; - RGBQUAD *pal = FreeImage_GetPalette(bitmap); - RGBQUAD rgbq; - - if (palette != NULL) { - // clone the specified palette - memcpy(pal, palette, 256 * sizeof(RGBQUAD)); - } else if (options & FI_COLOR_ALPHA_IS_INDEX) { - CREATE_GREYSCALE_PALETTE(pal, 256); - } else { - // check, whether the specified color is a grey one - if ((rgb->rgbRed == rgb->rgbGreen) && (rgb->rgbRed == rgb->rgbBlue)) { - // if so, build a greyscale palette - CREATE_GREYSCALE_PALETTE(pal, 256); - rgbq.rgbReserved = rgb->rgbRed; - color = &rgbq; - } else { - // Otherwise inject the specified color into the so far - // black-only palette. We use color->rgbReserved as the - // desired palette index. - BYTE index = rgb->rgbReserved; - ((unsigned *)pal)[index] = *((unsigned *)rgb) & 0x00FFFFFF; - } - options |= FI_COLOR_ALPHA_IS_INDEX; - } - // and defer to FreeImage_FillBackground - FreeImage_FillBackground(bitmap, color, options); - break; - } - case 16: { - WORD wcolor = (type == FIT_BITMAP) ? - RGBQUAD_TO_WORD(bitmap, ((RGBQUAD *)color)) : *((WORD *)color); - if (wcolor != 0) { - FreeImage_FillBackground(bitmap, color, options); - } - break; - } - default: { - int bytespp = bpp / 8; - for (int i = 0; i < bytespp; i++) { - if (((BYTE *)color)[i] != 0) { - FreeImage_FillBackground(bitmap, color, options); - break; - } - } - break; - } - } - } - return bitmap; -} - -/** @brief Allocates a new image of the specified width, height and bit depth and optionally - fills it with the specified color. - - This function is an extension to FreeImage_Allocate, which additionally supports specifying - a palette to be set for the newly create image, as well as specifying a background color, - the newly created image should initially be filled with. - - Basically, this function internally relies on function FreeImage_Allocate, followed by a - call to FreeImage_FillBackground. This is why both parameters color and options behave the - same as it is documented for function FreeImage_FillBackground. So, please refer to the - documentation of FreeImage_FillBackground to learn more about parameters color and options. - - The palette specified through parameter palette is only copied to the newly created - image, if the desired bit depth is smaller than or equal to 8 bits per pixel. In other words, - the palette parameter is only taken into account for palletized images. However, if the - image to be created is a palletized image and if palette is not NULL, the memory pointed to - by the palette pointer is assumed to be at least as large as size of a fully populated - palette for the desired bit depth. So, for an 8-bit image, this size is 256 x sizeof(RGBQUAD), - for an 4-bit image it is 16 x sizeof(RGBQUAD) and it is 2 x sizeof(RGBQUAD) for a 1-bit - image. In other words, this function does not support partial palettes. - - However, specifying a palette is not necessarily needed, even for palletized images. This - function is capable of implicitly creating a palette, if parameter palette is NULL. If the - specified background color is a greyscale value (red = green = blue) or if option - FI_COLOR_ALPHA_IS_INDEX is specified, a greyscale palette is created. For a 1-bit image, only - if the specified background color is either black or white, a monochrome palette, consisting - of black and white only is created. In any case, the darker colors are stored at the smaller - palette indices. - - If the specified background color is not a greyscale value, or is neither black nor white - for a 1-bit image, solely this single color is injected into the otherwise black-initialized - palette. For this operation, option FI_COLOR_ALPHA_IS_INDEX is implicit, so the specified - color is applied to the palette entry, specified by the background color's rgbReserved - member. The image is then filled with this palette index. - - This function returns a newly created image as function FreeImage_Allocate does, if both - parameters color and palette are NULL. If only color is NULL, the palette pointed to by - parameter palette is initially set for the new image, if a palletized image of type - FIT_BITMAP is created. However, in the latter case, this function returns an image, whose - pixels are all initialized with zeros so, the image will be filled with the color of the - first palette entry. - - @param width The desired width in pixels of the new image. - @param height The desired height in pixels of the new image. - @param bpp The desired bit depth of the new image. - @param color A pointer to an RGBQUAD structure, that provides the color to be used for - filling the image. - @param options Options that affect the color search process for palletized images. - @param red_mask Specifies the bits used to store the red components of a pixel. - @param green_mask Specifies the bits used to store the green components of a pixel. - @param blue_mask Specifies the bits used to store the blue components of a pixel. - @return Returns a pointer to a newly allocated image on success, NULL otherwise. - */ -FIBITMAP * DLL_CALLCONV -FreeImage_AllocateEx(int width, int height, int bpp, const RGBQUAD *color, int options, const RGBQUAD *palette, unsigned red_mask, unsigned green_mask, unsigned blue_mask) { - return FreeImage_AllocateExT(FIT_BITMAP, width, height, bpp, ((void *)color), options, palette, red_mask, green_mask, blue_mask); -} - -/** @brief Enlarges or shrinks an image selectively per side and fills newly added areas - with the specified background color. - - This function enlarges or shrinks an image selectively per side. The main purpose of this - function is to add borders to an image. To add a border to any of the image's sides, a - positive integer value must be passed in any of the parameters left, top, right or bottom. - This value represents the border's width in pixels. Newly created parts of the image (the - border areas) are filled with the specified color. Specifying a negative integer value for - a certain side, will shrink or crop the image on this side. Consequently, specifying zero - for a certain side will not change the image's extension on that side. - - So, calling this function with all parameters left, top, right and bottom set to zero, is - effectively the same as calling function FreeImage_Clone; setting all parameters left, top, - right and bottom to value equal to or smaller than zero, my easily be substituted by a call - to function FreeImage_Copy. Both these cases produce a new image, which is guaranteed not to - be larger than the input image. Thus, since the specified color is not needed in these cases, - the pointer color may be NULL. - - Both parameters color and options work according to function FreeImage_FillBackground. So, - please refer to the documentation of FreeImage_FillBackground to learn more about parameters - color and options. For palletized images, the palette of the input image src is - transparently copied to the newly created enlarged or shrunken image, so any color - look-ups are performed on this palette. - - Here are some examples, that illustrate, how to use the parameters left, top, right and - bottom: - - // create a white color - RGBQUAD c; - c.rgbRed = 0xFF; - c.rgbGreen = 0xFF; - c.rgbBlue = 0xFF; - c.rgbReserved = 0x00; - - // add a white, symmetric 10 pixel wide border to the image - dib2 = FreeImage_EnlargeCanvas(dib, 10, 10, 10, 10, &c, FI_COLOR_IS_RGB_COLOR); - - // add white, 20 pixel wide stripes to the top and bottom side of the image - dib3 = FreeImage_EnlargeCanvas(dib, 0, 20, 0, 20, &c, FI_COLOR_IS_RGB_COLOR); - - // add white, 30 pixel wide stripes to the right side of the image and - // cut off the 40 leftmost pixel columns - dib3 = FreeImage_EnlargeCanvas(dib, -40, 0, 30, 0, &c, FI_COLOR_IS_RGB_COLOR); - - This function fails if either the input image is NULL or the pointer to the color is - NULL, while at least on of left, top, right and bottom is greater than zero. This - function also returns NULL, if the new image's size will be negative in either x- or - y-direction. - - @param dib The image to be enlarged or shrunken. - @param left The number of pixels, the image should be enlarged on its left side. Negative - values shrink the image on its left side. - @param top The number of pixels, the image should be enlarged on its top side. Negative - values shrink the image on its top side. - @param right The number of pixels, the image should be enlarged on its right side. Negative - values shrink the image on its right side. - @param bottom The number of pixels, the image should be enlarged on its bottom side. Negative - values shrink the image on its bottom side. - @param color The color, the enlarged sides of the image should be filled with. - @param options Options that affect the color search process for palletized images. - @return Returns a pointer to a newly allocated enlarged or shrunken image on success, - NULL otherwise. This function fails if either the input image is NULL or the pointer to the - color is NULL, while at least on of left, top, right and bottom is greater than zero. This - function also returns NULL, if the new image's size will be negative in either x- or - y-direction. - */ -FIBITMAP * DLL_CALLCONV -FreeImage_EnlargeCanvas(FIBITMAP *src, int left, int top, int right, int bottom, const void *color, int options) { - - if(!FreeImage_HasPixels(src)) return NULL; - - // Just return a clone of the image, if left, top, right and bottom are - // all zero. - if ((left == 0) && (right == 0) && (top == 0) && (bottom == 0)) { - return FreeImage_Clone(src); - } - - int width = FreeImage_GetWidth(src); - int height = FreeImage_GetHeight(src); - - // Relay on FreeImage_Copy, if all parameters left, top, right and - // bottom are smaller than or equal zero. The color pointer may be - // NULL in this case. - if ((left <= 0) && (right <= 0) && (top <= 0) && (bottom <= 0)) { - return FreeImage_Copy(src, -left, -top, width + right, height + bottom); - } - - // From here, we need a valid color, since the image will be enlarged on - // at least one side. So, fail if we don't have a valid color pointer. - if (!color) { - return NULL; - } - - if (((left < 0) && (-left >= width)) || ((right < 0) && (-right >= width)) || - ((top < 0) && (-top >= height)) || ((bottom < 0) && (-bottom >= height))) { - return NULL; - } - - unsigned newWidth = width + left + right; - unsigned newHeight = height + top + bottom; - - FREE_IMAGE_TYPE type = FreeImage_GetImageType(src); - unsigned bpp = FreeImage_GetBPP(src); - - FIBITMAP *dst = FreeImage_AllocateExT( - type, newWidth, newHeight, bpp, color, options, - FreeImage_GetPalette(src), - FreeImage_GetRedMask(src), - FreeImage_GetGreenMask(src), - FreeImage_GetBlueMask(src)); - - if (!dst) { - return NULL; - } - - if ((type == FIT_BITMAP) && (bpp <= 4)) { - FIBITMAP *copy = FreeImage_Copy(src, - ((left >= 0) ? 0 : -left), - ((top >= 0) ? 0 : -top), - ((width+right)>width)?width:(width+right), - ((height+bottom)>height)?height:(height+bottom)); - - if (!copy) { - FreeImage_Unload(dst); - return NULL; - } - - if (!FreeImage_Paste(dst, copy, - ((left <= 0) ? 0 : left), - ((top <= 0) ? 0 : top), 256)) { - FreeImage_Unload(copy); - FreeImage_Unload(dst); - return NULL; - } - - FreeImage_Unload(copy); - - } else { - - int bytespp = bpp / 8; - BYTE *srcPtr = FreeImage_GetScanLine(src, height - 1 - ((top >= 0) ? 0 : -top)); - BYTE *dstPtr = FreeImage_GetScanLine(dst, newHeight - 1 - ((top <= 0) ? 0 : top)); - - unsigned srcPitch = FreeImage_GetPitch(src); - unsigned dstPitch = FreeImage_GetPitch(dst); - - int lineWidth = bytespp * (width + MIN(0, left) + MIN(0, right)); - int lines = height + MIN(0, top) + MIN(0, bottom); - - if (left <= 0) { - srcPtr += (-left * bytespp); - } else { - dstPtr += (left * bytespp); - } - - for (int i = 0; i < lines; i++) { - memcpy(dstPtr, srcPtr, lineWidth); - srcPtr -= srcPitch; - dstPtr -= dstPitch; - } - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - // copy transparency table - FreeImage_SetTransparencyTable(dst, FreeImage_GetTransparencyTable(src), FreeImage_GetTransparencyCount(src)); - - // copy background color - RGBQUAD bkcolor; - if( FreeImage_GetBackgroundColor(src, &bkcolor) ) { - FreeImage_SetBackgroundColor(dst, &bkcolor); - } - - // clone resolution - FreeImage_SetDotsPerMeterX(dst, FreeImage_GetDotsPerMeterX(src)); - FreeImage_SetDotsPerMeterY(dst, FreeImage_GetDotsPerMeterY(src)); - - // clone ICC profile - FIICCPROFILE *src_profile = FreeImage_GetICCProfile(src); - FIICCPROFILE *dst_profile = FreeImage_CreateICCProfile(dst, src_profile->data, src_profile->size); - dst_profile->flags = src_profile->flags; - - return dst; -} - diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/Channels.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/Channels.cpp deleted file mode 100644 index 5f01ad8..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/Channels.cpp +++ /dev/null @@ -1,488 +0,0 @@ -// ========================================================== -// Channel processing support -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - - -/** @brief Retrieves the red, green, blue or alpha channel of a BGR[A] image. -@param src Input image to be processed. -@param channel Color channel to extract -@return Returns the extracted channel if successful, returns NULL otherwise. -*/ -FIBITMAP * DLL_CALLCONV -FreeImage_GetChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel) { - - if(!FreeImage_HasPixels(src)) return NULL; - - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(src); - unsigned bpp = FreeImage_GetBPP(src); - - // 24- or 32-bit - if(image_type == FIT_BITMAP && ((bpp == 24) || (bpp == 32))) { - int c; - - // select the channel to extract - switch(channel) { - case FICC_BLUE: - c = FI_RGBA_BLUE; - break; - case FICC_GREEN: - c = FI_RGBA_GREEN; - break; - case FICC_RED: - c = FI_RGBA_RED; - break; - case FICC_ALPHA: - if(bpp != 32) return NULL; - c = FI_RGBA_ALPHA; - break; - default: - return NULL; - } - - // allocate a 8-bit dib - unsigned width = FreeImage_GetWidth(src); - unsigned height = FreeImage_GetHeight(src); - FIBITMAP *dst = FreeImage_Allocate(width, height, 8) ; - if(!dst) return NULL; - // build a greyscale palette - RGBQUAD *pal = FreeImage_GetPalette(dst); - for(int i = 0; i < 256; i++) { - pal[i].rgbBlue = pal[i].rgbGreen = pal[i].rgbRed = (BYTE)i; - } - - // perform extraction - - int bytespp = bpp / 8; // bytes / pixel - - for(unsigned y = 0; y < height; y++) { - BYTE *src_bits = FreeImage_GetScanLine(src, y); - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - dst_bits[x] = src_bits[c]; - src_bits += bytespp; - } - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - return dst; - } - - // 48-bit RGB or 64-bit RGBA images - if((image_type == FIT_RGB16) || (image_type == FIT_RGBA16)) { - int c; - - // select the channel to extract (always RGB[A]) - switch(channel) { - case FICC_BLUE: - c = 2; - break; - case FICC_GREEN: - c = 1; - break; - case FICC_RED: - c = 0; - break; - case FICC_ALPHA: - if(bpp != 64) return NULL; - c = 3; - break; - default: - return NULL; - } - - // allocate a greyscale dib - unsigned width = FreeImage_GetWidth(src); - unsigned height = FreeImage_GetHeight(src); - FIBITMAP *dst = FreeImage_AllocateT(FIT_UINT16, width, height) ; - if(!dst) return NULL; - - // perform extraction - - int bytespp = bpp / 16; // words / pixel - - for(unsigned y = 0; y < height; y++) { - unsigned short *src_bits = (unsigned short*)FreeImage_GetScanLine(src, y); - unsigned short *dst_bits = (unsigned short*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - dst_bits[x] = src_bits[c]; - src_bits += bytespp; - } - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - return dst; - } - - // 96-bit RGBF or 128-bit RGBAF images - if((image_type == FIT_RGBF) || (image_type == FIT_RGBAF)) { - int c; - - // select the channel to extract (always RGB[A]) - switch(channel) { - case FICC_BLUE: - c = 2; - break; - case FICC_GREEN: - c = 1; - break; - case FICC_RED: - c = 0; - break; - case FICC_ALPHA: - if(bpp != 128) return NULL; - c = 3; - break; - default: - return NULL; - } - - // allocate a greyscale dib - unsigned width = FreeImage_GetWidth(src); - unsigned height = FreeImage_GetHeight(src); - FIBITMAP *dst = FreeImage_AllocateT(FIT_FLOAT, width, height) ; - if(!dst) return NULL; - - // perform extraction - - int bytespp = bpp / 32; // floats / pixel - - for(unsigned y = 0; y < height; y++) { - float *src_bits = (float*)FreeImage_GetScanLine(src, y); - float *dst_bits = (float*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < width; x++) { - dst_bits[x] = src_bits[c]; - src_bits += bytespp; - } - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - return dst; - } - - return NULL; -} - -/** @brief Insert a greyscale dib into a RGB[A] image. -Both src and dst must have the same width and height. -@param dst Image to modify (RGB or RGBA) -@param src Input greyscale image to insert -@param channel Color channel to modify -@return Returns TRUE if successful, FALSE otherwise. -*/ -BOOL DLL_CALLCONV -FreeImage_SetChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel) { - int c; - - if(!FreeImage_HasPixels(src) || !FreeImage_HasPixels(dst)) return FALSE; - - // src and dst images should have the same width and height - unsigned src_width = FreeImage_GetWidth(src); - unsigned src_height = FreeImage_GetHeight(src); - unsigned dst_width = FreeImage_GetWidth(dst); - unsigned dst_height = FreeImage_GetHeight(dst); - if((src_width != dst_width) || (src_height != dst_height)) - return FALSE; - - // src image should be grayscale, dst image should be RGB or RGBA - FREE_IMAGE_COLOR_TYPE src_type = FreeImage_GetColorType(src); - FREE_IMAGE_COLOR_TYPE dst_type = FreeImage_GetColorType(dst); - if((dst_type != FIC_RGB) && (dst_type != FIC_RGBALPHA) || (src_type != FIC_MINISBLACK)) { - return FALSE; - } - - FREE_IMAGE_TYPE src_image_type = FreeImage_GetImageType(src); - FREE_IMAGE_TYPE dst_image_type = FreeImage_GetImageType(dst); - - if((dst_image_type == FIT_BITMAP) && (src_image_type == FIT_BITMAP)) { - - // src image should be grayscale, dst image should be 24- or 32-bit - unsigned src_bpp = FreeImage_GetBPP(src); - unsigned dst_bpp = FreeImage_GetBPP(dst); - if((src_bpp != 8) || (dst_bpp != 24) && (dst_bpp != 32)) - return FALSE; - - - // select the channel to modify - switch(channel) { - case FICC_BLUE: - c = FI_RGBA_BLUE; - break; - case FICC_GREEN: - c = FI_RGBA_GREEN; - break; - case FICC_RED: - c = FI_RGBA_RED; - break; - case FICC_ALPHA: - if(dst_bpp != 32) return FALSE; - c = FI_RGBA_ALPHA; - break; - default: - return FALSE; - } - - // perform insertion - - int bytespp = dst_bpp / 8; // bytes / pixel - - for(unsigned y = 0; y < dst_height; y++) { - BYTE *src_bits = FreeImage_GetScanLine(src, y); - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < dst_width; x++) { - dst_bits[c] = src_bits[x]; - dst_bits += bytespp; - } - } - - return TRUE; - } - - if(((dst_image_type == FIT_RGB16) || (dst_image_type == FIT_RGBA16)) && (src_image_type == FIT_UINT16)) { - - // src image should be grayscale, dst image should be 48- or 64-bit - unsigned src_bpp = FreeImage_GetBPP(src); - unsigned dst_bpp = FreeImage_GetBPP(dst); - if((src_bpp != 16) || (dst_bpp != 48) && (dst_bpp != 64)) - return FALSE; - - - // select the channel to modify (always RGB[A]) - switch(channel) { - case FICC_BLUE: - c = 2; - break; - case FICC_GREEN: - c = 1; - break; - case FICC_RED: - c = 0; - break; - case FICC_ALPHA: - if(dst_bpp != 64) return FALSE; - c = 3; - break; - default: - return FALSE; - } - - // perform insertion - - int bytespp = dst_bpp / 16; // words / pixel - - for(unsigned y = 0; y < dst_height; y++) { - unsigned short *src_bits = (unsigned short*)FreeImage_GetScanLine(src, y); - unsigned short *dst_bits = (unsigned short*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < dst_width; x++) { - dst_bits[c] = src_bits[x]; - dst_bits += bytespp; - } - } - - return TRUE; - } - - if(((dst_image_type == FIT_RGBF) || (dst_image_type == FIT_RGBAF)) && (src_image_type == FIT_FLOAT)) { - - // src image should be grayscale, dst image should be 96- or 128-bit - unsigned src_bpp = FreeImage_GetBPP(src); - unsigned dst_bpp = FreeImage_GetBPP(dst); - if((src_bpp != 32) || (dst_bpp != 96) && (dst_bpp != 128)) - return FALSE; - - - // select the channel to modify (always RGB[A]) - switch(channel) { - case FICC_BLUE: - c = 2; - break; - case FICC_GREEN: - c = 1; - break; - case FICC_RED: - c = 0; - break; - case FICC_ALPHA: - if(dst_bpp != 128) return FALSE; - c = 3; - break; - default: - return FALSE; - } - - // perform insertion - - int bytespp = dst_bpp / 32; // floats / pixel - - for(unsigned y = 0; y < dst_height; y++) { - float *src_bits = (float*)FreeImage_GetScanLine(src, y); - float *dst_bits = (float*)FreeImage_GetScanLine(dst, y); - for(unsigned x = 0; x < dst_width; x++) { - dst_bits[c] = src_bits[x]; - dst_bits += bytespp; - } - } - - return TRUE; - } - - return FALSE; -} - -/** @brief Retrieves the real part, imaginary part, magnitude or phase of a complex image. -@param src Input image to be processed. -@param channel Channel to extract -@return Returns the extracted channel if successful, returns NULL otherwise. -*/ -FIBITMAP * DLL_CALLCONV -FreeImage_GetComplexChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel) { - unsigned x, y; - double mag, phase; - FICOMPLEX *src_bits = NULL; - double *dst_bits = NULL; - FIBITMAP *dst = NULL; - - if(!FreeImage_HasPixels(src)) return NULL; - - if(FreeImage_GetImageType(src) == FIT_COMPLEX) { - // allocate a dib of type FIT_DOUBLE - unsigned width = FreeImage_GetWidth(src); - unsigned height = FreeImage_GetHeight(src); - dst = FreeImage_AllocateT(FIT_DOUBLE, width, height) ; - if(!dst) return NULL; - - // perform extraction - - switch(channel) { - case FICC_REAL: // real part - for(y = 0; y < height; y++) { - src_bits = (FICOMPLEX *)FreeImage_GetScanLine(src, y); - dst_bits = (double *)FreeImage_GetScanLine(dst, y); - for(x = 0; x < width; x++) { - dst_bits[x] = src_bits[x].r; - } - } - break; - - case FICC_IMAG: // imaginary part - for(y = 0; y < height; y++) { - src_bits = (FICOMPLEX *)FreeImage_GetScanLine(src, y); - dst_bits = (double *)FreeImage_GetScanLine(dst, y); - for(x = 0; x < width; x++) { - dst_bits[x] = src_bits[x].i; - } - } - break; - - case FICC_MAG: // magnitude - for(y = 0; y < height; y++) { - src_bits = (FICOMPLEX *)FreeImage_GetScanLine(src, y); - dst_bits = (double *)FreeImage_GetScanLine(dst, y); - for(x = 0; x < width; x++) { - mag = src_bits[x].r * src_bits[x].r + src_bits[x].i * src_bits[x].i; - dst_bits[x] = sqrt(mag); - } - } - break; - - case FICC_PHASE: // phase - for(y = 0; y < height; y++) { - src_bits = (FICOMPLEX *)FreeImage_GetScanLine(src, y); - dst_bits = (double *)FreeImage_GetScanLine(dst, y); - for(x = 0; x < width; x++) { - if((src_bits[x].r == 0) && (src_bits[x].i == 0)) { - phase = 0; - } else { - phase = atan2(src_bits[x].i, src_bits[x].r); - } - dst_bits[x] = phase; - } - } - break; - } - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - return dst; -} - -/** @brief Set the real or imaginary part of a complex image. -Both src and dst must have the same width and height. -@param dst Image to modify (image of type FIT_COMPLEX) -@param src Input image of type FIT_DOUBLE -@param channel Channel to modify -@return Returns TRUE if successful, FALSE otherwise. -*/ -BOOL DLL_CALLCONV -FreeImage_SetComplexChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel) { - unsigned x, y; - double *src_bits = NULL; - FICOMPLEX *dst_bits = NULL; - - if(!FreeImage_HasPixels(src) || !FreeImage_HasPixels(dst)) return FALSE; - - // src image should be of type FIT_DOUBLE, dst image should be of type FIT_COMPLEX - const FREE_IMAGE_TYPE src_type = FreeImage_GetImageType(src); - const FREE_IMAGE_TYPE dst_type = FreeImage_GetImageType(dst); - if((src_type != FIT_DOUBLE) || (dst_type != FIT_COMPLEX)) - return FALSE; - - // src and dst images should have the same width and height - unsigned src_width = FreeImage_GetWidth(src); - unsigned src_height = FreeImage_GetHeight(src); - unsigned dst_width = FreeImage_GetWidth(dst); - unsigned dst_height = FreeImage_GetHeight(dst); - if((src_width != dst_width) || (src_height != dst_height)) - return FALSE; - - // select the channel to modify - switch(channel) { - case FICC_REAL: // real part - for(y = 0; y < dst_height; y++) { - src_bits = (double *)FreeImage_GetScanLine(src, y); - dst_bits = (FICOMPLEX *)FreeImage_GetScanLine(dst, y); - for(x = 0; x < dst_width; x++) { - dst_bits[x].r = src_bits[x]; - } - } - break; - case FICC_IMAG: // imaginary part - for(y = 0; y < dst_height; y++) { - src_bits = (double *)FreeImage_GetScanLine(src, y); - dst_bits = (FICOMPLEX *)FreeImage_GetScanLine(dst, y); - for(x = 0; x < dst_width; x++) { - dst_bits[x].i = src_bits[x]; - } - } - break; - } - - return TRUE; -} diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp deleted file mode 100644 index 83c2f92..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp +++ /dev/null @@ -1,917 +0,0 @@ -// ========================================================== -// Bitmap rotation by means of 3 shears. -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Thorsten Radde (support@IdealSoftware.com) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -/* - ============================================================ - References : - [1] Paeth A., A Fast Algorithm for General Raster Rotation. - Graphics Gems, p. 179, Andrew Glassner editor, Academic Press, 1990. - [2] Yariv E., High quality image rotation (rotate by shear). - [Online] http://www.codeproject.com/bitmap/rotatebyshear.asp - [3] Treskunov A., Fast and high quality true-color bitmap rotation function. - [Online] http://anton.treskunov.net/Software/doc/fast_and_high_quality_true_color_bitmap_rotation_function.html - ============================================================ -*/ - -#include "FreeImage.h" -#include "Utilities.h" - -#define RBLOCK 64 // image blocks of RBLOCK*RBLOCK pixels - -// -------------------------------------------------------------------------- - -/** -Skews a row horizontally (with filtered weights). -Limited to 45 degree skewing only. Filters two adjacent pixels. -Parameter T can be BYTE, WORD of float. -@param src Pointer to source image to rotate -@param dst Pointer to destination image -@param row Row index -@param iOffset Skew offset -@param dWeight Relative weight of right pixel -@param bkcolor Background color -*/ -template void -HorizontalSkewT(FIBITMAP *src, FIBITMAP *dst, int row, int iOffset, double weight, const void *bkcolor = NULL) { - int iXPos; - - const unsigned src_width = FreeImage_GetWidth(src); - const unsigned dst_width = FreeImage_GetWidth(dst); - - T pxlSrc[4], pxlLeft[4], pxlOldLeft[4]; // 4 = 4*sizeof(T) max - - // background - const T pxlBlack[4] = {0, 0, 0, 0 }; - const T *pxlBkg = static_cast(bkcolor); // assume at least bytespp and 4*sizeof(T) max - if(!pxlBkg) { - // default background color is black - pxlBkg = pxlBlack; - } - - // calculate the number of bytes per pixel - const unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - // calculate the number of samples per pixel - const unsigned samples = bytespp / sizeof(T); - - BYTE *src_bits = FreeImage_GetScanLine(src, row); - BYTE *dst_bits = FreeImage_GetScanLine(dst, row); - - // fill gap left of skew with background - if(bkcolor) { - for(int k = 0; k < iOffset; k++) { - memcpy(&dst_bits[k * bytespp], bkcolor, bytespp); - } - AssignPixel((BYTE*)&pxlOldLeft[0], (BYTE*)bkcolor, bytespp); - } else { - if(iOffset > 0) { - memset(dst_bits, 0, iOffset * bytespp); - } - memset(&pxlOldLeft[0], 0, bytespp); - } - - for(unsigned i = 0; i < src_width; i++) { - // loop through row pixels - AssignPixel((BYTE*)&pxlSrc[0], (BYTE*)src_bits, bytespp); - // calculate weights - for(unsigned j = 0; j < samples; j++) { - pxlLeft[j] = static_cast(pxlBkg[j] + (pxlSrc[j] - pxlBkg[j]) * weight + 0.5); - } - // check boundaries - iXPos = i + iOffset; - if((iXPos >= 0) && (iXPos < (int)dst_width)) { - // update left over on source - for(unsigned j = 0; j < samples; j++) { - pxlSrc[j] = pxlSrc[j] - (pxlLeft[j] - pxlOldLeft[j]); - } - AssignPixel((BYTE*)&dst_bits[iXPos*bytespp], (BYTE*)&pxlSrc[0], bytespp); - } - // save leftover for next pixel in scan - AssignPixel((BYTE*)&pxlOldLeft[0], (BYTE*)&pxlLeft[0], bytespp); - - // next pixel in scan - src_bits += bytespp; - } - - // go to rightmost point of skew - iXPos = src_width + iOffset; - - if((iXPos >= 0) && (iXPos < (int)dst_width)) { - dst_bits = FreeImage_GetScanLine(dst, row) + iXPos * bytespp; - - // If still in image bounds, put leftovers there - AssignPixel((BYTE*)dst_bits, (BYTE*)&pxlOldLeft[0], bytespp); - - // clear to the right of the skewed line with background - dst_bits += bytespp; - if(bkcolor) { - for(unsigned i = 0; i < dst_width - iXPos - 1; i++) { - memcpy(&dst_bits[i * bytespp], bkcolor, bytespp); - } - } else { - memset(dst_bits, 0, bytespp * (dst_width - iXPos - 1)); - } - - } -} - -/** -Skews a row horizontally (with filtered weights). -Limited to 45 degree skewing only. Filters two adjacent pixels. -@param src Pointer to source image to rotate -@param dst Pointer to destination image -@param row Row index -@param iOffset Skew offset -@param dWeight Relative weight of right pixel -@param bkcolor Background color -*/ -static void -HorizontalSkew(FIBITMAP *src, FIBITMAP *dst, int row, int iOffset, double dWeight, const void *bkcolor) { - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(src); - - switch(image_type) { - case FIT_BITMAP: - switch(FreeImage_GetBPP(src)) { - case 8: - case 24: - case 32: - HorizontalSkewT(src, dst, row, iOffset, dWeight, bkcolor); - break; - } - break; - case FIT_UINT16: - case FIT_RGB16: - case FIT_RGBA16: - HorizontalSkewT(src, dst, row, iOffset, dWeight, bkcolor); - break; - case FIT_FLOAT: - case FIT_RGBF: - case FIT_RGBAF: - HorizontalSkewT(src, dst, row, iOffset, dWeight, bkcolor); - break; - } -} - -/** -Skews a column vertically (with filtered weights). -Limited to 45 degree skewing only. Filters two adjacent pixels. -Parameter T can be BYTE, WORD of float. -@param src Pointer to source image to rotate -@param dst Pointer to destination image -@param col Column index -@param iOffset Skew offset -@param dWeight Relative weight of upper pixel -@param bkcolor Background color -*/ -template void -VerticalSkewT(FIBITMAP *src, FIBITMAP *dst, int col, int iOffset, double weight, const void *bkcolor = NULL) { - int iYPos; - - unsigned src_height = FreeImage_GetHeight(src); - unsigned dst_height = FreeImage_GetHeight(dst); - - T pxlSrc[4], pxlLeft[4], pxlOldLeft[4]; // 4 = 4*sizeof(T) max - - // background - const T pxlBlack[4] = {0, 0, 0, 0 }; - const T *pxlBkg = static_cast(bkcolor); // assume at least bytespp and 4*sizeof(T) max - if(!pxlBkg) { - // default background color is black - pxlBkg = pxlBlack; - } - - // calculate the number of bytes per pixel - const unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - // calculate the number of samples per pixel - const unsigned samples = bytespp / sizeof(T); - - const unsigned src_pitch = FreeImage_GetPitch(src); - const unsigned dst_pitch = FreeImage_GetPitch(dst); - const unsigned index = col * bytespp; - - BYTE *src_bits = FreeImage_GetBits(src) + index; - BYTE *dst_bits = FreeImage_GetBits(dst) + index; - - // fill gap above skew with background - if(bkcolor) { - for(int k = 0; k < iOffset; k++) { - memcpy(dst_bits, bkcolor, bytespp); - dst_bits += dst_pitch; - } - memcpy(&pxlOldLeft[0], bkcolor, bytespp); - } else { - for(int k = 0; k < iOffset; k++) { - memset(dst_bits, 0, bytespp); - dst_bits += dst_pitch; - } - memset(&pxlOldLeft[0], 0, bytespp); - } - - for(unsigned i = 0; i < src_height; i++) { - // loop through column pixels - AssignPixel((BYTE*)(&pxlSrc[0]), src_bits, bytespp); - // calculate weights - for(unsigned j = 0; j < samples; j++) { - pxlLeft[j] = static_cast(pxlBkg[j] + (pxlSrc[j] - pxlBkg[j]) * weight + 0.5); - } - // check boundaries - iYPos = i + iOffset; - if((iYPos >= 0) && (iYPos < (int)dst_height)) { - // update left over on source - for(unsigned j = 0; j < samples; j++) { - pxlSrc[j] = pxlSrc[j] - (pxlLeft[j] - pxlOldLeft[j]); - } - dst_bits = FreeImage_GetScanLine(dst, iYPos) + index; - AssignPixel(dst_bits, (BYTE*)(&pxlSrc[0]), bytespp); - } - // save leftover for next pixel in scan - AssignPixel((BYTE*)(&pxlOldLeft[0]), (BYTE*)(&pxlLeft[0]), bytespp); - - // next pixel in scan - src_bits += src_pitch; - } - // go to bottom point of skew - iYPos = src_height + iOffset; - - if((iYPos >= 0) && (iYPos < (int)dst_height)) { - dst_bits = FreeImage_GetScanLine(dst, iYPos) + index; - - // if still in image bounds, put leftovers there - AssignPixel((BYTE*)(dst_bits), (BYTE*)(&pxlOldLeft[0]), bytespp); - - // clear below skewed line with background - if(bkcolor) { - while(++iYPos < (int)dst_height) { - dst_bits += dst_pitch; - AssignPixel((BYTE*)(dst_bits), (BYTE*)(bkcolor), bytespp); - } - } else { - while(++iYPos < (int)dst_height) { - dst_bits += dst_pitch; - memset(dst_bits, 0, bytespp); - } - } - } -} - -/** -Skews a column vertically (with filtered weights). -Limited to 45 degree skewing only. Filters two adjacent pixels. -@param src Pointer to source image to rotate -@param dst Pointer to destination image -@param col Column index -@param iOffset Skew offset -@param dWeight Relative weight of upper pixel -@param bkcolor Background color -*/ -static void -VerticalSkew(FIBITMAP *src, FIBITMAP *dst, int col, int iOffset, double dWeight, const void *bkcolor) { - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(src); - - switch(image_type) { - case FIT_BITMAP: - switch(FreeImage_GetBPP(src)) { - case 8: - case 24: - case 32: - VerticalSkewT(src, dst, col, iOffset, dWeight, bkcolor); - break; - } - break; - case FIT_UINT16: - case FIT_RGB16: - case FIT_RGBA16: - VerticalSkewT(src, dst, col, iOffset, dWeight, bkcolor); - break; - case FIT_FLOAT: - case FIT_RGBF: - case FIT_RGBAF: - VerticalSkewT(src, dst, col, iOffset, dWeight, bkcolor); - break; - } -} - -/** -Rotates an image by 90 degrees (counter clockwise). -Precise rotation, no filters required.
-Code adapted from CxImage (http://www.xdp.it/cximage.htm) -@param src Pointer to source image to rotate -@return Returns a pointer to a newly allocated rotated image if successful, returns NULL otherwise -*/ -static FIBITMAP* -Rotate90(FIBITMAP *src) { - - const unsigned bpp = FreeImage_GetBPP(src); - - const unsigned src_width = FreeImage_GetWidth(src); - const unsigned src_height = FreeImage_GetHeight(src); - const unsigned dst_width = src_height; - const unsigned dst_height = src_width; - - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(src); - - // allocate and clear dst image - FIBITMAP *dst = FreeImage_AllocateT(image_type, dst_width, dst_height, bpp); - if(NULL == dst) return NULL; - - // get src and dst scan width - const unsigned src_pitch = FreeImage_GetPitch(src); - const unsigned dst_pitch = FreeImage_GetPitch(dst); - - switch(image_type) { - case FIT_BITMAP: - if(bpp == 1) { - // speedy rotate for BW images - - BYTE *bsrc = FreeImage_GetBits(src); - BYTE *bdest = FreeImage_GetBits(dst); - - BYTE *dbitsmax = bdest + dst_height * dst_pitch - 1; - - for(unsigned y = 0; y < src_height; y++) { - // figure out the column we are going to be copying to - const div_t div_r = div(y, 8); - // set bit pos of src column byte - const BYTE bitpos = (BYTE)(128 >> div_r.rem); - BYTE *srcdisp = bsrc + y * src_pitch; - for(unsigned x = 0; x < src_pitch; x++) { - // get source bits - BYTE *sbits = srcdisp + x; - // get destination column - BYTE *nrow = bdest + (dst_height - 1 - (x * 8)) * dst_pitch + div_r.quot; - for (int z = 0; z < 8; z++) { - // get destination byte - BYTE *dbits = nrow - z * dst_pitch; - if ((dbits < bdest) || (dbits > dbitsmax)) break; - if (*sbits & (128 >> z)) *dbits |= bitpos; - } - } - } - } - else if((bpp == 8) || (bpp == 24) || (bpp == 32)) { - // anything other than BW : - // This optimized version of rotation rotates image by smaller blocks. It is quite - // a bit faster than obvious algorithm, because it produces much less CPU cache misses. - // This optimization can be tuned by changing block size (RBLOCK). 96 is good value for current - // CPUs (tested on Athlon XP and Celeron D). Larger value (if CPU has enough cache) will increase - // speed somehow, but once you drop out of CPU's cache, things will slow down drastically. - // For older CPUs with less cache, lower value would yield better results. - - BYTE *bsrc = FreeImage_GetBits(src); // source pixels - BYTE *bdest = FreeImage_GetBits(dst); // destination pixels - - // calculate the number of bytes per pixel (1 for 8-bit, 3 for 24-bit or 4 for 32-bit) - const unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - - // for all image blocks of RBLOCK*RBLOCK pixels - - // x-segment - for(unsigned xs = 0; xs < dst_width; xs += RBLOCK) { - // y-segment - for(unsigned ys = 0; ys < dst_height; ys += RBLOCK) { - for(unsigned y = ys; y < MIN(dst_height, ys + RBLOCK); y++) { // do rotation - const unsigned y2 = dst_height - y - 1; - // point to src pixel at (y2, xs) - BYTE *src_bits = bsrc + (xs * src_pitch) + (y2 * bytespp); - // point to dst pixel at (xs, y) - BYTE *dst_bits = bdest + (y * dst_pitch) + (xs * bytespp); - for(unsigned x = xs; x < MIN(dst_width, xs + RBLOCK); x++) { - // dst.SetPixel(x, y, src.GetPixel(y2, x)); - AssignPixel(dst_bits, src_bits, bytespp); - dst_bits += bytespp; - src_bits += src_pitch; - } - } - } - } - } - break; - case FIT_UINT16: - case FIT_RGB16: - case FIT_RGBA16: - case FIT_FLOAT: - case FIT_RGBF: - case FIT_RGBAF: - { - BYTE *bsrc = FreeImage_GetBits(src); // source pixels - BYTE *bdest = FreeImage_GetBits(dst); // destination pixels - - // calculate the number of bytes per pixel - const unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - - for(unsigned y = 0; y < dst_height; y++) { - BYTE *src_bits = bsrc + (src_width - 1 - y) * bytespp; - BYTE *dst_bits = bdest + (y * dst_pitch); - for(unsigned x = 0; x < dst_width; x++) { - AssignPixel(dst_bits, src_bits, bytespp); - src_bits += src_pitch; - dst_bits += bytespp; - } - } - } - break; - } - - return dst; -} - -/** -Rotates an image by 180 degrees (counter clockwise). -Precise rotation, no filters required. -@param src Pointer to source image to rotate -@return Returns a pointer to a newly allocated rotated image if successful, returns NULL otherwise -*/ -static FIBITMAP* -Rotate180(FIBITMAP *src) { - int x, y, k, pos; - - const int bpp = FreeImage_GetBPP(src); - - const int src_width = FreeImage_GetWidth(src); - const int src_height = FreeImage_GetHeight(src); - const int dst_width = src_width; - const int dst_height = src_height; - - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(src); - - FIBITMAP *dst = FreeImage_AllocateT(image_type, dst_width, dst_height, bpp); - if(NULL == dst) return NULL; - - switch(image_type) { - case FIT_BITMAP: - if(bpp == 1) { - for(int y = 0; y < src_height; y++) { - BYTE *src_bits = FreeImage_GetScanLine(src, y); - BYTE *dst_bits = FreeImage_GetScanLine(dst, dst_height - y - 1); - for(int x = 0; x < src_width; x++) { - // get bit at (x, y) - k = (src_bits[x >> 3] & (0x80 >> (x & 0x07))) != 0; - // set bit at (dst_width - x - 1, dst_height - y - 1) - pos = dst_width - x - 1; - k ? dst_bits[pos >> 3] |= (0x80 >> (pos & 0x7)) : dst_bits[pos >> 3] &= (0xFF7F >> (pos & 0x7)); - } - } - break; - } - // else if((bpp == 8) || (bpp == 24) || (bpp == 32)) FALL TROUGH - case FIT_UINT16: - case FIT_RGB16: - case FIT_RGBA16: - case FIT_FLOAT: - case FIT_RGBF: - case FIT_RGBAF: - { - // Calculate the number of bytes per pixel - const int bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - - for(y = 0; y < src_height; y++) { - BYTE *src_bits = FreeImage_GetScanLine(src, y); - BYTE *dst_bits = FreeImage_GetScanLine(dst, dst_height - y - 1) + (dst_width - 1) * bytespp; - for(x = 0; x < src_width; x++) { - // get pixel at (x, y) - // set pixel at (dst_width - x - 1, dst_height - y - 1) - AssignPixel(dst_bits, src_bits, bytespp); - src_bits += bytespp; - dst_bits -= bytespp; - } - } - } - break; - } - - return dst; -} - -/** -Rotates an image by 270 degrees (counter clockwise). -Precise rotation, no filters required.
-Code adapted from CxImage (http://www.xdp.it/cximage.htm) -@param src Pointer to source image to rotate -@return Returns a pointer to a newly allocated rotated image if successful, returns NULL otherwise -*/ -static FIBITMAP* -Rotate270(FIBITMAP *src) { - int x2, dlineup; - - const unsigned bpp = FreeImage_GetBPP(src); - - const unsigned src_width = FreeImage_GetWidth(src); - const unsigned src_height = FreeImage_GetHeight(src); - const unsigned dst_width = src_height; - const unsigned dst_height = src_width; - - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(src); - - // allocate and clear dst image - FIBITMAP *dst = FreeImage_AllocateT(image_type, dst_width, dst_height, bpp); - if(NULL == dst) return NULL; - - // get src and dst scan width - const unsigned src_pitch = FreeImage_GetPitch(src); - const unsigned dst_pitch = FreeImage_GetPitch(dst); - - switch(image_type) { - case FIT_BITMAP: - if(bpp == 1) { - // speedy rotate for BW images - - BYTE *bsrc = FreeImage_GetBits(src); - BYTE *bdest = FreeImage_GetBits(dst); - BYTE *dbitsmax = bdest + dst_height * dst_pitch - 1; - dlineup = 8 * dst_pitch - dst_width; - - for(unsigned y = 0; y < src_height; y++) { - // figure out the column we are going to be copying to - const div_t div_r = div(y + dlineup, 8); - // set bit pos of src column byte - const BYTE bitpos = (BYTE)(1 << div_r.rem); - const BYTE *srcdisp = bsrc + y * src_pitch; - for(unsigned x = 0; x < src_pitch; x++) { - // get source bits - const BYTE *sbits = srcdisp + x; - // get destination column - BYTE *nrow = bdest + (x * 8) * dst_pitch + dst_pitch - 1 - div_r.quot; - for(unsigned z = 0; z < 8; z++) { - // get destination byte - BYTE *dbits = nrow + z * dst_pitch; - if ((dbits < bdest) || (dbits > dbitsmax)) break; - if (*sbits & (128 >> z)) *dbits |= bitpos; - } - } - } - } - else if((bpp == 8) || (bpp == 24) || (bpp == 32)) { - // anything other than BW : - // This optimized version of rotation rotates image by smaller blocks. It is quite - // a bit faster than obvious algorithm, because it produces much less CPU cache misses. - // This optimization can be tuned by changing block size (RBLOCK). 96 is good value for current - // CPUs (tested on Athlon XP and Celeron D). Larger value (if CPU has enough cache) will increase - // speed somehow, but once you drop out of CPU's cache, things will slow down drastically. - // For older CPUs with less cache, lower value would yield better results. - - BYTE *bsrc = FreeImage_GetBits(src); // source pixels - BYTE *bdest = FreeImage_GetBits(dst); // destination pixels - - // Calculate the number of bytes per pixel (1 for 8-bit, 3 for 24-bit or 4 for 32-bit) - const unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - - // for all image blocks of RBLOCK*RBLOCK pixels - - // x-segment - for(unsigned xs = 0; xs < dst_width; xs += RBLOCK) { - // y-segment - for(unsigned ys = 0; ys < dst_height; ys += RBLOCK) { - for(unsigned x = xs; x < MIN(dst_width, xs + RBLOCK); x++) { // do rotation - x2 = dst_width - x - 1; - // point to src pixel at (ys, x2) - BYTE *src_bits = bsrc + (x2 * src_pitch) + (ys * bytespp); - // point to dst pixel at (x, ys) - BYTE *dst_bits = bdest + (ys * dst_pitch) + (x * bytespp); - for(unsigned y = ys; y < MIN(dst_height, ys + RBLOCK); y++) { - // dst.SetPixel(x, y, src.GetPixel(y, x2)); - AssignPixel(dst_bits, src_bits, bytespp); - src_bits += bytespp; - dst_bits += dst_pitch; - } - } - } - } - } - break; - case FIT_UINT16: - case FIT_RGB16: - case FIT_RGBA16: - case FIT_FLOAT: - case FIT_RGBF: - case FIT_RGBAF: - { - BYTE *bsrc = FreeImage_GetBits(src); // source pixels - BYTE *bdest = FreeImage_GetBits(dst); // destination pixels - - // calculate the number of bytes per pixel - const unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - - for(unsigned y = 0; y < dst_height; y++) { - BYTE *src_bits = bsrc + (src_height - 1) * src_pitch + y * bytespp; - BYTE *dst_bits = bdest + (y * dst_pitch); - for(unsigned x = 0; x < dst_width; x++) { - AssignPixel(dst_bits, src_bits, bytespp); - src_bits -= src_pitch; - dst_bits += bytespp; - } - } - } - break; - } - - return dst; -} - -/** -Rotates an image by a given degree in range [-45 .. +45] (counter clockwise) -using the 3-shear technique. -@param src Pointer to source image to rotate -@param dAngle Rotation angle -@return Returns a pointer to a newly allocated rotated image if successful, returns NULL otherwise -*/ -static FIBITMAP* -Rotate45(FIBITMAP *src, double dAngle, const void *bkcolor) { - const double ROTATE_PI = double(3.1415926535897932384626433832795); - - unsigned u; - - const unsigned bpp = FreeImage_GetBPP(src); - - const double dRadAngle = dAngle * ROTATE_PI / double(180); // Angle in radians - const double dSinE = sin(dRadAngle); - const double dTan = tan(dRadAngle / 2); - - const unsigned src_width = FreeImage_GetWidth(src); - const unsigned src_height = FreeImage_GetHeight(src); - - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(src); - - // Calc first shear (horizontal) destination image dimensions - const unsigned width_1 = src_width + unsigned((double)src_height * fabs(dTan) + 0.5); - const unsigned height_1 = src_height; - - // Perform 1st shear (horizontal) - // ---------------------------------------------------------------------- - - // Allocate image for 1st shear - FIBITMAP *dst1 = FreeImage_AllocateT(image_type, width_1, height_1, bpp); - if(NULL == dst1) { - return NULL; - } - - for(u = 0; u < height_1; u++) { - double dShear; - - if(dTan >= 0) { - // Positive angle - dShear = (u + 0.5) * dTan; - } - else { - // Negative angle - dShear = (double(u) - height_1 + 0.5) * dTan; - } - int iShear = int(floor(dShear)); - HorizontalSkew(src, dst1, u, iShear, dShear - double(iShear), bkcolor); - } - - // Perform 2nd shear (vertical) - // ---------------------------------------------------------------------- - - // Calc 2nd shear (vertical) destination image dimensions - const unsigned width_2 = width_1; - unsigned height_2 = unsigned((double)src_width * fabs(dSinE) + (double)src_height * cos(dRadAngle) + 0.5) + 1; - - // Allocate image for 2nd shear - FIBITMAP *dst2 = FreeImage_AllocateT(image_type, width_2, height_2, bpp); - if(NULL == dst2) { - FreeImage_Unload(dst1); - return NULL; - } - - double dOffset; // Variable skew offset - if(dSinE > 0) { - // Positive angle - dOffset = (src_width - 1.0) * dSinE; - } - else { - // Negative angle - dOffset = -dSinE * (double(src_width) - width_2); - } - - for(u = 0; u < width_2; u++, dOffset -= dSinE) { - int iShear = int(floor(dOffset)); - VerticalSkew(dst1, dst2, u, iShear, dOffset - double(iShear), bkcolor); - } - - // Perform 3rd shear (horizontal) - // ---------------------------------------------------------------------- - - // Free result of 1st shear - FreeImage_Unload(dst1); - - // Calc 3rd shear (horizontal) destination image dimensions - const unsigned width_3 = unsigned(double(src_height) * fabs(dSinE) + double(src_width) * cos(dRadAngle) + 0.5) + 1; - const unsigned height_3 = height_2; - - // Allocate image for 3rd shear - FIBITMAP *dst3 = FreeImage_AllocateT(image_type, width_3, height_3, bpp); - if(NULL == dst3) { - FreeImage_Unload(dst2); - return NULL; - } - - if(dSinE >= 0) { - // Positive angle - dOffset = (src_width - 1.0) * dSinE * -dTan; - } - else { - // Negative angle - dOffset = dTan * ( (src_width - 1.0) * -dSinE + (1.0 - height_3) ); - } - for(u = 0; u < height_3; u++, dOffset += dTan) { - int iShear = int(floor(dOffset)); - HorizontalSkew(dst2, dst3, u, iShear, dOffset - double(iShear), bkcolor); - } - // Free result of 2nd shear - FreeImage_Unload(dst2); - - // Return result of 3rd shear - return dst3; -} - -/** -Rotates a 1-, 8-, 24- or 32-bit image by a given angle (given in degree). -Angle is unlimited, except for 1-bit images (limited to integer multiples of 90 degree). -3-shears technique is used. -@param src Pointer to source image to rotate -@param dAngle Rotation angle -@return Returns a pointer to a newly allocated rotated image if successful, returns NULL otherwise -*/ -static FIBITMAP* -RotateAny(FIBITMAP *src, double dAngle, const void *bkcolor) { - if(NULL == src) { - return NULL; - } - - FIBITMAP *image = src; - - while(dAngle >= 360) { - // Bring angle to range of (-INF .. 360) - dAngle -= 360; - } - while(dAngle < 0) { - // Bring angle to range of [0 .. 360) - dAngle += 360; - } - if((dAngle > 45) && (dAngle <= 135)) { - // Angle in (45 .. 135] - // Rotate image by 90 degrees into temporary image, - // so it requires only an extra rotation angle - // of -45 .. +45 to complete rotation. - image = Rotate90(src); - dAngle -= 90; - } - else if((dAngle > 135) && (dAngle <= 225)) { - // Angle in (135 .. 225] - // Rotate image by 180 degrees into temporary image, - // so it requires only an extra rotation angle - // of -45 .. +45 to complete rotation. - image = Rotate180(src); - dAngle -= 180; - } - else if((dAngle > 225) && (dAngle <= 315)) { - // Angle in (225 .. 315] - // Rotate image by 270 degrees into temporary image, - // so it requires only an extra rotation angle - // of -45 .. +45 to complete rotation. - image = Rotate270(src); - dAngle -= 270; - } - - // If we got here, angle is in (-45 .. +45] - - if(NULL == image) { - // Failed to allocate middle image - return NULL; - } - - if(0 == dAngle) { - if(image == src) { - // Nothing to do ... - return FreeImage_Clone(src); - } else { - // No more rotation needed - return image; - } - } - else { - // Perform last rotation - FIBITMAP *dst = Rotate45(image, dAngle, bkcolor); - - if(src != image) { - // Middle image was required, free it now. - FreeImage_Unload(image); - } - - return dst; - } -} - -// ========================================================== - -FIBITMAP *DLL_CALLCONV -FreeImage_Rotate(FIBITMAP *dib, double angle, const void *bkcolor) { - if(!FreeImage_HasPixels(dib)) return NULL; - - if(0 == angle) { - return FreeImage_Clone(dib); - } - // DIB are stored upside down ... - angle *= -1; - - try { - unsigned bpp = FreeImage_GetBPP(dib); - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - - switch(image_type) { - case FIT_BITMAP: - if(bpp == 1) { - // only rotate for integer multiples of 90 degree - if(fmod(angle, 90) != 0) - return NULL; - - // perform the rotation - FIBITMAP *dst = RotateAny(dib, angle, bkcolor); - if(!dst) throw(1); - - // build a greyscale palette - RGBQUAD *dst_pal = FreeImage_GetPalette(dst); - if(FreeImage_GetColorType(dib) == FIC_MINISBLACK) { - dst_pal[0].rgbRed = dst_pal[0].rgbGreen = dst_pal[0].rgbBlue = 0; - dst_pal[1].rgbRed = dst_pal[1].rgbGreen = dst_pal[1].rgbBlue = 255; - } else { - dst_pal[0].rgbRed = dst_pal[0].rgbGreen = dst_pal[0].rgbBlue = 255; - dst_pal[1].rgbRed = dst_pal[1].rgbGreen = dst_pal[1].rgbBlue = 0; - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, dib); - - return dst; - } - else if((bpp == 8) || (bpp == 24) || (bpp == 32)) { - FIBITMAP *dst = RotateAny(dib, angle, bkcolor); - if(!dst) throw(1); - - if(bpp == 8) { - // copy original palette to rotated bitmap - RGBQUAD *src_pal = FreeImage_GetPalette(dib); - RGBQUAD *dst_pal = FreeImage_GetPalette(dst); - memcpy(&dst_pal[0], &src_pal[0], 256 * sizeof(RGBQUAD)); - - // copy transparency table - FreeImage_SetTransparencyTable(dst, FreeImage_GetTransparencyTable(dib), FreeImage_GetTransparencyCount(dib)); - - // copy background color - RGBQUAD bkcolor; - if( FreeImage_GetBackgroundColor(dib, &bkcolor) ) { - FreeImage_SetBackgroundColor(dst, &bkcolor); - } - - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, dib); - - return dst; - } - break; - case FIT_UINT16: - case FIT_RGB16: - case FIT_RGBA16: - case FIT_FLOAT: - case FIT_RGBF: - case FIT_RGBAF: - { - FIBITMAP *dst = RotateAny(dib, angle, bkcolor); - if(!dst) throw(1); - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, dib); - - return dst; - } - break; - } - - } catch(int) { - return NULL; - } - - return NULL; -} - diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/Colors.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/Colors.cpp deleted file mode 100644 index 6719176..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/Colors.cpp +++ /dev/null @@ -1,967 +0,0 @@ -// ========================================================== -// Color manipulation routines -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Carsten Klein (c.klein@datagis.com) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Macros + structures -// ---------------------------------------------------------- - -#define GET_HI_NIBBLE(byte) ((byte) >> 4) -#define SET_HI_NIBBLE(byte, n) byte &= 0x0F, byte |= ((n) << 4) -#define GET_LO_NIBBLE(byte) ((byte) & 0x0F) -#define SET_LO_NIBBLE(byte, n) byte &= 0xF0, byte |= ((n) & 0x0F) -#define GET_NIBBLE(cn, byte) ((cn) ? (GET_HI_NIBBLE(byte)) : (GET_LO_NIBBLE(byte))) -#define SET_NIBBLE(cn, byte, n) if (cn) SET_HI_NIBBLE(byte, n); else SET_LO_NIBBLE(byte, n) - -// ---------------------------------------------------------- - - -/** @brief Inverts each pixel data. - -@param src Input image to be processed. -@return Returns TRUE if successful, FALSE otherwise. -*/ -BOOL DLL_CALLCONV -FreeImage_Invert(FIBITMAP *src) { - - if (!FreeImage_HasPixels(src)) return FALSE; - - unsigned i, x, y, k; - - const unsigned width = FreeImage_GetWidth(src); - const unsigned height = FreeImage_GetHeight(src); - const unsigned bpp = FreeImage_GetBPP(src); - - FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(src); - - if(image_type == FIT_BITMAP) { - switch(bpp) { - case 1 : - case 4 : - case 8 : - { - // if the dib has a colormap, just invert it - // else, keep the linear grayscale - - if (FreeImage_GetColorType(src) == FIC_PALETTE) { - RGBQUAD *pal = FreeImage_GetPalette(src); - - for(i = 0; i < FreeImage_GetColorsUsed(src); i++) { - pal[i].rgbRed = 255 - pal[i].rgbRed; - pal[i].rgbGreen = 255 - pal[i].rgbGreen; - pal[i].rgbBlue = 255 - pal[i].rgbBlue; - } - } else { - for(y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(src, y); - - for (x = 0; x < FreeImage_GetLine(src); x++) { - bits[x] = ~bits[x]; - } - } - } - - break; - } - - case 24 : - case 32 : - { - // Calculate the number of bytes per pixel (3 for 24-bit or 4 for 32-bit) - const unsigned bytespp = FreeImage_GetLine(src) / width; - - for(y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < width; x++) { - for(k = 0; k < bytespp; k++) { - bits[k] = ~bits[k]; - } - bits += bytespp; - } - } - - break; - } - default: - return FALSE; - } - } - else if((image_type == FIT_UINT16) || (image_type == FIT_RGB16) || (image_type == FIT_RGBA16)) { - // Calculate the number of words per pixel (1 for 16-bit, 3 for 48-bit or 4 for 64-bit) - const unsigned wordspp = (FreeImage_GetLine(src) / width) / sizeof(WORD); - - for(y = 0; y < height; y++) { - WORD *bits = (WORD*)FreeImage_GetScanLine(src, y); - for(x = 0; x < width; x++) { - for(k = 0; k < wordspp; k++) { - bits[k] = ~bits[k]; - } - bits += wordspp; - } - } - } - else { - // anything else ... - return FALSE; - } - - return TRUE; -} - -/** @brief Perfoms an histogram transformation on a 8, 24 or 32-bit image -according to the values of a lookup table (LUT). - -The transformation is done as follows.
-Image 8-bit : if the image has a color palette, the LUT is applied to this palette, -otherwise, it is applied to the grey values.
-Image 24-bit & 32-bit : if channel == FICC_RGB, the same LUT is applied to each color -plane (R,G, and B). Otherwise, the LUT is applied to the specified channel only. -@param src Input image to be processed. -@param LUT Lookup table. The size of 'LUT' is assumed to be 256. -@param channel The color channel to be processed (only used with 24 & 32-bit DIB). -@return Returns TRUE if successful, FALSE otherwise. -@see FREE_IMAGE_COLOR_CHANNEL -*/ -BOOL DLL_CALLCONV -FreeImage_AdjustCurve(FIBITMAP *src, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel) { - unsigned x, y; - BYTE *bits = NULL; - - if(!FreeImage_HasPixels(src) || !LUT || (FreeImage_GetImageType(src) != FIT_BITMAP)) - return FALSE; - - int bpp = FreeImage_GetBPP(src); - if((bpp != 8) && (bpp != 24) && (bpp != 32)) - return FALSE; - - // apply the LUT - switch(bpp) { - - case 8 : - { - // if the dib has a colormap, apply the LUT to it - // else, apply the LUT to pixel values - - if(FreeImage_GetColorType(src) == FIC_PALETTE) { - RGBQUAD *rgb = FreeImage_GetPalette(src); - for (unsigned pal = 0; pal < FreeImage_GetColorsUsed(src); pal++) { - rgb->rgbRed = LUT[rgb->rgbRed]; - rgb->rgbGreen = LUT[rgb->rgbGreen]; - rgb->rgbBlue = LUT[rgb->rgbBlue]; - rgb++; - } - } - else { - for(y = 0; y < FreeImage_GetHeight(src); y++) { - bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < FreeImage_GetWidth(src); x++) { - bits[x] = LUT[ bits[x] ]; - } - } - } - - break; - } - - case 24 : - case 32 : - { - int bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - - switch(channel) { - case FICC_RGB : - for(y = 0; y < FreeImage_GetHeight(src); y++) { - bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < FreeImage_GetWidth(src); x++) { - bits[FI_RGBA_BLUE] = LUT[ bits[FI_RGBA_BLUE] ]; // B - bits[FI_RGBA_GREEN] = LUT[ bits[FI_RGBA_GREEN] ]; // G - bits[FI_RGBA_RED] = LUT[ bits[FI_RGBA_RED] ]; // R - - bits += bytespp; - } - } - break; - - case FICC_BLUE : - for(y = 0; y < FreeImage_GetHeight(src); y++) { - bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < FreeImage_GetWidth(src); x++) { - bits[FI_RGBA_BLUE] = LUT[ bits[FI_RGBA_BLUE] ]; // B - - bits += bytespp; - } - } - break; - - case FICC_GREEN : - for(y = 0; y < FreeImage_GetHeight(src); y++) { - bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < FreeImage_GetWidth(src); x++) { - bits[FI_RGBA_GREEN] = LUT[ bits[FI_RGBA_GREEN] ]; // G - - bits += bytespp; - } - } - break; - - case FICC_RED : - for(y = 0; y < FreeImage_GetHeight(src); y++) { - bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < FreeImage_GetWidth(src); x++) { - bits[FI_RGBA_RED] = LUT[ bits[FI_RGBA_RED] ]; // R - - bits += bytespp; - } - } - break; - - case FICC_ALPHA : - if(32 == bpp) { - for(y = 0; y < FreeImage_GetHeight(src); y++) { - bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < FreeImage_GetWidth(src); x++) { - bits[FI_RGBA_ALPHA] = LUT[ bits[FI_RGBA_ALPHA] ]; // A - - bits += bytespp; - } - } - } - break; - - default: - break; - } - break; - } - } - - return TRUE; -} - -/** @brief Performs gamma correction on a 8, 24 or 32-bit image. - -@param src Input image to be processed. -@param gamma Gamma value to use. A value of 1.0 leaves the image alone, -less than one darkens it, and greater than one lightens it. -@return Returns TRUE if successful, FALSE otherwise. -*/ -BOOL DLL_CALLCONV -FreeImage_AdjustGamma(FIBITMAP *src, double gamma) { - BYTE LUT[256]; // Lookup table - - if(!FreeImage_HasPixels(src) || (gamma <= 0)) - return FALSE; - - // Build the lookup table - - double exponent = 1 / gamma; - double v = 255.0 * (double)pow((double)255, -exponent); - for(int i = 0; i < 256; i++) { - double color = (double)pow((double)i, exponent) * v; - if(color > 255) - color = 255; - LUT[i] = (BYTE)floor(color + 0.5); - } - - // Apply the gamma correction - return FreeImage_AdjustCurve(src, LUT, FICC_RGB); -} - -/** @brief Adjusts the brightness of a 8, 24 or 32-bit image by a certain amount. - -@param src Input image to be processed. -@param percentage Where -100 <= percentage <= 100
-A value 0 means no change, less than 0 will make the image darker -and greater than 0 will make the image brighter. -@return Returns TRUE if successful, FALSE otherwise. -*/ -BOOL DLL_CALLCONV -FreeImage_AdjustBrightness(FIBITMAP *src, double percentage) { - BYTE LUT[256]; // Lookup table - double value; - - if(!FreeImage_HasPixels(src)) - return FALSE; - - // Build the lookup table - const double scale = (100 + percentage) / 100; - for(int i = 0; i < 256; i++) { - value = i * scale; - value = MAX(0.0, MIN(value, 255.0)); - LUT[i] = (BYTE)floor(value + 0.5); - } - return FreeImage_AdjustCurve(src, LUT, FICC_RGB); -} - -/** @brief Adjusts the contrast of a 8, 24 or 32-bit image by a certain amount. - -@param src Input image to be processed. -@param percentage Where -100 <= percentage <= 100
-A value 0 means no change, less than 0 will decrease the contrast -and greater than 0 will increase the contrast of the image. -@return Returns TRUE if successful, FALSE otherwise. -*/ -BOOL DLL_CALLCONV -FreeImage_AdjustContrast(FIBITMAP *src, double percentage) { - BYTE LUT[256]; // Lookup table - double value; - - if(!FreeImage_HasPixels(src)) - return FALSE; - - // Build the lookup table - const double scale = (100 + percentage) / 100; - for(int i = 0; i < 256; i++) { - value = 128 + (i - 128) * scale; - value = MAX(0.0, MIN(value, 255.0)); - LUT[i] = (BYTE)floor(value + 0.5); - } - return FreeImage_AdjustCurve(src, LUT, FICC_RGB); -} - -/** @brief Computes image histogram - -For 24-bit and 32-bit images, histogram can be computed from red, green, blue and -black channels. For 8-bit images, histogram is computed from the black channel. Other -bit depth is not supported (nothing is done). -@param src Input image to be processed. -@param histo Histogram array to fill. The size of 'histo' is assumed to be 256. -@param channel Color channel to use -@return Returns TRUE if succesful, returns FALSE if the image bit depth isn't supported. -*/ -BOOL DLL_CALLCONV -FreeImage_GetHistogram(FIBITMAP *src, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel) { - BYTE pixel; - BYTE *bits = NULL; - unsigned x, y; - - if(!FreeImage_HasPixels(src) || !histo) return FALSE; - - unsigned width = FreeImage_GetWidth(src); - unsigned height = FreeImage_GetHeight(src); - unsigned bpp = FreeImage_GetBPP(src); - - if(bpp == 8) { - // clear histogram array - memset(histo, 0, 256 * sizeof(DWORD)); - // compute histogram for black channel - for(y = 0; y < height; y++) { - bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < width; x++) { - // get pixel value - pixel = bits[x]; - histo[pixel]++; - } - } - return TRUE; - } - else if((bpp == 24) || (bpp == 32)) { - int bytespp = bpp / 8; // bytes / pixel - - // clear histogram array - memset(histo, 0, 256 * sizeof(DWORD)); - - switch(channel) { - case FICC_RED: - // compute histogram for red channel - for(y = 0; y < height; y++) { - bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < width; x++) { - pixel = bits[FI_RGBA_RED]; // R - histo[pixel]++; - bits += bytespp; - } - } - return TRUE; - - case FICC_GREEN: - // compute histogram for green channel - for(y = 0; y < height; y++) { - bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < width; x++) { - pixel = bits[FI_RGBA_GREEN]; // G - histo[pixel]++; - bits += bytespp; - } - } - return TRUE; - - case FICC_BLUE: - // compute histogram for blue channel - for(y = 0; y < height; y++) { - bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < width; x++) { - pixel = bits[FI_RGBA_BLUE]; // B - histo[pixel]++; - bits += bytespp; - } - } - return TRUE; - - case FICC_BLACK: - case FICC_RGB: - // compute histogram for black channel - for(y = 0; y < height; y++) { - bits = FreeImage_GetScanLine(src, y); - for(x = 0; x < width; x++) { - // RGB to GREY conversion - pixel = GREY(bits[FI_RGBA_RED], bits[FI_RGBA_GREEN], bits[FI_RGBA_BLUE]); - histo[pixel]++; - bits += bytespp; - } - } - return TRUE; - - default: - return FALSE; - } - } - - return FALSE; -} - -// ---------------------------------------------------------- - - -/** @brief Creates a lookup table to be used with FreeImage_AdjustCurve() which - may adjust brightness and contrast, correct gamma and invert the image with a - single call to FreeImage_AdjustCurve(). - - This function creates a lookup table to be used with FreeImage_AdjustCurve() - which may adjust brightness and contrast, correct gamma and invert the image - with a single call to FreeImage_AdjustCurve(). If more than one of these image - display properties need to be adjusted, using a combined lookup table should be - preferred over calling each adjustment function separately. That's particularly - true for huge images or if performance is an issue. Then, the expensive process - of iterating over all pixels of an image is performed only once and not up to - four times. - - Furthermore, the lookup table created does not depend on the order, in which - each single adjustment operation is performed. Due to rounding and byte casting - issues, it actually matters in which order individual adjustment operations - are performed. Both of the following snippets most likely produce different - results: - - // snippet 1: contrast, brightness - FreeImage_AdjustContrast(dib, 15.0); - FreeImage_AdjustBrightness(dib, 50.0); - - // snippet 2: brightness, contrast - FreeImage_AdjustBrightness(dib, 50.0); - FreeImage_AdjustContrast(dib, 15.0); - - Better and even faster would be snippet 3: - - // snippet 3: - BYTE LUT[256]; - FreeImage_GetAdjustColorsLookupTable(LUT, 50.0, 15.0, 1.0, FALSE); - FreeImage_AdjustCurve(dib, LUT, FICC_RGB); - - This function is also used internally by FreeImage_AdjustColors(), which does - not return the lookup table, but uses it to call FreeImage_AdjustCurve() on the - passed image. - - @param LUT Output lookup table to be used with FreeImage_AdjustCurve(). The - size of 'LUT' is assumed to be 256. - @param brightness Percentage brightness value where -100 <= brightness <= 100
- A value of 0 means no change, less than 0 will make the image darker and greater - than 0 will make the image brighter. - @param contrast Percentage contrast value where -100 <= contrast <= 100
- A value of 0 means no change, less than 0 will decrease the contrast - and greater than 0 will increase the contrast of the image. - @param gamma Gamma value to be used for gamma correction. A value of 1.0 leaves - the image alone, less than one darkens it, and greater than one lightens it. - This parameter must not be zero or smaller than zero. If so, it will be ignored - and no gamma correction will be performed using the lookup table created. - @param invert If set to TRUE, the image will be inverted. - @return Returns the number of adjustments applied to the resulting lookup table - compared to a blind lookup table. - */ -int DLL_CALLCONV -FreeImage_GetAdjustColorsLookupTable(BYTE *LUT, double brightness, double contrast, double gamma, BOOL invert) { - double dblLUT[256]; - double value; - int result = 0; - - if ((brightness == 0.0) && (contrast == 0.0) && (gamma == 1.0) && (!invert)) { - // nothing to do, if all arguments have their default values - // return a blind LUT - for (int i = 0; i < 256; i++) { - LUT[i] = (BYTE)i; - } - return 0; - } - - // first, create a blind LUT, which does nothing to the image - for (int i = 0; i < 256; i++) { - dblLUT[i] = i; - } - - if (contrast != 0.0) { - // modify lookup table with contrast adjustment data - const double v = (100.0 + contrast) / 100.0; - for (int i = 0; i < 256; i++) { - value = 128 + (dblLUT[i] - 128) * v; - dblLUT[i] = MAX(0.0, MIN(value, 255.0)); - } - result++; - } - - if (brightness != 0.0) { - // modify lookup table with brightness adjustment data - const double v = (100.0 + brightness) / 100.0; - for (int i = 0; i < 256; i++) { - value = dblLUT[i] * v; - dblLUT[i] = MAX(0.0, MIN(value, 255.0)); - } - result++; - } - - if ((gamma > 0) && (gamma != 1.0)) { - // modify lookup table with gamma adjustment data - double exponent = 1 / gamma; - const double v = 255.0 * (double)pow((double)255, -exponent); - for (int i = 0; i < 256; i++) { - value = pow(dblLUT[i], exponent) * v; - dblLUT[i] = MAX(0.0, MIN(value, 255.0)); - } - result++; - } - - if (!invert) { - for (int i = 0; i < 256; i++) { - LUT[i] = (BYTE)floor(dblLUT[i] + 0.5); - } - } else { - for (int i = 0; i < 256; i++) { - LUT[i] = 255 - (BYTE)floor(dblLUT[i] + 0.5); - } - result++; - } - // return the number of adjustments made - return result; -} - -/** @brief Adjusts an image's brightness, contrast and gamma as well as it may - optionally invert the image within a single operation. - - This function adjusts an image's brightness, contrast and gamma as well as it - may optionally invert the image within a single operation. If more than one of - these image display properties need to be adjusted, using this function should - be preferred over calling each adjustment function separately. That's - particularly true for huge images or if performance is an issue. - - This function relies on FreeImage_GetAdjustColorsLookupTable(), which creates a - single lookup table, that combines all adjustment operations requested. - - Furthermore, the lookup table created by FreeImage_GetAdjustColorsLookupTable() - does not depend on the order, in which each single adjustment operation is - performed. Due to rounding and byte casting issues, it actually matters in which - order individual adjustment operations are performed. Both of the following - snippets most likely produce different results: - - // snippet 1: contrast, brightness - FreeImage_AdjustContrast(dib, 15.0); - FreeImage_AdjustBrightness(dib, 50.0); - - // snippet 2: brightness, contrast - FreeImage_AdjustBrightness(dib, 50.0); - FreeImage_AdjustContrast(dib, 15.0); - - Better and even faster would be snippet 3: - - // snippet 3: - FreeImage_AdjustColors(dib, 50.0, 15.0, 1.0, FALSE); - - @param dib Input/output image to be processed. - @param brightness Percentage brightness value where -100 <= brightness <= 100
- A value of 0 means no change, less than 0 will make the image darker and greater - than 0 will make the image brighter. - @param contrast Percentage contrast value where -100 <= contrast <= 100
- A value of 0 means no change, less than 0 will decrease the contrast - and greater than 0 will increase the contrast of the image. - @param gamma Gamma value to be used for gamma correction. A value of 1.0 leaves - the image alone, less than one darkens it, and greater than one lightens it.
- This parameter must not be zero or smaller than zero. If so, it will be ignored - and no gamma correction will be performed on the image. - @param invert If set to TRUE, the image will be inverted. - @return Returns TRUE on success, FALSE otherwise (e.g. when the bitdeph of the - source dib cannot be handled). - */ -BOOL DLL_CALLCONV -FreeImage_AdjustColors(FIBITMAP *dib, double brightness, double contrast, double gamma, BOOL invert) { - BYTE LUT[256]; - - if (!FreeImage_HasPixels(dib) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) { - return FALSE; - } - - int bpp = FreeImage_GetBPP(dib); - if ((bpp != 8) && (bpp != 24) && (bpp != 32)) { - return FALSE; - } - - if (FreeImage_GetAdjustColorsLookupTable(LUT, brightness, contrast, gamma, invert)) { - return FreeImage_AdjustCurve(dib, LUT, FICC_RGB); - } - return FALSE; -} - -/** @brief Applies color mapping for one or several colors on a 1-, 4- or 8-bit - palletized or a 16-, 24- or 32-bit high color image. - - This function maps up to count colors specified in srccolors to - these specified in dstcolors. Thereby, color srccolors[N], - if found in the image, will be replaced by color dstcolors[N]. If - parameter swap is TRUE, additionally all colors specified in - dstcolors are also mapped to these specified in srccolors. For - high color images, the actual image data will be modified whereas, for - palletized images only the palette will be changed.
- - The function returns the number of pixels changed or zero, if no pixels were - changed. - - Both arrays srccolors and dstcolors are assumed not to hold less - than count colors.
- - For 16-bit images, all colors specified are transparently converted to their - proper 16-bit representation (either in RGB555 or RGB565 format, which is - determined by the image's red- green- and blue-mask).
- - Note, that this behaviour is different from what FreeImage_ApplyPaletteIndexMapping() - does, which modifies the actual image data on palletized images. - - @param dib Input/output image to be processed. - @param srccolors Array of colors to be used as the mapping source. - @param dstcolors Array of colors to be used as the mapping destination. - @param count The number of colors to be mapped. This is the size of both - srccolors and dstcolors. - @param ignore_alpha If TRUE, 32-bit images and colors are treated as 24-bit. - @param swap If TRUE, source and destination colors are swapped, that is, - each destination color is also mapped to the corresponding source color. - @return Returns the total number of pixels changed. - */ -unsigned DLL_CALLCONV -FreeImage_ApplyColorMapping(FIBITMAP *dib, RGBQUAD *srccolors, RGBQUAD *dstcolors, unsigned count, BOOL ignore_alpha, BOOL swap) { - unsigned result = 0; - - if (!FreeImage_HasPixels(dib) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) { - return 0; - } - - // validate parameters - if ((!srccolors) || (!dstcolors)|| (count < 1)) { - return 0; - } - - int bpp = FreeImage_GetBPP(dib); - switch (bpp) { - case 1: - case 4: - case 8: { - unsigned size = FreeImage_GetColorsUsed(dib); - RGBQUAD *pal = FreeImage_GetPalette(dib); - RGBQUAD *a, *b; - for (unsigned x = 0; x < size; x++) { - for (unsigned j = 0; j < count; j++) { - a = srccolors; - b = dstcolors; - for (int i = (swap ? 0 : 1); i < 2; i++) { - if ((pal[x].rgbBlue == a[j].rgbBlue)&&(pal[x].rgbGreen == a[j].rgbGreen) &&(pal[x].rgbRed== a[j].rgbRed)) { - pal[x].rgbBlue = b[j].rgbBlue; - pal[x].rgbGreen = b[j].rgbGreen; - pal[x].rgbRed = b[j].rgbRed; - result++; - j = count; - break; - } - a = dstcolors; - b = srccolors; - } - } - } - return result; - } - case 16: { - WORD *src16 = (WORD *)malloc(sizeof(WORD) * count); - if (NULL == src16) { - return 0; - } - - WORD *dst16 = (WORD *)malloc(sizeof(WORD) * count); - if (NULL == dst16) { - free(src16); - return 0; - } - - for (unsigned j = 0; j < count; j++) { - src16[j] = RGBQUAD_TO_WORD(dib, (srccolors + j)); - dst16[j] = RGBQUAD_TO_WORD(dib, (dstcolors + j)); - } - - unsigned height = FreeImage_GetHeight(dib); - unsigned width = FreeImage_GetWidth(dib); - WORD *a, *b; - for (unsigned y = 0; y < height; y++) { - WORD *bits = (WORD *)FreeImage_GetScanLine(dib, y); - for (unsigned x = 0; x < width; x++, bits++) { - for (unsigned j = 0; j < count; j++) { - a = src16; - b = dst16; - for (int i = (swap ? 0 : 1); i < 2; i++) { - if (*bits == a[j]) { - *bits = b[j]; - result++; - j = count; - break; - } - a = dst16; - b = src16; - } - } - } - } - free(src16); - free(dst16); - return result; - } - case 24: { - unsigned height = FreeImage_GetHeight(dib); - unsigned width = FreeImage_GetWidth(dib); - RGBQUAD *a, *b; - for (unsigned y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - for (unsigned x = 0; x < width; x++, bits += 3) { - for (unsigned j = 0; j < count; j++) { - a = srccolors; - b = dstcolors; - for (int i = (swap ? 0 : 1); i < 2; i++) { - if ((bits[FI_RGBA_BLUE] == a[j].rgbBlue) && (bits[FI_RGBA_GREEN] == a[j].rgbGreen) &&(bits[FI_RGBA_RED] == a[j].rgbRed)) { - bits[FI_RGBA_BLUE] = b[j].rgbBlue; - bits[FI_RGBA_GREEN] = b[j].rgbGreen; - bits[FI_RGBA_RED] = b[j].rgbRed; - result++; - j = count; - break; - } - a = dstcolors; - b = srccolors; - } - } - } - } - return result; - } - case 32: { - unsigned height = FreeImage_GetHeight(dib); - unsigned width = FreeImage_GetWidth(dib); - RGBQUAD *a, *b; - for (unsigned y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - for (unsigned x = 0; x < width; x++, bits += 4) { - for (unsigned j = 0; j < count; j++) { - a = srccolors; - b = dstcolors; - for (int i = (swap ? 0 : 1); i < 2; i++) { - if ((bits[FI_RGBA_BLUE] == a[j].rgbBlue) &&(bits[FI_RGBA_GREEN] == a[j].rgbGreen) &&(bits[FI_RGBA_RED] == a[j].rgbRed) - &&((ignore_alpha) || (bits[FI_RGBA_ALPHA] == a[j].rgbReserved))) { - bits[FI_RGBA_BLUE] = b[j].rgbBlue; - bits[FI_RGBA_GREEN] = b[j].rgbGreen; - bits[FI_RGBA_RED] = b[j].rgbRed; - if (!ignore_alpha) { - bits[FI_RGBA_ALPHA] = b[j].rgbReserved; - } - result++; - j = count; - break; - } - a = dstcolors; - b = srccolors; - } - } - } - } - return result; - } - default: { - return 0; - } - } -} - -/** @brief Swaps two specified colors on a 1-, 4- or 8-bit palletized - or a 16-, 24- or 32-bit high color image. - - This function swaps the two specified colors color_a and color_b - on a palletized or high color image. For high color images, the actual image - data will be modified whereas, for palletized images only the palette will be - changed.
- - Note, that this behaviour is different from what FreeImage_SwapPaletteIndices() - does, which modifies the actual image data on palletized images.
- - This is just a thin wrapper for FreeImage_ApplyColorMapping() and resolves to:
- return FreeImage_ApplyColorMapping(dib, color_a, color_b, 1, ignore_alpha, TRUE); - - @param dib Input/output image to be processed. - @param color_a On of the two colors to be swapped. - @param color_b The other of the two colors to be swapped. - @param ignore_alpha If TRUE, 32-bit images and colors are treated as 24-bit. - @return Returns the total number of pixels changed. - */ -unsigned DLL_CALLCONV -FreeImage_SwapColors(FIBITMAP *dib, RGBQUAD *color_a, RGBQUAD *color_b, BOOL ignore_alpha) { - return FreeImage_ApplyColorMapping(dib, color_a, color_b, 1, ignore_alpha, TRUE); -} - -/** @brief Applies palette index mapping for one or several indices on a 1-, 4- - or 8-bit palletized image. - - This function maps up to count palette indices specified in - srcindices to these specified in dstindices. Thereby, index - srcindices[N], if present in the image, will be replaced by index - dstindices[N]. If parameter swap is TRUE, additionally all indices - specified in dstindices are also mapped to these specified in - srcindices.
- - The function returns the number of pixels changed or zero, if no pixels were - changed. - - Both arrays srcindices and dstindices are assumed not to hold less - than count indices.
- - Note, that this behaviour is different from what FreeImage_ApplyColorMapping() - does, which modifies the actual image data on palletized images. - - @param dib Input/output image to be processed. - @param srcindices Array of palette indices to be used as the mapping source. - @param dstindices Array of palette indices to be used as the mapping destination. - @param count The number of palette indices to be mapped. This is the size of both - srcindices and dstindices. - @param swap If TRUE, source and destination palette indices are swapped, that is, - each destination index is also mapped to the corresponding source index. - @return Returns the total number of pixels changed. - */ -unsigned DLL_CALLCONV -FreeImage_ApplyPaletteIndexMapping(FIBITMAP *dib, BYTE *srcindices, BYTE *dstindices, unsigned count, BOOL swap) { - unsigned result = 0; - - if (!FreeImage_HasPixels(dib) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) { - return 0; - } - - // validate parameters - if ((!srcindices) || (!dstindices)|| (count < 1)) { - return 0; - } - - unsigned height = FreeImage_GetHeight(dib); - unsigned width = FreeImage_GetLine(dib); - BYTE *a, *b; - - int bpp = FreeImage_GetBPP(dib); - switch (bpp) { - case 1: { - - return result; - } - case 4: { - int skip_last = (FreeImage_GetWidth(dib) & 0x01); - unsigned max_x = width - 1; - for (unsigned y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - for (unsigned x = 0; x < width; x++) { - int start = ((skip_last) && (x == max_x)) ? 1 : 0; - for (int cn = start; cn < 2; cn++) { - for (unsigned j = 0; j < count; j++) { - a = srcindices; - b = dstindices; - for (int i = ((swap) ? 0 : 1); i < 2; i++) { - if (GET_NIBBLE(cn, bits[x]) == (a[j] & 0x0F)) { - SET_NIBBLE(cn, bits[x], b[j]); - result++; - j = count; - break; - } - a = dstindices; - b = srcindices; - } - } - } - } - } - return result; - } - case 8: { - for (unsigned y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - for (unsigned x = 0; x < width; x++) { - for (unsigned j = 0; j < count; j++) { - a = srcindices; - b = dstindices; - for (int i = ((swap) ? 0 : 1); i < 2; i++) { - if (bits[x] == a[j]) { - bits[x] = b[j]; - result++; - j = count; - break; - } - a = dstindices; - b = srcindices; - } - } - } - } - return result; - } - default: { - return 0; - } - } -} - -/** @brief Swaps two specified palette indices on a 1-, 4- or 8-bit palletized - image. - - This function swaps the two specified palette indices index_a and - index_b on a palletized image. Therefore, not the palette, but the - actual image data will be modified.
- - Note, that this behaviour is different from what FreeImage_SwapColors() does - on palletized images, which only swaps the colors in the palette.
- - This is just a thin wrapper for FreeImage_ApplyColorMapping() and resolves to:
- return FreeImage_ApplyPaletteIndexMapping(dib, index_a, index_b, 1, TRUE); - - @param dib Input/output image to be processed. - @param index_a On of the two palette indices to be swapped. - @param index_b The other of the two palette indices to be swapped. - @return Returns the total number of pixels changed. - */ -unsigned DLL_CALLCONV -FreeImage_SwapPaletteIndices(FIBITMAP *dib, BYTE *index_a, BYTE *index_b) { - return FreeImage_ApplyPaletteIndexMapping(dib, index_a, index_b, 1, TRUE); -} - diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp deleted file mode 100644 index d05a5df..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp +++ /dev/null @@ -1,861 +0,0 @@ -// ========================================================== -// Copy / paste routines -// -// - Floris van den Berg (flvdberg@wxs.nl) -// - Alexander Dymerets (sashad@te.net.ua) -// - Herv Drolon (drolon@infonie.fr) -// - Manfred Tausch (manfred.tausch@t-online.de) -// - Riley McNiff (rmcniff@marexgroup.com) -// - Carsten Klein (cklein05@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -// ---------------------------------------------------------- -// Helpers -// ---------------------------------------------------------- - -///////////////////////////////////////////////////////////// -// Alpha blending / combine functions - -// ---------------------------------------------------------- -/// 1-bit -static BOOL Combine1(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha); -/// 4-bit -static BOOL Combine4(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha); -/// 8-bit -static BOOL Combine8(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha); -/// 16-bit 555 -static BOOL Combine16_555(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha); -/// 16-bit 565 -static BOOL Combine16_565(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha); -/// 24-bit -static BOOL Combine24(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha); -/// 32- bit -static BOOL Combine32(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha); -// ---------------------------------------------------------- - -// ---------------------------------------------------------- -// 1-bit -// ---------------------------------------------------------- - -static BOOL -Combine1(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha) { - BOOL value; - - // check the bit depth of src and dst images - if((FreeImage_GetBPP(dst_dib) != 1) || (FreeImage_GetBPP(src_dib) != 1)) { - return FALSE; - } - - // check the size of src image - if((x + FreeImage_GetWidth(src_dib) > FreeImage_GetWidth(dst_dib)) || (y + FreeImage_GetHeight(src_dib) > FreeImage_GetHeight(dst_dib))) { - return FALSE; - } - - BYTE *dst_bits = FreeImage_GetBits(dst_dib) + ((FreeImage_GetHeight(dst_dib) - FreeImage_GetHeight(src_dib) - y) * FreeImage_GetPitch(dst_dib)); - BYTE *src_bits = FreeImage_GetBits(src_dib); - - // combine images - for(unsigned rows = 0; rows < FreeImage_GetHeight(src_dib); rows++) { - for(unsigned cols = 0; cols < FreeImage_GetWidth(src_dib); cols++) { - // get bit at (rows, cols) in src image - value = (src_bits[cols >> 3] & (0x80 >> (cols & 0x07))) != 0; - // set bit at (rows, x+cols) in dst image - value ? dst_bits[(x + cols) >> 3] |= (0x80 >> ((x + cols) & 0x7)) : dst_bits[(x + cols) >> 3] &= (0xFF7F >> ((x + cols) & 0x7)); - } - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - - return TRUE; -} - -// ---------------------------------------------------------- -// 4-bit -// ---------------------------------------------------------- - -static BOOL -Combine4(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha) { - int swapTable[16]; - BOOL bOddStart, bOddEnd; - - // check the bit depth of src and dst images - if((FreeImage_GetBPP(dst_dib) != 4) || (FreeImage_GetBPP(src_dib) != 4)) { - return FALSE; - } - - // check the size of src image - if((x + FreeImage_GetWidth(src_dib) > FreeImage_GetWidth(dst_dib)) || (y + FreeImage_GetHeight(src_dib) > FreeImage_GetHeight(dst_dib))) { - return FALSE; - } - - // get src and dst palettes - RGBQUAD *src_pal = FreeImage_GetPalette(src_dib); - RGBQUAD *dst_pal = FreeImage_GetPalette(dst_dib); - if (src_pal == NULL || dst_pal == NULL) { - return FALSE; - } - - // build a swap table for the closest color match from the source palette to the destination palette - - for (int i = 0; i < 16; i++) { - WORD min_diff = (WORD)-1; - - for (int j = 0; j < 16; j++) { - // calculates the color difference using a Manhattan distance - WORD abs_diff = (WORD)( - abs(src_pal[i].rgbBlue - dst_pal[j].rgbBlue) - + abs(src_pal[i].rgbGreen - dst_pal[j].rgbGreen) - + abs(src_pal[i].rgbRed - dst_pal[j].rgbRed) - ); - - if (abs_diff < min_diff) { - swapTable[i] = j; - min_diff = abs_diff; - if (abs_diff == 0) { - break; - } - } - } - } - - BYTE *dst_bits = FreeImage_GetBits(dst_dib) + ((FreeImage_GetHeight(dst_dib) - FreeImage_GetHeight(src_dib) - y) * FreeImage_GetPitch(dst_dib)) + (x >> 1); - BYTE *src_bits = FreeImage_GetBits(src_dib); - - // combine images - - // allocate space for our temporary row - unsigned src_line = FreeImage_GetLine(src_dib); - unsigned src_width = FreeImage_GetWidth(src_dib); - unsigned src_height = FreeImage_GetHeight(src_dib); - - BYTE *buffer = (BYTE *)malloc(src_line * sizeof(BYTE)); - if (buffer == NULL) { - return FALSE; - } - - bOddStart = (x & 0x01) ? TRUE : FALSE; - - if ((bOddStart && !(src_width & 0x01)) || (!bOddStart && (src_width & 0x01))) { - bOddEnd = TRUE; - } - else { - bOddEnd = FALSE; - } - - for(unsigned rows = 0; rows < src_height; rows++) { - memcpy(buffer, src_bits, src_line); - - // change the values in the temp row to be those from the swap table - - for (unsigned cols = 0; cols < src_line; cols++) { - buffer[cols] = (BYTE)((swapTable[HINIBBLE(buffer[cols]) >> 4] << 4) + swapTable[LOWNIBBLE(buffer[cols])]); - } - - if (bOddStart) { - buffer[0] = HINIBBLE(dst_bits[0]) + LOWNIBBLE(buffer[0]); - } - - if (bOddEnd) { - buffer[src_line - 1] = HINIBBLE(buffer[src_line - 1]) + LOWNIBBLE(dst_bits[src_line - 1]); - } - - memcpy(dst_bits, buffer, src_line); - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - - free(buffer); - - return TRUE; - -} - -// ---------------------------------------------------------- -// 8-bit -// ---------------------------------------------------------- - -static BOOL -Combine8(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha) { - // check the bit depth of src and dst images - if((FreeImage_GetBPP(dst_dib) != 8) || (FreeImage_GetBPP(src_dib) != 8)) { - return FALSE; - } - - // check the size of src image - if((x + FreeImage_GetWidth(src_dib) > FreeImage_GetWidth(dst_dib)) || (y + FreeImage_GetHeight(src_dib) > FreeImage_GetHeight(dst_dib))) { - return FALSE; - } - - BYTE *dst_bits = FreeImage_GetBits(dst_dib) + ((FreeImage_GetHeight(dst_dib) - FreeImage_GetHeight(src_dib) - y) * FreeImage_GetPitch(dst_dib)) + (x); - BYTE *src_bits = FreeImage_GetBits(src_dib); - - if(alpha > 255) { - // combine images - for(unsigned rows = 0; rows < FreeImage_GetHeight(src_dib); rows++) { - memcpy(dst_bits, src_bits, FreeImage_GetLine(src_dib)); - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - } else { - // alpha blend images - for(unsigned rows = 0; rows < FreeImage_GetHeight(src_dib); rows++) { - for (unsigned cols = 0; cols < FreeImage_GetLine(src_dib); cols++) { - dst_bits[cols] = (BYTE)(((src_bits[cols] - dst_bits[cols]) * alpha + (dst_bits[cols] << 8)) >> 8); - } - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - } - - return TRUE; -} - -// ---------------------------------------------------------- -// 16-bit -// ---------------------------------------------------------- - -static BOOL -Combine16_555(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha) { - // check the bit depth of src and dst images - if((FreeImage_GetBPP(dst_dib) != 16) || (FreeImage_GetBPP(src_dib) != 16)) { - return FALSE; - } - - // check the size of src image - if((x + FreeImage_GetWidth(src_dib) > FreeImage_GetWidth(dst_dib)) || (y + FreeImage_GetHeight(src_dib) > FreeImage_GetHeight(dst_dib))) { - return FALSE; - } - - BYTE *dst_bits = FreeImage_GetBits(dst_dib) + ((FreeImage_GetHeight(dst_dib) - FreeImage_GetHeight(src_dib) - y) * FreeImage_GetPitch(dst_dib)) + (x * 2); - BYTE *src_bits = FreeImage_GetBits(src_dib); - - if (alpha > 255) { - for(unsigned rows = 0; rows < FreeImage_GetHeight(src_dib); rows++) { - memcpy(dst_bits, src_bits, FreeImage_GetLine(src_dib)); - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - } else { - for(unsigned rows = 0; rows < FreeImage_GetHeight(src_dib); rows++) { - for(unsigned cols = 0; cols < FreeImage_GetLine(src_dib); cols += 2) { - RGBTRIPLE color_s; - RGBTRIPLE color_t; - - WORD *tmp1 = (WORD *)&dst_bits[cols]; - WORD *tmp2 = (WORD *)&src_bits[cols]; - - // convert 16-bit colors to 24-bit - - color_s.rgbtRed = (BYTE)(((*tmp1 & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) << 3); - color_s.rgbtGreen = (BYTE)(((*tmp1 & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) << 3); - color_s.rgbtBlue = (BYTE)(((*tmp1 & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) << 3); - - color_t.rgbtRed = (BYTE)(((*tmp2 & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT) << 3); - color_t.rgbtGreen = (BYTE)(((*tmp2 & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT) << 3); - color_t.rgbtBlue = (BYTE)(((*tmp2 & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT) << 3); - - // alpha blend - - color_s.rgbtRed = (BYTE)(((color_t.rgbtRed - color_s.rgbtRed) * alpha + (color_s.rgbtRed << 8)) >> 8); - color_s.rgbtGreen = (BYTE)(((color_t.rgbtGreen - color_s.rgbtGreen) * alpha + (color_s.rgbtGreen << 8)) >> 8); - color_s.rgbtBlue = (BYTE)(((color_t.rgbtBlue - color_s.rgbtBlue) * alpha + (color_s.rgbtBlue << 8)) >> 8); - - // convert 24-bit color back to 16-bit - - *tmp1 = RGB555(color_s.rgbtRed, color_s.rgbtGreen, color_s.rgbtBlue); - } - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - } - - return TRUE; -} - -static BOOL -Combine16_565(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha) { - // check the bit depth of src and dst images - if((FreeImage_GetBPP(dst_dib) != 16) || (FreeImage_GetBPP(src_dib) != 16)) { - return FALSE; - } - - // check the size of src image - if((x + FreeImage_GetWidth(src_dib) > FreeImage_GetWidth(dst_dib)) || (y + FreeImage_GetHeight(src_dib) > FreeImage_GetHeight(dst_dib))) { - return FALSE; - } - - BYTE *dst_bits = FreeImage_GetBits(dst_dib) + ((FreeImage_GetHeight(dst_dib) - FreeImage_GetHeight(src_dib) - y) * FreeImage_GetPitch(dst_dib)) + (x * 2); - BYTE *src_bits = FreeImage_GetBits(src_dib); - - if (alpha > 255) { - for(unsigned rows = 0; rows < FreeImage_GetHeight(src_dib); rows++) { - memcpy(dst_bits, src_bits, FreeImage_GetLine(src_dib)); - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - } else { - for(unsigned rows = 0; rows < FreeImage_GetHeight(src_dib); rows++) { - for(unsigned cols = 0; cols < FreeImage_GetLine(src_dib); cols += 2) { - RGBTRIPLE color_s; - RGBTRIPLE color_t; - - WORD *tmp1 = (WORD *)&dst_bits[cols]; - WORD *tmp2 = (WORD *)&src_bits[cols]; - - // convert 16-bit colors to 24-bit - - color_s.rgbtRed = (BYTE)(((*tmp1 & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT) << 3); - color_s.rgbtGreen = (BYTE)(((*tmp1 & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT) << 2); - color_s.rgbtBlue = (BYTE)(((*tmp1 & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT) << 3); - - color_t.rgbtRed = (BYTE)(((*tmp2 & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT) << 3); - color_t.rgbtGreen = (BYTE)(((*tmp2 & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT) << 2); - color_t.rgbtBlue = (BYTE)(((*tmp2 & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT) << 3); - - // alpha blend - - color_s.rgbtRed = (BYTE)(((color_t.rgbtRed - color_s.rgbtRed) * alpha + (color_s.rgbtRed << 8)) >> 8); - color_s.rgbtGreen = (BYTE)(((color_t.rgbtGreen - color_s.rgbtGreen) * alpha + (color_s.rgbtGreen << 8)) >> 8); - color_s.rgbtBlue = (BYTE)(((color_t.rgbtBlue - color_s.rgbtBlue) * alpha + (color_s.rgbtBlue << 8)) >> 8); - - // convert 24-bit color back to 16-bit - - *tmp1 = RGB565(color_s.rgbtRed, color_s.rgbtGreen, color_s.rgbtBlue); - } - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - } - - return TRUE; -} - -// ---------------------------------------------------------- -// 24-bit -// ---------------------------------------------------------- - -static BOOL -Combine24(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha) { - // check the bit depth of src and dst images - if((FreeImage_GetBPP(dst_dib) != 24) || (FreeImage_GetBPP(src_dib) != 24)) { - return FALSE; - } - - // check the size of src image - if((x + FreeImage_GetWidth(src_dib) > FreeImage_GetWidth(dst_dib)) || (y + FreeImage_GetHeight(src_dib) > FreeImage_GetHeight(dst_dib))) { - return FALSE; - } - - BYTE *dst_bits = FreeImage_GetBits(dst_dib) + ((FreeImage_GetHeight(dst_dib) - FreeImage_GetHeight(src_dib) - y) * FreeImage_GetPitch(dst_dib)) + (x * 3); - BYTE *src_bits = FreeImage_GetBits(src_dib); - - if(alpha > 255) { - // combine images - for(unsigned rows = 0; rows < FreeImage_GetHeight(src_dib); rows++) { - memcpy(dst_bits, src_bits, FreeImage_GetLine(src_dib)); - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - } else { - // alpha blend images - for(unsigned rows = 0; rows < FreeImage_GetHeight(src_dib); rows++) { - for (unsigned cols = 0; cols < FreeImage_GetLine(src_dib); cols++) { - dst_bits[cols] = (BYTE)(((src_bits[cols] - dst_bits[cols]) * alpha + (dst_bits[cols] << 8)) >> 8); - } - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - } - - return TRUE; -} - -// ---------------------------------------------------------- -// 32-bit -// ---------------------------------------------------------- - -static BOOL -Combine32(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y, unsigned alpha) { - // check the bit depth of src and dst images - if((FreeImage_GetBPP(dst_dib) != 32) || (FreeImage_GetBPP(src_dib) != 32)) { - return FALSE; - } - - // check the size of src image - if((x + FreeImage_GetWidth(src_dib) > FreeImage_GetWidth(dst_dib)) || (y + FreeImage_GetHeight(src_dib) > FreeImage_GetHeight(dst_dib))) { - return FALSE; - } - - BYTE *dst_bits = FreeImage_GetBits(dst_dib) + ((FreeImage_GetHeight(dst_dib) - FreeImage_GetHeight(src_dib) - y) * FreeImage_GetPitch(dst_dib)) + (x * 4); - BYTE *src_bits = FreeImage_GetBits(src_dib); - - if (alpha > 255) { - // combine images - for(unsigned rows = 0; rows < FreeImage_GetHeight(src_dib); rows++) { - memcpy(dst_bits, src_bits, FreeImage_GetLine(src_dib)); - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - } else { - // alpha blend images - for(unsigned rows = 0; rows < FreeImage_GetHeight(src_dib); rows++) { - for(unsigned cols = 0; cols < FreeImage_GetLine(src_dib); cols++) { - dst_bits[cols] = (BYTE)(((src_bits[cols] - dst_bits[cols]) * alpha + (dst_bits[cols] << 8)) >> 8); - } - - dst_bits += FreeImage_GetPitch(dst_dib); - src_bits += FreeImage_GetPitch(src_dib); - } - } - - return TRUE; -} - -// ---------------------------------------------------------- -// Any type other than FIBITMAP -// ---------------------------------------------------------- - -static BOOL -CombineSameType(FIBITMAP *dst_dib, FIBITMAP *src_dib, unsigned x, unsigned y) { - // check the bit depth of src and dst images - if(FreeImage_GetImageType(dst_dib) != FreeImage_GetImageType(src_dib)) { - return FALSE; - } - - unsigned src_width = FreeImage_GetWidth(src_dib); - unsigned src_height = FreeImage_GetHeight(src_dib); - unsigned src_pitch = FreeImage_GetPitch(src_dib); - unsigned src_line = FreeImage_GetLine(src_dib); - unsigned dst_width = FreeImage_GetWidth(dst_dib); - unsigned dst_height = FreeImage_GetHeight(dst_dib); - unsigned dst_pitch = FreeImage_GetPitch(dst_dib); - - // check the size of src image - if((x + src_width > dst_width) || (y + src_height > dst_height)) { - return FALSE; - } - - BYTE *dst_bits = FreeImage_GetBits(dst_dib) + ((dst_height - src_height - y) * dst_pitch) + (x * (src_line / src_width)); - BYTE *src_bits = FreeImage_GetBits(src_dib); - - // combine images - for(unsigned rows = 0; rows < src_height; rows++) { - memcpy(dst_bits, src_bits, src_line); - - dst_bits += dst_pitch; - src_bits += src_pitch; - } - - return TRUE; -} - -// ---------------------------------------------------------- -// FreeImage interface -// ---------------------------------------------------------- - -/** -Copy a sub part of the current image and returns it as a FIBITMAP*. -Works with any bitmap type. -@param left Specifies the left position of the cropped rectangle. -@param top Specifies the top position of the cropped rectangle. -@param right Specifies the right position of the cropped rectangle. -@param bottom Specifies the bottom position of the cropped rectangle. -@return Returns the subimage if successful, NULL otherwise. -*/ -FIBITMAP * DLL_CALLCONV -FreeImage_Copy(FIBITMAP *src, int left, int top, int right, int bottom) { - - if(!FreeImage_HasPixels(src)) - return NULL; - - // normalize the rectangle - if(right < left) { - INPLACESWAP(left, right); - } - if(bottom < top) { - INPLACESWAP(top, bottom); - } - // check the size of the sub image - int src_width = FreeImage_GetWidth(src); - int src_height = FreeImage_GetHeight(src); - if((left < 0) || (right > src_width) || (top < 0) || (bottom > src_height)) { - return NULL; - } - - // allocate the sub image - unsigned bpp = FreeImage_GetBPP(src); - int dst_width = (right - left); - int dst_height = (bottom - top); - - FIBITMAP *dst = - FreeImage_AllocateT(FreeImage_GetImageType(src), - dst_width, - dst_height, - bpp, - FreeImage_GetRedMask(src), FreeImage_GetGreenMask(src), FreeImage_GetBlueMask(src)); - - if(NULL == dst) return NULL; - - // get the dimensions - int dst_line = FreeImage_GetLine(dst); - int dst_pitch = FreeImage_GetPitch(dst); - int src_pitch = FreeImage_GetPitch(src); - - // get the pointers to the bits and such - - BYTE *src_bits = FreeImage_GetScanLine(src, src_height - top - dst_height); - switch(bpp) { - case 1: - // point to x = 0 - break; - - case 4: - // point to x = 0 - break; - - default: - { - // calculate the number of bytes per pixel - unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - // point to x = left - src_bits += left * bytespp; - } - break; - } - - // point to x = 0 - BYTE *dst_bits = FreeImage_GetBits(dst); - - // copy the palette - - memcpy(FreeImage_GetPalette(dst), FreeImage_GetPalette(src), FreeImage_GetColorsUsed(src) * sizeof(RGBQUAD)); - - // copy the bits - if(bpp == 1) { - BOOL value; - unsigned y_src, y_dst; - - for(int y = 0; y < dst_height; y++) { - y_src = y * src_pitch; - y_dst = y * dst_pitch; - for(int x = 0; x < dst_width; x++) { - // get bit at (y, x) in src image - value = (src_bits[y_src + ((left+x) >> 3)] & (0x80 >> ((left+x) & 0x07))) != 0; - // set bit at (y, x) in dst image - value ? dst_bits[y_dst + (x >> 3)] |= (0x80 >> (x & 0x7)) : dst_bits[y_dst + (x >> 3)] &= (0xff7f >> (x & 0x7)); - } - } - } - - else if(bpp == 4) { - BYTE shift, value; - unsigned y_src, y_dst; - - for(int y = 0; y < dst_height; y++) { - y_src = y * src_pitch; - y_dst = y * dst_pitch; - for(int x = 0; x < dst_width; x++) { - // get nibble at (y, x) in src image - shift = (BYTE)((1 - (left+x) % 2) << 2); - value = (src_bits[y_src + ((left+x) >> 1)] & (0x0F << shift)) >> shift; - // set nibble at (y, x) in dst image - shift = (BYTE)((1 - x % 2) << 2); - dst_bits[y_dst + (x >> 1)] &= ~(0x0F << shift); - dst_bits[y_dst + (x >> 1)] |= ((value & 0x0F) << shift); - } - } - } - - else if(bpp >= 8) { - for(int y = 0; y < dst_height; y++) { - memcpy(dst_bits + (y * dst_pitch), src_bits + (y * src_pitch), dst_line); - } - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - - // copy transparency table - FreeImage_SetTransparencyTable(dst, FreeImage_GetTransparencyTable(src), FreeImage_GetTransparencyCount(src)); - - // copy background color - RGBQUAD bkcolor; - if( FreeImage_GetBackgroundColor(src, &bkcolor) ) { - FreeImage_SetBackgroundColor(dst, &bkcolor); - } - - // clone resolution - FreeImage_SetDotsPerMeterX(dst, FreeImage_GetDotsPerMeterX(src)); - FreeImage_SetDotsPerMeterY(dst, FreeImage_GetDotsPerMeterY(src)); - - // clone ICC profile - FIICCPROFILE *src_profile = FreeImage_GetICCProfile(src); - FIICCPROFILE *dst_profile = FreeImage_CreateICCProfile(dst, src_profile->data, src_profile->size); - dst_profile->flags = src_profile->flags; - - return dst; -} - -/** -Alpha blend or combine a sub part image with the current image. -The bit depth of dst bitmap must be greater than or equal to the bit depth of src. -Upper promotion of src is done internally. Supported bit depth equals to 1, 4, 8, 16, 24 or 32. -@param src Source subimage -@param left Specifies the left position of the sub image. -@param top Specifies the top position of the sub image. -@param alpha Alpha blend factor. The source and destination images are alpha blended if -alpha = 0..255. If alpha > 255, then the source image is combined to the destination image. -@return Returns TRUE if successful, FALSE otherwise. -*/ -BOOL DLL_CALLCONV -FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha) { - BOOL bResult = FALSE; - - if(!FreeImage_HasPixels(src) || !FreeImage_HasPixels(dst)) return FALSE; - - // check the size of src image - if((left < 0) || (top < 0)) { - return FALSE; - } - if((left + FreeImage_GetWidth(src) > FreeImage_GetWidth(dst)) || (top + FreeImage_GetHeight(src) > FreeImage_GetHeight(dst))) { - return FALSE; - } - - // check data type - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dst); - if(image_type != FreeImage_GetImageType(src)) { - // no conversion between data type is done - return FALSE; - } - - if(image_type == FIT_BITMAP) { - FIBITMAP *clone = NULL; - - // check the bit depth of src and dst images - unsigned bpp_src = FreeImage_GetBPP(src); - unsigned bpp_dst = FreeImage_GetBPP(dst); - BOOL isRGB565 = FALSE; - - if ((FreeImage_GetRedMask(dst) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dst) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dst) == FI16_565_BLUE_MASK)) { - isRGB565 = TRUE; - } else { - // includes case where all the masks are 0 - isRGB565 = FALSE; - } - - // perform promotion if needed - if(bpp_dst == bpp_src) { - clone = src; - } else if(bpp_dst > bpp_src) { - // perform promotion - switch(bpp_dst) { - case 4: - clone = FreeImage_ConvertTo4Bits(src); - break; - case 8: - clone = FreeImage_ConvertTo8Bits(src); - break; - case 16: - if (isRGB565) { - clone = FreeImage_ConvertTo16Bits565(src); - } else { - // includes case where all the masks are 0 - clone = FreeImage_ConvertTo16Bits555(src); - } - break; - case 24: - clone = FreeImage_ConvertTo24Bits(src); - break; - case 32: - clone = FreeImage_ConvertTo32Bits(src); - break; - default: - return FALSE; - } - } else { - return FALSE; - } - - if(!clone) return FALSE; - - // paste src to dst - switch(FreeImage_GetBPP(dst)) { - case 1: - bResult = Combine1(dst, clone, (unsigned)left, (unsigned)top, (unsigned)alpha); - break; - case 4: - bResult = Combine4(dst, clone, (unsigned)left, (unsigned)top, (unsigned)alpha); - break; - case 8: - bResult = Combine8(dst, clone, (unsigned)left, (unsigned)top, (unsigned)alpha); - break; - case 16: - if (isRGB565) { - bResult = Combine16_565(dst, clone, (unsigned)left, (unsigned)top, (unsigned)alpha); - } else { - // includes case where all the masks are 0 - bResult = Combine16_555(dst, clone, (unsigned)left, (unsigned)top, (unsigned)alpha); - } - break; - case 24: - bResult = Combine24(dst, clone, (unsigned)left, (unsigned)top, (unsigned)alpha); - break; - case 32: - bResult = Combine32(dst, clone, (unsigned)left, (unsigned)top, (unsigned)alpha); - break; - } - - if(clone != src) - FreeImage_Unload(clone); - - } - else { // any type other than FITBITMAP - bResult = CombineSameType(dst, src, (unsigned)left, (unsigned)top); - } - - return bResult; -} - -// ---------------------------------------------------------- - -/** @brief Creates a dynamic read/write view into a FreeImage bitmap. - - A dynamic view is a FreeImage bitmap with its own width and height, that, - however, shares its bits with another FreeImage bitmap. Typically, views - are used to define one or more rectangular sub-images of an existing - bitmap. All FreeImage operations, like saving, displaying and all the - toolkit functions, when applied to the view, only affect the view's - rectangular area. - - Although the view's backing image's bits not need to be copied around, - which makes the view much faster than similar solutions using - FreeImage_Copy, a view uses some private memory that needs to be freed by - calling FreeImage_Unload on the view's handle to prevent memory leaks. - - Only the backing image's pixels are shared by the view. For all other image - data, notably for the resolution, background color, color palette, - transparency table and for the ICC profile, the view gets a private copy - of the data. By default, the backing image's metadata is NOT copied to - the view. - - As with all FreeImage functions that take a rectangle region, top and left - positions are included, whereas right and bottom positions are excluded - from the rectangle area. - - Since the memory block shared by the backing image and the view must start - at a byte boundary, the value of parameter left must be a multiple of 8 - for 1-bit images and a multiple of 2 for 4-bit images. - - @param dib The FreeImage bitmap on which to create the view. - @param left The left position of the view's area. - @param top The top position of the view's area. - @param right The right position of the view's area. - @param bottom The bottom position of the view's area. - @return Returns a handle to the newly created view or NULL if the view - was not created. - */ -FIBITMAP * DLL_CALLCONV -FreeImage_CreateView(FIBITMAP *dib, unsigned left, unsigned top, unsigned right, unsigned bottom) { - if (!FreeImage_HasPixels(dib)) { - return NULL; - } - - // normalize the rectangle - if (right < left) { - INPLACESWAP(left, right); - } - if (bottom < top) { - INPLACESWAP(top, bottom); - } - - // check the size of the sub image - unsigned width = FreeImage_GetWidth(dib); - unsigned height = FreeImage_GetHeight(dib); - if (left < 0 || right > width || top < 0 || bottom > height) { - return NULL; - } - - unsigned bpp = FreeImage_GetBPP(dib); - BYTE *bits = FreeImage_GetScanLine(dib, height - bottom); - switch (bpp) { - case 1: - if (left % 8 != 0) { - // view can only start at a byte boundary - return NULL; - } - bits += (left / 8); - break; - case 4: - if (left % 2 != 0) { - // view can only start at a byte boundary - return NULL; - } - bits += (left / 2); - break; - default: - bits += left * (bpp / 8); - break; - } - - FIBITMAP *dst = FreeImage_AllocateHeaderForBits(bits, FreeImage_GetPitch(dib), FreeImage_GetImageType(dib), - right - left, bottom - top, - bpp, - FreeImage_GetRedMask(dib), FreeImage_GetGreenMask(dib), FreeImage_GetBlueMask(dib)); - - if (dst == NULL) { - return NULL; - } - - // copy some basic image properties needed for displaying and saving - - // resolution - FreeImage_SetDotsPerMeterX(dst, FreeImage_GetDotsPerMeterX(dib)); - FreeImage_SetDotsPerMeterY(dst, FreeImage_GetDotsPerMeterY(dib)); - - // background color - RGBQUAD bkcolor; - if (FreeImage_GetBackgroundColor(dib, &bkcolor)) { - FreeImage_SetBackgroundColor(dst, &bkcolor); - } - - // palette - memcpy(FreeImage_GetPalette(dst), FreeImage_GetPalette(dib), FreeImage_GetColorsUsed(dib) * sizeof(RGBQUAD)); - - // transparency table - FreeImage_SetTransparencyTable(dst, FreeImage_GetTransparencyTable(dib), FreeImage_GetTransparencyCount(dib)); - - // ICC profile - FIICCPROFILE *src_profile = FreeImage_GetICCProfile(dib); - FIICCPROFILE *dst_profile = FreeImage_CreateICCProfile(dst, src_profile->data, src_profile->size); - dst_profile->flags = src_profile->flags; - - return dst; -} diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/Display.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/Display.cpp deleted file mode 100644 index 245c5c3..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/Display.cpp +++ /dev/null @@ -1,230 +0,0 @@ -// ========================================================== -// Display routines -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - - -/** -@brief Composite a foreground image against a background color or a background image. - -The equation for computing a composited sample value is:
-output = alpha * foreground + (1-alpha) * background
-where alpha and the input and output sample values are expressed as fractions in the range 0 to 1. -For colour images, the computation is done separately for R, G, and B samples. - -@param fg Foreground image -@param useFileBkg If TRUE and a file background is present, use it as the background color -@param appBkColor If not equal to NULL, and useFileBkg is FALSE, use this color as the background color -@param bg If not equal to NULL and useFileBkg is FALSE and appBkColor is NULL, use this as the background image -@return Returns the composite image if successful, returns NULL otherwise -@see FreeImage_IsTransparent, FreeImage_HasBackgroundColor -*/ -FIBITMAP * DLL_CALLCONV -FreeImage_Composite(FIBITMAP *fg, BOOL useFileBkg, RGBQUAD *appBkColor, FIBITMAP *bg) { - if(!FreeImage_HasPixels(fg)) return NULL; - - int width = FreeImage_GetWidth(fg); - int height = FreeImage_GetHeight(fg); - int bpp = FreeImage_GetBPP(fg); - - if((bpp != 8) && (bpp != 32)) - return NULL; - - if(bg) { - int bg_width = FreeImage_GetWidth(bg); - int bg_height = FreeImage_GetHeight(bg); - int bg_bpp = FreeImage_GetBPP(bg); - if((bg_width != width) || (bg_height != height) || (bg_bpp != 24)) - return NULL; - } - - int bytespp = (bpp == 8) ? 1 : 4; - - - int x, y, c; - BYTE alpha = 0, not_alpha; - BYTE index; - RGBQUAD fgc; // foreground color - RGBQUAD bkc; // background color - - memset(&fgc, 0, sizeof(RGBQUAD)); - memset(&bkc, 0, sizeof(RGBQUAD)); - - // allocate the composite image - FIBITMAP *composite = FreeImage_Allocate(width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - if(!composite) return NULL; - - // get the palette - RGBQUAD *pal = FreeImage_GetPalette(fg); - - // retrieve the alpha table from the foreground image - BOOL bIsTransparent = FreeImage_IsTransparent(fg); - BYTE *trns = FreeImage_GetTransparencyTable(fg); - - // retrieve the background color from the foreground image - BOOL bHasBkColor = FALSE; - - if(useFileBkg && FreeImage_HasBackgroundColor(fg)) { - FreeImage_GetBackgroundColor(fg, &bkc); - bHasBkColor = TRUE; - } else { - // no file background color - // use application background color ? - if(appBkColor) { - memcpy(&bkc, appBkColor, sizeof(RGBQUAD)); - bHasBkColor = TRUE; - } - // use background image ? - else if(bg) { - bHasBkColor = FALSE; - } - } - - for(y = 0; y < height; y++) { - // foreground - BYTE *fg_bits = FreeImage_GetScanLine(fg, y); - // background - BYTE *bg_bits = FreeImage_GetScanLine(bg, y); - // composite image - BYTE *cp_bits = FreeImage_GetScanLine(composite, y); - - for(x = 0; x < width; x++) { - - // foreground color + alpha - - if(bpp == 8) { - // get the foreground color - index = fg_bits[0]; - memcpy(&fgc, &pal[index], sizeof(RGBQUAD)); - // get the alpha - if(bIsTransparent) { - alpha = trns[index]; - } else { - alpha = 255; - } - } - else if(bpp == 32) { - // get the foreground color - fgc.rgbBlue = fg_bits[FI_RGBA_BLUE]; - fgc.rgbGreen = fg_bits[FI_RGBA_GREEN]; - fgc.rgbRed = fg_bits[FI_RGBA_RED]; - // get the alpha - alpha = fg_bits[FI_RGBA_ALPHA]; - } - - // background color - - if(!bHasBkColor) { - if(bg) { - // get the background color from the background image - bkc.rgbBlue = bg_bits[FI_RGBA_BLUE]; - bkc.rgbGreen = bg_bits[FI_RGBA_GREEN]; - bkc.rgbRed = bg_bits[FI_RGBA_RED]; - } - else { - // use a checkerboard pattern - c = (((y & 0x8) == 0) ^ ((x & 0x8) == 0)) * 192; - c = c ? c : 255; - bkc.rgbBlue = (BYTE)c; - bkc.rgbGreen = (BYTE)c; - bkc.rgbRed = (BYTE)c; - } - } - - // composition - - if(alpha == 0) { - // output = background - cp_bits[FI_RGBA_BLUE] = bkc.rgbBlue; - cp_bits[FI_RGBA_GREEN] = bkc.rgbGreen; - cp_bits[FI_RGBA_RED] = bkc.rgbRed; - } - else if(alpha == 255) { - // output = foreground - cp_bits[FI_RGBA_BLUE] = fgc.rgbBlue; - cp_bits[FI_RGBA_GREEN] = fgc.rgbGreen; - cp_bits[FI_RGBA_RED] = fgc.rgbRed; - } - else { - // output = alpha * foreground + (1-alpha) * background - not_alpha = (BYTE)~alpha; - cp_bits[FI_RGBA_BLUE] = (BYTE)((alpha * (WORD)fgc.rgbBlue + not_alpha * (WORD)bkc.rgbBlue) >> 8); - cp_bits[FI_RGBA_GREEN] = (BYTE)((alpha * (WORD)fgc.rgbGreen + not_alpha * (WORD)bkc.rgbGreen) >> 8); - cp_bits[FI_RGBA_RED] = (BYTE)((alpha * (WORD)fgc.rgbRed + not_alpha * (WORD)bkc.rgbRed) >> 8); - } - - fg_bits += bytespp; - bg_bits += 3; - cp_bits += 3; - } - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(composite, fg); - - return composite; -} - -/** -Pre-multiplies a 32-bit image's red-, green- and blue channels with it's alpha channel -for to be used with e.g. the Windows GDI function AlphaBlend(). -The transformation changes the red-, green- and blue channels according to the following equation: -channel(x, y) = channel(x, y) * alpha_channel(x, y) / 255 -@param dib Input/Output dib to be premultiplied -@return Returns TRUE on success, FALSE otherwise (e.g. when the bitdepth of the source dib cannot be handled). -*/ -BOOL DLL_CALLCONV -FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib) { - if (!FreeImage_HasPixels(dib)) return FALSE; - - if ((FreeImage_GetBPP(dib) != 32) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) { - return FALSE; - } - - int width = FreeImage_GetWidth(dib); - int height = FreeImage_GetHeight(dib); - - for(int y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(dib, y); - for (int x = 0; x < width; x++, bits += 4) { - const BYTE alpha = bits[FI_RGBA_ALPHA]; - // slightly faster: care for two special cases - if(alpha == 0x00) { - // special case for alpha == 0x00 - // color * 0x00 / 0xFF = 0x00 - bits[FI_RGBA_BLUE] = 0x00; - bits[FI_RGBA_GREEN] = 0x00; - bits[FI_RGBA_RED] = 0x00; - } else if(alpha == 0xFF) { - // nothing to do for alpha == 0xFF - // color * 0xFF / 0xFF = color - continue; - } else { - bits[FI_RGBA_BLUE] = (BYTE)( (alpha * (WORD)bits[FI_RGBA_BLUE] + 127) / 255 ); - bits[FI_RGBA_GREEN] = (BYTE)( (alpha * (WORD)bits[FI_RGBA_GREEN] + 127) / 255 ); - bits[FI_RGBA_RED] = (BYTE)( (alpha * (WORD)bits[FI_RGBA_RED] + 127) / 255 ); - } - } - } - return TRUE; -} - diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/Filters.h b/Dependencies/FreeImage/Source/FreeImageToolkit/Filters.h deleted file mode 100644 index 7a45c49..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/Filters.h +++ /dev/null @@ -1,287 +0,0 @@ -// ========================================================== -// Upsampling / downsampling filters -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifndef _FILTERS_H_ -#define _FILTERS_H_ - -/** - CGenericFilter is a generic abstract filter class used to access to the filter library.
- Filters used in this library have been mainly taken from the following references :
-Main reference :
-Paul Heckbert, C code to zoom raster images up or down, with nice filtering. -UC Berkeley, August 1989. [online] http://www-2.cs.cmu.edu/afs/cs.cmu.edu/Web/People/ph/heckbert.html - -Heckbert references :
-
    -
  • Oppenheim A.V., Schafer R.W., Digital Signal Processing, Prentice-Hall, 1975 -
  • Hamming R.W., Digital Filters, Prentice-Hall, Englewood Cliffs, NJ, 1983 -
  • Pratt W.K., Digital Image Processing, John Wiley and Sons, 1978 -
  • Hou H.S., Andrews H.C., "Cubic Splines for Image Interpolation and Digital Filtering", -IEEE Trans. Acoustics, Speech, and Signal Proc., vol. ASSP-26, no. 6, pp. 508-517, Dec. 1978. -
- -*/ -class CGenericFilter -{ -protected: - - #define FILTER_PI double (3.1415926535897932384626433832795) - #define FILTER_2PI double (2.0 * 3.1415926535897932384626433832795) - #define FILTER_4PI double (4.0 * 3.1415926535897932384626433832795) - - /// Filter support - double m_dWidth; - -public: - - /// Constructor - CGenericFilter (double dWidth) : m_dWidth (dWidth) {} - /// Destructor - virtual ~CGenericFilter() {} - - /// Returns the filter support - double GetWidth() { return m_dWidth; } - /// Change the filter suport - void SetWidth (double dWidth) { m_dWidth = dWidth; } - - /// Returns F(dVal) where F is the filter's impulse response - virtual double Filter (double dVal) = 0; -}; - -// ----------------------------------------------------------------------------------- -// Filters library -// All filters are centered on 0 -// ----------------------------------------------------------------------------------- - -/** - Box filter
- Box, pulse, Fourier window, 1st order (constant) b-spline.

- - Reference :
- Glassner A.S., Principles of digital image synthesis. Morgan Kaufmann Publishers, Inc, San Francisco, Vol. 2, 1995 -*/ -class CBoxFilter : public CGenericFilter -{ -public: - /** - Constructor
- Default fixed width = 0.5 - */ - CBoxFilter() : CGenericFilter(0.5) {} - virtual ~CBoxFilter() {} - - double Filter (double dVal) { return (fabs(dVal) <= m_dWidth ? 1.0 : 0.0); } -}; - -/** Bilinear filter -*/ -class CBilinearFilter : public CGenericFilter -{ -public: - - CBilinearFilter () : CGenericFilter(1) {} - virtual ~CBilinearFilter() {} - - double Filter (double dVal) { - dVal = fabs(dVal); - return (dVal < m_dWidth ? m_dWidth - dVal : 0.0); - } -}; - - -/** - Mitchell & Netravali's two-param cubic filter
- - The parameters b and c can be used to adjust the properties of the cubic. - They are sometimes referred to as "blurring" and "ringing" respectively. - The default is b = 1/3 and c = 1/3, which were the values recommended by - Mitchell and Netravali as yielding the most visually pleasing results in subjective tests of human beings. - Larger values of b and c can produce interesting op-art effects--for example, try b = 0 and c = -5.

- - Reference :
- Don P. Mitchell and Arun N. Netravali, Reconstruction filters in computer graphics. - In John Dill, editor, Computer Graphics (SIGGRAPH '88 Proceedings), Vol. 22, No. 4, August 1988, pp. 221-228. -*/ -class CBicubicFilter : public CGenericFilter -{ -protected: - // data for parameterized Mitchell filter - double p0, p2, p3; - double q0, q1, q2, q3; - -public: - /** - Constructor
- Default fixed width = 2 - @param b Filter parameter (default value is 1/3) - @param c Filter parameter (default value is 1/3) - */ - CBicubicFilter (double b = (1/(double)3), double c = (1/(double)3)) : CGenericFilter(2) { - p0 = (6 - 2*b) / 6; - p2 = (-18 + 12*b + 6*c) / 6; - p3 = (12 - 9*b - 6*c) / 6; - q0 = (8*b + 24*c) / 6; - q1 = (-12*b - 48*c) / 6; - q2 = (6*b + 30*c) / 6; - q3 = (-b - 6*c) / 6; - } - virtual ~CBicubicFilter() {} - - double Filter(double dVal) { - dVal = fabs(dVal); - if(dVal < 1) - return (p0 + dVal*dVal*(p2 + dVal*p3)); - if(dVal < 2) - return (q0 + dVal*(q1 + dVal*(q2 + dVal*q3))); - return 0; - } -}; - -/** - Catmull-Rom spline, Overhauser spline
- - When using CBicubicFilter filters, you have to set parameters b and c such that
- b + 2 * c = 1
- in order to use the numerically most accurate filter.
- This gives for b = 0 the maximum value for c = 0.5, which is the Catmull-Rom - spline and a good suggestion for sharpness.

- - - References :
-
    -
  • Mitchell Don P., Netravali Arun N., Reconstruction filters in computer graphics. - In John Dill, editor, Computer Graphics (SIGGRAPH '88 Proceedings), Vol. 22, No. 4, August 1988, pp. 221-228. -
  • Keys R.G., Cubic Convolution Interpolation for Digital Image Processing. - IEEE Trans. Acoustics, Speech, and Signal Processing, vol. 29, no. 6, pp. 1153-1160, Dec. 1981. -
- -*/ -class CCatmullRomFilter : public CGenericFilter -{ -public: - - /** - Constructor
- Default fixed width = 2 - */ - CCatmullRomFilter() : CGenericFilter(2) {} - virtual ~CCatmullRomFilter() {} - - double Filter(double dVal) { - if(dVal < -2) return 0; - if(dVal < -1) return (0.5*(4 + dVal*(8 + dVal*(5 + dVal)))); - if(dVal < 0) return (0.5*(2 + dVal*dVal*(-5 - 3*dVal))); - if(dVal < 1) return (0.5*(2 + dVal*dVal*(-5 + 3*dVal))); - if(dVal < 2) return (0.5*(4 + dVal*(-8 + dVal*(5 - dVal)))); - return 0; - } -}; - -/** - Lanczos-windowed sinc filter
- - Lanczos3 filter is an alternative to CBicubicFilter with high values of c about 0.6 ... 0.75 - which produces quite strong sharpening. It usually offers better quality (fewer artifacts) and a sharp image.

- -*/ -class CLanczos3Filter : public CGenericFilter -{ -public: - /** - Constructor
- Default fixed width = 3 - */ - CLanczos3Filter() : CGenericFilter(3) {} - virtual ~CLanczos3Filter() {} - - double Filter(double dVal) { - dVal = fabs(dVal); - if(dVal < m_dWidth) { - return (sinc(dVal) * sinc(dVal / m_dWidth)); - } - return 0; - } - -private: - double sinc(double value) { - if(value != 0) { - value *= FILTER_PI; - return (sin(value) / value); - } - return 1; - } -}; - -/** - 4th order (cubic) b-spline
- -*/ -class CBSplineFilter : public CGenericFilter -{ -public: - - /** - Constructor
- Default fixed width = 2 - */ - CBSplineFilter() : CGenericFilter(2) {} - virtual ~CBSplineFilter() {} - - double Filter(double dVal) { - - dVal = fabs(dVal); - if(dVal < 1) return (4 + dVal*dVal*(-6 + 3*dVal)) / 6; - if(dVal < 2) { - double t = 2 - dVal; - return (t*t*t / 6); - } - return 0; - } -}; - -// ----------------------------------------------------------------------------------- -// Window function library -// ----------------------------------------------------------------------------------- - -/** - Blackman window -*/ -class CBlackmanFilter : public CGenericFilter -{ -public: - /** - Constructor
- Default width = 0.5 - */ - CBlackmanFilter (double dWidth = double(0.5)) : CGenericFilter(dWidth) {} - virtual ~CBlackmanFilter() {} - - double Filter (double dVal) { - if(fabs (dVal) > m_dWidth) { - return 0; - } - double dN = 2 * m_dWidth + 1; - dVal /= (dN - 1); - return 0.42 + 0.5*cos(FILTER_2PI*dVal) + 0.08*cos(FILTER_4PI*dVal); - } -}; - -#endif // _FILTERS_H_ diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/Flip.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/Flip.cpp deleted file mode 100644 index c7898a7..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/Flip.cpp +++ /dev/null @@ -1,166 +0,0 @@ -// ========================================================== -// Flipping routines -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Herv Drolon (drolon@infonie.fr) -// - Jim Keir (jimkeir@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" - -/** -Flip the image horizontally along the vertical axis. -@param src Input image to be processed. -@return Returns TRUE if successful, FALSE otherwise. -*/ -BOOL DLL_CALLCONV -FreeImage_FlipHorizontal(FIBITMAP *src) { - if (!FreeImage_HasPixels(src)) return FALSE; - - unsigned line = FreeImage_GetLine(src); - unsigned width = FreeImage_GetWidth(src); - unsigned height = FreeImage_GetHeight(src); - - unsigned bytespp = FreeImage_GetLine(src) / FreeImage_GetWidth(src); - - // copy between aligned memories - BYTE *new_bits = (BYTE*)FreeImage_Aligned_Malloc(line * sizeof(BYTE), FIBITMAP_ALIGNMENT); - if (!new_bits) return FALSE; - - // mirror the buffer - - for (unsigned y = 0; y < height; y++) { - BYTE *bits = FreeImage_GetScanLine(src, y); - memcpy(new_bits, bits, line); - - switch (FreeImage_GetBPP(src)) { - case 1 : - { - for(unsigned x = 0; x < width; x++) { - // get pixel at (x, y) - BOOL value = (new_bits[x >> 3] & (0x80 >> (x & 0x07))) != 0; - // set pixel at (new_x, y) - unsigned new_x = width - 1 - x; - value ? bits[new_x >> 3] |= (0x80 >> (new_x & 0x7)) : bits[new_x >> 3] &= (0xff7f >> (new_x & 0x7)); - } - } - break; - - case 4 : - { - for(unsigned c = 0; c < line; c++) { - bits[c] = new_bits[line - c - 1]; - - BYTE nibble = (bits[c] & 0xF0) >> 4; - - bits[c] = bits[c] << 4; - bits[c] |= nibble; - } - } - break; - - case 8: - { - BYTE *dst_data = (BYTE*) bits; - BYTE *src_data = (BYTE*) (new_bits + line - bytespp); - for(unsigned c = 0; c < width; c++) { - *dst_data++ = *src_data--; - } - } - break; - - case 16: - { - WORD *dst_data = (WORD*) bits; - WORD *src_data = (WORD*) (new_bits + line - bytespp); - for(unsigned c = 0; c < width; c++) { - *dst_data++ = *src_data--; - } - } - break; - - case 24 : - case 32 : - case 48: - case 64: - case 96: - case 128: - { - BYTE *dst_data = (BYTE*) bits; - BYTE *src_data = (BYTE*) (new_bits + line - bytespp); - for(unsigned c = 0; c < width; c++) { - for(unsigned k = 0; k < bytespp; k++) { - *dst_data++ = src_data[k]; - } - src_data -= bytespp; - } - } - break; - - } - } - - FreeImage_Aligned_Free(new_bits); - - return TRUE; -} - - -/** -Flip the image vertically along the horizontal axis. -@param src Input image to be processed. -@return Returns TRUE if successful, FALSE otherwise. -*/ - -BOOL DLL_CALLCONV -FreeImage_FlipVertical(FIBITMAP *src) { - BYTE *From, *Mid; - - if (!FreeImage_HasPixels(src)) return FALSE; - - // swap the buffer - - unsigned pitch = FreeImage_GetPitch(src); - unsigned height = FreeImage_GetHeight(src); - - // copy between aligned memories - Mid = (BYTE*)FreeImage_Aligned_Malloc(pitch * sizeof(BYTE), FIBITMAP_ALIGNMENT); - if (!Mid) return FALSE; - - From = FreeImage_GetBits(src); - - unsigned line_s = 0; - unsigned line_t = (height-1) * pitch; - - for(unsigned y = 0; y < height/2; y++) { - - memcpy(Mid, From + line_s, pitch); - memcpy(From + line_s, From + line_t, pitch); - memcpy(From + line_t, Mid, pitch); - - line_s += pitch; - line_t -= pitch; - - } - - FreeImage_Aligned_Free(Mid); - - return TRUE; -} - diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp deleted file mode 100644 index 6f9ba8e..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp +++ /dev/null @@ -1,623 +0,0 @@ -// ========================================================== -// JPEG lossless transformations -// -// Design and implementation by -// - Petr Pytelka (pyta@lightcomp.com) -// - Hervé Drolon (drolon@infonie.fr) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -extern "C" { -#define XMD_H -#undef FAR -#include - -#include "../LibJPEG/jinclude.h" -#include "../LibJPEG/jpeglib.h" -#include "../LibJPEG/jerror.h" -#include "../LibJPEG/transupp.h" -} - -#include "FreeImage.h" -#include "Utilities.h" -#include "FreeImageIO.h" - -// ---------------------------------------------------------- -// Source manager & Destination manager setup -// (see PluginJPEG.cpp) -// ---------------------------------------------------------- - -void jpeg_freeimage_src(j_decompress_ptr cinfo, fi_handle infile, FreeImageIO *io); -void jpeg_freeimage_dst(j_compress_ptr cinfo, fi_handle outfile, FreeImageIO *io); - -// ---------------------------------------------------------- -// Error handling -// (see also PluginJPEG.cpp) -// ---------------------------------------------------------- - -/** - Receives control for a fatal error. Information sufficient to - generate the error message has been stored in cinfo->err; call - output_message to display it. Control must NOT return to the caller; - generally this routine will exit() or longjmp() somewhere. -*/ -METHODDEF(void) -ls_jpeg_error_exit (j_common_ptr cinfo) { - // always display the message - (*cinfo->err->output_message)(cinfo); - - // allow JPEG with a premature end of file - if((cinfo)->err->msg_parm.i[0] != 13) { - - // let the memory manager delete any temp files before we die - jpeg_destroy(cinfo); - - throw FIF_JPEG; - } -} - -/** - Actual output of any JPEG message. Note that this method does not know - how to generate a message, only where to send it. -*/ -METHODDEF(void) -ls_jpeg_output_message (j_common_ptr cinfo) { - char buffer[JMSG_LENGTH_MAX]; - - // create the message - (*cinfo->err->format_message)(cinfo, buffer); - // send it to user's message proc - FreeImage_OutputMessageProc(FIF_JPEG, buffer); -} - -// ---------------------------------------------------------- -// Main program -// ---------------------------------------------------------- - -/** -Build a crop string. - -@param crop Output crop string -@param left Specifies the left position of the cropped rectangle -@param top Specifies the top position of the cropped rectangle -@param right Specifies the right position of the cropped rectangle -@param bottom Specifies the bottom position of the cropped rectangle -@param width Image width -@param height Image height -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -getCropString(char* crop, int* left, int* top, int* right, int* bottom, int width, int height) { - if(!left || !top || !right || !bottom) { - return FALSE; - } - - *left = CLAMP(*left, 0, width); - *top = CLAMP(*top, 0, height); - - // negative/zero right and bottom count from the edges inwards - - if(*right <= 0) { - *right = width + *right; - } - if(*bottom <= 0) { - *bottom = height + *bottom; - } - - *right = CLAMP(*right, 0, width); - *bottom = CLAMP(*bottom, 0, height); - - // test for empty rect - - if(((*left - *right) == 0) || ((*top - *bottom) == 0)) { - return FALSE; - } - - // normalize the rectangle - - if(*right < *left) { - INPLACESWAP(*left, *right); - } - if(*bottom < *top) { - INPLACESWAP(*top, *bottom); - } - - // test for "noop" rect - - if(*left == 0 && *right == width && *top == 0 && *bottom == height) { - return FALSE; - } - - // build the crop option - sprintf(crop, "%dx%d+%d+%d", *right - *left, *bottom - *top, *left, *top); - - return TRUE; -} - -static BOOL -JPEGTransformFromHandle(FreeImageIO* src_io, fi_handle src_handle, FreeImageIO* dst_io, fi_handle dst_handle, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect) { - const BOOL onlyReturnCropRect = (dst_io == NULL) || (dst_handle == NULL); - const long stream_start = onlyReturnCropRect ? 0 : dst_io->tell_proc(dst_handle); - BOOL swappedDim = FALSE; - BOOL trimH = FALSE; - BOOL trimV = FALSE; - - // Set up the jpeglib structures - jpeg_decompress_struct srcinfo; - jpeg_compress_struct dstinfo; - jpeg_error_mgr jsrcerr, jdsterr; - jvirt_barray_ptr *src_coef_arrays = NULL; - jvirt_barray_ptr *dst_coef_arrays = NULL; - // Support for copying optional markers from source to destination file - JCOPY_OPTION copyoption; - // Image transformation options - jpeg_transform_info transfoptions; - - // Initialize structures - memset(&srcinfo, 0, sizeof(srcinfo)); - memset(&jsrcerr, 0, sizeof(jsrcerr)); - memset(&jdsterr, 0, sizeof(jdsterr)); - memset(&dstinfo, 0, sizeof(dstinfo)); - memset(&transfoptions, 0, sizeof(transfoptions)); - - // Copy all extra markers from source file - copyoption = JCOPYOPT_ALL; - - // Set up default JPEG parameters - transfoptions.force_grayscale = FALSE; - transfoptions.crop = FALSE; - - // Select the transform option - switch(operation) { - case FIJPEG_OP_FLIP_H: // horizontal flip - transfoptions.transform = JXFORM_FLIP_H; - trimH = TRUE; - break; - case FIJPEG_OP_FLIP_V: // vertical flip - transfoptions.transform = JXFORM_FLIP_V; - trimV = TRUE; - break; - case FIJPEG_OP_TRANSPOSE: // transpose across UL-to-LR axis - transfoptions.transform = JXFORM_TRANSPOSE; - swappedDim = TRUE; - break; - case FIJPEG_OP_TRANSVERSE: // transpose across UR-to-LL axis - transfoptions.transform = JXFORM_TRANSVERSE; - trimH = TRUE; - trimV = TRUE; - swappedDim = TRUE; - break; - case FIJPEG_OP_ROTATE_90: // 90-degree clockwise rotation - transfoptions.transform = JXFORM_ROT_90; - trimH = TRUE; - swappedDim = TRUE; - break; - case FIJPEG_OP_ROTATE_180: // 180-degree rotation - trimH = TRUE; - trimV = TRUE; - transfoptions.transform = JXFORM_ROT_180; - break; - case FIJPEG_OP_ROTATE_270: // 270-degree clockwise (or 90 ccw) - transfoptions.transform = JXFORM_ROT_270; - trimV = TRUE; - swappedDim = TRUE; - break; - default: - case FIJPEG_OP_NONE: // no transformation - transfoptions.transform = JXFORM_NONE; - break; - } - // (perfect == TRUE) ==> fail if there is non-transformable edge blocks - transfoptions.perfect = (perfect == TRUE) ? TRUE : FALSE; - // Drop non-transformable edge blocks: trim off any partial edge MCUs that the transform can't handle. - transfoptions.trim = TRUE; - - try { - - // Initialize the JPEG decompression object with default error handling - srcinfo.err = jpeg_std_error(&jsrcerr); - srcinfo.err->error_exit = ls_jpeg_error_exit; - srcinfo.err->output_message = ls_jpeg_output_message; - jpeg_create_decompress(&srcinfo); - - // Initialize the JPEG compression object with default error handling - dstinfo.err = jpeg_std_error(&jdsterr); - dstinfo.err->error_exit = ls_jpeg_error_exit; - dstinfo.err->output_message = ls_jpeg_output_message; - jpeg_create_compress(&dstinfo); - - // Specify data source for decompression - jpeg_freeimage_src(&srcinfo, src_handle, src_io); - - // Enable saving of extra markers that we want to copy - jcopy_markers_setup(&srcinfo, copyoption); - - // Read the file header - jpeg_read_header(&srcinfo, TRUE); - - // crop option - char crop[64]; - const BOOL hasCrop = getCropString(crop, left, top, right, bottom, swappedDim ? srcinfo.image_height : srcinfo.image_width, swappedDim ? srcinfo.image_width : srcinfo.image_height); - - if(hasCrop) { - if(!jtransform_parse_crop_spec(&transfoptions, crop)) { - FreeImage_OutputMessageProc(FIF_JPEG, "Bogus crop argument %s", crop); - throw(1); - } - } - - // Any space needed by a transform option must be requested before - // jpeg_read_coefficients so that memory allocation will be done right - - // Prepare transformation workspace - // Fails right away if perfect flag is TRUE and transformation is not perfect - if( !jtransform_request_workspace(&srcinfo, &transfoptions) ) { - FreeImage_OutputMessageProc(FIF_JPEG, "Transformation is not perfect"); - throw(1); - } - - if(left || top) { - // compute left and top offsets, it's a bit tricky, taking into account both - // transform, which might have trimed the image, - // and crop itself, which is adjusted to lie on a iMCU boundary - - const int fullWidth = swappedDim ? srcinfo.image_height : srcinfo.image_width; - const int fullHeight = swappedDim ? srcinfo.image_width : srcinfo.image_height; - - int transformedFullWidth = fullWidth; - int transformedFullHeight = fullHeight; - - if(trimH && transformedFullWidth/transfoptions.iMCU_sample_width > 0) { - transformedFullWidth = (transformedFullWidth/transfoptions.iMCU_sample_width) * transfoptions.iMCU_sample_width; - } - if(trimV && transformedFullHeight/transfoptions.iMCU_sample_height > 0) { - transformedFullHeight = (transformedFullHeight/transfoptions.iMCU_sample_height) * transfoptions.iMCU_sample_height; - } - - const int trimmedWidth = fullWidth - transformedFullWidth; - const int trimmedHeight = fullHeight - transformedFullHeight; - - if(left) { - *left = trimmedWidth + transfoptions.x_crop_offset * transfoptions.iMCU_sample_width; - } - if(top) { - *top = trimmedHeight + transfoptions.y_crop_offset * transfoptions.iMCU_sample_height; - } - } - - if(right) { - *right = (left ? *left : 0) + transfoptions.output_width; - } - if(bottom) { - *bottom = (top ? *top : 0) + transfoptions.output_height; - } - - // if only the crop rect is requested, we are done - - if(onlyReturnCropRect) { - jpeg_destroy_compress(&dstinfo); - jpeg_destroy_decompress(&srcinfo); - return TRUE; - } - - // Read source file as DCT coefficients - src_coef_arrays = jpeg_read_coefficients(&srcinfo); - - // Initialize destination compression parameters from source values - jpeg_copy_critical_parameters(&srcinfo, &dstinfo); - - // Adjust destination parameters if required by transform options; - // also find out which set of coefficient arrays will hold the output - dst_coef_arrays = jtransform_adjust_parameters(&srcinfo, &dstinfo, src_coef_arrays, &transfoptions); - - // Note: we assume that jpeg_read_coefficients consumed all input - // until JPEG_REACHED_EOI, and that jpeg_finish_decompress will - // only consume more while (! cinfo->inputctl->eoi_reached). - // We cannot call jpeg_finish_decompress here since we still need the - // virtual arrays allocated from the source object for processing. - - if(src_handle == dst_handle) { - dst_io->seek_proc(dst_handle, stream_start, SEEK_SET); - } - - // Specify data destination for compression - jpeg_freeimage_dst(&dstinfo, dst_handle, dst_io); - - // Start compressor (note no image data is actually written here) - jpeg_write_coefficients(&dstinfo, dst_coef_arrays); - - // Copy to the output file any extra markers that we want to preserve - jcopy_markers_execute(&srcinfo, &dstinfo, copyoption); - - // Execute image transformation, if any - jtransform_execute_transformation(&srcinfo, &dstinfo, src_coef_arrays, &transfoptions); - - // Finish compression and release memory - jpeg_finish_compress(&dstinfo); - jpeg_destroy_compress(&dstinfo); - jpeg_finish_decompress(&srcinfo); - jpeg_destroy_decompress(&srcinfo); - - } - catch(...) { - jpeg_destroy_compress(&dstinfo); - jpeg_destroy_decompress(&srcinfo); - return FALSE; - } - - return TRUE; -} - -// ---------------------------------------------------------- -// FreeImage interface -// ---------------------------------------------------------- - -BOOL DLL_CALLCONV -FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, fi_handle src_handle, FreeImageIO* dst_io, fi_handle dst_handle, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect) { - return JPEGTransformFromHandle(src_io, src_handle, dst_io, dst_handle, operation, left, top, right, bottom, perfect); -} - -static void -closeStdIO(fi_handle src_handle, fi_handle dst_handle) { - if(src_handle) { - fclose((FILE*)src_handle); - } - if(dst_handle && (dst_handle != src_handle)) { - fclose((FILE*)dst_handle); - } -} - -static BOOL -openStdIO(const char* src_file, const char* dst_file, FreeImageIO* dst_io, fi_handle* src_handle, fi_handle* dst_handle) { - *src_handle = NULL; - *dst_handle = NULL; - - FreeImageIO io; - SetDefaultIO (&io); - - const BOOL isSameFile = (dst_file && (strcmp(src_file, dst_file) == 0)) ? TRUE : FALSE; - - FILE* srcp = NULL; - FILE* dstp = NULL; - - if(isSameFile) { - srcp = fopen(src_file, "r+b"); - dstp = srcp; - } - else { - srcp = fopen(src_file, "rb"); - if(dst_file) { - dstp = fopen(dst_file, "wb"); - } - } - - if(!srcp || (dst_file && !dstp)) { - if(!srcp) { - FreeImage_OutputMessageProc(FIF_JPEG, "Cannot open \"%s\" for reading", src_file); - } else { - FreeImage_OutputMessageProc(FIF_JPEG, "Cannot open \"%s\" for writing", dst_file); - } - closeStdIO(srcp, dstp); - return FALSE; - } - - if(FreeImage_GetFileTypeFromHandle(&io, srcp) != FIF_JPEG) { - FreeImage_OutputMessageProc(FIF_JPEG, " Source file \"%s\" is not jpeg", src_file); - closeStdIO(srcp, dstp); - return FALSE; - } - - *dst_io = io; - *src_handle = srcp; - *dst_handle = dstp; - - return TRUE; -} - -static BOOL -openStdIOU(const wchar_t* src_file, const wchar_t* dst_file, FreeImageIO* dst_io, fi_handle* src_handle, fi_handle* dst_handle) { -#ifdef _WIN32 - - *src_handle = NULL; - *dst_handle = NULL; - - FreeImageIO io; - SetDefaultIO (&io); - - const BOOL isSameFile = (dst_file && (wcscmp(src_file, dst_file) == 0)) ? TRUE : FALSE; - - FILE* srcp = NULL; - FILE* dstp = NULL; - - if(isSameFile) { - srcp = _wfopen(src_file, L"r+b"); - dstp = srcp; - } else { - srcp = _wfopen(src_file, L"rb"); - if(dst_file) { - dstp = _wfopen(dst_file, L"wb"); - } - } - - if(!srcp || (dst_file && !dstp)) { - if(!srcp) { - FreeImage_OutputMessageProc(FIF_JPEG, "Cannot open source file for reading"); - } else { - FreeImage_OutputMessageProc(FIF_JPEG, "Cannot open destination file for writing"); - } - closeStdIO(srcp, dstp); - return FALSE; - } - - if(FreeImage_GetFileTypeFromHandle(&io, srcp) != FIF_JPEG) { - FreeImage_OutputMessageProc(FIF_JPEG, " Source file is not jpeg"); - closeStdIO(srcp, dstp); - return FALSE; - } - - *dst_io = io; - *src_handle = srcp; - *dst_handle = dstp; - - return TRUE; - -#else - return FALSE; -#endif // _WIN32 -} - -BOOL DLL_CALLCONV -FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect) { - FreeImageIO io; - fi_handle src; - fi_handle dst; - - if(!openStdIO(src_file, dst_file, &io, &src, &dst)) { - return FALSE; - } - - BOOL ret = JPEGTransformFromHandle(&io, src, &io, dst, operation, NULL, NULL, NULL, NULL, perfect); - - closeStdIO(src, dst); - - return ret; -} - -BOOL DLL_CALLCONV -FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom) { - FreeImageIO io; - fi_handle src; - fi_handle dst; - - if(!openStdIO(src_file, dst_file, &io, &src, &dst)) { - return FALSE; - } - - BOOL ret = FreeImage_JPEGTransformFromHandle(&io, src, &io, dst, FIJPEG_OP_NONE, &left, &top, &right, &bottom, FALSE); - - closeStdIO(src, dst); - - return ret; -} - -BOOL DLL_CALLCONV -FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect) { - FreeImageIO io; - fi_handle src; - fi_handle dst; - - if(!openStdIOU(src_file, dst_file, &io, &src, &dst)) { - return FALSE; - } - - BOOL ret = JPEGTransformFromHandle(&io, src, &io, dst, operation, NULL, NULL, NULL, NULL, perfect); - - closeStdIO(src, dst); - - return ret; -} - -BOOL DLL_CALLCONV -FreeImage_JPEGCropU(const wchar_t *src_file, const wchar_t *dst_file, int left, int top, int right, int bottom) { - FreeImageIO io; - fi_handle src; - fi_handle dst; - - if(!openStdIOU(src_file, dst_file, &io, &src, &dst)) { - return FALSE; - } - - BOOL ret = FreeImage_JPEGTransformFromHandle(&io, src, &io, dst, FIJPEG_OP_NONE, &left, &top, &right, &bottom, FALSE); - - closeStdIO(src, dst); - - return ret; -} - -BOOL DLL_CALLCONV -FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect) { - FreeImageIO io; - fi_handle src; - fi_handle dst; - - if(!openStdIO(src_file, dst_file, &io, &src, &dst)) { - return FALSE; - } - - BOOL ret = FreeImage_JPEGTransformFromHandle(&io, src, &io, dst, operation, left, top, right, bottom, perfect); - - closeStdIO(src, dst); - - return ret; -} - -BOOL DLL_CALLCONV -FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect) { - FreeImageIO io; - fi_handle src; - fi_handle dst; - - if(!openStdIOU(src_file, dst_file, &io, &src, &dst)) { - return FALSE; - } - - BOOL ret = FreeImage_JPEGTransformFromHandle(&io, src, &io, dst, operation, left, top, right, bottom, perfect); - - closeStdIO(src, dst); - - return ret; -} - -// -------------------------------------------------------------------------- - -static BOOL -getMemIO(FIMEMORY* src_stream, FIMEMORY* dst_stream, FreeImageIO* dst_io, fi_handle* src_handle, fi_handle* dst_handle) { - *src_handle = NULL; - *dst_handle = NULL; - - FreeImageIO io; - SetMemoryIO (&io); - - if(dst_stream) { - FIMEMORYHEADER *mem_header = (FIMEMORYHEADER*)(dst_stream->data); - if(mem_header->delete_me != TRUE) { - // do not save in a user buffer - FreeImage_OutputMessageProc(FIF_JPEG, "Destination memory buffer is read only"); - return FALSE; - } - } - - *dst_io = io; - *src_handle = src_stream; - *dst_handle = dst_stream; - - return TRUE; -} - -BOOL DLL_CALLCONV -FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect) { - FreeImageIO io; - fi_handle src; - fi_handle dst; - - if(!getMemIO(src_stream, dst_stream, &io, &src, &dst)) { - return FALSE; - } - - return FreeImage_JPEGTransformFromHandle(&io, src, &io, dst, operation, left, top, right, bottom, perfect); -} - diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp deleted file mode 100644 index 3b577cb..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp +++ /dev/null @@ -1,505 +0,0 @@ -// ========================================================== -// Poisson solver based on a full multigrid algorithm -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// Reference: -// PRESS, W. H., TEUKOLSKY, S. A., VETTERLING, W. T., AND FLANNERY, B. P. -// 1992. Numerical Recipes in C: The Art of Scientific Computing, 2nd ed. Cambridge University Press. -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "ToneMapping.h" - -static const int NPRE = 1; // Number of relaxation sweeps before ... -static const int NPOST = 1; // ... and after the coarse-grid correction is computed -static const int NGMAX = 15; // Maximum number of grids - -/** -Copy src into dst -*/ -static inline void fmg_copyArray(FIBITMAP *dst, FIBITMAP *src) { - memcpy(FreeImage_GetBits(dst), FreeImage_GetBits(src), FreeImage_GetHeight(dst) * FreeImage_GetPitch(dst)); -} - -/** -Fills src with zeros -*/ -static inline void fmg_fillArrayWithZeros(FIBITMAP *src) { - memset(FreeImage_GetBits(src), 0, FreeImage_GetHeight(src) * FreeImage_GetPitch(src)); -} - -/** -Half-weighting restriction. nc is the coarse-grid dimension. The fine-grid solution is input in -uf[0..2*nc-2][0..2*nc-2], the coarse-grid solution is returned in uc[0..nc-1][0..nc-1]. -*/ -static void fmg_restrict(FIBITMAP *UC, FIBITMAP *UF, int nc) { - int row_uc, row_uf, col_uc, col_uf; - - const int uc_pitch = FreeImage_GetPitch(UC) / sizeof(float); - const int uf_pitch = FreeImage_GetPitch(UF) / sizeof(float); - - float *uc_bits = (float*)FreeImage_GetBits(UC); - const float *uf_bits = (float*)FreeImage_GetBits(UF); - - // interior points - { - float *uc_scan = uc_bits + uc_pitch; - for (row_uc = 1, row_uf = 2; row_uc < nc-1; row_uc++, row_uf += 2) { - const float *uf_scan = uf_bits + row_uf * uf_pitch; - for (col_uc = 1, col_uf = 2; col_uc < nc-1; col_uc++, col_uf += 2) { - // calculate - // UC(row_uc, col_uc) = - // 0.5 * UF(row_uf, col_uf) + 0.125 * [ UF(row_uf+1, col_uf) + UF(row_uf-1, col_uf) + UF(row_uf, col_uf+1) + UF(row_uf, col_uf-1) ] - float *uc_pixel = uc_scan + col_uc; - const float *uf_center = uf_scan + col_uf; - *uc_pixel = 0.5F * *uf_center + 0.125F * ( *(uf_center + uf_pitch) + *(uf_center - uf_pitch) + *(uf_center + 1) + *(uf_center - 1) ); - } - uc_scan += uc_pitch; - } - } - // boundary points - const int ncc = 2*nc-1; - { - /* - calculate the following: - for (row_uc = 0, row_uf = 0; row_uc < nc; row_uc++, row_uf += 2) { - UC(row_uc, 0) = UF(row_uf, 0); - UC(row_uc, nc-1) = UF(row_uf, ncc-1); - } - */ - float *uc_scan = uc_bits; - for (row_uc = 0, row_uf = 0; row_uc < nc; row_uc++, row_uf += 2) { - const float *uf_scan = uf_bits + row_uf * uf_pitch; - uc_scan[0] = uf_scan[0]; - uc_scan[nc-1] = uf_scan[ncc-1]; - uc_scan += uc_pitch; - } - } - { - /* - calculate the following: - for (col_uc = 0, col_uf = 0; col_uc < nc; col_uc++, col_uf += 2) { - UC(0, col_uc) = UF(0, col_uf); - UC(nc-1, col_uc) = UF(ncc-1, col_uf); - } - */ - float *uc_scan_top = uc_bits; - float *uc_scan_bottom = uc_bits + (nc-1)*uc_pitch; - const float *uf_scan_top = uf_bits + (ncc-1)*uf_pitch; - const float *uf_scan_bottom = uf_bits; - for (col_uc = 0, col_uf = 0; col_uc < nc; col_uc++, col_uf += 2) { - uc_scan_top[col_uc] = uf_scan_top[col_uf]; - uc_scan_bottom[col_uc] = uf_scan_bottom[col_uf]; - } - } -} - -/** -Solution of the model problem on the coarsest grid, where h = 1/2 . -The right-hand side is input -in rhs[0..2][0..2] and the solution is returned in u[0..2][0..2]. -*/ -static void fmg_solve(FIBITMAP *U, FIBITMAP *RHS) { - // fill U with zeros - fmg_fillArrayWithZeros(U); - // calculate U(1, 1) = -h*h*RHS(1, 1)/4.0 where h = 1/2 - float *u_scan = (float*)FreeImage_GetScanLine(U, 1); - const float *rhs_scan = (float*)FreeImage_GetScanLine(RHS, 1); - u_scan[1] = -rhs_scan[1] / 16; -} - -/** -Coarse-to-fine prolongation by bilinear interpolation. nf is the fine-grid dimension. The coarsegrid -solution is input as uc[0..nc-1][0..nc-1], where nc = nf/2 + 1. The fine-grid solution is -returned in uf[0..nf-1][0..nf-1]. -*/ -static void fmg_prolongate(FIBITMAP *UF, FIBITMAP *UC, int nf) { - int row_uc, row_uf, col_uc, col_uf; - - const int uf_pitch = FreeImage_GetPitch(UF) / sizeof(float); - const int uc_pitch = FreeImage_GetPitch(UC) / sizeof(float); - - float *uf_bits = (float*)FreeImage_GetBits(UF); - const float *uc_bits = (float*)FreeImage_GetBits(UC); - - // do elements that are copies - { - const int nc = nf/2 + 1; - - float *uf_scan = uf_bits; - const float *uc_scan = uc_bits; - for (row_uc = 0; row_uc < nc; row_uc++) { - for (col_uc = 0, col_uf = 0; col_uc < nc; col_uc++, col_uf += 2) { - // calculate UF(2*row_uc, col_uf) = UC(row_uc, col_uc); - uf_scan[col_uf] = uc_scan[col_uc]; - } - uc_scan += uc_pitch; - uf_scan += 2 * uf_pitch; - } - } - // do odd-numbered columns, interpolating vertically - { - for(row_uf = 1; row_uf < nf-1; row_uf += 2) { - float *uf_scan = uf_bits + row_uf * uf_pitch; - for (col_uf = 0; col_uf < nf; col_uf += 2) { - // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf+1, col_uf) + UF(row_uf-1, col_uf) ) - uf_scan[col_uf] = 0.5F * ( *(uf_scan + uf_pitch + col_uf) + *(uf_scan - uf_pitch + col_uf) ); - } - } - } - // do even-numbered columns, interpolating horizontally - { - float *uf_scan = uf_bits; - for(row_uf = 0; row_uf < nf; row_uf++) { - for (col_uf = 1; col_uf < nf-1; col_uf += 2) { - // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf, col_uf+1) + UF(row_uf, col_uf-1) ) - uf_scan[col_uf] = 0.5F * ( uf_scan[col_uf + 1] + uf_scan[col_uf - 1] ); - } - uf_scan += uf_pitch; - } - } -} - -/** -Red-black Gauss-Seidel relaxation for model problem. Updates the current value of the solution -u[0..n-1][0..n-1], using the right-hand side function rhs[0..n-1][0..n-1]. -*/ -static void fmg_relaxation(FIBITMAP *U, FIBITMAP *RHS, int n) { - int row, col, ipass, isw, jsw; - const float h = 1.0F / (n - 1); - const float h2 = h*h; - - const int u_pitch = FreeImage_GetPitch(U) / sizeof(float); - const int rhs_pitch = FreeImage_GetPitch(RHS) / sizeof(float); - - float *u_bits = (float*)FreeImage_GetBits(U); - const float *rhs_bits = (float*)FreeImage_GetBits(RHS); - - for (ipass = 0, jsw = 1; ipass < 2; ipass++, jsw = 3-jsw) { // Red and black sweeps - float *u_scan = u_bits + u_pitch; - const float *rhs_scan = rhs_bits + rhs_pitch; - for (row = 1, isw = jsw; row < n-1; row++, isw = 3-isw) { - for (col = isw; col < n-1; col += 2) { - // Gauss-Seidel formula - // calculate U(row, col) = - // 0.25 * [ U(row+1, col) + U(row-1, col) + U(row, col+1) + U(row, col-1) - h2 * RHS(row, col) ] - float *u_center = u_scan + col; - const float *rhs_center = rhs_scan + col; - *u_center = *(u_center + u_pitch) + *(u_center - u_pitch) + *(u_center + 1) + *(u_center - 1); - *u_center -= h2 * *rhs_center; - *u_center *= 0.25F; - } - u_scan += u_pitch; - rhs_scan += rhs_pitch; - } - } -} - -/** -Returns minus the residual for the model problem. Input quantities are u[0..n-1][0..n-1] and -rhs[0..n-1][0..n-1], while res[0..n-1][0..n-1] is returned. -*/ -static void fmg_residual(FIBITMAP *RES, FIBITMAP *U, FIBITMAP *RHS, int n) { - int row, col; - - const float h = 1.0F / (n-1); - const float h2i = 1.0F / (h*h); - - const int res_pitch = FreeImage_GetPitch(RES) / sizeof(float); - const int u_pitch = FreeImage_GetPitch(U) / sizeof(float); - const int rhs_pitch = FreeImage_GetPitch(RHS) / sizeof(float); - - float *res_bits = (float*)FreeImage_GetBits(RES); - const float *u_bits = (float*)FreeImage_GetBits(U); - const float *rhs_bits = (float*)FreeImage_GetBits(RHS); - - // interior points - { - float *res_scan = res_bits + res_pitch; - const float *u_scan = u_bits + u_pitch; - const float *rhs_scan = rhs_bits + rhs_pitch; - for (row = 1; row < n-1; row++) { - for (col = 1; col < n-1; col++) { - // calculate RES(row, col) = - // -h2i * [ U(row+1, col) + U(row-1, col) + U(row, col+1) + U(row, col-1) - 4 * U(row, col) ] + RHS(row, col); - float *res_center = res_scan + col; - const float *u_center = u_scan + col; - const float *rhs_center = rhs_scan + col; - *res_center = *(u_center + u_pitch) + *(u_center - u_pitch) + *(u_center + 1) + *(u_center - 1) - 4 * *u_center; - *res_center *= -h2i; - *res_center += *rhs_center; - } - res_scan += res_pitch; - u_scan += u_pitch; - rhs_scan += rhs_pitch; - } - } - - // boundary points - { - memset(FreeImage_GetScanLine(RES, 0), 0, FreeImage_GetPitch(RES)); - memset(FreeImage_GetScanLine(RES, n-1), 0, FreeImage_GetPitch(RES)); - float *left = res_bits; - float *right = res_bits + (n-1); - for(int k = 0; k < n; k++) { - *left = 0; - *right = 0; - left += res_pitch; - right += res_pitch; - } - } -} - -/** -Does coarse-to-fine interpolation and adds result to uf. nf is the fine-grid dimension. The -coarse-grid solution is input as uc[0..nc-1][0..nc-1], where nc = nf/2+1. The fine-grid solution -is returned in uf[0..nf-1][0..nf-1]. res[0..nf-1][0..nf-1] is used for temporary storage. -*/ -static void fmg_addint(FIBITMAP *UF, FIBITMAP *UC, FIBITMAP *RES, int nf) { - fmg_prolongate(RES, UC, nf); - - const int uf_pitch = FreeImage_GetPitch(UF) / sizeof(float); - const int res_pitch = FreeImage_GetPitch(RES) / sizeof(float); - - float *uf_bits = (float*)FreeImage_GetBits(UF); - const float *res_bits = (float*)FreeImage_GetBits(RES); - - for(int row = 0; row < nf; row++) { - for(int col = 0; col < nf; col++) { - // calculate UF(row, col) = UF(row, col) + RES(row, col); - uf_bits[col] += res_bits[col]; - } - uf_bits += uf_pitch; - res_bits += res_pitch; - } -} - -/** -Full Multigrid Algorithm for solution of linear elliptic equation, here the model problem (19.0.6). -On input u[0..n-1][0..n-1] contains the right-hand side , while on output it returns the solution. -The dimension n must be of the form 2^j + 1 for some integer j. (j is actually the number of -grid levels used in the solution, called ng below.) ncycle is the number of V-cycles to be -used at each level. -*/ -static BOOL fmg_mglin(FIBITMAP *U, int n, int ncycle) { - int j, jcycle, jj, jpost, jpre, nf, ngrid; - - FIBITMAP **IRHO = NULL; - FIBITMAP **IU = NULL; - FIBITMAP **IRHS = NULL; - FIBITMAP **IRES = NULL; - - int ng = 0; // number of allocated grids - -// -------------------------------------------------------------------------- - -#define _CREATE_ARRAY_GRID_(array, array_size) \ - array = (FIBITMAP**)malloc(array_size * sizeof(FIBITMAP*));\ - if(!array) throw(1);\ - memset(array, 0, array_size * sizeof(FIBITMAP*)) - -#define _FREE_ARRAY_GRID_(array, array_size) \ - if(NULL != array) {\ - for(int k = 0; k < array_size; k++) {\ - if(NULL != array[k]) {\ - FreeImage_Unload(array[k]); array[k] = NULL;\ - }\ - }\ - free(array);\ - } - -// -------------------------------------------------------------------------- - - try { - int nn = n; - // check grid size and grid levels - while (nn >>= 1) ng++; - if (n != 1 + (1L << ng)) { - FreeImage_OutputMessageProc(FIF_UNKNOWN, "Multigrid algorithm: n = %d, while n-1 must be a power of 2.", n); - throw(1); - } - if (ng > NGMAX) { - FreeImage_OutputMessageProc(FIF_UNKNOWN, "Multigrid algorithm: ng = %d while NGMAX = %d, increase NGMAX.", ng, NGMAX); - throw(1); - } - // allocate grid arrays - { - _CREATE_ARRAY_GRID_(IRHO, ng); - _CREATE_ARRAY_GRID_(IU, ng); - _CREATE_ARRAY_GRID_(IRHS, ng); - _CREATE_ARRAY_GRID_(IRES, ng); - } - - nn = n/2 + 1; - ngrid = ng - 2; - - // allocate storage for r.h.s. on grid (ng - 2) ... - IRHO[ngrid] = FreeImage_AllocateT(FIT_FLOAT, nn, nn); - if(!IRHO[ngrid]) throw(1); - - // ... and fill it by restricting from the fine grid - fmg_restrict(IRHO[ngrid], U, nn); - - // similarly allocate storage and fill r.h.s. on all coarse grids. - while (nn > 3) { - nn = nn/2 + 1; - ngrid--; - IRHO[ngrid] = FreeImage_AllocateT(FIT_FLOAT, nn, nn); - if(!IRHO[ngrid]) throw(1); - fmg_restrict(IRHO[ngrid], IRHO[ngrid+1], nn); - } - - nn = 3; - - IU[0] = FreeImage_AllocateT(FIT_FLOAT, nn, nn); - if(!IU[0]) throw(1); - IRHS[0] = FreeImage_AllocateT(FIT_FLOAT, nn, nn); - if(!IRHS[0]) throw(1); - - // initial solution on coarsest grid - fmg_solve(IU[0], IRHO[0]); - // irho[0] no longer needed ... - FreeImage_Unload(IRHO[0]); IRHO[0] = NULL; - - ngrid = ng; - - // nested iteration loop - for (j = 1; j < ngrid; j++) { - nn = 2*nn - 1; - - IU[j] = FreeImage_AllocateT(FIT_FLOAT, nn, nn); - if(!IU[j]) throw(1); - IRHS[j] = FreeImage_AllocateT(FIT_FLOAT, nn, nn); - if(!IRHS[j]) throw(1); - IRES[j] = FreeImage_AllocateT(FIT_FLOAT, nn, nn); - if(!IRES[j]) throw(1); - - fmg_prolongate(IU[j], IU[j-1], nn); - - // interpolate from coarse grid to next finer grid - - // set up r.h.s. - fmg_copyArray(IRHS[j], j != (ngrid - 1) ? IRHO[j] : U); - - // V-cycle loop - for (jcycle = 0; jcycle < ncycle; jcycle++) { - nf = nn; - // downward stoke of the V - for (jj = j; jj >= 1; jj--) { - // pre-smoothing - for (jpre = 0; jpre < NPRE; jpre++) { - fmg_relaxation(IU[jj], IRHS[jj], nf); - } - fmg_residual(IRES[jj], IU[jj], IRHS[jj], nf); - nf = nf/2 + 1; - // restriction of the residual is the next r.h.s. - fmg_restrict(IRHS[jj-1], IRES[jj], nf); - // zero for initial guess in next relaxation - fmg_fillArrayWithZeros(IU[jj-1]); - } - // bottom of V: solve on coarsest grid - fmg_solve(IU[0], IRHS[0]); - nf = 3; - // upward stroke of V. - for (jj = 1; jj <= j; jj++) { - nf = 2*nf - 1; - // use res for temporary storage inside addint - fmg_addint(IU[jj], IU[jj-1], IRES[jj], nf); - // post-smoothing - for (jpost = 0; jpost < NPOST; jpost++) { - fmg_relaxation(IU[jj], IRHS[jj], nf); - } - } - } - } - - // return solution in U - fmg_copyArray(U, IU[ngrid-1]); - - // delete allocated arrays - _FREE_ARRAY_GRID_(IRES, ng); - _FREE_ARRAY_GRID_(IRHS, ng); - _FREE_ARRAY_GRID_(IU, ng); - _FREE_ARRAY_GRID_(IRHO, ng); - - return TRUE; - - } catch(int) { - // delete allocated arrays - _FREE_ARRAY_GRID_(IRES, ng); - _FREE_ARRAY_GRID_(IRHS, ng); - _FREE_ARRAY_GRID_(IU, ng); - _FREE_ARRAY_GRID_(IRHO, ng); - - return FALSE; - } -} - -// -------------------------------------------------------------------------- - -/** -Poisson solver based on a multigrid algorithm. -This routine solves a Poisson equation, remap result pixels to [0..1] and returns the solution. -NB: The input image is first stored inside a square image whose size is (2^j + 1)x(2^j + 1) for some integer j, -where j is such that 2^j is the nearest larger dimension corresponding to MAX(image width, image height). -@param Laplacian Laplacian image -@param ncycle Number of cycles in the multigrid algorithm (usually 2 or 3) -@return Returns the solved PDE equations if successful, returns NULL otherwise -*/ -FIBITMAP* DLL_CALLCONV -FreeImage_MultigridPoissonSolver(FIBITMAP *Laplacian, int ncycle) { - if(!FreeImage_HasPixels(Laplacian)) return NULL; - - int width = FreeImage_GetWidth(Laplacian); - int height = FreeImage_GetHeight(Laplacian); - - // get nearest larger dimension length that is acceptable by the algorithm - int n = MAX(width, height); - int size = 0; - while((n >>= 1) > 0) size++; - if((1 << size) < MAX(width, height)) { - size++; - } - // size must be of the form 2^j + 1 for some integer j - size = 1 + (1 << size); - - // allocate a temporary square image I - FIBITMAP *I = FreeImage_AllocateT(FIT_FLOAT, size, size); - if(!I) return NULL; - - // copy Laplacian into I and shift pixels to create a boundary - FreeImage_Paste(I, Laplacian, 1, 1, 255); - - // solve the PDE equation - fmg_mglin(I, size, ncycle); - - // shift pixels back - FIBITMAP *U = FreeImage_Copy(I, 1, 1, width + 1, height + 1); - FreeImage_Unload(I); - - // remap pixels to [0..1] - NormalizeY(U, 0, 1); - - // copy metadata from src to dst - FreeImage_CloneMetadata(U, Laplacian); - - // return the integrated image - return U; -} - diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/Rescale.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/Rescale.cpp deleted file mode 100644 index 4f885c2..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/Rescale.cpp +++ /dev/null @@ -1,192 +0,0 @@ -// ========================================================== -// Upsampling / downsampling routine -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Carsten Klein (cklein05@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "Resize.h" - -FIBITMAP * DLL_CALLCONV -FreeImage_RescaleRect(FIBITMAP *src, int dst_width, int dst_height, int src_left, int src_top, int src_right, int src_bottom, FREE_IMAGE_FILTER filter, unsigned flags) { - FIBITMAP *dst = NULL; - - const int src_width = FreeImage_GetWidth(src); - const int src_height = FreeImage_GetHeight(src); - - if (!FreeImage_HasPixels(src) || (dst_width <= 0) || (dst_height <= 0) || (src_width <= 0) || (src_height <= 0)) { - return NULL; - } - - // normalize the rectangle - if (src_right < src_left) { - INPLACESWAP(src_left, src_right); - } - if (src_bottom < src_top) { - INPLACESWAP(src_top, src_bottom); - } - - // check the size of the sub image - if((src_left < 0) || (src_right > src_width) || (src_top < 0) || (src_bottom > src_height)) { - return NULL; - } - - // select the filter - CGenericFilter *pFilter = NULL; - switch (filter) { - case FILTER_BOX: - pFilter = new(std::nothrow) CBoxFilter(); - break; - case FILTER_BICUBIC: - pFilter = new(std::nothrow) CBicubicFilter(); - break; - case FILTER_BILINEAR: - pFilter = new(std::nothrow) CBilinearFilter(); - break; - case FILTER_BSPLINE: - pFilter = new(std::nothrow) CBSplineFilter(); - break; - case FILTER_CATMULLROM: - pFilter = new(std::nothrow) CCatmullRomFilter(); - break; - case FILTER_LANCZOS3: - pFilter = new(std::nothrow) CLanczos3Filter(); - break; - } - - if (!pFilter) { - return NULL; - } - - CResizeEngine Engine(pFilter); - - dst = Engine.scale(src, dst_width, dst_height, src_left, src_top, - src_right - src_left, src_bottom - src_top, flags); - - delete pFilter; - - if ((flags & FI_RESCALE_OMIT_METADATA) != FI_RESCALE_OMIT_METADATA) { - // copy metadata from src to dst - FreeImage_CloneMetadata(dst, src); - } - - return dst; -} - -FIBITMAP * DLL_CALLCONV -FreeImage_Rescale(FIBITMAP *src, int dst_width, int dst_height, FREE_IMAGE_FILTER filter) { - return FreeImage_RescaleRect(src, dst_width, dst_height, 0, 0, FreeImage_GetWidth(src), FreeImage_GetHeight(src), filter, FI_RESCALE_DEFAULT); -} - -FIBITMAP * DLL_CALLCONV -FreeImage_MakeThumbnail(FIBITMAP *dib, int max_pixel_size, BOOL convert) { - FIBITMAP *thumbnail = NULL; - int new_width, new_height; - - if(!FreeImage_HasPixels(dib) || (max_pixel_size <= 0)) return NULL; - - int width = FreeImage_GetWidth(dib); - int height = FreeImage_GetHeight(dib); - - if(max_pixel_size == 0) max_pixel_size = 1; - - if((width < max_pixel_size) && (height < max_pixel_size)) { - // image is smaller than the requested thumbnail - return FreeImage_Clone(dib); - } - - if(width > height) { - new_width = max_pixel_size; - // change image height with the same ratio - double ratio = ((double)new_width / (double)width); - new_height = (int)(height * ratio + 0.5); - if(new_height == 0) new_height = 1; - } else { - new_height = max_pixel_size; - // change image width with the same ratio - double ratio = ((double)new_height / (double)height); - new_width = (int)(width * ratio + 0.5); - if(new_width == 0) new_width = 1; - } - - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(dib); - - // perform downsampling using a bilinear interpolation - - switch(image_type) { - case FIT_BITMAP: - case FIT_UINT16: - case FIT_RGB16: - case FIT_RGBA16: - case FIT_FLOAT: - case FIT_RGBF: - case FIT_RGBAF: - { - FREE_IMAGE_FILTER filter = FILTER_BILINEAR; - thumbnail = FreeImage_Rescale(dib, new_width, new_height, filter); - } - break; - - case FIT_INT16: - case FIT_UINT32: - case FIT_INT32: - case FIT_DOUBLE: - case FIT_COMPLEX: - default: - // cannot rescale this kind of image - thumbnail = NULL; - break; - } - - if((thumbnail != NULL) && (image_type != FIT_BITMAP) && convert) { - // convert to a standard bitmap - FIBITMAP *bitmap = NULL; - switch(image_type) { - case FIT_UINT16: - bitmap = FreeImage_ConvertTo8Bits(thumbnail); - break; - case FIT_RGB16: - bitmap = FreeImage_ConvertTo24Bits(thumbnail); - break; - case FIT_RGBA16: - bitmap = FreeImage_ConvertTo32Bits(thumbnail); - break; - case FIT_FLOAT: - bitmap = FreeImage_ConvertToStandardType(thumbnail, TRUE); - break; - case FIT_RGBF: - bitmap = FreeImage_ToneMapping(thumbnail, FITMO_DRAGO03); - break; - case FIT_RGBAF: - // no way to keep the transparency yet ... - FIBITMAP *rgbf = FreeImage_ConvertToRGBF(thumbnail); - bitmap = FreeImage_ToneMapping(rgbf, FITMO_DRAGO03); - FreeImage_Unload(rgbf); - break; - } - if(bitmap != NULL) { - FreeImage_Unload(thumbnail); - thumbnail = bitmap; - } - } - - // copy metadata from src to dst - FreeImage_CloneMetadata(thumbnail, dib); - - return thumbnail; -} diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/Resize.cpp b/Dependencies/FreeImage/Source/FreeImageToolkit/Resize.cpp deleted file mode 100644 index dbc738f..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/Resize.cpp +++ /dev/null @@ -1,2116 +0,0 @@ -// ========================================================== -// Upsampling / downsampling classes -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Detlev Vendt (detlev.vendt@brillit.de) -// - Carsten Klein (cklein05@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "Resize.h" - -/** -Returns the color type of a bitmap. In contrast to FreeImage_GetColorType, -this function optionally supports a boolean OUT parameter, that receives TRUE, -if the specified bitmap is greyscale, that is, it consists of grey colors only. -Although it returns the same value as returned by FreeImage_GetColorType for all -image types, this extended function primarily is intended for palletized images, -since the boolean pointed to by 'bIsGreyscale' remains unchanged for RGB(A/F) -images. However, the outgoing boolean is properly maintained for palletized images, -as well as for any non-RGB image type, like FIT_UINTxx and FIT_DOUBLE, for example. -@param dib A pointer to a FreeImage bitmap to calculate the extended color type for -@param bIsGreyscale A pointer to a boolean, that receives TRUE, if the specified bitmap -is greyscale, that is, it consists of grey colors only. This parameter can be NULL. -@return the color type of the specified bitmap -*/ -static FREE_IMAGE_COLOR_TYPE -GetExtendedColorType(FIBITMAP *dib, BOOL *bIsGreyscale) { - const unsigned bpp = FreeImage_GetBPP(dib); - const unsigned size = CalculateUsedPaletteEntries(bpp); - const RGBQUAD * const pal = FreeImage_GetPalette(dib); - FREE_IMAGE_COLOR_TYPE color_type = FIC_MINISBLACK; - BOOL bIsGrey = TRUE; - - switch (bpp) { - case 1: - { - for (unsigned i = 0; i < size; i++) { - if ((pal[i].rgbRed != pal[i].rgbGreen) || (pal[i].rgbRed != pal[i].rgbBlue)) { - color_type = FIC_PALETTE; - bIsGrey = FALSE; - break; - } - } - if (bIsGrey) { - if (pal[0].rgbBlue == 255 && pal[1].rgbBlue == 0) { - color_type = FIC_MINISWHITE; - } else if (pal[0].rgbBlue != 0 || pal[1].rgbBlue != 255) { - color_type = FIC_PALETTE; - } - } - break; - } - - case 4: - case 8: - { - for (unsigned i = 0; i < size; i++) { - if ((pal[i].rgbRed != pal[i].rgbGreen) || (pal[i].rgbRed != pal[i].rgbBlue)) { - color_type = FIC_PALETTE; - bIsGrey = FALSE; - break; - } - if (color_type != FIC_PALETTE && pal[i].rgbBlue != i) { - if ((size - i - 1) != pal[i].rgbBlue) { - color_type = FIC_PALETTE; - if (!bIsGreyscale) { - // exit loop if we're not setting - // bIsGreyscale parameter - break; - } - } else { - color_type = FIC_MINISWHITE; - } - } - } - break; - } - - default: - { - color_type = FreeImage_GetColorType(dib); - bIsGrey = (color_type == FIC_MINISBLACK) ? TRUE : FALSE; - break; - } - - } - if (bIsGreyscale) { - *bIsGreyscale = bIsGrey; - } - - return color_type; -} - -/** -Returns a pointer to an RGBA palette, created from the specified bitmap. -The RGBA palette is a copy of the specified bitmap's palette, that, additionally -contains the bitmap's transparency information in the rgbReserved member -of the palette's RGBQUAD elements. -@param dib A pointer to a FreeImage bitmap to create the RGBA palette from. -@param buffer A pointer to the buffer to store the RGBA palette. -@return A pointer to the newly created RGBA palette or NULL, if the specified -bitmap is no palletized standard bitmap. If non-NULL, the returned value is -actually the pointer passed in parameter 'buffer'. -*/ -static inline RGBQUAD * -GetRGBAPalette(FIBITMAP *dib, RGBQUAD * const buffer) { - // clone the palette - const unsigned ncolors = FreeImage_GetColorsUsed(dib); - if (ncolors == 0) { - return NULL; - } - memcpy(buffer, FreeImage_GetPalette(dib), ncolors * sizeof(RGBQUAD)); - // merge the transparency table - const unsigned ntransp = MIN(ncolors, FreeImage_GetTransparencyCount(dib)); - const BYTE * const tt = FreeImage_GetTransparencyTable(dib); - for (unsigned i = 0; i < ntransp; i++) { - buffer[i].rgbReserved = tt[i]; - } - for (unsigned i = ntransp; i < ncolors; i++) { - buffer[i].rgbReserved = 255; - } - return buffer; -} - -// -------------------------------------------------------------------------- - -CWeightsTable::CWeightsTable(CGenericFilter *pFilter, unsigned uDstSize, unsigned uSrcSize) { - double dWidth; - double dFScale; - const double dFilterWidth = pFilter->GetWidth(); - - // scale factor - const double dScale = double(uDstSize) / double(uSrcSize); - - if(dScale < 1.0) { - // minification - dWidth = dFilterWidth / dScale; - dFScale = dScale; - } else { - // magnification - dWidth = dFilterWidth; - dFScale = 1.0; - } - - // allocate a new line contributions structure - // - // window size is the number of sampled pixels - m_WindowSize = 2 * (int)ceil(dWidth) + 1; - // length of dst line (no. of rows / cols) - m_LineLength = uDstSize; - - // allocate list of contributions - m_WeightTable = (Contribution*)malloc(m_LineLength * sizeof(Contribution)); - for(unsigned u = 0; u < m_LineLength; u++) { - // allocate contributions for every pixel - m_WeightTable[u].Weights = (double*)malloc(m_WindowSize * sizeof(double)); - } - - // offset for discrete to continuous coordinate conversion - const double dOffset = (0.5 / dScale); - - for(unsigned u = 0; u < m_LineLength; u++) { - // scan through line of contributions - - // inverse mapping (discrete dst 'u' to continous src 'dCenter') - const double dCenter = (double)u / dScale + dOffset; - - // find the significant edge points that affect the pixel - const int iLeft = MAX(0, (int)(dCenter - dWidth + 0.5)); - const int iRight = MIN((int)(dCenter + dWidth + 0.5), int(uSrcSize)); - - m_WeightTable[u].Left = iLeft; - m_WeightTable[u].Right = iRight; - - double dTotalWeight = 0; // sum of weights (initialized to zero) - for(int iSrc = iLeft; iSrc < iRight; iSrc++) { - // calculate weights - const double weight = dFScale * pFilter->Filter(dFScale * ((double)iSrc + 0.5 - dCenter)); - // assert((iSrc-iLeft) < m_WindowSize); - m_WeightTable[u].Weights[iSrc-iLeft] = weight; - dTotalWeight += weight; - } - if((dTotalWeight > 0) && (dTotalWeight != 1)) { - // normalize weight of neighbouring points - for(int iSrc = iLeft; iSrc < iRight; iSrc++) { - // normalize point - m_WeightTable[u].Weights[iSrc-iLeft] /= dTotalWeight; - } - } - - // simplify the filter, discarding null weights at the right - { - int iTrailing = iRight - iLeft - 1; - while(m_WeightTable[u].Weights[iTrailing] == 0) { - m_WeightTable[u].Right--; - iTrailing--; - if(m_WeightTable[u].Right == m_WeightTable[u].Left) { - break; - } - } - - } - - } // next dst pixel -} - -CWeightsTable::~CWeightsTable() { - for(unsigned u = 0; u < m_LineLength; u++) { - // free contributions for every pixel - free(m_WeightTable[u].Weights); - } - // free list of pixels contributions - free(m_WeightTable); -} - -// -------------------------------------------------------------------------- - -FIBITMAP* CResizeEngine::scale(FIBITMAP *src, unsigned dst_width, unsigned dst_height, unsigned src_left, unsigned src_top, unsigned src_width, unsigned src_height, unsigned flags) { - - const FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(src); - const unsigned src_bpp = FreeImage_GetBPP(src); - - // determine the image's color type - BOOL bIsGreyscale = FALSE; - FREE_IMAGE_COLOR_TYPE color_type; - if (src_bpp <= 8) { - color_type = GetExtendedColorType(src, &bIsGreyscale); - } else { - color_type = FIC_RGB; - } - - // determine the required bit depth of the destination image - unsigned dst_bpp; - unsigned dst_bpp_s1 = 0; - if (color_type == FIC_PALETTE && !bIsGreyscale) { - // non greyscale FIC_PALETTE images require a high-color destination - // image (24- or 32-bits depending on the image's transparent state) - dst_bpp = FreeImage_IsTransparent(src) ? 32 : 24; - } else if (src_bpp <= 8) { - // greyscale images require an 8-bit destination image - // (or a 32-bit image if the image is transparent); - // however, if flag FI_RESCALE_TRUE_COLOR is set, we will return - // a true color (24 bpp) image - if (FreeImage_IsTransparent(src)) { - dst_bpp = 32; - // additionally, for transparent images we always need a - // palette including transparency information (an RGBA palette) - // so, set color_type accordingly - color_type = FIC_PALETTE; - } else { - dst_bpp = ((flags & FI_RESCALE_TRUE_COLOR) == FI_RESCALE_TRUE_COLOR) ? 24 : 8; - // in any case, we use a fast 8-bit temporary image for the - // first filter operation (stage 1, either horizontal or - // vertical) and implicitly convert to 24 bpp (if requested - // by flag FI_RESCALE_TRUE_COLOR) during the second filter - // operation - dst_bpp_s1 = 8; - } - } else if (src_bpp == 16 && image_type == FIT_BITMAP) { - // 16-bit 555 and 565 RGB images require a high-color destination - // image (fixed to 24 bits, since 16-bit RGBs don't support - // transparency in FreeImage) - dst_bpp = 24; - } else { - // bit depth remains unchanged for all other images - dst_bpp = src_bpp; - } - - // make 'stage 1' bpp a copy of the destination bpp if it - // was not explicitly set - if (dst_bpp_s1 == 0) { - dst_bpp_s1 = dst_bpp; - } - - // early exit if destination size is equal to source size - if ((src_width == dst_width) && (src_height == dst_height)) { - FIBITMAP *out = src; - FIBITMAP *tmp = src; - if ((src_width != FreeImage_GetWidth(src)) || (src_height != FreeImage_GetHeight(src))) { - out = FreeImage_Copy(tmp, src_left, src_top, src_left + src_width, src_top + src_height); - tmp = out; - } - if (src_bpp != dst_bpp) { - switch (dst_bpp) { - case 8: - out = FreeImage_ConvertToGreyscale(tmp); - break; - case 24: - out = FreeImage_ConvertTo24Bits(tmp); - break; - case 32: - out = FreeImage_ConvertTo32Bits(tmp); - break; - default: - break; - } - if (tmp != src) { - FreeImage_Unload(tmp); - tmp = NULL; - } - } - - return (out != src) ? out : FreeImage_Clone(src); - } - - RGBQUAD pal_buffer[256]; - RGBQUAD *src_pal = NULL; - - // provide the source image's palette to the rescaler for - // FIC_PALETTE type images (this includes palletized greyscale - // images with an unordered palette as well as transparent images) - if (color_type == FIC_PALETTE) { - if (dst_bpp == 32) { - // a 32-bit destination image signals transparency, so - // create an RGBA palette from the source palette - src_pal = GetRGBAPalette(src, pal_buffer); - } else { - src_pal = FreeImage_GetPalette(src); - } - } - - // allocate the dst image - FIBITMAP *dst = FreeImage_AllocateT(image_type, dst_width, dst_height, dst_bpp, 0, 0, 0); - if (!dst) { - return NULL; - } - - if (dst_bpp == 8) { - RGBQUAD * const dst_pal = FreeImage_GetPalette(dst); - if (color_type == FIC_MINISWHITE) { - // build an inverted greyscale palette - CREATE_GREYSCALE_PALETTE_REVERSE(dst_pal, 256); - } - /* - else { - // build a default greyscale palette - // Currently, FreeImage_AllocateT already creates a default - // greyscale palette for 8 bpp images, so we can skip this here. - CREATE_GREYSCALE_PALETTE(dst_pal, 256); - } - */ - } - - // calculate x and y offsets; since FreeImage uses bottom-up bitmaps, the - // value of src_offset_y is measured from the bottom of the image - unsigned src_offset_x = src_left; - unsigned src_offset_y = FreeImage_GetHeight(src) - src_height - src_top; - - /* - Decide which filtering order (xy or yx) is faster for this mapping. - --- The theory --- - Try to minimize calculations by counting the number of convolution multiplies - if(dst_width*src_height <= src_width*dst_height) { - // xy filtering - } else { - // yx filtering - } - --- The practice --- - Try to minimize calculations by counting the number of vertical convolutions (the most time consuming task) - if(dst_width*dst_height <= src_width*dst_height) { - // xy filtering - } else { - // yx filtering - } - */ - - if (dst_width <= src_width) { - // xy filtering - // ------------- - - FIBITMAP *tmp = NULL; - - if (src_width != dst_width) { - // source and destination widths are different so, we must - // filter horizontally - if (src_height != dst_height) { - // source and destination heights are also different so, we need - // a temporary image - tmp = FreeImage_AllocateT(image_type, dst_width, src_height, dst_bpp_s1, 0, 0, 0); - if (!tmp) { - FreeImage_Unload(dst); - return NULL; - } - } else { - // source and destination heights are equal so, we can directly - // scale into destination image (second filter method will not - // be invoked) - tmp = dst; - } - - // scale source image horizontally into temporary (or destination) image - horizontalFilter(src, src_height, src_width, src_offset_x, src_offset_y, src_pal, tmp, dst_width); - - // set x and y offsets to zero for the second filter method - // invocation (the temporary image only contains the portion of - // the image to be rescaled with no offsets) - src_offset_x = 0; - src_offset_y = 0; - - // also ensure, that the second filter method gets no source - // palette (the temporary image is palletized only, if it is - // greyscale; in that case, it is an 8-bit image with a linear - // palette so, the source palette is not needed or will even be - // mismatching, if the source palette is unordered) - src_pal = NULL; - } else { - // source and destination widths are equal so, just copy the - // image pointer - tmp = src; - } - - if (src_height != dst_height) { - // source and destination heights are different so, scale - // temporary (or source) image vertically into destination image - verticalFilter(tmp, dst_width, src_height, src_offset_x, src_offset_y, src_pal, dst, dst_height); - } - - // free temporary image, if not pointing to either src or dst - if (tmp != src && tmp != dst) { - FreeImage_Unload(tmp); - } - - } else { - // yx filtering - // ------------- - - // Remark: - // The yx filtering branch could be more optimized by taking into, - // account that (src_width != dst_width) is always true, which - // follows from the above condition, which selects filtering order. - // Since (dst_width <= src_width) == TRUE selects xy filtering, - // both widths must be different when performing yx filtering. - // However, to make the code more robust, not depending on that - // condition and more symmetric to the xy filtering case, these - // (src_width != dst_width) conditions are still in place. - - FIBITMAP *tmp = NULL; - - if (src_height != dst_height) { - // source and destination heights are different so, we must - // filter vertically - if (src_width != dst_width) { - // source and destination widths are also different so, we need - // a temporary image - tmp = FreeImage_AllocateT(image_type, src_width, dst_height, dst_bpp_s1, 0, 0, 0); - if (!tmp) { - FreeImage_Unload(dst); - return NULL; - } - } else { - // source and destination widths are equal so, we can directly - // scale into destination image (second filter method will not - // be invoked) - tmp = dst; - } - - // scale source image vertically into temporary (or destination) image - verticalFilter(src, src_width, src_height, src_offset_x, src_offset_y, src_pal, tmp, dst_height); - - // set x and y offsets to zero for the second filter method - // invocation (the temporary image only contains the portion of - // the image to be rescaled with no offsets) - src_offset_x = 0; - src_offset_y = 0; - - // also ensure, that the second filter method gets no source - // palette (the temporary image is palletized only, if it is - // greyscale; in that case, it is an 8-bit image with a linear - // palette so, the source palette is not needed or will even be - // mismatching, if the source palette is unordered) - src_pal = NULL; - - } else { - // source and destination heights are equal so, just copy the - // image pointer - tmp = src; - } - - if (src_width != dst_width) { - // source and destination heights are different so, scale - // temporary (or source) image horizontally into destination image - horizontalFilter(tmp, dst_height, src_width, src_offset_x, src_offset_y, src_pal, dst, dst_width); - } - - // free temporary image, if not pointing to either src or dst - if (tmp != src && tmp != dst) { - FreeImage_Unload(tmp); - } - } - - return dst; -} - -void CResizeEngine::horizontalFilter(FIBITMAP *const src, unsigned height, unsigned src_width, unsigned src_offset_x, unsigned src_offset_y, const RGBQUAD *const src_pal, FIBITMAP *const dst, unsigned dst_width) { - - // allocate and calculate the contributions - CWeightsTable weightsTable(m_pFilter, dst_width, src_width); - - // step through rows - switch(FreeImage_GetImageType(src)) { - case FIT_BITMAP: - { - switch(FreeImage_GetBPP(src)) { - case 1: - { - switch(FreeImage_GetBPP(dst)) { - case 8: - { - // transparently convert the 1-bit non-transparent greyscale image to 8 bpp - src_offset_x >>= 3; - if (src_pal) { - // we have got a palette - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE * const dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iRight = weightsTable.getRightBoundary(x); // retrieve right boundary - double value = 0; - - for (unsigned i = iLeft; i < iRight; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const unsigned pixel = (src_bits[i >> 3] & (0x80 >> (i & 0x07))) != 0; - value += (weightsTable.getWeight(x, i - iLeft) * (double)*(BYTE *)&src_pal[pixel]); - } - - // clamp and place result in destination pixel - dst_bits[x] = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - } - } - } else { - // we do not have a palette - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE * const dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iRight = weightsTable.getRightBoundary(x); // retrieve right boundary - double value = 0; - - for (unsigned i = iLeft; i < iRight; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const unsigned pixel = (src_bits[i >> 3] & (0x80 >> (i & 0x07))) != 0; - value += (weightsTable.getWeight(x, i - iLeft) * (double)pixel); - } - value *= 0xFF; - - // clamp and place result in destination pixel - dst_bits[x] = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - } - } - } - } - break; - - case 24: - { - // transparently convert the non-transparent 1-bit image to 24 bpp - src_offset_x >>= 3; - if (src_pal) { - // we have got a palette - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iRight = weightsTable.getRightBoundary(x); // retrieve right boundary - double r = 0, g = 0, b = 0; - - for (unsigned i = iLeft; i < iRight; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i - iLeft); - const unsigned pixel = (src_bits[i >> 3] & (0x80 >> (i & 0x07))) != 0; - const BYTE * const entry = (BYTE *)&src_pal[pixel]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits += 3; - } - } - } else { - // we do not have a palette - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iRight = weightsTable.getRightBoundary(x); // retrieve right boundary - double value = 0; - - for (unsigned i = iLeft; i < iRight; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const unsigned pixel = (src_bits[i >> 3] & (0x80 >> (i & 0x07))) != 0; - value += (weightsTable.getWeight(x, i - iLeft) * (double)pixel); - } - value *= 0xFF; - - // clamp and place result in destination pixel - const BYTE bval = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_RED] = bval; - dst_bits[FI_RGBA_GREEN] = bval; - dst_bits[FI_RGBA_BLUE] = bval; - dst_bits += 3; - } - } - } - } - break; - - case 32: - { - // transparently convert the transparent 1-bit image to 32 bpp; - // we always have got a palette here - src_offset_x >>= 3; - - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iRight = weightsTable.getRightBoundary(x); // retrieve right boundary - double r = 0, g = 0, b = 0, a = 0; - - for (unsigned i = iLeft; i < iRight; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i - iLeft); - const unsigned pixel = (src_bits[i >> 3] & (0x80 >> (i & 0x07))) != 0; - const BYTE * const entry = (BYTE *)&src_pal[pixel]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - a += (weight * (double)entry[FI_RGBA_ALPHA]); - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_ALPHA] = (BYTE)CLAMP((int)(a + 0.5), 0, 0xFF); - dst_bits += 4; - } - } - } - break; - } - } - break; - - case 4: - { - switch(FreeImage_GetBPP(dst)) { - case 8: - { - // transparently convert the non-transparent 4-bit greyscale image to 8 bpp; - // we always have got a palette for 4-bit images - src_offset_x >>= 1; - - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE * const dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iRight = weightsTable.getRightBoundary(x); // retrieve right boundary - double value = 0; - - for (unsigned i = iLeft; i < iRight; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const unsigned pixel = i & 0x01 ? src_bits[i >> 1] & 0x0F : src_bits[i >> 1] >> 4; - value += (weightsTable.getWeight(x, i - iLeft) * (double)*(BYTE *)&src_pal[pixel]); - } - - // clamp and place result in destination pixel - dst_bits[x] = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - } - } - } - break; - - case 24: - { - // transparently convert the non-transparent 4-bit image to 24 bpp; - // we always have got a palette for 4-bit images - src_offset_x >>= 1; - - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iRight = weightsTable.getRightBoundary(x); // retrieve right boundary - double r = 0, g = 0, b = 0; - - for (unsigned i = iLeft; i < iRight; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i - iLeft); - const unsigned pixel = i & 0x01 ? src_bits[i >> 1] & 0x0F : src_bits[i >> 1] >> 4; - const BYTE * const entry = (BYTE *)&src_pal[pixel]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits += 3; - } - } - } - break; - - case 32: - { - // transparently convert the transparent 4-bit image to 32 bpp; - // we always have got a palette for 4-bit images - src_offset_x >>= 1; - - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iRight = weightsTable.getRightBoundary(x); // retrieve right boundary - double r = 0, g = 0, b = 0, a = 0; - - for (unsigned i = iLeft; i < iRight; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i - iLeft); - const unsigned pixel = i & 0x01 ? src_bits[i >> 1] & 0x0F : src_bits[i >> 1] >> 4; - const BYTE * const entry = (BYTE *)&src_pal[pixel]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - a += (weight * (double)entry[FI_RGBA_ALPHA]); - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_ALPHA] = (BYTE)CLAMP((int)(a + 0.5), 0, 0xFF); - dst_bits += 4; - } - } - } - break; - } - } - break; - - case 8: - { - switch(FreeImage_GetBPP(dst)) { - case 8: - { - // scale the 8-bit non-transparent greyscale image - // into an 8 bpp destination image - if (src_pal) { - // we have got a palette - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE * const dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const BYTE * const pixel = src_bits + iLeft; - double value = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - value += (weightsTable.getWeight(x, i) * (double)*(BYTE *)&src_pal[pixel[i]]); - } - - // clamp and place result in destination pixel - dst_bits[x] = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - } - } - } else { - // we do not have a palette - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE * const dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const BYTE * const pixel = src_bits + iLeft; - double value = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - value += (weightsTable.getWeight(x, i) * (double)pixel[i]); - } - - // clamp and place result in destination pixel - dst_bits[x] = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - } - } - } - } - break; - - case 24: - { - // transparently convert the non-transparent 8-bit image to 24 bpp - if (src_pal) { - // we have got a palette - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const BYTE * const pixel = src_bits + iLeft; - double r = 0, g = 0, b = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i); - const BYTE *const entry = (BYTE *)&src_pal[pixel[i]]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits += 3; - } - } - } else { - // we do not have a palette - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const BYTE * const pixel = src_bits + iLeft; - double value = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i); - value += (weight * (double)pixel[i]); - } - - // clamp and place result in destination pixel - const BYTE bval = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_RED] = bval; - dst_bits[FI_RGBA_GREEN] = bval; - dst_bits[FI_RGBA_BLUE] = bval; - dst_bits += 3; - } - } - } - } - break; - - case 32: - { - // transparently convert the transparent 8-bit image to 32 bpp; - // we always have got a palette here - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const BYTE * const pixel = src_bits + iLeft; - double r = 0, g = 0, b = 0, a = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i); - const BYTE * const entry = (BYTE *)&src_pal[pixel[i]]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - a += (weight * (double)entry[FI_RGBA_ALPHA]); - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_ALPHA] = (BYTE)CLAMP((int)(a + 0.5), 0, 0xFF); - dst_bits += 4; - } - } - } - break; - } - } - break; - - case 16: - { - // transparently convert the 16-bit non-transparent image to 24 bpp - if (IS_FORMAT_RGB565(src)) { - // image has 565 format - for (unsigned y = 0; y < height; y++) { - // scale each row - const WORD * const src_bits = (WORD *)FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x / sizeof(WORD); - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const WORD *pixel = src_bits + iLeft; - double r = 0, g = 0, b = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i); - r += (weight * (double)((*pixel & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT)); - g += (weight * (double)((*pixel & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT)); - b += (weight * (double)((*pixel & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT)); - pixel++; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(((r * 0xFF) / 0x1F) + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(((g * 0xFF) / 0x3F) + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(((b * 0xFF) / 0x1F) + 0.5), 0, 0xFF); - dst_bits += 3; - } - } - } else { - // image has 555 format - for (unsigned y = 0; y < height; y++) { - // scale each row - const WORD * const src_bits = (WORD *)FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x; - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const WORD *pixel = src_bits + iLeft; - double r = 0, g = 0, b = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i); - r += (weight * (double)((*pixel & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT)); - g += (weight * (double)((*pixel & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT)); - b += (weight * (double)((*pixel & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT)); - pixel++; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(((r * 0xFF) / 0x1F) + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(((g * 0xFF) / 0x1F) + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(((b * 0xFF) / 0x1F) + 0.5), 0, 0xFF); - dst_bits += 3; - } - } - } - } - break; - - case 24: - { - // scale the 24-bit non-transparent image into a 24 bpp destination image - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x * 3; - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const BYTE * pixel = src_bits + iLeft * 3; - double r = 0, g = 0, b = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i); - r += (weight * (double)pixel[FI_RGBA_RED]); - g += (weight * (double)pixel[FI_RGBA_GREEN]); - b += (weight * (double)pixel[FI_RGBA_BLUE]); - pixel += 3; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits += 3; - } - } - } - break; - - case 32: - { - // scale the 32-bit transparent image into a 32 bpp destination image - for (unsigned y = 0; y < height; y++) { - // scale each row - const BYTE * const src_bits = FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x * 4; - BYTE *dst_bits = FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const BYTE *pixel = src_bits + iLeft * 4; - double r = 0, g = 0, b = 0, a = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i); - r += (weight * (double)pixel[FI_RGBA_RED]); - g += (weight * (double)pixel[FI_RGBA_GREEN]); - b += (weight * (double)pixel[FI_RGBA_BLUE]); - a += (weight * (double)pixel[FI_RGBA_ALPHA]); - pixel += 4; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_ALPHA] = (BYTE)CLAMP((int)(a + 0.5), 0, 0xFF); - dst_bits += 4; - } - } - } - break; - } - } - break; - - case FIT_UINT16: - { - // Calculate the number of words per pixel (1 for 16-bit, 3 for 48-bit or 4 for 64-bit) - const unsigned wordspp = (FreeImage_GetLine(src) / src_width) / sizeof(WORD); - - for (unsigned y = 0; y < height; y++) { - // scale each row - const WORD *src_bits = (WORD*)FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x / sizeof(WORD); - WORD *dst_bits = (WORD*)FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const WORD *pixel = src_bits + iLeft * wordspp; - double value = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i); - value += (weight * (double)pixel[0]); - pixel++; - } - - // clamp and place result in destination pixel - dst_bits[0] = (WORD)CLAMP((int)(value + 0.5), 0, 0xFFFF); - dst_bits += wordspp; - } - } - } - break; - - case FIT_RGB16: - { - // Calculate the number of words per pixel (1 for 16-bit, 3 for 48-bit or 4 for 64-bit) - const unsigned wordspp = (FreeImage_GetLine(src) / src_width) / sizeof(WORD); - - for (unsigned y = 0; y < height; y++) { - // scale each row - const WORD *src_bits = (WORD*)FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x / sizeof(WORD); - WORD *dst_bits = (WORD*)FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const WORD *pixel = src_bits + iLeft * wordspp; - double r = 0, g = 0, b = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i); - r += (weight * (double)pixel[0]); - g += (weight * (double)pixel[1]); - b += (weight * (double)pixel[2]); - pixel += wordspp; - } - - // clamp and place result in destination pixel - dst_bits[0] = (WORD)CLAMP((int)(r + 0.5), 0, 0xFFFF); - dst_bits[1] = (WORD)CLAMP((int)(g + 0.5), 0, 0xFFFF); - dst_bits[2] = (WORD)CLAMP((int)(b + 0.5), 0, 0xFFFF); - dst_bits += wordspp; - } - } - } - break; - - case FIT_RGBA16: - { - // Calculate the number of words per pixel (1 for 16-bit, 3 for 48-bit or 4 for 64-bit) - const unsigned wordspp = (FreeImage_GetLine(src) / src_width) / sizeof(WORD); - - for (unsigned y = 0; y < height; y++) { - // scale each row - const WORD *src_bits = (WORD*)FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x / sizeof(WORD); - WORD *dst_bits = (WORD*)FreeImage_GetScanLine(dst, y); - - for (unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(x) - iLeft; // retrieve right boundary - const WORD *pixel = src_bits + iLeft * wordspp; - double r = 0, g = 0, b = 0, a = 0; - - // for(i = iLeft to iRight) - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i); - r += (weight * (double)pixel[0]); - g += (weight * (double)pixel[1]); - b += (weight * (double)pixel[2]); - a += (weight * (double)pixel[3]); - pixel += wordspp; - } - - // clamp and place result in destination pixel - dst_bits[0] = (WORD)CLAMP((int)(r + 0.5), 0, 0xFFFF); - dst_bits[1] = (WORD)CLAMP((int)(g + 0.5), 0, 0xFFFF); - dst_bits[2] = (WORD)CLAMP((int)(b + 0.5), 0, 0xFFFF); - dst_bits[3] = (WORD)CLAMP((int)(a + 0.5), 0, 0xFFFF); - dst_bits += wordspp; - } - } - } - break; - - case FIT_FLOAT: - case FIT_RGBF: - case FIT_RGBAF: - { - // Calculate the number of floats per pixel (1 for 32-bit, 3 for 96-bit or 4 for 128-bit) - const unsigned floatspp = (FreeImage_GetLine(src) / src_width) / sizeof(float); - - for(unsigned y = 0; y < height; y++) { - // scale each row - const float *src_bits = (float*)FreeImage_GetScanLine(src, y + src_offset_y) + src_offset_x / sizeof(float); - float *dst_bits = (float*)FreeImage_GetScanLine(dst, y); - - for(unsigned x = 0; x < dst_width; x++) { - // loop through row - const unsigned iLeft = weightsTable.getLeftBoundary(x); // retrieve left boundary - const unsigned iRight = weightsTable.getRightBoundary(x); // retrieve right boundary - double value[4] = {0, 0, 0, 0}; // 4 = 128 bpp max - - for(unsigned i = iLeft; i < iRight; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(x, i-iLeft); - - unsigned index = i * floatspp; // pixel index - for (unsigned j = 0; j < floatspp; j++) { - value[j] += (weight * (double)src_bits[index++]); - } - } - - // place result in destination pixel - for (unsigned j = 0; j < floatspp; j++) { - dst_bits[j] = (float)value[j]; - } - - dst_bits += floatspp; - } - } - } - break; - } -} - -/// Performs vertical image filtering -void CResizeEngine::verticalFilter(FIBITMAP *const src, unsigned width, unsigned src_height, unsigned src_offset_x, unsigned src_offset_y, const RGBQUAD *const src_pal, FIBITMAP *const dst, unsigned dst_height) { - - // allocate and calculate the contributions - CWeightsTable weightsTable(m_pFilter, dst_height, src_height); - - // step through columns - switch(FreeImage_GetImageType(src)) { - case FIT_BITMAP: - { - const unsigned dst_pitch = FreeImage_GetPitch(dst); - BYTE * const dst_base = FreeImage_GetBits(dst); - - switch(FreeImage_GetBPP(src)) { - case 1: - { - const unsigned src_pitch = FreeImage_GetPitch(src); - const BYTE * const src_base = FreeImage_GetBits(src) + src_offset_y * src_pitch + (src_offset_x >> 3); - - switch(FreeImage_GetBPP(dst)) { - case 8: - { - // transparently convert the 1-bit non-transparent greyscale image to 8 bpp - if (src_pal) { - // we have got a palette - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x; - const unsigned index = x >> 3; - const unsigned mask = 0x80 >> (x & 0x07); - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + index; - double value = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const unsigned pixel = (*src_bits & mask) != 0; - value += (weightsTable.getWeight(y, i) * (double)*(BYTE *)&src_pal[pixel]); - src_bits += src_pitch; - } - value *= 0xFF; - - // clamp and place result in destination pixel - *dst_bits = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } else { - // we do not have a palette - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x; - const unsigned index = x >> 3; - const unsigned mask = 0x80 >> (x & 0x07); - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + index; - double value = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - value += (weightsTable.getWeight(y, i) * (double)((*src_bits & mask) != 0)); - src_bits += src_pitch; - } - value *= 0xFF; - - // clamp and place result in destination pixel - *dst_bits = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } - } - break; - - case 24: - { - // transparently convert the non-transparent 1-bit image to 24 bpp - if (src_pal) { - // we have got a palette - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x * 3; - const unsigned index = x >> 3; - const unsigned mask = 0x80 >> (x & 0x07); - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + index; - double r = 0, g = 0, b = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - const unsigned pixel = (*src_bits & mask) != 0; - const BYTE * const entry = (BYTE *)&src_pal[pixel]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } else { - // we do not have a palette - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x * 3; - const unsigned index = x >> 3; - const unsigned mask = 0x80 >> (x & 0x07); - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + index; - double value = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - value += (weightsTable.getWeight(y, i) * (double)((*src_bits & mask) != 0)); - src_bits += src_pitch; - } - value *= 0xFF; - - // clamp and place result in destination pixel - const BYTE bval = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_RED] = bval; - dst_bits[FI_RGBA_GREEN] = bval; - dst_bits[FI_RGBA_BLUE] = bval; - dst_bits += dst_pitch; - } - } - } - } - break; - - case 32: - { - // transparently convert the transparent 1-bit image to 32 bpp; - // we always have got a palette here - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x * 4; - const unsigned index = x >> 3; - const unsigned mask = 0x80 >> (x & 0x07); - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + index; - double r = 0, g = 0, b = 0, a = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - const unsigned pixel = (*src_bits & mask) != 0; - const BYTE * const entry = (BYTE *)&src_pal[pixel]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - a += (weight * (double)entry[FI_RGBA_ALPHA]); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_ALPHA] = (BYTE)CLAMP((int)(a + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } - break; - } - } - break; - - case 4: - { - const unsigned src_pitch = FreeImage_GetPitch(src); - const BYTE *const src_base = FreeImage_GetBits(src) + src_offset_y * src_pitch + (src_offset_x >> 1); - - switch(FreeImage_GetBPP(dst)) { - case 8: - { - // transparently convert the non-transparent 4-bit greyscale image to 8 bpp; - // we always have got a palette for 4-bit images - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x; - const unsigned index = x >> 1; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + index; - double value = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const unsigned pixel = x & 0x01 ? *src_bits & 0x0F : *src_bits >> 4; - value += (weightsTable.getWeight(y, i) * (double)*(BYTE *)&src_pal[pixel]); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - *dst_bits = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } - break; - - case 24: - { - // transparently convert the non-transparent 4-bit image to 24 bpp; - // we always have got a palette for 4-bit images - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x * 3; - const unsigned index = x >> 1; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + index; - double r = 0, g = 0, b = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - const unsigned pixel = x & 0x01 ? *src_bits & 0x0F : *src_bits >> 4; - const BYTE *const entry = (BYTE *)&src_pal[pixel]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } - break; - - case 32: - { - // transparently convert the transparent 4-bit image to 32 bpp; - // we always have got a palette for 4-bit images - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x * 4; - const unsigned index = x >> 1; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + index; - double r = 0, g = 0, b = 0, a = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - const unsigned pixel = x & 0x01 ? *src_bits & 0x0F : *src_bits >> 4; - const BYTE *const entry = (BYTE *)&src_pal[pixel]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - a += (weight * (double)entry[FI_RGBA_ALPHA]); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_ALPHA] = (BYTE)CLAMP((int)(a + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } - break; - } - } - break; - - case 8: - { - const unsigned src_pitch = FreeImage_GetPitch(src); - const BYTE *const src_base = FreeImage_GetBits(src) + src_offset_y * src_pitch + src_offset_x; - - switch(FreeImage_GetBPP(dst)) { - case 8: - { - // scale the 8-bit non-transparent greyscale image into an 8 bpp destination image - if (src_pal) { - // we have got a palette - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + x; - double value = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - value += (weightsTable.getWeight(y, i) * (double)*(BYTE *)&src_pal[*src_bits]); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - *dst_bits = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } else { - // we do not have a palette - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + x; - double value = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - value += (weightsTable.getWeight(y, i) * (double)*src_bits); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - *dst_bits = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } - } - break; - - case 24: - { - // transparently convert the non-transparent 8-bit image to 24 bpp - if (src_pal) { - // we have got a palette - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x * 3; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + x; - double r = 0, g = 0, b = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - const BYTE * const entry = (BYTE *)&src_pal[*src_bits]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } else { - // we do not have a palette - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x * 3; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + x; - double value = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - value += (weightsTable.getWeight(y, i) * (double)*src_bits); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - const BYTE bval = (BYTE)CLAMP((int)(value + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_RED] = bval; - dst_bits[FI_RGBA_GREEN] = bval; - dst_bits[FI_RGBA_BLUE] = bval; - dst_bits += dst_pitch; - } - } - } - } - break; - - case 32: - { - // transparently convert the transparent 8-bit image to 32 bpp; - // we always have got a palette here - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x * 4; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + x; - double r = 0, g = 0, b = 0, a = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - const BYTE * const entry = (BYTE *)&src_pal[*src_bits]; - r += (weight * (double)entry[FI_RGBA_RED]); - g += (weight * (double)entry[FI_RGBA_GREEN]); - b += (weight * (double)entry[FI_RGBA_BLUE]); - a += (weight * (double)entry[FI_RGBA_ALPHA]); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(b + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_ALPHA] = (BYTE)CLAMP((int)(a + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } - break; - } - } - break; - - case 16: - { - // transparently convert the 16-bit non-transparent image to 24 bpp - const unsigned src_pitch = FreeImage_GetPitch(src) / sizeof(WORD); - const WORD *const src_base = (WORD *)FreeImage_GetBits(src) + src_offset_y * src_pitch + src_offset_x; - - if (IS_FORMAT_RGB565(src)) { - // image has 565 format - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x * 3; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const WORD *src_bits = src_base + iLeft * src_pitch + x; - double r = 0, g = 0, b = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - r += (weight * (double)((*src_bits & FI16_565_RED_MASK) >> FI16_565_RED_SHIFT)); - g += (weight * (double)((*src_bits & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT)); - b += (weight * (double)((*src_bits & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT)); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(((r * 0xFF) / 0x1F) + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(((g * 0xFF) / 0x3F) + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(((b * 0xFF) / 0x1F) + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } else { - // image has 555 format - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - BYTE *dst_bits = dst_base + x * 3; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const WORD *src_bits = src_base + iLeft * src_pitch + x; - double r = 0, g = 0, b = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - r += (weight * (double)((*src_bits & FI16_555_RED_MASK) >> FI16_555_RED_SHIFT)); - g += (weight * (double)((*src_bits & FI16_555_GREEN_MASK) >> FI16_555_GREEN_SHIFT)); - b += (weight * (double)((*src_bits & FI16_555_BLUE_MASK) >> FI16_555_BLUE_SHIFT)); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int)(((r * 0xFF) / 0x1F) + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int)(((g * 0xFF) / 0x1F) + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int)(((b * 0xFF) / 0x1F) + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } - } - break; - - case 24: - { - // scale the 24-bit transparent image into a 24 bpp destination image - const unsigned src_pitch = FreeImage_GetPitch(src); - const BYTE *const src_base = FreeImage_GetBits(src) + src_offset_y * src_pitch + src_offset_x * 3; - - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - const unsigned index = x * 3; - BYTE *dst_bits = dst_base + index; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + index; - double r = 0, g = 0, b = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - r += (weight * (double)src_bits[FI_RGBA_RED]); - g += (weight * (double)src_bits[FI_RGBA_GREEN]); - b += (weight * (double)src_bits[FI_RGBA_BLUE]); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int) (r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int) (g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int) (b + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } - break; - - case 32: - { - // scale the 32-bit transparent image into a 32 bpp destination image - const unsigned src_pitch = FreeImage_GetPitch(src); - const BYTE *const src_base = FreeImage_GetBits(src) + src_offset_y * src_pitch + src_offset_x * 4; - - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - const unsigned index = x * 4; - BYTE *dst_bits = dst_base + index; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const BYTE *src_bits = src_base + iLeft * src_pitch + index; - double r = 0, g = 0, b = 0, a = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - r += (weight * (double)src_bits[FI_RGBA_RED]); - g += (weight * (double)src_bits[FI_RGBA_GREEN]); - b += (weight * (double)src_bits[FI_RGBA_BLUE]); - a += (weight * (double)src_bits[FI_RGBA_ALPHA]); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[FI_RGBA_RED] = (BYTE)CLAMP((int) (r + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_GREEN] = (BYTE)CLAMP((int) (g + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_BLUE] = (BYTE)CLAMP((int) (b + 0.5), 0, 0xFF); - dst_bits[FI_RGBA_ALPHA] = (BYTE)CLAMP((int) (a + 0.5), 0, 0xFF); - dst_bits += dst_pitch; - } - } - } - break; - } - } - break; - - case FIT_UINT16: - { - // Calculate the number of words per pixel (1 for 16-bit, 3 for 48-bit or 4 for 64-bit) - const unsigned wordspp = (FreeImage_GetLine(src) / width) / sizeof(WORD); - - const unsigned dst_pitch = FreeImage_GetPitch(dst) / sizeof(WORD); - WORD *const dst_base = (WORD *)FreeImage_GetBits(dst); - - const unsigned src_pitch = FreeImage_GetPitch(src) / sizeof(WORD); - const WORD *const src_base = (WORD *)FreeImage_GetBits(src) + src_offset_y * src_pitch + src_offset_x * wordspp; - - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - const unsigned index = x * wordspp; // pixel index - WORD *dst_bits = dst_base + index; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const WORD *src_bits = src_base + iLeft * src_pitch + index; - double value = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - value += (weight * (double)src_bits[0]); - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[0] = (WORD)CLAMP((int)(value + 0.5), 0, 0xFFFF); - - dst_bits += dst_pitch; - } - } - } - break; - - case FIT_RGB16: - { - // Calculate the number of words per pixel (1 for 16-bit, 3 for 48-bit or 4 for 64-bit) - const unsigned wordspp = (FreeImage_GetLine(src) / width) / sizeof(WORD); - - const unsigned dst_pitch = FreeImage_GetPitch(dst) / sizeof(WORD); - WORD *const dst_base = (WORD *)FreeImage_GetBits(dst); - - const unsigned src_pitch = FreeImage_GetPitch(src) / sizeof(WORD); - const WORD *const src_base = (WORD *)FreeImage_GetBits(src) + src_offset_y * src_pitch + src_offset_x * wordspp; - - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - const unsigned index = x * wordspp; // pixel index - WORD *dst_bits = dst_base + index; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const WORD *src_bits = src_base + iLeft * src_pitch + index; - double r = 0, g = 0, b = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - r += (weight * (double)src_bits[0]); - g += (weight * (double)src_bits[1]); - b += (weight * (double)src_bits[2]); - - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[0] = (WORD)CLAMP((int)(r + 0.5), 0, 0xFFFF); - dst_bits[1] = (WORD)CLAMP((int)(g + 0.5), 0, 0xFFFF); - dst_bits[2] = (WORD)CLAMP((int)(b + 0.5), 0, 0xFFFF); - - dst_bits += dst_pitch; - } - } - } - break; - - case FIT_RGBA16: - { - // Calculate the number of words per pixel (1 for 16-bit, 3 for 48-bit or 4 for 64-bit) - const unsigned wordspp = (FreeImage_GetLine(src) / width) / sizeof(WORD); - - const unsigned dst_pitch = FreeImage_GetPitch(dst) / sizeof(WORD); - WORD *const dst_base = (WORD *)FreeImage_GetBits(dst); - - const unsigned src_pitch = FreeImage_GetPitch(src) / sizeof(WORD); - const WORD *const src_base = (WORD *)FreeImage_GetBits(src) + src_offset_y * src_pitch + src_offset_x * wordspp; - - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - const unsigned index = x * wordspp; // pixel index - WORD *dst_bits = dst_base + index; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iLimit = weightsTable.getRightBoundary(y) - iLeft; // retrieve right boundary - const WORD *src_bits = src_base + iLeft * src_pitch + index; - double r = 0, g = 0, b = 0, a = 0; - - for (unsigned i = 0; i < iLimit; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i); - r += (weight * (double)src_bits[0]); - g += (weight * (double)src_bits[1]); - b += (weight * (double)src_bits[2]); - a += (weight * (double)src_bits[3]); - - src_bits += src_pitch; - } - - // clamp and place result in destination pixel - dst_bits[0] = (WORD)CLAMP((int)(r + 0.5), 0, 0xFFFF); - dst_bits[1] = (WORD)CLAMP((int)(g + 0.5), 0, 0xFFFF); - dst_bits[2] = (WORD)CLAMP((int)(b + 0.5), 0, 0xFFFF); - dst_bits[3] = (WORD)CLAMP((int)(a + 0.5), 0, 0xFFFF); - - dst_bits += dst_pitch; - } - } - } - break; - - case FIT_FLOAT: - case FIT_RGBF: - case FIT_RGBAF: - { - // Calculate the number of floats per pixel (1 for 32-bit, 3 for 96-bit or 4 for 128-bit) - const unsigned floatspp = (FreeImage_GetLine(src) / width) / sizeof(float); - - const unsigned dst_pitch = FreeImage_GetPitch(dst) / sizeof(float); - float *const dst_base = (float *)FreeImage_GetBits(dst); - - const unsigned src_pitch = FreeImage_GetPitch(src) / sizeof(float); - const float *const src_base = (float *)FreeImage_GetBits(src) + src_offset_y * src_pitch + src_offset_x * floatspp; - - for (unsigned x = 0; x < width; x++) { - // work on column x in dst - const unsigned index = x * floatspp; // pixel index - float *dst_bits = (float *)dst_base + index; - - // scale each column - for (unsigned y = 0; y < dst_height; y++) { - // loop through column - const unsigned iLeft = weightsTable.getLeftBoundary(y); // retrieve left boundary - const unsigned iRight = weightsTable.getRightBoundary(y); // retrieve right boundary - const float *src_bits = src_base + iLeft * src_pitch + index; - double value[4] = {0, 0, 0, 0}; // 4 = 128 bpp max - - for (unsigned i = iLeft; i < iRight; i++) { - // scan between boundaries - // accumulate weighted effect of each neighboring pixel - const double weight = weightsTable.getWeight(y, i - iLeft); - for (unsigned j = 0; j < floatspp; j++) { - value[j] += (weight * (double)src_bits[j]); - } - src_bits += src_pitch; - } - - // place result in destination pixel - for (unsigned j = 0; j < floatspp; j++) { - dst_bits[j] = (float)value[j]; - } - dst_bits += dst_pitch; - } - } - } - break; - } -} diff --git a/Dependencies/FreeImage/Source/FreeImageToolkit/Resize.h b/Dependencies/FreeImage/Source/FreeImageToolkit/Resize.h deleted file mode 100644 index ce1d732..0000000 --- a/Dependencies/FreeImage/Source/FreeImageToolkit/Resize.h +++ /dev/null @@ -1,196 +0,0 @@ -// ========================================================== -// Upsampling / downsampling classes -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Detlev Vendt (detlev.vendt@brillit.de) -// - Carsten Klein (cklein05@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifndef _RESIZE_H_ -#define _RESIZE_H_ - -#include "FreeImage.h" -#include "Utilities.h" -#include "Filters.h" - -/** - Filter weights table.
- This class stores contribution information for an entire line (row or column). -*/ -class CWeightsTable -{ -/** - Sampled filter weight table.
- Contribution information for a single pixel -*/ -typedef struct { - /// Normalized weights of neighboring pixels - double *Weights; - /// Bounds of source pixels window - unsigned Left, Right; -} Contribution; - -private: - /// Row (or column) of contribution weights - Contribution *m_WeightTable; - /// Filter window size (of affecting source pixels) - unsigned m_WindowSize; - /// Length of line (no. of rows / cols) - unsigned m_LineLength; - -public: - /** - Constructor
- Allocate and compute the weights table - @param pFilter Filter used for upsampling or downsampling - @param uDstSize Length (in pixels) of the destination line buffer - @param uSrcSize Length (in pixels) of the source line buffer - */ - CWeightsTable(CGenericFilter *pFilter, unsigned uDstSize, unsigned uSrcSize); - - /** - Destructor
- Destroy the weights table - */ - ~CWeightsTable(); - - /** Retrieve a filter weight, given source and destination positions - @param dst_pos Pixel position in destination line buffer - @param src_pos Pixel position in source line buffer - @return Returns the filter weight - */ - double getWeight(unsigned dst_pos, unsigned src_pos) { - return m_WeightTable[dst_pos].Weights[src_pos]; - } - - /** Retrieve left boundary of source line buffer - @param dst_pos Pixel position in destination line buffer - @return Returns the left boundary of source line buffer - */ - unsigned getLeftBoundary(unsigned dst_pos) { - return m_WeightTable[dst_pos].Left; - } - - /** Retrieve right boundary of source line buffer - @param dst_pos Pixel position in destination line buffer - @return Returns the right boundary of source line buffer - */ - unsigned getRightBoundary(unsigned dst_pos) { - return m_WeightTable[dst_pos].Right; - } -}; - -// --------------------------------------------- - -/** - CResizeEngine
- This class performs filtered zoom. It scales an image to the desired dimensions with - any of the CGenericFilter derived filter class.
- It works with FIT_BITMAP buffers, WORD buffers (FIT_UINT16, FIT_RGB16, FIT_RGBA16) - and float buffers (FIT_FLOAT, FIT_RGBF, FIT_RGBAF).

- - References :
- [1] Paul Heckbert, C code to zoom raster images up or down, with nice filtering. - UC Berkeley, August 1989. [online] http://www-2.cs.cmu.edu/afs/cs.cmu.edu/Web/People/ph/heckbert.html - [2] Eran Yariv, Two Pass Scaling using Filters. The Code Project, December 1999. - [online] http://www.codeproject.com/bitmap/2_pass_scaling.asp - -*/ -class CResizeEngine -{ -private: - /// Pointer to the FIR / IIR filter - CGenericFilter* m_pFilter; - -public: - - /** - Constructor - @param filter FIR /IIR filter to be used - */ - CResizeEngine(CGenericFilter* filter):m_pFilter(filter) {} - - /// Destructor - virtual ~CResizeEngine() {} - - /** Scale an image to the desired dimensions. - - Method CResizeEngine::scale, as well as the two filtering methods - CResizeEngine::horizontalFilter and CResizeEngine::verticalFilter take - four additional parameters, that define a rectangle in the source - image to be rescaled. - - These are src_left, src_top, src_width and src_height and should work - like these of function FreeImage_Copy. However, src_left and src_top are - actually named src_offset_x and src_offset_y in the filtering methods. - - Additionally, since src_height and dst_height are always the same for - method horizontalFilter as src_width and dst_width are always the same - for verticalFilter, these have been stripped down to a single parameter - height and width for horizontalFilter and verticalFilter respectively. - - Currently, method scale is called with the actual size of the source - image. However, in a future version, we could provide a new function - called FreeImage_RescaleRect that rescales only part of an image. - - @param src Pointer to the source image - @param dst_width Destination image width - @param dst_height Destination image height - @param src_left Left boundary of the source rectangle to be scaled - @param src_top Top boundary of the source rectangle to be scaled - @param src_width Width of the source rectangle to be scaled - @param src_height Height of the source rectangle to be scaled - @return Returns the scaled image if successful, returns NULL otherwise - */ - FIBITMAP* scale(FIBITMAP *src, unsigned dst_width, unsigned dst_height, unsigned src_left, unsigned src_top, unsigned src_width, unsigned src_height, unsigned flags); - -private: - - /** - Performs horizontal image filtering - - @param src Source image - @param height Source / Destination image height - @param src_width Source image width - @param src_offset_x - @param src_offset_y - @param src_pal - @param dst Destination image - @param dst_width Destination image width - */ - void horizontalFilter(FIBITMAP * const src, const unsigned height, const unsigned src_width, - const unsigned src_offset_x, const unsigned src_offset_y, const RGBQUAD * const src_pal, - FIBITMAP * const dst, const unsigned dst_width); - - /** - Performs vertical image filtering - @param src Source image - @param width Source / Destination image width - @param src_height Source image height - @param src_offset_x - @param src_offset_y - @param src_pal - @param dst Destination image - @param dst_height Destination image height - */ - void verticalFilter(FIBITMAP * const src, const unsigned width, const unsigned src_height, - const unsigned src_offset_x, const unsigned src_offset_y, const RGBQUAD * const src_pal, - FIBITMAP * const dst, const unsigned dst_height); -}; - -#endif // _RESIZE_H_ diff --git a/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2013.vcxproj b/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2013.vcxproj deleted file mode 100644 index b1d2e01..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2013.vcxproj +++ /dev/null @@ -1,258 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - LibJPEG - {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9} - LibJPEG - - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - EditAndContinue - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - Full - AnySuitable - true - Speed - true - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - X64 - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - ProgramDatabase - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - X64 - - - Full - AnySuitable - true - Speed - true - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2013.vcxproj.filters b/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2013.vcxproj.filters deleted file mode 100644 index 94ad9ef..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2013.vcxproj.filters +++ /dev/null @@ -1,188 +0,0 @@ - - - - - {2fa193f8-a23e-4078-8ff6-6bf5b443df38} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {66abfe69-3f1d-455a-afad-997a86d09b0b} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2017.vcxproj b/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2017.vcxproj deleted file mode 100644 index e97ab6e..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2017.vcxproj +++ /dev/null @@ -1,259 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - LibJPEG - {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9} - LibJPEG - 10.0.16299.0 - - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - EditAndContinue - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - Full - AnySuitable - true - Speed - true - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - X64 - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - ProgramDatabase - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - X64 - - - Full - AnySuitable - true - Speed - true - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2017.vcxproj.filters b/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2017.vcxproj.filters deleted file mode 100644 index 94ad9ef..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/LibJPEG.2017.vcxproj.filters +++ /dev/null @@ -1,188 +0,0 @@ - - - - - {2fa193f8-a23e-4078-8ff6-6bf5b443df38} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {66abfe69-3f1d-455a-afad-997a86d09b0b} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibJPEG/README b/Dependencies/FreeImage/Source/LibJPEG/README deleted file mode 100644 index 56cdb60..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/README +++ /dev/null @@ -1,378 +0,0 @@ -The Independent JPEG Group's JPEG software -========================================== - -README for release 9c of 14-Jan-2018 -==================================== - -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, -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. - 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-2018, 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. - -The IJG distribution formerly included code to read and write GIF files. -To avoid entanglement with the Unisys LZW patent (now expired), GIF reading -support has been removed altogether, and the GIF writer has been simplified -to produce "uncompressed GIFs". This technique does not use the LZW -algorithm; the resulting GIF files are larger than usual, but are readable -by all standard GIF decoders. - - -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 http://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 http://www.itu.int/rec/T-REC-T.871. -A PDF file of the older JFIF document is available at -http://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 -http://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 as -http://www.ijg.org/files/jpegsrc.v9c.tar.gz, and in Windows-compatible -"zip" archive format as http://www.ijg.org/files/jpegsr9c.zip. - -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, and Ulf-Dietrich Braumann 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@jpegclub.org. diff --git a/Dependencies/FreeImage/Source/LibJPEG/cderror.h b/Dependencies/FreeImage/Source/LibJPEG/cderror.h deleted file mode 100644 index fd1884f..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/cderror.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * cderror.h - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2009-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 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(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/Dependencies/FreeImage/Source/LibJPEG/cdjpeg.c b/Dependencies/FreeImage/Source/LibJPEG/cdjpeg.c deleted file mode 100644 index b6250ff..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/cdjpeg.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/cdjpeg.h b/Dependencies/FreeImage/Source/LibJPEG/cdjpeg.h deleted file mode 100644 index ed024ac..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/cdjpeg.h +++ /dev/null @@ -1,187 +0,0 @@ -/* - * cdjpeg.h - * - * Copyright (C) 1994-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 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)); -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/Dependencies/FreeImage/Source/LibJPEG/change.log b/Dependencies/FreeImage/Source/LibJPEG/change.log deleted file mode 100644 index 674a558..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/change.log +++ /dev/null @@ -1,453 +0,0 @@ -CHANGE LOG for Independent JPEG Group's JPEG software - - -Version 9c 14-Jan-2018 ------------------------ - -jpegtran: add an option to the -wipe switch to fill the region -with the average of adjacent blocks, instead of gray out. -Thank to Caitlyn Feddock and Maddie Ziegler for inspiration. - -Make range extension bits adjustable (in jpegint.h). -Thank to Robin Watts for suggestion. - -Provide macros for fflush() and ferror() in jinclude.h in order -to facilitate adaption by applications using an own FILE class. -Thank to Gerhard Huber for suggestion. - -Add libjpeg pkg-config file. Thank to Mark Lavi, Vincent Torri, -Patrick McMunn, and Huw Davies for suggestion. - -Add sanity checks in cjpeg image reader modules. -Thank to Bingchang, Liu for reports. - - -Version 9b 17-Jan-2016 ------------------------ - -Improvements and optimizations in DCT and color calculations. -Normalize range limit array composition and access pattern. -Thank to Sia Furler and Maddie Ziegler for inspiration. - -Use merged upsample with scaled DCT sizes larger than 8. -Thank to Taylor Hatala for inspiration. - -Check for excessive comment lengths in argument parsing in wrjpgcom.c. -Thank to Julian Cohen for hint. - -Add makefile.b32 for use with Borland C++ 32-bit (bcc32). -Thank to Joe Slater for contribution. - -Document 'f' specifier for jpegtran -crop specification. -Thank to Michele Martone for suggestion. - -Use defined value from header instead of hardwired number in rdswitch.c. -Thank to Robert Sprowson for hint. - - -Version 9a 19-Jan-2014 ------------------------ - -Add support for wide gamut color spaces (JFIF version 2). -Improve clarity and accuracy in color conversion modules. -Note: Requires rebuild of test images. - -Extend the bit depth support to all values from 8 to 12 -(BITS_IN_JSAMPLE configuration option in jmorecfg.h). -jpegtran now supports N bits sample data precision with all N from 8 to 12 -in a single instance. Thank to Roland Fassauer for inspiration. - -Try to resolve issues with new boolean type definition. -Thank also to v4hn for suggestion. - -Enable option to use default Huffman tables for lossless compression -(for hardware solution), and in this case improve lossless RGB compression -with reversible color transform. Thank to Benny Alexandar for hint. - -Extend the entropy decoding structure, so that extraneous bytes between -compressed scan data and following marker can be reported correctly. -Thank to Nigel Tao for hint. - -Add jpegtran -wipe option and extension for -crop. -Thank to Andrew Senior, David Clunie, and Josef Schmid for suggestion. - - -Version 9 13-Jan-2013 ----------------------- - -Add cjpeg -rgb1 option to create an RGB JPEG file, and insert -a simple reversible color transform into the processing which -significantly improves the compression. -The recommended command for lossless coding of RGB images is now -cjpeg -rgb1 -block 1 -arithmetic. -As said, this option improves the compression significantly, but -the files are not compatible with JPEG decoders prior to IJG v9 -due to the included color transform. -The used color transform and marker signaling is compatible with -other JPEG standards (e.g., JPEG-LS part 2). - -Remove the automatic de-ANSI-fication support (Automake 1.12). -Thank also to Nitin A Kamble for suggestion. - -Add remark for jpeg_mem_dest() in jdatadst.c. -Thank to Elie-Gregoire Khoury for the hint. - -Support files with invalid component identifiers (created -by Adobe PDF). Thank to Robin Watts for the suggestion. - -Adapt full buffer case in jcmainct.c for use with scaled DCT. -Thank to Sergii Biloshytskyi for the suggestion. - -Add type identifier for declaration of noreturn functions. -Thank to Brett L. Moore for the suggestion. - -Correct argument type in format string, avoid compiler warnings. -Thank to Vincent Torri for hint. - -Add missing #include directives in configuration checks, avoid -configuration errors. Thank to John Spencer for the hint. - - -Version 8d 15-Jan-2012 ------------------------ - -Add cjpeg -rgb option to create RGB JPEG files. -Using this switch suppresses the conversion from RGB -colorspace input to the default YCbCr JPEG colorspace. -This feature allows true lossless JPEG coding of RGB color images. -The recommended command for this purpose is currently -cjpeg -rgb -block 1 -arithmetic. -SmartScale capable decoder (introduced with IJG JPEG 8) required. -Thank to Michael Koch for the initial suggestion. - -Add option to disable the region adjustment in the transupp crop code. -Thank to Jeffrey Friedl for the suggestion. - -Thank to Richard Jones and Edd Dawson for various minor corrections. - -Thank to Akim Demaille for configure.ac cleanup. - - -Version 8c 16-Jan-2011 ------------------------ - -Add option to compression library and cjpeg (-block N) to use -different DCT block size. -All N from 1 to 16 are possible. Default is 8 (baseline format). -Larger values produce higher compression, -smaller values produce higher quality. -SmartScale capable decoder (introduced with IJG JPEG 8) required. - - -Version 8b 16-May-2010 ------------------------ - -Repair problem in new memory source manager with corrupt JPEG data. -Thank to Ted Campbell and Samuel Chun for the report. - -Repair problem in Makefile.am test target. -Thank to anonymous user for the report. - -Support MinGW installation with automatic configure. -Thank to Volker Grabsch for the suggestion. - - -Version 8a 28-Feb-2010 ------------------------ - -Writing tables-only datastreams via jpeg_write_tables works again. - -Support 32-bit BMPs (RGB image with Alpha channel) for read in cjpeg. -Thank to Brett Blackham for the suggestion. - -Improve accuracy in floating point IDCT calculation. -Thank to Robert Hooke for the hint. - - -Version 8 10-Jan-2010 ----------------------- - -jpegtran now supports the same -scale option as djpeg for "lossless" resize. -An implementation of the JPEG SmartScale extension is required for this -feature. A (draft) specification of the JPEG SmartScale extension is -available as a contributed document at ITU and ISO. Revision 2 or later -of the document is required (latest document version is Revision 3). -The SmartScale extension will enable more features beside lossless resize -in future implementations, as described in the document (new compression -options). - -Add sanity check in BMP reader module to avoid cjpeg crash for empty input -image (thank to Isaev Ildar of ISP RAS, Moscow, RU for reporting this error). - -Add data source and destination managers for read from and write to -memory buffers. New API functions jpeg_mem_src and jpeg_mem_dest. -Thank to Roberto Boni from Italy for the suggestion. - - -Version 7 27-Jun-2009 ----------------------- - -New scaled DCTs implemented. -djpeg now supports scalings N/8 with all N from 1 to 16. -cjpeg now supports scalings 8/N with all N from 1 to 16. -Scaled DCTs with size larger than 8 are now also used for resolving the -common 2x2 chroma subsampling case without additional spatial resampling. -Separate spatial resampling for those kind of files is now only necessary -for N>8 scaling cases. -Furthermore, separate scaled DCT functions are provided for direct resolving -of the common asymmetric subsampling cases (2x1 and 1x2) without additional -spatial resampling. - -cjpeg -quality option has been extended for support of separate quality -settings for luminance and chrominance (or in general, for every provided -quantization table slot). -New API function jpeg_default_qtables() and q_scale_factor array in library. - -Added -nosmooth option to cjpeg, complementary to djpeg. -New variable "do_fancy_downsampling" in library, complement to fancy -upsampling. Fancy upsampling now uses direct DCT scaling with sizes -larger than 8. The old method is not reversible and has been removed. - -Support arithmetic entropy encoding and decoding. -Added files jaricom.c, jcarith.c, jdarith.c. - -Straighten the file structure: -Removed files jidctred.c, jcphuff.c, jchuff.h, jdphuff.c, jdhuff.h. - -jpegtran has a new "lossless" cropping feature. - -Implement -perfect option in jpegtran, new API function -jtransform_perfect_transform() in transupp. (DP 204_perfect.dpatch) - -Better error messages for jpegtran fopen failure. -(DP 203_jpegtran_errmsg.dpatch) - -Fix byte order issue with 16bit PPM/PGM files in rdppm.c/wrppm.c: -according to Netpbm, the de facto standard implementation of the PNM formats, -the most significant byte is first. (DP 203_rdppm.dpatch) - -Add -raw option to rdjpgcom not to mangle the output. -(DP 205_rdjpgcom_raw.dpatch) - -Make rdjpgcom locale aware. (DP 201_rdjpgcom_locale.dpatch) - -Add extern "C" to jpeglib.h. -This avoids the need to put extern "C" { ... } around #include "jpeglib.h" -in your C++ application. Defining the symbol DONT_USE_EXTERN_C in the -configuration prevents this. (DP 202_jpeglib.h_c++.dpatch) - - -Version 6b 27-Mar-1998 ------------------------ - -jpegtran has new features for lossless image transformations (rotation -and flipping) as well as "lossless" reduction to grayscale. - -jpegtran now copies comments by default; it has a -copy switch to enable -copying all APPn blocks as well, or to suppress comments. (Formerly it -always suppressed comments and APPn blocks.) jpegtran now also preserves -JFIF version and resolution information. - -New decompressor library feature: COM and APPn markers found in the input -file can be saved in memory for later use by the application. (Before, -you had to code this up yourself with a custom marker processor.) - -There is an unused field "void * client_data" now in compress and decompress -parameter structs; this may be useful in some applications. - -JFIF version number information is now saved by the decoder and accepted by -the encoder. jpegtran uses this to copy the source file's version number, -to ensure "jpegtran -copy all" won't create bogus files that contain JFXX -extensions but claim to be version 1.01. Applications that generate their -own JFXX extension markers also (finally) have a supported way to cause the -encoder to emit JFIF version number 1.02. - -djpeg's trace mode reports JFIF 1.02 thumbnail images as such, rather -than as unknown APP0 markers. - -In -verbose mode, djpeg and rdjpgcom will try to print the contents of -APP12 markers as text. Some digital cameras store useful text information -in APP12 markers. - -Handling of truncated data streams is more robust: blocks beyond the one in -which the error occurs will be output as uniform gray, or left unchanged -if decoding a progressive JPEG. The appearance no longer depends on the -Huffman tables being used. - -Huffman tables are checked for validity much more carefully than before. - -To avoid the Unisys LZW patent, djpeg's GIF output capability has been -changed to produce "uncompressed GIFs", and cjpeg's GIF input capability -has been removed altogether. We're not happy about it either, but there -seems to be no good alternative. - -The configure script now supports building libjpeg as a shared library -on many flavors of Unix (all the ones that GNU libtool knows how to -build shared libraries for). Use "./configure --enable-shared" to -try this out. - -New jconfig file and makefiles for Microsoft Visual C++ and Developer Studio. -Also, a jconfig file and a build script for Metrowerks CodeWarrior -on Apple Macintosh. makefile.dj has been updated for DJGPP v2, and there -are miscellaneous other minor improvements in the makefiles. - -jmemmac.c now knows how to create temporary files following Mac System 7 -conventions. - -djpeg's -map switch is now able to read raw-format PPM files reliably. - -cjpeg -progressive -restart no longer generates any unnecessary DRI markers. - -Multiple calls to jpeg_simple_progression for a single JPEG object -no longer leak memory. - - -Version 6a 7-Feb-96 --------------------- - -Library initialization sequence modified to detect version mismatches -and struct field packing mismatches between library and calling application. -This change requires applications to be recompiled, but does not require -any application source code change. - -All routine declarations changed to the style "GLOBAL(type) name ...", -that is, GLOBAL, LOCAL, METHODDEF, EXTERN are now macros taking the -routine's return type as an argument. This makes it possible to add -Microsoft-style linkage keywords to all the routines by changing just -these macros. Note that any application code that was using these macros -will have to be changed. - -DCT coefficient quantization tables are now stored in normal array order -rather than zigzag order. Application code that calls jpeg_add_quant_table, -or otherwise manipulates quantization tables directly, will need to be -changed. If you need to make such code work with either older or newer -versions of the library, a test like "#if JPEG_LIB_VERSION >= 61" is -recommended. - -djpeg's trace capability now dumps DQT tables in natural order, not zigzag -order. This allows the trace output to be made into a "-qtables" file -more easily. - -New system-dependent memory manager module for use on Apple Macintosh. - -Fix bug in cjpeg's -smooth option: last one or two scanlines would be -duplicates of the prior line unless the image height mod 16 was 1 or 2. - -Repair minor problems in VMS, BCC, MC6 makefiles. - -New configure script based on latest GNU Autoconf. - -Correct the list of include files needed by MetroWerks C for ccommand(). - -Numerous small documentation updates. - - -Version 6 2-Aug-95 -------------------- - -Progressive JPEG support: library can read and write full progressive JPEG -files. A "buffered image" mode supports incremental decoding for on-the-fly -display of progressive images. Simply recompiling an existing IJG-v5-based -decoder with v6 should allow it to read progressive files, though of course -without any special progressive display. - -New "jpegtran" application performs lossless transcoding between different -JPEG formats; primarily, it can be used to convert baseline to progressive -JPEG and vice versa. In support of jpegtran, the library now allows lossless -reading and writing of JPEG files as DCT coefficient arrays. This ability -may be of use in other applications. - -Notes for programmers: -* We changed jpeg_start_decompress() to be able to suspend; this makes all -decoding modes available to suspending-input applications. However, -existing applications that use suspending input will need to be changed -to check the return value from jpeg_start_decompress(). You don't need to -do anything if you don't use a suspending data source. -* We changed the interface to the virtual array routines: access_virt_array -routines now take a count of the number of rows to access this time. The -last parameter to request_virt_array routines is now interpreted as the -maximum number of rows that may be accessed at once, but not necessarily -the height of every access. - - -Version 5b 15-Mar-95 ---------------------- - -Correct bugs with grayscale images having v_samp_factor > 1. - -jpeg_write_raw_data() now supports output suspension. - -Correct bugs in "configure" script for case of compiling in -a directory other than the one containing the source files. - -Repair bug in jquant1.c: sometimes didn't use as many colors as it could. - -Borland C makefile and jconfig file work under either MS-DOS or OS/2. - -Miscellaneous improvements to documentation. - - -Version 5a 7-Dec-94 --------------------- - -Changed color conversion roundoff behavior so that grayscale values are -represented exactly. (This causes test image files to change.) - -Make ordered dither use 16x16 instead of 4x4 pattern for a small quality -improvement. - -New configure script based on latest GNU Autoconf. -Fix configure script to handle CFLAGS correctly. -Rename *.auto files to *.cfg, so that configure script still works if -file names have been truncated for DOS. - -Fix bug in rdbmp.c: didn't allow for extra data between header and image. - -Modify rdppm.c/wrppm.c to handle 2-byte raw PPM/PGM formats for 12-bit data. - -Fix several bugs in rdrle.c. - -NEED_SHORT_EXTERNAL_NAMES option was broken. - -Revise jerror.h/jerror.c for more flexibility in message table. - -Repair oversight in jmemname.c NO_MKTEMP case: file could be there -but unreadable. - - -Version 5 24-Sep-94 --------------------- - -Version 5 represents a nearly complete redesign and rewrite of the IJG -software. Major user-visible changes include: - * Automatic configuration simplifies installation for most Unix systems. - * A range of speed vs. image quality tradeoffs are supported. - This includes resizing of an image during decompression: scaling down - by a factor of 1/2, 1/4, or 1/8 is handled very efficiently. - * New programs rdjpgcom and wrjpgcom allow insertion and extraction - of text comments in a JPEG file. - -The application programmer's interface to the library has changed completely. -Notable improvements include: - * We have eliminated the use of callback routines for handling the - uncompressed image data. The application now sees the library as a - set of routines that it calls to read or write image data on a - scanline-by-scanline basis. - * The application image data is represented in a conventional interleaved- - pixel format, rather than as a separate array for each color channel. - This can save a copying step in many programs. - * The handling of compressed data has been cleaned up: the application can - supply routines to source or sink the compressed data. It is possible to - suspend processing on source/sink buffer overrun, although this is not - supported in all operating modes. - * All static state has been eliminated from the library, so that multiple - instances of compression or decompression can be active concurrently. - * JPEG abbreviated datastream formats are supported, ie, quantization and - Huffman tables can be stored separately from the image data. - * And not only that, but the documentation of the library has improved - considerably! - - -The last widely used release before the version 5 rewrite was version 4A of -18-Feb-93. Change logs before that point have been discarded, since they -are not of much interest after the rewrite. diff --git a/Dependencies/FreeImage/Source/LibJPEG/cjpeg.c b/Dependencies/FreeImage/Source/LibJPEG/cjpeg.c deleted file mode 100644 index 3cb07fa..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/cjpeg.c +++ /dev/null @@ -1,664 +0,0 @@ -/* - * cjpeg.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2003-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 a command-line user interface for the JPEG compressor. - * It should work on any system with Unix- or MS-DOS-style command lines. - * - * Two different command line styles are permitted, depending on the - * compile-time switch TWO_FILE_COMMANDLINE: - * cjpeg [options] inputfile outputfile - * cjpeg [options] [inputfile] - * In the second style, output is always to standard output, which you'd - * normally redirect to a file or pipe to some other program. Input is - * either from a named file or from standard input (typically redirected). - * The second style is convenient on Unix but is unhelpful on systems that - * don't support pipes. Also, you MUST use the first style if your system - * doesn't do binary I/O to stdin/stdout. - * To simplify script writing, the "-outfile" switch is provided. The syntax - * cjpeg [options] -outfile outputfile inputfile - * works regardless of which command line style is used. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include "jversion.h" /* for version message */ - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - - -/* Create the add-on message string table. */ - -#define JMESSAGE(code,string) string , - -static const char * const cdjpeg_message_table[] = { -#include "cderror.h" - NULL -}; - - -/* - * This routine determines what format the input file is, - * and selects the appropriate input-reading module. - * - * To determine which family of input formats the file belongs to, - * we may look only at the first byte of the file, since C does not - * guarantee that more than one character can be pushed back with ungetc. - * Looking at additional bytes would require one of these approaches: - * 1) assume we can fseek() the input file (fails for piped input); - * 2) assume we can push back more than one character (works in - * some C implementations, but unportable); - * 3) provide our own buffering (breaks input readers that want to use - * stdio directly, such as the RLE library); - * or 4) don't put back the data, and modify the input_init methods to assume - * they start reading after the start of file (also breaks RLE library). - * #1 is attractive for MS-DOS but is untenable on Unix. - * - * The most portable solution for file types that can't be identified by their - * first byte is to make the user tell us what they are. This is also the - * only approach for "raw" file types that contain only arbitrary values. - * We presently apply this method for Targa files. Most of the time Targa - * files start with 0x00, so we recognize that case. Potentially, however, - * a Targa file could start with any byte value (byte 0 is the length of the - * seldom-used ID field), so we provide a switch to force Targa input mode. - */ - -static boolean is_targa; /* records user -targa switch */ - - -LOCAL(cjpeg_source_ptr) -select_file_type (j_compress_ptr cinfo, FILE * infile) -{ - int c; - - if (is_targa) { -#ifdef TARGA_SUPPORTED - return jinit_read_targa(cinfo); -#else - ERREXIT(cinfo, JERR_TGA_NOTCOMP); -#endif - } - - if ((c = getc(infile)) == EOF) - ERREXIT(cinfo, JERR_INPUT_EMPTY); - if (ungetc(c, infile) == EOF) - ERREXIT(cinfo, JERR_UNGETC_FAILED); - - switch (c) { -#ifdef BMP_SUPPORTED - case 'B': - return jinit_read_bmp(cinfo); -#endif -#ifdef GIF_SUPPORTED - case 'G': - return jinit_read_gif(cinfo); -#endif -#ifdef PPM_SUPPORTED - case 'P': - return jinit_read_ppm(cinfo); -#endif -#ifdef RLE_SUPPORTED - case 'R': - return jinit_read_rle(cinfo); -#endif -#ifdef TARGA_SUPPORTED - case 0x00: - return jinit_read_targa(cinfo); -#endif - default: - ERREXIT(cinfo, JERR_UNKNOWN_FORMAT); - break; - } - - return NULL; /* suppress compiler warnings */ -} - - -/* - * Argument-parsing code. - * The switch parser is designed to be useful with DOS-style command line - * syntax, ie, intermixed switches and file names, where only the switches - * to the left of a given file name affect processing of that file. - * The main program in this file doesn't actually use this capability... - */ - - -static const char * progname; /* program name for error messages */ -static char * outfilename; /* for -outfile switch */ - - -LOCAL(void) -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -quality N[,...] Compression quality (0..100; 5-95 is useful range)\n"); - fprintf(stderr, " -grayscale Create monochrome JPEG file\n"); - fprintf(stderr, " -rgb Create RGB JPEG file\n"); -#ifdef ENTROPY_OPT_SUPPORTED - fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); -#endif -#ifdef C_PROGRESSIVE_SUPPORTED - fprintf(stderr, " -progressive Create progressive JPEG file\n"); -#endif -#ifdef DCT_SCALING_SUPPORTED - fprintf(stderr, " -scale M/N Scale image by fraction M/N, eg, 1/2\n"); -#endif -#ifdef TARGA_SUPPORTED - fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n"); -#endif - fprintf(stderr, "Switches for advanced users:\n"); -#ifdef C_ARITH_CODING_SUPPORTED - fprintf(stderr, " -arithmetic Use arithmetic coding\n"); -#endif -#ifdef DCT_SCALING_SUPPORTED - fprintf(stderr, " -block N DCT block size (1..16; default is 8)\n"); -#endif -#if JPEG_LIB_VERSION_MAJOR >= 9 - fprintf(stderr, " -rgb1 Create RGB JPEG file with reversible color transform\n"); - fprintf(stderr, " -bgycc Create big gamut YCC JPEG file\n"); -#endif -#ifdef DCT_ISLOW_SUPPORTED - fprintf(stderr, " -dct int Use integer DCT method%s\n", - (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); -#endif -#ifdef DCT_IFAST_SUPPORTED - fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", - (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); -#endif -#ifdef DCT_FLOAT_SUPPORTED - fprintf(stderr, " -dct float Use floating-point DCT method%s\n", - (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); -#endif - fprintf(stderr, " -nosmooth Don't use high-quality downsampling\n"); - fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); -#ifdef INPUT_SMOOTHING_SUPPORTED - fprintf(stderr, " -smooth N Smooth dithered input (N=1..100 is strength)\n"); -#endif - fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); - fprintf(stderr, " -outfile name Specify name for output file\n"); - fprintf(stderr, " -verbose or -debug Emit debug output\n"); - fprintf(stderr, "Switches for wizards:\n"); - fprintf(stderr, " -baseline Force baseline quantization tables\n"); - fprintf(stderr, " -qtables file Use quantization tables given in file\n"); - fprintf(stderr, " -qslots N[,...] Set component quantization tables\n"); - fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n"); -#ifdef C_MULTISCAN_FILES_SUPPORTED - fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); -#endif - exit(EXIT_FAILURE); -} - - -LOCAL(int) -parse_switches (j_compress_ptr cinfo, int argc, char **argv, - int last_file_arg_seen, boolean for_real) -/* Parse optional switches. - * Returns argv[] index of first file-name argument (== argc if none). - * Any file names with indexes <= last_file_arg_seen are ignored; - * they have presumably been processed in a previous iteration. - * (Pass 0 for last_file_arg_seen on the first or only iteration.) - * for_real is FALSE on the first (dummy) pass; we may skip any expensive - * processing. - */ -{ - int argn; - char * arg; - boolean force_baseline; - boolean simple_progressive; - char * qualityarg = NULL; /* saves -quality parm if any */ - char * qtablefile = NULL; /* saves -qtables filename if any */ - char * qslotsarg = NULL; /* saves -qslots parm if any */ - char * samplearg = NULL; /* saves -sample parm if any */ - char * scansarg = NULL; /* saves -scans parm if any */ - - /* Set up default JPEG parameters. */ - - force_baseline = FALSE; /* by default, allow 16-bit quantizers */ - simple_progressive = FALSE; - is_targa = FALSE; - outfilename = NULL; - cinfo->err->trace_level = 0; - - /* Scan command line options, adjust parameters */ - - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (*arg != '-') { - /* Not a switch, must be a file name argument */ - if (argn <= last_file_arg_seen) { - outfilename = NULL; /* -outfile applies to just one input file */ - continue; /* ignore this name if previously processed */ - } - break; /* else done parsing switches */ - } - arg++; /* advance past switch marker character */ - - if (keymatch(arg, "arithmetic", 1)) { - /* Use arithmetic coding. */ -#ifdef C_ARITH_CODING_SUPPORTED - cinfo->arith_code = TRUE; -#else - fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "baseline", 2)) { - /* Force baseline-compatible output (8-bit quantizer values). */ - force_baseline = TRUE; - - } else if (keymatch(arg, "block", 2)) { - /* Set DCT block size. */ -#if defined DCT_SCALING_SUPPORTED && JPEG_LIB_VERSION_MAJOR >= 8 && \ - (JPEG_LIB_VERSION_MAJOR > 8 || JPEG_LIB_VERSION_MINOR >= 3) - int val; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &val) != 1) - usage(); - if (val < 1 || val > 16) - usage(); - cinfo->block_size = val; -#else - fprintf(stderr, "%s: sorry, block size setting not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "dct", 2)) { - /* Select DCT algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "int", 1)) { - cinfo->dct_method = JDCT_ISLOW; - } else if (keymatch(argv[argn], "fast", 2)) { - cinfo->dct_method = JDCT_IFAST; - } else if (keymatch(argv[argn], "float", 2)) { - cinfo->dct_method = JDCT_FLOAT; - } else - usage(); - - } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { - /* Enable debug printouts. */ - /* On first -d, print version identification */ - static boolean printed_version = FALSE; - - if (! printed_version) { - fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n", - JVERSION, JCOPYRIGHT); - printed_version = TRUE; - } - cinfo->err->trace_level++; - - } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { - /* Force a monochrome JPEG file to be generated. */ - jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); - - } else if (keymatch(arg, "rgb", 3) || keymatch(arg, "rgb1", 4)) { - /* Force an RGB JPEG file to be generated. */ -#if JPEG_LIB_VERSION_MAJOR >= 9 - /* Note: Entropy table assignment in jpeg_set_colorspace depends - * on color_transform. - */ - cinfo->color_transform = arg[3] ? JCT_SUBTRACT_GREEN : JCT_NONE; -#endif - jpeg_set_colorspace(cinfo, JCS_RGB); - - } else if (keymatch(arg, "bgycc", 5)) { - /* Force a big gamut YCC JPEG file to be generated. */ -#if JPEG_LIB_VERSION_MAJOR >= 9 && \ - (JPEG_LIB_VERSION_MAJOR > 9 || JPEG_LIB_VERSION_MINOR >= 1) - jpeg_set_colorspace(cinfo, JCS_BG_YCC); -#else - fprintf(stderr, "%s: sorry, BG_YCC colorspace not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "maxmemory", 3)) { - /* Maximum memory in Kb (or Mb with 'm'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (ch == 'm' || ch == 'M') - lval *= 1000L; - cinfo->mem->max_memory_to_use = lval * 1000L; - - } else if (keymatch(arg, "nosmooth", 3)) { - /* Suppress fancy downsampling. */ - cinfo->do_fancy_downsampling = FALSE; - - } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { - /* Enable entropy parm optimization. */ -#ifdef ENTROPY_OPT_SUPPORTED - cinfo->optimize_coding = TRUE; -#else - fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "outfile", 4)) { - /* Set output file name. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - outfilename = argv[argn]; /* save it away for later use */ - - } else if (keymatch(arg, "progressive", 1)) { - /* Select simple progressive mode. */ -#ifdef C_PROGRESSIVE_SUPPORTED - simple_progressive = TRUE; - /* We must postpone execution until num_components is known. */ -#else - fprintf(stderr, "%s: sorry, progressive output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "quality", 1)) { - /* Quality ratings (quantization table scaling factors). */ - if (++argn >= argc) /* advance to next argument */ - usage(); - qualityarg = argv[argn]; - - } else if (keymatch(arg, "qslots", 2)) { - /* Quantization table slot numbers. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - qslotsarg = argv[argn]; - /* Must delay setting qslots until after we have processed any - * colorspace-determining switches, since jpeg_set_colorspace sets - * default quant table numbers. - */ - - } else if (keymatch(arg, "qtables", 2)) { - /* Quantization tables fetched from file. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - qtablefile = argv[argn]; - /* We postpone actually reading the file in case -quality comes later. */ - - } else if (keymatch(arg, "restart", 1)) { - /* Restart interval in MCU rows (or in MCUs with 'b'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (lval < 0 || lval > 65535L) - usage(); - if (ch == 'b' || ch == 'B') { - cinfo->restart_interval = (unsigned int) lval; - cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ - } else { - cinfo->restart_in_rows = (int) lval; - /* restart_interval will be computed during startup */ - } - - } else if (keymatch(arg, "sample", 2)) { - /* Set sampling factors. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - samplearg = argv[argn]; - /* Must delay setting sample factors until after we have processed any - * colorspace-determining switches, since jpeg_set_colorspace sets - * default sampling factors. - */ - - } else if (keymatch(arg, "scale", 4)) { - /* Scale the image by a fraction M/N. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%u/%u", - &cinfo->scale_num, &cinfo->scale_denom) != 2) - usage(); - - } else if (keymatch(arg, "scans", 4)) { - /* Set scan script. */ -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - scansarg = argv[argn]; - /* We must postpone reading the file in case -progressive appears. */ -#else - fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "smooth", 2)) { - /* Set input smoothing factor. */ - int val; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &val) != 1) - usage(); - if (val < 0 || val > 100) - usage(); - cinfo->smoothing_factor = val; - - } else if (keymatch(arg, "targa", 1)) { - /* Input file is Targa format. */ - is_targa = TRUE; - - } else { - usage(); /* bogus switch */ - } - } - - /* Post-switch-scanning cleanup */ - - if (for_real) { - - /* Set quantization tables for selected quality. */ - /* Some or all may be overridden if -qtables is present. */ - if (qualityarg != NULL) /* process -quality if it was present */ - if (! set_quality_ratings(cinfo, qualityarg, force_baseline)) - usage(); - - if (qtablefile != NULL) /* process -qtables if it was present */ - if (! read_quant_tables(cinfo, qtablefile, force_baseline)) - usage(); - - if (qslotsarg != NULL) /* process -qslots if it was present */ - if (! set_quant_slots(cinfo, qslotsarg)) - usage(); - - if (samplearg != NULL) /* process -sample if it was present */ - if (! set_sample_factors(cinfo, samplearg)) - usage(); - -#ifdef C_PROGRESSIVE_SUPPORTED - if (simple_progressive) /* process -progressive; -scans can override */ - jpeg_simple_progression(cinfo); -#endif - -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (scansarg != NULL) /* process -scans if it was present */ - if (! read_scan_script(cinfo, scansarg)) - usage(); -#endif - } - - return argn; /* return index of next arg (file name) */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; -#ifdef PROGRESS_REPORT - struct cdjpeg_progress_mgr progress; -#endif - int file_index; - cjpeg_source_ptr src_mgr; - FILE * input_file; - FILE * output_file; - JDIMENSION num_scanlines; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "cjpeg"; /* in case C library doesn't provide it */ - - /* Initialize the JPEG compression object with default error handling. */ - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_compress(&cinfo); - /* Add some application-specific error messages (from cderror.h) */ - jerr.addon_message_table = cdjpeg_message_table; - jerr.first_addon_message = JMSG_FIRSTADDONCODE; - jerr.last_addon_message = JMSG_LASTADDONCODE; - - /* Now safe to enable signal catcher. */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) &cinfo); -#endif - - /* Initialize JPEG parameters. - * Much of this may be overridden later. - * In particular, we don't yet know the input file's color space, - * but we need to provide some value for jpeg_set_defaults() to work. - */ - - cinfo.in_color_space = JCS_RGB; /* arbitrary guess */ - jpeg_set_defaults(&cinfo); - - /* Scan command line to find file names. - * It is convenient to use just one switch-parsing routine, but the switch - * values read here are ignored; we will rescan the switches after opening - * the input file. - */ - - file_index = parse_switches(&cinfo, argc, argv, 0, FALSE); - -#ifdef TWO_FILE_COMMANDLINE - /* Must have either -outfile switch or explicit output file name */ - if (outfilename == NULL) { - if (file_index != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - outfilename = argv[file_index+1]; - } else { - if (file_index != argc-1) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - } -#else - /* Unix style: expect zero or one file name */ - if (file_index < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } -#endif /* TWO_FILE_COMMANDLINE */ - - /* Open the input file. */ - if (file_index < argc) { - if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ - input_file = read_stdin(); - } - - /* Open the output file. */ - if (outfilename != NULL) { - if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, outfilename); - exit(EXIT_FAILURE); - } - } else { - /* default output file is stdout */ - output_file = write_stdout(); - } - -#ifdef PROGRESS_REPORT - start_progress_monitor((j_common_ptr) &cinfo, &progress); -#endif - - /* Figure out the input file format, and set up to read it. */ - src_mgr = select_file_type(&cinfo, input_file); - src_mgr->input_file = input_file; - - /* Read the input file header to obtain file size & colorspace. */ - (*src_mgr->start_input) (&cinfo, src_mgr); - - /* Now that we know input colorspace, fix colorspace-dependent defaults */ - jpeg_default_colorspace(&cinfo); - - /* Adjust default compression parameters by re-parsing the options */ - file_index = parse_switches(&cinfo, argc, argv, 0, TRUE); - - /* Specify data destination for compression */ - jpeg_stdio_dest(&cinfo, output_file); - - /* Start compressor */ - jpeg_start_compress(&cinfo, TRUE); - - /* Process data */ - while (cinfo.next_scanline < cinfo.image_height) { - num_scanlines = (*src_mgr->get_pixel_rows) (&cinfo, src_mgr); - (void) jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines); - } - - /* Finish compression and release memory */ - (*src_mgr->finish_input) (&cinfo, src_mgr); - jpeg_finish_compress(&cinfo); - jpeg_destroy_compress(&cinfo); - - /* Close files, if we opened them */ - if (input_file != stdin) - fclose(input_file); - if (output_file != stdout) - fclose(output_file); - -#ifdef PROGRESS_REPORT - end_progress_monitor((j_common_ptr) &cinfo); -#endif - - /* All done. */ - exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/ckconfig.c b/Dependencies/FreeImage/Source/LibJPEG/ckconfig.c deleted file mode 100644 index e658623..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/ckconfig.c +++ /dev/null @@ -1,402 +0,0 @@ -/* - * ckconfig.c - * - * Copyright (C) 1991-1994, 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 program is intended to help you determine how to configure the JPEG - * software for installation on a particular system. The idea is to try to - * compile and execute this program. If your compiler fails to compile the - * program, make changes as indicated in the comments below. Once you can - * compile the program, run it, and it will produce a "jconfig.h" file for - * your system. - * - * As a general rule, each time you try to compile this program, - * pay attention only to the *first* error message you get from the compiler. - * Many C compilers will issue lots of spurious error messages once they - * have gotten confused. Go to the line indicated in the first error message, - * and read the comments preceding that line to see what to change. - * - * Almost all of the edits you may need to make to this program consist of - * changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL", - * or vice versa. This is called defining or undefining that symbol. - */ - - -/* First we must see if your system has the include files we need. - * We start out with the assumption that your system has all the ANSI-standard - * include files. If you get any error trying to include one of these files, - * undefine the corresponding HAVE_xxx symbol. - */ - -#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */ -#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */ -#include -#endif - -#define HAVE_STDLIB_H /* same thing for stdlib.h */ -#ifdef HAVE_STDLIB_H -#include -#endif - -#include /* If you ain't got this, you ain't got C. */ - -/* We have to see if your string functions are defined by - * strings.h (old BSD convention) or string.h (everybody else). - * We try the non-BSD convention first; define NEED_BSD_STRINGS - * if the compiler says it can't find string.h. - */ - -#undef NEED_BSD_STRINGS - -#ifdef NEED_BSD_STRINGS -#include -#else -#include -#endif - -/* On some systems (especially older Unix machines), type size_t is - * defined only in the include file . If you get a failure - * on the size_t test below, try defining NEED_SYS_TYPES_H. - */ - -#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */ -#ifdef NEED_SYS_TYPES_H -#include -#endif - - -/* Usually type size_t is defined in one of the include files we've included - * above. If not, you'll get an error on the "typedef size_t my_size_t;" line. - * In that case, first try defining NEED_SYS_TYPES_H just above. - * If that doesn't work, you'll have to search through your system library - * to figure out which include file defines "size_t". Look for a line that - * says "typedef something-or-other size_t;". Then, change the line below - * that says "#include " to instead include the file - * you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find - * type size_t anywhere, try replacing "#include " with - * "typedef unsigned int size_t;". - */ - -#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */ - -#ifdef NEED_SPECIAL_INCLUDE -#include -#endif - -typedef size_t my_size_t; /* The payoff: do we have size_t now? */ - - -/* The next question is whether your compiler supports ANSI-style function - * prototypes. You need to know this in order to choose between using - * makefile.ansi and using makefile.unix. - * The #define line below is set to assume you have ANSI function prototypes. - * If you get an error in this group of lines, undefine HAVE_PROTOTYPES. - */ - -#define HAVE_PROTOTYPES - -#ifdef HAVE_PROTOTYPES -int testfunction (int arg1, int * arg2); /* check prototypes */ - -struct methods_struct { /* check method-pointer declarations */ - int (*error_exit) (char *msgtext); - int (*trace_message) (char *msgtext); - int (*another_method) (void); -}; - -int testfunction (int arg1, int * arg2) /* check definitions */ -{ - return arg2[arg1]; -} - -int test2function (void) /* check void arg list */ -{ - return 0; -} -#endif - - -/* Now we want to find out if your compiler knows what "unsigned char" means. - * If you get an error on the "unsigned char un_char;" line, - * then undefine HAVE_UNSIGNED_CHAR. - */ - -#define HAVE_UNSIGNED_CHAR - -#ifdef HAVE_UNSIGNED_CHAR -unsigned char un_char; -#endif - - -/* Now we want to find out if your compiler knows what "unsigned short" means. - * If you get an error on the "unsigned short un_short;" line, - * then undefine HAVE_UNSIGNED_SHORT. - */ - -#define HAVE_UNSIGNED_SHORT - -#ifdef HAVE_UNSIGNED_SHORT -unsigned short un_short; -#endif - - -/* Now we want to find out if your compiler understands type "void". - * If you get an error anywhere in here, undefine HAVE_VOID. - */ - -#define HAVE_VOID - -#ifdef HAVE_VOID -/* Caution: a C++ compiler will insist on complete prototypes */ -typedef void * void_ptr; /* check void * */ -#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */ -typedef void (*void_func) (int a, int b); -#else -typedef void (*void_func) (); -#endif - -#ifdef HAVE_PROTOTYPES /* check void function result */ -void test3function (void_ptr arg1, void_func arg2) -#else -void test3function (arg1, arg2) - void_ptr arg1; - void_func arg2; -#endif -{ - char * locptr = (char *) arg1; /* check casting to and from void * */ - arg1 = (void *) locptr; - (*arg2) (1, 2); /* check call of fcn returning void */ -} -#endif - - -/* Now we want to find out if your compiler knows what "const" means. - * If you get an error here, undefine HAVE_CONST. - */ - -#define HAVE_CONST - -#ifdef HAVE_CONST -static const int carray[3] = {1, 2, 3}; - -#ifdef HAVE_PROTOTYPES -int test4function (const int arg1) -#else -int test4function (arg1) - const int arg1; -#endif -{ - return carray[arg1]; -} -#endif - - -/* If you get an error or warning about this structure definition, - * define INCOMPLETE_TYPES_BROKEN. - */ - -#undef INCOMPLETE_TYPES_BROKEN - -#ifndef INCOMPLETE_TYPES_BROKEN -typedef struct undefined_structure * undef_struct_ptr; -#endif - - -/* If you get an error about duplicate names, - * define NEED_SHORT_EXTERNAL_NAMES. - */ - -#undef NEED_SHORT_EXTERNAL_NAMES - -#ifndef NEED_SHORT_EXTERNAL_NAMES - -int possibly_duplicate_function () -{ - return 0; -} - -int possibly_dupli_function () -{ - return 1; -} - -#endif - - - -/************************************************************************ - * OK, that's it. You should not have to change anything beyond this - * point in order to compile and execute this program. (You might get - * some warnings, but you can ignore them.) - * When you run the program, it will make a couple more tests that it - * can do automatically, and then it will create jconfig.h and print out - * any additional suggestions it has. - ************************************************************************ - */ - - -#ifdef HAVE_PROTOTYPES -int is_char_signed (int arg) -#else -int is_char_signed (arg) - int arg; -#endif -{ - if (arg == 189) { /* expected result for unsigned char */ - return 0; /* type char is unsigned */ - } - else if (arg != -67) { /* expected result for signed char */ - printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n"); - printf("I fear the JPEG software will not work at all.\n\n"); - } - return 1; /* assume char is signed otherwise */ -} - - -#ifdef HAVE_PROTOTYPES -int is_shifting_signed (long arg) -#else -int is_shifting_signed (arg) - long arg; -#endif -/* See whether right-shift on a long is signed or not. */ -{ - long res = arg >> 4; - - if (res == -0x7F7E80CL) { /* expected result for signed shift */ - return 1; /* right shift is signed */ - } - /* see if unsigned-shift hack will fix it. */ - /* we can't just test exact value since it depends on width of long... */ - res |= (~0L) << (32-4); - if (res == -0x7F7E80CL) { /* expected result now? */ - return 0; /* right shift is unsigned */ - } - printf("Right shift isn't acting as I expect it to.\n"); - printf("I fear the JPEG software will not work at all.\n\n"); - return 0; /* try it with unsigned anyway */ -} - - -#ifdef HAVE_PROTOTYPES -int main (int argc, char ** argv) -#else -int main (argc, argv) - int argc; - char ** argv; -#endif -{ - char signed_char_check = (char) (-67); - FILE *outfile; - - /* Attempt to write jconfig.h */ - if ((outfile = fopen("jconfig.h", "w")) == NULL) { - printf("Failed to write jconfig.h\n"); - return 1; - } - - /* Write out all the info */ - fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n"); - fprintf(outfile, "/* see jconfig.txt for explanations */\n\n"); -#ifdef HAVE_PROTOTYPES - fprintf(outfile, "#define HAVE_PROTOTYPES\n"); -#else - fprintf(outfile, "#undef HAVE_PROTOTYPES\n"); -#endif -#ifdef HAVE_UNSIGNED_CHAR - fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n"); -#else - fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n"); -#endif -#ifdef HAVE_UNSIGNED_SHORT - fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n"); -#else - fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n"); -#endif -#ifdef HAVE_VOID - fprintf(outfile, "/* #define void char */\n"); -#else - fprintf(outfile, "#define void char\n"); -#endif -#ifdef HAVE_CONST - fprintf(outfile, "/* #define const */\n"); -#else - fprintf(outfile, "#define const\n"); -#endif - if (is_char_signed((int) signed_char_check)) - fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n"); - else - fprintf(outfile, "#define CHAR_IS_UNSIGNED\n"); -#ifdef HAVE_STDDEF_H - fprintf(outfile, "#define HAVE_STDDEF_H\n"); -#else - fprintf(outfile, "#undef HAVE_STDDEF_H\n"); -#endif -#ifdef HAVE_STDLIB_H - fprintf(outfile, "#define HAVE_STDLIB_H\n"); -#else - fprintf(outfile, "#undef HAVE_STDLIB_H\n"); -#endif -#ifdef NEED_BSD_STRINGS - fprintf(outfile, "#define NEED_BSD_STRINGS\n"); -#else - fprintf(outfile, "#undef NEED_BSD_STRINGS\n"); -#endif -#ifdef NEED_SYS_TYPES_H - fprintf(outfile, "#define NEED_SYS_TYPES_H\n"); -#else - fprintf(outfile, "#undef NEED_SYS_TYPES_H\n"); -#endif - fprintf(outfile, "#undef NEED_FAR_POINTERS\n"); -#ifdef NEED_SHORT_EXTERNAL_NAMES - fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n"); -#else - fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n"); -#endif -#ifdef INCOMPLETE_TYPES_BROKEN - fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n"); -#else - fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n"); -#endif - fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n"); - if (is_shifting_signed(-0x7F7E80B1L)) - fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n"); - else - fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n"); - fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n"); - fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n"); - fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n"); - fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n"); - fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n"); - fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n"); - fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n"); - fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n"); - fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n"); - fprintf(outfile, "#undef DONT_USE_B_MODE\n"); - fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n"); - fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n"); - - /* Close the jconfig.h file */ - fclose(outfile); - - /* User report */ - printf("Configuration check for Independent JPEG Group's software done.\n"); - printf("\nI have written the jconfig.h file for you.\n\n"); -#ifdef HAVE_PROTOTYPES - printf("You should use makefile.ansi as the starting point for your Makefile.\n"); -#else - printf("You should use makefile.unix as the starting point for your Makefile.\n"); -#endif - -#ifdef NEED_SPECIAL_INCLUDE - printf("\nYou'll need to change jconfig.h to include the system include file\n"); - printf("that you found type size_t in, or add a direct definition of type\n"); - printf("size_t if that's what you used. Just add it to the end.\n"); -#endif - - return 0; -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/coderules.txt b/Dependencies/FreeImage/Source/LibJPEG/coderules.txt deleted file mode 100644 index 357929f..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/coderules.txt +++ /dev/null @@ -1,118 +0,0 @@ -IJG JPEG LIBRARY: CODING RULES - -Copyright (C) 1991-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. - - -Since numerous people will be contributing code and bug fixes, it's important -to establish a common coding style. The goal of using similar coding styles -is much more important than the details of just what that style is. - -In general we follow the recommendations of "Recommended C Style and Coding -Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and -Brader). This document is available in the IJG FTP archive (see -jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl). - -Block comments should be laid out thusly: - -/* - * Block comments in this style. - */ - -We indent statements in K&R style, e.g., - if (test) { - then-part; - } else { - else-part; - } -with two spaces per indentation level. (This indentation convention is -handled automatically by GNU Emacs and many other text editors.) - -Multi-word names should be written in lower case with underscores, e.g., -multi_word_name (not multiWordName). Preprocessor symbols and enum constants -are similar but upper case (MULTI_WORD_NAME). Names should be unique within -the first fifteen characters. (On some older systems, global names must be -unique within six characters. We accommodate this without cluttering the -source code by using macros to substitute shorter names.) - -We use function prototypes everywhere; we rely on automatic source code -transformation to feed prototype-less C compilers. Transformation is done -by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript). -ansi2knr is not very bright, so it imposes a format requirement on function -declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions -should be written in the following style: - -LOCAL(int *) -function_name (int a, char *b) -{ - code... -} - -Note that each function definition must begin with GLOBAL(type), LOCAL(type), -or METHODDEF(type). These macros expand to "static type" or just "type" as -appropriate. They provide a readable indication of the routine's usage and -can readily be changed for special needs. (For instance, special linkage -keywords can be inserted for use in Windows DLLs.) - -ansi2knr does not transform method declarations (function pointers in -structs). We handle these with a macro JMETHOD, defined as - #ifdef HAVE_PROTOTYPES - #define JMETHOD(type,methodname,arglist) type (*methodname) arglist - #else - #define JMETHOD(type,methodname,arglist) type (*methodname) () - #endif -which is used like this: - struct function_pointers { - JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp)); - JMETHOD(void, term_entropy_encoder, (void)); - }; -Note the set of parentheses surrounding the parameter list. - -A similar solution is used for forward and external function declarations -(see the EXTERN and JPP macros). - -If the code is to work on non-ANSI compilers, we cannot rely on a prototype -declaration to coerce actual parameters into the right types. Therefore, use -explicit casts on actual parameters whenever the actual parameter type is not -identical to the formal parameter. Beware of implicit conversions to "int". - -It seems there are some non-ANSI compilers in which the sizeof() operator -is defined to return int, yet size_t is defined as long. Needless to say, -this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(), -so that the result is guaranteed to be of type size_t. - - -The JPEG library is intended to be used within larger programs. Furthermore, -we want it to be reentrant so that it can be used by applications that process -multiple images concurrently. The following rules support these requirements: - -1. Avoid direct use of file I/O, "malloc", error report printouts, etc; -pass these through the common routines provided. - -2. Minimize global namespace pollution. Functions should be declared static -wherever possible. (Note that our method-based calling conventions help this -a lot: in many modules only the initialization function will ever need to be -called directly, so only that function need be externally visible.) All -global function names should begin with "jpeg_", and should have an -abbreviated name (unique in the first six characters) substituted by macro -when NEED_SHORT_EXTERNAL_NAMES is set. - -3. Don't use global variables; anything that must be used in another module -should be in the common data structures. - -4. Don't use static variables except for read-only constant tables. Variables -that should be private to a module can be placed into private structures (see -the system architecture document, structure.txt). - -5. Source file names should begin with "j" for files that are part of the -library proper; source files that are not part of the library, such as cjpeg.c -and djpeg.c, do not begin with "j". Keep source file names to eight -characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep -compression and decompression code in separate source files --- some -applications may want only one half of the library. - -Note: these rules (particularly #4) are not followed religiously in the -modules that are used in cjpeg/djpeg but are not part of the JPEG library -proper. Those modules are not really intended to be used in other -applications. diff --git a/Dependencies/FreeImage/Source/LibJPEG/djpeg.c b/Dependencies/FreeImage/Source/LibJPEG/djpeg.c deleted file mode 100644 index 0c9b89b..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/djpeg.c +++ /dev/null @@ -1,622 +0,0 @@ -/* - * djpeg.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2009-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 a command-line user interface for the JPEG decompressor. - * It should work on any system with Unix- or MS-DOS-style command lines. - * - * Two different command line styles are permitted, depending on the - * compile-time switch TWO_FILE_COMMANDLINE: - * djpeg [options] inputfile outputfile - * djpeg [options] [inputfile] - * In the second style, output is always to standard output, which you'd - * normally redirect to a file or pipe to some other program. Input is - * either from a named file or from standard input (typically redirected). - * The second style is convenient on Unix but is unhelpful on systems that - * don't support pipes. Also, you MUST use the first style if your system - * doesn't do binary I/O to stdin/stdout. - * To simplify script writing, the "-outfile" switch is provided. The syntax - * djpeg [options] -outfile outputfile inputfile - * works regardless of which command line style is used. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include "jversion.h" /* for version message */ - -#include /* to declare isprint() */ - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - - -/* Create the add-on message string table. */ - -#define JMESSAGE(code,string) string , - -static const char * const cdjpeg_message_table[] = { -#include "cderror.h" - NULL -}; - - -/* - * This list defines the known output image formats - * (not all of which need be supported by a given version). - * You can change the default output format by defining DEFAULT_FMT; - * indeed, you had better do so if you undefine PPM_SUPPORTED. - */ - -typedef enum { - FMT_BMP, /* BMP format (Windows flavor) */ - FMT_GIF, /* GIF format */ - FMT_OS2, /* BMP format (OS/2 flavor) */ - FMT_PPM, /* PPM/PGM (PBMPLUS formats) */ - FMT_RLE, /* RLE format */ - FMT_TARGA, /* Targa format */ - FMT_TIFF /* TIFF format */ -} IMAGE_FORMATS; - -#ifndef DEFAULT_FMT /* so can override from CFLAGS in Makefile */ -#define DEFAULT_FMT FMT_PPM -#endif - -static IMAGE_FORMATS requested_fmt; - - -/* - * Argument-parsing code. - * The switch parser is designed to be useful with DOS-style command line - * syntax, ie, intermixed switches and file names, where only the switches - * to the left of a given file name affect processing of that file. - * The main program in this file doesn't actually use this capability... - */ - - -static const char * progname; /* program name for error messages */ -static char * outfilename; /* for -outfile switch */ - - -LOCAL(void) -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -colors N Reduce image to no more than N colors\n"); - fprintf(stderr, " -fast Fast, low-quality processing\n"); - fprintf(stderr, " -grayscale Force grayscale output\n"); - fprintf(stderr, " -rgb Force RGB output\n"); -#ifdef IDCT_SCALING_SUPPORTED - fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n"); -#endif -#ifdef BMP_SUPPORTED - fprintf(stderr, " -bmp Select BMP output format (Windows style)%s\n", - (DEFAULT_FMT == FMT_BMP ? " (default)" : "")); -#endif -#ifdef GIF_SUPPORTED - fprintf(stderr, " -gif Select GIF output format%s\n", - (DEFAULT_FMT == FMT_GIF ? " (default)" : "")); -#endif -#ifdef BMP_SUPPORTED - fprintf(stderr, " -os2 Select BMP output format (OS/2 style)%s\n", - (DEFAULT_FMT == FMT_OS2 ? " (default)" : "")); -#endif -#ifdef PPM_SUPPORTED - fprintf(stderr, " -pnm Select PBMPLUS (PPM/PGM) output format%s\n", - (DEFAULT_FMT == FMT_PPM ? " (default)" : "")); -#endif -#ifdef RLE_SUPPORTED - fprintf(stderr, " -rle Select Utah RLE output format%s\n", - (DEFAULT_FMT == FMT_RLE ? " (default)" : "")); -#endif -#ifdef TARGA_SUPPORTED - fprintf(stderr, " -targa Select Targa output format%s\n", - (DEFAULT_FMT == FMT_TARGA ? " (default)" : "")); -#endif - fprintf(stderr, "Switches for advanced users:\n"); -#ifdef DCT_ISLOW_SUPPORTED - fprintf(stderr, " -dct int Use integer DCT method%s\n", - (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); -#endif -#ifdef DCT_IFAST_SUPPORTED - fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", - (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); -#endif -#ifdef DCT_FLOAT_SUPPORTED - fprintf(stderr, " -dct float Use floating-point DCT method%s\n", - (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); -#endif - fprintf(stderr, " -dither fs Use F-S dithering (default)\n"); - fprintf(stderr, " -dither none Don't use dithering in quantization\n"); - fprintf(stderr, " -dither ordered Use ordered dither (medium speed, quality)\n"); -#ifdef QUANT_2PASS_SUPPORTED - fprintf(stderr, " -map FILE Map to colors used in named image file\n"); -#endif - fprintf(stderr, " -nosmooth Don't use high-quality upsampling\n"); -#ifdef QUANT_1PASS_SUPPORTED - fprintf(stderr, " -onepass Use 1-pass quantization (fast, low quality)\n"); -#endif - fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); - fprintf(stderr, " -outfile name Specify name for output file\n"); - fprintf(stderr, " -verbose or -debug Emit debug output\n"); - exit(EXIT_FAILURE); -} - - -LOCAL(int) -parse_switches (j_decompress_ptr cinfo, int argc, char **argv, - int last_file_arg_seen, boolean for_real) -/* Parse optional switches. - * Returns argv[] index of first file-name argument (== argc if none). - * Any file names with indexes <= last_file_arg_seen are ignored; - * they have presumably been processed in a previous iteration. - * (Pass 0 for last_file_arg_seen on the first or only iteration.) - * for_real is FALSE on the first (dummy) pass; we may skip any expensive - * processing. - */ -{ - int argn; - char * arg; - - /* Set up default JPEG parameters. */ - requested_fmt = DEFAULT_FMT; /* set default output file format */ - outfilename = NULL; - cinfo->err->trace_level = 0; - - /* Scan command line options, adjust parameters */ - - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (*arg != '-') { - /* Not a switch, must be a file name argument */ - if (argn <= last_file_arg_seen) { - outfilename = NULL; /* -outfile applies to just one input file */ - continue; /* ignore this name if previously processed */ - } - break; /* else done parsing switches */ - } - arg++; /* advance past switch marker character */ - - if (keymatch(arg, "bmp", 1)) { - /* BMP output format. */ - requested_fmt = FMT_BMP; - - } else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) || - keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) { - /* Do color quantization. */ - int val; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &val) != 1) - usage(); - cinfo->desired_number_of_colors = val; - cinfo->quantize_colors = TRUE; - - } else if (keymatch(arg, "dct", 2)) { - /* Select IDCT algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "int", 1)) { - cinfo->dct_method = JDCT_ISLOW; - } else if (keymatch(argv[argn], "fast", 2)) { - cinfo->dct_method = JDCT_IFAST; - } else if (keymatch(argv[argn], "float", 2)) { - cinfo->dct_method = JDCT_FLOAT; - } else - usage(); - - } else if (keymatch(arg, "dither", 2)) { - /* Select dithering algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "fs", 2)) { - cinfo->dither_mode = JDITHER_FS; - } else if (keymatch(argv[argn], "none", 2)) { - cinfo->dither_mode = JDITHER_NONE; - } else if (keymatch(argv[argn], "ordered", 2)) { - cinfo->dither_mode = JDITHER_ORDERED; - } else - usage(); - - } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { - /* Enable debug printouts. */ - /* On first -d, print version identification */ - static boolean printed_version = FALSE; - - if (! printed_version) { - fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n", - JVERSION, JCOPYRIGHT); - printed_version = TRUE; - } - cinfo->err->trace_level++; - - } else if (keymatch(arg, "fast", 1)) { - /* Select recommended processing options for quick-and-dirty output. */ - cinfo->two_pass_quantize = FALSE; - cinfo->dither_mode = JDITHER_ORDERED; - if (! cinfo->quantize_colors) /* don't override an earlier -colors */ - cinfo->desired_number_of_colors = 216; - cinfo->dct_method = JDCT_FASTEST; - cinfo->do_fancy_upsampling = FALSE; - - } else if (keymatch(arg, "gif", 1)) { - /* GIF output format. */ - requested_fmt = FMT_GIF; - - } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { - /* Force monochrome output. */ - cinfo->out_color_space = JCS_GRAYSCALE; - - } else if (keymatch(arg, "rgb", 3)) { - /* Force RGB output. */ - cinfo->out_color_space = JCS_RGB; - - } else if (keymatch(arg, "map", 3)) { - /* Quantize to a color map taken from an input file. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (for_real) { /* too expensive to do twice! */ -#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ - FILE * mapfile; - - if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - read_color_map(cinfo, mapfile); - fclose(mapfile); - cinfo->quantize_colors = TRUE; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } - - } else if (keymatch(arg, "maxmemory", 3)) { - /* Maximum memory in Kb (or Mb with 'm'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (ch == 'm' || ch == 'M') - lval *= 1000L; - cinfo->mem->max_memory_to_use = lval * 1000L; - - } else if (keymatch(arg, "nosmooth", 3)) { - /* Suppress fancy upsampling. */ - cinfo->do_fancy_upsampling = FALSE; - - } else if (keymatch(arg, "onepass", 3)) { - /* Use fast one-pass quantization. */ - cinfo->two_pass_quantize = FALSE; - - } else if (keymatch(arg, "os2", 3)) { - /* BMP output format (OS/2 flavor). */ - requested_fmt = FMT_OS2; - - } else if (keymatch(arg, "outfile", 4)) { - /* Set output file name. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - outfilename = argv[argn]; /* save it away for later use */ - - } else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) { - /* PPM/PGM output format. */ - requested_fmt = FMT_PPM; - - } else if (keymatch(arg, "rle", 1)) { - /* RLE output format. */ - requested_fmt = FMT_RLE; - - } else if (keymatch(arg, "scale", 1)) { - /* Scale the output image by a fraction M/N. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%u/%u", - &cinfo->scale_num, &cinfo->scale_denom) < 1) - usage(); - - } else if (keymatch(arg, "targa", 1)) { - /* Targa output format. */ - requested_fmt = FMT_TARGA; - - } else { - usage(); /* bogus switch */ - } - } - - return argn; /* return index of next arg (file name) */ -} - - -/* - * Marker processor for COM and interesting APPn markers. - * This replaces the library's built-in processor, which just skips the marker. - * We want to print out the marker as text, to the extent possible. - * Note this code relies on a non-suspending data source. - */ - -LOCAL(unsigned int) -jpeg_getc (j_decompress_ptr cinfo) -/* Read next byte */ -{ - struct jpeg_source_mgr * datasrc = cinfo->src; - - if (datasrc->bytes_in_buffer == 0) { - if (! (*datasrc->fill_input_buffer) (cinfo)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - } - datasrc->bytes_in_buffer--; - return GETJOCTET(*datasrc->next_input_byte++); -} - - -METHODDEF(boolean) -print_text_marker (j_decompress_ptr cinfo) -{ - boolean traceit = (cinfo->err->trace_level >= 1); - INT32 length; - unsigned int ch; - unsigned int lastch = 0; - - length = jpeg_getc(cinfo) << 8; - length += jpeg_getc(cinfo); - length -= 2; /* discount the length word itself */ - - if (traceit) { - if (cinfo->unread_marker == JPEG_COM) - fprintf(stderr, "Comment, length %ld:\n", (long) length); - else /* assume it is an APPn otherwise */ - fprintf(stderr, "APP%d, length %ld:\n", - cinfo->unread_marker - JPEG_APP0, (long) length); - } - - while (--length >= 0) { - ch = jpeg_getc(cinfo); - if (traceit) { - /* Emit the character in a readable form. - * Nonprintables are converted to \nnn form, - * while \ is converted to \\. - * Newlines in CR, CR/LF, or LF form will be printed as one newline. - */ - if (ch == '\r') { - fprintf(stderr, "\n"); - } else if (ch == '\n') { - if (lastch != '\r') - fprintf(stderr, "\n"); - } else if (ch == '\\') { - fprintf(stderr, "\\\\"); - } else if (isprint(ch)) { - putc(ch, stderr); - } else { - fprintf(stderr, "\\%03o", ch); - } - lastch = ch; - } - } - - if (traceit) - fprintf(stderr, "\n"); - - return TRUE; -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; -#ifdef PROGRESS_REPORT - struct cdjpeg_progress_mgr progress; -#endif - int file_index; - djpeg_dest_ptr dest_mgr = NULL; - FILE * input_file; - FILE * output_file; - JDIMENSION num_scanlines; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "djpeg"; /* in case C library doesn't provide it */ - - /* Initialize the JPEG decompression object with default error handling. */ - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_decompress(&cinfo); - /* Add some application-specific error messages (from cderror.h) */ - jerr.addon_message_table = cdjpeg_message_table; - jerr.first_addon_message = JMSG_FIRSTADDONCODE; - jerr.last_addon_message = JMSG_LASTADDONCODE; - - /* Insert custom marker processor for COM and APP12. - * APP12 is used by some digital camera makers for textual info, - * so we provide the ability to display it as text. - * If you like, additional APPn marker types can be selected for display, - * but don't try to override APP0 or APP14 this way (see libjpeg.doc). - */ - jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker); - jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker); - - /* Now safe to enable signal catcher. */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) &cinfo); -#endif - - /* Scan command line to find file names. */ - /* It is convenient to use just one switch-parsing routine, but the switch - * values read here are ignored; we will rescan the switches after opening - * the input file. - * (Exception: tracing level set here controls verbosity for COM markers - * found during jpeg_read_header...) - */ - - file_index = parse_switches(&cinfo, argc, argv, 0, FALSE); - -#ifdef TWO_FILE_COMMANDLINE - /* Must have either -outfile switch or explicit output file name */ - if (outfilename == NULL) { - if (file_index != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - outfilename = argv[file_index+1]; - } else { - if (file_index != argc-1) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - } -#else - /* Unix style: expect zero or one file name */ - if (file_index < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } -#endif /* TWO_FILE_COMMANDLINE */ - - /* Open the input file. */ - if (file_index < argc) { - if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ - input_file = read_stdin(); - } - - /* Open the output file. */ - if (outfilename != NULL) { - if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, outfilename); - exit(EXIT_FAILURE); - } - } else { - /* default output file is stdout */ - output_file = write_stdout(); - } - -#ifdef PROGRESS_REPORT - start_progress_monitor((j_common_ptr) &cinfo, &progress); -#endif - - /* Specify data source for decompression */ - jpeg_stdio_src(&cinfo, input_file); - - /* Read file header, set default decompression parameters */ - (void) jpeg_read_header(&cinfo, TRUE); - - /* Adjust default decompression parameters by re-parsing the options */ - file_index = parse_switches(&cinfo, argc, argv, 0, TRUE); - - /* Initialize the output module now to let it override any crucial - * option settings (for instance, GIF wants to force color quantization). - */ - switch (requested_fmt) { -#ifdef BMP_SUPPORTED - case FMT_BMP: - dest_mgr = jinit_write_bmp(&cinfo, FALSE); - break; - case FMT_OS2: - dest_mgr = jinit_write_bmp(&cinfo, TRUE); - break; -#endif -#ifdef GIF_SUPPORTED - case FMT_GIF: - dest_mgr = jinit_write_gif(&cinfo); - break; -#endif -#ifdef PPM_SUPPORTED - case FMT_PPM: - dest_mgr = jinit_write_ppm(&cinfo); - break; -#endif -#ifdef RLE_SUPPORTED - case FMT_RLE: - dest_mgr = jinit_write_rle(&cinfo); - break; -#endif -#ifdef TARGA_SUPPORTED - case FMT_TARGA: - dest_mgr = jinit_write_targa(&cinfo); - break; -#endif - default: - ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT); - break; - } - dest_mgr->output_file = output_file; - - /* Start decompressor */ - (void) jpeg_start_decompress(&cinfo); - - /* Write output file header */ - (*dest_mgr->start_output) (&cinfo, dest_mgr); - - /* Process data */ - while (cinfo.output_scanline < cinfo.output_height) { - num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer, - dest_mgr->buffer_height); - (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines); - } - -#ifdef PROGRESS_REPORT - /* Hack: count final pass as done in case finish_output does an extra pass. - * The library won't have updated completed_passes. - */ - progress.pub.completed_passes = progress.pub.total_passes; -#endif - - /* Finish decompression and release memory. - * I must do it in this order because output module has allocated memory - * of lifespan JPOOL_IMAGE; it needs to finish before releasing memory. - */ - (*dest_mgr->finish_output) (&cinfo, dest_mgr); - (void) jpeg_finish_decompress(&cinfo); - jpeg_destroy_decompress(&cinfo); - - /* Close files, if we opened them */ - if (input_file != stdin) - fclose(input_file); - if (output_file != stdout) - fclose(output_file); - -#ifdef PROGRESS_REPORT - end_progress_monitor((j_common_ptr) &cinfo); -#endif - - /* All done. */ - exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/example.c b/Dependencies/FreeImage/Source/LibJPEG/example.c deleted file mode 100644 index 1d6f6cc..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/example.c +++ /dev/null @@ -1,433 +0,0 @@ -/* - * example.c - * - * This file illustrates how to use the IJG code as a subroutine library - * to read or write JPEG image files. You should look at this code in - * conjunction with the documentation file libjpeg.txt. - * - * This code will not do anything useful as-is, but it may be helpful as a - * skeleton for constructing routines that call the JPEG library. - * - * We present these routines in the same coding style used in the JPEG code - * (ANSI function definitions, etc); but you are of course free to code your - * routines in a different style if you prefer. - */ - -#include - -/* - * Include file for users of JPEG library. - * You will need to have included system headers that define at least - * the typedefs FILE and size_t before you can include jpeglib.h. - * (stdio.h is sufficient on ANSI-conforming systems.) - * You may also wish to include "jerror.h". - */ - -#include "jpeglib.h" - -/* - * is used for the optional error recovery mechanism shown in - * the second part of the example. - */ - -#include - - - -/******************** JPEG COMPRESSION SAMPLE INTERFACE *******************/ - -/* This half of the example shows how to feed data into the JPEG compressor. - * We present a minimal version that does not worry about refinements such - * as error recovery (the JPEG code will just exit() if it gets an error). - */ - - -/* - * IMAGE DATA FORMATS: - * - * The standard input image format is a rectangular array of pixels, with - * each pixel having the same number of "component" values (color channels). - * Each pixel row is an array of JSAMPLEs (which typically are unsigned chars). - * If you are working with color data, then the color values for each pixel - * must be adjacent in the row; for example, R,G,B,R,G,B,R,G,B,... for 24-bit - * RGB color. - * - * For this example, we'll assume that this data structure matches the way - * our application has stored the image in memory, so we can just pass a - * pointer to our image buffer. In particular, let's say that the image is - * RGB color and is described by: - */ - -extern JSAMPLE * image_buffer; /* Points to large array of R,G,B-order data */ -extern int image_height; /* Number of rows in image */ -extern int image_width; /* Number of columns in image */ - - -/* - * Sample routine for JPEG compression. We assume that the target file name - * and a compression quality factor are passed in. - */ - -GLOBAL(void) -write_JPEG_file (char * filename, int quality) -{ - /* This struct contains the JPEG compression parameters and pointers to - * working space (which is allocated as needed by the JPEG library). - * It is possible to have several such structures, representing multiple - * compression/decompression processes, in existence at once. We refer - * to any one struct (and its associated working data) as a "JPEG object". - */ - struct jpeg_compress_struct cinfo; - /* This struct represents a JPEG error handler. It is declared separately - * because applications often want to supply a specialized error handler - * (see the second half of this file for an example). But here we just - * take the easy way out and use the standard error handler, which will - * print a message on stderr and call exit() if compression fails. - * Note that this struct must live as long as the main JPEG parameter - * struct, to avoid dangling-pointer problems. - */ - struct jpeg_error_mgr jerr; - /* More stuff */ - FILE * outfile; /* target file */ - JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ - int row_stride; /* physical row width in image buffer */ - - /* Step 1: allocate and initialize JPEG compression object */ - - /* We have to set up the error handler first, in case the initialization - * step fails. (Unlikely, but it could happen if you are out of memory.) - * This routine fills in the contents of struct jerr, and returns jerr's - * address which we place into the link field in cinfo. - */ - cinfo.err = jpeg_std_error(&jerr); - /* Now we can initialize the JPEG compression object. */ - jpeg_create_compress(&cinfo); - - /* Step 2: specify data destination (eg, a file) */ - /* Note: steps 2 and 3 can be done in either order. */ - - /* Here we use the library-supplied code to send compressed data to a - * stdio stream. You can also write your own code to do something else. - * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that - * requires it in order to write binary files. - */ - if ((outfile = fopen(filename, "wb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - exit(1); - } - jpeg_stdio_dest(&cinfo, outfile); - - /* Step 3: set parameters for compression */ - - /* First we supply a description of the input image. - * Four fields of the cinfo struct must be filled in: - */ - cinfo.image_width = image_width; /* image width and height, in pixels */ - cinfo.image_height = image_height; - cinfo.input_components = 3; /* # of color components per pixel */ - cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ - /* Now use the library's routine to set default compression parameters. - * (You must set at least cinfo.in_color_space before calling this, - * since the defaults depend on the source color space.) - */ - jpeg_set_defaults(&cinfo); - /* Now you can set any non-default parameters you wish to. - * Here we just illustrate the use of quality (quantization table) scaling: - */ - jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */); - - /* Step 4: Start compressor */ - - /* TRUE ensures that we will write a complete interchange-JPEG file. - * Pass TRUE unless you are very sure of what you're doing. - */ - jpeg_start_compress(&cinfo, TRUE); - - /* Step 5: while (scan lines remain to be written) */ - /* jpeg_write_scanlines(...); */ - - /* Here we use the library's state variable cinfo.next_scanline as the - * loop counter, so that we don't have to keep track ourselves. - * To keep things simple, we pass one scanline per call; you can pass - * more if you wish, though. - */ - row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */ - - while (cinfo.next_scanline < cinfo.image_height) { - /* jpeg_write_scanlines expects an array of pointers to scanlines. - * Here the array is only one element long, but you could pass - * more than one scanline at a time if that's more convenient. - */ - row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; - (void) jpeg_write_scanlines(&cinfo, row_pointer, 1); - } - - /* Step 6: Finish compression */ - - jpeg_finish_compress(&cinfo); - /* After finish_compress, we can close the output file. */ - fclose(outfile); - - /* Step 7: release JPEG compression object */ - - /* This is an important step since it will release a good deal of memory. */ - jpeg_destroy_compress(&cinfo); - - /* And we're done! */ -} - - -/* - * SOME FINE POINTS: - * - * In the above loop, we ignored the return value of jpeg_write_scanlines, - * which is the number of scanlines actually written. We could get away - * with this because we were only relying on the value of cinfo.next_scanline, - * which will be incremented correctly. If you maintain additional loop - * variables then you should be careful to increment them properly. - * Actually, for output to a stdio stream you needn't worry, because - * then jpeg_write_scanlines will write all the lines passed (or else exit - * with a fatal error). Partial writes can only occur if you use a data - * destination module that can demand suspension of the compressor. - * (If you don't know what that's for, you don't need it.) - * - * If the compressor requires full-image buffers (for entropy-coding - * optimization or a multi-scan JPEG file), it will create temporary - * files for anything that doesn't fit within the maximum-memory setting. - * (Note that temp files are NOT needed if you use the default parameters.) - * On some systems you may need to set up a signal handler to ensure that - * temporary files are deleted if the program is interrupted. See libjpeg.txt. - * - * Scanlines MUST be supplied in top-to-bottom order if you want your JPEG - * files to be compatible with everyone else's. If you cannot readily read - * your data in that order, you'll need an intermediate array to hold the - * image. See rdtarga.c or rdbmp.c for examples of handling bottom-to-top - * source data using the JPEG code's internal virtual-array mechanisms. - */ - - - -/******************** JPEG DECOMPRESSION SAMPLE INTERFACE *******************/ - -/* This half of the example shows how to read data from the JPEG decompressor. - * It's a bit more refined than the above, in that we show: - * (a) how to modify the JPEG library's standard error-reporting behavior; - * (b) how to allocate workspace using the library's memory manager. - * - * Just to make this example a little different from the first one, we'll - * assume that we do not intend to put the whole image into an in-memory - * buffer, but to send it line-by-line someplace else. We need a one- - * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG - * memory manager allocate it for us. This approach is actually quite useful - * because we don't need to remember to deallocate the buffer separately: it - * will go away automatically when the JPEG object is cleaned up. - */ - - -/* - * ERROR HANDLING: - * - * The JPEG library's standard error handler (jerror.c) is divided into - * several "methods" which you can override individually. This lets you - * adjust the behavior without duplicating a lot of code, which you might - * have to update with each future release. - * - * Our example here shows how to override the "error_exit" method so that - * control is returned to the library's caller when a fatal error occurs, - * rather than calling exit() as the standard error_exit method does. - * - * We use C's setjmp/longjmp facility to return control. This means that the - * routine which calls the JPEG library must first execute a setjmp() call to - * establish the return point. We want the replacement error_exit to do a - * longjmp(). But we need to make the setjmp buffer accessible to the - * error_exit routine. To do this, we make a private extension of the - * standard JPEG error handler object. (If we were using C++, we'd say we - * were making a subclass of the regular error handler.) - * - * Here's the extended error handler struct: - */ - -struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - - jmp_buf setjmp_buffer; /* for return to caller */ -}; - -typedef struct my_error_mgr * my_error_ptr; - -/* - * Here's the routine that will replace the standard error_exit method: - */ - -METHODDEF(void) -my_error_exit (j_common_ptr cinfo) -{ - /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ - my_error_ptr myerr = (my_error_ptr) cinfo->err; - - /* Always display the message. */ - /* We could postpone this until after returning, if we chose. */ - (*cinfo->err->output_message) (cinfo); - - /* Return control to the setjmp point */ - longjmp(myerr->setjmp_buffer, 1); -} - - -/* - * Sample routine for JPEG decompression. We assume that the source file name - * is passed in. We want to return 1 on success, 0 on error. - */ - - -GLOBAL(int) -read_JPEG_file (char * filename) -{ - /* This struct contains the JPEG decompression parameters and pointers to - * working space (which is allocated as needed by the JPEG library). - */ - struct jpeg_decompress_struct cinfo; - /* We use our private extension JPEG error handler. - * Note that this struct must live as long as the main JPEG parameter - * struct, to avoid dangling-pointer problems. - */ - struct my_error_mgr jerr; - /* More stuff */ - FILE * infile; /* source file */ - JSAMPARRAY buffer; /* Output row buffer */ - int row_stride; /* physical row width in output buffer */ - - /* In this example we want to open the input file before doing anything else, - * so that the setjmp() error recovery below can assume the file is open. - * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that - * requires it in order to read binary files. - */ - - if ((infile = fopen(filename, "rb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - return 0; - } - - /* Step 1: allocate and initialize JPEG decompression object */ - - /* We set up the normal JPEG error routines, then override error_exit. */ - cinfo.err = jpeg_std_error(&jerr.pub); - jerr.pub.error_exit = my_error_exit; - /* Establish the setjmp return context for my_error_exit to use. */ - if (setjmp(jerr.setjmp_buffer)) { - /* If we get here, the JPEG code has signaled an error. - * We need to clean up the JPEG object, close the input file, and return. - */ - jpeg_destroy_decompress(&cinfo); - fclose(infile); - return 0; - } - /* Now we can initialize the JPEG decompression object. */ - jpeg_create_decompress(&cinfo); - - /* Step 2: specify data source (eg, a file) */ - - jpeg_stdio_src(&cinfo, infile); - - /* Step 3: read file parameters with jpeg_read_header() */ - - (void) jpeg_read_header(&cinfo, TRUE); - /* We can ignore the return value from jpeg_read_header since - * (a) suspension is not possible with the stdio data source, and - * (b) we passed TRUE to reject a tables-only JPEG file as an error. - * See libjpeg.txt for more info. - */ - - /* Step 4: set parameters for decompression */ - - /* In this example, we don't need to change any of the defaults set by - * jpeg_read_header(), so we do nothing here. - */ - - /* Step 5: Start decompressor */ - - (void) jpeg_start_decompress(&cinfo); - /* We can ignore the return value since suspension is not possible - * with the stdio data source. - */ - - /* We may need to do some setup of our own at this point before reading - * the data. After jpeg_start_decompress() we have the correct scaled - * output image dimensions available, as well as the output colormap - * if we asked for color quantization. - * In this example, we need to make an output work buffer of the right size. - */ - /* JSAMPLEs per row in output buffer */ - row_stride = cinfo.output_width * cinfo.output_components; - /* Make a one-row-high sample array that will go away when done with image */ - buffer = (*cinfo.mem->alloc_sarray) - ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); - - /* Step 6: while (scan lines remain to be read) */ - /* jpeg_read_scanlines(...); */ - - /* Here we use the library's state variable cinfo.output_scanline as the - * loop counter, so that we don't have to keep track ourselves. - */ - while (cinfo.output_scanline < cinfo.output_height) { - /* jpeg_read_scanlines expects an array of pointers to scanlines. - * Here the array is only one element long, but you could ask for - * more than one scanline at a time if that's more convenient. - */ - (void) jpeg_read_scanlines(&cinfo, buffer, 1); - /* Assume put_scanline_someplace wants a pointer and sample count. */ - put_scanline_someplace(buffer[0], row_stride); - } - - /* Step 7: Finish decompression */ - - (void) jpeg_finish_decompress(&cinfo); - /* We can ignore the return value since suspension is not possible - * with the stdio data source. - */ - - /* Step 8: Release JPEG decompression object */ - - /* This is an important step since it will release a good deal of memory. */ - jpeg_destroy_decompress(&cinfo); - - /* After finish_decompress, we can close the input file. - * Here we postpone it until after no more JPEG errors are possible, - * so as to simplify the setjmp error logic above. (Actually, I don't - * think that jpeg_destroy can do an error exit, but why assume anything...) - */ - fclose(infile); - - /* At this point you may want to check to see whether any corrupt-data - * warnings occurred (test whether jerr.pub.num_warnings is nonzero). - */ - - /* And we're done! */ - return 1; -} - - -/* - * SOME FINE POINTS: - * - * In the above code, we ignored the return value of jpeg_read_scanlines, - * which is the number of scanlines actually read. We could get away with - * this because we asked for only one line at a time and we weren't using - * a suspending data source. See libjpeg.txt for more info. - * - * We cheated a bit by calling alloc_sarray() after jpeg_start_decompress(); - * we should have done it beforehand to ensure that the space would be - * counted against the JPEG max_memory setting. In some systems the above - * code would risk an out-of-memory error. However, in general we don't - * know the output image dimensions before jpeg_start_decompress(), unless we - * call jpeg_calc_output_dimensions(). See libjpeg.txt for more about this. - * - * Scanlines are returned in the same order as they appear in the JPEG file, - * which is standardly top-to-bottom. If you must emit data bottom-to-top, - * you can use one of the virtual arrays provided by the JPEG memory manager - * to invert the data. See wrbmp.c for an example. - * - * As with compression, some operating modes may require temporary files. - * On some systems you may need to set up a signal handler to ensure that - * temporary files are deleted if the program is interrupted. See libjpeg.txt. - */ diff --git a/Dependencies/FreeImage/Source/LibJPEG/filelist.txt b/Dependencies/FreeImage/Source/LibJPEG/filelist.txt deleted file mode 100644 index 583859f..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/filelist.txt +++ /dev/null @@ -1,216 +0,0 @@ -IJG JPEG LIBRARY: FILE LIST - -Copyright (C) 1994-2017, 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. - - -Here is a road map to the files in the IJG JPEG distribution. The -distribution includes the JPEG library proper, plus two application -programs ("cjpeg" and "djpeg") which use the library to convert JPEG -files to and from some other popular image formats. A third application -"jpegtran" uses the library to do lossless conversion between different -variants of JPEG. There are also two stand-alone applications, -"rdjpgcom" and "wrjpgcom". - - -THE JPEG LIBRARY -================ - -Include files: - -jpeglib.h JPEG library's exported data and function declarations. -jconfig.h Configuration declarations. Note: this file is not present - in the distribution; it is generated during installation. -jmorecfg.h Additional configuration declarations; need not be changed - for a standard installation. -jerror.h Declares JPEG library's error and trace message codes. -jinclude.h Central include file used by all IJG .c files to reference - system include files. -jpegint.h JPEG library's internal data structures. -jdct.h Private declarations for forward & reverse DCT subsystems. -jmemsys.h Private declarations for memory management subsystem. -jversion.h Version information. - -Applications using the library should include jpeglib.h (which in turn -includes jconfig.h and jmorecfg.h). Optionally, jerror.h may be included -if the application needs to reference individual JPEG error codes. The -other include files are intended for internal use and would not normally -be included by an application program. (cjpeg/djpeg/etc do use jinclude.h, -since its function is to improve portability of the whole IJG distribution. -Most other applications will directly include the system include files they -want, and hence won't need jinclude.h.) - - -C source code files: - -These files contain most of the functions intended to be called directly by -an application program: - -jcapimin.c Application program interface: core routines for compression. -jcapistd.c Application program interface: standard compression. -jdapimin.c Application program interface: core routines for decompression. -jdapistd.c Application program interface: standard decompression. -jcomapi.c Application program interface routines common to compression - and decompression. -jcparam.c Compression parameter setting helper routines. -jctrans.c API and library routines for transcoding compression. -jdtrans.c API and library routines for transcoding decompression. - -Compression side of the library: - -jcinit.c Initialization: determines which other modules to use. -jcmaster.c Master control: setup and inter-pass sequencing logic. -jcmainct.c Main buffer controller (preprocessor => JPEG compressor). -jcprepct.c Preprocessor buffer controller. -jccoefct.c Buffer controller for DCT coefficient buffer. -jccolor.c Color space conversion. -jcsample.c Downsampling. -jcdctmgr.c DCT manager (DCT implementation selection & control). -jfdctint.c Forward DCT using slow-but-accurate integer method. -jfdctfst.c Forward DCT using faster, less accurate integer method. -jfdctflt.c Forward DCT using floating-point arithmetic. -jchuff.c Huffman entropy coding. -jcarith.c Arithmetic entropy coding. -jcmarker.c JPEG marker writing. -jdatadst.c Data destination managers for memory and stdio output. - -Decompression side of the library: - -jdmaster.c Master control: determines which other modules to use. -jdinput.c Input controller: controls input processing modules. -jdmainct.c Main buffer controller (JPEG decompressor => postprocessor). -jdcoefct.c Buffer controller for DCT coefficient buffer. -jdpostct.c Postprocessor buffer controller. -jdmarker.c JPEG marker reading. -jdhuff.c Huffman entropy decoding. -jdarith.c Arithmetic entropy decoding. -jddctmgr.c IDCT manager (IDCT implementation selection & control). -jidctint.c Inverse DCT using slow-but-accurate integer method. -jidctfst.c Inverse DCT using faster, less accurate integer method. -jidctflt.c Inverse DCT using floating-point arithmetic. -jdsample.c Upsampling. -jdcolor.c Color space conversion. -jdmerge.c Merged upsampling/color conversion (faster, lower quality). -jquant1.c One-pass color quantization using a fixed-spacing colormap. -jquant2.c Two-pass color quantization using a custom-generated colormap. - Also handles one-pass quantization to an externally given map. -jdatasrc.c Data source managers for memory and stdio input. - -Support files for both compression and decompression: - -jaricom.c Tables for common use in arithmetic entropy encoding and - decoding routines. -jerror.c Standard error handling routines (application replaceable). -jmemmgr.c System-independent (more or less) memory management code. -jutils.c Miscellaneous utility routines. - -jmemmgr.c relies on a system-dependent memory management module. The IJG -distribution includes the following implementations of the system-dependent -module: - -jmemnobs.c "No backing store": assumes adequate virtual memory exists. -jmemansi.c Makes temporary files with ANSI-standard routine tmpfile(). -jmemname.c Makes temporary files with program-generated file names. -jmemdos.c Custom implementation for MS-DOS (16-bit environment only): - can use extended and expanded memory as well as temp files. -jmemmac.c Custom implementation for Apple Macintosh. - -Exactly one of the system-dependent modules should be configured into an -installed JPEG library (see install.txt for hints about which one to use). -On unusual systems you may find it worthwhile to make a special -system-dependent memory manager. - - -Non-C source code files: - -jmemdosa.asm 80x86 assembly code support for jmemdos.c; used only in - MS-DOS-specific configurations of the JPEG library. - - -CJPEG/DJPEG/JPEGTRAN -==================== - -Include files: - -cdjpeg.h Declarations shared by cjpeg/djpeg/jpegtran modules. -cderror.h Additional error and trace message codes for cjpeg et al. -transupp.h Declarations for jpegtran support routines in transupp.c. - -C source code files: - -cjpeg.c Main program for cjpeg. -djpeg.c Main program for djpeg. -jpegtran.c Main program for jpegtran. -cdjpeg.c Utility routines used by all three programs. -rdcolmap.c Code to read a colormap file for djpeg's "-map" switch. -rdswitch.c Code to process some of cjpeg's more complex switches. - Also used by jpegtran. -transupp.c Support code for jpegtran: lossless image manipulations. - -Image file reader modules for cjpeg: - -rdbmp.c BMP file input. -rdgif.c GIF file input (now just a stub). -rdppm.c PPM/PGM file input. -rdrle.c Utah RLE file input. -rdtarga.c Targa file input. - -Image file writer modules for djpeg: - -wrbmp.c BMP file output. -wrgif.c GIF file output (a mere shadow of its former self). -wrppm.c PPM/PGM file output. -wrrle.c Utah RLE file output. -wrtarga.c Targa file output. - - -RDJPGCOM/WRJPGCOM -================= - -C source code files: - -rdjpgcom.c Stand-alone rdjpgcom application. -wrjpgcom.c Stand-alone wrjpgcom application. - -These programs do not depend on the IJG library. They do use -jconfig.h and jinclude.h, only to improve portability. - - -ADDITIONAL FILES -================ - -Documentation (see README for a guide to the documentation files): - -README Master documentation file. -*.txt Other documentation files. -*.1 Documentation in Unix man page format. -change.log Version-to-version change highlights. -example.c Sample code for calling JPEG library. - -Configuration/installation files and programs (see install.txt for more info): - -configure Unix shell script to perform automatic configuration. -configure.ac Source file for use with Autoconf to generate configure. -ltmain.sh Support scripts for configure (from GNU libtool). -config.guess -config.sub -depcomp -missing -ar-lib -compile -install-sh Install shell script for those Unix systems lacking one. -Makefile.in Makefile input for configure. -Makefile.am Source file for use with Automake to generate Makefile.in. -ckconfig.c Program to generate jconfig.h on non-Unix systems. -jconfig.txt Template for making jconfig.h by hand. -mak*.* Sample makefiles for particular systems. -jconfig.* Sample jconfig.h for particular systems. -libjpeg.map Script to generate shared library with versioned symbols. -libjpeg.pc.in libjpeg.pc pkg-config file input for configure. -aclocal.m4 M4 macro definitions for use with Autoconf. - -Test files (see install.txt for test procedure): - -test*.* Source and comparison files for confidence test. - These are binary image files, NOT text files. diff --git a/Dependencies/FreeImage/Source/LibJPEG/install.txt b/Dependencies/FreeImage/Source/LibJPEG/install.txt deleted file mode 100644 index 10600a4..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/install.txt +++ /dev/null @@ -1,1109 +0,0 @@ -INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software - -Copyright (C) 1991-2017, 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 explains how to configure and install the IJG software. We have -tried to make this software extremely portable and flexible, so that it can be -adapted to almost any environment. The downside of this decision is that the -installation process is complicated. We have provided shortcuts to simplify -the task on common systems. But in any case, you will need at least a little -familiarity with C programming and program build procedures for your system. - -If you are only using this software as part of a larger program, the larger -program's installation procedure may take care of configuring the IJG code. -For example, Ghostscript's installation script will configure the IJG code. -You don't need to read this file if you just want to compile Ghostscript. - -If you are on a Unix machine, you may not need to read this file at all. -Try doing - ./configure - make - make test -If that doesn't complain, do - make install -(better do "make -n install" first to see if the makefile will put the files -where you want them). Read further if you run into snags or want to customize -the code for your system. - - -TABLE OF CONTENTS ------------------ - -Before you start -Configuring the software: - using the automatic "configure" script - using one of the supplied jconfig and makefile files - by hand -Building the software -Testing the software -Installing the software -Optional stuff -Optimization -Hints for specific systems - - -BEFORE YOU START -================ - -Before installing the software you must unpack the distributed source code. -Since you are reading this file, you have probably already succeeded in this -task. However, there is a potential for error if you needed to convert the -files to the local standard text file format (for example, if you are on -MS-DOS you may have converted LF end-of-line to CR/LF). You must apply -such conversion to all the files EXCEPT those whose names begin with "test". -The test files contain binary data; if you change them in any way then the -self-test will give bad results. - -Please check the last section of this file to see if there are hints for the -specific machine or compiler you are using. - - -CONFIGURING THE SOFTWARE -======================== - -To configure the IJG code for your system, you need to create two files: - * jconfig.h: contains values for system-dependent #define symbols. - * Makefile: controls the compilation process. -(On a non-Unix machine, you may create "project files" or some other -substitute for a Makefile. jconfig.h is needed in any environment.) - -We provide three different ways to generate these files: - * On a Unix system, you can just run the "configure" script. - * We provide sample jconfig files and makefiles for popular machines; - if your machine matches one of the samples, just copy the right sample - files to jconfig.h and Makefile. - * If all else fails, read the instructions below and make your own files. - - -Configuring the software using the automatic "configure" script ---------------------------------------------------------------- - -If you are on a Unix machine, you can just type - ./configure -and let the configure script construct appropriate configuration files. -If you're using "csh" on an old version of System V, you might need to type - sh configure -instead to prevent csh from trying to execute configure itself. -Expect configure to run for a few minutes, particularly on slower machines; -it works by compiling a series of test programs. - -Configure was created with GNU Autoconf and it follows the usual conventions -for GNU configure scripts. It makes a few assumptions that you may want to -override. You can do this by providing optional switches to configure: - -* Configure will build both static and shared libraries, if possible. -If you want to build libjpeg only as a static library, say - ./configure --disable-shared -If you want to build libjpeg only as a shared library, say - ./configure --disable-static -Configure uses GNU libtool to take care of system-dependent shared library -building methods. - -* Configure will use gcc (GNU C compiler) if it's available, otherwise cc. -To force a particular compiler to be selected, use the CC option, for example - ./configure CC='cc' -The same method can be used to include any unusual compiler switches. -For example, on HP-UX you probably want to say - ./configure CC='cc -Aa' -to get HP's compiler to run in ANSI mode. - -* The default CFLAGS setting is "-g" for non-gcc compilers, "-g -O2" for gcc. -You can override this by saying, for example, - ./configure CFLAGS='-O2' -if you want to compile without debugging support. - -* Configure will set up the makefile so that "make install" will install files -into /usr/local/bin, /usr/local/man, etc. You can specify an installation -prefix other than "/usr/local" by giving configure the option "--prefix=PATH". - -* If you don't have a lot of swap space, you may need to enable the IJG -software's internal virtual memory mechanism. To do this, give the option -"--enable-maxmem=N" where N is the default maxmemory limit in megabytes. -This is discussed in more detail under "Selecting a memory manager", below. -You probably don't need to worry about this on reasonably-sized Unix machines, -unless you plan to process very large images. - -Configure has some other features that are useful if you are cross-compiling -or working in a network of multiple machine types; but if you need those -features, you probably already know how to use them. - - -Configuring the software using one of the supplied jconfig and makefile files ------------------------------------------------------------------------------ - -If you have one of these systems, you can just use the provided configuration -files: - -Makefile jconfig file System and/or compiler - -makefile.manx jconfig.manx Amiga, Manx Aztec C -makefile.sas jconfig.sas Amiga, SAS C -makeproj.mac jconfig.mac Apple Macintosh, Metrowerks CodeWarrior -mak*jpeg.st jconfig.st Atari ST/STE/TT, Pure C or Turbo C -makefile.bcc jconfig.bcc MS-DOS or OS/2, Borland C -makefile.dj jconfig.dj MS-DOS, DJGPP (Delorie's port of GNU C) -makefile.mc6 jconfig.mc6 MS-DOS, Microsoft C (16-bit only) -makefile.wat jconfig.wat MS-DOS, OS/2, or Windows NT, Watcom C -makefile.vc jconfig.vc Windows, MS Visual C++ -makefile.vs jconfig.vc Windows, MS Visual C++ 6 Developer Studio -make*.vc6 -makefile.vs jconfig.vc Windows, Visual Studio 2017 (v15) -make*.v15 -makefile.b32 jconfig.vc Windows, Borland C++ 32-bit (bcc32) -makefile.mms jconfig.vms Digital VMS, with MMS software -makefile.vms jconfig.vms Digital VMS, without MMS software - -Copy the proper jconfig file to jconfig.h and the makefile to Makefile (or -whatever your system uses as the standard makefile name). For more info see -the appropriate system-specific hints section near the end of this file. - - -Configuring the software by hand --------------------------------- - -First, generate a jconfig.h file. If you are moderately familiar with C, -the comments in jconfig.txt should be enough information to do this; just -copy jconfig.txt to jconfig.h and edit it appropriately. Otherwise, you may -prefer to use the ckconfig.c program. You will need to compile and execute -ckconfig.c by hand --- we hope you know at least enough to do that. -ckconfig.c may not compile the first try (in fact, the whole idea is for it -to fail if anything is going to). If you get compile errors, fix them by -editing ckconfig.c according to the directions given in ckconfig.c. Once -you get it to run, it will write a suitable jconfig.h file, and will also -print out some advice about which makefile to use. - -You may also want to look at the canned jconfig files, if there is one for a -system similar to yours. - -Second, select a makefile and copy it to Makefile (or whatever your system -uses as the standard makefile name). The most generic makefiles we provide -are - makefile.ansi: if your C compiler supports function prototypes - makefile.unix: if not. -(You have function prototypes if ckconfig.c put "#define HAVE_PROTOTYPES" -in jconfig.h.) You may want to start from one of the other makefiles if -there is one for a system similar to yours. - -Look over the selected Makefile and adjust options as needed. In particular -you may want to change the CC and CFLAGS definitions. For instance, if you -are using GCC, set CC=gcc. If you had to use any compiler switches to get -ckconfig.c to work, make sure the same switches are in CFLAGS. - -If you are on a system that doesn't use makefiles, you'll need to set up -project files (or whatever you do use) to compile all the source files and -link them into executable files cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom. -See the file lists in any of the makefiles to find out which files go into -each program. Note that the provided makefiles all make a "library" file -libjpeg first, but you don't have to do that if you don't want to; the file -lists identify which source files are actually needed for compression, -decompression, or both. As a last resort, you can make a batch script that -just compiles everything and links it all together; makefile.vms is an example -of this (it's for VMS systems that have no make-like utility). - -Here are comments about some specific configuration decisions you'll -need to make: - -Command line style ------------------- - -These programs can use a Unix-like command line style which supports -redirection and piping, like this: - cjpeg inputfile >outputfile - cjpeg outputfile - source program | cjpeg >outputfile -The simpler "two file" command line style is just - cjpeg inputfile outputfile -You may prefer the two-file style, particularly if you don't have pipes. - -You MUST use two-file style on any system that doesn't cope well with binary -data fed through stdin/stdout; this is true for some MS-DOS compilers, for -example. If you're not on a Unix system, it's safest to assume you need -two-file style. (But if your compiler provides either the Posix-standard -fdopen() library routine or a Microsoft-compatible setmode() routine, you -can safely use the Unix command line style, by defining USE_FDOPEN or -USE_SETMODE respectively.) - -To use the two-file style, make jconfig.h say "#define TWO_FILE_COMMANDLINE". - -Selecting a memory manager --------------------------- - -The IJG code is capable of working on images that are too big to fit in main -memory; data is swapped out to temporary files as necessary. However, the -code to do this is rather system-dependent. We provide five different -memory managers: - -* jmemansi.c This version uses the ANSI-standard library routine tmpfile(), - which not all non-ANSI systems have. On some systems - tmpfile() may put the temporary file in a non-optimal - location; if you don't like what it does, use jmemname.c. - -* jmemname.c This version creates named temporary files. For anything - except a Unix machine, you'll need to configure the - select_file_name() routine appropriately; see the comments - near the head of jmemname.c. If you use this version, define - NEED_SIGNAL_CATCHER in jconfig.h to make sure the temp files - are removed if the program is aborted. - -* jmemnobs.c (That stands for No Backing Store :-).) This will compile on - almost any system, but it assumes you have enough main memory - or virtual memory to hold the biggest images you work with. - -* jmemdos.c This should be used with most 16-bit MS-DOS compilers. - See the system-specific notes about MS-DOS for more info. - IMPORTANT: if you use this, define USE_MSDOS_MEMMGR in - jconfig.h, and include the assembly file jmemdosa.asm in the - programs. The supplied makefiles and jconfig files for - 16-bit MS-DOS compilers already do both. - -* jmemmac.c Custom version for Apple Macintosh; see the system-specific - notes for Macintosh for more info. - -To use a particular memory manager, change the SYSDEPMEM variable in your -makefile to equal the corresponding object file name (for example, jmemansi.o -or jmemansi.obj for jmemansi.c). - -If you have plenty of (real or virtual) main memory, just use jmemnobs.c. -"Plenty" means about ten bytes for every pixel in the largest images -you plan to process, so a lot of systems don't meet this criterion. -If yours doesn't, try jmemansi.c first. If that doesn't compile, you'll have -to use jmemname.c; be sure to adjust select_file_name() for local conditions. -You may also need to change unlink() to remove() in close_backing_store(). - -Except with jmemnobs.c or jmemmac.c, you need to adjust the DEFAULT_MAX_MEM -setting to a reasonable value for your system (either by adding a #define for -DEFAULT_MAX_MEM to jconfig.h, or by adding a -D switch to the Makefile). -This value limits the amount of data space the program will attempt to -allocate. Code and static data space isn't counted, so the actual memory -needs for cjpeg or djpeg are typically 100 to 150Kb more than the max-memory -setting. Larger max-memory settings reduce the amount of I/O needed to -process a large image, but too large a value can result in "insufficient -memory" failures. On most Unix machines (and other systems with virtual -memory), just set DEFAULT_MAX_MEM to several million and forget it. At the -other end of the spectrum, for MS-DOS machines you probably can't go much -above 300K to 400K. (On MS-DOS the value refers to conventional memory only. -Extended/expanded memory is handled separately by jmemdos.c.) - - -BUILDING THE SOFTWARE -===================== - -Now you should be able to compile the software. Just say "make" (or -whatever's necessary to start the compilation). Have a cup of coffee. - -Here are some things that could go wrong: - -If your compiler complains about undefined structures, you should be able to -shut it up by putting "#define INCOMPLETE_TYPES_BROKEN" in jconfig.h. - -If you have trouble with missing system include files or inclusion of the -wrong ones, read jinclude.h. This shouldn't happen if you used configure -or ckconfig.c to set up jconfig.h. - -There are a fair number of routines that do not use all of their parameters; -some compilers will issue warnings about this, which you can ignore. There -are also a few configuration checks that may give "unreachable code" warnings. -Any other warning deserves investigation. - -If you don't have a getenv() library routine, define NO_GETENV. - -Also see the system-specific hints, below. - - -TESTING THE SOFTWARE -==================== - -As a quick test of functionality we've included a small sample image in -several forms: - testorig.jpg Starting point for the djpeg tests. - testimg.ppm The output of djpeg testorig.jpg - testimg.bmp The output of djpeg -bmp -colors 256 testorig.jpg - testimg.jpg The output of cjpeg testimg.ppm - testprog.jpg Progressive-mode equivalent of testorig.jpg. - testimgp.jpg The output of cjpeg -progressive -optimize testimg.ppm -(The first- and second-generation .jpg files aren't identical since the -default compression parameters are lossy.) If you can generate duplicates -of the testimg* files then you probably have working programs. - -With most of the makefiles, "make test" will perform the necessary -comparisons. - -If you're using a makefile that doesn't provide the test option, run djpeg -and cjpeg by hand and compare the output files to testimg* with whatever -binary file comparison tool you have. The files should be bit-for-bit -identical. - -If the programs complain "MAX_ALLOC_CHUNK is wrong, please fix", then you -need to reduce MAX_ALLOC_CHUNK to a value that fits in type size_t. -Try adding "#define MAX_ALLOC_CHUNK 65520L" to jconfig.h. A less likely -configuration error is "ALIGN_TYPE is wrong, please fix": defining ALIGN_TYPE -as long should take care of that one. - -If the cjpeg test run fails with "Missing Huffman code table entry", it's a -good bet that you needed to define RIGHT_SHIFT_IS_UNSIGNED. Go back to the -configuration step and run ckconfig.c. (This is a good plan for any other -test failure, too.) - -If you are using Unix (one-file) command line style on a non-Unix system, -it's a good idea to check that binary I/O through stdin/stdout actually -works. You should get the same results from "djpeg out.ppm" -as from "djpeg -outfile out.ppm testorig.jpg". Note that the makefiles all -use the latter style and therefore do not exercise stdin/stdout! If this -check fails, try recompiling with USE_SETMODE or USE_FDOPEN defined. -If it still doesn't work, better use two-file style. - -If you chose a memory manager other than jmemnobs.c, you should test that -temporary-file usage works. Try "djpeg -bmp -colors 256 -max 0 testorig.jpg" -and make sure its output matches testimg.bmp. If you have any really large -images handy, try compressing them with -optimize and/or decompressing with --colors 256 to make sure your DEFAULT_MAX_MEM setting is not too large. - -NOTE: this is far from an exhaustive test of the JPEG software; some modules, -such as 1-pass color quantization, are not exercised at all. It's just a -quick test to give you some confidence that you haven't missed something -major. - - -INSTALLING THE SOFTWARE -======================= - -Once you're done with the above steps, you can install the software by -copying the executable files (cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom) -to wherever you normally install programs. On Unix systems, you'll also want -to put the man pages (cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1) -in the man-page directory. The pre-fab makefiles don't support this step -since there's such a wide variety of installation procedures on different -systems. - -If you generated a Makefile with the "configure" script, you can just say - make install -to install the programs and their man pages into the standard places. -(You'll probably need to be root to do this.) We recommend first saying - make -n install -to see where configure thought the files should go. You may need to edit -the Makefile, particularly if your system's conventions for man page -filenames don't match what configure expects. - -If you want to install the IJG library itself, for use in compiling other -programs besides ours, then you need to put the four include files - jpeglib.h jerror.h jconfig.h jmorecfg.h -into your include-file directory, and put the library file libjpeg.a -(extension may vary depending on system) wherever library files go. -If you generated a Makefile with "configure", it will do what it thinks -is the right thing if you say - make install-lib - - -OPTIONAL STUFF -============== - -Progress monitor: - -If you like, you can #define PROGRESS_REPORT (in jconfig.h) to enable display -of percent-done progress reports. The routine provided in cdjpeg.c merely -prints percentages to stderr, but you can customize it to do something -fancier. - -Utah RLE file format support: - -We distribute the software with support for RLE image files (Utah Raster -Toolkit format) disabled, because the RLE support won't compile without the -Utah library. If you have URT version 3.1 or later, you can enable RLE -support as follows: - 1. #define RLE_SUPPORTED in jconfig.h. - 2. Add a -I option to CFLAGS in the Makefile for the directory - containing the URT .h files (typically the "include" - subdirectory of the URT distribution). - 3. Add -L... -lrle to LDLIBS in the Makefile, where ... specifies - the directory containing the URT "librle.a" file (typically the - "lib" subdirectory of the URT distribution). - -Support for 9-bit to 12-bit deep pixel data: - -The IJG code currently allows 8, 9, 10, 11, or 12 bits sample data precision. -(For color, this means 8 to 12 bits per channel, of course.) If you need to -work with deeper than 8-bit data, you can compile the IJG code for 9-bit to -12-bit operation. -To do so: - 1. In jmorecfg.h, define BITS_IN_JSAMPLE as 9, 10, 11, or 12 rather than 8. - 2. In jconfig.h, undefine BMP_SUPPORTED, RLE_SUPPORTED, and TARGA_SUPPORTED, - because the code for those formats doesn't handle deeper than 8-bit data - and won't even compile. (The PPM code does work, as explained below. - The GIF code works too; it scales 8-bit GIF data to and from 12-bit - depth automatically.) - 3. Compile. Don't expect "make test" to pass, since the supplied test - files are for 8-bit data. - -Currently, 9-bit to 12-bit support does not work on 16-bit-int machines. - -Run-time selection and conversion of data precision are currently not -supported and may be added later. -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 PPM reader (rdppm.c) can read deeper than 8-bit data from either -text-format or binary-format PPM and PGM files. Binary-format PPM/PGM files -which have a maxval greater than 255 are assumed to use 2 bytes per sample, -MSB first (big-endian order). As of early 1995, 2-byte binary format is not -officially supported by the PBMPLUS library, but it is expected that a -future release of PBMPLUS will support it. Note that the PPM reader will -read files of any maxval regardless of the BITS_IN_JSAMPLE setting; incoming -data is automatically rescaled to maxval=MAXJSAMPLE as appropriate for the -cjpeg bit depth. - -The PPM writer (wrppm.c) will normally write 2-byte binary PPM or PGM -format, maxval=MAXJSAMPLE, when compiled with BITS_IN_JSAMPLE>8. Since this -format is not yet widely supported, you can disable it by compiling wrppm.c -with PPM_NORAWWORD defined; then the data is scaled down to 8 bits to make a -standard 1-byte/sample PPM or PGM file. (Yes, this means still another copy -of djpeg to keep around. But hopefully you won't need it for very long. -Poskanzer's supposed to get that new PBMPLUS release out Real Soon Now.) - -Of course, if you are working with 9-bit to 12-bit data, you probably have -it stored in some other, nonstandard format. In that case you'll probably -want to write your own I/O modules to read and write your format. - -Note: -The standard Huffman tables are only valid for 8-bit data precision. If -you selected more than 8-bit data precision, cjpeg uses arithmetic coding -by default. The Huffman encoder normally uses entropy optimization to -compute usable tables for higher precision. Otherwise, you'll have to -supply different default Huffman tables. - -Removing code: - -If you need to make a smaller version of the JPEG software, some optional -functions can be removed at compile time. See the xxx_SUPPORTED #defines in -jconfig.h and jmorecfg.h. If at all possible, we recommend that you leave in -decoder support for all valid JPEG files, to ensure that you can read anyone's -output. Taking out support for image file formats that you don't use is the -most painless way to make the programs smaller. Another possibility is to -remove some of the DCT methods: in particular, the "IFAST" method may not be -enough faster than the others to be worth keeping on your machine. (If you -do remove ISLOW or IFAST, be sure to redefine JDCT_DEFAULT or JDCT_FASTEST -to a supported method, by adding a #define in jconfig.h.) - - -OPTIMIZATION -============ - -Unless you own a Cray, you'll probably be interested in making the JPEG -software go as fast as possible. This section covers some machine-dependent -optimizations you may want to try. We suggest that before trying any of -this, you first get the basic installation to pass the self-test step. -Repeat the self-test after any optimization to make sure that you haven't -broken anything. - -The integer DCT routines perform a lot of multiplications. These -multiplications must yield 32-bit results, but none of their input values -are more than 16 bits wide. On many machines, notably the 680x0 and 80x86 -CPUs, a 16x16=>32 bit multiply instruction is faster than a full 32x32=>32 -bit multiply. Unfortunately there is no portable way to specify such a -multiplication in C, but some compilers can generate one when you use the -right combination of casts. See the MULTIPLYxxx macro definitions in -jdct.h. If your compiler makes "int" be 32 bits and "short" be 16 bits, -defining SHORTxSHORT_32 is fairly likely to work. When experimenting with -alternate definitions, be sure to test not only whether the code still works -(use the self-test), but also whether it is actually faster --- on some -compilers, alternate definitions may compute the right answer, yet be slower -than the default. Timing cjpeg on a large PGM (grayscale) input file is the -best way to check this, as the DCT will be the largest fraction of the runtime -in that mode. (Note: some of the distributed compiler-specific jconfig files -already contain #define switches to select appropriate MULTIPLYxxx -definitions.) - -If your machine has sufficiently fast floating point hardware, you may find -that the float DCT method is faster than the integer DCT methods, even -after tweaking the integer multiply macros. In that case you may want to -make the float DCT be the default method. (The only objection to this is -that float DCT results may vary slightly across machines.) To do that, add -"#define JDCT_DEFAULT JDCT_FLOAT" to jconfig.h. Even if you don't change -the default, you should redefine JDCT_FASTEST, which is the method selected -by djpeg's -fast switch. Don't forget to update the documentation files -(usage.txt and/or cjpeg.1, djpeg.1) to agree with what you've done. - -If access to "short" arrays is slow on your machine, it may be a win to -define type JCOEF as int rather than short. This will cost a good deal of -memory though, particularly in some multi-pass modes, so don't do it unless -you have memory to burn and short is REALLY slow. - -If your compiler can compile function calls in-line, make sure the INLINE -macro in jmorecfg.h is defined as the keyword that marks a function -inline-able. Some compilers have a switch that tells the compiler to inline -any function it thinks is profitable (e.g., -finline-functions for gcc). -Enabling such a switch is likely to make the compiled code bigger but faster. - -In general, it's worth trying the maximum optimization level of your compiler, -and experimenting with any optional optimizations such as loop unrolling. -(Unfortunately, far too many compilers have optimizer bugs ... be prepared to -back off if the code fails self-test.) If you do any experimentation along -these lines, please report the optimal settings to jpeg-info@jpegclub.org so -we can mention them in future releases. Be sure to specify your machine and -compiler version. - - -HINTS FOR SPECIFIC SYSTEMS -========================== - -We welcome reports on changes needed for systems not mentioned here. Submit -'em to jpeg-info@jpegclub.org. Also, if configure or ckconfig.c is wrong -about how to configure the JPEG software for your system, please let us know. - - -Acorn RISC OS: - -(Thanks to Simon Middleton for these hints on compiling with Desktop C.) -After renaming the files according to Acorn conventions, take a copy of -makefile.ansi, change all occurrences of 'libjpeg.a' to 'libjpeg.o' and -change these definitions as indicated: - -CFLAGS= -throwback -IC: -Wn -LDLIBS=C:o.Stubs -SYSDEPMEM=jmemansi.o -LN=Link -AR=LibFile -c -o - -Also add a new line '.c.o:; $(cc) $< $(cflags) -c -o $@'. Remove the -lines '$(RM) libjpeg.o' and '$(AR2) libjpeg.o' and the 'jconfig.h' -dependency section. - -Copy jconfig.txt to jconfig.h. Edit jconfig.h to define TWO_FILE_COMMANDLINE -and CHAR_IS_UNSIGNED. - -Run the makefile using !AMU not !Make. If you want to use the 'clean' and -'test' makefile entries then you will have to fiddle with the syntax a bit -and rename the test files. - - -Amiga: - -SAS C 6.50 reportedly is too buggy to compile the IJG code properly. -A patch to update to 6.51 is available from SAS or AmiNet FTP sites. - -The supplied config files are set up to use jmemname.c as the memory -manager, with temporary files being created on the device named by -"JPEGTMP:". - - -Atari ST/STE/TT: - -Copy the project files makcjpeg.st, makdjpeg.st, maktjpeg.st, and makljpeg.st -to cjpeg.prj, djpeg.prj, jpegtran.prj, and libjpeg.prj respectively. The -project files should work as-is with Pure C. For Turbo C, change library -filenames "pc..." to "tc..." in each project file. Note that libjpeg.prj -selects jmemansi.c as the recommended memory manager. You'll probably want to -adjust the DEFAULT_MAX_MEM setting --- you want it to be a couple hundred K -less than your normal free memory. Put "#define DEFAULT_MAX_MEM nnnn" into -jconfig.h to do this. - -To use the 68881/68882 coprocessor for the floating point DCT, add the -compiler option "-8" to the project files and replace pcfltlib.lib with -pc881lib.lib in cjpeg.prj and djpeg.prj. Or if you don't have a -coprocessor, you may prefer to remove the float DCT code by undefining -DCT_FLOAT_SUPPORTED in jmorecfg.h (since without a coprocessor, the float -code will be too slow to be useful). In that case, you can delete -pcfltlib.lib from the project files. - -Note that you must make libjpeg.lib before making cjpeg.ttp, djpeg.ttp, -or jpegtran.ttp. You'll have to perform the self-test by hand. - -We haven't bothered to include project files for rdjpgcom and wrjpgcom. -Those source files should just be compiled by themselves; they don't -depend on the JPEG library. You can use the default.prj project file -of the Pure C distribution to make the programs. - -There is a bug in some older versions of the Turbo C library which causes the -space used by temporary files created with "tmpfile()" not to be freed after -an abnormal program exit. If you check your disk afterwards, you will find -cluster chains that are allocated but not used by a file. This should not -happen in cjpeg/djpeg/jpegtran, since we enable a signal catcher to explicitly -close temp files before exiting. But if you use the JPEG library with your -own code, be sure to supply a signal catcher, or else use a different -system-dependent memory manager. - - -Cray: - -Should you be so fortunate as to be running JPEG on a Cray YMP, there is a -compiler bug in old versions of Cray's Standard C (prior to 3.1). If you -still have an old compiler, you'll need to insert a line reading -"#pragma novector" just before the loop - for (i = 1; i <= (int) htbl->bits[l]; i++) - huffsize[p++] = (char) l; -in fix_huff_tbl (in V5beta1, line 204 of jchuff.c and line 176 of jdhuff.c). -[This bug may or may not still occur with the current IJG code, but it's -probably a dead issue anyway...] - - -HP-UX: - -If you have HP-UX 7.05 or later with the "software development" C compiler, -you should run the compiler in ANSI mode. If using the configure script, -say - ./configure CC='cc -Aa' -(or -Ae if you prefer). If configuring by hand, use makefile.ansi and add -"-Aa" to the CFLAGS line in the makefile. - -If you have a pre-7.05 system, or if you are using the non-ANSI C compiler -delivered with a minimum HP-UX system, then you must use makefile.unix -(and do NOT add -Aa); or just run configure without the CC option. - -On HP 9000 series 800 machines, the HP C compiler is buggy in revisions prior -to A.08.07. If you get complaints about "not a typedef name", you'll have to -use makefile.unix, or run configure without the CC option. - - -Macintosh, generic comments: - -The supplied user-interface files (cjpeg.c, djpeg.c, etc) are set up to -provide a Unix-style command line interface. You can use this interface on -the Mac by means of the ccommand() library routine provided by Metrowerks -CodeWarrior or Think C. This is only appropriate for testing the library, -however; to make a user-friendly equivalent of cjpeg/djpeg you'd really want -to develop a Mac-style user interface. There isn't a complete example -available at the moment, but there are some helpful starting points: -1. Sam Bushell's free "To JPEG" applet provides drag-and-drop conversion to -JPEG under System 7 and later. This only illustrates how to use the -compression half of the library, but it does a very nice job of that part. -The CodeWarrior source code is available from http://www.pobox.com/~jsam. -2. Jim Brunner prepared a Mac-style user interface for both compression and -decompression. Unfortunately, it hasn't been updated since IJG v4, and -the library's API has changed considerably since then. Still it may be of -some help, particularly as a guide to compiling the IJG code under Think C. -Jim's code is available from the Info-Mac archives, at sumex-aim.stanford.edu -or mirrors thereof; see file /info-mac/dev/src/jpeg-convert-c.hqx. - -jmemmac.c is the recommended memory manager back end for Macintosh. It uses -NewPtr/DisposePtr instead of malloc/free, and has a Mac-specific -implementation of jpeg_mem_available(). It also creates temporary files that -follow Mac conventions. (That part of the code relies on System-7-or-later OS -functions. See the comments in jmemmac.c if you need to run it on System 6.) -NOTE that USE_MAC_MEMMGR must be defined in jconfig.h to use jmemmac.c. - -You can also use jmemnobs.c, if you don't care about handling images larger -than available memory. If you use any memory manager back end other than -jmemmac.c, we recommend replacing "malloc" and "free" by "NewPtr" and -"DisposePtr", because Mac C libraries often have peculiar implementations of -malloc/free. (For instance, free() may not return the freed space to the -Mac Memory Manager. This is undesirable for the IJG code because jmemmgr.c -already clumps space requests.) - - -Macintosh, Metrowerks CodeWarrior: - -The Unix-command-line-style interface can be used by defining USE_CCOMMAND. -You'll also need to define TWO_FILE_COMMANDLINE to avoid stdin/stdout. -This means that when using the cjpeg/djpeg programs, you'll have to type the -input and output file names in the "Arguments" text-edit box, rather than -using the file radio buttons. (Perhaps USE_FDOPEN or USE_SETMODE would -eliminate the problem, but I haven't heard from anyone who's tried it.) - -On 680x0 Macs, Metrowerks defines type "double" as a 10-byte IEEE extended -float. jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power -of 2. Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint. - -The supplied configuration file jconfig.mac can be used for your jconfig.h; -it includes all the recommended symbol definitions. If you have AppleScript -installed, you can run the supplied script makeproj.mac to create CodeWarrior -project files for the library and the testbed applications, then build the -library and applications. (Thanks to Dan Sears and Don Agro for this nifty -hack, which saves us from trying to maintain CodeWarrior project files as part -of the IJG distribution...) - - -Macintosh, Think C: - -The documentation in Jim Brunner's "JPEG Convert" source code (see above) -includes detailed build instructions for Think C; it's probably somewhat -out of date for the current release, but may be helpful. - -If you want to build the minimal command line version, proceed as follows. -You'll have to prepare project files for the programs; we don't include any -in the distribution since they are not text files. Use the file lists in -any of the supplied makefiles as a guide. Also add the ANSI and Unix C -libraries in a separate segment. You may need to divide the JPEG files into -more than one segment; we recommend dividing compression and decompression -modules. Define USE_CCOMMAND in jconfig.h so that the ccommand() routine is -called. You must also define TWO_FILE_COMMANDLINE because stdin/stdout -don't handle binary data correctly. - -On 680x0 Macs, Think C defines type "double" as a 12-byte IEEE extended float. -jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power of 2. -Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint. - -jconfig.mac should work as a jconfig.h configuration file for Think C, -but the makeproj.mac AppleScript script is specific to CodeWarrior. Sorry. - - -MIPS R3000: - -MIPS's cc version 1.31 has a rather nasty optimization bug. Don't use -O -if you have that compiler version. (Use "cc -V" to check the version.) -Note that the R3000 chip is found in workstations from DEC and others. - - -MS-DOS, generic comments for 16-bit compilers: - -The IJG code is designed to work well in 80x86 "small" or "medium" memory -models (i.e., data pointers are 16 bits unless explicitly declared "far"; -code pointers can be either size). You may be able to use small model to -compile cjpeg or djpeg by itself, but you will probably have to use medium -model for any larger application. This won't make much difference in -performance. You *will* take a noticeable performance hit if you use a -large-data memory model, and you should avoid "huge" model if at all -possible. Be sure that NEED_FAR_POINTERS is defined in jconfig.h if you use -a small-data memory model; be sure it is NOT defined if you use a large-data -model. (The supplied makefiles and jconfig files for Borland and Microsoft C -compile in medium model and define NEED_FAR_POINTERS.) - -The DOS-specific memory manager, jmemdos.c, should be used if possible. -It needs some assembly-code routines which are in jmemdosa.asm; make sure -your makefile assembles that file and includes it in the library. If you -don't have a suitable assembler, you can get pre-assembled object files for -jmemdosa by FTP from ftp.uu.net:/graphics/jpeg/jdosaobj.zip. (DOS-oriented -distributions of the IJG source code often include these object files.) - -When using jmemdos.c, jconfig.h must define USE_MSDOS_MEMMGR and must set -MAX_ALLOC_CHUNK to less than 64K (65520L is a typical value). If your -C library's far-heap malloc() can't allocate blocks that large, reduce -MAX_ALLOC_CHUNK to whatever it can handle. - -If you can't use jmemdos.c for some reason --- for example, because you -don't have an assembler to assemble jmemdosa.asm --- you'll have to fall -back to jmemansi.c or jmemname.c. You'll probably still need to set -MAX_ALLOC_CHUNK in jconfig.h, because most DOS C libraries won't malloc() -more than 64K at a time. IMPORTANT: if you use jmemansi.c or jmemname.c, -you will have to compile in a large-data memory model in order to get the -right stdio library. Too bad. - -wrjpgcom needs to be compiled in large model, because it malloc()s a 64KB -work area to hold the comment text. If your C library's malloc can't -handle that, reduce MAX_COM_LENGTH as necessary in wrjpgcom.c. - -Most MS-DOS compilers treat stdin/stdout as text files, so you must use -two-file command line style. But if your compiler has either fdopen() or -setmode(), you can use one-file style if you like. To do this, define -USE_SETMODE or USE_FDOPEN so that stdin/stdout will be set to binary mode. -(USE_SETMODE seems to work with more DOS compilers than USE_FDOPEN.) You -should test that I/O through stdin/stdout produces the same results as I/O -to explicitly named files... the "make test" procedures in the supplied -makefiles do NOT use stdin/stdout. - - -MS-DOS, generic comments for 32-bit compilers: - -None of the above comments about memory models apply if you are using a -32-bit flat-memory-space environment, such as DJGPP or Watcom C. (And you -should use one if you have it, as performance will be much better than -8086-compatible code!) For flat-memory-space compilers, do NOT define -NEED_FAR_POINTERS, and do NOT use jmemdos.c. Use jmemnobs.c if the -environment supplies adequate virtual memory, otherwise use jmemansi.c or -jmemname.c. - -You'll still need to be careful about binary I/O through stdin/stdout. -See the last paragraph of the previous section. - - -MS-DOS, Borland C: - -Be sure to convert all the source files to DOS text format (CR/LF newlines). -Although Borland C will often work OK with unmodified Unix (LF newlines) -source files, sometimes it will give bogus compile errors. -"Illegal character '#'" is the most common such error. (This is true with -Borland C 3.1, but perhaps is fixed in newer releases.) - -If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE. -jconfig.bcc already includes #define USE_SETMODE to make this work. -(fdopen does not work correctly.) - - -MS-DOS, Microsoft C: - -makefile.mc6 works with Microsoft C, DOS Visual C++, etc. It should only -be used if you want to build a 16-bit (small or medium memory model) program. - -If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE. -jconfig.mc6 already includes #define USE_SETMODE to make this work. -(fdopen does not work correctly.) - -Note that this makefile assumes that the working copy of itself is called -"makefile". If you want to call it something else, say "makefile.mak", -be sure to adjust the dependency line that reads "$(RFILE) : makefile". -Otherwise the make will fail because it doesn't know how to create "makefile". -Worse, some releases of Microsoft's make utilities give an incorrect error -message in this situation. - -Old versions of MS C fail with an "out of macro expansion space" error -because they can't cope with the macro TRACEMS8 (defined in jerror.h). -If this happens to you, the easiest solution is to change TRACEMS8 to -expand to nothing. You'll lose the ability to dump out JPEG coefficient -tables with djpeg -debug -debug, but at least you can compile. - -Original MS C 6.0 is very buggy; it compiles incorrect code unless you turn -off optimization entirely (remove -O from CFLAGS). 6.00A is better, but it -still generates bad code if you enable loop optimizations (-Ol or -Ox). - -MS C 8.0 crashes when compiling jquant1.c with optimization switch /Oo ... -which is on by default. To work around this bug, compile that one file -with /Oo-. - - -Microsoft Windows (all versions), generic comments: - -Some Windows system include files define typedef boolean as "unsigned char". -The IJG code also defines typedef boolean, but we make it an "enum" by default. -This doesn't affect the IJG programs because we don't import those Windows -include files. But if you use the JPEG library in your own program, and some -of your program's files import one definition of boolean while some import the -other, you can get all sorts of mysterious problems. A good preventive step -is to make the IJG library use "unsigned char" for boolean. To do that, -add something like this to your jconfig.h file: - /* Define "boolean" as unsigned char, not enum, per Windows custom */ - #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 */ -(This is already in jconfig.vc, by the way.) - -windef.h contains the declarations - #define far - #define FAR far -Since jmorecfg.h tries to define FAR as empty, you may get a compiler -warning if you include both jpeglib.h and windef.h (which windows.h -includes). To suppress the warning, you can put "#ifndef FAR"/"#endif" -around the line "#define FAR" in jmorecfg.h. -(Something like this is already in jmorecfg.h, by the way.) - -When using the library in a Windows application, you will almost certainly -want to modify or replace the error handler module jerror.c, since our -default error handler does a couple of inappropriate things: - 1. it tries to write error and warning messages on stderr; - 2. in event of a fatal error, it exits by calling exit(). - -A simple stopgap solution for problem 1 is to replace the line - fprintf(stderr, "%s\n", buffer); -(in output_message in jerror.c) with - MessageBox(GetActiveWindow(),buffer,"JPEG Error",MB_OK|MB_ICONERROR); -It's highly recommended that you at least do that much, since otherwise -error messages will disappear into nowhere. (Beginning with IJG v6b, this -code is already present in jerror.c; just define USE_WINDOWS_MESSAGEBOX in -jconfig.h to enable it.) - -The proper solution for problem 2 is to return control to your calling -application after a library error. This can be done with the setjmp/longjmp -technique discussed in libjpeg.txt and illustrated in example.c. (NOTE: -some older Windows C compilers provide versions of setjmp/longjmp that -don't actually work under Windows. You may need to use the Windows system -functions Catch and Throw instead.) - -The recommended memory manager under Windows is jmemnobs.c; in other words, -let Windows do any virtual memory management needed. You should NOT use -jmemdos.c nor jmemdosa.asm under Windows. - -For Windows 3.1, we recommend compiling in medium or large memory model; -for newer Windows versions, use a 32-bit flat memory model. (See the MS-DOS -sections above for more info about memory models.) In the 16-bit memory -models only, you'll need to put - #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ -into jconfig.h to limit allocation chunks to 64Kb. (Without that, you'd -have to use huge memory model, which slows things down unnecessarily.) -jmemnobs.c works without modification in large or flat memory models, but to -use medium model, you need to modify its jpeg_get_large and jpeg_free_large -routines to allocate far memory. In any case, you might like to replace -its calls to malloc and free with direct calls on Windows memory allocation -functions. - -You may also want to modify jdatasrc.c and jdatadst.c to use Windows file -operations rather than fread/fwrite. This is only necessary if your C -compiler doesn't provide a competent implementation of C stdio functions. - -You might want to tweak the RGB_xxx macros in jmorecfg.h so that the library -will accept or deliver color pixels in BGR sample order, not RGB; BGR order -is usually more convenient under Windows. Note that this change will break -the sample applications cjpeg/djpeg, but the library itself works fine. - - -Many people want to convert the IJG library into a DLL. This is reasonably -straightforward, but watch out for the following: - - 1. Don't try to compile as a DLL in small or medium memory model; use -large model, or even better, 32-bit flat model. Many places in the IJG code -assume the address of a local variable is an ordinary (not FAR) pointer; -that isn't true in a medium-model DLL. - - 2. Microsoft C cannot pass file pointers between applications and DLLs. -(See Microsoft Knowledge Base, PSS ID Number Q50336.) So jdatasrc.c and -jdatadst.c don't work if you open a file in your application and then pass -the pointer to the DLL. One workaround is to make jdatasrc.c/jdatadst.c -part of your main application rather than part of the DLL. - - 3. You'll probably need to modify the macros GLOBAL() and EXTERN() to -attach suitable linkage keywords to the exported routine names. Similarly, -you'll want to modify METHODDEF() and JMETHOD() to ensure function pointers -are declared in a way that lets application routines be called back through -the function pointers. These macros are in jmorecfg.h. Typical definitions -for a 16-bit DLL are: - #define GLOBAL(type) type _far _pascal _loadds _export - #define EXTERN(type) extern type _far _pascal _loadds - #define METHODDEF(type) static type _far _pascal - #define JMETHOD(type,methodname,arglist) \ - type (_far _pascal *methodname) arglist -For a 32-bit DLL you may want something like - #define GLOBAL(type) __declspec(dllexport) type - #define EXTERN(type) extern __declspec(dllexport) type -Although not all the GLOBAL routines are actually intended to be called by -the application, the performance cost of making them all DLL entry points is -negligible. - -The unmodified IJG library presents a very C-specific application interface, -so the resulting DLL is only usable from C or C++ applications. There has -been some talk of writing wrapper code that would present a simpler interface -usable from other languages, such as Visual Basic. This is on our to-do list -but hasn't been very high priority --- any volunteers out there? - - -Microsoft Windows, Borland C: - -The provided jconfig.bcc should work OK in a 32-bit Windows environment, -but you'll need to tweak it in a 16-bit environment (you'd need to define -NEED_FAR_POINTERS and MAX_ALLOC_CHUNK). Beware that makefile.bcc will need -alteration if you want to use it for Windows --- in particular, you should -use jmemnobs.c not jmemdos.c under Windows. - -Borland C++ 4.5 fails with an internal compiler error when trying to compile -jdmerge.c in 32-bit mode. If enough people complain, perhaps Borland will fix -it. In the meantime, the simplest known workaround is to add a redundant -definition of the variable range_limit in h2v1_merged_upsample(), at the head -of the block that handles odd image width (about line 268 in v6 jdmerge.c): - /* If image width is odd, do the last output column separately */ - if (cinfo->output_width & 1) { - register JSAMPLE * range_limit = cinfo->sample_range_limit; /* ADD THIS */ - cb = GETJSAMPLE(*inptr1); -Pretty bizarre, especially since the very similar routine h2v2_merged_upsample -doesn't trigger the bug. -Recent reports suggest that this bug does not occur with "bcc32a" (the -Pentium-optimized version of the compiler). - -Another report from a user of Borland C 4.5 was that incorrect code (leading -to a color shift in processed images) was produced if any of the following -optimization switch combinations were used: - -Ot -Og - -Ot -Op - -Ot -Om -So try backing off on optimization if you see such a problem. (Are there -several different releases all numbered "4.5"??) - - -Microsoft Windows, Microsoft Visual C++: - -jconfig.vc should work OK with any Microsoft compiler for a 32-bit memory -model. makefile.vc is intended for command-line use. (If you are using -the Developer Studio environment, you may prefer the DevStudio project -files; see below.) - -IJG JPEG 7 adds extern "C" to jpeglib.h. This avoids the need to put -extern "C" { ... } around #include "jpeglib.h" in your C++ application. -You can also force VC++ to treat the library as C++ code by renaming -all the *.c files to *.cpp (and adjusting the makefile to match). -In this case you also need to define the symbol DONT_USE_EXTERN_C in -the configuration to prevent jpeglib.h from using extern "C". - - -Microsoft Windows, Microsoft Visual C++ 6 Developer Studio: - -We include makefiles that should work as project files in Developer Studio -6.0 or later. There is a library makefile that builds the IJG library as -a static Win32 library, and application makefiles that build the sample -applications as Win32 console applications. (Even if you only want the -library, we recommend building the applications so that you can run the -self-test.) - -To use: -1. Open the command prompt, change to the main directory and execute the - command line - NMAKE /f makefile.vs setup-vc6 - This will move jconfig.vc to jconfig.h and makefiles to project files. - (Note that the renaming is critical!) -2. Open the workspace file jpeg.dsw, build the library project. - (If you are using Developer Studio more recent than 6.0, you'll - probably get a message saying that the project files are being updated.) -3. Open the workspace file apps.dsw, build the application projects. -4. To perform the self-test, execute the command line - NMAKE /f makefile.vs test-build -5. Move the application .exe files from `app`\Release to an - appropriate location on your path. - - -Microsoft Windows, Visual Studio 2017 (v15): - -We include makefiles that should work as project files in Visual Studio -2017 (v15) or later. There is a library makefile that builds the IJG -library as a static Win32 library, and application makefiles that build -the sample applications as Win32 console applications. (Even if you only -want the library, we recommend building the applications so that you can -run the self-test.) - -To use: -1. Open the Developer Command Prompt, change to the main directory and - execute the command line - NMAKE /f makefile.vs setup-v15 - This will move jconfig.vc to jconfig.h and makefiles to project files. - (Note that the renaming is critical!) -2. Open the solution file jpeg.sln, build the library project. - a) If you are using Visual Studio more recent than - 2017 (v15), you'll probably get a message saying - that the project files are being updated. - b) If necessary, open the project properties and - adapt the Windows Target Platform Version in - the Configuration Properties, General section; - we support the latest version at the time of release. -3. Open the solution file apps.sln, build the application projects. -4. To perform the self-test, execute the command line - NMAKE /f makefile.vs test-build -5. Move the application .exe files from `app`\Release to an - appropriate location on your path. - - -OS/2, Borland C++: - -Watch out for optimization bugs in older Borland compilers; you may need -to back off the optimization switch settings. See the comments in -makefile.bcc. - - -SGI: - -On some SGI systems, you may need to set "AR2= ar -ts" in the Makefile. -If you are using configure, you can do this by saying - ./configure RANLIB='ar -ts' -This change is not needed on all SGIs. Use it only if the make fails at the -stage of linking the completed programs. - -On the MIPS R4000 architecture (Indy, etc.), the compiler option "-mips2" -reportedly speeds up the float DCT method substantially, enough to make it -faster than the default int method (but still slower than the fast int -method). If you use -mips2, you may want to alter the default DCT method to -be float. To do this, put "#define JDCT_DEFAULT JDCT_FLOAT" in jconfig.h. - - -VMS: - -On an Alpha/VMS system with MMS, be sure to use the "/Marco=Alpha=1" -qualifier with MMS when building the JPEG package. - -VAX/VMS v5.5-1 may have problems with the test step of the build procedure -reporting differences when it compares the original and test images. If the -error points to the last block of the files, it is most likely bogus and may -be safely ignored. It seems to be because the files are Stream_LF and -Backup/Compare has difficulty with the (presumably) null padded files. -This problem was not observed on VAX/VMS v6.1 or AXP/VMS v6.1. diff --git a/Dependencies/FreeImage/Source/LibJPEG/jaricom.c b/Dependencies/FreeImage/Source/LibJPEG/jaricom.c deleted file mode 100644 index 6900688..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jaricom.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jcapimin.c b/Dependencies/FreeImage/Source/LibJPEG/jcapimin.c deleted file mode 100644 index 639ce86..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcapimin.c +++ /dev/null @@ -1,288 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jcapistd.c b/Dependencies/FreeImage/Source/LibJPEG/jcapistd.c deleted file mode 100644 index 0917afa..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcapistd.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jcarith.c b/Dependencies/FreeImage/Source/LibJPEG/jcarith.c deleted file mode 100644 index a64190e..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcarith.c +++ /dev/null @@ -1,944 +0,0 @@ -/* - * jcarith.c - * - * Developed 1997-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 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((e->c >> 19) & 0xFF, cinfo); - if (((e->c >> 19) & 0xFF) == 0xFF) - emit_byte(0x00, cinfo); - if (e->c & 0x7F800L) { - emit_byte((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). */ - e->buffer = temp & 0xFF; /* new output byte, might overflow later */ - } 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); - } - e->buffer = temp & 0xFF; /* new output byte (can still overflow) */ - } - 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, JBLOCKROW *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, JBLOCKROW *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, JBLOCKROW *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, JBLOCKROW *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, JBLOCKROW *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/Dependencies/FreeImage/Source/LibJPEG/jccoefct.c b/Dependencies/FreeImage/Source/LibJPEG/jccoefct.c deleted file mode 100644 index 924a703..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jccoefct.c +++ /dev/null @@ -1,454 +0,0 @@ -/* - * jccoefct.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2003-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 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 allocate a - * workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each - * MCU constructed and sent. (On 80x86, the workspace is FAR even though - * it's not really very big; this is to keep the module interfaces unchanged - * when a large coefficient buffer is necessary.) - * 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]; -} 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); - break; - } -} - - -/* - * 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 blkn, bi, ci, yindex, yoffset, blockcnt; - JDIMENSION ypos, 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; we rely on having allocated the MCU_buffer[] blocks - * sequentially. 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.) - */ - blkn = 0; - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - forward_DCT = cinfo->fdct->forward_DCT[compptr->component_index]; - blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width - : compptr->last_col_width; - xpos = MCU_col_num * compptr->MCU_sample_width; - ypos = yoffset * compptr->DCT_v_scaled_size; - /* ypos == (yoffset+yindex) * DCTSIZE */ - 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_buf[compptr->component_index], - coef->MCU_buffer[blkn], - ypos, xpos, (JDIMENSION) blockcnt); - if (blockcnt < compptr->MCU_width) { - /* Create some dummy blocks at the right edge of the image. */ - FMEMZERO((void FAR *) coef->MCU_buffer[blkn + blockcnt], - (compptr->MCU_width - blockcnt) * SIZEOF(JBLOCK)); - for (bi = blockcnt; bi < compptr->MCU_width; bi++) { - coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0]; - } - } - } else { - /* Create a row of dummy blocks at the bottom of the image. */ - FMEMZERO((void FAR *) coef->MCU_buffer[blkn], - compptr->MCU_width * SIZEOF(JBLOCK)); - for (bi = 0; bi < compptr->MCU_width; bi++) { - coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0]; - } - } - blkn += compptr->MCU_width; - ypos += compptr->DCT_v_scaled_size; - } - } - /* 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; - 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]; - /* 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_buf[ci], thisblockrow, - (JDIMENSION) (block_row * compptr->DCT_v_scaled_size), - (JDIMENSION) 0, blocks_across); - 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 (coef->iMCU_row_num == last_iMCU_row) { - blocks_across += ndummy; /* include lower right corner */ - MCUs_across = blocks_across / h_samp_factor; - for (block_row = block_rows; block_row < compptr->v_samp_factor; - block_row++) { - 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; - } - } - } - } - /* 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 blkn, ci, xindex, yindex, yoffset; - JDIMENSION start_col; - 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 */ - blkn = 0; /* index of 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][yindex+yoffset] + start_col; - for (xindex = 0; xindex < compptr->MCU_width; xindex++) { - coef->MCU_buffer[blkn++] = buffer_ptr++; - } - } - } - /* 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; - - coef = (my_coef_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_coef_controller)); - cinfo->coef = (struct jpeg_c_coef_controller *) coef; - coef->pub.start_pass = start_pass_coef; - - /* Create the coefficient buffer. */ - 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; - - 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. */ - JBLOCKROW buffer; - int i; - - buffer = (JBLOCKROW) - (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, - C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); - for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) { - coef->MCU_buffer[i] = buffer + i; - } - coef->whole_image[0] = NULL; /* flag for no virtual arrays */ - } -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jccolor.c b/Dependencies/FreeImage/Source/LibJPEG/jccolor.c deleted file mode 100644 index f6b4a49..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jccolor.c +++ /dev/null @@ -1,604 +0,0 @@ -/* - * jccolor.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2011-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 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 = 0.5 * (B - Y) / (1 - Kb) - * Cr = 0.5 * (R - Y) / (1 - Kr) - * 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), - * 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] = FIX(0.5) * i + CBCR_OFFSET + ONE_HALF-1; -/* B=>Cb and R=>Cr tables are the same - rgb_ycc_tab[i+R_CR_OFF] = FIX(0.5) * i + 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 INT32 * ctab = cconvert->rgb_ycc_tab; - 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]); - /* 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); - inptr += RGB_PIXELSIZE; - } - } -} - - -/**************** 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 * ctab = cconvert->rgb_ycc_tab; - register int r, g, b; - 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++) { - r = GETJSAMPLE(inptr[RGB_RED]); - g = GETJSAMPLE(inptr[RGB_GREEN]); - b = GETJSAMPLE(inptr[RGB_BLUE]); - /* Y */ - outptr[col] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - inptr += RGB_PIXELSIZE; - } - } -} - - -/* - * 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 INT32 * ctab = cconvert->rgb_ycc_tab; - register int r, g, b; - 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 */ - /* 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); - inptr += 4; - } - } -} - - -/* - * 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]); - /* 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); - inptr += RGB_PIXELSIZE; - } - } -} - - -/* - * 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) -{ - int instride = cinfo->input_components; - 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++) { - outptr[col] = inptr[0]; /* 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) -{ - int ci; - register int nc = cinfo->num_components; - register JSAMPROW inptr; - register JSAMPROW outptr; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->image_width; - - while (--num_rows >= 0) { - /* It seems fastest to make a separate pass for each component. */ - for (ci = 0; ci < nc; ci++) { - inptr = input_buf[0] + ci; - outptr = output_buf[ci][output_row]; - for (col = 0; col < num_cols; col++) { - *outptr++ = *inptr; /* don't need GETJSAMPLE() here */ - inptr += nc; - } - } - 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 (cinfo->input_components != RGB_PIXELSIZE) - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - break; - - 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); - break; - } - - /* 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) { - 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); - } - } else - 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) - cconvert->pub.color_convert = null_convert; - else - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - 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; - break; - } -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jcdctmgr.c b/Dependencies/FreeImage/Source/LibJPEG/jcdctmgr.c deleted file mode 100644 index fafab91..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcdctmgr.c +++ /dev/null @@ -1,477 +0,0 @@ -/* - * jcdctmgr.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2003-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 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_row/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_row, 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; - - sample_data += start_row; /* fold in the vertical offset once */ - - 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_row, 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; - - sample_data += start_row; /* fold in the vertical offset once */ - - 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; - } - break; - default: - ERREXIT2(cinfo, JERR_BAD_DCTSIZE, - compptr->DCT_h_scaled_size, compptr->DCT_v_scaled_size); - break; - } - 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); - break; - } - } -} - - -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jchuff.c b/Dependencies/FreeImage/Source/LibJPEG/jchuff.c deleted file mode 100644 index d1313f6..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jchuff.c +++ /dev/null @@ -1,1573 +0,0 @@ -/* - * jchuff.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2006-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 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 data; - * -16384 .. +16383 for 12-bit data. - * Hence the magnitude should always fit in 10 or 14 bits respectively. - */ - -#if BITS_IN_JSAMPLE == 8 -#define MAX_COEF_BITS 10 -#else -#define MAX_COEF_BITS 14 -#endif - -/* 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) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, 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, JBLOCKROW *MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - register int temp, temp2; - register int nbits; - 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); - - /* 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. */ - temp2 = temp - entropy->saved.last_dc_val[ci]; - entropy->saved.last_dc_val[ci] = temp; - - /* Encode the DC coefficient difference per section G.1.2.1 */ - temp = temp2; - if (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; - while (temp) { - nbits++; - 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+1) - 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. */ - if (nbits) /* emit_bits rejects calls with size 0 */ - 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, JBLOCKROW *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; - - 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]; - - /* 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 */ - temp >>= Al; /* apply the point transform */ - /* For a negative coef, want temp2 = bitwise complement of abs(coef) */ - temp2 = ~temp; - } else { - temp >>= Al; /* apply the point transform */ - temp2 = temp; - } - /* Watch out for case that nonzero coef is zero after point transform */ - if (temp == 0) { - r++; - continue; - } - - /* 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 = 1; /* there must be at least one 1 bit */ - while ((temp >>= 1)) - nbits++; - /* 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, JBLOCKROW *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, JBLOCKROW *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; - const int * natural_order = state->cinfo->natural_order; - - /* Encode the DC coefficient difference per section F.1.2.1 */ - - temp = temp2 = block[0] - last_dc_val; - - if (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; - while (temp) { - nbits++; - 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+1) - 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 (nbits) /* emit_bits rejects calls with size 0 */ - 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 ((temp2 = block[natural_order[k]]) == 0) { - r++; - } else { - /* 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; - } - - temp = temp2; - if (temp < 0) { - temp = -temp; /* temp is abs value of 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 = 1; /* there must be at least one 1 bit */ - while ((temp >>= 1)) - nbits++; - /* Check for out-of-range coefficient values */ - 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; - } - } - - /* 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, JBLOCKROW *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; - const int * natural_order = cinfo->natural_order; - - /* Encode the DC coefficient difference per section F.1.2.1 */ - - temp = block[0] - last_dc_val; - if (temp < 0) - temp = -temp; - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 0; - while (temp) { - nbits++; - 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+1) - 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++; - } else { - /* if run length > 15, must emit special run-length-16 codes (0xF0) */ - while (r > 15) { - ac_counts[0xF0]++; - r -= 16; - } - - /* Find the number of bits needed for the magnitude of the coefficient */ - if (temp < 0) - temp = -temp; - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 1; /* there must be at least one 1 bit */ - while ((temp >>= 1)) - nbits++; - /* Check for out-of-range coefficient values */ - 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; - } - } - - /* 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, JBLOCKROW *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; - int p, i, j; - long v; - - /* 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 */ - - 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. - */ - - /* 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_OVERFLOW); - - 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) - 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)); - - /* Return a list of the symbols sorted by code length */ - /* It's not real clear to me why we don't need to consider the codelength - * changes made above, but the JPEG spec seems to think this works. - */ - p = 0; - for (i = 1; i <= MAX_CLEN; i++) { - for (j = 0; j <= 255; j++) { - if (codesize[j] == i) { - htbl->huffval[p] = (UINT8) j; - p++; - } - } - } - - /* 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]; - - /* It's important not to apply jpeg_gen_optimal_table more than once - * per table, because it clobbers the input frequency counts! - */ - if (cinfo->progressive_mode) - /* Flush out buffered data (all we care about is counting the EOB symbol) */ - emit_eobrun(entropy); - - 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/Dependencies/FreeImage/Source/LibJPEG/jcinit.c b/Dependencies/FreeImage/Source/LibJPEG/jcinit.c deleted file mode 100644 index 2aea7ca..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcinit.c +++ /dev/null @@ -1,249 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jcmainct.c b/Dependencies/FreeImage/Source/LibJPEG/jcmainct.c deleted file mode 100644 index 39b9790..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcmainct.c +++ /dev/null @@ -1,297 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jcmarker.c b/Dependencies/FreeImage/Source/LibJPEG/jcmarker.c deleted file mode 100644 index ca2bb39..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcmarker.c +++ /dev/null @@ -1,719 +0,0 @@ -/* - * jcmarker.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2003-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 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 */ - break; - } -} - - -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jcmaster.c b/Dependencies/FreeImage/Source/LibJPEG/jcmaster.c deleted file mode 100644 index 43d49ae..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcmaster.c +++ /dev/null @@ -1,674 +0,0 @@ -/* - * jcmaster.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 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; break; - } - - /* 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 - 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 - 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 = (JDIMENSION) - jdiv_round_up((long) cinfo->jpeg_height, - (long) (cinfo->max_v_samp_factor * cinfo->block_size)); - - 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/Dependencies/FreeImage/Source/LibJPEG/jcomapi.c b/Dependencies/FreeImage/Source/LibJPEG/jcomapi.c deleted file mode 100644 index 9b1fa75..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcomapi.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * jcomapi.c - * - * Copyright (C) 1994-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 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; -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jconfig.h b/Dependencies/FreeImage/Source/LibJPEG/jconfig.h deleted file mode 100644 index 3d952e2..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jconfig.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - * jconfig.txt - * - * Copyright (C) 1991-1994, Thomas G. Lane. - * Modified 2009-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 documents the configuration options that are required to - * customize the JPEG software for a particular system. - * - * The actual configuration options for a particular installation are stored - * in jconfig.h. On many machines, jconfig.h can be generated automatically - * or copied from one of the "canned" jconfig files that we supply. But if - * you need to generate a jconfig.h file by hand, this file tells you how. - * - * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING. - * EDIT A COPY NAMED JCONFIG.H. - */ - - -/* - * These symbols indicate the properties of your machine or compiler. - * #define the symbol if yes, #undef it if no. - */ - -/* Does your compiler support function prototypes? - * (If not, you also need to use ansi2knr, see install.txt) - */ -#define HAVE_PROTOTYPES - -/* Does your compiler support the declaration "unsigned char" ? - * How about "unsigned short" ? - */ -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT - -/* Define "void" as "char" if your compiler doesn't know about type void. - * NOTE: be sure to define void such that "void *" represents the most general - * pointer type, e.g., that returned by malloc(). - */ -/* #define void char */ - -/* Define "const" as empty if your compiler doesn't know the "const" keyword. - */ -/* #define const */ - -/* Define this if an ordinary "char" type is unsigned. - * If you're not sure, leaving it undefined will work at some cost in speed. - * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal. - */ -#undef CHAR_IS_UNSIGNED - -/* Define this if your system has an ANSI-conforming file. - */ -#define HAVE_STDDEF_H - -/* Define this if your system has an ANSI-conforming file. - */ -#define HAVE_STDLIB_H - -/* Define this if your system does not have an ANSI/SysV , - * but does have a BSD-style . - */ -#undef NEED_BSD_STRINGS - -/* Define this if your system does not provide typedef size_t in any of the - * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in - * instead. - */ -#undef NEED_SYS_TYPES_H - -/* For 80x86 machines, you need to define NEED_FAR_POINTERS, - * unless you are using a large-data memory model or 80386 flat-memory mode. - * On less brain-damaged CPUs this symbol must not be defined. - * (Defining this symbol causes large data structures to be referenced through - * "far" pointers and to be allocated with a special version of malloc.) - */ -#undef NEED_FAR_POINTERS - -/* Define this if your linker needs global names to be unique in less - * than the first 15 characters. - */ -#undef NEED_SHORT_EXTERNAL_NAMES - -/* Although a real ANSI C compiler can deal perfectly well with pointers to - * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI - * and pseudo-ANSI compilers get confused. To keep one of these bozos happy, - * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you - * actually get "missing structure definition" warnings or errors while - * compiling the JPEG code. - */ -#undef INCOMPLETE_TYPES_BROKEN - -/* Define "boolean" as unsigned char, not int, per Windows custom */ -#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -typedef unsigned char boolean; -#endif -#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ - -/* - * The following options affect code selection within the JPEG library, - * but they don't need to be visible to applications using the library. - * To minimize application namespace pollution, the symbols won't be - * defined unless JPEG_INTERNALS has been defined. - */ - -#ifdef JPEG_INTERNALS - -/* Define this if your compiler implements ">>" on signed values as a logical - * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift, - * which is the normal and rational definition. - */ -#undef RIGHT_SHIFT_IS_UNSIGNED - - -#endif /* JPEG_INTERNALS */ - - -/* - * The remaining options do not affect the JPEG library proper, - * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c). - * Other applications can ignore these. - */ - -#ifdef JPEG_CJPEG_DJPEG - -/* These defines indicate which image (non-JPEG) file formats are allowed. */ - -#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 /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -/* Define this if you want to name both input and output files on the command - * line, rather than using stdout and optionally stdin. You MUST do this if - * your system can't cope with binary I/O to stdin/stdout. See comments at - * head of cjpeg.c or djpeg.c. - */ -#undef TWO_FILE_COMMANDLINE - -/* Define this if your system needs explicit cleanup of temporary files. - * This is crucial under MS-DOS, where the temporary "files" may be areas - * of extended memory; on most other systems it's not as important. - */ -#undef NEED_SIGNAL_CATCHER - -/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb"). - * This is necessary on systems that distinguish text files from binary files, - * and is harmless on most systems that don't. If you have one of the rare - * systems that complains about the "b" spec, define this symbol. - */ -#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/Dependencies/FreeImage/Source/LibJPEG/jconfig.txt b/Dependencies/FreeImage/Source/LibJPEG/jconfig.txt deleted file mode 100644 index d1710ae..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jconfig.txt +++ /dev/null @@ -1,171 +0,0 @@ -/* - * jconfig.txt - * - * Copyright (C) 1991-1994, Thomas G. Lane. - * Modified 2009-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 documents the configuration options that are required to - * customize the JPEG software for a particular system. - * - * The actual configuration options for a particular installation are stored - * in jconfig.h. On many machines, jconfig.h can be generated automatically - * or copied from one of the "canned" jconfig files that we supply. But if - * you need to generate a jconfig.h file by hand, this file tells you how. - * - * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING. - * EDIT A COPY NAMED JCONFIG.H. - */ - - -/* - * These symbols indicate the properties of your machine or compiler. - * #define the symbol if yes, #undef it if no. - */ - -/* Does your compiler support function prototypes? - * (If not, you also need to use ansi2knr, see install.txt) - */ -#define HAVE_PROTOTYPES - -/* Does your compiler support the declaration "unsigned char" ? - * How about "unsigned short" ? - */ -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT - -/* Define "void" as "char" if your compiler doesn't know about type void. - * NOTE: be sure to define void such that "void *" represents the most general - * pointer type, e.g., that returned by malloc(). - */ -/* #define void char */ - -/* Define "const" as empty if your compiler doesn't know the "const" keyword. - */ -/* #define const */ - -/* Define this if an ordinary "char" type is unsigned. - * If you're not sure, leaving it undefined will work at some cost in speed. - * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal. - */ -#undef CHAR_IS_UNSIGNED - -/* Define this if your system has an ANSI-conforming file. - */ -#define HAVE_STDDEF_H - -/* Define this if your system has an ANSI-conforming file. - */ -#define HAVE_STDLIB_H - -/* Define this if your system does not have an ANSI/SysV , - * but does have a BSD-style . - */ -#undef NEED_BSD_STRINGS - -/* Define this if your system does not provide typedef size_t in any of the - * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in - * instead. - */ -#undef NEED_SYS_TYPES_H - -/* For 80x86 machines, you need to define NEED_FAR_POINTERS, - * unless you are using a large-data memory model or 80386 flat-memory mode. - * On less brain-damaged CPUs this symbol must not be defined. - * (Defining this symbol causes large data structures to be referenced through - * "far" pointers and to be allocated with a special version of malloc.) - */ -#undef NEED_FAR_POINTERS - -/* Define this if your linker needs global names to be unique in less - * than the first 15 characters. - */ -#undef NEED_SHORT_EXTERNAL_NAMES - -/* Although a real ANSI C compiler can deal perfectly well with pointers to - * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI - * and pseudo-ANSI compilers get confused. To keep one of these bozos happy, - * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you - * actually get "missing structure definition" warnings or errors while - * compiling the JPEG code. - */ -#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 - - -/* - * The following options affect code selection within the JPEG library, - * but they don't need to be visible to applications using the library. - * To minimize application namespace pollution, the symbols won't be - * defined unless JPEG_INTERNALS has been defined. - */ - -#ifdef JPEG_INTERNALS - -/* Define this if your compiler implements ">>" on signed values as a logical - * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift, - * which is the normal and rational definition. - */ -#undef RIGHT_SHIFT_IS_UNSIGNED - - -#endif /* JPEG_INTERNALS */ - - -/* - * The remaining options do not affect the JPEG library proper, - * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c). - * Other applications can ignore these. - */ - -#ifdef JPEG_CJPEG_DJPEG - -/* These defines indicate which image (non-JPEG) file formats are allowed. */ - -#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 /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -/* Define this if you want to name both input and output files on the command - * line, rather than using stdout and optionally stdin. You MUST do this if - * your system can't cope with binary I/O to stdin/stdout. See comments at - * head of cjpeg.c or djpeg.c. - */ -#undef TWO_FILE_COMMANDLINE - -/* Define this if your system needs explicit cleanup of temporary files. - * This is crucial under MS-DOS, where the temporary "files" may be areas - * of extended memory; on most other systems it's not as important. - */ -#undef NEED_SIGNAL_CATCHER - -/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb"). - * This is necessary on systems that distinguish text files from binary files, - * and is harmless on most systems that don't. If you have one of the rare - * systems that complains about the "b" spec, define this symbol. - */ -#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/Dependencies/FreeImage/Source/LibJPEG/jcparam.c b/Dependencies/FreeImage/Source/LibJPEG/jcparam.c deleted file mode 100644 index 4b2bee2..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcparam.c +++ /dev/null @@ -1,675 +0,0 @@ -/* - * jcparam.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2003-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 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. - * 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] = { - 17, 18, 24, 47, 99, 99, 99, 99, - 18, 21, 26, 66, 99, 99, 99, 99, - 24, 26, 56, 99, 99, 99, 99, 99, - 47, 66, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 -}; - - -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); -} - - -/* - * Huffman table setup routines - */ - -LOCAL(void) -add_huff_table (j_compress_ptr cinfo, - JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val) -/* Define a Huffman table */ -{ - int nsymbols, len; - - if (*htblptr == NULL) - *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - - /* Copy the number-of-symbols-of-each-code-length counts */ - MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->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. jchuff.c will do a more thorough test later. - */ - nsymbols = 0; - for (len = 1; len <= 16; len++) - nsymbols += bits[len]; - if (nsymbols < 1 || nsymbols > 256) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - - MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8)); - - /* Initialize sent_table FALSE so table will be written to JPEG file. */ - (*htblptr)->sent_table = FALSE; -} - - -LOCAL(void) -std_huff_tables (j_compress_ptr cinfo) -/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */ -/* IMPORTANT: these are only valid for 8-bit data precision! */ -{ - 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 }; - - add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[0], - bits_dc_luminance, val_dc_luminance); - add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[0], - bits_ac_luminance, val_ac_luminance); - add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[1], - bits_dc_chrominance, val_dc_chrominance); - add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[1], - bits_ac_chrominance, val_ac_chrominance); -} - - -/* - * 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); - /* Set up two 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, 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, 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, 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, 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/Dependencies/FreeImage/Source/LibJPEG/jcprepct.c b/Dependencies/FreeImage/Source/LibJPEG/jcprepct.c deleted file mode 100644 index be44cc4..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcprepct.c +++ /dev/null @@ -1,358 +0,0 @@ -/* - * jcprepct.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 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], 0, - 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 = (struct jpeg_c_prep_controller *) prep; - 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/Dependencies/FreeImage/Source/LibJPEG/jcsample.c b/Dependencies/FreeImage/Source/LibJPEG/jcsample.c deleted file mode 100644 index 4d36f85..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jcsample.c +++ /dev/null @@ -1,545 +0,0 @@ -/* - * jcsample.c - * - * Copyright (C) 1991-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 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, 0, output_data, 0, - 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 = (struct jpeg_downsampler *) downsample; - 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/Dependencies/FreeImage/Source/LibJPEG/jctrans.c b/Dependencies/FreeImage/Source/LibJPEG/jctrans.c deleted file mode 100644 index 5780de4..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jctrans.c +++ /dev/null @@ -1,403 +0,0 @@ -/* - * jctrans.c - * - * Copyright (C) 1995-1998, Thomas G. Lane. - * Modified 2000-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 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. */ - JBLOCKROW 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 < cinfo->MCUs_per_row; - 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]; - start_col = MCU_col_num * compptr->MCU_width; - blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width - : compptr->last_col_width; - for (yindex = 0; yindex < compptr->MCU_height; yindex++) { - if (coef->iMCU_row_num < last_iMCU_row || - yindex+yoffset < compptr->last_row_height) { - /* Fill in pointers to real blocks in this row */ - buffer_ptr = buffer[ci][yindex+yoffset] + start_col; - for (xindex = 0; xindex < blockcnt; xindex++) - MCU_buffer[blkn++] = buffer_ptr++; - } else { - /* At bottom of image, need a whole row of dummy blocks */ - xindex = 0; - } - /* 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. - */ - for (; xindex < compptr->MCU_width; xindex++) { - MCU_buffer[blkn] = coef->dummy_buffer[blkn]; - MCU_buffer[blkn][0][0] = MCU_buffer[blkn-1][0][0]; - blkn++; - } - } - } - /* 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; - JBLOCKROW buffer; - int i; - - 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; - - /* Allocate and pre-zero space for dummy DCT blocks. */ - buffer = (JBLOCKROW) - (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, - C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); - FMEMZERO((void FAR *) buffer, C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); - for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) { - coef->dummy_buffer[i] = buffer + i; - } -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jdapimin.c b/Dependencies/FreeImage/Source/LibJPEG/jdapimin.c deleted file mode 100644 index a6e0dd9..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdapimin.c +++ /dev/null @@ -1,399 +0,0 @@ -/* - * jdapimin.c - * - * Copyright (C) 1994-1998, Thomas G. Lane. - * Modified 2009-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 "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; - - /* 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; - - /* First try to guess from the component IDs */ - 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 */ - break; - } - } 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: - 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 */ - break; - } - } else { - /* 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; - break; - } - - /* 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/Dependencies/FreeImage/Source/LibJPEG/jdapistd.c b/Dependencies/FreeImage/Source/LibJPEG/jdapistd.c deleted file mode 100644 index 7f3a78b..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdapistd.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jdarith.c b/Dependencies/FreeImage/Source/LibJPEG/jdarith.c deleted file mode 100644 index 5533c07..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdarith.c +++ /dev/null @@ -1,796 +0,0 @@ -/* - * jdarith.c - * - * Developed 1997-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 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, JBLOCKROW *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) == 0x8000) { - 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, JBLOCKROW *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) == 0x8000) { - 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, JBLOCKROW *MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - unsigned char *st; - int p1, 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, JBLOCKROW *MCU_data) -{ - arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; - JBLOCKROW block; - JCOEFPTR thiscoef; - unsigned char *st; - int tbl, k, kex; - int 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 = (-1) << cinfo->Al; /* -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, JBLOCKROW *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) == 0x8000) { - 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) == 0x8000) { - 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/Dependencies/FreeImage/Source/LibJPEG/jdatadst.c b/Dependencies/FreeImage/Source/LibJPEG/jdatadst.c deleted file mode 100644 index dcac229..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdatadst.c +++ /dev/null @@ -1,270 +0,0 @@ -/* - * jdatadst.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2009-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 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 */ - -typedef struct { - struct jpeg_destination_mgr pub; /* public fields */ - - FILE * outfile; /* target stream */ - JOCTET * buffer; /* start of buffer */ -} my_destination_mgr; - -typedef my_destination_mgr * my_dest_ptr; - -#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */ - - -/* Expanded data destination object for memory output */ - -typedef struct { - struct jpeg_destination_mgr pub; /* public fields */ - - unsigned char ** outbuffer; /* target buffer */ - unsigned long * 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; - - /* Allocate the output buffer --- it will be released when done with image */ - dest->buffer = (JOCTET *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - OUTPUT_BUF_SIZE * SIZEOF(JOCTET)); - - 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, 10); - - 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, unsigned long * 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/Dependencies/FreeImage/Source/LibJPEG/jdatasrc.c b/Dependencies/FreeImage/Source/LibJPEG/jdatasrc.c deleted file mode 100644 index 2a27cfe..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdatasrc.c +++ /dev/null @@ -1,275 +0,0 @@ -/* - * jdatasrc.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2009-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 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 */ - -typedef struct { - struct jpeg_source_mgr pub; /* public fields */ - - FILE * infile; /* source stream */ - JOCTET * buffer; /* start of buffer */ - boolean start_of_file; /* have we gotten any data yet? */ -} my_source_mgr; - -typedef my_source_mgr * my_src_ptr; - -#define INPUT_BUF_SIZE 4096 /* choose an efficiently fread'able size */ - - -/* - * 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; - - /* 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) { - while (num_bytes > (long) src->bytes_in_buffer) { - num_bytes -= (long) 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 += (size_t) num_bytes; - src->bytes_in_buffer -= (size_t) num_bytes; - } -} - - -/* - * 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 and input buffer are 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->buffer = (JOCTET *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - INPUT_BUF_SIZE * SIZEOF(JOCTET)); - } - - 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, unsigned long 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 = (size_t) insize; - src->next_input_byte = (const JOCTET *) inbuffer; -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jdcoefct.c b/Dependencies/FreeImage/Source/LibJPEG/jdcoefct.c deleted file mode 100644 index ed02fc3..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdcoefct.c +++ /dev/null @@ -1,741 +0,0 @@ -/* - * jdcoefct.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2002-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 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 allocate a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks, - * and let the entropy decoder write into that workspace each time. - * (On 80x86, the workspace is FAR even though it's not really very big; - * this is to keep the module interfaces unchanged when a large coefficient - * buffer is necessary.) - * 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 -} 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 blkn, ci, xindex, yindex, yoffset, useful_width; - 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++) { - /* Try to fetch an MCU. Entropy decoder expects buffer to be zeroed. */ - if (cinfo->lim_Se) /* can bypass in DC only case */ - FMEMZERO((void FAR *) coef->MCU_buffer[0], - (size_t) (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 blkn gets - * incremented past them!). Note the inner loop relies on having - * allocated the MCU_buffer[] blocks sequentially. - */ - blkn = 0; /* index of current DCT block within MCU */ - 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) { - blkn += compptr->MCU_blocks; - continue; - } - inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index]; - useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width - : compptr->last_col_width; - output_ptr = output_buf[compptr->component_index] + - yoffset * compptr->DCT_v_scaled_size; - 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) coef->MCU_buffer[blkn+xindex], - output_ptr, output_col); - output_col += compptr->DCT_h_scaled_size; - } - } - blkn += compptr->MCU_width; - output_ptr += compptr->DCT_v_scaled_size; - } - } - } - /* 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) < 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; -} - - -/* - * 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 blkn, ci, xindex, yindex, yoffset; - JDIMENSION start_col; - 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 */ - blkn = 0; /* index of 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][yindex+yoffset] + start_col; - for (xindex = 0; xindex < compptr->MCU_width; xindex++) { - coef->MCU_buffer[blkn++] = buffer_ptr++; - } - } - } - /* 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) < cinfo->total_iMCU_rows) - 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) < cinfo->total_iMCU_rows) - 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; - - coef = (my_coef_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_coef_controller)); - cinfo->coef = (struct jpeg_d_coef_controller *) coef; - 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 - - /* Create the coefficient buffer. */ - 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; - - 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. */ - JBLOCKROW buffer; - int i; - - buffer = (JBLOCKROW) - (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, - D_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); - for (i = 0; i < D_MAX_BLOCKS_IN_MCU; i++) { - coef->MCU_buffer[i] = buffer + i; - } - if (cinfo->lim_Se == 0) /* DC only case: want to bypass later */ - FMEMZERO((void FAR *) buffer, - (size_t) (D_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK))); - coef->pub.consume_data = dummy_consume_data; - coef->pub.decompress_data = decompress_onepass; - coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */ - } -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jdcolor.c b/Dependencies/FreeImage/Source/LibJPEG/jdcolor.c deleted file mode 100644 index 0316354..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdcolor.c +++ /dev/null @@ -1,731 +0,0 @@ -/* - * jdcolor.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2011-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 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 * rgb_y_tab; /* => table for RGB 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<Y conversion and divide it up into - * three parts, instead of doing three alloc_small requests. This lets us - * use a single table base address, which can be held in a register in the - * inner loops on many machines (more than can hold all three addresses, - * anyway). - */ - -#define R_Y_OFF 0 /* offset to R => Y section */ -#define G_Y_OFF (1*(MAXJSAMPLE+1)) /* offset to G => Y section */ -#define B_Y_OFF (2*(MAXJSAMPLE+1)) /* etc. */ -#define TABLE_SIZE (3*(MAXJSAMPLE+1)) - - -/* - * Initialize tables for YCbCr->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) - RIGHT_SHIFT(FIX(1.402) * x + ONE_HALF, SCALEBITS); - /* Cb=>B value is nearest int to 1.772 * x */ - cconvert->Cb_b_tab[i] = (int) - RIGHT_SHIFT(FIX(1.772) * x + ONE_HALF, 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) - RIGHT_SHIFT(FIX(2.804) * x + ONE_HALF, SCALEBITS); - /* Cb=>B value is nearest int to 3.544 * x */ - cconvert->Cb_b_tab[i] = (int) - RIGHT_SHIFT(FIX(3.544) * x + ONE_HALF, 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 * rgb_y_tab; - INT32 i; - - /* Allocate and fill in the conversion tables. */ - cconvert->rgb_y_tab = rgb_y_tab = (INT32 *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (TABLE_SIZE * SIZEOF(INT32))); - - for (i = 0; i <= MAXJSAMPLE; i++) { - rgb_y_tab[i+R_Y_OFF] = FIX(0.299) * i; - rgb_y_tab[i+G_Y_OFF] = FIX(0.587) * i; - rgb_y_tab[i+B_Y_OFF] = 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 * ctab = cconvert->rgb_y_tab; - 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]); - /* Y */ - outptr[col] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - } - } -} - - -/* - * [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 INT32 * ctab = cconvert->rgb_y_tab; - 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. - */ - r = (r + g - CENTERJSAMPLE) & MAXJSAMPLE; - b = (b + g - CENTERJSAMPLE) & MAXJSAMPLE; - /* Y */ - outptr[col] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - } - } -} - - -/* - * 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. - */ - -METHODDEF(void) -null_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - int ci; - register int nc = cinfo->num_components; - register JSAMPROW outptr; - register JSAMPROW inptr; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - - while (--num_rows >= 0) { - for (ci = 0; ci < nc; ci++) { - inptr = input_buf[ci][input_row]; - outptr = output_buf[0] + ci; - for (col = 0; col < num_cols; col++) { - *outptr = *inptr++; /* needn't bother with GETJSAMPLE() here */ - outptr += nc; - } - } - input_row++; - output_buf++; - } -} - - -/* - * 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], (int) input_row, output_buf, 0, - 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; - } - } -} - - -/* - * Adobe-style YCCK->CMYK conversion. - * 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; - } - } -} - - -/* - * 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; - - 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); - break; - } - - /* 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 clear 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: - cinfo->out_color_components = RGB_PIXELSIZE; - if (cinfo->jpeg_color_space == JCS_BG_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); - } - } else - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - break; - - case JCS_CMYK: - cinfo->out_color_components = 4; - switch (cinfo->jpeg_color_space) { - case JCS_YCCK: - cconvert->pub.color_convert = ycck_cmyk_convert; - build_ycc_rgb_table(cinfo); - break; - case JCS_CMYK: - cconvert->pub.color_convert = null_convert; - break; - default: - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - } - break; - - default: - /* Permit null conversion to same output space */ - if (cinfo->out_color_space == cinfo->jpeg_color_space) { - cinfo->out_color_components = cinfo->num_components; - cconvert->pub.color_convert = null_convert; - } else /* unsupported non-null conversion */ - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - break; - } - - if (cinfo->quantize_colors) - cinfo->output_components = 1; /* single colormapped output component */ - else - cinfo->output_components = cinfo->out_color_components; -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jdct.h b/Dependencies/FreeImage/Source/LibJPEG/jdct.h deleted file mode 100644 index bcfedfc..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdct.h +++ /dev/null @@ -1,416 +0,0 @@ -/* - * jdct.h - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2002-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 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 jRD3x8 -#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)) - -/* 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) + (ONE << ((n)-1)), n) - -/* 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/Dependencies/FreeImage/Source/LibJPEG/jddctmgr.c b/Dependencies/FreeImage/Source/LibJPEG/jddctmgr.c deleted file mode 100644 index 9ecfbb5..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jddctmgr.c +++ /dev/null @@ -1,384 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jdhuff.c b/Dependencies/FreeImage/Source/LibJPEG/jdhuff.c deleted file mode 100644 index 835d06e..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdhuff.c +++ /dev/null @@ -1,1553 +0,0 @@ -/* - * jdhuff.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2006-2016 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) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, 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, JBLOCKROW *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 (no-op if not using restarts) */ - 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, JBLOCKROW *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 (no-op if not using restarts) */ - 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, JBLOCKROW *MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int p1, 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 (no-op if not using restarts) */ - entropy->restarts_to_go--; - - return TRUE; -} - - -/* - * MCU decoding for AC successive approximation refinement scan. - */ - -METHODDEF(boolean) -decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - register int s, k, r; - unsigned int EOBRUN; - int Se, 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 = (-1) << cinfo->Al; /* -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 (no-op if not using restarts) */ - 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, JBLOCKROW *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 (no-op if not using restarts) */ - 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, JBLOCKROW *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 (no-op if not using restarts) */ - 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] = entropy->ac_derived_tbls[compptr->ac_tbl_no]; - /* 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]; - break; - } - } 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 tables unallocated */ - for (i = 0; i < NUM_HUFF_TBLS; i++) { - entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; - } - } -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jdinput.c b/Dependencies/FreeImage/Source/LibJPEG/jdinput.c deleted file mode 100644 index 0199553..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdinput.c +++ /dev/null @@ -1,662 +0,0 @@ -/* - * jdinput.c - * - * Copyright (C) 1991-1997, 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 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); - break; - } - - /* 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 = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, - (long) (cinfo->max_v_samp_factor * cinfo->block_size)); - - 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/Dependencies/FreeImage/Source/LibJPEG/jdmainct.c b/Dependencies/FreeImage/Source/LibJPEG/jdmainct.c deleted file mode 100644 index 4d738fb..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdmainct.c +++ /dev/null @@ -1,507 +0,0 @@ -/* - * jdmainct.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2002-2016 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++) { - 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++) { - 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++) { - 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++) { - /* 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); - break; - } -} - - -/* - * 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++) { - 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/Dependencies/FreeImage/Source/LibJPEG/jdmarker.c b/Dependencies/FreeImage/Source/LibJPEG/jdmarker.c deleted file mode 100644 index 3fbe5c1..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdmarker.c +++ /dev/null @@ -1,1511 +0,0 @@ -/* - * jdmarker.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2009-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 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); - - MEMZERO(huffval, SIZEOF(huffval)); /* pre-zero array for later copy */ - - 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)); - MEMCOPY((*htblptr)->huffval, huffval, SIZEOF((*htblptr)->huffval)); - } - - 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 (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; break; - } - - 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); - break; - } - } 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); - break; - } - - /* 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)); - break; - } - - /* 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); - break; - } - /* 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/Dependencies/FreeImage/Source/LibJPEG/jdmaster.c b/Dependencies/FreeImage/Source/LibJPEG/jdmaster.c deleted file mode 100644 index 62c0767..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdmaster.c +++ /dev/null @@ -1,538 +0,0 @@ -/* - * jdmaster.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2002-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 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. - */ -{ -#ifdef IDCT_SCALING_SUPPORTED - int ci; - jpeg_component_info *compptr; -#endif - - /* 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; - 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; - 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. - */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* 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. */ - /* Probably this should be 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; - case JCS_YCbCr: - case JCS_BG_YCC: - cinfo->out_color_components = 3; - break; - case JCS_CMYK: - case JCS_YCCK: - cinfo->out_color_components = 4; - break; - default: /* else must be same colorspace as in file */ - cinfo->out_color_components = cinfo->num_components; - break; - } - 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/Dependencies/FreeImage/Source/LibJPEG/jdmerge.c b/Dependencies/FreeImage/Source/LibJPEG/jdmerge.c deleted file mode 100644 index 866693f..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdmerge.c +++ /dev/null @@ -1,451 +0,0 @@ -/* - * jdmerge.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2013-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 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) - RIGHT_SHIFT(FIX(1.402) * x + ONE_HALF, SCALEBITS); - /* Cb=>B value is nearest int to 1.772 * x */ - upsample->Cb_b_tab[i] = (int) - RIGHT_SHIFT(FIX(1.772) * x + ONE_HALF, 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) - RIGHT_SHIFT(FIX(2.804) * x + ONE_HALF, SCALEBITS); - /* Cb=>B value is nearest int to 3.544 * x */ - upsample->Cb_b_tab[i] = (int) - RIGHT_SHIFT(FIX(3.544) * x + ONE_HALF, 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, 0, output_buf + *out_row_ctr, 0, - 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++); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - /* 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) { - cb = GETJSAMPLE(*inptr1); - cr = GETJSAMPLE(*inptr2); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - y = GETJSAMPLE(*inptr0); - outptr[RGB_RED] = range_limit[y + cred]; - outptr[RGB_GREEN] = range_limit[y + cgreen]; - outptr[RGB_BLUE] = range_limit[y + cblue]; - } -} - - -/* - * 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++); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - /* 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); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - 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/Dependencies/FreeImage/Source/LibJPEG/jdpostct.c b/Dependencies/FreeImage/Source/LibJPEG/jdpostct.c deleted file mode 100644 index 571563d..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdpostct.c +++ /dev/null @@ -1,290 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jdsample.c b/Dependencies/FreeImage/Source/LibJPEG/jdsample.c deleted file mode 100644 index fd9907e..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdsample.c +++ /dev/null @@ -1,358 +0,0 @@ -/* - * jdsample.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2002-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 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, JSAMPARRAY * 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++) { - /* 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, JSAMPARRAY * output_data_ptr) -{ - *output_data_ptr = input_data; -} - - -/* - * This is a no-op version used for "uninteresting" components. - * These components will not be referenced by color conversion. - */ - -METHODDEF(void) -noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) -{ - *output_data_ptr = NULL; /* safety check */ -} - - -/* - * 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, JSAMPARRAY * output_data_ptr) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - JSAMPARRAY output_data = *output_data_ptr; - register JSAMPROW inptr, outptr; - register JSAMPLE invalue; - register int h; - JSAMPROW outend; - int h_expand, v_expand; - int inrow, outrow; - - h_expand = upsample->h_expand[compptr->component_index]; - v_expand = upsample->v_expand[compptr->component_index]; - - inrow = outrow = 0; - while (outrow < cinfo->max_v_samp_factor) { - /* Generate one output row with proper horizontal expansion */ - inptr = input_data[inrow]; - outptr = output_data[outrow]; - 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, outrow, output_data, outrow+1, - v_expand-1, cinfo->output_width); - } - inrow++; - outrow += v_expand; - } -} - - -/* - * 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, JSAMPARRAY * 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, JSAMPARRAY * output_data_ptr) -{ - JSAMPARRAY output_data = *output_data_ptr; - register JSAMPROW inptr, outptr; - register JSAMPLE invalue; - JSAMPROW outend; - int inrow, outrow; - - inrow = outrow = 0; - while (outrow < cinfo->max_v_samp_factor) { - inptr = input_data[inrow]; - outptr = output_data[outrow]; - outend = outptr + cinfo->output_width; - while (outptr < outend) { - invalue = *inptr++; /* don't need GETJSAMPLE() here */ - *outptr++ = invalue; - *outptr++ = invalue; - } - jcopy_sample_rows(output_data, outrow, output_data, outrow+1, - 1, cinfo->output_width); - inrow++; - outrow += 2; - } -} - - -/* - * 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++) { - /* 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 (! compptr->component_needed) { - /* Don't bother to upsample an uninteresting component. */ - upsample->methods[ci] = noop_upsample; - continue; /* don't need to allocate buffer */ - } - 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/Dependencies/FreeImage/Source/LibJPEG/jdtrans.c b/Dependencies/FreeImage/Source/LibJPEG/jdtrans.c deleted file mode 100644 index 22dd47f..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jdtrans.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jerror.c b/Dependencies/FreeImage/Source/LibJPEG/jerror.c deleted file mode 100644 index 7163af6..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jerror.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jerror.h b/Dependencies/FreeImage/Source/LibJPEG/jerror.h deleted file mode 100644 index a4b661f..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jerror.h +++ /dev/null @@ -1,304 +0,0 @@ -/* - * jerror.h - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 1997-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 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_OVERFLOW, "Huffman code size table overflow") -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/Dependencies/FreeImage/Source/LibJPEG/jfdctflt.c b/Dependencies/FreeImage/Source/LibJPEG/jfdctflt.c deleted file mode 100644 index 013f29e..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jfdctflt.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jfdctfst.c b/Dependencies/FreeImage/Source/LibJPEG/jfdctfst.c deleted file mode 100644 index 5e4e017..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jfdctfst.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jfdctint.c b/Dependencies/FreeImage/Source/LibJPEG/jfdctint.c deleted file mode 100644 index 7ed42e5..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jfdctint.c +++ /dev/null @@ -1,4409 +0,0 @@ -/* - * jfdctint.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modification developed 2003-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 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) -{ - 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)*(8/2) = 2**3, 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 < 2; 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+3)); - dataptr[2] = (DCTELEM) ((tmp0 - tmp1) << (PASS1_BITS+3)); - - /* Odd part */ - - tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-PASS1_BITS-4); - - dataptr[1] = (DCTELEM) - RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ - CONST_BITS-PASS1_BITS-3); - dataptr[3] = (DCTELEM) - RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ - CONST_BITS-PASS1_BITS-3); - - 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. - */ - - dataptr = data; - for (ctr = 0; ctr < 4; ctr++) { - /* Even part */ - - /* Add fudge factor here for final descale. */ - tmp0 = dataptr[DCTSIZE*0] + (ONE << (PASS1_BITS-1)); - tmp1 = dataptr[DCTSIZE*1]; - - dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp0 + tmp1, PASS1_BITS); - - /* Odd part */ - - dataptr[DCTSIZE*1] = (DCTELEM) RIGHT_SHIFT(tmp0 - tmp1, PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - - -/* - * 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. - * We must also scale the output by (8/2)*(8/4) = 2**3, which we add here. - */ - - 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) << 3); - - /* Odd part */ - - dataptr[1] = (DCTELEM) ((tmp0 - tmp1) << 3); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We 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 = 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); - dataptr[DCTSIZE*2] = (DCTELEM) (tmp0 - tmp1); - - /* Odd part */ - - tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ - /* Add fudge factor here for final descale. */ - tmp0 += ONE << (CONST_BITS-1); - - dataptr[DCTSIZE*1] = (DCTELEM) - RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ - CONST_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) - RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ - CONST_BITS); - - 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/Dependencies/FreeImage/Source/LibJPEG/jidctflt.c b/Dependencies/FreeImage/Source/LibJPEG/jidctflt.c deleted file mode 100644 index e33a2b5..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jidctflt.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jidctfst.c b/Dependencies/FreeImage/Source/LibJPEG/jidctfst.c deleted file mode 100644 index 1ac3e39..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jidctfst.c +++ /dev/null @@ -1,351 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jidctint.c b/Dependencies/FreeImage/Source/LibJPEG/jidctint.c deleted file mode 100644 index 6437079..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jidctint.c +++ /dev/null @@ -1,5240 +0,0 @@ -/* - * jidctint.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modification developed 2002-2016 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 a 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 a 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 reduced-size 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 a 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 reduced-size 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/Dependencies/FreeImage/Source/LibJPEG/jinclude.h b/Dependencies/FreeImage/Source/LibJPEG/jinclude.h deleted file mode 100644 index 20ed4ef..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jinclude.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * jinclude.h - * - * Copyright (C) 1991-1994, Thomas G. Lane. - * Modified 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 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. - */ - -#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) diff --git a/Dependencies/FreeImage/Source/LibJPEG/jmemansi.c b/Dependencies/FreeImage/Source/LibJPEG/jmemansi.c deleted file mode 100644 index 2d93e49..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jmemansi.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * jmemansi.c - * - * Copyright (C) 1992-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 provides a simple generic implementation of the system- - * dependent portion of the JPEG memory manager. This implementation - * assumes that you have the ANSI-standard library routine tmpfile(). - * Also, the problem of determining the amount of memory available - * is shoved onto the user. - */ - -#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 - -#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ -#define SEEK_SET 0 /* if not, assume 0 is correct */ -#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. - * It's impossible to do this in a portable way; our current solution is - * to make the user tell us (with a default value set at compile time). - * If you can actually get the available space, it's a good idea to subtract - * a slop factor of 5% or so. - */ - -#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ -#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ -#endif - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - return cinfo->mem->max_memory_to_use - already_allocated; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - - -METHODDEF(void) -read_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFREAD(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFWRITE(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_backing_store (j_common_ptr cinfo, backing_store_ptr info) -{ - fclose(info->temp_file); - /* Since this implementation uses tmpfile() to create the file, - * no explicit file deletion is needed. - */ -} - - -/* - * Initial opening of a backing-store object. - * - * This version uses tmpfile(), which constructs a suitable file name - * behind the scenes. We don't have to use info->temp_name[] at all; - * indeed, we can't even find out the actual name of the temp file. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - if ((info->temp_file = tmpfile()) == NULL) - ERREXITS(cinfo, JERR_TFILE_CREATE, ""); - info->read_backing_store = read_backing_store; - info->write_backing_store = write_backing_store; - info->close_backing_store = close_backing_store; -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* no work */ -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jmemdos.c b/Dependencies/FreeImage/Source/LibJPEG/jmemdos.c deleted file mode 100644 index 60b45c6..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jmemdos.c +++ /dev/null @@ -1,638 +0,0 @@ -/* - * jmemdos.c - * - * 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 file provides an MS-DOS-compatible implementation of the system- - * dependent portion of the JPEG memory manager. Temporary data can be - * stored in extended or expanded memory as well as in regular DOS files. - * - * If you use this file, you must be sure that NEED_FAR_POINTERS is defined - * if you compile in a small-data memory model; it should NOT be defined if - * you use a large-data memory model. This file is not recommended if you - * are using a flat-memory-space 386 environment such as DJGCC or Watcom C. - * Also, this code will NOT work if struct fields are aligned on greater than - * 2-byte boundaries. - * - * Based on code contributed by Ge' Weijers. - */ - -/* - * If you have both extended and expanded memory, you may want to change the - * order in which they are tried in jopen_backing_store. On a 286 machine - * expanded memory is usually faster, since extended memory access involves - * an expensive protected-mode-and-back switch. On 386 and better, extended - * memory is usually faster. As distributed, the code tries extended memory - * first (what? not everyone has a 386? :-). - * - * You can disable use of extended/expanded memory entirely by altering these - * definitions or overriding them from the Makefile (eg, -DEMS_SUPPORTED=0). - */ - -#ifndef XMS_SUPPORTED -#define XMS_SUPPORTED 1 -#endif -#ifndef EMS_SUPPORTED -#define EMS_SUPPORTED 1 -#endif - - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef HAVE_STDLIB_H /* should declare these */ -extern void * malloc JPP((size_t size)); -extern void free JPP((void *ptr)); -extern char * getenv JPP((const char * name)); -#endif - -#ifdef NEED_FAR_POINTERS - -#ifdef __TURBOC__ -/* These definitions work for Borland C (Turbo C) */ -#include /* need farmalloc(), farfree() */ -#define far_malloc(x) farmalloc(x) -#define far_free(x) farfree(x) -#else -/* These definitions work for Microsoft C and compatible compilers */ -#include /* need _fmalloc(), _ffree() */ -#define far_malloc(x) _fmalloc(x) -#define far_free(x) _ffree(x) -#endif - -#else /* not NEED_FAR_POINTERS */ - -#define far_malloc(x) malloc(x) -#define far_free(x) free(x) - -#endif /* NEED_FAR_POINTERS */ - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#else -#define READ_BINARY "rb" -#endif - -#ifndef USE_MSDOS_MEMMGR /* make sure user got configuration right */ - You forgot to define USE_MSDOS_MEMMGR in jconfig.h. /* deliberate syntax error */ -#endif - -#if MAX_ALLOC_CHUNK >= 65535L /* make sure jconfig.h got this right */ - MAX_ALLOC_CHUNK should be less than 64K. /* deliberate syntax error */ -#endif - - -/* - * Declarations for assembly-language support routines (see jmemdosa.asm). - * - * The functions are declared "far" as are all their pointer arguments; - * this ensures the assembly source code will work regardless of the - * compiler memory model. We assume "short" is 16 bits, "long" is 32. - */ - -typedef void far * XMSDRIVER; /* actually a pointer to code */ -typedef struct { /* registers for calling XMS driver */ - unsigned short ax, dx, bx; - void far * ds_si; - } XMScontext; -typedef struct { /* registers for calling EMS driver */ - unsigned short ax, dx, bx; - void far * ds_si; - } EMScontext; - -extern short far jdos_open JPP((short far * handle, char far * filename)); -extern short far jdos_close JPP((short handle)); -extern short far jdos_seek JPP((short handle, long offset)); -extern short far jdos_read JPP((short handle, void far * buffer, - unsigned short count)); -extern short far jdos_write JPP((short handle, void far * buffer, - unsigned short count)); -extern void far jxms_getdriver JPP((XMSDRIVER far *)); -extern void far jxms_calldriver JPP((XMSDRIVER, XMScontext far *)); -extern short far jems_available JPP((void)); -extern void far jems_calldriver JPP((EMScontext far *)); - - -/* - * Selection of a file name for a temporary file. - * This is highly system-dependent, and you may want to customize it. - */ - -static int next_file_num; /* to distinguish among several temp files */ - -LOCAL(void) -select_file_name (char * fname) -{ - const char * env; - char * ptr; - FILE * tfile; - - /* Keep generating file names till we find one that's not in use */ - for (;;) { - /* Get temp directory name from environment TMP or TEMP variable; - * if none, use "." - */ - if ((env = (const char *) getenv("TMP")) == NULL) - if ((env = (const char *) getenv("TEMP")) == NULL) - env = "."; - if (*env == '\0') /* null string means "." */ - env = "."; - ptr = fname; /* copy name to fname */ - while (*env != '\0') - *ptr++ = *env++; - if (ptr[-1] != '\\' && ptr[-1] != '/') - *ptr++ = '\\'; /* append backslash if not in env variable */ - /* Append a suitable file name */ - next_file_num++; /* advance counter */ - sprintf(ptr, "JPG%03d.TMP", next_file_num); - /* Probe to see if file name is already in use */ - if ((tfile = fopen(fname, READ_BINARY)) == NULL) - break; - fclose(tfile); /* oops, it's there; close tfile & try again */ - } -} - - -/* - * Near-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 allocated in far memory, if possible - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) far_malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - far_free(object); -} - - -/* - * This routine computes the total memory space available for allocation. - * It's impossible to do this in a portable way; our current solution is - * to make the user tell us (with a default value set at compile time). - * If you can actually get the available space, it's a good idea to subtract - * a slop factor of 5% or so. - */ - -#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ -#define DEFAULT_MAX_MEM 300000L /* for total usage about 450K */ -#endif - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - return cinfo->mem->max_memory_to_use - already_allocated; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - -/* - * For MS-DOS we support three types of backing storage: - * 1. Conventional DOS files. We access these by direct DOS calls rather - * than via the stdio package. This provides a bit better performance, - * but the real reason is that the buffers to be read or written are FAR. - * The stdio library for small-data memory models can't cope with that. - * 2. Extended memory, accessed per the XMS V2.0 specification. - * 3. Expanded memory, accessed per the LIM/EMS 4.0 specification. - * You'll need copies of those specs to make sense of the related code. - * The specs are available by Internet FTP from the SIMTEL archives - * (oak.oakland.edu and its various mirror sites). See files - * pub/msdos/microsoft/xms20.arc and pub/msdos/info/limems41.zip. - */ - - -/* - * Access methods for a DOS file. - */ - - -METHODDEF(void) -read_file_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (jdos_seek(info->handle.file_handle, file_offset)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ - if (byte_count > 65535L) /* safety check */ - ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); - if (jdos_read(info->handle.file_handle, buffer_address, - (unsigned short) byte_count)) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_file_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (jdos_seek(info->handle.file_handle, file_offset)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ - if (byte_count > 65535L) /* safety check */ - ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); - if (jdos_write(info->handle.file_handle, buffer_address, - (unsigned short) byte_count)) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_file_store (j_common_ptr cinfo, backing_store_ptr info) -{ - jdos_close(info->handle.file_handle); /* close the file */ - remove(info->temp_name); /* delete the file */ -/* If your system doesn't have remove(), try unlink() instead. - * remove() is the ANSI-standard name for this function, but - * unlink() was more common in pre-ANSI systems. - */ - TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); -} - - -LOCAL(boolean) -open_file_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - short handle; - - select_file_name(info->temp_name); - if (jdos_open((short far *) & handle, (char far *) info->temp_name)) { - /* might as well exit since jpeg_open_backing_store will fail anyway */ - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - return FALSE; - } - info->handle.file_handle = handle; - info->read_backing_store = read_file_store; - info->write_backing_store = write_file_store; - info->close_backing_store = close_file_store; - TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); - return TRUE; /* succeeded */ -} - - -/* - * Access methods for extended memory. - */ - -#if XMS_SUPPORTED - -static XMSDRIVER xms_driver; /* saved address of XMS driver */ - -typedef union { /* either long offset or real-mode pointer */ - long offset; - void far * ptr; - } XMSPTR; - -typedef struct { /* XMS move specification structure */ - long length; - XMSH src_handle; - XMSPTR src; - XMSH dst_handle; - XMSPTR dst; - } XMSspec; - -#define ODD(X) (((X) & 1L) != 0) - - -METHODDEF(void) -read_xms_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - XMScontext ctx; - XMSspec spec; - char endbuffer[2]; - - /* The XMS driver can't cope with an odd length, so handle the last byte - * specially if byte_count is odd. We don't expect this to be common. - */ - - spec.length = byte_count & (~ 1L); - spec.src_handle = info->handle.xms_handle; - spec.src.offset = file_offset; - spec.dst_handle = 0; - spec.dst.ptr = buffer_address; - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x0b00; /* EMB move */ - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax != 1) - ERREXIT(cinfo, JERR_XMS_READ); - - if (ODD(byte_count)) { - read_xms_store(cinfo, info, (void FAR *) endbuffer, - file_offset + byte_count - 1L, 2L); - ((char FAR *) buffer_address)[byte_count - 1L] = endbuffer[0]; - } -} - - -METHODDEF(void) -write_xms_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - XMScontext ctx; - XMSspec spec; - char endbuffer[2]; - - /* The XMS driver can't cope with an odd length, so handle the last byte - * specially if byte_count is odd. We don't expect this to be common. - */ - - spec.length = byte_count & (~ 1L); - spec.src_handle = 0; - spec.src.ptr = buffer_address; - spec.dst_handle = info->handle.xms_handle; - spec.dst.offset = file_offset; - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x0b00; /* EMB move */ - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax != 1) - ERREXIT(cinfo, JERR_XMS_WRITE); - - if (ODD(byte_count)) { - read_xms_store(cinfo, info, (void FAR *) endbuffer, - file_offset + byte_count - 1L, 2L); - endbuffer[0] = ((char FAR *) buffer_address)[byte_count - 1L]; - write_xms_store(cinfo, info, (void FAR *) endbuffer, - file_offset + byte_count - 1L, 2L); - } -} - - -METHODDEF(void) -close_xms_store (j_common_ptr cinfo, backing_store_ptr info) -{ - XMScontext ctx; - - ctx.dx = info->handle.xms_handle; - ctx.ax = 0x0a00; - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - TRACEMS1(cinfo, 1, JTRC_XMS_CLOSE, info->handle.xms_handle); - /* we ignore any error return from the driver */ -} - - -LOCAL(boolean) -open_xms_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - XMScontext ctx; - - /* Get address of XMS driver */ - jxms_getdriver((XMSDRIVER far *) & xms_driver); - if (xms_driver == NULL) - return FALSE; /* no driver to be had */ - - /* Get version number, must be >= 2.00 */ - ctx.ax = 0x0000; - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax < (unsigned short) 0x0200) - return FALSE; - - /* Try to get space (expressed in kilobytes) */ - ctx.dx = (unsigned short) ((total_bytes_needed + 1023L) >> 10); - ctx.ax = 0x0900; - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax != 1) - return FALSE; - - /* Succeeded, save the handle and away we go */ - info->handle.xms_handle = ctx.dx; - info->read_backing_store = read_xms_store; - info->write_backing_store = write_xms_store; - info->close_backing_store = close_xms_store; - TRACEMS1(cinfo, 1, JTRC_XMS_OPEN, ctx.dx); - return TRUE; /* succeeded */ -} - -#endif /* XMS_SUPPORTED */ - - -/* - * Access methods for expanded memory. - */ - -#if EMS_SUPPORTED - -/* The EMS move specification structure requires word and long fields aligned - * at odd byte boundaries. Some compilers will align struct fields at even - * byte boundaries. While it's usually possible to force byte alignment, - * that causes an overall performance penalty and may pose problems in merging - * JPEG into a larger application. Instead we accept some rather dirty code - * here. Note this code would fail if the hardware did not allow odd-byte - * word & long accesses, but all 80x86 CPUs do. - */ - -typedef void far * EMSPTR; - -typedef union { /* EMS move specification structure */ - long length; /* It's easy to access first 4 bytes */ - char bytes[18]; /* Misaligned fields in here! */ - } EMSspec; - -/* Macros for accessing misaligned fields */ -#define FIELD_AT(spec,offset,type) (*((type *) &(spec.bytes[offset]))) -#define SRC_TYPE(spec) FIELD_AT(spec,4,char) -#define SRC_HANDLE(spec) FIELD_AT(spec,5,EMSH) -#define SRC_OFFSET(spec) FIELD_AT(spec,7,unsigned short) -#define SRC_PAGE(spec) FIELD_AT(spec,9,unsigned short) -#define SRC_PTR(spec) FIELD_AT(spec,7,EMSPTR) -#define DST_TYPE(spec) FIELD_AT(spec,11,char) -#define DST_HANDLE(spec) FIELD_AT(spec,12,EMSH) -#define DST_OFFSET(spec) FIELD_AT(spec,14,unsigned short) -#define DST_PAGE(spec) FIELD_AT(spec,16,unsigned short) -#define DST_PTR(spec) FIELD_AT(spec,14,EMSPTR) - -#define EMSPAGESIZE 16384L /* gospel, see the EMS specs */ - -#define HIBYTE(W) (((W) >> 8) & 0xFF) -#define LOBYTE(W) ((W) & 0xFF) - - -METHODDEF(void) -read_ems_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - EMScontext ctx; - EMSspec spec; - - spec.length = byte_count; - SRC_TYPE(spec) = 1; - SRC_HANDLE(spec) = info->handle.ems_handle; - SRC_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); - SRC_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); - DST_TYPE(spec) = 0; - DST_HANDLE(spec) = 0; - DST_PTR(spec) = buffer_address; - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x5700; /* move memory region */ - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - ERREXIT(cinfo, JERR_EMS_READ); -} - - -METHODDEF(void) -write_ems_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - EMScontext ctx; - EMSspec spec; - - spec.length = byte_count; - SRC_TYPE(spec) = 0; - SRC_HANDLE(spec) = 0; - SRC_PTR(spec) = buffer_address; - DST_TYPE(spec) = 1; - DST_HANDLE(spec) = info->handle.ems_handle; - DST_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); - DST_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x5700; /* move memory region */ - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - ERREXIT(cinfo, JERR_EMS_WRITE); -} - - -METHODDEF(void) -close_ems_store (j_common_ptr cinfo, backing_store_ptr info) -{ - EMScontext ctx; - - ctx.ax = 0x4500; - ctx.dx = info->handle.ems_handle; - jems_calldriver((EMScontext far *) & ctx); - TRACEMS1(cinfo, 1, JTRC_EMS_CLOSE, info->handle.ems_handle); - /* we ignore any error return from the driver */ -} - - -LOCAL(boolean) -open_ems_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - EMScontext ctx; - - /* Is EMS driver there? */ - if (! jems_available()) - return FALSE; - - /* Get status, make sure EMS is OK */ - ctx.ax = 0x4000; - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - return FALSE; - - /* Get version, must be >= 4.0 */ - ctx.ax = 0x4600; - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0 || LOBYTE(ctx.ax) < 0x40) - return FALSE; - - /* Try to allocate requested space */ - ctx.ax = 0x4300; - ctx.bx = (unsigned short) ((total_bytes_needed + EMSPAGESIZE-1L) / EMSPAGESIZE); - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - return FALSE; - - /* Succeeded, save the handle and away we go */ - info->handle.ems_handle = ctx.dx; - info->read_backing_store = read_ems_store; - info->write_backing_store = write_ems_store; - info->close_backing_store = close_ems_store; - TRACEMS1(cinfo, 1, JTRC_EMS_OPEN, ctx.dx); - return TRUE; /* succeeded */ -} - -#endif /* EMS_SUPPORTED */ - - -/* - * Initial opening of a backing-store object. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - /* Try extended memory, then expanded memory, then regular file. */ -#if XMS_SUPPORTED - if (open_xms_store(cinfo, info, total_bytes_needed)) - return; -#endif -#if EMS_SUPPORTED - if (open_ems_store(cinfo, info, total_bytes_needed)) - return; -#endif - if (open_file_store(cinfo, info, total_bytes_needed)) - return; - ERREXITS(cinfo, JERR_TFILE_CREATE, ""); -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - next_file_num = 0; /* initialize temp file name generator */ - return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* Microsoft C, at least in v6.00A, will not successfully reclaim freed - * blocks of size > 32Kbytes unless we give it a kick in the rear, like so: - */ -#ifdef NEED_FHEAPMIN - _fheapmin(); -#endif -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jmemdosa.asm b/Dependencies/FreeImage/Source/LibJPEG/jmemdosa.asm deleted file mode 100644 index ecd4372..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jmemdosa.asm +++ /dev/null @@ -1,379 +0,0 @@ -; -; jmemdosa.asm -; -; Copyright (C) 1992, 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 low-level interface routines to support the MS-DOS -; backing store manager (jmemdos.c). Routines are provided to access disk -; files through direct DOS calls, and to access XMS and EMS drivers. -; -; This file should assemble with Microsoft's MASM or any compatible -; assembler (including Borland's Turbo Assembler). If you haven't got -; a compatible assembler, better fall back to jmemansi.c or jmemname.c. -; -; To minimize dependence on the C compiler's register usage conventions, -; we save and restore all 8086 registers, even though most compilers only -; require SI,DI,DS to be preserved. Also, we use only 16-bit-wide return -; values, which everybody returns in AX. -; -; Based on code contributed by Ge' Weijers. -; - -JMEMDOSA_TXT segment byte public 'CODE' - - assume cs:JMEMDOSA_TXT - - public _jdos_open - public _jdos_close - public _jdos_seek - public _jdos_read - public _jdos_write - public _jxms_getdriver - public _jxms_calldriver - public _jems_available - public _jems_calldriver - -; -; short far jdos_open (short far * handle, char far * filename) -; -; Create and open a temporary file -; -_jdos_open proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov cx,0 ; normal file attributes - lds dx,dword ptr [bp+10] ; get filename pointer - mov ah,3ch ; create file - int 21h - jc open_err ; if failed, return error code - lds bx,dword ptr [bp+6] ; get handle pointer - mov word ptr [bx],ax ; save the handle - xor ax,ax ; return zero for OK -open_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_open endp - - -; -; short far jdos_close (short handle) -; -; Close the file handle -; -_jdos_close proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - mov ah,3eh ; close file - int 21h - jc close_err ; if failed, return error code - xor ax,ax ; return zero for OK -close_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_close endp - - -; -; short far jdos_seek (short handle, long offset) -; -; Set file position -; -_jdos_seek proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - mov dx,word ptr [bp+8] ; LS offset - mov cx,word ptr [bp+10] ; MS offset - mov ax,4200h ; absolute seek - int 21h - jc seek_err ; if failed, return error code - xor ax,ax ; return zero for OK -seek_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_seek endp - - -; -; short far jdos_read (short handle, void far * buffer, unsigned short count) -; -; Read from file -; -_jdos_read proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - lds dx,dword ptr [bp+8] ; buffer address - mov cx,word ptr [bp+12] ; number of bytes - mov ah,3fh ; read file - int 21h - jc read_err ; if failed, return error code - cmp ax,word ptr [bp+12] ; make sure all bytes were read - je read_ok - mov ax,1 ; else return 1 for not OK - jmp short read_err -read_ok: xor ax,ax ; return zero for OK -read_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_read endp - - -; -; short far jdos_write (short handle, void far * buffer, unsigned short count) -; -; Write to file -; -_jdos_write proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - lds dx,dword ptr [bp+8] ; buffer address - mov cx,word ptr [bp+12] ; number of bytes - mov ah,40h ; write file - int 21h - jc write_err ; if failed, return error code - cmp ax,word ptr [bp+12] ; make sure all bytes written - je write_ok - mov ax,1 ; else return 1 for not OK - jmp short write_err -write_ok: xor ax,ax ; return zero for OK -write_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_write endp - - -; -; void far jxms_getdriver (XMSDRIVER far *) -; -; Get the address of the XMS driver, or NULL if not available -; -_jxms_getdriver proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov ax,4300h ; call multiplex interrupt with - int 2fh ; a magic cookie, hex 4300 - cmp al,80h ; AL should contain hex 80 - je xmsavail - xor dx,dx ; no XMS driver available - xor ax,ax ; return a nil pointer - jmp short xmsavail_done -xmsavail: mov ax,4310h ; fetch driver address with - int 2fh ; another magic cookie - mov dx,es ; copy address to dx:ax - mov ax,bx -xmsavail_done: les bx,dword ptr [bp+6] ; get pointer to return value - mov word ptr es:[bx],ax - mov word ptr es:[bx+2],dx - pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jxms_getdriver endp - - -; -; void far jxms_calldriver (XMSDRIVER, XMScontext far *) -; -; The XMScontext structure contains values for the AX,DX,BX,SI,DS registers. -; These are loaded, the XMS call is performed, and the new values of the -; AX,DX,BX registers are written back to the context structure. -; -_jxms_calldriver proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - les bx,dword ptr [bp+10] ; get XMScontext pointer - mov ax,word ptr es:[bx] ; load registers - mov dx,word ptr es:[bx+2] - mov si,word ptr es:[bx+6] - mov ds,word ptr es:[bx+8] - mov bx,word ptr es:[bx+4] - call dword ptr [bp+6] ; call the driver - mov cx,bx ; save returned BX for a sec - les bx,dword ptr [bp+10] ; get XMScontext pointer - mov word ptr es:[bx],ax ; put back ax,dx,bx - mov word ptr es:[bx+2],dx - mov word ptr es:[bx+4],cx - pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jxms_calldriver endp - - -; -; short far jems_available (void) -; -; Have we got an EMS driver? (this comes straight from the EMS 4.0 specs) -; -_jems_available proc far - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov ax,3567h ; get interrupt vector 67h - int 21h - push cs - pop ds - mov di,000ah ; check offs 10 in returned seg - lea si,ASCII_device_name ; against literal string - mov cx,8 - cld - repe cmpsb - jne no_ems - mov ax,1 ; match, it's there - jmp short avail_done -no_ems: xor ax,ax ; it's not there -avail_done: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - ret - -ASCII_device_name db "EMMXXXX0" - -_jems_available endp - - -; -; void far jems_calldriver (EMScontext far *) -; -; The EMScontext structure contains values for the AX,DX,BX,SI,DS registers. -; These are loaded, the EMS trap is performed, and the new values of the -; AX,DX,BX registers are written back to the context structure. -; -_jems_calldriver proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - les bx,dword ptr [bp+6] ; get EMScontext pointer - mov ax,word ptr es:[bx] ; load registers - mov dx,word ptr es:[bx+2] - mov si,word ptr es:[bx+6] - mov ds,word ptr es:[bx+8] - mov bx,word ptr es:[bx+4] - int 67h ; call the EMS driver - mov cx,bx ; save returned BX for a sec - les bx,dword ptr [bp+6] ; get EMScontext pointer - mov word ptr es:[bx],ax ; put back ax,dx,bx - mov word ptr es:[bx+2],dx - mov word ptr es:[bx+4],cx - pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jems_calldriver endp - -JMEMDOSA_TXT ends - - end diff --git a/Dependencies/FreeImage/Source/LibJPEG/jmemmac.c b/Dependencies/FreeImage/Source/LibJPEG/jmemmac.c deleted file mode 100644 index 106f9be..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jmemmac.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * jmemmac.c - * - * 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. - * - * jmemmac.c provides an Apple Macintosh implementation of the system- - * dependent portion of the JPEG memory manager. - * - * If you use jmemmac.c, then you must define USE_MAC_MEMMGR in the - * JPEG_INTERNALS part of jconfig.h. - * - * jmemmac.c uses the Macintosh toolbox routines NewPtr and DisposePtr - * instead of malloc and free. It accurately determines the amount of - * memory available by using CompactMem. Notice that if left to its - * own devices, this code can chew up all available space in the - * application's zone, with the exception of the rather small "slop" - * factor computed in jpeg_mem_available(). The application can ensure - * that more space is left over by reducing max_memory_to_use. - * - * Large images are swapped to disk using temporary files and System 7.0+'s - * temporary folder functionality. - * - * Note that jmemmac.c depends on two features of MacOS that were first - * introduced in System 7: FindFolder and the FSSpec-based calls. - * If your application uses jmemmac.c and is run under System 6 or earlier, - * and the jpeg library decides it needs a temporary file, it will abort, - * printing error messages about requiring System 7. (If no temporary files - * are created, it will run fine.) - * - * If you want to use jmemmac.c in an application that might be used with - * System 6 or earlier, then you should remove dependencies on FindFolder - * and the FSSpec calls. You will need to replace FindFolder with some - * other mechanism for finding a place to put temporary files, and you - * should replace the FSSpec calls with their HFS equivalents: - * - * FSpDelete -> HDelete - * FSpGetFInfo -> HGetFInfo - * FSpCreate -> HCreate - * FSpOpenDF -> HOpen *** Note: not HOpenDF *** - * FSMakeFSSpec -> (fill in spec by hand.) - * - * (Use HOpen instead of HOpenDF. HOpen is just a glue-interface to PBHOpen, - * which is on all HFS macs. HOpenDF is a System 7 addition which avoids the - * ages-old problem of names starting with a period.) - * - * Contributed by Sam Bushell (jsam@iagu.on.net) and - * Dan Gildor (gyld@in-touch.com). - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef USE_MAC_MEMMGR /* make sure user got configuration right */ - You forgot to define USE_MAC_MEMMGR in jconfig.h. /* deliberate syntax error */ -#endif - -#include /* we use the MacOS memory manager */ -#include /* we use the MacOS File stuff */ -#include /* we use the MacOS HFS stuff */ -#include /* for smSystemScript */ -#include /* we use Gestalt to test for specific functionality */ - -#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ -#define TEMP_FILE_NAME "JPG%03d.TMP" -#endif - -static int next_file_num; /* to distinguish among several temp files */ - - -/* - * Memory allocation and freeing are controlled by the MacOS library - * routines NewPtr() and DisposePtr(), which allocate fixed-address - * storage. Unfortunately, the IJG library isn't smart enough to cope - * with relocatable storage. - */ - -GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void *) NewPtr(sizeofobject); -} - -GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) -{ - DisposePtr((Ptr) object); -} - - -/* - * "Large" objects are treated the same as "small" ones. - * NB: we include FAR keywords in the routine declarations simply for - * consistency with the rest of the IJG code; FAR should expand to empty - * on rational architectures like the Mac. - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) NewPtr(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - DisposePtr((Ptr) 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) -{ - long limit = cinfo->mem->max_memory_to_use - already_allocated; - long slop, mem; - - /* Don't ask for more than what application has told us we may use */ - if (max_bytes_needed > limit && limit > 0) - max_bytes_needed = limit; - /* Find whether there's a big enough free block in the heap. - * CompactMem tries to create a contiguous block of the requested size, - * and then returns the size of the largest free block (which could be - * much more or much less than we asked for). - * We add some slop to ensure we don't use up all available memory. - */ - slop = max_bytes_needed / 16 + 32768L; - mem = CompactMem(max_bytes_needed + slop) - slop; - if (mem < 0) - mem = 0; /* sigh, couldn't even get the slop */ - /* Don't take more than the application says we can have */ - if (mem > limit && limit > 0) - mem = limit; - return mem; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - - -METHODDEF(void) -read_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - long bytes = byte_count; - long retVal; - - if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr ) - ERREXIT(cinfo, JERR_TFILE_SEEK); - - retVal = FSRead ( info->temp_file, &bytes, - (unsigned char *) buffer_address ); - if ( retVal != noErr || bytes != byte_count ) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - long bytes = byte_count; - long retVal; - - if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr ) - ERREXIT(cinfo, JERR_TFILE_SEEK); - - retVal = FSWrite ( info->temp_file, &bytes, - (unsigned char *) buffer_address ); - if ( retVal != noErr || bytes != byte_count ) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_backing_store (j_common_ptr cinfo, backing_store_ptr info) -{ - FSClose ( info->temp_file ); - FSpDelete ( &(info->tempSpec) ); -} - - -/* - * Initial opening of a backing-store object. - * - * This version uses FindFolder to find the Temporary Items folder, - * and puts the temporary file in there. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - short tmpRef, vRefNum; - long dirID; - FInfo finderInfo; - FSSpec theSpec; - Str255 fName; - OSErr osErr; - long gestaltResponse = 0; - - /* Check that FSSpec calls are available. */ - osErr = Gestalt( gestaltFSAttr, &gestaltResponse ); - if ( ( osErr != noErr ) - || !( gestaltResponse & (1<temp_name, TEMP_FILE_NAME, next_file_num); - strcpy ( (Ptr)fName+1, info->temp_name ); - *fName = strlen (info->temp_name); - osErr = FSMakeFSSpec ( vRefNum, dirID, fName, &theSpec ); - - if ( (osErr = FSpGetFInfo ( &theSpec, &finderInfo ) ) != noErr ) - break; - } - - osErr = FSpCreate ( &theSpec, '????', '????', smSystemScript ); - if ( osErr != noErr ) - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - - osErr = FSpOpenDF ( &theSpec, fsRdWrPerm, &(info->temp_file) ); - if ( osErr != noErr ) - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - - info->tempSpec = theSpec; - - info->read_backing_store = read_backing_store; - info->write_backing_store = write_backing_store; - info->close_backing_store = close_backing_store; - TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - next_file_num = 0; - - /* max_memory_to_use will be initialized to FreeMem()'s result; - * the calling application might later reduce it, for example - * to leave room to invoke multiple JPEG objects. - * Note that FreeMem returns the total number of free bytes; - * it may not be possible to allocate a single block of this size. - */ - return FreeMem(); -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* no work */ -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jmemmgr.c b/Dependencies/FreeImage/Source/LibJPEG/jmemmgr.c deleted file mode 100644 index 0a137cd..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jmemmgr.c +++ /dev/null @@ -1,1119 +0,0 @@ -/* - * jmemmgr.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2011-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 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 */ - long 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, 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; - char * data_ptr; - size_t odd_bytes, min_request, slop; - - /* 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) ((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) ((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 space_per_minheight, maximum_space, avail_mem; - long 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 */ - space_per_minheight += (long) sptr->maxaccess * - (long) sptr->samplesperrow * SIZEOF(JSAMPLE); - maximum_space += (long) sptr->rows_in_array * - (long) sptr->samplesperrow * SIZEOF(JSAMPLE); - } - } - for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { - if (bptr->mem_buffer == NULL) { /* if not realized yet */ - space_per_minheight += (long) bptr->maxaccess * - (long) bptr->blocksperrow * SIZEOF(JBLOCK); - maximum_space += (long) bptr->rows_in_array * - (long) bptr->blocksperrow * SIZEOF(JBLOCK); - } - } - - 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, - 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 = 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 = 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/Dependencies/FreeImage/Source/LibJPEG/jmemname.c b/Dependencies/FreeImage/Source/LibJPEG/jmemname.c deleted file mode 100644 index ed96dee..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jmemname.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - * jmemname.c - * - * 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 file provides a generic implementation of the system-dependent - * portion of the JPEG memory manager. This implementation assumes that - * you must explicitly construct a name for each temp file. - * Also, the problem of determining the amount of memory available - * is shoved onto the user. - */ - -#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 - -#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ -#define SEEK_SET 0 /* if not, assume 0 is correct */ -#endif - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define RW_BINARY "w+" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#define RW_BINARY "w+b", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#define RW_BINARY "w+b" -#endif -#endif - - -/* - * Selection of a file name for a temporary file. - * This is system-dependent! - * - * The code as given is suitable for most Unix systems, and it is easily - * modified for most non-Unix systems. Some notes: - * 1. The temp file is created in the directory named by TEMP_DIRECTORY. - * The default value is /usr/tmp, which is the conventional place for - * creating large temp files on Unix. On other systems you'll probably - * want to change the file location. You can do this by editing the - * #define, or (preferred) by defining TEMP_DIRECTORY in jconfig.h. - * - * 2. If you need to change the file name as well as its location, - * you can override the TEMP_FILE_NAME macro. (Note that this is - * actually a printf format string; it must contain %s and %d.) - * Few people should need to do this. - * - * 3. mktemp() is used to ensure that multiple processes running - * simultaneously won't select the same file names. If your system - * doesn't have mktemp(), define NO_MKTEMP to do it the hard way. - * (If you don't have , also define NO_ERRNO_H.) - * - * 4. You probably want to define NEED_SIGNAL_CATCHER so that cjpeg.c/djpeg.c - * will cause the temp files to be removed if you stop the program early. - */ - -#ifndef TEMP_DIRECTORY /* can override from jconfig.h or Makefile */ -#define TEMP_DIRECTORY "/usr/tmp/" /* recommended setting for Unix */ -#endif - -static int next_file_num; /* to distinguish among several temp files */ - -#ifdef NO_MKTEMP - -#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ -#define TEMP_FILE_NAME "%sJPG%03d.TMP" -#endif - -#ifndef NO_ERRNO_H -#include /* to define ENOENT */ -#endif - -/* ANSI C specifies that errno is a macro, but on older systems it's more - * likely to be a plain int variable. And not all versions of errno.h - * bother to declare it, so we have to in order to be most portable. Thus: - */ -#ifndef errno -extern int errno; -#endif - - -LOCAL(void) -select_file_name (char * fname) -{ - FILE * tfile; - - /* Keep generating file names till we find one that's not in use */ - for (;;) { - next_file_num++; /* advance counter */ - sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); - if ((tfile = fopen(fname, READ_BINARY)) == NULL) { - /* fopen could have failed for a reason other than the file not - * being there; for example, file there but unreadable. - * If isn't available, then we cannot test the cause. - */ -#ifdef ENOENT - if (errno != ENOENT) - continue; -#endif - break; - } - fclose(tfile); /* oops, it's there; close tfile & try again */ - } -} - -#else /* ! NO_MKTEMP */ - -/* Note that mktemp() requires the initial filename to end in six X's */ -#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ -#define TEMP_FILE_NAME "%sJPG%dXXXXXX" -#endif - -LOCAL(void) -select_file_name (char * fname) -{ - next_file_num++; /* advance counter */ - sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); - mktemp(fname); /* make sure file name is unique */ - /* mktemp replaces the trailing XXXXXX with a unique string of characters */ -} - -#endif /* NO_MKTEMP */ - - -/* - * 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. - * It's impossible to do this in a portable way; our current solution is - * to make the user tell us (with a default value set at compile time). - * If you can actually get the available space, it's a good idea to subtract - * a slop factor of 5% or so. - */ - -#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ -#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ -#endif - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - return cinfo->mem->max_memory_to_use - already_allocated; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - - -METHODDEF(void) -read_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFREAD(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFWRITE(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_backing_store (j_common_ptr cinfo, backing_store_ptr info) -{ - fclose(info->temp_file); /* close the file */ - unlink(info->temp_name); /* delete the file */ -/* If your system doesn't have unlink(), use remove() instead. - * remove() is the ANSI-standard name for this function, but if - * your system was ANSI you'd be using jmemansi.c, right? - */ - TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); -} - - -/* - * Initial opening of a backing-store object. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - select_file_name(info->temp_name); - if ((info->temp_file = fopen(info->temp_name, RW_BINARY)) == NULL) - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - info->read_backing_store = read_backing_store; - info->write_backing_store = write_backing_store; - info->close_backing_store = close_backing_store; - TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - next_file_num = 0; /* initialize temp file name generator */ - return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* no work */ -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jmemnobs.c b/Dependencies/FreeImage/Source/LibJPEG/jmemnobs.c deleted file mode 100644 index eb8c337..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jmemnobs.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * jmemnobs.c - * - * Copyright (C) 1992-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 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 ignored 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. - * Here we always say, "we got all you want bud!" - */ - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - 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/Dependencies/FreeImage/Source/LibJPEG/jmemsys.h b/Dependencies/FreeImage/Source/LibJPEG/jmemsys.h deleted file mode 100644 index 6c3c6d3..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jmemsys.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/jmorecfg.h b/Dependencies/FreeImage/Source/LibJPEG/jmorecfg.h deleted file mode 100644 index 61949b6..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jmorecfg.h +++ /dev/null @@ -1,442 +0,0 @@ -/* - * jmorecfg.h - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 1997-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 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. - */ - -#ifdef HAVE_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 - - -/* - * 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 - * change these macros. 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. - */ - -#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 */ -#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ - - -/* 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/Dependencies/FreeImage/Source/LibJPEG/jpegint.h b/Dependencies/FreeImage/Source/LibJPEG/jpegint.h deleted file mode 100644 index e312e1a..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jpegint.h +++ /dev/null @@ -1,439 +0,0 @@ -/* - * jpegint.h - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 1997-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 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_row, 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, JBLOCKROW *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, JBLOCKROW *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 - - -/* 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, int source_row, - JSAMPARRAY output_array, int dest_row, - 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/Dependencies/FreeImage/Source/LibJPEG/jpeglib.h b/Dependencies/FreeImage/Source/LibJPEG/jpeglib.h deleted file mode 100644 index 4bd9853..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jpeglib.h +++ /dev/null @@ -1,1180 +0,0 @@ -/* - * jpeglib.h - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2002-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 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 3 - - -/* 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_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, - unsigned long * outsize)); -EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo, - const unsigned char * inbuffer, - unsigned long 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)); - -/* 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/Dependencies/FreeImage/Source/LibJPEG/jpegtran.c b/Dependencies/FreeImage/Source/LibJPEG/jpegtran.c deleted file mode 100644 index 5269344..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jpegtran.c +++ /dev/null @@ -1,577 +0,0 @@ -/* - * jpegtran.c - * - * Copyright (C) 1995-2013, 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 a command-line user interface for JPEG transcoding. - * It is very similar to cjpeg.c, and partly to djpeg.c, but provides - * lossless transcoding between different JPEG file formats. It also - * provides some lossless and sort-of-lossless transformations of JPEG data. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include "transupp.h" /* Support routines for jpegtran */ -#include "jversion.h" /* for version message */ - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - - -/* - * Argument-parsing code. - * The switch parser is designed to be useful with DOS-style command line - * syntax, ie, intermixed switches and file names, where only the switches - * to the left of a given file name affect processing of that file. - * The main program in this file doesn't actually use this capability... - */ - - -static const char * progname; /* program name for error messages */ -static char * outfilename; /* for -outfile switch */ -static char * scaleoption; /* -scale switch */ -static JCOPY_OPTION copyoption; /* -copy switch */ -static jpeg_transform_info transformoption; /* image transformation options */ - - -LOCAL(void) -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -copy none Copy no extra markers from source file\n"); - fprintf(stderr, " -copy comments Copy only comment markers (default)\n"); - fprintf(stderr, " -copy all Copy all extra markers\n"); -#ifdef ENTROPY_OPT_SUPPORTED - fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); -#endif -#ifdef C_PROGRESSIVE_SUPPORTED - fprintf(stderr, " -progressive Create progressive JPEG file\n"); -#endif - fprintf(stderr, "Switches for modifying the image:\n"); -#if TRANSFORMS_SUPPORTED - fprintf(stderr, " -crop WxH+X+Y Crop to a rectangular subarea\n"); - fprintf(stderr, " -flip [horizontal|vertical] Mirror image (left-right or top-bottom)\n"); - fprintf(stderr, " -grayscale Reduce to grayscale (omit color data)\n"); - fprintf(stderr, " -perfect Fail if there is non-transformable edge blocks\n"); - fprintf(stderr, " -rotate [90|180|270] Rotate image (degrees clockwise)\n"); -#endif - fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n"); -#if TRANSFORMS_SUPPORTED - fprintf(stderr, " -transpose Transpose image\n"); - fprintf(stderr, " -transverse Transverse transpose image\n"); - fprintf(stderr, " -trim Drop non-transformable edge blocks\n"); - fprintf(stderr, " -wipe WxH+X+Y Wipe (gray out) a rectangular subarea\n"); -#endif - fprintf(stderr, "Switches for advanced users:\n"); -#ifdef C_ARITH_CODING_SUPPORTED - fprintf(stderr, " -arithmetic Use arithmetic coding\n"); -#endif - fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); - fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); - fprintf(stderr, " -outfile name Specify name for output file\n"); - fprintf(stderr, " -verbose or -debug Emit debug output\n"); - fprintf(stderr, "Switches for wizards:\n"); -#ifdef C_MULTISCAN_FILES_SUPPORTED - fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); -#endif - exit(EXIT_FAILURE); -} - - -LOCAL(void) -select_transform (JXFORM_CODE transform) -/* Silly little routine to detect multiple transform options, - * which we can't handle. - */ -{ -#if TRANSFORMS_SUPPORTED - if (transformoption.transform == JXFORM_NONE || - transformoption.transform == transform) { - transformoption.transform = transform; - } else { - fprintf(stderr, "%s: can only do one image transformation at a time\n", - progname); - usage(); - } -#else - fprintf(stderr, "%s: sorry, image transformation was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif -} - - -LOCAL(int) -parse_switches (j_compress_ptr cinfo, int argc, char **argv, - int last_file_arg_seen, boolean for_real) -/* Parse optional switches. - * Returns argv[] index of first file-name argument (== argc if none). - * Any file names with indexes <= last_file_arg_seen are ignored; - * they have presumably been processed in a previous iteration. - * (Pass 0 for last_file_arg_seen on the first or only iteration.) - * for_real is FALSE on the first (dummy) pass; we may skip any expensive - * processing. - */ -{ - int argn; - char * arg; - boolean simple_progressive; - char * scansarg = NULL; /* saves -scans parm if any */ - - /* Set up default JPEG parameters. */ - simple_progressive = FALSE; - outfilename = NULL; - scaleoption = NULL; - copyoption = JCOPYOPT_DEFAULT; - transformoption.transform = JXFORM_NONE; - transformoption.perfect = FALSE; - transformoption.trim = FALSE; - transformoption.force_grayscale = FALSE; - transformoption.crop = FALSE; - cinfo->err->trace_level = 0; - - /* Scan command line options, adjust parameters */ - - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (*arg != '-') { - /* Not a switch, must be a file name argument */ - if (argn <= last_file_arg_seen) { - outfilename = NULL; /* -outfile applies to just one input file */ - continue; /* ignore this name if previously processed */ - } - break; /* else done parsing switches */ - } - arg++; /* advance past switch marker character */ - - if (keymatch(arg, "arithmetic", 1)) { - /* Use arithmetic coding. */ -#ifdef C_ARITH_CODING_SUPPORTED - cinfo->arith_code = TRUE; -#else - fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "copy", 2)) { - /* Select which extra markers to copy. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "none", 1)) { - copyoption = JCOPYOPT_NONE; - } else if (keymatch(argv[argn], "comments", 1)) { - copyoption = JCOPYOPT_COMMENTS; - } else if (keymatch(argv[argn], "all", 1)) { - copyoption = JCOPYOPT_ALL; - } else - usage(); - - } else if (keymatch(arg, "crop", 2)) { - /* Perform lossless cropping. */ -#if TRANSFORMS_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - if (transformoption.crop /* reject multiple crop/wipe requests */ || - ! jtransform_parse_crop_spec(&transformoption, argv[argn])) { - fprintf(stderr, "%s: bogus -crop argument '%s'\n", - progname, argv[argn]); - exit(EXIT_FAILURE); - } -#else - select_transform(JXFORM_NONE); /* force an error */ -#endif - - } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { - /* Enable debug printouts. */ - /* On first -d, print version identification */ - static boolean printed_version = FALSE; - - if (! printed_version) { - fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n", - JVERSION, JCOPYRIGHT); - printed_version = TRUE; - } - cinfo->err->trace_level++; - - } else if (keymatch(arg, "flip", 1)) { - /* Mirror left-right or top-bottom. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "horizontal", 1)) - select_transform(JXFORM_FLIP_H); - else if (keymatch(argv[argn], "vertical", 1)) - select_transform(JXFORM_FLIP_V); - else - usage(); - - } else if (keymatch(arg, "grayscale", 1) || keymatch(arg, "greyscale",1)) { - /* Force to grayscale. */ -#if TRANSFORMS_SUPPORTED - transformoption.force_grayscale = TRUE; -#else - select_transform(JXFORM_NONE); /* force an error */ -#endif - - } else if (keymatch(arg, "maxmemory", 3)) { - /* Maximum memory in Kb (or Mb with 'm'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (ch == 'm' || ch == 'M') - lval *= 1000L; - cinfo->mem->max_memory_to_use = lval * 1000L; - - } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { - /* Enable entropy parm optimization. */ -#ifdef ENTROPY_OPT_SUPPORTED - cinfo->optimize_coding = TRUE; -#else - fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "outfile", 4)) { - /* Set output file name. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - outfilename = argv[argn]; /* save it away for later use */ - - } else if (keymatch(arg, "perfect", 2)) { - /* Fail if there is any partial edge MCUs that the transform can't - * handle. */ - transformoption.perfect = TRUE; - - } else if (keymatch(arg, "progressive", 2)) { - /* Select simple progressive mode. */ -#ifdef C_PROGRESSIVE_SUPPORTED - simple_progressive = TRUE; - /* We must postpone execution until num_components is known. */ -#else - fprintf(stderr, "%s: sorry, progressive output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "restart", 1)) { - /* Restart interval in MCU rows (or in MCUs with 'b'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (lval < 0 || lval > 65535L) - usage(); - if (ch == 'b' || ch == 'B') { - cinfo->restart_interval = (unsigned int) lval; - cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ - } else { - cinfo->restart_in_rows = (int) lval; - /* restart_interval will be computed during startup */ - } - - } else if (keymatch(arg, "rotate", 2)) { - /* Rotate 90, 180, or 270 degrees (measured clockwise). */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "90", 2)) - select_transform(JXFORM_ROT_90); - else if (keymatch(argv[argn], "180", 3)) - select_transform(JXFORM_ROT_180); - else if (keymatch(argv[argn], "270", 3)) - select_transform(JXFORM_ROT_270); - else - usage(); - - } else if (keymatch(arg, "scale", 4)) { - /* Scale the output image by a fraction M/N. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - scaleoption = argv[argn]; - /* We must postpone processing until decompression startup. */ - - } else if (keymatch(arg, "scans", 1)) { - /* Set scan script. */ -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - scansarg = argv[argn]; - /* We must postpone reading the file in case -progressive appears. */ -#else - fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "transpose", 1)) { - /* Transpose (across UL-to-LR axis). */ - select_transform(JXFORM_TRANSPOSE); - - } else if (keymatch(arg, "transverse", 6)) { - /* Transverse transpose (across UR-to-LL axis). */ - select_transform(JXFORM_TRANSVERSE); - - } else if (keymatch(arg, "trim", 3)) { - /* Trim off any partial edge MCUs that the transform can't handle. */ - transformoption.trim = TRUE; - - } else if (keymatch(arg, "wipe", 1)) { -#if TRANSFORMS_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - if (transformoption.crop /* reject multiple crop/wipe requests */ || - ! jtransform_parse_crop_spec(&transformoption, argv[argn])) { - fprintf(stderr, "%s: bogus -wipe argument '%s'\n", - progname, argv[argn]); - exit(EXIT_FAILURE); - } - select_transform(JXFORM_WIPE); -#else - select_transform(JXFORM_NONE); /* force an error */ -#endif - - } else { - usage(); /* bogus switch */ - } - } - - /* Post-switch-scanning cleanup */ - - if (for_real) { - -#ifdef C_PROGRESSIVE_SUPPORTED - if (simple_progressive) /* process -progressive; -scans can override */ - jpeg_simple_progression(cinfo); -#endif - -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (scansarg != NULL) /* process -scans if it was present */ - if (! read_scan_script(cinfo, scansarg)) - usage(); -#endif - } - - return argn; /* return index of next arg (file name) */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - struct jpeg_decompress_struct srcinfo; - struct jpeg_compress_struct dstinfo; - struct jpeg_error_mgr jsrcerr, jdsterr; -#ifdef PROGRESS_REPORT - struct cdjpeg_progress_mgr progress; -#endif - jvirt_barray_ptr * src_coef_arrays; - jvirt_barray_ptr * dst_coef_arrays; - int file_index; - /* We assume all-in-memory processing and can therefore use only a - * single file pointer for sequential input and output operation. - */ - FILE * fp; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "jpegtran"; /* in case C library doesn't provide it */ - - /* Initialize the JPEG decompression object with default error handling. */ - srcinfo.err = jpeg_std_error(&jsrcerr); - jpeg_create_decompress(&srcinfo); - /* Initialize the JPEG compression object with default error handling. */ - dstinfo.err = jpeg_std_error(&jdsterr); - jpeg_create_compress(&dstinfo); - - /* Now safe to enable signal catcher. - * Note: we assume only the decompression object will have virtual arrays. - */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) &srcinfo); -#endif - - /* Scan command line to find file names. - * It is convenient to use just one switch-parsing routine, but the switch - * values read here are mostly ignored; we will rescan the switches after - * opening the input file. Also note that most of the switches affect the - * destination JPEG object, so we parse into that and then copy over what - * needs to affects the source too. - */ - - file_index = parse_switches(&dstinfo, argc, argv, 0, FALSE); - jsrcerr.trace_level = jdsterr.trace_level; - srcinfo.mem->max_memory_to_use = dstinfo.mem->max_memory_to_use; - -#ifdef TWO_FILE_COMMANDLINE - /* Must have either -outfile switch or explicit output file name */ - if (outfilename == NULL) { - if (file_index != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - outfilename = argv[file_index+1]; - } else { - if (file_index != argc-1) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - } -#else - /* Unix style: expect zero or one file name */ - if (file_index < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } -#endif /* TWO_FILE_COMMANDLINE */ - - /* Open the input file. */ - if (file_index < argc) { - if ((fp = fopen(argv[file_index], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s for reading\n", progname, argv[file_index]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ - fp = read_stdin(); - } - -#ifdef PROGRESS_REPORT - start_progress_monitor((j_common_ptr) &dstinfo, &progress); -#endif - - /* Specify data source for decompression */ - jpeg_stdio_src(&srcinfo, fp); - - /* Enable saving of extra markers that we want to copy */ - jcopy_markers_setup(&srcinfo, copyoption); - - /* Read file header */ - (void) jpeg_read_header(&srcinfo, TRUE); - - /* Adjust default decompression parameters */ - if (scaleoption != NULL) - if (sscanf(scaleoption, "%u/%u", - &srcinfo.scale_num, &srcinfo.scale_denom) < 1) - usage(); - - /* Any space needed by a transform option must be requested before - * jpeg_read_coefficients so that memory allocation will be done right. - */ -#if TRANSFORMS_SUPPORTED - /* Fail right away if -perfect is given and transformation is not perfect. - */ - if (!jtransform_request_workspace(&srcinfo, &transformoption)) { - fprintf(stderr, "%s: transformation is not perfect\n", progname); - exit(EXIT_FAILURE); - } -#endif - - /* Read source file as DCT coefficients */ - src_coef_arrays = jpeg_read_coefficients(&srcinfo); - - /* Initialize destination compression parameters from source values */ - jpeg_copy_critical_parameters(&srcinfo, &dstinfo); - - /* Adjust destination parameters if required by transform options; - * also find out which set of coefficient arrays will hold the output. - */ -#if TRANSFORMS_SUPPORTED - dst_coef_arrays = jtransform_adjust_parameters(&srcinfo, &dstinfo, - src_coef_arrays, - &transformoption); -#else - dst_coef_arrays = src_coef_arrays; -#endif - - /* Close input file, if we opened it. - * Note: we assume that jpeg_read_coefficients consumed all input - * until JPEG_REACHED_EOI, and that jpeg_finish_decompress will - * only consume more while (! cinfo->inputctl->eoi_reached). - * We cannot call jpeg_finish_decompress here since we still need the - * virtual arrays allocated from the source object for processing. - */ - if (fp != stdin) - fclose(fp); - - /* Open the output file. */ - if (outfilename != NULL) { - if ((fp = fopen(outfilename, WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s for writing\n", progname, outfilename); - exit(EXIT_FAILURE); - } - } else { - /* default output file is stdout */ - fp = write_stdout(); - } - - /* Adjust default compression parameters by re-parsing the options */ - file_index = parse_switches(&dstinfo, argc, argv, 0, TRUE); - - /* Specify data destination for compression */ - jpeg_stdio_dest(&dstinfo, fp); - - /* Start compressor (note no image data is actually written here) */ - jpeg_write_coefficients(&dstinfo, dst_coef_arrays); - - /* Copy to the output file any extra markers that we want to preserve */ - jcopy_markers_execute(&srcinfo, &dstinfo, copyoption); - - /* Execute image transformation, if any */ -#if TRANSFORMS_SUPPORTED - jtransform_execute_transformation(&srcinfo, &dstinfo, - src_coef_arrays, - &transformoption); -#endif - - /* Finish compression and release memory */ - jpeg_finish_compress(&dstinfo); - jpeg_destroy_compress(&dstinfo); - (void) jpeg_finish_decompress(&srcinfo); - jpeg_destroy_decompress(&srcinfo); - - /* Close output file, if we opened it */ - if (fp != stdout) - fclose(fp); - -#ifdef PROGRESS_REPORT - end_progress_monitor((j_common_ptr) &dstinfo); -#endif - - /* All done. */ - exit(jsrcerr.num_warnings + jdsterr.num_warnings ?EXIT_WARNING:EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/jquant1.c b/Dependencies/FreeImage/Source/LibJPEG/jquant1.c deleted file mode 100644 index 9d11f70..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jquant1.c +++ /dev/null @@ -1,857 +0,0 @@ -/* - * jquant1.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 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 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 + 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 + 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); - break; - } -} - - -/* - * 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 = (struct jpeg_color_quantizer *) cquantize; - 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/Dependencies/FreeImage/Source/LibJPEG/jquant2.c b/Dependencies/FreeImage/Source/LibJPEG/jquant2.c deleted file mode 100644 index 38fc2af..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jquant2.c +++ /dev/null @@ -1,1311 +0,0 @@ -/* - * jquant2.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 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 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 + 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 = (struct jpeg_color_quantizer *) cquantize; - 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 + 2) * (3 * SIZEOF(FSERROR)))); - /* Might as well create the error-limiting table too. */ - init_error_limit(cinfo); - } -} - -#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/Dependencies/FreeImage/Source/LibJPEG/jutils.c b/Dependencies/FreeImage/Source/LibJPEG/jutils.c deleted file mode 100644 index 5b16b6d..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jutils.c +++ /dev/null @@ -1,227 +0,0 @@ -/* - * jutils.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2009-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 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, int source_row, - JSAMPARRAY output_array, int dest_row, - int num_rows, JDIMENSION num_cols) -/* Copy some rows of samples from one place to another. - * num_rows rows are copied from input_array[source_row++] - * to output_array[dest_row++]; 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; - - input_array += source_row; - output_array += dest_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, 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/Dependencies/FreeImage/Source/LibJPEG/jversion.h b/Dependencies/FreeImage/Source/LibJPEG/jversion.h deleted file mode 100644 index d096384..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/jversion.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * jversion.h - * - * Copyright (C) 1991-2018, 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 "9c 14-Jan-2018" - -#define JCOPYRIGHT "Copyright (C) 2018, Thomas G. Lane, Guido Vollbeding" diff --git a/Dependencies/FreeImage/Source/LibJPEG/libjpeg.txt b/Dependencies/FreeImage/Source/LibJPEG/libjpeg.txt deleted file mode 100644 index 4243c24..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/libjpeg.txt +++ /dev/null @@ -1,3111 +0,0 @@ -USING THE IJG JPEG LIBRARY - -Copyright (C) 1994-2013, 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 describes how to use the IJG JPEG library within an application -program. Read it if you want to write a program that uses the library. - -The file example.c provides heavily commented skeleton code for calling the -JPEG library. Also see jpeglib.h (the include file to be used by application -programs) for full details about data structures and function parameter lists. -The library source code, of course, is the ultimate reference. - -Note that there have been *major* changes from the application interface -presented by IJG version 4 and earlier versions. The old design had several -inherent limitations, and it had accumulated a lot of cruft as we added -features while trying to minimize application-interface changes. We have -sacrificed backward compatibility in the version 5 rewrite, but we think the -improvements justify this. - - -TABLE OF CONTENTS ------------------ - -Overview: - Functions provided by the library - Outline of typical usage -Basic library usage: - Data formats - Compression details - Decompression details - Mechanics of usage: include files, linking, etc -Advanced features: - Compression parameter selection - Decompression parameter selection - Special color spaces - Error handling - Compressed data handling (source and destination managers) - I/O suspension - Progressive JPEG support - Buffered-image mode - Abbreviated datastreams and multiple images - Special markers - Raw (downsampled) image data - Really raw data: DCT coefficients - Progress monitoring - Memory management - Memory usage - Library compile-time options - Portability considerations - Notes for MS-DOS implementors - -You should read at least the overview and basic usage sections before trying -to program with the library. The sections on advanced features can be read -if and when you need them. - - -OVERVIEW -======== - -Functions provided by the library ---------------------------------- - -The IJG JPEG library provides C code to read and write JPEG-compressed image -files. The surrounding application program receives or supplies image data a -scanline at a time, using a straightforward uncompressed image format. All -details of color conversion and other preprocessing/postprocessing can be -handled by the library. - -The library includes a substantial amount of code that is not covered by the -JPEG standard but is necessary for typical applications of JPEG. These -functions preprocess the image before JPEG compression or postprocess it after -decompression. They include colorspace conversion, downsampling/upsampling, -and color quantization. The application indirectly selects use of this code -by specifying the format in which it wishes to supply or receive image data. -For example, if colormapped output is requested, then the decompression -library automatically invokes color quantization. - -A wide range of quality vs. speed tradeoffs are possible in JPEG processing, -and even more so in decompression postprocessing. The decompression library -provides multiple implementations that cover most of the useful tradeoffs, -ranging from very-high-quality down to fast-preview operation. On the -compression side we have generally not provided low-quality choices, since -compression is normally less time-critical. It should be understood that the -low-quality modes may not meet the JPEG standard's accuracy requirements; -nonetheless, they are useful for viewers. - -A word about functions *not* provided by the library. We handle a subset of -the ISO JPEG standard; most baseline, extended-sequential, and progressive -JPEG processes are supported. (Our subset includes all features now in common -use.) Unsupported ISO options include: - * Hierarchical storage - * Lossless JPEG - * DNL marker - * Nonintegral subsampling ratios -We support 8-bit to 12-bit data precision, but this is a compile-time choice -rather than a run-time choice; hence it is difficult to use different -precisions in a single application. - -By itself, the library handles only interchange JPEG datastreams --- in -particular the widely used JFIF file format. The library can be used by -surrounding code to process interchange or abbreviated JPEG datastreams that -are embedded in more complex file formats. (For example, this library is -used by the free LIBTIFF library to support JPEG compression in TIFF.) - - -Outline of typical usage ------------------------- - -The rough outline of a JPEG compression operation is: - - Allocate and initialize a JPEG compression object - Specify the destination for the compressed data (eg, a file) - Set parameters for compression, including image size & colorspace - jpeg_start_compress(...); - while (scan lines remain to be written) - jpeg_write_scanlines(...); - jpeg_finish_compress(...); - Release the JPEG compression object - -A JPEG compression object holds parameters and working state for the JPEG -library. We make creation/destruction of the object separate from starting -or finishing compression of an image; the same object can be re-used for a -series of image compression operations. This makes it easy to re-use the -same parameter settings for a sequence of images. Re-use of a JPEG object -also has important implications for processing abbreviated JPEG datastreams, -as discussed later. - -The image data to be compressed is supplied to jpeg_write_scanlines() from -in-memory buffers. If the application is doing file-to-file compression, -reading image data from the source file is the application's responsibility. -The library emits compressed data by calling a "data destination manager", -which typically will write the data into a file; but the application can -provide its own destination manager to do something else. - -Similarly, the rough outline of a JPEG decompression operation is: - - Allocate and initialize a JPEG decompression object - Specify the source of the compressed data (eg, a file) - Call jpeg_read_header() to obtain image info - Set parameters for decompression - jpeg_start_decompress(...); - while (scan lines remain to be read) - jpeg_read_scanlines(...); - jpeg_finish_decompress(...); - Release the JPEG decompression object - -This is comparable to the compression outline except that reading the -datastream header is a separate step. This is helpful because information -about the image's size, colorspace, etc is available when the application -selects decompression parameters. For example, the application can choose an -output scaling ratio that will fit the image into the available screen size. - -The decompression library obtains compressed data by calling a data source -manager, which typically will read the data from a file; but other behaviors -can be obtained with a custom source manager. Decompressed data is delivered -into in-memory buffers passed to jpeg_read_scanlines(). - -It is possible to abort an incomplete compression or decompression operation -by calling jpeg_abort(); or, if you do not need to retain the JPEG object, -simply release it by calling jpeg_destroy(). - -JPEG compression and decompression objects are two separate struct types. -However, they share some common fields, and certain routines such as -jpeg_destroy() can work on either type of object. - -The JPEG library has no static variables: all state is in the compression -or decompression object. Therefore it is possible to process multiple -compression and decompression operations concurrently, using multiple JPEG -objects. - -Both compression and decompression can be done in an incremental memory-to- -memory fashion, if suitable source/destination managers are used. See the -section on "I/O suspension" for more details. - - -BASIC LIBRARY USAGE -=================== - -Data formats ------------- - -Before diving into procedural details, it is helpful to understand the -image data format that the JPEG library expects or returns. - -The standard input image format is a rectangular array of pixels, with each -pixel having the same number of "component" or "sample" values (color -channels). You must specify how many components there are and the colorspace -interpretation of the components. Most applications will use RGB data -(three components per pixel) or grayscale data (one component per pixel). -PLEASE NOTE THAT RGB DATA IS THREE SAMPLES PER PIXEL, GRAYSCALE ONLY ONE. -A remarkable number of people manage to miss this, only to find that their -programs don't work with grayscale JPEG files. - -There is no provision for colormapped input. JPEG files are always full-color -or full grayscale (or sometimes another colorspace such as CMYK). You can -feed in a colormapped image by expanding it to full-color format. However -JPEG often doesn't work very well with source data that has been colormapped, -because of dithering noise. This is discussed in more detail in the JPEG FAQ -and the other references mentioned in the README file. - -Pixels are stored by scanlines, with each scanline running from left to -right. The component values for each pixel are adjacent in the row; for -example, R,G,B,R,G,B,R,G,B,... for 24-bit RGB color. Each scanline is an -array of data type JSAMPLE --- which is typically "unsigned char", unless -you've changed jmorecfg.h. (You can also change the RGB pixel layout, say -to B,G,R order, by modifying jmorecfg.h. But see the restrictions listed in -that file before doing so.) - -A 2-D array of pixels is formed by making a list of pointers to the starts of -scanlines; so the scanlines need not be physically adjacent in memory. Even -if you process just one scanline at a time, you must make a one-element -pointer array to conform to this structure. Pointers to JSAMPLE rows are of -type JSAMPROW, and the pointer to the pointer array is of type JSAMPARRAY. - -The library accepts or supplies one or more complete scanlines per call. -It is not possible to process part of a row at a time. Scanlines are always -processed top-to-bottom. You can process an entire image in one call if you -have it all in memory, but usually it's simplest to process one scanline at -a time. - -For best results, source data values should have the precision specified by -BITS_IN_JSAMPLE (normally 8 bits). For instance, if you choose to compress -data that's only 6 bits/channel, you should left-justify each value in a -byte before passing it to the compressor. If you need to compress data -that has more than 8 bits/channel, compile with BITS_IN_JSAMPLE = 9 to 12. -(See "Library compile-time options", later.) - - -The data format returned by the decompressor is the same in all details, -except that colormapped output is supported. (Again, a JPEG file is never -colormapped. But you can ask the decompressor to perform on-the-fly color -quantization to deliver colormapped output.) If you request colormapped -output then the returned data array contains a single JSAMPLE per pixel; -its value is an index into a color map. The color map is represented as -a 2-D JSAMPARRAY in which each row holds the values of one color component, -that is, colormap[i][j] is the value of the i'th color component for pixel -value (map index) j. Note that since the colormap indexes are stored in -JSAMPLEs, the maximum number of colors is limited by the size of JSAMPLE -(ie, at most 256 colors for an 8-bit JPEG library). - - -Compression details -------------------- - -Here we revisit the JPEG compression outline given in the overview. - -1. Allocate and initialize a JPEG compression object. - -A JPEG compression object is a "struct jpeg_compress_struct". (It also has -a bunch of subsidiary structures which are allocated via malloc(), but the -application doesn't control those directly.) This struct can be just a local -variable in the calling routine, if a single routine is going to execute the -whole JPEG compression sequence. Otherwise it can be static or allocated -from malloc(). - -You will also need a structure representing a JPEG error handler. The part -of this that the library cares about is a "struct jpeg_error_mgr". If you -are providing your own error handler, you'll typically want to embed the -jpeg_error_mgr struct in a larger structure; this is discussed later under -"Error handling". For now we'll assume you are just using the default error -handler. The default error handler will print JPEG error/warning messages -on stderr, and it will call exit() if a fatal error occurs. - -You must initialize the error handler structure, store a pointer to it into -the JPEG object's "err" field, and then call jpeg_create_compress() to -initialize the rest of the JPEG object. - -Typical code for this step, if you are using the default error handler, is - - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; - ... - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_compress(&cinfo); - -jpeg_create_compress allocates a small amount of memory, so it could fail -if you are out of memory. In that case it will exit via the error handler; -that's why the error handler must be initialized first. - - -2. Specify the destination for the compressed data (eg, a file). - -As previously mentioned, the JPEG library delivers compressed data to a -"data destination" module. The library includes one data destination -module which knows how to write to a stdio stream. You can use your own -destination module if you want to do something else, as discussed later. - -If you use the standard destination module, you must open the target stdio -stream beforehand. Typical code for this step looks like: - - FILE * outfile; - ... - if ((outfile = fopen(filename, "wb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - exit(1); - } - jpeg_stdio_dest(&cinfo, outfile); - -where the last line invokes the standard destination module. - -WARNING: it is critical that the binary compressed data be delivered to the -output file unchanged. On non-Unix systems the stdio library may perform -newline translation or otherwise corrupt binary data. To suppress this -behavior, you may need to use a "b" option to fopen (as shown above), or use -setmode() or another routine to put the stdio stream in binary mode. See -cjpeg.c and djpeg.c for code that has been found to work on many systems. - -You can select the data destination after setting other parameters (step 3), -if that's more convenient. You may not change the destination between -calling jpeg_start_compress() and jpeg_finish_compress(). - - -3. Set parameters for compression, including image size & colorspace. - -You must supply information about the source image by setting the following -fields in the JPEG object (cinfo structure): - - image_width Width of image, in pixels - image_height Height of image, in pixels - input_components Number of color channels (samples per pixel) - in_color_space Color space of source image - -The image dimensions are, hopefully, obvious. JPEG supports image dimensions -of 1 to 64K pixels in either direction. The input color space is typically -RGB or grayscale, and input_components is 3 or 1 accordingly. (See "Special -color spaces", later, for more info.) The in_color_space field must be -assigned one of the J_COLOR_SPACE enum constants, typically JCS_RGB or -JCS_GRAYSCALE. - -JPEG has a large number of compression parameters that determine how the -image is encoded. Most applications don't need or want to know about all -these parameters. You can set all the parameters to reasonable defaults by -calling jpeg_set_defaults(); then, if there are particular values you want -to change, you can do so after that. The "Compression parameter selection" -section tells about all the parameters. - -You must set in_color_space correctly before calling jpeg_set_defaults(), -because the defaults depend on the source image colorspace. However the -other three source image parameters need not be valid until you call -jpeg_start_compress(). There's no harm in calling jpeg_set_defaults() more -than once, if that happens to be convenient. - -Typical code for a 24-bit RGB source image is - - cinfo.image_width = Width; /* image width and height, in pixels */ - cinfo.image_height = Height; - cinfo.input_components = 3; /* # of color components per pixel */ - cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ - - jpeg_set_defaults(&cinfo); - /* Make optional parameter settings here */ - - -4. jpeg_start_compress(...); - -After you have established the data destination and set all the necessary -source image info and other parameters, call jpeg_start_compress() to begin -a compression cycle. This will initialize internal state, allocate working -storage, and emit the first few bytes of the JPEG datastream header. - -Typical code: - - jpeg_start_compress(&cinfo, TRUE); - -The "TRUE" parameter ensures that a complete JPEG interchange datastream -will be written. This is appropriate in most cases. If you think you might -want to use an abbreviated datastream, read the section on abbreviated -datastreams, below. - -Once you have called jpeg_start_compress(), you may not alter any JPEG -parameters or other fields of the JPEG object until you have completed -the compression cycle. - - -5. while (scan lines remain to be written) - jpeg_write_scanlines(...); - -Now write all the required image data by calling jpeg_write_scanlines() -one or more times. You can pass one or more scanlines in each call, up -to the total image height. In most applications it is convenient to pass -just one or a few scanlines at a time. The expected format for the passed -data is discussed under "Data formats", above. - -Image data should be written in top-to-bottom scanline order. The JPEG spec -contains some weasel wording about how top and bottom are application-defined -terms (a curious interpretation of the English language...) but if you want -your files to be compatible with everyone else's, you WILL use top-to-bottom -order. If the source data must be read in bottom-to-top order, you can use -the JPEG library's virtual array mechanism to invert the data efficiently. -Examples of this can be found in the sample application cjpeg. - -The library maintains a count of the number of scanlines written so far -in the next_scanline field of the JPEG object. Usually you can just use -this variable as the loop counter, so that the loop test looks like -"while (cinfo.next_scanline < cinfo.image_height)". - -Code for this step depends heavily on the way that you store the source data. -example.c shows the following code for the case of a full-size 2-D source -array containing 3-byte RGB pixels: - - JSAMPROW row_pointer[1]; /* pointer to a single row */ - int row_stride; /* physical row width in buffer */ - - row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */ - - while (cinfo.next_scanline < cinfo.image_height) { - row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; - jpeg_write_scanlines(&cinfo, row_pointer, 1); - } - -jpeg_write_scanlines() returns the number of scanlines actually written. -This will normally be equal to the number passed in, so you can usually -ignore the return value. It is different in just two cases: - * If you try to write more scanlines than the declared image height, - the additional scanlines are ignored. - * If you use a suspending data destination manager, output buffer overrun - will cause the compressor to return before accepting all the passed lines. - This feature is discussed under "I/O suspension", below. The normal - stdio destination manager will NOT cause this to happen. -In any case, the return value is the same as the change in the value of -next_scanline. - - -6. jpeg_finish_compress(...); - -After all the image data has been written, call jpeg_finish_compress() to -complete the compression cycle. This step is ESSENTIAL to ensure that the -last bufferload of data is written to the data destination. -jpeg_finish_compress() also releases working memory associated with the JPEG -object. - -Typical code: - - jpeg_finish_compress(&cinfo); - -If using the stdio destination manager, don't forget to close the output -stdio stream (if necessary) afterwards. - -If you have requested a multi-pass operating mode, such as Huffman code -optimization, jpeg_finish_compress() will perform the additional passes using -data buffered by the first pass. In this case jpeg_finish_compress() may take -quite a while to complete. With the default compression parameters, this will -not happen. - -It is an error to call jpeg_finish_compress() before writing the necessary -total number of scanlines. If you wish to abort compression, call -jpeg_abort() as discussed below. - -After completing a compression cycle, you may dispose of the JPEG object -as discussed next, or you may use it to compress another image. In that case -return to step 2, 3, or 4 as appropriate. If you do not change the -destination manager, the new datastream will be written to the same target. -If you do not change any JPEG parameters, the new datastream will be written -with the same parameters as before. Note that you can change the input image -dimensions freely between cycles, but if you change the input colorspace, you -should call jpeg_set_defaults() to adjust for the new colorspace; and then -you'll need to repeat all of step 3. - - -7. Release the JPEG compression object. - -When you are done with a JPEG compression object, destroy it by calling -jpeg_destroy_compress(). This will free all subsidiary memory (regardless of -the previous state of the object). Or you can call jpeg_destroy(), which -works for either compression or decompression objects --- this may be more -convenient if you are sharing code between compression and decompression -cases. (Actually, these routines are equivalent except for the declared type -of the passed pointer. To avoid gripes from ANSI C compilers, jpeg_destroy() -should be passed a j_common_ptr.) - -If you allocated the jpeg_compress_struct structure from malloc(), freeing -it is your responsibility --- jpeg_destroy() won't. Ditto for the error -handler structure. - -Typical code: - - jpeg_destroy_compress(&cinfo); - - -8. Aborting. - -If you decide to abort a compression cycle before finishing, you can clean up -in either of two ways: - -* If you don't need the JPEG object any more, just call - jpeg_destroy_compress() or jpeg_destroy() to release memory. This is - legitimate at any point after calling jpeg_create_compress() --- in fact, - it's safe even if jpeg_create_compress() fails. - -* If you want to re-use the JPEG object, call jpeg_abort_compress(), or call - jpeg_abort() which works on both compression and decompression objects. - This will return the object to an idle state, releasing any working memory. - jpeg_abort() is allowed at any time after successful object creation. - -Note that cleaning up the data destination, if required, is your -responsibility; neither of these routines will call term_destination(). -(See "Compressed data handling", below, for more about that.) - -jpeg_destroy() and jpeg_abort() are the only safe calls to make on a JPEG -object that has reported an error by calling error_exit (see "Error handling" -for more info). The internal state of such an object is likely to be out of -whack. Either of these two routines will return the object to a known state. - - -Decompression details ---------------------- - -Here we revisit the JPEG decompression outline given in the overview. - -1. Allocate and initialize a JPEG decompression object. - -This is just like initialization for compression, as discussed above, -except that the object is a "struct jpeg_decompress_struct" and you -call jpeg_create_decompress(). Error handling is exactly the same. - -Typical code: - - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; - ... - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_decompress(&cinfo); - -(Both here and in the IJG code, we usually use variable name "cinfo" for -both compression and decompression objects.) - - -2. Specify the source of the compressed data (eg, a file). - -As previously mentioned, the JPEG library reads compressed data from a "data -source" module. The library includes one data source module which knows how -to read from a stdio stream. You can use your own source module if you want -to do something else, as discussed later. - -If you use the standard source module, you must open the source stdio stream -beforehand. Typical code for this step looks like: - - FILE * infile; - ... - if ((infile = fopen(filename, "rb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - exit(1); - } - jpeg_stdio_src(&cinfo, infile); - -where the last line invokes the standard source module. - -WARNING: it is critical that the binary compressed data be read unchanged. -On non-Unix systems the stdio library may perform newline translation or -otherwise corrupt binary data. To suppress this behavior, you may need to use -a "b" option to fopen (as shown above), or use setmode() or another routine to -put the stdio stream in binary mode. See cjpeg.c and djpeg.c for code that -has been found to work on many systems. - -You may not change the data source between calling jpeg_read_header() and -jpeg_finish_decompress(). If you wish to read a series of JPEG images from -a single source file, you should repeat the jpeg_read_header() to -jpeg_finish_decompress() sequence without reinitializing either the JPEG -object or the data source module; this prevents buffered input data from -being discarded. - - -3. Call jpeg_read_header() to obtain image info. - -Typical code for this step is just - - jpeg_read_header(&cinfo, TRUE); - -This will read the source datastream header markers, up to the beginning -of the compressed data proper. On return, the image dimensions and other -info have been stored in the JPEG object. The application may wish to -consult this information before selecting decompression parameters. - -More complex code is necessary if - * A suspending data source is used --- in that case jpeg_read_header() - may return before it has read all the header data. See "I/O suspension", - below. The normal stdio source manager will NOT cause this to happen. - * Abbreviated JPEG files are to be processed --- see the section on - abbreviated datastreams. Standard applications that deal only in - interchange JPEG files need not be concerned with this case either. - -It is permissible to stop at this point if you just wanted to find out the -image dimensions and other header info for a JPEG file. In that case, -call jpeg_destroy() when you are done with the JPEG object, or call -jpeg_abort() to return it to an idle state before selecting a new data -source and reading another header. - - -4. Set parameters for decompression. - -jpeg_read_header() sets appropriate default decompression parameters based on -the properties of the image (in particular, its colorspace). However, you -may well want to alter these defaults before beginning the decompression. -For example, the default is to produce full color output from a color file. -If you want colormapped output you must ask for it. Other options allow the -returned image to be scaled and allow various speed/quality tradeoffs to be -selected. "Decompression parameter selection", below, gives details. - -If the defaults are appropriate, nothing need be done at this step. - -Note that all default values are set by each call to jpeg_read_header(). -If you reuse a decompression object, you cannot expect your parameter -settings to be preserved across cycles, as you can for compression. -You must set desired parameter values each time. - - -5. jpeg_start_decompress(...); - -Once the parameter values are satisfactory, call jpeg_start_decompress() to -begin decompression. This will initialize internal state, allocate working -memory, and prepare for returning data. - -Typical code is just - - jpeg_start_decompress(&cinfo); - -If you have requested a multi-pass operating mode, such as 2-pass color -quantization, jpeg_start_decompress() will do everything needed before data -output can begin. In this case jpeg_start_decompress() may take quite a while -to complete. With a single-scan (non progressive) JPEG file and default -decompression parameters, this will not happen; jpeg_start_decompress() will -return quickly. - -After this call, the final output image dimensions, including any requested -scaling, are available in the JPEG object; so is the selected colormap, if -colormapped output has been requested. Useful fields include - - output_width image width and height, as scaled - output_height - out_color_components # of color components in out_color_space - output_components # of color components returned per pixel - colormap the selected colormap, if any - actual_number_of_colors number of entries in colormap - -output_components is 1 (a colormap index) when quantizing colors; otherwise it -equals out_color_components. It is the number of JSAMPLE values that will be -emitted per pixel in the output arrays. - -Typically you will need to allocate data buffers to hold the incoming image. -You will need output_width * output_components JSAMPLEs per scanline in your -output buffer, and a total of output_height scanlines will be returned. - -Note: if you are using the JPEG library's internal memory manager to allocate -data buffers (as djpeg does), then the manager's protocol requires that you -request large buffers *before* calling jpeg_start_decompress(). This is a -little tricky since the output_XXX fields are not normally valid then. You -can make them valid by calling jpeg_calc_output_dimensions() after setting the -relevant parameters (scaling, output color space, and quantization flag). - - -6. while (scan lines remain to be read) - jpeg_read_scanlines(...); - -Now you can read the decompressed image data by calling jpeg_read_scanlines() -one or more times. At each call, you pass in the maximum number of scanlines -to be read (ie, the height of your working buffer); jpeg_read_scanlines() -will return up to that many lines. The return value is the number of lines -actually read. The format of the returned data is discussed under "Data -formats", above. Don't forget that grayscale and color JPEGs will return -different data formats! - -Image data is returned in top-to-bottom scanline order. If you must write -out the image in bottom-to-top order, you can use the JPEG library's virtual -array mechanism to invert the data efficiently. Examples of this can be -found in the sample application djpeg. - -The library maintains a count of the number of scanlines returned so far -in the output_scanline field of the JPEG object. Usually you can just use -this variable as the loop counter, so that the loop test looks like -"while (cinfo.output_scanline < cinfo.output_height)". (Note that the test -should NOT be against image_height, unless you never use scaling. The -image_height field is the height of the original unscaled image.) -The return value always equals the change in the value of output_scanline. - -If you don't use a suspending data source, it is safe to assume that -jpeg_read_scanlines() reads at least one scanline per call, until the -bottom of the image has been reached. - -If you use a buffer larger than one scanline, it is NOT safe to assume that -jpeg_read_scanlines() fills it. (The current implementation returns only a -few scanlines per call, no matter how large a buffer you pass.) So you must -always provide a loop that calls jpeg_read_scanlines() repeatedly until the -whole image has been read. - - -7. jpeg_finish_decompress(...); - -After all the image data has been read, call jpeg_finish_decompress() to -complete the decompression cycle. This causes working memory associated -with the JPEG object to be released. - -Typical code: - - jpeg_finish_decompress(&cinfo); - -If using the stdio source manager, don't forget to close the source stdio -stream if necessary. - -It is an error to call jpeg_finish_decompress() before reading the correct -total number of scanlines. If you wish to abort decompression, call -jpeg_abort() as discussed below. - -After completing a decompression cycle, you may dispose of the JPEG object as -discussed next, or you may use it to decompress another image. In that case -return to step 2 or 3 as appropriate. If you do not change the source -manager, the next image will be read from the same source. - - -8. Release the JPEG decompression object. - -When you are done with a JPEG decompression object, destroy it by calling -jpeg_destroy_decompress() or jpeg_destroy(). The previous discussion of -destroying compression objects applies here too. - -Typical code: - - jpeg_destroy_decompress(&cinfo); - - -9. Aborting. - -You can abort a decompression cycle by calling jpeg_destroy_decompress() or -jpeg_destroy() if you don't need the JPEG object any more, or -jpeg_abort_decompress() or jpeg_abort() if you want to reuse the object. -The previous discussion of aborting compression cycles applies here too. - - -Mechanics of usage: include files, linking, etc ------------------------------------------------ - -Applications using the JPEG library should include the header file jpeglib.h -to obtain declarations of data types and routines. Before including -jpeglib.h, include system headers that define at least the typedefs FILE and -size_t. On ANSI-conforming systems, including is sufficient; on -older Unix systems, you may need to define size_t. - -If the application needs to refer to individual JPEG library error codes, also -include jerror.h to define those symbols. - -jpeglib.h indirectly includes the files jconfig.h and jmorecfg.h. If you are -installing the JPEG header files in a system directory, you will want to -install all four files: jpeglib.h, jerror.h, jconfig.h, jmorecfg.h. - -The most convenient way to include the JPEG code into your executable program -is to prepare a library file ("libjpeg.a", or a corresponding name on non-Unix -machines) and reference it at your link step. If you use only half of the -library (only compression or only decompression), only that much code will be -included from the library, unless your linker is hopelessly brain-damaged. -The supplied makefiles build libjpeg.a automatically (see install.txt). - -While you can build the JPEG library as a shared library if the whim strikes -you, we don't really recommend it. The trouble with shared libraries is that -at some point you'll probably try to substitute a new version of the library -without recompiling the calling applications. That generally doesn't work -because the parameter struct declarations usually change with each new -version. In other words, the library's API is *not* guaranteed binary -compatible across versions; we only try to ensure source-code compatibility. -(In hindsight, it might have been smarter to hide the parameter structs from -applications and introduce a ton of access functions instead. Too late now, -however.) - -On some systems your application may need to set up a signal handler to ensure -that temporary files are deleted if the program is interrupted. This is most -critical if you are on MS-DOS and use the jmemdos.c memory manager back end; -it will try to grab extended memory for temp files, and that space will NOT be -freed automatically. See cjpeg.c or djpeg.c for an example signal handler. - -It may be worth pointing out that the core JPEG library does not actually -require the stdio library: only the default source/destination managers and -error handler need it. You can use the library in a stdio-less environment -if you replace those modules and use jmemnobs.c (or another memory manager of -your own devising). More info about the minimum system library requirements -may be found in jinclude.h. - - -ADVANCED FEATURES -================= - -Compression parameter selection -------------------------------- - -This section describes all the optional parameters you can set for JPEG -compression, as well as the "helper" routines provided to assist in this -task. Proper setting of some parameters requires detailed understanding -of the JPEG standard; if you don't know what a parameter is for, it's best -not to mess with it! See REFERENCES in the README file for pointers to -more info about JPEG. - -It's a good idea to call jpeg_set_defaults() first, even if you plan to set -all the parameters; that way your code is more likely to work with future JPEG -libraries that have additional parameters. For the same reason, we recommend -you use a helper routine where one is provided, in preference to twiddling -cinfo fields directly. - -The helper routines are: - -jpeg_set_defaults (j_compress_ptr cinfo) - This routine sets all JPEG parameters to reasonable defaults, using - only the input image's color space (field in_color_space, which must - already be set in cinfo). Many applications will only need to use - this routine and perhaps jpeg_set_quality(). - -jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) - Sets the JPEG file's colorspace (field jpeg_color_space) as specified, - and sets other color-space-dependent parameters appropriately. See - "Special color spaces", below, before using this. A large number of - parameters, including all per-component parameters, are set by this - routine; if you want to twiddle individual parameters you should call - jpeg_set_colorspace() before rather than after. - -jpeg_default_colorspace (j_compress_ptr cinfo) - Selects an appropriate JPEG colorspace based on cinfo->in_color_space, - and calls jpeg_set_colorspace(). This is actually a subroutine of - jpeg_set_defaults(). It's broken out in case you want to change - just the colorspace-dependent JPEG parameters. - -jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline) - Constructs JPEG quantization tables appropriate for the indicated - quality setting. The quality value is expressed on the 0..100 scale - recommended by IJG (cjpeg's "-quality" switch uses this routine). - Note that the exact mapping from quality values to tables may change - in future IJG releases as more is learned about DCT quantization. - If the force_baseline parameter is TRUE, then the quantization table - entries are constrained to the range 1..255 for full JPEG baseline - compatibility. In the current implementation, this only makes a - difference for quality settings below 25, and it effectively prevents - very small/low quality files from being generated. The IJG decoder - is capable of reading the non-baseline files generated at low quality - settings when force_baseline is FALSE, but other decoders may not be. - -jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, - boolean force_baseline) - Same as jpeg_set_quality() except that the generated tables are the - sample tables given in the JPEC spec section K.1, multiplied by the - specified scale factor (which is expressed as a percentage; thus - scale_factor = 100 reproduces the spec's tables). Note that larger - scale factors give lower quality. This entry point is useful for - conforming to the Adobe PostScript DCT conventions, but we do not - recommend linear scaling as a user-visible quality scale otherwise. - force_baseline again constrains the computed table entries to 1..255. - -int jpeg_quality_scaling (int quality) - Converts a value on the IJG-recommended quality scale to a linear - scaling percentage. Note that this routine may change or go away - in future releases --- IJG may choose to adopt a scaling method that - can't be expressed as a simple scalar multiplier, in which case the - premise of this routine collapses. Caveat user. - -jpeg_default_qtables (j_compress_ptr cinfo, boolean force_baseline) - Set default quantization tables with linear q_scale_factor[] values - (see below). - -jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, - const unsigned int *basic_table, - int scale_factor, boolean force_baseline) - Allows an arbitrary quantization table to be created. which_tbl - indicates which table slot to fill. basic_table points to an array - of 64 unsigned ints given in normal array order. These values are - multiplied by scale_factor/100 and then clamped to the range 1..65535 - (or to 1..255 if force_baseline is TRUE). - CAUTION: prior to library version 6a, jpeg_add_quant_table expected - the basic table to be given in JPEG zigzag order. If you need to - write code that works with either older or newer versions of this - routine, you must check the library version number. Something like - "#if JPEG_LIB_VERSION >= 61" is the right test. - -jpeg_simple_progression (j_compress_ptr cinfo) - Generates a default scan script for writing a progressive-JPEG file. - This is the recommended method of creating a progressive file, - unless you want to make a custom scan sequence. You must ensure that - the JPEG color space is set correctly before calling this routine. - - -Compression parameters (cinfo fields) include: - -boolean arith_code - If TRUE, use arithmetic coding. - If FALSE, use Huffman coding. - -int block_size - Set DCT block size. All N from 1 to 16 are possible. - Default is 8 (baseline format). - Larger values produce higher compression, - smaller values produce higher quality. - An exact DCT stage is possible with 1 or 2. - With the default quality of 75 and default Luminance qtable - the DCT+Quantization stage is lossless for value 1. - Note that values other than 8 require a SmartScale capable decoder, - introduced with IJG JPEG 8. Setting the block_size parameter for - compression works with version 8c and later. - -J_DCT_METHOD dct_method - Selects the algorithm used for the DCT step. Choices are: - JDCT_ISLOW: slow but accurate integer algorithm - JDCT_IFAST: faster, less accurate integer method - JDCT_FLOAT: floating-point method - JDCT_DEFAULT: default method (normally JDCT_ISLOW) - JDCT_FASTEST: fastest method (normally JDCT_IFAST) - The FLOAT method is very slightly more accurate than the ISLOW method, - but may give different results on different machines due to varying - roundoff behavior. The integer methods should give the same results - on all machines. On machines with sufficiently fast FP hardware, the - floating-point method may also be the fastest. The IFAST method is - considerably less accurate than the other two; its use is not - recommended if high quality is a concern. JDCT_DEFAULT and - JDCT_FASTEST are macros configurable by each installation. - -unsigned int scale_num, scale_denom - Scale the image by the fraction scale_num/scale_denom. Default is - 1/1, or no scaling. Currently, the supported scaling ratios are - M/N with all N from 1 to 16, where M is the destination DCT size, - which is 8 by default (see block_size parameter above). - (The library design allows for arbitrary scaling ratios but this - is not likely to be implemented any time soon.) - -J_COLOR_SPACE jpeg_color_space -int num_components - The JPEG color space and corresponding number of components; see - "Special color spaces", below, for more info. We recommend using - jpeg_set_colorspace() if you want to change these. - -J_COLOR_TRANSFORM color_transform - Internal color transform identifier, writes LSE marker if nonzero - (requires decoder with inverse color transform support, introduced - with IJG JPEG 9). - Two values are currently possible: JCT_NONE and JCT_SUBTRACT_GREEN. - Set this value for lossless RGB application *before* calling - jpeg_set_colorspace(), because entropy table assignment in - jpeg_set_colorspace() depends on color_transform. - -boolean optimize_coding - TRUE causes the compressor to compute optimal Huffman coding tables - for the image. This requires an extra pass over the data and - therefore costs a good deal of space and time. The default is - FALSE, which tells the compressor to use the supplied or default - Huffman tables. In most cases optimal tables save only a few percent - of file size compared to the default tables. Note that when this is - TRUE, you need not supply Huffman tables at all, and any you do - supply will be overwritten. - -unsigned int restart_interval -int restart_in_rows - To emit restart markers in the JPEG file, set one of these nonzero. - Set restart_interval to specify the exact interval in MCU blocks. - Set restart_in_rows to specify the interval in MCU rows. (If - restart_in_rows is not 0, then restart_interval is set after the - image width in MCUs is computed.) Defaults are zero (no restarts). - One restart marker per MCU row is often a good choice. - NOTE: the overhead of restart markers is higher in grayscale JPEG - files than in color files, and MUCH higher in progressive JPEGs. - If you use restarts, you may want to use larger intervals in those - cases. - -const jpeg_scan_info * scan_info -int num_scans - By default, scan_info is NULL; this causes the compressor to write a - single-scan sequential JPEG file. If not NULL, scan_info points to - an array of scan definition records of length num_scans. The - compressor will then write a JPEG file having one scan for each scan - definition record. This is used to generate noninterleaved or - progressive JPEG files. The library checks that the scan array - defines a valid JPEG scan sequence. (jpeg_simple_progression creates - a suitable scan definition array for progressive JPEG.) This is - discussed further under "Progressive JPEG support". - -boolean do_fancy_downsampling - If TRUE, use direct DCT scaling with DCT size > 8 for downsampling - of chroma components. - If FALSE, use only DCT size <= 8 and simple separate downsampling. - Default is TRUE. - For better image stability in multiple generation compression cycles - it is preferable that this value matches the corresponding - do_fancy_upsampling value in decompression. - -int smoothing_factor - If non-zero, the input image is smoothed; the value should be 1 for - minimal smoothing to 100 for maximum smoothing. Consult jcsample.c - for details of the smoothing algorithm. The default is zero. - -boolean write_JFIF_header - If TRUE, a JFIF APP0 marker is emitted. jpeg_set_defaults() and - jpeg_set_colorspace() set this TRUE if a JFIF-legal JPEG color space - (ie, YCbCr or grayscale) is selected, otherwise FALSE. - -UINT8 JFIF_major_version -UINT8 JFIF_minor_version - The version number to be written into the JFIF marker. - jpeg_set_defaults() initializes the version to 1.01 (major=minor=1). - You should set it to 1.02 (major=1, minor=2) if you plan to write - any JFIF 1.02 extension markers. - -UINT8 density_unit -UINT16 X_density -UINT16 Y_density - The resolution information to be written into the JFIF marker; - not used otherwise. density_unit may be 0 for unknown, - 1 for dots/inch, or 2 for dots/cm. The default values are 0,1,1 - indicating square pixels of unknown size. - -boolean write_Adobe_marker - If TRUE, an Adobe APP14 marker is emitted. jpeg_set_defaults() and - jpeg_set_colorspace() set this TRUE if JPEG color space RGB, CMYK, - or YCCK is selected, otherwise FALSE. It is generally a bad idea - to set both write_JFIF_header and write_Adobe_marker. In fact, - you probably shouldn't change the default settings at all --- the - default behavior ensures that the JPEG file's color space can be - recognized by the decoder. - -JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS] - Pointers to coefficient quantization tables, one per table slot, - or NULL if no table is defined for a slot. Usually these should - be set via one of the above helper routines; jpeg_add_quant_table() - is general enough to define any quantization table. The other - routines will set up table slot 0 for luminance quality and table - slot 1 for chrominance. - -int q_scale_factor[NUM_QUANT_TBLS] - Linear quantization scaling factors (percentage, initialized 100) - for use with jpeg_default_qtables(). - See rdswitch.c and cjpeg.c for an example of usage. - Note that the q_scale_factor[] fields are the "linear" scales, so you - have to convert from user-defined ratings via jpeg_quality_scaling(). - Here is an example code which corresponds to cjpeg -quality 90,70: - - jpeg_set_defaults(cinfo); - - /* Set luminance quality 90. */ - cinfo->q_scale_factor[0] = jpeg_quality_scaling(90); - /* Set chrominance quality 70. */ - cinfo->q_scale_factor[1] = jpeg_quality_scaling(70); - - jpeg_default_qtables(cinfo, force_baseline); - - CAUTION: You must also set 1x1 subsampling for efficient separate - color quality selection, since the default value used by library - is 2x2: - - cinfo->comp_info[0].v_samp_factor = 1; - cinfo->comp_info[0].h_samp_factor = 1; - -JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS] -JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS] - Pointers to Huffman coding tables, one per table slot, or NULL if - no table is defined for a slot. Slots 0 and 1 are filled with the - JPEG sample tables by jpeg_set_defaults(). If you need to allocate - more table structures, jpeg_alloc_huff_table() may be used. - Note that optimal Huffman tables can be computed for an image - by setting optimize_coding, as discussed above; there's seldom - any need to mess with providing your own Huffman tables. - - -The actual dimensions of the JPEG image that will be written to the file are -given by the following fields. These are computed from the input image -dimensions and the compression parameters by jpeg_start_compress(). You can -also call jpeg_calc_jpeg_dimensions() to obtain the values that will result -from the current parameter settings. This can be useful if you are trying -to pick a scaling ratio that will get close to a desired target size. - -JDIMENSION jpeg_width Actual dimensions of output image. -JDIMENSION jpeg_height - - -Per-component parameters are stored in the struct cinfo.comp_info[i] for -component number i. Note that components here refer to components of the -JPEG color space, *not* the source image color space. A suitably large -comp_info[] array is allocated by jpeg_set_defaults(); if you choose not -to use that routine, it's up to you to allocate the array. - -int component_id - The one-byte identifier code to be recorded in the JPEG file for - this component. For the standard color spaces, we recommend you - leave the default values alone. - -int h_samp_factor -int v_samp_factor - Horizontal and vertical sampling factors for the component; must - be 1..4 according to the JPEG standard. Note that larger sampling - factors indicate a higher-resolution component; many people find - this behavior quite unintuitive. The default values are 2,2 for - luminance components and 1,1 for chrominance components, except - for grayscale where 1,1 is used. - -int quant_tbl_no - Quantization table number for component. The default value is - 0 for luminance components and 1 for chrominance components. - -int dc_tbl_no -int ac_tbl_no - DC and AC entropy coding table numbers. The default values are - 0 for luminance components and 1 for chrominance components. - -int component_index - Must equal the component's index in comp_info[]. (Beginning in - release v6, the compressor library will fill this in automatically; - you don't have to.) - - -Decompression parameter selection ---------------------------------- - -Decompression parameter selection is somewhat simpler than compression -parameter selection, since all of the JPEG internal parameters are -recorded in the source file and need not be supplied by the application. -(Unless you are working with abbreviated files, in which case see -"Abbreviated datastreams", below.) Decompression parameters control -the postprocessing done on the image to deliver it in a format suitable -for the application's use. Many of the parameters control speed/quality -tradeoffs, in which faster decompression may be obtained at the price of -a poorer-quality image. The defaults select the highest quality (slowest) -processing. - -The following fields in the JPEG object are set by jpeg_read_header() and -may be useful to the application in choosing decompression parameters: - -JDIMENSION image_width Width and height of image -JDIMENSION image_height -int num_components Number of color components -J_COLOR_SPACE jpeg_color_space Colorspace of image -boolean saw_JFIF_marker TRUE if a JFIF APP0 marker was seen - UINT8 JFIF_major_version Version information from JFIF marker - UINT8 JFIF_minor_version - UINT8 density_unit Resolution data from JFIF marker - UINT16 X_density - UINT16 Y_density -boolean saw_Adobe_marker TRUE if an Adobe APP14 marker was seen - UINT8 Adobe_transform Color transform code from Adobe marker - -The JPEG color space, unfortunately, is something of a guess since the JPEG -standard proper does not provide a way to record it. In practice most files -adhere to the JFIF or Adobe conventions, and the decoder will recognize these -correctly. See "Special color spaces", below, for more info. - - -The decompression parameters that determine the basic properties of the -returned image are: - -J_COLOR_SPACE out_color_space - Output color space. jpeg_read_header() sets an appropriate default - based on jpeg_color_space; typically it will be RGB or grayscale. - The application can change this field to request output in a different - colorspace. For example, set it to JCS_GRAYSCALE to get grayscale - output from a color file. (This is useful for previewing: grayscale - output is faster than full color since the color components need not - be processed.) Note that not all possible color space transforms are - currently implemented; you may need to extend jdcolor.c if you want an - unusual conversion. - -unsigned int scale_num, scale_denom - Scale the image by the fraction scale_num/scale_denom. Currently, - the supported scaling ratios are M/N with all M from 1 to 16, where - N is the source DCT size, which is 8 for baseline JPEG. (The library - design allows for arbitrary scaling ratios but this is not likely - to be implemented any time soon.) The values are initialized by - jpeg_read_header() with the source DCT size. For baseline JPEG - this is 8/8. If you change only the scale_num value while leaving - the other unchanged, then this specifies the DCT scaled size to be - applied on the given input. For baseline JPEG this is equivalent - to M/8 scaling, since the source DCT size for baseline JPEG is 8. - Smaller scaling ratios permit significantly faster decoding since - fewer pixels need be processed and a simpler IDCT method can be used. - -boolean quantize_colors - If set TRUE, colormapped output will be delivered. Default is FALSE, - meaning that full-color output will be delivered. - -The next three parameters are relevant only if quantize_colors is TRUE. - -int desired_number_of_colors - Maximum number of colors to use in generating a library-supplied color - map (the actual number of colors is returned in a different field). - Default 256. Ignored when the application supplies its own color map. - -boolean two_pass_quantize - If TRUE, an extra pass over the image is made to select a custom color - map for the image. This usually looks a lot better than the one-size- - fits-all colormap that is used otherwise. Default is TRUE. Ignored - when the application supplies its own color map. - -J_DITHER_MODE dither_mode - Selects color dithering method. Supported values are: - JDITHER_NONE no dithering: fast, very low quality - JDITHER_ORDERED ordered dither: moderate speed and quality - JDITHER_FS Floyd-Steinberg dither: slow, high quality - Default is JDITHER_FS. (At present, ordered dither is implemented - only in the single-pass, standard-colormap case. If you ask for - ordered dither when two_pass_quantize is TRUE or when you supply - an external color map, you'll get F-S dithering.) - -When quantize_colors is TRUE, the target color map is described by the next -two fields. colormap is set to NULL by jpeg_read_header(). The application -can supply a color map by setting colormap non-NULL and setting -actual_number_of_colors to the map size. Otherwise, jpeg_start_decompress() -selects a suitable color map and sets these two fields itself. -[Implementation restriction: at present, an externally supplied colormap is -only accepted for 3-component output color spaces.] - -JSAMPARRAY colormap - The color map, represented as a 2-D pixel array of out_color_components - rows and actual_number_of_colors columns. Ignored if not quantizing. - CAUTION: if the JPEG library creates its own colormap, the storage - pointed to by this field is released by jpeg_finish_decompress(). - Copy the colormap somewhere else first, if you want to save it. - -int actual_number_of_colors - The number of colors in the color map. - -Additional decompression parameters that the application may set include: - -J_DCT_METHOD dct_method - Selects the algorithm used for the DCT step. Choices are the same - as described above for compression. - -boolean do_fancy_upsampling - If TRUE, use direct DCT scaling with DCT size > 8 for upsampling - of chroma components. - If FALSE, use only DCT size <= 8 and simple separate upsampling. - Default is TRUE. - For better image stability in multiple generation compression cycles - it is preferable that this value matches the corresponding - do_fancy_downsampling value in compression. - -boolean do_block_smoothing - If TRUE, interblock smoothing is applied in early stages of decoding - progressive JPEG files; if FALSE, not. Default is TRUE. Early - progression stages look "fuzzy" with smoothing, "blocky" without. - In any case, block smoothing ceases to be applied after the first few - AC coefficients are known to full accuracy, so it is relevant only - when using buffered-image mode for progressive images. - -boolean enable_1pass_quant -boolean enable_external_quant -boolean enable_2pass_quant - These are significant only in buffered-image mode, which is - described in its own section below. - - -The output image dimensions are given by the following fields. These are -computed from the source image dimensions and the decompression parameters -by jpeg_start_decompress(). You can also call jpeg_calc_output_dimensions() -to obtain the values that will result from the current parameter settings. -This can be useful if you are trying to pick a scaling ratio that will get -close to a desired target size. It's also important if you are using the -JPEG library's memory manager to allocate output buffer space, because you -are supposed to request such buffers *before* jpeg_start_decompress(). - -JDIMENSION output_width Actual dimensions of output image. -JDIMENSION output_height -int out_color_components Number of color components in out_color_space. -int output_components Number of color components returned. -int rec_outbuf_height Recommended height of scanline buffer. - -When quantizing colors, output_components is 1, indicating a single color map -index per pixel. Otherwise it equals out_color_components. The output arrays -are required to be output_width * output_components JSAMPLEs wide. - -rec_outbuf_height is the recommended minimum height (in scanlines) of the -buffer passed to jpeg_read_scanlines(). If the buffer is smaller, the -library will still work, but time will be wasted due to unnecessary data -copying. In high-quality modes, rec_outbuf_height is always 1, but some -faster, lower-quality modes set it to larger values (typically 2 to 4). -If you are going to ask for a high-speed processing mode, you may as well -go to the trouble of honoring rec_outbuf_height so as to avoid data copying. -(An output buffer larger than rec_outbuf_height lines is OK, but won't -provide any material speed improvement over that height.) - - -Special color spaces --------------------- - -The JPEG standard itself is "color blind" and doesn't specify any particular -color space. It is customary to convert color data to a luminance/chrominance -color space before compressing, since this permits greater compression. The -existing JPEG file interchange format standards specify YCbCr or GRAYSCALE -data (JFIF version 1), GRAYSCALE, RGB, YCbCr, CMYK, or YCCK (Adobe), or BG_RGB -or BG_YCC (big gamut color spaces, JFIF version 2). For special applications -such as multispectral images, other color spaces can be used, -but it must be understood that such files will be unportable. - -The JPEG library can handle the most common colorspace conversions (namely -RGB <=> YCbCr and CMYK <=> YCCK). It can also deal with data of an unknown -color space, passing it through without conversion. If you deal extensively -with an unusual color space, you can easily extend the library to understand -additional color spaces and perform appropriate conversions. - -For compression, the source data's color space is specified by field -in_color_space. This is transformed to the JPEG file's color space given -by jpeg_color_space. jpeg_set_defaults() chooses a reasonable JPEG color -space depending on in_color_space, but you can override this by calling -jpeg_set_colorspace(). Of course you must select a supported transformation. -jccolor.c currently supports the following transformations: - RGB => YCbCr - RGB => GRAYSCALE - RGB => BG_YCC - YCbCr => GRAYSCALE - YCbCr => BG_YCC - CMYK => YCCK -plus the null transforms: GRAYSCALE => GRAYSCALE, RGB => RGB, -BG_RGB => BG_RGB, YCbCr => YCbCr, BG_YCC => BG_YCC, CMYK => CMYK, -YCCK => YCCK, and UNKNOWN => UNKNOWN. - -The file interchange format standards (JFIF and Adobe) specify APPn markers -that indicate the color space of the JPEG file. It is important to ensure -that these are written correctly, or omitted if the JPEG file's color space -is not one of the ones supported by the interchange standards. -jpeg_set_colorspace() will set the compression parameters to include or omit -the APPn markers properly, so long as it is told the truth about the JPEG -color space. For example, if you are writing some random 3-component color -space without conversion, don't try to fake out the library by setting -in_color_space and jpeg_color_space to JCS_YCbCr; use JCS_UNKNOWN. -You may want to write an APPn marker of your own devising to identify -the colorspace --- see "Special markers", below. - -When told that the color space is UNKNOWN, the library will default to using -luminance-quality compression parameters for all color components. You may -well want to change these parameters. See the source code for -jpeg_set_colorspace(), in jcparam.c, for details. - -For decompression, the JPEG file's color space is given in jpeg_color_space, -and this is transformed to the output color space out_color_space. -jpeg_read_header's setting of jpeg_color_space can be relied on if the file -conforms to JFIF or Adobe conventions, but otherwise it is no better than a -guess. If you know the JPEG file's color space for certain, you can override -jpeg_read_header's guess by setting jpeg_color_space. jpeg_read_header also -selects a default output color space based on (its guess of) jpeg_color_space; -set out_color_space to override this. Again, you must select a supported -transformation. jdcolor.c currently supports - YCbCr => RGB - YCbCr => GRAYSCALE - BG_YCC => RGB - BG_YCC => GRAYSCALE - RGB => GRAYSCALE - GRAYSCALE => RGB - YCCK => CMYK -as well as the null transforms. (Since GRAYSCALE=>RGB is provided, an -application can force grayscale JPEGs to look like color JPEGs if it only -wants to handle one case.) - -The two-pass color quantizer, jquant2.c, is specialized to handle RGB data -(it weights distances appropriately for RGB colors). You'll need to modify -the code if you want to use it for non-RGB output color spaces. Note that -jquant2.c is used to map to an application-supplied colormap as well as for -the normal two-pass colormap selection process. - -CAUTION: it appears that Adobe Photoshop writes inverted data in CMYK JPEG -files: 0 represents 100% ink coverage, rather than 0% ink as you'd expect. -This is arguably a bug in Photoshop, but if you need to work with Photoshop -CMYK files, you will have to deal with it in your application. We cannot -"fix" this in the library by inverting the data during the CMYK<=>YCCK -transform, because that would break other applications, notably Ghostscript. -Photoshop versions prior to 3.0 write EPS files containing JPEG-encoded CMYK -data in the same inverted-YCCK representation used in bare JPEG files, but -the surrounding PostScript code performs an inversion using the PS image -operator. I am told that Photoshop 3.0 will write uninverted YCCK in -EPS/JPEG files, and will omit the PS-level inversion. (But the data -polarity used in bare JPEG files will not change in 3.0.) In either case, -the JPEG library must not invert the data itself, or else Ghostscript would -read these EPS files incorrectly. - - -Error handling --------------- - -When the default error handler is used, any error detected inside the JPEG -routines will cause a message to be printed on stderr, followed by exit(). -You can supply your own error handling routines to override this behavior -and to control the treatment of nonfatal warnings and trace/debug messages. -The file example.c illustrates the most common case, which is to have the -application regain control after an error rather than exiting. - -The JPEG library never writes any message directly; it always goes through -the error handling routines. Three classes of messages are recognized: - * Fatal errors: the library cannot continue. - * Warnings: the library can continue, but the data is corrupt, and a - damaged output image is likely to result. - * Trace/informational messages. These come with a trace level indicating - the importance of the message; you can control the verbosity of the - program by adjusting the maximum trace level that will be displayed. - -You may, if you wish, simply replace the entire JPEG error handling module -(jerror.c) with your own code. However, you can avoid code duplication by -only replacing some of the routines depending on the behavior you need. -This is accomplished by calling jpeg_std_error() as usual, but then overriding -some of the method pointers in the jpeg_error_mgr struct, as illustrated by -example.c. - -All of the error handling routines will receive a pointer to the JPEG object -(a j_common_ptr which points to either a jpeg_compress_struct or a -jpeg_decompress_struct; if you need to tell which, test the is_decompressor -field). This struct includes a pointer to the error manager struct in its -"err" field. Frequently, custom error handler routines will need to access -additional data which is not known to the JPEG library or the standard error -handler. The most convenient way to do this is to embed either the JPEG -object or the jpeg_error_mgr struct in a larger structure that contains -additional fields; then casting the passed pointer provides access to the -additional fields. Again, see example.c for one way to do it. (Beginning -with IJG version 6b, there is also a void pointer "client_data" in each -JPEG object, which the application can also use to find related data. -The library does not touch client_data at all.) - -The individual methods that you might wish to override are: - -error_exit (j_common_ptr cinfo) - Receives control for a fatal error. Information sufficient to - generate the error message has been stored in cinfo->err; call - output_message to display it. Control must NOT return to the caller; - generally this routine will exit() or longjmp() somewhere. - Typically you would override this routine to get rid of the exit() - default behavior. Note that if you continue processing, you should - clean up the JPEG object with jpeg_abort() or jpeg_destroy(). - -output_message (j_common_ptr cinfo) - Actual output of any JPEG message. Override this to send messages - somewhere other than stderr. Note that this method does not know - how to generate a message, only where to send it. - -format_message (j_common_ptr cinfo, char * buffer) - Constructs a readable error message string based on the error info - stored in cinfo->err. This method is called by output_message. Few - applications should need to override this method. One possible - reason for doing so is to implement dynamic switching of error message - language. - -emit_message (j_common_ptr cinfo, int msg_level) - Decide whether or not to emit a warning or trace message; if so, - calls output_message. The main reason for overriding this method - would be to abort on warnings. msg_level is -1 for warnings, - 0 and up for trace messages. - -Only error_exit() and emit_message() are called from the rest of the JPEG -library; the other two are internal to the error handler. - -The actual message texts are stored in an array of strings which is pointed to -by the field err->jpeg_message_table. The messages are numbered from 0 to -err->last_jpeg_message, and it is these code numbers that are used in the -JPEG library code. You could replace the message texts (for instance, with -messages in French or German) by changing the message table pointer. See -jerror.h for the default texts. CAUTION: this table will almost certainly -change or grow from one library version to the next. - -It may be useful for an application to add its own message texts that are -handled by the same mechanism. The error handler supports a second "add-on" -message table for this purpose. To define an addon table, set the pointer -err->addon_message_table and the message numbers err->first_addon_message and -err->last_addon_message. If you number the addon messages beginning at 1000 -or so, you won't have to worry about conflicts with the library's built-in -messages. See the sample applications cjpeg/djpeg for an example of using -addon messages (the addon messages are defined in cderror.h). - -Actual invocation of the error handler is done via macros defined in jerror.h: - ERREXITn(...) for fatal errors - WARNMSn(...) for corrupt-data warnings - TRACEMSn(...) for trace and informational messages. -These macros store the message code and any additional parameters into the -error handler struct, then invoke the error_exit() or emit_message() method. -The variants of each macro are for varying numbers of additional parameters. -The additional parameters are inserted into the generated message using -standard printf() format codes. - -See jerror.h and jerror.c for further details. - - -Compressed data handling (source and destination managers) ----------------------------------------------------------- - -The JPEG compression library sends its compressed data to a "destination -manager" module. The default destination manager just writes the data to a -memory buffer or to a stdio stream, but you can provide your own manager to -do something else. Similarly, the decompression library calls a "source -manager" to obtain the compressed data; you can provide your own source -manager if you want the data to come from somewhere other than a memory -buffer or a stdio stream. - -In both cases, compressed data is processed a bufferload at a time: the -destination or source manager provides a work buffer, and the library invokes -the manager only when the buffer is filled or emptied. (You could define a -one-character buffer to force the manager to be invoked for each byte, but -that would be rather inefficient.) The buffer's size and location are -controlled by the manager, not by the library. For example, the memory -source manager just makes the buffer pointer and length point to the original -data in memory. In this case the buffer-reload procedure will be invoked -only if the decompressor ran off the end of the datastream, which would -indicate an erroneous datastream. - -The work buffer is defined as an array of datatype JOCTET, which is generally -"char" or "unsigned char". On a machine where char is not exactly 8 bits -wide, you must define JOCTET as a wider data type and then modify the data -source and destination modules to transcribe the work arrays into 8-bit units -on external storage. - -A data destination manager struct contains a pointer and count defining the -next byte to write in the work buffer and the remaining free space: - - JOCTET * next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - -The library increments the pointer and decrements the count until the buffer -is filled. The manager's empty_output_buffer method must reset the pointer -and count. The manager is expected to remember the buffer's starting address -and total size in private fields not visible to the library. - -A data destination manager provides three methods: - -init_destination (j_compress_ptr cinfo) - Initialize destination. This is called by jpeg_start_compress() - before any data is actually written. It must initialize - next_output_byte and free_in_buffer. free_in_buffer must be - initialized to a positive value. - -empty_output_buffer (j_compress_ptr cinfo) - This is called whenever the buffer has filled (free_in_buffer - reaches zero). In typical applications, it should write out the - *entire* buffer (use the saved start address and buffer length; - ignore the current state of next_output_byte and free_in_buffer). - Then reset the pointer & count to the start of the buffer, and - return TRUE indicating that the buffer has been dumped. - free_in_buffer must be set to a positive value when TRUE is - returned. A FALSE return should only be used when I/O suspension is - desired (this operating mode is discussed in the next section). - -term_destination (j_compress_ptr cinfo) - Terminate destination --- called by jpeg_finish_compress() after all - data has been written. In most applications, this must flush any - data remaining in the buffer. Use either next_output_byte or - free_in_buffer to determine how much data is in the buffer. - -term_destination() is NOT called by jpeg_abort() or jpeg_destroy(). If you -want the destination manager to be cleaned up during an abort, you must do it -yourself. - -You will also need code to create a jpeg_destination_mgr struct, fill in its -method pointers, and insert a pointer to the struct into the "dest" field of -the JPEG compression object. This can be done in-line in your setup code if -you like, but it's probably cleaner to provide a separate routine similar to -the jpeg_stdio_dest() or jpeg_mem_dest() routines of the supplied destination -managers. - -Decompression source managers follow a parallel design, but with some -additional frammishes. The source manager struct contains a pointer and count -defining the next byte to read from the work buffer and the number of bytes -remaining: - - const JOCTET * next_input_byte; /* => next byte to read from buffer */ - size_t bytes_in_buffer; /* # of bytes remaining in buffer */ - -The library increments the pointer and decrements the count until the buffer -is emptied. The manager's fill_input_buffer method must reset the pointer and -count. In most applications, the manager must remember the buffer's starting -address and total size in private fields not visible to the library. - -A data source manager provides five methods: - -init_source (j_decompress_ptr cinfo) - Initialize source. This is called by jpeg_read_header() before any - data is actually read. Unlike init_destination(), it may leave - bytes_in_buffer set to 0 (in which case a fill_input_buffer() call - will occur immediately). - -fill_input_buffer (j_decompress_ptr cinfo) - This is called whenever bytes_in_buffer has reached zero and more - data is wanted. In typical applications, it should read fresh data - into the buffer (ignoring the current state of next_input_byte and - 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. bytes_in_buffer MUST be set to a positive value - if TRUE is returned. A FALSE return should only be used when I/O - suspension is desired (this mode is discussed in the next section). - -skip_input_data (j_decompress_ptr cinfo, long num_bytes) - Skip num_bytes worth of data. The buffer pointer and count should - be advanced over num_bytes input bytes, refilling the buffer as - needed. This is used to skip over a potentially large amount of - uninteresting data (such as an APPn marker). In some applications - it may be possible to optimize away the reading of the skipped data, - but it's not clear that being smart is worth much trouble; large - skips are uncommon. bytes_in_buffer may be zero on return. - A zero or negative skip count should be treated as a no-op. - -resync_to_restart (j_decompress_ptr cinfo, int desired) - This routine is called only when the decompressor has failed to find - a restart (RSTn) marker where one is expected. Its mission is to - find a suitable point for resuming decompression. For most - applications, we recommend that you just use the default resync - procedure, jpeg_resync_to_restart(). However, if you are able to back - up in the input data stream, or if you have a-priori knowledge about - the likely location of restart markers, you may be able to do better. - Read the read_restart_marker() and jpeg_resync_to_restart() routines - in jdmarker.c if you think you'd like to implement your own resync - procedure. - -term_source (j_decompress_ptr cinfo) - Terminate source --- called by jpeg_finish_decompress() after all - data has been read. Often a no-op. - -For both fill_input_buffer() and skip_input_data(), there is no such thing -as an EOF return. If the end of the file has been reached, the routine has -a choice of exiting via 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. In pathological cases, the decompressor -may swallow the EOI and again demand data ... just keep feeding it fake EOIs. -jdatasrc.c illustrates the recommended error recovery behavior. - -term_source() is NOT called by jpeg_abort() or jpeg_destroy(). If you want -the source manager to be cleaned up during an abort, you must do it yourself. - -You will also need code to create a jpeg_source_mgr struct, fill in its method -pointers, and insert a pointer to the struct into the "src" field of the JPEG -decompression object. This can be done in-line in your setup code if you -like, but it's probably cleaner to provide a separate routine similar to the -jpeg_stdio_src() or jpeg_mem_src() routines of the supplied source managers. - -For more information, consult the memory and stdio source and destination -managers in jdatasrc.c and jdatadst.c. - - -I/O suspension --------------- - -Some applications need to use the JPEG library as an incremental memory-to- -memory filter: when the compressed data buffer is filled or emptied, they want -control to return to the outer loop, rather than expecting that the buffer can -be emptied or reloaded within the data source/destination manager subroutine. -The library supports this need by providing an "I/O suspension" mode, which we -describe in this section. - -The I/O suspension mode is not a panacea: nothing is guaranteed about the -maximum amount of time spent in any one call to the library, so it will not -eliminate response-time problems in single-threaded applications. If you -need guaranteed response time, we suggest you "bite the bullet" and implement -a real multi-tasking capability. - -To use I/O suspension, cooperation is needed between the calling application -and the data source or destination manager; you will always need a custom -source/destination manager. (Please read the previous section if you haven't -already.) The basic idea is that the empty_output_buffer() or -fill_input_buffer() routine is a no-op, merely returning FALSE to indicate -that it has done nothing. Upon seeing this, the JPEG library suspends -operation and returns to its caller. The surrounding application is -responsible for emptying or refilling the work buffer before calling the -JPEG library again. - -Compression suspension: - -For compression suspension, use an empty_output_buffer() routine that returns -FALSE; typically it will not do anything else. This will cause the -compressor to return to the caller of jpeg_write_scanlines(), with the return -value indicating that not all the supplied scanlines have been accepted. -The application must make more room in the output buffer, adjust the output -buffer pointer/count appropriately, and then call jpeg_write_scanlines() -again, pointing to the first unconsumed scanline. - -When forced to suspend, the compressor will backtrack to a convenient stopping -point (usually the start of the current MCU); it will regenerate some output -data when restarted. Therefore, although empty_output_buffer() is only -called when the buffer is filled, you should NOT write out the entire buffer -after a suspension. Write only the data up to the current position of -next_output_byte/free_in_buffer. The data beyond that point will be -regenerated after resumption. - -Because of the backtracking behavior, a good-size output buffer is essential -for efficiency; you don't want the compressor to suspend often. (In fact, an -overly small buffer could lead to infinite looping, if a single MCU required -more data than would fit in the buffer.) We recommend a buffer of at least -several Kbytes. You may want to insert explicit code to ensure that you don't -call jpeg_write_scanlines() unless there is a reasonable amount of space in -the output buffer; in other words, flush the buffer before trying to compress -more data. - -The compressor does not allow suspension while it is trying to write JPEG -markers at the beginning and end of the file. This means that: - * At the beginning of a compression operation, there must be enough free - space in the output buffer to hold the header markers (typically 600 or - so bytes). The recommended buffer size is bigger than this anyway, so - this is not a problem as long as you start with an empty buffer. However, - this restriction might catch you if you insert large special markers, such - as a JFIF thumbnail image, without flushing the buffer afterwards. - * When you call jpeg_finish_compress(), there must be enough space in the - output buffer to emit any buffered data and the final EOI marker. In the - current implementation, half a dozen bytes should suffice for this, but - for safety's sake we recommend ensuring that at least 100 bytes are free - before calling jpeg_finish_compress(). - -A more significant restriction is that jpeg_finish_compress() cannot suspend. -This means you cannot use suspension with multi-pass operating modes, namely -Huffman code optimization and multiple-scan output. Those modes write the -whole file during jpeg_finish_compress(), which will certainly result in -buffer overrun. (Note that this restriction applies only to compression, -not decompression. The decompressor supports input suspension in all of its -operating modes.) - -Decompression suspension: - -For decompression suspension, use a fill_input_buffer() routine that simply -returns FALSE (except perhaps during error recovery, as discussed below). -This will cause the decompressor to return to its caller with an indication -that suspension has occurred. This can happen at four places: - * jpeg_read_header(): will return JPEG_SUSPENDED. - * jpeg_start_decompress(): will return FALSE, rather than its usual TRUE. - * jpeg_read_scanlines(): will return the number of scanlines already - completed (possibly 0). - * jpeg_finish_decompress(): will return FALSE, rather than its usual TRUE. -The surrounding application must recognize these cases, load more data into -the input buffer, and repeat the call. In the case of jpeg_read_scanlines(), -increment the passed pointers past any scanlines successfully read. - -Just as with compression, the decompressor will typically backtrack to a -convenient restart point before suspending. When fill_input_buffer() is -called, next_input_byte/bytes_in_buffer point to the current restart point, -which is where the decompressor will backtrack to if FALSE is returned. -The data beyond that position must NOT be discarded if you suspend; it needs -to be re-read upon resumption. In most implementations, you'll need to shift -this data down to the start of your work buffer and then load more data after -it. Again, this behavior means that a several-Kbyte work buffer is essential -for decent performance; furthermore, you should load a reasonable amount of -new data before resuming decompression. (If you loaded, say, only one new -byte each time around, you could waste a LOT of cycles.) - -The skip_input_data() source manager routine requires special care in a -suspension scenario. This routine is NOT granted the ability to suspend the -decompressor; it can decrement bytes_in_buffer to zero, but no more. If the -requested skip distance exceeds the amount of data currently in the input -buffer, then skip_input_data() must set bytes_in_buffer to zero and record the -additional skip distance somewhere else. The decompressor will immediately -call fill_input_buffer(), which should return FALSE, which will cause a -suspension return. The surrounding application must then arrange to discard -the recorded number of bytes before it resumes loading the input buffer. -(Yes, this design is rather baroque, but it avoids complexity in the far more -common case where a non-suspending source manager is used.) - -If the input data has been exhausted, we recommend that you emit a warning -and insert dummy EOI markers just as a non-suspending data source manager -would do. This can be handled either in the surrounding application logic or -within fill_input_buffer(); the latter is probably more efficient. If -fill_input_buffer() knows that no more data is available, it can set the -pointer/count to point to a dummy EOI marker and then return TRUE just as -though it had read more data in a non-suspending situation. - -The decompressor does not attempt to suspend within standard JPEG markers; -instead it will backtrack to the start of the marker and reprocess the whole -marker next time. Hence the input buffer must be large enough to hold the -longest standard marker in the file. Standard JPEG markers should normally -not exceed a few hundred bytes each (DHT tables are typically the longest). -We recommend at least a 2K buffer for performance reasons, which is much -larger than any correct marker is likely to be. For robustness against -damaged marker length counts, you may wish to insert a test in your -application for the case that the input buffer is completely full and yet -the decoder has suspended without consuming any data --- otherwise, if this -situation did occur, it would lead to an endless loop. (The library can't -provide this test since it has no idea whether "the buffer is full", or -even whether there is a fixed-size input buffer.) - -The input buffer would need to be 64K to allow for arbitrary COM or APPn -markers, but these are handled specially: they are either saved into allocated -memory, or skipped over by calling skip_input_data(). In the former case, -suspension is handled correctly, and in the latter case, the problem of -buffer overrun is placed on skip_input_data's shoulders, as explained above. -Note that if you provide your own marker handling routine for large markers, -you should consider how to deal with buffer overflow. - -Multiple-buffer management: - -In some applications it is desirable to store the compressed data in a linked -list of buffer areas, so as to avoid data copying. This can be handled by -having empty_output_buffer() or fill_input_buffer() set the pointer and count -to reference the next available buffer; FALSE is returned only if no more -buffers are available. Although seemingly straightforward, there is a -pitfall in this approach: the backtrack that occurs when FALSE is returned -could back up into an earlier buffer. For example, when fill_input_buffer() -is called, the current pointer & count indicate the backtrack restart point. -Since fill_input_buffer() will set the pointer and count to refer to a new -buffer, the restart position must be saved somewhere else. Suppose a second -call to fill_input_buffer() occurs in the same library call, and no -additional input data is available, so fill_input_buffer must return FALSE. -If the JPEG library has not moved the pointer/count forward in the current -buffer, then *the correct restart point is the saved position in the prior -buffer*. Prior buffers may be discarded only after the library establishes -a restart point within a later buffer. Similar remarks apply for output into -a chain of buffers. - -The library will never attempt to backtrack over a skip_input_data() call, -so any skipped data can be permanently discarded. You still have to deal -with the case of skipping not-yet-received data, however. - -It's much simpler to use only a single buffer; when fill_input_buffer() is -called, move any unconsumed data (beyond the current pointer/count) down to -the beginning of this buffer and then load new data into the remaining buffer -space. This approach requires a little more data copying but is far easier -to get right. - - -Progressive JPEG support ------------------------- - -Progressive JPEG rearranges the stored data into a series of scans of -increasing quality. In situations where a JPEG file is transmitted across a -slow communications link, a decoder can generate a low-quality image very -quickly from the first scan, then gradually improve the displayed quality as -more scans are received. The final image after all scans are complete is -identical to that of a regular (sequential) JPEG file of the same quality -setting. Progressive JPEG files are often slightly smaller than equivalent -sequential JPEG files, but the possibility of incremental display is the main -reason for using progressive JPEG. - -The IJG encoder library generates progressive JPEG files when given a -suitable "scan script" defining how to divide the data into scans. -Creation of progressive JPEG files is otherwise transparent to the encoder. -Progressive JPEG files can also be read transparently by the decoder library. -If the decoding application simply uses the library as defined above, it -will receive a final decoded image without any indication that the file was -progressive. Of course, this approach does not allow incremental display. -To perform incremental display, an application needs to use the decoder -library's "buffered-image" mode, in which it receives a decoded image -multiple times. - -Each displayed scan requires about as much work to decode as a full JPEG -image of the same size, so the decoder must be fairly fast in relation to the -data transmission rate in order to make incremental display useful. However, -it is possible to skip displaying the image and simply add the incoming bits -to the decoder's coefficient buffer. This is fast because only Huffman -decoding need be done, not IDCT, upsampling, colorspace conversion, etc. -The IJG decoder library allows the application to switch dynamically between -displaying the image and simply absorbing the incoming bits. A properly -coded application can automatically adapt the number of display passes to -suit the time available as the image is received. Also, a final -higher-quality display cycle can be performed from the buffered data after -the end of the file is reached. - -Progressive compression: - -To create a progressive JPEG file (or a multiple-scan sequential JPEG file), -set the scan_info cinfo field to point to an array of scan descriptors, and -perform compression as usual. Instead of constructing your own scan list, -you can call the jpeg_simple_progression() helper routine to create a -recommended progression sequence; this method should be used by all -applications that don't want to get involved in the nitty-gritty of -progressive scan sequence design. (If you want to provide user control of -scan sequences, you may wish to borrow the scan script reading code found -in rdswitch.c, so that you can read scan script files just like cjpeg's.) -When scan_info is not NULL, the compression library will store DCT'd data -into a buffer array as jpeg_write_scanlines() is called, and will emit all -the requested scans during jpeg_finish_compress(). This implies that -multiple-scan output cannot be created with a suspending data destination -manager, since jpeg_finish_compress() does not support suspension. We -should also note that the compressor currently forces Huffman optimization -mode when creating a progressive JPEG file, because the default Huffman -tables are unsuitable for progressive files. - -Progressive decompression: - -When buffered-image mode is not used, the decoder library will read all of -a multi-scan file during jpeg_start_decompress(), so that it can provide a -final decoded image. (Here "multi-scan" means either progressive or -multi-scan sequential.) This makes multi-scan files transparent to the -decoding application. However, existing applications that used suspending -input with version 5 of the IJG library will need to be modified to check -for a suspension return from jpeg_start_decompress(). - -To perform incremental display, an application must use the library's -buffered-image mode. This is described in the next section. - - -Buffered-image mode -------------------- - -In buffered-image mode, the library stores the partially decoded image in a -coefficient buffer, from which it can be read out as many times as desired. -This mode is typically used for incremental display of progressive JPEG files, -but it can be used with any JPEG file. Each scan of a progressive JPEG file -adds more data (more detail) to the buffered image. The application can -display in lockstep with the source file (one display pass per input scan), -or it can allow input processing to outrun display processing. By making -input and display processing run independently, it is possible for the -application to adapt progressive display to a wide range of data transmission -rates. - -The basic control flow for buffered-image decoding is - - jpeg_create_decompress() - set data source - jpeg_read_header() - set overall decompression parameters - cinfo.buffered_image = TRUE; /* select buffered-image mode */ - jpeg_start_decompress() - for (each output pass) { - adjust output decompression parameters if required - jpeg_start_output() /* start a new output pass */ - for (all scanlines in image) { - jpeg_read_scanlines() - display scanlines - } - jpeg_finish_output() /* terminate output pass */ - } - jpeg_finish_decompress() - jpeg_destroy_decompress() - -This differs from ordinary unbuffered decoding in that there is an additional -level of looping. The application can choose how many output passes to make -and how to display each pass. - -The simplest approach to displaying progressive images is to do one display -pass for each scan appearing in the input file. In this case the outer loop -condition is typically - while (! jpeg_input_complete(&cinfo)) -and the start-output call should read - jpeg_start_output(&cinfo, cinfo.input_scan_number); -The second parameter to jpeg_start_output() indicates which scan of the input -file is to be displayed; the scans are numbered starting at 1 for this -purpose. (You can use a loop counter starting at 1 if you like, but using -the library's input scan counter is easier.) The library automatically reads -data as necessary to complete each requested scan, and jpeg_finish_output() -advances to the next scan or end-of-image marker (hence input_scan_number -will be incremented by the time control arrives back at jpeg_start_output()). -With this technique, data is read from the input file only as needed, and -input and output processing run in lockstep. - -After reading the final scan and reaching the end of the input file, the -buffered image remains available; it can be read additional times by -repeating the jpeg_start_output()/jpeg_read_scanlines()/jpeg_finish_output() -sequence. For example, a useful technique is to use fast one-pass color -quantization for display passes made while the image is arriving, followed by -a final display pass using two-pass quantization for highest quality. This -is done by changing the library parameters before the final output pass. -Changing parameters between passes is discussed in detail below. - -In general the last scan of a progressive file cannot be recognized as such -until after it is read, so a post-input display pass is the best approach if -you want special processing in the final pass. - -When done with the image, be sure to call jpeg_finish_decompress() to release -the buffered image (or just use jpeg_destroy_decompress()). - -If input data arrives faster than it can be displayed, the application can -cause the library to decode input data in advance of what's needed to produce -output. This is done by calling the routine jpeg_consume_input(). -The return value is one of the following: - JPEG_REACHED_SOS: reached an SOS marker (the start of a new scan) - JPEG_REACHED_EOI: reached the EOI marker (end of image) - JPEG_ROW_COMPLETED: completed reading one MCU row of compressed data - JPEG_SCAN_COMPLETED: completed reading last MCU row of current scan - JPEG_SUSPENDED: suspended before completing any of the above -(JPEG_SUSPENDED can occur only if a suspending data source is used.) This -routine can be called at any time after initializing the JPEG object. It -reads some additional data and returns when one of the indicated significant -events occurs. (If called after the EOI marker is reached, it will -immediately return JPEG_REACHED_EOI without attempting to read more data.) - -The library's output processing will automatically call jpeg_consume_input() -whenever the output processing overtakes the input; thus, simple lockstep -display requires no direct calls to jpeg_consume_input(). But by adding -calls to jpeg_consume_input(), you can absorb data in advance of what is -being displayed. This has two benefits: - * You can limit buildup of unprocessed data in your input buffer. - * You can eliminate extra display passes by paying attention to the - state of the library's input processing. - -The first of these benefits only requires interspersing calls to -jpeg_consume_input() with your display operations and any other processing -you may be doing. To avoid wasting cycles due to backtracking, it's best to -call jpeg_consume_input() only after a hundred or so new bytes have arrived. -This is discussed further under "I/O suspension", above. (Note: the JPEG -library currently is not thread-safe. You must not call jpeg_consume_input() -from one thread of control if a different library routine is working on the -same JPEG object in another thread.) - -When input arrives fast enough that more than one new scan is available -before you start a new output pass, you may as well skip the output pass -corresponding to the completed scan. This occurs for free if you pass -cinfo.input_scan_number as the target scan number to jpeg_start_output(). -The input_scan_number field is simply the index of the scan currently being -consumed by the input processor. You can ensure that this is up-to-date by -emptying the input buffer just before calling jpeg_start_output(): call -jpeg_consume_input() repeatedly until it returns JPEG_SUSPENDED or -JPEG_REACHED_EOI. - -The target scan number passed to jpeg_start_output() is saved in the -cinfo.output_scan_number field. The library's output processing calls -jpeg_consume_input() whenever the current input scan number and row within -that scan is less than or equal to the current output scan number and row. -Thus, input processing can "get ahead" of the output processing but is not -allowed to "fall behind". You can achieve several different effects by -manipulating this interlock rule. For example, if you pass a target scan -number greater than the current input scan number, the output processor will -wait until that scan starts to arrive before producing any output. (To avoid -an infinite loop, the target scan number is automatically reset to the last -scan number when the end of image is reached. Thus, if you specify a large -target scan number, the library will just absorb the entire input file and -then perform an output pass. This is effectively the same as what -jpeg_start_decompress() does when you don't select buffered-image mode.) -When you pass a target scan number equal to the current input scan number, -the image is displayed no faster than the current input scan arrives. The -final possibility is to pass a target scan number less than the current input -scan number; this disables the input/output interlock and causes the output -processor to simply display whatever it finds in the image buffer, without -waiting for input. (However, the library will not accept a target scan -number less than one, so you can't avoid waiting for the first scan.) - -When data is arriving faster than the output display processing can advance -through the image, jpeg_consume_input() will store data into the buffered -image beyond the point at which the output processing is reading data out -again. If the input arrives fast enough, it may "wrap around" the buffer to -the point where the input is more than one whole scan ahead of the output. -If the output processing simply proceeds through its display pass without -paying attention to the input, the effect seen on-screen is that the lower -part of the image is one or more scans better in quality than the upper part. -Then, when the next output scan is started, you have a choice of what target -scan number to use. The recommended choice is to use the current input scan -number at that time, which implies that you've skipped the output scans -corresponding to the input scans that were completed while you processed the -previous output scan. In this way, the decoder automatically adapts its -speed to the arriving data, by skipping output scans as necessary to keep up -with the arriving data. - -When using this strategy, you'll want to be sure that you perform a final -output pass after receiving all the data; otherwise your last display may not -be full quality across the whole screen. So the right outer loop logic is -something like this: - do { - absorb any waiting input by calling jpeg_consume_input() - final_pass = jpeg_input_complete(&cinfo); - adjust output decompression parameters if required - jpeg_start_output(&cinfo, cinfo.input_scan_number); - ... - jpeg_finish_output() - } while (! final_pass); -rather than quitting as soon as jpeg_input_complete() returns TRUE. This -arrangement makes it simple to use higher-quality decoding parameters -for the final pass. But if you don't want to use special parameters for -the final pass, the right loop logic is like this: - for (;;) { - absorb any waiting input by calling jpeg_consume_input() - jpeg_start_output(&cinfo, cinfo.input_scan_number); - ... - jpeg_finish_output() - if (jpeg_input_complete(&cinfo) && - cinfo.input_scan_number == cinfo.output_scan_number) - break; - } -In this case you don't need to know in advance whether an output pass is to -be the last one, so it's not necessary to have reached EOF before starting -the final output pass; rather, what you want to test is whether the output -pass was performed in sync with the final input scan. This form of the loop -will avoid an extra output pass whenever the decoder is able (or nearly able) -to keep up with the incoming data. - -When the data transmission speed is high, you might begin a display pass, -then find that much or all of the file has arrived before you can complete -the pass. (You can detect this by noting the JPEG_REACHED_EOI return code -from jpeg_consume_input(), or equivalently by testing jpeg_input_complete().) -In this situation you may wish to abort the current display pass and start a -new one using the newly arrived information. To do so, just call -jpeg_finish_output() and then start a new pass with jpeg_start_output(). - -A variant strategy is to abort and restart display if more than one complete -scan arrives during an output pass; this can be detected by noting -JPEG_REACHED_SOS returns and/or examining cinfo.input_scan_number. This -idea should be employed with caution, however, since the display process -might never get to the bottom of the image before being aborted, resulting -in the lower part of the screen being several passes worse than the upper. -In most cases it's probably best to abort an output pass only if the whole -file has arrived and you want to begin the final output pass immediately. - -When receiving data across a communication link, we recommend always using -the current input scan number for the output target scan number; if a -higher-quality final pass is to be done, it should be started (aborting any -incomplete output pass) as soon as the end of file is received. However, -many other strategies are possible. For example, the application can examine -the parameters of the current input scan and decide whether to display it or -not. If the scan contains only chroma data, one might choose not to use it -as the target scan, expecting that the scan will be small and will arrive -quickly. To skip to the next scan, call jpeg_consume_input() until it -returns JPEG_REACHED_SOS or JPEG_REACHED_EOI. Or just use the next higher -number as the target scan for jpeg_start_output(); but that method doesn't -let you inspect the next scan's parameters before deciding to display it. - - -In buffered-image mode, jpeg_start_decompress() never performs input and -thus never suspends. An application that uses input suspension with -buffered-image mode must be prepared for suspension returns from these -routines: -* jpeg_start_output() performs input only if you request 2-pass quantization - and the target scan isn't fully read yet. (This is discussed below.) -* jpeg_read_scanlines(), as always, returns the number of scanlines that it - was able to produce before suspending. -* jpeg_finish_output() will read any markers following the target scan, - up to the end of the file or the SOS marker that begins another scan. - (But it reads no input if jpeg_consume_input() has already reached the - end of the file or a SOS marker beyond the target output scan.) -* jpeg_finish_decompress() will read until the end of file, and thus can - suspend if the end hasn't already been reached (as can be tested by - calling jpeg_input_complete()). -jpeg_start_output(), jpeg_finish_output(), and jpeg_finish_decompress() -all return TRUE if they completed their tasks, FALSE if they had to suspend. -In the event of a FALSE return, the application must load more input data -and repeat the call. Applications that use non-suspending data sources need -not check the return values of these three routines. - - -It is possible to change decoding parameters between output passes in the -buffered-image mode. The decoder library currently supports only very -limited changes of parameters. ONLY THE FOLLOWING parameter changes are -allowed after jpeg_start_decompress() is called: -* dct_method can be changed before each call to jpeg_start_output(). - For example, one could use a fast DCT method for early scans, changing - to a higher quality method for the final scan. -* dither_mode can be changed before each call to jpeg_start_output(); - of course this has no impact if not using color quantization. Typically - one would use ordered dither for initial passes, then switch to - Floyd-Steinberg dither for the final pass. Caution: changing dither mode - can cause more memory to be allocated by the library. Although the amount - of memory involved is not large (a scanline or so), it may cause the - initial max_memory_to_use specification to be exceeded, which in the worst - case would result in an out-of-memory failure. -* do_block_smoothing can be changed before each call to jpeg_start_output(). - This setting is relevant only when decoding a progressive JPEG image. - During the first DC-only scan, block smoothing provides a very "fuzzy" look - instead of the very "blocky" look seen without it; which is better seems a - matter of personal taste. But block smoothing is nearly always a win - during later stages, especially when decoding a successive-approximation - image: smoothing helps to hide the slight blockiness that otherwise shows - up on smooth gradients until the lowest coefficient bits are sent. -* Color quantization mode can be changed under the rules described below. - You *cannot* change between full-color and quantized output (because that - would alter the required I/O buffer sizes), but you can change which - quantization method is used. - -When generating color-quantized output, changing quantization method is a -very useful way of switching between high-speed and high-quality display. -The library allows you to change among its three quantization methods: -1. Single-pass quantization to a fixed color cube. - Selected by cinfo.two_pass_quantize = FALSE and cinfo.colormap = NULL. -2. Single-pass quantization to an application-supplied colormap. - Selected by setting cinfo.colormap to point to the colormap (the value of - two_pass_quantize is ignored); also set cinfo.actual_number_of_colors. -3. Two-pass quantization to a colormap chosen specifically for the image. - Selected by cinfo.two_pass_quantize = TRUE and cinfo.colormap = NULL. - (This is the default setting selected by jpeg_read_header, but it is - probably NOT what you want for the first pass of progressive display!) -These methods offer successively better quality and lesser speed. However, -only the first method is available for quantizing in non-RGB color spaces. - -IMPORTANT: because the different quantizer methods have very different -working-storage requirements, the library requires you to indicate which -one(s) you intend to use before you call jpeg_start_decompress(). (If we did -not require this, the max_memory_to_use setting would be a complete fiction.) -You do this by setting one or more of these three cinfo fields to TRUE: - enable_1pass_quant Fixed color cube colormap - enable_external_quant Externally-supplied colormap - enable_2pass_quant Two-pass custom colormap -All three are initialized FALSE by jpeg_read_header(). But -jpeg_start_decompress() automatically sets TRUE the one selected by the -current two_pass_quantize and colormap settings, so you only need to set the -enable flags for any other quantization methods you plan to change to later. - -After setting the enable flags correctly at jpeg_start_decompress() time, you -can change to any enabled quantization method by setting two_pass_quantize -and colormap properly just before calling jpeg_start_output(). The following -special rules apply: -1. You must explicitly set cinfo.colormap to NULL when switching to 1-pass - or 2-pass mode from a different mode, or when you want the 2-pass - quantizer to be re-run to generate a new colormap. -2. To switch to an external colormap, or to change to a different external - colormap than was used on the prior pass, you must call - jpeg_new_colormap() after setting cinfo.colormap. -NOTE: if you want to use the same colormap as was used in the prior pass, -you should not do either of these things. This will save some nontrivial -switchover costs. -(These requirements exist because cinfo.colormap will always be non-NULL -after completing a prior output pass, since both the 1-pass and 2-pass -quantizers set it to point to their output colormaps. Thus you have to -do one of these two things to notify the library that something has changed. -Yup, it's a bit klugy, but it's necessary to do it this way for backwards -compatibility.) - -Note that in buffered-image mode, the library generates any requested colormap -during jpeg_start_output(), not during jpeg_start_decompress(). - -When using two-pass quantization, jpeg_start_output() makes a pass over the -buffered image to determine the optimum color map; it therefore may take a -significant amount of time, whereas ordinarily it does little work. The -progress monitor hook is called during this pass, if defined. It is also -important to realize that if the specified target scan number is greater than -or equal to the current input scan number, jpeg_start_output() will attempt -to consume input as it makes this pass. If you use a suspending data source, -you need to check for a FALSE return from jpeg_start_output() under these -conditions. The combination of 2-pass quantization and a not-yet-fully-read -target scan is the only case in which jpeg_start_output() will consume input. - - -Application authors who support buffered-image mode may be tempted to use it -for all JPEG images, even single-scan ones. This will work, but it is -inefficient: there is no need to create an image-sized coefficient buffer for -single-scan images. Requesting buffered-image mode for such an image wastes -memory. Worse, it can cost time on large images, since the buffered data has -to be swapped out or written to a temporary file. If you are concerned about -maximum performance on baseline JPEG files, you should use buffered-image -mode only when the incoming file actually has multiple scans. This can be -tested by calling jpeg_has_multiple_scans(), which will return a correct -result at any time after jpeg_read_header() completes. - -It is also worth noting that when you use jpeg_consume_input() to let input -processing get ahead of output processing, the resulting pattern of access to -the coefficient buffer is quite nonsequential. It's best to use the memory -manager jmemnobs.c if you can (ie, if you have enough real or virtual main -memory). If not, at least make sure that max_memory_to_use is set as high as -possible. If the JPEG memory manager has to use a temporary file, you will -probably see a lot of disk traffic and poor performance. (This could be -improved with additional work on the memory manager, but we haven't gotten -around to it yet.) - -In some applications it may be convenient to use jpeg_consume_input() for all -input processing, including reading the initial markers; that is, you may -wish to call jpeg_consume_input() instead of jpeg_read_header() during -startup. This works, but note that you must check for JPEG_REACHED_SOS and -JPEG_REACHED_EOI return codes as the equivalent of jpeg_read_header's codes. -Once the first SOS marker has been reached, you must call -jpeg_start_decompress() before jpeg_consume_input() will consume more input; -it'll just keep returning JPEG_REACHED_SOS until you do. If you read a -tables-only file this way, jpeg_consume_input() will return JPEG_REACHED_EOI -without ever returning JPEG_REACHED_SOS; be sure to check for this case. -If this happens, the decompressor will not read any more input until you call -jpeg_abort() to reset it. It is OK to call jpeg_consume_input() even when not -using buffered-image mode, but in that case it's basically a no-op after the -initial markers have been read: it will just return JPEG_SUSPENDED. - - -Abbreviated datastreams and multiple images -------------------------------------------- - -A JPEG compression or decompression object can be reused to process multiple -images. This saves a small amount of time per image by eliminating the -"create" and "destroy" operations, but that isn't the real purpose of the -feature. Rather, reuse of an object provides support for abbreviated JPEG -datastreams. Object reuse can also simplify processing a series of images in -a single input or output file. This section explains these features. - -A JPEG file normally contains several hundred bytes worth of quantization -and Huffman tables. In a situation where many images will be stored or -transmitted with identical tables, this may represent an annoying overhead. -The JPEG standard therefore permits tables to be omitted. The standard -defines three classes of JPEG datastreams: - * "Interchange" datastreams contain an image and all tables needed to decode - the image. These are the usual kind of JPEG file. - * "Abbreviated image" datastreams contain an image, but are missing some or - all of the tables needed to decode that image. - * "Abbreviated table specification" (henceforth "tables-only") datastreams - contain only table specifications. -To decode an abbreviated image, it is necessary to load the missing table(s) -into the decoder beforehand. This can be accomplished by reading a separate -tables-only file. A variant scheme uses a series of images in which the first -image is an interchange (complete) datastream, while subsequent ones are -abbreviated and rely on the tables loaded by the first image. It is assumed -that once the decoder has read a table, it will remember that table until a -new definition for the same table number is encountered. - -It is the application designer's responsibility to figure out how to associate -the correct tables with an abbreviated image. While abbreviated datastreams -can be useful in a closed environment, their use is strongly discouraged in -any situation where data exchange with other applications might be needed. -Caveat designer. - -The JPEG library provides support for reading and writing any combination of -tables-only datastreams and abbreviated images. In both compression and -decompression objects, a quantization or Huffman table will be retained for -the lifetime of the object, unless it is overwritten by a new table definition. - - -To create abbreviated image datastreams, it is only necessary to tell the -compressor not to emit some or all of the tables it is using. Each -quantization and Huffman table struct contains a boolean field "sent_table", -which normally is initialized to FALSE. For each table used by the image, the -header-writing process emits the table and sets sent_table = TRUE unless it is -already TRUE. (In normal usage, this prevents outputting the same table -definition multiple times, as would otherwise occur because the chroma -components typically share tables.) Thus, setting this field to TRUE before -calling jpeg_start_compress() will prevent the table from being written at -all. - -If you want to create a "pure" abbreviated image file containing no tables, -just call "jpeg_suppress_tables(&cinfo, TRUE)" after constructing all the -tables. If you want to emit some but not all tables, you'll need to set the -individual sent_table fields directly. - -To create an abbreviated image, you must also call jpeg_start_compress() -with a second parameter of FALSE, not TRUE. Otherwise jpeg_start_compress() -will force all the sent_table fields to FALSE. (This is a safety feature to -prevent abbreviated images from being created accidentally.) - -To create a tables-only file, perform the same parameter setup that you -normally would, but instead of calling jpeg_start_compress() and so on, call -jpeg_write_tables(&cinfo). This will write an abbreviated datastream -containing only SOI, DQT and/or DHT markers, and EOI. All the quantization -and Huffman tables that are currently defined in the compression object will -be emitted unless their sent_tables flag is already TRUE, and then all the -sent_tables flags will be set TRUE. - -A sure-fire way to create matching tables-only and abbreviated image files -is to proceed as follows: - - create JPEG compression object - set JPEG parameters - set destination to tables-only file - jpeg_write_tables(&cinfo); - set destination to image file - jpeg_start_compress(&cinfo, FALSE); - write data... - jpeg_finish_compress(&cinfo); - -Since the JPEG parameters are not altered between writing the table file and -the abbreviated image file, the same tables are sure to be used. Of course, -you can repeat the jpeg_start_compress() ... jpeg_finish_compress() sequence -many times to produce many abbreviated image files matching the table file. - -You cannot suppress output of the computed Huffman tables when Huffman -optimization is selected. (If you could, there'd be no way to decode the -image...) Generally, you don't want to set optimize_coding = TRUE when -you are trying to produce abbreviated files. - -In some cases you might want to compress an image using tables which are -not stored in the application, but are defined in an interchange or -tables-only file readable by the application. This can be done by setting up -a JPEG decompression object to read the specification file, then copying the -tables into your compression object. See jpeg_copy_critical_parameters() -for an example of copying quantization tables. - - -To read abbreviated image files, you simply need to load the proper tables -into the decompression object before trying to read the abbreviated image. -If the proper tables are stored in the application program, you can just -allocate the table structs and fill in their contents directly. For example, -to load a fixed quantization table into table slot "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]; /* quant_ptr is JQUANT_TBL* */ - for (i = 0; i < 64; i++) { - /* Qtable[] is desired quantization table, in natural array order */ - quant_ptr->quantval[i] = Qtable[i]; - } - -Code to load a fixed Huffman table is typically (for AC table "n"): - - if (cinfo.ac_huff_tbl_ptrs[n] == NULL) - cinfo.ac_huff_tbl_ptrs[n] = jpeg_alloc_huff_table((j_common_ptr) &cinfo); - huff_ptr = cinfo.ac_huff_tbl_ptrs[n]; /* huff_ptr is JHUFF_TBL* */ - for (i = 1; i <= 16; i++) { - /* counts[i] is number of Huffman codes of length i bits, i=1..16 */ - huff_ptr->bits[i] = counts[i]; - } - for (i = 0; i < 256; i++) { - /* symbols[] is the list of Huffman symbols, in code-length order */ - huff_ptr->huffval[i] = symbols[i]; - } - -(Note that trying to set cinfo.quant_tbl_ptrs[n] to point directly at a -constant JQUANT_TBL object is not safe. If the incoming file happened to -contain a quantization table definition, your master table would get -overwritten! Instead allocate a working table copy and copy the master table -into it, as illustrated above. Ditto for Huffman tables, of course.) - -You might want to read the tables from a tables-only file, rather than -hard-wiring them into your application. The jpeg_read_header() call is -sufficient to read a tables-only file. You must pass a second parameter of -FALSE to indicate that you do not require an image to be present. Thus, the -typical scenario is - - create JPEG decompression object - set source to tables-only file - jpeg_read_header(&cinfo, FALSE); - set source to abbreviated image file - jpeg_read_header(&cinfo, TRUE); - set decompression parameters - jpeg_start_decompress(&cinfo); - read data... - jpeg_finish_decompress(&cinfo); - -In some cases, you may want to read a file without knowing whether it contains -an image or just tables. In that case, pass FALSE and check the return value -from jpeg_read_header(): it will be JPEG_HEADER_OK if an image was found, -JPEG_HEADER_TABLES_ONLY if only tables were found. (A third return value, -JPEG_SUSPENDED, is possible when using a suspending data source manager.) -Note that jpeg_read_header() will not complain if you read an abbreviated -image for which you haven't loaded the missing tables; the missing-table check -occurs later, in jpeg_start_decompress(). - - -It is possible to read a series of images from a single source file by -repeating the jpeg_read_header() ... jpeg_finish_decompress() sequence, -without releasing/recreating the JPEG object or the data source module. -(If you did reinitialize, any partial bufferload left in the data source -buffer at the end of one image would be discarded, causing you to lose the -start of the next image.) When you use this method, stored tables are -automatically carried forward, so some of the images can be abbreviated images -that depend on tables from earlier images. - -If you intend to write a series of images into a single destination file, -you might want to make a specialized data destination module that doesn't -flush the output buffer at term_destination() time. This would speed things -up by some trifling amount. Of course, you'd need to remember to flush the -buffer after the last image. You can make the later images be abbreviated -ones by passing FALSE to jpeg_start_compress(). - - -Special markers ---------------- - -Some applications may need to insert or extract special data in the JPEG -datastream. The JPEG standard provides marker types "COM" (comment) and -"APP0" through "APP15" (application) to hold application-specific data. -Unfortunately, the use of these markers is not specified by the standard. -COM markers are fairly widely used to hold user-supplied text. The JFIF file -format spec uses APP0 markers with specified initial strings to hold certain -data. Adobe applications use APP14 markers beginning with the string "Adobe" -for miscellaneous data. Other APPn markers are rarely seen, but might -contain almost anything. - -If you wish to store user-supplied text, we recommend you use COM markers -and place readable 7-bit ASCII text in them. Newline conventions are not -standardized --- expect to find LF (Unix style), CR/LF (DOS style), or CR -(Mac style). A robust COM reader should be able to cope with random binary -garbage, including nulls, since some applications generate COM markers -containing non-ASCII junk. (But yours should not be one of them.) - -For program-supplied data, use an APPn marker, and be sure to begin it with an -identifying string so that you can tell whether the marker is actually yours. -It's probably best to avoid using APP0 or APP14 for any private markers. -(NOTE: the upcoming SPIFF standard will use APP8 markers; we recommend you -not use APP8 markers for any private purposes, either.) - -Keep in mind that at most 65533 bytes can be put into one marker, but you -can have as many markers as you like. - -By default, the IJG compression library will write a JFIF APP0 marker if the -selected JPEG colorspace is grayscale or YCbCr, or an Adobe APP14 marker if -the selected colorspace is RGB, CMYK, or YCCK. You can disable this, but -we don't recommend it. The decompression library will recognize JFIF and -Adobe markers and will set the JPEG colorspace properly when one is found. - - -You can write special markers immediately following the datastream header by -calling jpeg_write_marker() after jpeg_start_compress() and before the first -call to jpeg_write_scanlines(). When you do this, the markers appear after -the SOI and the JFIF APP0 and Adobe APP14 markers (if written), but before -all else. Specify the marker type parameter as "JPEG_COM" for COM or -"JPEG_APP0 + n" for APPn. (Actually, jpeg_write_marker will let you write -any marker type, but we don't recommend writing any other kinds of marker.) -For example, to write a user comment string pointed to by comment_text: - jpeg_write_marker(cinfo, JPEG_COM, comment_text, strlen(comment_text)); - -If it's not convenient to store all the marker data in memory at once, -you can instead call jpeg_write_m_header() followed by multiple calls to -jpeg_write_m_byte(). If you do it this way, it's your responsibility to -call jpeg_write_m_byte() exactly the number of times given in the length -parameter to jpeg_write_m_header(). (This method lets you empty the -output buffer partway through a marker, which might be important when -using a suspending data destination module. In any case, if you are using -a suspending destination, you should flush its buffer after inserting -any special markers. See "I/O suspension".) - -Or, if you prefer to synthesize the marker byte sequence yourself, -you can just cram it straight into the data destination module. - -If you are writing JFIF 1.02 extension markers (thumbnail images), don't -forget to set cinfo.JFIF_minor_version = 2 so that the encoder will write the -correct JFIF version number in the JFIF header marker. The library's default -is to write version 1.01, but that's wrong if you insert any 1.02 extension -markers. (We could probably get away with just defaulting to 1.02, but there -used to be broken decoders that would complain about unknown minor version -numbers. To reduce compatibility risks it's safest not to write 1.02 unless -you are actually using 1.02 extensions.) - - -When reading, two methods of handling special markers are available: -1. You can ask the library to save the contents of COM and/or APPn markers -into memory, and then examine them at your leisure afterwards. -2. You can supply your own routine to process COM and/or APPn markers -on-the-fly as they are read. -The first method is simpler to use, especially if you are using a suspending -data source; writing a marker processor that copes with input suspension is -not easy (consider what happens if the marker is longer than your available -input buffer). However, the second method conserves memory since the marker -data need not be kept around after it's been processed. - -For either method, you'd normally set up marker handling after creating a -decompression object and before calling jpeg_read_header(), because the -markers of interest will typically be near the head of the file and so will -be scanned by jpeg_read_header. Once you've established a marker handling -method, it will be used for the life of that decompression object -(potentially many datastreams), unless you change it. Marker handling is -determined separately for COM markers and for each APPn marker code. - - -To save the contents of special markers in memory, call - jpeg_save_markers(cinfo, marker_code, length_limit) -where marker_code is the marker type to save, JPEG_COM or JPEG_APP0+n. -(To arrange to save all the special marker types, you need to call this -routine 17 times, for COM and APP0-APP15.) If the incoming marker is longer -than length_limit data bytes, only length_limit bytes will be saved; this -parameter allows you to avoid chewing up memory when you only need to see the -first few bytes of a potentially large marker. If you want to save all the -data, set length_limit to 0xFFFF; that is enough since marker lengths are only -16 bits. As a special case, setting length_limit to 0 prevents that marker -type from being saved at all. (That is the default behavior, in fact.) - -After jpeg_read_header() completes, you can examine the special markers by -following the cinfo->marker_list pointer chain. All the special markers in -the file appear in this list, in order of their occurrence in the file (but -omitting any markers of types you didn't ask for). Both the original data -length and the saved data length are recorded for each list entry; the latter -will not exceed length_limit for the particular marker type. Note that these -lengths exclude the marker length word, whereas the stored representation -within the JPEG file includes it. (Hence the maximum data length is really -only 65533.) - -It is possible that additional special markers appear in the file beyond the -SOS marker at which jpeg_read_header stops; if so, the marker list will be -extended during reading of the rest of the file. This is not expected to be -common, however. If you are short on memory you may want to reset the length -limit to zero for all marker types after finishing jpeg_read_header, to -ensure that the max_memory_to_use setting cannot be exceeded due to addition -of later markers. - -The marker list remains stored until you call jpeg_finish_decompress or -jpeg_abort, at which point the memory is freed and the list is set to empty. -(jpeg_destroy also releases the storage, of course.) - -Note that the library is internally interested in APP0 and APP14 markers; -if you try to set a small nonzero length limit on these types, the library -will silently force the length up to the minimum it wants. (But you can set -a zero length limit to prevent them from being saved at all.) Also, in a -16-bit environment, the maximum length limit may be constrained to less than -65533 by malloc() limitations. It is therefore best not to assume that the -effective length limit is exactly what you set it to be. - - -If you want to supply your own marker-reading routine, you do it by calling -jpeg_set_marker_processor(). A marker processor routine must have the -signature - boolean jpeg_marker_parser_method (j_decompress_ptr cinfo) -Although the marker code is not explicitly passed, the routine can find it -in cinfo->unread_marker. At the time of call, the marker proper has been -read from the data source module. The processor routine is responsible for -reading the marker length word and the remaining parameter bytes, if any. -Return TRUE to indicate success. (FALSE should be returned only if you are -using a suspending data source and it tells you to suspend. See the standard -marker processors in jdmarker.c for appropriate coding methods if you need to -use a suspending data source.) - -If you override the default APP0 or APP14 processors, it is up to you to -recognize JFIF and Adobe markers if you want colorspace recognition to occur -properly. We recommend copying and extending the default processors if you -want to do that. (A better idea is to save these marker types for later -examination by calling jpeg_save_markers(); that method doesn't interfere -with the library's own processing of these markers.) - -jpeg_set_marker_processor() and jpeg_save_markers() are mutually exclusive ---- if you call one it overrides any previous call to the other, for the -particular marker type specified. - -A simple example of an external COM processor can be found in djpeg.c. -Also, see jpegtran.c for an example of using jpeg_save_markers. - - -Raw (downsampled) image data ----------------------------- - -Some applications need to supply already-downsampled image data to the JPEG -compressor, or to receive raw downsampled data from the decompressor. The -library supports this requirement by allowing the application to write or -read raw data, bypassing the normal preprocessing or postprocessing steps. -The interface is different from the standard one and is somewhat harder to -use. If your interest is merely in bypassing color conversion, we recommend -that you use the standard interface and simply set jpeg_color_space = -in_color_space (or jpeg_color_space = out_color_space for decompression). -The mechanism described in this section is necessary only to supply or -receive downsampled image data, in which not all components have the same -dimensions. - - -To compress raw data, you must supply the data in the colorspace to be used -in the JPEG file (please read the earlier section on Special color spaces) -and downsampled to the sampling factors specified in the JPEG parameters. -You must supply the data in the format used internally by the JPEG library, -namely a JSAMPIMAGE array. This is an array of pointers to two-dimensional -arrays, each of type JSAMPARRAY. Each 2-D array holds the values for one -color component. This structure is necessary since the components are of -different sizes. If the image dimensions are not a multiple of the MCU size, -you must also pad the data correctly (usually, this is done by replicating -the last column and/or row). The data must be padded to a multiple of a DCT -block in each component: that is, each downsampled row must contain a -multiple of block_size valid samples, and there must be a multiple of -block_size sample rows for each component. (For applications such as -conversion of digital TV images, the standard image size is usually a -multiple of the DCT block size, so that no padding need actually be done.) - -The procedure for compression of raw data is basically the same as normal -compression, except that you call jpeg_write_raw_data() in place of -jpeg_write_scanlines(). Before calling jpeg_start_compress(), you must do -the following: - * Set cinfo->raw_data_in to TRUE. (It is set FALSE by jpeg_set_defaults().) - This notifies the library that you will be supplying raw data. - Furthermore, set cinfo->do_fancy_downsampling to FALSE if you want to use - real downsampled data. (It is set TRUE by jpeg_set_defaults().) - * Ensure jpeg_color_space is correct --- an explicit jpeg_set_colorspace() - call is a good idea. Note that since color conversion is bypassed, - in_color_space is ignored, except that jpeg_set_defaults() uses it to - choose the default jpeg_color_space setting. - * Ensure the sampling factors, cinfo->comp_info[i].h_samp_factor and - cinfo->comp_info[i].v_samp_factor, are correct. Since these indicate the - dimensions of the data you are supplying, it's wise to set them - explicitly, rather than assuming the library's defaults are what you want. - -To pass raw data to the library, call jpeg_write_raw_data() in place of -jpeg_write_scanlines(). The two routines work similarly except that -jpeg_write_raw_data takes a JSAMPIMAGE data array rather than JSAMPARRAY. -The scanlines count passed to and returned from jpeg_write_raw_data is -measured in terms of the component with the largest v_samp_factor. - -jpeg_write_raw_data() processes one MCU row per call, which is to say -v_samp_factor*block_size sample rows of each component. The passed num_lines -value must be at least max_v_samp_factor*block_size, and the return value -will be exactly that amount (or possibly some multiple of that amount, in -future library versions). This is true even on the last call at the bottom -of the image; don't forget to pad your data as necessary. - -The required dimensions of the supplied data can be computed for each -component as - cinfo->comp_info[i].width_in_blocks*block_size samples per row - cinfo->comp_info[i].height_in_blocks*block_size rows in image -after jpeg_start_compress() has initialized those fields. If the valid data -is smaller than this, it must be padded appropriately. For some sampling -factors and image sizes, additional dummy DCT blocks are inserted to make -the image a multiple of the MCU dimensions. The library creates such dummy -blocks itself; it does not read them from your supplied data. Therefore you -need never pad by more than block_size samples. An example may help here. -Assume 2h2v downsampling of YCbCr data, that is - cinfo->comp_info[0].h_samp_factor = 2 for Y - cinfo->comp_info[0].v_samp_factor = 2 - cinfo->comp_info[1].h_samp_factor = 1 for Cb - cinfo->comp_info[1].v_samp_factor = 1 - cinfo->comp_info[2].h_samp_factor = 1 for Cr - cinfo->comp_info[2].v_samp_factor = 1 -and suppose that the nominal image dimensions (cinfo->image_width and -cinfo->image_height) are 101x101 pixels. Then jpeg_start_compress() will -compute downsampled_width = 101 and width_in_blocks = 13 for Y, -downsampled_width = 51 and width_in_blocks = 7 for Cb and Cr (and the same -for the height fields). You must pad the Y data to at least 13*8 = 104 -columns and rows, the Cb/Cr data to at least 7*8 = 56 columns and rows. The -MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16 -scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual -sample rows of Y and 8 each of Cb and Cr. A total of 7 MCU rows are needed, -so you must pass a total of 7*16 = 112 "scanlines". The last DCT block row -of Y data is dummy, so it doesn't matter what you pass for it in the data -arrays, but the scanlines count must total up to 112 so that all of the Cb -and Cr data gets passed. - -Output suspension is supported with raw-data compression: if the data -destination module suspends, jpeg_write_raw_data() will return 0. -In this case the same data rows must be passed again on the next call. - - -Decompression with raw data output implies bypassing all postprocessing. -You must deal with the color space and sampling factors present in the -incoming file. If your application only handles, say, 2h1v YCbCr data, -you must check for and fail on other color spaces or other sampling factors. -The library will not convert to a different color space for you. - -To obtain raw data output, set cinfo->raw_data_out = TRUE before -jpeg_start_decompress() (it is set FALSE by jpeg_read_header()). Be sure to -verify that the color space and sampling factors are ones you can handle. -Furthermore, set cinfo->do_fancy_upsampling = FALSE if you want to get real -downsampled data (it is set TRUE by jpeg_read_header()). -Then call jpeg_read_raw_data() in place of jpeg_read_scanlines(). The -decompression process is otherwise the same as usual. - -jpeg_read_raw_data() returns one MCU row per call, and thus you must pass a -buffer of at least max_v_samp_factor*block_size scanlines (scanline counting -is the same as for raw-data compression). The buffer you pass must be large -enough to hold the actual data plus padding to DCT-block boundaries. As with -compression, any entirely dummy DCT blocks are not processed so you need not -allocate space for them, but the total scanline count includes them. The -above example of computing buffer dimensions for raw-data compression is -equally valid for decompression. - -Input suspension is supported with raw-data decompression: if the data source -module suspends, jpeg_read_raw_data() will return 0. You can also use -buffered-image mode to read raw data in multiple passes. - - -Really raw data: DCT coefficients ---------------------------------- - -It is possible to read or write the contents of a JPEG file as raw DCT -coefficients. This facility is mainly intended for use in lossless -transcoding between different JPEG file formats. Other possible applications -include lossless cropping of a JPEG image, lossless reassembly of a -multi-strip or multi-tile TIFF/JPEG file into a single JPEG datastream, etc. - -To read the contents of a JPEG file as DCT coefficients, open the file and do -jpeg_read_header() as usual. But instead of calling jpeg_start_decompress() -and jpeg_read_scanlines(), call jpeg_read_coefficients(). This will read the -entire image into a set of virtual coefficient-block arrays, one array per -component. The return value is a pointer to an array of virtual-array -descriptors. Each virtual array can be accessed directly using the JPEG -memory manager's access_virt_barray method (see Memory management, below, -and also read structure.txt's discussion of virtual array handling). Or, -for simple transcoding to a different JPEG file format, the array list can -just be handed directly to jpeg_write_coefficients(). - -Each block in the block arrays contains quantized coefficient values in -normal array order (not JPEG zigzag order). The block arrays contain only -DCT blocks containing real data; any entirely-dummy blocks added to fill out -interleaved MCUs at the right or bottom edges of the image are discarded -during reading and are not stored in the block arrays. (The size of each -block array can be determined from the width_in_blocks and height_in_blocks -fields of the component's comp_info entry.) This is also the data format -expected by jpeg_write_coefficients(). - -When you are done using the virtual arrays, call jpeg_finish_decompress() -to release the array storage and return the decompression object to an idle -state; or just call jpeg_destroy() if you don't need to reuse the object. - -If you use a suspending data source, jpeg_read_coefficients() will return -NULL if it is forced to suspend; a non-NULL return value indicates successful -completion. You need not test for a NULL return value when using a -non-suspending data source. - -It is also possible to call jpeg_read_coefficients() to obtain access to the -decoder's coefficient arrays during a normal decode cycle in buffered-image -mode. This frammish might be useful for progressively displaying an incoming -image and then re-encoding it without loss. To do this, decode in buffered- -image mode as discussed previously, then call jpeg_read_coefficients() after -the last jpeg_finish_output() call. The arrays will be available for your use -until you call jpeg_finish_decompress(). - - -To write the contents of a JPEG file as DCT coefficients, you must provide -the DCT coefficients stored in virtual block arrays. You can either pass -block arrays read from an input JPEG file by jpeg_read_coefficients(), or -allocate virtual arrays from the JPEG compression object and fill them -yourself. In either case, jpeg_write_coefficients() is substituted for -jpeg_start_compress() and jpeg_write_scanlines(). Thus the sequence is - * Create compression object - * Set all compression parameters as necessary - * Request virtual arrays if needed - * jpeg_write_coefficients() - * jpeg_finish_compress() - * Destroy or re-use compression object -jpeg_write_coefficients() is passed a pointer to an array of virtual block -array descriptors; the number of arrays is equal to cinfo.num_components. - -The virtual arrays need only have been requested, not realized, before -jpeg_write_coefficients() is called. A side-effect of -jpeg_write_coefficients() is to realize any virtual arrays that have been -requested from the compression object's memory manager. Thus, when obtaining -the virtual arrays from the compression object, you should fill the arrays -after calling jpeg_write_coefficients(). The data is actually written out -when you call jpeg_finish_compress(); jpeg_write_coefficients() only writes -the file header. - -When writing raw DCT coefficients, it is crucial that the JPEG quantization -tables and sampling factors match the way the data was encoded, or the -resulting file will be invalid. For transcoding from an existing JPEG file, -we recommend using jpeg_copy_critical_parameters(). This routine initializes -all the compression parameters to default values (like jpeg_set_defaults()), -then copies the critical information from a source decompression object. -The decompression object should have just been used to read the entire -JPEG input file --- that is, it should be awaiting jpeg_finish_decompress(). - -jpeg_write_coefficients() marks all tables stored in the compression object -as needing to be written to the output file (thus, it acts like -jpeg_start_compress(cinfo, TRUE)). This is for safety's sake, to avoid -emitting abbreviated JPEG files by accident. If you really want to emit an -abbreviated JPEG file, call jpeg_suppress_tables(), or set the tables' -individual sent_table flags, between calling jpeg_write_coefficients() and -jpeg_finish_compress(). - - -Progress monitoring -------------------- - -Some applications may need to regain control from the JPEG library every so -often. The typical use of this feature is to produce a percent-done bar or -other progress display. (For a simple example, see cjpeg.c or djpeg.c.) -Although you do get control back frequently during the data-transferring pass -(the jpeg_read_scanlines or jpeg_write_scanlines loop), any additional passes -will occur inside jpeg_finish_compress or jpeg_start_decompress; those -routines may take a long time to execute, and you don't get control back -until they are done. - -You can define a progress-monitor routine which will be called periodically -by the library. No guarantees are made about how often this call will occur, -so we don't recommend you use it for mouse tracking or anything like that. -At present, a call will occur once per MCU row, scanline, or sample row -group, whichever unit is convenient for the current processing mode; so the -wider the image, the longer the time between calls. During the data -transferring pass, only one call occurs per call of jpeg_read_scanlines or -jpeg_write_scanlines, so don't pass a large number of scanlines at once if -you want fine resolution in the progress count. (If you really need to use -the callback mechanism for time-critical tasks like mouse tracking, you could -insert additional calls inside some of the library's inner loops.) - -To establish a progress-monitor callback, create a struct jpeg_progress_mgr, -fill in its progress_monitor field with a pointer to your callback routine, -and set cinfo->progress to point to the struct. The callback will be called -whenever cinfo->progress is non-NULL. (This pointer is set to NULL by -jpeg_create_compress or jpeg_create_decompress; the library will not change -it thereafter. So if you allocate dynamic storage for the progress struct, -make sure it will live as long as the JPEG object does. Allocating from the -JPEG memory manager with lifetime JPOOL_PERMANENT will work nicely.) You -can use the same callback routine for both compression and decompression. - -The jpeg_progress_mgr struct contains four fields which are set by the library: - 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 */ -During any one pass, pass_counter increases from 0 up to (not including) -pass_limit; the step size is usually but not necessarily 1. The pass_limit -value may change from one pass to another. The expected total number of -passes is in total_passes, and the number of passes already completed is in -completed_passes. Thus the fraction of work completed may be estimated as - completed_passes + (pass_counter/pass_limit) - -------------------------------------------- - total_passes -ignoring the fact that the passes may not be equal amounts of work. - -When decompressing, pass_limit can even change within a pass, because it -depends on the number of scans in the JPEG file, which isn't always known in -advance. The computed fraction-of-work-done may jump suddenly (if the library -discovers it has overestimated the number of scans) or even decrease (in the -opposite case). It is not wise to put great faith in the work estimate. - -When using the decompressor's buffered-image mode, the progress monitor work -estimate is likely to be completely unhelpful, because the library has no way -to know how many output passes will be demanded of it. Currently, the library -sets total_passes based on the assumption that there will be one more output -pass if the input file end hasn't yet been read (jpeg_input_complete() isn't -TRUE), but no more output passes if the file end has been reached when the -output pass is started. This means that total_passes will rise as additional -output passes are requested. If you have a way of determining the input file -size, estimating progress based on the fraction of the file that's been read -will probably be more useful than using the library's value. - - -Memory management ------------------ - -This section covers some key facts about the JPEG library's built-in memory -manager. For more info, please read structure.txt's section about the memory -manager, and consult the source code if necessary. - -All memory and temporary file allocation within the library is done via the -memory manager. If necessary, you can replace the "back end" of the memory -manager to control allocation yourself (for example, if you don't want the -library to use malloc() and free() for some reason). - -Some data is allocated "permanently" and will not be freed until the JPEG -object is destroyed. Most data is allocated "per image" and is freed by -jpeg_finish_compress, jpeg_finish_decompress, or jpeg_abort. You can call the -memory manager yourself to allocate structures that will automatically be -freed at these times. Typical code for this is - ptr = (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, size); -Use JPOOL_PERMANENT to get storage that lasts as long as the JPEG object. -Use alloc_large instead of alloc_small for anything bigger than a few Kbytes. -There are also alloc_sarray and alloc_barray routines that automatically -build 2-D sample or block arrays. - -The library's minimum space requirements to process an image depend on the -image's width, but not on its height, because the library ordinarily works -with "strip" buffers that are as wide as the image but just a few rows high. -Some operating modes (eg, two-pass color quantization) require full-image -buffers. Such buffers are treated as "virtual arrays": only the current strip -need be in memory, and the rest can be swapped out to a temporary file. - -If you use the simplest memory manager back end (jmemnobs.c), then no -temporary files are used; virtual arrays are simply malloc()'d. Images bigger -than memory can be processed only if your system supports virtual memory. -The other memory manager back ends support temporary files of various flavors -and thus work in machines without virtual memory. They may also be useful on -Unix machines if you need to process images that exceed available swap space. - -When using temporary files, the library will make the in-memory buffers for -its virtual arrays just big enough to stay within a "maximum memory" setting. -Your application can set this limit by setting cinfo->mem->max_memory_to_use -after creating the JPEG object. (Of course, there is still a minimum size for -the buffers, so the max-memory setting is effective only if it is bigger than -the minimum space needed.) If you allocate any large structures yourself, you -must allocate them before jpeg_start_compress() or jpeg_start_decompress() in -order to have them counted against the max memory limit. Also keep in mind -that space allocated with alloc_small() is ignored, on the assumption that -it's too small to be worth worrying about; so a reasonable safety margin -should be left when setting max_memory_to_use. - -If you use the jmemname.c or jmemdos.c memory manager back end, it is -important to clean up the JPEG object properly to ensure that the temporary -files get deleted. (This is especially crucial with jmemdos.c, where the -"temporary files" may be extended-memory segments; if they are not freed, -DOS will require a reboot to recover the memory.) Thus, with these memory -managers, it's a good idea to provide a signal handler that will trap any -early exit from your program. The handler should call either jpeg_abort() -or jpeg_destroy() for any active JPEG objects. A handler is not needed with -jmemnobs.c, and shouldn't be necessary with jmemansi.c or jmemmac.c either, -since the C library is supposed to take care of deleting files made with -tmpfile(). - - -Memory usage ------------- - -Working memory requirements while performing compression or decompression -depend on image dimensions, image characteristics (such as colorspace and -JPEG process), and operating mode (application-selected options). - -As of v6b, the decompressor requires: - 1. About 24K in more-or-less-fixed-size data. This varies a bit depending - on operating mode and image characteristics (particularly color vs. - grayscale), but it doesn't depend on image dimensions. - 2. Strip buffers (of size proportional to the image width) for IDCT and - upsampling results. The worst case for commonly used sampling factors - is about 34 bytes * width in pixels for a color image. A grayscale image - only needs about 8 bytes per pixel column. - 3. A full-image DCT coefficient buffer is needed to decode a multi-scan JPEG - file (including progressive JPEGs), or whenever you select buffered-image - mode. This takes 2 bytes/coefficient. At typical 2x2 sampling, that's - 3 bytes per pixel for a color image. Worst case (1x1 sampling) requires - 6 bytes/pixel. For grayscale, figure 2 bytes/pixel. - 4. To perform 2-pass color quantization, the decompressor also needs a - 128K color lookup table and a full-image pixel buffer (3 bytes/pixel). -This does not count any memory allocated by the application, such as a -buffer to hold the final output image. - -The above figures are valid for 8-bit JPEG data precision and a machine with -32-bit ints. For 9-bit to 12-bit JPEG data, double the size of the strip -buffers and quantization pixel buffer. The "fixed-size" data will be -somewhat smaller with 16-bit ints, larger with 64-bit ints. Also, CMYK -or other unusual color spaces will require different amounts of space. - -The full-image coefficient and pixel buffers, if needed at all, do not -have to be fully RAM resident; you can have the library use temporary -files instead when the total memory usage would exceed a limit you set. -(But if your OS supports virtual memory, it's probably better to just use -jmemnobs and let the OS do the swapping.) - -The compressor's memory requirements are similar, except that it has no need -for color quantization. Also, it needs a full-image DCT coefficient buffer -if Huffman-table optimization is asked for, even if progressive mode is not -requested. - -If you need more detailed information about memory usage in a particular -situation, you can enable the MEM_STATS code in jmemmgr.c. - - -Library compile-time options ----------------------------- - -A number of compile-time options are available by modifying jmorecfg.h. - -The IJG code currently supports 8-bit to 12-bit sample data precision by -defining BITS_IN_JSAMPLE as 8, 9, 10, 11, or 12. -Note that a value larger than 8 causes JSAMPLE to be larger than a char, -so it affects the surrounding application's image data. -The sample applications cjpeg and djpeg can support deeper than 8-bit data -only for PPM and GIF file formats; you must disable the other file formats -to compile a 9-bit to 12-bit cjpeg or djpeg. (install.txt has more -information about that.) -Run-time selection and conversion of data precision are currently not -supported and may be added later. -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. -(If you need to include an 8-bit library and a 9-bit to 12-bit library for -compression or decompression in a single application, you could probably do -it by defining NEED_SHORT_EXTERNAL_NAMES for just one of the copies. You'd -have to access the 8-bit and the 9-bit to 12-bit copies from separate -application source files. This is untested ... if you try it, we'd like to -hear whether it works!) - -Note that the standard Huffman tables are only valid for 8-bit data precision. -If you selected more than 8-bit data precision, cjpeg uses arithmetic coding -by default. The Huffman encoder normally uses entropy optimization to -compute usable tables for higher precision. Otherwise, you'll have to -supply different default Huffman tables. You may also want to supply your -own DCT quantization tables; the existing quality-scaling code has been -developed for 8-bit use, and probably doesn't generate especially good tables -for 9-bit to 12-bit. - -The maximum number of components (color channels) in the image is determined -by MAX_COMPONENTS. The JPEG standard allows up to 255 components, but we -expect that few applications will need more than four or so. - -On machines with unusual data type sizes, you may be able to improve -performance or reduce memory space by tweaking the various typedefs in -jmorecfg.h. In particular, on some RISC CPUs, access to arrays of "short"s -is quite slow; consider trading memory for speed by making JCOEF, INT16, and -UINT16 be "int" or "unsigned int". UINT8 is also a candidate to become int. -You probably don't want to make JSAMPLE be int unless you have lots of memory -to burn. - -You can reduce the size of the library by compiling out various optional -functions. To do this, undefine xxx_SUPPORTED symbols as necessary. - -You can also save a few K by not having text error messages in the library; -the standard error message table occupies about 5Kb. This is particularly -reasonable for embedded applications where there's no good way to display -a message anyway. To do this, remove the creation of the message table -(jpeg_std_message_table[]) from jerror.c, and alter format_message to do -something reasonable without it. You could output the numeric value of the -message code number, for example. If you do this, you can also save a couple -more K by modifying the TRACEMSn() macros in jerror.h to expand to nothing; -you don't need trace capability anyway, right? - - -Portability considerations --------------------------- - -The JPEG library has been written to be extremely portable; the sample -applications cjpeg and djpeg are slightly less so. This section summarizes -the design goals in this area. (If you encounter any bugs that cause the -library to be less portable than is claimed here, we'd appreciate hearing -about them.) - -The code works fine on ANSI C, C++, and pre-ANSI C compilers, using any of -the popular system include file setups, and some not-so-popular ones too. -See install.txt for configuration procedures. - -The code is not dependent on the exact sizes of the C data types. As -distributed, we make the assumptions that - char is at least 8 bits wide - short is at least 16 bits wide - int is at least 16 bits wide - long is at least 32 bits wide -(These are the minimum requirements of the ANSI C standard.) Wider types will -work fine, although memory may be used inefficiently if char is much larger -than 8 bits or short is much bigger than 16 bits. The code should work -equally well with 16- or 32-bit ints. - -In a system where these assumptions are not met, you may be able to make the -code work by modifying the typedefs in jmorecfg.h. However, you will probably -have difficulty if int is less than 16 bits wide, since references to plain -int abound in the code. - -char can be either signed or unsigned, although the code runs faster if an -unsigned char type is available. If char is wider than 8 bits, you will need -to redefine JOCTET and/or provide custom data source/destination managers so -that JOCTET represents exactly 8 bits of data on external storage. - -The JPEG library proper does not assume ASCII representation of characters. -But some of the image file I/O modules in cjpeg/djpeg do have ASCII -dependencies in file-header manipulation; so does cjpeg's select_file_type() -routine. - -The JPEG library does not rely heavily on the C library. In particular, C -stdio is used only by the data source/destination modules and the error -handler, all of which are application-replaceable. (cjpeg/djpeg are more -heavily dependent on stdio.) malloc and free are called only from the memory -manager "back end" module, so you can use a different memory allocator by -replacing that one file. - -The code generally assumes that C names must be unique in the first 15 -characters. However, global function names can be made unique in the -first 6 characters by defining NEED_SHORT_EXTERNAL_NAMES. - -More info about porting the code may be gleaned by reading jconfig.txt, -jmorecfg.h, and jinclude.h. - - -Notes for MS-DOS implementors ------------------------------ - -The IJG code is designed to work efficiently in 80x86 "small" or "medium" -memory models (i.e., data pointers are 16 bits unless explicitly declared -"far"; code pointers can be either size). You may be able to use small -model to compile cjpeg or djpeg by itself, but you will probably have to use -medium model for any larger application. This won't make much difference in -performance. You *will* take a noticeable performance hit if you use a -large-data memory model (perhaps 10%-25%), and you should avoid "huge" model -if at all possible. - -The JPEG library typically needs 2Kb-3Kb of stack space. It will also -malloc about 20K-30K of near heap space while executing (and lots of far -heap, but that doesn't count in this calculation). This figure will vary -depending on selected operating mode, and to a lesser extent on image size. -There is also about 5Kb-6Kb of constant data which will be allocated in the -near data segment (about 4Kb of this is the error message table). -Thus you have perhaps 20K available for other modules' static data and near -heap space before you need to go to a larger memory model. The C library's -static data will account for several K of this, but that still leaves a good -deal for your needs. (If you are tight on space, you could reduce the sizes -of the I/O buffers allocated by jdatasrc.c and jdatadst.c, say from 4K to -1K. Another possibility is to move the error message table to far memory; -this should be doable with only localized hacking on jerror.c.) - -About 2K of the near heap space is "permanent" memory that will not be -released until you destroy the JPEG object. This is only an issue if you -save a JPEG object between compression or decompression operations. - -Far data space may also be a tight resource when you are dealing with large -images. The most memory-intensive case is decompression with two-pass color -quantization, or single-pass quantization to an externally supplied color -map. This requires a 128Kb color lookup table plus strip buffers amounting -to about 40 bytes per column for typical sampling ratios (eg, about 25600 -bytes for a 640-pixel-wide image). You may not be able to process wide -images if you have large data structures of your own. - -Of course, all of these concerns vanish if you use a 32-bit flat-memory-model -compiler, such as DJGPP or Watcom C. We highly recommend flat model if you -can use it; the JPEG library is significantly faster in flat model. diff --git a/Dependencies/FreeImage/Source/LibJPEG/rdbmp.c b/Dependencies/FreeImage/Source/LibJPEG/rdbmp.c deleted file mode 100644 index 6639ad0..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/rdbmp.c +++ /dev/null @@ -1,490 +0,0 @@ -/* - * rdbmp.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 2009-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 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 */ -#ifdef CHAR_IS_UNSIGNED -typedef char U_CHAR; -#define UCH(x) ((int) (x)) -#else -typedef char U_CHAR; -#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); - break; - } -} - - -/* - * 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; - JSAMPARRAY image_ptr; - register JSAMPROW inptr, outptr; - register JSAMPARRAY colormap; - register JDIMENSION col; - register int t; - int cmaplen; - - /* Fetch next row from virtual array */ - source->source_row--; - image_ptr = (*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 */ - inptr = image_ptr[0]; - 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; - JSAMPARRAY image_ptr; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - - /* Fetch next row from virtual array */ - source->source_row--; - image_ptr = (*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). - */ - inptr = image_ptr[0]; - 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; - JSAMPARRAY image_ptr; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - - /* Fetch next row from virtual array */ - source->source_row--; - image_ptr = (*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). - */ - inptr = image_ptr[0]; - 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; - JSAMPARRAY image_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); - } - image_ptr = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->whole_image, - row, (JDIMENSION) 1, TRUE); - out_ptr = image_ptr[0]; - 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; - } - 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); - break; - } - 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/Dependencies/FreeImage/Source/LibJPEG/rdcolmap.c b/Dependencies/FreeImage/Source/LibJPEG/rdcolmap.c deleted file mode 100644 index 42b3437..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/rdcolmap.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 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/Dependencies/FreeImage/Source/LibJPEG/rdgif.c b/Dependencies/FreeImage/Source/LibJPEG/rdgif.c deleted file mode 100644 index b27c167..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/rdgif.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * rdgif.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 routines to read input images in GIF format. - * - ***************************************************************************** - * NOTE: to avoid entanglements with Unisys' patent on LZW compression, * - * the ability to read GIF files has been removed from the IJG distribution. * - * Sorry about that. * - ***************************************************************************** - * - * We are required to state that - * "The Graphics Interchange Format(c) is the Copyright property of - * CompuServe Incorporated. GIF(sm) is a Service Mark property of - * CompuServe Incorporated." - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef GIF_SUPPORTED - -/* - * The module selection routine for GIF format input. - */ - -GLOBAL(cjpeg_source_ptr) -jinit_read_gif (j_compress_ptr cinfo) -{ - fprintf(stderr, "GIF input is unsupported for legal reasons. Sorry.\n"); - exit(EXIT_FAILURE); - return NULL; /* keep compiler happy */ -} - -#endif /* GIF_SUPPORTED */ diff --git a/Dependencies/FreeImage/Source/LibJPEG/rdjpgcom.c b/Dependencies/FreeImage/Source/LibJPEG/rdjpgcom.c deleted file mode 100644 index 3719154..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/rdjpgcom.c +++ /dev/null @@ -1,515 +0,0 @@ -/* - * rdjpgcom.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2009 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 a very simple stand-alone application that displays - * the text in COM (comment) markers in a JFIF file. - * This may be useful as an example of the minimum logic needed to parse - * JPEG markers. - */ - -#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ -#include "jinclude.h" /* get auto-config symbols, */ - -#ifdef HAVE_LOCALE_H -#include /* Bill Allombert: use locale for isprint */ -#endif -#include /* to declare isupper(), tolower() */ -#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 - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#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 - - -/* - * These macros are used to read the input file. - * To reuse this code in another application, you might need to change these. - */ - -static FILE * infile; /* input JPEG file */ - -/* Return next input byte, or EOF if no more */ -#define NEXTBYTE() getc(infile) - - -/* Error exit handler */ -#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) - - -/* Read one byte, testing for EOF */ -static int -read_1_byte (void) -{ - int c; - - c = NEXTBYTE(); - if (c == EOF) - ERREXIT("Premature EOF in JPEG file"); - return c; -} - -/* Read 2 bytes, convert to unsigned int */ -/* All 2-byte quantities in JPEG markers are MSB first */ -static unsigned int -read_2_bytes (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - if (c1 == EOF) - ERREXIT("Premature EOF in JPEG file"); - c2 = NEXTBYTE(); - if (c2 == EOF) - ERREXIT("Premature EOF in JPEG file"); - return (((unsigned int) c1) << 8) + ((unsigned int) c2); -} - - -/* - * JPEG markers consist of one or more 0xFF bytes, followed by a marker - * code byte (which is not an FF). Here are the marker codes of interest - * in this program. (See jdmarker.c for a more complete list.) - */ - -#define M_SOF0 0xC0 /* Start Of Frame N */ -#define M_SOF1 0xC1 /* N indicates which compression process */ -#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ -#define M_SOF3 0xC3 -#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ -#define M_SOF6 0xC6 -#define M_SOF7 0xC7 -#define M_SOF9 0xC9 -#define M_SOF10 0xCA -#define M_SOF11 0xCB -#define M_SOF13 0xCD -#define M_SOF14 0xCE -#define M_SOF15 0xCF -#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ -#define M_EOI 0xD9 /* End Of Image (end of datastream) */ -#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ -#define M_APP0 0xE0 /* Application-specific marker, type N */ -#define M_APP12 0xEC /* (we don't bother to list all 16 APPn's) */ -#define M_COM 0xFE /* COMment */ - - -/* - * Find the next JPEG marker and return its marker code. - * We expect at least one FF byte, possibly more if the compressor used FFs - * to pad the file. - * There could also be non-FF garbage between markers. The treatment of such - * garbage is unspecified; we choose to skip over it but emit a warning msg. - * NB: this routine must not be used after seeing SOS marker, since it will - * not deal correctly with FF/00 sequences in the compressed image data... - */ - -static int -next_marker (void) -{ - int c; - int discarded_bytes = 0; - - /* Find 0xFF byte; count and skip any non-FFs. */ - c = read_1_byte(); - while (c != 0xFF) { - discarded_bytes++; - c = read_1_byte(); - } - /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs - * are legal as pad bytes, so don't count them in discarded_bytes. - */ - do { - c = read_1_byte(); - } while (c == 0xFF); - - if (discarded_bytes != 0) { - fprintf(stderr, "Warning: garbage data found in JPEG file\n"); - } - - return c; -} - - -/* - * Read the initial marker, which should be SOI. - * For a JFIF file, the first two bytes of the file should be literally - * 0xFF M_SOI. To be more general, we could use next_marker, but if the - * input file weren't actually JPEG at all, next_marker might read the whole - * file and then return a misleading error message... - */ - -static int -first_marker (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - c2 = NEXTBYTE(); - if (c1 != 0xFF || c2 != M_SOI) - ERREXIT("Not a JPEG file"); - return c2; -} - - -/* - * Most types of marker are followed by a variable-length parameter segment. - * This routine skips over the parameters for any marker we don't otherwise - * want to process. - * Note that we MUST skip the parameter segment explicitly in order not to - * be fooled by 0xFF bytes that might appear within the parameter segment; - * such bytes do NOT introduce new markers. - */ - -static void -skip_variable (void) -/* Skip over an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Skip over the remaining bytes */ - while (length > 0) { - (void) read_1_byte(); - length--; - } -} - - -/* - * Process a COM marker. - * We want to print out the marker contents as legible text; - * we must guard against non-text junk and varying newline representations. - */ - -static void -process_COM (int raw) -{ - unsigned int length; - int ch; - int lastch = 0; - - /* Bill Allombert: set locale properly for isprint */ -#ifdef HAVE_LOCALE_H - setlocale(LC_CTYPE, ""); -#endif - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - - while (length > 0) { - ch = read_1_byte(); - if (raw) { - putc(ch, stdout); - /* Emit the character in a readable form. - * Nonprintables are converted to \nnn form, - * while \ is converted to \\. - * Newlines in CR, CR/LF, or LF form will be printed as one newline. - */ - } else if (ch == '\r') { - printf("\n"); - } else if (ch == '\n') { - if (lastch != '\r') - printf("\n"); - } else if (ch == '\\') { - printf("\\\\"); - } else if (isprint(ch)) { - putc(ch, stdout); - } else { - printf("\\%03o", ch); - } - lastch = ch; - length--; - } - printf("\n"); - - /* Bill Allombert: revert to C locale */ -#ifdef HAVE_LOCALE_H - setlocale(LC_CTYPE, "C"); -#endif -} - - -/* - * Process a SOFn marker. - * This code is only needed if you want to know the image dimensions... - */ - -static void -process_SOFn (int marker) -{ - unsigned int length; - unsigned int image_height, image_width; - int data_precision, num_components; - const char * process; - int ci; - - length = read_2_bytes(); /* usual parameter length count */ - - data_precision = read_1_byte(); - image_height = read_2_bytes(); - image_width = read_2_bytes(); - num_components = read_1_byte(); - - switch (marker) { - case M_SOF0: process = "Baseline"; break; - case M_SOF1: process = "Extended sequential"; break; - case M_SOF2: process = "Progressive"; break; - case M_SOF3: process = "Lossless"; break; - case M_SOF5: process = "Differential sequential"; break; - case M_SOF6: process = "Differential progressive"; break; - case M_SOF7: process = "Differential lossless"; break; - case M_SOF9: process = "Extended sequential, arithmetic coding"; break; - case M_SOF10: process = "Progressive, arithmetic coding"; break; - case M_SOF11: process = "Lossless, arithmetic coding"; break; - case M_SOF13: process = "Differential sequential, arithmetic coding"; break; - case M_SOF14: process = "Differential progressive, arithmetic coding"; break; - case M_SOF15: process = "Differential lossless, arithmetic coding"; break; - default: process = "Unknown"; break; - } - - printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n", - image_width, image_height, num_components, data_precision); - printf("JPEG process: %s\n", process); - - if (length != (unsigned int) (8 + num_components * 3)) - ERREXIT("Bogus SOF marker length"); - - for (ci = 0; ci < num_components; ci++) { - (void) read_1_byte(); /* Component ID code */ - (void) read_1_byte(); /* H, V sampling factors */ - (void) read_1_byte(); /* Quantization table number */ - } -} - - -/* - * Parse the marker stream until SOS or EOI is seen; - * display any COM markers. - * While the companion program wrjpgcom will always insert COM markers before - * SOFn, other implementations might not, so we scan to SOS before stopping. - * If we were only interested in the image dimensions, we would stop at SOFn. - * (Conversely, if we only cared about COM markers, there would be no need - * for special code to handle SOFn; we could treat it like other markers.) - */ - -static int -scan_JPEG_header (int verbose, int raw) -{ - int marker; - - /* Expect SOI at start of file */ - if (first_marker() != M_SOI) - ERREXIT("Expected SOI marker first"); - - /* Scan miscellaneous markers until we reach SOS. */ - for (;;) { - marker = next_marker(); - switch (marker) { - /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be, - * treated as SOFn. C4 in particular is actually DHT. - */ - case M_SOF0: /* Baseline */ - case M_SOF1: /* Extended sequential, Huffman */ - case M_SOF2: /* Progressive, Huffman */ - 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_SOF9: /* Extended sequential, arithmetic */ - case M_SOF10: /* Progressive, arithmetic */ - case M_SOF11: /* Lossless, arithmetic */ - case M_SOF13: /* Differential sequential, arithmetic */ - case M_SOF14: /* Differential progressive, arithmetic */ - case M_SOF15: /* Differential lossless, arithmetic */ - if (verbose) - process_SOFn(marker); - else - skip_variable(); - break; - - case M_SOS: /* stop before hitting compressed data */ - return marker; - - case M_EOI: /* in case it's a tables-only JPEG stream */ - return marker; - - case M_COM: - process_COM(raw); - break; - - case M_APP12: - /* Some digital camera makers put useful textual information into - * APP12 markers, so we print those out too when in -verbose mode. - */ - if (verbose) { - printf("APP12 contains:\n"); - process_COM(raw); - } else - skip_variable(); - break; - - default: /* Anything else just gets skipped */ - skip_variable(); /* we assume it has a parameter count... */ - break; - } - } /* end loop */ -} - - -/* Command line parsing code */ - -static const char * progname; /* program name for error messages */ - - -static void -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "rdjpgcom displays any textual comments in a JPEG file.\n"); - - fprintf(stderr, "Usage: %s [switches] [inputfile]\n", progname); - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -raw Display non-printable characters in comments (unsafe)\n"); - fprintf(stderr, " -verbose Also display dimensions of JPEG image\n"); - - exit(EXIT_FAILURE); -} - - -static int -keymatch (char * arg, const char * keyword, int minchars) -/* 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. */ -{ - register int ca, ck; - register int nmatched = 0; - - while ((ca = *arg++) != '\0') { - if ((ck = *keyword++) == '\0') - return 0; /* arg longer than keyword, no good */ - if (isupper(ca)) /* force arg to lcase (assume ck is already) */ - ca = tolower(ca); - if (ca != ck) - return 0; /* no good */ - nmatched++; /* count matched characters */ - } - /* reached end of argument; fail if it's too short for unique abbrev */ - if (nmatched < minchars) - return 0; - return 1; /* A-OK */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - int argn; - char * arg; - int verbose = 0, raw = 0; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "rdjpgcom"; /* in case C library doesn't provide it */ - - /* Parse switches, if any */ - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (arg[0] != '-') - break; /* not switch, must be file name */ - arg++; /* advance over '-' */ - if (keymatch(arg, "verbose", 1)) { - verbose++; - } else if (keymatch(arg, "raw", 1)) { - raw = 1; - } else - usage(); - } - - /* Open the input file. */ - /* Unix style: expect zero or one file name */ - if (argn < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } - if (argn < argc) { - if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is 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 ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open stdin\n", progname); - exit(EXIT_FAILURE); - } -#else - infile = stdin; -#endif - } - - /* Scan the JPEG headers. */ - (void) scan_JPEG_header(verbose, raw); - - /* All done. */ - exit(EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/rdppm.c b/Dependencies/FreeImage/Source/LibJPEG/rdppm.c deleted file mode 100644 index 357ce9e..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/rdppm.c +++ /dev/null @@ -1,505 +0,0 @@ -/* - * rdppm.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2009-2017 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). - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef PPM_SUPPORTED - - -/* 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. -*/ - - -/* 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 */ -#ifdef CHAR_IS_UNSIGNED -typedef char U_CHAR; -#define UCH(x) ((int) (x)) -#else -typedef char U_CHAR; -#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 */ - - U_CHAR *iobuffer; /* non-FAR pointer to I/O buffer */ - JSAMPROW pixrow; /* FAR pointer to same */ - 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->pub.buffer[0]; - 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->pub.buffer[0]; - 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->pub.buffer[0]; - 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->pub.buffer[0]; - 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->pub.buffer[0]; - 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->pub.buffer[0]; - 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); - break; - } - - /* 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 * 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. */ - /* Synthesize a JSAMPARRAY pointer structure */ - /* Cast here implies near->far pointer conversion on PCs */ - source->pixrow = (JSAMPROW) source->iobuffer; - source->pub.buffer = & source->pixrow; - source->pub.buffer_height = 1; - } else { - /* Need to translate anyway, so make a separate sample buffer. */ - source->pub.buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) w * cinfo->input_components, (JDIMENSION) 1); - 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) (((long) maxval + 1L) * 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/Dependencies/FreeImage/Source/LibJPEG/rdrle.c b/Dependencies/FreeImage/Source/LibJPEG/rdrle.c deleted file mode 100644 index 542bc37..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/rdrle.c +++ /dev/null @@ -1,387 +0,0 @@ -/* - * rdrle.c - * - * Copyright (C) 1991-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 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); - break; - case RLE_NO_SPACE: - ERREXIT(cinfo, JERR_RLE_MEM); - break; - case RLE_EMPTY: - ERREXIT(cinfo, JERR_RLE_EMPTY); - break; - case RLE_EOF: - ERREXIT(cinfo, JERR_RLE_EOF); - break; - default: - ERREXIT(cinfo, JERR_RLE_BADERROR); - break; - } - - /* 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, - (JDIMENSION) 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, - (JDIMENSION) (width * source->header.ncolors), - (JDIMENSION) 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 - - colormap = source->header.cmap; - rle_row = source->rle_row; - - /* 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: - for (row = 0; row < cinfo->image_height; row++) { - scanline = * (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); - rle_row = source->rle_row; - rle_getrow(&source->header, rle_row); - - 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: - for (row = 0; row < cinfo->image_height; row++) { - scanline = * (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); - rle_getrow(&source->header, rle_row); - - 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 (cjpeg_source_ptr) source; -} - -#endif /* RLE_SUPPORTED */ diff --git a/Dependencies/FreeImage/Source/LibJPEG/rdswitch.c b/Dependencies/FreeImage/Source/LibJPEG/rdswitch.c deleted file mode 100644 index b5aba83..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/rdswitch.c +++ /dev/null @@ -1,367 +0,0 @@ -/* - * rdswitch.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2003-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 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/Dependencies/FreeImage/Source/LibJPEG/rdtarga.c b/Dependencies/FreeImage/Source/LibJPEG/rdtarga.c deleted file mode 100644 index b3a7251..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/rdtarga.c +++ /dev/null @@ -1,510 +0,0 @@ -/* - * rdtarga.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 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 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 */ -#ifdef CHAR_IS_UNSIGNED -typedef char U_CHAR; -#define UCH(x) ((int) (x)) -#else -typedef char U_CHAR; -#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 FILE *infile = sinfo->pub.input_file; - register int i; - - for (i = 0; i < sinfo->pixel_size; i++) { - sinfo->tga_pixel[i] = (U_CHAR) getc(infile); - } -} - - -METHODDEF(void) -read_rle_pixel (tga_source_ptr sinfo) -/* Read one Targa pixel from the input file, expanding RLE data as needed */ -{ - register FILE *infile = sinfo->pub.input_file; - 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) getc(infile); - } -} - - -/* - * 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); - break; - } - 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); - break; - } - - 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/Dependencies/FreeImage/Source/LibJPEG/structure.txt b/Dependencies/FreeImage/Source/LibJPEG/structure.txt deleted file mode 100644 index 98e20c7..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/structure.txt +++ /dev/null @@ -1,942 +0,0 @@ -IJG JPEG LIBRARY: SYSTEM ARCHITECTURE - -Copyright (C) 1991-2013, 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 provides an overview of the architecture of the IJG JPEG software; -that is, the functions of the various modules in the system and the interfaces -between modules. For more precise details about any data structure or calling -convention, see the include files and comments in the source code. - -We assume that the reader is already somewhat familiar with the JPEG standard. -The README file includes references for learning about JPEG. The file -libjpeg.txt describes the library from the viewpoint of an application -programmer using the library; it's best to read that file before this one. -Also, the file coderules.txt describes the coding style conventions we use. - -In this document, JPEG-specific terminology follows the JPEG standard: - A "component" means a color channel, e.g., Red or Luminance. - A "sample" is a single component value (i.e., one number in the image data). - A "coefficient" is a frequency coefficient (a DCT transform output number). - A "block" is an array of samples or coefficients. - An "MCU" (minimum coded unit) is an interleaved set of blocks of size - determined by the sampling factors, or a single block in a - noninterleaved scan. -We do not use the terms "pixel" and "sample" interchangeably. When we say -pixel, we mean an element of the full-size image, while a sample is an element -of the downsampled image. Thus the number of samples may vary across -components while the number of pixels does not. (This terminology is not used -rigorously throughout the code, but it is used in places where confusion would -otherwise result.) - - -*** System features *** - -The IJG distribution contains two parts: - * A subroutine library for JPEG compression and decompression. - * cjpeg/djpeg, two sample applications that use the library to transform - JFIF JPEG files to and from several other image formats. -cjpeg/djpeg are of no great intellectual complexity: they merely add a simple -command-line user interface and I/O routines for several uncompressed image -formats. This document concentrates on the library itself. - -We desire the library to be capable of supporting all JPEG baseline, extended -sequential, and progressive DCT processes. The library does not support the -hierarchical or lossless processes defined in the standard. - -Within these limits, any set of compression parameters allowed by the JPEG -spec should be readable for decompression. (We can be more restrictive about -what formats we can generate.) Although the system design allows for all -parameter values, some uncommon settings are not yet implemented and may -never be; nonintegral sampling ratios are the prime example. Furthermore, -we treat 8-bit vs. 12-bit data precision as a compile-time switch, not a -run-time option, because most machines can store 8-bit pixels much more -compactly than 12-bit. - -By itself, the library handles only interchange JPEG datastreams --- in -particular the widely used JFIF file format. The library can be used by -surrounding code to process interchange or abbreviated JPEG datastreams that -are embedded in more complex file formats. (For example, libtiff uses this -library to implement JPEG compression within the TIFF file format.) - -The library includes a substantial amount of code that is not covered by the -JPEG standard but is necessary for typical applications of JPEG. These -functions preprocess the image before JPEG compression or postprocess it after -decompression. They include colorspace conversion, downsampling/upsampling, -and color quantization. This code can be omitted if not needed. - -A wide range of quality vs. speed tradeoffs are possible in JPEG processing, -and even more so in decompression postprocessing. The decompression library -provides multiple implementations that cover most of the useful tradeoffs, -ranging from very-high-quality down to fast-preview operation. On the -compression side we have generally not provided low-quality choices, since -compression is normally less time-critical. It should be understood that the -low-quality modes may not meet the JPEG standard's accuracy requirements; -nonetheless, they are useful for viewers. - - -*** Portability issues *** - -Portability is an essential requirement for the library. The key portability -issues that show up at the level of system architecture are: - -1. Memory usage. We want the code to be able to run on PC-class machines -with limited memory. Images should therefore be processed sequentially (in -strips), to avoid holding the whole image in memory at once. Where a -full-image buffer is necessary, we should be able to use either virtual memory -or temporary files. - -2. Near/far pointer distinction. To run efficiently on 80x86 machines, the -code should distinguish "small" objects (kept in near data space) from -"large" ones (kept in far data space). This is an annoying restriction, but -fortunately it does not impact code quality for less brain-damaged machines, -and the source code clutter turns out to be minimal with sufficient use of -pointer typedefs. - -3. Data precision. We assume that "char" is at least 8 bits, "short" and -"int" at least 16, "long" at least 32. The code will work fine with larger -data sizes, although memory may be used inefficiently in some cases. However, -the JPEG compressed datastream must ultimately appear on external storage as a -sequence of 8-bit bytes if it is to conform to the standard. This may pose a -problem on machines where char is wider than 8 bits. The library represents -compressed data as an array of values of typedef JOCTET. If no data type -exactly 8 bits wide is available, custom data source and data destination -modules must be written to unpack and pack the chosen JOCTET datatype into -8-bit external representation. - - -*** System overview *** - -The compressor and decompressor are each divided into two main sections: -the JPEG compressor or decompressor proper, and the preprocessing or -postprocessing functions. The interface between these two sections is the -image data that the official JPEG spec regards as its input or output: this -data is in the colorspace to be used for compression, and it is downsampled -to the sampling factors to be used. The preprocessing and postprocessing -steps are responsible for converting a normal image representation to or from -this form. (Those few applications that want to deal with YCbCr downsampled -data can skip the preprocessing or postprocessing step.) - -Looking more closely, the compressor library contains the following main -elements: - - Preprocessing: - * Color space conversion (e.g., RGB to YCbCr). - * Edge expansion and downsampling. Optionally, this step can do simple - smoothing --- this is often helpful for low-quality source data. - JPEG proper: - * MCU assembly, DCT, quantization. - * Entropy coding (sequential or progressive, Huffman or arithmetic). - -In addition to these modules we need overall control, marker generation, -and support code (memory management & error handling). There is also a -module responsible for physically writing the output data --- typically -this is just an interface to fwrite(), but some applications may need to -do something else with the data. - -The decompressor library contains the following main elements: - - JPEG proper: - * Entropy decoding (sequential or progressive, Huffman or arithmetic). - * Dequantization, inverse DCT, MCU disassembly. - Postprocessing: - * Upsampling. Optionally, this step may be able to do more general - rescaling of the image. - * Color space conversion (e.g., YCbCr to RGB). This step may also - provide gamma adjustment [ currently it does not ]. - * Optional color quantization (e.g., reduction to 256 colors). - * Optional color precision reduction (e.g., 24-bit to 15-bit color). - [This feature is not currently implemented.] - -We also need overall control, marker parsing, and a data source module. -The support code (memory management & error handling) can be shared with -the compression half of the library. - -There may be several implementations of each of these elements, particularly -in the decompressor, where a wide range of speed/quality tradeoffs is very -useful. It must be understood that some of the best speedups involve -merging adjacent steps in the pipeline. For example, upsampling, color space -conversion, and color quantization might all be done at once when using a -low-quality ordered-dither technique. The system architecture is designed to -allow such merging where appropriate. - - -Note: it is convenient to regard edge expansion (padding to block boundaries) -as a preprocessing/postprocessing function, even though the JPEG spec includes -it in compression/decompression. We do this because downsampling/upsampling -can be simplified a little if they work on padded data: it's not necessary to -have special cases at the right and bottom edges. Therefore the interface -buffer is always an integral number of blocks wide and high, and we expect -compression preprocessing to pad the source data properly. Padding will occur -only to the next block (block_size-sample) boundary. In an interleaved-scan -situation, additional dummy blocks may be used to fill out MCUs, but the MCU -assembly and disassembly logic will create or discard these blocks internally. -(This is advantageous for speed reasons, since we avoid DCTing the dummy -blocks. It also permits a small reduction in file size, because the -compressor can choose dummy block contents so as to minimize their size -in compressed form. Finally, it makes the interface buffer specification -independent of whether the file is actually interleaved or not.) -Applications that wish to deal directly with the downsampled data must -provide similar buffering and padding for odd-sized images. - - -*** Poor man's object-oriented programming *** - -It should be clear by now that we have a lot of quasi-independent processing -steps, many of which have several possible behaviors. To avoid cluttering the -code with lots of switch statements, we use a simple form of object-style -programming to separate out the different possibilities. - -For example, two different color quantization algorithms could be implemented -as two separate modules that present the same external interface; at runtime, -the calling code will access the proper module indirectly through an "object". - -We can get the limited features we need while staying within portable C. -The basic tool is a function pointer. An "object" is just a struct -containing one or more function pointer fields, each of which corresponds to -a method name in real object-oriented languages. During initialization we -fill in the function pointers with references to whichever module we have -determined we need to use in this run. Then invocation of the module is done -by indirecting through a function pointer; on most machines this is no more -expensive than a switch statement, which would be the only other way of -making the required run-time choice. The really significant benefit, of -course, is keeping the source code clean and well structured. - -We can also arrange to have private storage that varies between different -implementations of the same kind of object. We do this by making all the -module-specific object structs be separately allocated entities, which will -be accessed via pointers in the master compression or decompression struct. -The "public" fields or methods for a given kind of object are specified by -a commonly known struct. But a module's initialization code can allocate -a larger struct that contains the common struct as its first member, plus -additional private fields. With appropriate pointer casting, the module's -internal functions can access these private fields. (For a simple example, -see jdatadst.c, which implements the external interface specified by struct -jpeg_destination_mgr, but adds extra fields.) - -(Of course this would all be a lot easier if we were using C++, but we are -not yet prepared to assume that everyone has a C++ compiler.) - -An important benefit of this scheme is that it is easy to provide multiple -versions of any method, each tuned to a particular case. While a lot of -precalculation might be done to select an optimal implementation of a method, -the cost per invocation is constant. For example, the upsampling step might -have a "generic" method, plus one or more "hardwired" methods for the most -popular sampling factors; the hardwired methods would be faster because they'd -use straight-line code instead of for-loops. The cost to determine which -method to use is paid only once, at startup, and the selection criteria are -hidden from the callers of the method. - -This plan differs a little bit from usual object-oriented structures, in that -only one instance of each object class will exist during execution. The -reason for having the class structure is that on different runs we may create -different instances (choose to execute different modules). You can think of -the term "method" as denoting the common interface presented by a particular -set of interchangeable functions, and "object" as denoting a group of related -methods, or the total shared interface behavior of a group of modules. - - -*** Overall control structure *** - -We previously mentioned the need for overall control logic in the compression -and decompression libraries. In IJG implementations prior to v5, overall -control was mostly provided by "pipeline control" modules, which proved to be -large, unwieldy, and hard to understand. To improve the situation, the -control logic has been subdivided into multiple modules. The control modules -consist of: - -1. Master control for module selection and initialization. This has two -responsibilities: - - 1A. Startup initialization at the beginning of image processing. - The individual processing modules to be used in this run are selected - and given initialization calls. - - 1B. Per-pass control. This determines how many passes will be performed - and calls each active processing module to configure itself - appropriately at the beginning of each pass. End-of-pass processing, - where necessary, is also invoked from the master control module. - - Method selection is partially distributed, in that a particular processing - module may contain several possible implementations of a particular method, - which it will select among when given its initialization call. The master - control code need only be concerned with decisions that affect more than - one module. - -2. Data buffering control. A separate control module exists for each - inter-processing-step data buffer. This module is responsible for - invoking the processing steps that write or read that data buffer. - -Each buffer controller sees the world as follows: - -input data => processing step A => buffer => processing step B => output data - | | | - ------------------ controller ------------------ - -The controller knows the dataflow requirements of steps A and B: how much data -they want to accept in one chunk and how much they output in one chunk. Its -function is to manage its buffer and call A and B at the proper times. - -A data buffer control module may itself be viewed as a processing step by a -higher-level control module; thus the control modules form a binary tree with -elementary processing steps at the leaves of the tree. - -The control modules are objects. A considerable amount of flexibility can -be had by replacing implementations of a control module. For example: -* Merging of adjacent steps in the pipeline is done by replacing a control - module and its pair of processing-step modules with a single processing- - step module. (Hence the possible merges are determined by the tree of - control modules.) -* In some processing modes, a given interstep buffer need only be a "strip" - buffer large enough to accommodate the desired data chunk sizes. In other - modes, a full-image buffer is needed and several passes are required. - The control module determines which kind of buffer is used and manipulates - virtual array buffers as needed. One or both processing steps may be - unaware of the multi-pass behavior. - -In theory, we might be able to make all of the data buffer controllers -interchangeable and provide just one set of implementations for all. In -practice, each one contains considerable special-case processing for its -particular job. The buffer controller concept should be regarded as an -overall system structuring principle, not as a complete description of the -task performed by any one controller. - - -*** Compression object structure *** - -Here is a sketch of the logical structure of the JPEG compression library: - - |-- Colorspace conversion - |-- Preprocessing controller --| - | |-- Downsampling -Main controller --| - | |-- Forward DCT, quantize - |-- Coefficient controller --| - |-- Entropy encoding - -This sketch also describes the flow of control (subroutine calls) during -typical image data processing. Each of the components shown in the diagram is -an "object" which may have several different implementations available. One -or more source code files contain the actual implementation(s) of each object. - -The objects shown above are: - -* Main controller: buffer controller for the subsampled-data buffer, which - holds the preprocessed input data. This controller invokes preprocessing to - fill the subsampled-data buffer, and JPEG compression to empty it. There is - usually no need for a full-image buffer here; a strip buffer is adequate. - -* Preprocessing controller: buffer controller for the downsampling input data - buffer, which lies between colorspace conversion and downsampling. Note - that a unified conversion/downsampling module would probably replace this - controller entirely. - -* Colorspace conversion: converts application image data into the desired - JPEG color space; also changes the data from pixel-interleaved layout to - separate component planes. Processes one pixel row at a time. - -* Downsampling: performs reduction of chroma components as required. - Optionally may perform pixel-level smoothing as well. Processes a "row - group" at a time, where a row group is defined as Vmax pixel rows of each - component before downsampling, and Vk sample rows afterwards (remember Vk - differs across components). Some downsampling or smoothing algorithms may - require context rows above and below the current row group; the - preprocessing controller is responsible for supplying these rows via proper - buffering. The downsampler is responsible for edge expansion at the right - edge (i.e., extending each sample row to a multiple of block_size samples); - but the preprocessing controller is responsible for vertical edge expansion - (i.e., duplicating the bottom sample row as needed to make a multiple of - block_size rows). - -* Coefficient controller: buffer controller for the DCT-coefficient data. - This controller handles MCU assembly, including insertion of dummy DCT - blocks when needed at the right or bottom edge. When performing - Huffman-code optimization or emitting a multiscan JPEG file, this - controller is responsible for buffering the full image. The equivalent of - one fully interleaved MCU row of subsampled data is processed per call, - even when the JPEG file is noninterleaved. - -* Forward DCT and quantization: Perform DCT, quantize, and emit coefficients. - Works on one or more DCT blocks at a time. (Note: the coefficients are now - emitted in normal array order, which the entropy encoder is expected to - convert to zigzag order as necessary. Prior versions of the IJG code did - the conversion to zigzag order within the quantization step.) - -* Entropy encoding: Perform Huffman or arithmetic entropy coding and emit the - coded data to the data destination module. Works on one MCU per call. - For progressive JPEG, the same DCT blocks are fed to the entropy coder - during each pass, and the coder must emit the appropriate subset of - coefficients. - -In addition to the above objects, the compression library includes these -objects: - -* Master control: determines the number of passes required, controls overall - and per-pass initialization of the other modules. - -* Marker writing: generates JPEG markers (except for RSTn, which is emitted - by the entropy encoder when needed). - -* Data destination manager: writes the output JPEG datastream to its final - destination (e.g., a file). The destination manager supplied with the - library knows how to write to a stdio stream or to a memory buffer; - for other behaviors, the surrounding application may provide its own - destination manager. - -* Memory manager: allocates and releases memory, controls virtual arrays - (with backing store management, where required). - -* Error handler: performs formatting and output of error and trace messages; - determines handling of nonfatal errors. The surrounding application may - override some or all of this object's methods to change error handling. - -* Progress monitor: supports output of "percent-done" progress reports. - This object represents an optional callback to the surrounding application: - if wanted, it must be supplied by the application. - -The error handler, destination manager, and progress monitor objects are -defined as separate objects in order to simplify application-specific -customization of the JPEG library. A surrounding application may override -individual methods or supply its own all-new implementation of one of these -objects. The object interfaces for these objects are therefore treated as -part of the application interface of the library, whereas the other objects -are internal to the library. - -The error handler and memory manager are shared by JPEG compression and -decompression; the progress monitor, if used, may be shared as well. - - -*** Decompression object structure *** - -Here is a sketch of the logical structure of the JPEG decompression library: - - |-- Entropy decoding - |-- Coefficient controller --| - | |-- Dequantize, Inverse DCT -Main controller --| - | |-- Upsampling - |-- Postprocessing controller --| |-- Colorspace conversion - |-- Color quantization - |-- Color precision reduction - -As before, this diagram also represents typical control flow. The objects -shown are: - -* Main controller: buffer controller for the subsampled-data buffer, which - holds the output of JPEG decompression proper. This controller's primary - task is to feed the postprocessing procedure. Some upsampling algorithms - may require context rows above and below the current row group; when this - is true, the main controller is responsible for managing its buffer so as - to make context rows available. In the current design, the main buffer is - always a strip buffer; a full-image buffer is never required. - -* Coefficient controller: buffer controller for the DCT-coefficient data. - This controller handles MCU disassembly, including deletion of any dummy - DCT blocks at the right or bottom edge. When reading a multiscan JPEG - file, this controller is responsible for buffering the full image. - (Buffering DCT coefficients, rather than samples, is necessary to support - progressive JPEG.) The equivalent of one fully interleaved MCU row of - subsampled data is processed per call, even when the source JPEG file is - noninterleaved. - -* Entropy decoding: Read coded data from the data source module and perform - Huffman or arithmetic entropy decoding. Works on one MCU per call. - For progressive JPEG decoding, the coefficient controller supplies the prior - coefficients of each MCU (initially all zeroes), which the entropy decoder - modifies in each scan. - -* Dequantization and inverse DCT: like it says. Note that the coefficients - buffered by the coefficient controller have NOT been dequantized; we - merge dequantization and inverse DCT into a single step for speed reasons. - When scaled-down output is asked for, simplified DCT algorithms may be used - that need fewer coefficients and emit fewer samples per DCT block, not the - full 8x8. Works on one DCT block at a time. - -* Postprocessing controller: buffer controller for the color quantization - input buffer, when quantization is in use. (Without quantization, this - controller just calls the upsampler.) For two-pass quantization, this - controller is responsible for buffering the full-image data. - -* Upsampling: restores chroma components to full size. (May support more - general output rescaling, too. Note that if undersized DCT outputs have - been emitted by the DCT module, this module must adjust so that properly - sized outputs are created.) Works on one row group at a time. This module - also calls the color conversion module, so its top level is effectively a - buffer controller for the upsampling->color conversion buffer. However, in - all but the highest-quality operating modes, upsampling and color - conversion are likely to be merged into a single step. - -* Colorspace conversion: convert from JPEG color space to output color space, - and change data layout from separate component planes to pixel-interleaved. - Works on one pixel row at a time. - -* Color quantization: reduce the data to colormapped form, using either an - externally specified colormap or an internally generated one. This module - is not used for full-color output. Works on one pixel row at a time; may - require two passes to generate a color map. Note that the output will - always be a single component representing colormap indexes. In the current - design, the output values are JSAMPLEs, so an 8-bit compilation cannot - quantize to more than 256 colors. This is unlikely to be a problem in - practice. - -* Color reduction: this module handles color precision reduction, e.g., - generating 15-bit color (5 bits/primary) from JPEG's 24-bit output. - Not quite clear yet how this should be handled... should we merge it with - colorspace conversion??? - -Note that some high-speed operating modes might condense the entire -postprocessing sequence to a single module (upsample, color convert, and -quantize in one step). - -In addition to the above objects, the decompression library includes these -objects: - -* Master control: determines the number of passes required, controls overall - and per-pass initialization of the other modules. This is subdivided into - input and output control: jdinput.c controls only input-side processing, - while jdmaster.c handles overall initialization and output-side control. - -* Marker reading: decodes JPEG markers (except for RSTn). - -* Data source manager: supplies the input JPEG datastream. The source - manager supplied with the library knows how to read from a stdio stream - or from a memory buffer; for other behaviors, the surrounding application - may provide its own source manager. - -* Memory manager: same as for compression library. - -* Error handler: same as for compression library. - -* Progress monitor: same as for compression library. - -As with compression, the data source manager, error handler, and progress -monitor are candidates for replacement by a surrounding application. - - -*** Decompression input and output separation *** - -To support efficient incremental display of progressive JPEG files, the -decompressor is divided into two sections that can run independently: - -1. Data input includes marker parsing, entropy decoding, and input into the - coefficient controller's DCT coefficient buffer. Note that this - processing is relatively cheap and fast. - -2. Data output reads from the DCT coefficient buffer and performs the IDCT - and all postprocessing steps. - -For a progressive JPEG file, the data input processing is allowed to get -arbitrarily far ahead of the data output processing. (This occurs only -if the application calls jpeg_consume_input(); otherwise input and output -run in lockstep, since the input section is called only when the output -section needs more data.) In this way the application can avoid making -extra display passes when data is arriving faster than the display pass -can run. Furthermore, it is possible to abort an output pass without -losing anything, since the coefficient buffer is read-only as far as the -output section is concerned. See libjpeg.txt for more detail. - -A full-image coefficient array is only created if the JPEG file has multiple -scans (or if the application specifies buffered-image mode anyway). When -reading a single-scan file, the coefficient controller normally creates only -a one-MCU buffer, so input and output processing must run in lockstep in this -case. jpeg_consume_input() is effectively a no-op in this situation. - -The main impact of dividing the decompressor in this fashion is that we must -be very careful with shared variables in the cinfo data structure. Each -variable that can change during the course of decompression must be -classified as belonging to data input or data output, and each section must -look only at its own variables. For example, the data output section may not -depend on any of the variables that describe the current scan in the JPEG -file, because these may change as the data input section advances into a new -scan. - -The progress monitor is (somewhat arbitrarily) defined to treat input of the -file as one pass when buffered-image mode is not used, and to ignore data -input work completely when buffered-image mode is used. Note that the -library has no reliable way to predict the number of passes when dealing -with a progressive JPEG file, nor can it predict the number of output passes -in buffered-image mode. So the work estimate is inherently bogus anyway. - -No comparable division is currently made in the compression library, because -there isn't any real need for it. - - -*** Data formats *** - -Arrays of pixel sample values use the following data structure: - - typedef something JSAMPLE; a pixel component value, 0..MAXJSAMPLE - typedef JSAMPLE *JSAMPROW; ptr to a row of samples - typedef JSAMPROW *JSAMPARRAY; ptr to a list of rows - typedef JSAMPARRAY *JSAMPIMAGE; ptr to a list of color-component arrays - -The basic element type JSAMPLE will typically be one of unsigned char, -(signed) char, or short. Short will be used if samples wider than 8 bits are -to be supported (this is a compile-time option). Otherwise, unsigned char is -used if possible. If the compiler only supports signed chars, then it is -necessary to mask off the value when reading. Thus, all reads of JSAMPLE -values must be coded as "GETJSAMPLE(value)", where the macro will be defined -as "((value) & 0xFF)" on signed-char machines and "((int) (value))" elsewhere. - -With these conventions, JSAMPLE values can be assumed to be >= 0. This helps -simplify correct rounding during downsampling, etc. The JPEG standard's -specification that sample values run from -128..127 is accommodated by -subtracting 128 from the sample value in the DCT step. Similarly, during -decompression the output of the IDCT step will be immediately shifted back to -0..255. (NB: different values are required when 12-bit samples are in use. -The code is written in terms of MAXJSAMPLE and CENTERJSAMPLE, which will be -defined as 255 and 128 respectively in an 8-bit implementation, and as 4095 -and 2048 in a 12-bit implementation.) - -We use a pointer per row, rather than a two-dimensional JSAMPLE array. This -choice costs only a small amount of memory and has several benefits: -* Code using the data structure doesn't need to know the allocated width of - the rows. This simplifies edge expansion/compression, since we can work - in an array that's wider than the logical picture width. -* Indexing doesn't require multiplication; this is a performance win on many - machines. -* Arrays with more than 64K total elements can be supported even on machines - where malloc() cannot allocate chunks larger than 64K. -* The rows forming a component array may be allocated at different times - without extra copying. This trick allows some speedups in smoothing steps - that need access to the previous and next rows. - -Note that each color component is stored in a separate array; we don't use the -traditional layout in which the components of a pixel are stored together. -This simplifies coding of modules that work on each component independently, -because they don't need to know how many components there are. Furthermore, -we can read or write each component to a temporary file independently, which -is helpful when dealing with noninterleaved JPEG files. - -In general, a specific sample value is accessed by code such as - GETJSAMPLE(image[colorcomponent][row][col]) -where col is measured from the image left edge, but row is measured from the -first sample row currently in memory. Either of the first two indexings can -be precomputed by copying the relevant pointer. - - -Since most image-processing applications prefer to work on images in which -the components of a pixel are stored together, the data passed to or from the -surrounding application uses the traditional convention: a single pixel is -represented by N consecutive JSAMPLE values, and an image row is an array of -(# of color components)*(image width) JSAMPLEs. One or more rows of data can -be represented by a pointer of type JSAMPARRAY in this scheme. This scheme is -converted to component-wise storage inside the JPEG library. (Applications -that want to skip JPEG preprocessing or postprocessing will have to contend -with component-wise storage.) - - -Arrays of DCT-coefficient values use the following data structure: - - typedef short JCOEF; a 16-bit signed integer - typedef JCOEF JBLOCK[DCTSIZE2]; an 8x8 block of coefficients - typedef JBLOCK *JBLOCKROW; ptr to one horizontal row of 8x8 blocks - typedef JBLOCKROW *JBLOCKARRAY; ptr to a list of such rows - typedef JBLOCKARRAY *JBLOCKIMAGE; ptr to a list of color component arrays - -The underlying type is at least a 16-bit signed integer; while "short" is big -enough on all machines of interest, on some machines it is preferable to use -"int" for speed reasons, despite the storage cost. Coefficients are grouped -into 8x8 blocks (but we always use #defines DCTSIZE and DCTSIZE2 rather than -"8" and "64"). - -The contents of a coefficient block may be in either "natural" or zigzagged -order, and may be true values or divided by the quantization coefficients, -depending on where the block is in the processing pipeline. In the current -library, coefficient blocks are kept in natural order everywhere; the entropy -codecs zigzag or dezigzag the data as it is written or read. The blocks -contain quantized coefficients everywhere outside the DCT/IDCT subsystems. -(This latter decision may need to be revisited to support variable -quantization a la JPEG Part 3.) - -Notice that the allocation unit is now a row of 8x8 coefficient blocks, -corresponding to block_size rows of samples. Otherwise the structure -is much the same as for samples, and for the same reasons. - -On machines where malloc() can't handle a request bigger than 64Kb, this data -structure limits us to rows of less than 512 JBLOCKs, or a picture width of -4000+ pixels. This seems an acceptable restriction. - - -On 80x86 machines, the bottom-level pointer types (JSAMPROW and JBLOCKROW) -must be declared as "far" pointers, but the upper levels can be "near" -(implying that the pointer lists are allocated in the DS segment). -We use a #define symbol FAR, which expands to the "far" keyword when -compiling on 80x86 machines and to nothing elsewhere. - - -*** Suspendable processing *** - -In some applications it is desirable to use the JPEG library as an -incremental, memory-to-memory filter. In this situation the data source or -destination may be a limited-size buffer, and we can't rely on being able to -empty or refill the buffer at arbitrary times. Instead the application would -like to have control return from the library at buffer overflow/underrun, and -then resume compression or decompression at a later time. - -This scenario is supported for simple cases. (For anything more complex, we -recommend that the application "bite the bullet" and develop real multitasking -capability.) The libjpeg.txt file goes into more detail about the usage and -limitations of this capability; here we address the implications for library -structure. - -The essence of the problem is that the entropy codec (coder or decoder) must -be prepared to stop at arbitrary times. In turn, the controllers that call -the entropy codec must be able to stop before having produced or consumed all -the data that they normally would handle in one call. That part is reasonably -straightforward: we make the controller call interfaces include "progress -counters" which indicate the number of data chunks successfully processed, and -we require callers to test the counter rather than just assume all of the data -was processed. - -Rather than trying to restart at an arbitrary point, the current Huffman -codecs are designed to restart at the beginning of the current MCU after a -suspension due to buffer overflow/underrun. At the start of each call, the -codec's internal state is loaded from permanent storage (in the JPEG object -structures) into local variables. On successful completion of the MCU, the -permanent state is updated. (This copying is not very expensive, and may even -lead to *improved* performance if the local variables can be registerized.) -If a suspension occurs, the codec simply returns without updating the state, -thus effectively reverting to the start of the MCU. Note that this implies -leaving some data unprocessed in the source/destination buffer (ie, the -compressed partial MCU). The data source/destination module interfaces are -specified so as to make this possible. This also implies that the data buffer -must be large enough to hold a worst-case compressed MCU; a couple thousand -bytes should be enough. - -In a successive-approximation AC refinement scan, the progressive Huffman -decoder has to be able to undo assignments of newly nonzero coefficients if it -suspends before the MCU is complete, since decoding requires distinguishing -previously-zero and previously-nonzero coefficients. This is a bit tedious -but probably won't have much effect on performance. Other variants of Huffman -decoding need not worry about this, since they will just store the same values -again if forced to repeat the MCU. - -This approach would probably not work for an arithmetic codec, since its -modifiable state is quite large and couldn't be copied cheaply. Instead it -would have to suspend and resume exactly at the point of the buffer end. - -The JPEG marker reader is designed to cope with suspension at an arbitrary -point. It does so by backing up to the start of the marker parameter segment, -so the data buffer must be big enough to hold the largest marker of interest. -Again, a couple KB should be adequate. (A special "skip" convention is used -to bypass COM and APPn markers, so these can be larger than the buffer size -without causing problems; otherwise a 64K buffer would be needed in the worst -case.) - -The JPEG marker writer currently does *not* cope with suspension. -We feel that this is not necessary; it is much easier simply to require -the application to ensure there is enough buffer space before starting. (An -empty 2K buffer is more than sufficient for the header markers; and ensuring -there are a dozen or two bytes available before calling jpeg_finish_compress() -will suffice for the trailer.) This would not work for writing multi-scan -JPEG files, but we simply do not intend to support that capability with -suspension. - - -*** Memory manager services *** - -The JPEG library's memory manager controls allocation and deallocation of -memory, and it manages large "virtual" data arrays on machines where the -operating system does not provide virtual memory. Note that the same -memory manager serves both compression and decompression operations. - -In all cases, allocated objects are tied to a particular compression or -decompression master record, and they will be released when that master -record is destroyed. - -The memory manager does not provide explicit deallocation of objects. -Instead, objects are created in "pools" of free storage, and a whole pool -can be freed at once. This approach helps prevent storage-leak bugs, and -it speeds up operations whenever malloc/free are slow (as they often are). -The pools can be regarded as lifetime identifiers for objects. Two -pools/lifetimes are defined: - * JPOOL_PERMANENT lasts until master record is destroyed - * JPOOL_IMAGE lasts until done with image (JPEG datastream) -Permanent lifetime is used for parameters and tables that should be carried -across from one datastream to another; this includes all application-visible -parameters. Image lifetime is used for everything else. (A third lifetime, -JPOOL_PASS = one processing pass, was originally planned. However it was -dropped as not being worthwhile. The actual usage patterns are such that the -peak memory usage would be about the same anyway; and having per-pass storage -substantially complicates the virtual memory allocation rules --- see below.) - -The memory manager deals with three kinds of object: -1. "Small" objects. Typically these require no more than 10K-20K total. -2. "Large" objects. These may require tens to hundreds of K depending on - image size. Semantically they behave the same as small objects, but we - distinguish them for two reasons: - * On MS-DOS machines, large objects are referenced by FAR pointers, - small objects by NEAR pointers. - * Pool allocation heuristics may differ for large and small objects. - Note that individual "large" objects cannot exceed the size allowed by - type size_t, which may be 64K or less on some machines. -3. "Virtual" objects. These are large 2-D arrays of JSAMPLEs or JBLOCKs - (typically large enough for the entire image being processed). The - memory manager provides stripwise access to these arrays. On machines - without virtual memory, the rest of the array may be swapped out to a - temporary file. - -(Note: JSAMPARRAY and JBLOCKARRAY data structures are a combination of large -objects for the data proper and small objects for the row pointers. For -convenience and speed, the memory manager provides single routines to create -these structures. Similarly, virtual arrays include a small control block -and a JSAMPARRAY or JBLOCKARRAY working buffer, all created with one call.) - -In the present implementation, virtual arrays are only permitted to have image -lifespan. (Permanent lifespan would not be reasonable, and pass lifespan is -not very useful since a virtual array's raison d'etre is to store data for -multiple passes through the image.) We also expect that only "small" objects -will be given permanent lifespan, though this restriction is not required by -the memory manager. - -In a non-virtual-memory machine, some performance benefit can be gained by -making the in-memory buffers for virtual arrays be as large as possible. -(For small images, the buffers might fit entirely in memory, so blind -swapping would be very wasteful.) The memory manager will adjust the height -of the buffers to fit within a prespecified maximum memory usage. In order -to do this in a reasonably optimal fashion, the manager needs to allocate all -of the virtual arrays at once. Therefore, there isn't a one-step allocation -routine for virtual arrays; instead, there is a "request" routine that simply -allocates the control block, and a "realize" routine (called just once) that -determines space allocation and creates all of the actual buffers. The -realize routine must allow for space occupied by non-virtual large objects. -(We don't bother to factor in the space needed for small objects, on the -grounds that it isn't worth the trouble.) - -To support all this, we establish the following protocol for doing business -with the memory manager: - 1. Modules must request virtual arrays (which may have only image lifespan) - during the initial setup phase, i.e., in their jinit_xxx routines. - 2. All "large" objects (including JSAMPARRAYs and JBLOCKARRAYs) must also be - allocated during initial setup. - 3. realize_virt_arrays will be called at the completion of initial setup. - The above conventions ensure that sufficient information is available - for it to choose a good size for virtual array buffers. -Small objects of any lifespan may be allocated at any time. We expect that -the total space used for small objects will be small enough to be negligible -in the realize_virt_arrays computation. - -In a virtual-memory machine, we simply pretend that the available space is -infinite, thus causing realize_virt_arrays to decide that it can allocate all -the virtual arrays as full-size in-memory buffers. The overhead of the -virtual-array access protocol is very small when no swapping occurs. - -A virtual array can be specified to be "pre-zeroed"; when this flag is set, -never-yet-written sections of the array are set to zero before being made -available to the caller. If this flag is not set, never-written sections -of the array contain garbage. (This feature exists primarily because the -equivalent logic would otherwise be needed in jdcoefct.c for progressive -JPEG mode; we may as well make it available for possible other uses.) - -The first write pass on a virtual array is required to occur in top-to-bottom -order; read passes, as well as any write passes after the first one, may -access the array in any order. This restriction exists partly to simplify -the virtual array control logic, and partly because some file systems may not -support seeking beyond the current end-of-file in a temporary file. The main -implication of this restriction is that rearrangement of rows (such as -converting top-to-bottom data order to bottom-to-top) must be handled while -reading data out of the virtual array, not while putting it in. - - -*** Memory manager internal structure *** - -To isolate system dependencies as much as possible, we have broken the -memory manager into two parts. There is a reasonably system-independent -"front end" (jmemmgr.c) and a "back end" that contains only the code -likely to change across systems. All of the memory management methods -outlined above are implemented by the front end. The back end provides -the following routines for use by the front end (none of these routines -are known to the rest of the JPEG code): - -jpeg_mem_init, jpeg_mem_term system-dependent initialization/shutdown - -jpeg_get_small, jpeg_free_small interface to malloc and free library routines - (or their equivalents) - -jpeg_get_large, jpeg_free_large interface to FAR malloc/free in MSDOS machines; - else usually the same as - jpeg_get_small/jpeg_free_small - -jpeg_mem_available estimate available memory - -jpeg_open_backing_store create a backing-store object - -read_backing_store, manipulate a backing-store object -write_backing_store, -close_backing_store - -On some systems there will be more than one type of backing-store object -(specifically, in MS-DOS a backing store file might be an area of extended -memory as well as a disk file). jpeg_open_backing_store is responsible for -choosing how to implement a given object. The read/write/close routines -are method pointers in the structure that describes a given object; this -lets them be different for different object types. - -It may be necessary to ensure that backing store objects are explicitly -released upon abnormal program termination. For example, MS-DOS won't free -extended memory by itself. To support this, we will expect the main program -or surrounding application to arrange to call self_destruct (typically via -jpeg_destroy) upon abnormal termination. This may require a SIGINT signal -handler or equivalent. We don't want to have the back end module install its -own signal handler, because that would pre-empt the surrounding application's -ability to control signal handling. - -The IJG distribution includes several memory manager back end implementations. -Usually the same back end should be suitable for all applications on a given -system, but it is possible for an application to supply its own back end at -need. - - -*** Implications of DNL marker *** - -Some JPEG files may use a DNL marker to postpone definition of the image -height (this would be useful for a fax-like scanner's output, for instance). -In these files the SOF marker claims the image height is 0, and you only -find out the true image height at the end of the first scan. - -We could read these files as follows: -1. Upon seeing zero image height, replace it by 65535 (the maximum allowed). -2. When the DNL is found, update the image height in the global image - descriptor. -This implies that control modules must avoid making copies of the image -height, and must re-test for termination after each MCU row. This would -be easy enough to do. - -In cases where image-size data structures are allocated, this approach will -result in very inefficient use of virtual memory or much-larger-than-necessary -temporary files. This seems acceptable for something that probably won't be a -mainstream usage. People might have to forgo use of memory-hogging options -(such as two-pass color quantization or noninterleaved JPEG files) if they -want efficient conversion of such files. (One could improve efficiency by -demanding a user-supplied upper bound for the height, less than 65536; in most -cases it could be much less.) - -The standard also permits the SOF marker to overestimate the image height, -with a DNL to give the true, smaller height at the end of the first scan. -This would solve the space problems if the overestimate wasn't too great. -However, it implies that you don't even know whether DNL will be used. - -This leads to a couple of very serious objections: -1. Testing for a DNL marker must occur in the inner loop of the decompressor's - Huffman decoder; this implies a speed penalty whether the feature is used - or not. -2. There is no way to hide the last-minute change in image height from an - application using the decoder. Thus *every* application using the IJG - library would suffer a complexity penalty whether it cared about DNL or - not. -We currently do not support DNL because of these problems. - -A different approach is to insist that DNL-using files be preprocessed by a -separate program that reads ahead to the DNL, then goes back and fixes the SOF -marker. This is a much simpler solution and is probably far more efficient. -Even if one wants piped input, buffering the first scan of the JPEG file needs -a lot smaller temp file than is implied by the maximum-height method. For -this approach we'd simply treat DNL as a no-op in the decompressor (at most, -check that it matches the SOF image height). - -We will not worry about making the compressor capable of outputting DNL. -Something similar to the first scheme above could be applied if anyone ever -wants to make that work. diff --git a/Dependencies/FreeImage/Source/LibJPEG/transupp.c b/Dependencies/FreeImage/Source/LibJPEG/transupp.c deleted file mode 100644 index d10f57b..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/transupp.c +++ /dev/null @@ -1,1818 +0,0 @@ -/* - * transupp.c - * - * Copyright (C) 1997-2017, 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(). - */ -#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. - */ - - -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 (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 >= comp_height + y_crop_blocks) { - 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 > comp_width + x_crop_blocks) { - FMEMZERO(dst_buffer[offset_y] + - comp_width + x_crop_blocks, - (compptr->width_in_blocks - - comp_width - x_crop_blocks) * SIZEOF(JBLOCK)); - } - } else { - jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, - dst_buffer[offset_y], - compptr->width_in_blocks); - } - } - } - } -} - - -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_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(*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 - * [f]x[f]{+-}{+-} - * 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(*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 - 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 - 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; - JDIMENSION width_in_iMCUs, height_in_iMCUs; - JDIMENSION width_in_blocks, height_in_blocks; - int 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; - } - break; - } - - /* 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 */ - if (info->transform == 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); - } else { - /* 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; - } - - /* 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 */ - switch (info->transform) { - case JXFORM_TRANSPOSE: - case JXFORM_TRANSVERSE: - case JXFORM_ROT_90: - case JXFORM_ROT_270: - transpose_critical_parameters(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) - do_crop_ext(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_FORCE) - do_wipe(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_coef_arrays, info->drop_width, info->drop_height); - else - do_flatten(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, - src_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/Dependencies/FreeImage/Source/LibJPEG/transupp.h b/Dependencies/FreeImage/Source/LibJPEG/transupp.h deleted file mode 100644 index eee6931..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/transupp.h +++ /dev/null @@ -1,219 +0,0 @@ -/* - * transupp.h - * - * Copyright (C) 1997-2013, 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. - * - * 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_CODE; - -/* - * Codes for crop parameters, which can individually be unspecified, - * positive or negative for xoffset or yoffset, - * positive or forced for width or height. - */ - -typedef enum { - JCROP_UNSET, - JCROP_POS, - JCROP_NEG, - JCROP_FORCE -} 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 */ - - /* 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; /* (forced disables adjustment) */ - JDIMENSION crop_height; /* Height of selected region */ - JCROP_CODE crop_height_set; /* (forced 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) */ - - /* 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/Dependencies/FreeImage/Source/LibJPEG/usage.txt b/Dependencies/FreeImage/Source/LibJPEG/usage.txt deleted file mode 100644 index d06e3fc..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/usage.txt +++ /dev/null @@ -1,690 +0,0 @@ -USAGE instructions for the Independent JPEG Group's JPEG software -================================================================= - -This file describes usage of the JPEG conversion programs cjpeg and djpeg, -as well as the utility programs jpegtran, rdjpgcom and wrjpgcom. (See -the other documentation files if you wish to use the JPEG library within -your own programs.) - -If you are on a Unix machine you may prefer to read the Unix-style manual -pages in files cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1. - - -INTRODUCTION - -These programs implement JPEG image encoding, decoding, and transcoding. -JPEG (pronounced "jay-peg") is a standardized compression method for -full-color and grayscale images. - - -GENERAL USAGE - -We provide two programs, cjpeg to compress an image file into JPEG format, -and djpeg to decompress a JPEG file back into a conventional image format. - -On Unix-like systems, you say: - cjpeg [switches] [imagefile] >jpegfile -or - djpeg [switches] [jpegfile] >imagefile -The programs read the specified input file, or standard input if none is -named. They always write to standard output (with trace/error messages to -standard error). These conventions are handy for piping images between -programs. - -On most non-Unix systems, you say: - cjpeg [switches] imagefile jpegfile -or - djpeg [switches] jpegfile imagefile -i.e., both the input and output files are named on the command line. This -style is a little more foolproof, and it loses no functionality if you don't -have pipes. (You can get this style on Unix too, if you prefer, by defining -TWO_FILE_COMMANDLINE when you compile the programs; see install.txt.) - -You can also say: - cjpeg [switches] -outfile jpegfile imagefile -or - djpeg [switches] -outfile imagefile jpegfile -This syntax works on all systems, so it is useful for scripts. - -The currently supported image file formats are: PPM (PBMPLUS color format), -PGM (PBMPLUS grayscale format), BMP, Targa, and RLE (Utah Raster Toolkit -format). (RLE is supported only if the URT library is available, which it -isn't on most non-Unix systems.) cjpeg recognizes the input image format -automatically, with the exception of some Targa-format files. You have to -tell djpeg which format to generate. - -JPEG files are in the standard JFIF file format. There are other, -less widely used JPEG-based file formats, but we don't support them. - -All switch names may be abbreviated; for example, -grayscale may be written --gray or -gr. Most of the "basic" switches can be abbreviated to as little as -one letter. Upper and lower case are equivalent (-BMP is the same as -bmp). -British spellings are also accepted (e.g., -greyscale), though for brevity -these are not mentioned below. - - -CJPEG DETAILS - -The basic command line switches for cjpeg are: - - -quality N[,...] Scale quantization tables to adjust image quality. - Quality is 0 (worst) to 100 (best); default is 75. - (See below for more info.) - - -grayscale Create monochrome JPEG file from color input. - Be sure to use this switch when compressing a grayscale - BMP file, because cjpeg isn't bright enough to notice - whether a BMP file uses only shades of gray. By - saying -grayscale, you'll get a smaller JPEG file that - takes less time to process. - - -rgb Create RGB JPEG file. - Using this switch suppresses the conversion from RGB - colorspace input to the default YCbCr JPEG colorspace. - You can use this switch in combination with the - -block N switch (see below) for lossless JPEG coding. - See also the -rgb1 switch below. - - -optimize Perform optimization of entropy encoding parameters. - Without this, default encoding parameters are used. - -optimize usually makes the JPEG file a little smaller, - but cjpeg runs somewhat slower and needs much more - memory. Image quality and speed of decompression are - unaffected by -optimize. - - -progressive Create progressive JPEG file (see below). - - -scale M/N Scale the output image by a factor M/N. Currently - supported scale factors are M/N with all N from 1 to - 16, where M is the destination DCT size, which is 8 by - default (see -block N switch below). - - -targa Input file is Targa format. Targa files that contain - an "identification" field will not be automatically - recognized by cjpeg; for such files you must specify - -targa to make cjpeg treat the input as Targa format. - For most Targa files, you won't need this switch. - -The -quality switch lets you trade off compressed file size against quality of -the reconstructed image: the higher the quality setting, the larger the JPEG -file, and the closer the output image will be to the original input. Normally -you want to use the lowest quality setting (smallest file) that decompresses -into something visually indistinguishable from the original image. For this -purpose the quality setting should be between 50 and 95; the default of 75 is -often about right. If you see defects at -quality 75, then go up 5 or 10 -counts at a time until you are happy with the output image. (The optimal -setting will vary from one image to another.) - --quality 100 will generate a quantization table of all 1's, minimizing loss -in the quantization step (but there is still information loss in subsampling, -as well as roundoff error). This setting is mainly of interest for -experimental purposes. Quality values above about 95 are NOT recommended for -normal use; the compressed file size goes up dramatically for hardly any gain -in output image quality. - -In the other direction, quality values below 50 will produce very small files -of low image quality. Settings around 5 to 10 might be useful in preparing an -index of a large image library, for example. Try -quality 2 (or so) for some -amusing Cubist effects. (Note: quality values below about 25 generate 2-byte -quantization tables, which are considered optional in the JPEG standard. -cjpeg emits a warning message when you give such a quality value, because some -other JPEG programs may be unable to decode the resulting file. Use -baseline -if you need to ensure compatibility at low quality values.) - -The -quality option has been extended in IJG version 7 for support of separate -quality settings for luminance and chrominance (or in general, for every -provided quantization table slot). This feature is useful for high-quality -applications which cannot accept the damage of color data by coarse -subsampling settings. You can now easily reduce the color data amount more -smoothly with finer control without separate subsampling. The resulting file -is fully compliant with standard JPEG decoders. -Note that the -quality ratings refer to the quantization table slots, and that -the last value is replicated if there are more q-table slots than parameters. -The default q-table slots are 0 for luminance and 1 for chrominance with -default tables as given in the JPEG standard. This is compatible with the old -behaviour in case that only one parameter is given, which is then used for -both luminance and chrominance (slots 0 and 1). More or custom quantization -tables can be set with -qtables and assigned to components with -qslots -parameter (see the "wizard" switches below). -CAUTION: You must explicitly add -sample 1x1 for efficient separate color -quality selection, since the default value used by library is 2x2! - -The -progressive switch creates a "progressive JPEG" file. In this type of -JPEG file, the data is stored in multiple scans of increasing quality. If the -file is being transmitted over a slow communications link, the decoder can use -the first scan to display a low-quality image very quickly, and can then -improve the display with each subsequent scan. The final image is exactly -equivalent to a standard JPEG file of the same quality setting, and the total -file size is about the same --- often a little smaller. - -Switches for advanced users: - - -arithmetic Use arithmetic coding. - CAUTION: arithmetic coded JPEG is not yet widely - implemented, so many decoders will be unable to - view an arithmetic coded JPEG file at all. - - -block N Set DCT block size. All N from 1 to 16 are possible. - Default is 8 (baseline format). - Larger values produce higher compression, - smaller values produce higher quality - (exact DCT stage possible with 1 or 2; with the - default quality of 75 and default Luminance qtable - the DCT+Quantization stage is lossless for N=1). - CAUTION: An implementation of the JPEG SmartScale - extension is required for this feature. SmartScale - enabled JPEG is not yet widely implemented, so many - decoders will be unable to view a SmartScale extended - JPEG file at all. - - -rgb1 Create RGB JPEG file with reversible color transform. - Works like the -rgb switch (see above) and inserts a - simple reversible color transform into the processing - which significantly improves the compression. - Use this switch in combination with the -block N - switch (see above) for lossless JPEG coding. - CAUTION: A decoder with inverse color transform - support is required for this feature. Reversible - color transform support is not yet widely implemented, - so many decoders will be unable to view a reversible - color transformed JPEG file at all. - - -bgycc Create big gamut YCC JPEG file. - In this type of encoding the color difference - components are quantized further by a factor of 2 - compared to the normal Cb/Cr values, thus creating - space to allow larger color values with higher - saturation than the normal gamut limits to be encoded. - In order to compensate for the loss of color fidelity - compared to a normal YCC encoded file, the color - quantization tables can be adjusted accordingly. - For example, cjpeg -bgycc -quality 80,90 will give - similar results as cjpeg -quality 80. - CAUTION: For correct decompression a decoder with big - gamut YCC support (JFIF version 2) is required. - An old decoder may or may not display a big gamut YCC - encoded JPEG file, depending on JFIF version check - and corresponding warning/error configuration. - In case of a granted decompression the old decoder - will display the image with half saturated colors. - - -dct int Use integer DCT method (default). - -dct fast Use fast integer DCT (less accurate). - -dct float Use floating-point DCT method. - The float method is very slightly more accurate than - the int method, but is much slower unless your machine - has very fast floating-point hardware. Also note that - results of the floating-point method may vary slightly - across machines, while the integer methods should give - the same results everywhere. The fast integer method - is much less accurate than the other two. - - -nosmooth Don't use high-quality downsampling. - - -restart N Emit a JPEG restart marker every N MCU rows, or every - N MCU blocks if "B" is attached to the number. - -restart 0 (the default) means no restart markers. - - -smooth N Smooth the input image to eliminate dithering noise. - N, ranging from 1 to 100, indicates the strength of - smoothing. 0 (the default) means no smoothing. - - -maxmemory N Set limit for amount of memory to use in processing - large images. Value is in thousands of bytes, or - millions of bytes if "M" is attached to the number. - For example, -max 4m selects 4000000 bytes. If more - space is needed, temporary files will be used. - - -verbose Enable debug printout. More -v's give more printout. - or -debug Also, version information is printed at startup. - -The -restart option inserts extra markers that allow a JPEG decoder to -resynchronize after a transmission error. Without restart markers, any damage -to a compressed file will usually ruin the image from the point of the error -to the end of the image; with restart markers, the damage is usually confined -to the portion of the image up to the next restart marker. Of course, the -restart markers occupy extra space. We recommend -restart 1 for images that -will be transmitted across unreliable networks such as Usenet. - -The -smooth option filters the input to eliminate fine-scale noise. This is -often useful when converting dithered images to JPEG: a moderate smoothing -factor of 10 to 50 gets rid of dithering patterns in the input file, resulting -in a smaller JPEG file and a better-looking image. Too large a smoothing -factor will visibly blur the image, however. - -Switches for wizards: - - -baseline Force baseline-compatible quantization tables to be - generated. This clamps quantization values to 8 bits - even at low quality settings. (This switch is poorly - named, since it does not ensure that the output is - actually baseline JPEG. For example, you can use - -baseline and -progressive together.) - - -qtables file Use the quantization tables given in the specified - text file. - - -qslots N[,...] Select which quantization table to use for each color - component. - - -sample HxV[,...] Set JPEG sampling factors for each color component. - - -scans file Use the scan script given in the specified text file. - -The "wizard" switches are intended for experimentation with JPEG. If you -don't know what you are doing, DON'T USE THEM. These switches are documented -further in the file wizard.txt. - - -DJPEG DETAILS - -The basic command line switches for djpeg are: - - -colors N Reduce image to at most N colors. This reduces the - or -quantize N number of colors used in the output image, so that it - can be displayed on a colormapped display or stored in - a colormapped file format. For example, if you have - an 8-bit display, you'd need to reduce to 256 or fewer - colors. (-colors is the recommended name, -quantize - is provided only for backwards compatibility.) - - -fast Select recommended processing options for fast, low - quality output. (The default options are chosen for - highest quality output.) Currently, this is equivalent - to "-dct fast -nosmooth -onepass -dither ordered". - - -grayscale Force grayscale output even if JPEG file is color. - Useful for viewing on monochrome displays; also, - djpeg runs noticeably faster in this mode. - - -rgb Force RGB output even if JPEG file is grayscale. - This is provided to support applications that don't - want to cope with grayscale as a separate case. - - -scale M/N Scale the output image by a factor M/N. Currently - supported scale factors are M/N with all M from 1 to - 16, where N is the source DCT size, which is 8 for - baseline JPEG. If the /N part is omitted, then M - specifies the DCT scaled size to be applied on the - given input. For baseline JPEG this is equivalent to - M/8 scaling, since the source DCT size for baseline - JPEG is 8. Scaling is handy if the image is larger - than your screen; also, djpeg runs much faster when - scaling down the output. - - -bmp Select BMP output format (Windows flavor). 8-bit - colormapped format is emitted if -colors or -grayscale - is specified, or if the JPEG file is grayscale; - otherwise, 24-bit full-color format is emitted. - - -gif Select GIF output format. Since GIF does not support - more than 256 colors, -colors 256 is assumed (unless - you specify a smaller number of colors). If you - specify -fast, the default number of colors is 216. - - -os2 Select BMP output format (OS/2 1.x flavor). 8-bit - colormapped format is emitted if -colors or -grayscale - is specified, or if the JPEG file is grayscale; - otherwise, 24-bit full-color format is emitted. - - -pnm Select PBMPLUS (PPM/PGM) output format (this is the - default format). PGM is emitted if the JPEG file is - grayscale or if -grayscale is specified; otherwise - PPM is emitted. - - -rle Select RLE output format. (Requires URT library.) - - -targa Select Targa output format. Grayscale format is - emitted if the JPEG file is grayscale or if - -grayscale is specified; otherwise, colormapped format - is emitted if -colors is specified; otherwise, 24-bit - full-color format is emitted. - -Switches for advanced users: - - -dct int Use integer DCT method (default). - -dct fast Use fast integer DCT (less accurate). - -dct float Use floating-point DCT method. - The float method is very slightly more accurate than - the int method, but is much slower unless your machine - has very fast floating-point hardware. Also note that - results of the floating-point method may vary slightly - across machines, while the integer methods should give - the same results everywhere. The fast integer method - is much less accurate than the other two. - - -dither fs Use Floyd-Steinberg dithering in color quantization. - -dither ordered Use ordered dithering in color quantization. - -dither none Do not use dithering in color quantization. - By default, Floyd-Steinberg dithering is applied when - quantizing colors; this is slow but usually produces - the best results. Ordered dither is a compromise - between speed and quality; no dithering is fast but - usually looks awful. Note that these switches have - no effect unless color quantization is being done. - Ordered dither is only available in -onepass mode. - - -map FILE Quantize to the colors used in the specified image - file. This is useful for producing multiple files - with identical color maps, or for forcing a predefined - set of colors to be used. The FILE must be a GIF - or PPM file. This option overrides -colors and - -onepass. - - -nosmooth Don't use high-quality upsampling. - - -onepass Use one-pass instead of two-pass color quantization. - The one-pass method is faster and needs less memory, - but it produces a lower-quality image. -onepass is - ignored unless you also say -colors N. Also, - the one-pass method is always used for grayscale - output (the two-pass method is no improvement then). - - -maxmemory N Set limit for amount of memory to use in processing - large images. Value is in thousands of bytes, or - millions of bytes if "M" is attached to the number. - For example, -max 4m selects 4000000 bytes. If more - space is needed, temporary files will be used. - - -verbose Enable debug printout. More -v's give more printout. - or -debug Also, version information is printed at startup. - - -HINTS FOR CJPEG - -Color GIF files are not the ideal input for JPEG; JPEG is really intended for -compressing full-color (24-bit) images. In particular, don't try to convert -cartoons, line drawings, and other images that have only a few distinct -colors. GIF works great on these, JPEG does not. If you want to convert a -GIF to JPEG, you should experiment with cjpeg's -quality and -smooth options -to get a satisfactory conversion. -smooth 10 or so is often helpful. - -Avoid running an image through a series of JPEG compression/decompression -cycles. Image quality loss will accumulate; after ten or so cycles the image -may be noticeably worse than it was after one cycle. It's best to use a -lossless format while manipulating an image, then convert to JPEG format when -you are ready to file the image away. - -The -optimize option to cjpeg is worth using when you are making a "final" -version for posting or archiving. It's also a win when you are using low -quality settings to make very small JPEG files; the percentage improvement -is often a lot more than it is on larger files. (At present, -optimize -mode is always selected when generating progressive JPEG files.) - -GIF input files are no longer supported, to avoid the Unisys LZW patent -(now expired). -(Conversion of GIF files to JPEG is usually a bad idea anyway.) - - -HINTS FOR DJPEG - -To get a quick preview of an image, use the -grayscale and/or -scale switches. -"-grayscale -scale 1/8" is the fastest case. - -Several options are available that trade off image quality to gain speed. -"-fast" turns on the recommended settings. - -"-dct fast" and/or "-nosmooth" gain speed at a small sacrifice in quality. -When producing a color-quantized image, "-onepass -dither ordered" is fast but -much lower quality than the default behavior. "-dither none" may give -acceptable results in two-pass mode, but is seldom tolerable in one-pass mode. - -If you are fortunate enough to have very fast floating point hardware, -"-dct float" may be even faster than "-dct fast". But on most machines -"-dct float" is slower than "-dct int"; in this case it is not worth using, -because its theoretical accuracy advantage is too small to be significant -in practice. - -Two-pass color quantization requires a good deal of memory; on MS-DOS machines -it may run out of memory even with -maxmemory 0. In that case you can still -decompress, with some loss of image quality, by specifying -onepass for -one-pass quantization. - -To avoid the Unisys LZW patent (now expired), djpeg produces uncompressed GIF -files. These are larger than they should be, but are readable by standard GIF -decoders. - - -HINTS FOR BOTH PROGRAMS - -If more space is needed than will fit in the available main memory (as -determined by -maxmemory), temporary files will be used. (MS-DOS versions -will try to get extended or expanded memory first.) The temporary files are -often rather large: in typical cases they occupy three bytes per pixel, for -example 3*800*600 = 1.44Mb for an 800x600 image. If you don't have enough -free disk space, leave out -progressive and -optimize (for cjpeg) or specify --onepass (for djpeg). - -On MS-DOS, the temporary files are created in the directory named by the TMP -or TEMP environment variable, or in the current directory if neither of those -exist. Amiga implementations put the temp files in the directory named by -JPEGTMP:, so be sure to assign JPEGTMP: to a disk partition with adequate free -space. - -The default memory usage limit (-maxmemory) is set when the software is -compiled. If you get an "insufficient memory" error, try specifying a smaller --maxmemory value, even -maxmemory 0 to use the absolute minimum space. You -may want to recompile with a smaller default value if this happens often. - -On machines that have "environment" variables, you can define the environment -variable JPEGMEM to set the default memory limit. The value is specified as -described for the -maxmemory switch. JPEGMEM overrides the default value -specified when the program was compiled, and itself is overridden by an -explicit -maxmemory switch. - -On MS-DOS machines, -maxmemory is the amount of main (conventional) memory to -use. (Extended or expanded memory is also used if available.) Most -DOS-specific versions of this software do their own memory space estimation -and do not need you to specify -maxmemory. - - -JPEGTRAN - -jpegtran performs various useful transformations of JPEG files. -It can translate the coded representation from one variant of JPEG to another, -for example from baseline JPEG to progressive JPEG or vice versa. It can also -perform some rearrangements of the image data, for example turning an image -from landscape to portrait format by rotation. For EXIF files and JPEG files -containing Exif data, you may prefer to use exiftran instead. - -jpegtran works by rearranging the compressed data (DCT coefficients), without -ever fully decoding the image. Therefore, its transformations are lossless: -there is no image degradation at all, which would not be true if you used -djpeg followed by cjpeg to accomplish the same conversion. But by the same -token, jpegtran cannot perform lossy operations such as changing the image -quality. However, while the image data is losslessly transformed, metadata -can be removed. See the -copy option for specifics. - -jpegtran uses a command line syntax similar to cjpeg or djpeg. -On Unix-like systems, you say: - jpegtran [switches] [inputfile] >outputfile -On most non-Unix systems, you say: - jpegtran [switches] inputfile outputfile -where both the input and output files are JPEG files. - -To specify the coded JPEG representation used in the output file, -jpegtran accepts a subset of the switches recognized by cjpeg: - -optimize Perform optimization of entropy encoding parameters. - -progressive Create progressive JPEG file. - -arithmetic Use arithmetic coding. - -restart N Emit a JPEG restart marker every N MCU rows, or every - N MCU blocks if "B" is attached to the number. - -scans file Use the scan script given in the specified text file. -See the previous discussion of cjpeg for more details about these switches. -If you specify none of these switches, you get a plain baseline-JPEG output -file. The quality setting and so forth are determined by the input file. - -The image can be losslessly transformed by giving one of these switches: - -flip horizontal Mirror image horizontally (left-right). - -flip vertical Mirror image vertically (top-bottom). - -rotate 90 Rotate image 90 degrees clockwise. - -rotate 180 Rotate image 180 degrees. - -rotate 270 Rotate image 270 degrees clockwise (or 90 ccw). - -transpose Transpose image (across UL-to-LR axis). - -transverse Transverse transpose (across UR-to-LL axis). - -The transpose transformation has no restrictions regarding image dimensions. -The other transformations operate rather oddly if the image dimensions are not -a multiple of the iMCU size (usually 8 or 16 pixels), because they can only -transform complete blocks of DCT coefficient data in the desired way. - -jpegtran's default behavior when transforming an odd-size image is designed -to preserve exact reversibility and mathematical consistency of the -transformation set. As stated, transpose is able to flip the entire image -area. Horizontal mirroring leaves any partial iMCU column at the right edge -untouched, but is able to flip all rows of the image. Similarly, vertical -mirroring leaves any partial iMCU row at the bottom edge untouched, but is -able to flip all columns. The other transforms can be built up as sequences -of transpose and flip operations; for consistency, their actions on edge -pixels are defined to be the same as the end result of the corresponding -transpose-and-flip sequence. - -For practical use, you may prefer to discard any untransformable edge pixels -rather than having a strange-looking strip along the right and/or bottom edges -of a transformed image. To do this, add the -trim switch: - -trim Drop non-transformable edge blocks. -Obviously, a transformation with -trim is not reversible, so strictly speaking -jpegtran with this switch is not lossless. Also, the expected mathematical -equivalences between the transformations no longer hold. For example, -"-rot 270 -trim" trims only the bottom edge, but "-rot 90 -trim" followed by -"-rot 180 -trim" trims both edges. - -If you are only interested in perfect transformation, add the -perfect switch: - -perfect Fails with an error if the transformation is not - perfect. -For example you may want to do - jpegtran -rot 90 -perfect foo.jpg || djpeg foo.jpg | pnmflip -r90 | cjpeg -to do a perfect rotation if available or an approximated one if not. - -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 by -attaching an 'f' character ("force") to the width or height number. - -The image can be losslessly cropped by giving the switch: - -crop WxH+X+Y Crop to a rectangular subarea of width W, height H - starting at point X,Y. - -A complementary lossless-wipe option is provided to discard (gray out) data -inside a given image region while losslessly preserving what is outside: - -wipe WxH+X+Y Wipe (gray out) a rectangular subarea of - width W, height H starting at point X,Y. - -Attaching an 'f' character ("flatten") to the width number will fill -the region with the average of adjacent blocks, instead of gray out. - -Other not-strictly-lossless transformation switches are: - - -grayscale Force grayscale output. -This option discards the chrominance channels if the input image is YCbCr -(ie, a standard color JPEG), resulting in a grayscale JPEG file. The -luminance channel is preserved exactly, so this is a better method of reducing -to grayscale than decompression, conversion, and recompression. This switch -is particularly handy for fixing a monochrome picture that was mistakenly -encoded as a color JPEG. (In such a case, the space savings from getting rid -of the near-empty chroma channels won't be large; but the decoding time for -a grayscale JPEG is substantially less than that for a color JPEG.) - - -scale M/N Scale the output image by a factor M/N. -Currently supported scale factors are M/N with all M from 1 to 16, where N is -the source DCT size, which is 8 for baseline JPEG. If the /N part is omitted, -then M specifies the DCT scaled size to be applied on the given input. For -baseline JPEG this is equivalent to M/8 scaling, since the source DCT size -for baseline JPEG is 8. CAUTION: An implementation of the JPEG SmartScale -extension is required for this feature. SmartScale enabled JPEG is not yet -widely implemented, so many decoders will be unable to view a SmartScale -extended JPEG file at all. - -jpegtran also recognizes these switches that control what to do with "extra" -markers, such as comment blocks: - -copy none Copy no extra markers from source file. - This setting suppresses all comments - and other metadata in the source file. - -copy comments Copy only comment markers. - This setting copies comments from the source file, - but discards any other metadata. - -copy all Copy all extra markers. This setting preserves - metadata found in the source file, such as JFIF - thumbnails, Exif data, and Photoshop settings. - In some files these extra markers can be sizable. - Note that this option will copy thumbnails as-is; - they will not be transformed. -The default behavior is -copy comments. (Note: in IJG releases v6 and v6a, -jpegtran always did the equivalent of -copy none.) - -Additional switches recognized by jpegtran are: - -outfile filename - -maxmemory N - -verbose - -debug -These work the same as in cjpeg or djpeg. - - -THE COMMENT UTILITIES - -The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. -Although the standard doesn't actually define what COM blocks are for, they -are widely used to hold user-supplied text strings. This lets you add -annotations, titles, index terms, etc to your JPEG files, and later retrieve -them as text. COM blocks do not interfere with the image stored in the JPEG -file. The maximum size of a COM block is 64K, but you can have as many of -them as you like in one JPEG file. - -We provide two utility programs to display COM block contents and add COM -blocks to a JPEG file. - -rdjpgcom searches a JPEG file and prints the contents of any COM blocks on -standard output. The command line syntax is - rdjpgcom [-raw] [-verbose] [inputfilename] -The switch "-raw" (or just "-r") causes rdjpgcom to also output non-printable -characters in comments, which are normally escaped for security reasons. -The switch "-verbose" (or just "-v") causes rdjpgcom to also display the JPEG -image dimensions. If you omit the input file name from the command line, -the JPEG file is read from standard input. (This may not work on some -operating systems, if binary data can't be read from stdin.) - -wrjpgcom adds a COM block, containing text you provide, to a JPEG file. -Ordinarily, the COM block is added after any existing COM blocks, but you -can delete the old COM blocks if you wish. wrjpgcom produces a new JPEG -file; it does not modify the input file. DO NOT try to overwrite the input -file by directing wrjpgcom's output back into it; on most systems this will -just destroy your file. - -The command line syntax for wrjpgcom is similar to cjpeg's. On Unix-like -systems, it is - wrjpgcom [switches] [inputfilename] -The output file is written to standard output. The input file comes from -the named file, or from standard input if no input file is named. - -On most non-Unix systems, the syntax is - wrjpgcom [switches] inputfilename outputfilename -where both input and output file names must be given explicitly. - -wrjpgcom understands three switches: - -replace Delete any existing COM blocks from the file. - -comment "Comment text" Supply new COM text on command line. - -cfile name Read text for new COM block from named file. -(Switch names can be abbreviated.) If you have only one line of comment text -to add, you can provide it on the command line with -comment. The comment -text must be surrounded with quotes so that it is treated as a single -argument. Longer comments can be read from a text file. - -If you give neither -comment nor -cfile, then wrjpgcom will read the comment -text from standard input. (In this case an input image file name MUST be -supplied, so that the source JPEG file comes from somewhere else.) You can -enter multiple lines, up to 64KB worth. Type an end-of-file indicator -(usually control-D or control-Z) to terminate the comment text entry. - -wrjpgcom will not add a COM block if the provided comment string is empty. -Therefore -replace -comment "" can be used to delete all COM blocks from a -file. - -These utility programs do not depend on the IJG JPEG library. In -particular, the source code for rdjpgcom is intended as an illustration of -the minimum amount of code required to parse a JPEG file header correctly. diff --git a/Dependencies/FreeImage/Source/LibJPEG/wizard.txt b/Dependencies/FreeImage/Source/LibJPEG/wizard.txt deleted file mode 100644 index 54170b2..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/wizard.txt +++ /dev/null @@ -1,211 +0,0 @@ -Advanced usage instructions for the Independent JPEG Group's JPEG software -========================================================================== - -This file describes cjpeg's "switches for wizards". - -The "wizard" switches are intended for experimentation with JPEG by persons -who are reasonably knowledgeable about the JPEG standard. If you don't know -what you are doing, DON'T USE THESE SWITCHES. You'll likely produce files -with worse image quality and/or poorer compression than you'd get from the -default settings. Furthermore, these switches must be used with caution -when making files intended for general use, because not all JPEG decoders -will support unusual JPEG parameter settings. - - -Quantization Table Adjustment ------------------------------ - -Ordinarily, cjpeg starts with a default set of tables (the same ones given -as examples in the JPEG standard) and scales them up or down according to -the -quality setting. The details of the scaling algorithm can be found in -jcparam.c. At very low quality settings, some quantization table entries -can get scaled up to values exceeding 255. Although 2-byte quantization -values are supported by the IJG software, this feature is not in baseline -JPEG and is not supported by all implementations. If you need to ensure -wide compatibility of low-quality files, you can constrain the scaled -quantization values to no more than 255 by giving the -baseline switch. -Note that use of -baseline will result in poorer quality for the same file -size, since more bits than necessary are expended on higher AC coefficients. - -You can substitute a different set of quantization values by using the --qtables switch: - - -qtables file Use the quantization tables given in the named file. - -The specified file should be a text file containing decimal quantization -values. The file should contain one to four tables, each of 64 elements. -The tables are implicitly numbered 0,1,etc. in order of appearance. Table -entries appear in normal array order (NOT in the zigzag order in which they -will be stored in the JPEG file). - -Quantization table files are free format, in that arbitrary whitespace can -appear between numbers. Also, comments can be included: a comment starts -with '#' and extends to the end of the line. Here is an example file that -duplicates the default quantization tables: - - # Quantization tables given in JPEG spec, section K.1 - - # This is table 0 (the luminance table): - 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 - - # This is table 1 (the chrominance table): - 17 18 24 47 99 99 99 99 - 18 21 26 66 99 99 99 99 - 24 26 56 99 99 99 99 99 - 47 66 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - -If the -qtables switch is used without -quality, then the specified tables -are used exactly as-is. If both -qtables and -quality are used, then the -tables taken from the file are scaled in the same fashion that the default -tables would be scaled for that quality setting. If -baseline appears, then -the quantization values are constrained to the range 1-255. - -By default, cjpeg will use quantization table 0 for luminance components and -table 1 for chrominance components. To override this choice, use the -qslots -switch: - - -qslots N[,...] Select which quantization table to use for - each color component. - -The -qslots switch specifies a quantization table number for each color -component, in the order in which the components appear in the JPEG SOF marker. -For example, to create a separate table for each of Y,Cb,Cr, you could -provide a -qtables file that defines three quantization tables and say -"-qslots 0,1,2". If -qslots gives fewer table numbers than there are color -components, then the last table number is repeated as necessary. - - -Sampling Factor Adjustment --------------------------- - -By default, cjpeg uses 2:1 horizontal and vertical downsampling when -compressing YCbCr data, and no downsampling for all other color spaces. -You can override this default with the -sample switch: - - -sample HxV[,...] Set JPEG sampling factors for each color - component. - -The -sample switch specifies the JPEG sampling factors for each color -component, in the order in which they appear in the JPEG SOF marker. -If you specify fewer HxV pairs than there are components, the remaining -components are set to 1x1 sampling. For example, the default YCbCr setting -is equivalent to "-sample 2x2,1x1,1x1", which can be abbreviated to -"-sample 2x2". - -There are still some JPEG decoders in existence that support only 2x1 -sampling (also called 4:2:2 sampling). Compatibility with such decoders can -be achieved by specifying "-sample 2x1". This is not recommended unless -really necessary, since it increases file size and encoding/decoding time -with very little quality gain. - - -Multiple Scan / Progression Control ------------------------------------ - -By default, cjpeg emits a single-scan sequential JPEG file. The --progressive switch generates a progressive JPEG file using a default series -of progression parameters. You can create multiple-scan sequential JPEG -files or progressive JPEG files with custom progression parameters by using -the -scans switch: - - -scans file Use the scan sequence given in the named file. - -The specified file should be a text file containing a "scan script". -The script specifies the contents and ordering of the scans to be emitted. -Each entry in the script defines one scan. A scan definition specifies -the components to be included in the scan, and for progressive JPEG it also -specifies the progression parameters Ss,Se,Ah,Al for the scan. Scan -definitions are separated by semicolons (';'). A semicolon after the last -scan definition is optional. - -Each scan definition contains one to four component indexes, optionally -followed by a colon (':') and the four progressive-JPEG parameters. The -component indexes denote which color component(s) are to be transmitted in -the scan. Components are numbered in the order in which they appear in the -JPEG SOF marker, with the first component being numbered 0. (Note that these -indexes are not the "component ID" codes assigned to the components, just -positional indexes.) - -The progression parameters for each scan are: - Ss Zigzag index of first coefficient included in scan - Se Zigzag index of last coefficient included in scan - Ah Zero for first scan of a coefficient, else Al of prior scan - Al Successive approximation low bit position for scan -If the progression parameters are omitted, the values 0,63,0,0 are used, -producing a sequential JPEG file. cjpeg automatically determines whether -the script represents a progressive or sequential file, by observing whether -Ss and Se values other than 0 and 63 appear. (The -progressive switch is -not needed to specify this; in fact, it is ignored when -scans appears.) -The scan script must meet the JPEG restrictions on progression sequences. -(cjpeg checks that the spec's requirements are obeyed.) - -Scan script files are free format, in that arbitrary whitespace can appear -between numbers and around punctuation. Also, comments can be included: a -comment starts with '#' and extends to the end of the line. For additional -legibility, commas or dashes can be placed between values. (Actually, any -single punctuation character other than ':' or ';' can be inserted.) For -example, the following two scan definitions are equivalent: - 0 1 2: 0 63 0 0; - 0,1,2 : 0-63, 0,0 ; - -Here is an example of a scan script that generates a partially interleaved -sequential JPEG file: - - 0; # Y only in first scan - 1 2; # Cb and Cr in second scan - -Here is an example of a progressive scan script using only spectral selection -(no successive approximation): - - # Interleaved DC scan for Y,Cb,Cr: - 0,1,2: 0-0, 0, 0 ; - # AC scans: - 0: 1-2, 0, 0 ; # First two Y AC coefficients - 0: 3-5, 0, 0 ; # Three more - 1: 1-63, 0, 0 ; # All AC coefficients for Cb - 2: 1-63, 0, 0 ; # All AC coefficients for Cr - 0: 6-9, 0, 0 ; # More Y coefficients - 0: 10-63, 0, 0 ; # Remaining Y coefficients - -Here is an example of a successive-approximation script. This is equivalent -to the default script used by "cjpeg -progressive" for YCbCr images: - - # Initial DC scan for Y,Cb,Cr (lowest bit not sent) - 0,1,2: 0-0, 0, 1 ; - # First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits: - 0: 1-5, 0, 2 ; - # Send all Cr,Cb AC coefficients, minus lowest bit: - # (chroma data is usually too small to be worth subdividing further; - # but note we send Cr first since eye is least sensitive to Cb) - 2: 1-63, 0, 1 ; - 1: 1-63, 0, 1 ; - # Send remaining Y AC coefficients, minus 2 lowest bits: - 0: 6-63, 0, 2 ; - # Send next-to-lowest bit of all Y AC coefficients: - 0: 1-63, 2, 1 ; - # At this point we've sent all but the lowest bit of all coefficients. - # Send lowest bit of DC coefficients - 0,1,2: 0-0, 1, 0 ; - # Send lowest bit of AC coefficients - 2: 1-63, 1, 0 ; - 1: 1-63, 1, 0 ; - # Y AC lowest bit scan is last; it's usually the largest scan - 0: 1-63, 1, 0 ; - -It may be worth pointing out that this script is tuned for quality settings -of around 50 to 75. For lower quality settings, you'd probably want to use -a script with fewer stages of successive approximation (otherwise the -initial scans will be really bad). For higher quality settings, you might -want to use more stages of successive approximation (so that the initial -scans are not too large). diff --git a/Dependencies/FreeImage/Source/LibJPEG/wrbmp.c b/Dependencies/FreeImage/Source/LibJPEG/wrbmp.c deleted file mode 100644 index 2814864..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/wrbmp.c +++ /dev/null @@ -1,443 +0,0 @@ -/* - * wrbmp.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * Modified 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 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; - JSAMPARRAY image_ptr; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - int pad; - - /* Access next row in virtual array */ - image_ptr = (*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]; - outptr = image_ptr[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; - JSAMPARRAY image_ptr; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - int pad; - - /* Access next row in virtual array */ - image_ptr = (*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]; - outptr = image_ptr[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 with zeros to ensure specified number of colormap entries */ - if (i > map_colors) - ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, i); - for (; i < map_colors; i++) { - putc(0, outfile); - putc(0, outfile); - putc(0, 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; - JSAMPARRAY image_ptr; - 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); - } - image_ptr = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->whole_image, row-1, (JDIMENSION) 1, FALSE); - data_ptr = image_ptr[0]; - 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; - - if (cinfo->out_color_space == JCS_GRAYSCALE) { - dest->pub.put_pixel_rows = put_gray_rows; - } else if (cinfo->out_color_space == JCS_RGB) { - if (cinfo->quantize_colors) - dest->pub.put_pixel_rows = put_gray_rows; - else - dest->pub.put_pixel_rows = put_pixel_rows; - } else { - 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/Dependencies/FreeImage/Source/LibJPEG/wrgif.c b/Dependencies/FreeImage/Source/LibJPEG/wrgif.c deleted file mode 100644 index 843a103..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/wrgif.c +++ /dev/null @@ -1,400 +0,0 @@ -/* - * wrgif.c - * - * Copyright (C) 1991-1997, 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 routines to write output images in GIF format. - * - ************************************************************************** - * NOTE: to avoid entanglements with Unisys' patent on LZW compression, * - * this code has been modified to output "uncompressed GIF" files. * - * There is no trace of the LZW algorithm in this file. * - ************************************************************************** - * - * 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. - * - * We are also required to state that - * "The Graphics Interchange Format(c) is the Copyright property of - * CompuServe Incorporated. GIF(sm) is a Service Mark property of - * CompuServe Incorporated." - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef GIF_SUPPORTED - - -/* 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 */ - int maxcode; /* maximum code, given n_bits */ - INT32 cur_accum; /* holds bits not yet output */ - int cur_bits; /* # of bits in cur_accum */ - - /* State for GIF code assignment */ - int ClearCode; /* clear code (doesn't change) */ - int EOFCode; /* EOF code (ditto) */ - int code_counter; /* counts output symbols */ - - /* 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; - -/* Largest value that will fit in N bits */ -#define MAXCODE(n_bits) ((1 << (n_bits)) - 1) - - -/* - * 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, 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; - } -} - - -/* The pseudo-compression algorithm. - * - * In this module 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 patent. - * - * 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. - */ - -LOCAL(void) -compress_init (gif_dest_ptr dinfo, int i_bits) -/* Initialize pseudo-compressor */ -{ - /* init all the state variables */ - dinfo->n_bits = i_bits; - dinfo->maxcode = MAXCODE(dinfo->n_bits); - dinfo->ClearCode = (1 << (i_bits - 1)); - dinfo->EOFCode = dinfo->ClearCode + 1; - dinfo->code_counter = dinfo->ClearCode + 2; - /* init output buffering vars */ - dinfo->bytesinpkt = 0; - dinfo->cur_accum = 0; - dinfo->cur_bits = 0; - /* GIF specifies an initial Clear code */ - output(dinfo, dinfo->ClearCode); -} - - -LOCAL(void) -compress_pixel (gif_dest_ptr dinfo, int c) -/* Accept and "compress" one pixel value. - * The given value must be less than n_bits wide. - */ -{ - /* Output the given pixel value as a symbol. */ - output(dinfo, c); - /* Issue Clear codes often enough to keep the reader from ratcheting up - * its symbol size. - */ - if (dinfo->code_counter < dinfo->maxcode) { - dinfo->code_counter++; - } else { - output(dinfo, dinfo->ClearCode); - dinfo->code_counter = dinfo->ClearCode + 2; /* reset the counter */ - } -} - - -LOCAL(void) -compress_term (gif_dest_ptr dinfo) -/* Clean up at end */ -{ - /* 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, 0); - } - } - /* 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. - */ - -METHODDEF(void) -put_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; - - ptr = dest->pub.buffer[0]; - for (col = cinfo->output_width; col > 0; col--) { - compress_pixel(dest, GETJSAMPLE(*ptr++)); - } -} - - -/* - * 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) -{ - 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.put_pixel_rows = put_pixel_rows; - 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; - - return &dest->pub; -} - -#endif /* GIF_SUPPORTED */ diff --git a/Dependencies/FreeImage/Source/LibJPEG/wrjpgcom.c b/Dependencies/FreeImage/Source/LibJPEG/wrjpgcom.c deleted file mode 100644 index 571e9d0..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/wrjpgcom.c +++ /dev/null @@ -1,599 +0,0 @@ -/* - * wrjpgcom.c - * - * Copyright (C) 1994-1997, 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 very simple stand-alone application that inserts - * user-supplied text as a COM (comment) marker in a JFIF file. - * This may be useful as an example of the minimum logic needed to parse - * JPEG markers. - */ - -#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ -#include "jinclude.h" /* get auto-config symbols, */ - -#ifndef HAVE_STDLIB_H /* should declare malloc() */ -extern void * malloc (); -#endif -#include /* to declare isupper(), tolower() */ -#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 - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - -#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 - -/* Reduce this value if your malloc() can't allocate blocks up to 64K. - * On DOS, compiling in large model is usually a better solution. - */ - -#ifndef MAX_COM_LENGTH -#define MAX_COM_LENGTH 65000L /* must be <= 65533 in any case */ -#endif - - -/* - * These macros are used to read the input file and write the output file. - * To reuse this code in another application, you might need to change these. - */ - -static FILE * infile; /* input JPEG file */ - -/* Return next input byte, or EOF if no more */ -#define NEXTBYTE() getc(infile) - -static FILE * outfile; /* output JPEG file */ - -/* Emit an output byte */ -#define PUTBYTE(x) putc((x), outfile) - - -/* Error exit handler */ -#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) - - -/* Read one byte, testing for EOF */ -static int -read_1_byte (void) -{ - int c; - - c = NEXTBYTE(); - if (c == EOF) - ERREXIT("Premature EOF in JPEG file"); - return c; -} - -/* Read 2 bytes, convert to unsigned int */ -/* All 2-byte quantities in JPEG markers are MSB first */ -static unsigned int -read_2_bytes (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - if (c1 == EOF) - ERREXIT("Premature EOF in JPEG file"); - c2 = NEXTBYTE(); - if (c2 == EOF) - ERREXIT("Premature EOF in JPEG file"); - return (((unsigned int) c1) << 8) + ((unsigned int) c2); -} - - -/* Routines to write data to output file */ - -static void -write_1_byte (int c) -{ - PUTBYTE(c); -} - -static void -write_2_bytes (unsigned int val) -{ - PUTBYTE((val >> 8) & 0xFF); - PUTBYTE(val & 0xFF); -} - -static void -write_marker (int marker) -{ - PUTBYTE(0xFF); - PUTBYTE(marker); -} - -static void -copy_rest_of_file (void) -{ - int c; - - while ((c = NEXTBYTE()) != EOF) - PUTBYTE(c); -} - - -/* - * JPEG markers consist of one or more 0xFF bytes, followed by a marker - * code byte (which is not an FF). Here are the marker codes of interest - * in this program. (See jdmarker.c for a more complete list.) - */ - -#define M_SOF0 0xC0 /* Start Of Frame N */ -#define M_SOF1 0xC1 /* N indicates which compression process */ -#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ -#define M_SOF3 0xC3 -#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ -#define M_SOF6 0xC6 -#define M_SOF7 0xC7 -#define M_SOF9 0xC9 -#define M_SOF10 0xCA -#define M_SOF11 0xCB -#define M_SOF13 0xCD -#define M_SOF14 0xCE -#define M_SOF15 0xCF -#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ -#define M_EOI 0xD9 /* End Of Image (end of datastream) */ -#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ -#define M_COM 0xFE /* COMment */ - - -/* - * Find the next JPEG marker and return its marker code. - * We expect at least one FF byte, possibly more if the compressor used FFs - * to pad the file. (Padding FFs will NOT be replicated in the output file.) - * There could also be non-FF garbage between markers. The treatment of such - * garbage is unspecified; we choose to skip over it but emit a warning msg. - * NB: this routine must not be used after seeing SOS marker, since it will - * not deal correctly with FF/00 sequences in the compressed image data... - */ - -static int -next_marker (void) -{ - int c; - int discarded_bytes = 0; - - /* Find 0xFF byte; count and skip any non-FFs. */ - c = read_1_byte(); - while (c != 0xFF) { - discarded_bytes++; - c = read_1_byte(); - } - /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs - * are legal as pad bytes, so don't count them in discarded_bytes. - */ - do { - c = read_1_byte(); - } while (c == 0xFF); - - if (discarded_bytes != 0) { - fprintf(stderr, "Warning: garbage data found in JPEG file\n"); - } - - return c; -} - - -/* - * Read the initial marker, which should be SOI. - * For a JFIF file, the first two bytes of the file should be literally - * 0xFF M_SOI. To be more general, we could use next_marker, but if the - * input file weren't actually JPEG at all, next_marker might read the whole - * file and then return a misleading error message... - */ - -static int -first_marker (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - c2 = NEXTBYTE(); - if (c1 != 0xFF || c2 != M_SOI) - ERREXIT("Not a JPEG file"); - return c2; -} - - -/* - * Most types of marker are followed by a variable-length parameter segment. - * This routine skips over the parameters for any marker we don't otherwise - * want to process. - * Note that we MUST skip the parameter segment explicitly in order not to - * be fooled by 0xFF bytes that might appear within the parameter segment; - * such bytes do NOT introduce new markers. - */ - -static void -copy_variable (void) -/* Copy an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - write_2_bytes(length); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Copy the remaining bytes */ - while (length > 0) { - write_1_byte(read_1_byte()); - length--; - } -} - -static void -skip_variable (void) -/* Skip over an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Skip over the remaining bytes */ - while (length > 0) { - (void) read_1_byte(); - length--; - } -} - - -/* - * Parse the marker stream until SOFn or EOI is seen; - * copy data to output, but discard COM markers unless keep_COM is true. - */ - -static int -scan_JPEG_header (int keep_COM) -{ - int marker; - - /* Expect SOI at start of file */ - if (first_marker() != M_SOI) - ERREXIT("Expected SOI marker first"); - write_marker(M_SOI); - - /* Scan miscellaneous markers until we reach SOFn. */ - for (;;) { - marker = next_marker(); - switch (marker) { - /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be, - * treated as SOFn. C4 in particular is actually DHT. - */ - case M_SOF0: /* Baseline */ - case M_SOF1: /* Extended sequential, Huffman */ - case M_SOF2: /* Progressive, Huffman */ - 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_SOF9: /* Extended sequential, arithmetic */ - case M_SOF10: /* Progressive, arithmetic */ - case M_SOF11: /* Lossless, arithmetic */ - case M_SOF13: /* Differential sequential, arithmetic */ - case M_SOF14: /* Differential progressive, arithmetic */ - case M_SOF15: /* Differential lossless, arithmetic */ - return marker; - - case M_SOS: /* should not see compressed data before SOF */ - ERREXIT("SOS without prior SOFn"); - break; - - case M_EOI: /* in case it's a tables-only JPEG stream */ - return marker; - - case M_COM: /* Existing COM: conditionally discard */ - if (keep_COM) { - write_marker(marker); - copy_variable(); - } else { - skip_variable(); - } - break; - - default: /* Anything else just gets copied */ - write_marker(marker); - copy_variable(); /* we assume it has a parameter count... */ - break; - } - } /* end loop */ -} - - -/* Command line parsing code */ - -static const char * progname; /* program name for error messages */ - - -static void -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "wrjpgcom inserts a textual comment in a JPEG file.\n"); - fprintf(stderr, "You can add to or replace any existing comment(s).\n"); - - fprintf(stderr, "Usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -replace Delete any existing comments\n"); - fprintf(stderr, " -comment \"text\" Insert comment with given text\n"); - fprintf(stderr, " -cfile name Read comment from named file\n"); - fprintf(stderr, "Notice that you must put quotes around the comment text\n"); - fprintf(stderr, "when you use -comment.\n"); - fprintf(stderr, "If you do not give either -comment or -cfile on the command line,\n"); - fprintf(stderr, "then the comment text is read from standard input.\n"); - fprintf(stderr, "It can be multiple lines, up to %u characters total.\n", - (unsigned int) MAX_COM_LENGTH); -#ifndef TWO_FILE_COMMANDLINE - fprintf(stderr, "You must specify an input JPEG file name when supplying\n"); - fprintf(stderr, "comment text from standard input.\n"); -#endif - - exit(EXIT_FAILURE); -} - - -static int -keymatch (char * arg, const char * keyword, int minchars) -/* 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. */ -{ - register int ca, ck; - register int nmatched = 0; - - while ((ca = *arg++) != '\0') { - if ((ck = *keyword++) == '\0') - return 0; /* arg longer than keyword, no good */ - if (isupper(ca)) /* force arg to lcase (assume ck is already) */ - ca = tolower(ca); - if (ca != ck) - return 0; /* no good */ - nmatched++; /* count matched characters */ - } - /* reached end of argument; fail if it's too short for unique abbrev */ - if (nmatched < minchars) - return 0; - return 1; /* A-OK */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - int argn; - char * arg; - int keep_COM = 1; - char * comment_arg = NULL; - FILE * comment_file = NULL; - unsigned int comment_length = 0; - int marker; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "wrjpgcom"; /* in case C library doesn't provide it */ - - /* Parse switches, if any */ - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (arg[0] != '-') - break; /* not switch, must be file name */ - arg++; /* advance over '-' */ - if (keymatch(arg, "replace", 1)) { - keep_COM = 0; - } else if (keymatch(arg, "cfile", 2)) { - if (++argn >= argc) usage(); - if ((comment_file = fopen(argv[argn], "r")) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } else if (keymatch(arg, "comment", 1)) { - if (++argn >= argc) usage(); - comment_arg = argv[argn]; - /* If the comment text starts with '"', then we are probably running - * under MS-DOG and must parse out the quoted string ourselves. Sigh. - */ - if (comment_arg[0] == '"') { - comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH); - if (comment_arg == NULL) - ERREXIT("Insufficient memory"); - if (strlen(argv[argn]+1) >= (size_t) MAX_COM_LENGTH) { - fprintf(stderr, "Comment text may not exceed %u bytes\n", - (unsigned int) MAX_COM_LENGTH); - exit(EXIT_FAILURE); - } - strcpy(comment_arg, argv[argn]+1); - for (;;) { - comment_length = (unsigned int) strlen(comment_arg); - if (comment_length > 0 && comment_arg[comment_length-1] == '"') { - comment_arg[comment_length-1] = '\0'; /* zap terminating quote */ - break; - } - if (++argn >= argc) - ERREXIT("Missing ending quote mark"); - if (strlen(comment_arg) + 1 + strlen(argv[argn]) >= - (size_t) MAX_COM_LENGTH) { - fprintf(stderr, "Comment text may not exceed %u bytes\n", - (unsigned int) MAX_COM_LENGTH); - exit(EXIT_FAILURE); - } - strcat(comment_arg, " "); - strcat(comment_arg, argv[argn]); - } - } else if (strlen(comment_arg) >= (size_t) MAX_COM_LENGTH) { - fprintf(stderr, "Comment text may not exceed %u bytes\n", - (unsigned int) MAX_COM_LENGTH); - exit(EXIT_FAILURE); - } - comment_length = (unsigned int) strlen(comment_arg); - } else - usage(); - } - - /* Cannot use both -comment and -cfile. */ - if (comment_arg != NULL && comment_file != NULL) - usage(); - /* If there is neither -comment nor -cfile, we will read the comment text - * from stdin; in this case there MUST be an input JPEG file name. - */ - if (comment_arg == NULL && comment_file == NULL && argn >= argc) - usage(); - - /* Open the input file. */ - if (argn < argc) { - if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is 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 ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open stdin\n", progname); - exit(EXIT_FAILURE); - } -#else - infile = stdin; -#endif - } - - /* Open the output file. */ -#ifdef TWO_FILE_COMMANDLINE - /* Must have explicit output file name */ - if (argn != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - if ((outfile = fopen(argv[argn+1], WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn+1]); - exit(EXIT_FAILURE); - } -#else - /* Unix style: expect zero or one file name */ - if (argn < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } - /* default output file is 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 ((outfile = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open stdout\n", progname); - exit(EXIT_FAILURE); - } -#else - outfile = stdout; -#endif -#endif /* TWO_FILE_COMMANDLINE */ - - /* Collect comment text from comment_file or stdin, if necessary */ - if (comment_arg == NULL) { - FILE * src_file; - int c; - - comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH); - if (comment_arg == NULL) - ERREXIT("Insufficient memory"); - comment_length = 0; - src_file = (comment_file != NULL ? comment_file : stdin); - while ((c = getc(src_file)) != EOF) { - if (comment_length >= (unsigned int) MAX_COM_LENGTH) { - fprintf(stderr, "Comment text may not exceed %u bytes\n", - (unsigned int) MAX_COM_LENGTH); - exit(EXIT_FAILURE); - } - comment_arg[comment_length++] = (char) c; - } - if (comment_file != NULL) - fclose(comment_file); - } - - /* Copy JPEG headers until SOFn marker; - * we will insert the new comment marker just before SOFn. - * This (a) causes the new comment to appear after, rather than before, - * existing comments; and (b) ensures that comments come after any JFIF - * or JFXX markers, as required by the JFIF specification. - */ - marker = scan_JPEG_header(keep_COM); - /* Insert the new COM marker, but only if nonempty text has been supplied */ - if (comment_length > 0) { - write_marker(M_COM); - write_2_bytes(comment_length + 2); - while (comment_length > 0) { - write_1_byte(*comment_arg++); - comment_length--; - } - } - /* Duplicate the remainder of the source file. - * Note that any COM markers occuring after SOF will not be touched. - */ - write_marker(marker); - copy_rest_of_file(); - - /* All done. */ - exit(EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/Dependencies/FreeImage/Source/LibJPEG/wrppm.c b/Dependencies/FreeImage/Source/LibJPEG/wrppm.c deleted file mode 100644 index e2f27cf..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/wrppm.c +++ /dev/null @@ -1,269 +0,0 @@ -/* - * wrppm.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 2009-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 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->pub.buffer[0]; - 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->pub.buffer[0]; - 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_map = cinfo->colormap[0]; - register JDIMENSION col; - - ptr = dest->pub.buffer[0]; - bufferptr = dest->iobuffer; - for (col = cinfo->output_width; col > 0; col--) { - PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map[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) -{ - ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; - - /* Emit file header */ - switch (cinfo->out_color_space) { - case JCS_GRAYSCALE: - /* emit header for raw PGM format */ - fprintf(dest->pub.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(dest->pub.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->pub.buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->output_width * cinfo->output_components, (JDIMENSION) 1); - dest->pub.buffer_height = 1; - 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. */ - /* Synthesize a JSAMPARRAY pointer structure */ - /* Cast here implies near->far pointer conversion on PCs */ - dest->pixrow = (JSAMPROW) dest->iobuffer; - dest->pub.buffer = & dest->pixrow; - dest->pub.buffer_height = 1; - dest->pub.put_pixel_rows = put_pixel_rows; - } - - return &dest->pub; -} - -#endif /* PPM_SUPPORTED */ diff --git a/Dependencies/FreeImage/Source/LibJPEG/wrrle.c b/Dependencies/FreeImage/Source/LibJPEG/wrrle.c deleted file mode 100644 index 403e260..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/wrrle.c +++ /dev/null @@ -1,306 +0,0 @@ -/* - * wrrle.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * Modified 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 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 i, ci; -#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, *green, *blue; - 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--) { - rle_row = (rle_pixel **) dest->rle_row; - output_row = * (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->image, - (JDIMENSION) row, (JDIMENSION) 1, FALSE); - red = rle_row[0]; - green = rle_row[1]; - blue = rle_row[2]; - for (col = cinfo->output_width; col > 0; col--) { - *red++ = GETJSAMPLE(*output_row++); - *green++ = GETJSAMPLE(*output_row++); - *blue++ = 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, - (JDIMENSION) (cinfo->output_width * cinfo->output_components), - cinfo->output_height, (JDIMENSION) 1); - - return &dest->pub; -} - -#endif /* RLE_SUPPORTED */ diff --git a/Dependencies/FreeImage/Source/LibJPEG/wrtarga.c b/Dependencies/FreeImage/Source/LibJPEG/wrtarga.c deleted file mode 100644 index 276a42c..0000000 --- a/Dependencies/FreeImage/Source/LibJPEG/wrtarga.c +++ /dev/null @@ -1,254 +0,0 @@ -/* - * wrtarga.c - * - * Copyright (C) 1991-1996, 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 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) -{ - tga_dest_ptr dest = (tga_dest_ptr) dinfo; - int num_colors, i; - FILE *outfile; - - if (cinfo->out_color_space == 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) - dest->pub.put_pixel_rows = put_demapped_gray; - else - dest->pub.put_pixel_rows = put_gray_rows; - } else if (cinfo->out_color_space == 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 = dest->pub.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); - } - dest->pub.put_pixel_rows = put_gray_rows; - } else { - write_header(cinfo, dinfo, 0); - dest->pub.put_pixel_rows = put_pixel_rows; - } - } else { - 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/Dependencies/FreeImage/Source/LibOpenJPEG/AUTHORS b/Dependencies/FreeImage/Source/LibOpenJPEG/AUTHORS deleted file mode 100644 index dd1ac08..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/AUTHORS +++ /dev/null @@ -1,15 +0,0 @@ -Authors of OpenJPEG -See also the files THANKS and CHANGES - -David Janssens designed and implemented the first version of OpenJPEG. -Kaori Hagihara designed and implemented the first version of OpenJPIP. -Jerome Fimes implemented the alpha version of OpenJPEG v2. -Giuseppe Baruffa added the JPWL functionalities. -Mickal Savinaud implemented the final OpenJPEG v2 version based on a big merge between 1.5 version and alpha version of v2. -Mathieu Malaterre participate to the OpenJPEG v2 version and release the OpenJPEG 1.5 and 1.5.1 version. -Yannick Verschueren, -Herve Drolon, -Francois-Olivier Devaux, -Antonin Descampe - improved the libraries and utilities. - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/INSTALL b/Dependencies/FreeImage/Source/LibOpenJPEG/INSTALL deleted file mode 100644 index 109ec4b..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/INSTALL +++ /dev/null @@ -1,69 +0,0 @@ - -How to build and install openjpeg binaries -========================================== - -UNIX/LINUX/MacOSX/Windows systems --------------------------- - -Using cmake (see www.cmake.org) - -Type: - cmake . - make - -If you are root: - make install - -else if you have sudo power: - sudo make install - -else - DESTDIR=$HOME/local make install - -To build the Doxygen documentation (Doxygen needs to be found on the system): -(A 'html' directory is generated in the 'doc' directory) - make doc - -Binaries are located in the 'bin' directory. - -Main available cmake flags: -* To specify the install path: '-DCMAKE_INSTALL_PREFIX=/path', or use DESTDIR env variable (see above) -* To build the shared libraries and links the executables against it: '-DBUILD_SHARED_LIBS:bool=on' (default: 'ON') - Note: when using this option, static libraries are not built and executables are dynamically linked. -* To build the CODEC executables: '-DBUILD_CODEC:bool=on' (default: 'ON') -* To build the documentation: '-DBUILD_DOC:bool=on' (default: 'OFF') -* To build the MJ2 executables: '-DBUILD_MJ2:bool=on' (default: 'OFF') -* To build the JPWL executables and JPWL library: '-DBUILD_JPWL:bool=on' (default: 'OFF') -* To build the JPIP library and utilities: '-DBUILD_JPIP:bool=on' (default: 'OFF') -** To build the JPIP server: '-DBUILD_JPIP_SERVER:bool=on' (default: 'OFF') -* To build the JP3D library and utilities: '-DBUILD_JP3D:bool=on' (default: 'OFF') (experimental) -* To build the Java binding: '-DBUILD_JAVA:bool=on' (default: 'OFF') (experimental). -** to choose which java implementation, you can set your JAVA_HOME env var. -* To build the wxWidgets/C++ viewer: 'BUILD_VIEWER:BOOL=ON' (default OFF) (experimental) -* To enable testing (and automatic result upload to http://my.cdash.org/index.php?project=OPENJPEG): - cmake . -DBUILD_TESTING:BOOL=ON -DOPJ_DATA_ROOT:PATH='path/to/the/data/directory' - make - make Experimental - Note : JPEG2000 test files are available with 'svn checkout http://openjpeg.googlecode.com/svn/data' (about 70 Mo). - If '-DOPJ_DATA_ROOT:PATH' option is omitted, test files will be automatically searched in '${CMAKE_SOURCE_DIR}/../data', - corresponding to the location of the data directory when compiling from the trunk (and assuming the data directory has - been checked out of course). - -MACOSX ------- - -The same building procedures as above work for MACOSX. -The xcode project file can also be used. - -If it does not work, try adding the following flag to the cmake command : - '-DCMAKE_OSX_ARCHITECTURES:STRING=i386' - -WINDOWS -------- - -You can use cmake to generate project files for the IDE you are using (VS2010, NMake, etc). -Type 'cmake --help' for available generators on your platform. - -Make sure to build the third party libs (png, zlib ...): - - '-DBUILD_THIRDPARTY:BOOL=ON' diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/LICENSE b/Dependencies/FreeImage/Source/LibOpenJPEG/LICENSE deleted file mode 100644 index 5040692..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/LICENSE +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2002-2012, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2012, Professor Benoit Macq - * Copyright (c) 2003-2012, Antonin Descampe - * Copyright (c) 2003-2009, Francois-Olivier Devaux - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2013.vcxproj b/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2013.vcxproj deleted file mode 100644 index 4bbd066..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2013.vcxproj +++ /dev/null @@ -1,360 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - LibOpenJPEG - {E3536C28-A7F1-4B53-8E52-7D2232F9E098} - LibOpenJPEG - - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Full - AnySuitable - true - Speed - true - WIN32;NDEBUG;_LIB;OPJ_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - false - NotUsing - Level3 - true - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - X64 - - - Full - AnySuitable - true - Speed - true - WIN32;NDEBUG;_LIB;OPJ_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - false - NotUsing - Level3 - true - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - Disabled - WIN32;_DEBUG;_LIB;OPJ_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - Default - NotUsing - Level3 - true - EditAndContinue - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - X64 - - - Disabled - WIN32;_DEBUG;_LIB;OPJ_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - Default - NotUsing - Level3 - true - ProgramDatabase - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2013.vcxproj.filters b/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2013.vcxproj.filters deleted file mode 100644 index 617176c..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2013.vcxproj.filters +++ /dev/null @@ -1,158 +0,0 @@ - - - - - {0c3108c5-5ec7-43a4-a464-22b036977c34} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {7be8dc1e-caaa-423f-bd9c-50cc5887a179} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2017.vcxproj b/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2017.vcxproj deleted file mode 100644 index 4f36391..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2017.vcxproj +++ /dev/null @@ -1,361 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - LibOpenJPEG - {E3536C28-A7F1-4B53-8E52-7D2232F9E098} - LibOpenJPEG - 10.0.16299.0 - - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Full - AnySuitable - true - Speed - true - WIN32;NDEBUG;_LIB;OPJ_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - false - NotUsing - Level3 - true - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - X64 - - - Full - AnySuitable - true - Speed - true - WIN32;NDEBUG;_LIB;OPJ_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - false - NotUsing - Level3 - true - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - Disabled - WIN32;_DEBUG;_LIB;OPJ_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - Default - NotUsing - Level3 - true - EditAndContinue - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - X64 - - - Disabled - WIN32;_DEBUG;_LIB;OPJ_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - Default - NotUsing - Level3 - true - ProgramDatabase - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - Disabled - EnableFastChecks - Disabled - EnableFastChecks - MaxSpeed - MaxSpeed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2017.vcxproj.filters b/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2017.vcxproj.filters deleted file mode 100644 index 617176c..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/LibOpenJPEG.2017.vcxproj.filters +++ /dev/null @@ -1,158 +0,0 @@ - - - - - {0c3108c5-5ec7-43a4-a464-22b036977c34} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {7be8dc1e-caaa-423f-bd9c-50cc5887a179} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/NEWS b/Dependencies/FreeImage/Source/LibOpenJPEG/NEWS deleted file mode 100644 index 2d0bcf3..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/NEWS +++ /dev/null @@ -1,21 +0,0 @@ - -OpenJPEG NEWS - user visible changes -==================================== - -Changes from OpenJPEG 1.5.x to OpenJPEG 2.0.0 ----------------------------------------------- - -New Features: - - * streaming capabilities - * merge JP3D - -API modifications: - - * Use a 64bits capable API - -Misc: - - * removed autotools build system - * folders hierarchies reorganisation - * Huge amount of bug fixes. See CHANGES for details. diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/README b/Dependencies/FreeImage/Source/LibOpenJPEG/README deleted file mode 100644 index 0a89178..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/README +++ /dev/null @@ -1,47 +0,0 @@ - -OPENJPEG LIBRARY and APPLICATIONS ----------------------------------- - -Details on folders hierarchy: - -* src - * lib - * openjp2: contains the sources of the openjp2 library (Part 1 & 2) - * openjpwl: contains the additional sources if you want to build a JPWL-flavoured library. - * openjpip: complete client-server architecture for remote browsing of jpeg 2000 images. - * openjp3d: JP3D implementation - * openmj2: MJ2 implementation - * bin: contains all applications that use the openjpeg library - * common: common files to all applications - * jp2: a basic codec - * mj2: motion jpeg 2000 executables - * jpip: OpenJPIP applications (server and dec server) - * java: a Java client viewer for JPIP - * jp3d: JP3D applications - * tcltk: a test tool for JP3D - * wx - * OPJViewer: gui for displaying j2k files (based on wxWidget) -* wrapping - * java: java jni to use openjpeg in a java program -* thirdparty: thirdparty libraries used by some applications. These libraries will be built only if there are not found on the system. Note that libopenjpeg itself does not have any dependency. -* doc: doxygen documentation setup file and man pages -* tests: configuration files and utilities for the openjpeg test suite. All test images are located in 'http://openjpeg.googlecode.com/svn/data' folder. -* cmake: cmake related files - -see LICENSE for license and copyright information. -see INSTALL for installation procedures. -see NEWS for user visible changes in successive releases. -see CHANGES for per-revision changes. - ----------------- -API/ABI - -OpenJPEG strives to provide a stable API/ABI for your applications. As such it -only exposes a limited subset of its functions. It uses a mecanism of -exporting/hiding functions. If you are unsure which functions you can use in -your applications, you should compile OpenJPEG using something similar to gcc: --fvisibility=hidden compilation flag. -See also: http://gcc.gnu.org/wiki/Visibility - -On windows, MSVC directly supports export/hidding function and as such the only -API available is the one supported by OpenJPEG. diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/THANKS b/Dependencies/FreeImage/Source/LibOpenJPEG/THANKS deleted file mode 100644 index 27a35aa..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/THANKS +++ /dev/null @@ -1,33 +0,0 @@ -OpenJPEG THANKS file - -Many people have contributed to OpenJPEG by reporting problems, suggesting various improvements, -or submitting actual code. Here is a list of these people. Help me keep -it complete and exempt of errors. - -Winfried Szukalski -Vincent Torri -Bob Friesenhahn -Callum Lerwick -Dzonatas Sol -Julien Malik -Jerôme Fimes -Herve Drolon -Yannick Verschueren -Sebastien Lugan -Kaori Hagihara -Peter Wimmer -Francois-Olivier Devaux -Antonin Descampe -David Janssens -Pr. Benoit Macq -Luis Ibanez -Ben Boeckel -Vincent Nicolas -Glenn Pearson -Giuseppe Baruffa -Arnaud Maye -Rex Dieter -David Burken -Parvatha Elangovan -Hans Johnson -Luc Hermitte \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/bio.c b/Dependencies/FreeImage/Source/LibOpenJPEG/bio.c deleted file mode 100644 index 213a994..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/bio.c +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -/** @defgroup BIO BIO - Individual bit input-output stream */ -/*@{*/ - -/** @name Local static functions */ -/*@{*/ - -/** -Write a bit -@param bio BIO handle -@param b Bit to write (0 or 1) -*/ -static void opj_bio_putbit(opj_bio_t *bio, OPJ_UINT32 b); -/** -Read a bit -@param bio BIO handle -@return Returns the read bit -*/ -static OPJ_UINT32 opj_bio_getbit(opj_bio_t *bio); -/** -Write a byte -@param bio BIO handle -@return Returns OPJ_TRUE if successful, returns OPJ_FALSE otherwise -*/ -static OPJ_BOOL opj_bio_byteout(opj_bio_t *bio); -/** -Read a byte -@param bio BIO handle -@return Returns OPJ_TRUE if successful, returns OPJ_FALSE otherwise -*/ -static OPJ_BOOL opj_bio_bytein(opj_bio_t *bio); - -/*@}*/ - -/*@}*/ - -/* -========================================================== - local functions -========================================================== -*/ - -OPJ_BOOL opj_bio_byteout(opj_bio_t *bio) { - bio->buf = (bio->buf << 8) & 0xffff; - bio->ct = bio->buf == 0xff00 ? 7 : 8; - if (bio->bp >= bio->end) { - return OPJ_FALSE; - } - *bio->bp++ = (OPJ_BYTE)(bio->buf >> 8); - return OPJ_TRUE; -} - -OPJ_BOOL opj_bio_bytein(opj_bio_t *bio) { - bio->buf = (bio->buf << 8) & 0xffff; - bio->ct = bio->buf == 0xff00 ? 7 : 8; - if (bio->bp >= bio->end) { - return OPJ_FALSE; - } - bio->buf |= *bio->bp++; - return OPJ_TRUE; -} - -void opj_bio_putbit(opj_bio_t *bio, OPJ_UINT32 b) { - if (bio->ct == 0) { - opj_bio_byteout(bio); /* MSD: why not check the return value of this function ? */ - } - bio->ct--; - bio->buf |= b << bio->ct; -} - -OPJ_UINT32 opj_bio_getbit(opj_bio_t *bio) { - if (bio->ct == 0) { - opj_bio_bytein(bio); /* MSD: why not check the return value of this function ? */ - } - bio->ct--; - return (bio->buf >> bio->ct) & 1; -} - -/* -========================================================== - Bit Input/Output interface -========================================================== -*/ - -opj_bio_t* opj_bio_create(void) { - opj_bio_t *bio = (opj_bio_t*)opj_malloc(sizeof(opj_bio_t)); - return bio; -} - -void opj_bio_destroy(opj_bio_t *bio) { - if(bio) { - opj_free(bio); - } -} - -ptrdiff_t opj_bio_numbytes(opj_bio_t *bio) { - return (bio->bp - bio->start); -} - -void opj_bio_init_enc(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len) { - bio->start = bp; - bio->end = bp + len; - bio->bp = bp; - bio->buf = 0; - bio->ct = 8; -} - -void opj_bio_init_dec(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len) { - bio->start = bp; - bio->end = bp + len; - bio->bp = bp; - bio->buf = 0; - bio->ct = 0; -} - -void opj_bio_write(opj_bio_t *bio, OPJ_UINT32 v, OPJ_UINT32 n) { - OPJ_UINT32 i; - for (i = n - 1; i < n; i--) { - opj_bio_putbit(bio, (v >> i) & 1); - } -} - -OPJ_UINT32 opj_bio_read(opj_bio_t *bio, OPJ_UINT32 n) { - OPJ_UINT32 i; - OPJ_UINT32 v; - v = 0; - for (i = n - 1; i < n; i--) { - v += opj_bio_getbit(bio) << i; - } - return v; -} - -OPJ_BOOL opj_bio_flush(opj_bio_t *bio) { - bio->ct = 0; - if (! opj_bio_byteout(bio)) { - return OPJ_FALSE; - } - if (bio->ct == 7) { - bio->ct = 0; - if (! opj_bio_byteout(bio)) { - return OPJ_FALSE; - } - } - return OPJ_TRUE; -} - -OPJ_BOOL opj_bio_inalign(opj_bio_t *bio) { - bio->ct = 0; - if ((bio->buf & 0xff) == 0xff) { - if (! opj_bio_bytein(bio)) { - return OPJ_FALSE; - } - bio->ct = 0; - } - return OPJ_TRUE; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/bio.h b/Dependencies/FreeImage/Source/LibOpenJPEG/bio.h deleted file mode 100644 index b4dd7fa..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/bio.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __BIO_H -#define __BIO_H - -#include /* ptrdiff_t */ - -/** -@file bio.h -@brief Implementation of an individual bit input-output (BIO) - -The functions in BIO.C have for goal to realize an individual bit input - output. -*/ - -/** @defgroup BIO BIO - Individual bit input-output stream */ -/*@{*/ - -/** -Individual bit input-output stream (BIO) -*/ -typedef struct opj_bio { - /** pointer to the start of the buffer */ - OPJ_BYTE *start; - /** pointer to the end of the buffer */ - OPJ_BYTE *end; - /** pointer to the present position in the buffer */ - OPJ_BYTE *bp; - /** temporary place where each byte is read or written */ - OPJ_UINT32 buf; - /** coder : number of bits free to write. decoder : number of bits read */ - OPJ_UINT32 ct; -} opj_bio_t; - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Create a new BIO handle -@return Returns a new BIO handle if successful, returns NULL otherwise -*/ -opj_bio_t* opj_bio_create(void); -/** -Destroy a previously created BIO handle -@param bio BIO handle to destroy -*/ -void opj_bio_destroy(opj_bio_t *bio); -/** -Number of bytes written. -@param bio BIO handle -@return Returns the number of bytes written -*/ -ptrdiff_t opj_bio_numbytes(opj_bio_t *bio); -/** -Init encoder -@param bio BIO handle -@param bp Output buffer -@param len Output buffer length -*/ -void opj_bio_init_enc(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len); -/** -Init decoder -@param bio BIO handle -@param bp Input buffer -@param len Input buffer length -*/ -void opj_bio_init_dec(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len); -/** -Write bits -@param bio BIO handle -@param v Value of bits -@param n Number of bits to write -*/ -void opj_bio_write(opj_bio_t *bio, OPJ_UINT32 v, OPJ_UINT32 n); -/** -Read bits -@param bio BIO handle -@param n Number of bits to read -@return Returns the corresponding read number -*/ -OPJ_UINT32 opj_bio_read(opj_bio_t *bio, OPJ_UINT32 n); -/** -Flush bits -@param bio BIO handle -@return Returns OPJ_TRUE if successful, returns OPJ_FALSE otherwise -*/ -OPJ_BOOL opj_bio_flush(opj_bio_t *bio); -/** -Passes the ending bits (coming from flushing) -@param bio BIO handle -@return Returns OPJ_TRUE if successful, returns OPJ_FALSE otherwise -*/ -OPJ_BOOL opj_bio_inalign(opj_bio_t *bio); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __BIO_H */ - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/cidx_manager.c b/Dependencies/FreeImage/Source/LibOpenJPEG/cidx_manager.c deleted file mode 100644 index 42f87c2..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/cidx_manager.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * $Id: cidx_manager.c,v 1.4 2014/03/16 12:29:51 drolon Exp $ - * - * Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2011, Professor Benoit Macq - * Copyright (c) 2003-2004, Yannick Verschueren - * Copyright (c) 2010-2011, Kaori Hagihara - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - - -/* - * Write CPTR Codestream finder box - * - * @param[in] coff offset of j2k codestream - * @param[in] clen length of j2k codestream - * @param[in] cio file output handle - */ - -void opj_write_cptr(int coff, int clen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - - - - - -int opj_write_cidx( int offset, opj_stream_private_t *cio, opj_codestream_info_t cstr_info, int j2klen, - opj_event_mgr_t * p_manager ) -{ - int i; - OPJ_OFF_T lenp; - OPJ_UINT32 len; - opj_jp2_box_t *box; - int num_box = 0; - OPJ_BOOL EPHused; - OPJ_BYTE l_data_header [4]; - - lenp = -1; - box = (opj_jp2_box_t *)opj_calloc( 32, sizeof(opj_jp2_box_t)); - - for (i=0;i<2;i++){ - - if(i) - opj_stream_seek(cio,lenp,p_manager); - - - lenp = opj_stream_tell (cio); - - opj_stream_skip(cio, 4, p_manager); /* L [at the end] */ - - opj_write_bytes(l_data_header,JPIP_CIDX,4); /* CIDX */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - - opj_write_cptr( offset, cstr_info.codestream_size, cio,p_manager); - - opj_write_manf( i, num_box, box, cio,p_manager); - - num_box = 0; - box[num_box].length = (OPJ_UINT32)opj_write_mainmhix( offset, cstr_info, cio,p_manager); - box[num_box].type = JPIP_MHIX; - num_box++; - - box[num_box].length = (OPJ_UINT32)opj_write_tpix( offset, cstr_info, j2klen, cio,p_manager); - box[num_box].type = JPIP_TPIX; - num_box++; - - box[num_box].length = (OPJ_UINT32)opj_write_thix( offset, cstr_info, cio, p_manager); - box[num_box].type = JPIP_THIX; - num_box++; - - EPHused = opj_check_EPHuse( offset, cstr_info.marker, cstr_info.marknum, cio,p_manager); - - box[num_box].length = (OPJ_UINT32)opj_write_ppix( offset, cstr_info, EPHused, j2klen, cio,p_manager); - box[num_box].type = JPIP_PPIX; - num_box++; - - box[num_box].length = (OPJ_UINT32)opj_write_phix( offset, cstr_info, EPHused, j2klen, cio,p_manager); - box[num_box].type = JPIP_PHIX; - num_box++; - - len = (OPJ_UINT32) (opj_stream_tell(cio)-lenp); - opj_stream_seek(cio, lenp,p_manager); - opj_write_bytes(l_data_header,len,4);/* L */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_stream_seek(cio, lenp+len,p_manager); - } - - opj_free( box); - - return (int)len; -} - - - -void opj_write_cptr(int coff, int clen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_BYTE l_data_header [3*8]; - OPJ_UINT32 len; - OPJ_OFF_T lenp; - - - lenp = opj_stream_tell(cio); - opj_stream_skip( cio, 4, p_manager); /* L [at the end] */ - opj_write_bytes( l_data_header, JPIP_CPTR, 4); /* T */ - opj_write_bytes( l_data_header+4, 0, 2); /* DR A PRECISER !! */ - opj_write_bytes( l_data_header+6, 0, 2); /* CONT */ - opj_write_bytes( l_data_header+8, (OPJ_UINT32)coff, 8); /* COFF A PRECISER !! */ - opj_write_bytes( l_data_header+16, (OPJ_UINT32)clen, 8); /* CLEN */ - opj_stream_write_data(cio,l_data_header,3*8,p_manager); - - len = (OPJ_UINT32) (opj_stream_tell(cio) - lenp); - opj_stream_seek(cio,lenp,p_manager); - opj_write_bytes(l_data_header, len, 4); /* L */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_stream_seek(cio, lenp+len,p_manager); - -} - - - -void opj_write_manf(int second, - int v, - opj_jp2_box_t *box, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_BYTE l_data_header [4]; - int i; - OPJ_UINT32 len; - OPJ_OFF_T lenp; - - lenp = opj_stream_tell(cio); - opj_stream_skip( cio, 4, p_manager); /* L [at the end] */ - opj_write_bytes( l_data_header, JPIP_MANF, 4); /* T */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - - if (second){ /* Write only during the second pass */ - for( i=0; i> 2) & 1)) - EPHused = OPJ_TRUE; - opj_stream_seek( cio, org_pos, p_manager); - - break; - } - } - return EPHused; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/cidx_manager.h b/Dependencies/FreeImage/Source/LibOpenJPEG/cidx_manager.h deleted file mode 100644 index a4f7d9a..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/cidx_manager.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * $Id: cidx_manager.h,v 1.4 2014/03/16 12:29:52 drolon Exp $ - * - * Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2011, Professor Benoit Macq - * Copyright (c) 2003-2004, Yannick Verschueren - * Copyright (c) 2010-2011, Kaori Hagihara - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/*! \file - * \brief Modification of jpip.h from 2KAN indexer - */ - - -#ifndef CIDX_MANAGER_H_ -# define CIDX_MANAGER_H_ - -#include "openjpeg.h" - - -/* - * Write Codestream index box (superbox) - * - * @param[in] offset offset of j2k codestream - * @param[in] cio file output handle - * @param[in] image image data - * @param[in] cstr_info codestream information - * @param[in] j2klen length of j2k codestream - * @return length of cidx box - */ -int opj_write_cidx( int offset, opj_stream_private_t *cio, opj_codestream_info_t cstr_info, int j2klen, - opj_event_mgr_t * p_manager ); - -/* - * Check if EPH option is used - * - * @param[in] coff offset of j2k codestream - * @param[in] markers marker information - * @param[in] marknum number of markers - * @param[in] cio file output handle - * @return true if EPH is used - */ -OPJ_BOOL opj_check_EPHuse( int coff, opj_marker_info_t *markers, int marknum, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -#endif /* !CIDX_MANAGER_H_ */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/cio.c b/Dependencies/FreeImage/Source/LibOpenJPEG/cio.c deleted file mode 100644 index f7f1bc7..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/cio.c +++ /dev/null @@ -1,644 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -/* ----------------------------------------------------------------------- */ - - -/* ----------------------------------------------------------------------- */ - -void opj_write_bytes_BE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_nb_bytes) -{ - const OPJ_BYTE * l_data_ptr = ((const OPJ_BYTE *) &p_value) + p_nb_bytes; - - assert(p_nb_bytes > 0 && p_nb_bytes <= sizeof(OPJ_UINT32)); - - memcpy(p_buffer,l_data_ptr,p_nb_bytes); -} - -void opj_write_bytes_LE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_nb_bytes) -{ - const OPJ_BYTE * l_data_ptr = ((const OPJ_BYTE *) &p_value) + p_nb_bytes - 1; - OPJ_UINT32 i; - - assert(p_nb_bytes > 0 && p_nb_bytes <= sizeof(OPJ_UINT32)); - - for (i=0;i 0 && p_nb_bytes <= sizeof(OPJ_UINT32)); - - *p_value = 0; - memcpy(l_data_ptr+4-p_nb_bytes,p_buffer,p_nb_bytes); -} - -void opj_read_bytes_LE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT32 p_nb_bytes) -{ - OPJ_BYTE * l_data_ptr = ((OPJ_BYTE *) p_value) + p_nb_bytes-1; - OPJ_UINT32 i; - - assert(p_nb_bytes > 0 && p_nb_bytes <= sizeof(OPJ_UINT32)); - - *p_value = 0; - for (i=0;im_buffer_size = p_buffer_size; - l_stream->m_stored_data = (OPJ_BYTE *) opj_malloc(p_buffer_size); - if (! l_stream->m_stored_data) { - opj_free(l_stream); - return 00; - } - - l_stream->m_current_data = l_stream->m_stored_data; - - if (l_is_input) { - l_stream->m_status |= opj_stream_e_input; - l_stream->m_opj_skip = opj_stream_read_skip; - l_stream->m_opj_seek = opj_stream_read_seek; - } - else { - l_stream->m_status |= opj_stream_e_output; - l_stream->m_opj_skip = opj_stream_write_skip; - l_stream->m_opj_seek = opj_stream_write_seek; - } - - l_stream->m_read_fn = opj_stream_default_read; - l_stream->m_write_fn = opj_stream_default_write; - l_stream->m_skip_fn = opj_stream_default_skip; - l_stream->m_seek_fn = opj_stream_default_seek; - - return (opj_stream_t *) l_stream; -} - -opj_stream_t* OPJ_CALLCONV opj_stream_default_create(OPJ_BOOL l_is_input) -{ - return opj_stream_create(OPJ_J2K_STREAM_CHUNK_SIZE,l_is_input); -} - -void OPJ_CALLCONV opj_stream_destroy(opj_stream_t* p_stream) -{ - opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; - - if (l_stream) { - if (l_stream->m_free_user_data_fn) { - l_stream->m_free_user_data_fn(l_stream->m_user_data); - } - opj_free(l_stream->m_stored_data); - l_stream->m_stored_data = 00; - opj_free(l_stream); - } -} - -void OPJ_CALLCONV opj_stream_destroy_v3(opj_stream_t* p_stream) -{ - opj_stream_destroy(p_stream); -} - -void OPJ_CALLCONV opj_stream_set_read_function(opj_stream_t* p_stream, opj_stream_read_fn p_function) -{ - opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; - - if ((!l_stream) || (! (l_stream->m_status & opj_stream_e_input))) { - return; - } - - l_stream->m_read_fn = p_function; -} - -void OPJ_CALLCONV opj_stream_set_seek_function(opj_stream_t* p_stream, opj_stream_seek_fn p_function) -{ - opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; - - if (!l_stream) { - return; - } - l_stream->m_seek_fn = p_function; -} - -void OPJ_CALLCONV opj_stream_set_write_function(opj_stream_t* p_stream, opj_stream_write_fn p_function) -{ - opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; - - if ((!l_stream )|| (! (l_stream->m_status & opj_stream_e_output))) { - return; - } - - l_stream->m_write_fn = p_function; -} - -void OPJ_CALLCONV opj_stream_set_skip_function(opj_stream_t* p_stream, opj_stream_skip_fn p_function) -{ - opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; - - if (! l_stream) { - return; - } - - l_stream->m_skip_fn = p_function; -} - -void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function) -{ - opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; - if (!l_stream) - return; - l_stream->m_user_data = p_data; - l_stream->m_free_user_data_fn = p_function; -} - -void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t* p_stream, OPJ_UINT64 data_length) -{ - opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; - if (!l_stream) - return; - l_stream->m_user_data_length = data_length; -} - -OPJ_SIZE_T opj_stream_read_data (opj_stream_private_t * p_stream,OPJ_BYTE * p_buffer, OPJ_SIZE_T p_size, opj_event_mgr_t * p_event_mgr) -{ - OPJ_SIZE_T l_read_nb_bytes = 0; - if (p_stream->m_bytes_in_buffer >= p_size) { - memcpy(p_buffer,p_stream->m_current_data,p_size); - p_stream->m_current_data += p_size; - p_stream->m_bytes_in_buffer -= p_size; - l_read_nb_bytes += p_size; - p_stream->m_byte_offset += (OPJ_OFF_T)p_size; - return l_read_nb_bytes; - } - - /* we are now in the case when the remaining data if not sufficient */ - if (p_stream->m_status & opj_stream_e_end) { - l_read_nb_bytes += p_stream->m_bytes_in_buffer; - memcpy(p_buffer,p_stream->m_current_data,p_stream->m_bytes_in_buffer); - p_stream->m_current_data += p_stream->m_bytes_in_buffer; - p_stream->m_byte_offset += (OPJ_OFF_T)p_stream->m_bytes_in_buffer; - p_stream->m_bytes_in_buffer = 0; - return l_read_nb_bytes ? l_read_nb_bytes : (OPJ_SIZE_T)-1; - } - - /* the flag is not set, we copy data and then do an actual read on the stream */ - if (p_stream->m_bytes_in_buffer) { - l_read_nb_bytes += p_stream->m_bytes_in_buffer; - memcpy(p_buffer,p_stream->m_current_data,p_stream->m_bytes_in_buffer); - p_stream->m_current_data = p_stream->m_stored_data; - p_buffer += p_stream->m_bytes_in_buffer; - p_size -= p_stream->m_bytes_in_buffer; - p_stream->m_byte_offset += (OPJ_OFF_T)p_stream->m_bytes_in_buffer; - p_stream->m_bytes_in_buffer = 0; - } - else { - /* case where we are already at the end of the buffer - so reset the m_current_data to point to the start of the - stored buffer to get ready to read from disk*/ - p_stream->m_current_data = p_stream->m_stored_data; - } - - while(1){ - /* we should read less than a chunk -> read a chunk */ - if (p_size < p_stream->m_buffer_size) { - /* we should do an actual read on the media */ - p_stream->m_bytes_in_buffer = p_stream->m_read_fn(p_stream->m_stored_data,p_stream->m_buffer_size,p_stream->m_user_data); - - if (p_stream->m_bytes_in_buffer == (OPJ_SIZE_T)-1) { - /* end of stream */ - opj_event_msg(p_event_mgr, EVT_INFO, "Stream reached its end !\n"); - - p_stream->m_bytes_in_buffer = 0; - p_stream->m_status |= opj_stream_e_end; - /* end of stream */ - return l_read_nb_bytes ? l_read_nb_bytes : (OPJ_SIZE_T)-1; - } - else if (p_stream->m_bytes_in_buffer < p_size) { - /* not enough data */ - l_read_nb_bytes += p_stream->m_bytes_in_buffer; - memcpy(p_buffer,p_stream->m_current_data,p_stream->m_bytes_in_buffer); - p_stream->m_current_data = p_stream->m_stored_data; - p_buffer += p_stream->m_bytes_in_buffer; - p_size -= p_stream->m_bytes_in_buffer; - p_stream->m_byte_offset += (OPJ_OFF_T)p_stream->m_bytes_in_buffer; - p_stream->m_bytes_in_buffer = 0; - } - else { - l_read_nb_bytes += p_size; - memcpy(p_buffer,p_stream->m_current_data,p_size); - p_stream->m_current_data += p_size; - p_stream->m_bytes_in_buffer -= p_size; - p_stream->m_byte_offset += (OPJ_OFF_T)p_size; - return l_read_nb_bytes; - } - } - else { - /* direct read on the dest buffer */ - p_stream->m_bytes_in_buffer = p_stream->m_read_fn(p_buffer,p_size,p_stream->m_user_data); - - if (p_stream->m_bytes_in_buffer == (OPJ_SIZE_T)-1) { - /* end of stream */ - opj_event_msg(p_event_mgr, EVT_INFO, "Stream reached its end !\n"); - - p_stream->m_bytes_in_buffer = 0; - p_stream->m_status |= opj_stream_e_end; - /* end of stream */ - return l_read_nb_bytes ? l_read_nb_bytes : (OPJ_SIZE_T)-1; - } - else if (p_stream->m_bytes_in_buffer < p_size) { - /* not enough data */ - l_read_nb_bytes += p_stream->m_bytes_in_buffer; - p_stream->m_current_data = p_stream->m_stored_data; - p_buffer += p_stream->m_bytes_in_buffer; - p_size -= p_stream->m_bytes_in_buffer; - p_stream->m_byte_offset += (OPJ_OFF_T)p_stream->m_bytes_in_buffer; - p_stream->m_bytes_in_buffer = 0; - } - else { - /* we have read the exact size */ - l_read_nb_bytes += p_stream->m_bytes_in_buffer; - p_stream->m_byte_offset += (OPJ_OFF_T)p_stream->m_bytes_in_buffer; - p_stream->m_current_data = p_stream->m_stored_data; - p_stream->m_bytes_in_buffer = 0; - return l_read_nb_bytes; - } - } - } -} - -OPJ_SIZE_T opj_stream_write_data (opj_stream_private_t * p_stream, - const OPJ_BYTE * p_buffer, - OPJ_SIZE_T p_size, - opj_event_mgr_t * p_event_mgr) -{ - OPJ_SIZE_T l_remaining_bytes = 0; - OPJ_SIZE_T l_write_nb_bytes = 0; - - if (p_stream->m_status & opj_stream_e_error) { - return (OPJ_SIZE_T)-1; - } - - while(1) { - l_remaining_bytes = p_stream->m_buffer_size - p_stream->m_bytes_in_buffer; - - /* we have more memory than required */ - if (l_remaining_bytes >= p_size) { - memcpy(p_stream->m_current_data, p_buffer, p_size); - - p_stream->m_current_data += p_size; - p_stream->m_bytes_in_buffer += p_size; - l_write_nb_bytes += p_size; - p_stream->m_byte_offset += (OPJ_OFF_T)p_size; - - return l_write_nb_bytes; - } - - /* we copy data and then do an actual read on the stream */ - if (l_remaining_bytes) { - l_write_nb_bytes += l_remaining_bytes; - - memcpy(p_stream->m_current_data,p_buffer,l_remaining_bytes); - - p_stream->m_current_data = p_stream->m_stored_data; - - p_buffer += l_remaining_bytes; - p_size -= l_remaining_bytes; - p_stream->m_bytes_in_buffer += l_remaining_bytes; - p_stream->m_byte_offset += (OPJ_OFF_T)l_remaining_bytes; - } - - if (! opj_stream_flush(p_stream, p_event_mgr)) { - return (OPJ_SIZE_T)-1; - } - } - -} - -OPJ_BOOL opj_stream_flush (opj_stream_private_t * p_stream, opj_event_mgr_t * p_event_mgr) -{ - /* the number of bytes written on the media. */ - OPJ_SIZE_T l_current_write_nb_bytes = 0; - - p_stream->m_current_data = p_stream->m_stored_data; - - while (p_stream->m_bytes_in_buffer) { - /* we should do an actual write on the media */ - l_current_write_nb_bytes = p_stream->m_write_fn(p_stream->m_current_data, - p_stream->m_bytes_in_buffer, - p_stream->m_user_data); - - if (l_current_write_nb_bytes == (OPJ_SIZE_T)-1) { - p_stream->m_status |= opj_stream_e_error; - opj_event_msg(p_event_mgr, EVT_INFO, "Error on writing stream!\n"); - - return OPJ_FALSE; - } - - p_stream->m_current_data += l_current_write_nb_bytes; - p_stream->m_bytes_in_buffer -= l_current_write_nb_bytes; - } - - p_stream->m_current_data = p_stream->m_stored_data; - - return OPJ_TRUE; -} - -OPJ_OFF_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, opj_event_mgr_t * p_event_mgr) -{ - OPJ_OFF_T l_skip_nb_bytes = 0; - OPJ_OFF_T l_current_skip_nb_bytes = 0; - - assert( p_size >= 0 ); - - if (p_stream->m_bytes_in_buffer >= (OPJ_SIZE_T)p_size) { - p_stream->m_current_data += p_size; - /* it is safe to cast p_size to OPJ_SIZE_T since it is <= m_bytes_in_buffer - which is of type OPJ_SIZE_T */ - p_stream->m_bytes_in_buffer -= (OPJ_SIZE_T)p_size; - l_skip_nb_bytes += p_size; - p_stream->m_byte_offset += l_skip_nb_bytes; - return l_skip_nb_bytes; - } - - /* we are now in the case when the remaining data if not sufficient */ - if (p_stream->m_status & opj_stream_e_end) { - l_skip_nb_bytes += (OPJ_OFF_T)p_stream->m_bytes_in_buffer; - p_stream->m_current_data += p_stream->m_bytes_in_buffer; - p_stream->m_bytes_in_buffer = 0; - p_stream->m_byte_offset += l_skip_nb_bytes; - return l_skip_nb_bytes ? l_skip_nb_bytes : (OPJ_OFF_T) -1; - } - - /* the flag is not set, we copy data and then do an actual skip on the stream */ - if (p_stream->m_bytes_in_buffer) { - l_skip_nb_bytes += (OPJ_OFF_T)p_stream->m_bytes_in_buffer; - p_stream->m_current_data = p_stream->m_stored_data; - p_size -= (OPJ_OFF_T)p_stream->m_bytes_in_buffer; - p_stream->m_bytes_in_buffer = 0; - } - - while (p_size > 0) { - /* we should do an actual skip on the media */ - l_current_skip_nb_bytes = p_stream->m_skip_fn(p_size, p_stream->m_user_data); - if (l_current_skip_nb_bytes == (OPJ_OFF_T) -1) { - opj_event_msg(p_event_mgr, EVT_INFO, "Stream reached its end !\n"); - - p_stream->m_status |= opj_stream_e_end; - p_stream->m_byte_offset += l_skip_nb_bytes; - /* end if stream */ - return l_skip_nb_bytes ? l_skip_nb_bytes : (OPJ_OFF_T) -1; - } - p_size -= l_current_skip_nb_bytes; - l_skip_nb_bytes += l_current_skip_nb_bytes; - } - - p_stream->m_byte_offset += l_skip_nb_bytes; - - return l_skip_nb_bytes; -} - -OPJ_OFF_T opj_stream_write_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, opj_event_mgr_t * p_event_mgr) -{ - OPJ_BOOL l_is_written = 0; - OPJ_OFF_T l_current_skip_nb_bytes = 0; - OPJ_OFF_T l_skip_nb_bytes = 0; - - if (p_stream->m_status & opj_stream_e_error) { - return (OPJ_OFF_T) -1; - } - - /* we should flush data */ - l_is_written = opj_stream_flush (p_stream, p_event_mgr); - if (! l_is_written) { - p_stream->m_status |= opj_stream_e_error; - p_stream->m_bytes_in_buffer = 0; - return (OPJ_OFF_T) -1; - } - /* then skip */ - - while (p_size > 0) { - /* we should do an actual skip on the media */ - l_current_skip_nb_bytes = p_stream->m_skip_fn(p_size, p_stream->m_user_data); - - if (l_current_skip_nb_bytes == (OPJ_OFF_T)-1) { - opj_event_msg(p_event_mgr, EVT_INFO, "Stream error!\n"); - - p_stream->m_status |= opj_stream_e_error; - p_stream->m_byte_offset += l_skip_nb_bytes; - /* end if stream */ - return l_skip_nb_bytes ? l_skip_nb_bytes : (OPJ_OFF_T)-1; - } - p_size -= l_current_skip_nb_bytes; - l_skip_nb_bytes += l_current_skip_nb_bytes; - } - - p_stream->m_byte_offset += l_skip_nb_bytes; - - return l_skip_nb_bytes; -} - -OPJ_OFF_T opj_stream_tell (const opj_stream_private_t * p_stream) -{ - return p_stream->m_byte_offset; -} - -OPJ_OFF_T opj_stream_get_number_byte_left (const opj_stream_private_t * p_stream) -{ - assert( p_stream->m_byte_offset >= 0 ); - assert( p_stream->m_user_data_length >= (OPJ_UINT64)p_stream->m_byte_offset); - return p_stream->m_user_data_length ? - (OPJ_OFF_T)(p_stream->m_user_data_length) - p_stream->m_byte_offset : - 0; -} - -OPJ_OFF_T opj_stream_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, opj_event_mgr_t * p_event_mgr) -{ - assert(p_size >= 0); - return p_stream->m_opj_skip(p_stream,p_size,p_event_mgr); -} - -OPJ_BOOL opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, opj_event_mgr_t * p_event_mgr) -{ - OPJ_ARG_NOT_USED(p_event_mgr); - p_stream->m_current_data = p_stream->m_stored_data; - p_stream->m_bytes_in_buffer = 0; - - if( !(p_stream->m_seek_fn(p_size,p_stream->m_user_data)) ) { - p_stream->m_status |= opj_stream_e_end; - return OPJ_FALSE; - } - else { - /* reset stream status */ - p_stream->m_status &= (~opj_stream_e_end); - p_stream->m_byte_offset = p_size; - - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, opj_event_mgr_t * p_event_mgr) -{ - if (! opj_stream_flush(p_stream,p_event_mgr)) { - p_stream->m_status |= opj_stream_e_error; - return OPJ_FALSE; - } - - p_stream->m_current_data = p_stream->m_stored_data; - p_stream->m_bytes_in_buffer = 0; - - if (! p_stream->m_seek_fn(p_size,p_stream->m_user_data)) { - p_stream->m_status |= opj_stream_e_error; - return OPJ_FALSE; - } - else { - p_stream->m_byte_offset = p_size; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_stream_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr) -{ - assert(p_size >= 0); - return p_stream->m_opj_seek(p_stream,p_size,p_event_mgr); -} - -OPJ_BOOL opj_stream_has_seek (const opj_stream_private_t * p_stream) -{ - return p_stream->m_seek_fn != opj_stream_default_seek; -} - -OPJ_SIZE_T opj_stream_default_read (void * p_buffer, OPJ_SIZE_T p_nb_bytes, void * p_user_data) -{ - OPJ_ARG_NOT_USED(p_buffer); - OPJ_ARG_NOT_USED(p_nb_bytes); - OPJ_ARG_NOT_USED(p_user_data); - return (OPJ_SIZE_T) -1; -} - -OPJ_SIZE_T opj_stream_default_write (void * p_buffer, OPJ_SIZE_T p_nb_bytes, void * p_user_data) -{ - OPJ_ARG_NOT_USED(p_buffer); - OPJ_ARG_NOT_USED(p_nb_bytes); - OPJ_ARG_NOT_USED(p_user_data); - return (OPJ_SIZE_T) -1; -} - -OPJ_OFF_T opj_stream_default_skip (OPJ_OFF_T p_nb_bytes, void * p_user_data) -{ - OPJ_ARG_NOT_USED(p_nb_bytes); - OPJ_ARG_NOT_USED(p_user_data); - return (OPJ_OFF_T) -1; -} - -OPJ_BOOL opj_stream_default_seek (OPJ_OFF_T p_nb_bytes, void * p_user_data) -{ - OPJ_ARG_NOT_USED(p_nb_bytes); - OPJ_ARG_NOT_USED(p_user_data); - return OPJ_FALSE; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/cio.h b/Dependencies/FreeImage/Source/LibOpenJPEG/cio.h deleted file mode 100644 index edbc200..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/cio.h +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __CIO_H -#define __CIO_H -/** -@file cio.h -@brief Implementation of a byte input-output process (CIO) - -The functions in CIO.C have for goal to realize a byte input / output process. -*/ - -/** @defgroup CIO CIO - byte input-output stream */ -/*@{*/ - -#include "opj_config.h" - -/* ----------------------------------------------------------------------- */ - -#if defined(OPJ_BIG_ENDIAN) - #define opj_write_bytes opj_write_bytes_BE - #define opj_read_bytes opj_read_bytes_BE - #define opj_write_double opj_write_double_BE - #define opj_read_double opj_read_double_BE - #define opj_write_float opj_write_float_BE - #define opj_read_float opj_read_float_BE -#else - #define opj_write_bytes opj_write_bytes_LE - #define opj_read_bytes opj_read_bytes_LE - #define opj_write_double opj_write_double_LE - #define opj_read_double opj_read_double_LE - #define opj_write_float opj_write_float_LE - #define opj_read_float opj_read_float_LE -#endif - - - -typedef enum -{ - opj_signed_sentinel = -1, /* do not use in code */ - opj_stream_e_output = 0x1, - opj_stream_e_input = 0x2, - opj_stream_e_end = 0x4, - opj_stream_e_error = 0x8 -} -opj_stream_flag ; - -/** -Byte input-output stream. -*/ -typedef struct opj_stream_private -{ - /** - * User data, be it files, ... The actual data depends on the type of the stream. - */ - void * m_user_data; - - /** - * Pointer to function to free m_user_data (NULL at initialization) - * when destroying the stream. If pointer is NULL the function is not - * called and the m_user_data is not freed (even if non-NULL). - */ - opj_stream_free_user_data_fn m_free_user_data_fn; - - /** - * User data length - */ - OPJ_UINT64 m_user_data_length; - - /** - * Pointer to actual read function (NULL at the initialization of the cio. - */ - opj_stream_read_fn m_read_fn; - - /** - * Pointer to actual write function (NULL at the initialization of the cio. - */ - opj_stream_write_fn m_write_fn; - - /** - * Pointer to actual skip function (NULL at the initialization of the cio. - * There is no seek function to prevent from back and forth slow procedures. - */ - opj_stream_skip_fn m_skip_fn; - - /** - * Pointer to actual seek function (if available). - */ - opj_stream_seek_fn m_seek_fn; - - /** - * Actual data stored into the stream if readed from. Data is read by chunk of fixed size. - * you should never access this data directly. - */ - OPJ_BYTE * m_stored_data; - - /** - * Pointer to the current read data. - */ - OPJ_BYTE * m_current_data; - - /** - * FIXME DOC. - */ - OPJ_OFF_T (* m_opj_skip)(struct opj_stream_private * ,OPJ_OFF_T , struct opj_event_mgr *); - - /** - * FIXME DOC. - */ - OPJ_BOOL (* m_opj_seek) (struct opj_stream_private * , OPJ_OFF_T , struct opj_event_mgr *); - - /** - * number of bytes containing in the buffer. - */ - OPJ_SIZE_T m_bytes_in_buffer; - - /** - * The number of bytes read/written from the beginning of the stream - */ - OPJ_OFF_T m_byte_offset; - - /** - * The size of the buffer. - */ - OPJ_SIZE_T m_buffer_size; - - /** - * Flags to tell the status of the stream. - */ - opj_stream_flag m_status; - -} -opj_stream_private_t; - -/** @name Exported functions (see also openjpeg.h) */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** - * Write some bytes to the given data buffer, this function is used in Big Endian cpus. - * @param p_buffer pointer the data buffer to write data to. - * @param p_value the value to write - * @param p_nb_bytes the number of bytes to write -*/ -void opj_write_bytes_BE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_nb_bytes); - -/** - * Reads some bytes from the given data buffer, this function is used in Big Endian cpus. - * @param p_buffer pointer the data buffer to read data from. - * @param p_value pointer to the value that will store the data. - * @param p_nb_bytes the nb bytes to read. - * @return the number of bytes read or -1 if an error occured. - */ -void opj_read_bytes_BE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT32 p_nb_bytes); - -/** - * Write some bytes to the given data buffer, this function is used in Little Endian cpus. - * @param p_buffer pointer the data buffer to write data to. - * @param p_value the value to write - * @param p_nb_bytes the number of bytes to write - * @return the number of bytes written or -1 if an error occured -*/ -void opj_write_bytes_LE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_nb_bytes); - -/** - * Reads some bytes from the given data buffer, this function is used in Little Endian cpus. - * @param p_buffer pointer the data buffer to read data from. - * @param p_value pointer to the value that will store the data. - * @param p_nb_bytes the nb bytes to read. - * @return the number of bytes read or -1 if an error occured. - */ -void opj_read_bytes_LE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT32 p_nb_bytes); - - -/** - * Write some bytes to the given data buffer, this function is used in Little Endian cpus. - * @param p_buffer pointer the data buffer to write data to. - * @param p_value the value to write - */ -void opj_write_double_LE(OPJ_BYTE * p_buffer, OPJ_FLOAT64 p_value); - -/*** - * Write some bytes to the given data buffer, this function is used in Big Endian cpus. - * @param p_buffer pointer the data buffer to write data to. - * @param p_value the value to write - */ -void opj_write_double_BE(OPJ_BYTE * p_buffer, OPJ_FLOAT64 p_value); - -/** - * Reads some bytes from the given data buffer, this function is used in Little Endian cpus. - * @param p_buffer pointer the data buffer to read data from. - * @param p_value pointer to the value that will store the data. - */ -void opj_read_double_LE(const OPJ_BYTE * p_buffer, OPJ_FLOAT64 * p_value); - -/** - * Reads some bytes from the given data buffer, this function is used in Big Endian cpus. - * @param p_buffer pointer the data buffer to read data from. - * @param p_value pointer to the value that will store the data. - */ -void opj_read_double_BE(const OPJ_BYTE * p_buffer, OPJ_FLOAT64 * p_value); - -/** - * Reads some bytes from the given data buffer, this function is used in Little Endian cpus. - * @param p_buffer pointer the data buffer to read data from. - * @param p_value pointer to the value that will store the data. - */ -void opj_read_float_LE(const OPJ_BYTE * p_buffer, OPJ_FLOAT32 * p_value); - -/** - * Reads some bytes from the given data buffer, this function is used in Big Endian cpus. - * @param p_buffer pointer the data buffer to read data from. - * @param p_value pointer to the value that will store the data. - */ -void opj_read_float_BE(const OPJ_BYTE * p_buffer, OPJ_FLOAT32 * p_value); - -/** - * Write some bytes to the given data buffer, this function is used in Little Endian cpus. - * @param p_buffer pointer the data buffer to write data to. - * @param p_value the value to write - */ -void opj_write_float_LE(OPJ_BYTE * p_buffer, OPJ_FLOAT32 p_value); - -/*** - * Write some bytes to the given data buffer, this function is used in Big Endian cpus. - * @param p_buffer pointer the data buffer to write data to. - * @param p_value the value to write - */ -void opj_write_float_BE(OPJ_BYTE * p_buffer, OPJ_FLOAT32 p_value); - -/** - * Reads some bytes from the stream. - * @param p_stream the stream to read data from. - * @param p_buffer pointer to the data buffer that will receive the data. - * @param p_size number of bytes to read. - * @param p_event_mgr the user event manager to be notified of special events. - * @return the number of bytes read, or -1 if an error occured or if the stream is at the end. - */ -OPJ_SIZE_T opj_stream_read_data (opj_stream_private_t * p_stream,OPJ_BYTE * p_buffer, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr); - -/** - * Writes some bytes to the stream. - * @param p_stream the stream to write data to. - * @param p_buffer pointer to the data buffer holds the data to be writtent. - * @param p_size number of bytes to write. - * @param p_event_mgr the user event manager to be notified of special events. - * @return the number of bytes writtent, or -1 if an error occured. - */ -OPJ_SIZE_T opj_stream_write_data (opj_stream_private_t * p_stream,const OPJ_BYTE * p_buffer, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr); - -/** - * Writes the content of the stream buffer to the stream. - * @param p_stream the stream to write data to. - * @param p_event_mgr the user event manager to be notified of special events. - * @return true if the data could be flushed, false else. - */ -OPJ_BOOL opj_stream_flush (opj_stream_private_t * p_stream, struct opj_event_mgr * p_event_mgr); - -/** - * Skips a number of bytes from the stream. - * @param p_stream the stream to skip data from. - * @param p_size the number of bytes to skip. - * @param p_event_mgr the user event manager to be notified of special events. - * @return the number of bytes skipped, or -1 if an error occured. - */ -OPJ_OFF_T opj_stream_skip (opj_stream_private_t * p_stream,OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr); - -/** - * Tells the byte offset on the stream (similar to ftell). - * - * @param p_stream the stream to get the information from. - * - * @return the current position o fthe stream. - */ -OPJ_OFF_T opj_stream_tell (const opj_stream_private_t * p_stream); - - -/** - * Get the number of bytes left before the end of the stream (similar to cio_numbytesleft). - * - * @param p_stream the stream to get the information from. - * - * @return Number of bytes left before the end of the stream. - */ -OPJ_OFF_T opj_stream_get_number_byte_left (const opj_stream_private_t * p_stream); - -/** - * Skips a number of bytes from the stream. - * @param p_stream the stream to skip data from. - * @param p_size the number of bytes to skip. - * @param p_event_mgr the user event manager to be notified of special events. - * @return the number of bytes skipped, or -1 if an error occured. - */ -OPJ_OFF_T opj_stream_write_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr); - -/** - * Skips a number of bytes from the stream. - * @param p_stream the stream to skip data from. - * @param p_size the number of bytes to skip. - * @param p_event_mgr the user event manager to be notified of special events. - * @return the number of bytes skipped, or -1 if an error occured. - */ -OPJ_OFF_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr); - -/** - * Skips a number of bytes from the stream. - * @param p_stream the stream to skip data from. - * @param p_size the number of bytes to skip. - * @param p_event_mgr the user event manager to be notified of special events. - * @return OPJ_TRUE if success, or OPJ_FALSE if an error occured. - */ -OPJ_BOOL opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr); - -/** - * Skips a number of bytes from the stream. - * @param p_stream the stream to skip data from. - * @param p_size the number of bytes to skip. - * @param p_event_mgr the user event manager to be notified of special events. - * @return the number of bytes skipped, or -1 if an error occured. - */ -OPJ_BOOL opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr); - -/** - * Seeks a number of bytes from the stream. - * @param p_stream the stream to skip data from. - * @param p_size the number of bytes to skip. - * @param p_event_mgr the user event manager to be notified of special events. - * @return true if the stream is seekable. - */ -OPJ_BOOL opj_stream_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr); - -/** - * Tells if the given stream is seekable. - */ -OPJ_BOOL opj_stream_has_seek (const opj_stream_private_t * p_stream); - -/** - * FIXME DOC. - */ -OPJ_SIZE_T opj_stream_default_read (void * p_buffer, OPJ_SIZE_T p_nb_bytes, void * p_user_data); - -/** - * FIXME DOC. - */ -OPJ_SIZE_T opj_stream_default_write (void * p_buffer, OPJ_SIZE_T p_nb_bytes, void * p_user_data); - -/** - * FIXME DOC. - */ -OPJ_OFF_T opj_stream_default_skip (OPJ_OFF_T p_nb_bytes, void * p_user_data); - -/** - * FIXME DOC. - */ -OPJ_BOOL opj_stream_default_seek (OPJ_OFF_T p_nb_bytes, void * p_user_data); - -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - - -#endif /* __CIO_H */ - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/dwt.c b/Dependencies/FreeImage/Source/LibOpenJPEG/dwt.c deleted file mode 100644 index b36d68d..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/dwt.c +++ /dev/null @@ -1,919 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2007, Jonathan Ballard - * Copyright (c) 2007, Callum Lerwick - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef __SSE__ -#include -#endif - -#include "opj_includes.h" - -/** @defgroup DWT DWT - Implementation of a discrete wavelet transform */ -/*@{*/ - -#define OPJ_WS(i) v->mem[(i)*2] -#define OPJ_WD(i) v->mem[(1+(i)*2)] - -/** @name Local data structures */ -/*@{*/ - -typedef struct dwt_local { - OPJ_INT32* mem; - OPJ_INT32 dn; - OPJ_INT32 sn; - OPJ_INT32 cas; -} opj_dwt_t; - -typedef union { - OPJ_FLOAT32 f[4]; -} opj_v4_t; - -typedef struct v4dwt_local { - opj_v4_t* wavelet ; - OPJ_INT32 dn ; - OPJ_INT32 sn ; - OPJ_INT32 cas ; -} opj_v4dwt_t ; - -static const OPJ_FLOAT32 opj_dwt_alpha = 1.586134342f; /* 12994 */ -static const OPJ_FLOAT32 opj_dwt_beta = 0.052980118f; /* 434 */ -static const OPJ_FLOAT32 opj_dwt_gamma = -0.882911075f; /* -7233 */ -static const OPJ_FLOAT32 opj_dwt_delta = -0.443506852f; /* -3633 */ - -static const OPJ_FLOAT32 opj_K = 1.230174105f; /* 10078 */ -static const OPJ_FLOAT32 opj_c13318 = 1.625732422f; - -/*@}*/ - -/** -Virtual function type for wavelet transform in 1-D -*/ -typedef void (*DWT1DFN)(opj_dwt_t* v); - -/** @name Local static functions */ -/*@{*/ - -/** -Forward lazy transform (horizontal) -*/ -static void opj_dwt_deinterleave_h(OPJ_INT32 *a, OPJ_INT32 *b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas); -/** -Forward lazy transform (vertical) -*/ -static void opj_dwt_deinterleave_v(OPJ_INT32 *a, OPJ_INT32 *b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 x, OPJ_INT32 cas); -/** -Inverse lazy transform (horizontal) -*/ -static void opj_dwt_interleave_h(opj_dwt_t* h, OPJ_INT32 *a); -/** -Inverse lazy transform (vertical) -*/ -static void opj_dwt_interleave_v(opj_dwt_t* v, OPJ_INT32 *a, OPJ_INT32 x); -/** -Forward 5-3 wavelet transform in 1-D -*/ -static void opj_dwt_encode_1(OPJ_INT32 *a, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas); -/** -Inverse 5-3 wavelet transform in 1-D -*/ -static void opj_dwt_decode_1(opj_dwt_t *v); -static void opj_dwt_decode_1_(OPJ_INT32 *a, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas); -/** -Forward 9-7 wavelet transform in 1-D -*/ -static void opj_dwt_encode_1_real(OPJ_INT32 *a, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas); -/** -Explicit calculation of the Quantization Stepsizes -*/ -static void opj_dwt_encode_stepsize(OPJ_INT32 stepsize, OPJ_INT32 numbps, opj_stepsize_t *bandno_stepsize); -/** -Inverse wavelet transform in 2-D. -*/ -static OPJ_BOOL opj_dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 i, DWT1DFN fn); - -static OPJ_BOOL opj_dwt_encode_procedure( opj_tcd_tilecomp_t * tilec, - void (*p_function)(OPJ_INT32 *, OPJ_INT32,OPJ_INT32,OPJ_INT32) ); - -static OPJ_UINT32 opj_dwt_max_resolution(opj_tcd_resolution_t* restrict r, OPJ_UINT32 i); - -/* */ -/* Inverse 9-7 wavelet transform in 1-D. */ -/* */ -static void opj_v4dwt_decode(opj_v4dwt_t* restrict dwt); - -static void opj_v4dwt_interleave_h(opj_v4dwt_t* restrict w, OPJ_FLOAT32* restrict a, OPJ_INT32 x, OPJ_INT32 size); - -static void opj_v4dwt_interleave_v(opj_v4dwt_t* restrict v , OPJ_FLOAT32* restrict a , OPJ_INT32 x, OPJ_INT32 nb_elts_read); - -#ifdef __SSE__ -static void opj_v4dwt_decode_step1_sse(opj_v4_t* w, OPJ_INT32 count, const __m128 c); - -static void opj_v4dwt_decode_step2_sse(opj_v4_t* l, opj_v4_t* w, OPJ_INT32 k, OPJ_INT32 m, __m128 c); - -#else -static void opj_v4dwt_decode_step1(opj_v4_t* w, OPJ_INT32 count, const OPJ_FLOAT32 c); - -static void opj_v4dwt_decode_step2(opj_v4_t* l, opj_v4_t* w, OPJ_INT32 k, OPJ_INT32 m, OPJ_FLOAT32 c); - -#endif - -/*@}*/ - -/*@}*/ - -#define OPJ_S(i) a[(i)*2] -#define OPJ_D(i) a[(1+(i)*2)] -#define OPJ_S_(i) ((i)<0?OPJ_S(0):((i)>=sn?OPJ_S(sn-1):OPJ_S(i))) -#define OPJ_D_(i) ((i)<0?OPJ_D(0):((i)>=dn?OPJ_D(dn-1):OPJ_D(i))) -/* new */ -#define OPJ_SS_(i) ((i)<0?OPJ_S(0):((i)>=dn?OPJ_S(dn-1):OPJ_S(i))) -#define OPJ_DD_(i) ((i)<0?OPJ_D(0):((i)>=sn?OPJ_D(sn-1):OPJ_D(i))) - -/* */ -/* This table contains the norms of the 5-3 wavelets for different bands. */ -/* */ -static const OPJ_FLOAT64 opj_dwt_norms[4][10] = { - {1.000, 1.500, 2.750, 5.375, 10.68, 21.34, 42.67, 85.33, 170.7, 341.3}, - {1.038, 1.592, 2.919, 5.703, 11.33, 22.64, 45.25, 90.48, 180.9}, - {1.038, 1.592, 2.919, 5.703, 11.33, 22.64, 45.25, 90.48, 180.9}, - {.7186, .9218, 1.586, 3.043, 6.019, 12.01, 24.00, 47.97, 95.93} -}; - -/* */ -/* This table contains the norms of the 9-7 wavelets for different bands. */ -/* */ -static const OPJ_FLOAT64 opj_dwt_norms_real[4][10] = { - {1.000, 1.965, 4.177, 8.403, 16.90, 33.84, 67.69, 135.3, 270.6, 540.9}, - {2.022, 3.989, 8.355, 17.04, 34.27, 68.63, 137.3, 274.6, 549.0}, - {2.022, 3.989, 8.355, 17.04, 34.27, 68.63, 137.3, 274.6, 549.0}, - {2.080, 3.865, 8.307, 17.18, 34.71, 69.59, 139.3, 278.6, 557.2} -}; - -/* -========================================================== - local functions -========================================================== -*/ - -/* */ -/* Forward lazy transform (horizontal). */ -/* */ -void opj_dwt_deinterleave_h(OPJ_INT32 *a, OPJ_INT32 *b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas) { - OPJ_INT32 i; - OPJ_INT32 * l_dest = b; - OPJ_INT32 * l_src = a+cas; - - for (i=0; i */ -/* Forward lazy transform (vertical). */ -/* */ -void opj_dwt_deinterleave_v(OPJ_INT32 *a, OPJ_INT32 *b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 x, OPJ_INT32 cas) { - OPJ_INT32 i = sn; - OPJ_INT32 * l_dest = b; - OPJ_INT32 * l_src = a+cas; - - while (i--) { - *l_dest = *l_src; - l_dest += x; - l_src += 2; - } /* b[i*x]=a[2*i+cas]; */ - - l_dest = b + sn * x; - l_src = a + 1 - cas; - - i = dn; - while (i--) { - *l_dest = *l_src; - l_dest += x; - l_src += 2; - } /*b[(sn+i)*x]=a[(2*i+1-cas)];*/ -} - -/* */ -/* Inverse lazy transform (horizontal). */ -/* */ -void opj_dwt_interleave_h(opj_dwt_t* h, OPJ_INT32 *a) { - OPJ_INT32 *ai = a; - OPJ_INT32 *bi = h->mem + h->cas; - OPJ_INT32 i = h->sn; - while( i-- ) { - *bi = *(ai++); - bi += 2; - } - ai = a + h->sn; - bi = h->mem + 1 - h->cas; - i = h->dn ; - while( i-- ) { - *bi = *(ai++); - bi += 2; - } -} - -/* */ -/* Inverse lazy transform (vertical). */ -/* */ -void opj_dwt_interleave_v(opj_dwt_t* v, OPJ_INT32 *a, OPJ_INT32 x) { - OPJ_INT32 *ai = a; - OPJ_INT32 *bi = v->mem + v->cas; - OPJ_INT32 i = v->sn; - while( i-- ) { - *bi = *ai; - bi += 2; - ai += x; - } - ai = a + (v->sn * x); - bi = v->mem + 1 - v->cas; - i = v->dn ; - while( i-- ) { - *bi = *ai; - bi += 2; - ai += x; - } -} - - -/* */ -/* Forward 5-3 wavelet transform in 1-D. */ -/* */ -void opj_dwt_encode_1(OPJ_INT32 *a, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas) { - OPJ_INT32 i; - - if (!cas) { - if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */ - for (i = 0; i < dn; i++) OPJ_D(i) -= (OPJ_S_(i) + OPJ_S_(i + 1)) >> 1; - for (i = 0; i < sn; i++) OPJ_S(i) += (OPJ_D_(i - 1) + OPJ_D_(i) + 2) >> 2; - } - } else { - if (!sn && dn == 1) /* NEW : CASE ONE ELEMENT */ - OPJ_S(0) *= 2; - else { - for (i = 0; i < dn; i++) OPJ_S(i) -= (OPJ_DD_(i) + OPJ_DD_(i - 1)) >> 1; - for (i = 0; i < sn; i++) OPJ_D(i) += (OPJ_SS_(i) + OPJ_SS_(i + 1) + 2) >> 2; - } - } -} - -/* */ -/* Inverse 5-3 wavelet transform in 1-D. */ -/* */ -void opj_dwt_decode_1_(OPJ_INT32 *a, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas) { - OPJ_INT32 i; - - if (!cas) { - if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */ - for (i = 0; i < sn; i++) OPJ_S(i) -= (OPJ_D_(i - 1) + OPJ_D_(i) + 2) >> 2; - for (i = 0; i < dn; i++) OPJ_D(i) += (OPJ_S_(i) + OPJ_S_(i + 1)) >> 1; - } - } else { - if (!sn && dn == 1) /* NEW : CASE ONE ELEMENT */ - OPJ_S(0) /= 2; - else { - for (i = 0; i < sn; i++) OPJ_D(i) -= (OPJ_SS_(i) + OPJ_SS_(i + 1) + 2) >> 2; - for (i = 0; i < dn; i++) OPJ_S(i) += (OPJ_DD_(i) + OPJ_DD_(i - 1)) >> 1; - } - } -} - -/* */ -/* Inverse 5-3 wavelet transform in 1-D. */ -/* */ -void opj_dwt_decode_1(opj_dwt_t *v) { - opj_dwt_decode_1_(v->mem, v->dn, v->sn, v->cas); -} - -/* */ -/* Forward 9-7 wavelet transform in 1-D. */ -/* */ -void opj_dwt_encode_1_real(OPJ_INT32 *a, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas) { - OPJ_INT32 i; - if (!cas) { - if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */ - for (i = 0; i < dn; i++) - OPJ_D(i) -= opj_int_fix_mul(OPJ_S_(i) + OPJ_S_(i + 1), 12993); - for (i = 0; i < sn; i++) - OPJ_S(i) -= opj_int_fix_mul(OPJ_D_(i - 1) + OPJ_D_(i), 434); - for (i = 0; i < dn; i++) - OPJ_D(i) += opj_int_fix_mul(OPJ_S_(i) + OPJ_S_(i + 1), 7233); - for (i = 0; i < sn; i++) - OPJ_S(i) += opj_int_fix_mul(OPJ_D_(i - 1) + OPJ_D_(i), 3633); - for (i = 0; i < dn; i++) - OPJ_D(i) = opj_int_fix_mul(OPJ_D(i), 5038); /*5038 */ - for (i = 0; i < sn; i++) - OPJ_S(i) = opj_int_fix_mul(OPJ_S(i), 6659); /*6660 */ - } - } else { - if ((sn > 0) || (dn > 1)) { /* NEW : CASE ONE ELEMENT */ - for (i = 0; i < dn; i++) - OPJ_S(i) -= opj_int_fix_mul(OPJ_DD_(i) + OPJ_DD_(i - 1), 12993); - for (i = 0; i < sn; i++) - OPJ_D(i) -= opj_int_fix_mul(OPJ_SS_(i) + OPJ_SS_(i + 1), 434); - for (i = 0; i < dn; i++) - OPJ_S(i) += opj_int_fix_mul(OPJ_DD_(i) + OPJ_DD_(i - 1), 7233); - for (i = 0; i < sn; i++) - OPJ_D(i) += opj_int_fix_mul(OPJ_SS_(i) + OPJ_SS_(i + 1), 3633); - for (i = 0; i < dn; i++) - OPJ_S(i) = opj_int_fix_mul(OPJ_S(i), 5038); /*5038 */ - for (i = 0; i < sn; i++) - OPJ_D(i) = opj_int_fix_mul(OPJ_D(i), 6659); /*6660 */ - } - } -} - -void opj_dwt_encode_stepsize(OPJ_INT32 stepsize, OPJ_INT32 numbps, opj_stepsize_t *bandno_stepsize) { - OPJ_INT32 p, n; - p = opj_int_floorlog2(stepsize) - 13; - n = 11 - opj_int_floorlog2(stepsize); - bandno_stepsize->mant = (n < 0 ? stepsize >> -n : stepsize << n) & 0x7ff; - bandno_stepsize->expn = numbps - p; -} - -/* -========================================================== - DWT interface -========================================================== -*/ - - -/* */ -/* Forward 5-3 wavelet transform in 2-D. */ -/* */ -INLINE OPJ_BOOL opj_dwt_encode_procedure(opj_tcd_tilecomp_t * tilec,void (*p_function)(OPJ_INT32 *, OPJ_INT32,OPJ_INT32,OPJ_INT32) ) -{ - OPJ_INT32 i, j, k; - OPJ_INT32 *a = 00; - OPJ_INT32 *aj = 00; - OPJ_INT32 *bj = 00; - OPJ_INT32 w, l; - - OPJ_INT32 rw; /* width of the resolution level computed */ - OPJ_INT32 rh; /* height of the resolution level computed */ - OPJ_UINT32 l_data_size; - - opj_tcd_resolution_t * l_cur_res = 0; - opj_tcd_resolution_t * l_last_res = 0; - - w = tilec->x1-tilec->x0; - l = (OPJ_INT32)tilec->numresolutions-1; - a = tilec->data; - - l_cur_res = tilec->resolutions + l; - l_last_res = l_cur_res - 1; - - l_data_size = opj_dwt_max_resolution( tilec->resolutions,tilec->numresolutions) * (OPJ_UINT32)sizeof(OPJ_INT32); - bj = (OPJ_INT32*)opj_malloc((size_t)l_data_size); - if (! bj) { - return OPJ_FALSE; - } - i = l; - - while (i--) { - OPJ_INT32 rw1; /* width of the resolution level once lower than computed one */ - OPJ_INT32 rh1; /* height of the resolution level once lower than computed one */ - OPJ_INT32 cas_col; /* 0 = non inversion on horizontal filtering 1 = inversion between low-pass and high-pass filtering */ - OPJ_INT32 cas_row; /* 0 = non inversion on vertical filtering 1 = inversion between low-pass and high-pass filtering */ - OPJ_INT32 dn, sn; - - rw = l_cur_res->x1 - l_cur_res->x0; - rh = l_cur_res->y1 - l_cur_res->y0; - rw1 = l_last_res->x1 - l_last_res->x0; - rh1 = l_last_res->y1 - l_last_res->y0; - - cas_row = l_cur_res->x0 & 1; - cas_col = l_cur_res->y0 & 1; - - sn = rh1; - dn = rh - rh1; - for (j = 0; j < rw; ++j) { - aj = a + j; - for (k = 0; k < rh; ++k) { - bj[k] = aj[k*w]; - } - - (*p_function) (bj, dn, sn, cas_col); - - opj_dwt_deinterleave_v(bj, aj, dn, sn, w, cas_col); - } - - sn = rw1; - dn = rw - rw1; - - for (j = 0; j < rh; j++) { - aj = a + j * w; - for (k = 0; k < rw; k++) bj[k] = aj[k]; - (*p_function) (bj, dn, sn, cas_row); - opj_dwt_deinterleave_h(bj, aj, dn, sn, cas_row); - } - - l_cur_res = l_last_res; - - --l_last_res; - } - - opj_free(bj); - return OPJ_TRUE; -} - -/* Forward 5-3 wavelet transform in 2-D. */ -/* */ -OPJ_BOOL opj_dwt_encode(opj_tcd_tilecomp_t * tilec) -{ - return opj_dwt_encode_procedure(tilec,opj_dwt_encode_1); -} - -/* */ -/* Inverse 5-3 wavelet transform in 2-D. */ -/* */ -OPJ_BOOL opj_dwt_decode(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres) { - return opj_dwt_decode_tile(tilec, numres, &opj_dwt_decode_1); -} - - -/* */ -/* Get gain of 5-3 wavelet transform. */ -/* */ -OPJ_UINT32 opj_dwt_getgain(OPJ_UINT32 orient) { - if (orient == 0) - return 0; - if (orient == 1 || orient == 2) - return 1; - return 2; -} - -/* */ -/* Get norm of 5-3 wavelet. */ -/* */ -OPJ_FLOAT64 opj_dwt_getnorm(OPJ_UINT32 level, OPJ_UINT32 orient) { - return opj_dwt_norms[orient][level]; -} - -/* */ -/* Forward 9-7 wavelet transform in 2-D. */ -/* */ -OPJ_BOOL opj_dwt_encode_real(opj_tcd_tilecomp_t * tilec) -{ - return opj_dwt_encode_procedure(tilec,opj_dwt_encode_1_real); -} - -/* */ -/* Get gain of 9-7 wavelet transform. */ -/* */ -OPJ_UINT32 opj_dwt_getgain_real(OPJ_UINT32 orient) { - (void)orient; - return 0; -} - -/* */ -/* Get norm of 9-7 wavelet. */ -/* */ -OPJ_FLOAT64 opj_dwt_getnorm_real(OPJ_UINT32 level, OPJ_UINT32 orient) { - return opj_dwt_norms_real[orient][level]; -} - -void opj_dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, OPJ_UINT32 prec) { - OPJ_UINT32 numbands, bandno; - numbands = 3 * tccp->numresolutions - 2; - for (bandno = 0; bandno < numbands; bandno++) { - OPJ_FLOAT64 stepsize; - OPJ_UINT32 resno, level, orient, gain; - - resno = (bandno == 0) ? 0 : ((bandno - 1) / 3 + 1); - orient = (bandno == 0) ? 0 : ((bandno - 1) % 3 + 1); - level = tccp->numresolutions - 1 - resno; - gain = (tccp->qmfbid == 0) ? 0 : ((orient == 0) ? 0 : (((orient == 1) || (orient == 2)) ? 1 : 2)); - if (tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) { - stepsize = 1.0; - } else { - OPJ_FLOAT64 norm = opj_dwt_norms_real[orient][level]; - stepsize = (1 << (gain)) / norm; - } - opj_dwt_encode_stepsize((OPJ_INT32) floor(stepsize * 8192.0), (OPJ_INT32)(prec + gain), &tccp->stepsizes[bandno]); - } -} - -/* */ -/* Determine maximum computed resolution level for inverse wavelet transform */ -/* */ -OPJ_UINT32 opj_dwt_max_resolution(opj_tcd_resolution_t* restrict r, OPJ_UINT32 i) { - OPJ_UINT32 mr = 0; - OPJ_UINT32 w; - while( --i ) { - ++r; - if( mr < ( w = (OPJ_UINT32)(r->x1 - r->x0) ) ) - mr = w ; - if( mr < ( w = (OPJ_UINT32)(r->y1 - r->y0) ) ) - mr = w ; - } - return mr ; -} - -/* */ -/* Inverse wavelet transform in 2-D. */ -/* */ -OPJ_BOOL opj_dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres, DWT1DFN dwt_1D) { - opj_dwt_t h; - opj_dwt_t v; - - opj_tcd_resolution_t* tr = tilec->resolutions; - - OPJ_UINT32 rw = (OPJ_UINT32)(tr->x1 - tr->x0); /* width of the resolution level computed */ - OPJ_UINT32 rh = (OPJ_UINT32)(tr->y1 - tr->y0); /* height of the resolution level computed */ - - OPJ_UINT32 w = (OPJ_UINT32)(tilec->x1 - tilec->x0); - - h.mem = (OPJ_INT32*) - opj_aligned_malloc(opj_dwt_max_resolution(tr, numres) * sizeof(OPJ_INT32)); - if (! h.mem){ - return OPJ_FALSE; - } - - v.mem = h.mem; - - while( --numres) { - OPJ_INT32 * restrict tiledp = tilec->data; - OPJ_UINT32 j; - - ++tr; - h.sn = (OPJ_INT32)rw; - v.sn = (OPJ_INT32)rh; - - rw = (OPJ_UINT32)(tr->x1 - tr->x0); - rh = (OPJ_UINT32)(tr->y1 - tr->y0); - - h.dn = (OPJ_INT32)(rw - (OPJ_UINT32)h.sn); - h.cas = tr->x0 % 2; - - for(j = 0; j < rh; ++j) { - opj_dwt_interleave_h(&h, &tiledp[j*w]); - (dwt_1D)(&h); - memcpy(&tiledp[j*w], h.mem, rw * sizeof(OPJ_INT32)); - } - - v.dn = (OPJ_INT32)(rh - (OPJ_UINT32)v.sn); - v.cas = tr->y0 % 2; - - for(j = 0; j < rw; ++j){ - OPJ_UINT32 k; - opj_dwt_interleave_v(&v, &tiledp[j], (OPJ_INT32)w); - (dwt_1D)(&v); - for(k = 0; k < rh; ++k) { - tiledp[k * w + j] = v.mem[k]; - } - } - } - opj_aligned_free(h.mem); - return OPJ_TRUE; -} - -void opj_v4dwt_interleave_h(opj_v4dwt_t* restrict w, OPJ_FLOAT32* restrict a, OPJ_INT32 x, OPJ_INT32 size){ - OPJ_FLOAT32* restrict bi = (OPJ_FLOAT32*) (w->wavelet + w->cas); - OPJ_INT32 count = w->sn; - OPJ_INT32 i, k; - - for(k = 0; k < 2; ++k){ - if ( count + 3 * x < size && ((size_t) a & 0x0f) == 0 && ((size_t) bi & 0x0f) == 0 && (x & 0x0f) == 0 ) { - /* Fast code path */ - for(i = 0; i < count; ++i){ - OPJ_INT32 j = i; - bi[i*8 ] = a[j]; - j += x; - bi[i*8 + 1] = a[j]; - j += x; - bi[i*8 + 2] = a[j]; - j += x; - bi[i*8 + 3] = a[j]; - } - } - else { - /* Slow code path */ - for(i = 0; i < count; ++i){ - OPJ_INT32 j = i; - bi[i*8 ] = a[j]; - j += x; - if(j >= size) continue; - bi[i*8 + 1] = a[j]; - j += x; - if(j >= size) continue; - bi[i*8 + 2] = a[j]; - j += x; - if(j >= size) continue; - bi[i*8 + 3] = a[j]; /* This one*/ - } - } - - bi = (OPJ_FLOAT32*) (w->wavelet + 1 - w->cas); - a += w->sn; - size -= w->sn; - count = w->dn; - } -} - -void opj_v4dwt_interleave_v(opj_v4dwt_t* restrict v , OPJ_FLOAT32* restrict a , OPJ_INT32 x, OPJ_INT32 nb_elts_read){ - opj_v4_t* restrict bi = v->wavelet + v->cas; - OPJ_INT32 i; - - for(i = 0; i < v->sn; ++i){ - memcpy(&bi[i*2], &a[i*x], (size_t)nb_elts_read * sizeof(OPJ_FLOAT32)); - } - - a += v->sn * x; - bi = v->wavelet + 1 - v->cas; - - for(i = 0; i < v->dn; ++i){ - memcpy(&bi[i*2], &a[i*x], (size_t)nb_elts_read * sizeof(OPJ_FLOAT32)); - } -} - -#ifdef __SSE__ - -void opj_v4dwt_decode_step1_sse(opj_v4_t* w, OPJ_INT32 count, const __m128 c){ - __m128* restrict vw = (__m128*) w; - OPJ_INT32 i; - /* 4x unrolled loop */ - for(i = 0; i < count >> 2; ++i){ - *vw = _mm_mul_ps(*vw, c); - vw += 2; - *vw = _mm_mul_ps(*vw, c); - vw += 2; - *vw = _mm_mul_ps(*vw, c); - vw += 2; - *vw = _mm_mul_ps(*vw, c); - vw += 2; - } - count &= 3; - for(i = 0; i < count; ++i){ - *vw = _mm_mul_ps(*vw, c); - vw += 2; - } -} - -void opj_v4dwt_decode_step2_sse(opj_v4_t* l, opj_v4_t* w, OPJ_INT32 k, OPJ_INT32 m, __m128 c){ - __m128* restrict vl = (__m128*) l; - __m128* restrict vw = (__m128*) w; - OPJ_INT32 i; - __m128 tmp1, tmp2, tmp3; - tmp1 = vl[0]; - for(i = 0; i < m; ++i){ - tmp2 = vw[-1]; - tmp3 = vw[ 0]; - vw[-1] = _mm_add_ps(tmp2, _mm_mul_ps(_mm_add_ps(tmp1, tmp3), c)); - tmp1 = tmp3; - vw += 2; - } - vl = vw - 2; - if(m >= k){ - return; - } - c = _mm_add_ps(c, c); - c = _mm_mul_ps(c, vl[0]); - for(; m < k; ++m){ - __m128 tmp = vw[-1]; - vw[-1] = _mm_add_ps(tmp, c); - vw += 2; - } -} - -#else - -void opj_v4dwt_decode_step1(opj_v4_t* w, OPJ_INT32 count, const OPJ_FLOAT32 c) -{ - OPJ_FLOAT32* restrict fw = (OPJ_FLOAT32*) w; - OPJ_INT32 i; - for(i = 0; i < count; ++i){ - OPJ_FLOAT32 tmp1 = fw[i*8 ]; - OPJ_FLOAT32 tmp2 = fw[i*8 + 1]; - OPJ_FLOAT32 tmp3 = fw[i*8 + 2]; - OPJ_FLOAT32 tmp4 = fw[i*8 + 3]; - fw[i*8 ] = tmp1 * c; - fw[i*8 + 1] = tmp2 * c; - fw[i*8 + 2] = tmp3 * c; - fw[i*8 + 3] = tmp4 * c; - } -} - -void opj_v4dwt_decode_step2(opj_v4_t* l, opj_v4_t* w, OPJ_INT32 k, OPJ_INT32 m, OPJ_FLOAT32 c) -{ - OPJ_FLOAT32* restrict fl = (OPJ_FLOAT32*) l; - OPJ_FLOAT32* restrict fw = (OPJ_FLOAT32*) w; - OPJ_INT32 i; - for(i = 0; i < m; ++i){ - OPJ_FLOAT32 tmp1_1 = fl[0]; - OPJ_FLOAT32 tmp1_2 = fl[1]; - OPJ_FLOAT32 tmp1_3 = fl[2]; - OPJ_FLOAT32 tmp1_4 = fl[3]; - OPJ_FLOAT32 tmp2_1 = fw[-4]; - OPJ_FLOAT32 tmp2_2 = fw[-3]; - OPJ_FLOAT32 tmp2_3 = fw[-2]; - OPJ_FLOAT32 tmp2_4 = fw[-1]; - OPJ_FLOAT32 tmp3_1 = fw[0]; - OPJ_FLOAT32 tmp3_2 = fw[1]; - OPJ_FLOAT32 tmp3_3 = fw[2]; - OPJ_FLOAT32 tmp3_4 = fw[3]; - fw[-4] = tmp2_1 + ((tmp1_1 + tmp3_1) * c); - fw[-3] = tmp2_2 + ((tmp1_2 + tmp3_2) * c); - fw[-2] = tmp2_3 + ((tmp1_3 + tmp3_3) * c); - fw[-1] = tmp2_4 + ((tmp1_4 + tmp3_4) * c); - fl = fw; - fw += 8; - } - if(m < k){ - OPJ_FLOAT32 c1; - OPJ_FLOAT32 c2; - OPJ_FLOAT32 c3; - OPJ_FLOAT32 c4; - c += c; - c1 = fl[0] * c; - c2 = fl[1] * c; - c3 = fl[2] * c; - c4 = fl[3] * c; - for(; m < k; ++m){ - OPJ_FLOAT32 tmp1 = fw[-4]; - OPJ_FLOAT32 tmp2 = fw[-3]; - OPJ_FLOAT32 tmp3 = fw[-2]; - OPJ_FLOAT32 tmp4 = fw[-1]; - fw[-4] = tmp1 + c1; - fw[-3] = tmp2 + c2; - fw[-2] = tmp3 + c3; - fw[-1] = tmp4 + c4; - fw += 8; - } - } -} - -#endif - -/* */ -/* Inverse 9-7 wavelet transform in 1-D. */ -/* */ -void opj_v4dwt_decode(opj_v4dwt_t* restrict dwt) -{ - OPJ_INT32 a, b; - if(dwt->cas == 0) { - if(!((dwt->dn > 0) || (dwt->sn > 1))){ - return; - } - a = 0; - b = 1; - }else{ - if(!((dwt->sn > 0) || (dwt->dn > 1))) { - return; - } - a = 1; - b = 0; - } -#ifdef __SSE__ - opj_v4dwt_decode_step1_sse(dwt->wavelet+a, dwt->sn, _mm_set1_ps(opj_K)); - opj_v4dwt_decode_step1_sse(dwt->wavelet+b, dwt->dn, _mm_set1_ps(opj_c13318)); - opj_v4dwt_decode_step2_sse(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, opj_int_min(dwt->sn, dwt->dn-a), _mm_set1_ps(opj_dwt_delta)); - opj_v4dwt_decode_step2_sse(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, opj_int_min(dwt->dn, dwt->sn-b), _mm_set1_ps(opj_dwt_gamma)); - opj_v4dwt_decode_step2_sse(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, opj_int_min(dwt->sn, dwt->dn-a), _mm_set1_ps(opj_dwt_beta)); - opj_v4dwt_decode_step2_sse(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, opj_int_min(dwt->dn, dwt->sn-b), _mm_set1_ps(opj_dwt_alpha)); -#else - opj_v4dwt_decode_step1(dwt->wavelet+a, dwt->sn, opj_K); - opj_v4dwt_decode_step1(dwt->wavelet+b, dwt->dn, opj_c13318); - opj_v4dwt_decode_step2(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, opj_int_min(dwt->sn, dwt->dn-a), opj_dwt_delta); - opj_v4dwt_decode_step2(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, opj_int_min(dwt->dn, dwt->sn-b), opj_dwt_gamma); - opj_v4dwt_decode_step2(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, opj_int_min(dwt->sn, dwt->dn-a), opj_dwt_beta); - opj_v4dwt_decode_step2(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, opj_int_min(dwt->dn, dwt->sn-b), opj_dwt_alpha); -#endif -} - - -/* */ -/* Inverse 9-7 wavelet transform in 2-D. */ -/* */ -OPJ_BOOL opj_dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numres) -{ - opj_v4dwt_t h; - opj_v4dwt_t v; - - opj_tcd_resolution_t* res = tilec->resolutions; - - OPJ_UINT32 rw = (OPJ_UINT32)(res->x1 - res->x0); /* width of the resolution level computed */ - OPJ_UINT32 rh = (OPJ_UINT32)(res->y1 - res->y0); /* height of the resolution level computed */ - - OPJ_UINT32 w = (OPJ_UINT32)(tilec->x1 - tilec->x0); - - h.wavelet = (opj_v4_t*) opj_aligned_malloc((opj_dwt_max_resolution(res, numres)+5) * sizeof(opj_v4_t)); - v.wavelet = h.wavelet; - - while( --numres) { - OPJ_FLOAT32 * restrict aj = (OPJ_FLOAT32*) tilec->data; - OPJ_UINT32 bufsize = (OPJ_UINT32)((tilec->x1 - tilec->x0) * (tilec->y1 - tilec->y0)); - OPJ_INT32 j; - - h.sn = (OPJ_INT32)rw; - v.sn = (OPJ_INT32)rh; - - ++res; - - rw = (OPJ_UINT32)(res->x1 - res->x0); /* width of the resolution level computed */ - rh = (OPJ_UINT32)(res->y1 - res->y0); /* height of the resolution level computed */ - - h.dn = (OPJ_INT32)(rw - (OPJ_UINT32)h.sn); - h.cas = res->x0 % 2; - - for(j = (OPJ_INT32)rh; j > 3; j -= 4) { - OPJ_INT32 k; - opj_v4dwt_interleave_h(&h, aj, (OPJ_INT32)w, (OPJ_INT32)bufsize); - opj_v4dwt_decode(&h); - - for(k = (OPJ_INT32)rw; --k >= 0;){ - aj[k ] = h.wavelet[k].f[0]; - aj[k+(OPJ_INT32)w ] = h.wavelet[k].f[1]; - aj[k+(OPJ_INT32)w*2] = h.wavelet[k].f[2]; - aj[k+(OPJ_INT32)w*3] = h.wavelet[k].f[3]; - } - - aj += w*4; - bufsize -= w*4; - } - - if (rh & 0x03) { - OPJ_INT32 k; - j = rh & 0x03; - opj_v4dwt_interleave_h(&h, aj, (OPJ_INT32)w, (OPJ_INT32)bufsize); - opj_v4dwt_decode(&h); - for(k = (OPJ_INT32)rw; --k >= 0;){ - switch(j) { - case 3: aj[k+(OPJ_INT32)w*2] = h.wavelet[k].f[2]; - case 2: aj[k+(OPJ_INT32)w ] = h.wavelet[k].f[1]; - case 1: aj[k ] = h.wavelet[k].f[0]; - } - } - } - - v.dn = (OPJ_INT32)(rh - (OPJ_UINT32)v.sn); - v.cas = res->y0 % 2; - - aj = (OPJ_FLOAT32*) tilec->data; - for(j = (OPJ_INT32)rw; j > 3; j -= 4){ - OPJ_UINT32 k; - - opj_v4dwt_interleave_v(&v, aj, (OPJ_INT32)w, 4); - opj_v4dwt_decode(&v); - - for(k = 0; k < rh; ++k){ - memcpy(&aj[k*w], &v.wavelet[k], 4 * sizeof(OPJ_FLOAT32)); - } - aj += 4; - } - - if (rw & 0x03){ - OPJ_UINT32 k; - - j = rw & 0x03; - - opj_v4dwt_interleave_v(&v, aj, (OPJ_INT32)w, j); - opj_v4dwt_decode(&v); - - for(k = 0; k < rh; ++k){ - memcpy(&aj[k*w], &v.wavelet[k], (size_t)j * sizeof(OPJ_FLOAT32)); - } - } - } - - opj_aligned_free(h.wavelet); - return OPJ_TRUE; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/dwt.h b/Dependencies/FreeImage/Source/LibOpenJPEG/dwt.h deleted file mode 100644 index fae3726..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/dwt.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __DWT_H -#define __DWT_H -/** -@file dwt.h -@brief Implementation of a discrete wavelet transform (DWT) - -The functions in DWT.C have for goal to realize forward and inverse discret wavelet -transform with filter 5-3 (reversible) and filter 9-7 (irreversible). The functions in -DWT.C are used by some function in TCD.C. -*/ - -/** @defgroup DWT DWT - Implementation of a discrete wavelet transform */ -/*@{*/ - - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Forward 5-3 wavelet tranform in 2-D. -Apply a reversible DWT transform to a component of an image. -@param tilec Tile component information (current tile) -*/ -OPJ_BOOL opj_dwt_encode(opj_tcd_tilecomp_t * tilec); - -/** -Inverse 5-3 wavelet tranform in 2-D. -Apply a reversible inverse DWT transform to a component of an image. -@param tilec Tile component information (current tile) -@param numres Number of resolution levels to decode -*/ -OPJ_BOOL opj_dwt_decode(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres); - -/** -Get the gain of a subband for the reversible 5-3 DWT. -@param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH) -@return Returns 0 if orient = 0, returns 1 if orient = 1 or 2, returns 2 otherwise -*/ -OPJ_UINT32 opj_dwt_getgain(OPJ_UINT32 orient) ; -/** -Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT. -@param level Level of the wavelet function -@param orient Band of the wavelet function -@return Returns the norm of the wavelet function -*/ -OPJ_FLOAT64 opj_dwt_getnorm(OPJ_UINT32 level, OPJ_UINT32 orient); -/** -Forward 9-7 wavelet transform in 2-D. -Apply an irreversible DWT transform to a component of an image. -@param tilec Tile component information (current tile) -*/ -OPJ_BOOL opj_dwt_encode_real(opj_tcd_tilecomp_t * tilec); -/** -Inverse 9-7 wavelet transform in 2-D. -Apply an irreversible inverse DWT transform to a component of an image. -@param tilec Tile component information (current tile) -@param numres Number of resolution levels to decode -*/ -OPJ_BOOL opj_dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numres); - -/** -Get the gain of a subband for the irreversible 9-7 DWT. -@param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH) -@return Returns the gain of the 9-7 wavelet transform -*/ -OPJ_UINT32 opj_dwt_getgain_real(OPJ_UINT32 orient); -/** -Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT -@param level Level of the wavelet function -@param orient Band of the wavelet function -@return Returns the norm of the 9-7 wavelet -*/ -OPJ_FLOAT64 opj_dwt_getnorm_real(OPJ_UINT32 level, OPJ_UINT32 orient); -/** -Explicit calculation of the Quantization Stepsizes -@param tccp Tile-component coding parameters -@param prec Precint analyzed -*/ -void opj_dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, OPJ_UINT32 prec); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __DWT_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/event.c b/Dependencies/FreeImage/Source/LibOpenJPEG/event.c deleted file mode 100644 index 6c53515..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/event.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -/* ========================================================== - Utility functions - ==========================================================*/ - -#ifdef OPJ_CODE_NOT_USED -#ifndef _WIN32 -static char* -i2a(unsigned i, char *a, unsigned r) { - if (i/r > 0) a = i2a(i/r,a,r); - *a = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[i%r]; - return a+1; -} - -/** - Transforms integer i into an ascii string and stores the result in a; - string is encoded in the base indicated by r. - @param i Number to be converted - @param a String result - @param r Base of value; must be in the range 2 - 36 - @return Returns a -*/ -static char * -_itoa(int i, char *a, int r) { - r = ((r < 2) || (r > 36)) ? 10 : r; - if(i < 0) { - *a = '-'; - *i2a(-i, a+1, r) = 0; - } - else *i2a(i, a, r) = 0; - return a; -} - -#endif /* !_WIN32 */ -#endif - -/* ----------------------------------------------------------------------- */ -/** - * Default callback function. - * Do nothing. - */ -static void opj_default_callback (const char *msg, void *client_data) -{ - OPJ_ARG_NOT_USED(msg); - OPJ_ARG_NOT_USED(client_data); -} - -/* ----------------------------------------------------------------------- */ - - -/* ----------------------------------------------------------------------- */ -OPJ_BOOL opj_event_msg(opj_event_mgr_t* p_event_mgr, OPJ_INT32 event_type, const char *fmt, ...) { -#define OPJ_MSG_SIZE 512 /* 512 bytes should be more than enough for a short message */ - opj_msg_callback msg_handler = 00; - void * l_data = 00; - - if(p_event_mgr != 00) { - switch(event_type) { - case EVT_ERROR: - msg_handler = p_event_mgr->error_handler; - l_data = p_event_mgr->m_error_data; - break; - case EVT_WARNING: - msg_handler = p_event_mgr->warning_handler; - l_data = p_event_mgr->m_warning_data; - break; - case EVT_INFO: - msg_handler = p_event_mgr->info_handler; - l_data = p_event_mgr->m_info_data; - break; - default: - break; - } - if(msg_handler == 00) { - return OPJ_FALSE; - } - } else { - return OPJ_FALSE; - } - - if ((fmt != 00) && (p_event_mgr != 00)) { - va_list arg; - size_t str_length/*, i, j*/; /* UniPG */ - char message[OPJ_MSG_SIZE]; - memset(message, 0, OPJ_MSG_SIZE); - /* initialize the optional parameter list */ - va_start(arg, fmt); - /* check the length of the format string */ - str_length = (strlen(fmt) > OPJ_MSG_SIZE) ? OPJ_MSG_SIZE : strlen(fmt); - (void)str_length; - /* parse the format string and put the result in 'message' */ - vsprintf(message, fmt, arg); /* UniPG */ - /* deinitialize the optional parameter list */ - va_end(arg); - - /* output the message to the user program */ - msg_handler(message, l_data); - } - - return OPJ_TRUE; -} - -void opj_set_default_event_handler(opj_event_mgr_t * p_manager) -{ - p_manager->m_error_data = 00; - p_manager->m_warning_data = 00; - p_manager->m_info_data = 00; - p_manager->error_handler = opj_default_callback; - p_manager->info_handler = opj_default_callback; - p_manager->warning_handler = opj_default_callback; -} - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/event.h b/Dependencies/FreeImage/Source/LibOpenJPEG/event.h deleted file mode 100644 index 4d89576..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/event.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef __EVENT_H -#define __EVENT_H -/** -@file event.h -@brief Implementation of a event callback system - -The functions in EVENT.C have for goal to send output messages (errors, warnings, debug) to the user. -*/ -/** -Message handler object -used for -
    -
  • Error messages -
  • Warning messages -
  • Debugging messages -
-*/ -typedef struct opj_event_mgr -{ - /** Data to call the event manager upon */ - void * m_error_data; - /** Data to call the event manager upon */ - void * m_warning_data; - /** Data to call the event manager upon */ - void * m_info_data; - /** Error message callback if available, NULL otherwise */ - opj_msg_callback error_handler; - /** Warning message callback if available, NULL otherwise */ - opj_msg_callback warning_handler; - /** Debug message callback if available, NULL otherwise */ - opj_msg_callback info_handler; -} opj_event_mgr_t; - - -#define EVT_ERROR 1 /**< Error event type */ -#define EVT_WARNING 2 /**< Warning event type */ -#define EVT_INFO 4 /**< Debug event type */ - -/** @defgroup EVENT EVENT - Implementation of a event callback system */ -/*@{*/ - -/** @name Exported functions (see also openjpeg.h) */ -/*@{*/ -/* ----------------------------------------------------------------------- */ - - -/* ----------------------------------------------------------------------- */ - -/** - * Write formatted data to a string and send the string to a user callback. - * - * @param event_mgr Event handler - * @param event_type Event type or callback to use to send the message - * @param fmt Format-control string (plus optional arguments) - * - * @return Returns true if successful, returns false otherwise - */ -OPJ_BOOL opj_event_msg(opj_event_mgr_t* event_mgr, OPJ_INT32 event_type, const char *fmt, ...); -/* ----------------------------------------------------------------------- */ - -/** - * Set the event manager with the default callback function for the 3 levels. - */ -void opj_set_default_event_handler(opj_event_mgr_t * p_manager); - -/*@}*/ - -/*@}*/ - -#endif /* __EVENT_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/function_list.c b/Dependencies/FreeImage/Source/LibOpenJPEG/function_list.c deleted file mode 100644 index bf8c0bb..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/function_list.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2008, Jerome Fimes, Communications & Systemes - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -/** - * Default size of the validation list, if not sufficient, data will be reallocated with a double size. - */ -#define OPJ_VALIDATION_SIZE 10 - -opj_procedure_list_t * opj_procedure_list_create() -{ - /* memory allocation */ - opj_procedure_list_t * l_validation = (opj_procedure_list_t *) opj_malloc(sizeof(opj_procedure_list_t)); - if (! l_validation) - { - return 00; - } - /* initialization */ - memset(l_validation,0,sizeof(opj_procedure_list_t)); - l_validation->m_nb_max_procedures = OPJ_VALIDATION_SIZE; - l_validation->m_procedures = (opj_procedure*)opj_malloc( - OPJ_VALIDATION_SIZE * sizeof(opj_procedure)); - if (! l_validation->m_procedures) - { - opj_free(l_validation); - return 00; - } - memset(l_validation->m_procedures,0,OPJ_VALIDATION_SIZE * sizeof(opj_procedure)); - return l_validation; -} - -void opj_procedure_list_destroy(opj_procedure_list_t * p_list) -{ - if (! p_list) - { - return; - } - /* initialization */ - if (p_list->m_procedures) - { - opj_free(p_list->m_procedures); - } - opj_free(p_list); -} - -OPJ_BOOL opj_procedure_list_add_procedure (opj_procedure_list_t * p_validation_list, opj_procedure p_procedure) -{ - if (p_validation_list->m_nb_max_procedures == p_validation_list->m_nb_procedures) - { - opj_procedure * new_procedures; - - p_validation_list->m_nb_max_procedures += OPJ_VALIDATION_SIZE; - new_procedures = (opj_procedure*)opj_realloc( - p_validation_list->m_procedures, - p_validation_list->m_nb_max_procedures * sizeof(opj_procedure)); - if (! new_procedures) - { - opj_free(p_validation_list->m_procedures); - p_validation_list->m_nb_max_procedures = 0; - p_validation_list->m_nb_procedures = 0; - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to add a new validation procedure\n"); */ - fprintf(stderr, "Not enough memory to add a new validation procedure\n"); - - return OPJ_FALSE; - } - else - { - p_validation_list->m_procedures = new_procedures; - } - } - p_validation_list->m_procedures[p_validation_list->m_nb_procedures] = p_procedure; - ++p_validation_list->m_nb_procedures; - - return OPJ_TRUE; -} - -OPJ_UINT32 opj_procedure_list_get_nb_procedures (opj_procedure_list_t * p_validation_list) -{ - return p_validation_list->m_nb_procedures; -} - -opj_procedure* opj_procedure_list_get_first_procedure (opj_procedure_list_t * p_validation_list) -{ - return p_validation_list->m_procedures; -} - -void opj_procedure_list_clear (opj_procedure_list_t * p_validation_list) -{ - p_validation_list->m_nb_procedures = 0; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/function_list.h b/Dependencies/FreeImage/Source/LibOpenJPEG/function_list.h deleted file mode 100644 index ffb75a0..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/function_list.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2008, Jerome Fimes, Communications & Systemes - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __FUNCTION_LIST_H -#define __FUNCTION_LIST_H - -/** - * @file function_list.h - * @brief Implementation of a list of procedures. - - * The functions in validation.c aims to have access to a list of procedures. -*/ - -/** @defgroup VAL VAL - validation procedure*/ -/*@{*/ - -/************************************************************************************************** - ***************************************** FORWARD DECLARATION ************************************ - **************************************************************************************************/ - -/** - * declare a function pointer - */ -typedef void (*opj_procedure)(void); - -/** - * A list of procedures. -*/ -typedef struct opj_procedure_list -{ - /** - * The number of validation procedures. - */ - OPJ_UINT32 m_nb_procedures; - /** - * The number of the array of validation procedures. - */ - OPJ_UINT32 m_nb_max_procedures; - /** - * The array of procedures. - */ - opj_procedure * m_procedures; - -} opj_procedure_list_t; - -/* ----------------------------------------------------------------------- */ - -/** - * Creates a validation list. - * - * @return the newly created validation list. - */ -opj_procedure_list_t * opj_procedure_list_create(void); - -/** - * Destroys a validation list. - * - * @param p_list the list to destroy. - */ -void opj_procedure_list_destroy(opj_procedure_list_t * p_list); - -/** - * Adds a new validation procedure. - * - * @param p_validation_list the list of procedure to modify. - * @param p_procedure the procedure to add. - * - * @return OPJ_TRUE if the procedure could be added. - */ -OPJ_BOOL opj_procedure_list_add_procedure (opj_procedure_list_t * p_validation_list, opj_procedure p_procedure); - -/** - * Gets the number of validation procedures. - * - * @param p_validation_list the list of procedure to modify. - * - * @return the number of validation procedures. - */ -OPJ_UINT32 opj_procedure_list_get_nb_procedures (opj_procedure_list_t * p_validation_list); - -/** - * Gets the pointer on the first validation procedure. This function is similar to the C++ - * iterator class to iterate through all the procedures inside the validation list. - * the caller does not take ownership of the pointer. - * - * @param p_validation_list the list of procedure to get the first procedure from. - * - * @return a pointer to the first procedure. - */ -opj_procedure* opj_procedure_list_get_first_procedure (opj_procedure_list_t * p_validation_list); - - -/** - * Clears the list of validation procedures. - * - * @param p_validation_list the list of procedure to clear. - * - */ -void opj_procedure_list_clear (opj_procedure_list_t * p_validation_list); -/*@}*/ - -#endif /* __FUNCTION_LIST_H */ - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/image.c b/Dependencies/FreeImage/Source/LibOpenJPEG/image.c deleted file mode 100644 index 24f868d..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/image.c +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) 2005, Herve Drolon, FreeImage 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -opj_image_t* opj_image_create0(void) { - opj_image_t *image = (opj_image_t*)opj_calloc(1, sizeof(opj_image_t)); - return image; -} - -opj_image_t* OPJ_CALLCONV opj_image_create(OPJ_UINT32 numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc) { - OPJ_UINT32 compno; - opj_image_t *image = NULL; - - image = (opj_image_t*) opj_calloc(1, sizeof(opj_image_t)); - if(image) { - image->color_space = clrspc; - image->numcomps = numcmpts; - /* allocate memory for the per-component information */ - image->comps = (opj_image_comp_t*)opj_calloc(1,image->numcomps * sizeof(opj_image_comp_t)); - if(!image->comps) { - fprintf(stderr,"Unable to allocate memory for image.\n"); - opj_image_destroy(image); - return NULL; - } - /* create the individual image components */ - for(compno = 0; compno < numcmpts; compno++) { - opj_image_comp_t *comp = &image->comps[compno]; - comp->dx = cmptparms[compno].dx; - comp->dy = cmptparms[compno].dy; - comp->w = cmptparms[compno].w; - comp->h = cmptparms[compno].h; - comp->x0 = cmptparms[compno].x0; - comp->y0 = cmptparms[compno].y0; - comp->prec = cmptparms[compno].prec; - comp->bpp = cmptparms[compno].bpp; - comp->sgnd = cmptparms[compno].sgnd; - comp->data = (OPJ_INT32*) opj_calloc(comp->w * comp->h, sizeof(OPJ_INT32)); - if(!comp->data) { - fprintf(stderr,"Unable to allocate memory for image.\n"); - opj_image_destroy(image); - return NULL; - } - } - } - - return image; -} - -void OPJ_CALLCONV opj_image_destroy(opj_image_t *image) { - if(image) { - if(image->comps) { - OPJ_UINT32 compno; - - /* image components */ - for(compno = 0; compno < image->numcomps; compno++) { - opj_image_comp_t *image_comp = &(image->comps[compno]); - if(image_comp->data) { - opj_free(image_comp->data); - } - } - opj_free(image->comps); - } - - if(image->icc_profile_buf) { - opj_free(image->icc_profile_buf); - } - - opj_free(image); - } -} - -/** - * Updates the components characteristics of the image from the coding parameters. - * - * @param p_image_header the image header to update. - * @param p_cp the coding parameters from which to update the image. - */ -void opj_image_comp_header_update(opj_image_t * p_image_header, const struct opj_cp * p_cp) -{ - OPJ_UINT32 i, l_width, l_height; - OPJ_INT32 l_x0, l_y0, l_x1, l_y1; - OPJ_INT32 l_comp_x0, l_comp_y0, l_comp_x1, l_comp_y1; - opj_image_comp_t* l_img_comp = NULL; - - l_x0 = opj_int_max((OPJ_INT32)p_cp->tx0 , (OPJ_INT32)p_image_header->x0); - l_y0 = opj_int_max((OPJ_INT32)p_cp->ty0 , (OPJ_INT32)p_image_header->y0); - l_x1 = opj_int_min((OPJ_INT32)(p_cp->tx0 + p_cp->tw * p_cp->tdx), (OPJ_INT32)p_image_header->x1); - l_y1 = opj_int_min((OPJ_INT32)(p_cp->ty0 + p_cp->th * p_cp->tdy), (OPJ_INT32)p_image_header->y1); - - l_img_comp = p_image_header->comps; - for (i = 0; i < p_image_header->numcomps; ++i) { - l_comp_x0 = opj_int_ceildiv(l_x0, (OPJ_INT32)l_img_comp->dx); - l_comp_y0 = opj_int_ceildiv(l_y0, (OPJ_INT32)l_img_comp->dy); - l_comp_x1 = opj_int_ceildiv(l_x1, (OPJ_INT32)l_img_comp->dx); - l_comp_y1 = opj_int_ceildiv(l_y1, (OPJ_INT32)l_img_comp->dy); - l_width = (OPJ_UINT32)opj_int_ceildivpow2(l_comp_x1 - l_comp_x0, (OPJ_INT32)l_img_comp->factor); - l_height = (OPJ_UINT32)opj_int_ceildivpow2(l_comp_y1 - l_comp_y0, (OPJ_INT32)l_img_comp->factor); - l_img_comp->w = l_width; - l_img_comp->h = l_height; - l_img_comp->x0 = (OPJ_UINT32)l_comp_x0/*l_x0*/; - l_img_comp->y0 = (OPJ_UINT32)l_comp_y0/*l_y0*/; - ++l_img_comp; - } -} - - -/** - * Copy only header of image and its component header (no data are copied) - * if dest image have data, they will be freed - * - * @param p_image_src the src image - * @param p_image_dest the dest image - * - */ -void opj_copy_image_header(const opj_image_t* p_image_src, opj_image_t* p_image_dest) -{ - OPJ_UINT32 compno; - - /* preconditions */ - assert(p_image_src != 00); - assert(p_image_dest != 00); - - p_image_dest->x0 = p_image_src->x0; - p_image_dest->y0 = p_image_src->y0; - p_image_dest->x1 = p_image_src->x1; - p_image_dest->y1 = p_image_src->y1; - - if (p_image_dest->comps){ - for(compno = 0; compno < p_image_dest->numcomps; compno++) { - opj_image_comp_t *image_comp = &(p_image_dest->comps[compno]); - if(image_comp->data) { - opj_free(image_comp->data); - } - } - opj_free(p_image_dest->comps); - p_image_dest->comps = NULL; - } - - p_image_dest->numcomps = p_image_src->numcomps; - - p_image_dest->comps = (opj_image_comp_t*) opj_malloc(p_image_dest->numcomps * sizeof(opj_image_comp_t)); - if (!p_image_dest->comps){ - p_image_dest->comps = NULL; - p_image_dest->numcomps = 0; - return; - } - - for (compno=0; compno < p_image_dest->numcomps; compno++){ - memcpy( &(p_image_dest->comps[compno]), - &(p_image_src->comps[compno]), - sizeof(opj_image_comp_t)); - p_image_dest->comps[compno].data = NULL; - } - - p_image_dest->color_space = p_image_src->color_space; - p_image_dest->icc_profile_len = p_image_src->icc_profile_len; - - if (p_image_dest->icc_profile_len) { - p_image_dest->icc_profile_buf = (OPJ_BYTE*)opj_malloc(p_image_dest->icc_profile_len); - if (!p_image_dest->icc_profile_buf){ - p_image_dest->icc_profile_buf = NULL; - p_image_dest->icc_profile_len = 0; - return; - } - memcpy( p_image_dest->icc_profile_buf, - p_image_src->icc_profile_buf, - p_image_src->icc_profile_len); - } - else - p_image_dest->icc_profile_buf = NULL; - - return; -} - -opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc) { - OPJ_UINT32 compno; - opj_image_t *image = 00; - - image = (opj_image_t*) opj_malloc(sizeof(opj_image_t)); - if (image) - { - memset(image,0,sizeof(opj_image_t)); - - image->color_space = clrspc; - image->numcomps = numcmpts; - - /* allocate memory for the per-component information */ - image->comps = (opj_image_comp_t*)opj_malloc(image->numcomps * sizeof(opj_image_comp_t)); - if (!image->comps) { - opj_image_destroy(image); - return 00; - } - memset(image->comps,0,image->numcomps * sizeof(opj_image_comp_t)); - - /* create the individual image components */ - for(compno = 0; compno < numcmpts; compno++) { - opj_image_comp_t *comp = &image->comps[compno]; - comp->dx = cmptparms[compno].dx; - comp->dy = cmptparms[compno].dy; - comp->w = cmptparms[compno].w; - comp->h = cmptparms[compno].h; - comp->x0 = cmptparms[compno].x0; - comp->y0 = cmptparms[compno].y0; - comp->prec = cmptparms[compno].prec; - comp->sgnd = cmptparms[compno].sgnd; - comp->data = 0; - } - } - - return image; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/image.h b/Dependencies/FreeImage/Source/LibOpenJPEG/image.h deleted file mode 100644 index 323dc34..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/image.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2005, Herve Drolon, FreeImage 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef __IMAGE_H -#define __IMAGE_H -/** -@file image.h -@brief Implementation of operations on images (IMAGE) - -The functions in IMAGE.C have for goal to realize operations on images. -*/ - -struct opj_image; -struct opj_cp; - -/** @defgroup IMAGE IMAGE - Implementation of operations on images */ -/*@{*/ - -/** - * Create an empty image - * - * @return returns an empty image if successful, returns NULL otherwise - */ -opj_image_t* opj_image_create0(void); - - - -/** - * Updates the components characteristics of the image from the coding parameters. - * - * @param p_image_header the image header to update. - * @param p_cp the coding parameters from which to update the image. - */ -void opj_image_comp_header_update(opj_image_t * p_image, const struct opj_cp* p_cp); - -void opj_copy_image_header(const opj_image_t* p_image_src, opj_image_t* p_image_dest); - -/*@}*/ - -#endif /* __IMAGE_H */ - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/indexbox_manager.h b/Dependencies/FreeImage/Source/LibOpenJPEG/indexbox_manager.h deleted file mode 100644 index d810c27..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/indexbox_manager.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * $Id: indexbox_manager.h,v 1.4 2014/03/16 12:29:52 drolon Exp $ - * - * Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2011, Professor Benoit Macq - * Copyright (c) 2003-2004, Yannick Verschueren - * Copyright (c) 2010-2011, Kaori Hagihara - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/*! \file - * \brief Modification of jpip.c from 2KAN indexer - */ - -#ifndef INDEXBOX_MANAGER_H_ -# define INDEXBOX_MANAGER_H_ - -#include "openjpeg.h" -#include "j2k.h" /* needed to use jp2.h */ -#include "jp2.h" - -#define JPIP_CIDX 0x63696478 /* Codestream index */ -#define JPIP_CPTR 0x63707472 /* Codestream Finder Box */ -#define JPIP_MANF 0x6d616e66 /* Manifest Box */ -#define JPIP_FAIX 0x66616978 /* Fragment array Index box */ -#define JPIP_MHIX 0x6d686978 /* Main Header Index Table */ -#define JPIP_TPIX 0x74706978 /* Tile-part Index Table box */ -#define JPIP_THIX 0x74686978 /* Tile header Index Table box */ -#define JPIP_PPIX 0x70706978 /* Precinct Packet Index Table box */ -#define JPIP_PHIX 0x70686978 /* Packet Header index Table */ -#define JPIP_FIDX 0x66696478 /* File Index */ -#define JPIP_FPTR 0x66707472 /* File Finder */ -#define JPIP_PRXY 0x70727879 /* Proxy boxes */ -#define JPIP_IPTR 0x69707472 /* Index finder box */ -#define JPIP_PHLD 0x70686c64 /* Place holder */ - - -/* - * Write tile-part Index table box (superbox) - * - * @param[in] coff offset of j2k codestream - * @param[in] cstr_info codestream information - * @param[in] j2klen length of j2k codestream - * @param[in] cio file output handle - * @return length of tpix box - */ -int opj_write_tpix( int coff, opj_codestream_info_t cstr_info, int j2klen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - - -/* - * Write tile header index table box (superbox) - * - * @param[in] coff offset of j2k codestream - * @param[in] cstr_info codestream information pointer - * @param[in] cio file output handle - * @return length of thix box - */ -int opj_write_thix( int coff, opj_codestream_info_t cstr_info, opj_stream_private_t *cio, opj_event_mgr_t * p_manager ); - - -/* - * Write precinct packet index table box (superbox) - * - * @param[in] coff offset of j2k codestream - * @param[in] cstr_info codestream information - * @param[in] EPHused true if EPH option used - * @param[in] j2klen length of j2k codestream - * @param[in] cio file output handle - * @return length of ppix box - */ -int opj_write_ppix( int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - - -/* - * Write packet header index table box (superbox) - * - * @param[in] coff offset of j2k codestream - * @param[in] cstr_info codestream information - * @param[in] EPHused true if EPH option used - * @param[in] j2klen length of j2k codestream - * @param[in] cio file output handle - * @return length of ppix box - */ -int opj_write_phix( int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -/* - * Wriet manifest box (box) - * - * @param[in] second number to be visited - * @param[in] v number of boxes - * @param[in] box box to be manifested - * @param[in] cio file output handle - */ - -void opj_write_manf(int second, - int v, - opj_jp2_box_t *box, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -/* - * Write main header index table (box) - * - * @param[in] coff offset of j2k codestream - * @param[in] cstr_info codestream information - * @param[in] cio file output handle - * @return length of mainmhix box - */ -int opj_write_mainmhix( int coff, opj_codestream_info_t cstr_info, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -int opj_write_phixfaix( int coff, int compno, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -int opj_write_ppixfaix( int coff, int compno, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -int opj_write_tilemhix( int coff, opj_codestream_info_t cstr_info, int tileno, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -int opj_write_tpixfaix( int coff, int compno, opj_codestream_info_t cstr_info, int j2klen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -#endif /* !INDEXBOX_MANAGER_H_ */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/invert.c b/Dependencies/FreeImage/Source/LibOpenJPEG/invert.c deleted file mode 100644 index bb6672d..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/invert.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright (c) 2008, Jerome Fimes, Communications & Systemes - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -/** - * LUP decomposition - */ -static OPJ_BOOL opj_lupDecompose(OPJ_FLOAT32 * matrix, - OPJ_UINT32 * permutations, - OPJ_FLOAT32 * p_swap_area, - OPJ_UINT32 nb_compo); -/** - * LUP solving - */ -static void opj_lupSolve(OPJ_FLOAT32 * pResult, - OPJ_FLOAT32* pMatrix, - OPJ_FLOAT32* pVector, - OPJ_UINT32* pPermutations, - OPJ_UINT32 nb_compo, - OPJ_FLOAT32 * p_intermediate_data); - -/** - *LUP inversion (call with the result of lupDecompose) - */ -static void opj_lupInvert ( OPJ_FLOAT32 * pSrcMatrix, - OPJ_FLOAT32 * pDestMatrix, - OPJ_UINT32 nb_compo, - OPJ_UINT32 * pPermutations, - OPJ_FLOAT32 * p_src_temp, - OPJ_FLOAT32 * p_dest_temp, - OPJ_FLOAT32 * p_swap_area); - -/* -========================================================== - Matric inversion interface -========================================================== -*/ -/** - * Matrix inversion. - */ -OPJ_BOOL opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix, - OPJ_FLOAT32 * pDestMatrix, - OPJ_UINT32 nb_compo) -{ - OPJ_BYTE * l_data = 00; - OPJ_UINT32 l_permutation_size = nb_compo * (OPJ_UINT32)sizeof(OPJ_UINT32); - OPJ_UINT32 l_swap_size = nb_compo * (OPJ_UINT32)sizeof(OPJ_FLOAT32); - OPJ_UINT32 l_total_size = l_permutation_size + 3 * l_swap_size; - OPJ_UINT32 * lPermutations = 00; - OPJ_FLOAT32 * l_double_data = 00; - - l_data = (OPJ_BYTE *) opj_malloc(l_total_size); - if (l_data == 0) { - return OPJ_FALSE; - } - lPermutations = (OPJ_UINT32 *) l_data; - l_double_data = (OPJ_FLOAT32 *) (l_data + l_permutation_size); - memset(lPermutations,0,l_permutation_size); - - if(! opj_lupDecompose(pSrcMatrix,lPermutations,l_double_data,nb_compo)) { - opj_free(l_data); - return OPJ_FALSE; - } - - opj_lupInvert(pSrcMatrix,pDestMatrix,nb_compo,lPermutations,l_double_data,l_double_data + nb_compo,l_double_data + 2*nb_compo); - opj_free(l_data); - - return OPJ_TRUE; -} - - -/* -========================================================== - Local functions -========================================================== -*/ -OPJ_BOOL opj_lupDecompose(OPJ_FLOAT32 * matrix,OPJ_UINT32 * permutations, - OPJ_FLOAT32 * p_swap_area, - OPJ_UINT32 nb_compo) -{ - OPJ_UINT32 * tmpPermutations = permutations; - OPJ_UINT32 * dstPermutations; - OPJ_UINT32 k2=0,t; - OPJ_FLOAT32 temp; - OPJ_UINT32 i,j,k; - OPJ_FLOAT32 p; - OPJ_UINT32 lLastColum = nb_compo - 1; - OPJ_UINT32 lSwapSize = nb_compo * (OPJ_UINT32)sizeof(OPJ_FLOAT32); - OPJ_FLOAT32 * lTmpMatrix = matrix; - OPJ_FLOAT32 * lColumnMatrix,* lDestMatrix; - OPJ_UINT32 offset = 1; - OPJ_UINT32 lStride = nb_compo-1; - - /*initialize permutations */ - for (i = 0; i < nb_compo; ++i) - { - *tmpPermutations++ = i; - } - /* now make a pivot with colum switch */ - tmpPermutations = permutations; - for (k = 0; k < lLastColum; ++k) { - p = 0.0; - - /* take the middle element */ - lColumnMatrix = lTmpMatrix + k; - - /* make permutation with the biggest value in the column */ - for (i = k; i < nb_compo; ++i) { - temp = ((*lColumnMatrix > 0) ? *lColumnMatrix : -(*lColumnMatrix)); - if (temp > p) { - p = temp; - k2 = i; - } - /* next line */ - lColumnMatrix += nb_compo; - } - - /* a whole rest of 0 -> non singular */ - if (p == 0.0) { - return OPJ_FALSE; - } - - /* should we permute ? */ - if (k2 != k) { - /*exchange of line */ - /* k2 > k */ - dstPermutations = tmpPermutations + k2 - k; - /* swap indices */ - t = *tmpPermutations; - *tmpPermutations = *dstPermutations; - *dstPermutations = t; - - /* and swap entire line. */ - lColumnMatrix = lTmpMatrix + (k2 - k) * nb_compo; - memcpy(p_swap_area,lColumnMatrix,lSwapSize); - memcpy(lColumnMatrix,lTmpMatrix,lSwapSize); - memcpy(lTmpMatrix,p_swap_area,lSwapSize); - } - - /* now update data in the rest of the line and line after */ - lDestMatrix = lTmpMatrix + k; - lColumnMatrix = lDestMatrix + nb_compo; - /* take the middle element */ - temp = *(lDestMatrix++); - - /* now compute up data (i.e. coeff up of the diagonal). */ - for (i = offset; i < nb_compo; ++i) { - /*lColumnMatrix; */ - /* divide the lower column elements by the diagonal value */ - - /* matrix[i][k] /= matrix[k][k]; */ - /* p = matrix[i][k] */ - p = *lColumnMatrix / temp; - *(lColumnMatrix++) = p; - - for (j = /* k + 1 */ offset; j < nb_compo; ++j) { - /* matrix[i][j] -= matrix[i][k] * matrix[k][j]; */ - *(lColumnMatrix++) -= p * (*(lDestMatrix++)); - } - /* come back to the k+1th element */ - lDestMatrix -= lStride; - /* go to kth element of the next line */ - lColumnMatrix += k; - } - - /* offset is now k+2 */ - ++offset; - /* 1 element less for stride */ - --lStride; - /* next line */ - lTmpMatrix+=nb_compo; - /* next permutation element */ - ++tmpPermutations; - } - return OPJ_TRUE; -} - -void opj_lupSolve (OPJ_FLOAT32 * pResult, - OPJ_FLOAT32 * pMatrix, - OPJ_FLOAT32 * pVector, - OPJ_UINT32* pPermutations, - OPJ_UINT32 nb_compo,OPJ_FLOAT32 * p_intermediate_data) -{ - OPJ_INT32 k; - OPJ_UINT32 i,j; - OPJ_FLOAT32 sum; - OPJ_FLOAT32 u; - OPJ_UINT32 lStride = nb_compo+1; - OPJ_FLOAT32 * lCurrentPtr; - OPJ_FLOAT32 * lIntermediatePtr; - OPJ_FLOAT32 * lDestPtr; - OPJ_FLOAT32 * lTmpMatrix; - OPJ_FLOAT32 * lLineMatrix = pMatrix; - OPJ_FLOAT32 * lBeginPtr = pResult + nb_compo - 1; - OPJ_FLOAT32 * lGeneratedData; - OPJ_UINT32 * lCurrentPermutationPtr = pPermutations; - - - lIntermediatePtr = p_intermediate_data; - lGeneratedData = p_intermediate_data + nb_compo - 1; - - for (i = 0; i < nb_compo; ++i) { - sum = 0.0; - lCurrentPtr = p_intermediate_data; - lTmpMatrix = lLineMatrix; - for (j = 1; j <= i; ++j) - { - /* sum += matrix[i][j-1] * y[j-1]; */ - sum += (*(lTmpMatrix++)) * (*(lCurrentPtr++)); - } - /*y[i] = pVector[pPermutations[i]] - sum; */ - *(lIntermediatePtr++) = pVector[*(lCurrentPermutationPtr++)] - sum; - lLineMatrix += nb_compo; - } - - /* we take the last point of the matrix */ - lLineMatrix = pMatrix + nb_compo*nb_compo - 1; - - /* and we take after the last point of the destination vector */ - lDestPtr = pResult + nb_compo; - - - assert(nb_compo != 0); - for (k = (OPJ_INT32)nb_compo - 1; k != -1 ; --k) { - sum = 0.0; - lTmpMatrix = lLineMatrix; - u = *(lTmpMatrix++); - lCurrentPtr = lDestPtr--; - for (j = (OPJ_UINT32)(k + 1); j < nb_compo; ++j) { - /* sum += matrix[k][j] * x[j] */ - sum += (*(lTmpMatrix++)) * (*(lCurrentPtr++)); - } - /*x[k] = (y[k] - sum) / u; */ - *(lBeginPtr--) = (*(lGeneratedData--) - sum) / u; - lLineMatrix -= lStride; - } -} - - -void opj_lupInvert (OPJ_FLOAT32 * pSrcMatrix, - OPJ_FLOAT32 * pDestMatrix, - OPJ_UINT32 nb_compo, - OPJ_UINT32 * pPermutations, - OPJ_FLOAT32 * p_src_temp, - OPJ_FLOAT32 * p_dest_temp, - OPJ_FLOAT32 * p_swap_area ) -{ - OPJ_UINT32 j,i; - OPJ_FLOAT32 * lCurrentPtr; - OPJ_FLOAT32 * lLineMatrix = pDestMatrix; - OPJ_UINT32 lSwapSize = nb_compo * (OPJ_UINT32)sizeof(OPJ_FLOAT32); - - for (j = 0; j < nb_compo; ++j) { - lCurrentPtr = lLineMatrix++; - memset(p_src_temp,0,lSwapSize); - p_src_temp[j] = 1.0; - opj_lupSolve(p_dest_temp,pSrcMatrix,p_src_temp, pPermutations, nb_compo , p_swap_area); - - for (i = 0; i < nb_compo; ++i) { - *(lCurrentPtr) = p_dest_temp[i]; - lCurrentPtr+=nb_compo; - } - } -} - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/invert.h b/Dependencies/FreeImage/Source/LibOpenJPEG/invert.h deleted file mode 100644 index 2193fc1..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/invert.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2008, Jerome Fimes, Communications & Systemes - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __INVERT_H -#define __INVERT_H -/** -@file invert.h -@brief Implementation of the matrix inversion - -The function in INVERT.H compute a matrix inversion with a LUP method -*/ - -/** @defgroup INVERT INVERT - Implementation of a matrix inversion */ -/*@{*/ -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ - -/** - * Calculates a n x n double matrix inversion with a LUP method. Data is aligned, rows after rows (or columns after columns). - * The function does not take ownership of any memory block, data must be fred by the user. - * - * @param pSrcMatrix the matrix to invert. - * @param pDestMatrix data to store the inverted matrix. - * @param n size of the matrix - * @return OPJ_TRUE if the inversion is successful, OPJ_FALSE if the matrix is singular. - */ -OPJ_BOOL opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix, - OPJ_FLOAT32 * pDestMatrix, - OPJ_UINT32 nb_compo); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __INVERT_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/j2k.c b/Dependencies/FreeImage/Source/LibOpenJPEG/j2k.c deleted file mode 100644 index 4434bf1..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/j2k.c +++ /dev/null @@ -1,10238 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008, Jerome Fimes, Communications & Systemes - * Copyright (c) 2006-2007, Parvatha Elangovan - * Copyright (c) 2010-2011, Kaori Hagihara - * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -#define CINEMA_24_CS 1302083 /*Codestream length for 24fps*/ -#define CINEMA_48_CS 651041 /*Codestream length for 48fps*/ -#define COMP_24_CS 1041666 /*Maximum size per color component for 2K & 4K @ 24fps*/ -#define COMP_48_CS 520833 /*Maximum size per color component for 2K @ 48fps*/ - -/** @defgroup J2K J2K - JPEG-2000 codestream reader/writer */ -/*@{*/ - -/** @name Local static functions */ -/*@{*/ - -/** - * Sets up the procedures to do on reading header. Developpers wanting to extend the library can add their own reading procedures. - */ -static void opj_j2k_setup_header_reading (opj_j2k_t *p_j2k); - -/** - * The read header procedure. - */ -static OPJ_BOOL opj_j2k_read_header_procedure( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager); - -/** - * The default encoding validation procedure without any extension. - * - * @param p_j2k the jpeg2000 codec to validate. - * @param p_stream the input stream to validate. - * @param p_manager the user event manager. - * - * @return true if the parameters are correct. - */ -static OPJ_BOOL opj_j2k_encoding_validation ( opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * The default decoding validation procedure without any extension. - * - * @param p_j2k the jpeg2000 codec to validate. - * @param p_stream the input stream to validate. - * @param p_manager the user event manager. - * - * @return true if the parameters are correct. - */ -static OPJ_BOOL opj_j2k_decoding_validation ( opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters - * are valid. Developpers wanting to extend the library can add their own validation procedures. - */ -static void opj_j2k_setup_encoding_validation (opj_j2k_t *p_j2k); - -/** - * Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters - * are valid. Developpers wanting to extend the library can add their own validation procedures. - */ -static void opj_j2k_setup_decoding_validation (opj_j2k_t *p_j2k); - -/** - * Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters - * are valid. Developpers wanting to extend the library can add their own validation procedures. - */ -static void opj_j2k_setup_end_compress (opj_j2k_t *p_j2k); - -/** - * The mct encoding validation procedure. - * - * @param p_j2k the jpeg2000 codec to validate. - * @param p_stream the input stream to validate. - * @param p_manager the user event manager. - * - * @return true if the parameters are correct. - */ -static OPJ_BOOL opj_j2k_mct_validation (opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Builds the tcd decoder to use to decode tile. - */ -static OPJ_BOOL opj_j2k_build_decoder ( opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); -/** - * Builds the tcd encoder to use to encode tile. - */ -static OPJ_BOOL opj_j2k_build_encoder ( opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Creates a tile-coder decoder. - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_create_tcd( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Excutes the given procedures on the given codec. - * - * @param p_procedure_list the list of procedures to execute - * @param p_j2k the jpeg2000 codec to execute the procedures on. - * @param p_stream the stream to execute the procedures on. - * @param p_manager the user manager. - * - * @return true if all the procedures were successfully executed. - */ -static OPJ_BOOL opj_j2k_exec ( opj_j2k_t * p_j2k, - opj_procedure_list_t * p_procedure_list, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager); - -/** - * Updates the rates of the tcp. - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_update_rates( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Copies the decoding tile parameters onto all the tile parameters. - * Creates also the tile decoder. - */ -static OPJ_BOOL opj_j2k_copy_default_tcp_and_create_tcd ( opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Destroys the memory associated with the decoding of headers. - */ -static OPJ_BOOL opj_j2k_destroy_header_memory ( opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads the lookup table containing all the marker, status and action, and returns the handler associated - * with the marker value. - * @param p_id Marker value to look up - * - * @return the handler associated with the id. -*/ -static const struct opj_dec_memory_marker_handler * opj_j2k_get_marker_handler (OPJ_UINT32 p_id); - -/** - * Destroys a tile coding parameter structure. - * - * @param p_tcp the tile coding parameter to destroy. - */ -static void opj_j2k_tcp_destroy (opj_tcp_t *p_tcp); - -/** - * Destroys the data inside a tile coding parameter structure. - * - * @param p_tcp the tile coding parameter which contain data to destroy. - */ -static void opj_j2k_tcp_data_destroy (opj_tcp_t *p_tcp); - -/** - * Destroys a coding parameter structure. - * - * @param p_cp the coding parameter to destroy. - */ -static void opj_j2k_cp_destroy (opj_cp_t *p_cp); - -/** - * Writes a SPCod or SPCoc element, i.e. the coding style of a given component of a tile. - * - * @param p_j2k J2K codec. - * @param p_tile_no FIXME DOC - * @param p_comp_no the component number to output. - * @param p_data FIXME DOC - * @param p_header_size FIXME DOC - * @param p_manager the user event manager. - * - * @return FIXME DOC -*/ -static OPJ_BOOL opj_j2k_write_SPCod_SPCoc( opj_j2k_t *p_j2k, - OPJ_UINT32 p_tile_no, - OPJ_UINT32 p_comp_no, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Gets the size taken by writing a SPCod or SPCoc for the given tile and component. - * - * @param p_j2k the J2K codec. - * @param p_tile_no the tile index. - * @param p_comp_no the component being outputted. - * - * @return the number of bytes taken by the SPCod element. - */ -static OPJ_UINT32 opj_j2k_get_SPCod_SPCoc_size (opj_j2k_t *p_j2k, - OPJ_UINT32 p_tile_no, - OPJ_UINT32 p_comp_no ); - -/** - * Reads a SPCod or SPCoc element, i.e. the coding style of a given component of a tile. - * @param p_j2k the jpeg2000 codec. - * @param compno FIXME DOC - * @param p_header_data the data contained in the COM box. - * @param p_header_size the size of the data contained in the COM marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_SPCod_SPCoc( opj_j2k_t *p_j2k, - OPJ_UINT32 compno, - OPJ_BYTE * p_header_data, - OPJ_UINT32 * p_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Gets the size taken by writing SQcd or SQcc element, i.e. the quantization values of a band in the QCD or QCC. - * - * @param p_tile_no the tile index. - * @param p_comp_no the component being outputted. - * @param p_j2k the J2K codec. - * - * @return the number of bytes taken by the SPCod element. - */ -static OPJ_UINT32 opj_j2k_get_SQcd_SQcc_size ( opj_j2k_t *p_j2k, - OPJ_UINT32 p_tile_no, - OPJ_UINT32 p_comp_no ); - -/** - * Writes a SQcd or SQcc element, i.e. the quantization values of a band in the QCD or QCC. - * - * @param p_tile_no the tile to output. - * @param p_comp_no the component number to output. - * @param p_data the data buffer. - * @param p_header_size pointer to the size of the data buffer, it is changed by the function. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. - * -*/ -static OPJ_BOOL opj_j2k_write_SQcd_SQcc(opj_j2k_t *p_j2k, - OPJ_UINT32 p_tile_no, - OPJ_UINT32 p_comp_no, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_header_size, - opj_event_mgr_t * p_manager); - -/** - * Updates the Tile Length Marker. - */ -static void opj_j2k_update_tlm ( opj_j2k_t * p_j2k, OPJ_UINT32 p_tile_part_size); - -/** - * Reads a SQcd or SQcc element, i.e. the quantization values of a band in the QCD or QCC. - * - * @param p_j2k J2K codec. - * @param compno the component number to output. - * @param p_header_data the data buffer. - * @param p_header_size pointer to the size of the data buffer, it is changed by the function. - * @param p_manager the user event manager. - * -*/ -static OPJ_BOOL opj_j2k_read_SQcd_SQcc( opj_j2k_t *p_j2k, - OPJ_UINT32 compno, - OPJ_BYTE * p_header_data, - OPJ_UINT32 * p_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Copies the tile component parameters of all the component from the first tile component. - * - * @param p_j2k the J2k codec. - */ -static void opj_j2k_copy_tile_component_parameters( opj_j2k_t *p_j2k ); - -/** - * Copies the tile quantization parameters of all the component from the first tile component. - * - * @param p_j2k the J2k codec. - */ -static void opj_j2k_copy_tile_quantization_parameters( opj_j2k_t *p_j2k ); - -/** - * Reads the tiles. - */ -static OPJ_BOOL opj_j2k_decode_tiles ( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager); - -static OPJ_BOOL opj_j2k_pre_write_tile ( opj_j2k_t * p_j2k, - OPJ_UINT32 p_tile_index, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -static OPJ_BOOL opj_j2k_update_image_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data, opj_image_t* p_output_image); - -static void opj_j2k_get_tile_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data); - -static OPJ_BOOL opj_j2k_post_write_tile (opj_j2k_t * p_j2k, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Sets up the procedures to do on writing header. - * Developers wanting to extend the library can add their own writing procedures. - */ -static void opj_j2k_setup_header_writing (opj_j2k_t *p_j2k); - -static OPJ_BOOL opj_j2k_write_first_tile_part( opj_j2k_t *p_j2k, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 p_total_data_size, - opj_stream_private_t *p_stream, - struct opj_event_mgr * p_manager ); - -static OPJ_BOOL opj_j2k_write_all_tile_parts( opj_j2k_t *p_j2k, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 p_total_data_size, - opj_stream_private_t *p_stream, - struct opj_event_mgr * p_manager ); - -/** - * Gets the offset of the header. - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_get_end_header( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -static OPJ_BOOL opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k); - -/* - * ----------------------------------------------------------------------- - * ----------------------------------------------------------------------- - * ----------------------------------------------------------------------- - */ - -/** - * Writes the SOC marker (Start Of Codestream) - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_soc( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a SOC marker (Start of Codestream) - * @param p_j2k the jpeg2000 file codec. - * @param p_stream XXX needs data - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_soc( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Writes the SIZ marker (image and tile size) - * - * @param p_j2k J2K codec. - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_siz( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a SIZ marker (image and tile size) - * @param p_j2k the jpeg2000 file codec. - * @param p_header_data the data contained in the SIZ box. - * @param p_header_size the size of the data contained in the SIZ marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_siz(opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager); - -/** - * Writes the COM marker (comment) - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_com( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a COM marker (comments) - * @param p_j2k the jpeg2000 file codec. - * @param p_header_data the data contained in the COM box. - * @param p_header_size the size of the data contained in the COM marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_com ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); -/** - * Writes the COD marker (Coding style default) - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_cod( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a COD marker (Coding Styke defaults) - * @param p_header_data the data contained in the COD box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the COD marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_cod ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager); - -#if 0 -/** - * Writes the COC marker (Coding style component) - * - * @param p_j2k J2K codec. - * @param p_comp_no the index of the component to output. - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_coc( opj_j2k_t *p_j2k, - OPJ_UINT32 p_comp_no, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); -#endif - -#if 0 -/** - * Writes the COC marker (Coding style component) - * - * @param p_j2k J2K codec. - * @param p_comp_no the index of the component to output. - * @param p_data FIXME DOC - * @param p_data_written FIXME DOC - * @param p_manager the user event manager. -*/ -static void opj_j2k_write_coc_in_memory(opj_j2k_t *p_j2k, - OPJ_UINT32 p_comp_no, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - opj_event_mgr_t * p_manager ); -#endif - -/** - * Gets the maximum size taken by a coc. - * - * @param p_j2k the jpeg2000 codec to use. - */ -static OPJ_UINT32 opj_j2k_get_max_coc_size(opj_j2k_t *p_j2k); - -/** - * Reads a COC marker (Coding Style Component) - * @param p_header_data the data contained in the COC box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the COC marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_coc ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Writes the QCD marker (quantization default) - * - * @param p_j2k J2K codec. - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_qcd( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a QCD marker (Quantization defaults) - * @param p_header_data the data contained in the QCD box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the QCD marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_qcd ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); -#if 0 -/** - * Writes the QCC marker (quantization component) - * - * @param p_comp_no the index of the component to output. - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_qcc( opj_j2k_t *p_j2k, - OPJ_UINT32 p_comp_no, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); -#endif - -#if 0 -/** - * Writes the QCC marker (quantization component) - * - * @param p_j2k J2K codec. - * @param p_comp_no the index of the component to output. - * @param p_data FIXME DOC - * @param p_data_written the stream to write data to. - * @param p_manager the user event manager. -*/ -static void opj_j2k_write_qcc_in_memory(opj_j2k_t *p_j2k, - OPJ_UINT32 p_comp_no, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - opj_event_mgr_t * p_manager ); -#endif - -/** - * Gets the maximum size taken by a qcc. - */ -static OPJ_UINT32 opj_j2k_get_max_qcc_size (opj_j2k_t *p_j2k); - -/** - * Reads a QCC marker (Quantization component) - * @param p_header_data the data contained in the QCC box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the QCC marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_qcc( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager); -/** - * Writes the POC marker (Progression Order Change) - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_poc( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); -/** - * Writes the POC marker (Progression Order Change) - * - * @param p_j2k J2K codec. - * @param p_data FIXME DOC - * @param p_data_written the stream to write data to. - * @param p_manager the user event manager. - */ -static void opj_j2k_write_poc_in_memory(opj_j2k_t *p_j2k, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - opj_event_mgr_t * p_manager ); -/** - * Gets the maximum size taken by the writing of a POC. - */ -static OPJ_UINT32 opj_j2k_get_max_poc_size(opj_j2k_t *p_j2k); - -/** - * Reads a POC marker (Progression Order Change) - * - * @param p_header_data the data contained in the POC box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the POC marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_poc ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Gets the maximum size taken by the toc headers of all the tile parts of any given tile. - */ -static OPJ_UINT32 opj_j2k_get_max_toc_size (opj_j2k_t *p_j2k); - -/** - * Gets the maximum size taken by the headers of the SOT. - * - * @param p_j2k the jpeg2000 codec to use. - */ -static OPJ_UINT32 opj_j2k_get_specific_header_sizes(opj_j2k_t *p_j2k); - -/** - * Reads a CRG marker (Component registration) - * - * @param p_header_data the data contained in the TLM box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the TLM marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_crg ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); -/** - * Reads a TLM marker (Tile Length Marker) - * - * @param p_header_data the data contained in the TLM box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the TLM marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_tlm ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager); - -/** - * Writes the updated tlm. - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_updated_tlm( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a PLM marker (Packet length, main header marker) - * - * @param p_header_data the data contained in the TLM box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the TLM marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_plm ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager); -/** - * Reads a PLT marker (Packet length, tile-part header) - * - * @param p_header_data the data contained in the PLT box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the PLT marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_plt ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); - -#if 0 -/** - * Reads a PPM marker (Packed packet headers, main header) - * - * @param p_header_data the data contained in the POC box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the POC marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL j2k_read_ppm_v2 ( - opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - struct opj_event_mgr * p_manager - ); -#endif - -static OPJ_BOOL j2k_read_ppm_v3 ( - opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Reads a PPT marker (Packed packet headers, tile-part header) - * - * @param p_header_data the data contained in the PPT box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the PPT marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_ppt ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); -/** - * Writes the TLM marker (Tile Length Marker) - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_tlm( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Writes the SOT marker (Start of tile-part) - * - * @param p_j2k J2K codec. - * @param p_data FIXME DOC - * @param p_data_written FIXME DOC - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_sot( opj_j2k_t *p_j2k, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - const opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a PPT marker (Packed packet headers, tile-part header) - * - * @param p_header_data the data contained in the PPT box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the PPT marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_sot ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); -/** - * Writes the SOD marker (Start of data) - * - * @param p_j2k J2K codec. - * @param p_tile_coder FIXME DOC - * @param p_data FIXME DOC - * @param p_data_written FIXME DOC - * @param p_total_data_size FIXME DOC - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_sod( opj_j2k_t *p_j2k, - opj_tcd_t * p_tile_coder, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 p_total_data_size, - const opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a SOD marker (Start Of Data) - * - * @param p_j2k the jpeg2000 codec. - * @param p_stream FIXME DOC - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_sod( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -void opj_j2k_update_tlm (opj_j2k_t * p_j2k, OPJ_UINT32 p_tile_part_size ) -{ - opj_write_bytes(p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_current,p_j2k->m_current_tile_number,1); /* PSOT */ - ++p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_current; - - opj_write_bytes(p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_current,p_tile_part_size,4); /* PSOT */ - p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_current += 4; -} - -/** - * Writes the RGN marker (Region Of Interest) - * - * @param p_tile_no the tile to output - * @param p_comp_no the component to output - * @param nb_comps the number of components - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_rgn( opj_j2k_t *p_j2k, - OPJ_UINT32 p_tile_no, - OPJ_UINT32 p_comp_no, - OPJ_UINT32 nb_comps, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a RGN marker (Region Of Interest) - * - * @param p_header_data the data contained in the POC box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the POC marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_rgn (opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Writes the EOC marker (End of Codestream) - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_eoc( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -#if 0 -/** - * Reads a EOC marker (End Of Codestream) - * - * @param p_j2k the jpeg2000 codec. - * @param p_stream FIXME DOC - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_eoc ( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); -#endif - -/** - * Writes the CBD-MCT-MCC-MCO markers (Multi components transform) - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_mct_data_group( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Inits the Info - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_init_info( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** -Add main header marker information -@param cstr_index Codestream information structure -@param type marker type -@param pos byte offset of marker segment -@param len length of marker segment - */ -static OPJ_BOOL opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len) ; -/** -Add tile header marker information -@param tileno tile index number -@param cstr_index Codestream information structure -@param type marker type -@param pos byte offset of marker segment -@param len length of marker segment - */ -static OPJ_BOOL opj_j2k_add_tlmarker(OPJ_UINT32 tileno, opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len); - -/** - * Reads an unknown marker - * - * @param p_j2k the jpeg2000 codec. - * @param p_stream the stream object to read from. - * @param output_marker FIXME DOC - * @param p_manager the user event manager. - * - * @return true if the marker could be deduced. -*/ -static OPJ_BOOL opj_j2k_read_unk( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - OPJ_UINT32 *output_marker, - opj_event_mgr_t * p_manager ); - -/** - * Writes the MCT marker (Multiple Component Transform) - * - * @param p_j2k J2K codec. - * @param p_mct_record FIXME DOC - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_mct_record( opj_j2k_t *p_j2k, - opj_mct_data_t * p_mct_record, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a MCT marker (Multiple Component Transform) - * - * @param p_header_data the data contained in the MCT box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the MCT marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_mct ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Writes the MCC marker (Multiple Component Collection) - * - * @param p_j2k J2K codec. - * @param p_mcc_record FIXME DOC - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_mcc_record( opj_j2k_t *p_j2k, - opj_simple_mcc_decorrelation_data_t * p_mcc_record, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a MCC marker (Multiple Component Collection) - * - * @param p_header_data the data contained in the MCC box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the MCC marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_mcc ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Writes the MCO marker (Multiple component transformation ordering) - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_mco( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a MCO marker (Multiple Component Transform Ordering) - * - * @param p_header_data the data contained in the MCO box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the MCO marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_mco ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); - -static OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index); - -static void opj_j2k_read_int16_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); -static void opj_j2k_read_int32_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); -static void opj_j2k_read_float32_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); -static void opj_j2k_read_float64_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); - -static void opj_j2k_read_int16_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); -static void opj_j2k_read_int32_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); -static void opj_j2k_read_float32_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); -static void opj_j2k_read_float64_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); - -static void opj_j2k_write_float_to_int16 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); -static void opj_j2k_write_float_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); -static void opj_j2k_write_float_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); -static void opj_j2k_write_float_to_float64 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); - -/** - * Ends the encoding, i.e. frees memory. - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_end_encoding( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Writes the CBD marker (Component bit depth definition) - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_cbd( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a CBD marker (Component bit depth definition) - * @param p_header_data the data contained in the CBD box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the CBD marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_cbd ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager); - -#if 0 -/** - * Writes COC marker for each component. - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_all_coc( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); -#endif - -#if 0 -/** - * Writes QCC marker for each component. - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_all_qcc( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); -#endif - -/** - * Writes regions of interests. - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_regions( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Writes EPC ???? - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_write_epc( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Checks the progression order changes values. Tells of the poc given as input are valid. - * A nice message is outputted at errors. - * - * @param p_pocs the progression order changes. - * @param p_nb_pocs the number of progression order changes. - * @param p_nb_resolutions the number of resolutions. - * @param numcomps the number of components - * @param numlayers the number of layers. - * @param p_manager the user event manager. - * - * @return true if the pocs are valid. - */ -static OPJ_BOOL opj_j2k_check_poc_val( const opj_poc_t *p_pocs, - OPJ_UINT32 p_nb_pocs, - OPJ_UINT32 p_nb_resolutions, - OPJ_UINT32 numcomps, - OPJ_UINT32 numlayers, - opj_event_mgr_t * p_manager); - -/** - * Gets the number of tile parts used for the given change of progression (if any) and the given tile. - * - * @param cp the coding parameters. - * @param pino the offset of the given poc (i.e. its position in the coding parameter). - * @param tileno the given tile. - * - * @return the number of tile parts. - */ -static OPJ_UINT32 opj_j2k_get_num_tp( opj_cp_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno); - -/** - * Calculates the total number of tile parts needed by the encoder to - * encode such an image. If not enough memory is available, then the function return false. - * - * @param p_nb_tiles pointer that will hold the number of tile parts. - * @param cp the coding parameters for the image. - * @param image the image to encode. - * @param p_j2k the p_j2k encoder. - * @param p_manager the user event manager. - * - * @return true if the function was successful, false else. - */ -static OPJ_BOOL opj_j2k_calculate_tp( opj_j2k_t *p_j2k, - opj_cp_t *cp, - OPJ_UINT32 * p_nb_tiles, - opj_image_t *image, - opj_event_mgr_t * p_manager); - -static void opj_j2k_dump_MH_info(opj_j2k_t* p_j2k, FILE* out_stream); - -static void opj_j2k_dump_MH_index(opj_j2k_t* p_j2k, FILE* out_stream); - -static opj_codestream_index_t* opj_j2k_create_cstr_index(void); - -static OPJ_FLOAT32 opj_j2k_get_tp_stride (opj_tcp_t * p_tcp); - -static OPJ_FLOAT32 opj_j2k_get_default_stride (opj_tcp_t * p_tcp); - -static int opj_j2k_initialise_4K_poc(opj_poc_t *POC, int numres); - -static void opj_j2k_set_cinema_parameters(opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager); - -static OPJ_BOOL opj_j2k_is_cinema_compliant(opj_image_t *image, OPJ_CINEMA_MODE cinema_mode, opj_event_mgr_t *p_manager); - -/*@}*/ - -/*@}*/ - -/* ----------------------------------------------------------------------- */ -typedef struct j2k_prog_order{ - OPJ_PROG_ORDER enum_prog; - char str_prog[5]; -}j2k_prog_order_t; - -j2k_prog_order_t j2k_prog_order_list[] = { - {OPJ_CPRL, "CPRL"}, - {OPJ_LRCP, "LRCP"}, - {OPJ_PCRL, "PCRL"}, - {OPJ_RLCP, "RLCP"}, - {OPJ_RPCL, "RPCL"}, - {(OPJ_PROG_ORDER)-1, ""} -}; - -/** - * FIXME DOC - */ -static const OPJ_UINT32 MCT_ELEMENT_SIZE [] = -{ - 2, - 4, - 4, - 8 -}; - -typedef void (* opj_j2k_mct_function) (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem); - -const opj_j2k_mct_function j2k_mct_read_functions_to_float [] = -{ - opj_j2k_read_int16_to_float, - opj_j2k_read_int32_to_float, - opj_j2k_read_float32_to_float, - opj_j2k_read_float64_to_float -}; - -const opj_j2k_mct_function j2k_mct_read_functions_to_int32 [] = -{ - opj_j2k_read_int16_to_int32, - opj_j2k_read_int32_to_int32, - opj_j2k_read_float32_to_int32, - opj_j2k_read_float64_to_int32 -}; - -const opj_j2k_mct_function j2k_mct_write_functions_from_float [] = -{ - opj_j2k_write_float_to_int16, - opj_j2k_write_float_to_int32, - opj_j2k_write_float_to_float, - opj_j2k_write_float_to_float64 -}; - -typedef struct opj_dec_memory_marker_handler -{ - /** marker value */ - OPJ_UINT32 id; - /** value of the state when the marker can appear */ - OPJ_UINT32 states; - /** action linked to the marker */ - OPJ_BOOL (*handler) ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); -} -opj_dec_memory_marker_handler_t; - -const opj_dec_memory_marker_handler_t j2k_memory_marker_handler_tab [] = -{ - {J2K_MS_SOT, J2K_STATE_MH | J2K_STATE_TPHSOT, opj_j2k_read_sot}, - {J2K_MS_COD, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_cod}, - {J2K_MS_COC, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_coc}, - {J2K_MS_RGN, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_rgn}, - {J2K_MS_QCD, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_qcd}, - {J2K_MS_QCC, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_qcc}, - {J2K_MS_POC, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_poc}, - {J2K_MS_SIZ, J2K_STATE_MHSIZ, opj_j2k_read_siz}, - {J2K_MS_TLM, J2K_STATE_MH, opj_j2k_read_tlm}, - {J2K_MS_PLM, J2K_STATE_MH, opj_j2k_read_plm}, - {J2K_MS_PLT, J2K_STATE_TPH, opj_j2k_read_plt}, - {J2K_MS_PPM, J2K_STATE_MH, j2k_read_ppm_v3}, - {J2K_MS_PPT, J2K_STATE_TPH, opj_j2k_read_ppt}, - {J2K_MS_SOP, 0, 0}, - {J2K_MS_CRG, J2K_STATE_MH, opj_j2k_read_crg}, - {J2K_MS_COM, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_com}, - {J2K_MS_MCT, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_mct}, - {J2K_MS_CBD, J2K_STATE_MH , opj_j2k_read_cbd}, - {J2K_MS_MCC, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_mcc}, - {J2K_MS_MCO, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_mco}, -#ifdef USE_JPWL -#ifdef TODO_MS /* remove these functions which are not commpatible with the v2 API */ - {J2K_MS_EPC, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_epc}, - {J2K_MS_EPB, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_epb}, - {J2K_MS_ESD, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_esd}, - {J2K_MS_RED, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_red}, -#endif -#endif /* USE_JPWL */ -#ifdef USE_JPSEC - {J2K_MS_SEC, J2K_DEC_STATE_MH, j2k_read_sec}, - {J2K_MS_INSEC, 0, j2k_read_insec} -#endif /* USE_JPSEC */ - {J2K_MS_UNK, J2K_STATE_MH | J2K_STATE_TPH, 0}/*opj_j2k_read_unk is directly used*/ -}; - -void opj_j2k_read_int16_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem) -{ - OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data; - OPJ_FLOAT32 * l_dest_data = (OPJ_FLOAT32 *) p_dest_data; - OPJ_UINT32 i; - OPJ_UINT32 l_temp; - - for (i=0;ienum_prog != -1; po++ ){ - if(po->enum_prog == prg_order){ - return po->str_prog; - } - } - return po->str_prog; -} - -OPJ_BOOL opj_j2k_check_poc_val( const opj_poc_t *p_pocs, - OPJ_UINT32 p_nb_pocs, - OPJ_UINT32 p_nb_resolutions, - OPJ_UINT32 p_num_comps, - OPJ_UINT32 p_num_layers, - opj_event_mgr_t * p_manager) -{ - OPJ_UINT32* packet_array; - OPJ_UINT32 index , resno, compno, layno; - OPJ_UINT32 i; - OPJ_UINT32 step_c = 1; - OPJ_UINT32 step_r = p_num_comps * step_c; - OPJ_UINT32 step_l = p_nb_resolutions * step_r; - OPJ_BOOL loss = OPJ_FALSE; - OPJ_UINT32 layno0 = 0; - - packet_array = (OPJ_UINT32*) opj_calloc(step_l * p_num_layers, sizeof(OPJ_UINT32)); - if (packet_array == 00) { - opj_event_msg(p_manager , EVT_ERROR, "Not enough memory for checking the poc values.\n"); - return OPJ_FALSE; - } - memset(packet_array,0,step_l * p_num_layers* sizeof(OPJ_UINT32)); - - if (p_nb_pocs == 0) { - opj_free(packet_array); - return OPJ_TRUE; - } - - index = step_r * p_pocs->resno0; - /* take each resolution for each poc */ - for (resno = p_pocs->resno0 ; resno < p_pocs->resno1 ; ++resno) - { - OPJ_UINT32 res_index = index + p_pocs->compno0 * step_c; - - /* take each comp of each resolution for each poc */ - for (compno = p_pocs->compno0 ; compno < p_pocs->compno1 ; ++compno) { - OPJ_UINT32 comp_index = res_index + layno0 * step_l; - - /* and finally take each layer of each res of ... */ - for (layno = layno0; layno < p_pocs->layno1 ; ++layno) { - /*index = step_r * resno + step_c * compno + step_l * layno;*/ - packet_array[comp_index] = 1; - comp_index += step_l; - } - - res_index += step_c; - } - - index += step_r; - } - ++p_pocs; - - /* iterate through all the pocs */ - for (i = 1; i < p_nb_pocs ; ++i) { - OPJ_UINT32 l_last_layno1 = (p_pocs-1)->layno1 ; - - layno0 = (p_pocs->layno1 > l_last_layno1)? l_last_layno1 : 0; - index = step_r * p_pocs->resno0; - - /* take each resolution for each poc */ - for (resno = p_pocs->resno0 ; resno < p_pocs->resno1 ; ++resno) { - OPJ_UINT32 res_index = index + p_pocs->compno0 * step_c; - - /* take each comp of each resolution for each poc */ - for (compno = p_pocs->compno0 ; compno < p_pocs->compno1 ; ++compno) { - OPJ_UINT32 comp_index = res_index + layno0 * step_l; - - /* and finally take each layer of each res of ... */ - for (layno = layno0; layno < p_pocs->layno1 ; ++layno) { - /*index = step_r * resno + step_c * compno + step_l * layno;*/ - packet_array[comp_index] = 1; - comp_index += step_l; - } - - res_index += step_c; - } - - index += step_r; - } - - ++p_pocs; - } - - index = 0; - for (layno = 0; layno < p_num_layers ; ++layno) { - for (resno = 0; resno < p_nb_resolutions; ++resno) { - for (compno = 0; compno < p_num_comps; ++compno) { - loss |= (packet_array[index]!=1); - /*index = step_r * resno + step_c * compno + step_l * layno;*/ - index += step_c; - } - } - } - - if (loss) { - opj_event_msg(p_manager , EVT_ERROR, "Missing packets possible loss of data\n"); - } - - opj_free(packet_array); - - return !loss; -} - -/* ----------------------------------------------------------------------- */ - -OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno) -{ - const OPJ_CHAR *prog = 00; - OPJ_INT32 i; - OPJ_UINT32 tpnum = 1; - opj_tcp_t *tcp = 00; - opj_poc_t * l_current_poc = 00; - - /* preconditions */ - assert(tileno < (cp->tw * cp->th)); - assert(pino < (cp->tcps[tileno].numpocs + 1)); - - /* get the given tile coding parameter */ - tcp = &cp->tcps[tileno]; - assert(tcp != 00); - - l_current_poc = &(tcp->pocs[pino]); - assert(l_current_poc != 0); - - /* get the progression order as a character string */ - prog = opj_j2k_convert_progression_order(tcp->prg); - assert(strlen(prog) > 0); - - if (cp->m_specific_param.m_enc.m_tp_on == 1) { - for (i=0;i<4;++i) { - switch (prog[i]) - { - /* component wise */ - case 'C': - tpnum *= l_current_poc->compE; - break; - /* resolution wise */ - case 'R': - tpnum *= l_current_poc->resE; - break; - /* precinct wise */ - case 'P': - tpnum *= l_current_poc->prcE; - break; - /* layer wise */ - case 'L': - tpnum *= l_current_poc->layE; - break; - } - /* whould we split here ? */ - if ( cp->m_specific_param.m_enc.m_tp_flag == prog[i] ) { - cp->m_specific_param.m_enc.m_tp_pos=i; - break; - } - } - } - else { - tpnum=1; - } - - return tpnum; -} - -OPJ_BOOL opj_j2k_calculate_tp( opj_j2k_t *p_j2k, - opj_cp_t *cp, - OPJ_UINT32 * p_nb_tiles, - opj_image_t *image, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 pino,tileno; - OPJ_UINT32 l_nb_tiles; - opj_tcp_t *tcp; - - /* preconditions */ - assert(p_nb_tiles != 00); - assert(cp != 00); - assert(image != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - l_nb_tiles = cp->tw * cp->th; - * p_nb_tiles = 0; - tcp = cp->tcps; - - /* INDEX >> */ - /* TODO mergeV2: check this part which use cstr_info */ - /*if (p_j2k->cstr_info) { - opj_tile_info_t * l_info_tile_ptr = p_j2k->cstr_info->tile; - - for (tileno = 0; tileno < l_nb_tiles; ++tileno) { - OPJ_UINT32 cur_totnum_tp = 0; - - opj_pi_update_encoding_parameters(image,cp,tileno); - - for (pino = 0; pino <= tcp->numpocs; ++pino) - { - OPJ_UINT32 tp_num = opj_j2k_get_num_tp(cp,pino,tileno); - - *p_nb_tiles = *p_nb_tiles + tp_num; - - cur_totnum_tp += tp_num; - } - - tcp->m_nb_tile_parts = cur_totnum_tp; - - l_info_tile_ptr->tp = (opj_tp_info_t *) opj_malloc(cur_totnum_tp * sizeof(opj_tp_info_t)); - if (l_info_tile_ptr->tp == 00) { - return OPJ_FALSE; - } - - memset(l_info_tile_ptr->tp,0,cur_totnum_tp * sizeof(opj_tp_info_t)); - - l_info_tile_ptr->num_tps = cur_totnum_tp; - - ++l_info_tile_ptr; - ++tcp; - } - } - else */{ - for (tileno = 0; tileno < l_nb_tiles; ++tileno) { - OPJ_UINT32 cur_totnum_tp = 0; - - opj_pi_update_encoding_parameters(image,cp,tileno); - - for (pino = 0; pino <= tcp->numpocs; ++pino) { - OPJ_UINT32 tp_num = opj_j2k_get_num_tp(cp,pino,tileno); - - *p_nb_tiles = *p_nb_tiles + tp_num; - - cur_totnum_tp += tp_num; - } - tcp->m_nb_tile_parts = cur_totnum_tp; - - ++tcp; - } - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_soc( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - /* 2 bytes will be written */ - OPJ_BYTE * l_start_stream = 00; - - /* preconditions */ - assert(p_stream != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - l_start_stream = p_j2k->m_specific_param.m_encoder.m_header_tile_data; - - /* write SOC identifier */ - opj_write_bytes(l_start_stream,J2K_MS_SOC,2); - - if (opj_stream_write_data(p_stream,l_start_stream,2,p_manager) != 2) { - return OPJ_FALSE; - } - -/* UniPG>> */ -#ifdef USE_JPWL - /* update markers struct */ -/* - OPJ_BOOL res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_SOC, p_stream_tell(p_stream) - 2, 2); -*/ - assert( 0 && "TODO" ); -#endif /* USE_JPWL */ -/* <m_specific_param.m_decoder.m_state = J2K_STATE_MHSIZ; - - /* FIXME move it in a index structure included in p_j2k*/ - p_j2k->cstr_index->main_head_start = opj_stream_tell(p_stream) - 2; - - opj_event_msg(p_manager, EVT_INFO, "Start to read j2k main header (%d).\n", p_j2k->cstr_index->main_head_start); - - /* Add the marker to the codestream index*/ - if (OPJ_FALSE == opj_j2k_add_mhmarker(p_j2k->cstr_index, J2K_MS_SOC, p_j2k->cstr_index->main_head_start, 2)) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to add mh marker\n"); - return OPJ_FALSE; - } - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_siz( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - OPJ_UINT32 i; - OPJ_UINT32 l_size_len; - OPJ_BYTE * l_current_ptr; - opj_image_t * l_image = 00; - opj_cp_t *cp = 00; - opj_image_comp_t * l_img_comp = 00; - - /* preconditions */ - assert(p_stream != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - l_image = p_j2k->m_private_image; - cp = &(p_j2k->m_cp); - l_size_len = 40 + 3 * l_image->numcomps; - l_img_comp = l_image->comps; - - if (l_size_len > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) { - - OPJ_BYTE *new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_size_len); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory for the SIZ marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_size_len; - } - - l_current_ptr = p_j2k->m_specific_param.m_encoder.m_header_tile_data; - - /* write SOC identifier */ - opj_write_bytes(l_current_ptr,J2K_MS_SIZ,2); /* SIZ */ - l_current_ptr+=2; - - opj_write_bytes(l_current_ptr,l_size_len-2,2); /* L_SIZ */ - l_current_ptr+=2; - - opj_write_bytes(l_current_ptr, cp->rsiz, 2); /* Rsiz (capabilities) */ - l_current_ptr+=2; - - opj_write_bytes(l_current_ptr, l_image->x1, 4); /* Xsiz */ - l_current_ptr+=4; - - opj_write_bytes(l_current_ptr, l_image->y1, 4); /* Ysiz */ - l_current_ptr+=4; - - opj_write_bytes(l_current_ptr, l_image->x0, 4); /* X0siz */ - l_current_ptr+=4; - - opj_write_bytes(l_current_ptr, l_image->y0, 4); /* Y0siz */ - l_current_ptr+=4; - - opj_write_bytes(l_current_ptr, cp->tdx, 4); /* XTsiz */ - l_current_ptr+=4; - - opj_write_bytes(l_current_ptr, cp->tdy, 4); /* YTsiz */ - l_current_ptr+=4; - - opj_write_bytes(l_current_ptr, cp->tx0, 4); /* XT0siz */ - l_current_ptr+=4; - - opj_write_bytes(l_current_ptr, cp->ty0, 4); /* YT0siz */ - l_current_ptr+=4; - - opj_write_bytes(l_current_ptr, l_image->numcomps, 2); /* Csiz */ - l_current_ptr+=2; - - for (i = 0; i < l_image->numcomps; ++i) { - /* TODO here with MCT ? */ - opj_write_bytes(l_current_ptr, l_img_comp->prec - 1 + (l_img_comp->sgnd << 7), 1); /* Ssiz_i */ - ++l_current_ptr; - - opj_write_bytes(l_current_ptr, l_img_comp->dx, 1); /* XRsiz_i */ - ++l_current_ptr; - - opj_write_bytes(l_current_ptr, l_img_comp->dy, 1); /* YRsiz_i */ - ++l_current_ptr; - - ++l_img_comp; - } - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_size_len,p_manager) != l_size_len) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -/** - * Reads a SIZ marker (image and tile size) - * @param p_j2k the jpeg2000 file codec. - * @param p_header_data the data contained in the SIZ box. - * @param p_header_size the size of the data contained in the SIZ marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_siz(opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 i; - OPJ_UINT32 l_nb_comp; - OPJ_UINT32 l_nb_comp_remain; - OPJ_UINT32 l_remaining_size; - OPJ_UINT32 l_nb_tiles; - OPJ_UINT32 l_tmp; - opj_image_t *l_image = 00; - opj_cp_t *l_cp = 00; - opj_image_comp_t * l_img_comp = 00; - opj_tcp_t * l_current_tile_param = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_header_data != 00); - - l_image = p_j2k->m_private_image; - l_cp = &(p_j2k->m_cp); - - /* minimum size == 39 - 3 (= minimum component parameter) */ - if (p_header_size < 36) { - opj_event_msg(p_manager, EVT_ERROR, "Error with SIZ marker size\n"); - return OPJ_FALSE; - } - - l_remaining_size = p_header_size - 36; - l_nb_comp = l_remaining_size / 3; - l_nb_comp_remain = l_remaining_size % 3; - if (l_nb_comp_remain != 0){ - opj_event_msg(p_manager, EVT_ERROR, "Error with SIZ marker size\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_header_data,&l_tmp ,2); /* Rsiz (capabilities) */ - p_header_data+=2; - l_cp->rsiz = (OPJ_RSIZ_CAPABILITIES) l_tmp; - opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_image->x1, 4); /* Xsiz */ - p_header_data+=4; - opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_image->y1, 4); /* Ysiz */ - p_header_data+=4; - opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_image->x0, 4); /* X0siz */ - p_header_data+=4; - opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_image->y0, 4); /* Y0siz */ - p_header_data+=4; - opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->tdx, 4); /* XTsiz */ - p_header_data+=4; - opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->tdy, 4); /* YTsiz */ - p_header_data+=4; - opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->tx0, 4); /* XT0siz */ - p_header_data+=4; - opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->ty0, 4); /* YT0siz */ - p_header_data+=4; - opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_tmp, 2); /* Csiz */ - p_header_data+=2; - if (l_tmp < 16385) - l_image->numcomps = (OPJ_UINT16) l_tmp; - else { - opj_event_msg(p_manager, EVT_ERROR, "Error with SIZ marker: number of component is illegal -> %d\n", l_tmp); - return OPJ_FALSE; - } - - if (l_image->numcomps != l_nb_comp) { - opj_event_msg(p_manager, EVT_ERROR, "Error with SIZ marker: number of component is not compatible with the remaining number of parameters ( %d vs %d)\n", l_image->numcomps, l_nb_comp); - return OPJ_FALSE; - } - - /* testcase 4035.pdf.SIGSEGV.d8b.3375 */ - if (l_image->x0 > l_image->x1 || l_image->y0 > l_image->y1) { - opj_event_msg(p_manager, EVT_ERROR, "Error with SIZ marker: negative image size (%d x %d)\n", l_image->x1 - l_image->x0, l_image->y1 - l_image->y0); - return OPJ_FALSE; - } - /* testcase 2539.pdf.SIGFPE.706.1712 (also 3622.pdf.SIGFPE.706.2916 and 4008.pdf.SIGFPE.706.3345 and maybe more) */ - if (!(l_cp->tdx * l_cp->tdy)) { - opj_event_msg(p_manager, EVT_ERROR, "Error with SIZ marker: invalid tile size (tdx: %d, tdy: %d)\n", l_cp->tdx, l_cp->tdy); - return OPJ_FALSE; - } - - /* testcase 1610.pdf.SIGSEGV.59c.681 */ - if (((OPJ_UINT64)l_image->x1) * ((OPJ_UINT64)l_image->y1) != (l_image->x1 * l_image->y1)) { - opj_event_msg(p_manager, EVT_ERROR, "Prevent buffer overflow (x1: %d, y1: %d)", l_image->x1, l_image->y1); - return OPJ_FALSE; - } - -#ifdef USE_JPWL - if (l_cp->correct) { - /* if JPWL is on, we check whether TX errors have damaged - too much the SIZ parameters */ - if (!(l_image->x1 * l_image->y1)) { - opj_event_msg(p_manager, EVT_ERROR, - "JPWL: bad image size (%d x %d)\n", - l_image->x1, l_image->y1); - if (!JPWL_ASSUME || JPWL_ASSUME) { - opj_event_msg(p_manager, EVT_ERROR, "JPWL: giving up\n"); - return OPJ_FALSE; - } - } - - /* FIXME check previously in the function so why keep this piece of code ? Need by the norm ? - if (l_image->numcomps != ((len - 38) / 3)) { - opj_event_msg(p_manager, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, - "JPWL: Csiz is %d => space in SIZ only for %d comps.!!!\n", - l_image->numcomps, ((len - 38) / 3)); - if (!JPWL_ASSUME) { - opj_event_msg(p_manager, EVT_ERROR, "JPWL: giving up\n"); - return OPJ_FALSE; - } - */ /* we try to correct */ - /* opj_event_msg(p_manager, EVT_WARNING, "- trying to adjust this\n"); - if (l_image->numcomps < ((len - 38) / 3)) { - len = 38 + 3 * l_image->numcomps; - opj_event_msg(p_manager, EVT_WARNING, "- setting Lsiz to %d => HYPOTHESIS!!!\n", - len); - } else { - l_image->numcomps = ((len - 38) / 3); - opj_event_msg(p_manager, EVT_WARNING, "- setting Csiz to %d => HYPOTHESIS!!!\n", - l_image->numcomps); - } - } - */ - - /* update components number in the jpwl_exp_comps filed */ - l_cp->exp_comps = l_image->numcomps; - } -#endif /* USE_JPWL */ - - /* Allocate the resulting image components */ - l_image->comps = (opj_image_comp_t*) opj_calloc(l_image->numcomps, sizeof(opj_image_comp_t)); - if (l_image->comps == 00){ - l_image->numcomps = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to take in charge SIZ marker\n"); - return OPJ_FALSE; - } - - memset(l_image->comps,0,l_image->numcomps * sizeof(opj_image_comp_t)); - l_img_comp = l_image->comps; - - /* Read the component information */ - for (i = 0; i < l_image->numcomps; ++i){ - OPJ_UINT32 tmp; - opj_read_bytes(p_header_data,&tmp,1); /* Ssiz_i */ - ++p_header_data; - l_img_comp->prec = (tmp & 0x7f) + 1; - l_img_comp->sgnd = tmp >> 7; - opj_read_bytes(p_header_data,&tmp,1); /* XRsiz_i */ - ++p_header_data; - l_img_comp->dx = (OPJ_UINT32)tmp; /* should be between 1 and 255 */ - opj_read_bytes(p_header_data,&tmp,1); /* YRsiz_i */ - ++p_header_data; - l_img_comp->dy = (OPJ_UINT32)tmp; /* should be between 1 and 255 */ - if( l_img_comp->dx < 1 || l_img_comp->dx > 255 || - l_img_comp->dy < 1 || l_img_comp->dy > 255 ) { - opj_event_msg(p_manager, EVT_ERROR, - "Invalid values for comp = %d : dx=%u dy=%u\n (should be between 1 and 255 according the JPEG2000 norm)", - i, l_img_comp->dx, l_img_comp->dy); - return OPJ_FALSE; - } - -#ifdef USE_JPWL - if (l_cp->correct) { - /* if JPWL is on, we check whether TX errors have damaged - too much the SIZ parameters, again */ - if (!(l_image->comps[i].dx * l_image->comps[i].dy)) { - opj_event_msg(p_manager, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, - "JPWL: bad XRsiz_%d/YRsiz_%d (%d x %d)\n", - i, i, l_image->comps[i].dx, l_image->comps[i].dy); - if (!JPWL_ASSUME) { - opj_event_msg(p_manager, EVT_ERROR, "JPWL: giving up\n"); - return OPJ_FALSE; - } - /* we try to correct */ - opj_event_msg(p_manager, EVT_WARNING, "- trying to adjust them\n"); - if (!l_image->comps[i].dx) { - l_image->comps[i].dx = 1; - opj_event_msg(p_manager, EVT_WARNING, "- setting XRsiz_%d to %d => HYPOTHESIS!!!\n", - i, l_image->comps[i].dx); - } - if (!l_image->comps[i].dy) { - l_image->comps[i].dy = 1; - opj_event_msg(p_manager, EVT_WARNING, "- setting YRsiz_%d to %d => HYPOTHESIS!!!\n", - i, l_image->comps[i].dy); - } - } - } -#endif /* USE_JPWL */ - l_img_comp->resno_decoded = 0; /* number of resolution decoded */ - l_img_comp->factor = l_cp->m_specific_param.m_dec.m_reduce; /* reducing factor per component */ - ++l_img_comp; - } - - /* Compute the number of tiles */ - l_cp->tw = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)(l_image->x1 - l_cp->tx0), (OPJ_INT32)l_cp->tdx); - l_cp->th = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)(l_image->y1 - l_cp->ty0), (OPJ_INT32)l_cp->tdy); - - /* Check that the number of tiles is valid */ - if (l_cp->tw == 0 || l_cp->th == 0 || l_cp->tw > 65535 / l_cp->th) { - opj_event_msg( p_manager, EVT_ERROR, - "Invalid number of tiles : %u x %u (maximum fixed by jpeg2000 norm is 65535 tiles)\n", - l_cp->tw, l_cp->th); - return OPJ_FALSE; - } - l_nb_tiles = l_cp->tw * l_cp->th; - - /* Define the tiles which will be decoded */ - if (p_j2k->m_specific_param.m_decoder.m_discard_tiles) { - p_j2k->m_specific_param.m_decoder.m_start_tile_x = (p_j2k->m_specific_param.m_decoder.m_start_tile_x - l_cp->tx0) / l_cp->tdx; - p_j2k->m_specific_param.m_decoder.m_start_tile_y = (p_j2k->m_specific_param.m_decoder.m_start_tile_y - l_cp->ty0) / l_cp->tdy; - p_j2k->m_specific_param.m_decoder.m_end_tile_x = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)(p_j2k->m_specific_param.m_decoder.m_end_tile_x - l_cp->tx0), (OPJ_INT32)l_cp->tdx); - p_j2k->m_specific_param.m_decoder.m_end_tile_y = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)(p_j2k->m_specific_param.m_decoder.m_end_tile_y - l_cp->ty0), (OPJ_INT32)l_cp->tdy); - } - else { - p_j2k->m_specific_param.m_decoder.m_start_tile_x = 0; - p_j2k->m_specific_param.m_decoder.m_start_tile_y = 0; - p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw; - p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th; - } - -#ifdef USE_JPWL - if (l_cp->correct) { - /* if JPWL is on, we check whether TX errors have damaged - too much the SIZ parameters */ - if ((l_cp->tw < 1) || (l_cp->th < 1) || (l_cp->tw > l_cp->max_tiles) || (l_cp->th > l_cp->max_tiles)) { - opj_event_msg(p_manager, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, - "JPWL: bad number of tiles (%d x %d)\n", - l_cp->tw, l_cp->th); - if (!JPWL_ASSUME) { - opj_event_msg(p_manager, EVT_ERROR, "JPWL: giving up\n"); - return OPJ_FALSE; - } - /* we try to correct */ - opj_event_msg(p_manager, EVT_WARNING, "- trying to adjust them\n"); - if (l_cp->tw < 1) { - l_cp->tw= 1; - opj_event_msg(p_manager, EVT_WARNING, "- setting %d tiles in x => HYPOTHESIS!!!\n", - l_cp->tw); - } - if (l_cp->tw > l_cp->max_tiles) { - l_cp->tw= 1; - opj_event_msg(p_manager, EVT_WARNING, "- too large x, increase expectance of %d\n" - "- setting %d tiles in x => HYPOTHESIS!!!\n", - l_cp->max_tiles, l_cp->tw); - } - if (l_cp->th < 1) { - l_cp->th= 1; - opj_event_msg(p_manager, EVT_WARNING, "- setting %d tiles in y => HYPOTHESIS!!!\n", - l_cp->th); - } - if (l_cp->th > l_cp->max_tiles) { - l_cp->th= 1; - opj_event_msg(p_manager, EVT_WARNING, "- too large y, increase expectance of %d to continue\n", - "- setting %d tiles in y => HYPOTHESIS!!!\n", - l_cp->max_tiles, l_cp->th); - } - } - } -#endif /* USE_JPWL */ - - /* memory allocations */ - l_cp->tcps = (opj_tcp_t*) opj_calloc(l_nb_tiles, sizeof(opj_tcp_t)); - if (l_cp->tcps == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to take in charge SIZ marker\n"); - return OPJ_FALSE; - } - memset(l_cp->tcps,0,l_nb_tiles*sizeof(opj_tcp_t)); - -#ifdef USE_JPWL - if (l_cp->correct) { - if (!l_cp->tcps) { - opj_event_msg(p_manager, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, - "JPWL: could not alloc tcps field of cp\n"); - if (!JPWL_ASSUME || JPWL_ASSUME) { - opj_event_msg(p_manager, EVT_ERROR, "JPWL: giving up\n"); - return OPJ_FALSE; - } - } - } -#endif /* USE_JPWL */ - - p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps = - (opj_tccp_t*) opj_calloc(l_image->numcomps, sizeof(opj_tccp_t)); - if(p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to take in charge SIZ marker\n"); - return OPJ_FALSE; - } - memset(p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps ,0,l_image->numcomps*sizeof(opj_tccp_t)); - - p_j2k->m_specific_param.m_decoder.m_default_tcp->m_mct_records = - (opj_mct_data_t*)opj_malloc(OPJ_J2K_MCT_DEFAULT_NB_RECORDS * sizeof(opj_mct_data_t)); - - if (! p_j2k->m_specific_param.m_decoder.m_default_tcp->m_mct_records) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to take in charge SIZ marker\n"); - return OPJ_FALSE; - } - memset(p_j2k->m_specific_param.m_decoder.m_default_tcp->m_mct_records,0,OPJ_J2K_MCT_DEFAULT_NB_RECORDS * sizeof(opj_mct_data_t)); - p_j2k->m_specific_param.m_decoder.m_default_tcp->m_nb_max_mct_records = OPJ_J2K_MCT_DEFAULT_NB_RECORDS; - - p_j2k->m_specific_param.m_decoder.m_default_tcp->m_mcc_records = - (opj_simple_mcc_decorrelation_data_t*) - opj_malloc(OPJ_J2K_MCC_DEFAULT_NB_RECORDS * sizeof(opj_simple_mcc_decorrelation_data_t)); - - if (! p_j2k->m_specific_param.m_decoder.m_default_tcp->m_mcc_records) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to take in charge SIZ marker\n"); - return OPJ_FALSE; - } - memset(p_j2k->m_specific_param.m_decoder.m_default_tcp->m_mcc_records,0,OPJ_J2K_MCC_DEFAULT_NB_RECORDS * sizeof(opj_simple_mcc_decorrelation_data_t)); - p_j2k->m_specific_param.m_decoder.m_default_tcp->m_nb_max_mcc_records = OPJ_J2K_MCC_DEFAULT_NB_RECORDS; - - /* set up default dc level shift */ - for (i=0;inumcomps;++i) { - if (! l_image->comps[i].sgnd) { - p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps[i].m_dc_level_shift = 1 << (l_image->comps[i].prec - 1); - } - } - - l_current_tile_param = l_cp->tcps; - for (i = 0; i < l_nb_tiles; ++i) { - l_current_tile_param->tccps = (opj_tccp_t*) opj_malloc(l_image->numcomps * sizeof(opj_tccp_t)); - if (l_current_tile_param->tccps == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to take in charge SIZ marker\n"); - return OPJ_FALSE; - } - memset(l_current_tile_param->tccps,0,l_image->numcomps * sizeof(opj_tccp_t)); - - ++l_current_tile_param; - } - - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_MH; /* FIXME J2K_DEC_STATE_MH; */ - opj_image_comp_header_update(l_image,l_cp); - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_com( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_comment_size; - OPJ_UINT32 l_total_com_size; - const OPJ_CHAR *l_comment; - OPJ_BYTE * l_current_ptr = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_stream != 00); - assert(p_manager != 00); - - l_comment = p_j2k->m_cp.comment; - l_comment_size = (OPJ_UINT32)strlen(l_comment); - l_total_com_size = l_comment_size + 6; - - if (l_total_com_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) { - OPJ_BYTE *new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_total_com_size); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to write the COM marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_total_com_size; - } - - l_current_ptr = p_j2k->m_specific_param.m_encoder.m_header_tile_data; - - opj_write_bytes(l_current_ptr,J2K_MS_COM , 2); /* COM */ - l_current_ptr+=2; - - opj_write_bytes(l_current_ptr,l_total_com_size - 2 , 2); /* L_COM */ - l_current_ptr+=2; - - opj_write_bytes(l_current_ptr,1 , 2); /* General use (IS 8859-15:1999 (Latin) values) */ - l_current_ptr+=2; - - memcpy( l_current_ptr,l_comment,l_comment_size); - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_total_com_size,p_manager) != l_total_com_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -/** - * Reads a COM marker (comments) - * @param p_j2k the jpeg2000 file codec. - * @param p_header_data the data contained in the COM box. - * @param p_header_size the size of the data contained in the COM marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_com ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_header_data != 00); - (void)p_header_size; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_cod( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - OPJ_UINT32 l_code_size,l_remaining_size; - OPJ_BYTE * l_current_data = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_cp = &(p_j2k->m_cp); - l_tcp = &l_cp->tcps[p_j2k->m_current_tile_number]; - l_code_size = 9 + opj_j2k_get_SPCod_SPCoc_size(p_j2k,p_j2k->m_current_tile_number,0); - l_remaining_size = l_code_size; - - if (l_code_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) { - OPJ_BYTE *new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_code_size); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to write COD marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_code_size; - } - - l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data; - - opj_write_bytes(l_current_data,J2K_MS_COD,2); /* COD */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_code_size-2,2); /* L_COD */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_tcp->csty,1); /* Scod */ - ++l_current_data; - - opj_write_bytes(l_current_data,l_tcp->prg,1); /* SGcod (A) */ - ++l_current_data; - - opj_write_bytes(l_current_data,l_tcp->numlayers,2); /* SGcod (B) */ - l_current_data+=2; - - opj_write_bytes(l_current_data,l_tcp->mct,1); /* SGcod (C) */ - ++l_current_data; - - l_remaining_size -= 9; - - if (! opj_j2k_write_SPCod_SPCoc(p_j2k,p_j2k->m_current_tile_number,0,l_current_data,&l_remaining_size,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Error writing COD marker\n"); - return OPJ_FALSE; - } - - if (l_remaining_size != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Error writing COD marker\n"); - return OPJ_FALSE; - } - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_code_size,p_manager) != l_code_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -/** - * Reads a COD marker (Coding Styke defaults) - * @param p_header_data the data contained in the COD box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the COD marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_cod ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - /* loop */ - OPJ_UINT32 i; - OPJ_UINT32 l_tmp; - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - opj_image_t *l_image = 00; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - l_image = p_j2k->m_private_image; - l_cp = &(p_j2k->m_cp); - - /* If we are in the first tile-part header of the current tile */ - l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ? - &l_cp->tcps[p_j2k->m_current_tile_number] : - p_j2k->m_specific_param.m_decoder.m_default_tcp; - - /* Make sure room is sufficient */ - if (p_header_size < 5) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading COD marker\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_header_data,&l_tcp->csty,1); /* Scod */ - ++p_header_data; - opj_read_bytes(p_header_data,&l_tmp,1); /* SGcod (A) */ - ++p_header_data; - l_tcp->prg = (OPJ_PROG_ORDER) l_tmp; - opj_read_bytes(p_header_data,&l_tcp->numlayers,2); /* SGcod (B) */ - p_header_data+=2; - - /* If user didn't set a number layer to decode take the max specify in the codestream. */ - if (l_cp->m_specific_param.m_dec.m_layer) { - l_tcp->num_layers_to_decode = l_cp->m_specific_param.m_dec.m_layer; - } - else { - l_tcp->num_layers_to_decode = l_tcp->numlayers; - } - - opj_read_bytes(p_header_data,&l_tcp->mct,1); /* SGcod (C) */ - ++p_header_data; - - p_header_size -= 5; - for (i = 0; i < l_image->numcomps; ++i) { - l_tcp->tccps[i].csty = l_tcp->csty & J2K_CCP_CSTY_PRT; - } - - if (! opj_j2k_read_SPCod_SPCoc(p_j2k,0,p_header_data,&p_header_size,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading COD marker\n"); - return OPJ_FALSE; - } - - if (p_header_size != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading COD marker\n"); - return OPJ_FALSE; - } - - /* Apply the coding style to other components of the current tile or the m_default_tcp*/ - opj_j2k_copy_tile_component_parameters(p_j2k); - - /* Index */ -#ifdef WIP_REMOVE_MSD - if (p_j2k->cstr_info) { - /*opj_codestream_info_t *l_cstr_info = p_j2k->cstr_info;*/ - p_j2k->cstr_info->prog = l_tcp->prg; - p_j2k->cstr_info->numlayers = l_tcp->numlayers; - p_j2k->cstr_info->numdecompos = (OPJ_INT32*) opj_malloc(l_image->numcomps * sizeof(OPJ_UINT32)); - for (i = 0; i < l_image->numcomps; ++i) { - p_j2k->cstr_info->numdecompos[i] = l_tcp->tccps[i].numresolutions - 1; - } - } -#endif - - return OPJ_TRUE; -} - -#if 0 -OPJ_BOOL opj_j2k_write_coc( opj_j2k_t *p_j2k, - OPJ_UINT32 p_comp_no, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - OPJ_UINT32 l_coc_size,l_remaining_size; - OPJ_UINT32 l_comp_room; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_comp_room = (p_j2k->m_private_image->numcomps <= 256) ? 1 : 2; - - l_coc_size = 5 + l_comp_room + opj_j2k_get_SPCod_SPCoc_size(p_j2k,p_j2k->m_current_tile_number,p_comp_no); - - if (l_coc_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) { - OPJ_BYTE *new_header_tile_data; - /*p_j2k->m_specific_param.m_encoder.m_header_tile_data - = (OPJ_BYTE*)opj_realloc( - p_j2k->m_specific_param.m_encoder.m_header_tile_data, - l_coc_size);*/ - - new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_coc_size); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to write COC marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_coc_size; - } - - opj_j2k_write_coc_in_memory(p_j2k,p_comp_no,p_j2k->m_specific_param.m_encoder.m_header_tile_data,&l_remaining_size,p_manager); - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_coc_size,p_manager) != l_coc_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} -#endif - -#if 0 -void opj_j2k_write_coc_in_memory( opj_j2k_t *p_j2k, - OPJ_UINT32 p_comp_no, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - opj_event_mgr_t * p_manager - ) -{ - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - OPJ_UINT32 l_coc_size,l_remaining_size; - OPJ_BYTE * l_current_data = 00; - opj_image_t *l_image = 00; - OPJ_UINT32 l_comp_room; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - - l_cp = &(p_j2k->m_cp); - l_tcp = &l_cp->tcps[p_j2k->m_current_tile_number]; - l_image = p_j2k->m_private_image; - l_comp_room = (l_image->numcomps <= 256) ? 1 : 2; - - l_coc_size = 5 + l_comp_room + opj_j2k_get_SPCod_SPCoc_size(p_j2k,p_j2k->m_current_tile_number,p_comp_no); - l_remaining_size = l_coc_size; - - l_current_data = p_data; - - opj_write_bytes(l_current_data,J2K_MS_COC,2); /* COC */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_coc_size-2,2); /* L_COC */ - l_current_data += 2; - - opj_write_bytes(l_current_data,p_comp_no, l_comp_room); /* Ccoc */ - l_current_data+=l_comp_room; - - opj_write_bytes(l_current_data, l_tcp->tccps[p_comp_no].csty, 1); /* Scoc */ - ++l_current_data; - - l_remaining_size -= (5 + l_comp_room); - opj_j2k_write_SPCod_SPCoc(p_j2k,p_j2k->m_current_tile_number,0,l_current_data,&l_remaining_size,p_manager); - * p_data_written = l_coc_size; -} -#endif - -OPJ_UINT32 opj_j2k_get_max_coc_size(opj_j2k_t *p_j2k) -{ - OPJ_UINT32 i,j; - OPJ_UINT32 l_nb_comp; - OPJ_UINT32 l_nb_tiles; - OPJ_UINT32 l_max = 0; - - /* preconditions */ - - l_nb_tiles = p_j2k->m_cp.tw * p_j2k->m_cp.th ; - l_nb_comp = p_j2k->m_private_image->numcomps; - - for (i=0;im_cp); - l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH ) ? /*FIXME J2K_DEC_STATE_TPH*/ - &l_cp->tcps[p_j2k->m_current_tile_number] : - p_j2k->m_specific_param.m_decoder.m_default_tcp; - l_image = p_j2k->m_private_image; - - l_comp_room = l_image->numcomps <= 256 ? 1 : 2; - - /* make sure room is sufficient*/ - if (p_header_size < l_comp_room + 1) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading COC marker\n"); - return OPJ_FALSE; - } - p_header_size -= l_comp_room + 1; - - opj_read_bytes(p_header_data,&l_comp_no,l_comp_room); /* Ccoc */ - p_header_data += l_comp_room; - if (l_comp_no >= l_image->numcomps) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading COC marker (bad number of components)\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_header_data,&l_tcp->tccps[l_comp_no].csty,1); /* Scoc */ - ++p_header_data ; - - if (! opj_j2k_read_SPCod_SPCoc(p_j2k,l_comp_no,p_header_data,&p_header_size,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading COC marker\n"); - return OPJ_FALSE; - } - - if (p_header_size != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading COC marker\n"); - return OPJ_FALSE; - } - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_qcd( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_qcd_size,l_remaining_size; - OPJ_BYTE * l_current_data = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_qcd_size = 4 + opj_j2k_get_SQcd_SQcc_size(p_j2k,p_j2k->m_current_tile_number,0); - l_remaining_size = l_qcd_size; - - if (l_qcd_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) { - OPJ_BYTE *new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_qcd_size); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to write QCD marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_qcd_size; - } - - l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data; - - opj_write_bytes(l_current_data,J2K_MS_QCD,2); /* QCD */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_qcd_size-2,2); /* L_QCD */ - l_current_data += 2; - - l_remaining_size -= 4; - - if (! opj_j2k_write_SQcd_SQcc(p_j2k,p_j2k->m_current_tile_number,0,l_current_data,&l_remaining_size,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Error writing QCD marker\n"); - return OPJ_FALSE; - } - - if (l_remaining_size != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Error writing QCD marker\n"); - return OPJ_FALSE; - } - - if (opj_stream_write_data(p_stream, p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_qcd_size,p_manager) != l_qcd_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -/** - * Reads a QCD marker (Quantization defaults) - * @param p_header_data the data contained in the QCD box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the QCD marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_qcd ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - if (! opj_j2k_read_SQcd_SQcc(p_j2k,0,p_header_data,&p_header_size,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading QCD marker\n"); - return OPJ_FALSE; - } - - if (p_header_size != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading QCD marker\n"); - return OPJ_FALSE; - } - - /* Apply the quantization parameters to other components of the current tile or the m_default_tcp */ - opj_j2k_copy_tile_quantization_parameters(p_j2k); - - return OPJ_TRUE; -} - -#if 0 -OPJ_BOOL opj_j2k_write_qcc( opj_j2k_t *p_j2k, - OPJ_UINT32 p_comp_no, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_qcc_size,l_remaining_size; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_qcc_size = 5 + opj_j2k_get_SQcd_SQcc_size(p_j2k,p_j2k->m_current_tile_number,p_comp_no); - l_qcc_size += p_j2k->m_private_image->numcomps <= 256 ? 0:1; - l_remaining_size = l_qcc_size; - - if (l_qcc_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) { - OPJ_BYTE *new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_qcc_size); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to write QCC marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_qcc_size; - } - - opj_j2k_write_qcc_in_memory(p_j2k,p_comp_no,p_j2k->m_specific_param.m_encoder.m_header_tile_data,&l_remaining_size,p_manager); - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_qcc_size,p_manager) != l_qcc_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} -#endif - -#if 0 -void opj_j2k_write_qcc_in_memory( opj_j2k_t *p_j2k, - OPJ_UINT32 p_comp_no, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_qcc_size,l_remaining_size; - OPJ_BYTE * l_current_data = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - - l_qcc_size = 6 + opj_j2k_get_SQcd_SQcc_size(p_j2k,p_j2k->m_current_tile_number,p_comp_no); - l_remaining_size = l_qcc_size; - - l_current_data = p_data; - - opj_write_bytes(l_current_data,J2K_MS_QCC,2); /* QCC */ - l_current_data += 2; - - if (p_j2k->m_private_image->numcomps <= 256) { - --l_qcc_size; - - opj_write_bytes(l_current_data,l_qcc_size-2,2); /* L_QCC */ - l_current_data += 2; - - opj_write_bytes(l_current_data, p_comp_no, 1); /* Cqcc */ - ++l_current_data; - - /* in the case only one byte is sufficient the last byte allocated is useless -> still do -6 for available */ - l_remaining_size -= 6; - } - else { - opj_write_bytes(l_current_data,l_qcc_size-2,2); /* L_QCC */ - l_current_data += 2; - - opj_write_bytes(l_current_data, p_comp_no, 2); /* Cqcc */ - l_current_data+=2; - - l_remaining_size -= 6; - } - - opj_j2k_write_SQcd_SQcc(p_j2k,p_j2k->m_current_tile_number,p_comp_no,l_current_data,&l_remaining_size,p_manager); - - *p_data_written = l_qcc_size; -} -#endif - -OPJ_UINT32 opj_j2k_get_max_qcc_size (opj_j2k_t *p_j2k) -{ - return opj_j2k_get_max_coc_size(p_j2k); -} - -/** - * Reads a QCC marker (Quantization component) - * @param p_header_data the data contained in the QCC box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the QCC marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_qcc( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_num_comp,l_comp_no; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - l_num_comp = p_j2k->m_private_image->numcomps; - - if (l_num_comp <= 256) { - if (p_header_size < 1) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading QCC marker\n"); - return OPJ_FALSE; - } - opj_read_bytes(p_header_data,&l_comp_no,1); - ++p_header_data; - --p_header_size; - } - else { - if (p_header_size < 2) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading QCC marker\n"); - return OPJ_FALSE; - } - opj_read_bytes(p_header_data,&l_comp_no,2); - p_header_data+=2; - p_header_size-=2; - } - -#ifdef USE_JPWL - if (p_j2k->m_cp.correct) { - - static OPJ_UINT32 backup_compno = 0; - - /* compno is negative or larger than the number of components!!! */ - if (/*(l_comp_no < 0) ||*/ (l_comp_no >= l_num_comp)) { - opj_event_msg(p_manager, EVT_ERROR, - "JPWL: bad component number in QCC (%d out of a maximum of %d)\n", - l_comp_no, l_num_comp); - if (!JPWL_ASSUME) { - opj_event_msg(p_manager, EVT_ERROR, "JPWL: giving up\n"); - return OPJ_FALSE; - } - /* we try to correct */ - l_comp_no = backup_compno % l_num_comp; - opj_event_msg(p_manager, EVT_WARNING, "- trying to adjust this\n" - "- setting component number to %d\n", - l_comp_no); - } - - /* keep your private count of tiles */ - backup_compno++; - }; -#endif /* USE_JPWL */ - - if (l_comp_no >= p_j2k->m_private_image->numcomps) { - opj_event_msg(p_manager, EVT_ERROR, - "Invalid component number: %d, regarding the number of components %d\n", - l_comp_no, p_j2k->m_private_image->numcomps); - return OPJ_FALSE; - } - - if (! opj_j2k_read_SQcd_SQcc(p_j2k,l_comp_no,p_header_data,&p_header_size,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading QCC marker\n"); - return OPJ_FALSE; - } - - if (p_header_size != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading QCC marker\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_poc( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_nb_comp; - OPJ_UINT32 l_nb_poc; - OPJ_UINT32 l_poc_size; - OPJ_UINT32 l_written_size = 0; - opj_tcp_t *l_tcp = 00; - OPJ_UINT32 l_poc_room; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_tcp = &p_j2k->m_cp.tcps[p_j2k->m_current_tile_number]; - l_nb_comp = p_j2k->m_private_image->numcomps; - l_nb_poc = 1 + l_tcp->numpocs; - - if (l_nb_comp <= 256) { - l_poc_room = 1; - } - else { - l_poc_room = 2; - } - l_poc_size = 4 + (5 + 2 * l_poc_room) * l_nb_poc; - - if (l_poc_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) { - OPJ_BYTE *new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_poc_size); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to write POC marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_poc_size; - } - - opj_j2k_write_poc_in_memory(p_j2k,p_j2k->m_specific_param.m_encoder.m_header_tile_data,&l_written_size,p_manager); - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_poc_size,p_manager) != l_poc_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -void opj_j2k_write_poc_in_memory( opj_j2k_t *p_j2k, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 i; - OPJ_BYTE * l_current_data = 00; - OPJ_UINT32 l_nb_comp; - OPJ_UINT32 l_nb_poc; - OPJ_UINT32 l_poc_size; - opj_image_t *l_image = 00; - opj_tcp_t *l_tcp = 00; - opj_tccp_t *l_tccp = 00; - opj_poc_t *l_current_poc = 00; - OPJ_UINT32 l_poc_room; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - - l_tcp = &p_j2k->m_cp.tcps[p_j2k->m_current_tile_number]; - l_tccp = &l_tcp->tccps[0]; - l_image = p_j2k->m_private_image; - l_nb_comp = l_image->numcomps; - l_nb_poc = 1 + l_tcp->numpocs; - - if (l_nb_comp <= 256) { - l_poc_room = 1; - } - else { - l_poc_room = 2; - } - - l_poc_size = 4 + (5 + 2 * l_poc_room) * l_nb_poc; - - l_current_data = p_data; - - opj_write_bytes(l_current_data,J2K_MS_POC,2); /* POC */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_poc_size-2,2); /* Lpoc */ - l_current_data += 2; - - l_current_poc = l_tcp->pocs; - for (i = 0; i < l_nb_poc; ++i) { - opj_write_bytes(l_current_data,l_current_poc->resno0,1); /* RSpoc_i */ - ++l_current_data; - - opj_write_bytes(l_current_data,l_current_poc->compno0,l_poc_room); /* CSpoc_i */ - l_current_data+=l_poc_room; - - opj_write_bytes(l_current_data,l_current_poc->layno1,2); /* LYEpoc_i */ - l_current_data+=2; - - opj_write_bytes(l_current_data,l_current_poc->resno1,1); /* REpoc_i */ - ++l_current_data; - - opj_write_bytes(l_current_data,l_current_poc->compno1,l_poc_room); /* CEpoc_i */ - l_current_data+=l_poc_room; - - opj_write_bytes(l_current_data,l_current_poc->prg,1); /* Ppoc_i */ - ++l_current_data; - - /* change the value of the max layer according to the actual number of layers in the file, components and resolutions*/ - l_current_poc->layno1 = (OPJ_UINT32)opj_int_min((OPJ_INT32)l_current_poc->layno1, (OPJ_INT32)l_tcp->numlayers); - l_current_poc->resno1 = (OPJ_UINT32)opj_int_min((OPJ_INT32)l_current_poc->resno1, (OPJ_INT32)l_tccp->numresolutions); - l_current_poc->compno1 = (OPJ_UINT32)opj_int_min((OPJ_INT32)l_current_poc->compno1, (OPJ_INT32)l_nb_comp); - - ++l_current_poc; - } - - *p_data_written = l_poc_size; -} - -OPJ_UINT32 opj_j2k_get_max_poc_size(opj_j2k_t *p_j2k) -{ - opj_tcp_t * l_tcp = 00; - OPJ_UINT32 l_nb_tiles = 0; - OPJ_UINT32 l_max_poc = 0; - OPJ_UINT32 i; - - l_tcp = p_j2k->m_cp.tcps; - l_nb_tiles = p_j2k->m_cp.th * p_j2k->m_cp.tw; - - for (i=0;inumpocs); - ++l_tcp; - } - - ++l_max_poc; - - return 4 + 9 * l_max_poc; -} - -OPJ_UINT32 opj_j2k_get_max_toc_size (opj_j2k_t *p_j2k) -{ - OPJ_UINT32 i; - OPJ_UINT32 l_nb_tiles; - OPJ_UINT32 l_max = 0; - opj_tcp_t * l_tcp = 00; - - l_tcp = p_j2k->m_cp.tcps; - l_nb_tiles = p_j2k->m_cp.tw * p_j2k->m_cp.th ; - - for (i=0;im_nb_tile_parts); - - ++l_tcp; - } - - return 12 * l_max; -} - -OPJ_UINT32 opj_j2k_get_specific_header_sizes(opj_j2k_t *p_j2k) -{ - OPJ_UINT32 l_nb_bytes = 0; - OPJ_UINT32 l_nb_comps; - OPJ_UINT32 l_coc_bytes,l_qcc_bytes; - - l_nb_comps = p_j2k->m_private_image->numcomps - 1; - l_nb_bytes += opj_j2k_get_max_toc_size(p_j2k); - - if (p_j2k->m_cp.m_specific_param.m_enc.m_cinema == 0) { - l_coc_bytes = opj_j2k_get_max_coc_size(p_j2k); - l_nb_bytes += l_nb_comps * l_coc_bytes; - - l_qcc_bytes = opj_j2k_get_max_qcc_size(p_j2k); - l_nb_bytes += l_nb_comps * l_qcc_bytes; - } - - l_nb_bytes += opj_j2k_get_max_poc_size(p_j2k); - - /*** DEVELOPER CORNER, Add room for your headers ***/ - - return l_nb_bytes; -} - -/** - * Reads a POC marker (Progression Order Change) - * - * @param p_header_data the data contained in the POC box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the POC marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_poc ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 i, l_nb_comp, l_tmp; - opj_image_t * l_image = 00; - OPJ_UINT32 l_old_poc_nb, l_current_poc_nb, l_current_poc_remaining; - OPJ_UINT32 l_chunk_size, l_comp_room; - - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - opj_poc_t *l_current_poc = 00; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - l_image = p_j2k->m_private_image; - l_nb_comp = l_image->numcomps; - if (l_nb_comp <= 256) { - l_comp_room = 1; - } - else { - l_comp_room = 2; - } - l_chunk_size = 5 + 2 * l_comp_room; - l_current_poc_nb = p_header_size / l_chunk_size; - l_current_poc_remaining = p_header_size % l_chunk_size; - - if ((l_current_poc_nb <= 0) || (l_current_poc_remaining != 0)) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading POC marker\n"); - return OPJ_FALSE; - } - - l_cp = &(p_j2k->m_cp); - l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ? - &l_cp->tcps[p_j2k->m_current_tile_number] : - p_j2k->m_specific_param.m_decoder.m_default_tcp; - l_old_poc_nb = l_tcp->POC ? l_tcp->numpocs + 1 : 0; - l_current_poc_nb += l_old_poc_nb; - - if(l_current_poc_nb >= 32) - { - opj_event_msg(p_manager, EVT_ERROR, "Too many POCs %d\n", l_current_poc_nb); - return OPJ_FALSE; - } - assert(l_current_poc_nb < 32); - - /* now poc is in use.*/ - l_tcp->POC = 1; - - l_current_poc = &l_tcp->pocs[l_old_poc_nb]; - for (i = l_old_poc_nb; i < l_current_poc_nb; ++i) { - opj_read_bytes(p_header_data,&(l_current_poc->resno0),1); /* RSpoc_i */ - ++p_header_data; - opj_read_bytes(p_header_data,&(l_current_poc->compno0),l_comp_room); /* CSpoc_i */ - p_header_data+=l_comp_room; - opj_read_bytes(p_header_data,&(l_current_poc->layno1),2); /* LYEpoc_i */ - /* make sure layer end is in acceptable bounds */ - l_current_poc->layno1 = opj_uint_min(l_current_poc->layno1, l_tcp->numlayers); - p_header_data+=2; - opj_read_bytes(p_header_data,&(l_current_poc->resno1),1); /* REpoc_i */ - ++p_header_data; - opj_read_bytes(p_header_data,&(l_current_poc->compno1),l_comp_room); /* CEpoc_i */ - p_header_data+=l_comp_room; - opj_read_bytes(p_header_data,&l_tmp,1); /* Ppoc_i */ - ++p_header_data; - l_current_poc->prg = (OPJ_PROG_ORDER) l_tmp; - /* make sure comp is in acceptable bounds */ - l_current_poc->compno1 = opj_uint_min(l_current_poc->compno1, l_nb_comp); - ++l_current_poc; - } - - l_tcp->numpocs = l_current_poc_nb - 1; - return OPJ_TRUE; -} - -/** - * Reads a CRG marker (Component registration) - * - * @param p_header_data the data contained in the TLM box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the TLM marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_crg ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_nb_comp; - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - l_nb_comp = p_j2k->m_private_image->numcomps; - - if (p_header_size != l_nb_comp *4) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading CRG marker\n"); - return OPJ_FALSE; - } - /* Do not care of this at the moment since only local variables are set here */ - /* - for - (i = 0; i < l_nb_comp; ++i) - { - opj_read_bytes(p_header_data,&l_Xcrg_i,2); // Xcrg_i - p_header_data+=2; - opj_read_bytes(p_header_data,&l_Ycrg_i,2); // Xcrg_i - p_header_data+=2; - } - */ - return OPJ_TRUE; -} - -/** - * Reads a TLM marker (Tile Length Marker) - * - * @param p_header_data the data contained in the TLM box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the TLM marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_tlm ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_Ztlm, l_Stlm, l_ST, l_SP, l_tot_num_tp_remaining, l_quotient, l_Ptlm_size; - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - if (p_header_size < 2) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading TLM marker\n"); - return OPJ_FALSE; - } - p_header_size -= 2; - - opj_read_bytes(p_header_data,&l_Ztlm,1); /* Ztlm */ - ++p_header_data; - opj_read_bytes(p_header_data,&l_Stlm,1); /* Stlm */ - ++p_header_data; - - l_ST = ((l_Stlm >> 4) & 0x3); - l_SP = (l_Stlm >> 6) & 0x1; - - l_Ptlm_size = (l_SP + 1) * 2; - l_quotient = l_Ptlm_size + l_ST; - - l_tot_num_tp_remaining = p_header_size % l_quotient; - - if (l_tot_num_tp_remaining != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading TLM marker\n"); - return OPJ_FALSE; - } - /* FIXME Do not care of this at the moment since only local variables are set here */ - /* - for - (i = 0; i < l_tot_num_tp; ++i) - { - opj_read_bytes(p_header_data,&l_Ttlm_i,l_ST); // Ttlm_i - p_header_data += l_ST; - opj_read_bytes(p_header_data,&l_Ptlm_i,l_Ptlm_size); // Ptlm_i - p_header_data += l_Ptlm_size; - }*/ - return OPJ_TRUE; -} - -/** - * Reads a PLM marker (Packet length, main header marker) - * - * @param p_header_data the data contained in the TLM box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the TLM marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_plm ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - if (p_header_size < 1) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading PLM marker\n"); - return OPJ_FALSE; - } - /* Do not care of this at the moment since only local variables are set here */ - /* - opj_read_bytes(p_header_data,&l_Zplm,1); // Zplm - ++p_header_data; - --p_header_size; - - while - (p_header_size > 0) - { - opj_read_bytes(p_header_data,&l_Nplm,1); // Nplm - ++p_header_data; - p_header_size -= (1+l_Nplm); - if - (p_header_size < 0) - { - opj_event_msg(p_manager, EVT_ERROR, "Error reading PLM marker\n"); - return false; - } - for - (i = 0; i < l_Nplm; ++i) - { - opj_read_bytes(p_header_data,&l_tmp,1); // Iplm_ij - ++p_header_data; - // take only the last seven bytes - l_packet_len |= (l_tmp & 0x7f); - if - (l_tmp & 0x80) - { - l_packet_len <<= 7; - } - else - { - // store packet length and proceed to next packet - l_packet_len = 0; - } - } - if - (l_packet_len != 0) - { - opj_event_msg(p_manager, EVT_ERROR, "Error reading PLM marker\n"); - return false; - } - } - */ - return OPJ_TRUE; -} - -/** - * Reads a PLT marker (Packet length, tile-part header) - * - * @param p_header_data the data contained in the PLT box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the PLT marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_plt ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_Zplt, l_tmp, l_packet_len = 0, i; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - if (p_header_size < 1) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading PLT marker\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_header_data,&l_Zplt,1); /* Zplt */ - ++p_header_data; - --p_header_size; - - for (i = 0; i < p_header_size; ++i) { - opj_read_bytes(p_header_data,&l_tmp,1); /* Iplt_ij */ - ++p_header_data; - /* take only the last seven bytes */ - l_packet_len |= (l_tmp & 0x7f); - if (l_tmp & 0x80) { - l_packet_len <<= 7; - } - else { - /* store packet length and proceed to next packet */ - l_packet_len = 0; - } - } - - if (l_packet_len != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading PLT marker\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -#if 0 -OPJ_BOOL j2k_read_ppm_v2 ( - opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - struct opj_event_mgr * p_manager - ) -{ - - opj_cp_t *l_cp = 00; - OPJ_UINT32 l_remaining_data, l_Z_ppm, l_N_ppm; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - if (p_header_size < 1) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading PPM marker\n"); - return OPJ_FALSE; - } - - l_cp = &(p_j2k->m_cp); - l_cp->ppm = 1; - - opj_read_bytes(p_header_data,&l_Z_ppm,1); /* Z_ppm */ - ++p_header_data; - --p_header_size; - - /* First PPM marker */ - if (l_Z_ppm == 0) { - if (p_header_size < 4) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading PPM marker\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_header_data,&l_N_ppm,4); /* N_ppm */ - p_header_data+=4; - p_header_size-=4; - - /* First PPM marker: Initialization */ - l_cp->ppm_len = l_N_ppm; - l_cp->ppm_data_size = 0; - - l_cp->ppm_buffer = (OPJ_BYTE *) opj_malloc(l_cp->ppm_len); - if (l_cp->ppm_buffer == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory reading ppm marker\n"); - return OPJ_FALSE; - } - memset(l_cp->ppm_buffer,0,l_cp->ppm_len); - - l_cp->ppm_data = l_cp->ppm_buffer; - } - - while (1) { - if (l_cp->ppm_data_size == l_cp->ppm_len) { - if (p_header_size >= 4) { - /* read a N_ppm */ - opj_read_bytes(p_header_data,&l_N_ppm,4); /* N_ppm */ - p_header_data+=4; - p_header_size-=4; - l_cp->ppm_len += l_N_ppm ; - - OPJ_BYTE *new_ppm_buffer = (OPJ_BYTE *) opj_realloc(l_cp->ppm_buffer, l_cp->ppm_len); - if (! new_ppm_buffer) { - opj_free(l_cp->ppm_buffer); - l_cp->ppm_buffer = NULL; - l_cp->ppm_len = 0; - l_cp->ppm_data = NULL; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory reading ppm marker\n"); - return OPJ_FALSE; - } - l_cp->ppm_buffer = new_ppm_buffer; - memset(l_cp->ppm_buffer+l_cp->ppm_data_size,0,l_N_ppm); - l_cp->ppm_data = l_cp->ppm_buffer; - } - else { - return OPJ_FALSE; - } - } - - l_remaining_data = l_cp->ppm_len - l_cp->ppm_data_size; - - if (l_remaining_data <= p_header_size) { - /* we must store less information than available in the packet */ - memcpy(l_cp->ppm_buffer + l_cp->ppm_data_size , p_header_data , l_remaining_data); - l_cp->ppm_data_size = l_cp->ppm_len; - p_header_size -= l_remaining_data; - p_header_data += l_remaining_data; - } - else { - memcpy(l_cp->ppm_buffer + l_cp->ppm_data_size , p_header_data , p_header_size); - l_cp->ppm_data_size += p_header_size; - p_header_data += p_header_size; - p_header_size = 0; - break; - } - } - - return OPJ_TRUE; -} -#endif - -OPJ_BOOL j2k_read_ppm_v3 ( - opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - struct opj_event_mgr * p_manager - ) -{ - opj_cp_t *l_cp = 00; - OPJ_UINT32 l_remaining_data, l_Z_ppm, l_N_ppm; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - /* Minimum size of PPM marker is equal to the size of Zppm element */ - if (p_header_size < 1) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading PPM marker\n"); - return OPJ_FALSE; - } - - l_cp = &(p_j2k->m_cp); - l_cp->ppm = 1; - - opj_read_bytes(p_header_data,&l_Z_ppm,1); /* Z_ppm */ - ++p_header_data; - --p_header_size; - - /* First PPM marker */ - if (l_Z_ppm == 0) { - /* We need now at least the Nppm^0 element */ - if (p_header_size < 4) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading PPM marker\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_header_data,&l_N_ppm,4); /* First N_ppm */ - p_header_data+=4; - p_header_size-=4; - - /* sanity check: how much bytes is left for Ippm */ - if( p_header_size < l_N_ppm ) - { - opj_event_msg(p_manager, EVT_ERROR, "Not enough bytes (%u) to hold Ippm series (%u), Index (%d)\n", p_header_size, l_N_ppm, l_Z_ppm ); - opj_free(l_cp->ppm_data); - l_cp->ppm_data = NULL; - l_cp->ppm_buffer = NULL; - l_cp->ppm = 0; /* do not use PPM */ - return OPJ_TRUE; - } - - /* First PPM marker: Initialization */ - l_cp->ppm_len = l_N_ppm; - l_cp->ppm_data_read = 0; - - l_cp->ppm_data = (OPJ_BYTE *) opj_malloc(l_cp->ppm_len); - l_cp->ppm_buffer = l_cp->ppm_data; - if (l_cp->ppm_data == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read ppm marker\n"); - return OPJ_FALSE; - } - memset(l_cp->ppm_data,0,l_cp->ppm_len); - - l_cp->ppm_data_current = l_cp->ppm_data; - - /*l_cp->ppm_data = l_cp->ppm_buffer;*/ - } - else { - if (p_header_size < 4) { - opj_event_msg(p_manager, EVT_WARNING, "Empty PPM marker\n"); - return OPJ_TRUE; - } - else { - /* Uncompleted Ippm series in the previous PPM marker?*/ - if (l_cp->ppm_data_read < l_cp->ppm_len) { - /* Get the place where add the remaining Ippm series*/ - l_cp->ppm_data_current = &(l_cp->ppm_data[l_cp->ppm_data_read]); - l_N_ppm = l_cp->ppm_len - l_cp->ppm_data_read; - } - else { - OPJ_BYTE *new_ppm_data; - opj_read_bytes(p_header_data,&l_N_ppm,4); /* First N_ppm */ - p_header_data+=4; - p_header_size-=4; - - /* sanity check: how much bytes is left for Ippm */ - if( p_header_size < l_N_ppm ) - { - opj_event_msg(p_manager, EVT_ERROR, "Not enough bytes (%u) to hold Ippm series (%u), Index (%d)\n", p_header_size, l_N_ppm, l_Z_ppm ); - opj_free(l_cp->ppm_data); - l_cp->ppm_data = NULL; - l_cp->ppm_buffer = NULL; - l_cp->ppm = 0; /* do not use PPM */ - return OPJ_TRUE; - } - /* Increase the size of ppm_data to add the new Ippm series*/ - assert(l_cp->ppm_data == l_cp->ppm_buffer && "We need ppm_data and ppm_buffer to be the same when reallocating"); - new_ppm_data = (OPJ_BYTE *) opj_realloc(l_cp->ppm_data, l_cp->ppm_len + l_N_ppm); - if (! new_ppm_data) { - opj_free(l_cp->ppm_data); - l_cp->ppm_data = NULL; - l_cp->ppm_buffer = NULL; /* TODO: no need for a new local variable: ppm_buffer and ppm_data are enough */ - l_cp->ppm_len = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to increase the size of ppm_data to add the new Ippm series\n"); - return OPJ_FALSE; - } - l_cp->ppm_data = new_ppm_data; - l_cp->ppm_buffer = l_cp->ppm_data; - - /* Keep the position of the place where concatenate the new series*/ - l_cp->ppm_data_current = &(l_cp->ppm_data[l_cp->ppm_len]); - l_cp->ppm_len += l_N_ppm; - } - } - } - - l_remaining_data = p_header_size; - - while (l_remaining_data >= l_N_ppm) { - /* read a complete Ippm series*/ - memcpy(l_cp->ppm_data_current, p_header_data, l_N_ppm); - p_header_size -= l_N_ppm; - p_header_data += l_N_ppm; - - l_cp->ppm_data_read += l_N_ppm; /* Increase the number of data read*/ - - if (p_header_size) - { - opj_read_bytes(p_header_data,&l_N_ppm,4); /* N_ppm^i */ - p_header_data+=4; - p_header_size-=4; - } - else { - l_remaining_data = p_header_size; - break; - } - - l_remaining_data = p_header_size; - - /* Next Ippm series is a complete series ?*/ - if (l_remaining_data >= l_N_ppm) { - OPJ_BYTE *new_ppm_data; - /* Increase the size of ppm_data to add the new Ippm series*/ - assert(l_cp->ppm_data == l_cp->ppm_buffer && "We need ppm_data and ppm_buffer to be the same when reallocating"); - new_ppm_data = (OPJ_BYTE *) opj_realloc(l_cp->ppm_data, l_cp->ppm_len + l_N_ppm); - if (! new_ppm_data) { - opj_free(l_cp->ppm_data); - l_cp->ppm_data = NULL; - l_cp->ppm_buffer = NULL; /* TODO: no need for a new local variable: ppm_buffer and ppm_data are enough */ - l_cp->ppm_len = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to increase the size of ppm_data to add the new (complete) Ippm series\n"); - return OPJ_FALSE; - } - l_cp->ppm_data = new_ppm_data; - l_cp->ppm_buffer = l_cp->ppm_data; - - /* Keep the position of the place where concatenate the new series */ - l_cp->ppm_data_current = &(l_cp->ppm_data[l_cp->ppm_len]); - l_cp->ppm_len += l_N_ppm; - } - - } - - /* Need to read an incomplete Ippm series*/ - if (l_remaining_data) { - OPJ_BYTE *new_ppm_data; - assert(l_cp->ppm_data == l_cp->ppm_buffer && "We need ppm_data and ppm_buffer to be the same when reallocating"); - new_ppm_data = (OPJ_BYTE *) opj_realloc(l_cp->ppm_data, l_cp->ppm_len + l_N_ppm); - if (! new_ppm_data) { - opj_free(l_cp->ppm_data); - l_cp->ppm_data = NULL; - l_cp->ppm_buffer = NULL; /* TODO: no need for a new local variable: ppm_buffer and ppm_data are enough */ - l_cp->ppm_len = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to increase the size of ppm_data to add the new (incomplete) Ippm series\n"); - return OPJ_FALSE; - } - l_cp->ppm_data = new_ppm_data; - l_cp->ppm_buffer = l_cp->ppm_data; - - /* Keep the position of the place where concatenate the new series*/ - l_cp->ppm_data_current = &(l_cp->ppm_data[l_cp->ppm_len]); - l_cp->ppm_len += l_N_ppm; - - /* Read incomplete Ippm series*/ - memcpy(l_cp->ppm_data_current, p_header_data, l_remaining_data); - p_header_size -= l_remaining_data; - p_header_data += l_remaining_data; - - l_cp->ppm_data_read += l_remaining_data; /* Increase the number of data read*/ - } - -#ifdef CLEAN_MSD - - if (l_cp->ppm_data_size == l_cp->ppm_len) { - if (p_header_size >= 4) { - /* read a N_ppm*/ - opj_read_bytes(p_header_data,&l_N_ppm,4); /* N_ppm */ - p_header_data+=4; - p_header_size-=4; - l_cp->ppm_len += l_N_ppm ; - - OPJ_BYTE *new_ppm_buffer = (OPJ_BYTE *) opj_realloc(l_cp->ppm_buffer, l_cp->ppm_len); - if (! new_ppm_buffer) { - opj_free(l_cp->ppm_buffer); - l_cp->ppm_buffer = NULL; - l_cp->ppm_len = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read ppm marker\n"); - return OPJ_FALSE; - } - l_cp->ppm_buffer = new_ppm_buffer; - memset(l_cp->ppm_buffer+l_cp->ppm_data_size,0,l_N_ppm); - - l_cp->ppm_data = l_cp->ppm_buffer; - } - else { - return OPJ_FALSE; - } - } - - l_remaining_data = l_cp->ppm_len - l_cp->ppm_data_size; - - if (l_remaining_data <= p_header_size) { - /* we must store less information than available in the packet */ - memcpy(l_cp->ppm_buffer + l_cp->ppm_data_size , p_header_data , l_remaining_data); - l_cp->ppm_data_size = l_cp->ppm_len; - p_header_size -= l_remaining_data; - p_header_data += l_remaining_data; - } - else { - memcpy(l_cp->ppm_buffer + l_cp->ppm_data_size , p_header_data , p_header_size); - l_cp->ppm_data_size += p_header_size; - p_header_data += p_header_size; - p_header_size = 0; - break; - } - } -#endif - return OPJ_TRUE; -} - -/** - * Reads a PPT marker (Packed packet headers, tile-part header) - * - * @param p_header_data the data contained in the PPT box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the PPT marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_ppt ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - OPJ_UINT32 l_Z_ppt; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - /* We need to have the Z_ppt element at minimum */ - if (p_header_size < 1) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading PPT marker\n"); - return OPJ_FALSE; - } - - l_cp = &(p_j2k->m_cp); - if (l_cp->ppm){ - opj_event_msg(p_manager, EVT_ERROR, "Error reading PPT marker: packet header have been previously found in the main header (PPM marker).\n"); - return OPJ_FALSE; - } - - l_tcp = &(l_cp->tcps[p_j2k->m_current_tile_number]); - l_tcp->ppt = 1; - - opj_read_bytes(p_header_data,&l_Z_ppt,1); /* Z_ppt */ - ++p_header_data; - --p_header_size; - - /* Allocate buffer to read the packet header */ - if (l_Z_ppt == 0) { - /* First PPT marker */ - l_tcp->ppt_data_size = 0; - l_tcp->ppt_len = p_header_size; - - opj_free(l_tcp->ppt_buffer); - l_tcp->ppt_buffer = (OPJ_BYTE *) opj_calloc(l_tcp->ppt_len, sizeof(OPJ_BYTE) ); - if (l_tcp->ppt_buffer == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read PPT marker\n"); - return OPJ_FALSE; - } - l_tcp->ppt_data = l_tcp->ppt_buffer; - - /* memset(l_tcp->ppt_buffer,0,l_tcp->ppt_len); */ - } - else { - OPJ_BYTE *new_ppt_buffer; - l_tcp->ppt_len += p_header_size; - - new_ppt_buffer = (OPJ_BYTE *) opj_realloc(l_tcp->ppt_buffer, l_tcp->ppt_len); - if (! new_ppt_buffer) { - opj_free(l_tcp->ppt_buffer); - l_tcp->ppt_buffer = NULL; - l_tcp->ppt_len = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read PPT marker\n"); - return OPJ_FALSE; - } - l_tcp->ppt_buffer = new_ppt_buffer; - l_tcp->ppt_data = l_tcp->ppt_buffer; - - memset(l_tcp->ppt_buffer+l_tcp->ppt_data_size,0,p_header_size); - } - - /* Read packet header from buffer */ - memcpy(l_tcp->ppt_buffer+l_tcp->ppt_data_size,p_header_data,p_header_size); - - l_tcp->ppt_data_size += p_header_size; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_tlm( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - OPJ_BYTE * l_current_data = 00; - OPJ_UINT32 l_tlm_size; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_tlm_size = 6 + (5*p_j2k->m_specific_param.m_encoder.m_total_tile_parts); - - if (l_tlm_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) { - OPJ_BYTE *new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_tlm_size); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to write TLM marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_tlm_size; - } - - l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data; - - /* change the way data is written to avoid seeking if possible */ - /* TODO */ - p_j2k->m_specific_param.m_encoder.m_tlm_start = opj_stream_tell(p_stream); - - opj_write_bytes(l_current_data,J2K_MS_TLM,2); /* TLM */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_tlm_size-2,2); /* Lpoc */ - l_current_data += 2; - - opj_write_bytes(l_current_data,0,1); /* Ztlm=0*/ - ++l_current_data; - - opj_write_bytes(l_current_data,0x50,1); /* Stlm ST=1(8bits-255 tiles max),SP=1(Ptlm=32bits) */ - ++l_current_data; - - /* do nothing on the 5 * l_j2k->m_specific_param.m_encoder.m_total_tile_parts remaining data */ - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_tlm_size,p_manager) != l_tlm_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_sot( opj_j2k_t *p_j2k, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - const opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - opj_write_bytes(p_data,J2K_MS_SOT,2); /* SOT */ - p_data += 2; - - opj_write_bytes(p_data,10,2); /* Lsot */ - p_data += 2; - - opj_write_bytes(p_data, p_j2k->m_current_tile_number,2); /* Isot */ - p_data += 2; - - /* Psot */ - p_data += 4; - - opj_write_bytes(p_data, p_j2k->m_specific_param.m_encoder.m_current_tile_part_number,1); /* TPsot */ - ++p_data; - - opj_write_bytes(p_data, p_j2k->m_cp.tcps[p_j2k->m_current_tile_number].m_nb_tile_parts,1); /* TNsot */ - ++p_data; - - /* UniPG>> */ -#ifdef USE_JPWL - /* update markers struct */ -/* - OPJ_BOOL res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_SOT, p_j2k->sot_start, len + 2); -*/ - assert( 0 && "TODO" ); -#endif /* USE_JPWL */ - - * p_data_written = 12; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_read_sot ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ) -{ - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - OPJ_UINT32 l_tot_len, l_num_parts = 0; - OPJ_UINT32 l_current_part; - OPJ_UINT32 l_tile_x,l_tile_y; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - /* Size of this marker is fixed = 12 (we have already read marker and its size)*/ - if (p_header_size != 8) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading SOT marker\n"); - return OPJ_FALSE; - } - - l_cp = &(p_j2k->m_cp); - opj_read_bytes(p_header_data,&(p_j2k->m_current_tile_number),2); /* Isot */ - p_header_data+=2; - - /* testcase 2.pdf.SIGFPE.706.1112 */ - if (p_j2k->m_current_tile_number >= l_cp->tw * l_cp->th) { - opj_event_msg(p_manager, EVT_ERROR, "Invalid tile number %d\n", p_j2k->m_current_tile_number); - return OPJ_FALSE; - } - - l_tcp = &l_cp->tcps[p_j2k->m_current_tile_number]; - l_tile_x = p_j2k->m_current_tile_number % l_cp->tw; - l_tile_y = p_j2k->m_current_tile_number / l_cp->tw; - -#ifdef USE_JPWL - if (l_cp->correct) { - - OPJ_UINT32 tileno = p_j2k->m_current_tile_number; - static OPJ_UINT32 backup_tileno = 0; - - /* tileno is negative or larger than the number of tiles!!! */ - if (tileno > (l_cp->tw * l_cp->th)) { - opj_event_msg(p_manager, EVT_ERROR, - "JPWL: bad tile number (%d out of a maximum of %d)\n", - tileno, (l_cp->tw * l_cp->th)); - if (!JPWL_ASSUME) { - opj_event_msg(p_manager, EVT_ERROR, "JPWL: giving up\n"); - return OPJ_FALSE; - } - /* we try to correct */ - tileno = backup_tileno; - opj_event_msg(p_manager, EVT_WARNING, "- trying to adjust this\n" - "- setting tile number to %d\n", - tileno); - } - - /* keep your private count of tiles */ - backup_tileno++; - }; -#endif /* USE_JPWL */ - - /* look for the tile in the list of already processed tile (in parts). */ - /* Optimization possible here with a more complex data structure and with the removing of tiles */ - /* since the time taken by this function can only grow at the time */ - - opj_read_bytes(p_header_data,&l_tot_len,4); /* Psot */ - p_header_data+=4; - - /* PSot should be equal to zero or >=14 or <= 2^32-1 */ - if ((l_tot_len !=0 ) && (l_tot_len < 14) ) - { - if (l_tot_len == 12 ) /* MSD: Special case for the PHR data which are read by kakadu*/ - { - opj_event_msg(p_manager, EVT_WARNING, "Empty SOT marker detected: Psot=%d.\n", l_tot_len); - } - else - { - opj_event_msg(p_manager, EVT_ERROR, "Psot value is not correct regards to the JPEG2000 norm: %d.\n", l_tot_len); - return OPJ_FALSE; - } - } - -#ifdef USE_JPWL - if (l_cp->correct) { - - /* totlen is negative or larger than the bytes left!!! */ - if (/*(l_tot_len < 0) ||*/ (l_tot_len > p_header_size ) ) { /* FIXME it seems correct; for info in V1 -> (p_stream_numbytesleft(p_stream) + 8))) { */ - opj_event_msg(p_manager, EVT_ERROR, - "JPWL: bad tile byte size (%d bytes against %d bytes left)\n", - l_tot_len, p_header_size ); /* FIXME it seems correct; for info in V1 -> p_stream_numbytesleft(p_stream) + 8); */ - if (!JPWL_ASSUME) { - opj_event_msg(p_manager, EVT_ERROR, "JPWL: giving up\n"); - return OPJ_FALSE; - } - /* we try to correct */ - l_tot_len = 0; - opj_event_msg(p_manager, EVT_WARNING, "- trying to adjust this\n" - "- setting Psot to %d => assuming it is the last tile\n", - l_tot_len); - } - }; -#endif /* USE_JPWL */ - - /* Ref A.4.2: Psot could be equal zero if it is the last tile-part of the codestream.*/ - if (!l_tot_len) { - opj_event_msg(p_manager, EVT_INFO, "Psot value of the current tile-part is equal to zero, " - "we assuming it is the last tile-part of the codestream.\n"); - p_j2k->m_specific_param.m_decoder.m_last_tile_part = 1; - } - - opj_read_bytes(p_header_data,&l_current_part ,1); /* TPsot */ - ++p_header_data; - - opj_read_bytes(p_header_data,&l_num_parts ,1); /* TNsot */ - ++p_header_data; - - if (l_num_parts != 0) { /* Number of tile-part header is provided by this tile-part header */ - /* Useful to manage the case of textGBR.jp2 file because two values of TNSot are allowed: the correct numbers of - * tile-parts for that tile and zero (A.4.2 of 15444-1 : 2002). */ - if (l_tcp->m_nb_tile_parts) { - if (l_current_part >= l_tcp->m_nb_tile_parts){ - opj_event_msg(p_manager, EVT_ERROR, "In SOT marker, TPSot (%d) is not valid regards to the current " - "number of tile-part (%d), giving up\n", l_current_part, l_tcp->m_nb_tile_parts ); - p_j2k->m_specific_param.m_decoder.m_last_tile_part = 1; - return OPJ_FALSE; - } - } - if( l_current_part >= l_num_parts ) { - /* testcase 451.pdf.SIGSEGV.ce9.3723 */ - opj_event_msg(p_manager, EVT_ERROR, "In SOT marker, TPSot (%d) is not valid regards to the current " - "number of tile-part (header) (%d), giving up\n", l_current_part, l_num_parts ); - p_j2k->m_specific_param.m_decoder.m_last_tile_part = 1; - return OPJ_FALSE; - } - l_tcp->m_nb_tile_parts = l_num_parts; - } - - /* If know the number of tile part header we will check if we didn't read the last*/ - if (l_tcp->m_nb_tile_parts) { - if (l_tcp->m_nb_tile_parts == (l_current_part+1)) { - p_j2k->m_specific_param.m_decoder.m_can_decode = 1; /* Process the last tile-part header*/ - } - } - - if (!p_j2k->m_specific_param.m_decoder.m_last_tile_part){ - /* Keep the size of data to skip after this marker */ - p_j2k->m_specific_param.m_decoder.m_sot_length = l_tot_len - 12; /* SOT_marker_size = 12 */ - } - else { - /* FIXME: need to be computed from the number of bytes remaining in the codestream */ - p_j2k->m_specific_param.m_decoder.m_sot_length = 0; - } - - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_TPH; - - /* Check if the current tile is outside the area we want decode or not corresponding to the tile index*/ - if (p_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec == -1) { - p_j2k->m_specific_param.m_decoder.m_skip_data = - (l_tile_x < p_j2k->m_specific_param.m_decoder.m_start_tile_x) - || (l_tile_x >= p_j2k->m_specific_param.m_decoder.m_end_tile_x) - || (l_tile_y < p_j2k->m_specific_param.m_decoder.m_start_tile_y) - || (l_tile_y >= p_j2k->m_specific_param.m_decoder.m_end_tile_y); - } - else { - assert( p_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec >= 0 ); - p_j2k->m_specific_param.m_decoder.m_skip_data = - (p_j2k->m_current_tile_number != (OPJ_UINT32)p_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec); - } - - /* Index */ - if (p_j2k->cstr_index) - { - assert(p_j2k->cstr_index->tile_index != 00); - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tileno = p_j2k->m_current_tile_number; - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_tpsno = l_current_part; - - if (l_num_parts != 0){ - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].nb_tps = l_num_parts; - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps = l_num_parts; - - if (!p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index) { - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = - (opj_tp_index_t*)opj_calloc(l_num_parts, sizeof(opj_tp_index_t)); - } - else { - opj_tp_index_t *new_tp_index = (opj_tp_index_t *) opj_realloc( - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index, l_num_parts* sizeof(opj_tp_index_t)); - if (! new_tp_index) { - opj_free(p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index); - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = NULL; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read PPT marker\n"); - return OPJ_FALSE; - } - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = new_tp_index; - } - } - else{ - /*if (!p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index)*/ { - - if (!p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index) { - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps = 10; - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = - (opj_tp_index_t*)opj_calloc( p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps, - sizeof(opj_tp_index_t)); - } - - if ( l_current_part >= p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps ){ - opj_tp_index_t *new_tp_index; - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps = l_current_part + 1; - new_tp_index = (opj_tp_index_t *) opj_realloc( - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index, - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps * sizeof(opj_tp_index_t)); - if (! new_tp_index) { - opj_free(p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index); - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = NULL; - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read PPT marker\n"); - return OPJ_FALSE; - } - p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = new_tp_index; - } - } - - } - - } - - /* FIXME move this onto a separate method to call before reading any SOT, remove part about main_end header, use a index struct inside p_j2k */ - /* if (p_j2k->cstr_info) { - if (l_tcp->first) { - if (tileno == 0) { - p_j2k->cstr_info->main_head_end = p_stream_tell(p_stream) - 13; - } - - p_j2k->cstr_info->tile[tileno].tileno = tileno; - p_j2k->cstr_info->tile[tileno].start_pos = p_stream_tell(p_stream) - 12; - p_j2k->cstr_info->tile[tileno].end_pos = p_j2k->cstr_info->tile[tileno].start_pos + totlen - 1; - p_j2k->cstr_info->tile[tileno].num_tps = numparts; - - if (numparts) { - p_j2k->cstr_info->tile[tileno].tp = (opj_tp_info_t *) opj_malloc(numparts * sizeof(opj_tp_info_t)); - } - else { - p_j2k->cstr_info->tile[tileno].tp = (opj_tp_info_t *) opj_malloc(10 * sizeof(opj_tp_info_t)); // Fixme (10) - } - } - else { - p_j2k->cstr_info->tile[tileno].end_pos += totlen; - } - - p_j2k->cstr_info->tile[tileno].tp[partno].tp_start_pos = p_stream_tell(p_stream) - 12; - p_j2k->cstr_info->tile[tileno].tp[partno].tp_end_pos = - p_j2k->cstr_info->tile[tileno].tp[partno].tp_start_pos + totlen - 1; - }*/ - return OPJ_TRUE; - } - -OPJ_BOOL opj_j2k_write_sod( opj_j2k_t *p_j2k, - opj_tcd_t * p_tile_coder, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 p_total_data_size, - const opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - opj_codestream_info_t *l_cstr_info = 00; - OPJ_UINT32 l_remaining_data; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - opj_write_bytes(p_data,J2K_MS_SOD,2); /* SOD */ - p_data += 2; - - /* make room for the EOF marker */ - l_remaining_data = p_total_data_size - 4; - - /* update tile coder */ - p_tile_coder->tp_num = p_j2k->m_specific_param.m_encoder.m_current_poc_tile_part_number ; - p_tile_coder->cur_tp_num = p_j2k->m_specific_param.m_encoder.m_current_tile_part_number; - - /* INDEX >> */ - /* TODO mergeV2: check this part which use cstr_info */ - /*l_cstr_info = p_j2k->cstr_info; - if (l_cstr_info) { - if (!p_j2k->m_specific_param.m_encoder.m_current_tile_part_number ) { - //TODO cstr_info->tile[p_j2k->m_current_tile_number].end_header = p_stream_tell(p_stream) + p_j2k->pos_correction - 1; - l_cstr_info->tile[p_j2k->m_current_tile_number].tileno = p_j2k->m_current_tile_number; - } - else {*/ - /* - TODO - if - (cstr_info->tile[p_j2k->m_current_tile_number].packet[cstr_info->packno - 1].end_pos < p_stream_tell(p_stream)) - { - cstr_info->tile[p_j2k->m_current_tile_number].packet[cstr_info->packno].start_pos = p_stream_tell(p_stream); - }*/ - /*}*/ - /* UniPG>> */ -#ifdef USE_JPWL - /* update markers struct */ - /*OPJ_BOOL res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_SOD, p_j2k->sod_start, 2); -*/ - assert( 0 && "TODO" ); -#endif /* USE_JPWL */ - /* <m_specific_param.m_encoder.m_current_tile_part_number == 0) { - p_tile_coder->tcd_image->tiles->packno = 0; - if (l_cstr_info) { - l_cstr_info->packno = 0; - } - } - - *p_data_written = 0; - - if (! opj_tcd_encode_tile(p_tile_coder, p_j2k->m_current_tile_number, p_data, p_data_written, l_remaining_data , l_cstr_info)) { - opj_event_msg(p_manager, EVT_ERROR, "Cannot encode tile\n"); - return OPJ_FALSE; - } - - *p_data_written += 2; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_read_sod (opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - OPJ_SIZE_T l_current_read_size; - opj_codestream_index_t * l_cstr_index = 00; - OPJ_BYTE ** l_current_data = 00; - opj_tcp_t * l_tcp = 00; - OPJ_UINT32 * l_tile_len = 00; - OPJ_BOOL l_sot_length_pb_detected = OPJ_FALSE; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_tcp = &(p_j2k->m_cp.tcps[p_j2k->m_current_tile_number]); - - if (p_j2k->m_specific_param.m_decoder.m_last_tile_part) { - /* opj_stream_get_number_byte_left returns OPJ_OFF_T - // but we are in the last tile part, - // so its result will fit on OPJ_UINT32 unless we find - // a file with a single tile part of more than 4 GB...*/ - p_j2k->m_specific_param.m_decoder.m_sot_length = (OPJ_UINT32)(opj_stream_get_number_byte_left(p_stream) - 2); - } - else { - /* Check to avoid pass the limit of OPJ_UINT32 */ - if (p_j2k->m_specific_param.m_decoder.m_sot_length >= 2 ) - p_j2k->m_specific_param.m_decoder.m_sot_length -= 2; - else { - /* MSD: case commented to support empty SOT marker (PHR data) */ - } - } - - l_current_data = &(l_tcp->m_data); - l_tile_len = &l_tcp->m_data_size; - - /* Patch to support new PHR data */ - if (p_j2k->m_specific_param.m_decoder.m_sot_length) { - if (! *l_current_data) { - /* LH: oddly enough, in this path, l_tile_len!=0. - * TODO: If this was consistant, we could simplify the code to only use realloc(), as realloc(0,...) default to malloc(0,...). - */ - *l_current_data = (OPJ_BYTE*) opj_malloc(p_j2k->m_specific_param.m_decoder.m_sot_length); - } - else { - OPJ_BYTE *l_new_current_data = (OPJ_BYTE *) opj_realloc(*l_current_data, *l_tile_len + p_j2k->m_specific_param.m_decoder.m_sot_length); - if (! l_new_current_data) { - opj_free(*l_current_data); - /*nothing more is done as l_current_data will be set to null, and just - afterward we enter in the error path - and the actual tile_len is updated (committed) at the end of the - function. */ - } - *l_current_data = l_new_current_data; - } - - if (*l_current_data == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to decode tile\n"); - return OPJ_FALSE; - } - } - else { - l_sot_length_pb_detected = OPJ_TRUE; - } - - /* Index */ - l_cstr_index = p_j2k->cstr_index; - if (l_cstr_index) { - OPJ_OFF_T l_current_pos = opj_stream_tell(p_stream) - 2; - - OPJ_UINT32 l_current_tile_part = l_cstr_index->tile_index[p_j2k->m_current_tile_number].current_tpsno; - l_cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index[l_current_tile_part].end_header = - l_current_pos; - l_cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index[l_current_tile_part].end_pos = - l_current_pos + p_j2k->m_specific_param.m_decoder.m_sot_length + 2; - - if (OPJ_FALSE == opj_j2k_add_tlmarker(p_j2k->m_current_tile_number, - l_cstr_index, - J2K_MS_SOD, - l_current_pos, - p_j2k->m_specific_param.m_decoder.m_sot_length + 2)) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to add tl marker\n"); - return OPJ_FALSE; - } - - /*l_cstr_index->packno = 0;*/ - } - - /* Patch to support new PHR data */ - if (!l_sot_length_pb_detected) { - l_current_read_size = opj_stream_read_data( - p_stream, - *l_current_data + *l_tile_len, - p_j2k->m_specific_param.m_decoder.m_sot_length, - p_manager); - } - else - { - l_current_read_size = 0; - } - - if (l_current_read_size != p_j2k->m_specific_param.m_decoder.m_sot_length) { - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_NEOC; - } - else { - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_TPHSOT; - } - - *l_tile_len += (OPJ_UINT32)l_current_read_size; - - return OPJ_TRUE; -} - - OPJ_BOOL opj_j2k_write_rgn(opj_j2k_t *p_j2k, - OPJ_UINT32 p_tile_no, - OPJ_UINT32 p_comp_no, - OPJ_UINT32 nb_comps, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - OPJ_BYTE * l_current_data = 00; - OPJ_UINT32 l_rgn_size; - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - opj_tccp_t *l_tccp = 00; - OPJ_UINT32 l_comp_room; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_cp = &(p_j2k->m_cp); - l_tcp = &l_cp->tcps[p_tile_no]; - l_tccp = &l_tcp->tccps[p_comp_no]; - - if (nb_comps <= 256) { - l_comp_room = 1; - } - else { - l_comp_room = 2; - } - - l_rgn_size = 6 + l_comp_room; - - l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data; - - opj_write_bytes(l_current_data,J2K_MS_RGN,2); /* RGN */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_rgn_size-2,2); /* Lrgn */ - l_current_data += 2; - - opj_write_bytes(l_current_data,p_comp_no,l_comp_room); /* Crgn */ - l_current_data+=l_comp_room; - - opj_write_bytes(l_current_data, 0,1); /* Srgn */ - ++l_current_data; - - opj_write_bytes(l_current_data, (OPJ_UINT32)l_tccp->roishift,1); /* SPrgn */ - ++l_current_data; - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_rgn_size,p_manager) != l_rgn_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_eoc( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - opj_write_bytes(p_j2k->m_specific_param.m_encoder.m_header_tile_data,J2K_MS_EOC,2); /* EOC */ - -/* UniPG>> */ -#ifdef USE_JPWL - /* update markers struct */ - /* - OPJ_BOOL res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_EOC, p_stream_tell(p_stream) - 2, 2); -*/ -#endif /* USE_JPWL */ - - if ( opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,2,p_manager) != 2) { - return OPJ_FALSE; - } - - if ( ! opj_stream_flush(p_stream,p_manager) ) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -/** - * Reads a RGN marker (Region Of Interest) - * - * @param p_header_data the data contained in the POC box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the POC marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_rgn (opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_nb_comp; - opj_image_t * l_image = 00; - - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - OPJ_UINT32 l_comp_room, l_comp_no, l_roi_sty; - - /* preconditions*/ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - l_image = p_j2k->m_private_image; - l_nb_comp = l_image->numcomps; - - if (l_nb_comp <= 256) { - l_comp_room = 1; } - else { - l_comp_room = 2; } - - if (p_header_size != 2 + l_comp_room) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading RGN marker\n"); - return OPJ_FALSE; - } - - l_cp = &(p_j2k->m_cp); - l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ? - &l_cp->tcps[p_j2k->m_current_tile_number] : - p_j2k->m_specific_param.m_decoder.m_default_tcp; - - opj_read_bytes(p_header_data,&l_comp_no,l_comp_room); /* Crgn */ - p_header_data+=l_comp_room; - opj_read_bytes(p_header_data,&l_roi_sty,1); /* Srgn */ - ++p_header_data; - -#ifdef USE_JPWL - if (l_cp->correct) { - /* totlen is negative or larger than the bytes left!!! */ - if (l_comp_room >= l_nb_comp) { - opj_event_msg(p_manager, EVT_ERROR, - "JPWL: bad component number in RGN (%d when there are only %d)\n", - l_comp_room, l_nb_comp); - if (!JPWL_ASSUME || JPWL_ASSUME) { - opj_event_msg(p_manager, EVT_ERROR, "JPWL: giving up\n"); - return OPJ_FALSE; - } - } - }; -#endif /* USE_JPWL */ - - /* testcase 3635.pdf.asan.77.2930 */ - if (l_comp_no >= l_nb_comp) { - opj_event_msg(p_manager, EVT_ERROR, - "bad component number in RGN (%d when there are only %d)\n", - l_comp_no, l_nb_comp); - return OPJ_FALSE; - } - - opj_read_bytes(p_header_data,(OPJ_UINT32 *) (&(l_tcp->tccps[l_comp_no].roishift)),1); /* SPrgn */ - ++p_header_data; - - return OPJ_TRUE; - -} - -OPJ_FLOAT32 opj_j2k_get_tp_stride (opj_tcp_t * p_tcp) -{ - return (OPJ_FLOAT32) ((p_tcp->m_nb_tile_parts - 1) * 14); -} - -OPJ_FLOAT32 opj_j2k_get_default_stride (opj_tcp_t * p_tcp) -{ - (void)p_tcp; - return 0; -} - -OPJ_BOOL opj_j2k_update_rates( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - opj_cp_t * l_cp = 00; - opj_image_t * l_image = 00; - opj_tcp_t * l_tcp = 00; - opj_image_comp_t * l_img_comp = 00; - - OPJ_UINT32 i,j,k; - OPJ_INT32 l_x0,l_y0,l_x1,l_y1; - OPJ_FLOAT32 * l_rates = 0; - OPJ_FLOAT32 l_sot_remove; - OPJ_UINT32 l_bits_empty, l_size_pixel; - OPJ_UINT32 l_tile_size = 0; - OPJ_UINT32 l_last_res; - OPJ_FLOAT32 (* l_tp_stride_func)(opj_tcp_t *) = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_cp = &(p_j2k->m_cp); - l_image = p_j2k->m_private_image; - l_tcp = l_cp->tcps; - - l_bits_empty = 8 * l_image->comps->dx * l_image->comps->dy; - l_size_pixel = l_image->numcomps * l_image->comps->prec; - l_sot_remove = (OPJ_FLOAT32) opj_stream_tell(p_stream) / (OPJ_FLOAT32)(l_cp->th * l_cp->tw); - - if (l_cp->m_specific_param.m_enc.m_tp_on) { - l_tp_stride_func = opj_j2k_get_tp_stride; - } - else { - l_tp_stride_func = opj_j2k_get_default_stride; - } - - for (i=0;ith;++i) { - for (j=0;jtw;++j) { - OPJ_FLOAT32 l_offset = (OPJ_FLOAT32)(*l_tp_stride_func)(l_tcp) / (OPJ_FLOAT32)l_tcp->numlayers; - - /* 4 borders of the tile rescale on the image if necessary */ - l_x0 = opj_int_max((OPJ_INT32)(l_cp->tx0 + j * l_cp->tdx), (OPJ_INT32)l_image->x0); - l_y0 = opj_int_max((OPJ_INT32)(l_cp->ty0 + i * l_cp->tdy), (OPJ_INT32)l_image->y0); - l_x1 = opj_int_min((OPJ_INT32)(l_cp->tx0 + (j + 1) * l_cp->tdx), (OPJ_INT32)l_image->x1); - l_y1 = opj_int_min((OPJ_INT32)(l_cp->ty0 + (i + 1) * l_cp->tdy), (OPJ_INT32)l_image->y1); - - l_rates = l_tcp->rates; - - /* Modification of the RATE >> */ - if (*l_rates) { - *l_rates = (( (OPJ_FLOAT32) (l_size_pixel * (OPJ_UINT32)(l_x1 - l_x0) * (OPJ_UINT32)(l_y1 - l_y0))) - / - ((*l_rates) * (OPJ_FLOAT32)l_bits_empty) - ) - - - l_offset; - } - - ++l_rates; - - for (k = 1; k < l_tcp->numlayers; ++k) { - if (*l_rates) { - *l_rates = (( (OPJ_FLOAT32) (l_size_pixel * (OPJ_UINT32)(l_x1 - l_x0) * (OPJ_UINT32)(l_y1 - l_y0))) - / - ((*l_rates) * (OPJ_FLOAT32)l_bits_empty) - ) - - - l_offset; - } - - ++l_rates; - } - - ++l_tcp; - - } - } - - l_tcp = l_cp->tcps; - - for (i=0;ith;++i) { - for (j=0;jtw;++j) { - l_rates = l_tcp->rates; - - if (*l_rates) { - *l_rates -= l_sot_remove; - - if (*l_rates < 30) { - *l_rates = 30; - } - } - - ++l_rates; - - l_last_res = l_tcp->numlayers - 1; - - for (k = 1; k < l_last_res; ++k) { - - if (*l_rates) { - *l_rates -= l_sot_remove; - - if (*l_rates < *(l_rates - 1) + 10) { - *l_rates = (*(l_rates - 1)) + 20; - } - } - - ++l_rates; - } - - if (*l_rates) { - *l_rates -= (l_sot_remove + 2.f); - - if (*l_rates < *(l_rates - 1) + 10) { - *l_rates = (*(l_rates - 1)) + 20; - } - } - - ++l_tcp; - } - } - - l_img_comp = l_image->comps; - l_tile_size = 0; - - for (i=0;inumcomps;++i) { - l_tile_size += ( opj_uint_ceildiv(l_cp->tdx,l_img_comp->dx) - * - opj_uint_ceildiv(l_cp->tdy,l_img_comp->dy) - * - l_img_comp->prec - ); - - ++l_img_comp; - } - - l_tile_size = (OPJ_UINT32) (l_tile_size * 0.1625); /* 1.3/8 = 0.1625 */ - - l_tile_size += opj_j2k_get_specific_header_sizes(p_j2k); - - p_j2k->m_specific_param.m_encoder.m_encoded_tile_size = l_tile_size; - p_j2k->m_specific_param.m_encoder.m_encoded_tile_data = - (OPJ_BYTE *) opj_malloc(p_j2k->m_specific_param.m_encoder.m_encoded_tile_size); - if (p_j2k->m_specific_param.m_encoder.m_encoded_tile_data == 00) { - return OPJ_FALSE; - } - - if (l_cp->m_specific_param.m_enc.m_cinema) { - p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_buffer = - (OPJ_BYTE *) opj_malloc(5*p_j2k->m_specific_param.m_encoder.m_total_tile_parts); - if (! p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_buffer) { - return OPJ_FALSE; - } - - p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_current = - p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_buffer; - } - - return OPJ_TRUE; -} - -#if 0 -OPJ_BOOL opj_j2k_read_eoc ( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - OPJ_UINT32 i; - opj_tcd_t * l_tcd = 00; - OPJ_UINT32 l_nb_tiles; - opj_tcp_t * l_tcp = 00; - OPJ_BOOL l_success; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_nb_tiles = p_j2k->m_cp.th * p_j2k->m_cp.tw; - l_tcp = p_j2k->m_cp.tcps; - - l_tcd = opj_tcd_create(OPJ_TRUE); - if (l_tcd == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Cannot decode tile, memory error\n"); - return OPJ_FALSE; - } - - for (i = 0; i < l_nb_tiles; ++i) { - if (l_tcp->m_data) { - if (! opj_tcd_init_decode_tile(l_tcd, i)) { - opj_tcd_destroy(l_tcd); - opj_event_msg(p_manager, EVT_ERROR, "Cannot decode tile, memory error\n"); - return OPJ_FALSE; - } - - l_success = opj_tcd_decode_tile(l_tcd, l_tcp->m_data, l_tcp->m_data_size, i, p_j2k->cstr_index); - /* cleanup */ - - if (! l_success) { - p_j2k->m_specific_param.m_decoder.m_state |= J2K_STATE_ERR; - break; - } - } - - opj_j2k_tcp_destroy(l_tcp); - ++l_tcp; - } - - opj_tcd_destroy(l_tcd); - return OPJ_TRUE; -} -#endif - -OPJ_BOOL opj_j2k_get_end_header(opj_j2k_t *p_j2k, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - p_j2k->cstr_index->main_head_end = opj_stream_tell(p_stream); - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_mct_data_group( opj_j2k_t *p_j2k, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - OPJ_UINT32 i; - opj_simple_mcc_decorrelation_data_t * l_mcc_record; - opj_mct_data_t * l_mct_record; - opj_tcp_t * l_tcp; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_stream != 00); - assert(p_manager != 00); - - if (! opj_j2k_write_cbd(p_j2k,p_stream,p_manager)) { - return OPJ_FALSE; - } - - l_tcp = &(p_j2k->m_cp.tcps[p_j2k->m_current_tile_number]); - l_mct_record = l_tcp->m_mct_records; - - for (i=0;im_nb_mct_records;++i) { - - if (! opj_j2k_write_mct_record(p_j2k,l_mct_record,p_stream,p_manager)) { - return OPJ_FALSE; - } - - ++l_mct_record; - } - - l_mcc_record = l_tcp->m_mcc_records; - - for (i=0;im_nb_mcc_records;++i) { - - if (! opj_j2k_write_mcc_record(p_j2k,l_mcc_record,p_stream,p_manager)) { - return OPJ_FALSE; - } - - ++l_mcc_record; - } - - if (! opj_j2k_write_mco(p_j2k,p_stream,p_manager)) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -#if 0 -OPJ_BOOL opj_j2k_write_all_coc(opj_j2k_t *p_j2k, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - OPJ_UINT32 compno; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - for (compno = 0; compno < p_j2k->m_private_image->numcomps; ++compno) - { - if (! opj_j2k_write_coc(p_j2k,compno,p_stream, p_manager)) { - return OPJ_FALSE; - } - } - - return OPJ_TRUE; -} -#endif - -#if 0 -OPJ_BOOL opj_j2k_write_all_qcc(opj_j2k_t *p_j2k, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - OPJ_UINT32 compno; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - for (compno = 0; compno < p_j2k->m_private_image->numcomps; ++compno) - { - if (! opj_j2k_write_qcc(p_j2k,compno,p_stream, p_manager)) { - return OPJ_FALSE; - } - } - - return OPJ_TRUE; -} -#endif - - -OPJ_BOOL opj_j2k_write_regions( opj_j2k_t *p_j2k, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - OPJ_UINT32 compno; - const opj_tccp_t *l_tccp = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_tccp = p_j2k->m_cp.tcps->tccps; - - for (compno = 0; compno < p_j2k->m_private_image->numcomps; ++compno) { - if (l_tccp->roishift) { - - if (! opj_j2k_write_rgn(p_j2k,0,compno,p_j2k->m_private_image->numcomps,p_stream,p_manager)) { - return OPJ_FALSE; - } - } - - ++l_tccp; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_epc( opj_j2k_t *p_j2k, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - opj_codestream_index_t * l_cstr_index = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_cstr_index = p_j2k->cstr_index; - if (l_cstr_index) { - l_cstr_index->codestream_size = (OPJ_UINT64)opj_stream_tell(p_stream); - /* UniPG>> */ - /* The following adjustment is done to adjust the codestream size */ - /* if SOD is not at 0 in the buffer. Useful in case of JP2, where */ - /* the first bunch of bytes is not in the codestream */ - l_cstr_index->codestream_size -= (OPJ_UINT64)l_cstr_index->main_head_start; - /* <epc_on) { - - /* encode according to JPWL */ - jpwl_encode(p_j2k, p_stream, image); - - } -#endif - assert( 0 && "TODO" ); -#endif /* USE_JPWL */ - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_read_unk ( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - OPJ_UINT32 *output_marker, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_unknown_marker; - const opj_dec_memory_marker_handler_t * l_marker_handler; - OPJ_UINT32 l_size_unk = 2; - - /* preconditions*/ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - opj_event_msg(p_manager, EVT_WARNING, "Unknown marker\n"); - - while(1) { - /* Try to read 2 bytes (the next marker ID) from stream and copy them into the buffer*/ - if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - - /* read 2 bytes as the new marker ID*/ - opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_unknown_marker,2); - - if (!(l_unknown_marker < 0xff00)) { - - /* Get the marker handler from the marker ID*/ - l_marker_handler = opj_j2k_get_marker_handler(l_unknown_marker); - - if (!(p_j2k->m_specific_param.m_decoder.m_state & l_marker_handler->states)) { - opj_event_msg(p_manager, EVT_ERROR, "Marker is not compliant with its position\n"); - return OPJ_FALSE; - } - else { - if (l_marker_handler->id != J2K_MS_UNK) { - /* Add the marker to the codestream index*/ - if (l_marker_handler->id != J2K_MS_SOT) - { - OPJ_BOOL res = opj_j2k_add_mhmarker(p_j2k->cstr_index, J2K_MS_UNK, - (OPJ_UINT32) opj_stream_tell(p_stream) - l_size_unk, - l_size_unk); - if (res == OPJ_FALSE) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to add mh marker\n"); - return OPJ_FALSE; - } - } - break; /* next marker is known and well located */ - } - else - l_size_unk += 2; - } - } - } - - *output_marker = l_marker_handler->id ; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_mct_record( opj_j2k_t *p_j2k, - opj_mct_data_t * p_mct_record, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - OPJ_UINT32 l_mct_size; - OPJ_BYTE * l_current_data = 00; - OPJ_UINT32 l_tmp; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_mct_size = 10 + p_mct_record->m_data_size; - - if (l_mct_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) { - OPJ_BYTE *new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_mct_size); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to write MCT marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_mct_size; - } - - l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data; - - opj_write_bytes(l_current_data,J2K_MS_MCT,2); /* MCT */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_mct_size-2,2); /* Lmct */ - l_current_data += 2; - - opj_write_bytes(l_current_data,0,2); /* Zmct */ - l_current_data += 2; - - /* only one marker atm */ - l_tmp = (p_mct_record->m_index & 0xff) | (p_mct_record->m_array_type << 8) | (p_mct_record->m_element_type << 10); - - opj_write_bytes(l_current_data,l_tmp,2); - l_current_data += 2; - - opj_write_bytes(l_current_data,0,2); /* Ymct */ - l_current_data+=2; - - memcpy(l_current_data,p_mct_record->m_data,p_mct_record->m_data_size); - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_mct_size,p_manager) != l_mct_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -/** - * Reads a MCT marker (Multiple Component Transform) - * - * @param p_header_data the data contained in the MCT box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the MCT marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_mct ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 i; - opj_tcp_t *l_tcp = 00; - OPJ_UINT32 l_tmp; - OPJ_UINT32 l_indix; - opj_mct_data_t * l_mct_data; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - - l_tcp = p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH ? - &p_j2k->m_cp.tcps[p_j2k->m_current_tile_number] : - p_j2k->m_specific_param.m_decoder.m_default_tcp; - - if (p_header_size < 2) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading MCT marker\n"); - return OPJ_FALSE; - } - - /* first marker */ - opj_read_bytes(p_header_data,&l_tmp,2); /* Zmct */ - p_header_data += 2; - if (l_tmp != 0) { - opj_event_msg(p_manager, EVT_WARNING, "Cannot take in charge mct data within multiple MCT records\n"); - return OPJ_TRUE; - } - - if(p_header_size <= 6) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading MCT marker\n"); - return OPJ_FALSE; - } - - /* Imct -> no need for other values, take the first, type is double with decorrelation x0000 1101 0000 0000*/ - opj_read_bytes(p_header_data,&l_tmp,2); /* Imct */ - p_header_data += 2; - - l_indix = l_tmp & 0xff; - l_mct_data = l_tcp->m_mct_records; - - for (i=0;im_nb_mct_records;++i) { - if (l_mct_data->m_index == l_indix) { - break; - } - ++l_mct_data; - } - - /* NOT FOUND */ - if (i == l_tcp->m_nb_mct_records) { - if (l_tcp->m_nb_mct_records == l_tcp->m_nb_max_mct_records) { - opj_mct_data_t *new_mct_records; - l_tcp->m_nb_max_mct_records += OPJ_J2K_MCT_DEFAULT_NB_RECORDS; - - new_mct_records = (opj_mct_data_t *) opj_realloc(l_tcp->m_mct_records, l_tcp->m_nb_max_mct_records * sizeof(opj_mct_data_t)); - if (! new_mct_records) { - opj_free(l_tcp->m_mct_records); - l_tcp->m_mct_records = NULL; - l_tcp->m_nb_max_mct_records = 0; - l_tcp->m_nb_mct_records = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read MCT marker\n"); - return OPJ_FALSE; - } - l_tcp->m_mct_records = new_mct_records; - l_mct_data = l_tcp->m_mct_records + l_tcp->m_nb_mct_records; - memset(l_mct_data ,0,(l_tcp->m_nb_max_mct_records - l_tcp->m_nb_mct_records) * sizeof(opj_mct_data_t)); - } - - l_mct_data = l_tcp->m_mct_records + l_tcp->m_nb_mct_records; - } - - if (l_mct_data->m_data) { - opj_free(l_mct_data->m_data); - l_mct_data->m_data = 00; - } - - l_mct_data->m_index = l_indix; - l_mct_data->m_array_type = (J2K_MCT_ARRAY_TYPE)((l_tmp >> 8) & 3); - l_mct_data->m_element_type = (J2K_MCT_ELEMENT_TYPE)((l_tmp >> 10) & 3); - - opj_read_bytes(p_header_data,&l_tmp,2); /* Ymct */ - p_header_data+=2; - if (l_tmp != 0) { - opj_event_msg(p_manager, EVT_WARNING, "Cannot take in charge multiple MCT markers\n"); - return OPJ_TRUE; - } - - p_header_size -= 6; - - l_mct_data->m_data = (OPJ_BYTE*)opj_malloc(p_header_size); - if (! l_mct_data->m_data) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading MCT marker\n"); - return OPJ_FALSE; - } - memcpy(l_mct_data->m_data,p_header_data,p_header_size); - - l_mct_data->m_data_size = p_header_size; - ++l_tcp->m_nb_mct_records; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_mcc_record( opj_j2k_t *p_j2k, - struct opj_simple_mcc_decorrelation_data * p_mcc_record, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - OPJ_UINT32 i; - OPJ_UINT32 l_mcc_size; - OPJ_BYTE * l_current_data = 00; - OPJ_UINT32 l_nb_bytes_for_comp; - OPJ_UINT32 l_mask; - OPJ_UINT32 l_tmcc; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - if (p_mcc_record->m_nb_comps > 255 ) { - l_nb_bytes_for_comp = 2; - l_mask = 0x8000; - } - else { - l_nb_bytes_for_comp = 1; - l_mask = 0; - } - - l_mcc_size = p_mcc_record->m_nb_comps * 2 * l_nb_bytes_for_comp + 19; - if (l_mcc_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) - { - OPJ_BYTE *new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_mcc_size); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to write MCC marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_mcc_size; - } - - l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data; - - opj_write_bytes(l_current_data,J2K_MS_MCC,2); /* MCC */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_mcc_size-2,2); /* Lmcc */ - l_current_data += 2; - - /* first marker */ - opj_write_bytes(l_current_data,0,2); /* Zmcc */ - l_current_data += 2; - - opj_write_bytes(l_current_data,p_mcc_record->m_index,1); /* Imcc -> no need for other values, take the first */ - ++l_current_data; - - /* only one marker atm */ - opj_write_bytes(l_current_data,0,2); /* Ymcc */ - l_current_data+=2; - - opj_write_bytes(l_current_data,1,2); /* Qmcc -> number of collections -> 1 */ - l_current_data+=2; - - opj_write_bytes(l_current_data,0x1,1); /* Xmcci type of component transformation -> array based decorrelation */ - ++l_current_data; - - opj_write_bytes(l_current_data,p_mcc_record->m_nb_comps | l_mask,2); /* Nmcci number of input components involved and size for each component offset = 8 bits */ - l_current_data+=2; - - for (i=0;im_nb_comps;++i) { - opj_write_bytes(l_current_data,i,l_nb_bytes_for_comp); /* Cmccij Component offset*/ - l_current_data+=l_nb_bytes_for_comp; - } - - opj_write_bytes(l_current_data,p_mcc_record->m_nb_comps|l_mask,2); /* Mmcci number of output components involved and size for each component offset = 8 bits */ - l_current_data+=2; - - for (i=0;im_nb_comps;++i) - { - opj_write_bytes(l_current_data,i,l_nb_bytes_for_comp); /* Wmccij Component offset*/ - l_current_data+=l_nb_bytes_for_comp; - } - - l_tmcc = ((!p_mcc_record->m_is_irreversible)&1)<<16; - - if (p_mcc_record->m_decorrelation_array) { - l_tmcc |= p_mcc_record->m_decorrelation_array->m_index; - } - - if (p_mcc_record->m_offset_array) { - l_tmcc |= ((p_mcc_record->m_offset_array->m_index)<<8); - } - - opj_write_bytes(l_current_data,l_tmcc,3); /* Tmcci : use MCT defined as number 1 and irreversible array based. */ - l_current_data+=3; - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_mcc_size,p_manager) != l_mcc_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_read_mcc ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ) -{ - OPJ_UINT32 i,j; - OPJ_UINT32 l_tmp; - OPJ_UINT32 l_indix; - opj_tcp_t * l_tcp; - opj_simple_mcc_decorrelation_data_t * l_mcc_record; - opj_mct_data_t * l_mct_data; - OPJ_UINT32 l_nb_collections; - OPJ_UINT32 l_nb_comps; - OPJ_UINT32 l_nb_bytes_by_comp; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - l_tcp = p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH ? - &p_j2k->m_cp.tcps[p_j2k->m_current_tile_number] : - p_j2k->m_specific_param.m_decoder.m_default_tcp; - - if (p_header_size < 2) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading MCC marker\n"); - return OPJ_FALSE; - } - - /* first marker */ - opj_read_bytes(p_header_data,&l_tmp,2); /* Zmcc */ - p_header_data += 2; - if (l_tmp != 0) { - opj_event_msg(p_manager, EVT_WARNING, "Cannot take in charge multiple data spanning\n"); - return OPJ_TRUE; - } - - if (p_header_size < 7) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading MCC marker\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_header_data,&l_indix,1); /* Imcc -> no need for other values, take the first */ - ++p_header_data; - - l_mcc_record = l_tcp->m_mcc_records; - - for(i=0;im_nb_mcc_records;++i) { - if (l_mcc_record->m_index == l_indix) { - break; - } - ++l_mcc_record; - } - - /** NOT FOUND */ - if (i == l_tcp->m_nb_mcc_records) { - if (l_tcp->m_nb_mcc_records == l_tcp->m_nb_max_mcc_records) { - opj_simple_mcc_decorrelation_data_t *new_mcc_records; - l_tcp->m_nb_max_mcc_records += OPJ_J2K_MCC_DEFAULT_NB_RECORDS; - - new_mcc_records = (opj_simple_mcc_decorrelation_data_t *) opj_realloc( - l_tcp->m_mcc_records, l_tcp->m_nb_max_mcc_records * sizeof(opj_simple_mcc_decorrelation_data_t)); - if (! new_mcc_records) { - opj_free(l_tcp->m_mcc_records); - l_tcp->m_mcc_records = NULL; - l_tcp->m_nb_max_mcc_records = 0; - l_tcp->m_nb_mcc_records = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read MCC marker\n"); - return OPJ_FALSE; - } - l_tcp->m_mcc_records = new_mcc_records; - l_mcc_record = l_tcp->m_mcc_records + l_tcp->m_nb_mcc_records; - memset(l_mcc_record,0,(l_tcp->m_nb_max_mcc_records-l_tcp->m_nb_mcc_records) * sizeof(opj_simple_mcc_decorrelation_data_t)); - } - l_mcc_record = l_tcp->m_mcc_records + l_tcp->m_nb_mcc_records; - } - l_mcc_record->m_index = l_indix; - - /* only one marker atm */ - opj_read_bytes(p_header_data,&l_tmp,2); /* Ymcc */ - p_header_data+=2; - if (l_tmp != 0) { - opj_event_msg(p_manager, EVT_WARNING, "Cannot take in charge multiple data spanning\n"); - return OPJ_TRUE; - } - - opj_read_bytes(p_header_data,&l_nb_collections,2); /* Qmcc -> number of collections -> 1 */ - p_header_data+=2; - - if (l_nb_collections > 1) { - opj_event_msg(p_manager, EVT_WARNING, "Cannot take in charge multiple collections\n"); - return OPJ_TRUE; - } - - p_header_size -= 7; - - for (i=0;i array based decorrelation */ - ++p_header_data; - - if (l_tmp != 1) { - opj_event_msg(p_manager, EVT_WARNING, "Cannot take in charge collections other than array decorrelation\n"); - return OPJ_TRUE; - } - - opj_read_bytes(p_header_data,&l_nb_comps,2); - - p_header_data+=2; - p_header_size-=3; - - l_nb_bytes_by_comp = 1 + (l_nb_comps>>15); - l_mcc_record->m_nb_comps = l_nb_comps & 0x7fff; - - if (p_header_size < (l_nb_bytes_by_comp * l_mcc_record->m_nb_comps + 2)) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading MCC marker\n"); - return OPJ_FALSE; - } - - p_header_size -= (l_nb_bytes_by_comp * l_mcc_record->m_nb_comps + 2); - - for (j=0;jm_nb_comps;++j) { - opj_read_bytes(p_header_data,&l_tmp,l_nb_bytes_by_comp); /* Cmccij Component offset*/ - p_header_data+=l_nb_bytes_by_comp; - - if (l_tmp != j) { - opj_event_msg(p_manager, EVT_WARNING, "Cannot take in charge collections with indix shuffle\n"); - return OPJ_TRUE; - } - } - - opj_read_bytes(p_header_data,&l_nb_comps,2); - p_header_data+=2; - - l_nb_bytes_by_comp = 1 + (l_nb_comps>>15); - l_nb_comps &= 0x7fff; - - if (l_nb_comps != l_mcc_record->m_nb_comps) { - opj_event_msg(p_manager, EVT_WARNING, "Cannot take in charge collections without same number of indixes\n"); - return OPJ_TRUE; - } - - if (p_header_size < (l_nb_bytes_by_comp * l_mcc_record->m_nb_comps + 3)) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading MCC marker\n"); - return OPJ_FALSE; - } - - p_header_size -= (l_nb_bytes_by_comp * l_mcc_record->m_nb_comps + 3); - - for (j=0;jm_nb_comps;++j) { - opj_read_bytes(p_header_data,&l_tmp,l_nb_bytes_by_comp); /* Wmccij Component offset*/ - p_header_data+=l_nb_bytes_by_comp; - - if (l_tmp != j) { - opj_event_msg(p_manager, EVT_WARNING, "Cannot take in charge collections with indix shuffle\n"); - return OPJ_TRUE; - } - } - - opj_read_bytes(p_header_data,&l_tmp,3); /* Wmccij Component offset*/ - p_header_data += 3; - - l_mcc_record->m_is_irreversible = ! ((l_tmp>>16) & 1); - l_mcc_record->m_decorrelation_array = 00; - l_mcc_record->m_offset_array = 00; - - l_indix = l_tmp & 0xff; - if (l_indix != 0) { - l_mct_data = l_tcp->m_mct_records; - for (j=0;jm_nb_mct_records;++j) { - if (l_mct_data->m_index == l_indix) { - l_mcc_record->m_decorrelation_array = l_mct_data; - break; - } - ++l_mct_data; - } - - if (l_mcc_record->m_decorrelation_array == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading MCC marker\n"); - return OPJ_FALSE; - } - } - - l_indix = (l_tmp >> 8) & 0xff; - if (l_indix != 0) { - l_mct_data = l_tcp->m_mct_records; - for (j=0;jm_nb_mct_records;++j) { - if (l_mct_data->m_index == l_indix) { - l_mcc_record->m_offset_array = l_mct_data; - break; - } - ++l_mct_data; - } - - if (l_mcc_record->m_offset_array == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading MCC marker\n"); - return OPJ_FALSE; - } - } - } - - if (p_header_size != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading MCC marker\n"); - return OPJ_FALSE; - } - - ++l_tcp->m_nb_mcc_records; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_mco( opj_j2k_t *p_j2k, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager - ) -{ - OPJ_BYTE * l_current_data = 00; - OPJ_UINT32 l_mco_size; - opj_tcp_t * l_tcp = 00; - opj_simple_mcc_decorrelation_data_t * l_mcc_record; - OPJ_UINT32 i; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_tcp =&(p_j2k->m_cp.tcps[p_j2k->m_current_tile_number]); - l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data; - - l_mco_size = 5 + l_tcp->m_nb_mcc_records; - if (l_mco_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) { - - OPJ_BYTE *new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_mco_size); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to write MCO marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_mco_size; - } - - opj_write_bytes(l_current_data,J2K_MS_MCO,2); /* MCO */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_mco_size-2,2); /* Lmco */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_tcp->m_nb_mcc_records,1); /* Nmco : only one tranform stage*/ - ++l_current_data; - - l_mcc_record = l_tcp->m_mcc_records; - for (i=0;im_nb_mcc_records;++i) { - opj_write_bytes(l_current_data,l_mcc_record->m_index,1);/* Imco -> use the mcc indicated by 1*/ - ++l_current_data; - - ++l_mcc_record; - } - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_mco_size,p_manager) != l_mco_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -/** - * Reads a MCO marker (Multiple Component Transform Ordering) - * - * @param p_header_data the data contained in the MCO box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the MCO marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_mco ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_tmp, i; - OPJ_UINT32 l_nb_stages; - opj_tcp_t * l_tcp; - opj_tccp_t * l_tccp; - opj_image_t * l_image; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - l_image = p_j2k->m_private_image; - l_tcp = p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH ? - &p_j2k->m_cp.tcps[p_j2k->m_current_tile_number] : - p_j2k->m_specific_param.m_decoder.m_default_tcp; - - if (p_header_size < 1) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading MCO marker\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_header_data,&l_nb_stages,1); /* Nmco : only one tranform stage*/ - ++p_header_data; - - if (l_nb_stages > 1) { - opj_event_msg(p_manager, EVT_WARNING, "Cannot take in charge multiple transformation stages.\n"); - return OPJ_TRUE; - } - - if (p_header_size != l_nb_stages + 1) { - opj_event_msg(p_manager, EVT_WARNING, "Error reading MCO marker\n"); - return OPJ_FALSE; - } - - l_tccp = l_tcp->tccps; - - for (i=0;inumcomps;++i) { - l_tccp->m_dc_level_shift = 0; - ++l_tccp; - } - - if (l_tcp->m_mct_decoding_matrix) { - opj_free(l_tcp->m_mct_decoding_matrix); - l_tcp->m_mct_decoding_matrix = 00; - } - - for (i=0;im_private_image,l_tmp)) { - return OPJ_FALSE; - } - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index) -{ - OPJ_UINT32 i; - opj_simple_mcc_decorrelation_data_t * l_mcc_record; - opj_mct_data_t * l_deco_array, * l_offset_array; - OPJ_UINT32 l_data_size,l_mct_size, l_offset_size; - OPJ_UINT32 l_nb_elem; - OPJ_UINT32 * l_offset_data, * l_current_offset_data; - opj_tccp_t * l_tccp; - - /* preconditions */ - assert(p_tcp != 00); - - l_mcc_record = p_tcp->m_mcc_records; - - for (i=0;im_nb_mcc_records;++i) { - if (l_mcc_record->m_index == p_index) { - break; - } - } - - if (i==p_tcp->m_nb_mcc_records) { - /** element discarded **/ - return OPJ_TRUE; - } - - if (l_mcc_record->m_nb_comps != p_image->numcomps) { - /** do not support number of comps != image */ - return OPJ_TRUE; - } - - l_deco_array = l_mcc_record->m_decorrelation_array; - - if (l_deco_array) { - l_data_size = MCT_ELEMENT_SIZE[l_deco_array->m_element_type] * p_image->numcomps * p_image->numcomps; - if (l_deco_array->m_data_size != l_data_size) { - return OPJ_FALSE; - } - - l_nb_elem = p_image->numcomps * p_image->numcomps; - l_mct_size = l_nb_elem * (OPJ_UINT32)sizeof(OPJ_FLOAT32); - p_tcp->m_mct_decoding_matrix = (OPJ_FLOAT32*)opj_malloc(l_mct_size); - - if (! p_tcp->m_mct_decoding_matrix ) { - return OPJ_FALSE; - } - - j2k_mct_read_functions_to_float[l_deco_array->m_element_type](l_deco_array->m_data,p_tcp->m_mct_decoding_matrix,l_nb_elem); - } - - l_offset_array = l_mcc_record->m_offset_array; - - if (l_offset_array) { - l_data_size = MCT_ELEMENT_SIZE[l_offset_array->m_element_type] * p_image->numcomps; - if (l_offset_array->m_data_size != l_data_size) { - return OPJ_FALSE; - } - - l_nb_elem = p_image->numcomps; - l_offset_size = l_nb_elem * (OPJ_UINT32)sizeof(OPJ_UINT32); - l_offset_data = (OPJ_UINT32*)opj_malloc(l_offset_size); - - if (! l_offset_data ) { - return OPJ_FALSE; - } - - j2k_mct_read_functions_to_int32[l_offset_array->m_element_type](l_offset_array->m_data,l_offset_data,l_nb_elem); - - l_tccp = p_tcp->tccps; - l_current_offset_data = l_offset_data; - - for (i=0;inumcomps;++i) { - l_tccp->m_dc_level_shift = (OPJ_INT32)*(l_current_offset_data++); - ++l_tccp; - } - - opj_free(l_offset_data); - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_cbd( opj_j2k_t *p_j2k, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - OPJ_UINT32 i; - OPJ_UINT32 l_cbd_size; - OPJ_BYTE * l_current_data = 00; - opj_image_t *l_image = 00; - opj_image_comp_t * l_comp = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_image = p_j2k->m_private_image; - l_cbd_size = 6 + p_j2k->m_private_image->numcomps; - - if (l_cbd_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) { - OPJ_BYTE *new_header_tile_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_encoder.m_header_tile_data, l_cbd_size); - if (! new_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = NULL; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to write CBD marker\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_cbd_size; - } - - l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data; - - opj_write_bytes(l_current_data,J2K_MS_CBD,2); /* CBD */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_cbd_size-2,2); /* L_CBD */ - l_current_data += 2; - - opj_write_bytes(l_current_data,l_image->numcomps, 2); /* Ncbd */ - l_current_data+=2; - - l_comp = l_image->comps; - - for (i=0;inumcomps;++i) { - opj_write_bytes(l_current_data, (l_comp->sgnd << 7) | (l_comp->prec - 1), 1); /* Component bit depth */ - ++l_current_data; - - ++l_comp; - } - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_header_tile_data,l_cbd_size,p_manager) != l_cbd_size) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -/** - * Reads a CBD marker (Component bit depth definition) - * @param p_header_data the data contained in the CBD box. - * @param p_j2k the jpeg2000 codec. - * @param p_header_size the size of the data contained in the CBD marker. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_read_cbd ( opj_j2k_t *p_j2k, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_nb_comp,l_num_comp; - OPJ_UINT32 l_comp_def; - OPJ_UINT32 i; - opj_image_comp_t * l_comp = 00; - - /* preconditions */ - assert(p_header_data != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - l_num_comp = p_j2k->m_private_image->numcomps; - - if (p_header_size != (p_j2k->m_private_image->numcomps + 2)) { - opj_event_msg(p_manager, EVT_ERROR, "Crror reading CBD marker\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_header_data,&l_nb_comp,2); /* Ncbd */ - p_header_data+=2; - - if (l_nb_comp != l_num_comp) { - opj_event_msg(p_manager, EVT_ERROR, "Crror reading CBD marker\n"); - return OPJ_FALSE; - } - - l_comp = p_j2k->m_private_image->comps; - for (i=0;isgnd = (l_comp_def>>7) & 1; - l_comp->prec = (l_comp_def&0x7f) + 1; - ++l_comp; - } - - return OPJ_TRUE; -} - -/* ----------------------------------------------------------------------- */ -/* J2K / JPT decoder interface */ -/* ----------------------------------------------------------------------- */ - -void opj_j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters) -{ - if(j2k && parameters) { - j2k->m_cp.m_specific_param.m_dec.m_layer = parameters->cp_layer; - j2k->m_cp.m_specific_param.m_dec.m_reduce = parameters->cp_reduce; - -#ifdef USE_JPWL - j2k->m_cp.correct = parameters->jpwl_correct; - j2k->m_cp.exp_comps = parameters->jpwl_exp_comps; - j2k->m_cp.max_tiles = parameters->jpwl_max_tiles; -#endif /* USE_JPWL */ - } -} - -/* ----------------------------------------------------------------------- */ -/* J2K encoder interface */ -/* ----------------------------------------------------------------------- */ - -opj_j2k_t* opj_j2k_create_compress(void) -{ - opj_j2k_t *l_j2k = (opj_j2k_t*) opj_malloc(sizeof(opj_j2k_t)); - if (!l_j2k) { - return NULL; - } - - memset(l_j2k,0,sizeof(opj_j2k_t)); - - l_j2k->m_is_decoder = 0; - l_j2k->m_cp.m_is_decoder = 0; - - l_j2k->m_specific_param.m_encoder.m_header_tile_data = (OPJ_BYTE *) opj_malloc(OPJ_J2K_DEFAULT_HEADER_SIZE); - if (! l_j2k->m_specific_param.m_encoder.m_header_tile_data) { - opj_j2k_destroy(l_j2k); - return NULL; - } - - l_j2k->m_specific_param.m_encoder.m_header_tile_data_size = OPJ_J2K_DEFAULT_HEADER_SIZE; - - /* validation list creation*/ - l_j2k->m_validation_list = opj_procedure_list_create(); - if (! l_j2k->m_validation_list) { - opj_j2k_destroy(l_j2k); - return NULL; - } - - /* execution list creation*/ - l_j2k->m_procedure_list = opj_procedure_list_create(); - if (! l_j2k->m_procedure_list) { - opj_j2k_destroy(l_j2k); - return NULL; - } - - return l_j2k; -} - -int opj_j2k_initialise_4K_poc(opj_poc_t *POC, int numres){ - POC[0].tile = 1; - POC[0].resno0 = 0; - POC[0].compno0 = 0; - POC[0].layno1 = 1; - POC[0].resno1 = (OPJ_UINT32)(numres-1); - POC[0].compno1 = 3; - POC[0].prg1 = OPJ_CPRL; - POC[1].tile = 1; - POC[1].resno0 = (OPJ_UINT32)(numres-1); - POC[1].compno0 = 0; - POC[1].layno1 = 1; - POC[1].resno1 = (OPJ_UINT32)numres; - POC[1].compno1 = 3; - POC[1].prg1 = OPJ_CPRL; - return 2; -} - -void opj_j2k_set_cinema_parameters(opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager) -{ - /* Configure cinema parameters */ - OPJ_FLOAT32 max_rate = 0; - OPJ_FLOAT32 temp_rate = 0; - int i; - - /* profile (Rsiz) */ - switch (parameters->cp_cinema){ - case OPJ_CINEMA2K_24: - case OPJ_CINEMA2K_48: - parameters->cp_rsiz = OPJ_CINEMA2K; - break; - case OPJ_CINEMA4K_24: - parameters->cp_rsiz = OPJ_CINEMA4K; - break; - case OPJ_OFF: - assert(0); - break; - } - - /* No tiling */ - parameters->tile_size_on = OPJ_FALSE; - parameters->cp_tdx=1; - parameters->cp_tdy=1; - - /* One tile part for each component */ - parameters->tp_flag = 'C'; - parameters->tp_on = 1; - - /* Tile and Image shall be at (0,0) */ - parameters->cp_tx0 = 0; - parameters->cp_ty0 = 0; - parameters->image_offset_x0 = 0; - parameters->image_offset_y0 = 0; - - /* Codeblock size= 32*32 */ - parameters->cblockw_init = 32; - parameters->cblockh_init = 32; - - /* Codeblock style: no mode switch enabled */ - parameters->mode = 0; - - /* No ROI */ - parameters->roi_compno = -1; - - /* No subsampling */ - parameters->subsampling_dx = 1; - parameters->subsampling_dy = 1; - - /* 9-7 transform */ - parameters->irreversible = 1; - - /* Number of layers */ - if (parameters->tcp_numlayers > 1){ - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-3 and 4 (2k/4k dc profile) requires:\n" - "1 single quality layer" - "-> Number of layers forced to 1 (rather than %d)\n", - parameters->tcp_numlayers); - parameters->tcp_numlayers = 1; - } - - /* Resolution levels */ - switch (parameters->cp_cinema){ - case OPJ_CINEMA2K_24: - case OPJ_CINEMA2K_48: - if(parameters->numresolution > 6){ - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-3 (2k dc profile) requires:\n" - "Number of decomposition levels <= 5\n" - "-> Number of decomposition levels forced to 5 (rather than %d)\n", - parameters->numresolution+1); - parameters->numresolution = 6; - } - break; - case OPJ_CINEMA4K_24: - if(parameters->numresolution < 2){ - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-4 (4k dc profile) requires:\n" - "Number of decomposition levels >= 1 && <= 6\n" - "-> Number of decomposition levels forced to 1 (rather than %d)\n", - parameters->numresolution+1); - parameters->numresolution = 1; - }else if(parameters->numresolution > 7){ - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-4 (4k dc profile) requires:\n" - "Number of decomposition levels >= 1 && <= 6\n" - "-> Number of decomposition levels forced to 6 (rather than %d)\n", - parameters->numresolution+1); - parameters->numresolution = 7; - } - break; - default : - break; - } - - /* Precincts */ - parameters->csty |= 0x01; - parameters->res_spec = parameters->numresolution-1; - for (i = 0; ires_spec; i++) { - parameters->prcw_init[i] = 256; - parameters->prch_init[i] = 256; - } - - /* The progression order shall be CPRL */ - parameters->prog_order = OPJ_CPRL; - - /* Progression order changes for 4K, disallowed for 2K */ - if (parameters->cp_cinema == OPJ_CINEMA4K_24) { - parameters->numpocs = (OPJ_UINT32)opj_j2k_initialise_4K_poc(parameters->POC,parameters->numresolution); - } else { - parameters->numpocs = 0; - } - - /* Limited bit-rate */ - parameters->cp_disto_alloc = 1; - switch (parameters->cp_cinema){ - case OPJ_CINEMA2K_24: - case OPJ_CINEMA4K_24: - max_rate = (OPJ_FLOAT32) (image->numcomps * image->comps[0].w * image->comps[0].h * image->comps[0].prec)/ - (OPJ_FLOAT32)(CINEMA_24_CS * 8 * image->comps[0].dx * image->comps[0].dy); - if (parameters->tcp_rates[0] == 0){ - parameters->tcp_rates[0] = max_rate; - }else{ - temp_rate =(OPJ_FLOAT32)(image->numcomps * image->comps[0].w * image->comps[0].h * image->comps[0].prec)/ - (parameters->tcp_rates[0] * 8 * (OPJ_FLOAT32)image->comps[0].dx * (OPJ_FLOAT32)image->comps[0].dy); - if (temp_rate > CINEMA_24_CS ){ - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-3 and 4 (2k/4k dc profile) requires:\n" - "Maximum 1302083 compressed bytes @ 24fps\n" - "-> Specified rate (%3.1f) exceeds this limit. Rate will be forced to %3.1f.\n", - parameters->tcp_rates[0], max_rate); - parameters->tcp_rates[0]= max_rate; - }else{ - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-3 and 4 (2k/4k dc profile):\n" - "INFO : Specified rate (%3.1f) is below the 2k/4k limit @ 24fps.\n", - parameters->tcp_rates[0]); - } - } - parameters->max_comp_size = COMP_24_CS; - break; - case OPJ_CINEMA2K_48: - max_rate = ((float) (image->numcomps * image->comps[0].w * image->comps[0].h * image->comps[0].prec))/ - (float)(CINEMA_48_CS * 8 * image->comps[0].dx * image->comps[0].dy); - if (parameters->tcp_rates[0] == 0){ - parameters->tcp_rates[0] = max_rate; - }else{ - temp_rate =((float) (image->numcomps * image->comps[0].w * image->comps[0].h * image->comps[0].prec))/ - (parameters->tcp_rates[0] * 8 * (float)image->comps[0].dx * (float)image->comps[0].dy); - if (temp_rate > CINEMA_48_CS ){ - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-3 (2k dc profile) requires:\n" - "Maximum 651041 compressed bytes @ 48fps\n" - "-> Specified rate (%3.1f) exceeds this limit. Rate will be forced to %3.1f.\n", - parameters->tcp_rates[0], max_rate); - parameters->tcp_rates[0]= max_rate; - }else{ - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-3 (2k dc profile):\n" - "INFO : Specified rate (%3.1f) is below the 2k limit @ 48 fps.\n", - parameters->tcp_rates[0]); - } - } - parameters->max_comp_size = COMP_48_CS; - break; - default: - break; - } -} - -OPJ_BOOL opj_j2k_is_cinema_compliant(opj_image_t *image, OPJ_CINEMA_MODE cinema_mode, opj_event_mgr_t *p_manager) -{ - OPJ_UINT32 i; - - /* Number of components */ - if (image->numcomps != 3){ - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-3 (2k dc profile) requires:\n" - "3 components" - "-> Number of components of input image (%d) is not compliant\n" - "-> Non-profile-3 codestream will be generated\n", - image->numcomps); - return OPJ_FALSE; - } - - /* Bitdepth */ - for (i = 0; i < image->numcomps; i++) { - if ((image->comps[i].bpp != 12) | (image->comps[i].sgnd)){ - char signed_str[] = "signed"; - char unsigned_str[] = "unsigned"; - char *tmp_str = image->comps[i].sgnd?signed_str:unsigned_str; - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-3 (2k dc profile) requires:\n" - "Precision of each component shall be 12 bits unsigned" - "-> At least component %d of input image (%d bits, %s) is not compliant\n" - "-> Non-profile-3 codestream will be generated\n", - i,image->comps[i].bpp, tmp_str); - return OPJ_FALSE; - } - } - - /* Image size */ - switch (cinema_mode){ - case OPJ_CINEMA2K_24: - case OPJ_CINEMA2K_48: - if (((image->comps[0].w > 2048) | (image->comps[0].h > 1080))){ - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-3 (2k dc profile) requires:\n" - "width <= 2048 and height <= 1080\n" - "-> Input image size %d x %d is not compliant\n" - "-> Non-profile-3 codestream will be generated\n", - image->comps[0].w,image->comps[0].h); - return OPJ_FALSE; - } - break; - case OPJ_CINEMA4K_24: - if (((image->comps[0].w > 4096) | (image->comps[0].h > 2160))){ - opj_event_msg(p_manager, EVT_WARNING, - "JPEG 2000 Profile-4 (4k dc profile) requires:\n" - "width <= 4096 and height <= 2160\n" - "-> Image size %d x %d is not compliant\n" - "-> Non-profile-4 codestream will be generated\n", - image->comps[0].w,image->comps[0].h); - return OPJ_FALSE; - } - break; - default : - break; - } - - return OPJ_TRUE; -} - -void opj_j2k_setup_encoder( opj_j2k_t *p_j2k, - opj_cparameters_t *parameters, - opj_image_t *image, - opj_event_mgr_t * p_manager) -{ - OPJ_UINT32 i, j, tileno, numpocs_tile; - opj_cp_t *cp = 00; - - if(!p_j2k || !parameters || ! image) { - return; - } - - /* keep a link to cp so that we can destroy it later in j2k_destroy_compress */ - cp = &(p_j2k->m_cp); - - /* set default values for cp */ - cp->tw = 1; - cp->th = 1; - - /* set cinema parameters if required */ - if (parameters->cp_cinema){ - opj_j2k_set_cinema_parameters(parameters,image,p_manager); - if (!opj_j2k_is_cinema_compliant(image,parameters->cp_cinema,p_manager)) { - parameters->cp_rsiz = OPJ_STD_RSIZ; - } - } - - /* - copy user encoding parameters - */ - cp->m_specific_param.m_enc.m_cinema = parameters->cp_cinema; - cp->m_specific_param.m_enc.m_max_comp_size = (OPJ_UINT32)parameters->max_comp_size; - cp->rsiz = parameters->cp_rsiz; - cp->m_specific_param.m_enc.m_disto_alloc = (OPJ_UINT32)parameters->cp_disto_alloc & 1u; - cp->m_specific_param.m_enc.m_fixed_alloc = (OPJ_UINT32)parameters->cp_fixed_alloc & 1u; - cp->m_specific_param.m_enc.m_fixed_quality = (OPJ_UINT32)parameters->cp_fixed_quality & 1u; - - /* mod fixed_quality */ - if (parameters->cp_fixed_alloc && parameters->cp_matrice) { - size_t array_size = (size_t)parameters->tcp_numlayers * (size_t)parameters->numresolution * 3 * sizeof(OPJ_INT32); - cp->m_specific_param.m_enc.m_matrice = (OPJ_INT32 *) opj_malloc(array_size); - memcpy(cp->m_specific_param.m_enc.m_matrice, parameters->cp_matrice, array_size); - } - - /* tiles */ - cp->tdx = (OPJ_UINT32)parameters->cp_tdx; - cp->tdy = (OPJ_UINT32)parameters->cp_tdy; - - /* tile offset */ - cp->tx0 = (OPJ_UINT32)parameters->cp_tx0; - cp->ty0 = (OPJ_UINT32)parameters->cp_ty0; - - /* comment string */ - if(parameters->cp_comment) { - cp->comment = (char*)opj_malloc(strlen(parameters->cp_comment) + 1); - if(cp->comment) { - strcpy(cp->comment, parameters->cp_comment); - } - } - - /* - calculate other encoding parameters - */ - - if (parameters->tile_size_on) { - cp->tw = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)(image->x1 - cp->tx0), (OPJ_INT32)cp->tdx); - cp->th = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)(image->y1 - cp->ty0), (OPJ_INT32)cp->tdy); - } else { - cp->tdx = image->x1 - cp->tx0; - cp->tdy = image->y1 - cp->ty0; - } - - if (parameters->tp_on) { - cp->m_specific_param.m_enc.m_tp_flag = (OPJ_BYTE)parameters->tp_flag; - cp->m_specific_param.m_enc.m_tp_on = 1; - } - -#ifdef USE_JPWL - /* - calculate JPWL encoding parameters - */ - - if (parameters->jpwl_epc_on) { - OPJ_INT32 i; - - /* set JPWL on */ - cp->epc_on = OPJ_TRUE; - cp->info_on = OPJ_FALSE; /* no informative technique */ - - /* set EPB on */ - if ((parameters->jpwl_hprot_MH > 0) || (parameters->jpwl_hprot_TPH[0] > 0)) { - cp->epb_on = OPJ_TRUE; - - cp->hprot_MH = parameters->jpwl_hprot_MH; - for (i = 0; i < JPWL_MAX_NO_TILESPECS; i++) { - cp->hprot_TPH_tileno[i] = parameters->jpwl_hprot_TPH_tileno[i]; - cp->hprot_TPH[i] = parameters->jpwl_hprot_TPH[i]; - } - /* if tile specs are not specified, copy MH specs */ - if (cp->hprot_TPH[0] == -1) { - cp->hprot_TPH_tileno[0] = 0; - cp->hprot_TPH[0] = parameters->jpwl_hprot_MH; - } - for (i = 0; i < JPWL_MAX_NO_PACKSPECS; i++) { - cp->pprot_tileno[i] = parameters->jpwl_pprot_tileno[i]; - cp->pprot_packno[i] = parameters->jpwl_pprot_packno[i]; - cp->pprot[i] = parameters->jpwl_pprot[i]; - } - } - - /* set ESD writing */ - if ((parameters->jpwl_sens_size == 1) || (parameters->jpwl_sens_size == 2)) { - cp->esd_on = OPJ_TRUE; - - cp->sens_size = parameters->jpwl_sens_size; - cp->sens_addr = parameters->jpwl_sens_addr; - cp->sens_range = parameters->jpwl_sens_range; - - cp->sens_MH = parameters->jpwl_sens_MH; - for (i = 0; i < JPWL_MAX_NO_TILESPECS; i++) { - cp->sens_TPH_tileno[i] = parameters->jpwl_sens_TPH_tileno[i]; - cp->sens_TPH[i] = parameters->jpwl_sens_TPH[i]; - } - } - - /* always set RED writing to false: we are at the encoder */ - cp->red_on = OPJ_FALSE; - - } else { - cp->epc_on = OPJ_FALSE; - } -#endif /* USE_JPWL */ - - /* initialize the mutiple tiles */ - /* ---------------------------- */ - cp->tcps = (opj_tcp_t*) opj_calloc(cp->tw * cp->th, sizeof(opj_tcp_t)); - if (parameters->numpocs) { - /* initialisation of POC */ - opj_j2k_check_poc_val(parameters->POC,parameters->numpocs, (OPJ_UINT32)parameters->numresolution, image->numcomps, (OPJ_UINT32)parameters->tcp_numlayers, p_manager); - /* TODO MSD use the return value*/ - } - - for (tileno = 0; tileno < cp->tw * cp->th; tileno++) { - opj_tcp_t *tcp = &cp->tcps[tileno]; - tcp->numlayers = (OPJ_UINT32)parameters->tcp_numlayers; - - for (j = 0; j < tcp->numlayers; j++) { - if(cp->m_specific_param.m_enc.m_cinema){ - if (cp->m_specific_param.m_enc.m_fixed_quality) { - tcp->distoratio[j] = parameters->tcp_distoratio[j]; - } - tcp->rates[j] = parameters->tcp_rates[j]; - }else{ - if (cp->m_specific_param.m_enc.m_fixed_quality) { /* add fixed_quality */ - tcp->distoratio[j] = parameters->tcp_distoratio[j]; - } else { - tcp->rates[j] = parameters->tcp_rates[j]; - } - } - } - - tcp->csty = (OPJ_UINT32)parameters->csty; - tcp->prg = parameters->prog_order; - tcp->mct = (OPJ_UINT32)parameters->tcp_mct; - - numpocs_tile = 0; - tcp->POC = 0; - - if (parameters->numpocs) { - /* initialisation of POC */ - tcp->POC = 1; - for (i = 0; i < parameters->numpocs; i++) { - if (tileno + 1 == parameters->POC[i].tile ) { - opj_poc_t *tcp_poc = &tcp->pocs[numpocs_tile]; - - tcp_poc->resno0 = parameters->POC[numpocs_tile].resno0; - tcp_poc->compno0 = parameters->POC[numpocs_tile].compno0; - tcp_poc->layno1 = parameters->POC[numpocs_tile].layno1; - tcp_poc->resno1 = parameters->POC[numpocs_tile].resno1; - tcp_poc->compno1 = parameters->POC[numpocs_tile].compno1; - tcp_poc->prg1 = parameters->POC[numpocs_tile].prg1; - tcp_poc->tile = parameters->POC[numpocs_tile].tile; - - numpocs_tile++; - } - } - - tcp->numpocs = numpocs_tile -1 ; - }else{ - tcp->numpocs = 0; - } - - tcp->tccps = (opj_tccp_t*) opj_calloc(image->numcomps, sizeof(opj_tccp_t)); - - if (parameters->mct_data) { - - OPJ_UINT32 lMctSize = image->numcomps * image->numcomps * (OPJ_UINT32)sizeof(OPJ_FLOAT32); - OPJ_FLOAT32 * lTmpBuf = (OPJ_FLOAT32*)opj_malloc(lMctSize); - OPJ_INT32 * l_dc_shift = (OPJ_INT32 *) ((OPJ_BYTE *) parameters->mct_data + lMctSize); - - tcp->mct = 2; - tcp->m_mct_coding_matrix = (OPJ_FLOAT32*)opj_malloc(lMctSize); - memcpy(tcp->m_mct_coding_matrix,parameters->mct_data,lMctSize); - memcpy(lTmpBuf,parameters->mct_data,lMctSize); - - tcp->m_mct_decoding_matrix = (OPJ_FLOAT32*)opj_malloc(lMctSize); - assert(opj_matrix_inversion_f(lTmpBuf,(tcp->m_mct_decoding_matrix),image->numcomps)); - - tcp->mct_norms = (OPJ_FLOAT64*) - opj_malloc(image->numcomps * sizeof(OPJ_FLOAT64)); - - opj_calculate_norms(tcp->mct_norms,image->numcomps,tcp->m_mct_decoding_matrix); - opj_free(lTmpBuf); - - for (i = 0; i < image->numcomps; i++) { - opj_tccp_t *tccp = &tcp->tccps[i]; - tccp->m_dc_level_shift = l_dc_shift[i]; - } - - opj_j2k_setup_mct_encoding(tcp,image); - } - else { - for (i = 0; i < image->numcomps; i++) { - opj_tccp_t *tccp = &tcp->tccps[i]; - opj_image_comp_t * l_comp = &(image->comps[i]); - - if (! l_comp->sgnd) { - tccp->m_dc_level_shift = 1 << (l_comp->prec - 1); - } - } - } - - for (i = 0; i < image->numcomps; i++) { - opj_tccp_t *tccp = &tcp->tccps[i]; - - tccp->csty = parameters->csty & 0x01; /* 0 => one precinct || 1 => custom precinct */ - tccp->numresolutions = (OPJ_UINT32)parameters->numresolution; - tccp->cblkw = (OPJ_UINT32)opj_int_floorlog2(parameters->cblockw_init); - tccp->cblkh = (OPJ_UINT32)opj_int_floorlog2(parameters->cblockh_init); - tccp->cblksty = (OPJ_UINT32)parameters->mode; - tccp->qmfbid = parameters->irreversible ? 0 : 1; - tccp->qntsty = parameters->irreversible ? J2K_CCP_QNTSTY_SEQNT : J2K_CCP_QNTSTY_NOQNT; - tccp->numgbits = 2; - - if ((OPJ_INT32)i == parameters->roi_compno) { - tccp->roishift = parameters->roi_shift; - } else { - tccp->roishift = 0; - } - - if (parameters->csty & J2K_CCP_CSTY_PRT) { - OPJ_INT32 p = 0, it_res; - assert( tccp->numresolutions > 0 ); - for (it_res = (OPJ_INT32)tccp->numresolutions - 1; it_res >= 0; it_res--) { - if (p < parameters->res_spec) { - - if (parameters->prcw_init[p] < 1) { - tccp->prcw[it_res] = 1; - } else { - tccp->prcw[it_res] = (OPJ_UINT32)opj_int_floorlog2(parameters->prcw_init[p]); - } - - if (parameters->prch_init[p] < 1) { - tccp->prch[it_res] = 1; - }else { - tccp->prch[it_res] = (OPJ_UINT32)opj_int_floorlog2(parameters->prch_init[p]); - } - - } else { - OPJ_INT32 res_spec = parameters->res_spec; - OPJ_INT32 size_prcw = 0; - OPJ_INT32 size_prch = 0; - - assert(res_spec>0); /* issue 189 */ - size_prcw = parameters->prcw_init[res_spec - 1] >> (p - (res_spec - 1)); - size_prch = parameters->prch_init[res_spec - 1] >> (p - (res_spec - 1)); - - - if (size_prcw < 1) { - tccp->prcw[it_res] = 1; - } else { - tccp->prcw[it_res] = (OPJ_UINT32)opj_int_floorlog2(size_prcw); - } - - if (size_prch < 1) { - tccp->prch[it_res] = 1; - } else { - tccp->prch[it_res] = (OPJ_UINT32)opj_int_floorlog2(size_prch); - } - } - p++; - /*printf("\nsize precinct for level %d : %d,%d\n", it_res,tccp->prcw[it_res], tccp->prch[it_res]); */ - } /*end for*/ - } else { - for (j = 0; j < tccp->numresolutions; j++) { - tccp->prcw[j] = 15; - tccp->prch[j] = 15; - } - } - - opj_dwt_calc_explicit_stepsizes(tccp, image->comps[i].prec); - } - } - - if (parameters->mct_data) { - opj_free(parameters->mct_data); - parameters->mct_data = 00; - } -} - -static OPJ_BOOL opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len) -{ - assert(cstr_index != 00); - - /* expand the list? */ - if ((cstr_index->marknum + 1) > cstr_index->maxmarknum) { - opj_marker_info_t *new_marker; - cstr_index->maxmarknum = (OPJ_UINT32)(100 + (OPJ_FLOAT32) cstr_index->maxmarknum); - new_marker = (opj_marker_info_t *) opj_realloc(cstr_index->marker, cstr_index->maxmarknum *sizeof(opj_marker_info_t)); - if (! new_marker) { - opj_free(cstr_index->marker); - cstr_index->marker = NULL; - cstr_index->maxmarknum = 0; - cstr_index->marknum = 0; - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to add mh marker\n"); */ - return OPJ_FALSE; - } - cstr_index->marker = new_marker; - } - - /* add the marker */ - cstr_index->marker[cstr_index->marknum].type = (OPJ_UINT16)type; - cstr_index->marker[cstr_index->marknum].pos = (OPJ_INT32)pos; - cstr_index->marker[cstr_index->marknum].len = (OPJ_INT32)len; - cstr_index->marknum++; - return OPJ_TRUE; -} - -static OPJ_BOOL opj_j2k_add_tlmarker(OPJ_UINT32 tileno, opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len) -{ - assert(cstr_index != 00); - assert(cstr_index->tile_index != 00); - - /* expand the list? */ - if ((cstr_index->tile_index[tileno].marknum + 1) > cstr_index->tile_index[tileno].maxmarknum) { - opj_marker_info_t *new_marker; - cstr_index->tile_index[tileno].maxmarknum = (OPJ_UINT32)(100 + (OPJ_FLOAT32) cstr_index->tile_index[tileno].maxmarknum); - new_marker = (opj_marker_info_t *) opj_realloc( - cstr_index->tile_index[tileno].marker, - cstr_index->tile_index[tileno].maxmarknum *sizeof(opj_marker_info_t)); - if (! new_marker) { - opj_free(cstr_index->tile_index[tileno].marker); - cstr_index->tile_index[tileno].marker = NULL; - cstr_index->tile_index[tileno].maxmarknum = 0; - cstr_index->tile_index[tileno].marknum = 0; - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to add tl marker\n"); */ - return OPJ_FALSE; - } - cstr_index->tile_index[tileno].marker = new_marker; - } - - /* add the marker */ - cstr_index->tile_index[tileno].marker[cstr_index->tile_index[tileno].marknum].type = (OPJ_UINT16)type; - cstr_index->tile_index[tileno].marker[cstr_index->tile_index[tileno].marknum].pos = (OPJ_INT32)pos; - cstr_index->tile_index[tileno].marker[cstr_index->tile_index[tileno].marknum].len = (OPJ_INT32)len; - cstr_index->tile_index[tileno].marknum++; - - if (type == J2K_MS_SOT) { - OPJ_UINT32 l_current_tile_part = cstr_index->tile_index[tileno].current_tpsno; - - if (cstr_index->tile_index[tileno].tp_index) - cstr_index->tile_index[tileno].tp_index[l_current_tile_part].start_pos = pos; - - } - return OPJ_TRUE; -} - -/* - * ----------------------------------------------------------------------- - * ----------------------------------------------------------------------- - * ----------------------------------------------------------------------- - */ - -OPJ_BOOL opj_j2k_end_decompress(opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - (void)p_j2k; - (void)p_stream; - (void)p_manager; - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_read_header( opj_stream_private_t *p_stream, - opj_j2k_t* p_j2k, - opj_image_t** p_image, - opj_event_mgr_t* p_manager ) -{ - /* preconditions */ - assert(p_j2k != 00); - assert(p_stream != 00); - assert(p_manager != 00); - - /* create an empty image header */ - p_j2k->m_private_image = opj_image_create0(); - if (! p_j2k->m_private_image) { - return OPJ_FALSE; - } - - /* customization of the validation */ - opj_j2k_setup_decoding_validation(p_j2k); - - /* validation of the parameters codec */ - if (! opj_j2k_exec(p_j2k, p_j2k->m_validation_list, p_stream,p_manager)) { - opj_image_destroy(p_j2k->m_private_image); - p_j2k->m_private_image = NULL; - return OPJ_FALSE; - } - - /* customization of the encoding */ - opj_j2k_setup_header_reading(p_j2k); - - /* read header */ - if (! opj_j2k_exec (p_j2k,p_j2k->m_procedure_list,p_stream,p_manager)) { - opj_image_destroy(p_j2k->m_private_image); - p_j2k->m_private_image = NULL; - return OPJ_FALSE; - } - - *p_image = opj_image_create0(); - if (! (*p_image)) { - return OPJ_FALSE; - } - - /* Copy codestream image information to the output image */ - opj_copy_image_header(p_j2k->m_private_image, *p_image); - - /*Allocate and initialize some elements of codestrem index*/ - if (!opj_j2k_allocate_tile_element_cstr_index(p_j2k)){ - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -void opj_j2k_setup_header_reading (opj_j2k_t *p_j2k) -{ - /* preconditions*/ - assert(p_j2k != 00); - - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_read_header_procedure); - - /* DEVELOPER CORNER, add your custom procedures */ - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_copy_default_tcp_and_create_tcd); - -} - -void opj_j2k_setup_decoding_validation (opj_j2k_t *p_j2k) -{ - /* preconditions*/ - assert(p_j2k != 00); - - opj_procedure_list_add_procedure(p_j2k->m_validation_list, (opj_procedure)opj_j2k_build_decoder); - opj_procedure_list_add_procedure(p_j2k->m_validation_list, (opj_procedure)opj_j2k_decoding_validation); - /* DEVELOPER CORNER, add your custom validation procedure */ - -} - -OPJ_BOOL opj_j2k_mct_validation ( opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - OPJ_BOOL l_is_valid = OPJ_TRUE; - OPJ_UINT32 i,j; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_stream != 00); - assert(p_manager != 00); - - if ((p_j2k->m_cp.rsiz & 0x8200) == 0x8200) { - OPJ_UINT32 l_nb_tiles = p_j2k->m_cp.th * p_j2k->m_cp.tw; - opj_tcp_t * l_tcp = p_j2k->m_cp.tcps; - - for (i=0;imct == 2) { - opj_tccp_t * l_tccp = l_tcp->tccps; - l_is_valid &= (l_tcp->m_mct_coding_matrix != 00); - - for (j=0;jm_private_image->numcomps;++j) { - l_is_valid &= ! (l_tccp->qmfbid & 1); - ++l_tccp; - } - } - ++l_tcp; - } - } - - return l_is_valid; -} - -OPJ_BOOL opj_j2k_setup_mct_encoding(opj_tcp_t * p_tcp, opj_image_t * p_image) -{ - OPJ_UINT32 i; - OPJ_UINT32 l_indix = 1; - opj_mct_data_t * l_mct_deco_data = 00,* l_mct_offset_data = 00; - opj_simple_mcc_decorrelation_data_t * l_mcc_data; - OPJ_UINT32 l_mct_size,l_nb_elem; - OPJ_FLOAT32 * l_data, * l_current_data; - opj_tccp_t * l_tccp; - - /* preconditions */ - assert(p_tcp != 00); - - if (p_tcp->mct != 2) { - return OPJ_TRUE; - } - - if (p_tcp->m_mct_decoding_matrix) { - if (p_tcp->m_nb_mct_records == p_tcp->m_nb_max_mct_records) { - opj_mct_data_t *new_mct_records; - p_tcp->m_nb_max_mct_records += OPJ_J2K_MCT_DEFAULT_NB_RECORDS; - - new_mct_records = (opj_mct_data_t *) opj_realloc(p_tcp->m_mct_records, p_tcp->m_nb_max_mct_records * sizeof(opj_mct_data_t)); - if (! new_mct_records) { - opj_free(p_tcp->m_mct_records); - p_tcp->m_mct_records = NULL; - p_tcp->m_nb_max_mct_records = 0; - p_tcp->m_nb_mct_records = 0; - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to setup mct encoding\n"); */ - return OPJ_FALSE; - } - p_tcp->m_mct_records = new_mct_records; - l_mct_deco_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; - - memset(l_mct_deco_data ,0,(p_tcp->m_nb_max_mct_records - p_tcp->m_nb_mct_records) * sizeof(opj_mct_data_t)); - } - l_mct_deco_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; - - if (l_mct_deco_data->m_data) { - opj_free(l_mct_deco_data->m_data); - l_mct_deco_data->m_data = 00; - } - - l_mct_deco_data->m_index = l_indix++; - l_mct_deco_data->m_array_type = MCT_TYPE_DECORRELATION; - l_mct_deco_data->m_element_type = MCT_TYPE_FLOAT; - l_nb_elem = p_image->numcomps * p_image->numcomps; - l_mct_size = l_nb_elem * MCT_ELEMENT_SIZE[l_mct_deco_data->m_element_type]; - l_mct_deco_data->m_data = (OPJ_BYTE*)opj_malloc(l_mct_size ); - - if (! l_mct_deco_data->m_data) { - return OPJ_FALSE; - } - - j2k_mct_write_functions_from_float[l_mct_deco_data->m_element_type](p_tcp->m_mct_decoding_matrix,l_mct_deco_data->m_data,l_nb_elem); - - l_mct_deco_data->m_data_size = l_mct_size; - ++p_tcp->m_nb_mct_records; - } - - if (p_tcp->m_nb_mct_records == p_tcp->m_nb_max_mct_records) { - opj_mct_data_t *new_mct_records; - p_tcp->m_nb_max_mct_records += OPJ_J2K_MCT_DEFAULT_NB_RECORDS; - new_mct_records = (opj_mct_data_t *) opj_realloc(p_tcp->m_mct_records, p_tcp->m_nb_max_mct_records * sizeof(opj_mct_data_t)); - if (! new_mct_records) { - opj_free(p_tcp->m_mct_records); - p_tcp->m_mct_records = NULL; - p_tcp->m_nb_max_mct_records = 0; - p_tcp->m_nb_mct_records = 0; - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to setup mct encoding\n"); */ - return OPJ_FALSE; - } - p_tcp->m_mct_records = new_mct_records; - l_mct_offset_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; - - memset(l_mct_offset_data ,0,(p_tcp->m_nb_max_mct_records - p_tcp->m_nb_mct_records) * sizeof(opj_mct_data_t)); - - if (l_mct_deco_data) { - l_mct_deco_data = l_mct_offset_data - 1; - } - } - - l_mct_offset_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; - - if (l_mct_offset_data->m_data) { - opj_free(l_mct_offset_data->m_data); - l_mct_offset_data->m_data = 00; - } - - l_mct_offset_data->m_index = l_indix++; - l_mct_offset_data->m_array_type = MCT_TYPE_OFFSET; - l_mct_offset_data->m_element_type = MCT_TYPE_FLOAT; - l_nb_elem = p_image->numcomps; - l_mct_size = l_nb_elem * MCT_ELEMENT_SIZE[l_mct_offset_data->m_element_type]; - l_mct_offset_data->m_data = (OPJ_BYTE*)opj_malloc(l_mct_size ); - - if (! l_mct_offset_data->m_data) { - return OPJ_FALSE; - } - - l_data = (OPJ_FLOAT32*)opj_malloc(l_nb_elem * sizeof(OPJ_FLOAT32)); - if (! l_data) { - opj_free(l_mct_offset_data->m_data); - l_mct_offset_data->m_data = 00; - return OPJ_FALSE; - } - - l_tccp = p_tcp->tccps; - l_current_data = l_data; - - for (i=0;im_dc_level_shift); - ++l_tccp; - } - - j2k_mct_write_functions_from_float[l_mct_offset_data->m_element_type](l_data,l_mct_offset_data->m_data,l_nb_elem); - - opj_free(l_data); - - l_mct_offset_data->m_data_size = l_mct_size; - - ++p_tcp->m_nb_mct_records; - - if (p_tcp->m_nb_mcc_records == p_tcp->m_nb_max_mcc_records) { - opj_simple_mcc_decorrelation_data_t *new_mcc_records; - p_tcp->m_nb_max_mcc_records += OPJ_J2K_MCT_DEFAULT_NB_RECORDS; - new_mcc_records = (opj_simple_mcc_decorrelation_data_t *) opj_realloc( - p_tcp->m_mcc_records, p_tcp->m_nb_max_mcc_records * sizeof(opj_simple_mcc_decorrelation_data_t)); - if (! new_mcc_records) { - opj_free(p_tcp->m_mcc_records); - p_tcp->m_mcc_records = NULL; - p_tcp->m_nb_max_mcc_records = 0; - p_tcp->m_nb_mcc_records = 0; - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to setup mct encoding\n"); */ - return OPJ_FALSE; - } - p_tcp->m_mcc_records = new_mcc_records; - l_mcc_data = p_tcp->m_mcc_records + p_tcp->m_nb_mcc_records; - memset(l_mcc_data ,0,(p_tcp->m_nb_max_mcc_records - p_tcp->m_nb_mcc_records) * sizeof(opj_simple_mcc_decorrelation_data_t)); - - } - - l_mcc_data = p_tcp->m_mcc_records + p_tcp->m_nb_mcc_records; - l_mcc_data->m_decorrelation_array = l_mct_deco_data; - l_mcc_data->m_is_irreversible = 1; - l_mcc_data->m_nb_comps = p_image->numcomps; - l_mcc_data->m_index = l_indix++; - l_mcc_data->m_offset_array = l_mct_offset_data; - ++p_tcp->m_nb_mcc_records; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_build_decoder (opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - /* add here initialization of cp - copy paste of setup_decoder */ - (void)p_j2k; - (void)p_stream; - (void)p_manager; - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_build_encoder (opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - /* add here initialization of cp - copy paste of setup_encoder */ - (void)p_j2k; - (void)p_stream; - (void)p_manager; - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_encoding_validation ( opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - OPJ_BOOL l_is_valid = OPJ_TRUE; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_stream != 00); - assert(p_manager != 00); - - /* STATE checking */ - /* make sure the state is at 0 */ - l_is_valid &= (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NONE); - - /* POINTER validation */ - /* make sure a p_j2k codec is present */ - l_is_valid &= (p_j2k->m_procedure_list != 00); - /* make sure a validation list is present */ - l_is_valid &= (p_j2k->m_validation_list != 00); - - if ((p_j2k->m_cp.tdx) < (OPJ_UINT32) (1 << p_j2k->m_cp.tcps->tccps->numresolutions)) { - opj_event_msg(p_manager, EVT_ERROR, "Number of resolutions is too high in comparison to the size of tiles\n"); - return OPJ_FALSE; - } - - if ((p_j2k->m_cp.tdy) < (OPJ_UINT32) (1 << p_j2k->m_cp.tcps->tccps->numresolutions)) { - opj_event_msg(p_manager, EVT_ERROR, "Number of resolutions is too high in comparison to the size of tiles\n"); - return OPJ_FALSE; - } - - /* PARAMETER VALIDATION */ - return l_is_valid; -} - -OPJ_BOOL opj_j2k_decoding_validation ( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - OPJ_BOOL l_is_valid = OPJ_TRUE; - - /* preconditions*/ - assert(p_j2k != 00); - assert(p_stream != 00); - assert(p_manager != 00); - - /* STATE checking */ - /* make sure the state is at 0 */ -#ifdef TODO_MSD - l_is_valid &= (p_j2k->m_specific_param.m_decoder.m_state == J2K_DEC_STATE_NONE); -#endif - l_is_valid &= (p_j2k->m_specific_param.m_decoder.m_state == 0x0000); - - /* POINTER validation */ - /* make sure a p_j2k codec is present */ - /* make sure a procedure list is present */ - l_is_valid &= (p_j2k->m_procedure_list != 00); - /* make sure a validation list is present */ - l_is_valid &= (p_j2k->m_validation_list != 00); - - /* PARAMETER VALIDATION */ - return l_is_valid; -} - -OPJ_BOOL opj_j2k_read_header_procedure( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager) -{ - OPJ_UINT32 l_current_marker; - OPJ_UINT32 l_marker_size; - const opj_dec_memory_marker_handler_t * l_marker_handler = 00; - - /* preconditions */ - assert(p_stream != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - /* We enter in the main header */ - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_MHSOC; - - /* Try to read the SOC marker, the codestream must begin with SOC marker */ - if (! opj_j2k_read_soc(p_j2k,p_stream,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Expected a SOC marker \n"); - return OPJ_FALSE; - } - - /* Try to read 2 bytes (the next marker ID) from stream and copy them into the buffer */ - if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - - /* Read 2 bytes as the new marker ID */ - opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_current_marker,2); - - /* Try to read until the SOT is detected */ - while (l_current_marker != J2K_MS_SOT) { - - /* Check if the current marker ID is valid */ - if (l_current_marker < 0xff00) { - opj_event_msg(p_manager, EVT_ERROR, "We expected read a marker ID (0xff--) instead of %.8x\n", l_current_marker); - return OPJ_FALSE; - } - - /* Get the marker handler from the marker ID */ - l_marker_handler = opj_j2k_get_marker_handler(l_current_marker); - - /* Manage case where marker is unknown */ - if (l_marker_handler->id == J2K_MS_UNK) { - if (! opj_j2k_read_unk(p_j2k, p_stream, &l_current_marker, p_manager)){ - opj_event_msg(p_manager, EVT_ERROR, "Unknow marker have been detected and generated error.\n"); - return OPJ_FALSE; - } - - if (l_current_marker == J2K_MS_SOT) - break; /* SOT marker is detected main header is completely read */ - else /* Get the marker handler from the marker ID */ - l_marker_handler = opj_j2k_get_marker_handler(l_current_marker); - } - - /* Check if the marker is known and if it is the right place to find it */ - if (! (p_j2k->m_specific_param.m_decoder.m_state & l_marker_handler->states) ) { - opj_event_msg(p_manager, EVT_ERROR, "Marker is not compliant with its position\n"); - return OPJ_FALSE; - } - - /* Try to read 2 bytes (the marker size) from stream and copy them into the buffer */ - if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - - /* read 2 bytes as the marker size */ - opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_marker_size,2); - l_marker_size -= 2; /* Subtract the size of the marker ID already read */ - - /* Check if the marker size is compatible with the header data size */ - if (l_marker_size > p_j2k->m_specific_param.m_decoder.m_header_data_size) { - OPJ_BYTE *new_header_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_decoder.m_header_data, l_marker_size); - if (! new_header_data) { - opj_free(p_j2k->m_specific_param.m_decoder.m_header_data); - p_j2k->m_specific_param.m_decoder.m_header_data = NULL; - p_j2k->m_specific_param.m_decoder.m_header_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read header\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_decoder.m_header_data = new_header_data; - p_j2k->m_specific_param.m_decoder.m_header_data_size = l_marker_size; - } - - /* Try to read the rest of the marker segment from stream and copy them into the buffer */ - if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,l_marker_size,p_manager) != l_marker_size) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - - /* Read the marker segment with the correct marker handler */ - if (! (*(l_marker_handler->handler))(p_j2k,p_j2k->m_specific_param.m_decoder.m_header_data,l_marker_size,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Marker handler function failed to read the marker segment\n"); - return OPJ_FALSE; - } - - /* Add the marker to the codestream index*/ - if (OPJ_FALSE == opj_j2k_add_mhmarker( - p_j2k->cstr_index, - l_marker_handler->id, - (OPJ_UINT32) opj_stream_tell(p_stream) - l_marker_size - 4, - l_marker_size + 4 )) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to add mh marker\n"); - return OPJ_FALSE; - } - - /* Try to read 2 bytes (the next marker ID) from stream and copy them into the buffer */ - if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - - /* read 2 bytes as the new marker ID */ - opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_current_marker,2); - } - - opj_event_msg(p_manager, EVT_INFO, "Main header has been correctly decoded.\n"); - - /* Position of the last element if the main header */ - p_j2k->cstr_index->main_head_end = (OPJ_UINT32) opj_stream_tell(p_stream) - 2; - - /* Next step: read a tile-part header */ - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_TPHSOT; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_exec ( opj_j2k_t * p_j2k, - opj_procedure_list_t * p_procedure_list, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - OPJ_BOOL (** l_procedure) (opj_j2k_t * ,opj_stream_private_t *,opj_event_mgr_t *) = 00; - OPJ_BOOL l_result = OPJ_TRUE; - OPJ_UINT32 l_nb_proc, i; - - /* preconditions*/ - assert(p_procedure_list != 00); - assert(p_j2k != 00); - assert(p_stream != 00); - assert(p_manager != 00); - - l_nb_proc = opj_procedure_list_get_nb_procedures(p_procedure_list); - l_procedure = (OPJ_BOOL (**) (opj_j2k_t * ,opj_stream_private_t *,opj_event_mgr_t *)) opj_procedure_list_get_first_procedure(p_procedure_list); - - for (i=0;im_private_image; - l_nb_tiles = p_j2k->m_cp.th * p_j2k->m_cp.tw; - l_tcp = p_j2k->m_cp.tcps; - l_tccp_size = l_image->numcomps * (OPJ_UINT32)sizeof(opj_tccp_t); - l_default_tcp = p_j2k->m_specific_param.m_decoder.m_default_tcp; - l_mct_size = l_image->numcomps * l_image->numcomps * (OPJ_UINT32)sizeof(OPJ_FLOAT32); - - /* For each tile */ - for (i=0; itccps; - /*Copy default coding parameters into the current tile coding parameters*/ - memcpy(l_tcp, l_default_tcp, sizeof(opj_tcp_t)); - /* Initialize some values of the current tile coding parameters*/ - l_tcp->ppt = 0; - l_tcp->ppt_data = 00; - /* Reconnect the tile-compo coding parameters pointer to the current tile coding parameters*/ - l_tcp->tccps = l_current_tccp; - - /* Get the mct_decoding_matrix of the dflt_tile_cp and copy them into the current tile cp*/ - if (l_default_tcp->m_mct_decoding_matrix) { - l_tcp->m_mct_decoding_matrix = (OPJ_FLOAT32*)opj_malloc(l_mct_size); - if (! l_tcp->m_mct_decoding_matrix ) { - return OPJ_FALSE; - } - memcpy(l_tcp->m_mct_decoding_matrix,l_default_tcp->m_mct_decoding_matrix,l_mct_size); - } - - /* Get the mct_record of the dflt_tile_cp and copy them into the current tile cp*/ - l_mct_records_size = l_default_tcp->m_nb_max_mct_records * (OPJ_UINT32)sizeof(opj_mct_data_t); - l_tcp->m_mct_records = (opj_mct_data_t*)opj_malloc(l_mct_records_size); - if (! l_tcp->m_mct_records) { - return OPJ_FALSE; - } - memcpy(l_tcp->m_mct_records, l_default_tcp->m_mct_records,l_mct_records_size); - - /* Copy the mct record data from dflt_tile_cp to the current tile*/ - l_src_mct_rec = l_default_tcp->m_mct_records; - l_dest_mct_rec = l_tcp->m_mct_records; - - for (j=0;jm_nb_mct_records;++j) { - - if (l_src_mct_rec->m_data) { - - l_dest_mct_rec->m_data = (OPJ_BYTE*) opj_malloc(l_src_mct_rec->m_data_size); - if(! l_dest_mct_rec->m_data) { - return OPJ_FALSE; - } - memcpy(l_dest_mct_rec->m_data,l_src_mct_rec->m_data,l_src_mct_rec->m_data_size); - } - - ++l_src_mct_rec; - ++l_dest_mct_rec; - } - - /* Get the mcc_record of the dflt_tile_cp and copy them into the current tile cp*/ - l_mcc_records_size = l_default_tcp->m_nb_max_mcc_records * (OPJ_UINT32)sizeof(opj_simple_mcc_decorrelation_data_t); - l_tcp->m_mcc_records = (opj_simple_mcc_decorrelation_data_t*) opj_malloc(l_mcc_records_size); - if (! l_tcp->m_mcc_records) { - return OPJ_FALSE; - } - memcpy(l_tcp->m_mcc_records,l_default_tcp->m_mcc_records,l_mcc_records_size); - - /* Copy the mcc record data from dflt_tile_cp to the current tile*/ - l_src_mcc_rec = l_default_tcp->m_mcc_records; - l_dest_mcc_rec = l_tcp->m_mcc_records; - - for (j=0;jm_nb_max_mcc_records;++j) { - - if (l_src_mcc_rec->m_decorrelation_array) { - l_offset = (OPJ_UINT32)(l_src_mcc_rec->m_decorrelation_array - l_default_tcp->m_mct_records); - l_dest_mcc_rec->m_decorrelation_array = l_tcp->m_mct_records + l_offset; - } - - if (l_src_mcc_rec->m_offset_array) { - l_offset = (OPJ_UINT32)(l_src_mcc_rec->m_offset_array - l_default_tcp->m_mct_records); - l_dest_mcc_rec->m_offset_array = l_tcp->m_mct_records + l_offset; - } - - ++l_src_mcc_rec; - ++l_dest_mcc_rec; - } - - /* Copy all the dflt_tile_compo_cp to the current tile cp */ - memcpy(l_current_tccp,l_default_tcp->tccps,l_tccp_size); - - /* Move to next tile cp*/ - ++l_tcp; - } - - /* Create the current tile decoder*/ - p_j2k->m_tcd = (opj_tcd_t*)opj_tcd_create(OPJ_TRUE); /* FIXME why a cast ? */ - if (! p_j2k->m_tcd ) { - return OPJ_FALSE; - } - - if ( !opj_tcd_init(p_j2k->m_tcd, l_image, &(p_j2k->m_cp)) ) { - opj_tcd_destroy(p_j2k->m_tcd); - p_j2k->m_tcd = 00; - opj_event_msg(p_manager, EVT_ERROR, "Cannot decode tile, memory error\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -const opj_dec_memory_marker_handler_t * opj_j2k_get_marker_handler (OPJ_UINT32 p_id) -{ - const opj_dec_memory_marker_handler_t *e; - for (e = j2k_memory_marker_handler_tab; e->id != 0; ++e) { - if (e->id == p_id) { - break; /* we find a handler corresponding to the marker ID*/ - } - } - return e; -} - -void opj_j2k_destroy (opj_j2k_t *p_j2k) -{ - if (p_j2k == 00) { - return; - } - - if (p_j2k->m_is_decoder) { - - if (p_j2k->m_specific_param.m_decoder.m_default_tcp != 00) { - opj_j2k_tcp_destroy(p_j2k->m_specific_param.m_decoder.m_default_tcp); - opj_free(p_j2k->m_specific_param.m_decoder.m_default_tcp); - p_j2k->m_specific_param.m_decoder.m_default_tcp = 00; - } - - if (p_j2k->m_specific_param.m_decoder.m_header_data != 00) { - opj_free(p_j2k->m_specific_param.m_decoder.m_header_data); - p_j2k->m_specific_param.m_decoder.m_header_data = 00; - p_j2k->m_specific_param.m_decoder.m_header_data_size = 0; - } - } - else { - - if (p_j2k->m_specific_param.m_encoder.m_encoded_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_encoded_tile_data); - p_j2k->m_specific_param.m_encoder.m_encoded_tile_data = 00; - } - - if (p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_buffer) { - opj_free(p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_buffer); - p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_buffer = 00; - p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_current = 00; - } - - if (p_j2k->m_specific_param.m_encoder.m_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = 00; - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - } - } - - opj_tcd_destroy(p_j2k->m_tcd); - - opj_j2k_cp_destroy(&(p_j2k->m_cp)); - memset(&(p_j2k->m_cp),0,sizeof(opj_cp_t)); - - opj_procedure_list_destroy(p_j2k->m_procedure_list); - p_j2k->m_procedure_list = 00; - - opj_procedure_list_destroy(p_j2k->m_validation_list); - p_j2k->m_procedure_list = 00; - - j2k_destroy_cstr_index(p_j2k->cstr_index); - p_j2k->cstr_index = NULL; - - opj_image_destroy(p_j2k->m_private_image); - p_j2k->m_private_image = NULL; - - opj_image_destroy(p_j2k->m_output_image); - p_j2k->m_output_image = NULL; - - opj_free(p_j2k); -} - -void j2k_destroy_cstr_index (opj_codestream_index_t *p_cstr_ind) -{ - if (p_cstr_ind) { - - if (p_cstr_ind->marker) { - opj_free(p_cstr_ind->marker); - p_cstr_ind->marker = NULL; - } - - if (p_cstr_ind->tile_index) { - OPJ_UINT32 it_tile = 0; - - for (it_tile=0; it_tile < p_cstr_ind->nb_of_tiles; it_tile++) { - - if(p_cstr_ind->tile_index[it_tile].packet_index) { - opj_free(p_cstr_ind->tile_index[it_tile].packet_index); - p_cstr_ind->tile_index[it_tile].packet_index = NULL; - } - - if(p_cstr_ind->tile_index[it_tile].tp_index){ - opj_free(p_cstr_ind->tile_index[it_tile].tp_index); - p_cstr_ind->tile_index[it_tile].tp_index = NULL; - } - - if(p_cstr_ind->tile_index[it_tile].marker){ - opj_free(p_cstr_ind->tile_index[it_tile].marker); - p_cstr_ind->tile_index[it_tile].marker = NULL; - - } - } - - opj_free( p_cstr_ind->tile_index); - p_cstr_ind->tile_index = NULL; - } - - opj_free(p_cstr_ind); - } -} - -void opj_j2k_tcp_destroy (opj_tcp_t *p_tcp) -{ - if (p_tcp == 00) { - return; - } - - if (p_tcp->ppt_buffer != 00) { - opj_free(p_tcp->ppt_buffer); - p_tcp->ppt_buffer = 00; - } - - if (p_tcp->tccps != 00) { - opj_free(p_tcp->tccps); - p_tcp->tccps = 00; - } - - if (p_tcp->m_mct_coding_matrix != 00) { - opj_free(p_tcp->m_mct_coding_matrix); - p_tcp->m_mct_coding_matrix = 00; - } - - if (p_tcp->m_mct_decoding_matrix != 00) { - opj_free(p_tcp->m_mct_decoding_matrix); - p_tcp->m_mct_decoding_matrix = 00; - } - - if (p_tcp->m_mcc_records) { - opj_free(p_tcp->m_mcc_records); - p_tcp->m_mcc_records = 00; - p_tcp->m_nb_max_mcc_records = 0; - p_tcp->m_nb_mcc_records = 0; - } - - if (p_tcp->m_mct_records) { - opj_mct_data_t * l_mct_data = p_tcp->m_mct_records; - OPJ_UINT32 i; - - for (i=0;im_nb_mct_records;++i) { - if (l_mct_data->m_data) { - opj_free(l_mct_data->m_data); - l_mct_data->m_data = 00; - } - - ++l_mct_data; - } - - opj_free(p_tcp->m_mct_records); - p_tcp->m_mct_records = 00; - } - - if (p_tcp->mct_norms != 00) { - opj_free(p_tcp->mct_norms); - p_tcp->mct_norms = 00; - } - - opj_j2k_tcp_data_destroy(p_tcp); - -} - -void opj_j2k_tcp_data_destroy (opj_tcp_t *p_tcp) -{ - if (p_tcp->m_data) { - opj_free(p_tcp->m_data); - p_tcp->m_data = NULL; - p_tcp->m_data_size = 0; - } -} - -void opj_j2k_cp_destroy (opj_cp_t *p_cp) -{ - OPJ_UINT32 l_nb_tiles; - opj_tcp_t * l_current_tile = 00; - OPJ_UINT32 i; - - if (p_cp == 00) - { - return; - } - if (p_cp->tcps != 00) - { - l_current_tile = p_cp->tcps; - l_nb_tiles = p_cp->th * p_cp->tw; - - for (i = 0; i < l_nb_tiles; ++i) - { - opj_j2k_tcp_destroy(l_current_tile); - ++l_current_tile; - } - opj_free(p_cp->tcps); - p_cp->tcps = 00; - } - opj_free(p_cp->ppm_buffer); - p_cp->ppm_buffer = 00; - p_cp->ppm_data = NULL; /* ppm_data belongs to the allocated buffer pointed by ppm_buffer */ - opj_free(p_cp->comment); - p_cp->comment = 00; - if (! p_cp->m_is_decoder) - { - opj_free(p_cp->m_specific_param.m_enc.m_matrice); - p_cp->m_specific_param.m_enc.m_matrice = 00; - } -} - -OPJ_BOOL opj_j2k_read_tile_header( opj_j2k_t * p_j2k, - OPJ_UINT32 * p_tile_index, - OPJ_UINT32 * p_data_size, - OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0, - OPJ_INT32 * p_tile_x1, OPJ_INT32 * p_tile_y1, - OPJ_UINT32 * p_nb_comps, - OPJ_BOOL * p_go_on, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - OPJ_UINT32 l_current_marker = J2K_MS_SOT; - OPJ_UINT32 l_marker_size; - const opj_dec_memory_marker_handler_t * l_marker_handler = 00; - opj_tcp_t * l_tcp = NULL; - OPJ_UINT32 l_nb_tiles; - - /* preconditions */ - assert(p_stream != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - /* Reach the End Of Codestream ?*/ - if (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_EOC){ - l_current_marker = J2K_MS_EOC; - } - /* We need to encounter a SOT marker (a new tile-part header) */ - else if (p_j2k->m_specific_param.m_decoder.m_state != J2K_STATE_TPHSOT){ - return OPJ_FALSE; - } - - /* Read into the codestream until reach the EOC or ! can_decode ??? FIXME */ - while ( (!p_j2k->m_specific_param.m_decoder.m_can_decode) && (l_current_marker != J2K_MS_EOC) ) { - - /* Try to read until the Start Of Data is detected */ - while (l_current_marker != J2K_MS_SOD) { - - if(opj_stream_get_number_byte_left(p_stream) == 0) - { - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_NEOC; - break; - } - - /* Try to read 2 bytes (the marker size) from stream and copy them into the buffer */ - if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - - /* Read 2 bytes from the buffer as the marker size */ - opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_marker_size,2); - - /* cf. https://code.google.com/p/openjpeg/issues/detail?id=226 */ - if (l_current_marker == 0x8080 && opj_stream_get_number_byte_left(p_stream) == 0) { - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_NEOC; - break; - } - - /* Why this condition? FIXME */ - if (p_j2k->m_specific_param.m_decoder.m_state & J2K_STATE_TPH){ - p_j2k->m_specific_param.m_decoder.m_sot_length -= (l_marker_size + 2); - } - l_marker_size -= 2; /* Subtract the size of the marker ID already read */ - - /* Get the marker handler from the marker ID */ - l_marker_handler = opj_j2k_get_marker_handler(l_current_marker); - - /* Check if the marker is known and if it is the right place to find it */ - if (! (p_j2k->m_specific_param.m_decoder.m_state & l_marker_handler->states) ) { - opj_event_msg(p_manager, EVT_ERROR, "Marker is not compliant with its position\n"); - return OPJ_FALSE; - } -/* FIXME manage case of unknown marker as in the main header ? */ - - /* Check if the marker size is compatible with the header data size */ - if (l_marker_size > p_j2k->m_specific_param.m_decoder.m_header_data_size) { - OPJ_BYTE *new_header_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_decoder.m_header_data, l_marker_size); - if (! new_header_data) { - opj_free(p_j2k->m_specific_param.m_decoder.m_header_data); - p_j2k->m_specific_param.m_decoder.m_header_data = NULL; - p_j2k->m_specific_param.m_decoder.m_header_data_size = 0; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read header\n"); - return OPJ_FALSE; - } - p_j2k->m_specific_param.m_decoder.m_header_data = new_header_data; - p_j2k->m_specific_param.m_decoder.m_header_data_size = l_marker_size; - } - - /* Try to read the rest of the marker segment from stream and copy them into the buffer */ - if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,l_marker_size,p_manager) != l_marker_size) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - - if (!l_marker_handler->handler) { - /* See issue #175 */ - opj_event_msg(p_manager, EVT_ERROR, "Not sure how that happened.\n"); - return OPJ_FALSE; - } - /* Read the marker segment with the correct marker handler */ - if (! (*(l_marker_handler->handler))(p_j2k,p_j2k->m_specific_param.m_decoder.m_header_data,l_marker_size,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Fail to read the current marker segment (%#x)\n", l_current_marker); - return OPJ_FALSE; - } - - /* Add the marker to the codestream index*/ - if (OPJ_FALSE == opj_j2k_add_tlmarker(p_j2k->m_current_tile_number, - p_j2k->cstr_index, - l_marker_handler->id, - (OPJ_UINT32) opj_stream_tell(p_stream) - l_marker_size - 4, - l_marker_size + 4 )) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to add tl marker\n"); - return OPJ_FALSE; - } - - /* Keep the position of the last SOT marker read */ - if ( l_marker_handler->id == J2K_MS_SOT ) { - OPJ_UINT32 sot_pos = (OPJ_UINT32) opj_stream_tell(p_stream) - l_marker_size - 4 ; - if (sot_pos > p_j2k->m_specific_param.m_decoder.m_last_sot_read_pos) - { - p_j2k->m_specific_param.m_decoder.m_last_sot_read_pos = sot_pos; - } - } - - if (p_j2k->m_specific_param.m_decoder.m_skip_data) { - /* Skip the rest of the tile part header*/ - if (opj_stream_skip(p_stream,p_j2k->m_specific_param.m_decoder.m_sot_length,p_manager) != p_j2k->m_specific_param.m_decoder.m_sot_length) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - l_current_marker = J2K_MS_SOD; /* Normally we reached a SOD */ - } - else { - /* Try to read 2 bytes (the next marker ID) from stream and copy them into the buffer*/ - if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - /* Read 2 bytes from the buffer as the new marker ID */ - opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_current_marker,2); - } - } - if(opj_stream_get_number_byte_left(p_stream) == 0 - && p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NEOC) - break; - - /* If we didn't skip data before, we need to read the SOD marker*/ - if (! p_j2k->m_specific_param.m_decoder.m_skip_data) { - /* Try to read the SOD marker and skip data ? FIXME */ - if (! opj_j2k_read_sod(p_j2k, p_stream, p_manager)) { - return OPJ_FALSE; - } - - if (! p_j2k->m_specific_param.m_decoder.m_can_decode){ - /* Try to read 2 bytes (the next marker ID) from stream and copy them into the buffer */ - if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - - /* Read 2 bytes from buffer as the new marker ID */ - opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_current_marker,2); - } - } - else { - /* Indicate we will try to read a new tile-part header*/ - p_j2k->m_specific_param.m_decoder.m_skip_data = 0; - p_j2k->m_specific_param.m_decoder.m_can_decode = 0; - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_TPHSOT; - - /* Try to read 2 bytes (the next marker ID) from stream and copy them into the buffer */ - if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - - /* Read 2 bytes from buffer as the new marker ID */ - opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_current_marker,2); - } - } - - /* Current marker is the EOC marker ?*/ - if (l_current_marker == J2K_MS_EOC) { - if (p_j2k->m_specific_param.m_decoder.m_state != J2K_STATE_EOC ){ - p_j2k->m_current_tile_number = 0; - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_EOC; - } - } - - /* FIXME DOC ???*/ - if ( ! p_j2k->m_specific_param.m_decoder.m_can_decode) { - l_tcp = p_j2k->m_cp.tcps + p_j2k->m_current_tile_number; - l_nb_tiles = p_j2k->m_cp.th * p_j2k->m_cp.tw; - - while( (p_j2k->m_current_tile_number < l_nb_tiles) && (l_tcp->m_data == 00) ) { - ++p_j2k->m_current_tile_number; - ++l_tcp; - } - - if (p_j2k->m_current_tile_number == l_nb_tiles) { - *p_go_on = OPJ_FALSE; - return OPJ_TRUE; - } - } - - /*FIXME ???*/ - if (! opj_tcd_init_decode_tile(p_j2k->m_tcd, p_j2k->m_current_tile_number)) { - opj_event_msg(p_manager, EVT_ERROR, "Cannot decode tile, memory error\n"); - return OPJ_FALSE; - } - - opj_event_msg(p_manager, EVT_INFO, "Header of tile %d / %d has been read.\n", - p_j2k->m_current_tile_number, (p_j2k->m_cp.th * p_j2k->m_cp.tw) - 1); - - *p_tile_index = p_j2k->m_current_tile_number; - *p_go_on = OPJ_TRUE; - *p_data_size = opj_tcd_get_decoded_tile_size(p_j2k->m_tcd); - *p_tile_x0 = p_j2k->m_tcd->tcd_image->tiles->x0; - *p_tile_y0 = p_j2k->m_tcd->tcd_image->tiles->y0; - *p_tile_x1 = p_j2k->m_tcd->tcd_image->tiles->x1; - *p_tile_y1 = p_j2k->m_tcd->tcd_image->tiles->y1; - *p_nb_comps = p_j2k->m_tcd->tcd_image->tiles->numcomps; - - p_j2k->m_specific_param.m_decoder.m_state |= 0x0080;/* FIXME J2K_DEC_STATE_DATA;*/ - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_decode_tile ( opj_j2k_t * p_j2k, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - OPJ_UINT32 l_current_marker; - OPJ_BYTE l_data [2]; - opj_tcp_t * l_tcp; - - /* preconditions */ - assert(p_stream != 00); - assert(p_j2k != 00); - assert(p_manager != 00); - - if ( !(p_j2k->m_specific_param.m_decoder.m_state & 0x0080/*FIXME J2K_DEC_STATE_DATA*/) - || (p_tile_index != p_j2k->m_current_tile_number) ) { - return OPJ_FALSE; - } - - l_tcp = &(p_j2k->m_cp.tcps[p_tile_index]); - if (! l_tcp->m_data) { - opj_j2k_tcp_destroy(l_tcp); - return OPJ_FALSE; - } - - if (! opj_tcd_decode_tile( p_j2k->m_tcd, - l_tcp->m_data, - l_tcp->m_data_size, - p_tile_index, - p_j2k->cstr_index) ) { - opj_j2k_tcp_destroy(l_tcp); - p_j2k->m_specific_param.m_decoder.m_state |= 0x8000;/*FIXME J2K_DEC_STATE_ERR;*/ - opj_event_msg(p_manager, EVT_ERROR, "Failed to decode.\n"); - return OPJ_FALSE; - } - - if (! opj_tcd_update_tile_data(p_j2k->m_tcd,p_data,p_data_size)) { - return OPJ_FALSE; - } - - /* To avoid to destroy the tcp which can be useful when we try to decode a tile decoded before (cf j2k_random_tile_access) - * we destroy just the data which will be re-read in read_tile_header*/ - /*opj_j2k_tcp_destroy(l_tcp); - p_j2k->m_tcd->tcp = 0;*/ - opj_j2k_tcp_data_destroy(l_tcp); - - p_j2k->m_specific_param.m_decoder.m_can_decode = 0; - p_j2k->m_specific_param.m_decoder.m_state &= (~ (0x0080u));/* FIXME J2K_DEC_STATE_DATA);*/ - - if(opj_stream_get_number_byte_left(p_stream) == 0 - && p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NEOC){ - return OPJ_TRUE; - } - - if (p_j2k->m_specific_param.m_decoder.m_state != 0x0100){ /*FIXME J2K_DEC_STATE_EOC)*/ - if (opj_stream_read_data(p_stream,l_data,2,p_manager) != 2) { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short\n"); - return OPJ_FALSE; - } - - opj_read_bytes(l_data,&l_current_marker,2); - - if (l_current_marker == J2K_MS_EOC) { - p_j2k->m_current_tile_number = 0; - p_j2k->m_specific_param.m_decoder.m_state = 0x0100;/*FIXME J2K_DEC_STATE_EOC;*/ - } - else if (l_current_marker != J2K_MS_SOT) - { - opj_event_msg(p_manager, EVT_ERROR, "Stream too short, expected SOT\n"); - - if(opj_stream_get_number_byte_left(p_stream) == 0) { - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_NEOC; - return OPJ_TRUE; - } - return OPJ_FALSE; - } - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_update_image_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data, opj_image_t* p_output_image) -{ - OPJ_UINT32 i,j,k = 0; - OPJ_UINT32 l_width_src,l_height_src; - OPJ_UINT32 l_width_dest,l_height_dest; - OPJ_INT32 l_offset_x0_src, l_offset_y0_src, l_offset_x1_src, l_offset_y1_src; - OPJ_INT32 l_start_offset_src, l_line_offset_src, l_end_offset_src ; - OPJ_UINT32 l_start_x_dest , l_start_y_dest; - OPJ_UINT32 l_x0_dest, l_y0_dest, l_x1_dest, l_y1_dest; - OPJ_INT32 l_start_offset_dest, l_line_offset_dest; - - opj_image_comp_t * l_img_comp_src = 00; - opj_image_comp_t * l_img_comp_dest = 00; - - opj_tcd_tilecomp_t * l_tilec = 00; - opj_image_t * l_image_src = 00; - OPJ_UINT32 l_size_comp, l_remaining; - OPJ_INT32 * l_dest_ptr; - opj_tcd_resolution_t* l_res= 00; - - l_tilec = p_tcd->tcd_image->tiles->comps; - l_image_src = p_tcd->image; - l_img_comp_src = l_image_src->comps; - - l_img_comp_dest = p_output_image->comps; - - for (i=0; inumcomps; i++) { - - /* Allocate output component buffer if necessary */ - if (!l_img_comp_dest->data) { - - l_img_comp_dest->data = (OPJ_INT32*) opj_calloc(l_img_comp_dest->w * l_img_comp_dest->h, sizeof(OPJ_INT32)); - if (! l_img_comp_dest->data) { - return OPJ_FALSE; - } - } - - /* Copy info from decoded comp image to output image */ - l_img_comp_dest->resno_decoded = l_img_comp_src->resno_decoded; - - /*-----*/ - /* Compute the precision of the output buffer */ - l_size_comp = l_img_comp_src->prec >> 3; /*(/ 8)*/ - l_remaining = l_img_comp_src->prec & 7; /* (%8) */ - l_res = l_tilec->resolutions + l_img_comp_src->resno_decoded; - - if (l_remaining) { - ++l_size_comp; - } - - if (l_size_comp == 3) { - l_size_comp = 4; - } - /*-----*/ - - /* Current tile component size*/ - /*if (i == 0) { - fprintf(stdout, "SRC: l_res_x0=%d, l_res_x1=%d, l_res_y0=%d, l_res_y1=%d\n", - l_res->x0, l_res->x1, l_res->y0, l_res->y1); - }*/ - - l_width_src = (OPJ_UINT32)(l_res->x1 - l_res->x0); - l_height_src = (OPJ_UINT32)(l_res->y1 - l_res->y0); - - /* Border of the current output component*/ - l_x0_dest = (OPJ_UINT32)opj_int_ceildivpow2((OPJ_INT32)l_img_comp_dest->x0, (OPJ_INT32)l_img_comp_dest->factor); - l_y0_dest = (OPJ_UINT32)opj_int_ceildivpow2((OPJ_INT32)l_img_comp_dest->y0, (OPJ_INT32)l_img_comp_dest->factor); - l_x1_dest = l_x0_dest + l_img_comp_dest->w; - l_y1_dest = l_y0_dest + l_img_comp_dest->h; - - /*if (i == 0) { - fprintf(stdout, "DEST: l_x0_dest=%d, l_x1_dest=%d, l_y0_dest=%d, l_y1_dest=%d (%d)\n", - l_x0_dest, l_x1_dest, l_y0_dest, l_y1_dest, l_img_comp_dest->factor ); - }*/ - - /*-----*/ - /* Compute the area (l_offset_x0_src, l_offset_y0_src, l_offset_x1_src, l_offset_y1_src) - * of the input buffer (decoded tile component) which will be move - * in the output buffer. Compute the area of the output buffer (l_start_x_dest, - * l_start_y_dest, l_width_dest, l_height_dest) which will be modified - * by this input area. - * */ - assert( l_res->x0 >= 0); - assert( l_res->x1 >= 0); - if ( l_x0_dest < (OPJ_UINT32)l_res->x0 ) { - l_start_x_dest = (OPJ_UINT32)l_res->x0 - l_x0_dest; - l_offset_x0_src = 0; - - if ( l_x1_dest >= (OPJ_UINT32)l_res->x1 ) { - l_width_dest = l_width_src; - l_offset_x1_src = 0; - } - else { - l_width_dest = l_x1_dest - (OPJ_UINT32)l_res->x0 ; - l_offset_x1_src = (OPJ_INT32)(l_width_src - l_width_dest); - } - } - else { - l_start_x_dest = 0 ; - l_offset_x0_src = (OPJ_INT32)l_x0_dest - l_res->x0; - - if ( l_x1_dest >= (OPJ_UINT32)l_res->x1 ) { - l_width_dest = l_width_src - (OPJ_UINT32)l_offset_x0_src; - l_offset_x1_src = 0; - } - else { - l_width_dest = l_img_comp_dest->w ; - l_offset_x1_src = l_res->x1 - (OPJ_INT32)l_x1_dest; - } - } - - if ( l_y0_dest < (OPJ_UINT32)l_res->y0 ) { - l_start_y_dest = (OPJ_UINT32)l_res->y0 - l_y0_dest; - l_offset_y0_src = 0; - - if ( l_y1_dest >= (OPJ_UINT32)l_res->y1 ) { - l_height_dest = l_height_src; - l_offset_y1_src = 0; - } - else { - l_height_dest = l_y1_dest - (OPJ_UINT32)l_res->y0 ; - l_offset_y1_src = (OPJ_INT32)(l_height_src - l_height_dest); - } - } - else { - l_start_y_dest = 0 ; - l_offset_y0_src = (OPJ_INT32)l_y0_dest - l_res->y0; - - if ( l_y1_dest >= (OPJ_UINT32)l_res->y1 ) { - l_height_dest = l_height_src - (OPJ_UINT32)l_offset_y0_src; - l_offset_y1_src = 0; - } - else { - l_height_dest = l_img_comp_dest->h ; - l_offset_y1_src = l_res->y1 - (OPJ_INT32)l_y1_dest; - } - } - - if( (l_offset_x0_src < 0 ) || (l_offset_y0_src < 0 ) || (l_offset_x1_src < 0 ) || (l_offset_y1_src < 0 ) ){ - return OPJ_FALSE; - } - /* testcase 2977.pdf.asan.67.2198 */ - if ((OPJ_INT32)l_width_dest < 0 || (OPJ_INT32)l_height_dest < 0) { - return OPJ_FALSE; - } - /*-----*/ - - /* Compute the input buffer offset */ - l_start_offset_src = l_offset_x0_src + l_offset_y0_src * (OPJ_INT32)l_width_src; - l_line_offset_src = l_offset_x1_src + l_offset_x0_src; - l_end_offset_src = l_offset_y1_src * (OPJ_INT32)l_width_src - l_offset_x0_src; - - /* Compute the output buffer offset */ - l_start_offset_dest = (OPJ_INT32)(l_start_x_dest + l_start_y_dest * l_img_comp_dest->w); - l_line_offset_dest = (OPJ_INT32)(l_img_comp_dest->w - l_width_dest); - - /* Move the output buffer to the first place where we will write*/ - l_dest_ptr = l_img_comp_dest->data + l_start_offset_dest; - - /*if (i == 0) { - fprintf(stdout, "COMPO[%d]:\n",i); - fprintf(stdout, "SRC: l_start_x_src=%d, l_start_y_src=%d, l_width_src=%d, l_height_src=%d\n" - "\t tile offset:%d, %d, %d, %d\n" - "\t buffer offset: %d; %d, %d\n", - l_res->x0, l_res->y0, l_width_src, l_height_src, - l_offset_x0_src, l_offset_y0_src, l_offset_x1_src, l_offset_y1_src, - l_start_offset_src, l_line_offset_src, l_end_offset_src); - - fprintf(stdout, "DEST: l_start_x_dest=%d, l_start_y_dest=%d, l_width_dest=%d, l_height_dest=%d\n" - "\t start offset: %d, line offset= %d\n", - l_start_x_dest, l_start_y_dest, l_width_dest, l_height_dest, l_start_offset_dest, l_line_offset_dest); - }*/ - - switch (l_size_comp) { - case 1: - { - OPJ_CHAR * l_src_ptr = (OPJ_CHAR*) p_data; - l_src_ptr += l_start_offset_src; /* Move to the first place where we will read*/ - - if (l_img_comp_src->sgnd) { - for (j = 0 ; j < l_height_dest ; ++j) { - for ( k = 0 ; k < l_width_dest ; ++k) { - *(l_dest_ptr++) = (OPJ_INT32) (*(l_src_ptr++)); /* Copy only the data needed for the output image */ - } - - l_dest_ptr+= l_line_offset_dest; /* Move to the next place where we will write */ - l_src_ptr += l_line_offset_src ; /* Move to the next place where we will read */ - } - } - else { - for ( j = 0 ; j < l_height_dest ; ++j ) { - for ( k = 0 ; k < l_width_dest ; ++k) { - *(l_dest_ptr++) = (OPJ_INT32) ((*(l_src_ptr++))&0xff); - } - - l_dest_ptr+= l_line_offset_dest; - l_src_ptr += l_line_offset_src; - } - } - - l_src_ptr += l_end_offset_src; /* Move to the end of this component-part of the input buffer */ - p_data = (OPJ_BYTE*) l_src_ptr; /* Keep the current position for the next component-part */ - } - break; - case 2: - { - OPJ_INT16 * l_src_ptr = (OPJ_INT16 *) p_data; - l_src_ptr += l_start_offset_src; - - if (l_img_comp_src->sgnd) { - for (j=0;jm_cp); - opj_image_t * l_image = p_j2k->m_private_image; - - OPJ_UINT32 it_comp; - OPJ_INT32 l_comp_x1, l_comp_y1; - opj_image_comp_t* l_img_comp = NULL; - - /* Check if we are read the main header */ - if (p_j2k->m_specific_param.m_decoder.m_state != J2K_STATE_TPHSOT) { /* FIXME J2K_DEC_STATE_TPHSOT)*/ - opj_event_msg(p_manager, EVT_ERROR, "Need to decode the main header before begin to decode the remaining codestream"); - return OPJ_FALSE; - } - - if ( !p_start_x && !p_start_y && !p_end_x && !p_end_y){ - opj_event_msg(p_manager, EVT_INFO, "No decoded area parameters, set the decoded area to the whole image\n"); - - p_j2k->m_specific_param.m_decoder.m_start_tile_x = 0; - p_j2k->m_specific_param.m_decoder.m_start_tile_y = 0; - p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw; - p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th; - - return OPJ_TRUE; - } - - /* ----- */ - /* Check if the positions provided by the user are correct */ - - /* Left */ - assert(p_start_x >= 0 ); - assert(p_start_y >= 0 ); - - if ((OPJ_UINT32)p_start_x > l_image->x1 ) { - opj_event_msg(p_manager, EVT_ERROR, - "Left position of the decoded area (region_x0=%d) is outside the image area (Xsiz=%d).\n", - p_start_x, l_image->x1); - return OPJ_FALSE; - } - else if ((OPJ_UINT32)p_start_x < l_image->x0){ - opj_event_msg(p_manager, EVT_WARNING, - "Left position of the decoded area (region_x0=%d) is outside the image area (XOsiz=%d).\n", - p_start_x, l_image->x0); - p_j2k->m_specific_param.m_decoder.m_start_tile_x = 0; - p_image->x0 = l_image->x0; - } - else { - p_j2k->m_specific_param.m_decoder.m_start_tile_x = ((OPJ_UINT32)p_start_x - l_cp->tx0) / l_cp->tdx; - p_image->x0 = (OPJ_UINT32)p_start_x; - } - - /* Up */ - if ((OPJ_UINT32)p_start_y > l_image->y1){ - opj_event_msg(p_manager, EVT_ERROR, - "Up position of the decoded area (region_y0=%d) is outside the image area (Ysiz=%d).\n", - p_start_y, l_image->y1); - return OPJ_FALSE; - } - else if ((OPJ_UINT32)p_start_y < l_image->y0){ - opj_event_msg(p_manager, EVT_WARNING, - "Up position of the decoded area (region_y0=%d) is outside the image area (YOsiz=%d).\n", - p_start_y, l_image->y0); - p_j2k->m_specific_param.m_decoder.m_start_tile_y = 0; - p_image->y0 = l_image->y0; - } - else { - p_j2k->m_specific_param.m_decoder.m_start_tile_y = ((OPJ_UINT32)p_start_y - l_cp->ty0) / l_cp->tdy; - p_image->y0 = (OPJ_UINT32)p_start_y; - } - - /* Right */ - assert((OPJ_UINT32)p_end_x > 0); - assert((OPJ_UINT32)p_end_y > 0); - if ((OPJ_UINT32)p_end_x < l_image->x0) { - opj_event_msg(p_manager, EVT_ERROR, - "Right position of the decoded area (region_x1=%d) is outside the image area (XOsiz=%d).\n", - p_end_x, l_image->x0); - return OPJ_FALSE; - } - else if ((OPJ_UINT32)p_end_x > l_image->x1) { - opj_event_msg(p_manager, EVT_WARNING, - "Right position of the decoded area (region_x1=%d) is outside the image area (Xsiz=%d).\n", - p_end_x, l_image->x1); - p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw; - p_image->x1 = l_image->x1; - } - else { - p_j2k->m_specific_param.m_decoder.m_end_tile_x = (OPJ_UINT32)opj_int_ceildiv(p_end_x - (OPJ_INT32)l_cp->tx0, (OPJ_INT32)l_cp->tdx); - p_image->x1 = (OPJ_UINT32)p_end_x; - } - - /* Bottom */ - if ((OPJ_UINT32)p_end_y < l_image->y0) { - opj_event_msg(p_manager, EVT_ERROR, - "Bottom position of the decoded area (region_y1=%d) is outside the image area (YOsiz=%d).\n", - p_end_y, l_image->y0); - return OPJ_FALSE; - } - if ((OPJ_UINT32)p_end_y > l_image->y1){ - opj_event_msg(p_manager, EVT_WARNING, - "Bottom position of the decoded area (region_y1=%d) is outside the image area (Ysiz=%d).\n", - p_end_y, l_image->y1); - p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th; - p_image->y1 = l_image->y1; - } - else{ - p_j2k->m_specific_param.m_decoder.m_end_tile_y = (OPJ_UINT32)opj_int_ceildiv(p_end_y - (OPJ_INT32)l_cp->ty0, (OPJ_INT32)l_cp->tdy); - p_image->y1 = (OPJ_UINT32)p_end_y; - } - /* ----- */ - - p_j2k->m_specific_param.m_decoder.m_discard_tiles = 1; - - l_img_comp = p_image->comps; - for (it_comp=0; it_comp < p_image->numcomps; ++it_comp) - { - OPJ_INT32 l_h,l_w; - - l_img_comp->x0 = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)p_image->x0, (OPJ_INT32)l_img_comp->dx); - l_img_comp->y0 = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)p_image->y0, (OPJ_INT32)l_img_comp->dy); - l_comp_x1 = opj_int_ceildiv((OPJ_INT32)p_image->x1, (OPJ_INT32)l_img_comp->dx); - l_comp_y1 = opj_int_ceildiv((OPJ_INT32)p_image->y1, (OPJ_INT32)l_img_comp->dy); - - l_w = opj_int_ceildivpow2(l_comp_x1, (OPJ_INT32)l_img_comp->factor) - - opj_int_ceildivpow2((OPJ_INT32)l_img_comp->x0, (OPJ_INT32)l_img_comp->factor); - if (l_w < 0){ - opj_event_msg(p_manager, EVT_ERROR, - "Size x of the decoded component image is incorrect (comp[%d].w=%d).\n", - it_comp, l_w); - return OPJ_FALSE; - } - l_img_comp->w = (OPJ_UINT32)l_w; - - l_h = opj_int_ceildivpow2(l_comp_y1, (OPJ_INT32)l_img_comp->factor) - - opj_int_ceildivpow2((OPJ_INT32)l_img_comp->y0, (OPJ_INT32)l_img_comp->factor); - if (l_h < 0){ - opj_event_msg(p_manager, EVT_ERROR, - "Size y of the decoded component image is incorrect (comp[%d].h=%d).\n", - it_comp, l_h); - return OPJ_FALSE; - } - l_img_comp->h = (OPJ_UINT32)l_h; - - l_img_comp++; - } - - opj_event_msg( p_manager, EVT_INFO,"Setting decoding area to %d,%d,%d,%d\n", - p_image->x0, p_image->y0, p_image->x1, p_image->y1); - - return OPJ_TRUE; -} - -opj_j2k_t* opj_j2k_create_decompress(void) -{ - opj_j2k_t *l_j2k = (opj_j2k_t*) opj_malloc(sizeof(opj_j2k_t)); - if (!l_j2k) { - return 00; - } - memset(l_j2k,0,sizeof(opj_j2k_t)); - - l_j2k->m_is_decoder = 1; - l_j2k->m_cp.m_is_decoder = 1; - - l_j2k->m_specific_param.m_decoder.m_default_tcp = (opj_tcp_t*) opj_malloc(sizeof(opj_tcp_t)); - if (!l_j2k->m_specific_param.m_decoder.m_default_tcp) { - opj_j2k_destroy(l_j2k); - return 00; - } - memset(l_j2k->m_specific_param.m_decoder.m_default_tcp,0,sizeof(opj_tcp_t)); - - l_j2k->m_specific_param.m_decoder.m_header_data = (OPJ_BYTE *) opj_malloc(OPJ_J2K_DEFAULT_HEADER_SIZE); - if (! l_j2k->m_specific_param.m_decoder.m_header_data) { - opj_j2k_destroy(l_j2k); - return 00; - } - - l_j2k->m_specific_param.m_decoder.m_header_data_size = OPJ_J2K_DEFAULT_HEADER_SIZE; - - l_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec = -1 ; - - l_j2k->m_specific_param.m_decoder.m_last_sot_read_pos = 0 ; - - /* codestream index creation */ - l_j2k->cstr_index = opj_j2k_create_cstr_index(); - - /*(opj_codestream_index_t*) opj_malloc(sizeof(opj_codestream_index_t)); - if (!l_j2k->cstr_index){ - opj_j2k_destroy(l_j2k); - return NULL; - } - - l_j2k->cstr_index->marker = (opj_marker_info_t*) opj_malloc(100 * sizeof(opj_marker_info_t)); -*/ - - /* validation list creation */ - l_j2k->m_validation_list = opj_procedure_list_create(); - if (! l_j2k->m_validation_list) { - opj_j2k_destroy(l_j2k); - return 00; - } - - /* execution list creation */ - l_j2k->m_procedure_list = opj_procedure_list_create(); - if (! l_j2k->m_procedure_list) { - opj_j2k_destroy(l_j2k); - return 00; - } - - return l_j2k; -} - -opj_codestream_index_t* opj_j2k_create_cstr_index(void) -{ - opj_codestream_index_t* cstr_index = (opj_codestream_index_t*) - opj_calloc(1,sizeof(opj_codestream_index_t)); - if (!cstr_index) - return NULL; - - cstr_index->maxmarknum = 100; - cstr_index->marknum = 0; - cstr_index->marker = (opj_marker_info_t*) - opj_calloc(cstr_index->maxmarknum, sizeof(opj_marker_info_t)); - if (!cstr_index-> marker) - return NULL; - - cstr_index->tile_index = NULL; - - return cstr_index; -} - -OPJ_UINT32 opj_j2k_get_SPCod_SPCoc_size ( opj_j2k_t *p_j2k, - OPJ_UINT32 p_tile_no, - OPJ_UINT32 p_comp_no ) -{ - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - opj_tccp_t *l_tccp = 00; - - /* preconditions */ - assert(p_j2k != 00); - - l_cp = &(p_j2k->m_cp); - l_tcp = &l_cp->tcps[p_tile_no]; - l_tccp = &l_tcp->tccps[p_comp_no]; - - /* preconditions again */ - assert(p_tile_no < (l_cp->tw * l_cp->th)); - assert(p_comp_no < p_j2k->m_private_image->numcomps); - - if (l_tccp->csty & J2K_CCP_CSTY_PRT) { - return 5 + l_tccp->numresolutions; - } - else { - return 5; - } -} - -OPJ_BOOL opj_j2k_write_SPCod_SPCoc( opj_j2k_t *p_j2k, - OPJ_UINT32 p_tile_no, - OPJ_UINT32 p_comp_no, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_header_size, - struct opj_event_mgr * p_manager ) -{ - OPJ_UINT32 i; - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - opj_tccp_t *l_tccp = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_header_size != 00); - assert(p_manager != 00); - assert(p_data != 00); - - l_cp = &(p_j2k->m_cp); - l_tcp = &l_cp->tcps[p_tile_no]; - l_tccp = &l_tcp->tccps[p_comp_no]; - - /* preconditions again */ - assert(p_tile_no < (l_cp->tw * l_cp->th)); - assert(p_comp_no <(p_j2k->m_private_image->numcomps)); - - if (*p_header_size < 5) { - opj_event_msg(p_manager, EVT_ERROR, "Error writing SPCod SPCoc element\n"); - return OPJ_FALSE; - } - - opj_write_bytes(p_data,l_tccp->numresolutions - 1, 1); /* SPcoc (D) */ - ++p_data; - - opj_write_bytes(p_data,l_tccp->cblkw - 2, 1); /* SPcoc (E) */ - ++p_data; - - opj_write_bytes(p_data,l_tccp->cblkh - 2, 1); /* SPcoc (F) */ - ++p_data; - - opj_write_bytes(p_data,l_tccp->cblksty, 1); /* SPcoc (G) */ - ++p_data; - - opj_write_bytes(p_data,l_tccp->qmfbid, 1); /* SPcoc (H) */ - ++p_data; - - *p_header_size = *p_header_size - 5; - - if (l_tccp->csty & J2K_CCP_CSTY_PRT) { - - if (*p_header_size < l_tccp->numresolutions) { - opj_event_msg(p_manager, EVT_ERROR, "Error writing SPCod SPCoc element\n"); - return OPJ_FALSE; - } - - for (i = 0; i < l_tccp->numresolutions; ++i) { - opj_write_bytes(p_data,l_tccp->prcw[i] + (l_tccp->prch[i] << 4), 1); /* SPcoc (I_i) */ - ++p_data; - } - - *p_header_size = *p_header_size - l_tccp->numresolutions; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_read_SPCod_SPCoc( opj_j2k_t *p_j2k, - OPJ_UINT32 compno, - OPJ_BYTE * p_header_data, - OPJ_UINT32 * p_header_size, - opj_event_mgr_t * p_manager) -{ - OPJ_UINT32 i, l_tmp; - opj_cp_t *l_cp = NULL; - opj_tcp_t *l_tcp = NULL; - opj_tccp_t *l_tccp = NULL; - OPJ_BYTE * l_current_ptr = NULL; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_header_data != 00); - - l_cp = &(p_j2k->m_cp); - l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ? - &l_cp->tcps[p_j2k->m_current_tile_number] : - p_j2k->m_specific_param.m_decoder.m_default_tcp; - - /* precondition again */ - assert(compno < p_j2k->m_private_image->numcomps); - - l_tccp = &l_tcp->tccps[compno]; - l_current_ptr = p_header_data; - - /* make sure room is sufficient */ - if (*p_header_size < 5) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading SPCod SPCoc element\n"); - return OPJ_FALSE; - } - - opj_read_bytes(l_current_ptr, &l_tccp->numresolutions ,1); /* SPcox (D) */ - ++l_tccp->numresolutions; /* tccp->numresolutions = read() + 1 */ - if (l_tccp->numresolutions > OPJ_J2K_MAXRLVLS) { - opj_event_msg(p_manager, EVT_ERROR, - "Invalid value for numresolutions : %d, max value is set in openjpeg.h at %d\n", - l_tccp->numresolutions, OPJ_J2K_MAXRLVLS); - return OPJ_FALSE; - } - ++l_current_ptr; - - /* If user wants to remove more resolutions than the codestream contains, return error */ - if (l_cp->m_specific_param.m_dec.m_reduce >= l_tccp->numresolutions) { - opj_event_msg(p_manager, EVT_ERROR, "Error decoding component %d.\nThe number of resolutions to remove is higher than the number " - "of resolutions of this component\nModify the cp_reduce parameter.\n\n", compno); - p_j2k->m_specific_param.m_decoder.m_state |= 0x8000;/* FIXME J2K_DEC_STATE_ERR;*/ - return OPJ_FALSE; - } - - opj_read_bytes(l_current_ptr,&l_tccp->cblkw ,1); /* SPcoc (E) */ - ++l_current_ptr; - l_tccp->cblkw += 2; - - opj_read_bytes(l_current_ptr,&l_tccp->cblkh ,1); /* SPcoc (F) */ - ++l_current_ptr; - l_tccp->cblkh += 2; - - opj_read_bytes(l_current_ptr,&l_tccp->cblksty ,1); /* SPcoc (G) */ - ++l_current_ptr; - - opj_read_bytes(l_current_ptr,&l_tccp->qmfbid ,1); /* SPcoc (H) */ - ++l_current_ptr; - - *p_header_size = *p_header_size - 5; - - /* use custom precinct size ? */ - if (l_tccp->csty & J2K_CCP_CSTY_PRT) { - if (*p_header_size < l_tccp->numresolutions) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading SPCod SPCoc element\n"); - return OPJ_FALSE; - } - - for (i = 0; i < l_tccp->numresolutions; ++i) { - opj_read_bytes(l_current_ptr,&l_tmp ,1); /* SPcoc (I_i) */ - ++l_current_ptr; - l_tccp->prcw[i] = l_tmp & 0xf; - l_tccp->prch[i] = l_tmp >> 4; - } - - *p_header_size = *p_header_size - l_tccp->numresolutions; - } - else { - /* set default size for the precinct width and height */ - for (i = 0; i < l_tccp->numresolutions; ++i) { - l_tccp->prcw[i] = 15; - l_tccp->prch[i] = 15; - } - } - -#ifdef WIP_REMOVE_MSD - /* INDEX >> */ - if (p_j2k->cstr_info && compno == 0) { - OPJ_UINT32 l_data_size = l_tccp->numresolutions * sizeof(OPJ_UINT32); - - p_j2k->cstr_info->tile[p_j2k->m_current_tile_number].tccp_info[compno].cblkh = l_tccp->cblkh; - p_j2k->cstr_info->tile[p_j2k->m_current_tile_number].tccp_info[compno].cblkw = l_tccp->cblkw; - p_j2k->cstr_info->tile[p_j2k->m_current_tile_number].tccp_info[compno].numresolutions = l_tccp->numresolutions; - p_j2k->cstr_info->tile[p_j2k->m_current_tile_number].tccp_info[compno].cblksty = l_tccp->cblksty; - p_j2k->cstr_info->tile[p_j2k->m_current_tile_number].tccp_info[compno].qmfbid = l_tccp->qmfbid; - - memcpy(p_j2k->cstr_info->tile[p_j2k->m_current_tile_number].pdx,l_tccp->prcw, l_data_size); - memcpy(p_j2k->cstr_info->tile[p_j2k->m_current_tile_number].pdy,l_tccp->prch, l_data_size); - } - /* << INDEX */ -#endif - - return OPJ_TRUE; -} - -void opj_j2k_copy_tile_component_parameters( opj_j2k_t *p_j2k ) -{ - /* loop */ - OPJ_UINT32 i; - opj_cp_t *l_cp = NULL; - opj_tcp_t *l_tcp = NULL; - opj_tccp_t *l_ref_tccp = NULL, *l_copied_tccp = NULL; - OPJ_UINT32 l_prc_size; - - /* preconditions */ - assert(p_j2k != 00); - - l_cp = &(p_j2k->m_cp); - l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ? /* FIXME J2K_DEC_STATE_TPH*/ - &l_cp->tcps[p_j2k->m_current_tile_number] : - p_j2k->m_specific_param.m_decoder.m_default_tcp; - - l_ref_tccp = &l_tcp->tccps[0]; - l_copied_tccp = l_ref_tccp + 1; - l_prc_size = l_ref_tccp->numresolutions * (OPJ_UINT32)sizeof(OPJ_UINT32); - - for (i=1; im_private_image->numcomps; ++i) { - l_copied_tccp->numresolutions = l_ref_tccp->numresolutions; - l_copied_tccp->cblkw = l_ref_tccp->cblkw; - l_copied_tccp->cblkh = l_ref_tccp->cblkh; - l_copied_tccp->cblksty = l_ref_tccp->cblksty; - l_copied_tccp->qmfbid = l_ref_tccp->qmfbid; - memcpy(l_copied_tccp->prcw,l_ref_tccp->prcw,l_prc_size); - memcpy(l_copied_tccp->prch,l_ref_tccp->prch,l_prc_size); - ++l_copied_tccp; - } -} - -OPJ_UINT32 opj_j2k_get_SQcd_SQcc_size ( opj_j2k_t *p_j2k, - OPJ_UINT32 p_tile_no, - OPJ_UINT32 p_comp_no ) -{ - OPJ_UINT32 l_num_bands; - - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - opj_tccp_t *l_tccp = 00; - - /* preconditions */ - assert(p_j2k != 00); - - l_cp = &(p_j2k->m_cp); - l_tcp = &l_cp->tcps[p_tile_no]; - l_tccp = &l_tcp->tccps[p_comp_no]; - - /* preconditions again */ - assert(p_tile_no < l_cp->tw * l_cp->th); - assert(p_comp_no < p_j2k->m_private_image->numcomps); - - l_num_bands = (l_tccp->qntsty == J2K_CCP_QNTSTY_SIQNT) ? 1 : (l_tccp->numresolutions * 3 - 2); - - if (l_tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) { - return 1 + l_num_bands; - } - else { - return 1 + 2*l_num_bands; - } -} - -OPJ_BOOL opj_j2k_write_SQcd_SQcc( opj_j2k_t *p_j2k, - OPJ_UINT32 p_tile_no, - OPJ_UINT32 p_comp_no, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_header_size, - struct opj_event_mgr * p_manager ) -{ - OPJ_UINT32 l_header_size; - OPJ_UINT32 l_band_no, l_num_bands; - OPJ_UINT32 l_expn,l_mant; - - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - opj_tccp_t *l_tccp = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_header_size != 00); - assert(p_manager != 00); - assert(p_data != 00); - - l_cp = &(p_j2k->m_cp); - l_tcp = &l_cp->tcps[p_tile_no]; - l_tccp = &l_tcp->tccps[p_comp_no]; - - /* preconditions again */ - assert(p_tile_no < l_cp->tw * l_cp->th); - assert(p_comp_no m_private_image->numcomps); - - l_num_bands = (l_tccp->qntsty == J2K_CCP_QNTSTY_SIQNT) ? 1 : (l_tccp->numresolutions * 3 - 2); - - if (l_tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) { - l_header_size = 1 + l_num_bands; - - if (*p_header_size < l_header_size) { - opj_event_msg(p_manager, EVT_ERROR, "Error writing SQcd SQcc element\n"); - return OPJ_FALSE; - } - - opj_write_bytes(p_data,l_tccp->qntsty + (l_tccp->numgbits << 5), 1); /* Sqcx */ - ++p_data; - - for (l_band_no = 0; l_band_no < l_num_bands; ++l_band_no) { - l_expn = (OPJ_UINT32)l_tccp->stepsizes[l_band_no].expn; - opj_write_bytes(p_data, l_expn << 3, 1); /* SPqcx_i */ - ++p_data; - } - } - else { - l_header_size = 1 + 2*l_num_bands; - - if (*p_header_size < l_header_size) { - opj_event_msg(p_manager, EVT_ERROR, "Error writing SQcd SQcc element\n"); - return OPJ_FALSE; - } - - opj_write_bytes(p_data,l_tccp->qntsty + (l_tccp->numgbits << 5), 1); /* Sqcx */ - ++p_data; - - for (l_band_no = 0; l_band_no < l_num_bands; ++l_band_no) { - l_expn = (OPJ_UINT32)l_tccp->stepsizes[l_band_no].expn; - l_mant = (OPJ_UINT32)l_tccp->stepsizes[l_band_no].mant; - - opj_write_bytes(p_data, (l_expn << 11) + l_mant, 2); /* SPqcx_i */ - p_data += 2; - } - } - - *p_header_size = *p_header_size - l_header_size; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k, - OPJ_UINT32 p_comp_no, - OPJ_BYTE* p_header_data, - OPJ_UINT32 * p_header_size, - opj_event_mgr_t * p_manager - ) -{ - /* loop*/ - OPJ_UINT32 l_band_no; - opj_cp_t *l_cp = 00; - opj_tcp_t *l_tcp = 00; - opj_tccp_t *l_tccp = 00; - OPJ_BYTE * l_current_ptr = 00; - OPJ_UINT32 l_tmp, l_num_band; - - /* preconditions*/ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_header_data != 00); - - l_cp = &(p_j2k->m_cp); - /* come from tile part header or main header ?*/ - l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ? /*FIXME J2K_DEC_STATE_TPH*/ - &l_cp->tcps[p_j2k->m_current_tile_number] : - p_j2k->m_specific_param.m_decoder.m_default_tcp; - - /* precondition again*/ - assert(p_comp_no < p_j2k->m_private_image->numcomps); - - l_tccp = &l_tcp->tccps[p_comp_no]; - l_current_ptr = p_header_data; - - if (*p_header_size < 1) { - opj_event_msg(p_manager, EVT_ERROR, "Error reading SQcd or SQcc element\n"); - return OPJ_FALSE; - } - *p_header_size -= 1; - - opj_read_bytes(l_current_ptr, &l_tmp ,1); /* Sqcx */ - ++l_current_ptr; - - l_tccp->qntsty = l_tmp & 0x1f; - l_tccp->numgbits = l_tmp >> 5; - if (l_tccp->qntsty == J2K_CCP_QNTSTY_SIQNT) { - l_num_band = 1; - } - else { - l_num_band = (l_tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) ? - (*p_header_size) : - (*p_header_size) / 2; - - if( l_num_band > OPJ_J2K_MAXBANDS ) { - opj_event_msg(p_manager, EVT_WARNING, "While reading CCP_QNTSTY element inside QCD or QCC marker segment, " - "number of subbands (%d) is greater to OPJ_J2K_MAXBANDS (%d). So we limit the number of elements stored to " - "OPJ_J2K_MAXBANDS (%d) and skip the rest. \n", l_num_band, OPJ_J2K_MAXBANDS, OPJ_J2K_MAXBANDS); - /*return OPJ_FALSE;*/ - } - } - -#ifdef USE_JPWL - if (l_cp->correct) { - - /* if JPWL is on, we check whether there are too many subbands */ - if (/*(l_num_band < 0) ||*/ (l_num_band >= OPJ_J2K_MAXBANDS)) { - opj_event_msg(p_manager, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, - "JPWL: bad number of subbands in Sqcx (%d)\n", - l_num_band); - if (!JPWL_ASSUME) { - opj_event_msg(p_manager, EVT_ERROR, "JPWL: giving up\n"); - return OPJ_FALSE; - } - /* we try to correct */ - l_num_band = 1; - opj_event_msg(p_manager, EVT_WARNING, "- trying to adjust them\n" - "- setting number of bands to %d => HYPOTHESIS!!!\n", - l_num_band); - }; - - }; -#endif /* USE_JPWL */ - - if (l_tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) { - for (l_band_no = 0; l_band_no < l_num_band; l_band_no++) { - opj_read_bytes(l_current_ptr, &l_tmp ,1); /* SPqcx_i */ - ++l_current_ptr; - if (l_band_no < OPJ_J2K_MAXBANDS){ - l_tccp->stepsizes[l_band_no].expn = (OPJ_INT32)(l_tmp >> 3); - l_tccp->stepsizes[l_band_no].mant = 0; - } - } - *p_header_size = *p_header_size - l_num_band; - } - else { - for (l_band_no = 0; l_band_no < l_num_band; l_band_no++) { - opj_read_bytes(l_current_ptr, &l_tmp ,2); /* SPqcx_i */ - l_current_ptr+=2; - if (l_band_no < OPJ_J2K_MAXBANDS){ - l_tccp->stepsizes[l_band_no].expn = (OPJ_INT32)(l_tmp >> 11); - l_tccp->stepsizes[l_band_no].mant = l_tmp & 0x7ff; - } - } - *p_header_size = *p_header_size - 2*l_num_band; - } - - /* Add Antonin : if scalar_derived -> compute other stepsizes */ - if (l_tccp->qntsty == J2K_CCP_QNTSTY_SIQNT) { - for (l_band_no = 1; l_band_no < OPJ_J2K_MAXBANDS; l_band_no++) { - l_tccp->stepsizes[l_band_no].expn = - ((OPJ_INT32)(l_tccp->stepsizes[0].expn) - (OPJ_INT32)((l_band_no - 1) / 3) > 0) ? - (OPJ_INT32)(l_tccp->stepsizes[0].expn) - (OPJ_INT32)((l_band_no - 1) / 3) : 0; - l_tccp->stepsizes[l_band_no].mant = l_tccp->stepsizes[0].mant; - } - } - - return OPJ_TRUE; -} - -void opj_j2k_copy_tile_quantization_parameters( opj_j2k_t *p_j2k ) -{ - OPJ_UINT32 i; - opj_cp_t *l_cp = NULL; - opj_tcp_t *l_tcp = NULL; - opj_tccp_t *l_ref_tccp = NULL; - opj_tccp_t *l_copied_tccp = NULL; - OPJ_UINT32 l_size; - - /* preconditions */ - assert(p_j2k != 00); - - l_cp = &(p_j2k->m_cp); - l_tcp = p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH ? - &l_cp->tcps[p_j2k->m_current_tile_number] : - p_j2k->m_specific_param.m_decoder.m_default_tcp; - - l_ref_tccp = &l_tcp->tccps[0]; - l_copied_tccp = l_ref_tccp + 1; - l_size = OPJ_J2K_MAXBANDS * sizeof(opj_stepsize_t); - - for (i=1;im_private_image->numcomps;++i) { - l_copied_tccp->qntsty = l_ref_tccp->qntsty; - l_copied_tccp->numgbits = l_ref_tccp->numgbits; - memcpy(l_copied_tccp->stepsizes,l_ref_tccp->stepsizes,l_size); - ++l_copied_tccp; - } -} - -static void opj_j2k_dump_tile_info( opj_tcp_t * l_default_tile,OPJ_INT32 numcomps,FILE* out_stream) -{ - if (l_default_tile) - { - OPJ_INT32 compno; - - fprintf(out_stream, "\t default tile {\n"); - fprintf(out_stream, "\t\t csty=%#x\n", l_default_tile->csty); - fprintf(out_stream, "\t\t prg=%#x\n", l_default_tile->prg); - fprintf(out_stream, "\t\t numlayers=%d\n", l_default_tile->numlayers); - fprintf(out_stream, "\t\t mct=%x\n", l_default_tile->mct); - - for (compno = 0; compno < numcomps; compno++) { - opj_tccp_t *l_tccp = &(l_default_tile->tccps[compno]); - OPJ_UINT32 resno; - OPJ_INT32 bandno, numbands; - - /* coding style*/ - fprintf(out_stream, "\t\t comp %d {\n", compno); - fprintf(out_stream, "\t\t\t csty=%#x\n", l_tccp->csty); - fprintf(out_stream, "\t\t\t numresolutions=%d\n", l_tccp->numresolutions); - fprintf(out_stream, "\t\t\t cblkw=2^%d\n", l_tccp->cblkw); - fprintf(out_stream, "\t\t\t cblkh=2^%d\n", l_tccp->cblkh); - fprintf(out_stream, "\t\t\t cblksty=%#x\n", l_tccp->cblksty); - fprintf(out_stream, "\t\t\t qmfbid=%d\n", l_tccp->qmfbid); - - fprintf(out_stream, "\t\t\t preccintsize (w,h)="); - for (resno = 0; resno < l_tccp->numresolutions; resno++) { - fprintf(out_stream, "(%d,%d) ", l_tccp->prcw[resno], l_tccp->prch[resno]); - } - fprintf(out_stream, "\n"); - - /* quantization style*/ - fprintf(out_stream, "\t\t\t qntsty=%d\n", l_tccp->qntsty); - fprintf(out_stream, "\t\t\t numgbits=%d\n", l_tccp->numgbits); - fprintf(out_stream, "\t\t\t stepsizes (m,e)="); - numbands = (l_tccp->qntsty == J2K_CCP_QNTSTY_SIQNT) ? 1 : (OPJ_INT32)l_tccp->numresolutions * 3 - 2; - for (bandno = 0; bandno < numbands; bandno++) { - fprintf(out_stream, "(%d,%d) ", l_tccp->stepsizes[bandno].mant, - l_tccp->stepsizes[bandno].expn); - } - fprintf(out_stream, "\n"); - - /* RGN value*/ - fprintf(out_stream, "\t\t\t roishift=%d\n", l_tccp->roishift); - - fprintf(out_stream, "\t\t }\n"); - } /*end of component of default tile*/ - fprintf(out_stream, "\t }\n"); /*end of default tile*/ - } -} - -void j2k_dump (opj_j2k_t* p_j2k, OPJ_INT32 flag, FILE* out_stream) -{ - /* Check if the flag is compatible with j2k file*/ - if ( (flag & OPJ_JP2_INFO) || (flag & OPJ_JP2_IND)){ - fprintf(out_stream, "Wrong flag\n"); - return; - } - - /* Dump the image_header */ - if (flag & OPJ_IMG_INFO){ - if (p_j2k->m_private_image) - j2k_dump_image_header(p_j2k->m_private_image, 0, out_stream); - } - - /* Dump the codestream info from main header */ - if (flag & OPJ_J2K_MH_INFO){ - opj_j2k_dump_MH_info(p_j2k, out_stream); - } - /* Dump all tile/codestream info */ - if (flag & OPJ_J2K_TCH_INFO){ - OPJ_UINT32 l_nb_tiles = p_j2k->m_cp.th * p_j2k->m_cp.tw; - OPJ_UINT32 i; - opj_tcp_t * l_tcp = p_j2k->m_cp.tcps; - for (i=0;im_private_image->numcomps, out_stream); - ++l_tcp; - } - } - - /* Dump the codestream info of the current tile */ - if (flag & OPJ_J2K_TH_INFO){ - - } - - /* Dump the codestream index from main header */ - if (flag & OPJ_J2K_MH_IND){ - opj_j2k_dump_MH_index(p_j2k, out_stream); - } - - /* Dump the codestream index of the current tile */ - if (flag & OPJ_J2K_TH_IND){ - - } - -} - -void opj_j2k_dump_MH_index(opj_j2k_t* p_j2k, FILE* out_stream) -{ - opj_codestream_index_t* cstr_index = p_j2k->cstr_index; - OPJ_UINT32 it_marker, it_tile, it_tile_part; - - fprintf(out_stream, "Codestream index from main header: {\n"); - - fprintf(out_stream, "\t Main header start position=%" PRIi64 "\n" - "\t Main header end position=%" PRIi64 "\n", - cstr_index->main_head_start, cstr_index->main_head_end); - - fprintf(out_stream, "\t Marker list: {\n"); - - if (cstr_index->marker){ - for (it_marker=0; it_marker < cstr_index->marknum ; it_marker++){ - fprintf(out_stream, "\t\t type=%#x, pos=%" PRIi64 ", len=%d\n", - cstr_index->marker[it_marker].type, - cstr_index->marker[it_marker].pos, - cstr_index->marker[it_marker].len ); - } - } - - fprintf(out_stream, "\t }\n"); - - if (cstr_index->tile_index){ - - /* Simple test to avoid to write empty information*/ - OPJ_UINT32 l_acc_nb_of_tile_part = 0; - for (it_tile=0; it_tile < cstr_index->nb_of_tiles ; it_tile++){ - l_acc_nb_of_tile_part += cstr_index->tile_index[it_tile].nb_tps; - } - - if (l_acc_nb_of_tile_part) - { - fprintf(out_stream, "\t Tile index: {\n"); - - for (it_tile=0; it_tile < cstr_index->nb_of_tiles ; it_tile++){ - OPJ_UINT32 nb_of_tile_part = cstr_index->tile_index[it_tile].nb_tps; - - fprintf(out_stream, "\t\t nb of tile-part in tile [%d]=%d\n", it_tile, nb_of_tile_part); - - if (cstr_index->tile_index[it_tile].tp_index){ - for (it_tile_part =0; it_tile_part < nb_of_tile_part; it_tile_part++){ - fprintf(out_stream, "\t\t\t tile-part[%d]: star_pos=%" PRIi64 ", end_header=%" PRIi64 ", end_pos=%" PRIi64 ".\n", - it_tile_part, - cstr_index->tile_index[it_tile].tp_index[it_tile_part].start_pos, - cstr_index->tile_index[it_tile].tp_index[it_tile_part].end_header, - cstr_index->tile_index[it_tile].tp_index[it_tile_part].end_pos); - } - } - - if (cstr_index->tile_index[it_tile].marker){ - for (it_marker=0; it_marker < cstr_index->tile_index[it_tile].marknum ; it_marker++){ - fprintf(out_stream, "\t\t type=%#x, pos=%" PRIi64 ", len=%d\n", - cstr_index->tile_index[it_tile].marker[it_marker].type, - cstr_index->tile_index[it_tile].marker[it_marker].pos, - cstr_index->tile_index[it_tile].marker[it_marker].len ); - } - } - } - fprintf(out_stream,"\t }\n"); - } - } - - fprintf(out_stream,"}\n"); - -} - - -void opj_j2k_dump_MH_info(opj_j2k_t* p_j2k, FILE* out_stream) -{ - - fprintf(out_stream, "Codestream info from main header: {\n"); - - fprintf(out_stream, "\t tx0=%d, ty0=%d\n", p_j2k->m_cp.tx0, p_j2k->m_cp.ty0); - fprintf(out_stream, "\t tdx=%d, tdy=%d\n", p_j2k->m_cp.tdx, p_j2k->m_cp.tdy); - fprintf(out_stream, "\t tw=%d, th=%d\n", p_j2k->m_cp.tw, p_j2k->m_cp.th); - opj_j2k_dump_tile_info(p_j2k->m_specific_param.m_decoder.m_default_tcp,(OPJ_INT32)p_j2k->m_private_image->numcomps, out_stream); - fprintf(out_stream, "}\n"); -} - -void j2k_dump_image_header(opj_image_t* img_header, OPJ_BOOL dev_dump_flag, FILE* out_stream) -{ - char tab[2]; - - if (dev_dump_flag){ - fprintf(stdout, "[DEV] Dump an image_header struct {\n"); - tab[0] = '\0'; - } - else { - fprintf(out_stream, "Image info {\n"); - tab[0] = '\t';tab[1] = '\0'; - } - - fprintf(out_stream, "%s x0=%d, y0=%d\n", tab, img_header->x0, img_header->y0); - fprintf(out_stream, "%s x1=%d, y1=%d\n", tab, img_header->x1, img_header->y1); - fprintf(out_stream, "%s numcomps=%d\n", tab, img_header->numcomps); - - if (img_header->comps){ - OPJ_UINT32 compno; - for (compno = 0; compno < img_header->numcomps; compno++) { - fprintf(out_stream, "%s\t component %d {\n", tab, compno); - j2k_dump_image_comp_header(&(img_header->comps[compno]), dev_dump_flag, out_stream); - fprintf(out_stream,"%s}\n",tab); - } - } - - fprintf(out_stream, "}\n"); -} - -void j2k_dump_image_comp_header(opj_image_comp_t* comp_header, OPJ_BOOL dev_dump_flag, FILE* out_stream) -{ - char tab[3]; - - if (dev_dump_flag){ - fprintf(stdout, "[DEV] Dump an image_comp_header struct {\n"); - tab[0] = '\0'; - } else { - tab[0] = '\t';tab[1] = '\t';tab[2] = '\0'; - } - - fprintf(out_stream, "%s dx=%d, dy=%d\n", tab, comp_header->dx, comp_header->dy); - fprintf(out_stream, "%s prec=%d\n", tab, comp_header->prec); - fprintf(out_stream, "%s sgnd=%d\n", tab, comp_header->sgnd); - - if (dev_dump_flag) - fprintf(out_stream, "}\n"); -} - -opj_codestream_info_v2_t* j2k_get_cstr_info(opj_j2k_t* p_j2k) -{ - OPJ_UINT32 compno; - OPJ_UINT32 numcomps = p_j2k->m_private_image->numcomps; - opj_tcp_t *l_default_tile; - opj_codestream_info_v2_t* cstr_info = (opj_codestream_info_v2_t*) opj_calloc(1,sizeof(opj_codestream_info_v2_t)); - if (!cstr_info) - return NULL; - - cstr_info->nbcomps = p_j2k->m_private_image->numcomps; - - cstr_info->tx0 = p_j2k->m_cp.tx0; - cstr_info->ty0 = p_j2k->m_cp.ty0; - cstr_info->tdx = p_j2k->m_cp.tdx; - cstr_info->tdy = p_j2k->m_cp.tdy; - cstr_info->tw = p_j2k->m_cp.tw; - cstr_info->th = p_j2k->m_cp.th; - - cstr_info->tile_info = NULL; /* Not fill from the main header*/ - - l_default_tile = p_j2k->m_specific_param.m_decoder.m_default_tcp; - - cstr_info->m_default_tile_info.csty = l_default_tile->csty; - cstr_info->m_default_tile_info.prg = l_default_tile->prg; - cstr_info->m_default_tile_info.numlayers = l_default_tile->numlayers; - cstr_info->m_default_tile_info.mct = l_default_tile->mct; - - cstr_info->m_default_tile_info.tccp_info = (opj_tccp_info_t*) opj_calloc(cstr_info->nbcomps, sizeof(opj_tccp_info_t)); - if (!cstr_info->m_default_tile_info.tccp_info) - { - opj_destroy_cstr_info(&cstr_info); - return NULL; - } - - for (compno = 0; compno < numcomps; compno++) { - opj_tccp_t *l_tccp = &(l_default_tile->tccps[compno]); - opj_tccp_info_t *l_tccp_info = &(cstr_info->m_default_tile_info.tccp_info[compno]); - OPJ_INT32 bandno, numbands; - - /* coding style*/ - l_tccp_info->csty = l_tccp->csty; - l_tccp_info->numresolutions = l_tccp->numresolutions; - l_tccp_info->cblkw = l_tccp->cblkw; - l_tccp_info->cblkh = l_tccp->cblkh; - l_tccp_info->cblksty = l_tccp->cblksty; - l_tccp_info->qmfbid = l_tccp->qmfbid; - if (l_tccp->numresolutions < OPJ_J2K_MAXRLVLS) - { - memcpy(l_tccp_info->prch, l_tccp->prch, l_tccp->numresolutions); - memcpy(l_tccp_info->prcw, l_tccp->prcw, l_tccp->numresolutions); - } - - /* quantization style*/ - l_tccp_info->qntsty = l_tccp->qntsty; - l_tccp_info->numgbits = l_tccp->numgbits; - - numbands = (l_tccp->qntsty == J2K_CCP_QNTSTY_SIQNT) ? 1 : (OPJ_INT32)l_tccp->numresolutions * 3 - 2; - if (numbands < OPJ_J2K_MAXBANDS) { - for (bandno = 0; bandno < numbands; bandno++) { - l_tccp_info->stepsizes_mant[bandno] = (OPJ_UINT32)l_tccp->stepsizes[bandno].mant; - l_tccp_info->stepsizes_expn[bandno] = (OPJ_UINT32)l_tccp->stepsizes[bandno].expn; - } - } - - /* RGN value*/ - l_tccp_info->roishift = l_tccp->roishift; - } - - return cstr_info; -} - -opj_codestream_index_t* j2k_get_cstr_index(opj_j2k_t* p_j2k) -{ - opj_codestream_index_t* l_cstr_index = (opj_codestream_index_t*) - opj_calloc(1,sizeof(opj_codestream_index_t)); - if (!l_cstr_index) - return NULL; - - l_cstr_index->main_head_start = p_j2k->cstr_index->main_head_start; - l_cstr_index->main_head_end = p_j2k->cstr_index->main_head_end; - l_cstr_index->codestream_size = p_j2k->cstr_index->codestream_size; - - l_cstr_index->marknum = p_j2k->cstr_index->marknum; - l_cstr_index->marker = (opj_marker_info_t*)opj_malloc(l_cstr_index->marknum*sizeof(opj_marker_info_t)); - if (!l_cstr_index->marker){ - opj_free( l_cstr_index); - return NULL; - } - - if (p_j2k->cstr_index->marker) - memcpy(l_cstr_index->marker, p_j2k->cstr_index->marker, l_cstr_index->marknum * sizeof(opj_marker_info_t) ); - else{ - opj_free(l_cstr_index->marker); - l_cstr_index->marker = NULL; - } - - l_cstr_index->nb_of_tiles = p_j2k->cstr_index->nb_of_tiles; - l_cstr_index->tile_index = (opj_tile_index_t*)opj_calloc(l_cstr_index->nb_of_tiles, sizeof(opj_tile_index_t) ); - if (!l_cstr_index->tile_index){ - opj_free( l_cstr_index->marker); - opj_free( l_cstr_index); - return NULL; - } - - if (!p_j2k->cstr_index->tile_index){ - opj_free(l_cstr_index->tile_index); - l_cstr_index->tile_index = NULL; - } - else { - OPJ_UINT32 it_tile = 0; - for (it_tile = 0; it_tile < l_cstr_index->nb_of_tiles; it_tile++ ){ - - /* Tile Marker*/ - l_cstr_index->tile_index[it_tile].marknum = p_j2k->cstr_index->tile_index[it_tile].marknum; - - l_cstr_index->tile_index[it_tile].marker = - (opj_marker_info_t*)opj_malloc(l_cstr_index->tile_index[it_tile].marknum*sizeof(opj_marker_info_t)); - - if (!l_cstr_index->tile_index[it_tile].marker) { - OPJ_UINT32 it_tile_free; - - for (it_tile_free=0; it_tile_free < it_tile; it_tile_free++){ - opj_free(l_cstr_index->tile_index[it_tile_free].marker); - } - - opj_free( l_cstr_index->tile_index); - opj_free( l_cstr_index->marker); - opj_free( l_cstr_index); - return NULL; - } - - if (p_j2k->cstr_index->tile_index[it_tile].marker) - memcpy( l_cstr_index->tile_index[it_tile].marker, - p_j2k->cstr_index->tile_index[it_tile].marker, - l_cstr_index->tile_index[it_tile].marknum * sizeof(opj_marker_info_t) ); - else{ - opj_free(l_cstr_index->tile_index[it_tile].marker); - l_cstr_index->tile_index[it_tile].marker = NULL; - } - - /* Tile part index*/ - l_cstr_index->tile_index[it_tile].nb_tps = p_j2k->cstr_index->tile_index[it_tile].nb_tps; - - l_cstr_index->tile_index[it_tile].tp_index = - (opj_tp_index_t*)opj_malloc(l_cstr_index->tile_index[it_tile].nb_tps*sizeof(opj_tp_index_t)); - - if(!l_cstr_index->tile_index[it_tile].tp_index){ - OPJ_UINT32 it_tile_free; - - for (it_tile_free=0; it_tile_free < it_tile; it_tile_free++){ - opj_free(l_cstr_index->tile_index[it_tile_free].marker); - opj_free(l_cstr_index->tile_index[it_tile_free].tp_index); - } - - opj_free( l_cstr_index->tile_index); - opj_free( l_cstr_index->marker); - opj_free( l_cstr_index); - return NULL; - } - - if (p_j2k->cstr_index->tile_index[it_tile].tp_index){ - memcpy( l_cstr_index->tile_index[it_tile].tp_index, - p_j2k->cstr_index->tile_index[it_tile].tp_index, - l_cstr_index->tile_index[it_tile].nb_tps * sizeof(opj_tp_index_t) ); - } - else{ - opj_free(l_cstr_index->tile_index[it_tile].tp_index); - l_cstr_index->tile_index[it_tile].tp_index = NULL; - } - - /* Packet index (NOT USED)*/ - l_cstr_index->tile_index[it_tile].nb_packet = 0; - l_cstr_index->tile_index[it_tile].packet_index = NULL; - - } - } - - return l_cstr_index; -} - -OPJ_BOOL opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k) -{ - OPJ_UINT32 it_tile=0; - - p_j2k->cstr_index->nb_of_tiles = p_j2k->m_cp.tw * p_j2k->m_cp.th; - p_j2k->cstr_index->tile_index = (opj_tile_index_t*)opj_calloc(p_j2k->cstr_index->nb_of_tiles, sizeof(opj_tile_index_t)); - if (!p_j2k->cstr_index->tile_index) - return OPJ_FALSE; - - for (it_tile=0; it_tile < p_j2k->cstr_index->nb_of_tiles; it_tile++){ - p_j2k->cstr_index->tile_index[it_tile].maxmarknum = 100; - p_j2k->cstr_index->tile_index[it_tile].marknum = 0; - p_j2k->cstr_index->tile_index[it_tile].marker = (opj_marker_info_t*) - opj_calloc(p_j2k->cstr_index->tile_index[it_tile].maxmarknum, sizeof(opj_marker_info_t)); - if (!p_j2k->cstr_index->tile_index[it_tile].marker) - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_decode_tiles ( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager) -{ - OPJ_BOOL l_go_on = OPJ_TRUE; - OPJ_UINT32 l_current_tile_no; - OPJ_UINT32 l_data_size,l_max_data_size; - OPJ_INT32 l_tile_x0,l_tile_y0,l_tile_x1,l_tile_y1; - OPJ_UINT32 l_nb_comps; - OPJ_BYTE * l_current_data; - OPJ_UINT32 nr_tiles = 0; - - l_current_data = (OPJ_BYTE*)opj_malloc(1000); - if (! l_current_data) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to decode tiles\n"); - return OPJ_FALSE; - } - l_max_data_size = 1000; - - while (OPJ_TRUE) { - if (! opj_j2k_read_tile_header( p_j2k, - &l_current_tile_no, - &l_data_size, - &l_tile_x0, &l_tile_y0, - &l_tile_x1, &l_tile_y1, - &l_nb_comps, - &l_go_on, - p_stream, - p_manager)) { - opj_free(l_current_data); - return OPJ_FALSE; - } - - if (! l_go_on) { - break; - } - - if (l_data_size > l_max_data_size) { - OPJ_BYTE *l_new_current_data = (OPJ_BYTE *) opj_realloc(l_current_data, l_data_size); - if (! l_new_current_data) { - opj_free(l_current_data); - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to decode tile %d/%d\n", l_current_tile_no +1, p_j2k->m_cp.th * p_j2k->m_cp.tw); - return OPJ_FALSE; - } - l_current_data = l_new_current_data; - l_max_data_size = l_data_size; - } - - if (! opj_j2k_decode_tile(p_j2k,l_current_tile_no,l_current_data,l_data_size,p_stream,p_manager)) { - opj_free(l_current_data); - opj_event_msg(p_manager, EVT_ERROR, "Failed to decode tile %d/%d\n", l_current_tile_no +1, p_j2k->m_cp.th * p_j2k->m_cp.tw); - return OPJ_FALSE; - } - opj_event_msg(p_manager, EVT_INFO, "Tile %d/%d has been decoded.\n", l_current_tile_no +1, p_j2k->m_cp.th * p_j2k->m_cp.tw); - - if (! opj_j2k_update_image_data(p_j2k->m_tcd,l_current_data, p_j2k->m_output_image)) { - opj_free(l_current_data); - return OPJ_FALSE; - } - opj_event_msg(p_manager, EVT_INFO, "Image data has been updated with tile %d.\n\n", l_current_tile_no + 1); - - if(opj_stream_get_number_byte_left(p_stream) == 0 - && p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NEOC) - break; - if(++nr_tiles == p_j2k->m_cp.th * p_j2k->m_cp.tw) - break; - } - - opj_free(l_current_data); - - return OPJ_TRUE; -} - -/** - * Sets up the procedures to do on decoding data. Developpers wanting to extend the library can add their own reading procedures. - */ -static void opj_j2k_setup_decoding (opj_j2k_t *p_j2k) -{ - /* preconditions*/ - assert(p_j2k != 00); - - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_decode_tiles); - /* DEVELOPER CORNER, add your custom procedures */ - -} - -/* - * Read and decode one tile. - */ -static OPJ_BOOL opj_j2k_decode_one_tile ( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager) -{ - OPJ_BOOL l_go_on = OPJ_TRUE; - OPJ_UINT32 l_current_tile_no; - OPJ_UINT32 l_tile_no_to_dec; - OPJ_UINT32 l_data_size,l_max_data_size; - OPJ_INT32 l_tile_x0,l_tile_y0,l_tile_x1,l_tile_y1; - OPJ_UINT32 l_nb_comps; - OPJ_BYTE * l_current_data; - - l_current_data = (OPJ_BYTE*)opj_malloc(1000); - if (! l_current_data) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to decode one tile\n"); - return OPJ_FALSE; - } - l_max_data_size = 1000; - - /*Allocate and initialize some elements of codestrem index if not already done*/ - if( !p_j2k->cstr_index->tile_index) - { - if (!opj_j2k_allocate_tile_element_cstr_index(p_j2k)){ - opj_free(l_current_data); - return OPJ_FALSE; - } - } - /* Move into the codestream to the first SOT used to decode the desired tile */ - l_tile_no_to_dec = (OPJ_UINT32)p_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec; - if (p_j2k->cstr_index->tile_index) - if(p_j2k->cstr_index->tile_index->tp_index) - { - if ( ! p_j2k->cstr_index->tile_index[l_tile_no_to_dec].nb_tps) { - /* the index for this tile has not been built, - * so move to the last SOT read */ - if ( !(opj_stream_read_seek(p_stream, p_j2k->m_specific_param.m_decoder.m_last_sot_read_pos+2, p_manager)) ){ - opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n"); - opj_free(l_current_data); - return OPJ_FALSE; - } - } - else{ - if ( !(opj_stream_read_seek(p_stream, p_j2k->cstr_index->tile_index[l_tile_no_to_dec].tp_index[0].start_pos+2, p_manager)) ) { - opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n"); - opj_free(l_current_data); - return OPJ_FALSE; - } - } - /* Special case if we have previously read the EOC marker (if the previous tile getted is the last ) */ - if(p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_EOC) - p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_TPHSOT; - } - - while (OPJ_TRUE) { - if (! opj_j2k_read_tile_header( p_j2k, - &l_current_tile_no, - &l_data_size, - &l_tile_x0, &l_tile_y0, - &l_tile_x1, &l_tile_y1, - &l_nb_comps, - &l_go_on, - p_stream, - p_manager)) { - opj_free(l_current_data); - return OPJ_FALSE; - } - - if (! l_go_on) { - break; - } - - if (l_data_size > l_max_data_size) { - OPJ_BYTE *l_new_current_data = (OPJ_BYTE *) opj_realloc(l_current_data, l_data_size); - if (! l_new_current_data) { - opj_free(l_current_data); - l_current_data = NULL; - /* TODO: LH: why tile numbering policy used in messages differs from - the one used in opj_j2k_decode_tiles() ? */ - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to decode tile %d/%d\n", l_current_tile_no, (p_j2k->m_cp.th * p_j2k->m_cp.tw) - 1); - return OPJ_FALSE; - } - l_current_data = l_new_current_data; - l_max_data_size = l_data_size; - } - - if (! opj_j2k_decode_tile(p_j2k,l_current_tile_no,l_current_data,l_data_size,p_stream,p_manager)) { - opj_free(l_current_data); - return OPJ_FALSE; - } - opj_event_msg(p_manager, EVT_INFO, "Tile %d/%d has been decoded.\n", l_current_tile_no, (p_j2k->m_cp.th * p_j2k->m_cp.tw) - 1); - - if (! opj_j2k_update_image_data(p_j2k->m_tcd,l_current_data, p_j2k->m_output_image)) { - opj_free(l_current_data); - return OPJ_FALSE; - } - opj_event_msg(p_manager, EVT_INFO, "Image data has been updated with tile %d.\n\n", l_current_tile_no); - - if(l_current_tile_no == l_tile_no_to_dec) - { - /* move into the codestream to the the first SOT (FIXME or not move?)*/ - if (!(opj_stream_read_seek(p_stream, p_j2k->cstr_index->main_head_end + 2, p_manager) ) ) { - opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n"); - return OPJ_FALSE; - } - break; - } - else { - opj_event_msg(p_manager, EVT_WARNING, "Tile read, decode and updated is not the desired (%d vs %d).\n", l_current_tile_no, l_tile_no_to_dec); - } - - } - - opj_free(l_current_data); - - return OPJ_TRUE; -} - -/** - * Sets up the procedures to do on decoding one tile. Developpers wanting to extend the library can add their own reading procedures. - */ -static void opj_j2k_setup_decoding_tile (opj_j2k_t *p_j2k) -{ - /* preconditions*/ - assert(p_j2k != 00); - - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_decode_one_tile); - /* DEVELOPER CORNER, add your custom procedures */ - -} - -OPJ_BOOL opj_j2k_decode(opj_j2k_t * p_j2k, - opj_stream_private_t * p_stream, - opj_image_t * p_image, - opj_event_mgr_t * p_manager) -{ - OPJ_UINT32 compno; - - if (!p_image) - return OPJ_FALSE; - - p_j2k->m_output_image = opj_image_create0(); - if (! (p_j2k->m_output_image)) { - return OPJ_FALSE; - } - opj_copy_image_header(p_image, p_j2k->m_output_image); - - /* customization of the decoding */ - opj_j2k_setup_decoding(p_j2k); - - /* Decode the codestream */ - if (! opj_j2k_exec (p_j2k,p_j2k->m_procedure_list,p_stream,p_manager)) { - opj_image_destroy(p_j2k->m_private_image); - p_j2k->m_private_image = NULL; - return OPJ_FALSE; - } - - /* Move data and copy one information from codec to output image*/ - for (compno = 0; compno < p_image->numcomps; compno++) { - p_image->comps[compno].resno_decoded = p_j2k->m_output_image->comps[compno].resno_decoded; - p_image->comps[compno].data = p_j2k->m_output_image->comps[compno].data; -#if 0 - char fn[256]; - sprintf( fn, "/tmp/%d.raw", compno ); - FILE *debug = fopen( fn, "wb" ); - fwrite( p_image->comps[compno].data, sizeof(OPJ_INT32), p_image->comps[compno].w * p_image->comps[compno].h, debug ); - fclose( debug ); -#endif - p_j2k->m_output_image->comps[compno].data = NULL; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_get_tile( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_image_t* p_image, - opj_event_mgr_t * p_manager, - OPJ_UINT32 tile_index ) -{ - OPJ_UINT32 compno; - OPJ_UINT32 l_tile_x, l_tile_y; - opj_image_comp_t* l_img_comp; - - if (!p_image) { - opj_event_msg(p_manager, EVT_ERROR, "We need an image previously created.\n"); - return OPJ_FALSE; - } - - if ( /*(tile_index < 0) &&*/ (tile_index >= p_j2k->m_cp.tw * p_j2k->m_cp.th) ){ - opj_event_msg(p_manager, EVT_ERROR, "Tile index provided by the user is incorrect %d (max = %d) \n", tile_index, (p_j2k->m_cp.tw * p_j2k->m_cp.th) - 1); - return OPJ_FALSE; - } - - /* Compute the dimension of the desired tile*/ - l_tile_x = tile_index % p_j2k->m_cp.tw; - l_tile_y = tile_index / p_j2k->m_cp.tw; - - p_image->x0 = l_tile_x * p_j2k->m_cp.tdx + p_j2k->m_cp.tx0; - if (p_image->x0 < p_j2k->m_private_image->x0) - p_image->x0 = p_j2k->m_private_image->x0; - p_image->x1 = (l_tile_x + 1) * p_j2k->m_cp.tdx + p_j2k->m_cp.tx0; - if (p_image->x1 > p_j2k->m_private_image->x1) - p_image->x1 = p_j2k->m_private_image->x1; - - p_image->y0 = l_tile_y * p_j2k->m_cp.tdy + p_j2k->m_cp.ty0; - if (p_image->y0 < p_j2k->m_private_image->y0) - p_image->y0 = p_j2k->m_private_image->y0; - p_image->y1 = (l_tile_y + 1) * p_j2k->m_cp.tdy + p_j2k->m_cp.ty0; - if (p_image->y1 > p_j2k->m_private_image->y1) - p_image->y1 = p_j2k->m_private_image->y1; - - l_img_comp = p_image->comps; - for (compno=0; compno < p_image->numcomps; ++compno) - { - OPJ_INT32 l_comp_x1, l_comp_y1; - - l_img_comp->factor = p_j2k->m_private_image->comps[compno].factor; - - l_img_comp->x0 = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)p_image->x0, (OPJ_INT32)l_img_comp->dx); - l_img_comp->y0 = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)p_image->y0, (OPJ_INT32)l_img_comp->dy); - l_comp_x1 = opj_int_ceildiv((OPJ_INT32)p_image->x1, (OPJ_INT32)l_img_comp->dx); - l_comp_y1 = opj_int_ceildiv((OPJ_INT32)p_image->y1, (OPJ_INT32)l_img_comp->dy); - - l_img_comp->w = (OPJ_UINT32)(opj_int_ceildivpow2(l_comp_x1, (OPJ_INT32)l_img_comp->factor) - opj_int_ceildivpow2((OPJ_INT32)l_img_comp->x0, (OPJ_INT32)l_img_comp->factor)); - l_img_comp->h = (OPJ_UINT32)(opj_int_ceildivpow2(l_comp_y1, (OPJ_INT32)l_img_comp->factor) - opj_int_ceildivpow2((OPJ_INT32)l_img_comp->y0, (OPJ_INT32)l_img_comp->factor)); - - l_img_comp++; - } - - /* Destroy the previous output image*/ - if (p_j2k->m_output_image) - opj_image_destroy(p_j2k->m_output_image); - - /* Create the ouput image from the information previously computed*/ - p_j2k->m_output_image = opj_image_create0(); - if (! (p_j2k->m_output_image)) { - return OPJ_FALSE; - } - opj_copy_image_header(p_image, p_j2k->m_output_image); - - p_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec = (OPJ_INT32)tile_index; - - /* customization of the decoding */ - opj_j2k_setup_decoding_tile(p_j2k); - - /* Decode the codestream */ - if (! opj_j2k_exec (p_j2k,p_j2k->m_procedure_list,p_stream,p_manager)) { - opj_image_destroy(p_j2k->m_private_image); - p_j2k->m_private_image = NULL; - return OPJ_FALSE; - } - - /* Move data and copy one information from codec to output image*/ - for (compno = 0; compno < p_image->numcomps; compno++) { - p_image->comps[compno].resno_decoded = p_j2k->m_output_image->comps[compno].resno_decoded; - - if (p_image->comps[compno].data) - opj_free(p_image->comps[compno].data); - - p_image->comps[compno].data = p_j2k->m_output_image->comps[compno].data; - - p_j2k->m_output_image->comps[compno].data = NULL; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_set_decoded_resolution_factor(opj_j2k_t *p_j2k, - OPJ_UINT32 res_factor, - opj_event_mgr_t * p_manager) -{ - OPJ_UINT32 it_comp; - - p_j2k->m_cp.m_specific_param.m_dec.m_reduce = res_factor; - - if (p_j2k->m_private_image) { - if (p_j2k->m_private_image->comps) { - if (p_j2k->m_specific_param.m_decoder.m_default_tcp) { - if (p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps) { - for (it_comp = 0 ; it_comp < p_j2k->m_private_image->numcomps; it_comp++) { - OPJ_UINT32 max_res = p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps[it_comp].numresolutions; - if ( res_factor >= max_res){ - opj_event_msg(p_manager, EVT_ERROR, "Resolution factor is greater than the maximum resolution in the component.\n"); - return OPJ_FALSE; - } - p_j2k->m_private_image->comps[it_comp].factor = res_factor; - } - return OPJ_TRUE; - } - } - } - } - - return OPJ_FALSE; -} - -OPJ_BOOL opj_j2k_encode(opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - OPJ_UINT32 i; - OPJ_UINT32 l_nb_tiles; - OPJ_UINT32 l_max_tile_size, l_current_tile_size; - OPJ_BYTE * l_current_data; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_stream != 00); - assert(p_manager != 00); - - l_current_data = (OPJ_BYTE*)opj_malloc(1000); - if (! l_current_data) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to encode all tiles\n"); - return OPJ_FALSE; - } - l_max_tile_size = 1000; - - l_nb_tiles = p_j2k->m_cp.th * p_j2k->m_cp.tw; - for (i=0;im_tcd); - if (l_current_tile_size > l_max_tile_size) { - OPJ_BYTE *l_new_current_data = (OPJ_BYTE *) opj_realloc(l_current_data, l_current_tile_size); - if (! l_new_current_data) { - opj_free(l_current_data); - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to encode all tiles\n"); - return OPJ_FALSE; - } - l_current_data = l_new_current_data; - l_max_tile_size = l_current_tile_size; - } - - opj_j2k_get_tile_data(p_j2k->m_tcd,l_current_data); - - if (! opj_j2k_post_write_tile (p_j2k,l_current_data,l_current_tile_size,p_stream,p_manager)) { - return OPJ_FALSE; - } - } - - opj_free(l_current_data); - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_end_compress( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager) -{ - /* customization of the encoding */ - opj_j2k_setup_end_compress(p_j2k); - - if (! opj_j2k_exec (p_j2k, p_j2k->m_procedure_list, p_stream, p_manager)) - { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_start_compress(opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_image_t * p_image, - opj_event_mgr_t * p_manager) -{ - /* preconditions */ - assert(p_j2k != 00); - assert(p_stream != 00); - assert(p_manager != 00); - - p_j2k->m_private_image = opj_image_create0(); - opj_copy_image_header(p_image, p_j2k->m_private_image); - - /* TODO_MSD: Find a better way */ - if (p_image->comps) { - OPJ_UINT32 it_comp; - for (it_comp = 0 ; it_comp < p_image->numcomps; it_comp++) { - if (p_image->comps[it_comp].data) { - p_j2k->m_private_image->comps[it_comp].data =p_image->comps[it_comp].data; - p_image->comps[it_comp].data = NULL; - - } - } - } - - /* customization of the validation */ - opj_j2k_setup_encoding_validation (p_j2k); - - /* validation of the parameters codec */ - if (! opj_j2k_exec(p_j2k,p_j2k->m_validation_list,p_stream,p_manager)) { - return OPJ_FALSE; - } - - /* customization of the encoding */ - opj_j2k_setup_header_writing(p_j2k); - - /* write header */ - if (! opj_j2k_exec (p_j2k,p_j2k->m_procedure_list,p_stream,p_manager)) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_pre_write_tile ( opj_j2k_t * p_j2k, - OPJ_UINT32 p_tile_index, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - (void)p_stream; - if (p_tile_index != p_j2k->m_current_tile_number) { - opj_event_msg(p_manager, EVT_ERROR, "The given tile index does not match." ); - return OPJ_FALSE; - } - - opj_event_msg(p_manager, EVT_INFO, "tile number %d / %d\n", p_j2k->m_current_tile_number + 1, p_j2k->m_cp.tw * p_j2k->m_cp.th); - - p_j2k->m_specific_param.m_encoder.m_current_tile_part_number = 0; - p_j2k->m_tcd->cur_totnum_tp = p_j2k->m_cp.tcps[p_tile_index].m_nb_tile_parts; - p_j2k->m_specific_param.m_encoder.m_current_poc_tile_part_number = 0; - - /* initialisation before tile encoding */ - if (! opj_tcd_init_encode_tile(p_j2k->m_tcd, p_j2k->m_current_tile_number)) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -void opj_j2k_get_tile_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data) -{ - OPJ_UINT32 i,j,k = 0; - OPJ_UINT32 l_width,l_height,l_stride, l_offset_x,l_offset_y, l_image_width; - opj_image_comp_t * l_img_comp = 00; - opj_tcd_tilecomp_t * l_tilec = 00; - opj_image_t * l_image = 00; - OPJ_UINT32 l_size_comp, l_remaining; - OPJ_INT32 * l_src_ptr; - l_tilec = p_tcd->tcd_image->tiles->comps; - l_image = p_tcd->image; - l_img_comp = l_image->comps; - - for (i=0;iimage->numcomps;++i) { - l_size_comp = l_img_comp->prec >> 3; /* (/8) */ - l_remaining = l_img_comp->prec & 7; /* (%8) */ - if (l_remaining) { - ++l_size_comp; - } - - if (l_size_comp == 3) { - l_size_comp = 4; - } - - l_width = (OPJ_UINT32)(l_tilec->x1 - l_tilec->x0); - l_height = (OPJ_UINT32)(l_tilec->y1 - l_tilec->y0); - l_offset_x = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)l_image->x0, (OPJ_INT32)l_img_comp->dx); - l_offset_y = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)l_image->y0, (OPJ_INT32)l_img_comp->dy); - l_image_width = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)l_image->x1 - (OPJ_INT32)l_image->x0, (OPJ_INT32)l_img_comp->dx); - l_stride = l_image_width - l_width; - l_src_ptr = l_img_comp->data + ((OPJ_UINT32)l_tilec->x0 - l_offset_x) + ((OPJ_UINT32)l_tilec->y0 - l_offset_y) * l_image_width; - - switch (l_size_comp) { - case 1: - { - OPJ_CHAR * l_dest_ptr = (OPJ_CHAR*) p_data; - if (l_img_comp->sgnd) { - for (j=0;jsgnd) { - for (j=0;jm_specific_param.m_encoder.m_encoded_tile_data); - - l_tcd = p_j2k->m_tcd; - - l_tile_size = p_j2k->m_specific_param.m_encoder.m_encoded_tile_size; - l_available_data = l_tile_size; - l_current_data = p_j2k->m_specific_param.m_encoder.m_encoded_tile_data; - - if (! opj_tcd_copy_tile_data(l_tcd,p_data,p_data_size)) { - opj_event_msg(p_manager, EVT_ERROR, "Size mismatch between tile data and sent data." ); - return OPJ_FALSE; - } - - l_nb_bytes_written = 0; - if (! opj_j2k_write_first_tile_part(p_j2k,l_current_data,&l_nb_bytes_written,l_available_data,p_stream,p_manager)) { - return OPJ_FALSE; - } - l_current_data += l_nb_bytes_written; - l_available_data -= l_nb_bytes_written; - - l_nb_bytes_written = 0; - if (! opj_j2k_write_all_tile_parts(p_j2k,l_current_data,&l_nb_bytes_written,l_available_data,p_stream,p_manager)) { - return OPJ_FALSE; - } - - l_available_data -= l_nb_bytes_written; - l_nb_bytes_written = l_tile_size - l_available_data; - - if ( opj_stream_write_data( p_stream, - p_j2k->m_specific_param.m_encoder.m_encoded_tile_data, - l_nb_bytes_written,p_manager) != l_nb_bytes_written) { - return OPJ_FALSE; - } - - ++p_j2k->m_current_tile_number; - - return OPJ_TRUE; -} - -void opj_j2k_setup_end_compress (opj_j2k_t *p_j2k) -{ - /* preconditions */ - assert(p_j2k != 00); - - /* DEVELOPER CORNER, insert your custom procedures */ - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_eoc ); - - if (p_j2k->m_cp.m_specific_param.m_enc.m_cinema) { - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_updated_tlm); - } - - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_epc ); - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_end_encoding ); - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_destroy_header_memory); -} - -void opj_j2k_setup_encoding_validation (opj_j2k_t *p_j2k) -{ - /* preconditions */ - assert(p_j2k != 00); - - opj_procedure_list_add_procedure(p_j2k->m_validation_list, (opj_procedure)opj_j2k_build_encoder); - opj_procedure_list_add_procedure(p_j2k->m_validation_list, (opj_procedure)opj_j2k_encoding_validation); - - /* DEVELOPER CORNER, add your custom validation procedure */ - opj_procedure_list_add_procedure(p_j2k->m_validation_list, (opj_procedure)opj_j2k_mct_validation); -} - -void opj_j2k_setup_header_writing (opj_j2k_t *p_j2k) -{ - /* preconditions */ - assert(p_j2k != 00); - - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_init_info ); - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_soc ); - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_siz ); - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_cod ); - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_qcd ); - - if (p_j2k->m_cp.m_specific_param.m_enc.m_cinema) { - /* No need for COC or QCC, QCD and COD are used - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_all_coc ); - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_all_qcc ); - */ - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_tlm ); - - if (p_j2k->m_cp.m_specific_param.m_enc.m_cinema == OPJ_CINEMA4K_24) { - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_poc ); - } - } - - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_regions); - - if (p_j2k->m_cp.comment != 00) { - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_com); - } - - /* DEVELOPER CORNER, insert your custom procedures */ - if (p_j2k->m_cp.rsiz & OPJ_MCT) { - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_mct_data_group ); - } - /* End of Developer Corner */ - - if (p_j2k->cstr_index) { - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_get_end_header ); - } - - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_create_tcd); - opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_update_rates); -} - -OPJ_BOOL opj_j2k_write_first_tile_part (opj_j2k_t *p_j2k, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 p_total_data_size, - opj_stream_private_t *p_stream, - struct opj_event_mgr * p_manager ) -{ - OPJ_UINT32 l_nb_bytes_written = 0; - OPJ_UINT32 l_current_nb_bytes_written; - OPJ_BYTE * l_begin_data = 00; - - opj_tcd_t * l_tcd = 00; - opj_cp_t * l_cp = 00; - - l_tcd = p_j2k->m_tcd; - l_cp = &(p_j2k->m_cp); - - l_tcd->cur_pino = 0; - - /*Get number of tile parts*/ - p_j2k->m_specific_param.m_encoder.m_current_poc_tile_part_number = 0; - - /* INDEX >> */ - /* << INDEX */ - - l_current_nb_bytes_written = 0; - l_begin_data = p_data; - if (! opj_j2k_write_sot(p_j2k,p_data,&l_current_nb_bytes_written,p_stream,p_manager)) - { - return OPJ_FALSE; - } - - l_nb_bytes_written += l_current_nb_bytes_written; - p_data += l_current_nb_bytes_written; - p_total_data_size -= l_current_nb_bytes_written; - - if (l_cp->m_specific_param.m_enc.m_cinema == 0) { -#if 0 - for (compno = 1; compno < p_j2k->m_private_image->numcomps; compno++) { - l_current_nb_bytes_written = 0; - opj_j2k_write_coc_in_memory(p_j2k,compno,p_data,&l_current_nb_bytes_written,p_manager); - l_nb_bytes_written += l_current_nb_bytes_written; - p_data += l_current_nb_bytes_written; - p_total_data_size -= l_current_nb_bytes_written; - - l_current_nb_bytes_written = 0; - opj_j2k_write_qcc_in_memory(p_j2k,compno,p_data,&l_current_nb_bytes_written,p_manager); - l_nb_bytes_written += l_current_nb_bytes_written; - p_data += l_current_nb_bytes_written; - p_total_data_size -= l_current_nb_bytes_written; - } -#endif - - if (l_cp->tcps[p_j2k->m_current_tile_number].numpocs) { - l_current_nb_bytes_written = 0; - opj_j2k_write_poc_in_memory(p_j2k,p_data,&l_current_nb_bytes_written,p_manager); - l_nb_bytes_written += l_current_nb_bytes_written; - p_data += l_current_nb_bytes_written; - p_total_data_size -= l_current_nb_bytes_written; - } - } - - l_current_nb_bytes_written = 0; - if (! opj_j2k_write_sod(p_j2k,l_tcd,p_data,&l_current_nb_bytes_written,p_total_data_size,p_stream,p_manager)) { - return OPJ_FALSE; - } - - l_nb_bytes_written += l_current_nb_bytes_written; - * p_data_written = l_nb_bytes_written; - - /* Writing Psot in SOT marker */ - opj_write_bytes(l_begin_data + 6,l_nb_bytes_written,4); /* PSOT */ - - if (l_cp->m_specific_param.m_enc.m_cinema){ - opj_j2k_update_tlm(p_j2k,l_nb_bytes_written); - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_all_tile_parts( opj_j2k_t *p_j2k, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 p_total_data_size, - opj_stream_private_t *p_stream, - struct opj_event_mgr * p_manager - ) -{ - OPJ_UINT32 tilepartno=0; - OPJ_UINT32 l_nb_bytes_written = 0; - OPJ_UINT32 l_current_nb_bytes_written; - OPJ_UINT32 l_part_tile_size; - OPJ_UINT32 tot_num_tp; - OPJ_UINT32 pino; - - OPJ_BYTE * l_begin_data; - opj_tcp_t *l_tcp = 00; - opj_tcd_t * l_tcd = 00; - opj_cp_t * l_cp = 00; - - l_tcd = p_j2k->m_tcd; - l_cp = &(p_j2k->m_cp); - l_tcp = l_cp->tcps + p_j2k->m_current_tile_number; - - /*Get number of tile parts*/ - tot_num_tp = opj_j2k_get_num_tp(l_cp,0,p_j2k->m_current_tile_number); - - /* start writing remaining tile parts */ - ++p_j2k->m_specific_param.m_encoder.m_current_tile_part_number; - for (tilepartno = 1; tilepartno < tot_num_tp ; ++tilepartno) { - p_j2k->m_specific_param.m_encoder.m_current_poc_tile_part_number = tilepartno; - l_current_nb_bytes_written = 0; - l_part_tile_size = 0; - l_begin_data = p_data; - - if (! opj_j2k_write_sot(p_j2k,p_data,&l_current_nb_bytes_written,p_stream,p_manager)) { - return OPJ_FALSE; - } - - l_nb_bytes_written += l_current_nb_bytes_written; - p_data += l_current_nb_bytes_written; - p_total_data_size -= l_current_nb_bytes_written; - l_part_tile_size += l_current_nb_bytes_written; - - l_current_nb_bytes_written = 0; - if (! opj_j2k_write_sod(p_j2k,l_tcd,p_data,&l_current_nb_bytes_written,p_total_data_size,p_stream,p_manager)) { - return OPJ_FALSE; - } - - p_data += l_current_nb_bytes_written; - l_nb_bytes_written += l_current_nb_bytes_written; - p_total_data_size -= l_current_nb_bytes_written; - l_part_tile_size += l_current_nb_bytes_written; - - /* Writing Psot in SOT marker */ - opj_write_bytes(l_begin_data + 6,l_part_tile_size,4); /* PSOT */ - - if (l_cp->m_specific_param.m_enc.m_cinema) { - opj_j2k_update_tlm(p_j2k,l_part_tile_size); - } - - ++p_j2k->m_specific_param.m_encoder.m_current_tile_part_number; - } - - for (pino = 1; pino <= l_tcp->numpocs; ++pino) { - l_tcd->cur_pino = pino; - - /*Get number of tile parts*/ - tot_num_tp = opj_j2k_get_num_tp(l_cp,pino,p_j2k->m_current_tile_number); - for (tilepartno = 0; tilepartno < tot_num_tp ; ++tilepartno) { - p_j2k->m_specific_param.m_encoder.m_current_poc_tile_part_number = tilepartno; - l_current_nb_bytes_written = 0; - l_part_tile_size = 0; - l_begin_data = p_data; - - if (! opj_j2k_write_sot(p_j2k,p_data,&l_current_nb_bytes_written,p_stream,p_manager)) { - return OPJ_FALSE; - } - - l_nb_bytes_written += l_current_nb_bytes_written; - p_data += l_current_nb_bytes_written; - p_total_data_size -= l_current_nb_bytes_written; - l_part_tile_size += l_current_nb_bytes_written; - - l_current_nb_bytes_written = 0; - - if (! opj_j2k_write_sod(p_j2k,l_tcd,p_data,&l_current_nb_bytes_written,p_total_data_size,p_stream,p_manager)) { - return OPJ_FALSE; - } - - l_nb_bytes_written += l_current_nb_bytes_written; - p_data += l_current_nb_bytes_written; - p_total_data_size -= l_current_nb_bytes_written; - l_part_tile_size += l_current_nb_bytes_written; - - /* Writing Psot in SOT marker */ - opj_write_bytes(l_begin_data + 6,l_part_tile_size,4); /* PSOT */ - - if (l_cp->m_specific_param.m_enc.m_cinema) { - opj_j2k_update_tlm(p_j2k,l_part_tile_size); - } - - ++p_j2k->m_specific_param.m_encoder.m_current_tile_part_number; - } - } - - *p_data_written = l_nb_bytes_written; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_updated_tlm( opj_j2k_t *p_j2k, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - OPJ_UINT32 l_tlm_size; - OPJ_OFF_T l_tlm_position, l_current_position; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - l_tlm_size = 5 * p_j2k->m_specific_param.m_encoder.m_total_tile_parts; - l_tlm_position = 6 + p_j2k->m_specific_param.m_encoder.m_tlm_start; - l_current_position = opj_stream_tell(p_stream); - - if (! opj_stream_seek(p_stream,l_tlm_position,p_manager)) { - return OPJ_FALSE; - } - - if (opj_stream_write_data(p_stream,p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_buffer,l_tlm_size,p_manager) != l_tlm_size) { - return OPJ_FALSE; - } - - if (! opj_stream_seek(p_stream,l_current_position,p_manager)) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_end_encoding( opj_j2k_t *p_j2k, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - opj_tcd_destroy(p_j2k->m_tcd); - p_j2k->m_tcd = 00; - - if (p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_buffer) { - opj_free(p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_buffer); - p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_buffer = 0; - p_j2k->m_specific_param.m_encoder.m_tlm_sot_offsets_current = 0; - } - - if (p_j2k->m_specific_param.m_encoder.m_encoded_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_encoded_tile_data); - p_j2k->m_specific_param.m_encoder.m_encoded_tile_data = 0; - } - - p_j2k->m_specific_param.m_encoder.m_encoded_tile_size = 0; - - return OPJ_TRUE; -} - -/** - * Destroys the memory associated with the decoding of headers. - */ -static OPJ_BOOL opj_j2k_destroy_header_memory ( opj_j2k_t * p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - /* preconditions */ - assert(p_j2k != 00); - assert(p_stream != 00); - assert(p_manager != 00); - - if (p_j2k->m_specific_param.m_encoder.m_header_tile_data) { - opj_free(p_j2k->m_specific_param.m_encoder.m_header_tile_data); - p_j2k->m_specific_param.m_encoder.m_header_tile_data = 0; - } - - p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = 0; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_init_info( opj_j2k_t *p_j2k, - struct opj_stream_private *p_stream, - struct opj_event_mgr * p_manager ) -{ - opj_codestream_info_t * l_cstr_info = 00; - - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - (void)l_cstr_info; - - /* TODO mergeV2: check this part which use cstr_info */ - /*l_cstr_info = p_j2k->cstr_info; - - if (l_cstr_info) { - OPJ_UINT32 compno; - l_cstr_info->tile = (opj_tile_info_t *) opj_malloc(p_j2k->m_cp.tw * p_j2k->m_cp.th * sizeof(opj_tile_info_t)); - - l_cstr_info->image_w = p_j2k->m_image->x1 - p_j2k->m_image->x0; - l_cstr_info->image_h = p_j2k->m_image->y1 - p_j2k->m_image->y0; - - l_cstr_info->prog = (&p_j2k->m_cp.tcps[0])->prg; - - l_cstr_info->tw = p_j2k->m_cp.tw; - l_cstr_info->th = p_j2k->m_cp.th; - - l_cstr_info->tile_x = p_j2k->m_cp.tdx;*/ /* new version parser */ - /*l_cstr_info->tile_y = p_j2k->m_cp.tdy;*/ /* new version parser */ - /*l_cstr_info->tile_Ox = p_j2k->m_cp.tx0;*/ /* new version parser */ - /*l_cstr_info->tile_Oy = p_j2k->m_cp.ty0;*/ /* new version parser */ - - /*l_cstr_info->numcomps = p_j2k->m_image->numcomps; - - l_cstr_info->numlayers = (&p_j2k->m_cp.tcps[0])->numlayers; - - l_cstr_info->numdecompos = (OPJ_INT32*) opj_malloc(p_j2k->m_image->numcomps * sizeof(OPJ_INT32)); - - for (compno=0; compno < p_j2k->m_image->numcomps; compno++) { - l_cstr_info->numdecompos[compno] = (&p_j2k->m_cp.tcps[0])->tccps->numresolutions - 1; - } - - l_cstr_info->D_max = 0.0; */ /* ADD Marcela */ - - /*l_cstr_info->main_head_start = opj_stream_tell(p_stream);*/ /* position of SOC */ - - /*l_cstr_info->maxmarknum = 100; - l_cstr_info->marker = (opj_marker_info_t *) opj_malloc(l_cstr_info->maxmarknum * sizeof(opj_marker_info_t)); - l_cstr_info->marknum = 0; - }*/ - - return opj_j2k_calculate_tp(p_j2k,&(p_j2k->m_cp),&p_j2k->m_specific_param.m_encoder.m_total_tile_parts,p_j2k->m_private_image,p_manager); -} - -/** - * Creates a tile-coder decoder. - * - * @param p_stream the stream to write data to. - * @param p_j2k J2K codec. - * @param p_manager the user event manager. -*/ -static OPJ_BOOL opj_j2k_create_tcd( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - /* preconditions */ - assert(p_j2k != 00); - assert(p_manager != 00); - assert(p_stream != 00); - - p_j2k->m_tcd = opj_tcd_create(OPJ_FALSE); - - if (! p_j2k->m_tcd) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to create Tile Coder\n"); - return OPJ_FALSE; - } - - if (!opj_tcd_init(p_j2k->m_tcd,p_j2k->m_private_image,&p_j2k->m_cp)) { - opj_tcd_destroy(p_j2k->m_tcd); - p_j2k->m_tcd = 00; - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_j2k_write_tile (opj_j2k_t * p_j2k, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ) -{ - if (! opj_j2k_pre_write_tile(p_j2k,p_tile_index,p_stream,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Error while opj_j2k_pre_write_tile with tile index = %d\n", p_tile_index); - return OPJ_FALSE; - } - else { - if (! opj_j2k_post_write_tile(p_j2k,p_data,p_data_size,p_stream,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Error while opj_j2k_post_write_tile with tile index = %d\n", p_tile_index); - return OPJ_FALSE; - } - } - - return OPJ_TRUE; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/j2k.h b/Dependencies/FreeImage/Source/LibOpenJPEG/j2k.h deleted file mode 100644 index 22d3876..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/j2k.h +++ /dev/null @@ -1,838 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2006-2007, Parvatha Elangovan - * Copyright (c) 2008, Jerome Fimes, Communications & Systemes - * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef __J2K_H -#define __J2K_H -/** -@file j2k.h -@brief The JPEG-2000 Codestream Reader/Writer (J2K) - -The functions in J2K.C have for goal to read/write the several parts of the codestream: markers and data. -*/ - -/** @defgroup J2K J2K - JPEG-2000 codestream reader/writer */ -/*@{*/ - -#define J2K_CP_CSTY_PRT 0x01 -#define J2K_CP_CSTY_SOP 0x02 -#define J2K_CP_CSTY_EPH 0x04 -#define J2K_CCP_CSTY_PRT 0x01 -#define J2K_CCP_CBLKSTY_LAZY 0x01 /**< Selective arithmetic coding bypass */ -#define J2K_CCP_CBLKSTY_RESET 0x02 /**< Reset context probabilities on coding pass boundaries */ -#define J2K_CCP_CBLKSTY_TERMALL 0x04 /**< Termination on each coding pass */ -#define J2K_CCP_CBLKSTY_VSC 0x08 /**< Vertically stripe causal context */ -#define J2K_CCP_CBLKSTY_PTERM 0x10 /**< Predictable termination */ -#define J2K_CCP_CBLKSTY_SEGSYM 0x20 /**< Segmentation symbols are used */ -#define J2K_CCP_QNTSTY_NOQNT 0 -#define J2K_CCP_QNTSTY_SIQNT 1 -#define J2K_CCP_QNTSTY_SEQNT 2 - -#define OPJ_J2K_DEFAULT_CBLK_DATA_SIZE 8192 - -/* ----------------------------------------------------------------------- */ - -#define J2K_MS_SOC 0xff4f /**< SOC marker value */ -#define J2K_MS_SOT 0xff90 /**< SOT marker value */ -#define J2K_MS_SOD 0xff93 /**< SOD marker value */ -#define J2K_MS_EOC 0xffd9 /**< EOC marker value */ -#define J2K_MS_SIZ 0xff51 /**< SIZ marker value */ -#define J2K_MS_COD 0xff52 /**< COD marker value */ -#define J2K_MS_COC 0xff53 /**< COC marker value */ -#define J2K_MS_RGN 0xff5e /**< RGN marker value */ -#define J2K_MS_QCD 0xff5c /**< QCD marker value */ -#define J2K_MS_QCC 0xff5d /**< QCC marker value */ -#define J2K_MS_POC 0xff5f /**< POC marker value */ -#define J2K_MS_TLM 0xff55 /**< TLM marker value */ -#define J2K_MS_PLM 0xff57 /**< PLM marker value */ -#define J2K_MS_PLT 0xff58 /**< PLT marker value */ -#define J2K_MS_PPM 0xff60 /**< PPM marker value */ -#define J2K_MS_PPT 0xff61 /**< PPT marker value */ -#define J2K_MS_SOP 0xff91 /**< SOP marker value */ -#define J2K_MS_EPH 0xff92 /**< EPH marker value */ -#define J2K_MS_CRG 0xff63 /**< CRG marker value */ -#define J2K_MS_COM 0xff64 /**< COM marker value */ -#define J2K_MS_CBD 0xff78 /**< CBD marker value */ -#define J2K_MS_MCC 0xff75 /**< MCC marker value */ -#define J2K_MS_MCT 0xff74 /**< MCT marker value */ -#define J2K_MS_MCO 0xff77 /**< MCO marker value */ - -#define J2K_MS_UNK 0 /**< UNKNOWN marker value */ - -/* UniPG>> */ -#ifdef USE_JPWL -#define J2K_MS_EPC 0xff68 /**< EPC marker value (Part 11: JPEG 2000 for Wireless) */ -#define J2K_MS_EPB 0xff66 /**< EPB marker value (Part 11: JPEG 2000 for Wireless) */ -#define J2K_MS_ESD 0xff67 /**< ESD marker value (Part 11: JPEG 2000 for Wireless) */ -#define J2K_MS_RED 0xff69 /**< RED marker value (Part 11: JPEG 2000 for Wireless) */ -#endif /* USE_JPWL */ -#ifdef USE_JPSEC -#define J2K_MS_SEC 0xff65 /**< SEC marker value (Part 8: Secure JPEG 2000) */ -#define J2K_MS_INSEC 0xff94 /**< INSEC marker value (Part 8: Secure JPEG 2000) */ -#endif /* USE_JPSEC */ -/* < there was a PPT marker for the present tile */ - OPJ_UINT32 ppt : 1; - /** indicates if a POC marker has been used O:NO, 1:YES */ - OPJ_UINT32 POC : 1; -} opj_tcp_t; - - - - -typedef struct opj_encoding_param -{ - /** Digital cinema profile*/ - OPJ_CINEMA_MODE m_cinema; - /** Maximum rate for each component. If == 0, component size limitation is not considered */ - OPJ_UINT32 m_max_comp_size; - /** Position of tile part flag in progression order*/ - OPJ_INT32 m_tp_pos; - /** fixed layer */ - OPJ_INT32 *m_matrice; - /** Flag determining tile part generation*/ - OPJ_BYTE m_tp_flag; - /** allocation by rate/distortion */ - OPJ_UINT32 m_disto_alloc : 1; - /** allocation by fixed layer */ - OPJ_UINT32 m_fixed_alloc : 1; - /** add fixed_quality */ - OPJ_UINT32 m_fixed_quality : 1; - /** Enabling Tile part generation*/ - OPJ_UINT32 m_tp_on : 1; -} -opj_encoding_param_t; - -typedef struct opj_decoding_param -{ - /** if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, image is decoded to the full resolution */ - OPJ_UINT32 m_reduce; - /** if != 0, then only the first "layer" layers are decoded; if == 0 or not used, all the quality layers are decoded */ - OPJ_UINT32 m_layer; -} -opj_decoding_param_t; - - -/** - * Coding parameters - */ -typedef struct opj_cp -{ - /** Size of the image in bits*/ - /*int img_size;*/ - /** Rsiz*/ - OPJ_RSIZ_CAPABILITIES rsiz; - /** XTOsiz */ - OPJ_UINT32 tx0; /* MSD see norm */ - /** YTOsiz */ - OPJ_UINT32 ty0; /* MSD see norm */ - /** XTsiz */ - OPJ_UINT32 tdx; - /** YTsiz */ - OPJ_UINT32 tdy; - /** comment */ - OPJ_CHAR *comment; - /** number of tiles in width */ - OPJ_UINT32 tw; - /** number of tiles in heigth */ - OPJ_UINT32 th; - - /** packet header store there for futur use in t2_decode_packet */ - OPJ_BYTE *ppm_data; - /** size of the ppm_data*/ - OPJ_UINT32 ppm_len; - /** size of the ppm_data*/ - OPJ_UINT32 ppm_data_read; - - OPJ_BYTE *ppm_data_current; - - /** packet header storage original buffer */ - OPJ_BYTE *ppm_buffer; - /** pointer remaining on the first byte of the first header if ppm is used */ - OPJ_BYTE *ppm_data_first; - /** Number of bytes actually stored inside the ppm_data */ - OPJ_UINT32 ppm_data_size; - /** use in case of multiple marker PPM (number of info already store) */ - OPJ_INT32 ppm_store; - /** use in case of multiple marker PPM (case on non-finished previous info) */ - OPJ_INT32 ppm_previous; - - /** tile coding parameters */ - opj_tcp_t *tcps; - - union - { - opj_decoding_param_t m_dec; - opj_encoding_param_t m_enc; - } - m_specific_param; - - -/* UniPG>> */ -#ifdef USE_JPWL - /** enables writing of EPC in MH, thus activating JPWL */ - OPJ_BOOL epc_on; - /** enables writing of EPB, in case of activated JPWL */ - OPJ_BOOL epb_on; - /** enables writing of ESD, in case of activated JPWL */ - OPJ_BOOL esd_on; - /** enables writing of informative techniques of ESD, in case of activated JPWL */ - OPJ_BOOL info_on; - /** enables writing of RED, in case of activated JPWL */ - OPJ_BOOL red_on; - /** error protection method for MH (0,1,16,32,37-128) */ - int hprot_MH; - /** tile number of header protection specification (>=0) */ - int hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]; - /** error protection methods for TPHs (0,1,16,32,37-128) */ - int hprot_TPH[JPWL_MAX_NO_TILESPECS]; - /** tile number of packet protection specification (>=0) */ - int pprot_tileno[JPWL_MAX_NO_PACKSPECS]; - /** packet number of packet protection specification (>=0) */ - int pprot_packno[JPWL_MAX_NO_PACKSPECS]; - /** error protection methods for packets (0,1,16,32,37-128) */ - int pprot[JPWL_MAX_NO_PACKSPECS]; - /** enables writing of ESD, (0/2/4 bytes) */ - int sens_size; - /** sensitivity addressing size (0=auto/2/4 bytes) */ - int sens_addr; - /** sensitivity range (0-3) */ - int sens_range; - /** sensitivity method for MH (-1,0-7) */ - int sens_MH; - /** tile number of sensitivity specification (>=0) */ - int sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]; - /** sensitivity methods for TPHs (-1,0-7) */ - int sens_TPH[JPWL_MAX_NO_TILESPECS]; - /** enables JPWL correction at the decoder */ - OPJ_BOOL correct; - /** expected number of components at the decoder */ - int exp_comps; - /** maximum number of tiles at the decoder */ - OPJ_UINT32 max_tiles; -#endif /* USE_JPWL */ - - /******** FLAGS *********/ - /** if ppm == 1 --> there was a PPM marker*/ - OPJ_UINT32 ppm : 1; - /** tells if the parameter is a coding or decoding one */ - OPJ_UINT32 m_is_decoder : 1; -/* <cp. -@param j2k J2K decompressor handle -@param parameters decompression parameters -*/ -void opj_j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters); - -/** - * Creates a J2K compression structure - * - * @return Returns a handle to a J2K compressor if successful, returns NULL otherwise -*/ -opj_j2k_t* opj_j2k_create_compress(void); - - -void opj_j2k_setup_encoder( opj_j2k_t *p_j2k, - opj_cparameters_t *parameters, - opj_image_t *image, - opj_event_mgr_t * p_manager); - -/** -Converts an enum type progression order to string type -*/ -char *opj_j2k_convert_progression_order(OPJ_PROG_ORDER prg_order); - -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -/** - * Ends the decompression procedures and possibiliy add data to be read after the - * codestream. - */ -OPJ_BOOL opj_j2k_end_decompress(opj_j2k_t *j2k, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager); - -/** - * Reads a jpeg2000 codestream header structure. - * - * @param p_stream the stream to read data from. - * @param p_j2k the jpeg2000 codec. - * @param p_image FIXME DOC - * @param p_manager the user event manager. - * - * @return true if the box is valid. - */ -OPJ_BOOL opj_j2k_read_header( opj_stream_private_t *p_stream, - opj_j2k_t* p_j2k, - opj_image_t** p_image, - opj_event_mgr_t* p_manager ); - - -/** - * Destroys a jpeg2000 codec. - * - * @param p_j2k the jpeg20000 structure to destroy. - */ -void opj_j2k_destroy (opj_j2k_t *p_j2k); - -/** - * Destroys a codestream index structure. - * - * @param p_cstr_ind the codestream index parameter to destroy. - */ -void j2k_destroy_cstr_index (opj_codestream_index_t *p_cstr_ind); - -/** - * Decode tile data. - * @param p_j2k the jpeg2000 codec. - * @param p_tile_index - * @param p_data FIXME DOC - * @param p_data_size FIXME DOC - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. - */ -OPJ_BOOL opj_j2k_decode_tile ( opj_j2k_t * p_j2k, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a tile header. - * @param p_j2k the jpeg2000 codec. - * @param p_tile_index FIXME DOC - * @param p_data_size FIXME DOC - * @param p_tile_x0 FIXME DOC - * @param p_tile_y0 FIXME DOC - * @param p_tile_x1 FIXME DOC - * @param p_tile_y1 FIXME DOC - * @param p_nb_comps FIXME DOC - * @param p_go_on FIXME DOC - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. - */ -OPJ_BOOL opj_j2k_read_tile_header ( opj_j2k_t * p_j2k, - OPJ_UINT32 * p_tile_index, - OPJ_UINT32 * p_data_size, - OPJ_INT32 * p_tile_x0, - OPJ_INT32 * p_tile_y0, - OPJ_INT32 * p_tile_x1, - OPJ_INT32 * p_tile_y1, - OPJ_UINT32 * p_nb_comps, - OPJ_BOOL * p_go_on, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - - -/** - * Sets the given area to be decoded. This function should be called right after opj_read_header and before any tile header reading. - * - * @param p_j2k the jpeg2000 codec. - * @param p_image FIXME DOC - * @param p_start_x the left position of the rectangle to decode (in image coordinates). - * @param p_start_y the up position of the rectangle to decode (in image coordinates). - * @param p_end_x the right position of the rectangle to decode (in image coordinates). - * @param p_end_y the bottom position of the rectangle to decode (in image coordinates). - * @param p_manager the user event manager - * - * @return true if the area could be set. - */ -OPJ_BOOL opj_j2k_set_decode_area( opj_j2k_t *p_j2k, - opj_image_t* p_image, - OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, - OPJ_INT32 p_end_x, OPJ_INT32 p_end_y, - opj_event_mgr_t * p_manager ); - -/** - * Creates a J2K decompression structure. - * - * @return a handle to a J2K decompressor if successful, NULL otherwise. - */ -opj_j2k_t* opj_j2k_create_decompress(void); - - -/** - * Dump some elements from the J2K decompression structure . - * - *@param p_j2k the jpeg2000 codec. - *@param flag flag to describe what elments are dump. - *@param out_stream output stream where dump the elements. - * -*/ -void j2k_dump (opj_j2k_t* p_j2k, OPJ_INT32 flag, FILE* out_stream); - - - -/** - * Dump an image header structure. - * - *@param image the image header to dump. - *@param dev_dump_flag flag to describe if we are in the case of this function is use outside j2k_dump function - *@param out_stream output stream where dump the elements. - */ -void j2k_dump_image_header(opj_image_t* image, OPJ_BOOL dev_dump_flag, FILE* out_stream); - -/** - * Dump a component image header structure. - * - *@param comp the component image header to dump. - *@param dev_dump_flag flag to describe if we are in the case of this function is use outside j2k_dump function - *@param out_stream output stream where dump the elements. - */ -void j2k_dump_image_comp_header(opj_image_comp_t* comp, OPJ_BOOL dev_dump_flag, FILE* out_stream); - -/** - * Get the codestream info from a JPEG2000 codec. - * - *@param p_j2k the component image header to dump. - * - *@return the codestream information extract from the jpg2000 codec - */ -opj_codestream_info_v2_t* j2k_get_cstr_info(opj_j2k_t* p_j2k); - -/** - * Get the codestream index from a JPEG2000 codec. - * - *@param p_j2k the component image header to dump. - * - *@return the codestream index extract from the jpg2000 codec - */ -opj_codestream_index_t* j2k_get_cstr_index(opj_j2k_t* p_j2k); - -/** - * Decode an image from a JPEG-2000 codestream - * @param j2k J2K decompressor handle - * @param p_stream FIXME DOC - * @param p_image FIXME DOC - * @param p_manager FIXME DOC - * @return FIXME DOC -*/ -OPJ_BOOL opj_j2k_decode(opj_j2k_t *j2k, - opj_stream_private_t *p_stream, - opj_image_t *p_image, - opj_event_mgr_t *p_manager); - - -OPJ_BOOL opj_j2k_get_tile( opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_image_t* p_image, - opj_event_mgr_t * p_manager, - OPJ_UINT32 tile_index ); - -OPJ_BOOL opj_j2k_set_decoded_resolution_factor(opj_j2k_t *p_j2k, - OPJ_UINT32 res_factor, - opj_event_mgr_t * p_manager); - - -/** - * Writes a tile. - * @param p_j2k the jpeg2000 codec. - * @param p_tile_index FIXME DOC - * @param p_data FIXME DOC - * @param p_data_size FIXME DOC - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. - */ -OPJ_BOOL opj_j2k_write_tile ( opj_j2k_t * p_j2k, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Encodes an image into a JPEG-2000 codestream - */ -OPJ_BOOL opj_j2k_encode( opj_j2k_t * p_j2k, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -/** - * Starts a compression scheme, i.e. validates the codec parameters, writes the header. - * - * @param p_j2k the jpeg2000 codec. - * @param p_stream the stream object. - * @param p_image FIXME DOC - * @param p_manager the user event manager. - * - * @return true if the codec is valid. - */ -OPJ_BOOL opj_j2k_start_compress(opj_j2k_t *p_j2k, - opj_stream_private_t *p_stream, - opj_image_t * p_image, - opj_event_mgr_t * p_manager); - -/** - * Ends the compression procedures and possibiliy add data to be read after the - * codestream. - */ -OPJ_BOOL opj_j2k_end_compress( opj_j2k_t *p_j2k, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager); - -OPJ_BOOL opj_j2k_setup_mct_encoding (opj_tcp_t * p_tcp, opj_image_t * p_image); - - -#endif /* __J2K_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/jp2.c b/Dependencies/FreeImage/Source/LibOpenJPEG/jp2.c deleted file mode 100644 index 32ddd4f..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/jp2.c +++ /dev/null @@ -1,2776 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2010-2011, Kaori Hagihara - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#include "opj_includes.h" - -/** @defgroup JP2 JP2 - JPEG-2000 file format reader/writer */ -/*@{*/ - -#define OPJ_BOX_SIZE 1024 - -/** @name Local static functions */ -/*@{*/ - -/*static void jp2_write_url(opj_cio_t *cio, char *Idx_file);*/ - -/** - * Reads a IHDR box - Image Header box - * - * @param p_image_header_data pointer to actual data (already read from file) - * @param jp2 the jpeg2000 file codec. - * @param p_image_header_size the size of the image header - * @param p_manager the user event manager. - * - * @return true if the image header is valid, false else. - */ -static OPJ_BOOL opj_jp2_read_ihdr( opj_jp2_t *jp2, - OPJ_BYTE *p_image_header_data, - OPJ_UINT32 p_image_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Writes the Image Header box - Image Header box. - * - * @param jp2 jpeg2000 file codec. - * @param p_nb_bytes_written pointer to store the nb of bytes written by the function. - * - * @return the data being copied. -*/ -static OPJ_BYTE * opj_jp2_write_ihdr(opj_jp2_t *jp2, - OPJ_UINT32 * p_nb_bytes_written ); - -/** - * Writes the Bit per Component box. - * - * @param jp2 jpeg2000 file codec. - * @param p_nb_bytes_written pointer to store the nb of bytes written by the function. - * - * @return the data being copied. -*/ -static OPJ_BYTE * opj_jp2_write_bpcc( opj_jp2_t *jp2, - OPJ_UINT32 * p_nb_bytes_written ); - -/** - * Reads a Bit per Component box. - * - * @param p_bpc_header_data pointer to actual data (already read from file) - * @param jp2 the jpeg2000 file codec. - * @param p_bpc_header_size the size of the bpc header - * @param p_manager the user event manager. - * - * @return true if the bpc header is valid, fale else. - */ -static OPJ_BOOL opj_jp2_read_bpcc( opj_jp2_t *jp2, - OPJ_BYTE * p_bpc_header_data, - OPJ_UINT32 p_bpc_header_size, - opj_event_mgr_t * p_manager ); - -static OPJ_BOOL opj_jp2_read_cdef( opj_jp2_t * jp2, - OPJ_BYTE * p_cdef_header_data, - OPJ_UINT32 p_cdef_header_size, - opj_event_mgr_t * p_manager ); - -static void opj_jp2_apply_cdef(opj_image_t *image, opj_jp2_color_t *color); - -/** - * Writes the Colour Specification box. - * - * @param jp2 jpeg2000 file codec. - * @param p_nb_bytes_written pointer to store the nb of bytes written by the function. - * - * @return the data being copied. -*/ -static OPJ_BYTE * opj_jp2_write_colr( opj_jp2_t *jp2, - OPJ_UINT32 * p_nb_bytes_written ); - -/** - * Writes a FTYP box - File type box - * - * @param cio the stream to write data to. - * @param jp2 the jpeg2000 file codec. - * @param p_manager the user event manager. - * - * @return true if writing was successful. - */ -static OPJ_BOOL opj_jp2_write_ftyp( opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -/** - * Reads a a FTYP box - File type box - * - * @param p_header_data the data contained in the FTYP box. - * @param jp2 the jpeg2000 file codec. - * @param p_header_size the size of the data contained in the FTYP box. - * @param p_manager the user event manager. - * - * @return true if the FTYP box is valid. - */ -static OPJ_BOOL opj_jp2_read_ftyp( opj_jp2_t *jp2, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); - -OPJ_BOOL opj_jp2_skip_jp2c( opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -/** - * Reads the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box). - * - * @param p_header_data the data contained in the file header box. - * @param jp2 the jpeg2000 file codec. - * @param p_header_size the size of the data contained in the file header box. - * @param p_manager the user event manager. - * - * @return true if the JP2 Header box was successfully reconized. -*/ -static OPJ_BOOL opj_jp2_read_jp2h( opj_jp2_t *jp2, - OPJ_BYTE *p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Writes the Jpeg2000 codestream Header box - JP2C Header box. This function must be called AFTER the coding has been done. - * - * @param cio the stream to write data to. - * @param jp2 the jpeg2000 file codec. - * @param p_manager user event manager. - * - * @return true if writing was successful. -*/ -static OPJ_BOOL opj_jp2_write_jp2c( opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -#ifdef USE_JPIP -/** - * Write index Finder box - * @param cio the stream to write to. - * @param jp2 the jpeg2000 file codec. - * @param p_manager user event manager. -*/ -static OPJ_BOOL opj_jpip_write_iptr( opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -/** - * Write index Finder box - * @param cio the stream to write to. - * @param jp2 the jpeg2000 file codec. - * @param p_manager user event manager. - */ -static OPJ_BOOL opj_jpip_write_cidx(opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -/** - * Write file Index (superbox) - * @param cio the stream to write to. - * @param jp2 the jpeg2000 file codec. - * @param p_manager user event manager. - */ -static OPJ_BOOL opj_jpip_write_fidx(opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); -#endif /* USE_JPIP */ - -/** - * Reads a jpeg2000 file signature box. - * - * @param p_header_data the data contained in the signature box. - * @param jp2 the jpeg2000 file codec. - * @param p_header_size the size of the data contained in the signature box. - * @param p_manager the user event manager. - * - * @return true if the file signature box is valid. - */ -static OPJ_BOOL opj_jp2_read_jp(opj_jp2_t *jp2, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager); - -/** - * Writes a jpeg2000 file signature box. - * - * @param cio the stream to write data to. - * @param jp2 the jpeg2000 file codec. - * @param p_manager the user event manager. - * - * @return true if writing was successful. - */ -static OPJ_BOOL opj_jp2_write_jp( opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -/** -Apply collected palette data -@param color Collector for profile, cdef and pclr data -@param image -*/ -static void opj_jp2_apply_pclr(opj_image_t *image, opj_jp2_color_t *color); - -static void opj_jp2_free_pclr(opj_jp2_color_t *color); - -/** - * Collect palette data - * - * @param jp2 JP2 handle - * @param p_pclr_header_data FIXME DOC - * @param p_pclr_header_size FIXME DOC - * @param p_manager - * - * @return Returns true if successful, returns false otherwise -*/ -static OPJ_BOOL opj_jp2_read_pclr( opj_jp2_t *jp2, - OPJ_BYTE * p_pclr_header_data, - OPJ_UINT32 p_pclr_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Collect component mapping data - * - * @param jp2 JP2 handle - * @param p_cmap_header_data FIXME DOC - * @param p_cmap_header_size FIXME DOC - * @param p_manager FIXME DOC - * - * @return Returns true if successful, returns false otherwise -*/ - -static OPJ_BOOL opj_jp2_read_cmap( opj_jp2_t * jp2, - OPJ_BYTE * p_cmap_header_data, - OPJ_UINT32 p_cmap_header_size, - opj_event_mgr_t * p_manager ); - -/** - * Reads the Color Specification box. - * - * @param p_colr_header_data pointer to actual data (already read from file) - * @param jp2 the jpeg2000 file codec. - * @param p_colr_header_size the size of the color header - * @param p_manager the user event manager. - * - * @return true if the bpc header is valid, fale else. -*/ -static OPJ_BOOL opj_jp2_read_colr( opj_jp2_t *jp2, - OPJ_BYTE * p_colr_header_data, - OPJ_UINT32 p_colr_header_size, - opj_event_mgr_t * p_manager ); - -/*@}*/ - -/*@}*/ - -/** - * Sets up the procedures to do on writing header after the codestream. - * Developpers wanting to extend the library can add their own writing procedures. - */ -static void opj_jp2_setup_end_header_writing (opj_jp2_t *jp2); - -/** - * Sets up the procedures to do on reading header after the codestream. - * Developpers wanting to extend the library can add their own writing procedures. - */ -static void opj_jp2_setup_end_header_reading (opj_jp2_t *jp2); - -/** - * Reads a jpeg2000 file header structure. - * - * @param jp2 the jpeg2000 file header structure. - * @param stream the stream to read data from. - * @param p_manager the user event manager. - * - * @return true if the box is valid. - */ -static OPJ_BOOL opj_jp2_read_header_procedure( opj_jp2_t *jp2, - opj_stream_private_t *stream, - opj_event_mgr_t * p_manager ); - -/** - * Excutes the given procedures on the given codec. - * - * @param p_procedure_list the list of procedures to execute - * @param jp2 the jpeg2000 file codec to execute the procedures on. - * @param stream the stream to execute the procedures on. - * @param p_manager the user manager. - * - * @return true if all the procedures were successfully executed. - */ -static OPJ_BOOL opj_jp2_exec ( opj_jp2_t * jp2, - opj_procedure_list_t * p_procedure_list, - opj_stream_private_t *stream, - opj_event_mgr_t * p_manager ); - -/** - * Reads a box header. The box is the way data is packed inside a jpeg2000 file structure. - * - * @param cio the input stream to read data from. - * @param box the box structure to fill. - * @param p_number_bytes_read pointer to an int that will store the number of bytes read from the stream (shoul usually be 2). - * @param p_manager user event manager. - * - * @return true if the box is reconized, false otherwise -*/ -static OPJ_BOOL opj_jp2_read_boxhdr(opj_jp2_box_t *box, - OPJ_UINT32 * p_number_bytes_read, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager); - -/** - * Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters - * are valid. Developpers wanting to extend the library can add their own validation procedures. - */ -static void opj_jp2_setup_encoding_validation (opj_jp2_t *jp2); - -/** - * Sets up the procedures to do on writing header. Developpers wanting to extend the library can add their own writing procedures. - */ -static void opj_jp2_setup_header_writing (opj_jp2_t *jp2); - -OPJ_BOOL opj_jp2_default_validation ( opj_jp2_t * jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ); - -/** - * Finds the image execution function related to the given box id. - * - * @param p_id the id of the handler to fetch. - * - * @return the given handler or NULL if it could not be found. - */ -static const opj_jp2_header_handler_t * opj_jp2_img_find_handler (OPJ_UINT32 p_id); - -/** - * Finds the execution function related to the given box id. - * - * @param p_id the id of the handler to fetch. - * - * @return the given handler or NULL if it could not be found. - */ -static const opj_jp2_header_handler_t * opj_jp2_find_handler (OPJ_UINT32 p_id ); - -const opj_jp2_header_handler_t jp2_header [] = -{ - {JP2_JP,opj_jp2_read_jp}, - {JP2_FTYP,opj_jp2_read_ftyp}, - {JP2_JP2H,opj_jp2_read_jp2h} -}; - -const opj_jp2_header_handler_t jp2_img_header [] = -{ - {JP2_IHDR,opj_jp2_read_ihdr}, - {JP2_COLR,opj_jp2_read_colr}, - {JP2_BPCC,opj_jp2_read_bpcc}, - {JP2_PCLR,opj_jp2_read_pclr}, - {JP2_CMAP,opj_jp2_read_cmap}, - {JP2_CDEF,opj_jp2_read_cdef} - -}; - -/** - * Reads a box header. The box is the way data is packed inside a jpeg2000 file structure. Data is read from a character string - * - * @param box the box structure to fill. - * @param p_data the character string to read data from. - * @param p_number_bytes_read pointer to an int that will store the number of bytes read from the stream (shoul usually be 2). - * @param p_box_max_size the maximum number of bytes in the box. - * @param p_manager FIXME DOC - * - * @return true if the box is reconized, false otherwise -*/ -static OPJ_BOOL opj_jp2_read_boxhdr_char( opj_jp2_box_t *box, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_number_bytes_read, - OPJ_UINT32 p_box_max_size, - opj_event_mgr_t * p_manager ); - -/** - * Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters - * are valid. Developpers wanting to extend the library can add their own validation procedures. - */ -static void opj_jp2_setup_decoding_validation (opj_jp2_t *jp2); - -/** - * Sets up the procedures to do on reading header. - * Developpers wanting to extend the library can add their own writing procedures. - */ -static void opj_jp2_setup_header_reading (opj_jp2_t *jp2); - -/* ----------------------------------------------------------------------- */ - OPJ_BOOL opj_jp2_read_boxhdr(opj_jp2_box_t *box, - OPJ_UINT32 * p_number_bytes_read, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - /* read header from file */ - OPJ_BYTE l_data_header [8]; - - /* preconditions */ - assert(cio != 00); - assert(box != 00); - assert(p_number_bytes_read != 00); - assert(p_manager != 00); - - *p_number_bytes_read = (OPJ_UINT32)opj_stream_read_data(cio,l_data_header,8,p_manager); - if (*p_number_bytes_read != 8) { - return OPJ_FALSE; - } - - /* process read data */ - opj_read_bytes(l_data_header,&(box->length), 4); - opj_read_bytes(l_data_header+4,&(box->type), 4); - - if(box->length == 0)/* last box */ - { - const OPJ_OFF_T bleft = opj_stream_get_number_byte_left(cio); - box->length = (OPJ_UINT32)bleft; - assert( (OPJ_OFF_T)box->length == bleft ); - return OPJ_TRUE; - } - - /* do we have a "special very large box ?" */ - /* read then the XLBox */ - if (box->length == 1) { - OPJ_UINT32 l_xl_part_size; - - OPJ_UINT32 l_nb_bytes_read = (OPJ_UINT32)opj_stream_read_data(cio,l_data_header,8,p_manager); - if (l_nb_bytes_read != 8) { - if (l_nb_bytes_read > 0) { - *p_number_bytes_read += l_nb_bytes_read; - } - - return OPJ_FALSE; - } - - *p_number_bytes_read = 16; - opj_read_bytes(l_data_header,&l_xl_part_size, 4); - if (l_xl_part_size != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Cannot handle box sizes higher than 2^32\n"); - return OPJ_FALSE; - } - opj_read_bytes(l_data_header+4,&(box->length), 4); - } - return OPJ_TRUE; -} - -#if 0 -static void jp2_write_url(opj_cio_t *cio, char *Idx_file) { - OPJ_UINT32 i; - opj_jp2_box_t box; - - box.init_pos = cio_tell(cio); - cio_skip(cio, 4); - cio_write(cio, JP2_URL, 4); /* DBTL */ - cio_write(cio, 0, 1); /* VERS */ - cio_write(cio, 0, 3); /* FLAG */ - - if(Idx_file) { - for (i = 0; i < strlen(Idx_file); i++) { - cio_write(cio, Idx_file[i], 1); - } - } - - box.length = cio_tell(cio) - box.init_pos; - cio_seek(cio, box.init_pos); - cio_write(cio, box.length, 4); /* L */ - cio_seek(cio, box.init_pos + box.length); -} -#endif - -OPJ_BOOL opj_jp2_read_ihdr( opj_jp2_t *jp2, - OPJ_BYTE *p_image_header_data, - OPJ_UINT32 p_image_header_size, - opj_event_mgr_t * p_manager ) -{ - /* preconditions */ - assert(p_image_header_data != 00); - assert(jp2 != 00); - assert(p_manager != 00); - - if (p_image_header_size != 14) { - opj_event_msg(p_manager, EVT_ERROR, "Bad image header box (bad size)\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_image_header_data,&(jp2->h),4); /* HEIGHT */ - p_image_header_data += 4; - opj_read_bytes(p_image_header_data,&(jp2->w),4); /* WIDTH */ - p_image_header_data += 4; - opj_read_bytes(p_image_header_data,&(jp2->numcomps),2); /* NC */ - p_image_header_data += 2; - - /* allocate memory for components */ - jp2->comps = (opj_jp2_comps_t*) opj_malloc(jp2->numcomps * sizeof(opj_jp2_comps_t)); - if (jp2->comps == 0) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to handle image header (ihdr)\n"); - return OPJ_FALSE; - } - memset(jp2->comps,0,jp2->numcomps * sizeof(opj_jp2_comps_t)); - - opj_read_bytes(p_image_header_data,&(jp2->bpc),1); /* BPC */ - ++ p_image_header_data; - - opj_read_bytes(p_image_header_data,&(jp2->C),1); /* C */ - ++ p_image_header_data; - - /* Should be equal to 7 cf. chapter about image header box of the norm */ - if (jp2->C != 7){ - opj_event_msg(p_manager, EVT_INFO, "JP2 IHDR box: compression type indicate that the file is not a conforming JP2 file (%d) \n", jp2->C); - } - - opj_read_bytes(p_image_header_data,&(jp2->UnkC),1); /* UnkC */ - ++ p_image_header_data; - opj_read_bytes(p_image_header_data,&(jp2->IPR),1); /* IPR */ - ++ p_image_header_data; - - return OPJ_TRUE; -} - -OPJ_BYTE * opj_jp2_write_ihdr(opj_jp2_t *jp2, - OPJ_UINT32 * p_nb_bytes_written - ) -{ - OPJ_BYTE * l_ihdr_data,* l_current_ihdr_ptr; - - /* preconditions */ - assert(jp2 != 00); - assert(p_nb_bytes_written != 00); - - /* default image header is 22 bytes wide */ - l_ihdr_data = (OPJ_BYTE *) opj_malloc(22); - if (l_ihdr_data == 00) { - return 00; - } - memset(l_ihdr_data,0,22); - - l_current_ihdr_ptr = l_ihdr_data; - - opj_write_bytes(l_current_ihdr_ptr,22,4); /* write box size */ - l_current_ihdr_ptr+=4; - - opj_write_bytes(l_current_ihdr_ptr,JP2_IHDR, 4); /* IHDR */ - l_current_ihdr_ptr+=4; - - opj_write_bytes(l_current_ihdr_ptr,jp2->h, 4); /* HEIGHT */ - l_current_ihdr_ptr+=4; - - opj_write_bytes(l_current_ihdr_ptr, jp2->w, 4); /* WIDTH */ - l_current_ihdr_ptr+=4; - - opj_write_bytes(l_current_ihdr_ptr, jp2->numcomps, 2); /* NC */ - l_current_ihdr_ptr+=2; - - opj_write_bytes(l_current_ihdr_ptr, jp2->bpc, 1); /* BPC */ - ++l_current_ihdr_ptr; - - opj_write_bytes(l_current_ihdr_ptr, jp2->C, 1); /* C : Always 7 */ - ++l_current_ihdr_ptr; - - opj_write_bytes(l_current_ihdr_ptr, jp2->UnkC, 1); /* UnkC, colorspace unknown */ - ++l_current_ihdr_ptr; - - opj_write_bytes(l_current_ihdr_ptr, jp2->IPR, 1); /* IPR, no intellectual property */ - ++l_current_ihdr_ptr; - - *p_nb_bytes_written = 22; - - return l_ihdr_data; -} - -OPJ_BYTE * opj_jp2_write_bpcc( opj_jp2_t *jp2, - OPJ_UINT32 * p_nb_bytes_written - ) -{ - OPJ_UINT32 i; - /* room for 8 bytes for box and 1 byte for each component */ - OPJ_UINT32 l_bpcc_size = 8 + jp2->numcomps; - OPJ_BYTE * l_bpcc_data,* l_current_bpcc_ptr; - - /* preconditions */ - assert(jp2 != 00); - assert(p_nb_bytes_written != 00); - - l_bpcc_data = (OPJ_BYTE *) opj_malloc(l_bpcc_size); - if (l_bpcc_data == 00) { - return 00; - } - memset(l_bpcc_data,0,l_bpcc_size); - - l_current_bpcc_ptr = l_bpcc_data; - - opj_write_bytes(l_current_bpcc_ptr,l_bpcc_size,4); /* write box size */ - l_current_bpcc_ptr += 4; - - opj_write_bytes(l_current_bpcc_ptr,JP2_BPCC,4); /* BPCC */ - l_current_bpcc_ptr += 4; - - for (i = 0; i < jp2->numcomps; ++i) { - opj_write_bytes(l_current_bpcc_ptr, jp2->comps[i].bpcc, 1); /* write each component information */ - ++l_current_bpcc_ptr; - } - - *p_nb_bytes_written = l_bpcc_size; - - return l_bpcc_data; -} - -OPJ_BOOL opj_jp2_read_bpcc( opj_jp2_t *jp2, - OPJ_BYTE * p_bpc_header_data, - OPJ_UINT32 p_bpc_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 i; - - /* preconditions */ - assert(p_bpc_header_data != 00); - assert(jp2 != 00); - assert(p_manager != 00); - - - if (jp2->bpc != 255 ){ - opj_event_msg(p_manager, EVT_WARNING, "A BPCC header box is available although BPC given by the IHDR box (%d) indicate components bit depth is constant\n",jp2->bpc); - } - - /* and length is relevant */ - if (p_bpc_header_size != jp2->numcomps) { - opj_event_msg(p_manager, EVT_ERROR, "Bad BPCC header box (bad size)\n"); - return OPJ_FALSE; - } - - /* read info for each component */ - for (i = 0; i < jp2->numcomps; ++i) { - opj_read_bytes(p_bpc_header_data,&jp2->comps[i].bpcc ,1); /* read each BPCC component */ - ++p_bpc_header_data; - } - - return OPJ_TRUE; -} - -OPJ_BYTE * opj_jp2_write_colr( opj_jp2_t *jp2, - OPJ_UINT32 * p_nb_bytes_written - ) -{ - /* room for 8 bytes for box 3 for common data and variable upon profile*/ - OPJ_UINT32 l_colr_size = 11; - OPJ_BYTE * l_colr_data,* l_current_colr_ptr; - - /* preconditions */ - assert(jp2 != 00); - assert(p_nb_bytes_written != 00); - assert(jp2->meth == 1 || jp2->meth == 2); - - switch (jp2->meth) { - case 1 : - l_colr_size += 4; /* EnumCS */ - break; - case 2 : - assert(jp2->color.icc_profile_len); /* ICC profile */ - l_colr_size += jp2->color.icc_profile_len; - break; - default : - return 00; - } - - l_colr_data = (OPJ_BYTE *) opj_malloc(l_colr_size); - if (l_colr_data == 00) { - return 00; - } - memset(l_colr_data,0,l_colr_size); - - l_current_colr_ptr = l_colr_data; - - opj_write_bytes(l_current_colr_ptr,l_colr_size,4); /* write box size */ - l_current_colr_ptr += 4; - - opj_write_bytes(l_current_colr_ptr,JP2_COLR,4); /* BPCC */ - l_current_colr_ptr += 4; - - opj_write_bytes(l_current_colr_ptr, jp2->meth,1); /* METH */ - ++l_current_colr_ptr; - - opj_write_bytes(l_current_colr_ptr, jp2->precedence,1); /* PRECEDENCE */ - ++l_current_colr_ptr; - - opj_write_bytes(l_current_colr_ptr, jp2->approx,1); /* APPROX */ - ++l_current_colr_ptr; - - if (jp2->meth == 1) { /* Meth value is restricted to 1 or 2 (Table I.9 of part 1) */ - opj_write_bytes(l_current_colr_ptr, jp2->enumcs,4); } /* EnumCS */ - else { - if (jp2->meth == 2) { /* ICC profile */ - OPJ_UINT32 i; - for(i = 0; i < jp2->color.icc_profile_len; ++i) { - opj_write_bytes(l_current_colr_ptr, jp2->color.icc_profile_buf[i], 1); - ++l_current_colr_ptr; - } - } - } - - *p_nb_bytes_written = l_colr_size; - - return l_colr_data; -} - -void opj_jp2_free_pclr(opj_jp2_color_t *color) -{ - opj_free(color->jp2_pclr->channel_sign); - opj_free(color->jp2_pclr->channel_size); - opj_free(color->jp2_pclr->entries); - - if(color->jp2_pclr->cmap) opj_free(color->jp2_pclr->cmap); - - opj_free(color->jp2_pclr); color->jp2_pclr = NULL; -} - -static OPJ_BOOL opj_jp2_check_color(opj_image_t *image, opj_jp2_color_t *color, opj_event_mgr_t *p_manager) -{ - OPJ_UINT16 i; - - /* testcase 4149.pdf.SIGSEGV.cf7.3501 */ - if (color->jp2_cdef) { - opj_jp2_cdef_info_t *info = color->jp2_cdef->info; - OPJ_UINT16 n = color->jp2_cdef->n; - - for (i = 0; i < n; i++) { - if (info[i].cn >= image->numcomps) { - opj_event_msg(p_manager, EVT_ERROR, "Invalid component index %d (>= %d).\n", info[i].cn, image->numcomps); - return OPJ_FALSE; - } - if (info[i].asoc > 0 && (OPJ_UINT32)(info[i].asoc - 1) >= image->numcomps) { - opj_event_msg(p_manager, EVT_ERROR, "Invalid component index %d (>= %d).\n", info[i].asoc - 1, image->numcomps); - return OPJ_FALSE; - } - } - } - - /* testcases 451.pdf.SIGSEGV.f4c.3723, 451.pdf.SIGSEGV.5b5.3723 and - 66ea31acbb0f23a2bbc91f64d69a03f5_signal_sigsegv_13937c0_7030_5725.pdf */ - if (color->jp2_pclr && color->jp2_pclr->cmap) { - OPJ_UINT16 nr_channels = color->jp2_pclr->nr_channels; - opj_jp2_cmap_comp_t *cmap = color->jp2_pclr->cmap; - OPJ_BOOL *pcol_usage, is_sane = OPJ_TRUE; - - /* verify that all original components match an existing one */ - for (i = 0; i < nr_channels; i++) { - if (cmap[i].cmp >= image->numcomps) { - opj_event_msg(p_manager, EVT_ERROR, "Invalid component index %d (>= %d).\n", cmap[i].cmp, image->numcomps); - is_sane = OPJ_FALSE; - } - } - - pcol_usage = opj_calloc(nr_channels, sizeof(OPJ_BOOL)); - if (!pcol_usage) { - opj_event_msg(p_manager, EVT_ERROR, "Unexpected OOM.\n"); - return OPJ_FALSE; - } - /* verify that no component is targeted more than once */ - for (i = 0; i < nr_channels; i++) { - OPJ_UINT16 pcol = cmap[i].pcol; - assert(cmap[i].mtyp == 0 || cmap[i].mtyp == 1); - if (pcol >= nr_channels) { - opj_event_msg(p_manager, EVT_ERROR, "Invalid component/palette index for direct mapping %d.\n", pcol); - is_sane = OPJ_FALSE; - } - else if (pcol_usage[pcol] && cmap[i].mtyp == 1) { - opj_event_msg(p_manager, EVT_ERROR, "Component %d is mapped twice.\n", pcol); - is_sane = OPJ_FALSE; - } - else if (cmap[i].mtyp == 0 && cmap[i].pcol != 0) { - /* I.5.3.5 PCOL: If the value of the MTYP field for this channel is 0, then - * the value of this field shall be 0. */ - opj_event_msg(p_manager, EVT_ERROR, "Direct use at #%d however pcol=%d.\n", i, pcol); - is_sane = OPJ_FALSE; - } - else - pcol_usage[pcol] = OPJ_TRUE; - } - /* verify that all components are targeted at least once */ - for (i = 0; i < nr_channels; i++) { - if (!pcol_usage[i] && cmap[i].mtyp != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Component %d doesn't have a mapping.\n", i); - is_sane = OPJ_FALSE; - } - } - opj_free(pcol_usage); - if (!is_sane) { - return OPJ_FALSE; - } - } - - return OPJ_TRUE; -} - -/* file9.jp2 */ -void opj_jp2_apply_pclr(opj_image_t *image, opj_jp2_color_t *color) -{ - opj_image_comp_t *old_comps, *new_comps; - OPJ_BYTE *channel_size, *channel_sign; - OPJ_UINT32 *entries; - opj_jp2_cmap_comp_t *cmap; - OPJ_INT32 *src, *dst; - OPJ_UINT32 j, max; - OPJ_UINT16 i, nr_channels, cmp, pcol; - OPJ_INT32 k, top_k; - - channel_size = color->jp2_pclr->channel_size; - channel_sign = color->jp2_pclr->channel_sign; - entries = color->jp2_pclr->entries; - cmap = color->jp2_pclr->cmap; - nr_channels = color->jp2_pclr->nr_channels; - - old_comps = image->comps; - new_comps = (opj_image_comp_t*) - opj_malloc(nr_channels * sizeof(opj_image_comp_t)); - - for(i = 0; i < nr_channels; ++i) { - pcol = cmap[i].pcol; cmp = cmap[i].cmp; - - /* Direct use */ - if(cmap[i].mtyp == 0){ - assert( pcol == 0 ); - new_comps[i] = old_comps[cmp]; - } else { - assert( i == pcol ); - new_comps[pcol] = old_comps[cmp]; - } - - /* Palette mapping: */ - new_comps[i].data = (OPJ_INT32*) - opj_malloc(old_comps[cmp].w * old_comps[cmp].h * sizeof(OPJ_INT32)); - new_comps[i].prec = channel_size[i]; - new_comps[i].sgnd = channel_sign[i]; - } - - top_k = color->jp2_pclr->nr_entries - 1; - - for(i = 0; i < nr_channels; ++i) { - /* Palette mapping: */ - cmp = cmap[i].cmp; pcol = cmap[i].pcol; - src = old_comps[cmp].data; - assert( src ); - max = new_comps[pcol].w * new_comps[pcol].h; - - /* Direct use: */ - if(cmap[i].mtyp == 0) { - assert( cmp == 0 ); - dst = new_comps[i].data; - assert( dst ); - for(j = 0; j < max; ++j) { - dst[j] = src[j]; - } - } - else { - assert( i == pcol ); - dst = new_comps[pcol].data; - assert( dst ); - for(j = 0; j < max; ++j) { - /* The index */ - if((k = src[j]) < 0) k = 0; else if(k > top_k) k = top_k; - - /* The colour */ - dst[j] = (OPJ_INT32)entries[k * nr_channels + pcol]; - } - } - } - - max = image->numcomps; - for(i = 0; i < max; ++i) { - if(old_comps[i].data) opj_free(old_comps[i].data); - } - - opj_free(old_comps); - image->comps = new_comps; - image->numcomps = nr_channels; - - opj_jp2_free_pclr(color); - -}/* apply_pclr() */ - -OPJ_BOOL opj_jp2_read_pclr( opj_jp2_t *jp2, - OPJ_BYTE * p_pclr_header_data, - OPJ_UINT32 p_pclr_header_size, - opj_event_mgr_t * p_manager - ) -{ - opj_jp2_pclr_t *jp2_pclr; - OPJ_BYTE *channel_size, *channel_sign; - OPJ_UINT32 *entries; - OPJ_UINT16 nr_entries,nr_channels; - OPJ_UINT16 i, j; - OPJ_UINT32 l_value; - OPJ_BYTE *orig_header_data = p_pclr_header_data; - - /* preconditions */ - assert(p_pclr_header_data != 00); - assert(jp2 != 00); - assert(p_manager != 00); - (void)p_pclr_header_size; - - if(jp2->color.jp2_pclr) - return OPJ_FALSE; - - if (p_pclr_header_size < 3) - return OPJ_FALSE; - - opj_read_bytes(p_pclr_header_data, &l_value , 2); /* NE */ - p_pclr_header_data += 2; - nr_entries = (OPJ_UINT16) l_value; - - opj_read_bytes(p_pclr_header_data, &l_value , 1); /* NPC */ - ++p_pclr_header_data; - nr_channels = (OPJ_UINT16) l_value; - - if (p_pclr_header_size < 3 + (OPJ_UINT32)nr_channels || nr_channels == 0 || nr_entries >= (OPJ_UINT32)-1 / nr_channels) - return OPJ_FALSE; - - entries = (OPJ_UINT32*) opj_malloc((size_t)nr_channels * nr_entries * sizeof(OPJ_UINT32)); - if (!entries) - return OPJ_FALSE; - channel_size = (OPJ_BYTE*) opj_malloc(nr_channels); - if (!channel_size) - { - opj_free(entries); - return OPJ_FALSE; - } - channel_sign = (OPJ_BYTE*) opj_malloc(nr_channels); - if (!channel_sign) - { - opj_free(entries); - opj_free(channel_size); - return OPJ_FALSE; - } - - jp2_pclr = (opj_jp2_pclr_t*)opj_malloc(sizeof(opj_jp2_pclr_t)); - if (!jp2_pclr) - { - opj_free(entries); - opj_free(channel_size); - opj_free(channel_sign); - return OPJ_FALSE; - } - - jp2_pclr->channel_sign = channel_sign; - jp2_pclr->channel_size = channel_size; - jp2_pclr->entries = entries; - jp2_pclr->nr_entries = nr_entries; - jp2_pclr->nr_channels = (OPJ_BYTE) l_value; - jp2_pclr->cmap = NULL; - - jp2->color.jp2_pclr = jp2_pclr; - - for(i = 0; i < nr_channels; ++i) { - opj_read_bytes(p_pclr_header_data, &l_value , 1); /* Bi */ - ++p_pclr_header_data; - - channel_size[i] = (OPJ_BYTE)((l_value & 0x7f) + 1); - channel_sign[i] = (l_value & 0x80) ? 1 : 0; - } - - for(j = 0; j < nr_entries; ++j) { - for(i = 0; i < nr_channels; ++i) { - OPJ_UINT32 bytes_to_read = (OPJ_UINT32)((channel_size[i]+7)>>3); - - if (bytes_to_read > sizeof(OPJ_UINT32)) - bytes_to_read = sizeof(OPJ_UINT32); - if ((ptrdiff_t)p_pclr_header_size < p_pclr_header_data - orig_header_data + (ptrdiff_t)bytes_to_read) - return OPJ_FALSE; - - opj_read_bytes(p_pclr_header_data, &l_value , bytes_to_read); /* Cji */ - p_pclr_header_data += bytes_to_read; - *entries = (OPJ_UINT32) l_value; - entries++; - } - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_jp2_read_cmap( opj_jp2_t * jp2, - OPJ_BYTE * p_cmap_header_data, - OPJ_UINT32 p_cmap_header_size, - opj_event_mgr_t * p_manager - ) -{ - opj_jp2_cmap_comp_t *cmap; - OPJ_BYTE i, nr_channels; - OPJ_UINT32 l_value; - - /* preconditions */ - assert(jp2 != 00); - assert(p_cmap_header_data != 00); - assert(p_manager != 00); - (void)p_cmap_header_size; - - /* Need nr_channels: */ - if(jp2->color.jp2_pclr == NULL) { - opj_event_msg(p_manager, EVT_ERROR, "Need to read a PCLR box before the CMAP box.\n"); - return OPJ_FALSE; - } - - /* Part 1, I.5.3.5: 'There shall be at most one Component Mapping box - * inside a JP2 Header box' : - */ - if(jp2->color.jp2_pclr->cmap) { - opj_event_msg(p_manager, EVT_ERROR, "Only one CMAP box is allowed.\n"); - return OPJ_FALSE; - } - - nr_channels = jp2->color.jp2_pclr->nr_channels; - if (p_cmap_header_size < (OPJ_UINT32)nr_channels * 4) { - opj_event_msg(p_manager, EVT_ERROR, "Insufficient data for CMAP box.\n"); - return OPJ_FALSE; - } - - cmap = (opj_jp2_cmap_comp_t*) opj_malloc(nr_channels * sizeof(opj_jp2_cmap_comp_t)); - if (!cmap) - return OPJ_FALSE; - - - for(i = 0; i < nr_channels; ++i) { - opj_read_bytes(p_cmap_header_data, &l_value, 2); /* CMP^i */ - p_cmap_header_data +=2; - cmap[i].cmp = (OPJ_UINT16) l_value; - - opj_read_bytes(p_cmap_header_data, &l_value, 1); /* MTYP^i */ - ++p_cmap_header_data; - cmap[i].mtyp = (OPJ_BYTE) l_value; - - opj_read_bytes(p_cmap_header_data, &l_value, 1); /* PCOL^i */ - ++p_cmap_header_data; - cmap[i].pcol = (OPJ_BYTE) l_value; - } - - jp2->color.jp2_pclr->cmap = cmap; - - return OPJ_TRUE; -} - -void opj_jp2_apply_cdef(opj_image_t *image, opj_jp2_color_t *color) -{ - opj_jp2_cdef_info_t *info; - OPJ_UINT16 i, n, cn, asoc, acn; - - info = color->jp2_cdef->info; - n = color->jp2_cdef->n; - - for(i = 0; i < n; ++i) - { - /* WATCH: acn = asoc - 1 ! */ - asoc = info[i].asoc; - if(asoc == 0 || asoc == 65535) - { - if (i < image->numcomps) - image->comps[i].alpha = info[i].typ; - continue; - } - - cn = info[i].cn; - acn = (OPJ_UINT16)(asoc - 1); - if( cn >= image->numcomps || acn >= image->numcomps ) - { - fprintf(stderr, "cn=%d, acn=%d, numcomps=%d\n", cn, acn, image->numcomps); - continue; - } - - if(cn != acn) - { - opj_image_comp_t saved; - - memcpy(&saved, &image->comps[cn], sizeof(opj_image_comp_t)); - memcpy(&image->comps[cn], &image->comps[acn], sizeof(opj_image_comp_t)); - memcpy(&image->comps[acn], &saved, sizeof(opj_image_comp_t)); - - info[i].asoc = (OPJ_UINT16)(cn + 1); - info[acn].asoc = (OPJ_UINT16)(info[acn].cn + 1); - } - - image->comps[cn].alpha = info[i].typ; - } - - if(color->jp2_cdef->info) opj_free(color->jp2_cdef->info); - - opj_free(color->jp2_cdef); color->jp2_cdef = NULL; - -}/* jp2_apply_cdef() */ - -OPJ_BOOL opj_jp2_read_cdef( opj_jp2_t * jp2, - OPJ_BYTE * p_cdef_header_data, - OPJ_UINT32 p_cdef_header_size, - opj_event_mgr_t * p_manager - ) -{ - opj_jp2_cdef_info_t *cdef_info; - OPJ_UINT16 i; - OPJ_UINT32 l_value; - - /* preconditions */ - assert(jp2 != 00); - assert(p_cdef_header_data != 00); - assert(p_manager != 00); - (void)p_cdef_header_size; - - /* Part 1, I.5.3.6: 'The shall be at most one Channel Definition box - * inside a JP2 Header box.'*/ - if(jp2->color.jp2_cdef) return OPJ_FALSE; - - if (p_cdef_header_size < 2) { - opj_event_msg(p_manager, EVT_ERROR, "Insufficient data for CDEF box.\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_cdef_header_data,&l_value ,2); /* N */ - p_cdef_header_data+= 2; - - if ( (OPJ_UINT16)l_value == 0){ /* szukw000: FIXME */ - opj_event_msg(p_manager, EVT_ERROR, "Number of channel description is equal to zero in CDEF box.\n"); - return OPJ_FALSE; - } - - if (p_cdef_header_size < 2 + (OPJ_UINT32)(OPJ_UINT16)l_value * 6) { - opj_event_msg(p_manager, EVT_ERROR, "Insufficient data for CDEF box.\n"); - return OPJ_FALSE; - } - - cdef_info = (opj_jp2_cdef_info_t*) opj_malloc(l_value * sizeof(opj_jp2_cdef_info_t)); - if (!cdef_info) - return OPJ_FALSE; - - jp2->color.jp2_cdef = (opj_jp2_cdef_t*)opj_malloc(sizeof(opj_jp2_cdef_t)); - if(!jp2->color.jp2_cdef) - { - opj_free(cdef_info); - return OPJ_FALSE; - } - jp2->color.jp2_cdef->info = cdef_info; - jp2->color.jp2_cdef->n = (OPJ_UINT16) l_value; - - for(i = 0; i < jp2->color.jp2_cdef->n; ++i) { - opj_read_bytes(p_cdef_header_data, &l_value, 2); /* Cn^i */ - p_cdef_header_data +=2; - cdef_info[i].cn = (OPJ_UINT16) l_value; - - opj_read_bytes(p_cdef_header_data, &l_value, 2); /* Typ^i */ - p_cdef_header_data +=2; - cdef_info[i].typ = (OPJ_UINT16) l_value; - - opj_read_bytes(p_cdef_header_data, &l_value, 2); /* Asoc^i */ - p_cdef_header_data +=2; - cdef_info[i].asoc = (OPJ_UINT16) l_value; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_jp2_read_colr( opj_jp2_t *jp2, - OPJ_BYTE * p_colr_header_data, - OPJ_UINT32 p_colr_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_value; - - /* preconditions */ - assert(jp2 != 00); - assert(p_colr_header_data != 00); - assert(p_manager != 00); - - if (p_colr_header_size < 3) { - opj_event_msg(p_manager, EVT_ERROR, "Bad COLR header box (bad size)\n"); - return OPJ_FALSE; - } - - /* Part 1, I.5.3.3 : 'A conforming JP2 reader shall ignore all Colour - * Specification boxes after the first.' - */ - if(jp2->color.jp2_has_colr) { - opj_event_msg(p_manager, EVT_INFO, "A conforming JP2 reader shall ignore all Colour Specification boxes after the first, so we ignore this one.\n"); - p_colr_header_data += p_colr_header_size; - return OPJ_TRUE; - } - - opj_read_bytes(p_colr_header_data,&jp2->meth ,1); /* METH */ - ++p_colr_header_data; - - opj_read_bytes(p_colr_header_data,&jp2->precedence ,1); /* PRECEDENCE */ - ++p_colr_header_data; - - opj_read_bytes(p_colr_header_data,&jp2->approx ,1); /* APPROX */ - ++p_colr_header_data; - - if (jp2->meth == 1) { - if (p_colr_header_size < 7) { - opj_event_msg(p_manager, EVT_ERROR, "Bad COLR header box (bad size: %d)\n", p_colr_header_size); - return OPJ_FALSE; - } - if (p_colr_header_size > 7) { - /* testcase Altona_Technical_v20_x4.pdf */ - opj_event_msg(p_manager, EVT_WARNING, "Bad COLR header box (bad size: %d)\n", p_colr_header_size); - } - - opj_read_bytes(p_colr_header_data,&jp2->enumcs ,4); /* EnumCS */ - - jp2->color.jp2_has_colr = 1; - } - else if (jp2->meth == 2) { - /* ICC profile */ - OPJ_INT32 it_icc_value = 0; - OPJ_INT32 icc_len = (OPJ_INT32)p_colr_header_size - 3; - - jp2->color.icc_profile_len = (OPJ_UINT32)icc_len; - jp2->color.icc_profile_buf = (OPJ_BYTE*) opj_malloc((size_t)icc_len); - if (!jp2->color.icc_profile_buf) - { - jp2->color.icc_profile_len = 0; - return OPJ_FALSE; - } - memset(jp2->color.icc_profile_buf, 0, (size_t)icc_len * sizeof(OPJ_BYTE)); - - for (it_icc_value = 0; it_icc_value < icc_len; ++it_icc_value) - { - opj_read_bytes(p_colr_header_data,&l_value,1); /* icc values */ - ++p_colr_header_data; - jp2->color.icc_profile_buf[it_icc_value] = (OPJ_BYTE) l_value; - } - - jp2->color.jp2_has_colr = 1; - } - else if (jp2->meth > 2) - { - /* ISO/IEC 15444-1:2004 (E), Table I.9 Legal METH values: - conforming JP2 reader shall ignore the entire Colour Specification box.*/ - opj_event_msg(p_manager, EVT_INFO, "COLR BOX meth value is not a regular value (%d), " - "so we will ignore the entire Colour Specification box. \n", jp2->meth); - } - return OPJ_TRUE; -} - -OPJ_BOOL opj_jp2_decode(opj_jp2_t *jp2, - opj_stream_private_t *p_stream, - opj_image_t* p_image, - opj_event_mgr_t * p_manager) -{ - if (!p_image) - return OPJ_FALSE; - - /* J2K decoding */ - if( ! opj_j2k_decode(jp2->j2k, p_stream, p_image, p_manager) ) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to decode the codestream in the JP2 file\n"); - return OPJ_FALSE; - } - - if (!jp2->ignore_pclr_cmap_cdef){ - if (!opj_jp2_check_color(p_image, &(jp2->color), p_manager)) { - return OPJ_FALSE; - } - - /* Set Image Color Space */ - if (jp2->enumcs == 16) - p_image->color_space = OPJ_CLRSPC_SRGB; - else if (jp2->enumcs == 17) - p_image->color_space = OPJ_CLRSPC_GRAY; - else if (jp2->enumcs == 18) - p_image->color_space = OPJ_CLRSPC_SYCC; - else if (jp2->enumcs == 24) - p_image->color_space = OPJ_CLRSPC_EYCC; - else - p_image->color_space = OPJ_CLRSPC_UNKNOWN; - - /* Apply the color space if needed */ - if(jp2->color.jp2_cdef) { - opj_jp2_apply_cdef(p_image, &(jp2->color)); - } - - if(jp2->color.jp2_pclr) { - /* Part 1, I.5.3.4: Either both or none : */ - if( !jp2->color.jp2_pclr->cmap) - opj_jp2_free_pclr(&(jp2->color)); - else - opj_jp2_apply_pclr(p_image, &(jp2->color)); - } - - if(jp2->color.icc_profile_buf) { - p_image->icc_profile_buf = jp2->color.icc_profile_buf; - p_image->icc_profile_len = jp2->color.icc_profile_len; - jp2->color.icc_profile_buf = NULL; - } - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_jp2_write_jp2h(opj_jp2_t *jp2, - opj_stream_private_t *stream, - opj_event_mgr_t * p_manager - ) -{ - opj_jp2_img_header_writer_handler_t l_writers [3]; - opj_jp2_img_header_writer_handler_t * l_current_writer; - - OPJ_INT32 i, l_nb_pass; - /* size of data for super box*/ - OPJ_UINT32 l_jp2h_size = 8; - OPJ_BOOL l_result = OPJ_TRUE; - - /* to store the data of the super box */ - OPJ_BYTE l_jp2h_data [8]; - - /* preconditions */ - assert(stream != 00); - assert(jp2 != 00); - assert(p_manager != 00); - - memset(l_writers,0,sizeof(l_writers)); - - if (jp2->bpc == 255) { - l_nb_pass = 3; - l_writers[0].handler = opj_jp2_write_ihdr; - l_writers[1].handler = opj_jp2_write_bpcc; - l_writers[2].handler = opj_jp2_write_colr; - } - else { - l_nb_pass = 2; - l_writers[0].handler = opj_jp2_write_ihdr; - l_writers[1].handler = opj_jp2_write_colr; - } - - /* write box header */ - /* write JP2H type */ - opj_write_bytes(l_jp2h_data+4,JP2_JP2H,4); - - l_current_writer = l_writers; - for (i=0;im_data = l_current_writer->handler(jp2,&(l_current_writer->m_size)); - if (l_current_writer->m_data == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to hold JP2 Header data\n"); - l_result = OPJ_FALSE; - break; - } - - l_jp2h_size += l_current_writer->m_size; - ++l_current_writer; - } - - if (! l_result) { - l_current_writer = l_writers; - for (i=0;im_data != 00) { - opj_free(l_current_writer->m_data ); - } - ++l_current_writer; - } - - return OPJ_FALSE; - } - - /* write super box size */ - opj_write_bytes(l_jp2h_data,l_jp2h_size,4); - - /* write super box data on stream */ - if (opj_stream_write_data(stream,l_jp2h_data,8,p_manager) != 8) { - opj_event_msg(p_manager, EVT_ERROR, "Stream error while writing JP2 Header box\n"); - l_result = OPJ_FALSE; - } - - if (l_result) { - l_current_writer = l_writers; - for (i=0;im_data,l_current_writer->m_size,p_manager) != l_current_writer->m_size) { - opj_event_msg(p_manager, EVT_ERROR, "Stream error while writing JP2 Header box\n"); - l_result = OPJ_FALSE; - break; - } - ++l_current_writer; - } - } - - l_current_writer = l_writers; - - /* cleanup */ - for (i=0;im_data != 00) { - opj_free(l_current_writer->m_data ); - } - ++l_current_writer; - } - - return l_result; -} - -OPJ_BOOL opj_jp2_write_ftyp(opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_UINT32 i; - OPJ_UINT32 l_ftyp_size = 16 + 4 * jp2->numcl; - OPJ_BYTE * l_ftyp_data, * l_current_data_ptr; - OPJ_BOOL l_result; - - /* preconditions */ - assert(cio != 00); - assert(jp2 != 00); - assert(p_manager != 00); - - l_ftyp_data = (OPJ_BYTE *) opj_malloc(l_ftyp_size); - - if (l_ftyp_data == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to handle ftyp data\n"); - return OPJ_FALSE; - } - - memset(l_ftyp_data,0,l_ftyp_size); - - l_current_data_ptr = l_ftyp_data; - - opj_write_bytes(l_current_data_ptr, l_ftyp_size,4); /* box size */ - l_current_data_ptr += 4; - - opj_write_bytes(l_current_data_ptr, JP2_FTYP,4); /* FTYP */ - l_current_data_ptr += 4; - - opj_write_bytes(l_current_data_ptr, jp2->brand,4); /* BR */ - l_current_data_ptr += 4; - - opj_write_bytes(l_current_data_ptr, jp2->minversion,4); /* MinV */ - l_current_data_ptr += 4; - - for (i = 0; i < jp2->numcl; i++) { - opj_write_bytes(l_current_data_ptr, jp2->cl[i],4); /* CL */ - } - - l_result = (opj_stream_write_data(cio,l_ftyp_data,l_ftyp_size,p_manager) == l_ftyp_size); - if (! l_result) - { - opj_event_msg(p_manager, EVT_ERROR, "Error while writing ftyp data to stream\n"); - } - - opj_free(l_ftyp_data); - - return l_result; -} - -OPJ_BOOL opj_jp2_write_jp2c(opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_OFF_T j2k_codestream_exit; - OPJ_BYTE l_data_header [8]; - - /* preconditions */ - assert(jp2 != 00); - assert(cio != 00); - assert(p_manager != 00); - assert(opj_stream_has_seek(cio)); - - j2k_codestream_exit = opj_stream_tell(cio); - opj_write_bytes(l_data_header, - (OPJ_UINT32) (j2k_codestream_exit - jp2->j2k_codestream_offset), - 4); /* size of codestream */ - opj_write_bytes(l_data_header + 4,JP2_JP2C,4); /* JP2C */ - - if (! opj_stream_seek(cio,jp2->j2k_codestream_offset,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n"); - return OPJ_FALSE; - } - - if (opj_stream_write_data(cio,l_data_header,8,p_manager) != 8) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n"); - return OPJ_FALSE; - } - - if (! opj_stream_seek(cio,j2k_codestream_exit,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_jp2_write_jp( opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - /* 12 bytes will be read */ - OPJ_BYTE l_signature_data [12]; - - /* preconditions */ - assert(cio != 00); - assert(jp2 != 00); - assert(p_manager != 00); - - /* write box length */ - opj_write_bytes(l_signature_data,12,4); - /* writes box type */ - opj_write_bytes(l_signature_data+4,JP2_JP,4); - /* writes magic number*/ - opj_write_bytes(l_signature_data+8,0x0d0a870a,4); - - if (opj_stream_write_data(cio,l_signature_data,12,p_manager) != 12) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -/* ----------------------------------------------------------------------- */ -/* JP2 decoder interface */ -/* ----------------------------------------------------------------------- */ - -void opj_jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters) -{ - /* setup the J2K codec */ - opj_j2k_setup_decoder(jp2->j2k, parameters); - - /* further JP2 initializations go here */ - jp2->color.jp2_has_colr = 0; - jp2->ignore_pclr_cmap_cdef = parameters->flags & OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG; -} - -/* ----------------------------------------------------------------------- */ -/* JP2 encoder interface */ -/* ----------------------------------------------------------------------- */ - -void opj_jp2_setup_encoder( opj_jp2_t *jp2, - opj_cparameters_t *parameters, - opj_image_t *image, - opj_event_mgr_t * p_manager) -{ - OPJ_UINT32 i; - OPJ_UINT32 depth_0; - OPJ_UINT32 sign; - - if(!jp2 || !parameters || !image) - return; - - /* setup the J2K codec */ - /* ------------------- */ - - /* Check if number of components respects standard */ - if (image->numcomps < 1 || image->numcomps > 16384) { - opj_event_msg(p_manager, EVT_ERROR, "Invalid number of components specified while setting up JP2 encoder\n"); - return; - } - - opj_j2k_setup_encoder(jp2->j2k, parameters, image, p_manager ); - - /* setup the JP2 codec */ - /* ------------------- */ - - /* Profile box */ - - jp2->brand = JP2_JP2; /* BR */ - jp2->minversion = 0; /* MinV */ - jp2->numcl = 1; - jp2->cl = (OPJ_UINT32*) opj_malloc(jp2->numcl * sizeof(OPJ_UINT32)); - if (!jp2->cl){ - jp2->cl = NULL; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory when setup the JP2 encoder\n"); - return; - } - jp2->cl[0] = JP2_JP2; /* CL0 : JP2 */ - - /* Image Header box */ - - jp2->numcomps = image->numcomps; /* NC */ - jp2->comps = (opj_jp2_comps_t*) opj_malloc(jp2->numcomps * sizeof(opj_jp2_comps_t)); - if (!jp2->comps) { - jp2->comps = NULL; - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory when setup the JP2 encoder\n"); - return; - } - - jp2->h = image->y1 - image->y0; /* HEIGHT */ - jp2->w = image->x1 - image->x0; /* WIDTH */ - /* BPC */ - depth_0 = image->comps[0].prec - 1; - sign = image->comps[0].sgnd; - jp2->bpc = depth_0 + (sign << 7); - for (i = 1; i < image->numcomps; i++) { - OPJ_UINT32 depth = image->comps[i].prec - 1; - sign = image->comps[i].sgnd; - if (depth_0 != depth) - jp2->bpc = 255; - } - jp2->C = 7; /* C : Always 7 */ - jp2->UnkC = 0; /* UnkC, colorspace specified in colr box */ - jp2->IPR = 0; /* IPR, no intellectual property */ - - /* BitsPerComponent box */ - for (i = 0; i < image->numcomps; i++) { - jp2->comps[i].bpcc = image->comps[i].prec - 1 + (image->comps[i].sgnd << 7); - } - - /* Colour Specification box */ - if(image->icc_profile_len) { - jp2->meth = 2; - jp2->enumcs = 0; - } - else { - jp2->meth = 1; - if (image->color_space == 1) - jp2->enumcs = 16; /* sRGB as defined by IEC 61966-2-1 */ - else if (image->color_space == 2) - jp2->enumcs = 17; /* greyscale */ - else if (image->color_space == 3) - jp2->enumcs = 18; /* YUV */ - } - - - jp2->precedence = 0; /* PRECEDENCE */ - jp2->approx = 0; /* APPROX */ - - jp2->jpip_on = parameters->jpip_on; -} - -OPJ_BOOL opj_jp2_encode(opj_jp2_t *jp2, - opj_stream_private_t *stream, - opj_event_mgr_t * p_manager) -{ - return opj_j2k_encode(jp2->j2k, stream, p_manager); -} - -OPJ_BOOL opj_jp2_end_decompress(opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager - ) -{ - /* preconditions */ - assert(jp2 != 00); - assert(cio != 00); - assert(p_manager != 00); - - /* customization of the end encoding */ - opj_jp2_setup_end_header_reading(jp2); - - /* write header */ - if (! opj_jp2_exec (jp2,jp2->m_procedure_list,cio,p_manager)) { - return OPJ_FALSE; - } - - return opj_j2k_end_decompress(jp2->j2k, cio, p_manager); -} - -OPJ_BOOL opj_jp2_end_compress( opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager - ) -{ - /* preconditions */ - assert(jp2 != 00); - assert(cio != 00); - assert(p_manager != 00); - - /* customization of the end encoding */ - opj_jp2_setup_end_header_writing(jp2); - - if (! opj_j2k_end_compress(jp2->j2k,cio,p_manager)) { - return OPJ_FALSE; - } - - /* write header */ - return opj_jp2_exec(jp2,jp2->m_procedure_list,cio,p_manager); -} - -void opj_jp2_setup_end_header_writing (opj_jp2_t *jp2) -{ - /* preconditions */ - assert(jp2 != 00); - -#ifdef USE_JPIP - if( jp2->jpip_on ) - opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jpip_write_iptr ); -#endif - opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jp2_write_jp2c ); - /* DEVELOPER CORNER, add your custom procedures */ -#ifdef USE_JPIP - if( jp2->jpip_on ) - { - opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jpip_write_cidx ); - opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jpip_write_fidx ); - } -#endif -} - -void opj_jp2_setup_end_header_reading (opj_jp2_t *jp2) -{ - /* preconditions */ - assert(jp2 != 00); - opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jp2_read_header_procedure ); - /* DEVELOPER CORNER, add your custom procedures */ -} - -OPJ_BOOL opj_jp2_default_validation ( opj_jp2_t * jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager - ) -{ - OPJ_BOOL l_is_valid = OPJ_TRUE; - OPJ_UINT32 i; - - /* preconditions */ - assert(jp2 != 00); - assert(cio != 00); - assert(p_manager != 00); - - /* JPEG2000 codec validation */ - - /* STATE checking */ - /* make sure the state is at 0 */ - l_is_valid &= (jp2->jp2_state == JP2_STATE_NONE); - - /* make sure not reading a jp2h ???? WEIRD */ - l_is_valid &= (jp2->jp2_img_state == JP2_IMG_STATE_NONE); - - /* POINTER validation */ - /* make sure a j2k codec is present */ - l_is_valid &= (jp2->j2k != 00); - - /* make sure a procedure list is present */ - l_is_valid &= (jp2->m_procedure_list != 00); - - /* make sure a validation list is present */ - l_is_valid &= (jp2->m_validation_list != 00); - - /* PARAMETER VALIDATION */ - /* number of components */ - l_is_valid &= (jp2->numcl > 0); - /* width */ - l_is_valid &= (jp2->h > 0); - /* height */ - l_is_valid &= (jp2->w > 0); - /* precision */ - for (i = 0; i < jp2->numcomps; ++i) { - l_is_valid &= (jp2->comps[i].bpcc > 0); - } - - /* METH */ - l_is_valid &= ((jp2->meth > 0) && (jp2->meth < 3)); - - /* stream validation */ - /* back and forth is needed */ - l_is_valid &= opj_stream_has_seek(cio); - - return l_is_valid; -} - -OPJ_BOOL opj_jp2_read_header_procedure( opj_jp2_t *jp2, - opj_stream_private_t *stream, - opj_event_mgr_t * p_manager - ) -{ - opj_jp2_box_t box; - OPJ_UINT32 l_nb_bytes_read; - const opj_jp2_header_handler_t * l_current_handler; - OPJ_UINT32 l_last_data_size = OPJ_BOX_SIZE; - OPJ_UINT32 l_current_data_size; - OPJ_BYTE * l_current_data = 00; - - /* preconditions */ - assert(stream != 00); - assert(jp2 != 00); - assert(p_manager != 00); - - l_current_data = (OPJ_BYTE*)opj_malloc(l_last_data_size); - - if (l_current_data == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to handle jpeg2000 file header\n"); - return OPJ_FALSE; - } - memset(l_current_data, 0 , l_last_data_size); - - while (opj_jp2_read_boxhdr(&box,&l_nb_bytes_read,stream,p_manager)) { - /* is it the codestream box ? */ - if (box.type == JP2_JP2C) { - if (jp2->jp2_state & JP2_STATE_HEADER) { - jp2->jp2_state |= JP2_STATE_CODESTREAM; - opj_free(l_current_data); - return OPJ_TRUE; - } - else { - opj_event_msg(p_manager, EVT_ERROR, "bad placed jpeg codestream\n"); - opj_free(l_current_data); - return OPJ_FALSE; - } - } - else if (box.length == 0) { - opj_event_msg(p_manager, EVT_ERROR, "Cannot handle box of undefined sizes\n"); - opj_free(l_current_data); - return OPJ_FALSE; - } - /* testcase 1851.pdf.SIGSEGV.ce9.948 */ - else if (box.length < l_nb_bytes_read) { - opj_event_msg(p_manager, EVT_ERROR, "invalid box size %d (%x)\n", box.length, box.type); - opj_free(l_current_data); - return OPJ_FALSE; - } - - l_current_handler = opj_jp2_find_handler(box.type); - l_current_data_size = box.length - l_nb_bytes_read; - - if (l_current_handler != 00) { - if (l_current_data_size > l_last_data_size) { - OPJ_BYTE* new_current_data = (OPJ_BYTE*)opj_realloc(l_current_data,l_current_data_size); - if (!new_current_data) { - opj_free(l_current_data); - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to handle jpeg2000 box\n"); - return OPJ_FALSE; - } - l_current_data = new_current_data; - l_last_data_size = l_current_data_size; - } - - l_nb_bytes_read = (OPJ_UINT32)opj_stream_read_data(stream,l_current_data,l_current_data_size,p_manager); - if (l_nb_bytes_read != l_current_data_size) { - opj_event_msg(p_manager, EVT_ERROR, "Problem with reading JPEG2000 box, stream error\n"); - opj_free(l_current_data); - return OPJ_FALSE; - } - - if (! l_current_handler->handler(jp2,l_current_data,l_current_data_size,p_manager)) { - opj_free(l_current_data); - return OPJ_FALSE; - } - } - else { - jp2->jp2_state |= JP2_STATE_UNKNOWN; - if (opj_stream_skip(stream,l_current_data_size,p_manager) != l_current_data_size) { - opj_event_msg(p_manager, EVT_ERROR, "Problem with skipping JPEG2000 box, stream error\n"); - opj_free(l_current_data); - return OPJ_FALSE; - } - } - } - - opj_free(l_current_data); - - return OPJ_TRUE; -} - -/** - * Excutes the given procedures on the given codec. - * - * @param p_procedure_list the list of procedures to execute - * @param jp2 the jpeg2000 file codec to execute the procedures on. - * @param stream the stream to execute the procedures on. - * @param p_manager the user manager. - * - * @return true if all the procedures were successfully executed. - */ -static OPJ_BOOL opj_jp2_exec ( opj_jp2_t * jp2, - opj_procedure_list_t * p_procedure_list, - opj_stream_private_t *stream, - opj_event_mgr_t * p_manager - ) - -{ - OPJ_BOOL (** l_procedure) (opj_jp2_t * jp2, opj_stream_private_t *, opj_event_mgr_t *) = 00; - OPJ_BOOL l_result = OPJ_TRUE; - OPJ_UINT32 l_nb_proc, i; - - /* preconditions */ - assert(p_procedure_list != 00); - assert(jp2 != 00); - assert(stream != 00); - assert(p_manager != 00); - - l_nb_proc = opj_procedure_list_get_nb_procedures(p_procedure_list); - l_procedure = (OPJ_BOOL (**) (opj_jp2_t * jp2, opj_stream_private_t *, opj_event_mgr_t *)) opj_procedure_list_get_first_procedure(p_procedure_list); - - for (i=0;im_validation_list,stream,p_manager)) { - return OPJ_FALSE; - } - - /* customization of the encoding */ - opj_jp2_setup_header_writing(jp2); - - /* write header */ - if (! opj_jp2_exec (jp2,jp2->m_procedure_list,stream,p_manager)) { - return OPJ_FALSE; - } - - return opj_j2k_start_compress(jp2->j2k,stream,p_image,p_manager); -} - -const opj_jp2_header_handler_t * opj_jp2_find_handler (OPJ_UINT32 p_id) -{ - OPJ_UINT32 i, l_handler_size = sizeof(jp2_header) / sizeof(opj_jp2_header_handler_t); - - for (i=0;ijp2_state != JP2_STATE_NONE) { - opj_event_msg(p_manager, EVT_ERROR, "The signature box must be the first box in the file.\n"); - return OPJ_FALSE; - } - - /* assure length of data is correct (4 -> magic number) */ - if (p_header_size != 4) { - opj_event_msg(p_manager, EVT_ERROR, "Error with JP signature Box size\n"); - return OPJ_FALSE; - } - - /* rearrange data */ - opj_read_bytes(p_header_data,&l_magic_number,4); - if (l_magic_number != 0x0d0a870a ) { - opj_event_msg(p_manager, EVT_ERROR, "Error with JP Signature : bad magic number\n"); - return OPJ_FALSE; - } - - jp2->jp2_state |= JP2_STATE_SIGNATURE; - - return OPJ_TRUE; -} - -/** - * Reads a a FTYP box - File type box - * - * @param p_header_data the data contained in the FTYP box. - * @param jp2 the jpeg2000 file codec. - * @param p_header_size the size of the data contained in the FTYP box. - * @param p_manager the user event manager. - * - * @return true if the FTYP box is valid. - */ -static OPJ_BOOL opj_jp2_read_ftyp( opj_jp2_t *jp2, - OPJ_BYTE * p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 i, l_remaining_bytes; - - /* preconditions */ - assert(p_header_data != 00); - assert(jp2 != 00); - assert(p_manager != 00); - - if (jp2->jp2_state != JP2_STATE_SIGNATURE) { - opj_event_msg(p_manager, EVT_ERROR, "The ftyp box must be the second box in the file.\n"); - return OPJ_FALSE; - } - - /* assure length of data is correct */ - if (p_header_size < 8) { - opj_event_msg(p_manager, EVT_ERROR, "Error with FTYP signature Box size\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_header_data,&jp2->brand,4); /* BR */ - p_header_data += 4; - - opj_read_bytes(p_header_data,&jp2->minversion,4); /* MinV */ - p_header_data += 4; - - l_remaining_bytes = p_header_size - 8; - - /* the number of remaining bytes should be a multiple of 4 */ - if ((l_remaining_bytes & 0x3) != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Error with FTYP signature Box size\n"); - return OPJ_FALSE; - } - - /* div by 4 */ - jp2->numcl = l_remaining_bytes >> 2; - if (jp2->numcl) { - jp2->cl = (OPJ_UINT32 *) opj_malloc(jp2->numcl * sizeof(OPJ_UINT32)); - if (jp2->cl == 00) { - opj_event_msg(p_manager, EVT_ERROR, "Not enough memory with FTYP Box\n"); - return OPJ_FALSE; - } - memset(jp2->cl,0,jp2->numcl * sizeof(OPJ_UINT32)); - } - - for (i = 0; i < jp2->numcl; ++i) - { - opj_read_bytes(p_header_data,&jp2->cl[i],4); /* CLi */ - p_header_data += 4; - } - - jp2->jp2_state |= JP2_STATE_FILE_TYPE; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_jp2_skip_jp2c( opj_jp2_t *jp2, - opj_stream_private_t *stream, - opj_event_mgr_t * p_manager ) -{ - /* preconditions */ - assert(jp2 != 00); - assert(stream != 00); - assert(p_manager != 00); - - jp2->j2k_codestream_offset = opj_stream_tell(stream); - - if (opj_stream_skip(stream,8,p_manager) != 8) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -static OPJ_BOOL opj_jpip_skip_iptr( opj_jp2_t *jp2, - opj_stream_private_t *stream, - opj_event_mgr_t * p_manager ) -{ - /* preconditions */ - assert(jp2 != 00); - assert(stream != 00); - assert(p_manager != 00); - - jp2->jpip_iptr_offset = opj_stream_tell(stream); - - if (opj_stream_skip(stream,24,p_manager) != 24) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -/** - * Reads the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box). - * - * @param p_header_data the data contained in the file header box. - * @param jp2 the jpeg2000 file codec. - * @param p_header_size the size of the data contained in the file header box. - * @param p_manager the user event manager. - * - * @return true if the JP2 Header box was successfully reconized. -*/ -static OPJ_BOOL opj_jp2_read_jp2h( opj_jp2_t *jp2, - OPJ_BYTE *p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_box_size=0, l_current_data_size = 0; - opj_jp2_box_t box; - const opj_jp2_header_handler_t * l_current_handler; - - /* preconditions */ - assert(p_header_data != 00); - assert(jp2 != 00); - assert(p_manager != 00); - - /* make sure the box is well placed */ - if ((jp2->jp2_state & JP2_STATE_FILE_TYPE) != JP2_STATE_FILE_TYPE ) { - opj_event_msg(p_manager, EVT_ERROR, "The box must be the first box in the file.\n"); - return OPJ_FALSE; - } - - jp2->jp2_img_state = JP2_IMG_STATE_NONE; - - /* iterate while remaining data */ - while (p_header_size > 0) { - - if (! opj_jp2_read_boxhdr_char(&box,p_header_data,&l_box_size,p_header_size, p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Stream error while reading JP2 Header box\n"); - return OPJ_FALSE; - } - - if (box.length > p_header_size) { - opj_event_msg(p_manager, EVT_ERROR, "Stream error while reading JP2 Header box: box length is inconsistent.\n"); - return OPJ_FALSE; - } - - l_current_handler = opj_jp2_img_find_handler(box.type); - l_current_data_size = box.length - l_box_size; - p_header_data += l_box_size; - - if (l_current_handler != 00) { - if (! l_current_handler->handler(jp2,p_header_data,l_current_data_size,p_manager)) { - return OPJ_FALSE; - } - } - else { - jp2->jp2_img_state |= JP2_IMG_STATE_UNKNOWN; - } - - p_header_data += l_current_data_size; - p_header_size -= box.length; - } - - jp2->jp2_state |= JP2_STATE_HEADER; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_jp2_read_boxhdr_char( opj_jp2_box_t *box, - OPJ_BYTE * p_data, - OPJ_UINT32 * p_number_bytes_read, - OPJ_UINT32 p_box_max_size, - opj_event_mgr_t * p_manager - ) -{ - OPJ_UINT32 l_value; - - /* preconditions */ - assert(p_data != 00); - assert(box != 00); - assert(p_number_bytes_read != 00); - assert(p_manager != 00); - - if (p_box_max_size < 8) { - opj_event_msg(p_manager, EVT_ERROR, "Cannot handle box of less than 8 bytes\n"); - return OPJ_FALSE; - } - - /* process read data */ - opj_read_bytes(p_data, &l_value, 4); - p_data += 4; - box->length = (OPJ_UINT32)(l_value); - - opj_read_bytes(p_data, &l_value, 4); - p_data += 4; - box->type = (OPJ_UINT32)(l_value); - - *p_number_bytes_read = 8; - - /* do we have a "special very large box ?" */ - /* read then the XLBox */ - if (box->length == 1) { - OPJ_UINT32 l_xl_part_size; - - if (p_box_max_size < 16) { - opj_event_msg(p_manager, EVT_ERROR, "Cannot handle XL box of less than 16 bytes\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_data,&l_xl_part_size, 4); - p_data += 4; - *p_number_bytes_read += 4; - - if (l_xl_part_size != 0) { - opj_event_msg(p_manager, EVT_ERROR, "Cannot handle box sizes higher than 2^32\n"); - return OPJ_FALSE; - } - - opj_read_bytes(p_data, &l_value, 4); - *p_number_bytes_read += 4; - box->length = (OPJ_UINT32)(l_value); - - if (box->length == 0) { - opj_event_msg(p_manager, EVT_ERROR, "Cannot handle box of undefined sizes\n"); - return OPJ_FALSE; - } - } - else if (box->length == 0) { - opj_event_msg(p_manager, EVT_ERROR, "Cannot handle box of undefined sizes\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_jp2_read_header( opj_stream_private_t *p_stream, - opj_jp2_t *jp2, - opj_image_t ** p_image, - opj_event_mgr_t * p_manager - ) -{ - /* preconditions */ - assert(jp2 != 00); - assert(p_stream != 00); - assert(p_manager != 00); - - /* customization of the validation */ - opj_jp2_setup_decoding_validation (jp2); - - /* customization of the encoding */ - opj_jp2_setup_header_reading(jp2); - - /* validation of the parameters codec */ - if (! opj_jp2_exec(jp2,jp2->m_validation_list,p_stream,p_manager)) { - return OPJ_FALSE; - } - - /* read header */ - if (! opj_jp2_exec (jp2,jp2->m_procedure_list,p_stream,p_manager)) { - return OPJ_FALSE; - } - - return opj_j2k_read_header( p_stream, - jp2->j2k, - p_image, - p_manager); -} - -void opj_jp2_setup_encoding_validation (opj_jp2_t *jp2) -{ - /* preconditions */ - assert(jp2 != 00); - - opj_procedure_list_add_procedure(jp2->m_validation_list, (opj_procedure)opj_jp2_default_validation); - /* DEVELOPER CORNER, add your custom validation procedure */ -} - -void opj_jp2_setup_decoding_validation (opj_jp2_t *jp2) -{ - /* preconditions */ - assert(jp2 != 00); - /* DEVELOPER CORNER, add your custom validation procedure */ -} - -void opj_jp2_setup_header_writing (opj_jp2_t *jp2) -{ - /* preconditions */ - assert(jp2 != 00); - - opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jp2_write_jp ); - opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jp2_write_ftyp ); - opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jp2_write_jp2h ); - if( jp2->jpip_on ) - opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jpip_skip_iptr ); - opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jp2_skip_jp2c ); - - /* DEVELOPER CORNER, insert your custom procedures */ - -} - -void opj_jp2_setup_header_reading (opj_jp2_t *jp2) -{ - /* preconditions */ - assert(jp2 != 00); - - opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jp2_read_header_procedure ); - /* DEVELOPER CORNER, add your custom procedures */ -} - -OPJ_BOOL opj_jp2_read_tile_header ( opj_jp2_t * p_jp2, - OPJ_UINT32 * p_tile_index, - OPJ_UINT32 * p_data_size, - OPJ_INT32 * p_tile_x0, - OPJ_INT32 * p_tile_y0, - OPJ_INT32 * p_tile_x1, - OPJ_INT32 * p_tile_y1, - OPJ_UINT32 * p_nb_comps, - OPJ_BOOL * p_go_on, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - return opj_j2k_read_tile_header(p_jp2->j2k, - p_tile_index, - p_data_size, - p_tile_x0, p_tile_y0, - p_tile_x1, p_tile_y1, - p_nb_comps, - p_go_on, - p_stream, - p_manager); -} - -OPJ_BOOL opj_jp2_write_tile ( opj_jp2_t *p_jp2, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) - -{ - return opj_j2k_write_tile (p_jp2->j2k,p_tile_index,p_data,p_data_size,p_stream,p_manager); -} - -OPJ_BOOL opj_jp2_decode_tile ( opj_jp2_t * p_jp2, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager - ) -{ - return opj_j2k_decode_tile (p_jp2->j2k,p_tile_index,p_data,p_data_size,p_stream,p_manager); -} - -void opj_jp2_destroy(opj_jp2_t *jp2) -{ - if (jp2) { - /* destroy the J2K codec */ - opj_j2k_destroy(jp2->j2k); - jp2->j2k = 00; - - if (jp2->comps) { - opj_free(jp2->comps); - jp2->comps = 00; - } - - if (jp2->cl) { - opj_free(jp2->cl); - jp2->cl = 00; - } - - if (jp2->color.icc_profile_buf) { - opj_free(jp2->color.icc_profile_buf); - jp2->color.icc_profile_buf = 00; - } - - if (jp2->color.jp2_cdef) { - if (jp2->color.jp2_cdef->info) { - opj_free(jp2->color.jp2_cdef->info); - jp2->color.jp2_cdef->info = NULL; - } - - opj_free(jp2->color.jp2_cdef); - jp2->color.jp2_cdef = 00; - } - - if (jp2->color.jp2_pclr) { - if (jp2->color.jp2_pclr->cmap) { - opj_free(jp2->color.jp2_pclr->cmap); - jp2->color.jp2_pclr->cmap = NULL; - } - if (jp2->color.jp2_pclr->channel_sign) { - opj_free(jp2->color.jp2_pclr->channel_sign); - jp2->color.jp2_pclr->channel_sign = NULL; - } - if (jp2->color.jp2_pclr->channel_size) { - opj_free(jp2->color.jp2_pclr->channel_size); - jp2->color.jp2_pclr->channel_size = NULL; - } - if (jp2->color.jp2_pclr->entries) { - opj_free(jp2->color.jp2_pclr->entries); - jp2->color.jp2_pclr->entries = NULL; - } - - opj_free(jp2->color.jp2_pclr); - jp2->color.jp2_pclr = 00; - } - - if (jp2->m_validation_list) { - opj_procedure_list_destroy(jp2->m_validation_list); - jp2->m_validation_list = 00; - } - - if (jp2->m_procedure_list) { - opj_procedure_list_destroy(jp2->m_procedure_list); - jp2->m_procedure_list = 00; - } - - opj_free(jp2); - } -} - -OPJ_BOOL opj_jp2_set_decode_area( opj_jp2_t *p_jp2, - opj_image_t* p_image, - OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, - OPJ_INT32 p_end_x, OPJ_INT32 p_end_y, - opj_event_mgr_t * p_manager - ) -{ - return opj_j2k_set_decode_area(p_jp2->j2k, p_image, p_start_x, p_start_y, p_end_x, p_end_y, p_manager); -} - -OPJ_BOOL opj_jp2_get_tile( opj_jp2_t *p_jp2, - opj_stream_private_t *p_stream, - opj_image_t* p_image, - opj_event_mgr_t * p_manager, - OPJ_UINT32 tile_index - ) -{ - if (!p_image) - return OPJ_FALSE; - - opj_event_msg(p_manager, EVT_WARNING, "JP2 box which are after the codestream will not be read by this function.\n"); - - if (! opj_j2k_get_tile(p_jp2->j2k, p_stream, p_image, p_manager, tile_index) ){ - opj_event_msg(p_manager, EVT_ERROR, "Failed to decode the codestream in the JP2 file\n"); - return OPJ_FALSE; - } - - if (!opj_jp2_check_color(p_image, &(p_jp2->color), p_manager)) { - return OPJ_FALSE; - } - - /* Set Image Color Space */ - if (p_jp2->enumcs == 16) - p_image->color_space = OPJ_CLRSPC_SRGB; - else if (p_jp2->enumcs == 17) - p_image->color_space = OPJ_CLRSPC_GRAY; - else if (p_jp2->enumcs == 18) - p_image->color_space = OPJ_CLRSPC_SYCC; - else - p_image->color_space = OPJ_CLRSPC_UNKNOWN; - - /* Apply the color space if needed */ - if(p_jp2->color.jp2_cdef) { - opj_jp2_apply_cdef(p_image, &(p_jp2->color)); - } - - if(p_jp2->color.jp2_pclr) { - /* Part 1, I.5.3.4: Either both or none : */ - if( !p_jp2->color.jp2_pclr->cmap) - opj_jp2_free_pclr(&(p_jp2->color)); - else - opj_jp2_apply_pclr(p_image, &(p_jp2->color)); - } - - if(p_jp2->color.icc_profile_buf) { - p_image->icc_profile_buf = p_jp2->color.icc_profile_buf; - p_image->icc_profile_len = p_jp2->color.icc_profile_len; - p_jp2->color.icc_profile_buf = NULL; - } - - return OPJ_TRUE; -} - -/* ----------------------------------------------------------------------- */ -/* JP2 encoder interface */ -/* ----------------------------------------------------------------------- */ - -opj_jp2_t* opj_jp2_create(OPJ_BOOL p_is_decoder) -{ - opj_jp2_t *jp2 = (opj_jp2_t*)opj_malloc(sizeof(opj_jp2_t)); - if (jp2) { - memset(jp2,0,sizeof(opj_jp2_t)); - - /* create the J2K codec */ - if (! p_is_decoder) { - jp2->j2k = opj_j2k_create_compress(); - } - else { - jp2->j2k = opj_j2k_create_decompress(); - } - - if (jp2->j2k == 00) { - opj_jp2_destroy(jp2); - return 00; - } - - /* Color structure */ - jp2->color.icc_profile_buf = NULL; - jp2->color.icc_profile_len = 0; - jp2->color.jp2_cdef = NULL; - jp2->color.jp2_pclr = NULL; - jp2->color.jp2_has_colr = 0; - - /* validation list creation */ - jp2->m_validation_list = opj_procedure_list_create(); - if (! jp2->m_validation_list) { - opj_jp2_destroy(jp2); - return 00; - } - - /* execution list creation */ - jp2->m_procedure_list = opj_procedure_list_create(); - if (! jp2->m_procedure_list) { - opj_jp2_destroy(jp2); - return 00; - } - } - - return jp2; -} - -void jp2_dump(opj_jp2_t* p_jp2, OPJ_INT32 flag, FILE* out_stream) -{ - /* preconditions */ - assert(p_jp2 != 00); - - j2k_dump(p_jp2->j2k, - flag, - out_stream); -} - -opj_codestream_index_t* jp2_get_cstr_index(opj_jp2_t* p_jp2) -{ - return j2k_get_cstr_index(p_jp2->j2k); -} - -opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_t* p_jp2) -{ - return j2k_get_cstr_info(p_jp2->j2k); -} - -OPJ_BOOL opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2, - OPJ_UINT32 res_factor, - opj_event_mgr_t * p_manager) -{ - return opj_j2k_set_decoded_resolution_factor(p_jp2->j2k, res_factor, p_manager); -} - -/* JPIP specific */ - -#ifdef USE_JPIP -static OPJ_BOOL opj_jpip_write_iptr(opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_OFF_T j2k_codestream_exit; - OPJ_BYTE l_data_header [24]; - - /* preconditions */ - assert(jp2 != 00); - assert(cio != 00); - assert(p_manager != 00); - assert(opj_stream_has_seek(cio)); - - j2k_codestream_exit = opj_stream_tell(cio); - opj_write_bytes(l_data_header, 24, 4); /* size of iptr */ - opj_write_bytes(l_data_header + 4,JPIP_IPTR,4); /* IPTR */ -#if 0 - opj_write_bytes(l_data_header + 4 + 4, 0, 8); /* offset */ - opj_write_bytes(l_data_header + 8 + 8, 0, 8); /* length */ -#else - opj_write_double(l_data_header + 4 + 4, 0); /* offset */ - opj_write_double(l_data_header + 8 + 8, 0); /* length */ -#endif - - if (! opj_stream_seek(cio,jp2->jpip_iptr_offset,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n"); - return OPJ_FALSE; - } - - if (opj_stream_write_data(cio,l_data_header,24,p_manager) != 24) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n"); - return OPJ_FALSE; - } - - if (! opj_stream_seek(cio,j2k_codestream_exit,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -static OPJ_BOOL opj_jpip_write_fidx(opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_OFF_T j2k_codestream_exit; - OPJ_BYTE l_data_header [24]; - - /* preconditions */ - assert(jp2 != 00); - assert(cio != 00); - assert(p_manager != 00); - assert(opj_stream_has_seek(cio)); - - opj_write_bytes(l_data_header, 24, 4); /* size of iptr */ - opj_write_bytes(l_data_header + 4,JPIP_FIDX,4); /* IPTR */ - opj_write_double(l_data_header + 4 + 4, 0); /* offset */ - opj_write_double(l_data_header + 8 + 8, 0); /* length */ - - if (opj_stream_write_data(cio,l_data_header,24,p_manager) != 24) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n"); - return OPJ_FALSE; - } - - j2k_codestream_exit = opj_stream_tell(cio); - if (! opj_stream_seek(cio,j2k_codestream_exit,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -static OPJ_BOOL opj_jpip_write_cidx(opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_OFF_T j2k_codestream_exit; - OPJ_BYTE l_data_header [24]; - - /* preconditions */ - assert(jp2 != 00); - assert(cio != 00); - assert(p_manager != 00); - assert(opj_stream_has_seek(cio)); - - j2k_codestream_exit = opj_stream_tell(cio); - opj_write_bytes(l_data_header, 24, 4); /* size of iptr */ - opj_write_bytes(l_data_header + 4,JPIP_CIDX,4); /* IPTR */ -#if 0 - opj_write_bytes(l_data_header + 4 + 4, 0, 8); /* offset */ - opj_write_bytes(l_data_header + 8 + 8, 0, 8); /* length */ -#else - opj_write_double(l_data_header + 4 + 4, 0); /* offset */ - opj_write_double(l_data_header + 8 + 8, 0); /* length */ -#endif - - if (! opj_stream_seek(cio,j2k_codestream_exit,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n"); - return OPJ_FALSE; - } - - if (opj_stream_write_data(cio,l_data_header,24,p_manager) != 24) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n"); - return OPJ_FALSE; - } - - j2k_codestream_exit = opj_stream_tell(cio); - if (! opj_stream_seek(cio,j2k_codestream_exit,p_manager)) { - opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n"); - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -#if 0 -static void write_prxy( int offset_jp2c, int length_jp2c, int offset_idx, int length_idx, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_BYTE l_data_header [8]; - OPJ_OFF_T len, lenp; - - lenp = opj_stream_tell(cio); - opj_stream_skip(cio, 4, p_manager); /* L [at the end] */ - opj_write_bytes(l_data_header,JPIP_PRXY,4); /* IPTR */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - - opj_write_bytes( l_data_header, offset_jp2c, 8); /* OOFF */ - opj_stream_write_data(cio,l_data_header,8,p_manager); - opj_write_bytes( l_data_header, length_jp2c, 4); /* OBH part 1 */ - opj_write_bytes( l_data_header+4, JP2_JP2C, 4); /* OBH part 2 */ - opj_stream_write_data(cio,l_data_header,8,p_manager); - - opj_write_bytes( l_data_header, 1, 1);/* NI */ - opj_stream_write_data(cio,l_data_header,1,p_manager); - - opj_write_bytes( l_data_header, offset_idx, 8); /* IOFF */ - opj_stream_write_data(cio,l_data_header,8,p_manager); - opj_write_bytes( l_data_header, length_idx, 4); /* IBH part 1 */ - opj_write_bytes( l_data_header+4, JPIP_CIDX, 4); /* IBH part 2 */ - opj_stream_write_data(cio,l_data_header,8,p_manager); - - len = opj_stream_tell(cio)-lenp; - opj_stream_skip(cio, lenp, p_manager); - opj_write_bytes(l_data_header,len,4);/* L */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_stream_seek(cio, lenp+len,p_manager); -} -#endif - - -#if 0 -static int write_fidx( int offset_jp2c, int length_jp2c, int offset_idx, int length_idx, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_BYTE l_data_header [4]; - OPJ_OFF_T len, lenp; - - lenp = opj_stream_tell(cio); - opj_stream_skip(cio, 4, p_manager); - opj_write_bytes(l_data_header,JPIP_FIDX,4); /* FIDX */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - - write_prxy( offset_jp2c, length_jp2c, offset_idx, length_idx, cio,p_manager); - - len = opj_stream_tell(cio)-lenp; - opj_stream_skip(cio, lenp, p_manager); - opj_write_bytes(l_data_header,len,4);/* L */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_stream_seek(cio, lenp+len,p_manager); - - return len; -} -#endif -#endif /* USE_JPIP */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/jp2.h b/Dependencies/FreeImage/Source/LibOpenJPEG/jp2.h deleted file mode 100644 index e793d9a..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/jp2.h +++ /dev/null @@ -1,490 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef __JP2_H -#define __JP2_H -/** -@file jp2.h -@brief The JPEG-2000 file format Reader/Writer (JP2) - -*/ - -/** @defgroup JP2 JP2 - JPEG-2000 file format reader/writer */ -/*@{*/ - -/*#define JPIP_JPIP 0x6a706970*/ - -#define JP2_JP 0x6a502020 /**< JPEG 2000 signature box */ -#define JP2_FTYP 0x66747970 /**< File type box */ -#define JP2_JP2H 0x6a703268 /**< JP2 header box (super-box) */ -#define JP2_IHDR 0x69686472 /**< Image header box */ -#define JP2_COLR 0x636f6c72 /**< Colour specification box */ -#define JP2_JP2C 0x6a703263 /**< Contiguous codestream box */ -#define JP2_URL 0x75726c20 /**< Data entry URL box */ -#define JP2_PCLR 0x70636c72 /**< Palette box */ -#define JP2_CMAP 0x636d6170 /**< Component Mapping box */ -#define JP2_CDEF 0x63646566 /**< Channel Definition box */ -#define JP2_DTBL 0x6474626c /**< Data Reference box */ -#define JP2_BPCC 0x62706363 /**< Bits per component box */ -#define JP2_JP2 0x6a703220 /**< File type fields */ - -/* For the future */ -/* #define JP2_RES 0x72657320 */ /**< Resolution box (super-box) */ -/* #define JP2_JP2I 0x6a703269 */ /**< Intellectual property box */ -/* #define JP2_XML 0x786d6c20 */ /**< XML box */ -/* #define JP2_UUID 0x75756994 */ /**< UUID box */ -/* #define JP2_UINF 0x75696e66 */ /**< UUID info box (super-box) */ -/* #define JP2_ULST 0x756c7374 */ /**< UUID list box */ - -/* ----------------------------------------------------------------------- */ - -typedef enum -{ - JP2_STATE_NONE = 0x0, - JP2_STATE_SIGNATURE = 0x1, - JP2_STATE_FILE_TYPE = 0x2, - JP2_STATE_HEADER = 0x4, - JP2_STATE_CODESTREAM = 0x8, - JP2_STATE_END_CODESTREAM = 0x10, - JP2_STATE_UNKNOWN = 0x7fffffff /* ISO C restricts enumerator values to range of 'int' */ -} -JP2_STATE; - -typedef enum -{ - JP2_IMG_STATE_NONE = 0x0, - JP2_IMG_STATE_UNKNOWN = 0x7fffffff -} -JP2_IMG_STATE; - -/** -Channel description: channel index, type, assocation -*/ -typedef struct opj_jp2_cdef_info -{ - OPJ_UINT16 cn, typ, asoc; -} opj_jp2_cdef_info_t; - -/** -Channel descriptions and number of descriptions -*/ -typedef struct opj_jp2_cdef -{ - opj_jp2_cdef_info_t *info; - OPJ_UINT16 n; -} opj_jp2_cdef_t; - -/** -Component mappings: channel index, mapping type, palette index -*/ -typedef struct opj_jp2_cmap_comp -{ - OPJ_UINT16 cmp; - OPJ_BYTE mtyp, pcol; -} opj_jp2_cmap_comp_t; - -/** -Palette data: table entries, palette columns -*/ -typedef struct opj_jp2_pclr -{ - OPJ_UINT32 *entries; - OPJ_BYTE *channel_sign; - OPJ_BYTE *channel_size; - opj_jp2_cmap_comp_t *cmap; - OPJ_UINT16 nr_entries; - OPJ_BYTE nr_channels; -} opj_jp2_pclr_t; - -/** -Collector for ICC profile, palette, component mapping, channel description -*/ -typedef struct opj_jp2_color -{ - OPJ_BYTE *icc_profile_buf; - OPJ_UINT32 icc_profile_len; - - opj_jp2_cdef_t *jp2_cdef; - opj_jp2_pclr_t *jp2_pclr; - OPJ_BYTE jp2_has_colr; -} opj_jp2_color_t; - -/** -JP2 component -*/ -typedef struct opj_jp2_comps { - OPJ_UINT32 depth; - OPJ_UINT32 sgnd; - OPJ_UINT32 bpcc; -} opj_jp2_comps_t; - -/** -JPEG-2000 file format reader/writer -*/ -typedef struct opj_jp2 -{ - /** handle to the J2K codec */ - opj_j2k_t *j2k; - /** list of validation procedures */ - struct opj_procedure_list * m_validation_list; - /** list of execution procedures */ - struct opj_procedure_list * m_procedure_list; - - /* width of image */ - OPJ_UINT32 w; - /* height of image */ - OPJ_UINT32 h; - /* number of components in the image */ - OPJ_UINT32 numcomps; - OPJ_UINT32 bpc; - OPJ_UINT32 C; - OPJ_UINT32 UnkC; - OPJ_UINT32 IPR; - OPJ_UINT32 meth; - OPJ_UINT32 approx; - OPJ_UINT32 enumcs; - OPJ_UINT32 precedence; - OPJ_UINT32 brand; - OPJ_UINT32 minversion; - OPJ_UINT32 numcl; - OPJ_UINT32 *cl; - opj_jp2_comps_t *comps; - /* FIXME: The following two variables are used to save offset - as we write out a JP2 file to disk. This mecanism is not flexible - as codec writers will need to extand those fields as new part - of the standard are implemented. - */ - OPJ_OFF_T j2k_codestream_offset; - OPJ_OFF_T jpip_iptr_offset; - OPJ_BOOL jpip_on; - OPJ_UINT32 jp2_state; - OPJ_UINT32 jp2_img_state; - - opj_jp2_color_t color; - - OPJ_BOOL ignore_pclr_cmap_cdef; -} -opj_jp2_t; - -/** -JP2 Box -*/ -typedef struct opj_jp2_box { - OPJ_UINT32 length; - OPJ_UINT32 type; - OPJ_INT32 init_pos; -} opj_jp2_box_t; - -typedef struct opj_jp2_header_handler -{ - /* marker value */ - OPJ_UINT32 id; - /* action linked to the marker */ - OPJ_BOOL (*handler) ( opj_jp2_t *jp2, - OPJ_BYTE *p_header_data, - OPJ_UINT32 p_header_size, - opj_event_mgr_t * p_manager); -} -opj_jp2_header_handler_t; - - -typedef struct opj_jp2_img_header_writer_handler -{ - /* action to perform */ - OPJ_BYTE* (*handler) (opj_jp2_t *jp2, OPJ_UINT32 * p_data_size); - /* result of the action : data */ - OPJ_BYTE* m_data; - /* size of data */ - OPJ_UINT32 m_size; -} -opj_jp2_img_header_writer_handler_t; - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ - -/** - * Writes the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box). - * - * @param jp2 the jpeg2000 file codec. - * @param stream the stream to write data to. - * @param p_manager user event manager. - * - * @return true if writing was successful. -*/ -OPJ_BOOL opj_jp2_write_jp2h(opj_jp2_t *jp2, - opj_stream_private_t *stream, - opj_event_mgr_t * p_manager ); - -/** -Setup the decoder decoding parameters using user parameters. -Decoding parameters are returned in jp2->j2k->cp. -@param jp2 JP2 decompressor handle -@param parameters decompression parameters -*/ -void opj_jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters); - -/** - * Decode an image from a JPEG-2000 file stream - * @param jp2 JP2 decompressor handle - * @param p_stream FIXME DOC - * @param p_image FIXME DOC - * @param p_manager FIXME DOC - * - * @return Returns a decoded image if successful, returns NULL otherwise -*/ -OPJ_BOOL opj_jp2_decode(opj_jp2_t *jp2, - opj_stream_private_t *p_stream, - opj_image_t* p_image, - opj_event_mgr_t * p_manager); - -/** - * Setup the encoder parameters using the current image and using user parameters. - * Coding parameters are returned in jp2->j2k->cp. - * - * @param jp2 JP2 compressor handle - * @param parameters compression parameters - * @param image input filled image - * @param p_manager FIXME DOC -*/ -void opj_jp2_setup_encoder( opj_jp2_t *jp2, - opj_cparameters_t *parameters, - opj_image_t *image, - opj_event_mgr_t * p_manager); - -/** -Encode an image into a JPEG-2000 file stream -@param jp2 JP2 compressor handle -@param stream Output buffer stream -@param p_manager event manager -@return Returns true if successful, returns false otherwise -*/ -OPJ_BOOL opj_jp2_encode( opj_jp2_t *jp2, - opj_stream_private_t *stream, - opj_event_mgr_t * p_manager); - - -/** - * Starts a compression scheme, i.e. validates the codec parameters, writes the header. - * - * @param jp2 the jpeg2000 file codec. - * @param stream the stream object. - * @param p_image FIXME DOC - * @param p_manager FIXME DOC - * - * @return true if the codec is valid. - */ -OPJ_BOOL opj_jp2_start_compress(opj_jp2_t *jp2, - opj_stream_private_t *stream, - opj_image_t * p_image, - opj_event_mgr_t * p_manager); - - -/** - * Ends the compression procedures and possibiliy add data to be read after the - * codestream. - */ -OPJ_BOOL opj_jp2_end_compress( opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager); - -/* ----------------------------------------------------------------------- */ - -/** - * Ends the decompression procedures and possibiliy add data to be read after the - * codestream. - */ -OPJ_BOOL opj_jp2_end_decompress(opj_jp2_t *jp2, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager); - -/** - * Reads a jpeg2000 file header structure. - * - * @param p_stream the stream to read data from. - * @param jp2 the jpeg2000 file header structure. - * @param p_image FIXME DOC - * @param p_manager the user event manager. - * - * @return true if the box is valid. - */ -OPJ_BOOL opj_jp2_read_header( opj_stream_private_t *p_stream, - opj_jp2_t *jp2, - opj_image_t ** p_image, - opj_event_mgr_t * p_manager ); - -/** - * Reads a tile header. - * @param p_jp2 the jpeg2000 codec. - * @param p_tile_index FIXME DOC - * @param p_data_size FIXME DOC - * @param p_tile_x0 FIXME DOC - * @param p_tile_y0 FIXME DOC - * @param p_tile_x1 FIXME DOC - * @param p_tile_y1 FIXME DOC - * @param p_nb_comps FIXME DOC - * @param p_go_on FIXME DOC - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. - */ -OPJ_BOOL opj_jp2_read_tile_header ( opj_jp2_t * p_jp2, - OPJ_UINT32 * p_tile_index, - OPJ_UINT32 * p_data_size, - OPJ_INT32 * p_tile_x0, - OPJ_INT32 * p_tile_y0, - OPJ_INT32 * p_tile_x1, - OPJ_INT32 * p_tile_y1, - OPJ_UINT32 * p_nb_comps, - OPJ_BOOL * p_go_on, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Writes a tile. - * - * @param p_jp2 the jpeg2000 codec. - * @param p_tile_index FIXME DOC - * @param p_data FIXME DOC - * @param p_data_size FIXME DOC - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. - */ -OPJ_BOOL opj_jp2_write_tile ( opj_jp2_t *p_jp2, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Decode tile data. - * @param p_jp2 the jpeg2000 codec. - * @param p_tile_index FIXME DOC - * @param p_data FIXME DOC - * @param p_data_size FIXME DOC - * @param p_stream the stream to write data to. - * @param p_manager the user event manager. - * - * @return FIXME DOC - */ -OPJ_BOOL opj_jp2_decode_tile ( opj_jp2_t * p_jp2, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_private_t *p_stream, - opj_event_mgr_t * p_manager ); - -/** - * Creates a jpeg2000 file decompressor. - * - * @return an empty jpeg2000 file codec. - */ -opj_jp2_t* opj_jp2_create (OPJ_BOOL p_is_decoder); - -/** -Destroy a JP2 decompressor handle -@param jp2 JP2 decompressor handle to destroy -*/ -void opj_jp2_destroy(opj_jp2_t *jp2); - - -/** - * Sets the given area to be decoded. This function should be called right after opj_read_header and before any tile header reading. - * - * @param p_jp2 the jpeg2000 codec. - * @param p_image FIXME DOC - * @param p_start_x the left position of the rectangle to decode (in image coordinates). - * @param p_start_y the up position of the rectangle to decode (in image coordinates). - * @param p_end_x the right position of the rectangle to decode (in image coordinates). - * @param p_end_y the bottom position of the rectangle to decode (in image coordinates). - * @param p_manager the user event manager - * - * @return true if the area could be set. - */ -OPJ_BOOL opj_jp2_set_decode_area( opj_jp2_t *p_jp2, - opj_image_t* p_image, - OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, - OPJ_INT32 p_end_x, OPJ_INT32 p_end_y, - opj_event_mgr_t * p_manager ); - - /** - * - */ -OPJ_BOOL opj_jp2_get_tile( opj_jp2_t *p_jp2, - opj_stream_private_t *p_stream, - opj_image_t* p_image, - opj_event_mgr_t * p_manager, - OPJ_UINT32 tile_index ); - - -/** - * - */ -OPJ_BOOL opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2, - OPJ_UINT32 res_factor, - opj_event_mgr_t * p_manager); - - -/* TODO MSD: clean these 3 functions */ -/** - * Dump some elements from the JP2 decompression structure . - * - *@param p_jp2 the jp2 codec. - *@param flag flag to describe what elments are dump. - *@param out_stream output stream where dump the elements. - * -*/ -void jp2_dump (opj_jp2_t* p_jp2, OPJ_INT32 flag, FILE* out_stream); - -/** - * Get the codestream info from a JPEG2000 codec. - * - *@param p_jp2 jp2 codec. - * - *@return the codestream information extract from the jpg2000 codec - */ -opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_t* p_jp2); - -/** - * Get the codestream index from a JPEG2000 codec. - * - *@param p_jp2 jp2 codec. - * - *@return the codestream index extract from the jpg2000 codec - */ -opj_codestream_index_t* jp2_get_cstr_index(opj_jp2_t* p_jp2); - - -/*@}*/ - -/*@}*/ - -#endif /* __JP2_H */ - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/mct.c b/Dependencies/FreeImage/Source/LibOpenJPEG/mct.c deleted file mode 100644 index d2754dc..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/mct.c +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef __SSE__ -#include -#endif - -#include "opj_includes.h" - -/* */ -/* This table contains the norms of the basis function of the reversible MCT. */ -/* */ -static const OPJ_FLOAT64 opj_mct_norms[3] = { 1.732, .8292, .8292 }; - -/* */ -/* This table contains the norms of the basis function of the irreversible MCT. */ -/* */ -static const OPJ_FLOAT64 opj_mct_norms_real[3] = { 1.732, 1.805, 1.573 }; - -const OPJ_FLOAT64 * opj_mct_get_mct_norms () -{ - return opj_mct_norms; -} - -const OPJ_FLOAT64 * opj_mct_get_mct_norms_real () -{ - return opj_mct_norms_real; -} - -/* */ -/* Foward reversible MCT. */ -/* */ -void opj_mct_encode( - OPJ_INT32* restrict c0, - OPJ_INT32* restrict c1, - OPJ_INT32* restrict c2, - OPJ_UINT32 n) -{ - OPJ_UINT32 i; - for(i = 0; i < n; ++i) { - OPJ_INT32 r = c0[i]; - OPJ_INT32 g = c1[i]; - OPJ_INT32 b = c2[i]; - OPJ_INT32 y = (r + (g * 2) + b) >> 2; - OPJ_INT32 u = b - g; - OPJ_INT32 v = r - g; - c0[i] = y; - c1[i] = u; - c2[i] = v; - } -} - -/* */ -/* Inverse reversible MCT. */ -/* */ -void opj_mct_decode( - OPJ_INT32* restrict c0, - OPJ_INT32* restrict c1, - OPJ_INT32* restrict c2, - OPJ_UINT32 n) -{ - OPJ_UINT32 i; - for (i = 0; i < n; ++i) { - OPJ_INT32 y = c0[i]; - OPJ_INT32 u = c1[i]; - OPJ_INT32 v = c2[i]; - OPJ_INT32 g = y - ((u + v) >> 2); - OPJ_INT32 r = v + g; - OPJ_INT32 b = u + g; - c0[i] = r; - c1[i] = g; - c2[i] = b; - } -} - -/* */ -/* Get norm of basis function of reversible MCT. */ -/* */ -OPJ_FLOAT64 opj_mct_getnorm(OPJ_UINT32 compno) { - return opj_mct_norms[compno]; -} - -/* */ -/* Foward irreversible MCT. */ -/* */ -void opj_mct_encode_real( - OPJ_INT32* restrict c0, - OPJ_INT32* restrict c1, - OPJ_INT32* restrict c2, - OPJ_UINT32 n) -{ - OPJ_UINT32 i; - for(i = 0; i < n; ++i) { - OPJ_INT32 r = c0[i]; - OPJ_INT32 g = c1[i]; - OPJ_INT32 b = c2[i]; - OPJ_INT32 y = opj_int_fix_mul(r, 2449) + opj_int_fix_mul(g, 4809) + opj_int_fix_mul(b, 934); - OPJ_INT32 u = -opj_int_fix_mul(r, 1382) - opj_int_fix_mul(g, 2714) + opj_int_fix_mul(b, 4096); - OPJ_INT32 v = opj_int_fix_mul(r, 4096) - opj_int_fix_mul(g, 3430) - opj_int_fix_mul(b, 666); - c0[i] = y; - c1[i] = u; - c2[i] = v; - } -} - -/* */ -/* Inverse irreversible MCT. */ -/* */ -void opj_mct_decode_real( - OPJ_FLOAT32* restrict c0, - OPJ_FLOAT32* restrict c1, - OPJ_FLOAT32* restrict c2, - OPJ_UINT32 n) -{ - OPJ_UINT32 i; -#ifdef __SSE__ - __m128 vrv, vgu, vgv, vbu; - vrv = _mm_set1_ps(1.402f); - vgu = _mm_set1_ps(0.34413f); - vgv = _mm_set1_ps(0.71414f); - vbu = _mm_set1_ps(1.772f); - for (i = 0; i < (n >> 3); ++i) { - __m128 vy, vu, vv; - __m128 vr, vg, vb; - - vy = _mm_load_ps(c0); - vu = _mm_load_ps(c1); - vv = _mm_load_ps(c2); - vr = _mm_add_ps(vy, _mm_mul_ps(vv, vrv)); - vg = _mm_sub_ps(_mm_sub_ps(vy, _mm_mul_ps(vu, vgu)), _mm_mul_ps(vv, vgv)); - vb = _mm_add_ps(vy, _mm_mul_ps(vu, vbu)); - _mm_store_ps(c0, vr); - _mm_store_ps(c1, vg); - _mm_store_ps(c2, vb); - c0 += 4; - c1 += 4; - c2 += 4; - - vy = _mm_load_ps(c0); - vu = _mm_load_ps(c1); - vv = _mm_load_ps(c2); - vr = _mm_add_ps(vy, _mm_mul_ps(vv, vrv)); - vg = _mm_sub_ps(_mm_sub_ps(vy, _mm_mul_ps(vu, vgu)), _mm_mul_ps(vv, vgv)); - vb = _mm_add_ps(vy, _mm_mul_ps(vu, vbu)); - _mm_store_ps(c0, vr); - _mm_store_ps(c1, vg); - _mm_store_ps(c2, vb); - c0 += 4; - c1 += 4; - c2 += 4; - } - n &= 7; -#endif - for(i = 0; i < n; ++i) { - OPJ_FLOAT32 y = c0[i]; - OPJ_FLOAT32 u = c1[i]; - OPJ_FLOAT32 v = c2[i]; - OPJ_FLOAT32 r = y + (v * 1.402f); - OPJ_FLOAT32 g = y - (u * 0.34413f) - (v * (0.71414f)); - OPJ_FLOAT32 b = y + (u * 1.772f); - c0[i] = r; - c1[i] = g; - c2[i] = b; - } -} - -/* */ -/* Get norm of basis function of irreversible MCT. */ -/* */ -OPJ_FLOAT64 opj_mct_getnorm_real(OPJ_UINT32 compno) { - return opj_mct_norms_real[compno]; -} - - -OPJ_BOOL opj_mct_encode_custom( - OPJ_BYTE * pCodingdata, - OPJ_UINT32 n, - OPJ_BYTE ** pData, - OPJ_UINT32 pNbComp, - OPJ_UINT32 isSigned) -{ - OPJ_FLOAT32 * lMct = (OPJ_FLOAT32 *) pCodingdata; - OPJ_UINT32 i; - OPJ_UINT32 j; - OPJ_UINT32 k; - OPJ_UINT32 lNbMatCoeff = pNbComp * pNbComp; - OPJ_INT32 * lCurrentData = 00; - OPJ_INT32 * lCurrentMatrix = 00; - OPJ_INT32 ** lData = (OPJ_INT32 **) pData; - OPJ_UINT32 lMultiplicator = 1 << 13; - OPJ_INT32 * lMctPtr; - - OPJ_ARG_NOT_USED(isSigned); - - lCurrentData = (OPJ_INT32 *) opj_malloc((pNbComp + lNbMatCoeff) * sizeof(OPJ_INT32)); - if (! lCurrentData) { - return OPJ_FALSE; - } - - lCurrentMatrix = lCurrentData + pNbComp; - - for (i =0;iY, 1->U, 2->V) -@return -*/ -OPJ_FLOAT64 opj_mct_getnorm(OPJ_UINT32 compno); - -/** -Apply an irreversible multi-component transform to an image -@param c0 Samples for red component -@param c1 Samples for green component -@param c2 Samples blue component -@param n Number of samples for each component -*/ -void opj_mct_encode_real(OPJ_INT32 *c0, OPJ_INT32 *c1, OPJ_INT32 *c2, OPJ_UINT32 n); -/** -Apply an irreversible multi-component inverse transform to an image -@param c0 Samples for luminance component -@param c1 Samples for red chrominance component -@param c2 Samples for blue chrominance component -@param n Number of samples for each component -*/ -void opj_mct_decode_real(OPJ_FLOAT32* c0, OPJ_FLOAT32* c1, OPJ_FLOAT32* c2, OPJ_UINT32 n); -/** -Get norm of the basis function used for the irreversible multi-component transform -@param compno Number of the component (0->Y, 1->U, 2->V) -@return -*/ -OPJ_FLOAT64 opj_mct_getnorm_real(OPJ_UINT32 compno); - -/** -FIXME DOC -@param p_coding_data MCT data -@param n size of components -@param p_data components -@param p_nb_comp nb of components (i.e. size of p_data) -@param is_signed tells if the data is signed -@return OPJ_FALSE if function encounter a problem, OPJ_TRUE otherwise -*/ -OPJ_BOOL opj_mct_encode_custom( - OPJ_BYTE * p_coding_data, - OPJ_UINT32 n, - OPJ_BYTE ** p_data, - OPJ_UINT32 p_nb_comp, - OPJ_UINT32 is_signed); -/** -FIXME DOC -@param pDecodingData MCT data -@param n size of components -@param pData components -@param pNbComp nb of components (i.e. size of p_data) -@param isSigned tells if the data is signed -@return OPJ_FALSE if function encounter a problem, OPJ_TRUE otherwise -*/ -OPJ_BOOL opj_mct_decode_custom( - OPJ_BYTE * pDecodingData, - OPJ_UINT32 n, - OPJ_BYTE ** pData, - OPJ_UINT32 pNbComp, - OPJ_UINT32 isSigned); -/** -FIXME DOC -@param pNorms MCT data -@param p_nb_comps size of components -@param pMatrix components -@return -*/ -void opj_calculate_norms( OPJ_FLOAT64 * pNorms, - OPJ_UINT32 p_nb_comps, - OPJ_FLOAT32 * pMatrix); -/** -FIXME DOC -*/ -const OPJ_FLOAT64 * opj_mct_get_mct_norms (void); -/** -FIXME DOC -*/ -const OPJ_FLOAT64 * opj_mct_get_mct_norms_real (void); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __MCT_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/mqc.c b/Dependencies/FreeImage/Source/LibOpenJPEG/mqc.c deleted file mode 100644 index 677884c..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/mqc.c +++ /dev/null @@ -1,604 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008, Jerome Fimes, Communications & Systemes - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -/** @defgroup MQC MQC - Implementation of an MQ-Coder */ -/*@{*/ - -/** @name Local static functions */ -/*@{*/ - -/** -Output a byte, doing bit-stuffing if necessary. -After a 0xff byte, the next byte must be smaller than 0x90. -@param mqc MQC handle -*/ -static void opj_mqc_byteout(opj_mqc_t *mqc); -/** -Renormalize mqc->a and mqc->c while encoding, so that mqc->a stays between 0x8000 and 0x10000 -@param mqc MQC handle -*/ -static void opj_mqc_renorme(opj_mqc_t *mqc); -/** -Encode the most probable symbol -@param mqc MQC handle -*/ -static void opj_mqc_codemps(opj_mqc_t *mqc); -/** -Encode the most least symbol -@param mqc MQC handle -*/ -static void opj_mqc_codelps(opj_mqc_t *mqc); -/** -Fill mqc->c with 1's for flushing -@param mqc MQC handle -*/ -static void opj_mqc_setbits(opj_mqc_t *mqc); -/** -FIXME DOC -@param mqc MQC handle -@return -*/ -static INLINE OPJ_INT32 opj_mqc_mpsexchange(opj_mqc_t *const mqc); -/** -FIXME DOC -@param mqc MQC handle -@return -*/ -static INLINE OPJ_INT32 opj_mqc_lpsexchange(opj_mqc_t *const mqc); -/** -Input a byte -@param mqc MQC handle -*/ -static INLINE void opj_mqc_bytein(opj_mqc_t *const mqc); -/** -Renormalize mqc->a and mqc->c while decoding -@param mqc MQC handle -*/ -static INLINE void opj_mqc_renormd(opj_mqc_t *const mqc); -/*@}*/ - -/*@}*/ - -/* */ -/* This array defines all the possible states for a context. */ -/* */ -static opj_mqc_state_t mqc_states[47 * 2] = { - {0x5601, 0, &mqc_states[2], &mqc_states[3]}, - {0x5601, 1, &mqc_states[3], &mqc_states[2]}, - {0x3401, 0, &mqc_states[4], &mqc_states[12]}, - {0x3401, 1, &mqc_states[5], &mqc_states[13]}, - {0x1801, 0, &mqc_states[6], &mqc_states[18]}, - {0x1801, 1, &mqc_states[7], &mqc_states[19]}, - {0x0ac1, 0, &mqc_states[8], &mqc_states[24]}, - {0x0ac1, 1, &mqc_states[9], &mqc_states[25]}, - {0x0521, 0, &mqc_states[10], &mqc_states[58]}, - {0x0521, 1, &mqc_states[11], &mqc_states[59]}, - {0x0221, 0, &mqc_states[76], &mqc_states[66]}, - {0x0221, 1, &mqc_states[77], &mqc_states[67]}, - {0x5601, 0, &mqc_states[14], &mqc_states[13]}, - {0x5601, 1, &mqc_states[15], &mqc_states[12]}, - {0x5401, 0, &mqc_states[16], &mqc_states[28]}, - {0x5401, 1, &mqc_states[17], &mqc_states[29]}, - {0x4801, 0, &mqc_states[18], &mqc_states[28]}, - {0x4801, 1, &mqc_states[19], &mqc_states[29]}, - {0x3801, 0, &mqc_states[20], &mqc_states[28]}, - {0x3801, 1, &mqc_states[21], &mqc_states[29]}, - {0x3001, 0, &mqc_states[22], &mqc_states[34]}, - {0x3001, 1, &mqc_states[23], &mqc_states[35]}, - {0x2401, 0, &mqc_states[24], &mqc_states[36]}, - {0x2401, 1, &mqc_states[25], &mqc_states[37]}, - {0x1c01, 0, &mqc_states[26], &mqc_states[40]}, - {0x1c01, 1, &mqc_states[27], &mqc_states[41]}, - {0x1601, 0, &mqc_states[58], &mqc_states[42]}, - {0x1601, 1, &mqc_states[59], &mqc_states[43]}, - {0x5601, 0, &mqc_states[30], &mqc_states[29]}, - {0x5601, 1, &mqc_states[31], &mqc_states[28]}, - {0x5401, 0, &mqc_states[32], &mqc_states[28]}, - {0x5401, 1, &mqc_states[33], &mqc_states[29]}, - {0x5101, 0, &mqc_states[34], &mqc_states[30]}, - {0x5101, 1, &mqc_states[35], &mqc_states[31]}, - {0x4801, 0, &mqc_states[36], &mqc_states[32]}, - {0x4801, 1, &mqc_states[37], &mqc_states[33]}, - {0x3801, 0, &mqc_states[38], &mqc_states[34]}, - {0x3801, 1, &mqc_states[39], &mqc_states[35]}, - {0x3401, 0, &mqc_states[40], &mqc_states[36]}, - {0x3401, 1, &mqc_states[41], &mqc_states[37]}, - {0x3001, 0, &mqc_states[42], &mqc_states[38]}, - {0x3001, 1, &mqc_states[43], &mqc_states[39]}, - {0x2801, 0, &mqc_states[44], &mqc_states[38]}, - {0x2801, 1, &mqc_states[45], &mqc_states[39]}, - {0x2401, 0, &mqc_states[46], &mqc_states[40]}, - {0x2401, 1, &mqc_states[47], &mqc_states[41]}, - {0x2201, 0, &mqc_states[48], &mqc_states[42]}, - {0x2201, 1, &mqc_states[49], &mqc_states[43]}, - {0x1c01, 0, &mqc_states[50], &mqc_states[44]}, - {0x1c01, 1, &mqc_states[51], &mqc_states[45]}, - {0x1801, 0, &mqc_states[52], &mqc_states[46]}, - {0x1801, 1, &mqc_states[53], &mqc_states[47]}, - {0x1601, 0, &mqc_states[54], &mqc_states[48]}, - {0x1601, 1, &mqc_states[55], &mqc_states[49]}, - {0x1401, 0, &mqc_states[56], &mqc_states[50]}, - {0x1401, 1, &mqc_states[57], &mqc_states[51]}, - {0x1201, 0, &mqc_states[58], &mqc_states[52]}, - {0x1201, 1, &mqc_states[59], &mqc_states[53]}, - {0x1101, 0, &mqc_states[60], &mqc_states[54]}, - {0x1101, 1, &mqc_states[61], &mqc_states[55]}, - {0x0ac1, 0, &mqc_states[62], &mqc_states[56]}, - {0x0ac1, 1, &mqc_states[63], &mqc_states[57]}, - {0x09c1, 0, &mqc_states[64], &mqc_states[58]}, - {0x09c1, 1, &mqc_states[65], &mqc_states[59]}, - {0x08a1, 0, &mqc_states[66], &mqc_states[60]}, - {0x08a1, 1, &mqc_states[67], &mqc_states[61]}, - {0x0521, 0, &mqc_states[68], &mqc_states[62]}, - {0x0521, 1, &mqc_states[69], &mqc_states[63]}, - {0x0441, 0, &mqc_states[70], &mqc_states[64]}, - {0x0441, 1, &mqc_states[71], &mqc_states[65]}, - {0x02a1, 0, &mqc_states[72], &mqc_states[66]}, - {0x02a1, 1, &mqc_states[73], &mqc_states[67]}, - {0x0221, 0, &mqc_states[74], &mqc_states[68]}, - {0x0221, 1, &mqc_states[75], &mqc_states[69]}, - {0x0141, 0, &mqc_states[76], &mqc_states[70]}, - {0x0141, 1, &mqc_states[77], &mqc_states[71]}, - {0x0111, 0, &mqc_states[78], &mqc_states[72]}, - {0x0111, 1, &mqc_states[79], &mqc_states[73]}, - {0x0085, 0, &mqc_states[80], &mqc_states[74]}, - {0x0085, 1, &mqc_states[81], &mqc_states[75]}, - {0x0049, 0, &mqc_states[82], &mqc_states[76]}, - {0x0049, 1, &mqc_states[83], &mqc_states[77]}, - {0x0025, 0, &mqc_states[84], &mqc_states[78]}, - {0x0025, 1, &mqc_states[85], &mqc_states[79]}, - {0x0015, 0, &mqc_states[86], &mqc_states[80]}, - {0x0015, 1, &mqc_states[87], &mqc_states[81]}, - {0x0009, 0, &mqc_states[88], &mqc_states[82]}, - {0x0009, 1, &mqc_states[89], &mqc_states[83]}, - {0x0005, 0, &mqc_states[90], &mqc_states[84]}, - {0x0005, 1, &mqc_states[91], &mqc_states[85]}, - {0x0001, 0, &mqc_states[90], &mqc_states[86]}, - {0x0001, 1, &mqc_states[91], &mqc_states[87]}, - {0x5601, 0, &mqc_states[92], &mqc_states[92]}, - {0x5601, 1, &mqc_states[93], &mqc_states[93]}, -}; - -/* -========================================================== - local functions -========================================================== -*/ - -void opj_mqc_byteout(opj_mqc_t *mqc) { - if (*mqc->bp == 0xff) { - mqc->bp++; - *mqc->bp = (OPJ_BYTE)(mqc->c >> 20); - mqc->c &= 0xfffff; - mqc->ct = 7; - } else { - if ((mqc->c & 0x8000000) == 0) { /* ((mqc->c&0x8000000)==0) CHANGE */ - mqc->bp++; - *mqc->bp = (OPJ_BYTE)(mqc->c >> 19); - mqc->c &= 0x7ffff; - mqc->ct = 8; - } else { - (*mqc->bp)++; - if (*mqc->bp == 0xff) { - mqc->c &= 0x7ffffff; - mqc->bp++; - *mqc->bp = (OPJ_BYTE)(mqc->c >> 20); - mqc->c &= 0xfffff; - mqc->ct = 7; - } else { - mqc->bp++; - *mqc->bp = (OPJ_BYTE)(mqc->c >> 19); - mqc->c &= 0x7ffff; - mqc->ct = 8; - } - } - } -} - -void opj_mqc_renorme(opj_mqc_t *mqc) { - do { - mqc->a <<= 1; - mqc->c <<= 1; - mqc->ct--; - if (mqc->ct == 0) { - opj_mqc_byteout(mqc); - } - } while ((mqc->a & 0x8000) == 0); -} - -void opj_mqc_codemps(opj_mqc_t *mqc) { - mqc->a -= (*mqc->curctx)->qeval; - if ((mqc->a & 0x8000) == 0) { - if (mqc->a < (*mqc->curctx)->qeval) { - mqc->a = (*mqc->curctx)->qeval; - } else { - mqc->c += (*mqc->curctx)->qeval; - } - *mqc->curctx = (*mqc->curctx)->nmps; - opj_mqc_renorme(mqc); - } else { - mqc->c += (*mqc->curctx)->qeval; - } -} - -void opj_mqc_codelps(opj_mqc_t *mqc) { - mqc->a -= (*mqc->curctx)->qeval; - if (mqc->a < (*mqc->curctx)->qeval) { - mqc->c += (*mqc->curctx)->qeval; - } else { - mqc->a = (*mqc->curctx)->qeval; - } - *mqc->curctx = (*mqc->curctx)->nlps; - opj_mqc_renorme(mqc); -} - -void opj_mqc_setbits(opj_mqc_t *mqc) { - OPJ_UINT32 tempc = mqc->c + mqc->a; - mqc->c |= 0xffff; - if (mqc->c >= tempc) { - mqc->c -= 0x8000; - } -} - -static INLINE OPJ_INT32 opj_mqc_mpsexchange(opj_mqc_t *const mqc) { - OPJ_INT32 d; - if (mqc->a < (*mqc->curctx)->qeval) { - d = (OPJ_INT32)(1 - (*mqc->curctx)->mps); - *mqc->curctx = (*mqc->curctx)->nlps; - } else { - d = (OPJ_INT32)(*mqc->curctx)->mps; - *mqc->curctx = (*mqc->curctx)->nmps; - } - - return d; -} - -static INLINE OPJ_INT32 opj_mqc_lpsexchange(opj_mqc_t *const mqc) { - OPJ_INT32 d; - if (mqc->a < (*mqc->curctx)->qeval) { - mqc->a = (*mqc->curctx)->qeval; - d = (OPJ_INT32)(*mqc->curctx)->mps; - *mqc->curctx = (*mqc->curctx)->nmps; - } else { - mqc->a = (*mqc->curctx)->qeval; - d = (OPJ_INT32)(1 - (*mqc->curctx)->mps); - *mqc->curctx = (*mqc->curctx)->nlps; - } - - return d; -} - -#ifdef MQC_PERF_OPT -static INLINE void opj_mqc_bytein(opj_mqc_t *const mqc) { - unsigned int i = *((unsigned int *) mqc->bp); - mqc->c += i & 0xffff00; - mqc->ct = i & 0x0f; - mqc->bp += (i >> 2) & 0x04; -} -#else -static void opj_mqc_bytein(opj_mqc_t *const mqc) { - if (mqc->bp != mqc->end) { - OPJ_UINT32 c; - if (mqc->bp + 1 != mqc->end) { - c = *(mqc->bp + 1); - } else { - c = 0xff; - } - if (*mqc->bp == 0xff) { - if (c > 0x8f) { - mqc->c += 0xff00; - mqc->ct = 8; - } else { - mqc->bp++; - mqc->c += c << 9; - mqc->ct = 7; - } - } else { - mqc->bp++; - mqc->c += c << 8; - mqc->ct = 8; - } - } else { - mqc->c += 0xff00; - mqc->ct = 8; - } -} -#endif - -static INLINE void opj_mqc_renormd(opj_mqc_t *const mqc) { - do { - if (mqc->ct == 0) { - opj_mqc_bytein(mqc); - } - mqc->a <<= 1; - mqc->c <<= 1; - mqc->ct--; - } while (mqc->a < 0x8000); -} - -/* -========================================================== - MQ-Coder interface -========================================================== -*/ - -opj_mqc_t* opj_mqc_create(void) { - opj_mqc_t *mqc = (opj_mqc_t*)opj_malloc(sizeof(opj_mqc_t)); -#ifdef MQC_PERF_OPT - mqc->buffer = NULL; -#endif - return mqc; -} - -void opj_mqc_destroy(opj_mqc_t *mqc) { - if(mqc) { -#ifdef MQC_PERF_OPT - opj_free(mqc->buffer); -#endif - opj_free(mqc); - } -} - -OPJ_UINT32 opj_mqc_numbytes(opj_mqc_t *mqc) { - const ptrdiff_t diff = mqc->bp - mqc->start; -#if 0 - assert( diff <= 0xffffffff && diff >= 0 ); /* UINT32_MAX */ -#endif - return (OPJ_UINT32)diff; -} - -void opj_mqc_init_enc(opj_mqc_t *mqc, OPJ_BYTE *bp) { - /* TODO MSD: need to take a look to the v2 version */ - opj_mqc_setcurctx(mqc, 0); - mqc->a = 0x8000; - mqc->c = 0; - mqc->bp = bp - 1; - mqc->ct = 12; - if (*mqc->bp == 0xff) { - mqc->ct = 13; - } - mqc->start = bp; -} - -void opj_mqc_encode(opj_mqc_t *mqc, OPJ_UINT32 d) { - if ((*mqc->curctx)->mps == d) { - opj_mqc_codemps(mqc); - } else { - opj_mqc_codelps(mqc); - } -} - -void opj_mqc_flush(opj_mqc_t *mqc) { - opj_mqc_setbits(mqc); - mqc->c <<= mqc->ct; - opj_mqc_byteout(mqc); - mqc->c <<= mqc->ct; - opj_mqc_byteout(mqc); - - if (*mqc->bp != 0xff) { - mqc->bp++; - } -} - -void opj_mqc_bypass_init_enc(opj_mqc_t *mqc) { - mqc->c = 0; - mqc->ct = 8; - /*if (*mqc->bp == 0xff) { - mqc->ct = 7; - } */ -} - -void opj_mqc_bypass_enc(opj_mqc_t *mqc, OPJ_UINT32 d) { - mqc->ct--; - mqc->c = mqc->c + (d << mqc->ct); - if (mqc->ct == 0) { - mqc->bp++; - *mqc->bp = (OPJ_BYTE)mqc->c; - mqc->ct = 8; - if (*mqc->bp == 0xff) { - mqc->ct = 7; - } - mqc->c = 0; - } -} - -OPJ_UINT32 opj_mqc_bypass_flush_enc(opj_mqc_t *mqc) { - OPJ_BYTE bit_padding; - - bit_padding = 0; - - if (mqc->ct != 0) { - while (mqc->ct > 0) { - mqc->ct--; - mqc->c += (OPJ_UINT32)(bit_padding << mqc->ct); - bit_padding = (bit_padding + 1) & 0x01; - } - mqc->bp++; - *mqc->bp = (OPJ_BYTE)mqc->c; - mqc->ct = 8; - mqc->c = 0; - } - - return 1; -} - -void opj_mqc_reset_enc(opj_mqc_t *mqc) { - opj_mqc_resetstates(mqc); - opj_mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); - opj_mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); - opj_mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); -} - -OPJ_UINT32 opj_mqc_restart_enc(opj_mqc_t *mqc) { - OPJ_UINT32 correction = 1; - - /* */ - OPJ_INT32 n = (OPJ_INT32)(27 - 15 - mqc->ct); - mqc->c <<= mqc->ct; - while (n > 0) { - opj_mqc_byteout(mqc); - n -= (OPJ_INT32)mqc->ct; - mqc->c <<= mqc->ct; - } - opj_mqc_byteout(mqc); - - return correction; -} - -void opj_mqc_restart_init_enc(opj_mqc_t *mqc) { - /* */ - opj_mqc_setcurctx(mqc, 0); - mqc->a = 0x8000; - mqc->c = 0; - mqc->ct = 12; - mqc->bp--; - if (*mqc->bp == 0xff) { - mqc->ct = 13; - } -} - -void opj_mqc_erterm_enc(opj_mqc_t *mqc) { - OPJ_INT32 k = (OPJ_INT32)(11 - mqc->ct + 1); - - while (k > 0) { - mqc->c <<= mqc->ct; - mqc->ct = 0; - opj_mqc_byteout(mqc); - k -= (OPJ_INT32)mqc->ct; - } - - if (*mqc->bp != 0xff) { - opj_mqc_byteout(mqc); - } -} - -void opj_mqc_segmark_enc(opj_mqc_t *mqc) { - OPJ_UINT32 i; - opj_mqc_setcurctx(mqc, 18); - - for (i = 1; i < 5; i++) { - opj_mqc_encode(mqc, i % 2); - } -} - -OPJ_BOOL opj_mqc_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len) { - opj_mqc_setcurctx(mqc, 0); - mqc->start = bp; - mqc->end = bp + len; - mqc->bp = bp; - if (len==0) mqc->c = 0xff << 16; - else mqc->c = (OPJ_UINT32)(*mqc->bp << 16); - -#ifdef MQC_PERF_OPT /* TODO_MSD: check this option and put in experimental */ - { - OPJ_UINT32 c; - OPJ_UINT32 *ip; - OPJ_BYTE *end = mqc->end - 1; - void* new_buffer = opj_realloc(mqc->buffer, (len + 1) * sizeof(OPJ_UINT32)); - if (! new_buffer) { - opj_free(mqc->buffer); - mqc->buffer = NULL; - return OPJ_FALSE; - } - mqc->buffer = new_buffer; - - ip = (OPJ_UINT32 *) mqc->buffer; - - while (bp < end) { - c = *(bp + 1); - if (*bp == 0xff) { - if (c > 0x8f) { - break; - } else { - *ip = 0x00000017 | (c << 9); - } - } else { - *ip = 0x00000018 | (c << 8); - } - bp++; - ip++; - } - - /* Handle last byte of data */ - c = 0xff; - if (*bp == 0xff) { - *ip = 0x0000ff18; - } else { - bp++; - *ip = 0x00000018 | (c << 8); - } - ip++; - - *ip = 0x0000ff08; - mqc->bp = mqc->buffer; - } -#endif - opj_mqc_bytein(mqc); - mqc->c <<= 7; - mqc->ct -= 7; - mqc->a = 0x8000; - return OPJ_TRUE; -} - -OPJ_INT32 opj_mqc_decode(opj_mqc_t *const mqc) { - OPJ_INT32 d; - mqc->a -= (*mqc->curctx)->qeval; - if ((mqc->c >> 16) < (*mqc->curctx)->qeval) { - d = opj_mqc_lpsexchange(mqc); - opj_mqc_renormd(mqc); - } else { - mqc->c -= (*mqc->curctx)->qeval << 16; - if ((mqc->a & 0x8000) == 0) { - d = opj_mqc_mpsexchange(mqc); - opj_mqc_renormd(mqc); - } else { - d = (OPJ_INT32)(*mqc->curctx)->mps; - } - } - - return d; -} - -void opj_mqc_resetstates(opj_mqc_t *mqc) { - OPJ_UINT32 i; - for (i = 0; i < MQC_NUMCTXS; i++) { - mqc->ctxs[i] = mqc_states; - } -} - -void opj_mqc_setstate(opj_mqc_t *mqc, OPJ_UINT32 ctxno, OPJ_UINT32 msb, OPJ_INT32 prob) { - mqc->ctxs[ctxno] = &mqc_states[msb + (OPJ_UINT32)(prob << 1)]; -} - - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/mqc.h b/Dependencies/FreeImage/Source/LibOpenJPEG/mqc.h deleted file mode 100644 index b75ef39..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/mqc.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008, Jerome Fimes, Communications & Systemes - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __MQC_H -#define __MQC_H -/** -@file mqc.h -@brief Implementation of an MQ-Coder (MQC) - -The functions in MQC.C have for goal to realize the MQ-coder operations. The functions -in MQC.C are used by some function in T1.C. -*/ - -/** @defgroup MQC MQC - Implementation of an MQ-Coder */ -/*@{*/ - -/** -This struct defines the state of a context. -*/ -typedef struct opj_mqc_state { - /** the probability of the Least Probable Symbol (0.75->0x8000, 1.5->0xffff) */ - OPJ_UINT32 qeval; - /** the Most Probable Symbol (0 or 1) */ - OPJ_UINT32 mps; - /** next state if the next encoded symbol is the MPS */ - struct opj_mqc_state *nmps; - /** next state if the next encoded symbol is the LPS */ - struct opj_mqc_state *nlps; -} opj_mqc_state_t; - -#define MQC_NUMCTXS 19 - -/** -MQ coder -*/ -typedef struct opj_mqc { - OPJ_UINT32 c; - OPJ_UINT32 a; - OPJ_UINT32 ct; - OPJ_BYTE *bp; - OPJ_BYTE *start; - OPJ_BYTE *end; - opj_mqc_state_t *ctxs[MQC_NUMCTXS]; - opj_mqc_state_t **curctx; -#ifdef MQC_PERF_OPT - unsigned char *buffer; -#endif -} opj_mqc_t; - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Create a new MQC handle -@return Returns a new MQC handle if successful, returns NULL otherwise -*/ -opj_mqc_t* opj_mqc_create(void); -/** -Destroy a previously created MQC handle -@param mqc MQC handle to destroy -*/ -void opj_mqc_destroy(opj_mqc_t *mqc); -/** -Return the number of bytes written/read since initialisation -@param mqc MQC handle -@return Returns the number of bytes already encoded -*/ -OPJ_UINT32 opj_mqc_numbytes(opj_mqc_t *mqc); -/** -Reset the states of all the context of the coder/decoder -(each context is set to a state where 0 and 1 are more or less equiprobable) -@param mqc MQC handle -*/ -void opj_mqc_resetstates(opj_mqc_t *mqc); -/** -Set the state of a particular context -@param mqc MQC handle -@param ctxno Number that identifies the context -@param msb The MSB of the new state of the context -@param prob Number that identifies the probability of the symbols for the new state of the context -*/ -void opj_mqc_setstate(opj_mqc_t *mqc, OPJ_UINT32 ctxno, OPJ_UINT32 msb, OPJ_INT32 prob); -/** -Initialize the encoder -@param mqc MQC handle -@param bp Pointer to the start of the buffer where the bytes will be written -*/ -void opj_mqc_init_enc(opj_mqc_t *mqc, OPJ_BYTE *bp); -/** -Set the current context used for coding/decoding -@param mqc MQC handle -@param ctxno Number that identifies the context -*/ -#define opj_mqc_setcurctx(mqc, ctxno) (mqc)->curctx = &(mqc)->ctxs[(OPJ_UINT32)(ctxno)] -/** -Encode a symbol using the MQ-coder -@param mqc MQC handle -@param d The symbol to be encoded (0 or 1) -*/ -void opj_mqc_encode(opj_mqc_t *mqc, OPJ_UINT32 d); -/** -Flush the encoder, so that all remaining data is written -@param mqc MQC handle -*/ -void opj_mqc_flush(opj_mqc_t *mqc); -/** -BYPASS mode switch, initialization operation. -JPEG 2000 p 505. -

Not fully implemented and tested !!

-@param mqc MQC handle -*/ -void opj_mqc_bypass_init_enc(opj_mqc_t *mqc); -/** -BYPASS mode switch, coding operation. -JPEG 2000 p 505. -

Not fully implemented and tested !!

-@param mqc MQC handle -@param d The symbol to be encoded (0 or 1) -*/ -void opj_mqc_bypass_enc(opj_mqc_t *mqc, OPJ_UINT32 d); -/** -BYPASS mode switch, flush operation -

Not fully implemented and tested !!

-@param mqc MQC handle -@return Returns 1 (always) -*/ -OPJ_UINT32 opj_mqc_bypass_flush_enc(opj_mqc_t *mqc); -/** -RESET mode switch -@param mqc MQC handle -*/ -void opj_mqc_reset_enc(opj_mqc_t *mqc); -/** -RESTART mode switch (TERMALL) -@param mqc MQC handle -@return Returns 1 (always) -*/ -OPJ_UINT32 opj_mqc_restart_enc(opj_mqc_t *mqc); -/** -RESTART mode switch (TERMALL) reinitialisation -@param mqc MQC handle -*/ -void opj_mqc_restart_init_enc(opj_mqc_t *mqc); -/** -ERTERM mode switch (PTERM) -@param mqc MQC handle -*/ -void opj_mqc_erterm_enc(opj_mqc_t *mqc); -/** -SEGMARK mode switch (SEGSYM) -@param mqc MQC handle -*/ -void opj_mqc_segmark_enc(opj_mqc_t *mqc); -/** -Initialize the decoder -@param mqc MQC handle -@param bp Pointer to the start of the buffer from which the bytes will be read -@param len Length of the input buffer -*/ -OPJ_BOOL opj_mqc_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len); -/** -Decode a symbol -@param mqc MQC handle -@return Returns the decoded symbol (0 or 1) -*/ -OPJ_INT32 opj_mqc_decode(opj_mqc_t * const mqc); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __MQC_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/openjpeg.c b/Dependencies/FreeImage/Source/LibOpenJPEG/openjpeg.c deleted file mode 100644 index 0522acb..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/openjpeg.c +++ /dev/null @@ -1,955 +0,0 @@ -/* - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef _WIN32 -#include -#endif /* _WIN32 */ - -#include "opj_includes.h" - - -/* ---------------------------------------------------------------------- */ -/* Functions to set the message handlers */ - -OPJ_BOOL OPJ_CALLCONV opj_set_info_handler( opj_codec_t * p_codec, - opj_msg_callback p_callback, - void * p_user_data) -{ - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - if(! l_codec){ - return OPJ_FALSE; - } - - l_codec->m_event_mgr.info_handler = p_callback; - l_codec->m_event_mgr.m_info_data = p_user_data; - - return OPJ_TRUE; -} - -OPJ_BOOL OPJ_CALLCONV opj_set_warning_handler( opj_codec_t * p_codec, - opj_msg_callback p_callback, - void * p_user_data) -{ - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - if (! l_codec) { - return OPJ_FALSE; - } - - l_codec->m_event_mgr.warning_handler = p_callback; - l_codec->m_event_mgr.m_warning_data = p_user_data; - - return OPJ_TRUE; -} - -OPJ_BOOL OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec, - opj_msg_callback p_callback, - void * p_user_data) -{ - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - if (! l_codec) { - return OPJ_FALSE; - } - - l_codec->m_event_mgr.error_handler = p_callback; - l_codec->m_event_mgr.m_error_data = p_user_data; - - return OPJ_TRUE; -} - -/* ---------------------------------------------------------------------- */ - -static OPJ_SIZE_T opj_read_from_file (void * p_buffer, OPJ_SIZE_T p_nb_bytes, FILE * p_file) -{ - OPJ_SIZE_T l_nb_read = fread(p_buffer,1,p_nb_bytes,p_file); - return l_nb_read ? l_nb_read : (OPJ_SIZE_T)-1; -} - -static OPJ_UINT64 opj_get_data_length_from_file (FILE * p_file) -{ - OPJ_OFF_T file_length = 0; - - OPJ_FSEEK(p_file, 0, SEEK_END); - file_length = (OPJ_OFF_T)OPJ_FTELL(p_file); - OPJ_FSEEK(p_file, 0, SEEK_SET); - - return (OPJ_UINT64)file_length; -} - -static OPJ_SIZE_T opj_write_from_file (void * p_buffer, OPJ_SIZE_T p_nb_bytes, FILE * p_file) -{ - return fwrite(p_buffer,1,p_nb_bytes,p_file); -} - -static OPJ_OFF_T opj_skip_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data) -{ - if (OPJ_FSEEK(p_user_data,p_nb_bytes,SEEK_CUR)) { - return -1; - } - - return p_nb_bytes; -} - -static OPJ_BOOL opj_seek_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data) -{ - if (OPJ_FSEEK(p_user_data,p_nb_bytes,SEEK_SET)) { - return OPJ_FALSE; - } - - return OPJ_TRUE; -} - -/* ---------------------------------------------------------------------- */ -#ifdef _WIN32 -#ifndef OPJ_STATIC -BOOL APIENTRY -DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { - - OPJ_ARG_NOT_USED(lpReserved); - OPJ_ARG_NOT_USED(hModule); - - switch (ul_reason_for_call) { - case DLL_PROCESS_ATTACH : - break; - case DLL_PROCESS_DETACH : - break; - case DLL_THREAD_ATTACH : - case DLL_THREAD_DETACH : - break; - } - - return TRUE; -} -#endif /* OPJ_STATIC */ -#endif /* _WIN32 */ - -/* ---------------------------------------------------------------------- */ - -const char* OPJ_CALLCONV opj_version(void) { - return OPJ_PACKAGE_VERSION; -} - -/* ---------------------------------------------------------------------- */ -/* DECOMPRESSION FUNCTIONS*/ - -opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format) -{ - opj_codec_private_t *l_codec = 00; - - l_codec = (opj_codec_private_t*) opj_calloc(1, sizeof(opj_codec_private_t)); - if (!l_codec){ - return 00; - } - memset(l_codec, 0, sizeof(opj_codec_private_t)); - - l_codec->is_decompressor = 1; - - switch (p_format) { - case OPJ_CODEC_J2K: - l_codec->opj_dump_codec = (void (*) (void*, OPJ_INT32, FILE*)) j2k_dump; - - l_codec->opj_get_codec_info = (opj_codestream_info_v2_t* (*) (void*) ) j2k_get_cstr_info; - - l_codec->opj_get_codec_index = (opj_codestream_index_t* (*) (void*) ) j2k_get_cstr_index; - - l_codec->m_codec_data.m_decompression.opj_decode = - (OPJ_BOOL (*) ( void *, - struct opj_stream_private *, - opj_image_t*, struct opj_event_mgr * )) opj_j2k_decode; - - l_codec->m_codec_data.m_decompression.opj_end_decompress = - (OPJ_BOOL (*) ( void *, - struct opj_stream_private *, - struct opj_event_mgr *)) opj_j2k_end_decompress; - - l_codec->m_codec_data.m_decompression.opj_read_header = - (OPJ_BOOL (*) ( struct opj_stream_private *, - void *, - opj_image_t **, - struct opj_event_mgr * )) opj_j2k_read_header; - - l_codec->m_codec_data.m_decompression.opj_destroy = - (void (*) (void *))opj_j2k_destroy; - - l_codec->m_codec_data.m_decompression.opj_setup_decoder = - (void (*) (void * , opj_dparameters_t * )) opj_j2k_setup_decoder; - - l_codec->m_codec_data.m_decompression.opj_read_tile_header = - (OPJ_BOOL (*) ( void *, - OPJ_UINT32*, - OPJ_UINT32*, - OPJ_INT32*, OPJ_INT32*, - OPJ_INT32*, OPJ_INT32*, - OPJ_UINT32*, - OPJ_BOOL*, - struct opj_stream_private *, - struct opj_event_mgr * )) opj_j2k_read_tile_header; - - l_codec->m_codec_data.m_decompression.opj_decode_tile_data = - (OPJ_BOOL (*) ( void *, - OPJ_UINT32, - OPJ_BYTE*, - OPJ_UINT32, - struct opj_stream_private *, - struct opj_event_mgr *)) opj_j2k_decode_tile; - - l_codec->m_codec_data.m_decompression.opj_set_decode_area = - (OPJ_BOOL (*) ( void *, - opj_image_t*, - OPJ_INT32, OPJ_INT32, OPJ_INT32, OPJ_INT32, - struct opj_event_mgr *)) opj_j2k_set_decode_area; - - l_codec->m_codec_data.m_decompression.opj_get_decoded_tile = - (OPJ_BOOL (*) ( void *p_codec, - opj_stream_private_t *p_cio, - opj_image_t *p_image, - struct opj_event_mgr * p_manager, - OPJ_UINT32 tile_index)) opj_j2k_get_tile; - - l_codec->m_codec_data.m_decompression.opj_set_decoded_resolution_factor = - (OPJ_BOOL (*) ( void * p_codec, - OPJ_UINT32 res_factor, - struct opj_event_mgr * p_manager)) opj_j2k_set_decoded_resolution_factor; - - l_codec->m_codec = opj_j2k_create_decompress(); - - if (! l_codec->m_codec) { - opj_free(l_codec); - return NULL; - } - - break; - - case OPJ_CODEC_JP2: - /* get a JP2 decoder handle */ - l_codec->opj_dump_codec = (void (*) (void*, OPJ_INT32, FILE*)) jp2_dump; - - l_codec->opj_get_codec_info = (opj_codestream_info_v2_t* (*) (void*) ) jp2_get_cstr_info; - - l_codec->opj_get_codec_index = (opj_codestream_index_t* (*) (void*) ) jp2_get_cstr_index; - - l_codec->m_codec_data.m_decompression.opj_decode = - (OPJ_BOOL (*) ( void *, - struct opj_stream_private *, - opj_image_t*, - struct opj_event_mgr * )) opj_jp2_decode; - - l_codec->m_codec_data.m_decompression.opj_end_decompress = - (OPJ_BOOL (*) ( void *, - struct opj_stream_private *, - struct opj_event_mgr *)) opj_jp2_end_decompress; - - l_codec->m_codec_data.m_decompression.opj_read_header = - (OPJ_BOOL (*) ( struct opj_stream_private *, - void *, - opj_image_t **, - struct opj_event_mgr * )) opj_jp2_read_header; - - l_codec->m_codec_data.m_decompression.opj_read_tile_header = - (OPJ_BOOL (*) ( void *, - OPJ_UINT32*, - OPJ_UINT32*, - OPJ_INT32*, - OPJ_INT32*, - OPJ_INT32 * , - OPJ_INT32 * , - OPJ_UINT32 * , - OPJ_BOOL *, - struct opj_stream_private *, - struct opj_event_mgr * )) opj_jp2_read_tile_header; - - l_codec->m_codec_data.m_decompression.opj_decode_tile_data = - (OPJ_BOOL (*) ( void *, - OPJ_UINT32,OPJ_BYTE*,OPJ_UINT32, - struct opj_stream_private *, - struct opj_event_mgr * )) opj_jp2_decode_tile; - - l_codec->m_codec_data.m_decompression.opj_destroy = (void (*) (void *))opj_jp2_destroy; - - l_codec->m_codec_data.m_decompression.opj_setup_decoder = - (void (*) (void * ,opj_dparameters_t * )) opj_jp2_setup_decoder; - - l_codec->m_codec_data.m_decompression.opj_set_decode_area = - (OPJ_BOOL (*) ( void *, - opj_image_t*, - OPJ_INT32,OPJ_INT32,OPJ_INT32,OPJ_INT32, - struct opj_event_mgr * )) opj_jp2_set_decode_area; - - l_codec->m_codec_data.m_decompression.opj_get_decoded_tile = - (OPJ_BOOL (*) ( void *p_codec, - opj_stream_private_t *p_cio, - opj_image_t *p_image, - struct opj_event_mgr * p_manager, - OPJ_UINT32 tile_index)) opj_jp2_get_tile; - - l_codec->m_codec_data.m_decompression.opj_set_decoded_resolution_factor = - (OPJ_BOOL (*) ( void * p_codec, - OPJ_UINT32 res_factor, - opj_event_mgr_t * p_manager)) opj_jp2_set_decoded_resolution_factor; - - l_codec->m_codec = opj_jp2_create(OPJ_TRUE); - - if (! l_codec->m_codec) { - opj_free(l_codec); - return 00; - } - - break; - case OPJ_CODEC_UNKNOWN: - case OPJ_CODEC_JPT: - default: - opj_free(l_codec); - return 00; - } - - opj_set_default_event_handler(&(l_codec->m_event_mgr)); - return (opj_codec_t*) l_codec; -} - -void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters) { - if(parameters) { - memset(parameters, 0, sizeof(opj_dparameters_t)); - /* default decoding parameters */ - parameters->cp_layer = 0; - parameters->cp_reduce = 0; - - parameters->decod_format = -1; - parameters->cod_format = -1; - parameters->flags = 0; -/* UniPG>> */ -#ifdef USE_JPWL - parameters->jpwl_correct = OPJ_FALSE; - parameters->jpwl_exp_comps = JPWL_EXPECTED_COMPONENTS; - parameters->jpwl_max_tiles = JPWL_MAXIMUM_TILES; -#endif /* USE_JPWL */ -/* <is_decompressor) { - opj_event_msg(&(l_codec->m_event_mgr), EVT_ERROR, - "Codec provided to the opj_setup_decoder function is not a decompressor handler.\n"); - return OPJ_FALSE; - } - - l_codec->m_codec_data.m_decompression.opj_setup_decoder(l_codec->m_codec, - parameters); - return OPJ_TRUE; - } - return OPJ_FALSE; -} - -OPJ_BOOL OPJ_CALLCONV opj_read_header ( opj_stream_t *p_stream, - opj_codec_t *p_codec, - opj_image_t **p_image ) -{ - if (p_codec && p_stream) { - opj_codec_private_t* l_codec = (opj_codec_private_t*) p_codec; - opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; - - if(! l_codec->is_decompressor) { - opj_event_msg(&(l_codec->m_event_mgr), EVT_ERROR, - "Codec provided to the opj_read_header function is not a decompressor handler.\n"); - return OPJ_FALSE; - } - - return l_codec->m_codec_data.m_decompression.opj_read_header( l_stream, - l_codec->m_codec, - p_image, - &(l_codec->m_event_mgr) ); - } - - return OPJ_FALSE; -} - -OPJ_BOOL OPJ_CALLCONV opj_decode( opj_codec_t *p_codec, - opj_stream_t *p_stream, - opj_image_t* p_image) -{ - if (p_codec && p_stream) { - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream; - - if (! l_codec->is_decompressor) { - return OPJ_FALSE; - } - - return l_codec->m_codec_data.m_decompression.opj_decode(l_codec->m_codec, - l_stream, - p_image, - &(l_codec->m_event_mgr) ); - } - - return OPJ_FALSE; -} - -OPJ_BOOL OPJ_CALLCONV opj_set_decode_area( opj_codec_t *p_codec, - opj_image_t* p_image, - OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, - OPJ_INT32 p_end_x, OPJ_INT32 p_end_y - ) -{ - if (p_codec) { - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - - if (! l_codec->is_decompressor) { - return OPJ_FALSE; - } - - return l_codec->m_codec_data.m_decompression.opj_set_decode_area( l_codec->m_codec, - p_image, - p_start_x, p_start_y, - p_end_x, p_end_y, - &(l_codec->m_event_mgr) ); - } - return OPJ_FALSE; -} - -OPJ_BOOL OPJ_CALLCONV opj_read_tile_header( opj_codec_t *p_codec, - opj_stream_t * p_stream, - OPJ_UINT32 * p_tile_index, - OPJ_UINT32 * p_data_size, - OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0, - OPJ_INT32 * p_tile_x1, OPJ_INT32 * p_tile_y1, - OPJ_UINT32 * p_nb_comps, - OPJ_BOOL * p_should_go_on) -{ - if (p_codec && p_stream && p_data_size && p_tile_index) { - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream; - - if (! l_codec->is_decompressor) { - return OPJ_FALSE; - } - - return l_codec->m_codec_data.m_decompression.opj_read_tile_header( l_codec->m_codec, - p_tile_index, - p_data_size, - p_tile_x0, p_tile_y0, - p_tile_x1, p_tile_y1, - p_nb_comps, - p_should_go_on, - l_stream, - &(l_codec->m_event_mgr)); - } - return OPJ_FALSE; -} - -OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data( opj_codec_t *p_codec, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_t *p_stream - ) -{ - if (p_codec && p_data && p_stream) { - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream; - - if (! l_codec->is_decompressor) { - return OPJ_FALSE; - } - - return l_codec->m_codec_data.m_decompression.opj_decode_tile_data( l_codec->m_codec, - p_tile_index, - p_data, - p_data_size, - l_stream, - &(l_codec->m_event_mgr) ); - } - return OPJ_FALSE; -} - -OPJ_BOOL OPJ_CALLCONV opj_get_decoded_tile( opj_codec_t *p_codec, - opj_stream_t *p_stream, - opj_image_t *p_image, - OPJ_UINT32 tile_index) -{ - if (p_codec && p_stream) { - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream; - - if (! l_codec->is_decompressor) { - return OPJ_FALSE; - } - - return l_codec->m_codec_data.m_decompression.opj_get_decoded_tile( l_codec->m_codec, - l_stream, - p_image, - &(l_codec->m_event_mgr), - tile_index); - } - - return OPJ_FALSE; -} - -OPJ_BOOL OPJ_CALLCONV opj_set_decoded_resolution_factor(opj_codec_t *p_codec, - OPJ_UINT32 res_factor ) -{ - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - - if ( !l_codec ){ - fprintf(stderr, "[ERROR] Input parameters of the setup_decoder function are incorrect.\n"); - return OPJ_FALSE; - } - - l_codec->m_codec_data.m_decompression.opj_set_decoded_resolution_factor(l_codec->m_codec, - res_factor, - &(l_codec->m_event_mgr) ); - return OPJ_TRUE; -} - -/* ---------------------------------------------------------------------- */ -/* COMPRESSION FUNCTIONS*/ - -opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format) -{ - opj_codec_private_t *l_codec = 00; - - l_codec = (opj_codec_private_t*)opj_calloc(1, sizeof(opj_codec_private_t)); - if (!l_codec) { - return 00; - } - memset(l_codec, 0, sizeof(opj_codec_private_t)); - - l_codec->is_decompressor = 0; - - switch(p_format) { - case OPJ_CODEC_J2K: - l_codec->m_codec_data.m_compression.opj_encode = (OPJ_BOOL (*) (void *, - struct opj_stream_private *, - struct opj_event_mgr * )) opj_j2k_encode; - - l_codec->m_codec_data.m_compression.opj_end_compress = (OPJ_BOOL (*) ( void *, - struct opj_stream_private *, - struct opj_event_mgr *)) opj_j2k_end_compress; - - l_codec->m_codec_data.m_compression.opj_start_compress = (OPJ_BOOL (*) (void *, - struct opj_stream_private *, - struct opj_image * , - struct opj_event_mgr *)) opj_j2k_start_compress; - - l_codec->m_codec_data.m_compression.opj_write_tile = (OPJ_BOOL (*) (void *, - OPJ_UINT32, - OPJ_BYTE*, - OPJ_UINT32, - struct opj_stream_private *, - struct opj_event_mgr *) ) opj_j2k_write_tile; - - l_codec->m_codec_data.m_compression.opj_destroy = (void (*) (void *)) opj_j2k_destroy; - - l_codec->m_codec_data.m_compression.opj_setup_encoder = (void (*) ( void *, - opj_cparameters_t *, - struct opj_image *, - struct opj_event_mgr * )) opj_j2k_setup_encoder; - - l_codec->m_codec = opj_j2k_create_compress(); - if (! l_codec->m_codec) { - opj_free(l_codec); - return 00; - } - - break; - - case OPJ_CODEC_JP2: - /* get a JP2 decoder handle */ - l_codec->m_codec_data.m_compression.opj_encode = (OPJ_BOOL (*) (void *, - struct opj_stream_private *, - struct opj_event_mgr * )) opj_jp2_encode; - - l_codec->m_codec_data.m_compression.opj_end_compress = (OPJ_BOOL (*) ( void *, - struct opj_stream_private *, - struct opj_event_mgr *)) opj_jp2_end_compress; - - l_codec->m_codec_data.m_compression.opj_start_compress = (OPJ_BOOL (*) (void *, - struct opj_stream_private *, - struct opj_image * , - struct opj_event_mgr *)) opj_jp2_start_compress; - - l_codec->m_codec_data.m_compression.opj_write_tile = (OPJ_BOOL (*) (void *, - OPJ_UINT32, - OPJ_BYTE*, - OPJ_UINT32, - struct opj_stream_private *, - struct opj_event_mgr *)) opj_jp2_write_tile; - - l_codec->m_codec_data.m_compression.opj_destroy = (void (*) (void *)) opj_jp2_destroy; - - l_codec->m_codec_data.m_compression.opj_setup_encoder = (void (*) ( void *, - opj_cparameters_t *, - struct opj_image *, - struct opj_event_mgr * )) opj_jp2_setup_encoder; - - l_codec->m_codec = opj_jp2_create(OPJ_FALSE); - if (! l_codec->m_codec) { - opj_free(l_codec); - return 00; - } - - break; - - case OPJ_CODEC_UNKNOWN: - case OPJ_CODEC_JPT: - default: - opj_free(l_codec); - return 00; - } - - opj_set_default_event_handler(&(l_codec->m_event_mgr)); - return (opj_codec_t*) l_codec; -} - -void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *parameters) { - if(parameters) { - memset(parameters, 0, sizeof(opj_cparameters_t)); - /* default coding parameters */ - parameters->cp_cinema = OPJ_OFF; - parameters->max_comp_size = 0; - parameters->numresolution = 6; - parameters->cp_rsiz = OPJ_STD_RSIZ; - parameters->cblockw_init = 64; - parameters->cblockh_init = 64; - parameters->prog_order = OPJ_LRCP; - parameters->roi_compno = -1; /* no ROI */ - parameters->subsampling_dx = 1; - parameters->subsampling_dy = 1; - parameters->tp_on = 0; - parameters->decod_format = -1; - parameters->cod_format = -1; - parameters->tcp_rates[0] = 0; - parameters->tcp_numlayers = 0; - parameters->cp_disto_alloc = 0; - parameters->cp_fixed_alloc = 0; - parameters->cp_fixed_quality = 0; - parameters->jpip_on = OPJ_FALSE; -/* UniPG>> */ -#ifdef USE_JPWL - parameters->jpwl_epc_on = OPJ_FALSE; - parameters->jpwl_hprot_MH = -1; /* -1 means unassigned */ - { - int i; - for (i = 0; i < JPWL_MAX_NO_TILESPECS; i++) { - parameters->jpwl_hprot_TPH_tileno[i] = -1; /* unassigned */ - parameters->jpwl_hprot_TPH[i] = 0; /* absent */ - } - }; - { - int i; - for (i = 0; i < JPWL_MAX_NO_PACKSPECS; i++) { - parameters->jpwl_pprot_tileno[i] = -1; /* unassigned */ - parameters->jpwl_pprot_packno[i] = -1; /* unassigned */ - parameters->jpwl_pprot[i] = 0; /* absent */ - } - }; - parameters->jpwl_sens_size = 0; /* 0 means no ESD */ - parameters->jpwl_sens_addr = 0; /* 0 means auto */ - parameters->jpwl_sens_range = 0; /* 0 means packet */ - parameters->jpwl_sens_MH = -1; /* -1 means unassigned */ - { - int i; - for (i = 0; i < JPWL_MAX_NO_TILESPECS; i++) { - parameters->jpwl_sens_TPH_tileno[i] = -1; /* unassigned */ - parameters->jpwl_sens_TPH[i] = -1; /* absent */ - } - }; -#endif /* USE_JPWL */ -/* <is_decompressor) { - l_codec->m_codec_data.m_compression.opj_setup_encoder( l_codec->m_codec, - parameters, - p_image, - &(l_codec->m_event_mgr) ); - return OPJ_TRUE; - } - } - - return OPJ_FALSE; -} - -OPJ_BOOL OPJ_CALLCONV opj_start_compress ( opj_codec_t *p_codec, - opj_image_t * p_image, - opj_stream_t *p_stream) -{ - if (p_codec && p_stream) { - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream; - - if (! l_codec->is_decompressor) { - return l_codec->m_codec_data.m_compression.opj_start_compress( l_codec->m_codec, - l_stream, - p_image, - &(l_codec->m_event_mgr)); - } - } - - return OPJ_FALSE; -} - -OPJ_BOOL OPJ_CALLCONV opj_encode(opj_codec_t *p_info, opj_stream_t *p_stream) -{ - if (p_info && p_stream) { - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_info; - opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream; - - if (! l_codec->is_decompressor) { - return l_codec->m_codec_data.m_compression.opj_encode( l_codec->m_codec, - l_stream, - &(l_codec->m_event_mgr)); - } - } - - return OPJ_FALSE; - -} - -OPJ_BOOL OPJ_CALLCONV opj_end_compress (opj_codec_t *p_codec, - opj_stream_t *p_stream) -{ - if (p_codec && p_stream) { - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream; - - if (! l_codec->is_decompressor) { - return l_codec->m_codec_data.m_compression.opj_end_compress(l_codec->m_codec, - l_stream, - &(l_codec->m_event_mgr)); - } - } - return OPJ_FALSE; - -} - -OPJ_BOOL OPJ_CALLCONV opj_end_decompress ( opj_codec_t *p_codec, - opj_stream_t *p_stream) -{ - if (p_codec && p_stream) { - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream; - - if (! l_codec->is_decompressor) { - return OPJ_FALSE; - } - - return l_codec->m_codec_data.m_decompression.opj_end_decompress(l_codec->m_codec, - l_stream, - &(l_codec->m_event_mgr) ); - } - - return OPJ_FALSE; -} - -OPJ_BOOL OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters, - OPJ_FLOAT32 * pEncodingMatrix, - OPJ_INT32 * p_dc_shift,OPJ_UINT32 pNbComp) -{ - OPJ_UINT32 l_matrix_size = pNbComp * pNbComp * (OPJ_UINT32)sizeof(OPJ_FLOAT32); - OPJ_UINT32 l_dc_shift_size = pNbComp * (OPJ_UINT32)sizeof(OPJ_INT32); - OPJ_UINT32 l_mct_total_size = l_matrix_size + l_dc_shift_size; - - /* add MCT capability */ - OPJ_INT32 rsiz = (OPJ_INT32)parameters->cp_rsiz | (OPJ_INT32)OPJ_MCT; - parameters->cp_rsiz = (OPJ_RSIZ_CAPABILITIES)rsiz; - parameters->irreversible = 1; - - /* use array based MCT */ - parameters->tcp_mct = 2; - parameters->mct_data = opj_malloc(l_mct_total_size); - if (! parameters->mct_data) { - return OPJ_FALSE; - } - - memcpy(parameters->mct_data,pEncodingMatrix,l_matrix_size); - memcpy(((OPJ_BYTE *) parameters->mct_data) + l_matrix_size,p_dc_shift,l_dc_shift_size); - - return OPJ_TRUE; -} - -OPJ_BOOL OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_t *p_stream ) -{ - if (p_codec && p_stream && p_data) { - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream; - - if (l_codec->is_decompressor) { - return OPJ_FALSE; - } - - return l_codec->m_codec_data.m_compression.opj_write_tile( l_codec->m_codec, - p_tile_index, - p_data, - p_data_size, - l_stream, - &(l_codec->m_event_mgr) ); - } - - return OPJ_FALSE; -} - -/* ---------------------------------------------------------------------- */ - -void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec) -{ - if (p_codec) { - opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; - - if (l_codec->is_decompressor) { - l_codec->m_codec_data.m_decompression.opj_destroy(l_codec->m_codec); - } - else { - l_codec->m_codec_data.m_compression.opj_destroy(l_codec->m_codec); - } - - l_codec->m_codec = 00; - opj_free(l_codec); - } -} - -/* ---------------------------------------------------------------------- */ - -void OPJ_CALLCONV opj_dump_codec( opj_codec_t *p_codec, - OPJ_INT32 info_flag, - FILE* output_stream) -{ - if (p_codec) { - opj_codec_private_t* l_codec = (opj_codec_private_t*) p_codec; - - l_codec->opj_dump_codec(l_codec->m_codec, info_flag, output_stream); - return; - } - - fprintf(stderr, "[ERROR] Input parameter of the dump_codec function are incorrect.\n"); - return; -} - -opj_codestream_info_v2_t* OPJ_CALLCONV opj_get_cstr_info(opj_codec_t *p_codec) -{ - if (p_codec) { - opj_codec_private_t* l_codec = (opj_codec_private_t*) p_codec; - - return l_codec->opj_get_codec_info(l_codec->m_codec); - } - - return NULL; -} - -void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_v2_t **cstr_info) { - if (cstr_info) { - - if ((*cstr_info)->m_default_tile_info.tccp_info){ - opj_free((*cstr_info)->m_default_tile_info.tccp_info); - } - - if ((*cstr_info)->tile_info){ - /* FIXME not used for the moment*/ - } - - opj_free((*cstr_info)); - (*cstr_info) = NULL; - } -} - -opj_codestream_index_t * OPJ_CALLCONV opj_get_cstr_index(opj_codec_t *p_codec) -{ - if (p_codec) { - opj_codec_private_t* l_codec = (opj_codec_private_t*) p_codec; - - return l_codec->opj_get_codec_index(l_codec->m_codec); - } - - return NULL; -} - -void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index) -{ - if (*p_cstr_index){ - j2k_destroy_cstr_index(*p_cstr_index); - (*p_cstr_index) = NULL; - } -} - -opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream_v3 (const char *fname, OPJ_BOOL p_is_read_stream) -{ - return opj_stream_create_file_stream_v3(fname, OPJ_J2K_STREAM_CHUNK_SIZE, p_is_read_stream); -} - -opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream_v3 ( - const char *fname, - OPJ_SIZE_T p_size, - OPJ_BOOL p_is_read_stream) -{ - opj_stream_t* l_stream = 00; - FILE *p_file; - const char *mode; - - if (! fname) { - return NULL; - } - - if(p_is_read_stream) mode = "rb"; else mode = "wb"; - - p_file = fopen(fname, mode); - - if (! p_file) { - return NULL; - } - - l_stream = opj_stream_create(p_size,p_is_read_stream); - if (! l_stream) { - fclose(p_file); - return NULL; - } - - opj_stream_set_user_data(l_stream, p_file, (opj_stream_free_user_data_fn) fclose); - opj_stream_set_user_data_length(l_stream, opj_get_data_length_from_file(p_file)); - opj_stream_set_read_function(l_stream, (opj_stream_read_fn) opj_read_from_file); - opj_stream_set_write_function(l_stream, (opj_stream_write_fn) opj_write_from_file); - opj_stream_set_skip_function(l_stream, (opj_stream_skip_fn) opj_skip_from_file); - opj_stream_set_seek_function(l_stream, (opj_stream_seek_fn) opj_seek_from_file); - - return l_stream; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/openjpeg.h b/Dependencies/FreeImage/Source/LibOpenJPEG/openjpeg.h deleted file mode 100644 index 0d03b1f..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/openjpeg.h +++ /dev/null @@ -1,1475 +0,0 @@ - /* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2006-2007, Parvatha Elangovan - * Copyright (c) 2008, Jerome Fimes, Communications & Systemes - * Copyright (c) 2010-2011, Kaori Hagihara - * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef OPENJPEG_H -#define OPENJPEG_H - - -/* -========================================================== - Compiler directives -========================================================== -*/ - -/* -The inline keyword is supported by C99 but not by C90. -Most compilers implement their own version of this keyword ... -*/ -#ifndef INLINE - #if defined(_MSC_VER) - #define INLINE __forceinline - #elif defined(__GNUC__) - #define INLINE __inline__ - #elif defined(__MWERKS__) - #define INLINE inline - #else - /* add other compilers here ... */ - #define INLINE - #endif /* defined() */ -#endif /* INLINE */ - -/* deprecated attribute */ -#ifdef __GNUC__ - #define OPJ_DEPRECATED(func) func __attribute__ ((deprecated)) -#elif defined(_MSC_VER) - #define OPJ_DEPRECATED(func) __declspec(deprecated) func -#else - #pragma message("WARNING: You need to implement DEPRECATED for this compiler") - #define OPJ_DEPRECATED(func) func -#endif - -#if defined(OPJ_STATIC) || !defined(_WIN32) -#define OPJ_API -#define OPJ_LOCAL -#define OPJ_CALLCONV -#else -#define OPJ_CALLCONV __stdcall -/* -The following ifdef block is the standard way of creating macros which make exporting -from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS -symbol defined on the command line. this symbol should not be defined on any project -that uses this DLL. This way any other project whose source files include this file see -OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols -defined with this macro as being exported. -*/ -#if defined(OPJ_EXPORTS) || defined(DLL_EXPORT) -#define OPJ_API __declspec(dllexport) -#else -#define OPJ_API __declspec(dllimport) -#endif /* OPJ_EXPORTS */ -#endif /* !OPJ_STATIC || !_WIN32 */ - -typedef int OPJ_BOOL; -#define OPJ_TRUE 1 -#define OPJ_FALSE 0 - -typedef char OPJ_CHAR; -typedef float OPJ_FLOAT32; -typedef double OPJ_FLOAT64; -typedef unsigned char OPJ_BYTE; - -#include "opj_stdint.h" - -typedef int8_t OPJ_INT8; -typedef uint8_t OPJ_UINT8; -typedef int16_t OPJ_INT16; -typedef uint16_t OPJ_UINT16; -typedef int32_t OPJ_INT32; -typedef uint32_t OPJ_UINT32; -typedef int64_t OPJ_INT64; -typedef uint64_t OPJ_UINT64; - -typedef int64_t OPJ_OFF_T; /* 64-bit file offset type */ - -#include -typedef size_t OPJ_SIZE_T; - -/* Avoid compile-time warning because parameter is not used */ -#define OPJ_ARG_NOT_USED(x) (void)(x) - -/* -========================================================== - Useful constant definitions -========================================================== -*/ - -#define OPJ_PATH_LEN 4096 /**< Maximum allowed size for filenames */ - -#define OPJ_J2K_MAXRLVLS 33 /**< Number of maximum resolution level authorized */ -#define OPJ_J2K_MAXBANDS (3*OPJ_J2K_MAXRLVLS-2) /**< Number of maximum sub-band linked to number of resolution level */ - -#define OPJ_J2K_DEFAULT_NB_SEGS 10 -#define OPJ_J2K_STREAM_CHUNK_SIZE 0x100000 /** 1 mega by default */ -#define OPJ_J2K_DEFAULT_HEADER_SIZE 1000 -#define OPJ_J2K_MCC_DEFAULT_NB_RECORDS 10 -#define OPJ_J2K_MCT_DEFAULT_NB_RECORDS 10 - -/* UniPG>> */ /* NOT YET USED IN THE V2 VERSION OF OPENJPEG */ -#define JPWL_MAX_NO_TILESPECS 16 /**< Maximum number of tile parts expected by JPWL: increase at your will */ -#define JPWL_MAX_NO_PACKSPECS 16 /**< Maximum number of packet parts expected by JPWL: increase at your will */ -#define JPWL_MAX_NO_MARKERS 512 /**< Maximum number of JPWL markers: increase at your will */ -#define JPWL_PRIVATEINDEX_NAME "jpwl_index_privatefilename" /**< index file name used when JPWL is on */ -#define JPWL_EXPECTED_COMPONENTS 3 /**< Expect this number of components, so you'll find better the first EPB */ -#define JPWL_MAXIMUM_TILES 8192 /**< Expect this maximum number of tiles, to avoid some crashes */ -#define JPWL_MAXIMUM_HAMMING 2 /**< Expect this maximum number of bit errors in marker id's */ -#define JPWL_MAXIMUM_EPB_ROOM 65450 /**< Expect this maximum number of bytes for composition of EPBs */ -/* <> */ /* NOT YET USED IN THE V2 VERSION OF OPENJPEG */ - /**@name JPWL encoding parameters */ - /*@{*/ - /** enables writing of EPC in MH, thus activating JPWL */ - OPJ_BOOL jpwl_epc_on; - /** error protection method for MH (0,1,16,32,37-128) */ - int jpwl_hprot_MH; - /** tile number of header protection specification (>=0) */ - int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]; - /** error protection methods for TPHs (0,1,16,32,37-128) */ - int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS]; - /** tile number of packet protection specification (>=0) */ - int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]; - /** packet number of packet protection specification (>=0) */ - int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]; - /** error protection methods for packets (0,1,16,32,37-128) */ - int jpwl_pprot[JPWL_MAX_NO_PACKSPECS]; - /** enables writing of ESD, (0=no/1/2 bytes) */ - int jpwl_sens_size; - /** sensitivity addressing size (0=auto/2/4 bytes) */ - int jpwl_sens_addr; - /** sensitivity range (0-3) */ - int jpwl_sens_range; - /** sensitivity method for MH (-1=no,0-7) */ - int jpwl_sens_MH; - /** tile number of sensitivity specification (>=0) */ - int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]; - /** sensitivity methods for TPHs (-1=no,0-7) */ - int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]; - /*@}*/ -/* <> */ /* NOT YET USED IN THE V2 VERSION OF OPENJPEG */ - /**@name JPWL decoding parameters */ - /*@{*/ - /** activates the JPWL correction capabilities */ - OPJ_BOOL jpwl_correct; - /** expected number of components */ - int jpwl_exp_comps; - /** maximum number of tiles */ - int jpwl_max_tiles; - /*@}*/ -/* <> */ -/** - * Marker structure - * */ -typedef struct opj_marker_info { - /** marker type */ - unsigned short int type; - /** position in codestream */ - OPJ_OFF_T pos; - /** length, marker val included */ - int len; -} opj_marker_info_t; -/* <> */ - /** number of markers */ - int marknum; - /** list of markers */ - opj_marker_info_t *marker; - /** actual size of markers array */ - int maxmarknum; -/* <> */ /* NOT USED FOR THE MOMENT IN THE V2 VERSION */ - /** number of markers */ - OPJ_UINT32 marknum; - /** list of markers */ - opj_marker_info_t *marker; - /** actual size of markers array */ - OPJ_UINT32 maxmarknum; - /* <> */ /* NOT USED FOR THE MOMENT IN THE V2 VERSION */ - /** number of markers */ - OPJ_UINT32 marknum; - /** list of markers */ - opj_marker_info_t *marker; - /** actual size of markers array */ - OPJ_UINT32 maxmarknum; -/* < */ - -/* -========================================================== - Metadata from the JP2file -========================================================== -*/ - -/** - * Info structure of the JP2 file - * EXPERIMENTAL FOR THE MOMENT - */ -typedef struct opj_jp2_metadata { - /** */ - OPJ_INT32 not_used; - -} opj_jp2_metadata_t; - -/** - * Index structure of the JP2 file - * EXPERIMENTAL FOR THE MOMENT - */ -typedef struct opj_jp2_index { - /** */ - OPJ_INT32 not_used; - -} opj_jp2_index_t; - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* -========================================================== - openjpeg version -========================================================== -*/ - -/* Get the version of the openjpeg library*/ -OPJ_API const char * OPJ_CALLCONV opj_version(void); - -/* -========================================================== - image functions definitions -========================================================== -*/ - -/** - * Create an image - * - * @param numcmpts number of components - * @param cmptparms components parameters - * @param clrspc image color space - * @return returns a new image structure if successful, returns NULL otherwise - * */ -OPJ_API opj_image_t* OPJ_CALLCONV opj_image_create(OPJ_UINT32 numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc); - -/** - * Deallocate any resources associated with an image - * - * @param image image to be destroyed - */ -OPJ_API void OPJ_CALLCONV opj_image_destroy(opj_image_t *image); - -/** - * Creates an image without allocating memory for the image (used in the new version of the library). - * - * @param numcmpts the number of components - * @param cmptparms the components parameters - * @param clrspc the image color space - * - * @return a new image structure if successful, NULL otherwise. -*/ -OPJ_API opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc); - -/* -========================================================== - stream functions definitions -========================================================== -*/ - -/** - * Creates an abstract stream. This function does nothing except allocating memory and initializing the abstract stream. - * - * @param p_is_input if set to true then the stream will be an input stream, an output stream else. - * - * @return a stream object. -*/ -OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_default_create(OPJ_BOOL p_is_input); - -/** - * Creates an abstract stream. This function does nothing except allocating memory and initializing the abstract stream. - * - * @param p_buffer_size FIXME DOC - * @param p_is_input if set to true then the stream will be an input stream, an output stream else. - * - * @return a stream object. -*/ -OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size, OPJ_BOOL p_is_input); - -/** - * Destroys a stream created by opj_create_stream. This function does NOT close the abstract stream. If needed the user must - * close its own implementation of the stream. - * - * @param p_stream the stream to destroy. - */ -OPJ_API void OPJ_CALLCONV opj_stream_destroy(opj_stream_t* p_stream); - -/** - * Destroys a stream created by opj_create_stream. This function does NOT close the abstract stream. - * If needed the user must close its own implementation of the stream. - * - * @param p_stream the stream to destroy. - */ -OPJ_API void OPJ_CALLCONV opj_stream_destroy_v3(opj_stream_t* p_stream); - -/** - * Sets the given function to be used as a read function. - * @param p_stream the stream to modify - * @param p_function the function to use a read function. -*/ -OPJ_API void OPJ_CALLCONV opj_stream_set_read_function(opj_stream_t* p_stream, opj_stream_read_fn p_function); - -/** - * Sets the given function to be used as a write function. - * @param p_stream the stream to modify - * @param p_function the function to use a write function. -*/ -OPJ_API void OPJ_CALLCONV opj_stream_set_write_function(opj_stream_t* p_stream, opj_stream_write_fn p_function); - -/** - * Sets the given function to be used as a skip function. - * @param p_stream the stream to modify - * @param p_function the function to use a skip function. -*/ -OPJ_API void OPJ_CALLCONV opj_stream_set_skip_function(opj_stream_t* p_stream, opj_stream_skip_fn p_function); - -/** - * Sets the given function to be used as a seek function, the stream is then seekable. - * @param p_stream the stream to modify - * @param p_function the function to use a skip function. -*/ -OPJ_API void OPJ_CALLCONV opj_stream_set_seek_function(opj_stream_t* p_stream, opj_stream_seek_fn p_function); - -/** - * Sets the given data to be used as a user data for the stream. - * @param p_stream the stream to modify - * @param p_data the data to set. - * @param p_function the function to free p_data when opj_stream_destroy() is called. -*/ -OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function); - -/** - * Sets the length of the user data for the stream. - * - * @param p_stream the stream to modify - * @param data_length length of the user_data. -*/ -OPJ_API void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t* p_stream, OPJ_UINT64 data_length); - -/** - * Create a stream from a file identified with its filename with default parameters (helper function) - * @param fname the filename of the file to stream - * @param p_is_read_stream whether the stream is a read stream (true) or not (false) -*/ -OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream_v3 (const char *fname, OPJ_BOOL p_is_read_stream); - -/** Create a stream from a file identified with its filename with a specific buffer size - * @param fname the filename of the file to stream - * @param p_buffer_size size of the chunk used to stream - * @param p_is_read_stream whether the stream is a read stream (true) or not (false) -*/ -OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream_v3 (const char *fname, - OPJ_SIZE_T p_buffer_size, - OPJ_BOOL p_is_read_stream); - -/* -========================================================== - event manager functions definitions -========================================================== -*/ -/** - * Set the info handler use by openjpeg. - * @param p_codec the codec previously initialise - * @param p_callback the callback function which will be used - * @param p_user_data client object where will be returned the message -*/ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_info_handler(opj_codec_t * p_codec, - opj_msg_callback p_callback, - void * p_user_data); -/** - * Set the warning handler use by openjpeg. - * @param p_codec the codec previously initialise - * @param p_callback the callback function which will be used - * @param p_user_data client object where will be returned the message -*/ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_warning_handler(opj_codec_t * p_codec, - opj_msg_callback p_callback, - void * p_user_data); -/** - * Set the error handler use by openjpeg. - * @param p_codec the codec previously initialise - * @param p_callback the callback function which will be used - * @param p_user_data client object where will be returned the message -*/ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec, - opj_msg_callback p_callback, - void * p_user_data); - -/* -========================================================== - codec functions definitions -========================================================== -*/ - -/** - * Creates a J2K/JP2 decompression structure - * @param format Decoder to select - * - * @return Returns a handle to a decompressor if successful, returns NULL otherwise - * */ -OPJ_API opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format); - -/** - * Destroy a decompressor handle - * - * @param p_codec decompressor handle to destroy - */ -OPJ_API void OPJ_CALLCONV opj_destroy_codec(opj_codec_t * p_codec); - -/** - * Read after the codestream if necessary - * @param p_codec the JPEG2000 codec to read. - * @param p_stream the JPEG2000 stream. - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_end_decompress ( opj_codec_t *p_codec, - opj_stream_t *p_stream); - - -/** - * Set decoding parameters to default values - * @param parameters Decompression parameters - */ -OPJ_API void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters); - -/** - * Setup the decoder with decompression parameters provided by the user and with the message handler - * provided by the user. - * - * @param p_codec decompressor handler - * @param parameters decompression parameters - * - * @return true if the decoder is correctly set - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec, - opj_dparameters_t *parameters ); - -/** - * Decodes an image header. - * - * @param p_stream the jpeg2000 stream. - * @param p_codec the jpeg2000 codec to read. - * @param p_image the image structure initialized with the characteristics of encoded image. - * - * @return true if the main header of the codestream and the JP2 header is correctly read. - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_read_header ( opj_stream_t *p_stream, - opj_codec_t *p_codec, - opj_image_t **p_image); - -/** - * Sets the given area to be decoded. This function should be called right after opj_read_header and before any tile header reading. - * - * @param p_codec the jpeg2000 codec. - * @param p_image the decoded image previously setted by opj_read_header - * @param p_start_x the left position of the rectangle to decode (in image coordinates). - * @param p_end_x the right position of the rectangle to decode (in image coordinates). - * @param p_start_y the up position of the rectangle to decode (in image coordinates). - * @param p_end_y the bottom position of the rectangle to decode (in image coordinates). - * - * @return true if the area could be set. - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decode_area( opj_codec_t *p_codec, - opj_image_t* p_image, - OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, - OPJ_INT32 p_end_x, OPJ_INT32 p_end_y ); - -/** - * Decode an image from a JPEG-2000 codestream - * - * @param p_decompressor decompressor handle - * @param p_stream Input buffer stream - * @param p_image the decoded image - * @return true if success, otherwise false - * */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode( opj_codec_t *p_decompressor, - opj_stream_t *p_stream, - opj_image_t *p_image); - -/** - * Get the decoded tile from the codec - * - * @param p_codec the jpeg2000 codec. - * @param p_stream input streamm - * @param p_image output image - * @param tile_index index of the tile which will be decode - * - * @return true if success, otherwise false - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_get_decoded_tile( opj_codec_t *p_codec, - opj_stream_t *p_stream, - opj_image_t *p_image, - OPJ_UINT32 tile_index); - -/** - * Set the resolution factor of the decoded image - * @param p_codec the jpeg2000 codec. - * @param res_factor resolution factor to set - * - * @return true if success, otherwise false - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decoded_resolution_factor(opj_codec_t *p_codec, OPJ_UINT32 res_factor); - -/** - * Writes a tile with the given data. - * - * @param p_codec the jpeg2000 codec. - * @param p_tile_index the index of the tile to write. At the moment, the tiles must be written from 0 to n-1 in sequence. - * @param p_data pointer to the data to write. Data is arranged in sequence, data_comp0, then data_comp1, then ... NO INTERLEAVING should be set. - * @param p_data_size this value os used to make sure the data being written is correct. The size must be equal to the sum for each component of - * tile_width * tile_height * component_size. component_size can be 1,2 or 4 bytes, depending on the precision of the given component. - * @param p_stream the stream to write data to. - * - * @return true if the data could be written. - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_t *p_stream ); - -/** - * Reads a tile header. This function is compulsory and allows one to know the size of the tile thta will be decoded. - * The user may need to refer to the image got by opj_read_header to understand the size being taken by the tile. - * - * @param p_codec the jpeg2000 codec. - * @param p_tile_index pointer to a value that will hold the index of the tile being decoded, in case of success. - * @param p_data_size pointer to a value that will hold the maximum size of the decoded data, in case of success. In case - * of truncated codestreams, the actual number of bytes decoded may be lower. The computation of the size is the same - * as depicted in opj_write_tile. - * @param p_tile_x0 pointer to a value that will hold the x0 pos of the tile (in the image). - * @param p_tile_y0 pointer to a value that will hold the y0 pos of the tile (in the image). - * @param p_tile_x1 pointer to a value that will hold the x1 pos of the tile (in the image). - * @param p_tile_y1 pointer to a value that will hold the y1 pos of the tile (in the image). - * @param p_nb_comps pointer to a value that will hold the number of components in the tile. - * @param p_should_go_on pointer to a boolean that will hold the fact that the decoding should go on. In case the - * codestream is over at the time of the call, the value will be set to false. The user should then stop - * the decoding. - * @param p_stream the stream to decode. - * @return true if the tile header could be decoded. In case the decoding should end, the returned value is still true. - * returning false may be the result of a shortage of memory or an internal error. - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_read_tile_header( opj_codec_t *p_codec, - opj_stream_t * p_stream, - OPJ_UINT32 * p_tile_index, - OPJ_UINT32 * p_data_size, - OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0, - OPJ_INT32 * p_tile_x1, OPJ_INT32 * p_tile_y1, - OPJ_UINT32 * p_nb_comps, - OPJ_BOOL * p_should_go_on ); - -/** - * Reads a tile data. This function is compulsory and allows one to decode tile data. opj_read_tile_header should be called before. - * The user may need to refer to the image got by opj_read_header to understand the size being taken by the tile. - * - * @param p_codec the jpeg2000 codec. - * @param p_tile_index the index of the tile being decoded, this should be the value set by opj_read_tile_header. - * @param p_data pointer to a memory block that will hold the decoded data. - * @param p_data_size size of p_data. p_data_size should be bigger or equal to the value set by opj_read_tile_header. - * @param p_stream the stream to decode. - * - * @return true if the data could be decoded. - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data( opj_codec_t *p_codec, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - opj_stream_t *p_stream ); - -/* COMPRESSION FUNCTIONS*/ - -/** - * Creates a J2K/JP2 compression structure - * @param format Coder to select - * @return Returns a handle to a compressor if successful, returns NULL otherwise - */ -OPJ_API opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format); - -/** -Set encoding parameters to default values, that means : -
    -
  • Lossless -
  • 1 tile -
  • Size of precinct : 2^15 x 2^15 (means 1 precinct) -
  • Size of code-block : 64 x 64 -
  • Number of resolutions: 6 -
  • No SOP marker in the codestream -
  • No EPH marker in the codestream -
  • No sub-sampling in x or y direction -
  • No mode switch activated -
  • Progression order: LRCP -
  • No index file -
  • No ROI upshifted -
  • No offset of the origin of the image -
  • No offset of the origin of the tiles -
  • Reversible DWT 5-3 -
-@param parameters Compression parameters -*/ -OPJ_API void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *parameters); - -/** - * Setup the encoder parameters using the current image and using user parameters. - * @param p_codec Compressor handle - * @param parameters Compression parameters - * @param image Input filled image - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec, - opj_cparameters_t *parameters, - opj_image_t *image); - -/** - * Start to compress the current image. - * @param p_codec Compressor handle - * @param image Input filled image - * @param p_stream Input stgream - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_start_compress ( opj_codec_t *p_codec, - opj_image_t * p_image, - opj_stream_t *p_stream); - -/** - * End to compress the current image. - * @param p_codec Compressor handle - * @param p_stream Input stgream - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_end_compress (opj_codec_t *p_codec, - opj_stream_t *p_stream); - -/** - * Encode an image into a JPEG-2000 codestream - * @param p_codec compressor handle - * @param p_stream Output buffer stream - * - * @return Returns true if successful, returns false otherwise - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_encode(opj_codec_t *p_codec, - opj_stream_t *p_stream); -/* -========================================================== - codec output functions definitions -========================================================== -*/ -/* EXPERIMENTAL FUNCTIONS FOR NOW, USED ONLY IN J2K_DUMP*/ - -/** -Destroy Codestream information after compression or decompression -@param cstr_info Codestream information structure -*/ -OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_v2_t **cstr_info); - - -/** - * Dump the codec information into the output stream - * - * @param p_codec the jpeg2000 codec. - * @param info_flag type of information dump. - * @param output_stream output stream where dump the informations get from the codec. - * - */ -OPJ_API void OPJ_CALLCONV opj_dump_codec( opj_codec_t *p_codec, - OPJ_INT32 info_flag, - FILE* output_stream); - -/** - * Get the codestream information from the codec - * - * @param p_codec the jpeg2000 codec. - * - * @return a pointer to a codestream information structure. - * - */ -OPJ_API opj_codestream_info_v2_t* OPJ_CALLCONV opj_get_cstr_info(opj_codec_t *p_codec); - -/** - * Get the codestream index from the codec - * - * @param p_codec the jpeg2000 codec. - * - * @return a pointer to a codestream index structure. - * - */ -OPJ_API opj_codestream_index_t * OPJ_CALLCONV opj_get_cstr_index(opj_codec_t *p_codec); - -OPJ_API void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index); - - -/** - * Get the JP2 file information from the codec FIXME - * - * @param p_codec the jpeg2000 codec. - * - * @return a pointer to a JP2 metadata structure. - * - */ -OPJ_API opj_jp2_metadata_t* OPJ_CALLCONV opj_get_jp2_metadata(opj_codec_t *p_codec); - -/** - * Get the JP2 file index from the codec FIXME - * - * @param p_codec the jpeg2000 codec. - * - * @return a pointer to a JP2 index structure. - * - */ -OPJ_API opj_jp2_index_t* OPJ_CALLCONV opj_get_jp2_index(opj_codec_t *p_codec); - - -/* -========================================================== - MCT functions -========================================================== -*/ - -/** - * Sets the MCT matrix to use. - * - * @param parameters the parameters to change. - * @param pEncodingMatrix the encoding matrix. - * @param p_dc_shift the dc shift coefficients to use. - * @param pNbComp the number of components of the image. - * - * @return true if the parameters could be set. - */ -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_MCT( opj_cparameters_t *parameters, - OPJ_FLOAT32 * pEncodingMatrix, - OPJ_INT32 * p_dc_shift, - OPJ_UINT32 pNbComp); - - - -#ifdef __cplusplus -} -#endif - -#endif /* OPENJPEG_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_clock.c b/Dependencies/FreeImage/Source/LibOpenJPEG/opj_clock.c deleted file mode 100644 index 5f2ab9d..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_clock.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2005, Herve Drolon, FreeImage 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef _WIN32 -#include -#else -#include -#include -#include -#endif /* _WIN32 */ -#include "opj_includes.h" - -OPJ_FLOAT64 opj_clock(void) { -#ifdef _WIN32 - /* _WIN32: use QueryPerformance (very accurate) */ - LARGE_INTEGER freq , t ; - /* freq is the clock speed of the CPU */ - QueryPerformanceFrequency(&freq) ; - /* cout << "freq = " << ((double) freq.QuadPart) << endl; */ - /* t is the high resolution performance counter (see MSDN) */ - QueryPerformanceCounter ( & t ) ; - return ( t.QuadPart /(OPJ_FLOAT64) freq.QuadPart ) ; -#else - /* Unix or Linux: use resource usage */ - struct rusage t; - OPJ_FLOAT64 procTime; - /* (1) Get the rusage data structure at this moment (man getrusage) */ - getrusage(0,&t); - /* (2) What is the elapsed time ? - CPU time = User time + System time */ - /* (2a) Get the seconds */ - procTime = (OPJ_FLOAT64)(t.ru_utime.tv_sec + t.ru_stime.tv_sec); - /* (2b) More precisely! Get the microseconds part ! */ - return ( procTime + (OPJ_FLOAT64)(t.ru_utime.tv_usec + t.ru_stime.tv_usec) * 1e-6 ) ; -#endif -} - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_clock.h b/Dependencies/FreeImage/Source/LibOpenJPEG/opj_clock.h deleted file mode 100644 index d3fcec3..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_clock.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2005, Herve Drolon, FreeImage 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef __OPJ_CLOCK_H -#define __OPJ_CLOCK_H -/** -@file opj_clock.h -@brief Internal function for timing - -The functions in OPJ_CLOCK.C are internal utilities mainly used for timing. -*/ - -/** @defgroup MISC MISC - Miscellaneous internal functions */ -/*@{*/ - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ - -/** -Difference in successive opj_clock() calls tells you the elapsed time -@return Returns time in seconds -*/ -OPJ_FLOAT64 opj_clock(void); - -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __OPJ_CLOCK_H */ - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_codec.h b/Dependencies/FreeImage/Source/LibOpenJPEG/opj_codec.h deleted file mode 100644 index 6ac0f28..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_codec.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef __OPJ_CODEC_H -#define __OPJ_CODEC_H -/** -@file opj_codec.h -*/ - - -/** - * Main codec handler used for compression or decompression. - */ -typedef struct opj_codec_private -{ - /** FIXME DOC */ - union - { - /** - * Decompression handler. - */ - struct opj_decompression - { - /** Main header reading function handler */ - OPJ_BOOL (*opj_read_header) ( struct opj_stream_private * cio, - void * p_codec, - opj_image_t **p_image, - struct opj_event_mgr * p_manager); - - /** Decoding function */ - OPJ_BOOL (*opj_decode) ( void * p_codec, - struct opj_stream_private * p_cio, - opj_image_t * p_image, - struct opj_event_mgr * p_manager); - - /** FIXME DOC */ - OPJ_BOOL (*opj_read_tile_header)( void * p_codec, - OPJ_UINT32 * p_tile_index, - OPJ_UINT32 * p_data_size, - OPJ_INT32 * p_tile_x0, - OPJ_INT32 * p_tile_y0, - OPJ_INT32 * p_tile_x1, - OPJ_INT32 * p_tile_y1, - OPJ_UINT32 * p_nb_comps, - OPJ_BOOL * p_should_go_on, - struct opj_stream_private * p_cio, - struct opj_event_mgr * p_manager); - - /** FIXME DOC */ - OPJ_BOOL (*opj_decode_tile_data)( void * p_codec, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - struct opj_stream_private * p_cio, - struct opj_event_mgr * p_manager); - - /** Reading function used after codestream if necessary */ - OPJ_BOOL (* opj_end_decompress) ( void *p_codec, - struct opj_stream_private * cio, - struct opj_event_mgr * p_manager); - - /** Codec destroy function handler */ - void (*opj_destroy) (void * p_codec); - - /** Setup decoder function handler */ - void (*opj_setup_decoder) ( void * p_codec, opj_dparameters_t * p_param); - - /** Set decode area function handler */ - OPJ_BOOL (*opj_set_decode_area) ( void * p_codec, - opj_image_t * p_image, - OPJ_INT32 p_start_x, - OPJ_INT32 p_end_x, - OPJ_INT32 p_start_y, - OPJ_INT32 p_end_y, - struct opj_event_mgr * p_manager); - - /** Get tile function */ - OPJ_BOOL (*opj_get_decoded_tile) ( void *p_codec, - opj_stream_private_t * p_cio, - opj_image_t *p_image, - struct opj_event_mgr * p_manager, - OPJ_UINT32 tile_index); - - /** Set the decoded resolution factor */ - OPJ_BOOL (*opj_set_decoded_resolution_factor) ( void * p_codec, - OPJ_UINT32 res_factor, - opj_event_mgr_t * p_manager); - } m_decompression; - - /** - * Compression handler. FIXME DOC - */ - struct opj_compression - { - OPJ_BOOL (* opj_start_compress) ( void *p_codec, - struct opj_stream_private * cio, - struct opj_image * p_image, - struct opj_event_mgr * p_manager); - - OPJ_BOOL (* opj_encode) ( void * p_codec, - struct opj_stream_private *p_cio, - struct opj_event_mgr * p_manager); - - OPJ_BOOL (* opj_write_tile) ( void * p_codec, - OPJ_UINT32 p_tile_index, - OPJ_BYTE * p_data, - OPJ_UINT32 p_data_size, - struct opj_stream_private * p_cio, - struct opj_event_mgr * p_manager); - - OPJ_BOOL (* opj_end_compress) ( void * p_codec, - struct opj_stream_private * p_cio, - struct opj_event_mgr * p_manager); - - void (* opj_destroy) (void * p_codec); - - void (* opj_setup_encoder) ( void * p_codec, - opj_cparameters_t * p_param, - struct opj_image * p_image, - struct opj_event_mgr * p_manager); - } m_compression; - } m_codec_data; - /** FIXME DOC*/ - void * m_codec; - /** Event handler */ - opj_event_mgr_t m_event_mgr; - /** Flag to indicate if the codec is used to decode or encode*/ - OPJ_BOOL is_decompressor; - void (*opj_dump_codec) (void * p_codec, OPJ_INT32 info_flag, FILE* output_stream); - opj_codestream_info_v2_t* (*opj_get_codec_info)(void* p_codec); - opj_codestream_index_t* (*opj_get_codec_index)(void* p_codec); -} -opj_codec_private_t; - - -#endif /* __OPJ_CODEC_H */ - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_config.h b/Dependencies/FreeImage/Source/LibOpenJPEG/opj_config.h deleted file mode 100644 index 216e1cf..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_config.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef OPJ_CONFIG_H -#define OPJ_CONFIG_H - -#ifndef _MSC_VER -#define OPJ_HAVE_STDINT_H -#define OPJ_HAVE_INTTYPES_H -#endif - -#endif /* OPJ_CONFIG_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_config_private.h b/Dependencies/FreeImage/Source/LibOpenJPEG/opj_config_private.h deleted file mode 100644 index a4a6f2f..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_config_private.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef OPJ_CONFIG_PRIVATE_H -#define OPJ_CONFIG_PRIVATE_H - -#define OPJ_PACKAGE_VERSION "2.0.0" - -/** -Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined -If your big endian system isn't being detected, add an OS specific check -*/ -#if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || \ - (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || \ - defined(__BIG_ENDIAN__) -#define OPJ_BIG_ENDIAN -#endif /* BYTE_ORDER */ - -#endif /* OPJ_CONFIG_PRIVATE_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_includes.h b/Dependencies/FreeImage/Source/LibOpenJPEG/opj_includes.h deleted file mode 100644 index 80ae84c..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_includes.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef OPJ_INCLUDES_H -#define OPJ_INCLUDES_H - -/* - * This must be included before any system headers, - * since they can react to macro defined there - */ -#include "opj_config_private.h" - -/* - ========================================================== - Standard includes used by the library - ========================================================== -*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - Use fseeko() and ftello() if they are available since they use - 'off_t' rather than 'long'. It is wrong to use fseeko() and - ftello() only on systems with special LFS support since some systems - (e.g. FreeBSD) support a 64-bit off_t by default. -*/ -#if defined(OPJ_HAVE_FSEEKO) && !defined(fseek) -# define fseek fseeko -# define ftell ftello -#endif - - -#if defined(WIN32) && !defined(Windows95) && !defined(__BORLANDC__) && \ - !(defined(_MSC_VER) && _MSC_VER < 1400) && \ - !(defined(__MINGW32__) && __MSVCRT_VERSION__ < 0x800) - /* - Windows '95 and Borland C do not support _lseeki64 - Visual Studio does not support _fseeki64 and _ftelli64 until the 2005 release. - Without these interfaces, files over 2GB in size are not supported for Windows. - */ -# define OPJ_FSEEK(stream,offset,whence) _fseeki64(stream,/* __int64 */ offset,whence) -# define OPJ_FSTAT(fildes,stat_buff) _fstati64(fildes,/* struct _stati64 */ stat_buff) -# define OPJ_FTELL(stream) /* __int64 */ _ftelli64(stream) -# define OPJ_STAT_STRUCT_T struct _stati64 -# define OPJ_STAT(path,stat_buff) _stati64(path,/* struct _stati64 */ stat_buff) -#else -# define OPJ_FSEEK(stream,offset,whence) fseek(stream,offset,whence) -# define OPJ_FSTAT(fildes,stat_buff) fstat(fildes,stat_buff) -# define OPJ_FTELL(stream) ftell(stream) -# define OPJ_STAT_STRUCT_T struct stat -# define OPJ_STAT(path,stat_buff) stat(path,stat_buff) -#endif - - -/* - ========================================================== - OpenJPEG interface - ========================================================== - */ -#include "openjpeg.h" - -/* - ========================================================== - OpenJPEG modules - ========================================================== -*/ - -/* Ignore GCC attributes if this is not GCC */ -#ifndef __GNUC__ - #define __attribute__(x) /* __attribute__(x) */ -#endif - - -/* Are restricted pointers available? (C99) */ -#if (__STDC_VERSION__ != 199901L) - /* Not a C99 compiler */ - #ifdef __GNUC__ - #define restrict __restrict__ - #else - #define restrict /* restrict */ - #endif -#endif - -/* MSVC before 2013 and Borland C do not have lrintf */ -#if defined(_MSC_VER) && (_MSC_VER < 1800) || defined(__BORLANDC__) -static INLINE long lrintf(float f){ -#ifdef _M_X64 - return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f)); -#else - int i; - - _asm{ - fld f - fistp i - }; - - return i; -#endif -} -#endif - -#include "opj_inttypes.h" -#include "opj_clock.h" -#include "opj_malloc.h" -#include "function_list.h" -#include "event.h" -#include "bio.h" -#include "cio.h" - -#include "image.h" -#include "invert.h" -#include "j2k.h" -#include "jp2.h" - -#include "mqc.h" -#include "raw.h" -#include "bio.h" - -#include "pi.h" -#include "tgt.h" -#include "tcd.h" -#include "t1.h" -#include "dwt.h" -#include "t2.h" -#include "mct.h" -#include "opj_intmath.h" - -#ifdef USE_JPIP -#include "cidx_manager.h" -#include "indexbox_manager.h" -#endif - -/* JPWL>> */ -#ifdef USE_JPWL -#include "openjpwl/jpwl.h" -#endif /* USE_JPWL */ -/* < b else b -*/ -static INLINE OPJ_INT32 opj_int_max(OPJ_INT32 a, OPJ_INT32 b) { - return (a > b) ? a : b; -} - -/** -Get the maximum of two integers -@return Returns a if a > b else b -*/ -static INLINE OPJ_UINT32 opj_uint_max(OPJ_UINT32 a, OPJ_UINT32 b) { - return (a > b) ? a : b; -} - -/** -Clamp an integer inside an interval -@return -
    -
  • Returns a if (min < a < max) -
  • Returns max if (a > max) -
  • Returns min if (a < min) -
-*/ -static INLINE OPJ_INT32 opj_int_clamp(OPJ_INT32 a, OPJ_INT32 min, OPJ_INT32 max) { - if (a < min) - return min; - if (a > max) - return max; - return a; -} -/** -@return Get absolute value of integer -*/ -static INLINE OPJ_INT32 opj_int_abs(OPJ_INT32 a) { - return a < 0 ? -a : a; -} -/** -Divide an integer and round upwards -@return Returns a divided by b -*/ -static INLINE OPJ_INT32 opj_int_ceildiv(OPJ_INT32 a, OPJ_INT32 b) { - assert(b); - return (a + b - 1) / b; -} - -/** -Divide an integer and round upwards -@return Returns a divided by b -*/ -static INLINE OPJ_UINT32 opj_uint_ceildiv(OPJ_UINT32 a, OPJ_UINT32 b) { - return (a + b - 1) / b; -} - -/** -Divide an integer by a power of 2 and round upwards -@return Returns a divided by 2^b -*/ -static INLINE OPJ_INT32 opj_int_ceildivpow2(OPJ_INT32 a, OPJ_INT32 b) { - return (OPJ_INT32)((a + (OPJ_INT64)(1 << b) - 1) >> b); -} -/** -Divide an integer by a power of 2 and round downwards -@return Returns a divided by 2^b -*/ -static INLINE OPJ_INT32 opj_int_floordivpow2(OPJ_INT32 a, OPJ_INT32 b) { - return a >> b; -} -/** -Get logarithm of an integer and round downwards -@return Returns log2(a) -*/ -static INLINE OPJ_INT32 opj_int_floorlog2(OPJ_INT32 a) { - OPJ_INT32 l; - for (l = 0; a > 1; l++) { - a >>= 1; - } - return l; -} -/** -Get logarithm of an integer and round downwards -@return Returns log2(a) -*/ -static INLINE OPJ_UINT32 opj_uint_floorlog2(OPJ_UINT32 a) { - OPJ_UINT32 l; - for (l = 0; a > 1; ++l) - { - a >>= 1; - } - return l; -} - -/** -Multiply two fixed-precision rational numbers. -@param a -@param b -@return Returns a * b -*/ -static INLINE OPJ_INT32 opj_int_fix_mul(OPJ_INT32 a, OPJ_INT32 b) { - OPJ_INT64 temp = (OPJ_INT64) a * (OPJ_INT64) b ; - temp += temp & 4096; - return (OPJ_INT32) (temp >> 13) ; -} - -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_inttypes.h b/Dependencies/FreeImage/Source/LibOpenJPEG/opj_inttypes.h deleted file mode 100644 index 6121513..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_inttypes.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012, Mathieu Malaterre - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef OPJ_INTTYPES_H -#define OPJ_INTTYPES_H - -#include "opj_config_private.h" -#ifdef OPJ_HAVE_INTTYPES_H -#include -#else -#if defined(_WIN32) -#define PRId64 "I64d" -#define PRIi64 "I64i" -#define PRIu64 "I64u" -#define PRIx64 "I64x" -#else -#error unsupported platform -#endif -#endif - -#endif /* OPJ_INTTYPES_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_malloc.h b/Dependencies/FreeImage/Source/LibOpenJPEG/opj_malloc.h deleted file mode 100644 index 95ad147..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_malloc.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2007, Callum Lerwick - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef __OPJ_MALLOC_H -#define __OPJ_MALLOC_H -/** -@file opj_malloc.h -@brief Internal functions - -The functions in opj_malloc.h are internal utilities used for memory management. -*/ - -/** @defgroup MISC MISC - Miscellaneous internal functions */ -/*@{*/ - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ - -/** -Allocate an uninitialized memory block -@param size Bytes to allocate -@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available -*/ -#ifdef ALLOC_PERF_OPT -void * OPJ_CALLCONV opj_malloc(size_t size); -#else -/* prevent assertion on overflow for MSVC */ -#ifdef _MSC_VER -#define opj_malloc(size) ((size_t)(size) >= (size_t)-0x100 ? NULL : malloc(size)) -#else -#define opj_malloc(size) malloc(size) -#endif -#endif - -/** -Allocate a memory block with elements initialized to 0 -@param num Blocks to allocate -@param size Bytes per block to allocate -@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available -*/ -#ifdef ALLOC_PERF_OPT -void * OPJ_CALLCONV opj_calloc(size_t _NumOfElements, size_t _SizeOfElements); -#else -/* prevent assertion on overflow for MSVC */ -#ifdef _MSC_VER -#define opj_calloc(num, size) ((size_t)(num) != 0 && (size_t)(num) >= (size_t)-0x100 / (size_t)(size) ? NULL : calloc(num, size)) -#else -#define opj_calloc(num, size) calloc(num, size) -#endif -#endif - -/** -Allocate memory aligned to a 16 byte boundry -@param size Bytes to allocate -@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available -*/ -/* FIXME: These should be set with cmake tests, but we're currently not requiring use of cmake */ -#ifdef _WIN32 - /* Someone should tell the mingw people that their malloc.h ought to provide _mm_malloc() */ - #ifdef __GNUC__ - #include - #define HAVE_MM_MALLOC - #else /* MSVC, Intel C++ */ - #include - #ifdef _mm_malloc - #define HAVE_MM_MALLOC - #endif - #endif -#else /* Not _WIN32 */ - #if defined(__sun) - #define HAVE_MEMALIGN - #elif defined(__FreeBSD__) - #define HAVE_POSIX_MEMALIGN - /* Linux x86_64 and OSX always align allocations to 16 bytes */ - #elif !defined(__amd64__) && !defined(__APPLE__) && !defined(_AIX) - #define HAVE_MEMALIGN - #include - #endif -#endif - -#define opj_aligned_malloc(size) malloc(size) -#define opj_aligned_free(m) free(m) - -#ifdef HAVE_MM_MALLOC - #undef opj_aligned_malloc - #define opj_aligned_malloc(size) _mm_malloc(size, 16) - #undef opj_aligned_free - #define opj_aligned_free(m) _mm_free(m) -#endif - -#ifdef HAVE_MEMALIGN - extern void* memalign(size_t, size_t); - #undef opj_aligned_malloc - #define opj_aligned_malloc(size) memalign(16, (size)) - #undef opj_aligned_free - #define opj_aligned_free(m) free(m) -#endif - -#ifdef HAVE_POSIX_MEMALIGN - #undef opj_aligned_malloc - extern int posix_memalign(void**, size_t, size_t); - - static INLINE void* __attribute__ ((malloc)) opj_aligned_malloc(size_t size){ - void* mem = NULL; - posix_memalign(&mem, 16, size); - return mem; - } - #undef opj_aligned_free - #define opj_aligned_free(m) free(m) -#endif - -#ifdef ALLOC_PERF_OPT - #undef opj_aligned_malloc - #define opj_aligned_malloc(size) opj_malloc(size) - #undef opj_aligned_free - #define opj_aligned_free(m) opj_free(m) -#endif - -/** -Reallocate memory blocks. -@param m Pointer to previously allocated memory block -@param s New size in bytes -@return Returns a void pointer to the reallocated (and possibly moved) memory block -*/ -#ifdef ALLOC_PERF_OPT -void * OPJ_CALLCONV opj_realloc(void * m, size_t s); -#else -/* prevent assertion on overflow for MSVC */ -#ifdef _MSC_VER -#define opj_realloc(m, s) ((size_t)(s) >= (size_t)-0x100 ? NULL : realloc(m, s)) -#else -#define opj_realloc(m, s) realloc(m, s) -#endif -#endif - -/** -Deallocates or frees a memory block. -@param m Previously allocated memory block to be freed -*/ -#ifdef ALLOC_PERF_OPT -void OPJ_CALLCONV opj_free(void * m); -#else -#define opj_free(m) free(m) -#endif - -#ifdef __GNUC__ -#pragma GCC poison malloc calloc realloc free -#endif - -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __OPJ_MALLOC_H */ - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_stdint.h b/Dependencies/FreeImage/Source/LibOpenJPEG/opj_stdint.h deleted file mode 100644 index 2d12180..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/opj_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2012, Mathieu Malaterre - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef OPJ_STDINT_H -#define OPJ_STDINT_H - -#include "opj_config.h" -#ifdef OPJ_HAVE_STDINT_H -#include -#else -#if defined(_WIN32) -typedef signed __int8 int8_t; -typedef unsigned __int8 uint8_t; -typedef signed __int16 int16_t; -typedef unsigned __int16 uint16_t; -typedef signed __int32 int32_t; -typedef unsigned __int32 uint32_t; -typedef signed __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -#error unsupported platform -#endif -#endif - -#endif /* OPJ_STDINT_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/phix_manager.c b/Dependencies/FreeImage/Source/LibOpenJPEG/phix_manager.c deleted file mode 100644 index 5063a3c..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/phix_manager.c +++ /dev/null @@ -1,191 +0,0 @@ -/* - * $Id: phix_manager.c,v 1.4 2014/03/16 12:29:52 drolon Exp $ - * - * Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2011, Professor Benoit Macq - * Copyright (c) 2003-2004, Yannick Verschueren - * Copyright (c) 2010-2011, Kaori Hagihara - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/*! \file - * \brief Modification of jpip.c from 2KAN indexer - */ - -#include "opj_includes.h" - - -/* - * Write faix box of phix - * - * @param[in] coff offset of j2k codestream - * @param[in] compno component number - * @param[in] cstr_info codestream information - * @param[in] EPHused true if if EPH option used - * @param[in] j2klen length of j2k codestream - * @param[in] cio file output handle - * @return length of faix box - */ - -int opj_write_phix( int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_BYTE l_data_header [8]; - OPJ_UINT32 len, compno, i; - opj_jp2_box_t *box; - OPJ_OFF_T lenp = 0; - - box = (opj_jp2_box_t *)opj_calloc( (size_t)cstr_info.numcomps, sizeof(opj_jp2_box_t)); - - for( i=0;i<2;i++){ - if (i) - opj_stream_seek( cio, lenp, p_manager); - - lenp = opj_stream_tell(cio); - opj_stream_skip(cio, 4, p_manager); /* L [at the end] */ - opj_write_bytes(l_data_header,JPIP_PHIX,4); /* PHIX */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - - opj_write_manf( (int)i, cstr_info.numcomps, box, cio, p_manager ); - - for( compno=0; compno<(OPJ_UINT32)cstr_info.numcomps; compno++){ - box[compno].length = (OPJ_UINT32)opj_write_phixfaix( coff, (int)compno, cstr_info, EPHused, j2klen, cio,p_manager); - box[compno].type = JPIP_FAIX; - } - - len = (OPJ_UINT32)(opj_stream_tell(cio)-lenp); - opj_stream_seek(cio, 4, p_manager); - opj_write_bytes(l_data_header,len,4);/* L */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_stream_seek( cio, lenp+len,p_manager); - } - - opj_free(box); - - return (int)len; -} - - -int opj_write_phixfaix( int coff, int compno, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_UINT32 tileno, version, i, nmax, size_of_coding; /* 4 or 8 */ - opj_tile_info_t *tile_Idx; - opj_packet_info_t packet; - int resno, precno, layno; - OPJ_UINT32 num_packet; - int numOfres, numOfprec, numOflayers; - OPJ_BYTE l_data_header [8]; - OPJ_OFF_T lenp; - OPJ_UINT32 len; - - packet.end_ph_pos = packet.start_pos = -1; - (void)EPHused; /* unused ? */ - - - if( j2klen > pow( 2, 32)){ - size_of_coding = 8; - version = 1; - } - else{ - size_of_coding = 4; - version = 0; - } - - lenp = opj_stream_tell(cio); - opj_stream_skip(cio, 4, p_manager); /* L [at the end] */ - opj_write_bytes(l_data_header,JPIP_FAIX,4); /* FAIX */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_write_bytes(l_data_header,version,1); /* Version 0 = 4 bytes */ - opj_stream_write_data(cio,l_data_header,1,p_manager); - - nmax = 0; - for( i=0; i<=(OPJ_UINT32)cstr_info.numdecompos[compno]; i++) - nmax += (OPJ_UINT32)(cstr_info.tile[0].ph[i] * cstr_info.tile[0].pw[i] * cstr_info.numlayers); - - opj_write_bytes(l_data_header,nmax,size_of_coding); /* NMAX */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - opj_write_bytes(l_data_header,(OPJ_UINT32)(cstr_info.tw*cstr_info.th),size_of_coding); /* M */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - - for( tileno=0; tileno<(OPJ_UINT32)(cstr_info.tw*cstr_info.th); tileno++){ - tile_Idx = &cstr_info.tile[ tileno]; - - num_packet = 0; - numOfres = cstr_info.numdecompos[compno] + 1; - - for( resno=0; resnopw[resno]*tile_Idx->ph[resno]; - for( precno=0; precnopacket[ ((layno*numOfres+resno)*cstr_info.numcomps+compno)*numOfprec+precno]; - break; - case OPJ_RLCP: - packet = tile_Idx->packet[ ((resno*numOflayers+layno)*cstr_info.numcomps+compno)*numOfprec+precno]; - break; - case OPJ_RPCL: - packet = tile_Idx->packet[ ((resno*numOfprec+precno)*cstr_info.numcomps+compno)*numOflayers+layno]; - break; - case OPJ_PCRL: - packet = tile_Idx->packet[ ((precno*cstr_info.numcomps+compno)*numOfres+resno)*numOflayers + layno]; - break; - case OPJ_CPRL: - packet = tile_Idx->packet[ ((compno*numOfprec+precno)*numOfres+resno)*numOflayers + layno]; - break; - default: - fprintf( stderr, "failed to ppix indexing\n"); - } - - opj_write_bytes(l_data_header,(OPJ_UINT32)(packet.start_pos-coff),size_of_coding); /* start position */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - opj_write_bytes(l_data_header,(OPJ_UINT32)(packet.end_ph_pos-packet.start_pos+1),size_of_coding); /* length */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - - num_packet++; - } - } - } - - /* PADDING */ - while( num_packet < nmax){ - opj_write_bytes(l_data_header,0,size_of_coding);/* start position */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - opj_write_bytes(l_data_header,0,size_of_coding);/* length */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - num_packet++; - } - } - - len = (OPJ_UINT32)(opj_stream_tell(cio)-lenp); - opj_stream_seek(cio, lenp,p_manager); - opj_write_bytes(l_data_header,len,4);/* L */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_stream_seek(cio, lenp+len,p_manager); - - return (int)len; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/pi.c b/Dependencies/FreeImage/Source/LibOpenJPEG/pi.c deleted file mode 100644 index 2606051..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/pi.c +++ /dev/null @@ -1,1870 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2006-2007, Parvatha Elangovan - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -/** @defgroup PI PI - Implementation of a packet iterator */ -/*@{*/ - -/** @name Local static functions */ -/*@{*/ - -/** -Get next packet in layer-resolution-component-precinct order. -@param pi packet iterator to modify -@return returns false if pi pointed to the last packet or else returns true -*/ -static OPJ_BOOL opj_pi_next_lrcp(opj_pi_iterator_t * pi); -/** -Get next packet in resolution-layer-component-precinct order. -@param pi packet iterator to modify -@return returns false if pi pointed to the last packet or else returns true -*/ -static OPJ_BOOL opj_pi_next_rlcp(opj_pi_iterator_t * pi); -/** -Get next packet in resolution-precinct-component-layer order. -@param pi packet iterator to modify -@return returns false if pi pointed to the last packet or else returns true -*/ -static OPJ_BOOL opj_pi_next_rpcl(opj_pi_iterator_t * pi); -/** -Get next packet in precinct-component-resolution-layer order. -@param pi packet iterator to modify -@return returns false if pi pointed to the last packet or else returns true -*/ -static OPJ_BOOL opj_pi_next_pcrl(opj_pi_iterator_t * pi); -/** -Get next packet in component-precinct-resolution-layer order. -@param pi packet iterator to modify -@return returns false if pi pointed to the last packet or else returns true -*/ -static OPJ_BOOL opj_pi_next_cprl(opj_pi_iterator_t * pi); - -/** - * Updates the coding parameters if the encoding is used with Progression order changes and final (or cinema parameters are used). - * - * @param p_cp the coding parameters to modify - * @param p_tileno the tile index being concerned. - * @param p_tx0 X0 parameter for the tile - * @param p_tx1 X1 parameter for the tile - * @param p_ty0 Y0 parameter for the tile - * @param p_ty1 Y1 parameter for the tile - * @param p_max_prec the maximum precision for all the bands of the tile - * @param p_max_res the maximum number of resolutions for all the poc inside the tile. - * @param p_dx_min the minimum dx of all the components of all the resolutions for the tile. - * @param p_dy_min the minimum dy of all the components of all the resolutions for the tile. - */ -static void opj_pi_update_encode_poc_and_final ( opj_cp_t *p_cp, - OPJ_UINT32 p_tileno, - OPJ_INT32 p_tx0, - OPJ_INT32 p_tx1, - OPJ_INT32 p_ty0, - OPJ_INT32 p_ty1, - OPJ_UINT32 p_max_prec, - OPJ_UINT32 p_max_res, - OPJ_UINT32 p_dx_min, - OPJ_UINT32 p_dy_min); - -/** - * Updates the coding parameters if the encoding is not used with Progression order changes and final (and cinema parameters are used). - * - * @param p_cp the coding parameters to modify - * @param p_num_comps the number of components - * @param p_tileno the tile index being concerned. - * @param p_tx0 X0 parameter for the tile - * @param p_tx1 X1 parameter for the tile - * @param p_ty0 Y0 parameter for the tile - * @param p_ty1 Y1 parameter for the tile - * @param p_max_prec the maximum precision for all the bands of the tile - * @param p_max_res the maximum number of resolutions for all the poc inside the tile. - * @param p_dx_min the minimum dx of all the components of all the resolutions for the tile. - * @param p_dy_min the minimum dy of all the components of all the resolutions for the tile. - */ -static void opj_pi_update_encode_not_poc ( opj_cp_t *p_cp, - OPJ_UINT32 p_num_comps, - OPJ_UINT32 p_tileno, - OPJ_INT32 p_tx0, - OPJ_INT32 p_tx1, - OPJ_INT32 p_ty0, - OPJ_INT32 p_ty1, - OPJ_UINT32 p_max_prec, - OPJ_UINT32 p_max_res, - OPJ_UINT32 p_dx_min, - OPJ_UINT32 p_dy_min); -/** - * Gets the encoding parameters needed to update the coding parameters and all the pocs. - * - * @param p_image the image being encoded. - * @param p_cp the coding parameters. - * @param tileno the tile index of the tile being encoded. - * @param p_tx0 pointer that will hold the X0 parameter for the tile - * @param p_tx1 pointer that will hold the X1 parameter for the tile - * @param p_ty0 pointer that will hold the Y0 parameter for the tile - * @param p_ty1 pointer that will hold the Y1 parameter for the tile - * @param p_max_prec pointer that will hold the the maximum precision for all the bands of the tile - * @param p_max_res pointer that will hold the the maximum number of resolutions for all the poc inside the tile. - * @param p_dx_min pointer that will hold the the minimum dx of all the components of all the resolutions for the tile. - * @param p_dy_min pointer that will hold the the minimum dy of all the components of all the resolutions for the tile. - */ -static void opj_get_encoding_parameters(const opj_image_t *p_image, - const opj_cp_t *p_cp, - OPJ_UINT32 tileno, - OPJ_INT32 * p_tx0, - OPJ_INT32 * p_tx1, - OPJ_INT32 * p_ty0, - OPJ_INT32 * p_ty1, - OPJ_UINT32 * p_dx_min, - OPJ_UINT32 * p_dy_min, - OPJ_UINT32 * p_max_prec, - OPJ_UINT32 * p_max_res ); - -/** - * Gets the encoding parameters needed to update the coding parameters and all the pocs. - * The precinct widths, heights, dx and dy for each component at each resolution will be stored as well. - * the last parameter of the function should be an array of pointers of size nb components, each pointer leading - * to an area of size 4 * max_res. The data is stored inside this area with the following pattern : - * dx_compi_res0 , dy_compi_res0 , w_compi_res0, h_compi_res0 , dx_compi_res1 , dy_compi_res1 , w_compi_res1, h_compi_res1 , ... - * - * @param p_image the image being encoded. - * @param p_cp the coding parameters. - * @param tileno the tile index of the tile being encoded. - * @param p_tx0 pointer that will hold the X0 parameter for the tile - * @param p_tx1 pointer that will hold the X1 parameter for the tile - * @param p_ty0 pointer that will hold the Y0 parameter for the tile - * @param p_ty1 pointer that will hold the Y1 parameter for the tile - * @param p_max_prec pointer that will hold the the maximum precision for all the bands of the tile - * @param p_max_res pointer that will hold the the maximum number of resolutions for all the poc inside the tile. - * @param p_dx_min pointer that will hold the the minimum dx of all the components of all the resolutions for the tile. - * @param p_dy_min pointer that will hold the the minimum dy of all the components of all the resolutions for the tile. - * @param p_resolutions pointer to an area corresponding to the one described above. - */ -static void opj_get_all_encoding_parameters(const opj_image_t *p_image, - const opj_cp_t *p_cp, - OPJ_UINT32 tileno, - OPJ_INT32 * p_tx0, - OPJ_INT32 * p_tx1, - OPJ_INT32 * p_ty0, - OPJ_INT32 * p_ty1, - OPJ_UINT32 * p_dx_min, - OPJ_UINT32 * p_dy_min, - OPJ_UINT32 * p_max_prec, - OPJ_UINT32 * p_max_res, - OPJ_UINT32 ** p_resolutions ); -/** - * Allocates memory for a packet iterator. Data and data sizes are set by this operation. - * No other data is set. The include section of the packet iterator is not allocated. - * - * @param p_image the image used to initialize the packet iterator (in fact only the number of components is relevant. - * @param p_cp the coding parameters. - * @param tileno the index of the tile from which creating the packet iterator. - */ -static opj_pi_iterator_t * opj_pi_create( const opj_image_t *p_image, - const opj_cp_t *p_cp, - OPJ_UINT32 tileno ); -/** - * FIXME DOC - */ -static void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi, - opj_tcp_t * p_tcp, - OPJ_UINT32 p_max_precision, - OPJ_UINT32 p_max_res); -/** - * FIXME DOC - */ -static void opj_pi_update_decode_poc ( opj_pi_iterator_t * p_pi, - opj_tcp_t * p_tcp, - OPJ_UINT32 p_max_precision, - OPJ_UINT32 p_max_res); - -/** - * FIXME DOC - */ -OPJ_BOOL opj_pi_check_next_level( OPJ_INT32 pos, - opj_cp_t *cp, - OPJ_UINT32 tileno, - OPJ_UINT32 pino, - const OPJ_CHAR *prog); - -/*@}*/ - -/*@}*/ - -/* -========================================================== - local functions -========================================================== -*/ - -OPJ_BOOL opj_pi_next_lrcp(opj_pi_iterator_t * pi) { - opj_pi_comp_t *comp = NULL; - opj_pi_resolution_t *res = NULL; - OPJ_UINT32 index = 0; - - if (!pi->first) { - comp = &pi->comps[pi->compno]; - res = &comp->resolutions[pi->resno]; - goto LABEL_SKIP; - } else { - pi->first = 0; - } - - for (pi->layno = pi->poc.layno0; pi->layno < pi->poc.layno1; pi->layno++) { - for (pi->resno = pi->poc.resno0; pi->resno < pi->poc.resno1; - pi->resno++) { - for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) { - comp = &pi->comps[pi->compno]; - if (pi->resno >= comp->numresolutions) { - continue; - } - res = &comp->resolutions[pi->resno]; - if (!pi->tp_on){ - pi->poc.precno1 = res->pw * res->ph; - } - for (pi->precno = pi->poc.precno0; pi->precno < pi->poc.precno1; pi->precno++) { - index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p; - if (!pi->include[index]) { - pi->include[index] = 1; - return OPJ_TRUE; - } -LABEL_SKIP:; - } - } - } - } - - return OPJ_FALSE; -} - -OPJ_BOOL opj_pi_next_rlcp(opj_pi_iterator_t * pi) { - opj_pi_comp_t *comp = NULL; - opj_pi_resolution_t *res = NULL; - OPJ_UINT32 index = 0; - - if (!pi->first) { - comp = &pi->comps[pi->compno]; - res = &comp->resolutions[pi->resno]; - goto LABEL_SKIP; - } else { - pi->first = 0; - } - - for (pi->resno = pi->poc.resno0; pi->resno < pi->poc.resno1; pi->resno++) { - for (pi->layno = pi->poc.layno0; pi->layno < pi->poc.layno1; pi->layno++) { - for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) { - comp = &pi->comps[pi->compno]; - if (pi->resno >= comp->numresolutions) { - continue; - } - res = &comp->resolutions[pi->resno]; - if(!pi->tp_on){ - pi->poc.precno1 = res->pw * res->ph; - } - for (pi->precno = pi->poc.precno0; pi->precno < pi->poc.precno1; pi->precno++) { - index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p; - if (!pi->include[index]) { - pi->include[index] = 1; - return OPJ_TRUE; - } -LABEL_SKIP:; - } - } - } - } - - return OPJ_FALSE; -} - -OPJ_BOOL opj_pi_next_rpcl(opj_pi_iterator_t * pi) { - opj_pi_comp_t *comp = NULL; - opj_pi_resolution_t *res = NULL; - OPJ_UINT32 index = 0; - - if (!pi->first) { - goto LABEL_SKIP; - } else { - OPJ_UINT32 compno, resno; - pi->first = 0; - pi->dx = 0; - pi->dy = 0; - for (compno = 0; compno < pi->numcomps; compno++) { - comp = &pi->comps[compno]; - for (resno = 0; resno < comp->numresolutions; resno++) { - OPJ_UINT32 dx, dy; - res = &comp->resolutions[resno]; - dx = comp->dx * (1u << (res->pdx + comp->numresolutions - 1 - resno)); - dy = comp->dy * (1u << (res->pdy + comp->numresolutions - 1 - resno)); - pi->dx = !pi->dx ? dx : opj_uint_min(pi->dx, dx); - pi->dy = !pi->dy ? dy : opj_uint_min(pi->dy, dy); - } - } - } -if (!pi->tp_on){ - pi->poc.ty0 = pi->ty0; - pi->poc.tx0 = pi->tx0; - pi->poc.ty1 = pi->ty1; - pi->poc.tx1 = pi->tx1; - } - for (pi->resno = pi->poc.resno0; pi->resno < pi->poc.resno1; pi->resno++) { - for (pi->y = pi->poc.ty0; pi->y < pi->poc.ty1; pi->y += (OPJ_INT32)(pi->dy - (OPJ_UINT32)(pi->y % (OPJ_INT32)pi->dy))) { - for (pi->x = pi->poc.tx0; pi->x < pi->poc.tx1; pi->x += (OPJ_INT32)(pi->dx - (OPJ_UINT32)(pi->x % (OPJ_INT32)pi->dx))) { - for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) { - OPJ_UINT32 levelno; - OPJ_INT32 trx0, try0; - OPJ_INT32 trx1, try1; - OPJ_UINT32 rpx, rpy; - OPJ_INT32 prci, prcj; - comp = &pi->comps[pi->compno]; - if (pi->resno >= comp->numresolutions) { - continue; - } - res = &comp->resolutions[pi->resno]; - levelno = comp->numresolutions - 1 - pi->resno; - trx0 = opj_int_ceildiv(pi->tx0, (OPJ_INT32)(comp->dx << levelno)); - try0 = opj_int_ceildiv(pi->ty0, (OPJ_INT32)(comp->dy << levelno)); - trx1 = opj_int_ceildiv(pi->tx1, (OPJ_INT32)(comp->dx << levelno)); - try1 = opj_int_ceildiv(pi->ty1, (OPJ_INT32)(comp->dy << levelno)); - rpx = res->pdx + levelno; - rpy = res->pdy + levelno; - if (!((pi->y % (OPJ_INT32)(comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){ - continue; - } - if (!((pi->x % (OPJ_INT32)(comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){ - continue; - } - - if ((res->pw==0)||(res->ph==0)) continue; - - if ((trx0==trx1)||(try0==try1)) continue; - - prci = opj_int_floordivpow2(opj_int_ceildiv(pi->x, (OPJ_INT32)(comp->dx << levelno)), (OPJ_INT32)res->pdx) - - opj_int_floordivpow2(trx0, (OPJ_INT32)res->pdx); - prcj = opj_int_floordivpow2(opj_int_ceildiv(pi->y, (OPJ_INT32)(comp->dy << levelno)), (OPJ_INT32)res->pdy) - - opj_int_floordivpow2(try0, (OPJ_INT32)res->pdy); - pi->precno = (OPJ_UINT32)(prci + prcj * (OPJ_INT32)res->pw); - for (pi->layno = pi->poc.layno0; pi->layno < pi->poc.layno1; pi->layno++) { - index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p; - if (!pi->include[index]) { - pi->include[index] = 1; - return OPJ_TRUE; - } -LABEL_SKIP:; - } - } - } - } - } - - return OPJ_FALSE; -} - -OPJ_BOOL opj_pi_next_pcrl(opj_pi_iterator_t * pi) { - opj_pi_comp_t *comp = NULL; - opj_pi_resolution_t *res = NULL; - OPJ_UINT32 index = 0; - - if (!pi->first) { - comp = &pi->comps[pi->compno]; - goto LABEL_SKIP; - } else { - OPJ_UINT32 compno, resno; - pi->first = 0; - pi->dx = 0; - pi->dy = 0; - for (compno = 0; compno < pi->numcomps; compno++) { - comp = &pi->comps[compno]; - for (resno = 0; resno < comp->numresolutions; resno++) { - OPJ_UINT32 dx, dy; - res = &comp->resolutions[resno]; - dx = comp->dx * (1u << (res->pdx + comp->numresolutions - 1 - resno)); - dy = comp->dy * (1u << (res->pdy + comp->numresolutions - 1 - resno)); - pi->dx = !pi->dx ? dx : opj_uint_min(pi->dx, dx); - pi->dy = !pi->dy ? dy : opj_uint_min(pi->dy, dy); - } - } - } - if (!pi->tp_on){ - pi->poc.ty0 = pi->ty0; - pi->poc.tx0 = pi->tx0; - pi->poc.ty1 = pi->ty1; - pi->poc.tx1 = pi->tx1; - } - for (pi->y = pi->poc.ty0; pi->y < pi->poc.ty1; pi->y += (OPJ_INT32)(pi->dy - (OPJ_UINT32)(pi->y % (OPJ_INT32)pi->dy))) { - for (pi->x = pi->poc.tx0; pi->x < pi->poc.tx1; pi->x += (OPJ_INT32)(pi->dx - (OPJ_UINT32)(pi->x % (OPJ_INT32)pi->dx))) { - for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) { - comp = &pi->comps[pi->compno]; - for (pi->resno = pi->poc.resno0; pi->resno < opj_uint_min(pi->poc.resno1, comp->numresolutions); pi->resno++) { - OPJ_UINT32 levelno; - OPJ_INT32 trx0, try0; - OPJ_INT32 trx1, try1; - OPJ_UINT32 rpx, rpy; - OPJ_INT32 prci, prcj; - res = &comp->resolutions[pi->resno]; - levelno = comp->numresolutions - 1 - pi->resno; - trx0 = opj_int_ceildiv(pi->tx0, (OPJ_INT32)(comp->dx << levelno)); - try0 = opj_int_ceildiv(pi->ty0, (OPJ_INT32)(comp->dy << levelno)); - trx1 = opj_int_ceildiv(pi->tx1, (OPJ_INT32)(comp->dx << levelno)); - try1 = opj_int_ceildiv(pi->ty1, (OPJ_INT32)(comp->dy << levelno)); - rpx = res->pdx + levelno; - rpy = res->pdy + levelno; - if (!((pi->y % (OPJ_INT32)(comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){ - continue; - } - if (!((pi->x % (OPJ_INT32)(comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){ - continue; - } - - if ((res->pw==0)||(res->ph==0)) continue; - - if ((trx0==trx1)||(try0==try1)) continue; - - prci = opj_int_floordivpow2(opj_int_ceildiv(pi->x, (OPJ_INT32)(comp->dx << levelno)), (OPJ_INT32)res->pdx) - - opj_int_floordivpow2(trx0, (OPJ_INT32)res->pdx); - prcj = opj_int_floordivpow2(opj_int_ceildiv(pi->y, (OPJ_INT32)(comp->dy << levelno)), (OPJ_INT32)res->pdy) - - opj_int_floordivpow2(try0, (OPJ_INT32)res->pdy); - pi->precno = (OPJ_UINT32)(prci + prcj * (OPJ_INT32)res->pw); - for (pi->layno = pi->poc.layno0; pi->layno < pi->poc.layno1; pi->layno++) { - index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p; - if (!pi->include[index]) { - pi->include[index] = 1; - return OPJ_TRUE; - } -LABEL_SKIP:; - } - } - } - } - } - - return OPJ_FALSE; -} - -OPJ_BOOL opj_pi_next_cprl(opj_pi_iterator_t * pi) { - opj_pi_comp_t *comp = NULL; - opj_pi_resolution_t *res = NULL; - OPJ_UINT32 index = 0; - - if (!pi->first) { - comp = &pi->comps[pi->compno]; - goto LABEL_SKIP; - } else { - pi->first = 0; - } - - for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) { - OPJ_UINT32 resno; - comp = &pi->comps[pi->compno]; - pi->dx = 0; - pi->dy = 0; - for (resno = 0; resno < comp->numresolutions; resno++) { - OPJ_UINT32 dx, dy; - res = &comp->resolutions[resno]; - dx = comp->dx * (1u << (res->pdx + comp->numresolutions - 1 - resno)); - dy = comp->dy * (1u << (res->pdy + comp->numresolutions - 1 - resno)); - pi->dx = !pi->dx ? dx : opj_uint_min(pi->dx, dx); - pi->dy = !pi->dy ? dy : opj_uint_min(pi->dy, dy); - } - if (!pi->tp_on){ - pi->poc.ty0 = pi->ty0; - pi->poc.tx0 = pi->tx0; - pi->poc.ty1 = pi->ty1; - pi->poc.tx1 = pi->tx1; - } - for (pi->y = pi->poc.ty0; pi->y < pi->poc.ty1; pi->y += (OPJ_INT32)(pi->dy - (OPJ_UINT32)(pi->y % (OPJ_INT32)pi->dy))) { - for (pi->x = pi->poc.tx0; pi->x < pi->poc.tx1; pi->x += (OPJ_INT32)(pi->dx - (OPJ_UINT32)(pi->x % (OPJ_INT32)pi->dx))) { - for (pi->resno = pi->poc.resno0; pi->resno < opj_uint_min(pi->poc.resno1, comp->numresolutions); pi->resno++) { - OPJ_UINT32 levelno; - OPJ_INT32 trx0, try0; - OPJ_INT32 trx1, try1; - OPJ_UINT32 rpx, rpy; - OPJ_INT32 prci, prcj; - res = &comp->resolutions[pi->resno]; - levelno = comp->numresolutions - 1 - pi->resno; - trx0 = opj_int_ceildiv(pi->tx0, (OPJ_INT32)(comp->dx << levelno)); - try0 = opj_int_ceildiv(pi->ty0, (OPJ_INT32)(comp->dy << levelno)); - trx1 = opj_int_ceildiv(pi->tx1, (OPJ_INT32)(comp->dx << levelno)); - try1 = opj_int_ceildiv(pi->ty1, (OPJ_INT32)(comp->dy << levelno)); - rpx = res->pdx + levelno; - rpy = res->pdy + levelno; - if (!((pi->y % (OPJ_INT32)(comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){ - continue; - } - if (!((pi->x % (OPJ_INT32)(comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){ - continue; - } - - if ((res->pw==0)||(res->ph==0)) continue; - - if ((trx0==trx1)||(try0==try1)) continue; - - prci = opj_int_floordivpow2(opj_int_ceildiv(pi->x, (OPJ_INT32)(comp->dx << levelno)), (OPJ_INT32)res->pdx) - - opj_int_floordivpow2(trx0, (OPJ_INT32)res->pdx); - prcj = opj_int_floordivpow2(opj_int_ceildiv(pi->y, (OPJ_INT32)(comp->dy << levelno)), (OPJ_INT32)res->pdy) - - opj_int_floordivpow2(try0, (OPJ_INT32)res->pdy); - pi->precno = (OPJ_UINT32)(prci + prcj * (OPJ_INT32)res->pw); - for (pi->layno = pi->poc.layno0; pi->layno < pi->poc.layno1; pi->layno++) { - index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p; - if (!pi->include[index]) { - pi->include[index] = 1; - return OPJ_TRUE; - } -LABEL_SKIP:; - } - } - } - } - } - - return OPJ_FALSE; -} - -void opj_get_encoding_parameters( const opj_image_t *p_image, - const opj_cp_t *p_cp, - OPJ_UINT32 p_tileno, - OPJ_INT32 * p_tx0, - OPJ_INT32 * p_tx1, - OPJ_INT32 * p_ty0, - OPJ_INT32 * p_ty1, - OPJ_UINT32 * p_dx_min, - OPJ_UINT32 * p_dy_min, - OPJ_UINT32 * p_max_prec, - OPJ_UINT32 * p_max_res ) -{ - /* loop */ - OPJ_UINT32 compno, resno; - /* pointers */ - const opj_tcp_t *l_tcp = 00; - const opj_tccp_t * l_tccp = 00; - const opj_image_comp_t * l_img_comp = 00; - - /* position in x and y of tile */ - OPJ_UINT32 p, q; - - /* preconditions */ - assert(p_cp != 00); - assert(p_image != 00); - assert(p_tileno < p_cp->tw * p_cp->th); - - /* initializations */ - l_tcp = &p_cp->tcps [p_tileno]; - l_img_comp = p_image->comps; - l_tccp = l_tcp->tccps; - - /* here calculation of tx0, tx1, ty0, ty1, maxprec, dx and dy */ - p = p_tileno % p_cp->tw; - q = p_tileno / p_cp->tw; - - /* find extent of tile */ - *p_tx0 = opj_int_max((OPJ_INT32)(p_cp->tx0 + p * p_cp->tdx), (OPJ_INT32)p_image->x0); - *p_tx1 = opj_int_min((OPJ_INT32)(p_cp->tx0 + (p + 1) * p_cp->tdx), (OPJ_INT32)p_image->x1); - *p_ty0 = opj_int_max((OPJ_INT32)(p_cp->ty0 + q * p_cp->tdy), (OPJ_INT32)p_image->y0); - *p_ty1 = opj_int_min((OPJ_INT32)(p_cp->ty0 + (q + 1) * p_cp->tdy), (OPJ_INT32)p_image->y1); - - /* max precision is 0 (can only grow) */ - *p_max_prec = 0; - *p_max_res = 0; - - /* take the largest value for dx_min and dy_min */ - *p_dx_min = 0x7fffffff; - *p_dy_min = 0x7fffffff; - - for (compno = 0; compno < p_image->numcomps; ++compno) { - /* arithmetic variables to calculate */ - OPJ_UINT32 l_level_no; - OPJ_INT32 l_rx0, l_ry0, l_rx1, l_ry1; - OPJ_INT32 l_px0, l_py0, l_px1, py1; - OPJ_UINT32 l_pdx, l_pdy; - OPJ_UINT32 l_pw, l_ph; - OPJ_UINT32 l_product; - OPJ_INT32 l_tcx0, l_tcy0, l_tcx1, l_tcy1; - - l_tcx0 = opj_int_ceildiv(*p_tx0, (OPJ_INT32)l_img_comp->dx); - l_tcy0 = opj_int_ceildiv(*p_ty0, (OPJ_INT32)l_img_comp->dy); - l_tcx1 = opj_int_ceildiv(*p_tx1, (OPJ_INT32)l_img_comp->dx); - l_tcy1 = opj_int_ceildiv(*p_ty1, (OPJ_INT32)l_img_comp->dy); - - if (l_tccp->numresolutions > *p_max_res) { - *p_max_res = l_tccp->numresolutions; - } - - /* use custom size for precincts */ - for (resno = 0; resno < l_tccp->numresolutions; ++resno) { - OPJ_UINT32 l_dx, l_dy; - - /* precinct width and height */ - l_pdx = l_tccp->prcw[resno]; - l_pdy = l_tccp->prch[resno]; - - l_dx = l_img_comp->dx * (1u << (l_pdx + l_tccp->numresolutions - 1 - resno)); - l_dy = l_img_comp->dy * (1u << (l_pdy + l_tccp->numresolutions - 1 - resno)); - - /* take the minimum size for dx for each comp and resolution */ - *p_dx_min = opj_uint_min(*p_dx_min, l_dx); - *p_dy_min = opj_uint_min(*p_dy_min, l_dy); - - /* various calculations of extents */ - l_level_no = l_tccp->numresolutions - 1 - resno; - - l_rx0 = opj_int_ceildivpow2(l_tcx0, (OPJ_INT32)l_level_no); - l_ry0 = opj_int_ceildivpow2(l_tcy0, (OPJ_INT32)l_level_no); - l_rx1 = opj_int_ceildivpow2(l_tcx1, (OPJ_INT32)l_level_no); - l_ry1 = opj_int_ceildivpow2(l_tcy1, (OPJ_INT32)l_level_no); - - l_px0 = opj_int_floordivpow2(l_rx0, (OPJ_INT32)l_pdx) << l_pdx; - l_py0 = opj_int_floordivpow2(l_ry0, (OPJ_INT32)l_pdy) << l_pdy; - l_px1 = opj_int_ceildivpow2(l_rx1, (OPJ_INT32)l_pdx) << l_pdx; - - py1 = opj_int_ceildivpow2(l_ry1, (OPJ_INT32)l_pdy) << l_pdy; - - l_pw = (l_rx0==l_rx1)?0:(OPJ_UINT32)((l_px1 - l_px0) >> l_pdx); - l_ph = (l_ry0==l_ry1)?0:(OPJ_UINT32)((py1 - l_py0) >> l_pdy); - - l_product = l_pw * l_ph; - - /* update precision */ - if (l_product > *p_max_prec) { - *p_max_prec = l_product; - } - } - ++l_img_comp; - ++l_tccp; - } -} - - -void opj_get_all_encoding_parameters( const opj_image_t *p_image, - const opj_cp_t *p_cp, - OPJ_UINT32 tileno, - OPJ_INT32 * p_tx0, - OPJ_INT32 * p_tx1, - OPJ_INT32 * p_ty0, - OPJ_INT32 * p_ty1, - OPJ_UINT32 * p_dx_min, - OPJ_UINT32 * p_dy_min, - OPJ_UINT32 * p_max_prec, - OPJ_UINT32 * p_max_res, - OPJ_UINT32 ** p_resolutions ) -{ - /* loop*/ - OPJ_UINT32 compno, resno; - - /* pointers*/ - const opj_tcp_t *tcp = 00; - const opj_tccp_t * l_tccp = 00; - const opj_image_comp_t * l_img_comp = 00; - - /* to store l_dx, l_dy, w and h for each resolution and component.*/ - OPJ_UINT32 * lResolutionPtr; - - /* position in x and y of tile*/ - OPJ_UINT32 p, q; - - /* preconditions in debug*/ - assert(p_cp != 00); - assert(p_image != 00); - assert(tileno < p_cp->tw * p_cp->th); - - /* initializations*/ - tcp = &p_cp->tcps [tileno]; - l_tccp = tcp->tccps; - l_img_comp = p_image->comps; - - /* position in x and y of tile*/ - p = tileno % p_cp->tw; - q = tileno / p_cp->tw; - - /* here calculation of tx0, tx1, ty0, ty1, maxprec, l_dx and l_dy */ - *p_tx0 = opj_int_max((OPJ_INT32)(p_cp->tx0 + p * p_cp->tdx), (OPJ_INT32)p_image->x0); - *p_tx1 = opj_int_min((OPJ_INT32)(p_cp->tx0 + (p + 1) * p_cp->tdx), (OPJ_INT32)p_image->x1); - *p_ty0 = opj_int_max((OPJ_INT32)(p_cp->ty0 + q * p_cp->tdy), (OPJ_INT32)p_image->y0); - *p_ty1 = opj_int_min((OPJ_INT32)(p_cp->ty0 + (q + 1) * p_cp->tdy), (OPJ_INT32)p_image->y1); - - /* max precision and resolution is 0 (can only grow)*/ - *p_max_prec = 0; - *p_max_res = 0; - - /* take the largest value for dx_min and dy_min*/ - *p_dx_min = 0x7fffffff; - *p_dy_min = 0x7fffffff; - - for (compno = 0; compno < p_image->numcomps; ++compno) { - /* aritmetic variables to calculate*/ - OPJ_UINT32 l_level_no; - OPJ_INT32 l_rx0, l_ry0, l_rx1, l_ry1; - OPJ_INT32 l_px0, l_py0, l_px1, py1; - OPJ_UINT32 l_product; - OPJ_INT32 l_tcx0, l_tcy0, l_tcx1, l_tcy1; - OPJ_UINT32 l_pdx, l_pdy , l_pw , l_ph; - - lResolutionPtr = p_resolutions[compno]; - - l_tcx0 = opj_int_ceildiv(*p_tx0, (OPJ_INT32)l_img_comp->dx); - l_tcy0 = opj_int_ceildiv(*p_ty0, (OPJ_INT32)l_img_comp->dy); - l_tcx1 = opj_int_ceildiv(*p_tx1, (OPJ_INT32)l_img_comp->dx); - l_tcy1 = opj_int_ceildiv(*p_ty1, (OPJ_INT32)l_img_comp->dy); - - if (l_tccp->numresolutions > *p_max_res) { - *p_max_res = l_tccp->numresolutions; - } - - /* use custom size for precincts*/ - l_level_no = l_tccp->numresolutions - 1; - for (resno = 0; resno < l_tccp->numresolutions; ++resno) { - OPJ_UINT32 l_dx, l_dy; - - /* precinct width and height*/ - l_pdx = l_tccp->prcw[resno]; - l_pdy = l_tccp->prch[resno]; - *lResolutionPtr++ = l_pdx; - *lResolutionPtr++ = l_pdy; - l_dx = l_img_comp->dx * (1u << (l_pdx + l_level_no)); - l_dy = l_img_comp->dy * (1u << (l_pdy + l_level_no)); - /* take the minimum size for l_dx for each comp and resolution*/ - *p_dx_min = (OPJ_UINT32)opj_int_min((OPJ_INT32)*p_dx_min, (OPJ_INT32)l_dx); - *p_dy_min = (OPJ_UINT32)opj_int_min((OPJ_INT32)*p_dy_min, (OPJ_INT32)l_dy); - - /* various calculations of extents*/ - l_rx0 = opj_int_ceildivpow2(l_tcx0, (OPJ_INT32)l_level_no); - l_ry0 = opj_int_ceildivpow2(l_tcy0, (OPJ_INT32)l_level_no); - l_rx1 = opj_int_ceildivpow2(l_tcx1, (OPJ_INT32)l_level_no); - l_ry1 = opj_int_ceildivpow2(l_tcy1, (OPJ_INT32)l_level_no); - l_px0 = opj_int_floordivpow2(l_rx0, (OPJ_INT32)l_pdx) << l_pdx; - l_py0 = opj_int_floordivpow2(l_ry0, (OPJ_INT32)l_pdy) << l_pdy; - l_px1 = opj_int_ceildivpow2(l_rx1, (OPJ_INT32)l_pdx) << l_pdx; - py1 = opj_int_ceildivpow2(l_ry1, (OPJ_INT32)l_pdy) << l_pdy; - l_pw = (l_rx0==l_rx1)?0:(OPJ_UINT32)((l_px1 - l_px0) >> l_pdx); - l_ph = (l_ry0==l_ry1)?0:(OPJ_UINT32)((py1 - l_py0) >> l_pdy); - *lResolutionPtr++ = l_pw; - *lResolutionPtr++ = l_ph; - l_product = l_pw * l_ph; - - /* update precision*/ - if (l_product > *p_max_prec) { - *p_max_prec = l_product; - } - - --l_level_no; - } - ++l_tccp; - ++l_img_comp; - } -} - -opj_pi_iterator_t * opj_pi_create( const opj_image_t *image, - const opj_cp_t *cp, - OPJ_UINT32 tileno ) -{ - /* loop*/ - OPJ_UINT32 pino, compno; - /* number of poc in the p_pi*/ - OPJ_UINT32 l_poc_bound; - - /* pointers to tile coding parameters and components.*/ - opj_pi_iterator_t *l_pi = 00; - opj_tcp_t *tcp = 00; - const opj_tccp_t *tccp = 00; - - /* current packet iterator being allocated*/ - opj_pi_iterator_t *l_current_pi = 00; - - /* preconditions in debug*/ - assert(cp != 00); - assert(image != 00); - assert(tileno < cp->tw * cp->th); - - /* initializations*/ - tcp = &cp->tcps[tileno]; - l_poc_bound = tcp->numpocs+1; - - /* memory allocations*/ - l_pi = (opj_pi_iterator_t*) opj_calloc((l_poc_bound), sizeof(opj_pi_iterator_t)); - if (!l_pi) { - return NULL; - } - memset(l_pi,0,l_poc_bound * sizeof(opj_pi_iterator_t)); - - l_current_pi = l_pi; - for (pino = 0; pino < l_poc_bound ; ++pino) { - - l_current_pi->comps = (opj_pi_comp_t*) opj_calloc(image->numcomps, sizeof(opj_pi_comp_t)); - if (! l_current_pi->comps) { - opj_pi_destroy(l_pi, l_poc_bound); - return NULL; - } - - l_current_pi->numcomps = image->numcomps; - memset(l_current_pi->comps,0,image->numcomps * sizeof(opj_pi_comp_t)); - - for (compno = 0; compno < image->numcomps; ++compno) { - opj_pi_comp_t *comp = &l_current_pi->comps[compno]; - - tccp = &tcp->tccps[compno]; - - comp->resolutions = (opj_pi_resolution_t*) opj_malloc(tccp->numresolutions * sizeof(opj_pi_resolution_t)); - if (!comp->resolutions) { - opj_pi_destroy(l_pi, l_poc_bound); - return 00; - } - - comp->numresolutions = tccp->numresolutions; - memset(comp->resolutions,0,tccp->numresolutions * sizeof(opj_pi_resolution_t)); - } - ++l_current_pi; - } - return l_pi; -} - -void opj_pi_update_encode_poc_and_final ( opj_cp_t *p_cp, - OPJ_UINT32 p_tileno, - OPJ_INT32 p_tx0, - OPJ_INT32 p_tx1, - OPJ_INT32 p_ty0, - OPJ_INT32 p_ty1, - OPJ_UINT32 p_max_prec, - OPJ_UINT32 p_max_res, - OPJ_UINT32 p_dx_min, - OPJ_UINT32 p_dy_min) -{ - /* loop*/ - OPJ_UINT32 pino; - /* tile coding parameter*/ - opj_tcp_t *l_tcp = 00; - /* current poc being updated*/ - opj_poc_t * l_current_poc = 00; - - /* number of pocs*/ - OPJ_UINT32 l_poc_bound; - - OPJ_ARG_NOT_USED(p_max_res); - - /* preconditions in debug*/ - assert(p_cp != 00); - assert(p_tileno < p_cp->tw * p_cp->th); - - /* initializations*/ - l_tcp = &p_cp->tcps [p_tileno]; - /* number of iterations in the loop */ - l_poc_bound = l_tcp->numpocs+1; - - /* start at first element, and to make sure the compiler will not make a calculation each time in the loop - store a pointer to the current element to modify rather than l_tcp->pocs[i]*/ - l_current_poc = l_tcp->pocs; - - l_current_poc->compS = l_current_poc->compno0; - l_current_poc->compE = l_current_poc->compno1; - l_current_poc->resS = l_current_poc->resno0; - l_current_poc->resE = l_current_poc->resno1; - l_current_poc->layE = l_current_poc->layno1; - - /* special treatment for the first element*/ - l_current_poc->layS = 0; - l_current_poc->prg = l_current_poc->prg1; - l_current_poc->prcS = 0; - - l_current_poc->prcE = p_max_prec; - l_current_poc->txS = (OPJ_UINT32)p_tx0; - l_current_poc->txE = (OPJ_UINT32)p_tx1; - l_current_poc->tyS = (OPJ_UINT32)p_ty0; - l_current_poc->tyE = (OPJ_UINT32)p_ty1; - l_current_poc->dx = p_dx_min; - l_current_poc->dy = p_dy_min; - - ++ l_current_poc; - for (pino = 1;pino < l_poc_bound ; ++pino) { - l_current_poc->compS = l_current_poc->compno0; - l_current_poc->compE= l_current_poc->compno1; - l_current_poc->resS = l_current_poc->resno0; - l_current_poc->resE = l_current_poc->resno1; - l_current_poc->layE = l_current_poc->layno1; - l_current_poc->prg = l_current_poc->prg1; - l_current_poc->prcS = 0; - /* special treatment here different from the first element*/ - l_current_poc->layS = (l_current_poc->layE > (l_current_poc-1)->layE) ? l_current_poc->layE : 0; - - l_current_poc->prcE = p_max_prec; - l_current_poc->txS = (OPJ_UINT32)p_tx0; - l_current_poc->txE = (OPJ_UINT32)p_tx1; - l_current_poc->tyS = (OPJ_UINT32)p_ty0; - l_current_poc->tyE = (OPJ_UINT32)p_ty1; - l_current_poc->dx = p_dx_min; - l_current_poc->dy = p_dy_min; - ++ l_current_poc; - } -} - -void opj_pi_update_encode_not_poc ( opj_cp_t *p_cp, - OPJ_UINT32 p_num_comps, - OPJ_UINT32 p_tileno, - OPJ_INT32 p_tx0, - OPJ_INT32 p_tx1, - OPJ_INT32 p_ty0, - OPJ_INT32 p_ty1, - OPJ_UINT32 p_max_prec, - OPJ_UINT32 p_max_res, - OPJ_UINT32 p_dx_min, - OPJ_UINT32 p_dy_min) -{ - /* loop*/ - OPJ_UINT32 pino; - /* tile coding parameter*/ - opj_tcp_t *l_tcp = 00; - /* current poc being updated*/ - opj_poc_t * l_current_poc = 00; - /* number of pocs*/ - OPJ_UINT32 l_poc_bound; - - /* preconditions in debug*/ - assert(p_cp != 00); - assert(p_tileno < p_cp->tw * p_cp->th); - - /* initializations*/ - l_tcp = &p_cp->tcps [p_tileno]; - - /* number of iterations in the loop */ - l_poc_bound = l_tcp->numpocs+1; - - /* start at first element, and to make sure the compiler will not make a calculation each time in the loop - store a pointer to the current element to modify rather than l_tcp->pocs[i]*/ - l_current_poc = l_tcp->pocs; - - for (pino = 0; pino < l_poc_bound ; ++pino) { - l_current_poc->compS = 0; - l_current_poc->compE = p_num_comps;/*p_image->numcomps;*/ - l_current_poc->resS = 0; - l_current_poc->resE = p_max_res; - l_current_poc->layS = 0; - l_current_poc->layE = l_tcp->numlayers; - l_current_poc->prg = l_tcp->prg; - l_current_poc->prcS = 0; - l_current_poc->prcE = p_max_prec; - l_current_poc->txS = (OPJ_UINT32)p_tx0; - l_current_poc->txE = (OPJ_UINT32)p_tx1; - l_current_poc->tyS = (OPJ_UINT32)p_ty0; - l_current_poc->tyE = (OPJ_UINT32)p_ty1; - l_current_poc->dx = p_dx_min; - l_current_poc->dy = p_dy_min; - ++ l_current_poc; - } -} - -void opj_pi_update_decode_poc (opj_pi_iterator_t * p_pi, - opj_tcp_t * p_tcp, - OPJ_UINT32 p_max_precision, - OPJ_UINT32 p_max_res) -{ - /* loop*/ - OPJ_UINT32 pino; - - /* encoding prameters to set*/ - OPJ_UINT32 l_bound; - - opj_pi_iterator_t * l_current_pi = 00; - opj_poc_t* l_current_poc = 0; - - OPJ_ARG_NOT_USED(p_max_res); - - /* preconditions in debug*/ - assert(p_pi != 00); - assert(p_tcp != 00); - - /* initializations*/ - l_bound = p_tcp->numpocs+1; - l_current_pi = p_pi; - l_current_poc = p_tcp->pocs; - - for (pino = 0;pinopoc.prg = l_current_poc->prg; /* Progression Order #0 */ - l_current_pi->first = 1; - - l_current_pi->poc.resno0 = l_current_poc->resno0; /* Resolution Level Index #0 (Start) */ - l_current_pi->poc.compno0 = l_current_poc->compno0; /* Component Index #0 (Start) */ - l_current_pi->poc.layno0 = 0; - l_current_pi->poc.precno0 = 0; - l_current_pi->poc.resno1 = l_current_poc->resno1; /* Resolution Level Index #0 (End) */ - l_current_pi->poc.compno1 = l_current_poc->compno1; /* Component Index #0 (End) */ - l_current_pi->poc.layno1 = l_current_poc->layno1; /* Layer Index #0 (End) */ - l_current_pi->poc.precno1 = p_max_precision; - ++l_current_pi; - ++l_current_poc; - } -} - -void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi, - opj_tcp_t * p_tcp, - OPJ_UINT32 p_max_precision, - OPJ_UINT32 p_max_res) -{ - /* loop*/ - OPJ_UINT32 pino; - - /* encoding prameters to set*/ - OPJ_UINT32 l_bound; - - opj_pi_iterator_t * l_current_pi = 00; - /* preconditions in debug*/ - assert(p_tcp != 00); - assert(p_pi != 00); - - /* initializations*/ - l_bound = p_tcp->numpocs+1; - l_current_pi = p_pi; - - for (pino = 0;pinopoc.prg = p_tcp->prg; - l_current_pi->first = 1; - l_current_pi->poc.resno0 = 0; - l_current_pi->poc.compno0 = 0; - l_current_pi->poc.layno0 = 0; - l_current_pi->poc.precno0 = 0; - l_current_pi->poc.resno1 = p_max_res; - l_current_pi->poc.compno1 = l_current_pi->numcomps; - l_current_pi->poc.layno1 = p_tcp->numlayers; - l_current_pi->poc.precno1 = p_max_precision; - ++l_current_pi; - } -} - - - -OPJ_BOOL opj_pi_check_next_level( OPJ_INT32 pos, - opj_cp_t *cp, - OPJ_UINT32 tileno, - OPJ_UINT32 pino, - const OPJ_CHAR *prog) -{ - OPJ_INT32 i; - opj_tcp_t *tcps =&cp->tcps[tileno]; - opj_poc_t *tcp = &tcps->pocs[pino]; - - if(pos>=0){ - for(i=pos;pos>=0;i--){ - switch(prog[i]){ - case 'R': - if(tcp->res_t==tcp->resE){ - if(opj_pi_check_next_level(pos-1,cp,tileno,pino,prog)){ - return OPJ_TRUE; - }else{ - return OPJ_FALSE; - } - }else{ - return OPJ_TRUE; - } - break; - case 'C': - if(tcp->comp_t==tcp->compE){ - if(opj_pi_check_next_level(pos-1,cp,tileno,pino,prog)){ - return OPJ_TRUE; - }else{ - return OPJ_FALSE; - } - }else{ - return OPJ_TRUE; - } - break; - case 'L': - if(tcp->lay_t==tcp->layE){ - if(opj_pi_check_next_level(pos-1,cp,tileno,pino,prog)){ - return OPJ_TRUE; - }else{ - return OPJ_FALSE; - } - }else{ - return OPJ_TRUE; - } - break; - case 'P': - switch(tcp->prg){ - case OPJ_LRCP||OPJ_RLCP: - if(tcp->prc_t == tcp->prcE){ - if(opj_pi_check_next_level(i-1,cp,tileno,pino,prog)){ - return OPJ_TRUE; - }else{ - return OPJ_FALSE; - } - }else{ - return OPJ_TRUE; - } - break; - default: - if(tcp->tx0_t == tcp->txE){ - /*TY*/ - if(tcp->ty0_t == tcp->tyE){ - if(opj_pi_check_next_level(i-1,cp,tileno,pino,prog)){ - return OPJ_TRUE; - }else{ - return OPJ_FALSE; - } - }else{ - return OPJ_TRUE; - }/*TY*/ - }else{ - return OPJ_TRUE; - } - break; - }/*end case P*/ - }/*end switch*/ - }/*end for*/ - }/*end if*/ - return OPJ_FALSE; -} - - -/* -========================================================== - Packet iterator interface -========================================================== -*/ -opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image, - opj_cp_t *p_cp, - OPJ_UINT32 p_tile_no) -{ - /* loop */ - OPJ_UINT32 pino; - OPJ_UINT32 compno, resno; - - /* to store w, h, dx and dy fro all components and resolutions */ - OPJ_UINT32 * l_tmp_data; - OPJ_UINT32 ** l_tmp_ptr; - - /* encoding prameters to set */ - OPJ_UINT32 l_max_res; - OPJ_UINT32 l_max_prec; - OPJ_INT32 l_tx0,l_tx1,l_ty0,l_ty1; - OPJ_UINT32 l_dx_min,l_dy_min; - OPJ_UINT32 l_bound; - OPJ_UINT32 l_step_p , l_step_c , l_step_r , l_step_l ; - OPJ_UINT32 l_data_stride; - - /* pointers */ - opj_pi_iterator_t *l_pi = 00; - opj_tcp_t *l_tcp = 00; - const opj_tccp_t *l_tccp = 00; - opj_pi_comp_t *l_current_comp = 00; - opj_image_comp_t * l_img_comp = 00; - opj_pi_iterator_t * l_current_pi = 00; - OPJ_UINT32 * l_encoding_value_ptr = 00; - - /* preconditions in debug */ - assert(p_cp != 00); - assert(p_image != 00); - assert(p_tile_no < p_cp->tw * p_cp->th); - - /* initializations */ - l_tcp = &p_cp->tcps[p_tile_no]; - l_bound = l_tcp->numpocs+1; - - l_data_stride = 4 * OPJ_J2K_MAXRLVLS; - l_tmp_data = (OPJ_UINT32*)opj_malloc( - l_data_stride * p_image->numcomps * sizeof(OPJ_UINT32)); - if - (! l_tmp_data) - { - return 00; - } - l_tmp_ptr = (OPJ_UINT32**)opj_malloc( - p_image->numcomps * sizeof(OPJ_UINT32 *)); - if - (! l_tmp_ptr) - { - opj_free(l_tmp_data); - return 00; - } - - /* memory allocation for pi */ - l_pi = opj_pi_create(p_image, p_cp, p_tile_no); - if (!l_pi) { - opj_free(l_tmp_data); - opj_free(l_tmp_ptr); - return 00; - } - - l_encoding_value_ptr = l_tmp_data; - /* update pointer array */ - for - (compno = 0; compno < p_image->numcomps; ++compno) - { - l_tmp_ptr[compno] = l_encoding_value_ptr; - l_encoding_value_ptr += l_data_stride; - } - /* get encoding parameters */ - opj_get_all_encoding_parameters(p_image,p_cp,p_tile_no,&l_tx0,&l_tx1,&l_ty0,&l_ty1,&l_dx_min,&l_dy_min,&l_max_prec,&l_max_res,l_tmp_ptr); - - /* step calculations */ - l_step_p = 1; - l_step_c = l_max_prec * l_step_p; - l_step_r = p_image->numcomps * l_step_c; - l_step_l = l_max_res * l_step_r; - - /* set values for first packet iterator */ - l_current_pi = l_pi; - - /* memory allocation for include */ - l_current_pi->include = (OPJ_INT16*) opj_calloc((l_tcp->numlayers +1) * l_step_l, sizeof(OPJ_INT16)); - if - (!l_current_pi->include) - { - opj_free(l_tmp_data); - opj_free(l_tmp_ptr); - opj_pi_destroy(l_pi, l_bound); - return 00; - } - memset(l_current_pi->include,0, (l_tcp->numlayers + 1) * l_step_l* sizeof(OPJ_INT16)); - - /* special treatment for the first packet iterator */ - l_current_comp = l_current_pi->comps; - l_img_comp = p_image->comps; - l_tccp = l_tcp->tccps; - - l_current_pi->tx0 = l_tx0; - l_current_pi->ty0 = l_ty0; - l_current_pi->tx1 = l_tx1; - l_current_pi->ty1 = l_ty1; - - /*l_current_pi->dx = l_img_comp->dx;*/ - /*l_current_pi->dy = l_img_comp->dy;*/ - - l_current_pi->step_p = l_step_p; - l_current_pi->step_c = l_step_c; - l_current_pi->step_r = l_step_r; - l_current_pi->step_l = l_step_l; - - /* allocation for components and number of components has already been calculated by opj_pi_create */ - for - (compno = 0; compno < l_current_pi->numcomps; ++compno) - { - opj_pi_resolution_t *l_res = l_current_comp->resolutions; - l_encoding_value_ptr = l_tmp_ptr[compno]; - - l_current_comp->dx = l_img_comp->dx; - l_current_comp->dy = l_img_comp->dy; - /* resolutions have already been initialized */ - for - (resno = 0; resno < l_current_comp->numresolutions; resno++) - { - l_res->pdx = *(l_encoding_value_ptr++); - l_res->pdy = *(l_encoding_value_ptr++); - l_res->pw = *(l_encoding_value_ptr++); - l_res->ph = *(l_encoding_value_ptr++); - ++l_res; - } - ++l_current_comp; - ++l_img_comp; - ++l_tccp; - } - ++l_current_pi; - - for (pino = 1 ; pinocomps; - l_img_comp = p_image->comps; - l_tccp = l_tcp->tccps; - - l_current_pi->tx0 = l_tx0; - l_current_pi->ty0 = l_ty0; - l_current_pi->tx1 = l_tx1; - l_current_pi->ty1 = l_ty1; - /*l_current_pi->dx = l_dx_min;*/ - /*l_current_pi->dy = l_dy_min;*/ - l_current_pi->step_p = l_step_p; - l_current_pi->step_c = l_step_c; - l_current_pi->step_r = l_step_r; - l_current_pi->step_l = l_step_l; - - /* allocation for components and number of components has already been calculated by opj_pi_create */ - for - (compno = 0; compno < l_current_pi->numcomps; ++compno) - { - opj_pi_resolution_t *l_res = l_current_comp->resolutions; - l_encoding_value_ptr = l_tmp_ptr[compno]; - - l_current_comp->dx = l_img_comp->dx; - l_current_comp->dy = l_img_comp->dy; - /* resolutions have already been initialized */ - for - (resno = 0; resno < l_current_comp->numresolutions; resno++) - { - l_res->pdx = *(l_encoding_value_ptr++); - l_res->pdy = *(l_encoding_value_ptr++); - l_res->pw = *(l_encoding_value_ptr++); - l_res->ph = *(l_encoding_value_ptr++); - ++l_res; - } - ++l_current_comp; - ++l_img_comp; - ++l_tccp; - } - /* special treatment*/ - l_current_pi->include = (l_current_pi-1)->include; - ++l_current_pi; - } - opj_free(l_tmp_data); - l_tmp_data = 00; - opj_free(l_tmp_ptr); - l_tmp_ptr = 00; - if - (l_tcp->POC) - { - opj_pi_update_decode_poc (l_pi,l_tcp,l_max_prec,l_max_res); - } - else - { - opj_pi_update_decode_not_poc(l_pi,l_tcp,l_max_prec,l_max_res); - } - return l_pi; -} - - - -opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *p_image, - opj_cp_t *p_cp, - OPJ_UINT32 p_tile_no, - J2K_T2_MODE p_t2_mode ) -{ - /* loop*/ - OPJ_UINT32 pino; - OPJ_UINT32 compno, resno; - - /* to store w, h, dx and dy fro all components and resolutions*/ - OPJ_UINT32 * l_tmp_data; - OPJ_UINT32 ** l_tmp_ptr; - - /* encoding prameters to set*/ - OPJ_UINT32 l_max_res; - OPJ_UINT32 l_max_prec; - OPJ_INT32 l_tx0,l_tx1,l_ty0,l_ty1; - OPJ_UINT32 l_dx_min,l_dy_min; - OPJ_UINT32 l_bound; - OPJ_UINT32 l_step_p , l_step_c , l_step_r , l_step_l ; - OPJ_UINT32 l_data_stride; - - /* pointers*/ - opj_pi_iterator_t *l_pi = 00; - opj_tcp_t *l_tcp = 00; - const opj_tccp_t *l_tccp = 00; - opj_pi_comp_t *l_current_comp = 00; - opj_image_comp_t * l_img_comp = 00; - opj_pi_iterator_t * l_current_pi = 00; - OPJ_UINT32 * l_encoding_value_ptr = 00; - - /* preconditions in debug*/ - assert(p_cp != 00); - assert(p_image != 00); - assert(p_tile_no < p_cp->tw * p_cp->th); - - /* initializations*/ - l_tcp = &p_cp->tcps[p_tile_no]; - l_bound = l_tcp->numpocs+1; - - l_data_stride = 4 * OPJ_J2K_MAXRLVLS; - l_tmp_data = (OPJ_UINT32*)opj_malloc( - l_data_stride * p_image->numcomps * sizeof(OPJ_UINT32)); - if (! l_tmp_data) { - return 00; - } - - l_tmp_ptr = (OPJ_UINT32**)opj_malloc( - p_image->numcomps * sizeof(OPJ_UINT32 *)); - if (! l_tmp_ptr) { - opj_free(l_tmp_data); - return 00; - } - - /* memory allocation for pi*/ - l_pi = opj_pi_create(p_image,p_cp,p_tile_no); - if (!l_pi) { - opj_free(l_tmp_data); - opj_free(l_tmp_ptr); - return 00; - } - - l_encoding_value_ptr = l_tmp_data; - /* update pointer array*/ - for (compno = 0; compno < p_image->numcomps; ++compno) { - l_tmp_ptr[compno] = l_encoding_value_ptr; - l_encoding_value_ptr += l_data_stride; - } - - /* get encoding parameters*/ - opj_get_all_encoding_parameters(p_image,p_cp,p_tile_no,&l_tx0,&l_tx1,&l_ty0,&l_ty1,&l_dx_min,&l_dy_min,&l_max_prec,&l_max_res,l_tmp_ptr); - - /* step calculations*/ - l_step_p = 1; - l_step_c = l_max_prec * l_step_p; - l_step_r = p_image->numcomps * l_step_c; - l_step_l = l_max_res * l_step_r; - - /* set values for first packet iterator*/ - l_pi->tp_on = p_cp->m_specific_param.m_enc.m_tp_on; - l_current_pi = l_pi; - - /* memory allocation for include*/ - l_current_pi->include = (OPJ_INT16*) opj_calloc(l_tcp->numlayers * l_step_l, sizeof(OPJ_INT16)); - if (!l_current_pi->include) { - opj_free(l_tmp_data); - opj_free(l_tmp_ptr); - opj_pi_destroy(l_pi, l_bound); - return 00; - } - memset(l_current_pi->include,0,l_tcp->numlayers * l_step_l* sizeof(OPJ_INT16)); - - /* special treatment for the first packet iterator*/ - l_current_comp = l_current_pi->comps; - l_img_comp = p_image->comps; - l_tccp = l_tcp->tccps; - l_current_pi->tx0 = l_tx0; - l_current_pi->ty0 = l_ty0; - l_current_pi->tx1 = l_tx1; - l_current_pi->ty1 = l_ty1; - l_current_pi->dx = l_dx_min; - l_current_pi->dy = l_dy_min; - l_current_pi->step_p = l_step_p; - l_current_pi->step_c = l_step_c; - l_current_pi->step_r = l_step_r; - l_current_pi->step_l = l_step_l; - - /* allocation for components and number of components has already been calculated by opj_pi_create */ - for (compno = 0; compno < l_current_pi->numcomps; ++compno) { - opj_pi_resolution_t *l_res = l_current_comp->resolutions; - l_encoding_value_ptr = l_tmp_ptr[compno]; - - l_current_comp->dx = l_img_comp->dx; - l_current_comp->dy = l_img_comp->dy; - - /* resolutions have already been initialized */ - for (resno = 0; resno < l_current_comp->numresolutions; resno++) { - l_res->pdx = *(l_encoding_value_ptr++); - l_res->pdy = *(l_encoding_value_ptr++); - l_res->pw = *(l_encoding_value_ptr++); - l_res->ph = *(l_encoding_value_ptr++); - ++l_res; - } - - ++l_current_comp; - ++l_img_comp; - ++l_tccp; - } - ++l_current_pi; - - for (pino = 1 ; pinocomps; - l_img_comp = p_image->comps; - l_tccp = l_tcp->tccps; - - l_current_pi->tx0 = l_tx0; - l_current_pi->ty0 = l_ty0; - l_current_pi->tx1 = l_tx1; - l_current_pi->ty1 = l_ty1; - l_current_pi->dx = l_dx_min; - l_current_pi->dy = l_dy_min; - l_current_pi->step_p = l_step_p; - l_current_pi->step_c = l_step_c; - l_current_pi->step_r = l_step_r; - l_current_pi->step_l = l_step_l; - - /* allocation for components and number of components has already been calculated by opj_pi_create */ - for (compno = 0; compno < l_current_pi->numcomps; ++compno) { - opj_pi_resolution_t *l_res = l_current_comp->resolutions; - l_encoding_value_ptr = l_tmp_ptr[compno]; - - l_current_comp->dx = l_img_comp->dx; - l_current_comp->dy = l_img_comp->dy; - /* resolutions have already been initialized */ - for (resno = 0; resno < l_current_comp->numresolutions; resno++) { - l_res->pdx = *(l_encoding_value_ptr++); - l_res->pdy = *(l_encoding_value_ptr++); - l_res->pw = *(l_encoding_value_ptr++); - l_res->ph = *(l_encoding_value_ptr++); - ++l_res; - } - ++l_current_comp; - ++l_img_comp; - ++l_tccp; - } - - /* special treatment*/ - l_current_pi->include = (l_current_pi-1)->include; - ++l_current_pi; - } - - opj_free(l_tmp_data); - l_tmp_data = 00; - opj_free(l_tmp_ptr); - l_tmp_ptr = 00; - - if (l_tcp->POC && ( p_cp->m_specific_param.m_enc.m_cinema || p_t2_mode == FINAL_PASS)) { - opj_pi_update_encode_poc_and_final(p_cp,p_tile_no,l_tx0,l_tx1,l_ty0,l_ty1,l_max_prec,l_max_res,l_dx_min,l_dy_min); - } - else { - opj_pi_update_encode_not_poc(p_cp,p_image->numcomps,p_tile_no,l_tx0,l_tx1,l_ty0,l_ty1,l_max_prec,l_max_res,l_dx_min,l_dy_min); - } - - return l_pi; -} - -void opj_pi_create_encode( opj_pi_iterator_t *pi, - opj_cp_t *cp, - OPJ_UINT32 tileno, - OPJ_UINT32 pino, - OPJ_UINT32 tpnum, - OPJ_INT32 tppos, - J2K_T2_MODE t2_mode) -{ - const OPJ_CHAR *prog; - OPJ_INT32 i; - OPJ_UINT32 incr_top=1,resetX=0; - opj_tcp_t *tcps =&cp->tcps[tileno]; - opj_poc_t *tcp= &tcps->pocs[pino]; - - prog = opj_j2k_convert_progression_order(tcp->prg); - - pi[pino].first = 1; - pi[pino].poc.prg = tcp->prg; - - if(!(cp->m_specific_param.m_enc.m_tp_on && ((!cp->m_specific_param.m_enc.m_cinema && (t2_mode == FINAL_PASS)) || cp->m_specific_param.m_enc.m_cinema))){ - pi[pino].poc.resno0 = tcp->resS; - pi[pino].poc.resno1 = tcp->resE; - pi[pino].poc.compno0 = tcp->compS; - pi[pino].poc.compno1 = tcp->compE; - pi[pino].poc.layno0 = tcp->layS; - pi[pino].poc.layno1 = tcp->layE; - pi[pino].poc.precno0 = tcp->prcS; - pi[pino].poc.precno1 = tcp->prcE; - pi[pino].poc.tx0 = (OPJ_INT32)tcp->txS; - pi[pino].poc.ty0 = (OPJ_INT32)tcp->tyS; - pi[pino].poc.tx1 = (OPJ_INT32)tcp->txE; - pi[pino].poc.ty1 = (OPJ_INT32)tcp->tyE; - }else { - for(i=tppos+1;i<4;i++){ - switch(prog[i]){ - case 'R': - pi[pino].poc.resno0 = tcp->resS; - pi[pino].poc.resno1 = tcp->resE; - break; - case 'C': - pi[pino].poc.compno0 = tcp->compS; - pi[pino].poc.compno1 = tcp->compE; - break; - case 'L': - pi[pino].poc.layno0 = tcp->layS; - pi[pino].poc.layno1 = tcp->layE; - break; - case 'P': - switch(tcp->prg){ - case OPJ_LRCP: - case OPJ_RLCP: - pi[pino].poc.precno0 = tcp->prcS; - pi[pino].poc.precno1 = tcp->prcE; - break; - default: - pi[pino].poc.tx0 = (OPJ_INT32)tcp->txS; - pi[pino].poc.ty0 = (OPJ_INT32)tcp->tyS; - pi[pino].poc.tx1 = (OPJ_INT32)tcp->txE; - pi[pino].poc.ty1 = (OPJ_INT32)tcp->tyE; - break; - } - break; - } - } - - if(tpnum==0){ - for(i=tppos;i>=0;i--){ - switch(prog[i]){ - case 'C': - tcp->comp_t = tcp->compS; - pi[pino].poc.compno0 = tcp->comp_t; - pi[pino].poc.compno1 = tcp->comp_t+1; - tcp->comp_t+=1; - break; - case 'R': - tcp->res_t = tcp->resS; - pi[pino].poc.resno0 = tcp->res_t; - pi[pino].poc.resno1 = tcp->res_t+1; - tcp->res_t+=1; - break; - case 'L': - tcp->lay_t = tcp->layS; - pi[pino].poc.layno0 = tcp->lay_t; - pi[pino].poc.layno1 = tcp->lay_t+1; - tcp->lay_t+=1; - break; - case 'P': - switch(tcp->prg){ - case OPJ_LRCP: - case OPJ_RLCP: - tcp->prc_t = tcp->prcS; - pi[pino].poc.precno0 = tcp->prc_t; - pi[pino].poc.precno1 = tcp->prc_t+1; - tcp->prc_t+=1; - break; - default: - tcp->tx0_t = tcp->txS; - tcp->ty0_t = tcp->tyS; - pi[pino].poc.tx0 = (OPJ_INT32)tcp->tx0_t; - pi[pino].poc.tx1 = (OPJ_INT32)(tcp->tx0_t + tcp->dx - (tcp->tx0_t % tcp->dx)); - pi[pino].poc.ty0 = (OPJ_INT32)tcp->ty0_t; - pi[pino].poc.ty1 = (OPJ_INT32)(tcp->ty0_t + tcp->dy - (tcp->ty0_t % tcp->dy)); - tcp->tx0_t = (OPJ_UINT32)pi[pino].poc.tx1; - tcp->ty0_t = (OPJ_UINT32)pi[pino].poc.ty1; - break; - } - break; - } - } - incr_top=1; - }else{ - for(i=tppos;i>=0;i--){ - switch(prog[i]){ - case 'C': - pi[pino].poc.compno0 = tcp->comp_t-1; - pi[pino].poc.compno1 = tcp->comp_t; - break; - case 'R': - pi[pino].poc.resno0 = tcp->res_t-1; - pi[pino].poc.resno1 = tcp->res_t; - break; - case 'L': - pi[pino].poc.layno0 = tcp->lay_t-1; - pi[pino].poc.layno1 = tcp->lay_t; - break; - case 'P': - switch(tcp->prg){ - case OPJ_LRCP: - case OPJ_RLCP: - pi[pino].poc.precno0 = tcp->prc_t-1; - pi[pino].poc.precno1 = tcp->prc_t; - break; - default: - pi[pino].poc.tx0 = (OPJ_INT32)(tcp->tx0_t - tcp->dx - (tcp->tx0_t % tcp->dx)); - pi[pino].poc.tx1 = (OPJ_INT32)tcp->tx0_t ; - pi[pino].poc.ty0 = (OPJ_INT32)(tcp->ty0_t - tcp->dy - (tcp->ty0_t % tcp->dy)); - pi[pino].poc.ty1 = (OPJ_INT32)tcp->ty0_t ; - break; - } - break; - } - if(incr_top==1){ - switch(prog[i]){ - case 'R': - if(tcp->res_t==tcp->resE){ - if(opj_pi_check_next_level(i-1,cp,tileno,pino,prog)){ - tcp->res_t = tcp->resS; - pi[pino].poc.resno0 = tcp->res_t; - pi[pino].poc.resno1 = tcp->res_t+1; - tcp->res_t+=1; - incr_top=1; - }else{ - incr_top=0; - } - }else{ - pi[pino].poc.resno0 = tcp->res_t; - pi[pino].poc.resno1 = tcp->res_t+1; - tcp->res_t+=1; - incr_top=0; - } - break; - case 'C': - if(tcp->comp_t ==tcp->compE){ - if(opj_pi_check_next_level(i-1,cp,tileno,pino,prog)){ - tcp->comp_t = tcp->compS; - pi[pino].poc.compno0 = tcp->comp_t; - pi[pino].poc.compno1 = tcp->comp_t+1; - tcp->comp_t+=1; - incr_top=1; - }else{ - incr_top=0; - } - }else{ - pi[pino].poc.compno0 = tcp->comp_t; - pi[pino].poc.compno1 = tcp->comp_t+1; - tcp->comp_t+=1; - incr_top=0; - } - break; - case 'L': - if(tcp->lay_t == tcp->layE){ - if(opj_pi_check_next_level(i-1,cp,tileno,pino,prog)){ - tcp->lay_t = tcp->layS; - pi[pino].poc.layno0 = tcp->lay_t; - pi[pino].poc.layno1 = tcp->lay_t+1; - tcp->lay_t+=1; - incr_top=1; - }else{ - incr_top=0; - } - }else{ - pi[pino].poc.layno0 = tcp->lay_t; - pi[pino].poc.layno1 = tcp->lay_t+1; - tcp->lay_t+=1; - incr_top=0; - } - break; - case 'P': - switch(tcp->prg){ - case OPJ_LRCP: - case OPJ_RLCP: - if(tcp->prc_t == tcp->prcE){ - if(opj_pi_check_next_level(i-1,cp,tileno,pino,prog)){ - tcp->prc_t = tcp->prcS; - pi[pino].poc.precno0 = tcp->prc_t; - pi[pino].poc.precno1 = tcp->prc_t+1; - tcp->prc_t+=1; - incr_top=1; - }else{ - incr_top=0; - } - }else{ - pi[pino].poc.precno0 = tcp->prc_t; - pi[pino].poc.precno1 = tcp->prc_t+1; - tcp->prc_t+=1; - incr_top=0; - } - break; - default: - if(tcp->tx0_t >= tcp->txE){ - if(tcp->ty0_t >= tcp->tyE){ - if(opj_pi_check_next_level(i-1,cp,tileno,pino,prog)){ - tcp->ty0_t = tcp->tyS; - pi[pino].poc.ty0 = (OPJ_INT32)tcp->ty0_t; - pi[pino].poc.ty1 = (OPJ_INT32)(tcp->ty0_t + tcp->dy - (tcp->ty0_t % tcp->dy)); - tcp->ty0_t = (OPJ_UINT32)pi[pino].poc.ty1; - incr_top=1;resetX=1; - }else{ - incr_top=0;resetX=0; - } - }else{ - pi[pino].poc.ty0 = (OPJ_INT32)tcp->ty0_t; - pi[pino].poc.ty1 = (OPJ_INT32)(tcp->ty0_t + tcp->dy - (tcp->ty0_t % tcp->dy)); - tcp->ty0_t = (OPJ_UINT32)pi[pino].poc.ty1; - incr_top=0;resetX=1; - } - if(resetX==1){ - tcp->tx0_t = tcp->txS; - pi[pino].poc.tx0 = (OPJ_INT32)tcp->tx0_t; - pi[pino].poc.tx1 = (OPJ_INT32)(tcp->tx0_t + tcp->dx- (tcp->tx0_t % tcp->dx)); - tcp->tx0_t = (OPJ_UINT32)pi[pino].poc.tx1; - } - }else{ - pi[pino].poc.tx0 = (OPJ_INT32)tcp->tx0_t; - pi[pino].poc.tx1 = (OPJ_INT32)(tcp->tx0_t + tcp->dx- (tcp->tx0_t % tcp->dx)); - tcp->tx0_t = (OPJ_UINT32)pi[pino].poc.tx1; - incr_top=0; - } - break; - } - break; - } - } - } - } - } -} - -void opj_pi_destroy(opj_pi_iterator_t *p_pi, - OPJ_UINT32 p_nb_elements) -{ - OPJ_UINT32 compno, pino; - opj_pi_iterator_t *l_current_pi = p_pi; - if (p_pi) { - if (p_pi->include) { - opj_free(p_pi->include); - p_pi->include = 00; - } - for (pino = 0; pino < p_nb_elements; ++pino){ - if(l_current_pi->comps) { - opj_pi_comp_t *l_current_component = l_current_pi->comps; - for (compno = 0; compno < l_current_pi->numcomps; compno++){ - if(l_current_component->resolutions) { - opj_free(l_current_component->resolutions); - l_current_component->resolutions = 00; - } - - ++l_current_component; - } - opj_free(l_current_pi->comps); - l_current_pi->comps = 0; - } - ++l_current_pi; - } - opj_free(p_pi); - } -} - - - -void opj_pi_update_encoding_parameters( const opj_image_t *p_image, - opj_cp_t *p_cp, - OPJ_UINT32 p_tile_no ) -{ - /* encoding parameters to set */ - OPJ_UINT32 l_max_res; - OPJ_UINT32 l_max_prec; - OPJ_INT32 l_tx0,l_tx1,l_ty0,l_ty1; - OPJ_UINT32 l_dx_min,l_dy_min; - - /* pointers */ - opj_tcp_t *l_tcp = 00; - - /* preconditions */ - assert(p_cp != 00); - assert(p_image != 00); - assert(p_tile_no < p_cp->tw * p_cp->th); - - l_tcp = &(p_cp->tcps[p_tile_no]); - - /* get encoding parameters */ - opj_get_encoding_parameters(p_image,p_cp,p_tile_no,&l_tx0,&l_tx1,&l_ty0,&l_ty1,&l_dx_min,&l_dy_min,&l_max_prec,&l_max_res); - - if (l_tcp->POC) { - opj_pi_update_encode_poc_and_final(p_cp,p_tile_no,l_tx0,l_tx1,l_ty0,l_ty1,l_max_prec,l_max_res,l_dx_min,l_dy_min); - } - else { - opj_pi_update_encode_not_poc(p_cp,p_image->numcomps,p_tile_no,l_tx0,l_tx1,l_ty0,l_ty1,l_max_prec,l_max_res,l_dx_min,l_dy_min); - } -} - -OPJ_BOOL opj_pi_next(opj_pi_iterator_t * pi) { - switch (pi->poc.prg) { - case OPJ_LRCP: - return opj_pi_next_lrcp(pi); - case OPJ_RLCP: - return opj_pi_next_rlcp(pi); - case OPJ_RPCL: - return opj_pi_next_rpcl(pi); - case OPJ_PCRL: - return opj_pi_next_pcrl(pi); - case OPJ_CPRL: - return opj_pi_next_cprl(pi); - case OPJ_PROG_UNKNOWN: - return OPJ_FALSE; - } - - return OPJ_FALSE; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/pi.h b/Dependencies/FreeImage/Source/LibOpenJPEG/pi.h deleted file mode 100644 index 605ddbc..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/pi.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __PI_H -#define __PI_H -/** -@file pi.h -@brief Implementation of a packet iterator (PI) - -The functions in PI.C have for goal to realize a packet iterator that permits to get the next -packet following the progression order and change of it. The functions in PI.C are used -by some function in T2.C. -*/ - -/** @defgroup PI PI - Implementation of a packet iterator */ -/*@{*/ - -/** -FIXME DOC -*/ -typedef struct opj_pi_resolution { - OPJ_UINT32 pdx, pdy; - OPJ_UINT32 pw, ph; -} opj_pi_resolution_t; - -/** -FIXME DOC -*/ -typedef struct opj_pi_comp { - OPJ_UINT32 dx, dy; - /** number of resolution levels */ - OPJ_UINT32 numresolutions; - opj_pi_resolution_t *resolutions; -} opj_pi_comp_t; - -/** -Packet iterator -*/ -typedef struct opj_pi_iterator { - /** Enabling Tile part generation*/ - OPJ_BYTE tp_on; - /** precise if the packet has been already used (usefull for progression order change) */ - OPJ_INT16 *include; - /** layer step used to localize the packet in the include vector */ - OPJ_UINT32 step_l; - /** resolution step used to localize the packet in the include vector */ - OPJ_UINT32 step_r; - /** component step used to localize the packet in the include vector */ - OPJ_UINT32 step_c; - /** precinct step used to localize the packet in the include vector */ - OPJ_UINT32 step_p; - /** component that identify the packet */ - OPJ_UINT32 compno; - /** resolution that identify the packet */ - OPJ_UINT32 resno; - /** precinct that identify the packet */ - OPJ_UINT32 precno; - /** layer that identify the packet */ - OPJ_UINT32 layno; - /** 0 if the first packet */ - OPJ_BOOL first; - /** progression order change information */ - opj_poc_t poc; - /** number of components in the image */ - OPJ_UINT32 numcomps; - /** Components*/ - opj_pi_comp_t *comps; - /** FIXME DOC*/ - OPJ_INT32 tx0, ty0, tx1, ty1; - /** FIXME DOC*/ - OPJ_INT32 x, y; - /** FIXME DOC*/ - OPJ_UINT32 dx, dy; -} opj_pi_iterator_t; - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** - * Creates a packet iterator for encoding. - * - * @param image the image being encoded. - * @param cp the coding parameters. - * @param tileno index of the tile being encoded. - * @param t2_mode the type of pass for generating the packet iterator - * - * @return a list of packet iterator that points to the first packet of the tile (not true). -*/ -opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *image, - opj_cp_t *cp, - OPJ_UINT32 tileno, - J2K_T2_MODE t2_mode); - -/** - * Updates the encoding parameters of the codec. - * - * @param p_image the image being encoded. - * @param p_cp the coding parameters. - * @param p_tile_no index of the tile being encoded. -*/ -void opj_pi_update_encoding_parameters( const opj_image_t *p_image, - opj_cp_t *p_cp, - OPJ_UINT32 p_tile_no ); - -/** -Modify the packet iterator for enabling tile part generation -@param pi Handle to the packet iterator generated in pi_initialise_encode -@param cp Coding parameters -@param tileno Number that identifies the tile for which to list the packets -@param pino FIXME DOC -@param tpnum Tile part number of the current tile -@param tppos The position of the tile part flag in the progression order -@param t2_mode FIXME DOC -*/ -void opj_pi_create_encode( opj_pi_iterator_t *pi, - opj_cp_t *cp, - OPJ_UINT32 tileno, - OPJ_UINT32 pino, - OPJ_UINT32 tpnum, - OPJ_INT32 tppos, - J2K_T2_MODE t2_mode); - -/** -Create a packet iterator for Decoder -@param image Raw image for which the packets will be listed -@param cp Coding parameters -@param tileno Number that identifies the tile for which to list the packets -@return Returns a packet iterator that points to the first packet of the tile -@see opj_pi_destroy -*/ -opj_pi_iterator_t *opj_pi_create_decode(opj_image_t * image, - opj_cp_t * cp, - OPJ_UINT32 tileno); -/** - * Destroys a packet iterator array. - * - * @param p_pi the packet iterator array to destroy. - * @param p_nb_elements the number of elements in the array. - */ -void opj_pi_destroy(opj_pi_iterator_t *p_pi, - OPJ_UINT32 p_nb_elements); - -/** -Modify the packet iterator to point to the next packet -@param pi Packet iterator to modify -@return Returns false if pi pointed to the last packet or else returns true -*/ -OPJ_BOOL opj_pi_next(opj_pi_iterator_t * pi); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __PI_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/ppix_manager.c b/Dependencies/FreeImage/Source/LibOpenJPEG/ppix_manager.c deleted file mode 100644 index e93db2d..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/ppix_manager.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * $Id: ppix_manager.c,v 1.4 2014/03/16 12:29:52 drolon Exp $ - * - * Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2011, Professor Benoit Macq - * Copyright (c) 2003-2004, Yannick Verschueren - * Copyright (c) 2010-2011, Kaori Hagihara - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/*! \file - * \brief Modification of jpip.c from 2KAN indexer - */ - -#include "opj_includes.h" - -/* - * Write faix box of ppix - * - * @param[in] coff offset of j2k codestream - * @param[in] compno component number - * @param[in] cstr_info codestream information - * @param[in] EPHused true if if EPH option used - * @param[in] j2klen length of j2k codestream - * @param[in] cio file output handle - * @return length of faix box - */ - - -int opj_write_ppix( int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_BYTE l_data_header [4]; - int compno, i; - opj_jp2_box_t *box; - OPJ_OFF_T lenp; - OPJ_UINT32 len; - - /* printf("cstr_info.packno %d\n", cstr_info.packno); //NMAX? */ - - lenp = -1; - box = (opj_jp2_box_t *)opj_calloc( (size_t)cstr_info.numcomps, sizeof(opj_jp2_box_t)); - - for (i=0;i<2;i++){ - if (i) - - opj_stream_seek( cio, lenp, p_manager); - - lenp = (OPJ_UINT32)(opj_stream_tell(cio)); - opj_stream_skip( cio, 4, p_manager); /* L [at the end] */ - opj_write_bytes(l_data_header,JPIP_PPIX,4);/* PPIX */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - - opj_write_manf( i, cstr_info.numcomps, box, cio, p_manager); - - for (compno=0; compno pow( 2, 32)){ - size_of_coding = 8; - version = 1; - } - else{ - size_of_coding = 4; - version = 0; - } - - lenp = opj_stream_tell(cio); - opj_stream_skip(cio, 4, p_manager); /* L [at the end] */ - opj_write_bytes(l_data_header,JPIP_FAIX,4); /* FAIX */ - opj_write_bytes(l_data_header,version,1); - opj_stream_write_data(cio,l_data_header,1,p_manager);/* Version 0 = 4 bytes */ - - nmax = 0; - for( i=0; i<=(OPJ_UINT32)cstr_info.numdecompos[compno]; i++) - nmax += (OPJ_UINT32)(cstr_info.tile[0].ph[i] * cstr_info.tile[0].pw[i] * cstr_info.numlayers); - - opj_write_bytes(l_data_header,nmax,size_of_coding); /* NMAX */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - opj_write_bytes(l_data_header,(OPJ_UINT32)(cstr_info.tw*cstr_info.th),size_of_coding); /* M */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - - for( tileno=0; tileno<(OPJ_UINT32)(cstr_info.tw*cstr_info.th); tileno++){ - tile_Idx = &cstr_info.tile[ tileno]; - - num_packet=0; - numOfres = cstr_info.numdecompos[compno] + 1; - - for( resno=0; resnopw[resno]*tile_Idx->ph[resno]; - for( precno=0; precnopacket[ ((layno*numOfres+resno)*cstr_info.numcomps+compno)*numOfprec+precno]; - break; - case OPJ_RLCP: - packet = tile_Idx->packet[ ((resno*numOflayers+layno)*cstr_info.numcomps+compno)*numOfprec+precno]; - break; - case OPJ_RPCL: - packet = tile_Idx->packet[ ((resno*numOfprec+precno)*cstr_info.numcomps+compno)*numOflayers+layno]; - break; - case OPJ_PCRL: - packet = tile_Idx->packet[ ((precno*cstr_info.numcomps+compno)*numOfres+resno)*numOflayers + layno]; - break; - case OPJ_CPRL: - packet = tile_Idx->packet[ ((compno*numOfprec+precno)*numOfres+resno)*numOflayers + layno]; - break; - default: - fprintf( stderr, "failed to ppix indexing\n"); - } - - opj_write_bytes(l_data_header,(OPJ_UINT32)(packet.start_pos-coff),size_of_coding); /* start position */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - opj_write_bytes(l_data_header,(OPJ_UINT32)(packet.end_pos-packet.start_pos+1),size_of_coding); /* length */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - - num_packet++; - } - } - } - - while( num_packet < nmax){ /* PADDING */ - opj_write_bytes(l_data_header,0,size_of_coding);/* start position */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - opj_write_bytes(l_data_header,0,size_of_coding);/* length */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - num_packet++; - } - } - - len = (OPJ_UINT32)(opj_stream_tell(cio)-lenp); - opj_stream_seek(cio, lenp,p_manager); - opj_write_bytes(l_data_header,len,4);/* L */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_stream_seek(cio, lenp+len,p_manager); - - return (int)len; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/raw.c b/Dependencies/FreeImage/Source/LibOpenJPEG/raw.c deleted file mode 100644 index 8e705cc..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/raw.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -/* -========================================================== - local functions -========================================================== -*/ - - -/* -========================================================== - RAW encoding interface -========================================================== -*/ - -opj_raw_t* opj_raw_create(void) { - opj_raw_t *raw = (opj_raw_t*)opj_malloc(sizeof(opj_raw_t)); - return raw; -} - -void opj_raw_destroy(opj_raw_t *raw) { - if(raw) { - opj_free(raw); - } -} - -OPJ_UINT32 opj_raw_numbytes(opj_raw_t *raw) { - const ptrdiff_t diff = raw->bp - raw->start; - assert( diff <= (ptrdiff_t)0xffffffff && diff >= 0 ); /* UINT32_MAX */ - return (OPJ_UINT32)diff; -} - -void opj_raw_init_dec(opj_raw_t *raw, OPJ_BYTE *bp, OPJ_UINT32 len) { - raw->start = bp; - raw->lenmax = len; - raw->len = 0; - raw->c = 0; - raw->ct = 0; -} - -OPJ_UINT32 opj_raw_decode(opj_raw_t *raw) { - OPJ_UINT32 d; - if (raw->ct == 0) { - raw->ct = 8; - if (raw->len == raw->lenmax) { - raw->c = 0xff; - } else { - if (raw->c == 0xff) { - raw->ct = 7; - } - raw->c = *(raw->start + raw->len); - raw->len++; - } - } - raw->ct--; - d = (raw->c >> raw->ct) & 0x01; - - return d; -} - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/raw.h b/Dependencies/FreeImage/Source/LibOpenJPEG/raw.h deleted file mode 100644 index 6ae6239..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/raw.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __RAW_H -#define __RAW_H -/** -@file raw.h -@brief Implementation of operations for raw encoding (RAW) - -The functions in RAW.C have for goal to realize the operation of raw encoding linked -with the corresponding mode switch. -*/ - -/** @defgroup RAW RAW - Implementation of operations for raw encoding */ -/*@{*/ - -/** -RAW encoding operations -*/ -typedef struct opj_raw { - /** temporary buffer where bits are coded or decoded */ - OPJ_BYTE c; - /** number of bits already read or free to write */ - OPJ_UINT32 ct; - /** maximum length to decode */ - OPJ_UINT32 lenmax; - /** length decoded */ - OPJ_UINT32 len; - /** pointer to the current position in the buffer */ - OPJ_BYTE *bp; - /** pointer to the start of the buffer */ - OPJ_BYTE *start; - /** pointer to the end of the buffer */ - OPJ_BYTE *end; -} opj_raw_t; - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Create a new RAW handle -@return Returns a new RAW handle if successful, returns NULL otherwise -*/ -opj_raw_t* opj_raw_create(void); -/** -Destroy a previously created RAW handle -@param raw RAW handle to destroy -*/ -void opj_raw_destroy(opj_raw_t *raw); -/** -Return the number of bytes written/read since initialisation -@param raw RAW handle to destroy -@return Returns the number of bytes already encoded -*/ -OPJ_UINT32 opj_raw_numbytes(opj_raw_t *raw); -/** -Initialize the decoder -@param raw RAW handle -@param bp Pointer to the start of the buffer from which the bytes will be read -@param len Length of the input buffer -*/ -void opj_raw_init_dec(opj_raw_t *raw, OPJ_BYTE *bp, OPJ_UINT32 len); -/** -Decode a symbol using raw-decoder. Cfr p.506 TAUBMAN -@param raw RAW handle -@return Returns the decoded symbol (0 or 1) -*/ -OPJ_UINT32 opj_raw_decode(opj_raw_t *raw); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __RAW_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/t1.c b/Dependencies/FreeImage/Source/LibOpenJPEG/t1.c deleted file mode 100644 index 59a219d..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/t1.c +++ /dev/null @@ -1,1751 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2007, Callum Lerwick - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" -#include "t1_luts.h" - -/** @defgroup T1 T1 - Implementation of the tier-1 coding */ -/*@{*/ - -/** @name Local static functions */ -/*@{*/ - -static INLINE OPJ_BYTE opj_t1_getctxno_zc(OPJ_UINT32 f, OPJ_UINT32 orient); -static OPJ_BYTE opj_t1_getctxno_sc(OPJ_UINT32 f); -static INLINE OPJ_UINT32 opj_t1_getctxno_mag(OPJ_UINT32 f); -static OPJ_BYTE opj_t1_getspb(OPJ_UINT32 f); -static OPJ_INT16 opj_t1_getnmsedec_sig(OPJ_UINT32 x, OPJ_UINT32 bitpos); -static OPJ_INT16 opj_t1_getnmsedec_ref(OPJ_UINT32 x, OPJ_UINT32 bitpos); -static void opj_t1_updateflags(opj_flag_t *flagsp, OPJ_UINT32 s, OPJ_UINT32 stride); -/** -Encode significant pass -*/ -static void opj_t1_enc_sigpass_step(opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_UINT32 orient, - OPJ_INT32 bpno, - OPJ_INT32 one, - OPJ_INT32 *nmsedec, - OPJ_BYTE type, - OPJ_UINT32 vsc); - -/** -Decode significant pass -*/ -#if 0 -static void opj_t1_dec_sigpass_step(opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_UINT32 orient, - OPJ_INT32 oneplushalf, - OPJ_BYTE type, - OPJ_UINT32 vsc); -#endif - -static INLINE void opj_t1_dec_sigpass_step_raw( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf, - OPJ_INT32 vsc); -static INLINE void opj_t1_dec_sigpass_step_mqc( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf); -static INLINE void opj_t1_dec_sigpass_step_mqc_vsc( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf, - OPJ_INT32 vsc); - - -/** -Encode significant pass -*/ -static void opj_t1_enc_sigpass( opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_UINT32 orient, - OPJ_INT32 *nmsedec, - OPJ_BYTE type, - OPJ_UINT32 cblksty); - -/** -Decode significant pass -*/ -static void opj_t1_dec_sigpass_raw( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 orient, - OPJ_INT32 cblksty); -static void opj_t1_dec_sigpass_mqc( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 orient); -static void opj_t1_dec_sigpass_mqc_vsc( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 orient); - - - -/** -Encode refinement pass -*/ -static void opj_t1_enc_refpass_step(opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 bpno, - OPJ_INT32 one, - OPJ_INT32 *nmsedec, - OPJ_BYTE type, - OPJ_UINT32 vsc); - - -/** -Encode refinement pass -*/ -static void opj_t1_enc_refpass( opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 *nmsedec, - OPJ_BYTE type, - OPJ_UINT32 cblksty); - -/** -Decode refinement pass -*/ -static void opj_t1_dec_refpass_raw( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 cblksty); -static void opj_t1_dec_refpass_mqc( - opj_t1_t *t1, - OPJ_INT32 bpno); -static void opj_t1_dec_refpass_mqc_vsc( - opj_t1_t *t1, - OPJ_INT32 bpno); - - -/** -Decode refinement pass -*/ -#if 0 -static void opj_t1_dec_refpass_step(opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 poshalf, - OPJ_INT32 neghalf, - OPJ_BYTE type, - OPJ_UINT32 vsc); -#endif - -static INLINE void opj_t1_dec_refpass_step_raw( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 poshalf, - OPJ_INT32 neghalf, - OPJ_INT32 vsc); -static INLINE void opj_t1_dec_refpass_step_mqc( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 poshalf, - OPJ_INT32 neghalf); -static INLINE void opj_t1_dec_refpass_step_mqc_vsc( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 poshalf, - OPJ_INT32 neghalf, - OPJ_INT32 vsc); - - - -/** -Encode clean-up pass -*/ -static void opj_t1_enc_clnpass_step( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_UINT32 orient, - OPJ_INT32 bpno, - OPJ_INT32 one, - OPJ_INT32 *nmsedec, - OPJ_UINT32 partial, - OPJ_UINT32 vsc); -/** -Decode clean-up pass -*/ -static void opj_t1_dec_clnpass_step_partial( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf); -static void opj_t1_dec_clnpass_step( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf); -static void opj_t1_dec_clnpass_step_vsc( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf, - OPJ_INT32 partial, - OPJ_INT32 vsc); -/** -Encode clean-up pass -*/ -static void opj_t1_enc_clnpass( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_UINT32 orient, - OPJ_INT32 *nmsedec, - OPJ_UINT32 cblksty); -/** -Decode clean-up pass -*/ -static void opj_t1_dec_clnpass( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 orient, - OPJ_INT32 cblksty); - -static OPJ_FLOAT64 opj_t1_getwmsedec( - OPJ_INT32 nmsedec, - OPJ_UINT32 compno, - OPJ_UINT32 level, - OPJ_UINT32 orient, - OPJ_INT32 bpno, - OPJ_UINT32 qmfbid, - OPJ_FLOAT64 stepsize, - OPJ_UINT32 numcomps, - const OPJ_FLOAT64 * mct_norms); - -static void opj_t1_encode_cblk( opj_t1_t *t1, - opj_tcd_cblk_enc_t* cblk, - OPJ_UINT32 orient, - OPJ_UINT32 compno, - OPJ_UINT32 level, - OPJ_UINT32 qmfbid, - OPJ_FLOAT64 stepsize, - OPJ_UINT32 cblksty, - OPJ_UINT32 numcomps, - opj_tcd_tile_t * tile, - const OPJ_FLOAT64 * mct_norms); - -/** -Decode 1 code-block -@param t1 T1 handle -@param cblk Code-block coding parameters -@param orient -@param roishift Region of interest shifting value -@param cblksty Code-block style -*/ -static OPJ_BOOL opj_t1_decode_cblk( opj_t1_t *t1, - opj_tcd_cblk_dec_t* cblk, - OPJ_UINT32 orient, - OPJ_UINT32 roishift, - OPJ_UINT32 cblksty); - -OPJ_BOOL opj_t1_allocate_buffers( opj_t1_t *t1, - OPJ_UINT32 w, - OPJ_UINT32 h); - -/*@}*/ - -/*@}*/ - -/* ----------------------------------------------------------------------- */ - -OPJ_BYTE opj_t1_getctxno_zc(OPJ_UINT32 f, OPJ_UINT32 orient) { - return lut_ctxno_zc[(orient << 8) | (f & T1_SIG_OTH)]; -} - -OPJ_BYTE opj_t1_getctxno_sc(OPJ_UINT32 f) { - return lut_ctxno_sc[(f & (T1_SIG_PRIM | T1_SGN)) >> 4]; -} - -OPJ_UINT32 opj_t1_getctxno_mag(OPJ_UINT32 f) { - OPJ_UINT32 tmp1 = (f & T1_SIG_OTH) ? T1_CTXNO_MAG + 1 : T1_CTXNO_MAG; - OPJ_UINT32 tmp2 = (f & T1_REFINE) ? T1_CTXNO_MAG + 2 : tmp1; - return (tmp2); -} - -OPJ_BYTE opj_t1_getspb(OPJ_UINT32 f) { - return lut_spb[(f & (T1_SIG_PRIM | T1_SGN)) >> 4]; -} - -OPJ_INT16 opj_t1_getnmsedec_sig(OPJ_UINT32 x, OPJ_UINT32 bitpos) { - if (bitpos > T1_NMSEDEC_FRACBITS) { - return lut_nmsedec_sig[(x >> (bitpos - T1_NMSEDEC_FRACBITS)) & ((1 << T1_NMSEDEC_BITS) - 1)]; - } - - return lut_nmsedec_sig0[x & ((1 << T1_NMSEDEC_BITS) - 1)]; -} - -OPJ_INT16 opj_t1_getnmsedec_ref(OPJ_UINT32 x, OPJ_UINT32 bitpos) { - if (bitpos > T1_NMSEDEC_FRACBITS) { - return lut_nmsedec_ref[(x >> (bitpos - T1_NMSEDEC_FRACBITS)) & ((1 << T1_NMSEDEC_BITS) - 1)]; - } - - return lut_nmsedec_ref0[x & ((1 << T1_NMSEDEC_BITS) - 1)]; -} - -void opj_t1_updateflags(opj_flag_t *flagsp, OPJ_UINT32 s, OPJ_UINT32 stride) { - opj_flag_t *np = flagsp - stride; - opj_flag_t *sp = flagsp + stride; - - static const opj_flag_t mod[] = { - T1_SIG_S, T1_SIG_S|T1_SGN_S, - T1_SIG_E, T1_SIG_E|T1_SGN_E, - T1_SIG_W, T1_SIG_W|T1_SGN_W, - T1_SIG_N, T1_SIG_N|T1_SGN_N - }; - - np[-1] |= T1_SIG_SE; - np[0] |= mod[s]; - np[1] |= T1_SIG_SW; - - flagsp[-1] |= mod[s+2]; - flagsp[0] |= T1_SIG; - flagsp[1] |= mod[s+4]; - - sp[-1] |= T1_SIG_NE; - sp[0] |= mod[s+6]; - sp[1] |= T1_SIG_NW; -} - -void opj_t1_enc_sigpass_step( opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_UINT32 orient, - OPJ_INT32 bpno, - OPJ_INT32 one, - OPJ_INT32 *nmsedec, - OPJ_BYTE type, - OPJ_UINT32 vsc - ) -{ - OPJ_INT32 v; - OPJ_UINT32 flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = vsc ? (OPJ_UINT32)((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (OPJ_UINT32)(*flagsp); - if ((flag & T1_SIG_OTH) && !(flag & (T1_SIG | T1_VISIT))) { - v = opj_int_abs(*datap) & one ? 1 : 0; - opj_mqc_setcurctx(mqc, opj_t1_getctxno_zc(flag, orient)); /* ESSAI */ - if (type == T1_TYPE_RAW) { /* BYPASS/LAZY MODE */ - opj_mqc_bypass_enc(mqc, (OPJ_UINT32)v); - } else { - opj_mqc_encode(mqc, (OPJ_UINT32)v); - } - if (v) { - v = *datap < 0 ? 1 : 0; - *nmsedec += opj_t1_getnmsedec_sig((OPJ_UINT32)opj_int_abs(*datap), (OPJ_UINT32)(bpno + T1_NMSEDEC_FRACBITS)); - opj_mqc_setcurctx(mqc, opj_t1_getctxno_sc(flag)); /* ESSAI */ - if (type == T1_TYPE_RAW) { /* BYPASS/LAZY MODE */ - opj_mqc_bypass_enc(mqc, (OPJ_UINT32)v); - } else { - opj_mqc_encode(mqc, (OPJ_UINT32)(v ^ opj_t1_getspb((OPJ_UINT32)flag))); - } - opj_t1_updateflags(flagsp, (OPJ_UINT32)v, t1->flags_stride); - } - *flagsp |= T1_VISIT; - } -} - - -static INLINE void opj_t1_dec_sigpass_step_raw( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf, - OPJ_INT32 vsc) -{ - OPJ_INT32 v, flag; - opj_raw_t *raw = t1->raw; /* RAW component */ - OPJ_ARG_NOT_USED(orient); - - flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); - if ((flag & T1_SIG_OTH) && !(flag & (T1_SIG | T1_VISIT))) { - if (opj_raw_decode(raw)) { - v = (OPJ_INT32)opj_raw_decode(raw); /* ESSAI */ - *datap = v ? -oneplushalf : oneplushalf; - opj_t1_updateflags(flagsp, (OPJ_UINT32)v, t1->flags_stride); - } - *flagsp |= T1_VISIT; - } -} - -INLINE void opj_t1_dec_sigpass_step_mqc( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf) -{ - OPJ_INT32 v, flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = *flagsp; - if ((flag & T1_SIG_OTH) && !(flag & (T1_SIG | T1_VISIT))) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_zc((OPJ_UINT32)flag, (OPJ_UINT32)orient)); - if (opj_mqc_decode(mqc)) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_sc((OPJ_UINT32)flag)); - v = opj_mqc_decode(mqc) ^ opj_t1_getspb((OPJ_UINT32)flag); - *datap = v ? -oneplushalf : oneplushalf; - opj_t1_updateflags(flagsp, (OPJ_UINT32)v, t1->flags_stride); - } - *flagsp |= T1_VISIT; - } -} /* VSC and BYPASS by Antonin */ - -INLINE void opj_t1_dec_sigpass_step_mqc_vsc( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf, - OPJ_INT32 vsc) -{ - OPJ_INT32 v, flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); - if ((flag & T1_SIG_OTH) && !(flag & (T1_SIG | T1_VISIT))) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_zc((OPJ_UINT32)flag, (OPJ_UINT32)orient)); - if (opj_mqc_decode(mqc)) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_sc((OPJ_UINT32)flag)); - v = opj_mqc_decode(mqc) ^ opj_t1_getspb((OPJ_UINT32)flag); - *datap = v ? -oneplushalf : oneplushalf; - opj_t1_updateflags(flagsp, (OPJ_UINT32)v, t1->flags_stride); - } - *flagsp |= T1_VISIT; - } -} /* VSC and BYPASS by Antonin */ - - - -void opj_t1_enc_sigpass(opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_UINT32 orient, - OPJ_INT32 *nmsedec, - OPJ_BYTE type, - OPJ_UINT32 cblksty - ) -{ - OPJ_UINT32 i, j, k, vsc; - OPJ_INT32 one; - - *nmsedec = 0; - one = 1 << (bpno + T1_NMSEDEC_FRACBITS); - for (k = 0; k < t1->h; k += 4) { - for (i = 0; i < t1->w; ++i) { - for (j = k; j < k + 4 && j < t1->h; ++j) { - vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0; - opj_t1_enc_sigpass_step( - t1, - &t1->flags[((j+1) * t1->flags_stride) + i + 1], - &t1->data[(j * t1->w) + i], - orient, - bpno, - one, - nmsedec, - type, - vsc); - } - } - } -} - -void opj_t1_dec_sigpass_raw( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 orient, - OPJ_INT32 cblksty) -{ - OPJ_INT32 one, half, oneplushalf, vsc; - OPJ_UINT32 i, j, k; - one = 1 << bpno; - half = one >> 1; - oneplushalf = one | half; - for (k = 0; k < t1->h; k += 4) { - for (i = 0; i < t1->w; ++i) { - for (j = k; j < k + 4 && j < t1->h; ++j) { - vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0; - opj_t1_dec_sigpass_step_raw( - t1, - &t1->flags[((j+1) * t1->flags_stride) + i + 1], - &t1->data[(j * t1->w) + i], - orient, - oneplushalf, - vsc); - } - } - } -} /* VSC and BYPASS by Antonin */ - -void opj_t1_dec_sigpass_mqc( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 orient) -{ - OPJ_INT32 one, half, oneplushalf; - OPJ_UINT32 i, j, k; - OPJ_INT32 *data1 = t1->data; - opj_flag_t *flags1 = &t1->flags[1]; - one = 1 << bpno; - half = one >> 1; - oneplushalf = one | half; - for (k = 0; k < (t1->h & ~3u); k += 4) { - for (i = 0; i < t1->w; ++i) { - OPJ_INT32 *data2 = data1 + i; - opj_flag_t *flags2 = flags1 + i; - flags2 += t1->flags_stride; - opj_t1_dec_sigpass_step_mqc(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - opj_t1_dec_sigpass_step_mqc(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - opj_t1_dec_sigpass_step_mqc(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - opj_t1_dec_sigpass_step_mqc(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - } - data1 += t1->w << 2; - flags1 += t1->flags_stride << 2; - } - for (i = 0; i < t1->w; ++i) { - OPJ_INT32 *data2 = data1 + i; - opj_flag_t *flags2 = flags1 + i; - for (j = k; j < t1->h; ++j) { - flags2 += t1->flags_stride; - opj_t1_dec_sigpass_step_mqc(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - } - } -} /* VSC and BYPASS by Antonin */ - -void opj_t1_dec_sigpass_mqc_vsc( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 orient) -{ - OPJ_INT32 one, half, oneplushalf, vsc; - OPJ_UINT32 i, j, k; - one = 1 << bpno; - half = one >> 1; - oneplushalf = one | half; - for (k = 0; k < t1->h; k += 4) { - for (i = 0; i < t1->w; ++i) { - for (j = k; j < k + 4 && j < t1->h; ++j) { - vsc = (j == k + 3 || j == t1->h - 1) ? 1 : 0; - opj_t1_dec_sigpass_step_mqc_vsc( - t1, - &t1->flags[((j+1) * t1->flags_stride) + i + 1], - &t1->data[(j * t1->w) + i], - orient, - oneplushalf, - vsc); - } - } - } -} /* VSC and BYPASS by Antonin */ - - - -void opj_t1_enc_refpass_step( opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 bpno, - OPJ_INT32 one, - OPJ_INT32 *nmsedec, - OPJ_BYTE type, - OPJ_UINT32 vsc) -{ - OPJ_INT32 v; - OPJ_UINT32 flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = vsc ? (OPJ_UINT32)((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (OPJ_UINT32)(*flagsp); - if ((flag & (T1_SIG | T1_VISIT)) == T1_SIG) { - *nmsedec += opj_t1_getnmsedec_ref((OPJ_UINT32)opj_int_abs(*datap), (OPJ_UINT32)(bpno + T1_NMSEDEC_FRACBITS)); - v = opj_int_abs(*datap) & one ? 1 : 0; - opj_mqc_setcurctx(mqc, opj_t1_getctxno_mag(flag)); /* ESSAI */ - if (type == T1_TYPE_RAW) { /* BYPASS/LAZY MODE */ - opj_mqc_bypass_enc(mqc, (OPJ_UINT32)v); - } else { - opj_mqc_encode(mqc, (OPJ_UINT32)v); - } - *flagsp |= T1_REFINE; - } -} - -INLINE void opj_t1_dec_refpass_step_raw( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 poshalf, - OPJ_INT32 neghalf, - OPJ_INT32 vsc) -{ - OPJ_INT32 v, t, flag; - - opj_raw_t *raw = t1->raw; /* RAW component */ - - flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); - if ((flag & (T1_SIG | T1_VISIT)) == T1_SIG) { - v = (OPJ_INT32)opj_raw_decode(raw); - t = v ? poshalf : neghalf; - *datap += *datap < 0 ? -t : t; - *flagsp |= T1_REFINE; - } -} /* VSC and BYPASS by Antonin */ - -INLINE void opj_t1_dec_refpass_step_mqc( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 poshalf, - OPJ_INT32 neghalf) -{ - OPJ_INT32 v, t, flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = *flagsp; - if ((flag & (T1_SIG | T1_VISIT)) == T1_SIG) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_mag((OPJ_UINT32)flag)); /* ESSAI */ - v = opj_mqc_decode(mqc); - t = v ? poshalf : neghalf; - *datap += *datap < 0 ? -t : t; - *flagsp |= T1_REFINE; - } -} /* VSC and BYPASS by Antonin */ - -INLINE void opj_t1_dec_refpass_step_mqc_vsc( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 poshalf, - OPJ_INT32 neghalf, - OPJ_INT32 vsc) -{ - OPJ_INT32 v, t, flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); - if ((flag & (T1_SIG | T1_VISIT)) == T1_SIG) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_mag((OPJ_UINT32)flag)); /* ESSAI */ - v = opj_mqc_decode(mqc); - t = v ? poshalf : neghalf; - *datap += *datap < 0 ? -t : t; - *flagsp |= T1_REFINE; - } -} /* VSC and BYPASS by Antonin */ - - -void opj_t1_enc_refpass( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 *nmsedec, - OPJ_BYTE type, - OPJ_UINT32 cblksty) -{ - OPJ_UINT32 i, j, k, vsc; - OPJ_INT32 one; - - *nmsedec = 0; - one = 1 << (bpno + T1_NMSEDEC_FRACBITS); - for (k = 0; k < t1->h; k += 4) { - for (i = 0; i < t1->w; ++i) { - for (j = k; j < k + 4 && j < t1->h; ++j) { - vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0; - opj_t1_enc_refpass_step( - t1, - &t1->flags[((j+1) * t1->flags_stride) + i + 1], - &t1->data[(j * t1->w) + i], - bpno, - one, - nmsedec, - type, - vsc); - } - } - } -} - -void opj_t1_dec_refpass_raw( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 cblksty) -{ - OPJ_INT32 one, poshalf, neghalf; - OPJ_UINT32 i, j, k; - OPJ_INT32 vsc; - one = 1 << bpno; - poshalf = one >> 1; - neghalf = bpno > 0 ? -poshalf : -1; - for (k = 0; k < t1->h; k += 4) { - for (i = 0; i < t1->w; ++i) { - for (j = k; j < k + 4 && j < t1->h; ++j) { - vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0; - opj_t1_dec_refpass_step_raw( - t1, - &t1->flags[((j+1) * t1->flags_stride) + i + 1], - &t1->data[(j * t1->w) + i], - poshalf, - neghalf, - vsc); - } - } - } -} /* VSC and BYPASS by Antonin */ - -void opj_t1_dec_refpass_mqc( - opj_t1_t *t1, - OPJ_INT32 bpno) -{ - OPJ_INT32 one, poshalf, neghalf; - OPJ_UINT32 i, j, k; - OPJ_INT32 *data1 = t1->data; - opj_flag_t *flags1 = &t1->flags[1]; - one = 1 << bpno; - poshalf = one >> 1; - neghalf = bpno > 0 ? -poshalf : -1; - for (k = 0; k < (t1->h & ~3u); k += 4) { - for (i = 0; i < t1->w; ++i) { - OPJ_INT32 *data2 = data1 + i; - opj_flag_t *flags2 = flags1 + i; - flags2 += t1->flags_stride; - opj_t1_dec_refpass_step_mqc(t1, flags2, data2, poshalf, neghalf); - data2 += t1->w; - flags2 += t1->flags_stride; - opj_t1_dec_refpass_step_mqc(t1, flags2, data2, poshalf, neghalf); - data2 += t1->w; - flags2 += t1->flags_stride; - opj_t1_dec_refpass_step_mqc(t1, flags2, data2, poshalf, neghalf); - data2 += t1->w; - flags2 += t1->flags_stride; - opj_t1_dec_refpass_step_mqc(t1, flags2, data2, poshalf, neghalf); - data2 += t1->w; - } - data1 += t1->w << 2; - flags1 += t1->flags_stride << 2; - } - for (i = 0; i < t1->w; ++i) { - OPJ_INT32 *data2 = data1 + i; - opj_flag_t *flags2 = flags1 + i; - for (j = k; j < t1->h; ++j) { - flags2 += t1->flags_stride; - opj_t1_dec_refpass_step_mqc(t1, flags2, data2, poshalf, neghalf); - data2 += t1->w; - } - } -} /* VSC and BYPASS by Antonin */ - -void opj_t1_dec_refpass_mqc_vsc( - opj_t1_t *t1, - OPJ_INT32 bpno) -{ - OPJ_INT32 one, poshalf, neghalf; - OPJ_UINT32 i, j, k; - OPJ_INT32 vsc; - one = 1 << bpno; - poshalf = one >> 1; - neghalf = bpno > 0 ? -poshalf : -1; - for (k = 0; k < t1->h; k += 4) { - for (i = 0; i < t1->w; ++i) { - for (j = k; j < k + 4 && j < t1->h; ++j) { - vsc = ((j == k + 3 || j == t1->h - 1)) ? 1 : 0; - opj_t1_dec_refpass_step_mqc_vsc( - t1, - &t1->flags[((j+1) * t1->flags_stride) + i + 1], - &t1->data[(j * t1->w) + i], - poshalf, - neghalf, - vsc); - } - } - } -} /* VSC and BYPASS by Antonin */ - - -void opj_t1_enc_clnpass_step( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_UINT32 orient, - OPJ_INT32 bpno, - OPJ_INT32 one, - OPJ_INT32 *nmsedec, - OPJ_UINT32 partial, - OPJ_UINT32 vsc) -{ - OPJ_INT32 v; - OPJ_UINT32 flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = vsc ? (OPJ_UINT32)((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (OPJ_UINT32)(*flagsp); - if (partial) { - goto LABEL_PARTIAL; - } - if (!(*flagsp & (T1_SIG | T1_VISIT))) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_zc(flag, orient)); - v = opj_int_abs(*datap) & one ? 1 : 0; - opj_mqc_encode(mqc, (OPJ_UINT32)v); - if (v) { -LABEL_PARTIAL: - *nmsedec += opj_t1_getnmsedec_sig((OPJ_UINT32)opj_int_abs(*datap), (OPJ_UINT32)(bpno + T1_NMSEDEC_FRACBITS)); - opj_mqc_setcurctx(mqc, opj_t1_getctxno_sc(flag)); - v = *datap < 0 ? 1 : 0; - opj_mqc_encode(mqc, (OPJ_UINT32)(v ^ opj_t1_getspb((OPJ_UINT32)flag))); - opj_t1_updateflags(flagsp, (OPJ_UINT32)v, t1->flags_stride); - } - } - *flagsp &= ~T1_VISIT; -} - -static void opj_t1_dec_clnpass_step_partial( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf) -{ - OPJ_INT32 v, flag; - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - OPJ_ARG_NOT_USED(orient); - - flag = *flagsp; - opj_mqc_setcurctx(mqc, opj_t1_getctxno_sc((OPJ_UINT32)flag)); - v = opj_mqc_decode(mqc) ^ opj_t1_getspb((OPJ_UINT32)flag); - *datap = v ? -oneplushalf : oneplushalf; - opj_t1_updateflags(flagsp, (OPJ_UINT32)v, t1->flags_stride); - *flagsp &= ~T1_VISIT; -} /* VSC and BYPASS by Antonin */ - -static void opj_t1_dec_clnpass_step( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf) -{ - OPJ_INT32 v, flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = *flagsp; - if (!(flag & (T1_SIG | T1_VISIT))) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_zc((OPJ_UINT32)flag, (OPJ_UINT32)orient)); - if (opj_mqc_decode(mqc)) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_sc((OPJ_UINT32)flag)); - v = opj_mqc_decode(mqc) ^ opj_t1_getspb((OPJ_UINT32)flag); - *datap = v ? -oneplushalf : oneplushalf; - opj_t1_updateflags(flagsp, (OPJ_UINT32)v, t1->flags_stride); - } - } - *flagsp &= ~T1_VISIT; -} /* VSC and BYPASS by Antonin */ - -static void opj_t1_dec_clnpass_step_vsc( - opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 orient, - OPJ_INT32 oneplushalf, - OPJ_INT32 partial, - OPJ_INT32 vsc) -{ - OPJ_INT32 v, flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); - if (partial) { - goto LABEL_PARTIAL; - } - if (!(flag & (T1_SIG | T1_VISIT))) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_zc((OPJ_UINT32)flag, (OPJ_UINT32)orient)); - if (opj_mqc_decode(mqc)) { -LABEL_PARTIAL: - opj_mqc_setcurctx(mqc, opj_t1_getctxno_sc((OPJ_UINT32)flag)); - v = opj_mqc_decode(mqc) ^ opj_t1_getspb((OPJ_UINT32)flag); - *datap = v ? -oneplushalf : oneplushalf; - opj_t1_updateflags(flagsp, (OPJ_UINT32)v, t1->flags_stride); - } - } - *flagsp &= ~T1_VISIT; -} - -void opj_t1_enc_clnpass( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_UINT32 orient, - OPJ_INT32 *nmsedec, - OPJ_UINT32 cblksty) -{ - OPJ_UINT32 i, j, k; - OPJ_INT32 one; - OPJ_UINT32 agg, runlen, vsc; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - *nmsedec = 0; - one = 1 << (bpno + T1_NMSEDEC_FRACBITS); - for (k = 0; k < t1->h; k += 4) { - for (i = 0; i < t1->w; ++i) { - if (k + 3 < t1->h) { - if (cblksty & J2K_CCP_CBLKSTY_VSC) { - agg = !(MACRO_t1_flags(1 + k,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || MACRO_t1_flags(1 + k + 1,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || MACRO_t1_flags(1 + k + 2,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || (MACRO_t1_flags(1 + k + 3,1 + i) - & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) & (T1_SIG | T1_VISIT | T1_SIG_OTH)); - } else { - agg = !(MACRO_t1_flags(1 + k,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || MACRO_t1_flags(1 + k + 1,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || MACRO_t1_flags(1 + k + 2,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || MACRO_t1_flags(1 + k + 3,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH)); - } - } else { - agg = 0; - } - if (agg) { - for (runlen = 0; runlen < 4; ++runlen) { - if (opj_int_abs(t1->data[((k + runlen)*t1->w) + i]) & one) - break; - } - opj_mqc_setcurctx(mqc, T1_CTXNO_AGG); - opj_mqc_encode(mqc, runlen != 4); - if (runlen == 4) { - continue; - } - opj_mqc_setcurctx(mqc, T1_CTXNO_UNI); - opj_mqc_encode(mqc, runlen >> 1); - opj_mqc_encode(mqc, runlen & 1); - } else { - runlen = 0; - } - for (j = k + runlen; j < k + 4 && j < t1->h; ++j) { - vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0; - opj_t1_enc_clnpass_step( - t1, - &t1->flags[((j+1) * t1->flags_stride) + i + 1], - &t1->data[(j * t1->w) + i], - orient, - bpno, - one, - nmsedec, - agg && (j == k + runlen), - vsc); - } - } - } -} - -static void opj_t1_dec_clnpass( - opj_t1_t *t1, - OPJ_INT32 bpno, - OPJ_INT32 orient, - OPJ_INT32 cblksty) -{ - OPJ_INT32 one, half, oneplushalf, agg, runlen, vsc; - OPJ_UINT32 i, j, k; - OPJ_INT32 segsym = cblksty & J2K_CCP_CBLKSTY_SEGSYM; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - one = 1 << bpno; - half = one >> 1; - oneplushalf = one | half; - if (cblksty & J2K_CCP_CBLKSTY_VSC) { - for (k = 0; k < t1->h; k += 4) { - for (i = 0; i < t1->w; ++i) { - if (k + 3 < t1->h) { - agg = !(MACRO_t1_flags(1 + k,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || MACRO_t1_flags(1 + k + 1,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || MACRO_t1_flags(1 + k + 2,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || (MACRO_t1_flags(1 + k + 3,1 + i) - & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) & (T1_SIG | T1_VISIT | T1_SIG_OTH)); - } else { - agg = 0; - } - if (agg) { - opj_mqc_setcurctx(mqc, T1_CTXNO_AGG); - if (!opj_mqc_decode(mqc)) { - continue; - } - opj_mqc_setcurctx(mqc, T1_CTXNO_UNI); - runlen = opj_mqc_decode(mqc); - runlen = (runlen << 1) | opj_mqc_decode(mqc); - } else { - runlen = 0; - } - for (j = k + (OPJ_UINT32)runlen; j < k + 4 && j < t1->h; ++j) { - vsc = (j == k + 3 || j == t1->h - 1) ? 1 : 0; - opj_t1_dec_clnpass_step_vsc( - t1, - &t1->flags[((j+1) * t1->flags_stride) + i + 1], - &t1->data[(j * t1->w) + i], - orient, - oneplushalf, - agg && (j == k + (OPJ_UINT32)runlen), - vsc); - } - } - } - } else { - OPJ_INT32 *data1 = t1->data; - opj_flag_t *flags1 = &t1->flags[1]; - for (k = 0; k < (t1->h & ~3u); k += 4) { - for (i = 0; i < t1->w; ++i) { - OPJ_INT32 *data2 = data1 + i; - opj_flag_t *flags2 = flags1 + i; - agg = !(MACRO_t1_flags(1 + k,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || MACRO_t1_flags(1 + k + 1,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || MACRO_t1_flags(1 + k + 2,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) - || MACRO_t1_flags(1 + k + 3,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH)); - if (agg) { - opj_mqc_setcurctx(mqc, T1_CTXNO_AGG); - if (!opj_mqc_decode(mqc)) { - continue; - } - opj_mqc_setcurctx(mqc, T1_CTXNO_UNI); - runlen = opj_mqc_decode(mqc); - runlen = (runlen << 1) | opj_mqc_decode(mqc); - flags2 += (OPJ_UINT32)runlen * t1->flags_stride; - data2 += (OPJ_UINT32)runlen * t1->w; - for (j = k + (OPJ_UINT32)runlen; j < k + 4 && j < t1->h; ++j) { - flags2 += t1->flags_stride; - if (agg && (j == k + (OPJ_UINT32)runlen)) { - opj_t1_dec_clnpass_step_partial(t1, flags2, data2, orient, oneplushalf); - } else { - opj_t1_dec_clnpass_step(t1, flags2, data2, orient, oneplushalf); - } - data2 += t1->w; - } - } else { - flags2 += t1->flags_stride; - opj_t1_dec_clnpass_step(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - opj_t1_dec_clnpass_step(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - opj_t1_dec_clnpass_step(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - flags2 += t1->flags_stride; - opj_t1_dec_clnpass_step(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - } - } - data1 += t1->w << 2; - flags1 += t1->flags_stride << 2; - } - for (i = 0; i < t1->w; ++i) { - OPJ_INT32 *data2 = data1 + i; - opj_flag_t *flags2 = flags1 + i; - for (j = k; j < t1->h; ++j) { - flags2 += t1->flags_stride; - opj_t1_dec_clnpass_step(t1, flags2, data2, orient, oneplushalf); - data2 += t1->w; - } - } - } - - if (segsym) { - OPJ_INT32 v = 0; - opj_mqc_setcurctx(mqc, T1_CTXNO_UNI); - v = opj_mqc_decode(mqc); - v = (v << 1) | opj_mqc_decode(mqc); - v = (v << 1) | opj_mqc_decode(mqc); - v = (v << 1) | opj_mqc_decode(mqc); - /* - if (v!=0xa) { - opj_event_msg(t1->cinfo, EVT_WARNING, "Bad segmentation symbol %x\n", v); - } - */ - } -} /* VSC and BYPASS by Antonin */ - - -/** mod fixed_quality */ -static OPJ_FLOAT64 opj_t1_getwmsedec( - OPJ_INT32 nmsedec, - OPJ_UINT32 compno, - OPJ_UINT32 level, - OPJ_UINT32 orient, - OPJ_INT32 bpno, - OPJ_UINT32 qmfbid, - OPJ_FLOAT64 stepsize, - OPJ_UINT32 numcomps, - const OPJ_FLOAT64 * mct_norms) -{ - OPJ_FLOAT64 w1 = 1, w2, wmsedec; - OPJ_ARG_NOT_USED(numcomps); - - if (mct_norms) { - w1 = mct_norms[compno]; - } - - if (qmfbid == 1) { - w2 = opj_dwt_getnorm(level, orient); - } else { /* if (qmfbid == 0) */ - w2 = opj_dwt_getnorm_real(level, orient); - } - - wmsedec = w1 * w2 * stepsize * (1 << bpno); - wmsedec *= wmsedec * nmsedec / 8192.0; - - return wmsedec; -} - -OPJ_BOOL opj_t1_allocate_buffers( - opj_t1_t *t1, - OPJ_UINT32 w, - OPJ_UINT32 h) -{ - OPJ_UINT32 datasize=w * h; - OPJ_UINT32 flagssize; - - if(datasize > t1->datasize){ - opj_aligned_free(t1->data); - t1->data = (OPJ_INT32*) opj_aligned_malloc(datasize * sizeof(OPJ_INT32)); - if(!t1->data){ - return OPJ_FALSE; - } - t1->datasize=datasize; - } - memset(t1->data,0,datasize * sizeof(OPJ_INT32)); - - t1->flags_stride=w+2; - flagssize=t1->flags_stride * (h+2); - - if(flagssize > t1->flagssize){ - opj_aligned_free(t1->flags); - t1->flags = (opj_flag_t*) opj_aligned_malloc(flagssize * sizeof(opj_flag_t)); - if(!t1->flags){ - return OPJ_FALSE; - } - t1->flagssize=flagssize; - } - memset(t1->flags,0,flagssize * sizeof(opj_flag_t)); - - t1->w=w; - t1->h=h; - - return OPJ_TRUE; -} - -/* ----------------------------------------------------------------------- */ - -/* ----------------------------------------------------------------------- */ -/** - * Creates a new Tier 1 handle - * and initializes the look-up tables of the Tier-1 coder/decoder - * @return a new T1 handle if successful, returns NULL otherwise -*/ -opj_t1_t* opj_t1_create() -{ - opj_t1_t *l_t1 = 00; - - l_t1 = (opj_t1_t*) opj_malloc(sizeof(opj_t1_t)); - if (!l_t1) { - return 00; - } - memset(l_t1,0,sizeof(opj_t1_t)); - - /* create MQC and RAW handles */ - l_t1->mqc = opj_mqc_create(); - if (! l_t1->mqc) { - opj_t1_destroy(l_t1); - return 00; - } - - l_t1->raw = opj_raw_create(); - if (! l_t1->raw) { - opj_t1_destroy(l_t1); - return 00; - } - - return l_t1; -} - - -/** - * Destroys a previously created T1 handle - * - * @param p_t1 Tier 1 handle to destroy -*/ -void opj_t1_destroy(opj_t1_t *p_t1) -{ - if (! p_t1) { - return; - } - - /* destroy MQC and RAW handles */ - opj_mqc_destroy(p_t1->mqc); - p_t1->mqc = 00; - opj_raw_destroy(p_t1->raw); - p_t1->raw = 00; - - if (p_t1->data) { - opj_aligned_free(p_t1->data); - p_t1->data = 00; - } - - if (p_t1->flags) { - opj_aligned_free(p_t1->flags); - p_t1->flags = 00; - } - - opj_free(p_t1); -} - -OPJ_BOOL opj_t1_decode_cblks( opj_t1_t* t1, - opj_tcd_tilecomp_t* tilec, - opj_tccp_t* tccp - ) -{ - OPJ_UINT32 resno, bandno, precno, cblkno; - OPJ_UINT32 tile_w = (OPJ_UINT32)(tilec->x1 - tilec->x0); - - for (resno = 0; resno < tilec->minimum_num_resolutions; ++resno) { - opj_tcd_resolution_t* res = &tilec->resolutions[resno]; - - for (bandno = 0; bandno < res->numbands; ++bandno) { - opj_tcd_band_t* restrict band = &res->bands[bandno]; - - for (precno = 0; precno < res->pw * res->ph; ++precno) { - opj_tcd_precinct_t* precinct = &band->precincts[precno]; - - for (cblkno = 0; cblkno < precinct->cw * precinct->ch; ++cblkno) { - opj_tcd_cblk_dec_t* cblk = &precinct->cblks.dec[cblkno]; - OPJ_INT32* restrict datap; - /*void* restrict tiledp;*/ - OPJ_UINT32 cblk_w, cblk_h; - OPJ_INT32 x, y; - OPJ_UINT32 i, j; - - if (OPJ_FALSE == opj_t1_decode_cblk( - t1, - cblk, - band->bandno, - (OPJ_UINT32)tccp->roishift, - tccp->cblksty)) { - return OPJ_FALSE; - } - - x = cblk->x0 - band->x0; - y = cblk->y0 - band->y0; - if (band->bandno & 1) { - opj_tcd_resolution_t* pres = &tilec->resolutions[resno - 1]; - x += pres->x1 - pres->x0; - } - if (band->bandno & 2) { - opj_tcd_resolution_t* pres = &tilec->resolutions[resno - 1]; - y += pres->y1 - pres->y0; - } - - datap=t1->data; - cblk_w = t1->w; - cblk_h = t1->h; - - if (tccp->roishift) { - OPJ_INT32 thresh = 1 << tccp->roishift; - for (j = 0; j < cblk_h; ++j) { - for (i = 0; i < cblk_w; ++i) { - OPJ_INT32 val = datap[(j * cblk_w) + i]; - OPJ_INT32 mag = abs(val); - if (mag >= thresh) { - mag >>= tccp->roishift; - datap[(j * cblk_w) + i] = val < 0 ? -mag : mag; - } - } - } - } - - /*tiledp=(void*)&tilec->data[(y * tile_w) + x];*/ - if (tccp->qmfbid == 1) { - OPJ_INT32* restrict tiledp = &tilec->data[(OPJ_UINT32)y * tile_w + (OPJ_UINT32)x]; - for (j = 0; j < cblk_h; ++j) { - for (i = 0; i < cblk_w; ++i) { - OPJ_INT32 tmp = datap[(j * cblk_w) + i]; - ((OPJ_INT32*)tiledp)[(j * tile_w) + i] = tmp / 2; - } - } - } else { /* if (tccp->qmfbid == 0) */ - OPJ_FLOAT32* restrict tiledp = (OPJ_FLOAT32*) &tilec->data[(OPJ_UINT32)y * tile_w + (OPJ_UINT32)x]; - for (j = 0; j < cblk_h; ++j) { - OPJ_FLOAT32* restrict tiledp2 = tiledp; - for (i = 0; i < cblk_w; ++i) { - OPJ_FLOAT32 tmp = (OPJ_FLOAT32)*datap * band->stepsize; - *tiledp2 = tmp; - datap++; - tiledp2++; - /*float tmp = datap[(j * cblk_w) + i] * band->stepsize; - ((float*)tiledp)[(j * tile_w) + i] = tmp;*/ - - } - tiledp += tile_w; - } - } - /*opj_free(cblk->data); - opj_free(cblk->segs);*/ - /*cblk->segs = 00;*/ - } /* cblkno */ - /*opj_free(precinct->cblks.dec);*/ - } /* precno */ - } /* bandno */ - } /* resno */ - return OPJ_TRUE; -} - - -OPJ_BOOL opj_t1_decode_cblk(opj_t1_t *t1, - opj_tcd_cblk_dec_t* cblk, - OPJ_UINT32 orient, - OPJ_UINT32 roishift, - OPJ_UINT32 cblksty) -{ - opj_raw_t *raw = t1->raw; /* RAW component */ - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - OPJ_INT32 bpno; - OPJ_UINT32 passtype; - OPJ_UINT32 segno, passno; - OPJ_BYTE type = T1_TYPE_MQ; /* BYPASS mode */ - - if(!opj_t1_allocate_buffers( - t1, - (OPJ_UINT32)(cblk->x1 - cblk->x0), - (OPJ_UINT32)(cblk->y1 - cblk->y0))) - { - return OPJ_FALSE; - } - - bpno = (OPJ_INT32)(roishift + cblk->numbps - 1); - passtype = 2; - - opj_mqc_resetstates(mqc); - opj_mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); - opj_mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); - opj_mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); - - for (segno = 0; segno < cblk->real_num_segs; ++segno) { - opj_tcd_seg_t *seg = &cblk->segs[segno]; - - /* BYPASS mode */ - type = ((bpno <= ((OPJ_INT32) (cblk->numbps) - 1) - 4) && (passtype < 2) && (cblksty & J2K_CCP_CBLKSTY_LAZY)) ? T1_TYPE_RAW : T1_TYPE_MQ; - /* FIXME: slviewer gets here with a null pointer. Why? Partially downloaded and/or corrupt textures? */ - if(seg->data == 00){ - continue; - } - if (type == T1_TYPE_RAW) { - opj_raw_init_dec(raw, (*seg->data) + seg->dataindex, seg->len); - } else { - if (OPJ_FALSE == opj_mqc_init_dec(mqc, (*seg->data) + seg->dataindex, seg->len)) { - return OPJ_FALSE; - } - } - - for (passno = 0; passno < seg->real_num_passes; ++passno) { - switch (passtype) { - case 0: - if (type == T1_TYPE_RAW) { - opj_t1_dec_sigpass_raw(t1, bpno+1, (OPJ_INT32)orient, (OPJ_INT32)cblksty); - } else { - if (cblksty & J2K_CCP_CBLKSTY_VSC) { - opj_t1_dec_sigpass_mqc_vsc(t1, bpno+1, (OPJ_INT32)orient); - } else { - opj_t1_dec_sigpass_mqc(t1, bpno+1, (OPJ_INT32)orient); - } - } - break; - case 1: - if (type == T1_TYPE_RAW) { - opj_t1_dec_refpass_raw(t1, bpno+1, (OPJ_INT32)cblksty); - } else { - if (cblksty & J2K_CCP_CBLKSTY_VSC) { - opj_t1_dec_refpass_mqc_vsc(t1, bpno+1); - } else { - opj_t1_dec_refpass_mqc(t1, bpno+1); - } - } - break; - case 2: - opj_t1_dec_clnpass(t1, bpno+1, (OPJ_INT32)orient, (OPJ_INT32)cblksty); - break; - } - - if ((cblksty & J2K_CCP_CBLKSTY_RESET) && type == T1_TYPE_MQ) { - opj_mqc_resetstates(mqc); - opj_mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); - opj_mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); - opj_mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); - } - if (++passtype == 3) { - passtype = 0; - bpno--; - } - } - } - return OPJ_TRUE; -} - - - - -OPJ_BOOL opj_t1_encode_cblks( opj_t1_t *t1, - opj_tcd_tile_t *tile, - opj_tcp_t *tcp, - const OPJ_FLOAT64 * mct_norms - ) -{ - OPJ_UINT32 compno, resno, bandno, precno, cblkno; - - tile->distotile = 0; /* fixed_quality */ - - for (compno = 0; compno < tile->numcomps; ++compno) { - opj_tcd_tilecomp_t* tilec = &tile->comps[compno]; - opj_tccp_t* tccp = &tcp->tccps[compno]; - OPJ_UINT32 tile_w = (OPJ_UINT32)(tilec->x1 - tilec->x0); - - for (resno = 0; resno < tilec->numresolutions; ++resno) { - opj_tcd_resolution_t *res = &tilec->resolutions[resno]; - - for (bandno = 0; bandno < res->numbands; ++bandno) { - opj_tcd_band_t* restrict band = &res->bands[bandno]; - OPJ_INT32 bandconst = 8192 * 8192 / ((OPJ_INT32) floor(band->stepsize * 8192)); - - for (precno = 0; precno < res->pw * res->ph; ++precno) { - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - for (cblkno = 0; cblkno < prc->cw * prc->ch; ++cblkno) { - opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno]; - OPJ_INT32 * restrict datap; - OPJ_INT32* restrict tiledp; - OPJ_UINT32 cblk_w; - OPJ_UINT32 cblk_h; - OPJ_UINT32 i, j; - - OPJ_INT32 x = cblk->x0 - band->x0; - OPJ_INT32 y = cblk->y0 - band->y0; - if (band->bandno & 1) { - opj_tcd_resolution_t *pres = &tilec->resolutions[resno - 1]; - x += pres->x1 - pres->x0; - } - if (band->bandno & 2) { - opj_tcd_resolution_t *pres = &tilec->resolutions[resno - 1]; - y += pres->y1 - pres->y0; - } - - if(!opj_t1_allocate_buffers( - t1, - (OPJ_UINT32)(cblk->x1 - cblk->x0), - (OPJ_UINT32)(cblk->y1 - cblk->y0))) - { - return OPJ_FALSE; - } - - datap=t1->data; - cblk_w = t1->w; - cblk_h = t1->h; - - tiledp=&tilec->data[(OPJ_UINT32)y * tile_w + (OPJ_UINT32)x]; - if (tccp->qmfbid == 1) { - for (j = 0; j < cblk_h; ++j) { - for (i = 0; i < cblk_w; ++i) { - OPJ_INT32 tmp = tiledp[(j * tile_w) + i]; - datap[(j * cblk_w) + i] = tmp << T1_NMSEDEC_FRACBITS; - } - } - } else { /* if (tccp->qmfbid == 0) */ - for (j = 0; j < cblk_h; ++j) { - for (i = 0; i < cblk_w; ++i) { - OPJ_INT32 tmp = tiledp[(j * tile_w) + i]; - datap[(j * cblk_w) + i] = - opj_int_fix_mul( - tmp, - bandconst) >> (11 - T1_NMSEDEC_FRACBITS); - } - } - } - - opj_t1_encode_cblk( - t1, - cblk, - band->bandno, - compno, - tilec->numresolutions - 1 - resno, - tccp->qmfbid, - band->stepsize, - tccp->cblksty, - tile->numcomps, - tile, - mct_norms); - - } /* cblkno */ - } /* precno */ - } /* bandno */ - } /* resno */ - } /* compno */ - return OPJ_TRUE; -} - -/** mod fixed_quality */ -void opj_t1_encode_cblk(opj_t1_t *t1, - opj_tcd_cblk_enc_t* cblk, - OPJ_UINT32 orient, - OPJ_UINT32 compno, - OPJ_UINT32 level, - OPJ_UINT32 qmfbid, - OPJ_FLOAT64 stepsize, - OPJ_UINT32 cblksty, - OPJ_UINT32 numcomps, - opj_tcd_tile_t * tile, - const OPJ_FLOAT64 * mct_norms) -{ - OPJ_FLOAT64 cumwmsedec = 0.0; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - OPJ_UINT32 passno; - OPJ_INT32 bpno; - OPJ_UINT32 passtype; - OPJ_INT32 nmsedec = 0; - OPJ_INT32 max; - OPJ_UINT32 i; - OPJ_BYTE type = T1_TYPE_MQ; - OPJ_FLOAT64 tempwmsedec; - - max = 0; - for (i = 0; i < t1->w * t1->h; ++i) { - OPJ_INT32 tmp = abs(t1->data[i]); - max = opj_int_max(max, tmp); - } - - cblk->numbps = max ? (OPJ_UINT32)((opj_int_floorlog2(max) + 1) - T1_NMSEDEC_FRACBITS) : 0; - - bpno = (OPJ_INT32)(cblk->numbps - 1); - passtype = 2; - - opj_mqc_resetstates(mqc); - opj_mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); - opj_mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); - opj_mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); - opj_mqc_init_enc(mqc, cblk->data); - - for (passno = 0; bpno >= 0; ++passno) { - opj_tcd_pass_t *pass = &cblk->passes[passno]; - OPJ_UINT32 correction = 3; - type = ((bpno < ((OPJ_INT32) (cblk->numbps) - 4)) && (passtype < 2) && (cblksty & J2K_CCP_CBLKSTY_LAZY)) ? T1_TYPE_RAW : T1_TYPE_MQ; - - switch (passtype) { - case 0: - opj_t1_enc_sigpass(t1, bpno, orient, &nmsedec, type, cblksty); - break; - case 1: - opj_t1_enc_refpass(t1, bpno, &nmsedec, type, cblksty); - break; - case 2: - opj_t1_enc_clnpass(t1, bpno, orient, &nmsedec, cblksty); - /* code switch SEGMARK (i.e. SEGSYM) */ - if (cblksty & J2K_CCP_CBLKSTY_SEGSYM) - opj_mqc_segmark_enc(mqc); - break; - } - - /* fixed_quality */ - tempwmsedec = opj_t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps,mct_norms) ; - cumwmsedec += tempwmsedec; - tile->distotile += tempwmsedec; - - /* Code switch "RESTART" (i.e. TERMALL) */ - if ((cblksty & J2K_CCP_CBLKSTY_TERMALL) && !((passtype == 2) && (bpno - 1 < 0))) { - if (type == T1_TYPE_RAW) { - opj_mqc_flush(mqc); - correction = 1; - /* correction = mqc_bypass_flush_enc(); */ - } else { /* correction = mqc_restart_enc(); */ - opj_mqc_flush(mqc); - correction = 1; - } - pass->term = 1; - } else { - if (((bpno < ((OPJ_INT32) (cblk->numbps) - 4) && (passtype > 0)) - || ((bpno == ((OPJ_INT32)cblk->numbps - 4)) && (passtype == 2))) && (cblksty & J2K_CCP_CBLKSTY_LAZY)) { - if (type == T1_TYPE_RAW) { - opj_mqc_flush(mqc); - correction = 1; - /* correction = mqc_bypass_flush_enc(); */ - } else { /* correction = mqc_restart_enc(); */ - opj_mqc_flush(mqc); - correction = 1; - } - pass->term = 1; - } else { - pass->term = 0; - } - } - - if (++passtype == 3) { - passtype = 0; - bpno--; - } - - if (pass->term && bpno > 0) { - type = ((bpno < ((OPJ_INT32) (cblk->numbps) - 4)) && (passtype < 2) && (cblksty & J2K_CCP_CBLKSTY_LAZY)) ? T1_TYPE_RAW : T1_TYPE_MQ; - if (type == T1_TYPE_RAW) - opj_mqc_bypass_init_enc(mqc); - else - opj_mqc_restart_init_enc(mqc); - } - - pass->distortiondec = cumwmsedec; - pass->rate = opj_mqc_numbytes(mqc) + correction; /* FIXME */ - - /* Code-switch "RESET" */ - if (cblksty & J2K_CCP_CBLKSTY_RESET) - opj_mqc_reset_enc(mqc); - } - - /* Code switch "ERTERM" (i.e. PTERM) */ - if (cblksty & J2K_CCP_CBLKSTY_PTERM) - opj_mqc_erterm_enc(mqc); - else /* Default coding */ if (!(cblksty & J2K_CCP_CBLKSTY_LAZY)) - opj_mqc_flush(mqc); - - cblk->totalpasses = passno; - - for (passno = 0; passnototalpasses; passno++) { - opj_tcd_pass_t *pass = &cblk->passes[passno]; - if (pass->rate > opj_mqc_numbytes(mqc)) - pass->rate = opj_mqc_numbytes(mqc); - /*Preventing generation of FF as last data byte of a pass*/ - if((pass->rate>1) && (cblk->data[pass->rate - 1] == 0xFF)){ - pass->rate--; - } - pass->len = pass->rate - (passno == 0 ? 0 : cblk->passes[passno - 1].rate); - } -} - -#if 0 -void opj_t1_dec_refpass_step( opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_INT32 poshalf, - OPJ_INT32 neghalf, - OPJ_BYTE type, - OPJ_UINT32 vsc) -{ - OPJ_INT32 t; - OPJ_UINT32 v,flag; - - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - opj_raw_t *raw = t1->raw; /* RAW component */ - - flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); - if ((flag & (T1_SIG | T1_VISIT)) == T1_SIG) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_mag(flag)); /* ESSAI */ - if (type == T1_TYPE_RAW) { - v = opj_raw_decode(raw); - } else { - v = opj_mqc_decode(mqc); - } - t = v ? poshalf : neghalf; - *datap += *datap < 0 ? -t : t; - *flagsp |= T1_REFINE; - } -} /* VSC and BYPASS by Antonin */ -#endif - - - -#if 0 -void opj_t1_dec_sigpass_step( opj_t1_t *t1, - opj_flag_t *flagsp, - OPJ_INT32 *datap, - OPJ_UINT32 orient, - OPJ_INT32 oneplushalf, - OPJ_BYTE type, - OPJ_UINT32 vsc) -{ - OPJ_UINT32 v, flag; - - opj_raw_t *raw = t1->raw; /* RAW component */ - opj_mqc_t *mqc = t1->mqc; /* MQC component */ - - flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); - if ((flag & T1_SIG_OTH) && !(flag & (T1_SIG | T1_VISIT))) { - if (type == T1_TYPE_RAW) { - if (opj_raw_decode(raw)) { - v = opj_raw_decode(raw); /* ESSAI */ - *datap = v ? -oneplushalf : oneplushalf; - opj_t1_updateflags(flagsp, v, t1->flags_stride); - } - } else { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_zc(flag, orient)); - if (opj_mqc_decode(mqc)) { - opj_mqc_setcurctx(mqc, opj_t1_getctxno_sc(flag)); - v = opj_mqc_decode(mqc) ^ opj_t1_getspb(flag); - *datap = v ? -oneplushalf : oneplushalf; - opj_t1_updateflags(flagsp, v, t1->flags_stride); - } - } - *flagsp |= T1_VISIT; - } -} /* VSC and BYPASS by Antonin */ -#endif diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/t1.h b/Dependencies/FreeImage/Source/LibOpenJPEG/t1.h deleted file mode 100644 index 0de117a..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/t1.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage 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: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef __T1_H -#define __T1_H -/** -@file t1.h -@brief Implementation of the tier-1 coding (coding of code-block coefficients) (T1) - -The functions in T1.C have for goal to realize the tier-1 coding operation. The functions -in T1.C are used by some function in TCD.C. -*/ - -/** @defgroup T1 T1 - Implementation of the tier-1 coding */ -/*@{*/ - -/* ----------------------------------------------------------------------- */ -#define T1_NMSEDEC_BITS 7 - -#define T1_SIG_NE 0x0001 /**< Context orientation : North-East direction */ -#define T1_SIG_SE 0x0002 /**< Context orientation : South-East direction */ -#define T1_SIG_SW 0x0004 /**< Context orientation : South-West direction */ -#define T1_SIG_NW 0x0008 /**< Context orientation : North-West direction */ -#define T1_SIG_N 0x0010 /**< Context orientation : North direction */ -#define T1_SIG_E 0x0020 /**< Context orientation : East direction */ -#define T1_SIG_S 0x0040 /**< Context orientation : South direction */ -#define T1_SIG_W 0x0080 /**< Context orientation : West direction */ -#define T1_SIG_OTH (T1_SIG_N|T1_SIG_NE|T1_SIG_E|T1_SIG_SE|T1_SIG_S|T1_SIG_SW|T1_SIG_W|T1_SIG_NW) -#define T1_SIG_PRIM (T1_SIG_N|T1_SIG_E|T1_SIG_S|T1_SIG_W) - -#define T1_SGN_N 0x0100 -#define T1_SGN_E 0x0200 -#define T1_SGN_S 0x0400 -#define T1_SGN_W 0x0800 -#define T1_SGN (T1_SGN_N|T1_SGN_E|T1_SGN_S|T1_SGN_W) - -#define T1_SIG 0x1000 -#define T1_REFINE 0x2000 -#define T1_VISIT 0x4000 - -#define T1_NUMCTXS_ZC 9 -#define T1_NUMCTXS_SC 5 -#define T1_NUMCTXS_MAG 3 -#define T1_NUMCTXS_AGG 1 -#define T1_NUMCTXS_UNI 1 - -#define T1_CTXNO_ZC 0 -#define T1_CTXNO_SC (T1_CTXNO_ZC+T1_NUMCTXS_ZC) -#define T1_CTXNO_MAG (T1_CTXNO_SC+T1_NUMCTXS_SC) -#define T1_CTXNO_AGG (T1_CTXNO_MAG+T1_NUMCTXS_MAG) -#define T1_CTXNO_UNI (T1_CTXNO_AGG+T1_NUMCTXS_AGG) -#define T1_NUMCTXS (T1_CTXNO_UNI+T1_NUMCTXS_UNI) - -#define T1_NMSEDEC_FRACBITS (T1_NMSEDEC_BITS-1) - -#define T1_TYPE_MQ 0 /**< Normal coding using entropy coder */ -#define T1_TYPE_RAW 1 /**< No encoding the information is store under raw format in codestream (mode switch RAW)*/ - -/* ----------------------------------------------------------------------- */ - -typedef OPJ_INT16 opj_flag_t; - -/** -Tier-1 coding (coding of code-block coefficients) -*/ -typedef struct opj_t1 { - - /** MQC component */ - opj_mqc_t *mqc; - /** RAW component */ - opj_raw_t *raw; - - OPJ_INT32 *data; - opj_flag_t *flags; - OPJ_UINT32 w; - OPJ_UINT32 h; - OPJ_UINT32 datasize; - OPJ_UINT32 flagssize; - OPJ_UINT32 flags_stride; -} opj_t1_t; - -#define MACRO_t1_flags(x,y) t1->flags[((x)*(t1->flags_stride))+(y)] - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ - -/** -Encode the code-blocks of a tile -@param t1 T1 handle -@param tile The tile to encode -@param tcp Tile coding parameters -@param mct_norms FIXME DOC -*/ -OPJ_BOOL opj_t1_encode_cblks( opj_t1_t *t1, - opj_tcd_tile_t *tile, - opj_tcp_t *tcp, - const OPJ_FLOAT64 * mct_norms); - -/** -Decode the code-blocks of a tile -@param t1 T1 handle -@param tilec The tile to decode -@param tccp Tile coding parameters -*/ -OPJ_BOOL opj_t1_decode_cblks( opj_t1_t* t1, - opj_tcd_tilecomp_t* tilec, - opj_tccp_t* tccp); - - - -/** - * Creates a new Tier 1 handle - * and initializes the look-up tables of the Tier-1 coder/decoder - * @return a new T1 handle if successful, returns NULL otherwise -*/ -opj_t1_t* opj_t1_create(void); - -/** - * Destroys a previously created T1 handle - * - * @param p_t1 Tier 1 handle to destroy -*/ -void opj_t1_destroy(opj_t1_t *p_t1); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __T1_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/t1_generate_luts.c b/Dependencies/FreeImage/Source/LibOpenJPEG/t1_generate_luts.c deleted file mode 100644 index b2944d8..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/t1_generate_luts.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2007, Callum Lerwick - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -static int t1_init_ctxno_zc(int f, int orient) { - int h, v, d, n, t, hv; - n = 0; - h = ((f & T1_SIG_W) != 0) + ((f & T1_SIG_E) != 0); - v = ((f & T1_SIG_N) != 0) + ((f & T1_SIG_S) != 0); - d = ((f & T1_SIG_NW) != 0) + ((f & T1_SIG_NE) != 0) + ((f & T1_SIG_SE) != 0) + ((f & T1_SIG_SW) != 0); - - switch (orient) { - case 2: - t = h; - h = v; - v = t; - case 0: - case 1: - if (!h) { - if (!v) { - if (!d) - n = 0; - else if (d == 1) - n = 1; - else - n = 2; - } else if (v == 1) { - n = 3; - } else { - n = 4; - } - } else if (h == 1) { - if (!v) { - if (!d) - n = 5; - else - n = 6; - } else { - n = 7; - } - } else - n = 8; - break; - case 3: - hv = h + v; - if (!d) { - if (!hv) { - n = 0; - } else if (hv == 1) { - n = 1; - } else { - n = 2; - } - } else if (d == 1) { - if (!hv) { - n = 3; - } else if (hv == 1) { - n = 4; - } else { - n = 5; - } - } else if (d == 2) { - if (!hv) { - n = 6; - } else { - n = 7; - } - } else { - n = 8; - } - break; - } - - return (T1_CTXNO_ZC + n); -} - -static int t1_init_ctxno_sc(int f) { - int hc, vc, n; - n = 0; - - hc = opj_int_min(((f & (T1_SIG_E | T1_SGN_E)) == - T1_SIG_E) + ((f & (T1_SIG_W | T1_SGN_W)) == T1_SIG_W), - 1) - opj_int_min(((f & (T1_SIG_E | T1_SGN_E)) == - (T1_SIG_E | T1_SGN_E)) + - ((f & (T1_SIG_W | T1_SGN_W)) == - (T1_SIG_W | T1_SGN_W)), 1); - - vc = opj_int_min(((f & (T1_SIG_N | T1_SGN_N)) == - T1_SIG_N) + ((f & (T1_SIG_S | T1_SGN_S)) == T1_SIG_S), - 1) - opj_int_min(((f & (T1_SIG_N | T1_SGN_N)) == - (T1_SIG_N | T1_SGN_N)) + - ((f & (T1_SIG_S | T1_SGN_S)) == - (T1_SIG_S | T1_SGN_S)), 1); - - if (hc < 0) { - hc = -hc; - vc = -vc; - } - if (!hc) { - if (vc == -1) - n = 1; - else if (!vc) - n = 0; - else - n = 1; - } else if (hc == 1) { - if (vc == -1) - n = 2; - else if (!vc) - n = 3; - else - n = 4; - } - - return (T1_CTXNO_SC + n); -} - -static int t1_init_spb(int f) { - int hc, vc, n; - - hc = opj_int_min(((f & (T1_SIG_E | T1_SGN_E)) == - T1_SIG_E) + ((f & (T1_SIG_W | T1_SGN_W)) == T1_SIG_W), - 1) - opj_int_min(((f & (T1_SIG_E | T1_SGN_E)) == - (T1_SIG_E | T1_SGN_E)) + - ((f & (T1_SIG_W | T1_SGN_W)) == - (T1_SIG_W | T1_SGN_W)), 1); - - vc = opj_int_min(((f & (T1_SIG_N | T1_SGN_N)) == - T1_SIG_N) + ((f & (T1_SIG_S | T1_SGN_S)) == T1_SIG_S), - 1) - opj_int_min(((f & (T1_SIG_N | T1_SGN_N)) == - (T1_SIG_N | T1_SGN_N)) + - ((f & (T1_SIG_S | T1_SGN_S)) == - (T1_SIG_S | T1_SGN_S)), 1); - - if (!hc && !vc) - n = 0; - else - n = (!(hc > 0 || (!hc && vc > 0))); - - return n; -} - -static void dump_array16(int array[],int size){ - int i; - --size; - for (i = 0; i < size; ++i) { - printf("0x%04x, ", array[i]); - if(!((i+1)&0x7)) - printf("\n "); - } - printf("0x%04x\n};\n\n", array[size]); -} - -int main(int argc, char **argv) -{ - int i, j; - double u, v, t; - - int lut_ctxno_zc[1024]; - int lut_nmsedec_sig[1 << T1_NMSEDEC_BITS]; - int lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS]; - int lut_nmsedec_ref[1 << T1_NMSEDEC_BITS]; - int lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS]; - (void)argc; (void)argv; - - printf("/* This file was automatically generated by t1_generate_luts.c */\n\n"); - - /* lut_ctxno_zc */ - for (j = 0; j < 4; ++j) { - for (i = 0; i < 256; ++i) { - int orient = j; - if (orient == 2) { - orient = 1; - } else if (orient == 1) { - orient = 2; - } - lut_ctxno_zc[(orient << 8) | i] = t1_init_ctxno_zc(i, j); - } - } - - printf("static OPJ_BYTE lut_ctxno_zc[1024] = {\n "); - for (i = 0; i < 1023; ++i) { - printf("%i, ", lut_ctxno_zc[i]); - if(!((i+1)&0x1f)) - printf("\n "); - } - printf("%i\n};\n\n", lut_ctxno_zc[1023]); - - /* lut_ctxno_sc */ - printf("static OPJ_BYTE lut_ctxno_sc[256] = {\n "); - for (i = 0; i < 255; ++i) { - printf("0x%x, ", t1_init_ctxno_sc(i << 4)); - if(!((i+1)&0xf)) - printf("\n "); - } - printf("0x%x\n};\n\n", t1_init_ctxno_sc(255 << 4)); - - /* lut_spb */ - printf("static OPJ_BYTE lut_spb[256] = {\n "); - for (i = 0; i < 255; ++i) { - printf("%i, ", t1_init_spb(i << 4)); - if(!((i+1)&0x1f)) - printf("\n "); - } - printf("%i\n};\n\n", t1_init_spb(255 << 4)); - - /* FIXME FIXME FIXME */ - /* fprintf(stdout,"nmsedec luts:\n"); */ - for (i = 0; i < (1 << T1_NMSEDEC_BITS); ++i) { - t = i / pow(2, T1_NMSEDEC_FRACBITS); - u = t; - v = t - 1.5; - lut_nmsedec_sig[i] = - opj_int_max(0, - (int) (floor((u * u - v * v) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); - lut_nmsedec_sig0[i] = - opj_int_max(0, - (int) (floor((u * u) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); - u = t - 1.0; - if (i & (1 << (T1_NMSEDEC_BITS - 1))) { - v = t - 1.5; - } else { - v = t - 0.5; - } - lut_nmsedec_ref[i] = - opj_int_max(0, - (int) (floor((u * u - v * v) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); - lut_nmsedec_ref0[i] = - opj_int_max(0, - (int) (floor((u * u) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); - } - - printf("static OPJ_INT16 lut_nmsedec_sig[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(lut_nmsedec_sig, 1 << T1_NMSEDEC_BITS); - - printf("static OPJ_INT16 lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(lut_nmsedec_sig0, 1 << T1_NMSEDEC_BITS); - - printf("static OPJ_INT16 lut_nmsedec_ref[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(lut_nmsedec_ref, 1 << T1_NMSEDEC_BITS); - - printf("static OPJ_INT16 lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(lut_nmsedec_ref0, 1 << T1_NMSEDEC_BITS); - - return 0; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/t1_luts.h b/Dependencies/FreeImage/Source/LibOpenJPEG/t1_luts.h deleted file mode 100644 index 37776b6..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/t1_luts.h +++ /dev/null @@ -1,143 +0,0 @@ -/* This file was automatically generated by t1_generate_luts.c */ - -static OPJ_BYTE lut_ctxno_zc[1024] = { - 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 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, - 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 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, - 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, - 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 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, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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, 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, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 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, - 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 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, - 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, - 0, 3, 3, 6, 3, 6, 6, 8, 3, 6, 6, 8, 6, 8, 8, 8, 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, - 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, - 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, - 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, - 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, - 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, - 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, - 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8 -}; - -static OPJ_BYTE lut_ctxno_sc[256] = { - 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xd, 0xc, 0xd, 0xd, 0xd, 0xd, 0xd, - 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xb, 0xc, 0xb, 0xd, 0xc, 0xd, 0xc, - 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xd, 0x9, 0xa, 0xd, 0xd, 0xa, 0xa, - 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xb, 0x9, 0xa, 0xd, 0xc, 0xa, 0x9, - 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xd, 0xc, 0xd, 0xb, 0xc, 0xb, 0xc, - 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xb, 0xc, 0xb, 0xb, 0xb, 0xb, 0xb, - 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xd, 0x9, 0xa, 0xb, 0xc, 0xa, 0x9, - 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xb, 0x9, 0xa, 0xb, 0xb, 0xa, 0xa, - 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xb, 0x9, 0xa, 0xb, 0xb, 0xa, 0xa, - 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xd, 0x9, 0xa, 0xb, 0xc, 0xa, 0x9, - 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xb, 0xc, 0xb, 0xb, 0xb, 0xb, 0xb, - 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xd, 0xc, 0xd, 0xb, 0xc, 0xb, 0xc, - 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xb, 0x9, 0xa, 0xd, 0xc, 0xa, 0x9, - 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xd, 0x9, 0xa, 0xd, 0xd, 0xa, 0xa, - 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xb, 0xc, 0xb, 0xd, 0xc, 0xd, 0xc, - 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xd, 0xc, 0xd, 0xd, 0xd, 0xd, 0xd -}; - -static OPJ_BYTE lut_spb[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, - 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, - 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -}; - -static OPJ_INT16 lut_nmsedec_sig[1 << T1_NMSEDEC_BITS] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0180, 0x0300, 0x0480, 0x0600, 0x0780, 0x0900, 0x0a80, - 0x0c00, 0x0d80, 0x0f00, 0x1080, 0x1200, 0x1380, 0x1500, 0x1680, - 0x1800, 0x1980, 0x1b00, 0x1c80, 0x1e00, 0x1f80, 0x2100, 0x2280, - 0x2400, 0x2580, 0x2700, 0x2880, 0x2a00, 0x2b80, 0x2d00, 0x2e80, - 0x3000, 0x3180, 0x3300, 0x3480, 0x3600, 0x3780, 0x3900, 0x3a80, - 0x3c00, 0x3d80, 0x3f00, 0x4080, 0x4200, 0x4380, 0x4500, 0x4680, - 0x4800, 0x4980, 0x4b00, 0x4c80, 0x4e00, 0x4f80, 0x5100, 0x5280, - 0x5400, 0x5580, 0x5700, 0x5880, 0x5a00, 0x5b80, 0x5d00, 0x5e80, - 0x6000, 0x6180, 0x6300, 0x6480, 0x6600, 0x6780, 0x6900, 0x6a80, - 0x6c00, 0x6d80, 0x6f00, 0x7080, 0x7200, 0x7380, 0x7500, 0x7680 -}; - -static OPJ_INT16 lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0080, 0x0080, - 0x0080, 0x0080, 0x0100, 0x0100, 0x0100, 0x0180, 0x0180, 0x0200, - 0x0200, 0x0280, 0x0280, 0x0300, 0x0300, 0x0380, 0x0400, 0x0400, - 0x0480, 0x0500, 0x0580, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780, - 0x0800, 0x0880, 0x0900, 0x0980, 0x0a00, 0x0a80, 0x0b80, 0x0c00, - 0x0c80, 0x0d00, 0x0e00, 0x0e80, 0x0f00, 0x1000, 0x1080, 0x1180, - 0x1200, 0x1300, 0x1380, 0x1480, 0x1500, 0x1600, 0x1700, 0x1780, - 0x1880, 0x1980, 0x1a80, 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00, - 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2680, 0x2780, - 0x2880, 0x2980, 0x2b00, 0x2c00, 0x2d00, 0x2e80, 0x2f80, 0x3100, - 0x3200, 0x3380, 0x3480, 0x3600, 0x3700, 0x3880, 0x3a00, 0x3b00, - 0x3c80, 0x3e00, 0x3f80, 0x4080, 0x4200, 0x4380, 0x4500, 0x4680, - 0x4800, 0x4980, 0x4b00, 0x4c80, 0x4e00, 0x4f80, 0x5180, 0x5300, - 0x5480, 0x5600, 0x5800, 0x5980, 0x5b00, 0x5d00, 0x5e80, 0x6080, - 0x6200, 0x6400, 0x6580, 0x6780, 0x6900, 0x6b00, 0x6d00, 0x6e80, - 0x7080, 0x7280, 0x7480, 0x7600, 0x7800, 0x7a00, 0x7c00, 0x7e00 -}; - -static OPJ_INT16 lut_nmsedec_ref[1 << T1_NMSEDEC_BITS] = { - 0x1800, 0x1780, 0x1700, 0x1680, 0x1600, 0x1580, 0x1500, 0x1480, - 0x1400, 0x1380, 0x1300, 0x1280, 0x1200, 0x1180, 0x1100, 0x1080, - 0x1000, 0x0f80, 0x0f00, 0x0e80, 0x0e00, 0x0d80, 0x0d00, 0x0c80, - 0x0c00, 0x0b80, 0x0b00, 0x0a80, 0x0a00, 0x0980, 0x0900, 0x0880, - 0x0800, 0x0780, 0x0700, 0x0680, 0x0600, 0x0580, 0x0500, 0x0480, - 0x0400, 0x0380, 0x0300, 0x0280, 0x0200, 0x0180, 0x0100, 0x0080, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0080, 0x0100, 0x0180, 0x0200, 0x0280, 0x0300, 0x0380, - 0x0400, 0x0480, 0x0500, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780, - 0x0800, 0x0880, 0x0900, 0x0980, 0x0a00, 0x0a80, 0x0b00, 0x0b80, - 0x0c00, 0x0c80, 0x0d00, 0x0d80, 0x0e00, 0x0e80, 0x0f00, 0x0f80, - 0x1000, 0x1080, 0x1100, 0x1180, 0x1200, 0x1280, 0x1300, 0x1380, - 0x1400, 0x1480, 0x1500, 0x1580, 0x1600, 0x1680, 0x1700, 0x1780 -}; - -static OPJ_INT16 lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS] = { - 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x1b00, 0x1a80, 0x1980, - 0x1880, 0x1780, 0x1700, 0x1600, 0x1500, 0x1480, 0x1380, 0x1300, - 0x1200, 0x1180, 0x1080, 0x1000, 0x0f00, 0x0e80, 0x0e00, 0x0d00, - 0x0c80, 0x0c00, 0x0b80, 0x0a80, 0x0a00, 0x0980, 0x0900, 0x0880, - 0x0800, 0x0780, 0x0700, 0x0680, 0x0600, 0x0580, 0x0580, 0x0500, - 0x0480, 0x0400, 0x0400, 0x0380, 0x0300, 0x0300, 0x0280, 0x0280, - 0x0200, 0x0200, 0x0180, 0x0180, 0x0100, 0x0100, 0x0100, 0x0080, - 0x0080, 0x0080, 0x0080, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0080, 0x0080, - 0x0080, 0x0080, 0x0100, 0x0100, 0x0100, 0x0180, 0x0180, 0x0200, - 0x0200, 0x0280, 0x0280, 0x0300, 0x0300, 0x0380, 0x0400, 0x0400, - 0x0480, 0x0500, 0x0580, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780, - 0x0800, 0x0880, 0x0900, 0x0980, 0x0a00, 0x0a80, 0x0b80, 0x0c00, - 0x0c80, 0x0d00, 0x0e00, 0x0e80, 0x0f00, 0x1000, 0x1080, 0x1180, - 0x1200, 0x1300, 0x1380, 0x1480, 0x1500, 0x1600, 0x1700, 0x1780, - 0x1880, 0x1980, 0x1a80, 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00 -}; - diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/t2.c b/Dependencies/FreeImage/Source/LibOpenJPEG/t2.c deleted file mode 100644 index 82d7a78..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/t2.c +++ /dev/null @@ -1,1334 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -/** @defgroup T2 T2 - Implementation of a tier-2 coding */ -/*@{*/ - -/** @name Local static functions */ -/*@{*/ - -static void opj_t2_putcommacode(opj_bio_t *bio, OPJ_INT32 n); - -static OPJ_UINT32 opj_t2_getcommacode(opj_bio_t *bio); -/** -Variable length code for signalling delta Zil (truncation point) -@param bio Bit Input/Output component -@param n delta Zil -*/ -static void opj_t2_putnumpasses(opj_bio_t *bio, OPJ_UINT32 n); -static OPJ_UINT32 opj_t2_getnumpasses(opj_bio_t *bio); - -/** -Encode a packet of a tile to a destination buffer -@param tileno Number of the tile encoded -@param tile Tile for which to write the packets -@param tcp Tile coding parameters -@param pi Packet identity -@param dest Destination buffer -@param p_data_written FIXME DOC -@param len Length of the destination buffer -@param cstr_info Codestream information structure -@return -*/ -static OPJ_BOOL opj_t2_encode_packet( OPJ_UINT32 tileno, - opj_tcd_tile_t *tile, - opj_tcp_t *tcp, - opj_pi_iterator_t *pi, - OPJ_BYTE *dest, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 len, - opj_codestream_info_t *cstr_info); - -/** -Decode a packet of a tile from a source buffer -@param t2 T2 handle -@param tile Tile for which to write the packets -@param tcp Tile coding parameters -@param pi Packet identity -@param src Source buffer -@param data_read FIXME DOC -@param max_length FIXME DOC -@param pack_info Packet information - -@return FIXME DOC -*/ -static OPJ_BOOL opj_t2_decode_packet( opj_t2_t* t2, - opj_tcd_tile_t *tile, - opj_tcp_t *tcp, - opj_pi_iterator_t *pi, - OPJ_BYTE *src, - OPJ_UINT32 * data_read, - OPJ_UINT32 max_length, - opj_packet_info_t *pack_info); - -static OPJ_BOOL opj_t2_skip_packet( opj_t2_t* p_t2, - opj_tcd_tile_t *p_tile, - opj_tcp_t *p_tcp, - opj_pi_iterator_t *p_pi, - OPJ_BYTE *p_src, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_length, - opj_packet_info_t *p_pack_info); - -static OPJ_BOOL opj_t2_read_packet_header( opj_t2_t* p_t2, - opj_tcd_tile_t *p_tile, - opj_tcp_t *p_tcp, - opj_pi_iterator_t *p_pi, - OPJ_BOOL * p_is_data_present, - OPJ_BYTE *p_src_data, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_length, - opj_packet_info_t *p_pack_info); - -static OPJ_BOOL opj_t2_read_packet_data(opj_t2_t* p_t2, - opj_tcd_tile_t *p_tile, - opj_pi_iterator_t *p_pi, - OPJ_BYTE *p_src_data, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_length, - opj_packet_info_t *pack_info); - -static OPJ_BOOL opj_t2_skip_packet_data(opj_t2_t* p_t2, - opj_tcd_tile_t *p_tile, - opj_pi_iterator_t *p_pi, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_length, - opj_packet_info_t *pack_info); - -/** -@param cblk -@param index -@param cblksty -@param first -*/ -static OPJ_BOOL opj_t2_init_seg( opj_tcd_cblk_dec_t* cblk, - OPJ_UINT32 index, - OPJ_UINT32 cblksty, - OPJ_UINT32 first); - -/*@}*/ - -/*@}*/ - -/* ----------------------------------------------------------------------- */ - -/* #define RESTART 0x04 */ -static void opj_t2_putcommacode(opj_bio_t *bio, OPJ_INT32 n) { - while (--n >= 0) { - opj_bio_write(bio, 1, 1); - } - opj_bio_write(bio, 0, 1); -} - -OPJ_UINT32 opj_t2_getcommacode(opj_bio_t *bio) -{ - OPJ_UINT32 n = 0; - while (opj_bio_read(bio, 1)) { - ++n; - } - return n; -} - -void opj_t2_putnumpasses(opj_bio_t *bio, OPJ_UINT32 n) { - if (n == 1) { - opj_bio_write(bio, 0, 1); - } else if (n == 2) { - opj_bio_write(bio, 2, 2); - } else if (n <= 5) { - opj_bio_write(bio, 0xc | (n - 3), 4); - } else if (n <= 36) { - opj_bio_write(bio, 0x1e0 | (n - 6), 9); - } else if (n <= 164) { - opj_bio_write(bio, 0xff80 | (n - 37), 16); - } -} - -OPJ_UINT32 opj_t2_getnumpasses(opj_bio_t *bio) { - OPJ_UINT32 n; - if (!opj_bio_read(bio, 1)) - return 1; - if (!opj_bio_read(bio, 1)) - return 2; - if ((n = opj_bio_read(bio, 2)) != 3) - return (3 + n); - if ((n = opj_bio_read(bio, 5)) != 31) - return (6 + n); - return (37 + opj_bio_read(bio, 7)); -} - -/* ----------------------------------------------------------------------- */ - -OPJ_BOOL opj_t2_encode_packets( opj_t2_t* p_t2, - OPJ_UINT32 p_tile_no, - opj_tcd_tile_t *p_tile, - OPJ_UINT32 p_maxlayers, - OPJ_BYTE *p_dest, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 p_max_len, - opj_codestream_info_t *cstr_info, - OPJ_UINT32 p_tp_num, - OPJ_INT32 p_tp_pos, - OPJ_UINT32 p_pino, - J2K_T2_MODE p_t2_mode) -{ - OPJ_BYTE *l_current_data = p_dest; - OPJ_UINT32 l_nb_bytes = 0; - OPJ_UINT32 compno; - OPJ_UINT32 poc; - opj_pi_iterator_t *l_pi = 00; - opj_pi_iterator_t *l_current_pi = 00; - opj_image_t *l_image = p_t2->image; - opj_cp_t *l_cp = p_t2->cp; - opj_tcp_t *l_tcp = &l_cp->tcps[p_tile_no]; - OPJ_UINT32 pocno = l_cp->m_specific_param.m_enc.m_cinema == OPJ_CINEMA4K_24? 2: 1; - OPJ_UINT32 l_max_comp = l_cp->m_specific_param.m_enc.m_max_comp_size > 0 ? l_image->numcomps : 1; - OPJ_UINT32 l_nb_pocs = l_tcp->numpocs + 1; - - l_pi = opj_pi_initialise_encode(l_image, l_cp, p_tile_no, p_t2_mode); - if (!l_pi) { - return OPJ_FALSE; - } - - * p_data_written = 0; - - if (p_t2_mode == THRESH_CALC ){ /* Calculating threshold */ - l_current_pi = l_pi; - - for (compno = 0; compno < l_max_comp; ++compno) { - OPJ_UINT32 l_comp_len = 0; - l_current_pi = l_pi; - - for (poc = 0; poc < pocno ; ++poc) { - OPJ_UINT32 l_tp_num = compno; - - /* TODO MSD : check why this function cannot fail (cf. v1) */ - opj_pi_create_encode(l_pi, l_cp,p_tile_no,poc,l_tp_num,p_tp_pos,p_t2_mode); - - while (opj_pi_next(l_current_pi)) { - if (l_current_pi->layno < p_maxlayers) { - l_nb_bytes = 0; - - if (! opj_t2_encode_packet(p_tile_no,p_tile, l_tcp, l_current_pi, l_current_data, &l_nb_bytes, p_max_len, cstr_info)) { - opj_pi_destroy(l_pi, l_nb_pocs); - return OPJ_FALSE; - } - - l_comp_len += l_nb_bytes; - l_current_data += l_nb_bytes; - p_max_len -= l_nb_bytes; - - * p_data_written += l_nb_bytes; - } - } - - if (l_cp->m_specific_param.m_enc.m_max_comp_size) { - if (l_comp_len > l_cp->m_specific_param.m_enc.m_max_comp_size) { - opj_pi_destroy(l_pi, l_nb_pocs); - return OPJ_FALSE; - } - } - - ++l_current_pi; - } - } - } - else { /* t2_mode == FINAL_PASS */ - opj_pi_create_encode(l_pi, l_cp,p_tile_no,p_pino,p_tp_num,p_tp_pos,p_t2_mode); - - l_current_pi = &l_pi[p_pino]; - - while (opj_pi_next(l_current_pi)) { - if (l_current_pi->layno < p_maxlayers) { - l_nb_bytes=0; - - if (! opj_t2_encode_packet(p_tile_no,p_tile, l_tcp, l_current_pi, l_current_data, &l_nb_bytes, p_max_len, cstr_info)) { - opj_pi_destroy(l_pi, l_nb_pocs); - return OPJ_FALSE; - } - - l_current_data += l_nb_bytes; - p_max_len -= l_nb_bytes; - - * p_data_written += l_nb_bytes; - - /* INDEX >> */ - if(cstr_info) { - if(cstr_info->index_write) { - opj_tile_info_t *info_TL = &cstr_info->tile[p_tile_no]; - opj_packet_info_t *info_PK = &info_TL->packet[cstr_info->packno]; - if (!cstr_info->packno) { - info_PK->start_pos = info_TL->end_header + 1; - } else { - info_PK->start_pos = ((l_cp->m_specific_param.m_enc.m_tp_on | l_tcp->POC)&& info_PK->start_pos) ? info_PK->start_pos : info_TL->packet[cstr_info->packno - 1].end_pos + 1; - } - info_PK->end_pos = info_PK->start_pos + l_nb_bytes - 1; - info_PK->end_ph_pos += info_PK->start_pos - 1; /* End of packet header which now only represents the distance - to start of packet is incremented by value of start of packet*/ - } - - cstr_info->packno++; - } - /* << INDEX */ - ++p_tile->packno; - } - } - } - - opj_pi_destroy(l_pi, l_nb_pocs); - - return OPJ_TRUE; -} - -/* see issue 80 */ -#if 0 -#define JAS_FPRINTF fprintf -#else -/* issue 290 */ -static void opj_null_jas_fprintf(FILE* file, const char * format, ...) -{ - (void)file; - (void)format; -} -#define JAS_FPRINTF opj_null_jas_fprintf -#endif - -OPJ_BOOL opj_t2_decode_packets( opj_t2_t *p_t2, - OPJ_UINT32 p_tile_no, - opj_tcd_tile_t *p_tile, - OPJ_BYTE *p_src, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_len, - opj_codestream_index_t *p_cstr_index) -{ - OPJ_BYTE *l_current_data = p_src; - opj_pi_iterator_t *l_pi = 00; - OPJ_UINT32 pino; - opj_image_t *l_image = p_t2->image; - opj_cp_t *l_cp = p_t2->cp; - opj_tcp_t *l_tcp = &(p_t2->cp->tcps[p_tile_no]); - OPJ_UINT32 l_nb_bytes_read; - OPJ_UINT32 l_nb_pocs = l_tcp->numpocs + 1; - opj_pi_iterator_t *l_current_pi = 00; -#ifdef TODO_MSD - OPJ_UINT32 curtp = 0; - OPJ_UINT32 tp_start_packno; -#endif - opj_packet_info_t *l_pack_info = 00; - opj_image_comp_t* l_img_comp = 00; - - OPJ_ARG_NOT_USED(p_cstr_index); - -#ifdef TODO_MSD - if (p_cstr_index) { - l_pack_info = p_cstr_index->tile_index[p_tile_no].packet; - } -#endif - - /* create a packet iterator */ - l_pi = opj_pi_create_decode(l_image, l_cp, p_tile_no); - if (!l_pi) { - return OPJ_FALSE; - } - - - l_current_pi = l_pi; - - for (pino = 0; pino <= l_tcp->numpocs; ++pino) { - - /* if the resolution needed is too low, one dim of the tilec could be equal to zero - * and no packets are used to decode this resolution and - * l_current_pi->resno is always >= p_tile->comps[l_current_pi->compno].minimum_num_resolutions - * and no l_img_comp->resno_decoded are computed - */ - OPJ_BOOL* first_pass_failed = (OPJ_BOOL*)opj_malloc(l_image->numcomps * sizeof(OPJ_BOOL)); - if (!first_pass_failed) - { - opj_pi_destroy(l_pi,l_nb_pocs); - return OPJ_FALSE; - } - memset(first_pass_failed, OPJ_TRUE, l_image->numcomps * sizeof(OPJ_BOOL)); - - while (opj_pi_next(l_current_pi)) { - JAS_FPRINTF( stderr, "packet offset=00000166 prg=%d cmptno=%02d rlvlno=%02d prcno=%03d lyrno=%02d\n\n", - l_current_pi->poc.prg1, l_current_pi->compno, l_current_pi->resno, l_current_pi->precno, l_current_pi->layno ); - - if (l_tcp->num_layers_to_decode > l_current_pi->layno - && l_current_pi->resno < p_tile->comps[l_current_pi->compno].minimum_num_resolutions) { - l_nb_bytes_read = 0; - - first_pass_failed[l_current_pi->compno] = OPJ_FALSE; - - if (! opj_t2_decode_packet(p_t2,p_tile,l_tcp,l_current_pi,l_current_data,&l_nb_bytes_read,p_max_len,l_pack_info)) { - opj_pi_destroy(l_pi,l_nb_pocs); - opj_free(first_pass_failed); - return OPJ_FALSE; - } - - l_img_comp = &(l_image->comps[l_current_pi->compno]); - l_img_comp->resno_decoded = opj_uint_max(l_current_pi->resno, l_img_comp->resno_decoded); - } - else { - l_nb_bytes_read = 0; - if (! opj_t2_skip_packet(p_t2,p_tile,l_tcp,l_current_pi,l_current_data,&l_nb_bytes_read,p_max_len,l_pack_info)) { - opj_pi_destroy(l_pi,l_nb_pocs); - opj_free(first_pass_failed); - return OPJ_FALSE; - } - } - - if (first_pass_failed[l_current_pi->compno]) { - l_img_comp = &(l_image->comps[l_current_pi->compno]); - if (l_img_comp->resno_decoded == 0) - l_img_comp->resno_decoded = p_tile->comps[l_current_pi->compno].minimum_num_resolutions - 1; - } - - l_current_data += l_nb_bytes_read; - p_max_len -= l_nb_bytes_read; - - /* INDEX >> */ -#ifdef TODO_MSD - if(p_cstr_info) { - opj_tile_info_v2_t *info_TL = &p_cstr_info->tile[p_tile_no]; - opj_packet_info_t *info_PK = &info_TL->packet[p_cstr_info->packno]; - tp_start_packno = 0; - if (!p_cstr_info->packno) { - info_PK->start_pos = info_TL->end_header + 1; - } else if (info_TL->packet[p_cstr_info->packno-1].end_pos >= (OPJ_INT32)p_cstr_info->tile[p_tile_no].tp[curtp].tp_end_pos){ /* New tile part */ - info_TL->tp[curtp].tp_numpacks = p_cstr_info->packno - tp_start_packno; /* Number of packets in previous tile-part */ - tp_start_packno = p_cstr_info->packno; - curtp++; - info_PK->start_pos = p_cstr_info->tile[p_tile_no].tp[curtp].tp_end_header+1; - } else { - info_PK->start_pos = (l_cp->m_specific_param.m_enc.m_tp_on && info_PK->start_pos) ? info_PK->start_pos : info_TL->packet[p_cstr_info->packno - 1].end_pos + 1; - } - info_PK->end_pos = info_PK->start_pos + l_nb_bytes_read - 1; - info_PK->end_ph_pos += info_PK->start_pos - 1; /* End of packet header which now only represents the distance */ - ++p_cstr_info->packno; - } -#endif - /* << INDEX */ - } - ++l_current_pi; - - opj_free(first_pass_failed); - } - /* INDEX >> */ -#ifdef TODO_MSD - if - (p_cstr_info) { - p_cstr_info->tile[p_tile_no].tp[curtp].tp_numpacks = p_cstr_info->packno - tp_start_packno; /* Number of packets in last tile-part */ - } -#endif - /* << INDEX */ - - /* don't forget to release pi */ - opj_pi_destroy(l_pi,l_nb_pocs); - *p_data_read = (OPJ_UINT32)(l_current_data - p_src); - return OPJ_TRUE; -} - -/* ----------------------------------------------------------------------- */ - -/** - * Creates a Tier 2 handle - * - * @param p_image Source or destination image - * @param p_cp Image coding parameters. - * @return a new T2 handle if successful, NULL otherwise. -*/ -opj_t2_t* opj_t2_create(opj_image_t *p_image, opj_cp_t *p_cp) -{ - /* create the t2 structure */ - opj_t2_t *l_t2 = (opj_t2_t*)opj_malloc(sizeof(opj_t2_t)); - if (!l_t2) { - return NULL; - } - memset(l_t2,0,sizeof(opj_t2_t)); - - l_t2->image = p_image; - l_t2->cp = p_cp; - - return l_t2; -} - -void opj_t2_destroy(opj_t2_t *t2) { - if(t2) { - opj_free(t2); - } -} - -OPJ_BOOL opj_t2_decode_packet( opj_t2_t* p_t2, - opj_tcd_tile_t *p_tile, - opj_tcp_t *p_tcp, - opj_pi_iterator_t *p_pi, - OPJ_BYTE *p_src, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_length, - opj_packet_info_t *p_pack_info) -{ - OPJ_BOOL l_read_data; - OPJ_UINT32 l_nb_bytes_read = 0; - OPJ_UINT32 l_nb_total_bytes_read = 0; - - *p_data_read = 0; - - if (! opj_t2_read_packet_header(p_t2,p_tile,p_tcp,p_pi,&l_read_data,p_src,&l_nb_bytes_read,p_max_length,p_pack_info)) { - return OPJ_FALSE; - } - - p_src += l_nb_bytes_read; - l_nb_total_bytes_read += l_nb_bytes_read; - p_max_length -= l_nb_bytes_read; - - /* we should read data for the packet */ - if (l_read_data) { - l_nb_bytes_read = 0; - - if (! opj_t2_read_packet_data(p_t2,p_tile,p_pi,p_src,&l_nb_bytes_read,p_max_length,p_pack_info)) { - return OPJ_FALSE; - } - - l_nb_total_bytes_read += l_nb_bytes_read; - } - - *p_data_read = l_nb_total_bytes_read; - - return OPJ_TRUE; -} - -OPJ_BOOL opj_t2_encode_packet( OPJ_UINT32 tileno, - opj_tcd_tile_t * tile, - opj_tcp_t * tcp, - opj_pi_iterator_t *pi, - OPJ_BYTE *dest, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 length, - opj_codestream_info_t *cstr_info) -{ - OPJ_UINT32 bandno, cblkno; - OPJ_BYTE* c = dest; - OPJ_UINT32 l_nb_bytes; - OPJ_UINT32 compno = pi->compno; /* component value */ - OPJ_UINT32 resno = pi->resno; /* resolution level value */ - OPJ_UINT32 precno = pi->precno; /* precinct value */ - OPJ_UINT32 layno = pi->layno; /* quality layer value */ - OPJ_UINT32 l_nb_blocks; - opj_tcd_band_t *band = 00; - opj_tcd_cblk_enc_t* cblk = 00; - opj_tcd_pass_t *pass = 00; - - opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; - opj_tcd_resolution_t *res = &tilec->resolutions[resno]; - - opj_bio_t *bio = 00; /* BIO component */ - - /* */ - if (tcp->csty & J2K_CP_CSTY_SOP) { - c[0] = 255; - c[1] = 145; - c[2] = 0; - c[3] = 4; -#if 0 - c[4] = (tile->packno % 65536) / 256; - c[5] = (tile->packno % 65536) % 256; -#else - c[4] = (tile->packno >> 8) & 0xff; /* packno is uint32_t */ - c[5] = tile->packno & 0xff; -#endif - c += 6; - length -= 6; - } - /* */ - - if (!layno) { - band = res->bands; - - for(bandno = 0; bandno < res->numbands; ++bandno) { - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - opj_tgt_reset(prc->incltree); - opj_tgt_reset(prc->imsbtree); - - l_nb_blocks = prc->cw * prc->ch; - for (cblkno = 0; cblkno < l_nb_blocks; ++cblkno) { - cblk = &prc->cblks.enc[cblkno]; - - cblk->numpasses = 0; - opj_tgt_setvalue(prc->imsbtree, cblkno, band->numbps - (OPJ_INT32)cblk->numbps); - } - ++band; - } - } - - bio = opj_bio_create(); - opj_bio_init_enc(bio, c, length); - opj_bio_write(bio, 1, 1); /* Empty header bit */ - - /* Writing Packet header */ - band = res->bands; - for (bandno = 0; bandno < res->numbands; ++bandno) { - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - l_nb_blocks = prc->cw * prc->ch; - cblk = prc->cblks.enc; - - for (cblkno = 0; cblkno < l_nb_blocks; ++cblkno) { - opj_tcd_layer_t *layer = &cblk->layers[layno]; - - if (!cblk->numpasses && layer->numpasses) { - opj_tgt_setvalue(prc->incltree, cblkno, (OPJ_INT32)layno); - } - - ++cblk; - } - - cblk = prc->cblks.enc; - for (cblkno = 0; cblkno < l_nb_blocks; cblkno++) { - opj_tcd_layer_t *layer = &cblk->layers[layno]; - OPJ_UINT32 increment = 0; - OPJ_UINT32 nump = 0; - OPJ_UINT32 len = 0, passno; - OPJ_UINT32 l_nb_passes; - - /* cblk inclusion bits */ - if (!cblk->numpasses) { - opj_tgt_encode(bio, prc->incltree, cblkno, (OPJ_INT32)(layno + 1)); - } else { - opj_bio_write(bio, layer->numpasses != 0, 1); - } - - /* if cblk not included, go to the next cblk */ - if (!layer->numpasses) { - ++cblk; - continue; - } - - /* if first instance of cblk --> zero bit-planes information */ - if (!cblk->numpasses) { - cblk->numlenbits = 3; - opj_tgt_encode(bio, prc->imsbtree, cblkno, 999); - } - - /* number of coding passes included */ - opj_t2_putnumpasses(bio, layer->numpasses); - l_nb_passes = cblk->numpasses + layer->numpasses; - pass = cblk->passes + cblk->numpasses; - - /* computation of the increase of the length indicator and insertion in the header */ - for (passno = cblk->numpasses; passno < l_nb_passes; ++passno) { - ++nump; - len += pass->len; - - if (pass->term || passno == (cblk->numpasses + layer->numpasses) - 1) { - increment = (OPJ_UINT32)opj_int_max((OPJ_INT32)increment, opj_int_floorlog2((OPJ_INT32)len) + 1 - - ((OPJ_INT32)cblk->numlenbits + opj_int_floorlog2((OPJ_INT32)nump))); - len = 0; - nump = 0; - } - - ++pass; - } - opj_t2_putcommacode(bio, (OPJ_INT32)increment); - - /* computation of the new Length indicator */ - cblk->numlenbits += increment; - - pass = cblk->passes + cblk->numpasses; - /* insertion of the codeword segment length */ - for (passno = cblk->numpasses; passno < l_nb_passes; ++passno) { - nump++; - len += pass->len; - - if (pass->term || passno == (cblk->numpasses + layer->numpasses) - 1) { - opj_bio_write(bio, (OPJ_UINT32)len, cblk->numlenbits + (OPJ_UINT32)opj_int_floorlog2((OPJ_INT32)nump)); - len = 0; - nump = 0; - } - ++pass; - } - - ++cblk; - } - - ++band; - } - - if (!opj_bio_flush(bio)) { - opj_bio_destroy(bio); - return OPJ_FALSE; /* modified to eliminate longjmp !! */ - } - - l_nb_bytes = (OPJ_UINT32)opj_bio_numbytes(bio); - c += l_nb_bytes; - length -= l_nb_bytes; - - opj_bio_destroy(bio); - - /* */ - if (tcp->csty & J2K_CP_CSTY_EPH) { - c[0] = 255; - c[1] = 146; - c += 2; - length -= 2; - } - /* */ - - /* << INDEX */ - /* End of packet header position. Currently only represents the distance to start of packet - Will be updated later by incrementing with packet start value*/ - if(cstr_info && cstr_info->index_write) { - opj_packet_info_t *info_PK = &cstr_info->tile[tileno].packet[cstr_info->packno]; - info_PK->end_ph_pos = (OPJ_INT32)(c - dest); - } - /* INDEX >> */ - - /* Writing the packet body */ - band = res->bands; - for (bandno = 0; bandno < res->numbands; bandno++) { - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - l_nb_blocks = prc->cw * prc->ch; - cblk = prc->cblks.enc; - - for (cblkno = 0; cblkno < l_nb_blocks; ++cblkno) { - opj_tcd_layer_t *layer = &cblk->layers[layno]; - - if (!layer->numpasses) { - ++cblk; - continue; - } - - if (layer->len > length) { - return OPJ_FALSE; - } - - memcpy(c, layer->data, layer->len); - cblk->numpasses += layer->numpasses; - c += layer->len; - length -= layer->len; - - /* << INDEX */ - if(cstr_info && cstr_info->index_write) { - opj_packet_info_t *info_PK = &cstr_info->tile[tileno].packet[cstr_info->packno]; - info_PK->disto += layer->disto; - if (cstr_info->D_max < info_PK->disto) { - cstr_info->D_max = info_PK->disto; - } - } - - ++cblk; - /* INDEX >> */ - } - ++band; - } - - assert( c >= dest ); - * p_data_written += (OPJ_UINT32)(c - dest); - - return OPJ_TRUE; -} - -static OPJ_BOOL opj_t2_skip_packet( opj_t2_t* p_t2, - opj_tcd_tile_t *p_tile, - opj_tcp_t *p_tcp, - opj_pi_iterator_t *p_pi, - OPJ_BYTE *p_src, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_length, - opj_packet_info_t *p_pack_info) -{ - OPJ_BOOL l_read_data; - OPJ_UINT32 l_nb_bytes_read = 0; - OPJ_UINT32 l_nb_total_bytes_read = 0; - - *p_data_read = 0; - - if (! opj_t2_read_packet_header(p_t2,p_tile,p_tcp,p_pi,&l_read_data,p_src,&l_nb_bytes_read,p_max_length,p_pack_info)) { - return OPJ_FALSE; - } - - p_src += l_nb_bytes_read; - l_nb_total_bytes_read += l_nb_bytes_read; - p_max_length -= l_nb_bytes_read; - - /* we should read data for the packet */ - if (l_read_data) { - l_nb_bytes_read = 0; - - if (! opj_t2_skip_packet_data(p_t2,p_tile,p_pi,&l_nb_bytes_read,p_max_length,p_pack_info)) { - return OPJ_FALSE; - } - - l_nb_total_bytes_read += l_nb_bytes_read; - } - *p_data_read = l_nb_total_bytes_read; - - return OPJ_TRUE; -} - - -OPJ_BOOL opj_t2_read_packet_header( opj_t2_t* p_t2, - opj_tcd_tile_t *p_tile, - opj_tcp_t *p_tcp, - opj_pi_iterator_t *p_pi, - OPJ_BOOL * p_is_data_present, - OPJ_BYTE *p_src_data, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_length, - opj_packet_info_t *p_pack_info) - -{ - /* loop */ - OPJ_UINT32 bandno, cblkno; - OPJ_UINT32 l_nb_code_blocks; - OPJ_UINT32 l_remaining_length; - OPJ_UINT32 l_header_length; - OPJ_UINT32 * l_modified_length_ptr = 00; - OPJ_BYTE *l_current_data = p_src_data; - opj_cp_t *l_cp = p_t2->cp; - opj_bio_t *l_bio = 00; /* BIO component */ - opj_tcd_band_t *l_band = 00; - opj_tcd_cblk_dec_t* l_cblk = 00; - opj_tcd_resolution_t* l_res = &p_tile->comps[p_pi->compno].resolutions[p_pi->resno]; - - OPJ_BYTE *l_header_data = 00; - OPJ_BYTE **l_header_data_start = 00; - - OPJ_UINT32 l_present; - - if (p_pi->layno == 0) { - l_band = l_res->bands; - - /* reset tagtrees */ - for (bandno = 0; bandno < l_res->numbands; ++bandno) { - opj_tcd_precinct_t *l_prc = &l_band->precincts[p_pi->precno]; - - if ( ! ((l_band->x1-l_band->x0 == 0)||(l_band->y1-l_band->y0 == 0)) ) { - opj_tgt_reset(l_prc->incltree); - opj_tgt_reset(l_prc->imsbtree); - l_cblk = l_prc->cblks.dec; - - l_nb_code_blocks = l_prc->cw * l_prc->ch; - for (cblkno = 0; cblkno < l_nb_code_blocks; ++cblkno) { - l_cblk->numsegs = 0; - l_cblk->real_num_segs = 0; - ++l_cblk; - } - } - - ++l_band; - } - } - - /* SOP markers */ - - if (p_tcp->csty & J2K_CP_CSTY_SOP) { - if ((*l_current_data) != 0xff || (*(l_current_data + 1) != 0x91)) { - /* TODO opj_event_msg(t2->cinfo->event_mgr, EVT_WARNING, "Expected SOP marker\n"); */ - fprintf(stderr, "Error : expected SOP marker\n"); - } else { - l_current_data += 6; - } - - /** TODO : check the Nsop value */ - } - - /* - When the marker PPT/PPM is used the packet header are store in PPT/PPM marker - This part deal with this caracteristic - step 1: Read packet header in the saved structure - step 2: Return to codestream for decoding - */ - - l_bio = opj_bio_create(); - if (! l_bio) { - return OPJ_FALSE; - } - - if (l_cp->ppm == 1) { /* PPM */ - l_header_data_start = &l_cp->ppm_data; - l_header_data = *l_header_data_start; - l_modified_length_ptr = &(l_cp->ppm_len); - - } - else if (p_tcp->ppt == 1) { /* PPT */ - l_header_data_start = &(p_tcp->ppt_data); - l_header_data = *l_header_data_start; - l_modified_length_ptr = &(p_tcp->ppt_len); - } - else { /* Normal Case */ - l_header_data_start = &(l_current_data); - l_header_data = *l_header_data_start; - l_remaining_length = (OPJ_UINT32)(p_src_data+p_max_length-l_header_data); - l_modified_length_ptr = &(l_remaining_length); - } - - opj_bio_init_dec(l_bio, l_header_data,*l_modified_length_ptr); - - l_present = opj_bio_read(l_bio, 1); - JAS_FPRINTF(stderr, "present=%d \n", l_present ); - if (!l_present) { - /* TODO MSD: no test to control the output of this function*/ - opj_bio_inalign(l_bio); - l_header_data += opj_bio_numbytes(l_bio); - opj_bio_destroy(l_bio); - - /* EPH markers */ - if (p_tcp->csty & J2K_CP_CSTY_EPH) { - if (p_max_length < 2) { - fprintf(stderr, "Not enough space for expected EPH marker\n"); - } else if ((*l_header_data) != 0xff || (*(l_header_data + 1) != 0x92)) { - fprintf(stderr, "Error : expected EPH marker\n"); - } else { - l_header_data += 2; - } - } - - l_header_length = (OPJ_UINT32)(l_header_data - *l_header_data_start); - *l_modified_length_ptr -= l_header_length; - *l_header_data_start += l_header_length; - - /* << INDEX */ - /* End of packet header position. Currently only represents the distance to start of packet - Will be updated later by incrementing with packet start value */ - if (p_pack_info) { - p_pack_info->end_ph_pos = (OPJ_INT32)(l_current_data - p_src_data); - } - /* INDEX >> */ - - * p_is_data_present = OPJ_FALSE; - *p_data_read = (OPJ_UINT32)(l_current_data - p_src_data); - return OPJ_TRUE; - } - - l_band = l_res->bands; - for (bandno = 0; bandno < l_res->numbands; ++bandno) { - opj_tcd_precinct_t *l_prc = &(l_band->precincts[p_pi->precno]); - - if ((l_band->x1-l_band->x0 == 0)||(l_band->y1-l_band->y0 == 0)) { - ++l_band; - continue; - } - - l_nb_code_blocks = l_prc->cw * l_prc->ch; - l_cblk = l_prc->cblks.dec; - for (cblkno = 0; cblkno < l_nb_code_blocks; cblkno++) { - OPJ_UINT32 l_included,l_increment, l_segno; - OPJ_INT32 n; - - /* if cblk not yet included before --> inclusion tagtree */ - if (!l_cblk->numsegs) { - l_included = opj_tgt_decode(l_bio, l_prc->incltree, cblkno, (OPJ_INT32)(p_pi->layno + 1)); - /* else one bit */ - } - else { - l_included = opj_bio_read(l_bio, 1); - } - - /* if cblk not included */ - if (!l_included) { - l_cblk->numnewpasses = 0; - ++l_cblk; - JAS_FPRINTF(stderr, "included=%d \n", l_included); - continue; - } - - /* if cblk not yet included --> zero-bitplane tagtree */ - if (!l_cblk->numsegs) { - OPJ_UINT32 i = 0; - - while (!opj_tgt_decode(l_bio, l_prc->imsbtree, cblkno, (OPJ_INT32)i)) { - ++i; - } - - l_cblk->numbps = (OPJ_UINT32)l_band->numbps + 1 - i; - l_cblk->numlenbits = 3; - } - - /* number of coding passes */ - l_cblk->numnewpasses = opj_t2_getnumpasses(l_bio); - l_increment = opj_t2_getcommacode(l_bio); - - /* length indicator increment */ - l_cblk->numlenbits += l_increment; - l_segno = 0; - - if (!l_cblk->numsegs) { - if (! opj_t2_init_seg(l_cblk, l_segno, p_tcp->tccps[p_pi->compno].cblksty, 1)) { - opj_bio_destroy(l_bio); - return OPJ_FALSE; - } - } - else { - l_segno = l_cblk->numsegs - 1; - if (l_cblk->segs[l_segno].numpasses == l_cblk->segs[l_segno].maxpasses) { - ++l_segno; - if (! opj_t2_init_seg(l_cblk, l_segno, p_tcp->tccps[p_pi->compno].cblksty, 0)) { - opj_bio_destroy(l_bio); - return OPJ_FALSE; - } - } - } - n = (OPJ_INT32)l_cblk->numnewpasses; - - do { - l_cblk->segs[l_segno].numnewpasses = (OPJ_UINT32)opj_int_min((OPJ_INT32)(l_cblk->segs[l_segno].maxpasses - l_cblk->segs[l_segno].numpasses), n); - l_cblk->segs[l_segno].newlen = opj_bio_read(l_bio, l_cblk->numlenbits + opj_uint_floorlog2(l_cblk->segs[l_segno].numnewpasses)); - JAS_FPRINTF(stderr, "included=%d numnewpasses=%d increment=%d len=%d \n", l_included, l_cblk->segs[l_segno].numnewpasses, l_increment, l_cblk->segs[l_segno].newlen ); - - n -= (OPJ_INT32)l_cblk->segs[l_segno].numnewpasses; - if (n > 0) { - ++l_segno; - - if (! opj_t2_init_seg(l_cblk, l_segno, p_tcp->tccps[p_pi->compno].cblksty, 0)) { - opj_bio_destroy(l_bio); - return OPJ_FALSE; - } - } - } while (n > 0); - - ++l_cblk; - } - - ++l_band; - } - - if (!opj_bio_inalign(l_bio)) { - opj_bio_destroy(l_bio); - return OPJ_FALSE; - } - - l_header_data += opj_bio_numbytes(l_bio); - opj_bio_destroy(l_bio); - - /* EPH markers */ - if (p_tcp->csty & J2K_CP_CSTY_EPH) { - if (p_max_length < 2) { - fprintf(stderr, "Not enough space for expected EPH marker\n"); - } else if ((*l_header_data) != 0xff || (*(l_header_data + 1) != 0x92)) { - /* TODO opj_event_msg(t2->cinfo->event_mgr, EVT_ERROR, "Expected EPH marker\n"); */ - fprintf(stderr, "Error : expected EPH marker\n"); - } else { - l_header_data += 2; - } - } - - l_header_length = (OPJ_UINT32)(l_header_data - *l_header_data_start); - JAS_FPRINTF( stderr, "hdrlen=%d \n", l_header_length ); - JAS_FPRINTF( stderr, "packet body\n"); - *l_modified_length_ptr -= l_header_length; - *l_header_data_start += l_header_length; - - /* << INDEX */ - /* End of packet header position. Currently only represents the distance to start of packet - Will be updated later by incrementing with packet start value */ - if (p_pack_info) { - p_pack_info->end_ph_pos = (OPJ_INT32)(l_current_data - p_src_data); - } - /* INDEX >> */ - - *p_is_data_present = OPJ_TRUE; - *p_data_read = (OPJ_UINT32)(l_current_data - p_src_data); - - return OPJ_TRUE; -} - -OPJ_BOOL opj_t2_read_packet_data( opj_t2_t* p_t2, - opj_tcd_tile_t *p_tile, - opj_pi_iterator_t *p_pi, - OPJ_BYTE *p_src_data, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_length, - opj_packet_info_t *pack_info) -{ - OPJ_UINT32 bandno, cblkno; - OPJ_UINT32 l_nb_code_blocks; - OPJ_BYTE *l_current_data = p_src_data; - opj_tcd_band_t *l_band = 00; - opj_tcd_cblk_dec_t* l_cblk = 00; - opj_tcd_resolution_t* l_res = &p_tile->comps[p_pi->compno].resolutions[p_pi->resno]; - - OPJ_ARG_NOT_USED(p_t2); - OPJ_ARG_NOT_USED(pack_info); - - l_band = l_res->bands; - for (bandno = 0; bandno < l_res->numbands; ++bandno) { - opj_tcd_precinct_t *l_prc = &l_band->precincts[p_pi->precno]; - - if ((l_band->x1-l_band->x0 == 0)||(l_band->y1-l_band->y0 == 0)) { - ++l_band; - continue; - } - - l_nb_code_blocks = l_prc->cw * l_prc->ch; - l_cblk = l_prc->cblks.dec; - - for (cblkno = 0; cblkno < l_nb_code_blocks; ++cblkno) { - opj_tcd_seg_t *l_seg = 00; - - if (!l_cblk->numnewpasses) { - /* nothing to do */ - ++l_cblk; - continue; - } - - if (!l_cblk->numsegs) { - l_seg = l_cblk->segs; - ++l_cblk->numsegs; - l_cblk->data_current_size = 0; - } - else { - l_seg = &l_cblk->segs[l_cblk->numsegs - 1]; - - if (l_seg->numpasses == l_seg->maxpasses) { - ++l_seg; - ++l_cblk->numsegs; - } - } - - do { - if (l_current_data + l_seg->newlen > p_src_data + p_max_length) { - fprintf(stderr, "read: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", - l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno, p_pi->compno); - return OPJ_FALSE; - } - -#ifdef USE_JPWL - /* we need here a j2k handle to verify if making a check to - the validity of cblocks parameters is selected from user (-W) */ - - /* let's check that we are not exceeding */ - if ((l_cblk->len + l_seg->newlen) > 8192) { - opj_event_msg(p_t2->cinfo, EVT_WARNING, - "JPWL: segment too long (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", - l_seg->newlen, cblkno, p_pi->precno, bandno, p_pi->resno, p_pi->compno); - if (!JPWL_ASSUME) { - opj_event_msg(p_t2->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return OPJ_FALSE; - } - l_seg->newlen = 8192 - l_cblk->len; - opj_event_msg(p_t2->cinfo, EVT_WARNING, " - truncating segment to %d\n", l_seg->newlen); - break; - }; - -#endif /* USE_JPWL */ - /* Check if the cblk->data have allocated enough memory */ - if ((l_cblk->data_current_size + l_seg->newlen) > l_cblk->data_max_size) { - OPJ_BYTE* new_cblk_data = (OPJ_BYTE*) opj_realloc(l_cblk->data, l_cblk->data_current_size + l_seg->newlen); - if(! new_cblk_data) { - opj_free(l_cblk->data); - l_cblk->data_max_size = 0; - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to realloc code block cata!\n"); */ - return OPJ_FALSE; - } - l_cblk->data_max_size = l_cblk->data_current_size + l_seg->newlen; - l_cblk->data = new_cblk_data; - } - - memcpy(l_cblk->data + l_cblk->data_current_size, l_current_data, l_seg->newlen); - - if (l_seg->numpasses == 0) { - l_seg->data = &l_cblk->data; - l_seg->dataindex = l_cblk->data_current_size; - } - - l_current_data += l_seg->newlen; - l_seg->numpasses += l_seg->numnewpasses; - l_cblk->numnewpasses -= l_seg->numnewpasses; - - l_seg->real_num_passes = l_seg->numpasses; - l_cblk->data_current_size += l_seg->newlen; - l_seg->len += l_seg->newlen; - - if (l_cblk->numnewpasses > 0) { - ++l_seg; - ++l_cblk->numsegs; - } - } while (l_cblk->numnewpasses > 0); - - l_cblk->real_num_segs = l_cblk->numsegs; - ++l_cblk; - } /* next code_block */ - - ++l_band; - } - - *(p_data_read) = (OPJ_UINT32)(l_current_data - p_src_data); - - return OPJ_TRUE; -} - -OPJ_BOOL opj_t2_skip_packet_data( opj_t2_t* p_t2, - opj_tcd_tile_t *p_tile, - opj_pi_iterator_t *p_pi, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_length, - opj_packet_info_t *pack_info) -{ - OPJ_UINT32 bandno, cblkno; - OPJ_UINT32 l_nb_code_blocks; - opj_tcd_band_t *l_band = 00; - opj_tcd_cblk_dec_t* l_cblk = 00; - opj_tcd_resolution_t* l_res = &p_tile->comps[p_pi->compno].resolutions[p_pi->resno]; - - OPJ_ARG_NOT_USED(p_t2); - OPJ_ARG_NOT_USED(pack_info); - - *p_data_read = 0; - l_band = l_res->bands; - - for (bandno = 0; bandno < l_res->numbands; ++bandno) { - opj_tcd_precinct_t *l_prc = &l_band->precincts[p_pi->precno]; - - if ((l_band->x1-l_band->x0 == 0)||(l_band->y1-l_band->y0 == 0)) { - ++l_band; - continue; - } - - l_nb_code_blocks = l_prc->cw * l_prc->ch; - l_cblk = l_prc->cblks.dec; - - for (cblkno = 0; cblkno < l_nb_code_blocks; ++cblkno) { - opj_tcd_seg_t *l_seg = 00; - - if (!l_cblk->numnewpasses) { - /* nothing to do */ - ++l_cblk; - continue; - } - - if (!l_cblk->numsegs) { - l_seg = l_cblk->segs; - ++l_cblk->numsegs; - l_cblk->data_current_size = 0; - } - else { - l_seg = &l_cblk->segs[l_cblk->numsegs - 1]; - - if (l_seg->numpasses == l_seg->maxpasses) { - ++l_seg; - ++l_cblk->numsegs; - } - } - - do { - if (* p_data_read + l_seg->newlen > p_max_length) { - fprintf(stderr, "skip: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", - l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno, p_pi->compno); - return OPJ_FALSE; - } - -#ifdef USE_JPWL - /* we need here a j2k handle to verify if making a check to - the validity of cblocks parameters is selected from user (-W) */ - - /* let's check that we are not exceeding */ - if ((l_cblk->len + l_seg->newlen) > 8192) { - opj_event_msg(p_t2->cinfo, EVT_WARNING, - "JPWL: segment too long (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", - l_seg->newlen, cblkno, p_pi->precno, bandno, p_pi->resno, p_pi->compno); - if (!JPWL_ASSUME) { - opj_event_msg(p_t2->cinfo, EVT_ERROR, "JPWL: giving up\n"); - return -999; - } - l_seg->newlen = 8192 - l_cblk->len; - opj_event_msg(p_t2->cinfo, EVT_WARNING, " - truncating segment to %d\n", l_seg->newlen); - break; - }; - -#endif /* USE_JPWL */ - JAS_FPRINTF(stderr, "p_data_read (%d) newlen (%d) \n", *p_data_read, l_seg->newlen ); - *(p_data_read) += l_seg->newlen; - - l_seg->numpasses += l_seg->numnewpasses; - l_cblk->numnewpasses -= l_seg->numnewpasses; - if (l_cblk->numnewpasses > 0) - { - ++l_seg; - ++l_cblk->numsegs; - } - } while (l_cblk->numnewpasses > 0); - - ++l_cblk; - } - - ++l_band; - } - - return OPJ_TRUE; -} - - -OPJ_BOOL opj_t2_init_seg( opj_tcd_cblk_dec_t* cblk, - OPJ_UINT32 index, - OPJ_UINT32 cblksty, - OPJ_UINT32 first) -{ - opj_tcd_seg_t* seg = 00; - OPJ_UINT32 l_nb_segs = index + 1; - - if (l_nb_segs > cblk->m_current_max_segs) { - opj_tcd_seg_t* new_segs; - cblk->m_current_max_segs += OPJ_J2K_DEFAULT_NB_SEGS; - - new_segs = (opj_tcd_seg_t*) opj_realloc(cblk->segs, cblk->m_current_max_segs * sizeof(opj_tcd_seg_t)); - if(! new_segs) { - opj_free(cblk->segs); - cblk->segs = NULL; - cblk->m_current_max_segs = 0; - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to initialize segment %d\n", l_nb_segs); */ - return OPJ_FALSE; - } - cblk->segs = new_segs; - } - - seg = &cblk->segs[index]; - memset(seg,0,sizeof(opj_tcd_seg_t)); - - if (cblksty & J2K_CCP_CBLKSTY_TERMALL) { - seg->maxpasses = 1; - } - else if (cblksty & J2K_CCP_CBLKSTY_LAZY) { - if (first) { - seg->maxpasses = 10; - } else { - seg->maxpasses = (((seg - 1)->maxpasses == 1) || ((seg - 1)->maxpasses == 10)) ? 2 : 1; - } - } else { - seg->maxpasses = 109; - } - - return OPJ_TRUE; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/t2.h b/Dependencies/FreeImage/Source/LibOpenJPEG/t2.h deleted file mode 100644 index 936073a..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/t2.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef __T2_H -#define __T2_H -/** -@file t2.h -@brief Implementation of a tier-2 coding (packetization of code-block data) (T2) - -*/ - -/** @defgroup T2 T2 - Implementation of a tier-2 coding */ -/*@{*/ - -/** -Tier-2 coding -*/ -typedef struct opj_t2 { - - /** Encoding: pointer to the src image. Decoding: pointer to the dst image. */ - opj_image_t *image; - /** pointer to the image coding parameters */ - opj_cp_t *cp; -} opj_t2_t; - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ - -/** -Encode the packets of a tile to a destination buffer -@param t2 T2 handle -@param tileno number of the tile encoded -@param tile the tile for which to write the packets -@param maxlayers maximum number of layers -@param dest the destination buffer -@param p_data_written FIXME DOC -@param len the length of the destination buffer -@param cstr_info Codestream information structure -@param tpnum Tile part number of the current tile -@param tppos The position of the tile part flag in the progression order -@param pino FIXME DOC -@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass -*/ -OPJ_BOOL opj_t2_encode_packets( opj_t2_t* t2, - OPJ_UINT32 tileno, - opj_tcd_tile_t *tile, - OPJ_UINT32 maxlayers, - OPJ_BYTE *dest, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 len, - opj_codestream_info_t *cstr_info, - OPJ_UINT32 tpnum, - OPJ_INT32 tppos, - OPJ_UINT32 pino, - J2K_T2_MODE t2_mode); - -/** -Decode the packets of a tile from a source buffer -@param t2 T2 handle -@param tileno number that identifies the tile for which to decode the packets -@param tile tile for which to decode the packets -@param src FIXME DOC -@param p_data_read the source buffer -@param len length of the source buffer -@param cstr_info FIXME DOC - -@return FIXME DOC - */ -OPJ_BOOL opj_t2_decode_packets( opj_t2_t *t2, - OPJ_UINT32 tileno, - opj_tcd_tile_t *tile, - OPJ_BYTE *src, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 len, - opj_codestream_index_t *cstr_info); - -/** - * Creates a Tier 2 handle - * - * @param p_image Source or destination image - * @param p_cp Image coding parameters. - * @return a new T2 handle if successful, NULL otherwise. -*/ -opj_t2_t* opj_t2_create(opj_image_t *p_image, opj_cp_t *p_cp); - -/** -Destroy a T2 handle -@param t2 T2 handle to destroy -*/ -void opj_t2_destroy(opj_t2_t *t2); - -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __T2_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/tcd.c b/Dependencies/FreeImage/Source/LibOpenJPEG/tcd.c deleted file mode 100644 index 147bc68..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/tcd.c +++ /dev/null @@ -1,2123 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2006-2007, Parvatha Elangovan - * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" - -/* ----------------------------------------------------------------------- */ - -/* TODO MSD: */ -#ifdef TODO_MSD -void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t * img) { - int tileno, compno, resno, bandno, precno;/*, cblkno;*/ - - fprintf(fd, "image {\n"); - fprintf(fd, " tw=%d, th=%d x0=%d x1=%d y0=%d y1=%d\n", - img->tw, img->th, tcd->image->x0, tcd->image->x1, tcd->image->y0, tcd->image->y1); - - for (tileno = 0; tileno < img->th * img->tw; tileno++) { - opj_tcd_tile_t *tile = &tcd->tcd_image->tiles[tileno]; - fprintf(fd, " tile {\n"); - fprintf(fd, " x0=%d, y0=%d, x1=%d, y1=%d, numcomps=%d\n", - tile->x0, tile->y0, tile->x1, tile->y1, tile->numcomps); - for (compno = 0; compno < tile->numcomps; compno++) { - opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; - fprintf(fd, " tilec {\n"); - fprintf(fd, - " x0=%d, y0=%d, x1=%d, y1=%d, numresolutions=%d\n", - tilec->x0, tilec->y0, tilec->x1, tilec->y1, tilec->numresolutions); - for (resno = 0; resno < tilec->numresolutions; resno++) { - opj_tcd_resolution_t *res = &tilec->resolutions[resno]; - fprintf(fd, "\n res {\n"); - fprintf(fd, - " x0=%d, y0=%d, x1=%d, y1=%d, pw=%d, ph=%d, numbands=%d\n", - res->x0, res->y0, res->x1, res->y1, res->pw, res->ph, res->numbands); - for (bandno = 0; bandno < res->numbands; bandno++) { - opj_tcd_band_t *band = &res->bands[bandno]; - fprintf(fd, " band {\n"); - fprintf(fd, - " x0=%d, y0=%d, x1=%d, y1=%d, stepsize=%f, numbps=%d\n", - band->x0, band->y0, band->x1, band->y1, band->stepsize, band->numbps); - for (precno = 0; precno < res->pw * res->ph; precno++) { - opj_tcd_precinct_t *prec = &band->precincts[precno]; - fprintf(fd, " prec {\n"); - fprintf(fd, - " x0=%d, y0=%d, x1=%d, y1=%d, cw=%d, ch=%d\n", - prec->x0, prec->y0, prec->x1, prec->y1, prec->cw, prec->ch); - /* - for (cblkno = 0; cblkno < prec->cw * prec->ch; cblkno++) { - opj_tcd_cblk_t *cblk = &prec->cblks[cblkno]; - fprintf(fd, " cblk {\n"); - fprintf(fd, - " x0=%d, y0=%d, x1=%d, y1=%d\n", - cblk->x0, cblk->y0, cblk->x1, cblk->y1); - fprintf(fd, " }\n"); - } - */ - fprintf(fd, " }\n"); - } - fprintf(fd, " }\n"); - } - fprintf(fd, " }\n"); - } - fprintf(fd, " }\n"); - } - fprintf(fd, " }\n"); - } - fprintf(fd, "}\n"); -} -#endif -/** -* Allocates memory for a decoding code block. -*/ -static OPJ_BOOL opj_tcd_code_block_dec_allocate (opj_tcd_cblk_dec_t * p_code_block); - -/** - * Deallocates the decoding data of the given precinct. - */ -static void opj_tcd_code_block_dec_deallocate (opj_tcd_precinct_t * p_precinct); - -/** - * Allocates memory for an encoding code block. - */ -static OPJ_BOOL opj_tcd_code_block_enc_allocate (opj_tcd_cblk_enc_t * p_code_block); - -/** - * Deallocates the encoding data of the given precinct. - */ -static void opj_tcd_code_block_enc_deallocate (opj_tcd_precinct_t * p_precinct); - - -/** -Free the memory allocated for encoding -@param tcd TCD handle -*/ -static void opj_tcd_free_tile(opj_tcd_t *tcd); - - -static OPJ_BOOL opj_tcd_t2_decode ( opj_tcd_t *p_tcd, - OPJ_BYTE * p_src_data, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_src_size, - opj_codestream_index_t *p_cstr_index ); - -static OPJ_BOOL opj_tcd_t1_decode (opj_tcd_t *p_tcd); - -static OPJ_BOOL opj_tcd_dwt_decode (opj_tcd_t *p_tcd); - -static OPJ_BOOL opj_tcd_mct_decode (opj_tcd_t *p_tcd); - -static OPJ_BOOL opj_tcd_dc_level_shift_decode (opj_tcd_t *p_tcd); - - -static OPJ_BOOL opj_tcd_dc_level_shift_encode ( opj_tcd_t *p_tcd ); - -static OPJ_BOOL opj_tcd_mct_encode ( opj_tcd_t *p_tcd ); - -static OPJ_BOOL opj_tcd_dwt_encode ( opj_tcd_t *p_tcd ); - -static OPJ_BOOL opj_tcd_t1_encode ( opj_tcd_t *p_tcd ); - -static OPJ_BOOL opj_tcd_t2_encode ( opj_tcd_t *p_tcd, - OPJ_BYTE * p_dest_data, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 p_max_dest_size, - opj_codestream_info_t *p_cstr_info ); - -static OPJ_BOOL opj_tcd_rate_allocate_encode( opj_tcd_t *p_tcd, - OPJ_BYTE * p_dest_data, - OPJ_UINT32 p_max_dest_size, - opj_codestream_info_t *p_cstr_info ); - -/* ----------------------------------------------------------------------- */ - -/** -Create a new TCD handle -*/ -opj_tcd_t* opj_tcd_create(OPJ_BOOL p_is_decoder) -{ - opj_tcd_t *l_tcd = 00; - - /* create the tcd structure */ - l_tcd = (opj_tcd_t*) opj_malloc(sizeof(opj_tcd_t)); - if (!l_tcd) { - return 00; - } - memset(l_tcd,0,sizeof(opj_tcd_t)); - - l_tcd->m_is_decoder = p_is_decoder ? 1 : 0; - - l_tcd->tcd_image = (opj_tcd_image_t*)opj_malloc(sizeof(opj_tcd_image_t)); - if (!l_tcd->tcd_image) { - opj_free(l_tcd); - return 00; - } - memset(l_tcd->tcd_image,0,sizeof(opj_tcd_image_t)); - - return l_tcd; -} - - -/* ----------------------------------------------------------------------- */ - -void opj_tcd_rateallocate_fixed(opj_tcd_t *tcd) { - OPJ_UINT32 layno; - - for (layno = 0; layno < tcd->tcp->numlayers; layno++) { - opj_tcd_makelayer_fixed(tcd, layno, 1); - } -} - - -void opj_tcd_makelayer( opj_tcd_t *tcd, - OPJ_UINT32 layno, - OPJ_FLOAT64 thresh, - OPJ_UINT32 final) -{ - OPJ_UINT32 compno, resno, bandno, precno, cblkno; - OPJ_UINT32 passno; - - opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles; - - tcd_tile->distolayer[layno] = 0; /* fixed_quality */ - - for (compno = 0; compno < tcd_tile->numcomps; compno++) { - opj_tcd_tilecomp_t *tilec = &tcd_tile->comps[compno]; - - for (resno = 0; resno < tilec->numresolutions; resno++) { - opj_tcd_resolution_t *res = &tilec->resolutions[resno]; - - for (bandno = 0; bandno < res->numbands; bandno++) { - opj_tcd_band_t *band = &res->bands[bandno]; - - for (precno = 0; precno < res->pw * res->ph; precno++) { - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { - opj_tcd_cblk_enc_t *cblk = &prc->cblks.enc[cblkno]; - opj_tcd_layer_t *layer = &cblk->layers[layno]; - OPJ_UINT32 n; - - if (layno == 0) { - cblk->numpassesinlayers = 0; - } - - n = cblk->numpassesinlayers; - - for (passno = cblk->numpassesinlayers; passno < cblk->totalpasses; passno++) { - OPJ_UINT32 dr; - OPJ_FLOAT64 dd; - opj_tcd_pass_t *pass = &cblk->passes[passno]; - - if (n == 0) { - dr = pass->rate; - dd = pass->distortiondec; - } else { - dr = pass->rate - cblk->passes[n - 1].rate; - dd = pass->distortiondec - cblk->passes[n - 1].distortiondec; - } - - if (!dr) { - if (dd != 0) - n = passno + 1; - continue; - } - if (dd / dr >= thresh) - n = passno + 1; - } - - layer->numpasses = n - cblk->numpassesinlayers; - - if (!layer->numpasses) { - layer->disto = 0; - continue; - } - - if (cblk->numpassesinlayers == 0) { - layer->len = cblk->passes[n - 1].rate; - layer->data = cblk->data; - layer->disto = cblk->passes[n - 1].distortiondec; - } else { - layer->len = cblk->passes[n - 1].rate - cblk->passes[cblk->numpassesinlayers - 1].rate; - layer->data = cblk->data + cblk->passes[cblk->numpassesinlayers - 1].rate; - layer->disto = cblk->passes[n - 1].distortiondec - cblk->passes[cblk->numpassesinlayers - 1].distortiondec; - } - - tcd_tile->distolayer[layno] += layer->disto; /* fixed_quality */ - - if (final) - cblk->numpassesinlayers = n; - } - } - } - } - } -} - -void opj_tcd_makelayer_fixed(opj_tcd_t *tcd, OPJ_UINT32 layno, OPJ_UINT32 final) { - OPJ_UINT32 compno, resno, bandno, precno, cblkno; - OPJ_INT32 value; /*, matrice[tcd_tcp->numlayers][tcd_tile->comps[0].numresolutions][3]; */ - OPJ_INT32 matrice[10][10][3]; - OPJ_UINT32 i, j, k; - - opj_cp_t *cp = tcd->cp; - opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles; - opj_tcp_t *tcd_tcp = tcd->tcp; - - for (compno = 0; compno < tcd_tile->numcomps; compno++) { - opj_tcd_tilecomp_t *tilec = &tcd_tile->comps[compno]; - - for (i = 0; i < tcd_tcp->numlayers; i++) { - for (j = 0; j < tilec->numresolutions; j++) { - for (k = 0; k < 3; k++) { - matrice[i][j][k] = - (OPJ_INT32) ((OPJ_FLOAT32)cp->m_specific_param.m_enc.m_matrice[i * tilec->numresolutions * 3 + j * 3 + k] - * (OPJ_FLOAT32) (tcd->image->comps[compno].prec / 16.0)); - } - } - } - - for (resno = 0; resno < tilec->numresolutions; resno++) { - opj_tcd_resolution_t *res = &tilec->resolutions[resno]; - - for (bandno = 0; bandno < res->numbands; bandno++) { - opj_tcd_band_t *band = &res->bands[bandno]; - - for (precno = 0; precno < res->pw * res->ph; precno++) { - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { - opj_tcd_cblk_enc_t *cblk = &prc->cblks.enc[cblkno]; - opj_tcd_layer_t *layer = &cblk->layers[layno]; - OPJ_UINT32 n; - OPJ_INT32 imsb = (OPJ_INT32)(tcd->image->comps[compno].prec - cblk->numbps); /* number of bit-plan equal to zero */ - - /* Correction of the matrix of coefficient to include the IMSB information */ - if (layno == 0) { - value = matrice[layno][resno][bandno]; - if (imsb >= value) { - value = 0; - } else { - value -= imsb; - } - } else { - value = matrice[layno][resno][bandno] - matrice[layno - 1][resno][bandno]; - if (imsb >= matrice[layno - 1][resno][bandno]) { - value -= (imsb - matrice[layno - 1][resno][bandno]); - if (value < 0) { - value = 0; - } - } - } - - if (layno == 0) { - cblk->numpassesinlayers = 0; - } - - n = cblk->numpassesinlayers; - if (cblk->numpassesinlayers == 0) { - if (value != 0) { - n = 3 * (OPJ_UINT32)value - 2 + cblk->numpassesinlayers; - } else { - n = cblk->numpassesinlayers; - } - } else { - n = 3 * (OPJ_UINT32)value + cblk->numpassesinlayers; - } - - layer->numpasses = n - cblk->numpassesinlayers; - - if (!layer->numpasses) - continue; - - if (cblk->numpassesinlayers == 0) { - layer->len = cblk->passes[n - 1].rate; - layer->data = cblk->data; - } else { - layer->len = cblk->passes[n - 1].rate - cblk->passes[cblk->numpassesinlayers - 1].rate; - layer->data = cblk->data + cblk->passes[cblk->numpassesinlayers - 1].rate; - } - - if (final) - cblk->numpassesinlayers = n; - } - } - } - } - } -} - -OPJ_BOOL opj_tcd_rateallocate( opj_tcd_t *tcd, - OPJ_BYTE *dest, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 len, - opj_codestream_info_t *cstr_info) -{ - OPJ_UINT32 compno, resno, bandno, precno, cblkno, layno; - OPJ_UINT32 passno; - OPJ_FLOAT64 min, max; - OPJ_FLOAT64 cumdisto[100]; /* fixed_quality */ - const OPJ_FLOAT64 K = 1; /* 1.1; fixed_quality */ - OPJ_FLOAT64 maxSE = 0; - - opj_cp_t *cp = tcd->cp; - opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles; - opj_tcp_t *tcd_tcp = tcd->tcp; - - min = DBL_MAX; - max = 0; - - tcd_tile->numpix = 0; /* fixed_quality */ - - for (compno = 0; compno < tcd_tile->numcomps; compno++) { - opj_tcd_tilecomp_t *tilec = &tcd_tile->comps[compno]; - tilec->numpix = 0; - - for (resno = 0; resno < tilec->numresolutions; resno++) { - opj_tcd_resolution_t *res = &tilec->resolutions[resno]; - - for (bandno = 0; bandno < res->numbands; bandno++) { - opj_tcd_band_t *band = &res->bands[bandno]; - - for (precno = 0; precno < res->pw * res->ph; precno++) { - opj_tcd_precinct_t *prc = &band->precincts[precno]; - - for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { - opj_tcd_cblk_enc_t *cblk = &prc->cblks.enc[cblkno]; - - for (passno = 0; passno < cblk->totalpasses; passno++) { - opj_tcd_pass_t *pass = &cblk->passes[passno]; - OPJ_INT32 dr; - OPJ_FLOAT64 dd, rdslope; - - if (passno == 0) { - dr = (OPJ_INT32)pass->rate; - dd = pass->distortiondec; - } else { - dr = (OPJ_INT32)(pass->rate - cblk->passes[passno - 1].rate); - dd = pass->distortiondec - cblk->passes[passno - 1].distortiondec; - } - - if (dr == 0) { - continue; - } - - rdslope = dd / dr; - if (rdslope < min) { - min = rdslope; - } - - if (rdslope > max) { - max = rdslope; - } - } /* passno */ - - /* fixed_quality */ - tcd_tile->numpix += ((cblk->x1 - cblk->x0) * (cblk->y1 - cblk->y0)); - tilec->numpix += ((cblk->x1 - cblk->x0) * (cblk->y1 - cblk->y0)); - } /* cbklno */ - } /* precno */ - } /* bandno */ - } /* resno */ - - maxSE += (((OPJ_FLOAT64)(1 << tcd->image->comps[compno].prec) - 1.0) - * ((OPJ_FLOAT64)(1 << tcd->image->comps[compno].prec) -1.0)) - * ((OPJ_FLOAT64)(tilec->numpix)); - } /* compno */ - - /* index file */ - if(cstr_info) { - opj_tile_info_t *tile_info = &cstr_info->tile[tcd->tcd_tileno]; - tile_info->numpix = tcd_tile->numpix; - tile_info->distotile = tcd_tile->distotile; - tile_info->thresh = (OPJ_FLOAT64 *) opj_malloc(tcd_tcp->numlayers * sizeof(OPJ_FLOAT64)); - } - - for (layno = 0; layno < tcd_tcp->numlayers; layno++) { - OPJ_FLOAT64 lo = min; - OPJ_FLOAT64 hi = max; - OPJ_BOOL success = OPJ_FALSE; - OPJ_UINT32 maxlen = tcd_tcp->rates[layno] ? opj_uint_min(((OPJ_UINT32) ceil(tcd_tcp->rates[layno])), len) : len; - OPJ_FLOAT64 goodthresh = 0; - OPJ_FLOAT64 stable_thresh = 0; - OPJ_UINT32 i; - OPJ_FLOAT64 distotarget; /* fixed_quality */ - - /* fixed_quality */ - distotarget = tcd_tile->distotile - ((K * maxSE) / pow((OPJ_FLOAT32)10, tcd_tcp->distoratio[layno] / 10)); - - /* Don't try to find an optimal threshold but rather take everything not included yet, if - -r xx,yy,zz,0 (disto_alloc == 1 and rates == 0) - -q xx,yy,zz,0 (fixed_quality == 1 and distoratio == 0) - ==> possible to have some lossy layers and the last layer for sure lossless */ - if ( ((cp->m_specific_param.m_enc.m_disto_alloc==1) && (tcd_tcp->rates[layno]>0)) || ((cp->m_specific_param.m_enc.m_fixed_quality==1) && (tcd_tcp->distoratio[layno]>0))) { - opj_t2_t*t2 = opj_t2_create(tcd->image, cp); - OPJ_FLOAT64 thresh = 0; - - if (t2 == 00) { - return OPJ_FALSE; - } - - for (i = 0; i < 128; ++i) { - OPJ_FLOAT64 distoachieved = 0; /* fixed_quality */ - - thresh = (lo + hi) / 2; - - opj_tcd_makelayer(tcd, layno, thresh, 0); - - if (cp->m_specific_param.m_enc.m_fixed_quality) { /* fixed_quality */ - if(cp->m_specific_param.m_enc.m_cinema){ - if (! opj_t2_encode_packets(t2,tcd->tcd_tileno, tcd_tile, layno + 1, dest, p_data_written, maxlen, cstr_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,THRESH_CALC)) { - - lo = thresh; - continue; - } - else { - distoachieved = layno == 0 ? - tcd_tile->distolayer[0] : cumdisto[layno - 1] + tcd_tile->distolayer[layno]; - - if (distoachieved < distotarget) { - hi=thresh; - stable_thresh = thresh; - continue; - }else{ - lo=thresh; - } - } - }else{ - distoachieved = (layno == 0) ? - tcd_tile->distolayer[0] : (cumdisto[layno - 1] + tcd_tile->distolayer[layno]); - - if (distoachieved < distotarget) { - hi = thresh; - stable_thresh = thresh; - continue; - } - lo = thresh; - } - } else { - if (! opj_t2_encode_packets(t2, tcd->tcd_tileno, tcd_tile, layno + 1, dest,p_data_written, maxlen, cstr_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,THRESH_CALC)) - { - /* TODO: what to do with l ??? seek / tell ??? */ - /* opj_event_msg(tcd->cinfo, EVT_INFO, "rate alloc: len=%d, max=%d\n", l, maxlen); */ - lo = thresh; - continue; - } - - hi = thresh; - stable_thresh = thresh; - } - } - - success = OPJ_TRUE; - goodthresh = stable_thresh == 0? thresh : stable_thresh; - - opj_t2_destroy(t2); - } else { - success = OPJ_TRUE; - goodthresh = min; - } - - if (!success) { - return OPJ_FALSE; - } - - if(cstr_info) { /* Threshold for Marcela Index */ - cstr_info->tile[tcd->tcd_tileno].thresh[layno] = goodthresh; - } - - opj_tcd_makelayer(tcd, layno, goodthresh, 1); - - /* fixed_quality */ - cumdisto[layno] = (layno == 0) ? tcd_tile->distolayer[0] : (cumdisto[layno - 1] + tcd_tile->distolayer[layno]); - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_tcd_init( opj_tcd_t *p_tcd, - opj_image_t * p_image, - opj_cp_t * p_cp ) -{ - OPJ_UINT32 l_tile_comp_size; - - p_tcd->image = p_image; - p_tcd->cp = p_cp; - - p_tcd->tcd_image->tiles = (opj_tcd_tile_t *) opj_malloc(sizeof(opj_tcd_tile_t)); - if (! p_tcd->tcd_image->tiles) { - return OPJ_FALSE; - } - memset(p_tcd->tcd_image->tiles,0, sizeof(opj_tcd_tile_t)); - - l_tile_comp_size = p_image->numcomps * (OPJ_UINT32)sizeof(opj_tcd_tilecomp_t); - p_tcd->tcd_image->tiles->comps = (opj_tcd_tilecomp_t *) opj_malloc(l_tile_comp_size); - if (! p_tcd->tcd_image->tiles->comps ) { - return OPJ_FALSE; - } - memset( p_tcd->tcd_image->tiles->comps , 0 , l_tile_comp_size); - - p_tcd->tcd_image->tiles->numcomps = p_image->numcomps; - p_tcd->tp_pos = p_cp->m_specific_param.m_enc.m_tp_pos; - - return OPJ_TRUE; -} - -/** -Destroy a previously created TCD handle -*/ -void opj_tcd_destroy(opj_tcd_t *tcd) { - if (tcd) { - opj_tcd_free_tile(tcd); - - if (tcd->tcd_image) { - opj_free(tcd->tcd_image); - tcd->tcd_image = 00; - } - opj_free(tcd); - } -} - -/* ----------------------------------------------------------------------- */ -#define OPJ_MACRO_TCD_ALLOCATE(FUNCTION,TYPE,FRACTION,ELEMENT,FUNCTION_ELEMENT) \ -OPJ_BOOL FUNCTION ( opj_tcd_t *p_tcd, \ - OPJ_UINT32 p_tile_no \ - ) \ -{ \ - OPJ_UINT32 (*l_gain_ptr)(OPJ_UINT32) = 00; \ - OPJ_UINT32 compno, resno, bandno, precno, cblkno; \ - opj_tcp_t * l_tcp = 00; \ - opj_cp_t * l_cp = 00; \ - opj_tcd_tile_t * l_tile = 00; \ - opj_tccp_t *l_tccp = 00; \ - opj_tcd_tilecomp_t *l_tilec = 00; \ - opj_image_comp_t * l_image_comp = 00; \ - opj_tcd_resolution_t *l_res = 00; \ - opj_tcd_band_t *l_band = 00; \ - opj_stepsize_t * l_step_size = 00; \ - opj_tcd_precinct_t *l_current_precinct = 00; \ - TYPE* l_code_block = 00; \ - opj_image_t *l_image = 00; \ - OPJ_UINT32 p,q; \ - OPJ_UINT32 l_level_no; \ - OPJ_UINT32 l_pdx, l_pdy; \ - OPJ_UINT32 l_gain; \ - OPJ_INT32 l_x0b, l_y0b; \ - /* extent of precincts , top left, bottom right**/ \ - OPJ_INT32 l_tl_prc_x_start, l_tl_prc_y_start, l_br_prc_x_end, l_br_prc_y_end; \ - /* number of precinct for a resolution */ \ - OPJ_UINT32 l_nb_precincts; \ - /* room needed to store l_nb_precinct precinct for a resolution */ \ - OPJ_UINT32 l_nb_precinct_size; \ - /* number of code blocks for a precinct*/ \ - OPJ_UINT32 l_nb_code_blocks; \ - /* room needed to store l_nb_code_blocks code blocks for a precinct*/ \ - OPJ_UINT32 l_nb_code_blocks_size; \ - /* size of data for a tile */ \ - OPJ_UINT32 l_data_size; \ - \ - l_cp = p_tcd->cp; \ - l_tcp = &(l_cp->tcps[p_tile_no]); \ - l_tile = p_tcd->tcd_image->tiles; \ - l_tccp = l_tcp->tccps; \ - l_tilec = l_tile->comps; \ - l_image = p_tcd->image; \ - l_image_comp = p_tcd->image->comps; \ - \ - p = p_tile_no % l_cp->tw; /* tile coordinates */ \ - q = p_tile_no / l_cp->tw; \ - /*fprintf(stderr, "Tile coordinate = %d,%d\n", p, q);*/ \ - \ - /* 4 borders of the tile rescale on the image if necessary */ \ - l_tile->x0 = opj_int_max((OPJ_INT32)(l_cp->tx0 + p * l_cp->tdx), (OPJ_INT32)l_image->x0); \ - l_tile->y0 = opj_int_max((OPJ_INT32)(l_cp->ty0 + q * l_cp->tdy), (OPJ_INT32)l_image->y0); \ - l_tile->x1 = opj_int_min((OPJ_INT32)(l_cp->tx0 + (p + 1) * l_cp->tdx), (OPJ_INT32)l_image->x1); \ - l_tile->y1 = opj_int_min((OPJ_INT32)(l_cp->ty0 + (q + 1) * l_cp->tdy), (OPJ_INT32)l_image->y1); \ - /* testcase 1888.pdf.asan.35.988 */ \ - if (l_tccp->numresolutions == 0) { \ - fprintf(stderr, "tiles require at least one resolution\n"); \ - return OPJ_FALSE; \ - } \ - /*fprintf(stderr, "Tile border = %d,%d,%d,%d\n", l_tile->x0, l_tile->y0,l_tile->x1,l_tile->y1);*/ \ - \ - /*tile->numcomps = image->numcomps; */ \ - for(compno = 0; compno < l_tile->numcomps; ++compno) { \ - /*fprintf(stderr, "compno = %d/%d\n", compno, l_tile->numcomps);*/ \ - \ - /* border of each l_tile component (global) */ \ - l_tilec->x0 = opj_int_ceildiv(l_tile->x0, (OPJ_INT32)l_image_comp->dx); \ - l_tilec->y0 = opj_int_ceildiv(l_tile->y0, (OPJ_INT32)l_image_comp->dy); \ - l_tilec->x1 = opj_int_ceildiv(l_tile->x1, (OPJ_INT32)l_image_comp->dx); \ - l_tilec->y1 = opj_int_ceildiv(l_tile->y1, (OPJ_INT32)l_image_comp->dy); \ - /*fprintf(stderr, "\tTile compo border = %d,%d,%d,%d\n", l_tilec->x0, l_tilec->y0,l_tilec->x1,l_tilec->y1);*/ \ - \ - l_data_size = (OPJ_UINT32)(l_tilec->x1 - l_tilec->x0) \ - * (OPJ_UINT32)(l_tilec->y1 - l_tilec->y0) * (OPJ_UINT32)sizeof(OPJ_UINT32 );\ - l_tilec->numresolutions = l_tccp->numresolutions; \ - if (l_tccp->numresolutions < l_cp->m_specific_param.m_dec.m_reduce) { \ - l_tilec->minimum_num_resolutions = 1; \ - } \ - else { \ - l_tilec->minimum_num_resolutions = l_tccp->numresolutions \ - - l_cp->m_specific_param.m_dec.m_reduce; \ - } \ - \ - if (l_tilec->data == 00) { \ - l_tilec->data = (OPJ_INT32 *) opj_malloc(l_data_size); \ - if (! l_tilec->data ) { \ - return OPJ_FALSE; \ - } \ - /*fprintf(stderr, "\tAllocate data of tilec (int): %d x OPJ_UINT32\n",l_data_size);*/ \ - \ - l_tilec->data_size = l_data_size; \ - } \ - else if (l_data_size > l_tilec->data_size) { \ - OPJ_INT32 * new_data = (OPJ_INT32 *) opj_realloc(l_tilec->data, l_data_size); \ - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to handle tile data\n"); */ \ - fprintf(stderr, "Not enough memory to handle tile data\n"); \ - if (! new_data) { \ - opj_free(l_tilec->data); \ - l_tilec->data = NULL; \ - l_tilec->data_size = 0; \ - return OPJ_FALSE; \ - } \ - l_tilec->data = new_data; \ - /*fprintf(stderr, "\tReallocate data of tilec (int): from %d to %d x OPJ_UINT32\n", l_tilec->data_size, l_data_size);*/ \ - l_tilec->data_size = l_data_size; \ - } \ - \ - l_data_size = l_tilec->numresolutions * (OPJ_UINT32)sizeof(opj_tcd_resolution_t); \ - \ - if (l_tilec->resolutions == 00) { \ - l_tilec->resolutions = (opj_tcd_resolution_t *) opj_malloc(l_data_size); \ - if (! l_tilec->resolutions ) { \ - return OPJ_FALSE; \ - } \ - /*fprintf(stderr, "\tAllocate resolutions of tilec (opj_tcd_resolution_t): %d\n",l_data_size);*/ \ - l_tilec->resolutions_size = l_data_size; \ - memset(l_tilec->resolutions,0,l_data_size); \ - } \ - else if (l_data_size > l_tilec->resolutions_size) { \ - opj_tcd_resolution_t* new_resolutions = (opj_tcd_resolution_t *) opj_realloc(l_tilec->resolutions, l_data_size); \ - if (! new_resolutions) { \ - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to tile resolutions\n"); */ \ - fprintf(stderr, "Not enough memory to tile resolutions\n"); \ - opj_free(l_tilec->resolutions); \ - l_tilec->resolutions = NULL; \ - l_tilec->resolutions_size = 0; \ - return OPJ_FALSE; \ - } \ - l_tilec->resolutions = new_resolutions; \ - /*fprintf(stderr, "\tReallocate data of tilec (int): from %d to %d x OPJ_UINT32\n", l_tilec->resolutions_size, l_data_size);*/ \ - memset(((OPJ_BYTE*) l_tilec->resolutions)+l_tilec->resolutions_size,0,l_data_size - l_tilec->resolutions_size); \ - l_tilec->resolutions_size = l_data_size; \ - } \ - \ - l_level_no = l_tilec->numresolutions - 1; \ - l_res = l_tilec->resolutions; \ - l_step_size = l_tccp->stepsizes; \ - if (l_tccp->qmfbid == 0) { \ - l_gain_ptr = &opj_dwt_getgain_real; \ - } \ - else { \ - l_gain_ptr = &opj_dwt_getgain; \ - } \ - /*fprintf(stderr, "\tlevel_no=%d\n",l_level_no);*/ \ - \ - for(resno = 0; resno < l_tilec->numresolutions; ++resno) { \ - /*fprintf(stderr, "\t\tresno = %d/%d\n", resno, l_tilec->numresolutions);*/ \ - OPJ_INT32 tlcbgxstart, tlcbgystart /*, brcbgxend, brcbgyend*/; \ - OPJ_UINT32 cbgwidthexpn, cbgheightexpn; \ - OPJ_UINT32 cblkwidthexpn, cblkheightexpn; \ - \ - /* border for each resolution level (global) */ \ - l_res->x0 = opj_int_ceildivpow2(l_tilec->x0, (OPJ_INT32)l_level_no); \ - l_res->y0 = opj_int_ceildivpow2(l_tilec->y0, (OPJ_INT32)l_level_no); \ - l_res->x1 = opj_int_ceildivpow2(l_tilec->x1, (OPJ_INT32)l_level_no); \ - l_res->y1 = opj_int_ceildivpow2(l_tilec->y1, (OPJ_INT32)l_level_no); \ - /*fprintf(stderr, "\t\t\tres_x0= %d, res_y0 =%d, res_x1=%d, res_y1=%d\n", l_res->x0, l_res->y0, l_res->x1, l_res->y1);*/ \ - /* p. 35, table A-23, ISO/IEC FDIS154444-1 : 2000 (18 august 2000) */ \ - l_pdx = l_tccp->prcw[resno]; \ - l_pdy = l_tccp->prch[resno]; \ - /*fprintf(stderr, "\t\t\tpdx=%d, pdy=%d\n", l_pdx, l_pdy);*/ \ - /* p. 64, B.6, ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ \ - l_tl_prc_x_start = opj_int_floordivpow2(l_res->x0, (OPJ_INT32)l_pdx) << l_pdx; \ - l_tl_prc_y_start = opj_int_floordivpow2(l_res->y0, (OPJ_INT32)l_pdy) << l_pdy; \ - l_br_prc_x_end = opj_int_ceildivpow2(l_res->x1, (OPJ_INT32)l_pdx) << l_pdx; \ - l_br_prc_y_end = opj_int_ceildivpow2(l_res->y1, (OPJ_INT32)l_pdy) << l_pdy; \ - /*fprintf(stderr, "\t\t\tprc_x_start=%d, prc_y_start=%d, br_prc_x_end=%d, br_prc_y_end=%d \n", l_tl_prc_x_start, l_tl_prc_y_start, l_br_prc_x_end ,l_br_prc_y_end );*/ \ - \ - l_res->pw = (l_res->x0 == l_res->x1) ? 0 : (OPJ_UINT32)((l_br_prc_x_end - l_tl_prc_x_start) >> l_pdx); \ - l_res->ph = (l_res->y0 == l_res->y1) ? 0 : (OPJ_UINT32)((l_br_prc_y_end - l_tl_prc_y_start) >> l_pdy); \ - /*fprintf(stderr, "\t\t\tres_pw=%d, res_ph=%d\n", l_res->pw, l_res->ph );*/ \ - \ - l_nb_precincts = l_res->pw * l_res->ph; \ - l_nb_precinct_size = l_nb_precincts * (OPJ_UINT32)sizeof(opj_tcd_precinct_t); \ - if (resno == 0) { \ - tlcbgxstart = l_tl_prc_x_start; \ - tlcbgystart = l_tl_prc_y_start; \ - /*brcbgxend = l_br_prc_x_end;*/ \ - /* brcbgyend = l_br_prc_y_end;*/ \ - cbgwidthexpn = l_pdx; \ - cbgheightexpn = l_pdy; \ - l_res->numbands = 1; \ - } \ - else { \ - tlcbgxstart = opj_int_ceildivpow2(l_tl_prc_x_start, 1); \ - tlcbgystart = opj_int_ceildivpow2(l_tl_prc_y_start, 1); \ - /*brcbgxend = opj_int_ceildivpow2(l_br_prc_x_end, 1);*/ \ - /*brcbgyend = opj_int_ceildivpow2(l_br_prc_y_end, 1);*/ \ - cbgwidthexpn = l_pdx - 1; \ - cbgheightexpn = l_pdy - 1; \ - l_res->numbands = 3; \ - } \ - \ - cblkwidthexpn = opj_uint_min(l_tccp->cblkw, cbgwidthexpn); \ - cblkheightexpn = opj_uint_min(l_tccp->cblkh, cbgheightexpn); \ - l_band = l_res->bands; \ - \ - for (bandno = 0; bandno < l_res->numbands; ++bandno) { \ - OPJ_INT32 numbps; \ - /*fprintf(stderr, "\t\t\tband_no=%d/%d\n", bandno, l_res->numbands );*/ \ - \ - if (resno == 0) { \ - l_band->bandno = 0 ; \ - l_band->x0 = opj_int_ceildivpow2(l_tilec->x0, (OPJ_INT32)l_level_no); \ - l_band->y0 = opj_int_ceildivpow2(l_tilec->y0, (OPJ_INT32)l_level_no); \ - l_band->x1 = opj_int_ceildivpow2(l_tilec->x1, (OPJ_INT32)l_level_no); \ - l_band->y1 = opj_int_ceildivpow2(l_tilec->y1, (OPJ_INT32)l_level_no); \ - } \ - else { \ - l_band->bandno = bandno + 1; \ - /* x0b = 1 if bandno = 1 or 3 */ \ - l_x0b = l_band->bandno&1; \ - /* y0b = 1 if bandno = 2 or 3 */ \ - l_y0b = (OPJ_INT32)((l_band->bandno)>>1); \ - /* l_band border (global) */ \ - l_band->x0 = opj_int_ceildivpow2(l_tilec->x0 - (1 << l_level_no) * l_x0b, (OPJ_INT32)(l_level_no + 1)); \ - l_band->y0 = opj_int_ceildivpow2(l_tilec->y0 - (1 << l_level_no) * l_y0b, (OPJ_INT32)(l_level_no + 1)); \ - l_band->x1 = opj_int_ceildivpow2(l_tilec->x1 - (1 << l_level_no) * l_x0b, (OPJ_INT32)(l_level_no + 1)); \ - l_band->y1 = opj_int_ceildivpow2(l_tilec->y1 - (1 << l_level_no) * l_y0b, (OPJ_INT32)(l_level_no + 1)); \ - } \ - \ - /** avoid an if with storing function pointer */ \ - l_gain = (*l_gain_ptr) (l_band->bandno); \ - numbps = (OPJ_INT32)(l_image_comp->prec + l_gain); \ - l_band->stepsize = (OPJ_FLOAT32)(((1.0 + l_step_size->mant / 2048.0) * pow(2.0, (OPJ_INT32) (numbps - l_step_size->expn)))) * FRACTION; \ - l_band->numbps = l_step_size->expn + (OPJ_INT32)l_tccp->numgbits - 1; /* WHY -1 ? */ \ - \ - if (! l_band->precincts) { \ - l_band->precincts = (opj_tcd_precinct_t *) opj_malloc( /*3 * */ l_nb_precinct_size); \ - if (! l_band->precincts) { \ - return OPJ_FALSE; \ - } \ - /*fprintf(stderr, "\t\t\t\tAllocate precincts of a band (opj_tcd_precinct_t): %d\n",l_nb_precinct_size); */ \ - memset(l_band->precincts,0,l_nb_precinct_size); \ - l_band->precincts_data_size = l_nb_precinct_size; \ - } \ - else if (l_band->precincts_data_size < l_nb_precinct_size) { \ - \ - opj_tcd_precinct_t * new_precincts = (opj_tcd_precinct_t *) opj_realloc(l_band->precincts,/*3 * */ l_nb_precinct_size); \ - if (! new_precincts) { \ - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to handle band precints\n"); */ \ - fprintf(stderr, "Not enough memory to handle band precints\n"); \ - opj_free(l_band->precincts); \ - l_band->precincts = NULL; \ - l_band->precincts_data_size = 0; \ - return OPJ_FALSE; \ - } \ - l_band->precincts = new_precincts; \ - /*fprintf(stderr, "\t\t\t\tReallocate precincts of a band (opj_tcd_precinct_t): from %d to %d\n",l_band->precincts_data_size, l_nb_precinct_size);*/ \ - memset(((OPJ_BYTE *) l_band->precincts) + l_band->precincts_data_size,0,l_nb_precinct_size - l_band->precincts_data_size); \ - l_band->precincts_data_size = l_nb_precinct_size; \ - } \ - \ - l_current_precinct = l_band->precincts; \ - for (precno = 0; precno < l_nb_precincts; ++precno) { \ - OPJ_INT32 tlcblkxstart, tlcblkystart, brcblkxend, brcblkyend; \ - OPJ_INT32 cbgxstart = tlcbgxstart + (OPJ_INT32)(precno % l_res->pw) * (1 << cbgwidthexpn); \ - OPJ_INT32 cbgystart = tlcbgystart + (OPJ_INT32)(precno / l_res->pw) * (1 << cbgheightexpn); \ - OPJ_INT32 cbgxend = cbgxstart + (1 << cbgwidthexpn); \ - OPJ_INT32 cbgyend = cbgystart + (1 << cbgheightexpn); \ - /*fprintf(stderr, "\t precno=%d; bandno=%d, resno=%d; compno=%d\n", precno, bandno , resno, compno);*/ \ - /*fprintf(stderr, "\t tlcbgxstart(=%d) + (precno(=%d) percent res->pw(=%d)) * (1 << cbgwidthexpn(=%d)) \n",tlcbgxstart,precno,l_res->pw,cbgwidthexpn);*/ \ - \ - /* precinct size (global) */ \ - /*fprintf(stderr, "\t cbgxstart=%d, l_band->x0 = %d \n",cbgxstart, l_band->x0);*/ \ - \ - l_current_precinct->x0 = opj_int_max(cbgxstart, l_band->x0); \ - l_current_precinct->y0 = opj_int_max(cbgystart, l_band->y0); \ - l_current_precinct->x1 = opj_int_min(cbgxend, l_band->x1); \ - l_current_precinct->y1 = opj_int_min(cbgyend, l_band->y1); \ - /*fprintf(stderr, "\t prc_x0=%d; prc_y0=%d, prc_x1=%d; prc_y1=%d\n",l_current_precinct->x0, l_current_precinct->y0 ,l_current_precinct->x1, l_current_precinct->y1);*/ \ - \ - tlcblkxstart = opj_int_floordivpow2(l_current_precinct->x0, (OPJ_INT32)cblkwidthexpn) << cblkwidthexpn; \ - /*fprintf(stderr, "\t tlcblkxstart =%d\n",tlcblkxstart );*/ \ - tlcblkystart = opj_int_floordivpow2(l_current_precinct->y0, (OPJ_INT32)cblkheightexpn) << cblkheightexpn; \ - /*fprintf(stderr, "\t tlcblkystart =%d\n",tlcblkystart );*/ \ - brcblkxend = opj_int_ceildivpow2(l_current_precinct->x1, (OPJ_INT32)cblkwidthexpn) << cblkwidthexpn; \ - /*fprintf(stderr, "\t brcblkxend =%d\n",brcblkxend );*/ \ - brcblkyend = opj_int_ceildivpow2(l_current_precinct->y1, (OPJ_INT32)cblkheightexpn) << cblkheightexpn; \ - /*fprintf(stderr, "\t brcblkyend =%d\n",brcblkyend );*/ \ - l_current_precinct->cw = (OPJ_UINT32)((brcblkxend - tlcblkxstart) >> cblkwidthexpn); \ - l_current_precinct->ch = (OPJ_UINT32)((brcblkyend - tlcblkystart) >> cblkheightexpn); \ - \ - l_nb_code_blocks = l_current_precinct->cw * l_current_precinct->ch; \ - /*fprintf(stderr, "\t\t\t\t precinct_cw = %d x recinct_ch = %d\n",l_current_precinct->cw, l_current_precinct->ch); */ \ - l_nb_code_blocks_size = l_nb_code_blocks * (OPJ_UINT32)sizeof(TYPE); \ - \ - if (! l_current_precinct->cblks.ELEMENT) { \ - l_current_precinct->cblks.ELEMENT = (TYPE*) opj_malloc(l_nb_code_blocks_size); \ - if (! l_current_precinct->cblks.ELEMENT ) { \ - return OPJ_FALSE; \ - } \ - /*fprintf(stderr, "\t\t\t\tAllocate cblks of a precinct (opj_tcd_cblk_dec_t): %d\n",l_nb_code_blocks_size);*/ \ - \ - memset(l_current_precinct->cblks.ELEMENT,0,l_nb_code_blocks_size); \ - \ - l_current_precinct->block_size = l_nb_code_blocks_size; \ - } \ - else if (l_nb_code_blocks_size > l_current_precinct->block_size) { \ - TYPE *new_ELEMENT = (TYPE*) opj_realloc(l_current_precinct->cblks.ELEMENT, l_nb_code_blocks_size); \ - if (! new_ELEMENT) { \ - opj_free(l_current_precinct->cblks.ELEMENT); \ - l_current_precinct->cblks.ELEMENT = NULL; \ - l_current_precinct->block_size = 0; \ - /* opj_event_msg(p_manager, EVT_ERROR, "Not enough memory for current precinct codeblock element\n"); */ \ - fprintf(stderr, "Not enough memory for current precinct codeblock element\n"); \ - return OPJ_FALSE; \ - } \ - l_current_precinct->cblks.ELEMENT = new_ELEMENT; \ - /*fprintf(stderr, "\t\t\t\tReallocate cblks of a precinct (opj_tcd_cblk_dec_t): from %d to %d\n",l_current_precinct->block_size, l_nb_code_blocks_size); */\ - \ - memset(((OPJ_BYTE *) l_current_precinct->cblks.ELEMENT) + l_current_precinct->block_size \ - ,0 \ - ,l_nb_code_blocks_size - l_current_precinct->block_size); \ - \ - l_current_precinct->block_size = l_nb_code_blocks_size; \ - } \ - \ - if (! l_current_precinct->incltree) { \ - l_current_precinct->incltree = opj_tgt_create(l_current_precinct->cw, \ - l_current_precinct->ch); \ - } \ - else{ \ - l_current_precinct->incltree = opj_tgt_init(l_current_precinct->incltree, \ - l_current_precinct->cw, \ - l_current_precinct->ch); \ - } \ - \ - if (! l_current_precinct->incltree) { \ - fprintf(stderr, "WARNING: No incltree created.\n"); \ - /*return OPJ_FALSE;*/ \ - } \ - \ - if (! l_current_precinct->imsbtree) { \ - l_current_precinct->imsbtree = opj_tgt_create( \ - l_current_precinct->cw, \ - l_current_precinct->ch); \ - } \ - else { \ - l_current_precinct->imsbtree = opj_tgt_init( \ - l_current_precinct->imsbtree, \ - l_current_precinct->cw, \ - l_current_precinct->ch); \ - } \ - \ - if (! l_current_precinct->imsbtree) { \ - fprintf(stderr, "WARNING: No imsbtree created.\n"); \ - /*return OPJ_FALSE;*/ \ - } \ - \ - l_code_block = l_current_precinct->cblks.ELEMENT; \ - \ - for (cblkno = 0; cblkno < l_nb_code_blocks; ++cblkno) { \ - OPJ_INT32 cblkxstart = tlcblkxstart + (OPJ_INT32)(cblkno % l_current_precinct->cw) * (1 << cblkwidthexpn); \ - OPJ_INT32 cblkystart = tlcblkystart + (OPJ_INT32)(cblkno / l_current_precinct->cw) * (1 << cblkheightexpn); \ - OPJ_INT32 cblkxend = cblkxstart + (1 << cblkwidthexpn); \ - OPJ_INT32 cblkyend = cblkystart + (1 << cblkheightexpn); \ - \ - /* code-block size (global) */ \ - l_code_block->x0 = opj_int_max(cblkxstart, l_current_precinct->x0); \ - l_code_block->y0 = opj_int_max(cblkystart, l_current_precinct->y0); \ - l_code_block->x1 = opj_int_min(cblkxend, l_current_precinct->x1); \ - l_code_block->y1 = opj_int_min(cblkyend, l_current_precinct->y1); \ - \ - if (! FUNCTION_ELEMENT(l_code_block)) { \ - return OPJ_FALSE; \ - } \ - ++l_code_block; \ - } \ - ++l_current_precinct; \ - } /* precno */ \ - ++l_band; \ - ++l_step_size; \ - } /* bandno */ \ - ++l_res; \ - --l_level_no; \ - } /* resno */ \ - ++l_tccp; \ - ++l_tilec; \ - ++l_image_comp; \ - } /* compno */ \ - return OPJ_TRUE; \ -} \ - - -OPJ_MACRO_TCD_ALLOCATE(opj_tcd_init_encode_tile, opj_tcd_cblk_enc_t, 1.f, enc, opj_tcd_code_block_enc_allocate) -OPJ_MACRO_TCD_ALLOCATE(opj_tcd_init_decode_tile, opj_tcd_cblk_dec_t, 0.5f, dec, opj_tcd_code_block_dec_allocate) - -#undef OPJ_MACRO_TCD_ALLOCATE - -/** - * Allocates memory for an encoding code block. - */ -OPJ_BOOL opj_tcd_code_block_enc_allocate (opj_tcd_cblk_enc_t * p_code_block) -{ - if (! p_code_block->data) { - - p_code_block->data = (OPJ_BYTE*) opj_malloc(OPJ_J2K_DEFAULT_CBLK_DATA_SIZE*2); /*why +1 ?*/ - if(! p_code_block->data) { - return OPJ_FALSE; - } - - p_code_block->data[0] = 0; - p_code_block->data+=1; - - /* no memset since data */ - p_code_block->layers = (opj_tcd_layer_t*) opj_malloc(100 * sizeof(opj_tcd_layer_t)); - if (! p_code_block->layers) { - return OPJ_FALSE; - } - - p_code_block->passes = (opj_tcd_pass_t*) opj_malloc(100 * sizeof(opj_tcd_pass_t)); - if (! p_code_block->passes) { - return OPJ_FALSE; - } - } - - memset(p_code_block->layers,0,100 * sizeof(opj_tcd_layer_t)); - memset(p_code_block->passes,0,100 * sizeof(opj_tcd_pass_t)); - - return OPJ_TRUE; -} - -/** - * Allocates memory for a decoding code block. - */ -OPJ_BOOL opj_tcd_code_block_dec_allocate (opj_tcd_cblk_dec_t * p_code_block) -{ - OPJ_UINT32 l_seg_size; - - if (! p_code_block->data) { - - p_code_block->data = (OPJ_BYTE*) opj_malloc(OPJ_J2K_DEFAULT_CBLK_DATA_SIZE); - if (! p_code_block->data) { - return OPJ_FALSE; - } - p_code_block->data_max_size = OPJ_J2K_DEFAULT_CBLK_DATA_SIZE; - /*fprintf(stderr, "Allocate 8192 elements of code_block->data\n");*/ - - l_seg_size = OPJ_J2K_DEFAULT_NB_SEGS * sizeof(opj_tcd_seg_t); - p_code_block->segs = (opj_tcd_seg_t *) opj_malloc(l_seg_size); - if (! p_code_block->segs) { - return OPJ_FALSE; - } - memset(p_code_block->segs,0,l_seg_size); - /*fprintf(stderr, "Allocate %d elements of code_block->data\n", OPJ_J2K_DEFAULT_NB_SEGS * sizeof(opj_tcd_seg_t));*/ - - p_code_block->m_current_max_segs = OPJ_J2K_DEFAULT_NB_SEGS; - /*fprintf(stderr, "m_current_max_segs of code_block->data = %d\n", p_code_block->m_current_max_segs);*/ - } - /* TODO */ - /*p_code_block->numsegs = 0; */ - - return OPJ_TRUE; -} - -OPJ_UINT32 opj_tcd_get_decoded_tile_size ( opj_tcd_t *p_tcd ) -{ - OPJ_UINT32 i; - OPJ_UINT32 l_data_size = 0; - opj_image_comp_t * l_img_comp = 00; - opj_tcd_tilecomp_t * l_tile_comp = 00; - opj_tcd_resolution_t * l_res = 00; - OPJ_UINT32 l_size_comp, l_remaining; - - l_tile_comp = p_tcd->tcd_image->tiles->comps; - l_img_comp = p_tcd->image->comps; - - for (i=0;iimage->numcomps;++i) { - l_size_comp = l_img_comp->prec >> 3; /*(/ 8)*/ - l_remaining = l_img_comp->prec & 7; /* (%8) */ - - if(l_remaining) { - ++l_size_comp; - } - - if (l_size_comp == 3) { - l_size_comp = 4; - } - - l_res = l_tile_comp->resolutions + l_tile_comp->minimum_num_resolutions - 1; - l_data_size += l_size_comp * (OPJ_UINT32)((l_res->x1 - l_res->x0) * (l_res->y1 - l_res->y0)); - ++l_img_comp; - ++l_tile_comp; - } - - return l_data_size; -} - -OPJ_BOOL opj_tcd_encode_tile( opj_tcd_t *p_tcd, - OPJ_UINT32 p_tile_no, - OPJ_BYTE *p_dest, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 p_max_length, - opj_codestream_info_t *p_cstr_info) -{ - - if (p_tcd->cur_tp_num == 0) { - - p_tcd->tcd_tileno = p_tile_no; - p_tcd->tcp = &p_tcd->cp->tcps[p_tile_no]; - - /* INDEX >> "Precinct_nb_X et Precinct_nb_Y" */ - if(p_cstr_info) { - OPJ_UINT32 l_num_packs = 0; - OPJ_UINT32 i; - opj_tcd_tilecomp_t *l_tilec_idx = &p_tcd->tcd_image->tiles->comps[0]; /* based on component 0 */ - opj_tccp_t *l_tccp = p_tcd->tcp->tccps; /* based on component 0 */ - - for (i = 0; i < l_tilec_idx->numresolutions; i++) { - opj_tcd_resolution_t *l_res_idx = &l_tilec_idx->resolutions[i]; - - p_cstr_info->tile[p_tile_no].pw[i] = (int)l_res_idx->pw; - p_cstr_info->tile[p_tile_no].ph[i] = (int)l_res_idx->ph; - - l_num_packs += l_res_idx->pw * l_res_idx->ph; - p_cstr_info->tile[p_tile_no].pdx[i] = (int)l_tccp->prcw[i]; - p_cstr_info->tile[p_tile_no].pdy[i] = (int)l_tccp->prch[i]; - } - p_cstr_info->tile[p_tile_no].packet = (opj_packet_info_t*) opj_calloc((size_t)p_cstr_info->numcomps * (size_t)p_cstr_info->numlayers * l_num_packs, sizeof(opj_packet_info_t)); - } - /* << INDEX */ - - /* FIXME _ProfStart(PGROUP_DC_SHIFT); */ - /*---------------TILE-------------------*/ - if (! opj_tcd_dc_level_shift_encode(p_tcd)) { - return OPJ_FALSE; - } - /* FIXME _ProfStop(PGROUP_DC_SHIFT); */ - - /* FIXME _ProfStart(PGROUP_MCT); */ - if (! opj_tcd_mct_encode(p_tcd)) { - return OPJ_FALSE; - } - /* FIXME _ProfStop(PGROUP_MCT); */ - - /* FIXME _ProfStart(PGROUP_DWT); */ - if (! opj_tcd_dwt_encode(p_tcd)) { - return OPJ_FALSE; - } - /* FIXME _ProfStop(PGROUP_DWT); */ - - /* FIXME _ProfStart(PGROUP_T1); */ - if (! opj_tcd_t1_encode(p_tcd)) { - return OPJ_FALSE; - } - /* FIXME _ProfStop(PGROUP_T1); */ - - /* FIXME _ProfStart(PGROUP_RATE); */ - if (! opj_tcd_rate_allocate_encode(p_tcd,p_dest,p_max_length,p_cstr_info)) { - return OPJ_FALSE; - } - /* FIXME _ProfStop(PGROUP_RATE); */ - - } - /*--------------TIER2------------------*/ - - /* INDEX */ - if (p_cstr_info) { - p_cstr_info->index_write = 1; - } - /* FIXME _ProfStart(PGROUP_T2); */ - - if (! opj_tcd_t2_encode(p_tcd,p_dest,p_data_written,p_max_length,p_cstr_info)) { - return OPJ_FALSE; - } - /* FIXME _ProfStop(PGROUP_T2); */ - - /*---------------CLEAN-------------------*/ - - return OPJ_TRUE; -} - -OPJ_BOOL opj_tcd_decode_tile( opj_tcd_t *p_tcd, - OPJ_BYTE *p_src, - OPJ_UINT32 p_max_length, - OPJ_UINT32 p_tile_no, - opj_codestream_index_t *p_cstr_index - ) -{ - OPJ_UINT32 l_data_read; - p_tcd->tcd_tileno = p_tile_no; - p_tcd->tcp = &(p_tcd->cp->tcps[p_tile_no]); - -#ifdef TODO_MSD /* FIXME */ - /* INDEX >> */ - if(p_cstr_info) { - OPJ_UINT32 resno, compno, numprec = 0; - for (compno = 0; compno < (OPJ_UINT32) p_cstr_info->numcomps; compno++) { - opj_tcp_t *tcp = &p_tcd->cp->tcps[0]; - opj_tccp_t *tccp = &tcp->tccps[compno]; - opj_tcd_tilecomp_t *tilec_idx = &p_tcd->tcd_image->tiles->comps[compno]; - for (resno = 0; resno < tilec_idx->numresolutions; resno++) { - opj_tcd_resolution_t *res_idx = &tilec_idx->resolutions[resno]; - p_cstr_info->tile[p_tile_no].pw[resno] = res_idx->pw; - p_cstr_info->tile[p_tile_no].ph[resno] = res_idx->ph; - numprec += res_idx->pw * res_idx->ph; - p_cstr_info->tile[p_tile_no].pdx[resno] = tccp->prcw[resno]; - p_cstr_info->tile[p_tile_no].pdy[resno] = tccp->prch[resno]; - } - } - p_cstr_info->tile[p_tile_no].packet = (opj_packet_info_t *) opj_malloc(p_cstr_info->numlayers * numprec * sizeof(opj_packet_info_t)); - p_cstr_info->packno = 0; - } - /* << INDEX */ -#endif - - /*--------------TIER2------------------*/ - /* FIXME _ProfStart(PGROUP_T2); */ - l_data_read = 0; - if (! opj_tcd_t2_decode(p_tcd, p_src, &l_data_read, p_max_length, p_cstr_index)) - { - return OPJ_FALSE; - } - /* FIXME _ProfStop(PGROUP_T2); */ - - /*------------------TIER1-----------------*/ - - /* FIXME _ProfStart(PGROUP_T1); */ - if - (! opj_tcd_t1_decode(p_tcd)) - { - return OPJ_FALSE; - } - /* FIXME _ProfStop(PGROUP_T1); */ - - /*----------------DWT---------------------*/ - - /* FIXME _ProfStart(PGROUP_DWT); */ - if - (! opj_tcd_dwt_decode(p_tcd)) - { - return OPJ_FALSE; - } - /* FIXME _ProfStop(PGROUP_DWT); */ - - /*----------------MCT-------------------*/ - /* FIXME _ProfStart(PGROUP_MCT); */ - if - (! opj_tcd_mct_decode(p_tcd)) - { - return OPJ_FALSE; - } - /* FIXME _ProfStop(PGROUP_MCT); */ - - /* FIXME _ProfStart(PGROUP_DC_SHIFT); */ - if - (! opj_tcd_dc_level_shift_decode(p_tcd)) - { - return OPJ_FALSE; - } - /* FIXME _ProfStop(PGROUP_DC_SHIFT); */ - - - /*---------------TILE-------------------*/ - return OPJ_TRUE; -} - -OPJ_BOOL opj_tcd_update_tile_data ( opj_tcd_t *p_tcd, - OPJ_BYTE * p_dest, - OPJ_UINT32 p_dest_length - ) -{ - OPJ_UINT32 i,j,k,l_data_size = 0; - opj_image_comp_t * l_img_comp = 00; - opj_tcd_tilecomp_t * l_tilec = 00; - opj_tcd_resolution_t * l_res; - OPJ_UINT32 l_size_comp, l_remaining; - OPJ_UINT32 l_stride, l_width,l_height; - - l_data_size = opj_tcd_get_decoded_tile_size(p_tcd); - if (l_data_size > p_dest_length) { - return OPJ_FALSE; - } - - l_tilec = p_tcd->tcd_image->tiles->comps; - l_img_comp = p_tcd->image->comps; - - for (i=0;iimage->numcomps;++i) { - l_size_comp = l_img_comp->prec >> 3; /*(/ 8)*/ - l_remaining = l_img_comp->prec & 7; /* (%8) */ - l_res = l_tilec->resolutions + l_img_comp->resno_decoded; - l_width = (OPJ_UINT32)(l_res->x1 - l_res->x0); - l_height = (OPJ_UINT32)(l_res->y1 - l_res->y0); - l_stride = (OPJ_UINT32)(l_tilec->x1 - l_tilec->x0) - l_width; - - if (l_remaining) { - ++l_size_comp; - } - - if (l_size_comp == 3) { - l_size_comp = 4; - } - - switch (l_size_comp) - { - case 1: - { - OPJ_CHAR * l_dest_ptr = (OPJ_CHAR *) p_dest; - const OPJ_INT32 * l_src_ptr = l_tilec->data; - - if (l_img_comp->sgnd) { - for (j=0;jdata; - OPJ_INT16 * l_dest_ptr = (OPJ_INT16 *) p_dest; - - if (l_img_comp->sgnd) { - for (j=0;jdata; - - for (j=0;jtcd_image) { - return; - } - - if (p_tcd->m_is_decoder) { - l_tcd_code_block_deallocate = opj_tcd_code_block_dec_deallocate; - } - else { - l_tcd_code_block_deallocate = opj_tcd_code_block_enc_deallocate; - } - - l_tile = p_tcd->tcd_image->tiles; - if (! l_tile) { - return; - } - - l_tile_comp = l_tile->comps; - - for (compno = 0; compno < l_tile->numcomps; ++compno) { - l_res = l_tile_comp->resolutions; - if (l_res) { - - l_nb_resolutions = l_tile_comp->resolutions_size / sizeof(opj_tcd_resolution_t); - for (resno = 0; resno < l_nb_resolutions; ++resno) { - l_band = l_res->bands; - for (bandno = 0; bandno < 3; ++bandno) { - l_precinct = l_band->precincts; - if (l_precinct) { - - l_nb_precincts = l_band->precincts_data_size / sizeof(opj_tcd_precinct_t); - for (precno = 0; precno < l_nb_precincts; ++precno) { - opj_tgt_destroy(l_precinct->incltree); - l_precinct->incltree = 00; - opj_tgt_destroy(l_precinct->imsbtree); - l_precinct->imsbtree = 00; - (*l_tcd_code_block_deallocate) (l_precinct); - ++l_precinct; - } - - opj_free(l_band->precincts); - l_band->precincts = 00; - } - ++l_band; - } /* for (resno */ - ++l_res; - } - - opj_free(l_tile_comp->resolutions); - l_tile_comp->resolutions = 00; - } - - if (l_tile_comp->data) { - opj_free(l_tile_comp->data); - l_tile_comp->data = 00; - } - ++l_tile_comp; - } - - opj_free(l_tile->comps); - l_tile->comps = 00; - opj_free(p_tcd->tcd_image->tiles); - p_tcd->tcd_image->tiles = 00; -} - - -OPJ_BOOL opj_tcd_t2_decode (opj_tcd_t *p_tcd, - OPJ_BYTE * p_src_data, - OPJ_UINT32 * p_data_read, - OPJ_UINT32 p_max_src_size, - opj_codestream_index_t *p_cstr_index - ) -{ - opj_t2_t * l_t2; - - l_t2 = opj_t2_create(p_tcd->image, p_tcd->cp); - if (l_t2 == 00) { - return OPJ_FALSE; - } - - if (! opj_t2_decode_packets( - l_t2, - p_tcd->tcd_tileno, - p_tcd->tcd_image->tiles, - p_src_data, - p_data_read, - p_max_src_size, - p_cstr_index)) { - opj_t2_destroy(l_t2); - return OPJ_FALSE; - } - - opj_t2_destroy(l_t2); - - /*---------------CLEAN-------------------*/ - return OPJ_TRUE; -} - -OPJ_BOOL opj_tcd_t1_decode ( opj_tcd_t *p_tcd ) -{ - OPJ_UINT32 compno; - opj_t1_t * l_t1; - opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; - opj_tcd_tilecomp_t* l_tile_comp = l_tile->comps; - opj_tccp_t * l_tccp = p_tcd->tcp->tccps; - - - l_t1 = opj_t1_create(); - if (l_t1 == 00) { - return OPJ_FALSE; - } - - for (compno = 0; compno < l_tile->numcomps; ++compno) { - /* The +3 is headroom required by the vectorized DWT */ - if (OPJ_FALSE == opj_t1_decode_cblks(l_t1, l_tile_comp, l_tccp)) { - opj_t1_destroy(l_t1); - return OPJ_FALSE; - } - ++l_tile_comp; - ++l_tccp; - } - - opj_t1_destroy(l_t1); - - return OPJ_TRUE; -} - - -OPJ_BOOL opj_tcd_dwt_decode ( opj_tcd_t *p_tcd ) -{ - OPJ_UINT32 compno; - opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; - opj_tcd_tilecomp_t * l_tile_comp = l_tile->comps; - opj_tccp_t * l_tccp = p_tcd->tcp->tccps; - opj_image_comp_t * l_img_comp = p_tcd->image->comps; - - for (compno = 0; compno < l_tile->numcomps; compno++) { - /* - if (tcd->cp->reduce != 0) { - tcd->image->comps[compno].resno_decoded = - tile->comps[compno].numresolutions - tcd->cp->reduce - 1; - if (tcd->image->comps[compno].resno_decoded < 0) - { - return false; - } - } - numres2decode = tcd->image->comps[compno].resno_decoded + 1; - if(numres2decode > 0){ - */ - - if (l_tccp->qmfbid == 1) { - if (! opj_dwt_decode(l_tile_comp, l_img_comp->resno_decoded+1)) { - return OPJ_FALSE; - } - } - else { - if (! opj_dwt_decode_real(l_tile_comp, l_img_comp->resno_decoded+1)) { - return OPJ_FALSE; - } - } - - ++l_tile_comp; - ++l_img_comp; - ++l_tccp; - } - - return OPJ_TRUE; -} -OPJ_BOOL opj_tcd_mct_decode ( opj_tcd_t *p_tcd ) -{ - opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; - opj_tcp_t * l_tcp = p_tcd->tcp; - opj_tcd_tilecomp_t * l_tile_comp = l_tile->comps; - OPJ_UINT32 l_samples,i; - - if (! l_tcp->mct) { - return OPJ_TRUE; - } - - l_samples = (OPJ_UINT32)((l_tile_comp->x1 - l_tile_comp->x0) * (l_tile_comp->y1 - l_tile_comp->y0)); - - if (l_tile->numcomps >= 3 ){ - /* testcase 1336.pdf.asan.47.376 */ - if ((l_tile->comps[0].x1 - l_tile->comps[0].x0) * (l_tile->comps[0].y1 - l_tile->comps[0].y0) < (OPJ_INT32)l_samples || - (l_tile->comps[1].x1 - l_tile->comps[1].x0) * (l_tile->comps[1].y1 - l_tile->comps[1].y0) < (OPJ_INT32)l_samples || - (l_tile->comps[2].x1 - l_tile->comps[2].x0) * (l_tile->comps[2].y1 - l_tile->comps[2].y0) < (OPJ_INT32)l_samples) { - fprintf(stderr, "Tiles don't all have the same dimension. Skip the MCT step.\n"); - return OPJ_FALSE; - } - else if (l_tcp->mct == 2) { - OPJ_BYTE ** l_data; - - if (! l_tcp->m_mct_decoding_matrix) { - return OPJ_TRUE; - } - - l_data = (OPJ_BYTE **) opj_malloc(l_tile->numcomps*sizeof(OPJ_BYTE*)); - if (! l_data) { - return OPJ_FALSE; - } - - for (i=0;inumcomps;++i) { - l_data[i] = (OPJ_BYTE*) l_tile_comp->data; - ++l_tile_comp; - } - - if (! opj_mct_decode_custom(/* MCT data */ - (OPJ_BYTE*) l_tcp->m_mct_decoding_matrix, - /* size of components */ - l_samples, - /* components */ - l_data, - /* nb of components (i.e. size of pData) */ - l_tile->numcomps, - /* tells if the data is signed */ - p_tcd->image->comps->sgnd)) { - opj_free(l_data); - return OPJ_FALSE; - } - - opj_free(l_data); - } - else { - if (l_tcp->tccps->qmfbid == 1) { - opj_mct_decode( l_tile->comps[0].data, - l_tile->comps[1].data, - l_tile->comps[2].data, - l_samples); - } - else { - opj_mct_decode_real((OPJ_FLOAT32*)l_tile->comps[0].data, - (OPJ_FLOAT32*)l_tile->comps[1].data, - (OPJ_FLOAT32*)l_tile->comps[2].data, - l_samples); - } - } - } - else { - /* FIXME need to use opj_event_msg function */ - fprintf(stderr,"Number of components (%d) is inconsistent with a MCT. Skip the MCT step.\n",l_tile->numcomps); - } - - return OPJ_TRUE; -} - - -OPJ_BOOL opj_tcd_dc_level_shift_decode ( opj_tcd_t *p_tcd ) -{ - OPJ_UINT32 compno; - opj_tcd_tilecomp_t * l_tile_comp = 00; - opj_tccp_t * l_tccp = 00; - opj_image_comp_t * l_img_comp = 00; - opj_tcd_resolution_t* l_res = 00; - opj_tcd_tile_t * l_tile; - OPJ_UINT32 l_width,l_height,i,j; - OPJ_INT32 * l_current_ptr; - OPJ_INT32 l_min, l_max; - OPJ_UINT32 l_stride; - - l_tile = p_tcd->tcd_image->tiles; - l_tile_comp = l_tile->comps; - l_tccp = p_tcd->tcp->tccps; - l_img_comp = p_tcd->image->comps; - - for (compno = 0; compno < l_tile->numcomps; compno++) { - l_res = l_tile_comp->resolutions + l_img_comp->resno_decoded; - l_width = (OPJ_UINT32)(l_res->x1 - l_res->x0); - l_height = (OPJ_UINT32)(l_res->y1 - l_res->y0); - l_stride = (OPJ_UINT32)(l_tile_comp->x1 - l_tile_comp->x0) - l_width; - - assert(l_height == 0 || l_width + l_stride <= l_tile_comp->data_size / l_height); /*MUPDF*/ - - if (l_img_comp->sgnd) { - l_min = -(1 << (l_img_comp->prec - 1)); - l_max = (1 << (l_img_comp->prec - 1)) - 1; - } - else { - l_min = 0; - l_max = (1 << l_img_comp->prec) - 1; - } - - l_current_ptr = l_tile_comp->data; - - if (l_tccp->qmfbid == 1) { - for (j=0;jm_dc_level_shift, l_min, l_max); - ++l_current_ptr; - } - l_current_ptr += l_stride; - } - } - else { - for (j=0;jm_dc_level_shift, l_min, l_max); ; - ++l_current_ptr; - } - l_current_ptr += l_stride; - } - } - - ++l_img_comp; - ++l_tccp; - ++l_tile_comp; - } - - return OPJ_TRUE; -} - - - -/** - * Deallocates the encoding data of the given precinct. - */ -void opj_tcd_code_block_dec_deallocate (opj_tcd_precinct_t * p_precinct) -{ - OPJ_UINT32 cblkno , l_nb_code_blocks; - - opj_tcd_cblk_dec_t * l_code_block = p_precinct->cblks.dec; - if (l_code_block) { - /*fprintf(stderr,"deallocate codeblock:{\n");*/ - /*fprintf(stderr,"\t x0=%d, y0=%d, x1=%d, y1=%d\n",l_code_block->x0, l_code_block->y0, l_code_block->x1, l_code_block->y1);*/ - /*fprintf(stderr,"\t numbps=%d, numlenbits=%d, len=%d, numnewpasses=%d, real_num_segs=%d, m_current_max_segs=%d\n ", - l_code_block->numbps, l_code_block->numlenbits, l_code_block->len, l_code_block->numnewpasses, l_code_block->real_num_segs, l_code_block->m_current_max_segs );*/ - - - l_nb_code_blocks = p_precinct->block_size / sizeof(opj_tcd_cblk_dec_t); - /*fprintf(stderr,"nb_code_blocks =%d\t}\n", l_nb_code_blocks);*/ - - for (cblkno = 0; cblkno < l_nb_code_blocks; ++cblkno) { - - if (l_code_block->data) { - opj_free(l_code_block->data); - l_code_block->data = 00; - } - - if (l_code_block->segs) { - opj_free(l_code_block->segs ); - l_code_block->segs = 00; - } - - ++l_code_block; - } - - opj_free(p_precinct->cblks.dec); - p_precinct->cblks.dec = 00; - } -} - -/** - * Deallocates the encoding data of the given precinct. - */ -void opj_tcd_code_block_enc_deallocate (opj_tcd_precinct_t * p_precinct) -{ - OPJ_UINT32 cblkno , l_nb_code_blocks; - - opj_tcd_cblk_enc_t * l_code_block = p_precinct->cblks.enc; - if (l_code_block) { - l_nb_code_blocks = p_precinct->block_size / sizeof(opj_tcd_cblk_enc_t); - - for (cblkno = 0; cblkno < l_nb_code_blocks; ++cblkno) { - if (l_code_block->data) { - opj_free(l_code_block->data - 1); - l_code_block->data = 00; - } - - if (l_code_block->layers) { - opj_free(l_code_block->layers ); - l_code_block->layers = 00; - } - - if (l_code_block->passes) { - opj_free(l_code_block->passes ); - l_code_block->passes = 00; - } - ++l_code_block; - } - - opj_free(p_precinct->cblks.enc); - - p_precinct->cblks.enc = 00; - } -} - -OPJ_UINT32 opj_tcd_get_encoded_tile_size ( opj_tcd_t *p_tcd ) -{ - OPJ_UINT32 i,l_data_size = 0; - opj_image_comp_t * l_img_comp = 00; - opj_tcd_tilecomp_t * l_tilec = 00; - OPJ_UINT32 l_size_comp, l_remaining; - - l_tilec = p_tcd->tcd_image->tiles->comps; - l_img_comp = p_tcd->image->comps; - for (i=0;iimage->numcomps;++i) { - l_size_comp = l_img_comp->prec >> 3; /*(/ 8)*/ - l_remaining = l_img_comp->prec & 7; /* (%8) */ - - if (l_remaining) { - ++l_size_comp; - } - - if (l_size_comp == 3) { - l_size_comp = 4; - } - - l_data_size += l_size_comp * (OPJ_UINT32)((l_tilec->x1 - l_tilec->x0) * (l_tilec->y1 - l_tilec->y0)); - ++l_img_comp; - ++l_tilec; - } - - return l_data_size; -} - -OPJ_BOOL opj_tcd_dc_level_shift_encode ( opj_tcd_t *p_tcd ) -{ - OPJ_UINT32 compno; - opj_tcd_tilecomp_t * l_tile_comp = 00; - opj_tccp_t * l_tccp = 00; - opj_image_comp_t * l_img_comp = 00; - opj_tcd_tile_t * l_tile; - OPJ_UINT32 l_nb_elem,i; - OPJ_INT32 * l_current_ptr; - - l_tile = p_tcd->tcd_image->tiles; - l_tile_comp = l_tile->comps; - l_tccp = p_tcd->tcp->tccps; - l_img_comp = p_tcd->image->comps; - - for (compno = 0; compno < l_tile->numcomps; compno++) { - l_current_ptr = l_tile_comp->data; - l_nb_elem = (OPJ_UINT32)((l_tile_comp->x1 - l_tile_comp->x0) * (l_tile_comp->y1 - l_tile_comp->y0)); - - if (l_tccp->qmfbid == 1) { - for (i = 0; i < l_nb_elem; ++i) { - *l_current_ptr -= l_tccp->m_dc_level_shift ; - ++l_current_ptr; - } - } - else { - for (i = 0; i < l_nb_elem; ++i) { - *l_current_ptr = (*l_current_ptr - l_tccp->m_dc_level_shift) << 11 ; - ++l_current_ptr; - } - } - - ++l_img_comp; - ++l_tccp; - ++l_tile_comp; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_tcd_mct_encode ( opj_tcd_t *p_tcd ) -{ - opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; - opj_tcd_tilecomp_t * l_tile_comp = p_tcd->tcd_image->tiles->comps; - OPJ_UINT32 samples = (OPJ_UINT32)((l_tile_comp->x1 - l_tile_comp->x0) * (l_tile_comp->y1 - l_tile_comp->y0)); - OPJ_UINT32 i; - OPJ_BYTE ** l_data = 00; - opj_tcp_t * l_tcp = p_tcd->tcp; - - if(!p_tcd->tcp->mct) { - return OPJ_TRUE; - } - - if (p_tcd->tcp->mct == 2) { - if (! p_tcd->tcp->m_mct_coding_matrix) { - return OPJ_TRUE; - } - - l_data = (OPJ_BYTE **) opj_malloc(l_tile->numcomps*sizeof(OPJ_BYTE*)); - if (! l_data) { - return OPJ_FALSE; - } - - for (i=0;inumcomps;++i) { - l_data[i] = (OPJ_BYTE*) l_tile_comp->data; - ++l_tile_comp; - } - - if (! opj_mct_encode_custom(/* MCT data */ - (OPJ_BYTE*) p_tcd->tcp->m_mct_coding_matrix, - /* size of components */ - samples, - /* components */ - l_data, - /* nb of components (i.e. size of pData) */ - l_tile->numcomps, - /* tells if the data is signed */ - p_tcd->image->comps->sgnd) ) - { - opj_free(l_data); - return OPJ_FALSE; - } - - opj_free(l_data); - } - else if (l_tcp->tccps->qmfbid == 0) { - opj_mct_encode_real(l_tile->comps[0].data, l_tile->comps[1].data, l_tile->comps[2].data, samples); - } - else { - opj_mct_encode(l_tile->comps[0].data, l_tile->comps[1].data, l_tile->comps[2].data, samples); - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_tcd_dwt_encode ( opj_tcd_t *p_tcd ) -{ - opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; - opj_tcd_tilecomp_t * l_tile_comp = p_tcd->tcd_image->tiles->comps; - opj_tccp_t * l_tccp = p_tcd->tcp->tccps; - OPJ_UINT32 compno; - - for (compno = 0; compno < l_tile->numcomps; ++compno) { - if (l_tccp->qmfbid == 1) { - if (! opj_dwt_encode(l_tile_comp)) { - return OPJ_FALSE; - } - } - else if (l_tccp->qmfbid == 0) { - if (! opj_dwt_encode_real(l_tile_comp)) { - return OPJ_FALSE; - } - } - - ++l_tile_comp; - ++l_tccp; - } - - return OPJ_TRUE; -} - -OPJ_BOOL opj_tcd_t1_encode ( opj_tcd_t *p_tcd ) -{ - opj_t1_t * l_t1; - const OPJ_FLOAT64 * l_mct_norms; - opj_tcp_t * l_tcp = p_tcd->tcp; - - l_t1 = opj_t1_create(); - if (l_t1 == 00) { - return OPJ_FALSE; - } - - if (l_tcp->mct == 1) { - /* irreversible encoding */ - if (l_tcp->tccps->qmfbid == 0) { - l_mct_norms = opj_mct_get_mct_norms_real(); - } - else { - l_mct_norms = opj_mct_get_mct_norms(); - } - } - else { - l_mct_norms = (const OPJ_FLOAT64 *) (l_tcp->mct_norms); - } - - if (! opj_t1_encode_cblks(l_t1, p_tcd->tcd_image->tiles , l_tcp, l_mct_norms)) { - opj_t1_destroy(l_t1); - return OPJ_FALSE; - } - - opj_t1_destroy(l_t1); - - return OPJ_TRUE; -} - -OPJ_BOOL opj_tcd_t2_encode (opj_tcd_t *p_tcd, - OPJ_BYTE * p_dest_data, - OPJ_UINT32 * p_data_written, - OPJ_UINT32 p_max_dest_size, - opj_codestream_info_t *p_cstr_info ) -{ - opj_t2_t * l_t2; - - l_t2 = opj_t2_create(p_tcd->image, p_tcd->cp); - if (l_t2 == 00) { - return OPJ_FALSE; - } - - if (! opj_t2_encode_packets( - l_t2, - p_tcd->tcd_tileno, - p_tcd->tcd_image->tiles, - p_tcd->tcp->numlayers, - p_dest_data, - p_data_written, - p_max_dest_size, - p_cstr_info, - p_tcd->tp_num, - p_tcd->tp_pos, - p_tcd->cur_pino, - FINAL_PASS)) - { - opj_t2_destroy(l_t2); - return OPJ_FALSE; - } - - opj_t2_destroy(l_t2); - - /*---------------CLEAN-------------------*/ - return OPJ_TRUE; -} - - -OPJ_BOOL opj_tcd_rate_allocate_encode( opj_tcd_t *p_tcd, - OPJ_BYTE * p_dest_data, - OPJ_UINT32 p_max_dest_size, - opj_codestream_info_t *p_cstr_info ) -{ - opj_cp_t * l_cp = p_tcd->cp; - OPJ_UINT32 l_nb_written = 0; - - if (p_cstr_info) { - p_cstr_info->index_write = 0; - } - - if (l_cp->m_specific_param.m_enc.m_disto_alloc|| l_cp->m_specific_param.m_enc.m_fixed_quality) { - /* fixed_quality */ - /* Normal Rate/distortion allocation */ - if (! opj_tcd_rateallocate(p_tcd, p_dest_data,&l_nb_written, p_max_dest_size, p_cstr_info)) { - return OPJ_FALSE; - } - } - else { - /* Fixed layer allocation */ - opj_tcd_rateallocate_fixed(p_tcd); - } - - return OPJ_TRUE; -} - - -OPJ_BOOL opj_tcd_copy_tile_data ( opj_tcd_t *p_tcd, - OPJ_BYTE * p_src, - OPJ_UINT32 p_src_length ) -{ - OPJ_UINT32 i,j,l_data_size = 0; - opj_image_comp_t * l_img_comp = 00; - opj_tcd_tilecomp_t * l_tilec = 00; - OPJ_UINT32 l_size_comp, l_remaining; - OPJ_UINT32 l_nb_elem; - - l_data_size = opj_tcd_get_encoded_tile_size(p_tcd); - if (l_data_size != p_src_length) { - return OPJ_FALSE; - } - - l_tilec = p_tcd->tcd_image->tiles->comps; - l_img_comp = p_tcd->image->comps; - for (i=0;iimage->numcomps;++i) { - l_size_comp = l_img_comp->prec >> 3; /*(/ 8)*/ - l_remaining = l_img_comp->prec & 7; /* (%8) */ - l_nb_elem = (OPJ_UINT32)((l_tilec->x1 - l_tilec->x0) * (l_tilec->y1 - l_tilec->y0)); - - if (l_remaining) { - ++l_size_comp; - } - - if (l_size_comp == 3) { - l_size_comp = 4; - } - - switch (l_size_comp) { - case 1: - { - OPJ_CHAR * l_src_ptr = (OPJ_CHAR *) p_src; - OPJ_INT32 * l_dest_ptr = l_tilec->data; - - if (l_img_comp->sgnd) { - for (j=0;jdata; - OPJ_INT16 * l_src_ptr = (OPJ_INT16 *) p_src; - - if (l_img_comp->sgnd) { - for (j=0;jdata; - - for (j=0;jnumleafsh = numleafsh; - tree->numleafsv = numleafsv; - - numlvls = 0; - nplh[0] = (OPJ_INT32)numleafsh; - nplv[0] = (OPJ_INT32)numleafsv; - tree->numnodes = 0; - do { - n = (OPJ_UINT32)(nplh[numlvls] * nplv[numlvls]); - nplh[numlvls + 1] = (nplh[numlvls] + 1) / 2; - nplv[numlvls + 1] = (nplv[numlvls] + 1) / 2; - tree->numnodes += n; - ++numlvls; - } while (n > 1); - - /* ADD */ - if (tree->numnodes == 0) { - opj_free(tree); - fprintf(stderr, "WARNING in tgt_create tree->numnodes == 0, no tree created.\n"); - return 00; - } - - tree->nodes = (opj_tgt_node_t*) opj_calloc(tree->numnodes, sizeof(opj_tgt_node_t)); - if(!tree->nodes) { - fprintf(stderr, "ERROR in tgt_create while allocating node of the tree\n"); - opj_free(tree); - return 00; - } - memset(tree->nodes,0,tree->numnodes * sizeof(opj_tgt_node_t)); - tree->nodes_size = tree->numnodes * (OPJ_UINT32)sizeof(opj_tgt_node_t); - - node = tree->nodes; - l_parent_node = &tree->nodes[tree->numleafsh * tree->numleafsv]; - l_parent_node0 = l_parent_node; - - for (i = 0; i < numlvls - 1; ++i) { - for (j = 0; j < nplv[i]; ++j) { - k = nplh[i]; - while (--k >= 0) { - node->parent = l_parent_node; - ++node; - if (--k >= 0) { - node->parent = l_parent_node; - ++node; - } - ++l_parent_node; - } - if ((j & 1) || j == nplv[i] - 1) { - l_parent_node0 = l_parent_node; - } else { - l_parent_node = l_parent_node0; - l_parent_node0 += nplh[i]; - } - } - } - node->parent = 0; - opj_tgt_reset(tree); - return tree; -} - -/** - * Reinitialises a tag-tree from an existing one. - * - * @param p_tree the tree to reinitialize. - * @param p_num_leafs_h the width of the array of leafs of the tree - * @param p_num_leafs_v the height of the array of leafs of the tree - * @return a new tag-tree if successful, NULL otherwise -*/ -opj_tgt_tree_t *opj_tgt_init(opj_tgt_tree_t * p_tree,OPJ_UINT32 p_num_leafs_h, OPJ_UINT32 p_num_leafs_v) -{ - OPJ_INT32 l_nplh[32]; - OPJ_INT32 l_nplv[32]; - opj_tgt_node_t *l_node = 00; - opj_tgt_node_t *l_parent_node = 00; - opj_tgt_node_t *l_parent_node0 = 00; - OPJ_UINT32 i; - OPJ_INT32 j,k; - OPJ_UINT32 l_num_levels; - OPJ_UINT32 n; - OPJ_UINT32 l_node_size; - - if (! p_tree){ - return 00; - } - - if ((p_tree->numleafsh != p_num_leafs_h) || (p_tree->numleafsv != p_num_leafs_v)) { - p_tree->numleafsh = p_num_leafs_h; - p_tree->numleafsv = p_num_leafs_v; - - l_num_levels = 0; - l_nplh[0] = (OPJ_INT32)p_num_leafs_h; - l_nplv[0] = (OPJ_INT32)p_num_leafs_v; - p_tree->numnodes = 0; - do - { - n = (OPJ_UINT32)(l_nplh[l_num_levels] * l_nplv[l_num_levels]); - l_nplh[l_num_levels + 1] = (l_nplh[l_num_levels] + 1) / 2; - l_nplv[l_num_levels + 1] = (l_nplv[l_num_levels] + 1) / 2; - p_tree->numnodes += n; - ++l_num_levels; - } - while (n > 1); - - /* ADD */ - if (p_tree->numnodes == 0) { - opj_tgt_destroy(p_tree); - return 00; - } - l_node_size = p_tree->numnodes * (OPJ_UINT32)sizeof(opj_tgt_node_t); - - if (l_node_size > p_tree->nodes_size) { - opj_tgt_node_t* new_nodes = (opj_tgt_node_t*) opj_realloc(p_tree->nodes, l_node_size); - if (! new_nodes) { - fprintf(stderr, "ERROR Not enough memory to reinitialize the tag tree\n"); - opj_tgt_destroy(p_tree); - return 00; - } - p_tree->nodes = new_nodes; - memset(((char *) p_tree->nodes) + p_tree->nodes_size, 0 , l_node_size - p_tree->nodes_size); - p_tree->nodes_size = l_node_size; - } - l_node = p_tree->nodes; - l_parent_node = &p_tree->nodes[p_tree->numleafsh * p_tree->numleafsv]; - l_parent_node0 = l_parent_node; - - for (i = 0; i < l_num_levels - 1; ++i) { - for (j = 0; j < l_nplv[i]; ++j) { - k = l_nplh[i]; - while (--k >= 0) { - l_node->parent = l_parent_node; - ++l_node; - if (--k >= 0) { - l_node->parent = l_parent_node; - ++l_node; - } - ++l_parent_node; - } - if ((j & 1) || j == l_nplv[i] - 1) - { - l_parent_node0 = l_parent_node; - } - else - { - l_parent_node = l_parent_node0; - l_parent_node0 += l_nplh[i]; - } - } - } - l_node->parent = 0; - } - opj_tgt_reset(p_tree); - - return p_tree; -} - -void opj_tgt_destroy(opj_tgt_tree_t *p_tree) -{ - if (! p_tree) { - return; - } - - if (p_tree->nodes) { - opj_free(p_tree->nodes); - p_tree->nodes = 00; - } - opj_free(p_tree); -} - -void opj_tgt_reset(opj_tgt_tree_t *p_tree) { - OPJ_UINT32 i; - opj_tgt_node_t * l_current_node = 00;; - - if (! p_tree) { - return; - } - - l_current_node = p_tree->nodes; - for (i = 0; i < p_tree->numnodes; ++i) - { - l_current_node->value = 999; - l_current_node->low = 0; - l_current_node->known = 0; - ++l_current_node; - } -} - -void opj_tgt_setvalue(opj_tgt_tree_t *tree, OPJ_UINT32 leafno, OPJ_INT32 value) { - opj_tgt_node_t *node; - node = &tree->nodes[leafno]; - while (node && node->value > value) { - node->value = value; - node = node->parent; - } -} - -void opj_tgt_encode(opj_bio_t *bio, opj_tgt_tree_t *tree, OPJ_UINT32 leafno, OPJ_INT32 threshold) { - opj_tgt_node_t *stk[31]; - opj_tgt_node_t **stkptr; - opj_tgt_node_t *node; - OPJ_INT32 low; - - stkptr = stk; - node = &tree->nodes[leafno]; - while (node->parent) { - *stkptr++ = node; - node = node->parent; - } - - low = 0; - for (;;) { - if (low > node->low) { - node->low = low; - } else { - low = node->low; - } - - while (low < threshold) { - if (low >= node->value) { - if (!node->known) { - opj_bio_write(bio, 1, 1); - node->known = 1; - } - break; - } - opj_bio_write(bio, 0, 1); - ++low; - } - - node->low = low; - if (stkptr == stk) - break; - node = *--stkptr; - } -} - -OPJ_UINT32 opj_tgt_decode(opj_bio_t *bio, opj_tgt_tree_t *tree, OPJ_UINT32 leafno, OPJ_INT32 threshold) { - opj_tgt_node_t *stk[31]; - opj_tgt_node_t **stkptr; - opj_tgt_node_t *node; - OPJ_INT32 low; - - stkptr = stk; - node = &tree->nodes[leafno]; - while (node->parent) { - *stkptr++ = node; - node = node->parent; - } - - low = 0; - for (;;) { - if (low > node->low) { - node->low = low; - } else { - low = node->low; - } - while (low < threshold && low < node->value) { - if (opj_bio_read(bio, 1)) { - node->value = low; - } else { - ++low; - } - } - node->low = low; - if (stkptr == stk) { - break; - } - node = *--stkptr; - } - - return (node->value < threshold) ? 1 : 0; -} diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/tgt.h b/Dependencies/FreeImage/Source/LibOpenJPEG/tgt.h deleted file mode 100644 index 0eeb304..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/tgt.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2008, Jerome Fimes, Communications & Systemes - * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __TGT_H -#define __TGT_H -/** -@file tgt.h -@brief Implementation of a tag-tree coder (TGT) - -The functions in TGT.C have for goal to realize a tag-tree coder. The functions in TGT.C -are used by some function in T2.C. -*/ - -/** @defgroup TGT TGT - Implementation of a tag-tree coder */ -/*@{*/ - -/** -Tag node -*/ -typedef struct opj_tgt_node { - struct opj_tgt_node *parent; - OPJ_INT32 value; - OPJ_INT32 low; - OPJ_UINT32 known; -} opj_tgt_node_t; - -/** -Tag tree -*/ -typedef struct opj_tgt_tree -{ - OPJ_UINT32 numleafsh; - OPJ_UINT32 numleafsv; - OPJ_UINT32 numnodes; - opj_tgt_node_t *nodes; - OPJ_UINT32 nodes_size; /* maximum size taken by nodes */ -} opj_tgt_tree_t; - - -/** @name Exported functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Create a tag-tree -@param numleafsh Width of the array of leafs of the tree -@param numleafsv Height of the array of leafs of the tree -@return Returns a new tag-tree if successful, returns NULL otherwise -*/ -opj_tgt_tree_t *opj_tgt_create(OPJ_UINT32 numleafsh, OPJ_UINT32 numleafsv); - -/** - * Reinitialises a tag-tree from an exixting one. - * - * @param p_tree the tree to reinitialize. - * @param p_num_leafs_h the width of the array of leafs of the tree - * @param p_num_leafs_v the height of the array of leafs of the tree - * @return a new tag-tree if successful, NULL otherwise -*/ -opj_tgt_tree_t *opj_tgt_init(opj_tgt_tree_t * p_tree, - OPJ_UINT32 p_num_leafs_h, - OPJ_UINT32 p_num_leafs_v); -/** -Destroy a tag-tree, liberating memory -@param tree Tag-tree to destroy -*/ -void opj_tgt_destroy(opj_tgt_tree_t *tree); -/** -Reset a tag-tree (set all leaves to 0) -@param tree Tag-tree to reset -*/ -void opj_tgt_reset(opj_tgt_tree_t *tree); -/** -Set the value of a leaf of a tag-tree -@param tree Tag-tree to modify -@param leafno Number that identifies the leaf to modify -@param value New value of the leaf -*/ -void opj_tgt_setvalue(opj_tgt_tree_t *tree, - OPJ_UINT32 leafno, - OPJ_INT32 value); -/** -Encode the value of a leaf of the tag-tree up to a given threshold -@param bio Pointer to a BIO handle -@param tree Tag-tree to modify -@param leafno Number that identifies the leaf to encode -@param threshold Threshold to use when encoding value of the leaf -*/ -void opj_tgt_encode(opj_bio_t *bio, - opj_tgt_tree_t *tree, - OPJ_UINT32 leafno, - OPJ_INT32 threshold); -/** -Decode the value of a leaf of the tag-tree up to a given threshold -@param bio Pointer to a BIO handle -@param tree Tag-tree to decode -@param leafno Number that identifies the leaf to decode -@param threshold Threshold to use when decoding value of the leaf -@return Returns 1 if the node's value < threshold, returns 0 otherwise -*/ -OPJ_UINT32 opj_tgt_decode(opj_bio_t *bio, - opj_tgt_tree_t *tree, - OPJ_UINT32 leafno, - OPJ_INT32 threshold); -/* ----------------------------------------------------------------------- */ -/*@}*/ - -/*@}*/ - -#endif /* __TGT_H */ diff --git a/Dependencies/FreeImage/Source/LibOpenJPEG/thix_manager.c b/Dependencies/FreeImage/Source/LibOpenJPEG/thix_manager.c deleted file mode 100644 index 47c79d6..0000000 --- a/Dependencies/FreeImage/Source/LibOpenJPEG/thix_manager.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * $Id: thix_manager.c,v 1.4 2014/03/16 12:29:52 drolon Exp $ - * - * Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2011, Professor Benoit Macq - * Copyright (c) 2003-2004, Yannick Verschueren - * Copyright (c) 2010-2011, Kaori Hagihara - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/*! \file - * \brief Modification of jpip.c from 2KAN indexer - */ - -#include "opj_includes.h" - - - -int opj_write_thix( int coff, opj_codestream_info_t cstr_info, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_BYTE l_data_header [4]; - int i; - int tileno; - opj_jp2_box_t *box; - OPJ_UINT32 len; - OPJ_OFF_T lenp; - - lenp = 0; - box = (opj_jp2_box_t *)opj_calloc( (size_t)(cstr_info.tw*cstr_info.th), sizeof(opj_jp2_box_t)); - - for ( i = 0; i < 2 ; i++ ){ - if (i) - opj_stream_seek( cio, lenp, p_manager); - - lenp = opj_stream_tell(cio); - opj_stream_skip(cio, 4, p_manager); /* L [at the end] */ - opj_write_bytes(l_data_header,JPIP_THIX,4); /* THIX */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - - opj_write_manf( i, cstr_info.tw*cstr_info.th, box, cio, p_manager); - - for (tileno = 0; tileno < cstr_info.tw*cstr_info.th; tileno++){ - box[tileno].length = (OPJ_UINT32)opj_write_tilemhix( coff, cstr_info, tileno, cio,p_manager); - box[tileno].type = JPIP_MHIX; - } - - len = (OPJ_UINT32)(opj_stream_tell(cio)-lenp); - opj_stream_seek(cio, lenp, p_manager); - opj_write_bytes(l_data_header,len,4); /* L */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_stream_seek( cio, lenp+len,p_manager); - - } - - opj_free(box); - - return (int)len; -} - -/* - * Write tile-part headers mhix box - * - * @param[in] coff offset of j2k codestream - * @param[in] cstr_info codestream information - * @param[in] tileno tile number - * @param[in] cio file output handle - * @return length of mhix box - */ -int opj_write_tilemhix( int coff, opj_codestream_info_t cstr_info, int tileno, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_BYTE l_data_header [8]; - int i; - opj_tile_info_t tile; - opj_tp_info_t tp; - opj_marker_info_t *marker; - OPJ_UINT32 len; - OPJ_OFF_T lenp; - - lenp = opj_stream_tell (cio); - opj_stream_skip(cio, 4, p_manager); /* L [at the end] */ - opj_write_bytes(l_data_header,JPIP_MHIX,4); /* MHIX */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - - tile = cstr_info.tile[tileno]; - tp = tile.tp[0]; - - opj_write_bytes(l_data_header,(OPJ_UINT32)(tp.tp_end_header-tp.tp_start_pos+1), 8); /* TLEN */ - opj_stream_write_data(cio,l_data_header,8,p_manager); - - marker = cstr_info.tile[tileno].marker; - - for( i=0; i(b)?(a):(b)) - -/* - * Get number of maximum tile parts per tile - * - * @param[in] cstr_info codestream information - * @return number of maximum tile parts per tile - */ -int get_num_max_tile_parts( opj_codestream_info_t cstr_info); - - -/* - * Write faix box of tpix - * - * @param[in] coff offset of j2k codestream - * @param[in] compno component number - * @param[in] cstr_info codestream information - * @param[in] j2klen length of j2k codestream - * @param[in] cio file output handle - * @return length of faix box - */ - -int opj_write_tpix( int coff, - opj_codestream_info_t cstr_info, - int j2klen, opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_BYTE l_data_header [4]; - OPJ_UINT32 len; - OPJ_OFF_T lenp; - - lenp = opj_stream_tell(cio); - opj_stream_skip(cio, 4, p_manager); - opj_write_bytes(l_data_header,JPIP_TPIX,4); /* TPIX */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - - opj_write_tpixfaix( coff, 0, cstr_info, j2klen, cio,p_manager); - - len = (OPJ_UINT32)(opj_stream_tell(cio)-lenp); - - opj_stream_skip(cio, lenp, p_manager); - opj_write_bytes(l_data_header,len,4);/* L */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_stream_seek(cio, lenp+len,p_manager); - - return (int)len; -} - -int opj_write_tpixfaix( int coff, - int compno, - opj_codestream_info_t cstr_info, - int j2klen, - opj_stream_private_t *cio, - opj_event_mgr_t * p_manager ) -{ - OPJ_UINT32 len; - OPJ_OFF_T lenp; - OPJ_UINT32 i, j; - OPJ_UINT32 Aux; - OPJ_UINT32 num_max_tile_parts; - OPJ_UINT32 size_of_coding; /* 4 or 8 */ - opj_tp_info_t tp; - OPJ_BYTE l_data_header [8]; - OPJ_UINT32 version; - - num_max_tile_parts = (OPJ_UINT32)get_num_max_tile_parts( cstr_info); - - if( j2klen > pow( 2, 32)){ - size_of_coding = 8; - version = num_max_tile_parts == 1 ? 1:3; - } - else{ - size_of_coding = 4; - version = num_max_tile_parts == 1 ? 0:2; - } - - lenp = opj_stream_tell(cio); - opj_stream_skip(cio, 4, p_manager); /* L [at the end] */ - opj_write_bytes(l_data_header,JPIP_FAIX,4); /* FAIX */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_write_bytes(l_data_header,version,1); /* Version 0 = 4 bytes */ - opj_stream_write_data(cio,l_data_header,1,p_manager); - - opj_write_bytes(l_data_header,num_max_tile_parts,size_of_coding); /* NMAX */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - opj_write_bytes(l_data_header,(OPJ_UINT32)(cstr_info.tw*cstr_info.th),size_of_coding); /* M */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - - for (i = 0; i < (OPJ_UINT32)(cstr_info.tw*cstr_info.th); i++) - { - for (j = 0; j < (OPJ_UINT32)cstr_info.tile[i].num_tps; j++) - { - tp = cstr_info.tile[i].tp[j]; - - opj_write_bytes(l_data_header,(OPJ_UINT32)(tp.tp_start_pos-coff),size_of_coding); /* start position */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - opj_write_bytes(l_data_header,(OPJ_UINT32)(tp.tp_end_pos-tp.tp_start_pos+1),size_of_coding); /* length */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - - if (version & 0x02) - { - if( cstr_info.tile[i].num_tps == 1 && cstr_info.numdecompos[compno] > 1) - Aux = (OPJ_UINT32)(cstr_info.numdecompos[compno] + 1); - else - Aux = j + 1; - - opj_write_bytes(l_data_header,Aux,4); - opj_stream_write_data(cio,l_data_header,4,p_manager); - - /*cio_write(img.tile[i].tile_parts[j].num_reso_AUX,4);*/ /* Aux_i,j : Auxiliary value */ - /* fprintf(stderr,"AUX value %d\n",Aux);*/ - } - /*cio_write(0,4);*/ - } - /* PADDING */ - while (j < num_max_tile_parts) - { - - opj_write_bytes(l_data_header,0,size_of_coding);/* start position */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - opj_write_bytes(l_data_header,0,size_of_coding);/* length */ - opj_stream_write_data(cio,l_data_header,size_of_coding,p_manager); - - if (version & 0x02) - opj_write_bytes(l_data_header,0,4); /* Aux_i,j : Auxiliary value */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - j++; - } - } - - len = (OPJ_UINT32)(opj_stream_tell(cio)-lenp); - opj_stream_seek(cio, lenp,p_manager); - opj_write_bytes(l_data_header,len,4);/* L */ - opj_stream_write_data(cio,l_data_header,4,p_manager); - opj_stream_seek(cio, lenp+len,p_manager); - - return (int)len; -} - -int get_num_max_tile_parts( opj_codestream_info_t cstr_info) -{ - int num_max_tp = 0, i; - - for( i=0; i functions to be - png_set_. We now have corresponding png_get_ - functions in pngget.c to get information in info_ptr. This isolates - the application from the internal organization of png_info_struct - (good for shared library implementations). - -Version 0.96 [May, 1997] - Fixed serious bug with < 8bpp images introduced in 0.95 - Fixed 256-color transparency bug (Greg Roelofs) - Fixed up documentation (Greg Roelofs, Laszlo Nyul) - Fixed "error" in pngconf.h for Linux setjmp() behavior - Fixed DOS medium model support (Tim Wegner) - Fixed png_check_keyword() for case with error in static string text - Added read of CRC after IEND chunk for embedded PNGs (Laszlo Nyul) - Added typecasts to quiet compiler errors - Added more debugging info - -Version 0.97 [January, 1998] - Removed PNG_USE_OWN_CRC capability - Relocated png_set_crc_action from pngrutil.c to pngrtran.c - Fixed typecasts of "new_key", etc. (Andreas Dilger) - Added RFC 1152 [sic] date support - Fixed bug in gamma handling of 4-bit grayscale - Added 2-bit grayscale gamma handling (Glenn R-P) - Added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P) - Minor corrections in libpng.txt - Added simple sRGB support (Glenn R-P) - Easier conditional compiling, e.g., - define PNG_READ/WRITE_NOT_FULLY_SUPPORTED; - all configurable options can be selected from command-line instead - of having to edit pngconf.h (Glenn R-P) - Fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P) - Added more conditions for png_do_background, to avoid changing - black pixels to background when a background is supplied and - no pixels are transparent - Repaired PNG_NO_STDIO behavior - Tested NODIV support and made it default behavior (Greg Roelofs) - Added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler) - Regularized version numbering scheme and bumped shared-library major - version number to 2 to avoid problems with libpng 0.89 apps - (Greg Roelofs) - -Version 0.98 [January, 1998] - Cleaned up some typos in libpng.txt and in code documentation - Fixed memory leaks in pCAL chunk processing (Glenn R-P and John Bowler) - Cosmetic change "display_gamma" to "screen_gamma" in pngrtran.c - Changed recommendation about file_gamma for PC images to .51 from .45, - in example.c and libpng.txt, added comments to distinguish between - screen_gamma, viewing_gamma, and display_gamma. - Changed all references to RFC1152 to read RFC1123 and changed the - PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED - Added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent) - Changed srgb_intent from png_byte to int to avoid compiler bugs - -Version 0.99 [January 30, 1998] - Free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler) - Fixed a longstanding "packswap" bug in pngtrans.c - Fixed some inconsistencies in pngconf.h that prevented compiling with - PNG_READ_GAMMA_SUPPORTED and PNG_READ_hIST_SUPPORTED undefined - Fixed some typos and made other minor rearrangement of libpng.txt (Andreas) - Changed recommendation about file_gamma for PC images to .50 from .51 in - example.c and libpng.txt, and changed file_gamma for sRGB images to .45 - Added a number of functions to access information from the png structure - png_get_image_height(), etc. (Glenn R-P, suggestion by Brad Pettit) - Added TARGET_MACOS similar to zlib-1.0.8 - Define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined - Added type casting to all png_malloc() function calls - -Version 0.99a [January 31, 1998] - Added type casts and parentheses to all returns that return a value.(Tim W.) - -Version 0.99b [February 4, 1998] - Added type cast png_uint_32 on malloc function calls where needed. - Changed type of num_hist from png_uint_32 to int (same as num_palette). - Added checks for rowbytes overflow, in case png_size_t is less than 32 bits. - Renamed makefile.elf to makefile.lnx. - -Version 0.99c [February 7, 1998] - More type casting. Removed erroneous overflow test in pngmem.c. - Added png_buffered_memcpy() and png_buffered_memset(), apply them to rowbytes. - Added UNIX manual pages libpng.3 (incorporating libpng.txt) and png.5. - -Version 0.99d [February 11, 1998] - Renamed "far_to_near()" "png_far_to_near()" - Revised libpng.3 - Version 99c "buffered" operations didn't work as intended. Replaced them - with png_memcpy_check() and png_memset_check(). - Added many "if (png_ptr == NULL) return" to quell compiler warnings about - unused png_ptr, mostly in pngget.c and pngset.c. - Check for overlength tRNS chunk present when indexed-color PLTE is read. - Cleaned up spelling errors in libpng.3/libpng.txt - Corrected a problem with png_get_tRNS() which returned undefined trans array - -Version 0.99e [February 28, 1998] - Corrected png_get_tRNS() again. - Add parentheses for easier reading of pngget.c, fixed "||" should be "&&". - Touched up example.c to make more of it compileable, although the entire - file still can't be compiled (Willem van Schaik) - Fixed a bug in png_do_shift() (Bryan Tsai) - Added a space in png.h prototype for png_write_chunk_start() - Replaced pngtest.png with one created with zlib 1.1.1 - Changed pngtest to report PASS even when file size is different (Jean-loup G.) - Corrected some logic errors in png_do_invert_alpha() (Chris Patterson) - -Version 0.99f [March 5, 1998] - Corrected a bug in pngpread() introduced in version 99c (Kevin Bracey) - Moved makefiles into a "scripts" directory, and added INSTALL instruction file - Added makefile.os2 and pngos2.def (A. Zabolotny) and makefile.s2x (W. Sebok) - Added pointers to "note on libpng versions" in makefile.lnx and README - Added row callback feature when reading and writing nonprogressive rows - and added a test of this feature in pngtest.c - Added user transform callbacks, with test of the feature in pngtest.c - -Version 0.99g [March 6, 1998, morning] - Minor changes to pngtest.c to suppress compiler warnings. - Removed "beta" language from documentation. - -Version 0.99h [March 6, 1998, evening] - Minor changes to previous minor changes to pngtest.c - Changed PNG_READ_NOT_FULLY_SUPPORTED to PNG_READ_TRANSFORMS_NOT_SUPPORTED - and added PNG_PROGRESSIVE_READ_NOT_SUPPORTED macro - Added user transform capability - -Version 1.00 [March 7, 1998] - Changed several typedefs in pngrutil.c - Added makefile.wat (Pawel Mrochen), updated makefile.tc3 (Willem van Schaik) - Replaced "while(1)" with "for(;;)" - Added PNGARG() to prototypes in pngtest.c and removed some prototypes - Updated some of the makefiles (Tom Lane) - Changed some typedefs (s_start, etc.) in pngrutil.c - Fixed dimensions of "short_months" array in pngwrite.c - Replaced ansi2knr.c with the one from jpeg-v6 - -Version 1.0.0 [March 8, 1998] - Changed name from 1.00 to 1.0.0 (Adam Costello) - Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert) - -Version 1.0.0a [March 9, 1998] - Fixed three bugs in pngrtran.c to make gamma+background handling consistent - (Greg Roelofs) - Changed format of the PNG_LIBPNG_VER integer to xyyzz instead of xyz - for major, minor, and bugfix releases. This is 10001. (Adam Costello, - Tom Lane) - Make months range from 1-12 in png_convert_to_rfc1123 - -Version 1.0.0b [March 13, 1998] - Quieted compiler complaints about two empty "for" loops in pngrutil.c - Minor changes to makefile.s2x - Removed #ifdef/#endif around a png_free() in pngread.c - -Version 1.0.1 [March 14, 1998] - Changed makefile.s2x to reduce security risk of using a relative pathname - Fixed some typos in the documentation (Greg). - Fixed a problem with value of "channels" returned by png_read_update_info() - -Version 1.0.1a [April 21, 1998] - Optimized Paeth calculations by replacing abs() function calls with intrinsics - plus other loop optimizations. Improves avg decoding speed by about 20%. - Commented out i386istic "align" compiler flags in makefile.lnx. - Reduced the default warning level in some makefiles, to make them consistent. - Removed references to IJG and JPEG in the ansi2knr.c copyright statement. - Fixed a bug in png_do_strip_filler with XXRRGGBB => RRGGBB transformation. - Added grayscale and 16-bit capability to png_do_read_filler(). - Fixed a bug in pngset.c, introduced in version 0.99c, that sets rowbytes - too large when writing an image with bit_depth < 8 (Bob Dellaca). - Corrected some bugs in the experimental weighted filtering heuristics. - Moved a misplaced pngrutil code block that truncates tRNS if it has more - than num_palette entries -- test was done before num_palette was defined. - Fixed a png_convert_to_rfc1123() bug that converts day 31 to 0 (Steve Eddins). - Changed compiler flags in makefile.wat for better optimization - (Pawel Mrochen). - -Version 1.0.1b [May 2, 1998] - Relocated png_do_gray_to_rgb() within png_do_read_transformations() (Greg). - Relocated the png_composite macros from pngrtran.c to png.h (Greg). - Added makefile.sco (contributed by Mike Hopkirk). - Fixed two bugs (missing definitions of "istop") introduced in libpng-1.0.1a. - Fixed a bug in pngrtran.c that would set channels=5 under some circumstances. - More work on the Paeth-filtering, achieving imperceptible speedup - (A Kleinert). - More work on loop optimization which may help when compiled with C++ - compilers. - Added warnings when people try to use transforms they've defined out. - Collapsed 4 "i" and "c" loops into single "i" loops in pngrtran and pngwtran. - Revised paragraph about png_set_expand() in libpng.txt and libpng.3 (Greg) - -Version 1.0.1c [May 11, 1998] - Fixed a bug in pngrtran.c (introduced in libpng-1.0.1a) where the masks for - filler bytes should have been 0xff instead of 0xf. - Added max_pixel_depth=32 in pngrutil.c when using FILLER with palette images. - Moved PNG_WRITE_WEIGHTED_FILTER_SUPPORTED and PNG_WRITE_FLUSH_SUPPORTED - out of the PNG_WRITE_TRANSFORMS_NOT_SUPPORTED block of pngconf.h - Added "PNG_NO_WRITE_TRANSFORMS" etc., as alternatives for *_NOT_SUPPORTED, - for consistency, in pngconf.h - Added individual "ifndef PNG_NO_[CAPABILITY]" in pngconf.h to make it easier - to remove unwanted capabilities via the compile line - Made some corrections to grammar (which, it's) in documentation (Greg). - Corrected example.c, use of row_pointers in png_write_image(). - -Version 1.0.1d [May 24, 1998] - Corrected several statements that used side effects illegally in pngrutil.c - and pngtrans.c, that were introduced in version 1.0.1b - Revised png_read_rows() to avoid repeated if-testing for NULL (A Kleinert) - More corrections to example.c, use of row_pointers in png_write_image() - and png_read_rows(). - Added pngdll.mak and pngdef.pas to scripts directory, contributed by - Bob Dellaca, to make a png32bd.dll with Borland C++ 4.5 - Fixed error in example.c with png_set_text: num_text is 3, not 2 (Guido V.) - Changed several loops from count-down to count-up, for consistency. - -Version 1.0.1e [June 6, 1998] - Revised libpng.txt and libpng.3 description of png_set_read|write_fn(), and - added warnings when people try to set png_read_fn and png_write_fn in - the same structure. - Added a test such that png_do_gamma will be done when num_trans==0 - for truecolor images that have defined a background. This corrects an - error that was introduced in libpng-0.90 that can cause gamma processing - to be skipped. - Added tests in png.h to include "trans" and "trans_values" in structures - when PNG_READ_BACKGROUND_SUPPORTED or PNG_READ_EXPAND_SUPPORTED is defined. - Add png_free(png_ptr->time_buffer) in png_destroy_read_struct() - Moved png_convert_to_rfc_1123() from pngwrite.c to png.c - Added capability for user-provided malloc_fn() and free_fn() functions, - and revised pngtest.c to demonstrate their use, replacing the - PNGTEST_DEBUG_MEM feature. - Added makefile.w32, for Microsoft C++ 4.0 and later (Tim Wegner). - -Version 1.0.2 [June 14, 1998] - Fixed two bugs in makefile.bor . - -Version 1.0.2a [December 30, 1998] - Replaced and extended code that was removed from png_set_filler() in 1.0.1a. - Fixed a bug in png_do_filler() that made it fail to write filler bytes in - the left-most pixel of each row (Kevin Bracey). - Changed "static pngcharp tIME_string" to "static char tIME_string[30]" - in pngtest.c (Duncan Simpson). - Fixed a bug in pngtest.c that caused pngtest to try to write a tIME chunk - even when no tIME chunk was present in the source file. - Fixed a problem in pngrutil.c: gray_to_rgb didn't always work with 16-bit. - Fixed a problem in png_read_push_finish_row(), which would not skip some - passes that it should skip, for images that are less than 3 pixels high. - Interchanged the order of calls to png_do_swap() and png_do_shift() - in pngwtran.c (John Cromer). - Added #ifdef PNG_DEBUG/#endif surrounding use of PNG_DEBUG in png.h . - Changed "bad adaptive filter type" from error to warning in pngrutil.c . - Fixed a documentation error about default filtering with 8-bit indexed-color. - Separated the PNG_NO_STDIO macro into PNG_NO_STDIO and PNG_NO_CONSOLE_IO - (L. Peter Deutsch). - Added png_set_rgb_to_gray() and png_get_rgb_to_gray_status() functions. - Added png_get_copyright() and png_get_header_version() functions. - Revised comments on png_set_progressive_read_fn() in libpng.txt and example.c - Added information about debugging in libpng.txt and libpng.3 . - Changed "ln -sf" to "ln -s -f" in makefile.s2x, makefile.lnx, and - makefile.sco. - Removed lines after Dynamic Dependencies" in makefile.aco . - Revised makefile.dec to make a shared library (Jeremie Petit). - Removed trailing blanks from all files. - -Version 1.0.2a [January 6, 1999] - Removed misplaced #endif and #ifdef PNG_NO_EXTERN near the end of png.h - Added "if" tests to silence complaints about unused png_ptr in png.h and png.c - Changed "check_if_png" function in example.c to return true (nonzero) if PNG. - Changed libpng.txt to demonstrate png_sig_cmp() instead of png_check_sig() - which is obsolete. - -Version 1.0.3 [January 14, 1999] - Added makefile.hux, for Hewlett Packard HPUX 10.20 and 11.00 (Jim Rice) - Added a statement of Y2K compliance in png.h, libpng.3, and Y2KINFO. - -Version 1.0.3a [August 12, 1999] - Added check for PNG_READ_INTERLACE_SUPPORTED in pngread.c; issue a warning - if an attempt is made to read an interlaced image when it's not supported. - Added check if png_ptr->trans is defined before freeing it in pngread.c - Modified the Y2K statement to include versions back to version 0.71 - Fixed a bug in the check for valid IHDR bit_depth/color_types in pngrutil.c - Modified makefile.wat (added -zp8 flag, ".symbolic", changed some comments) - Replaced leading blanks with tab characters in makefile.hux - Changed "dworkin.wustl.edu" to "ccrc.wustl.edu" in various documents. - Changed (float)red and (float)green to (double)red, (double)green - in png_set_rgb_to_gray() to avoid "promotion" problems in AIX. - Fixed a bug in pngconf.h that omitted when PNG_DEBUG==0 (K Bracey). - Reformatted libpng.3 and libpngpf.3 with proper fonts (script by J. vanZandt). - Updated documentation to refer to the PNG-1.2 specification. - Removed ansi2knr.c and left pointers to the latest source for ansi2knr.c - in makefile.knr, INSTALL, and README (L. Peter Deutsch) - Fixed bugs in calculation of the length of rowbytes when adding alpha - channels to 16-bit images, in pngrtran.c (Chris Nokleberg) - Added function png_set_user_transform_info() to store user_transform_ptr, - user_depth, and user_channels into the png_struct, and a function - png_get_user_transform_ptr() to retrieve the pointer (Chris Nokleberg) - Added function png_set_empty_plte_permitted() to make libpng useable - in MNG applications. - Corrected the typedef for png_free_ptr in png.h (Jesse Jones). - Correct gamma with srgb is 45455 instead of 45000 in pngrutil.c, to be - consistent with PNG-1.2, and allow variance of 500 before complaining. - Added assembler code contributed by Intel in file pngvcrd.c and modified - makefile.w32 to use it (Nirav Chhatrapati, INTEL Corporation, - Gilles Vollant) - Changed "ln -s -f" to "ln -f -s" in the makefiles to make Solaris happy. - Added some aliases for png_set_expand() in pngrtran.c, namely - png_set_expand_PLTE(), png_set_expand_depth(), and png_set_expand_tRNS() - (Greg Roelofs, in "PNG: The Definitive Guide"). - Added makefile.beo for BEOS on X86, contributed by Sander Stok. - -Version 1.0.3b [August 26, 1999] - Replaced 2147483647L several places with PNG_MAX_UINT macro, defined in png.h - Changed leading blanks to tabs in all makefiles. - Define PNG_USE_PNGVCRD in makefile.w32, to get MMX assembler code. - Made alternate versions of png_set_expand() in pngrtran.c, namely - png_set_gray_1_2_4_to_8, png_set_palette_to_rgb, and png_set_tRNS_to_alpha - (Greg Roelofs, in "PNG: The Definitive Guide"). Deleted the 1.0.3a aliases. - Relocated start of 'extern "C"' block in png.h so it doesn't include pngconf.h - Revised calculation of num_blocks in pngmem.c to avoid a potentially - negative shift distance, whose results are undefined in the C language. - Added a check in pngset.c to prevent writing multiple tIME chunks. - Added a check in pngwrite.c to detect invalid small window_bits sizes. - -Version 1.0.3d [September 4, 1999] - Fixed type casting of igamma in pngrutil.c - Added new png_expand functions to scripts/pngdef.pas and pngos2.def - Added a demo read_user_transform_fn that examines the row filters in pngtest.c - -Version 1.0.4 [September 24, 1999, not distributed publicly] - Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined - Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h - Made several minor corrections to pngtest.c - Renamed the makefiles with longer but more user friendly extensions. - Copied the PNG copyright and license to a separate LICENSE file. - Revised documentation, png.h, and example.c to remove reference to - "viewing_gamma" which no longer appears in the PNG specification. - Revised pngvcrd.c to use MMX code for interlacing only on the final pass. - Updated pngvcrd.c to use the faster C filter algorithms from libpng-1.0.1a - Split makefile.win32vc into two versions, makefile.vcawin32 (uses MMX - assembler code) and makefile.vcwin32 (doesn't). - Added a CPU timing report to pngtest.c (enabled by defining PNGTEST_TIMING) - Added a copy of pngnow.png to the distribution. - -Version 1.0.4a [September 25, 1999] - Increase max_pixel_depth in pngrutil.c if a user transform needs it. - Changed several division operations to right-shifts in pngvcrd.c - -Version 1.0.4b [September 30, 1999] - Added parentheses in line 3732 of pngvcrd.c - Added a comment in makefile.linux warning about buggy -O3 in pgcc 2.95.1 - -Version 1.0.4c [October 1, 1999] - Added a "png_check_version" function in png.c and pngtest.c that will generate - a helpful compiler error if an old png.h is found in the search path. - Changed type of png_user_transform_depth|channels from int to png_byte. - Added "Libpng is OSI Certified Open Source Software" statement to png.h - -Version 1.0.4d [October 6, 1999] - Changed 0.45 to 0.45455 in png_set_sRGB() - Removed unused PLTE entries from pngnow.png - Re-enabled some parts of pngvcrd.c (png_combine_row) that work properly. - -Version 1.0.4e [October 10, 1999] - Fixed sign error in pngvcrd.c (Greg Roelofs) - Replaced some instances of memcpy with simple assignments in pngvcrd (GR-P) - -Version 1.0.4f [October 15, 1999] - Surrounded example.c code with #if 0 .. #endif to prevent people from - inadvertently trying to compile it. - Changed png_get_header_version() from a function to a macro in png.h - Added type casting mostly in pngrtran.c and pngwtran.c - Removed some pointless "ptr = NULL" in pngmem.c - Added a "contrib" directory containing the source code from Greg's book. - -Version 1.0.5 [October 15, 1999] - Minor editing of the INSTALL and README files. - -Version 1.0.5a [October 23, 1999] - Added contrib/pngsuite and contrib/pngminus (Willem van Schaik) - Fixed a typo in the png_set_sRGB() function call in example.c (Jan Nijtmans) - Further optimization and bugfix of pngvcrd.c - Revised pngset.c so that it does not allocate or free memory in the user's - text_ptr structure. Instead, it makes its own copy. - Created separate write_end_info_struct in pngtest.c for a more severe test. - Added code in pngwrite.c to free info_ptr->text[i].key to stop a memory leak. - -Version 1.0.5b [November 23, 1999] - Moved PNG_FLAG_HAVE_CHUNK_HEADER, PNG_FLAG_BACKGROUND_IS_GRAY and - PNG_FLAG_WROTE_tIME from flags to mode. - Added png_write_info_before_PLTE() function. - Fixed some typecasting in contrib/gregbook/*.c - Updated scripts/makevms.com and added makevms.com to contrib/gregbook - and contrib/pngminus (Martin Zinser) - -Version 1.0.5c [November 26, 1999] - Moved png_get_header_version from png.h to png.c, to accommodate ansi2knr. - Removed all global arrays (according to PNG_NO_GLOBAL_ARRAYS macro), to - accommodate making DLL's: Moved usr_png_ver from global variable to function - png_get_header_ver() in png.c. Moved png_sig to png_sig_bytes in png.c and - eliminated use of png_sig in pngwutil.c. Moved the various png_CHNK arrays - into pngtypes.h. Eliminated use of global png_pass arrays. Declared the - png_CHNK and png_pass arrays to be "const". Made the global arrays - available to applications (although none are used in libpng itself) when - PNG_NO_GLOBAL_ARRAYS is not defined or when PNG_GLOBAL_ARRAYS is defined. - Removed some extraneous "-I" from contrib/pngminus/makefile.std - Changed the PNG_sRGB_INTENT macros in png.h to be consistent with PNG-1.2. - Change PNG_SRGB_INTENT to PNG_sRGB_INTENT in libpng.txt and libpng.3 - -Version 1.0.5d [November 29, 1999] - Add type cast (png_const_charp) two places in png.c - Eliminated pngtypes.h; use macros instead to declare PNG_CHNK arrays. - Renamed "PNG_GLOBAL_ARRAYS" to "PNG_USE_GLOBAL_ARRAYS" and made available - to applications a macro "PNG_USE_LOCAL_ARRAYS". - comment out (with #ifdef) all the new declarations when - PNG_USE_GLOBAL_ARRAYS is defined. - Added PNG_EXPORT_VAR macro to accommodate making DLL's. - -Version 1.0.5e [November 30, 1999] - Added iCCP, iTXt, and sPLT support; added "lang" member to the png_text - structure; refactored the inflate/deflate support to make adding new chunks - with trailing compressed parts easier in the future, and added new functions - png_free_iCCP, png_free_pCAL, png_free_sPLT, png_free_text, png_get_iCCP, - png_get_spalettes, png_set_iCCP, png_set_spalettes (Eric S. Raymond). - NOTE: Applications that write text chunks MUST define png_text->lang - before calling png_set_text(). It must be set to NULL if you want to - write tEXt or zTXt chunks. If you want your application to be able to - run with older versions of libpng, use - - #ifdef PNG_iTXt_SUPPORTED - png_text[i].lang = NULL; - #endif - - Changed png_get_oFFs() and png_set_oFFs() to use signed rather than unsigned - offsets (Eric S. Raymond). - Combined PNG_READ_cHNK_SUPPORTED and PNG_WRITE_cHNK_SUPPORTED macros into - PNG_cHNK_SUPPORTED and combined the three types of PNG_text_SUPPORTED - macros, leaving the separate macros also available. - Removed comments on #endifs at the end of many short, non-nested #if-blocks. - -Version 1.0.5f [December 6, 1999] - Changed makefile.solaris to issue a warning about potential problems when - the ucb "ld" is in the path ahead of the ccs "ld". - Removed "- [date]" from the "synopsis" line in libpng.3 and libpngpf.3. - Added sCAL chunk support (Eric S. Raymond). - -Version 1.0.5g [December 7, 1999] - Fixed "png_free_spallettes" typo in png.h - Added code to handle new chunks in pngpread.c - Moved PNG_CHNK string macro definitions outside of PNG_NO_EXTERN block - Added "translated_key" to png_text structure and png_write_iTXt(). - Added code in pngwrite.c to work around a newly discovered zlib bug. - -Version 1.0.5h [December 10, 1999] - NOTE: regarding the note for version 1.0.5e, the following must also - be included in your code: - png_text[i].translated_key = NULL; - Unknown chunk handling is now supported. - Option to eliminate all floating point support was added. Some new - fixed-point functions such as png_set_gAMA_fixed() were added. - Expanded tabs and removed trailing blanks in source files. - -Version 1.0.5i [December 13, 1999] - Added some type casts to silence compiler warnings. - Renamed "png_free_spalette" to "png_free_spalettes" for consistency. - Removed leading blanks from a #define in pngvcrd.c - Added some parameters to the new png_set_keep_unknown_chunks() function. - Added a test for up->location != 0 in the first instance of writing - unknown chunks in pngwrite.c - Changed "num" to "i" in png_free_spalettes() and png_free_unknowns() to - prevent recursion. - Added png_free_hIST() function. - Various patches to fix bugs in the sCAL and integer cHRM processing, - and to add some convenience macros for use with sCAL. - -Version 1.0.5j [December 21, 1999] - Changed "unit" parameter of png_write_sCAL from png_byte to int, to work - around buggy compilers. - Added new type "png_fixed_point" for integers that hold float*100000 values - Restored backward compatibility of tEXt/zTXt chunk processing: - Restored the first four members of png_text to the same order as v.1.0.5d. - Added members "lang_key" and "itxt_length" to png_text struct. Set - text_length=0 when "text" contains iTXt data. Use the "compression" - member to distinguish among tEXt/zTXt/iTXt types. Added - PNG_ITXT_COMPRESSION_NONE (1) and PNG_ITXT_COMPRESSION_zTXt(2) macros. - The "Note" above, about backward incompatibility of libpng-1.0.5e, no - longer applies. - Fixed png_read|write_iTXt() to read|write parameters in the right order, - and to write the iTXt chunk after IDAT if it appears in the end_ptr. - Added pnggccrd.c, version of pngvcrd.c Intel assembler for gcc (Greg Roelofs) - Reversed the order of trying to write floating-point and fixed-point gAMA. - -Version 1.0.5k [December 27, 1999] - Added many parentheses, e.g., "if (a && b & c)" becomes "if (a && (b & c))" - Added png_handle_as_unknown() function (Glenn) - Added png_free_chunk_list() function and chunk_list and num_chunk_list members - of png_ptr. - Eliminated erroneous warnings about multiple sPLT chunks and sPLT-after-PLTE. - Fixed a libpng-1.0.5h bug in pngrutil.c that was issuing erroneous warnings - about ignoring incorrect gAMA with sRGB (gAMA was in fact not ignored) - Added png_free_tRNS(); png_set_tRNS() now malloc's its own trans array (ESR). - Define png_get_int_32 when oFFs chunk is supported as well as when pCAL is. - Changed type of proflen from png_int_32 to png_uint_32 in png_get_iCCP(). - -Version 1.0.5l [January 1, 2000] - Added functions png_set_read_user_chunk_fn() and png_get_user_chunk_ptr() - for setting a callback function to handle unknown chunks and for - retrieving the associated user pointer (Glenn). - -Version 1.0.5m [January 7, 2000] - Added high-level functions png_read_png(), png_write_png(), png_free_pixels(). - -Version 1.0.5n [January 9, 2000] - Added png_free_PLTE() function, and modified png_set_PLTE() to malloc its - own memory for info_ptr->palette. This makes it safe for the calling - application to free its copy of the palette any time after it calls - png_set_PLTE(). - -Version 1.0.5o [January 20, 2000] - Cosmetic changes only (removed some trailing blanks and TABs) - -Version 1.0.5p [January 31, 2000] - Renamed pngdll.mak to makefile.bd32 - Cosmetic changes in pngtest.c - -Version 1.0.5q [February 5, 2000] - Relocated the makefile.solaris warning about PATH problems. - Fixed pngvcrd.c bug by pushing/popping registers in mmxsupport (Bruce Oberg) - Revised makefile.gcmmx - Added PNG_SETJMP_SUPPORTED, PNG_SETJMP_NOT_SUPPORTED, and PNG_ABORT() macros - -Version 1.0.5r [February 7, 2000] - Removed superfluous prototype for png_get_itxt from png.h - Fixed a bug in pngrtran.c that improperly expanded the background color. - Return *num_text=0 from png_get_text() when appropriate, and fix documentation - of png_get_text() in libpng.txt/libpng.3. - -Version 1.0.5s [February 18, 2000] - Added "png_jmp_env()" macro to pngconf.h, to help people migrate to the - new error handler that's planned for the next libpng release, and changed - example.c, pngtest.c, and contrib programs to use this macro. - Revised some of the DLL-export macros in pngconf.h (Greg Roelofs) - Fixed a bug in png_read_png() that caused it to fail to expand some images - that it should have expanded. - Fixed some mistakes in the unused and undocumented INCH_CONVERSIONS functions - in pngget.c - Changed the allocation of palette, history, and trans arrays back to - the version 1.0.5 method (linking instead of copying) which restores - backward compatibility with version 1.0.5. Added some remarks about - that in example.c. Added "free_me" member to info_ptr and png_ptr - and added png_free_data() function. - Updated makefile.linux and makefile.gccmmx to make directories conditionally. - Made cosmetic changes to pngasmrd.h - Added png_set_rows() and png_get_rows(), for use with png_read|write_png(). - Modified png_read_png() to allocate info_ptr->row_pointers only if it - hasn't already been allocated. - -Version 1.0.5t [March 4, 2000] - Changed png_jmp_env() migration aiding macro to png_jmpbuf(). - Fixed "interlace" typo (should be "interlaced") in contrib/gregbook/read2-x.c - Fixed bug with use of PNG_BEFORE_IHDR bit in png_ptr->mode, introduced when - PNG_FLAG_HAVE_CHUNK_HEADER was moved into png_ptr->mode in version 1.0.5b - Files in contrib/gregbook were revised to use png_jmpbuf() and to select - a 24-bit visual if one is available, and to allow abbreviated options. - Files in contrib/pngminus were revised to use the png_jmpbuf() macro. - Removed spaces in makefile.linux and makefile.gcmmx, introduced in 1.0.5s - -Version 1.0.5u [March 5, 2000] - Simplified the code that detects old png.h in png.c and pngtest.c - Renamed png_spalette (_p, _pp) to png_sPLT_t (_tp, _tpp) - Increased precision of rgb_to_gray calculations from 8 to 15 bits and - added png_set_rgb_to_gray_fixed() function. - Added makefile.bc32 (32-bit Borland C++, C mode) - -Version 1.0.5v [March 11, 2000] - Added some parentheses to the png_jmpbuf macro definition. - Updated references to the zlib home page, which has moved to freesoftware.com. - Corrected bugs in documentation regarding png_read_row() and png_write_row(). - Updated documentation of png_rgb_to_gray calculations in libpng.3/libpng.txt. - Renamed makefile.borland,turboc3 back to makefile.bor,tc3 as in version 1.0.3, - revised borland makefiles; added makefile.ibmvac3 and makefile.gcc (Cosmin) - -Version 1.0.6 [March 20, 2000] - Minor revisions of makefile.bor, libpng.txt, and gregbook/rpng2-win.c - Added makefile.sggcc (SGI IRIX with gcc) - -Version 1.0.6d [April 7, 2000] - Changed sprintf() to strcpy() in png_write_sCAL_s() to work without STDIO - Added data_length parameter to png_decompress_chunk() function - Revised documentation to remove reference to abandoned png_free_chnk functions - Fixed an error in png_rgb_to_gray_fixed() - Revised example.c, usage of png_destroy_write_struct(). - Renamed makefile.ibmvac3 to makefile.ibmc, added libpng.icc IBM project file - Added a check for info_ptr->free_me&PNG_FREE_TEXT when freeing text in png.c - Simplify png_sig_bytes() function to remove use of non-ISO-C strdup(). - -Version 1.0.6e [April 9, 2000] - Added png_data_freer() function. - In the code that checks for over-length tRNS chunks, added check of - info_ptr->num_trans as well as png_ptr->num_trans (Matthias Benckmann) - Minor revisions of libpng.txt/libpng.3. - Check for existing data and free it if the free_me flag is set, in png_set_*() - and png_handle_*(). - Only define PNG_WEIGHTED_FILTERS_SUPPORTED when PNG_FLOATING_POINT_SUPPORTED - is defined. - Changed several instances of PNG_NO_CONSOLE_ID to PNG_NO_STDIO in pngrutil.c - and mentioned the purposes of the two macros in libpng.txt/libpng.3. - -Version 1.0.6f [April 14, 2000] - Revised png_set_iCCP() and png_set_rows() to avoid prematurely freeing data. - Add checks in png_set_text() for NULL members of the input text structure. - Revised libpng.txt/libpng.3. - Removed superfluous prototype for png_set_iTXt from png.h - Removed "else" from pngread.c, after png_error(), and changed "0" to "length". - Changed several png_errors about malformed ancillary chunks to png_warnings. - -Version 1.0.6g [April 24, 2000] - Added png_pass-* arrays to pnggccrd.c when PNG_USE_LOCAL_ARRAYS is defined. - Relocated paragraph about png_set_background() in libpng.3/libpng.txt - and other revisions (Matthias Benckmann) - Relocated info_ptr->free_me, png_ptr->free_me, and other info_ptr and - png_ptr members to restore binary compatibility with libpng-1.0.5 - (breaks compatibility with libpng-1.0.6). - -Version 1.0.6h [April 24, 2000] - Changed shared library so-number pattern from 2.x.y.z to xy.z (this builds - libpng.so.10 & libpng.so.10.6h instead of libpng.so.2 & libpng.so.2.1.0.6h) - This is a temporary change for test purposes. - -Version 1.0.6i [May 2, 2000] - Rearranged some members at the end of png_info and png_struct, to put - unknown_chunks_num and free_me within the original size of the png_structs - and free_me, png_read_user_fn, and png_free_fn within the original png_info, - because some old applications allocate the structs directly instead of - using png_create_*(). - Added documentation of user memory functions in libpng.txt/libpng.3 - Modified png_read_png so that it will use user_allocated row_pointers - if present, unless free_me directs that it be freed, and added description - of the use of png_set_rows() and png_get_rows() in libpng.txt/libpng.3. - Added PNG_LEGACY_SUPPORTED macro, and #ifdef out all new (since version - 1.00) members of png_struct and png_info, to regain binary compatibility - when you define this macro. Capabilities lost in this event - are user transforms (new in version 1.0.0),the user transform pointer - (new in version 1.0.2), rgb_to_gray (new in 1.0.5), iCCP, sCAL, sPLT, - the high-level interface, and unknown chunks support (all new in 1.0.6). - This was necessary because of old applications that allocate the structs - directly as authors were instructed to do in libpng-0.88 and earlier, - instead of using png_create_*(). - Added modes PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT which - can be used to detect codes that directly allocate the structs, and - code to check these modes in png_read_init() and png_write_init() and - generate a libpng error if the modes aren't set and PNG_LEGACY_SUPPORTED - was not defined. - Added makefile.intel and updated makefile.watcom (Pawel Mrochen) - -Version 1.0.6j [May 3, 2000] - Overloaded png_read_init() and png_write_init() with macros that convert - calls to png_read_init_2() or png_write_init_2() that check the version - and structure sizes. - -Version 1.0.7beta11 [May 7, 2000] - Removed the new PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT modes - which are no longer used. - Eliminated the three new members of png_text when PNG_LEGACY_SUPPORTED is - defined or when neither PNG_READ_iTXt_SUPPORTED nor PNG_WRITE_iTXt_SUPPORTED - is defined. - Made PNG_NO_READ|WRITE_iTXt the default setting, to avoid memory - overrun when old applications fill the info_ptr->text structure directly. - Added PNGAPI macro, and added it to the definitions of all exported functions. - Relocated version macro definitions ahead of the includes of zlib.h and - pngconf.h in png.h. - -Version 1.0.7beta12 [May 12, 2000] - Revised pngset.c to avoid a problem with expanding the png_debug macro. - Deleted some extraneous defines from pngconf.h - Made PNG_NO_CONSOLE_IO the default condition when PNG_BUILD_DLL is defined. - Use MSC _RPTn debugging instead of fprintf if _MSC_VER is defined. - Added png_access_version_number() function. - Check for mask&PNG_FREE_CHNK (for TEXT, SCAL, PCAL) in png_free_data(). - Expanded libpng.3/libpng.txt information about png_data_freer(). - -Version 1.0.7beta14 [May 17, 2000] (beta13 was not published) - Changed pnggccrd.c and pngvcrd.c to handle bad adaptive filter types as - warnings instead of errors, as pngrutil.c does. - Set the PNG_INFO_IDAT valid flag in png_set_rows() so png_write_png() - will actually write IDATs. - Made the default PNG_USE_LOCAL_ARRAYS depend on PNG_DLL instead of WIN32. - Make png_free_data() ignore its final parameter except when freeing data - that can have multiple instances (text, sPLT, unknowns). - Fixed a new bug in png_set_rows(). - Removed info_ptr->valid tests from png_free_data(), as in version 1.0.5. - Added png_set_invalid() function. - Fixed incorrect illustrations of png_destroy_write_struct() in example.c. - -Version 1.0.7beta15 [May 30, 2000] - Revised the deliberately erroneous Linux setjmp code in pngconf.h to produce - fewer error messages. - Rearranged checks for Z_OK to check the most likely path first in pngpread.c - and pngwutil.c. - Added checks in pngtest.c for png_create_*() returning NULL, and mentioned - in libpng.txt/libpng.3 the need for applications to check this. - Changed names of png_default_*() functions in pngtest to pngtest_*(). - Changed return type of png_get_x|y_offset_*() from png_uint_32 to png_int_32. - Fixed some bugs in the unused PNG_INCH_CONVERSIONS functions in pngget.c - Set each pointer to NULL after freeing it in png_free_data(). - Worked around a problem in pngconf.h; AIX's strings.h defines an "index" - macro that conflicts with libpng's png_color_16.index. (Dimitri - Papadapoulos) - Added "msvc" directory with MSVC++ project files (Simon-Pierre Cadieux). - -Version 1.0.7beta16 [June 4, 2000] - Revised the workaround of AIX string.h "index" bug. - Added a check for overlength PLTE chunk in pngrutil.c. - Added PNG_NO_POINTER_INDEXING macro to use array-indexing instead of pointer - indexing in pngrutil.c and pngwutil.c to accommodate a buggy compiler. - Added a warning in png_decompress_chunk() when it runs out of data, e.g. - when it tries to read an erroneous PhotoShop iCCP chunk. - Added PNG_USE_DLL macro. - Revised the copyright/disclaimer/license notice. - Added contrib/msvctest directory - -Version 1.0.7rc1 [June 9, 2000] - Corrected the definition of PNG_TRANSFORM_INVERT_ALPHA (0x0400 not 0x0200) - Added contrib/visupng directory (Willem van Schaik) - -Version 1.0.7beta18 [June 23, 2000] - Revised PNGAPI definition, and pngvcrd.c to work with __GCC__ - and do not redefine PNGAPI if it is passed in via a compiler directive. - Revised visupng/PngFile.c to remove returns from within the Try block. - Removed leading underscores from "_PNG_H" and "_PNG_SAVE_BSD_SOURCE" macros. - Updated contrib/visupng/cexcept.h to version 1.0.0. - Fixed bugs in pngwrite.c and pngwutil.c that prevented writing iCCP chunks. - -Version 1.0.7rc2 [June 28, 2000] - Updated license to include disclaimers required by UCITA. - Fixed "DJBPP" typo in pnggccrd.c introduced in beta18. - -Version 1.0.7 [July 1, 2000] - Revised the definition of "trans_values" in libpng.3/libpng.txt - -Version 1.0.8beta1 [July 8, 2000] - Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks. - Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and - pngwutil.c. - Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h. - Removed unused "#include " from png.c - Added WindowsCE support. - Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment. - -Version 1.0.8beta2 [July 10, 2000] - Added project files to the wince directory and made further revisions - of pngtest.c, pngrio.c, and pngwio.c in support of WindowsCE. - -Version 1.0.8beta3 [July 11, 2000] - Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS() - for indexed-color input files to avoid potential double-freeing trans array - under some unusual conditions; problem was introduced in version 1.0.6f. - Further revisions to pngtest.c and files in the wince subdirectory. - -Version 1.0.8beta4 [July 14, 2000] - Added the files pngbar.png and pngbar.jpg to the distribution. - Added makefile.cygwin, and cygwin support in pngconf.h - Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory) - -Version 1.0.8rc1 [July 16, 2000] - Revised png_debug() macros and statements to eliminate compiler warnings. - -Version 1.0.8 [July 24, 2000] - Added png_flush() in pngwrite.c, after png_write_IEND(). - Updated makefile.hpux to build a shared library. - -Version 1.0.9beta1 [November 10, 2000] - Fixed typo in scripts/makefile.hpux - Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser) - Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser) - Changed "cdrom.com" in documentation to "libpng.org" - Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg). - Changed type of "params" from voidp to png_voidp in png_read|write_png(). - Make sure PNGAPI and PNG_IMPEXP are defined in pngconf.h. - Revised the 3 instances of WRITEFILE in pngtest.c. - Relocated "msvc" and "wince" project subdirectories into "dll" subdirectory. - Updated png.rc in dll/msvc project - Revised makefile.dec to define and use LIBPATH and INCPATH - Increased size of global png_libpng_ver[] array from 12 to 18 chars. - Made global png_libpng_ver[], png_sig[] and png_pass_*[] arrays const. - Removed duplicate png_crc_finish() from png_handle_bKGD() function. - Added a warning when application calls png_read_update_info() multiple times. - Revised makefile.cygwin - Fixed bugs in iCCP support in pngrutil.c and pngwutil.c. - Replaced png_set_empty_plte_permitted() with png_permit_mng_features(). - -Version 1.0.9beta2 [November 19, 2000] - Renamed the "dll" subdirectory "projects". - Added borland project files to "projects" subdirectory. - Set VS_FF_PRERELEASE and VS_FF_PATCHED flags in msvc/png.rc when appropriate. - Add error message in png_set_compression_buffer_size() when malloc fails. - -Version 1.0.9beta3 [November 23, 2000] - Revised PNG_LIBPNG_BUILD_TYPE macro in png.h, used in the msvc project. - Removed the png_flush() in pngwrite.c that crashes some applications - that don't set png_output_flush_fn. - Added makefile.macosx and makefile.aix to scripts directory. - -Version 1.0.9beta4 [December 1, 2000] - Change png_chunk_warning to png_warning in png_check_keyword(). - Increased the first part of msg buffer from 16 to 18 in png_chunk_error(). - -Version 1.0.9beta5 [December 15, 2000] - Added support for filter method 64 (for PNG datastreams embedded in MNG). - -Version 1.0.9beta6 [December 18, 2000] - Revised png_set_filter() to accept filter method 64 when appropriate. - Added new PNG_HAVE_PNG_SIGNATURE bit to png_ptr->mode and use it to - help prevent applications from using MNG features in PNG datastreams. - Added png_permit_mng_features() function. - Revised libpng.3/libpng.txt. Changed "filter type" to "filter method". - -Version 1.0.9rc1 [December 23, 2000] - Revised test for PNG_HAVE_PNG_SIGNATURE in pngrutil.c - Fixed error handling of unknown compression type in png_decompress_chunk(). - In pngconf.h, define __cdecl when _MSC_VER is defined. - -Version 1.0.9beta7 [December 28, 2000] - Changed PNG_TEXT_COMPRESSION_zTXt to PNG_COMPRESSION_TYPE_BASE several places. - Revised memory management in png_set_hIST and png_handle_hIST in a backward - compatible manner. PLTE and tRNS were revised similarly. - Revised the iCCP chunk reader to ignore trailing garbage. - -Version 1.0.9beta8 [January 12, 2001] - Moved pngasmrd.h into pngconf.h. - Improved handling of out-of-spec garbage iCCP chunks generated by PhotoShop. - -Version 1.0.9beta9 [January 15, 2001] - Added png_set_invalid, png_permit_mng_features, and png_mmx_supported to - wince and msvc project module definition files. - Minor revision of makefile.cygwin. - Fixed bug with progressive reading of narrow interlaced images in pngpread.c - -Version 1.0.9beta10 [January 16, 2001] - Do not typedef png_FILE_p in pngconf.h when PNG_NO_STDIO is defined. - Fixed "png_mmx_supported" typo in project definition files. - -Version 1.0.9beta11 [January 19, 2001] - Updated makefile.sgi to make shared library. - Removed png_mmx_support() function and disabled PNG_MNG_FEATURES_SUPPORTED - by default, for the benefit of DLL forward compatibility. These will - be re-enabled in version 1.2.0. - -Version 1.0.9rc2 [January 22, 2001] - Revised cygwin support. - -Version 1.0.9 [January 31, 2001] - Added check of cygwin's ALL_STATIC in pngconf.h - Added "-nommx" parameter to contrib/gregbook/rpng2-win and rpng2-x demos. - -Version 1.0.10beta1 [March 14, 2001] - Revised makefile.dec, makefile.sgi, and makefile.sggcc; added makefile.hpgcc. - Reformatted libpng.3 to eliminate bad line breaks. - Added checks for _mmx_supported in the read_filter_row function of pnggccrd.c - Added prototype for png_mmx_support() near the top of pnggccrd.c - Moved some error checking from png_handle_IHDR to png_set_IHDR. - Added PNG_NO_READ_SUPPORTED and PNG_NO_WRITE_SUPPORTED macros. - Revised png_mmx_support() function in pnggccrd.c - Restored version 1.0.8 PNG_WRITE_EMPTY_PLTE_SUPPORTED behavior in pngwutil.c - Fixed memory leak in contrib/visupng/PngFile.c - Fixed bugs in png_combine_row() in pnggccrd.c and pngvcrd.c (C version) - Added warnings when retrieving or setting gamma=0. - Increased the first part of msg buffer from 16 to 18 in png_chunk_warning(). - -Version 1.0.10rc1 [March 23, 2001] - Changed all instances of memcpy, strcpy, and strlen to png_memcpy, png_strcpy, - and png_strlen. - Revised png_mmx_supported() function in pnggccrd.c to return proper value. - Fixed bug in progressive reading (pngpread.c) with small images (height < 8). - -Version 1.0.10 [March 30, 2001] - Deleted extraneous space (introduced in 1.0.9) from line 42 of makefile.cygwin - Added beos project files (Chris Herborth) - -Version 1.0.11beta1 [April 3, 2001] - Added type casts on several png_malloc() calls (Dimitri Papadapoulos). - Removed a no-longer needed AIX work-around from pngconf.h - Changed several "//" single-line comments to C-style in pnggccrd.c - -Version 1.0.11beta2 [April 11, 2001] - Removed PNGAPI from several functions whose prototypes did not have PNGAPI. - Updated scripts/pngos2.def - -Version 1.0.11beta3 [April 14, 2001] - Added checking the results of many instances of png_malloc() for NULL - -Version 1.0.11beta4 [April 20, 2001] - Undid the changes from version 1.0.11beta3. Added a check for NULL return - from user's malloc_fn(). - Removed some useless type casts of the NULL pointer. - Added makefile.netbsd - -Version 1.0.11 [April 27, 2001] - Revised makefile.netbsd - -Version 1.0.12beta1 [May 14, 2001] - Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot) - Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h - Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings. - Eliminated the png_error about apps using png_read|write_init(). Instead, - libpng will reallocate the png_struct and info_struct if they are too small. - This retains future binary compatibility for old applications written for - libpng-0.88 and earlier. - -Version 1.2.0beta1 [May 6, 2001] - Bumped DLLNUM to 2. - Re-enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED - by default. - Added runtime selection of MMX features. - Added png_set_strip_error_numbers function and related macros. - -Version 1.2.0beta2 [May 7, 2001] - Finished merging 1.2.0beta1 with version 1.0.11 - Added a check for attempts to read or write PLTE in grayscale PNG datastreams. - -Version 1.2.0beta3 [May 17, 2001] - Enabled user memory function by default. - Modified png_create_struct so it passes user mem_ptr to user memory allocator. - Increased png_mng_features flag from png_byte to png_uint_32. - Bumped shared-library (so-number) and dll-number to 3. - -Version 1.2.0beta4 [June 23, 2001] - Check for missing profile length field in iCCP chunk and free chunk_data - in case of truncated iCCP chunk. - Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc - Bumped dll-number from 2 to 3 in makefile.cygwin - Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly - if user attempts to run it on an 8-bit display. - Updated contrib/gregbook - Use png_malloc instead of png_zalloc to allocate palette in pngset.c - Updated makefile.ibmc - Added some typecasts to eliminate gcc 3.0 warnings. Changed prototypes - of png_write_oFFS width and height from png_uint_32 to png_int_32. - Updated example.c - Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c - -Version 1.2.0beta5 [August 8, 2001] - Revised contrib/gregbook - Revised makefile.gcmmx - Revised pnggccrd.c to conditionally compile some thread-unsafe code only - when PNG_THREAD_UNSAFE_OK is defined. - Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with - value exceeding 2^bit_depth-1 - Revised makefile.sgi and makefile.sggcc - Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c - Removed restriction that do_invert_mono only operate on 1-bit opaque files - -Version 1.2.0 [September 1, 2001] - Changed a png_warning() to png_debug() in pnggccrd.c - Fixed contrib/gregbook/rpng-x.c, rpng2-x.c to avoid crash with XFreeGC(). - -Version 1.2.1beta1 [October 19, 2001] - Revised makefile.std in contrib/pngminus - Include background_1 in png_struct regardless of gamma support. - Revised makefile.netbsd and makefile.macosx, added makefile.darwin. - Revised example.c to provide more details about using row_callback(). - -Version 1.2.1beta2 [October 25, 2001] - Added type cast to each NULL appearing in a function call, except for - WINCE functions. - Added makefile.so9. - -Version 1.2.1beta3 [October 27, 2001] - Removed type casts from all NULLs. - Simplified png_create_struct_2(). - -Version 1.2.1beta4 [November 7, 2001] - Revised png_create_info_struct() and png_creat_struct_2(). - Added error message if png_write_info() was omitted. - Type cast NULLs appearing in function calls when _NO_PROTO or - PNG_TYPECAST_NULL is defined. - -Version 1.2.1rc1 [November 24, 2001] - Type cast NULLs appearing in function calls except when PNG_NO_TYPECAST_NULL - is defined. - Changed typecast of "size" argument to png_size_t in pngmem.c calls to - the user malloc_fn, to agree with the prototype in png.h - Added a pop/push operation to pnggccrd.c, to preserve Eflag (Maxim Sobolev) - Updated makefile.sgi to recognize LIBPATH and INCPATH. - Updated various makefiles so "make clean" does not remove previous major - version of the shared library. - -Version 1.2.1rc2 [December 4, 2001] - Always allocate 256-entry internal palette, hist, and trans arrays, to - avoid out-of-bounds memory reference caused by invalid PNG datastreams. - Added a check for prefix_length > data_length in iCCP chunk handler. - -Version 1.2.1 [December 7, 2001] - None. - -Version 1.2.2beta1 [February 22, 2002] - Fixed a bug with reading the length of iCCP profiles (Larry Reeves). - Revised makefile.linux, makefile.gcmmx, and makefile.sgi to generate - libpng.a, libpng12.so (not libpng.so.3), and libpng12/png.h - Revised makefile.darwin to remove "-undefined suppress" option. - Added checks for gamma and chromaticity values over 21474.83, which exceed - the limit for PNG unsigned 32-bit integers when encoded. - Revised calls to png_create_read_struct() and png_create_write_struct() - for simpler debugging. - Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK) - -Version 1.2.2beta2 [February 23, 2002] - Check chunk_length and idat_size for invalid (over PNG_MAX_UINT) lengths. - Check for invalid image dimensions in png_get_IHDR. - Added missing "fi;" in the install target of the SGI makefiles. - Added install-static to all makefiles that make shared libraries. - Always do gamma compensation when image is partially transparent. - -Version 1.2.2beta3 [March 7, 2002] - Compute background.gray and background_1.gray even when color_type is RGB - in case image gets reduced to gray later. - Modified shared-library makefiles to install pkgconfig/libpngNN.pc. - Export (with PNGAPI) png_zalloc, png_zfree, and png_handle_as_unknown - Removed unused png_write_destroy_info prototype from png.h - Eliminated incorrect use of width_mmx from pnggccrd.c in pixel_bytes == 8 case - Added install-shared target to all makefiles that make shared libraries. - Stopped a double free of palette, hist, and trans when not using free_me. - Added makefile.32sunu for Sun Ultra 32 and makefile.64sunu for Sun Ultra 64. - -Version 1.2.2beta4 [March 8, 2002] - Compute background.gray and background_1.gray even when color_type is RGB - in case image gets reduced to gray later (Jason Summers). - Relocated a misplaced /bin/rm in the "install-shared" makefile targets - Added PNG_1_0_X macro which can be used to build a 1.0.x-compatible library. - -Version 1.2.2beta5 [March 26, 2002] - Added missing PNGAPI to several function definitions. - Check for invalid bit_depth or color_type in png_get_IHDR(), and - check for missing PLTE or IHDR in png_push_read_chunk() (Matthias Clasen). - Revised iTXt support to accept NULL for lang and lang_key. - Compute gamma for color components of background even when color_type is gray. - Changed "()" to "{}" in scripts/libpng.pc.in. - Revised makefiles to put png.h and pngconf.h only in $prefix/include/libpngNN - Revised makefiles to make symlink to libpng.so.NN in addition to libpngNN.so - -Version 1.2.2beta6 [March 31, 2002] - -Version 1.0.13beta1 [March 31, 2002] - Prevent png_zalloc() from trying to memset memory that it failed to acquire. - Add typecasts of PNG_MAX_UINT in pngset_cHRM_fixed() (Matt Holgate). - Ensure that the right function (user or default) is used to free the - png_struct after an error in png_create_read_struct_2(). - -Version 1.2.2rc1 [April 7, 2002] - -Version 1.0.13rc1 [April 7, 2002] - Save the ebx register in pnggccrd.c (Sami Farin) - Add "mem_ptr = png_ptr->mem_ptr" in png_destroy_write_struct() (Paul Gardner). - Updated makefiles to put headers in include/libpng and remove old include/*.h. - -Version 1.2.2 [April 15, 2002] - -Version 1.0.13 [April 15, 2002] - Revised description of png_set_filter() in libpng.3/libpng.txt. - Revised makefile.netbsd and added makefile.neNNbsd and makefile.freebsd - -Version 1.0.13patch01 [April 17, 2002] - -Version 1.2.2patch01 [April 17, 2002] - Changed ${PNGMAJ}.${PNGVER} bug to ${PNGVER} in makefile.sgi and - makefile.sggcc - Fixed VER -> PNGVER typo in makefile.macosx and added install-static to - install - Added install: target to makefile.32sunu and makefile.64sunu - -Version 1.0.13patch03 [April 18, 2002] - -Version 1.2.2patch03 [April 18, 2002] - Revised 15 makefiles to link libpng.a to libpngNN.a and the include libpng - subdirectory to libpngNN subdirectory without the full pathname. - Moved generation of libpng.pc from "install" to "all" in 15 makefiles. - -Version 1.2.3rc1 [April 28, 2002] - Added install-man target to 15 makefiles (Dimitri Papadopolous-Orfanos). - Added $(DESTDIR) feature to 24 makefiles (Tim Mooney) - Fixed bug with $prefix, should be $(prefix) in makefile.hpux. - Updated cygwin-specific portion of pngconf.h and revised makefile.cygwin - Added a link from libpngNN.pc to libpng.pc in 15 makefiles. - Added links from include/libpngNN/*.h to include/*.h in 24 makefiles. - Revised makefile.darwin to make relative links without full pathname. - Added setjmp() at the end of png_create_*_struct_2() in case user forgets - to put one in their application. - Restored png_zalloc() and png_zfree() prototypes to version 1.2.1 and - removed them from module definition files. - -Version 1.2.3rc2 [May 1, 2002] - Fixed bug in reporting number of channels in pngget.c and pngset.c, - that was introduced in version 1.2.2beta5. - Exported png_zalloc(), png_zfree(), png_default_read(), png_default_write(), - png_default_flush(), and png_push_fill_buffer() and included them in - module definition files. - Added "libpng.pc" dependency to the "install-shared" target in 15 makefiles. - -Version 1.2.3rc3 [May 1, 2002] - Revised prototype for png_default_flush() - Remove old libpng.pc and libpngNN.pc before installing new ones. - -Version 1.2.3rc4 [May 2, 2002] - Typos in *.def files (png_default_read|write -> png_default_read|write_data) - In makefiles, changed rm libpng.NN.pc to rm libpngNN.pc - Added libpng-config and libpngNN-config and modified makefiles to install - them. - Changed $(MANPATH) to $(DESTDIR)$(MANPATH) in makefiles - Added "Win32 DLL VB" configuration to projects/msvc/libpng.dsp - -Version 1.2.3rc5 [May 11, 2002] - Changed "error" and "message" in prototypes to "error_message" and - "warning_message" to avoid namespace conflict. - Revised 15 makefiles to build libpng-config from libpng-config-*.in - Once more restored png_zalloc and png_zfree to regular nonexported form. - Restored png_default_read|write_data, png_default_flush, png_read_fill_buffer - to nonexported form, but with PNGAPI, and removed them from module def - files. - -Version 1.2.3rc6 [May 14, 2002] - Removed "PNGAPI" from png_zalloc() and png_zfree() in png.c - Changed "Gz" to "Gd" in projects/msvc/libpng.dsp and zlib.dsp. - Removed leftover libpng-config "sed" script from four makefiles. - Revised libpng-config creating script in 16 makefiles. - -Version 1.2.3 [May 22, 2002] - Revised libpng-config target in makefile.cygwin. - Removed description of png_set_mem_fn() from documentation. - Revised makefile.freebsd. - Minor cosmetic changes to 15 makefiles, e.g., $(DI) = $(DESTDIR)/$(INCDIR). - Revised projects/msvc/README.txt - Changed -lpng to -lpngNN in LDFLAGS in several makefiles. - -Version 1.2.4beta1 [May 24, 2002] - Added libpng.pc and libpng-config to "all:" target in 16 makefiles. - Fixed bug in 16 makefiles: $(DESTDIR)/$(LIBPATH) to $(DESTDIR)$(LIBPATH) - Added missing "\" before closing double quote in makefile.gcmmx. - Plugged various memory leaks; added png_malloc_warn() and png_set_text_2() - functions. - -Version 1.2.4beta2 [June 25, 2002] - Plugged memory leak of png_ptr->current_text (Matt Holgate). - Check for buffer overflow before reading CRC in pngpread.c (Warwick Allison) - Added -soname to the loader flags in makefile.dec, makefile.sgi, and - makefile.sggcc. - Added "test-installed" target to makefile.linux, makefile.gcmmx, - makefile.sgi, and makefile.sggcc. - -Version 1.2.4beta3 [June 28, 2002] - Plugged memory leak of row_buf in pngtest.c when there is a png_error(). - Detect buffer overflow in pngpread.c when IDAT is corrupted with extra data. - Added "test-installed" target to makefile.32sunu, makefile.64sunu, - makefile.beos, makefile.darwin, makefile.dec, makefile.macosx, - makefile.solaris, makefile.hpux, makefile.hpgcc, and makefile.so9. - -Version 1.2.4rc1 and 1.0.14rc1 [July 2, 2002] - Added "test-installed" target to makefile.cygwin and makefile.sco. - Revised pnggccrd.c to be able to back out version 1.0.x via PNG_1_0_X macro. - -Version 1.2.4 and 1.0.14 [July 8, 2002] - Changed png_warning() to png_error() when width is too large to process. - -Version 1.2.4patch01 [July 20, 2002] - Revised makefile.cygwin to use DLL number 12 instead of 13. - -Version 1.2.5beta1 [August 6, 2002] - Added code to contrib/gregbook/readpng2.c to ignore unused chunks. - Replaced toucan.png in contrib/gregbook (it has been corrupt since 1.0.11) - Removed some stray *.o files from contrib/gregbook. - Changed png_error() to png_warning() about "Too much data" in pngpread.c - and about "Extra compressed data" in pngrutil.c. - Prevent png_ptr->pass from exceeding 7 in png_push_finish_row(). - Updated makefile.hpgcc - Updated png.c and pnggccrd.c handling of return from png_mmx_support() - -Version 1.2.5beta2 [August 15, 2002] - Only issue png_warning() about "Too much data" in pngpread.c when avail_in - is nonzero. - Updated makefiles to install a separate libpng.so.3 with its own rpath. - -Version 1.2.5rc1 and 1.0.15rc1 [August 24, 2002] - Revised makefiles to not remove previous minor versions of shared libraries. - -Version 1.2.5rc2 and 1.0.15rc2 [September 16, 2002] - Revised 13 makefiles to remove "-lz" and "-L$(ZLIBLIB)", etc., from shared - library loader directive. - Added missing "$OBJSDLL" line to makefile.gcmmx. - Added missing "; fi" to makefile.32sunu. - -Version 1.2.5rc3 and 1.0.15rc3 [September 18, 2002] - Revised libpng-config script. - -Version 1.2.5 and 1.0.15 [October 3, 2002] - Revised makefile.macosx, makefile.darwin, makefile.hpgcc, and makefile.hpux, - and makefile.aix. - Relocated two misplaced PNGAPI lines in pngtest.c - -Version 1.2.6beta1 [October 22, 2002] - Commented out warning about uninitialized mmx_support in pnggccrd.c. - Changed "IBMCPP__" flag to "__IBMCPP__" in pngconf.h. - Relocated two more misplaced PNGAPI lines in pngtest.c - Fixed memory overrun bug in png_do_read_filler() with 16-bit datastreams, - introduced in version 1.0.2. - Revised makefile.macosx, makefile.dec, makefile.aix, and makefile.32sunu. - -Version 1.2.6beta2 [November 1, 2002] - Added libpng-config "--ldopts" output. - Added "AR=ar" and "ARFLAGS=rc" and changed "ar rc" to "$(AR) $(ARFLAGS)" - in makefiles. - -Version 1.2.6beta3 [July 18, 2004] - Reverted makefile changes from version 1.2.6beta2 and some of the changes - from version 1.2.6beta1; these will be postponed until version 1.2.7. - Version 1.2.6 is going to be a simple bugfix release. - Changed the one instance of "ln -sf" to "ln -f -s" in each Sun makefile. - Fixed potential overrun in pngerror.c by using strncpy instead of memcpy. - Added "#!/bin/sh" at the top of configure, for recognition of the - 'x' flag under Cygwin (Cosmin). - Optimized vacuous tests that silence compiler warnings, in png.c (Cosmin). - Added support for PNG_USER_CONFIG, in pngconf.h (Cosmin). - Fixed the special memory handler for Borland C under DOS, in pngmem.c - (Cosmin). - Removed some spurious assignments in pngrutil.c (Cosmin). - Replaced 65536 with 65536L, and 0xffff with 0xffffL, to silence warnings - on 16-bit platforms (Cosmin). - Enclosed shift op expressions in parentheses, to silence warnings (Cosmin). - Used proper type png_fixed_point, to avoid problems on 16-bit platforms, - in png_handle_sRGB() (Cosmin). - Added compression_type to png_struct, and optimized the window size - inside the deflate stream (Cosmin). - Fixed definition of isnonalpha(), in pngerror.c and pngrutil.c (Cosmin). - Fixed handling of unknown chunks that come after IDAT (Cosmin). - Allowed png_error() and png_warning() to work even if png_ptr == NULL - (Cosmin). - Replaced row_info->rowbytes with row_bytes in png_write_find_filter() - (Cosmin). - Fixed definition of PNG_LIBPNG_VER_DLLNUM (Simon-Pierre). - Used PNG_LIBPNG_VER and PNG_LIBPNG_VER_STRING instead of the hardcoded - values in png.c (Simon-Pierre, Cosmin). - Initialized png_libpng_ver[] with PNG_LIBPNG_VER_STRING (Simon-Pierre). - Replaced PNG_LIBPNG_VER_MAJOR with PNG_LIBPNG_VER_DLLNUM in png.rc - (Simon-Pierre). - Moved the definition of PNG_HEADER_VERSION_STRING near the definitions - of the other PNG_LIBPNG_VER_... symbols in png.h (Cosmin). - Relocated #ifndef PNGAPI guards in pngconf.h (Simon-Pierre, Cosmin). - Updated scripts/makefile.vc(a)win32 (Cosmin). - Updated the MSVC project (Simon-Pierre, Cosmin). - Updated the Borland C++ Builder project (Cosmin). - Avoided access to asm_flags in pngvcrd.c, if PNG_1_0_X is defined (Cosmin). - Commented out warning about uninitialized mmx_support in pngvcrd.c (Cosmin). - Removed scripts/makefile.bd32 and scripts/pngdef.pas (Cosmin). - Added extra guard around inclusion of Turbo C memory headers, in pngconf.h - (Cosmin). - Renamed projects/msvc/ to projects/visualc6/, and projects/borland/ to - projects/cbuilder5/ (Cosmin). - Moved projects/visualc6/png32ms.def to scripts/pngw32.def, - and projects/visualc6/png.rc to scripts/pngw32.rc (Cosmin). - Added projects/visualc6/pngtest.dsp; removed contrib/msvctest/ (Cosmin). - Changed line endings to DOS style in cbuilder5 and visualc6 files, even - in the tar.* distributions (Cosmin). - Updated contrib/visupng/VisualPng.dsp (Cosmin). - Updated contrib/visupng/cexcept.h to version 2.0.0 (Cosmin). - Added a separate distribution with "configure" and supporting files (Junichi). - -Version 1.2.6beta4 [July 28, 2004] - Added user ability to change png_size_t via a PNG_SIZE_T macro. - Added png_sizeof() and png_convert_size() functions. - Added PNG_SIZE_MAX (maximum value of a png_size_t variable. - Added check in png_malloc_default() for (size_t)size != (png_uint_32)size - which would indicate an overflow. - Changed sPLT failure action from png_error to png_warning and abandon chunk. - Changed sCAL and iCCP failures from png_error to png_warning and abandon. - Added png_get_uint_31(png_ptr, buf) function. - Added PNG_UINT_32_MAX macro. - Renamed PNG_MAX_UINT to PNG_UINT_31_MAX. - Made png_zalloc() issue a png_warning and return NULL on potential - overflow. - Turn on PNG_NO_ZALLOC_ZERO by default in version 1.2.x - Revised "clobber list" in pnggccrd.c so it will compile under gcc-3.4. - Revised Borland portion of png_malloc() to return NULL or issue - png_error() according to setting of PNG_FLAG_MALLOC_NULL_MEM_OK. - Added PNG_NO_SEQUENTIAL_READ_SUPPORTED macro to conditionally remove - sequential read support. - Added some "#if PNG_WRITE_SUPPORTED" blocks. - Added #ifdef to remove some redundancy in png_malloc_default(). - Use png_malloc instead of png_zalloc to allocate the palette. - -Version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004] - Fixed buffer overflow vulnerability (CVE-2004-0597) in png_handle_tRNS(). - Fixed NULL dereference vulnerability (CVE-2004-0598) in png_handle_iCCP(). - Fixed integer overflow vulnerability (CVE-2004-0599) in png_read_png(). - Fixed some harmless bugs in png_handle_sBIT, etc, that would cause - duplicate chunk types to go undetected. - Fixed some timestamps in the -config version - Rearranged order of processing of color types in png_handle_tRNS(). - Added ROWBYTES macro to calculate rowbytes without integer overflow. - Updated makefile.darwin and removed makefile.macosx from scripts directory. - Imposed default one million column, one-million row limits on the image - dimensions, and added png_set_user_limits() function to override them. - Revised use of PNG_SET_USER_LIMITS_SUPPORTED macro. - Fixed wrong cast of returns from png_get_user_width|height_max(). - Changed some "keep the compiler happy" from empty statements to returns, - Revised libpng.txt to remove 1.2.x stuff from the 1.0.x distribution - -Version 1.0.16rc2 and 1.2.6rc2 [August 7, 2004] - Revised makefile.darwin and makefile.solaris. Removed makefile.macosx. - Revised pngtest's png_debug_malloc() to use png_malloc() instead of - png_malloc_default() which is not supposed to be exported. - Fixed off-by-one error in one of the conversions to PNG_ROWBYTES() in - pngpread.c. Bug was introduced in 1.2.6rc1. - Fixed bug in RGB to RGBX transformation introduced in 1.2.6rc1. - Fixed old bug in RGB to Gray transformation. - Fixed problem with 64-bit compilers by casting arguments to abs() - to png_int_32. - Changed "ln -sf" to "ln -f -s" in three makefiles (solaris, sco, so9). - Changed "HANDLE_CHUNK_*" to "PNG_HANDLE_CHUNK_*" (Cosmin) - Added "-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)" to 15 *NIX makefiles. - Added code to update the row_info->colortype in png_do_read_filler() (MSB). - -Version 1.0.16rc3 and 1.2.6rc3 [August 9, 2004] - Eliminated use of "abs()" in testing cHRM and gAMA values, to avoid - trouble with some 64-bit compilers. Created PNG_OUT_OF_RANGE() macro. - Revised documentation of png_set_keep_unknown_chunks(). - Check handle_as_unknown status in pngpread.c, as in pngread.c previously. - Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_INTERNAL section of png.h - Added "rim" definitions for CONST4 and CONST6 in pnggccrd.c - -Version 1.0.16rc4 and 1.2.6rc4 [August 10, 2004] - Fixed mistake in pngtest.c introduced in 1.2.6rc2 (declaration of - "pinfo" was out of place). - -Version 1.0.16rc5 and 1.2.6rc5 [August 10, 2004] - Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_ASSEMBLER_CODE_SUPPORTED - section of png.h where they were inadvertently placed in version rc3. - -Version 1.2.6 and 1.0.16 [August 15, 2004] - Revised pngtest so memory allocation testing is only done when PNG_DEBUG==1. - -Version 1.2.7beta1 [August 26, 2004] - Removed unused pngasmrd.h file. - Removed references to uu.net for archived files. Added references to - PNG Spec (second edition) and the PNG ISO/IEC Standard. - Added "test-dd" target in 15 makefiles, to run pngtest in DESTDIR. - Fixed bug with "optimized window size" in the IDAT datastream, that - causes libpng to write PNG files with incorrect zlib header bytes. - -Version 1.2.7beta2 [August 28, 2004] - Fixed bug with sCAL chunk and big-endian machines (David Munro). - Undid new code added in 1.2.6rc2 to update the color_type in - png_set_filler(). - Added png_set_add_alpha() that updates color type. - -Version 1.0.17rc1 and 1.2.7rc1 [September 4, 2004] - Revised png_set_strip_filler() to not remove alpha if color_type has alpha. - -Version 1.2.7 and 1.0.17 [September 12, 2004] - Added makefile.hp64 - Changed projects/msvc/png32ms.def to scripts/png32ms.def in makefile.cygwin - -Version 1.2.8beta1 [November 1, 2004] - Fixed bug in png_text_compress() that would fail to complete a large block. - Fixed bug, introduced in libpng-1.2.7, that overruns a buffer during - strip alpha operation in png_do_strip_filler(). - Added PNG_1_2_X definition in pngconf.h - Use #ifdef to comment out png_info_init in png.c and png_read_init in - pngread.c (as of 1.3.0) - -Version 1.2.8beta2 [November 2, 2004] - Reduce color_type to a nonalpha type after strip alpha operation in - png_do_strip_filler(). - -Version 1.2.8beta3 [November 3, 2004] - Revised definitions of PNG_MAX_UINT_32, PNG_MAX_SIZE, and PNG_MAXSUM - -Version 1.2.8beta4 [November 12, 2004] - Fixed (again) definition of PNG_LIBPNG_VER_DLLNUM in png.h (Cosmin). - Added PNG_LIBPNG_BUILD_PRIVATE in png.h (Cosmin). - Set png_ptr->zstream.data_type to Z_BINARY, to avoid unnecessary detection - of data type in deflate (Cosmin). - Deprecated but continue to support SPECIALBUILD and PRIVATEBUILD in favor of - PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING. - -Version 1.2.8beta5 [November 20, 2004] - Use png_ptr->flags instead of png_ptr->transformations to pass - PNG_STRIP_ALPHA info to png_do_strip_filler(), to preserve ABI - compatibility. - Revised handling of SPECIALBUILD, PRIVATEBUILD, - PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING. - -Version 1.2.8rc1 [November 24, 2004] - Moved handling of BUILD macros from pngconf.h to png.h - Added definition of PNG_LIBPNG_BASE_TYPE in png.h, inadvertently - omitted from beta5. - Revised scripts/pngw32.rc - Despammed mailing addresses by masking "@" with "at". - Inadvertently installed a supposedly faster test version of pngrutil.c - -Version 1.2.8rc2 [November 26, 2004] - Added two missing "\" in png.h - Change tests in pngread.c and pngpread.c to - if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) - png_do_read_transformations(png_ptr); - -Version 1.2.8rc3 [November 28, 2004] - Reverted pngrutil.c to version libpng-1.2.8beta5. - Added scripts/makefile.elf with supporting code in pngconf.h for symbol - versioning (John Bowler). - -Version 1.2.8rc4 [November 29, 2004] - Added projects/visualc7 (Simon-pierre). - -Version 1.2.8rc5 [November 29, 2004] - Fixed new typo in scripts/pngw32.rc - -Version 1.2.8 [December 3, 2004] - Removed projects/visualc7, added projects/visualc71. - -Version 1.2.9beta1 [February 21, 2006] - Initialized some structure members in pngwutil.c to avoid gcc-4.0.0 complaints - Revised man page and libpng.txt to make it clear that one should not call - png_read_end or png_write_end after png_read_png or png_write_png. - Updated references to png-mng-implement mailing list. - Fixed an incorrect typecast in pngrutil.c - Added PNG_NO_READ_SUPPORTED conditional for making a write-only library. - Added PNG_NO_WRITE_INTERLACING_SUPPORTED conditional. - Optimized alpha-inversion loops in pngwtran.c - Moved test for nonzero gamma outside of png_build_gamma_table() in pngrtran.c - Make sure num_trans is <= 256 before copying data in png_set_tRNS(). - Make sure num_palette is <= 256 before copying data in png_set_PLTE(). - Interchanged order of write_swap_alpha and write_invert_alpha transforms. - Added parentheses in the definition of PNG_LIBPNG_BUILD_TYPE (Cosmin). - Optimized zlib window flag (CINFO) in contrib/pngsuite/*.png (Cosmin). - Updated scripts/makefile.bc32 for Borland C++ 5.6 (Cosmin). - Exported png_get_uint_32, png_save_uint_32, png_get_uint_16, png_save_uint_16, - png_get_int_32, png_save_int_32, png_get_uint_31 (Cosmin). - Added type cast (png_byte) in png_write_sCAL() (Cosmin). - Fixed scripts/makefile.cygwin (Christian Biesinger, Cosmin). - Default iTXt support was inadvertently enabled. - -Version 1.2.9beta2 [February 21, 2006] - Check for png_rgb_to_gray and png_gray_to_rgb read transformations before - checking for png_read_dither in pngrtran.c - Revised checking of chromaticity limits to accommodate extended RGB - colorspace (John Denker). - Changed line endings in some of the project files to CRLF, even in the - "Unix" tar distributions (Cosmin). - Made png_get_int_32 and png_save_int_32 always available (Cosmin). - Updated scripts/pngos2.def, scripts/pngw32.def and projects/wince/png32ce.def - with the newly exported functions. - Eliminated distributions without the "configure" script. - Updated INSTALL instructions. - -Version 1.2.9beta3 [February 24, 2006] - Fixed CRCRLF line endings in contrib/visupng/VisualPng.dsp - Made libpng.pc respect EXEC_PREFIX (D. P. Kreil, J. Bowler) - Removed reference to pngasmrd.h from Makefile.am - Renamed CHANGES to ChangeLog. - Renamed LICENSE to COPYING. - Renamed ANNOUNCE to NEWS. - Created AUTHORS file. - -Version 1.2.9beta4 [March 3, 2006] - Changed definition of PKGCONFIG from $prefix/lib to $libdir in configure.ac - Reverted to filenames LICENSE and ANNOUNCE; removed AUTHORS and COPYING. - Removed newline from the end of some error and warning messages. - Removed test for sqrt() from configure.ac and configure. - Made swap tables in pngtrans.c PNG_CONST (Carlo Bramix). - Disabled default iTXt support that was inadvertently enabled in - libpng-1.2.9beta1. - Added "OS2" to list of systems that don't need underscores, in pnggccrd.c - Removed libpng version and date from *.c files. - -Version 1.2.9beta5 [March 4, 2006] - Removed trailing blanks from source files. - Put version and date of latest change in each source file, and changed - copyright year accordingly. - More cleanup of configure.ac, Makefile.am, and associated scripts. - Restored scripts/makefile.elf which was inadvertently deleted. - -Version 1.2.9beta6 [March 6, 2006] - Fixed typo (RELEASE) in configuration files. - -Version 1.2.9beta7 [March 7, 2006] - Removed libpng.vers and libpng.sym from libpng12_la_SOURCES in Makefile.am - Fixed inconsistent #ifdef's around png_sig_bytes() and png_set_sCAL_s() - in png.h. - Updated makefile.elf as suggested by debian. - Made cosmetic changes to some makefiles, adding LN_SF and other macros. - Made some makefiles accept "exec_prefix". - -Version 1.2.9beta8 [March 9, 2006] - Fixed some "#if defined (..." which should be "#if defined(..." - Bug introduced in libpng-1.2.8. - Fixed inconsistency in definition of png_default_read_data() - Restored blank that was lost from makefile.sggcc "clean" target in beta7. - Revised calculation of "current" and "major" for irix in ltmain.sh - Changed "mkdir" to "MKDIR_P" in some makefiles. - Separated PNG_EXPAND and PNG_EXPAND_tRNS. - Added png_set_expand_gray_1_2_4_to_8() and deprecated - png_set_gray_1_2_4_to_8() which also expands tRNS to alpha. - -Version 1.2.9beta9 [March 10, 2006] - Include "config.h" in pngconf.h when available. - Added some checks for NULL png_ptr or NULL info_ptr (timeless) - -Version 1.2.9beta10 [March 20, 2006] - Removed extra CR from contrib/visualpng/VisualPng.dsw (Cosmin) - Made pnggccrd.c PIC-compliant (Christian Aichinger). - Added makefile.mingw (Wolfgang Glas). - Revised pngconf.h MMX checking. - -Version 1.2.9beta11 [March 22, 2006] - Fixed out-of-order declaration in pngwrite.c that was introduced in beta9 - Simplified some makefiles by using LIBSO, LIBSOMAJ, and LIBSOVER macros. - -Version 1.2.9rc1 [March 31, 2006] - Defined PNG_USER_PRIVATEBUILD when including "pngusr.h" (Cosmin). - Removed nonsensical assertion check from pngtest.c (Cosmin). - -Version 1.2.9 [April 14, 2006] - Revised makefile.beos and added "none" selector in ltmain.sh - -Version 1.2.10beta1 [April 15, 2006] - Renamed "config.h" to "png_conf.h" and revised Makefile.am to add - -DPNG_BUILDING_LIBPNG to compile directive, and modified pngconf.h - to include png_conf.h only when PNG_BUILDING_LIBPNG is defined. - -Version 1.2.10beta2 [April 15, 2006] - Manually updated Makefile.in and configure. Changed png_conf.h.in - back to config.h. - -Version 1.2.10beta3 [April 15, 2006] - Change png_conf.h back to config.h in pngconf.h. - -Version 1.2.10beta4 [April 16, 2006] - Change PNG_BUILDING_LIBPNG to PNG_CONFIGURE_LIBPNG in config/Makefile*. - -Version 1.2.10beta5 [April 16, 2006] - Added a configure check for compiling assembler code in pnggccrd.c - -Version 1.2.10beta6 [April 17, 2006] - Revised the configure check for pnggccrd.c - Moved -DPNG_CONFIGURE_LIBPNG into @LIBPNG_DEFINES@ - Added @LIBPNG_DEFINES@ to arguments when building libpng.sym - -Version 1.2.10beta7 [April 18, 2006] - Change "exec_prefix=$prefix" to "exec_prefix=$(prefix)" in makefiles. - -Version 1.2.10rc1 [April 19, 2006] - Ensure pngconf.h doesn't define both PNG_USE_PNGGCCRD and PNG_USE_PNGVCRD - Fixed "LN_FS" typo in makefile.sco and makefile.solaris. - -Version 1.2.10rc2 [April 20, 2006] - Added a backslash between -DPNG_CONFIGURE_LIBPNG and -DPNG_NO_ASSEMBLER_CODE - in configure.ac and configure - Made the configure warning about versioned symbols less arrogant. - -Version 1.2.10rc3 [April 21, 2006] - Added a note in libpng.txt that png_set_sig_bytes(8) can be used when - writing an embedded PNG without the 8-byte signature. - Revised makefiles and configure to avoid making links to libpng.so.* - -Version 1.2.10 [April 23, 2006] - Reverted configure to "rc2" state. - -Version 1.2.11beta1 [May 31, 2006] - scripts/libpng.pc.in contained "configure" style version info and would - not work with makefiles. - The shared-library makefiles were linking to libpng.so.0 instead of - libpng.so.3 compatibility as the library. - -Version 1.2.11beta2 [June 2, 2006] - Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid - buffer overflow. - Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb) - -Version 1.2.11beta3 [June 5, 2006] - Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin). - Removed the accidental leftover Makefile.in~ (Cosmin). - Avoided potential buffer overflow and optimized buffer in - png_write_sCAL(), png_write_sCAL_s() (Cosmin). - Removed the include directories and libraries from CFLAGS and LDFLAGS - in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin). - -Version 1.2.11beta4 [June 6, 2006] - Allow zero-length IDAT chunks after the entire zlib datastream, but not - after another intervening chunk type. - -Version 1.0.19rc1, 1.2.11rc1 [June 13, 2006] - Deleted extraneous square brackets from [config.h] in configure.ac - -Version 1.0.19rc2, 1.2.11rc2 [June 14, 2006] - Added prototypes for PNG_INCH_CONVERSIONS functions to png.h - Revised INSTALL and autogen.sh - Fixed typo in several makefiles (-W1 should be -Wl) - Added typedef for png_int_32 and png_uint_32 on 64-bit systems. - -Version 1.0.19rc3, 1.2.11rc3 [June 15, 2006] - Removed the new typedefs for 64-bit systems (delay until version 1.4.0) - Added one zero element to png_gamma_shift[] array in pngrtran.c to avoid - reading out of bounds. - -Version 1.0.19rc4, 1.2.11rc4 [June 15, 2006] - Really removed the new typedefs for 64-bit systems. - -Version 1.0.19rc5, 1.2.11rc5 [June 22, 2006] - Removed png_sig_bytes entry from scripts/pngw32.def - -Version 1.0.19, 1.2.11 [June 26, 2006] - None. - -Version 1.0.20, 1.2.12 [June 27, 2006] - Really increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid - buffer overflow. - -Version 1.2.13beta1 [October 2, 2006] - Removed AC_FUNC_MALLOC from configure.ac - Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h - Change "logical" to "bitwise" throughout documentation. - Detect and fix attempt to write wrong iCCP profile length (CVE-2006-7244) - -Version 1.0.21, 1.2.13 [November 14, 2006] - Fix potential buffer overflow in sPLT chunk handler. - Fix Makefile.am to not try to link to noexistent files. - Check all exported functions for NULL png_ptr. - -Version 1.2.14beta1 [November 17, 2006] - Relocated three misplaced tests for NULL png_ptr. - Built Makefile.in with automake-1.9.6 instead of 1.9.2. - Build configure with autoconf-2.60 instead of 2.59 - -Version 1.2.14beta2 [November 17, 2006] - Added some typecasts in png_zalloc(). - -Version 1.2.14rc1 [November 20, 2006] - Changed "strtod" to "png_strtod" in pngrutil.c - -Version 1.0.22, 1.2.14 [November 27, 2006] - Added missing "$(srcdir)" in Makefile.am and Makefile.in - -Version 1.2.15beta1 [December 3, 2006] - Generated configure with autoconf-2.61 instead of 2.60 - Revised configure.ac to update libpng.pc and libpng-config. - -Version 1.2.15beta2 [December 3, 2006] - Always export MMX asm functions, just stubs if not building pnggccrd.c - -Version 1.2.15beta3 [December 4, 2006] - Add "png_bytep" typecast to profile while calculating length in pngwutil.c - -Version 1.2.15beta4 [December 7, 2006] - Added scripts/CMakeLists.txt - Changed PNG_NO_ASSEMBLER_CODE to PNG_NO_MMX_CODE in scripts, like 1.4.0beta - -Version 1.2.15beta5 [December 7, 2006] - Changed some instances of PNG_ASSEMBLER_* to PNG_MMX_* in pnggccrd.c - Revised scripts/CMakeLists.txt - -Version 1.2.15beta6 [December 13, 2006] - Revised scripts/CMakeLists.txt and configure.ac - -Version 1.2.15rc1 [December 18, 2006] - Revised scripts/CMakeLists.txt - -Version 1.2.15rc2 [December 21, 2006] - Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers. - Added scripts/makefile.nommx - -Version 1.2.15rc3 [December 25, 2006] - Fixed shared library numbering error that was introduced in 1.2.15beta6. - -Version 1.2.15rc4 [December 27, 2006] - Fixed handling of rgb_to_gray when png_ptr->color.gray isn't set. - -Version 1.2.15rc5 [December 31, 2006] - Revised handling of rgb_to_gray. - -Version 1.2.15 [January 5, 2007] - Added some (unsigned long) typecasts in pngtest.c to avoid printing errors. - -Version 1.2.16beta1 [January 6, 2007] - Fix bugs in makefile.nommx - -Version 1.2.16beta2 [January 16, 2007] - Revised scripts/CMakeLists.txt - -Version 1.2.16 [January 31, 2007] - No changes. - -Version 1.2.17beta1 [March 6, 2007] - Revised scripts/CMakeLists.txt to install both shared and static libraries. - Deleted a redundant line from pngset.c. - -Version 1.2.17beta2 [April 26, 2007] - Relocated misplaced test for png_ptr == NULL in pngpread.c - Change "==" to "&" for testing PNG_RGB_TO_GRAY_ERR & PNG_RGB_TO_GRAY_WARN - flags. - Changed remaining instances of PNG_ASSEMBLER_* to PNG_MMX_* - Added pngerror() when write_IHDR fails in deflateInit2(). - Added "const" to some array declarations. - Mention examples of libpng usage in the libpng*.txt and libpng.3 documents. - -Version 1.2.17rc1 [May 4, 2007] - No changes. - -Version 1.2.17rc2 [May 8, 2007] - Moved several PNG_HAVE_* macros out of PNG_INTERNAL because applications - calling set_unknown_chunk_location() need them. - Changed transformation flag from PNG_EXPAND_tRNS to PNG_EXPAND in - png_set_expand_gray_1_2_4_to_8(). - Added png_ptr->unknown_chunk to hold working unknown chunk data, so it - can be free'ed in case of error. Revised unknown chunk handling in - pngrutil.c and pngpread.c to use this structure. - -Version 1.2.17rc3 [May 8, 2007] - Revised symbol-handling in configure script. - -Version 1.2.17rc4 [May 10, 2007] - Revised unknown chunk handling to avoid storing unknown critical chunks. - -Version 1.0.25 [May 15, 2007] -Version 1.2.17 [May 15, 2007] - Added "png_ptr->num_trans=0" before error return in png_handle_tRNS, - to eliminate a vulnerability (CVE-2007-2445, CERT VU#684664) - -Version 1.0.26 [May 15, 2007] -Version 1.2.18 [May 15, 2007] - Reverted the libpng-1.2.17rc3 change to symbol-handling in configure script - -Version 1.2.19beta1 [May 18, 2007] - Changed "const static" to "static PNG_CONST" everywhere, mostly undoing - change of libpng-1.2.17beta2. Changed other "const" to "PNG_CONST" - Changed some handling of unused parameters, to avoid compiler warnings. - "if (unused == NULL) return;" becomes "unused = unused". - -Version 1.2.19beta2 [May 18, 2007] - Only use the valid bits of tRNS value in png_do_expand() (Brian Cartier) - -Version 1.2.19beta3 [May 19, 2007] - Add some "png_byte" typecasts in png_check_keyword() and write new_key - instead of key in zTXt chunk (Kevin Ryde). - -Version 1.2.19beta4 [May 21, 2007] - Add png_snprintf() function and use it in place of sprint() for improved - defense against buffer overflows. - -Version 1.2.19beta5 [May 21, 2007] - Fixed png_handle_tRNS() to only use the valid bits of tRNS value. - Changed handling of more unused parameters, to avoid compiler warnings. - Removed some PNG_CONST in pngwutil.c to avoid compiler warnings. - -Version 1.2.19beta6 [May 22, 2007] - Added some #ifdef PNG_MMX_CODE_SUPPORTED where needed in pngvcrd.c - Added a special "_MSC_VER" case that defines png_snprintf to _snprintf - -Version 1.2.19beta7 [May 22, 2007] - Squelched png_squelch_warnings() in pnggccrd.c and added - an #ifdef PNG_MMX_CODE_SUPPORTED block around the declarations that caused - the warnings that png_squelch_warnings was squelching. - -Version 1.2.19beta8 [May 22, 2007] - Removed __MMX__ from test in pngconf.h. - -Version 1.2.19beta9 [May 23, 2007] - Made png_squelch_warnings() available via PNG_SQUELCH_WARNINGS macro. - Revised png_squelch_warnings() so it might work. - Updated makefile.sgcc and makefile.solaris; added makefile.solaris-x86. - -Version 1.2.19beta10 [May 24, 2007] - Resquelched png_squelch_warnings(), use "__attribute__((used))" instead. - -Version 1.4.0beta1 [April 20, 2006] - Enabled iTXt support (changes png_struct, thus requires so-number change). - Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED - Eliminated PNG_1_0_X and PNG_1_2_X macros. - Removed deprecated functions png_read_init, png_write_init, png_info_init, - png_permit_empty_plte, png_set_gray_1_2_4_to_8, png_check_sig, and - removed the deprecated macro PNG_MAX_UINT. - Moved "PNG_INTERNAL" parts of png.h and pngconf.h into pngintrn.h - Removed many WIN32_WCE #ifdefs (Cosmin). - Reduced dependency on C-runtime library when on Windows (Simon-Pierre) - Replaced sprintf() with png_sprintf() (Simon-Pierre) - -Version 1.4.0beta2 [April 20, 2006] - Revised makefiles and configure to avoid making links to libpng.so.* - Moved some leftover MMX-related defines from pngconf.h to pngintrn.h - Updated scripts/pngos2.def, pngw32.def, and projects/wince/png32ce.def - -Version 1.4.0beta3 [May 10, 2006] - Updated scripts/pngw32.def to comment out MMX functions. - Added PNG_NO_GET_INT_32 and PNG_NO_SAVE_INT_32 macros. - Scripts/libpng.pc.in contained "configure" style version info and would - not work with makefiles. - Revised pngconf.h and added pngconf.h.in, so makefiles and configure can - pass defines to libpng and applications. - -Version 1.4.0beta4 [May 11, 2006] - Revised configure.ac, Makefile.am, and many of the makefiles to write - their defines in pngconf.h. - -Version 1.4.0beta5 [May 15, 2006] - Added a missing semicolon in Makefile.am and Makefile.in - Deleted extraneous square brackets from configure.ac - -Version 1.4.0beta6 [June 2, 2006] - Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid - buffer overflow. - Changed sonum from 0 to 1. - Removed unused prototype for png_check_sig() from png.h - -Version 1.4.0beta7 [June 16, 2006] - Exported png_write_sig (Cosmin). - Optimized buffer in png_handle_cHRM() (Cosmin). - Set pHYs = 2835 x 2835 pixels per meter, and added - sCAL = 0.352778e-3 x 0.352778e-3 meters, in pngtest.png (Cosmin). - Added png_set_benign_errors(), png_benign_error(), png_chunk_benign_error(). - Added typedef for png_int_32 and png_uint_32 on 64-bit systems. - Added "(unsigned long)" typecast on png_uint_32 variables in printf lists. - -Version 1.4.0beta8 [June 22, 2006] - Added demonstration of user chunk support in pngtest.c, to support the - public sTER chunk and a private vpAg chunk. - -Version 1.4.0beta9 [July 3, 2006] - Removed ordinals from scripts/pngw32.def and removed png_info_int and - png_set_gray_1_2_4_to_8 entries. - Inline call of png_get_uint_32() in png_get_uint_31(). - Use png_get_uint_31() to get vpAg width and height in pngtest.c - Removed WINCE and Netware projects. - Removed standalone Y2KINFO file. - -Version 1.4.0beta10 [July 12, 2006] - Eliminated automatic copy of pngconf.h to pngconf.h.in from configure and - some makefiles, because it was not working reliably. Instead, distribute - pngconf.h.in along with pngconf.h and cause configure and some of the - makefiles to update pngconf.h from pngconf.h.in. - Added pngconf.h to DEPENDENCIES in Makefile.am - -Version 1.4.0beta11 [August 19, 2006] - Removed AC_FUNC_MALLOC from configure.ac. - Added a warning when writing iCCP profile with mismatched profile length. - Patched pnggccrd.c to assemble on x86_64 platforms. - Moved chunk header reading into a separate function png_read_chunk_header() - in pngrutil.c. The chunk header (len+sig) is now serialized in a single - operation (Cosmin). - Implemented support for I/O states. Added png_ptr member io_state, and - functions png_get_io_chunk_name() and png_get_io_state() in pngget.c - (Cosmin). - Added png_get_io_chunk_name and png_get_io_state to scripts/*.def (Cosmin). - Renamed scripts/pngw32.* to scripts/pngwin.* (Cosmin). - Removed the include directories and libraries from CFLAGS and LDFLAGS - in scripts/makefile.gcc (Cosmin). - Used png_save_uint_32() to set vpAg width and height in pngtest.c (Cosmin). - Cast to proper type when getting/setting vpAg units in pngtest.c (Cosmin). - Added pngintrn.h to the Visual C++ projects (Cosmin). - Removed scripts/list (Cosmin). - Updated copyright year in scripts/pngwin.def (Cosmin). - Removed PNG_TYPECAST_NULL and used standard NULL consistently (Cosmin). - Disallowed the user to redefine png_size_t, and enforced a consistent use - of png_size_t across libpng (Cosmin). - Changed the type of png_ptr->rowbytes, PNG_ROWBYTES() and friends - to png_size_t (Cosmin). - Removed png_convert_size() and replaced png_sizeof with sizeof (Cosmin). - Removed some unnecessary type casts (Cosmin). - Changed prototype of png_get_compression_buffer_size() and - png_set_compression_buffer_size() to work with png_size_t instead of - png_uint_32 (Cosmin). - Removed png_memcpy_check() and png_memset_check() (Cosmin). - Fixed a typo (png_byte --> png_bytep) in libpng.3 and libpng.txt (Cosmin). - Clarified that png_zalloc() does not clear the allocated memory, - and png_zalloc() and png_zfree() cannot be PNGAPI (Cosmin). - Renamed png_mem_size_t to png_alloc_size_t, fixed its definition in - pngconf.h, and used it in all memory allocation functions (Cosmin). - Renamed pngintrn.h to pngpriv.h, added a comment at the top of the file - mentioning that the symbols declared in that file are private, and - updated the scripts and the Visual C++ projects accordingly (Cosmin). - Removed circular references between pngconf.h and pngconf.h.in in - scripts/makefile.vc*win32 (Cosmin). - Removing trailing '.' from the warning and error messages (Cosmin). - Added pngdefs.h that is built by makefile or configure, instead of - pngconf.h.in (Glenn). - Detect and fix attempt to write wrong iCCP profile length. - -Version 1.4.0beta12 [October 19, 2006] - Changed "logical" to "bitwise" in the documentation. - Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h - Add a typecast to stifle compiler warning in pngrutil.c - -Version 1.4.0beta13 [November 10, 2006] - Fix potential buffer overflow in sPLT chunk handler. - Fix Makefile.am to not try to link to noexistent files. - -Version 1.4.0beta14 [November 15, 2006] - Check all exported functions for NULL png_ptr. - -Version 1.4.0beta15 [November 17, 2006] - Relocated two misplaced tests for NULL png_ptr. - Built Makefile.in with automake-1.9.6 instead of 1.9.2. - Build configure with autoconf-2.60 instead of 2.59 - Add "install: all" in Makefile.am so "configure; make install" will work. - -Version 1.4.0beta16 [November 17, 2006] - Added a typecast in png_zalloc(). - -Version 1.4.0beta17 [December 4, 2006] - Changed "new_key[79] = '\0';" to "(*new_key)[79] = '\0';" in pngwutil.c - Add "png_bytep" typecast to profile while calculating length in pngwutil.c - -Version 1.4.0beta18 [December 7, 2006] - Added scripts/CMakeLists.txt - -Version 1.4.0beta19 [May 16, 2007] - Revised scripts/CMakeLists.txt - Rebuilt configure and Makefile.in with newer tools. - Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers. - Added scripts/makefile.nommx - -Version 1.4.0beta20 [July 9, 2008] - Moved several PNG_HAVE_* macros from pngpriv.h to png.h because applications - calling set_unknown_chunk_location() need them. - Moved several macro definitions from pngpriv.h to pngconf.h - Merge with changes to the 1.2.X branch, as of 1.2.30beta04. - Deleted all use of the MMX assembler code and Intel-licensed optimizations. - Revised makefile.mingw - -Version 1.4.0beta21 [July 21, 2008] - Moved local array "chunkdata" from pngrutil.c to the png_struct, so - it will be freed by png_read_destroy() in case of a read error (Kurt - Christensen). - -Version 1.4.0beta22 [July 21, 2008] - Change "purpose" and "buffer" to png_ptr->chunkdata to avoid memory leaking. - -Version 1.4.0beta23 [July 22, 2008] - Change "chunkdata = NULL" to "png_ptr->chunkdata = NULL" several places in - png_decompress_chunk(). - -Version 1.4.0beta24 [July 25, 2008] - Change all remaining "chunkdata" to "png_ptr->chunkdata" in - png_decompress_chunk(), and remove "chunkdata" from parameter list. - Put a call to png_check_chunk_name() in png_read_chunk_header(). - Revised png_check_chunk_name() to reject a name with a lowercase 3rd byte. - Removed two calls to png_check_chunk_name() occurring later in the process. - Define PNG_NO_ERROR_NUMBERS by default in pngconf.h - -Version 1.4.0beta25 [July 30, 2008] - Added a call to png_check_chunk_name() in pngpread.c - Reverted png_check_chunk_name() to accept a name with a lowercase 3rd byte. - Added png_push_have_buffer() function to pngpread.c - Eliminated PNG_BIG_ENDIAN_SUPPORTED and associated png_get_* macros. - Made inline expansion of png_get_*() optional with PNG_USE_READ_MACROS. - Eliminated all PNG_USELESS_TESTS and PNG_CORRECT_PALETTE_SUPPORTED code. - Synced contrib directory and configure files with libpng-1.2.30beta06. - Eliminated no-longer-used pngdefs.h (but it's still built in the makefiles) - Relocated a misplaced "#endif /* PNG_NO_WRITE_FILTER */" in pngwutil.c - -Version 1.4.0beta26 [August 4, 2008] - Removed png_push_have_buffer() function in pngpread.c. It increased the - compiled library size slightly. - Changed "-Wall" to "-W -Wall" in the CFLAGS in all makefiles (Cosmin Truta) - Declared png_ptr "volatile" in pngread.c and pngwrite.c to avoid warnings. - Updated contrib/visupng/cexcept.h to version 2.0.1 - Added PNG_LITERAL_CHARACTER macros for #, [, and ]. - -Version 1.4.0beta27 [August 5, 2008] - Revised usage of PNG_LITERAL_SHARP in pngerror.c. - Moved newline character from individual png_debug messages into the - png_debug macros. - Allow user to #define their own png_debug, png_debug1, and png_debug2. - -Version 1.4.0beta28 [August 5, 2008] - Revised usage of PNG_LITERAL_SHARP in pngerror.c. - Added PNG_STRING_NEWLINE macro - -Version 1.4.0beta29 [August 9, 2008] - Revised usage of PNG_STRING_NEWLINE to work on non-ISO compilers. - Added PNG_STRING_COPYRIGHT macro. - Added non-ISO versions of png_debug macros. - -Version 1.4.0beta30 [August 14, 2008] - Added premultiplied alpha feature (Volker Wiendl). - -Version 1.4.0beta31 [August 18, 2008] - Moved png_set_premultiply_alpha from pngtrans.c to pngrtran.c - Removed extra crc check at the end of png_handle_cHRM(). Bug introduced - in libpng-1.4.0beta20. - -Version 1.4.0beta32 [August 19, 2008] - Added PNG_WRITE_FLUSH_SUPPORTED block around new png_flush() call. - Revised PNG_NO_STDIO version of png_write_flush() - -Version 1.4.0beta33 [August 20, 2008] - Added png_get|set_chunk_cache_max() to limit the total number of sPLT, - text, and unknown chunks that can be stored. - -Version 1.4.0beta34 [September 6, 2008] - Shortened tIME_string to 29 bytes in pngtest.c - Fixed off-by-one error introduced in png_push_read_zTXt() function in - libpng-1.2.30beta04/pngpread.c (Harald van Dijk) - -Version 1.4.0beta35 [October 6, 2008] - Changed "trans_values" to "trans_color". - Changed so-number from 0 to 14. Some OS do not like 0. - Revised makefile.darwin to fix shared library numbering. - Change png_set_gray_1_2_4_to_8() to png_set_expand_gray_1_2_4_to_8() - in example.c (debian bug report) - -Version 1.4.0beta36 [October 25, 2008] - Sync with tEXt vulnerability fix in libpng-1.2.33rc02. - -Version 1.4.0beta37 [November 13, 2008] - Added png_check_cHRM in png.c and moved checking from pngget.c, pngrutil.c, - and pngwrite.c - -Version 1.4.0beta38 [November 22, 2008] - Added check for zero-area RGB cHRM triangle in png_check_cHRM() and - png_check_cHRM_fixed(). - -Version 1.4.0beta39 [November 23, 2008] - Revised png_warning() to write its message on standard output by default - when warning_fn is NULL. - -Version 1.4.0beta40 [November 24, 2008] - Eliminated png_check_cHRM(). Instead, always use png_check_cHRM_fixed(). - In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant - check for all-zero coordinates that is detected by the triangle check. - -Version 1.4.0beta41 [November 26, 2008] - Fixed string vs pointer-to-string error in png_check_keyword(). - Rearranged test expressions in png_check_cHRM_fixed() to avoid internal - overflows. - Added PNG_NO_CHECK_cHRM conditional. - -Version 1.4.0beta42, 43 [December 1, 2008] - Merge png_debug with version 1.2.34beta04. - -Version 1.4.0beta44 [December 6, 2008] - Removed redundant check for key==NULL before calling png_check_keyword() - to ensure that new_key gets initialized and removed extra warning - (Merge with version 1.2.34beta05 -- Arvan Pritchard). - -Version 1.4.0beta45 [December 9, 2008] - In png_write_png(), respect the placement of the filler bytes in an earlier - call to png_set_filler() (Jim Barry). - -Version 1.4.0beta46 [December 10, 2008] - Undid previous change and added PNG_TRANSFORM_STRIP_FILLER_BEFORE and - PNG_TRANSFORM_STRIP_FILLER_AFTER conditionals and deprecated - PNG_TRANSFORM_STRIP_FILLER (Jim Barry). - -Version 1.4.0beta47 [December 15, 2008] - Support for dithering was disabled by default, because it has never - been well tested and doesn't work very well. The code has not - been removed, however, and can be enabled by building libpng with - PNG_READ_DITHER_SUPPORTED defined. - -Version 1.4.0beta48 [February 14, 2009] - Added new exported function png_calloc(). - Combined several instances of png_malloc(); png_memset() into png_calloc(). - Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24 - but was never defined. - -Version 1.4.0beta49 [February 28, 2009] - Added png_fileno() macro to pngconf.h, used in pngwio.c - Corrected order of #ifdef's in png_debug definition in png.h - Fixed bug introduced in libpng-1.4.0beta48 with the memset arguments - for pcal_params. - Fixed order of #ifdef directives in the png_debug defines in png.h - (bug introduced in libpng-1.2.34/1.4.0beta29). - Revised comments in png_set_read_fn() and png_set_write_fn(). - -Version 1.4.0beta50 [March 18, 2009] - Use png_calloc() instead of png_malloc() to allocate big_row_buf when - reading an interlaced file, to avoid a possible UMR. - Undid revision of PNG_NO_STDIO version of png_write_flush(). Users - having trouble with fflush() can build with PNG_NO_WRITE_FLUSH defined - or supply their own flush_fn() replacement. - Revised libpng*.txt and png.h documentation about use of png_write_flush() - and png_set_write_fn(). - Removed fflush() from pngtest.c. - Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h - -Version 1.4.0beta51 [March 21, 2009] - Removed new png_fileno() macro from pngconf.h . - -Version 1.4.0beta52 [March 27, 2009] - Relocated png_do_chop() ahead of building gamma tables in pngrtran.c - This avoids building 16-bit gamma tables unnecessarily. - Removed fflush() from pngtest.c. - Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h - Added a section on differences between 1.0.x and 1.2.x to libpng.3/libpng.txt - -Version 1.4.0beta53 [April 1, 2009] - Removed some remaining MMX macros from pngpriv.h - Fixed potential memory leak of "new_name" in png_write_iCCP() (Ralph Giles) - -Version 1.4.0beta54 [April 13, 2009] - Added "ifndef PNG_SKIP_SETJMP_CHECK" block in pngconf.h to allow - application code writers to bypass the check for multiple inclusion - of setjmp.h when they know that it is safe to ignore the situation. - Eliminated internal use of setjmp() in pngread.c and pngwrite.c - Reordered ancillary chunks in pngtest.png to be the same as what - pngtest now produces, and made some cosmetic changes to pngtest output. - Eliminated deprecated png_read_init_3() and png_write_init_3() functions. - -Version 1.4.0beta55 [April 15, 2009] - Simplified error handling in pngread.c and pngwrite.c by putting - the new png_read_cleanup() and png_write_cleanup() functions inline. - -Version 1.4.0beta56 [April 25, 2009] - Renamed "user_chunk_data" to "my_user_chunk_data" in pngtest.c to suppress - "shadowed declaration" warning from gcc-4.3.3. - Renamed "gamma" to "png_gamma" in pngset.c to avoid "shadowed declaration" - warning about a global "gamma" variable in math.h on some platforms. - -Version 1.4.0beta57 [May 2, 2009] - Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24 - but was never defined (again). - Rebuilt configure scripts with autoconf-2.63 instead of 2.62 - Removed pngprefs.h and MMX from makefiles - -Version 1.4.0beta58 [May 14, 2009] - Changed pngw32.def to pngwin.def in makefile.mingw (typo was introduced - in beta57). - Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri) - -Version 1.4.0beta59 [May 15, 2009] - Reformated sources in libpng style (3-space intentation, comment format) - Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG) - Added sections about the git repository and our coding style to the - documentation - Relocated misplaced #endif in pngwrite.c, sCAL chunk handler. - -Version 1.4.0beta60 [May 19, 2009] - Conditionally compile png_read_finish_row() which is not used by - progressive readers. - Added contrib/pngminim/preader to demonstrate building minimal progressive - decoder, based on contrib/gregbook with embedded libpng and zlib. - -Version 1.4.0beta61 [May 20, 2009] - In contrib/pngminim/*, renamed "makefile.std" to "makefile", since there - is only one makefile in those directories, and revised the README files - accordingly. - More reformatting of comments, mostly to capitalize sentences. - -Version 1.4.0beta62 [June 2, 2009] - Added "#define PNG_NO_WRITE_SWAP" to contrib/pngminim/encoder/pngusr.h - and "define PNG_NO_READ_SWAP" to decoder/pngusr.h and preader/pngusr.h - Reformatted several remaining "else statement" into two lines. - Added a section to the libpng documentation about using png_get_io_ptr() - in configure scripts to detect the presence of libpng. - -Version 1.4.0beta63 [June 15, 2009] - Revised libpng*.txt and libpng.3 to mention calling png_set_IHDR() - multiple times and to specify the sample order in the tRNS chunk, - because the ISO PNG specification has a typo in the tRNS table. - Changed several PNG_UNKNOWN_CHUNK_SUPPORTED to - PNG_HANDLE_AS_UNKNOWN_SUPPORTED, to make the png_set_keep mechanism - available for ignoring known chunks even when not saving unknown chunks. - Adopted preference for consistent use of "#ifdef" and "#ifndef" versus - "#if defined()" and "if !defined()" where possible. - -Version 1.4.0beta64 [June 24, 2009] - Eliminated PNG_LEGACY_SUPPORTED code. - Moved the various unknown chunk macro definitions outside of the - PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks. - -Version 1.4.0beta65 [June 26, 2009] - Added a reference to the libpng license in each file. - -Version 1.4.0beta66 [June 27, 2009] - Refer to the libpng license instead of the libpng license in each file. - -Version 1.4.0beta67 [July 6, 2009] - Relocated INVERT_ALPHA within png_read_png() and png_write_png(). - Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB. - Added an "xcode" project to the projects directory (Alam Arias). - -Version 1.4.0beta68 [July 19, 2009] - Avoid some tests in filter selection in pngwutil.c - -Version 1.4.0beta69 [July 25, 2009] - Simplified the new filter-selection test. This runs faster in the - common "PNG_ALL_FILTERS" and PNG_FILTER_NONE cases. - Removed extraneous declaration from the new call to png_read_gray_to_rgb() - (bug introduced in libpng-1.4.0beta67). - Fixed up xcode project (Alam Arias) - Added a prototype for png_64bit_product() in png.c - -Version 1.4.0beta70 [July 27, 2009] - Avoid a possible NULL dereference in debug build, in png_set_text_2(). - (bug introduced in libpng-0.95, discovered by Evan Rouault) - -Version 1.4.0beta71 [July 29, 2009] - Rebuilt configure scripts with autoconf-2.64. - -Version 1.4.0beta72 [August 1, 2009] - Replaced *.tar.lzma with *.tar.xz in distribution. Get the xz codec - from . - -Version 1.4.0beta73 [August 1, 2009] - Reject attempt to write iCCP chunk with negative embedded profile length - (JD Chen) (CVE-2009-5063). - -Version 1.4.0beta74 [August 8, 2009] - Changed png_ptr and info_ptr member "trans" to "trans_alpha". - -Version 1.4.0beta75 [August 21, 2009] - Removed an extra png_debug() recently added to png_write_find_filter(). - Fixed incorrect #ifdef in pngset.c regarding unknown chunk support. - -Version 1.4.0beta76 [August 22, 2009] - Moved an incorrectly located test in png_read_row() in pngread.c - -Version 1.4.0beta77 [August 27, 2009] - Removed lpXYZ.tar.bz2 (with CRLF), KNOWNBUG, libpng-x.y.z-KNOWNBUG.txt, - and the "noconfig" files from the distribution. - Moved CMakeLists.txt from scripts into the main libpng directory. - Various bugfixes and improvements to CMakeLists.txt (Philip Lowman) - -Version 1.4.0beta78 [August 31, 2009] - Converted all PNG_NO_* tests to PNG_*_SUPPORTED everywhere except pngconf.h - Eliminated PNG_NO_FREE_ME and PNG_FREE_ME_SUPPORTED macros. - Use png_malloc plus a loop instead of png_calloc() to initialize - row_pointers in png_read_png(). - -Version 1.4.0beta79 [September 1, 2009] - Eliminated PNG_GLOBAL_ARRAYS and PNG_LOCAL_ARRAYS; always use local arrays. - Eliminated PNG_CALLOC_SUPPORTED macro and always provide png_calloc(). - -Version 1.4.0beta80 [September 17, 2009] - Removed scripts/libpng.icc - Changed typecast of filler from png_byte to png_uint_16 in png_set_filler(). - (Dennis Gustafsson) - Fixed typo introduced in beta78 in pngtest.c ("#if def " should be "#ifdef ") - -Version 1.4.0beta81 [September 23, 2009] - Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h - Expanded TAB characters in pngrtran.c - Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid - compiler complaints about doubly declaring things "const". - Changed all "#if [!]defined(X)" to "if[n]def X" where possible. - Eliminated unused png_ptr->row_buf_size - -Version 1.4.0beta82 [September 25, 2009] - Moved redundant IHDR checking into new png_check_IHDR() in png.c - and report all errors found in the IHDR data. - Eliminated useless call to png_check_cHRM() from pngset.c - -Version 1.4.0beta83 [September 25, 2009] - Revised png_check_IHDR() to eliminate bogus complaint about filter_type. - -Version 1.4.0beta84 [September 30, 2009] - Fixed some inconsistent indentation in pngconf.h - Revised png_check_IHDR() to add a test for width variable less than 32-bit. - -Version 1.4.0beta85 [October 1, 2009] - Revised png_check_IHDR() again, to check info_ptr members instead of - the contents of the returned parameters. - -Version 1.4.0beta86 [October 9, 2009] - Updated the "xcode" project (Alam Arias). - Eliminated a shadowed declaration of "pp" in png_handle_sPLT(). - -Version 1.4.0rc01 [October 19, 2009] - Trivial cosmetic changes. - -Version 1.4.0beta87 [October 30, 2009] - Moved version 1.4.0 back into beta. - -Version 1.4.0beta88 [October 30, 2009] - Revised libpng*.txt section about differences between 1.2.x and 1.4.0 - because most of the new features have now been ported back to 1.2.41 - -Version 1.4.0beta89 [November 1, 2009] - More bugfixes and improvements to CMakeLists.txt (Philip Lowman) - Removed a harmless extra png_set_invert_alpha() from pngwrite.c - Apply png_user_chunk_cache_max within png_decompress_chunk(). - Merged libpng-1.2.41.txt with libpng-1.4.0.txt where appropriate. - -Version 1.4.0beta90 [November 2, 2009] - Removed all remaining WIN32_WCE #ifdefs except those involving the - time.h "tm" structure - -Version 1.4.0beta91 [November 3, 2009] - Updated scripts/pngw32.def and projects/wince/png32ce.def - Copied projects/wince/png32ce.def to the scripts directory. - Added scripts/makefile.wce - Patched ltmain.sh for wince support. - Added PNG_CONVERT_tIME_SUPPORTED macro. - -Version 1.4.0beta92 [November 4, 2009] - Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED - Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED - Revised libpng*.txt to describe differences from 1.2.40 to 1.4.0 (instead - of differences from 1.2.41 to 1.4.0) - -Version 1.4.0beta93 [November 7, 2009] - Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and - PNG_ALLOCATED macros to detect deprecated direct access to the - png_struct or info_struct members and other deprecated usage in - applications (John Bowler). - Updated scripts/makefile* to add "-DPNG_CONFIGURE_LIBPNG" to CFLAGS, - to prevent warnings about direct access to png structs by libpng - functions while building libpng. They need to be tested, especially - those using compilers other than gcc. - Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG". - They should work but still need to be updated to remove - references to pnggccrd.c or pngvcrd.c and ASM building. - Added README.txt to the beos, cbuilder5, netware, and xcode projects warning - that they need to be updated, to remove references to pnggccrd.c and - pngvcrd.c and to depend on pngpriv.h - Removed three direct references to read_info_ptr members in pngtest.c - that were detected by the new PNG_DEPSTRUCT macro. - Moved the png_debug macro definitions and the png_read_destroy(), - png_write_destroy() and png_far_to_near() prototypes from png.h - to pngpriv.h (John Bowler) - Moved the synopsis lines for png_read_destroy(), png_write_destroy() - png_debug(), png_debug1(), and png_debug2() from libpng.3 to libpngpf.3. - -Version 1.4.0beta94 [November 9, 2009] - Removed the obsolete, unused pnggccrd.c and pngvcrd.c files. - Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions. - Removed dependency of pngtest.o on pngpriv.h in the makefiles. - Only #define PNG_DEPSTRUCT, etc. in pngconf.h if not already defined. - -Version 1.4.0beta95 [November 10, 2009] - Changed png_check_sig() to !png_sig_cmp() in contrib programs. - Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile - Changed png_check_sig() to !png_sig_cmp() in contrib programs. - Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c - Changed pngminim/*/gather.sh to stop trying to remove pnggccrd.c and pngvcrd.c - Added dependency on pngpriv.h in contrib/pngminim/*/makefile - -Version 1.4.0beta96 [November 12, 2009] - Renamed scripts/makefile.wce to scripts/makefile.cegcc - Revised Makefile.am to use libpng.sys while building libpng.so - so that only PNG_EXPORT functions are exported. - Removed the deprecated png_check_sig() function/macro. - Removed recently removed function names from scripts/*.def - Revised pngtest.png to put chunks in the same order written by pngtest - (evidently the same change made in libpng-1.0beta54 was lost). - Added PNG_PRIVATE macro definition in pngconf.h for possible future use. - -Version 1.4.0beta97 [November 13, 2009] - Restored pngtest.png to the libpng-1.4.0beta7 version. - Removed projects/beos and netware.txt; no one seems to be supporting them. - Revised Makefile.in - -Version 1.4.0beta98 [November 13, 2009] - Added the "xcode" project to zip distributions, - Fixed a typo in scripts/pngwin.def introduced in beta97. - -Version 1.4.0beta99 [November 14, 2009] - Moved libpng-config.in and libpng.pc-configure.in out of the scripts - directory, to libpng-config.in and libpng-pc.in, respectively, and - modified Makefile.am and configure.ac accordingly. Now "configure" - needs nothing from the "scripts" directory. - Avoid redefining PNG_CONST in pngconf.h - -Version 1.4.0beta100 [November 14, 2009] - Removed ASM builds from projects/visualc6 and projects/visualc71 - Removed scripts/makefile.nommx and makefile.vcawin32 - Revised CMakeLists.txt to account for new location of libpng-config.in - and libpng-pc.in - Updated INSTALL to reflect removal and relocation of files. - -Version 1.4.0beta101 [November 14, 2009] - Restored the binary files (*.jpg, *.png, some project files) that were - accidentally deleted from the zip and 7z distributions when the xcode - project was added. - -Version 1.4.0beta102 [November 18, 2009] - Added libpng-config.in and libpng-pc.in to the zip and 7z distributions. - Fixed a typo in projects/visualc6/pngtest.dsp, introduced in beta100. - Moved descriptions of makefiles and other scripts out of INSTALL into - scripts/README.txt - Updated the copyright year in scripts/pngwin.rc from 2006 to 2009. - -Version 1.4.0beta103 [November 21, 2009] - Removed obsolete comments about ASM from projects/visualc71/README_zlib.txt - Align row_buf on 16-byte boundary in memory. - Restored the PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED guard around the call - to png_flush() after png_write_IEND(). See 1.4.0beta32, 1.4.0beta50 - changes above and 1.2.30, 1.2.30rc01 and rc03 in 1.2.41 CHANGES. Someone - needs this feature. - Make the 'png_jmpbuf' macro expand to a call that records the correct - longjmp function as well as returning a pointer to the setjmp - jmp_buf buffer, and marked direct access to jmpbuf 'deprecated'. - (John Bowler) - -Version 1.4.0beta104 [November 22, 2009] - Removed png_longjmp_ptr from scripts/*.def and libpng.3 - Rebuilt configure scripts with autoconf-2.65 - -Version 1.4.0beta105 [November 25, 2009] - Use fast integer PNG_DIVIDE_BY_255() or PNG_DIVIDE_BY_65535() - to accomplish alpha premultiplication when - PNG_READ_COMPOSITE_NODIV_SUPPORTED is defined. - Changed "/255" to "/255.0" in background calculations to make it clear - that the 255 is used as a double. - -Version 1.4.0beta106 [November 27, 2009] - Removed premultiplied alpha feature. - -Version 1.4.0beta107 [December 4, 2009] - Updated README - Added "#define PNG_NO_PEDANTIC_WARNINGS" in the libpng source files. - Removed "-DPNG_CONFIGURE_LIBPNG" from the makefiles and projects. - Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco - to put png.h and pngconf.h in $prefix/include, like the other scripts, - instead of in $prefix/include/libpng. Also revised makefile.sco - to put them in $prefix/include/libpng15 instead of in - $prefix/include/libpng/libpng15. - -Version 1.4.0beta108 [December 11, 2009] - Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile - Relocated png_do_chop() to its original position in pngrtran.c; the - change in version 1.2.41beta08 caused transparency to be handled wrong - in some 16-bit datastreams (Yusaku Sugai). - -Version 1.4.0beta109 [December 13, 2009] - Added "bit_depth" parameter to the private png_build_gamma_table() function. - Pass bit_depth=8 to png_build_gamma_table() when bit_depth is 16 but the - PNG_16_TO_8 transform has been set, to avoid unnecessary build of 16-bit - tables. - -Version 1.4.0rc02 [December 20, 2009] - Declared png_cleanup_needed "volatile" in pngread.c and pngwrite.c - -Version 1.4.0rc03 [December 22, 2009] - Renamed libpng-pc.in back to libpng.pc.in and revised CMakeLists.txt - (revising the change in 1.4.0beta99) - -Version 1.4.0rc04 [December 25, 2009] - Swapped PNG_UNKNOWN_CHUNKS_SUPPORTED and PNG_HANDLE_AS_UNKNOWN_SUPPORTED - in pngset.c to be consistent with other changes in version 1.2.38. - -Version 1.4.0rc05 [December 25, 2009] - Changed "libpng-pc.in" to "libpng.pc.in" in configure.ac, configure, and - Makefile.in to be consistent with changes in libpng-1.4.0rc03 - -Version 1.4.0rc06 [December 29, 2009] - Reverted the gamma_table changes from libpng-1.4.0beta109. - Fixed some indentation errors. - -Version 1.4.0rc07 [January 1, 2010] - Revised libpng*.txt and libpng.3 about 1.2.x->1.4.x differences. - Use png_calloc() instead of png_malloc(); png_memset() in pngrutil.c - Update copyright year to 2010. - -Version 1.4.0rc08 [January 2, 2010] - Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr - in pngtest.c - -Version 1.4.0 [January 3, 2010] - No changes. - -Version 1.4.1beta01 [January 8, 2010] - Updated CMakeLists.txt for consistent indentation and to avoid an - unclosed if-statement warning (Philip Lowman). - Revised Makefile.am and Makefile.in to remove references to Y2KINFO, - KNOWNBUG, and libpng.la (Robert Schwebel). - Revised the makefiles to install the same files and symbolic - links as configure, except for libpng.la and libpng14.la. - Make png_set|get_compression_buffer_size() available even when - PNG_WRITE_SUPPORTED is not enabled. - Revised Makefile.am and Makefile.in to simplify their maintenance. - Revised scripts/makefile.linux to install a link to libpng14.so.14.1 - -Version 1.4.1beta02 [January 9, 2010] - Revised the rest of the makefiles to install a link to libpng14.so.14.1 - -Version 1.4.1beta03 [January 10, 2010] - Removed png_set_premultiply_alpha() from scripts/*.def - -Version 1.4.1rc01 [January 16, 2010] - No changes. - -Version 1.4.1beta04 [January 23, 2010] - Revised png_decompress_chunk() to improve speed and memory usage when - decoding large chunks. - Added png_set|get_chunk_malloc_max() functions. - -Version 1.4.1beta05 [January 26, 2010] - Relocated "int k" declaration in pngtest.c to minimize its scope. - -Version 1.4.1beta06 [January 28, 2010] - Revised png_decompress_chunk() to use a two-pass method suggested by - John Bowler. - -Version 1.4.1beta07 [February 6, 2010] - Folded some long lines in the source files. - Added defineable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX, - and a PNG_USER_LIMITS_SUPPORTED flag. - Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as - png_ptr->png_user_chunk_malloc_max. - Revised png_push_save_buffer() to do fewer but larger png_malloc() calls. - -Version 1.4.1beta08 [February 6, 2010] - Minor cleanup and updating of dates and copyright year. - -Version 1.5.0beta01 [February 7, 2010] - Moved declaration of png_struct into private pngstruct.h and png_info - into pnginfo.h - -Version 1.4.1beta09 and 1.5.0beta02 [February 7, 2010] - Reverted to original png_push_save_buffer() code. - -Version 1.4.1beta10 and 1.5.0beta03 [February 8, 2010] - Return allocated "old_buffer" in png_push_save_buffer() before - calling png_error(), to avoid a potential memory leak. - Updated configure script to use SO number 15. - -Version 1.5.0beta04 [February 9, 2010] - Removed malformed "incomplete struct declaration" of png_info from png.h - -Version 1.5.0beta05 [February 12, 2010] - Removed PNG_DEPSTRUCT markup in pngstruct.h and pnginfo.h, and undid the - linewrapping that it entailed. - Revised comments in pngstruct.h and pnginfo.h and added pointers to - the libpng license. - Changed PNG_INTERNAL to PNG_EXPOSE_INTERNAL_STRUCTURES - Removed the cbuilder5 project, which has not been updated to 1.4.0. - -Version 1.4.1beta12 and 1.5.0beta06 [February 14, 2010] - Fixed type declaration of png_get_chunk_malloc_max() in pngget.c (Daisuke - Nishikawa) - -Version 1.5.0beta07 [omitted] - -Version 1.5.0beta08 [February 19, 2010] - Changed #ifdef PNG_NO_STDIO_SUPPORTED to #ifdef PNG_NO_CONSOLE_IO_SUPPORTED - wherever png_snprintf() is used to construct error and warning messages. - Noted in scripts/makefile.mingw that it expects to be run under MSYS. - Removed obsolete unused MMX-querying support from contrib/gregbook - Added exported png_longjmp() function. - Removed the AIX redefinition of jmpbuf in png.h - Added -D_ALLSOURCE in configure.ac, makefile.aix, and CMakeLists.txt - when building on AIX. - -Version 1.5.0beta09 [February 19, 2010] - Removed -D_ALLSOURCE from configure.ac, makefile.aix, and CMakeLists.txt. - Changed the name of png_ptr->jmpbuf to png_ptr->png_jmpbuf in pngstruct.h - -Version 1.5.0beta10 [February 25, 2010] - Removed unused gzio.c from contrib/pngminim gather and makefile scripts - Removed replacement error handlers from contrib/gregbook. Because of - the new png_longjmp() function they are no longer needed. - -Version 1.5.0beta11 [March 6, 2010] - Removed checking for already-included setjmp.h from pngconf.h - Fixed inconsistent indentations and made numerous cosmetic changes. - Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5 - -Version 1.5.0beta12 [March 9, 2010] - Moved "#include png.h" inside pngpriv.h and removed "#include png.h" from - the source files, along with "#define PNG_EXPOSE_INTERNAL_STRUCTURES" - and "#define PNG_NO_PEDANTIC_WARNINGS" (John Bowler). - Created new pngdebug.h and moved debug definitions there. - -Version 1.5.0beta13 [March 10, 2010] - Protect pngstruct.h, pnginfo.h, and pngdebug.h from being included twice. - Revise the "#ifdef" blocks in png_inflate() so it will compile when neither - PNG_USER_CHUNK_MALLOC_MAX nor PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED - is defined. - Removed unused png_measure_compressed_chunk() from pngpriv.h and libpngpf.3 - Moved the 'config.h' support from pngconf.h to pngpriv.h - Removed PNGAPI from the png_longjmp_ptr typedef. - Eliminated dependence of pngtest.c on the private pngdebug.h file. - Make all png_debug macros into *unterminated* statements or - expressions (i.e. a trailing ';' must always be added) and correct - the format statements in various png_debug messages. - -Version 1.5.0beta14 [March 14, 2010] - Removed direct access to png_ptr->io_ptr from the Windows code in pngtest.c - Revised Makefile.am to account for recent additions and replacements. - Corrected CE and OS/2 DEF files (scripts/png*def) for symbols removed and - added ordinal numbers to the Windows DEF file and corrected the duplicated - ordinal numbers on CE symbols that are commented out. - Added back in export symbols that can be present in the Windows build but - are disabled by default. - PNG_EXPORT changed to include an 'ordinal' field for DEF file generation. - PNG_CALLBACK added to make callback definitions uniform. PNGAPI split - into PNGCAPI (base C form), PNGAPI (exports) and PNGCBAPI (callbacks), - and appropriate changes made to all files. Cygwin builds re-hinged to - allow procedure call standard changes and to remove the need for the DEF - file (fixes build on Cygwin). - Enabled 'attribute' warnings that are relevant to library APIs and callbacks. - Changed rules for generation of the various symbol files and added a new - rule for a DEF file (which is also added to the distribution). - Updated the symbol file generation to stop it adding spurious spaces - to EOL (coming from preprocessor macro expansion). Added a facility - to join tokens in the output and rewrite *.dfn to use this. - Eliminated scripts/*.def in favor of libpng.def; updated projects/visualc71 - and removed scripts/makefile.cygwin. - Made PNG_BUILD_DLL safe: it can be set whenever a DLL is being built. - Removed the include of sys/types.h - apparently unnecessary now on the - platforms on which it happened (all but Mac OS and RISC OS). - Moved the Mac OS test into pngpriv.h (the only place it is used.) - -Version 1.5.0beta15 [March 17, 2010] - Added symbols.chk target to Makefile.am to validate the symbols in png.h - against the new DEF file scripts/symbols.def. - Changed the default DEF file back to pngwin.def. - Removed makefile.mingw. - Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN - -Version 1.5.0beta16 [April 1, 2010] - Make png_text_struct independent of PNG_iTXt_SUPPORTED, so that - fields are initialized in all configurations. The READ/WRITE - macros (PNG_(READ|WRITE)_iTXt_SUPPORTED) still function as - before to disable code to actually read or write iTXt chunks - and iTXt_SUPPORTED can be used to detect presence of either - read or write support (but it is probably better to check for - the one actually required - read or write.) - Combined multiple png_warning() calls for a single error. - Restored the macro definition of png_check_sig(). - -Version 1.5.0beta17 [April 17, 2010] - Added some "(long)" typecasts to printf calls in png_handle_cHRM(). - Documented the fact that png_set_dither() was disabled since libpng-1.4.0. - Reenabled png_set_dither() but renamed it to png_set_quantize() to reflect - more accurately what it actually does. At the same time, renamed - the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros to - PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS. - Added some "(long)" typecasts to printf calls in png_handle_cHRM(). - Freeze build-time only configuration in the build. - In all prior versions of libpng most configuration options - controlled by compiler #defines had to be repeated by the - application code that used libpng. This patch changes this - so that compilation options that can only be changed at build - time are frozen in the build. Options that are compiler - dependent (and those that are system dependent) are evaluated - each time - pngconf.h holds these. Options that can be changed - per-file in the application are in png.h. Frozen options are - in the new installed header file pnglibconf.h (John Bowler) - Removed the xcode project because it has not been updated to work - with libpng-1.5.0. - Removed the ability to include optional pngusr.h - -Version 1.5.0beta18 [April 17, 2010] - Restored the ability to include optional pngusr.h - Moved replacements for png_error() and png_warning() from the - contrib/pngminim project to pngerror.c, for use when warnings or - errors are disabled via PNG_NO_WARN or PNG_NO_ERROR_TEXT, to avoid - storing unneeded error/warning text. - Updated contrib/pngminim project to work with the new pnglibconf.h - Added some PNG_NO_* defines to contrib/pngminim/*/pngusr.h to save space. - -Version 1.5.0beta19 [April 24, 2010] - Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the functions - to read and write ints to be disabled independently of PNG_USE_READ_MACROS, - which allows libpng to be built with the functions even though the default - is to use the macros - this allows applications to choose at app build - time whether or not to use macros (previously impossible because the - functions weren't in the default build.) - Changed Windows calling convention back to __cdecl for API functions. - For Windows/x86 platforms only: - __stdcall is no longer needed for Visual Basic, so libpng-1.5.0 uses - __cdecl throughout (both API functions and callbacks) on Windows/x86 - platforms. - Replaced visualc6 and visualc71 projects with new vstudio project - Relaxed the overly-restrictive permissions of some files. - -Version 1.5.0beta20 [April 24, 2010] - Relaxed more overly-restrictive permissions of some files. - -Version 1.5.0beta21 [April 27, 2010] - Removed some unwanted binary bytes and changed CRLF to NEWLINE in the new - vstudio project files, and some trivial editing of some files in the - scripts directory. - Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in - contrib/pngminim/decoder/pngusr.h to make a smaller decoder application. - -Version 1.5.0beta22 [April 28, 2010] - Fixed dependencies of GET_INT_32 - it does not require READ_INT_FUNCTIONS - because it has a macro equivalent. - Improved the options.awk script; added an "everything off" option. - Revised contrib/pngminim to use the "everything off" option in pngusr.dfa. - -Version 1.5.0beta23 [April 29, 2010] - Corrected PNG_REMOVED macro to take five arguments. - The macro was documented with two arguments (name,ordinal), however - the symbol checking .dfn files assumed five arguments. The five - argument form seems more useful so it is changed to that. - Corrected PNG_UNKNOWN_CHUNKS_SUPPORTED to PNG_HANDLE_AS_UNKNOWN_SUPPORTED - in gregbook/readpng2.c - Corrected protection of png_get_user_transform_ptr. The API declaration in - png.h is removed if both READ and WRITE USER_TRANSFORM are turned off - but was left defined in pngtrans.c - Added logunsupported=1 to cause pnglibconf.h to document disabled options. - This makes the installed pnglibconf.h more readable but causes no - other change. The intention is that users of libpng will find it - easier to understand if an API they need is missing. - Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined. - Removed dummy_inflate.c from contrib/pngminim/encoder - Removed contrib/pngminim/*/gather.sh; gathering is now done in the makefile. - -Version 1.5.0beta24 [May 7, 2010] - Use bitwise "&" instead of arithmetic mod in pngrutil.c calculation of the - offset of the png_ptr->rowbuf pointer into png_ptr->big_row_buf. - Added more blank lines for readability. - -Version 1.5.0beta25 [June 18, 2010] - In pngpread.c: png_push_have_row() add check for new_row > height - Removed the now-redundant check for out-of-bounds new_row from example.c - -Version 1.5.0beta26 [June 18, 2010] - In pngpread.c: png_push_process_row() add check for too many rows. - -Version 1.5.0beta27 [June 18, 2010] - Removed the check added in beta25 as it is now redundant. - -Version 1.5.0beta28 [June 20, 2010] - Rewrote png_process_IDAT_data to consistently treat extra data as warnings - and handle end conditions more cleanly. - Removed the new (beta26) check in png_push_process_row(). - -Version 1.5.0beta29 [June 21, 2010] - Revised scripts/options.awk to work on Sunos (but still doesn't work) - Added comment to options.awk and contrib/pngminim/*/makefile to try nawk. - -Version 1.5.0beta30 [June 22, 2010] - Stop memory leak when reading a malformed sCAL chunk. - -Version 1.5.0beta31 [June 26, 2010] - Revised pngpread.c patch of beta28 to avoid an endless loop. - Removed some trailing blanks. - -Version 1.5.0beta32 [June 26, 2010] - Removed leftover scripts/options.patch and scripts/options.rej - -Version 1.5.0beta33 [July 6, 3010] - Made FIXED and FLOATING options consistent in the APIs they enable and - disable. Corrected scripts/options.awk to handle both command line - options and options specified in the .dfa files. - Changed char *msg to PNG_CONST char *msg in pngrutil.c - Make png_set_sRGB_gAMA_and_cHRM set values using either the fixed or - floating point APIs, but not both. - Reversed patch to remove error handler when the jmp_buf is stored in the - main program structure, not the png_struct. - The error handler is needed because the default handler in libpng will - always use the jmp_buf in the library control structure; this is never - set. The gregbook code is a useful example because, even though it - uses setjmp/longjmp, it shows how error handling can be implemented - using control mechanisms not directly supported by libpng. The - technique will work correctly with mechanisms such as Microsoft - Structure Exceptions or C++ exceptions (compiler willing - note that gcc - does not by default support interworking of C and C++ error handling.) - Reverted changes to call png_longjmp in contrib/gregbook where it is not - appropriate. If mainprog->jmpbuf is used by setjmp, then png_longjmp - cannot be used. - Changed "extern PNG_EXPORT" to "PNG_EXPORT" in png.h (Jan Nijtmans) - Changed "extern" to "PNG_EXTERN" in pngpriv.h (except for the 'extern "C" {') - -Version 1.5.0beta34 [July 12, 2010] - Put #ifndef PNG_EXTERN, #endif around the define PNG_EXTERN in pngpriv.h - -Version 1.5.0beta35 [July 24, 2010] - Removed some newly-added TAB characters. - Added -DNO_PNG_SNPRINTF to CFLAGS in scripts/makefile.dj2 - Moved the definition of png_snprintf() outside of the enclosing - #ifdef blocks in pngconf.h - -Version 1.5.0beta36 [July 29, 2010] - Patches by John Bowler: - Fixed point APIs are now supported throughout (no missing APIs). - Internal fixed point arithmetic support exists for all internal floating - point operations. - sCAL validates the floating point strings it is passed. - Safe, albeit rudimentary, Watcom support is provided by PNG_API_RULE==2 - Two new APIs exist to get the number of passes without turning on the - PNG_INTERLACE transform and to get the number of rows in the current - pass. - A new test program, pngvalid.c, validates the gamma code. - Errors in the 16-bit gamma correction (overflows) have been corrected. - cHRM chunk testing is done consistently (previously the floating point - API bypassed it, because the test really didn't work on FP, now the test - is performed on the actual values to be stored in the PNG file so it - works in the FP case too.) - Most floating point APIs now simply call the fixed point APIs after - converting the values to the fixed point form used in the PNG file. - The standard headers no longer include zlib.h, which is currently only - required for pngstruct.h and can therefore be internal. - Revised png_get_int_32 to undo the PNG two's complement representation of - negative numbers. - -Version 1.5.0beta37 [July 30, 2010] - Added a typecast in png_get_int_32() in png.h and pngrutil.h to avoid - a compiler warning. - Replaced oFFs 0,0 with oFFs -10,20 in pngtest.png - -Version 1.5.0beta38 [July 31, 2010] - Implemented remaining "_fixed" functions. - Corrected a number of recently introduced warnings mostly resulting from - safe but uncast assignments to shorter integers. Also added a zlib - VStudio release library project because the latest zlib Official Windows - build does not include such a thing. - Revised png_get_int_16() to be similar to png_get_int_32(). - Restored projects/visualc71. - -Version 1.5.0beta39 [August 2, 2010] - VisualC/GCC warning fixes, VisualC build fixes - The changes include support for function attributes in VC in addition to - those already present in GCC - necessary because without these some - warnings are unavoidable. Fixes include signed/unsigned fixes in - pngvalid and checks with gcc -Wall -Wextra -Wunused. - VC requires function attributes on function definitions as well as - declarations, PNG_FUNCTION has been added to enable this and the - relevant function definitions changed. - -Version 1.5.0beta40 [August 6, 2010] - Correct use of _WINDOWS_ in pngconf.h - Removed png_mem_ #defines; they are no longer used. - Added the sRGB chunk to pngtest.png - -Version 1.5.0beta41 [August 11, 2010] - Added the cHRM chunk to pngtest.png - Don't try to use version-script with cygwin/mingw. - Revised contrib/gregbook to work under cygwin/mingw. - -Version 1.5.0beta42 [August 18, 2010] - Add .dll.a to the list of extensions to be symlinked by Makefile.am (Yaakov) - Made all API functions that have const arguments and constant string - literal pointers declare them (John Bowler). - -Version 1.5.0beta43 [August 20, 2010] - Removed spurious tabs, shorten long lines (no source change) - Also added scripts/chkfmt to validate the format of all the files that can - reasonably be validated (it is suggested to run "make distclean" before - checking, because some machine generated files have long lines.) - Reformatted the CHANGES file to be more consistent throughout. - Made changes to address various issues identified by GCC, mostly - signed/unsigned and shortening problems on assignment but also a few - difficult to optimize (for GCC) loops. - Fixed non-GCC fixed point builds. In png.c a declaration was misplaced - in an earlier update. Fixed to declare the auto variables at the head. - Use cexcept.h in pngvalid.c. - -Version 1.5.0beta44 [August 24, 2010] - Updated CMakeLists.txt to use CMAKE_INSTALL_LIBDIR variable; useful for - installing libpng in /usr/lib64 (Funda Wang). - Revised CMakeLists.txt to put the man pages in share/man/man* not man/man* - Revised CMakeLists.txt to make symlinks instead of copies when installing. - Changed PNG_LIB_NAME from pngNN to libpngNN in CMakeLists.txt (Philip Lowman) - Implemented memory checks within pngvalid - Reformatted/rearranged pngvalid.c to assist use of progressive reader. - Check interlaced images in pngvalid - Clarified pngusr.h comments in pnglibconf.dfa - Simplified the pngvalid error-handling code now that cexcept.h is in place. - Implemented progressive reader in pngvalid.c for standard tests - Implemented progressive read in pngvalid.c gamma tests - Turn on progressive reader in pngvalid.c by default and tidy code. - -Version 1.5.0beta45 [August 26, 2010] - Added an explicit make step to projects/vstudio for pnglibconf.h - Also corrected zlib.vcxproj into which Visual Studio had introduced - what it calls an "authoring error". The change to make pnglibconf.h - simply copies the file; in the future it may actually generate the - file from scripts/pnglibconf.dfa as the other build systems do. - Changed pngvalid to work when floating point APIs are disabled - Renamed the prebuilt scripts/pnglibconf.h to scripts/pnglibconf.h.prebuilt - Supply default values for PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX - in pngpriv.h in case the user neglected to define them in their pngusr.h - -Version 1.5.0beta46 [August 28, 2010] - Added new private header files to libpng_sources in CMakeLists.txt - Added PNG_READ_16BIT, PNG_WRITE_16BIT, and PNG_16BIT options. - Added reference to scripts/pnglibconf.h.prebuilt in the visualc71 project. - -Version 1.5.0beta47 [September 11, 2010] - Fixed a number of problems with 64-bit compilation reported by Visual - Studio 2010 (John Bowler). - -Version 1.5.0beta48 [October 4, 2010] - Updated CMakeLists.txt (Philip Lowman). - Revised autogen.sh to recognize and use $AUTOCONF, $AUTOMAKE, $AUTOHEADER, - $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE - Fixed problem with symbols creation in Makefile.am which was assuming that - all versions of ccp write to standard output by default (Martin Banky). The - bug was introduced in libpng-1.2.9beta5. - Removed unused mkinstalldirs. - -Version 1.5.0beta49 [October 8, 2010] - Undid Makefile.am revision of 1.5.0beta48. - -Version 1.5.0beta50 [October 14, 2010] - Revised Makefile.in to account for mkinstalldirs being removed. - Added some "(unsigned long)" typecasts in printf statements in pngvalid.c. - Suppressed a compiler warning in png_handle_sPLT(). - Check for out-of-range text compression mode in png_set_text(). - -Version 1.5.0beta51 [October 15, 2010] - Changed embedded dates to "(PENDING RELEASE) in beta releases (and future - rc releases) to minimize the difference between releases. - -Version 1.5.0beta52 [October 16, 2010] - Restored some of the embedded dates (in png.h, png.c, documentation, etc.) - -Version 1.5.0beta53 [October 18, 2010] - Updated INSTALL to mention using "make maintainer-clean" and to remove - obsolete statement about a custom ltmain.sh - Disabled "color-tests" by default in Makefile.am so it will work with - automake versions earlier than 1.11.1 - Use document name "libpng-manual.txt" instead of "libpng-.txt" - to simplify version differences. - Removed obsolete remarks about setjmp handling from INSTALL. - Revised and renamed the typedef in png.h and png.c that was designed - to catch library and header mismatch. - -Version 1.5.0beta54 [November 10, 2010] - Require 48 bytes, not 64 bytes, for big_row_buf in overflow checks. - Used a consistent structure for the pngget.c functions. - -Version 1.5.0beta55 [November 21, 2010] - Revised png_get_uint_32, png_get_int_32, png_get_uint_16 (Cosmin) - Moved reading of file signature into png_read_sig (Cosmin) - Fixed atomicity of chunk header serialization (Cosmin) - Added test for io_state in pngtest.c (Cosmin) - Added "#!/bin/sh" at the top of contrib/pngminim/*/gather.sh scripts. - Changes to remove gcc warnings (John Bowler) - Certain optional gcc warning flags resulted in warnings in libpng code. - With these changes only -Wconversion and -Wcast-qual cannot be turned on. - Changes are trivial rearrangements of code. -Wconversion is not possible - for pngrutil.c (because of the widespread use of += et al on variables - smaller than (int) or (unsigned int)) and -Wcast-qual is not possible - with pngwio.c and pngwutil.c because the 'write' callback and zlib - compression both fail to declare their input buffers with 'const'. - -Version 1.5.0beta56 [December 7, 2010] - Added the private PNG_UNUSED() macro definition in pngpriv.h. - Added some commentary about PNG_EXPORT in png.h and pngconf.h - Revised PNG_EXPORT() macro and added PNG_EXPORTA() macro, with the - objective of simplifying and improving the cosmetic appearance of png.h. - Fixed some incorrect "=" macro names in pnglibconf.dfa - Included documentation of changes in 1.5.0 from 1.4.x in libpng-manual.txt - -Version 1.5.0beta57 [December 9, 2010] - Documented the pngvalid gamma error summary with additional comments and - print statements. - Improved missing symbol handling in checksym.awk; symbols missing in both - the old and new files can now be optionally ignored, treated as errors - or warnings. - Removed references to pngvcrd.c and pnggccrd.c from the vstudio project. - Updated "libpng14" to "libpng15" in the visualc71 project. - Enabled the strip16 tests in pngvalid.` - Don't display test results (except PASS/FAIL) when running "make test". - Instead put them in pngtest-log.txt - Added "--with-zprefix=" to configure.ac - Updated the prebuilt configuration files to autoconf version 2.68 - -Version 1.5.0beta58 [December 19, 2010] - Fixed interlace image handling and add test cases (John Bowler) - Fixed the clean rule in Makefile.am to remove pngtest-log.txt - Made minor changes to work around warnings in gcc 3.4 - -Version 1.5.0rc01 [December 27, 2010] - No changes. - -Version 1.5.0rc02 [December 27, 2010] - Eliminated references to the scripts/*.def files in project/visualc71. - -Version 1.5.0rc03 [December 28, 2010] - Eliminated scripts/*.def and revised Makefile.am accordingly - -Version 1.5.0rc04 [December 29, 2010] - Fixed bug in background transformation handling in pngrtran.c (it was - looking for the flag in png_ptr->transformations instead of in - png_ptr->flags) (David Raymond). - -Version 1.5.0rc05 [December 31, 2010] - Fixed typo in a comment in CMakeLists.txt (libpng14 => libpng15) (Cosmin) - -Version 1.5.0rc06 [January 4, 2011] - Changed the new configure option "zprefix=string" to "zlib-prefix=string" - -Version 1.5.0rc07 [January 4, 2011] - Updated copyright year. - -Version 1.5.0 [January 6, 2011] - No changes. - -version 1.5.1beta01 [January 8, 2011] - Added description of png_set_crc_action() to the manual. - Added a note in the manual that the type of the iCCP profile was changed - from png_charpp to png_bytepp in png_get_iCCP(). This change happened - in version 1.5.0beta36 but is not noted in the CHANGES. Similarly, - it was changed from png_charpp to png_const_bytepp in png_set_iCCP(). - Ensure that png_rgb_to_gray ignores palette mapped images, if libpng - internally happens to call it with one, and fixed a failure to handle - palette mapped images correctly. This fixes CVE-2690. - -Version 1.5.1beta02 [January 14, 2011] - Fixed a bug in handling of interlaced images (bero at arklinux.org). - Updated CMakeLists.txt (Clifford Yapp) - -Version 1.5.1beta03 [January 14, 2011] - Fixed typecasting of some png_debug() statements (Cosmin) - -Version 1.5.1beta04 [January 16, 2011] - Updated documentation of png_set|get_tRNS() (Thomas Klausner). - Mentioned in the documentation that applications must #include "zlib.h" - if they need access to anything in zlib.h, and that a number of - macros such as png_memset() are no longer accessible by applications. - Corrected pngvalid gamma test "sample" function to access all of the color - samples of each pixel, instead of sampling the red channel three times. - Prefixed variable names index, div, exp, gamma with "png_" to avoid "shadow" - warnings, and (mistakenly) changed png_exp() to exp(). - -Version 1.5.1beta05 [January 16, 2011] - Changed variable names png_index, png_div, png_exp, and png_gamma to - char_index, divisor, exp_b10, and gamma_val, respectively, and - changed exp() back to png_exp(). - -Version 1.5.1beta06 [January 20, 2011] - Prevent png_push_crc_skip() from hanging while reading an unknown chunk - or an over-large compressed zTXt chunk with the progressive reader. - Eliminated more GCC "shadow" warnings. - Revised png_fixed() in png.c to avoid compiler warning about reaching the - end without returning anything. - -Version 1.5.1beta07 [January 22, 2011] - In the manual, describe the png_get_IHDR() arguments in the correct order. - Added const_png_structp and const_png_infop types, and used them in - prototypes for most png_get_*() functions. - -Version 1.5.1beta08 [January 23, 2011] - Added png_get_io_chunk_type() and deprecated png_get_io_chunk_name() - Added synopses for the IO_STATE functions and other missing synopses - to the manual. Removed the synopses from libpngpf.3 because they - were out of date and no longer useful. Better information can be - obtained by reading the prototypes and comments in pngpriv.h - Attempted to fix cpp on Solaris with S. Studio 12 cc, fix build - Added a make macro DFNCPP that is a CPP that will accept the tokens in - a .dfn file and adds configure stuff to test for such a CPP. ./configure - should fail if one is not available. - Corrected const_png_ in png.h to png_const_ to avoid polluting the namespace. - Added png_get_current_row_number and png_get_current_pass_number for the - benefit of the user transform callback. - Added png_process_data_pause and png_process_data_skip for the benefit of - progressive readers that need to stop data processing or want to optimize - skipping of unread data (e.g., if the reader marks a chunk to be skipped.) - -Version 1.5.1beta09 [January 24, 2011] - Enhanced pngvalid, corrected an error in gray_to_rgb, corrected doc error. - pngvalid contains tests of transforms, which tests are currently disabled - because they are incompletely tested. gray_to_rgb was failing to expand - the bit depth for smaller bit depth images; this seems to be a long - standing error and resulted, apparently, in invalid output - (CVE-2011-0408, CERT VU#643140). The documentation did not accurately - describe what libpng really does when converting RGB to gray. - -Version 1.5.1beta10 [January 27, 2010] - Fixed incorrect examples of callback prototypes in the manual, that were - introduced in libpng-1.0.0. - In addition the order of the png_get_uint macros with respect to the - relevant function definitions has been reversed. This helps the - preprocessing of the symbol files be more robust. Furthermore, the - symbol file preprocessing now uses -DPNG_NO_USE_READ_MACROS even when - the library may actually be built with PNG_USE_READ_MACROS; this stops - the read macros interfering with the symbol file format. - Made the manual, synopses, and function prototypes use the function - argument names file_gamma, int_file_gamma, and srgb_intent consistently. - -Version 1.5.1beta11 [January 28, 2011] - Changed PNG_UNUSED from "param=param;" to "{if(param){}}". - Corrected local variable type in new API png_process_data_skip() - The type was self-evidently incorrect but only causes problems on 64-bit - architectures. - Added transform tests to pngvalid and simplified the arguments. - -Version 1.5.1rc01 [January 29, 2011] - No changes. - -Version 1.5.1rc02 [January 31, 2011] - Added a request in the manual that applications do not use "png_" or - "PNG_" to begin any of their own symbols. - Changed PNG_UNUSED to "(void)param;" and updated the commentary in pngpriv.h - -Version 1.5.1 [February 3, 2011] - No changes. - -Version 1.5.2beta01 [February 13, 2011] - More -Wshadow fixes for older gcc compilers. Older gcc versions apparently - check formal parameters names in function declarations (as well as - definitions) to see if they match a name in the global namespace. - Revised PNG_EXPORTA macro to not use an empty parameter, to accommodate the - old VisualC++ preprocessor. - Turned on interlace handling in png_read_png(). - Fixed gcc pedantic warnings. - Handle longjmp in Cygwin. - Fixed png_get_current_row_number() in the interlaced case. - Cleaned up ALPHA flags and transformations. - Implemented expansion to 16 bits. - -Version 1.5.2beta02 [February 19, 2011] - Fixed mistake in the descriptions of user read_transform and write_transform - function prototypes in the manual. The row_info struct is png_row_infop. - Reverted png_get_current_row_number() to previous (1.5.2beta01) behavior. - Corrected png_get_current_row_number documentation - Fixed the read/write row callback documentation. - This documents the current behavior, where the callback is called after - every row with information pertaining to the next row. - -Version 1.5.2beta03 [March 3, 2011] - Fixed scripts/makefile.vcwin32 - Updated contrib/pngsuite/README to add the word "modify". - Define PNG_ALLOCATED to blank when _MSC_VER<1300. - -Version 1.5.2rc01 [March 19, 2011] - Define remaining attributes to blank when MSC_VER<1300. - ifdef out mask arrays in pngread.c when interlacing is not supported. - -Version 1.5.2rc02 [March 22, 2011] - Added a hint to try CPP=/bin/cpp if "cpp -E" fails in scripts/pnglibconf.mak - and in contrib/pngminim/*/makefile, eg., on SunOS 5.10, and removed "strip" - from the makefiles. - Fixed a bug (present since libpng-1.0.7) that makes png_handle_sPLT() fail - to compile when PNG_NO_POINTER_INDEXING is defined (Chubanov Kirill) - -Version 1.5.2rc03 [March 24, 2011] - Don't include standard header files in png.h while building the symbol table, - to avoid cpp failure on SunOS (introduced PNG_BUILDING_SYMBOL_TABLE macro). - -Version 1.5.2 [March 31, 2011] - No changes. - -Version 1.5.3beta01 [April 1, 2011] - Re-initialize the zlib compressor before compressing non-IDAT chunks. - Added API functions (png_set_text_compression_level() and four others) to - set parameters for zlib compression of non-IDAT chunks. - -Version 1.5.3beta02 [April 3, 2011] - Updated scripts/symbols.def with new API functions. - Only compile the new zlib re-initializing code when text or iCCP is - supported, using PNG_WRITE_COMPRESSED_TEXT_SUPPORTED macro. - Improved the optimization of the zlib CMF byte (see libpng-1.2.6beta03). - Optimize the zlib CMF byte in non-IDAT compressed chunks - -Version 1.5.3beta03 [April 16, 2011] - Fixed gcc -ansi -pedantic compile. A strict ANSI system does not have - snprintf, and the "__STRICT_ANSI__" detects that condition more reliably - than __STDC__ (John Bowler). - Removed the PNG_PTR_NORETURN attribute because it too dangerous. It tells - the compiler that a user supplied callback (the error handler) does not - return, yet there is no guarantee in practice that the application code - will correctly implement the error handler because the compiler only - issues a warning if there is a mistake (John Bowler). - Removed the no-longer-used PNG_DEPSTRUCT macro. - Updated the zlib version to 1.2.5 in the VStudio project. - Fixed 64-bit builds where png_uint_32 is smaller than png_size_t in - pngwutil.c (John Bowler). - Fixed bug with stripping the filler or alpha channel when writing, that - was introduced in libpng-1.5.2beta01 (bug report by Andrew Church). - -Version 1.5.3beta04 [April 27, 2011] - Updated pngtest.png with the new zlib CMF optimization. - Cleaned up conditional compilation code and of background/gamma handling - Internal changes only except a new option to avoid compiling the - png_build_grayscale_palette API (which is not used at all internally.) - The main change is to move the transform tests (READ_TRANSFORMS, - WRITE_TRANSFORMS) up one level to the caller of the APIs. This avoids - calls to spurious functions if all transforms are disabled and slightly - simplifies those functions. Pngvalid modified to handle this. - A minor change is to stop the strip_16 and expand_16 interfaces from - disabling each other; this allows the future alpha premultiplication - code to use 16-bit intermediate values while still producing 8-bit output. - png_do_background and png_do_gamma have been simplified to take a single - pointer to the png_struct rather than pointers to every item required - from the png_struct. This makes no practical difference to the internal - code. - A serious bug in the pngvalid internal routine 'standard_display_init' has - been fixed - this failed to initialize the red channel and accidentally - initialized the alpha channel twice. - Changed png_struct jmp_buf member name from png_jmpbuf to tmp_jmpbuf to - avoid a possible clash with the png_jmpbuf macro on some platforms. - -Version 1.5.3beta05 [May 6, 2011] - Added the "_POSIX_SOURCE" feature test macro to ensure libpng sees the - correct API. _POSIX_SOURCE is defined in pngpriv.h, pngtest.c and - pngvalid.c to ensure that POSIX conformant systems disable non-POSIX APIs. - Removed png_snprintf and added formatted warning messages. This change adds - internal APIs to allow png_warning messages to have parameters without - requiring the host OS to implement snprintf. As a side effect the - dependency of the tIME-supporting RFC1132 code on stdio is removed and - PNG_NO_WARNINGS does actually work now. - Pass "" instead of '\0' to png_default_error() in png_err(). This mistake - was introduced in libpng-1.2.20beta01. This fixes CVE-2011-2691. - Added PNG_WRITE_OPTIMIZE_CMF_SUPPORTED macro to make the zlib "CMF" byte - optimization configurable. - IDAT compression failed if preceded by a compressed text chunk (bug - introduced in libpng-1.5.3beta01-02). This was because the attempt to - reset the zlib stream in png_write_IDAT happened after the first IDAT - chunk had been deflated - much too late. In this change internal - functions were added to claim/release the z_stream and, hopefully, make - the code more robust. Also deflateEnd checking is added - previously - libpng would ignore an error at the end of the stream. - -Version 1.5.3beta06 [May 8, 2011] - Removed the -D_ALL_SOURCE from definitions for AIX in CMakeLists.txt - Implemented premultiplied alpha support: png_set_alpha_mode API - -Version 1.5.3beta07 [May 11, 2011] - Added expand_16 support to the high level interface. - Added named value and 'flag' gamma support to png_set_gamma. Made a minor - change from the previous (unreleased) ABI/API to hide the exact value used - for Macs - it's not a good idea to embed this in the ABI! - Moved macro definitions for PNG_HAVE_IHDR, PNG_HAVE_PLTE, and PNG_AFTER_IDAT - from pngpriv.h to png.h because they must be visible to applications - that call png_set_unknown_chunks(). - Check for up->location !PNG_AFTER_IDAT when writing unknown chunks - before IDAT. - -Version 1.5.3beta08 [May 16, 2011] - Improved "pngvalid --speed" to exclude more of pngvalid from the time. - Documented png_set_alpha_mode(), other changes in libpng.3/libpng-manual.txt - The cHRM chunk now sets the defaults for png_set_rgb_to_gray() (when negative - parameters are supplied by the caller), while in the absence of cHRM - sRGB/Rec 709 values are still used. This introduced a divide-by-zero - bug in png_handle_cHRM(). - The bKGD chunk no longer overwrites the background value set by - png_set_background(), allowing the latter to be used before the file - header is read. It never performed any useful function to override - the default anyway. - Added memory overwrite and palette image checks to pngvalid.c - Previously palette image code was poorly checked. Since the transformation - code has a special palette path in most cases this was a severe weakness. - Minor cleanup and some extra checking in pngrutil.c and pngrtran.c. When - expanding an indexed image, always expand to RGBA if transparency is - present. - -Version 1.5.3beta09 [May 17, 2011] - Reversed earlier 1.5.3 change of transformation order; move png_expand_16 - back where it was. The change doesn't work because it requires 16-bit - gamma tables when the code only generates 8-bit ones. This fails - silently; the libpng code just doesn't do any gamma correction. Moving - the tests back leaves the old, inaccurate, 8-bit gamma calculations, but - these are clearly better than none! - -Version 1.5.3beta10 [May 20, 2011] - - png_set_background() and png_expand_16() did not work together correctly. - This problem is present in 1.5.2; if png_set_background is called with - need_expand false and the matching 16 bit color libpng erroneously just - treats it as an 8-bit color because of where png_do_expand_16 is in the - transform list. This simple fix reduces the supplied colour to 8-bits, - so it gets smashed, but this is better than the current behavior. - Added tests for expand16, more fixes for palette image tests to pngvalid. - Corrects the code for palette image tests and disables attempts to - validate palette colors. - -Version 1.5.3rc01 [June 3, 2011] - No changes. - -Version 1.5.3rc02 [June 8, 2011] - Fixed uninitialized memory read in png_format_buffer() (Bug report by - Frank Busse, CVE-2011-2501, related to CVE-2004-0421). - -Version 1.5.3beta11 [June 11, 2011] - Fixed png_handle_sCAL which is broken in 1.5. This fixes CVE 2011-2692. - Added sCAL to pngtest.png - Revised documentation about png_set_user_limits() to say that it also affects - png writing. - Revised handling of png_set_user_limits() so that it can increase the - limit beyond the PNG_USER_WIDTH|HEIGHT_MAX; previously it could only - reduce it. - Make the 16-to-8 scaling accurate. Dividing by 256 with no rounding is - wrong (high by one) 25% of the time. Dividing by 257 with rounding is - wrong in 128 out of 65536 cases. Getting the right answer all the time - without division is easy. - Added "_SUPPORTED" to the PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION macro. - Added projects/owatcom, an IDE project for OpenWatcom to replace - scripts/makefile.watcom. This project works with OpenWatcom 1.9. The - IDE autogenerates appropriate makefiles (libpng.mk) for batch processing. - The project is configurable, unlike the Visual Studio project, so long - as the developer has an awk. - Changed png_set_gAMA to limit the gamma value range so that the inverse - of the stored value cannot overflow the fixed point representation, - and changed other things OpenWatcom warns about. - Revised pngvalid.c to test PNG_ALPHA_MODE_SUPPORTED correctly. This allows - pngvalid to build when ALPHA_MODE is not supported, which is required if - it is to build on libpng 1.4. - Removed string/memory macros that are no longer used and are not - necessarily fully supportable, particularly png_strncpy and png_snprintf. - Added log option to pngvalid.c and attempted to improve gamma messages. - -Version 1.5.3 [omitted] - People found the presence of a beta release following an rc release - to be confusing; therefore we bump the version to libpng-1.5.4beta01 - and there will be no libpng-1.5.3 release. - -Version 1.5.4beta01 [June 14, 2011] - Made it possible to undefine PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED - to get the same (inaccurate) output as libpng-1.5.2 and earlier. - Moved definitions of PNG_HAVE_IHDR, PNG_AFTER_IDAT, and PNG_HAVE_PLTE - outside of an unknown-chunk block in png.h because they are also - needed for other uses. - -Version 1.5.4beta02 [June 14, 2011] - Fixed and clarified LEGACY 16-to-8 scaling code. - Added png_set_chop_16() API, to match inaccurate results from previous - libpng versions. - Removed the ACCURATE and LEGACY options (they are no longer useable) - Use the old scaling method for background if png_set_chop_16() was - called. - Made png_set_chop_16() API removeable by disabling PNG_CHOP_16_TO_8_SUPPORTED - -Version 1.5.4beta03 [June 15, 2011] - Fixed a problem in png_do_expand_palette() exposed by optimization in - 1.5.3beta06 - Also removed a spurious and confusing "trans" member ("trans") from png_info. - The palette expand optimization prevented expansion to an intermediate RGBA - form if tRNS was present but alpha was marked to be stripped; this exposed - a check for tRNS in png_do_expand_palette() which is inconsistent with the - code elsewhere in libpng. - Correction to the expand_16 code; removed extra instance of - png_set_scale_16_to_8 from pngpriv.h - -Version 1.5.4beta04 [June 16, 2011] - Added a missing "#ifdef PNG_READ_BACKGROUND_SUPPORTED/#endif" in pngrtran.c - Added PNG_TRANSFORM_CHOP_16 to the high-level read transforms. - Made PNG_READ_16_TO_8_ACCURATE_SCALE configurable again. If this is - not enabled, png_set_strip_16() and png_do_scale_16_to_8() aren't built. - Revised contrib/visupng, gregbook, and pngminim to demonstrate chop_16_to_8 - -Version 1.5.4beta05 [June 16, 2011] - Renamed png_set_strip_16() to png_set_scale_16() and renamed - png_set_chop_16() to png_set_strip(16) in an attempt to minimize the - behavior changes between libpng14 and libpng15. - -Version 1.5.4beta06 [June 18, 2011] - Fixed new bug that was causing both strip_16 and scale_16 to be applied. - -Version 1.5.4beta07 [June 19, 2011] - Fixed pngvalid, simplified macros, added checking for 0 in sCAL. - The ACCURATE scale macro is no longer defined in 1.5 - call the - png_scale_16_to_8 API. Made sure that PNG_READ_16_TO_8 is still defined - if the png_strip_16_to_8 API is present. png_check_fp_number now - maintains some state so that positive, negative and zero values are - identified. sCAL uses these to be strictly spec conformant. - -Version 1.5.4beta08 [June 23, 2011] - Fixed pngvalid if ACCURATE_SCALE is defined. - Updated scripts/pnglibconf.h.prebuilt. - -Version 1.5.4rc01 [June 30, 2011] - Define PNG_ALLOCATED to "restrict" only if MSC_VER >= 1400. - -Version 1.5.4 [July 7, 2011] - No changes. - -Version 1.5.5beta01 [July 13, 2011] - Fixed some typos and made other minor changes in the manual. - Updated contrib/pngminus/makefile.std (Samuli Souminen) - -Version 1.5.5beta02 [July 14, 2011] - Revised Makefile.am and Makefile.in to look in the right directory for - pnglibconf.h.prebuilt - -Version 1.5.5beta03 [July 27, 2011] - Enabled compilation with g++ compiler. This compiler does not recognize - the file extension, so it always compiles with C++ rules. Made minor - changes to pngrutil.c to cast results where C++ expects it but C does not. - Minor editing of libpng.3 and libpng-manual.txt. - -Version 1.5.5beta04 [July 29, 2011] - Revised CMakeLists.txt (Clifford Yapp) - Updated commentary about the png_rgb_to_gray() default coefficients - in the manual and in pngrtran.c - -Version 1.5.5beta05 [August 17, 2011] - Prevent unexpected API exports from non-libpng DLLs on Windows. The "_DLL" - is removed from the test of whether a DLL is being built (this erroneously - caused the libpng APIs to be marked as DLL exports in static builds under - Microsoft Visual Studio). Almost all of the libpng building configuration - is moved from pngconf.h to pngpriv.h, but PNG_DLL_EXPORT remains in - pngconf.h, though, so that it is colocated with the import definition (it - is no longer used anywhere in the installed headers). The VStudio project - definitions have been cleaned up: "_USRDLL" has been removed from the - static library builds (this was incorrect), and PNG_USE_DLL has been added - to pngvalid to test the functionality (pngtest does not supply it, - deliberately). The spurious "_EXPORTS" has been removed from the - libpng build (all these errors were a result of copy/paste between project - configurations.) - Added new types and internal functions for CIE RGB end point handling to - pngpriv.h (functions yet to be implemented). - -Version 1.5.5beta06 [August 26, 2011] - Ensure the CMAKE_LIBRARY_OUTPUT_DIRECTORY is set in CMakeLists.txt - (Clifford Yap) - Fixes to rgb_to_gray and cHRM XYZ APIs (John Bowler): - The rgb_to_gray code had errors when combined with gamma correction. - Some pixels were treated as true grey when they weren't and such pixels - and true grey ones were not gamma corrected (the original value of the - red component was used instead). APIs to get and set cHRM using color - space end points have been added and the rgb_to_gray code that defaults - based on cHRM, and the divide-by-zero bug in png_handle_cHRM (CERT - VU#477046, CVE-2011-3328, introduced in 1.5.4) have been corrected. - A considerable number of tests has been added to pngvalid for the - rgb_to_gray transform. - Arithmetic errors in rgb_to_gray whereby the calculated gray value was - truncated to the bit depth rather than rounded have been fixed except in - the 8-bit non-gamma-corrected case (where consistency seems more important - than correctness.) The code still has considerable inaccuracies in the - 8-bit case because 8-bit linear arithmetic is used. - -Version 1.5.5beta07 [September 7, 2011] - Added "$(ARCH)" option to makefile.darwin - Added SunOS support to configure.ac and Makefile.am - Changed png_chunk_benign_error() to png_warning() in png.c, in - png_XYZ_from_xy_checked(). - -Version 1.5.5beta08 [September 10, 2011] - Fixed 64-bit compilation errors (gcc). The errors fixed relate - to conditions where types that are 32 bits in the GCC 32-bit - world (uLong and png_size_t) become 64 bits in the 64-bit - world. This produces potential truncation errors which the - compiler correctly flags. - Relocated new HAVE_SOLARIS_LD definition in configure.ac - Constant changes for 64-bit compatibility (removal of L suffixes). The - 16-bit cases still use "L" as we don't have a 16-bit test system. - -Version 1.5.5rc01 [September 15, 2011] - Removed "L" suffixes in pngpriv.h - -Version 1.5.5 [September 22, 2011] - No changes. - -Version 1.5.6beta01 [September 22, 2011] - Fixed some 64-bit type conversion warnings in pngrtran.c - Moved row_info from png_struct to a local variable. - The various interlace mask arrays have been made into arrays of - bytes and made PNG_CONST and static (previously some arrays were - marked PNG_CONST and some weren't). - Additional checks have been added to the transform code to validate the - pixel depths after the transforms on both read and write. - Removed some redundant code from pngwrite.c, in png_destroy_write_struct(). - Changed chunk reading/writing code to use png_uint_32 instead of png_byte[4]. - This removes the need to allocate temporary strings for chunk names on - the stack in the read/write code. Unknown chunk handling still uses the - string form because this is exposed in the API. - -Version 1.5.6beta02 [September 26, 2011] - Added a note in the manual the png_read_update_info() must be called only - once with a particular info_ptr. - Fixed a typo in the definition of the new PNG_STRING_FROM_CHUNK(s,c) macro. - -Version 1.5.6beta03 [September 28, 2011] - Revised test-pngtest.sh to report FAIL when pngtest fails. - Added "--strict" option to pngtest, to report FAIL when the failure is - only because the resulting valid files are different. - Revised CMakeLists.txt to work with mingw and removed some material from - CMakeLists.txt that is no longer useful in libpng-1.5. - -Version 1.5.6beta04 [October 5, 2011] - Fixed typo in Makefile.in and Makefile.am ("-M Wl" should be "-M -Wl")." - -Version 1.5.6beta05 [October 12, 2011] - Speed up png_combine_row() for interlaced images. This reduces the generality - of the code, allowing it to be optimized for Adam7 interlace. The masks - passed to png_combine_row() are now generated internally, avoiding - some code duplication and localizing the interlace handling somewhat. - Align png_struct::row_buf - previously it was always unaligned, caused by - a bug in the code that attempted to align it; the code needs to subtract - one from the pointer to take account of the filter byte prepended to - each row. - Optimized png_combine_row() when rows are aligned. This gains a small - percentage for 16-bit and 32-bit pixels in the typical case where the - output row buffers are appropriately aligned. The optimization was not - previously possible because the png_struct buffer was always misaligned. - Fixed bug in png_write_chunk_header() debug print, introduced in 1.5.6beta01. - -Version 1.5.6beta06 [October 17, 2011] - Removed two redundant tests for uninitialized row. - Fixed a relatively harmless memory overwrite in compressed text writing - with a 1 byte zlib buffer. - Add ability to call png_read_update_info multiple times to pngvalid.c. - Fixes for multiple calls to png_read_update_info. These fixes attend to - most of the errors revealed in pngvalid, however doing the gamma work - twice results in inaccuracies that can't be easily fixed. There is now - a warning in the code if this is going to happen. - Turned on multiple png_read_update_info in pngvalid transform tests. - Prevent libpng from overwriting unused bits at the end of the image when - it is not byte aligned, while reading. Prior to libpng-1.5.6 libpng would - overwrite the partial byte at the end of each row if the row width was not - an exact multiple of 8 bits and the image is not interlaced. - -Version 1.5.6beta07 [October 21, 2011] - Made png_ptr->prev_row an aligned pointer into png_ptr->big_prev_row - (Mans Rullgard). - -Version 1.5.6rc01 [October 26, 2011] - Changed misleading "Missing PLTE before cHRM" warning to "Out of place cHRM" - -Version 1.5.6rc02 [October 27, 2011] - Added LSR() macro to defend against buggy compilers that evaluate non-taken - code branches and complain about out-of-range shifts. - -Version 1.5.6rc03 [October 28, 2011] - Renamed the LSR() macro to PNG_LSR() and added PNG_LSL() macro. - Fixed compiler warnings with Intel and MSYS compilers. The logical shift - fix for Microsoft Visual C is required by other compilers, so this - enables that fix for all compilers when using compile-time constants. - Under MSYS 'byte' is a name declared in a system header file, so we - changed the name of a local variable to avoid the warnings that result. - Added #define PNG_ALIGN_TYPE PNG_ALIGN_NONE to contrib/pngminim/*/pngusr.h - -Version 1.5.6 [November 3, 2011] - No changes. - -Version 1.5.7beta01 [November 4, 2011] - Added support for ARM processor, when decoding all PNG up-filtered rows - and any other-filtered rows with 3 or 4 bytes per pixel (Mans Rullgard). - Fixed bug in pngvalid on early allocation failure; fixed type cast in - pngmem.c; pngvalid would attempt to call png_error() if the allocation - of a png_struct or png_info failed. This would probably have led to a - crash. The pngmem.c implementation of png_malloc() included a cast - to png_size_t which would fail on large allocations on 16-bit systems. - Fix for the preprocessor of the Intel C compiler. The preprocessor - splits adjacent @ signs with a space; this changes the concatenation - token from @-@-@ to PNG_JOIN; that should work with all compiler - preprocessors. - Paeth filter speed improvements from work by Siarhei Siamashka. This - changes the 'Paeth' reconstruction function to improve the GCC code - generation on x86. The changes are only part of the suggested ones; - just the changes that definitely improve speed and remain simple. - The changes also slightly increase the clarity of the code. - -Version 1.5.7beta02 [November 11, 2011] - Check compression_type parameter in png_get_iCCP and remove spurious - casts. The compression_type parameter is always assigned to, so must - be non-NULL. The cast of the profile length potentially truncated the - value unnecessarily on a 16-bit int system, so the cast of the (byte) - compression type to (int) is specified by ANSI-C anyway. - Fixed FP division by zero in pngvalid.c; the 'test_pixel' code left - the sBIT fields in the test pixel as 0, which resulted in a floating - point division by zero which was irrelevant but causes systems where - FP exceptions cause a crash. Added code to pngvalid to turn on FP - exceptions if the appropriate glibc support is there to ensure this is - tested in the future. - Updated scripts/pnglibconf.mak and scripts/makefile.std to handle the - new PNG_JOIN macro. - Added versioning to pnglibconf.h comments. - Simplified read/write API initial version; basic read/write tested on - a variety of images, limited documentation (in the header file.) - Installed more accurate linear to sRGB conversion tables. The slightly - modified tables reduce the number of 16-bit values that - convert to an off-by-one 8-bit value. The "makesRGB.c" code that was used - to generate the tables is now in a contrib/sRGBtables sub-directory. - -Version 1.5.7beta03 [November 17, 2011] - Removed PNG_CONST from the sRGB table declarations in pngpriv.h and png.c - Added run-time detection of NEON support. - Added contrib/libtests; includes simplified API test and timing test and - a color conversion utility for rapid checking of failed 'pngstest' results. - Multiple transform bug fixes plus a work-round for double gamma correction. - libpng does not support more than one transform that requires linear data - at once - if this is tried typically the results is double gamma - correction. Since the simplified APIs can need rgb to gray combined with - a compose operation it is necessary to do one of these outside the main - libpng transform code. This check-in also contains fixes to various bugs - in the simplified APIs themselves and to some bugs in compose and rgb to - gray (on palette) itself. - Fixes for C++ compilation using g++ When libpng source is compiled - using g++. The compiler imposes C++ rules on the C source; thus it - is desirable to make the source work with either C or C++ rules - without throwing away useful error information. This change adds - png_voidcast to allow C semantic (void*) cases or the corresponding - C++ static_cast operation, as appropriate. - Added --noexecstack to assembler file compilation. GCC does not set - this on assembler compilation, even though it does on C compilation. - This creates security issues if assembler code is enabled; the - work-around is to set it by default in the flags for $(CCAS) - Work around compilers that don't support declaration of const data. Some - compilers fault 'extern const' data declarations (because the data is - not initialized); this turns on const-ness only for compilers where - this is known to work. - -Version 1.5.7beta04 [November 17, 2011] - Since the gcc driver does not recognize the --noexecstack flag, we must - use the -Wa prefix to have it passed through to the assembler. - Also removed a duplicate setting of this flag. - Added files that were omitted from the libpng-1.5.7beta03 zip distribution. - -Version 1.5.7beta05 [November 25, 2011] - Removed "zTXt" from warning in generic chunk decompression function. - Validate time settings passed to png_set_tIME() and png_convert_to_rfc1123() - (Frank Busse). Note: This prevented CVE-2015-7981 from affecting - libpng-1.5.7 and later. - Added MINGW support to CMakeLists.txt - Reject invalid compression flag or method when reading the iTXt chunk. - Backed out 'simplified' API changes. The API seems too complex and there - is a lack of consensus or enthusiasm for the proposals. The API also - reveals significant bugs inside libpng (double gamma correction and the - known bug of being unable to retrieve a corrected palette). It seems - better to wait until the bugs, at least, are corrected. - Moved pngvalid.c into contrib/libtests - Rebuilt Makefile.in, configure, etc., with autoconf-2.68 - -Version 1.5.7rc01 [December 1, 2011] - Replaced an "#if" with "#ifdef" in pngrtran.c - Revised #if PNG_DO_BC block in png.c (use #ifdef and add #else) - -Version 1.5.7rc02 [December 5, 2011] - Revised project files and contrib/pngvalid/pngvalid.c to account for - the relocation of pngvalid into contrib/libtests. - Revised pngconf.h to use " __declspec(restrict)" only when MSC_VER >= 1400, - as in libpng-1.5.4. - Put CRLF line endings in the owatcom project files. - -Version 1.5.7rc03 [December 7, 2011] - Updated CMakeLists.txt to account for the relocation of pngvalid.c - -Version 1.5.7 [December 15, 2011] - Minor fixes to pngvalid.c for gcc 4.6.2 compatibility to remove warnings - reported by earlier versions. - Fixed minor memset/sizeof errors in pngvalid.c. - -Version 1.6.0beta01 [December 15, 2011] - Removed machine-generated configure files from the GIT repository (they will - continue to appear in the tarball distributions and in the libpng15 and - earlier GIT branches). - Restored the new 'simplified' API, which was started in libpng-1.5.7beta02 - but later deleted from libpng-1.5.7beta05. - Added example programs for the new 'simplified' API. - Added ANSI-C (C90) headers and require them, and take advantage of the - change. Also fixed some of the projects/* and contrib/* files that needed - updates for libpng16 and the move of pngvalid.c. - With this change the required ANSI-C header files are assumed to exist: the - implementation must provide float.h, limits.h, stdarg.h and stddef.h and - libpng relies on limits.h and stddef.h existing and behaving as defined - (the other two required headers aren't used). Non-ANSI systems that don't - have stddef.h or limits.h will have to provide an appropriate fake - containing the relevant types and #defines. - Dropped support for 16-bit platforms. The use of FAR/far has been eliminated - and the definition of png_alloc_size_t is now controlled by a flag so - that 'small size_t' systems can select it if necessary. Libpng 1.6 may - not currently work on such systems -- it seems likely that it will - ask 'malloc' for more than 65535 bytes with any image that has a - sufficiently large row size (rather than simply failing to read such - images). - New tools directory containing tools used to generate libpng code. - Fixed race conditions in parallel make builds. With higher degrees of - parallelism during 'make' the use of the same temporary file names such - as 'dfn*' can result in a race where a temporary file from one arm of the - build is deleted or overwritten in another arm. This changes the - temporary files for suffix rules to always use $* and ensures that the - non-suffix rules use unique file names. - -Version 1.6.0beta02 [December 21, 2011] - Correct configure builds where build and source directories are separate. - The include path of 'config.h' was erroneously made relative in pngvalid.c - in libpng 1.5.7. - -Version 1.6.0beta03 [December 22, 2011] - Start-up code size improvements, error handler flexibility. These changes - alter how the tricky allocation of the initial png_struct and png_info - structures are handled. png_info is now handled in pretty much the same - way as everything else, except that the allocations handle NULL return - silently. png_struct is changed in a similar way on allocation and on - deallocation a 'safety' error handler is put in place (which should never - be required). The error handler itself is changed to permit mismatches - in the application and libpng error buffer size; however, this means a - silent change to the API to return the jmp_buf if the size doesn't match - the size from the libpng compilation; libpng now allocates the memory and - this may fail. Overall these changes result in slight code size - reductions; however, this is a reduction in code that is always executed - so is particularly valuable. Overall on a 64-bit system the libpng DLL - decreases in code size by 1733 bytes. pngerror.o increases in size by - about 465 bytes because of the new functionality. - Added png_convert_to_rfc1123_buffer() and deprecated png_convert_to_rfc1123() - to avoid including a spurious buffer in the png_struct. - -Version 1.6.0beta04 [December 30, 2011] - Regenerated configure scripts with automake-1.11.2 - Eliminated png_info_destroy(). It is now used only in png.c and only calls - one other internal function and memset(). - Enabled png_get_sCAL_fixed() if floating point APIs are enabled. Previously - it was disabled whenever internal fixed point arithmetic was selected, - which meant it didn't exist even on systems where FP was available but not - preferred. - Added pngvalid.c compile time checks for const APIs. - Implemented 'restrict' for png_info and png_struct. Because of the way - libpng works both png_info and png_struct are always accessed via a - single pointer. This means adding C99 'restrict' to the pointer gives - the compiler some opportunity to optimize the code. This change allows - that. - Moved AC_MSG_CHECKING([if libraries can be versioned]) later to the proper - location in configure.ac (Gilles Espinasse). - Changed png_memcpy to C assignment where appropriate. Changed all those - uses of png_memcpy that were doing a simple assignment to assignments - (all those cases where the thing being copied is a non-array C L-value). - Added some error checking to png_set_*() routines. - Removed the reference to the non-exported function png_memcpy() from - example.c. - Fixed the Visual C 64-bit build - it requires jmp_buf to be aligned, but - it had become misaligned. - Revised contrib/pngminus/pnm2png.c to avoid warnings when png_uint_32 - and unsigned long are of different sizes. - -Version 1.6.0beta05 [January 15, 2012] - Updated manual with description of the simplified API (copied from png.h) - Fix bug in pngerror.c: some long warnings were being improperly truncated - (CVE-2011-3464, bug introduced in libpng-1.5.3beta05). - -Version 1.6.0beta06 [January 24, 2012] - Added palette support to the simplified APIs. This commit - changes some of the macro definitions in png.h, app code - may need corresponding changes. - Increased the formatted warning buffer to 192 bytes. - Added color-map support to simplified API. This is an initial version for - review; the documentation has not yet been updated. - Fixed Min/GW uninstall to remove libpng.dll.a - -Version 1.6.0beta07 [January 28, 2012] - Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived) - compiler issues slightly different warnings from those issued by the - current vesions of GCC. This eliminates those warnings by - adding/removing casts and small code rewrites. - Updated configure.ac from autoupdate: added --enable-werror option. - Also some layout regularization and removal of introduced tab characters - (replaced with 3-character indentation). Obsolete macros identified by - autoupdate have been removed; the replacements are all in 2.59 so - the pre-req hasn't been changed. --enable-werror checks for support - for -Werror (or the given argument) in the compiler. This mimics the - gcc configure option by allowing -Werror to be turned on safely; without - the option the tests written in configure itself fail compilation because - they cause compiler warnings. - Rewrote autogen.sh to run autoreconf instead of running tools one-by-one. - Conditionalize the install rules for MINGW and CYGWIN in CMakeLists.txt and - set CMAKE_LIBRARY_OUTPUT_DIRECTORY to "lib" on all platforms (C. Yapp). - Freeze libtool files in the 'scripts' directory. This version of autogen.sh - attempts to dissuade people from running it when it is not, or should not, - be necessary. In fact, autogen.sh does not work when run in a libpng - directory extracted from a tar distribution anymore. You must run it in - a GIT clone instead. - Added two images to contrib/pngsuite (1-bit and 2-bit transparent grayscale), - and renamed three whose names were inconsistent with those in - pngsuite/README.txt. - -Version 1.6.0beta08 [February 1, 2012] - Fixed Image::colormap misalignment in pngstest.c - Check libtool/libtoolize version number (2.4.2) in configure.ac - Divide test-pngstest.sh into separate pngstest runs for basic and - transparent images. - Moved automake options to AM_INIT_AUTOMAKE in configure.ac - Added color-tests, silent-rules (Not yet implemented in Makefile.am) and - version checking to configure.ac - Improved pngstest speed by not doing redundant tests and add const to - the background parameter of png_image_finish_read. The --background - option is now done automagically only when required, so that commandline - option no longer exists. - Cleaned up pngpriv.h to consistently declare all functions and data. - Also eliminated PNG_CONST_DATA, which is apparently not needed but we - can't be sure until it is gone. - Added symbol prefixing that allows all the libpng external symbols - to be prefixed (suggested by Reuben Hawkins). - Updated "ftbb*.png" list in the owatcom and vstudio projects. - Fixed 'prefix' builds on clean systems. The generation of pngprefix.h - should not require itself. - Updated INSTALL to explain that autogen.sh must be run in a GIT clone, - not in a libpng directory extracted from a tar distribution. - -Version 1.6.0beta09 [February 1, 2012] - Reverted the prebuilt configure files to libpng-1.6.0beta05 condition. - -Version 1.6.0beta10 [February 3, 2012] - Added Z_SOLO for zlib-1.2.6+ and correct pngstest tests - Updated list of test images in CMakeLists.txt - Updated the prebuilt configure files to current condition. - Revised INSTALL information about autogen.sh; it works in tar distributions. - -Version 1.6.0beta11 [February 16, 2012] - Fix character count in pngstest command in projects/owatcom/pngstest.tgt - Revised test-pngstest.sh to report PASS/FAIL for each image. - Updated documentation about the simplified API. - Corrected estimate of error in libpng png_set_rgb_to_gray API. The API is - extremely inaccurate for sRGB conversions because it uses an 8-bit - intermediate linear value and it does not use the sRGB transform, so it - suffers from the known instability in gamma transforms for values close - to 0 (see Poynton). The net result is that the calculation has a maximum - error of 14.99/255; 0.5/255^(1/2.2). pngstest now uses 15 for the - permitted 8-bit error. This may still not be enough because of arithmetic - error. - Removed some unused arrays (with #ifdef) from png_read_push_finish_row(). - Fixed a memory overwrite bug in simplified read of RGB PNG with - non-linear gamma Also bugs in the error checking in pngread.c and changed - quite a lot of the checks in pngstest.c to be correct; either correctly - written or not over-optimistic. The pngstest changes are insufficient to - allow all possible RGB transforms to be passed; pngstest cmppixel needs - to be rewritten to make it clearer which errors it allows and then changed - to permit known inaccuracies. - Removed tests for no-longer-used *_EMPTY_PLTE_SUPPORTED from pngstruct.h - Fixed fixed/float API export conditionals. 1) If FIXED_POINT or - FLOATING_POINT options were switched off, png.h ended up with lone ';' - characters. This is not valid ANSI-C outside a function. The ';' - characters have been moved inside the definition of PNG_FP_EXPORT and - PNG_FIXED_EXPORT. 2) If either option was switched off, the declaration - of the corresponding functions were completely omitted, even though some - of them are still used internally. The result is still valid, but - produces warnings from gcc with some warning options (including -Wall). The - fix is to cause png.h to declare the functions with PNG_INTERNAL_FUNCTION - when png.h is included from pngpriv.h. - Check for invalid palette index while reading paletted PNG. When one is - found, issue a warning and increase png_ptr->num_palette accordingly. - Apps are responsible for checking to see if that happened. - -Version 1.6.0beta12 [February 18, 2012] - Do not increase num_palette on invalid_index. - Relocated check for invalid palette index to pngrtran.c, after unpacking - the sub-8-bit pixels. - Fixed CVE-2011-3026 buffer overrun bug. This bug was introduced when - iCCP chunk support was added at libpng-1.0.6. Deal more correctly with the - test on iCCP chunk length. Also removed spurious casts that may hide - problems on 16-bit systems. - -Version 1.6.0beta13 [February 24, 2012] - Eliminated redundant png_push_read_tEXt|zTXt|iTXt|unknown code from - pngpread.c and use the sequential png_handle_tEXt, etc., in pngrutil.c; - now that png_ptr->buffer is inaccessible to applications, the special - handling is no longer useful. - Added PNG_SAFE_LIMITS feature to pnglibconf.dfa, pngpriv.h, and new - pngusr.dfa to reset the user limits to safe ones if PNG_SAFE_LIMITS is - defined. To enable, use "CPPFLAGS=-DPNG_SAFE_LIMITS_SUPPORTED=1" on the - configure command or put #define PNG_SAFE_LIMITS_SUPPORTED in - pnglibconf.h.prebuilt and pnglibconf.h. - -Version 1.6.0beta14 [February 27, 2012] - Added information about the new limits in the manual. - Updated Makefile.in - -Version 1.6.0beta15 [March 2, 2012] - Removed unused "current_text" members of png_struct and the png_free() - of png_ptr->current_text from pngread.c - Rewrote pngstest.c for substantial speed improvement. - Fixed transparent pixel and 16-bit rgb tests in pngstest and removed a - spurious check in pngwrite.c - Added PNG_IMAGE_FLAG_FAST for the benefit of applications that store - intermediate files, or intermediate in-memory data, while processing - image data with the simplified API. The option makes the files larger - but faster to write and read. pngstest now uses this by default; this - can be disabled with the --slow option. - Improved pngstest fine tuning of error numbers, new test file generator. - The generator generates images that test the full range of sample values, - allow the error numbers in pngstest to be tuned and checked. makepng - also allows generation of images with extra chunks, although this is - still work-in-progress. - Added check for invalid palette index while reading. - Fixed some bugs in ICC profile writing. The code should now accept - all potentially valid ICC profiles and reject obviously invalid ones. - It now uses png_error() to do so rather than casually writing a PNG - without the necessary color data. - Removed whitespace from the end of lines in all source files and scripts. - -Version 1.6.0beta16 [March 6, 2012] - Relocated palette-index checking function from pngrutil.c to pngtrans.c - Added palette-index checking while writing. - Changed png_inflate() and calling routines to avoid overflow problems. - This is an intermediate check-in that solves the immediate problems and - introduces one performance improvement (avoiding a copy via png_ptr->zbuf.) - Further changes will be made to make ICC profile handling more secure. - Fixed build warnings (MSVC, GCC, GCC v3). Cygwin GCC with default options - declares 'index' as a global, causing a warning if it is used as a local - variable. GCC 64-bit warns about assigning a (size_t) (unsigned 64-bit) - to an (int) (signed 32-bit). MSVC, however, warns about using the - unary '-' operator on an unsigned value (even though it is well defined - by ANSI-C to be ~x+1). The padding calculation was changed to use a - different method. Removed the tests on png_ptr->pass. - Added contrib/libtests/tarith.c to test internal arithmetic functions from - png.c. This is a libpng maintainer program used to validate changes to the - internal arithmetic functions. - Made read 'inflate' handling like write 'deflate' handling. The read - code now claims and releases png_ptr->zstream, like the write code. - The bug whereby the progressive reader failed to release the zstream - is now fixed, all initialization is delayed, and the code checks for - changed parameters on deflate rather than always calling - deflatedEnd/deflateInit. - Validate the zTXt strings in pngvalid. - Added code to validate the windowBits value passed to deflateInit2(). - If the call to deflateInit2() is wrong a png_warning will be issued - (in fact this is harmless, but the PNG data produced may be sub-optimal). - -Version 1.6.0beta17 [March 10, 2012] - Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition. - Reject all iCCP chunks after the first, even if the first one is invalid. - Deflate/inflate was reworked to move common zlib calls into single - functions [rw]util.c. A new shared keyword check routine was also added - and the 'zbuf' is no longer allocated on progressive read. It is now - possible to call png_inflate() incrementally. A warning is no longer - issued if the language tag or translated keyword in the iTXt chunk - has zero length. - If benign errors are disabled use maximum window on ancillary inflate. - This works round a bug introduced in 1.5.4 where compressed ancillary - chunks could end up with a too-small windowBits value in the deflate - header. - -Version 1.6.0beta18 [March 16, 2012] - Issue a png_benign_error() instead of png_warning() about bad palette index. - In pngtest, treat benign errors as errors if "-strict" is present. - Fixed an off-by-one error in the palette index checking function. - Fixed a compiler warning under Cygwin (Windows-7, 32-bit system) - Revised example.c to put text strings in a temporary character array - instead of directly assigning string constants to png_textp members. - This avoids compiler warnings when -Wwrite-strings is enabled. - Added output flushing to aid debugging under Visual Studio. Unfortunately - this is necessary because the VS2010 output window otherwise simply loses - the error messages on error (they weren't flushed to the window before - the process exited, apparently!) - Added configuration support for benign errors and changed the read - default. Also changed some warnings in the iCCP and sRGB handling - from to benign errors. Configuration now makes read benign - errors warnings and write benign errors to errors by default (thus - changing the behavior on read). The simplified API always forces - read benign errors to warnings (regardless of the system default, unless - this is disabled in which case the simplified API can't be built.) - -Version 1.6.0beta19 [March 18, 2012] - Work around for duplicate row start calls; added warning messages. - This turns on PNG_FLAG_DETECT_UNINITIALIZED to detect app code that - fails to call one of the 'start' routines (not enabled in libpng-1.5 - because it is technically an API change, since it did normally work - before.) It also makes duplicate calls to png_read_start_row (an - internal function called at the start of the image read) benign, as - they were before changes to use png_inflate_claim. Somehow webkit is - causing this to happen; this is probably a mis-feature in the zlib - changes so this commit is only a work-round. - Removed erroneous setting of DETECT_UNINITIALIZED and added more - checks. The code now does a png_error if an attempt is made to do the - row initialization twice; this is an application error and it has - serious consequences because the transform data in png_struct is - changed by each call. - Added application error reporting and added chunk names to read - benign errors; also added --strict to pngstest - not enabled - yet because a warning is produced. - Avoid the double gamma correction warning in the simplified API. - This allows the --strict option to pass in the pngstest checks - -Version 1.6.0beta20 [March 29, 2012] - Changed chunk handler warnings into benign errors, incrementally load iCCP - Added checksum-icc.c to contrib/tools - Prevent PNG_EXPAND+PNG_SHIFT doing the shift twice. - Recognize known sRGB ICC profiles while reading; prefer writing the - iCCP profile over writing the sRGB chunk, controlled by the - PNG_sRGB_PROFILE_CHECKS option. - Revised png_set_text_2() to avoid potential memory corruption (fixes - CVE-2011-3048, also known as CVE-2012-3425). - -Version 1.6.0beta21 [April 27, 2012] - Revised scripts/makefile.darwin: use system zlib; remove quotes around - architecture list; add missing ppc architecture; add architecture options - to shared library link; don't try to create a shared lib based on missing - RELEASE variable. - Enable png_set_check_for_invalid_index() for both read and write. - Removed #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED in pngpriv.h around - declaration of png_handle_unknown(). - Added -lssp_nonshared in a comment in scripts/makefile.freebsd - and changed deprecated NOOBJ and NOPROFILE to NO_OBJ and NO_PROFILE. - -Version 1.6.0beta22 [May 23, 2012] - Removed need for -Wno-cast-align with clang. clang correctly warns on - alignment increasing pointer casts when -Wcast-align is passed. This - fixes the cases that clang warns about either by eliminating the - casts from png_bytep to png_uint_16p (pngread.c), or, for pngrutil.c - where the cast is previously verified or pngstest.c where it is OK, by - introducing new png_aligncast macros to do the cast in a way that clang - accepts. - -Version 1.6.0beta23 [June 6, 2012] - Revised CMakeLists.txt to not attempt to make a symlink under mingw. - Made fixes for new optimization warnings from gcc 4.7.0. The compiler - performs an optimization which is safe; however it then warns about it. - Changing the type of 'palette_number' in pngvalid.c removes the warning. - Do not depend upon a GCC feature macro being available for use in generating - the linker mapfile symbol prefix. - Improved performance of new do_check_palette_indexes() function (only - update the value when it actually increases, move test for whether - the check is wanted out of the function. - -Version 1.6.0beta24 [June 7, 2012] - Don't check palette indexes if num_palette is 0 (as it can be in MNG files). - -Version 1.6.0beta25 [June 16, 2012] - Revised png_set_keep_unknown_chunks() so num_chunks < 0 means ignore all - unknown chunks and all known chunks except for IHDR, PLTE, tRNS, IDAT, - and IEND. Previously it only meant ignore all unknown chunks, the - same as num_chunks == 0. Revised png_image_skip_unused_chunks() to - provide a list of chunks to be processed instead of a list of chunks to - ignore. Revised contrib/gregbook/readpng2.c accordingly. - -Version 1.6.0beta26 [July 10, 2012] - Removed scripts/makefile.cegcc from the *.zip and *.7z distributions; it - depends on configure, which is not included in those archives. - Moved scripts/chkfmt to contrib/tools. - Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386. - -Version 1.6.0beta27 [August 11, 2012] - Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE when __GNUC__ < 3. - Do not use __restrict when GNUC is <= 3.1 - Removed references to png_zalloc() and png_zfree() from the manual. - Fixed configurations where floating point is completely disabled. Because - of the changes to support symbol prefixing PNG_INTERNAL_FUNCTION declares - floating point APIs during libpng builds even if they are completely - disabled. This requires the png floating point types (png_double*) to be - declared even though the functions are never actually defined. This - change provides a dummy definition so that the declarations work, yet any - implementation will fail to compile because of an incomplete type. - Re-eliminated the use of strcpy() in pngtest.c. An unnecessary use of - strcpy() was accidentally re-introduced in libpng16; this change replaces - it with strncpy(). - Eliminated use of png_sizeof(); use sizeof() instead. - Use a consistent style for (sizeof type) and (sizeof (array)) - Cleanup of png_set_filler(). This function does very different things on - read and write. In libpng 1.6 the two cases can be distinguished and - considerable code cleanup, and extra error checking, is possible. This - makes calls on the write side that have no effect be ignored with a - png_app_error(), which can be disabled in the app using - png_set_benign_errors(), and removes the spurious use of usr_channels - on the read side. - Insist on autotools 1.12.1 for git builds because there are security issues - with 1.12 and insisting on anything less would allow 1.12 to be used. - Removed info_ptr->signature[8] from WRITE-only builds. - Add some conditions for compiling png_fixed(). This is a small function - but it requires "-lm" on some platforms. - Cause pngtest --strict to fail on any warning from libpng (not just errors) - and cause it not to fail at the comparison step if libpng lacks support - for writing chunks that it reads from the input (currently only implemented - for compressed text chunks). - Make all three "make check" test programs work without READ or WRITE support. - Now "make check" will succeed even if libpng is compiled with -DPNG_NO_READ - or -DPNG_NO_WRITE. The tests performed are reduced, but the basic reading - and writing of a PNG file is always tested by one or more of the tests. - Consistently use strlen(), memset(), memcpy(), and memcmp() instead of the - png_strlen(), png_memset(), png_memcpy(), and png_memcmp() macros. - Removed the png_sizeof(), png_strlen(), png_memset(), png_memcpy(), and - png_memcmp() macros. - Work around gcc 3.x and Microsoft Visual Studio 2010 complaints. Both object - to the split initialization of num_chunks. - -Version 1.6.0beta28 [August 29, 2012] - Unknown handling fixes and clean up. This adds more correct option - control of the unknown handling, corrects the pre-existing bug where - the per-chunk 'keep' setting is ignored and makes it possible to skip - IDAT chunks in the sequential reader (broken in earlier 1.6 versions). - There is a new test program, test-unknown.c, which is a work in progress - (not currently part of the test suite). Comments in the header files now - explain how the unknown handling works. - Allow fine grain control of unknown chunk APIs. This change allows - png_set_keep_unknown_chunks() to be turned off if not required and causes - both read and write to behave appropriately (on read this is only possible - if the user callback is used to handle unknown chunks). The change - also removes the support for storing unknown chunks in the info_struct - if the only unknown handling enabled is via the callback, allowing libpng - to be configured with callback reading and none of the unnecessary code. - Corrected fix for unknown handling in pngtest. This reinstates the - libpng handling of unknown chunks other than vpAg and sTER (including - unsafe-to-copy chunks which were dropped before) and eliminates the - repositioning of vpAg and sTER in pngtest.png by changing pngtest.png - (so the chunks are where libpng would put them). - Added "tunknown" test and corrected a logic error in png_handle_unknown() - when SAVE support is absent. Moved the shell test scripts for - contrib/libtests from the libpng top directory to contrib/libtests. - png_handle_unknown() must always read or skip the chunk, if - SAVE_UNKNOWN_CHUNKS is turned off *and* the application does not set - a user callback an unknown chunk will not be read, leading to a read - error, which was revealed by the "tunknown" test. - Cleaned up and corrected ICC profile handling. - contrib/libtests/makepng: corrected 'rgb' and 'gray' cases. profile_error - messages could be truncated; made a correct buffer size calculation and - adjusted pngerror.c appropriately. png_icc_check_* checking improved; - changed the functions to receive the correct color type of the PNG on read - or write and check that it matches the color space of the profile (despite - what the comments said before, there is danger in assuming the app will - cope correctly with an RGB profile on a grayscale image and, since it - violates the PNG spec, allowing it is certain to produce inconsistent - app behavior and might even cause app crashes.) Check that profiles - contain the tags needed to process the PNG (tags all required by the ICC - spec). Removed unused PNG_STATIC from pngpriv.h. - -Version 1.6.0beta29 [September 4, 2012] - Fixed the simplified API example programs to add the *colormap parameter - to several of he API and improved the error message if the version field - is not set. - Added contrib/examples/* to the *.zip and *.7z distributions. - Updated simplified API synopses and description of the png_image structure - in the manual. - Made makepng and pngtest produce identical PNGs, add "--relaxed" option - to pngtest. The "--relaxed" option turns off the benign errors that are - enabled by default in pre-RC builds. makepng can now write ICC profiles - where the length has not been extended to a multiple of 4, and pngtest - now intercepts all libpng errors, allowing the previously-introduced - "--strict test" on no warnings to actually work. - Improved ICC profile handling including cHRM chunk generation and fixed - Cygwin+MSVC build errors. The ICC profile handling now includes more - checking. Several errors that caused rejection of the profile are now - handled with a warning in such a way that the invalid profiles will be - read by default in release (but not pre-RC) builds but will not be - written by default. The easy part of handling the cHRM chunk is written, - where the ICC profile contains the required data. The more difficult - part plus guessing a gAMA value requires code to pass selected RGB values - through the profile. - -Version 1.6.0beta30 [October 24, 2012] - Changed ICC profile matrix/vector types to not depend on array type rules. - By the ANSI-C standard the new types should be identical to the previous - versions, and all known versions of gcc tested with the previous versions - except for GCC-4.2.1 work with this version. The change makes the ANSI-C - rule that const applied to an array of elements applies instead to the - elements in the array moot by explicitly applying const to the base - elements of the png_icc_matrix and png_icc_vector types. The accidental - (harmless) 'const' previously applied to the parameters of two of the - functions have also been removed. - Added a work around for GCC 4.2 optimization bug. - Marked the broken (bad white point) original HP sRGB profiles correctly and - correct comments. - Added -DZ_SOLO to contrib/pngminim/*/makefile to work with zlib-1.2.7 - Use /MDd for vstudio debug builds. Also added pngunkown to the vstudio - builds, fixed build errors and corrected a minor exit code error in - pngvalid if the 'touch' file name is invalid. - Add updated WARNING file to projects/vstudio from libpng 1.5/vstudio - Fixed build when using #define PNG_NO_READ_GAMMA in png_do_compose() in - pngrtran.c (Domani Hannes). - -Version 1.6.0beta31 [November 1, 2012] - Undid the erroneous change to vstudio/pngvalid build in libpng-1.6.0beta30. - Made pngvalid so that it will build outside the libpng source tree. - Made builds -DPNG_NO_READ_GAMMA compile (the unit tests still fail). - Made PNG_NO_READ_GAMMA switch off interfaces that depend on READ_GAMMA. - Prior to 1.6.0 switching off READ_GAMMA did unpredictable things to the - interfaces that use it (specifically, png_do_background in 1.4 would - simply display composite for grayscale images but do composition - with the incorrect arithmetic for color ones). In 1.6 the semantic - of -DPNG_NO_READ_GAMMA is changed to simply disable any interface that - depends on it; this obliges people who set it to consider whether they - really want it off if they happen to use any of the interfaces in - question (typically most users who disable it won't). - Fixed GUIDs in projects/vstudio. Some were duplicated or missing, - resulting in VS2010 having to update the files. - Removed non-working ICC profile support code that was mostly added to - libpng-1.6.0beta29 and beta30. There was too much code for too little - gain; implementing full ICC color correction may be desirable but is left - up to applications. - -Version 1.6.0beta32 [November 25, 2012] - Fixed an intermittent SEGV in pngstest due to an uninitialized array element. - Added the ability for contrib/libtests/makepng.c to make a PNG with just one - color. This is useful for debugging pngstest color inaccuracy reports. - Fixed error checking in the simplified write API (Olaf van der Spek) - Made png_user_version_check() ok to use with libpng version 1.10.x and later. - -Version 1.6.0beta33 [December 15, 2012] - Fixed typo in png.c (PNG_SET_CHUNK_MALLOC_MAX should be PNG_CHUNK_MALLOC_MAX) - that causes the MALLOC_MAX limit not to work (John Bowler) - Change png_warning() to png_app_error() in pngwrite.c and comment the - fall-through condition. - Change png_warning() to png_app_warning() in png_write_tRNS(). - Rearranged the ARM-NEON optimizations: Isolated the machine specific code - to the hardware subdirectory and added comments to pngrutil.c so that - implementors of other optimizations know what to do. - Fixed cases of unquoted DESTDIR in Makefile.am - Rebuilt Makefile.in, etc., with autoconf-2.69 and automake-1.12.5. - -Version 1.6.0beta34 [December 19, 2012] - Cleaned up whitespace in the synopsis portion of the manpage "libpng.3" - Disassembled the version number in scripts/options.awk (necessary for - building on SunOs). - -Version 1.6.0beta35 [December 23, 2012] - Made default Zlib compression settings be configurable. This adds #defines to - pnglibconf.h to control the defaults. - Fixed Windows build issues, enabled ARM compilation. Various warnings issued - by earlier versions of GCC fixed for Cygwin and Min/GW (which both use old - GCCs.) ARM support is enabled by default in zlib.props (unsupported by - Microsoft) and ARM compilation is made possible by deleting the check for - x86. The test programs cannot be run because they are not signed. - -Version 1.6.0beta36 [January 2, 2013] - Discontinued distributing libpng-1.x.x.tar.bz2. - Discontinued distributing libpng-1.7.0-1.6.0-diff.txt and similar. - Rebuilt configure with autoconf-2.69 (inadvertently not done in beta33) - Fixed 'make distcheck' on SUN OS - libpng.so was not being removed - -Version 1.6.0beta37 [January 10, 2013] - Fixed conceivable but difficult to repro overflow. Also added two test - programs to generate and test a PNG which should have the problem. - -Version 1.6.0beta39 [January 19, 2013] - Again corrected attempt at overflow detection in png_set_unknown_chunks() - (CVE-2013-7353). Added overflow detection in png_set_sPLT() and - png_set_text_2() (CVE-2013-7354). - -Version 1.6.0beta40 [January 20, 2013] - Use consistent handling of overflows in text, sPLT and unknown png_set_* APIs - -Version 1.6.0rc01 [January 26, 2013] - No changes. - -Version 1.6.0rc02 [February 4, 2013] - Added png_get_palette_max() function. - -Version 1.6.0rc03 [February 5, 2013] - Fixed the png_get_palette_max API. - -Version 1.6.0rc04 [February 7, 2013] - Turn serial tests back on (recently turned off by autotools upgrade). - -Version 1.6.0rc05 [February 8, 2013] - Update manual about png_get_palette_max(). - -Version 1.6.0rc06 [February 9, 2013] - Fixed missing dependency in --prefix builds The intermediate - internal 'prefix.h' file can only be generated correctly after - pnglibconf.h, however the dependency was not in Makefile.am. The - symptoms are unpredictable depending on the order make chooses to - build pngprefix.h and pnglibconf.h, often the error goes unnoticed - because there is a system pnglibconf.h to use instead. - -Version 1.6.0rc07 [February 10, 2013] - Enclosed the new png_get_palette_max in #ifdef PNG_GET_PALETTE_MAX_SUPPORTED - block, and revised pnglibconf.h and pnglibconf.h.prebuilt accordingly. - -Version 1.6.0rc08 [February 10, 2013] - Fix typo in png.h #ifdef - -Version 1.6.0 [February 14, 2013] - No changes. - -Version 1.6.1beta01 [February 16, 2013] - Made symbol prefixing work with the ARM neon optimizations. Also allow - pngpriv.h to be included for preprocessor definitions only, so it can - be used in non-C/C++ files. Back ported from libpng 1.7. - Made sRGB check numbers consistent. - Ported libpng 1.5 options.awk/dfn file handling to 1.6, fixed one bug. - Removed cc -E workround, corrected png_get_palette_max API Tested on - SUN OS cc 5.9, which demonstrates the tokenization problem previously - avoided by using /lib/cpp. Since all .dfn output is now protected in - double quotes unless it is to be macro substituted the fix should - work everywhere. - Enabled parallel tests - back ported from libpng-1.7. - scripts/pnglibconf.dfa formatting improvements back ported from libpng17. - Fixed a race condition in the creation of the build 'scripts' directory - while building with a parallel make. - Use approved/supported Android method to check for NEON, use Linux/POSIX - 1003.1 API to check /proc/self/auxv avoiding buffer allocation and other - library calls (ported from libpng15). - -Version 1.6.1beta02 [February 19, 2013] - Use parentheses more consistently in "#if defined(MACRO)" tests. - Folded long lines. - Reenabled code to allow zero length PLTE chunks for MNG. - -Version 1.6.1beta03 [February 22, 2013] - Fixed ALIGNED_MEMORY support. - Added a new configure option: - --enable-arm-neon=always will stop the run-time checks. New checks - within arm/arm_init.c will cause the code not to be compiled unless - __ARM_NEON__ is set. This should make it fail safe (if someone asks - for it on then the build will fail if it can't be done.) - Updated the INSTALL document. - -Version 1.6.1beta04 [February 27, 2013] - Revised INSTALL to recommend using CPPFLAGS instead of INCLUDES. - Revised scripts/makefile.freebsd to respect ZLIBLIB and ZLIBINC. - Revised scripts/dfn.awk to work with the buggy MSYS awk that has trouble - with CRLF line endings. - -Version 1.6.1beta05 [March 1, 2013] - Avoid a possible memory leak in contrib/gregbook/readpng.c - -Version 1.6.1beta06 [March 4, 2013] - Better documentation of unknown handling API interactions. - Corrected Android builds and corrected libpng.vers with symbol - prefixing. It also makes those tests compile and link on Android. - Added an API png_set_option() to set optimization options externally, - providing an alternative and general solution for the non-portable - run-time tests used by the ARM Neon code, using the PNG_ARM_NEON option. - The order of settings vs options in pnglibconf.h is reversed to allow - settings to depend on options and options can now set (or override) the - defaults for settings. - -Version 1.6.1beta07 [March 7, 2013] - Corrected simplified API default gamma for color-mapped output, added - a flag to change default. In 1.6.0 when the simplified API was used - to produce color-mapped output from an input image with no gamma - information the gamma assumed for the input could be different from - that assumed for non-color-mapped output. In particular 16-bit depth - input files were assumed to be sRGB encoded, whereas in the 'direct' - case they were assumed to have linear data. This was an error. The - fix makes the simplified API treat all input files the same way and - adds a new flag to the png_image::flags member to allow the - application/user to specify that 16-bit files contain sRGB data - rather than the default linear. - Fixed bugs in the pngpixel and makepng test programs. - -Version 1.6.1beta08 [March 7, 2013] - Fixed CMakelists.txt to allow building a single variant of the library - (Claudio Bley): - Introduced a PNG_LIB_TARGETS variable that lists all activated library - targets. It is an error if this variable ends up empty, ie. you have - to build at least one library variant. - Made the *_COPY targets only depend on library targets actually being build. - Use PNG_LIB_TARGETS to unify a code path. - Changed the CREATE_SYMLINK macro to expect the full path to a file as the - first argument. When symlinking the filename component of that path is - determined and used as the link target. - Use copy_if_different in the CREATE_SYMLINK macro. - -Version 1.6.1beta09 [March 13, 2013] - Eliminated two warnings from the Intel C compiler. The warnings are - technically valid, although a reasonable treatment of division would - show it to be incorrect. - -Version 1.6.1rc01 [March 21, 2013] - No changes. - -Version 1.6.1 [March 28, 2013] - No changes. - -Version 1.6.2beta01 [April 14, 2013] - Updated documentation of 1.5.x to 1.6.x changes in iCCP chunk handling. - Fixed incorrect warning of excess deflate data. End condition - the - warning would be produced if the end of the deflate stream wasn't read - in the last row. The warning is harmless. - Corrected the test on user transform changes on read. It was in the - png_set of the transform function, but that doesn't matter unless the - transform function changes the rowbuf size, and that is only valid if - transform_info is called. - Corrected a misplaced closing bracket in contrib/libtests/pngvalid.c - (Flavio Medeiros). - Corrected length written to uncompressed iTXt chunks (Samuli Suominen). - Bug was introduced in libpng-1.6.0. - -Version 1.6.2rc01 [April 18, 2013] - Added contrib/tools/fixitxt.c, to repair the erroneous iTXt chunk length - written by libpng-1.6.0 and 1.6.1. - Disallow storing sRGB information when the sRGB is not supported. - -Version 1.6.2rc02 [April 18, 2013] - Merge pngtest.c with libpng-1.7.0 - -Version 1.6.2rc03 [April 22, 2013] - Trivial spelling cleanup. - -Version 1.6.2rc04 and 1.6.2rc05 [omitted] - -Version 1.6.2rc06 [April 24, 2013] - Reverted to version 1.6.2rc03. Recent changes to arm/neon support - have been ported to libpng-1.7.0beta09 and will reappear in version - 1.6.3beta01. - -Version 1.6.2 [April 25, 2013] - No changes. - -Version 1.6.3beta01 [April 25, 2013] - Revised stack marking in arm/filter_neon.S and configure.ac. - Ensure that NEON filter stuff is completely disabled when switched 'off'. - Previously the ARM NEON specific files were still built if the option - was switched 'off' as opposed to being explicitly disabled. - -Version 1.6.3beta02 [April 26, 2013] - Test for 'arm*' not just 'arm' in the host_cpu configure variable. - Rebuilt the configure scripts. - -Version 1.6.3beta03 [April 30, 2013] - Expanded manual paragraph about writing private chunks, particularly - the need to call png_set_keep_unknown_chunks() when writing them. - Avoid dereferencing NULL pointer possibly returned from - png_create_write_struct() (Andrew Church). - -Version 1.6.3beta05 [May 9, 2013] - Calculate our own zlib windowBits when decoding rather than trusting the - CMF bytes in the PNG datastream. - Added an option to force maximum window size for inflating, which was - the behavior of libpng15 and earlier, via a new PNG_MAXIMUM_INFLATE_WINDOW - option for png_set_options(). - Added png-fix-itxt and png-fix-too-far-back to the built programs and - removed warnings from the source code and timepng that are revealed as - a result. - Detect wrong libpng versions linked to png-fix-too-far-back, which currently - only works with libpng versions that can be made to reliably fail when - the deflate data contains an out-of-window reference. This means only - 1.6 and later. - Fixed gnu issues: g++ needs a static_cast, gcc 4.4.7 has a broken warning - message which it is easier to work round than ignore. - Updated contrib/pngminus/pnm2png.c (Paul Stewart): - Check for EOF - Ignore "#" delimited comments in input file to pnm2png.c. - Fixed whitespace handling - Added a call to png_set_packing() - Initialize dimension values so if sscanf fails at least we have known - invalid values. - Attempt to detect configuration issues with png-fix-too-far-back, which - requires both the correct libpng and the correct zlib to function - correctly. - Check ZLIB_VERNUM for mismatches, enclose #error in quotes - Added information in the documentation about problems with and fixes for - the bad CRC and bad iTXt chunk situations. - -Version 1.6.3beta06 [May 12, 2013] - Allow contrib/pngminus/pnm2png.c to compile without WRITE_INVERT and - WRITE_PACK supported (writes error message that it can't read P1 or - P4 PBM files). - Improved png-fix-too-far-back usage message, added --suffix option. - Revised contrib/pngminim/*/makefile to generate pnglibconf.h with the - right zlib header files. - Separated CPPFLAGS and CFLAGS in contrib/pngminim/*/makefile - -Version 1.6.3beta07 [June 8, 2013] - Removed a redundant test in png_set_IHDR(). - Added set(CMAKE_CONFIGURATION_TYPES ...) to CMakeLists.txt (Andrew Hundt) - Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt - Enclose the prototypes for the simplified write API in - #ifdef PNG_STDIO_SUPPORTED/#endif - Make ARM NEON support work at compile time (not just configure time). - This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when - using a compiler that compiles for multiple architectures at one time. - Removed PNG_FILTER_OPTIMIZATIONS and PNG_ARM_NEON_SUPPORTED from - pnglibconf.h, allowing more of the decisions to be made internally - (pngpriv.h) during the compile. Without this, symbol prefixing is broken - under certain circumstances on ARM platforms. Now only the API parts of - the optimizations ('check' vs 'api') are exposed in the public header files - except that the new setting PNG_ARM_NEON_OPT documents how libpng makes the - decision about whether or not to use the optimizations. - Protect symbol prefixing against CC/CPPFLAGS/CFLAGS usage. - Previous iOS/Xcode fixes for the ARM NEON optimizations moved the test - on __ARM_NEON__ from configure time to compile time. This breaks symbol - prefixing because the definition of the special png_init_filter_functions - call was hidden at configure time if the relevant compiler arguments are - passed in CFLAGS as opposed to CC. This change attempts to avoid all - the confusion that would result by declaring the init function even when - it is not used, so that it will always get prefixed. - -Version 1.6.3beta08 [June 18, 2013] - Revised libpng.3 so that "doclifter" can process it. - -Version 1.6.3beta09 [June 27, 2013] - Revised example.c to illustrate use of PNG_DEFAULT_sRGB and PNG_GAMMA_MAC_18 - as parameters for png_set_gamma(). These have been available since - libpng-1.5.4. - Renamed contrib/tools/png-fix-too-far-back.c to pngfix.c and revised it - to check all compressed chunks known to libpng. - -Version 1.6.3beta10 [July 5, 2013] - Updated documentation to show default behavior of benign errors correctly. - Only compile ARM code when PNG_READ_SUPPORTED is defined. - Fixed undefined behavior in contrib/tools/pngfix.c and added new strip - option. pngfix relied on undefined behavior and even a simple change from - gcc to g++ caused it to fail. The new strip option 'unsafe' has been - implemented and is the default if --max is given. Option names have - been clarified, with --strip=transform now stripping the bKGD chunk, - which was stripped previously with --strip=unused. - Added all documented chunk types to pngpriv.h - Unified pngfix.c source with libpng17. - -Version 1.6.3rc01 [July 11, 2013] - No changes. - -Version 1.6.3 [July 18, 2013] - Revised manual about changes in iTXt chunk handling made in libpng-1.6.0. - Added "/* SAFE */" comments in pngrutil.c and pngrtran.c where warnings - may be erroneously issued by code-checking applications. - -Version 1.6.4beta01 [August 21, 2013] - Added information about png_set_options() to the manual. - Delay calling png_init_filter_functions() until a row with nonzero filter - is found. - -Version 1.6.4beta02 [August 30, 2013] - Fixed inconsistent conditional compilation of png_chunk_unknown_handling() - prototype, definition, and usage. Made it depend on - PNG_HANDLE_AS_UNKNOWN_SUPPORTED everywhere. - -Version 1.6.4rc01 [September 5, 2013] - No changes. - -Version 1.6.4 [September 12, 2013] - No changes. - -Version 1.6.5 [September 14, 2013] - Removed two stray lines of code from arm/arm_init.c. - -Version 1.6.6 [September 16, 2013] - Removed two stray lines of code from arm/arm_init.c, again. - -Version 1.6.7beta01 [September 30, 2013] - Revised unknown chunk code to correct several bugs in the NO_SAVE_/NO_WRITE - combination - Allow HANDLE_AS_UNKNOWN to work when other options are configured off. Also - fixed the pngminim makefiles to work when $(MAKEFLAGS) contains stuff - which terminates the make options (as by default in recent versions of - Gentoo). - Avoid up-cast warnings in pngvalid.c. On ARM the alignment requirements of - png_modifier are greater than that of png_store and as a consequence - compilation of pngvalid.c results in a warning about increased alignment - requirements because of the bare cast to (png_modifier*). The code is safe, - because the pointer is known to point to a stack allocated png_modifier, - but this change avoids the warning. - Fixed default behavior of ARM_NEON_API. If the ARM NEON API option was - compiled without the CHECK option it defaulted to on, not off. - Check user callback behavior in pngunknown.c. Previous versions compiled - if SAVE_UNKNOWN was not available but did nothing since the callback - was never implemented. - Merged pngunknown.c with 1.7 version and back ported 1.7 improvements/fixes - -Version 1.6.7beta02 [October 12, 2013] - Made changes for compatibility with automake 1.14: - 1) Added the 'compile' program to the list of programs that must be cleaned - in autogen.sh - 2) Added 'subdir-objects' which causes .c files in sub-directories to be - compiled such that the corresponding .o files are also in the - sub-directory. This is because automake 1.14 warns that the - current behavior of compiling to the top level directory may be removed - in the future. - 3) Updated dependencies on pnglibconf.h to match the new .o locations and - added all the files in contrib/libtests and contrib/tools that depend - on pnglibconf.h - 4) Added 'BUILD_SOURCES = pnglibconf.h'; this is the automake recommended - way of handling the dependencies of sources that are machine generated; - unfortunately it only works if the user does 'make all' or 'make check', - so the dependencies (3) are still required. - Cleaned up (char*) casts of zlib messages. The latest version of the Intel C - compiler complains about casting a string literal as (char*), so copied the - treatment of z_const from the library code into pngfix.c - Simplified error message code in pngunknown. The simplification has the - useful side effect of avoiding a bogus warning generated by the latest - version of the Intel C compiler (it objects to - condition ? string-literal : string-literal). - Make autogen.sh work with automake 1.13 as well as 1.14. Do this by always - removing the 1.14 'compile' script but never checking for it. - -Version 1.6.7beta03 [October 19, 2013] - Added ARMv8 support (James Yu ). Added file - arm/filter_neon_intrinsics.c; enable with -mfpu=neon. - Revised pngvalid to generate size images with as many filters as it can - manage, limited by the number of rows. - Cleaned up ARM NEON compilation handling. The tests are now in pngpriv.h - and detect the broken GCC compilers. - -Version 1.6.7beta04 [October 26, 2013] - Allow clang derived from older GCC versions to use ARM intrinsics. This - causes all clang builds that use -mfpu=neon to use the intrinsics code, - not the assembler code. This has only been tested on iOS 7. It may be - necessary to exclude some earlier clang versions but this seems unlikely. - Changed NEON implementation selection mechanism. This allows assembler - or intrinsics to be turned on at compile time during the build by defining - PNG_ARM_NEON_IMPLEMENTATION to the correct value (2 or 1). This macro - is undefined by default and the build type is selected in pngpriv.h. - -Version 1.6.7rc01 [November 2, 2013] - No changes. - -Version 1.6.7rc02 [November 7, 2013] - Fixed #include in filter_neon_intrinsics.c and ctype macros. The ctype char - checking macros take an unsigned char argument, not a signed char. - -Version 1.6.7 [November 14, 2013] - No changes. - -Version 1.6.8beta01 [November 24, 2013] - Moved prototype for png_handle_unknown() in pngpriv.h outside of - the #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED/#endif block. - Added "-Wall" to CFLAGS in contrib/pngminim/*/makefile - Conditionally compile some unused functions reported by -Wall in - pngminim. - Fixed 'minimal' builds. Various obviously useful minimal configurations - don't build because of missing contrib/libtests test programs and - overly complex dependencies in scripts/pnglibconf.dfa. This change - adds contrib/conftest/*.dfa files that can be used in automatic build - scripts to ensure that these configurations continue to build. - Enabled WRITE_INVERT and WRITE_PACK in contrib/pngminim/encoder. - Fixed pngvalid 'fail' function declaration on the Intel C Compiler. - This reverts to the previous 'static' implementation and works round - the 'unused static function' warning by using PNG_UNUSED(). - -Version 1.6.8beta02 [November 30, 2013] - Removed or marked PNG_UNUSED some harmless "dead assignments" reported - by clang scan-build. - Changed tabs to 3 spaces in png_debug macros and changed '"%s"m' - to '"%s" m' to improve portability among compilers. - Changed png_free_default() to free() in pngtest.c - -Version 1.6.8rc01 [December 12, 2013] - Tidied up pngfix inits and fixed pngtest no-write builds. - -Version 1.6.8rc02 [December 14, 2013] - Handle zero-length PLTE chunk or NULL palette with png_error() - instead of png_chunk_report(), which by default issues a warning - rather than an error, leading to later reading from a NULL pointer - (png_ptr->palette) in png_do_expand_palette(). This is CVE-2013-6954 - and VU#650142. Libpng-1.6.1 through 1.6.7 are vulnerable. - Libpng-1.6.0 and earlier do not have this bug. - -Version 1.6.8 [December 19, 2013] - No changes. - -Version 1.6.9beta01 [December 26, 2013] - Bookkeeping: Moved functions around (no changes). Moved transform - function definitions before the place where they are called so that - they can be made static. Move the intrapixel functions and the - grayscale palette builder out of the png?tran.c files. The latter - isn't a transform function and is no longer used internally, and the - former MNG specific functions are better placed in pngread/pngwrite.c - Made transform implementation functions static. This makes the internal - functions called by png_do_{read|write}_transformations static. On an - x86-64 DLL build (Gentoo Linux) this reduces the size of the text - segment of the DLL by 1208 bytes, about 0.6%. It also simplifies - maintenance by removing the declarations from pngpriv.h and allowing - easier changes to the internal interfaces. - Rebuilt configure scripts with automake-1.14.1 and autoconf-2.69 - in the tar distributions. - -Version 1.6.9beta02 [January 1, 2014] - Added checks for libpng 1.5 to pngvalid.c. This supports the use of - this version of pngvalid in libpng 1.5 - Merged with pngvalid.c from libpng-1.7 changes to create a single - pngvalid.c - Removed #error macro from contrib/tools/pngfix.c (Thomas Klausner). - Merged pngrio.c, pngtrans.c, pngwio.c, and pngerror.c with libpng-1.7.0 - Merged libpng-1.7.0 changes to make no-interlace configurations work - with test programs. - Revised pngvalid.c to support libpng 1.5, which does not support the - PNG_MAXIMUM_INFLATE_WINDOW option, so #define it out when appropriate in - pngvalid.c - Allow unversioned links created on install to be disabled in configure. - In configure builds 'make install' changes/adds links like png.h - and libpng.a to point to the newly installed, versioned, files (e.g. - libpng17/png.h and libpng17.a). Three new configure options and some - rearrangement of Makefile.am allow creation of these links to be disabled. - -Version 1.6.9beta03 [January 10, 2014] - Removed potentially misleading warning from png_check_IHDR(). - -Version 1.6.9beta04 [January 20, 2014] - Updated scripts/makefile.* to use CPPFLAGS (Cosmin). - Added clang attribute support (Cosmin). - -Version 1.6.9rc01 [January 28, 2014] - No changes. - -Version 1.6.9rc02 [January 30, 2014] - Quiet an uninitialized memory warning from VC2013 in png_get_png(). - -Version 1.6.9 [February 6, 2014] - -Version 1.6.10beta01 [February 9, 2014] - Backported changes from libpng-1.7.0beta30 and beta31: - Fixed a large number of instances where PNGCBAPI was omitted from - function definitions. - Added pngimage test program for png_read_png() and png_write_png() - with two new test scripts. - Removed dependence on !PNG_READ_EXPAND_SUPPORTED for calling - png_set_packing() in png_read_png(). - Fixed combination of ~alpha with shift. On read invert alpha, processing - occurred after shift processing, which causes the final values to be - outside the range that should be produced by the shift. Reversing the - order on read makes the two transforms work together correctly and mirrors - the order used on write. - Do not read invalid sBIT chunks. Previously libpng only checked sBIT - values on write, so a malicious PNG writer could therefore cause - the read code to return an invalid sBIT chunk, which might lead to - application errors or crashes. Such chunks are now skipped (with - chunk_benign_error). - Make png_read_png() and png_write_png() prototypes in png.h depend - upon PNG_READ_SUPPORTED and PNG_WRITE_SUPPORTED. - Support builds with unsupported PNG_TRANSFORM_* values. All of the - PNG_TRANSFORM_* values are always defined in png.h and, because they - are used for both read and write in some cases, it is not reliable - to #if out ones that are totally unsupported. This change adds error - detection in png_read_image() and png_write_image() to do a - png_app_error() if the app requests something that cannot be done - and it adds corresponding code to pngimage.c to handle such options - by not attempting to test them. - -Version 1.6.10beta02 [February 23, 2014] - Moved redefines of png_error(), png_warning(), png_chunk_error(), - and png_chunk_warning() from pngpriv.h to png.h to make them visible - to libpng-calling applications. - Moved OS dependent code from arm/arm_init.c, to allow the included - implementation of the ARM NEON discovery function to be set at - build-time and provide sample implementations from the current code in the - contrib/arm-neon subdirectory. The __linux__ code has also been changed to - compile and link on Android by using /proc/cpuinfo, and the old linux code - is in contrib/arm-neon/linux-auxv.c. The new code avoids POSIX and Linux - dependencies apart from opening /proc/cpuinfo and is C90 compliant. - Check for info_ptr == NULL early in png_read_end() so we don't need to - run all the png_handle_*() and depend on them to return if info_ptr == NULL. - This improves the performance of png_read_end(png_ptr, NULL) and makes - it more robust against future programming errors. - Check for __has_extension before using it in pngconf.h, to - support older Clang versions (Jeremy Sequoia). - Treat CRC error handling with png_set_crc_action(), instead of with - png_set_benign_errors(), which has been the case since libpng-1.6.0beta18. - Use a user warning handler in contrib/gregbook/readpng2.c instead of default, - so warnings will be put on stderr even if libpng has CONSOLE_IO disabled. - Added png_ptr->process_mode = PNG_READ_IDAT_MODE in png_push_read_chunk - after recognizing the IDAT chunk, which avoids an infinite loop while - reading a datastream whose first IDAT chunk is of zero-length. - This fixes CERT VU#684412 and CVE-2014-0333. - Don't recognize known sRGB profiles as sRGB if they have been hacked, - but don't reject them and don't issue a copyright violation warning. - -Version 1.6.10beta03 [February 25, 2014] - Moved some documentation from png.h to libpng.3 and libpng-manual.txt - Minor editing of contrib/arm-neon/README and contrib/examples/*.c - -Version 1.6.10rc01 [February 27, 2014] - Fixed typos in the manual and in scripts/pnglibconf.dfa (CFLAGS -> CPPFLAGS - and PNG_USR_CONFIG -> PNG_USER_CONFIG). - -Version 1.6.10rc02 [February 28, 2014] - Removed unreachable return statement after png_chunk_error() - in pngrutil.c - -Version 1.6.10rc03 [March 4, 2014] - Un-deprecated png_data_freer(). - -Version 1.6.10 [March 6, 2014] - No changes. - -Version 1.6.11beta01 [March 17, 2014] - Use "if (value != 0)" instead of "if (value)" consistently. - Changed ZlibSrcDir from 1.2.5 to 1.2.8 in projects/vstudio. - Moved configuration information from the manual to the INSTALL file. - -Version 1.6.11beta02 [April 6, 2014] - Removed #if/#else/#endif from inside two pow() calls in pngvalid.c because - they were handled improperly by Portland Group's PGI-14.1 - PGI-14.3 - when using its "__builtin_pow()" function. - Silence 'unused parameter' build warnings (Cosmin Truta). - $(CP) is now used alongside $(RM_F). Also, use 'copy' instead of 'cp' - where applicable, and applied other minor makefile changes (Cosmin). - Don't warn about invalid dimensions exceeding user limits (Cosmin). - Allow an easy replacement of the default pre-built configuration - header with a custom header, via the make PNGLIBCONF_H_PREBUILT - macro (Cosmin). - -Version 1.6.11beta03 [April 6, 2014] - Fixed a typo in pngrutil.c, introduced in libpng-1.5.6, that interferes - with "blocky" expansion of sub-8-bit interlaced PNG files (Eric Huss). - Optionally use __builtin_bswap16() in png_do_swap(). - -Version 1.6.11beta04 [April 19, 2014] - Made progressive reading of interlaced images consistent with the - behavior of the sequential reader and consistent with the manual, by - moving some code out of the PNG_READ_INTERLACING_SUPPORTED blocks. The - row_callback now receives the proper pass number and unexpanded rows, when - png_combine_row() isn't built or used, and png_set_interlace_handling() - is not called. - Allow PNG_sRGB_PROFILE_CHECKING = (-1) to mean no sRGB profile checking. - -Version 1.6.11beta05 [April 26, 2014] - Do not reject ICC V2 profiles that lack padding (Kai-Uwe Behrmann). - Relocated closing bracket of the sRGB profile test loop to avoid getting - "Not recognizing known sRGB profile that has been edited" warning for - ICC V2 profiles that lack the MD5 signature in the profile header. - -Version 1.6.11beta06 [May 19, 2014] - Added PNG_SKIP_sRGB_CHECK_PROFILE choice for png_set_option(). - -Version 1.6.11rc01 [May 27, 2014] - No changes. - -Version 1.6.11rc02 [June 3, 2014] - Test ZLIB_VERNUM instead of PNG_ZLIB_VERNUM in contrib/tools/pngfix.c - -Version 1.6.11 [June 5, 2014] - No changes. - -Version 1.6.12rc01 [June 6, 2014] - Relocated new code from 1.6.11beta06 in png.c to a point after the - declarations (Max Stepin). - -Version 1.6.12rc02 [June 7, 2014] - Changed file permissions of contrib/tools/intgamma.sh, - test-driver, and compile from 0644 to 0755 (Cosmin). - -Version 1.6.12rc03 [June 8, 2014] - Ensure "__has_attribute()" macro exists before trying to use it with - old clang compilers (MacPorts Ticket #43939). - -Version 1.6.12 [June 12, 2014] - No changes. - -Version 1.6.13beta01 [July 4, 2014] - Quieted -Wsign-compare and -Wclobber compiler warnings in - contrib/pngminus/*.c - Added "(void) png_ptr;" where needed in contrib/gregbook to quiet - compiler complaints about unused pointers. - Split a long output string in contrib/gregbook/rpng2-x.c. - Added "PNG_SET_OPTION" requirement for sRGB chunk support to pnglibconf.dfa, - Needed for write-only support (John Bowler). - Changed "if defined(__ARM_NEON__)" to - "if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu). - Fixed clang no-warning builds: png_digit was defined but never used. - -Version 1.6.13beta02 [July 21, 2014] - Fixed an incorrect separator ("/" should be "\") in scripts/makefile.vcwin32 - (bug report from Wolfgang S. Kechel). Bug was introduced in libpng-1.6.11. - Also fixed makefile.bc32, makefile.bor, makefile.msc, makefile.intel, and - makefile.tc3 similarly. - -Version 1.6.13beta03 [August 3, 2014] - Removed scripts/makefile.elf. It has not worked since libpng-1.5.0beta14 - due to elimination of the PNG_FUNCTION_EXPORT and PNG_DATA_EXPORT - definitions from pngconf.h. - Ensure that CMakeLists.txt makes the target "lib" directory before making - symbolic link into it (SourceForge bug report #226 by Rolf Timmermans). - -Version 1.6.13beta04 [August 8, 2014] - Added opinion that the ECCN (Export Control Classification Number) for - libpng is EAR99 to the README file. - Eliminated use of "$<" in makefile explicit rules, when copying - $PNGLIBCONF_H_PREBUILT. This does not work on some versions of make; - bug introduced in libpng version 1.6.11. - -Version 1.6.13rc01 [August 14, 2014] - Made "ccopts" agree with "CFLAGS" in scripts/makefile.hp* and makefile.*sunu - -Version 1.6.13 [August 21, 2014] - No changes. - -Version 1.6.14beta01 [September 14, 2014] - Guard usage of png_ptr->options with #ifdef PNG_SET_OPTION_SUPPORTED. - Do not build contrib/tools/pngfix.c when PNG_SETJMP_NOT_SUPPORTED, - to allow "make" to complete without setjmp support (bug report by - Claudio Fontana) - Add "#include " to contrib/tools/pngfix.c (John Bowler) - -Version 1.6.14beta02 [September 18, 2014] - Use nanosleep() instead of usleep() in contrib/gregbook/rpng2-x.c - because usleep() is deprecated. - Define usleep() in contrib/gregbook/rpng2-x.c if not already defined - in unistd.h and nanosleep() is not available; fixes error introduced - in libpng-1.6.13. - Disable floating point exception handling in pngvalid.c when - PNG_FLOATING_ARITHMETIC is not supported (bug report by "zootus - at users.sourceforge.net"). - -Version 1.6.14beta03 [September 19, 2014] - Define FE_DIVBYZERO, FE_INVALID, and FE_OVERFLOW in pngvalid.c if not - already defined. Revert floating point exception handling in pngvalid.c - to version 1.6.14beta01 behavior. - -Version 1.6.14beta04 [September 27, 2014] - Fixed incorrect handling of the iTXt compression flag in pngrutil.c - (bug report by Shunsaku Hirata). Bug was introduced in libpng-1.6.0. - -Version 1.6.14beta05 [October 1, 2014] - Added "option READ_iCCP enables READ_COMPRESSED_TEXT" to pnglibconf.dfa - -Version 1.6.14beta06 [October 5, 2014] - Removed unused "text_len" parameter from private function png_write_zTXt(). - Conditionally compile some code in png_deflate_claim(), when - PNG_WARNINGS_SUPPORTED and PNG_ERROR_TEXT_SUPPORTED are disabled. - Replaced repeated code in pngpread.c with PNG_PUSH_SAVE_BUFFER_IF_FULL. - Added "chunk iTXt enables TEXT" and "chunk zTXt enables TEXT" - to pnglibconf.dfa. - Removed "option READ_COMPRESSED_TEXT enables READ_TEXT" from pnglibconf.dfa, - to make it possible to configure a libpng that supports iCCP but not TEXT. - -Version 1.6.14beta07 [October 7, 2014] - Removed "option WRITE_COMPRESSED_TEXT enables WRITE_TEXT" from pnglibconf.dfa - Only mark text chunks as written after successfully writing them. - -Version 1.6.14rc01 [October 15, 2014] - Fixed some typos in comments. - -Version 1.6.14rc02 [October 17, 2014] - Changed png_convert_to_rfc_1123() to png_convert_to_rfc_1123_buffer() - in the manual, to reflect the change made in libpng-1.6.0. - Updated README file to explain that direct access to the png_struct - and info_struct members has not been permitted since libpng-1.5.0. - -Version 1.6.14 [October 23, 2014] - No changes. - -Version 1.6.15beta01 [October 29, 2014] - Changed "if (!x)" to "if (x == 0)" and "if (x)" to "if (x != 0)" - Simplified png_free_data(). - Added missing "ptr = NULL" after some instances of png_free(). - -Version 1.6.15beta02 [November 1, 2014] - Changed remaining "if (!x)" to "if (x == 0)" and "if (x)" to "if (x != 0)" - -Version 1.6.15beta03 [November 3, 2014] - Added PNG_USE_ARM_NEON configuration flag (Marcin Juszkiewicz). - -Version 1.6.15beta04 [November 4, 2014] - Removed new PNG_USE_ARM_NEON configuration flag and made a one-line - revision to configure.ac to support ARM on aarch64 instead (John Bowler). - -Version 1.6.15beta05 [November 5, 2014] - Use png_get_libpng_ver(NULL) instead of PNG_LIBPNG_VER_STRING in - example.c, pngtest.c, and applications in the contrib directory. - Fixed an out-of-range read in png_user_version_check() (Bug report from - Qixue Xiao, CVE-2015-8540). - Simplified and future-proofed png_user_version_check(). - Fixed GCC unsigned int->float warnings. Various versions of GCC - seem to generate warnings when an unsigned value is implicitly - converted to double. This is probably a GCC bug but this change - avoids the issue by explicitly converting to (int) where safe. - Free all allocated memory in pngimage. The file buffer cache was left - allocated at the end of the program, harmless but it causes memory - leak reports from clang. - Fixed array size calculations to avoid warnings. At various points - in the code the number of elements in an array is calculated using - sizeof. This generates a compile time constant of type (size_t) which - is then typically assigned to an (unsigned int) or (int). Some versions - of GCC on 64-bit systems warn about the apparent narrowing, even though - the same compiler does apparently generate the correct, in-range, - numeric constant. This adds appropriate, safe, casts to make the - warnings go away. - -Version 1.6.15beta06 [November 6, 2014] - Reverted use png_get_libpng_ver(NULL) instead of PNG_LIBPNG_VER_STRING - in the manual, example.c, pngtest.c, and applications in the contrib - directory. It was incorrect advice. - -Version 1.6.15beta07 [November 7, 2014] - Removed #ifdef PNG_16BIT_SUPPORTED/#endif around png_product2(); it is - needed by png_reciprocal2(). - Added #ifdef PNG_16BIT_SUPPORTED/#endif around png_log16bit() and - png_do_swap(). - Changed all "#endif /* PNG_FEATURE_SUPPORTED */" to "#endif /* FEATURE */" - -Version 1.6.15beta08 [November 8, 2014] - More housecleaning in *.h - -Version 1.6.15rc01 [November 13, 2014] - -Version 1.6.15rc02 [November 14, 2014] - The macros passed in the command line to Borland make were ignored if - similarly-named macros were already defined in makefiles. This behavior - is different from POSIX make and other make programs. Surround the - macro definitions with ifndef guards (Cosmin). - -Version 1.6.15rc03 [November 16, 2014] - Added "-D_CRT_SECURE_NO_WARNINGS" to CFLAGS in scripts/makefile.vcwin32. - Removed the obsolete $ARCH variable from scripts/makefile.darwin. - -Version 1.6.15 [November 20, 2014] - No changes. - -Version 1.6.16beta01 [December 14, 2014] - Added ".align 2" to arm/filter_neon.S to support old GAS assemblers that - don't do alignment correctly. - Revised Makefile.am and scripts/symbols.dfn to work with MinGW/MSYS - (Bob Friesenhahn). - -Version 1.6.16beta02 [December 15, 2014] - Revised Makefile.am and scripts/*.dfn again to work with MinGW/MSYS; - renamed scripts/*.dfn to scripts/*.c (John Bowler). - -Version 1.6.16beta03 [December 21, 2014] - Quiet a "comparison always true" warning in pngstest.c (John Bowler). - -Version 1.6.16rc01 [December 21, 2014] - Restored a test on width that was removed from png.c at libpng-1.6.9 - (Bug report by Alex Eubanks, CVE-2015-0973). - -Version 1.6.16rc02 [December 21, 2014] - Undid the update to pngrutil.c in 1.6.16rc01. - -Version 1.6.16rc03 [December 21, 2014] - Fixed an overflow in png_combine_row() with very wide interlaced images - (Bug report and fix by John Bowler, CVE-2014-9495). - -Version 1.6.16 [December 22, 2014] - No changes. - -Version 1.6.17beta01 [January 29, 2015] - Removed duplicate PNG_SAFE_LIMITS_SUPPORTED handling from pngconf.h - Corrected the width limit calculation in png_check_IHDR(). - Removed user limits from pngfix. Also pass NULL pointers to - png_read_row to skip the unnecessary row de-interlace stuff. - Added testing of png_set_packing() to pngvalid.c - Regenerated configure scripts in the *.tar distributions with libtool-2.4.4 - Implement previously untested cases of libpng transforms in pngvalid.c - Fixed byte order in png_do_read_filler() with 16-bit input. Previously - the high and low bytes of the filler, from png_set_filler() or from - png_set_add_alpha(), were read in the wrong order. - Made the check for out-of-range values in png_set_tRNS() detect - values that are exactly 2^bit_depth, and work on 16-bit platforms. - Merged some parts of libpng-1.6.17beta01 and libpng-1.7.0beta47. - Added #ifndef __COVERITY__ where needed in png.c, pngrutil.c and - pngset.c to avoid warnings about dead code. - Added "& 0xff" to many instances of expressions that are typecast - to (png_byte), to avoid Coverity warnings. - -Version 1.6.17beta02 [February 7, 2015] - Work around one more Coverity-scan dead-code warning. - Do not build png_product2() when it is unused. - -Version 1.6.17beta03 [February 17, 2015] - Display user limits in the output from pngtest. - Eliminated the PNG_SAFE_LIMITS macro and restored the 1-million-column - and 1-million-row default limits in pnglibconf.dfa, that can be reset - by the user at build time or run time. This provides a more robust - defense against DOS and as-yet undiscovered overflows. - -Version 1.6.17beta04 [February 21, 2015] - Added PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED macro, on by default. - Allow user to call png_get_IHDR() with NULL arguments (Reuben Hawkins). - Rebuilt configure scripts with automake-1.15 and libtool-2.4.6 - -Version 1.6.17beta05 [February 25, 2015] - Restored compiling of png_reciprocal2 with PNG_NO_16BIT. - -Version 1.6.17beta06 [February 27, 2015] - Moved png_set_filter() prototype into a PNG_WRITE_SUPPORTED block - of png.h. - Avoid runtime checks when converting integer to png_byte with - Visual Studio (Sergey Kosarevsky) - -Version 1.6.17rc01 [March 4, 2015] - No changes. - -Version 1.6.17rc02 [March 9, 2015] - Removed some comments that the configure script did not handle - properly from scripts/pnglibconf.dfa and pnglibconf.h.prebuilt. - Free the unknown_chunks structure even when it contains no data. - -Version 1.6.17rc03 [March 12, 2015] - Updated CMakeLists.txt to add OSX framework, change YES/NO to ON/OFF - for consistency, and remove some useless tests (Alexey Petruchik). - -Version 1.6.17rc04 [March 16, 2015] - Remove pnglibconf.h, pnglibconf.c, and pnglibconf.out instead of - pnglibconf.* in "make clean" (Cosmin). - Fix bug in calculation of maxbits, in png_write_sBIT, introduced - in libpng-1.6.17beta01 (John Bowler). - -Version 1.6.17rc05 [March 21, 2015] - Define PNG_FILTER_* and PNG_FILTER_VALUE_* in png.h even when WRITE - is not supported (John Bowler). This fixes an error introduced in - libpng-1.6.17beta06. - Reverted "& 0xff" additions of version 1.6.17beta01. Libpng passes - the Coverity scan without them. - -Version 1.6.17rc06 [March 23, 2015] - Remove pnglibconf.dfn and pnglibconf.pre with "make clean". - Reformatted some "&0xff" instances to "& 0xff". - Fixed simplified 8-bit-linear to sRGB alpha. The calculated alpha - value was wrong. It's not clear if this affected the final stored - value; in the obvious code path the upper and lower 8-bits of the - alpha value were identical and the alpha was truncated to 8-bits - rather than dividing by 257 (John Bowler). - -Version 1.6.17 [March 26, 2015] - No changes. - -Version 1.6.18beta01 [April 1, 2015] - Removed PNG_SET_CHUNK_[CACHE|MALLOC]_LIMIT_SUPPORTED macros. They - have been combined with PNG_SET_USER_LIMITS_SUPPORTED (resolves - bug report by Andrew Church). - Fixed rgb_to_gray checks and added tRNS checks to pngvalid.c. This - fixes some arithmetic errors that caused some tests to fail on - some 32-bit platforms (Bug reports by Peter Breitenlohner [i686] - and Petr Gajdos [i586]). - -Version 1.6.18beta02 [April 26, 2015] - Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler - (Bug report by Viktor Szakats). - -Version 1.6.18beta03 [May 6, 2015] - Replaced "unexpected" with an integer (0xabadca11) in pngset.c - where a long was expected, to avoid a compiler warning when PNG_DEBUG > 1. - Added contrib/examples/simpleover.c, to demonstrate how to handle - alpha compositing of multiple images, using the "simplified API" - and an example PNG generation tool, contrib/examples/genpng.c - (John Bowler). - -Version 1.6.18beta04 [May 20, 2015] - PNG_RELEASE_BUILD replaces tests where the code depended on the build base - type and can be defined on the command line, allowing testing in beta - builds (John Bowler). - Avoid Coverity issue 80858 (REVERSE NULL) in pngtest.c PNG_DEBUG builds. - Avoid a harmless potential integer overflow in png_XYZ_from_xy() (Bug - report from Christopher Ferris). - -Version 1.6.18beta05 [May 31, 2015] - Backport filter selection code from libpng-1.7.0beta51, to combine - sub_row, up_row, avg_row, and paeth_row into try_row and tst_row. - Changed png_voidcast(), etc., to voidcast(), etc., in contrib/tools/pngfix.c - to avoid confusion with the libpng private macros. - Fixed old cut&paste bug in the weighted filter selection code in - pngwutil.c, introduced in libpng-0.95, March 1997. - -Version 1.6.18beta06 [June 1, 2015] - Removed WRITE_WEIGHTED_FILTERED code, to save a few kbytes of the - compiled library size. It never worked properly and as far as we can - tell, no one uses it. The png_set_filter_heuristics() and - png_set_filter_heuristics_fixed() APIs are retained but deprecated - and do nothing. - -Version 1.6.18beta07 [June 6, 2015] - Removed non-working progressive reader 'skip' function. This - function has apparently never been used. It was implemented - to support back-door modification of png_struct in libpng-1.4.x - but (because it does nothing and cannot do anything) was apparently - never tested (John Bowler). - Fixed cexcept.h in which GCC 5 now reports that one of the auto - variables in the Try macro needs to be volatile to prevent value - being lost over the setjmp (John Bowler). - Fixed NO_WRITE_FILTER and -Wconversion build breaks (John Bowler). - Fix g++ build breaks (John Bowler). - Quieted some Coverity issues in pngfix.c, png-fix-itxt.c, pngvalid.c, - pngstest.c, and pngimage.c. Most seem harmless, but png-fix-itxt - would only work with iTXt chunks with length 255 or less. - Added #ifdef's to contrib/examples programs so people don't try - to compile them without the minimum required support enabled - (suggested by Flavio Medeiros). - -Version 1.6.18beta08 [June 30, 2015] - Eliminated the final two Coverity defects (insecure temporary file - handling in contrib/libtests/pngstest.c; possible overflow of - unsigned char in contrib/tools/png-fix-itxt.c). To use the "secure" - file handling, define PNG_USE_MKSTEMP, otherwise "tmpfile()" will - be used. - Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h - -Version 1.6.18beta09 [July 5, 2015] - Removed some useless typecasts from contrib/tools/png-fix-itxt.c - Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin). - Replaced arbitrary use of 'extern' with #define PNG_LINKAGE_*. To - preserve API compatibility, the new defines all default to "extern" - (requested by Jan Nijtmans). - -Version 1.6.18rc01 [July 9, 2015] - Belatedly added Mans Rullgard and James Yu to the list of Contributing - Authors. - -Version 1.6.18rc02 [July 12, 2015] - Restored unused FILTER_HEURISTIC macros removed at libpng-1.6.18beta08 - to png.h to avoid compatibility warnings. - -Version 1.6.18rc03 [July 15, 2015] - Minor changes to the man page - -Version 1.6.18 [July 23, 2015] - No changes. - -Version 1.6.19beta01 [July 30, 2015] - Updated obsolete information about the simplified API macros in the - manual pages (Bug report by Arc Riley). - Avoid potentially dereferencing NULL info_ptr in png_info_init_3(). - Rearranged png.h to put the major sections in the same order as - in libpng17. - Eliminated unused PNG_COST_SHIFT, PNG_WEIGHT_SHIFT, PNG_COST_FACTOR, and - PNG_WEIGHT_FACTOR macros. - Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler - (Bug report by Viktor Szakats). Several warnings remain and are - unavoidable, where we test for overflow. - Fixed potential leak of png_pixels in contrib/pngminus/pnm2png.c - Fixed uninitialized variable in contrib/gregbook/rpng2-x.c - -Version 1.6.19beta02 [August 19, 2015] - Moved config.h.in~ from the "libpng_autotools_files" list to the - "libpng_autotools_extra" list in autogen.sh because it was causing a - false positive for missing files (bug report by Robert C. Seacord). - Removed unreachable "break" statements in png.c, pngread.c, and pngrtran.c - to suppress clang warnings (Bug report by Viktor Szakats). - Fixed some bad links in the man page. - Changed "n bit" to "n-bit" in comments. - Added signed/unsigned 16-bit safety net. This removes the dubious - 0x8000 flag definitions on 16-bit systems. They aren't supported - yet the defs *probably* work, however it seems much safer to do this - and be advised if anyone, contrary to advice, is building libpng 1.6 - on a 16-bit system. It also adds back various switch default clauses - for GCC; GCC errors out if they are not present (with an appropriately - high level of warnings). - Safely convert num_bytes to a png_byte in png_set_sig_bytes() (Robert - Seacord). - Fixed the recently reported 1's complement security issue by replacing - the value that is illegal in the PNG spec, in both signed and unsigned - values, with 0. Illegal unsigned values (anything greater than or equal - to 0x80000000) can still pass through, but since these are not illegal - in ANSI-C (unlike 0x80000000 in the signed case) the checking that - occurs later can catch them (John Bowler). - -Version 1.6.19beta03 [September 26, 2015] - Fixed png_save_int_32 when int is not 2's complement (John Bowler). - Updated libpng16 with all the recent test changes from libpng17, - including changes to pngvalid.c to ensure that the original, - distributed, version of contrib/visupng/cexcept.h can be used - (John Bowler). - pngvalid contains the correction to the use of SAVE/STORE_ - UNKNOWN_CHUNKS; a bug revealed by changes in libpng 1.7. More - tests contain the --strict option to detect warnings and the - pngvalid-standard test has been corrected so that it does not - turn on progressive-read. There is a separate test which does - that. (John Bowler) - Also made some signed/unsigned fixes. - Make pngstest error limits version specific. Splitting the machine - generated error structs out to a file allows the values to be updated - without changing pngstest.c itself. Since libpng 1.6 and 1.7 have - slightly different error limits this simplifies maintenance. The - makepngs.sh script has also been updated to more accurately reflect - current problems in libpng 1.7 (John Bowler). - Incorporated new test PNG files into make check. tests/pngstest-* - are changed so that the new test files are divided into 8 groups by - gamma and alpha channel. These tests have considerably better code - and pixel-value coverage than contrib/pngsuite; however,coverage is - still incomplete (John Bowler). - Removed the '--strict' in 1.6 because of the double-gamma-correction - warning, updated pngstest-errors.h for the errors detected with the - new contrib/testspngs PNG test files (John Bowler). - -Version 1.6.19beta04 [October 15, 2015] - Worked around rgb-to-gray issues in libpng 1.6. The previous - attempts to ignore the errors in the code aren't quite enough to - deal with the 'channel selection' encoding added to libpng 1.7; abort. - pngvalid.c is changed to drop this encoding in prior versions. - Fixed 'pow' macros in pngvalid.c. It is legal for 'pow' to be a - macro, therefore the argument list cannot contain preprocessing - directives. Make sure pow is a function where this happens. This is - a minimal safe fix, the issue only arises in non-performance-critical - code (bug report by Curtis Leach, fix by John Bowler). - Added sPLT support to pngtest.c - -Version 1.6.19rc01 [October 23, 2015] - No changes. - -Version 1.6.19rc02 [October 31, 2015] - Prevent setting or writing over-length PLTE chunk (Cosmin Truta). - Silently truncate over-length PLTE chunk while reading. - Libpng incorrectly calculated the output rowbytes when the application - decreased either the number of channels or the bit depth (or both) in - a user transform. This was safe; libpng overallocated buffer space - (potentially by quite a lot; up to 4 times the amount required) but, - from 1.5.4 on, resulted in a png_error (John Bowler). - -Version 1.6.19rc03 [November 3, 2015] - Fixed some inconsequential cut-and-paste typos in png_set_cHRM_XYZ_fixed(). - Clarified COPYRIGHT information to state explicitly that versions - are derived from previous versions. - Removed much of the long list of previous versions from png.h and - libpng.3. - -Version 1.6.19rc04 [November 5, 2015] - Fixed new bug with CRC error after reading an over-length palette - (bug report by Cosmin Truta) (CVE-2015-8126). - -Version 1.6.19 [November 12, 2015] - Cleaned up coding style in png_handle_PLTE(). - -Version 1.6.20beta01 [November 20, 2015] - Avoid potential pointer overflow/underflow in png_handle_sPLT() and - png_handle_pCAL() (Bug report by John Regehr). - -Version 1.6.20beta02 [November 23, 2015] - Fixed incorrect implementation of png_set_PLTE() that uses png_ptr - not info_ptr, that left png_set_PLTE() open to the CVE-2015-8126 - vulnerability. Fixes CVE-2015-8472. - -Version 1.6.20beta03 [November 24, 2015] - Backported tests from libpng-1.7.0beta69. - -Version 1.6.20rc01 [November 26, 2015] - Fixed an error in handling of bad zlib CMINFO field in pngfix, found by - American Fuzzy Lop, reported by Brian Carpenter. inflate() doesn't - immediately fault a bad CMINFO field; instead a 'too far back' error - happens later (at least some times). pngfix failed to limit CMINFO to - the allowed values but then assumed that window_bits was in range, - triggering an assert. The bug is mostly harmless; the PNG file cannot - be fixed. - -Version 1.6.20rc02 [November 29, 2015] - In libpng 1.6 zlib initialization was changed to use the window size - in the zlib stream, not a fixed value. This causes some invalid images, - where CINFO is too large, to display 'correctly' if the rest of the - data is valid. This provides a workaround for zlib versions where the - error arises (ones that support the API change to use the window size - in the stream). - -Version 1.6.20 [December 3, 2015] - No changes. - -Version 1.6.21beta01 [December 11, 2015] - Fixed syntax "$(command)" in tests/pngstest that some shells other than - bash could not parse (Bug report by Nelson Beebe). Use `command` instead. - -Version 1.6.21beta02 [December 14, 2015] - Moved png_check_keyword() from pngwutil.c to pngset.c - Removed LE/BE dependencies in pngvalid, to 'fix' the current problem - in the BigEndian tests by not testing it, making the BE code the same - as the LE version. - Fixes to pngvalid for various reduced build configurations (eliminate unused - statics) and a fix for the case in rgb_to_gray when the digitize option - reduces graylo to 0, producing a large error. - -Version 1.6.21beta03 [December 18, 2015] - Widened the 'limit' check on the internally calculated error limits in - the 'DIGITIZE' case (the code used prior to 1.7 for rgb_to_gray error - checks) and changed the check to only operate in non-release builds - (base build type not RC or RELEASE.) - Fixed undefined behavior in pngvalid.c, undefined because - (png_byte) << shift is undefined if it changes the signed bit - (because png_byte is promoted to int). The libpng exported functions - png_get_uint_32 and png_get_uint_16 handle this. (Bug reported by - David Drysdale as a result of reports from UBSAN in clang 3.8). - This changes pngvalid to use BE random numbers; this used to produce - errors but these should not be fixed as a result of the previous changes. - -Version 1.6.21rc01 [January 4, 2016] - In projects/vstudio, combined readme.txt and WARNING into README.txt - -Version 1.6.21rc02 [January 7, 2016] - Relocated assert() in contrib/tools/pngfix.c, bug found by American - Fuzzy Lop, reported by Brian Carpenter. - Marked 'limit' UNUSED in transform_range_check(). This only affects - release builds. - -Version 1.6.21 [January 15, 2016] - Worked around a false-positive Coverity issue in pngvalid.c. - -Version 1.6.22beta01 [January 23, 2016] - Changed PNG_USE_MKSTEMP to __COVERITY__ to select alternate - "tmpfile()" implementation in contrib/libtests/pngstest.c - Fixed NO_STDIO build of pngunknown.c to skip calling png_init_io() - if there is no stdio.h support. - Added a png_image_write_to_memory() API and a number of assist macros - to allow an application that uses the simplified API write to bypass - stdio and write directly to memory. - Added some warnings (png.h) and some check code to detect *possible* - overflow in the ROW_STRIDE and simplified image SIZE macros. This - disallows image width/height/format that *might* overflow. This is - a quiet API change that limits in-memory image size (uncompressed) to - less than 4GByte and image row size (stride) to less than 2GByte. - Revised workaround for false-positive Coverity issue in pngvalid.c. - -Version 1.6.22beta02 [February 8, 2016] - Only use exit(77) in configure builds. - Corrected error in PNG_IMAGE_PNG_SIZE_MAX. This new macro underreported - the palette size because it failed to take into account that the memory - palette has to be expanded to full RGB when it is written to PNG. - Updated CMakeLists.txt, added supporting scripts/gen*.cmake.in - and test.cmake.in (Roger Leigh). - Relaxed limit checks on gamma values in pngrtran.c. As suggested in - the comments gamma values outside the range currently permitted - by png_set_alpha_mode are useful for HDR data encoding. These values - are already permitted by png_set_gamma so it is reasonable caution to - extend the png_set_alpha_mode range as HDR imaging systems are starting - to emerge. - -Version 1.6.22beta03 [March 9, 2016] - Added a common-law trademark notice and export control information - to the LICENSE file, png.h, and the man page. - Restored "& 0xff" in png_save_uint_16() and png_save_uint_32() that - were accidentally removed from libpng-1.6.17. - Changed PNG_INFO_cHNK and PNG_FREE_cHNK from 0xnnnn to 0xnnnnU in png.h - (Robert C. Seacord). - Removed dubious "#if INT_MAX" test from png.h that was added to - libpng-1.6.19beta02 (John Bowler). - Add ${INCLUDES} in scripts/genout.cmake.in (Bug report by Nixon Kwok). - Updated LICENSE to say files in the contrib directory are not - necessarily under the libpng license, and that some makefiles have - other copyright owners. - Added INTEL-SSE2 support (Mike Klein and Matt Sarett, Google, Inc.). - Made contrib/libtests/timepng more robust. The code no longer gives - up/fails on invalid PNG data, it just skips it (with error messages). - The code no longer fails on PNG files with data beyond IEND. Options - exist to use png_read_png (reading the whole image, not by row) and, in - that case, to apply any of the supported transforms. This makes for - more realistic testing; the decoded data actually gets used in a - meaningful fashion (John Bowler). - Fixed some misleading indentation (Krishnaraj Bhat). - -Version 1.6.22beta04 [April 5, 2016] - Force GCC compilation to C89 if needed (Dagobert Michelsen). - SSE filter speed improvements for bpp=3: - memcpy-free implementations of load3() / store3(). - call load3() only when needed at the end of a scanline. - -Version 1.6.22beta05 [April 27, 2016] - Added PNG_FAST_FILTERS macro (defined as - PNG_FILTER_NONE|PNG_FILTER_SUB|PNG_FILTER_UP). - Various fixes for contrib/libtests/timepng.c - Moved INTEL-SSE code from pngpriv.h into contrib/intel/intel_sse.patch. - Fixed typo (missing underscore) in #define PNG_READ_16_TO_8_SUPPORTED - (Bug report by Y.Ohashik). - -Version 1.6.22beta06 [May 5, 2016] - Rebased contrib/intel_sse.patch. - Quieted two Coverity issues in contrib/libtests/timepng.c. - Fixed issues with scripts/genout.cmake.in (David Capello, Nixon Kwok): - Added support to use multiple directories in ZLIBINCDIR variable, - Fixed CMAKE_C_FLAGS with multiple values when genout is compiled on MSVC, - Fixed pnglibconf.c compilation on OS X including the sysroot path. - -Version 1.6.22rc01 [May 14, 2016] - No changes. - -Version 1.6.22rc02 [May 16, 2016] - Removed contrib/timepng from default build; it does not build on platforms - that don't supply clock_gettime(). - -Version 1.6.22rc03 [May 17, 2016] - Restored contrib/timepng to default build but check for the presence - of clock_gettime() in configure.ac and Makefile.am. - -Version 1.6.22 [May 26, 2016] - No changes. - -Version 1.6.23beta01 [May 29, 2016] - Stop a potential memory leak in png_set_tRNS() (Bug report by Ted Ying). - Fixed the progressive reader to handle empty first IDAT chunk properly - (patch by Timothy Nikkel). This bug was introduced in libpng-1.6.0 and - only affected the libpng16 branch. - Added tests in pngvalid.c to check zero-length IDAT chunks in various - positions. Fixed the sequential reader to handle these more robustly - (John Bowler). - -Version 1.6.23rc01 [June 2, 2016] - Corrected progressive read input buffer in pngvalid.c. The previous version - the code invariably passed just one byte at a time to libpng. The intent - was to pass a random number of bytes in the range 0..511. - Moved sse2 prototype from pngpriv.h to contrib/intel/intel_sse.patch. - Added missing ")" in pngerror.c (Matt Sarrett). - -Version 1.6.23rc02 [June 4, 2016] - Fixed undefined behavior in png_push_save_buffer(). Do not call - memcpy() with a null source, even if count is zero (Leon Scroggins III). - -Version 1.6.23 [June 9, 2016] - Fixed bad link to RFC2083 in png.5 (Nikola Forro). - -Version 1.6.24beta01 [June 11, 2016] - Avoid potential overflow of the PNG_IMAGE_SIZE macro. This macro - is not used within libpng, but is used in some of the examples. - -Version 1.6.24beta02 [June 23, 2016] - Correct filter heuristic overflow handling. This was broken when the - write filter code was moved out-of-line; if there is a single filter and - the heuristic sum overflows the calculation of the filtered line is not - completed. In versions prior to 1.6 the code was duplicated in-line - and the check not performed, so the filter operation completed; however, - in the multi-filter case where the sum is performed the 'none' filter would - be selected if all the sums overflowed, even if it wasn't in the filter - list. The fix to the first problem is simply to provide PNG_SIZE_MAX as - the current lmins sum value; this means the sum can never exceed it and - overflows silently. A reasonable compiler that does choose to inline - the code will simply eliminate the sum check. - The fix to the second problem is to use high precision arithmetic (this is - implemented in 1.7), however a simple safe fix here is to chose the lowest - numbered filter in the list from png_set_filter (this only works if the - first problem is also fixed) (John Bowler). - Use a more efficient absolute value calculation on SSE2 (Matthieu Darbois). - Fixed the case where PNG_IMAGE_BUFFER_SIZE can overflow in the application - as a result of the application using an increased 'row_stride'; previously - png_image_finish_read only checked for overflow on the base calculation of - components. (I.e. it checked for overflow of a 32-bit number on the total - number of pixel components in the output format, not the possibly padded row - length and not the number of bytes, which for linear formats is twice the - number of components.) - MSVC does not like '-(unsigned)', so replaced it with 0U-(unsigned) - MSVC does not like (uInt) = -(unsigned) (i.e. as an initializer), unless - the conversion is explicitly invoked by a cast. - Put the SKIP definition in the correct place. It needs to come after the - png.h include (see all the other .c files in contrib/libtests) because it - depends on PNG_LIBPNG_VER. - Removed the three compile warning options from the individual project - files into the zlib.props globals. It increases the warning level from 4 - to All and adds a list of the warnings that need to be turned off. This is - semi-documentary; the intent is to tell libpng users which warnings have - been examined and judged non-fixable at present. The warning about - structure padding is fixable, but it would be a significant change (moving - structure members around). - -Version 1.6.24beta03 [July 4, 2016] - Optimized absolute value calculation in filter selection, similar to - code in the PAETH decoder in pngrutil.c. Build with PNG_USE_ABS to - use this. - Added pngcp to the build together with a pngcp.dfa configuration test. - Added high resolution timing to pngcp. - Added "Common linking failures" section to INSTALL. - Relocated misplaced #endif in png.c sRGB profile checking. - Fixed two Coverity issues in pngcp.c. - -Version 1.6.24beta04 [July 8, 2016] - Avoid filter-selection heuristic sum calculations in cases where only one - filter is a candidate for selection. This trades off code size (added - private png_setup_*_row_only() functions) for speed. - -Version 1.6.24beta05 [July 13, 2016] - Fixed some indentation to comply with our coding style. - Added contrib/tools/reindent. - -Version 1.6.24beta06 [July 18, 2016] - Fixed more indentation to comply with our coding style. - Eliminated unnecessary tests of boolean png_isaligned() vs 0. - -Version 1.6.24rc01 [July 25, 2016] - No changes. - -Version 1.6.24rc02 [August 1, 2016] - Conditionally compile SSE2 headers in contrib/intel/intel_sse.patch - Conditionally compile png_decompress_chunk(). - -Version 1.6.24rc03 [August 2, 2016] - Conditionally compile ARM_NEON headers in pngpriv.h - Updated contrib/intel/intel_sse.patch - -Version 1.6.24[August 4, 2016] - No changes. - -Version 1.6.25beta01 [August 12, 2016] - Reject oversized iCCP profile immediately. - Cleaned up PNG_DEBUG compile of pngtest.c. - Conditionally compile png_inflate(). - -Version 1.6.25beta02 [August 18, 2016] - Don't install pngcp; it conflicts with pngcp in the pngtools package. - Minor editing of INSTALL, (whitespace, added copyright line) - -Version 1.6.25rc01 [August 24, 2016] - No changes. - -Version 1.6.25rc02 [August 29, 2016] - Added MIPS support (Mandar Sahastrabuddhe ). - Only the UP filter is currently implemented. - -Version 1.6.25rc03 [August 29, 2016] - Rebased contrib/intel/intel_sse.patch after the MIPS implementation. - -Version 1.6.25rc04 [August 30, 2016] - Added MIPS support for SUB, AVG, and PAETH filters (Mandar Sahastrabuddhe). - -Version 1.6.25rc05 [August 30, 2016] - Rebased contrib/intel/intel_sse.patch after the MIPS implementation update.. - -Version 1.6.25 [September 1, 2016] - No changes. - -Version 1.6.26beta01 [September 26, 2016] - Fixed handling zero length IDAT in pngfix (bug report by Agostino Sarubbo, - bugfix by John Bowler). - Do not issue a png_error() on read in png_set_pCAL() because png_handle_pCAL - has allocated memory that libpng needs to free. - Conditionally compile png_set_benign_errors() in pngread.c and pngtest.c - Issue a png_benign_error instead of a png_error on ADLER32 mismatch - while decoding compressed data chunks. - Changed PNG_ZLIB_VERNUM to ZLIB_VERNUM in pngpriv.h, pngstruct.h, and - pngrutil.c. - If CRC handling of critical chunks has been set to PNG_CRC_QUIET_USE, - ignore the ADLER32 checksum in the IDAT chunk as well as the chunk CRCs. - Issue png_benign_error() on ADLER32 checksum mismatch instead of png_error(). - Add tests/badcrc.png and tests/badadler.png to tests/pngtest. - Merged pngtest.c with libpng-1.7.0beta84/pngtest.c - -Version 1.6.26beta02 [October 1, 2016] - Updated the documentation about CRC and ADLER32 handling. - Quieted 117 warnings from clang-3.8 in pngtrans.c, pngread.c, - pngwrite.c, pngunknown.c, and pngvalid.c. - Quieted 58 (out of 144) -Wconversion compiler warnings by changing - flag definitions in pngpriv.h from 0xnnnn to 0xnnnnU and trivial changes - in png.c, pngread.c, and pngwutil.c. - -Version 1.6.26beta03 [October 2, 2016] - Removed contrib/libtests/*.orig and *.rej that slipped into the tarballs. - Quieted the 86 remaining -Wconversion compiler warnings by - revising the png_isaligned() macro and trivial changes in png.c, - pngerror.c, pngget.c, pngmem.c, pngset.c, pngrtran.c, pngrutil.c, - pngwtran.c, pngwrite.c, and pngwutil.c. - -Version 1.6.26beta04 [October 3, 2016] - Quieted (bogus?) clang warnings about "absolute value has no effect" - when PNG_USE_ABS is defined. - Fixed offsets in contrib/intel/intel_sse.patch - -Version 1.6.26beta05 [October 6, 2016] - Changed integer constant 4294967294 to unsigned 4294967294U in pngconf.h - to avoid a signed/unsigned compare in the preprocessor. - -Version 1.6.26beta06 [October 7, 2016] - Use zlib-1.2.8.1 inflateValidate() instead of inflateReset2() to - optionally avoid ADLER32 evaluation. - -Version 1.6.26rc01 [October 12, 2016] - No changes. - -Version 1.6.26 [October 20, 2016] - Cosmetic change, "ptr != 0" to "ptr != NULL" in png.c and pngrutil.c - Despammed email addresses (replaced "@" with " at "). - -Version 1.6.27beta01 [November 2, 2016] - Restrict the new ADLER32-skipping to IDAT chunks. It broke iCCP chunk - handling: an erroneous iCCP chunk would throw a png_error and reject the - entire PNG image instead of rejecting just the iCCP chunk with a warning, - if built with zlib-1.2.8.1. - -Version 1.6.27rc01 [December 27, 2016] - Control ADLER32 checking with new PNG_IGNORE_ADLER32 option. Fixes - an endless loop when handling erroneous ADLER32 checksums; bug - introduced in libpng-1.6.26. - Removed the use of a macro containing the pre-processor 'defined' - operator. It is unclear whether this is valid; a macro that - "generates" 'defined' is not permitted, but the use of the word - "generates" within the C90 standard seems to imply more than simple - substitution of an expression itself containing a well-formed defined - operation. - Added ARM support to CMakeLists.txt (Andreas Franek). - -Version 1.6.27 [December 29, 2016] - Fixed a potential null pointer dereference in png_set_text_2() (bug report - and patch by Patrick Keshishian, CVE-2016-10087). - -Version 1.6.28rc01 [January 3, 2017] - Fixed arm/aarch64 detection in CMakeLists.txt (Gianfranco Costamagna). - Added option to Cmake build allowing a custom location of zlib to be - specified in a scenario where libpng is being built as a subproject - alongside zlib by another project (Sam Serrels). - Changed png_ptr->options from a png_byte to png_uint_32, to accommodate - up to 16 options. - -Version 1.6.28rc02 [January 4, 2017] - Added "include(GNUInstallDirs)" to CMakeLists.txt (Gianfranco Costamagna). - Moved SSE2 optimization code into the main libpng source directory. - Configure libpng with "configure --enable-intel-sse" or compile - libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it. - -Version 1.6.28rc03 [January 4, 2017] - Backed out the SSE optimization and last CMakeLists.txt to allow time for QA. - -Version 1.6.28 [January 5, 2017] - No changes. - -Version 1.6.29beta01 [January 12, 2017] - Readded "include(GNUInstallDirs)" to CMakeLists.txt (Gianfranco Costamagna). - Moved SSE2 optimization code into the main libpng source directory. - Configure libpng with "configure --enable-intel-sse" or compile - libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it. - Simplified conditional compilation in pngvalid.c, for AIX (Michael Felt). - -Version 1.6.29beta02 [February 22, 2017] - Avoid conditional directives that break statements in pngrutil.c (Romero - Malaquias) - The contrib/examples/pngtopng.c recovery code was in the wrong "if" - branches; the comments were correct. - Added code for PowerPC VSX optimisation (Vadim Barkov). - -Version 1.6.29beta03 [March 1, 2017] - Avoid potential overflow of shift operations in png_do_expand() (Aaron Boxer). - Change test ZLIB_VERNUM >= 0x1281 to ZLIB_VERNUM >= 0x1290 in pngrutil.c - because Solaris 11 distributes zlib-1.2.8.f that is older than 1.2.8.1, - as suggested in zlib FAQ, item 24. - Suppress clang warnings about implicit sign changes in png.c - -Version 1.6.29 [March 16, 2017] - No changes. - -Version 1.6.30beta01 [April 1, 2017] - Added missing "$(CPPFLAGS)" to the compile line for c.pic.o in - makefile.linux and makefile.solaris-x86 (Cosmin). - Revised documentation of png_get_error_ptr() in the libpng manual. - Silence clang -Wcomma and const drop warnings (Viktor Szakats). - Update Sourceforge URLs in documentation (https instead of http). - -Version 1.6.30beta02 [April 22, 2017] - Document need to check for integer overflow when allocating a pixel - buffer for multiple rows in contrib/gregbook, contrib/pngminus, - example.c, and in the manual (suggested by Jaeseung Choi). This - is similar to the bug reported against pngquant in CVE-2016-5735. - Removed reference to the obsolete PNG_SAFE_LIMITS macro in the documentation. - -Version 1.6.30beta03 [May 22, 2017] - Check for integer overflow in contrib/visupng and contrib/tools/genpng. - Do not double evaluate CMAKE_SYSTEM_PROCESSOR in CMakeLists.txt. - Test CMAKE_HOST_WIN32 instead of WIN32 in CMakeLists.txt. - Fix some URL in documentation. - -Version 1.6.30beta04 [June 7, 2017] - Avoid writing an empty IDAT when the last IDAT exactly fills the - compression buffer (bug report by Brian Baird). This bug was - introduced in libpng-1.6.0. - -Version 1.6.30rc01 [June 14, 2017] - No changes. - -Version 1.6.30rc02 [June 25, 2017] - Update copyright year in pnglibconf.h, make ltmain.sh executable. - Add a reference to the libpng.download site in README. - -Version 1.6.30 [June 28, 2017] - No changes. - -Version 1.6.31beta01 [July 5, 2017] - Guard the definition of _POSIX_SOURCE in pngpriv.h (AIX already defines it; - bug report by Michael Felt). - Revised pngpriv.h to work around failure to compile arm/filter_neon.S - ("typedef" directive is unrecognized by the assembler). The problem - was introduced in libpng-1.6.30beta01. - Added "Requires: zlib" to libpng.pc.in (Pieter Neerincx). - Added special case for FreeBSD in arm/filter_neon.S (Maya Rashish). - -Version 1.6.31beta02 [July 8, 2017] - Added instructions for disabling hardware optimizations in INSTALL. - Added "--enable-hardware-optimizations" configuration flag to enable - or disable all hardware optimizations with one flag. - -Version 1.6.31beta03 [July 9, 2017] - Updated CMakeLists.txt to add INTEL_SSE and MIPS_MSA platforms. - Changed "int" to "png_size_t" in intel/filter_sse2.c to prevent - possible integer overflow (Bug report by John Bowler). - Quieted "declaration after statement" warnings in intel/filter_sse2.c. - Added scripts/makefile-linux-opt, which has hardware optimizations enabled. - -Version 1.6.31beta04 [July 11, 2017] - Removed one of the GCC-7.1.0 'strict-overflow' warnings that result when - integers appear on both sides of a compare. Worked around the others by - forcing the strict-overflow setting in the relevant functions to a level - where they are not reported (John Bowler). - Changed "FALL THROUGH" comments to "FALLTHROUGH" because GCC doesn't like - the space. - Worked around some C-style casts from (void*) because g++ 5.4.0 objects - to them. - Increased the buffer size for 'sprint' to pass the gcc 7.1.0 'sprint - overflow' check that is on by default with -Wall -Wextra. - -Version 1.6.31beta05 [July 13, 2017] - Added eXIf chunk support. - -Version 1.6.31beta06 [July 17, 2017] - Added a minimal eXIf chunk (with Orientation and FocalLengthIn35mmFilm - tags) to pngtest.png. - -Version 1.6.31beta07 [July 18, 2017] - Revised the eXIf chunk in pngtest.png to fix "Bad IFD1 Directory" warning. - -Version 1.6.31rc01 [July 19, 2017] - No changes. - -Version 1.6.31rc02 [July 25, 2017] - Fixed typo in example.c (png_free_image should be png_image_free) (Bug - report by John Smith) - -Version 1.6.31 [July 27, 2017] - No changes. - -Version 1.6.32beta01 [July 31, 2017] - Avoid possible NULL dereference in png_handle_eXIf when benign_errors - are allowed. Avoid leaking the input buffer "eXIf_buf". - Eliminated png_ptr->num_exif member from pngstruct.h and added num_exif - to arguments for png_get_eXIf() and png_set_eXIf(). - Added calls to png_handle_eXIf(() in pngread.c and png_write_eXIf() in - pngwrite.c, and made various other fixes to png_write_eXIf(). - Changed name of png_get_eXIF and png_set_eXIf() to png_get_eXIf_1() and - png_set_eXIf_1(), respectively, to avoid breaking API compatibility - with libpng-1.6.31. - -Version 1.6.32beta02 [August 1, 2017] - Updated contrib/libtests/pngunknown.c with eXIf chunk. - -Version 1.6.32beta03 [August 2, 2017] - Initialized btoa[] in pngstest.c - Stop memory leak when returning from png_handle_eXIf() with an error - (Bug report from the OSS-fuzz project). - -Version 1.6.32beta04 [August 2, 2017] - Replaced local eXIf_buf with info_ptr-eXIf_buf in png_handle_eXIf(). - Update libpng.3 and libpng-manual.txt about eXIf functions. - -Version 1.6.32beta05 [August 2, 2017] - Restored png_get_eXIf() and png_set_eXIf() to maintain API compatibility. - -Version 1.6.32beta06 [August 2, 2017] - Removed png_get_eXIf_1() and png_set_eXIf_1(). - -Version 1.6.32beta07 [August 3, 2017] - Check length of all chunks except IDAT against user limit to fix an - OSS-fuzz issue (Fixes CVE-2017-12652). - -Version 1.6.32beta08 [August 3, 2017] - Check length of IDAT against maximum possible IDAT size, accounting - for height, rowbytes, interlacing and zlib/deflate overhead. - Restored png_get_eXIf_1() and png_set_eXIf_1(), because strlen(eXIf_buf) - does not work (the eXIf chunk data can contain zeroes). - -Version 1.6.32beta09 [August 3, 2017] - Require cmake-2.8.8 in CMakeLists.txt. Revised symlink creation, - no longer using deprecated cmake LOCATION feature (Clifford Yapp). - Fixed five-byte error in the calculation of IDAT maximum possible size. - -Version 1.6.32beta10 [August 5, 2017] - Moved chunk-length check into a png_check_chunk_length() private - function (Suggested by Max Stepin). - Moved bad pngs from tests to contrib/libtests/crashers - Moved testing of bad pngs into a separate tests/pngtest-badpngs script - Added the --xfail (expected FAIL) option to pngtest.c. It writes XFAIL - in the output but PASS for the libpng test. - Require cmake-3.0.2 in CMakeLists.txt (Clifford Yapp). - Fix "const" declaration info_ptr argument to png_get_eXIf_1() and the - num_exif argument to png_get_eXIf_1() (Github Issue 171). - -Version 1.6.32beta11 [August 7, 2017] - Added "eXIf" to "chunks_to_ignore[]" in png_set_keep_unknown_chunks(). - Added huge_IDAT.png and empty_ancillary_chunks.png to testpngs/crashers. - Make pngtest --strict, --relax, --xfail options imply -m (multiple). - Removed unused chunk_name parameter from png_check_chunk_length(). - Relocated setting free_me for eXIf data, to stop an OSS-fuzz leak. - Initialize profile_header[] in png_handle_iCCP() to fix OSS-fuzz issue. - Initialize png_ptr->row_buf[0] to 255 in png_read_row() to fix OSS-fuzz UMR. - Attempt to fix a UMR in png_set_text_2() to fix OSS-fuzz issue. - Increase minimum zlib stream from 9 to 14 in png_handle_iCCP(), to account - for the minimum 'deflate' stream, and relocate the test to a point - after the keyword has been read. - Check that the eXIf chunk has at least 2 bytes and begins with "II" or "MM". - -Version 1.6.32rc01 [August 18, 2017] - Added a set of "huge_xxxx_chunk.png" files to contrib/testpngs/crashers, - one for each known chunk type, with length = 2GB-1. - Check for 0 return from png_get_rowbytes() and added some (size_t) typecasts - in contrib/pngminus/*.c to stop some Coverity issues (162705, 162706, - and 162707). - Renamed chunks in contrib/testpngs/crashers to avoid having files whose - names differ only in case; this causes problems with some platforms - (github issue #172). - -Version 1.6.32rc02 [August 22, 2017] - Added contrib/oss-fuzz directory which contains files used by the oss-fuzz - project (https://github.com/google/oss-fuzz/tree/master/projects/libpng). - -Version 1.6.32 [August 24, 2017] - No changes. - -Version 1.6.33beta01 [August 28, 2017] - Added PNGMINUS_UNUSED macro to contrib/pngminus/p*.c and added missing - parenthesis in contrib/pngminus/pnm2png.c (bug report by Christian Hesse). - Fixed off-by-one error in png_do_check_palette_indexes() (Bug report - by Mick P., Source Forge Issue #269). - -Version 1.6.33beta02 [September 3, 2017] - Initialize png_handler.row_ptr in contrib/oss-fuzz/libpng_read_fuzzer.cc - to fix shortlived oss-fuzz issue 3234. - Compute a larger limit on IDAT because some applications write a deflate - buffer for each row (Bug report by Andrew Church). - Use current date (DATE) instead of release-date (RDATE) in last - changed date of contrib/oss-fuzz files. - Enabled ARM support in CMakeLists.txt (Bernd Kuhls). - -Version 1.6.33beta03 [September 14, 2017] - Fixed incorrect typecast of some arguments to png_malloc() and - png_calloc() that were png_uint_32 instead of png_alloc_size_t - (Bug report by "irwir" in Github libpng issue #175). - Use pnglibconf.h.prebuilt when building for ANDROID with cmake (Github - issue 162, by rcdailey). - -Version 1.6.33rc01 [September 20, 2017] - Initialize memory allocated by png_inflate to zero, using memset, to - stop an oss-fuzz "use of uninitialized value" detection in png_set_text_2() - due to truncated iTXt or zTXt chunk. - Initialize memory allocated by png_read_buffer to zero, using memset, to - stop an oss-fuzz "use of uninitialized value" detection in - png_icc_check_tag_table() due to truncated iCCP chunk. - Removed a redundant test (suggested by "irwir" in Github issue #180). - -Version 1.6.33rc02 [September 23, 2017] - Added an interlaced version of each file in contrib/pngsuite. - Relocate new memset() call in pngrutil.c. - Removed more redundant tests (suggested by "irwir" in Github issue #180). - Add support for loading images with associated alpha in the Simplified - API (Samuel Williams). - -Version 1.6.33 [September 28, 2017] - Revert contrib/oss-fuzz/libpng_read_fuzzer.cc to libpng-1.6.32 state. - Initialize png_handler.row_ptr in contrib/oss-fuzz/libpng_read_fuzzer.cc - Add end_info structure and png_read_end() to the libpng fuzzer. - -Version 1.6.34 [September 29, 2017] - Removed contrib/pngsuite/i*.png; some of them caused test failures. - -Version 1.6.35beta01 [March 6, 2018] - Restored 21 of the contrib/pngsuite/i*.png, which do not cause test - failures. Placed the remainder in contrib/pngsuite/interlaced/i*.png. - Added calls to png_set_*() transforms commonly used by browsers to - the fuzzer. - Removed some unnecessary brackets in pngrtran.c - Fixed miscellaneous typos (Patch by github user "luzpaz"). - Change "ASM C" to "C ASM" in CMakeLists.txt - Fixed incorrect handling of bKGD chunk in sub-8-bit files (Cosmin) - Added hardware optimization directories to zip and 7z distributions. - Fixed incorrect bitmask for options. - Fixed many spelling typos. - -Version 1.6.35beta02 [March 28, 2018] - Make png_get_iCCP consistent with man page (allow compression-type argument - to be NULL, bug report by Lenard Szolnoki). - -Version 1.6.35 [July 15, 2018] - Replaced the remaining uses of png_size_t with size_t (Cosmin) - Fixed the calculation of row_factor in png_check_chunk_length - (reported by Thuan Pham in SourceForge issue #278) - Added missing parentheses to a macro definition - (suggested by "irwir" in GitHub issue #216) - -Send comments/corrections/commendations to png-mng-implement at lists.sf.net -(subscription required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement -to subscribe). - -Glenn R-P diff --git a/Dependencies/FreeImage/Source/LibPNG/CMakeLists.txt b/Dependencies/FreeImage/Source/LibPNG/CMakeLists.txt deleted file mode 100644 index be61080..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/CMakeLists.txt +++ /dev/null @@ -1,945 +0,0 @@ -# CMakeLists.txt - -# Copyright (C) 2007,2009-2018 Glenn Randers-Pehrson -# Written by Christian Ehrlicher, 2007 -# Revised by Roger Lowman, 2009-2010 -# Revised by Clifford Yapp, 2011-2012 -# Revised by Roger Leigh, 2016 -# Revised by Andreas Franek, 2016 - -# This code is released under the libpng license. -# For conditions of distribution and use, see the disclaimer -# and license in png.h - -cmake_minimum_required(VERSION 3.0.2) -cmake_policy(VERSION 3.0.2) - -# Set MacOSX @rpath usage globally. -if (POLICY CMP0020) - cmake_policy(SET CMP0020 NEW) -endif(POLICY CMP0020) -if (POLICY CMP0042) - cmake_policy(SET CMP0042 NEW) -endif(POLICY CMP0042) -# Use new variable expansion policy. -if (POLICY CMP0053) - cmake_policy(SET CMP0053 NEW) -endif(POLICY CMP0053) -if (POLICY CMP0054) - cmake_policy(SET CMP0054 NEW) -endif(POLICY CMP0054) - -set(CMAKE_CONFIGURATION_TYPES "Release;Debug;MinSizeRel;RelWithDebInfo") - -project(libpng C ASM) -enable_testing() - -set(PNGLIB_MAJOR 1) -set(PNGLIB_MINOR 6) -set(PNGLIB_RELEASE 35) -set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) -set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) - -include(GNUInstallDirs) - -# needed packages - -#Allow users to specify location of Zlib, -# Useful if zlib is being built alongside this as a sub-project -option(PNG_BUILD_ZLIB "Custom zlib Location, else find_package is used" OFF) - -IF(NOT PNG_BUILD_ZLIB) - find_package(ZLIB REQUIRED) - include_directories(${ZLIB_INCLUDE_DIR}) -ENDIF(NOT PNG_BUILD_ZLIB) - -if(NOT WIN32) - find_library(M_LIBRARY - NAMES m - PATHS /usr/lib /usr/local/lib - ) - if(NOT M_LIBRARY) - message(STATUS "math lib 'libm' not found; floating point support disabled") - endif() -else() - # not needed on windows - set(M_LIBRARY "") -endif() - -# COMMAND LINE OPTIONS -option(PNG_SHARED "Build shared lib" ON) -option(PNG_STATIC "Build static lib" ON) -option(PNG_TESTS "Build libpng tests" ON) - -# Many more configuration options could be added here -option(PNG_FRAMEWORK "Build OS X framework" OFF) -option(PNG_DEBUG "Build with debug output" OFF) -option(PNGARG "Disable ANSI-C prototypes" OFF) - -option(PNG_HARDWARE_OPTIMIZATIONS "Enable Hardware Optimizations" ON) - - -set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names") -set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings") - -if(PNG_HARDWARE_OPTIMIZATIONS) -# set definitions and sources for arm -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") - set(PNG_ARM_NEON_POSSIBLE_VALUES check on off) - set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations: - check: (default) use internal checking code; - off: disable the optimizations; - on: turn on unconditionally.") - set_property(CACHE PNG_ARM_NEON PROPERTY STRINGS - ${PNG_ARM_NEON_POSSIBLE_VALUES}) - list(FIND PNG_ARM_NEON_POSSIBLE_VALUES ${PNG_ARM_NEON} index) - if(index EQUAL -1) - message(FATAL_ERROR - " PNG_ARM_NEON must be one of [${PNG_ARM_NEON_POSSIBLE_VALUES}]") - elseif(NOT ${PNG_ARM_NEON} STREQUAL "no") - set(libpng_arm_sources - arm/arm_init.c - arm/filter_neon.S - arm/filter_neon_intrinsics.c) - - if(${PNG_ARM_NEON} STREQUAL "on") - add_definitions(-DPNG_ARM_NEON_OPT=2) - elseif(${PNG_ARM_NEON} STREQUAL "check") - add_definitions(-DPNG_ARM_NEON_CHECK_SUPPORTED) - endif() - else() - add_definitions(-DPNG_ARM_NEON_OPT=0) - endif() -endif() - -# set definitions and sources for powerpc -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*" ) - set(PNG_POWERPC_VSX_POSSIBLE_VALUES on off) - set(PNG_POWERPC_VSX "on" CACHE STRING "Enable POWERPC VSX optimizations: - off: disable the optimizations.") - set_property(CACHE PNG_POWERPC_VSX PROPERTY STRINGS - ${PNG_POWERPC_VSX_POSSIBLE_VALUES}) - list(FIND PNG_POWERPC_VSX_POSSIBLE_VALUES ${PNG_POWERPC_VSX} index) - if(index EQUAL -1) - message(FATAL_ERROR - " PNG_POWERPC_VSX must be one of [${PNG_POWERPC_VSX_POSSIBLE_VALUES}]") - elseif(NOT ${PNG_POWERPC_VSX} STREQUAL "no") - set(libpng_powerpc_sources - powerpc/powerpc_init.c - powerpc/filter_vsx_intrinsics.c) - if(${PNG_POWERPC_VSX} STREQUAL "on") - add_definitions(-DPNG_POWERPC_VSX_OPT=2) - endif() - else() - add_definitions(-DPNG_POWERPC_VSX_OPT=0) - endif() -endif() - -# set definitions and sources for intel -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*" ) - set(PNG_INTEL_SSE_POSSIBLE_VALUES on off) - set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations: - off: disable the optimizations") - set_property(CACHE PNG_INTEL_SSE PROPERTY STRINGS - ${PNG_INTEL_SSE_POSSIBLE_VALUES}) - list(FIND PNG_INTEL_SSE_POSSIBLE_VALUES ${PNG_INTEL_SSE} index) - if(index EQUAL -1) - message(FATAL_ERROR - " PNG_INTEL_SSE must be one of [${PNG_INTEL_SSE_POSSIBLE_VALUES}]") - elseif(NOT ${PNG_INTEL_SSE} STREQUAL "no") - set(libpng_intel_sources - intel/intel_init.c - intel/filter_sse2_intrinsics.c) - if(${PNG_INTEL_SSE} STREQUAL "on") - add_definitions(-DPNG_INTEL_SSE_OPT=1) - endif() - else() - add_definitions(-DPNG_INTEL_SSE_OPT=0) - endif() -endif() - -# set definitions and sources for MIPS -if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*" ) - set(PNG_MIPS_MSA_POSSIBLE_VALUES on off) - set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations: - off: disable the optimizations") - set_property(CACHE PNG_MIPS_MSA PROPERTY STRINGS - ${PNG_MIPS_MSA_POSSIBLE_VALUES}) - list(FIND PNG_MIPS_MSA_POSSIBLE_VALUES ${PNG_MIPS_MSA} index) - if(index EQUAL -1) - message(FATAL_ERROR - " PNG_MIPS_MSA must be one of [${PNG_MIPS_MSA_POSSIBLE_VALUES}]") - elseif(NOT ${PNG_MIPS_MSA} STREQUAL "no") - set(libpng_mips_sources - mips/mips_init.c - mips/filter_msa_intrinsics.c) - if(${PNG_MIPS_MSA} STREQUAL "on") - add_definitions(-DPNG_MIPS_MSA_OPT=2) - endif() - else() - add_definitions(-DPNG_MIPS_MSA_OPT=0) - endif() -endif() -endif(PNG_HARDWARE_OPTIMIZATIONS) - -# SET LIBNAME -set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR}) - -# to distinguish between debug and release lib -set(CMAKE_DEBUG_POSTFIX "d") - -include(CheckCSourceCompiles) -option(ld-version-script "Enable linker version script" ON) -if(ld-version-script AND NOT APPLE) - # Check if LD supports linker scripts. - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 { - global: sym; - local: *; -}; - -VERS_2 { - global: sym2; - main; -} VERS_1; -") - set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS}) - set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/conftest.map'") - check_c_source_compiles("void sym(void) {} -void sym2(void) {} -int main(void) {return 0;} -" HAVE_LD_VERSION_SCRIPT) - if(NOT HAVE_LD_VERSION_SCRIPT) - set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE} "-Wl,-M -Wl,${CMAKE_CURRENT_BINARY_DIR}/conftest.map") - check_c_source_compiles("void sym(void) {} -void sym2(void) {} -int main(void) {return 0;} -" HAVE_SOLARIS_LD_VERSION_SCRIPT) - endif() - set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE}) - file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map") -endif() - -# Find symbol prefix. Likely obsolete and unnecessary with recent -# toolchains (it's not done in many other projects). -function(symbol_prefix) - set(SYMBOL_PREFIX) - - execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E" "-" - INPUT_FILE /dev/null - OUTPUT_VARIABLE OUT - RESULT_VARIABLE STATUS) - - if(CPP_FAIL) - message(WARNING "Failed to run the C preprocessor") - endif() - - string(REPLACE "\n" ";" OUT "${OUT}") - foreach(line ${OUT}) - string(REGEX MATCH "^PREFIX=" found_match "${line}") - if(found_match) - STRING(REGEX REPLACE "^PREFIX=(.*\)" "\\1" prefix "${line}") - string(REGEX MATCH "__USER_LABEL_PREFIX__" found_match "${prefix}") - if(found_match) - STRING(REGEX REPLACE "(.*)__USER_LABEL_PREFIX__(.*)" "\\1\\2" prefix "${prefix}") - endif() - set(SYMBOL_PREFIX "${prefix}") - endif() - endforeach() - - message(STATUS "Symbol prefix: ${SYMBOL_PREFIX}") - set(SYMBOL_PREFIX "${SYMBOL_PREFIX}" PARENT_SCOPE) -endfunction() - -if(UNIX) - symbol_prefix() -endif() - -find_program(AWK NAMES gawk awk) - -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -if(NOT AWK OR ANDROID) - # No awk available to generate sources; use pre-built pnglibconf.h - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt - ${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h) - add_custom_target(genfiles) # Dummy -else() - include(CMakeParseArguments) - # Generate .chk from .out with awk - # generate_chk(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]]) - function(generate_chk) - set(options) - set(oneValueArgs INPUT OUTPUT) - set(multiValueArgs DEPENDS) - cmake_parse_arguments(_GC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - if (NOT _GC_INPUT) - message(FATAL_ERROR "Invalid arguments. generate_out requires input.") - endif() - if (NOT _GC_OUTPUT) - message(FATAL_ERROR "Invalid arguments. generate_out requires output.") - endif() - - add_custom_command(OUTPUT "${_GC_OUTPUT}" - COMMAND "${CMAKE_COMMAND}" - "-DINPUT=${_GC_INPUT}" - "-DOUTPUT=${_GC_OUTPUT}" - -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake" - DEPENDS "${_GC_INPUT}" ${_GC_DEPENDS} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - endfunction() - - # Generate .out from .c with awk - # generate_out(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]]) - function(generate_out) - set(options) - set(oneValueArgs INPUT OUTPUT) - set(multiValueArgs DEPENDS) - cmake_parse_arguments(_GO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - if (NOT _GO_INPUT) - message(FATAL_ERROR "Invalid arguments. generate_out requires input.") - endif() - if (NOT _GO_OUTPUT) - message(FATAL_ERROR "Invalid arguments. generate_out requires output.") - endif() - - add_custom_command(OUTPUT "${_GO_OUTPUT}" - COMMAND "${CMAKE_COMMAND}" - "-DINPUT=${_GO_INPUT}" - "-DOUTPUT=${_GO_OUTPUT}" - -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake" - DEPENDS "${_GO_INPUT}" ${_GO_DEPENDS} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - endfunction() - - # Generate specific source file with awk - # generate_source(OUTPUT outputfile [DEPENDS dep1 [dep2...]]) - function(generate_source) - set(options) - set(oneValueArgs OUTPUT) - set(multiValueArgs DEPENDS) - cmake_parse_arguments(_GSO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - if (NOT _GSO_OUTPUT) - message(FATAL_ERROR "Invalid arguments. generate_source requires output.") - endif() - - add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_GSO_OUTPUT}" - COMMAND "${CMAKE_COMMAND}" - "-DOUTPUT=${_GSO_OUTPUT}" - -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake" - DEPENDS ${_GSO_DEPENDS} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - endfunction() - - # Copy file - function(generate_copy source destination) - add_custom_command(OUTPUT "${destination}" - COMMAND "${CMAKE_COMMAND}" -E remove "${destination}" - COMMAND "${CMAKE_COMMAND}" -E copy "${source}" - "${destination}" - DEPENDS "${source}") - endfunction() - - # Generate scripts/pnglibconf.h - generate_source(OUTPUT "scripts/pnglibconf.c" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk" - "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h") - - # Generate pnglibconf.c - generate_source(OUTPUT "pnglibconf.c" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk" - "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h") - - if(PNG_PREFIX) - set(PNGLIBCONF_H_EXTRA_DEPENDS - "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/macro.lst") - set(PNGPREFIX_H_EXTRA_DEPENDS - "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out") - endif() - - generate_out(INPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out") - - # Generate pnglibconf.h - generate_source(OUTPUT "pnglibconf.h" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" - ${PNGLIBCONF_H_EXTRA_DEPENDS}) - - generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/intprefix.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h") - - generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/prefix.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h" - "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out") - - # Generate pngprefix.h - generate_source(OUTPUT "pngprefix.h" - DEPENDS ${PNGPREFIX_H_EXTRA_DEPENDS}) - - generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/sym.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h") - - generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h" - "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt") - - generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/vers.c" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h" - "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h") - - generate_chk(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/checksym.awk" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.def") - - add_custom_target(symbol-check DEPENDS - "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk") - - generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" - "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym") - generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out" - "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers") - - add_custom_target(genvers DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers") - add_custom_target(gensym DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym") - - add_custom_target("genprebuilt" - COMMAND "${CMAKE_COMMAND}" - "-DOUTPUT=scripts/pnglibconf.h.prebuilt" - -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - - # A single target handles generation of all generated files. If - # they are depended upon separately by multiple targets, this - # confuses parallel make (it would require a separate top-level - # target for each file to track the dependencies properly). - add_custom_target(genfiles DEPENDS - "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym" - "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" - "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out") -endif(NOT AWK OR ANDROID) - -# OUR SOURCES -set(libpng_public_hdrs - png.h - pngconf.h - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" -) -set(libpng_private_hdrs - pngpriv.h - pngdebug.h - pnginfo.h - pngstruct.h -) -if(AWK AND NOT ANDROID) - list(APPEND libpng_private_hdrs "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h") -endif() -set(libpng_sources - ${libpng_public_hdrs} - ${libpng_private_hdrs} - png.c - pngerror.c - pngget.c - pngmem.c - pngpread.c - pngread.c - pngrio.c - pngrtran.c - pngrutil.c - pngset.c - pngtrans.c - pngwio.c - pngwrite.c - pngwtran.c - pngwutil.c - ${libpng_arm_sources} - ${libpng_intel_sources} - ${libpng_mips_sources} - ${libpng_powerpc_sources} -) -set(pngtest_sources - pngtest.c -) -set(pngvalid_sources - contrib/libtests/pngvalid.c -) -set(pngstest_sources - contrib/libtests/pngstest.c -) -set(pngunknown_sources - contrib/libtests/pngunknown.c -) -set(pngimage_sources - contrib/libtests/pngimage.c -) -set(pngfix_sources - contrib/tools/pngfix.c -) -set(png_fix_itxt_sources - contrib/tools/png-fix-itxt.c -) - -if(MSVC) - add_definitions(-D_CRT_SECURE_NO_DEPRECATE) -endif(MSVC) - -if(PNG_DEBUG) - add_definitions(-DPNG_DEBUG) -endif() - -# NOW BUILD OUR TARGET -include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR}) - -unset(PNG_LIB_TARGETS) - -if(PNG_SHARED) - add_library(png SHARED ${libpng_sources}) - set(PNG_LIB_TARGETS png) - set_target_properties(png PROPERTIES OUTPUT_NAME ${PNG_LIB_NAME}) - add_dependencies(png genfiles) - if(MSVC) - # msvc does not append 'lib' - do it here to have consistent name - set_target_properties(png PROPERTIES PREFIX "lib") - set_target_properties(png PROPERTIES IMPORT_PREFIX "lib") - endif() - target_link_libraries(png ${ZLIB_LIBRARY} ${M_LIBRARY}) - - if(UNIX AND AWK) - if(HAVE_LD_VERSION_SCRIPT) - set_target_properties(png PROPERTIES LINK_FLAGS - "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'") - elseif(HAVE_SOLARIS_LD_VERSION_SCRIPT) - set_target_properties(png PROPERTIES LINK_FLAGS - "-Wl,-M -Wl,'${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'") - endif() - endif() -endif() - -if(PNG_STATIC) - # does not work without changing name - set(PNG_LIB_NAME_STATIC png_static) - add_library(png_static STATIC ${libpng_sources}) - add_dependencies(png_static genfiles) - # MSVC doesn't use a different file extension for shared vs. static - # libs. We are able to change OUTPUT_NAME to remove the _static - # for all other platforms. - if(NOT MSVC) - set_target_properties(png_static PROPERTIES - OUTPUT_NAME "${PNG_LIB_NAME}" - CLEAN_DIRECT_OUTPUT 1) - else() - set_target_properties(png_static PROPERTIES - OUTPUT_NAME "${PNG_LIB_NAME}_static" - CLEAN_DIRECT_OUTPUT 1) - endif() - list(APPEND PNG_LIB_TARGETS png_static) - if(MSVC) - # msvc does not append 'lib' - do it here to have consistent name - set_target_properties(png_static PROPERTIES PREFIX "lib") - endif() - target_link_libraries(png_static ${ZLIB_LIBRARY} ${M_LIBRARY}) -endif() - -if(PNG_FRAMEWORK) - set(PNG_LIB_NAME_FRAMEWORK png_framework) - add_library(png_framework SHARED ${libpng_sources}) - add_dependencies(png_framework genfiles) - list(APPEND PNG_LIB_TARGETS png_framework) - set_target_properties(png_framework PROPERTIES - FRAMEWORK TRUE - FRAMEWORK_VERSION ${PNGLIB_VERSION} - MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PNGLIB_MAJOR}.${PNGLIB_MINOR} - MACOSX_FRAMEWORK_BUNDLE_VERSION ${PNGLIB_VERSION} - MACOSX_FRAMEWORK_IDENTIFIER org.libpng.libpng - XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" - PUBLIC_HEADER "${libpng_public_hdrs}" - OUTPUT_NAME png) - target_link_libraries(png_framework ${ZLIB_LIBRARY} ${M_LIBRARY}) -endif() - -if(NOT PNG_LIB_TARGETS) - message(SEND_ERROR - "No library variant selected to build. " - "Please enable at least one of the following options: " - " PNG_STATIC, PNG_SHARED, PNG_FRAMEWORK") -endif() - -if(PNG_SHARED AND WIN32) - set_target_properties(png PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL) -endif() - -function(png_add_test) - set(options) - set(oneValueArgs NAME COMMAND) - set(multiValueArgs OPTIONS FILES) - cmake_parse_arguments(_PAT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if (NOT _PAT_NAME) - message(FATAL_ERROR "Invalid arguments. png_add_test requires name.") - endif() - if (NOT _PAT_COMMAND) - message(FATAL_ERROR "Invalid arguments. png_add_test requires command.") - endif() - - set(TEST_OPTIONS "${_PAT_OPTIONS}") - set(TEST_FILES "${_PAT_FILES}") - - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/test.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake" @ONLY) - if(CMAKE_MAJOR_VERSION GREATER 2) # have generator expressions - add_test(NAME "${_PAT_NAME}" - COMMAND "${CMAKE_COMMAND}" - "-DLIBPNG=$" - "-DTEST_COMMAND=$" - -P "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake") - else() # old 2.x add_test; limited and won't work well on Windows - # Note LIBPNG is a dummy value as there are no generator expressions - add_test("${_PAT_NAME}" "${CMAKE_COMMAND}" - "-DLIBPNG=${CMAKE_CURRENT_BINARY_DIR}/libpng.so" - "-DTEST_COMMAND=./${_PAT_COMMAND}" - -P "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake") - endif() -endfunction() - -if(PNG_TESTS AND PNG_SHARED) - # Find test PNG files by globbing, but sort lists to ensure - # consistency between different filesystems. - file(GLOB PNGSUITE_PNGS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/*.png") - list(SORT PNGSUITE_PNGS) - file(GLOB TEST_PNGS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/testpngs/*.png") - list(SORT TEST_PNGS) - - set(PNGTEST_PNG "${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png") - - add_executable(pngtest ${pngtest_sources}) - target_link_libraries(pngtest png) - - png_add_test(NAME pngtest COMMAND pngtest FILES "${PNGTEST_PNG}") - - add_executable(pngvalid ${pngvalid_sources}) - target_link_libraries(pngvalid png) - - png_add_test(NAME pngvalid-gamma-16-to-8 - COMMAND pngvalid OPTIONS --gamma-16-to-8) - png_add_test(NAME pngvalid-gamma-alpha-mode - COMMAND pngvalid OPTIONS --gamma-alpha-mode) - png_add_test(NAME pngvalid-gamma-background - COMMAND pngvalid OPTIONS --gamma-background) - png_add_test(NAME pngvalid-gamma-expand16-alpha-mode - COMMAND pngvalid OPTIONS --gamma-alpha-mode --expand16) - png_add_test(NAME pngvalid-gamma-expand16-background - COMMAND pngvalid OPTIONS --gamma-background --expand16) - png_add_test(NAME pngvalid-gamma-expand16-transform - COMMAND pngvalid OPTIONS --gamma-transform --expand16) - png_add_test(NAME pngvalid-gamma-sbit - COMMAND pngvalid OPTIONS --gamma-sbit) - png_add_test(NAME pngvalid-gamma-threshold - COMMAND pngvalid OPTIONS --gamma-threshold) - png_add_test(NAME pngvalid-gamma-transform - COMMAND pngvalid OPTIONS --gamma-transform) - png_add_test(NAME pngvalid-progressive-interlace-standard - COMMAND pngvalid OPTIONS --standard --progressive-read --interlace) - png_add_test(NAME pngvalid-progressive-size - COMMAND pngvalid OPTIONS --size --progressive-read) - png_add_test(NAME pngvalid-progressive-standard - COMMAND pngvalid OPTIONS --standard --progressive-read) - png_add_test(NAME pngvalid-standard - COMMAND pngvalid OPTIONS --standard) - png_add_test(NAME pngvalid-transform - COMMAND pngvalid OPTIONS --transform) - - add_executable(pngstest ${pngstest_sources}) - target_link_libraries(pngstest png) - - foreach(gamma_type 1.8 linear none sRGB) - foreach(alpha_type none alpha) - set(PNGSTEST_FILES) - foreach(test_png ${TEST_PNGS}) - string(REGEX MATCH ".*-linear[-.].*" TEST_PNG_LINEAR "${test_png}") - string(REGEX MATCH ".*-sRGB[-.].*" TEST_PNG_SRGB "${test_png}") - string(REGEX MATCH ".*-1.8[-.].*" TEST_PNG_G18 "${test_png}") - string(REGEX MATCH ".*-alpha-.*" TEST_PNG_ALPHA "${test_png}") - - set(TEST_PNG_VALID TRUE) - - if(TEST_PNG_ALPHA) - if (NOT "${alpha_type}" STREQUAL "alpha") - set(TEST_PNG_VALID FALSE) - endif() - else() - if ("${alpha_type}" STREQUAL "alpha") - set(TEST_PNG_VALID FALSE) - endif() - endif() - - if(TEST_PNG_LINEAR) - if(NOT "${gamma_type}" STREQUAL "linear") - set(TEST_PNG_VALID FALSE) - endif() - elseif(TEST_PNG_SRGB) - if(NOT "${gamma_type}" STREQUAL "sRGB") - set(TEST_PNG_VALID FALSE) - endif() - elseif(TEST_PNG_G18) - if(NOT "${gamma_type}" STREQUAL "1.8") - set(TEST_PNG_VALID FALSE) - endif() - else() - if(NOT "${gamma_type}" STREQUAL "none") - set(TEST_PNG_VALID FALSE) - endif() - endif() - - if(TEST_PNG_VALID) - list(APPEND PNGSTEST_FILES "${test_png}") - endif() - endforeach() - # Should already be sorted, but sort anyway to be certain. - list(SORT PNGSTEST_FILES) - png_add_test(NAME pngstest-${gamma_type}-${alpha_type} - COMMAND pngstest - OPTIONS --tmpfile "${gamma_type}-${alpha_type}-" --log - FILES ${PNGSTEST_FILES}) - endforeach() - endforeach() - - add_executable(pngunknown ${pngunknown_sources}) - target_link_libraries(pngunknown png) - - png_add_test(NAME pngunknown-discard COMMAND pngunknown OPTIONS --strict default=discard FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-IDAT COMMAND pngunknown OPTIONS --strict default=discard IDAT=save FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-if-safe COMMAND pngunknown OPTIONS --strict default=if-safe FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-sAPI COMMAND pngunknown OPTIONS --strict bKGD=save cHRM=save gAMA=save all=discard iCCP=save sBIT=save sRGB=save FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-save COMMAND pngunknown OPTIONS --strict default=save FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-sTER COMMAND pngunknown OPTIONS --strict sTER=if-safe FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-vpAg COMMAND pngunknown OPTIONS --strict vpAg=if-safe FILES "${PNGTEST_PNG}") - - add_executable(pngimage ${pngimage_sources}) - target_link_libraries(pngimage png) - - png_add_test(NAME pngimage-quick COMMAND pngimage OPTIONS --list-combos --log FILES ${PNGSUITE_PNGS}) - png_add_test(NAME pngimage-full COMMAND pngimage OPTIONS --exhaustive --list-combos --log FILES ${PNGSUITE_PNGS}) -endif() - -if(PNG_SHARED) - add_executable(pngfix ${pngfix_sources}) - target_link_libraries(pngfix png) - set(PNG_BIN_TARGETS pngfix) - - add_executable(png-fix-itxt ${png_fix_itxt_sources}) - target_link_libraries(png-fix-itxt ${ZLIB_LIBRARY} ${M_LIBRARY}) - list(APPEND PNG_BIN_TARGETS png-fix-itxt) -endif() - -# Set a variable with CMake code which: -# Creates a symlink from src to dest (if possible) or alternatively -# copies if different. -include(CMakeParseArguments) - -function(CREATE_SYMLINK DEST_FILE) - - cmake_parse_arguments(S "" "FILE;TARGET" "" ${ARGN}) - - if(NOT S_TARGET AND NOT S_FILE) - message(FATAL_ERROR "Specify either a TARGET or a FILE for CREATE_SYMLINK to link to.") - endif(NOT S_TARGET AND NOT S_FILE) - - if(S_TARGET AND S_FILE) - message(FATAL_ERROR "CREATE_SYMLINK called with both source file ${S_FILE} and build target ${S_TARGET} arguments - can only handle 1 type per call.") - endif(S_TARGET AND S_FILE) - - if(S_FILE) - # If we don't need to symlink something that's coming from a build target, - # we can go ahead and symlink/copy at configure time. - - if(CMAKE_HOST_WIN32 AND NOT CYGWIN AND NOT MSYS) - execute_process( - COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${S_FILE} ${DEST_FILE} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - ) - else(CMAKE_HOST_WIN32 AND NOT CYGWIN AND NOT MSYS) - execute_process( - COMMAND ${CMAKE_COMMAND} -E create_symlink ${S_FILE} ${DEST_FILE} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - ) - endif(CMAKE_HOST_WIN32 AND NOT CYGWIN AND NOT MSYS) - endif(S_FILE) - - if(S_TARGET) - # We need to use generator expressions, which can be a bit tricky, so for - # simplicity make the symlink a POST_BUILD step and use the TARGET - # signature of add_custom_command. - - if(CMAKE_HOST_WIN32 AND NOT CYGWIN AND NOT MSYS) - add_custom_command(TARGET ${S_TARGET} POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy_if_different $ $/${DEST_FILE} - ) - else(CMAKE_HOST_WIN32 AND NOT CYGWIN AND NOT MSYS) - add_custom_command(TARGET ${S_TARGET} POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E create_symlink $ $/${DEST_FILE} - ) - endif(CMAKE_HOST_WIN32 AND NOT CYGWIN AND NOT MSYS) - - endif(S_TARGET) - -endfunction() - -# Create source generation scripts. -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genchk.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake @ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genout.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake @ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/gensrc.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake @ONLY) - - -# libpng is a library so default to 'lib' -if(NOT DEFINED CMAKE_INSTALL_LIBDIR) - set(CMAKE_INSTALL_LIBDIR lib) -endif(NOT DEFINED CMAKE_INSTALL_LIBDIR) - -# CREATE PKGCONFIG FILES -# we use the same files like ./configure, so we have to set its vars -# Only do this on Windows for Cygwin - the files don't make much sense outside -# a UNIX look alike -if(NOT WIN32 OR CYGWIN OR MINGW) - set(prefix ${CMAKE_INSTALL_PREFIX}) - set(exec_prefix ${CMAKE_INSTALL_PREFIX}) - set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) - set(includedir ${CMAKE_INSTALL_PREFIX}/include) - set(LIBS "-lz -lm") - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in - ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY) - CREATE_SYMLINK(libpng.pc FILE ${PNGLIB_NAME}.pc) - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in - ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) - CREATE_SYMLINK(libpng-config FILE ${PNGLIB_NAME}-config) -endif(NOT WIN32 OR CYGWIN OR MINGW) - -# SET UP LINKS -if(PNG_SHARED) - set_target_properties(png PROPERTIES -# VERSION 16.${PNGLIB_RELEASE}.1.6.35 - VERSION 16.${PNGLIB_RELEASE}.0 - SOVERSION 16 - CLEAN_DIRECT_OUTPUT 1) -endif() - -# If CMake > 2.4.x, we set a variable used below to export -# targets to an export file. -# TODO: Use VERSION_GREATER after our cmake_minimum_required >= 2.6.2 -if(CMAKE_MAJOR_VERSION GREATER 1 AND CMAKE_MINOR_VERSION GREATER 4) - set(PNG_EXPORT_RULE EXPORT libpng) -elseif(CMAKE_MAJOR_VERSION GREATER 2) # future proof - set(PNG_EXPORT_RULE EXPORT libpng) -endif() - -# INSTALL -if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) - install(TARGETS ${PNG_LIB_TARGETS} - ${PNG_EXPORT_RULE} - RUNTIME DESTINATION bin - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - if(PNG_SHARED) - # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin - if(CYGWIN OR MINGW) - CREATE_SYMLINK(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png) - install(FILES $/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif(CYGWIN OR MINGW) - - if(NOT WIN32) - CREATE_SYMLINK(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png) - install(FILES $/libpng${CMAKE_SHARED_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif(NOT WIN32) - endif(PNG_SHARED) - - if(PNG_STATIC) - if(NOT WIN32 OR CYGWIN OR MINGW) - CREATE_SYMLINK( libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static) - install(FILES $/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif(NOT WIN32 OR CYGWIN OR MINGW) - endif() -endif() - -if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL ) - install(FILES ${libpng_public_hdrs} DESTINATION include) - install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME}) -endif() -if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL ) - if(NOT WIN32 OR CYGWIN OR MINGW) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config - DESTINATION bin) - endif(NOT WIN32 OR CYGWIN OR MINGW) -endif() - -if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL ) - install(TARGETS ${PNG_BIN_TARGETS} - RUNTIME DESTINATION bin) -endif() - -if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) - # Install man pages - if(NOT PNG_MAN_DIR) - set(PNG_MAN_DIR "share/man") - endif() - install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3) - install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5) - # Install pkg-config files - if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config - DESTINATION bin) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config - DESTINATION bin) - endif(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW) -endif() - -# On versions of CMake that support it, create an export file CMake -# users can include() to import our targets -if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL ) - install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake) -endif() - -# what's with libpng-manual.txt and all the extra files? - -# UNINSTALL -# do we need this? - -# DIST -# do we need this? - -# to create msvc import lib for mingw compiled shared lib -# pexports libpng.dll > libpng.def -# lib /def:libpng.def /machine:x86 diff --git a/Dependencies/FreeImage/Source/LibPNG/INSTALL b/Dependencies/FreeImage/Source/LibPNG/INSTALL deleted file mode 100644 index 770f280..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/INSTALL +++ /dev/null @@ -1,465 +0,0 @@ - - Installing libpng - -Contents - - I. Simple installation - II. Rebuilding the configure scripts - III. Using scripts/makefile* - IV. Using cmake - V. Directory structure - VI. Building with project files - VII. Building with makefiles - VIII. Configuring libpng for 16-bit platforms - IX. Configuring for DOS - X. Configuring for Medium Model - XI. Prepending a prefix to exported symbols - XII. Configuring for compiler xxx: - XIII. Removing unwanted object code - XIV. Enabling or disabling hardware optimizations - XV. Changes to the build and configuration of libpng in libpng-1.5.x - XVI. Setjmp/longjmp issues - XVII. Common linking failures - XVIII. Other sources of information about libpng - -I. Simple installation - -On Unix/Linux and similar systems, you can simply type - - ./configure [--prefix=/path] - make check - make install - -and ignore the rest of this document. "/path" is the path to the directory -where you want to install the libpng "lib", "include", and "bin" -subdirectories. - -If you downloaded a GIT clone, you will need to run ./autogen.sh before -running ./configure, to create "configure" and "Makefile.in" which are -not included in the GIT repository. - -Note that "configure" is only included in the "*.tar" distributions and not -in the "*.zip" or "*.7z" distributions. If you downloaded one of those -distributions, see "Building with project files" or "Building with makefiles", -below. - -II. Rebuilding the configure scripts - -If configure does not work on your system, or if you have a need to -change configure.ac or Makefile.am, and you have a reasonably -up-to-date set of tools, running ./autogen.sh in a git clone before -running ./configure may fix the problem. To be really sure that you -aren't using any of the included pre-built scripts, especially if you -are building from a tar distribution instead of a git distribution, -do this: - - ./configure --enable-maintainer-mode - make maintainer-clean - ./autogen.sh --maintainer --clean - ./autogen.sh --maintainer - ./configure [--prefix=/path] [other options] - make - make install - make check - -III. Using scripts/makefile* - -Instead, you can use one of the custom-built makefiles in the -"scripts" directory - - cp scripts/pnglibconf.h.prebuilt pnglibconf.h - cp scripts/makefile.system makefile - make test - make install - -The files that are presently available in the scripts directory -are listed and described in scripts/README.txt. - -Or you can use one of the "projects" in the "projects" directory. - -Before installing libpng, you must first install zlib, if it -is not already on your system. zlib can usually be found -wherever you got libpng; otherwise go to https://zlib.net/. You can -place zlib in the same directory as libpng or in another directory. - -If your system already has a preinstalled zlib you will still need -to have access to the zlib.h and zconf.h include files that -correspond to the version of zlib that's installed. - -If you wish to test with a particular zlib that is not first in the -standard library search path, put ZLIBLIB, ZLIBINC, CPPFLAGS, LDFLAGS, -and LD_LIBRARY_PATH in your environment before running "make test" -or "make distcheck": - - ZLIBLIB=/path/to/lib export ZLIBLIB - ZLIBINC=/path/to/include export ZLIBINC - CPPFLAGS="-I$ZLIBINC" export CPPFLAGS - LDFLAGS="-L$ZLIBLIB" export LDFLAGS - LD_LIBRARY_PATH="$ZLIBLIB:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH - -If you are using one of the makefile scripts, put ZLIBLIB and ZLIBINC -in your environment and type - - make ZLIBLIB=$ZLIBLIB ZLIBINC=$ZLIBINC test - -IV. Using cmake - -If you want to use "cmake" (see www.cmake.org), type - - cmake . -DCMAKE_INSTALL_PREFIX=/path - make - make install - -As when using the simple configure method described above, "/path" points to -the installation directory where you want to put the libpng "lib", "include", -and "bin" subdirectories. - -V. Directory structure - -You can rename the directories that you downloaded (they -might be called "libpng-x.y.z" or "libpngNN" and "zlib-1.2.8" -or "zlib128") so that you have directories called "zlib" and "libpng". - -Your directory structure should look like this: - - .. (the parent directory) - libpng (this directory) - INSTALL (this file) - README - *.h, *.c => libpng source files - CMakeLists.txt => "cmake" script - configuration files: - configure.ac, configure, Makefile.am, Makefile.in, - autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in, - libpng-config.in, aclocal.m4, config.h.in, config.sub, - depcomp, install-sh, mkinstalldirs, test-pngtest.sh - contrib - arm-neon, conftest, examples, gregbook, libtests, pngminim, - pngminus, pngsuite, tools, visupng - projects - cbuilder5, owatcom, visualc71, vstudio, xcode - scripts - makefile.* - *.def (module definition files) - etc. - pngtest.png - etc. - zlib - README, *.h, *.c contrib, etc. - -If the line endings in the files look funny, you may wish to get the other -distribution of libpng. It is available in both tar.gz (UNIX style line -endings) and zip (DOS style line endings) formats. - -VI. Building with project files - -If you are building libpng with MSVC, you can enter the -libpng projects\visualc71 or vstudio directory and follow the instructions -in README.txt. - -Otherwise enter the zlib directory and follow the instructions in zlib/README, -then come back here and run "configure" or choose the appropriate -makefile.sys in the scripts directory. - -VII. Building with makefiles - -Copy the file (or files) that you need from the -scripts directory into this directory, for example - -MSDOS example: - - copy scripts\makefile.msc makefile - copy scripts\pnglibconf.h.prebuilt pnglibconf.h - -UNIX example: - - cp scripts/makefile.std makefile - cp scripts/pnglibconf.h.prebuilt pnglibconf.h - -Read the makefile to see if you need to change any source or -target directories to match your preferences. - -Then read pnglibconf.dfa to see if you want to make any configuration -changes. - -Then just run "make" which will create the libpng library in -this directory and "make test" which will run a quick test that reads -the "pngtest.png" file and writes a "pngout.png" file that should be -identical to it. Look for "9782 zero samples" in the output of the -test. For more confidence, you can run another test by typing -"pngtest pngnow.png" and looking for "289 zero samples" in the output. -Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare -your output with the result shown in contrib/pngsuite/README. - -Most of the makefiles will allow you to run "make install" to -put the library in its final resting place (if you want to -do that, run "make install" in the zlib directory first if necessary). -Some also allow you to run "make test-installed" after you have -run "make install". - -VIII. Configuring libpng for 16-bit platforms - -You will want to look into zconf.h to tell zlib (and thus libpng) that -it cannot allocate more than 64K at a time. Even if you can, the memory -won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K. - -IX. Configuring for DOS - -For DOS users who only have access to the lower 640K, you will -have to limit zlib's memory usage via a png_set_compression_mem_level() -call. See zlib.h or zconf.h in the zlib library for more information. - -X. Configuring for Medium Model - -Libpng's support for medium model has been tested on most of the popular -compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets -defined, and FAR gets defined to far in pngconf.h, and you should be -all set. Everything in the library (except for zlib's structure) is -expecting far data. You must use the typedefs with the p or pp on -the end for pointers (or at least look at them and be careful). Make -note that the rows of data are defined as png_bytepp, which is -an "unsigned char far * far *". - -XI. Prepending a prefix to exported symbols - -Starting with libpng-1.6.0, you can configure libpng (when using the -"configure" script) to prefix all exported symbols by means of the -configuration option "--with-libpng-prefix=FOO_", where FOO_ can be any -string beginning with a letter and containing only uppercase -and lowercase letters, digits, and the underscore (i.e., a C language -identifier). This creates a set of macros in pnglibconf.h, so this is -transparent to applications; their function calls get transformed by -the macros to use the modified names. - -XII. Configuring for compiler xxx: - -All includes for libpng are in pngconf.h. If you need to add, change -or delete an include, this is the place to do it. -The includes that are not needed outside libpng are placed in pngpriv.h, -which is only used by the routines inside libpng itself. -The files in libpng proper only include pngpriv.h and png.h, which -in turn includes pngconf.h and, as of libpng-1.5.0, pnglibconf.h. -As of libpng-1.5.0, pngpriv.h also includes three other private header -files, pngstruct.h, pnginfo.h, and pngdebug.h, which contain material -that previously appeared in the public headers. - -XIII. Removing unwanted object code - -There are a bunch of #define's in pngconf.h that control what parts of -libpng are compiled. All the defines end in _SUPPORTED. If you are -never going to use a capability, you can change the #define to #undef -before recompiling libpng and save yourself code and data space, or -you can turn off individual capabilities with defines that begin with -"PNG_NO_". - -In libpng-1.5.0 and later, the #define's are in pnglibconf.h instead. - -You can also turn all of the transforms and ancillary chunk capabilities -off en masse with compiler directives that define -PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, -or all four, along with directives to turn on any of the capabilities that -you do want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the -extra transformations but still leave the library fully capable of reading -and writing PNG files with all known public chunks. Use of the -PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library -that is incapable of reading or writing ancillary chunks. If you are -not using the progressive reading capability, you can turn that off -with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING -capability, which you'll still have). - -All the reading and writing specific code are in separate files, so the -linker should only grab the files it needs. However, if you want to -make sure, or if you are building a stand alone library, all the -reading files start with "pngr" and all the writing files start with "pngw". -The files that don't match either (like png.c, pngtrans.c, etc.) -are used for both reading and writing, and always need to be included. -The progressive reader is in pngpread.c - -If you are creating or distributing a dynamically linked library (a .so -or DLL file), you should not remove or disable any parts of the library, -as this will cause applications linked with different versions of the -library to fail if they call functions not available in your library. -The size of the library itself should not be an issue, because only -those sections that are actually used will be loaded into memory. - -XIV. Enabling or disabling hardware optimizations - -Certain hardware capabilities, such as the Intel SSE instructions, -are normally detected at run time. Enable them with configure options -such as one of - - --enable-arm-neon=yes - --enable-mips-msa=yes - --enable-intel-sse=yes - --enable-powerpc-vsx=yes - -or enable them all at once with - - --enable-hardware-optimizations=yes - -or, if you are not using "configure", you can use one -or more of - - CPPFLAGS += "-DPNG_ARM_NEON" - CPPFLAGS += "-DPNG_MIPS_MSA" - CPPFLAGS += "-DPNG_INTEL_SSE" - CPPFLAGS += "-DPNG_POWERPC_VSX" - -See for example scripts/makefile.linux-opt - -If you wish to avoid using them, -you can disable them via the configure option - - --disable-hardware-optimizations - -to disable them all, or - - --enable-intel-sse=no - -to disable a particular one, -or via compiler-command options such as - - CPPFLAGS += "-DPNG_ARM_NEON_OPT=0, -DPNG_MIPS_MSA_OPT=0, - -DPNG_INTEL_SSE_OPT=0, -DPNG_POWERPC_VSX_OPT=0" - -If you are using cmake, hardware optimizations are "on" -by default. To disable them, use - - cmake . -DPNG_ARM_NEON=no -DPNG_INTEL_SSE=no \ - -DPNG_MIPS_MSA=no -DPNG_POWERPC_VSX=no - -or disable them all at once with - - cmake . -DPNG_HARDWARE_OPTIMIZATIONS=no - -XV. Changes to the build and configuration of libpng in libpng-1.5.x - -Details of internal changes to the library code can be found in the CHANGES -file and in the GIT repository logs. These will be of no concern to the vast -majority of library users or builders; however, the few who configure libpng -to a non-default feature set may need to change how this is done. - -There should be no need for library builders to alter build scripts if -these use the distributed build support - configure or the makefiles - -however, users of the makefiles may care to update their build scripts -to build pnglibconf.h where the corresponding makefile does not do so. - -Building libpng with a non-default configuration has changed completely. -The old method using pngusr.h should still work correctly even though the -way pngusr.h is used in the build has been changed; however, library -builders will probably want to examine the changes to take advantage of -new capabilities and to simplify their build system. - -A. Specific changes to library configuration capabilities - -The exact mechanism used to control attributes of API functions has -changed. A single set of operating system independent macro definitions -is used and operating system specific directives are defined in -pnglibconf.h - -As part of this the mechanism used to choose procedure call standards on -those systems that allow a choice has been changed. At present this only -affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems -running on Intel processors. As before, PNGAPI is defined where required -to control the exported API functions; however, two new macros, PNGCBAPI -and PNGCAPI, are used instead for callback functions (PNGCBAPI) and -(PNGCAPI) for functions that must match a C library prototype (currently -only png_longjmp_ptr, which must match the C longjmp function.) The new -approach is documented in pngconf.h - -Despite these changes, libpng 1.5.0 only supports the native C function -calling standard on those platforms tested so far ("__cdecl" on Microsoft -Windows). This is because the support requirements for alternative -calling conventions seem to no longer exist. Developers who find it -necessary to set PNG_API_RULE to 1 should advise the mailing list -(png-mng-implement) of this and library builders who use Openwatcom and -therefore set PNG_API_RULE to 2 should also contact the mailing list. - -B. Changes to the configuration mechanism - -Prior to libpng-1.5.0 library builders who needed to configure libpng -had either to modify the exported pngconf.h header file to add system -specific configuration or had to write feature selection macros into -pngusr.h and cause this to be included into pngconf.h by defining -PNG_USER_CONFIG. The latter mechanism had the disadvantage that an -application built without PNG_USER_CONFIG defined would see the -unmodified, default, libpng API and thus would probably fail to link. - -These mechanisms still work in the configure build and in any makefile -build that builds pnglibconf.h, although the feature selection macros -have changed somewhat as described above. In 1.5.0, however, pngusr.h is -processed only once, at the time the exported header file pnglibconf.h is -built. pngconf.h no longer includes pngusr.h; therefore, pngusr.h is ignored -after the build of pnglibconf.h and it is never included in an application -build. - -The formerly used alternative of adding a list of feature macros to the -CPPFLAGS setting in the build also still works; however, the macros will be -copied to pnglibconf.h and this may produce macro redefinition warnings -when the individual C files are compiled. - -All configuration now only works if pnglibconf.h is built from -scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan -(the original author of awk) maintains C source code of that awk and this -and all known later implementations (often called by subtly different -names - nawk and gawk for example) are adequate to build pnglibconf.h. -The Sun Microsystems (now Oracle) program 'awk' is an earlier version -and does not work; this may also apply to other systems that have a -functioning awk called 'nawk'. - -Configuration options are now documented in scripts/pnglibconf.dfa. This -file also includes dependency information that ensures a configuration is -consistent; that is, if a feature is switched off, dependent features are -also switched off. As a recommended alternative to using feature macros in -pngusr.h a system builder may also define equivalent options in pngusr.dfa -(or, indeed, any file) and add that to the configuration by setting -DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate -how to do this, and also illustrate a case where pngusr.h is still required. - -After you have built libpng, the definitions that were recorded in -pnglibconf.h are available to your application (pnglibconf.h is included -in png.h and gets installed alongside png.h and pngconf.h in your -$PREFIX/include directory). Do not edit pnglibconf.h after you have built -libpng, because than the settings would not accurately reflect the settings -that were used to build libpng. - -XVI. Setjmp/longjmp issues - -Libpng uses setjmp()/longjmp() for error handling. Unfortunately setjmp() -is known to be not thread-safe on some platforms and we don't know of -any platform where it is guaranteed to be thread-safe. Therefore, if -your application is going to be using multiple threads, you should -configure libpng with PNG_NO_SETJMP in your pngusr.dfa file, with --DPNG_NO_SETJMP on your compile line, or with - - #undef PNG_SETJMP_SUPPORTED - -in your pnglibconf.h or pngusr.h. - -Starting with libpng-1.6.0, the library included a "simplified API". -This requires setjmp/longjmp, so you must either build the library -with PNG_SETJMP_SUPPORTED defined, or with PNG_SIMPLIFIED_READ_SUPPORTED -and PNG_SIMPLIFIED_WRITE_SUPPORTED undefined. - -XVII. Common linking failures - -If your application fails to find libpng or zlib entries while linking: - - Be sure "-lz" appears after "-lpng" on your linking command. - - Be sure you have built libpng, zlib, and your application for the - same platform (e.g., 32-bit or 64-bit). - - If you are using the vstudio project, observe the WARNING in - project/vstudio/README.txt. - -XVIII. Other sources of information about libpng: - -Further information can be found in the README and libpng-manual.txt -files, in the individual makefiles, in png.h, and the manual pages -libpng.3 and png.5. - -Copyright (c) 1998-2002,2006-2016 Glenn Randers-Pehrson -This document is released under the libpng license. -For conditions of distribution and use, see the disclaimer -and license in png.h. diff --git a/Dependencies/FreeImage/Source/LibPNG/LICENSE b/Dependencies/FreeImage/Source/LibPNG/LICENSE deleted file mode 100644 index 48dd38f..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/LICENSE +++ /dev/null @@ -1,133 +0,0 @@ - -This copy of the libpng notices is provided for your convenience. In case of -any discrepancy between this copy and the notices in the file png.h that is -included in the libpng distribution, the latter shall prevail. - -COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - -If you modify libpng you may insert additional notices immediately following -this sentence. - -This code is released under the libpng license. - -libpng versions 1.0.7, July 1, 2000 through 1.6.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 owner -as a trademark in any jurisdiction. However, because libpng has -been distributed and maintained world-wide, continually since 1995, -the Copyright owner claims "common-law trademark protection" in any -jurisdiction where common-law trademark is recognized. - -OSI CERTIFICATION: - -Libpng is OSI Certified Open Source Software. OSI Certified Open Source is -a certification mark of the Open Source Initiative. OSI has not addressed -the additional disclaimers inserted at version 1.0.7. - -EXPORT CONTROL: - -The Copyright owner believes that the Export Control Classification -Number (ECCN) for libpng is EAR99, which means not subject to export -controls or International Traffic in Arms Regulations (ITAR) because -it is open source, publicly available software, that does not contain -any encryption software. See the EAR, paragraphs 734.3(b)(3) and -734.7(b). - -Glenn Randers-Pehrson -glennrp at users.sourceforge.net -July 15, 2018 diff --git a/Dependencies/FreeImage/Source/LibPNG/LibPNG.2013.vcxproj b/Dependencies/FreeImage/Source/LibPNG/LibPNG.2013.vcxproj deleted file mode 100644 index bd3ae34..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/LibPNG.2013.vcxproj +++ /dev/null @@ -1,233 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - LibPNG - {7DB10B50-CE00-4D7A-B322-6824F05D2FCB} - LibPNG - - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Full - AnySuitable - true - Speed - true - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - X64 - - - Full - AnySuitable - true - Speed - true - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - Disabled - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - EditAndContinue - Default - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - X64 - - - Disabled - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - ProgramDatabase - Default - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {33134f61-c1ad-4b6f-9cea-503a9f140c52} - false - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibPNG/LibPNG.2013.vcxproj.filters b/Dependencies/FreeImage/Source/LibPNG/LibPNG.2013.vcxproj.filters deleted file mode 100644 index 4c5890e..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/LibPNG.2013.vcxproj.filters +++ /dev/null @@ -1,83 +0,0 @@ - - - - - {926522ec-b3d4-40ac-b675-698e38162f26} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {ce0089ae-5e1e-4a2c-b359-88ef4dec8309} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibPNG/LibPNG.2017.vcxproj b/Dependencies/FreeImage/Source/LibPNG/LibPNG.2017.vcxproj deleted file mode 100644 index bdd0e7e..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/LibPNG.2017.vcxproj +++ /dev/null @@ -1,234 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - LibPNG - {7DB10B50-CE00-4D7A-B322-6824F05D2FCB} - LibPNG - 10.0.16299.0 - - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Full - AnySuitable - true - Speed - true - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - X64 - - - Full - AnySuitable - true - Speed - true - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - Disabled - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - EditAndContinue - Default - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - X64 - - - Disabled - ..\zlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - ProgramDatabase - Default - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {33134f61-c1ad-4b6f-9cea-503a9f140c52} - false - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibPNG/LibPNG.2017.vcxproj.filters b/Dependencies/FreeImage/Source/LibPNG/LibPNG.2017.vcxproj.filters deleted file mode 100644 index 4c5890e..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/LibPNG.2017.vcxproj.filters +++ /dev/null @@ -1,83 +0,0 @@ - - - - - {926522ec-b3d4-40ac-b675-698e38162f26} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {ce0089ae-5e1e-4a2c-b359-88ef4dec8309} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibPNG/README b/Dependencies/FreeImage/Source/LibPNG/README deleted file mode 100644 index 9ca631b..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/README +++ /dev/null @@ -1,222 +0,0 @@ -README for libpng version 1.6.35 - July 15, 2018 (shared library 16.0) -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 or if you want UNIX-style line endings in the text files, -or lpng*.7z or lpng*.zip if you want DOS-style line endings. - -Version 0.89 was the first official release of libpng. Don't let the -fact that it's the first release fool you. The libpng library has been in -extensive use and testing since mid-1995. 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 < 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 png 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. -**** - -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 include 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->8 bit color -conversion. - -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 changes made to the library, and bugs fixed are based on discussions -on the PNG-implement mailing list and not on material submitted -privately to Guy, Andreas, or Glenn. They will forward any good -suggestions to the list. - -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 - -I have included a general makefile, as well as several machine and -compiler specific ones, but you may have to modify one for your own needs. - -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 will definitely need zlib 1.0.4 or later if you are -taking advantage of the MS-DOS "far" structure allocation for the small -and medium memory models. 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 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 libpng.sourceforge.io in the -[DOWNLOAD] area, and at http://libpng.download/src . If you -can't find it in any of those places, e-mail me, and I'll help you find it. - -I am not a lawyer, but I believe that the Export Control Classification -Number (ECCN) for libpng is EAR99, which means not subject to export -controls or International Traffic in Arms Regulations (ITAR) because it -is open source, publicly available software, that does not contain any -encryption software. See the EAR, paragraphs 734.3(b)(3) and 734.7(b). - -If you have any code changes, requests, problems, etc., please e-mail -them to me. Also, I'd appreciate any make files or project files, -and any modifications you needed to make to get libpng to compile, -along with a #define variable to tell what compiler/system you are on. -If you needed to add transformations to libpng, or wish libpng would -provide the image in a different way, drop me a note (and code, if -possible), so I can consider supporting the transformation. -Finally, if you get any warning messages when compiling libpng -(note: not zlib), and they are easy to fix, I'd appreciate the -fix. Please mention "libpng" somewhere in the subject line. Thanks. - -This release was created and will be supported by myself (of course -based in a large way on Guy's and Andreas' earlier work), and the PNG -development group. - -Send comments/corrections/commendations to png-mng-implement at -lists.sourceforge.net (subscription required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement -to subscribe). - -You can't reach Guy, the original libpng author, at the addresses -given in previous versions of this document. He and Andreas will -read mail addressed to the png-implement list, however. - -Please do not send general questions about PNG. Send them to -png-mng-misc at lists.sf.net (subscription required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-misc to -subscribe). If you have a question about something -in the PNG specification that is related to using libpng, send it -to me. Send me any questions that start with "I was using libpng, -and ...". If in doubt, send questions to me. I'll bounce them -to others, if necessary. - -Please do not send suggestions on how to change PNG. We have -been discussing PNG for twenty years now, and it is official and -finished. If you have suggestions for libpng, however, I'll -gladly listen. Even if your suggestion is not used immediately, -it may be used later. - -Files in this distribution: - - ANNOUNCE => Announcement of this version, with recent changes - CHANGES => Description of changes between libpng versions - KNOWNBUG => List of known bugs and deficiencies - LICENSE => License to use and redistribute libpng - README => This file - TODO => Things not implemented in the current library - Y2KINFO => Statement of Y2K compliance - 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 - 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 => Contains optimized code for the ARM platform - powerpc => Contains optimized code for the PowerPC platform - contrib => Contributions - arm-neon => Optimized code for ARM-NEON platform - powerpc-vsx => Optimized code for POWERPC-VSX platform - examples => Example programs - gregbook => source code for PNG reading and writing, from - Greg Roelofs' "PNG: The Definitive Guide", - O'Reilly, 1999 - libtests => Test programs - mips-msa => Optimized code for MIPS-MSA platform - pngminim => Minimal decoder, encoder, and progressive decoder - programs demonstrating use of pngusr.dfa - pngminus => Simple pnm2png and png2pnm programs - pngsuite => Test images - testpngs - tools => Various tools - visupng => Contains a MSVC workspace for VisualPng - intel => Optimized code for INTEL-SSE2 platform - mips => Optimized code for MIPS platform - projects => Contains project files and workspaces for - building a DLL - owatcom => Contains a WATCOM project for building libpng - visualc71 => Contains a Microsoft Visual C++ (MSVC) - workspace for building libpng and zlib - vstudio => Contains a Microsoft Visual C++ (MSVC) - workspace for building libpng and zlib - scripts => Directory containing scripts for building libpng: - (see scripts/README.txt for the list of scripts) - -Good luck, and happy coding. - --Glenn Randers-Pehrson (current maintainer, since 1998) - Internet: glennrp at users.sourceforge.net - --Andreas Eric Dilger (former maintainer, 1996-1997) - Internet: adilger at enel.ucalgary.ca - Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/ - --Guy Eric Schalnat (original author and former maintainer, 1995-1996) - (formerly of Group 42, Inc) - Internet: gschal at infinet.com diff --git a/Dependencies/FreeImage/Source/LibPNG/TODO b/Dependencies/FreeImage/Source/LibPNG/TODO deleted file mode 100644 index b689060..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/TODO +++ /dev/null @@ -1,30 +0,0 @@ -/* -TODO - list of things to do for libpng: - -Final bug fixes. -Better C++ wrapper/full C++ implementation? -Fix problem with C++ and EXTERN "C". -cHRM transformation. -Remove setjmp/longjmp usage in favor of returning error codes. As a start on - this, minimize the use of png_error(), replacing them with - png_warning(); return(0); or similar. -Palette creation. -Add "grayscale->palette" transformation and "palette->grayscale" detection. -Improved dithering. -Multi-lingual error and warning message support. -Complete sRGB transformation (presently it simply uses gamma=0.45455). -Man pages for function calls. -Better documentation. -Better filter selection - (counting huffman bits/precompression? filter inertia? filter costs?). -Histogram creation. -Text conversion between different code pages (Latin-1 -> Mac and DOS). -Avoid building gamma tables whenever possible. -Use greater precision when changing to linear gamma for compositing against - background and doing rgb-to-gray transformation. -Investigate pre-incremented loop counters and other loop constructions. -Add interpolated method of handling interlacing. -Extend pngvalid.c to validate more of the libpng transformations. -Refactor preprocessor conditionals to compile entire statements - -*/ diff --git a/Dependencies/FreeImage/Source/LibPNG/configure b/Dependencies/FreeImage/Source/LibPNG/configure deleted file mode 100644 index 472b35e..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/configure +++ /dev/null @@ -1,16129 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libpng 1.6.35. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: png-mng-implement@lists.sourceforge.net about your -$0: system, including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='libpng' -PACKAGE_TARNAME='libpng' -PACKAGE_VERSION='1.6.35' -PACKAGE_STRING='libpng 1.6.35' -PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net' -PACKAGE_URL='' - -ac_unique_file="pngget.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -PNG_POWERPC_VSX_FALSE -PNG_POWERPC_VSX_TRUE -PNG_INTEL_SSE_FALSE -PNG_INTEL_SSE_TRUE -PNG_MIPS_MSA_FALSE -PNG_MIPS_MSA_TRUE -PNG_ARM_NEON_FALSE -PNG_ARM_NEON_TRUE -DO_INSTALL_LIBPNG_CONFIG_FALSE -DO_INSTALL_LIBPNG_CONFIG_TRUE -DO_INSTALL_LIBPNG_PC_FALSE -DO_INSTALL_LIBPNG_PC_TRUE -DO_INSTALL_LINKS_FALSE -DO_INSTALL_LINKS_TRUE -DO_PNG_PREFIX_FALSE -DO_PNG_PREFIX_TRUE -PNG_PREFIX -binconfigs -pkgconfigdir -PNGLIB_RELEASE -PNGLIB_MINOR -PNGLIB_MAJOR -PNGLIB_VERSION -SYMBOL_PREFIX -HAVE_LD_VERSION_SCRIPT_FALSE -HAVE_LD_VERSION_SCRIPT_TRUE -HAVE_SOLARIS_LD_FALSE -HAVE_SOLARIS_LD_TRUE -HAVE_CLOCK_GETTIME_FALSE -HAVE_CLOCK_GETTIME_TRUE -LIBOBJS -POW_LIB -PNG_COPTS -DFNCPP -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -AR -NM -ac_ct_DUMPBIN -DUMPBIN -LIBTOOL -OBJDUMP -DLLTOOL -AS -LN_S -CPP -LD -FGREP -EGREP -GREP -SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -am__fastdepCCAS_FALSE -am__fastdepCCAS_TRUE -CCASDEPMODE -CCASFLAGS -CCAS -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL -am__quote' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_maintainer_mode -enable_dependency_tracking -with_gnu_ld -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_sysroot -enable_libtool_lock -enable_werror -with_zlib_prefix -with_pkgconfigdir -with_binconfigs -with_libpng_prefix -enable_unversioned_links -enable_unversioned_libpng_pc -enable_unversioned_libpng_config -enable_hardware_optimizations -enable_arm_neon -enable_mips_msa -enable_intel_sse -enable_powerpc_vsx -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CCAS -CCASFLAGS -CPP -LT_SYS_LIBRARY_PATH -PNG_COPTS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures libpng 1.6.35 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/libpng] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of libpng 1.6.35:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-maintainer-mode - enable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-werror[=OPT] Pass -Werror or the given argument to the compiler - if it is supported - --enable-unversioned-links - Installed libpng header files are placed in a - versioned subdirectory and installed libpng library - (including DLL) files are versioned. If this option - is enabled unversioned links will be created - pointing to the corresponding installed files. If - you use libpng.pc or libpng-config for all builds - you do not need these links, but if you compile - programs directly they will typically #include - and link with -lpng; in that case you need - the links. The links can be installed manually using - 'make install-header-links' and 'make - install-library-links' and can be removed using the - corresponding uninstall- targets. If you do enable - this option every libpng 'make install' will - recreate the links to point to the just installed - version of libpng. The default is to create the - links; use --disable-unversioned-links to change - this - --enable-unversioned-libpng-pc - Install the configuration file 'libpng.pc' as a link - to the versioned version. This is done by default - - use --disable-unversioned-libpng-pc to change this. - --enable-unversioned-libpng-config - Install the configuration file 'libpng-config' as a - link to the versioned version. This is done by - default - use --disable-unversioned-libpng-config to - change this. - --enable-hardware-optimizations - Enable hardware optimizations: =no/off, yes/on: - --enable-arm-neon Enable ARM NEON optimizations: =no/off, check, api, - yes/on: no/off: disable the optimizations; check: - use internal checking code (deprecated and poorly - supported); api: disable by default, enable by a - call to png_set_option; yes/on: turn on - unconditionally. If not specified: determined by the - compiler. - --enable-mips-msa Enable MIPS MSA optimizations: =no/off, check, api, - yes/on: no/off: disable the optimizations; check: - use internal checking code (deprecated and poorly - supported); api: disable by default, enable by a - call to png_set_option; yes/on: turn on - unconditionally. If not specified: determined by the - compiler. - --enable-intel-sse Enable Intel SSE optimizations: =no/off, yes/on: - no/off: disable the optimizations; yes/on: enable - the optimizations. If not specified: determined by - the compiler. - --enable-powerpc-vsx Enable POWERPC VSX optimizations: =no/off, check, - api, yes/on: no/off: disable the optimizations; - check: use internal checking code api: disable by - default, enable by a call to png_set_option yes/on: - turn on unconditionally. If not specified: - determined by the compiler. - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). - --with-zlib-prefix prefix that may have been used in installed zlib - --with-pkgconfigdir Use the specified pkgconfig dir (default is - libdir/pkgconfig) - --with-binconfigs Generate shell libpng-config scripts as well as - pkg-config data [default=yes] - --with-libpng-prefix prefix libpng exported function (API) names with the - given value - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CCAS assembler compiler command (defaults to CC) - CCASFLAGS assembler compiler flags (defaults to CFLAGS) - CPP C preprocessor - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - PNG_COPTS additional flags for the C compiler, use this for options that - would cause configure itself to fail - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -libpng configure 1.6.35 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by libpng $as_me 1.6.35, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -# libpng does not follow GNU file name conventions (hence 'foreign') -# color-tests requires automake 1.11 or later -# silent-rules requires automake 1.11 or later -# dist-xz requires automake 1.11 or later -# 1.12.2 fixes a security issue in 1.11.2 and 1.12.1 -# 1.13 is required for parallel tests -am__api_version='1.16' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='libpng' - VERSION='1.6.35' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar pax cpio none' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - -# The following line causes --disable-maintainer-mode to be the default to -# configure. This is necessary because libpng distributions cannot rely on the -# time stamps of the autotools generated files being correct - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - - -PNGLIB_VERSION=1.6.35 -PNGLIB_MAJOR=1 -PNGLIB_MINOR=6 -PNGLIB_RELEASE=35 - - - -ac_config_headers="$ac_config_headers config.h" - - -# Checks for programs. -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } -cat > confinc.mk << 'END' -am__doit: - @echo this is the am__doit target >confinc.out -.PHONY: am__doit -END -am__include="#" -am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 - (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - case $?:`cat confinc.out 2>/dev/null` in #( - '0:this is the am__doit target') : - case $s in #( - BSD) : - am__include='.include' am__quote='"' ;; #( - *) : - am__include='include' am__quote='' ;; -esac ;; #( - *) : - ;; -esac - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -$as_echo "${_am_result}" >&6; } - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -# By default we simply use the C compiler to build assembly code. - -test "${CCAS+set}" = set || CCAS=$CC -test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS - - - -depcc="$CCAS" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CCAS_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CCAS_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CCAS_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } -CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then - am__fastdepCCAS_TRUE= - am__fastdepCCAS_FALSE='#' -else - am__fastdepCCAS_TRUE='#' - am__fastdepCCAS_FALSE= -fi - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options -enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; -esac - -test -z "$AS" && AS=as - - - - - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - enable_dlopen=no - - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - pic_mode=default -fi - - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } - -# Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - -# Some awks crash when confronted with pnglibconf.dfa, do a test run now -# to make sure this doesn't happen -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that AWK works" >&5 -$as_echo_n "checking that AWK works... " >&6; } -if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\ - ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ - ${srcdir}/pngusr.dfa 1>&2 -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 1 "failed -See \`config.log' for more details" "$LINENO" 5; } -fi - -# This is a remnant of the old cc -E validation, where it may have been -# necessary to use a different preprocessor for .dfn files -DFNCPP="$CPP" - - -# -Werror cannot be passed to GCC in CFLAGS because configure will fail (it -# checks the compiler with a program that generates a warning), add the -# following option to deal with this - -# Check whether --enable-werror was given. -if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; test "$enable_werror" = "yes" && enable_werror="-Werror" - if test "$enable_werror" != "no"; then - sav_CFLAGS="$CFLAGS" - CFLAGS="$enable_werror $CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler allows $enable_werror" >&5 -$as_echo_n "checking if the compiler allows $enable_werror... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - int main(int argc, char **argv){ - return argv[argc-1][0]; - } -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - PNG_COPTS="$PNG_COPTS $enable_werror" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$sav_CFLAGS" - fi -fi - - -# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89 -# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining _POSIX_SOURCE to 1 -# This is incompatible with the new default mode, so we test for that and force the -# "-std=c89" compiler option: -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to force back C standard to C89" >&5 -$as_echo_n "checking if we need to force back C standard to C89... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define _POSIX_SOURCE 1 - #include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - - if test "x$GCC" != "xyes"; then - as_fn_error $? "Forcing back to C89 is required but the flags are only known for GCC" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - CFLAGS="$CFLAGS -std=c89" - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# Checks for header files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - - -# Checks for typedefs, structures, and compiler characteristics. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if ${ac_cv_struct_tm+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_tm=time.h -else - ac_cv_struct_tm=sys/time.h -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if ${ac_cv_c_restrict+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } -int -main () -{ -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_restrict=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } - - case $ac_cv_c_restrict in - restrict) ;; - no) $as_echo "#define restrict /**/" >>confdefs.h - ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $ac_cv_c_restrict -_ACEOF - ;; - esac - - -# Checks for library functions. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 -$as_echo_n "checking for working strtod... " >&6; } -if ${ac_cv_func_strtod+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_strtod=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -$ac_includes_default -#ifndef strtod -double strtod (); -#endif -int -main() -{ - { - /* Some versions of Linux strtod mis-parse strings with leading '+'. */ - char *string = " +69"; - char *term; - double value; - value = strtod (string, &term); - if (value != 69 || term != (string + 4)) - return 1; - } - - { - /* Under Solaris 2.4, strtod returns the wrong value for the - terminating character under some conditions. */ - char *string = "NaN"; - char *term; - strtod (string, &term); - if (term != string && *(term - 1) == 0) - return 1; - } - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_strtod=yes -else - ac_cv_func_strtod=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 -$as_echo "$ac_cv_func_strtod" >&6; } -if test $ac_cv_func_strtod = no; then - case " $LIBOBJS " in - *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; -esac - -ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" -if test "x$ac_cv_func_pow" = xyes; then : - -fi - -if test $ac_cv_func_pow = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 -$as_echo_n "checking for pow in -lm... " >&6; } -if ${ac_cv_lib_m_pow+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pow (); -int -main () -{ -return pow (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_pow=yes -else - ac_cv_lib_m_pow=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 -$as_echo "$ac_cv_lib_m_pow" >&6; } -if test "x$ac_cv_lib_m_pow" = xyes; then : - POW_LIB=-lm -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 -$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} -fi - -fi - -fi - -for ac_func in memset -do : - ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" -if test "x$ac_cv_func_memset" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MEMSET 1 -_ACEOF - -else - as_fn_error $? "memset not found in libc" "$LINENO" 5 -fi -done - -for ac_func in pow -do : - ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" -if test "x$ac_cv_func_pow" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_POW 1 -_ACEOF - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 -$as_echo_n "checking for pow in -lm... " >&6; } -if ${ac_cv_lib_m_pow+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pow (); -int -main () -{ -return pow (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_pow=yes -else - ac_cv_lib_m_pow=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 -$as_echo "$ac_cv_lib_m_pow" >&6; } -if test "x$ac_cv_lib_m_pow" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -else - as_fn_error $? "cannot find pow" "$LINENO" 5 -fi - -fi -done - - -# Some later POSIX 1003.1 functions are required for test programs, failure here -# is soft (the corresponding test program is not built). -ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building timepng" >&5 -$as_echo "$as_me: WARNING: not building timepng" >&2;} -fi - - if test "$ac_cv_func_clock_gettime" = "yes"; then - HAVE_CLOCK_GETTIME_TRUE= - HAVE_CLOCK_GETTIME_FALSE='#' -else - HAVE_CLOCK_GETTIME_TRUE='#' - HAVE_CLOCK_GETTIME_FALSE= -fi - - - -# Check whether --with-zlib-prefix was given. -if test "${with_zlib_prefix+set}" = set; then : - withval=$with_zlib_prefix; ZPREFIX=${withval} -else - ZPREFIX='z_' -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5 -$as_echo_n "checking for zlibVersion in -lz... " >&6; } -if ${ac_cv_lib_z_zlibVersion+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char zlibVersion (); -int -main () -{ -return zlibVersion (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_zlibVersion=yes -else - ac_cv_lib_z_zlibVersion=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5 -$as_echo "$ac_cv_lib_z_zlibVersion" >&6; } -if test "x$ac_cv_lib_z_zlibVersion" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -else - as_ac_Lib=`$as_echo "ac_cv_lib_z_${ZPREFIX}zlibVersion" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ZPREFIX}zlibVersion in -lz" >&5 -$as_echo_n "checking for ${ZPREFIX}zlibVersion in -lz... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ${ZPREFIX}zlibVersion (); -int -main () -{ -return ${ZPREFIX}zlibVersion (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -else - as_fn_error $? "zlib not installed" "$LINENO" 5 -fi - -fi - - -# The following is for pngvalid, to ensure it catches FP errors even on -# platforms that don't enable FP exceptions, the function appears in the math -# library (typically), it's not an error if it is not found. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for feenableexcept in -lm" >&5 -$as_echo_n "checking for feenableexcept in -lm... " >&6; } -if ${ac_cv_lib_m_feenableexcept+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char feenableexcept (); -int -main () -{ -return feenableexcept (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_feenableexcept=yes -else - ac_cv_lib_m_feenableexcept=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_feenableexcept" >&5 -$as_echo "$ac_cv_lib_m_feenableexcept" >&6; } -if test "x$ac_cv_lib_m_feenableexcept" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - -for ac_func in feenableexcept -do : - ac_fn_c_check_func "$LINENO" "feenableexcept" "ac_cv_func_feenableexcept" -if test "x$ac_cv_func_feenableexcept" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FEENABLEEXCEPT 1 -_ACEOF - -fi -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if using Solaris linker" >&5 -$as_echo_n "checking if using Solaris linker... " >&6; } -SLD=`$LD --version 2>&1 | grep Solaris` -if test "$SLD"; then - have_solaris_ld=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - have_solaris_ld=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "$have_solaris_ld" = "yes"; then - HAVE_SOLARIS_LD_TRUE= - HAVE_SOLARIS_LD_FALSE='#' -else - HAVE_SOLARIS_LD_TRUE='#' - HAVE_SOLARIS_LD_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5 -$as_echo_n "checking if libraries can be versioned... " >&6; } -# Special case for PE/COFF platforms: ld reports -# support for version-script, but doesn't actually -# DO anything with it. -case $host in -*cygwin* | *mingw32* | *interix* ) - have_ld_version_script=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -;; -* ) - -if test "$have_solaris_ld" = "yes"; then - GLD=`$LD --help < /dev/null 2>&1 | grep 'M mapfile'` -else - GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script` -fi - -if test "$GLD"; then - have_ld_version_script=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - have_ld_version_script=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** You have not enabled versioned symbols." >&5 -$as_echo "$as_me: WARNING: *** You have not enabled versioned symbols." >&2;} -fi -;; -esac - - if test "$have_ld_version_script" = "yes"; then - HAVE_LD_VERSION_SCRIPT_TRUE= - HAVE_LD_VERSION_SCRIPT_FALSE='#' -else - HAVE_LD_VERSION_SCRIPT_TRUE='#' - HAVE_LD_VERSION_SCRIPT_FALSE= -fi - - -if test "$have_ld_version_script" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5 -$as_echo_n "checking for symbol prefix... " >&6; } - SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ - | ${CPP-${CC-gcc} -E} - 2>&1 \ - | ${EGREP-grep} "^PREFIX=" \ - | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5 -$as_echo "$SYMBOL_PREFIX" >&6; } -fi - -# Substitutions for .in files - - - - - -# Additional arguments (and substitutions) -# Allow the pkg-config directory to be set - -# Check whether --with-pkgconfigdir was given. -if test "${with_pkgconfigdir+set}" = set; then : - withval=$with_pkgconfigdir; pkgconfigdir=${withval} -else - pkgconfigdir='${libdir}/pkgconfig' -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: pkgconfig directory is ${pkgconfigdir}" >&5 -$as_echo "$as_me: pkgconfig directory is ${pkgconfigdir}" >&6;} - -# Make the *-config binary config scripts optional - -# Check whether --with-binconfigs was given. -if test "${with_binconfigs+set}" = set; then : - withval=$with_binconfigs; if test "${withval}" = no; then - binconfigs= - { $as_echo "$as_me:${as_lineno-$LINENO}: libpng-config scripts will not be built" >&5 -$as_echo "$as_me: libpng-config scripts will not be built" >&6;} - else - binconfigs='${binconfigs}' - fi -else - binconfigs='${binconfigs}' -fi - - - -# Support for prefixes to the API function names; this will generate defines -# at the start of the build to rename exported library functions - -# Check whether --with-libpng-prefix was given. -if test "${with_libpng_prefix+set}" = set; then : - withval=$with_libpng_prefix; if test "${withval:-no}" != "no"; then - PNG_PREFIX=${withval} - - fi -fi - - if test "${with_libpng_prefix:-no}" != "no"; then - DO_PNG_PREFIX_TRUE= - DO_PNG_PREFIX_FALSE='#' -else - DO_PNG_PREFIX_TRUE='#' - DO_PNG_PREFIX_FALSE= -fi - - -# Control over what links are made for installed files. Versioned files are -# always installed, when the following options are turned on corresponding -# unversioned links are also created (normally as symbolic links): -# Check whether --enable-unversioned-links was given. -if test "${enable_unversioned_links+set}" = set; then : - enableval=$enable_unversioned_links; -fi - - -# The AM_CONDITIONAL test is written so that the default is enabled; -# --disable-unversioned-links must be given to turn the option off. - if test "$enable_unversioned_links" != "no"; then - DO_INSTALL_LINKS_TRUE= - DO_INSTALL_LINKS_FALSE='#' -else - DO_INSTALL_LINKS_TRUE='#' - DO_INSTALL_LINKS_FALSE= -fi - - -# Check whether --enable-unversioned-libpng-pc was given. -if test "${enable_unversioned_libpng_pc+set}" = set; then : - enableval=$enable_unversioned_libpng_pc; -fi - - if test "$enable_unversioned_libpng_pc" != "no"; then - DO_INSTALL_LIBPNG_PC_TRUE= - DO_INSTALL_LIBPNG_PC_FALSE='#' -else - DO_INSTALL_LIBPNG_PC_TRUE='#' - DO_INSTALL_LIBPNG_PC_FALSE= -fi - - -# Check whether --enable-unversioned-libpng-config was given. -if test "${enable_unversioned_libpng_config+set}" = set; then : - enableval=$enable_unversioned_libpng_config; -fi - - if test "$enable_unversioned_libpng_config" != "no"; then - DO_INSTALL_LIBPNG_CONFIG_TRUE= - DO_INSTALL_LIBPNG_CONFIG_FALSE='#' -else - DO_INSTALL_LIBPNG_CONFIG_TRUE='#' - DO_INSTALL_LIBPNG_CONFIG_FALSE= -fi - - -# HOST SPECIFIC OPTIONS -# ===================== -# -# DEFAULT -# ======= -# -# Check whether --enable-hardware-optimizations was given. -if test "${enable_hardware_optimizations+set}" = set; then : - enableval=$enable_hardware_optimizations; case "$enableval" in - no|off) - # disable hardware optimization on all systems: - enable_arm_neon=no - -$as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h - - enable_mips_msa=no - -$as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h - - enable_powerpc_vsx=no - -$as_echo "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h - - enable_intel_sse=no - -$as_echo "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h - - ;; - *) - # allow enabling hardware optimization on any system: - case "$host_cpu" in - arm*|aarch64*) - enable_arm_neon=yes - -$as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h - - ;; - mipsel*|mips64el*) - enable_mips_msa=yes - -$as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h - - ;; - i?86|x86_64) - enable_intel_sse=yes - -$as_echo "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h - - ;; - powerpc*|ppc64*) - enable_powerpc_vsx=yes - -$as_echo "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h - - ;; - esac - ;; - esac -fi - - -# ARM -# === -# -# ARM NEON (SIMD) support. - -# Check whether --enable-arm-neon was given. -if test "${enable_arm_neon+set}" = set; then : - enableval=$enable_arm_neon; case "$enableval" in - no|off) - # disable the default enabling on __ARM_NEON__ systems: - -$as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h - - # Prevent inclusion of the assembler files below: - enable_arm_neon=no;; - check) - -$as_echo "#define PNG_ARM_NEON_CHECK_SUPPORTED /**/" >>confdefs.h -;; - api) - -$as_echo "#define PNG_ARM_NEON_API_SUPPORTED /**/" >>confdefs.h -;; - yes|on) - -$as_echo "#define PNG_ARM_NEON_OPT 2" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-arm-neon: please specify 'check' or 'api', if - you want the optimizations unconditionally pass -mfpu=neon - to the compiler." >&5 -$as_echo "$as_me: WARNING: --enable-arm-neon: please specify 'check' or 'api', if - you want the optimizations unconditionally pass -mfpu=neon - to the compiler." >&2;};; - *) - as_fn_error $? "--enable-arm-neon=${enable_arm_neon}: invalid value" "$LINENO" 5 - esac -fi - - -# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or -# where ARM optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'arm*') - - if test "$enable_arm_neon" != 'no' && - case "$host_cpu" in - arm*|aarch64*) :;; - *) test "$enable_arm_neon" != '';; - esac; then - PNG_ARM_NEON_TRUE= - PNG_ARM_NEON_FALSE='#' -else - PNG_ARM_NEON_TRUE='#' - PNG_ARM_NEON_FALSE= -fi - - -# MIPS -# === -# -# MIPS MSA (SIMD) support. - -# Check whether --enable-mips-msa was given. -if test "${enable_mips_msa+set}" = set; then : - enableval=$enable_mips_msa; case "$enableval" in - no|off) - # disable the default enabling on __mips_msa systems: - -$as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h - - # Prevent inclusion of the assembler files below: - enable_mips_msa=no;; - check) - -$as_echo "#define PNG_MIPS_MSA_CHECK_SUPPORTED /**/" >>confdefs.h -;; - api) - -$as_echo "#define PNG_MIPS_MSA_API_SUPPORTED /**/" >>confdefs.h -;; - yes|on) - -$as_echo "#define PNG_MIPS_MSA_OPT 2" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-mips-msa: please specify 'check' or 'api', if - you want the optimizations unconditionally pass '-mmsa -mfp64' - to the compiler." >&5 -$as_echo "$as_me: WARNING: --enable-mips-msa: please specify 'check' or 'api', if - you want the optimizations unconditionally pass '-mmsa -mfp64' - to the compiler." >&2;};; - *) - as_fn_error $? "--enable-mips-msa=${enable_mips_msa}: invalid value" "$LINENO" 5 - esac -fi - - -# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or -# where MIPS optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'mips*') - - if test "$enable_mips_msa" != 'no' && - case "$host_cpu" in - mipsel*|mips64el*) :;; - esac; then - PNG_MIPS_MSA_TRUE= - PNG_MIPS_MSA_FALSE='#' -else - PNG_MIPS_MSA_TRUE='#' - PNG_MIPS_MSA_FALSE= -fi - - -# INTEL -# ===== -# -# INTEL SSE (SIMD) support. - -# Check whether --enable-intel-sse was given. -if test "${enable_intel_sse+set}" = set; then : - enableval=$enable_intel_sse; case "$enableval" in - no|off) - # disable the default enabling: - -$as_echo "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h - - # Prevent inclusion of the assembler files below: - enable_intel_sse=no;; - yes|on) - -$as_echo "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h -;; - *) - as_fn_error $? "--enable-intel-sse=${enable_intel_sse}: invalid value" "$LINENO" 5 - esac -fi - - -# Add Intel specific files to all builds where the host_cpu is Intel ('x86*') -# or where Intel optimizations were explicitly requested (this allows a -# fallback if a future host CPU does not match 'x86*') - if test "$enable_intel_sse" != 'no' && - case "$host_cpu" in - i?86|x86_64) :;; - *) test "$enable_intel_sse" != '';; - esac; then - PNG_INTEL_SSE_TRUE= - PNG_INTEL_SSE_FALSE='#' -else - PNG_INTEL_SSE_TRUE='#' - PNG_INTEL_SSE_FALSE= -fi - - -# PowerPC -# === -# -# PowerPC VSX (SIMD) support. - -# Check whether --enable-powerpc-vsx was given. -if test "${enable_powerpc_vsx+set}" = set; then : - enableval=$enable_powerpc_vsx; case "$enableval" in - no|off) - # disable the default enabling on __ppc64__ systems: - -$as_echo "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h - - # Prevent inclusion of the platform specific files below: - enable_powerpc_vsx=no;; - check) - -$as_echo "#define PNG_POWERPC_VSX_CHECK_SUPPORTED /**/" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file - for the list of supported OSes." >&5 -$as_echo "$as_me: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file - for the list of supported OSes." >&2;};; - api) - -$as_echo "#define PNG_POWERPC_VSX_API_SUPPORTED /**/" >>confdefs.h -;; - yes|on) - -$as_echo "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if - you want the optimizations unconditionally pass '-maltivec -mvsx' - or '-mcpu=power8'to the compiler." >&5 -$as_echo "$as_me: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if - you want the optimizations unconditionally pass '-maltivec -mvsx' - or '-mcpu=power8'to the compiler." >&2;};; - *) - as_fn_error $? "--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value" "$LINENO" 5 - esac -fi - - -# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or -# where POWERPC optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'powerpc*') - - if test "$enable_powerpc_vsx" != 'no' && - case "$host_cpu" in - powerpc*|ppc64*) :;; - esac; then - PNG_POWERPC_VSX_TRUE= - PNG_POWERPC_VSX_FALSE='#' -else - PNG_POWERPC_VSX_TRUE='#' - PNG_POWERPC_VSX_FALSE= -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: Extra options for compiler: $PNG_COPTS" >&5 -$as_echo "$as_me: Extra options for compiler: $PNG_COPTS" >&6;} - -# Config files, substituting as above -ac_config_files="$ac_config_files Makefile libpng.pc:libpng.pc.in" - -ac_config_files="$ac_config_files libpng-config:libpng-config.in" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_CLOCK_GETTIME_TRUE}" && test -z "${HAVE_CLOCK_GETTIME_FALSE}"; then - as_fn_error $? "conditional \"HAVE_CLOCK_GETTIME\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_SOLARIS_LD_TRUE}" && test -z "${HAVE_SOLARIS_LD_FALSE}"; then - as_fn_error $? "conditional \"HAVE_SOLARIS_LD\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT_FALSE}"; then - as_fn_error $? "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DO_PNG_PREFIX_TRUE}" && test -z "${DO_PNG_PREFIX_FALSE}"; then - as_fn_error $? "conditional \"DO_PNG_PREFIX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DO_INSTALL_LINKS_TRUE}" && test -z "${DO_INSTALL_LINKS_FALSE}"; then - as_fn_error $? "conditional \"DO_INSTALL_LINKS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DO_INSTALL_LIBPNG_PC_TRUE}" && test -z "${DO_INSTALL_LIBPNG_PC_FALSE}"; then - as_fn_error $? "conditional \"DO_INSTALL_LIBPNG_PC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DO_INSTALL_LIBPNG_CONFIG_TRUE}" && test -z "${DO_INSTALL_LIBPNG_CONFIG_FALSE}"; then - as_fn_error $? "conditional \"DO_INSTALL_LIBPNG_CONFIG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${PNG_ARM_NEON_TRUE}" && test -z "${PNG_ARM_NEON_FALSE}"; then - as_fn_error $? "conditional \"PNG_ARM_NEON\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${PNG_MIPS_MSA_TRUE}" && test -z "${PNG_MIPS_MSA_FALSE}"; then - as_fn_error $? "conditional \"PNG_MIPS_MSA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${PNG_INTEL_SSE_TRUE}" && test -z "${PNG_INTEL_SSE_FALSE}"; then - as_fn_error $? "conditional \"PNG_INTEL_SSE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${PNG_POWERPC_VSX_TRUE}" && test -z "${PNG_POWERPC_VSX_FALSE}"; then - as_fn_error $? "conditional \"PNG_POWERPC_VSX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by libpng $as_me 1.6.35, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -libpng config.status 1.6.35 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -SHELL \ -ECHO \ -LD \ -AS \ -DLLTOOL \ -OBJDUMP \ -PATH_SEPARATOR \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "libpng.pc") CONFIG_FILES="$CONFIG_FILES libpng.pc:libpng.pc.in" ;; - "libpng-config") CONFIG_FILES="$CONFIG_FILES libpng-config:libpng-config.in" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - case $CONFIG_FILES in #( - *\'*) : - eval set x "$CONFIG_FILES" ;; #( - *) : - set x $CONFIG_FILES ;; #( - *) : - ;; -esac - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`$as_dirname -- "$am_mf" || -$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$am_mf" : 'X\(//\)[^/]' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$am_mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - am_filepart=`$as_basename -- "$am_mf" || -$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { echo "$as_me:$LINENO: cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles" >&5 - (cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } || am_rc=$? - done - if test $am_rc -ne 0; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). -See \`config.log' for more details" "$LINENO" 5; } - fi - { am_dirpart=; unset am_dirpart;} - { am_filepart=; unset am_filepart;} - { am_mf=; unset am_mf;} - { am_rc=; unset am_rc;} - rm -f conftest-deps.mk -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# The names of the tagged configurations supported by this script. -available_tags='' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Assembler program. -AS=$lt_AS - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Object dumper program. -OBJDUMP=$lt_OBJDUMP - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - "libpng-config":F) chmod +x libpng-config ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/Dependencies/FreeImage/Source/LibPNG/example.c b/Dependencies/FreeImage/Source/LibPNG/example.c deleted file mode 100644 index b5d6831..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/example.c +++ /dev/null @@ -1,1067 +0,0 @@ - -#if 0 /* in case someone actually tries to compile this */ - -/* example.c - an example of using libpng - * Last changed in libpng 1.6.35 [July 15, 2018] - * Maintained 2018 Cosmin Truta - * Maintained 1998-2016 Glenn Randers-Pehrson - * Maintained 1996, 1997 Andreas Dilger) - * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * To the extent possible under law, the authors have waived - * all copyright and related or neighboring rights to this file. - * This work is published from: United States, Canada. - */ - -/* This is an example of how to use libpng to read and write PNG files. - * The file libpng-manual.txt is much more verbose then this. If you have not - * read it, do so first. This was designed to be a starting point of an - * implementation. This is not officially part of libpng, is hereby placed - * in the public domain, and therefore does not require a copyright notice. - * - * This file does not currently compile, because it is missing certain - * parts, like allocating memory to hold an image. You will have to - * supply these parts to get it to compile. For an example of a minimal - * working PNG reader/writer, see pngtest.c, included in this distribution; - * see also the programs in the contrib directory. - */ - -/* The simple, but restricted, approach to reading a PNG file or data stream - * just requires two function calls, as in the following complete program. - * Writing a file just needs one function call, so long as the data has an - * appropriate layout. - * - * The following code reads PNG image data from a file and writes it, in a - * potentially new format, to a new file. While this code will compile there is - * minimal (insufficient) error checking; for a more realistic version look at - * contrib/examples/pngtopng.c - */ -#include -#include -#include -#include -#include -#include - -int main(int argc, const char **argv) -{ - if (argc == 3) - { - png_image image; /* The control structure used by libpng */ - - /* Initialize the 'png_image' structure. */ - memset(&image, 0, (sizeof image)); - image.version = PNG_IMAGE_VERSION; - - /* The first argument is the file to read: */ - if (png_image_begin_read_from_file(&image, argv[1]) != 0) - { - png_bytep buffer; - - /* Set the format in which to read the PNG file; this code chooses a - * simple sRGB format with a non-associated alpha channel, adequate to - * store most images. - */ - image.format = PNG_FORMAT_RGBA; - - /* Now allocate enough memory to hold the image in this format; the - * PNG_IMAGE_SIZE macro uses the information about the image (width, - * height and format) stored in 'image'. - */ - buffer = malloc(PNG_IMAGE_SIZE(image)); - - /* If enough memory was available read the image in the desired format - * then write the result out to the new file. 'background' is not - * necessary when reading the image because the alpha channel is - * preserved; if it were to be removed, for example if we requested - * PNG_FORMAT_RGB, then either a solid background color would have to - * be supplied or the output buffer would have to be initialized to the - * actual background of the image. - * - * The fourth argument to png_image_finish_read is the 'row_stride' - - * this is the number of components allocated for the image in each - * row. It has to be at least as big as the value returned by - * PNG_IMAGE_ROW_STRIDE, but if you just allocate space for the - * default, minimum, size using PNG_IMAGE_SIZE as above you can pass - * zero. - * - * The final argument is a pointer to a buffer for the colormap; - * colormaps have exactly the same format as a row of image pixels (so - * you choose what format to make the colormap by setting - * image.format). A colormap is only returned if - * PNG_FORMAT_FLAG_COLORMAP is also set in image.format, so in this - * case NULL is passed as the final argument. If you do want to force - * all images into an index/color-mapped format then you can use: - * - * PNG_IMAGE_COLORMAP_SIZE(image) - * - * to find the maximum size of the colormap in bytes. - */ - if (buffer != NULL && - png_image_finish_read(&image, NULL/*background*/, buffer, - 0/*row_stride*/, NULL/*colormap*/) != 0) - { - /* Now write the image out to the second argument. In the write - * call 'convert_to_8bit' allows 16-bit data to be squashed down to - * 8 bits; this isn't necessary here because the original read was - * to the 8-bit format. - */ - if (png_image_write_to_file(&image, argv[2], 0/*convert_to_8bit*/, - buffer, 0/*row_stride*/, NULL/*colormap*/) != 0) - { - /* The image has been written successfully. */ - exit(0); - } - } - - else - { - /* Calling png_image_free is optional unless the simplified API was - * not run to completion. In this case if there wasn't enough - * memory for 'buffer' we didn't complete the read, so we must free - * the image: - */ - if (buffer == NULL) - png_image_free(&image); - - else - free(buffer); - } - - /* Something went wrong reading or writing the image. libpng stores a - * textual message in the 'png_image' structure: - */ - fprintf(stderr, "pngtopng: error: %s\n", image.message); - exit (1); - } - - fprintf(stderr, "pngtopng: usage: pngtopng input-file output-file\n"); - exit(1); -} - -/* That's it ;-) Of course you probably want to do more with PNG files than - * just converting them all to 32-bit RGBA PNG files; you can do that between - * the call to png_image_finish_read and png_image_write_to_file. You can also - * ask for the image data to be presented in a number of different formats. You - * do this by simply changing the 'format' parameter set before allocating the - * buffer. - * - * The format parameter consists of five flags that define various aspects of - * the image, you can simply add these together to get the format or you can use - * one of the predefined macros from png.h (as above): - * - * PNG_FORMAT_FLAG_COLOR: if set the image will have three color components per - * pixel (red, green and blue), if not set the image will just have one - * luminance (grayscale) component. - * - * PNG_FORMAT_FLAG_ALPHA: if set each pixel in the image will have an additional - * alpha value; a linear value that describes the degree the image pixel - * covers (overwrites) the contents of the existing pixel on the display. - * - * PNG_FORMAT_FLAG_LINEAR: if set the components of each pixel will be returned - * as a series of 16-bit linear values, if not set the components will be - * returned as a series of 8-bit values encoded according to the 'sRGB' - * standard. The 8-bit format is the normal format for images intended for - * direct display, because almost all display devices do the inverse of the - * sRGB transformation to the data they receive. The 16-bit format is more - * common for scientific data and image data that must be further processed; - * because it is linear simple math can be done on the component values. - * Regardless of the setting of this flag the alpha channel is always linear, - * although it will be 8 bits or 16 bits wide as specified by the flag. - * - * PNG_FORMAT_FLAG_BGR: if set the components of a color pixel will be returned - * in the order blue, then green, then red. If not set the pixel components - * are in the order red, then green, then blue. - * - * PNG_FORMAT_FLAG_AFIRST: if set the alpha channel (if present) precedes the - * color or grayscale components. If not set the alpha channel follows the - * components. - * - * You do not have to read directly from a file. You can read from memory or, - * on systems that support it, from a FILE*. This is controlled by - * the particular png_image_read_from_ function you call at the start. Likewise - * on write you can write to a FILE* if your system supports it. Check the - * macro PNG_STDIO_SUPPORTED to see if stdio support has been included in your - * libpng build. - * - * If you read 16-bit (PNG_FORMAT_FLAG_LINEAR) data you may need to write it in - * the 8-bit format for display. You do this by setting the convert_to_8bit - * flag to 'true'. - * - * Don't repeatedly convert between the 8-bit and 16-bit forms. There is - * significant data loss when 16-bit data is converted to the 8-bit encoding and - * the current libpng implementation of conversion to 16-bit is also - * significantly lossy. The latter will be fixed in the future, but the former - * is unavoidable - the 8-bit format just doesn't have enough resolution. - */ - -/* If your program needs more information from the PNG data it reads, or if you - * need to do more complex transformations, or minimize transformations, on the - * data you read, then you must use one of the several lower level libpng - * interfaces. - * - * All these interfaces require that you do your own error handling - your - * program must be able to arrange for control to return to your own code any - * time libpng encounters a problem. There are several ways to do this, but the - * standard way is to use the ANSI-C (C90) interface to establish a - * return point within your own code. You must do this if you do not use the - * simplified interface (above). - * - * The first step is to include the header files you need, including the libpng - * header file. Include any standard headers and feature test macros your - * program requires before including png.h: - */ -#include - - /* The png_jmpbuf() macro, used in error handling, became available in - * libpng version 1.0.6. If you want to be able to run your code with older - * versions of libpng, you must define the macro yourself (but only if it - * is not already defined by libpng!). - */ - -#ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) ((png_ptr)->png_jmpbuf) -#endif - -/* Check to see if a file is a PNG file using png_sig_cmp(). png_sig_cmp() - * returns zero if the image is a PNG and nonzero if it isn't a PNG. - * - * The function check_if_png() shown here, but not used, returns nonzero (true) - * if the file can be opened and is a PNG, 0 (false) otherwise. - * - * If this call is successful, and you are going to keep the file open, - * you should call png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); once - * you have created the png_ptr, so that libpng knows your application - * has read that many bytes from the start of the file. Make sure you - * don't call png_set_sig_bytes() with more than 8 bytes read or give it - * an incorrect number of bytes read, or you will either have read too - * many bytes (your fault), or you are telling libpng to read the wrong - * number of magic bytes (also your fault). - * - * Many applications already read the first 2 or 4 bytes from the start - * of the image to determine the file type, so it would be easiest just - * to pass the bytes to png_sig_cmp() or even skip that if you know - * you have a PNG file, and call png_set_sig_bytes(). - */ -#define PNG_BYTES_TO_CHECK 4 -int check_if_png(char *file_name, FILE **fp) -{ - char buf[PNG_BYTES_TO_CHECK]; - - /* Open the prospective PNG file. */ - if ((*fp = fopen(file_name, "rb")) == NULL) - return 0; - - /* Read in some of the signature bytes */ - if (fread(buf, 1, PNG_BYTES_TO_CHECK, *fp) != PNG_BYTES_TO_CHECK) - return 0; - - /* Compare the first PNG_BYTES_TO_CHECK bytes of the signature. - Return nonzero (true) if they match */ - - return(!png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK)); -} - -/* Read a PNG file. You may want to return an error code if the read - * fails (depending upon the failure). There are two "prototypes" given - * here - one where we are given the filename, and we need to open the - * file, and the other where we are given an open file (possibly with - * some or all of the magic bytes read - see comments above). - */ -#ifdef open_file /* prototype 1 */ -void read_png(char *file_name) /* We need to open the file */ -{ - png_structp png_ptr; - png_infop info_ptr; - int sig_read = 0; - png_uint_32 width, height; - int bit_depth, color_type, interlace_type; - FILE *fp; - - if ((fp = fopen(file_name, "rb")) == NULL) - return (ERROR); - -#else no_open_file /* prototype 2 */ -void read_png(FILE *fp, int sig_read) /* File is already open */ -{ - png_structp png_ptr; - png_infop info_ptr; - png_uint_32 width, height; - int bit_depth, color_type, interlace_type; -#endif no_open_file /* Only use one prototype! */ - - /* Create and initialize the png_struct with the desired error handler - * functions. If you want to use the default stderr and longjump method, - * you can supply NULL for the last three parameters. We also supply the - * the compiler header file version, so that we know if the application - * was compiled with a compatible version of the library. REQUIRED - */ - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - png_voidp user_error_ptr, user_error_fn, user_warning_fn); - - if (png_ptr == NULL) - { - fclose(fp); - return (ERROR); - } - - /* Allocate/initialize the memory for image information. REQUIRED. */ - info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) - { - fclose(fp); - png_destroy_read_struct(&png_ptr, NULL, NULL); - return (ERROR); - } - - /* Set error handling if you are using the setjmp/longjmp method (this is - * the normal method of doing things with libpng). REQUIRED unless you - * set up your own error handlers in the png_create_read_struct() earlier. - */ - - if (setjmp(png_jmpbuf(png_ptr))) - { - /* Free all of the memory associated with the png_ptr and info_ptr */ - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - fclose(fp); - /* If we get here, we had a problem reading the file */ - return (ERROR); - } - - /* One of the following I/O initialization methods is REQUIRED */ -#ifdef streams /* PNG file I/O method 1 */ - /* Set up the input control if you are using standard C streams */ - png_init_io(png_ptr, fp); - -#else no_streams /* PNG file I/O method 2 */ - /* If you are using replacement read functions, instead of calling - * png_init_io() here you would call: - */ - png_set_read_fn(png_ptr, (void *)user_io_ptr, user_read_fn); - /* where user_io_ptr is a structure you want available to the callbacks */ -#endif no_streams /* Use only one I/O method! */ - - /* If we have already read some of the signature */ - png_set_sig_bytes(png_ptr, sig_read); - -#ifdef hilevel - /* - * If you have enough memory to read in the entire image at once, - * and you need to specify only transforms that can be controlled - * with one of the PNG_TRANSFORM_* bits (this presently excludes - * quantizing, filling, setting background, and doing gamma - * adjustment), then you can read the entire image (including - * pixels) into the info structure with this call: - */ - png_read_png(png_ptr, info_ptr, png_transforms, NULL); - -#else - /* OK, you're doing it the hard way, with the lower-level functions */ - - /* The call to png_read_info() gives us all of the information from the - * PNG file before the first IDAT (image data chunk). REQUIRED - */ - png_read_info(png_ptr, info_ptr); - - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); - - /* Set up the data transformations you want. Note that these are all - * optional. Only call them if you want/need them. Many of the - * transformations only work on specific types of images, and many - * are mutually exclusive. - */ - - /* Tell libpng to strip 16 bits/color files down to 8 bits/color. - * Use accurate scaling if it's available, otherwise just chop off the - * low byte. - */ -#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED - png_set_scale_16(png_ptr); -#else - png_set_strip_16(png_ptr); -#endif - - /* Strip alpha bytes from the input data without combining with the - * background (not recommended). - */ - png_set_strip_alpha(png_ptr); - - /* Extract multiple pixels with bit depths of 1, 2, and 4 from a single - * byte into separate bytes (useful for paletted and grayscale images). - */ - png_set_packing(png_ptr); - - /* Change the order of packed pixels to least significant bit first - * (not useful if you are using png_set_packing). */ - png_set_packswap(png_ptr); - - /* Expand paletted colors into true RGB triplets */ - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_palette_to_rgb(png_ptr); - - /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */ - if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) - png_set_expand_gray_1_2_4_to_8(png_ptr); - - /* Expand paletted or RGB images with transparency to full alpha channels - * so the data will be available as RGBA quartets. - */ - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) != 0) - png_set_tRNS_to_alpha(png_ptr); - - /* Set the background color to draw transparent and alpha images over. - * It is possible to set the red, green, and blue components directly - * for paletted images instead of supplying a palette index. Note that - * even if the PNG file supplies a background, you are not required to - * use it - you should use the (solid) application background if it has one. - */ - - png_color_16 my_background, *image_background; - - if (png_get_bKGD(png_ptr, info_ptr, &image_background) != 0) - png_set_background(png_ptr, image_background, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - else - png_set_background(png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - - /* Some suggestions as to how to get a screen gamma value - * - * Note that screen gamma is the display_exponent, which includes - * the CRT_exponent and any correction for viewing conditions - */ - if (/* We have a user-defined screen gamma value */) - { - screen_gamma = user-defined screen_gamma; - } - /* This is one way that applications share the same screen gamma value */ - else if ((gamma_str = getenv("SCREEN_GAMMA")) != NULL) - { - screen_gamma = atof(gamma_str); - } - /* If we don't have another value */ - else - { - screen_gamma = PNG_DEFAULT_sRGB; /* A good guess for a PC monitor - in a dimly lit room */ - screen_gamma = PNG_GAMMA_MAC_18 or 1.0; /* Good guesses for Mac systems */ - } - - /* Tell libpng to handle the gamma conversion for you. The final call - * is a good guess for PC generated images, but it should be configurable - * by the user at run time by the user. It is strongly suggested that - * your application support gamma correction. - */ - - int intent; - - if (png_get_sRGB(png_ptr, info_ptr, &intent) != 0) - png_set_gamma(png_ptr, screen_gamma, PNG_DEFAULT_sRGB); - else - { - double image_gamma; - if (png_get_gAMA(png_ptr, info_ptr, &image_gamma) != 0) - png_set_gamma(png_ptr, screen_gamma, image_gamma); - else - png_set_gamma(png_ptr, screen_gamma, 0.45455); - } - -#ifdef PNG_READ_QUANTIZE_SUPPORTED - /* Quantize RGB files down to 8-bit palette or reduce palettes - * to the number of colors available on your screen. - */ - if ((color_type & PNG_COLOR_MASK_COLOR) != 0) - { - int num_palette; - png_colorp palette; - - /* This reduces the image to the application supplied palette */ - if (/* We have our own palette */) - { - /* An array of colors to which the image should be quantized */ - png_color std_color_cube[MAX_SCREEN_COLORS]; - - png_set_quantize(png_ptr, std_color_cube, MAX_SCREEN_COLORS, - MAX_SCREEN_COLORS, NULL, 0); - } - /* This reduces the image to the palette supplied in the file */ - else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) != 0) - { - png_uint_16p histogram = NULL; - - png_get_hIST(png_ptr, info_ptr, &histogram); - - png_set_quantize(png_ptr, palette, num_palette, - max_screen_colors, histogram, 0); - } - } -#endif /* READ_QUANTIZE */ - - /* Invert monochrome files to have 0 as white and 1 as black */ - png_set_invert_mono(png_ptr); - - /* 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 (png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT) != 0) - { - png_color_8p sig_bit_p; - - png_get_sBIT(png_ptr, info_ptr, &sig_bit_p); - png_set_shift(png_ptr, sig_bit_p); - } - - /* Flip the RGB pixels to BGR (or RGBA to BGRA) */ - if ((color_type & PNG_COLOR_MASK_COLOR) != 0) - png_set_bgr(png_ptr); - - /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ - png_set_swap_alpha(png_ptr); - - /* Swap bytes of 16-bit files to least significant byte first */ - png_set_swap(png_ptr); - - /* Add filler (or alpha) byte (before/after each RGB triplet) */ - png_set_filler(png_ptr, 0xffff, PNG_FILLER_AFTER); - -#ifdef PNG_READ_INTERLACING_SUPPORTED - /* Turn on interlace handling. REQUIRED if you are not using - * png_read_image(). To see how to handle interlacing passes, - * see the png_read_row() method below: - */ - number_passes = png_set_interlace_handling(png_ptr); -#else /* !READ_INTERLACING */ - number_passes = 1; -#endif /* READ_INTERLACING */ - - - /* 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 (ie you selected such a transform above). - */ - png_read_update_info(png_ptr, info_ptr); - - /* Allocate the memory to hold the image using the fields of info_ptr. */ - - /* The easiest way to read the image: */ - png_bytep row_pointers[height]; - - /* Clear the pointer array */ - for (row = 0; row < height; row++) - row_pointers[row] = NULL; - - for (row = 0; row < height; row++) - row_pointers[row] = png_malloc(png_ptr, png_get_rowbytes(png_ptr, - info_ptr)); - - /* Now it's time to read the image. One of these methods is REQUIRED */ -#ifdef entire /* Read the entire image in one go */ - png_read_image(png_ptr, row_pointers); - -#else no_entire /* Read the image one or more scanlines at a time */ - /* The other way to read images - deal with interlacing: */ - - for (pass = 0; pass < number_passes; pass++) - { -#ifdef single /* Read the image a single row at a time */ - for (y = 0; y < height; y++) - { - png_read_rows(png_ptr, &row_pointers[y], NULL, 1); - } - -#else no_single /* Read the image several rows at a time */ - for (y = 0; y < height; y += number_of_rows) - { -#ifdef sparkle /* Read the image using the "sparkle" effect. */ - png_read_rows(png_ptr, &row_pointers[y], NULL, - number_of_rows); -#else no_sparkle /* Read the image using the "rectangle" effect */ - png_read_rows(png_ptr, NULL, &row_pointers[y], - number_of_rows); -#endif no_sparkle /* Use only one of these two methods */ - } - - /* If you want to display the image after every pass, do so here */ -#endif no_single /* Use only one of these two methods */ - } -#endif no_entire /* Use only one of these two methods */ - - /* Read rest of file, and get additional chunks in info_ptr - REQUIRED */ - png_read_end(png_ptr, info_ptr); -#endif hilevel - - /* At this point you have read the entire image */ - - /* Clean up after the read, and free any memory allocated - REQUIRED */ - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - - /* Close the file */ - fclose(fp); - - /* That's it */ - return (OK); -} - -/* Progressively read a file */ - -int -initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr) -{ - /* Create and initialize the png_struct with the desired error handler - * functions. If you want to use the default stderr and longjump method, - * you can supply NULL for the last three parameters. We also check that - * the library version is compatible in case we are using dynamically - * linked libraries. - */ - *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - png_voidp user_error_ptr, user_error_fn, user_warning_fn); - - if (*png_ptr == NULL) - { - *info_ptr = NULL; - return (ERROR); - } - - *info_ptr = png_create_info_struct(png_ptr); - - if (*info_ptr == NULL) - { - png_destroy_read_struct(png_ptr, info_ptr, NULL); - return (ERROR); - } - - if (setjmp(png_jmpbuf((*png_ptr)))) - { - png_destroy_read_struct(png_ptr, info_ptr, NULL); - return (ERROR); - } - - /* This one's new. You will need to provide all three - * function callbacks, even if you aren't using them all. - * If you aren't using all functions, you can specify NULL - * parameters. Even when all three functions are NULL, - * you need to call png_set_progressive_read_fn(). - * These functions shouldn't be dependent on global or - * static variables if you are decoding several images - * simultaneously. You should store stream specific data - * in a separate struct, given as the second parameter, - * and retrieve the pointer from inside the callbacks using - * the function png_get_progressive_ptr(png_ptr). - */ - png_set_progressive_read_fn(*png_ptr, (void *)stream_data, - info_callback, row_callback, end_callback); - - return (OK); -} - -int -process_data(png_structp *png_ptr, png_infop *info_ptr, - png_bytep buffer, png_uint_32 length) -{ - if (setjmp(png_jmpbuf((*png_ptr)))) - { - /* Free the png_ptr and info_ptr memory on error */ - png_destroy_read_struct(png_ptr, info_ptr, NULL); - return (ERROR); - } - - /* This one's new also. Simply give it chunks of data as - * they arrive from the data stream (in order, of course). - * On segmented machines, don't give it any more than 64K. - * The library seems to run fine with sizes of 4K, although - * you can give it much less if necessary (I assume you can - * give it chunks of 1 byte, but I haven't tried with less - * than 256 bytes yet). When this function returns, you may - * want to display any rows that were generated in the row - * callback, if you aren't already displaying them there. - */ - png_process_data(*png_ptr, *info_ptr, buffer, length); - return (OK); -} - -info_callback(png_structp png_ptr, png_infop info) -{ - /* Do any setup here, including setting any of the transformations - * mentioned in the Reading PNG files section. For now, you _must_ - * call either png_start_read_image() or png_read_update_info() - * after all the transformations are set (even if you don't set - * any). You may start getting rows before png_process_data() - * returns, so this is your last chance to prepare for that. - */ -} - -row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass) -{ - /* - * This function is called for every row in the image. If the - * image is interlaced, and you turned on the interlace handler, - * this function will be called for every row in every pass. - * - * In this function you will receive a pointer to new row data from - * libpng called new_row that is to replace a corresponding row (of - * the same data format) in a buffer allocated by your application. - * - * The new row data pointer "new_row" may be NULL, indicating there is - * no new data to be replaced (in cases of interlace loading). - * - * If new_row is not NULL then you need to call - * png_progressive_combine_row() to replace the corresponding row as - * shown below: - */ - - /* Get pointer to corresponding row in our - * PNG read buffer. - */ - png_bytep old_row = ((png_bytep *)our_data)[row_num]; - -#ifdef PNG_READ_INTERLACING_SUPPORTED - /* If both rows are allocated then copy the new row - * data to the corresponding row data. - */ - if ((old_row != NULL) && (new_row != NULL)) - png_progressive_combine_row(png_ptr, old_row, new_row); - - /* - * The rows and passes are called in order, so you don't really - * need the row_num and pass, but I'm supplying them because it - * may make your life easier. - * - * For the non-NULL rows of interlaced images, you must call - * png_progressive_combine_row() passing in the new row and the - * old row, as demonstrated above. You can call this function for - * NULL rows (it will just return) and for non-interlaced images - * (it just does the memcpy for you) if it will make the code - * easier. Thus, you can just do this for all cases: - */ - - png_progressive_combine_row(png_ptr, old_row, new_row); - - /* where old_row is what was displayed for previous rows. Note - * that the first pass (pass == 0 really) will completely cover - * the old row, so the rows do not have to be initialized. After - * the first pass (and only for interlaced images), you will have - * to pass the current row as new_row, and the function will combine - * the old row and the new row. - */ -#endif /* READ_INTERLACING */ -} - -end_callback(png_structp png_ptr, png_infop info) -{ - /* This function is called when the whole image has been read, - * including any chunks after the image (up to and including - * the IEND). You will usually have the same info chunk as you - * had in the header, although some data may have been added - * to the comments and time fields. - * - * Most people won't do much here, perhaps setting a flag that - * marks the image as finished. - */ -} - -/* Write a png file */ -void write_png(char *file_name /* , ... other image information ... */) -{ - FILE *fp; - png_structp png_ptr; - png_infop info_ptr; - png_colorp palette; - - /* Open the file */ - fp = fopen(file_name, "wb"); - if (fp == NULL) - return (ERROR); - - /* Create and initialize the png_struct with the desired error handler - * functions. If you want to use the default stderr and longjump method, - * you can supply NULL for the last three parameters. We also check that - * the library version is compatible with the one used at compile time, - * in case we are using dynamically linked libraries. REQUIRED. - */ - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, - png_voidp user_error_ptr, user_error_fn, user_warning_fn); - - if (png_ptr == NULL) - { - fclose(fp); - return (ERROR); - } - - /* Allocate/initialize the image information data. REQUIRED */ - info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) - { - fclose(fp); - png_destroy_write_struct(&png_ptr, NULL); - return (ERROR); - } - - /* Set error handling. REQUIRED if you aren't supplying your own - * error handling functions in the png_create_write_struct() call. - */ - if (setjmp(png_jmpbuf(png_ptr))) - { - /* If we get here, we had a problem writing the file */ - fclose(fp); - png_destroy_write_struct(&png_ptr, &info_ptr); - return (ERROR); - } - - /* One of the following I/O initialization functions is REQUIRED */ - -#ifdef streams /* I/O initialization method 1 */ - /* Set up the output control if you are using standard C streams */ - png_init_io(png_ptr, fp); - -#else no_streams /* I/O initialization method 2 */ - /* If you are using replacement write functions, instead of calling - * png_init_io() here you would call - */ - png_set_write_fn(png_ptr, (void *)user_io_ptr, user_write_fn, - user_IO_flush_function); - /* where user_io_ptr is a structure you want available to the callbacks */ -#endif no_streams /* Only use one initialization method */ - -#ifdef hilevel - /* This is the easy way. Use it if you already have all the - * image info living in the structure. You could "|" many - * PNG_TRANSFORM flags into the png_transforms integer here. - */ - png_write_png(png_ptr, info_ptr, png_transforms, NULL); - -#else - /* This is the hard way */ - - /* Set the image information here. Width and height are up to 2^31, - * bit_depth is one of 1, 2, 4, 8, or 16, but valid values also depend on - * the color_type selected. color_type is one of PNG_COLOR_TYPE_GRAY, - * PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB, - * or PNG_COLOR_TYPE_RGB_ALPHA. interlace is either PNG_INTERLACE_NONE or - * PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST - * currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED - */ - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, PNG_COLOR_TYPE_???, - PNG_INTERLACE_????, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - - /* Set the palette if there is one. REQUIRED for indexed-color images */ - palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH - * (sizeof (png_color))); - /* ... Set palette colors ... */ - png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH); - /* You must not free palette here, because png_set_PLTE only makes a link to - * the palette that you malloced. Wait until you are about to destroy - * the png structure. - */ - - /* Optional significant bit (sBIT) chunk */ - png_color_8 sig_bit; - - /* If we are dealing with a grayscale image then */ - sig_bit.gray = true_bit_depth; - - /* Otherwise, if we are dealing with a color image then */ - sig_bit.red = true_red_bit_depth; - sig_bit.green = true_green_bit_depth; - sig_bit.blue = true_blue_bit_depth; - - /* If the image has an alpha channel then */ - sig_bit.alpha = true_alpha_bit_depth; - - png_set_sBIT(png_ptr, info_ptr, &sig_bit); - - - /* Optional gamma chunk is strongly suggested if you have any guess - * as to the correct gamma of the image. - */ - png_set_gAMA(png_ptr, info_ptr, gamma); - - /* Optionally write comments into the image */ - { - png_text text_ptr[3]; - - char key0[]="Title"; - char text0[]="Mona Lisa"; - text_ptr[0].key = key0; - text_ptr[0].text = text0; - text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr[0].itxt_length = 0; - text_ptr[0].lang = NULL; - text_ptr[0].lang_key = NULL; - - char key1[]="Author"; - char text1[]="Leonardo DaVinci"; - text_ptr[1].key = key1; - text_ptr[1].text = text1; - text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr[1].itxt_length = 0; - text_ptr[1].lang = NULL; - text_ptr[1].lang_key = NULL; - - char key2[]="Description"; - char text2[]=""; - text_ptr[2].key = key2; - text_ptr[2].text = text2; - text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt; - text_ptr[2].itxt_length = 0; - text_ptr[2].lang = NULL; - text_ptr[2].lang_key = NULL; - - png_set_text(write_ptr, write_info_ptr, text_ptr, 3); - } - - /* Other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs */ - - /* Note that if sRGB is present the gAMA and cHRM chunks must be ignored - * on read and, if your application chooses to write them, they must - * be written in accordance with the sRGB profile - */ - - /* Write the file header information. REQUIRED */ - png_write_info(png_ptr, info_ptr); - - /* If you want, you can write the info in two steps, in case you need to - * write your private chunk ahead of PLTE: - * - * png_write_info_before_PLTE(write_ptr, write_info_ptr); - * write_my_chunk(); - * png_write_info(png_ptr, info_ptr); - * - * However, given the level of known- and unknown-chunk support in 1.2.0 - * and up, this should no longer be necessary. - */ - - /* Once we write out the header, the compression type on the text - * chunk gets changed to PNG_TEXT_COMPRESSION_NONE_WR or - * PNG_TEXT_COMPRESSION_zTXt_WR, so it doesn't get written out again - * at the end. - */ - - /* Set up the transformations you want. Note that these are - * all optional. Only call them if you want them. - */ - - /* Invert monochrome pixels */ - png_set_invert_mono(png_ptr); - - /* Shift the pixels up to a legal bit depth and fill in - * as appropriate to correctly scale the image. - */ - png_set_shift(png_ptr, &sig_bit); - - /* Pack pixels into bytes */ - png_set_packing(png_ptr); - - /* Swap location of alpha bytes from ARGB to RGBA */ - png_set_swap_alpha(png_ptr); - - /* Get rid of filler (OR ALPHA) bytes, pack XRGB/RGBX/ARGB/RGBA into - * RGB (4 channels -> 3 channels). The second parameter is not used. - */ - png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); - - /* Flip BGR pixels to RGB */ - png_set_bgr(png_ptr); - - /* Swap bytes of 16-bit files to most significant byte first */ - png_set_swap(png_ptr); - - /* Swap bits of 1-bit, 2-bit, 4-bit packed pixel formats */ - png_set_packswap(png_ptr); - - /* Turn on interlace handling if you are not using png_write_image() */ - if (interlacing != 0) - number_passes = png_set_interlace_handling(png_ptr); - - else - number_passes = 1; - - /* The easiest way to write the image (you may have a different memory - * layout, however, so choose what fits your needs best). You need to - * use the first method if you aren't handling interlacing yourself. - */ - png_uint_32 k, height, width; - - /* In this example, "image" is a one-dimensional array of bytes */ - - /* Guard against integer overflow */ - if (height > PNG_SIZE_MAX/(width*bytes_per_pixel)) { - png_error(png_ptr, "Image_data buffer would be too large"); - } - png_byte image[height*width*bytes_per_pixel]; - - png_bytep row_pointers[height]; - - if (height > PNG_UINT_32_MAX/(sizeof (png_bytep))) - png_error (png_ptr, "Image is too tall to process in memory"); - - /* Set up pointers into your "image" byte array */ - for (k = 0; k < height; k++) - row_pointers[k] = image + k*width*bytes_per_pixel; - - /* One of the following output methods is REQUIRED */ - -#ifdef entire /* Write out the entire image data in one call */ - png_write_image(png_ptr, row_pointers); - - /* The other way to write the image - deal with interlacing */ - -#else no_entire /* Write out the image data by one or more scanlines */ - - /* The number of passes is either 1 for non-interlaced images, - * or 7 for interlaced images. - */ - for (pass = 0; pass < number_passes; pass++) - { - /* Write a few rows at a time. */ - png_write_rows(png_ptr, &row_pointers[first_row], number_of_rows); - - /* If you are only writing one row at a time, this works */ - for (y = 0; y < height; y++) - png_write_rows(png_ptr, &row_pointers[y], 1); - } -#endif no_entire /* Use only one output method */ - - /* You can write optional chunks like tEXt, zTXt, and tIME at the end - * as well. Shouldn't be necessary in 1.2.0 and up as all the public - * chunks are supported and you can use png_set_unknown_chunks() to - * register unknown chunks into the info structure to be written out. - */ - - /* It is REQUIRED to call this to finish writing the rest of the file */ - png_write_end(png_ptr, info_ptr); -#endif hilevel - - /* If you png_malloced a palette, free it here (don't free info_ptr->palette, - * as recommended in versions 1.0.5m and earlier of this example; if - * libpng mallocs info_ptr->palette, libpng will free it). If you - * allocated it with malloc() instead of png_malloc(), use free() instead - * of png_free(). - */ - png_free(png_ptr, palette); - palette = NULL; - - /* Similarly, if you png_malloced any data that you passed in with - * png_set_something(), such as a hist or trans array, free it here, - * when you can be sure that libpng is through with it. - */ - png_free(png_ptr, trans); - trans = NULL; - /* Whenever you use png_free() it is a good idea to set the pointer to - * NULL in case your application inadvertently tries to png_free() it - * again. When png_free() sees a NULL it returns without action, thus - * avoiding the double-free security problem. - */ - - /* Clean up after the write, and free any memory allocated */ - png_destroy_write_struct(&png_ptr, &info_ptr); - - /* Close the file */ - fclose(fp); - - /* That's it */ - return (OK); -} - -#endif /* if 0 */ diff --git a/Dependencies/FreeImage/Source/LibPNG/libpng-manual.txt b/Dependencies/FreeImage/Source/LibPNG/libpng-manual.txt deleted file mode 100644 index 79ecc3d..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/libpng-manual.txt +++ /dev/null @@ -1,5462 +0,0 @@ -libpng-manual.txt - A description on how to use and modify libpng - - libpng version 1.6.35 - July 15, 2018 - Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2018 Glenn Randers-Pehrson - - This document is released under the libpng license. - For conditions of distribution and use, see the disclaimer - and license in png.h - - Based on: - - libpng versions 0.97, January 1998, through 1.6.35 - July 15, 2018 - Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2017 Glenn Randers-Pehrson - - libpng 1.0 beta 6 - version 0.96 - May 28, 1997 - Updated and distributed by Andreas Dilger - Copyright (c) 1996, 1997 Andreas Dilger - - libpng 1.0 beta 2 - version 0.88 - January 26, 1996 - For conditions of distribution and use, see copyright - notice in png.h. Copyright (c) 1995, 1996 Guy Eric - Schalnat, Group 42, Inc. - - Updated/rewritten per request in the libpng FAQ - Copyright (c) 1995, 1996 Frank J. T. Wojcik - December 18, 1995 & January 20, 1996 - - TABLE OF CONTENTS - - I. Introduction - II. Structures - III. Reading - IV. Writing - V. Simplified API - VI. Modifying/Customizing libpng - VII. MNG support - VIII. Changes to Libpng from version 0.88 - IX. Changes to Libpng from version 1.0.x to 1.2.x - X. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x - XI. Changes to Libpng from version 1.4.x to 1.5.x - XII. Changes to Libpng from version 1.5.x to 1.6.x - XIII. Detecting libpng - XIV. Source code repository - XV. Coding style - XVI. Y2K Compliance in libpng - -I. Introduction - -This file describes how to use and modify the PNG reference library -(known as libpng) for your own use. In addition to this -file, example.c is a good starting point for using the library, as -it is heavily commented and should include everything most people -will need. We assume that libpng is already installed; see the -INSTALL file for instructions on how to configure and install libpng. - -For examples of libpng usage, see the files "example.c", "pngtest.c", -and the files in the "contrib" directory, all of which are included in -the libpng distribution. - -Libpng was written as a companion to the PNG specification, as a way -of reducing the amount of time and effort it takes to support the PNG -file format in application programs. - -The PNG specification (second edition), November 2003, is available as -a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at -. -It is technically equivalent -to the PNG specification (second edition) but has some additional material. - -The PNG-1.0 specification is available as RFC 2083 - and as a -W3C Recommendation . - -Some additional chunks are described in the special-purpose public chunks -documents at - -Other information -about PNG, and the latest version of libpng, can be found at the PNG home -page, . - -Most users will not have to modify the library significantly; advanced -users may want to modify it more. All attempts were made to make it as -complete as possible, while keeping the code easy to understand. -Currently, this library only supports C. Support for other languages -is being considered. - -Libpng has been designed to handle multiple sessions at one time, -to be easily modifiable, to be portable to the vast majority of -machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy -to use. The ultimate goal of libpng is to promote the acceptance of -the PNG file format in whatever way possible. While there is still -work to be done (see the TODO file), libpng should cover the -majority of the needs of its users. - -Libpng uses zlib for its compression and decompression of PNG files. -Further information about zlib, and the latest version of zlib, can -be found at the zlib home page, . -The zlib compression utility is a general purpose utility that is -useful for more than PNG files, and can be used without libpng. -See the documentation delivered with zlib for more details. -You can usually find the source files for the zlib utility wherever you -find the libpng source files. - -Libpng is thread safe, provided the threads are using different -instances of the structures. Each thread should have its own -png_struct and png_info instances, and thus its own image. -Libpng does not protect itself against two threads using the -same instance of a structure. - -II. Structures - -There are two main structures that are important to libpng, png_struct -and png_info. Both are internal structures that are no longer exposed -in the libpng interface (as of libpng 1.5.0). - -The png_info structure is designed to provide information about the -PNG file. At one time, the fields of png_info were intended to be -directly accessible to the user. However, this tended to cause problems -with applications using dynamically loaded libraries, and as a result -a set of interface functions for png_info (the png_get_*() and png_set_*() -functions) was developed, and direct access to the png_info fields was -deprecated.. - -The png_struct structure is the object used by the library to decode a -single image. As of 1.5.0 this structure is also not exposed. - -Almost all libpng APIs require a pointer to a png_struct as the first argument. -Many (in particular the png_set and png_get APIs) also require a pointer -to png_info as the second argument. Some application visible macros -defined in png.h designed for basic data access (reading and writing -integers in the PNG format) don't take a png_info pointer, but it's almost -always safe to assume that a (png_struct*) has to be passed to call an API -function. - -You can have more than one png_info structure associated with an image, -as illustrated in pngtest.c, one for information valid prior to the -IDAT chunks and another (called "end_info" below) for things after them. - -The png.h header file is an invaluable reference for programming with libpng. -And while I'm on the topic, make sure you include the libpng header file: - -#include - -and also (as of libpng-1.5.0) the zlib header file, if you need it: - -#include - -Types - -The png.h header file defines a number of integral types used by the -APIs. Most of these are fairly obvious; for example types corresponding -to integers of particular sizes and types for passing color values. - -One exception is how non-integral numbers are handled. For application -convenience most APIs that take such numbers have C (double) arguments; -however, internally PNG, and libpng, use 32 bit signed integers and encode -the value by multiplying by 100,000. As of libpng 1.5.0 a convenience -macro PNG_FP_1 is defined in png.h along with a type (png_fixed_point) -which is simply (png_int_32). - -All APIs that take (double) arguments also have a matching API that -takes the corresponding fixed point integer arguments. The fixed point -API has the same name as the floating point one with "_fixed" appended. -The actual range of values permitted in the APIs is frequently less than -the full range of (png_fixed_point) (-21474 to +21474). When APIs require -a non-negative argument the type is recorded as png_uint_32 above. Consult -the header file and the text below for more information. - -Special care must be take with sCAL chunk handling because the chunk itself -uses non-integral values encoded as strings containing decimal floating point -numbers. See the comments in the header file. - -Configuration - -The main header file function declarations are frequently protected by C -preprocessing directives of the form: - - #ifdef PNG_feature_SUPPORTED - declare-function - #endif - ... - #ifdef PNG_feature_SUPPORTED - use-function - #endif - -The library can be built without support for these APIs, although a -standard build will have all implemented APIs. Application programs -should check the feature macros before using an API for maximum -portability. From libpng 1.5.0 the feature macros set during the build -of libpng are recorded in the header file "pnglibconf.h" and this file -is always included by png.h. - -If you don't need to change the library configuration from the default, skip to -the next section ("Reading"). - -Notice that some of the makefiles in the 'scripts' directory and (in 1.5.0) all -of the build project files in the 'projects' directory simply copy -scripts/pnglibconf.h.prebuilt to pnglibconf.h. This means that these build -systems do not permit easy auto-configuration of the library - they only -support the default configuration. - -The easiest way to make minor changes to the libpng configuration when -auto-configuration is supported is to add definitions to the command line -using (typically) CPPFLAGS. For example: - -CPPFLAGS=-DPNG_NO_FLOATING_ARITHMETIC - -will change the internal libpng math implementation for gamma correction and -other arithmetic calculations to fixed point, avoiding the need for fast -floating point support. The result can be seen in the generated pnglibconf.h - -make sure it contains the changed feature macro setting. - -If you need to make more extensive configuration changes - more than one or two -feature macro settings - you can either add -DPNG_USER_CONFIG to the build -command line and put a list of feature macro settings in pngusr.h or you can set -DFA_XTRA (a makefile variable) to a file containing the same information in the -form of 'option' settings. - -A. Changing pnglibconf.h - -A variety of methods exist to build libpng. Not all of these support -reconfiguration of pnglibconf.h. To reconfigure pnglibconf.h it must either be -rebuilt from scripts/pnglibconf.dfa using awk or it must be edited by hand. - -Hand editing is achieved by copying scripts/pnglibconf.h.prebuilt to -pnglibconf.h and changing the lines defining the supported features, paying -very close attention to the 'option' information in scripts/pnglibconf.dfa -that describes those features and their requirements. This is easy to get -wrong. - -B. Configuration using DFA_XTRA - -Rebuilding from pnglibconf.dfa is easy if a functioning 'awk', or a later -variant such as 'nawk' or 'gawk', is available. The configure build will -automatically find an appropriate awk and build pnglibconf.h. -The scripts/pnglibconf.mak file contains a set of make rules for doing the -same thing if configure is not used, and many of the makefiles in the scripts -directory use this approach. - -When rebuilding simply write a new file containing changed options and set -DFA_XTRA to the name of this file. This causes the build to append the new file -to the end of scripts/pnglibconf.dfa. The pngusr.dfa file should contain lines -of the following forms: - -everything = off - -This turns all optional features off. Include it at the start of pngusr.dfa to -make it easier to build a minimal configuration. You will need to turn at least -some features on afterward to enable either reading or writing code, or both. - -option feature on -option feature off - -Enable or disable a single feature. This will automatically enable other -features required by a feature that is turned on or disable other features that -require a feature which is turned off. Conflicting settings will cause an error -message to be emitted by awk. - -setting feature default value - -Changes the default value of setting 'feature' to 'value'. There are a small -number of settings listed at the top of pnglibconf.h, they are documented in the -source code. Most of these values have performance implications for the library -but most of them have no visible effect on the API. Some can also be overridden -from the API. - -This method of building a customized pnglibconf.h is illustrated in -contrib/pngminim/*. See the "$(PNGCONF):" target in the makefile and -pngusr.dfa in these directories. - -C. Configuration using PNG_USER_CONFIG - -If -DPNG_USER_CONFIG is added to the CPPFLAGS when pnglibconf.h is built, -the file pngusr.h will automatically be included before the options in -scripts/pnglibconf.dfa are processed. Your pngusr.h file should contain only -macro definitions turning features on or off or setting settings. - -Apart from the global setting "everything = off" all the options listed above -can be set using macros in pngusr.h: - -#define PNG_feature_SUPPORTED - -is equivalent to: - -option feature on - -#define PNG_NO_feature - -is equivalent to: - -option feature off - -#define PNG_feature value - -is equivalent to: - -setting feature default value - -Notice that in both cases, pngusr.dfa and pngusr.h, the contents of the -pngusr file you supply override the contents of scripts/pnglibconf.dfa - -If confusing or incomprehensible behavior results it is possible to -examine the intermediate file pnglibconf.dfn to find the full set of -dependency information for each setting and option. Simply locate the -feature in the file and read the C comments that precede it. - -This method is also illustrated in the contrib/pngminim/* makefiles and -pngusr.h. - -III. Reading - -We'll now walk you through the possible functions to call when reading -in a PNG file sequentially, briefly explaining the syntax and purpose -of each one. See example.c and png.h for more detail. While -progressive reading is covered in the next section, you will still -need some of the functions discussed in this section to read a PNG -file. - -Setup - -You will want to do the I/O initialization(*) before you get into libpng, -so if it doesn't work, you don't have much to undo. Of course, you -will also want to insure that you are, in fact, dealing with a PNG -file. Libpng provides a simple check to see if a file is a PNG file. -To use it, pass in the first 1 to 8 bytes of the file to the function -png_sig_cmp(), and it will return 0 (false) if the bytes match the -corresponding bytes of the PNG signature, or nonzero (true) otherwise. -Of course, the more bytes you pass in, the greater the accuracy of the -prediction. - -If you are intending to keep the file pointer open for use in libpng, -you must ensure you don't read more than 8 bytes from the beginning -of the file, and you also have to make a call to png_set_sig_bytes() -with the number of bytes you read from the beginning. Libpng will -then only check the bytes (if any) that your program didn't read. - -(*): If you are not using the standard I/O functions, you will need -to replace them with custom functions. See the discussion under -Customizing libpng. - - FILE *fp = fopen(file_name, "rb"); - if (!fp) - { - return ERROR; - } - - if (fread(header, 1, number, fp) != number) - { - return ERROR; - } - - is_png = !png_sig_cmp(header, 0, number); - if (!is_png) - { - return NOT_PNG; - } - -Next, png_struct and png_info need to be allocated and initialized. In -order to ensure that the size of these structures is correct even with a -dynamically linked libpng, there are functions to initialize and -allocate the structures. We also pass the library version, optional -pointers to error handling functions, and a pointer to a data struct for -use by the error functions, if necessary (the pointer and functions can -be NULL if the default error handlers are to be used). See the section -on Changes to Libpng below regarding the old initialization functions. -The structure allocation functions quietly return NULL if they fail to -create the structure, so your application should check for that. - - png_structp png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - - if (!png_ptr) - return ERROR; - - png_infop info_ptr = png_create_info_struct(png_ptr); - - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, - (png_infopp)NULL, (png_infopp)NULL); - return ERROR; - } - -If you want to use your own memory allocation routines, -use a libpng that was built with PNG_USER_MEM_SUPPORTED defined, and use -png_create_read_struct_2() instead of png_create_read_struct(): - - png_structp png_ptr = png_create_read_struct_2 - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn, (png_voidp) - user_mem_ptr, user_malloc_fn, user_free_fn); - -The error handling routines passed to png_create_read_struct() -and the memory alloc/free routines passed to png_create_struct_2() -are only necessary if you are not using the libpng supplied error -handling and memory alloc/free functions. - -When libpng encounters an error, it expects to longjmp back -to your routine. Therefore, you will need to call setjmp and pass -your png_jmpbuf(png_ptr). If you read the file from different -routines, you will need to update the longjmp buffer every time you enter -a new routine that will call a png_*() function. - -See your documentation of setjmp/longjmp for your compiler for more -information on setjmp/longjmp. See the discussion on libpng error -handling in the Customizing Libpng section below for more information -on the libpng error handling. If an error occurs, and libpng longjmp's -back to your setjmp, you will want to call png_destroy_read_struct() to -free any memory. - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - &end_info); - fclose(fp); - return ERROR; - } - -Pass (png_infopp)NULL instead of &end_info if you didn't create -an end_info structure. - -If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_NO_SETJMP, in which case -errors will result in a call to PNG_ABORT() which defaults to abort(). - -You can #define PNG_ABORT() to a function that does something -more useful than abort(), as long as your function does not -return. - -Now you need to set up the input code. The default for libpng is to -use the C function fread(). If you use this, you will need to pass a -valid FILE * in the function png_init_io(). Be sure that the file is -opened in binary mode. If you wish to handle reading data in another -way, you need not call the png_init_io() function, but you must then -implement the libpng I/O methods discussed in the Customizing Libpng -section below. - - png_init_io(png_ptr, fp); - -If you had previously opened the file and read any of the signature from -the beginning in order to see if this was a PNG file, you need to let -libpng know that there are some bytes missing from the start of the file. - - png_set_sig_bytes(png_ptr, number); - -You can change the zlib compression buffer size to be used while -reading compressed data with - - png_set_compression_buffer_size(png_ptr, buffer_size); - -where the default size is 8192 bytes. Note that the buffer size -is changed immediately and the buffer is reallocated immediately, -instead of setting a flag to be acted upon later. - -If you want CRC errors to be handled in a different manner than -the default, use - - png_set_crc_action(png_ptr, crit_action, ancil_action); - -The values for png_set_crc_action() say how libpng is to handle CRC errors in -ancillary and critical chunks, and whether to use the data contained -therein. Starting with libpng-1.6.26, this also governs how an ADLER32 error -is handled while reading the IDAT chunk. Note that it is impossible to -"discard" data in a critical chunk. - -Choices for (int) crit_action are - PNG_CRC_DEFAULT 0 error/quit - PNG_CRC_ERROR_QUIT 1 error/quit - PNG_CRC_WARN_USE 3 warn/use data - PNG_CRC_QUIET_USE 4 quiet/use data - PNG_CRC_NO_CHANGE 5 use the current value - -Choices for (int) ancil_action are - PNG_CRC_DEFAULT 0 error/quit - PNG_CRC_ERROR_QUIT 1 error/quit - PNG_CRC_WARN_DISCARD 2 warn/discard data - PNG_CRC_WARN_USE 3 warn/use data - PNG_CRC_QUIET_USE 4 quiet/use data - PNG_CRC_NO_CHANGE 5 use the current value - -When the setting for crit_action is PNG_CRC_QUIET_USE, the CRC and ADLER32 -checksums are not only ignored, but they are not evaluated. - -Setting up callback code - -You can set up a callback function to handle any unknown chunks in the -input stream. You must supply the function - - read_chunk_callback(png_structp png_ptr, - png_unknown_chunkp chunk); - { - /* The unknown chunk structure contains your - chunk data, along with similar data for any other - unknown chunks: */ - - png_byte name[5]; - png_byte *data; - size_t size; - - /* Note that libpng has already taken care of - the CRC handling */ - - /* put your code here. Search for your chunk in the - unknown chunk structure, process it, and return one - of the following: */ - - return -n; /* chunk had an error */ - return 0; /* did not recognize */ - return n; /* success */ - } - -(You can give your function another name that you like instead of -"read_chunk_callback") - -To inform libpng about your function, use - - png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr, - read_chunk_callback); - -This names not only the callback function, but also a user pointer that -you can retrieve with - - png_get_user_chunk_ptr(png_ptr); - -If you call the png_set_read_user_chunk_fn() function, then all unknown -chunks which the callback does not handle will be saved when read. You can -cause them to be discarded by returning '1' ("handled") instead of '0'. This -behavior will change in libpng 1.7 and the default handling set by the -png_set_keep_unknown_chunks() function, described below, will be used when the -callback returns 0. If you want the existing behavior you should set the global -default to PNG_HANDLE_CHUNK_IF_SAFE now; this is compatible with all current -versions of libpng and with 1.7. Libpng 1.6 issues a warning if you keep the -default, or PNG_HANDLE_CHUNK_NEVER, and the callback returns 0. - -At this point, you can set up a callback function that will be -called after each row has been read, which you can use to control -a progress meter or the like. It's demonstrated in pngtest.c. -You must supply a function - - void read_row_callback(png_structp png_ptr, - png_uint_32 row, int pass); - { - /* put your code here */ - } - -(You can give it another name that you like instead of "read_row_callback") - -To inform libpng about your function, use - - png_set_read_status_fn(png_ptr, read_row_callback); - -When this function is called the row has already been completely processed and -the 'row' and 'pass' refer to the next row to be handled. For the -non-interlaced case the row that was just handled is simply one less than the -passed in row number, and pass will always be 0. For the interlaced case the -same applies unless the row value is 0, in which case the row just handled was -the last one from one of the preceding passes. Because interlacing may skip a -pass you cannot be sure that the preceding pass is just 'pass-1'; if you really -need to know what the last pass is record (row,pass) from the callback and use -the last recorded value each time. - -As with the user transform you can find the output row using the -PNG_ROW_FROM_PASS_ROW macro. - -Unknown-chunk handling - -Now you get to set the way the library processes unknown chunks in the -input PNG stream. Both known and unknown chunks will be read. Normal -behavior is that known chunks will be parsed into information in -various info_ptr members while unknown chunks will be discarded. This -behavior can be wasteful if your application will never use some known -chunk types. To change this, you can call: - - png_set_keep_unknown_chunks(png_ptr, keep, - chunk_list, num_chunks); - - keep - 0: default unknown chunk handling - 1: ignore; do not keep - 2: keep only if safe-to-copy - 3: keep even if unsafe-to-copy - - You can use these definitions: - PNG_HANDLE_CHUNK_AS_DEFAULT 0 - PNG_HANDLE_CHUNK_NEVER 1 - PNG_HANDLE_CHUNK_IF_SAFE 2 - PNG_HANDLE_CHUNK_ALWAYS 3 - - chunk_list - list of chunks affected (a byte string, - five bytes per chunk, NULL or '\0' if - num_chunks is positive; ignored if - numchunks <= 0). - - num_chunks - number of chunks affected; if 0, all - unknown chunks are affected. If positive, - only the chunks in the list are affected, - and if negative all unknown chunks and - all known chunks except for the IHDR, - PLTE, tRNS, IDAT, and IEND chunks are - affected. - -Unknown chunks declared in this way will be saved as raw data onto a -list of png_unknown_chunk structures. If a chunk that is normally -known to libpng is named in the list, it will be handled as unknown, -according to the "keep" directive. If a chunk is named in successive -instances of png_set_keep_unknown_chunks(), the final instance will -take precedence. The IHDR and IEND chunks should not be named in -chunk_list; if they are, libpng will process them normally anyway. -If you know that your application will never make use of some particular -chunks, use PNG_HANDLE_CHUNK_NEVER (or 1) as demonstrated below. - -Here is an example of the usage of png_set_keep_unknown_chunks(), -where the private "vpAg" chunk will later be processed by a user chunk -callback function: - - png_byte vpAg[5]={118, 112, 65, 103, (png_byte) '\0'}; - - #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) - png_byte unused_chunks[]= - { - 104, 73, 83, 84, (png_byte) '\0', /* hIST */ - 105, 84, 88, 116, (png_byte) '\0', /* iTXt */ - 112, 67, 65, 76, (png_byte) '\0', /* pCAL */ - 115, 67, 65, 76, (png_byte) '\0', /* sCAL */ - 115, 80, 76, 84, (png_byte) '\0', /* sPLT */ - 116, 73, 77, 69, (png_byte) '\0', /* tIME */ - }; - #endif - - ... - - #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) - /* ignore all unknown chunks - * (use global setting "2" for libpng16 and earlier): - */ - png_set_keep_unknown_chunks(read_ptr, 2, NULL, 0); - - /* except for vpAg: */ - png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1); - - /* also ignore unused known chunks: */ - png_set_keep_unknown_chunks(read_ptr, 1, unused_chunks, - (int)(sizeof unused_chunks)/5); - #endif - -User limits - -The PNG specification allows the width and height of an image to be as -large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns. -For safety, libpng imposes a default limit of 1 million rows and columns. -Larger images will be rejected immediately with a png_error() call. If -you wish to change these limits, you can use - - png_set_user_limits(png_ptr, width_max, height_max); - -to set your own limits (libpng may reject some very wide images -anyway because of potential buffer overflow conditions). - -You should put this statement after you create the PNG structure and -before calling png_read_info(), png_read_png(), or png_process_data(). - -When writing a PNG datastream, put this statement before calling -png_write_info() or png_write_png(). - -If you need to retrieve the limits that are being applied, use - - width_max = png_get_user_width_max(png_ptr); - height_max = png_get_user_height_max(png_ptr); - -The PNG specification sets no limit on the number of ancillary chunks -allowed in a PNG datastream. By default, libpng imposes a limit of -a total of 1000 sPLT, tEXt, iTXt, zTXt, and unknown chunks to be stored. -If you have set up both info_ptr and end_info_ptr, the limit applies -separately to each. You can change the limit on the total number of such -chunks that will be stored, with - - png_set_chunk_cache_max(png_ptr, user_chunk_cache_max); - -where 0x7fffffffL means unlimited. You can retrieve this limit with - - chunk_cache_max = png_get_chunk_cache_max(png_ptr); - -Libpng imposes a limit of 8 Megabytes (8,000,000 bytes) on the amount of -memory that any chunk other than IDAT can occupy, originally or when -decompressed (prior to libpng-1.6.32 the limit was only applied to compressed -chunks after decompression). You can change this limit with - - png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max); - -and you can retrieve the limit with - - chunk_malloc_max = png_get_chunk_malloc_max(png_ptr); - -Any chunks that would cause either of these limits to be exceeded will -be ignored. - -Information about your system - -If you intend to display the PNG or to incorporate it in other image data you -need to tell libpng information about your display or drawing surface so that -libpng can convert the values in the image to match the display. - -From libpng-1.5.4 this information can be set before reading the PNG file -header. In earlier versions png_set_gamma() existed but behaved incorrectly if -called before the PNG file header had been read and png_set_alpha_mode() did not -exist. - -If you need to support versions prior to libpng-1.5.4 test the version number -as illustrated below using "PNG_LIBPNG_VER >= 10504" and follow the procedures -described in the appropriate manual page. - -You give libpng the encoding expected by your system expressed as a 'gamma' -value. You can also specify a default encoding for the PNG file in -case the required information is missing from the file. By default libpng -assumes that the PNG data matches your system, to keep this default call: - - png_set_gamma(png_ptr, screen_gamma, output_gamma); - -or you can use the fixed point equivalent: - - png_set_gamma_fixed(png_ptr, PNG_FP_1*screen_gamma, - PNG_FP_1*output_gamma); - -If you don't know the gamma for your system it is probably 2.2 - a good -approximation to the IEC standard for display systems (sRGB). If images are -too contrasty or washed out you got the value wrong - check your system -documentation! - -Many systems permit the system gamma to be changed via a lookup table in the -display driver, a few systems, including older Macs, change the response by -default. As of 1.5.4 three special values are available to handle common -situations: - - PNG_DEFAULT_sRGB: Indicates that the system conforms to the - IEC 61966-2-1 standard. This matches almost - all systems. - PNG_GAMMA_MAC_18: Indicates that the system is an older - (pre Mac OS 10.6) Apple Macintosh system with - the default settings. - PNG_GAMMA_LINEAR: Just the fixed point value for 1.0 - indicates - that the system expects data with no gamma - encoding. - -You would use the linear (unencoded) value if you need to process the pixel -values further because this avoids the need to decode and re-encode each -component value whenever arithmetic is performed. A lot of graphics software -uses linear values for this reason, often with higher precision component values -to preserve overall accuracy. - - -The output_gamma value expresses how to decode the output values, not how -they are encoded. The values used correspond to the normal numbers used to -describe the overall gamma of a computer display system; for example 2.2 for -an sRGB conformant system. The values are scaled by 100000 in the _fixed -version of the API (so 220000 for sRGB.) - -The inverse of the value is always used to provide a default for the PNG file -encoding if it has no gAMA chunk and if png_set_gamma() has not been called -to override the PNG gamma information. - -When the ALPHA_OPTIMIZED mode is selected the output gamma is used to encode -opaque pixels however pixels with lower alpha values are not encoded, -regardless of the output gamma setting. - -When the standard Porter Duff handling is requested with mode 1 the output -encoding is set to be linear and the output_gamma value is only relevant -as a default for input data that has no gamma information. The linear output -encoding will be overridden if png_set_gamma() is called - the results may be -highly unexpected! - -The following numbers are derived from the sRGB standard and the research -behind it. sRGB is defined to be approximated by a PNG gAMA chunk value of -0.45455 (1/2.2) for PNG. The value implicitly includes any viewing -correction required to take account of any differences in the color -environment of the original scene and the intended display environment; the -value expresses how to *decode* the image for display, not how the original -data was *encoded*. - -sRGB provides a peg for the PNG standard by defining a viewing environment. -sRGB itself, and earlier TV standards, actually use a more complex transform -(a linear portion then a gamma 2.4 power law) than PNG can express. (PNG is -limited to simple power laws.) By saying that an image for direct display on -an sRGB conformant system should be stored with a gAMA chunk value of 45455 -(11.3.3.2 and 11.3.3.5 of the ISO PNG specification) the PNG specification -makes it possible to derive values for other display systems and -environments. - -The Mac value is deduced from the sRGB based on an assumption that the actual -extra viewing correction used in early Mac display systems was implemented as -a power 1.45 lookup table. - -Any system where a programmable lookup table is used or where the behavior of -the final display device characteristics can be changed requires system -specific code to obtain the current characteristic. However this can be -difficult and most PNG gamma correction only requires an approximate value. - -By default, if png_set_alpha_mode() is not called, libpng assumes that all -values are unencoded, linear, values and that the output device also has a -linear characteristic. This is only very rarely correct - it is invariably -better to call png_set_alpha_mode() with PNG_DEFAULT_sRGB than rely on the -default if you don't know what the right answer is! - -The special value PNG_GAMMA_MAC_18 indicates an older Mac system (pre Mac OS -10.6) which used a correction table to implement a somewhat lower gamma on an -otherwise sRGB system. - -Both these values are reserved (not simple gamma values) in order to allow -more precise correction internally in the future. - -NOTE: the values can be passed to either the fixed or floating -point APIs, but the floating point API will also accept floating point -values. - -The second thing you may need to tell libpng about is how your system handles -alpha channel information. Some, but not all, PNG files contain an alpha -channel. To display these files correctly you need to compose the data onto a -suitable background, as described in the PNG specification. - -Libpng only supports composing onto a single color (using png_set_background; -see below). Otherwise you must do the composition yourself and, in this case, -you may need to call png_set_alpha_mode: - - #if PNG_LIBPNG_VER >= 10504 - png_set_alpha_mode(png_ptr, mode, screen_gamma); - #else - png_set_gamma(png_ptr, screen_gamma, 1.0/screen_gamma); - #endif - -The screen_gamma value is the same as the argument to png_set_gamma; however, -how it affects the output depends on the mode. png_set_alpha_mode() sets the -file gamma default to 1/screen_gamma, so normally you don't need to call -png_set_gamma. If you need different defaults call png_set_gamma() before -png_set_alpha_mode() - if you call it after it will override the settings made -by png_set_alpha_mode(). - -The mode is as follows: - - PNG_ALPHA_PNG: The data is encoded according to the PNG -specification. Red, green and blue, or gray, components are -gamma encoded color values and are not premultiplied by the -alpha value. The alpha value is a linear measure of the -contribution of the pixel to the corresponding final output pixel. - -You should normally use this format if you intend to perform -color correction on the color values; most, maybe all, color -correction software has no handling for the alpha channel and, -anyway, the math to handle pre-multiplied component values is -unnecessarily complex. - -Before you do any arithmetic on the component values you need -to remove the gamma encoding and multiply out the alpha -channel. See the PNG specification for more detail. It is -important to note that when an image with an alpha channel is -scaled, linear encoded, pre-multiplied component values must -be used! - -The remaining modes assume you don't need to do any further color correction or -that if you do, your color correction software knows all about alpha (it -probably doesn't!). They 'associate' the alpha with the color information by -storing color channel values that have been scaled by the alpha. The -advantage is that the color channels can be resampled (the image can be -scaled) in this form. The disadvantage is that normal practice is to store -linear, not (gamma) encoded, values and this requires 16-bit channels for -still images rather than the 8-bit channels that are just about sufficient if -gamma encoding is used. In addition all non-transparent pixel values, -including completely opaque ones, must be gamma encoded to produce the final -image. These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes -described below (the latter being the two common names for associated alpha -color channels). Note that PNG files always contain non-associated color -channels; png_set_alpha_mode() with one of the modes causes the decoder to -convert the pixels to an associated form before returning them to your -application. - -Since it is not necessary to perform arithmetic on opaque color values so -long as they are not to be resampled and are in the final color space it is -possible to optimize the handling of alpha by storing the opaque pixels in -the PNG format (adjusted for the output color space) while storing partially -opaque pixels in the standard, linear, format. The accuracy required for -standard alpha composition is relatively low, because the pixels are -isolated, therefore typically the accuracy loss in storing 8-bit linear -values is acceptable. (This is not true if the alpha channel is used to -simulate transparency over large areas - use 16 bits or the PNG mode in -this case!) This is the 'OPTIMIZED' mode. For this mode a pixel is -treated as opaque only if the alpha value is equal to the maximum value. - - PNG_ALPHA_STANDARD: The data libpng produces is encoded in the -standard way assumed by most correctly written graphics software. -The gamma encoding will be removed by libpng and the -linear component values will be pre-multiplied by the -alpha channel. - -With this format the final image must be re-encoded to -match the display gamma before the image is displayed. -If your system doesn't do that, yet still seems to -perform arithmetic on the pixels without decoding them, -it is broken - check out the modes below. - -With PNG_ALPHA_STANDARD libpng always produces linear -component values, whatever screen_gamma you supply. The -screen_gamma value is, however, used as a default for -the file gamma if the PNG file has no gamma information. - -If you call png_set_gamma() after png_set_alpha_mode() you -will override the linear encoding. Instead the -pre-multiplied pixel values will be gamma encoded but -the alpha channel will still be linear. This may -actually match the requirements of some broken software, -but it is unlikely. - -While linear 8-bit data is often used it has -insufficient precision for any image with a reasonable -dynamic range. To avoid problems, and if your software -supports it, use png_set_expand_16() to force all -components to 16 bits. - - PNG_ALPHA_OPTIMIZED: This mode is the same as PNG_ALPHA_STANDARD -except that completely opaque pixels are gamma encoded according to -the screen_gamma value. Pixels with alpha less than 1.0 -will still have linear components. - -Use this format if you have control over your -compositing software and so don't do other arithmetic -(such as scaling) on the data you get from libpng. Your -compositing software can simply copy opaque pixels to -the output but still has linear values for the -non-opaque pixels. - -In normal compositing, where the alpha channel encodes -partial pixel coverage (as opposed to broad area -translucency), the inaccuracies of the 8-bit -representation of non-opaque pixels are irrelevant. - -You can also try this format if your software is broken; -it might look better. - - PNG_ALPHA_BROKEN: This is PNG_ALPHA_STANDARD; however, all component -values, including the alpha channel are gamma encoded. 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. In most cases of broken software or hardware the bug in the -final display manifests as a subtle halo around composited parts of the -image. You may not even perceive this as a halo; the composited part of -the image may simply appear separate from the background, as though it had -been cut out of paper and pasted on afterward. - -If you don't have to deal with bugs in software or hardware, or if you can fix -them, there are three recommended ways of using png_set_alpha_mode(): - - png_set_alpha_mode(png_ptr, PNG_ALPHA_PNG, - screen_gamma); - -You can do color correction on the result (libpng does not currently -support color correction internally). When you handle the alpha channel -you need to undo the gamma encoding and multiply out the alpha. - - png_set_alpha_mode(png_ptr, PNG_ALPHA_STANDARD, - screen_gamma); - png_set_expand_16(png_ptr); - -If you are using the high level interface, don't call png_set_expand_16(); -instead pass PNG_TRANSFORM_EXPAND_16 to the interface. - -With this mode you can't do color correction, but you can do arithmetic, -including composition and scaling, on the data without further processing. - - png_set_alpha_mode(png_ptr, PNG_ALPHA_OPTIMIZED, - screen_gamma); - -You can avoid the expansion to 16-bit components with this mode, but you -lose the ability to scale the image or perform other linear arithmetic. -All you can do is compose the result onto a matching output. Since this -mode is libpng-specific you also need to write your own composition -software. - -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); - -Choices for the alpha_mode are - - PNG_ALPHA_PNG 0 /* according to the PNG standard */ - PNG_ALPHA_STANDARD 1 /* according to Porter/Duff */ - PNG_ALPHA_ASSOCIATED 1 /* as above; this is the normal practice */ - PNG_ALPHA_PREMULTIPLIED 1 /* as above */ - PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */ - PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */ - -PNG_ALPHA_PNG 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 were 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. - -If you don't need, or can't handle, the alpha channel you can call -png_set_background() to remove it by compositing against a fixed color. Don't -call png_set_strip_alpha() to do this - it will leave spurious pixel values in -transparent parts of this image. - - png_set_background(png_ptr, &background_color, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1); - -The background_color is an RGB or grayscale value according to the data format -libpng will produce for you. Because you don't yet know the format of the PNG -file, if you call png_set_background at this point you must arrange for the -format produced by libpng to always have 8-bit or 16-bit components and then -store the color as an 8-bit or 16-bit color as appropriate. The color contains -separate gray and RGB component values, so you can let libpng produce gray or -RGB output according to the input format, but low bit depth grayscale images -must always be converted to at least 8-bit format. (Even though low bit depth -grayscale images can't have an alpha channel they can have a transparent -color!) - -You set the transforms you need later, either as flags to the high level -interface or libpng API calls for the low level interface. For reference the -settings and API calls required are: - -8-bit values: - PNG_TRANSFORM_SCALE_16 | PNG_EXPAND - png_set_expand(png_ptr); png_set_scale_16(png_ptr); - - If you must get exactly the same inaccurate results - produced by default in versions prior to libpng-1.5.4, - use PNG_TRANSFORM_STRIP_16 and png_set_strip_16(png_ptr) - instead. - -16-bit values: - PNG_TRANSFORM_EXPAND_16 - png_set_expand_16(png_ptr); - -In either case palette image data will be expanded to RGB. If you just want -color data you can add PNG_TRANSFORM_GRAY_TO_RGB or png_set_gray_to_rgb(png_ptr) -to the list. - -Calling png_set_background before the PNG file header is read will not work -prior to libpng-1.5.4. Because the failure may result in unexpected warnings or -errors it is therefore much safer to call png_set_background after the head has -been read. Unfortunately this means that prior to libpng-1.5.4 it cannot be -used with the high level interface. - -The high-level read interface - -At this point there are two ways to proceed; through the high-level -read interface, or through a sequence of low-level read operations. -You can use the high-level interface if (a) you are willing to read -the entire image into memory, and (b) the input transformations -you want to do are limited to the following set: - - PNG_TRANSFORM_IDENTITY No transformation - PNG_TRANSFORM_SCALE_16 Strip 16-bit samples to - 8-bit accurately - PNG_TRANSFORM_STRIP_16 Chop 16-bit samples to - 8-bit less accurately - PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel - PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit - samples to bytes - PNG_TRANSFORM_PACKSWAP Change order of packed - pixels to LSB first - PNG_TRANSFORM_EXPAND Perform set_expand() - PNG_TRANSFORM_INVERT_MONO Invert monochrome images - PNG_TRANSFORM_SHIFT Normalize pixels to the - sBIT depth - PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA - to BGRA - PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA - to AG - PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity - to transparency - PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples - PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples - to RGB (or GA to RGBA) - PNG_TRANSFORM_EXPAND_16 Expand samples to 16 bits - -(This excludes setting a background color, doing gamma transformation, -quantizing, and setting filler.) If this is the case, simply do this: - - png_read_png(png_ptr, info_ptr, png_transforms, NULL) - -where png_transforms is an integer containing the bitwise OR of some -set of transformation flags. This call is equivalent to png_read_info(), -followed the set of transformations indicated by the transform mask, -then png_read_image(), and finally png_read_end(). - -(The final parameter of this call is not yet used. Someday it might point -to transformation parameters required by some future input transform.) - -You must use png_transforms and not call any png_set_transform() functions -when you use png_read_png(). - -After you have called png_read_png(), you can retrieve the image data -with - - row_pointers = png_get_rows(png_ptr, info_ptr); - -where row_pointers is an array of pointers to the pixel data for each row: - - png_bytep row_pointers[height]; - -If you know your image size and pixel size ahead of time, you can allocate -row_pointers prior to calling png_read_png() with - - if (height > PNG_UINT_32_MAX/(sizeof (png_byte))) - png_error (png_ptr, - "Image is too tall to process in memory"); - - if (width > PNG_UINT_32_MAX/pixel_size) - png_error (png_ptr, - "Image is too wide to process in memory"); - - row_pointers = png_malloc(png_ptr, - height*(sizeof (png_bytep))); - - for (int i=0; i PNG_SIZE_MAX/(width*pixel_size)) { - png_error(png_ptr,"image_data buffer would be too large"); - } - - png_bytep buffer=png_malloc(png_ptr,height*width*pixel_size); - - for (int i=0; i) and -png_get_(png_ptr, info_ptr, ...) functions return non-zero if the -data has been read, or zero if it is missing. The parameters to the -png_get_ are set directly if they are simple data types, or a -pointer into the info_ptr is returned for any complex types. - -The colorspace data from gAMA, cHRM, sRGB, iCCP, and sBIT chunks -is simply returned to give the application information about how the -image was encoded. Libpng itself only does transformations using the file -gamma when combining semitransparent pixels with the background color, and, -since libpng-1.6.0, when converting between 8-bit sRGB and 16-bit linear pixels -within the simplified API. Libpng also uses the file gamma when converting -RGB to gray, beginning with libpng-1.0.5, if the application calls -png_set_rgb_to_gray()). - - png_get_PLTE(png_ptr, info_ptr, &palette, - &num_palette); - - palette - the palette for the file - (array of png_color) - - num_palette - number of entries in the palette - - png_get_gAMA(png_ptr, info_ptr, &file_gamma); - png_get_gAMA_fixed(png_ptr, info_ptr, &int_file_gamma); - - file_gamma - the gamma at which the file is - written (PNG_INFO_gAMA) - - int_file_gamma - 100,000 times the gamma at which the - file is written - - png_get_cHRM(png_ptr, info_ptr, &white_x, &white_y, &red_x, - &red_y, &green_x, &green_y, &blue_x, &blue_y) - png_get_cHRM_XYZ(png_ptr, info_ptr, &red_X, &red_Y, &red_Z, - &green_X, &green_Y, &green_Z, &blue_X, &blue_Y, - &blue_Z) - png_get_cHRM_fixed(png_ptr, info_ptr, &int_white_x, - &int_white_y, &int_red_x, &int_red_y, - &int_green_x, &int_green_y, &int_blue_x, - &int_blue_y) - png_get_cHRM_XYZ_fixed(png_ptr, info_ptr, &int_red_X, &int_red_Y, - &int_red_Z, &int_green_X, &int_green_Y, - &int_green_Z, &int_blue_X, &int_blue_Y, - &int_blue_Z) - - {white,red,green,blue}_{x,y} - A color space encoding specified using the - chromaticities of the end points and the - white point. (PNG_INFO_cHRM) - - {red,green,blue}_{X,Y,Z} - A color space encoding specified using the - encoding end points - the CIE tristimulus - specification of the intended color of the red, - green and blue channels in the PNG RGB data. - The white point is simply the sum of the three - end points. (PNG_INFO_cHRM) - - png_get_sRGB(png_ptr, info_ptr, &srgb_intent); - - srgb_intent - the rendering intent (PNG_INFO_sRGB) - The presence of the sRGB chunk - means that the pixel data is in the - sRGB color space. This chunk also - implies specific values of gAMA and - cHRM. - - png_get_iCCP(png_ptr, info_ptr, &name, - &compression_type, &profile, &proflen); - - name - The profile name. - - compression_type - The compression type; always - PNG_COMPRESSION_TYPE_BASE for PNG 1.0. - You may give NULL to this argument to - ignore it. - - profile - International Color Consortium color - profile data. May contain NULs. - - proflen - length of profile data in bytes. - - png_get_sBIT(png_ptr, info_ptr, &sig_bit); - - sig_bit - the number of significant bits for - (PNG_INFO_sBIT) each of the gray, - red, green, and blue channels, - whichever are appropriate for the - given color type (png_color_16) - - png_get_tRNS(png_ptr, info_ptr, &trans_alpha, - &num_trans, &trans_color); - - trans_alpha - array of alpha (transparency) - entries for palette (PNG_INFO_tRNS) - - num_trans - number of transparent entries - (PNG_INFO_tRNS) - - trans_color - graylevel or color sample values of - the single transparent color for - non-paletted images (PNG_INFO_tRNS) - - png_get_eXIf_1(png_ptr, info_ptr, &num_exif, &exif); - (PNG_INFO_eXIf) - - exif - Exif profile (array of png_byte) - - png_get_hIST(png_ptr, info_ptr, &hist); - (PNG_INFO_hIST) - - hist - histogram of palette (array of - png_uint_16) - - png_get_tIME(png_ptr, info_ptr, &mod_time); - - mod_time - time image was last modified - (PNG_VALID_tIME) - - png_get_bKGD(png_ptr, info_ptr, &background); - - background - background color (of type - png_color_16p) (PNG_VALID_bKGD) - valid 16-bit red, green and blue - values, regardless of color_type - - num_comments = png_get_text(png_ptr, info_ptr, - &text_ptr, &num_text); - - num_comments - number of comments - - text_ptr - array of png_text holding image - comments - - text_ptr[i].compression - type of compression used - on "text" PNG_TEXT_COMPRESSION_NONE - PNG_TEXT_COMPRESSION_zTXt - PNG_ITXT_COMPRESSION_NONE - PNG_ITXT_COMPRESSION_zTXt - - text_ptr[i].key - keyword for comment. Must contain - 1-79 characters. - - text_ptr[i].text - text comments for current - keyword. Can be empty. - - text_ptr[i].text_length - length of text string, - after decompression, 0 for iTXt - - text_ptr[i].itxt_length - length of itxt string, - after decompression, 0 for tEXt/zTXt - - text_ptr[i].lang - language of comment (empty - string for unknown). - - text_ptr[i].lang_key - keyword in UTF-8 - (empty string for unknown). - - Note that the itxt_length, lang, and lang_key - members of the text_ptr 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, - they contain NULL pointers when the "compression" - field contains PNG_TEXT_COMPRESSION_NONE or - PNG_TEXT_COMPRESSION_zTXt. - - num_text - number of comments (same as - num_comments; you can put NULL here - to avoid the duplication) - - Note while png_set_text() will accept text, language, - and translated keywords that can be 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. - - num_spalettes = png_get_sPLT(png_ptr, info_ptr, - &palette_ptr); - - num_spalettes - number of sPLT chunks read. - - palette_ptr - array of palette structures holding - contents of one or more sPLT chunks - read. - - png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, - &unit_type); - - offset_x - positive offset from the left edge - of the screen (can be negative) - - offset_y - positive offset from the top edge - of the screen (can be negative) - - unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER - - png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, - &unit_type); - - res_x - pixels/unit physical resolution in - x direction - - res_y - pixels/unit physical resolution in - x direction - - unit_type - PNG_RESOLUTION_UNKNOWN, - PNG_RESOLUTION_METER - - png_get_sCAL(png_ptr, info_ptr, &unit, &width, - &height) - - unit - physical scale units (an integer) - - width - width of a pixel in physical scale units - - height - height of a pixel in physical scale units - (width and height are doubles) - - png_get_sCAL_s(png_ptr, info_ptr, &unit, &width, - &height) - - unit - physical scale units (an integer) - - width - width of a pixel in physical scale units - (expressed as a string) - - height - height of a pixel in physical scale units - (width and height are strings like "2.54") - - num_unknown_chunks = png_get_unknown_chunks(png_ptr, - info_ptr, &unknowns) - - unknowns - array of png_unknown_chunk - structures holding unknown chunks - - unknowns[i].name - name of unknown chunk - - unknowns[i].data - data of unknown chunk - - unknowns[i].size - size of unknown chunk's data - - unknowns[i].location - position of chunk in file - - The value of "i" corresponds to the order in which the - chunks were read from the PNG file or inserted with the - png_set_unknown_chunks() function. - - The value of "location" is a bitwise "or" of - - PNG_HAVE_IHDR (0x01) - PNG_HAVE_PLTE (0x02) - PNG_AFTER_IDAT (0x08) - -The data from the pHYs chunk can be retrieved in several convenient -forms: - - res_x = png_get_x_pixels_per_meter(png_ptr, - info_ptr) - - res_y = png_get_y_pixels_per_meter(png_ptr, - info_ptr) - - res_x_and_y = png_get_pixels_per_meter(png_ptr, - info_ptr) - - res_x = png_get_x_pixels_per_inch(png_ptr, - info_ptr) - - res_y = png_get_y_pixels_per_inch(png_ptr, - info_ptr) - - res_x_and_y = png_get_pixels_per_inch(png_ptr, - info_ptr) - - aspect_ratio = png_get_pixel_aspect_ratio(png_ptr, - info_ptr) - - Each of these returns 0 [signifying "unknown"] if - the data is not present or if res_x is 0; - res_x_and_y is 0 if res_x != res_y - - Note that because of the way the resolutions are - stored internally, the inch conversions won't - come out to exactly even number. For example, - 72 dpi is stored as 0.28346 pixels/meter, and - when this is retrieved it is 71.9988 dpi, so - be sure to round the returned value appropriately - if you want to display a reasonable-looking result. - -The data from the oFFs chunk can be retrieved in several convenient -forms: - - x_offset = png_get_x_offset_microns(png_ptr, info_ptr); - - y_offset = png_get_y_offset_microns(png_ptr, info_ptr); - - x_offset = png_get_x_offset_inches(png_ptr, info_ptr); - - y_offset = png_get_y_offset_inches(png_ptr, info_ptr); - - Each of these returns 0 [signifying "unknown" if both - x and y are 0] if the data is not present or if the - chunk is present but the unit is the pixel. The - remark about inexact inch conversions applies here - as well, because a value in inches can't always be - converted to microns and back without some loss - of precision. - -For more information, see the -PNG specification for chunk contents. Be careful with trusting -rowbytes, as some of the transformations could increase the space -needed to hold a row (expand, filler, gray_to_rgb, etc.). -See png_read_update_info(), below. - -A quick word about text_ptr and num_text. PNG stores comments in -keyword/text pairs, one pair per chunk, with no limit on the number -of text chunks, and a 2^31 byte limit on their size. While there are -suggested keywords, there is no requirement to restrict the use to these -strings. It is strongly suggested that keywords and text be sensible -to humans (that's the point), so don't use abbreviations. Non-printing -symbols are not allowed. See the PNG specification for more details. -There is also no requirement to have text after the keyword. - -Keywords should be limited to 79 Latin-1 characters without leading or -trailing spaces, but non-consecutive spaces are allowed within the -keyword. It is possible to have the same keyword any number of times. -The text_ptr is an array of png_text structures, each holding a -pointer to a language string, a pointer to a keyword and a pointer to -a text string. The text string, language code, and translated -keyword may be empty or NULL pointers. The keyword/text -pairs are put into the array in the order that they are received. -However, some or all of the text chunks may be after the image, so, to -make sure you have read all the text chunks, don't mess with these -until after you read the stuff after the image. This will be -mentioned again below in the discussion that goes with png_read_end(). - -Input transformations - -After you've read the header information, you can set up the library -to handle any special transformations of the image data. The various -ways to transform the data will be described in the order that they -should occur. This is important, as some of these change the color -type and/or bit depth of the data, and some others only work on -certain color types and bit depths. - -Transformations you request are ignored if they don't have any meaning for a -particular input data format. However some transformations can have an effect -as a result of a previous transformation. If you specify a contradictory set of -transformations, for example both adding and removing the alpha channel, you -cannot predict the final result. - -The color used for the transparency values should be supplied in the same -format/depth as the current image data. It is stored in the same format/depth -as the image data in a tRNS chunk, so this is what libpng expects for this data. - -The color used for the background value depends on the need_expand argument as -described below. - -Data will be decoded into the supplied row buffers packed into bytes -unless the library has been told to transform it into another format. -For example, 4 bit/pixel paletted or grayscale data will be returned -2 pixels/byte with the leftmost pixel in the high-order bits of the byte, -unless png_set_packing() is called. 8-bit RGB data will be stored -in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha() -is called to insert filler bytes, either before or after each RGB triplet. - -16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant -byte of the color value first, unless png_set_scale_16() is called to -transform it to regular RGB RGB triplets, or png_set_filler() or -png_set_add alpha() is called to insert two filler bytes, either before -or after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can -be modified with png_set_filler(), png_set_add_alpha(), png_set_strip_16(), -or png_set_scale_16(). - -The following code transforms grayscale images of less than 8 to 8 bits, -changes paletted images to RGB, and adds a full alpha channel if there is -transparency information in a tRNS chunk. This is most useful on -grayscale images with bit depths of 2 or 4 or if there is a multiple-image -viewing application that wishes to treat all images in the same way. - - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_palette_to_rgb(png_ptr); - - if (png_get_valid(png_ptr, info_ptr, - PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); - - if (color_type == PNG_COLOR_TYPE_GRAY && - bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr); - -The first two functions are actually aliases for png_set_expand(), added -in libpng version 1.0.4, with the function names expanded to improve code -readability. In some future version they may actually do different -things. - -As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was -added. It expands the sample depth without changing tRNS to alpha. - -As of libpng version 1.5.2, png_set_expand_16() was added. It behaves as -png_set_expand(); however, the resultant channels have 16 bits rather than 8. -Use this when the output color or gray channels are made linear to avoid fairly -severe accuracy loss. - - if (bit_depth < 16) - png_set_expand_16(png_ptr); - -PNG can have files with 16 bits per channel. If you only can handle -8 bits per channel, this will strip the pixels down to 8-bit. - - if (bit_depth == 16) -#if PNG_LIBPNG_VER >= 10504 - png_set_scale_16(png_ptr); -#else - png_set_strip_16(png_ptr); -#endif - -(The more accurate "png_set_scale_16()" API became available in libpng version -1.5.4). - -If you need to process the alpha channel on the image separately from the image -data (for example if you convert it to a bitmap mask) it is possible to have -libpng strip the channel leaving just RGB or gray data: - - if (color_type & PNG_COLOR_MASK_ALPHA) - png_set_strip_alpha(png_ptr); - -If you strip the alpha channel you need to find some other way of dealing with -the information. If, instead, you want to convert the image to an opaque -version with no alpha channel use png_set_background; see below. - -As of libpng version 1.5.2, almost all useful expansions are supported, the -major ommissions are conversion of grayscale to indexed images (which can be -done trivially in the application) and conversion of indexed to grayscale (which -can be done by a trivial manipulation of the palette.) - -In the following table, the 01 means grayscale with depth<8, 31 means -indexed with depth<8, other numerals represent the color type, "T" means -the tRNS chunk is present, A means an alpha channel is present, and O -means tRNS or alpha is present but all pixels in the image are opaque. - - FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O - TO - 01 - [G] - - - - - - - - - - - - - - 31 [Q] Q [Q] [Q] [Q] Q Q Q Q Q Q [Q] [Q] Q Q - 0 1 G + . . G G G G G G B B GB GB - 0T lt Gt t + . Gt G G Gt G G Bt Bt GBt GBt - 0O lt Gt t . + Gt Gt G Gt Gt G Bt Bt GBt GBt - 2 C P C C C + . . C - - CB CB B B - 2T Ct - Ct C C t + t - - - CBt CBt Bt Bt - 2O Ct - Ct C C t t + - - - CBt CBt Bt Bt - 3 [Q] p [Q] [Q] [Q] Q Q Q + . . [Q] [Q] Q Q - 3T [Qt] p [Qt][Q] [Q] Qt Qt Qt t + t [Qt][Qt] Qt Qt - 3O [Qt] p [Qt][Q] [Q] Qt Qt Qt t t + [Qt][Qt] Qt Qt - 4A lA G A T T GA GT GT GA GT GT + BA G GBA - 4O lA GBA A T T GA GT GT GA GT GT BA + GBA G - 6A CA PA CA C C A T tT PA P P C CBA + BA - 6O CA PBA CA C C A tT T PA P P CBA C BA + - -Within the matrix, - "+" identifies entries where 'from' and 'to' are the same. - "-" means the transformation is not supported. - "." means nothing is necessary (a tRNS chunk can just be ignored). - "t" means the transformation is obtained by png_set_tRNS. - "A" means the transformation is obtained by png_set_add_alpha(). - "X" means the transformation is obtained by png_set_expand(). - "1" means the transformation is obtained by - png_set_expand_gray_1_2_4_to_8() (and by png_set_expand() - if there is no transparency in the original or the final - format). - "C" means the transformation is obtained by png_set_gray_to_rgb(). - "G" means the transformation is obtained by png_set_rgb_to_gray(). - "P" means the transformation is obtained by - png_set_expand_palette_to_rgb(). - "p" means the transformation is obtained by png_set_packing(). - "Q" means the transformation is obtained by png_set_quantize(). - "T" means the transformation is obtained by - png_set_tRNS_to_alpha(). - "B" means the transformation is obtained by - png_set_background(), or png_strip_alpha(). - -When an entry has multiple transforms listed all are required to cause the -right overall transformation. When two transforms are separated by a comma -either will do the job. When transforms are enclosed in [] the transform should -do the job but this is currently unimplemented - a different format will result -if the suggested transformations are used. - -In PNG files, the alpha channel in an image -is the level of opacity. If you need the alpha channel in an image to -be the level of transparency instead of opacity, you can invert the -alpha channel (or the tRNS chunk data) after it's read, so that 0 is -fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit -images) is fully transparent, with - - png_set_invert_alpha(png_ptr); - -PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as -they can, resulting in, for example, 8 pixels per byte for 1 bit -files. This code expands to 1 pixel per byte without changing the -values of the pixels: - - if (bit_depth < 8) - png_set_packing(png_ptr); - -PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels -stored in a PNG image have been "scaled" or "shifted" up to the next -higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] -to 8 bits/sample in the range [0, 255]). However, it is also possible -to convert the PNG pixel data back to the original bit depth of the -image. This call reduces the pixels back down to the original bit depth: - - png_color_8p sig_bit; - - if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) - png_set_shift(png_ptr, sig_bit); - -PNG files store 3-color pixels in red, green, blue order. This code -changes the storage of the pixels to blue, green, red: - - if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_bgr(png_ptr); - -PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them -into 4 or 8 bytes for windowing systems that need them in this format: - - if (color_type == PNG_COLOR_TYPE_RGB) - png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE); - -where "filler" is the 8-bit or 16-bit number to fill with, and the location -is either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether -you want the filler before the RGB or after. When filling an 8-bit pixel, -the least significant 8 bits of the number are used, if a 16-bit number is -supplied. This transformation does not affect images that already have full -alpha channels. To add an opaque alpha channel, use filler=0xffff and -PNG_FILLER_AFTER which will generate RGBA pixels. - -Note that png_set_filler() does not change the color type. If you want -to do that, you can add a true alpha channel with - - if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_GRAY) - png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER); - -where "filler" contains the alpha value to assign to each pixel. -The png_set_add_alpha() function was added in libpng-1.2.7. - -If you are reading an image with an alpha channel, and you need the -data as ARGB instead of the normal PNG format RGBA: - - if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_swap_alpha(png_ptr); - -For some uses, you may want a grayscale image to be represented as -RGB. This code will do that conversion: - - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - -Conversely, you can convert an RGB or RGBA image to grayscale or grayscale -with alpha. - - if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_rgb_to_gray(png_ptr, error_action, - double red_weight, double green_weight); - - error_action = 1: silently do the conversion - - error_action = 2: issue a warning if the original - image has any pixel where - red != green or red != blue - - error_action = 3: issue an error and abort the - conversion if the original - image has any pixel where - red != green or red != blue - - red_weight: weight of red component - - green_weight: weight of green component - If either weight is negative, default - weights are used. - -In the corresponding fixed point API the red_weight and green_weight values are -simply scaled by 100,000: - - png_set_rgb_to_gray(png_ptr, error_action, - png_fixed_point red_weight, - png_fixed_point green_weight); - -If you have set error_action = 1 or 2, you can -later check whether the image really was gray, after processing -the image rows, with the png_get_rgb_to_gray_status(png_ptr) function. -It will return a png_byte that is zero if the image was gray or -1 if there were any non-gray pixels. Background and sBIT data -will be silently converted to grayscale, using the green channel -data for sBIT, regardless of the error_action setting. - -The default values come from the PNG file cHRM chunk if present; otherwise, the -defaults correspond to the ITU-R recommendation 709, and also the sRGB color -space, as recommended in the Charles Poynton's Colour FAQ, -Copyright (c) 2006-11-28 Charles Poynton, in section 9: - - - - Y = 0.2126 * R + 0.7152 * G + 0.0722 * B - -Previous versions of this document, 1998 through 2002, recommended a slightly -different formula: - - Y = 0.212671 * R + 0.715160 * G + 0.072169 * B - -Libpng uses an integer approximation: - - Y = (6968 * R + 23434 * G + 2366 * B)/32768 - -The calculation is done in a linear colorspace, if the image gamma -can be determined. - -The png_set_background() function has been described already; it tells libpng to -composite images with alpha or simple transparency against the supplied -background color. For compatibility with versions of libpng earlier than -libpng-1.5.4 it is recommended that you call the function after reading the file -header, even if you don't want to use the color in a bKGD chunk, if one exists. - -If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), -you may use this color, or supply another color more suitable for -the current display (e.g., the background color from a web page). You -need to tell libpng how the color is represented, both the format of the -component values in the color (the number of bits) and the gamma encoding of the -color. The function takes two arguments, background_gamma_mode and need_expand -to convey this information; however, only two combinations are likely to be -useful: - - png_color_16 my_background; - png_color_16p image_background; - - if (png_get_bKGD(png_ptr, info_ptr, &image_background)) - png_set_background(png_ptr, image_background, - PNG_BACKGROUND_GAMMA_FILE, 1/*needs to be expanded*/, 1); - else - png_set_background(png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0/*do not expand*/, 1); - -The second call was described above - my_background is in the format of the -final, display, output produced by libpng. Because you now know the format of -the PNG it is possible to avoid the need to choose either 8-bit or 16-bit -output and to retain palette images (the palette colors will be modified -appropriately and the tRNS chunk removed.) However, if you are doing this, -take great care not to ask for transformations without checking first that -they apply! - -In the first call the background color has the original bit depth and color type -of the PNG file. So, for palette images the color is supplied as a palette -index and for low bit greyscale images the color is a reduced bit value in -image_background->gray. - -If you didn't call png_set_gamma() before reading the file header, for example -if you need your code to remain compatible with older versions of libpng prior -to libpng-1.5.4, this is the place to call it. - -Do not call it if you called png_set_alpha_mode(); doing so will damage the -settings put in place by png_set_alpha_mode(). (If png_set_alpha_mode() is -supported then you can certainly do png_set_gamma() before reading the PNG -header.) - -This API unconditionally sets the screen and file gamma values, so it will -override the value in the PNG file unless it is called before the PNG file -reading starts. For this reason you must always call it with the PNG file -value when you call it in this position: - - if (png_get_gAMA(png_ptr, info_ptr, &file_gamma)) - png_set_gamma(png_ptr, screen_gamma, file_gamma); - - else - png_set_gamma(png_ptr, screen_gamma, 0.45455); - -If you need to reduce an RGB file to a paletted file, or if a paletted -file has more entries than will fit on your screen, png_set_quantize() -will do that. Note that this is a simple match quantization that merely -finds the closest color available. This should work fairly well with -optimized palettes, but fairly badly with linear color cubes. If you -pass a palette that is larger than maximum_colors, the file will -reduce the number of colors in the palette so it will fit into -maximum_colors. If there is a histogram, libpng will use it to make -more intelligent choices when reducing the palette. If there is no -histogram, it may not do as good a job. - - if (color_type & PNG_COLOR_MASK_COLOR) - { - if (png_get_valid(png_ptr, info_ptr, - PNG_INFO_PLTE)) - { - png_uint_16p histogram = NULL; - - png_get_hIST(png_ptr, info_ptr, - &histogram); - png_set_quantize(png_ptr, palette, num_palette, - max_screen_colors, histogram, 1); - } - - else - { - png_color std_color_cube[MAX_SCREEN_COLORS] = - { ... colors ... }; - - png_set_quantize(png_ptr, std_color_cube, - MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, - NULL,0); - } - } - -PNG files describe monochrome as black being zero and white being one. -The following code will reverse this (make black be one and white be -zero): - - if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY) - png_set_invert_mono(png_ptr); - -This function can also be used to invert grayscale and gray-alpha images: - - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_invert_mono(png_ptr); - -PNG files store 16-bit pixels in network byte order (big-endian, -ie. most significant bits first). This code changes the storage to the -other way (little-endian, i.e. least significant bits first, the -way PCs store them): - - if (bit_depth == 16) - png_set_swap(png_ptr); - -If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you -need to change the order the pixels are packed into bytes, you can use: - - if (bit_depth < 8) - png_set_packswap(png_ptr); - -Finally, you can write your own transformation function if none of -the existing ones meets your needs. This is done by setting a callback -with - - png_set_read_user_transform_fn(png_ptr, - read_transform_fn); - -You must supply the function - - void read_transform_fn(png_structp png_ptr, png_row_infop - row_info, png_bytep data) - -See pngtest.c for a working example. Your function will be called -after all of the other transformations have been processed. Take care with -interlaced images if you do the interlace yourself - the width of the row is the -width in 'row_info', not the overall image width. - -If supported, libpng provides two information routines that you can use to find -where you are in processing the image: - - png_get_current_pass_number(png_structp png_ptr); - png_get_current_row_number(png_structp png_ptr); - -Don't try using these outside a transform callback - firstly they are only -supported if user transforms are supported, secondly they may well return -unexpected results unless the row is actually being processed at the moment they -are called. - -With interlaced -images the value returned is the row in the input sub-image image. 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). - -The discussion of interlace handling above contains more information on how to -use these values. - -You can also set up a pointer to a user structure for use by your -callback function, and you can inform libpng that your transform -function will change the number of channels or bit depth with the -function - - png_set_user_transform_info(png_ptr, user_ptr, - user_depth, user_channels); - -The user's application, not libpng, is responsible for allocating and -freeing any memory required for the user structure. - -You can retrieve the pointer via the function -png_get_user_transform_ptr(). For example: - - voidp read_user_transform_ptr = - png_get_user_transform_ptr(png_ptr); - -The last thing to handle is interlacing; this is covered in detail below, -but you must call the function here if you want libpng to handle expansion -of the interlaced image. - - number_of_passes = png_set_interlace_handling(png_ptr); - -After setting the transformations, libpng can update your png_info -structure to reflect any transformations you've requested with this -call. - - png_read_update_info(png_ptr, info_ptr); - -This is most useful to update the info structure's rowbytes -field so you can use it to allocate your image memory. This function -will also update your palette with the correct screen_gamma and -background if these have been given with the calls above. You may -only call png_read_update_info() once with a particular info_ptr. - -After you call png_read_update_info(), you can allocate any -memory you need to hold the image. The row data is simply -raw byte data for all forms of images. As the actual allocation -varies among applications, no example will be given. If you -are allocating one large chunk, you will need to build an -array of pointers to each row, as it will be needed for some -of the functions below. - -Be sure that your platform can allocate the buffer that you'll need. -libpng internally checks for oversize width, but you'll need to -do your own check for number_of_rows*width*pixel_size if you are using -a multiple-row buffer: - - /* Guard against integer overflow */ - if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size)) { - png_error(png_ptr,"image_data buffer would be too large"); - } - -Remember: Before you call png_read_update_info(), the png_get_*() -functions return the values corresponding to the original PNG image. -After you call png_read_update_info the values refer to the image -that libpng will output. Consequently you must call all the png_set_ -functions before you call png_read_update_info(). This is particularly -important for png_set_interlace_handling() - if you are going to call -png_read_update_info() you must call png_set_interlace_handling() before -it unless you want to receive interlaced output. - -Reading image data - -After you've allocated memory, you can read the image data. -The simplest way to do this is in one function call. If you are -allocating enough memory to hold the whole image, you can just -call png_read_image() and libpng will read in all the image data -and put it in the memory area supplied. You will need to pass in -an array of pointers to each row. - -This function automatically handles interlacing, so you don't -need to call png_set_interlace_handling() (unless you call -png_read_update_info()) or call this function multiple times, or any -of that other stuff necessary with png_read_rows(). - - png_read_image(png_ptr, row_pointers); - -where row_pointers is: - - png_bytep row_pointers[height]; - -You can point to void or char or whatever you use for pixels. - -If you don't want to read in the whole image at once, you can -use png_read_rows() instead. If there is no interlacing (check -interlace_type == PNG_INTERLACE_NONE), this is simple: - - png_read_rows(png_ptr, row_pointers, NULL, - number_of_rows); - -where row_pointers is the same as in the png_read_image() call. - -If you are doing this just one row at a time, you can do this with -a single row_pointer instead of an array of row_pointers: - - png_bytep row_pointer = row; - png_read_row(png_ptr, row_pointer, NULL); - -If the file is interlaced (interlace_type != 0 in the IHDR chunk), things -get somewhat harder. The only current (PNG Specification version 1.2) -interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7); -a somewhat complicated 2D interlace scheme, known as Adam7, that -breaks down an image into seven smaller images of varying size, based -on an 8x8 grid. This number is defined (from libpng 1.5) as -PNG_INTERLACE_ADAM7_PASSES in png.h - -libpng can fill out those images or it can give them to you "as is". -It is almost always better to have libpng handle the interlacing for you. -If you want the images filled out, there are two ways to do that. The one -mentioned in the PNG specification is to expand each pixel to cover -those pixels that have not been read yet (the "rectangle" method). -This results in a blocky image for the first pass, which gradually -smooths out as more pixels are read. The other method is the "sparkle" -method, where pixels are drawn only in their final locations, with the -rest of the image remaining whatever colors they were initialized to -before the start of the read. The first method usually looks better, -but tends to be slower, as there are more pixels to put in the rows. - -If, as is likely, you want libpng to expand the images, call this before -calling png_start_read_image() or png_read_update_info(): - - if (interlace_type == PNG_INTERLACE_ADAM7) - number_of_passes - = png_set_interlace_handling(png_ptr); - -This will return the number of passes needed. Currently, this is seven, -but may change if another interlace type is added. This function can be -called even if the file is not interlaced, where it will return one pass. -You then need to read the whole image 'number_of_passes' times. Each time -will distribute the pixels from the current pass to the correct place in -the output image, so you need to supply the same rows to png_read_rows in -each pass. - -If you are not going to display the image after each pass, but are -going to wait until the entire image is read in, use the sparkle -effect. This effect is faster and the end result of either method -is exactly the same. If you are planning on displaying the image -after each pass, the "rectangle" effect is generally considered the -better looking one. - -If you only want the "sparkle" effect, just call png_read_row() or -png_read_rows() as -normal, with the third parameter NULL. Make sure you make pass over -the image number_of_passes times, and you don't change the data in the -rows between calls. You can change the locations of the data, just -not the data. Each pass only writes the pixels appropriate for that -pass, and assumes the data from previous passes is still valid. - - png_read_rows(png_ptr, row_pointers, NULL, - number_of_rows); - or - png_read_row(png_ptr, row_pointers, NULL); - -If you only want the first effect (the rectangles), do the same as -before except pass the row buffer in the third parameter, and leave -the second parameter NULL. - - png_read_rows(png_ptr, NULL, row_pointers, - number_of_rows); - or - png_read_row(png_ptr, NULL, row_pointers); - -If you don't want libpng to handle the interlacing details, just call -png_read_rows() PNG_INTERLACE_ADAM7_PASSES times to read in all the images. -Each of the images is a valid image by itself; however, you will almost -certainly need to distribute the pixels from each sub-image to the -correct place. This is where everything gets very tricky. - -If you want to retrieve the separate images you must pass the correct -number of rows to each successive call of png_read_rows(). The calculation -gets pretty complicated for small images, where some sub-images may -not even exist because either their width or height ends up zero. -libpng provides two macros to help you in 1.5 and later versions: - - png_uint_32 width = PNG_PASS_COLS(image_width, pass_number); - png_uint_32 height = PNG_PASS_ROWS(image_height, pass_number); - -Respectively these tell you the width and height of the sub-image -corresponding to the numbered pass. 'pass' is in in the range 0 to 6 - -this can be confusing because the specification refers to the same passes -as 1 to 7! Be careful, you must check both the width and height before -calling png_read_rows() and not call it for that pass if either is zero. - -You can, of course, read each sub-image row by row. If you want to -produce optimal code to make a pixel-by-pixel transformation of an -interlaced image this is the best approach; read each row of each pass, -transform it, and write it out to a new interlaced image. - -If you want to de-interlace the image yourself libpng provides further -macros to help that tell you where to place the pixels in the output image. -Because the interlacing scheme is rectangular - sub-image pixels are always -arranged on a rectangular grid - all you need to know for each pass is the -starting column and row in the output image of the first pixel plus the -spacing between each pixel. As of libpng 1.5 there are four macros to -retrieve this information: - - png_uint_32 x = PNG_PASS_START_COL(pass); - png_uint_32 y = PNG_PASS_START_ROW(pass); - png_uint_32 xStep = 1U << PNG_PASS_COL_SHIFT(pass); - png_uint_32 yStep = 1U << PNG_PASS_ROW_SHIFT(pass); - -These allow you to write the obvious loop: - - png_uint_32 input_y = 0; - png_uint_32 output_y = PNG_PASS_START_ROW(pass); - - while (output_y < output_image_height) - { - png_uint_32 input_x = 0; - png_uint_32 output_x = PNG_PASS_START_COL(pass); - - while (output_x < output_image_width) - { - image[output_y][output_x] = - subimage[pass][input_y][input_x++]; - - output_x += xStep; - } - - ++input_y; - output_y += yStep; - } - -Notice that the steps between successive output rows and columns are -returned as shifts. This is possible because the pixels in the subimages -are always a power of 2 apart - 1, 2, 4 or 8 pixels - in the original -image. In practice you may need to directly calculate the output coordinate -given an input coordinate. libpng provides two further macros for this -purpose: - - png_uint_32 output_x = PNG_COL_FROM_PASS_COL(input_x, pass); - png_uint_32 output_y = PNG_ROW_FROM_PASS_ROW(input_y, pass); - -Finally a pair of macros are provided to tell you if a particular image -row or column appears in a given pass: - - int col_in_pass = PNG_COL_IN_INTERLACE_PASS(output_x, pass); - int row_in_pass = PNG_ROW_IN_INTERLACE_PASS(output_y, pass); - -Bear in mind that you will probably also need to check the width and height -of the pass in addition to the above to be sure the pass even exists! - -With any luck you are convinced by now that you don't want to do your own -interlace handling. In reality normally the only good reason for doing this -is if you are processing PNG files on a pixel-by-pixel basis and don't want -to load the whole file into memory when it is interlaced. - -libpng includes a test program, pngvalid, that illustrates reading and -writing of interlaced images. If you can't get interlacing to work in your -code and don't want to leave it to libpng (the recommended approach), see -how pngvalid.c does it. - -Finishing a sequential read - -After you are finished reading the image through the -low-level interface, you can finish reading the file. - -If you want to use a different crc action for handling CRC errors in -chunks after the image data, you can call png_set_crc_action() -again at this point. - -If you are interested in comments or time, which may be stored either -before or after the image data, you should pass the separate png_info -struct if you want to keep the comments from before and after the image -separate. - - png_infop end_info = png_create_info_struct(png_ptr); - - if (!end_info) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return ERROR; - } - - png_read_end(png_ptr, end_info); - -If you are not interested, you should still call png_read_end() -but you can pass NULL, avoiding the need to create an end_info structure. -If you do this, libpng will not process any chunks after IDAT other than -skipping over them and perhaps (depending on whether you have called -png_set_crc_action) checking their CRCs while looking for the IEND chunk. - - png_read_end(png_ptr, (png_infop)NULL); - -If you don't call png_read_end(), then your file pointer will be -left pointing to the first chunk after the last IDAT, which is probably -not what you want if you expect to read something beyond the end of -the PNG datastream. - -When you are done, you can free all memory allocated by libpng like this: - - png_destroy_read_struct(&png_ptr, &info_ptr, - &end_info); - -or, if you didn't create an end_info structure, - - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - -It is also possible to individually free the info_ptr members that -point to libpng-allocated storage with the following function: - - png_free_data(png_ptr, info_ptr, mask, seq) - - mask - identifies data to be freed, a mask - containing the bitwise OR of one or - more of - PNG_FREE_PLTE, PNG_FREE_TRNS, - PNG_FREE_HIST, PNG_FREE_ICCP, - PNG_FREE_PCAL, PNG_FREE_ROWS, - PNG_FREE_SCAL, PNG_FREE_SPLT, - PNG_FREE_TEXT, PNG_FREE_UNKN, - or simply PNG_FREE_ALL - - seq - sequence number of item to be freed - (-1 for all items) - -This function may be safely called when the relevant storage has -already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those cases do nothing. -The "seq" parameter is ignored if only one item of the selected data -type, such as PLTE, is allowed. If "seq" is not -1, and multiple items -are allowed for the data type identified in the mask, such as text or -sPLT, only the n'th item in the structure is freed, where n is "seq". - -The default behavior is only to free data that was allocated internally -by libpng. This can be changed, so that libpng will not free the data, -or so that it will free data that was allocated by the user with png_malloc() -or png_calloc() and passed in via a png_set_*() function, with - - png_data_freer(png_ptr, info_ptr, freer, mask) - - freer - one of - PNG_DESTROY_WILL_FREE_DATA - PNG_SET_WILL_FREE_DATA - PNG_USER_WILL_FREE_DATA - - mask - which data elements are affected - same choices as in png_free_data() - -This function only affects data that has already been allocated. -You can call this function after reading the PNG data but before calling -any png_set_*() functions, to control whether the user or the png_set_*() -function is responsible for freeing any existing data that might be present, -and again after the png_set_*() functions to control whether the user -or png_destroy_*() is supposed to free the data. When the user assumes -responsibility for libpng-allocated data, the application must use -png_free() to free it, and when the user transfers responsibility to libpng -for data that the user has allocated, the user must have used png_malloc() -or png_calloc() to allocate it. - -If you allocated your row_pointers in a single block, as suggested above in -the description of the high level read interface, you must not transfer -responsibility for freeing it to the png_set_rows or png_read_destroy function, -because they would also try to free the individual row_pointers[i]. - -If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword -separately, do not transfer responsibility for freeing text_ptr to libpng, -because when libpng fills a png_text structure it combines these members with -the key member, and png_free_data() will free only text_ptr.key. Similarly, -if you transfer responsibility for free'ing text_ptr from libpng to your -application, your application must not separately free those members. - -The png_free_data() function will turn off the "valid" flag for anything -it frees. If you need to turn the flag off for a chunk that was freed by -your application instead of by libpng, you can use - - png_set_invalid(png_ptr, info_ptr, mask); - - mask - identifies the chunks to be made invalid, - containing the bitwise OR of one or - more of - PNG_INFO_gAMA, PNG_INFO_sBIT, - PNG_INFO_cHRM, PNG_INFO_PLTE, - PNG_INFO_tRNS, PNG_INFO_bKGD, - PNG_INFO_eXIf, - PNG_INFO_hIST, PNG_INFO_pHYs, - PNG_INFO_oFFs, PNG_INFO_tIME, - PNG_INFO_pCAL, PNG_INFO_sRGB, - PNG_INFO_iCCP, PNG_INFO_sPLT, - PNG_INFO_sCAL, PNG_INFO_IDAT - -For a more compact example of reading a PNG image, see the file example.c. - -Reading PNG files progressively - -The progressive reader is slightly different from the non-progressive -reader. Instead of calling png_read_info(), png_read_rows(), and -png_read_end(), you make one call to png_process_data(), which calls -callbacks when it has the info, a row, or the end of the image. You -set up these callbacks with png_set_progressive_read_fn(). You don't -have to worry about the input/output functions of libpng, as you are -giving the library the data directly in png_process_data(). I will -assume that you have read the section on reading PNG files above, -so I will only highlight the differences (although I will show -all of the code). - -png_structp png_ptr; -png_infop info_ptr; - - /* An example code fragment of how you would - initialize the progressive reader in your - application. */ - int - initialize_png_reader() - { - png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - - if (!png_ptr) - return ERROR; - - info_ptr = png_create_info_struct(png_ptr); - - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, - (png_infopp)NULL, (png_infopp)NULL); - return ERROR; - } - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return ERROR; - } - - /* This one's new. You can provide functions - to be called when the header info is valid, - when each row is completed, and when the image - is finished. If you aren't using all functions, - you can specify NULL parameters. Even when all - three functions are NULL, you need to call - png_set_progressive_read_fn(). You can use - any struct as the user_ptr (cast to a void pointer - for the function call), and retrieve the pointer - from inside the callbacks using the function - - png_get_progressive_ptr(png_ptr); - - which will return a void pointer, which you have - to cast appropriately. - */ - png_set_progressive_read_fn(png_ptr, (void *)user_ptr, - info_callback, row_callback, end_callback); - - return 0; - } - - /* A code fragment that you call as you receive blocks - of data */ - int - process_data(png_bytep buffer, png_uint_32 length) - { - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return ERROR; - } - - /* This one's new also. Simply give it a chunk - of data from the file stream (in order, of - course). On machines with segmented memory - models machines, don't give it any more than - 64K. The library seems to run fine with sizes - of 4K. Although you can give it much less if - necessary (I assume you can give it chunks of - 1 byte, I haven't tried less than 256 bytes - yet). When this function returns, you may - want to display any rows that were generated - in the row callback if you don't already do - so there. - */ - png_process_data(png_ptr, info_ptr, buffer, length); - - /* At this point you can call png_process_data_skip if - you want to handle data the library will skip yourself; - it simply returns the number of bytes to skip (and stops - libpng skipping that number of bytes on the next - png_process_data call). - return 0; - } - - /* This function is called (as set by - png_set_progressive_read_fn() above) when enough data - has been supplied so all of the header has been - read. - */ - void - info_callback(png_structp png_ptr, png_infop info) - { - /* Do any setup here, including setting any of - the transformations mentioned in the Reading - PNG files section. For now, you _must_ call - either png_start_read_image() or - png_read_update_info() after all the - transformations are set (even if you don't set - any). You may start getting rows before - png_process_data() returns, so this is your - last chance to prepare for that. - - This is where you turn on interlace handling, - assuming you don't want to do it yourself. - - If you need to you can stop the processing of - your original input data at this point by calling - png_process_data_pause. This returns the number - of unprocessed bytes from the last png_process_data - call - it is up to you to ensure that the next call - sees these bytes again. If you don't want to bother - with this you can get libpng to cache the unread - bytes by setting the 'save' parameter (see png.h) but - then libpng will have to copy the data internally. - */ - } - - /* This function is called when each row of image - data is complete */ - void - row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass) - { - /* If the image is interlaced, and you turned - on the interlace handler, this function will - be called for every row in every pass. Some - of these rows will not be changed from the - previous pass. When the row is not changed, - the new_row variable will be NULL. The rows - and passes are called in order, so you don't - really need the row_num and pass, but I'm - supplying them because it may make your life - easier. - - If you did not turn on interlace handling then - the callback is called for each row of each - sub-image when the image is interlaced. In this - case 'row_num' is the row in the sub-image, not - the row in the output image as it is in all other - cases. - - For the non-NULL rows of interlaced images when - you have switched on libpng interlace handling, - you must call png_progressive_combine_row() - passing in the row and the old row. You can - call this function for NULL rows (it will just - return) and for non-interlaced images (it just - does the memcpy for you) if it will make the - code easier. Thus, you can just do this for - all cases if you switch on interlace handling; - */ - - png_progressive_combine_row(png_ptr, old_row, - new_row); - - /* where old_row is what was displayed - previously for the row. Note that the first - pass (pass == 0, really) will completely cover - the old row, so the rows do not have to be - initialized. After the first pass (and only - for interlaced images), you will have to pass - the current row, and the function will combine - the old row and the new row. - - You can also call png_process_data_pause in this - callback - see above. - */ - } - - void - end_callback(png_structp png_ptr, png_infop info) - { - /* This function is called after the whole image - has been read, including any chunks after the - image (up to and including the IEND). You - will usually have the same info chunk as you - had in the header, although some data may have - been added to the comments and time fields. - - Most people won't do much here, perhaps setting - a flag that marks the image as finished. - */ - } - - - -IV. Writing - -Much of this is very similar to reading. However, everything of -importance is repeated here, so you won't have to constantly look -back up in the reading section to understand writing. - -Setup - -You will want to do the I/O initialization before you get into libpng, -so if it doesn't work, you don't have anything to undo. If you are not -using the standard I/O functions, you will need to replace them with -custom writing functions. See the discussion under Customizing libpng. - - FILE *fp = fopen(file_name, "wb"); - - if (!fp) - return ERROR; - -Next, png_struct and png_info need to be allocated and initialized. -As these can be both relatively large, you may not want to store these -on the stack, unless you have stack space to spare. Of course, you -will want to check if they return NULL. If you are also reading, -you won't want to name your read structure and your write structure -both "png_ptr"; you can call them anything you like, such as -"read_ptr" and "write_ptr". Look at pngtest.c, for example. - - png_structp png_ptr = png_create_write_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - - if (!png_ptr) - return ERROR; - - png_infop info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_write_struct(&png_ptr, - (png_infopp)NULL); - return ERROR; - } - -If you want to use your own memory allocation routines, -define PNG_USER_MEM_SUPPORTED and use -png_create_write_struct_2() instead of png_create_write_struct(): - - png_structp png_ptr = png_create_write_struct_2 - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn, (png_voidp) - user_mem_ptr, user_malloc_fn, user_free_fn); - -After you have these structures, you will need to set up the -error handling. When libpng encounters an error, it expects to -longjmp() back to your routine. Therefore, you will need to call -setjmp() and pass the png_jmpbuf(png_ptr). If you -write the file from different routines, you will need to update -the png_jmpbuf(png_ptr) every time you enter a new routine that will -call a png_*() function. See your documentation of setjmp/longjmp -for your compiler for more information on setjmp/longjmp. See -the discussion on libpng error handling in the Customizing Libpng -section below for more information on the libpng error handling. - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_write_struct(&png_ptr, &info_ptr); - fclose(fp); - return ERROR; - } - ... - return; - -If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_NO_SETJMP, in which case -errors will result in a call to PNG_ABORT() which defaults to abort(). - -You can #define PNG_ABORT() to a function that does something -more useful than abort(), as long as your function does not -return. - -Checking for invalid palette index on write was added at libpng -1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues -a benign error. This is enabled by default because this condition is an -error according to the PNG specification, Clause 11.3.2, but the error can -be ignored in each png_ptr with - - png_set_check_for_invalid_index(png_ptr, 0); - -If the error is ignored, or if png_benign_error() treats it as a warning, -any invalid pixels are written as-is by the encoder, resulting in an -invalid PNG datastream as output. In this case the application is -responsible for ensuring that the pixel indexes are in range when it writes -a PLTE chunk with fewer entries than the bit depth would allow. - -Now you need to set up the output code. The default for libpng is to -use the C function fwrite(). If you use this, you will need to pass a -valid FILE * in the function png_init_io(). Be sure that the file is -opened in binary mode. Again, if you wish to handle writing data in -another way, see the discussion on libpng I/O handling in the Customizing -Libpng section below. - - png_init_io(png_ptr, fp); - -If you are embedding your PNG into a datastream such as MNG, and don't -want libpng to write the 8-byte signature, or if you have already -written the signature in your application, use - - png_set_sig_bytes(png_ptr, 8); - -to inform libpng that it should not write a signature. - -Write callbacks - -At this point, you can set up a callback function that will be -called after each row has been written, which you can use to control -a progress meter or the like. It's demonstrated in pngtest.c. -You must supply a function - - void write_row_callback(png_structp png_ptr, png_uint_32 row, - int pass); - { - /* put your code here */ - } - -(You can give it another name that you like instead of "write_row_callback") - -To inform libpng about your function, use - - png_set_write_status_fn(png_ptr, write_row_callback); - -When this function is called the row has already been completely processed and -it has also been written out. The 'row' and 'pass' refer to the next row to be -handled. For the -non-interlaced case the row that was just handled is simply one less than the -passed in row number, and pass will always be 0. For the interlaced case the -same applies unless the row value is 0, in which case the row just handled was -the last one from one of the preceding passes. Because interlacing may skip a -pass you cannot be sure that the preceding pass is just 'pass-1', if you really -need to know what the last pass is record (row,pass) from the callback and use -the last recorded value each time. - -As with the user transform you can find the output row using the -PNG_ROW_FROM_PASS_ROW macro. - -You now have the option of modifying how the compression library will -run. The following functions are mainly for testing, but may be useful -in some cases, like if you need to write PNG files extremely fast and -are willing to give up some compression, or if you want to get the -maximum possible compression at the expense of slower writing. If you -have no special needs in this area, let the library do what it wants by -not calling this function at all, as it has been tuned to deliver a good -speed/compression ratio. The second parameter to png_set_filter() is -the filter method, for which the only valid values are 0 (as of the -July 1999 PNG specification, version 1.2) or 64 (if you are writing -a PNG datastream that is to be embedded in a MNG datastream). The third -parameter is a flag that indicates which filter type(s) are to be tested -for each scanline. See the PNG specification for details on the specific -filter types. - - - /* turn on or off filtering, and/or choose - specific filters. You can use either a single - PNG_FILTER_VALUE_NAME or the bitwise OR of one - or more PNG_FILTER_NAME masks. - */ - png_set_filter(png_ptr, 0, - PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | - PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | - PNG_FILTER_UP | PNG_FILTER_VALUE_UP | - PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | - PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| - PNG_ALL_FILTERS | PNG_FAST_FILTERS); - -If an application wants to start and stop using particular filters during -compression, it should start out with all of the filters (to ensure that -the previous row of pixels will be stored in case it's needed later), -and then add and remove them after the start of compression. - -If you are writing a PNG datastream that is to be embedded in a MNG -datastream, the second parameter can be either 0 or 64. - -The png_set_compression_*() functions interface to the zlib compression -library, and should mostly be ignored unless you really know what you are -doing. The only generally useful call is png_set_compression_level() -which changes how much time zlib spends on trying to compress the image -data. See the Compression Library (zlib.h and algorithm.txt, distributed -with zlib) for details on the compression levels. - - #include zlib.h - - /* Set the zlib compression level */ - png_set_compression_level(png_ptr, - Z_BEST_COMPRESSION); - - /* Set other zlib parameters for compressing IDAT */ - png_set_compression_mem_level(png_ptr, 8); - png_set_compression_strategy(png_ptr, - Z_DEFAULT_STRATEGY); - png_set_compression_window_bits(png_ptr, 15); - png_set_compression_method(png_ptr, 8); - png_set_compression_buffer_size(png_ptr, 8192) - - /* Set zlib parameters for text compression - * If you don't call these, the parameters - * fall back on those defined for IDAT chunks - */ - png_set_text_compression_mem_level(png_ptr, 8); - png_set_text_compression_strategy(png_ptr, - Z_DEFAULT_STRATEGY); - png_set_text_compression_window_bits(png_ptr, 15); - png_set_text_compression_method(png_ptr, 8); - -Setting the contents of info for output - -You now need to fill in the png_info structure with all the data you -wish to write before the actual image. Note that the only thing you -are allowed to write after the image is the text chunks and the time -chunk (as of PNG Specification 1.2, anyway). See png_write_end() and -the latest PNG specification for more information on that. If you -wish to write them before the image, fill them in now, and flag that -data as being valid. If you want to wait until after the data, don't -fill them until png_write_end(). For all the fields in png_info and -their data types, see png.h. For explanations of what the fields -contain, see the PNG specification. - -Some of the more important parts of the png_info are: - - png_set_IHDR(png_ptr, info_ptr, width, height, - bit_depth, color_type, interlace_type, - compression_type, filter_method) - - width - holds the width of the image - in pixels (up to 2^31). - - height - holds the height of the image - in pixels (up to 2^31). - - bit_depth - holds the bit depth of one of the - image channels. - (valid values are 1, 2, 4, 8, 16 - and depend also on the - color_type. See also significant - bits (sBIT) below). - - color_type - describes which color/alpha - channels are present. - PNG_COLOR_TYPE_GRAY - (bit depths 1, 2, 4, 8, 16) - PNG_COLOR_TYPE_GRAY_ALPHA - (bit depths 8, 16) - PNG_COLOR_TYPE_PALETTE - (bit depths 1, 2, 4, 8) - PNG_COLOR_TYPE_RGB - (bit_depths 8, 16) - PNG_COLOR_TYPE_RGB_ALPHA - (bit_depths 8, 16) - - PNG_COLOR_MASK_PALETTE - PNG_COLOR_MASK_COLOR - PNG_COLOR_MASK_ALPHA - - interlace_type - PNG_INTERLACE_NONE or - PNG_INTERLACE_ADAM7 - - compression_type - (must be - PNG_COMPRESSION_TYPE_DEFAULT) - - filter_method - (must be PNG_FILTER_TYPE_DEFAULT - or, if you are writing a PNG to - be embedded in a MNG datastream, - can also be - PNG_INTRAPIXEL_DIFFERENCING) - -If you call png_set_IHDR(), the call must appear before any of the -other png_set_*() functions, because they might require access to some of -the IHDR settings. The remaining png_set_*() functions can be called -in any order. - -If you wish, you can reset the compression_type, interlace_type, or -filter_method later by calling png_set_IHDR() again; if you do this, the -width, height, bit_depth, and color_type must be the same in each call. - - png_set_PLTE(png_ptr, info_ptr, palette, - num_palette); - - palette - the palette for the file - (array of png_color) - num_palette - number of entries in the palette - - - png_set_gAMA(png_ptr, info_ptr, file_gamma); - png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma); - - file_gamma - the gamma at which the image was - created (PNG_INFO_gAMA) - - int_file_gamma - 100,000 times the gamma at which - the image was created - - png_set_cHRM(png_ptr, info_ptr, white_x, white_y, red_x, red_y, - green_x, green_y, blue_x, blue_y) - png_set_cHRM_XYZ(png_ptr, info_ptr, red_X, red_Y, red_Z, green_X, - green_Y, green_Z, blue_X, blue_Y, blue_Z) - png_set_cHRM_fixed(png_ptr, info_ptr, int_white_x, int_white_y, - int_red_x, int_red_y, int_green_x, int_green_y, - int_blue_x, int_blue_y) - png_set_cHRM_XYZ_fixed(png_ptr, info_ptr, int_red_X, int_red_Y, - int_red_Z, int_green_X, int_green_Y, int_green_Z, - int_blue_X, int_blue_Y, int_blue_Z) - - {white,red,green,blue}_{x,y} - A color space encoding specified using the chromaticities - of the end points and the white point. - - {red,green,blue}_{X,Y,Z} - A color space encoding specified using the encoding end - points - the CIE tristimulus specification of the intended - color of the red, green and blue channels in the PNG RGB - data. The white point is simply the sum of the three end - points. - - png_set_sRGB(png_ptr, info_ptr, srgb_intent); - - srgb_intent - the rendering intent - (PNG_INFO_sRGB) The presence of - the sRGB chunk means that the pixel - data is in the sRGB color space. - This chunk also implies specific - values of gAMA and cHRM. Rendering - intent is the CSS-1 property that - has been defined by the International - Color Consortium - (http://www.color.org). - It can be one of - PNG_sRGB_INTENT_SATURATION, - PNG_sRGB_INTENT_PERCEPTUAL, - PNG_sRGB_INTENT_ABSOLUTE, or - PNG_sRGB_INTENT_RELATIVE. - - - png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, - srgb_intent); - - srgb_intent - the rendering intent - (PNG_INFO_sRGB) The presence of the - sRGB chunk means that the pixel - data is in the sRGB color space. - This function also causes gAMA and - cHRM chunks with the specific values - that are consistent with sRGB to be - written. - - png_set_iCCP(png_ptr, info_ptr, name, compression_type, - profile, proflen); - - name - The profile name. - - compression_type - The compression type; always - PNG_COMPRESSION_TYPE_BASE for PNG 1.0. - You may give NULL to this argument to - ignore it. - - profile - International Color Consortium color - profile data. May contain NULs. - - proflen - length of profile data in bytes. - - png_set_sBIT(png_ptr, info_ptr, sig_bit); - - sig_bit - the number of significant bits for - (PNG_INFO_sBIT) each of the gray, red, - green, and blue channels, whichever are - appropriate for the given color type - (png_color_16) - - png_set_tRNS(png_ptr, info_ptr, trans_alpha, - num_trans, trans_color); - - trans_alpha - array of alpha (transparency) - entries for palette (PNG_INFO_tRNS) - - num_trans - number of transparent entries - (PNG_INFO_tRNS) - - trans_color - graylevel or color sample values - (in order red, green, blue) of the - single transparent color for - non-paletted images (PNG_INFO_tRNS) - - png_set_eXIf_1(png_ptr, info_ptr, num_exif, exif); - - exif - Exif profile (array of - png_byte) (PNG_INFO_eXIf) - - png_set_hIST(png_ptr, info_ptr, hist); - - hist - histogram of palette (array of - png_uint_16) (PNG_INFO_hIST) - - png_set_tIME(png_ptr, info_ptr, mod_time); - - mod_time - time image was last modified - (PNG_VALID_tIME) - - png_set_bKGD(png_ptr, info_ptr, background); - - background - background color (of type - png_color_16p) (PNG_VALID_bKGD) - - png_set_text(png_ptr, info_ptr, text_ptr, num_text); - - text_ptr - array of png_text holding image - comments - - text_ptr[i].compression - type of compression used - on "text" PNG_TEXT_COMPRESSION_NONE - PNG_TEXT_COMPRESSION_zTXt - PNG_ITXT_COMPRESSION_NONE - PNG_ITXT_COMPRESSION_zTXt - text_ptr[i].key - keyword for comment. Must contain - 1-79 characters. - text_ptr[i].text - text comments for current - keyword. Can be NULL or empty. - text_ptr[i].text_length - length of text string, - after decompression, 0 for iTXt - text_ptr[i].itxt_length - length of itxt string, - after decompression, 0 for tEXt/zTXt - text_ptr[i].lang - language of comment (NULL or - empty for unknown). - text_ptr[i].translated_keyword - keyword in UTF-8 (NULL - or empty for unknown). - - Note that the itxt_length, lang, and lang_key - members of the text_ptr 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, - they contain NULL pointers when the "compression" - field contains PNG_TEXT_COMPRESSION_NONE or - PNG_TEXT_COMPRESSION_zTXt. - - num_text - number of comments - - png_set_sPLT(png_ptr, info_ptr, &palette_ptr, - num_spalettes); - - palette_ptr - array of png_sPLT_struct structures - to be added to the list of palettes - in the info structure. - num_spalettes - number of palette structures to be - added. - - png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, - unit_type); - - offset_x - positive offset from the left - edge of the screen - - offset_y - positive offset from the top - edge of the screen - - unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER - - png_set_pHYs(png_ptr, info_ptr, res_x, res_y, - unit_type); - - res_x - pixels/unit physical resolution - in x direction - - res_y - pixels/unit physical resolution - in y direction - - unit_type - PNG_RESOLUTION_UNKNOWN, - PNG_RESOLUTION_METER - - png_set_sCAL(png_ptr, info_ptr, unit, width, height) - - unit - physical scale units (an integer) - - width - width of a pixel in physical scale units - - height - height of a pixel in physical scale units - (width and height are doubles) - - png_set_sCAL_s(png_ptr, info_ptr, unit, width, height) - - unit - physical scale units (an integer) - - width - width of a pixel in physical scale units - expressed as a string - - height - height of a pixel in physical scale units - (width and height are strings like "2.54") - - png_set_unknown_chunks(png_ptr, info_ptr, &unknowns, - num_unknowns) - - unknowns - array of png_unknown_chunk - structures holding unknown chunks - unknowns[i].name - name of unknown chunk - unknowns[i].data - data of unknown chunk - unknowns[i].size - size of unknown chunk's data - unknowns[i].location - position to write chunk in file - 0: do not write chunk - PNG_HAVE_IHDR: before PLTE - PNG_HAVE_PLTE: before IDAT - PNG_AFTER_IDAT: after IDAT - -The "location" member is set automatically according to -what part of the output file has already been written. -You can change its value after calling png_set_unknown_chunks() -as demonstrated in pngtest.c. Within each of the "locations", -the chunks are sequenced according to their position in the -structure (that is, the value of "i", which is the order in which -the chunk was either read from the input file or defined with -png_set_unknown_chunks). - -A quick word about text and num_text. text is an array of png_text -structures. num_text is the number of valid structures in the array. -Each png_text structure holds a language code, a keyword, a text value, -and a compression type. - -The compression types have the same valid numbers as the compression -types of the image data. Currently, the only valid number is zero. -However, you can store text either compressed or uncompressed, unlike -images, which always have to be compressed. So if you don't want the -text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE. -Because tEXt and zTXt chunks don't have a language field, if you -specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt -any language code or translated keyword will not be written out. - -Until text gets around a few hundred bytes, it is not worth compressing it. -After the text has been written out to the file, the compression type -is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR, -so that it isn't written out again at the end (in case you are calling -png_write_end() with the same struct). - -The keywords that are given in the PNG Specification are: - - Title Short (one line) title or - caption for image - - Author Name of image's creator - - Description Description of image (possibly long) - - Copyright Copyright notice - - Creation Time Time of original image creation - (usually RFC 1123 format, see below) - - Software Software used to create the image - - Disclaimer Legal disclaimer - - Warning Warning of nature of content - - Source Device used to create the image - - Comment Miscellaneous comment; conversion - from other image format - -The keyword-text pairs work like this. Keywords should be short -simple descriptions of what the comment is about. Some typical -keywords are found in the PNG specification, as is some recommendations -on keywords. You can repeat keywords in a file. You can even write -some text before the image and some after. For example, you may want -to put a description of the image before the image, but leave the -disclaimer until after, so viewers working over modem connections -don't have to wait for the disclaimer to go over the modem before -they start seeing the image. Finally, keywords should be full -words, not abbreviations. Keywords and text are in the ISO 8859-1 -(Latin-1) character set (a superset of regular ASCII) and can not -contain NUL characters, and should not contain control or other -unprintable characters. To make the comments widely readable, stick -with basic ASCII, and avoid machine specific character set extensions -like the IBM-PC character set. The keyword must be present, but -you can leave off the text string on non-compressed pairs. -Compressed pairs must have a text string, as only the text string -is compressed anyway, so the compression would be meaningless. - -PNG supports modification time via the png_time structure. Two -conversion routines are provided, png_convert_from_time_t() for -time_t and png_convert_from_struct_tm() for struct tm. The -time_t routine uses gmtime(). You don't have to use either of -these, but if you wish to fill in the png_time structure directly, -you should provide the time in universal time (GMT) if possible -instead of your local time. Note that the year number is the full -year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and -that months start with 1. - -If you want to store the time of the original image creation, you should -use a plain tEXt chunk with the "Creation Time" keyword. This is -necessary because the "creation time" of a PNG image is somewhat vague, -depending on whether you mean the PNG file, the time the image was -created in a non-PNG format, a still photo from which the image was -scanned, or possibly the subject matter itself. In order to facilitate -machine-readable dates, it is recommended that the "Creation Time" -tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"), -although this isn't a requirement. Unlike the tIME chunk, the -"Creation Time" tEXt chunk is not expected to be automatically changed -by the software. To facilitate the use of RFC 1123 dates, a function -png_convert_to_rfc1123_buffer(buffer, png_timep) is provided to -convert from PNG time to an RFC 1123 format string. The caller must provide -a writeable buffer of at least 29 bytes. - -Writing unknown chunks - -You can use the png_set_unknown_chunks function to queue up private chunks -for writing. You give it a chunk name, location, raw data, and a size. You -also must use png_set_keep_unknown_chunks() to ensure that libpng will -handle them. That's all there is to it. The chunks will be written by the -next following png_write_info_before_PLTE, png_write_info, or png_write_end -function, depending upon the specified location. Any chunks previously -read into the info structure's unknown-chunk list will also be written out -in a sequence that satisfies the PNG specification's ordering rules. - -Here is an example of writing two private chunks, prVt and miNE: - - #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED - /* Set unknown chunk data */ - png_unknown_chunk unk_chunk[2]; - strcpy((char *) unk_chunk[0].name, "prVt"; - unk_chunk[0].data = (unsigned char *) "PRIVATE DATA"; - unk_chunk[0].size = strlen(unk_chunk[0].data)+1; - unk_chunk[0].location = PNG_HAVE_IHDR; - strcpy((char *) unk_chunk[1].name, "miNE"; - unk_chunk[1].data = (unsigned char *) "MY CHUNK DATA"; - unk_chunk[1].size = strlen(unk_chunk[0].data)+1; - unk_chunk[1].location = PNG_AFTER_IDAT; - png_set_unknown_chunks(write_ptr, write_info_ptr, - unk_chunk, 2); - /* Needed because miNE is not safe-to-copy */ - png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS, - (png_bytep) "miNE", 1); - # if PNG_LIBPNG_VER < 10600 - /* Deal with unknown chunk location bug in 1.5.x and earlier */ - png_set_unknown_chunk_location(png, info, 0, PNG_HAVE_IHDR); - png_set_unknown_chunk_location(png, info, 1, PNG_AFTER_IDAT); - # endif - # if PNG_LIBPNG_VER < 10500 - /* PNG_AFTER_IDAT writes two copies of the chunk prior to libpng-1.5.0, - * one before IDAT and another after IDAT, so don't use it; only use - * PNG_HAVE_IHDR location. This call resets the location previously - * set by assignment and png_set_unknown_chunk_location() for chunk 1. - */ - png_set_unknown_chunk_location(png, info, 1, PNG_HAVE_IHDR); - # endif - #endif - -The high-level write interface - -At this point there are two ways to proceed; through the high-level -write interface, or through a sequence of low-level write operations. -You can use the high-level interface if your image data is present -in the info structure. All defined output -transformations are permitted, enabled by the following masks. - - PNG_TRANSFORM_IDENTITY No transformation - PNG_TRANSFORM_PACKING Pack 1, 2 and 4-bit samples - PNG_TRANSFORM_PACKSWAP Change order of packed - pixels to LSB first - PNG_TRANSFORM_INVERT_MONO Invert monochrome images - PNG_TRANSFORM_SHIFT Normalize pixels to the - sBIT depth - PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA - to BGRA - PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA - to AG - PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity - to transparency - PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples - PNG_TRANSFORM_STRIP_FILLER Strip out filler - bytes (deprecated). - PNG_TRANSFORM_STRIP_FILLER_BEFORE Strip out leading - filler bytes - PNG_TRANSFORM_STRIP_FILLER_AFTER Strip out trailing - filler bytes - -If you have valid image data in the info structure (you can use -png_set_rows() to put image data in the info structure), simply do this: - - png_write_png(png_ptr, info_ptr, png_transforms, NULL) - -where png_transforms is an integer containing the bitwise OR of some set of -transformation flags. This call is equivalent to png_write_info(), -followed the set of transformations indicated by the transform mask, -then png_write_image(), and finally png_write_end(). - -(The final parameter of this call is not yet used. Someday it might point -to transformation parameters required by some future output transform.) - -You must use png_transforms and not call any png_set_transform() functions -when you use png_write_png(). - -The low-level write interface - -If you are going the low-level route instead, you are now ready to -write all the file information up to the actual image data. You do -this with a call to png_write_info(). - - png_write_info(png_ptr, info_ptr); - -Note that there is one transformation you may need to do before -png_write_info(). In PNG files, the alpha channel in an image is the -level of opacity. If your data is supplied as a level of transparency, -you can invert the alpha channel before you write it, so that 0 is -fully transparent and 255 (in 8-bit or paletted images) or 65535 -(in 16-bit images) is fully opaque, with - - png_set_invert_alpha(png_ptr); - -This must appear before png_write_info() instead of later with the -other transformations because in the case of paletted images the tRNS -chunk data has to be inverted before the tRNS chunk is written. If -your image is not a paletted image, the tRNS data (which in such cases -represents a single color to be rendered as transparent) won't need to -be changed, and you can safely do this transformation after your -png_write_info() call. - -If you need to write a private chunk that you want to appear before -the PLTE chunk when PLTE is present, you can write the PNG info in -two steps, and insert code to write your own chunk between them: - - png_write_info_before_PLTE(png_ptr, info_ptr); - png_set_unknown_chunks(png_ptr, info_ptr, ...); - png_write_info(png_ptr, info_ptr); - -After you've written the file information, you can set up the library -to handle any special transformations of the image data. The various -ways to transform the data will be described in the order that they -should occur. This is important, as some of these change the color -type and/or bit depth of the data, and some others only work on -certain color types and bit depths. Even though each transformation -checks to see if it has data that it can do something with, you should -make sure to only enable a transformation if it will be valid for the -data. For example, don't swap red and blue on grayscale data. - -PNG files store RGB pixels packed into 3 or 6 bytes. This code tells -the library to strip input data that has 4 or 8 bytes per pixel down -to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2 -bytes per pixel). - - png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); - -where the 0 is unused, and the location is either PNG_FILLER_BEFORE or -PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel -is stored XRGB or RGBX. - -PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as -they can, resulting in, for example, 8 pixels per byte for 1 bit files. -If the data is supplied at 1 pixel per byte, use this code, which will -correctly pack the pixels into a single byte: - - png_set_packing(png_ptr); - -PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your -data is of another bit depth, you can write an sBIT chunk into the -file so that decoders can recover the original data if desired. - - /* Set the true bit depth of the image data */ - if (color_type & PNG_COLOR_MASK_COLOR) - { - sig_bit.red = true_bit_depth; - sig_bit.green = true_bit_depth; - sig_bit.blue = true_bit_depth; - } - - else - { - sig_bit.gray = true_bit_depth; - } - - if (color_type & PNG_COLOR_MASK_ALPHA) - { - sig_bit.alpha = true_bit_depth; - } - - png_set_sBIT(png_ptr, info_ptr, &sig_bit); - -If the data is stored in the row buffer in a bit depth other than -one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG), -this will scale the values to appear to be the correct bit depth as -is required by PNG. - - png_set_shift(png_ptr, &sig_bit); - -PNG files store 16-bit pixels in network byte order (big-endian, -ie. most significant bits first). This code would be used if they are -supplied the other way (little-endian, i.e. least significant bits -first, the way PCs store them): - - if (bit_depth > 8) - png_set_swap(png_ptr); - -If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you -need to change the order the pixels are packed into bytes, you can use: - - if (bit_depth < 8) - png_set_packswap(png_ptr); - -PNG files store 3 color pixels in red, green, blue order. This code -would be used if they are supplied as blue, green, red: - - png_set_bgr(png_ptr); - -PNG files describe monochrome as black being zero and white being -one. This code would be used if the pixels are supplied with this reversed -(black being one and white being zero): - - png_set_invert_mono(png_ptr); - -Finally, you can write your own transformation function if none of -the existing ones meets your needs. This is done by setting a callback -with - - png_set_write_user_transform_fn(png_ptr, - write_transform_fn); - -You must supply the function - - void write_transform_fn(png_structp png_ptr, png_row_infop - row_info, png_bytep data) - -See pngtest.c for a working example. Your function will be called -before any of the other transformations are processed. If supported -libpng also supplies an information routine that may be called from -your callback: - - png_get_current_row_number(png_ptr); - png_get_current_pass_number(png_ptr); - -This returns the current row passed to the transform. With interlaced -images the value returned is the row in the input sub-image image. 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). - -The discussion of interlace handling above contains more information on how to -use these values. - -You can also set up a pointer to a user structure for use by your -callback function. - - png_set_user_transform_info(png_ptr, user_ptr, 0, 0); - -The user_channels and user_depth parameters of this function are ignored -when writing; you can set them to zero as shown. - -You can retrieve the pointer via the function png_get_user_transform_ptr(). -For example: - - voidp write_user_transform_ptr = - png_get_user_transform_ptr(png_ptr); - -It is possible to have libpng flush any pending output, either manually, -or automatically after a certain number of lines have been written. To -flush the output stream a single time call: - - png_write_flush(png_ptr); - -and to have libpng flush the output stream periodically after a certain -number of scanlines have been written, call: - - png_set_flush(png_ptr, nrows); - -Note that the distance between rows is from the last time png_write_flush() -was called, or the first row of the image if it has never been called. -So if you write 50 lines, and then png_set_flush 25, it will flush the -output on the next scanline, and every 25 lines thereafter, unless -png_write_flush() is called before 25 more lines have been written. -If nrows is too small (less than about 10 lines for a 640 pixel wide -RGB image) the image compression may decrease noticeably (although this -may be acceptable for real-time applications). Infrequent flushing will -only degrade the compression performance by a few percent over images -that do not use flushing. - -Writing the image data - -That's it for the transformations. Now you can write the image data. -The simplest way to do this is in one function call. If you have the -whole image in memory, you can just call png_write_image() and libpng -will write the image. You will need to pass in an array of pointers to -each row. This function automatically handles interlacing, so you don't -need to call png_set_interlace_handling() or call this function multiple -times, or any of that other stuff necessary with png_write_rows(). - - png_write_image(png_ptr, row_pointers); - -where row_pointers is: - - png_byte *row_pointers[height]; - -You can point to void or char or whatever you use for pixels. - -If you don't want to write the whole image at once, you can -use png_write_rows() instead. If the file is not interlaced, -this is simple: - - png_write_rows(png_ptr, row_pointers, - number_of_rows); - -row_pointers is the same as in the png_write_image() call. - -If you are just writing one row at a time, you can do this with -a single row_pointer instead of an array of row_pointers: - - png_bytep row_pointer = row; - - png_write_row(png_ptr, row_pointer); - -When the file is interlaced, things can get a good deal more complicated. -The only currently (as of the PNG Specification version 1.2, dated July -1999) defined interlacing scheme for PNG files is the "Adam7" interlace -scheme, that breaks down an image into seven smaller images of varying -size. libpng will build these images for you, or you can do them -yourself. If you want to build them yourself, see the PNG specification -for details of which pixels to write when. - -If you don't want libpng to handle the interlacing details, just -use png_set_interlace_handling() and call png_write_rows() the -correct number of times to write all the sub-images -(png_set_interlace_handling() returns the number of sub-images.) - -If you want libpng to build the sub-images, call this before you start -writing any rows: - - number_of_passes = png_set_interlace_handling(png_ptr); - -This will return the number of passes needed. Currently, this is seven, -but may change if another interlace type is added. - -Then write the complete image number_of_passes times. - - png_write_rows(png_ptr, row_pointers, number_of_rows); - -Think carefully before you write an interlaced image. Typically code that -reads such images reads all the image data into memory, uncompressed, before -doing any processing. Only code that can display an image on the fly can -take advantage of the interlacing and even then the image has to be exactly -the correct size for the output device, because scaling an image requires -adjacent pixels and these are not available until all the passes have been -read. - -If you do write an interlaced image you will hardly ever need to handle -the interlacing yourself. Call png_set_interlace_handling() and use the -approach described above. - -The only time it is conceivable that you will really need to write an -interlaced image pass-by-pass is when you have read one pass by pass and -made some pixel-by-pixel transformation to it, as described in the read -code above. In this case use the PNG_PASS_ROWS and PNG_PASS_COLS macros -to determine the size of each sub-image in turn and simply write the rows -you obtained from the read code. - -Finishing a sequential write - -After you are finished writing the image, you should finish writing -the file. If you are interested in writing comments or time, you should -pass an appropriately filled png_info pointer. If you are not interested, -you can pass NULL. - - png_write_end(png_ptr, info_ptr); - -When you are done, you can free all memory used by libpng like this: - - png_destroy_write_struct(&png_ptr, &info_ptr); - -It is also possible to individually free the info_ptr members that -point to libpng-allocated storage with the following function: - - png_free_data(png_ptr, info_ptr, mask, seq) - - mask - identifies data to be freed, a mask - containing the bitwise OR of one or - more of - PNG_FREE_PLTE, PNG_FREE_TRNS, - PNG_FREE_HIST, PNG_FREE_ICCP, - PNG_FREE_PCAL, PNG_FREE_ROWS, - PNG_FREE_SCAL, PNG_FREE_SPLT, - PNG_FREE_TEXT, PNG_FREE_UNKN, - or simply PNG_FREE_ALL - - seq - sequence number of item to be freed - (-1 for all items) - -This function may be safely called when the relevant storage has -already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those cases do nothing. -The "seq" parameter is ignored if only one item of the selected data -type, such as PLTE, is allowed. If "seq" is not -1, and multiple items -are allowed for the data type identified in the mask, such as text or -sPLT, only the n'th item in the structure is freed, where n is "seq". - -If you allocated data such as a palette that you passed in to libpng -with png_set_*, you must not free it until just before the call to -png_destroy_write_struct(). - -The default behavior is only to free data that was allocated internally -by libpng. This can be changed, so that libpng will not free the data, -or so that it will free data that was allocated by the user with png_malloc() -or png_calloc() and passed in via a png_set_*() function, with - - png_data_freer(png_ptr, info_ptr, freer, mask) - - freer - one of - PNG_DESTROY_WILL_FREE_DATA - PNG_SET_WILL_FREE_DATA - PNG_USER_WILL_FREE_DATA - - mask - which data elements are affected - same choices as in png_free_data() - -For example, to transfer responsibility for some data from a read structure -to a write structure, you could use - - png_data_freer(read_ptr, read_info_ptr, - PNG_USER_WILL_FREE_DATA, - PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) - - png_data_freer(write_ptr, write_info_ptr, - PNG_DESTROY_WILL_FREE_DATA, - PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) - -thereby briefly reassigning responsibility for freeing to the user but -immediately afterwards reassigning it once more to the write_destroy -function. Having done this, it would then be safe to destroy the read -structure and continue to use the PLTE, tRNS, and hIST data in the write -structure. - -This function only affects data that has already been allocated. -You can call this function before calling after the png_set_*() functions -to control whether the user or png_destroy_*() is supposed to free the data. -When the user assumes responsibility for libpng-allocated data, the -application must use -png_free() to free it, and when the user transfers responsibility to libpng -for data that the user has allocated, the user must have used png_malloc() -or png_calloc() to allocate it. - -If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword -separately, do not transfer responsibility for freeing text_ptr to libpng, -because when libpng fills a png_text structure it combines these members with -the key member, and png_free_data() will free only text_ptr.key. Similarly, -if you transfer responsibility for free'ing text_ptr from libpng to your -application, your application must not separately free those members. -For a more compact example of writing a PNG image, see the file example.c. - -V. Simplified API - -The simplified API, which became available in libpng-1.6.0, 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. The "png_image" structure contains the following members: - - 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 - png_uint_32 warning_or_error; - char message[64]; - -In the event of an error or warning the "warning_or_error" -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 the "warning_or_error" value are reserved; the low two -bits contain 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 - -The pixels (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 channels 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, in -the native byte order of the platform on which the application is running. -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 https://en.wikipedia.org/wiki/SRGB) 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_* - -The #defines to be used in png_image::format. Each #define identifies a -particular layout of channel 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 - - PNG_FORMAT_FLAG_ALPHA format with an alpha channel - PNG_FORMAT_FLAG_COLOR color format: otherwise grayscale - PNG_FORMAT_FLAG_LINEAR 2-byte channels else 1-byte - PNG_FORMAT_FLAG_COLORMAP image data is color-mapped - PNG_FORMAT_FLAG_BGR BGR colors, else order is RGB - PNG_FORMAT_FLAG_AFIRST alpha channel comes first - -Supported formats are as follows. Future versions of libpng may support more -formats; for compatibility with older versions simply check if the format -macro is defined using #ifdef. These defines describe the in-memory layout -of the components of the pixels of the image. - -First the single byte (sRGB) formats: - - PNG_FORMAT_GRAY - PNG_FORMAT_GA - PNG_FORMAT_AG - PNG_FORMAT_RGB - PNG_FORMAT_BGR - PNG_FORMAT_RGBA - PNG_FORMAT_ARGB - PNG_FORMAT_BGRA - PNG_FORMAT_ABGR - -Then the linear 2-byte formats. When naming these "Y" is used to -indicate a luminance (gray) channel. The component order within the pixel -is always the same - there is no provision for swapping the order of the -components in the linear format. The components are 16-bit integers in -the native byte order for your platform, and there is no provision for -swapping the bytes to a different endian condition. - - PNG_FORMAT_LINEAR_Y - PNG_FORMAT_LINEAR_Y_ALPHA - PNG_FORMAT_LINEAR_RGB - PNG_FORMAT_LINEAR_RGB_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. - - PNG_FORMAT_RGB_COLORMAP - PNG_FORMAT_BGR_COLORMAP - PNG_FORMAT_RGBA_COLORMAP - PNG_FORMAT_ARGB_COLORMAP - PNG_FORMAT_BGRA_COLORMAP - PNG_FORMAT_ABGR_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. - - PNG_IMAGE_SAMPLE_CHANNELS(fmt) - Returns the total number of channels in a given format: 1..4 - - PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt) - Returns the size in bytes of a single component of a pixel or color-map - entry (as appropriate) in the image: 1 or 2. - - PNG_IMAGE_SAMPLE_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. - - PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt) - 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. - - PNG_IMAGE_COLORMAP_SIZE(fmt) - The size of the color-map required by the format; this is the size of the - color-map buffer passed to the png_image_{read,write}_colormap APIs. It is - a fixed number determined by the format so can easily be allocated on the - stack if necessary. - -Corresponding information about the pixels - - PNG_IMAGE_PIXEL_CHANNELS(fmt) - The number of separate channels (components) in a pixel; 1 for a - color-mapped image. - - PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\ - The size, in bytes, of each component in a pixel; 1 for a color-mapped - image. - - PNG_IMAGE_PIXEL_SIZE(fmt) - The size, in bytes, of a complete pixel; 1 for a color-mapped image. - -Information about the whole row, or whole image - - PNG_IMAGE_ROW_STRIDE(image) - Returns 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. - - If you need the stride measured in bytes, row_stride_bytes is - PNG_IMAGE_ROW_STRIDE(image) * PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt) - plus any padding bytes that your application might need, for example - to start the next row on a 4-byte boundary. - - PNG_IMAGE_BUFFER_SIZE(image, 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. - - PNG_IMAGE_SIZE(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. - - PNG_IMAGE_COLORMAP_SIZE(image) - 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. - - PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB == 0x01 - This indicates the the RGB values of the in-memory bitmap do not - correspond to the red, green and blue end-points defined by sRGB. - - 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. - - 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. - -READ APIs - - The png_image passed to the read APIs must have been initialized by setting - the png_controlp field 'opaque' to NULL (or, better, memset the whole thing.) - - 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. - - int png_image_begin_read_from_stdio (png_imagep image, - FILE* file) - - The PNG header is read from the stdio FILE object. - - 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. - - int png_image_finish_read(png_imagep image, - png_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 png_byte or png_uint_16 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. - - For linear output removing the alpha channel is always done - by compositing on black. - - 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. - -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 https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2 -approximation used elsewhere in libpng. - -WRITE APIS - -For write you must initialize a png_image structure to describe the image to -be written: - - 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 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) - - 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. - - 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, ptrdiff_t row_stride, - const void *colormap)); - - Write the image to memory. - - 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*). - -With all write APIs if image is in one of the linear formats with -(png_uint_16) data then setting convert_to_8_bit will cause the output to be -a (png_byte) PNG gamma encoded according to the sRGB specification, otherwise -a 16-bit linear encoded PNG file is written. - -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 (float) and if negative -indicates a bottom-up row layout in the buffer. If you pass zero, libpng will -calculate the row_stride for you from the width and number of channels. - -Note that the write API does not support interlacing, sub-8-bit pixels, -indexed (paletted) images, or most ancillary chunks. - -VI. Modifying/Customizing libpng - -There are two issues here. The first is changing how libpng does -standard things like memory allocation, input/output, and error handling. -The second deals with more complicated things like adding new chunks, -adding new transformations, and generally changing how libpng works. -Both of those are compile-time issues; that is, they are generally -determined at the time the code is written, and there is rarely a need -to provide the user with a means of changing them. - -Memory allocation, input/output, and error handling - -All of the memory allocation, input/output, and error handling in libpng -goes through callbacks that are user-settable. The default routines are -in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change -these functions, call the appropriate png_set_*_fn() function. - -Memory allocation is done through the functions png_malloc(), png_calloc(), -and png_free(). The png_malloc() and png_free() functions currently just -call the standard C functions and png_calloc() calls png_malloc() and then -clears the newly allocated memory to zero; note that png_calloc(png_ptr, size) -is not the same as the calloc(number, size) function provided by stdlib.h. -There is limited support for certain systems with segmented memory -architectures and the types of pointers declared by png.h match this; you -will have to use appropriate pointers in your application. If you prefer -to use a different method of allocating and freeing data, you can use -png_create_read_struct_2() or png_create_write_struct_2() to register your -own functions as described above. These functions also provide a void -pointer that can be retrieved via - - mem_ptr=png_get_mem_ptr(png_ptr); - -Your replacement memory functions must have prototypes as follows: - - png_voidp malloc_fn(png_structp png_ptr, - png_alloc_size_t size); - - void free_fn(png_structp png_ptr, png_voidp ptr); - -Your malloc_fn() must return NULL in case of failure. The png_malloc() -function will normally call png_error() if it receives a NULL from the -system memory allocator or from your replacement malloc_fn(). - -Your free_fn() will never be called with a NULL ptr, since libpng's -png_free() checks for NULL before calling free_fn(). - -Input/Output in libpng is done through png_read() and png_write(), -which currently just call fread() and fwrite(). The FILE * is stored in -png_struct and is initialized via png_init_io(). If you wish to change -the method of I/O, the library supplies callbacks that you can set -through the function png_set_read_fn() and png_set_write_fn() at run -time, instead of calling the png_init_io() function. These functions -also provide a void pointer that can be retrieved via the function -png_get_io_ptr(). For example: - - png_set_read_fn(png_structp read_ptr, - voidp read_io_ptr, png_rw_ptr read_data_fn) - - png_set_write_fn(png_structp write_ptr, - voidp write_io_ptr, png_rw_ptr write_data_fn, - png_flush_ptr output_flush_fn); - - voidp read_io_ptr = png_get_io_ptr(read_ptr); - voidp write_io_ptr = png_get_io_ptr(write_ptr); - -The replacement I/O functions must have prototypes as follows: - - void user_read_data(png_structp png_ptr, - png_bytep data, size_t length); - - void user_write_data(png_structp png_ptr, - png_bytep data, size_t length); - - void user_flush_data(png_structp png_ptr); - -The user_read_data() function is responsible for detecting and -handling end-of-data errors. - -Supplying NULL for the read, write, or flush functions sets them back -to using the default C stream functions, which expect the io_ptr to -point to a standard *FILE structure. It is probably a mistake -to use NULL for one of write_data_fn and output_flush_fn but not both -of them, unless you have built libpng with PNG_NO_WRITE_FLUSH defined. -It is an error to read from a write stream, and vice versa. - -Error handling in libpng is done through png_error() and png_warning(). -Errors handled through png_error() are fatal, meaning that png_error() -should never return to its caller. Currently, this is handled via -setjmp() and longjmp() (unless you have compiled libpng with -PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()), -but you could change this to do things like exit() if you should wish, -as long as your function does not return. - -On non-fatal errors, png_warning() is called -to print a warning message, and then control returns to the calling code. -By default png_error() and png_warning() print a message on stderr via -fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined -(because you don't want the messages) or PNG_NO_STDIO defined (because -fprintf() isn't available). If you wish to change the behavior of the error -functions, you will need to set up your own message callbacks. These -functions are normally supplied at the time that the png_struct is created. -It is also possible to redirect errors and warnings to your own replacement -functions after png_create_*_struct() has been called by calling: - - png_set_error_fn(png_structp png_ptr, - png_voidp error_ptr, png_error_ptr error_fn, - png_error_ptr warning_fn); - -If NULL is supplied for either error_fn or warning_fn, then the libpng -default function will be used, calling fprintf() and/or longjmp() if a -problem is encountered. The replacement error functions should have -parameters as follows: - - void user_error_fn(png_structp png_ptr, - png_const_charp error_msg); - - void user_warning_fn(png_structp png_ptr, - png_const_charp warning_msg); - -Then, within your user_error_fn or user_warning_fn, you can retrieve -the error_ptr if you need it, by calling - - png_voidp error_ptr = png_get_error_ptr(png_ptr); - -The motivation behind using setjmp() and longjmp() is the C++ throw and -catch exception handling methods. This makes the code much easier to write, -as there is no need to check every return code of every function call. -However, there are some uncertainties about the status of local variables -after a longjmp, so the user may want to be careful about doing anything -after setjmp returns non-zero besides returning itself. Consult your -compiler documentation for more details. For an alternative approach, you -may wish to use the "cexcept" facility (see https://cexcept.sourceforge.io/), -which is illustrated in pngvalid.c and in contrib/visupng. - -Beginning in libpng-1.4.0, the png_set_benign_errors() API became available. -You can use this to handle certain errors (normally handled as errors) -as warnings. - - png_set_benign_errors (png_ptr, int allowed); - - allowed: 0: treat png_benign_error() as an error. - 1: treat png_benign_error() as a warning. - -As of libpng-1.6.0, the default condition is to treat benign errors as -warnings while reading and as errors while writing. - -Custom chunks - -If you need to read or write custom chunks, you may need to get deeper -into the libpng code. The library now has mechanisms for storing -and writing chunks of unknown type; you can even declare callbacks -for custom chunks. However, this may not be good enough if the -library code itself needs to know about interactions between your -chunk and existing `intrinsic' chunks. - -If you need to write a new intrinsic chunk, first read the PNG -specification. Acquire a first level of understanding of how it works. -Pay particular attention to the sections that describe chunk names, -and look at how other chunks were designed, so you can do things -similarly. Second, check out the sections of libpng that read and -write chunks. Try to find a chunk that is similar to yours and use -it as a template. More details can be found in the comments inside -the code. It is best to handle private or unknown chunks in a generic method, -via callback functions, instead of by modifying libpng functions. This -is illustrated in pngtest.c, which uses a callback function to handle a -private "vpAg" chunk and the new "sTER" chunk, which are both unknown to -libpng. - -If you wish to write your own transformation for the data, look through -the part of the code that does the transformations, and check out some of -the simpler ones to get an idea of how they work. Try to find a similar -transformation to the one you want to add and copy off of it. More details -can be found in the comments inside the code itself. - -Configuring for gui/windowing platforms: - -You will need to write new error and warning functions that use the GUI -interface, as described previously, and set them to be the error and -warning functions at the time that png_create_*_struct() is called, -in order to have them available during the structure initialization. -They can be changed later via png_set_error_fn(). On some compilers, -you may also have to change the memory allocators (png_malloc, etc.). - -Configuring zlib: - -There are special functions to configure the compression. Perhaps the -most useful one changes the compression level, which currently uses -input compression values in the range 0 - 9. The library normally -uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests -have shown that for a large majority of images, compression values in -the range 3-6 compress nearly as well as higher levels, and do so much -faster. For online applications it may be desirable to have maximum speed -(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also -specify no compression (Z_NO_COMPRESSION = 0), but this would create -files larger than just storing the raw bitmap. You can specify the -compression level by calling: - - #include zlib.h - png_set_compression_level(png_ptr, level); - -Another useful one is to reduce the memory level used by the library. -The memory level defaults to 8, but it can be lowered if you are -short on memory (running DOS, for example, where you only have 640K). -Note that the memory level does have an effect on compression; among -other things, lower levels will result in sections of incompressible -data being emitted in smaller stored blocks, with a correspondingly -larger relative overhead of up to 15% in the worst case. - - #include zlib.h - png_set_compression_mem_level(png_ptr, level); - -The other functions are for configuring zlib. They are not recommended -for normal use and may result in writing an invalid PNG file. See -zlib.h for more information on what these mean. - - #include zlib.h - png_set_compression_strategy(png_ptr, - strategy); - - png_set_compression_window_bits(png_ptr, - window_bits); - - png_set_compression_method(png_ptr, method); - -This controls the size of the IDAT chunks (default 8192): - - png_set_compression_buffer_size(png_ptr, size); - -As of libpng version 1.5.4, additional APIs became -available to set these separately for non-IDAT -compressed chunks such as zTXt, iTXt, and iCCP: - - #include zlib.h - #if PNG_LIBPNG_VER >= 10504 - png_set_text_compression_level(png_ptr, level); - - png_set_text_compression_mem_level(png_ptr, level); - - png_set_text_compression_strategy(png_ptr, - strategy); - - png_set_text_compression_window_bits(png_ptr, - window_bits); - - png_set_text_compression_method(png_ptr, method); - #endif - -Controlling row filtering - -If you want to control whether libpng uses filtering or not, which -filters are used, and how it goes about picking row filters, you -can call one of these functions. The selection and configuration -of row filters can have a significant impact on the size and -encoding speed and a somewhat lesser impact on the decoding speed -of an image. Filtering is enabled by default for RGB and grayscale -images (with and without alpha), but not for paletted images nor -for any images with bit depths less than 8 bits/pixel. - -The 'method' parameter sets the main filtering method, which is -currently only '0' in the PNG 1.2 specification. The 'filters' -parameter sets which filter(s), if any, should be used for each -scanline. Possible values are PNG_ALL_FILTERS, PNG_NO_FILTERS, -or PNG_FAST_FILTERS to turn filtering on and off, or to turn on -just the fast-decoding subset of filters, respectively. - -Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB, -PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise -ORed together with '|' to specify one or more filters to use. -These filters are described in more detail in the PNG specification. -If you intend to change the filter type during the course of writing -the image, you should start with flags set for all of the filters -you intend to use so that libpng can initialize its internal -structures appropriately for all of the filter types. (Note that this -means the first row must always be adaptively filtered, because libpng -currently does not allocate the filter buffers until png_write_row() -is called for the first time.) - - filters = PNG_NO_FILTERS; - filters = PNG_ALL_FILTERS; - filters = PNG_FAST_FILTERS; - - or - - filters = PNG_FILTER_NONE | PNG_FILTER_SUB | - PNG_FILTER_UP | PNG_FILTER_AVG | - PNG_FILTER_PAETH; - - png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, - filters); - - The second parameter can also be - PNG_INTRAPIXEL_DIFFERENCING if you are - writing a PNG to be embedded in a MNG - datastream. This parameter must be the - same as the value of filter_method used - in png_set_IHDR(). - -Requesting debug printout - -The macro definition PNG_DEBUG can be used to request debugging -printout. Set it to an integer value in the range 0 to 3. Higher -numbers result in increasing amounts of debugging information. The -information is printed to the "stderr" file, unless another file -name is specified in the PNG_DEBUG_FILE macro definition. - -When PNG_DEBUG > 0, the following functions (macros) become available: - - png_debug(level, message) - png_debug1(level, message, p1) - png_debug2(level, message, p1, p2) - -in which "level" is compared to PNG_DEBUG to decide whether to print -the message, "message" is the formatted string to be printed, -and p1 and p2 are parameters that are to be embedded in the string -according to printf-style formatting directives. For example, - - png_debug1(2, "foo=%d", foo); - -is expanded to - - if (PNG_DEBUG > 2) - fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo); - -When PNG_DEBUG is defined but is zero, the macros aren't defined, but you -can still use PNG_DEBUG to control your own debugging: - - #ifdef PNG_DEBUG - fprintf(stderr, ... - #endif - -When PNG_DEBUG = 1, the macros are defined, but only png_debug statements -having level = 0 will be printed. There aren't any such statements in -this version of libpng, but if you insert some they will be printed. - -VII. MNG support - -The MNG specification (available at http://www.libpng.org/pub/mng) allows -certain extensions to PNG for PNG images that are embedded in MNG datastreams. -Libpng can support some of these extensions. To enable them, use the -png_permit_mng_features() function: - - feature_set = png_permit_mng_features(png_ptr, mask) - - mask is a png_uint_32 containing the bitwise OR of the - features you want to enable. These include - PNG_FLAG_MNG_EMPTY_PLTE - PNG_FLAG_MNG_FILTER_64 - PNG_ALL_MNG_FEATURES - - feature_set is a png_uint_32 that is the bitwise AND of - your mask with the set of MNG features that is - supported by the version of libpng that you are using. - -It is an error to use this function when reading or writing a standalone -PNG file with the PNG 8-byte signature. The PNG datastream must be wrapped -in a MNG datastream. As a minimum, it must have the MNG 8-byte signature -and the MHDR and MEND chunks. Libpng does not provide support for these -or any other MNG chunks; your application must provide its own support for -them. You may wish to consider using libmng (available at -https://www.libmng.com/) instead. - -VIII. Changes to Libpng from version 0.88 - -It should be noted that versions of libpng later than 0.96 are not -distributed by the original libpng author, Guy Schalnat, nor by -Andreas Dilger, who had taken over from Guy during 1996 and 1997, and -distributed versions 0.89 through 0.96, but rather by another member -of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are -still alive and well, but they have moved on to other things. - -The old libpng functions png_read_init(), png_write_init(), -png_info_init(), png_read_destroy(), and png_write_destroy() have been -moved to PNG_INTERNAL in version 0.95 to discourage their use. These -functions will be removed from libpng version 1.4.0. - -The preferred method of creating and initializing the libpng structures is -via the png_create_read_struct(), png_create_write_struct(), and -png_create_info_struct() because they isolate the size of the structures -from the application, allow version error checking, and also allow the -use of custom error handling routines during the initialization, which -the old functions do not. The functions png_read_destroy() and -png_write_destroy() do not actually free the memory that libpng -allocated for these structs, but just reset the data structures, so they -can be used instead of png_destroy_read_struct() and -png_destroy_write_struct() if you feel there is too much system overhead -allocating and freeing the png_struct for each image read. - -Setting the error callbacks via png_set_message_fn() before -png_read_init() as was suggested in libpng-0.88 is no longer supported -because this caused applications that do not use custom error functions -to fail if the png_ptr was not initialized to zero. It is still possible -to set the error callbacks AFTER png_read_init(), or to change them with -png_set_error_fn(), which is essentially the same function, but with a new -name to force compilation errors with applications that try to use the old -method. - -Support for the sCAL, iCCP, iTXt, and sPLT chunks was added at libpng-1.0.6; -however, iTXt support was not enabled by default. - -Starting with version 1.0.7, you can find out which version of the library -you are using at run-time: - - png_uint_32 libpng_vn = png_access_version_number(); - -The number libpng_vn is constructed from the major version, minor -version with leading zero, and release number with leading zero, -(e.g., libpng_vn for version 1.0.7 is 10007). - -Note that this function does not take a png_ptr, so you can call it -before you've created one. - -You can also check which version of png.h you used when compiling your -application: - - png_uint_32 application_vn = PNG_LIBPNG_VER; - -IX. Changes to Libpng from version 1.0.x to 1.2.x - -Support for user memory management was enabled by default. To -accomplish this, the functions png_create_read_struct_2(), -png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(), -png_malloc_default(), and png_free_default() were added. - -Support for the iTXt chunk has been enabled by default as of -version 1.2.41. - -Support for certain MNG features was enabled. - -Support for numbered error messages was added. However, we never got -around to actually numbering the error messages. The function -png_set_strip_error_numbers() was added (Note: the prototype for this -function was inadvertently removed from png.h in PNG_NO_ASSEMBLER_CODE -builds of libpng-1.2.15. It was restored in libpng-1.2.36). - -The png_malloc_warn() function was added at libpng-1.2.3. This issues -a png_warning and returns NULL instead of aborting when it fails to -acquire the requested memory allocation. - -Support for setting user limits on image width and height was enabled -by default. The functions png_set_user_limits(), png_get_user_width_max(), -and png_get_user_height_max() were added at libpng-1.2.6. - -The png_set_add_alpha() function was added at libpng-1.2.7. - -The function png_set_expand_gray_1_2_4_to_8() was added at libpng-1.2.9. -Unlike png_set_gray_1_2_4_to_8(), the new function does not expand the -tRNS chunk to alpha. The png_set_gray_1_2_4_to_8() function is -deprecated. - -A number of macro definitions in support of runtime selection of -assembler code features (especially Intel MMX code support) were -added at libpng-1.2.0: - - PNG_ASM_FLAG_MMX_SUPPORT_COMPILED - PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU - PNG_ASM_FLAG_MMX_READ_COMBINE_ROW - PNG_ASM_FLAG_MMX_READ_INTERLACE - PNG_ASM_FLAG_MMX_READ_FILTER_SUB - PNG_ASM_FLAG_MMX_READ_FILTER_UP - PNG_ASM_FLAG_MMX_READ_FILTER_AVG - PNG_ASM_FLAG_MMX_READ_FILTER_PAETH - PNG_ASM_FLAGS_INITIALIZED - PNG_MMX_READ_FLAGS - PNG_MMX_FLAGS - PNG_MMX_WRITE_FLAGS - PNG_MMX_FLAGS - -We added the following functions in support of runtime -selection of assembler code features: - - png_get_mmx_flagmask() - png_set_mmx_thresholds() - png_get_asm_flags() - png_get_mmx_bitdepth_threshold() - png_get_mmx_rowbytes_threshold() - png_set_asm_flags() - -We replaced all of these functions with simple stubs in libpng-1.2.20, -when the Intel assembler code was removed due to a licensing issue. - -These macros are deprecated: - - PNG_READ_TRANSFORMS_NOT_SUPPORTED - PNG_PROGRESSIVE_READ_NOT_SUPPORTED - PNG_NO_SEQUENTIAL_READ_SUPPORTED - PNG_WRITE_TRANSFORMS_NOT_SUPPORTED - PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED - PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED - -They have been replaced, respectively, by: - - PNG_NO_READ_TRANSFORMS - PNG_NO_PROGRESSIVE_READ - PNG_NO_SEQUENTIAL_READ - PNG_NO_WRITE_TRANSFORMS - PNG_NO_READ_ANCILLARY_CHUNKS - PNG_NO_WRITE_ANCILLARY_CHUNKS - -PNG_MAX_UINT was replaced with PNG_UINT_31_MAX. It has been -deprecated since libpng-1.0.16 and libpng-1.2.6. - -The function - png_check_sig(sig, num) -was replaced with - !png_sig_cmp(sig, 0, num) -It has been deprecated since libpng-0.90. - -The function - png_set_gray_1_2_4_to_8() -which also expands tRNS to alpha was replaced with - png_set_expand_gray_1_2_4_to_8() -which does not. It has been deprecated since libpng-1.0.18 and 1.2.9. - -X. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x - -Private libpng prototypes and macro definitions were moved from -png.h and pngconf.h into a new pngpriv.h header file. - -Functions png_set_benign_errors(), png_benign_error(), and -png_chunk_benign_error() were added. - -Support for setting the maximum amount of memory that the application -will allocate for reading chunks was added, as a security measure. -The functions png_set_chunk_cache_max() and png_get_chunk_cache_max() -were added to the library. - -We implemented support for I/O states by adding png_ptr member io_state -and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c - -We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level -input transforms. - -Checking for and reporting of errors in the IHDR chunk is more thorough. - -Support for global arrays was removed, to improve thread safety. - -Some obsolete/deprecated macros and functions have been removed. - -Typecasted NULL definitions such as - #define png_voidp_NULL (png_voidp)NULL -were eliminated. If you used these in your application, just use -NULL instead. - -The png_struct and info_struct members "trans" and "trans_values" were -changed to "trans_alpha" and "trans_color", respectively. - -The obsolete, unused pnggccrd.c and pngvcrd.c files and related makefiles -were removed. - -The PNG_1_0_X and PNG_1_2_X macros were eliminated. - -The PNG_LEGACY_SUPPORTED macro was eliminated. - -Many WIN32_WCE #ifdefs were removed. - -The functions png_read_init(info_ptr), png_write_init(info_ptr), -png_info_init(info_ptr), png_read_destroy(), and png_write_destroy() -have been removed. They have been deprecated since libpng-0.95. - -The png_permit_empty_plte() was removed. It has been deprecated -since libpng-1.0.9. Use png_permit_mng_features() instead. - -We removed the obsolete stub functions png_get_mmx_flagmask(), -png_set_mmx_thresholds(), png_get_asm_flags(), -png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(), -png_set_asm_flags(), and png_mmx_supported() - -We removed the obsolete png_check_sig(), png_memcpy_check(), and -png_memset_check() functions. Instead use !png_sig_cmp(), memcpy(), -and memset(), respectively. - -The function png_set_gray_1_2_4_to_8() was removed. It has been -deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with -png_set_expand_gray_1_2_4_to_8() because the former function also -expanded any tRNS chunk to an alpha channel. - -Macros for png_get_uint_16, png_get_uint_32, and png_get_int_32 -were added and are used by default instead of the corresponding -functions. Unfortunately, -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. - -We changed the prototype for png_malloc() from - png_malloc(png_structp png_ptr, png_uint_32 size) -to - png_malloc(png_structp png_ptr, png_alloc_size_t size) - -This also applies to the prototype for the user replacement malloc_fn(). - -The png_calloc() function was added and is used in place of -of "png_malloc(); memset();" except in the case in png_read_png() -where the array consists of pointers; in this case a "for" loop is used -after the png_malloc() to set the pointers to NULL, to give robust. -behavior in case the application runs out of memory part-way through -the process. - -We changed the prototypes of png_get_compression_buffer_size() and -png_set_compression_buffer_size() to work with size_t instead of -png_uint_32. - -Support for numbered error messages was removed by default, since we -never got around to actually numbering the error messages. The function -png_set_strip_error_numbers() was removed from the library by default. - -The png_zalloc() and png_zfree() functions are no longer exported. -The png_zalloc() function no longer zeroes out the memory that it -allocates. Applications that called png_zalloc(png_ptr, number, size) -can call png_calloc(png_ptr, number*size) instead, and can call -png_free() instead of png_zfree(). - -Support for dithering was disabled by default in libpng-1.4.0, because -it has not been well tested and doesn't actually "dither". -The code was not -removed, however, and could be enabled by building libpng with -PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support -was re-enabled, but the function was renamed png_set_quantize() to -reflect more accurately what it actually does. At the same time, -the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to -PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED -was renamed to PNG_READ_QUANTIZE_SUPPORTED. - -We removed the trailing '.' from the warning and error messages. - -XI. Changes to Libpng from version 1.4.x to 1.5.x - -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. -The incorrect macro was removed from libpng-1.4.5. - -Checking for invalid palette index on write was added at libpng -1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues -a benign error. This is enabled by default because this condition is an -error according to the PNG specification, Clause 11.3.2, but the error can -be ignored in each png_ptr with - - png_set_check_for_invalid_index(png_ptr, allowed); - - allowed - one of - 0: disable benign error (accept the - invalid data without warning). - 1: enable benign error (treat the - invalid data as an error or a - warning). - -If the error is ignored, or if png_benign_error() treats it as a warning, -any invalid pixels are decoded as opaque black by the decoder and written -as-is by the encoder. - -Retrieving the maximum palette index found was added at libpng-1.5.15. -This statement must appear after png_read_png() or png_read_image() while -reading, and after png_write_png() or png_write_image() while writing. - - int max_palette = png_get_palette_max(png_ptr, info_ptr); - -This will return the maximum palette index found in the image, or "-1" if -the palette was not checked, or "0" if no palette was found. Note that this -does not account for any palette index used by ancillary chunks such as the -bKGD chunk; you must check those separately to determine the maximum -palette index actually used. - -There are no substantial API changes between the non-deprecated parts of -the 1.4.5 API and the 1.5.0 API; however, the ability to directly access -members of the main libpng control structures, png_struct and png_info, -deprecated in earlier versions of libpng, has been completely removed from -libpng 1.5, and new private "pngstruct.h", "pnginfo.h", and "pngdebug.h" -header files were created. - -We no longer include zlib.h in png.h. The include statement has been moved -to pngstruct.h, where it is not accessible by applications. Applications that -need access to information in zlib.h will need to add the '#include "zlib.h"' -directive. It does not matter whether this is placed prior to or after -the '"#include png.h"' directive. - -The png_sprintf(), png_strcpy(), and png_strncpy() macros are no longer used -and were removed. - -We moved the png_strlen(), png_memcpy(), png_memset(), and png_memcmp() -macros into a private header file (pngpriv.h) that is not accessible to -applications. - -In png_get_iCCP, the type of "profile" was changed from png_charpp -to png_bytepp, and in png_set_iCCP, from png_charp to png_const_bytep. - -There are changes of form in png.h, including new and changed macros to -declare parts of the API. Some API functions with arguments that are -pointers to data not modified within the function have been corrected to -declare these arguments with PNG_CONST. - -Much of the internal use of C macros to control the library build has also -changed and some of this is visible in the exported header files, in -particular the use of macros to control data and API elements visible -during application compilation may require significant revision to -application code. (It is extremely rare for an application to do this.) - -Any program that compiled against libpng 1.4 and did not use deprecated -features or access internal library structures should compile and work -against libpng 1.5, except for the change in the prototype for -png_get_iCCP() and png_set_iCCP() API functions mentioned above. - -libpng 1.5.0 adds PNG_ PASS macros to help in the reading and writing of -interlaced images. The macros return the number of rows and columns in -each pass and information that can be used to de-interlace and (if -absolutely necessary) interlace an image. - -libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls -the application-provided png_longjmp_ptr on the internal, but application -initialized, longjmp buffer. It is provided as a convenience to avoid -the need to use the png_jmpbuf macro, which had the unnecessary side -effect of resetting the internal png_longjmp_ptr value. - -libpng 1.5.0 includes a complete fixed point API. By default this is -present along with the corresponding floating point API. In general the -fixed point API is faster and smaller than the floating point one because -the PNG file format used fixed point, not floating point. This applies -even if the library uses floating point in internal calculations. A new -macro, PNG_FLOATING_ARITHMETIC_SUPPORTED, reveals whether the library -uses floating point arithmetic (the default) or fixed point arithmetic -internally for performance critical calculations such as gamma correction. -In some cases, the gamma calculations may produce slightly different -results. This has changed the results in png_rgb_to_gray and in alpha -composition (png_set_background for example). This applies even if the -original image was already linear (gamma == 1.0) and, therefore, it is -not necessary to linearize the image. This is because libpng has *not* -been changed to optimize that case correctly, yet. - -Fixed point support for the sCAL chunk comes with an important caveat; -the sCAL specification uses a decimal encoding of floating point values -and the accuracy of PNG fixed point values is insufficient for -representation of these values. Consequently a "string" API -(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading -arbitrary sCAL chunks in the absence of either the floating point API or -internal floating point calculations. Starting with libpng-1.5.0, both -of these functions are present when PNG_sCAL_SUPPORTED is defined. Prior -to libpng-1.5.0, their presence also depended upon PNG_FIXED_POINT_SUPPORTED -being defined and PNG_FLOATING_POINT_SUPPORTED not being defined. - -Applications no longer need to include the optional distribution header -file pngusr.h or define the corresponding macros during application -build in order to see the correct variant of the libpng API. From 1.5.0 -application code can check for the corresponding _SUPPORTED macro: - -#ifdef PNG_INCH_CONVERSIONS_SUPPORTED - /* code that uses the inch conversion APIs. */ -#endif - -This macro will only be defined if the inch conversion functions have been -compiled into libpng. The full set of macros, and whether or not support -has been compiled in, are available in the header file pnglibconf.h. -This header file is specific to the libpng build. Notice that prior to -1.5.0 the _SUPPORTED macros would always have the default definition unless -reset by pngusr.h or by explicit settings on the compiler command line. -These settings may produce compiler warnings or errors in 1.5.0 because -of macro redefinition. - -Applications can now choose whether to use these macros or to call the -corresponding function by defining PNG_USE_READ_MACROS or -PNG_NO_USE_READ_MACROS before including png.h. Notice that this is -only supported from 1.5.0; defining PNG_NO_USE_READ_MACROS prior to 1.5.0 -will lead to a link failure. - -Prior to libpng-1.5.4, the zlib compressor used the same set of parameters -when compressing the IDAT data and textual data such as zTXt and iCCP. -In libpng-1.5.4 we reinitialized the zlib stream for each type of data. -We added five png_set_text_*() functions for setting the parameters to -use with textual data. - -Prior to libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED -option was off by default, and slightly inaccurate scaling occurred. -This option can no longer be turned off, and the choice of accurate -or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8() -API for accurate scaling or the old png_set_strip_16_to_8() API for simple -chopping. In libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED -macro became PNG_READ_SCALE_16_TO_8_SUPPORTED, and the PNG_READ_16_TO_8 -macro became PNG_READ_STRIP_16_TO_8_SUPPORTED, to enable the two -png_set_*_16_to_8() functions separately. - -Prior to libpng-1.5.4, the png_set_user_limits() function could only be -used to reduce the width and height limits from the value of -PNG_USER_WIDTH_MAX and PNG_USER_HEIGHT_MAX, although this document said -that it could be used to override them. Now this function will reduce or -increase the limits. - -Starting in libpng-1.5.22, default user limits were established. These -can be overridden by application calls to png_set_user_limits(), -png_set_user_chunk_cache_max(), and/or png_set_user_malloc_max(). -The limits are now - max possible default - png_user_width_max 0x7fffffff 1,000,000 - png_user_height_max 0x7fffffff 1,000,000 - png_user_chunk_cache_max 0 (unlimited) 1000 - png_user_chunk_malloc_max 0 (unlimited) 8,000,000 - -The png_set_option() function (and the "options" member of the png struct) was -added to libpng-1.5.15, with option PNG_ARM_NEON. - -The library now supports a complete fixed point implementation and can -thus be used on systems that have no floating point support or very -limited or slow support. Previously gamma correction, an essential part -of complete PNG support, required reasonably fast floating point. - -As part of this the choice of internal implementation has been made -independent of the choice of fixed versus floating point APIs and all the -missing fixed point APIs have been implemented. - -The exact mechanism used to control attributes of API functions has -changed, as described in the INSTALL file. - -A new test program, pngvalid, is provided in addition to pngtest. -pngvalid validates the arithmetic accuracy of the gamma correction -calculations and includes a number of validations of the file format. -A subset of the full range of tests is run when "make check" is done -(in the 'configure' build.) pngvalid also allows total allocated memory -usage to be evaluated and performs additional memory overwrite validation. - -Many changes to individual feature macros have been made. The following -are the changes most likely to be noticed by library builders who -configure libpng: - -1) All feature macros now have consistent naming: - -#define PNG_NO_feature turns the feature off -#define PNG_feature_SUPPORTED turns the feature on - -pnglibconf.h contains one line for each feature macro which is either: - -#define PNG_feature_SUPPORTED - -if the feature is supported or: - -/*#undef PNG_feature_SUPPORTED*/ - -if it is not. Library code consistently checks for the 'SUPPORTED' macro. -It does not, and libpng applications should not, check for the 'NO' macro -which will not normally be defined even if the feature is not supported. -The 'NO' macros are only used internally for setting or not setting the -corresponding 'SUPPORTED' macros. - -Compatibility with the old names is provided as follows: - -PNG_INCH_CONVERSIONS turns on PNG_INCH_CONVERSIONS_SUPPORTED - -And the following definitions disable the corresponding feature: - -PNG_SETJMP_NOT_SUPPORTED disables SETJMP -PNG_READ_TRANSFORMS_NOT_SUPPORTED disables READ_TRANSFORMS -PNG_NO_READ_COMPOSITED_NODIV disables READ_COMPOSITE_NODIV -PNG_WRITE_TRANSFORMS_NOT_SUPPORTED disables WRITE_TRANSFORMS -PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED disables READ_ANCILLARY_CHUNKS -PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED disables WRITE_ANCILLARY_CHUNKS - -Library builders should remove use of the above, inconsistent, names. - -2) Warning and error message formatting was previously conditional on -the STDIO feature. The library has been changed to use the -CONSOLE_IO feature instead. This means that if CONSOLE_IO is disabled -the library no longer uses the printf(3) functions, even though the -default read/write implementations use (FILE) style stdio.h functions. - -3) Three feature macros now control the fixed/floating point decisions: - -PNG_FLOATING_POINT_SUPPORTED enables the floating point APIs - -PNG_FIXED_POINT_SUPPORTED enables the fixed point APIs; however, in -practice these are normally required internally anyway (because the PNG -file format is fixed point), therefore in most cases PNG_NO_FIXED_POINT -merely stops the function from being exported. - -PNG_FLOATING_ARITHMETIC_SUPPORTED chooses between the internal floating -point implementation or the fixed point one. Typically the fixed point -implementation is larger and slower than the floating point implementation -on a system that supports floating point; however, it may be faster on a -system which lacks floating point hardware and therefore uses a software -emulation. - -4) Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the -functions to read and write ints to be disabled independently of -PNG_USE_READ_MACROS, which allows libpng to be built with the functions -even though the default is to use the macros - this allows applications -to choose at app buildtime whether or not to use macros (previously -impossible because the functions weren't in the default build.) - -XII. Changes to Libpng from version 1.5.x to 1.6.x - -A "simplified API" has been added (see documentation in png.h and a simple -example in contrib/examples/pngtopng.c). The new publicly visible API -includes the following: - - macros: - PNG_FORMAT_* - PNG_IMAGE_* - structures: - png_control - png_image - read functions - png_image_begin_read_from_file() - png_image_begin_read_from_stdio() - png_image_begin_read_from_memory() - png_image_finish_read() - png_image_free() - write functions - png_image_write_to_file() - png_image_write_to_memory() - png_image_write_to_stdio() - -Starting with libpng-1.6.0, you can configure libpng to prefix all exported -symbols, using the PNG_PREFIX macro. - -We no longer include string.h in png.h. The include statement has been moved -to pngpriv.h, where it is not accessible by applications. Applications that -need access to information in string.h must add an '#include ' -directive. It does not matter whether this is placed prior to or after -the '#include "png.h"' directive. - -The following API are now DEPRECATED: - png_info_init_3() - png_convert_to_rfc1123() which has been replaced - with png_convert_to_rfc1123_buffer() - png_malloc_default() - png_free_default() - png_reset_zstream() - -The following have been removed: - png_get_io_chunk_name(), which has been replaced - with png_get_io_chunk_type(). The new - function returns a 32-bit integer instead of - a string. - The png_sizeof(), png_strlen(), png_memcpy(), png_memcmp(), and - png_memset() macros are no longer used in the libpng sources and - have been removed. These had already been made invisible to applications - (i.e., defined in the private pngpriv.h header file) since libpng-1.5.0. - -The signatures of many exported functions were changed, such that - png_structp became png_structrp or png_const_structrp - png_infop became png_inforp or png_const_inforp -where "rp" indicates a "restricted pointer". - -Dropped support for 16-bit platforms. The support for FAR/far types has -been eliminated and the definition of png_alloc_size_t is now controlled -by a flag so that 'small size_t' systems can select it if necessary. - -Error detection in some chunks has improved; in particular the iCCP chunk -reader now does pretty complete validation of the basic format. Some bad -profiles that were previously accepted are now accepted with a warning or -rejected, depending upon the png_set_benign_errors() setting, in particular -the very old broken Microsoft/HP 3144-byte sRGB profile. Starting with -libpng-1.6.11, recognizing and checking sRGB profiles can be avoided by -means of - - #if defined(PNG_SKIP_sRGB_CHECK_PROFILE) && \ - defined(PNG_SET_OPTION_SUPPORTED) - png_set_option(png_ptr, PNG_SKIP_sRGB_CHECK_PROFILE, - PNG_OPTION_ON); - #endif - -It's not a good idea to do this if you are using the "simplified API", -which needs to be able to recognize sRGB profiles conveyed via the iCCP -chunk. - -The PNG spec requirement that only grayscale profiles may appear in images -with color type 0 or 4 and that even if the image only contains gray pixels, -only RGB profiles may appear in images with color type 2, 3, or 6, is now -enforced. The sRGB chunk is allowed to appear in images with any color type -and is interpreted by libpng to convey a one-tracer-curve gray profile or a -three-tracer-curve RGB profile as appropriate. - -Libpng 1.5.x erroneously used /MD for Debug DLL builds; if you used the debug -builds in your app and you changed your app to use /MD you will need to -change it back to /MDd for libpng 1.6.x. - -Prior to libpng-1.6.0 a warning would be issued if the iTXt chunk contained -an empty language field or an empty translated keyword. Both of these -are allowed by the PNG specification, so these warnings are no longer issued. - -The library now issues an error if the application attempts to set a -transform after it calls png_read_update_info() or if it attempts to call -both png_read_update_info() and png_start_read_image() or to call either -of them more than once. - -The default condition for benign_errors is now to treat benign errors as -warnings while reading and as errors while writing. - -The library now issues a warning if both background processing and RGB to -gray are used when gamma correction happens. As with previous versions of -the library the results are numerically very incorrect in this case. - -There are some minor arithmetic changes in some transforms such as -png_set_background(), that might be detected by certain regression tests. - -Unknown chunk handling has been improved internally, without any API change. -This adds more correct option control of the unknown handling, corrects -a pre-existing bug where the per-chunk 'keep' setting is ignored, and makes -it possible to skip IDAT chunks in the sequential reader. - -The machine-generated configure files are no longer included in branches -libpng16 and later of the GIT repository. They continue to be included -in the tarball releases, however. - -Libpng-1.6.0 through 1.6.2 used the CMF bytes at the beginning of the IDAT -stream to set the size of the sliding window for reading instead of using the -default 32-kbyte sliding window size. It was discovered that there are -hundreds of PNG files in the wild that have incorrect CMF bytes that caused -zlib to issue the "invalid distance too far back" error and reject the file. -Libpng-1.6.3 and later calculate their own safe CMF from the image dimensions, -provide a way to revert to the libpng-1.5.x behavior (ignoring the CMF bytes -and using a 32-kbyte sliding window), by using - - png_set_option(png_ptr, PNG_MAXIMUM_INFLATE_WINDOW, - PNG_OPTION_ON); - -and provide a tool (contrib/tools/pngfix) for rewriting a PNG file while -optimizing the CMF bytes in its IDAT chunk correctly. - -Libpng-1.6.0 and libpng-1.6.1 wrote uncompressed iTXt chunks with the wrong -length, which resulted in PNG files that cannot be read beyond the bad iTXt -chunk. This error was fixed in libpng-1.6.3, and a tool (called -contrib/tools/png-fix-itxt) has been added to the libpng distribution. - -Starting with libpng-1.6.17, the PNG_SAFE_LIMITS macro was eliminated -and safe limits are used by default (users who need larger limits -can still override them at compile time or run time, as described above). - -The new limits are - default spec limit - png_user_width_max 1,000,000 2,147,483,647 - png_user_height_max 1,000,000 2,147,483,647 - png_user_chunk_cache_max 128 unlimited - png_user_chunk_malloc_max 8,000,000 unlimited - -Starting with libpng-1.6.18, a PNG_RELEASE_BUILD macro was added, which allows -library builders to control compilation for an installed system (a release build). -It can be set for testing debug or beta builds to ensure that they will compile -when the build type is switched to RC or STABLE. In essence this overrides the -PNG_LIBPNG_BUILD_BASE_TYPE definition which is not directly user controllable. - -Starting with libpng-1.6.19, attempting to set an over-length PLTE chunk -is an error. Previously this requirement of the PNG specification was not -enforced, and the palette was always limited to 256 entries. An over-length -PLTE chunk found in an input PNG is silently truncated. - -Starting with libpng-1.6.31, the eXIf chunk is supported. Libpng does not -attempt to decode the Exif profile; it simply returns a byte array -containing the profile to the calling application which must do its own -decoding. - -XIII. Detecting libpng - -The png_get_io_ptr() function has been present since libpng-0.88, has never -changed, and is unaffected by conditional compilation macros. It is the -best choice for use in configure scripts for detecting the presence of any -libpng version since 0.88. In an autoconf "configure.in" you could use - - AC_CHECK_LIB(png, png_get_io_ptr, ... - -XV. Source code repository - -Since about February 2009, version 1.2.34, libpng has been under "git" source -control. The git repository was built from old libpng-x.y.z.tar.gz files -going back to version 0.70. You can access the git repository (read only) -at - - https://github.com/glennrp/libpng or - https://git.code.sf.net/p/libpng/code.git - -or you can browse it with a web browser at - - https://github.com/glennrp/libpng or - https://sourceforge.net/p/libpng/code/ci/libpng16/tree/ - -Patches can be sent to png-mng-implement at lists.sourceforge.net or -you can upload them to the libpng bug tracker at - - https://libpng.sourceforge.io/ - -or as a "pull request" to - - https://github.com/glennrp/libpng/pulls - -We also accept patches built from the tar or zip distributions, and -simple verbal descriptions of bug fixes, reported either to the -SourceForge bug tracker, to the png-mng-implement at lists.sf.net -mailing list, as github issues. - -XV. Coding style - -Our coding style is similar to the "Allman" style -(See https://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly -braces on separate lines: - - if (condition) - { - action; - } - - else if (another condition) - { - another action; - } - -The braces can be omitted from simple one-line actions: - - if (condition) - return 0; - -We use 3-space indentation, except for continued statements which -are usually indented the same as the first line of the statement -plus four more spaces. - -For macro definitions we use 2-space indentation, always leaving the "#" -in the first column. - - #ifndef PNG_NO_FEATURE - # ifndef PNG_FEATURE_SUPPORTED - # define PNG_FEATURE_SUPPORTED - # endif - #endif - -Comments appear with the leading "/*" at the same indentation as -the statement that follows the comment: - - /* Single-line comment */ - statement; - - /* This is a multiple-line - * comment. - */ - statement; - -Very short comments can be placed after the end of the statement -to which they pertain: - - statement; /* comment */ - -We don't use C++ style ("//") comments. We have, however, -used them in the past in some now-abandoned MMX assembler -code. - -Functions and their curly braces are not indented, and -exported functions are marked with PNGAPI: - - /* This is a public function that is visible to - * application programmers. It does thus-and-so. - */ - void PNGAPI - png_exported_function(png_ptr, png_info, foo) - { - body; - } - -The return type and decorations are placed on a separate line -ahead of the function name, as illustrated above. - -The prototypes for all exported functions appear in png.h, -above the comment that says - - /* Maintainer: Put new public prototypes here ... */ - -We mark all non-exported functions with "/* PRIVATE */"": - - void /* PRIVATE */ - png_non_exported_function(png_ptr, png_info, foo) - { - body; - } - -The prototypes for non-exported functions (except for those in -pngtest) appear in pngpriv.h above the comment that says - - /* Maintainer: Put new private prototypes here ^ */ - -To avoid polluting the global namespace, the names of all exported -functions and variables begin with "png_", and all publicly visible C -preprocessor macros begin with "PNG". We request that applications that -use libpng *not* begin any of their own symbols with either of these strings. - -We put a space after the "sizeof" operator and we omit the -optional parentheses around its argument when the argument -is an expression, not a type name, and we always enclose the -sizeof operator, with its argument, in parentheses: - - (sizeof (png_uint_32)) - (sizeof array) - -Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as -though it were a function. - -Control keywords if, for, while, and switch are always followed by a space -to distinguish them from function calls, which have no trailing space. - -We put a space after each comma and after each semicolon -in "for" statements, and we put spaces before and after each -C binary operator and after "for" or "while", and before -"?". We don't put a space between a typecast and the expression -being cast, nor do we put one between a function name and the -left parenthesis that follows it: - - for (i = 2; i > 0; --i) - y[i] = a(x) + (int)b; - -We prefer #ifdef and #ifndef to #if defined() and #if !defined() -when there is only one macro being tested. We always use parentheses -with "defined". - -We express integer constants that are used as bit masks in hex format, -with an even number of lower-case hex digits, and to make them unsigned -(e.g., 0x00U, 0xffU, 0x0100U) and long if they are greater than 0x7fff -(e.g., 0xffffUL). - -We prefer to use underscores rather than camelCase in names, except -for a few type names that we inherit from zlib.h. - -We prefer "if (something != 0)" and "if (something == 0)" over -"if (something)" and if "(!something)", respectively, and for pointers -we prefer "if (some_pointer != NULL)" or "if (some_pointer == NULL)". - -We do not use the TAB character for indentation in the C sources. - -Lines do not exceed 80 characters. - -Other rules can be inferred by inspecting the libpng source. - -XVI. Y2K Compliance in libpng - -Since the PNG Development group is an ad-hoc body, we can't make -an official declaration. - -This is your unofficial assurance that libpng from version 0.71 and -upward through 1.6.35 are Y2K compliant. It is my belief that earlier -versions were also Y2K compliant. - -Libpng only has two year fields. One is a 2-byte unsigned integer -that will hold years up to 65535. The other, which is deprecated, -holds the date in text format, and will hold years up to 9999. - -The integer is - "png_uint_16 year" in png_time_struct. - -The string is - "char time_buffer[29]" in png_struct. This is no longer used -in libpng-1.6.x and will be removed from libpng-1.7.0. - -There are seven time-related functions: - - png_convert_to_rfc_1123_buffer() in png.c - (formerly png_convert_to_rfc_1152() in error, and - also formerly png_convert_to_rfc_1123()) - png_convert_from_struct_tm() in pngwrite.c, called - in pngwrite.c - png_convert_from_time_t() in pngwrite.c - png_get_tIME() in pngget.c - png_handle_tIME() in pngrutil.c, called in pngread.c - png_set_tIME() in pngset.c - png_write_tIME() in pngwutil.c, called in pngwrite.c - -All appear to handle dates properly in a Y2K environment. The -png_convert_from_time_t() function calls gmtime() to convert from system -clock time, which returns (year - 1900), which we properly convert to -the full 4-digit year. There is a possibility that applications using -libpng are not passing 4-digit years into the png_convert_to_rfc_1123() -function, or that they are incorrectly passing only a 2-digit year -instead of "year - 1900" into the png_convert_from_struct_tm() function, -but this is not under our control. The libpng documentation has always -stated that it works with 4-digit years, and the APIs have been -documented as such. - -The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned -integer to hold the year, and can hold years as large as 65535. - -zlib, upon which libpng depends, is also Y2K compliant. It contains -no date-related code. - - - Glenn Randers-Pehrson - libpng maintainer - PNG Development Group diff --git a/Dependencies/FreeImage/Source/LibPNG/libpng.3 b/Dependencies/FreeImage/Source/LibPNG/libpng.3 deleted file mode 100644 index 604a2bb..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/libpng.3 +++ /dev/null @@ -1,6245 +0,0 @@ -.TH LIBPNG 3 "July 15, 2018" -.SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.35 -.SH SYNOPSIS -\fB -#include \fP - -\fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP - -\fBvoid png_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP - -\fBvoid png_build_grayscale_palette (int \fP\fIbit_depth\fP\fB, png_colorp \fIpalette\fP\fB);\fP - -\fBpng_voidp png_calloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP - -\fBvoid png_chunk_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP - -\fBvoid png_chunk_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP - -\fBvoid png_chunk_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP - -\fBvoid png_convert_from_struct_tm (png_timep \fP\fIptime\fP\fB, struct tm FAR * \fIttime\fP\fB);\fP - -\fBvoid png_convert_from_time_t (png_timep \fP\fIptime\fP\fB, time_t \fIttime\fP\fB);\fP - -\fBpng_charp png_convert_to_rfc1123 (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fIptime\fP\fB);\fP - -\fBpng_infop png_create_info_struct (png_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_structp png_create_read_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP - -\fBpng_structp png_create_read_struct_2 (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP - -\fBpng_structp png_create_write_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP - -\fBpng_structp png_create_write_struct_2 (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP - -\fBvoid png_data_freer (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIfreer\fP\fB, png_uint_32 \fImask)\fP\fB);\fP - -\fBvoid png_destroy_info_struct (png_structp \fP\fIpng_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP - -\fBvoid png_destroy_read_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fP\fIinfo_ptr_ptr\fP\fB, png_infopp \fIend_info_ptr_ptr\fP\fB);\fP - -\fBvoid png_destroy_write_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP - -\fBvoid png_err (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP - -\fBvoid png_free (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP - -\fBvoid png_free_chunk_list (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_free_default (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP - -\fBvoid png_free_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fInum\fP\fB);\fP - -\fBpng_byte png_get_bit_depth (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_bKGD (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fI*background\fP\fB);\fP - -\fBpng_byte png_get_channels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_cHRM (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*white_x\fP\fB, double \fP\fI*white_y\fP\fB, double \fP\fI*red_x\fP\fB, double \fP\fI*red_y\fP\fB, double \fP\fI*green_x\fP\fB, double \fP\fI*green_y\fP\fB, double \fP\fI*blue_x\fP\fB, double \fI*blue_y\fP\fB);\fP - -\fBpng_uint_32 png_get_cHRM_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*white_x\fP\fB, png_uint_32 \fP\fI*white_y\fP\fB, png_uint_32 \fP\fI*red_x\fP\fB, png_uint_32 \fP\fI*red_y\fP\fB, png_uint_32 \fP\fI*green_x\fP\fB, png_uint_32 \fP\fI*green_y\fP\fB, png_uint_32 \fP\fI*blue_x\fP\fB, png_uint_32 \fI*blue_y\fP\fB);\fP - -\fBpng_uint_32 png_get_cHRM_XYZ (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*red_X\fP\fB, double \fP\fI*red_Y\fP\fB, double \fP\fI*red_Z\fP\fB, double \fP\fI*green_X\fP\fB, double \fP\fI*green_Y\fP\fB, double \fP\fI*green_Z\fP\fB, double \fP\fI*blue_X\fP\fB, double \fP\fI*blue_Y\fP\fB, double \fI*blue_Z\fP\fB);\fP - -\fBpng_uint_32 png_get_cHRM_XYZ_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_fixed_point \fP\fI*int_red_X\fP\fB, png_fixed_point \fP\fI*int_red_Y\fP\fB, png_fixed_point \fP\fI*int_red_Z\fP\fB, png_fixed_point \fP\fI*int_green_X\fP\fB, png_fixed_point \fP\fI*int_green_Y\fP\fB, png_fixed_point \fP\fI*int_green_Z\fP\fB, png_fixed_point \fP\fI*int_blue_X\fP\fB, png_fixed_point \fP\fI*int_blue_Y\fP\fB, png_fixed_point \fI*int_blue_Z\fP\fB);\fP - -\fBpng_uint_32 png_get_chunk_cache_max (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_alloc_size_t png_get_chunk_malloc_max (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_byte png_get_color_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_compression_buffer_size (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_byte png_get_compression_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_byte png_get_copyright (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_current_row_number \fI(png_const_structp\fP\fB);\fP - -\fBpng_byte png_get_current_pass_number \fI(png_const_structp\fP\fB);\fP - -\fBpng_voidp png_get_error_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_byte png_get_filter_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_gAMA (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, double \fI*file_gamma\fP\fB);\fP - -\fBpng_uint_32 png_get_gAMA_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fI*int_file_gamma\fP\fB);\fP - -\fBpng_byte png_get_header_ver (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_byte png_get_header_version (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_eXIf (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fI*exif\fP\fB);\fP - -\fBpng_uint_32 png_get_eXIf_1 (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_unit_32 \fP\fI*num_exif\fP\fB, png_bytep \fI*exif\fP\fB);\fP - -\fBpng_uint_32 png_get_hIST (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP - -\fBpng_uint_32 png_get_iCCP (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_bytepp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP - -\fBpng_uint_32 png_get_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*width\fP\fB, png_uint_32 \fP\fI*height\fP\fB, int \fP\fI*bit_depth\fP\fB, int \fP\fI*color_type\fP\fB, int \fP\fI*interlace_type\fP\fB, int \fP\fI*compression_type\fP\fB, int \fI*filter_type\fP\fB);\fP - -\fBpng_uint_32 png_get_image_height (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_image_width (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_int_32 png_get_int_32 (png_bytep \fIbuf\fP\fB);\fP - -\fBpng_byte png_get_interlace_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_io_chunk_type (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_voidp png_get_io_ptr (png_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_io_state (png_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_byte png_get_libpng_ver (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBint png_get_palette_max(png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_voidp png_get_mem_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_oFFs (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*offset_x\fP\fB, png_uint_32 \fP\fI*offset_y\fP\fB, int \fI*unit_type\fP\fB);\fP - -\fBpng_uint_32 png_get_pCAL (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fI*purpose\fP\fB, png_int_32 \fP\fI*X0\fP\fB, png_int_32 \fP\fI*X1\fP\fB, int \fP\fI*type\fP\fB, int \fP\fI*nparams\fP\fB, png_charp \fP\fI*units\fP\fB, png_charpp \fI*params\fP\fB);\fP - -\fBpng_uint_32 png_get_pHYs (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP - -\fBfloat png_get_pixel_aspect_ratio (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_pHYs_dpi (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP - -\fBpng_fixed_point png_get_pixel_aspect_ratio_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_voidp png_get_progressive_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_PLTE (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fI*palette\fP\fB, int \fI*num_palette\fP\fB);\fP - -\fBpng_byte png_get_rgb_to_gray_status (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_rowbytes (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_bytepp png_get_rows (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_sBIT (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fI*sig_bit\fP\fB);\fP - -\fBvoid png_get_sCAL (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, double* \fP\fIwidth\fP\fB, double* \fIheight\fP\fB);\fP - -\fBvoid png_get_sCAL_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, png_fixed_pointp \fP\fIwidth\fP\fB, png_fixed_pointp \fIheight\fP\fB);\fP - -\fBvoid png_get_sCAL_s (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, png_charpp \fP\fIwidth\fP\fB, png_charpp \fIheight\fP\fB);\fP - -\fBpng_bytep png_get_signature (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_sPLT (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fI*splt_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_sRGB (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int \fI*file_srgb_intent\fP\fB);\fP - -\fBpng_uint_32 png_get_text (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fI*text_ptr\fP\fB, int \fI*num_text\fP\fB);\fP - -\fBpng_uint_32 png_get_tIME (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fI*mod_time\fP\fB);\fP - -\fBpng_uint_32 png_get_tRNS (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans_alpha\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_color\fP\fB);\fP - -\fB/* This function is really an inline macro. \fI*/ - -\fBpng_uint_16 png_get_uint_16 (png_bytep \fIbuf\fP\fB);\fP - -\fBpng_uint_32 png_get_uint_31 (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIbuf\fP\fB);\fP - -\fB/* This function is really an inline macro. \fI*/ - -\fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP - -\fBpng_uint_32 png_get_unknown_chunks (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP - -\fBpng_voidp png_get_user_chunk_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_user_height_max (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_voidp png_get_user_transform_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_user_width_max (png_const_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_valid (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIflag\fP\fB);\fP - -\fBfloat png_get_x_offset_inches (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_fixed_point png_get_x_offset_inches_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_int_32 png_get_x_offset_microns (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_int_32 png_get_x_offset_pixels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_x_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_x_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBfloat png_get_y_offset_inches (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_fixed_point png_get_y_offset_inches_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_int_32 png_get_y_offset_microns (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_int_32 png_get_y_offset_pixels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_y_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBpng_uint_32 png_get_y_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP - -\fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP - -\fBint png_image_begin_read_from_file (png_imagep \fP\fIimage\fP\fB, const char \fI*file_name\fP\fB);\fP - -\fBint png_image_begin_read_from_stdio (png_imagep \fP\fIimage\fP\fB, FILE* \fIfile\fP\fB);\fP - -\fBint, png_image_begin_read_from_memory (png_imagep \fP\fIimage\fP\fB, png_const_voidp \fP\fImemory\fP\fB, size_t \fIsize\fP\fB);\fP - -\fBint png_image_finish_read (png_imagep \fP\fIimage\fP\fB, png_colorp \fP\fIbackground\fP\fB, void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, void \fI*colormap\fP\fB);\fP - -\fBvoid png_image_free (png_imagep \fIimage\fP\fB);\fP - -\fBint png_image_write_to_file (png_imagep \fP\fIimage\fP\fB, const char \fP\fI*file\fP\fB, int \fP\fIconvert_to_8bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, void \fI*colormap\fP\fB);\fP - -\fBint png_image_write_to_memory (png_imagep \fP\fIimage\fP\fB, void \fP\fI*memory\fP\fB, png_alloc_size_t * PNG_RESTRICT \fP\fImemory_bytes\fP\fB, int \fP\fIconvert_to_8_bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, const void \fI*colormap)\fP\fB);\fP - -\fBint png_image_write_to_stdio (png_imagep \fP\fIimage\fP\fB, FILE \fP\fI*file\fP\fB, int \fP\fIconvert_to_8_bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, void \fI*colormap)\fP\fB);\fP - -\fBvoid png_info_init_3 (png_infopp \fP\fIinfo_ptr\fP\fB, size_t \fIpng_info_struct_size\fP\fB);\fP - -\fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP - -\fBvoid png_longjmp (png_structp \fP\fIpng_ptr\fP\fB, int \fIval\fP\fB);\fP - -\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP - -\fBpng_voidp png_malloc_default (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP - -\fBpng_voidp png_malloc_warn (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP - -\fBpng_uint_32 png_permit_mng_features (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fImng_features_permitted\fP\fB);\fP - -\fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, size_t \fIbuffer_size\fP\fB);\fP - -\fBsize_t png_process_data_pause \fP\fI(png_structp\fP\fB, int \fIsave\fP\fB);\fP - -\fBpng_uint_32 png_process_data_skip \fI(png_structp\fP\fB);\fP - -\fBvoid png_progressive_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIold_row\fP\fB, png_bytep \fInew_row\fP\fB);\fP - -\fBvoid png_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fBvoid png_read_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP - -\fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fBvoid png_read_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP - -\fBvoid png_read_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fIdisplay_row\fP\fB);\fP - -\fBvoid png_read_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_bytepp \fP\fIdisplay_row\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP - -\fBvoid png_read_update_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fBint png_reset_zstream (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP - -\fBvoid png_save_uint_16 (png_bytep \fP\fIbuf\fP\fB, unsigned int \fIi\fP\fB);\fP - -\fBvoid png_save_uint_32 (png_bytep \fP\fIbuf\fP\fB, png_uint_32 \fIi\fP\fB);\fP - -\fBvoid png_set_add_alpha (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP - -\fBvoid png_set_alpha_mode (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImode\fP\fB, double \fIoutput_gamma\fP\fB);\fP - -\fBvoid png_set_alpha_mode_fixed (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImode\fP\fB, png_fixed_point \fIoutput_gamma\fP\fB);\fP - -\fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP - -\fBvoid png_set_background_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, png_uint_32 \fIbackground_gamma\fP\fB);\fP - -\fBvoid png_set_benign_errors (png_structp \fP\fIpng_ptr\fP\fB, int \fIallowed\fP\fB);\fP - -\fBvoid png_set_bgr (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fIbackground\fP\fB);\fP - -\fBvoid png_set_check_for_invalid_index(png_structrp \fP\fIpng_ptr\fP\fB, int \fIallowed\fP\fB);\fP - -\fBvoid png_set_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP - -\fBvoid png_set_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP - -\fBvoid png_set_cHRM_XYZ (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fIred_X\fP\fB, double \fP\fIred_Y\fP\fB, double \fP\fIred_Z\fP\fB, double \fP\fIgreen_X\fP\fB, double \fP\fIgreen_Y\fP\fB, double \fP\fIgreen_Z\fP\fB, double \fP\fIblue_X\fP\fB, double \fP\fIblue_Y\fP\fB, double \fIblue_Z\fP\fB);\fP - -\fBvoid png_set_cHRM_XYZ_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_fixed_point \fP\fIint_red_X\fP\fB, png_fixed_point \fP\fIint_red_Y\fP\fB, png_fixed_point \fP\fIint_red_Z\fP\fB, png_fixed_point \fP\fIint_green_X\fP\fB, png_fixed_point \fP\fIint_green_Y\fP\fB, png_fixed_point \fP\fIint_green_Z\fP\fB, png_fixed_point \fP\fIint_blue_X\fP\fB, png_fixed_point \fP\fIint_blue_Y\fP\fB, png_fixed_point \fIint_blue_Z\fP\fB);\fP - -\fBvoid png_set_chunk_cache_max (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIuser_chunk_cache_max\fP\fB);\fP - -\fBvoid png_set_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP - -\fBvoid png_set_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP - -\fBvoid png_set_compression_method (png_structp \fP\fIpng_ptr\fP\fB, int \fImethod\fP\fB);\fP - -\fBvoid png_set_compression_strategy (png_structp \fP\fIpng_ptr\fP\fB, int \fIstrategy\fP\fB);\fP - -\fBvoid png_set_compression_window_bits (png_structp \fP\fIpng_ptr\fP\fB, int \fIwindow_bits\fP\fB);\fP - -\fBvoid png_set_crc_action (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcrit_action\fP\fB, int \fIancil_action\fP\fB);\fP - -\fBvoid png_set_error_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarning_fn\fP\fB);\fP - -\fBvoid png_set_expand (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_expand_16 (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_expand_gray_1_2_4_to_8 (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_filler (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP - -\fBvoid png_set_filter (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImethod\fP\fB, int \fIfilters\fP\fB);\fP - -\fBvoid png_set_filter_heuristics (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIheuristic_method\fP\fB, int \fP\fInum_weights\fP\fB, png_doublep \fP\fIfilter_weights\fP\fB, png_doublep \fIfilter_costs\fP\fB);\fP - -\fBvoid png_set_filter_heuristics_fixed (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIheuristic_method\fP\fB, int \fP\fInum_weights\fP\fB, png_fixed_point_p \fP\fIfilter_weights\fP\fB, png_fixed_point_p \fIfilter_costs\fP\fB);\fP - -\fBvoid png_set_flush (png_structp \fP\fIpng_ptr\fP\fB, int \fInrows\fP\fB);\fP - -\fBvoid png_set_gamma (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIscreen_gamma\fP\fB, double \fIdefault_file_gamma\fP\fB);\fP - -\fBvoid png_set_gamma_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIscreen_gamma\fP\fB, png_uint_32 \fIdefault_file_gamma\fP\fB);\fP - -\fBvoid png_set_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP - -\fBvoid png_set_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIfile_gamma\fP\fB);\fP - -\fBvoid png_set_gray_1_2_4_to_8 (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_gray_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_eXIf (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fIexif\fP\fB);\fP - -\fBvoid png_set_eXIf_1 (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, const png_uint_32 \fP\fInum_exif\fP\fB, png_bytep \fIexif\fP\fB);\fP - -\fBvoid png_set_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fIhist\fP\fB);\fP - -\fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_const_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_const_bytep \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP - -\fBint png_set_interlace_handling (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_invalid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fImask\fP\fB);\fP - -\fBvoid png_set_invert_alpha (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_invert_mono (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIinterlace_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fIfilter_type\fP\fB);\fP - -\fBvoid png_set_keep_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIkeep\fP\fB, png_bytep \fP\fIchunk_list\fP\fB, int \fInum_chunks\fP\fB);\fP - -\fBjmp_buf* png_set_longjmp_fn (png_structp \fP\fIpng_ptr\fP\fB, png_longjmp_ptr \fP\fIlongjmp_fn\fP\fB, size_t \fIjmp_buf_size\fP\fB);\fP - -\fBvoid png_set_chunk_malloc_max (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIuser_chunk_cache_max\fP\fB);\fP - -\fBvoid png_set_compression_buffer_size (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP - -\fBvoid png_set_mem_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP - -\fBvoid png_set_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIoffset_x\fP\fB, png_uint_32 \fP\fIoffset_y\fP\fB, int \fIunit_type\fP\fB);\fP - -\fBint png_set_option(png_structrp \fP\fIpng_ptr\fP\fB, int \fP\fIoption\fP\fB, int \fIonoff\fP\fB);\fP - -\fBvoid png_set_packing (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_packswap (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_palette_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIpurpose\fP\fB, png_int_32 \fP\fIX0\fP\fB, png_int_32 \fP\fIX1\fP\fB, int \fP\fItype\fP\fB, int \fP\fInparams\fP\fB, png_charp \fP\fIunits\fP\fB, png_charpp \fIparams\fP\fB);\fP - -\fBvoid png_set_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIres_x\fP\fB, png_uint_32 \fP\fIres_y\fP\fB, int \fIunit_type\fP\fB);\fP - -\fBvoid png_set_progressive_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIprogressive_ptr\fP\fB, png_progressive_info_ptr \fP\fIinfo_fn\fP\fB, png_progressive_row_ptr \fP\fIrow_fn\fP\fB, png_progressive_end_ptr \fIend_fn\fP\fB);\fP - -\fBvoid png_set_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fInum_palette\fP\fB);\fP - -\fBvoid png_set_quantize (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fP\fInum_palette\fP\fB, int \fP\fImaximum_colors\fP\fB, png_uint_16p \fP\fIhistogram\fP\fB, int \fIfull_quantize\fP\fB);\fP - -\fBvoid png_set_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fIread_data_fn\fP\fB);\fP - -\fBvoid png_set_read_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_read_status_ptr \fIread_row_fn\fP\fB);\fP - -\fBvoid png_set_read_user_chunk_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_chunk_ptr\fP\fB, png_user_chunk_ptr \fIread_user_chunk_fn\fP\fB);\fP - -\fBvoid png_set_read_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIread_user_transform_fn\fP\fB);\fP - -\fBvoid png_set_rgb_to_gray (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIerror_action\fP\fB, double \fP\fIred\fP\fB, double \fIgreen\fP\fB);\fP - -\fBvoid png_set_rgb_to_gray_fixed (png_structp \fP\fIpng_ptr\fP\fB, int error_action png_uint_32 \fP\fIred\fP\fB, png_uint_32 \fIgreen\fP\fB);\fP - -\fBvoid png_set_rows (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytepp \fIrow_pointers\fP\fB);\fP - -\fBvoid png_set_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fIsig_bit\fP\fB);\fP - -\fBvoid png_set_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP - -\fBvoid png_set_sCAL_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, png_fixed_point \fP\fIwidth\fP\fB, png_fixed_point \fIheight\fP\fB);\fP - -\fBvoid png_set_sCAL_s (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, png_charp \fP\fIwidth\fP\fB, png_charp \fIheight\fP\fB);\fP - -\fBvoid png_set_scale_16 (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_shift (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fItrue_bits\fP\fB);\fP - -\fBvoid png_set_sig_bytes (png_structp \fP\fIpng_ptr\fP\fB, int \fInum_bytes\fP\fB);\fP - -\fBvoid png_set_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fP\fIsplt_ptr\fP\fB, int \fInum_spalettes\fP\fB);\fP - -\fBvoid png_set_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIsrgb_intent\fP\fB);\fP - -\fBvoid png_set_sRGB_gAMA_and_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIsrgb_intent\fP\fB);\fP - -\fBvoid png_set_strip_16 (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_strip_alpha (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_strip_error_numbers (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIstrip_mode\fP\fB);\fP - -\fBvoid png_set_swap (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_swap_alpha (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_set_text (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text\fP\fB);\fP - -\fBvoid png_set_text_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP - -\fBvoid png_set_text_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP - -\fBvoid png_set_text_compression_strategy (png_structp \fP\fIpng_ptr\fP\fB, int \fIstrategy\fP\fB);\fP - -\fBvoid png_set_text_compression_window_bits (png_structp \fP\fIpng_ptr\fP\fB, int \fIwindow_bits\fP\fB);\fP - -\fBvoid \fP\fIpng_set_text_compression_method\fP\fB, (png_structp \fP\fIpng_ptr\fP\fB, int \fImethod)\fP\fB);\fP - -\fBvoid png_set_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP - -\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans_alpha\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_color\fP\fB);\fP - -\fBvoid png_set_tRNS_to_alpha (png_structp \fIpng_ptr\fP\fB);\fP - -\fBpng_uint_32 png_set_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkp \fP\fIunknowns\fP\fB, int \fP\fInum\fP\fB, int \fIlocation\fP\fB);\fP - -\fBvoid png_set_unknown_chunk_location (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIchunk\fP\fB, int \fIlocation\fP\fB);\fP - -\fBvoid png_set_user_limits (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIuser_width_max\fP\fB, png_uint_32 \fIuser_height_max\fP\fB);\fP - -\fBvoid png_set_user_transform_info (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_transform_ptr\fP\fB, int \fP\fIuser_transform_depth\fP\fB, int \fIuser_transform_channels\fP\fB);\fP - -\fBvoid png_set_write_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fP\fIwrite_data_fn\fP\fB, png_flush_ptr \fIoutput_flush_fn\fP\fB);\fP - -\fBvoid png_set_write_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_write_status_ptr \fIwrite_row_fn\fP\fB);\fP - -\fBvoid png_set_write_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIwrite_user_transform_fn\fP\fB);\fP - -\fBint png_sig_cmp (png_bytep \fP\fIsig\fP\fB, size_t \fP\fIstart\fP\fB, size_t \fInum_to_check\fP\fB);\fP - -\fBvoid png_start_read_image (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP - -\fBvoid png_write_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_bytep \fP\fIdata\fP\fB, size_t \fIlength\fP\fB);\fP - -\fBvoid png_write_chunk_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, size_t \fIlength\fP\fB);\fP - -\fBvoid png_write_chunk_end (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_write_chunk_start (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fBvoid png_write_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fBvoid png_write_flush (png_structp \fIpng_ptr\fP\fB);\fP - -\fBvoid png_write_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP - -\fBvoid png_write_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fBvoid png_write_info_before_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fBvoid png_write_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP - -\fBvoid png_write_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fBvoid png_write_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP - -\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP - -.SH DESCRIPTION -The -.I libpng -library supports encoding, decoding, and various manipulations of -the Portable Network Graphics (PNG) format image files. It uses the -.IR zlib(3) -compression library. -Following is a copy of the libpng-manual.txt file that accompanies libpng. -.SH LIBPNG.TXT -libpng-manual.txt - A description on how to use and modify libpng - - libpng version 1.6.35 - July 15, 2018 - Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2018 Glenn Randers-Pehrson - - This document is released under the libpng license. - For conditions of distribution and use, see the disclaimer - and license in png.h - - Based on: - - libpng versions 0.97, January 1998, through 1.6.35 - July 15, 2018 - Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2017 Glenn Randers-Pehrson - - libpng 1.0 beta 6 - version 0.96 - May 28, 1997 - Updated and distributed by Andreas Dilger - Copyright (c) 1996, 1997 Andreas Dilger - - libpng 1.0 beta 2 - version 0.88 - January 26, 1996 - For conditions of distribution and use, see copyright - notice in png.h. Copyright (c) 1995, 1996 Guy Eric - Schalnat, Group 42, Inc. - - Updated/rewritten per request in the libpng FAQ - Copyright (c) 1995, 1996 Frank J. T. Wojcik - December 18, 1995 & January 20, 1996 - - TABLE OF CONTENTS - - I. Introduction - II. Structures - III. Reading - IV. Writing - V. Simplified API - VI. Modifying/Customizing libpng - VII. MNG support - VIII. Changes to Libpng from version 0.88 - IX. Changes to Libpng from version 1.0.x to 1.2.x - X. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x - XI. Changes to Libpng from version 1.4.x to 1.5.x - XII. Changes to Libpng from version 1.5.x to 1.6.x - XIII. Detecting libpng - XIV. Source code repository - XV. Coding style - XVI. Y2K Compliance in libpng - -.SH I. Introduction - -This file describes how to use and modify the PNG reference library -(known as libpng) for your own use. In addition to this -file, example.c is a good starting point for using the library, as -it is heavily commented and should include everything most people -will need. We assume that libpng is already installed; see the -INSTALL file for instructions on how to configure and install libpng. - -For examples of libpng usage, see the files "example.c", "pngtest.c", -and the files in the "contrib" directory, all of which are included in -the libpng distribution. - -Libpng was written as a companion to the PNG specification, as a way -of reducing the amount of time and effort it takes to support the PNG -file format in application programs. - -The PNG specification (second edition), November 2003, is available as -a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at -. -It is technically equivalent -to the PNG specification (second edition) but has some additional material. - -The PNG-1.0 specification is available as RFC 2083 - and as a -W3C Recommendation . - -Some additional chunks are described in the special-purpose public chunks -documents at - -Other information -about PNG, and the latest version of libpng, can be found at the PNG home -page, . - -Most users will not have to modify the library significantly; advanced -users may want to modify it more. All attempts were made to make it as -complete as possible, while keeping the code easy to understand. -Currently, this library only supports C. Support for other languages -is being considered. - -Libpng has been designed to handle multiple sessions at one time, -to be easily modifiable, to be portable to the vast majority of -machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy -to use. The ultimate goal of libpng is to promote the acceptance of -the PNG file format in whatever way possible. While there is still -work to be done (see the TODO file), libpng should cover the -majority of the needs of its users. - -Libpng uses zlib for its compression and decompression of PNG files. -Further information about zlib, and the latest version of zlib, can -be found at the zlib home page, . -The zlib compression utility is a general purpose utility that is -useful for more than PNG files, and can be used without libpng. -See the documentation delivered with zlib for more details. -You can usually find the source files for the zlib utility wherever you -find the libpng source files. - -Libpng is thread safe, provided the threads are using different -instances of the structures. Each thread should have its own -png_struct and png_info instances, and thus its own image. -Libpng does not protect itself against two threads using the -same instance of a structure. - -.SH II. Structures - -There are two main structures that are important to libpng, png_struct -and png_info. Both are internal structures that are no longer exposed -in the libpng interface (as of libpng 1.5.0). - -The png_info structure is designed to provide information about the -PNG file. At one time, the fields of png_info were intended to be -directly accessible to the user. However, this tended to cause problems -with applications using dynamically loaded libraries, and as a result -a set of interface functions for png_info (the png_get_*() and png_set_*() -functions) was developed, and direct access to the png_info fields was -deprecated.. - -The png_struct structure is the object used by the library to decode a -single image. As of 1.5.0 this structure is also not exposed. - -Almost all libpng APIs require a pointer to a png_struct as the first argument. -Many (in particular the png_set and png_get APIs) also require a pointer -to png_info as the second argument. Some application visible macros -defined in png.h designed for basic data access (reading and writing -integers in the PNG format) don't take a png_info pointer, but it's almost -always safe to assume that a (png_struct*) has to be passed to call an API -function. - -You can have more than one png_info structure associated with an image, -as illustrated in pngtest.c, one for information valid prior to the -IDAT chunks and another (called "end_info" below) for things after them. - -The png.h header file is an invaluable reference for programming with libpng. -And while I'm on the topic, make sure you include the libpng header file: - -#include - -and also (as of libpng-1.5.0) the zlib header file, if you need it: - -#include - -.SS Types - -The png.h header file defines a number of integral types used by the -APIs. Most of these are fairly obvious; for example types corresponding -to integers of particular sizes and types for passing color values. - -One exception is how non-integral numbers are handled. For application -convenience most APIs that take such numbers have C (double) arguments; -however, internally PNG, and libpng, use 32 bit signed integers and encode -the value by multiplying by 100,000. As of libpng 1.5.0 a convenience -macro PNG_FP_1 is defined in png.h along with a type (png_fixed_point) -which is simply (png_int_32). - -All APIs that take (double) arguments also have a matching API that -takes the corresponding fixed point integer arguments. The fixed point -API has the same name as the floating point one with "_fixed" appended. -The actual range of values permitted in the APIs is frequently less than -the full range of (png_fixed_point) (\-21474 to +21474). When APIs require -a non-negative argument the type is recorded as png_uint_32 above. Consult -the header file and the text below for more information. - -Special care must be take with sCAL chunk handling because the chunk itself -uses non-integral values encoded as strings containing decimal floating point -numbers. See the comments in the header file. - -.SS Configuration - -The main header file function declarations are frequently protected by C -preprocessing directives of the form: - - #ifdef PNG_feature_SUPPORTED - declare-function - #endif - ... - #ifdef PNG_feature_SUPPORTED - use-function - #endif - -The library can be built without support for these APIs, although a -standard build will have all implemented APIs. Application programs -should check the feature macros before using an API for maximum -portability. From libpng 1.5.0 the feature macros set during the build -of libpng are recorded in the header file "pnglibconf.h" and this file -is always included by png.h. - -If you don't need to change the library configuration from the default, skip to -the next section ("Reading"). - -Notice that some of the makefiles in the 'scripts' directory and (in 1.5.0) all -of the build project files in the 'projects' directory simply copy -scripts/pnglibconf.h.prebuilt to pnglibconf.h. This means that these build -systems do not permit easy auto-configuration of the library - they only -support the default configuration. - -The easiest way to make minor changes to the libpng configuration when -auto-configuration is supported is to add definitions to the command line -using (typically) CPPFLAGS. For example: - -CPPFLAGS=\-DPNG_NO_FLOATING_ARITHMETIC - -will change the internal libpng math implementation for gamma correction and -other arithmetic calculations to fixed point, avoiding the need for fast -floating point support. The result can be seen in the generated pnglibconf.h - -make sure it contains the changed feature macro setting. - -If you need to make more extensive configuration changes - more than one or two -feature macro settings - you can either add \-DPNG_USER_CONFIG to the build -command line and put a list of feature macro settings in pngusr.h or you can set -DFA_XTRA (a makefile variable) to a file containing the same information in the -form of 'option' settings. - -A. Changing pnglibconf.h - -A variety of methods exist to build libpng. Not all of these support -reconfiguration of pnglibconf.h. To reconfigure pnglibconf.h it must either be -rebuilt from scripts/pnglibconf.dfa using awk or it must be edited by hand. - -Hand editing is achieved by copying scripts/pnglibconf.h.prebuilt to -pnglibconf.h and changing the lines defining the supported features, paying -very close attention to the 'option' information in scripts/pnglibconf.dfa -that describes those features and their requirements. This is easy to get -wrong. - -B. Configuration using DFA_XTRA - -Rebuilding from pnglibconf.dfa is easy if a functioning 'awk', or a later -variant such as 'nawk' or 'gawk', is available. The configure build will -automatically find an appropriate awk and build pnglibconf.h. -The scripts/pnglibconf.mak file contains a set of make rules for doing the -same thing if configure is not used, and many of the makefiles in the scripts -directory use this approach. - -When rebuilding simply write a new file containing changed options and set -DFA_XTRA to the name of this file. This causes the build to append the new file -to the end of scripts/pnglibconf.dfa. The pngusr.dfa file should contain lines -of the following forms: - -everything = off - -This turns all optional features off. Include it at the start of pngusr.dfa to -make it easier to build a minimal configuration. You will need to turn at least -some features on afterward to enable either reading or writing code, or both. - -option feature on -option feature off - -Enable or disable a single feature. This will automatically enable other -features required by a feature that is turned on or disable other features that -require a feature which is turned off. Conflicting settings will cause an error -message to be emitted by awk. - -setting feature default value - -Changes the default value of setting 'feature' to 'value'. There are a small -number of settings listed at the top of pnglibconf.h, they are documented in the -source code. Most of these values have performance implications for the library -but most of them have no visible effect on the API. Some can also be overridden -from the API. - -This method of building a customized pnglibconf.h is illustrated in -contrib/pngminim/*. See the "$(PNGCONF):" target in the makefile and -pngusr.dfa in these directories. - -C. Configuration using PNG_USER_CONFIG - -If \-DPNG_USER_CONFIG is added to the CPPFLAGS when pnglibconf.h is built, -the file pngusr.h will automatically be included before the options in -scripts/pnglibconf.dfa are processed. Your pngusr.h file should contain only -macro definitions turning features on or off or setting settings. - -Apart from the global setting "everything = off" all the options listed above -can be set using macros in pngusr.h: - -#define PNG_feature_SUPPORTED - -is equivalent to: - -option feature on - -#define PNG_NO_feature - -is equivalent to: - -option feature off - -#define PNG_feature value - -is equivalent to: - -setting feature default value - -Notice that in both cases, pngusr.dfa and pngusr.h, the contents of the -pngusr file you supply override the contents of scripts/pnglibconf.dfa - -If confusing or incomprehensible behavior results it is possible to -examine the intermediate file pnglibconf.dfn to find the full set of -dependency information for each setting and option. Simply locate the -feature in the file and read the C comments that precede it. - -This method is also illustrated in the contrib/pngminim/* makefiles and -pngusr.h. - -.SH III. Reading - -We'll now walk you through the possible functions to call when reading -in a PNG file sequentially, briefly explaining the syntax and purpose -of each one. See example.c and png.h for more detail. While -progressive reading is covered in the next section, you will still -need some of the functions discussed in this section to read a PNG -file. - -.SS Setup - -You will want to do the I/O initialization(*) before you get into libpng, -so if it doesn't work, you don't have much to undo. Of course, you -will also want to insure that you are, in fact, dealing with a PNG -file. Libpng provides a simple check to see if a file is a PNG file. -To use it, pass in the first 1 to 8 bytes of the file to the function -png_sig_cmp(), and it will return 0 (false) if the bytes match the -corresponding bytes of the PNG signature, or nonzero (true) otherwise. -Of course, the more bytes you pass in, the greater the accuracy of the -prediction. - -If you are intending to keep the file pointer open for use in libpng, -you must ensure you don't read more than 8 bytes from the beginning -of the file, and you also have to make a call to png_set_sig_bytes() -with the number of bytes you read from the beginning. Libpng will -then only check the bytes (if any) that your program didn't read. - -(*): If you are not using the standard I/O functions, you will need -to replace them with custom functions. See the discussion under -Customizing libpng. - - FILE *fp = fopen(file_name, "rb"); - if (!fp) - { - return ERROR; - } - - if (fread(header, 1, number, fp) != number) - { - return ERROR; - } - - is_png = !png_sig_cmp(header, 0, number); - if (!is_png) - { - return NOT_PNG; - } - -Next, png_struct and png_info need to be allocated and initialized. In -order to ensure that the size of these structures is correct even with a -dynamically linked libpng, there are functions to initialize and -allocate the structures. We also pass the library version, optional -pointers to error handling functions, and a pointer to a data struct for -use by the error functions, if necessary (the pointer and functions can -be NULL if the default error handlers are to be used). See the section -on Changes to Libpng below regarding the old initialization functions. -The structure allocation functions quietly return NULL if they fail to -create the structure, so your application should check for that. - - png_structp png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - - if (!png_ptr) - return ERROR; - - png_infop info_ptr = png_create_info_struct(png_ptr); - - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, - (png_infopp)NULL, (png_infopp)NULL); - return ERROR; - } - -If you want to use your own memory allocation routines, -use a libpng that was built with PNG_USER_MEM_SUPPORTED defined, and use -png_create_read_struct_2() instead of png_create_read_struct(): - - png_structp png_ptr = png_create_read_struct_2 - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn, (png_voidp) - user_mem_ptr, user_malloc_fn, user_free_fn); - -The error handling routines passed to png_create_read_struct() -and the memory alloc/free routines passed to png_create_struct_2() -are only necessary if you are not using the libpng supplied error -handling and memory alloc/free functions. - -When libpng encounters an error, it expects to longjmp back -to your routine. Therefore, you will need to call setjmp and pass -your png_jmpbuf(png_ptr). If you read the file from different -routines, you will need to update the longjmp buffer every time you enter -a new routine that will call a png_*() function. - -See your documentation of setjmp/longjmp for your compiler for more -information on setjmp/longjmp. See the discussion on libpng error -handling in the Customizing Libpng section below for more information -on the libpng error handling. If an error occurs, and libpng longjmp's -back to your setjmp, you will want to call png_destroy_read_struct() to -free any memory. - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - &end_info); - fclose(fp); - return ERROR; - } - -Pass (png_infopp)NULL instead of &end_info if you didn't create -an end_info structure. - -If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_NO_SETJMP, in which case -errors will result in a call to PNG_ABORT() which defaults to abort(). - -You can #define PNG_ABORT() to a function that does something -more useful than abort(), as long as your function does not -return. - -Now you need to set up the input code. The default for libpng is to -use the C function fread(). If you use this, you will need to pass a -valid FILE * in the function png_init_io(). Be sure that the file is -opened in binary mode. If you wish to handle reading data in another -way, you need not call the png_init_io() function, but you must then -implement the libpng I/O methods discussed in the Customizing Libpng -section below. - - png_init_io(png_ptr, fp); - -If you had previously opened the file and read any of the signature from -the beginning in order to see if this was a PNG file, you need to let -libpng know that there are some bytes missing from the start of the file. - - png_set_sig_bytes(png_ptr, number); - -You can change the zlib compression buffer size to be used while -reading compressed data with - - png_set_compression_buffer_size(png_ptr, buffer_size); - -where the default size is 8192 bytes. Note that the buffer size -is changed immediately and the buffer is reallocated immediately, -instead of setting a flag to be acted upon later. - -If you want CRC errors to be handled in a different manner than -the default, use - - png_set_crc_action(png_ptr, crit_action, ancil_action); - -The values for png_set_crc_action() say how libpng is to handle CRC errors in -ancillary and critical chunks, and whether to use the data contained -therein. Starting with libpng-1.6.26, this also governs how an ADLER32 error -is handled while reading the IDAT chunk. Note that it is impossible to -"discard" data in a critical chunk. - -Choices for (int) crit_action are - PNG_CRC_DEFAULT 0 error/quit - PNG_CRC_ERROR_QUIT 1 error/quit - PNG_CRC_WARN_USE 3 warn/use data - PNG_CRC_QUIET_USE 4 quiet/use data - PNG_CRC_NO_CHANGE 5 use the current value - -Choices for (int) ancil_action are - PNG_CRC_DEFAULT 0 error/quit - PNG_CRC_ERROR_QUIT 1 error/quit - PNG_CRC_WARN_DISCARD 2 warn/discard data - PNG_CRC_WARN_USE 3 warn/use data - PNG_CRC_QUIET_USE 4 quiet/use data - PNG_CRC_NO_CHANGE 5 use the current value - -When the setting for crit_action is PNG_CRC_QUIET_USE, the CRC and ADLER32 -checksums are not only ignored, but they are not evaluated. - -.SS Setting up callback code - -You can set up a callback function to handle any unknown chunks in the -input stream. You must supply the function - - read_chunk_callback(png_structp png_ptr, - png_unknown_chunkp chunk); - { - /* The unknown chunk structure contains your - chunk data, along with similar data for any other - unknown chunks: */ - - png_byte name[5]; - png_byte *data; - size_t size; - - /* Note that libpng has already taken care of - the CRC handling */ - - /* put your code here. Search for your chunk in the - unknown chunk structure, process it, and return one - of the following: */ - - return \-n; /* chunk had an error */ - return 0; /* did not recognize */ - return n; /* success */ - } - -(You can give your function another name that you like instead of -"read_chunk_callback") - -To inform libpng about your function, use - - png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr, - read_chunk_callback); - -This names not only the callback function, but also a user pointer that -you can retrieve with - - png_get_user_chunk_ptr(png_ptr); - -If you call the png_set_read_user_chunk_fn() function, then all unknown -chunks which the callback does not handle will be saved when read. You can -cause them to be discarded by returning '1' ("handled") instead of '0'. This -behavior will change in libpng 1.7 and the default handling set by the -png_set_keep_unknown_chunks() function, described below, will be used when the -callback returns 0. If you want the existing behavior you should set the global -default to PNG_HANDLE_CHUNK_IF_SAFE now; this is compatible with all current -versions of libpng and with 1.7. Libpng 1.6 issues a warning if you keep the -default, or PNG_HANDLE_CHUNK_NEVER, and the callback returns 0. - -At this point, you can set up a callback function that will be -called after each row has been read, which you can use to control -a progress meter or the like. It's demonstrated in pngtest.c. -You must supply a function - - void read_row_callback(png_structp png_ptr, - png_uint_32 row, int pass); - { - /* put your code here */ - } - -(You can give it another name that you like instead of "read_row_callback") - -To inform libpng about your function, use - - png_set_read_status_fn(png_ptr, read_row_callback); - -When this function is called the row has already been completely processed and -the 'row' and 'pass' refer to the next row to be handled. For the -non-interlaced case the row that was just handled is simply one less than the -passed in row number, and pass will always be 0. For the interlaced case the -same applies unless the row value is 0, in which case the row just handled was -the last one from one of the preceding passes. Because interlacing may skip a -pass you cannot be sure that the preceding pass is just 'pass\-1'; if you really -need to know what the last pass is record (row,pass) from the callback and use -the last recorded value each time. - -As with the user transform you can find the output row using the -PNG_ROW_FROM_PASS_ROW macro. - -.SS Unknown-chunk handling - -Now you get to set the way the library processes unknown chunks in the -input PNG stream. Both known and unknown chunks will be read. Normal -behavior is that known chunks will be parsed into information in -various info_ptr members while unknown chunks will be discarded. This -behavior can be wasteful if your application will never use some known -chunk types. To change this, you can call: - - png_set_keep_unknown_chunks(png_ptr, keep, - chunk_list, num_chunks); - - keep - 0: default unknown chunk handling - 1: ignore; do not keep - 2: keep only if safe-to-copy - 3: keep even if unsafe-to-copy - - You can use these definitions: - PNG_HANDLE_CHUNK_AS_DEFAULT 0 - PNG_HANDLE_CHUNK_NEVER 1 - PNG_HANDLE_CHUNK_IF_SAFE 2 - PNG_HANDLE_CHUNK_ALWAYS 3 - - chunk_list - list of chunks affected (a byte string, - five bytes per chunk, NULL or '\0' if - num_chunks is positive; ignored if - numchunks <= 0). - - num_chunks - number of chunks affected; if 0, all - unknown chunks are affected. If positive, - only the chunks in the list are affected, - and if negative all unknown chunks and - all known chunks except for the IHDR, - PLTE, tRNS, IDAT, and IEND chunks are - affected. - -Unknown chunks declared in this way will be saved as raw data onto a -list of png_unknown_chunk structures. If a chunk that is normally -known to libpng is named in the list, it will be handled as unknown, -according to the "keep" directive. If a chunk is named in successive -instances of png_set_keep_unknown_chunks(), the final instance will -take precedence. The IHDR and IEND chunks should not be named in -chunk_list; if they are, libpng will process them normally anyway. -If you know that your application will never make use of some particular -chunks, use PNG_HANDLE_CHUNK_NEVER (or 1) as demonstrated below. - -Here is an example of the usage of png_set_keep_unknown_chunks(), -where the private "vpAg" chunk will later be processed by a user chunk -callback function: - - png_byte vpAg[5]={118, 112, 65, 103, (png_byte) '\0'}; - - #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) - png_byte unused_chunks[]= - { - 104, 73, 83, 84, (png_byte) '\0', /* hIST */ - 105, 84, 88, 116, (png_byte) '\0', /* iTXt */ - 112, 67, 65, 76, (png_byte) '\0', /* pCAL */ - 115, 67, 65, 76, (png_byte) '\0', /* sCAL */ - 115, 80, 76, 84, (png_byte) '\0', /* sPLT */ - 116, 73, 77, 69, (png_byte) '\0', /* tIME */ - }; - #endif - - ... - - #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) - /* ignore all unknown chunks - * (use global setting "2" for libpng16 and earlier): - */ - png_set_keep_unknown_chunks(read_ptr, 2, NULL, 0); - - /* except for vpAg: */ - png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1); - - /* also ignore unused known chunks: */ - png_set_keep_unknown_chunks(read_ptr, 1, unused_chunks, - (int)(sizeof unused_chunks)/5); - #endif - -.SS User limits - -The PNG specification allows the width and height of an image to be as -large as 2^(31\-1 (0x7fffffff), or about 2.147 billion rows and columns. -For safety, libpng imposes a default limit of 1 million rows and columns. -Larger images will be rejected immediately with a png_error() call. If -you wish to change these limits, you can use - - png_set_user_limits(png_ptr, width_max, height_max); - -to set your own limits (libpng may reject some very wide images -anyway because of potential buffer overflow conditions). - -You should put this statement after you create the PNG structure and -before calling png_read_info(), png_read_png(), or png_process_data(). - -When writing a PNG datastream, put this statement before calling -png_write_info() or png_write_png(). - -If you need to retrieve the limits that are being applied, use - - width_max = png_get_user_width_max(png_ptr); - height_max = png_get_user_height_max(png_ptr); - -The PNG specification sets no limit on the number of ancillary chunks -allowed in a PNG datastream. By default, libpng imposes a limit of -a total of 1000 sPLT, tEXt, iTXt, zTXt, and unknown chunks to be stored. -If you have set up both info_ptr and end_info_ptr, the limit applies -separately to each. You can change the limit on the total number of such -chunks that will be stored, with - - png_set_chunk_cache_max(png_ptr, user_chunk_cache_max); - -where 0x7fffffffL means unlimited. You can retrieve this limit with - - chunk_cache_max = png_get_chunk_cache_max(png_ptr); - -Libpng imposes a limit of 8 Megabytes (8,000,000 bytes) on the amount of -memory that any chunk other than IDAT can occupy, originally or when -decompressed (prior to libpng-1.6.32 the limit was only applied to compressed -chunks after decompression). You can change this limit with - - png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max); - -and you can retrieve the limit with - - chunk_malloc_max = png_get_chunk_malloc_max(png_ptr); - -Any chunks that would cause either of these limits to be exceeded will -be ignored. - -.SS Information about your system - -If you intend to display the PNG or to incorporate it in other image data you -need to tell libpng information about your display or drawing surface so that -libpng can convert the values in the image to match the display. - -From libpng-1.5.4 this information can be set before reading the PNG file -header. In earlier versions png_set_gamma() existed but behaved incorrectly if -called before the PNG file header had been read and png_set_alpha_mode() did not -exist. - -If you need to support versions prior to libpng-1.5.4 test the version number -as illustrated below using "PNG_LIBPNG_VER >= 10504" and follow the procedures -described in the appropriate manual page. - -You give libpng the encoding expected by your system expressed as a 'gamma' -value. You can also specify a default encoding for the PNG file in -case the required information is missing from the file. By default libpng -assumes that the PNG data matches your system, to keep this default call: - - png_set_gamma(png_ptr, screen_gamma, output_gamma); - -or you can use the fixed point equivalent: - - png_set_gamma_fixed(png_ptr, PNG_FP_1*screen_gamma, - PNG_FP_1*output_gamma); - -If you don't know the gamma for your system it is probably 2.2 - a good -approximation to the IEC standard for display systems (sRGB). If images are -too contrasty or washed out you got the value wrong - check your system -documentation! - -Many systems permit the system gamma to be changed via a lookup table in the -display driver, a few systems, including older Macs, change the response by -default. As of 1.5.4 three special values are available to handle common -situations: - - PNG_DEFAULT_sRGB: Indicates that the system conforms to the - IEC 61966-2-1 standard. This matches almost - all systems. - PNG_GAMMA_MAC_18: Indicates that the system is an older - (pre Mac OS 10.6) Apple Macintosh system with - the default settings. - PNG_GAMMA_LINEAR: Just the fixed point value for 1.0 - indicates - that the system expects data with no gamma - encoding. - -You would use the linear (unencoded) value if you need to process the pixel -values further because this avoids the need to decode and re-encode each -component value whenever arithmetic is performed. A lot of graphics software -uses linear values for this reason, often with higher precision component values -to preserve overall accuracy. - - -The output_gamma value expresses how to decode the output values, not how -they are encoded. The values used correspond to the normal numbers used to -describe the overall gamma of a computer display system; for example 2.2 for -an sRGB conformant system. The values are scaled by 100000 in the _fixed -version of the API (so 220000 for sRGB.) - -The inverse of the value is always used to provide a default for the PNG file -encoding if it has no gAMA chunk and if png_set_gamma() has not been called -to override the PNG gamma information. - -When the ALPHA_OPTIMIZED mode is selected the output gamma is used to encode -opaque pixels however pixels with lower alpha values are not encoded, -regardless of the output gamma setting. - -When the standard Porter Duff handling is requested with mode 1 the output -encoding is set to be linear and the output_gamma value is only relevant -as a default for input data that has no gamma information. The linear output -encoding will be overridden if png_set_gamma() is called - the results may be -highly unexpected! - -The following numbers are derived from the sRGB standard and the research -behind it. sRGB is defined to be approximated by a PNG gAMA chunk value of -0.45455 (1/2.2) for PNG. The value implicitly includes any viewing -correction required to take account of any differences in the color -environment of the original scene and the intended display environment; the -value expresses how to *decode* the image for display, not how the original -data was *encoded*. - -sRGB provides a peg for the PNG standard by defining a viewing environment. -sRGB itself, and earlier TV standards, actually use a more complex transform -(a linear portion then a gamma 2.4 power law) than PNG can express. (PNG is -limited to simple power laws.) By saying that an image for direct display on -an sRGB conformant system should be stored with a gAMA chunk value of 45455 -(11.3.3.2 and 11.3.3.5 of the ISO PNG specification) the PNG specification -makes it possible to derive values for other display systems and -environments. - -The Mac value is deduced from the sRGB based on an assumption that the actual -extra viewing correction used in early Mac display systems was implemented as -a power 1.45 lookup table. - -Any system where a programmable lookup table is used or where the behavior of -the final display device characteristics can be changed requires system -specific code to obtain the current characteristic. However this can be -difficult and most PNG gamma correction only requires an approximate value. - -By default, if png_set_alpha_mode() is not called, libpng assumes that all -values are unencoded, linear, values and that the output device also has a -linear characteristic. This is only very rarely correct - it is invariably -better to call png_set_alpha_mode() with PNG_DEFAULT_sRGB than rely on the -default if you don't know what the right answer is! - -The special value PNG_GAMMA_MAC_18 indicates an older Mac system (pre Mac OS -10.6) which used a correction table to implement a somewhat lower gamma on an -otherwise sRGB system. - -Both these values are reserved (not simple gamma values) in order to allow -more precise correction internally in the future. - -NOTE: the values can be passed to either the fixed or floating -point APIs, but the floating point API will also accept floating point -values. - -The second thing you may need to tell libpng about is how your system handles -alpha channel information. Some, but not all, PNG files contain an alpha -channel. To display these files correctly you need to compose the data onto a -suitable background, as described in the PNG specification. - -Libpng only supports composing onto a single color (using png_set_background; -see below). Otherwise you must do the composition yourself and, in this case, -you may need to call png_set_alpha_mode: - - #if PNG_LIBPNG_VER >= 10504 - png_set_alpha_mode(png_ptr, mode, screen_gamma); - #else - png_set_gamma(png_ptr, screen_gamma, 1.0/screen_gamma); - #endif - -The screen_gamma value is the same as the argument to png_set_gamma; however, -how it affects the output depends on the mode. png_set_alpha_mode() sets the -file gamma default to 1/screen_gamma, so normally you don't need to call -png_set_gamma. If you need different defaults call png_set_gamma() before -png_set_alpha_mode() - if you call it after it will override the settings made -by png_set_alpha_mode(). - -The mode is as follows: - - PNG_ALPHA_PNG: The data is encoded according to the PNG -specification. Red, green and blue, or gray, components are -gamma encoded color values and are not premultiplied by the -alpha value. The alpha value is a linear measure of the -contribution of the pixel to the corresponding final output pixel. - -You should normally use this format if you intend to perform -color correction on the color values; most, maybe all, color -correction software has no handling for the alpha channel and, -anyway, the math to handle pre-multiplied component values is -unnecessarily complex. - -Before you do any arithmetic on the component values you need -to remove the gamma encoding and multiply out the alpha -channel. See the PNG specification for more detail. It is -important to note that when an image with an alpha channel is -scaled, linear encoded, pre-multiplied component values must -be used! - -The remaining modes assume you don't need to do any further color correction or -that if you do, your color correction software knows all about alpha (it -probably doesn't!). They 'associate' the alpha with the color information by -storing color channel values that have been scaled by the alpha. The -advantage is that the color channels can be resampled (the image can be -scaled) in this form. The disadvantage is that normal practice is to store -linear, not (gamma) encoded, values and this requires 16-bit channels for -still images rather than the 8-bit channels that are just about sufficient if -gamma encoding is used. In addition all non-transparent pixel values, -including completely opaque ones, must be gamma encoded to produce the final -image. These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes -described below (the latter being the two common names for associated alpha -color channels). Note that PNG files always contain non-associated color -channels; png_set_alpha_mode() with one of the modes causes the decoder to -convert the pixels to an associated form before returning them to your -application. - -Since it is not necessary to perform arithmetic on opaque color values so -long as they are not to be resampled and are in the final color space it is -possible to optimize the handling of alpha by storing the opaque pixels in -the PNG format (adjusted for the output color space) while storing partially -opaque pixels in the standard, linear, format. The accuracy required for -standard alpha composition is relatively low, because the pixels are -isolated, therefore typically the accuracy loss in storing 8-bit linear -values is acceptable. (This is not true if the alpha channel is used to -simulate transparency over large areas - use 16 bits or the PNG mode in -this case!) This is the 'OPTIMIZED' mode. For this mode a pixel is -treated as opaque only if the alpha value is equal to the maximum value. - - PNG_ALPHA_STANDARD: The data libpng produces is encoded in the -standard way assumed by most correctly written graphics software. -The gamma encoding will be removed by libpng and the -linear component values will be pre-multiplied by the -alpha channel. - -With this format the final image must be re-encoded to -match the display gamma before the image is displayed. -If your system doesn't do that, yet still seems to -perform arithmetic on the pixels without decoding them, -it is broken - check out the modes below. - -With PNG_ALPHA_STANDARD libpng always produces linear -component values, whatever screen_gamma you supply. The -screen_gamma value is, however, used as a default for -the file gamma if the PNG file has no gamma information. - -If you call png_set_gamma() after png_set_alpha_mode() you -will override the linear encoding. Instead the -pre-multiplied pixel values will be gamma encoded but -the alpha channel will still be linear. This may -actually match the requirements of some broken software, -but it is unlikely. - -While linear 8-bit data is often used it has -insufficient precision for any image with a reasonable -dynamic range. To avoid problems, and if your software -supports it, use png_set_expand_16() to force all -components to 16 bits. - - PNG_ALPHA_OPTIMIZED: This mode is the same as PNG_ALPHA_STANDARD -except that completely opaque pixels are gamma encoded according to -the screen_gamma value. Pixels with alpha less than 1.0 -will still have linear components. - -Use this format if you have control over your -compositing software and so don't do other arithmetic -(such as scaling) on the data you get from libpng. Your -compositing software can simply copy opaque pixels to -the output but still has linear values for the -non-opaque pixels. - -In normal compositing, where the alpha channel encodes -partial pixel coverage (as opposed to broad area -translucency), the inaccuracies of the 8-bit -representation of non-opaque pixels are irrelevant. - -You can also try this format if your software is broken; -it might look better. - - PNG_ALPHA_BROKEN: This is PNG_ALPHA_STANDARD; however, all component -values, including the alpha channel are gamma encoded. 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. In most cases of broken software or hardware the bug in the -final display manifests as a subtle halo around composited parts of the -image. You may not even perceive this as a halo; the composited part of -the image may simply appear separate from the background, as though it had -been cut out of paper and pasted on afterward. - -If you don't have to deal with bugs in software or hardware, or if you can fix -them, there are three recommended ways of using png_set_alpha_mode(): - - png_set_alpha_mode(png_ptr, PNG_ALPHA_PNG, - screen_gamma); - -You can do color correction on the result (libpng does not currently -support color correction internally). When you handle the alpha channel -you need to undo the gamma encoding and multiply out the alpha. - - png_set_alpha_mode(png_ptr, PNG_ALPHA_STANDARD, - screen_gamma); - png_set_expand_16(png_ptr); - -If you are using the high level interface, don't call png_set_expand_16(); -instead pass PNG_TRANSFORM_EXPAND_16 to the interface. - -With this mode you can't do color correction, but you can do arithmetic, -including composition and scaling, on the data without further processing. - - png_set_alpha_mode(png_ptr, PNG_ALPHA_OPTIMIZED, - screen_gamma); - -You can avoid the expansion to 16-bit components with this mode, but you -lose the ability to scale the image or perform other linear arithmetic. -All you can do is compose the result onto a matching output. Since this -mode is libpng-specific you also need to write your own composition -software. - -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); - -Choices for the alpha_mode are - - PNG_ALPHA_PNG 0 /* according to the PNG standard */ - PNG_ALPHA_STANDARD 1 /* according to Porter/Duff */ - PNG_ALPHA_ASSOCIATED 1 /* as above; this is the normal practice */ - PNG_ALPHA_PREMULTIPLIED 1 /* as above */ - PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */ - PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */ - -PNG_ALPHA_PNG 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 were 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. - -If you don't need, or can't handle, the alpha channel you can call -png_set_background() to remove it by compositing against a fixed color. Don't -call png_set_strip_alpha() to do this - it will leave spurious pixel values in -transparent parts of this image. - - png_set_background(png_ptr, &background_color, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1); - -The background_color is an RGB or grayscale value according to the data format -libpng will produce for you. Because you don't yet know the format of the PNG -file, if you call png_set_background at this point you must arrange for the -format produced by libpng to always have 8-bit or 16-bit components and then -store the color as an 8-bit or 16-bit color as appropriate. The color contains -separate gray and RGB component values, so you can let libpng produce gray or -RGB output according to the input format, but low bit depth grayscale images -must always be converted to at least 8-bit format. (Even though low bit depth -grayscale images can't have an alpha channel they can have a transparent -color!) - -You set the transforms you need later, either as flags to the high level -interface or libpng API calls for the low level interface. For reference the -settings and API calls required are: - -8-bit values: - PNG_TRANSFORM_SCALE_16 | PNG_EXPAND - png_set_expand(png_ptr); png_set_scale_16(png_ptr); - - If you must get exactly the same inaccurate results - produced by default in versions prior to libpng-1.5.4, - use PNG_TRANSFORM_STRIP_16 and png_set_strip_16(png_ptr) - instead. - -16-bit values: - PNG_TRANSFORM_EXPAND_16 - png_set_expand_16(png_ptr); - -In either case palette image data will be expanded to RGB. If you just want -color data you can add PNG_TRANSFORM_GRAY_TO_RGB or png_set_gray_to_rgb(png_ptr) -to the list. - -Calling png_set_background before the PNG file header is read will not work -prior to libpng-1.5.4. Because the failure may result in unexpected warnings or -errors it is therefore much safer to call png_set_background after the head has -been read. Unfortunately this means that prior to libpng-1.5.4 it cannot be -used with the high level interface. - -.SS The high-level read interface - -At this point there are two ways to proceed; through the high-level -read interface, or through a sequence of low-level read operations. -You can use the high-level interface if (a) you are willing to read -the entire image into memory, and (b) the input transformations -you want to do are limited to the following set: - - PNG_TRANSFORM_IDENTITY No transformation - PNG_TRANSFORM_SCALE_16 Strip 16-bit samples to - 8-bit accurately - PNG_TRANSFORM_STRIP_16 Chop 16-bit samples to - 8-bit less accurately - PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel - PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit - samples to bytes - PNG_TRANSFORM_PACKSWAP Change order of packed - pixels to LSB first - PNG_TRANSFORM_EXPAND Perform set_expand() - PNG_TRANSFORM_INVERT_MONO Invert monochrome images - PNG_TRANSFORM_SHIFT Normalize pixels to the - sBIT depth - PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA - to BGRA - PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA - to AG - PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity - to transparency - PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples - PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples - to RGB (or GA to RGBA) - PNG_TRANSFORM_EXPAND_16 Expand samples to 16 bits - -(This excludes setting a background color, doing gamma transformation, -quantizing, and setting filler.) If this is the case, simply do this: - - png_read_png(png_ptr, info_ptr, png_transforms, NULL) - -where png_transforms is an integer containing the bitwise OR of some -set of transformation flags. This call is equivalent to png_read_info(), -followed the set of transformations indicated by the transform mask, -then png_read_image(), and finally png_read_end(). - -(The final parameter of this call is not yet used. Someday it might point -to transformation parameters required by some future input transform.) - -You must use png_transforms and not call any png_set_transform() functions -when you use png_read_png(). - -After you have called png_read_png(), you can retrieve the image data -with - - row_pointers = png_get_rows(png_ptr, info_ptr); - -where row_pointers is an array of pointers to the pixel data for each row: - - png_bytep row_pointers[height]; - -If you know your image size and pixel size ahead of time, you can allocate -row_pointers prior to calling png_read_png() with - - if (height > PNG_UINT_32_MAX/(sizeof (png_byte))) - png_error (png_ptr, - "Image is too tall to process in memory"); - - if (width > PNG_UINT_32_MAX/pixel_size) - png_error (png_ptr, - "Image is too wide to process in memory"); - - row_pointers = png_malloc(png_ptr, - height*(sizeof (png_bytep))); - - for (int i=0; i PNG_SIZE_MAX/(width*pixel_size)) { - png_error(png_ptr,"image_data buffer would be too large"); - } - - png_bytep buffer=png_malloc(png_ptr,height*width*pixel_size); - - for (int i=0; i) and -png_get_(png_ptr, info_ptr, ...) functions return non-zero if the -data has been read, or zero if it is missing. The parameters to the -png_get_ are set directly if they are simple data types, or a -pointer into the info_ptr is returned for any complex types. - -The colorspace data from gAMA, cHRM, sRGB, iCCP, and sBIT chunks -is simply returned to give the application information about how the -image was encoded. Libpng itself only does transformations using the file -gamma when combining semitransparent pixels with the background color, and, -since libpng-1.6.0, when converting between 8-bit sRGB and 16-bit linear pixels -within the simplified API. Libpng also uses the file gamma when converting -RGB to gray, beginning with libpng-1.0.5, if the application calls -png_set_rgb_to_gray()). - - png_get_PLTE(png_ptr, info_ptr, &palette, - &num_palette); - - palette - the palette for the file - (array of png_color) - - num_palette - number of entries in the palette - - png_get_gAMA(png_ptr, info_ptr, &file_gamma); - png_get_gAMA_fixed(png_ptr, info_ptr, &int_file_gamma); - - file_gamma - the gamma at which the file is - written (PNG_INFO_gAMA) - - int_file_gamma - 100,000 times the gamma at which the - file is written - - png_get_cHRM(png_ptr, info_ptr, &white_x, &white_y, &red_x, - &red_y, &green_x, &green_y, &blue_x, &blue_y) - png_get_cHRM_XYZ(png_ptr, info_ptr, &red_X, &red_Y, &red_Z, - &green_X, &green_Y, &green_Z, &blue_X, &blue_Y, - &blue_Z) - png_get_cHRM_fixed(png_ptr, info_ptr, &int_white_x, - &int_white_y, &int_red_x, &int_red_y, - &int_green_x, &int_green_y, &int_blue_x, - &int_blue_y) - png_get_cHRM_XYZ_fixed(png_ptr, info_ptr, &int_red_X, &int_red_Y, - &int_red_Z, &int_green_X, &int_green_Y, - &int_green_Z, &int_blue_X, &int_blue_Y, - &int_blue_Z) - - {white,red,green,blue}_{x,y} - A color space encoding specified using the - chromaticities of the end points and the - white point. (PNG_INFO_cHRM) - - {red,green,blue}_{X,Y,Z} - A color space encoding specified using the - encoding end points - the CIE tristimulus - specification of the intended color of the red, - green and blue channels in the PNG RGB data. - The white point is simply the sum of the three - end points. (PNG_INFO_cHRM) - - png_get_sRGB(png_ptr, info_ptr, &srgb_intent); - - srgb_intent - the rendering intent (PNG_INFO_sRGB) - The presence of the sRGB chunk - means that the pixel data is in the - sRGB color space. This chunk also - implies specific values of gAMA and - cHRM. - - png_get_iCCP(png_ptr, info_ptr, &name, - &compression_type, &profile, &proflen); - - name - The profile name. - - compression_type - The compression type; always - PNG_COMPRESSION_TYPE_BASE for PNG 1.0. - You may give NULL to this argument to - ignore it. - - profile - International Color Consortium color - profile data. May contain NULs. - - proflen - length of profile data in bytes. - - png_get_sBIT(png_ptr, info_ptr, &sig_bit); - - sig_bit - the number of significant bits for - (PNG_INFO_sBIT) each of the gray, - red, green, and blue channels, - whichever are appropriate for the - given color type (png_color_16) - - png_get_tRNS(png_ptr, info_ptr, &trans_alpha, - &num_trans, &trans_color); - - trans_alpha - array of alpha (transparency) - entries for palette (PNG_INFO_tRNS) - - num_trans - number of transparent entries - (PNG_INFO_tRNS) - - trans_color - graylevel or color sample values of - the single transparent color for - non-paletted images (PNG_INFO_tRNS) - - png_get_eXIf_1(png_ptr, info_ptr, &num_exif, &exif); - (PNG_INFO_eXIf) - - exif - Exif profile (array of png_byte) - - png_get_hIST(png_ptr, info_ptr, &hist); - (PNG_INFO_hIST) - - hist - histogram of palette (array of - png_uint_16) - - png_get_tIME(png_ptr, info_ptr, &mod_time); - - mod_time - time image was last modified - (PNG_VALID_tIME) - - png_get_bKGD(png_ptr, info_ptr, &background); - - background - background color (of type - png_color_16p) (PNG_VALID_bKGD) - valid 16-bit red, green and blue - values, regardless of color_type - - num_comments = png_get_text(png_ptr, info_ptr, - &text_ptr, &num_text); - - num_comments - number of comments - - text_ptr - array of png_text holding image - comments - - text_ptr[i].compression - type of compression used - on "text" PNG_TEXT_COMPRESSION_NONE - PNG_TEXT_COMPRESSION_zTXt - PNG_ITXT_COMPRESSION_NONE - PNG_ITXT_COMPRESSION_zTXt - - text_ptr[i].key - keyword for comment. Must contain - 1-79 characters. - - text_ptr[i].text - text comments for current - keyword. Can be empty. - - text_ptr[i].text_length - length of text string, - after decompression, 0 for iTXt - - text_ptr[i].itxt_length - length of itxt string, - after decompression, 0 for tEXt/zTXt - - text_ptr[i].lang - language of comment (empty - string for unknown). - - text_ptr[i].lang_key - keyword in UTF-8 - (empty string for unknown). - - Note that the itxt_length, lang, and lang_key - members of the text_ptr 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, - they contain NULL pointers when the "compression" - field contains PNG_TEXT_COMPRESSION_NONE or - PNG_TEXT_COMPRESSION_zTXt. - - num_text - number of comments (same as - num_comments; you can put NULL here - to avoid the duplication) - - Note while png_set_text() will accept text, language, - and translated keywords that can be 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. - - num_spalettes = png_get_sPLT(png_ptr, info_ptr, - &palette_ptr); - - num_spalettes - number of sPLT chunks read. - - palette_ptr - array of palette structures holding - contents of one or more sPLT chunks - read. - - png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, - &unit_type); - - offset_x - positive offset from the left edge - of the screen (can be negative) - - offset_y - positive offset from the top edge - of the screen (can be negative) - - unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER - - png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, - &unit_type); - - res_x - pixels/unit physical resolution in - x direction - - res_y - pixels/unit physical resolution in - x direction - - unit_type - PNG_RESOLUTION_UNKNOWN, - PNG_RESOLUTION_METER - - png_get_sCAL(png_ptr, info_ptr, &unit, &width, - &height) - - unit - physical scale units (an integer) - - width - width of a pixel in physical scale units - - height - height of a pixel in physical scale units - (width and height are doubles) - - png_get_sCAL_s(png_ptr, info_ptr, &unit, &width, - &height) - - unit - physical scale units (an integer) - - width - width of a pixel in physical scale units - (expressed as a string) - - height - height of a pixel in physical scale units - (width and height are strings like "2.54") - - num_unknown_chunks = png_get_unknown_chunks(png_ptr, - info_ptr, &unknowns) - - unknowns - array of png_unknown_chunk - structures holding unknown chunks - - unknowns[i].name - name of unknown chunk - - unknowns[i].data - data of unknown chunk - - unknowns[i].size - size of unknown chunk's data - - unknowns[i].location - position of chunk in file - - The value of "i" corresponds to the order in which the - chunks were read from the PNG file or inserted with the - png_set_unknown_chunks() function. - - The value of "location" is a bitwise "or" of - - PNG_HAVE_IHDR (0x01) - PNG_HAVE_PLTE (0x02) - PNG_AFTER_IDAT (0x08) - -The data from the pHYs chunk can be retrieved in several convenient -forms: - - res_x = png_get_x_pixels_per_meter(png_ptr, - info_ptr) - - res_y = png_get_y_pixels_per_meter(png_ptr, - info_ptr) - - res_x_and_y = png_get_pixels_per_meter(png_ptr, - info_ptr) - - res_x = png_get_x_pixels_per_inch(png_ptr, - info_ptr) - - res_y = png_get_y_pixels_per_inch(png_ptr, - info_ptr) - - res_x_and_y = png_get_pixels_per_inch(png_ptr, - info_ptr) - - aspect_ratio = png_get_pixel_aspect_ratio(png_ptr, - info_ptr) - - Each of these returns 0 [signifying "unknown"] if - the data is not present or if res_x is 0; - res_x_and_y is 0 if res_x != res_y - - Note that because of the way the resolutions are - stored internally, the inch conversions won't - come out to exactly even number. For example, - 72 dpi is stored as 0.28346 pixels/meter, and - when this is retrieved it is 71.9988 dpi, so - be sure to round the returned value appropriately - if you want to display a reasonable-looking result. - -The data from the oFFs chunk can be retrieved in several convenient -forms: - - x_offset = png_get_x_offset_microns(png_ptr, info_ptr); - - y_offset = png_get_y_offset_microns(png_ptr, info_ptr); - - x_offset = png_get_x_offset_inches(png_ptr, info_ptr); - - y_offset = png_get_y_offset_inches(png_ptr, info_ptr); - - Each of these returns 0 [signifying "unknown" if both - x and y are 0] if the data is not present or if the - chunk is present but the unit is the pixel. The - remark about inexact inch conversions applies here - as well, because a value in inches can't always be - converted to microns and back without some loss - of precision. - -For more information, see the -PNG specification for chunk contents. Be careful with trusting -rowbytes, as some of the transformations could increase the space -needed to hold a row (expand, filler, gray_to_rgb, etc.). -See png_read_update_info(), below. - -A quick word about text_ptr and num_text. PNG stores comments in -keyword/text pairs, one pair per chunk, with no limit on the number -of text chunks, and a 2^31 byte limit on their size. While there are -suggested keywords, there is no requirement to restrict the use to these -strings. It is strongly suggested that keywords and text be sensible -to humans (that's the point), so don't use abbreviations. Non-printing -symbols are not allowed. See the PNG specification for more details. -There is also no requirement to have text after the keyword. - -Keywords should be limited to 79 Latin-1 characters without leading or -trailing spaces, but non-consecutive spaces are allowed within the -keyword. It is possible to have the same keyword any number of times. -The text_ptr is an array of png_text structures, each holding a -pointer to a language string, a pointer to a keyword and a pointer to -a text string. The text string, language code, and translated -keyword may be empty or NULL pointers. The keyword/text -pairs are put into the array in the order that they are received. -However, some or all of the text chunks may be after the image, so, to -make sure you have read all the text chunks, don't mess with these -until after you read the stuff after the image. This will be -mentioned again below in the discussion that goes with png_read_end(). - -.SS Input transformations - -After you've read the header information, you can set up the library -to handle any special transformations of the image data. The various -ways to transform the data will be described in the order that they -should occur. This is important, as some of these change the color -type and/or bit depth of the data, and some others only work on -certain color types and bit depths. - -Transformations you request are ignored if they don't have any meaning for a -particular input data format. However some transformations can have an effect -as a result of a previous transformation. If you specify a contradictory set of -transformations, for example both adding and removing the alpha channel, you -cannot predict the final result. - -The color used for the transparency values should be supplied in the same -format/depth as the current image data. It is stored in the same format/depth -as the image data in a tRNS chunk, so this is what libpng expects for this data. - -The color used for the background value depends on the need_expand argument as -described below. - -Data will be decoded into the supplied row buffers packed into bytes -unless the library has been told to transform it into another format. -For example, 4 bit/pixel paletted or grayscale data will be returned -2 pixels/byte with the leftmost pixel in the high-order bits of the byte, -unless png_set_packing() is called. 8-bit RGB data will be stored -in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha() -is called to insert filler bytes, either before or after each RGB triplet. - -16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant -byte of the color value first, unless png_set_scale_16() is called to -transform it to regular RGB RGB triplets, or png_set_filler() or -png_set_add alpha() is called to insert two filler bytes, either before -or after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can -be modified with png_set_filler(), png_set_add_alpha(), png_set_strip_16(), -or png_set_scale_16(). - -The following code transforms grayscale images of less than 8 to 8 bits, -changes paletted images to RGB, and adds a full alpha channel if there is -transparency information in a tRNS chunk. This is most useful on -grayscale images with bit depths of 2 or 4 or if there is a multiple-image -viewing application that wishes to treat all images in the same way. - - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_palette_to_rgb(png_ptr); - - if (png_get_valid(png_ptr, info_ptr, - PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); - - if (color_type == PNG_COLOR_TYPE_GRAY && - bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr); - -The first two functions are actually aliases for png_set_expand(), added -in libpng version 1.0.4, with the function names expanded to improve code -readability. In some future version they may actually do different -things. - -As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was -added. It expands the sample depth without changing tRNS to alpha. - -As of libpng version 1.5.2, png_set_expand_16() was added. It behaves as -png_set_expand(); however, the resultant channels have 16 bits rather than 8. -Use this when the output color or gray channels are made linear to avoid fairly -severe accuracy loss. - - if (bit_depth < 16) - png_set_expand_16(png_ptr); - -PNG can have files with 16 bits per channel. If you only can handle -8 bits per channel, this will strip the pixels down to 8-bit. - - if (bit_depth == 16) -#if PNG_LIBPNG_VER >= 10504 - png_set_scale_16(png_ptr); -#else - png_set_strip_16(png_ptr); -#endif - -(The more accurate "png_set_scale_16()" API became available in libpng version -1.5.4). - -If you need to process the alpha channel on the image separately from the image -data (for example if you convert it to a bitmap mask) it is possible to have -libpng strip the channel leaving just RGB or gray data: - - if (color_type & PNG_COLOR_MASK_ALPHA) - png_set_strip_alpha(png_ptr); - -If you strip the alpha channel you need to find some other way of dealing with -the information. If, instead, you want to convert the image to an opaque -version with no alpha channel use png_set_background; see below. - -As of libpng version 1.5.2, almost all useful expansions are supported, the -major ommissions are conversion of grayscale to indexed images (which can be -done trivially in the application) and conversion of indexed to grayscale (which -can be done by a trivial manipulation of the palette.) - -In the following table, the 01 means grayscale with depth<8, 31 means -indexed with depth<8, other numerals represent the color type, "T" means -the tRNS chunk is present, A means an alpha channel is present, and O -means tRNS or alpha is present but all pixels in the image are opaque. - - FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O - TO - 01 - [G] - - - - - - - - - - - - - - 31 [Q] Q [Q] [Q] [Q] Q Q Q Q Q Q [Q] [Q] Q Q - 0 1 G + . . G G G G G G B B GB GB - 0T lt Gt t + . Gt G G Gt G G Bt Bt GBt GBt - 0O lt Gt t . + Gt Gt G Gt Gt G Bt Bt GBt GBt - 2 C P C C C + . . C - - CB CB B B - 2T Ct - Ct C C t + t - - - CBt CBt Bt Bt - 2O Ct - Ct C C t t + - - - CBt CBt Bt Bt - 3 [Q] p [Q] [Q] [Q] Q Q Q + . . [Q] [Q] Q Q - 3T [Qt] p [Qt][Q] [Q] Qt Qt Qt t + t [Qt][Qt] Qt Qt - 3O [Qt] p [Qt][Q] [Q] Qt Qt Qt t t + [Qt][Qt] Qt Qt - 4A lA G A T T GA GT GT GA GT GT + BA G GBA - 4O lA GBA A T T GA GT GT GA GT GT BA + GBA G - 6A CA PA CA C C A T tT PA P P C CBA + BA - 6O CA PBA CA C C A tT T PA P P CBA C BA + - -Within the matrix, - "+" identifies entries where 'from' and 'to' are the same. - "-" means the transformation is not supported. - "." means nothing is necessary (a tRNS chunk can just be ignored). - "t" means the transformation is obtained by png_set_tRNS. - "A" means the transformation is obtained by png_set_add_alpha(). - "X" means the transformation is obtained by png_set_expand(). - "1" means the transformation is obtained by - png_set_expand_gray_1_2_4_to_8() (and by png_set_expand() - if there is no transparency in the original or the final - format). - "C" means the transformation is obtained by png_set_gray_to_rgb(). - "G" means the transformation is obtained by png_set_rgb_to_gray(). - "P" means the transformation is obtained by - png_set_expand_palette_to_rgb(). - "p" means the transformation is obtained by png_set_packing(). - "Q" means the transformation is obtained by png_set_quantize(). - "T" means the transformation is obtained by - png_set_tRNS_to_alpha(). - "B" means the transformation is obtained by - png_set_background(), or png_strip_alpha(). - -When an entry has multiple transforms listed all are required to cause the -right overall transformation. When two transforms are separated by a comma -either will do the job. When transforms are enclosed in [] the transform should -do the job but this is currently unimplemented - a different format will result -if the suggested transformations are used. - -In PNG files, the alpha channel in an image -is the level of opacity. If you need the alpha channel in an image to -be the level of transparency instead of opacity, you can invert the -alpha channel (or the tRNS chunk data) after it's read, so that 0 is -fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit -images) is fully transparent, with - - png_set_invert_alpha(png_ptr); - -PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as -they can, resulting in, for example, 8 pixels per byte for 1 bit -files. This code expands to 1 pixel per byte without changing the -values of the pixels: - - if (bit_depth < 8) - png_set_packing(png_ptr); - -PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels -stored in a PNG image have been "scaled" or "shifted" up to the next -higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] -to 8 bits/sample in the range [0, 255]). However, it is also possible -to convert the PNG pixel data back to the original bit depth of the -image. This call reduces the pixels back down to the original bit depth: - - png_color_8p sig_bit; - - if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) - png_set_shift(png_ptr, sig_bit); - -PNG files store 3-color pixels in red, green, blue order. This code -changes the storage of the pixels to blue, green, red: - - if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_bgr(png_ptr); - -PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them -into 4 or 8 bytes for windowing systems that need them in this format: - - if (color_type == PNG_COLOR_TYPE_RGB) - png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE); - -where "filler" is the 8-bit or 16-bit number to fill with, and the location -is either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether -you want the filler before the RGB or after. When filling an 8-bit pixel, -the least significant 8 bits of the number are used, if a 16-bit number is -supplied. This transformation does not affect images that already have full -alpha channels. To add an opaque alpha channel, use filler=0xffff and -PNG_FILLER_AFTER which will generate RGBA pixels. - -Note that png_set_filler() does not change the color type. If you want -to do that, you can add a true alpha channel with - - if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_GRAY) - png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER); - -where "filler" contains the alpha value to assign to each pixel. -The png_set_add_alpha() function was added in libpng-1.2.7. - -If you are reading an image with an alpha channel, and you need the -data as ARGB instead of the normal PNG format RGBA: - - if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_swap_alpha(png_ptr); - -For some uses, you may want a grayscale image to be represented as -RGB. This code will do that conversion: - - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - -Conversely, you can convert an RGB or RGBA image to grayscale or grayscale -with alpha. - - if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_rgb_to_gray(png_ptr, error_action, - double red_weight, double green_weight); - - error_action = 1: silently do the conversion - - error_action = 2: issue a warning if the original - image has any pixel where - red != green or red != blue - - error_action = 3: issue an error and abort the - conversion if the original - image has any pixel where - red != green or red != blue - - red_weight: weight of red component - - green_weight: weight of green component - If either weight is negative, default - weights are used. - -In the corresponding fixed point API the red_weight and green_weight values are -simply scaled by 100,000: - - png_set_rgb_to_gray(png_ptr, error_action, - png_fixed_point red_weight, - png_fixed_point green_weight); - -If you have set error_action = 1 or 2, you can -later check whether the image really was gray, after processing -the image rows, with the png_get_rgb_to_gray_status(png_ptr) function. -It will return a png_byte that is zero if the image was gray or -1 if there were any non-gray pixels. Background and sBIT data -will be silently converted to grayscale, using the green channel -data for sBIT, regardless of the error_action setting. - -The default values come from the PNG file cHRM chunk if present; otherwise, the -defaults correspond to the ITU-R recommendation 709, and also the sRGB color -space, as recommended in the Charles Poynton's Colour FAQ, -Copyright (c) 2006-11-28 Charles Poynton, in section 9: - - - - Y = 0.2126 * R + 0.7152 * G + 0.0722 * B - -Previous versions of this document, 1998 through 2002, recommended a slightly -different formula: - - Y = 0.212671 * R + 0.715160 * G + 0.072169 * B - -Libpng uses an integer approximation: - - Y = (6968 * R + 23434 * G + 2366 * B)/32768 - -The calculation is done in a linear colorspace, if the image gamma -can be determined. - -The png_set_background() function has been described already; it tells libpng to -composite images with alpha or simple transparency against the supplied -background color. For compatibility with versions of libpng earlier than -libpng-1.5.4 it is recommended that you call the function after reading the file -header, even if you don't want to use the color in a bKGD chunk, if one exists. - -If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), -you may use this color, or supply another color more suitable for -the current display (e.g., the background color from a web page). You -need to tell libpng how the color is represented, both the format of the -component values in the color (the number of bits) and the gamma encoding of the -color. The function takes two arguments, background_gamma_mode and need_expand -to convey this information; however, only two combinations are likely to be -useful: - - png_color_16 my_background; - png_color_16p image_background; - - if (png_get_bKGD(png_ptr, info_ptr, &image_background)) - png_set_background(png_ptr, image_background, - PNG_BACKGROUND_GAMMA_FILE, 1/*needs to be expanded*/, 1); - else - png_set_background(png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0/*do not expand*/, 1); - -The second call was described above - my_background is in the format of the -final, display, output produced by libpng. Because you now know the format of -the PNG it is possible to avoid the need to choose either 8-bit or 16-bit -output and to retain palette images (the palette colors will be modified -appropriately and the tRNS chunk removed.) However, if you are doing this, -take great care not to ask for transformations without checking first that -they apply! - -In the first call the background color has the original bit depth and color type -of the PNG file. So, for palette images the color is supplied as a palette -index and for low bit greyscale images the color is a reduced bit value in -image_background->gray. - -If you didn't call png_set_gamma() before reading the file header, for example -if you need your code to remain compatible with older versions of libpng prior -to libpng-1.5.4, this is the place to call it. - -Do not call it if you called png_set_alpha_mode(); doing so will damage the -settings put in place by png_set_alpha_mode(). (If png_set_alpha_mode() is -supported then you can certainly do png_set_gamma() before reading the PNG -header.) - -This API unconditionally sets the screen and file gamma values, so it will -override the value in the PNG file unless it is called before the PNG file -reading starts. For this reason you must always call it with the PNG file -value when you call it in this position: - - if (png_get_gAMA(png_ptr, info_ptr, &file_gamma)) - png_set_gamma(png_ptr, screen_gamma, file_gamma); - - else - png_set_gamma(png_ptr, screen_gamma, 0.45455); - -If you need to reduce an RGB file to a paletted file, or if a paletted -file has more entries than will fit on your screen, png_set_quantize() -will do that. Note that this is a simple match quantization that merely -finds the closest color available. This should work fairly well with -optimized palettes, but fairly badly with linear color cubes. If you -pass a palette that is larger than maximum_colors, the file will -reduce the number of colors in the palette so it will fit into -maximum_colors. If there is a histogram, libpng will use it to make -more intelligent choices when reducing the palette. If there is no -histogram, it may not do as good a job. - - if (color_type & PNG_COLOR_MASK_COLOR) - { - if (png_get_valid(png_ptr, info_ptr, - PNG_INFO_PLTE)) - { - png_uint_16p histogram = NULL; - - png_get_hIST(png_ptr, info_ptr, - &histogram); - png_set_quantize(png_ptr, palette, num_palette, - max_screen_colors, histogram, 1); - } - - else - { - png_color std_color_cube[MAX_SCREEN_COLORS] = - { ... colors ... }; - - png_set_quantize(png_ptr, std_color_cube, - MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, - NULL,0); - } - } - -PNG files describe monochrome as black being zero and white being one. -The following code will reverse this (make black be one and white be -zero): - - if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY) - png_set_invert_mono(png_ptr); - -This function can also be used to invert grayscale and gray-alpha images: - - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_invert_mono(png_ptr); - -PNG files store 16-bit pixels in network byte order (big-endian, -ie. most significant bits first). This code changes the storage to the -other way (little-endian, i.e. least significant bits first, the -way PCs store them): - - if (bit_depth == 16) - png_set_swap(png_ptr); - -If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you -need to change the order the pixels are packed into bytes, you can use: - - if (bit_depth < 8) - png_set_packswap(png_ptr); - -Finally, you can write your own transformation function if none of -the existing ones meets your needs. This is done by setting a callback -with - - png_set_read_user_transform_fn(png_ptr, - read_transform_fn); - -You must supply the function - - void read_transform_fn(png_structp png_ptr, png_row_infop - row_info, png_bytep data) - -See pngtest.c for a working example. Your function will be called -after all of the other transformations have been processed. Take care with -interlaced images if you do the interlace yourself - the width of the row is the -width in 'row_info', not the overall image width. - -If supported, libpng provides two information routines that you can use to find -where you are in processing the image: - - png_get_current_pass_number(png_structp png_ptr); - png_get_current_row_number(png_structp png_ptr); - -Don't try using these outside a transform callback - firstly they are only -supported if user transforms are supported, secondly they may well return -unexpected results unless the row is actually being processed at the moment they -are called. - -With interlaced -images the value returned is the row in the input sub-image image. 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). - -The discussion of interlace handling above contains more information on how to -use these values. - -You can also set up a pointer to a user structure for use by your -callback function, and you can inform libpng that your transform -function will change the number of channels or bit depth with the -function - - png_set_user_transform_info(png_ptr, user_ptr, - user_depth, user_channels); - -The user's application, not libpng, is responsible for allocating and -freeing any memory required for the user structure. - -You can retrieve the pointer via the function -png_get_user_transform_ptr(). For example: - - voidp read_user_transform_ptr = - png_get_user_transform_ptr(png_ptr); - -The last thing to handle is interlacing; this is covered in detail below, -but you must call the function here if you want libpng to handle expansion -of the interlaced image. - - number_of_passes = png_set_interlace_handling(png_ptr); - -After setting the transformations, libpng can update your png_info -structure to reflect any transformations you've requested with this -call. - - png_read_update_info(png_ptr, info_ptr); - -This is most useful to update the info structure's rowbytes -field so you can use it to allocate your image memory. This function -will also update your palette with the correct screen_gamma and -background if these have been given with the calls above. You may -only call png_read_update_info() once with a particular info_ptr. - -After you call png_read_update_info(), you can allocate any -memory you need to hold the image. The row data is simply -raw byte data for all forms of images. As the actual allocation -varies among applications, no example will be given. If you -are allocating one large chunk, you will need to build an -array of pointers to each row, as it will be needed for some -of the functions below. - -Be sure that your platform can allocate the buffer that you'll need. -libpng internally checks for oversize width, but you'll need to -do your own check for number_of_rows*width*pixel_size if you are using -a multiple-row buffer: - - /* Guard against integer overflow */ - if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size)) { - png_error(png_ptr,"image_data buffer would be too large"); - } - -Remember: Before you call png_read_update_info(), the png_get_*() -functions return the values corresponding to the original PNG image. -After you call png_read_update_info the values refer to the image -that libpng will output. Consequently you must call all the png_set_ -functions before you call png_read_update_info(). This is particularly -important for png_set_interlace_handling() - if you are going to call -png_read_update_info() you must call png_set_interlace_handling() before -it unless you want to receive interlaced output. - -.SS Reading image data - -After you've allocated memory, you can read the image data. -The simplest way to do this is in one function call. If you are -allocating enough memory to hold the whole image, you can just -call png_read_image() and libpng will read in all the image data -and put it in the memory area supplied. You will need to pass in -an array of pointers to each row. - -This function automatically handles interlacing, so you don't -need to call png_set_interlace_handling() (unless you call -png_read_update_info()) or call this function multiple times, or any -of that other stuff necessary with png_read_rows(). - - png_read_image(png_ptr, row_pointers); - -where row_pointers is: - - png_bytep row_pointers[height]; - -You can point to void or char or whatever you use for pixels. - -If you don't want to read in the whole image at once, you can -use png_read_rows() instead. If there is no interlacing (check -interlace_type == PNG_INTERLACE_NONE), this is simple: - - png_read_rows(png_ptr, row_pointers, NULL, - number_of_rows); - -where row_pointers is the same as in the png_read_image() call. - -If you are doing this just one row at a time, you can do this with -a single row_pointer instead of an array of row_pointers: - - png_bytep row_pointer = row; - png_read_row(png_ptr, row_pointer, NULL); - -If the file is interlaced (interlace_type != 0 in the IHDR chunk), things -get somewhat harder. The only current (PNG Specification version 1.2) -interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7); -a somewhat complicated 2D interlace scheme, known as Adam7, that -breaks down an image into seven smaller images of varying size, based -on an 8x8 grid. This number is defined (from libpng 1.5) as -PNG_INTERLACE_ADAM7_PASSES in png.h - -libpng can fill out those images or it can give them to you "as is". -It is almost always better to have libpng handle the interlacing for you. -If you want the images filled out, there are two ways to do that. The one -mentioned in the PNG specification is to expand each pixel to cover -those pixels that have not been read yet (the "rectangle" method). -This results in a blocky image for the first pass, which gradually -smooths out as more pixels are read. The other method is the "sparkle" -method, where pixels are drawn only in their final locations, with the -rest of the image remaining whatever colors they were initialized to -before the start of the read. The first method usually looks better, -but tends to be slower, as there are more pixels to put in the rows. - -If, as is likely, you want libpng to expand the images, call this before -calling png_start_read_image() or png_read_update_info(): - - if (interlace_type == PNG_INTERLACE_ADAM7) - number_of_passes - = png_set_interlace_handling(png_ptr); - -This will return the number of passes needed. Currently, this is seven, -but may change if another interlace type is added. This function can be -called even if the file is not interlaced, where it will return one pass. -You then need to read the whole image 'number_of_passes' times. Each time -will distribute the pixels from the current pass to the correct place in -the output image, so you need to supply the same rows to png_read_rows in -each pass. - -If you are not going to display the image after each pass, but are -going to wait until the entire image is read in, use the sparkle -effect. This effect is faster and the end result of either method -is exactly the same. If you are planning on displaying the image -after each pass, the "rectangle" effect is generally considered the -better looking one. - -If you only want the "sparkle" effect, just call png_read_row() or -png_read_rows() as -normal, with the third parameter NULL. Make sure you make pass over -the image number_of_passes times, and you don't change the data in the -rows between calls. You can change the locations of the data, just -not the data. Each pass only writes the pixels appropriate for that -pass, and assumes the data from previous passes is still valid. - - png_read_rows(png_ptr, row_pointers, NULL, - number_of_rows); - or - png_read_row(png_ptr, row_pointers, NULL); - -If you only want the first effect (the rectangles), do the same as -before except pass the row buffer in the third parameter, and leave -the second parameter NULL. - - png_read_rows(png_ptr, NULL, row_pointers, - number_of_rows); - or - png_read_row(png_ptr, NULL, row_pointers); - -If you don't want libpng to handle the interlacing details, just call -png_read_rows() PNG_INTERLACE_ADAM7_PASSES times to read in all the images. -Each of the images is a valid image by itself; however, you will almost -certainly need to distribute the pixels from each sub-image to the -correct place. This is where everything gets very tricky. - -If you want to retrieve the separate images you must pass the correct -number of rows to each successive call of png_read_rows(). The calculation -gets pretty complicated for small images, where some sub-images may -not even exist because either their width or height ends up zero. -libpng provides two macros to help you in 1.5 and later versions: - - png_uint_32 width = PNG_PASS_COLS(image_width, pass_number); - png_uint_32 height = PNG_PASS_ROWS(image_height, pass_number); - -Respectively these tell you the width and height of the sub-image -corresponding to the numbered pass. 'pass' is in in the range 0 to 6 - -this can be confusing because the specification refers to the same passes -as 1 to 7! Be careful, you must check both the width and height before -calling png_read_rows() and not call it for that pass if either is zero. - -You can, of course, read each sub-image row by row. If you want to -produce optimal code to make a pixel-by-pixel transformation of an -interlaced image this is the best approach; read each row of each pass, -transform it, and write it out to a new interlaced image. - -If you want to de-interlace the image yourself libpng provides further -macros to help that tell you where to place the pixels in the output image. -Because the interlacing scheme is rectangular - sub-image pixels are always -arranged on a rectangular grid - all you need to know for each pass is the -starting column and row in the output image of the first pixel plus the -spacing between each pixel. As of libpng 1.5 there are four macros to -retrieve this information: - - png_uint_32 x = PNG_PASS_START_COL(pass); - png_uint_32 y = PNG_PASS_START_ROW(pass); - png_uint_32 xStep = 1U << PNG_PASS_COL_SHIFT(pass); - png_uint_32 yStep = 1U << PNG_PASS_ROW_SHIFT(pass); - -These allow you to write the obvious loop: - - png_uint_32 input_y = 0; - png_uint_32 output_y = PNG_PASS_START_ROW(pass); - - while (output_y < output_image_height) - { - png_uint_32 input_x = 0; - png_uint_32 output_x = PNG_PASS_START_COL(pass); - - while (output_x < output_image_width) - { - image[output_y][output_x] = - subimage[pass][input_y][input_x++]; - - output_x += xStep; - } - - ++input_y; - output_y += yStep; - } - -Notice that the steps between successive output rows and columns are -returned as shifts. This is possible because the pixels in the subimages -are always a power of 2 apart - 1, 2, 4 or 8 pixels - in the original -image. In practice you may need to directly calculate the output coordinate -given an input coordinate. libpng provides two further macros for this -purpose: - - png_uint_32 output_x = PNG_COL_FROM_PASS_COL(input_x, pass); - png_uint_32 output_y = PNG_ROW_FROM_PASS_ROW(input_y, pass); - -Finally a pair of macros are provided to tell you if a particular image -row or column appears in a given pass: - - int col_in_pass = PNG_COL_IN_INTERLACE_PASS(output_x, pass); - int row_in_pass = PNG_ROW_IN_INTERLACE_PASS(output_y, pass); - -Bear in mind that you will probably also need to check the width and height -of the pass in addition to the above to be sure the pass even exists! - -With any luck you are convinced by now that you don't want to do your own -interlace handling. In reality normally the only good reason for doing this -is if you are processing PNG files on a pixel-by-pixel basis and don't want -to load the whole file into memory when it is interlaced. - -libpng includes a test program, pngvalid, that illustrates reading and -writing of interlaced images. If you can't get interlacing to work in your -code and don't want to leave it to libpng (the recommended approach), see -how pngvalid.c does it. - -.SS Finishing a sequential read - -After you are finished reading the image through the -low-level interface, you can finish reading the file. - -If you want to use a different crc action for handling CRC errors in -chunks after the image data, you can call png_set_crc_action() -again at this point. - -If you are interested in comments or time, which may be stored either -before or after the image data, you should pass the separate png_info -struct if you want to keep the comments from before and after the image -separate. - - png_infop end_info = png_create_info_struct(png_ptr); - - if (!end_info) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return ERROR; - } - - png_read_end(png_ptr, end_info); - -If you are not interested, you should still call png_read_end() -but you can pass NULL, avoiding the need to create an end_info structure. -If you do this, libpng will not process any chunks after IDAT other than -skipping over them and perhaps (depending on whether you have called -png_set_crc_action) checking their CRCs while looking for the IEND chunk. - - png_read_end(png_ptr, (png_infop)NULL); - -If you don't call png_read_end(), then your file pointer will be -left pointing to the first chunk after the last IDAT, which is probably -not what you want if you expect to read something beyond the end of -the PNG datastream. - -When you are done, you can free all memory allocated by libpng like this: - - png_destroy_read_struct(&png_ptr, &info_ptr, - &end_info); - -or, if you didn't create an end_info structure, - - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - -It is also possible to individually free the info_ptr members that -point to libpng-allocated storage with the following function: - - png_free_data(png_ptr, info_ptr, mask, seq) - - mask - identifies data to be freed, a mask - containing the bitwise OR of one or - more of - PNG_FREE_PLTE, PNG_FREE_TRNS, - PNG_FREE_HIST, PNG_FREE_ICCP, - PNG_FREE_PCAL, PNG_FREE_ROWS, - PNG_FREE_SCAL, PNG_FREE_SPLT, - PNG_FREE_TEXT, PNG_FREE_UNKN, - or simply PNG_FREE_ALL - - seq - sequence number of item to be freed - (\-1 for all items) - -This function may be safely called when the relevant storage has -already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those cases do nothing. -The "seq" parameter is ignored if only one item of the selected data -type, such as PLTE, is allowed. If "seq" is not \-1, and multiple items -are allowed for the data type identified in the mask, such as text or -sPLT, only the n'th item in the structure is freed, where n is "seq". - -The default behavior is only to free data that was allocated internally -by libpng. This can be changed, so that libpng will not free the data, -or so that it will free data that was allocated by the user with png_malloc() -or png_calloc() and passed in via a png_set_*() function, with - - png_data_freer(png_ptr, info_ptr, freer, mask) - - freer - one of - PNG_DESTROY_WILL_FREE_DATA - PNG_SET_WILL_FREE_DATA - PNG_USER_WILL_FREE_DATA - - mask - which data elements are affected - same choices as in png_free_data() - -This function only affects data that has already been allocated. -You can call this function after reading the PNG data but before calling -any png_set_*() functions, to control whether the user or the png_set_*() -function is responsible for freeing any existing data that might be present, -and again after the png_set_*() functions to control whether the user -or png_destroy_*() is supposed to free the data. When the user assumes -responsibility for libpng-allocated data, the application must use -png_free() to free it, and when the user transfers responsibility to libpng -for data that the user has allocated, the user must have used png_malloc() -or png_calloc() to allocate it. - -If you allocated your row_pointers in a single block, as suggested above in -the description of the high level read interface, you must not transfer -responsibility for freeing it to the png_set_rows or png_read_destroy function, -because they would also try to free the individual row_pointers[i]. - -If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword -separately, do not transfer responsibility for freeing text_ptr to libpng, -because when libpng fills a png_text structure it combines these members with -the key member, and png_free_data() will free only text_ptr.key. Similarly, -if you transfer responsibility for free'ing text_ptr from libpng to your -application, your application must not separately free those members. - -The png_free_data() function will turn off the "valid" flag for anything -it frees. If you need to turn the flag off for a chunk that was freed by -your application instead of by libpng, you can use - - png_set_invalid(png_ptr, info_ptr, mask); - - mask - identifies the chunks to be made invalid, - containing the bitwise OR of one or - more of - PNG_INFO_gAMA, PNG_INFO_sBIT, - PNG_INFO_cHRM, PNG_INFO_PLTE, - PNG_INFO_tRNS, PNG_INFO_bKGD, - PNG_INFO_eXIf, - PNG_INFO_hIST, PNG_INFO_pHYs, - PNG_INFO_oFFs, PNG_INFO_tIME, - PNG_INFO_pCAL, PNG_INFO_sRGB, - PNG_INFO_iCCP, PNG_INFO_sPLT, - PNG_INFO_sCAL, PNG_INFO_IDAT - -For a more compact example of reading a PNG image, see the file example.c. - -.SS Reading PNG files progressively - -The progressive reader is slightly different from the non-progressive -reader. Instead of calling png_read_info(), png_read_rows(), and -png_read_end(), you make one call to png_process_data(), which calls -callbacks when it has the info, a row, or the end of the image. You -set up these callbacks with png_set_progressive_read_fn(). You don't -have to worry about the input/output functions of libpng, as you are -giving the library the data directly in png_process_data(). I will -assume that you have read the section on reading PNG files above, -so I will only highlight the differences (although I will show -all of the code). - -png_structp png_ptr; -png_infop info_ptr; - - /* An example code fragment of how you would - initialize the progressive reader in your - application. */ - int - initialize_png_reader() - { - png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - - if (!png_ptr) - return ERROR; - - info_ptr = png_create_info_struct(png_ptr); - - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, - (png_infopp)NULL, (png_infopp)NULL); - return ERROR; - } - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return ERROR; - } - - /* This one's new. You can provide functions - to be called when the header info is valid, - when each row is completed, and when the image - is finished. If you aren't using all functions, - you can specify NULL parameters. Even when all - three functions are NULL, you need to call - png_set_progressive_read_fn(). You can use - any struct as the user_ptr (cast to a void pointer - for the function call), and retrieve the pointer - from inside the callbacks using the function - - png_get_progressive_ptr(png_ptr); - - which will return a void pointer, which you have - to cast appropriately. - */ - png_set_progressive_read_fn(png_ptr, (void *)user_ptr, - info_callback, row_callback, end_callback); - - return 0; - } - - /* A code fragment that you call as you receive blocks - of data */ - int - process_data(png_bytep buffer, png_uint_32 length) - { - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return ERROR; - } - - /* This one's new also. Simply give it a chunk - of data from the file stream (in order, of - course). On machines with segmented memory - models machines, don't give it any more than - 64K. The library seems to run fine with sizes - of 4K. Although you can give it much less if - necessary (I assume you can give it chunks of - 1 byte, I haven't tried less than 256 bytes - yet). When this function returns, you may - want to display any rows that were generated - in the row callback if you don't already do - so there. - */ - png_process_data(png_ptr, info_ptr, buffer, length); - - /* At this point you can call png_process_data_skip if - you want to handle data the library will skip yourself; - it simply returns the number of bytes to skip (and stops - libpng skipping that number of bytes on the next - png_process_data call). - return 0; - } - - /* This function is called (as set by - png_set_progressive_read_fn() above) when enough data - has been supplied so all of the header has been - read. - */ - void - info_callback(png_structp png_ptr, png_infop info) - { - /* Do any setup here, including setting any of - the transformations mentioned in the Reading - PNG files section. For now, you _must_ call - either png_start_read_image() or - png_read_update_info() after all the - transformations are set (even if you don't set - any). You may start getting rows before - png_process_data() returns, so this is your - last chance to prepare for that. - - This is where you turn on interlace handling, - assuming you don't want to do it yourself. - - If you need to you can stop the processing of - your original input data at this point by calling - png_process_data_pause. This returns the number - of unprocessed bytes from the last png_process_data - call - it is up to you to ensure that the next call - sees these bytes again. If you don't want to bother - with this you can get libpng to cache the unread - bytes by setting the 'save' parameter (see png.h) but - then libpng will have to copy the data internally. - */ - } - - /* This function is called when each row of image - data is complete */ - void - row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass) - { - /* If the image is interlaced, and you turned - on the interlace handler, this function will - be called for every row in every pass. Some - of these rows will not be changed from the - previous pass. When the row is not changed, - the new_row variable will be NULL. The rows - and passes are called in order, so you don't - really need the row_num and pass, but I'm - supplying them because it may make your life - easier. - - If you did not turn on interlace handling then - the callback is called for each row of each - sub-image when the image is interlaced. In this - case 'row_num' is the row in the sub-image, not - the row in the output image as it is in all other - cases. - - For the non-NULL rows of interlaced images when - you have switched on libpng interlace handling, - you must call png_progressive_combine_row() - passing in the row and the old row. You can - call this function for NULL rows (it will just - return) and for non-interlaced images (it just - does the memcpy for you) if it will make the - code easier. Thus, you can just do this for - all cases if you switch on interlace handling; - */ - - png_progressive_combine_row(png_ptr, old_row, - new_row); - - /* where old_row is what was displayed - previously for the row. Note that the first - pass (pass == 0, really) will completely cover - the old row, so the rows do not have to be - initialized. After the first pass (and only - for interlaced images), you will have to pass - the current row, and the function will combine - the old row and the new row. - - You can also call png_process_data_pause in this - callback - see above. - */ - } - - void - end_callback(png_structp png_ptr, png_infop info) - { - /* This function is called after the whole image - has been read, including any chunks after the - image (up to and including the IEND). You - will usually have the same info chunk as you - had in the header, although some data may have - been added to the comments and time fields. - - Most people won't do much here, perhaps setting - a flag that marks the image as finished. - */ - } - - - -.SH IV. Writing - -Much of this is very similar to reading. However, everything of -importance is repeated here, so you won't have to constantly look -back up in the reading section to understand writing. - -.SS Setup - -You will want to do the I/O initialization before you get into libpng, -so if it doesn't work, you don't have anything to undo. If you are not -using the standard I/O functions, you will need to replace them with -custom writing functions. See the discussion under Customizing libpng. - - FILE *fp = fopen(file_name, "wb"); - - if (!fp) - return ERROR; - -Next, png_struct and png_info need to be allocated and initialized. -As these can be both relatively large, you may not want to store these -on the stack, unless you have stack space to spare. Of course, you -will want to check if they return NULL. If you are also reading, -you won't want to name your read structure and your write structure -both "png_ptr"; you can call them anything you like, such as -"read_ptr" and "write_ptr". Look at pngtest.c, for example. - - png_structp png_ptr = png_create_write_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - - if (!png_ptr) - return ERROR; - - png_infop info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_write_struct(&png_ptr, - (png_infopp)NULL); - return ERROR; - } - -If you want to use your own memory allocation routines, -define PNG_USER_MEM_SUPPORTED and use -png_create_write_struct_2() instead of png_create_write_struct(): - - png_structp png_ptr = png_create_write_struct_2 - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn, (png_voidp) - user_mem_ptr, user_malloc_fn, user_free_fn); - -After you have these structures, you will need to set up the -error handling. When libpng encounters an error, it expects to -longjmp() back to your routine. Therefore, you will need to call -setjmp() and pass the png_jmpbuf(png_ptr). If you -write the file from different routines, you will need to update -the png_jmpbuf(png_ptr) every time you enter a new routine that will -call a png_*() function. See your documentation of setjmp/longjmp -for your compiler for more information on setjmp/longjmp. See -the discussion on libpng error handling in the Customizing Libpng -section below for more information on the libpng error handling. - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_write_struct(&png_ptr, &info_ptr); - fclose(fp); - return ERROR; - } - ... - return; - -If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_NO_SETJMP, in which case -errors will result in a call to PNG_ABORT() which defaults to abort(). - -You can #define PNG_ABORT() to a function that does something -more useful than abort(), as long as your function does not -return. - -Checking for invalid palette index on write was added at libpng -1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues -a benign error. This is enabled by default because this condition is an -error according to the PNG specification, Clause 11.3.2, but the error can -be ignored in each png_ptr with - - png_set_check_for_invalid_index(png_ptr, 0); - -If the error is ignored, or if png_benign_error() treats it as a warning, -any invalid pixels are written as-is by the encoder, resulting in an -invalid PNG datastream as output. In this case the application is -responsible for ensuring that the pixel indexes are in range when it writes -a PLTE chunk with fewer entries than the bit depth would allow. - -Now you need to set up the output code. The default for libpng is to -use the C function fwrite(). If you use this, you will need to pass a -valid FILE * in the function png_init_io(). Be sure that the file is -opened in binary mode. Again, if you wish to handle writing data in -another way, see the discussion on libpng I/O handling in the Customizing -Libpng section below. - - png_init_io(png_ptr, fp); - -If you are embedding your PNG into a datastream such as MNG, and don't -want libpng to write the 8-byte signature, or if you have already -written the signature in your application, use - - png_set_sig_bytes(png_ptr, 8); - -to inform libpng that it should not write a signature. - -.SS Write callbacks - -At this point, you can set up a callback function that will be -called after each row has been written, which you can use to control -a progress meter or the like. It's demonstrated in pngtest.c. -You must supply a function - - void write_row_callback(png_structp png_ptr, png_uint_32 row, - int pass); - { - /* put your code here */ - } - -(You can give it another name that you like instead of "write_row_callback") - -To inform libpng about your function, use - - png_set_write_status_fn(png_ptr, write_row_callback); - -When this function is called the row has already been completely processed and -it has also been written out. The 'row' and 'pass' refer to the next row to be -handled. For the -non-interlaced case the row that was just handled is simply one less than the -passed in row number, and pass will always be 0. For the interlaced case the -same applies unless the row value is 0, in which case the row just handled was -the last one from one of the preceding passes. Because interlacing may skip a -pass you cannot be sure that the preceding pass is just 'pass\-1', if you really -need to know what the last pass is record (row,pass) from the callback and use -the last recorded value each time. - -As with the user transform you can find the output row using the -PNG_ROW_FROM_PASS_ROW macro. - -You now have the option of modifying how the compression library will -run. The following functions are mainly for testing, but may be useful -in some cases, like if you need to write PNG files extremely fast and -are willing to give up some compression, or if you want to get the -maximum possible compression at the expense of slower writing. If you -have no special needs in this area, let the library do what it wants by -not calling this function at all, as it has been tuned to deliver a good -speed/compression ratio. The second parameter to png_set_filter() is -the filter method, for which the only valid values are 0 (as of the -July 1999 PNG specification, version 1.2) or 64 (if you are writing -a PNG datastream that is to be embedded in a MNG datastream). The third -parameter is a flag that indicates which filter type(s) are to be tested -for each scanline. See the PNG specification for details on the specific -filter types. - - - /* turn on or off filtering, and/or choose - specific filters. You can use either a single - PNG_FILTER_VALUE_NAME or the bitwise OR of one - or more PNG_FILTER_NAME masks. - */ - png_set_filter(png_ptr, 0, - PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | - PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | - PNG_FILTER_UP | PNG_FILTER_VALUE_UP | - PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | - PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| - PNG_ALL_FILTERS | PNG_FAST_FILTERS); - -If an application wants to start and stop using particular filters during -compression, it should start out with all of the filters (to ensure that -the previous row of pixels will be stored in case it's needed later), -and then add and remove them after the start of compression. - -If you are writing a PNG datastream that is to be embedded in a MNG -datastream, the second parameter can be either 0 or 64. - -The png_set_compression_*() functions interface to the zlib compression -library, and should mostly be ignored unless you really know what you are -doing. The only generally useful call is png_set_compression_level() -which changes how much time zlib spends on trying to compress the image -data. See the Compression Library (zlib.h and algorithm.txt, distributed -with zlib) for details on the compression levels. - - #include zlib.h - - /* Set the zlib compression level */ - png_set_compression_level(png_ptr, - Z_BEST_COMPRESSION); - - /* Set other zlib parameters for compressing IDAT */ - png_set_compression_mem_level(png_ptr, 8); - png_set_compression_strategy(png_ptr, - Z_DEFAULT_STRATEGY); - png_set_compression_window_bits(png_ptr, 15); - png_set_compression_method(png_ptr, 8); - png_set_compression_buffer_size(png_ptr, 8192) - - /* Set zlib parameters for text compression - * If you don't call these, the parameters - * fall back on those defined for IDAT chunks - */ - png_set_text_compression_mem_level(png_ptr, 8); - png_set_text_compression_strategy(png_ptr, - Z_DEFAULT_STRATEGY); - png_set_text_compression_window_bits(png_ptr, 15); - png_set_text_compression_method(png_ptr, 8); - -.SS Setting the contents of info for output - -You now need to fill in the png_info structure with all the data you -wish to write before the actual image. Note that the only thing you -are allowed to write after the image is the text chunks and the time -chunk (as of PNG Specification 1.2, anyway). See png_write_end() and -the latest PNG specification for more information on that. If you -wish to write them before the image, fill them in now, and flag that -data as being valid. If you want to wait until after the data, don't -fill them until png_write_end(). For all the fields in png_info and -their data types, see png.h. For explanations of what the fields -contain, see the PNG specification. - -Some of the more important parts of the png_info are: - - png_set_IHDR(png_ptr, info_ptr, width, height, - bit_depth, color_type, interlace_type, - compression_type, filter_method) - - width - holds the width of the image - in pixels (up to 2^31). - - height - holds the height of the image - in pixels (up to 2^31). - - bit_depth - holds the bit depth of one of the - image channels. - (valid values are 1, 2, 4, 8, 16 - and depend also on the - color_type. See also significant - bits (sBIT) below). - - color_type - describes which color/alpha - channels are present. - PNG_COLOR_TYPE_GRAY - (bit depths 1, 2, 4, 8, 16) - PNG_COLOR_TYPE_GRAY_ALPHA - (bit depths 8, 16) - PNG_COLOR_TYPE_PALETTE - (bit depths 1, 2, 4, 8) - PNG_COLOR_TYPE_RGB - (bit_depths 8, 16) - PNG_COLOR_TYPE_RGB_ALPHA - (bit_depths 8, 16) - - PNG_COLOR_MASK_PALETTE - PNG_COLOR_MASK_COLOR - PNG_COLOR_MASK_ALPHA - - interlace_type - PNG_INTERLACE_NONE or - PNG_INTERLACE_ADAM7 - - compression_type - (must be - PNG_COMPRESSION_TYPE_DEFAULT) - - filter_method - (must be PNG_FILTER_TYPE_DEFAULT - or, if you are writing a PNG to - be embedded in a MNG datastream, - can also be - PNG_INTRAPIXEL_DIFFERENCING) - -If you call png_set_IHDR(), the call must appear before any of the -other png_set_*() functions, because they might require access to some of -the IHDR settings. The remaining png_set_*() functions can be called -in any order. - -If you wish, you can reset the compression_type, interlace_type, or -filter_method later by calling png_set_IHDR() again; if you do this, the -width, height, bit_depth, and color_type must be the same in each call. - - png_set_PLTE(png_ptr, info_ptr, palette, - num_palette); - - palette - the palette for the file - (array of png_color) - num_palette - number of entries in the palette - - - png_set_gAMA(png_ptr, info_ptr, file_gamma); - png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma); - - file_gamma - the gamma at which the image was - created (PNG_INFO_gAMA) - - int_file_gamma - 100,000 times the gamma at which - the image was created - - png_set_cHRM(png_ptr, info_ptr, white_x, white_y, red_x, red_y, - green_x, green_y, blue_x, blue_y) - png_set_cHRM_XYZ(png_ptr, info_ptr, red_X, red_Y, red_Z, green_X, - green_Y, green_Z, blue_X, blue_Y, blue_Z) - png_set_cHRM_fixed(png_ptr, info_ptr, int_white_x, int_white_y, - int_red_x, int_red_y, int_green_x, int_green_y, - int_blue_x, int_blue_y) - png_set_cHRM_XYZ_fixed(png_ptr, info_ptr, int_red_X, int_red_Y, - int_red_Z, int_green_X, int_green_Y, int_green_Z, - int_blue_X, int_blue_Y, int_blue_Z) - - {white,red,green,blue}_{x,y} - A color space encoding specified using the chromaticities - of the end points and the white point. - - {red,green,blue}_{X,Y,Z} - A color space encoding specified using the encoding end - points - the CIE tristimulus specification of the intended - color of the red, green and blue channels in the PNG RGB - data. The white point is simply the sum of the three end - points. - - png_set_sRGB(png_ptr, info_ptr, srgb_intent); - - srgb_intent - the rendering intent - (PNG_INFO_sRGB) The presence of - the sRGB chunk means that the pixel - data is in the sRGB color space. - This chunk also implies specific - values of gAMA and cHRM. Rendering - intent is the CSS-1 property that - has been defined by the International - Color Consortium - (http://www.color.org). - It can be one of - PNG_sRGB_INTENT_SATURATION, - PNG_sRGB_INTENT_PERCEPTUAL, - PNG_sRGB_INTENT_ABSOLUTE, or - PNG_sRGB_INTENT_RELATIVE. - - - png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, - srgb_intent); - - srgb_intent - the rendering intent - (PNG_INFO_sRGB) The presence of the - sRGB chunk means that the pixel - data is in the sRGB color space. - This function also causes gAMA and - cHRM chunks with the specific values - that are consistent with sRGB to be - written. - - png_set_iCCP(png_ptr, info_ptr, name, compression_type, - profile, proflen); - - name - The profile name. - - compression_type - The compression type; always - PNG_COMPRESSION_TYPE_BASE for PNG 1.0. - You may give NULL to this argument to - ignore it. - - profile - International Color Consortium color - profile data. May contain NULs. - - proflen - length of profile data in bytes. - - png_set_sBIT(png_ptr, info_ptr, sig_bit); - - sig_bit - the number of significant bits for - (PNG_INFO_sBIT) each of the gray, red, - green, and blue channels, whichever are - appropriate for the given color type - (png_color_16) - - png_set_tRNS(png_ptr, info_ptr, trans_alpha, - num_trans, trans_color); - - trans_alpha - array of alpha (transparency) - entries for palette (PNG_INFO_tRNS) - - num_trans - number of transparent entries - (PNG_INFO_tRNS) - - trans_color - graylevel or color sample values - (in order red, green, blue) of the - single transparent color for - non-paletted images (PNG_INFO_tRNS) - - png_set_eXIf_1(png_ptr, info_ptr, num_exif, exif); - - exif - Exif profile (array of - png_byte) (PNG_INFO_eXIf) - - png_set_hIST(png_ptr, info_ptr, hist); - - hist - histogram of palette (array of - png_uint_16) (PNG_INFO_hIST) - - png_set_tIME(png_ptr, info_ptr, mod_time); - - mod_time - time image was last modified - (PNG_VALID_tIME) - - png_set_bKGD(png_ptr, info_ptr, background); - - background - background color (of type - png_color_16p) (PNG_VALID_bKGD) - - png_set_text(png_ptr, info_ptr, text_ptr, num_text); - - text_ptr - array of png_text holding image - comments - - text_ptr[i].compression - type of compression used - on "text" PNG_TEXT_COMPRESSION_NONE - PNG_TEXT_COMPRESSION_zTXt - PNG_ITXT_COMPRESSION_NONE - PNG_ITXT_COMPRESSION_zTXt - text_ptr[i].key - keyword for comment. Must contain - 1-79 characters. - text_ptr[i].text - text comments for current - keyword. Can be NULL or empty. - text_ptr[i].text_length - length of text string, - after decompression, 0 for iTXt - text_ptr[i].itxt_length - length of itxt string, - after decompression, 0 for tEXt/zTXt - text_ptr[i].lang - language of comment (NULL or - empty for unknown). - text_ptr[i].translated_keyword - keyword in UTF-8 (NULL - or empty for unknown). - - Note that the itxt_length, lang, and lang_key - members of the text_ptr 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, - they contain NULL pointers when the "compression" - field contains PNG_TEXT_COMPRESSION_NONE or - PNG_TEXT_COMPRESSION_zTXt. - - num_text - number of comments - - png_set_sPLT(png_ptr, info_ptr, &palette_ptr, - num_spalettes); - - palette_ptr - array of png_sPLT_struct structures - to be added to the list of palettes - in the info structure. - num_spalettes - number of palette structures to be - added. - - png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, - unit_type); - - offset_x - positive offset from the left - edge of the screen - - offset_y - positive offset from the top - edge of the screen - - unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER - - png_set_pHYs(png_ptr, info_ptr, res_x, res_y, - unit_type); - - res_x - pixels/unit physical resolution - in x direction - - res_y - pixels/unit physical resolution - in y direction - - unit_type - PNG_RESOLUTION_UNKNOWN, - PNG_RESOLUTION_METER - - png_set_sCAL(png_ptr, info_ptr, unit, width, height) - - unit - physical scale units (an integer) - - width - width of a pixel in physical scale units - - height - height of a pixel in physical scale units - (width and height are doubles) - - png_set_sCAL_s(png_ptr, info_ptr, unit, width, height) - - unit - physical scale units (an integer) - - width - width of a pixel in physical scale units - expressed as a string - - height - height of a pixel in physical scale units - (width and height are strings like "2.54") - - png_set_unknown_chunks(png_ptr, info_ptr, &unknowns, - num_unknowns) - - unknowns - array of png_unknown_chunk - structures holding unknown chunks - unknowns[i].name - name of unknown chunk - unknowns[i].data - data of unknown chunk - unknowns[i].size - size of unknown chunk's data - unknowns[i].location - position to write chunk in file - 0: do not write chunk - PNG_HAVE_IHDR: before PLTE - PNG_HAVE_PLTE: before IDAT - PNG_AFTER_IDAT: after IDAT - -The "location" member is set automatically according to -what part of the output file has already been written. -You can change its value after calling png_set_unknown_chunks() -as demonstrated in pngtest.c. Within each of the "locations", -the chunks are sequenced according to their position in the -structure (that is, the value of "i", which is the order in which -the chunk was either read from the input file or defined with -png_set_unknown_chunks). - -A quick word about text and num_text. text is an array of png_text -structures. num_text is the number of valid structures in the array. -Each png_text structure holds a language code, a keyword, a text value, -and a compression type. - -The compression types have the same valid numbers as the compression -types of the image data. Currently, the only valid number is zero. -However, you can store text either compressed or uncompressed, unlike -images, which always have to be compressed. So if you don't want the -text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE. -Because tEXt and zTXt chunks don't have a language field, if you -specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt -any language code or translated keyword will not be written out. - -Until text gets around a few hundred bytes, it is not worth compressing it. -After the text has been written out to the file, the compression type -is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR, -so that it isn't written out again at the end (in case you are calling -png_write_end() with the same struct). - -The keywords that are given in the PNG Specification are: - - Title Short (one line) title or - caption for image - - Author Name of image's creator - - Description Description of image (possibly long) - - Copyright Copyright notice - - Creation Time Time of original image creation - (usually RFC 1123 format, see below) - - Software Software used to create the image - - Disclaimer Legal disclaimer - - Warning Warning of nature of content - - Source Device used to create the image - - Comment Miscellaneous comment; conversion - from other image format - -The keyword-text pairs work like this. Keywords should be short -simple descriptions of what the comment is about. Some typical -keywords are found in the PNG specification, as is some recommendations -on keywords. You can repeat keywords in a file. You can even write -some text before the image and some after. For example, you may want -to put a description of the image before the image, but leave the -disclaimer until after, so viewers working over modem connections -don't have to wait for the disclaimer to go over the modem before -they start seeing the image. Finally, keywords should be full -words, not abbreviations. Keywords and text are in the ISO 8859-1 -(Latin-1) character set (a superset of regular ASCII) and can not -contain NUL characters, and should not contain control or other -unprintable characters. To make the comments widely readable, stick -with basic ASCII, and avoid machine specific character set extensions -like the IBM-PC character set. The keyword must be present, but -you can leave off the text string on non-compressed pairs. -Compressed pairs must have a text string, as only the text string -is compressed anyway, so the compression would be meaningless. - -PNG supports modification time via the png_time structure. Two -conversion routines are provided, png_convert_from_time_t() for -time_t and png_convert_from_struct_tm() for struct tm. The -time_t routine uses gmtime(). You don't have to use either of -these, but if you wish to fill in the png_time structure directly, -you should provide the time in universal time (GMT) if possible -instead of your local time. Note that the year number is the full -year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and -that months start with 1. - -If you want to store the time of the original image creation, you should -use a plain tEXt chunk with the "Creation Time" keyword. This is -necessary because the "creation time" of a PNG image is somewhat vague, -depending on whether you mean the PNG file, the time the image was -created in a non-PNG format, a still photo from which the image was -scanned, or possibly the subject matter itself. In order to facilitate -machine-readable dates, it is recommended that the "Creation Time" -tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"), -although this isn't a requirement. Unlike the tIME chunk, the -"Creation Time" tEXt chunk is not expected to be automatically changed -by the software. To facilitate the use of RFC 1123 dates, a function -png_convert_to_rfc1123_buffer(buffer, png_timep) is provided to -convert from PNG time to an RFC 1123 format string. The caller must provide -a writeable buffer of at least 29 bytes. - -.SS Writing unknown chunks - -You can use the png_set_unknown_chunks function to queue up private chunks -for writing. You give it a chunk name, location, raw data, and a size. You -also must use png_set_keep_unknown_chunks() to ensure that libpng will -handle them. That's all there is to it. The chunks will be written by the -next following png_write_info_before_PLTE, png_write_info, or png_write_end -function, depending upon the specified location. Any chunks previously -read into the info structure's unknown-chunk list will also be written out -in a sequence that satisfies the PNG specification's ordering rules. - -Here is an example of writing two private chunks, prVt and miNE: - - #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED - /* Set unknown chunk data */ - png_unknown_chunk unk_chunk[2]; - strcpy((char *) unk_chunk[0].name, "prVt"; - unk_chunk[0].data = (unsigned char *) "PRIVATE DATA"; - unk_chunk[0].size = strlen(unk_chunk[0].data)+1; - unk_chunk[0].location = PNG_HAVE_IHDR; - strcpy((char *) unk_chunk[1].name, "miNE"; - unk_chunk[1].data = (unsigned char *) "MY CHUNK DATA"; - unk_chunk[1].size = strlen(unk_chunk[0].data)+1; - unk_chunk[1].location = PNG_AFTER_IDAT; - png_set_unknown_chunks(write_ptr, write_info_ptr, - unk_chunk, 2); - /* Needed because miNE is not safe-to-copy */ - png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS, - (png_bytep) "miNE", 1); - # if PNG_LIBPNG_VER < 10600 - /* Deal with unknown chunk location bug in 1.5.x and earlier */ - png_set_unknown_chunk_location(png, info, 0, PNG_HAVE_IHDR); - png_set_unknown_chunk_location(png, info, 1, PNG_AFTER_IDAT); - # endif - # if PNG_LIBPNG_VER < 10500 - /* PNG_AFTER_IDAT writes two copies of the chunk prior to libpng-1.5.0, - * one before IDAT and another after IDAT, so don't use it; only use - * PNG_HAVE_IHDR location. This call resets the location previously - * set by assignment and png_set_unknown_chunk_location() for chunk 1. - */ - png_set_unknown_chunk_location(png, info, 1, PNG_HAVE_IHDR); - # endif - #endif - -.SS The high-level write interface - -At this point there are two ways to proceed; through the high-level -write interface, or through a sequence of low-level write operations. -You can use the high-level interface if your image data is present -in the info structure. All defined output -transformations are permitted, enabled by the following masks. - - PNG_TRANSFORM_IDENTITY No transformation - PNG_TRANSFORM_PACKING Pack 1, 2 and 4-bit samples - PNG_TRANSFORM_PACKSWAP Change order of packed - pixels to LSB first - PNG_TRANSFORM_INVERT_MONO Invert monochrome images - PNG_TRANSFORM_SHIFT Normalize pixels to the - sBIT depth - PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA - to BGRA - PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA - to AG - PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity - to transparency - PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples - PNG_TRANSFORM_STRIP_FILLER Strip out filler - bytes (deprecated). - PNG_TRANSFORM_STRIP_FILLER_BEFORE Strip out leading - filler bytes - PNG_TRANSFORM_STRIP_FILLER_AFTER Strip out trailing - filler bytes - -If you have valid image data in the info structure (you can use -png_set_rows() to put image data in the info structure), simply do this: - - png_write_png(png_ptr, info_ptr, png_transforms, NULL) - -where png_transforms is an integer containing the bitwise OR of some set of -transformation flags. This call is equivalent to png_write_info(), -followed the set of transformations indicated by the transform mask, -then png_write_image(), and finally png_write_end(). - -(The final parameter of this call is not yet used. Someday it might point -to transformation parameters required by some future output transform.) - -You must use png_transforms and not call any png_set_transform() functions -when you use png_write_png(). - -.SS The low-level write interface - -If you are going the low-level route instead, you are now ready to -write all the file information up to the actual image data. You do -this with a call to png_write_info(). - - png_write_info(png_ptr, info_ptr); - -Note that there is one transformation you may need to do before -png_write_info(). In PNG files, the alpha channel in an image is the -level of opacity. If your data is supplied as a level of transparency, -you can invert the alpha channel before you write it, so that 0 is -fully transparent and 255 (in 8-bit or paletted images) or 65535 -(in 16-bit images) is fully opaque, with - - png_set_invert_alpha(png_ptr); - -This must appear before png_write_info() instead of later with the -other transformations because in the case of paletted images the tRNS -chunk data has to be inverted before the tRNS chunk is written. If -your image is not a paletted image, the tRNS data (which in such cases -represents a single color to be rendered as transparent) won't need to -be changed, and you can safely do this transformation after your -png_write_info() call. - -If you need to write a private chunk that you want to appear before -the PLTE chunk when PLTE is present, you can write the PNG info in -two steps, and insert code to write your own chunk between them: - - png_write_info_before_PLTE(png_ptr, info_ptr); - png_set_unknown_chunks(png_ptr, info_ptr, ...); - png_write_info(png_ptr, info_ptr); - -After you've written the file information, you can set up the library -to handle any special transformations of the image data. The various -ways to transform the data will be described in the order that they -should occur. This is important, as some of these change the color -type and/or bit depth of the data, and some others only work on -certain color types and bit depths. Even though each transformation -checks to see if it has data that it can do something with, you should -make sure to only enable a transformation if it will be valid for the -data. For example, don't swap red and blue on grayscale data. - -PNG files store RGB pixels packed into 3 or 6 bytes. This code tells -the library to strip input data that has 4 or 8 bytes per pixel down -to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2 -bytes per pixel). - - png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); - -where the 0 is unused, and the location is either PNG_FILLER_BEFORE or -PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel -is stored XRGB or RGBX. - -PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as -they can, resulting in, for example, 8 pixels per byte for 1 bit files. -If the data is supplied at 1 pixel per byte, use this code, which will -correctly pack the pixels into a single byte: - - png_set_packing(png_ptr); - -PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your -data is of another bit depth, you can write an sBIT chunk into the -file so that decoders can recover the original data if desired. - - /* Set the true bit depth of the image data */ - if (color_type & PNG_COLOR_MASK_COLOR) - { - sig_bit.red = true_bit_depth; - sig_bit.green = true_bit_depth; - sig_bit.blue = true_bit_depth; - } - - else - { - sig_bit.gray = true_bit_depth; - } - - if (color_type & PNG_COLOR_MASK_ALPHA) - { - sig_bit.alpha = true_bit_depth; - } - - png_set_sBIT(png_ptr, info_ptr, &sig_bit); - -If the data is stored in the row buffer in a bit depth other than -one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG), -this will scale the values to appear to be the correct bit depth as -is required by PNG. - - png_set_shift(png_ptr, &sig_bit); - -PNG files store 16-bit pixels in network byte order (big-endian, -ie. most significant bits first). This code would be used if they are -supplied the other way (little-endian, i.e. least significant bits -first, the way PCs store them): - - if (bit_depth > 8) - png_set_swap(png_ptr); - -If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you -need to change the order the pixels are packed into bytes, you can use: - - if (bit_depth < 8) - png_set_packswap(png_ptr); - -PNG files store 3 color pixels in red, green, blue order. This code -would be used if they are supplied as blue, green, red: - - png_set_bgr(png_ptr); - -PNG files describe monochrome as black being zero and white being -one. This code would be used if the pixels are supplied with this reversed -(black being one and white being zero): - - png_set_invert_mono(png_ptr); - -Finally, you can write your own transformation function if none of -the existing ones meets your needs. This is done by setting a callback -with - - png_set_write_user_transform_fn(png_ptr, - write_transform_fn); - -You must supply the function - - void write_transform_fn(png_structp png_ptr, png_row_infop - row_info, png_bytep data) - -See pngtest.c for a working example. Your function will be called -before any of the other transformations are processed. If supported -libpng also supplies an information routine that may be called from -your callback: - - png_get_current_row_number(png_ptr); - png_get_current_pass_number(png_ptr); - -This returns the current row passed to the transform. With interlaced -images the value returned is the row in the input sub-image image. 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). - -The discussion of interlace handling above contains more information on how to -use these values. - -You can also set up a pointer to a user structure for use by your -callback function. - - png_set_user_transform_info(png_ptr, user_ptr, 0, 0); - -The user_channels and user_depth parameters of this function are ignored -when writing; you can set them to zero as shown. - -You can retrieve the pointer via the function png_get_user_transform_ptr(). -For example: - - voidp write_user_transform_ptr = - png_get_user_transform_ptr(png_ptr); - -It is possible to have libpng flush any pending output, either manually, -or automatically after a certain number of lines have been written. To -flush the output stream a single time call: - - png_write_flush(png_ptr); - -and to have libpng flush the output stream periodically after a certain -number of scanlines have been written, call: - - png_set_flush(png_ptr, nrows); - -Note that the distance between rows is from the last time png_write_flush() -was called, or the first row of the image if it has never been called. -So if you write 50 lines, and then png_set_flush 25, it will flush the -output on the next scanline, and every 25 lines thereafter, unless -png_write_flush() is called before 25 more lines have been written. -If nrows is too small (less than about 10 lines for a 640 pixel wide -RGB image) the image compression may decrease noticeably (although this -may be acceptable for real-time applications). Infrequent flushing will -only degrade the compression performance by a few percent over images -that do not use flushing. - -.SS Writing the image data - -That's it for the transformations. Now you can write the image data. -The simplest way to do this is in one function call. If you have the -whole image in memory, you can just call png_write_image() and libpng -will write the image. You will need to pass in an array of pointers to -each row. This function automatically handles interlacing, so you don't -need to call png_set_interlace_handling() or call this function multiple -times, or any of that other stuff necessary with png_write_rows(). - - png_write_image(png_ptr, row_pointers); - -where row_pointers is: - - png_byte *row_pointers[height]; - -You can point to void or char or whatever you use for pixels. - -If you don't want to write the whole image at once, you can -use png_write_rows() instead. If the file is not interlaced, -this is simple: - - png_write_rows(png_ptr, row_pointers, - number_of_rows); - -row_pointers is the same as in the png_write_image() call. - -If you are just writing one row at a time, you can do this with -a single row_pointer instead of an array of row_pointers: - - png_bytep row_pointer = row; - - png_write_row(png_ptr, row_pointer); - -When the file is interlaced, things can get a good deal more complicated. -The only currently (as of the PNG Specification version 1.2, dated July -1999) defined interlacing scheme for PNG files is the "Adam7" interlace -scheme, that breaks down an image into seven smaller images of varying -size. libpng will build these images for you, or you can do them -yourself. If you want to build them yourself, see the PNG specification -for details of which pixels to write when. - -If you don't want libpng to handle the interlacing details, just -use png_set_interlace_handling() and call png_write_rows() the -correct number of times to write all the sub-images -(png_set_interlace_handling() returns the number of sub-images.) - -If you want libpng to build the sub-images, call this before you start -writing any rows: - - number_of_passes = png_set_interlace_handling(png_ptr); - -This will return the number of passes needed. Currently, this is seven, -but may change if another interlace type is added. - -Then write the complete image number_of_passes times. - - png_write_rows(png_ptr, row_pointers, number_of_rows); - -Think carefully before you write an interlaced image. Typically code that -reads such images reads all the image data into memory, uncompressed, before -doing any processing. Only code that can display an image on the fly can -take advantage of the interlacing and even then the image has to be exactly -the correct size for the output device, because scaling an image requires -adjacent pixels and these are not available until all the passes have been -read. - -If you do write an interlaced image you will hardly ever need to handle -the interlacing yourself. Call png_set_interlace_handling() and use the -approach described above. - -The only time it is conceivable that you will really need to write an -interlaced image pass-by-pass is when you have read one pass by pass and -made some pixel-by-pixel transformation to it, as described in the read -code above. In this case use the PNG_PASS_ROWS and PNG_PASS_COLS macros -to determine the size of each sub-image in turn and simply write the rows -you obtained from the read code. - -.SS Finishing a sequential write - -After you are finished writing the image, you should finish writing -the file. If you are interested in writing comments or time, you should -pass an appropriately filled png_info pointer. If you are not interested, -you can pass NULL. - - png_write_end(png_ptr, info_ptr); - -When you are done, you can free all memory used by libpng like this: - - png_destroy_write_struct(&png_ptr, &info_ptr); - -It is also possible to individually free the info_ptr members that -point to libpng-allocated storage with the following function: - - png_free_data(png_ptr, info_ptr, mask, seq) - - mask - identifies data to be freed, a mask - containing the bitwise OR of one or - more of - PNG_FREE_PLTE, PNG_FREE_TRNS, - PNG_FREE_HIST, PNG_FREE_ICCP, - PNG_FREE_PCAL, PNG_FREE_ROWS, - PNG_FREE_SCAL, PNG_FREE_SPLT, - PNG_FREE_TEXT, PNG_FREE_UNKN, - or simply PNG_FREE_ALL - - seq - sequence number of item to be freed - (\-1 for all items) - -This function may be safely called when the relevant storage has -already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those cases do nothing. -The "seq" parameter is ignored if only one item of the selected data -type, such as PLTE, is allowed. If "seq" is not \-1, and multiple items -are allowed for the data type identified in the mask, such as text or -sPLT, only the n'th item in the structure is freed, where n is "seq". - -If you allocated data such as a palette that you passed in to libpng -with png_set_*, you must not free it until just before the call to -png_destroy_write_struct(). - -The default behavior is only to free data that was allocated internally -by libpng. This can be changed, so that libpng will not free the data, -or so that it will free data that was allocated by the user with png_malloc() -or png_calloc() and passed in via a png_set_*() function, with - - png_data_freer(png_ptr, info_ptr, freer, mask) - - freer - one of - PNG_DESTROY_WILL_FREE_DATA - PNG_SET_WILL_FREE_DATA - PNG_USER_WILL_FREE_DATA - - mask - which data elements are affected - same choices as in png_free_data() - -For example, to transfer responsibility for some data from a read structure -to a write structure, you could use - - png_data_freer(read_ptr, read_info_ptr, - PNG_USER_WILL_FREE_DATA, - PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) - - png_data_freer(write_ptr, write_info_ptr, - PNG_DESTROY_WILL_FREE_DATA, - PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) - -thereby briefly reassigning responsibility for freeing to the user but -immediately afterwards reassigning it once more to the write_destroy -function. Having done this, it would then be safe to destroy the read -structure and continue to use the PLTE, tRNS, and hIST data in the write -structure. - -This function only affects data that has already been allocated. -You can call this function before calling after the png_set_*() functions -to control whether the user or png_destroy_*() is supposed to free the data. -When the user assumes responsibility for libpng-allocated data, the -application must use -png_free() to free it, and when the user transfers responsibility to libpng -for data that the user has allocated, the user must have used png_malloc() -or png_calloc() to allocate it. - -If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword -separately, do not transfer responsibility for freeing text_ptr to libpng, -because when libpng fills a png_text structure it combines these members with -the key member, and png_free_data() will free only text_ptr.key. Similarly, -if you transfer responsibility for free'ing text_ptr from libpng to your -application, your application must not separately free those members. -For a more compact example of writing a PNG image, see the file example.c. - -.SH V. Simplified API - -The simplified API, which became available in libpng-1.6.0, 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. The "png_image" structure contains the following members: - - 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 - png_uint_32 warning_or_error; - char message[64]; - -In the event of an error or warning the "warning_or_error" -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 the "warning_or_error" value are reserved; the low two -bits contain 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 - -The pixels (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 channels 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, in -the native byte order of the platform on which the application is running. -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 https://en.wikipedia.org/wiki/SRGB) 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_* - -The #defines to be used in png_image::format. Each #define identifies a -particular layout of channel 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 - - PNG_FORMAT_FLAG_ALPHA format with an alpha channel - PNG_FORMAT_FLAG_COLOR color format: otherwise grayscale - PNG_FORMAT_FLAG_LINEAR 2-byte channels else 1-byte - PNG_FORMAT_FLAG_COLORMAP image data is color-mapped - PNG_FORMAT_FLAG_BGR BGR colors, else order is RGB - PNG_FORMAT_FLAG_AFIRST alpha channel comes first - -Supported formats are as follows. Future versions of libpng may support more -formats; for compatibility with older versions simply check if the format -macro is defined using #ifdef. These defines describe the in-memory layout -of the components of the pixels of the image. - -First the single byte (sRGB) formats: - - PNG_FORMAT_GRAY - PNG_FORMAT_GA - PNG_FORMAT_AG - PNG_FORMAT_RGB - PNG_FORMAT_BGR - PNG_FORMAT_RGBA - PNG_FORMAT_ARGB - PNG_FORMAT_BGRA - PNG_FORMAT_ABGR - -Then the linear 2-byte formats. When naming these "Y" is used to -indicate a luminance (gray) channel. The component order within the pixel -is always the same - there is no provision for swapping the order of the -components in the linear format. The components are 16-bit integers in -the native byte order for your platform, and there is no provision for -swapping the bytes to a different endian condition. - - PNG_FORMAT_LINEAR_Y - PNG_FORMAT_LINEAR_Y_ALPHA - PNG_FORMAT_LINEAR_RGB - PNG_FORMAT_LINEAR_RGB_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. - - PNG_FORMAT_RGB_COLORMAP - PNG_FORMAT_BGR_COLORMAP - PNG_FORMAT_RGBA_COLORMAP - PNG_FORMAT_ARGB_COLORMAP - PNG_FORMAT_BGRA_COLORMAP - PNG_FORMAT_ABGR_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. - - PNG_IMAGE_SAMPLE_CHANNELS(fmt) - Returns the total number of channels in a given format: 1..4 - - PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt) - Returns the size in bytes of a single component of a pixel or color-map - entry (as appropriate) in the image: 1 or 2. - - PNG_IMAGE_SAMPLE_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. - - PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt) - 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. - - PNG_IMAGE_COLORMAP_SIZE(fmt) - The size of the color-map required by the format; this is the size of the - color-map buffer passed to the png_image_{read,write}_colormap APIs. It is - a fixed number determined by the format so can easily be allocated on the - stack if necessary. - -Corresponding information about the pixels - - PNG_IMAGE_PIXEL_CHANNELS(fmt) - The number of separate channels (components) in a pixel; 1 for a - color-mapped image. - - PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\ - The size, in bytes, of each component in a pixel; 1 for a color-mapped - image. - - PNG_IMAGE_PIXEL_SIZE(fmt) - The size, in bytes, of a complete pixel; 1 for a color-mapped image. - -Information about the whole row, or whole image - - PNG_IMAGE_ROW_STRIDE(image) - Returns 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. - - If you need the stride measured in bytes, row_stride_bytes is - PNG_IMAGE_ROW_STRIDE(image) * PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt) - plus any padding bytes that your application might need, for example - to start the next row on a 4-byte boundary. - - PNG_IMAGE_BUFFER_SIZE(image, 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. - - PNG_IMAGE_SIZE(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. - - PNG_IMAGE_COLORMAP_SIZE(image) - 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. - - PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB == 0x01 - This indicates the the RGB values of the in-memory bitmap do not - correspond to the red, green and blue end-points defined by sRGB. - - 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. - - 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. - -READ APIs - - The png_image passed to the read APIs must have been initialized by setting - the png_controlp field 'opaque' to NULL (or, better, memset the whole thing.) - - 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. - - int png_image_begin_read_from_stdio (png_imagep image, - FILE* file) - - The PNG header is read from the stdio FILE object. - - 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. - - int png_image_finish_read(png_imagep image, - png_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 png_byte or png_uint_16 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. - - For linear output removing the alpha channel is always done - by compositing on black. - - 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. - -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 https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2 -approximation used elsewhere in libpng. - -WRITE APIS - -For write you must initialize a png_image structure to describe the image to -be written: - - 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 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) - - 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. - - 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, ptrdiff_t row_stride, - const void *colormap)); - - Write the image to memory. - - 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*). - -With all write APIs if image is in one of the linear formats with -(png_uint_16) data then setting convert_to_8_bit will cause the output to be -a (png_byte) PNG gamma encoded according to the sRGB specification, otherwise -a 16-bit linear encoded PNG file is written. - -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 (float) and if negative -indicates a bottom-up row layout in the buffer. If you pass zero, libpng will -calculate the row_stride for you from the width and number of channels. - -Note that the write API does not support interlacing, sub-8-bit pixels, -indexed (paletted) images, or most ancillary chunks. - -.SH VI. Modifying/Customizing libpng - -There are two issues here. The first is changing how libpng does -standard things like memory allocation, input/output, and error handling. -The second deals with more complicated things like adding new chunks, -adding new transformations, and generally changing how libpng works. -Both of those are compile-time issues; that is, they are generally -determined at the time the code is written, and there is rarely a need -to provide the user with a means of changing them. - -Memory allocation, input/output, and error handling - -All of the memory allocation, input/output, and error handling in libpng -goes through callbacks that are user-settable. The default routines are -in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change -these functions, call the appropriate png_set_*_fn() function. - -Memory allocation is done through the functions png_malloc(), png_calloc(), -and png_free(). The png_malloc() and png_free() functions currently just -call the standard C functions and png_calloc() calls png_malloc() and then -clears the newly allocated memory to zero; note that png_calloc(png_ptr, size) -is not the same as the calloc(number, size) function provided by stdlib.h. -There is limited support for certain systems with segmented memory -architectures and the types of pointers declared by png.h match this; you -will have to use appropriate pointers in your application. If you prefer -to use a different method of allocating and freeing data, you can use -png_create_read_struct_2() or png_create_write_struct_2() to register your -own functions as described above. These functions also provide a void -pointer that can be retrieved via - - mem_ptr=png_get_mem_ptr(png_ptr); - -Your replacement memory functions must have prototypes as follows: - - png_voidp malloc_fn(png_structp png_ptr, - png_alloc_size_t size); - - void free_fn(png_structp png_ptr, png_voidp ptr); - -Your malloc_fn() must return NULL in case of failure. The png_malloc() -function will normally call png_error() if it receives a NULL from the -system memory allocator or from your replacement malloc_fn(). - -Your free_fn() will never be called with a NULL ptr, since libpng's -png_free() checks for NULL before calling free_fn(). - -Input/Output in libpng is done through png_read() and png_write(), -which currently just call fread() and fwrite(). The FILE * is stored in -png_struct and is initialized via png_init_io(). If you wish to change -the method of I/O, the library supplies callbacks that you can set -through the function png_set_read_fn() and png_set_write_fn() at run -time, instead of calling the png_init_io() function. These functions -also provide a void pointer that can be retrieved via the function -png_get_io_ptr(). For example: - - png_set_read_fn(png_structp read_ptr, - voidp read_io_ptr, png_rw_ptr read_data_fn) - - png_set_write_fn(png_structp write_ptr, - voidp write_io_ptr, png_rw_ptr write_data_fn, - png_flush_ptr output_flush_fn); - - voidp read_io_ptr = png_get_io_ptr(read_ptr); - voidp write_io_ptr = png_get_io_ptr(write_ptr); - -The replacement I/O functions must have prototypes as follows: - - void user_read_data(png_structp png_ptr, - png_bytep data, size_t length); - - void user_write_data(png_structp png_ptr, - png_bytep data, size_t length); - - void user_flush_data(png_structp png_ptr); - -The user_read_data() function is responsible for detecting and -handling end-of-data errors. - -Supplying NULL for the read, write, or flush functions sets them back -to using the default C stream functions, which expect the io_ptr to -point to a standard *FILE structure. It is probably a mistake -to use NULL for one of write_data_fn and output_flush_fn but not both -of them, unless you have built libpng with PNG_NO_WRITE_FLUSH defined. -It is an error to read from a write stream, and vice versa. - -Error handling in libpng is done through png_error() and png_warning(). -Errors handled through png_error() are fatal, meaning that png_error() -should never return to its caller. Currently, this is handled via -setjmp() and longjmp() (unless you have compiled libpng with -PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()), -but you could change this to do things like exit() if you should wish, -as long as your function does not return. - -On non-fatal errors, png_warning() is called -to print a warning message, and then control returns to the calling code. -By default png_error() and png_warning() print a message on stderr via -fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined -(because you don't want the messages) or PNG_NO_STDIO defined (because -fprintf() isn't available). If you wish to change the behavior of the error -functions, you will need to set up your own message callbacks. These -functions are normally supplied at the time that the png_struct is created. -It is also possible to redirect errors and warnings to your own replacement -functions after png_create_*_struct() has been called by calling: - - png_set_error_fn(png_structp png_ptr, - png_voidp error_ptr, png_error_ptr error_fn, - png_error_ptr warning_fn); - -If NULL is supplied for either error_fn or warning_fn, then the libpng -default function will be used, calling fprintf() and/or longjmp() if a -problem is encountered. The replacement error functions should have -parameters as follows: - - void user_error_fn(png_structp png_ptr, - png_const_charp error_msg); - - void user_warning_fn(png_structp png_ptr, - png_const_charp warning_msg); - -Then, within your user_error_fn or user_warning_fn, you can retrieve -the error_ptr if you need it, by calling - - png_voidp error_ptr = png_get_error_ptr(png_ptr); - -The motivation behind using setjmp() and longjmp() is the C++ throw and -catch exception handling methods. This makes the code much easier to write, -as there is no need to check every return code of every function call. -However, there are some uncertainties about the status of local variables -after a longjmp, so the user may want to be careful about doing anything -after setjmp returns non-zero besides returning itself. Consult your -compiler documentation for more details. For an alternative approach, you -may wish to use the "cexcept" facility (see https://cexcept.sourceforge.io/), -which is illustrated in pngvalid.c and in contrib/visupng. - -Beginning in libpng-1.4.0, the png_set_benign_errors() API became available. -You can use this to handle certain errors (normally handled as errors) -as warnings. - - png_set_benign_errors (png_ptr, int allowed); - - allowed: 0: treat png_benign_error() as an error. - 1: treat png_benign_error() as a warning. - -As of libpng-1.6.0, the default condition is to treat benign errors as -warnings while reading and as errors while writing. - -.SS Custom chunks - -If you need to read or write custom chunks, you may need to get deeper -into the libpng code. The library now has mechanisms for storing -and writing chunks of unknown type; you can even declare callbacks -for custom chunks. However, this may not be good enough if the -library code itself needs to know about interactions between your -chunk and existing `intrinsic' chunks. - -If you need to write a new intrinsic chunk, first read the PNG -specification. Acquire a first level of understanding of how it works. -Pay particular attention to the sections that describe chunk names, -and look at how other chunks were designed, so you can do things -similarly. Second, check out the sections of libpng that read and -write chunks. Try to find a chunk that is similar to yours and use -it as a template. More details can be found in the comments inside -the code. It is best to handle private or unknown chunks in a generic method, -via callback functions, instead of by modifying libpng functions. This -is illustrated in pngtest.c, which uses a callback function to handle a -private "vpAg" chunk and the new "sTER" chunk, which are both unknown to -libpng. - -If you wish to write your own transformation for the data, look through -the part of the code that does the transformations, and check out some of -the simpler ones to get an idea of how they work. Try to find a similar -transformation to the one you want to add and copy off of it. More details -can be found in the comments inside the code itself. - -.SS Configuring for gui/windowing platforms: - -You will need to write new error and warning functions that use the GUI -interface, as described previously, and set them to be the error and -warning functions at the time that png_create_*_struct() is called, -in order to have them available during the structure initialization. -They can be changed later via png_set_error_fn(). On some compilers, -you may also have to change the memory allocators (png_malloc, etc.). - -.SS Configuring zlib: - -There are special functions to configure the compression. Perhaps the -most useful one changes the compression level, which currently uses -input compression values in the range 0 - 9. The library normally -uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests -have shown that for a large majority of images, compression values in -the range 3-6 compress nearly as well as higher levels, and do so much -faster. For online applications it may be desirable to have maximum speed -(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also -specify no compression (Z_NO_COMPRESSION = 0), but this would create -files larger than just storing the raw bitmap. You can specify the -compression level by calling: - - #include zlib.h - png_set_compression_level(png_ptr, level); - -Another useful one is to reduce the memory level used by the library. -The memory level defaults to 8, but it can be lowered if you are -short on memory (running DOS, for example, where you only have 640K). -Note that the memory level does have an effect on compression; among -other things, lower levels will result in sections of incompressible -data being emitted in smaller stored blocks, with a correspondingly -larger relative overhead of up to 15% in the worst case. - - #include zlib.h - png_set_compression_mem_level(png_ptr, level); - -The other functions are for configuring zlib. They are not recommended -for normal use and may result in writing an invalid PNG file. See -zlib.h for more information on what these mean. - - #include zlib.h - png_set_compression_strategy(png_ptr, - strategy); - - png_set_compression_window_bits(png_ptr, - window_bits); - - png_set_compression_method(png_ptr, method); - -This controls the size of the IDAT chunks (default 8192): - - png_set_compression_buffer_size(png_ptr, size); - -As of libpng version 1.5.4, additional APIs became -available to set these separately for non-IDAT -compressed chunks such as zTXt, iTXt, and iCCP: - - #include zlib.h - #if PNG_LIBPNG_VER >= 10504 - png_set_text_compression_level(png_ptr, level); - - png_set_text_compression_mem_level(png_ptr, level); - - png_set_text_compression_strategy(png_ptr, - strategy); - - png_set_text_compression_window_bits(png_ptr, - window_bits); - - png_set_text_compression_method(png_ptr, method); - #endif - -.SS Controlling row filtering - -If you want to control whether libpng uses filtering or not, which -filters are used, and how it goes about picking row filters, you -can call one of these functions. The selection and configuration -of row filters can have a significant impact on the size and -encoding speed and a somewhat lesser impact on the decoding speed -of an image. Filtering is enabled by default for RGB and grayscale -images (with and without alpha), but not for paletted images nor -for any images with bit depths less than 8 bits/pixel. - -The 'method' parameter sets the main filtering method, which is -currently only '0' in the PNG 1.2 specification. The 'filters' -parameter sets which filter(s), if any, should be used for each -scanline. Possible values are PNG_ALL_FILTERS, PNG_NO_FILTERS, -or PNG_FAST_FILTERS to turn filtering on and off, or to turn on -just the fast-decoding subset of filters, respectively. - -Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB, -PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise -ORed together with '|' to specify one or more filters to use. -These filters are described in more detail in the PNG specification. -If you intend to change the filter type during the course of writing -the image, you should start with flags set for all of the filters -you intend to use so that libpng can initialize its internal -structures appropriately for all of the filter types. (Note that this -means the first row must always be adaptively filtered, because libpng -currently does not allocate the filter buffers until png_write_row() -is called for the first time.) - - filters = PNG_NO_FILTERS; - filters = PNG_ALL_FILTERS; - filters = PNG_FAST_FILTERS; - - or - - filters = PNG_FILTER_NONE | PNG_FILTER_SUB | - PNG_FILTER_UP | PNG_FILTER_AVG | - PNG_FILTER_PAETH; - - png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, - filters); - - The second parameter can also be - PNG_INTRAPIXEL_DIFFERENCING if you are - writing a PNG to be embedded in a MNG - datastream. This parameter must be the - same as the value of filter_method used - in png_set_IHDR(). - -.SS Requesting debug printout - -The macro definition PNG_DEBUG can be used to request debugging -printout. Set it to an integer value in the range 0 to 3. Higher -numbers result in increasing amounts of debugging information. The -information is printed to the "stderr" file, unless another file -name is specified in the PNG_DEBUG_FILE macro definition. - -When PNG_DEBUG > 0, the following functions (macros) become available: - - png_debug(level, message) - png_debug1(level, message, p1) - png_debug2(level, message, p1, p2) - -in which "level" is compared to PNG_DEBUG to decide whether to print -the message, "message" is the formatted string to be printed, -and p1 and p2 are parameters that are to be embedded in the string -according to printf-style formatting directives. For example, - - png_debug1(2, "foo=%d", foo); - -is expanded to - - if (PNG_DEBUG > 2) - fprintf(PNG_DEBUG_FILE, "foo=%d\en", foo); - -When PNG_DEBUG is defined but is zero, the macros aren't defined, but you -can still use PNG_DEBUG to control your own debugging: - - #ifdef PNG_DEBUG - fprintf(stderr, ... - #endif - -When PNG_DEBUG = 1, the macros are defined, but only png_debug statements -having level = 0 will be printed. There aren't any such statements in -this version of libpng, but if you insert some they will be printed. - -.SH VII. MNG support - -The MNG specification (available at http://www.libpng.org/pub/mng) allows -certain extensions to PNG for PNG images that are embedded in MNG datastreams. -Libpng can support some of these extensions. To enable them, use the -png_permit_mng_features() function: - - feature_set = png_permit_mng_features(png_ptr, mask) - - mask is a png_uint_32 containing the bitwise OR of the - features you want to enable. These include - PNG_FLAG_MNG_EMPTY_PLTE - PNG_FLAG_MNG_FILTER_64 - PNG_ALL_MNG_FEATURES - - feature_set is a png_uint_32 that is the bitwise AND of - your mask with the set of MNG features that is - supported by the version of libpng that you are using. - -It is an error to use this function when reading or writing a standalone -PNG file with the PNG 8-byte signature. The PNG datastream must be wrapped -in a MNG datastream. As a minimum, it must have the MNG 8-byte signature -and the MHDR and MEND chunks. Libpng does not provide support for these -or any other MNG chunks; your application must provide its own support for -them. You may wish to consider using libmng (available at -https://www.libmng.com/) instead. - -.SH VIII. Changes to Libpng from version 0.88 - -It should be noted that versions of libpng later than 0.96 are not -distributed by the original libpng author, Guy Schalnat, nor by -Andreas Dilger, who had taken over from Guy during 1996 and 1997, and -distributed versions 0.89 through 0.96, but rather by another member -of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are -still alive and well, but they have moved on to other things. - -The old libpng functions png_read_init(), png_write_init(), -png_info_init(), png_read_destroy(), and png_write_destroy() have been -moved to PNG_INTERNAL in version 0.95 to discourage their use. These -functions will be removed from libpng version 1.4.0. - -The preferred method of creating and initializing the libpng structures is -via the png_create_read_struct(), png_create_write_struct(), and -png_create_info_struct() because they isolate the size of the structures -from the application, allow version error checking, and also allow the -use of custom error handling routines during the initialization, which -the old functions do not. The functions png_read_destroy() and -png_write_destroy() do not actually free the memory that libpng -allocated for these structs, but just reset the data structures, so they -can be used instead of png_destroy_read_struct() and -png_destroy_write_struct() if you feel there is too much system overhead -allocating and freeing the png_struct for each image read. - -Setting the error callbacks via png_set_message_fn() before -png_read_init() as was suggested in libpng-0.88 is no longer supported -because this caused applications that do not use custom error functions -to fail if the png_ptr was not initialized to zero. It is still possible -to set the error callbacks AFTER png_read_init(), or to change them with -png_set_error_fn(), which is essentially the same function, but with a new -name to force compilation errors with applications that try to use the old -method. - -Support for the sCAL, iCCP, iTXt, and sPLT chunks was added at libpng-1.0.6; -however, iTXt support was not enabled by default. - -Starting with version 1.0.7, you can find out which version of the library -you are using at run-time: - - png_uint_32 libpng_vn = png_access_version_number(); - -The number libpng_vn is constructed from the major version, minor -version with leading zero, and release number with leading zero, -(e.g., libpng_vn for version 1.0.7 is 10007). - -Note that this function does not take a png_ptr, so you can call it -before you've created one. - -You can also check which version of png.h you used when compiling your -application: - - png_uint_32 application_vn = PNG_LIBPNG_VER; - -.SH IX. Changes to Libpng from version 1.0.x to 1.2.x - -Support for user memory management was enabled by default. To -accomplish this, the functions png_create_read_struct_2(), -png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(), -png_malloc_default(), and png_free_default() were added. - -Support for the iTXt chunk has been enabled by default as of -version 1.2.41. - -Support for certain MNG features was enabled. - -Support for numbered error messages was added. However, we never got -around to actually numbering the error messages. The function -png_set_strip_error_numbers() was added (Note: the prototype for this -function was inadvertently removed from png.h in PNG_NO_ASSEMBLER_CODE -builds of libpng-1.2.15. It was restored in libpng-1.2.36). - -The png_malloc_warn() function was added at libpng-1.2.3. This issues -a png_warning and returns NULL instead of aborting when it fails to -acquire the requested memory allocation. - -Support for setting user limits on image width and height was enabled -by default. The functions png_set_user_limits(), png_get_user_width_max(), -and png_get_user_height_max() were added at libpng-1.2.6. - -The png_set_add_alpha() function was added at libpng-1.2.7. - -The function png_set_expand_gray_1_2_4_to_8() was added at libpng-1.2.9. -Unlike png_set_gray_1_2_4_to_8(), the new function does not expand the -tRNS chunk to alpha. The png_set_gray_1_2_4_to_8() function is -deprecated. - -A number of macro definitions in support of runtime selection of -assembler code features (especially Intel MMX code support) were -added at libpng-1.2.0: - - PNG_ASM_FLAG_MMX_SUPPORT_COMPILED - PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU - PNG_ASM_FLAG_MMX_READ_COMBINE_ROW - PNG_ASM_FLAG_MMX_READ_INTERLACE - PNG_ASM_FLAG_MMX_READ_FILTER_SUB - PNG_ASM_FLAG_MMX_READ_FILTER_UP - PNG_ASM_FLAG_MMX_READ_FILTER_AVG - PNG_ASM_FLAG_MMX_READ_FILTER_PAETH - PNG_ASM_FLAGS_INITIALIZED - PNG_MMX_READ_FLAGS - PNG_MMX_FLAGS - PNG_MMX_WRITE_FLAGS - PNG_MMX_FLAGS - -We added the following functions in support of runtime -selection of assembler code features: - - png_get_mmx_flagmask() - png_set_mmx_thresholds() - png_get_asm_flags() - png_get_mmx_bitdepth_threshold() - png_get_mmx_rowbytes_threshold() - png_set_asm_flags() - -We replaced all of these functions with simple stubs in libpng-1.2.20, -when the Intel assembler code was removed due to a licensing issue. - -These macros are deprecated: - - PNG_READ_TRANSFORMS_NOT_SUPPORTED - PNG_PROGRESSIVE_READ_NOT_SUPPORTED - PNG_NO_SEQUENTIAL_READ_SUPPORTED - PNG_WRITE_TRANSFORMS_NOT_SUPPORTED - PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED - PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED - -They have been replaced, respectively, by: - - PNG_NO_READ_TRANSFORMS - PNG_NO_PROGRESSIVE_READ - PNG_NO_SEQUENTIAL_READ - PNG_NO_WRITE_TRANSFORMS - PNG_NO_READ_ANCILLARY_CHUNKS - PNG_NO_WRITE_ANCILLARY_CHUNKS - -PNG_MAX_UINT was replaced with PNG_UINT_31_MAX. It has been -deprecated since libpng-1.0.16 and libpng-1.2.6. - -The function - png_check_sig(sig, num) -was replaced with - !png_sig_cmp(sig, 0, num) -It has been deprecated since libpng-0.90. - -The function - png_set_gray_1_2_4_to_8() -which also expands tRNS to alpha was replaced with - png_set_expand_gray_1_2_4_to_8() -which does not. It has been deprecated since libpng-1.0.18 and 1.2.9. - -.SH X. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x - -Private libpng prototypes and macro definitions were moved from -png.h and pngconf.h into a new pngpriv.h header file. - -Functions png_set_benign_errors(), png_benign_error(), and -png_chunk_benign_error() were added. - -Support for setting the maximum amount of memory that the application -will allocate for reading chunks was added, as a security measure. -The functions png_set_chunk_cache_max() and png_get_chunk_cache_max() -were added to the library. - -We implemented support for I/O states by adding png_ptr member io_state -and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c - -We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level -input transforms. - -Checking for and reporting of errors in the IHDR chunk is more thorough. - -Support for global arrays was removed, to improve thread safety. - -Some obsolete/deprecated macros and functions have been removed. - -Typecasted NULL definitions such as - #define png_voidp_NULL (png_voidp)NULL -were eliminated. If you used these in your application, just use -NULL instead. - -The png_struct and info_struct members "trans" and "trans_values" were -changed to "trans_alpha" and "trans_color", respectively. - -The obsolete, unused pnggccrd.c and pngvcrd.c files and related makefiles -were removed. - -The PNG_1_0_X and PNG_1_2_X macros were eliminated. - -The PNG_LEGACY_SUPPORTED macro was eliminated. - -Many WIN32_WCE #ifdefs were removed. - -The functions png_read_init(info_ptr), png_write_init(info_ptr), -png_info_init(info_ptr), png_read_destroy(), and png_write_destroy() -have been removed. They have been deprecated since libpng-0.95. - -The png_permit_empty_plte() was removed. It has been deprecated -since libpng-1.0.9. Use png_permit_mng_features() instead. - -We removed the obsolete stub functions png_get_mmx_flagmask(), -png_set_mmx_thresholds(), png_get_asm_flags(), -png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(), -png_set_asm_flags(), and png_mmx_supported() - -We removed the obsolete png_check_sig(), png_memcpy_check(), and -png_memset_check() functions. Instead use !png_sig_cmp(), memcpy(), -and memset(), respectively. - -The function png_set_gray_1_2_4_to_8() was removed. It has been -deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with -png_set_expand_gray_1_2_4_to_8() because the former function also -expanded any tRNS chunk to an alpha channel. - -Macros for png_get_uint_16, png_get_uint_32, and png_get_int_32 -were added and are used by default instead of the corresponding -functions. Unfortunately, -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. - -We changed the prototype for png_malloc() from - png_malloc(png_structp png_ptr, png_uint_32 size) -to - png_malloc(png_structp png_ptr, png_alloc_size_t size) - -This also applies to the prototype for the user replacement malloc_fn(). - -The png_calloc() function was added and is used in place of -of "png_malloc(); memset();" except in the case in png_read_png() -where the array consists of pointers; in this case a "for" loop is used -after the png_malloc() to set the pointers to NULL, to give robust. -behavior in case the application runs out of memory part-way through -the process. - -We changed the prototypes of png_get_compression_buffer_size() and -png_set_compression_buffer_size() to work with size_t instead of -png_uint_32. - -Support for numbered error messages was removed by default, since we -never got around to actually numbering the error messages. The function -png_set_strip_error_numbers() was removed from the library by default. - -The png_zalloc() and png_zfree() functions are no longer exported. -The png_zalloc() function no longer zeroes out the memory that it -allocates. Applications that called png_zalloc(png_ptr, number, size) -can call png_calloc(png_ptr, number*size) instead, and can call -png_free() instead of png_zfree(). - -Support for dithering was disabled by default in libpng-1.4.0, because -it has not been well tested and doesn't actually "dither". -The code was not -removed, however, and could be enabled by building libpng with -PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support -was re-enabled, but the function was renamed png_set_quantize() to -reflect more accurately what it actually does. At the same time, -the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to -PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED -was renamed to PNG_READ_QUANTIZE_SUPPORTED. - -We removed the trailing '.' from the warning and error messages. - -.SH XI. Changes to Libpng from version 1.4.x to 1.5.x - -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. -The incorrect macro was removed from libpng-1.4.5. - -Checking for invalid palette index on write was added at libpng -1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues -a benign error. This is enabled by default because this condition is an -error according to the PNG specification, Clause 11.3.2, but the error can -be ignored in each png_ptr with - - png_set_check_for_invalid_index(png_ptr, allowed); - - allowed - one of - 0: disable benign error (accept the - invalid data without warning). - 1: enable benign error (treat the - invalid data as an error or a - warning). - -If the error is ignored, or if png_benign_error() treats it as a warning, -any invalid pixels are decoded as opaque black by the decoder and written -as-is by the encoder. - -Retrieving the maximum palette index found was added at libpng-1.5.15. -This statement must appear after png_read_png() or png_read_image() while -reading, and after png_write_png() or png_write_image() while writing. - - int max_palette = png_get_palette_max(png_ptr, info_ptr); - -This will return the maximum palette index found in the image, or "\-1" if -the palette was not checked, or "0" if no palette was found. Note that this -does not account for any palette index used by ancillary chunks such as the -bKGD chunk; you must check those separately to determine the maximum -palette index actually used. - -There are no substantial API changes between the non-deprecated parts of -the 1.4.5 API and the 1.5.0 API; however, the ability to directly access -members of the main libpng control structures, png_struct and png_info, -deprecated in earlier versions of libpng, has been completely removed from -libpng 1.5, and new private "pngstruct.h", "pnginfo.h", and "pngdebug.h" -header files were created. - -We no longer include zlib.h in png.h. The include statement has been moved -to pngstruct.h, where it is not accessible by applications. Applications that -need access to information in zlib.h will need to add the '#include "zlib.h"' -directive. It does not matter whether this is placed prior to or after -the '"#include png.h"' directive. - -The png_sprintf(), png_strcpy(), and png_strncpy() macros are no longer used -and were removed. - -We moved the png_strlen(), png_memcpy(), png_memset(), and png_memcmp() -macros into a private header file (pngpriv.h) that is not accessible to -applications. - -In png_get_iCCP, the type of "profile" was changed from png_charpp -to png_bytepp, and in png_set_iCCP, from png_charp to png_const_bytep. - -There are changes of form in png.h, including new and changed macros to -declare parts of the API. Some API functions with arguments that are -pointers to data not modified within the function have been corrected to -declare these arguments with PNG_CONST. - -Much of the internal use of C macros to control the library build has also -changed and some of this is visible in the exported header files, in -particular the use of macros to control data and API elements visible -during application compilation may require significant revision to -application code. (It is extremely rare for an application to do this.) - -Any program that compiled against libpng 1.4 and did not use deprecated -features or access internal library structures should compile and work -against libpng 1.5, except for the change in the prototype for -png_get_iCCP() and png_set_iCCP() API functions mentioned above. - -libpng 1.5.0 adds PNG_ PASS macros to help in the reading and writing of -interlaced images. The macros return the number of rows and columns in -each pass and information that can be used to de-interlace and (if -absolutely necessary) interlace an image. - -libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls -the application-provided png_longjmp_ptr on the internal, but application -initialized, longjmp buffer. It is provided as a convenience to avoid -the need to use the png_jmpbuf macro, which had the unnecessary side -effect of resetting the internal png_longjmp_ptr value. - -libpng 1.5.0 includes a complete fixed point API. By default this is -present along with the corresponding floating point API. In general the -fixed point API is faster and smaller than the floating point one because -the PNG file format used fixed point, not floating point. This applies -even if the library uses floating point in internal calculations. A new -macro, PNG_FLOATING_ARITHMETIC_SUPPORTED, reveals whether the library -uses floating point arithmetic (the default) or fixed point arithmetic -internally for performance critical calculations such as gamma correction. -In some cases, the gamma calculations may produce slightly different -results. This has changed the results in png_rgb_to_gray and in alpha -composition (png_set_background for example). This applies even if the -original image was already linear (gamma == 1.0) and, therefore, it is -not necessary to linearize the image. This is because libpng has *not* -been changed to optimize that case correctly, yet. - -Fixed point support for the sCAL chunk comes with an important caveat; -the sCAL specification uses a decimal encoding of floating point values -and the accuracy of PNG fixed point values is insufficient for -representation of these values. Consequently a "string" API -(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading -arbitrary sCAL chunks in the absence of either the floating point API or -internal floating point calculations. Starting with libpng-1.5.0, both -of these functions are present when PNG_sCAL_SUPPORTED is defined. Prior -to libpng-1.5.0, their presence also depended upon PNG_FIXED_POINT_SUPPORTED -being defined and PNG_FLOATING_POINT_SUPPORTED not being defined. - -Applications no longer need to include the optional distribution header -file pngusr.h or define the corresponding macros during application -build in order to see the correct variant of the libpng API. From 1.5.0 -application code can check for the corresponding _SUPPORTED macro: - -#ifdef PNG_INCH_CONVERSIONS_SUPPORTED - /* code that uses the inch conversion APIs. */ -#endif - -This macro will only be defined if the inch conversion functions have been -compiled into libpng. The full set of macros, and whether or not support -has been compiled in, are available in the header file pnglibconf.h. -This header file is specific to the libpng build. Notice that prior to -1.5.0 the _SUPPORTED macros would always have the default definition unless -reset by pngusr.h or by explicit settings on the compiler command line. -These settings may produce compiler warnings or errors in 1.5.0 because -of macro redefinition. - -Applications can now choose whether to use these macros or to call the -corresponding function by defining PNG_USE_READ_MACROS or -PNG_NO_USE_READ_MACROS before including png.h. Notice that this is -only supported from 1.5.0; defining PNG_NO_USE_READ_MACROS prior to 1.5.0 -will lead to a link failure. - -Prior to libpng-1.5.4, the zlib compressor used the same set of parameters -when compressing the IDAT data and textual data such as zTXt and iCCP. -In libpng-1.5.4 we reinitialized the zlib stream for each type of data. -We added five png_set_text_*() functions for setting the parameters to -use with textual data. - -Prior to libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED -option was off by default, and slightly inaccurate scaling occurred. -This option can no longer be turned off, and the choice of accurate -or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8() -API for accurate scaling or the old png_set_strip_16_to_8() API for simple -chopping. In libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED -macro became PNG_READ_SCALE_16_TO_8_SUPPORTED, and the PNG_READ_16_TO_8 -macro became PNG_READ_STRIP_16_TO_8_SUPPORTED, to enable the two -png_set_*_16_to_8() functions separately. - -Prior to libpng-1.5.4, the png_set_user_limits() function could only be -used to reduce the width and height limits from the value of -PNG_USER_WIDTH_MAX and PNG_USER_HEIGHT_MAX, although this document said -that it could be used to override them. Now this function will reduce or -increase the limits. - -Starting in libpng-1.5.22, default user limits were established. These -can be overridden by application calls to png_set_user_limits(), -png_set_user_chunk_cache_max(), and/or png_set_user_malloc_max(). -The limits are now - max possible default - png_user_width_max 0x7fffffff 1,000,000 - png_user_height_max 0x7fffffff 1,000,000 - png_user_chunk_cache_max 0 (unlimited) 1000 - png_user_chunk_malloc_max 0 (unlimited) 8,000,000 - -The png_set_option() function (and the "options" member of the png struct) was -added to libpng-1.5.15, with option PNG_ARM_NEON. - -The library now supports a complete fixed point implementation and can -thus be used on systems that have no floating point support or very -limited or slow support. Previously gamma correction, an essential part -of complete PNG support, required reasonably fast floating point. - -As part of this the choice of internal implementation has been made -independent of the choice of fixed versus floating point APIs and all the -missing fixed point APIs have been implemented. - -The exact mechanism used to control attributes of API functions has -changed, as described in the INSTALL file. - -A new test program, pngvalid, is provided in addition to pngtest. -pngvalid validates the arithmetic accuracy of the gamma correction -calculations and includes a number of validations of the file format. -A subset of the full range of tests is run when "make check" is done -(in the 'configure' build.) pngvalid also allows total allocated memory -usage to be evaluated and performs additional memory overwrite validation. - -Many changes to individual feature macros have been made. The following -are the changes most likely to be noticed by library builders who -configure libpng: - -1) All feature macros now have consistent naming: - -#define PNG_NO_feature turns the feature off -#define PNG_feature_SUPPORTED turns the feature on - -pnglibconf.h contains one line for each feature macro which is either: - -#define PNG_feature_SUPPORTED - -if the feature is supported or: - -/*#undef PNG_feature_SUPPORTED*/ - -if it is not. Library code consistently checks for the 'SUPPORTED' macro. -It does not, and libpng applications should not, check for the 'NO' macro -which will not normally be defined even if the feature is not supported. -The 'NO' macros are only used internally for setting or not setting the -corresponding 'SUPPORTED' macros. - -Compatibility with the old names is provided as follows: - -PNG_INCH_CONVERSIONS turns on PNG_INCH_CONVERSIONS_SUPPORTED - -And the following definitions disable the corresponding feature: - -PNG_SETJMP_NOT_SUPPORTED disables SETJMP -PNG_READ_TRANSFORMS_NOT_SUPPORTED disables READ_TRANSFORMS -PNG_NO_READ_COMPOSITED_NODIV disables READ_COMPOSITE_NODIV -PNG_WRITE_TRANSFORMS_NOT_SUPPORTED disables WRITE_TRANSFORMS -PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED disables READ_ANCILLARY_CHUNKS -PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED disables WRITE_ANCILLARY_CHUNKS - -Library builders should remove use of the above, inconsistent, names. - -2) Warning and error message formatting was previously conditional on -the STDIO feature. The library has been changed to use the -CONSOLE_IO feature instead. This means that if CONSOLE_IO is disabled -the library no longer uses the printf(3) functions, even though the -default read/write implementations use (FILE) style stdio.h functions. - -3) Three feature macros now control the fixed/floating point decisions: - -PNG_FLOATING_POINT_SUPPORTED enables the floating point APIs - -PNG_FIXED_POINT_SUPPORTED enables the fixed point APIs; however, in -practice these are normally required internally anyway (because the PNG -file format is fixed point), therefore in most cases PNG_NO_FIXED_POINT -merely stops the function from being exported. - -PNG_FLOATING_ARITHMETIC_SUPPORTED chooses between the internal floating -point implementation or the fixed point one. Typically the fixed point -implementation is larger and slower than the floating point implementation -on a system that supports floating point; however, it may be faster on a -system which lacks floating point hardware and therefore uses a software -emulation. - -4) Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the -functions to read and write ints to be disabled independently of -PNG_USE_READ_MACROS, which allows libpng to be built with the functions -even though the default is to use the macros - this allows applications -to choose at app buildtime whether or not to use macros (previously -impossible because the functions weren't in the default build.) - -.SH XII. Changes to Libpng from version 1.5.x to 1.6.x - -A "simplified API" has been added (see documentation in png.h and a simple -example in contrib/examples/pngtopng.c). The new publicly visible API -includes the following: - - macros: - PNG_FORMAT_* - PNG_IMAGE_* - structures: - png_control - png_image - read functions - png_image_begin_read_from_file() - png_image_begin_read_from_stdio() - png_image_begin_read_from_memory() - png_image_finish_read() - png_image_free() - write functions - png_image_write_to_file() - png_image_write_to_memory() - png_image_write_to_stdio() - -Starting with libpng-1.6.0, you can configure libpng to prefix all exported -symbols, using the PNG_PREFIX macro. - -We no longer include string.h in png.h. The include statement has been moved -to pngpriv.h, where it is not accessible by applications. Applications that -need access to information in string.h must add an '#include ' -directive. It does not matter whether this is placed prior to or after -the '#include "png.h"' directive. - -The following API are now DEPRECATED: - png_info_init_3() - png_convert_to_rfc1123() which has been replaced - with png_convert_to_rfc1123_buffer() - png_malloc_default() - png_free_default() - png_reset_zstream() - -The following have been removed: - png_get_io_chunk_name(), which has been replaced - with png_get_io_chunk_type(). The new - function returns a 32-bit integer instead of - a string. - The png_sizeof(), png_strlen(), png_memcpy(), png_memcmp(), and - png_memset() macros are no longer used in the libpng sources and - have been removed. These had already been made invisible to applications - (i.e., defined in the private pngpriv.h header file) since libpng-1.5.0. - -The signatures of many exported functions were changed, such that - png_structp became png_structrp or png_const_structrp - png_infop became png_inforp or png_const_inforp -where "rp" indicates a "restricted pointer". - -Dropped support for 16-bit platforms. The support for FAR/far types has -been eliminated and the definition of png_alloc_size_t is now controlled -by a flag so that 'small size_t' systems can select it if necessary. - -Error detection in some chunks has improved; in particular the iCCP chunk -reader now does pretty complete validation of the basic format. Some bad -profiles that were previously accepted are now accepted with a warning or -rejected, depending upon the png_set_benign_errors() setting, in particular -the very old broken Microsoft/HP 3144-byte sRGB profile. Starting with -libpng-1.6.11, recognizing and checking sRGB profiles can be avoided by -means of - - #if defined(PNG_SKIP_sRGB_CHECK_PROFILE) && \ - defined(PNG_SET_OPTION_SUPPORTED) - png_set_option(png_ptr, PNG_SKIP_sRGB_CHECK_PROFILE, - PNG_OPTION_ON); - #endif - -It's not a good idea to do this if you are using the "simplified API", -which needs to be able to recognize sRGB profiles conveyed via the iCCP -chunk. - -The PNG spec requirement that only grayscale profiles may appear in images -with color type 0 or 4 and that even if the image only contains gray pixels, -only RGB profiles may appear in images with color type 2, 3, or 6, is now -enforced. The sRGB chunk is allowed to appear in images with any color type -and is interpreted by libpng to convey a one-tracer-curve gray profile or a -three-tracer-curve RGB profile as appropriate. - -Libpng 1.5.x erroneously used /MD for Debug DLL builds; if you used the debug -builds in your app and you changed your app to use /MD you will need to -change it back to /MDd for libpng 1.6.x. - -Prior to libpng-1.6.0 a warning would be issued if the iTXt chunk contained -an empty language field or an empty translated keyword. Both of these -are allowed by the PNG specification, so these warnings are no longer issued. - -The library now issues an error if the application attempts to set a -transform after it calls png_read_update_info() or if it attempts to call -both png_read_update_info() and png_start_read_image() or to call either -of them more than once. - -The default condition for benign_errors is now to treat benign errors as -warnings while reading and as errors while writing. - -The library now issues a warning if both background processing and RGB to -gray are used when gamma correction happens. As with previous versions of -the library the results are numerically very incorrect in this case. - -There are some minor arithmetic changes in some transforms such as -png_set_background(), that might be detected by certain regression tests. - -Unknown chunk handling has been improved internally, without any API change. -This adds more correct option control of the unknown handling, corrects -a pre-existing bug where the per-chunk 'keep' setting is ignored, and makes -it possible to skip IDAT chunks in the sequential reader. - -The machine-generated configure files are no longer included in branches -libpng16 and later of the GIT repository. They continue to be included -in the tarball releases, however. - -Libpng-1.6.0 through 1.6.2 used the CMF bytes at the beginning of the IDAT -stream to set the size of the sliding window for reading instead of using the -default 32-kbyte sliding window size. It was discovered that there are -hundreds of PNG files in the wild that have incorrect CMF bytes that caused -zlib to issue the "invalid distance too far back" error and reject the file. -Libpng-1.6.3 and later calculate their own safe CMF from the image dimensions, -provide a way to revert to the libpng-1.5.x behavior (ignoring the CMF bytes -and using a 32-kbyte sliding window), by using - - png_set_option(png_ptr, PNG_MAXIMUM_INFLATE_WINDOW, - PNG_OPTION_ON); - -and provide a tool (contrib/tools/pngfix) for rewriting a PNG file while -optimizing the CMF bytes in its IDAT chunk correctly. - -Libpng-1.6.0 and libpng-1.6.1 wrote uncompressed iTXt chunks with the wrong -length, which resulted in PNG files that cannot be read beyond the bad iTXt -chunk. This error was fixed in libpng-1.6.3, and a tool (called -contrib/tools/png-fix-itxt) has been added to the libpng distribution. - -Starting with libpng-1.6.17, the PNG_SAFE_LIMITS macro was eliminated -and safe limits are used by default (users who need larger limits -can still override them at compile time or run time, as described above). - -The new limits are - default spec limit - png_user_width_max 1,000,000 2,147,483,647 - png_user_height_max 1,000,000 2,147,483,647 - png_user_chunk_cache_max 128 unlimited - png_user_chunk_malloc_max 8,000,000 unlimited - -Starting with libpng-1.6.18, a PNG_RELEASE_BUILD macro was added, which allows -library builders to control compilation for an installed system (a release build). -It can be set for testing debug or beta builds to ensure that they will compile -when the build type is switched to RC or STABLE. In essence this overrides the -PNG_LIBPNG_BUILD_BASE_TYPE definition which is not directly user controllable. - -Starting with libpng-1.6.19, attempting to set an over-length PLTE chunk -is an error. Previously this requirement of the PNG specification was not -enforced, and the palette was always limited to 256 entries. An over-length -PLTE chunk found in an input PNG is silently truncated. - -Starting with libpng-1.6.31, the eXIf chunk is supported. Libpng does not -attempt to decode the Exif profile; it simply returns a byte array -containing the profile to the calling application which must do its own -decoding. - -.SH XIII. Detecting libpng - -The png_get_io_ptr() function has been present since libpng-0.88, has never -changed, and is unaffected by conditional compilation macros. It is the -best choice for use in configure scripts for detecting the presence of any -libpng version since 0.88. In an autoconf "configure.in" you could use - - AC_CHECK_LIB(png, png_get_io_ptr, ... - -.SH XV. Source code repository - -Since about February 2009, version 1.2.34, libpng has been under "git" source -control. The git repository was built from old libpng-x.y.z.tar.gz files -going back to version 0.70. You can access the git repository (read only) -at - - https://github.com/glennrp/libpng or - https://git.code.sf.net/p/libpng/code.git - -or you can browse it with a web browser at - - https://github.com/glennrp/libpng or - https://sourceforge.net/p/libpng/code/ci/libpng16/tree/ - -Patches can be sent to png-mng-implement at lists.sourceforge.net or -uploaded to the libpng bug tracker at - - https://libpng.sourceforge.io/ - -or as a "pull request" to - - https://github.com/glennrp/libpng/pulls - -We also accept patches built from the tar or zip distributions, and -simple verbal descriptions of bug fixes, reported either to the -SourceForge bug tracker, to the png-mng-implement at lists.sf.net -mailing list, as github issues. - -.SH XV. Coding style - -Our coding style is similar to the "Allman" style -(See https://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly -braces on separate lines: - - if (condition) - { - action; - } - - else if (another condition) - { - another action; - } - -The braces can be omitted from simple one-line actions: - - if (condition) - return 0; - -We use 3-space indentation, except for continued statements which -are usually indented the same as the first line of the statement -plus four more spaces. - -For macro definitions we use 2-space indentation, always leaving the "#" -in the first column. - - #ifndef PNG_NO_FEATURE - # ifndef PNG_FEATURE_SUPPORTED - # define PNG_FEATURE_SUPPORTED - # endif - #endif - -Comments appear with the leading "/*" at the same indentation as -the statement that follows the comment: - - /* Single-line comment */ - statement; - - /* This is a multiple-line - * comment. - */ - statement; - -Very short comments can be placed after the end of the statement -to which they pertain: - - statement; /* comment */ - -We don't use C++ style ("//") comments. We have, however, -used them in the past in some now-abandoned MMX assembler -code. - -Functions and their curly braces are not indented, and -exported functions are marked with PNGAPI: - - /* This is a public function that is visible to - * application programmers. It does thus-and-so. - */ - void PNGAPI - png_exported_function(png_ptr, png_info, foo) - { - body; - } - -The return type and decorations are placed on a separate line -ahead of the function name, as illustrated above. - -The prototypes for all exported functions appear in png.h, -above the comment that says - - /* Maintainer: Put new public prototypes here ... */ - -We mark all non-exported functions with "/* PRIVATE */"": - - void /* PRIVATE */ - png_non_exported_function(png_ptr, png_info, foo) - { - body; - } - -The prototypes for non-exported functions (except for those in -pngtest) appear in pngpriv.h above the comment that says - - /* Maintainer: Put new private prototypes here ^ */ - -To avoid polluting the global namespace, the names of all exported -functions and variables begin with "png_", and all publicly visible C -preprocessor macros begin with "PNG". We request that applications that -use libpng *not* begin any of their own symbols with either of these strings. - -We put a space after the "sizeof" operator and we omit the -optional parentheses around its argument when the argument -is an expression, not a type name, and we always enclose the -sizeof operator, with its argument, in parentheses: - - (sizeof (png_uint_32)) - (sizeof array) - -Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as -though it were a function. - -Control keywords if, for, while, and switch are always followed by a space -to distinguish them from function calls, which have no trailing space. - -We put a space after each comma and after each semicolon -in "for" statements, and we put spaces before and after each -C binary operator and after "for" or "while", and before -"?". We don't put a space between a typecast and the expression -being cast, nor do we put one between a function name and the -left parenthesis that follows it: - - for (i = 2; i > 0; \-\-i) - y[i] = a(x) + (int)b; - -We prefer #ifdef and #ifndef to #if defined() and #if !defined() -when there is only one macro being tested. We always use parentheses -with "defined". - -We express integer constants that are used as bit masks in hex format, -with an even number of lower-case hex digits, and to make them unsigned -(e.g., 0x00U, 0xffU, 0x0100U) and long if they are greater than 0x7fff -(e.g., 0xffffUL). - -We prefer to use underscores rather than camelCase in names, except -for a few type names that we inherit from zlib.h. - -We prefer "if (something != 0)" and "if (something == 0)" over -"if (something)" and if "(!something)", respectively, and for pointers -we prefer "if (some_pointer != NULL)" or "if (some_pointer == NULL)". - -We do not use the TAB character for indentation in the C sources. - -Lines do not exceed 80 characters. - -Other rules can be inferred by inspecting the libpng source. - -.SH XVI. Y2K Compliance in libpng - -Since the PNG Development group is an ad-hoc body, we can't make -an official declaration. - -This is your unofficial assurance that libpng from version 0.71 and -upward through 1.6.35 are Y2K compliant. It is my belief that earlier -versions were also Y2K compliant. - -Libpng only has two year fields. One is a 2-byte unsigned integer -that will hold years up to 65535. The other, which is deprecated, -holds the date in text format, and will hold years up to 9999. - -The integer is - "png_uint_16 year" in png_time_struct. - -The string is - "char time_buffer[29]" in png_struct. This is no longer used -in libpng-1.6.x and will be removed from libpng-1.7.0. - -There are seven time-related functions: - - png_convert_to_rfc_1123_buffer() in png.c - (formerly png_convert_to_rfc_1152() in error, and - also formerly png_convert_to_rfc_1123()) - png_convert_from_struct_tm() in pngwrite.c, called - in pngwrite.c - png_convert_from_time_t() in pngwrite.c - png_get_tIME() in pngget.c - png_handle_tIME() in pngrutil.c, called in pngread.c - png_set_tIME() in pngset.c - png_write_tIME() in pngwutil.c, called in pngwrite.c - -All appear to handle dates properly in a Y2K environment. The -png_convert_from_time_t() function calls gmtime() to convert from system -clock time, which returns (year - 1900), which we properly convert to -the full 4-digit year. There is a possibility that applications using -libpng are not passing 4-digit years into the png_convert_to_rfc_1123() -function, or that they are incorrectly passing only a 2-digit year -instead of "year - 1900" into the png_convert_from_struct_tm() function, -but this is not under our control. The libpng documentation has always -stated that it works with 4-digit years, and the APIs have been -documented as such. - -The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned -integer to hold the year, and can hold years as large as 65535. - -zlib, upon which libpng depends, is also Y2K compliant. It contains -no date-related code. - - - Glenn Randers-Pehrson - libpng maintainer - PNG Development Group - -.SH NOTE - -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.19 10 10019 10.so.0.19[.0] - ... - 1.2.59 13 10259 12.so.0.59[.0] - ... - 1.5.30 15 10530 15.so.15.30[.0] - ... - 1.6.35 16 10635 16.so.16.35[.0] - -Henceforth the source version will match the shared-library minor -and patch numbers; the shared-library major version number will be -used for changes in backward compatibility, as it is intended. The -PNG_PNGLIB_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". - -.SH "SEE ALSO" -.IR libpngpf(3) ", " png(5) -.LP -.IR libpng : -.IP -https://libpng.sourceforge.io/ (follow the [DOWNLOAD] link) -http://www.libpng.org/pub/png - -.LP -.IR zlib : -.IP -(generally) at the same location as -.I libpng -or at -.br -https://zlib.net/ - -.LP -.IR PNG specification: RFC 2083 -.IP -(generally) at the same location as -.I libpng -or at -.br -https://www.ietf.org/rfc/rfc2083.txt -.br -or (as a W3C Recommendation) at -.br -https://www.w3.org/TR/REC-png.html - -.LP -In the case of any inconsistency between the PNG specification -and this library, the specification takes precedence. - -.SH AUTHORS -This man page: Glenn Randers-Pehrson - - -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. - -Libpng version 1.6.35 - July 15, 2018: -Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. -Maintained by Glenn Randers-Pehrson. - -Supported by the PNG development group -.br -png-mng-implement at lists.sf.net -(subscription required; visit -png-mng-implement at lists.sourceforge.net (subscription required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement -to subscribe). - -.SH NOTICES: - -This copy of the libpng notices is provided for your convenience. In case of -any discrepancy between this copy and the notices in the file png.h that is -included in the libpng distribution, the latter shall prevail. - -COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - -If you modify libpng you may insert additional notices immediately following -this sentence. - -This code is released under the libpng license. - -libpng versions 1.0.7, July 1, 2000 through 1.6.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 owner -as a trademark in any jurisdiction. However, because libpng has -been distributed and maintained world-wide, continually since 1995, -the Copyright owner claims "common-law trademark protection" in any -jurisdiction where common-law trademark is recognized. - -OSI CERTIFICATION: - -Libpng is OSI Certified Open Source Software. OSI Certified Open Source is -a certification mark of the Open Source Initiative. OSI has not addressed -the additional disclaimers inserted at version 1.0.7. - -EXPORT CONTROL: - -The Copyright owner believes that the Export Control Classification -Number (ECCN) for libpng is EAR99, which means not subject to export -controls or International Traffic in Arms Regulations (ITAR) because -it is open source, publicly available software, that does not contain -any encryption software. See the EAR, paragraphs 734.3(b)(3) and -734.7(b). - -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). - -Glenn Randers-Pehrson -July 15, 2018 - -.\" end of man page diff --git a/Dependencies/FreeImage/Source/LibPNG/libpngpf.3 b/Dependencies/FreeImage/Source/LibPNG/libpngpf.3 deleted file mode 100644 index 919b37d..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/libpngpf.3 +++ /dev/null @@ -1,22 +0,0 @@ -.TH LIBPNGPF 3 "July 15, 2018" -.SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.35 -(private functions) -.SH SYNOPSIS -\fB#include \fI"pngpriv.h" - -\fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer -\fP\fImaintained\fP\fB, now that the private function prototypes are hidden in -\fP\fIpngpriv.h\fP\fB and not accessible to applications. Look in -\fP\fIpngpriv.h\fP\fB for the prototypes and a short description of each -function. - -.SH DESCRIPTION -The functions previously listed here are used privately by libpng and are not -available for use by applications. They are not "exported" to applications -using shared libraries. - -.SH SEE ALSO -.BR "png"(5), " libpng"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) -.SH AUTHOR -Glenn Randers-Pehrson diff --git a/Dependencies/FreeImage/Source/LibPNG/png.5 b/Dependencies/FreeImage/Source/LibPNG/png.5 deleted file mode 100644 index fea3610..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/png.5 +++ /dev/null @@ -1,74 +0,0 @@ -.TH PNG 5 "April 1, 2017" -.SH NAME -png \- Portable Network Graphics (PNG) format -.SH DESCRIPTION -PNG (Portable Network Graphics) is an extensible file format for the -lossless, portable, well-compressed storage of raster images. PNG provides -a patent-free replacement for GIF and can also replace many -common uses of TIFF. Indexed-color, grayscale, and truecolor images are -supported, plus an optional alpha channel. Sample depths range from -1 to 16 bits. -.br - -PNG is designed to work well in online viewing applications, such as the -World Wide Web, so it is fully streamable with a progressive display -option. PNG is robust, providing both full file integrity checking and -fast, simple detection of common transmission errors. Also, PNG can store -gamma and chromaticity data for improved color matching on heterogeneous -platforms. - -.SH "SEE ALSO" -.BR "libpng"(3), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) -.LP -PNG specification (second edition), November 2003: -.IP -.br - 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) -{ - 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 ((int)(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)); - - /* Added at libpng-1.2.6 */ -# 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 - /* Added at libpng-1.2.43 and 1.4.0 */ - create_struct.user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX; -# endif - -# ifdef PNG_USER_CHUNK_MALLOC_MAX - /* Added at libpng-1.2.43 and 1.4.1, required only for read but exists - * in png_struct regardless. - */ - create_struct.user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_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)); -} - -/* The following API is not called internally */ -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) - { -# ifdef PNG_READ_eXIf_SUPPORTED - if (info_ptr->eXIf_buf) - { - png_free(png_ptr, info_ptr->eXIf_buf); - info_ptr->eXIf_buf = NULL; - } -# endif - 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, png_FILE_p 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 - * correspnding 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 PNG_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]; /* 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 -# ifdef __STDC__ - return PNG_STRING_NEWLINE \ - "libpng version 1.6.35 - July 15, 2018" 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; -# else - return "libpng version 1.6.35 - July 15, 2018\ - 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."; -# endif -#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; - } -} - -/* png_convert_size: a PNGAPI but no longer in png.h, so deleted - * at libpng 1.5.5! - */ - -/* Added at libpng version 1.2.34 and 1.4.0 (moved from pngset.c) */ -#ifdef PNG_GAMMA_SUPPORTED /* always set if COLORSPACE */ -static int -png_colorspace_check_gamma(png_const_structrp png_ptr, - png_colorspacerp colorspace, png_fixed_point gAMA, int from) - /* This is called to check a new gamma value against an existing one. The - * routine returns false if the new gamma value should not be written. - * - * 'from' says where the new gamma value comes from: - * - * 0: the new gamma value is the libpng estimate for an ICC profile - * 1: the new gamma value comes from a gAMA chunk - * 2: the new gamma value comes from an sRGB chunk - */ -{ - png_fixed_point gtest; - - if ((colorspace->flags & PNG_COLORSPACE_HAVE_GAMMA) != 0 && - (png_muldiv(>est, colorspace->gamma, PNG_FP_1, gAMA) == 0 || - png_gamma_significant(gtest) != 0)) - { - /* Either this is an sRGB image, in which case the calculated gamma - * approximation should match, or this is an image with a profile and the - * value libpng calculates for the gamma of the profile does not match the - * value recorded in the file. The former, sRGB, case is an error, the - * latter is just a warning. - */ - if ((colorspace->flags & PNG_COLORSPACE_FROM_sRGB) != 0 || from == 2) - { - png_chunk_report(png_ptr, "gamma value does not match sRGB", - PNG_CHUNK_ERROR); - /* Do not overwrite an sRGB value */ - return from == 2; - } - - else /* sRGB tag not involved */ - { - png_chunk_report(png_ptr, "gamma value does not match libpng estimate", - PNG_CHUNK_WARNING); - return from == 1; - } - } - - return 1; -} - -void /* PRIVATE */ -png_colorspace_set_gamma(png_const_structrp png_ptr, - png_colorspacerp colorspace, png_fixed_point gAMA) -{ - /* Changed in libpng-1.5.4 to limit the values to ensure overflow can't - * occur. Since the fixed point representation is asymetrical it is - * possible for 1/gamma to overflow the limit of 21474 and this means the - * gamma value must be at least 5/100000 and hence at most 20000.0. For - * safety the limits here are a little narrower. The values are 0.00016 to - * 6250.0, which are truly ridiculous gamma values (and will produce - * displays that are all black or all white.) - * - * In 1.6.0 this test replaces the ones in pngrutil.c, in the gAMA chunk - * handling code, which only required the value to be >0. - */ - png_const_charp errmsg; - - if (gAMA < 16 || gAMA > 625000000) - errmsg = "gamma value out of range"; - -# ifdef PNG_READ_gAMA_SUPPORTED - /* Allow the application to set the gamma value more than once */ - else if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 && - (colorspace->flags & PNG_COLORSPACE_FROM_gAMA) != 0) - errmsg = "duplicate"; -# endif - - /* Do nothing if the colorspace is already invalid */ - else if ((colorspace->flags & PNG_COLORSPACE_INVALID) != 0) - return; - - else - { - if (png_colorspace_check_gamma(png_ptr, colorspace, gAMA, - 1/*from gAMA*/) != 0) - { - /* Store this gamma value. */ - colorspace->gamma = gAMA; - colorspace->flags |= - (PNG_COLORSPACE_HAVE_GAMMA | PNG_COLORSPACE_FROM_gAMA); - } - - /* At present if the check_gamma test fails the gamma of the colorspace is - * not updated however the colorspace is not invalidated. This - * corresponds to the case where the existing gamma comes from an sRGB - * chunk or profile. An error message has already been output. - */ - return; - } - - /* Error exit - errmsg has been set. */ - colorspace->flags |= PNG_COLORSPACE_INVALID; - png_chunk_report(png_ptr, errmsg, PNG_CHUNK_WRITE_ERROR); -} - -void /* PRIVATE */ -png_colorspace_sync_info(png_const_structrp png_ptr, png_inforp info_ptr) -{ - if ((info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) != 0) - { - /* Everything is invalid */ - info_ptr->valid &= ~(PNG_INFO_gAMA|PNG_INFO_cHRM|PNG_INFO_sRGB| - PNG_INFO_iCCP); - -# ifdef PNG_COLORSPACE_SUPPORTED - /* Clean up the iCCP profile now if it won't be used. */ - png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, -1/*not used*/); -# else - PNG_UNUSED(png_ptr) -# endif - } - - else - { -# ifdef PNG_COLORSPACE_SUPPORTED - /* Leave the INFO_iCCP flag set if the pngset.c code has already set - * it; this allows a PNG to contain a profile which matches sRGB and - * yet still have that profile retrievable by the application. - */ - if ((info_ptr->colorspace.flags & PNG_COLORSPACE_MATCHES_sRGB) != 0) - info_ptr->valid |= PNG_INFO_sRGB; - - else - info_ptr->valid &= ~PNG_INFO_sRGB; - - if ((info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0) - info_ptr->valid |= PNG_INFO_cHRM; - - else - info_ptr->valid &= ~PNG_INFO_cHRM; -# endif - - if ((info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) != 0) - info_ptr->valid |= PNG_INFO_gAMA; - - else - info_ptr->valid &= ~PNG_INFO_gAMA; - } -} - -#ifdef PNG_READ_SUPPORTED -void /* PRIVATE */ -png_colorspace_sync(png_const_structrp png_ptr, png_inforp info_ptr) -{ - if (info_ptr == NULL) /* reduce code size; check here not in the caller */ - return; - - info_ptr->colorspace = png_ptr->colorspace; - png_colorspace_sync_info(png_ptr, info_ptr); -} -#endif -#endif /* GAMMA */ - -#ifdef PNG_COLORSPACE_SUPPORTED -/* 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. - */ -static int -png_xy_from_XYZ(png_xy *xy, const png_XYZ *XYZ) -{ - png_int_32 d, dwhite, whiteX, whiteY; - - d = XYZ->red_X + XYZ->red_Y + XYZ->red_Z; - if (png_muldiv(&xy->redx, XYZ->red_X, PNG_FP_1, d) == 0) - return 1; - if (png_muldiv(&xy->redy, XYZ->red_Y, PNG_FP_1, d) == 0) - return 1; - dwhite = d; - whiteX = XYZ->red_X; - whiteY = XYZ->red_Y; - - d = XYZ->green_X + XYZ->green_Y + XYZ->green_Z; - if (png_muldiv(&xy->greenx, XYZ->green_X, PNG_FP_1, d) == 0) - return 1; - if (png_muldiv(&xy->greeny, XYZ->green_Y, PNG_FP_1, d) == 0) - return 1; - dwhite += d; - whiteX += XYZ->green_X; - whiteY += XYZ->green_Y; - - d = XYZ->blue_X + XYZ->blue_Y + XYZ->blue_Z; - if (png_muldiv(&xy->bluex, XYZ->blue_X, PNG_FP_1, d) == 0) - return 1; - if (png_muldiv(&xy->bluey, XYZ->blue_Y, PNG_FP_1, d) == 0) - return 1; - dwhite += d; - whiteX += XYZ->blue_X; - whiteY += XYZ->blue_Y; - - /* The reference white is simply the sum of the end-point (X,Y,Z) vectors, - * thus: - */ - 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; -} - -static int -png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy) -{ - 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. - */ - if (xy->redx < 0 || xy->redx > PNG_FP_1) return 1; - if (xy->redy < 0 || xy->redy > PNG_FP_1-xy->redx) return 1; - if (xy->greenx < 0 || xy->greenx > PNG_FP_1) return 1; - if (xy->greeny < 0 || xy->greeny > PNG_FP_1-xy->greenx) return 1; - if (xy->bluex < 0 || xy->bluex > PNG_FP_1) return 1; - if (xy->bluey < 0 || xy->bluey > PNG_FP_1-xy->bluex) return 1; - if (xy->whitex < 0 || xy->whitex > PNG_FP_1) return 1; - if (xy->whitey < 5 || xy->whitey > PNG_FP_1-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. The values are 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. - * - * 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 - * it is sufficient to divide the product by 7; ceil(100,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 - */ - /* By the argument, above overflow should be impossible here. The return - * value of 2 indicates an internal error to the caller. - */ - if (png_muldiv(&left, xy->greenx-xy->bluex, xy->redy - xy->bluey, 7) == 0) - return 2; - if (png_muldiv(&right, xy->greeny-xy->bluey, xy->redx - xy->bluex, 7) == 0) - return 2; - denominator = left - right; - - /* Now find the red numerator. */ - if (png_muldiv(&left, xy->greenx-xy->bluex, xy->whitey-xy->bluey, 7) == 0) - return 2; - if (png_muldiv(&right, xy->greeny-xy->bluey, xy->whitex-xy->bluex, 7) == 0) - return 2; - - /* 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, left-right) == 0 || - 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, 7) == 0) - return 2; - if (png_muldiv(&right, xy->redx-xy->bluex, xy->whitey-xy->bluey, 7) == 0) - return 2; - if (png_muldiv(&green_inverse, xy->whitey, denominator, left-right) == 0 || - 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_reciprocal(xy->whitey) - png_reciprocal(red_inverse) - - png_reciprocal(green_inverse); - if (blue_scale <= 0) - return 1; - - - /* And fill in the png_XYZ: */ - 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*/ -} - -static int -png_XYZ_normalize(png_XYZ *XYZ) -{ - png_int_32 Y; - - if (XYZ->red_Y < 0 || XYZ->green_Y < 0 || XYZ->blue_Y < 0 || - XYZ->red_X < 0 || XYZ->green_X < 0 || XYZ->blue_X < 0 || - XYZ->red_Z < 0 || XYZ->green_Z < 0 || XYZ->blue_Z < 0) - return 1; - - /* Normalize by scaling so the sum of the end-point Y values is PNG_FP_1. - * IMPLEMENTATION NOTE: ANSI requires signed overflow not to occur, therefore - * relying on addition of two positive values producing a negative one is not - * safe. - */ - Y = XYZ->red_Y; - if (0x7fffffff - Y < XYZ->green_X) - return 1; - Y += XYZ->green_Y; - if (0x7fffffff - Y < XYZ->blue_X) - return 1; - Y += XYZ->blue_Y; - - if (Y != PNG_FP_1) - { - if (png_muldiv(&XYZ->red_X, XYZ->red_X, PNG_FP_1, Y) == 0) - return 1; - if (png_muldiv(&XYZ->red_Y, XYZ->red_Y, PNG_FP_1, Y) == 0) - return 1; - if (png_muldiv(&XYZ->red_Z, XYZ->red_Z, PNG_FP_1, Y) == 0) - return 1; - - if (png_muldiv(&XYZ->green_X, XYZ->green_X, PNG_FP_1, Y) == 0) - return 1; - if (png_muldiv(&XYZ->green_Y, XYZ->green_Y, PNG_FP_1, Y) == 0) - return 1; - if (png_muldiv(&XYZ->green_Z, XYZ->green_Z, PNG_FP_1, Y) == 0) - return 1; - - if (png_muldiv(&XYZ->blue_X, XYZ->blue_X, PNG_FP_1, Y) == 0) - return 1; - if (png_muldiv(&XYZ->blue_Y, XYZ->blue_Y, PNG_FP_1, Y) == 0) - return 1; - if (png_muldiv(&XYZ->blue_Z, XYZ->blue_Z, PNG_FP_1, Y) == 0) - return 1; - } - - return 0; -} - -static int -png_colorspace_endpoints_match(const png_xy *xy1, const png_xy *xy2, int delta) -{ - /* Allow an error of +/-0.01 (absolute value) on each chromaticity */ - if (PNG_OUT_OF_RANGE(xy1->whitex, xy2->whitex,delta) || - PNG_OUT_OF_RANGE(xy1->whitey, xy2->whitey,delta) || - PNG_OUT_OF_RANGE(xy1->redx, xy2->redx, delta) || - PNG_OUT_OF_RANGE(xy1->redy, xy2->redy, delta) || - PNG_OUT_OF_RANGE(xy1->greenx, xy2->greenx,delta) || - PNG_OUT_OF_RANGE(xy1->greeny, xy2->greeny,delta) || - PNG_OUT_OF_RANGE(xy1->bluex, xy2->bluex, delta) || - PNG_OUT_OF_RANGE(xy1->bluey, xy2->bluey, delta)) - return 0; - return 1; -} - -/* Added in libpng-1.6.0, a different check for the validity of a set of cHRM - * chunk chromaticities. Earlier checks used to simply look for the overflow - * condition (where the determinant of the matrix to solve for XYZ ends up zero - * because the chromaticity values are not all distinct.) Despite this it is - * theoretically possible to produce chromaticities that are apparently valid - * but that rapidly degrade to invalid, potentially crashing, sets because of - * arithmetic inaccuracies when calculations are performed on them. The new - * check is to round-trip xy -> XYZ -> xy and then check that the result is - * within a small percentage of the original. - */ -static int -png_colorspace_check_xy(png_XYZ *XYZ, const png_xy *xy) -{ - int result; - png_xy xy_test; - - /* As a side-effect this routine also returns the XYZ endpoints. */ - result = png_XYZ_from_xy(XYZ, xy); - if (result != 0) - return result; - - result = png_xy_from_XYZ(&xy_test, XYZ); - if (result != 0) - return result; - - if (png_colorspace_endpoints_match(xy, &xy_test, - 5/*actually, the math is pretty accurate*/) != 0) - return 0; - - /* Too much slip */ - return 1; -} - -/* This is the check going the other way. The XYZ is modified to normalize it - * (another side-effect) and the xy chromaticities are returned. - */ -static int -png_colorspace_check_XYZ(png_xy *xy, png_XYZ *XYZ) -{ - int result; - png_XYZ XYZtemp; - - result = png_XYZ_normalize(XYZ); - if (result != 0) - return result; - - result = png_xy_from_XYZ(xy, XYZ); - if (result != 0) - return result; - - XYZtemp = *XYZ; - return png_colorspace_check_xy(&XYZtemp, xy); -} - -/* Used to check for an endpoint match against sRGB */ -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 -}; - -static int -png_colorspace_set_xy_and_XYZ(png_const_structrp png_ptr, - png_colorspacerp colorspace, const png_xy *xy, const png_XYZ *XYZ, - int preferred) -{ - if ((colorspace->flags & PNG_COLORSPACE_INVALID) != 0) - return 0; - - /* The consistency check is performed on the chromaticities; this factors out - * variations because of the normalization (or not) of the end point Y - * values. - */ - if (preferred < 2 && - (colorspace->flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0) - { - /* The end points must be reasonably close to any we already have. The - * following allows an error of up to +/-.001 - */ - if (png_colorspace_endpoints_match(xy, &colorspace->end_points_xy, - 100) == 0) - { - colorspace->flags |= PNG_COLORSPACE_INVALID; - png_benign_error(png_ptr, "inconsistent chromaticities"); - return 0; /* failed */ - } - - /* Only overwrite with preferred values */ - if (preferred == 0) - return 1; /* ok, but no change */ - } - - colorspace->end_points_xy = *xy; - colorspace->end_points_XYZ = *XYZ; - colorspace->flags |= PNG_COLORSPACE_HAVE_ENDPOINTS; - - /* The end points are normally quoted to two decimal digits, so allow +/-0.01 - * on this test. - */ - if (png_colorspace_endpoints_match(xy, &sRGB_xy, 1000) != 0) - colorspace->flags |= PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB; - - else - colorspace->flags &= PNG_COLORSPACE_CANCEL( - PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB); - - return 2; /* ok and changed */ -} - -int /* PRIVATE */ -png_colorspace_set_chromaticities(png_const_structrp png_ptr, - png_colorspacerp colorspace, const png_xy *xy, int preferred) -{ - /* We must check the end points to ensure they are reasonable - in the past - * color management systems have crashed as a result of getting bogus - * colorant values, while this isn't the fault of libpng it is the - * responsibility of libpng because PNG carries the bomb and libpng is in a - * position to protect against it. - */ - png_XYZ XYZ; - - switch (png_colorspace_check_xy(&XYZ, xy)) - { - case 0: /* success */ - return png_colorspace_set_xy_and_XYZ(png_ptr, colorspace, xy, &XYZ, - preferred); - - case 1: - /* We can't invert the chromaticities so we can't produce value XYZ - * values. Likely as not a color management system will fail too. - */ - colorspace->flags |= PNG_COLORSPACE_INVALID; - png_benign_error(png_ptr, "invalid chromaticities"); - break; - - default: - /* libpng is broken; this should be a warning but if it happens we - * want error reports so for the moment it is an error. - */ - colorspace->flags |= PNG_COLORSPACE_INVALID; - png_error(png_ptr, "internal error checking chromaticities"); - } - - return 0; /* failed */ -} - -int /* PRIVATE */ -png_colorspace_set_endpoints(png_const_structrp png_ptr, - png_colorspacerp colorspace, const png_XYZ *XYZ_in, int preferred) -{ - png_XYZ XYZ = *XYZ_in; - png_xy xy; - - switch (png_colorspace_check_XYZ(&xy, &XYZ)) - { - case 0: - return png_colorspace_set_xy_and_XYZ(png_ptr, colorspace, &xy, &XYZ, - preferred); - - case 1: - /* End points are invalid. */ - colorspace->flags |= PNG_COLORSPACE_INVALID; - png_benign_error(png_ptr, "invalid end points"); - break; - - default: - colorspace->flags |= PNG_COLORSPACE_INVALID; - png_error(png_ptr, "internal error checking chromaticities"); - } - - return 0; /* failed */ -} - -#if defined(PNG_sRGB_SUPPORTED) || defined(PNG_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_colorspacerp colorspace, - png_const_charp name, png_alloc_size_t value, png_const_charp reason) -{ - size_t pos; - char message[196]; /* see below for calculation */ - - if (colorspace != NULL) - colorspace->flags |= PNG_COLORSPACE_INVALID; - - 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) - - /* This is recoverable, but make it unconditionally an app_error on write to - * avoid writing invalid ICC profiles into PNG files (i.e., we handle them - * on read, with a warning, but on write unless the app turns off - * application errors the PNG won't be written.) - */ - png_chunk_report(png_ptr, message, - (colorspace != NULL) ? PNG_CHUNK_ERROR : PNG_CHUNK_WRITE_ERROR); - - return 0; -} -#endif /* sRGB || iCCP */ - -#ifdef PNG_sRGB_SUPPORTED -int /* PRIVATE */ -png_colorspace_set_sRGB(png_const_structrp png_ptr, png_colorspacerp colorspace, - int intent) -{ - /* sRGB sets known gamma, end points and (from the chunk) intent. */ - /* IMPORTANT: these are not necessarily the values found in an ICC profile - * because ICC profiles store values adapted to a D50 environment; it is - * expected that the ICC profile mediaWhitePointTag will be D50; see the - * checks and code elsewhere to understand this better. - * - * These XYZ values, which are accurate to 5dp, produce rgb to gray - * coefficients of (6968,23435,2366), which are reduced (because they add up - * to 32769 not 32768) to (6968,23434,2366). These are the values that - * libpng has traditionally used (and are the best values given the 15bit - * algorithm used by the rgb to gray code.) - */ - static const png_XYZ sRGB_XYZ = /* D65 XYZ (*not* the D50 adapted values!) */ - { - /* color X Y Z */ - /* red */ 41239, 21264, 1933, - /* green */ 35758, 71517, 11919, - /* blue */ 18048, 7219, 95053 - }; - - /* Do nothing if the colorspace is already invalidated. */ - if ((colorspace->flags & PNG_COLORSPACE_INVALID) != 0) - return 0; - - /* Check the intent, then check for existing settings. It is valid for the - * PNG file to have cHRM or gAMA chunks along with sRGB, but the values must - * be consistent with the correct values. If, however, this function is - * called below because an iCCP chunk matches sRGB then it is quite - * conceivable that an older app recorded incorrect gAMA and cHRM because of - * an incorrect calculation based on the values in the profile - this does - * *not* invalidate the profile (though it still produces an error, which can - * be ignored.) - */ - if (intent < 0 || intent >= PNG_sRGB_INTENT_LAST) - return png_icc_profile_error(png_ptr, colorspace, "sRGB", - (png_alloc_size_t)intent, "invalid sRGB rendering intent"); - - if ((colorspace->flags & PNG_COLORSPACE_HAVE_INTENT) != 0 && - colorspace->rendering_intent != intent) - return png_icc_profile_error(png_ptr, colorspace, "sRGB", - (png_alloc_size_t)intent, "inconsistent rendering intents"); - - if ((colorspace->flags & PNG_COLORSPACE_FROM_sRGB) != 0) - { - png_benign_error(png_ptr, "duplicate sRGB information ignored"); - return 0; - } - - /* If the standard sRGB cHRM chunk does not match the one from the PNG file - * warn but overwrite the value with the correct one. - */ - if ((colorspace->flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0 && - !png_colorspace_endpoints_match(&sRGB_xy, &colorspace->end_points_xy, - 100)) - png_chunk_report(png_ptr, "cHRM chunk does not match sRGB", - PNG_CHUNK_ERROR); - - /* This check is just done for the error reporting - the routine always - * returns true when the 'from' argument corresponds to sRGB (2). - */ - (void)png_colorspace_check_gamma(png_ptr, colorspace, PNG_GAMMA_sRGB_INVERSE, - 2/*from sRGB*/); - - /* intent: bugs in GCC force 'int' to be used as the parameter type. */ - colorspace->rendering_intent = (png_uint_16)intent; - colorspace->flags |= PNG_COLORSPACE_HAVE_INTENT; - - /* endpoints */ - colorspace->end_points_xy = sRGB_xy; - colorspace->end_points_XYZ = sRGB_XYZ; - colorspace->flags |= - (PNG_COLORSPACE_HAVE_ENDPOINTS|PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB); - - /* gamma */ - colorspace->gamma = PNG_GAMMA_sRGB_INVERSE; - colorspace->flags |= PNG_COLORSPACE_HAVE_GAMMA; - - /* Finally record that we have an sRGB profile */ - colorspace->flags |= - (PNG_COLORSPACE_MATCHES_sRGB|PNG_COLORSPACE_FROM_sRGB); - - return 1; /* set */ -} -#endif /* sRGB */ - -#ifdef PNG_iCCP_SUPPORTED -/* 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_colorspacerp colorspace, - png_const_charp name, png_uint_32 profile_length) -{ - if (profile_length < 132) - return png_icc_profile_error(png_ptr, colorspace, name, profile_length, - "too short"); - return 1; -} - -#ifdef PNG_READ_iCCP_SUPPORTED -int /* PRIVATE */ -png_icc_check_length(png_const_structrp png_ptr, png_colorspacerp colorspace, - png_const_charp name, png_uint_32 profile_length) -{ - if (!icc_check_length(png_ptr, colorspace, 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). - */ -# ifdef PNG_SET_USER_LIMITS_SUPPORTED - else if (png_ptr->user_chunk_malloc_max > 0 && - png_ptr->user_chunk_malloc_max < profile_length) - return png_icc_profile_error(png_ptr, colorspace, name, profile_length, - "exceeds application limits"); -# elif PNG_USER_CHUNK_MALLOC_MAX > 0 - else if (PNG_USER_CHUNK_MALLOC_MAX < profile_length) - return png_icc_profile_error(png_ptr, colorspace, name, profile_length, - "exceeds libpng limits"); -# else /* !SET_USER_LIMITS */ - /* This will get compiled out on all 32-bit and better systems. */ - else if (PNG_SIZE_MAX < profile_length) - return png_icc_profile_error(png_ptr, colorspace, name, profile_length, - "exceeds system limits"); -# endif /* !SET_USER_LIMITS */ - - return 1; -} -#endif /* READ_iCCP */ - -int /* PRIVATE */ -png_icc_check_header(png_const_structrp png_ptr, png_colorspacerp colorspace, - 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, colorspace, 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, colorspace, 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, colorspace, 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, colorspace, 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, NULL, 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, colorspace, 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, NULL, 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, colorspace, 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, colorspace, name, temp, - "Gray color space not permitted on RGB PNG"); - break; - - default: - return png_icc_profile_error(png_ptr, colorspace, 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, colorspace, 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, colorspace, 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, NULL, 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, NULL, 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, colorspace, name, temp, - "unexpected ICC PCS encoding"); - } - - return 1; -} - -int /* PRIVATE */ -png_icc_check_tag_table(png_const_structrp png_ptr, png_colorspacerp colorspace, - 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, colorspace, 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, NULL, name, tag_id, - "ICC profile tag start not a multiple of 4"); - } - } - - return 1; /* success, maybe with warnings */ -} - -#ifdef PNG_sRGB_SUPPORTED -#if PNG_sRGB_PROFILE_CHECKS >= 0 -/* Information about the known ICC sRGB profiles */ -static const struct -{ - png_uint_32 adler, crc, length; - png_uint_32 md5[4]; - png_byte have_md5; - png_byte is_broken; - png_uint_16 intent; - -# define PNG_MD5(a,b,c,d) { a, b, c, d }, (a!=0)||(b!=0)||(c!=0)||(d!=0) -# define PNG_ICC_CHECKSUM(adler, crc, md5, intent, broke, date, length, fname)\ - { adler, crc, length, md5, broke, intent }, - -} png_sRGB_checks[] = -{ - /* This data comes from contrib/tools/checksum-icc run on downloads of - * all four ICC sRGB profiles from www.color.org. - */ - /* adler32, crc32, MD5[4], intent, date, length, file-name */ - PNG_ICC_CHECKSUM(0x0a3fd9f6, 0x3b8772b9, - PNG_MD5(0x29f83dde, 0xaff255ae, 0x7842fae4, 0xca83390d), 0, 0, - "2009/03/27 21:36:31", 3048, "sRGB_IEC61966-2-1_black_scaled.icc") - - /* ICC sRGB v2 perceptual no black-compensation: */ - PNG_ICC_CHECKSUM(0x4909e5e1, 0x427ebb21, - PNG_MD5(0xc95bd637, 0xe95d8a3b, 0x0df38f99, 0xc1320389), 1, 0, - "2009/03/27 21:37:45", 3052, "sRGB_IEC61966-2-1_no_black_scaling.icc") - - PNG_ICC_CHECKSUM(0xfd2144a1, 0x306fd8ae, - PNG_MD5(0xfc663378, 0x37e2886b, 0xfd72e983, 0x8228f1b8), 0, 0, - "2009/08/10 17:28:01", 60988, "sRGB_v4_ICC_preference_displayclass.icc") - - /* ICC sRGB v4 perceptual */ - PNG_ICC_CHECKSUM(0x209c35d2, 0xbbef7812, - PNG_MD5(0x34562abf, 0x994ccd06, 0x6d2c5721, 0xd0d68c5d), 0, 0, - "2007/07/25 00:05:37", 60960, "sRGB_v4_ICC_preference.icc") - - /* The following profiles have no known MD5 checksum. If there is a match - * on the (empty) MD5 the other fields are used to attempt a match and - * a warning is produced. The first two of these profiles have a 'cprt' tag - * which suggests that they were also made by Hewlett Packard. - */ - PNG_ICC_CHECKSUM(0xa054d762, 0x5d5129ce, - PNG_MD5(0x00000000, 0x00000000, 0x00000000, 0x00000000), 1, 0, - "2004/07/21 18:57:42", 3024, "sRGB_IEC61966-2-1_noBPC.icc") - - /* This is a 'mntr' (display) profile with a mediaWhitePointTag that does not - * match the D50 PCS illuminant in the header (it is in fact the D65 values, - * so the white point is recorded as the un-adapted value.) The profiles - * below only differ in one byte - the intent - and are basically the same as - * the previous profile except for the mediaWhitePointTag error and a missing - * chromaticAdaptationTag. - */ - PNG_ICC_CHECKSUM(0xf784f3fb, 0x182ea552, - PNG_MD5(0x00000000, 0x00000000, 0x00000000, 0x00000000), 0, 1/*broken*/, - "1998/02/09 06:49:00", 3144, "HP-Microsoft sRGB v2 perceptual") - - PNG_ICC_CHECKSUM(0x0398f3fc, 0xf29e526d, - PNG_MD5(0x00000000, 0x00000000, 0x00000000, 0x00000000), 1, 1/*broken*/, - "1998/02/09 06:49:00", 3144, "HP-Microsoft sRGB v2 media-relative") -}; - -static int -png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr, - png_const_bytep profile, uLong adler) -{ - /* The quick check is to verify just the MD5 signature and trust the - * rest of the data. Because the profile has already been verified for - * correctness this is safe. png_colorspace_set_sRGB will check the 'intent' - * field too, so if the profile has been edited with an intent not defined - * by sRGB (but maybe defined by a later ICC specification) the read of - * the profile will fail at that point. - */ - - png_uint_32 length = 0; - png_uint_32 intent = 0x10000; /* invalid */ -#if PNG_sRGB_PROFILE_CHECKS > 1 - uLong crc = 0; /* the value for 0 length data */ -#endif - unsigned int i; - -#ifdef PNG_SET_OPTION_SUPPORTED - /* First see if PNG_SKIP_sRGB_CHECK_PROFILE has been set to "on" */ - if (((png_ptr->options >> PNG_SKIP_sRGB_CHECK_PROFILE) & 3) == - PNG_OPTION_ON) - return 0; -#endif - - for (i=0; i < (sizeof png_sRGB_checks) / (sizeof png_sRGB_checks[0]); ++i) - { - if (png_get_uint_32(profile+84) == png_sRGB_checks[i].md5[0] && - png_get_uint_32(profile+88) == png_sRGB_checks[i].md5[1] && - png_get_uint_32(profile+92) == png_sRGB_checks[i].md5[2] && - png_get_uint_32(profile+96) == png_sRGB_checks[i].md5[3]) - { - /* This may be one of the old HP profiles without an MD5, in that - * case we can only use the length and Adler32 (note that these - * are not used by default if there is an MD5!) - */ -# if PNG_sRGB_PROFILE_CHECKS == 0 - if (png_sRGB_checks[i].have_md5 != 0) - return 1+png_sRGB_checks[i].is_broken; -# endif - - /* Profile is unsigned or more checks have been configured in. */ - if (length == 0) - { - length = png_get_uint_32(profile); - intent = png_get_uint_32(profile+64); - } - - /* Length *and* intent must match */ - if (length == (png_uint_32) png_sRGB_checks[i].length && - intent == (png_uint_32) png_sRGB_checks[i].intent) - { - /* Now calculate the adler32 if not done already. */ - if (adler == 0) - { - adler = adler32(0, NULL, 0); - adler = adler32(adler, profile, length); - } - - if (adler == png_sRGB_checks[i].adler) - { - /* These basic checks suggest that the data has not been - * modified, but if the check level is more than 1 perform - * our own crc32 checksum on the data. - */ -# if PNG_sRGB_PROFILE_CHECKS > 1 - if (crc == 0) - { - crc = crc32(0, NULL, 0); - crc = crc32(crc, profile, length); - } - - /* So this check must pass for the 'return' below to happen. - */ - if (crc == png_sRGB_checks[i].crc) -# endif - { - if (png_sRGB_checks[i].is_broken != 0) - { - /* These profiles are known to have bad data that may cause - * problems if they are used, therefore attempt to - * discourage their use, skip the 'have_md5' warning below, - * which is made irrelevant by this error. - */ - png_chunk_report(png_ptr, "known incorrect sRGB profile", - PNG_CHUNK_ERROR); - } - - /* Warn that this being done; this isn't even an error since - * the profile is perfectly valid, but it would be nice if - * people used the up-to-date ones. - */ - else if (png_sRGB_checks[i].have_md5 == 0) - { - png_chunk_report(png_ptr, - "out-of-date sRGB profile with no signature", - PNG_CHUNK_WARNING); - } - - return 1+png_sRGB_checks[i].is_broken; - } - } - -# if PNG_sRGB_PROFILE_CHECKS > 0 - /* The signature matched, but the profile had been changed in some - * way. This probably indicates a data error or uninformed hacking. - * Fall through to "no match". - */ - png_chunk_report(png_ptr, - "Not recognizing known sRGB profile that has been edited", - PNG_CHUNK_WARNING); - break; -# endif - } - } - } - - return 0; /* no match */ -} - -void /* PRIVATE */ -png_icc_set_sRGB(png_const_structrp png_ptr, - png_colorspacerp colorspace, png_const_bytep profile, uLong adler) -{ - /* Is this profile one of the known ICC sRGB profiles? If it is, just set - * the sRGB information. - */ - if (png_compare_ICC_profile_with_sRGB(png_ptr, profile, adler) != 0) - (void)png_colorspace_set_sRGB(png_ptr, colorspace, - (int)/*already checked*/png_get_uint_32(profile+64)); -} -#endif /* PNG_sRGB_PROFILE_CHECKS >= 0 */ -#endif /* sRGB */ - -int /* PRIVATE */ -png_colorspace_set_ICC(png_const_structrp png_ptr, png_colorspacerp colorspace, - png_const_charp name, png_uint_32 profile_length, png_const_bytep profile, - int color_type) -{ - if ((colorspace->flags & PNG_COLORSPACE_INVALID) != 0) - return 0; - - if (icc_check_length(png_ptr, colorspace, name, profile_length) != 0 && - png_icc_check_header(png_ptr, colorspace, name, profile_length, profile, - color_type) != 0 && - png_icc_check_tag_table(png_ptr, colorspace, name, profile_length, - profile) != 0) - { -# if defined(PNG_sRGB_SUPPORTED) && PNG_sRGB_PROFILE_CHECKS >= 0 - /* If no sRGB support, don't try storing sRGB information */ - png_icc_set_sRGB(png_ptr, colorspace, profile, 0); -# endif - return 1; - } - - /* Failure case */ - return 0; -} -#endif /* iCCP */ - -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED -void /* PRIVATE */ -png_colorspace_set_rgb_coefficients(png_structrp png_ptr) -{ - /* Set the rgb_to_gray coefficients from the colorspace. */ - if (png_ptr->rgb_to_gray_coefficients_set == 0 && - (png_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0) - { - /* png_set_background has not been called, get the coefficients from the Y - * values of the colorspace colorants. - */ - png_fixed_point r = png_ptr->colorspace.end_points_XYZ.red_Y; - png_fixed_point g = png_ptr->colorspace.end_points_XYZ.green_Y; - png_fixed_point b = png_ptr->colorspace.end_points_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; - } - } - - /* This is a png_error at present even though it could be ignored - - * it should never happen, but it is important that if it does, the - * bug is fixed. - */ - else - png_error(png_ptr, "internal error handling cHRM->XYZ"); - } -} -#endif /* READ_RGB_TO_GRAY */ - -#endif /* COLORSPACE */ - -#ifdef __GNUC__ -/* This exists solely to work round a warning from GNU C. */ -static int /* PRIVATE */ -png_gt(size_t a, size_t b) -{ - return a > b; -} -#else -# define png_gt(a,b) ((a) > (b)) -#endif - -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; - } - - if (png_gt(((width + 7) & (~7U)), - ((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, - png_size_tp 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. - */ -#if GCC_STRICT_OVERFLOW -#pragma GCC diagnostic push -/* The problem arises below with exp_b10, which can never overflow because it - * comes, originally, from frexp and is therefore limited to a range which is - * typically +/-710 (log2(DBL_MAX)/log2(DBL_MIN)). - */ -#pragma GCC diagnostic warning "-Wstrict-overflow=2" -#endif /* GCC_STRICT_OVERFLOW */ -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"); -} -#if GCC_STRICT_OVERFLOW -#pragma GCC diagnostic pop -#endif /* GCC_STRICT_OVERFLOW */ - -# 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]; - - 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_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. - */ -#if GCC_STRICT_OVERFLOW /* from above */ -/* It is not obvious which comparison below gets optimized in such a way that - * signed overflow would change the result; looking through the code does not - * reveal any tests which have the form GCC complains about, so presumably the - * optimizer is moving an add or subtract into the 'if' somewhere. - */ -#pragma GCC diagnostic push -#pragma GCC diagnostic warning "-Wstrict-overflow=2" -#endif /* GCC_STRICT_OVERFLOW */ -int -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; -} -#if GCC_STRICT_OVERFLOW -#pragma GCC diagnostic pop -#endif /* GCC_STRICT_OVERFLOW */ -#endif /* READ_GAMMA || INCH_CONVERSIONS */ - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED) -/* The following is for when the caller doesn't much care about the - * result. - */ -png_fixed_point -png_muldiv_warn(png_const_structrp png_ptr, png_fixed_point a, png_int_32 times, - png_int_32 divisor) -{ - png_fixed_point result; - - if (png_muldiv(&result, a, times, divisor) != 0) - return result; - - png_warning(png_ptr, "fixed point overflow ignored"); - return 0; -} -#endif - -#ifdef PNG_GAMMA_SUPPORTED /* more fixed point functions for gamma */ -/* 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 */ -} - -/* 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) -{ - return gamma_val < PNG_FP_1 - PNG_GAMMA_THRESHOLD_FIXED || - gamma_val > PNG_FP_1 + PNG_GAMMA_THRESHOLD_FIXED; -} -#endif - -#ifdef PNG_READ_GAMMA_SUPPORTED -#ifdef PNG_16BIT_SUPPORTED -/* A local convenience routine. */ -static png_fixed_point -png_product2(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 - 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 /* 16BIT */ - -/* The inverse of the above. */ -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, - PNG_CONST unsigned int shift, PNG_CONST png_fixed_point gamma_val) -{ - /* Various values derived from 'shift': */ - PNG_CONST 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.) - */ - PNG_CONST double fmax = 1./(((png_int_32)1 << (16U - shift))-1); -#endif - PNG_CONST unsigned int max = (1U << (16U - shift))-1U; - PNG_CONST 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, - PNG_CONST unsigned int shift, PNG_CONST png_fixed_point gamma_val) -{ - PNG_CONST unsigned int num = 1U << (8U - shift); - PNG_CONST 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_CONST 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. - */ -void /* PRIVATE */ -png_build_gamma_table(png_structrp png_ptr, int bit_depth) -{ - 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); - } - - if (bit_depth <= 8) - { - png_build_8bit_table(png_ptr, &png_ptr->gamma_table, - png_ptr->screen_gamma > 0 ? - png_reciprocal2(png_ptr->colorspace.gamma, - png_ptr->screen_gamma) : PNG_FP_1); - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ - defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ - defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if ((png_ptr->transformations & (PNG_COMPOSE | PNG_RGB_TO_GRAY)) != 0) - { - png_build_8bit_table(png_ptr, &png_ptr->gamma_to_1, - png_reciprocal(png_ptr->colorspace.gamma)); - - png_build_8bit_table(png_ptr, &png_ptr->gamma_from_1, - png_ptr->screen_gamma > 0 ? - png_reciprocal(png_ptr->screen_gamma) : - png_ptr->colorspace.gamma/* Probably doing rgb_to_gray */); - } -#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ - } -#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_ptr->screen_gamma > 0 ? png_product2(png_ptr->colorspace.gamma, - png_ptr->screen_gamma) : PNG_FP_1); - - else - png_build_16bit_table(png_ptr, &png_ptr->gamma_16_table, shift, - png_ptr->screen_gamma > 0 ? png_reciprocal2(png_ptr->colorspace.gamma, - png_ptr->screen_gamma) : PNG_FP_1); - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ - defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ - defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if ((png_ptr->transformations & (PNG_COMPOSE | PNG_RGB_TO_GRAY)) != 0) - { - png_build_16bit_table(png_ptr, &png_ptr->gamma_16_to_1, shift, - png_reciprocal(png_ptr->colorspace.gamma)); - - /* 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, - png_ptr->screen_gamma > 0 ? png_reciprocal(png_ptr->screen_gamma) : - png_ptr->colorspace.gamma/* Probably doing rgb_to_gray */); - } -#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ - } -#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) - { - /* Ignore errors here: */ - (void)png_safe_execute(image, 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/Dependencies/FreeImage/Source/LibPNG/png.h b/Dependencies/FreeImage/Source/LibPNG/png.h deleted file mode 100644 index 0d84a8c..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/png.h +++ /dev/null @@ -1,3278 +0,0 @@ - -/* png.h - header file for PNG reference library - * - * libpng version 1.6.35, July 15, 2018 - * - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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 15, 2018: - * Glenn Randers-Pehrson. - * See also "Contributing Authors", below. - */ - -/* - * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - * - * If you modify libpng you may insert additional notices immediately following - * this sentence. - * - * This code is released under the libpng license. - * - * libpng versions 1.0.7, July 1, 2000 through 1.6.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 owner - * as a trademark in any jurisdiction. However, because libpng has - * been distributed and maintained world-wide, continually since 1995, - * the Copyright owner claims "common-law trademark protection" in any - * jurisdiction where common-law trademark is recognized. - * - * OSI CERTIFICATION: - * - * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is - * a certification mark of the Open Source Initiative. OSI has not addressed - * the additional disclaimers inserted at version 1.0.7. - * - * EXPORT CONTROL: - * - * The Copyright owner believes that the Export Control Classification - * Number (ECCN) for libpng is EAR99, which means not subject to export - * controls or International Traffic in Arms Regulations (ITAR) because - * it is open source, publicly available software, that does not contain - * any encryption software. See the EAR, paragraphs 734.3(b)(3) and - * 734.7(b). - */ - -/* - * 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.19 10 10019 10.so.0.19[.0] - * ... - * 1.2.59 13 10257 12.so.0.59[.0] - * ... - * 1.5.30 15 10527 15.so.15.30[.0] - * ... - * 1.6.35 16 10635 16.so.16.35[.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. - * - * DLLNUM will change each time there are forward or backward changes - * in binary compatibility (e.g., when a new feature is added). - * - * See libpng.txt or libpng.3 for more information. The PNG specification - * is available as a W3C Recommendation and as an ISO Specification, - * - * - * 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.35" -#define PNG_HEADER_VERSION_STRING " libpng version 1.6.35 - July 15, 2018\n" - -#define PNG_LIBPNG_VER_SONUM 16 -#define PNG_LIBPNG_VER_DLLNUM 16 - -/* 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 35 - -/* This should match the numeric part of the final component of - * PNG_LIBPNG_VER_STRING, omitting any leading zero: - */ - -#define PNG_LIBPNG_VER_BUILD 02 - -/* 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_BETA - -/* 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's xxyyzz, where x=major, y=minor, z=release - */ -#define PNG_LIBPNG_VER 10635 /* 1.6.35 */ - -/* 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_35; - -/* 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 */ - -/* 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), PNGARG((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 INT_MAX >= 0x8000 /* else this might break */ -#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 (ie 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). - */ -#define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n)) - -/* 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 explination 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 caclulations. 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, png_FILE_p 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 responsibility for freeing existing data, whether allocated - * by libpng or by the application; this works on the png_info structure passed - * in, it does not change the state for other png_info structures. - * - * It is unlikely that this function works correctly as of 1.6.0 and using it - * may result either in memory leaks or double free of allocated data. - */ -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_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, const 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, const png_uint_32 num_exif, const 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_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 https://en.wikipedia.org/wiki/SRGB) 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 the 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*). */ -#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 -#ifdef PNG_ARM_NEON_API_SUPPORTED -# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */ -#endif -#define PNG_MAXIMUM_INFLATE_WINDOW 2 /* SOFTWARE: force maximum window */ -#define PNG_SKIP_sRGB_CHECK_PROFILE 4 /* SOFTWARE: Check ICC profile for sRGB */ -#ifdef PNG_MIPS_MSA_API_SUPPORTED -# define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */ -#endif -#define PNG_IGNORE_ADLER32 8 -#ifdef PNG_POWERPC_VSX_API_SUPPORTED -# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions supported */ -#endif -#define PNG_OPTION_NEXT 12 /* Next option - numbers must be even */ - -/* 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(249); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* PNG_VERSION_INFO_ONLY */ -/* Do not put anything past this line */ -#endif /* PNG_H */ diff --git a/Dependencies/FreeImage/Source/LibPNG/pngconf.h b/Dependencies/FreeImage/Source/LibPNG/pngconf.h deleted file mode 100644 index 0fec408..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngconf.h +++ /dev/null @@ -1,623 +0,0 @@ - -/* pngconf.h - machine configurable file for libpng - * - * libpng version 1.6.35, July 15, 2018 - * - * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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 except for data declarations which - * apparently still cause problems in 2011 on some compilers. - */ -#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. It is not required for modern C compilers. - */ -#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(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\ - defined(_WIN32) || defined(__WIN32__) || 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 - -# if (defined(_MSC_VER) && _MSC_VER < 800) ||\ - (defined(__BORLANDC__) && __BORLANDC__ < 0x500) - /* older Borland and MSC - * compilers used '__export' and required this to be after - * the type. - */ -# ifndef PNG_EXPORT_TYPE -# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP -# endif -# define PNG_DLL_EXPORT __export -# else /* newer compiler */ -# define PNG_DLL_EXPORT __declspec(dllexport) -# ifndef PNG_DLL_IMPORT -# define PNG_DLL_IMPORT __declspec(dllimport) -# endif -# endif /* compiler */ - -#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), PNGARG(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) PNGARG(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 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 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 more) 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 more) 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_STDIO_SUPPORTED -typedef FILE * png_FILE_p; -#endif - -#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; - -#endif /* PNG_BUILDING_SYMBOL_TABLE */ - -#endif /* PNGCONF_H */ diff --git a/Dependencies/FreeImage/Source/LibPNG/pngdebug.h b/Dependencies/FreeImage/Source/LibPNG/pngdebug.h deleted file mode 100644 index 3d1e78c..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngdebug.h +++ /dev/null @@ -1,153 +0,0 @@ - -/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c - * - * Last changed in libpng 1.6.8 [December 19, 2013] - * Copyright (c) 1998-2002,2004,2006-2013 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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 - */ - -/* 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/Dependencies/FreeImage/Source/LibPNG/pngerror.c b/Dependencies/FreeImage/Source/LibPNG/pngerror.c deleted file mode 100644 index bf6edd6..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngerror.c +++ /dev/null @@ -1,963 +0,0 @@ - -/* pngerror.c - stub functions for i/o and memory allocation - * - * Last changed in libpng 1.6.31 [July 27, 2017] - * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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, png_default_error,PNGARG((png_const_structrp png_ptr, - png_const_charp error_message)),PNG_NORETURN); - -#ifdef PNG_WARNINGS_SUPPORTED -static void /* PRIVATE */ -png_default_warning PNGARG((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]; - 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]; - - /* 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 PNG_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) -{ - const 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) -{ - const 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_in, int (*function)(png_voidp), png_voidp arg) -{ - volatile png_imagep image = image_in; - volatile int result; - volatile png_voidp saved_error_buf; - jmp_buf safe_jmpbuf; - - /* Safely execute function(arg) with png_error returning to this function. */ - saved_error_buf = image->opaque->error_buf; - result = setjmp(safe_jmpbuf) == 0; - - if (result != 0) - { - - image->opaque->error_buf = safe_jmpbuf; - result = function(arg); - } - - image->opaque->error_buf = saved_error_buf; - - /* And do the cleanup prior to any failure return. */ - if (result == 0) - png_image_free(image); - - return result; -} -#endif /* SIMPLIFIED READ || SIMPLIFIED_WRITE */ -#endif /* READ || WRITE */ diff --git a/Dependencies/FreeImage/Source/LibPNG/pngget.c b/Dependencies/FreeImage/Source/LibPNG/pngget.c deleted file mode 100644 index e706da3..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngget.c +++ /dev/null @@ -1,1249 +0,0 @@ - -/* pngget.c - retrieval of values from info struct - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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) - 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 - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_pHYs) != 0) - { - png_debug1(1, "in %s retrieval function", - "png_get_x_pixels_per_meter"); - - 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 - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_pHYs) != 0) - { - png_debug1(1, "in %s retrieval function", - "png_get_y_pixels_per_meter"); - - 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 - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_pHYs) != 0) - { - png_debug1(1, "in %s retrieval function", "png_get_pixels_per_meter"); - - 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 - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_pHYs) != 0) - { - png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio"); - - if (info_ptr->x_pixels_per_unit != 0) - return ((float)((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 - 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; - - png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio_fixed"); - - /* 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 - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_oFFs) != 0) - { - png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns"); - - 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 - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_oFFs) != 0) - { - png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns"); - - 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 - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_oFFs) != 0) - { - png_debug1(1, "in %s retrieval function", "png_get_x_offset_pixels"); - - 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 - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_oFFs) != 0) - { - png_debug1(1, "in %s retrieval function", "png_get_y_offset_pixels"); - - 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. - */ - return png_muldiv_warn(png_ptr, microns, 500, 127); -} - -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 - -#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; - - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_pHYs) != 0) - { - png_debug1(1, "in %s retrieval function", "pHYs"); - - 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) -{ - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_bKGD) != 0 && - background != NULL) - { - png_debug1(1, "in %s retrieval function", "bKGD"); - - *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 *white_x, double *white_y, double *red_x, double *red_y, - double *green_x, double *green_y, double *blue_x, double *blue_y) -{ - /* Quiet API change: this code used to only return the end points if a cHRM - * chunk was present, but the end points can also come from iCCP or sRGB - * chunks, so in 1.6.0 the png_get_ APIs return the end points regardless and - * the png_set_ APIs merely check that set end points are mutually - * consistent. - */ - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0) - { - png_debug1(1, "in %s retrieval function", "cHRM"); - - if (white_x != NULL) - *white_x = png_float(png_ptr, - info_ptr->colorspace.end_points_xy.whitex, "cHRM white X"); - if (white_y != NULL) - *white_y = png_float(png_ptr, - info_ptr->colorspace.end_points_xy.whitey, "cHRM white Y"); - if (red_x != NULL) - *red_x = png_float(png_ptr, info_ptr->colorspace.end_points_xy.redx, - "cHRM red X"); - if (red_y != NULL) - *red_y = png_float(png_ptr, info_ptr->colorspace.end_points_xy.redy, - "cHRM red Y"); - if (green_x != NULL) - *green_x = png_float(png_ptr, - info_ptr->colorspace.end_points_xy.greenx, "cHRM green X"); - if (green_y != NULL) - *green_y = png_float(png_ptr, - info_ptr->colorspace.end_points_xy.greeny, "cHRM green Y"); - if (blue_x != NULL) - *blue_x = png_float(png_ptr, info_ptr->colorspace.end_points_xy.bluex, - "cHRM blue X"); - if (blue_y != NULL) - *blue_y = png_float(png_ptr, info_ptr->colorspace.end_points_xy.bluey, - "cHRM blue Y"); - 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) -{ - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0) - { - png_debug1(1, "in %s retrieval function", "cHRM_XYZ(float)"); - - if (red_X != NULL) - *red_X = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_X, - "cHRM red X"); - if (red_Y != NULL) - *red_Y = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_Y, - "cHRM red Y"); - if (red_Z != NULL) - *red_Z = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_Z, - "cHRM red Z"); - if (green_X != NULL) - *green_X = png_float(png_ptr, - info_ptr->colorspace.end_points_XYZ.green_X, "cHRM green X"); - if (green_Y != NULL) - *green_Y = png_float(png_ptr, - info_ptr->colorspace.end_points_XYZ.green_Y, "cHRM green Y"); - if (green_Z != NULL) - *green_Z = png_float(png_ptr, - info_ptr->colorspace.end_points_XYZ.green_Z, "cHRM green Z"); - if (blue_X != NULL) - *blue_X = png_float(png_ptr, - info_ptr->colorspace.end_points_XYZ.blue_X, "cHRM blue X"); - if (blue_Y != NULL) - *blue_Y = png_float(png_ptr, - info_ptr->colorspace.end_points_XYZ.blue_Y, "cHRM blue Y"); - if (blue_Z != NULL) - *blue_Z = png_float(png_ptr, - info_ptr->colorspace.end_points_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) -{ - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0) - { - png_debug1(1, "in %s retrieval function", "cHRM_XYZ"); - - if (int_red_X != NULL) - *int_red_X = info_ptr->colorspace.end_points_XYZ.red_X; - if (int_red_Y != NULL) - *int_red_Y = info_ptr->colorspace.end_points_XYZ.red_Y; - if (int_red_Z != NULL) - *int_red_Z = info_ptr->colorspace.end_points_XYZ.red_Z; - if (int_green_X != NULL) - *int_green_X = info_ptr->colorspace.end_points_XYZ.green_X; - if (int_green_Y != NULL) - *int_green_Y = info_ptr->colorspace.end_points_XYZ.green_Y; - if (int_green_Z != NULL) - *int_green_Z = info_ptr->colorspace.end_points_XYZ.green_Z; - if (int_blue_X != NULL) - *int_blue_X = info_ptr->colorspace.end_points_XYZ.blue_X; - if (int_blue_Y != NULL) - *int_blue_Y = info_ptr->colorspace.end_points_XYZ.blue_Y; - if (int_blue_Z != NULL) - *int_blue_Z = info_ptr->colorspace.end_points_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 *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 retrieval function", "cHRM"); - - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0) - { - if (white_x != NULL) - *white_x = info_ptr->colorspace.end_points_xy.whitex; - if (white_y != NULL) - *white_y = info_ptr->colorspace.end_points_xy.whitey; - if (red_x != NULL) - *red_x = info_ptr->colorspace.end_points_xy.redx; - if (red_y != NULL) - *red_y = info_ptr->colorspace.end_points_xy.redy; - if (green_x != NULL) - *green_x = info_ptr->colorspace.end_points_xy.greenx; - if (green_y != NULL) - *green_y = info_ptr->colorspace.end_points_xy.greeny; - if (blue_x != NULL) - *blue_x = info_ptr->colorspace.end_points_xy.bluex; - if (blue_y != NULL) - *blue_y = info_ptr->colorspace.end_points_xy.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"); - - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) != 0 && - file_gamma != NULL) - { - *file_gamma = info_ptr->colorspace.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)"); - - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) != 0 && - file_gamma != NULL) - { - *file_gamma = png_float(png_ptr, info_ptr->colorspace.gamma, - "png_get_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 && file_srgb_intent != NULL) - { - *file_srgb_intent = info_ptr->colorspace.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) -{ - 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_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) -{ - 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) -{ - 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) -{ - 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 0x%lx retrieval function", - (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; - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_tRNS) != 0) - { - png_debug1(1, "in %s retrieval function", "tRNS"); - - 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/Dependencies/FreeImage/Source/LibPNG/pnginfo.h b/Dependencies/FreeImage/Source/LibPNG/pnginfo.h deleted file mode 100644 index 9c8a006..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pnginfo.h +++ /dev/null @@ -1,267 +0,0 @@ - -/* pnginfo.h - header file for PNG reference library - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2013,2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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 - */ - - /* png_info is a structure that holds the information in a PNG file so - * that the application can find out the characteristics of the image. - * If you are reading the file, this structure will tell you what is - * in the PNG file. If you are writing the file, fill in the information - * you want to put into the PNG file, using png_set_*() functions, then - * call png_write_info(). - * - * The names chosen should be very close to the PNG specification, so - * consult that document for information about the meaning of each field. - * - * With libpng < 0.95, it was only possible to directly set and read the - * the values in the png_info_struct, which meant that the contents and - * order of the values had to remain fixed. With libpng 0.95 and later, - * however, there are now functions that abstract the contents of - * png_info_struct from the application, so this makes it easier to use - * libpng with dynamic libraries, and even makes it possible to use - * libraries that don't have all of the libpng ancillary chunk-handing - * functionality. In libpng-1.5.0 this was moved into a separate private - * file that is not visible to applications. - * - * The following members may have allocated storage attached that should be - * cleaned up before the structure is discarded: palette, trans, text, - * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, - * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these - * are automatically freed when the info structure is deallocated, if they were - * allocated internally by libpng. This behavior can be changed by means - * of the png_data_freer() function. - * - * More allocation details: all the chunk-reading functions that - * change these members go through the corresponding png_set_* - * functions. A function to clear these members is available: see - * png_free_data(). The png_set_* functions do not depend on being - * able to point info structure members to any of the storage they are - * passed (they make their own copies), EXCEPT that the png_set_text - * functions use the same storage passed to them in the text_ptr or - * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns - * functions do not make their own copies. - */ -#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. - */ - -#if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED) - /* png_colorspace only contains 'flags' if neither GAMMA or COLORSPACE are - * defined. When COLORSPACE is switched on all the colorspace-defining - * chunks should be enabled, when GAMMA is switched on all the gamma-defining - * chunks should be enabled. If this is not done it becomes possible to read - * inconsistent PNG files and assign a probably incorrect interpretation to - * the information. (In other words, by carefully choosing which chunks to - * recognize the system configuration can select an interpretation for PNG - * files containing ambiguous data and this will result in inconsistent - * behavior between different libpng builds!) - */ - png_colorspace colorspace; -#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_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 - int num_exif; /* Added at libpng-1.6.31 */ - png_bytep exif; -# ifdef PNG_READ_eXIf_SUPPORTED - png_bytep eXIf_buf; /* Added at libpng-1.6.32 */ -# endif -#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 - -}; -#endif /* PNGINFO_H */ diff --git a/Dependencies/FreeImage/Source/LibPNG/pnglibconf.h b/Dependencies/FreeImage/Source/LibPNG/pnglibconf.h deleted file mode 100644 index a03f21a..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pnglibconf.h +++ /dev/null @@ -1,216 +0,0 @@ -/* libpng 1.6.18 STANDARD API DEFINITION */ - -/* pnglibconf.h - library build configuration */ - -/* Libpng version 1.6.18 - July 23, 2015 */ - -/* Copyright (c) 1998-2014 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 -#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 -#define PNG_MNG_FEATURES_SUPPORTED -#define PNG_POINTER_INDEXING_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_gAMA_SUPPORTED -#define PNG_READ_hIST_SUPPORTED -#define PNG_READ_iCCP_SUPPORTED -#define PNG_READ_iTXt_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_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_gAMA_SUPPORTED -#define PNG_WRITE_hIST_SUPPORTED -#define PNG_WRITE_iCCP_SUPPORTED -#define PNG_WRITE_iTXt_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_gAMA_SUPPORTED -#define PNG_hIST_SUPPORTED -#define PNG_iCCP_SUPPORTED -#define PNG_iTXt_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 */ -#define PNG_API_RULE 0 -#define PNG_COST_SHIFT 3 -#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_WEIGHT_SHIFT 8 -#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/Dependencies/FreeImage/Source/LibPNG/pngmem.c b/Dependencies/FreeImage/Source/LibPNG/pngmem.c deleted file mode 100644 index 1a32adb..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngmem.c +++ /dev/null @@ -1,284 +0,0 @@ - -/* pngmem.c - stub functions for memory allocation - * - * Last changed in libpng 1.6.26 [October 20, 2016] - * Copyright (c) 1998-2002,2004,2006-2014,2016 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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. - */ -#ifndef PNG_USER_MEM_SUPPORTED - PNG_UNUSED(png_ptr) -#endif - - /* Some compilers complain that this is always true. However, it - * can be false when integer overflow happens. - */ - if (size > 0 && size <= PNG_SIZE_MAX -# ifdef PNG_MAX_MALLOC_64K - && size <= 65536U -# endif - ) - { -#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 -#endif - return malloc((size_t)size); /* checked for truncation above */ - } - - else - return NULL; -} - -#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/Dependencies/FreeImage/Source/LibPNG/pngpread.c b/Dependencies/FreeImage/Source/LibPNG/pngpread.c deleted file mode 100644 index 7de887a..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngpread.c +++ /dev/null @@ -1,1096 +0,0 @@ - -/* pngpread.c - read a png file in push mode - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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; } - -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)) - { - if (num_checked < 4 && - png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) - 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_byte chunk_length[4]; - png_byte chunk_tag[4]; - - 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_check_chunk_name(png_ptr, png_ptr->chunk_name); - png_check_chunk_length(png_ptr, png_ptr->push_length); - 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"); - } - - 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_IHDR(png_ptr, info_ptr, png_ptr->push_length); - } - - else if (chunk_name == png_IEND) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_IEND(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_PLTE) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_PLTE(png_ptr, info_ptr, png_ptr->push_length); - } - - 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; - } - -#ifdef PNG_READ_gAMA_SUPPORTED - else if (png_ptr->chunk_name == png_gAMA) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_gAMA(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_sBIT_SUPPORTED - else if (png_ptr->chunk_name == png_sBIT) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_sBIT(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_cHRM_SUPPORTED - else if (png_ptr->chunk_name == png_cHRM) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_sRGB_SUPPORTED - else if (chunk_name == png_sRGB) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_sRGB(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_iCCP_SUPPORTED - else if (png_ptr->chunk_name == png_iCCP) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_iCCP(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_sPLT_SUPPORTED - else if (chunk_name == png_sPLT) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_sPLT(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_tRNS_SUPPORTED - else if (chunk_name == png_tRNS) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_bKGD_SUPPORTED - else if (chunk_name == png_bKGD) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_hIST_SUPPORTED - else if (chunk_name == png_hIST) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_hIST(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_pHYs_SUPPORTED - else if (chunk_name == png_pHYs) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_pHYs(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_oFFs_SUPPORTED - else if (chunk_name == png_oFFs) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_oFFs(png_ptr, info_ptr, png_ptr->push_length); - } -#endif - -#ifdef PNG_READ_pCAL_SUPPORTED - else if (chunk_name == png_pCAL) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_pCAL(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_sCAL_SUPPORTED - else if (chunk_name == png_sCAL) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_sCAL(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_tIME_SUPPORTED - else if (chunk_name == png_tIME) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_tIME(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_tEXt_SUPPORTED - else if (chunk_name == png_tEXt) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_zTXt_SUPPORTED - else if (chunk_name == png_zTXt) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length); - } - -#endif -#ifdef PNG_READ_iTXt_SUPPORTED - else if (chunk_name == png_iTXt) - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length); - } -#endif - - else - { - PNG_PUSH_SAVE_BUFFER_IF_FULL - png_handle_unknown(png_ptr, info_ptr, png_ptr->push_length, - PNG_HANDLE_CHUNK_AS_DEFAULT); - } - - 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) -{ -#ifdef PNG_READ_INTERLACING_SUPPORTED - /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* Start of interlace block */ - static PNG_CONST png_byte png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; - - /* Offset to next interlace block */ - static PNG_CONST png_byte png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; - - /* Start of interlace block in the y direction */ - static PNG_CONST png_byte png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; - - /* Offset to next interlace block in the y direction */ - static PNG_CONST png_byte png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2}; - - /* Height of interlace block. This is not currently used - if you need - * it, uncomment it here and in png.h - static PNG_CONST png_byte png_pass_height[] = {8, 8, 4, 4, 2, 2, 1}; - */ -#endif - - 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/Dependencies/FreeImage/Source/LibPNG/pngpriv.h b/Dependencies/FreeImage/Source/LibPNG/pngpriv.h deleted file mode 100644 index 81f8761..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngpriv.h +++ /dev/null @@ -1,2126 +0,0 @@ - -/* pngpriv.h - private declarations for use inside libpng - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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. - */ - -#ifndef PNGPRIV_H -#define PNGPRIV_H - -/* 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. - */ -#ifndef PNGLCONF_H -# include "pnglibconf.h" -#endif - -/* 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 - -#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 - - /* By default the 'intrinsics' code in arm/filter_neon_intrinsics.c is used - * if possible - if __ARM_NEON__ is set and the compiler version is not known - * to be broken. This is controlled by PNG_ARM_NEON_IMPLEMENTATION which can - * be: - * - * 1 The intrinsics code (the default with __ARM_NEON__) - * 2 The hand coded assembler (the default without __ARM_NEON__) - * - * It is possible to set PNG_ARM_NEON_IMPLEMENTATION in CPPFLAGS, however - * this is *NOT* supported and may cease to work even after a minor revision - * to libpng. It *is* valid to do this for testing purposes, e.g. speed - * testing or a new compiler, but the results should be communicated to the - * libpng implementation list for incorporation in the next minor release. - */ -# ifndef PNG_ARM_NEON_IMPLEMENTATION -# if defined(__ARM_NEON__) || defined(__ARM_NEON) -# if defined(__clang__) - /* At present it is unknown by the libpng developers which versions - * of clang support the intrinsics, however some or perhaps all - * versions do not work with the assembler so this may be - * irrelevant, so just use the default (do nothing here.) - */ -# elif defined(__GNUC__) - /* GCC 4.5.4 NEON support is known to be broken. 4.6.3 is known to - * work, so if this *is* GCC, or G++, look for a version >4.5 - */ -# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) -# define PNG_ARM_NEON_IMPLEMENTATION 2 -# endif /* no GNUC support */ -# endif /* __GNUC__ */ -# else /* !defined __ARM_NEON__ */ - /* The 'intrinsics' code simply won't compile without this -mfpu=neon: - */ -# define PNG_ARM_NEON_IMPLEMENTATION 2 -# endif /* __ARM_NEON__ */ -# endif /* !PNG_ARM_NEON_IMPLEMENTATION */ - -# ifndef PNG_ARM_NEON_IMPLEMENTATION - /* Use the intrinsics code by default. */ -# define PNG_ARM_NEON_IMPLEMENTATION 1 -# endif -#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_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_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 -# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_msa -# 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 -# endif -#endif /* PNG_MIPS_MSA_OPT > 0 */ - -#if PNG_POWERPC_VSX_OPT > 0 -# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_vsx -# define PNG_POWERPC_VSX_IMPLEMENTATION 1 -#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) -# ifdef _WIN64 -# ifdef __GNUC__ - typedef unsigned long long png_ptruint; -# else - typedef unsigned __int64 png_ptruint; -# endif -# else - typedef unsigned long png_ptruint; -# endif -# define png_constcast(type, value) ((type)(png_ptruint)(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 - -# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ - defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) - /* We need to check that hasn't already been included earlier - * as it seems it doesn't agree with , yet we should really use - * if possible. - */ -# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) -# include -# endif -# else -# include -# endif -# 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(_Windows) || defined(_WINDOWS) || \ - defined(_WIN32) || defined(__WIN32__) -# include /* defines _WINDOWS_ macro */ -#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. - */ - -/* Memory model/platform independent fns */ -#ifndef PNG_ABORT -# ifdef _WINDOWS_ -# define PNG_ABORT() ExitProcess(0) -# else -# define PNG_ABORT() abort() -# endif -#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 to a power of 2. */ -#ifdef png_alignof -# define png_isaligned(ptr, type)\ - (((type)((const char*)ptr-(const char*)0) & \ - (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 */ - /* 0x4000U (unused) */ -#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 -#define PNG_FLAG_ASSUME_sRGB 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)) -#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. - */ -#define PNG_32b(b,s) ((png_uint_32)(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)) - -/* 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_bKGD PNG_U32( 98, 75, 71, 68) -#define png_cHRM PNG_U32( 99, 72, 82, 77) -#define png_eXIf PNG_U32(101, 88, 73, 102) /* registered July 2017 */ -#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_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)) - -/* 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 - -/* 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 ZLIB_VERNUM != PNG_ZLIB_VERNUM \ - "-I (include path) error: see the notes in pngpriv.h" - /* This means that when pnglibconf.h was built the copy of zlib.h that it - * used is not the same as the one being used here. Because the build of - * libpng makes decisions to use inflateInit2 and inflateReset2 based on the - * zlib version number and because this affects handling of certain broken - * PNG files the -I directives must match. - * - * The most likely explanation is that you passed a -I in CFLAGS. This will - * not work; all the preprocessor directives and in particular all the -I - * directives must 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_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 - -/* 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); - -/* 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); - -/* Read the CRC from the file and compare it to the libpng calculated CRC */ -PNG_INTERNAL_FUNCTION(int,png_crc_error,(png_structrp png_ptr),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_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_EMPTY); - /* The profile must have been previously validated for correctness, the - * length comes from the first four bytes. Only the base, deflate, - * compression is supported. - */ -#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_OPT > 0 -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_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 - -/* 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. - */ - -/* Decode the IHDR chunk */ -PNG_INTERNAL_FUNCTION(void,png_handle_IHDR,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -PNG_INTERNAL_FUNCTION(void,png_handle_PLTE,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -PNG_INTERNAL_FUNCTION(void,png_handle_IEND,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); - -#ifdef PNG_READ_bKGD_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_bKGD,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_cHRM_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_cHRM,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_eXIf_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_eXIf,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_gAMA_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_gAMA,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_hIST_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_hIST,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_iCCP_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_iCCP,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif /* READ_iCCP */ - -#ifdef PNG_READ_iTXt_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_iTXt,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_oFFs_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_oFFs,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_pCAL_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_pCAL,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_pHYs_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_pHYs,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_sBIT_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_sBIT,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_sCAL_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_sCAL,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_sPLT_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_sPLT,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif /* READ_sPLT */ - -#ifdef PNG_READ_sRGB_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_sRGB,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_tEXt_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_tEXt,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_tIME_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_tIME,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_tRNS_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_tRNS,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -#ifdef PNG_READ_zTXt_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_handle_zTXt,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -#endif - -PNG_INTERNAL_FUNCTION(void,png_check_chunk_name,(png_const_structrp png_ptr, - const png_uint_32 chunk_name),PNG_EMPTY); - -PNG_INTERNAL_FUNCTION(void,png_check_chunk_length,(png_const_structrp png_ptr, - const png_uint_32 chunk_length),PNG_EMPTY); - -PNG_INTERNAL_FUNCTION(void,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. - */ - -#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_handle_unknown,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),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); -# ifdef PNG_READ_tEXt_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_push_handle_tEXt,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -PNG_INTERNAL_FUNCTION(void,png_push_read_tEXt,(png_structrp png_ptr, - png_inforp info_ptr),PNG_EMPTY); -# endif -# ifdef PNG_READ_zTXt_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_push_handle_zTXt,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -PNG_INTERNAL_FUNCTION(void,png_push_read_zTXt,(png_structrp png_ptr, - png_inforp info_ptr),PNG_EMPTY); -# endif -# ifdef PNG_READ_iTXt_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_push_handle_iTXt,(png_structrp png_ptr, - png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); -PNG_INTERNAL_FUNCTION(void,png_push_read_iTXt,(png_structrp png_ptr, - png_inforp info_ptr),PNG_EMPTY); -# endif - -#endif /* PROGRESSIVE_READ */ - -/* Added at libpng version 1.6.0 */ -#ifdef PNG_GAMMA_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_colorspace_set_gamma,(png_const_structrp png_ptr, - png_colorspacerp colorspace, png_fixed_point gAMA), PNG_EMPTY); - /* Set the colorspace gamma with a value provided by the application or by - * the gAMA chunk on read. The value will override anything set by an ICC - * profile. - */ - -PNG_INTERNAL_FUNCTION(void,png_colorspace_sync_info,(png_const_structrp png_ptr, - png_inforp info_ptr), PNG_EMPTY); - /* Synchronize the info 'valid' flags with the colorspace */ - -PNG_INTERNAL_FUNCTION(void,png_colorspace_sync,(png_const_structrp png_ptr, - png_inforp info_ptr), PNG_EMPTY); - /* Copy the png_struct colorspace to the info_struct and call the above to - * synchronize the flags. Checks for NULL info_ptr and does nothing. - */ -#endif - -/* Added at libpng version 1.4.0 */ -#ifdef PNG_COLORSPACE_SUPPORTED -/* These internal functions are for maintaining the colorspace structure within - * a png_info or png_struct (or, indeed, both). - */ -PNG_INTERNAL_FUNCTION(int,png_colorspace_set_chromaticities, - (png_const_structrp png_ptr, png_colorspacerp colorspace, const png_xy *xy, - int preferred), PNG_EMPTY); - -PNG_INTERNAL_FUNCTION(int,png_colorspace_set_endpoints, - (png_const_structrp png_ptr, png_colorspacerp colorspace, const png_XYZ *XYZ, - int preferred), PNG_EMPTY); - -#ifdef PNG_sRGB_SUPPORTED -PNG_INTERNAL_FUNCTION(int,png_colorspace_set_sRGB,(png_const_structrp png_ptr, - png_colorspacerp colorspace, int intent), PNG_EMPTY); - /* This does set the colorspace gAMA and cHRM values too, but doesn't set the - * flags to write them, if it returns false there was a problem and an error - * message has already been output (but the colorspace may still need to be - * synced to record the invalid flag). - */ -#endif /* sRGB */ - -#ifdef PNG_iCCP_SUPPORTED -PNG_INTERNAL_FUNCTION(int,png_colorspace_set_ICC,(png_const_structrp png_ptr, - png_colorspacerp colorspace, png_const_charp name, - png_uint_32 profile_length, png_const_bytep profile, int color_type), - PNG_EMPTY); - /* The 'name' is used for information only */ - -/* 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_colorspacerp colorspace, 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_colorspacerp colorspace, 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_colorspacerp colorspace, png_const_charp name, - png_uint_32 profile_length, - png_const_bytep profile /* header plus whole tag table */), PNG_EMPTY); -#ifdef PNG_sRGB_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_icc_set_sRGB,( - png_const_structrp png_ptr, png_colorspacerp colorspace, - png_const_bytep profile, uLong adler), PNG_EMPTY); - /* 'adler' is the Adler32 checksum of the uncompressed profile data. It may - * be zero to indicate that it is not available. It is used, if provided, - * as a fast check on the profile when checking to see if it is sRGB. - */ -#endif -#endif /* iCCP */ - -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED -PNG_INTERNAL_FUNCTION(void,png_colorspace_set_rgb_coefficients, - (png_structrp png_ptr), PNG_EMPTY); - /* Set the rgb_to_gray coefficients from the colorspace Y values */ -#endif /* READ_RGB_TO_GRAY */ -#endif /* COLORSPACE */ - -/* 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 meants 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, png_size_tp 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_GAMMA_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); -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED) -/* Same deal, but issue a warning on overflow and return 0. */ -PNG_INTERNAL_FUNCTION(png_fixed_point,png_muldiv_warn, - (png_const_structrp png_ptr, png_fixed_point a, png_int_32 multiplied_by, - png_int_32 divided_by),PNG_EMPTY); -#endif - -#ifdef PNG_GAMMA_SUPPORTED -/* 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); - -#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); -#endif - -/* 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); -#endif - -#ifdef PNG_READ_GAMMA_SUPPORTED -/* 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 - -/* 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_OPT > 0 -PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_msa, - (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 - -PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr, - png_const_charp key, png_bytep new_key), PNG_EMPTY); - -/* Maintainer: Put new private prototypes here ^ */ - -#include "pngdebug.h" - -#ifdef __cplusplus -} -#endif - -#endif /* PNG_VERSION_INFO_ONLY */ -#endif /* PNGPRIV_H */ diff --git a/Dependencies/FreeImage/Source/LibPNG/pngread.c b/Dependencies/FreeImage/Source/LibPNG/pngread.c deleted file mode 100644 index 901c636..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngread.c +++ /dev/null @@ -1,4219 +0,0 @@ - -/* pngread.c - read a PNG file - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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; - } - - /* This should be a binary subdivision search or a hash for - * matching the chunk name rather than a linear search. - */ - if (chunk_name == png_IHDR) - png_handle_IHDR(png_ptr, info_ptr, length); - - else if (chunk_name == png_IEND) - png_handle_IEND(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_PLTE) - png_handle_PLTE(png_ptr, info_ptr, length); - - else if (chunk_name == png_IDAT) - { - png_ptr->idat_size = length; - break; - } - -#ifdef PNG_READ_bKGD_SUPPORTED - else if (chunk_name == png_bKGD) - png_handle_bKGD(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_cHRM_SUPPORTED - else if (chunk_name == png_cHRM) - png_handle_cHRM(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_eXIf_SUPPORTED - else if (chunk_name == png_eXIf) - png_handle_eXIf(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_gAMA_SUPPORTED - else if (chunk_name == png_gAMA) - png_handle_gAMA(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_hIST_SUPPORTED - else if (chunk_name == png_hIST) - png_handle_hIST(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_oFFs_SUPPORTED - else if (chunk_name == png_oFFs) - png_handle_oFFs(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_pCAL_SUPPORTED - else if (chunk_name == png_pCAL) - png_handle_pCAL(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_sCAL_SUPPORTED - else if (chunk_name == png_sCAL) - png_handle_sCAL(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_pHYs_SUPPORTED - else if (chunk_name == png_pHYs) - png_handle_pHYs(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_sBIT_SUPPORTED - else if (chunk_name == png_sBIT) - png_handle_sBIT(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_sRGB_SUPPORTED - else if (chunk_name == png_sRGB) - png_handle_sRGB(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_iCCP_SUPPORTED - else if (chunk_name == png_iCCP) - png_handle_iCCP(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_sPLT_SUPPORTED - else if (chunk_name == png_sPLT) - png_handle_sPLT(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_tEXt_SUPPORTED - else if (chunk_name == png_tEXt) - png_handle_tEXt(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_tIME_SUPPORTED - else if (chunk_name == png_tIME) - png_handle_tIME(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_tRNS_SUPPORTED - else if (chunk_name == png_tRNS) - png_handle_tRNS(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_zTXt_SUPPORTED - else if (chunk_name == png_zTXt) - png_handle_zTXt(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_iTXt_SUPPORTED - else if (chunk_name == png_iTXt) - png_handle_iTXt(png_ptr, info_ptr, length); -#endif - - else - png_handle_unknown(png_ptr, info_ptr, length, - PNG_HANDLE_CHUNK_AS_DEFAULT); - } -} -#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) - 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) - png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT; - - if (chunk_name == png_IEND) - png_handle_IEND(png_ptr, info_ptr, length); - - else if (chunk_name == png_IHDR) - png_handle_IHDR(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 if (chunk_name == png_PLTE) - png_handle_PLTE(png_ptr, info_ptr, length); - -#ifdef PNG_READ_bKGD_SUPPORTED - else if (chunk_name == png_bKGD) - png_handle_bKGD(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_cHRM_SUPPORTED - else if (chunk_name == png_cHRM) - png_handle_cHRM(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_eXIf_SUPPORTED - else if (chunk_name == png_eXIf) - png_handle_eXIf(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_gAMA_SUPPORTED - else if (chunk_name == png_gAMA) - png_handle_gAMA(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_hIST_SUPPORTED - else if (chunk_name == png_hIST) - png_handle_hIST(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_oFFs_SUPPORTED - else if (chunk_name == png_oFFs) - png_handle_oFFs(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_pCAL_SUPPORTED - else if (chunk_name == png_pCAL) - png_handle_pCAL(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_sCAL_SUPPORTED - else if (chunk_name == png_sCAL) - png_handle_sCAL(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_pHYs_SUPPORTED - else if (chunk_name == png_pHYs) - png_handle_pHYs(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_sBIT_SUPPORTED - else if (chunk_name == png_sBIT) - png_handle_sBIT(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_sRGB_SUPPORTED - else if (chunk_name == png_sRGB) - png_handle_sRGB(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_iCCP_SUPPORTED - else if (chunk_name == png_iCCP) - png_handle_iCCP(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_sPLT_SUPPORTED - else if (chunk_name == png_sPLT) - png_handle_sPLT(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_tEXt_SUPPORTED - else if (chunk_name == png_tEXt) - png_handle_tEXt(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_tIME_SUPPORTED - else if (chunk_name == png_tIME) - png_handle_tIME(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_tRNS_SUPPORTED - else if (chunk_name == png_tRNS) - png_handle_tRNS(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_zTXt_SUPPORTED - else if (chunk_name == png_zTXt) - png_handle_zTXt(png_ptr, info_ptr, length); -#endif - -#ifdef PNG_READ_iTXt_SUPPORTED - else if (chunk_name == png_iTXt) - png_handle_iTXt(png_ptr, info_ptr, length); -#endif - - else - png_handle_unknown(png_ptr, info_ptr, length, - PNG_HANDLE_CHUNK_AS_DEFAULT); - } 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 - - /* 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) -{ - 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; -} - -/* 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) -{ - if (g < PNG_FP_1) - { - /* An uninitialized gamma is assumed to be sRGB for the simplified API. */ - if (g == 0) - return 0; - - return png_gamma_significant((g * 11 + 2)/5 /* i.e. *2.2, rounded */); - } - - return 1; -} - -/* 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_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; - -#ifdef PNG_COLORSPACE_SUPPORTED - /* Does the colorspace match sRGB? If there is no color endpoint - * (colorant) information assume yes, otherwise require the - * 'ENDPOINTS_MATCHP_sRGB' colorspace flag to have been set. If the - * colorspace has been determined to be invalid ignore it. - */ - if ((format & PNG_FORMAT_FLAG_COLOR) != 0 && ((png_ptr->colorspace.flags - & (PNG_COLORSPACE_HAVE_ENDPOINTS|PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB| - PNG_COLORSPACE_INVALID)) == PNG_COLORSPACE_HAVE_ENDPOINTS)) - image->flags |= PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB; -#endif - } - - /* 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, - * however if the support is there the chunk is still checked to detect - * errors (which are unfortunately quite common.) - */ - { - static PNG_CONST png_byte chunks_to_process[] = { - 98, 75, 71, 68, '\0', /* bKGD */ - 99, 72, 82, 77, '\0', /* cHRM */ - 103, 65, 77, 65, '\0', /* gAMA */ -# ifdef PNG_READ_iCCP_SUPPORTED - 105, 67, 67, 80, '\0', /* iCCP */ -# endif - 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_fixed_point g = display->image->opaque->png_ptr->colorspace.gamma; - 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; - const int output_encoding = (image->format & PNG_FORMAT_FLAG_LINEAR) != 0 ? - P_LINEAR : P_sRGB; - const 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 - const 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 - const 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); - const png_imagep image = display->image; - - const png_structrp png_ptr = image->opaque->png_ptr; - const png_uint_32 output_format = image->format; - const 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. - */ - if ((png_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) == 0) - { - /* Do this directly, not using the png_colorspace functions, to ensure - * that it happens even if the colorspace is invalid (though probably if - * it is the setting will be ignored) Note that the same thing can be - * achieved at the application interface with png_set_gAMA. - */ - if (png_ptr->bit_depth == 16 && - (image->flags & PNG_IMAGE_FLAG_16BIT_sRGB) == 0) - png_ptr->colorspace.gamma = PNG_GAMMA_LINEAR; - - else - png_ptr->colorspace.gamma = PNG_GAMMA_sRGB_INVERSE; - - png_ptr->colorspace.flags |= PNG_COLORSPACE_HAVE_GAMMA; - } - - /* 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 - { - /* 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. - */ - if ((png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA || - png_ptr->num_trans > 0) && - png_gamma_not_sRGB(png_ptr->colorspace.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, - png_ptr->colorspace.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; - const 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) - { - png_bytep row = png_voidcast(png_bytep, display->first_row); - 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 */ - } - - row += display->row_bytes; - } - } - } - } - 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. - */ - { - 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_ptr->colorspace.gamma, - 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_CONST 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. - */ - const 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; - const 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/Dependencies/FreeImage/Source/LibPNG/pngrio.c b/Dependencies/FreeImage/Source/LibPNG/pngrio.c deleted file mode 100644 index 52efd1e..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngrio.c +++ /dev/null @@ -1,120 +0,0 @@ - -/* pngrio.c - functions for data input - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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(png_FILE_p, 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/Dependencies/FreeImage/Source/LibPNG/pngrtran.c b/Dependencies/FreeImage/Source/LibPNG/pngrtran.c deleted file mode 100644 index 6df3798..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngrtran.c +++ /dev/null @@ -1,5004 +0,0 @@ - -/* pngrtran.c - transforms the data in a row for PNG readers - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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_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) -static png_fixed_point -translate_gamma_flags(png_structrp png_ptr, 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 there is no sRGB support this just sets the gamma to the standard - * sRGB value. (This is a side effect of using this function!) - */ -# ifdef PNG_READ_sRGB_SUPPORTED - png_ptr->flags |= PNG_FLAG_ASSUME_sRGB; -# else - PNG_UNUSED(png_ptr) -# endif - 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 -#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) -{ - int compose = 0; - png_fixed_point file_gamma; - - png_debug(1, "in png_set_alpha_mode"); - - if (png_rtran_ok(png_ptr, 0) == 0) - return; - - output_gamma = translate_gamma_flags(png_ptr, output_gamma, 1/*screen*/); - - /* Validate the 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 users of this API - * who use the inverse of the gamma value accidentally! Since some of these - * values are reasonable this may have to be changed: - * - * 1.6.x: changed from 0.07..3 to 0.01..100 (to accommodate the optimal 16-bit - * gamma of 36, and its reciprocal.) - */ - if (output_gamma < 1000 || output_gamma > 10000000) - png_error(png_ptr, "output gamma out of expected range"); - - /* The default file gamma is the inverse of the output gamma; the output - * gamma may be changed below so get the file value first: - */ - file_gamma = png_reciprocal(output_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"); - } - - /* Only set the default gamma if the file gamma has not been set (this has - * the side effect that the gamma in a second call to png_set_alpha_mode will - * be ignored.) - */ - if (png_ptr->colorspace.gamma == 0) - { - png_ptr->colorspace.gamma = file_gamma; - png_ptr->colorspace.flags |= PNG_COLORSPACE_HAVE_GAMMA; - } - - /* But always set the output gamma: */ - 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 = png_ptr->colorspace.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)((png_uint_32)num_palette * (sizeof (png_byte)))); - 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)((png_uint_32)num_palette * (sizeof (png_byte)))); - - /* 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)((png_uint_32)num_palette * - (sizeof (png_byte)))); - png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr, - (png_alloc_size_t)((png_uint_32)num_palette * - (sizeof (png_byte)))); - - /* 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 * (sizeof (png_byte)))); - - distance = (png_bytep)png_malloc(png_ptr, (png_alloc_size_t)(num_entries * - (sizeof (png_byte)))); - - memset(distance, 0xff, num_entries * (sizeof (png_byte))); - - 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(png_ptr, scrn_gamma, 1/*screen*/); - file_gamma = translate_gamma_flags(png_ptr, 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_error(png_ptr, "invalid file gamma in png_set_gamma"); - - if (scrn_gamma <= 0) - png_error(png_ptr, "invalid screen gamma in png_set_gamma"); - - /* Set the gamma values unconditionally - this overrides the value in the PNG - * file if a gAMA chunk was present. png_set_alpha_mode provides a - * different, easier, way to default the file gamma. - */ - png_ptr->colorspace.gamma = file_gamma; - png_ptr->colorspace.flags |= PNG_COLORSPACE_HAVE_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"); - - /* 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"); - - /* Use the defaults, from the cHRM chunk if set, else the historical - * values which are close to the sRGB/HDTV/ITU-Rec 709 values. See - * png_do_rgb_to_gray for more discussion of the values. In this case - * the coefficients are not marked as 'set' and are not overwritten if - * something has already provided a default. - */ - if (png_ptr->rgb_to_gray_red_coeff == 0 && - png_ptr->rgb_to_gray_green_coeff == 0) - { - png_ptr->rgb_to_gray_red_coeff = 6968; - png_ptr->rgb_to_gray_green_coeff = 23434; - /* png_ptr->rgb_to_gray_blue_coeff = 2366; */ - } - } - } -} - -#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; itrans_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 */ -} - -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.) - */ - { - /* The following temporary indicates if overall gamma correction is - * required. - */ - int gamma_correction = 0; - - if (png_ptr->colorspace.gamma != 0) /* has been set */ - { - if (png_ptr->screen_gamma != 0) /* screen set too */ - gamma_correction = png_gamma_threshold(png_ptr->colorspace.gamma, - png_ptr->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. - */ - png_ptr->screen_gamma = png_reciprocal(png_ptr->colorspace.gamma); - } - - else if (png_ptr->screen_gamma != 0) - /* The converse - assume the file matches the screen, note that this - * perhaps undesirable default can (from 1.5.4) be changed by calling - * png_set_alpha_mode (even if the alpha handling mode isn't required - * or isn't changed from the default.) - */ - png_ptr->colorspace.gamma = png_reciprocal(png_ptr->screen_gamma); - - else /* neither are set */ - /* Just in case the following prevents any processing - file and screen - * are both assumed to be linear and there is no way to introduce a - * third gamma value other than png_set_background with 'UNIQUE', and, - * prior to 1.5.4 - */ - png_ptr->screen_gamma = png_ptr->colorspace.gamma = PNG_FP_1; - - /* We have a gamma value now. */ - png_ptr->colorspace.flags |= PNG_COLORSPACE_HAVE_GAMMA; - - /* Now 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 (gamma_correction != 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_colorspace_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->colorspace.gamma) != 0 || - png_gamma_significant(png_ptr->screen_gamma) != 0)) || - ((png_ptr->transformations & PNG_COMPOSE) != 0 && - (png_gamma_significant(png_ptr->colorspace.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->colorspace.gamma); - gs = png_reciprocal2(png_ptr->colorspace.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->colorspace.gamma); - gs = png_reciprocal2(png_ptr->colorspace.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 looks wrong; the info_ptr should end up with a gamma equal to - * the screen_gamma value. The following probably results in weirdness if - * the info_ptr is used by the app after the rows have been read. - */ - info_ptr->colorspace.gamma = png_ptr->colorspace.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_CONST png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff; - PNG_CONST png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff; - PNG_CONST png_uint_32 bc = 32768 - rc - gc; - PNG_CONST png_uint_32 row_width = row_info->width; - PNG_CONST 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_CONST png_bytep table = png_ptr->gamma_from_1; - - if (table != NULL) - { - PNG_CONST 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_CONST png_uint_16pp table = png_ptr->gamma_16_from_1; - PNG_CONST int gamma_shift = png_ptr->gamma_shift; - - if (table != NULL) - { - PNG_CONST 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_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; - - for (i = 0; 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; - - for (i = 0; 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) - { - png_do_expand_palette(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/Dependencies/FreeImage/Source/LibPNG/pngrutil.c b/Dependencies/FreeImage/Source/LibPNG/pngrutil.c deleted file mode 100644 index 4f3a7e3..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngrutil.c +++ /dev/null @@ -1,4682 +0,0 @@ - -/* pngrutil.c - utilities to read a PNG file - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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 - -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); -} - -#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_READ_cHRM_SUPPORTED) -/* The following is a variation on the above for use with the fixed - * point values used for gAMA and cHRM. Instead of png_error it - * issues a warning and returns (-1) - an invalid value because both - * gAMA and cHRM use *unsigned* integers for fixed point values. - */ -#define PNG_FIXED_ERROR (-1) - -static png_fixed_point /* PRIVATE */ -png_get_fixed_point(png_structrp png_ptr, png_const_bytep buf) -{ - png_uint_32 uval = png_get_uint_32(buf); - - if (uval <= PNG_UINT_31_MAX) - return (png_fixed_point)uval; /* known to be in range */ - - /* The caller can turn off the warning by passing NULL. */ - if (png_ptr != NULL) - png_warning(png_ptr, "PNG fixed point integer out of range"); - - return PNG_FIXED_ERROR; -} -#endif - -#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)) - 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; -} - -/* 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 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. - * This must be performed in a single I/O call. - */ - png_read_data(png_ptr, buf, 8); - length = png_get_uint_31(png_ptr, buf); - - /* Put the chunk name into png_ptr->chunk_name. */ - png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(buf+4); - - png_debug2(0, "Reading %lx chunk, length = %lu", - (unsigned long)png_ptr->chunk_name, (unsigned long)length); - - /* Reset the crc and run it over the chunk name. */ - png_reset_crc(png_ptr); - png_calculate_crc(png_ptr, buf + 4, 4); - - /* Check to see if chunk name is valid. */ - png_check_chunk_name(png_ptr, png_ptr->chunk_name); - - /* Check for too-large chunk length */ - png_check_chunk_length(png_ptr, length); - -#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); -} - -/* 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. - */ -int /* PRIVATE */ -png_crc_finish(png_structrp png_ptr, png_uint_32 skip) -{ - /* 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 (png_crc_error(png_ptr) != 0) - { - if (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); -} - -/* Compare the CRC stored in the PNG file with that calculated by libpng from - * the data it has read thus far. - */ -int /* PRIVATE */ -png_crc_error(png_structrp png_ptr) -{ - png_byte crc_bytes[4]; - png_uint_32 crc; - 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; - } - -#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 ((int)(crc != png_ptr->crc)); - } - - else - return (0); -} - -#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_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 (via png_malloc) on failure. (warn == 2 means - * 'silent'). - */ -static png_bytep -png_read_buffer(png_structrp png_ptr, png_alloc_size_t new_size, int warn) -{ - png_bytep buffer = png_ptr->read_buffer; - - if (buffer != NULL && new_size > png_ptr->read_buffer_size) - { - png_ptr->read_buffer = NULL; - 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) - { - memset(buffer, 0, new_size); /* just in case */ - png_ptr->read_buffer = buffer; - png_ptr->read_buffer_size = new_size; - } - - else if (warn < 2) /* else silent */ - { - if (warn != 0) - png_chunk_warning(png_ptr, "insufficient memory to read chunk"); - - else - png_chunk_error(png_ptr, "insufficient memory to read chunk"); - } - } - - return buffer; -} -#endif /* READ_iCCP|iTXt|pCAL|sCAL|sPLT|tEXt|zTXt|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; - } - -#if ZLIB_VERNUM >= 0x1290 && \ - defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32) - 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_SIZE_MAX; - -# ifdef PNG_SET_USER_LIMITS_SUPPORTED - if (png_ptr->user_chunk_malloc_max > 0 && - png_ptr->user_chunk_malloc_max < limit) - limit = png_ptr->user_chunk_malloc_max; -# elif PNG_USER_CHUNK_MALLOC_MAX > 0 - if (PNG_USER_CHUNK_MALLOC_MAX < limit) - limit = PNG_USER_CHUNK_MALLOC_MAX; -# endif - - 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 */ - -/* Read and check the IDHR chunk */ - -void /* PRIVATE */ -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"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) != 0) - png_chunk_error(png_ptr, "out of place"); - - /* Check the length */ - if (length != 13) - png_chunk_error(png_ptr, "invalid"); - - 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); - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, - color_type, interlace_type, compression_type, filter_type); -} - -/* Read and check the palette */ -void /* PRIVATE */ -png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) -{ - png_color palette[PNG_MAX_PALETTE_LENGTH]; - int max_palette_length, num, i; -#ifdef PNG_POINTER_INDEXING_SUPPORTED - png_colorp pal_ptr; -#endif - - png_debug(1, "in png_handle_PLTE"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - /* Moved to before the 'after IDAT' check below because otherwise duplicate - * PLTE chunks are potentially ignored (the spec says there shall not be more - * than one PLTE, the error is not treated as benign, so this check trumps - * the requirement that PLTE appears before IDAT.) - */ - else if ((png_ptr->mode & PNG_HAVE_PLTE) != 0) - png_chunk_error(png_ptr, "duplicate"); - - else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) - { - /* This is benign because the non-benign error happened before, when an - * IDAT was encountered in a color-mapped image with no PLTE. - */ - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - png_ptr->mode |= PNG_HAVE_PLTE; - - if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) == 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "ignored in grayscale PNG"); - return; - } - -#ifndef PNG_READ_OPT_PLTE_SUPPORTED - if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) - { - png_crc_finish(png_ptr, length); - return; - } -#endif - - if (length > 3*PNG_MAX_PALETTE_LENGTH || length % 3) - { - png_crc_finish(png_ptr, length); - - if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) - png_chunk_benign_error(png_ptr, "invalid"); - - else - png_chunk_error(png_ptr, "invalid"); - - return; - } - - /* The cast is safe because 'length' is less than 3*PNG_MAX_PALETTE_LENGTH */ - num = (int)length / 3; - - /* 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. - */ - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - max_palette_length = (1 << png_ptr->bit_depth); - else - max_palette_length = PNG_MAX_PALETTE_LENGTH; - - if (num > max_palette_length) - num = max_palette_length; - -#ifdef PNG_POINTER_INDEXING_SUPPORTED - for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++) - { - png_byte buf[3]; - - png_crc_read(png_ptr, buf, 3); - pal_ptr->red = buf[0]; - pal_ptr->green = buf[1]; - pal_ptr->blue = buf[2]; - } -#else - for (i = 0; i < num; i++) - { - png_byte buf[3]; - - png_crc_read(png_ptr, buf, 3); - /* Don't depend upon png_color being any order */ - palette[i].red = buf[0]; - palette[i].green = buf[1]; - palette[i].blue = buf[2]; - } -#endif - - /* If we actually need the PLTE chunk (ie for a paletted image), we do - * whatever the normal CRC configuration tells us. However, if we - * have an RGB image, the PLTE can be considered ancillary, so - * we will act as though it is. - */ -#ifndef PNG_READ_OPT_PLTE_SUPPORTED - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) -#endif - { - png_crc_finish(png_ptr, (png_uint_32) (length - (unsigned int)num * 3)); - } - -#ifndef PNG_READ_OPT_PLTE_SUPPORTED - else if (png_crc_error(png_ptr) != 0) /* Only if we have a CRC error */ - { - /* If we don't want to use the data from an ancillary chunk, - * we have two options: an error abort, or a warning and we - * ignore the data in this chunk (which should be OK, since - * it's considered ancillary for a RGB or RGBA image). - * - * IMPLEMENTATION NOTE: this is only here because png_crc_finish uses the - * chunk type to determine whether to check the ancillary or the critical - * flags. - */ - if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_USE) == 0) - { - if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) != 0) - return; - - else - png_chunk_error(png_ptr, "CRC error"); - } - - /* Otherwise, we (optionally) emit a warning and use the chunk. */ - else if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) == 0) - png_chunk_warning(png_ptr, "CRC error"); - } -#endif - - /* 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. - * - * Fix this by not sharing the palette in this way. - */ - png_set_PLTE(png_ptr, info_ptr, palette, num); - - /* The three chunks, bKGD, hIST and tRNS *must* appear after PLTE and before - * IDAT. Prior to 1.6.0 this was not checked; instead the code merely - * checked the apparent validity of a tRNS chunk inserted before PLTE on a - * palette PNG. 1.6.0 attempts to rigorously follow the standard and - * therefore does a benign error if the erroneous condition is detected *and* - * cancels the tRNS if the benign error returns. The alternative is to - * amend the standard since it would be rather hypocritical of the standards - * maintainers to ignore it. - */ -#ifdef PNG_READ_tRNS_SUPPORTED - if (png_ptr->num_trans > 0 || - (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS) != 0)) - { - /* Cancel this because otherwise it would be used if the transforms - * require it. Don't cancel the 'valid' flag because this would prevent - * detection of duplicate chunks. - */ - png_ptr->num_trans = 0; - - if (info_ptr != NULL) - info_ptr->num_trans = 0; - - png_chunk_benign_error(png_ptr, "tRNS must be after"); - } -#endif - -#ifdef PNG_READ_hIST_SUPPORTED - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST) != 0) - png_chunk_benign_error(png_ptr, "hIST must be after"); -#endif - -#ifdef PNG_READ_bKGD_SUPPORTED - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD) != 0) - png_chunk_benign_error(png_ptr, "bKGD must be after"); -#endif -} - -void /* PRIVATE */ -png_handle_IEND(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) -{ - png_debug(1, "in png_handle_IEND"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0 || - (png_ptr->mode & PNG_HAVE_IDAT) == 0) - png_chunk_error(png_ptr, "out of place"); - - png_ptr->mode |= (PNG_AFTER_IDAT | PNG_HAVE_IEND); - - png_crc_finish(png_ptr, length); - - if (length != 0) - png_chunk_benign_error(png_ptr, "invalid"); - - PNG_UNUSED(info_ptr) -} - -#ifdef PNG_READ_gAMA_SUPPORTED -void /* PRIVATE */ -png_handle_gAMA(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) -{ - png_fixed_point igamma; - png_byte buf[4]; - - png_debug(1, "in png_handle_gAMA"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & (PNG_HAVE_IDAT|PNG_HAVE_PLTE)) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - if (length != 4) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "invalid"); - return; - } - - png_crc_read(png_ptr, buf, 4); - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - igamma = png_get_fixed_point(NULL, buf); - - png_colorspace_set_gamma(png_ptr, &png_ptr->colorspace, igamma); - png_colorspace_sync(png_ptr, info_ptr); -} -#endif - -#ifdef PNG_READ_sBIT_SUPPORTED -void /* 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->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & (PNG_HAVE_IDAT|PNG_HAVE_PLTE)) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "duplicate"); - return; - } - - 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 || length > 4) - { - png_chunk_benign_error(png_ptr, "invalid"); - png_crc_finish(png_ptr, length); - return; - } - - 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; - - for (i=0; i sample_depth) - { - png_chunk_benign_error(png_ptr, "invalid"); - return; - } - } - - 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 - { - 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)); -} -#endif - -#ifdef PNG_READ_cHRM_SUPPORTED -void /* PRIVATE */ -png_handle_cHRM(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) -{ - png_byte buf[32]; - png_xy xy; - - png_debug(1, "in png_handle_cHRM"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & (PNG_HAVE_IDAT|PNG_HAVE_PLTE)) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - if (length != 32) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "invalid"); - return; - } - - png_crc_read(png_ptr, buf, 32); - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - xy.whitex = png_get_fixed_point(NULL, buf); - xy.whitey = png_get_fixed_point(NULL, buf + 4); - xy.redx = png_get_fixed_point(NULL, buf + 8); - xy.redy = png_get_fixed_point(NULL, buf + 12); - xy.greenx = png_get_fixed_point(NULL, buf + 16); - xy.greeny = png_get_fixed_point(NULL, buf + 20); - xy.bluex = png_get_fixed_point(NULL, buf + 24); - xy.bluey = png_get_fixed_point(NULL, buf + 28); - - if (xy.whitex == PNG_FIXED_ERROR || - xy.whitey == PNG_FIXED_ERROR || - xy.redx == PNG_FIXED_ERROR || - xy.redy == PNG_FIXED_ERROR || - xy.greenx == PNG_FIXED_ERROR || - xy.greeny == PNG_FIXED_ERROR || - xy.bluex == PNG_FIXED_ERROR || - xy.bluey == PNG_FIXED_ERROR) - { - png_chunk_benign_error(png_ptr, "invalid values"); - return; - } - - /* If a colorspace error has already been output skip this chunk */ - if ((png_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) != 0) - return; - - if ((png_ptr->colorspace.flags & PNG_COLORSPACE_FROM_cHRM) != 0) - { - png_ptr->colorspace.flags |= PNG_COLORSPACE_INVALID; - png_colorspace_sync(png_ptr, info_ptr); - png_chunk_benign_error(png_ptr, "duplicate"); - return; - } - - png_ptr->colorspace.flags |= PNG_COLORSPACE_FROM_cHRM; - (void)png_colorspace_set_chromaticities(png_ptr, &png_ptr->colorspace, &xy, - 1/*prefer cHRM values*/); - png_colorspace_sync(png_ptr, info_ptr); -} -#endif - -#ifdef PNG_READ_sRGB_SUPPORTED -void /* 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"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & (PNG_HAVE_IDAT|PNG_HAVE_PLTE)) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - if (length != 1) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "invalid"); - return; - } - - png_crc_read(png_ptr, &intent, 1); - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - /* If a colorspace error has already been output skip this chunk */ - if ((png_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) != 0) - return; - - /* Only one sRGB or iCCP chunk is allowed, use the HAVE_INTENT flag to detect - * this. - */ - if ((png_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_INTENT) != 0) - { - png_ptr->colorspace.flags |= PNG_COLORSPACE_INVALID; - png_colorspace_sync(png_ptr, info_ptr); - png_chunk_benign_error(png_ptr, "too many profiles"); - return; - } - - (void)png_colorspace_set_sRGB(png_ptr, &png_ptr->colorspace, intent); - png_colorspace_sync(png_ptr, info_ptr); -} -#endif /* READ_sRGB */ - -#ifdef PNG_READ_iCCP_SUPPORTED -void /* 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"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & (PNG_HAVE_IDAT|PNG_HAVE_PLTE)) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - /* Consistent with all the above colorspace handling an obviously *invalid* - * chunk is just ignored, so does not invalidate the color space. An - * alternative is to set the 'invalid' flags at the start of this routine - * and only clear them in they were not set before and all the tests pass. - */ - - /* The keyword must be at least one character and there is a - * terminator (0) byte and the compression method byte, and the - * 'zlib' datastream is at least 11 bytes. - */ - if (length < 14) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "too short"); - return; - } - - /* If a colorspace error has already been output skip this chunk */ - if ((png_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) != 0) - { - png_crc_finish(png_ptr, length); - return; - } - - /* Only one sRGB or iCCP chunk is allowed, use the HAVE_INTENT flag to detect - * this. - */ - if ((png_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_INTENT) == 0) - { - 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)length; - - png_crc_read(png_ptr, (png_bytep)keyword, read_length); - length -= read_length; - - /* The minimum 'zlib' stream is assumed to be just the 2 byte header, - * 5 bytes minimum 'deflate' stream, and the 4 byte checksum. - */ - if (length < 11) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "too short"); - return; - } - - 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. - */ - const png_uint_32 profile_length = - png_get_uint_32(profile_header); - - if (png_icc_check_length(png_ptr, &png_ptr->colorspace, - keyword, profile_length) != 0) - { - /* The length is apparently ok, so we can check the 132 - * byte header. - */ - if (png_icc_check_header(png_ptr, &png_ptr->colorspace, - 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. - */ - const png_uint_32 tag_count = png_get_uint_32( - profile_header+128); - png_bytep profile = png_read_buffer(png_ptr, - profile_length, 2/*silent*/); - - 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, - &png_ptr->colorspace, 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; - -# if defined(PNG_sRGB_SUPPORTED) && PNG_sRGB_PROFILE_CHECKS >= 0 - /* Check for a match against sRGB */ - png_icc_set_sRGB(png_ptr, - &png_ptr->colorspace, profile, - png_ptr->zstream.adler); -# endif - - /* 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 - { - png_ptr->colorspace.flags |= - PNG_COLORSPACE_INVALID; - errmsg = "out of memory"; - } - } - - /* else the profile remains in the read - * buffer which gets reused for subsequent - * chunks. - */ - - if (info_ptr != NULL) - png_colorspace_sync(png_ptr, info_ptr); - - if (errmsg == NULL) - { - png_ptr->zowner = 0; - return; - } - } - 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"; - } - - else - errmsg = "too many profiles"; - - /* Failure: the reason is in 'errmsg' */ - if (finished == 0) - png_crc_finish(png_ptr, length); - - png_ptr->colorspace.flags |= PNG_COLORSPACE_INVALID; - png_colorspace_sync(png_ptr, info_ptr); - if (errmsg != NULL) /* else already output */ - png_chunk_benign_error(png_ptr, errmsg); -} -#endif /* READ_iCCP */ - -#ifdef PNG_READ_sPLT_SUPPORTED -void /* 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; - } - - 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; - } - } -#endif - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - -#ifdef PNG_MAX_MALLOC_64K - if (length > 65535U) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "too large to fit in memory"); - return; - } -#endif - - buffer = png_read_buffer(png_ptr, length+1, 2/*silent*/); - if (buffer == NULL) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of memory"); - return; - } - - - /* 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; - - 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; - } - - 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; - } - - 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; - } - - 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; - } - -#ifdef PNG_POINTER_INDEXING_SUPPORTED - 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; - } -#else - pp = new_palette.entries; - - for (i = 0; i < new_palette.nentries; i++) - { - - if (new_palette.depth == 8) - { - pp[i].red = *entry_start++; - pp[i].green = *entry_start++; - pp[i].blue = *entry_start++; - pp[i].alpha = *entry_start++; - } - - else - { - pp[i].red = png_get_uint_16(entry_start); entry_start += 2; - pp[i].green = png_get_uint_16(entry_start); entry_start += 2; - pp[i].blue = png_get_uint_16(entry_start); entry_start += 2; - pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2; - } - - pp[i].frequency = png_get_uint_16(entry_start); entry_start += 2; - } -#endif - - /* 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); -} -#endif /* READ_sPLT */ - -#ifdef PNG_READ_tRNS_SUPPORTED -void /* 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->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "duplicate"); - return; - } - - 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; - } - - 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; - } - - 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) - { - /* TODO: is this actually an error in the ISO spec? */ - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - 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; - } - - 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; - } - - if (png_crc_finish(png_ptr, 0) != 0) - { - png_ptr->num_trans = 0; - return; - } - - /* 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)); -} -#endif - -#ifdef PNG_READ_bKGD_SUPPORTED -void /* 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->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0 || - (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - (png_ptr->mode & PNG_HAVE_PLTE) == 0)) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "duplicate"); - return; - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - 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; - } - - png_crc_read(png_ptr, buf, truelen); - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - /* 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; - } - - 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; - } - } - - 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; - } - } - - 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); -} -#endif - -#ifdef PNG_READ_eXIf_SUPPORTED -void /* PRIVATE */ -png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) -{ - unsigned int i; - - png_debug(1, "in png_handle_eXIf"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - if (length < 2) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "too short"); - return; - } - - else if (info_ptr == NULL || (info_ptr->valid & PNG_INFO_eXIf) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "duplicate"); - return; - } - - info_ptr->free_me |= PNG_FREE_EXIF; - - info_ptr->eXIf_buf = png_voidcast(png_bytep, - png_malloc_warn(png_ptr, length)); - - if (info_ptr->eXIf_buf == NULL) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of memory"); - return; - } - - for (i = 0; i < length; i++) - { - png_byte buf[1]; - png_crc_read(png_ptr, buf, 1); - info_ptr->eXIf_buf[i] = buf[0]; - if (i == 1 && buf[0] != 'M' && buf[0] != 'I' - && info_ptr->eXIf_buf[0] != buf[0]) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "incorrect byte-order specifier"); - png_free(png_ptr, info_ptr->eXIf_buf); - info_ptr->eXIf_buf = NULL; - return; - } - } - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf); - - png_free(png_ptr, info_ptr->eXIf_buf); - info_ptr->eXIf_buf = NULL; -} -#endif - -#ifdef PNG_READ_hIST_SUPPORTED -void /* 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"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0 || - (png_ptr->mode & PNG_HAVE_PLTE) == 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "duplicate"); - return; - } - - num = length / 2 ; - - if (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; - } - - 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; - - png_set_hIST(png_ptr, info_ptr, readbuf); -} -#endif - -#ifdef PNG_READ_pHYs_SUPPORTED -void /* 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"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "duplicate"); - return; - } - - if (length != 9) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "invalid"); - return; - } - - png_crc_read(png_ptr, buf, 9); - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - 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); -} -#endif - -#ifdef PNG_READ_oFFs_SUPPORTED -void /* 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"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "duplicate"); - return; - } - - if (length != 9) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "invalid"); - return; - } - - png_crc_read(png_ptr, buf, 9); - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - 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); -} -#endif - -#ifdef PNG_READ_pCAL_SUPPORTED -/* Read the pCAL chunk (described in the PNG Extensions document) */ -void /* 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"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "duplicate"); - return; - } - - png_debug1(2, "Allocating and reading pCAL chunk data (%u bytes)", - length + 1); - - buffer = png_read_buffer(png_ptr, length+1, 2/*silent*/); - - if (buffer == NULL) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of memory"); - return; - } - - png_crc_read(png_ptr, buffer, length); - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - 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; - } - - 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; - } - - 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; - } - - /* 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; - } - } - - png_set_pCAL(png_ptr, info_ptr, (png_charp)buffer, X0, X1, type, nparams, - (png_charp)units, params); - - png_free(png_ptr, params); -} -#endif - -#ifdef PNG_READ_sCAL_SUPPORTED -/* Read the sCAL chunk */ -void /* 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"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of place"); - return; - } - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sCAL) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "duplicate"); - return; - } - - /* Need unit type, width, \0, height: minimum 4 bytes */ - else if (length < 4) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "invalid"); - return; - } - - png_debug1(2, "Allocating and reading sCAL chunk data (%u bytes)", - length + 1); - - buffer = png_read_buffer(png_ptr, length+1, 2/*silent*/); - - if (buffer == NULL) - { - png_chunk_benign_error(png_ptr, "out of memory"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buffer, length); - buffer[length] = 0; /* Null terminate the last string */ - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - /* Validate the unit. */ - if (buffer[0] != 1 && buffer[0] != 2) - { - png_chunk_benign_error(png_ptr, "invalid unit"); - return; - } - - /* 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); - } -} -#endif - -#ifdef PNG_READ_tIME_SUPPORTED -void /* 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"); - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME) != 0) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "duplicate"); - return; - } - - if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) - png_ptr->mode |= PNG_AFTER_IDAT; - - if (length != 7) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "invalid"); - return; - } - - png_crc_read(png_ptr, buf, 7); - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - 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); -} -#endif - -#ifdef PNG_READ_tEXt_SUPPORTED -/* Note: this does not properly handle chunks that are > 64K under DOS */ -void /* 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; - } - - 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; - } - } -#endif - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) - png_ptr->mode |= PNG_AFTER_IDAT; - -#ifdef PNG_MAX_MALLOC_64K - if (length > 65535U) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "too large to fit in memory"); - return; - } -#endif - - buffer = png_read_buffer(png_ptr, length+1, 1/*warn*/); - - if (buffer == NULL) - { - png_chunk_benign_error(png_ptr, "out of memory"); - return; - } - - png_crc_read(png_ptr, buffer, length); - - if (png_crc_finish(png_ptr, skip) != 0) - return; - - 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) - png_warning(png_ptr, "Insufficient memory to process text chunk"); -} -#endif - -#ifdef PNG_READ_zTXt_SUPPORTED -/* Note: this does not correctly handle chunks that are > 64K under DOS */ -void /* 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; - } - - 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; - } - } -#endif - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) - png_ptr->mode |= PNG_AFTER_IDAT; - - /* Note, "length" is sufficient here; we won't be adding - * a null terminator later. - */ - buffer = png_read_buffer(png_ptr, length, 2/*silent*/); - - if (buffer == NULL) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of memory"); - return; - } - - png_crc_read(png_ptr, buffer, length); - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - /* 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) - errmsg = "insufficient memory"; - } - } - - else - errmsg = png_ptr->zstream.msg; - } - - if (errmsg != NULL) - png_chunk_benign_error(png_ptr, errmsg); -} -#endif - -#ifdef PNG_READ_iTXt_SUPPORTED -/* Note: this does not correctly handle chunks that are > 64K under DOS */ -void /* 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; - } - - 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; - } - } -#endif - - if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) - png_chunk_error(png_ptr, "missing IHDR"); - - if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) - png_ptr->mode |= PNG_AFTER_IDAT; - - buffer = png_read_buffer(png_ptr, length+1, 1/*warn*/); - - if (buffer == NULL) - { - png_crc_finish(png_ptr, length); - png_chunk_benign_error(png_ptr, "out of memory"); - return; - } - - png_crc_read(png_ptr, buffer, length); - - if (png_crc_finish(png_ptr, 0) != 0) - return; - - /* 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) - errmsg = "insufficient memory"; - } - } - - else - errmsg = "bad compression info"; - - if (errmsg != NULL) - png_chunk_benign_error(png_ptr, errmsg); -} -#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) -{ - png_alloc_size_t limit = PNG_SIZE_MAX; - - if (png_ptr->unknown_chunk.data != NULL) - { - png_free(png_ptr, png_ptr->unknown_chunk.data); - png_ptr->unknown_chunk.data = NULL; - } - -# ifdef PNG_SET_USER_LIMITS_SUPPORTED - if (png_ptr->user_chunk_malloc_max > 0 && - png_ptr->user_chunk_malloc_max < limit) - limit = png_ptr->user_chunk_malloc_max; - -# elif PNG_USER_CHUNK_MALLOC_MAX > 0 - if (PNG_USER_CHUNK_MALLOC_MAX < limit) - limit = PNG_USER_CHUNK_MALLOC_MAX; -# endif - - 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 */ -void /* PRIVATE */ -png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr, - png_uint_32 length, int keep) -{ - int handled = 0; /* the chunk was handled */ - - 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) - 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 = 1; - /* 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 = 1; -# 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 == 0 && PNG_CHUNK_CRITICAL(png_ptr->chunk_name)) - png_chunk_error(png_ptr, "unhandled critical chunk"); -} - -/* This function is called to verify that a chunk name is valid. - * This function can't have the "critical chunk check" incorporated - * into it, since in the future we will need to be able to call user - * functions to handle unknown critical chunks after we check that - * the chunk name itself is valid. - */ - -/* Bit hacking: the test for an invalid byte in the 4 byte chunk name is: - * - * ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97)) - */ - -void /* PRIVATE */ -png_check_chunk_name(png_const_structrp png_ptr, const png_uint_32 chunk_name) -{ - int i; - png_uint_32 cn=chunk_name; - - png_debug(1, "in png_check_chunk_name"); - - for (i=1; i<=4; ++i) - { - int c = cn & 0xff; - - if (c < 65 || c > 122 || (c > 90 && c < 97)) - png_chunk_error(png_ptr, "invalid chunk type"); - - cn >>= 8; - } -} - -void /* PRIVATE */ -png_check_chunk_length(png_const_structrp png_ptr, const png_uint_32 length) -{ - png_alloc_size_t limit = PNG_UINT_31_MAX; - -# ifdef PNG_SET_USER_LIMITS_SUPPORTED - if (png_ptr->user_chunk_malloc_max > 0 && - png_ptr->user_chunk_malloc_max < limit) - limit = png_ptr->user_chunk_malloc_max; -# elif PNG_USER_CHUNK_MALLOC_MAX > 0 - if (PNG_USER_CHUNK_MALLOC_MAX < limit) - limit = PNG_USER_CHUNK_MALLOC_MAX; -# endif - if (png_ptr->chunk_name == png_IDAT) - { - png_alloc_size_t idat_limit = PNG_UINT_31_MAX; - size_t row_factor = - (size_t)png_ptr->width - * (size_t)png_ptr->channels - * (png_ptr->bit_depth > 8? 2: 1) - + 1 - + (png_ptr->interlaced? 6: 0); - if (png_ptr->height > PNG_UINT_32_MAX/row_factor) - idat_limit = PNG_UINT_31_MAX; - else - idat_limit = png_ptr->height * row_factor; - row_factor = row_factor > 32566? 32566 : row_factor; - idat_limit += 6 + 5*(idat_limit/row_factor+1); /* zlib+deflate overhead */ - idat_limit=idat_limit < PNG_UINT_31_MAX? idat_limit : PNG_UINT_31_MAX; - limit = limit < idat_limit? idat_limit : limit; - } - - if (length > limit) - { - png_debug2(0," length = %lu, limit = %lu", - (unsigned long)length,(unsigned long)limit); - png_chunk_error(png_ptr, "chunk data is too large"); - } -} - -/* 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 PNG_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 PNG_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 */) -{ - /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - /* Offset to next interlace block */ - static PNG_CONST unsigned int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; - - 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_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. - */ - buffer = png_read_buffer(png_ptr, avail_in, 0/*error*/); - - 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) -{ - /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* Start of interlace block */ - static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; - - /* Offset to next interlace block */ - static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; - - /* Start of interlace block in the y direction */ - static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; - - /* Offset to next interlace block in the y direction */ - static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; - - 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) -{ - /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* Start of interlace block */ - static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; - - /* Offset to next interlace block */ - static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; - - /* Start of interlace block in the y direction */ - static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; - - /* Offset to next interlace block in the y direction */ - static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; - - 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; - int extra = (int)((temp - (png_bytep)0) & 0x0f); - png_ptr->row_buf = temp - extra - 1/*filter byte*/; - - temp = png_ptr->big_prev_row + 32; - extra = (int)((temp - (png_bytep)0) & 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/Dependencies/FreeImage/Source/LibPNG/pngset.c b/Dependencies/FreeImage/Source/LibPNG/pngset.c deleted file mode 100644 index b7966d7..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngset.c +++ /dev/null @@ -1,1802 +0,0 @@ - -/* pngset.c - storage of image information into info struct - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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_xy xy; - - png_debug1(1, "in %s storage function", "cHRM fixed"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - xy.redx = red_x; - xy.redy = red_y; - xy.greenx = green_x; - xy.greeny = green_y; - xy.bluex = blue_x; - xy.bluey = blue_y; - xy.whitex = white_x; - xy.whitey = white_y; - - if (png_colorspace_set_chromaticities(png_ptr, &info_ptr->colorspace, &xy, - 2/* override with app values*/) != 0) - info_ptr->colorspace.flags |= PNG_COLORSPACE_FROM_cHRM; - - png_colorspace_sync_info(png_ptr, info_ptr); -} - -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_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_colorspace_set_endpoints(png_ptr, &info_ptr->colorspace, - &XYZ, 2) != 0) - info_ptr->colorspace.flags |= PNG_COLORSPACE_FROM_cHRM; - - png_colorspace_sync_info(png_ptr, info_ptr); -} - -# 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_eXIf_SUPPORTED -void PNGAPI -png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, - const png_bytep eXIf_buf) -{ - png_warning(png_ptr, "png_set_eXIf does not work; use png_set_eXIf_1"); - PNG_UNUSED(info_ptr) - PNG_UNUSED(eXIf_buf) -} - -void PNGAPI -png_set_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr, - const png_uint_32 num_exif, const png_bytep eXIf_buf) -{ - int i; - - png_debug1(1, "in %s storage function", "eXIf"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - if (info_ptr->exif) - { - png_free(png_ptr, info_ptr->exif); - info_ptr->exif = NULL; - } - - info_ptr->num_exif = num_exif; - - info_ptr->exif = png_voidcast(png_bytep, png_malloc_warn(png_ptr, - info_ptr->num_exif)); - - if (info_ptr->exif == NULL) - { - png_warning(png_ptr, "Insufficient memory for eXIf chunk data"); - return; - } - - info_ptr->free_me |= PNG_FREE_EXIF; - - for (i = 0; i < (int) info_ptr->num_exif; i++) - info_ptr->exif[i] = eXIf_buf[i]; - - 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; - - png_colorspace_set_gamma(png_ptr, &info_ptr->colorspace, file_gamma); - png_colorspace_sync_info(png_ptr, info_ptr); -} - -# 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; - } - - info_ptr->free_me |= PNG_FREE_HIST; - - for (i = 0; i < info_ptr->num_palette; i++) - info_ptr->hist[i] = hist[i]; - - 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); - - 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; - info_ptr->free_me |= PNG_FREE_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->valid |= PNG_INFO_sCAL; - info_ptr->free_me |= PNG_FREE_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; - - (void)png_colorspace_set_sRGB(png_ptr, &info_ptr->colorspace, srgb_intent); - png_colorspace_sync_info(png_ptr, info_ptr); -} - -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; - - if (png_colorspace_set_sRGB(png_ptr, &info_ptr->colorspace, - srgb_intent) != 0) - { - /* This causes the gAMA and cHRM to be written too */ - info_ptr->colorspace.flags |= - PNG_COLORSPACE_FROM_gAMA|PNG_COLORSPACE_FROM_cHRM; - } - - png_colorspace_sync_info(png_ptr, info_ptr); -} -#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"); - - /* Set the colorspace first because this validates the profile; do not - * override previously set app cHRM or gAMA here (because likely as not the - * application knows better than libpng what the correct values are.) Pass - * the info_ptr color_type field to png_colorspace_set_ICC because in the - * write case it has not yet been stored in png_ptr. - */ - { - int result = png_colorspace_set_ICC(png_ptr, &info_ptr->colorspace, name, - proflen, profile, info_ptr->color_type); - - png_colorspace_sync_info(png_ptr, info_ptr); - - /* Don't do any of the copying if the profile was bad, or inconsistent. */ - if (result == 0) - return; - - /* But do write the gAMA and cHRM chunks from the profile. */ - info_ptr->colorspace.flags |= - PNG_COLORSPACE_FROM_gAMA|PNG_COLORSPACE_FROM_cHRM; - } - - 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 %lx storage function", png_ptr == NULL ? 0xabadca11U : - (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); - } - 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->valid |= PNG_INFO_tRNS; - info_ptr->free_me |= PNG_FREE_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; - - 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 PNG_CONST png_byte chunks_to_ignore[] = { - 98, 75, 71, 68, '\0', /* bKGD */ - 99, 72, 82, 77, '\0', /* cHRM */ - 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 */ - 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_debug1(1, "in %s storage function", "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) -{ - 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) -{ - /* 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) -{ - 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) -{ - if (png_ptr != NULL) - 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/Dependencies/FreeImage/Source/LibPNG/pngstruct.h b/Dependencies/FreeImage/Source/LibPNG/pngstruct.h deleted file mode 100644 index 669eeab..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngstruct.h +++ /dev/null @@ -1,483 +0,0 @@ - -/* pngstruct.h - header file for PNG reference library - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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 structure that holds the information to read and write PNG files. - * The only people who need to care about what is inside of this are the - * people who will be modifying the library for their own special needs. - * It should NOT be accessed directly by an application. - */ - -#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. - * - * PNG_COLORSPACE_SUPPORTED is only required if the application will perform - * colorspace corrections, otherwise all the colorspace information can be - * skipped and the size of libpng can be reduced (significantly) by compiling - * out the colorspace support. - */ -#ifdef PNG_COLORSPACE_SUPPORTED -/* 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; -#endif /* COLORSPACE */ - -#if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED) -/* A colorspace is all the above plus, potentially, profile information; - * however at present libpng does not use the profile internally so it is only - * stored in the png_info struct (if iCCP is supported.) The rendering intent - * is retained here and is checked. - * - * The file gamma encoding information is also stored here and gamma correction - * is done by libpng, whereas color correction must currently be done by the - * application. - */ -typedef struct png_colorspace -{ -#ifdef PNG_GAMMA_SUPPORTED - png_fixed_point gamma; /* File gamma */ -#endif - -#ifdef PNG_COLORSPACE_SUPPORTED - png_xy end_points_xy; /* End points as chromaticities */ - png_XYZ end_points_XYZ; /* End points as CIE XYZ colorant values */ - png_uint_16 rendering_intent; /* Rendering intent of a profile */ -#endif - - /* Flags are always defined to simplify the code. */ - png_uint_16 flags; /* As defined below */ -} png_colorspace, * PNG_RESTRICT png_colorspacerp; - -typedef const png_colorspace * PNG_RESTRICT png_const_colorspacerp; - -/* General flags for the 'flags' field */ -#define PNG_COLORSPACE_HAVE_GAMMA 0x0001 -#define PNG_COLORSPACE_HAVE_ENDPOINTS 0x0002 -#define PNG_COLORSPACE_HAVE_INTENT 0x0004 -#define PNG_COLORSPACE_FROM_gAMA 0x0008 -#define PNG_COLORSPACE_FROM_cHRM 0x0010 -#define PNG_COLORSPACE_FROM_sRGB 0x0020 -#define PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB 0x0040 -#define PNG_COLORSPACE_MATCHES_sRGB 0x0080 /* exact match on profile */ -#define PNG_COLORSPACE_INVALID 0x8000 -#define PNG_COLORSPACE_CANCEL(flags) (0xffff ^ (flags)) -#endif /* COLORSPACE || GAMMA */ - -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 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_GAMMA_SUPPORTED - int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */ - png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */ - - 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 - -#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 */ - -#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -/* For the Borland special 64K segment handler */ - png_bytepp offset_table_ptr; - png_bytep offset_table; - png_uint_16 offset_table_number; - png_uint_16 offset_table_count; - png_uint_16 offset_table_count_free; -#endif - -#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 -#endif - -/* 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 -#endif - -#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.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); - -#ifdef PNG_READ_SUPPORTED -#if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED) - png_colorspace colorspace; -#endif -#endif -}; -#endif /* PNGSTRUCT_H */ diff --git a/Dependencies/FreeImage/Source/LibPNG/pngtest.c b/Dependencies/FreeImage/Source/LibPNG/pngtest.c deleted file mode 100644 index 076549e..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngtest.c +++ /dev/null @@ -1,2156 +0,0 @@ - -/* pngtest.c - a simple test program to test libpng - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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 program reads in a PNG image, writes it out again, and then - * compares the two files. If the files are identical, this shows that - * the basic chunk handling, filtering, and (de)compression code is working - * properly. It does not currently test all of the transforms, although - * it probably should. - * - * The program will report "FAIL" in certain legitimate cases: - * 1) when the compression level or filter selection method is changed. - * 2) when the maximum IDAT size (PNG_ZBUF_SIZE in pngconf.h) is not 8192. - * 3) unknown unsafe-to-copy ancillary chunks or unknown critical chunks - * exist in the input file. - * 4) others not listed here... - * In these cases, it is best to check with another tool such as "pngcheck" - * to see what the differences between the two files are. - * - * If a filename is given on the command-line, then this file is used - * for the input, rather than the default "pngtest.png". This allows - * testing a wide variety of files easily. You can also test a number - * of files at once by typing "pngtest -m file1.png file2.png ..." - */ - -#define _POSIX_SOURCE 1 - -#include -#include -#include - -/* Defined so I can write to a file on gui/windowing platforms */ -/* #define STDERR stderr */ -#define STDERR stdout /* For DOS */ - -#include "png.h" - -/* Known chunks that exist in pngtest.png must be supported or pngtest will fail - * simply as a result of re-ordering them. This may be fixed in 1.7 - * - * pngtest allocates a single row buffer for each row and overwrites it, - * therefore if the write side doesn't support the writing of interlaced images - * nothing can be done for an interlaced image (and the code below will fail - * horribly trying to write extra data after writing garbage). - */ -#if defined PNG_READ_SUPPORTED && /* else nothing can be done */\ - defined PNG_READ_bKGD_SUPPORTED &&\ - defined PNG_READ_cHRM_SUPPORTED &&\ - defined PNG_READ_gAMA_SUPPORTED &&\ - defined PNG_READ_oFFs_SUPPORTED &&\ - defined PNG_READ_pCAL_SUPPORTED &&\ - defined PNG_READ_pHYs_SUPPORTED &&\ - defined PNG_READ_sBIT_SUPPORTED &&\ - defined PNG_READ_sCAL_SUPPORTED &&\ - defined PNG_READ_sRGB_SUPPORTED &&\ - defined PNG_READ_sPLT_SUPPORTED &&\ - defined PNG_READ_tEXt_SUPPORTED &&\ - defined PNG_READ_tIME_SUPPORTED &&\ - defined PNG_READ_zTXt_SUPPORTED &&\ - (defined PNG_WRITE_INTERLACING_SUPPORTED || PNG_LIBPNG_VER >= 10700) - -#ifdef PNG_ZLIB_HEADER -# include PNG_ZLIB_HEADER /* defined by pnglibconf.h from 1.7 */ -#else -# include "zlib.h" -#endif - -/* Copied from pngpriv.h but only used in error messages below. */ -#ifndef PNG_ZBUF_SIZE -# define PNG_ZBUF_SIZE 8192 -#endif -#define FCLOSE(file) fclose(file) - -#ifndef PNG_STDIO_SUPPORTED -typedef FILE * png_FILE_p; -#endif - -/* Makes pngtest verbose so we can find problems. */ -#ifndef PNG_DEBUG -# define PNG_DEBUG 0 -#endif - -#if PNG_DEBUG > 1 -# define pngtest_debug(m) ((void)fprintf(stderr, m "\n")) -# define pngtest_debug1(m,p1) ((void)fprintf(stderr, m "\n", p1)) -# define pngtest_debug2(m,p1,p2) ((void)fprintf(stderr, m "\n", p1, p2)) -#else -# define pngtest_debug(m) ((void)0) -# define pngtest_debug1(m,p1) ((void)0) -# define pngtest_debug2(m,p1,p2) ((void)0) -#endif - -#if !PNG_DEBUG -# define SINGLE_ROWBUF_ALLOC /* Makes buffer overruns easier to nail */ -#endif - -#ifndef PNG_UNUSED -# define PNG_UNUSED(param) (void)param; -#endif - -/* Turn on CPU timing -#define PNGTEST_TIMING -*/ - -#ifndef PNG_FLOATING_POINT_SUPPORTED -#undef PNGTEST_TIMING -#endif - -#ifdef PNGTEST_TIMING -static float t_start, t_stop, t_decode, t_encode, t_misc; -#include -#endif - -#ifdef PNG_TIME_RFC1123_SUPPORTED -#define PNG_tIME_STRING_LENGTH 29 -static int tIME_chunk_present = 0; -static char tIME_string[PNG_tIME_STRING_LENGTH] = "tIME chunk is not present"; - -#if PNG_LIBPNG_VER < 10619 -#define png_convert_to_rfc1123_buffer(ts, t) tIME_to_str(read_ptr, ts, t) - -static int -tIME_to_str(png_structp png_ptr, png_charp ts, png_const_timep t) -{ - png_const_charp str = png_convert_to_rfc1123(png_ptr, t); - - if (str == NULL) - return 0; - - strcpy(ts, str); - return 1; -} -#endif /* older libpng */ -#endif - -static int verbose = 0; -static int strict = 0; -static int relaxed = 0; -static int xfail = 0; -static int unsupported_chunks = 0; /* chunk unsupported by libpng in input */ -static int error_count = 0; /* count calls to png_error */ -static int warning_count = 0; /* count calls to png_warning */ - -/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */ -#ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) png_ptr->jmpbuf -#endif - -/* Defines for unknown chunk handling if required. */ -#ifndef PNG_HANDLE_CHUNK_ALWAYS -# define PNG_HANDLE_CHUNK_ALWAYS 3 -#endif -#ifndef PNG_HANDLE_CHUNK_IF_SAFE -# define PNG_HANDLE_CHUNK_IF_SAFE 2 -#endif - -/* Utility to save typing/errors, the argument must be a name */ -#define MEMZERO(var) ((void)memset(&var, 0, sizeof var)) - -/* Example of using row callbacks to make a simple progress meter */ -static int status_pass = 1; -static int status_dots_requested = 0; -static int status_dots = 1; - -static void PNGCBAPI -read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) -{ - if (png_ptr == NULL || row_number > PNG_UINT_31_MAX) - return; - - if (status_pass != pass) - { - fprintf(stdout, "\n Pass %d: ", pass); - status_pass = pass; - status_dots = 31; - } - - status_dots--; - - if (status_dots == 0) - { - fprintf(stdout, "\n "); - status_dots=30; - } - - fprintf(stdout, "r"); -} - -#ifdef PNG_WRITE_SUPPORTED -static void PNGCBAPI -write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) -{ - if (png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7) - return; - - fprintf(stdout, "w"); -} -#endif - - -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED -/* Example of using a user transform callback (doesn't do anything at present). - */ -static void PNGCBAPI -read_user_callback(png_structp png_ptr, png_row_infop row_info, png_bytep data) -{ - PNG_UNUSED(png_ptr) - PNG_UNUSED(row_info) - PNG_UNUSED(data) -} -#endif - -#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED -/* Example of using user transform callback (we don't transform anything, - * but merely count the zero samples) - */ - -static png_uint_32 zero_samples; - -static void PNGCBAPI -count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) -{ - png_bytep dp = data; - if (png_ptr == NULL) - return; - - /* Contents of row_info: - * png_uint_32 width width of row - * png_uint_32 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) - */ - - /* Counts the number of zero samples (or zero pixels if color_type is 3 */ - - if (row_info->color_type == 0 || row_info->color_type == 3) - { - int pos = 0; - png_uint_32 n, nstop; - - for (n = 0, nstop=row_info->width; nbit_depth == 1) - { - if (((*dp << pos++ ) & 0x80) == 0) - zero_samples++; - - if (pos == 8) - { - pos = 0; - dp++; - } - } - - if (row_info->bit_depth == 2) - { - if (((*dp << (pos+=2)) & 0xc0) == 0) - zero_samples++; - - if (pos == 8) - { - pos = 0; - dp++; - } - } - - if (row_info->bit_depth == 4) - { - if (((*dp << (pos+=4)) & 0xf0) == 0) - zero_samples++; - - if (pos == 8) - { - pos = 0; - dp++; - } - } - - if (row_info->bit_depth == 8) - if (*dp++ == 0) - zero_samples++; - - if (row_info->bit_depth == 16) - { - if ((*dp | *(dp+1)) == 0) - zero_samples++; - dp+=2; - } - } - } - else /* Other color types */ - { - png_uint_32 n, nstop; - int channel; - int color_channels = row_info->channels; - if (row_info->color_type > 3) - color_channels--; - - for (n = 0, nstop=row_info->width; nbit_depth == 8) - if (*dp++ == 0) - zero_samples++; - - if (row_info->bit_depth == 16) - { - if ((*dp | *(dp+1)) == 0) - zero_samples++; - - dp+=2; - } - } - if (row_info->color_type > 3) - { - dp++; - if (row_info->bit_depth == 16) - dp++; - } - } - } -} -#endif /* WRITE_USER_TRANSFORM */ - -#ifndef PNG_STDIO_SUPPORTED -/* START of code to validate stdio-free compilation */ -/* These copies of the default read/write functions come from pngrio.c and - * pngwio.c. They allow "don't include stdio" testing of the library. - * 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. - */ - -#ifdef PNG_IO_STATE_SUPPORTED -void -pngtest_check_io_state(png_structp png_ptr, size_t data_length, - png_uint_32 io_op); -void -pngtest_check_io_state(png_structp png_ptr, size_t data_length, - png_uint_32 io_op) -{ - png_uint_32 io_state = png_get_io_state(png_ptr); - int err = 0; - - /* Check if the current operation (reading / writing) is as expected. */ - if ((io_state & PNG_IO_MASK_OP) != io_op) - png_error(png_ptr, "Incorrect operation in I/O state"); - - /* Check if the buffer size specific to the current location - * (file signature / header / data / crc) is as expected. - */ - switch (io_state & PNG_IO_MASK_LOC) - { - case PNG_IO_SIGNATURE: - if (data_length > 8) - err = 1; - break; - case PNG_IO_CHUNK_HDR: - if (data_length != 8) - err = 1; - break; - case PNG_IO_CHUNK_DATA: - break; /* no restrictions here */ - case PNG_IO_CHUNK_CRC: - if (data_length != 4) - err = 1; - break; - default: - err = 1; /* uninitialized */ - } - if (err != 0) - png_error(png_ptr, "Bad I/O state or buffer size"); -} -#endif - -static void PNGCBAPI -pngtest_read_data(png_structp png_ptr, png_bytep data, size_t length) -{ - size_t check = 0; - png_voidp io_ptr; - - /* 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. - */ - io_ptr = png_get_io_ptr(png_ptr); - if (io_ptr != NULL) - { - check = fread(data, 1, length, (png_FILE_p)io_ptr); - } - - if (check != length) - { - png_error(png_ptr, "Read Error"); - } - -#ifdef PNG_IO_STATE_SUPPORTED - pngtest_check_io_state(png_ptr, length, PNG_IO_READING); -#endif -} - -#ifdef PNG_WRITE_FLUSH_SUPPORTED -static void PNGCBAPI -pngtest_flush(png_structp png_ptr) -{ - /* Do nothing; fflush() is said to be just a waste of energy. */ - PNG_UNUSED(png_ptr) /* Stifle compiler warning */ -} -#endif - -/* 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. - */ -static void PNGCBAPI -pngtest_write_data(png_structp png_ptr, png_bytep data, size_t length) -{ - size_t check; - - check = fwrite(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr)); - - if (check != length) - { - png_error(png_ptr, "Write Error"); - } - -#ifdef PNG_IO_STATE_SUPPORTED - pngtest_check_io_state(png_ptr, length, PNG_IO_WRITING); -#endif -} -#endif /* !STDIO */ - -/* 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 to. In the default configuration, png_ptr is - * not used, but it is passed in case it may be useful. - */ -typedef struct -{ - PNG_CONST char *file_name; -} pngtest_error_parameters; - -static void PNGCBAPI -pngtest_warning(png_structp png_ptr, png_const_charp message) -{ - PNG_CONST char *name = "UNKNOWN (ERROR!)"; - pngtest_error_parameters *test = - (pngtest_error_parameters*)png_get_error_ptr(png_ptr); - - ++warning_count; - - if (test != NULL && test->file_name != NULL) - name = test->file_name; - - fprintf(STDERR, "\n%s: libpng warning: %s\n", name, message); -} - -/* 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 void PNGCBAPI -pngtest_error(png_structp png_ptr, png_const_charp message) -{ - ++error_count; - - pngtest_warning(png_ptr, message); - /* We can return because png_error calls the default handler, which is - * actually OK in this case. - */ -} - -/* END of code to validate stdio-free compilation */ - -/* START of code to validate memory allocation and deallocation */ -#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG - -/* 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. - * - * This piece of code can be compiled to validate max 64K allocations - * by setting MAXSEG_64K in zlib zconf.h *or* PNG_MAX_MALLOC_64K. - */ -typedef struct memory_information -{ - png_alloc_size_t size; - png_voidp pointer; - struct memory_information *next; -} memory_information; -typedef memory_information *memory_infop; - -static memory_infop pinformation = NULL; -static int current_allocation = 0; -static int maximum_allocation = 0; -static int total_allocation = 0; -static int num_allocations = 0; - -png_voidp PNGCBAPI png_debug_malloc PNGARG((png_structp png_ptr, - png_alloc_size_t size)); -void PNGCBAPI png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr)); - -png_voidp -PNGCBAPI png_debug_malloc(png_structp png_ptr, png_alloc_size_t size) -{ - - /* png_malloc has already tested for NULL; png_create_struct calls - * png_debug_malloc directly, with png_ptr == NULL which is OK - */ - - if (size == 0) - return (NULL); - - /* This calls the library allocator twice, once to get the requested - buffer and once to get a new free list entry. */ - { - /* Disable malloc_fn and free_fn */ - memory_infop pinfo; - png_set_mem_fn(png_ptr, NULL, NULL, NULL); - pinfo = (memory_infop)png_malloc(png_ptr, - (sizeof *pinfo)); - pinfo->size = size; - current_allocation += size; - total_allocation += size; - num_allocations ++; - - if (current_allocation > maximum_allocation) - maximum_allocation = current_allocation; - - pinfo->pointer = png_malloc(png_ptr, size); - /* Restore malloc_fn and free_fn */ - - png_set_mem_fn(png_ptr, - NULL, png_debug_malloc, png_debug_free); - - if (size != 0 && pinfo->pointer == NULL) - { - current_allocation -= size; - total_allocation -= size; - png_error(png_ptr, - "out of memory in pngtest->png_debug_malloc"); - } - - pinfo->next = pinformation; - pinformation = pinfo; - /* Make sure the caller isn't assuming zeroed memory. */ - memset(pinfo->pointer, 0xdd, pinfo->size); - - if (verbose != 0) - printf("png_malloc %lu bytes at %p\n", (unsigned long)size, - pinfo->pointer); - - return (png_voidp)(pinfo->pointer); - } -} - -/* Free a pointer. It is removed from the list at the same time. */ -void PNGCBAPI -png_debug_free(png_structp png_ptr, png_voidp ptr) -{ - if (png_ptr == NULL) - fprintf(STDERR, "NULL pointer to png_debug_free.\n"); - - if (ptr == 0) - { -#if 0 /* This happens all the time. */ - fprintf(STDERR, "WARNING: freeing NULL pointer\n"); -#endif - return; - } - - /* Unlink the element from the list. */ - if (pinformation != NULL) - { - memory_infop *ppinfo = &pinformation; - - for (;;) - { - memory_infop pinfo = *ppinfo; - - if (pinfo->pointer == ptr) - { - *ppinfo = pinfo->next; - current_allocation -= pinfo->size; - if (current_allocation < 0) - fprintf(STDERR, "Duplicate free of memory\n"); - /* We must free the list element too, but first kill - the memory that is to be freed. */ - memset(ptr, 0x55, pinfo->size); - free(pinfo); - pinfo = NULL; - break; - } - - if (pinfo->next == NULL) - { - fprintf(STDERR, "Pointer %p not found\n", ptr); - break; - } - - ppinfo = &pinfo->next; - } - } - - /* Finally free the data. */ - if (verbose != 0) - printf("Freeing %p\n", ptr); - - if (ptr != NULL) - free(ptr); - ptr = NULL; -} -#endif /* USER_MEM && DEBUG */ -/* END of code to test memory allocation/deallocation */ - - -#ifdef PNG_READ_USER_CHUNKS_SUPPORTED -/* Demonstration of user chunk support of the sTER and vpAg chunks */ - -/* (sTER is a public chunk not yet known by libpng. vpAg is a private -chunk used in ImageMagick to store "virtual page" size). */ - -static struct user_chunk_data -{ - png_const_infop info_ptr; - png_uint_32 vpAg_width, vpAg_height; - png_byte vpAg_units; - png_byte sTER_mode; - int location[2]; -} -user_chunk_data; - -/* Used for location and order; zero means nothing. */ -#define have_sTER 0x01 -#define have_vpAg 0x02 -#define before_PLTE 0x10 -#define before_IDAT 0x20 -#define after_IDAT 0x40 - -static void -init_callback_info(png_const_infop info_ptr) -{ - MEMZERO(user_chunk_data); - user_chunk_data.info_ptr = info_ptr; -} - -static int -set_location(png_structp png_ptr, struct user_chunk_data *data, int what) -{ - int location; - - if ((data->location[0] & what) != 0 || (data->location[1] & what) != 0) - return 0; /* already have one of these */ - - /* Find where we are (the code below zeroes info_ptr to indicate that the - * chunks before the first IDAT have been read.) - */ - if (data->info_ptr == NULL) /* after IDAT */ - location = what | after_IDAT; - - else if (png_get_valid(png_ptr, data->info_ptr, PNG_INFO_PLTE) != 0) - location = what | before_IDAT; - - else - location = what | before_PLTE; - - if (data->location[0] == 0) - data->location[0] = location; - - else - data->location[1] = location; - - return 1; /* handled */ -} - -static int PNGCBAPI -read_user_chunk_callback(png_struct *png_ptr, png_unknown_chunkp chunk) -{ - struct user_chunk_data *my_user_chunk_data = - (struct user_chunk_data*)png_get_user_chunk_ptr(png_ptr); - - if (my_user_chunk_data == NULL) - png_error(png_ptr, "lost user chunk pointer"); - - /* Return one of the following: - * return (-n); chunk had an error - * return (0); did not recognize - * return (n); success - * - * The unknown chunk structure contains the chunk data: - * png_byte name[5]; - * png_byte *data; - * size_t size; - * - * Note that libpng has already taken care of the CRC handling. - */ - - if (chunk->name[0] == 115 && chunk->name[1] == 84 && /* s T */ - chunk->name[2] == 69 && chunk->name[3] == 82) /* E R */ - { - /* Found sTER chunk */ - if (chunk->size != 1) - return (-1); /* Error return */ - - if (chunk->data[0] != 0 && chunk->data[0] != 1) - return (-1); /* Invalid mode */ - - if (set_location(png_ptr, my_user_chunk_data, have_sTER) != 0) - { - my_user_chunk_data->sTER_mode=chunk->data[0]; - return (1); - } - - else - return (0); /* duplicate sTER - give it to libpng */ - } - - if (chunk->name[0] != 118 || chunk->name[1] != 112 || /* v p */ - chunk->name[2] != 65 || chunk->name[3] != 103) /* A g */ - return (0); /* Did not recognize */ - - /* Found ImageMagick vpAg chunk */ - - if (chunk->size != 9) - return (-1); /* Error return */ - - if (set_location(png_ptr, my_user_chunk_data, have_vpAg) == 0) - return (0); /* duplicate vpAg */ - - my_user_chunk_data->vpAg_width = png_get_uint_31(png_ptr, chunk->data); - my_user_chunk_data->vpAg_height = png_get_uint_31(png_ptr, chunk->data + 4); - my_user_chunk_data->vpAg_units = chunk->data[8]; - - return (1); -} - -#ifdef PNG_WRITE_SUPPORTED -static void -write_sTER_chunk(png_structp write_ptr) -{ - png_byte sTER[5] = {115, 84, 69, 82, '\0'}; - - if (verbose != 0) - fprintf(STDERR, "\n stereo mode = %d\n", user_chunk_data.sTER_mode); - - png_write_chunk(write_ptr, sTER, &user_chunk_data.sTER_mode, 1); -} - -static void -write_vpAg_chunk(png_structp write_ptr) -{ - png_byte vpAg[5] = {118, 112, 65, 103, '\0'}; - - png_byte vpag_chunk_data[9]; - - if (verbose != 0) - fprintf(STDERR, " vpAg = %lu x %lu, units = %d\n", - (unsigned long)user_chunk_data.vpAg_width, - (unsigned long)user_chunk_data.vpAg_height, - user_chunk_data.vpAg_units); - - png_save_uint_32(vpag_chunk_data, user_chunk_data.vpAg_width); - png_save_uint_32(vpag_chunk_data + 4, user_chunk_data.vpAg_height); - vpag_chunk_data[8] = user_chunk_data.vpAg_units; - png_write_chunk(write_ptr, vpAg, vpag_chunk_data, 9); -} - -static void -write_chunks(png_structp write_ptr, int location) -{ - int i; - - /* Notice that this preserves the original chunk order, however chunks - * intercepted by the callback will be written *after* chunks passed to - * libpng. This will actually reverse a pair of sTER chunks or a pair of - * vpAg chunks, resulting in an error later. This is not worth worrying - * about - the chunks should not be duplicated! - */ - for (i=0; i<2; ++i) - { - if (user_chunk_data.location[i] == (location | have_sTER)) - write_sTER_chunk(write_ptr); - - else if (user_chunk_data.location[i] == (location | have_vpAg)) - write_vpAg_chunk(write_ptr); - } -} -#endif /* WRITE */ -#else /* !READ_USER_CHUNKS */ -# define write_chunks(pp,loc) ((void)0) -#endif -/* END of code to demonstrate user chunk support */ - -/* START of code to check that libpng has the required text support; this only - * checks for the write support because if read support is missing the chunk - * will simply not be reported back to pngtest. - */ -#ifdef PNG_TEXT_SUPPORTED -static void -pngtest_check_text_support(png_structp png_ptr, png_textp text_ptr, - int num_text) -{ - while (num_text > 0) - { - switch (text_ptr[--num_text].compression) - { - case PNG_TEXT_COMPRESSION_NONE: - break; - - case PNG_TEXT_COMPRESSION_zTXt: -# ifndef PNG_WRITE_zTXt_SUPPORTED - ++unsupported_chunks; - /* In libpng 1.7 this now does an app-error, so stop it: */ - text_ptr[num_text].compression = PNG_TEXT_COMPRESSION_NONE; -# endif - break; - - case PNG_ITXT_COMPRESSION_NONE: - case PNG_ITXT_COMPRESSION_zTXt: -# ifndef PNG_WRITE_iTXt_SUPPORTED - ++unsupported_chunks; - text_ptr[num_text].compression = PNG_TEXT_COMPRESSION_NONE; -# endif - break; - - default: - /* This is an error */ - png_error(png_ptr, "invalid text chunk compression field"); - break; - } - } -} -#endif -/* END of code to check that libpng has the required text support */ - -/* Test one file */ -static int -test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) -{ - static png_FILE_p fpin; - static png_FILE_p fpout; /* "static" prevents setjmp corruption */ - pngtest_error_parameters error_parameters; - png_structp read_ptr; - png_infop read_info_ptr, end_info_ptr; -#ifdef PNG_WRITE_SUPPORTED - png_structp write_ptr; - png_infop write_info_ptr; - png_infop write_end_info_ptr; -#ifdef PNG_WRITE_FILTER_SUPPORTED - int interlace_preserved = 1; -#endif /* WRITE_FILTER */ -#else /* !WRITE */ - png_structp write_ptr = NULL; - png_infop write_info_ptr = NULL; - png_infop write_end_info_ptr = NULL; -#endif /* !WRITE */ - png_bytep row_buf; - png_uint_32 y; - png_uint_32 width, height; - volatile int num_passes; - int pass; - int bit_depth, color_type; - - row_buf = NULL; - error_parameters.file_name = inname; - - if ((fpin = fopen(inname, "rb")) == NULL) - { - fprintf(STDERR, "Could not find input file %s\n", inname); - return (1); - } - - if ((fpout = fopen(outname, "wb")) == NULL) - { - fprintf(STDERR, "Could not open output file %s\n", outname); - FCLOSE(fpin); - return (1); - } - - pngtest_debug("Allocating read and write structures"); -#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG - read_ptr = - png_create_read_struct_2(PNG_LIBPNG_VER_STRING, NULL, - NULL, NULL, NULL, png_debug_malloc, png_debug_free); -#else - read_ptr = - png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); -#endif - png_set_error_fn(read_ptr, &error_parameters, pngtest_error, - pngtest_warning); - -#ifdef PNG_WRITE_SUPPORTED -#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG - write_ptr = - png_create_write_struct_2(PNG_LIBPNG_VER_STRING, NULL, - NULL, NULL, NULL, png_debug_malloc, png_debug_free); -#else - write_ptr = - png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); -#endif - png_set_error_fn(write_ptr, &error_parameters, pngtest_error, - pngtest_warning); -#endif - pngtest_debug("Allocating read_info, write_info and end_info structures"); - read_info_ptr = png_create_info_struct(read_ptr); - end_info_ptr = png_create_info_struct(read_ptr); -#ifdef PNG_WRITE_SUPPORTED - write_info_ptr = png_create_info_struct(write_ptr); - write_end_info_ptr = png_create_info_struct(write_ptr); -#endif - -#ifdef PNG_READ_USER_CHUNKS_SUPPORTED - init_callback_info(read_info_ptr); - png_set_read_user_chunk_fn(read_ptr, &user_chunk_data, - read_user_chunk_callback); -#endif - -#ifdef PNG_SETJMP_SUPPORTED - pngtest_debug("Setting jmpbuf for read struct"); - if (setjmp(png_jmpbuf(read_ptr))) - { - fprintf(STDERR, "%s -> %s: libpng read error\n", inname, outname); - png_free(read_ptr, row_buf); - row_buf = NULL; - if (verbose != 0) - fprintf(STDERR, " destroy read structs\n"); - png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); -#ifdef PNG_WRITE_SUPPORTED - if (verbose != 0) - fprintf(STDERR, " destroy write structs\n"); - png_destroy_info_struct(write_ptr, &write_end_info_ptr); - png_destroy_write_struct(&write_ptr, &write_info_ptr); -#endif - FCLOSE(fpin); - FCLOSE(fpout); - return (1); - } - -#ifdef PNG_WRITE_SUPPORTED - pngtest_debug("Setting jmpbuf for write struct"); - - if (setjmp(png_jmpbuf(write_ptr))) - { - fprintf(STDERR, "%s -> %s: libpng write error\n", inname, outname); - if (verbose != 0) - fprintf(STDERR, " destroying read structs\n"); - png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); - if (verbose != 0) - fprintf(STDERR, " destroying write structs\n"); - png_destroy_info_struct(write_ptr, &write_end_info_ptr); - png_destroy_write_struct(&write_ptr, &write_info_ptr); - FCLOSE(fpin); - FCLOSE(fpout); - return (1); - } -#endif -#endif - -#ifdef PNG_BENIGN_ERRORS_SUPPORTED - if (strict != 0) - { - /* Treat png_benign_error() as errors on read */ - png_set_benign_errors(read_ptr, 0); - -# ifdef PNG_WRITE_SUPPORTED - /* Treat them as errors on write */ - png_set_benign_errors(write_ptr, 0); -# endif - - /* if strict is not set, then app warnings and errors are treated as - * warnings in release builds, but not in unstable builds; this can be - * changed with '--relaxed'. - */ - } - - else if (relaxed != 0) - { - /* Allow application (pngtest) errors and warnings to pass */ - png_set_benign_errors(read_ptr, 1); - - /* Turn off CRC checking while reading */ - png_set_crc_action(read_ptr, PNG_CRC_QUIET_USE, PNG_CRC_QUIET_USE); - -#ifdef PNG_IGNORE_ADLER32 - /* Turn off ADLER32 checking while reading */ - png_set_option(read_ptr, PNG_IGNORE_ADLER32, PNG_OPTION_ON); -#endif - -# ifdef PNG_WRITE_SUPPORTED - png_set_benign_errors(write_ptr, 1); -# endif - - } -#endif /* BENIGN_ERRORS */ - - pngtest_debug("Initializing input and output streams"); -#ifdef PNG_STDIO_SUPPORTED - png_init_io(read_ptr, fpin); -# ifdef PNG_WRITE_SUPPORTED - png_init_io(write_ptr, fpout); -# endif -#else - png_set_read_fn(read_ptr, (png_voidp)fpin, pngtest_read_data); -# ifdef PNG_WRITE_SUPPORTED - png_set_write_fn(write_ptr, (png_voidp)fpout, pngtest_write_data, -# ifdef PNG_WRITE_FLUSH_SUPPORTED - pngtest_flush); -# else - NULL); -# endif -# endif -#endif - - if (status_dots_requested == 1) - { -#ifdef PNG_WRITE_SUPPORTED - png_set_write_status_fn(write_ptr, write_row_callback); -#endif - png_set_read_status_fn(read_ptr, read_row_callback); - } - - else - { -#ifdef PNG_WRITE_SUPPORTED - png_set_write_status_fn(write_ptr, NULL); -#endif - png_set_read_status_fn(read_ptr, NULL); - } - -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED - png_set_read_user_transform_fn(read_ptr, read_user_callback); -#endif -#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED - zero_samples = 0; - png_set_write_user_transform_fn(write_ptr, count_zero_samples); -#endif - -#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED - /* Preserve all the unknown chunks, if possible. If this is disabled then, - * even if the png_{get,set}_unknown_chunks stuff is enabled, we can't use - * libpng to *save* the unknown chunks on read (because we can't switch the - * save option on!) - * - * Notice that if SET_UNKNOWN_CHUNKS is *not* supported read will discard all - * unknown chunks and write will write them all. - */ -#ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED - png_set_keep_unknown_chunks(read_ptr, PNG_HANDLE_CHUNK_ALWAYS, - NULL, 0); -#endif -#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED - png_set_keep_unknown_chunks(write_ptr, PNG_HANDLE_CHUNK_ALWAYS, - NULL, 0); -#endif -#endif - - pngtest_debug("Reading info struct"); - png_read_info(read_ptr, read_info_ptr); - -#ifdef PNG_READ_USER_CHUNKS_SUPPORTED - /* This is a bit of a hack; there is no obvious way in the callback function - * to determine that the chunks before the first IDAT have been read, so - * remove the info_ptr (which is only used to determine position relative to - * PLTE) here to indicate that we are after the IDAT. - */ - user_chunk_data.info_ptr = NULL; -#endif - - pngtest_debug("Transferring info struct"); - { - int interlace_type, compression_type, filter_type; - - if (png_get_IHDR(read_ptr, read_info_ptr, &width, &height, &bit_depth, - &color_type, &interlace_type, &compression_type, &filter_type) != 0) - { - png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth, - color_type, interlace_type, compression_type, filter_type); - /* num_passes may not be available below if interlace support is not - * provided by libpng for both read and write. - */ - switch (interlace_type) - { - case PNG_INTERLACE_NONE: - num_passes = 1; - break; - - case PNG_INTERLACE_ADAM7: - num_passes = 7; - break; - - default: - png_error(read_ptr, "invalid interlace type"); - /*NOT REACHED*/ - } - } - - else - png_error(read_ptr, "png_get_IHDR failed"); - } -#ifdef PNG_FIXED_POINT_SUPPORTED -#ifdef PNG_cHRM_SUPPORTED - { - png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x, - blue_y; - - if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, - &red_x, &red_y, &green_x, &green_y, &blue_x, &blue_y) != 0) - { - png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x, - red_y, green_x, green_y, blue_x, blue_y); - } - } -#endif -#ifdef PNG_gAMA_SUPPORTED - { - png_fixed_point gamma; - - if (png_get_gAMA_fixed(read_ptr, read_info_ptr, &gamma) != 0) - png_set_gAMA_fixed(write_ptr, write_info_ptr, gamma); - } -#endif -#else /* Use floating point versions */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -#ifdef PNG_cHRM_SUPPORTED - { - double white_x, white_y, red_x, red_y, green_x, green_y, blue_x, - blue_y; - - if (png_get_cHRM(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, - &red_y, &green_x, &green_y, &blue_x, &blue_y) != 0) - { - png_set_cHRM(write_ptr, write_info_ptr, white_x, white_y, red_x, - red_y, green_x, green_y, blue_x, blue_y); - } - } -#endif -#ifdef PNG_gAMA_SUPPORTED - { - double gamma; - - if (png_get_gAMA(read_ptr, read_info_ptr, &gamma) != 0) - png_set_gAMA(write_ptr, write_info_ptr, gamma); - } -#endif -#endif /* Floating point */ -#endif /* Fixed point */ -#ifdef PNG_iCCP_SUPPORTED - { - png_charp name; - png_bytep profile; - png_uint_32 proflen; - int compression_type; - - if (png_get_iCCP(read_ptr, read_info_ptr, &name, &compression_type, - &profile, &proflen) != 0) - { - png_set_iCCP(write_ptr, write_info_ptr, name, compression_type, - profile, proflen); - } - } -#endif -#ifdef PNG_sRGB_SUPPORTED - { - int intent; - - if (png_get_sRGB(read_ptr, read_info_ptr, &intent) != 0) - png_set_sRGB(write_ptr, write_info_ptr, intent); - } -#endif - { - png_colorp palette; - int num_palette; - - if (png_get_PLTE(read_ptr, read_info_ptr, &palette, &num_palette) != 0) - png_set_PLTE(write_ptr, write_info_ptr, palette, num_palette); - } -#ifdef PNG_bKGD_SUPPORTED - { - png_color_16p background; - - if (png_get_bKGD(read_ptr, read_info_ptr, &background) != 0) - { - png_set_bKGD(write_ptr, write_info_ptr, background); - } - } -#endif -#ifdef PNG_READ_eXIf_SUPPORTED - { - png_bytep exif=NULL; - png_uint_32 exif_length; - - if (png_get_eXIf_1(read_ptr, read_info_ptr, &exif_length, &exif) != 0) - { - if (exif_length > 1) - fprintf(STDERR," eXIf type %c%c, %lu bytes\n",exif[0],exif[1], - (unsigned long)exif_length); -# ifdef PNG_WRITE_eXIf_SUPPORTED - png_set_eXIf_1(write_ptr, write_info_ptr, exif_length, exif); -# endif - } - } -#endif -#ifdef PNG_hIST_SUPPORTED - { - png_uint_16p hist; - - if (png_get_hIST(read_ptr, read_info_ptr, &hist) != 0) - png_set_hIST(write_ptr, write_info_ptr, hist); - } -#endif -#ifdef PNG_oFFs_SUPPORTED - { - png_int_32 offset_x, offset_y; - int unit_type; - - if (png_get_oFFs(read_ptr, read_info_ptr, &offset_x, &offset_y, - &unit_type) != 0) - { - png_set_oFFs(write_ptr, write_info_ptr, offset_x, offset_y, unit_type); - } - } -#endif -#ifdef PNG_pCAL_SUPPORTED - { - png_charp purpose, units; - png_charpp params; - png_int_32 X0, X1; - int type, nparams; - - if (png_get_pCAL(read_ptr, read_info_ptr, &purpose, &X0, &X1, &type, - &nparams, &units, ¶ms) != 0) - { - png_set_pCAL(write_ptr, write_info_ptr, purpose, X0, X1, type, - nparams, units, params); - } - } -#endif -#ifdef PNG_pHYs_SUPPORTED - { - png_uint_32 res_x, res_y; - int unit_type; - - if (png_get_pHYs(read_ptr, read_info_ptr, &res_x, &res_y, - &unit_type) != 0) - png_set_pHYs(write_ptr, write_info_ptr, res_x, res_y, unit_type); - } -#endif -#ifdef PNG_sBIT_SUPPORTED - { - png_color_8p sig_bit; - - if (png_get_sBIT(read_ptr, read_info_ptr, &sig_bit) != 0) - png_set_sBIT(write_ptr, write_info_ptr, sig_bit); - } -#endif -#ifdef PNG_sCAL_SUPPORTED -#if defined(PNG_FLOATING_POINT_SUPPORTED) && \ - defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) - { - int unit; - double scal_width, scal_height; - - if (png_get_sCAL(read_ptr, read_info_ptr, &unit, &scal_width, - &scal_height) != 0) - { - png_set_sCAL(write_ptr, write_info_ptr, unit, scal_width, scal_height); - } - } -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - { - int unit; - png_charp scal_width, scal_height; - - if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width, - &scal_height) != 0) - { - png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, - scal_height); - } - } -#endif -#endif -#endif - -#ifdef PNG_sPLT_SUPPORTED - { - png_sPLT_tp entries; - - int num_entries = (int) png_get_sPLT(read_ptr, read_info_ptr, &entries); - if (num_entries) - { - png_set_sPLT(write_ptr, write_info_ptr, entries, num_entries); - } - } -#endif - -#ifdef PNG_TEXT_SUPPORTED - { - png_textp text_ptr; - int num_text; - - if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0) - { - pngtest_debug1("Handling %d iTXt/tEXt/zTXt chunks", num_text); - - pngtest_check_text_support(read_ptr, text_ptr, num_text); - - if (verbose != 0) - { - int i; - - fprintf(STDERR,"\n"); - for (i=0; igray > sample_max) || - (color_type == PNG_COLOR_TYPE_RGB && - ((int)trans_color->red > sample_max || - (int)trans_color->green > sample_max || - (int)trans_color->blue > sample_max)))) - png_set_tRNS(write_ptr, write_info_ptr, trans_alpha, num_trans, - trans_color); - } - } -#endif -#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED - { - png_unknown_chunkp unknowns; - int num_unknowns = png_get_unknown_chunks(read_ptr, read_info_ptr, - &unknowns); - - if (num_unknowns != 0) - { - png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns, - num_unknowns); -#if PNG_LIBPNG_VER < 10600 - /* Copy the locations from the read_info_ptr. The automatically - * generated locations in write_end_info_ptr are wrong prior to 1.6.0 - * because they are reset from the write pointer (removed in 1.6.0). - */ - { - int i; - for (i = 0; i < num_unknowns; i++) - png_set_unknown_chunk_location(write_ptr, write_info_ptr, i, - unknowns[i].location); - } -#endif - } - } -#endif - -#ifdef PNG_WRITE_SUPPORTED - pngtest_debug("Writing info struct"); - - /* Write the info in two steps so that if we write the 'unknown' chunks here - * they go to the correct place. - */ - png_write_info_before_PLTE(write_ptr, write_info_ptr); - - write_chunks(write_ptr, before_PLTE); /* before PLTE */ - - png_write_info(write_ptr, write_info_ptr); - - write_chunks(write_ptr, before_IDAT); /* after PLTE */ - - png_write_info(write_ptr, write_end_info_ptr); - - write_chunks(write_ptr, after_IDAT); /* after IDAT */ - -#ifdef PNG_COMPRESSION_COMPAT - /* Test the 'compatibility' setting here, if it is available. */ - png_set_compression(write_ptr, PNG_COMPRESSION_COMPAT); -#endif -#endif - -#ifdef SINGLE_ROWBUF_ALLOC - pngtest_debug("Allocating row buffer..."); - row_buf = (png_bytep)png_malloc(read_ptr, - png_get_rowbytes(read_ptr, read_info_ptr)); - - pngtest_debug1("\t0x%08lx", (unsigned long)row_buf); -#endif /* SINGLE_ROWBUF_ALLOC */ - pngtest_debug("Writing row data"); - -#if defined(PNG_READ_INTERLACING_SUPPORTED) &&\ - defined(PNG_WRITE_INTERLACING_SUPPORTED) - /* Both must be defined for libpng to be able to handle the interlace, - * otherwise it gets handled below by simply reading and writing the passes - * directly. - */ - if (png_set_interlace_handling(read_ptr) != num_passes) - png_error(write_ptr, - "png_set_interlace_handling(read): wrong pass count "); - if (png_set_interlace_handling(write_ptr) != num_passes) - png_error(write_ptr, - "png_set_interlace_handling(write): wrong pass count "); -#else /* png_set_interlace_handling not called on either read or write */ -# define calc_pass_height -#endif /* not using libpng interlace handling */ - -#ifdef PNGTEST_TIMING - t_stop = (float)clock(); - t_misc += (t_stop - t_start); - t_start = t_stop; -#endif - for (pass = 0; pass < num_passes; pass++) - { -# ifdef calc_pass_height - png_uint_32 pass_height; - - if (num_passes == 7) /* interlaced */ - { - if (PNG_PASS_COLS(width, pass) > 0) - pass_height = PNG_PASS_ROWS(height, pass); - - else - pass_height = 0; - } - - else /* not interlaced */ - pass_height = height; -# else -# define pass_height height -# endif - - pngtest_debug1("Writing row data for pass %d", pass); - for (y = 0; y < pass_height; y++) - { -#ifndef SINGLE_ROWBUF_ALLOC - pngtest_debug2("Allocating row buffer (pass %d, y = %u)...", pass, y); - - row_buf = (png_bytep)png_malloc(read_ptr, - png_get_rowbytes(read_ptr, read_info_ptr)); - - pngtest_debug2("\t0x%08lx (%lu bytes)", (unsigned long)row_buf, - (unsigned long)png_get_rowbytes(read_ptr, read_info_ptr)); - -#endif /* !SINGLE_ROWBUF_ALLOC */ - png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1); - -#ifdef PNG_WRITE_SUPPORTED -#ifdef PNGTEST_TIMING - t_stop = (float)clock(); - t_decode += (t_stop - t_start); - t_start = t_stop; -#endif - png_write_rows(write_ptr, (png_bytepp)&row_buf, 1); -#ifdef PNGTEST_TIMING - t_stop = (float)clock(); - t_encode += (t_stop - t_start); - t_start = t_stop; -#endif -#endif /* WRITE */ - -#ifndef SINGLE_ROWBUF_ALLOC - pngtest_debug2("Freeing row buffer (pass %d, y = %u)", pass, y); - png_free(read_ptr, row_buf); - row_buf = NULL; -#endif /* !SINGLE_ROWBUF_ALLOC */ - } - } - -#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED -# ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED - png_free_data(read_ptr, read_info_ptr, PNG_FREE_UNKN, -1); -# endif -# ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED - png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1); -# endif -#endif - - pngtest_debug("Reading and writing end_info data"); - - png_read_end(read_ptr, end_info_ptr); -#ifdef PNG_TEXT_SUPPORTED - { - png_textp text_ptr; - int num_text; - - if (png_get_text(read_ptr, end_info_ptr, &text_ptr, &num_text) > 0) - { - pngtest_debug1("Handling %d iTXt/tEXt/zTXt chunks", num_text); - - pngtest_check_text_support(read_ptr, text_ptr, num_text); - - if (verbose != 0) - { - int i; - - fprintf(STDERR,"\n"); - for (i=0; i 1) - fprintf(STDERR," eXIf type %c%c, %lu bytes\n",exif[0],exif[1], - (unsigned long)exif_length); -# ifdef PNG_WRITE_eXIf_SUPPORTED - png_set_eXIf_1(write_ptr, write_end_info_ptr, exif_length, exif); -# endif - } - } -#endif -#ifdef PNG_tIME_SUPPORTED - { - png_timep mod_time; - - if (png_get_tIME(read_ptr, end_info_ptr, &mod_time) != 0) - { - png_set_tIME(write_ptr, write_end_info_ptr, mod_time); -#ifdef PNG_TIME_RFC1123_SUPPORTED - if (png_convert_to_rfc1123_buffer(tIME_string, mod_time) != 0) - tIME_string[(sizeof tIME_string) - 1] = '\0'; - - else - { - strncpy(tIME_string, "*** invalid time ***", sizeof tIME_string); - tIME_string[(sizeof tIME_string)-1] = '\0'; - } - - tIME_chunk_present++; -#endif /* TIME_RFC1123 */ - } - } -#endif -#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED - { - png_unknown_chunkp unknowns; - int num_unknowns = png_get_unknown_chunks(read_ptr, end_info_ptr, - &unknowns); - - if (num_unknowns != 0) - { - png_set_unknown_chunks(write_ptr, write_end_info_ptr, unknowns, - num_unknowns); -#if PNG_LIBPNG_VER < 10600 - /* Copy the locations from the read_info_ptr. The automatically - * generated locations in write_end_info_ptr are wrong prior to 1.6.0 - * because they are reset from the write pointer (removed in 1.6.0). - */ - { - int i; - for (i = 0; i < num_unknowns; i++) - png_set_unknown_chunk_location(write_ptr, write_end_info_ptr, i, - unknowns[i].location); - } -#endif - } - } -#endif - -#ifdef PNG_WRITE_SUPPORTED -#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED - /* Normally one would use Z_DEFAULT_STRATEGY for text compression. - * This is here just to make pngtest replicate the results from libpng - * versions prior to 1.5.4, and to test this new API. - */ - png_set_text_compression_strategy(write_ptr, Z_FILTERED); -#endif - - /* When the unknown vpAg/sTER chunks are written by pngtest the only way to - * do it is to write them *before* calling png_write_end. When unknown - * chunks are written by libpng, however, they are written just before IEND. - * There seems to be no way round this, however vpAg/sTER are not expected - * after IDAT. - */ - write_chunks(write_ptr, after_IDAT); - - png_write_end(write_ptr, write_end_info_ptr); -#endif - -#ifdef PNG_EASY_ACCESS_SUPPORTED - if (verbose != 0) - { - png_uint_32 iwidth, iheight; - iwidth = png_get_image_width(write_ptr, write_info_ptr); - iheight = png_get_image_height(write_ptr, write_info_ptr); - fprintf(STDERR, "\n Image width = %lu, height = %lu\n", - (unsigned long)iwidth, (unsigned long)iheight); - } -#endif - - pngtest_debug("Destroying data structs"); -#ifdef SINGLE_ROWBUF_ALLOC - pngtest_debug("destroying row_buf for read_ptr"); - png_free(read_ptr, row_buf); - row_buf = NULL; -#endif /* SINGLE_ROWBUF_ALLOC */ - pngtest_debug("destroying read_ptr, read_info_ptr, end_info_ptr"); - png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); -#ifdef PNG_WRITE_SUPPORTED - pngtest_debug("destroying write_end_info_ptr"); - png_destroy_info_struct(write_ptr, &write_end_info_ptr); - pngtest_debug("destroying write_ptr, write_info_ptr"); - png_destroy_write_struct(&write_ptr, &write_info_ptr); -#endif - pngtest_debug("Destruction complete."); - - FCLOSE(fpin); - FCLOSE(fpout); - - /* Summarize any warnings or errors and in 'strict' mode fail the test. - * Unsupported chunks can result in warnings, in that case ignore the strict - * setting, otherwise fail the test on warnings as well as errors. - */ - if (error_count > 0) - { - /* We don't really expect to get here because of the setjmp handling - * above, but this is safe. - */ - fprintf(STDERR, "\n %s: %d libpng errors found (%d warnings)", - inname, error_count, warning_count); - - if (strict != 0) - return (1); - } - -# ifdef PNG_WRITE_SUPPORTED - /* If there is no write support nothing was written! */ - else if (unsupported_chunks > 0) - { - fprintf(STDERR, "\n %s: unsupported chunks (%d)%s", - inname, unsupported_chunks, strict ? ": IGNORED --strict!" : ""); - } -# endif - - else if (warning_count > 0) - { - fprintf(STDERR, "\n %s: %d libpng warnings found", - inname, warning_count); - - if (strict != 0) - return (1); - } - - pngtest_debug("Opening files for comparison"); - if ((fpin = fopen(inname, "rb")) == NULL) - { - fprintf(STDERR, "Could not find file %s\n", inname); - return (1); - } - - if ((fpout = fopen(outname, "rb")) == NULL) - { - fprintf(STDERR, "Could not find file %s\n", outname); - FCLOSE(fpin); - return (1); - } - -#if defined (PNG_WRITE_SUPPORTED) /* else nothing was written */ &&\ - defined (PNG_WRITE_FILTER_SUPPORTED) - if (interlace_preserved != 0) /* else the files will be changed */ - { - for (;;) - { - static int wrote_question = 0; - size_t num_in, num_out; - char inbuf[256], outbuf[256]; - - num_in = fread(inbuf, 1, sizeof inbuf, fpin); - num_out = fread(outbuf, 1, sizeof outbuf, fpout); - - if (num_in != num_out) - { - fprintf(STDERR, "\nFiles %s and %s are of a different size\n", - inname, outname); - - if (wrote_question == 0 && unsupported_chunks == 0) - { - fprintf(STDERR, - " Was %s written with the same maximum IDAT" - " chunk size (%d bytes),", - inname, PNG_ZBUF_SIZE); - fprintf(STDERR, - "\n filtering heuristic (libpng default), compression"); - fprintf(STDERR, - " level (zlib default),\n and zlib version (%s)?\n\n", - ZLIB_VERSION); - wrote_question = 1; - } - - FCLOSE(fpin); - FCLOSE(fpout); - - if (strict != 0 && unsupported_chunks == 0) - return (1); - - else - return (0); - } - - if (num_in == 0) - break; - - if (memcmp(inbuf, outbuf, num_in)) - { - fprintf(STDERR, "\nFiles %s and %s are different\n", inname, - outname); - - if (wrote_question == 0 && unsupported_chunks == 0) - { - fprintf(STDERR, - " Was %s written with the same maximum" - " IDAT chunk size (%d bytes),", - inname, PNG_ZBUF_SIZE); - fprintf(STDERR, - "\n filtering heuristic (libpng default), compression"); - fprintf(STDERR, - " level (zlib default),\n and zlib version (%s)?\n\n", - ZLIB_VERSION); - wrote_question = 1; - } - - FCLOSE(fpin); - FCLOSE(fpout); - - /* NOTE: the unsupported_chunks escape is permitted here because - * unsupported text chunk compression will result in the compression - * mode being changed (to NONE) yet, in the test case, the result - * can be exactly the same size! - */ - if (strict != 0 && unsupported_chunks == 0) - return (1); - - else - return (0); - } - } - } -#endif /* WRITE && WRITE_FILTER */ - - FCLOSE(fpin); - FCLOSE(fpout); - - return (0); -} - -/* Input and output filenames */ -#ifdef RISCOS -static PNG_CONST char *inname = "pngtest/png"; -static PNG_CONST char *outname = "pngout/png"; -#else -static PNG_CONST char *inname = "pngtest.png"; -static PNG_CONST char *outname = "pngout.png"; -#endif - -int -main(int argc, char *argv[]) -{ - int multiple = 0; - int ierror = 0; - - png_structp dummy_ptr; - - fprintf(STDERR, "\n Testing libpng version %s\n", PNG_LIBPNG_VER_STRING); - fprintf(STDERR, " with zlib version %s\n", ZLIB_VERSION); - fprintf(STDERR, "%s", png_get_copyright(NULL)); - /* Show the version of libpng used in building the library */ - fprintf(STDERR, " library (%lu):%s", - (unsigned long)png_access_version_number(), - png_get_header_version(NULL)); - - /* Show the version of libpng used in building the application */ - fprintf(STDERR, " pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER, - PNG_HEADER_VERSION_STRING); - - /* Do some consistency checking on the memory allocation settings, I'm - * not sure this matters, but it is nice to know, the first of these - * tests should be impossible because of the way the macros are set - * in pngconf.h - */ -#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) - fprintf(STDERR, " NOTE: Zlib compiled for max 64k, libpng not\n"); -#endif - /* I think the following can happen. */ -#if !defined(MAXSEG_64K) && defined(PNG_MAX_MALLOC_64K) - fprintf(STDERR, " NOTE: libpng compiled for max 64k, zlib not\n"); -#endif - - if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING)) - { - fprintf(STDERR, - "Warning: versions are different between png.h and png.c\n"); - fprintf(STDERR, " png.h version: %s\n", PNG_LIBPNG_VER_STRING); - fprintf(STDERR, " png.c version: %s\n\n", png_libpng_ver); - ++ierror; - } - - if (argc > 1) - { - if (strcmp(argv[1], "-m") == 0) - { - multiple = 1; - status_dots_requested = 0; - } - - else if (strcmp(argv[1], "-mv") == 0 || - strcmp(argv[1], "-vm") == 0 ) - { - multiple = 1; - verbose = 1; - status_dots_requested = 1; - } - - else if (strcmp(argv[1], "-v") == 0) - { - verbose = 1; - status_dots_requested = 1; - inname = argv[2]; - } - - else if (strcmp(argv[1], "--strict") == 0) - { - status_dots_requested = 0; - verbose = 1; - inname = argv[2]; - strict++; - relaxed = 0; - multiple=1; - } - - else if (strcmp(argv[1], "--relaxed") == 0) - { - status_dots_requested = 0; - verbose = 1; - inname = argv[2]; - strict = 0; - relaxed++; - multiple=1; - } - else if (strcmp(argv[1], "--xfail") == 0) - { - status_dots_requested = 0; - verbose = 1; - inname = argv[2]; - strict = 0; - xfail++; - relaxed++; - multiple=1; - } - - else - { - inname = argv[1]; - status_dots_requested = 0; - } - } - - if (multiple == 0 && argc == 3 + verbose) - outname = argv[2 + verbose]; - - if ((multiple == 0 && argc > 3 + verbose) || - (multiple != 0 && argc < 2)) - { - fprintf(STDERR, - "usage: %s [infile.png] [outfile.png]\n\t%s -m {infile.png}\n", - argv[0], argv[0]); - fprintf(STDERR, - " reads/writes one PNG file (without -m) or multiple files (-m)\n"); - fprintf(STDERR, - " with -m %s is used as a temporary file\n", outname); - exit(1); - } - - if (multiple != 0) - { - int i; -#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG - int allocation_now = current_allocation; -#endif - for (i=2; i 0 - fprintf(STDERR, "\n"); -#endif - kerror = test_one_file(argv[i], outname); - if (kerror == 0) - { -#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED - fprintf(STDERR, "\n PASS (%lu zero samples)\n", - (unsigned long)zero_samples); -#else - fprintf(STDERR, " PASS\n"); -#endif -#ifdef PNG_TIME_RFC1123_SUPPORTED - if (tIME_chunk_present != 0) - fprintf(STDERR, " tIME = %s\n", tIME_string); - - tIME_chunk_present = 0; -#endif /* TIME_RFC1123 */ - } - - else - { - if (xfail) - fprintf(STDERR, " XFAIL\n"); - else - { - fprintf(STDERR, " FAIL\n"); - ierror += kerror; - } - } -#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG - if (allocation_now != current_allocation) - fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n", - current_allocation - allocation_now); - - if (current_allocation != 0) - { - memory_infop pinfo = pinformation; - - fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n", - current_allocation); - - while (pinfo != NULL) - { - fprintf(STDERR, " %lu bytes at %p\n", - (unsigned long)pinfo->size, - pinfo->pointer); - pinfo = pinfo->next; - } - } -#endif - } -#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG - fprintf(STDERR, " Current memory allocation: %10d bytes\n", - current_allocation); - fprintf(STDERR, " Maximum memory allocation: %10d bytes\n", - maximum_allocation); - fprintf(STDERR, " Total memory allocation: %10d bytes\n", - total_allocation); - fprintf(STDERR, " Number of allocations: %10d\n", - num_allocations); -#endif - } - - else - { - int i; - for (i = 0; i<3; ++i) - { - int kerror; -#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG - int allocation_now = current_allocation; -#endif - if (i == 1) - status_dots_requested = 1; - - else if (verbose == 0) - status_dots_requested = 0; - - if (i == 0 || verbose == 1 || ierror != 0) - { - fprintf(STDERR, "\n Testing %s:", inname); -#if PNG_DEBUG > 0 - fprintf(STDERR, "\n"); -#endif - } - - kerror = test_one_file(inname, outname); - - if (kerror == 0) - { - if (verbose == 1 || i == 2) - { -#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED - fprintf(STDERR, "\n PASS (%lu zero samples)\n", - (unsigned long)zero_samples); -#else - fprintf(STDERR, " PASS\n"); -#endif -#ifdef PNG_TIME_RFC1123_SUPPORTED - if (tIME_chunk_present != 0) - fprintf(STDERR, " tIME = %s\n", tIME_string); -#endif /* TIME_RFC1123 */ - } - } - - else - { - if (verbose == 0 && i != 2) - { - fprintf(STDERR, "\n Testing %s:", inname); -#if PNG_DEBUG > 0 - fprintf(STDERR, "\n"); -#endif - } - - if (xfail) - fprintf(STDERR, " XFAIL\n"); - else - { - fprintf(STDERR, " FAIL\n"); - ierror += kerror; - } - } -#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG - if (allocation_now != current_allocation) - fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n", - current_allocation - allocation_now); - - if (current_allocation != 0) - { - memory_infop pinfo = pinformation; - - fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n", - current_allocation); - - while (pinfo != NULL) - { - fprintf(STDERR, " %lu bytes at %p\n", - (unsigned long)pinfo->size, pinfo->pointer); - pinfo = pinfo->next; - } - } -#endif - } -#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG - fprintf(STDERR, " Current memory allocation: %10d bytes\n", - current_allocation); - fprintf(STDERR, " Maximum memory allocation: %10d bytes\n", - maximum_allocation); - fprintf(STDERR, " Total memory allocation: %10d bytes\n", - total_allocation); - fprintf(STDERR, " Number of allocations: %10d\n", - num_allocations); -#endif - } - -#ifdef PNGTEST_TIMING - t_stop = (float)clock(); - t_misc += (t_stop - t_start); - t_start = t_stop; - fprintf(STDERR, " CPU time used = %.3f seconds", - (t_misc+t_decode+t_encode)/(float)CLOCKS_PER_SEC); - fprintf(STDERR, " (decoding %.3f,\n", - t_decode/(float)CLOCKS_PER_SEC); - fprintf(STDERR, " encoding %.3f ,", - t_encode/(float)CLOCKS_PER_SEC); - fprintf(STDERR, " other %.3f seconds)\n\n", - t_misc/(float)CLOCKS_PER_SEC); -#endif - - if (ierror == 0) - fprintf(STDERR, " libpng passes test\n"); - - else - fprintf(STDERR, " libpng FAILS test\n"); - - dummy_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - fprintf(STDERR, " Default limits:\n"); - fprintf(STDERR, " width_max = %lu\n", - (unsigned long) png_get_user_width_max(dummy_ptr)); - fprintf(STDERR, " height_max = %lu\n", - (unsigned long) png_get_user_height_max(dummy_ptr)); - if (png_get_chunk_cache_max(dummy_ptr) == 0) - fprintf(STDERR, " cache_max = unlimited\n"); - else - fprintf(STDERR, " cache_max = %lu\n", - (unsigned long) png_get_chunk_cache_max(dummy_ptr)); - if (png_get_chunk_malloc_max(dummy_ptr) == 0) - fprintf(STDERR, " malloc_max = unlimited\n"); - else - fprintf(STDERR, " malloc_max = %lu\n", - (unsigned long) png_get_chunk_malloc_max(dummy_ptr)); - png_destroy_read_struct(&dummy_ptr, NULL, NULL); - - return (int)(ierror != 0); -} -#else -int -main(void) -{ - fprintf(STDERR, - " test ignored because libpng was not built with read support\n"); - /* And skip this test */ - return PNG_LIBPNG_VER < 10600 ? 0 : 77; -} -#endif - -/* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_35 Your_png_h_is_not_version_1_6_35; diff --git a/Dependencies/FreeImage/Source/LibPNG/pngtrans.c b/Dependencies/FreeImage/Source/LibPNG/pngtrans.c deleted file mode 100644 index 7a7d9ea..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngtrans.c +++ /dev/null @@ -1,864 +0,0 @@ - -/* pngtrans.c - transforms the data in a row (used by both readers and writers) - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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 PNG_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 PNG_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, 0x9C, 0xDC, - 0x2C, 0x6C, 0xAC, 0xEC, 0x3C, 0x7C, 0xBC, 0xFC, - 0x01, 0x41, 0x81, 0xC1, 0x11, 0x51, 0x91, 0xD1, - 0x21, 0x61, 0xA1, 0xE1, 0x31, 0x71, 0xB1, 0xF1, - 0x05, 0x45, 0x85, 0xC5, 0x15, 0x55, 0x95, 0xD5, - 0x25, 0x65, 0xA5, 0xE5, 0x35, 0x75, 0xB5, 0xF5, - 0x09, 0x49, 0x89, 0xC9, 0x19, 0x59, 0x99, 0xD9, - 0x29, 0x69, 0xA9, 0xE9, 0x39, 0x79, 0xB9, 0xF9, - 0x0D, 0x4D, 0x8D, 0xCD, 0x1D, 0x5D, 0x9D, 0xDD, - 0x2D, 0x6D, 0xAD, 0xED, 0x3D, 0x7D, 0xBD, 0xFD, - 0x02, 0x42, 0x82, 0xC2, 0x12, 0x52, 0x92, 0xD2, - 0x22, 0x62, 0xA2, 0xE2, 0x32, 0x72, 0xB2, 0xF2, - 0x06, 0x46, 0x86, 0xC6, 0x16, 0x56, 0x96, 0xD6, - 0x26, 0x66, 0xA6, 0xE6, 0x36, 0x76, 0xB6, 0xF6, - 0x0A, 0x4A, 0x8A, 0xCA, 0x1A, 0x5A, 0x9A, 0xDA, - 0x2A, 0x6A, 0xAA, 0xEA, 0x3A, 0x7A, 0xBA, 0xFA, - 0x0E, 0x4E, 0x8E, 0xCE, 0x1E, 0x5E, 0x9E, 0xDE, - 0x2E, 0x6E, 0xAE, 0xEE, 0x3E, 0x7E, 0xBE, 0xFE, - 0x03, 0x43, 0x83, 0xC3, 0x13, 0x53, 0x93, 0xD3, - 0x23, 0x63, 0xA3, 0xE3, 0x33, 0x73, 0xB3, 0xF3, - 0x07, 0x47, 0x87, 0xC7, 0x17, 0x57, 0x97, 0xD7, - 0x27, 0x67, 0xA7, 0xE7, 0x37, 0x77, 0xB7, 0xF7, - 0x0B, 0x4B, 0x8B, 0xCB, 0x1B, 0x5B, 0x9B, 0xDB, - 0x2B, 0x6B, 0xAB, 0xEB, 0x3B, 0x7B, 0xBB, 0xFB, - 0x0F, 0x4F, 0x8F, 0xCF, 0x1F, 0x5F, 0x9F, 0xDF, - 0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF -}; - -static PNG_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 */ - - /* 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) -{ - 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 - 1; - - 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/Dependencies/FreeImage/Source/LibPNG/pngwio.c b/Dependencies/FreeImage/Source/LibPNG/pngwio.c deleted file mode 100644 index 473e02b..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngwio.c +++ /dev/null @@ -1,168 +0,0 @@ - -/* pngwio.c - functions for data output - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2014,2016,2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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, (png_FILE_p)(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) -{ - png_FILE_p io_ptr; - - if (png_ptr == NULL) - return; - - io_ptr = png_voidcast(png_FILE_p, (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/Dependencies/FreeImage/Source/LibPNG/pngwrite.c b/Dependencies/FreeImage/Source/LibPNG/pngwrite.c deleted file mode 100644 index 2ec9aa2..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngwrite.c +++ /dev/null @@ -1,2395 +0,0 @@ - -/* pngwrite.c - general routines to write a PNG file - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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_GAMMA_SUPPORTED -# ifdef PNG_WRITE_gAMA_SUPPORTED - if ((info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 && - (info_ptr->colorspace.flags & PNG_COLORSPACE_FROM_gAMA) != 0 && - (info_ptr->valid & PNG_INFO_gAMA) != 0) - png_write_gAMA_fixed(png_ptr, info_ptr->colorspace.gamma); -# endif -#endif - -#ifdef PNG_COLORSPACE_SUPPORTED - /* Write only one of sRGB or an ICC profile. If a profile was supplied - * and it matches one of the known sRGB ones issue a warning. - */ -# ifdef PNG_WRITE_iCCP_SUPPORTED - if ((info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 && - (info_ptr->valid & PNG_INFO_iCCP) != 0) - { -# ifdef PNG_WRITE_sRGB_SUPPORTED - if ((info_ptr->valid & PNG_INFO_sRGB) != 0) - png_app_warning(png_ptr, - "profile matches sRGB but writing iCCP instead"); -# endif - - png_write_iCCP(png_ptr, info_ptr->iccp_name, - info_ptr->iccp_profile); - } -# ifdef PNG_WRITE_sRGB_SUPPORTED - else -# endif -# endif - -# ifdef PNG_WRITE_sRGB_SUPPORTED - if ((info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 && - (info_ptr->valid & PNG_INFO_sRGB) != 0) - png_write_sRGB(png_ptr, info_ptr->colorspace.rendering_intent); -# endif /* WRITE_sRGB */ -#endif /* COLORSPACE */ - -#ifdef PNG_WRITE_sBIT_SUPPORTED - if ((info_ptr->valid & PNG_INFO_sBIT) != 0) - png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type); -#endif - -#ifdef PNG_COLORSPACE_SUPPORTED -# ifdef PNG_WRITE_cHRM_SUPPORTED - if ((info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) == 0 && - (info_ptr->colorspace.flags & PNG_COLORSPACE_FROM_cHRM) != 0 && - (info_ptr->valid & PNG_INFO_cHRM) != 0) - png_write_cHRM_fixed(png_ptr, &info_ptr->colorspace.end_points_xy); -# endif -#endif - -#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED - write_unknown_chunks(png_ptr, info_ptr, PNG_HAVE_IHDR); -#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); -#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->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_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, PNG_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); - 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; - - if (png_ptr == NULL) - return; - - png_debug2(1, "in png_write_row (row %u, pass %d)", - png_ptr->row_number, png_ptr->pass); - - /* 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) -{ - 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) -{ - 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) -{ - 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) -{ - 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; - const 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) - { - const 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; - const 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) -{ - const png_imagep image = display->image; - const void *cmap = display->colormap; - const int entries = image->colormap_entries > 256 ? 256 : - (int)image->colormap_entries; - - /* NOTE: the caller must check for cmap != NULL and entries != 0 */ - const png_uint_32 format = image->format; - const unsigned int channels = PNG_IMAGE_SAMPLE_CHANNELS(format); - -# if defined(PNG_FORMAT_BGR_SUPPORTED) &&\ - defined(PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED) - const int afirst = (format & PNG_FORMAT_FLAG_AFIRST) != 0 && - (format & PNG_FORMAT_FLAG_ALPHA) != 0; -# else -# define afirst 0 -# endif - -# ifdef PNG_FORMAT_BGR_SUPPORTED - const 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. - */ - { - const unsigned int channels = PNG_IMAGE_PIXEL_CHANNELS(image->format); - - if (image->width <= 0x7fffffffU/channels) /* no overflow */ - { - png_uint_32 check; - const 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_CONST 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)*/); - const 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*). */ - 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/Dependencies/FreeImage/Source/LibPNG/pngwtran.c b/Dependencies/FreeImage/Source/LibPNG/pngwtran.c deleted file mode 100644 index aec907f..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngwtran.c +++ /dev/null @@ -1,576 +0,0 @@ - -/* pngwtran.c - transforms the data in a row for PNG writers - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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++) - { - - const 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++) - { - const 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/Dependencies/FreeImage/Source/LibPNG/pngwutil.c b/Dependencies/FreeImage/Source/LibPNG/pngwutil.c deleted file mode 100644 index d634aad..0000000 --- a/Dependencies/FreeImage/Source/LibPNG/pngwutil.c +++ /dev/null @@ -1,2781 +0,0 @@ - -/* pngwutil.c - utilities to write a PNG file - * - * Last changed in libpng 1.6.35 [July 15, 2018] - * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 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_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 name_len; - png_uint_32 profile_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 */ - - profile_len = png_get_uint_32(profile); - - if (profile_len < 132) - png_error(png_ptr, "ICC profile too short"); - - 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_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; - png_size_tp 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 = (png_size_tp)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) -{ -#ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* Start of interlace block */ - static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; - - /* Offset to next interlace block */ - static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; - - /* Start of interlace block in the y direction */ - static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; - - /* Offset to next interlace block in the y direction */ - static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; -#endif - - 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) -{ -#ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* Start of interlace block */ - static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; - - /* Offset to next interlace block */ - static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; - - /* Start of interlace block in the y direction */ - static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; - - /* Offset to next interlace block in the y direction */ - static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; -#endif - - 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) -{ - /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* Start of interlace block */ - static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; - - /* Offset to next interlace block */ - static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; - - 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, const 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, const 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, const 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, const 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, const 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, const 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/Dependencies/FreeImage/Source/LibTIFF4/CMakeLists.txt b/Dependencies/FreeImage/Source/LibTIFF4/CMakeLists.txt deleted file mode 100644 index 0fa766d..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/CMakeLists.txt +++ /dev/null @@ -1,168 +0,0 @@ -# CMake build for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Generate headers -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tif_config.h.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h - @ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tiffconf.h.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h - @ONLY) - -extra_dist( - SConstruct - tif_config.h-vms - tif_config.vc.h - tif_config.wince.h - tiffconf.vc.h - tiffconf.wince.h - libtiff.def - libtiff.map - libtiffxx.map) - -set(tiff_HEADERS - tiff.h - tiffio.h - tiffvers.h) - -set(tiff_noinst_HEADERS - t4.h - tif_dir.h - tif_predict.h - tiffiop.h - uvcode.h) - -set(nodist_tiff_HEADERS - ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h) - -set(tiff_SOURCES - tif_aux.c - tif_close.c - tif_codec.c - tif_color.c - tif_compress.c - tif_dir.c - tif_dirinfo.c - tif_dirread.c - tif_dirwrite.c - tif_dumpmode.c - tif_error.c - tif_extension.c - tif_fax3.c - tif_fax3sm.c - tif_flush.c - tif_getimage.c - tif_jbig.c - tif_jpeg.c - tif_jpeg_12.c - tif_luv.c - tif_lzma.c - tif_lzw.c - tif_next.c - tif_ojpeg.c - tif_open.c - tif_packbits.c - tif_pixarlog.c - tif_predict.c - tif_print.c - tif_read.c - tif_strip.c - tif_swab.c - tif_thunder.c - tif_tile.c - tif_version.c - tif_warning.c - tif_write.c - tif_zip.c - tif_zstd.c) - -set(tiffxx_HEADERS - tiffio.hxx) - -set(tiffxx_SOURCES - tif_stream.cxx) - -if(WIN32_IO) - extra_dist(tif_unix.c) - list(APPEND tiff_SOURCES tif_win32.c) -else() - extra_dist(tif_win32.c) - list(APPEND tiff_SOURCES tif_unix.c) -endif() - -add_library(tiff ${tiff_SOURCES} ${tiff_HEADERS} ${nodist_tiff_HEADERS} - ${tiff_port_SOURCES} libtiff.def) -target_include_directories(tiff - PUBLIC - $ - $ - ${TIFF_INCLUDES} -) -target_link_libraries(tiff ${TIFF_LIBRARY_DEPS}) -set_target_properties(tiff PROPERTIES SOVERSION ${SO_COMPATVERSION}) -if(NOT CYGWIN) - # This property causes shared libraries on Linux to have the full version - # encoded into their final filename. We disable this on Cygwin because - # it causes cygz-${TIFF_FULL_VERSION}.dll to be created when cygz.dll - # seems to be the default. - set_target_properties(tiff PROPERTIES VERSION ${SO_VERSION}) -endif() -if(HAVE_LD_VERSION_SCRIPT) - set_target_properties(tiff PROPERTIES LINK_FLAGS - "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map") -endif() - -install(TARGETS tiff - RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) - -install(FILES ${tiff_HEADERS} ${nodist_tiff_HEADERS} - DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}") - -if(CXX_SUPPORT) - add_library(tiffxx ${tiffxx_SOURCES} ${tiffxx_HEADERS}) - target_link_libraries(tiffxx tiff) - set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION}) - if(NOT CYGWIN) - # This property causes shared libraries on Linux to have the full version - # encoded into their final filename. We disable this on Cygwin because - # it causes cygz-${TIFF_FULL_VERSION}.dll to be created when cygz.dll - # seems to be the default. - set_target_properties(tiffxx PROPERTIES VERSION ${SO_VERSION}) - endif() - if(HAVE_LD_VERSION_SCRIPT) - set_target_properties(tiffxx PROPERTIES LINK_FLAGS - "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiffxx.map") - endif() - - install(TARGETS tiffxx - RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) - - install(FILES ${tiffxx_HEADERS} - DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}") - -endif() diff --git a/Dependencies/FreeImage/Source/LibTIFF4/ChangeLog b/Dependencies/FreeImage/Source/LibTIFF4/ChangeLog deleted file mode 100644 index 77117b4..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/ChangeLog +++ /dev/null @@ -1,8073 +0,0 @@ -2017-11-18 Bob Friesenhahn - - * configure.ac: libtiff 4.0.9 released. - - * html/v4.0.9.html: Add HTML file to document changes in libtiff - v4.0.9. - -2017-11-17 Even Rouault - - * libtiff/tif_aux.c, tif_getimage.c, tif_read.c: typo fixes in - comments. - -2017-11-02 Bob Friesenhahn - - * test/Makefile.am: Add some tests for tiff2bw. - -2017-11-01 Bob Friesenhahn - - * tools/tiff2bw.c (main): Free memory allocated in the tiff2bw - program. This is in response to the report associated with - CVE-2017-16232 but does not solve the extremely high memory usage - with the associated POC file. - -2017-10-29 Bob Friesenhahn - - * tools/tiff2pdf.c (t2p_sample_realize_palette): Fix possible - arithmetic overflow in bounds checking code and eliminate - comparison between signed and unsigned type. - - * tools/fax2tiff.c (_FAX_Client_Data): Pass FAX_Client_Data as the - client data. This client data is not used at all at the moment, - but it makes the most sense. Issue that the value of - client_data.fd was passed where a pointer is expected was reported - via email by Gerald Schade on Sun, 29 Oct 2017. - -2017-10-23 Even Rouault - - * libtiff/tif_getimage.c: avoid floating point division by zero in - initCIELabConversion() - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3733 - Credit to OSS Fuzz - -2017-10-17 Even Rouault - - * libtiff/tif_jpeg.c: add compatibility with libjpeg-turbo 1.5.2 that - honours max_memory_to_use > 0. - Cf https://github.com/libjpeg-turbo/libjpeg-turbo/issues/162 - -2017-10-10 Even Rouault - - * nmake.opt: support a DEBUG=1 option, so as to adjust OPTFLAGS and use - /MDd runtime in debug mode. - -2017-10-01 Even Rouault - - * tools/tiffset.c: fix setting a single value for the ExtraSamples tag - (and other tags with variable number of values). - So 'tiffset -s ExtraSamples 1 X'. This only worked - when setting 2 or more values, but not just one. - -2017-09-29 Even Rouault - - * libtiff/libtiff.def: add TIFFReadRGBAStripExt and TIFFReadRGBATileExt - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2735 - -2017-09-09 Even Rouault - - * libtiff/tif_dirread.c: add NULL check to avoid likely false positive - null-pointer dereference warning by CLang Static Analyzer. - -2017-09-07 Even Rouault - - * libtiff/tiffiop.h, tif_aux.c: redirect SeekOK() macro to a _TIFFSeekoK() - function that checks if the offset is not bigger than INT64_MAX, so as - to avoid a -1 error return code of TIFFSeekFile() to match a required - seek to UINT64_MAX/-1. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2726 - Adapted from proposal by Nicolas Ruff. - -2017-08-29 Even Rouault - - * libtiff/tif_jpeg.c: accept reading the last strip of a JPEG compressed - file if the codestream height is larger than the truncated height of the - strip. Emit a warning in this situation since this is non compliant. - -2017-08-28 Even Rouault - - * test/Makefile.am: add missing reference to images/quad-lzw-compat.tiff - to fix "make distcheck". Patch by Roger Leigh - -2017-08-23 Even Rouault - - * libtiff/tif_dirwrite.c: replace assertion to tag value not fitting - on uint32 when selecting the value of SubIFD tag by runtime check - (in TIFFWriteDirectoryTagSubifd()). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2728 - Reported by team OWL337 - -2017-08-23 Even Rouault - - * libtiff/tif_dirwrite.c: replace assertion related to not finding the - SubIFD tag by runtime check (in TIFFWriteDirectorySec()) - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2727 - Reported by team OWL337 - -2017-07-24 Even Rouault - - * libtiff/tif_luv.c: further reduce memory requirements for temporary - buffer when RowsPerStrip >= image_length in LogLuvInitState() and - LogL16InitState(). - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2700 - Credit to OSS Fuzz - -2017-07-24 Even Rouault - - * libtiff/tif_getimage.c: fix fromskew computation when to-be-skipped - pixel number is not a multiple of the horizontal subsampling, and - also in some other cases. Impact putcontig8bitYCbCr44tile, - putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile, - putcontig8bitYCbCr21tile and putcontig8bitYCbCr12tile - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2637 (discovered - by Agostino Sarubbo) - and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2691 (credit - to OSS Fuzz) - -2017-07-24 Even Rouault - - * libtiff/tif_getimage.c: gtTileContig() and gtTileSeparate(): - properly break from loops on error when stoponerr is set, instead - of going on iterating on row based loop. - -2017-07-18 Even Rouault - - * libtiff/tif_luv.c: LogLuvInitState(): avoid excessive memory - allocation when RowsPerStrip tag is missing. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2683 - Credit to OSS-Fuzz - -2017-07-15 Even Rouault - - * libtiff/tif_read.c: add protection against excessive memory - allocation attempts in TIFFReadDirEntryArray() on short files. - Effective for mmap'ed case. And non-mmap'ed case, but restricted - to 64bit builds. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2675 - -2017-07-15 Even Rouault - - * libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the - arrays that hold StripOffsets/StripByteCounts, when they are smaller - than the expected number of striles, up to 1 million striles, and - error out beyond. Can be tweaked by setting the environment variable - LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT. - This partially goes against a change added on 2002-12-17 to accept - those arrays of wrong sizes, but is needed to avoid denial of services. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2350 - Credit to OSS Fuzz - -2017-07-15 Even Rouault - - * libtiff/tif_read.c: TIFFFillStrip() / TIFFFillTile(). - Complementary fix for http://bugzilla.maptools.org/show_bug.cgi?id=2708 - in the isMapped() case, so as to avoid excessive memory allocation - when we need a temporary buffer but the file is truncated. - -2017-07-15 Even Rouault - - * tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw" - mode on PlanarConfig=Contig input images. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2715 - Reported by team OWL337 - -2017-07-11 Even Rouault - - * libtiff/tif_dir.c: avoid potential null pointer dereference in - _TIFFVGetField() on corrupted TIFFTAG_NUMBEROFINKS tag instance. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2713 - -2017-07-11 Even Rouault - - * libtiff/tif_lzw.c: fix potential out-of-buffer read on 1-byte LZW - strips. Crashing issue only on memory mapped files, where the strip - offset is the last byte of the file, and the file size is a multiple - of one page size on the CPU architecture (typically 4096). Credit - to myself :-) - -2017-07-11 Even Rouault - - * test/tiffcp-lzw-compat.sh, test/images/quad-lzw-compat.tiff: new files - to test old-style LZW decompression - * test/common.sh, Makefile.am, CMakeList.txt: updated with above - -2017-07-11 Even Rouault - - * refresh autoconf/make stuff with what is on Ubuntu 16.04 (minor changes) - -2017-07-11 Even Rouault - - * libtiff/tif_lzw.c: fix 4.0.8 regression in the decoding of old-style LZW - compressed files. - -2017-07-10 Even Rouault - - * libtiff/tif_pixarlog.c: avoid excessive memory allocation on decoding - when RowsPerStrip tag is not defined (and thus td_rowsperstrip == UINT_MAX) - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2554 - Credit to OSS Fuzz - -2017-07-04 Even Rouault - - * libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedTileAndAllocBuffer() - and _TIFFReadTileAndAllocBuffer() variants of TIFFReadEncodedTile() and - TIFFReadTile() that allocates the decoded buffer only after a first - successful TIFFFillTile(). This avoids excessive memory allocation - on corrupted files. - * libtiff/tif_getimage.c: use _TIFFReadTileAndAllocBuffer(). - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2470 - Credit to OSS Fuzz. - -2017-07-04 Even Rouault - - * libtiff/tif_error.c, tif_warning.c: correctly use va_list when both - an old-style and new-style warning/error handlers are installed. - Patch by Paavo Helde (sent on the mailing list) - -2017-07-02 Even Rouault - - * libtiff/tif_read.c: TIFFStartTile(): set tif_rawcc to - tif_rawdataloaded when it is set. Similarly to TIFFStartStrip(). - This issue was revealed by the change of 2017-06-30 in TIFFFileTile(), - limiting the number of bytes read. But it could probably have been hit - too in CHUNKY_STRIP_READ_SUPPORT mode previously ? - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2454 - Credit to OSS Fuzz - -2017-06-30 Even Rouault - - * man: update documentation regarding SubIFD tag and - TIFFSetSubDirectory() data type. - Patch by Eric Piel - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2671 - -2017-06-30 Even Rouault - - * libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedXXXX() - functions associated with LONG8/SLONG8 data type, replace assertion that - the file is BigTIFF, by a non-fatal error. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2712 - Reported by team OWL337 - -2017-06-30 Even Rouault - - * libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedStripAndAllocBuffer() - function, variant of TIFFReadEncodedStrip() that allocates the - decoded buffer only after a first successful TIFFFillStrip(). This avoids - excessive memory allocation on corrupted files. - * libtiff/tif_getimage.c: use _TIFFReadEncodedStripAndAllocBuffer(). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2708 and - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2433 . - Credit to OSS Fuzz - -2017-06-30 Even Rouault - - * libtiff/tif_read.c: TIFFFillTile(): add limitation to the number - of bytes read in case td_stripbytecount[strip] is bigger than - reasonable, so as to avoid excessive memory allocation (similarly to - what was done for TIFFFileStrip() on 2017-05-10) - -2017-06-29 Even Rouault - - * libtiff/tiffiop.h, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c, - libtiff/tif_read.c: make TIFFReadScanline() works in - CHUNKY_STRIP_READ_SUPPORT mode with JPEG stream with multiple scans. - Also make configurable through a LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER - environment variable the maximum number of scans allowed. Defaults to - 100. - -2017-06-27 Even Rouault - - * libtiff/tif_dirread.c: in TIFFReadDirEntryFloat(), check that a - double value can fit in a float before casting. Patch by Nicolas RUFF - -2017-06-26 Even Rouault - - * libtiff/tif_jbig.c: fix memory leak in error code path of JBIGDecode() - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2706 - Reported by team OWL337 - -2017-06-24 Even Rouault - - * libtiff/tif_jpeg.c: error out at decoding time if anticipated libjpeg - memory allocation is above 100 MB. libjpeg in case of multiple scans, - which is allowed even in baseline JPEG, if components are spread over several - scans and not interleavedin a single one, needs to allocate memory (or - backing store) for the whole strip/tile. - See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf - This limitation may be overriden by setting the - LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, or recompiling - libtiff with a custom value of TIFF_LIBJPEG_LARGEST_MEM_ALLOC macro. - -2017-06-24 Even Rouault - - * libtiff/tif_jpeg.c: add anti-denial of service measure to avoid excessive - CPU consumption on progressive JPEGs with a huge number of scans. - See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf - Note: only affects libtiff since 2014-12-29 where support of non-baseline JPEG - was added. - -2017-06-18 Even Rouault - - * libtiff/tiffiop.h: add TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW macro to - disable CLang warnings raised by -fsanitize=undefined,unsigned-integer-overflow - * libtiff/tif_predict.c: decorate legitimate functions where unsigned int - overflow occur with TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW - * libtiff/tif_dirread.c: avoid unsigned int overflow in EstimateStripByteCounts() - and BYTECOUNTLOOKSBAD when file is too short. - * libtiff/tif_jpeg.c: avoid (harmless) unsigned int overflow on tiled images. - * libtiff/tif_fax3.c: avoid unsigned int overflow in Fax3Encode2DRow(). Could - potentially be a bug with huge rows. - * libtiff/tif_getimage.c: avoid many (harmless) unsigned int overflows. - -2017-06-12 Even Rouault - - * libtiff/tif_dirread.c: TIFFFetchStripThing(): limit the number of items - read in StripOffsets/StripByteCounts tags to the number of strips to avoid - excessive memory allocation. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2215 - Credit to OSS Fuzz - -2017-06-12 Even Rouault - - * libtiff/tif_dirread.c: fix regression of libtiff 4.0.8 in - ChopUpSingleUncompressedStrip() regarding update of newly single-strip - uncompressed files whose bytecount is 0. Before the change of 2016-12-03, - the condition bytecount==0 used to trigger an early exit/disabling of - strip chop. Re-introduce that in update mode. Otherwise this cause - later incorrect setting for the value of StripByCounts/StripOffsets. - ( https://trac.osgeo.org/gdal/ticket/6924 ) - -2017-06-10 Even Rouault - - * .appveyor.yml, .travis.yml, build/travis-ci: apply patches - 0001-ci-Travis-script-improvements.patch and - 0002-ci-Invoke-helper-script-via-shell.patch by Roger Leigh - (sent to mailing list) - -2017-06-08 Even Rouault - - * .travis.yml, build/travis-ci: new files from - 0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch by - Roger Leigh (sent to mailing list on 2017-06-08) - This patch adds support for the Travis-CI service. - - * .appveyor.yml: new file from - 0002-ci-Add-AppVeyor-support.patch by Roger Leigh (sent to mailing - list on 2017-06-08) - This patch adds a .appveyor.yml file to the top-level. This allows - one to opt in to having a branch built on Windows with Cygwin, - MinGW and MSVC automatically when a branch is pushed to GitHub, - GitLab, BitBucket or any other supported git hosting service. - - * CMakeLists.txt, test/CMakeLists.txt, test/TiffTestCommon.cmake: apply - patch 0001-cmake-Improve-Cygwin-and-MingGW-test-support.patch from Roger - Leigh (sent to mailing list on 2017-06-08) - This patch makes the CMake build system support running the tests - with MinGW or Cygwin. - -2017-06-08 Even Rouault - - * libtiff/tif_swab.c: if DISABLE_CHECK_TIFFSWABMACROS is defined, do not do - the #ifdef TIFFSwabXXX checks. Make it easier for GDAL to rename the symbols - of its internal libtiff copy. - -2017-06-01 Even Rouault - - * libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(), - and use it in TIFFReadDirectory() so as to ignore fields whose tag is a - codec-specified tag but this codec is not enabled. This avoids TIFFGetField() - to behave differently depending on whether the codec is enabled or not, and - thus can avoid stack based buffer overflows in a number of TIFF utilities - such as tiffsplit, tiffcmp, thumbnail, etc. - Patch derived from 0063-Handle-properly-CODEC-specific-tags.patch - (http://bugzilla.maptools.org/show_bug.cgi?id=2580) by Raphaël Hertzog. - Fixes: - http://bugzilla.maptools.org/show_bug.cgi?id=2580 - http://bugzilla.maptools.org/show_bug.cgi?id=2693 - http://bugzilla.maptools.org/show_bug.cgi?id=2625 (CVE-2016-10095) - http://bugzilla.maptools.org/show_bug.cgi?id=2564 (CVE-2015-7554) - http://bugzilla.maptools.org/show_bug.cgi?id=2561 (CVE-2016-5318) - http://bugzilla.maptools.org/show_bug.cgi?id=2499 (CVE-2014-8128) - http://bugzilla.maptools.org/show_bug.cgi?id=2441 - http://bugzilla.maptools.org/show_bug.cgi?id=2433 - -2017-05-29 Even Rouault - - * libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for - refBlackWhite coefficients values. To avoid invalid float->int32 conversion - (when refBlackWhite[0] == 2147483648.f) - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1907 - Credit to OSS Fuzz - -2017-05-29 Even Rouault - - * libtiff/tif_color.c: TIFFYCbCrToRGBInit(): stricter clamping to avoid - int32 overflow in TIFFYCbCrtoRGB(). - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1844 - Credit to OSS Fuzz - -2017-05-21 Bob Friesenhahn - - * configure.ac: libtiff 4.0.8 released. - - * html/v4.0.8.html: Add description of changes targeting the 4.0.8 - release. - -2017-05-20 Even Rouault - - * libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for - refBlackWhite coefficients values. To avoid invalid float->int32 conversion. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1718 - Credit to OSS Fuzz - -2017-05-18 Even Rouault - - * libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] is not zero - to avoid division by zero. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 - Credit to OSS Fuzz - -2017-05-17 Even Rouault - - * libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast of double to - float. - Credit to Google Autofuzz project - -2017-05-17 Even Rouault - - * libtiff/tif_getimage.c: initYCbCrConversion(): add basic validation of - luma and refBlackWhite coefficients (just check they are not NaN for now), - to avoid potential float to int overflows. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1663 - Credit to OSS Fuzz - -2017-05-17 Even Rouault - - * libtiff/tif_pixarlog.c: PixarLogDecode(): resync tif_rawcp with - next_in and tif_rawcc with avail_in at beginning and end of function, - similarly to what is done in LZWDecode(). Likely needed so that it - works properly with latest chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT - mode. But untested... - -2017-05-17 Even Rouault - - * libtiff/tif_lzw.c: update dec_bitsleft at beginning of LZWDecode(), - and update tif_rawcc at end of LZWDecode(). This is needed to properly - work with the latest chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT - mode. - -2017-05-14 Even Rouault - - * libtiff/tif_luv.c: LogL16InitState(): avoid excessive memory - allocation when RowsPerStrip tag is missing. - Credit to OSS-Fuzz (locally run, on GDAL) - -2017-05-14 Even Rouault - - * libtiff/tif_packbits.c: fix out-of-buffer read in PackBitsDecode() - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 - Credit to OSS-Fuzz - -2017-05-13 Even Rouault - - * libtiff/tif_pixarlog.c, tif_luv.c: avoid potential int32 - overflows in multiply_ms() and add_ms(). - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1558 - Credit to OSS-Fuzz - -2017-05-13 Even Rouault - - * libtiff/tif_color.c: avoid potential int32 overflow in - TIFFYCbCrToRGBInit() - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1533 - Credit to OSS-Fuzz - -2017-05-13 Even Rouault - - * libtiff/tif_read.c: update tif_rawcc in CHUNKY_STRIP_READ_SUPPORT - mode with tif_rawdataloaded when calling TIFFStartStrip() or - TIFFFillStripPartial(). This avoids reading beyond tif_rawdata - when bytecount > tif_rawdatasize. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545. - Credit to OSS-Fuzz - -2017-05-12 Even Rouault - - * libtiff/tif_read.c: TIFFFillStripPartial(): - avoid excessive memory allocation in case of shorten files. - Only effective on 64 bit builds. - Credit to OSS-Fuzz (locally run, on GDAL) - -2017-05-12 Even Rouault - - * libtiff/tif_read.c: TIFFFillStripPartial() / TIFFSeek(), - avoid potential integer overflows with read_ahead in - CHUNKY_STRIP_READ_SUPPORT mode. Should - especially occur on 32 bit platforms. - -2017-05-10 Even Rouault - - * libtiff/tif_read.c: TIFFFillStrip() and TIFFFillTile(): - avoid excessive memory allocation in case of shorten files. - Only effective on 64 bit builds and non-mapped cases. - Credit to OSS-Fuzz (locally run, on GDAL) - -2017-05-10 Even Rouault - - * libtiff/tif_zip.c, tif_pixarlog.c, tif_predict.c: fix memory - leak when the underlying codec (ZIP, PixarLog) succeeds its - setupdecode() method, but PredictorSetup fails. - Credit to OSS-Fuzz (locally run, on GDAL) - -2017-05-10 Even Rouault - - * libtiff/tif_read.c: TIFFFillStrip(): add limitation to the number - of bytes read in case td_stripbytecount[strip] is bigger than - reasonable, so as to avoid excessive memory allocation. - -2017-04-28 Even Rouault - - * tools/tiff2bw.c: close TIFF handle in error code path. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2677 - -2017-04-27 Even Rouault - - * litiff/tif_fax3.c: avoid crash in Fax3Close() on empty file. - Patch by Alan Coopersmith + complement by myself. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2673 - * tools/fax2tiff.c: emit appropriate message if the input file is - empty. Patch by Alan Coopersmith. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2672 - -2017-04-27 Even Rouault - - * libtiff/tif_ojpeg.c: fix potential memory leak in - OJPEGReadHeaderInfoSecTablesQTable, OJPEGReadHeaderInfoSecTablesDcTable - and OJPEGReadHeaderInfoSecTablesAcTable - Patch by Nicolás Peña. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2670 - -2017-04-27 Even Rouault - - * libtiff/tif_dirread.c: fix memory leak in non DEFER_STRILE_LOAD - mode (ie default) when there is both a StripOffsets and - TileOffsets tag, or a StripByteCounts and TileByteCounts - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2689 - * tools/tiff2ps.c: call TIFFClose() in error code paths. - -2017-02-25 Even Rouault - - * libtiff/tif_fax3.c, tif_predict.c, tif_getimage.c: fix GCC 7 - -Wimplicit-fallthrough warnings. - -2017-02-18 Even Rouault - - * libtiff/tif_pixarlog.c: fix memory leak in error code path of - PixarLogSetupDecode(). Patch by Nicolás Peña. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2665 - -2017-02-18 Even Rouault - - * libtiff/tif_lzw.c: in LZWPostEncode(), increase, if necessary, the - code bit-width after flushing the remaining code and before emitting - the EOI code. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=1982 - -2017-01-31 Even Rouault - - * libtiff/tif_jpeg.c: only run JPEGFixupTagsSubsampling() if the - YCbCrSubsampling tag is not explicitly present. This helps a bit to reduce - the I/O amount when te tag is present (especially on cloud hosted files). - -2017-01-14 Even Rouault - - * tools/raw2tiff.c: avoid integer division by zero. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2631 - -2017-01-12 Even Rouault - - * libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesQTable, - OJPEGReadHeaderInfoSecTablesDcTable and OJPEGReadHeaderInfoSecTablesAcTable - when read fails. - Patch by Nicolás Peña. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2659 - -2017-01-11 Even Rouault - - * libtiff/tif_luv.c, tif_lzw.c, tif_packbits.c: return 0 in Encode - functions instead of -1 when TIFFFlushData1() fails. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2130 - -2017-01-11 Even Rouault - - * tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow and - cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based overflow. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2656 and - http://bugzilla.maptools.org/show_bug.cgi?id=2657 - -2017-01-11 Even Rouault - - * libtiff/tiffio.h, tif_unix.c, tif_win32.c, tif_vms.c: add _TIFFcalloc() - - * libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() to zero - initialize tif_rawdata. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2651 - -2017-01-11 Even Rouault - - * libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile to - avoid UndefinedBehaviorSanitizer warning. - Patch by Nicolás Peña. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2658 - -2017-01-11 Even Rouault - - * libtiff/tif_read.c: avoid potential undefined behaviour on signed integer - addition in TIFFReadRawStrip1() in isMapped() case. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2650 - -2017-01-11 Even Rouault - - * libtiff/tif_jpeg.c: validate BitsPerSample in JPEGSetupEncode() to avoid - undefined behaviour caused by invalid shift exponent. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2648 - -2017-01-11 Even Rouault - - * libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement various clampings - of double to other data types to avoid undefined behaviour if the output range - isn't big enough to hold the input value. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2643 - http://bugzilla.maptools.org/show_bug.cgi?id=2642 - http://bugzilla.maptools.org/show_bug.cgi?id=2646 - http://bugzilla.maptools.org/show_bug.cgi?id=2647 - -2017-01-11 Even Rouault - - * libtiff/tif_dirread.c: avoid division by floating point 0 in - TIFFReadDirEntryCheckedRational() and TIFFReadDirEntryCheckedSrational(), - and return 0 in that case (instead of infinity as before presumably) - Apparently some sanitizers do not like those divisions by zero. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2644 - -2017-01-11 Even Rouault - - * libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedRational, replace - assertion by runtime check to error out if passed value is strictly - negative. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2535 - - * tools/tiffcrop.c: remove extraneous TIFFClose() in error code path, that - caused double free. - Related to http://bugzilla.maptools.org/show_bug.cgi?id=2535 - -2017-01-11 Even Rouault - - * libtiff/tif_jpeg.c: avoid integer division by zero in - JPEGSetupEncode() when horizontal or vertical sampling is set to 0. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653 - -2017-01-03 Even Rouault - - * libtiff/tif_jpeg.c: increase libjpeg max memory usable to - 10 MB instead of libjpeg 1MB default. This helps when creating files - with "big" tile, without using libjpeg temporary files. - Related to https://trac.osgeo.org/gdal/ticket/6757 - -2016-12-20 Even Rouault - - * tools/tiff2pdf.c: avoid potential heap-based overflow in - t2p_readwrite_pdf_image_tile(). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2640 - -2016-12-20 Even Rouault - - * tools/tiff2pdf.c: avoid potential invalid memory read in - t2p_writeproc. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2639 - -2016-12-20 Even Rouault - - * tools/tiff2pdf.c: fix wrong usage of memcpy() that can trigger - unspecified behaviour. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2638 - -2016-12-18 Even Rouault - - * libtiff/tif_getimage.c: fix potential memory leaks in error code - path of TIFFRGBAImageBegin(). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2627 - -2016-12-18 Even Rouault - - * tools/tiff2pdf.c: prevent heap-based buffer overflow in -j mode - on a paletted image. Note: this fix errors out before the overflow - happens. There could probably be a better fix. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2635 - -2016-12-17 Even Rouault - - * libtiff/tiffio.h, libtiff/tif_getimage.c: add TIFFReadRGBAStripExt() - and TIFFReadRGBATileExt() variants of the functions without ext, with - an extra argument to control the stop_on_error behaviour. - -2016-12-17 Even Rouault - - * tools/tiff2ps.c: fix 2 heap-based buffer overflows (in PSDataBW - and PSDataColorContig). Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2633 and - http://bugzilla.maptools.org/show_bug.cgi?id=2634. - -2016-12-13 Even Rouault - - * libtiff/tif_fax3.h: revert change done on 2016-01-09 that made - Param member of TIFFFaxTabEnt structure a uint16 to reduce size of - the binary. It happens that the Hylafax software uses the tables that - follow this typedef (TIFFFaxMainTable, TIFFFaxWhiteTable, - TIFFFaxBlackTable), although they are not in a public libtiff header. - Raised by Lee Howard. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2636 - -2016-12-04 Even Rouault - - * html/man/Makefile.am: remove thumbnail.1.html and rgb2ycbcr.1.html - from installed pages since the corresponding utilities are no longer - installed. Reported by Havard Eidnes - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2606 - -2016-12-03 Even Rouault - - * libtiff/tif_write.c: fix misleading indentation as warned by GCC. - -2016-12-03 Even Rouault - - * tools/tiffcp.c: replace assert( (bps % 8) == 0 ) by a non assert check. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2605 - -2016-12-03 Even Rouault - - * tools/tiffcp.c: fix uint32 underflow/overflow that can cause heap-based - buffer overflow. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2610 - -2016-12-03 Even Rouault - - * tools/tiffcp.c: avoid potential division by zero is BitsPerSamples tag is - missing. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2607 - -2016-12-03 Even Rouault - - * man/Makefile.am: remove thumbnail.1 and rgb2ycbcr.1 from installed man - pages since the corresponding utilities are no longer installed. - Reported by Havard Eidnes - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2606 - -2016-12-03 Even Rouault - - * tools/tif_dir.c: when TIFFGetField(, TIFFTAG_NUMBEROFINKS, ) is called, - limit the return number of inks to SamplesPerPixel, so that code that parses - ink names doesn't go past the end of the buffer. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2599 - -2016-12-03 Even Rouault - - * tools/tiffcp.c: avoid potential division by zero is BitsPerSamples tag is - missing. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2597 - -2016-12-03 Even Rouault - - * tools/tiffinfo.c: fix null pointer dereference in -r mode when the image has - no StripByteCount tag. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2594 - -2016-12-03 Even Rouault - - * tools/tiffcrop.c: fix integer division by zero when BitsPerSample is missing. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2619 - -2016-12-03 Even Rouault - - * tools/tiffcrop.c: add 3 extra bytes at end of strip buffer in - readSeparateStripsIntoBuffer() to avoid read outside of heap allocated buffer. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2621 - -2016-12-03 Even Rouault - - * tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so - that the output buffer is correctly incremented to avoid write outside bounds. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2620 - -2016-12-03 Even Rouault - - * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in - OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611 - -2016-12-03 Even Rouault - - * libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip() to - instanciate compute ntrips as TIFFhowmany_32(td->td_imagelength, rowsperstrip), - instead of a logic based on the total size of data. Which is faulty is - the total size of data is not sufficient to fill the whole image, and thus - results in reading outside of the StripByCounts/StripOffsets arrays when - using TIFFReadScanline(). - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2608. - - * libtiff/tif_strip.c: revert the change in TIFFNumberOfStrips() done - for http://bugzilla.maptools.org/show_bug.cgi?id=2587 / CVE-2016-9273 since - the above change is a better fix that makes it unnecessary. - -2016-12-03 Even Rouault - - * libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based buffer - overflow on generation of PixarLog / LUV compressed files, with - ColorMap, TransferFunction attached and nasty plays with bitspersample. - The fix for LUV has not been tested, but suffers from the same kind - of issue of PixarLog. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2604 - -2016-12-02 Even Rouault - - * tools/tiffcp.c: avoid uint32 underflow in cpDecodedStrips that - can cause various issues, such as buffer overflows in the library. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2598 - -2016-12-02 Even Rouault - - * libtiff/tif_read.c, libtiff/tiffiop.h: fix uint32 overflow in - TIFFReadEncodedStrip() that caused an integer division by zero. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2596 - -2016-11-20 Even Rouault - - * libtiff/tif_getimage.c, libtiff/tif_open.c: add parenthesis to - fix cppcheck clarifyCalculation warnings - * libtiff/tif_predict.c, libtiff/tif_print.c: fix printf unsigned - vs signed formatting (cppcheck invalidPrintfArgType_uint warnings) - -2016-11-20 Bob Friesenhahn - - * tools/fax2tiff.c (main): Applied patch by Jörg Ahrens to fix - passing client data for Win32 builds using tif_win32.c - (USE_WIN32_FILEIO defined) for file I/O. Patch was provided via - email on November 20, 2016. - -2016-11-19 Bob Friesenhahn - - * libtiff 4.0.7 released. - - * configure.ac: Update for 4.0.7 release. - - * tools/tiffdump.c (ReadDirectory): Remove uint32 cast to - _TIFFmalloc() argument which resulted in Coverity report. Added - more mutiplication overflow checks. - -2016-11-18 Even Rouault - - * tools/tiffcrop.c: Fix memory leak in (recent) error code path. - Fixes Coverity 1394415. - -2016-11-17 Bob Friesenhahn - - * libtiff/tif_getimage.c: Fix some benign warnings which appear in - 64-bit compilation under Microsoft Visual Studio of the form - "Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit - value. Results might not be an expected value.". Problem was - reported on November 16, 2016 on the tiff mailing list. - -2016-11-16 Even Rouault - - * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), do not dereference - NULL pointer when values of tags with TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII - access are 0-byte arrays. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2593 (regression introduced - by previous fix done on 2016-11-11 for CVE-2016-9297). - Reported by Henri Salo. Assigned as CVE-2016-9448 - -2016-11-12 Bob Friesenhahn - - * tools/tiffinfo.c (TIFFReadContigTileData): Fix signed/unsigned - comparison warning. - (TIFFReadSeparateTileData): Fix signed/unsigned comparison - warning. - - * tools/tiffcrop.c (readContigTilesIntoBuffer): Fix - signed/unsigned comparison warning. - - * html/v4.0.7.html: Add a file to document the pending 4.0.7 - release. - -2016-11-11 Even Rouault - - * tools/tiff2pdf.c: avoid undefined behaviour related to overlapping - of source and destination buffer in memcpy() call in - t2p_sample_rgbaa_to_rgb() - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2577 - -2016-11-11 Even Rouault - - * tools/tiff2pdf.c: fix potential integer overflows on 32 bit builds - in t2p_read_tiff_size() - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2576 - -2016-11-11 Even Rouault - - * libtiff/tif_aux.c: fix crash in TIFFVGetFieldDefaulted() - when requesting Predictor tag and that the zip/lzw codec is not - configured. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2591 - -2016-11-11 Even Rouault - - * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make sure that - values of tags with TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII - access are null terminated, to avoid potential read outside buffer - in _TIFFPrintField(). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2590 (CVE-2016-9297) - -2016-11-11 Even Rouault - - * libtiff/tif_dirread.c: reject images with OJPEG compression that - have no TileOffsets/StripOffsets tag, when OJPEG compression is - disabled. Prevent null pointer dereference in TIFFReadRawStrip1() - and other functions that expect td_stripbytecount to be non NULL. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2585 - -2016-11-11 Even Rouault - - * tools/tiffcrop.c: fix multiple uint32 overflows in - writeBufferToSeparateStrips(), writeBufferToContigTiles() and - writeBufferToSeparateTiles() that could cause heap buffer overflows. - Reported by Henri Salo from Nixu Corporation. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592 (CVE-2016-9532) - -2016-11-10 Even Rouault - - * libtiff/tif_strip.c: make TIFFNumberOfStrips() return the td->td_nstrips - value when it is non-zero, instead of recomputing it. This is needed in - TIFF_STRIPCHOP mode where td_nstrips is modified. Fixes a read outsize of - array in tiffsplit (or other utilities using TIFFNumberOfStrips()). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2587 (CVE-2016-9273) - -2016-11-04 Even Rouault - - * libtiff/tif_predic.c: fix memory leaks in error code paths added in - previous commit (fix for MSVR 35105) - -2016-10-31 Even Rouault - - * libtiff/tif_predict.h, libtiff/tif_predict.c: - Replace assertions by runtime checks to avoid assertions in debug mode, - or buffer overflows in release mode. Can happen when dealing with - unusual tile size like YCbCr with subsampling. Reported as MSVR 35105 - by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations - team. - -2016-10-26 Even Rouault - - * tools/fax2tiff.c: fix segfault when specifying -r without - argument. Patch by Yuriy M. Kaminskiy. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2572 - -2016-10-25 Even Rouault - - * libtiff/tif_dir.c: discard values of SMinSampleValue and - SMaxSampleValue when they have been read and the value of - SamplesPerPixel is changed afterwards (like when reading a - OJPEG compressed image with a missing SamplesPerPixel tag, - and whose photometric is RGB or YCbCr, forcing SamplesPerPixel - being 3). Otherwise when rewriting the directory (for example - with tiffset, we will expect 3 values whereas the array had been - allocated with just one), thus causing a out of bound read access. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500 - (CVE-2014-8127, duplicate: CVE-2016-3658) - - * libtiff/tif_dirwrite.c: avoid null pointer dereference on td_stripoffset - when writing directory, if FIELD_STRIPOFFSETS was artificially set - for a hack case in OJPEG case. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500 - (CVE-2014-8127, duplicate: CVE-2016-3658) - -2016-10-25 Even Rouault - - * tools/tiffinfo.c: fix out-of-bound read on some tiled images. - (http://bugzilla.maptools.org/show_bug.cgi?id=2517) - - * libtiff/tif_compress.c: make TIFFNoDecode() return 0 to indicate an - error and make upper level read routines treat it accordingly. - (linked to the test case of http://bugzilla.maptools.org/show_bug.cgi?id=2517) - -2016-10-14 Even Rouault - - * tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in - readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel Souchet - & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. - -2016-10-09 Even Rouault - - * tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on JPEG - compressed images. Reported by Tyler Bohan of Cisco Talos as - TALOS-CAN-0187 / CVE-2016-5652. - Also prevents writing 2 extra uninitialized bytes to the file stream. - -2016-10-08 Even Rouault - - * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd - tile width vs image width. Reported as MSVR 35103 - by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - -2016-10-08 Even Rouault - - * tools/tiff2pdf.c: fix read -largely- outsize of buffer in - t2p_readwrite_pdf_image_tile(), causing crash, when reading a - JPEG compressed image with TIFFTAG_JPEGTABLES length being one. - Reported as MSVR 35101 by Axel Souchet and Vishal Chauhan from - the MSRC Vulnerabilities & Mitigations team. CVE-2016-9453 - -2016-10-08 Even Rouault - - * tools/tiffcp.c: fix read of undefined variable in case of missing - required tags. Found on test case of MSVR 35100. - * tools/tiffcrop.c: fix read of undefined buffer in - readContigStripsIntoBuffer() due to uint16 overflow. Probably not a - security issue but I can be wrong. Reported as MSVR 35100 by Axel - Souchet from the MSRC Vulnerabilities & Mitigations team. - -2016-09-25 Bob Friesenhahn - - * html: Change as many remotesensing.org broken links to a working - URL as possible. - -2016-09-24 Bob Friesenhahn - - * libtiff/tif_getimage.c (TIFFRGBAImageOK): Reject attempts to - read floating point images. - - * libtiff/tif_predict.c (PredictorSetup): Enforce bits-per-sample - requirements of floating point predictor (3). Fixes CVE-2016-3622 - "Divide By Zero in the tiff2rgba tool." - -2016-09-23 Even Rouault - - * tools/tiffcrop.c: fix various out-of-bounds write vulnerabilities - in heap or stack allocated buffers. Reported as MSVR 35093, - MSVR 35096 and MSVR 35097. Discovered by Axel Souchet and Vishal - Chauhan from the MSRC Vulnerabilities & Mitigations team. - * tools/tiff2pdf.c: fix out-of-bounds write vulnerabilities in - heap allocate buffer in t2p_process_jpeg_strip(). Reported as MSVR - 35098. Discovered by Axel Souchet and Vishal Chauhan from the MSRC - Vulnerabilities & Mitigations team. - * libtiff/tif_pixarlog.c: fix out-of-bounds write vulnerabilities - in heap allocated buffers. Reported as MSVR 35094. Discovered by - Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - * libtiff/tif_write.c: fix issue in error code path of TIFFFlushData1() - that didn't reset the tif_rawcc and tif_rawcp members. I'm not - completely sure if that could happen in practice outside of the odd - behaviour of t2p_seekproc() of tiff2pdf). The report points that a - better fix could be to check the return value of TIFFFlushData1() in - places where it isn't done currently, but it seems this patch is enough. - Reported as MSVR 35095. Discovered by Axel Souchet & Vishal Chauhan & - Suha Can from the MSRC Vulnerabilities & Mitigations team. - -2016-09-20 Bob Friesenhahn - - * html/man/index.html: Comment out links to documentation for - abandoned utilities. - -2016-09-17 Even Rouault - - * libtiff/tif_lzma.c: typo fix in comment - -2016-09-04 Even Rouault - - * libtiff/*.c: fix warnings raised by clang 3.9 -Wcomma - -2016-09-03 Even Rouault - - * libtiff/tif_dirwrite.c, libtiff/tif_color.c: fix warnings raised - by GCC 5 / clang -Wfloat-conversion - -2016-08-16 Even Rouault - - * tools/tiffcrop.c: fix C99'ism. - -2016-08-15 Even Rouault - - * tools/tiff2bw.c: fix weight computation that could result of color - value overflow (no security implication). Fix bugzilla #2550. - Patch by Frank Freudenberg. - -2016-08-15 Even Rouault - - * tools/rgb2ycbcr.c: validate values of -v and -h parameters to - avoid potential divide by zero. Fixes CVE-2016-3623 (bugzilla #2569) - -2016-08-15 Even Rouault - - * tools/tiffcrop.c: Fix out-of-bounds write in loadImage(). - From patch libtiff-CVE-2016-3991.patch from - libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro (bugzilla #2543) - -2016-08-15 Even Rouault - - * libtiff/tif_pixarlog.c: Fix write buffer overflow in PixarLogEncode - if more input samples are provided than expected by PixarLogSetupEncode. - Idea based on libtiff-CVE-2016-3990.patch from - libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, but with different and - simpler check. (bugzilla #2544) - -2016-08-15 Even Rouault - - * tools/tiff2rgba.c: Fix integer overflow in size of allocated - buffer, when -b mode is enabled, that could result in out-of-bounds - write. Based initially on patch tiff-CVE-2016-3945.patch from - libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, with correction for - invalid tests that rejected valid files. (bugzilla #2545) - -2016-07-11 Even Rouault - - * tools/tiffcrop.c: Avoid access outside of stack allocated array - on a tiled separate TIFF with more than 8 samples per pixel. - Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360 - (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 / #2559) - -2016-07-10 Even Rouault - - * libtiff/tif_read.c: Fix out-of-bounds read on - memory-mapped files in TIFFReadRawStrip1() and TIFFReadRawTile1() - when stripoffset is beyond tmsize_t max value (reported by - Mathias Svensson) - -2016-07-10 Even Rouault - - * tools/tiffdump.c: fix a few misaligned 64-bit reads warned - by -fsanitize - -2016-07-03 Even Rouault - - * libtiff/tif_read.c: make TIFFReadEncodedStrip() and - TIFFReadEncodedTile() directly use user provided buffer when - no compression (and other conditions) to save a memcpy(). - - * libtiff/tif_write.c: make TIFFWriteEncodedStrip() and - TIFFWriteEncodedTile() directly use user provided buffer when - no compression to save a memcpy(). - -2016-07-01 Even Rouault - - * libtiff/tif_luv.c: validate that for COMPRESSION_SGILOG and - PHOTOMETRIC_LOGL, there is only one sample per pixel. Avoid - potential invalid memory write on corrupted/unexpected images when - using the TIFFRGBAImageBegin() interface (reported by - Clay Wood) - -2016-06-28 Even Rouault - - * libtiff/tif_pixarlog.c: fix potential buffer write overrun in - PixarLogDecode() on corrupted/unexpected images (reported by Mathias Svensson) - (CVE-2016-5875) - -2016-06-15 Bob Friesenhahn - - * libtiff/libtiff.def: Added _TIFFMultiply32 and _TIFFMultiply64 - to libtiff.def - -2016-06-05 Bob Friesenhahn - - * tools/Makefile.am: The libtiff tools bmp2tiff, gif2tiff, - ras2tiff, sgi2tiff, sgisv, and ycbcr are completely removed from - the distribution. The libtiff tools rgb2ycbcr and thumbnail are - only built in the build tree for testing. Old files are put in - new 'archive' subdirectory of the source repository, but not in - distribution archives. These changes are made in order to lessen - the maintenance burden. - -2016-05-10 Bob Friesenhahn - - * libtiff/tif_config.vc.h (HAVE_SNPRINTF): Add a '1' to the - HAVE_SNPRINTF definition.' - -2016-05-09 Bob Friesenhahn - - * libtiff/tif_config.vc.h (HAVE_SNPRINTF): Applied patch by Edward - Lam to define HAVE_SNPRINTF for Visual Studio 2015. - -2016-04-27 Even Rouault - - * libtiff/tif_dirread.c: when compiled with DEFER_STRILE_LOAD, - fix regression, introduced on 2014-12-23, when reading a one-strip - file without a StripByteCounts tag. GDAL #6490 - -2016-04-07 Bob Friesenhahn - - * html/bugs.html: Replace Andrey Kiselev with Bob Friesenhahn for - purposes of security issue reporting. - -2016-01-23 Even Rouault - - * libtiff/*: upstream typo fixes (mostly contributed by Kurt Schwehr) - coming from GDAL internal libtiff - -2016-01-09 Even Rouault - - * libtiff/tif_fax3.h: make Param member of TIFFFaxTabEnt structure - a uint16 to reduce size of the binary. - -2016-01-03 Even Rouault - - * libtiff/tif_read.c, tif_dirread.c: fix indentation issues raised - by GCC 6 -Wmisleading-indentation - -2015-12-27 Even Rouault - - * libtiff/tif_pixarlog.c: avoid zlib error messages to pass a NULL - string to %s formatter, which is undefined behaviour in sprintf(). - -2015-12-27 Even Rouault - - * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode() - triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif - (bugzilla #2508) - -2015-12-27 Even Rouault - - * libtiff/tif_luv.c: fix potential out-of-bound writes in decode - functions in non debug builds by replacing assert()s by regular if - checks (bugzilla #2522). - Fix potential out-of-bound reads in case of short input data. - -2015-12-26 Even Rouault - - * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage - interface in case of unsupported values of SamplesPerPixel/ExtraSamples - for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in - TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and - CVE-2015-8683 reported by zzf of Alibaba. - -2015-12-21 Even Rouault - - * libtiff/tif_dirread.c: workaround false positive warning of Clang Static - Analyzer about null pointer dereference in TIFFCheckDirOffset(). - -2015-12-19 Even Rouault - - * libtiff/tif_fax3.c: remove dead assignment in Fax3PutEOLgdal(). Found - by Clang Static Analyzer - -2015-12-18 Even Rouault - - * libtiff/tif_dirwrite.c: fix truncation to 32 bit of file offsets in - TIFFLinkDirectory() and TIFFWriteDirectorySec() when aligning directory - offsets on a even offset (affects BigTIFF). This was a regression of the - changeset of 2015-10-19. - -2015-12-12 Even Rouault - - * libtiff/tif_write.c: TIFFWriteEncodedStrip() and TIFFWriteEncodedTile() - should return -1 in case of failure of tif_encodestrip() as documented - * libtiff/tif_dumpmode.c: DumpModeEncode() should return 0 in case of - failure so that the above mentionned functions detect the error. - -2015-12-06 Even Rouault - - * libtiff/uvcode.h: const'ify uv_code array - -2015-12-06 Even Rouault - - * libtiff/tif_dirinfo.c: const'ify tiffFields, exifFields, - tiffFieldArray and exifFieldArray arrays - -2015-12-06 Even Rouault - - * libtiff/tif_print.c: constify photoNames and orientNames arrays - -2015-12-06 Even Rouault - - * libtiff/tif_close.c, libtiff/tif_extension.c : rename link - variable to avoid -Wshadow warnings - -2015-11-22 Even Rouault - - * libtiff/*.c: fix typos in comments (patch by Kurt Schwehr) - -2015-11-22 Even Rouault - - * libtiff/*.c: fix MSVC warnings related to cast shortening and - assignment within conditional expression - -2015-11-18 Even Rouault - - * libtiff/*.c: fix clang -Wshorten-64-to-32 warnings - -2015-11-18 Even Rouault - - * libtiff/tif_dirread.c: initialize double* data at line 3693 to NULL - to please MSVC 2013 - -2015-11-17 Even Rouault - - * libtiff/tif_dirread.c: prevent reading ColorMap or TransferFunction - if BitsPerPixel > 24, so as to avoid huge memory allocation and file - read attempts - -2015-11-02 Even Rouault - - * libtiff/tif_dirread.c: remove duplicated assignment (reported by - Clang static analyzer) - -2015-10-28 Even Rouault - - * libtiff/tif_dir.c, libtiff/tif_dirinfo.c, libtiff/tif_compress.c, - libtiff/tif_jpeg_12.c: suppress warnings about 'no previous - declaration/prototype' - -2015-10-19 Even Rouault - - * libtiff/tiffiop.h, libtiff/tif_dirwrite.c: suffix constants by U to fix - 'warning: negative integer implicitly converted to unsigned type' warning - (part of -Wconversion) - -2015-10-17 Even Rouault - - * libtiff/tif_dir.c, libtiff/tif_dirread.c, libtiff/tif_getimage.c, - libtiff/tif_print.c: fix -Wshadow warnings (only in libtiff/) - -2015-09-12 Bob Friesenhahn - - * libtiff 4.0.6 released. - - * html/v4.0.6.html: Added release notes for 4.0.6. - -2015-09-06 Bob Friesenhahn - - * tools/tiffgt.c: Silence glut API deprecation warnings on MacOS - X. Patch by Roger Leigh. - - * Makefile.am: Added a 'coverity' rule to assist with Coverity - submissions. - - * tools/tiff2pdf.c: Fix compiler warning about unused function - when JPEG is not available. - - * tools/fax2ps.c (main): Detect failure to write to temporary - file. - -2015-09-05 Bob Friesenhahn - - * libtiff/tif_dirread.c (TIFFReadDirEntryCheckRangeSlongSlong8): - Change implementation so that it does not sometimes overflow the - range of a 32-bit int and to avoid a signed vs unsigned compare - compiler warning. - (TIFF_INT64_MAX): Avoid use of platform-specific large constants. - (TIFF_UINT32_MAX): Avoid use of platform-specific large constants. - -2015-09-01 Bob Friesenhahn - - * Makefile.am (distcheck-hook), configure.ac: Applied patches by - Roger Leigh (via tiff mailing list on 2015-09-01) to fix issue - with BSD make and to make use of cmake in 'distcheck' target - conditional on if cmake is available. - - * CMakeLists.txt, Makefile.am, configure.ac: Applied patches by - Roger Leigh (via tiff mailing list on 2015-09-01). - - CMake build is now included in 'distcheck' target. - - Builds with CMake 2.8.9 and newer. - - Tar is now resquested to use POSIX PAX format. - -2015-08-31 Bob Friesenhahn - - * CMakeLists.txt, libtiff/test/Makefile.am: Applied patches by - Roger Leigh (via tiff mailing list on 2015-08-31. - - CMake reads all version information directly from configure.ac to - avoid duplication of values. This basically greps over the file - for the LIBTIFF_* variables, then translates them to the form - needed for cmake. This includes the release version and libtool - shared library version information. - - Make shared/static library building configurable. Currently it - always builds shared libraries, with static libs having a _static - suffix (copying zlib, but it means it's got a non-standard name). - CMake has a -DBUILD_SHARED_LIBS=ON|OFF option to select one or the - other, which is now used instead. There's now a single "tiff" - target to build either shared or static as required, and all the - tests and tools are linked with this. Note: the Windows tests fail - when linked with a static libtiff (says: libtiff.dll not found). - Not really a regression since this was not tested up to this - point, and it's likely the unit tests haven't (ever?) been run on - Windows with a static libtiff, so there's some additional - portability issue here to address. Works fine on UNIX systems, - and fine on Windows with the default to build a DLL. - - Add a missing file which wasn't being distributed, causing unit - tests to fail. Note that "find . -name '*.cmake'" lists all the - CMake files which need distributing in addition to all the - CMakeLists.txt files (which now are distributed). - -2015-08-31 Even Rouault - - * libtiff/tif_predict.c: pedantic change to add explicit masking - with 0xff before casting to uchar in floating-point horizontal - differencing and accumulation routines. - -2015-08-31 Even Rouault - - * libtiff/tif_predict.c: fix generation of output with 16 bit - or 32 bit integer, when byte swapping is needed, in - horizontal predictor (#2521). Also fixes decoding when there is - a single pixel to code (unlikely case...) and byte swapping is - involved. - -2015-08-30 Even Rouault - - * libtiff/tif_lzw.c: make nextdata a unsigned type to avoid - undefined behaviour with shifts (gcc -fsanitize=shift) - -2015-08-30 Even Rouault - - * libtiff/tif_fax3.c, libtiff/tif_lzw.c, libtiff/tif_predict.c: - add explicit masking with 0xff before casting - to unsigned char (make icc -check=conversions happy) - - * libtiff/tif_predict.c: operate on unsigned datatypes when - computing/applying differences to avoid undefined behaviour of - signed types (C standard compliance) - -2015-08-30 Bob Friesenhahn - - * configure.ac: libtiff 4.0.5 released. - -2015-08-29 Bob Friesenhahn - - * CMakeLists.txt: Applied patch by Roger Leigh (via tiff mailing - list on 2015-08-29) to add ld-version-script option to cmake build - to match autoconf. Note: defaults to 'on' to be ABI-compatible by - default with common Linux distribution builds. Note that the - autoconf configure script defaults to 'off'. - - * html/build.html: Applied patch by Roger Leigh (via tiff mailing - list on 2015-08-29) to describe how to use CMake to build libtiff. - -2015-08-28 Bob Friesenhahn - - * html/v4.0.5.html: Added HTML file describing the changes which - will appear in the 4.0.5 release. - -2015-08-23 Bob Friesenhahn - - * libtiff/tiffiop.h: For MinGW comiles, make sure that build - supports necessary __MSVCRT_VERSION__ (at least at least 0x800). - Otherwise large files can not be supported for POSIX-style I/O. - - * tools/fax2tiff.c (main): Eliminate a compiler warning in 64-bit - builds about cast to thandle_t. - - * test/rewrite_tag.c (main): Does not require any arguments. - -2015-08-20 Bob Friesenhahn - - * tools/CMakeLists.txt, port/snprintf.c: Patch by Roger Leigh to - fix build issues when using Cmake due to Windows large file - changes. - -2015-08-18 Bob Friesenhahn - - * libtiff/tiffiop.h: First cut at supporting large files under - Microsoft Windows using tif_unix.c and the libtiff tools. This - only works if the Windows CDK is new enough to support the APIs - used (Visual C++ 2005 or later). Support for large files is not - actually tested yet. - -2015-08-15 Bob Friesenhahn - - * libtiff/tif_jpeg.c: Applied patch by Räisä Olli to assure that - client_data is initialized to a known value, and to report an - error on two memory allocation failures. - -2015-08-13 Bob Friesenhahn - - * CMakeLists.txt: Applied patch by Roger Leigh to fix libtiffxx - symbol versioning. Patch was mailed to libtiff list on Thu, 13 - Aug 2015. - -2015-07-04 Bob Friesenhahn - - * cmake: Add d suffix to debug libraries with MSVC. Patch #3 of 3 - by Roger Leigh posted to tiff list on Wed, 1 Jul 2015 15:58:20 - +0100. - - * cmake: Add extra warning flags. Patch #2 of 3 by Roger Leigh - posted to tiff list on Wed, 1 Jul 2015 15:58:20 +0100. - - * cmake: Correct snprintf fallback for VS2015. Patch #1 of 3 by - Roger Leigh posted to tiff list on Wed, 1 Jul 2015 15:58:20 +0100. - -2015-06-24 Bob Friesenhahn - - * CMakeLists.txt: Add CMake patchset by Roger Leigh as posted to - libtiff mailing list on Mon, 22 Jun 2015 21:21:01 +0100. Several - corrections to ensure that the autotools build still works were - added by me. I have not yet tested the build using 'cmake' or - MSVC with 'nmake'. - -2015-06-21 Bob Friesenhahn - - * test/Makefile.am: tiff2rgba-quad-tile.jpg.sh depends on the JPEG - library so only execute if JPEG is available. - - * libtiff 4.0.4 released. - - * configure.ac: Add a HAVE_FOO Automake conditional for each - add-on library. - - * test/Makefile.am (JPEG_DEPENDENT_CHECK_PROG): raw_decode - requires JPEG support to compile. Use Automake conditional to - only include it when JPEG support is available. - - * html/build.html: Try to improve the nmake-based VC++ build - description. - - * libtiff/tiffconf.vc.h: Build fixes based on testing. - - * libtiff/tif_config.vc.h: Build fixes based on testing. - - * libtiff/libtiff.def: TIFFRasterScanline does not exist so remove - export for it. - -2015-06-20 Bob Friesenhahn - - * libtiff/tif_config.vc.h: Make adjustments to match the new - definitions that configure produces, including for WIN64. Still - needs to be tested. - - * configure.ac: For 64-bit MinGW, fix SSIZE_FORMAT formatting - specifier. 64-bit MinGW supports 'long long' but support for - 'lld' is not assured by the run-time DLLs and so GCC warns. - Add TIFF_SIZE_T and TIFF_SIZE_FORMAT to provide a type definition - and printf format specifier to deal with printing values of - 'size_t' type. In particular, this was necessary for WIN64. - Added a configure test for if the system headers provide 'optarg' - (normal case) and block out the many explicit 'extern' statements - in the utilities. This was found to be necessary under Windows - when getopt is in a DLL and the symbols are already imported with - dllimport via standard header files. - - * test/raw_decode.c (XMD_H): Avoid conflicting typedefs for INT32 - and boolean in MinGW build due to including jpeglib.h. - - * test/rewrite_tag.c (main): Fix problem with location of variable - declaration. - - * libtiff/libtiff.def: Added exports for TIFFGetConfiguredCODECs, - TIFFReadRGBAImageOriented, TIFFSetCompressionScheme, - TIFFSwabArrayOfTriples, TIFFVGetFieldDefaulted, _TIFFCheckRealloc, - TIFFRasterScanline, TIFFSetErrorHandlerExt, - TIFFSetWarningHandlerExt, TIFFNumberOfDirectories, - TIFFCreateCustomDirectory, TIFFCreateEXIFDirectory, - TIFFWriteCustomDirectory, _TIFFRewriteField as recommended by - Roger Leigh and justified by use in libtiff tests, documentation, - and changelog notes. Also sorted symbol list and removed - duplicate entries. - -2015-06-16 Bob Friesenhahn - - * libtiff/tif_getimage.c: Fix four Coverity issues related to - unintended sign extension. - -2015-06-16 Even Rouault - - * libtiff/tif_unix.c: fix compilation with MSVC (fix by Jeff McKenna) - -2015-06-14 Lee Howard - - * libtiff/tif_unix.c: contribution from Vadim Zeitlin on - Bugzilla Bug #2510 fixes several harmless but still annoying - warnings - - * configure: contribution from Ludolf Holzheid on Bugzilla - Bug #2498. Adds an option to select the file I/O style on - Windows hosts. - - * libtiff/tif_getimage.c: contribution from Gary Cramblitt - on Bugzilla Bug #2409. Correct reading of certain tiled TIFFs. - - * configure, configure.ac: contribution from Marcos H. Woehrmann - on Bugzilla Bug #2405. Correct shell equality operator. - - * tools/tiffgt.c (raster_draw): contribution from Jay Berkenbilt - on Bugzilla Bug #2401. Appropriately call glFlush(). - - * tools/tiff2pdf.c: change ColorTransform from "0" to "1" - following Bugzilla Bug #2150. - -2015-06-13 Lee Howard - - * libtiff/tif_lzw.c: contribution from Andy Cave - decode - files that contain consecutive CODE_CLEAR codes. - - * tools/tiff2pdf.c: contribution from Antti S. Lankila on - Bugzilla Bug #2078. Suppress initial output of the header. - - * tools/tiff2pdf.c: contribution from Yuriy M. Kaminskiy - - Take care in using the return value from snprintf(). - - * tools/tiffcrop.c: contribution from Eduardo Robles Elvira - - correctly copy the compression tag from the source TIFF. - - * tools/tiff2ps.c: contribution from Eduardo Robles Elvira - - correct sizing and scaling problems with output document. - -2015-06-10 Bob Friesenhahn - - * libtiff/tif_jpeg.c (JPEGDecode): Split JPEGDecode() into two - clean implementations in order to avoid pre-processor hell. Only - one of the implementations is used in a given build. - -2015-06-08 Even Rouault - - * libtiff/tif_jpeg.c: Fix compilation in BITS_IN_JSAMPLE == 12 - case - -2015-06-07 Bob Friesenhahn - - * libtiff/tif_write.c (TIFFWriteEncodedStrip): Fix Coverity 715975 - "Division or modulo by zero". - (TIFFWriteEncodedTile): Fix Coverity 715976 and 715977 "Division - or modulo by zero". - (TIFFWriteRawStrip): Fix Coverity 715978 "Division or modulo by - zero". - (TIFFWriteScanline): Fix Coverity 715979 "Division or modulo by - zero". - - * libtiff/tif_read.c (TIFFStartTile): Fix Coverity 715973 and - 715974 "Division or modulo by zero". - -2015-05-31 Bob Friesenhahn - - * libtiff/tif_dir.c (TIFFNumberOfDirectories): Quiet Coverity - 1134470 "Logically dead code" by making the roll-over check - explicit. - - * libtiff/tif_luv.c (LogLuvDecodeTile): Fix Coverity 991227 - "Division or modulo by zero". - (LogLuvDecodeStrip): Fix Coverity 991239 "Division or modulo by - zero". - (LogLuvEncodeStrip): Fix Coverity 991240 "Division or modulo by - zero". - (LogLuvEncodeTile): Fix Coverity 991241 "Division or modulo by - zero". - - * libtiff/tif_dirread.c (TIFFReadDirEntryDoubleArray): Fix - Coverity 298626 "Logically dead code". - (TIFFReadDirEntryFloatArray): Fix Coverity 298627 "Logically dead - code". - (TIFFReadDirEntryIfd8Array): Fix Coverity 298628 "Logically dead - code". - (TIFFReadDirEntrySlong8Array): Fix Coverity 298629 "Logically dead - code" - - * libtiff/tif_dir.c (TIFFNumberOfDirectories): Don't depend on ++ - operator precedenc in evaluation. Might quench Coverity 1134470 - "Logically dead code". - - * libtiff/tif_jpeg.c (JPEGDecode): Fix Coverity 602597 "Operands - don't affect result". This change uses ifdefs to include - applicable code based on properties of libjpeg. Still needs to be - re-tested with 12-bit "6b" and "MK1". - -2015-05-30 Bob Friesenhahn - - * libtiff/tif_dirwrite.c (_TIFFRewriteField): Fix Coverity 1024310 - "Resource leak". - - * libtiff/tif_ojpeg.c (OJPEGReadHeaderInfoSecStreamDht): Fix - Coverity 601720 "Resource leak". - - * libtiff/tif_jpeg.c (JPEGCleanup): Fix Coverity 298624 - "Dereference before null check". - - * libtiff/tif_ojpeg.c (OJPEGReadBufferFill): Fix Coverity 603400 - "Missing break in switch". - - * contrib/addtiffo/tif_overview.c (TIFF_DownSample): Check buffer - size calculation for overflow. - - * contrib/addtiffo/addtiffo.c (main): Possibly address Coverity - 1024226 "Untrusted value as argument". - - * tools/gif2tiff.c (readgifimage): Fix Coverity 1024222 "Untrusted - value as argument". - (checksignature): Fix Coverity 1024894 "Ignoring number of bytes - read". - (readextension): Fix Coverity 1024893 "Ignoring number of bytes - read". - (readgifimage): Fix Coverity 1024890 "Ignoring number of bytes - read". - (readraster): Fix Coverity 1024891 "Ignoring number of bytes - read". - (readgifimage): Fix Coverity 1024892 "Ignoring number of bytes - read". - - * tools/tiff2pdf.c (t2p_readwrite_pdf_image): Fix Coverity 1024181 - "Structurally dead code". - - * tools/raw2tiff.c (main): Fix Coverity 1024887 "Unchecked return - value from library". - (guessSize): Fix Coverity 1024888 "Unchecked return value from - library". - (guessSize): Fix Coverity 1214162 "Ignoring number of bytes read". - (guessSize): Fix Coverity 1024889 "Unchecked return value from - library". - - * tools/tiff2pdf.c (t2p_readwrite_pdf_image): Fix Coverity 298621 - "Resource leak". - (t2p_readwrite_pdf_image): Fix Coverity 1024181 "Structurally dead - code". - (t2p_write_pdf): Fix Coverity 1227690 "Unused value". - -2015-05-29 Bob Friesenhahn - - * contrib/iptcutil/iptcutil.c (formatIPTC): Fix Coverity 1024468 - "Infinite loop". - (formatIPTC): Fix Coverity 1024727 "Truncated stdio return value". - (formatIPTC): Fix Coverity 1214240 "Untrusted loop bound". - -2015-05-28 Bob Friesenhahn - - * contrib/addtiffo/tif_ovrcache.c (TIFFCreateOvrCache): Fix - Coverity 298615 "Resource leak". - (TIFFGetOvrBlock): Fix Coverity 1024649 "Unintended sign - extension". - - * tools/bmp2tiff.c (main): Fix Coverity 1024225 "Untrusted value - as argument". - (main): Fix Coverity 1024678 "Unchecked return value from - library". - (main): Fix Coverity 1024679 "Unchecked return value from - library". - (main): Fix Coverity 1214160 "Ignoring number of bytes read". - - * contrib/addtiffo/tif_ovrcache.c (TIFFCreateOvrCache): Fix - Coverity 298615 "Resource leak". - - * tools/tiffcp.c: Fix Coverity 1024306, 1024307, 1024308, 1024309 - "Resource leak". - - * tools/tiffsplit.c (cpTiles): Fix Coverity 1024304 "Resource - leak". - (cpStrips): Fix Coverity 1024305 "Resource leak". - -2015-05-27 Bob Friesenhahn - - * tools/ras2tiff.c: Fix Sun Raster header definition to be safe - for 64-bit systems. Add some header validations. Should fix many - Coverity issues. - (main): Fix Coverity 1301206: "Integer handling issues (BAD_SHIFT)". - (main): Quiet Coverity 1024223 "Untrusted value as argument". - - * tools/tiffmedian.c (GetInputLine): Fix Coverity 1024795 "Nesting - level does not match indentation". - (get_histogram): Quiet Coverity 1024386 "Out-of-bounds read". - This was a benign mis-diagnosis but added code to enforce against - buffer overflow. - - * tools/tiffcrop.c (ROTATE_ANY): Fix Coverity 1294542 "Logical - vs. bitwise operator". - (readContigStripsIntoBuffer): Fix Coverity 1024545 "Division or - modulo by zero". - (readContigTilesIntoBuffer): Fix Coverity 1024586 "Logically dead - code". - (writeSingleSection): Fix Coverity 1024796 "Nesting level does not - match indentation". - (writeCroppedImage): Fix Coverity 1024797 "Nesting level does not - match indentation". - (loadImage): Fix Coverity 1299741 "Dereference before null check". - (loadImage): Fix Coverity 1299740 "Out-of-bounds write". - -2015-03-02 Even Rouault - - * tools/tiffdither.c: check memory allocations to avoid writing to - NULL pointer. Also check multiplication overflow. Fixes #2501, - CVE-2014-8128. Derived from patch by Petr Gajdos. - -2015-01-26 Even Rouault - - * add html/v4.0.4beta.html under version control - * HOWTO-RELEASE: write that cvs add html/vX.X.html must be used - -2015-01-26 Even Rouault - - * libtiff 4.0.4beta released - -2015-01-26 Even Rouault - - * automake: updated to 1.15 - * libtool: updated to 2.4.5 - -2015-01-22 Even Rouault - - * tools/tiff2pdf.c: Fix two crashes (oCERT-2014-013) - -2015-01-05 Frank Warmerdam - - * html/bugs.html: remove note about needing to email the tiff mailing - list administrator about being approved for membership, this appears - not to be true. - -2015-01-05 Olivier Paquet - - * tools/tiff2pdf.c: Fixed unsigned integer addition overflow detection. - -2015-01-03 Even Rouault - - * libtiff/tif_dirread.c: in TIFFCheckDirOffset(), avoid uint16 overflow - when reading more than 65535 directories, and effectively error out when - reaching that limit. - -2014-12-29 Even Rouault - - * libtiff/tif_jpeg.c: in JPEGFixupTags(), recognize SOF2, SOF9 and SOF10 - markers to avoid emitting a warning (even if, according to the TechNote, - there are admittedly unusual/not recommended or even forbidden variants, but - they do work well with libjpeg for SOF2, and with libjpeg-turbo for SOF2, - SOF9 and SOF10). - Define in_color_space and input_components to the right values in - JPEGSetupEncode(), before calling jpeg_set_defaults(), as specified by - libjpeg API documentation, so as to be compatible with mozjpeg library. - Note: the default settings of mozjpeg will produce progressive scans, which - is forbidden by the TechNote. - -2014-12-29 Even Rouault - - * libtiff/tif_getimage.c: move test on vertical value of YCbCr subsampling. - to avoid buffer leak (fix previous fix, found by Coverity scan) - -2014-12-29 Even Rouault - - * libtiff/tif_next.c: add new tests to check that we don't read outside of - the compressed input stream buffer. - - * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height - in the putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile and - putcontig8bitYCbCr21tile cases. - -2014-12-27 Even Rouault - - * libtiff/tif_dir.c: in TIFFDefaultDirectory(), reset any already existing - extented tags installed by user code through the extender mechaninm before - calling the extender callback (GDAL #5054) - -2014-12-26 Bob Friesenhahn - - * tools/tiffcrop.c: Fix warnings about variables set but not used. - - * contrib/iptcutil/iptcutil.c: Fix warnings about variables set - but not used. - - * tools/tiffgt.c: Fix warnings about unused parameters. - - * libtiff/tif_stream.cxx: Fix warnings about unused parameters. - -2014-12-25 Even Rouault - - * libtiff/tif_getimage.c, libtiff/tif_ojpeg.c, libtiff/tif_zip.c: fix - various typos found by Debian lintian tool (GDAL #5756) - -2014-12-24 Even Rouault - - * libtiff/tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling. - http://bugzilla.maptools.org/show_bug.cgi?id=2235 - -2014-12-24 Even Rouault - - * tools/tiff2pdf.c: fix buffer overflow on some YCbCr JPEG compressed images. - http://bugzilla.maptools.org/show_bug.cgi?id=2445 - -2014-12-24 Even Rouault - - * tools/tiff2pdf.c: fix buffer overflow on YCbCr JPEG compressed image. - Derived from patch by Petr Gajdos, - http://bugzilla.maptools.org/show_bug.cgi?id=2443 - -2014-12-23 Even Rouault - - * libtiff/tif_dirread.c: In EstimateStripByteCounts(), check return code - of _TIFFFillStriles(). This solves crashing bug on corrupted - images generated by afl. - -2014-12-23 Even Rouault - - * libtiff/tif_read.c: fix several invalid comparisons of a uint64 value with - <= 0 by casting it to int64 first. This solves crashing bug on corrupted - images generated by afl. - -2014-12-21 Bob Friesenhahn - - * tools/tiffdump.c: Guard against arithmetic overflow when - calculating allocation buffer sizes. - -2014-12-21 Even Rouault - - * tools/tiff2bw.c: when Photometric=RGB, the utility only works if - SamplesPerPixel = 3. Enforce that - http://bugzilla.maptools.org/show_bug.cgi?id=2485 (CVE-2014-8127) - -2014-12-21 Even Rouault - - * tools/pal2rgb.c, tools/thumbnail.c: fix crash by disabling TIFFTAG_INKNAMES - copying. The right fix would be to properly copy it, but not worth the burden - for those esoteric utilities. - http://bugzilla.maptools.org/show_bug.cgi?id=2484 (CVE-2014-8127) - -2014-12-21 Even Rouault - - * tools/thumbnail.c: fix out-of-buffer write - http://bugzilla.maptools.org/show_bug.cgi?id=2489 (CVE-2014-8128) - -2014-12-21 Even Rouault - - * tools/thumbnail.c, tools/tiffcmp.c: only read/write TIFFTAG_GROUP3OPTIONS - or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or - COMPRESSION_CCITTFAX4 - http://bugzilla.maptools.org/show_bug.cgi?id=2493 (CVE-2014-8128) - -2014-12-21 Even Rouault - - * libtiff/tif_next.c: check that BitsPerSample = 2. Fixes - http://bugzilla.maptools.org/show_bug.cgi?id=2487 (CVE-2014-8129) - -2014-12-21 Even Rouault - - * tools/tiff2pdf.c: check return code of TIFFGetField() when reading - TIFFTAG_SAMPLESPERPIXEL - -2014-12-21 Even Rouault - - * tools/tiffcp.c: fix crash when converting YCbCr JPEG-compressed to none. - Based on patch by Tomasz Buchert (http://bugzilla.maptools.org/show_bug.cgi?id=2480) - Description: fix for Debian bug #741451 - tiffcp crashes when converting JPEG-encoded TIFF to a different - encoding (like none or lzw). For example this will probably fail: - tiffcp -c none jpeg_encoded_file.tif output.tif - The reason is that when the input file contains JPEG data, - the tiffcp code forces conversion to RGB space. However, - the output normally inherits YCbCr subsampling parameters - from the input, which leads to a smaller working buffer - than necessary. The buffer is subsequently overrun inside - cpStripToTile() (called from writeBufferToContigTiles). - Note that the resulting TIFF file would be scrambled even - if tiffcp wouldn't crash, since the output file would contain - RGB data intepreted as subsampled YCbCr values. - This patch fixes the problem by forcing RGB space on the output - TIF if the input is JPEG-encoded and output is *not* JPEG-encoded. - Author: Tomasz Buchert - -2014-12-21 Even Rouault - - Fix various crasher bugs on fuzzed images. - * libtiff/tif_dir.c: TIFFSetField(): refuse to set negative values for - TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION that cause asserts when writing - the directory - * libtiff/tif_dirread.c: TIFFReadDirectory(): refuse to read ColorMap or - TransferFunction if BitsPerSample has not yet been read, otherwise reading - it later will cause user code to crash if BitsPerSample > 1 - * libtiff/tif_getimage.c: TIFFRGBAImageOK(): return FALSE if LOGLUV with - SamplesPerPixel != 3, or if CIELAB with SamplesPerPixel != 3 or BitsPerSample != 8 - * libtiff/tif_next.c: in the "run mode", use tilewidth for tiled images - instead of imagewidth to avoid crash - * tools/bmp2tiff.c: fix crash due to int overflow related to input BMP dimensions - * tools/tiff2pdf.c: fix crash due to invalid tile count (should likely be checked by - libtiff too). Detect invalid settings of BitsPerSample/SamplesPerPixel for CIELAB / ITULAB - * tools/tiffcrop.c: fix crash due to invalid TileWidth/TileHeight - * tools/tiffdump.c: fix crash due to overflow of entry count. - -2014-12-15 Even Rouault - - * libtiff/tif_jpeg.c: Fix regression introduced on 2010-05-07 that caused - all tiles/strips to include quantization tables even when the jpegtablesmode - had the JPEGTABLESMODE_QUANT bit set. - Also add explicit removal of Huffman tables when jpegtablesmode has the - JPEGTABLESMODE_HUFF bit set, which avoids Huffman tables to be emitted in the - first tile/strip (only useful in update scenarios. create-only was - fine) - -2014-12-09 Bob Friesenhahn - - * tools/tiff2pdf.c: Assure that memory size calculations for - _TIFFmalloc() do not overflow the range of tmsize_t. - -2014-12-07 Even Rouault - - * tools/thumbnail.c, tools/tiffcrop.c: "fix" heap read over-run found with - Valgrind and Address Sanitizer on test suite - -2014-12-07 Bob Friesenhahn - - * tools/tiff2pdf.c (t2p_read_tiff_init): TIFFTAG_TRANSFERFUNCTION - tag can return one channel, with the other two channels set to - NULL. The tiff2pdf code was expecting that other two channels - were duplicate pointers in the case where there is only one - channel. Detect this condition in order to avoid a crash, and - presumably perform correctly with just one channel. - -2014-12-06 Bob Friesenhahn - - * tools/tiffdump.c: Fix double-free bug. - -2014-11-27 Even Rouault - - * libtiff/tif_config.vc.h: no longer use "#define snprintf _snprintf" with - Visual Studio 2015 aka VC 14 aka MSVC 1900 - -2014-11-20 Even Rouault - - * libtiff/tif_lzw.c: prevent potential null dereference of - sp->dec_codetab in LZWPreDecode (bug #2459) - - * libtiff/tif_read.c: in TIFFReadBufferSetup(), avoid passing -1 size - to TIFFmalloc() if passed user buffer size is 0 (bug #2459) - - * libtiff/tif_ojpeg.c: make Coverity happier (not a bug, #2459) - - * libtiff/tif_dir.c: in _TIFFVGetField() and _TIFFVSetField(), make - Coverity happier (not a bug, #2459) - - * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make Coverity happier - (not a bug, #2459) - - * tools/tiff2pdf.c: close PDF file (bug #2479) - - * tools/fax2ps.c: check malloc()/realloc() result (bug #2470) - - * tools/tiffdump.c: detect cycle in TIFF directory chaining (bug #2463) - and avoid passing a NULL pointer to read() if seek() failed before (bug #2459) - - * tools/tiffcrop.c: fix segfault if bad value passed to -Z option - (bug #2459) and add missing va_end in dump_info (#2459) - - * tools/gif2tif.c: apply patch for CVE-2013-4243 (#2451) - -2014-11-20 Even Rouault - * libtiff/tif_jpeg.c: fix segfault in JPEGFixupTagsSubsampling() on - corrupted image where tif->tif_dir.td_stripoffset == NULL (bug #2471) - -2014-11-20 Even Rouault - * automake: updated to 1.14.1 - * libtool: updated to 2.4.3 - * HOWTO-RELEASE: small update about autotools building order - -2014-10-20 Olivier Paquet - * tools/tiff2pdf.c: Preserve input file directory order when pages - are tagged with the same page number. - -2014-08-31 Bob Friesenhahn - - * libtiff/tif_dirread.c (TIFFReadDirEntryOutputErr): Incorrect - count for tag should be a warning rather than an error since - errors terminate processing. - -2014-06-07 Bob Friesenhahn - - * tools/tiff2rgba.c (]): Fixed tiff2rgba usage message in that zip - was wrongly described. Fix suggested by Miguel Medalha. - -2014-05-06 Bob Friesenhahn - - * libtiff/tif_dirinfo.c (TIFFField) : Fix data type for - TIFFTAG_GLOBALPARAMETERSIFD tag. Patch by Steve Underwood. - Reviewed and forwarded by Lee Howard. - -2013-11-30 Frank Warmerdam - - * libtiff/tif_dir.c: fix last fix for TIFFNumberOfDirectories() - -2013-10-21 Frank Warmerdam - - * libtiff/tif_dir.c: generate error in case of directory count - overflow. - -2013-10-01 Frank Warmerdam - - * libtiff/tiff.h, libtiff/tif_dirinfo.c: add definitions for - TIFF/EP CFARepeatPatternDim and CFAPattern tags (bug #2457) - -2013-09-12 Bob Friesenhahn - - * libtiff/tif_dir.c (TIFFAdvanceDirectory): If nextdir is found to - be defective, then set it to zero before returning error in order - to terminate processing of truncated TIFF. Issue found and fix - suggested by Richard Nolde. - -2013-08-14 Frank Warmerdam - - * tools/gif2tiff.c: fix possible OOB write (#2452, CVE-2013-4244) - -2013-08-13 Frank Warmerdam - - * tools/gif2tiff.c: Be more careful about corrupt or - hostile input files (#2450, CVE-2013-4231) - - * tools/tiff2pdf.c: terminate after failure of allocating - ycbcr buffer (bug #2449, CVE-2013-4232) - -2013-07-09 Frank Warmerdam - - * tools/tiffinfo.c: Default various values fetched with - TIFFGetField() to avoid being uninitialized. - -2013-05-02 Tom Lane - - * tools/tiff2pdf.c: Rewrite JPEG marker parsing in - t2p_process_jpeg_strip to be at least marginally competent. The - approach is still fundamentally flawed, but at least now it won't - stomp all over memory when given bogus input. Fixes CVE-2013-1960. - -2013-05-02 Tom Lane - - * contrib/dbs/xtiff/xtiff.c, libtiff/tif_codec.c, - libtiff/tif_dirinfo.c, tools/rgb2ycbcr.c, tools/tiff2bw.c, - tools/tiff2pdf.c, tools/tiff2ps.c, tools/tiffcrop.c, - tools/tiffdither.c: Enlarge some fixed-size buffers that weren't - large enough, and eliminate substantially all uses of sprintf(buf, - ...) in favor of using snprintf(buf, sizeof(buf), ...), so as to - protect against overflow of fixed-size buffers. This responds in - particular to CVE-2013-1961 concerning overflow in tiff2pdf.c's - t2p_write_pdf_page(), but in general it seems like a good idea to - deprecate use of sprintf(). - -2013-03-29 Bob Friesenhahn - - * configure.ac: Applied patch by Brad Smith to improve pkg-config - static linking by adding -lm to Libs.private when needed. - -2013-03-05 Tom Lane - - * html/man/tiff2ps.1.html, html/man/tiffcp.1.html, - html/man/tiffdither.1.html, man/tiff2ps.1, man/tiffcp.1, - man/tiffdither.1, tools/tiff2ps.c, tools/tiffcp.c, - tools/tiffdither.c: Sync tool usage printouts and man pages with - reality (quite a few options had escaped being documented in one - or both places). Per an old report from Miroslav Vadkerti. - -2013-01-25 Bob Friesenhahn - - * tools/tiff2ps.c:Fix bug in auto rotate option code. Once a - rotation angle was set by the auto rotate check, it was retained - for all pages that followed instead ofa being retested for each - page. Patch by Richard Nolde. - -2013-01-18 Frank Warmerdam - - * libtiff/tif_write.c: tmsize_t related casting warning fixed for - 64bit linux. - - * libtiff/tif_read.c: uint64/tmsize_t change for MSVC warnings. - http://bugzilla.maptools.org/show_bug.cgi?id=2427 - -2012-12-20 Tom Lane - - * test/raw_decode.c: Relax raw_decode's pixel-value checks so that - it will pass with more versions of libjpeg. (There are at least - three in active use now, and JPEG_LIB_VERSION doesn't tell us - enough to uniquely identify expected results.) - -2012-12-12 Tom Lane - - * libtiff/tif_print.c: Fix TIFFPrintDirectory's handling of - field_passcount fields: it had the TIFF_VARIABLE and - TIFF_VARIABLE2 cases backwards. - -2012-12-10 Tom Lane - - * tools/ppm2tiff.c: Improve previous patch for CVE-2012-4564: - check the linebytes calculation too, get the max() calculation - straight, avoid redundant error messages, check for malloc - failure. - -2012-12-10 Tom Lane - - * libtiff/tif_pixarlog.c: Improve previous patch for CVE-2012-4447 - (to enlarge tbuf for possible partial stride at end) so that - overflow in the integer addition is detected. Per gripe from - Huzaifa Sidhpurwala. - -2012-12-03 Bob Friesenhahn - - * tools/tiffset.c: tiffset now supports a -u option to unset a - tag. Patch by Zach Baker. See - http://bugzilla.maptools.org/show_bug.cgi?id=2419 - -2012-11-18 Bob Friesenhahn - - * automake: Update Automake to 1.12.5 release. - - * libtiff/tif_{unix,vms,win32}.c (_TIFFmalloc): ANSI C does not - require malloc() to return NULL pointer if requested allocation - size is zero. Assure that _TIFFmalloc does. - -2012-11-01 Frank Warmerdam - - * tools/ppm2tiff.c: avoid zero size buffer vulnerability. - CVE-2012-4564 - Thanks to Huzaifa Sidhpurwala of the - Red Hat Security Response team for the fix. - -2012-10-18 Frank Warmerdam - - * tif_zip.c: Avoid crash on NULL error messages. - -2012-09-22 Bob Friesenhahn - - * libtiff 4.0.3 released. - -2012-09-20 Bob Friesenhahn - - * Makefile.am: Update to Automake 1.12.4 - -2012-08-19 Bob Friesenhahn - - * Makefile.in: Update to Automake 1.12.3 - - * libtiff{tiff.h, tif_print.c, tif_dirinfo.c, tif_dirread.c}: Add - some TIFF/FX support in libtiff. Add the tag definitions to - tiff.h. Add the related TIFF field definitions to tif_dirinfo.c, - and also fixes an error in a comment. Adds the photometric values - to tif_print.c, and fixes a bug. These changes are by Steve - Underwood. - -2012-08-13 Frank Warmerdam - - * libtiff/tif_write.c: Fix bug rewriting image tiles in a - compressed file: http://trac.osgeo.org/gdal/ticket/4771 - -2012-08-02 Frank Warmerdam - - * libtiff/tif_dirread.c: report error in case of mismatch value - counts for tags (ie. DotRange). - -2012-07-26 Tom Lane - - * libtiff/{tiffio.h, tif_dirinfo.c, libtiff.def}: Add six new - functions TIFFFieldTag(), TIFFFieldName(), TIFFFieldDataType(), - TIFFFieldPassCount(), TIFFFieldReadCount(), TIFFFieldWriteCount() - as external accessors for the opaque type TIFFField. - - * tools/tiffset.c: Make tiffset use the above functions instead of - relying on library private headers. - -2012-07-19 Tom Lane - - * tools/tiff2pdf.c: Fix two places where t2p_error didn't get set - after a malloc failure. No crash risk AFAICS, but the program - might not report exit code 1 as desired. h/t mancha@mac.hush.com - -2012-07-18 Tom Lane - - * tools/tiff2pdf.c: Fail when TIFFSetDirectory() fails. This - prevents core dumps or perhaps even arbitrary code execution when - processing a corrupt input file (CVE-2012-3401). - -2012-07-06 Bob Friesenhahn - - * test/raw_decode.c (main): Test fixes to work with IJG JPEG 7+. - IJG JPEG 7+ uses a different upsampling algorithm which produces - different numeric results. - - * libtiff/tif_jpeg.c (JPEGPreDecode): Patch from Even Rouault to - work with IJG JPEG 7+. - -2012-07-04 Bob Friesenhahn - - * test/raw_decode.c: Add changes so that test can run with build - directory outside of source directory. - -2012-07-02 Frank Warmerdam - - * libtiff/tif_jpeg.c: Fix handling when writing RGBA jpeg compressed - imagery (http://trac.osgeo.org/gdal/ticket/4732) - -2012-06-20 Frank Warmerdam - - * libtiff/tif_fax3.c: fix memory initialization of runs, only - partly done. - - * libtiff/tif_pixarlog.c: Make sure tbuf is large enough for one - full "stride" past the end. - -2012-06-19 Frank Warmerdam - - * libtiff/tif_packbits.c: fix read past end of data buffer. - -2012-06-15 Frank Warmerdam - - * libtiff 4.0.2 released. - - * tools/tif2pdf.c, tools/tifdump.c: avoid unitialized variable - warnings with clang. - -2012-06-15 Tom Lane - - * tools/tiff2pdf.c: Defend against integer overflows while - calculating required buffer sizes (CVE-2012-2113). - -2012-06-12 Frank Warmerdam - - * libtiff/tif_print.c: Be careful about printing corrupt inknames. - - * libtiff/tif_fax3.c: Ensure runs array is initialized to zeros. - -2012-06-07 Frank Warmerdam - - * libtiff/tif_print.c: avoid pretty printing other fields when - we don't have the proper amount and type of data or if the field - is actually autodefined. - -2012-06-05 Frank Warmerdam - - * libtiff/tif_tile.c, libtiff/tif_strip.c: Ensure that illegal - ycbcrsubsampling values result in a runtime error, not just an - assertion. - - * tests/custom_dir.c: Add testing of EXIF and custom directory - reading and writing. - - * libtiff/tif_dir.c, libtiff/tiffio.h: Add TIFFCreateCustomDirectory() - and TIFFCreateEXIFDirectory() functions. - - * libtiff/tif_dir.c, tif_print.c : Remove FIELD_CUSTOM handling for - PAGENUMBER, HALFTONEHINTS, and YCBCRSUBSAMPLING. Implement DOTRANGE - differently. This is to avoid using special TIFFGetField/TIFFSetField - rules for these fields in non-image directories (like EXIF). - -2012-06-04 Frank Warmerdam - - * libtiff/tif_jpeg.c: Remove code for fixing up h_sampling and v_sampling - in JPEGPreDecode(). If a fixup will be done it needs to be done sooner - in JPEGFixupTagsSubsampling() or else buffer sized may be wrong. - -2012-06-01 Frank Warmerdam - - * tools/tiffinfo.c: Do not try to read image data in EXIF directories. - - * libtiff/tif_getimage.c: added support for _SEPARATED CMYK images. - http://bugzilla.maptools.org/show_bug.cgi?id=2379 - - * libtiff/tif_unix.c: use strerror() to return a more specific error message - on failed open. - http://bugzilla.maptools.org/show_bug.cgi?id=2341 - - * libtiff/tif_jpeg.c: Fix JPEGDecodeRaw() bugs. - http://bugzilla.maptools.org/show_bug.cgi?id=2386 - - * tests/decode_raw.c, tests/images/quad-tile.jpg.tiff: add limited support - for testing jpeg in tiff image decoding including the "raw" decode interface. - -2012-05-31 Frank Warmerdam - - * libtiff/tif_jpeg.c: avoid overrunning the end of the output buffer in - JPEGDecodeRaw() - mostly likely to occur when there is confusion about - sampling values. - - * libtiff/tif_read.c: Make sure tif_rawdatasize is cleared when tif_rawdata is freed. - - * libtiff/tif_getimage.c: Add support for greyscale+alpha c/o Jérémie Laval. - http://bugzilla.maptools.org/show_bug.cgi?id=2398 - -2012-05-29 Frank Warmerdam - - * libtiff/tif_dir.c: avoid using specific set/get logic to process fields in custom directories, - like EXIF directories. This fixes problems like a tag "320" existing in a custom directory getting - processed as if it were a colormap when it isn't really. Damn the wide variety of argument formulations - to get/set functions for different tags! - - * libtiff/tif_dir.c: Ensure that we keep track of when tif_rawdata - is a pointer into an mmap()ed file via TIFF_BUFFERMMAP flag. - -2012-05-24 Frank Warmerdam - - * libtiff/tif_pixarlog.c: Allocate working buffer one word larger since we "forward - accumulate" and overwrite the end by one word in at least some cases. - -2012-05-23 Frank Warmerdam - - * libtiff/tif_pixarlog.c: avoid accessing out of the lookup arrays for out of range inputs. - - * tools/tiffinfo.c: initialize h=0 to avoid undefined variable for degenerate files. - - * libtiff/tif_ojpeg.c: if OJPEGWriteHeader() fails once do not bother trying again on - the same image. - - * libtiff/tif_ojpeg.c: make things more resilient in the face of files without - stripbytecounts or stripoffsets or where loading these fails. - - * libtiff/tif_print.c: be careful about whether min/max values are singular - or one per sample. - - * libtiff/tif_print.c: Avoid confusion about count size when printing custom fields. - May affect things like ISOSpeedRatings. - - * libtiff/tif_dir.c: avoid one byte past end of ink names reading - in some cases. - -2012-05-19 Bob Friesenhahn - - * man/TIFFGetField.3tiff: Correct the 'count' field type in the - example for how to retrieve the value of unsupported tags. - -2012-03-30 Frank Warmerdam - - * tif_getimage.c: Fix size overflow (zdi-can-1221,CVE-2012-1173) - care of Tom Lane @ Red Hat. - -2012-02-18 Bob Friesenhahn - - * libtiff 4.0.1 released. - - * Update automake used to 1.11.3. - - * libtiff/tiffio.h: Use double-underbar syntax in GCC printf - attribute specification to lessen the risk of accidental macro - substitution. Patch from Vincent Torri. - -2012-01-31 Frank Warmerdam - - * libtiff/tif_dir.c, libtiff/tif_dirread.c: Extra caution around - assumption tag fetching is always successful. - - * libtiff/tif_jpeg.c: Extra caution for case where sp is NULL. - -2012-01-22 Bob Friesenhahn - - * configure.ac: Add support for using library symbol versioning on - ELF systems with the GNU linker. Support is enabled via - --enable-ld-version-script. Disabled by default for now until - there is a decision for how to deploy a libtiff with versioned - symbols after libtiff 4.0.0 was already released. - -2011-12-22 Bob Friesenhahn - - * libtiff/tif_win32.c: Eliminate some minor 64-bit warnings in - - tif_win32.c. Patch by Edward Lam. - - * configure.ac: Add libtiff private dependency on -llzma for - pkg-config. Patch by Mark Brand. - Updated Automake to 1.11.2. - -2011-12-21 Bob Friesenhahn - - * libtiff 4.0.0 released. - -2011-12-08 Frank Warmerdam - - * libtiff/tif_dirread.c, libtiff/tif_read.c: more cautious checking - of _TIFFFillStriles() results (#gdal 4372) - -2011-12-07 Frank Warmerdam - - * libtiff/tif_dirread.c: fixes to deal with invalid files where - _TIFFFillStriles() fails, and we try to chop up strips (gdal #4372) - - * libtiff/tif_dirread.c: fix error reporting when there is no - tag information struct and name (gdal #4373) - -2011-10-22 Bob Friesenhahn - - * Update GNU libtool to 2.4.2. - - * tools/tiffsplit.c (tiffcp): TIFFGetField count field should be - uint32 type for TIFFTAG_JPEGTABLES. Patch by Christophe - Deroulers. - -2011-06-21 Frank Warmerdam - - * libtiff/libtiff.def: Restore TIFFMergeFieldInfo. - -2011-05-31 Jim Meyering - - * libtiff/tif_dirread.c (TIFFFetchStripThing): Free "data" also - upon failure to allocate "resizeddata". - * tools/tiff2ps.c (PSDataBW): Zero buffer *after* checking for - allocation failure, not before. - * libtiff/tif_ojpeg.c: plug leaks on OJPEG read failure path - * tools/rgb2ycbcr.c (cvtRaster): unchecked malloc - * libtiff/tif_jpeg.c, tools/tiff2pdf.c, tools/tiff2ps.c: mark - NULL-deref and possible overflow - * tools/tiff2pdf.c: remove decl+set of set-but-not-used local, "written" - * libtiff/tif_jpeg.c (JPEGInitializeLibJPEG): Remove declaration - and set of otherwise unused local, data_is_empty. - * libtiff/tif_jpeg.c (JPEGDecodeRaw) [JPEG_LIB_MK1_OR_12BIT]: - Diagnose out-of-memory failure and return 0 rather than - dereferencing NULL. - -2011-05-24 Frank Warmerdam - - * libtiff/tif_dirread.c: produce special error message for zero tag - directories instead of error out on the malloc(0) failure. - -2011-05-16 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Restore TIFFMergeFieldInfo() and - related declarations as they are in active use by libraries - such as libgeotiff, and work just fine. (#2315) - -2011-04-20 Frank Warmerdam - - * libtiff/tif_dirinfo.c,tiffio.h: Remove the obsolete - TIFFMergeFieldInfo/TIFFFindFieldInfo/TIFFFindFieldInfoByName API. - http://bugzilla.maptools.org/show_bug.cgi?id=2315 - - * libtiff/libtiff.def: add some missing (64bit) APIs. - http://bugzilla.maptools.org/show_bug.cgi?id=2316 - -2011-04-09 Bob Friesenhahn - - * libtiff 4.0.0beta7 released. - -2011-04-09 Bob Friesenhahn - - * configure.ac: Should use AC_CANONICAL_HOST since host specifies - the run-time target whereas target is used to specify the final - output target if the package is a build tool (like a compiler), - which libtiff is not. Resolves libtiff bug 2307 "Use - AC_CANONICAL_HOST macro". - -2011-04-02 Bob Friesenhahn - - * configure.ac: Support configuring TIFF_INT64_FORMAT and - TIFF_UINT64_FORMAT appropriately for MinGW32. - - * tools/tiffdump.c (ReadDirectory): MinGW32 needs to use WIN32 - printf conventions for 64-bit types because it uses the WIN32 CRT. - - * libtiff/{tif_dumpmode.c,tif_luv.c,tif_lzw.c,tif_print.c, - tif_read.c,tif_strip.c,tif_thunder.c}: MinGW32 needs to use WIN32 - printf conventions for 64-bit types because it uses the WIN32 CRT. - - * tools/tiff2pdf.c (t2p_write_pdf_string): Fix printf syntax not - understood by WIN32 CRT. - - * libtiff/tif_ojpeg.c: Fixes to compile with MinGW32 GCC. - - * tools/fax2ps.c (main): Use tmpfile() rather than mkstemp() since - it is much more portable. Tmpfile is included in ISO/IEC - 9899:1990 and the WIN32 CRT. - -2011-03-26 Frank Warmerdam - - * tools/tiffset.c: add -d and -sd switches to allow operation on - a particular directory, not just the first (jef). - -2011-03-21 Frank Warmerdam - - * libtiff/tif_thunder.c: Correct potential buffer overflow with - thunder encoded files with wrong bitspersample set. The libtiff - development team would like to thank Marin Barbella and TippingPoint's - Zero Day Initiative for reporting this vulnerability (ZDI-CAN-1004, - CVE-2011-1167). - http://bugzilla.maptools.org/show_bug.cgi?id=2300 - -2011-03-10 Frank Warmerdam - - * libtiff/tif_fax3.h: Fix to last change allowing zero length - runs at the start of a scanline - needed for legal cases. - -2011-03-02 Frank Warmerdam - - * libtiff/tif_fax3.h: Protect against a fax VL(n) codeword commanding - a move left. Without this, a malicious input file can generate an - indefinitely large series of runs without a0 ever reaching the right - margin, thus overrunning our buffer of run lengths. Per CVE-2011-0192. - This is a modified version of a patch proposed by Drew Yao of Apple - Product Security. It adds an unexpected() report, and disallows the - equality case, since emitting a run without increasing a0 still allows - buffer overrun. - -2011-02-23 Frank Warmerdam - - * libtiff/tif_jpeg.c: avoid divide by zero in degenerate case (#2296) - - * tools/tiff2rgba.c: close source file on error to make leak - detection easier. - - * libtiff/tif_getimage.c: avoid leaks if TIFFRGBAImageBegin() fails. - - http://bugzilla.maptools.org/show_bug.cgi?id=2295 - -2011-02-22 Frank Warmerdam - - * libtiff/tif_lzma.c: Maintain tif_rawcc/tif_rawcp (CHUNKY_STRING_READ - _SUPPORT) - -2011-02-18 Frank Warmerdam - - * configure.ac, configure: Added support for --enable-chunky-strip-read - configure option to enable the experimental feature from a couple - months ago for reading big strips in chunks. - - * configure.ac, tif_read.c, tif_readdir.c, tif_dir.h, tiffiop.h, - tif_write.c, tif_print.c, tif_jpeg.c, tif_dirwrite.c, tif_write.c: - Implement optional support for deferring the load of strip/tile - offset and size tags for optimized scanning of directories. Enabled - with the --enable-defer-strile-load configure option (DEFER_STRILE_LOAD - #define in tif_config.h). - -2011-02-11 Frank Warmerdam - - * libtiff/tif_print.c: remove unused variable. - -2011-02-09 Frank Warmerdam - - * libtiff/tif_win32.c: avoid error/warning buffer overrun problem - with non-console (popup message) builds on win32. - - http://bugzilla.maptools.org/show_bug.cgi?id=2293 - -2011-01-24 Olivier Paquet - - * libtiff/{tif_dir.{h,c}, tif_dirinfo.c, tif_dirread.c, tif_dirwrite.c, - tif_print.c, tiff.h, tiffiop.h} : Added support for - TIFFTAG_SMINSAMPLEVALUE and TIFFTAG_SMAXSAMPLEVALUE to have different - values for each sample. Presents the min/max of all samples by default for - compatibility. TIFFSetField/TIFFGetField can be made to handle those tags - as arrays by changing the new TIFFTAG_PERSAMPLE pseudo tag. - http://www.asmail.be/msg0055458208.html - -2011-01-06 Frank Warmerdam - - * libtiff/tif_pixarlog.c: Note that tif_rawcc/tif_rawcp are not - maintained. - - * libtiff/tif_zip.c: Maintain tif_rawcc/tif_rawcp when decoding - for CHUNKY_STRIP_READ_SUPPORT. - - * libtiff/tif_jpeg.c: ensure that rawcc and rawcp are maintained - during JPEGPreDecode and JPEGDecode calls. - * libtiff/tif_read.c: larger read ahead for CHUNKY_STRIP_READ_SUPPORT, - as compression formats like JPEG keep 16 lines interleaved in a sense - and might need to touch quite a bit of data. - - http://trac.osgeo.org/gdal/ticket/3894 - -2011-01-03 Lee Howard - - * libtiff/tif_jpeg.c: Fix regressions with 2 and 3 band images - caused by commit on 2010-12-14. Submitted by e-mail from - Even Rouault - -2010-12-31 Olivier Paquet - - * libtiff/tif_dirwrite.c: Fixed writing of TIFFTAG_REFERENCEBLACKWHITE. - http://bugzilla.maptools.org/show_bug.cgi?id=2266 - -2010-12-23 Andrey Kiselev - - * tools/tiffcp.c, man/tiffcp.1: Added support for specifying the - compression level parameter (preset) for Deflate and LZMA encoders, - e.g "-c lzma:p1" or "-c zip:p9". - - * libtiff/tif_lzma.c: Properly set the LZMA2 compression level - (preset) in LZMAVSetField(). - -2010-12-18 Bob Friesenhahn - - * libtiff/Makefile.am (libtiff_la_SOURCES): Added tif_lzma.c to - Makefile. - -2010-12-14 Andrey Kiselev - - * configure.ac, libtiff/{tif_codec.c, tif_config.h.in, tiff.h, - tiffiop.h, tif_lzma.c}, tools/tiffcp.c, man/tiffcp.1: Implement a new - TIFF compression scheme LZMA reserving a new value 34925 for - Compression tag. As per - bug http://bugzilla.maptools.org/show_bug.cgi?id=2221 - -2010-12-14 Lee Howard - - * libtiff/tif_dirread.c: tolerate some cases where - FIELD_COLORMAP is missing - http://bugzilla.maptools.org/show_bug.cgi?id=2189 - -2010-12-14 Lee Howard - - * libtiff/tif_read.c: change read_ahead to tmsize_t - http://bugzilla.maptools.org/show_bug.cgi?id=2222 - -2010-12-14 Lee Howard - - * configure.ac, libtiff/Makefile.am: Build tif_win32.c on - Windows except on Cygwin - http://bugzilla.maptools.org/show_bug.cgi?id=2224 - -2010-12-14 Lee Howard - - * tools/gif2tiff.c: fix buffer overrun - http://bugzilla.maptools.org/show_bug.cgi?id=2270 - -2010-12-14 Lee Howard - - * libtiff/tif_jpeg.c: reduce usage of JCS_UNKNOWN in order - to improve compatibility with various viewers - submitted by e-mail from Dwight Kelly - -2010-12-13 Lee Howard - - * tools/fax2ps.c: be consistent with page-numbering - http://bugzilla.maptools.org/show_bug.cgi?id=2225 - -2010-12-13 Lee Howard - - * libtiff/tif_color.c: prevent crash in handling bad TIFFs - resolves CVE-2010-2595 - http://bugzilla.maptools.org/show_bug.cgi?id=2208 - -2010-12-13 Lee Howard - - * tools/tiffcrop.c: new release by Richard Nolde - http://bugzilla.maptools.org/show_bug.cgi?id=2004 - -2010-12-12 Lee Howard - - * tools/tiff2pdf.c: fix colors for images with RGBA - interleaved data - http://bugzilla.maptools.org/show_bug.cgi?id=2250 - -2010-12-12 Lee Howard - - * libtiff/tif_dirread.c: fix for Zeiss LSM and Canon CR2 files - http://bugzilla.maptools.org/show_bug.cgi?id=2164 - -2010-12-11 Lee Howard - - * tools/tiff2pdf.c: remove invalid duplication for Lab - http://bugzilla.maptools.org/show_bug.cgi?id=2162 - -2010-12-11 Lee Howard - - * libtiff/tif_jpeg.c: fix use of clumplines calculation - http://bugzilla.maptools.org/show_bug.cgi?id=2149 - -2010-12-11 Lee Howard - - * tools/fax2ps.c: replace unsafe tmpfile() with mkstemp() - http://bugzilla.maptools.org/show_bug.cgi?id=2118 - -2010-12-11 Lee Howard - - * libtiff/tif_ojpeg.c, libtiff/tif_pixarlog.c, - libtiff/tif_zip.c: fix build errors for VC6 - http://bugzilla.maptools.org/show_bug.cgi?id=2105 - -2010-12-11 Lee Howard - - * libtiff/tif_stream.cxx: warnings cleanup - http://bugzilla.maptools.org/show_bug.cgi?id=2091 - * libtiff/tif_dirread.c: warnings cleanup - http://bugzilla.maptools.org/show_bug.cgi?id=2092 - -2010-12-11 Lee Howard - - * tools/tiff2pdf.c: add fill-page option - http://bugzilla.maptools.org/show_bug.cgi?id=2051 - -2010-12-11 Lee Howard - - * libtiff/tif_dirread.c: modify warnings - http://bugzilla.maptools.org/show_bug.cgi?id=2016 - -2010-12-11 Lee Howard - - * libtiff/tif_ojpeg.c: fix buffer overflow on problem data - http://bugzilla.maptools.org/show_bug.cgi?id=1999 - -2010-12-11 Lee Howard - - * tools/tiffinfoce.c: strip byte counts are uint64* now - -2010-12-11 Lee Howard - - * libtiff/tif_ojpeg.c: fix crash when reading a TIFF with a zero - or missing byte-count tag - * tools/tiffsplit.c: abort when reading a TIFF without a byte-count - per http://bugzilla.maptools.org/show_bug.cgi?id=1996 - -2010-12-08 Lee Howard - - * libtiff/tif_dirread.c: fix crash when reading a badly-constructed - TIFF per http://bugzilla.maptools.org/show_bug.cgi?id=1994 - -2010-12-06 Lee Howard - - * libtiff/tif_open.c: Fix mode check before opening a file. - http://bugzilla.maptools.org/show_bug.cgi?id=1906 - -2010-11-27 Bob Friesenhahn - - * libtiff-4.pc.in: Added libtiff pkg-config .pc file support. - Patch by Vincent Torri. - -2010-10-21 Frank Warmerdam - - * tools/tiffinfo.c: avoid direct reference to _TIFFerrorHandler. - - * libtiff/tif_config.vc.h: define snprintf to _snprintf for tiff2pdf. - - * libtiff/libtiff.def: export _TIFFCheckMalloc for tools. - -2010-09-25 Lee Howard - - * tools/tiff2ps.c: improvements and enhancements from Richard Nolde - with additional command line options for Document Title, - Document Creator, and Page Orientation - -2010-07-13 Bob Friesenhahn - - * tools/tiffcrop.c: Patch from Richard Nolde to avoid a - potentially unterminated buffer due to using an exceptionally long - file name. - -2010-07-08 Andrey Kiselev - - * tools/tiff2pdf.c: Fixed ID buffer filling in - t2p_write_pdf_trailer(), thanks to Dmitry V. Levin. - -2010-07-07 Andrey Kiselev - - * libtiff/tif_dirread.c: Really reset the tag count in CheckDirCount() - to expected value as the warning message suggests. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=1963 - -2010-07-06 Andrey Kiselev - - * tools/tiffset.c: Properly handle TIFFTAG_PAGENUMBER, - TIFFTAG_HALFTONEHINTS, TIFFTAG_YCBCRSUBSAMPLING, TIFFTAG_DOTRANGE - which should be set by value. - - * libtiff/tif_dirinfo.c: Don't use assertions in _TIFFFieldWithTag() - and _TIFFFieldWithName() if the tag is not found in the tag table. - This should be normal situation and returned NULL value should be - properly handled by the caller. - -2010-07-02 Andrey Kiselev - - * libtiff/tif_getimage.c: Avoid wrong math du to the signed/unsigned - integer type conversions. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2207 - - * tools/{tiff2bw.c, thumbnail.c, pal2rgb.c}: Fix the count for - WhitePoint tag as per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2042 - - * libtiff/tif_getimage.c: Check the number of samples per pixel when - working with YCbCr image in PickContigCase(). As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2216 - - * libtiff/tif_dir.c: Set the bogus post-decoding hook when processing - TIFFTAG_BITSPERSAMPLE in _TIFFVSetField() for the case of 8 bit when - we don't need any post-processing. That helps to reset the hook if we - previously set this field to some other value and the hook was - initialized accordingly. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2035 - -2010-07-01 Andrey Kiselev - - * tools/tiffgt.c: Properly check the raster buffer allocations for - integer overflows. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2108 - - * m4/acinclude.m4: Update GL/GLU/GLUt/Pthread macros from the - upstream. - - * libtiff/{tif_aux.c, tif_strip.c, tif_tile.c, tiffiop.h}: Move - multiply_32() and multiply_64() functions into tif_aux.c file and - rename them into _TIFFMultiply32() and _TIFFMultiply64() respectively. - -2010-06-30 Andrey Kiselev - - * tools/tiff2pdf.c: Better generation of ID field in - t2p_write_pdf_trailer(). Get rid of GCC aliasing warnings. - - * tools/tiff2pdf.c: Fixed computation of the tile buffer size when - converting JPEG encoded tiles. - - * tools/tiff2pdf.c: Better handling of string fields, use static - string buffers instead of dynamically allocated, use strncpy() instead - of strcpy(), control the string lengths. - -2010-06-25 Andrey Kiselev - - * tools/tiffcp.c: Initialize buffer arrays with zero to avoid - referencing to uninitialized memory in some cases (e.g. when tile size - set bigger than the image size). - -2010-06-15 Bob Friesenhahn - - * tools/tiffcrop.c: Patch from Richard Nolde. Reject YCbCr - subsampled data since tiffcrop currently doesn't support it. Fix - JPEG support. - -2010-06-13 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Fix invocation of tag compare function (#2201) - - * tools/tiff2pdf.c: Fix assorted bugs in tiff2pdf: missing "return" - in t2p_read_tiff_size() causes t2p->tiff_datasize to be set entirely - wrong for COMPRESSION_JPEG case, resulting in memory stomp if actual - size is larger. Also, there are a bunch of places that try to - memset() a malloc'd buffer before checking for malloc failure, which - would result in core dump if there actually were a failure. (#2211) - -2010-06-11 Bob Friesenhahn - - * libtiff/tiffiop.h (TIFFSafeMultiply): Need more castings to - avoid compiler warnings if parameter types are not sign - consistent. - - * libtiff 4.0.0alpha6 released. - - * tools/tiffcrop.c: Applied patch from Richard Nolde: Corrected - European page size dimensions. Added an option to allow the user - to specify a custom page size on the command line. Fix the case - where a page size specified with a fractional part was being - coerced to an integer by retyping the variables that define the - paper size. - - * html/index.html: Update for the 3.9.3 release. - - * tools/tiffcp.c (tiffcp): Applied Tom Lane's patch to reject - YCbCr subsampled data since tiffcp currently doesn't support it. - http://bugzilla.maptools.org/show_bug.cgi?id=2097 - - * Update libtool to version 2.2.10. - -2010-06-10 Bob Friesenhahn - - * libtiff/tiffiop.h (TIFFSafeMultiply): Work properly if - multiplier is zero. - -2010-06-09 Bob Friesenhahn - - * libtiff/tif_fax3.c (Fax3SetupState): Yesterday's fix for - CVE-2010-1411 was not complete. - - * libtiff/tiffiop.h (TIFFSafeMultiply): New macro to safely - multiply two integers. Returns zero if there is an integer - overflow. - - * tools/tiffcp.c (main): tiffcp should not leak memory if an error - is reported when reading the input file. - -2010-06-08 Bob Friesenhahn - - * Update libtool to version 2.2.8. - - * libtiff/tif_fax3.c (Fax3SetupState): Avoid under-allocation of - buffer due to integer overflow in TIFFroundup() and several other - potential overflows. In conjunction with the fix to TIFFhowmany(), - fixes CVE-2010-1411. - - * libtiff/tiffiop.h (TIFFhowmany): Return zero if parameters would - result in an integer overflow. This causes TIFFroundup() to also - return zero if there would be an integer overflow. - - * contrib: Add an emacs formatting mode footer to all source files - so that emacs can be effectively used. - -2010-06-03 Oliver Chen Feng - - * libtiff/tools/tiffcp.c: add a new option -x to force merged tiff - file PAGENUMBER value in sequence for users who care the page - sequence, this will also prevent tiff2pdf from creating pdf file from - the merged tiff file with wrong page sequence. - -2010-05-08 Olivier Paquet - - * libtiff/tif_dirread.c: Restored TIFFReadDirEntryFloat function in order - to add missing TIFF_SETGET_FLOAT case to TIFFFetchNormalTag. - * libtiff/tif_dirinfo.c: Use correct set_field_type for - TIFFTAG_PIXAR_FOVCOT so it is readable again (regression from 3.9.2). - http://bugzilla.maptools.org/show_bug.cgi?id=2192 - -2010-05-07 Frank Warmerdam - - * libtiff/tif_jpeg.c: Ensure that quality is always set in - JPEGPreEncode(), not just when we want to output local tables. - Otherwise the quality used during compression may not be right and - might not match the tables in the tables tag. This bug only occurs - when seeking between directories in the midst of writing blocks. - http://trac.osgeo.org/gdal/ticket/3539 - -2010-05-06 Andrey Kiselev - - * html/man/TIFFGetField.3tiff.html, html/man/TIFFSetField.3tiff.html: - Regenerated from the source. - -2010-05-05 Olivier Paquet - - * libtiff/tif_print.c: Fixed printing of TIFFTAG_REFERENCEBLACKWHITE which - had stopped working. Also made it always print 6 floats instead of - 2*SamplesPerPixel. - http://bugzilla.maptools.org/show_bug.cgi?id=2191 - http://bugzilla.maptools.org/show_bug.cgi?id=2186 - * man/TIFFGetField.3tiff, man/TIFFSetField.3tiff: Fixed doc to reflect the - fact that libtiff considers TIFFTAG_REFERENCEBLACKWHITE to be 6 floats. - -2010-05-05 Frank Warmerdam - - * libtiff/tif_jpeg.c: Fix to use memcmp(), not memcpy() when checking - if the jpeg table was written. This is a fix for the last fix on 04-21. - -2010-04-21 Frank Warmerdam - - * libtiff/tif_jpeg.c: avoid preparing jpeg tables every time - JPEGSetupEncode() is called if the tables already seem to be - established. This prevents spurious updates and rewriting of - directories with jpegtables when doing updates to existing images. - http://trac.osgeo.org/gdal/ticket/3539 - -2010-04-20 Olivier Paquet - - * libtiff/tif_dirinfo.c: Use correct set_field_type for - TIFFTAG_PIXAR_IMAGEFULLWIDTH, TIFFTAG_PIXAR_IMAGEFULLLENGTH, - TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN and TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA. - They were unreadable with TIFF_SETGET_UNDEFINED, a regression from 3.9.2. - http://bugzilla.maptools.org/show_bug.cgi?id=2139 - -2010-04-10 Bob Friesenhahn - - * libtiff/tif_dir.c (_TIFFVSetField): Add a special error case for - when the tag count value is zero. Error handling is still a - regression since in 3.9.2, empty tags are skipped (with a warning) - rather than returning a hard error and refusing to read the file. - - * tools/ppm2tiff.c (main): While case for parsing comment line - requires extra parenthesis to work as expected. Reported by - Thomas Sinclair. - -2010-04-02 Frank Warmerdam - - * libtiff/tif_read.c (primarily): Add support for - CHUNKY_STRIP_READ_SUPPORT where large strips are - read in chunks for applications using TIFFReadScanline(). - This is intended to make it more practical work with very - large compressed one-strip files. Feature is off by default. - Enable by defining CHUNK_STRIP_READ_SUPPORT as a macro. - http://trac.osgeo.org/gdal/ticket/3514 - -2010-03-31 Frank Warmerdam - - * libtiff/tif_flush.c: Use TIFFRewriteDirectory() when flushing - directories so previously placed directories will be migrated to - the end of file if needed. - -2010-03-30 Frank Warmerdam - - * libtiff/tif_lzw.c: change type of dec_bitsleft field to uint64 - to support operating on strips/tiles of more than 256MB. - http://trac.osgeo.org/gdal/ticket/3512 - -2010-03-10 Bob Friesenhahn - - * libtiff/tif_aux.c (_TIFFCheckRealloc): Improve error message so - that it is clearly a memory allocation error message, and also - includes the size of the allocation request. - -2010-02-22 Lee Howard - - * libtiff/tif_jpeg.c: Do not generate a JPEGTables tag when creating - the JPEG TIFF as is is not required in order to prevent it from - being unused and filled with invalid data. (Leave it to be - generated by later activity.) - http://bugzilla.maptools.org/show_bug.cgi?id=2135 - * tools/tiff2pdf.c: Write the JPEG SOI headers into the TIFF strip - data rather than skipping them. This fixes the ability to view in - Acrobat Reader, Evince, and Ghostscript. - http://bugzilla.maptools.org/show_bug.cgi?id=2135 - * libtiff/tif_fax3.c: Don't return error on badly-terminated MMR - strips. - http://bugzilla.maptools.org/show_bug.cgi?id=2029 - -2009-12-03 Frank Warmerdam - - * libtiff/tif_jpeg.c: Made JPEGDecodeRaw() check for buffer overruns. - Made so that when working with downsampled images a stub function - reporting an error is used for tif_decoderow. We cannot meaningfully - support reading scanlines in this situation. (#1936) - - * libtiff/tif_jpeg.c: Ensure that tif_scanlinesize is computed after - resetting of the upsampling values (gdal:#3259). - http://bugzilla.maptools.org/show_bug.cgi?id=1936 - -2009-11-30 Frank Warmerdam - - * contrib/dbs/tiff-grayscale.c, contrib/tif-palette.c, - tools/ras2tiff.c: Fix resource leaks on error. - http://bugzilla.maptools.org/show_bug.cgi?id=2121 - - * libtiff/tif_{aux.c,dir.c,dir.h,dirinfo.c}: Return to handling - TIFFTAG_REFERENCEBLACKWHITE as a field in the TIFF directory instead - of as a custom(generic) field to avoid a potential reentrancy problem. - http://bugzilla.maptools.org/show_bug.cgi?id=2125 - - * libtiff/tif_color.c, libtiff/tif_getimage.c, libtiff/tiffio.h, - man/TIFFcolor.3tiff: Make TIFFDisplay argument in TIFFCIELabToRGBInit - const, and display_sRGB static and const. - http://bugzilla.maptools.org/show_bug.cgi?id=2124 - -2009-11-04 Bob Friesenhahn - - * libtiff 4.0.0alpha5 released. - -2009-11-03 Bob Friesenhahn - - * tools/tiffcrop.c: Updated tiffcrop from Richard Nolde. This - version has undergone substantial testing with arbitrary sample - bit depths. Also eliminates GCC compilation warnings. - -2009-11-02 Bob Friesenhahn - - * port/libport.h: Add extern declarations for getopt standard - globals. - -2009-10-31 Bob Friesenhahn - - * libtiff/tif_lzw.c (LZWDecode, LZWDecodeCompat): Fix warnings - noticed in 64-bit build of libtiff with Visual Studio 2005. - Resolves "Bug 2067 - Visual Studio 2005 64-bit warnings in - tif_lzw.c", http://bugzilla.maptools.org/show_bug.cgi?id=2067 - - * libtiff/tif_pixarlog.c (PixarLogEncode): Fix non-important - warning noticed in Visual Studio 2005 build. Resolves "Bug 2068 - - Visual Studio 2005 64-bit warning in tif_pixarlog.c", - http://bugzilla.maptools.org/show_bug.cgi?id=2068 - -2009-10-29 Bob Friesenhahn - - * libtiff/tif_dirread.c: Eliminate GCC "dereferencing type-punned - pointer" warnings. - -2009-10-28 Bob Friesenhahn - - * html/tools.html: Add manual page links, and a summary - description of tiffcrop. - -2009-10-07 Bob Friesenhahn - - * configure.ac: x86_64 should use the same fill order as i386. - -2009-09-24 Bob Friesenhahn - - * tools/tiffcrop.c, man/tiffcrop.1: New tiffcrop from Richard - Nolde. Major updates to add significant functionality for reading - and writing tile based images with bit depths not a multiple of 8 - which cannot be handled by tiffcp. - -2009-09-03 Bob Friesenhahn - - * libtiff/tif_ojpeg.c (OJPEGWriteHeaderInfo): IJG JPEG 7 needs - do_fancy_upsampling=FALSE in order to read raw data. Resolves - "Bug 2090 - OJPEG crash with libjpeg v7". - http://bugzilla.maptools.org/show_bug.cgi?id=2090 - -2009-09-03 Frank Warmerdam - - * libtiff/tif_getimage.c: Fixed error recognition handling in RGBA - interface when stoponerror is set. - http://bugzilla.maptools.org/show_bug.cgi?id=2071 - -2009-08-30 Bob Friesenhahn - - * tools/{tiffcrop.c,tiffgt.c}: Applied patch from Oden Eriksson to - fix build with gcc when using the "-Wformat - -Werror=format-security" flags. - -2009-08-29 Bob Friesenhahn - - * test/{bmp2tiff_palette.sh, bmp2tiff_rgb.sh, gif2tiff.sh, - ppm2tiff_pbm.sh, ppm2tiff_pgm.sh, ppm2tiff_ppm.sh}: Additional - utilities tests. - -2009-08-28 Bob Friesenhahn - - * tools/tiffinfo.c: tiffinfo should return error status to the - caller. Register a private error callback to accomplish that. - - * test/Makefile.am (TIFFIMAGES): Add test images in BMP, GIF, and - PNM formats so that we will be able to test more of the tools. - While adding these test images I notice that bmp2tiff and gif2tiff - only support ancient versions of their respective formats. - -2009-08-27 Bob Friesenhahn - - * libtiff 4.0.0alpha4 released. - - * HOWTO-RELEASE: Improved release instructions. - -2009-08-24 Bob Friesenhahn - - * man/{TIFFClose.3tiff,raw2tiff.1,tiffcmp.1,tiffsplit.1}: Applied - fixes for "Bug 2023 - nroff errors in manual pages". - http://bugzilla.maptools.org/show_bug.cgi?id=2023 - - * tools/{rgb2ycbcr.c, tiff2rgba.c}: Applied fixes for "Bug 2079 - - CVE-2009-2347 libtiff: integer overflows in various inter-color - space conversion tools". - http://bugzilla.maptools.org/show_bug.cgi?id=2079 - - * libtiff/tif_print.c (TIFFPrintDirectory): Apply fix from Jay - Berkenbilt for "Bug 2024 - possible null pointer dereference with - one-line fix". - http://bugzilla.maptools.org/show_bug.cgi?id=2024 - - * libtiff/tif_dirread.c (TIFFReadCustomDirectory): Apply patch - from Jay Berkenbilt for "Bug 1895 - logic error in tif_dirread.c: - segfault after setting tdir_tag = IGNORE". - http://bugzilla.maptools.org/show_bug.cgi?id=1895 - -2009-08-23 Bob Friesenhahn - - * test/Makefile.am, test/tiffcrop*.sh: Split previously existing - tiffcrop.sh into a collection of many specific tests. Re-wrote - all of the existing tests to be based on some simple shell - functions. Make distcheck works again. - - Export certain variables (MAKE, MAKEFLAGS, MEMCHECK) to tests and - added 'memcheck' and 'ptrcheck' targets to make it easy to run the - tests under valgrind. - -2009-08-21 Bob Friesenhahn - - * test/tiffcp-logluv.sh: Fix test so that it works with a VPATH - build. - - * test/Makefile.am (AUTOMAKE_OPTIONS): Colorized tests was not - actually activated since it needed to be enabled in this - Makefile.am. Also activated parallel-tests mode since it offers - useful features such as per-test .log files and a summary test - report .log file. - -2009-08-20 Bob Friesenhahn - - * configure.ac: Updated autotools. Autoconf 2.64, Automake 1.11, - libtool 2.2.6. Enabled support for silent build rules - (--enable-silent-rules or 'make V=0') and colorized tests. - - * html/{index.html, v3.9.0.html}: Update for 3.9.0 release. - -2009-06-30 Frank Warmerdam - - * tests/tiffcp-logluv.sh: minimal testing of sgilog compression. - - * tools/tiffcp.c: add -c sgilog support. - - * libtiff/tif_luv.c: correct return codes from encoderow to be - 1 on success instead of zero. - http://bugzilla.maptools.org/show_bug.cgi?id=2069 - - * libtiff/tif_lzw.c: back out patch from #2065 and apply patch from - #1085 for a better underflow fix that errors properly. - http://bugzilla.maptools.org/show_bug.cgi?id=2065 - http://bugzilla.maptools.org/show_bug.cgi?id=1985 - -2009-06-26 Frank Warmerdam - - * libtiff/tif_strip.c: Remove an inappropriate assertion that often - fails on oddly sized 12bit jpeg compressed ycbcr images. - -2009-06-22 Frank Warmerdam - - * libtiff/tif_lzw.c: Fix buffer underflow bug. - http://bugzilla.maptools.org/show_bug.cgi?id=2065 - -2009-06-21 Frank Warmerdam - - * configure.ac, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c: add support - for dual mode 8/12 bit jpeg support. - -2009-06-03 Frank Warmerdam - - * libtiff/tif_write.c: do not override the planar configuration to be - contig for one sample files if planar configuration is already set. - http://bugzilla.maptools.org/show_bug.cgi?id=2057 - -2009-06-02 Frank Warmerdam - - * libtiff/libtiff.def: Add TIFFUnsetField. - -2009-05-03 Frank Warmerdam - - * libtiff/{tif_jpeg.c,tif_ojpeg.c,tif_getimage.c}: Fixed various - error reports to use "%s" as format string. - http://trac.osgeo.org/gdal/ticket/2976 - -2009-03-12 Frank Warmerdam - - * libtiff/{tif_fax3.c,tif_jpeg.c,tif_ojpeg.c}: Fix printdir chaining - for some codecs (#2020). - -2009-02-12 Frank Warmerdam - - * libtiff/tif_luv.c: Fix handling of tiled logluv images. - http://bugzilla.maptools.org/show_bug.cgi?id=2005 - -2009-02-09 Frank Warmerdam - - * libtiff/tif_dirread.c: Improve allocation safety when allocated - buffer for large tags. (#1998) Related to (#1993) - -2009-02-06 Frank Warmerdam - - * tools/tiffcrop.c: Don't default image->res_unit to INCH. Now the - test suite should pass. - -2009-02-05 Frank Warmerdam - - * libtiff/tif_dirread.c: Re-incorporated a sanity check on tag size, - but at the 2GB boundary to avoid overflow on 32bit systems. - http://bugzilla.maptools.org/show_bug.cgi?id=1993 - - * libtiff/tif_dirread.c: Remove some assertions that blow due to - corrupt files rather than in response to library internal - inconsistencies. - http://bugzilla.maptools.org/show_bug.cgi?id=1995 - http://bugzilla.maptools.org/show_bug.cgi?id=1991 - - * libtiff/tif_dirread.c: Fixed testing for failed result from - TIFFReadDirectoryFindFieldInfo(). - http://bugzilla.maptools.org/show_bug.cgi?id=1992 - -2009-01-23 Frank Warmerdam - - * libtiff/tif_predict.c: Add support for 32bit integer horz. predictors. - http://bugzilla.maptools.org/show_bug.cgi?id=1911 - - * libtiff/tif_dirwrite.c: Fix byte swapping of next directory offset. - - http://bugzilla.maptools.org/show_bug.cgi?id=1924 - - * tools/tiffcrop.c: initialize xres/yres values. - - * test/*.sh - default ${srcdir} to local directory. - - * test/common.sh - start verbose mode after common settings. - - * libtiff/tif_dirinfo.c: Replace lfind() with local equivalent to - avoid type mismatches on different platforms. - http://bugzilla.maptools.org/show_bug.cgi?id=1889 - -2009-01-22 Frank Warmerdam - - * tools/{fax2tiff.c,thumbnail.c,tiff2pdf.c,tiff2ps.c,tiffdump.c, - tiffsplit.c}: avoid warnings, mostly 32bit/64bit casting issues. - - * port,tools: Introduce libport.h, and include in tools if NEED_LIBPORT - defined, primarily to reduce prototype warnings on windows. - - * libtiff/tif_dirinfo.c,tif_dirread.c: Avoid warnings - about unused parameters, and uninitialized variables. - -2009-01-21 Bob Friesenhahn - - * test/common.sh: Execute tests like 'make VERBOSE=TRUE check' in - order to trace full execution detail while executing the test suite. - -2009-01-20 Frank Warmerdam - - * tools/tiffsplit.c: fix sampleformat to be shortv instead of longv. - -2009-01-20 Bob Friesenhahn - - * test/Makefile.am (CLEANFILES): Make sure that test output files - are removed by 'make clean' - - * Update autotools for 4.0.0 beta3 - - * 4.0.0 beta3 produced. - -2009-01-12 Bob Friesenhahn - - * test/tiffcrop.sh: New test script for tiffcrop from Richard - Nolde. - - * tools/tiff2ps.c: Remove spurious message to stderr. - -2009-01-11 Bob Friesenhahn - - * tools/tiff2ps.c: Incorporated significant functionality update - from Richard Nolde. In particular, support for rotating the image - by 90, 180, 270, and 'auto' has been added. - - * man/tiffcrop.1: Incorporated documentation updates from Richard - Nolde. - - * tools/tiffcrop.c: Incorporated significant functionality update - from Richard Nolde. - -2008-12-31 Bob Friesenhahn - - * libtiff/tiffio.h: GCC will now validate format specifications - for TIFFError(), TIFFErrorExt(), TIFFWarning(), and - TIFFWarningExt() in order to reveal bugs. - - * Many fixes throughout to work better as a 64-bit build. - -2008-12-30 Bob Friesenhahn - - * tools/{tiff2pdf.c, tiff2ps.c, tiffinfo.c}: Offset and length - tags now require 64-bit parameter rather than 32-bit. - - * libtiff/tif_dirread.c: Fixed issues with unaligned access to - 64-bit values. - - * tools/thumbnail.c: Eliminate crash noticed while running test - suite. - -2008-12-29 Bob Friesenhahn - - * libtiff/tif_ojpeg.c (OJPEGLibjpegJpegSourceMgrFillInputBuffer): - Initialize stack variables to avoid compiler warning. - - * tools/tiffinfoce.c (main): Use toff_t for offset type when - retrieving offset of EXIF IFD. - - * libtiff/tiffio.h: Undeprecate toff_t and restore its use in the - TIFFClientOpen() callback and other external function definitions. - - * tools/tiffinfo.c (main): Offset to EXIF IFD requires a 64-bit - type now. Fixes crash when dumping files containing an EXIF IFD. - - * m4/libtool.m4: Update to libtool 2.2.6. - -2008-12-21 Frank Warmerdam - - * libtiff/tif_dir.c, tiffio.h: Introduce TIFFUnsetField() function. - - * libtiff/tif_jpeg.c: Avoid errors if the application writes a full - strip for the last partial strip in a jpeg compressed file. - http://bugzilla.maptools.org/show_bug.cgi?id=1981 - -2008-10-29 Frank Warmerdam - - * libtiff/tif_flush.c: Make sure that BEENWRITING is cleared when - we take the shortcut to only update the strip/tile offsets in place. - http://trac.osgeo.org/gdal/ticket/2621 - -2008-10-21 Andrey Kiselev - - * libtiff/tif_jbig.c: Support the JBIG-KIT 2.0 (compatibility with - the older versions retained). - -2008-10-09 Frank Warmerdam - - * libtiff/tif_jpeg.c: Add #ifdefs for changes needed if using - IPP enabled version of libjpeg from Intel. - http://bugzilla.maptools.org/show_bug.cgi?id=1951 - -2008-09-05 Andrey Kiselev - - * tools/tiffsplit.c: Use byte counts of proper size (uint64). - Required for libtiff 4.0. - - * tools/tiffsplit.c: Use dynamically allocated array instead of static - when constructing output file names. - -2008-09-03 Andrey Kiselev - - * tools/tiffsplit.c: Get rid of unsafe strcpy()/strcat() calls when - doing the filename/path construction. - - * tools/tiff2pdf.c: More appropriate format string in - t2p_write_pdf_string(); avoid signed/unsigned mismatch. - - * libtiff/tif_lzw.c: Properly zero out the codetable. As per bug - - http://bugzilla.maptools.org/show_bug.cgi?id=1929 - - * libtiff/tif_lzw.c: Properly zero out the string table. Fixes - CVE-2008-2327 security issue. - -2008-09-01 Frank Warmerdam - - * libtiff/tif_dirread.c: Avoid unused TIFFReadDirEntryFloat() function. - - * libtiff/tif_dirwrite.c: modified to write IFDs as either IFD8 or IFD - depending on whether the file is bigtiff or classic tiff. - http://bugzilla.maptools.org/show_bug.cgi?id=1917 - -2008-08-12 Edward Lam - - * tools/tiffdump.c: When compiling for Microsoft Windows, apply - consistent (__int64) casting when testing if _lseeki64 has - successfully sought as requested. This is necessary for large - file support to work since off_t is only 32-bit. - -2008-07-29 Frank Warmerdam - - * tif_strip.c: Replace assertions related to samplesperpixel != 3 or - the subsampling values not being 1, 2 or 4 (for jpeg compressed images) - with control logic to return runtime errors (c/o Even Rouault) (#1927). - -2008-06-17 Frank Warmerdam - - * tools/tiffcrop.c: Fix some portability problems. - - * libtiff/tif_ojpeg.c: Use same jpeg/win32 boolean/FAR hacks as are - used in tif_jpeg.c. - - * libtiff/tif_win32.c: Ensure TIFFOpenW() uses same FILE_SHARE flags - as TIFFOpen(). - -2008-06-01 Frank Warmerdam - - * libtiff/tif_dirwrite.c: Fix alignment problems affecting architectures - like Sparc/Solaris. - http://bugzilla.maptools.org/show_bug.cgi?id=1892 - -2008-05-27 Frank Warmerdam - - * libtiff.def: Add TIFFFindField - http://bugzilla.maptools.org/show_bug.cgi?id=1891 - -2008-05-26 Frank Warmerdam - - * tif_config.*.h, tiffconf.*.h: Remove SIZEOF_LONG definition, unused. - - * li2008-04-15 Andrey Kiselev - -btiff/tif_win32.c: Replace custom Win32 memory api with generic - POSIX one. No apparent value to use of GlobalAlloc() in the modern - age. http://bugzilla.maptools.org/show_bug.cgi?id=1885 - - * libtiff/tiffconf.vc.h: Added JBIG_SUPPORT and MDI_SUPPORT items - in windows version (care of Edward Lam). - -2008-05-24 Frank Warmerdam - - * tif_codec.c: Avoid NULL pointer dereferencing for exotic - compression codec codes. - - * tif_dirwrite.c: fix potential memory leak. - - * tif_dirread.c: Fix unchecked malloc result. - -2008-05-24 Bob Friesenhahn - - * test {tiff2pdf.sh tiff2ps-EPS1.sh tiff2ps-PS1.sh tiff2ps-PS2.sh - tiff2ps-PS3.sh tiffcp-g3-1d-fill.sh tiffcp-g3-1d.sh - tiffcp-g3-2d-fill.sh tiffcp-g3-2d.sh tiffcp-g3.sh tiffcp-g4.sh - tiffcp-split-join.sh tiffcp-split.sh tiffcp-thumbnail.sh - tiffdump.sh tiffinfo.sh}: Added more test scripts based on - suggestions from Lee Howard posted to the tiff list on 13 Sep - 2007. - -2008-05-23 Frank Warmerdam - - * libtiff/tif_fax3.c: Add an assert in an effort to detect a - possible runtime problem reported by coverity. - - * contrib/iptcutil/iptcutil.c: Fixed memory leak of str. - - * tools/tiffcrop.c, man/tiffcrop.1: Major update from Richard Nolde. - http://bugzilla.maptools.org/show_bug.cgi?id=1888 - - * tools/tiffdither.c: remove dead onestrip code. avoid memory leak. - - * tools/rgb2ycbcr.c: fix memory leak of raster buffer. - - * tools/tiffcp.c: Simplify inknames code to avoid pointless test. - Cleanup scanline allocation to avoid coverity warning. - - * tools/thumbnail.c: Check for TIFFOpen() failure. - -2008-05-18 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Use TIFF_SETGET_ASCII for PIXAR_TEXTUREFORMAT - and PIXAR_WRAPMODES instead of TIFF_SETGET_UNDEFINED. Not exactly clear - why this is needed. - -2008-05-09 Bob Friesenhahn - - * Makefile.am (ACLOCAL_AMFLAGS): Libtool 2.2.4 does not like - "ACLOCAL_AMFLAGS=-I ./m4". It wants "ACLOCAL_AMFLAGS=-I m4". - -2008-04-15 Andrey Kiselev - - * test/: Test suite updated. Everything is passed now. - - * libtiff/tif_dirinfo.c: Fixed description of the - TIFFTAG_NUMBEROFINKS tag. - -2008-04-14 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_dirwrite.c, tiffiop.h}: - Get rid of some of "dereferencing type-punned" warnings by converting - tdir_offset field of TIFFDirEntry structure into union. - -2008-04-10 Andrey Kiselev - - * libtiff/{tif_flush.c, tif_dirwrite.c, tiffio.h, tiffiop.h}: - TIFFRewriteField() renamed into _TIFFRewriteField() and moved out - from the public interface. Type of its 'count' parameter changed - from uint32 to tmsize_t. - - * /libtiff/tiffiop.h: Make tif_nfields and tif_nfieldscompat fields - of the tiff structure have the size_t type instead of uint32. - -2008-04-09 Andrey Kiselev - - * tools/tiffdump.c: Added support for MSVS 6.0. - - * libtiff/tif_dirread.c: Use custom functions _TIFFUInt64ToFloat() - and _TIFFUInt64ToDouble() to convert 64-bit integers into floating - point values on MSVS 6.0 platform. - -2008-03-14 Frank Warmerdam - - * tif_dirread.c: Removed sanity checks on tags larger than 4MB in - TIFFReadDirEntryArray() since they are interfering with seemingly - legitimate files. http://trac.osgeo.org/gdal/ticket/2005 - -2008-02-09 Joris Van Damme - - * tif_dirread.c: Added handling for the case of number of values for - PageNumber tag different from 2 (previously resulted in an assert - indicating lack of handling and was forgotten about) - -2008-02-01 Frank Warmerdam - - * libtiff/tif_jpeg.c: Do not try to fixup subsampling tags based on - the actual jpeg data stream if the first strip/tile has zero size. - This is the case when GDAL creates a new file with zero sizes, closes - and reopens it. - -2008-01-07 Frank Warmerdam - - * tools/tiff2ps.c: fix up 64bit issues (from Edward Lam). - -2008-01-01 Frank Warmerdam - - * libtiff/tif_dirwrite.c: #ifdef out lots of unused functions. - - * Makefile.vc, libtiff/Makefile.vc, tools/Makefile.vc: Improve clean - targets. - - * tools/tiffinfo.c, tools/tiffcmp.c, tools/gif2tiff.c, tools/bmp2tiff.c - tools/tiff2pdf.c: Fix 64-bit warnings when compiling under MSVC 2005 - (x64). - - * tools/tiffset.c: Changes to reflect the fact that TIFFFieldWithTag() - and TIFFFieldWithName() now return TIFFField pointers instead of - TIFFFieldInfo pointers. - - * tools/tiffdump.c: Added ssize_t typedef on Windows since it doesn't - exist. This makes it compile again on Windows - - * tif_aux.c, tif_getimage.c, tif_next.c, tif_predict.c, tif_win32.c, - tiffconf.vc.h: Various 64bit fixes from Edward Lam identified on win64. - - * test/rewrite_tag.c: New test for TIFFRewriteField(). - -2007-12-31 Frank Warmerdam - - * tif_dirwrite.c: Added TIFFRewriteField(). This new function - rewrites one field "on disk" updating an existing directory - entry. Lots of limitations still... - - * tiffiop.h, tif_write.c, tif_dirread.c, tif_flush.c: Keep track of - TIFF_DIRTYSTRIP separately from TIFF_DIRTYDIRECT to indicate that - the strip offset/size values are dirty but nothing else about the - directory is dirty. In flush handle "just stripmaps dirty" as a - special case that just rewrites these values without otherwise - modifying the directory on disk using TIFFRewriteField(). - - We also modify logic so that in update mode the directory is not - marked dirty on read, but only when something is changed. This - means we need to keep track of updates to the stripmap stuff in - TIFFAppendToStrip(). - -2007-12-10 Frank Warmerdam - - * tif_jpeg.c: Improve ability to switch between encoding and decoding - in the jpeg code (gdal bug #2033). - -2007-11-23 Frank Warmerdam - - * tif_dir.c, tif_dirread.c, tif_dirwrite.c, tif_read.c, tif_write.c, - tiffiop.h: Added TIFF_BUF4WRITE flag to indicate if contents of the - rawcp/rawcc buffer are for writing and thus may require flushing. - Necessary to distinguish whether they need to be written to disk when - in mixed read/write mode and doing a mixture of writing followed by - reading. http://trac.osgeo.org/gdal/ticket/1758 - -2007-11-23 Andrey Kiselev - - * configure.com, libtiff/tif_vms.c: Better OpenVMS support. Patches - from Alexey Chupahin. - -2007-11-02 Frank Warmerdam - - * tif_write.c: Rip out the fancy logic in TIFFAppendToStrip() for - establishing if an existing tile can be rewritten to the same location - by comparing the current size to all the other blocks in the same - directory. This is dangerous in many situations and can easily - corrupt a file. (observed in esoteric GDAL situation that's hard to - document). This change involves leaving the stripbytecount[] values - unaltered till TIFFAppendToStrip(). Now we only write a block back - to the same location it used to be at if the new data is the same - size or smaller - otherwise we move it to the end of file. - - * tif_dirwrite.c: Try to avoid writing out a full readbuffer of tile - data when writing the directory just because we have BEENWRITING at - some point in the past. This was causing odd junk to be written out - in a tile of data when a single tile had an interleaving of reading - and writing with reading last. (highlighted by gdal - autotest/gcore/tif_write.py test 7. - - * tif_predict.c: use working buffer in PredictorEncodeTile to avoid - modifying callers buffer. - http://trac.osgeo.org/gdal/ticket/1965 - - * tif_predict.c/h: more fixes related to last item, keeping a - distinct pfunc for encode and decode cases as these were getting - mixed up sometimes. - http://trac.osgeo.org/gdal/ticket/1948 - -2007-11-01 Frank Warmerdam - - * tif_predict.c/h, tif_lzw.c, tif_zip.c: Improvements so that - predictor based encoding and decoding works in read-write update - mode properly. - http://trac.osgeo.org/gdal/ticket/1948 - -2007-10-24 Joris Van Damme - - * tif_dirread.c: Fixed problem with bogus file triggering - assert(td->td_planarconfig == PLANARCONFIG_CONTIG) in - ChopUpSingleUncompressedStrip - -2007-10-22 Joris Van Damme - - * tif_jpeg.c: Resolved buffer incrementation bug that lead to faulty images - at best, access violation at worst, when subsampled JPEG compressed imagery - is decoded without the JPEG_COLORMODE feature - -2007-10-11 Frank Warmerdam - - * html/index.html: Update "people responsible" section. - -2007-10-05 Frank Warmerdam - - * tools/tiff2pdf.c: Fix problem with alpha setting in some cases - as reported on the mailing list. - -2007-10-01 Joris Van Damme - - * changed some more incorrect %lud printf flags to %lu - -2007-09-29 Joris Van Damme - - * tif_dirread.c: Strip chopping interfered badly with uncompressed - subsampled images because it tried to divide subsampled rowblocks, - leading to all sorts of errors throughout the library for these - images. Fixed by making strip chopping divide in row counts that - are a multiple of vertical subsampling value. - -2007-09-28 Joris Van Damme - - * tif_dirread.c: Logical cast working around compiler warning - - * tif_read.c: Correction of some error flags and parameter lists - -2007-09-27 Joris Van Damme - - * tif_dirread.c: Made calculation of td_maxsamplevalue more robust - when dealing with large bitspersample values, shutting up purification - tools that warn about truncation, though it remains incorrect and - indicates a conceptual problem there. - - * tif_open.c: Moved early exit in case of 'h' flag (to disable reading - of first IFD) to proper place because it badly interfered with memory - mapping, resulting in mapping flag even with dummy mapping functions - that returned 0 whilst at the same time the mapping tif_size wasn't - set, thus resulting in continuous incorrect beyond-eof errors. - -2007-09-24 Joris Van Damme - - * tif_dirinfo.c: Fixed (MSVC) compiler reports about - inconsistent use of const in tiffFields and exifFields definition - -2007-09-20 Frank Warmerdam - - * tif_dirwrite.c: Always write tile/strip offsets and sizes - using LONG8 type when output format is BigTIFF. The - TIFFWriteDirectoryTagLongLong8Array() function was restructured - accordingly. - - * tif_dirread.c: Improvements to error reporting text in - TIFFFetchDirectory(). - -2007-09-19 Bob Friesenhahn - - * test/images: Added a small collection of test images for use by - test programs and scripts. - * test/tiffinfo.sh: A trivial example test script. - * test/common.sh: Added small script for setting the environment - used by script-based tests. - -2007-08-24 Frank Warmerdam - - * tif_dirwrite.c: Write the tif_nextdiroff value instead of a fixed - zero when writing directory contents to preserve the ability to - rewrite directories in place, even in the middle of a directory - chain. - - * tif_dirinfo.c: _TIFFMergeFields() now only merges in field - definitions that are missing. Existing definitions are silently - ignored. - - * tif_dirread.c: Add runtime error for fields for which no definition - is found (in addition to an assert for developers) in - TIFFFetchNormalTag(). Not sure if this is needed, but it seems - prudent. - -2007-08-10 Joris Van Damme - - * libtiff/tif_getimage.c: removed SubsamplingHor and SubsamplingVer - from _TIFFRGBAImage structure to revert unwanted ABI change. - -2007-08-10 Joris Van Damme - - * libtiff/tif_win32.c: use SetFilePointer instead of - SetFilePointerEx, as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1580 - -2007-07-19 Andrey Kiselev - - * libtiff/tif_stream.cxx: Put all callback functions declarations - inside extern "C" block. - - * libtiff/{tif_lzw.c, tif_luv.c, tif_dumpmode.c, tif_print.c, - tif_read.c, tif_strip.c, tif_thunder.c}: Use "%I64d" printf() - formatter instead of "%lld" with MSVC compiler. - - * libtiff/{tiffiop.h, tif_aux.c}: Added _TIFFUInt64ToFloat() and - _TIFFUInt64ToDouble() functions. - -2007-07-18 Andrey Kiselev - - * libtiff/tif_dirread.c: Handle the case of MSVC 6 when using 64-bit - integer constants. - - * libtiff/{Makefile.am, Makefile.v}: Do not distribute tiffconf.h, - remove tif_config.h/tiffconf.h during cleaning. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1573 - - * libtiff/tif_unix.c: Do not use O_LARGEFILE. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1577 - -2007-07-13 Andrey Kiselev - - * libtiff 4.0.0alpha released. - -2007-07-12 Andrey Kiselev - - * tools/tiff2pdf.c: Added missed extern optind as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1567 - - * libtiff/{tif_close.c, tif_dirinfo.c, tiffiop.c, tif_dirread.c, - tif_dir.h, tif_dir.c, tiffio.h}: Transition to the new-style tag - extending scheme completed. - -2007-07-11 Bob Friesenhahn - - * libtiff/tif_stream.cxx: Adapt to use toff_t again. Update to - use standard C++ library size types and attempt to detect overflow - cases. - -2007-07-08 Andrey Kiselev - - * libtiff/{tif_jpeg.c, tif_dir.h, tif_dir.c, tif_dirinfo.c, tiffio.h, - tif_ojpeg.c, tif_print.c, tif_fax3.c, tif_dirread.c}: More work on new - tag extending scheme. Use the new scheme everywhere. - - * libtiff/{tif_zip.c, tif_predict.c, tif_pixarlog.c, tif_luv.c, - tif_fax3.c, tif_dirread.c, tif_dirwrite.c, tif_close.c, tif_ojpeg.c, - tif_jpeg.c, tif_dirinfo.c, tif_dir.h, tiffio.h, tiffiop.h}: - TIFFFIeldInfo structure replaced with TIFFField structure. - TIFFFieldInfo retained for the backward compatibility. - -2007-07-05 Bob Friesenhahn - - * tools/tiff2pdf.c: Fix a compile problem when JPEG_SUPPORT is not - defined. - -2007-07-04 Andrey Kiselev - - * libtiff/{tif_dir.c, tiff.h, tiffio.h, libtiff.def}: Unused - TIFFReassignTagToIgnore() function and TIFFIgnoreSense enumeration - removed. - - * libtiff/{tif_dirinfo.c, tif_fax3.c, tif_jbig.c, tif_jpeg.c}: Move - tags TIFFTAG_FAXRECVPARAMS, TIFFTAG_FAXSUBADDRESS, - TIFFTAG_FAXRECVTIME and TIFFTAG_FAXDCS to the common tag directory. - These tags are not codec-specific and relate to image content, so - process them as other normal tags. - - * libtiff/{tiffio.h, tif_dir.h}: TIFFTagValue structure moved from the - public tiffio.h to private tif_dir.h. - - * contrib/{acorn, mac-cw, mac-mpw}: Removed as unmaintained and - outdated. - -2007-07-03 Andrey Kiselev - - * libtiff{tif_acorn.c, tif_apple.c, tif_atari.c, tif_msdos.c, - tif_win3.c}: Obsoleted portability stuff removed. - - * tools/tiff2ps.c: Added support 16-bit images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1566 - - Patch from William Bader. - - * tools/tiff2pdf.c: Fix for TIFFTAG_JPEGTABLES tag fetching and - significant upgrade of the whole utility as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1560 - - Now we don't need tiffiop.h in tiff2pdf anymore and will open output - PDF file using TIFFClientOpen() machinery as it is implemented - by Leon Bottou. - -2007-06-26 Bob Friesenhahn - - * configure.ac: Fix typo when substituting value for unsigned 8 bit type. - Added support for a TIFF_PTRDIFF_T type to use when doing pointer arithmetic. - Added support for a TIFF_SSIZE_T in order to return memory sizes but still - allow returning -1 for errors. - * libtiff/tiffconf.vc.h: Add porting type defintions for WIN32. - -2007-06-25 Bob Friesenhahn - - * port/strtoull.c: New porting function in case strtoull() is not - available on the target system. - * configure.ac: Add configure support for determining sized types - in a portable way and performing necessary substitutions in - tif_config.h and tiffconf.h. Updated tiff.h to use the new - definitions. - -2007-04-27 Andrey Kiselev - - * tools/tiff2pdf.c: Check the tmpfile() return status as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=154 - -2007-04-07 Andrey Kiselev - - * libtiff/{tif_dir.h, tif_dirread.c, tif_dirinfo.c, tif_jpeg.c, - tif_fax3.c, tif_jbig.c, tif_luv.c, tif_ojpeg.c, tif_pixarlog.c, - tif_predict.c, tif_zip.c}: Finally fix bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1274 - - by introducing _TIFFMergeFieldInfo() returning integer error status - instead of void in case of problems with field merging (e.g., if the - field with such a tag already registered). TIFFMergeFieldInfo() in - public API remains void. Use _TIFFMergeFieldInfo() everywhere and - check returned value. - -2007-04-07 Frank Warmerdam - - * contrib/addtiffo/tif_overview.c: Fix problems with odd sized output - blocks in TIFF_DownSample_Subsampled() (bug 1542). - -2007-04-06 Frank Warmerdam - - * libtiff/tif_jpeg.c: Changed JPEGInitializeLibJPEG() so that it - will convert from decompressor to compressor or compress to decompress - if required by the force arguments. This works around a problem in - where the JPEGFixupTestSubsampling() may cause a decompressor to - be setup on a directory when later a compressor is required with the - force flag set. Occurs with the addtiffo program for instance. - -2007-04-06 Andrey Kiselev - - * tools/tiffcrop.c, man/tiffcrop.1: Significant update in - functionality from Richard Nolde. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1525 - -2007-03-28 Frank Warmerdam - - * libtiff/tif_fax3.c: "inline static" -> "static inline" for IRIC CC. - -2007-03-17 Joris Van Damme - - * start of BigTIFF upgrade - CVS HEAD unstable until further notice - -2007-03-07 Joris Van Damme - - * libtiff/tif_getimage.c: workaround for 'Fractional scanline' error reading - OJPEG images with rowsperstrip that is not a multiple of vertical subsampling - factor. This bug is mentioned in: - http://bugzilla.remotesensing.org/show_bug.cgi?id=1390 - http://www.asmail.be/msg0054766825.html - -2007-03-07 Joris Van Damme - - * libtiff/tif_win32.c: made inclusion of windows.h unconditional - - * libtiff/tif_win32.c: replaced preprocessor indication for consiously - unused arguments by standard C indication for the same - -2007-02-27 Andrey Kiselev - - * libtiff/tif_dirread.c: Use uint32 type instead of tsize_t in byte - counters in TIFFFetchData(). Should finally fix the issue - - http://bugzilla.remotesensing.org/show_bug.cgi?id=890 - -2007-02-24 Andrey Kiselev - - * tools/tiffset.c: Properly handle tags with TIFF_VARIABLE writecount. - As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1350 - - * libtiff/tif_dirread.c: Added special function to handle - SubjectDistance EXIF tag as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1362 - - * tools/tiff2pdf.c: Do not assume inches when the resolution units - do not specified. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1366 - - * tools/{tiffcp.c, tiffcrop.c}: Do not change RowsPerStrip value if - it was set as infinite. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1368 - - * tools/tiffcrop.c, man/tiffcrop.1: New tiffcrop utility contributed - by Richard Nolde. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1383 - -2007-02-22 Andrey Kiselev - - * libtiff/tif_dir.c: Workaround for incorrect TIFFs with - ExtraSamples == 999 produced by Corel Draw. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1490 - - * libtiff/{tif_dirread.c, tif_read.c}: Type of the byte counters - changed from tsize_t to uint32 to be able to work with data arrays - larger than 2GB. Fixes bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=890 - - Idea submitted by Matt Hancher. - -2007-01-31 Andrey Kiselev - - * tools/tif2rgba.c: This utility does not work properly on big-endian - architectures. It was fixed including the bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1149 - -2007-01-15 Mateusz Loskot - - * Submitted libtiff port for Windows CE platform - * libtiff/tif_config.wince.h: Added configuration header for WinCE. - * libtiff/tiffconf.wince.h: Ported old configuration header for WinCE. - * libtiff/tif_wince.c: Added WinCE-specific implementation of some - functons from tif_win32.c. - * libtiff/tif_win32.c: Disabled some functions already reimplemented in tif_wince.c. - * libtiff/tiffiop.h, port/lfind.c: Added conditional include of some - standard header files for Windows CE build. - * tools/tiffinfoce.c: Ported tiffinfo utility for Windows CE. - -2006-11-19 Frank Warmerdam - - * libtiff/tif_write.c: TIFFAppendToStrip() - clear sorted flag if - we move a strip. - http://bugzilla.remotesensing.org/show_bug.cgi?id=1359 - -2006-10-13 Andrey Kiselev - - * libtiff/tif_dir.c: More fixes for vulnerabilities, reported - in Gentoo bug (): - - http://bugs.gentoo.org/show_bug.cgi?id=142383 - - * libtiff/contrib/dbs/xtiff/xtiff.c: Make xtiff utility compilable. - Though it is still far from the state of being working and useful. - -2006-10-12 Andrey Kiselev - - * libtiff/tif_fax3.c: Save the state of printdir codec dependent - method. - - * libtiff/tif_jpeg.c: Save the state of printdir codec dependent method - as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1273 - - * libtiff/tif_win32.c: Fixed problem with offset value manipulation - as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1322 - - * libtiff/{tif_read.c, tif_jpeg.c, tif_dir.c}: More fixes for - vulnerabilities, reported in Gentoo bug (): - - http://bugs.gentoo.org/show_bug.cgi?id=142383 - -2006-09-28 Andrey Kiselev - - * libtiff/{tif_fax3.c, tif_next.c, tif_pixarlog.c}: Fixed multiple - vulnerabilities, as per Gentoo bug (): - - http://bugs.gentoo.org/show_bug.cgi?id=142383 - -2006-09-27 Frank Warmerdam - - * libtiff/tif_lzw.c, libtiff/tif_zip.c: Fixed problems with mixing - encoding and decoding on the same read-write TIFF handle. The LZW - code can now maintain encode and decode state at the same time. The - ZIP code will switch back and forth as needed. - http://bugzilla.remotesensing.org/show_bug.cgi?id=757 - -2006-09-20 Frank Warmerdam - - * libtiff: Rename config.h.vc and tif_config.h.vc to config.vc.h and - tif_config.vc.h for easier identification by folks using an IDE. - -2006-07-25 Frank Warmerdam - - * tif_msdos.c: Avoid handle leak for failed opens. c/o Thierry Pierron - -2006-07-19 Frank Warmerdam - - * tif_dirwrite.c: take care not to flush out buffer of strip/tile - data in _TIFFWriteDirectory if TIFF_BEENWRITING not set. Relates - to bug report by Peng Gao with black strip at bottom of images. - -2006-07-12 Frank Warmerdam - - * tif_dirwrite.c: make sure to use uint32 for wordcount in - TIFFWriteNormanTag if writecount is VARIABLE2 for ASCII fields. - It already seems to have been done for other field types. Needed - for "tiffset" on files with geotiff ascii text. - -2006-07-04 Bob Friesenhahn - - * {configure.ac, libtiff/tif_config.h.vc, libtiff/tif_jbig.c} - (JBIGDecode): jbg_newlen is not available in older JBIG-KIT and - its use does not appear to be required, so use it only when it is - available. - -2006-06-24 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Added missed EXIF tag ColorSpace (40961). - - * libtiff/tif_dirread.c: Move IFD fetching code in the separate - function TIFFFetchDirectory() avoiding code duplication in - TIFFReadDirectory() and TIFFReadCustomDirectory(). - -2006-06-19 Frank Warmerdam - - * tools/tiff2pdf.c: Fix handling of -q values. - http://bugzilla.remotesensing.org/show_bug.cgi?id=587 - -2006-06-17 Frank Warmerdam - - * tif_readdir.c: Added case in EstimateStripByteCounts() for tiled - files. Modified TIFFReadDirectory() to not invoke - EstimateStripByteCounts() for case where entry 0 and 1 are unequal - but one of them is zero. - http://bugzilla.remotesensing.org/show_bug.cgi?id=1204 - -2006-06-08 Andrey Kiselev - - * libtiff/{tif_open.c, tif_dirread.c, tiffiop.h}: Move IFD looping - checking code in the separate function TIFFCheckDirOffset(). - - * libtiff/tif_aux.c: Added _TIFFCheckRealloc() function. - - * tools/tiffcmp.c: Fixed floating point comparison logic as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1191 - - * libtiff/tif_fax3.c: Fixed problems in fax decoder as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1194 - - * tools/tiff2pdf.c: Fixed buffer overflow condition in - t2p_write_pdf_string() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1196 - -2006-06-07 Andrey Kiselev - - * {configure, configure.ac, libtiff/tif_jbig.c, tools/tiffcp.c}: Added - support for JBIG compression scheme (34661 code) contributed by Lee - Howard. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=896 - - * configure, configure.ac: OJPEG support enabled by default. - - * contrib/ojpeg/: Removed. New OJPEG support does not need this patch. - -2006-06-03 Bob Friesenhahn - - * libtiff/{tif_dirinfo.c, tif_print.c} : Fix crash in - TIFFPrintDirectory(). Joris Van Damme authored the fix. - -2006-04-21 Andrey Kiselev - - * tools/tiff2pdf.c: Unified line ending characters (always use '\n') - as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1163 - - * README.vms, Makefile.am, configure.com, libtiff/{Makefile.am, - tif_config.h-vms, tif_stream.cxx, tif_vms.c, tiffconf.h-vms}: - Added support for OpenVMS by Alexey Chupahin, elvis_75@mail.ru. - -2006-04-20 Andrey Kiselev - - * tools/{fax2ps.c, fax2tiff.c, ppm2tiff.c, ras2tiff.c, tiff2pdf.c}: - Properly set the binary mode for stdin stream as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1141 - - * man/{bmp2tiff.1, fax2ps.1, fax2tiff.1, gif2tiff.1, ras2tiff.1, - raw2tiff.1, rgb2ycbcr.1, sgi2tiff.1, tiff2bw.1, tiff2pdf.1, tiff2ps.1, - tiff2rgba.1, tiffcmp.1, tiffcp.1, tiffdither.1, tiffdump.1, tiffgt.1, - tiffset.1}: Improvements in page formatting as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1140 - - * html/tools.html, html/man/Makefile.am, tools/tiff2pdf.c: Fixed - typos as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1139 - -2006-04-18 Frank Warmerdam - - * nmake.opt: use /EHsc for VS2005 compatibility. Also define - _CRT_SECURE_NO_DEPRECATE to avoid noise on VS2005. - -2006-04-12 Joris Van Damme - - * libtiff/tif_getimage.c: Added support for planarconfig separate - non-subsampled YCbCr (i.e. separate YCbCr with subsampling [1,1]) - -2006-04-11 Joris Van Damme - - * libtiff/tif_getimage.c: Revision of all RGB(A) put routines - - Conversion of unassociated alpha to associated alpha now done with - more performant LUT, and calculation more correct - - Conversion of 16bit data to 8bit data now done with - more performant LUT, and calculation more correct - - Bugfix of handling of 16bit RGB with unassociated alpha - -2006-04-11 Joris Van Damme - - * libtiff/tif_getimage.c: - - When there is no alpha, gtTileSeparate and gtStripSeparate allocated - buffer for alpha strile and filled it, only to never read it back. - Removed allocation and fill. - - Minor rename of vars in gtTileSeparate and gtStripSeparate - anticipating planned functionality extension - -2006-04-08 Joris Van Damme - - * libtiff/tif_getimage.c: renamed pickTileContigCase to PickContigCase - and pickTileSeparateCase to PickSeparateCase as both work on strips as - well - - * libtiff/tif_getimage.c: moved img->get selection from - TIFFRGBAImageBegin into PickContigCase and PickSeparateCase to create - logical hook for planned functionality extension - -2006-04-08 Joris Van Damme - - * libtiff/tif_ojpeg.c: resolved memory leak that was a consequence - of inappropriate use of jpeg_abort instead of jpeg_destroy - -2006-04-07 Joris Van Damme - - * libtiff/tif_getimage.c: replaced usage of TIFFScanlineSize in - gtStripContig with TIFFNewScanlineSize so as to fix buggy behaviour - on subsampled images - this ought to get sorted when we feel brave - enough to replace TIFFScanlineSize altogether - - * libtiff/tif_ojpeg.c: fixed bug in OJPEGReadSkip - -2006-04-04 Joris Van Damme - - * libtiff/tiffio.h: added new type tstrile_t - - * libtiff/tif_dir.h: changed types of td_stripsperimage and td_nstrips - to new tstrile_t, types of td_stripoffset and td_stripbytecount to - toff_t* - - * libtiff/tif_ojpeg.c: totally new implementation - - * libtiff/tif_dirread.c: added several hacks to suit new support of - OJPEG - - * libtiff/tif_getimage.c: removed TIFFTAG_JPEGCOLORMODE handling - of OJPEG images in favor of tif_getimage.c native handling of - YCbCr and desubsampling - -2006-03-29 Frank Warmerdam - - * libtiff/tif_jpeg.c: JPEGVSetField() so that altering the photometric - interpretation causes the "upsampled" flag to be recomputed. Fixes - peculiar bug where photometric flag had to be set before jpegcolormode - flag. - -2006-03-25 Joris Van Damme - - * libtiff/tif_jpeg.c: strip size related bugfix in encode raw - - * libtiff/tif_strip.c: temporarilly added two new versions of - TIFFScanlineSize - - TIFFNewScanlineSize: proposed new version, after all related - issues and side-effects are sorted out - - TIFFOldScanlineSize: old version, from prior to 2006-03-21 change - This needs further sorting out. - -2006-03-25 Joris Van Damme - - * contrib/addtiffo/tif_ovrcache.c: bugfix to correctly pass size - of last truncated strip data to TIFFWriteEncodedStrip - -2006-03-25 Joris Van Damme - - * libtiff/{tif_jpeg.c, tif_strip.c}: bugfix of tif_jpeg decode raw - -2006-03-25 Joris Van Damme - - * libtiff/tif_getimage.c: bugfix/rewrite of putcontig8bitYCbCr22tile - - * libtiff/tif_getimage.c: added putcontig8bitYCbCr12tile - - * libtiff/tif_read.c: added support for new TIFF_NOREADRAW flag to - prepare the path for new tif_ojpeg.c - -2006-03-23 Andrey Kiselev - - * libtiff 3.8.2 released. - - * tools/Makefile.am: Use runtime paths linker flags when rpath - option enabled. - -2006-03-21 Andrey Kiselev - - * libtiff/libtiff.def: Added missed exports as per bug - http://bugzilla.remotesensing.org/attachment.cgi?id=337 - - * contrib/addtiffo/Makefile.vc, libtiff/Makefile.vc, port/Makefile.vc, - tools/Makefile.vc: Makefiles improvements as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1128 - - * nmake.opt libtiff/{tif_config.h.vc, tif_unix.c, tiffio.h}, - tools/{fax2ps.c, fax2tiff.c, tiff2pdf.c}: Fixed win32 I/O functions - usage as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1127 - - * libtiff/tif_strip.c: Take subsampling in account when calculating - TIFFScanlineSize(). - - * tools/tiffcp.c: Do not set RowsPerStrip bigger than image length. - -2006-03-17 Andrey Kiselev - - * tools/fax2tiff.c: Fixed wrong TIFFerror() invocations as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1125 - - * tools/fax2ps.c: Fixed reading the input stream from stdin as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1124 - -2006-03-16 Andrey Kiselev - - * libtiff/tiffiop.h: Added decalration for - _TIFFSetDefaultCompressionState(). - - * libtiff/{tif_jpeg.c, tif_fax3.c, tif_zip.c, tif_pixarlog.c, - tif_lzw.c, tif_luv.c}: Use _TIFFSetDefaultCompressionState() in all - codec cleanup methods. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1120 - -2006-03-15 Andrey Kiselev - - * libtiff/tif_jpeg.c: Do not cleanup codec state in TIFFInitJPEG(). As - per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1119 - - * tools/raw2tiff.c: Do not set RowsPerStrip larger than ImageLength. - As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1110 - - * libtiff/tiffiop.h: dblparam_t typedef removed; GLOBALDATA macro - removed; move here the STRIP_SIZE_DEFAULT macro definition. - - * libtiff/{tif_dirread.c, tif_strip.c}: Removed STRIP_SIZE_DEFAULT - macro definition. - - * libtiff/tif_dir.c: Use double type instead of dblparam_t. - -2006-03-14 Andrey Kiselev - - * libtiff/tif_dirread.c: Do not check the PlanarConfig tag presence - in TIFFReadDirectory, because it is always set at the start of - function and we allow TIFFs without that tag set. - -2005-03-13 Andrey Kiselev - - * libtiff 3.8.1 released. - -2006-03-07 Andrey Kiselev - - * libtiff/tif_dirread.c: Fixed error reporting in TIFFFetchAnyArray() - function as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - - * libtiff/tif_dirread.c: More wise check for integer overflow - condition as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - - * libtiff/{tif_jpeg.c, tif_pixarlog.c, tif_fax3.c, tif_zip.c}: - Properly restore setfield/getfield methods in cleanup functions. As - per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - -2006-03-03 Andrey Kiselev - - * libtiff/{tif_predict.c, tif_predict.h}: Added new function - TIFFPredictorCleanup() to restore parent decode/encode/field methods. - - * libtiff/{tif_lzw.c, tif_pixarlog.c, tif_zip.c}: Use - TIFFPredictorCleanup() in codec cleanup methods. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - - * libtiff/tif_dirread.c: Fixed integer overflow condition in - TIFFFetchData() function. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - -2006-03-01 Andrey Kiselev - - * libtiff/tif_ojpeg.c: Set the ReferenceBlackWhite with the - TIFFSetField() method, not directly. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1043 - - * tools/ppm2tiff.c: Added support for PBM files as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1044 - -2006-02-27 Andrey Kiselev - - * libtiff/tif_write.c: Small code rearrangement in TIFFWriteScanline() - to avoid crash as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1081. - -2006-02-26 Andrey Kiselev - - * tools/tiff2pdf.c: Functions t2p_sample_rgbaa_to_rgb() and - t2p_sample_rgba_to_rgb() was used in place of each other, that was - resulted in problems with RGBA images with associated alpha. - As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1097 - -2006-02-23 Andrey Kiselev - - * libtiff/tif_dirwrite.c: Properly write TIFFTAG_DOTRANGE tag as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1088. - - * libtiff/tif_print.c: Properly read TIFFTAG_PAGENUMBER, - TIFFTAG_HALFTONEHINTS, TIFFTAG_YCBCRSUBSAMPLING and TIFFTAG_DOTRANGE - tags as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1088. - - * tools/tiff2ps.c: Properly scale all the pages when converting - multipage TIFF with /width/height/center options set. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1080 - -2006-02-15 Andrey Kiselev - - * tools/tiff2pdf.c: Do not create output file until all option checks - will be done. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1072 - - * tools/bmp2tiff.c: Added ability to create multipage TIFFs from the - list of input files as per bug: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1077 - -2006-02-09 Andrey Kiselev - - * libtiff/tif_tile.c: Fix error reporting in TIFFCheckTile() as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1063. - - * tools/tiffgt.c: Avoid crashing in case of image unsupported by - TIFFRGBAImage interface. - - * libtiff/tif_color.c: Avoid overflow in case of wrong input as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1065. - -2006-02-07 Frank Warmerdam - - * tools/tiff2pdf.c: Fixed support for non-YCbCr encoded JPEG - compressed TIFF files, per submission from Dan Cobra. - -2006-02-07 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_packbits.c, tif_win32.c}: Properly - cast values to avoid warnings. As per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. - - * libtiff/tif_dirinfo.c: Use TIFF_NOTYPE instead of 0 when - appropriate. As per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. - - * libtiff/tif_aux.c: Fixed type of temporary variable in - _TIFFCheckMalloc() as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. - -2006-02-06 Andrey Kiselev - - * libtiff/tif_aux.c: Return static array when fetching default - YCbCrCoefficients (another problem, reported a the - http://bugzilla.remotesensing.org/show_bug.cgi?id=1029 entry). - -2006-02-03 Andrey Kiselev - - * libtiff/tif_dir.c: Special handling for PageNumber, HalftoneHints, - YCbCrSubsampling and DotRange tags as per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1029 - http://bugzilla.remotesensing.org/show_bug.cgi?id=1034 - - * libtiff/tif_dirread.c: Use _TIFFGetExifFieldInfo() instead of - _TIFFGetFieldInfo() in TIFFReadEXIFDirectory() call as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1026. - -2006-01-23 Andrey Kiselev - - * libtool related stuff updated from the 2.1a branch. - -2006-01-11 Frank Warmerdam - - * tools/bmp2tiff,pal2rgb,ppm2tiff,ras2tiff,raw2tiff,sgi2tiff, - tiff2bw,tiffcp: Fixed jpeg option processing so -c jpeg:r:50 works - properly as per bug: - http://bugzilla.remotesensing.org/show_bug.cgi?id=1025 - -2006-01-09 Bob Friesenhahn - - * configure.ac: Fix with_default_strip_size comparison as reported - by Norihiko Murase. - -2006-01-08 Bob Friesenhahn - - * test/Makefile.am (LIBTIFF): Due to linking against libtiff - incorrectly, tests were not actually testing the uninstalled - libtiff. Now they are. - -2006-01-04 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Change definitions for TIFFTAG_ICCPROFILE, - TIFFTAG_PHOTOSHOP, TIFFTAG_RICHTIFFIPTC, TIFFTAG_XMLPACKET: readcount - should be uint32 value. - -2006-01-02 Bob Friesenhahn - - * html/man/Makefile.am (htmldoc): Fix htmldoc rule so that it can - be used if build directory is not the same as source directory. - * man/{TIFFGetField.3tiff, TIFFSetField.3tiff}: Documented - TIFFTAG_PHOTOSHOP, TIFFTAG_RICHTIFFIPTC, and TIFFTAG_XMLPACKET, - and re-sorted tag names in alphabetical order. - -2005-12-29 Andrey Kiselev - - * libtiff 3.8.0 released. - -2005-12-28 Bob Friesenhahn - - * tools/bmp2tiff.c (main): Fixed warning regarding returning - inconsistent types from a condition. - * tools/tiffcmp.c (CheckLongTag): Eliminate warning due to printf - format. - * tools/bmp2tiff.c: Reduce compilation warnings on big-endian CPUs. - -2005-12-28 Joris Van Damme - - * html/{index.html, support.hml, libtiff.html}: Cleaned up HTML - -2005-12-27 Andrey Kiselev - - * libtiff/tiffio.h: Added VC_EXTRALEAN definition before including - windows.h, to reduce the compile time. - -2005-12-26 Bob Friesenhahn - - * libtiff/tif_jpeg.c: Improve compilation under MinGW. - -2005-12-26 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dir.h, tif_dirread.c, tif_dirinfo.c}: - tiffFieldInfo and exifFieldInfo arrays definitions moved back to - tif_dirinfo.c; added _TIFFGetFieldInfo() and _TIFFGetExifFieldInfo() - private functions to retrieve FieldInfo arrays. - -2005-12-24 Bob Friesenhahn - - * html/build.html: Added some additional instructions for when - building using MSVC under Windows. Also fixed two HTML syntax - errors and used HTML Tidy to tidy up the HTML syntax and - formatting. - -2005-12-24 Andrey Kiselev - - * libtiff/{tif_aux.c, tif_dir.c, tif_dir.h, tif_dirwrite.c, - tif_print.c, tif_getimage.c}: Make InkSet, NumberOfInks, DotRange and - StoNits tags custom. - -2005-12-23 Andrey Kiselev - - * libtiff/{tif_aux.c, tif_dir.c, tif_dir.h, tif_print.c}: Make - WhitePoint tag custom. - - * libtiff/{tif_dir.h, tiff.h}: More EXIF tags added. - -2005-12-23 Joris Van Damme - - * libtiff/tiffio.h: fixed typo that potentially resulted in - redefininition of USE_WIN32_FILEIO - - * libtiff/*: Added more 'dual-mode' error handling: Done TIFFWarning - calls in core LibTiff. - -2005-12-21 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dir.h, tif_print.c}: Make RichTIFFIPTC, - Photoshop and ICCProfile tags custom. - -2005-12-21 Joris Van Damme - - * libtiff/*, contrib/*: Added 'dual-mode' error handling, enabling - newer code to get context indicator in error handler and still - remain compatible with older code: Done TIFFError calls everywhere - except in tools - -2005-12-20 Andrey Kiselev - - * tools/tiffcp.c: Added many error reporting messages; fixed integer - overflow as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=789 - -2005-12-16 Frank Warmerdam - - * contrib/addtiffo/*: Major upgrade by Joris to support subsampled - YCbCr images in jpeg compressed TIFF files. - -2005-12-14 Andrey Kiselev - - * tools/tiffcp.c: Return non-zero status when reading fails (again). - -2005-12-13 Andrey Kiselev - - * tools/tiffcp.c: Return non-zero status when reading fails. - -2005-12-12 Andrey Kiselev - - * libtiff/{tif_dir.h, tiff.h}: Added more EXIF tags. - -2005-12-09 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dir.h, tif_print.c}: Make XMLPacket tag - custom. - - * tools/tiffinfo.c: Print EXIF directory contents if exist. - - * libtiff/tiff.h: Few EXIF tag numbers added. - - * libtiff/{tif_dirinfo.c, tif_dirread.c, tif_dir.h, tif_dir.c, - tiffio.h}: Preliminary support to read custom directories. New - functions: TIFFReadCustomDirectory() and TIFFReadEXIFDirectory(). - -2005-12-07 Andrey Kiselev - - * libtiff/{tif_dirinfo.c, tif_dirread.c, tif_dir.h, tif_dir.c}: - More work to implement custom directory read support. - - * libtiff/{tif_aux.c, tif_dirinfo.c, tif_dirread.c, tif_dir.h, - tif_dir.c, tif_print.c}: Make YCbCrCoefficients and ReferenceBlackWhite - tags custom. - -2005-12-05 Andrey Kiselev - - * libtiff/tif_dirread.c: One more workaround for broken - StripByteCounts tag. Handle the case when StripByteCounts array filled - with completely wrong values. - -2005-11-30 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Release file descriptor in case of failure - in the TIFFOpenW() function as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1003 - - * libtiff/tif_dirinfo.c: Correctly yse bsearch() and lfind() - functions as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1008 - -2005-11-20 Frank Warmerdam - - * tif_open.c, tiff.h, tiffdump.c: Incorporate preliminary support - for MS MDI format. - http://bugzilla.remotesensing.org/show_bug.cgi?id=1002 - - * .cvsignore: many files added, and a few update according - to suggestion of Brad HArds on tiff mailing list. - -2005-11-03 Frank Warmerdam - - * libtiff/libtiff.def, tiffiop.h, tiffio.h: Made TIFFFreeDirectory - public. - -2005-10-31 Andrey Kiselev - - * tools/fax2tiff.c: Properly calculate sizes of temporary arrays - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=943 - - * tools/fax2tiff.c: Added option '-r' to set RowsPerStrip parameter - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=944 - - * tools/tiffdump.c: Fixed typeshift and typemask arrays initialization - problem as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=946 - - * tools/bmp2tiff.c: Fixed possible integer overflow error as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=965 - - * libtiff/tif_dirinfo.c: Make XResolution, YResolution and - ResolutionUnit tags modifiable during write process. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=977 - - * tools/tiffsplit.c: Copy fax related fields over splitted parts - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=983 - -2005-10-21 Frank Warmerdam - - * tif_dirread.c: Don't try and split single strips into "0" strips - in ChopUpSingleUncompressedStrip. This happens in some degenerate - cases (like 1x1 files with stripbytecounts==0 (gtsmall.jp2 embed tiff) - -2005-10-20 Joris Van Damme - - * tif_fax3.c: changed 'at scanline ...' style warning/errors - with incorrect use of tif_row, to 'at line ... of - strip/tile ...' style - -2005-10-15 Frank Warmerdam - - * tif_write.c: fixed setting of planarconfig as per bug report - on the mailing list from Joris. - -2005-10-07 Andrey Kiselev - - * configure.ac, configure, nmake.opt, libtiff/{tif_config.h, - tif_dirread.c}: Make the default strip size configurable via the - --with-default-strip-size and STRIP_SIZE_DEFAULT options. - -2005-09-30 Bob Friesenhahn - - * html/support.html: Fixed link to documentation on Greg Ward's - LogLuv TIFF format. - -2005-09-28 Andrey Kiselev - - * tools/tiffdump.c: Fixed crash when reading malformed tags. - -2005-09-20 Andrey Kiselev - - * tools/tiff2pdf.c: Added missed 'break' statement as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=932 - -2005-09-12 Andrey Kiselev - - * libtiff 3.7.4 released. - - * {configure, configure.ac, Makefile.am, autogen.sh}: Applied patch - from Patrick Welche (all scripts moved in the 'config' and 'm4' - directories). - -2005-09-12 Frank Warmerdam - - * libtiff/tif_open.c: reintroduce seek to avoid problem on solaris. - -2005-09-05 Frank Warmerdam - - * libtiff/tif_dir.c: When prefreeing tv->value in TIFFSetFieldV - also set it to NULL to avoid double free when re-setting custom - string fields as per: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=922 - -2005-08-12 Frank Warmerdam - - * libtiff/tif_print.c: avoid signed/unsigned warning. - - * libtiff/tif_dirread.c: removed unused variable. - -2005-07-30 Frank Warmerdam - - * libtiff/tif_dir.c: Fixed up support for swapping "double complex" - values (128 bits as 2 64 bits doubles). GDAL gcore tests now - pass on bigendian (macosx) system. - -2005-07-28 Andrey Kiselev - - * libtiff/{tif_aux.c, tif_dirread.c, tif_fax3.c, tiffiop.h}: Rename - CheckMalloc() function to _TIFFCheckMalloc() and make it available - globally as an internal helper routine. - -2005-07-27 Andrey Kiselev - - * libtiff/tif_dir.c: More improvements in the "pass by value" part of - the custom tags handling code. - -2005-07-26 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_dirinfo.c}: Do not upcast BYTEs to - SHORTs in the TIFFFetchByteArray(). Remove TIFFFetchExtraSamples() - function, use TIFFFetchNormalTag() instead as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=831 - - Remove TIFFFetchExtraSamples() function, use TIFFFetchNormalTag() - instead. - - * libtiff/tiffconf.h.in: One more attempt to fix the AIX bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2005-07-25 Andrey Kiselev - - * libtiff/tif_print.c: Fixed printing of the BYTE and SBYTE arrays. - - * tools/tiffdump.c: Added support for TIFF_IFD datatype. - -2005-07-21 Andrey Kiselev - - * libtiff/tif_write.c: Do not check the PlanarConfiguration field in - the TIFFWriteCheck() function in case of single band images (as per - TIFF spec). - -2005-07-12 Andrey Kiselev - - * SConstruct, libtiff/SConstruct: Added the first very preliminary - support for SCons software building tool (http://www.scons.org/). - This is experimental infrastructure and it will exist along with the - autotools mechanics. - -2005-07-07 Andrey Kiselev - - * port/{getopt.c, strcasecmp.c, strtoul.c}: Update modules from - the NetBSD source tree (the old 4-clause BSD license changed to - the new 3-clause one). - - * configure.ac, port/lfind.c, libtiff/tiffiop.h: Added lfind() - replacement module. - - * port/dummy.c: Make the dummy function static. - -2005-07-06 Andrey Kiselev - - * tools/tiffcp.c: Fixed WhitePoint tag copying. - - * libtiff/{tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_print.c}: - Make FieldOfViewCotangent, MatrixWorldToScreen, MatrixWorldToCamera, - ImageFullWidth, ImageFullLength and PrimaryChromaticities tags custom. - -2005-07-04 Andrey Kiselev - - * libtiff 3.7.3 released. - - * configure, configure.ac: Do not use empty -R option when linking - with --enable-rpath. - -2005-07-01 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_open.c}: Added open option 'h' to avoid - reading the first IFD when needed. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=875 - - * libtiff/tif_color.c: Better use of TIFFmin() macro to avoid side - effects. - -2005-06-23 Andrey Kiselev - - * tools/tiff2pdf.c: Print two characters per loop in the - t2p_write_pdf_trailer(). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=594 - - * tools/tiffgt.c: Use MacOS X OpenGL framework when appropriate. As - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=844 - - * acinclude.m4: Updated to latest OpenGL test macros versions. - - * libtiff/tiff.h: Use correct int size on Sparc 64bit/Sun compiler - platform. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=855 - -2005-06-14 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Added support for ClipPath, XClipPathUnits - and YClipPathUnits tags. - -2005-06-07 Andrey Kiselev - - * contrib/addtiffo/tif_ovrcache.c: Properly extract tile/strip size; - use pixel sized shift in contigous case. - -2005-06-06 Andrey Kiselev - - * contrib/addtiffo/{tif_overview.c, tif_ovrcache.c, tif_ovrcache.h}: - Make overviews working for contiguos images. - -2005-06-03 Andrey Kiselev - - * libtiff/tif_open.c: Replace runtime endianness check with the compile - time one. - - * libtiff/tif_predict.c: Floating point predictor now works on - big-endian hosts. - -2005-06-01 Andrey Kiselev - - * libtiff/tif_dir.c: Use _TIFFsetString() function when read custom - ASCII values. - - * libtiff/{tif_dirinfo.c, tif_dir.h, tif_dir.c, tif_print.c}: Make - DocumentName, Artist, HostComputer, ImageDescription, Make, Model, - Copyright, DateTime, PageName, TextureFormat, TextureWrapModes and - TargetPrinter tags custom. - - * libtiff/tif_jpeg.c: Cleanup the codec state depending on - TIFF_CODERSETUP flag (to fix memry leaks). - - * libtiff/tif_jpeg.c: Initialize JPEGTables array with zero after - allocating. - -2005-05-26 Andrey Kiselev - - * configure.ac, libtiff/Makefile.am: Added workaround for - OpenBSD/MirOS soname problem as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=838 - - * libtiff/tif_dirwrite.c: Use tdir_count when calling - TIFFCvtNativeToIEEEDouble() in the TIFFWriteDoubleArray() function as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=845 - -2005-05-25 Andrey Kiselev - - * tools/ppm2tiff.c: Fixed format string when read PPM file header with - the fscanf() function. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=861 - - * libtiff/{tif_dirinfo.c, tif_print.c}: TIFFFetchByteArray() returns - uint16 array when fetching the BYTE and SBYTE filds, so we should - consider result as pointer to uint16 array and not as array of chars. - As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=831 - - * libtiff/tif_dir.c: More efficient custom tags retrieval as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=830 - - * libtiff/tif_win32.c: Use FILE_SHARE_READ | FILE_SHARE_WRITE share - mode in CreateFile() call as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=829 - - * libtiff/Makefile.am: Fixed parallel compilation of the libtiff and - libtiffxx libraries as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=826 - - * contrib/addtiffo/{tif_overview.c, tif_ovrcache.h}: Sinchronized with - GDAL. - -2005-05-23 Frank Warmerdam - - * libtiff/tif_jpeg.c: Substantial fix for addtiffo problems with - JPEG encoded TIFF files. Pre-allocate lots of space for jpegtables - in directory. - -2005-05-22 Frank Warmerdam - - * libtiff/tif_dirread.c: Changed the code that computes - stripbytecount[0] if it appears bogus to ignore if stripoffset[0] is - zero. This is a common case with GDAL indicating a "null" tile/strip. - -2005-05-17 Andrey Kiselev - - * tools/tiffsplit.c: Check for JPEGTables tag presence before copying. - -2005-05-06 Frank Warmerdam - - * libtiff/tif_dirread.c: Applied similar change to - TIFFFetchPerSampleLongs and TIFFFetchPerSampleAnys. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=843 - - * libtiff/tif_jpeg.c: added LIB_JPEG_MK1 support in JPEGDecodeRaw(). - -2005-05-06 Andrey Kiselev - * tools/tiff2pdfr.c, man/tiff2pdf.1: Calculate the tile width properly; - added new option '-b' to use interpolation in output PDF files (Bruno - Ledoux). - -2005-05-05 Frank Warmerdam - - * libtiff/tif_dirread.c: Ensure that broken files with too many - values in PerSampleShorts work ok instead of crashing. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=843 - -2005-04-27 Andrey Kiselev - - * tools/tiffdither.c: Copy the PhotometricInterpretation tag from the - input file. - -2005-04-15 Andrey Kiselev - - * libtiff/tif_predict.c: Added ability to encode floating point - predictor, as per TIFF Technical Note 3. - -2005-04-14 Andrey Kiselev - - * libtiff/{tif_predict.h, tif_predict.c}: Added ability to decode - floating point predictor, as per TIFF Technical Note 3. - -2005-04-13 Andrey Kiselev - - * libtiff/{tiffio.h, tiffiop.h, tif_dir.c, tif_read.c, tif_swab.c}: - Added _TIFFSwab24BitData() and TIFFSwabArrayOfLong() functions used to - swap 24-bit floating point values. - - * libtiff/tiff.h: Added predictor constants. - -2005-04-08 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_dir.c}: Use uint32 type for appropriate - values in _TIFFVSetField() function. Inspired by the bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=816 - - * man/TIFFSetField.3tiff: Fixed definition of the TIFFTAG_INKNAMES tag - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=816 - -2005-03-30 Andrey Kiselev - - * libtiff/tif_open.c: Do not read header in case the output file - should be truncated (Ron). - - * libtiff/{tif_dirinfo.c, tif_config.h.vc}: Use lfind() instead - of bsearch() in _TIFFFindFieldInfoByName() function (Ron). - - * libtiff/{tiff.h, tif_dirinfo.c}: Fixes in EXIF tag ordering (Ron). - -2005-03-22 Andrey Kiselev - - * configure.ac, libtiff/Makefile.am: Use libtool machinery to pass - rpath option. - -2005-03-21 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_print.c}: Handle all data types in custom - tags. - -2005-03-18 Andrey Kiselev - - * libtiff/dirinfo.c: Added DNG tags. - - * libtiff/{tif_dir.c, tif_print.c}: More improvements in custom tag - handling code. - - * libtiff/tiff.h: More comments; added missed DNG tag (LensInfo); - added DNG 1.1.0.0 tags. - - * tools/tif2pdf.c: Fixed problem with alpha channel handling as per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=794 - - * man/TIFFGetField.3tiff: Add a note about autoregistered tags. - -2005-03-17 Andrey Kiselev - - * nmake.opt: Build with Win32 CRT library by default. - - * tools/tiff2ps.c: Fixed typo in page size handling code. - - * libtiff/{tif_dir.c, tif_print.c}: Support for custom tags, passed - by value. - - * libtiff/{tiff.h, tif_dirinfo.c, tiffiop.h}: Added EXIF related tags. - -2005-03-15 Andrey Kiselev - - * libtiff 3.7.2 released. - -2005-03-09 Andrey Kiselev - - * tools/tiffcmp.c: Added ability to compare the 32-bit integer and - floating point data; complain on unsupported bit depths. - -2005-03-05 Andrey Kiselev - - * tif_stream.cxx: Use ios namespace instead of ios_base to support - GCC 2.95. - - * libtiff/{tiff.h, tif_fax3.tif, tif_jpeg.c}: Applied correct patch from - Lee Howard for HylaFax DCS tag - (see http://bugzilla.remotesensing.org/show_bug.cgi?id=771) - -2005-03-04 Andrey Kiselev - - * configure, configure.ac: Use -rpath option instead of -R as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=732 - - * libtiff/{tiff.h, tif_fax3.tif, tif_jpeg.c}: Applied patch from Lee - Howard to support a new tag TIFFTAG_FAXDCS (34911) used in HylaFax - software. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=771 - - * nmake.opt, html/build.html: Add more comments, change the config - file organization a bit as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=764 - - * tools/tiffcmp.c: Use properly sized buffer in short arrays comparison - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=785 - -2005-03-03 Andrey Kiselev - - * libtiff/tif_dirread.c: More logic to guess missed strip size as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=705 - - * tools/fax2ps.c: Replace insecure mktemp() function with the - tmpfile() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=786 - -2005-02-04 Andrey Kiselev - - * libtiff/tiff.h: Changed the int8 definition to be always signed char - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=727 - - * libtiff/tiffio.h: Move TIFFOpenW() function into the extern "C"{} - block as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=763 - -2005-02-03 Bob Friesenhahn - - * tools/tiffgt.c: Fix problem on big-endian CPUs so that images - display more correctly. Images display brighter than they should - on a Sun workstation. - -2005-02-03 Andrey Kiselev - - * libtiff/tif_dirread.c: Estimate strip size in case of wrong or - suspicious values in the tags. As per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=705 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=320 - - * tools/tiff2ps.c: Fixed problem with page sizes as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=742 - -2005-01-31 Bob Friesenhahn - - * libtiff/tiff.h (TIFFTAG_TILEWIDTH): Corrected description. - (TIFFTAG_TILELENGTH): Corrected description. - -2005-01-30 Andrey Kiselev - - * configure.ac: Fixes for --with-docdir option as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=759 - - * libtiff/tif_open.c: Remove unnesessary TIFFSeekFile() call as per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=756 - - * libtiff/tif_stream.cxx: Fixes for C++ stream interface from - Michael Rinne and Edward Lam. - -2005-01-15 Andrey Kiselev - - * configure.ac: Make the documentation directory location configurable - via the --with-docdir option (as suggested by Jeremy C. Reed). - - * libtiff/tif_color.c: Use double as the second argument of pow() - function in TIFFCIELabToRGBInit(). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=741 - - * libtiff/tif_pixarlog.c: Avoid warnings when converting float to - integer as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=740 - - * libtiff/tif_getimage.c: Always fill the error message buffer in - TIFFRGBAImageBegin() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=739 - -2005-01-12 Andrey Kiselev - - * libtiff/tif_jpeg.c: Added ability to read/write the fax specific - TIFFTAG_FAXRECVPARAMS, TIFFTAG_FAXSUBADDRESS and TIFFTAG_FAXRECVTIME - tags as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=736 - - * libtiff/tif_win32.c: Fixed message formatting in functions - Win32WarningHandler() and Win32ErrorHandler() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=735 - - * tools/tiff2ps.c: Interpret the -w and -h options independently. As - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=689 - -2005-01-11 Andrey Kiselev - - * libtiff/tiffio.h: Move the color conversion routines in the 'extern - "C"' section as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=727 - - * libtiff/tiff.h: Restore back the workaround for AIX Visual Age C - compiler to avoid double definition of BSD types as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - - * libtiff/Makefile.am: Place the C++ stream API in the separate - library called libtiffxx to avoid unneeded dependencies. Probably - there will be more C++ API in the future. As per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=733 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=730 - -2005-01-05 Andrey Kiselev - - * tools/tiffdump.c: Fixed problem when read broken TIFFs with the - wrong tag counts (Dmitry V. Levin, Martin Pitt). - - * configure.ac: Replace --disable-c++ with the --disable-cxx option as - per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=730 - -2004-12-25 Andrey Kiselev - - * libtiff/tif_getimage.c: More fixes for multiple-alpha-channelled - RGB-images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=713 - - - * tools/tiffset.c: Convert character option to integer value as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=725 - -2004-12-20 Andrey Kiselev - - * libtiff 3.7.1 released. - - * html/tiffset.1.html: Add missed manual page as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=678 - - * libtiff/tiff.h: Revert back libtiff data type definitions as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=687 - -2004-12-19 Andrey Kiselev - - * libtiff/tif_dirread.c: Do not forget about TIFF_VARIABLE2 when - checking for tag count in TIFFReadDirectory() function. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=713 - - * libtiff/{tif_dirread.c, tif_fax3.c}: More argument checking in - CheckMallock() function. - - * libtiff/tif_getimage.c: Support for multiple-alpha-channelled - RGB-images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=718 - -2004-12-15 Frank Warmerdam - - * libtiff/tif_getimage.c: #define A1 bracketing for clean build on - SunPro compiler. - -2004-12-11 Bob Friesenhahn - - * autogen.sh: aclocal and autoheader should be executed after - libtoolize. Also add '-I .' to aclocal invocation to check - current directory for macros. - -2004-12-10 Andrey Kiselev - - * libtiff/tif_dirwrite.c: Always write TIFFTAG_SUBIFD using LONG type - as per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=703 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=704 - -2004-12-04 Andrey Kiselev - - * nmake.opt: Link with the user32.lib in windowed mode. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=697 - - * libtiff/tif_win32.c: Use char* strings instead of TCHAR in windowed - mode as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=697 - - * libtiff/tif_config.in.vc: Removed unneded definitions for - read/open/close/lseek functions to fix the - - http://bugzilla.remotesensing.org/show_bug.cgi?id=680 - -2004-12-03 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dirread.c}: Remove TIFFReassignTagToIgnore() - call from the TIFFReadDirectory() function. TIFFReassignTagToIgnore - must be removed in the future, as it was never used properly. As per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=692 - -2004-11-30 Bob Friesenhahn - - * libtiff/tif_jpeg.c: Added a work-around in order to allow - compilation with the heavily modified version of libjpeg delivered - with Cygwin. - -2004-11-29 Andrey Kiselev - - * libtiff/tif_dir.c: Properly handle tags, which have the uint32 - counts. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=693 - - * tools/fax2ps.c: Be able to extract the first page (#0). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=690 - -2004-11-28 Andrey Kiselev - - * libtiff/tif_unix.c: Make UNIX module compilable (and usable) - on Windows. - - * nmake.opt: Add missed DLLNAME variable. - -2004-11-26 Frank Warmerdam - - * libtiff/makefile.vc: make it easier to rename the libtiff DLL. - -2004-11-24 Andrey Kiselev - - * man/libtiff.3tiff: Improvements in the "LIST OF ROUTINES" table as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=545 - - * man/tiffset.1: Added manual page for tiffset tool written by Jay - Berkenbilt. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=678 - -2004-11-23 Frank Warmerdam - - * libtiff/tif_error.c: fixed TIFFerror call to be TIFFError. - -2004-11-21 Frank Warmerdam - - * html/document.html: Updated Adobe web links as per email from Joris. - -2004-11-21 Andrey Kiselev - - * libtiff/{tiffio.hxx, tiffio.h}: C++ stream interface moved to new - file tiffio.hxx. We don't have any C++ in tiffio.h, those who want to - use C++ streams should #include . - -2004-11-13 Andrey Kiselev - - * libtiff/tiff.h: Added Adobe DNG tags. - - * libtiff/tif_win32.c: Typo fixed. - - * libtiff/{tif_stream.cxx, tiffio.h}: C++ stream interface updated to - be compliant with the latest standard. Appropriate additions in - makefiles now completed. - -2004-11-11 Andrey Kiselev - - * tools/tiffset.c, libtiff/tif_dirinfo.c: Properly handle the - different tag types. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=600 - -2004-11-10 Andrey Kiselev - - * libtiff/tif_aux.c: Set the appropriate ReferenceBlackWhite array for - YCbCr image which lacks that tag (noted by Hans Petter Selasky). - -2004-11-09 Andrey Kiselev - - * libtiff/tif_color.c: Division by zero fixed (Hans Petter Selasky). - -2004-11-07 Andrey Kiselev - - * libtiff/{tif_stream.cxx, tiffio.h}: Added C++ stream interface - contributed by Edward Lam (see - http://bugzilla.remotesensing.org/show_bug.cgi?id=654 for details). - Though no changes in any makefiles yet. - -2004-11-05 Frank Warmerdam - - * libtiff/tif_open.c: Removed close() in TIFFClientOpen() if file - is bad. This is the callers responsibility. - http://bugzilla.remotesensing.org/show_bug.cgi?id=651 - -2004-11-05 Andrey Kiselev - - * libtiff/{tiffio.h, tif_win32.c, libtiff.def}: Added TIFFOpenW() - function to work with the double byte strings (used to represent - filenames in some locales). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=625 - - * libtiff/tif_dirread.c: Fixed problem when fetching BitsPerSample and - Compression tags of type LONG from broken TIFFS as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=662 - - * libtiff/tif_dirinfo.c: Fixed definition for TIFFTAG_RICHTIFFIPTC, - the writecount should have uint32 type. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=662 - - * libtiff/tif_write.c: Fixed wrong if() statement in - TIFFAppendToStrip() function as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=660 - -2004-11-04 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Change definition for TIFFTAG_EXTRASAMPLES - field. The caller should supply a count when setting this field. As - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=648 - - * libtiff/{tif_jpeg.c, tif_ojpeg.c}: TIFFTAG_JPEGTABLES should have - uint32 count. Use this type everywhere. - -2004-11-03 Frank Warmerdam - - * libtiff/tif_next.c: avoid use of u_long and u_char types. Bug 653. - -2004-11-02 Frank Warmerdam - - * tools/tiff2rgba.c: removed extra newlines in usage message. - -2004-10-30 Andrey Kiselev - - * libtiff/tif_dirwrite.c: Improvements in tag writing code. - - * tools/tiff2ps.c: Fixed wrong variable data type when read Position - tags (Tristan Hill). - -2004-10-30 Frank Warmerdam - - * libtiff/tiffiop.h: added fallback definition of assert() if we - don't have assert.h. - -2004-10-29 Andrey Kiselev - - * libtiff/tif_fax3.c: Fixed case with the wrong decode routines - choosing when the incorrect Group4Options tag set. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=323 - - * libtiff/tif_dirwrite.c: Fixed problem with passing count variable of - wrong type when writing the TIFF_BYTE/TIFF_SBYTE tags in - TIFFWriteNormalTag(). - -2004-10-28 Andrey Kiselev - - * tools/tiff2ps.c: Fixed wrong variable data type when read Resolution - tags (Peter Fales). - - * tools/{bmp2tiff.c, raw2tiff.c}: Get rid of stream I/O functions. - -2004-10-28 Frank Warmerdam - - * tools/tiff2pdf.c: added casts to avoid warnings. - - * libtiff/libtiff.def: Added several more entry points required - to link fax2tiff.c against the DLL on windows. - -2004-10-27 Andrey Kiselev - - * configure, configure.ac: Added --enable-rpath option to embed linker - paths into library binary. - -2004-10-26 Andrey Kiselev - - * tools/tiffset.c: Check the malloc return value (Dmitry V. Levin). - - * libtiff/{tif_strip.c, tif_tile.c}: Zero division problem fixed - (Vladimir Nadvornik, Dmitry V. Levin). - -2004-10-16 Andrey Kiselev - - * libtiff 3.7.0 released. - -2004-10-15 Bob Friesenhahn - - * libtiff/tif_jpeg.c: There seems to be no need to include stdio.h - in this file so its inclusion is removed. Including stdio.h - sometimes incurs an INT32 typedef conflict between MinGW's - basetsd.h and libjpeg's jmorecfg.h. - -2004-10-15 Andrey Kiselev - - * man/bmp2tiff.1: Added manual page for bmp2tiff utility. - -2004-10-13 Bob Friesenhahn - - * tools/tiffcmp.c (leof): Renamed from 'eof' in order to avoid - conflict noticed under MinGW. - * ltmain.sh: Fix for MinGW compilation. - -2004-10-13 Frank Warmerdam - - * man/tiffsplit.1: Fixed to indicate using aaa-zzz, not aa-zz. - http://bugzilla.remotesensing.org/show_bug.cgi?id=635 - -2004-10-12 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_jpeg.c, tif_luv.c, tif_ojpeg.c, - tif_pixarlog.c, tif_write.c}: Handle the zero strip/tile sizes - properly (Dmitry V. Levin, Marcus Meissner). - -2004-10-11 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Type of the TIFFTAG_SUBIFD field changed - to TIFF_IFD. - -2004-10-10 Andrey Kiselev - - * tools/bmp2tif.c: Check the space allocation results. - -2004-10-09 Andrey Kiselev - - * libtiff/tif_dir.c: Initialize td_tilewidth and td_tilelength fields - of the TIFFDirectory structure with the 0 instead of -1 to avoid - confusing integer overflows in TIFFTileRowSize() for striped images. - - * tools/tiff2pdf.c: Fixed TransferFunction tag handling reported - by Ross A. Finlayson. - - * libtiff/tif_dir.c: Fixed custom tags handling as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=629 - -2004-10-08 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Fix bug with tif_foundfield and reallocation - of tif_fieldinfo. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=630 - -2004-10-04 Bob Friesenhahn - - * contrib/iptcutil/README: Added the missing README which goes - along with iptcutil. - -2004-10-03 Andrey Kiselev - - * libtiff/tif_compress.c: Improved error reporting in - TIFFGetConfiguredCODECs() (Dmitry V. Levin). - -2004-10-02 Andrey Kiselev - - * libtiff 3.7.0beta2 released. - - * libtiff/{tif_aux.c, tif_compress.c, tif_dirinfo.c, tif_dirwrite.c, - tif_extension.c, tif_fax3.c, tif_luv.c, tif_packbits.c, - tif_pixarlog.c, tif_write.c}: Added checks for failed memory - allocations and integer overflows (Dmitry V. Levin). - - * libtiff/tiff.h: Missed TIFF_BIGTIFF_VERSION constant added. - -2004-10-01 Frank Warmerdam - - * libtiff/tif_open.c: added a more informative message if a BigTIFF - file is opened. - -2004-09-30 Frank Warmerdam - - * libtiff/tif_dirinfo.c: changed type of XMLPacket (tag 700) to - TIFFTAG_BYTE instead of TIFFTAG_UNDEFINED to comply with the info - in the Adobe XMP Specification. - -2004-09-29 Andrey Kiselev - - * libtiff/{tif_jpeg.c, tif_pixarlog.c}: Use _TIFFmemset() instead of - memset(). - - * libtiff/{tif_dirread.c, tif_strip.c, tif_tile.c}: Applied patches - from Dmitry V. Levin to fix possible integer overflow problems. - -2004-09-28 Andrey Kiselev - - * libtiff/tif_getimage.c: Check for allocated buffers before clearing - (Dmitry V. Levin). - -2004-09-26 Andrey Kiselev - - * libtiff/{tif_dir.h, tif_dir.c, tif_dirread.c, tif_write.c}: - Optimize checking for the strip bounds. - - * libtiff/{tif_dirread.c, tif_strip.c}: TIFFScanlineSize() and - TIFFRasterScanlineSize() functions report zero in the case of integer - overflow now. Properly handle this case in TIFFReadDirectory() - (patches from Dmitry V. Levin). - -2004-09-25 Andrey Kiselev - - * libtiff/{tif_dirinfo.c, tif_strip.c, tif_tile.c}: Use TIFFhowmany8() - macro where appropriate. - - * tools/tiff2bw.c: Write ImageWidth/Height tags to output file, as - noted by Gennady Khokhorin. - - * libtiff/tif_dirread.c: Always check the return values, returned - by the _TIFFmalloc() (Dmitry V. Levin). - - * libtiff/tif_dir.c: Fixed possible integer overflow _TIFFset*Array() - functions (Dmitry V. Levin). - - * libtiff/{tif_dirread.c, tif_dir.c, tif_write.c}: - Potential memory leak fixed in TIFFReadDirectory(), _TIFFVSetField(), - TIFFGrowStrips() (found by Dmitry V. Levin). - -2004-09-24 Andrey Kiselev - - * libtiff/{tiffio.h, tif_compress.c}: Added TIFFGetConfiguredCODECs() - to get the list of configured codecs. - - * libtiff/{tiffiop.h, tif_dirread.c}: More overflow fixes from - Dmitry V. Levin. - -2004-09-23 Andrey Kiselev - - * libtiff/tif_dirread.c: Applied patch from Dmitry V. Levin to fix - possible integer overflow in CheckMalloc() function. - -2004-09-22 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_strip.c}: Use TIFFhowmany8() macro instead - of plain TIFFhowmany() where appropriate. - -2004-09-21 Andrey Kiselev - - * libtiff/tif_getimage.c: Initialize arrays after space allocation. - -2004-09-19 Andrey Kiselev - - * libtiff 3.7.0beta released. - - * libtiff/{tif_luv.c, tif_next.c, tif_thunder.c}: Several buffer - overruns fixed, as noted by Chris Evans. - -2004-09-14 Bob Friesenhahn - - * commit: Added a script to make it more convenient to commit - updates. The CVS commit message is extracted from this ChangeLog - file. - -2004-09-14 Andrey Kiselev - - * configure.ac, configure, aclocal.m4, libtiff/{mkspans.c, tif_fax3.c, - tif_getimage.c, tif_luv.c, tif_lzw.c, tif_ojpeg.c, tif_packbits.c, - tif_predict.c, tif_read.c, tif_swab.c, tif_thunder.c, tif_write.c, - tif_dir.c, tif_dirread.c, tif_dirwrite.c, tif_jpeg.c, tif_dirinfo.c, - tif_vms.c, tif_print.c, tif_strip.c, tif_tile.c, tif_dir.h, - tif_config.h.in, tiffiop.h}: - Get rid of BSD data types (u_char, u_short, u_int, u_long). - -2004-09-13 Bob Friesenhahn - - * libtiff/tiff.h: Fix column tagging. Reference current Adobe XMP - specification. Reference libtiff bug tracking system to submit - private tag additions. - -2004-09-12 Bob Friesenhahn - - * tools/tiffgt.c: Include "tif_config.h". - - * configure.ac: Use AM_PROG_CC_C_O since it is now needed to build - tiffgt. This results in the 'compile' script being added to the - project. - - * tools/Makefile.am (tiffgt_CFLAGS): Add extra build options - required to find OpenGL headers necessary to build tiffgt. Also - ensure that the libtiff that we built is used rather than some other - libtiff installed on the system. - -2004-09-12 Andrey Kiselev - - * configure.ac, acinclude.m4, aclocal.m4: New macros to detect GLUT - libraries. - -2004-09-11 Bob Friesenhahn - - * configure.ac: Pass library configuration defines via - tif_config.h rather than extending CPPFLAGS. Configure a - libtiff/tiffconf.h in order to satisfy application requirements - (not used by library build). Do not define _POSIX_C_SOURCE=2 since - this causes failure to build on systems which properly respect - this request. - - * libtiff/tiffconf.h.in: New file to act as the template for the - configured tiffconf.h - - * libtiff/files.lst (HDRS): Install the configured tiffconf.h. - -2004-09-10 Frank Warmerdam - - * html/internals.html: Split off a discussion of adding new tags - into addingtags.html. - -2004-09-10 Andrey Kiselev - - * test/{ascii_tag.c, long_tag.c}: Preliminary test suite added. - - * tools/tiff2pdf.c: Fixed reading TransferFunction tag as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=590 - - * libtiff/tif_print.c: Fixes in InkNames and NumberOfInks reporting. - - * libtiff/tif_dirread.c: Don't reject to read tags of the - SamplesPerPixel size when the tag count is greater than number of - samples as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=576 - - * libtiff/tiff.h: Use _TIFF_DATA_TYPEDEFS_ guardian to switch off - defining int8/uint8/... etc. types. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=607 - -2004-09-09 Frank Warmerdam - - * tools/tiff2ps.c, tools/tiffmedian.c: fiddle with include files - to avoid compile warnings about getopt() and a few other things. - -2004-09-02 Andrey Kiselev - - * libtiff/tif_dirread.c: Use memcpy() function instead of pointer - assigning magic in TIFFFetchFloat(). - -2004-09-01 Andrey Kiselev - - * libtiff/{tiffio.h, tif_open.c}: Applied patches from Joris Van Damme - to avoid requirement for tiffiop.h inclusion in some applications. See - here - - http://www.asmail.be/msg0054799560.html - - for details. - - * tools/fax2tiff.c: Use the new functions in the code. - -2004-08-25 Andrey Kiselev - - * tools/tiff2pdf.c: Initialize arrays properly. - - * tools/tiff2ps.c: Avoid zero division in setupPageState() function; - properly initialize array in PSDataBW(). - -2004-08-24 Andrey Kiselev - - * tools/tiff2pdf.c: More fixes for bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=590 - - from Ross Finlayson. - -2004-08-23 Andrey Kiselev - - * tools/tiff2ps.c: Fixed problem with uninitialized values. - - * libtiff/tif_dir.c: Initialize tif_foundfield data member in the - TIFFDefaultDirectory() (in addition to 2004-08-19 fix). - - * tools/tiff2pdf.c: Fixed a bunch of problems as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=590 - -2004-08-20 Andrey Kiselev - - * tools/tiff2pdf.c: Applied patch from Ross Finlayson that checks - that the input file has compression, photometric interpretation, - etcetra, tags or if not than a more descriptive error is returned. - - * libtiff/tif_dirread.c: Fixed problem in TIFFReadDirectory() in the - code, responsible for tag data type checking. - -2004-08-19 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_dirinfo.c}: Fixed problem with the static - variable as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=593 - -2004-08-16 Andrey Kiselev - - * tools/ras2tiff.c: Fixed issue with missed big-endian checks as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=586 - -2004-08-01 Andrey Kiselev - - * libtiff/{tif_config.h.in, tif_config.h.vc}: config.h.in and - config.h.vc files renamed in the tif_config.h.in and tif_config.h.vc. - -2004-07-24 Andrey Kiselev - - * libtiff/tif_lzw.c: LZW compression code is merged back from the - separate package. All libtiff tools are updated to not advertise an - abcence of LZW support. - -2004-07-12 Andrey Kiselev - - * libtiff/tiffio.h: Revert thandle_t back to void* type. - -2004-07-11 Andrey Kiselev - - * libtiff/{tif_read.c, tif_tile.c, tif_strip.c}: Fixes in error - messages, as suggested by Bernd Herd. - -2004-07-03 Andrey Kiselev - - * libtiff/tif_dir.c: Call TIFFError() instead of producing warnings - when setting custom tags by value. Reported by Eric Fieleke. - -2004-06-14 Andrey Kiselev - - * tools/bmp2tiff.c: Add missed RawsPerStrip setting. - -2004-06-08 Andrey Kiselev - - * tools/bmp2tiff.c: Added new utility to convert Windows BMP files - into TIFFs. - -2004-06-07 Andrey Kiselev - - * libtiff 3.7.0alpha released. - -2004-06-06 Andrey Kiselev - - * libtiff/{tiff.h, tif_dirwrite.c, tif_fax3.c, tif_packbits.c,}: Get rid - of ugly 64-bit hacks, replace them with the clever (autoconf based ) - ones :-). - - * libtiff/tiffio.h: Define thandle_t as int, not void* (may cause - problems in 64-bit environment). - -2004-06-05 Andrey Kiselev - - * tools/tiffset.c: tiffset now can set any libtiff supported tags. - Tags can be supplied by the mnemonic name or number. - - * libtiff/{tiffio.h, tif_dir.h, tif_dirinfo.c,}: Added two new - functions TIFFFindFieldInfoByName() and TIFFFieldWithName(). - -2004-05-27 Andrey Kiselev - - * libtiff/tif_ojpeg.c: Fixed problem with duplicated SOI and SOF - markers as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=581 - -2004-05-24 Andrey Kiselev - - * tools/tiffsplit.c: Don't forget to copy Photometric - Interpretation tag. - -2004-05-20 Andrey Kiselev - - * libtiff/{tif_open.c, tiffio.h}: New function added: - TIFFIsBigEndian(). Function returns nonzero if given was file written - in big-endian order. - - * tools/tiffsplit.c: Fixed problem with unproperly written multibyte - files. Now output files will be written using the same byte order - flag as in the input image. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=574 - - for details. - -2004-05-19 Frank Warmerdam - - * libtiff/tif_print.c: added (untested) support for printing - SSHORT, SLONG and SRATIONAL fields. - - * tools/tiffcp.c: close output file on normal exit. - -2004-05-17 Andrey Kiselev - - * libtiff/tif_fax3.c: Avoid reading CCITT compression options - if compression type mismatches. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=565 - -2004-04-30 Andrey Kiselev - - * libtiff/tif_strip.c: Never return 0 from the - TIFFNumberOfStrips(). - -2004-04-29 Andrey Kiselev - - * libtiff/tif_dirread.c: Workaround for broken TIFF writers which - store single SampleFormat value for multisampled images. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=562 - -2004-04-25 Andrey Kiselev - - * configure.ac, libtiff/{tiff.h, config.h.in}: Added tests for int8, - int16 and int32 types to avoid complains on some compilers. Details at - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2004-04-20 Andrey Kiselev - - * tools/tiff2pdf.c: Fixed problem with unaligned access as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=555 - -2004-04-14 Andrey Kiselev - - * libtiff/tif_write.c: Allow in-place updating of the compressed - images (don't work properly with all codecs). For details see GDAL bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=534 - -2004-04-06 Andrey Kiselev - - * libtiff/tif_jpeg.c: Workaround for wrong sampling factors used - in the Intergarph JPEG compressed TIFF images as per bug: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=532 - -2004-04-04 Frank Warmerdam - - * libtiff/tif_open.c: close clientdata if TIFFClientOpen() fails - via bad2. - -2004-03-26 Andrey Kiselev - - * tools/tiffcp.c: Properly set Photometric Interpretation in case of - JPEG compression of grayscale images. - - * tools/tiffcp.c: Don't emit warnings when Orientation tag does not - present in the input image. - -2004-03-19 Andrey Kiselev - - * {many}: The first attempt to switch to autotools. - -2004-03-03 Andrey Kiselev - - * libtiff/tif_open.c: Use dummy mmap/munmap functions in - TIFFClientOpen() when the appropriate client functions was not - supplied by user. - -2004-03-02 Frank Warmerdam - - * tools/ycbcr.c: fixed main() declaration as per: - http://bugzilla.remotesensing.org/show_bug.cgi?id=513 - -2004-02-26 Andrey Kiselev - - * tools/tiffsplit.c: Copy JPEGTables tag contents for JPEG compressed - images. Reported by Artem Mirolubov. - - * libtiff/tif_dirread.c: Fixed problem with handling TIFF_UNDEFINED - tag type in TIFFFetchNormalTag() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=508 - -2004-02-17 Frank Warmerdam - - * libtiff/tif_codec.c: Fixed typo in TIFFInitPackBits name as per: - http://bugzilla.remotesensing.org/show_bug.cgi?id=494 - -2004-02-05 Andrey Kiselev - - * libtiff/tif_fax3.c: Fixed problem with CCITT encoding modes as per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=483 - - But we need more work on fax codec to support update mode. - -2004-01-30 Frank Warmerdam - - * libtiff/libtiff.def: Added TIFFCurrentDirOffset, TIFFWriteCheck, - TIFFRGBAImageOK, and TIFFNumberOfDirectories as suggested by - Scott Reynolds. - -2004-01-29 Andrey Kiselev - - * libtiff/tiff.h: Fixed tag definitions for TIFFTAG_YCLIPPATHUNITS - and TIFFTAG_INDEXED as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=475 - - * libtiff/{tif_win32.c, tif_unix.c}: Check whether the pointer is - NULL before proceeding further as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=474 - - Check results, returned by the TIFFFdOpen() before returning and close - file if TIFFFdOpen() failed as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=468 - - * libtiff/tif_open.c: More fixes for - - http://bugzilla.remotesensing.org/show_bug.cgi?id=468 - -2004-01-28 Andrey Kiselev - - * libtiff/{libtiff.def, tif_close.c, tiffio.h, tif_open.c}: Separate - TIFFCleanup() from the TIFFClose() in order to fix the bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=468 - - * tools/tiffcp.c: Fixed problem with wrong interpretation of the - InkNames tag as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=466 - - Memory leak fixed. - -2004-01-21 Frank Warmerdam - - * libtiff/tif_dirwrite.c: Fixed handling of writable ASCII tags that - are field_passcount=TRUE properly. Arguably anonymous custom tags - should be declared as passcount=FALSE, but I don't want to change - that without a careful review. - -2004-01-20 Andrey Kiselev - - * libtiff/tif_write.c: Fixed reporting size of the buffer in case of - stripped image in TIFFWriteBufferSetup(). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=460 - -2004-01-11 Andrey Kiselev - - * libtiff/tif_dir.c: Incomplete cleanup in TIFFFreeDirectory(), - patch from Gerben Koopmans. - - * libtiff/tif_dirread.c: Check field_passcount value before setting - the value of undefined type, patch from Gerben Koopmans. - -2004-01-02 Andrey Kiselev - - * tools/tiffcp.c: Fixed problem with wrong Photometric setting for - non-RGB images. - -2003-12-31 Andrey Kiselev - - * libtiff/tif_win32.c: Fixed problem with _TIFFrealloc() when the NULL - pointer passed. Patch supplied by Larry Grill. - - * libtiff/{tiff.h, tif_fax3.c}:Fixes for AMD 64 platform as - suggested by Jeremy C. Reed. - -2003-12-26 Andrey Kiselev - - * libtiff 3.6.1 released. - -2003-12-24 Andrey Kiselev - - * config.guess, config.sub: Updated from the recent upstream. - -2003-12-22 Andrey Kiselev - - * libtiff/{tif_color, tif_getimage.c, tiffio.h}, man/TIFFcolor.3t: - More cleanups in color conversion interface, added appropriate manual - page. - -2003-12-19 Andrey Kiselev - - * libtiff/{tif_extension.c, tif_dirinfo.c, tiff.h}: Warnings fixed as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=357 - - * tools/tiff2ps.c: Added support for alpha channel. Fixes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=428 - - * libtiff/{libtiff.def, tif_color.c, tif_getimage.c, tiffio.h}: - Interface for Lab->RGB color conversion is finally cleaned up. - Added support for ReferenceBlackWhite tag handling when converted from - YCbCr color space. The latter closes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=120 - -2003-12-07 Andrey Kiselev - - * libtiff/{tif_getimage.c, tiffio.h}: Avoid warnings. - - * libtiff/makefile.vc, tools/makefile.vc: Support for IJG JPEG - library. - -2003-12-06 Andrey Kiselev - - * libtiff/{tif_getimage.c, tif_aux.c}: Read WhitePoint tag from the - file and properly use it for CIE Lab->RGB transform. - -2003-12-04 Andrey Kiselev - - * libtiff/{tif_getimage.c, tif_color.c, tiffio.h}: YCbCr->RGB - conversion routines now in the tif_color.c module. New function - TIFFYCbCrtoRGB() available in TIFF API. - - * libtiff/tif_dirwrite.c: Handle TIFF_IFD tag type correctly. - -2003-12-03 Andrey Kiselev - - * libtiff/{tif_getimage.c, tif_color.c, tiffio.h}: Improvements in - CIE Lab conversion code. Start moving YCbCr stuff to the tif_color.c - module. - - * libtiff/{tif_getimage.c, tiffio.h}, man{TIFFReadRGBAImage.3t, - TIFFReadRGBAStrip.3t, TIFFReadRGBATile.3t, TIFFRGBAImage.3t}: - Finally resolved problems with orientation handling. TIFFRGBAImage - interface now properly supports all possible orientations, i.e. images - will be flipped both in horizontal and vertical directions if - required. 'Known bugs' section now removed from the appropriate manual - pages. Closed bug entry: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=322 - -2003-12-02 Andrey Kiselev - - * libtiff/tif_dir.c: Fixed order of the parameters in TIFFError() - function calls as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=440 - -2003-11-28 Ross Finlayson - - * tools/tiff2pdf.c: Some bugs fixed. - -2003-11-27 Andrey Kiselev - - * libtiff/tif_luv.c: Fixed bug in 48-bit to 24-bit conversion routine, - reported by Antonio Scuri. - - * man/tiff2pdf.1: Few improvements in page layout. - - * Makefile.in, /man/Makefile.in, /html/man/tiff2pdf.1.html: - Added support fpr tiff2pdf manual page. - -2003-11-26 Ross Finlayson - - * /man/tiff2pdf.1: File added to repository. - -2003-11-26 Andrey Kiselev - - * Makefile.in, /tools/{Makefile.in, makefile.vc}: - Added support fpr tiff2pdf utility. - -2003-11-25 Ross Finlayson - - * /tools/tiff2pdf.c: File added to repository. - -2003-11-22 Andrey Kiselev - - * /tools/raw2tiff.c: sqrtf() replaced with sqrt(). - -2003-11-21 Andrey Kiselev - - * /tools/raw2tiff.c: #include removed. - - * tools/{Makefile.in, tiffgt.c}: Unmaintained and platform dependent - sgigt utility removed and replaced with the completely rewritten - portable tiffgt tool (depend on OpenGL and GLUT). Initial revision, - there is a lot of things to improve. - - * libtiff/tif_ojpeg.c: TIFFVGetField() function now can properly - extract the fields from the OJPEG files. Patch supplied by Ross - Finlayson. - - * libtiff/{tiffio.h, tif_codec.c}, man/{libtiff.3t, TIFFcodec.3t}: - Added new function TIFFIsCODECConfigured(), suggested by Ross - Finlayson. - -2003-11-18 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Implemented binary search in - _TIFFMergeFieldInfo(). Patch supplied by Ross Finlayson. - - * libtiff/tif_dir.h: _TIFFFindOrRegisterdInfo declaration replaced - with _TIFFFindOrRegisterFieldInfo as reported by Ross Finlayson. - -2003-11-17 Frank Warmerdam - - * tif_dirread.c: do not mark all anonymously defined tags to be - IGNOREd. - -2003-11-17 Andrey Kiselev - - * contrib/pds/{tif_pdsdirread.c, tif_pdsdirwrite.c}: Use - TIFFDataWidth() function insted of tiffDataWidth array. - -2003-11-16 Andrey Kiselev - - * libtiff/{tiff.h, tif_dirinfo.c}: Added support for IFD (13) - datatype, introduced in "Adobe PageMaker TIFF Tech. Notes". - -2003-11-15 Frank Warmerdam - - * Makefile.in: fixed missing backslash for tif_color.c in list. - -2003-11-13 Andrey Kiselev - - * libtiff/{tif_color.c, tif_getimage.c, tiffio.h, Makefile.in}: - New color space conversion code: CIE L*a*b* 1976 images now supported - by the TIFFRGBAImage interface. All introduced routines go to new - module tif_color.c. Eventually all color conversion functions should - be moved there. - -2003-11-12 Andrey Kiselev - - * tools/{ras2tiff.c, rasterfile.h}: Properly determine SUN Rasterfiles - with the reverse byte order (it is reported by the magic header - field). Problem reported by Andreas Wiesmann. - - * tools/raw2tiff.c, man/raw2tiff.1: Few improvements in correlation - calculation function. Guessing mechanics now documented in manual page. - -2003-11-11 Andrey Kiselev - - * tools/raw2tiff.c: Implemented image size guessing using - correlation coefficient calculation between two neighbour lines. - -2003-11-09 Frank Warmerdam - - * libtiff/tif_tile.c: remove spurious use of "s" (sample) in the - planarconfig_contig case in TIFFComputeTile(). - - http://bugzilla.remotesensing.org/show_bug.cgi?id=387 - -2003-11-09 Andrey Kiselev - - * libtiff/tiffiop.h: New macros: TIFFmax, TIFFmin and TIFFrint. - -2003-11-07 Andrey Kiselev - - * libtiff/{tiffio.h, tif_strip.c}, man/{TIFFstrip.3t, libtiff.3t}: - Added TIFFRawStripSize() function as suggested by Chris Hanson. - -2003-11-03 Andrey Kiselev - - * libtiff/{tif_lzw.c, tif_fax3.c}: Proper support for update mode as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=424 - -2003-10-29 Andrey Kiselev - - * libtiff/libtiff.def: Added TIFFReadRGBAImageOriented. - - * html/build.html: Added note about GNU make requirement. - -2003-10-25 Andrey Kiselev - - * Makefile.in: Fixes in using MAKEFLAGS as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=418 - - * port/install.sh.in: Option -p added to the mkdir command to create - all directory tree structure before installing. - -2003-10-18 Andrey Kiselev - - * /tools/tiff2ps.c: #include replaced with the - #include . - -2003-10-16 Andrey Kiselev - - * Makefile.in: Add an absolute path to the test_pics.sh call. - -2003-10-12 Andrey Kiselev - - * libtiff/tiffcomp.h: #define _BSDTYPES_DEFINED when defining BSD - typedefs. - -2003-10-09 Andrey Kiselev - - * configure, libtiff/{Makefile.in, mkversion.c}: - Relative buildings fixed. - - * tools/Makefile.in: Added "-I../libtiff" to the tiffset building - rule. - -2003-10-07 Andrey Kiselev - - * Makefile.in: Added missed v3.6.0.html. - - * libtiff/tiffio.h: Typo fixed: ORIENTATION_BOTTOMLEFT replaced with - ORIENTATION_BOTLEFT. - -2003-10-04 Andrey Kiselev - - * 3.6.0 final release. - -2003-10-03 Andrey Kiselev - - * libtiff/{tif_getimage.c, tiffio.h}, man/TIFFReadRGBAImage.3t: New - function TIFFReadRGBAImageOriented() implemented to retrieve raster - array with user-specified origin position as suggested by Jason Frank. - See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=322 - - for details. - - * tools/tiff2rgba.c: Switched to use TIFFReadRGBAImageOriented() - instead of TIFFReadRGBAImage(). - - * tools/tiff2ps.c: Fixed possible endless loop as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=404 - -2003-09-30 Andrey Kiselev - - * libtiff/tif_dirread.c: Check field counter against number of fields - in order to fix - - http://bugzilla.remotesensing.org/show_bug.cgi?id=366 - - * libtiff/tif_fax3.c: Fix wrong line numbering as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=342 - -2003-09-25 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_dirread.c, tif_dir.c, tif_open.c, - tif_close.c}: Store a list of opened IFD to prevent looping as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=383 - -2003-09-23 Andrey Kiselev - - * libtiff/tif_dirread.c: More fixes for EstimateStripByteCounts(). See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=358 - -2003-08-21 Andrey Kiselev - - * tools/tiffmedian.c: int declaration replaced with the uint32 to - support large images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=382 - -2003-08-12 Andrey Kiselev - - * libtiff/Makefile.in: Fixed problem with building in different - directory. - - * tools/tiff2ps.c: Added missing #include . - - * libtiff/tif_dirwrite.c: More fixes for custom tags code - from Ashley Dreier. - -2003-08-07 Andrey Kiselev - - * tools/tiff2ps.c: Added page size setting when creating PS Level 2. - Patch submitted by Balatoni Denes (with corrections from Tom - Kacvinsky). - - * tools/tiff2ps.c: Fixed PS comment emitted when FlateDecode is - being used. Reported by Tom Kacvinsky. - - * libtiff/tif_dirwrite.c: Fixed problem with custom tags writing, - reported by Ashley Dreier. - - * libtiff/tif_print.c: Fixed problem with float tags reading, support - for printing RATIONAL and BYTE tags added. - -2003-08-05 Andrey Kiselev - - * libtiff/tif_lzw.c: Move LZW codec state block allocation back to - TIFFInitLZW(), because its initialization in LZWSetupDecode() cause - problems with predictor initialization. Remove O_RDONLY check during - state block allocation to be able open LZW compressed files in update - mode. - - Problem exist for libtiff version of the tif_lzw.c module. One from - lzw-compression-kit hasn't such troubles. - -2003-08-04 Frank Warmerdam - - * libtiff/tif_write.c: modified tif_write.c so that the various - encoded write functions use tif_postdecode() to apply byte order - swapping (swab) to the application passed data buffer if the same - would be done when reading. This allows us to write pixel data with - more than 8 bits per sample to existing files of a non-native byte - order. One side effect of this change is the applications buffer - itself is altered in this case by the act of writing. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=171 - -2003-07-25 Frank Warmerdam - - * libtiff/tif_open.c: avoid signed/unsigned casting warning - initializing typemask as per patch from J.A. Strother. - - * tools/tiffcp.c: fixed signed/unsigned casting warning. - - * libtiff/tif_print.c: dos2unix conversion. - - * tools/tiffsplit.c: increased the maximum number of pages that - can be split. Patch provided by Andrew J. Montalenti. - -2003-07-11 Andrey Kiselev - - * tools/raw2tiff.c: Added option `-p' to explicitly select color - space of input image data. Closes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=364 - -2003-07-08 Frank Warmerdam - - * tif_aux.c, tif_codec.c, tif_dir.c, tif_dirread.c, tif_extension.c, - tif_fax3.c, tif_getimage.c, tif_luv.c, tif_lzw.c, tif_next.c, - tif_packbits.c, tif_predict.c, tif_print.c, tif_swab.c, tif_thunder.c: - avoid casting warning at /W4. - -2003-07-03 Andrey Kiselev - - * tools/thumbnail.c: Memory leak fixed as reported by Robert S. Kissel. - -2003-06-30 Andrey Kiselev - - * libtiff/tif_pixarlog.c: Unused variables removed. - - * libtiff/{tif_dirread.c, tif_dir.c}: Fixed problem with - EstimateStripByteCounts() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=358 - - * libtiff/{tif_dirwrite.c, tif_packbits.c}: Fixed compilation on - 64-bit architectures as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=357 - - * libtiff/tif_dirinfo.c: TIFFDataWidth() returns 0 in case of - unknown data type. - -2003-06-19 Frank Warmerdam - - * libtiff/tif_print.c: fixed some serious bugs when printing - custom tags ... almost certain to crash. - - * libtiff/tif_dirread.c: Don't ignore custom fields that are - autodefined. Not sure how this got to be like this. - -2003-06-18 Andrey Kiselev - - * 3.6.0 Beta2 released. - - * tools/tiffcmp.c, man/tiffcmp.1: Fixed problem with unused data - comparing as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=349 - - `-z' option now can be used to set the number of reported different - bytes. - -2003-06-09 Andrey Kiselev - - * tools/tiffcp.c, man/tiffcp.1: Added possibility to specify value -1 - to -r option to get the entire image as one strip. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=343 - - for details. - -2003-06-04 Andrey Kiselev - - * tools/tiffcp.c: Set the correct RowsPerStrip and PageNumber - values as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=343 - -2003-05-27 Frank Warmerdam - - * libtiff/tif_jpeg.c: modified segment_height calculation to always - be a full height tile for tiled images. Also changed error to just - be a warning. - -2003-05-25 Andrey Kiselev - - * tools/fax2tiff.c: Page numbering fixed, as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=341 - -2003-05-20 Andrey Kiselev - - * contrib/ojpeg/{Makefile.in, jdhuff.h, jinclude.h, ojpeg.c, README}, - configure, Makefile.in: Switched back to the old behaviour. Likely - better solution should be found for OJPEG support. - -2003-05-11 Andrey Kiselev - - * libtiff/mkversion.c: Fixed problem with wrong string size when - reading RELEASE-DATE file. - -2003-05-07 Andrey Kiselev - - * tools/tiff2ps.c: Fixed bug in Ascii85EncodeBlock() function: array - index was out of range. - -2003-05-06 Andrey Kiselev - - * contrib/ojpeg/{Makefile.in, jdhuff.h, jinclude.h, ojpeg.c, README}, - configure, Makefile.in: Improved libtiff compilation with OJPEG - support. Now no need for patching IJG JPEG library, hack required by - libtiff will be compiled and used in-place. Implemented with - suggestion and help from Bill Allombert, Debian's libjpeg maintainer. - - * libtiff/tif_aux.c: Properly handle TIFFTAG_PREDICTOR in - TIFFVGetFieldDefaulted() function. - -2003-05-05 Andrey Kiselev - - * tools/ppm2tiff.c: PPM header parser improved: now able to skip - comments. - - * tools/tiffdither.c: Fixed problem with bit fill order tag setting: - was not copied from source image. - - * libtiff/getimage.c: Workaround for some images without correct - info about alpha channel as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=331 - -2003-04-29 Andrey Kiselev - - * tools/tiff2ps.c, man/tiff2ps.1: Add ability to generate PS Level 3. - It basically allows one to use the /flateDecode filter for ZIP - compressed TIFF images. Patch supplied by Tom Kacvinsky. Fixes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=328 - - * tools/tiff2ps.c: Force deadzone printing when EPS output specified - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=325 - -2003-04-17 Andrey Kiselev - - * libtiff/tif_dirread.c: Removed additional check for StripByteCounts - due to problems with multidirectory images. Quality of error messages - improved. - -2003-04-16 Andrey Kiselev - - * tools/tiffcp.c: Fixed problem with colorspace conversion for JPEG - encoded images. See bug entries - - http://bugzilla.remotesensing.org/show_bug.cgi?id=275 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=23 - - * libtiff/tif_dirread.c: Additional check for StripByteCounts - correctness. Fixes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=320 - -2003-03-12 Andrey Kiselev - - * tools/{fax2ps.c, fax2tiff.c, gif2tiff.c, pal2rgb.c, ppm2tiff.c, - ras2tiff.c, raw2tiff.c, rgb2ycbcr.c, thumbnail.c, tiff2bw.c, - tiff2ps.c, tiff2rgba.c, tiffcp.c, tiffdither.c, tiffinfo.c, - tiffmedian.c}: Added library version reporting facility to all tools. - -2003-03-06 Frank Warmerdam - - * port/install.sh.in: Fixed problems with install producing paths - like ///usr/local/lib on cygwin. - -2003-02-27 Andrey Kiselev - - * tools/fax2tiff.c, man/fax2tiff.1: New switch (-X) to set width of - raw input page. Patch supplied by Julien Gaulmin. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=293 - - for details. - -2003-02-26 Frank Warmerdam - - * libtiff/tif_dir.c: fixed up the tif_postdecode settings - responsible for byte swapping complex image data. - - * libtiff/tif_lzw.c: fixed so that decoder state isn't allocated till - LZWSetupDecode(). Needed to read LZW files in "r+" mode. - -2003-02-07 Andrey Kiselev - - * tools/ppm2tiff.c: Fixed problem with too many arguments. - -2003-02-04 Andrey Kiselev - - * tools/raw2tiff.c: Memory leak fixed. - -2003-02-03 Andrey Kiselev - - * tools/fax2tiff.c, man/fax2tiff.1: Applied patch from Julien Gaulmin - (thanks, Julien!). More switches for fax2tiff tool for better control - of input and output. Details at - - http://bugzilla.remotesensing.org/show_bug.cgi?id=272 - -2003-02-03 Frank Warmerdam - - * libtiff/tif_jpeg.c: Modified to defer initialization of jpeg - library so that we can check if there is already any tile/strip data - before deciding between creating a compressor or a decompressor. - -2003-01-31 Frank Warmerdam - - * libtiff/tif_write.c: TIFFWriteCheck() now fails if the image is - a pre-existing compressed image. That is, image writing to - pre-existing compressed images is not allowed. - - * libtiff/tif_open.c: Removed error if opening a compressed file - in update mode. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=198 - -2003-01-31 Andrey Kiselev - - * config.guess, config.sub: Updated to recent upstream versions. - -2003-01-15 Frank Warmerdam - - * cut 3.6.0 Beta release. - -2002-12-20 Andrey Kiselev - - * tools/fax2ps.c, man/fax2ps.1: Page size was determined - in wrong way as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=239 - -2002-12-17 Frank Warmerdam - - * libtiff/tif_dirread.c: Allow wrong sized arrays in - TIFFFetchStripThing(). - - http://bugzilla.remotesensing.org/show_bug.cgi?id=49 - -2002-12-02 Frank Warmerdam - - * libtiff/tif_dir.c: fix problem with test on td_customValueCount. - Was using realloc even first time. Fix by Igor Venevtsev. - -2002-11-30 Frank Warmerdam - - * libtiff/tif_dir.c: fixed bug with resetting an existing custom - field value. - - * libtiff/tif_dir.c: Fixed potential problem with ascii "custom" - tags in TIFFVGetField() ... added missing break. - -2002-10-14 Frank Warmerdam - - * tools/tiff2ps.c: fixes a problem where "tiff2ps -1e" did not make - the scanline buffer long enough when writing rgb triplets. - The scanline needs to be 3 X the number of dots or else it will - contain an incomplete triplet and programs that try to separate - the eps by redefining the colorimage operator will get messed up. - Patch supplied by William Bader. - - * Makefile.in: added tif_extension.c to file list as per - http://bugzilla.remotesensing.org/show_bug.cgi?id=218. - -2002-10-11 Andrey Kiselev - - * configure, config.site, libtiff/{tif_unix.c, Makefile.in}: Fix for - large files (>2GiB) supporting. New option in the config.site: - LARGEFILE="yes". Should be enough for I/O of the large files. - -2002-10-10 Frank Warmerdam - - * libtiff/html/v3.6.0.html: new release notes. - - * libtiff/index.html: removed faq, cvs snapshot cruft. Added email - link for Andrey. Pointer to v3.6.0.html. - - * libtiff/Makefile.in: added direct rule for tiffvers.h for release. - -2002-10-07 Andrey Kiselev - * tools/tiff2ps.c, man/tiff2ps.1: Applied patch form Sebastian Eken - (thanks, Sebastian!). New switches: - -b # for a bottom margin of # inches - -c center image - -l # for a left margin of # inches - -r rotate the image by 180 degrees - New features merged with code for shrinking/overlapping. - Previously added -c and -n switches (for overriding PS units) renamed - in -x and -y respectively. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=200 - - * html/man/*.html: Updated from actual manual pages. - -2002-10-06 Frank Warmerdam - - * libtiff/tif_jpeg.c: fixed problem with boolean defined with wrong - size on windows. Use #define boolean hack. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=188 - - * libtiff/tiff.h: Don't do special type handling in tiff.h unless - USING_VISUALAGE is defined. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2002-10-03 Frank Warmerdam - - * libtiff/tiff.h: added COMPRESSION_JP2000. - -2002-10-02 Andrey Kiselev - - * libtiff/tif_dirread.c: Another fix for the fetching SBYTE arrays - by the TIFFFetchByteArray() function. Should finally resolve - - http://bugzilla.remotesensing.org/show_bug.cgi?id=52 - - * configure: Set -DPIXARLOG_SUPPORT option along with -DZIP_SUPPORT - - * html/Makefile.in: New targets added: html and groffhtml for - producing HTML representations of the manual pages automatically. - html target uses man2html tool, groffhtml uses groff tool. - -2002-09-29 Frank Warmerdam - - * configure, libtiff/Makefile.in: Added SCO OpenServer 5.0.6 support - from John H. DuBois III. - -2002-09-15 Andrey Kiselev - - * Makefile.in, /man/{raw2tiff.1, Makefile.in, libtiff.3}: Added - manual page for raw2tiff(1) tool. - -2002-09-12 Andrey Kiselev - - * /libtiff/{tiffio.h, tif_dir.h}: TIFFDataWidth() declaration moved to - the tiffio.h header file. - - * Makefile.in, /man/{TIFFDataWidth.3t, Makefile.in, libtiff.3}: Added - manual page for TIFFDataWidth() function - -2002-09-08 Frank Warmerdam - - * libtiff/tif_dirread.c: Expand v[2] to v[4] in TIFFFetchShortPair() - as per http://bugzilla.remotesensing.org/show_bug.cgi?id=196. - - * tools/tiff2ps.c: Don't emit BeginData/EndData DSC comments - since we are unable to properly include the amount to skip. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=80 - -2002-09-02 Andrey Kiselev - - * /libtiff/tif_dirread.c: Fixed problem with SBYTE type data fetching - in TIFFFetchByteArray(). Problem described at - http://bugzilla.remotesensing.org/show_bug.cgi?id=52 - -2002-08-22 Andrey Kiselev - - * /libtiff/tif_dirinfo.c: Further additions to free custom fields - in _TIFFSetupFieldInfo() function. - See http://bugzilla.remotesensing.org/show_bug.cgi?id=169 for details. - - * /libtiff/tif_lzw.c: Additional consistency checking added in - LZWDecode() and LZWDecodeCompat(). - Fixes http://bugzilla.remotesensing.org/show_bug.cgi?id=190 - and http://bugzilla.remotesensing.org/show_bug.cgi?id=100 - - * /libtiff/tif_lzw.c: - Added check for valid code lengths in LZWDecode() and - LZWDecodeCompat(). Fixes - http://bugzilla.remotesensing.org/show_bug.cgi?id=115 - -2002-08-16 Andrey Kiselev - - * /libtiff/{Makefile.vc, libtiff.def}: - Missed declarations added. - -2002-08-15 Frank Warmerdam - - * tif_getimage.c: Ensure that TIFFRGBAImageBegin() returns the - return code from the underlying pick function. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=177 - - * tif_dir.h: changed FIELD_CODEC to 66 from 64 to avoid overlap - with FIELD_CUSTOM as mentioned in bug 169. - - * tif_close.c: added logic to free dynamically created anonymous - field definitions to correct a small memory leak. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=169 - -2002-08-10 Andrey Kiselev - - * /tools/{raw2tiff.c, Makefile.in, Makefile.lcc, Makefile.vc}: - New tool: raw2tiff --- raw images to TIFF converter. No manual page yet. - -2002-07-31 Frank Warmerdam - - * libtiff/tif_jpeg.c: Fixed problem with setting of nrows in - JPEGDecode() as per bugzilla bug (issue 1): - - http://bugzilla.remotesensing.org/show_bug.cgi?id=129 - - * libtiff/{tif_jpeg.c,tif_strip.c,tif_print.c}: Hacked tif_jpeg.c to - fetch TIFFTAG_YCBCRSUBSAMPLING from the jpeg data stream if it isn't - present in the tiff tags. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=168 - - * libtiff/tif_read.c, libtiff/tif_write.c: TIFFReadScanline() and - TIFFWriteScanline() now set tif_row explicitly in case the codec has - fooled with the value. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=129 - -2002-06-22 Andrey Kiselev - - * /tools/tiff2ps.c: Added workaround for some software that may crash - when last strip of image contains fewer number of scanlines than - specified by the `/Height' variable. See - http://bugzilla.remotesensing.org/show_bug.cgi?id=164 - for explanation. - -2002-06-21 Andrey Kiselev - - * tools/tiff2ps, man/tiff2ps.1: New functionality for tiff2ps utility: - splitting long images in several pages. See - http://bugzilla.remotesensing.org/show_bug.cgi?id=142 for explanation. - Patch granted by John Williams . - -2002-06-11 Frank Warmerdam - - * libtiff/contrib/win95: renamed to contrib/win_dib. Added new - Tiffile.cpp example of converting TIFF files into a DIB on Win32. - This one is described in: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=143 - - * libtiff/tif_ojpeg.c: Major upgrade from Scott. See details at: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=156 - -2002-05-10 Andrey Kiselev - - * tools/tiff2ps: New commandline switches to override resolution - units obtained from the input file. Closes - http://bugzilla.remotesensing.org/show_bug.cgi?id=131 - -2002-04-26 Andrey Kiselev - - * libtiff/libtiff.def: Added missed declaration. - -2002-04-22 Andrey Kiselev - - * tools/fax2tiff.c: Updated to reflect latest changes in libtiff. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=125 - -2002-04-20 Andrey Kiselev - - * libtiff/tif_open.c: Pointers to custom procedures - in TIFFClientOpen() are checked to be not NULL-pointers. - -2002-04-18 Andrey Kiselev - - * libtiff/libtiff.def: Added missed declarations. - - * libtiff/tif_pixarlog.c: Updated for using tif_tagmethods structure. - -2002-04-16 Andrey Kiselev - - * libtiff/tif_lzw.c: Additional checks for data integrity introduced. - Should finally close - http://bugzilla.remotesensing.org/show_bug.cgi?id=100 - -2002-04-10 Andrey Kiselev - - * tools/tiff2ps: Division by zero fixed. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=88 - -2002-04-09 Andrey Kiselev - - * libtiff/: tif_dirwrite.c, tif_write.c, tiffio.h: - TIFFCheckpointDirectory() routine added. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=124 - - * man/: TIFFWriteDirectory.3t, Makefile.in: Added description - for the new function. - -2002-04-08 Andrey Kiselev - - * libtiff/: tif_codec.c, tif_compress.c, tiffiop.h: Introduced - additional members tif->tif_decodestatus and tif->tif_encodestatus - for correct handling of unconfigured codecs (we should not try to read - data or to define data size without correct codecs). - - * libtiff/tif_getimage.c: The way of codecs checking in TIFFRGBAImageOK - changed. Now it has used tif->tif_decodestatus and - tif->tif_encodestatus. - Should fix http://bugzilla.remotesensing.org/show_bug.cgi?id=119 (in - case of __cvs_8.tif test image). - - * libtiff/: tif_dirinfo.c, tif_dirread.c: Somebody makes a bug in - tif_dirread.c when TIFFCreateAnonFieldInfo was introduced. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=119 in case - of _cvs_00000-00.tif, _cvs_00000-01.tif and _cvs_00000-02.tif. - -2002-04-04 Andrey Kiselev - - * libtiff/: tif_lzw.c: Assertions in LZWDecode and LZWDecodeCompat - replaced by warnings. Now libtiff should read corrupted LZW-compressed - files by skipping bad strips. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=100 - -2002-04-03 Frank Warmerdam - - * libtiff/tif_dirwrite.c: Removed some dead code. - - * libtiff/*: Cleanup some warnings. - - * libtiff/tif_dir.c: Fixed bug with count returned by TIFFGetField() - for variable length FIELD_CUSTOM values. Was int * but should be - u_short *. - -2002-04-01 Andrey Kiselev - - * tools/: tifcp.c: Added support for 'Orientation' tag in tiffcp - utility (at cpStripToTile routine). - -2002-03-27 Frank Warmerdam - - * tif_dirread.c: avoid div-by-zero if rowbytes is zero in chop func. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=111 - - * tif_print.c: Fixed so that ASCII FIELD_CUSTOM values with - passcount set FALSE can be printed (such as TIFFTAG_SOFTWARE). - - * libtiff/tif_dir.c,tif_dirinfo.c,tif_dir.h,tif_ojpeg.c: modified so - that TIFFTAG_SOFTWARE uses FIELD_CUSTOM as an example. - -2002-03-26 Dwight Kelly - - * libtiff/: tiff.h, tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c, - tif_dirwrite.c: Added get/put code for new tag XMLPACKET as defined - in Adobe XMP Technote. Added missing INKSET tag value from TIFF 6.0 spec - INKSET_MULTIINK (=2). Added missing tags from Adobe TIFF technotes: - CLIPPATH, XCLIPPATHUNITS, YCLIPPATHUNITS, OPIIMAGEID, OPIPROXY and - INDEXED. Added PHOTOMETRIC tag value from TIFF technote 4 ICCLAB (=9). - -2002-03-26 Andrey Kiselev - - * libtiff/: tif_getimage.c: TIFFReadRGBAStrip and TIFFReadRGBATile - now also uses TIFFRGBAImageOK before reading. This is additional fix - for http://bugzilla.remotesensing.org/show_bug.cgi?id=110 - -2002-03-25 Andrey Kiselev - - * libtiff/: tif_getimage.c: Additional check for supported - codecs added in TIFFRGBAImageOK and TIFFReadRGBAImage now uses - TIFFRGBAImageOK before reading. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=110 - -2002-03-15 Andrey Kiselev - - * libtiff/: tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c, - tif_dirwrite.c: Added routine TIFFDataWidth for detrmining - TIFFDataType sizes instead of working with tiffDataWidth array - directly. Should prevent out-of-borders bugs in case of unknown or - broken data types. EstimateStripByteCounts routine modified, so it - won't work when tags with uknown sizes founded. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=109 - -2002-03-13 Andrey Kiselev - - * libtiff/tif_getimage.c: Added support for correct handling - `Orientation' tag in gtTileContig. Should be added in other gt* - functions as well, but I have not images for testing yet. Partially - resolves http://bugzilla.remotesensing.org/show_bug.cgi?id=23 - -2002-03-10 Andrey Kiselev - - * libtiff/: tif_dirinfo.c, tif_dirwrite.c: Added possibility to - read broken TIFFs with LONG type used for TIFFTAG_COMPRESSION, - TIFFTAG_BITSPERSAMPLE, TIFFTAG_PHOTOMETRIC. Closes - http://bugzilla.remotesensing.org/show_bug.cgi?id=99 - -2002-03-08 Andrey Kiselev - - * libtiff/Makefile.in, tools/Makefile.in: Shared library will not - be stripped when installing, utility binaries will do. Closes - http://bugzilla.remotesensing.org/show_bug.cgi?id=93 - -2002-02-28 Frank Warmerdam - - * man/TIFFGetField: fixed type of TIFFTAG_COPYRIGHT. - - * man/libtiff.3t: added copyright tag info. - -2002-02-11 Frank Warmerdam - - * libtiff/{tiff.h,tif_fax3.c}: Add support for __arch64__. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=94 - - * man/Makefile.in: Patch DESTDIR handling - - http://bugzilla.remotesensing.org/show_bug.cgi?id=95 - - * configure: OpenBSD changes for Sparc64 and DSO version. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=96 - -2002-02-05 Frank Warmerdam - - * config.site/configure: added support for OJPEG=yes option to enable - OJPEG support from config.site. - -2002-01-27 Frank Warmerdam - - * html/document.html: fixed links for TIFf 6 docs. - -2002-01-18 Frank Warmerdam - - * config.guess, config.sub: Updated from ftp.gnu.org/pub/config. - - * libtiff/tif_read.c: Fixed TIFFReadEncodedStrip() to fail if the - decodestrip function returns anything not greater than zero as per - http://bugzilla.remotesensing.org/show_bug.cgi?id=97 - - * configure: Modify CheckForBigEndian so it can work in a cross - compiled situation. - -2002-01-16 Frank Warmerdam - - * tools/tiffdump.c: include TIFFTAG_JPEGTABLES in tag list. - - * tools/tiffset.c: fix bug in error reporting. - - * tools/tiffcp.c: fix several warnings that show up with -Wall. - -2002-01-04 Frank Warmerdam - - * libtiff/tif_jpeg.c: fixed computation of segment_width for - tiles files to avoid error about it not matching the - cinfo.d.image_width values ("JPEGPreDecode: Improper JPEG strip/tile - size.") for ITIFF files. Apparently the problem was incorporated since - 3.5.5, presumably during the OJPEG/JPEG work recently. - -2001-12-15 Frank Warmerdam - - * configure, libtiff/Makefile.in: Changes for building on MacOS 10.1. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=94 - - * libtiff/tif_getimage.c: If DEFAULT_EXTRASAMPLE_AS_ALPHA is 1 - (defined in tiffconf.h - 1 by default) then the RGBA interface - will assume that a fourth extra sample is ASSOCALPHA if the - EXTRASAMPLE value isn't set for it. This changes the behaviour of - the library, but makes it work better with RGBA files produced by - lots of applications that don't mark the alpha values properly. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=93 - http://bugzilla.remotesensing.org/show_bug.cgi?id=65 - -2001-12-12 Frank Warmerdam - - * libtiff/tif_jpeg.c: allow jpeg data stream sampling values to - override those from tiff directory. This makes this work with - ImageGear generated files. - -2001-12-07 Frank Warmerdam - - * html/Makefile.in: added missing images per bug 92. - - * port/Makefile.in: fixed clean target per bug 92. - -2001-11-28 Frank Warmerdam - - * Reissue 3.5.7 release. - - * libtiff/mkversion.c: Fix output of TIFF_VERSION to be - YYYYMMDD so that it is increasing over time. - - * Makefile.in: Ensure that tiffvers.h is regenerated in the - make release target. - - * Makefile.in: added libtiff/tiffvers.h to the release file list. - -2001-11-23 Frank Warmerdam - - * added html/v3.5.7.html, updated html/index.html. - - * Makefile.in: added contrib/addtiffo/tif_ovrcache.{c,h}. - -2001-11-15 Frank Warmerdam - - * configure: fixed test for -lm. - -2001-11-02 Frank Warmerdam - - * Added PHOTOMETRIC_ITULAB as per bug 90. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=90 - -2001-10-10 Frank Warmerdam - - * libtiff/tiff.h: I have created COMPRESSION_CCITT_T4, - COMPRESSION_CCITT_T6, TIFFTAG_T4OPTIONS and TIFFTAG_T6OPTIONS aliases - in keeping with TIFF 6.0 standard in tiff.h - - http://bugzilla.remotesensing.org/show_bug.cgi?id=83 - -2001-09-26 Frank Warmerdam - - * libtiff/tif_dirwrite.c: added TIFFRewriteDirectory() function. - Updated TIFFWriteDirectory man page to include TIFFRewriteDirectory. - -2001-09-24 Frank Warmerdam - - * libtiff/tif_lzw.c: Avoid MS VC++ 5.0 optimization bug. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=78 - - * libtiff/tif_lzw.c: added dummy LZWSetupEncode() to report an - error about LZW not being available. - - * libtiff/tif_dir.c: propagate failure to initialize compression - back from TIFFSetField() as an error status, so applications can - detect failure. - - * libtiff/tif_dir.c: removed the auto replacement of - COMPRESSION_LZW with COMPRESSION_NONE in _TIFFVSetField(). - - * Removed Makefile, tools/Makefile, port/install.sh, man/Makefile - from CVS as they are all supposed to be auto-generated by configure. - -2001-09-22 Frank Warmerdam - - * libtiff/tif_ojpeg.c: new update from Scott. - -2001-09-09 Frank Warmerdam - - * libtif/tif_fax3.c: Removed #ifdef PURIFY logic, and modified to - always use the "safe" version, even if there is a very slight - cost in performance. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=54 - - * libtiff/Makefile.in: Fixed @DSOSUB_VERSION to be @DSOSUF_VERSION@ - in two places. - - * libtiff/tif_getimage.c: Fixed problem with reading strips or - tiles that don't start on a tile boundary. Fix contributed by - Josep Vallverdu (from HP), and further described in bug 47. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=47 - - * tools/tiff2ps.c: added OJPEG YCbCr to RGB support. - - * libtiff/tif_ojpeg.c: Applied substantial patch from Scott. - -2001-09-06 Frank Warmerdam - - * libtiff/tif_packbits.c: fixed memory overrun error. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=77 - -2001-08-31 Frank Warmerdam - - * libtiff/tif_getimage.c: relax handling of contig case where - there are extra samples that are supposed to be ignored. This - should now work for 8bit greyscale or palletted images. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=75 - -2001-08-28 Frank Warmerdam - - * libtiff/tif_getimage.c: Don't complain for CMYK (separated) - images with more than four samples per pixel. See: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=73 - -2001-08-10 Frank Warmerdam - - * libtiff/tif_getimage.c: Use memmove() instead of TIFFmemcpy() - in TIFFReadRGBATile() to avoid issues in cases of overlapping - buffers. See Bug 69 in Bugzilla. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=69 - - * tools/tiff2rgba.c: fixed getopt() call so that -b works again. - -2001-08-09 Frank Warmerdam - - * libtiff/tiff.h, libtiff/tif_fax3.c: added check for __LP64__ - when checking for 64 bit architectures as per bugzilla bug 67. - -2001-07-27 Frank Warmerdam - - * man/Makefile.in: add TIFFClientOpen link as per debian submitted - bug 66. - -2001-07-20 Frank Warmerdam - - * libtiff/tif_jpeg.c: Define HAVE_BOOLEAN on windows if RPCNDR.H - has been included. - -2001-07-19 Frank Warmerdam - - * libtiff/tif_open.c: Seek back to zero after failed read, - before writing header. - -2001-07-18 Frank Warmerdam - - * libtiff/tif_ojpeg.c: updates from Scott. Handles colors - much better. Now depends on having patched libjpeg as per - patch in contrib/ojpeg/*. - -2001-07-17 Frank Warmerdam - - * */Makefile.in: added DESTDIR support. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=60 - -2001-07-16 Frank Warmerdam - - * configure, libtiff/Makefile.in: applied OpenBSD patches - as per: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=61 - -2001-06-28 Frank Warmerdam - - * libtiff/tif_getimage.c: Fixed so that failure is properly - reported by gtTileContig, gtStripContig, gtTileSeparate and - gtStripSeparate. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=51 - - * tiffcmp.c: Fixed multi samples per pixel support for ContigCompare. - Updated bug section of tiffcmp.1 to note tiled file issues. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=53 - -2001-06-22 Frank Warmerdam - - * configure: Changes for DSO generation on AIX provided by - John Marquart . - - * configure, libtiff/Makeifle.in: Modified to build DSOs properly - on Darwin thanks to Robert Krajewski (rpk@alum.mit.edu) and - Keisuke Fujii (fujiik@jlcuxf.kek.jp). - -2001-06-13 Frank Warmerdam - - * tools/tiff2rgba.c: added -n flag to avoid emitting alpha component. - - * man/tiff2rgba.1: new - -2001-05-22 Frank Warmerdam - - * Added tiffset and tif_ojpeg to the dist lists in Makefile.in. - -2001-05-13 Frank Warmerdam - - * libtiff/tools/thumbnail.c: changed default output compression - to packbits from LZW since LZW isn't generally available. - -2001-05-12 Frank Warmerdam - - * libtiff/tif_ojpeg.c: New. - libtiff/tif_jpeg.c, tiffconf.h, tif_getimage.c: changes related - to OJPEG support. - - Scott Marovich supplied OJPEG support. - -2001-05-11 Frank Warmerdam - - * tiff.h: removed, it duplicates libtiff/tiff.h. - -2001-05-08 Frank Warmerdam - - * libtiff/tif_dirinfo.c: moved pixar and copyright flags to - ensure everything is in order. - - * libtiff/libtiff.def: added TIFFCreateDirectory and - TIFFDefaultStripSize as per: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=46 - -2001-05-02 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Modified the TIFF_BYTE definition for - TIFFTAG_PHOTOSHOP to use a writecount of TIFF_VARIABLE2 (-3) to - force use of uint32 counts instead of short counts. - - * libtiff/tif_dirwrite.c: Added support for TIFF_VARIABLE2 in the - case of writing TIFF_BYTE/TIFF_SBYTE fields. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=43 - -2001-05-01 Frank Warmerdam - - * libtiff/tif_dirinfo.c: removed duplicate TIFFTAG_PHOTOSHOP as per - bug report http://bugzilla.remotesensing.org/show_bug.cgi?id=44 - -2001-04-05 Frank Warmerdam - - * tiffio.h: removed C++ style comment. - - * configure: fixed up SCRIPT_SH/SHELL handling. - - * Makefile.in: Fixed SCRIPT_SH/SHELL handling. - - * config.guess: documented more variables as per bug 40. - -2001-04-03 Frank Warmerdam - - * configure, *Makefile.in: Various changes to improve configuration - for HP/UX specifically, and also in general. They include: - - Try to handle /usr/bin/sh instead of /bin/sh where necessary. - - Upgrade to HP/UX 10.x+ compiler, linker and dso options. - - Fixed mmap() test to avoid MMAP_FIXED ... it isn't available on HP - - Use -${MAKEFLAGS} in sub makes from makefiles. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=40 - -2001-04-02 Frank Warmerdam - - * libtiff/tiff.h: Applied hac to try and resolve the problem - with the inttypes.h include file on AIX. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - - * VERSION: update to 3.5.7 beta in preparation for release. - - * configure/config.site: modified to check if -lm is needed for - MACHDEPLIBS if not supplied by config.site. Needed for Darwin. - - * config.guess: updated wholesale to an FSF version apparently - from 1998 (as opposed to 1994). This is mainly inspired by - providing for MacOS X support. - -2001-03-29 Frank Warmerdam - - * configure, Makefile.in, etc: added support for OPTIMIZER being - set from config.site. - -2001-03-28 Frank Warmerdam - - * fax2ps.c: Helge (libtiff at oldach.net) submitted fix: - - Here's a fix for fax2ps that corrects behaviour for non-Letter paper - sizes. It fixes two problems: - - Without scaling (-S) the fax is now centered on the page size specified - with -H and/or -W. Before, fax2ps was using an obscure and practically - useless algorithm to allocate the image relative to Letter sized paper - which sometime sled to useless whitespace on the paper, while at the - same time cutting of the faxes printable area at the opposite border. - - Second, scaling now preserves aspect ratio, which makes unusual faxes - (in particular short ones) print properly. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=35 - - * tiff2ps.c/tiff2ps.1: Substantial changes to tiff2ps by - Bruce A. Mallett. See check message for detailed information - on all the changes, including a faster encoder, fixes for level - 2 PostScript, and support for the imagemask operator. - -2001-03-27 Frank Warmerdam - - * libtiff/tiffio.h: Changed "#if LOGLUV_PUBLIC" to - "#ifdef LOGLUV_PUBLIC" so it will work with VisualAge on AIX. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2001-03-16 Frank Warmerdam - - * tif_dirinfo.c: moved definition of copyright tag in field list. - Apparently they have to be in sorted order by tag id. - -2001-03-13 Frank Warmerdam - - * tif_getimage.c: Added support for 16bit minisblack/miniswhite - images in RGBA interface. - -2001-03-02 Frank Warmerdam - - * Added TIFFTAG_COPYRIGHT support. - -2001-02-19 Frank Warmerdam - - * Brent Roman contributed updated tiffcp utility (and tiffcp.1) - with support for extracting subimages with the ,n syntax, and also - adding the -b bias removal flag. - -2001-02-16 Frank Warmerdam - - * libtiff/libtiff.def: Brent Roman submitted new version adding - serveral missing entry points. - - * libtiff/tif_dirinfo.c: don't declare tiffFieldInfo static on VMS. - Some sort of weird VMS thing. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=31 - - * tif_luv.c/tiff.h/tiffio.h: - New version of TIFF LogLuv (SGILOG) modules contributed by Greg Ward - (greg@shutterfly.com). He writes: - - 1) I improved the gamut-mapping function in tif_luv.c for imaginary - colors, because some images were being super-saturated on the input - side and this resulted in some strange color shifts in the output. - - 2) I added a psuedotag in tiff.h to control random dithering during - LogLuv encoding. This is turned off by default for 32-bit LogLuv and - on for 24-bit LogLuv output. Dithering improves the average color - accuracy over the image. - - 3) I added a #define for LOG_LUV_PUBLIC, which is enabled by default in - tiffio.h, to expose internal routines for converting between LogLuv and - XYZ coordinates. This is helpful for writing more efficient, - specialized conversion routines, especially for reading LogLuv files. - - Changes applied with minor edits. - -2001-01-23 Frank Warmerdam - - * tif_fax3.c: keep rw_mode flag internal to fax3 state to remember - whether we are encoding or decoding. This is to ensure graceful - recovery if TIFFClientOpen() discovers an attempt to open a compressed - file for "r+" access, and subsequently close it, as it resets the - tif_mode flag to O_RDONLY in this case to avoid writes, confusing the - compressor's concept of whether it is in encode or decode mode. - -2001-01-08 Mike Welles - - * Makefile.in: Now cleaning up after itself after creating the .tar.gz and .zip - -2001-01-07 Frank Warmerdam - - * html/libtiff.html: Fixed arguments in example for TIFFRGBAImageGet() - as per bug report by Patrick Connor. - -2000-12-28 Frank Warmerdam - - * Added RELEASE-DATE file to release file list. - - * Fixed libtiff/makefile.vc to make tiffvers.h not version.h. - -2000-12-22 Mike Welles - * added link to CVS mirror from index.html - - * updated html/internals.html to note that LZW compression is - not supported by default. - -2000-12-22 Frank Warmerdam - - * updated html/libtiff.html to not point at Niles' old JPL web site - for the man pages, point at www.libtiff.org. - -2000-12-21 Frank Warmerdam - - * libtiff/tif_apple.c: Applied "Carbon" support patches supplied by - Leonard Rosenthol . May interfere - with correct building on older systems. If so, please let me know. - -2000-12-19 Mike Welles - - * Took out LZW Encoding from tif_lzw.c - - * Created HOWTO-RELEASE - - * Created html/v3.5.6.html - - * updated index.html - -2000-12-01 Frank Warmerdam - - * Added patches for EOFB support in tif_fax3.c and tif_fax3.h. - Patches supplied by Frank Cringle - Example file at: ftp://ftp.remotesensing.org/pub/libtiff/eofb_396.tif - -2000-11-24 Frank Warmerdam - - * libtiff/Makefile.in: Added an installPrivateHdrs and install-private - target so that the private headers required by libgeotiff can be - installed with the others. They are not installed by default. - - * libtiff/Makefile.in: Added @MACHLIBDEPS@ to LINUXdso and GNULDdso - targets so libtiff.so will be built with an explicit dependency - on libm.so. - - * libtiff/Makefile.in: Use softlinks to link libtiff.so.3 to - libtiff.so.3.5.5. - - * libtiff/Makefile.in & configure: Remove all references to the ALPHA - file, or ALPHA version logic. Added stuff about DIST_POINT in - place of DIST_TYPE and the alpha release number stuff. - -2000-11-22 Frank Warmerdam - - * I have applied a patch from Steffen Moeller to - the configure script so that it now accepts the --prefix, and - --exec-prefix directives. - -2000-11-13 Frank Warmerdam - - * I have made a variety of modifications in an effort to ensure the - TIFFLIB_VERSION macro is automatically generated from the RELEASE-DATE - file which seems to be updated regularly. - - o mkversion.c now reads RELEASE-DATE and emits TIFFLIB_VERSION in - version include file. - o renamed version.h to tiffvers.h because we now have to install it - with the public libtiff include files. - o include tiffvers.h in tiffio.h. - o updated tif_version.c to use tiffvers.h. - o Updated Makefile.in accordingly. - - * As per http://bugzilla.remotesensing.org/show_bug.cgi?id=25 - I have updated the win32 detection rules in tiffcomp.h. - -2000-10-20 Frank Warmerdam - - * tif_getimage.c: Fixed RGBA translation for YCbCr images for which - the strip/tile width and height aren't multiples of the sampling size. - See http://bugzilla.remotesensing.org/show_bug.cgi?id=20 - Some patches from Rick LaMont of Dot C Software. - - * Modified tif_packbits.c encoder to avoid compressing more - data than provided if rowsize doesn't factor into provided data - (such as occurs for YCbCr). - -2000-10-19 Frank Warmerdam - - * tools/rgb2ycbcr.c: fixed output strip size to account for vertical - roundup if rows_per_strip not a multiple of vertical sample size. - -2000-10-16 Frank Warmerdam - - * tif_dir.c: Clear TIFF_ISTILED flag in TIFFDefaultDirectory - as per http://bugzilla.remotesensing.org/show_bug.cgi?id=18 - from vandrove@vc.cvut.cz. - - * Modified tif_packbits.c decoding to avoid overrunning the - output buffer, and to issue a warning if data needs to be - discarded. See http://bugzilla.remotesensing.org/show_bug.cgi?id=18 - -2000-10-12 Frank Warmerdam - - * Modified tiff2bw to ensure portions add to 100%, and that - white is properly recovered. - - See bug http://bugzilla.remotesensing.org/show_bug.cgi?id=15 - Patch c/o Stanislav Brabec - -2000-09-30 Frank Warmerdam - - * Modified TIFFClientOpen() to emit an error on an attempt to - open a comperessed file for update (O_RDWR/r+) access. This is - because the compressor/decompressor code gets very confused when - the mode is O_RDWR, assuming this means writing only. See - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=13 - -2000-09-27 Frank Warmerdam - - * Added GNULDdso target an`d switched linux and freebsd to use it. - -2000-09-26 Frank Warmerdam - - * Applied patch for 0x0000 sequences in tif_fax3.h's definition - of EXPAND1D() as per bug 11 (from Roman). - -2000-09-25 Frank Warmerdam - * Fixed tiffcomp.h to avoid win32 stuff if unix #defined, to improve - cygwin compatibility. - - * Applied patch from Roman Shpount to tif_fax3.c. This seems to - be a proper fix to the buffer sizing problem. See - http://bugzilla.remotesensing.org/show_bug.cgi?id=11 - - * Fixed tif_getimage.c to fix overrun bug with YCbCr images without - downsampling. http://bugzilla.remotesensing.org/show_bug.cgi?id=10 - Thanks to Nick Lamb for reporting the - bug and proving the patch. - -2000-09-18 Frank Warmerdam - - * Fixed tif_jpeg.c so avoid destroying the decompressor before - we are done access data thanks to bug report from: - Michael Eckstein . - - * Reverted tif_flush change. - -2000-09-14 Frank Warmerdam - - * tif_flush.c: Changed so that TIFFFlushData() doesn't return an - error when TIFF_BEENWRITING is not set. This ensures that the - directory contents can still be flushed by TIFFFlush(). - -2000-08-14 Frank Warmerdam - - * tif_open.c: Don't set MMAP for O_RDWR files. - - * tif_open.c: Set STRIPCHOP_DEFAULT for O_RDWR as well as O_RDONLY - so that files opened for update can be strip chopped too. - - * tif_read.c: fixed up bug with files missing rowsperstrip and - the strips per separation fix done a few weeks ago. - -2000-07-17 Frank Warmerdam - - * Tentatively added support for SAMPLEFORMAT_COMPLEXIEEEFP, and - SAMPLEFORMAT_COMPLEXINT. - -2000-07-13 Mike Welles - - * index.html, bugs.html: added bugzilla info. - -2000-07-12 Frank Warmerdam - - * tif_read.c: fix subtle bug with determining the number of - rows for strips that are the last strip in a separation but - not the last strip of all in TIFFReadEncodedStrip(). - - * Applied 16/32 bit fix to tif_fax3.c. Fix supplied by - Peter Skarpetis - -2000-06-15 Frank Warmerdam - - * Modified tiffio.h logic with regard to including windows.h. It - won't include it when building with __CYGWIN__. - -2000-05-11 Frank Warmerdam - - * README: update to mention www.libtiff.org, don't list Sam's old - email address. - - * configure: Fixed DSO test for Linux as per patch from - Jan Van Buggenhout . - -2000-04-21 Frank Warmerdam - - * libtiff/tif_dirread.c: Don't use estimate strip byte count for - one tile/strip images with an offset, and byte count of zero. These - could be "unpopulated" images. - -2000-04-18 Frank Warmerdam - - * contrib/addtiffo: Added "averaging" resampling option. - - * tools/tiffsplit.c: Copy TIFFTAG_SAMPLEFORMAT. - -Tue Apr 18 16:18:08 2000 Frank Warmerdam - - * tools/Makefile.in: Modified to install properly on SGI. - -2000-04-12 Mike Welles - * configure: Fixed stupid mistake in libc6 test on Linux - -2000-04-04 Mike Welles - * tif_win32.c: Applied patch to fix overreads and ovverwrites - caught by BoundsChecker. From Arvan Pritchard - (untested). - - * tif_getimage.c: Applied patch to silence VC6 warnings. From - Arvan Pritchard - - * tif_lzw.c: Applied patch to silence VC6 warnings. From - Arvan Pritchard - -2000-03-28 Frank Warmerdam - - * Added contrib/stream (stream io) code submitted by Avi Bleiweiss. - -2000-03-28 Frank Warmerdam *** 3.5.5 release *** - - * fax2ps: Fixed mixup of width and height in bounding box statement - as per submission by Nalin Dahyabhai . - -2000-03-27 Mike Welles - - * fax2ps: Modified printruns to take uint32 instead of uint16. - Patch courtesy of Bernt Herd - -2000-03-20 Mike Welles - - * configure: added test for libc6 for linux targets. Bug reported by - Stanislav Brabec - - * Added 3.5 docs to html/Makefile.in. - Thanks to Stanislav Brabec - - * configure: fixed bugs in sed scripts - (applied sed script s:/@:s;@:;s:/s;;:;: to configure). - fix submitted to Stanislav Brabec - - * tools/iptcutil was not in files list, and wasn't being - added to tar archive. Updated Makefile.in. - -2000-03-17 Frank Warmerdam - - * tif_fax3.c: Fixed serious bug introduced during the uint16->uint32 - conversion for the run arrays. - -2000-03-03 Frank Warmerdam - - * Set td_sampleformat default to SAMPLEFORMAT_UINT instead of - SAMPLEFORMAT_VOID in TIFFDefaultDirectory() in tif_dir.c. - -2000-03-02 Frank Warmerdam - - * Added "GetDefaulted" support for TIFFTAG_SAMPLEFORMAT in tif_aux.c. - - * Patched tif_fax3.c so that dsp->runs is allocated a bit bigger - to avoid overruns encountered with frle_bug.tif. - -Tue Feb 15 22:01:05 2000 Frank Warmerdam - - * Fixed tools/tiffcmp so that stopondiff testing works. - Patch care of Joseph Orost . - -2000-01-28 - - * Modified tif_unix.c to support 2-4GB seeks if USE_64BIT_API is - set to 1, and added default (off) setting in tiffconf.h. This - should eventually be set by the configure script somehow. - - The original work on all these 2-4GB changes was done by - Peter Smith (psmith@creo.com). - - * Modified tif_win32.c to support 2-4GB seeks. - - * tentatively changed toff_t to be unsigned instead of signed to - facilitate support for 2-4GB files. - - * Updated a variety of files to use toff_t. Fixed some mixups - between toff_t and tsize_t. - -Fri Jan 28 10:13:49 2000 Frank Warmerdam - - * Largely reimplemented contrib/addtiffo to avoid temp files, - updating the TIFF file in place. Fixed a few other bugs to. - - * Set tif_rawdatasize to zero when freeing raw data buffer in - TIFFWriteDirectory(). - - * Enabled "REWRITE_HACK" in tif_write.c by default. - - * Fix bug in tif_write.c when switching between reading one directory - and writing to another. - - * Made TIFFWriteCheck() public, and added TIFFCreateDirectory() - -Wed Jan 5 12:37:48 2000 Frank Warmerdam - - * Added TIFFmemory(3t) functions to libtiff.def. - -Tue Jan 4 13:39:00 2000 Frank Warmerdam - - * Added libtiff/libtiff.def to TIFFILES distribution list. - -Mon Dec 27 12:13:39 EST 1999 Mike Welles - - * Created lzw compression kit, as a new module (libtiff-lzw-compression-kit). - - * Altered descriptions in tools to reflect "by default" lzw not supported - - * Updated index.html to note lzw compression kit. - -Tue Dec 21 14:01:51 1999 Frank Warmerdam - - * Added fax3sm_winnt.c to distribution list in Makefile.in. - -Tue Dec 21 11:04:45 EST 1999 Mike Welles *** 3.5.4 release *** - - * Aadded Pixar tag support. Contributed by Phil Beffery - - * Made one more change to tif_dir.c for removal of LZW compression. Also added notice - when LZW compression invoked. - - * Changed default compression in tools to TIFF_PACKBITS, and changed usage descriptions - in tools to reflect removal of LZW compression - -Mon Dec 20 18:39:02 EST 1999 Mike Welles - - * Fixed bug that caused LZW (non) compression to segfault. Added - warning about LZW compression removed being removed, and why. - - * Added nostrip to install in tools/Makefile.in so that debugging - symbols are kept. - -Tue Dec 7 12:04:47 EST 1999 Mike Welles - - * Added patch from Ivo Penzar , - supporting Adobe ZIP deflate. Untested. - -Sat Dec 4 15:47:11 1999 Frank Warmerdam - - * Made Packbits the default compression in tools/tiff2rgba.c instead - of LZW. - -Tue Nov 30 14:41:43 1999 Frank Warmerdam *** 3.5.3. release *** - - * Added tif_luv to contrib/djgpp/Makefile.lib. - -Tue Nov 30 14:15:32 EST 1999 Mike Welles - - * Added zip creation to relase makefile target - - * Added html for TIFFWriteTile.3t man page. - -Tue Nov 30 09:20:16 1999 Frank Warmerdam - - * Added some changes to tif_write.c to support rewriting existing - fixed sized tiles and strips. Code mods disabled by default, only - enabled if REWRITE_HACK is defined for now. - -Mon Nov 29 11:43:42 1999 Frank Warmerdam - - * Added TIFFWriteTile.3t man page. - -Sun Nov 28 20:36:18 1999 Frank Warmerdam - - * Added notes on use of makefile.vc in build.html, and fixed - email subscription address. - -199-11-28 Mike Welles - - * Fixed apocalypse-inducing y2k bug in contrib/ras/ras2tiff.c - - * Did some casts cleaning up to reduce compiler warnings in tif_fax3.c, - from Bruce Carmeron -- modifications of - changes made by Frank (sun cc still complained on cast). - - * Added tiffconf.h to install target per request from Bill - Radcliffe : "We need a way for ImageMagick to - know features have been compiled into the TIFF library in order to - handle things properly". - -Sat Nov 27 16:49:21 1999 Frank Warmerdam - - * fixed various VC++ warnings as suggested by Gilles Vollant - . - -Wed Nov 24 12:08:16 1999 Frank Warmerdam - - * Modified TIFFquery.3t man pages info on TIFFIsByteSwapped() to - not imply applications are responsible for image data swapping. - -1999-11-22 Mike Welles - * HTML-ized the man pages, added to html/man - - * Removed LZW Compression to comply with Unisys patent extortion. - -1999-09-29 Mike Welles - * Corrected one remaining 16 -> 32 bit value in tif_fax3.c, - From Ivo Penzar - -1999-09-26 Mike Welles *** 3.5.2 release *** - * Corrected alpha versioning. - - * Removed distinction between alpha and release targets in Makefile.in. - - * added release.stamp target, which tags cvs tree, and updates - "RELEASE-DATE" - - * added releasediff target, which diffs tree with source as of - date in "RELEASE-DATE" - - * Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving - away from alpha/non-alpha distinctions). - - * updated html to reflect release - -1999-09-23 - - * Set O_BINARY for tif_unix.c open() ... used on cygwin for instance. - - * Added CYGWIN case in configure. - -Fri Sep 17 00:13:51 CEST 1999 Mike Welles - - * Applied Francois Dagand's patch to handle fax decompression bug. - (sizes >= 65536 were failing) - -Tue Sep 14 21:31:43 1999 Frank Warmerdam - - * Applied "a" mode fix to tif_win32.c/TIFFOpen() as suggested - by Christopher Lawton - -Wed Sep 8 08:19:18 1999 Frank Warmerdam - - * Added IRIX/gcc, and OSF/1 4.x support on behalf of - Albert Chin-A-Young - - * Added TIFFReassignTagToIgnore() API on behalf of - Bruce Cameron . Man page still pending. - -Wed Aug 25 11:39:07 1999 Frank Warmerdam - - * Added test target in Makefile, test_pics.sh script and pics/*.rpt - files to provide for a rudimentary testsuite. - - * Added contrib/tags back from old distribution ... fixed up a bit. - -1999-08-16 - - * Added simple makefile.vc makefiles for building with MS VC++ - on Windows NT/98/95 in console mode. Stuff in contrib/win* make give - better solutions for some users. - -Mon Aug 16 21:52:11 1999 Frank Warmerdam - - * Added addtiffo (add overviews to a TIFF file) in contrib. Didn't - put it in tools since part of it is in C++. - -1999-08-16 Michael L. Welles - - * Updated html/index.html with anon CVS instructions. - -Mon Aug 16 13:18:41 1999 Frank Warmerdam - - * pre-remove so link before softlink in LINUXdso action in - libtiff/Makefile.in to avoid failure on LINUXdso builds other than - the first. - - * Fixed problem with cvtcmap() in tif_getimage.c modifying the - colormaps owned by the TIFF handle itself when trying to fixup wrong - (eight bit) colormaps. Corrected by maintaining a private copy of - the colormap. - - * Added TIFFReadRGBATile()/TIFFReadRGBAStrip() support in - tif_getimage.c. - - * CVS Repository placed at remotesensing.org. ChangeLog added. diff --git a/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2013.vcxproj b/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2013.vcxproj deleted file mode 100644 index b6a2972..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2013.vcxproj +++ /dev/null @@ -1,262 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - LibTIFF4 - {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27} - LibTIFF4 - - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Full - AnySuitable - true - Speed - true - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - ..\ZLib;..\LibJPEG - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - X64 - - - Full - AnySuitable - true - Speed - true - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - ..\ZLib;..\LibJPEG - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - EditAndContinue - Default - false - ..\ZLib;..\LibJPEG - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - X64 - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - ProgramDatabase - Default - false - ..\ZLib;..\LibJPEG - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {5e1d4e5f-e10c-4ba3-b663-f33014fd21d9} - false - - - {33134f61-c1ad-4b6f-9cea-503a9f140c52} - false - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2013.vcxproj.filters b/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2013.vcxproj.filters deleted file mode 100644 index 9ed18ab..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2013.vcxproj.filters +++ /dev/null @@ -1,158 +0,0 @@ - - - - - {39a70406-cbe3-4a09-bbac-abf6bff2f512} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {072366c9-2b77-421b-82a9-5948f2b56228} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2017.vcxproj b/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2017.vcxproj deleted file mode 100644 index 4b50c61..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2017.vcxproj +++ /dev/null @@ -1,263 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - LibTIFF4 - {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27} - LibTIFF4 - 10.0.16299.0 - - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Full - AnySuitable - true - Speed - true - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - ..\ZLib;..\LibJPEG - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - X64 - - - Full - AnySuitable - true - Speed - true - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - false - None - ..\ZLib;..\LibJPEG - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - EditAndContinue - Default - false - ..\ZLib;..\LibJPEG - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - X64 - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - ProgramDatabase - Default - false - ..\ZLib;..\LibJPEG - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {5e1d4e5f-e10c-4ba3-b663-f33014fd21d9} - false - - - {33134f61-c1ad-4b6f-9cea-503a9f140c52} - false - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2017.vcxproj.filters b/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2017.vcxproj.filters deleted file mode 100644 index 9ed18ab..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/LibTIFF4.2017.vcxproj.filters +++ /dev/null @@ -1,158 +0,0 @@ - - - - - {39a70406-cbe3-4a09-bbac-abf6bff2f512} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {072366c9-2b77-421b-82a9-5948f2b56228} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibTIFF4/mkg3states.c b/Dependencies/FreeImage/Source/LibTIFF4/mkg3states.c deleted file mode 100644 index 259fcaa..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/mkg3states.c +++ /dev/null @@ -1,452 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* Initialise fax decoder tables - * Decoder support is derived, with permission, from the code - * in Frank Cringle's viewfax program; - * Copyright (C) 1990, 1995 Frank D. Cringle. - */ -#include "tif_config.h" - -#include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - -#include "tif_fax3.h" - -#ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); -#endif - -#define streq(a,b) (strcmp(a,b) == 0) - -/* NB: can't use names in tif_fax3.h 'cuz they are declared const */ -TIFFFaxTabEnt MainTable[128]; -TIFFFaxTabEnt WhiteTable[4096]; -TIFFFaxTabEnt BlackTable[8192]; - -struct proto { - uint16 code; /* right justified, lsb-first, zero filled */ - uint16 val; /* (pixel count)<<4 + code width */ -}; - -static struct proto Pass[] = { -{ 0x0008, 4 }, -{ 0, 0 } -}; - -static struct proto Horiz[] = { -{ 0x0004, 3 }, -{ 0, 0 } -}; - -static struct proto V0[] = { -{ 0x0001, 1 }, -{ 0, 0 } -}; - -static struct proto VR[] = { -{ 0x0006, (1<<4)+3 }, -{ 0x0030, (2<<4)+6 }, -{ 0x0060, (3<<4)+7 }, -{ 0, 0 } -}; - -static struct proto VL[] = { -{ 0x0002, (1<<4)+3 }, -{ 0x0010, (2<<4)+6 }, -{ 0x0020, (3<<4)+7 }, -{ 0, 0 } -}; - -static struct proto Ext[] = { -{ 0x0040, 7 }, -{ 0, 0 } -}; - -static struct proto EOLV[] = { -{ 0x0000, 7 }, -{ 0, 0 } -}; - -static struct proto MakeUpW[] = { -{ 0x001b, 1029 }, -{ 0x0009, 2053 }, -{ 0x003a, 3078 }, -{ 0x0076, 4103 }, -{ 0x006c, 5128 }, -{ 0x00ec, 6152 }, -{ 0x0026, 7176 }, -{ 0x00a6, 8200 }, -{ 0x0016, 9224 }, -{ 0x00e6, 10248 }, -{ 0x0066, 11273 }, -{ 0x0166, 12297 }, -{ 0x0096, 13321 }, -{ 0x0196, 14345 }, -{ 0x0056, 15369 }, -{ 0x0156, 16393 }, -{ 0x00d6, 17417 }, -{ 0x01d6, 18441 }, -{ 0x0036, 19465 }, -{ 0x0136, 20489 }, -{ 0x00b6, 21513 }, -{ 0x01b6, 22537 }, -{ 0x0032, 23561 }, -{ 0x0132, 24585 }, -{ 0x00b2, 25609 }, -{ 0x0006, 26630 }, -{ 0x01b2, 27657 }, -{ 0, 0 } -}; - -static struct proto MakeUpB[] = { -{ 0x03c0, 1034 }, -{ 0x0130, 2060 }, -{ 0x0930, 3084 }, -{ 0x0da0, 4108 }, -{ 0x0cc0, 5132 }, -{ 0x02c0, 6156 }, -{ 0x0ac0, 7180 }, -{ 0x06c0, 8205 }, -{ 0x16c0, 9229 }, -{ 0x0a40, 10253 }, -{ 0x1a40, 11277 }, -{ 0x0640, 12301 }, -{ 0x1640, 13325 }, -{ 0x09c0, 14349 }, -{ 0x19c0, 15373 }, -{ 0x05c0, 16397 }, -{ 0x15c0, 17421 }, -{ 0x0dc0, 18445 }, -{ 0x1dc0, 19469 }, -{ 0x0940, 20493 }, -{ 0x1940, 21517 }, -{ 0x0540, 22541 }, -{ 0x1540, 23565 }, -{ 0x0b40, 24589 }, -{ 0x1b40, 25613 }, -{ 0x04c0, 26637 }, -{ 0x14c0, 27661 }, -{ 0, 0 } -}; - -static struct proto MakeUp[] = { -{ 0x0080, 28683 }, -{ 0x0180, 29707 }, -{ 0x0580, 30731 }, -{ 0x0480, 31756 }, -{ 0x0c80, 32780 }, -{ 0x0280, 33804 }, -{ 0x0a80, 34828 }, -{ 0x0680, 35852 }, -{ 0x0e80, 36876 }, -{ 0x0380, 37900 }, -{ 0x0b80, 38924 }, -{ 0x0780, 39948 }, -{ 0x0f80, 40972 }, -{ 0, 0 } -}; - -static struct proto TermW[] = { -{ 0x00ac, 8 }, -{ 0x0038, 22 }, -{ 0x000e, 36 }, -{ 0x0001, 52 }, -{ 0x000d, 68 }, -{ 0x0003, 84 }, -{ 0x0007, 100 }, -{ 0x000f, 116 }, -{ 0x0019, 133 }, -{ 0x0005, 149 }, -{ 0x001c, 165 }, -{ 0x0002, 181 }, -{ 0x0004, 198 }, -{ 0x0030, 214 }, -{ 0x000b, 230 }, -{ 0x002b, 246 }, -{ 0x0015, 262 }, -{ 0x0035, 278 }, -{ 0x0072, 295 }, -{ 0x0018, 311 }, -{ 0x0008, 327 }, -{ 0x0074, 343 }, -{ 0x0060, 359 }, -{ 0x0010, 375 }, -{ 0x000a, 391 }, -{ 0x006a, 407 }, -{ 0x0064, 423 }, -{ 0x0012, 439 }, -{ 0x000c, 455 }, -{ 0x0040, 472 }, -{ 0x00c0, 488 }, -{ 0x0058, 504 }, -{ 0x00d8, 520 }, -{ 0x0048, 536 }, -{ 0x00c8, 552 }, -{ 0x0028, 568 }, -{ 0x00a8, 584 }, -{ 0x0068, 600 }, -{ 0x00e8, 616 }, -{ 0x0014, 632 }, -{ 0x0094, 648 }, -{ 0x0054, 664 }, -{ 0x00d4, 680 }, -{ 0x0034, 696 }, -{ 0x00b4, 712 }, -{ 0x0020, 728 }, -{ 0x00a0, 744 }, -{ 0x0050, 760 }, -{ 0x00d0, 776 }, -{ 0x004a, 792 }, -{ 0x00ca, 808 }, -{ 0x002a, 824 }, -{ 0x00aa, 840 }, -{ 0x0024, 856 }, -{ 0x00a4, 872 }, -{ 0x001a, 888 }, -{ 0x009a, 904 }, -{ 0x005a, 920 }, -{ 0x00da, 936 }, -{ 0x0052, 952 }, -{ 0x00d2, 968 }, -{ 0x004c, 984 }, -{ 0x00cc, 1000 }, -{ 0x002c, 1016 }, -{ 0, 0 } -}; - -static struct proto TermB[] = { -{ 0x03b0, 10 }, -{ 0x0002, 19 }, -{ 0x0003, 34 }, -{ 0x0001, 50 }, -{ 0x0006, 67 }, -{ 0x000c, 84 }, -{ 0x0004, 100 }, -{ 0x0018, 117 }, -{ 0x0028, 134 }, -{ 0x0008, 150 }, -{ 0x0010, 167 }, -{ 0x0050, 183 }, -{ 0x0070, 199 }, -{ 0x0020, 216 }, -{ 0x00e0, 232 }, -{ 0x0030, 249 }, -{ 0x03a0, 266 }, -{ 0x0060, 282 }, -{ 0x0040, 298 }, -{ 0x0730, 315 }, -{ 0x00b0, 331 }, -{ 0x01b0, 347 }, -{ 0x0760, 363 }, -{ 0x00a0, 379 }, -{ 0x0740, 395 }, -{ 0x00c0, 411 }, -{ 0x0530, 428 }, -{ 0x0d30, 444 }, -{ 0x0330, 460 }, -{ 0x0b30, 476 }, -{ 0x0160, 492 }, -{ 0x0960, 508 }, -{ 0x0560, 524 }, -{ 0x0d60, 540 }, -{ 0x04b0, 556 }, -{ 0x0cb0, 572 }, -{ 0x02b0, 588 }, -{ 0x0ab0, 604 }, -{ 0x06b0, 620 }, -{ 0x0eb0, 636 }, -{ 0x0360, 652 }, -{ 0x0b60, 668 }, -{ 0x05b0, 684 }, -{ 0x0db0, 700 }, -{ 0x02a0, 716 }, -{ 0x0aa0, 732 }, -{ 0x06a0, 748 }, -{ 0x0ea0, 764 }, -{ 0x0260, 780 }, -{ 0x0a60, 796 }, -{ 0x04a0, 812 }, -{ 0x0ca0, 828 }, -{ 0x0240, 844 }, -{ 0x0ec0, 860 }, -{ 0x01c0, 876 }, -{ 0x0e40, 892 }, -{ 0x0140, 908 }, -{ 0x01a0, 924 }, -{ 0x09a0, 940 }, -{ 0x0d40, 956 }, -{ 0x0340, 972 }, -{ 0x05a0, 988 }, -{ 0x0660, 1004 }, -{ 0x0e60, 1020 }, -{ 0, 0 } -}; - -static struct proto EOLH[] = { -{ 0x0000, 11 }, -{ 0, 0 } -}; - -static void -FillTable(TIFFFaxTabEnt *T, int Size, struct proto *P, int State) -{ - int limit = 1 << Size; - - while (P->val) { - int width = P->val & 15; - int param = P->val >> 4; - int incr = 1 << width; - int code; - for (code = P->code; code < limit; code += incr) { - TIFFFaxTabEnt *E = T+code; - E->State = State; - E->Width = width; - E->Param = param; - } - P++; - } -} - -static char* storage_class = ""; -static char* const_class = ""; -static int packoutput = 1; -static char* prebrace = ""; -static char* postbrace = ""; - -void -WriteTable(FILE* fd, const TIFFFaxTabEnt* T, int Size, const char* name) -{ - int i; - char* sep; - - fprintf(fd, "%s %s TIFFFaxTabEnt %s[%d] = {", - storage_class, const_class, name, Size); - if (packoutput) { - sep = "\n"; - for (i = 0; i < Size; i++) { - fprintf(fd, "%s%s%d,%d,%d%s", - sep, prebrace, T->State, T->Width, (int) T->Param, postbrace); - if (((i+1) % 10) == 0) - sep = ",\n"; - else - sep = ","; - T++; - } - } else { - sep = "\n "; - for (i = 0; i < Size; i++) { - fprintf(fd, "%s%s%3d,%3d,%4d%s", - sep, prebrace, T->State, T->Width, (int) T->Param, postbrace); - if (((i+1) % 6) == 0) - sep = ",\n "; - else - sep = ","; - T++; - } - } - fprintf(fd, "\n};\n"); -} - -/* initialise the huffman code tables */ -int -main(int argc, char* argv[]) -{ - FILE* fd; - char* outputfile; - int c; - -#if !HAVE_DECL_OPTARG - extern int optind; - extern char* optarg; -#endif - - while ((c = getopt(argc, argv, "c:s:bp")) != -1) - switch (c) { - case 'c': - const_class = optarg; - break; - case 's': - storage_class = optarg; - break; - case 'p': - packoutput = 0; - break; - case 'b': - prebrace = "{"; - postbrace = "}"; - break; - case '?': - fprintf(stderr, - "usage: %s [-c const] [-s storage] [-p] [-b] file\n", - argv[0]); - return (-1); - } - outputfile = optind < argc ? argv[optind] : "g3states.h"; - fd = fopen(outputfile, "w"); - if (fd == NULL) { - fprintf(stderr, "%s: %s: Cannot create output file.\n", - argv[0], outputfile); - return (-2); - } - FillTable(MainTable, 7, Pass, S_Pass); - FillTable(MainTable, 7, Horiz, S_Horiz); - FillTable(MainTable, 7, V0, S_V0); - FillTable(MainTable, 7, VR, S_VR); - FillTable(MainTable, 7, VL, S_VL); - FillTable(MainTable, 7, Ext, S_Ext); - FillTable(MainTable, 7, EOLV, S_EOL); - FillTable(WhiteTable, 12, MakeUpW, S_MakeUpW); - FillTable(WhiteTable, 12, MakeUp, S_MakeUp); - FillTable(WhiteTable, 12, TermW, S_TermW); - FillTable(WhiteTable, 12, EOLH, S_EOL); - FillTable(BlackTable, 13, MakeUpB, S_MakeUpB); - FillTable(BlackTable, 13, MakeUp, S_MakeUp); - FillTable(BlackTable, 13, TermB, S_TermB); - FillTable(BlackTable, 13, EOLH, S_EOL); - - fprintf(fd, "/* WARNING, this file was automatically generated by the\n"); - fprintf(fd, " mkg3states program */\n"); - fprintf(fd, "#include \"tiff.h\"\n"); - fprintf(fd, "#include \"tif_fax3.h\"\n"); - WriteTable(fd, MainTable, 128, "TIFFFaxMainTable"); - WriteTable(fd, WhiteTable, 4096, "TIFFFaxWhiteTable"); - WriteTable(fd, BlackTable, 8192, "TIFFFaxBlackTable"); - fclose(fd); - return (0); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/mkspans.c b/Dependencies/FreeImage/Source/LibTIFF4/mkspans.c deleted file mode 100644 index 3d70cd2..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/mkspans.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include - -/* - * Hack program to construct tables used to find - * runs of zeros and ones in Group 3 Fax encoding. - */ - -dumparray(name, runs) - char *name; - unsigned char runs[256]; -{ - int i; - char *sep; - printf("static unsigned char %s[256] = {\n", name); - sep = " "; - for (i = 0; i < 256; i++) { - printf("%s%d", sep, runs[i]); - if (((i + 1) % 16) == 0) { - printf(", /* 0x%02x - 0x%02x */\n", i-15, i); - sep = " "; - } else - sep = ", "; - } - printf("\n};\n"); -} - -main() -{ - unsigned char runs[2][256]; - - memset(runs[0], 0, 256*sizeof (char)); - memset(runs[1], 0, 256*sizeof (char)); - { register int run, runlen, i; - runlen = 1; - for (run = 0x80; run != 0xff; run = (run>>1)|0x80) { - for (i = run-1; i >= 0; i--) { - runs[1][run|i] = runlen; - runs[0][(~(run|i)) & 0xff] = runlen; - } - runlen++; - } - runs[1][0xff] = runs[0][0] = 8; - } - dumparray("bruns", runs[0]); - dumparray("wruns", runs[1]); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/t4.h b/Dependencies/FreeImage/Source/LibTIFF4/t4.h deleted file mode 100644 index 2474f8f..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/t4.h +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _T4_ -#define _T4_ -/* - * CCITT T.4 1D Huffman runlength codes and - * related definitions. Given the small sizes - * of these tables it does not seem - * worthwhile to make code & length 8 bits. - */ -typedef struct tableentry { - unsigned short length; /* bit length of g3 code */ - unsigned short code; /* g3 code */ - short runlen; /* run length in bits */ -} tableentry; - -#define EOL 0x001 /* EOL code value - 0000 0000 0000 1 */ - -/* status values returned instead of a run length */ -#define G3CODE_EOL -1 /* NB: ACT_EOL - ACT_WRUNT */ -#define G3CODE_INVALID -2 /* NB: ACT_INVALID - ACT_WRUNT */ -#define G3CODE_EOF -3 /* end of input data */ -#define G3CODE_INCOMP -4 /* incomplete run code */ - -/* - * Note that these tables are ordered such that the - * index into the table is known to be either the - * run length, or (run length / 64) + a fixed offset. - * - * NB: The G3CODE_INVALID entries are only used - * during state generation (see mkg3states.c). - */ -#ifdef G3CODES -const tableentry TIFFFaxWhiteCodes[] = { - { 8, 0x35, 0 }, /* 0011 0101 */ - { 6, 0x7, 1 }, /* 0001 11 */ - { 4, 0x7, 2 }, /* 0111 */ - { 4, 0x8, 3 }, /* 1000 */ - { 4, 0xB, 4 }, /* 1011 */ - { 4, 0xC, 5 }, /* 1100 */ - { 4, 0xE, 6 }, /* 1110 */ - { 4, 0xF, 7 }, /* 1111 */ - { 5, 0x13, 8 }, /* 1001 1 */ - { 5, 0x14, 9 }, /* 1010 0 */ - { 5, 0x7, 10 }, /* 0011 1 */ - { 5, 0x8, 11 }, /* 0100 0 */ - { 6, 0x8, 12 }, /* 0010 00 */ - { 6, 0x3, 13 }, /* 0000 11 */ - { 6, 0x34, 14 }, /* 1101 00 */ - { 6, 0x35, 15 }, /* 1101 01 */ - { 6, 0x2A, 16 }, /* 1010 10 */ - { 6, 0x2B, 17 }, /* 1010 11 */ - { 7, 0x27, 18 }, /* 0100 111 */ - { 7, 0xC, 19 }, /* 0001 100 */ - { 7, 0x8, 20 }, /* 0001 000 */ - { 7, 0x17, 21 }, /* 0010 111 */ - { 7, 0x3, 22 }, /* 0000 011 */ - { 7, 0x4, 23 }, /* 0000 100 */ - { 7, 0x28, 24 }, /* 0101 000 */ - { 7, 0x2B, 25 }, /* 0101 011 */ - { 7, 0x13, 26 }, /* 0010 011 */ - { 7, 0x24, 27 }, /* 0100 100 */ - { 7, 0x18, 28 }, /* 0011 000 */ - { 8, 0x2, 29 }, /* 0000 0010 */ - { 8, 0x3, 30 }, /* 0000 0011 */ - { 8, 0x1A, 31 }, /* 0001 1010 */ - { 8, 0x1B, 32 }, /* 0001 1011 */ - { 8, 0x12, 33 }, /* 0001 0010 */ - { 8, 0x13, 34 }, /* 0001 0011 */ - { 8, 0x14, 35 }, /* 0001 0100 */ - { 8, 0x15, 36 }, /* 0001 0101 */ - { 8, 0x16, 37 }, /* 0001 0110 */ - { 8, 0x17, 38 }, /* 0001 0111 */ - { 8, 0x28, 39 }, /* 0010 1000 */ - { 8, 0x29, 40 }, /* 0010 1001 */ - { 8, 0x2A, 41 }, /* 0010 1010 */ - { 8, 0x2B, 42 }, /* 0010 1011 */ - { 8, 0x2C, 43 }, /* 0010 1100 */ - { 8, 0x2D, 44 }, /* 0010 1101 */ - { 8, 0x4, 45 }, /* 0000 0100 */ - { 8, 0x5, 46 }, /* 0000 0101 */ - { 8, 0xA, 47 }, /* 0000 1010 */ - { 8, 0xB, 48 }, /* 0000 1011 */ - { 8, 0x52, 49 }, /* 0101 0010 */ - { 8, 0x53, 50 }, /* 0101 0011 */ - { 8, 0x54, 51 }, /* 0101 0100 */ - { 8, 0x55, 52 }, /* 0101 0101 */ - { 8, 0x24, 53 }, /* 0010 0100 */ - { 8, 0x25, 54 }, /* 0010 0101 */ - { 8, 0x58, 55 }, /* 0101 1000 */ - { 8, 0x59, 56 }, /* 0101 1001 */ - { 8, 0x5A, 57 }, /* 0101 1010 */ - { 8, 0x5B, 58 }, /* 0101 1011 */ - { 8, 0x4A, 59 }, /* 0100 1010 */ - { 8, 0x4B, 60 }, /* 0100 1011 */ - { 8, 0x32, 61 }, /* 0011 0010 */ - { 8, 0x33, 62 }, /* 0011 0011 */ - { 8, 0x34, 63 }, /* 0011 0100 */ - { 5, 0x1B, 64 }, /* 1101 1 */ - { 5, 0x12, 128 }, /* 1001 0 */ - { 6, 0x17, 192 }, /* 0101 11 */ - { 7, 0x37, 256 }, /* 0110 111 */ - { 8, 0x36, 320 }, /* 0011 0110 */ - { 8, 0x37, 384 }, /* 0011 0111 */ - { 8, 0x64, 448 }, /* 0110 0100 */ - { 8, 0x65, 512 }, /* 0110 0101 */ - { 8, 0x68, 576 }, /* 0110 1000 */ - { 8, 0x67, 640 }, /* 0110 0111 */ - { 9, 0xCC, 704 }, /* 0110 0110 0 */ - { 9, 0xCD, 768 }, /* 0110 0110 1 */ - { 9, 0xD2, 832 }, /* 0110 1001 0 */ - { 9, 0xD3, 896 }, /* 0110 1001 1 */ - { 9, 0xD4, 960 }, /* 0110 1010 0 */ - { 9, 0xD5, 1024 }, /* 0110 1010 1 */ - { 9, 0xD6, 1088 }, /* 0110 1011 0 */ - { 9, 0xD7, 1152 }, /* 0110 1011 1 */ - { 9, 0xD8, 1216 }, /* 0110 1100 0 */ - { 9, 0xD9, 1280 }, /* 0110 1100 1 */ - { 9, 0xDA, 1344 }, /* 0110 1101 0 */ - { 9, 0xDB, 1408 }, /* 0110 1101 1 */ - { 9, 0x98, 1472 }, /* 0100 1100 0 */ - { 9, 0x99, 1536 }, /* 0100 1100 1 */ - { 9, 0x9A, 1600 }, /* 0100 1101 0 */ - { 6, 0x18, 1664 }, /* 0110 00 */ - { 9, 0x9B, 1728 }, /* 0100 1101 1 */ - { 11, 0x8, 1792 }, /* 0000 0001 000 */ - { 11, 0xC, 1856 }, /* 0000 0001 100 */ - { 11, 0xD, 1920 }, /* 0000 0001 101 */ - { 12, 0x12, 1984 }, /* 0000 0001 0010 */ - { 12, 0x13, 2048 }, /* 0000 0001 0011 */ - { 12, 0x14, 2112 }, /* 0000 0001 0100 */ - { 12, 0x15, 2176 }, /* 0000 0001 0101 */ - { 12, 0x16, 2240 }, /* 0000 0001 0110 */ - { 12, 0x17, 2304 }, /* 0000 0001 0111 */ - { 12, 0x1C, 2368 }, /* 0000 0001 1100 */ - { 12, 0x1D, 2432 }, /* 0000 0001 1101 */ - { 12, 0x1E, 2496 }, /* 0000 0001 1110 */ - { 12, 0x1F, 2560 }, /* 0000 0001 1111 */ - { 12, 0x1, G3CODE_EOL }, /* 0000 0000 0001 */ - { 9, 0x1, G3CODE_INVALID }, /* 0000 0000 1 */ - { 10, 0x1, G3CODE_INVALID }, /* 0000 0000 01 */ - { 11, 0x1, G3CODE_INVALID }, /* 0000 0000 001 */ - { 12, 0x0, G3CODE_INVALID }, /* 0000 0000 0000 */ -}; - -const tableentry TIFFFaxBlackCodes[] = { - { 10, 0x37, 0 }, /* 0000 1101 11 */ - { 3, 0x2, 1 }, /* 010 */ - { 2, 0x3, 2 }, /* 11 */ - { 2, 0x2, 3 }, /* 10 */ - { 3, 0x3, 4 }, /* 011 */ - { 4, 0x3, 5 }, /* 0011 */ - { 4, 0x2, 6 }, /* 0010 */ - { 5, 0x3, 7 }, /* 0001 1 */ - { 6, 0x5, 8 }, /* 0001 01 */ - { 6, 0x4, 9 }, /* 0001 00 */ - { 7, 0x4, 10 }, /* 0000 100 */ - { 7, 0x5, 11 }, /* 0000 101 */ - { 7, 0x7, 12 }, /* 0000 111 */ - { 8, 0x4, 13 }, /* 0000 0100 */ - { 8, 0x7, 14 }, /* 0000 0111 */ - { 9, 0x18, 15 }, /* 0000 1100 0 */ - { 10, 0x17, 16 }, /* 0000 0101 11 */ - { 10, 0x18, 17 }, /* 0000 0110 00 */ - { 10, 0x8, 18 }, /* 0000 0010 00 */ - { 11, 0x67, 19 }, /* 0000 1100 111 */ - { 11, 0x68, 20 }, /* 0000 1101 000 */ - { 11, 0x6C, 21 }, /* 0000 1101 100 */ - { 11, 0x37, 22 }, /* 0000 0110 111 */ - { 11, 0x28, 23 }, /* 0000 0101 000 */ - { 11, 0x17, 24 }, /* 0000 0010 111 */ - { 11, 0x18, 25 }, /* 0000 0011 000 */ - { 12, 0xCA, 26 }, /* 0000 1100 1010 */ - { 12, 0xCB, 27 }, /* 0000 1100 1011 */ - { 12, 0xCC, 28 }, /* 0000 1100 1100 */ - { 12, 0xCD, 29 }, /* 0000 1100 1101 */ - { 12, 0x68, 30 }, /* 0000 0110 1000 */ - { 12, 0x69, 31 }, /* 0000 0110 1001 */ - { 12, 0x6A, 32 }, /* 0000 0110 1010 */ - { 12, 0x6B, 33 }, /* 0000 0110 1011 */ - { 12, 0xD2, 34 }, /* 0000 1101 0010 */ - { 12, 0xD3, 35 }, /* 0000 1101 0011 */ - { 12, 0xD4, 36 }, /* 0000 1101 0100 */ - { 12, 0xD5, 37 }, /* 0000 1101 0101 */ - { 12, 0xD6, 38 }, /* 0000 1101 0110 */ - { 12, 0xD7, 39 }, /* 0000 1101 0111 */ - { 12, 0x6C, 40 }, /* 0000 0110 1100 */ - { 12, 0x6D, 41 }, /* 0000 0110 1101 */ - { 12, 0xDA, 42 }, /* 0000 1101 1010 */ - { 12, 0xDB, 43 }, /* 0000 1101 1011 */ - { 12, 0x54, 44 }, /* 0000 0101 0100 */ - { 12, 0x55, 45 }, /* 0000 0101 0101 */ - { 12, 0x56, 46 }, /* 0000 0101 0110 */ - { 12, 0x57, 47 }, /* 0000 0101 0111 */ - { 12, 0x64, 48 }, /* 0000 0110 0100 */ - { 12, 0x65, 49 }, /* 0000 0110 0101 */ - { 12, 0x52, 50 }, /* 0000 0101 0010 */ - { 12, 0x53, 51 }, /* 0000 0101 0011 */ - { 12, 0x24, 52 }, /* 0000 0010 0100 */ - { 12, 0x37, 53 }, /* 0000 0011 0111 */ - { 12, 0x38, 54 }, /* 0000 0011 1000 */ - { 12, 0x27, 55 }, /* 0000 0010 0111 */ - { 12, 0x28, 56 }, /* 0000 0010 1000 */ - { 12, 0x58, 57 }, /* 0000 0101 1000 */ - { 12, 0x59, 58 }, /* 0000 0101 1001 */ - { 12, 0x2B, 59 }, /* 0000 0010 1011 */ - { 12, 0x2C, 60 }, /* 0000 0010 1100 */ - { 12, 0x5A, 61 }, /* 0000 0101 1010 */ - { 12, 0x66, 62 }, /* 0000 0110 0110 */ - { 12, 0x67, 63 }, /* 0000 0110 0111 */ - { 10, 0xF, 64 }, /* 0000 0011 11 */ - { 12, 0xC8, 128 }, /* 0000 1100 1000 */ - { 12, 0xC9, 192 }, /* 0000 1100 1001 */ - { 12, 0x5B, 256 }, /* 0000 0101 1011 */ - { 12, 0x33, 320 }, /* 0000 0011 0011 */ - { 12, 0x34, 384 }, /* 0000 0011 0100 */ - { 12, 0x35, 448 }, /* 0000 0011 0101 */ - { 13, 0x6C, 512 }, /* 0000 0011 0110 0 */ - { 13, 0x6D, 576 }, /* 0000 0011 0110 1 */ - { 13, 0x4A, 640 }, /* 0000 0010 0101 0 */ - { 13, 0x4B, 704 }, /* 0000 0010 0101 1 */ - { 13, 0x4C, 768 }, /* 0000 0010 0110 0 */ - { 13, 0x4D, 832 }, /* 0000 0010 0110 1 */ - { 13, 0x72, 896 }, /* 0000 0011 1001 0 */ - { 13, 0x73, 960 }, /* 0000 0011 1001 1 */ - { 13, 0x74, 1024 }, /* 0000 0011 1010 0 */ - { 13, 0x75, 1088 }, /* 0000 0011 1010 1 */ - { 13, 0x76, 1152 }, /* 0000 0011 1011 0 */ - { 13, 0x77, 1216 }, /* 0000 0011 1011 1 */ - { 13, 0x52, 1280 }, /* 0000 0010 1001 0 */ - { 13, 0x53, 1344 }, /* 0000 0010 1001 1 */ - { 13, 0x54, 1408 }, /* 0000 0010 1010 0 */ - { 13, 0x55, 1472 }, /* 0000 0010 1010 1 */ - { 13, 0x5A, 1536 }, /* 0000 0010 1101 0 */ - { 13, 0x5B, 1600 }, /* 0000 0010 1101 1 */ - { 13, 0x64, 1664 }, /* 0000 0011 0010 0 */ - { 13, 0x65, 1728 }, /* 0000 0011 0010 1 */ - { 11, 0x8, 1792 }, /* 0000 0001 000 */ - { 11, 0xC, 1856 }, /* 0000 0001 100 */ - { 11, 0xD, 1920 }, /* 0000 0001 101 */ - { 12, 0x12, 1984 }, /* 0000 0001 0010 */ - { 12, 0x13, 2048 }, /* 0000 0001 0011 */ - { 12, 0x14, 2112 }, /* 0000 0001 0100 */ - { 12, 0x15, 2176 }, /* 0000 0001 0101 */ - { 12, 0x16, 2240 }, /* 0000 0001 0110 */ - { 12, 0x17, 2304 }, /* 0000 0001 0111 */ - { 12, 0x1C, 2368 }, /* 0000 0001 1100 */ - { 12, 0x1D, 2432 }, /* 0000 0001 1101 */ - { 12, 0x1E, 2496 }, /* 0000 0001 1110 */ - { 12, 0x1F, 2560 }, /* 0000 0001 1111 */ - { 12, 0x1, G3CODE_EOL }, /* 0000 0000 0001 */ - { 9, 0x1, G3CODE_INVALID }, /* 0000 0000 1 */ - { 10, 0x1, G3CODE_INVALID }, /* 0000 0000 01 */ - { 11, 0x1, G3CODE_INVALID }, /* 0000 0000 001 */ - { 12, 0x0, G3CODE_INVALID }, /* 0000 0000 0000 */ -}; -#else -extern const tableentry TIFFFaxWhiteCodes[]; -extern const tableentry TIFFFaxBlackCodes[]; -#endif -#endif /* _T4_ */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_aux.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_aux.c deleted file mode 100644 index 936448c..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_aux.c +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Auxiliary Support Routines. - */ -#include "tiffiop.h" -#include "tif_predict.h" -#include - -uint32 -_TIFFMultiply32(TIFF* tif, uint32 first, uint32 second, const char* where) -{ - uint32 bytes = first * second; - - if (second && bytes / second != first) { - TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where); - bytes = 0; - } - - return bytes; -} - -uint64 -_TIFFMultiply64(TIFF* tif, uint64 first, uint64 second, const char* where) -{ - uint64 bytes = first * second; - - if (second && bytes / second != first) { - TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where); - bytes = 0; - } - - return bytes; -} - -void* -_TIFFCheckRealloc(TIFF* tif, void* buffer, - tmsize_t nmemb, tmsize_t elem_size, const char* what) -{ - void* cp = NULL; - tmsize_t bytes = nmemb * elem_size; - - /* - * XXX: Check for integer overflow. - */ - if (nmemb && elem_size && bytes / elem_size == nmemb) - cp = _TIFFrealloc(buffer, bytes); - - if (cp == NULL) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Failed to allocate memory for %s " - "(%ld elements of %ld bytes each)", - what,(long) nmemb, (long) elem_size); - } - - return cp; -} - -void* -_TIFFCheckMalloc(TIFF* tif, tmsize_t nmemb, tmsize_t elem_size, const char* what) -{ - return _TIFFCheckRealloc(tif, NULL, nmemb, elem_size, what); -} - -static int -TIFFDefaultTransferFunction(TIFFDirectory* td) -{ - uint16 **tf = td->td_transferfunction; - tmsize_t i, n, nbytes; - - tf[0] = tf[1] = tf[2] = 0; - if (td->td_bitspersample >= sizeof(tmsize_t) * 8 - 2) - return 0; - - n = ((tmsize_t)1)<td_bitspersample; - nbytes = n * sizeof (uint16); - tf[0] = (uint16 *)_TIFFmalloc(nbytes); - if (tf[0] == NULL) - return 0; - tf[0][0] = 0; - for (i = 1; i < n; i++) { - double t = (double)i/((double) n-1.); - tf[0][i] = (uint16)floor(65535.*pow(t, 2.2) + .5); - } - - if (td->td_samplesperpixel - td->td_extrasamples > 1) { - tf[1] = (uint16 *)_TIFFmalloc(nbytes); - if(tf[1] == NULL) - goto bad; - _TIFFmemcpy(tf[1], tf[0], nbytes); - tf[2] = (uint16 *)_TIFFmalloc(nbytes); - if (tf[2] == NULL) - goto bad; - _TIFFmemcpy(tf[2], tf[0], nbytes); - } - return 1; - -bad: - if (tf[0]) - _TIFFfree(tf[0]); - if (tf[1]) - _TIFFfree(tf[1]); - if (tf[2]) - _TIFFfree(tf[2]); - tf[0] = tf[1] = tf[2] = 0; - return 0; -} - -static int -TIFFDefaultRefBlackWhite(TIFFDirectory* td) -{ - int i; - - td->td_refblackwhite = (float *)_TIFFmalloc(6*sizeof (float)); - if (td->td_refblackwhite == NULL) - return 0; - if (td->td_photometric == PHOTOMETRIC_YCBCR) { - /* - * YCbCr (Class Y) images must have the ReferenceBlackWhite - * tag set. Fix the broken images, which lacks that tag. - */ - td->td_refblackwhite[0] = 0.0F; - td->td_refblackwhite[1] = td->td_refblackwhite[3] = - td->td_refblackwhite[5] = 255.0F; - td->td_refblackwhite[2] = td->td_refblackwhite[4] = 128.0F; - } else { - /* - * Assume RGB (Class R) - */ - for (i = 0; i < 3; i++) { - td->td_refblackwhite[2*i+0] = 0; - td->td_refblackwhite[2*i+1] = - (float)((1L<td_bitspersample)-1L); - } - } - return 1; -} - -/* - * Like TIFFGetField, but return any default - * value if the tag is not present in the directory. - * - * NB: We use the value in the directory, rather than - * explicit values so that defaults exist only one - * place in the library -- in TIFFDefaultDirectory. - */ -int -TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap) -{ - TIFFDirectory *td = &tif->tif_dir; - - if (TIFFVGetField(tif, tag, ap)) - return (1); - switch (tag) { - case TIFFTAG_SUBFILETYPE: - *va_arg(ap, uint32 *) = td->td_subfiletype; - return (1); - case TIFFTAG_BITSPERSAMPLE: - *va_arg(ap, uint16 *) = td->td_bitspersample; - return (1); - case TIFFTAG_THRESHHOLDING: - *va_arg(ap, uint16 *) = td->td_threshholding; - return (1); - case TIFFTAG_FILLORDER: - *va_arg(ap, uint16 *) = td->td_fillorder; - return (1); - case TIFFTAG_ORIENTATION: - *va_arg(ap, uint16 *) = td->td_orientation; - return (1); - case TIFFTAG_SAMPLESPERPIXEL: - *va_arg(ap, uint16 *) = td->td_samplesperpixel; - return (1); - case TIFFTAG_ROWSPERSTRIP: - *va_arg(ap, uint32 *) = td->td_rowsperstrip; - return (1); - case TIFFTAG_MINSAMPLEVALUE: - *va_arg(ap, uint16 *) = td->td_minsamplevalue; - return (1); - case TIFFTAG_MAXSAMPLEVALUE: - *va_arg(ap, uint16 *) = td->td_maxsamplevalue; - return (1); - case TIFFTAG_PLANARCONFIG: - *va_arg(ap, uint16 *) = td->td_planarconfig; - return (1); - case TIFFTAG_RESOLUTIONUNIT: - *va_arg(ap, uint16 *) = td->td_resolutionunit; - return (1); - case TIFFTAG_PREDICTOR: - { - TIFFPredictorState* sp = (TIFFPredictorState*) tif->tif_data; - if( sp == NULL ) - { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Cannot get \"Predictor\" tag as plugin is not configured"); - *va_arg(ap, uint16*) = 0; - return 0; - } - *va_arg(ap, uint16*) = (uint16) sp->predictor; - return 1; - } - case TIFFTAG_DOTRANGE: - *va_arg(ap, uint16 *) = 0; - *va_arg(ap, uint16 *) = (1<td_bitspersample)-1; - return (1); - case TIFFTAG_INKSET: - *va_arg(ap, uint16 *) = INKSET_CMYK; - return 1; - case TIFFTAG_NUMBEROFINKS: - *va_arg(ap, uint16 *) = 4; - return (1); - case TIFFTAG_EXTRASAMPLES: - *va_arg(ap, uint16 *) = td->td_extrasamples; - *va_arg(ap, uint16 **) = td->td_sampleinfo; - return (1); - case TIFFTAG_MATTEING: - *va_arg(ap, uint16 *) = - (td->td_extrasamples == 1 && - td->td_sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA); - return (1); - case TIFFTAG_TILEDEPTH: - *va_arg(ap, uint32 *) = td->td_tiledepth; - return (1); - case TIFFTAG_DATATYPE: - *va_arg(ap, uint16 *) = td->td_sampleformat-1; - return (1); - case TIFFTAG_SAMPLEFORMAT: - *va_arg(ap, uint16 *) = td->td_sampleformat; - return(1); - case TIFFTAG_IMAGEDEPTH: - *va_arg(ap, uint32 *) = td->td_imagedepth; - return (1); - case TIFFTAG_YCBCRCOEFFICIENTS: - { - /* defaults are from CCIR Recommendation 601-1 */ - static float ycbcrcoeffs[] = { 0.299f, 0.587f, 0.114f }; - *va_arg(ap, float **) = ycbcrcoeffs; - return 1; - } - case TIFFTAG_YCBCRSUBSAMPLING: - *va_arg(ap, uint16 *) = td->td_ycbcrsubsampling[0]; - *va_arg(ap, uint16 *) = td->td_ycbcrsubsampling[1]; - return (1); - case TIFFTAG_YCBCRPOSITIONING: - *va_arg(ap, uint16 *) = td->td_ycbcrpositioning; - return (1); - case TIFFTAG_WHITEPOINT: - { - static float whitepoint[2]; - - /* TIFF 6.0 specification tells that it is no default - value for the WhitePoint, but AdobePhotoshop TIFF - Technical Note tells that it should be CIE D50. */ - whitepoint[0] = D50_X0 / (D50_X0 + D50_Y0 + D50_Z0); - whitepoint[1] = D50_Y0 / (D50_X0 + D50_Y0 + D50_Z0); - *va_arg(ap, float **) = whitepoint; - return 1; - } - case TIFFTAG_TRANSFERFUNCTION: - if (!td->td_transferfunction[0] && - !TIFFDefaultTransferFunction(td)) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "No space for \"TransferFunction\" tag"); - return (0); - } - *va_arg(ap, uint16 **) = td->td_transferfunction[0]; - if (td->td_samplesperpixel - td->td_extrasamples > 1) { - *va_arg(ap, uint16 **) = td->td_transferfunction[1]; - *va_arg(ap, uint16 **) = td->td_transferfunction[2]; - } - return (1); - case TIFFTAG_REFERENCEBLACKWHITE: - if (!td->td_refblackwhite && !TIFFDefaultRefBlackWhite(td)) - return (0); - *va_arg(ap, float **) = td->td_refblackwhite; - return (1); - } - return 0; -} - -/* - * Like TIFFGetField, but return any default - * value if the tag is not present in the directory. - */ -int -TIFFGetFieldDefaulted(TIFF* tif, uint32 tag, ...) -{ - int ok; - va_list ap; - - va_start(ap, tag); - ok = TIFFVGetFieldDefaulted(tif, tag, ap); - va_end(ap); - return (ok); -} - -struct _Int64Parts { - int32 low, high; -}; - -typedef union { - struct _Int64Parts part; - int64 value; -} _Int64; - -float -_TIFFUInt64ToFloat(uint64 ui64) -{ - _Int64 i; - - i.value = ui64; - if (i.part.high >= 0) { - return (float)i.value; - } else { - long double df; - df = (long double)i.value; - df += 18446744073709551616.0; /* adding 2**64 */ - return (float)df; - } -} - -double -_TIFFUInt64ToDouble(uint64 ui64) -{ - _Int64 i; - - i.value = ui64; - if (i.part.high >= 0) { - return (double)i.value; - } else { - long double df; - df = (long double)i.value; - df += 18446744073709551616.0; /* adding 2**64 */ - return (double)df; - } -} - -int _TIFFSeekOK(TIFF* tif, toff_t off) -{ - /* Huge offsets, especially -1 / UINT64_MAX, can cause issues */ - /* See http://bugzilla.maptools.org/show_bug.cgi?id=2726 */ - return off <= (~(uint64)0)/2 && TIFFSeekFile(tif,off,SEEK_SET)==off; -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_close.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_close.c deleted file mode 100644 index 9f3853d..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_close.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - */ -#include "tiffiop.h" -#include - -/************************************************************************/ -/* TIFFCleanup() */ -/************************************************************************/ - -/** - * Auxiliary function to free the TIFF structure. Given structure will be - * completely freed, so you should save opened file handle and pointer - * to the close procedure in external variables before calling - * _TIFFCleanup(), if you will need these ones to close the file. - * - * @param tif A TIFF pointer. - */ - -void -TIFFCleanup(TIFF* tif) -{ - /* - * Flush buffered data and directory (if dirty). - */ - if (tif->tif_mode != O_RDONLY) - TIFFFlush(tif); - (*tif->tif_cleanup)(tif); - TIFFFreeDirectory(tif); - - if (tif->tif_dirlist) - _TIFFfree(tif->tif_dirlist); - - /* - * Clean up client info links. - */ - while( tif->tif_clientinfo ) - { - TIFFClientInfoLink *psLink = tif->tif_clientinfo; - - tif->tif_clientinfo = psLink->next; - _TIFFfree( psLink->name ); - _TIFFfree( psLink ); - } - - if (tif->tif_rawdata && (tif->tif_flags&TIFF_MYBUFFER)) - _TIFFfree(tif->tif_rawdata); - if (isMapped(tif)) - TIFFUnmapFileContents(tif, tif->tif_base, (toff_t)tif->tif_size); - - /* - * Clean up custom fields. - */ - if (tif->tif_fields && tif->tif_nfields > 0) { - uint32 i; - - for (i = 0; i < tif->tif_nfields; i++) { - TIFFField *fld = tif->tif_fields[i]; - if (fld->field_bit == FIELD_CUSTOM && - strncmp("Tag ", fld->field_name, 4) == 0) { - _TIFFfree(fld->field_name); - _TIFFfree(fld); - } - } - - _TIFFfree(tif->tif_fields); - } - - if (tif->tif_nfieldscompat > 0) { - uint32 i; - - for (i = 0; i < tif->tif_nfieldscompat; i++) { - if (tif->tif_fieldscompat[i].allocated_size) - _TIFFfree(tif->tif_fieldscompat[i].fields); - } - _TIFFfree(tif->tif_fieldscompat); - } - - _TIFFfree(tif); -} - -/************************************************************************/ -/* TIFFClose() */ -/************************************************************************/ - -/** - * Close a previously opened TIFF file. - * - * TIFFClose closes a file that was previously opened with TIFFOpen(). - * Any buffered data are flushed to the file, including the contents of - * the current directory (if modified); and all resources are reclaimed. - * - * @param tif A TIFF pointer. - */ - -void -TIFFClose(TIFF* tif) -{ - TIFFCloseProc closeproc = tif->tif_closeproc; - thandle_t fd = tif->tif_clientdata; - - TIFFCleanup(tif); - (void) (*closeproc)(fd); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_codec.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_codec.c deleted file mode 100644 index b0d79ad..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_codec.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Builtin Compression Scheme Configuration Support. - */ -#include "tiffiop.h" - -static int NotConfigured(TIFF*, int); - -#ifndef LZW_SUPPORT -#define TIFFInitLZW NotConfigured -#endif -#ifndef PACKBITS_SUPPORT -#define TIFFInitPackBits NotConfigured -#endif -#ifndef THUNDER_SUPPORT -#define TIFFInitThunderScan NotConfigured -#endif -#ifndef NEXT_SUPPORT -#define TIFFInitNeXT NotConfigured -#endif -#ifndef JPEG_SUPPORT -#define TIFFInitJPEG NotConfigured -#endif -#ifndef OJPEG_SUPPORT -#define TIFFInitOJPEG NotConfigured -#endif -#ifndef CCITT_SUPPORT -#define TIFFInitCCITTRLE NotConfigured -#define TIFFInitCCITTRLEW NotConfigured -#define TIFFInitCCITTFax3 NotConfigured -#define TIFFInitCCITTFax4 NotConfigured -#endif -#ifndef JBIG_SUPPORT -#define TIFFInitJBIG NotConfigured -#endif -#ifndef ZIP_SUPPORT -#define TIFFInitZIP NotConfigured -#endif -#ifndef PIXARLOG_SUPPORT -#define TIFFInitPixarLog NotConfigured -#endif -#ifndef LOGLUV_SUPPORT -#define TIFFInitSGILog NotConfigured -#endif -#ifndef LZMA_SUPPORT -#define TIFFInitLZMA NotConfigured -#endif -#ifndef ZSTD_SUPPORT -#define TIFFInitZSTD NotConfigured -#endif - -/* - * Compression schemes statically built into the library. - */ -#ifdef VMS -const TIFFCodec _TIFFBuiltinCODECS[] = { -#else -TIFFCodec _TIFFBuiltinCODECS[] = { -#endif - { "None", COMPRESSION_NONE, TIFFInitDumpMode }, - { "LZW", COMPRESSION_LZW, TIFFInitLZW }, - { "PackBits", COMPRESSION_PACKBITS, TIFFInitPackBits }, - { "ThunderScan", COMPRESSION_THUNDERSCAN,TIFFInitThunderScan }, - { "NeXT", COMPRESSION_NEXT, TIFFInitNeXT }, - { "JPEG", COMPRESSION_JPEG, TIFFInitJPEG }, - { "Old-style JPEG", COMPRESSION_OJPEG, TIFFInitOJPEG }, - { "CCITT RLE", COMPRESSION_CCITTRLE, TIFFInitCCITTRLE }, - { "CCITT RLE/W", COMPRESSION_CCITTRLEW, TIFFInitCCITTRLEW }, - { "CCITT Group 3", COMPRESSION_CCITTFAX3, TIFFInitCCITTFax3 }, - { "CCITT Group 4", COMPRESSION_CCITTFAX4, TIFFInitCCITTFax4 }, - { "ISO JBIG", COMPRESSION_JBIG, TIFFInitJBIG }, - { "Deflate", COMPRESSION_DEFLATE, TIFFInitZIP }, - { "AdobeDeflate", COMPRESSION_ADOBE_DEFLATE , TIFFInitZIP }, - { "PixarLog", COMPRESSION_PIXARLOG, TIFFInitPixarLog }, - { "SGILog", COMPRESSION_SGILOG, TIFFInitSGILog }, - { "SGILog24", COMPRESSION_SGILOG24, TIFFInitSGILog }, - { "LZMA", COMPRESSION_LZMA, TIFFInitLZMA }, - { "ZSTD", COMPRESSION_ZSTD, TIFFInitZSTD }, - { NULL, 0, NULL } -}; - -static int -_notConfigured(TIFF* tif) -{ - const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression); - char compression_code[20]; - - sprintf(compression_code, "%d",tif->tif_dir.td_compression ); - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "%s compression support is not configured", - c ? c->name : compression_code ); - return (0); -} - -static int -NotConfigured(TIFF* tif, int scheme) -{ - (void) scheme; - - tif->tif_fixuptags = _notConfigured; - tif->tif_decodestatus = FALSE; - tif->tif_setupdecode = _notConfigured; - tif->tif_encodestatus = FALSE; - tif->tif_setupencode = _notConfigured; - return (1); -} - -/************************************************************************/ -/* TIFFIsCODECConfigured() */ -/************************************************************************/ - -/** - * Check whether we have working codec for the specific coding scheme. - * - * @return returns 1 if the codec is configured and working. Otherwise - * 0 will be returned. - */ - -int -TIFFIsCODECConfigured(uint16 scheme) -{ - const TIFFCodec* codec = TIFFFindCODEC(scheme); - - if(codec == NULL) { - return 0; - } - if(codec->init == NULL) { - return 0; - } - if(codec->init != NotConfigured){ - return 1; - } - return 0; -} - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_color.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_color.c deleted file mode 100644 index 85ca99d..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_color.c +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * CIE L*a*b* to CIE XYZ and CIE XYZ to RGB conversion routines are taken - * from the VIPS library (http://www.vips.ecs.soton.ac.uk) with - * the permission of John Cupitt, the VIPS author. - */ - -/* - * TIFF Library. - * - * Color space conversion routines. - */ - -#include "tiffiop.h" -#include - -/* - * Convert color value from the CIE L*a*b* 1976 space to CIE XYZ. - */ -void -TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32 l, int32 a, int32 b, - float *X, float *Y, float *Z) -{ - float L = (float)l * 100.0F / 255.0F; - float cby, tmp; - - if( L < 8.856F ) { - *Y = (L * cielab->Y0) / 903.292F; - cby = 7.787F * (*Y / cielab->Y0) + 16.0F / 116.0F; - } else { - cby = (L + 16.0F) / 116.0F; - *Y = cielab->Y0 * cby * cby * cby; - } - - tmp = (float)a / 500.0F + cby; - if( tmp < 0.2069F ) - *X = cielab->X0 * (tmp - 0.13793F) / 7.787F; - else - *X = cielab->X0 * tmp * tmp * tmp; - - tmp = cby - (float)b / 200.0F; - if( tmp < 0.2069F ) - *Z = cielab->Z0 * (tmp - 0.13793F) / 7.787F; - else - *Z = cielab->Z0 * tmp * tmp * tmp; -} - -#define RINT(R) ((uint32)((R)>0?((R)+0.5):((R)-0.5))) -/* - * Convert color value from the XYZ space to RGB. - */ -void -TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z, - uint32 *r, uint32 *g, uint32 *b) -{ - int i; - float Yr, Yg, Yb; - float *matrix = &cielab->display.d_mat[0][0]; - - /* Multiply through the matrix to get luminosity values. */ - Yr = matrix[0] * X + matrix[1] * Y + matrix[2] * Z; - Yg = matrix[3] * X + matrix[4] * Y + matrix[5] * Z; - Yb = matrix[6] * X + matrix[7] * Y + matrix[8] * Z; - - /* Clip input */ - Yr = TIFFmax(Yr, cielab->display.d_Y0R); - Yg = TIFFmax(Yg, cielab->display.d_Y0G); - Yb = TIFFmax(Yb, cielab->display.d_Y0B); - - /* Avoid overflow in case of wrong input values */ - Yr = TIFFmin(Yr, cielab->display.d_YCR); - Yg = TIFFmin(Yg, cielab->display.d_YCG); - Yb = TIFFmin(Yb, cielab->display.d_YCB); - - /* Turn luminosity to colour value. */ - i = (int)((Yr - cielab->display.d_Y0R) / cielab->rstep); - i = TIFFmin(cielab->range, i); - *r = RINT(cielab->Yr2r[i]); - - i = (int)((Yg - cielab->display.d_Y0G) / cielab->gstep); - i = TIFFmin(cielab->range, i); - *g = RINT(cielab->Yg2g[i]); - - i = (int)((Yb - cielab->display.d_Y0B) / cielab->bstep); - i = TIFFmin(cielab->range, i); - *b = RINT(cielab->Yb2b[i]); - - /* Clip output. */ - *r = TIFFmin(*r, cielab->display.d_Vrwr); - *g = TIFFmin(*g, cielab->display.d_Vrwg); - *b = TIFFmin(*b, cielab->display.d_Vrwb); -} -#undef RINT - -/* - * Allocate conversion state structures and make look_up tables for - * the Yr,Yb,Yg <=> r,g,b conversions. - */ -int -TIFFCIELabToRGBInit(TIFFCIELabToRGB* cielab, - const TIFFDisplay *display, float *refWhite) -{ - int i; - double dfGamma; - - cielab->range = CIELABTORGB_TABLE_RANGE; - - _TIFFmemcpy(&cielab->display, display, sizeof(TIFFDisplay)); - - /* Red */ - dfGamma = 1.0 / cielab->display.d_gammaR ; - cielab->rstep = - (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range; - for(i = 0; i <= cielab->range; i++) { - cielab->Yr2r[i] = cielab->display.d_Vrwr - * ((float)pow((double)i / cielab->range, dfGamma)); - } - - /* Green */ - dfGamma = 1.0 / cielab->display.d_gammaG ; - cielab->gstep = - (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range; - for(i = 0; i <= cielab->range; i++) { - cielab->Yg2g[i] = cielab->display.d_Vrwg - * ((float)pow((double)i / cielab->range, dfGamma)); - } - - /* Blue */ - dfGamma = 1.0 / cielab->display.d_gammaB ; - cielab->bstep = - (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range; - for(i = 0; i <= cielab->range; i++) { - cielab->Yb2b[i] = cielab->display.d_Vrwb - * ((float)pow((double)i / cielab->range, dfGamma)); - } - - /* Init reference white point */ - cielab->X0 = refWhite[0]; - cielab->Y0 = refWhite[1]; - cielab->Z0 = refWhite[2]; - - return 0; -} - -/* - * Convert color value from the YCbCr space to RGB. - * The colorspace conversion algorithm comes from the IJG v5a code; - * see below for more information on how it works. - */ -#define SHIFT 16 -#define FIX(x) ((int32)((x) * (1L<(max)?(max):(f)) -#define HICLAMP(f,max) ((f)>(max)?(max):(f)) - -void -TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32 Y, int32 Cb, int32 Cr, - uint32 *r, uint32 *g, uint32 *b) -{ - int32 i; - - /* XXX: Only 8-bit YCbCr input supported for now */ - Y = HICLAMP(Y, 255); - Cb = CLAMP(Cb, 0, 255); - Cr = CLAMP(Cr, 0, 255); - - i = ycbcr->Y_tab[Y] + ycbcr->Cr_r_tab[Cr]; - *r = CLAMP(i, 0, 255); - i = ycbcr->Y_tab[Y] - + (int)((ycbcr->Cb_g_tab[Cb] + ycbcr->Cr_g_tab[Cr]) >> SHIFT); - *g = CLAMP(i, 0, 255); - i = ycbcr->Y_tab[Y] + ycbcr->Cb_b_tab[Cb]; - *b = CLAMP(i, 0, 255); -} - -/* Clamp function for sanitization purposes. Normally clamping should not */ -/* occur for well behaved chroma and refBlackWhite coefficients */ -static float CLAMPw(float v, float vmin, float vmax) -{ - if( v < vmin ) - { - /* printf("%f clamped to %f\n", v, vmin); */ - return vmin; - } - if( v > vmax ) - { - /* printf("%f clamped to %f\n", v, vmax); */ - return vmax; - } - return v; -} - -/* - * Initialize the YCbCr->RGB conversion tables. The conversion - * is done according to the 6.0 spec: - * - * R = Y + Cr*(2 - 2*LumaRed) - * B = Y + Cb*(2 - 2*LumaBlue) - * G = Y - * - LumaBlue*Cb*(2-2*LumaBlue)/LumaGreen - * - LumaRed*Cr*(2-2*LumaRed)/LumaGreen - * - * To avoid floating point arithmetic the fractional constants that - * come out of the equations are represented as fixed point values - * in the range 0...2^16. We also eliminate multiplications by - * pre-calculating possible values indexed by Cb and Cr (this code - * assumes conversion is being done for 8-bit samples). - */ -int -TIFFYCbCrToRGBInit(TIFFYCbCrToRGB* ycbcr, float *luma, float *refBlackWhite) -{ - TIFFRGBValue* clamptab; - int i; - -#define LumaRed luma[0] -#define LumaGreen luma[1] -#define LumaBlue luma[2] - - clamptab = (TIFFRGBValue*)( - (uint8*) ycbcr+TIFFroundup_32(sizeof (TIFFYCbCrToRGB), sizeof (long))); - _TIFFmemset(clamptab, 0, 256); /* v < 0 => 0 */ - ycbcr->clamptab = (clamptab += 256); - for (i = 0; i < 256; i++) - clamptab[i] = (TIFFRGBValue) i; - _TIFFmemset(clamptab+256, 255, 2*256); /* v > 255 => 255 */ - ycbcr->Cr_r_tab = (int*) (clamptab + 3*256); - ycbcr->Cb_b_tab = ycbcr->Cr_r_tab + 256; - ycbcr->Cr_g_tab = (int32*) (ycbcr->Cb_b_tab + 256); - ycbcr->Cb_g_tab = ycbcr->Cr_g_tab + 256; - ycbcr->Y_tab = ycbcr->Cb_g_tab + 256; - - { float f1 = 2-2*LumaRed; int32 D1 = FIX(CLAMP(f1,0.0F,2.0F)); - float f2 = LumaRed*f1/LumaGreen; int32 D2 = -FIX(CLAMP(f2,0.0F,2.0F)); - float f3 = 2-2*LumaBlue; int32 D3 = FIX(CLAMP(f3,0.0F,2.0F)); - float f4 = LumaBlue*f3/LumaGreen; int32 D4 = -FIX(CLAMP(f4,0.0F,2.0F)); - int x; - -#undef LumaBlue -#undef LumaGreen -#undef LumaRed - - /* - * i is the actual input pixel value in the range 0..255 - * Cb and Cr values are in the range -128..127 (actually - * they are in a range defined by the ReferenceBlackWhite - * tag) so there is some range shifting to do here when - * constructing tables indexed by the raw pixel data. - */ - for (i = 0, x = -128; i < 256; i++, x++) { - int32 Cr = (int32)CLAMPw(Code2V(x, refBlackWhite[4] - 128.0F, - refBlackWhite[5] - 128.0F, 127), - -128.0F * 32, 128.0F * 32); - int32 Cb = (int32)CLAMPw(Code2V(x, refBlackWhite[2] - 128.0F, - refBlackWhite[3] - 128.0F, 127), - -128.0F * 32, 128.0F * 32); - - ycbcr->Cr_r_tab[i] = (int32)((D1*Cr + ONE_HALF)>>SHIFT); - ycbcr->Cb_b_tab[i] = (int32)((D3*Cb + ONE_HALF)>>SHIFT); - ycbcr->Cr_g_tab[i] = D2*Cr; - ycbcr->Cb_g_tab[i] = D4*Cb + ONE_HALF; - ycbcr->Y_tab[i] = - (int32)CLAMPw(Code2V(x + 128, refBlackWhite[0], refBlackWhite[1], 255), - -128.0F * 32, 128.0F * 32); - } - } - - return 0; -} -#undef HICLAMP -#undef CLAMP -#undef Code2V -#undef SHIFT -#undef ONE_HALF -#undef FIX - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_compress.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_compress.c deleted file mode 100644 index fbdd107..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_compress.c +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Compression Scheme Configuration Support. - */ -#include "tiffiop.h" - -static int -TIFFNoEncode(TIFF* tif, const char* method) -{ - const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression); - - if (c) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "%s %s encoding is not implemented", - c->name, method); - } else { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Compression scheme %u %s encoding is not implemented", - tif->tif_dir.td_compression, method); - } - return (-1); -} - -int -_TIFFNoRowEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) -{ - (void) pp; (void) cc; (void) s; - return (TIFFNoEncode(tif, "scanline")); -} - -int -_TIFFNoStripEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) -{ - (void) pp; (void) cc; (void) s; - return (TIFFNoEncode(tif, "strip")); -} - -int -_TIFFNoTileEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) -{ - (void) pp; (void) cc; (void) s; - return (TIFFNoEncode(tif, "tile")); -} - -static int -TIFFNoDecode(TIFF* tif, const char* method) -{ - const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression); - - if (c) - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "%s %s decoding is not implemented", - c->name, method); - else - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Compression scheme %u %s decoding is not implemented", - tif->tif_dir.td_compression, method); - return (0); -} - -static int -_TIFFNoFixupTags(TIFF* tif) -{ - (void) tif; - return (1); -} - -int -_TIFFNoRowDecode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) -{ - (void) pp; (void) cc; (void) s; - return (TIFFNoDecode(tif, "scanline")); -} - -int -_TIFFNoStripDecode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) -{ - (void) pp; (void) cc; (void) s; - return (TIFFNoDecode(tif, "strip")); -} - -int -_TIFFNoTileDecode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) -{ - (void) pp; (void) cc; (void) s; - return (TIFFNoDecode(tif, "tile")); -} - -int -_TIFFNoSeek(TIFF* tif, uint32 off) -{ - (void) off; - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Compression algorithm does not support random access"); - return (0); -} - -int -_TIFFNoPreCode(TIFF* tif, uint16 s) -{ - (void) tif; (void) s; - return (1); -} - -static int _TIFFtrue(TIFF* tif) { (void) tif; return (1); } -static void _TIFFvoid(TIFF* tif) { (void) tif; } - -void -_TIFFSetDefaultCompressionState(TIFF* tif) -{ - tif->tif_fixuptags = _TIFFNoFixupTags; - tif->tif_decodestatus = TRUE; - tif->tif_setupdecode = _TIFFtrue; - tif->tif_predecode = _TIFFNoPreCode; - tif->tif_decoderow = _TIFFNoRowDecode; - tif->tif_decodestrip = _TIFFNoStripDecode; - tif->tif_decodetile = _TIFFNoTileDecode; - tif->tif_encodestatus = TRUE; - tif->tif_setupencode = _TIFFtrue; - tif->tif_preencode = _TIFFNoPreCode; - tif->tif_postencode = _TIFFtrue; - tif->tif_encoderow = _TIFFNoRowEncode; - tif->tif_encodestrip = _TIFFNoStripEncode; - tif->tif_encodetile = _TIFFNoTileEncode; - tif->tif_close = _TIFFvoid; - tif->tif_seek = _TIFFNoSeek; - tif->tif_cleanup = _TIFFvoid; - tif->tif_defstripsize = _TIFFDefaultStripSize; - tif->tif_deftilesize = _TIFFDefaultTileSize; - tif->tif_flags &= ~(TIFF_NOBITREV|TIFF_NOREADRAW); -} - -int -TIFFSetCompressionScheme(TIFF* tif, int scheme) -{ - const TIFFCodec *c = TIFFFindCODEC((uint16) scheme); - - _TIFFSetDefaultCompressionState(tif); - /* - * Don't treat an unknown compression scheme as an error. - * This permits applications to open files with data that - * the library does not have builtin support for, but which - * may still be meaningful. - */ - return (c ? (*c->init)(tif, scheme) : 1); -} - -/* - * Other compression schemes may be registered. Registered - * schemes can also override the builtin versions provided - * by this library. - */ -typedef struct _codec { - struct _codec* next; - TIFFCodec* info; -} codec_t; -static codec_t* registeredCODECS = NULL; - -const TIFFCodec* -TIFFFindCODEC(uint16 scheme) -{ - const TIFFCodec* c; - codec_t* cd; - - for (cd = registeredCODECS; cd; cd = cd->next) - if (cd->info->scheme == scheme) - return ((const TIFFCodec*) cd->info); - for (c = _TIFFBuiltinCODECS; c->name; c++) - if (c->scheme == scheme) - return (c); - return ((const TIFFCodec*) 0); -} - -TIFFCodec* -TIFFRegisterCODEC(uint16 scheme, const char* name, TIFFInitMethod init) -{ - codec_t* cd = (codec_t*) - _TIFFmalloc((tmsize_t)(sizeof (codec_t) + sizeof (TIFFCodec) + strlen(name)+1)); - - if (cd != NULL) { - cd->info = (TIFFCodec*) ((uint8*) cd + sizeof (codec_t)); - cd->info->name = (char*) - ((uint8*) cd->info + sizeof (TIFFCodec)); - strcpy(cd->info->name, name); - cd->info->scheme = scheme; - cd->info->init = init; - cd->next = registeredCODECS; - registeredCODECS = cd; - } else { - TIFFErrorExt(0, "TIFFRegisterCODEC", - "No space to register compression scheme %s", name); - return NULL; - } - return (cd->info); -} - -void -TIFFUnRegisterCODEC(TIFFCodec* c) -{ - codec_t* cd; - codec_t** pcd; - - for (pcd = ®isteredCODECS; (cd = *pcd) != NULL; pcd = &cd->next) - if (cd->info == c) { - *pcd = cd->next; - _TIFFfree(cd); - return; - } - TIFFErrorExt(0, "TIFFUnRegisterCODEC", - "Cannot remove compression scheme %s; not registered", c->name); -} - -/************************************************************************/ -/* TIFFGetConfisuredCODECs() */ -/************************************************************************/ - -/** - * Get list of configured codecs, both built-in and registered by user. - * Caller is responsible to free this structure. - * - * @return returns array of TIFFCodec records (the last record should be NULL) - * or NULL if function failed. - */ - -TIFFCodec* -TIFFGetConfiguredCODECs() -{ - int i = 1; - codec_t *cd; - const TIFFCodec* c; - TIFFCodec* codecs = NULL; - TIFFCodec* new_codecs; - - for (cd = registeredCODECS; cd; cd = cd->next) { - new_codecs = (TIFFCodec *) - _TIFFrealloc(codecs, i * sizeof(TIFFCodec)); - if (!new_codecs) { - _TIFFfree (codecs); - return NULL; - } - codecs = new_codecs; - _TIFFmemcpy(codecs + i - 1, cd, sizeof(TIFFCodec)); - i++; - } - for (c = _TIFFBuiltinCODECS; c->name; c++) { - if (TIFFIsCODECConfigured(c->scheme)) { - new_codecs = (TIFFCodec *) - _TIFFrealloc(codecs, i * sizeof(TIFFCodec)); - if (!new_codecs) { - _TIFFfree (codecs); - return NULL; - } - codecs = new_codecs; - _TIFFmemcpy(codecs + i - 1, (const void*)c, sizeof(TIFFCodec)); - i++; - } - } - - new_codecs = (TIFFCodec *) _TIFFrealloc(codecs, i * sizeof(TIFFCodec)); - if (!new_codecs) { - _TIFFfree (codecs); - return NULL; - } - codecs = new_codecs; - _TIFFmemset(codecs + i - 1, 0, sizeof(TIFFCodec)); - - return codecs; -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h b/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h deleted file mode 100644 index 8969f09..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef TIF_CONFIG_H -#define TIF_CONFIG_H - -/* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define as 0 or 1 according to the floating point format suported by the - machine */ -#define HAVE_IEEEFP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_IO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the `setmode' function. */ -#define HAVE_SETMODE 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Signed 32-bit type formatter */ -#define TIFF_INT32_FORMAT "%d" - -/* Unsigned 32-bit type formatter */ -#define TIFF_UINT32_FORMAT "%u" - -/* Signed 64-bit type formatter */ -#define TIFF_INT64_FORMAT "%ld" - -/* Unsigned 64-bit type formatter */ -#define TIFF_UINT64_FORMAT "%lu" - -/* Pointer difference type formatter */ -#define TIFF_PTRDIFF_FORMAT "%ld" - -/* Signed size type formatter */ -#define TIFF_SSIZE_FORMAT "%ld" - -/* ------------------------------------------------------------------------ -Byte order ------------------------------------------------------------------------ -*/ - -/* -Define WORDS_BIGENDIAN to 1 if your processor stores words with the most -significant byte first (like Motorola and SPARC, unlike Intel). -Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined -If your big endian system isn't being detected, add an OS specific check -*/ -#if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || \ - (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || \ - defined(__BIG_ENDIAN__) -/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ -#define HOST_FILLORDER FILLORDER_MSB2LSB -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel) */ -#define WORDS_BIGENDIAN 1 -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel) */ -#define HOST_BIGENDIAN 1 -#else -/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ -#define HOST_FILLORDER FILLORDER_LSB2MSB -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel) */ -#undef WORDS_BIGENDIAN -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel) */ -#undef HOST_BIGENDIAN -#endif // BYTE_ORDER - -#ifdef _WIN32 -/* Visual Studio 2015 / VC 14 / MSVC 19.00 finally has snprintf() */ -#if defined(_MSC_VER) && (_MSC_VER < 1900) -#define snprintf _snprintf -#endif // _MSC_VER -#define lfind _lfind -#endif // _WIN32 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -# ifndef inline -# define inline __inline -# endif -#endif - - -#endif // TIF_CONFIG_H diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h-vms b/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h-vms deleted file mode 100644 index c2cae57..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h-vms +++ /dev/null @@ -1,46 +0,0 @@ -/* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define as 0 or 1 according to the floating point format suported by the - machine */ -#define HAVE_IEEEFP 1 - -#define HAVE_UNISTD_H 1 - -#define HAVE_STRING_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_IO_H 1 - -/* Define to 1 if you have the header file. */ -//#define HAVE_SEARCH_H 1 - -/* The size of a `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of a `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - -/* Set the native cpu bit order */ -#define HOST_FILLORDER FILLORDER_LSB2MSB - -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -/* -#ifndef __cplusplus -# ifndef inline -# define inline __inline -# endif -#endif -*/ - -// #define lfind _lfind diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h.cmake.in b/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h.cmake.in deleted file mode 100644 index c2598b3..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h.cmake.in +++ /dev/null @@ -1,228 +0,0 @@ -/* libtiff/tif_config.h.cmake.in. Not generated, but originated from autoheader. */ -/* This file must be kept up-to-date with needed substitutions from libtiff/tif_config.h.in. */ - -/* Support CCITT Group 3 & 4 algorithms */ -#cmakedefine CCITT_SUPPORT 1 - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#cmakedefine CHECK_JPEG_YCBCR_SUBSAMPLING 1 - -/* enable partial strip reading for large strips (experimental) */ -#cmakedefine CHUNKY_STRIP_READ_SUPPORT 1 - -/* Support C++ stream API (requires C++ compiler) */ -#cmakedefine CXX_SUPPORT 1 - -/* enable deferred strip/tile offset/size loading (experimental) */ -#cmakedefine DEFER_STRILE_LOAD 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ASSERT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_DLFCN_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `getopt' function. */ -#cmakedefine HAVE_GETOPT 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GLUT_GLUT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GL_GLUT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GL_GLU_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GL_GL_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_IO_H 1 - -/* Define to 1 if you have the `jbg_newlen' function. */ -#cmakedefine HAVE_JBG_NEWLEN 1 - -/* Define to 1 if you have the `lfind' function. */ -#cmakedefine HAVE_LFIND 1 - -/* Define to 1 if you have the `mmap' function. */ -#cmakedefine HAVE_MMAP 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENGL_GLU_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENGL_GL_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setmode' function. */ -#cmakedefine HAVE_SETMODE 1 - -/* Define to 1 if you have the `snprintf' function. */ -#cmakedefine HAVE_SNPRINTF 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDINT_H 1 - -/* Define to 1 if you have the `strcasecmp' function. */ -#cmakedefine HAVE_STRCASECMP 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtol' function. */ -#cmakedefine HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoll' function. */ -#cmakedefine HAVE_STRTOLL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#cmakedefine HAVE_STRTOUL 1 - -/* Define to 1 if you have the `strtoull' function. */ -#cmakedefine HAVE_STRTOULL 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H 1 - -/* 8/12 bit libjpeg dual mode enabled */ -#cmakedefine JPEG_DUAL_MODE_8_12 1 - -/* 12bit libjpeg primary include file with path */ -#define LIBJPEG_12_PATH @LIBJPEG_12_PATH@ - -/* Support LZMA2 compression */ -#cmakedefine LZMA_SUPPORT 1 - -/* Support ZSTD compression */ -#cmakedefine ZSTD_SUPPORT 1 - -/* Name of package */ -#define PACKAGE "@PACKAGE_NAME@" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "@PACKAGE_NAME@" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "@PACKAGE_STRING@" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "@PACKAGE_TARNAME@" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "@PACKAGE_URL@" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "@PACKAGE_VERSION@" - -/* The size of `signed int', as computed by sizeof. */ -#define SIZEOF_SIGNED_INT @SIZEOF_SIGNED_INT@ - -/* The size of `signed long', as computed by sizeof. */ -#define SIZEOF_SIGNED_LONG @SIZEOF_SIGNED_LONG@ - -/* The size of `signed long long', as computed by sizeof. */ -#define SIZEOF_SIGNED_LONG_LONG @SIZEOF_SIGNED_LONG_LONG@ - -/* The size of `unsigned char *', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_CHAR_P @SIZEOF_UNSIGNED_CHAR_P@ - -/* The size of `unsigned int', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_INT @SIZEOF_UNSIGNED_INT@ - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG @SIZEOF_UNSIGNED_LONG@ - -/* The size of `unsigned long long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG_LONG @SIZEOF_UNSIGNED_LONG_LONG@ - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT @SIZEOF_UNSIGNED_SHORT@ - -/* Default size of the strip in bytes (when strip chopping enabled) */ -#define STRIP_SIZE_DEFAULT @STRIP_SIZE_DEFAULT@ - -/* Signed 32-bit type formatter */ -#define TIFF_INT32_FORMAT "@TIFF_INT32_FORMAT@" - -/* Signed 64-bit type formatter */ -#define TIFF_INT64_FORMAT "@TIFF_INT64_FORMAT@" - -/* Pointer difference type formatter */ -#define TIFF_PTRDIFF_FORMAT "@TIFF_PTRDIFF_FORMAT@" - -/* Unsigned size type formatter */ -#define TIFF_SIZE_FORMAT "@TIFF_SIZE_FORMAT@" - -/* Signed size type formatter */ -#define TIFF_SSIZE_FORMAT "@TIFF_SSIZE_FORMAT@" - -/* Unsigned 32-bit type formatter */ -#define TIFF_UINT32_FORMAT "@TIFF_UINT32_FORMAT@" - -/* Unsigned 64-bit type formatter */ -#define TIFF_UINT64_FORMAT "@TIFF_UINT64_FORMAT@" - -/* Unsigned 8-bit type */ -#define TIFF_UINT8_T @TIFF_UINT8_T@ - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define to 1 if your declares `struct tm'. */ -#cmakedefine TM_IN_SYS_TIME 1 - -/* define to use win32 IO system */ -#cmakedefine USE_WIN32_FILEIO 1 - -/* Version number of package */ -#define VERSION "@PACKAGE_VERSION@" - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#define _FILE_OFFSET_BITS @FILE_OFFSET_BITS@ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline @INLINE_KEYWORD@ -#endif - -/* Define to `long int' if does not define. */ -#undef off_t - -/* Define to `unsigned int' if does not define. */ -#undef size_t diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h.in b/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h.in deleted file mode 100644 index 0deace8..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.h.in +++ /dev/null @@ -1,362 +0,0 @@ -/* libtiff/tif_config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - -/* Support CCITT Group 3 & 4 algorithms */ -#undef CCITT_SUPPORT - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#undef CHECK_JPEG_YCBCR_SUBSAMPLING - -/* enable partial strip reading for large strips (experimental) */ -#undef CHUNKY_STRIP_READ_SUPPORT - -/* Support C++ stream API (requires C++ compiler) */ -#undef CXX_SUPPORT - -/* Treat extra sample as alpha (default enabled). The RGBA interface will - treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many - packages produce RGBA files but don't mark the alpha properly. */ -#undef DEFAULT_EXTRASAMPLE_AS_ALPHA - -/* enable deferred strip/tile offset/size loading (experimental) */ -#undef DEFER_STRILE_LOAD - -/* Define to 1 if you have the header file. */ -#undef HAVE_ASSERT_H - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#undef HAVE_DECL_OPTARG - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#undef HAVE_FSEEKO - -/* Define to 1 if you have the `getopt' function. */ -#undef HAVE_GETOPT - -/* Define to 1 if you have the header file. */ -#undef HAVE_GLUT_GLUT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GLUT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GLU_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GL_H - -/* Define as 0 or 1 according to the floating point format suported by the - machine */ -#undef HAVE_IEEEFP - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_IO_H - -/* Define to 1 if you have the `jbg_newlen' function. */ -#undef HAVE_JBG_NEWLEN - -/* Define to 1 if you have the `lfind' function. */ -#undef HAVE_LFIND - -/* Define to 1 if you have the `mmap' function. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENGL_GLU_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENGL_GL_H - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Define to 1 if you have the header file. */ -#undef HAVE_SEARCH_H - -/* Define to 1 if you have the `setmode' function. */ -#undef HAVE_SETMODE - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - -/* 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 `strtol' function. */ -#undef HAVE_STRTOL - -/* Define to 1 if you have the `strtoll' function. */ -#undef HAVE_STRTOLL - -/* Define to 1 if you have the `strtoul' function. */ -#undef HAVE_STRTOUL - -/* Define to 1 if you have the `strtoull' function. */ -#undef HAVE_STRTOULL - -/* 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 - -/* Use nonstandard varargs form for the GLU tesselator callback */ -#undef HAVE_VARARGS_GLU_TESSCB - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINDOWS_H - -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian - (Intel) */ -#undef HOST_BIGENDIAN - -/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ -#undef HOST_FILLORDER - -/* Support ISO JBIG compression (requires JBIG-KIT library) */ -#undef JBIG_SUPPORT - -/* 8/12 bit libjpeg dual mode enabled */ -#undef JPEG_DUAL_MODE_8_12 - -/* Support JPEG compression (requires IJG JPEG library) */ -#undef JPEG_SUPPORT - -/* 12bit libjpeg primary include file with path */ -#undef LIBJPEG_12_PATH - -/* Support LogLuv high dynamic range encoding */ -#undef LOGLUV_SUPPORT - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#undef LT_OBJDIR - -/* Support LZMA2 compression */ -#undef LZMA_SUPPORT - -/* Support LZW algorithm */ -#undef LZW_SUPPORT - -/* Support Microsoft Document Imaging format */ -#undef MDI_SUPPORT - -/* Support NeXT 2-bit RLE algorithm */ -#undef NEXT_SUPPORT - -/* Support Old JPEG compresson (read-only) */ -#undef OJPEG_SUPPORT - -/* 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 - -/* Support Macintosh PackBits algorithm */ -#undef PACKBITS_SUPPORT - -/* Support Pixar log-format algorithm (requires Zlib) */ -#undef PIXARLOG_SUPPORT - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* The size of `signed int', as computed by sizeof. */ -#undef SIZEOF_SIGNED_INT - -/* The size of `signed long', as computed by sizeof. */ -#undef SIZEOF_SIGNED_LONG - -/* The size of `signed long long', as computed by sizeof. */ -#undef SIZEOF_SIGNED_LONG_LONG - -/* The size of `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* The size of `unsigned char *', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_CHAR_P - -/* The size of `unsigned int', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_INT - -/* The size of `unsigned long', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_LONG - -/* The size of `unsigned long long', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_LONG_LONG - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Support strip chopping (whether or not to convert single-strip uncompressed - images to mutiple strips of specified size to reduce memory usage) */ -#undef STRIPCHOP_DEFAULT - -/* Default size of the strip in bytes (when strip chopping enabled) */ -#undef STRIP_SIZE_DEFAULT - -/* Enable SubIFD tag (330) support */ -#undef SUBIFD_SUPPORT - -/* Support ThunderScan 4-bit RLE algorithm */ -#undef THUNDER_SUPPORT - -/* Signed 16-bit type */ -#undef TIFF_INT16_T - -/* Signed 32-bit type formatter */ -#undef TIFF_INT32_FORMAT - -/* Signed 32-bit type */ -#undef TIFF_INT32_T - -/* Signed 64-bit type formatter */ -#undef TIFF_INT64_FORMAT - -/* Signed 64-bit type */ -#undef TIFF_INT64_T - -/* Signed 8-bit type */ -#undef TIFF_INT8_T - -/* Pointer difference type formatter */ -#undef TIFF_PTRDIFF_FORMAT - -/* Pointer difference type */ -#undef TIFF_PTRDIFF_T - -/* Size type formatter */ -#undef TIFF_SIZE_FORMAT - -/* Unsigned size type */ -#undef TIFF_SIZE_T - -/* Signed size type formatter */ -#undef TIFF_SSIZE_FORMAT - -/* Signed size type */ -#undef TIFF_SSIZE_T - -/* Unsigned 16-bit type */ -#undef TIFF_UINT16_T - -/* Unsigned 32-bit type formatter */ -#undef TIFF_UINT32_FORMAT - -/* Unsigned 32-bit type */ -#undef TIFF_UINT32_T - -/* Unsigned 64-bit type formatter */ -#undef TIFF_UINT64_FORMAT - -/* Unsigned 64-bit type */ -#undef TIFF_UINT64_T - -/* Unsigned 8-bit type */ -#undef TIFF_UINT8_T - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define to 1 if your declares `struct tm'. */ -#undef TM_IN_SYS_TIME - -/* define to use win32 IO system */ -#undef USE_WIN32_FILEIO - -/* Version number of package */ -#undef VERSION - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - -/* Define to 1 if the X Window System is missing or not being used. */ -#undef X_DISPLAY_MISSING - -/* Support Deflate compression */ -#undef ZIP_SUPPORT - -/* Support zstd compression */ -#undef ZSTD_SUPPORT - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -#undef _LARGEFILE_SOURCE - -/* Define for large files, on AIX-style hosts. */ -#undef _LARGE_FILES - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define to `long int' if does not define. */ -#undef off_t - -/* Define to `unsigned int' if does not define. */ -#undef size_t diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.vc.h b/Dependencies/FreeImage/Source/LibTIFF4/tif_config.vc.h deleted file mode 100644 index f1c09dd..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.vc.h +++ /dev/null @@ -1,137 +0,0 @@ -#ifndef _TIF_CONFIG_H_ -#define _TIF_CONFIG_H_ - -/* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define as 0 or 1 according to the floating point format suported by the - machine */ -#define HAVE_IEEEFP 1 - -/* Define to 1 if you have the `jbg_newlen' function. */ -#define HAVE_JBG_NEWLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_IO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setmode' function. */ -#define HAVE_SETMODE 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. */ -#define HAVE_DECL_OPTARG 0 - -/* The size of a `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of a `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - -/* Signed 64-bit type formatter */ -#define TIFF_INT64_FORMAT "%I64d" - -/* Signed 64-bit type */ -#define TIFF_INT64_T signed __int64 - -/* Unsigned 64-bit type formatter */ -#define TIFF_UINT64_FORMAT "%I64u" - -/* Unsigned 64-bit type */ -#define TIFF_UINT64_T unsigned __int64 - -#if _WIN64 -/* - Windows 64-bit build -*/ - -/* Pointer difference type */ -# define TIFF_PTRDIFF_T TIFF_INT64_T - -/* The size of `size_t', as computed by sizeof. */ -# define SIZEOF_SIZE_T 8 - -/* Size type formatter */ -# define TIFF_SIZE_FORMAT TIFF_INT64_FORMAT - -/* Unsigned size type */ -# define TIFF_SIZE_T TIFF_UINT64_T - -/* Signed size type formatter */ -# define TIFF_SSIZE_FORMAT TIFF_INT64_FORMAT - -/* Signed size type */ -# define TIFF_SSIZE_T TIFF_INT64_T - -#else -/* - Windows 32-bit build -*/ - -/* Pointer difference type */ -# define TIFF_PTRDIFF_T signed int - -/* The size of `size_t', as computed by sizeof. */ -# define SIZEOF_SIZE_T 4 - -/* Size type formatter */ -# define TIFF_SIZE_FORMAT "%u" - -/* Size type formatter */ -# define TIFF_SIZE_FORMAT "%u" - -/* Unsigned size type */ -# define TIFF_SIZE_T unsigned int - -/* Signed size type formatter */ -# define TIFF_SSIZE_FORMAT "%d" - -/* Signed size type */ -# define TIFF_SSIZE_T signed int - -#endif - -/* Set the native cpu bit order */ -#define HOST_FILLORDER FILLORDER_LSB2MSB - -/* Visual Studio 2015 / VC 14 / MSVC 19.00 finally has snprintf() */ -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define snprintf _snprintf -#else -#define HAVE_SNPRINTF 1 -#endif - -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -# ifndef inline -# define inline __inline -# endif -#endif - -#define lfind _lfind - -#pragma warning(disable : 4996) /* function deprecation warnings */ - -#endif /* _TIF_CONFIG_H_ */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.wince.h b/Dependencies/FreeImage/Source/LibTIFF4/tif_config.wince.h deleted file mode 100644 index 42d2dbc..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_config.wince.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * TIFF library configuration header for Windows CE platform. - */ -#ifndef _WIN32_WCE -# error This version of tif_config.h header is dedicated for Windows CE platform! -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define as 0 or 1 according to the floating point format suported by the - machine */ -#define HAVE_IEEEFP 1 - -/* Define to 1 if you have the `jbg_newlen' function. */ -#define HAVE_JBG_NEWLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#define HAVE_IO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setmode' function. */ -#define HAVE_SETMODE 1 - -/* Define to 1 if you have the `bsearch' function. */ -#define HAVE_BSEARCH 1 -#define bsearch wceex_bsearch - -/* Define to 1 if you have the `lfind' function. */ -#define HAVE_LFIND 1 -#define lfind wceex_lfind - -/* The size of a `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* Set the native cpu bit order */ -#define HOST_FILLORDER FILLORDER_LSB2MSB - -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -# ifndef inline -# define inline __inline -# endif -#endif - - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_dir.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_dir.c deleted file mode 100644 index fc0237a..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_dir.c +++ /dev/null @@ -1,1768 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Directory Tag Get & Set Routines. - * (and also some miscellaneous stuff) - */ -#include "tiffiop.h" -#include - -/* - * These are used in the backwards compatibility code... - */ -#define DATATYPE_VOID 0 /* !untyped data */ -#define DATATYPE_INT 1 /* !signed integer data */ -#define DATATYPE_UINT 2 /* !unsigned integer data */ -#define DATATYPE_IEEEFP 3 /* !IEEE floating point data */ - -static void -setByteArray(void** vpp, void* vp, size_t nmemb, size_t elem_size) -{ - if (*vpp) { - _TIFFfree(*vpp); - *vpp = 0; - } - if (vp) { - tmsize_t bytes = (tmsize_t)(nmemb * elem_size); - if (elem_size && bytes / elem_size == nmemb) - *vpp = (void*) _TIFFmalloc(bytes); - if (*vpp) - _TIFFmemcpy(*vpp, vp, bytes); - } -} -void _TIFFsetByteArray(void** vpp, void* vp, uint32 n) - { setByteArray(vpp, vp, n, 1); } -void _TIFFsetString(char** cpp, char* cp) - { setByteArray((void**) cpp, (void*) cp, strlen(cp)+1, 1); } -static void _TIFFsetNString(char** cpp, char* cp, uint32 n) - { setByteArray((void**) cpp, (void*) cp, n, 1); } -void _TIFFsetShortArray(uint16** wpp, uint16* wp, uint32 n) - { setByteArray((void**) wpp, (void*) wp, n, sizeof (uint16)); } -void _TIFFsetLongArray(uint32** lpp, uint32* lp, uint32 n) - { setByteArray((void**) lpp, (void*) lp, n, sizeof (uint32)); } -static void _TIFFsetLong8Array(uint64** lpp, uint64* lp, uint32 n) - { setByteArray((void**) lpp, (void*) lp, n, sizeof (uint64)); } -void _TIFFsetFloatArray(float** fpp, float* fp, uint32 n) - { setByteArray((void**) fpp, (void*) fp, n, sizeof (float)); } -void _TIFFsetDoubleArray(double** dpp, double* dp, uint32 n) - { setByteArray((void**) dpp, (void*) dp, n, sizeof (double)); } - -static void -setDoubleArrayOneValue(double** vpp, double value, size_t nmemb) -{ - if (*vpp) - _TIFFfree(*vpp); - *vpp = _TIFFmalloc(nmemb*sizeof(double)); - if (*vpp) - { - while (nmemb--) - ((double*)*vpp)[nmemb] = value; - } -} - -/* - * Install extra samples information. - */ -static int -setExtraSamples(TIFFDirectory* td, va_list ap, uint32* v) -{ -/* XXX: Unassociated alpha data == 999 is a known Corel Draw bug, see below */ -#define EXTRASAMPLE_COREL_UNASSALPHA 999 - - uint16* va; - uint32 i; - - *v = (uint16) va_arg(ap, uint16_vap); - if ((uint16) *v > td->td_samplesperpixel) - return 0; - va = va_arg(ap, uint16*); - if (*v > 0 && va == NULL) /* typically missing param */ - return 0; - for (i = 0; i < *v; i++) { - if (va[i] > EXTRASAMPLE_UNASSALPHA) { - /* - * XXX: Corel Draw is known to produce incorrect - * ExtraSamples tags which must be patched here if we - * want to be able to open some of the damaged TIFF - * files: - */ - if (va[i] == EXTRASAMPLE_COREL_UNASSALPHA) - va[i] = EXTRASAMPLE_UNASSALPHA; - else - return 0; - } - } - td->td_extrasamples = (uint16) *v; - _TIFFsetShortArray(&td->td_sampleinfo, va, td->td_extrasamples); - return 1; - -#undef EXTRASAMPLE_COREL_UNASSALPHA -} - -/* - * Confirm we have "samplesperpixel" ink names separated by \0. Returns - * zero if the ink names are not as expected. - */ -static uint32 -checkInkNamesString(TIFF* tif, uint32 slen, const char* s) -{ - TIFFDirectory* td = &tif->tif_dir; - uint16 i = td->td_samplesperpixel; - - if (slen > 0) { - const char* ep = s+slen; - const char* cp = s; - for (; i > 0; i--) { - for (; cp < ep && *cp != '\0'; cp++) {} - if (cp >= ep) - goto bad; - cp++; /* skip \0 */ - } - return ((uint32)(cp-s)); - } -bad: - TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", - "%s: Invalid InkNames value; expecting %d names, found %d", - tif->tif_name, - td->td_samplesperpixel, - td->td_samplesperpixel-i); - return (0); -} - -static float TIFFClampDoubleToFloat( double val ) -{ - if( val > FLT_MAX ) - return FLT_MAX; - if( val < -FLT_MAX ) - return -FLT_MAX; - return (float)val; -} - -static int -_TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) -{ - static const char module[] = "_TIFFVSetField"; - - TIFFDirectory* td = &tif->tif_dir; - int status = 1; - uint32 v32, i, v; - double dblval; - char* s; - const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY); - uint32 standard_tag = tag; - if( fip == NULL ) /* cannot happen since OkToChangeTag() already checks it */ - return 0; - /* - * We want to force the custom code to be used for custom - * fields even if the tag happens to match a well known - * one - important for reinterpreted handling of standard - * tag values in custom directories (i.e. EXIF) - */ - if (fip->field_bit == FIELD_CUSTOM) { - standard_tag = 0; - } - - switch (standard_tag) { - case TIFFTAG_SUBFILETYPE: - td->td_subfiletype = (uint32) va_arg(ap, uint32); - break; - case TIFFTAG_IMAGEWIDTH: - td->td_imagewidth = (uint32) va_arg(ap, uint32); - break; - case TIFFTAG_IMAGELENGTH: - td->td_imagelength = (uint32) va_arg(ap, uint32); - break; - case TIFFTAG_BITSPERSAMPLE: - td->td_bitspersample = (uint16) va_arg(ap, uint16_vap); - /* - * If the data require post-decoding processing to byte-swap - * samples, set it up here. Note that since tags are required - * to be ordered, compression code can override this behaviour - * in the setup method if it wants to roll the post decoding - * work in with its normal work. - */ - if (tif->tif_flags & TIFF_SWAB) { - if (td->td_bitspersample == 8) - tif->tif_postdecode = _TIFFNoPostDecode; - else if (td->td_bitspersample == 16) - tif->tif_postdecode = _TIFFSwab16BitData; - else if (td->td_bitspersample == 24) - tif->tif_postdecode = _TIFFSwab24BitData; - else if (td->td_bitspersample == 32) - tif->tif_postdecode = _TIFFSwab32BitData; - else if (td->td_bitspersample == 64) - tif->tif_postdecode = _TIFFSwab64BitData; - else if (td->td_bitspersample == 128) /* two 64's */ - tif->tif_postdecode = _TIFFSwab64BitData; - } - break; - case TIFFTAG_COMPRESSION: - v = (uint16) va_arg(ap, uint16_vap); - /* - * If we're changing the compression scheme, the notify the - * previous module so that it can cleanup any state it's - * setup. - */ - if (TIFFFieldSet(tif, FIELD_COMPRESSION)) { - if ((uint32)td->td_compression == v) - break; - (*tif->tif_cleanup)(tif); - tif->tif_flags &= ~TIFF_CODERSETUP; - } - /* - * Setup new compression routine state. - */ - if( (status = TIFFSetCompressionScheme(tif, v)) != 0 ) - td->td_compression = (uint16) v; - else - status = 0; - break; - case TIFFTAG_PHOTOMETRIC: - td->td_photometric = (uint16) va_arg(ap, uint16_vap); - break; - case TIFFTAG_THRESHHOLDING: - td->td_threshholding = (uint16) va_arg(ap, uint16_vap); - break; - case TIFFTAG_FILLORDER: - v = (uint16) va_arg(ap, uint16_vap); - if (v != FILLORDER_LSB2MSB && v != FILLORDER_MSB2LSB) - goto badvalue; - td->td_fillorder = (uint16) v; - break; - case TIFFTAG_ORIENTATION: - v = (uint16) va_arg(ap, uint16_vap); - if (v < ORIENTATION_TOPLEFT || ORIENTATION_LEFTBOT < v) - goto badvalue; - else - td->td_orientation = (uint16) v; - break; - case TIFFTAG_SAMPLESPERPIXEL: - v = (uint16) va_arg(ap, uint16_vap); - if (v == 0) - goto badvalue; - if( v != td->td_samplesperpixel ) - { - /* See http://bugzilla.maptools.org/show_bug.cgi?id=2500 */ - if( td->td_sminsamplevalue != NULL ) - { - TIFFWarningExt(tif->tif_clientdata,module, - "SamplesPerPixel tag value is changing, " - "but SMinSampleValue tag was read with a different value. Cancelling it"); - TIFFClrFieldBit(tif,FIELD_SMINSAMPLEVALUE); - _TIFFfree(td->td_sminsamplevalue); - td->td_sminsamplevalue = NULL; - } - if( td->td_smaxsamplevalue != NULL ) - { - TIFFWarningExt(tif->tif_clientdata,module, - "SamplesPerPixel tag value is changing, " - "but SMaxSampleValue tag was read with a different value. Cancelling it"); - TIFFClrFieldBit(tif,FIELD_SMAXSAMPLEVALUE); - _TIFFfree(td->td_smaxsamplevalue); - td->td_smaxsamplevalue = NULL; - } - } - td->td_samplesperpixel = (uint16) v; - break; - case TIFFTAG_ROWSPERSTRIP: - v32 = (uint32) va_arg(ap, uint32); - if (v32 == 0) - goto badvalue32; - td->td_rowsperstrip = v32; - if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) { - td->td_tilelength = v32; - td->td_tilewidth = td->td_imagewidth; - } - break; - case TIFFTAG_MINSAMPLEVALUE: - td->td_minsamplevalue = (uint16) va_arg(ap, uint16_vap); - break; - case TIFFTAG_MAXSAMPLEVALUE: - td->td_maxsamplevalue = (uint16) va_arg(ap, uint16_vap); - break; - case TIFFTAG_SMINSAMPLEVALUE: - if (tif->tif_flags & TIFF_PERSAMPLE) - _TIFFsetDoubleArray(&td->td_sminsamplevalue, va_arg(ap, double*), td->td_samplesperpixel); - else - setDoubleArrayOneValue(&td->td_sminsamplevalue, va_arg(ap, double), td->td_samplesperpixel); - break; - case TIFFTAG_SMAXSAMPLEVALUE: - if (tif->tif_flags & TIFF_PERSAMPLE) - _TIFFsetDoubleArray(&td->td_smaxsamplevalue, va_arg(ap, double*), td->td_samplesperpixel); - else - setDoubleArrayOneValue(&td->td_smaxsamplevalue, va_arg(ap, double), td->td_samplesperpixel); - break; - case TIFFTAG_XRESOLUTION: - dblval = va_arg(ap, double); - if( dblval < 0 ) - goto badvaluedouble; - td->td_xresolution = TIFFClampDoubleToFloat( dblval ); - break; - case TIFFTAG_YRESOLUTION: - dblval = va_arg(ap, double); - if( dblval < 0 ) - goto badvaluedouble; - td->td_yresolution = TIFFClampDoubleToFloat( dblval ); - break; - case TIFFTAG_PLANARCONFIG: - v = (uint16) va_arg(ap, uint16_vap); - if (v != PLANARCONFIG_CONTIG && v != PLANARCONFIG_SEPARATE) - goto badvalue; - td->td_planarconfig = (uint16) v; - break; - case TIFFTAG_XPOSITION: - td->td_xposition = TIFFClampDoubleToFloat( va_arg(ap, double) ); - break; - case TIFFTAG_YPOSITION: - td->td_yposition = TIFFClampDoubleToFloat( va_arg(ap, double) ); - break; - case TIFFTAG_RESOLUTIONUNIT: - v = (uint16) va_arg(ap, uint16_vap); - if (v < RESUNIT_NONE || RESUNIT_CENTIMETER < v) - goto badvalue; - td->td_resolutionunit = (uint16) v; - break; - case TIFFTAG_PAGENUMBER: - td->td_pagenumber[0] = (uint16) va_arg(ap, uint16_vap); - td->td_pagenumber[1] = (uint16) va_arg(ap, uint16_vap); - break; - case TIFFTAG_HALFTONEHINTS: - td->td_halftonehints[0] = (uint16) va_arg(ap, uint16_vap); - td->td_halftonehints[1] = (uint16) va_arg(ap, uint16_vap); - break; - case TIFFTAG_COLORMAP: - v32 = (uint32)(1L<td_bitspersample); - _TIFFsetShortArray(&td->td_colormap[0], va_arg(ap, uint16*), v32); - _TIFFsetShortArray(&td->td_colormap[1], va_arg(ap, uint16*), v32); - _TIFFsetShortArray(&td->td_colormap[2], va_arg(ap, uint16*), v32); - break; - case TIFFTAG_EXTRASAMPLES: - if (!setExtraSamples(td, ap, &v)) - goto badvalue; - break; - case TIFFTAG_MATTEING: - td->td_extrasamples = (((uint16) va_arg(ap, uint16_vap)) != 0); - if (td->td_extrasamples) { - uint16 sv = EXTRASAMPLE_ASSOCALPHA; - _TIFFsetShortArray(&td->td_sampleinfo, &sv, 1); - } - break; - case TIFFTAG_TILEWIDTH: - v32 = (uint32) va_arg(ap, uint32); - if (v32 % 16) { - if (tif->tif_mode != O_RDONLY) - goto badvalue32; - TIFFWarningExt(tif->tif_clientdata, tif->tif_name, - "Nonstandard tile width %d, convert file", v32); - } - td->td_tilewidth = v32; - tif->tif_flags |= TIFF_ISTILED; - break; - case TIFFTAG_TILELENGTH: - v32 = (uint32) va_arg(ap, uint32); - if (v32 % 16) { - if (tif->tif_mode != O_RDONLY) - goto badvalue32; - TIFFWarningExt(tif->tif_clientdata, tif->tif_name, - "Nonstandard tile length %d, convert file", v32); - } - td->td_tilelength = v32; - tif->tif_flags |= TIFF_ISTILED; - break; - case TIFFTAG_TILEDEPTH: - v32 = (uint32) va_arg(ap, uint32); - if (v32 == 0) - goto badvalue32; - td->td_tiledepth = v32; - break; - case TIFFTAG_DATATYPE: - v = (uint16) va_arg(ap, uint16_vap); - switch (v) { - case DATATYPE_VOID: v = SAMPLEFORMAT_VOID; break; - case DATATYPE_INT: v = SAMPLEFORMAT_INT; break; - case DATATYPE_UINT: v = SAMPLEFORMAT_UINT; break; - case DATATYPE_IEEEFP: v = SAMPLEFORMAT_IEEEFP;break; - default: goto badvalue; - } - td->td_sampleformat = (uint16) v; - break; - case TIFFTAG_SAMPLEFORMAT: - v = (uint16) va_arg(ap, uint16_vap); - if (v < SAMPLEFORMAT_UINT || SAMPLEFORMAT_COMPLEXIEEEFP < v) - goto badvalue; - td->td_sampleformat = (uint16) v; - - /* Try to fix up the SWAB function for complex data. */ - if( td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT - && td->td_bitspersample == 32 - && tif->tif_postdecode == _TIFFSwab32BitData ) - tif->tif_postdecode = _TIFFSwab16BitData; - else if( (td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT - || td->td_sampleformat == SAMPLEFORMAT_COMPLEXIEEEFP) - && td->td_bitspersample == 64 - && tif->tif_postdecode == _TIFFSwab64BitData ) - tif->tif_postdecode = _TIFFSwab32BitData; - break; - case TIFFTAG_IMAGEDEPTH: - td->td_imagedepth = (uint32) va_arg(ap, uint32); - break; - case TIFFTAG_SUBIFD: - if ((tif->tif_flags & TIFF_INSUBIFD) == 0) { - td->td_nsubifd = (uint16) va_arg(ap, uint16_vap); - _TIFFsetLong8Array(&td->td_subifd, (uint64*) va_arg(ap, uint64*), - (uint32) td->td_nsubifd); - } else { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Sorry, cannot nest SubIFDs", - tif->tif_name); - status = 0; - } - break; - case TIFFTAG_YCBCRPOSITIONING: - td->td_ycbcrpositioning = (uint16) va_arg(ap, uint16_vap); - break; - case TIFFTAG_YCBCRSUBSAMPLING: - td->td_ycbcrsubsampling[0] = (uint16) va_arg(ap, uint16_vap); - td->td_ycbcrsubsampling[1] = (uint16) va_arg(ap, uint16_vap); - break; - case TIFFTAG_TRANSFERFUNCTION: - v = (td->td_samplesperpixel - td->td_extrasamples) > 1 ? 3 : 1; - for (i = 0; i < v; i++) - _TIFFsetShortArray(&td->td_transferfunction[i], - va_arg(ap, uint16*), 1U<td_bitspersample); - break; - case TIFFTAG_REFERENCEBLACKWHITE: - /* XXX should check for null range */ - _TIFFsetFloatArray(&td->td_refblackwhite, va_arg(ap, float*), 6); - break; - case TIFFTAG_INKNAMES: - v = (uint16) va_arg(ap, uint16_vap); - s = va_arg(ap, char*); - v = checkInkNamesString(tif, v, s); - status = v > 0; - if( v > 0 ) { - _TIFFsetNString(&td->td_inknames, s, v); - td->td_inknameslen = v; - } - break; - case TIFFTAG_PERSAMPLE: - v = (uint16) va_arg(ap, uint16_vap); - if( v == PERSAMPLE_MULTI ) - tif->tif_flags |= TIFF_PERSAMPLE; - else - tif->tif_flags &= ~TIFF_PERSAMPLE; - break; - default: { - TIFFTagValue *tv; - int tv_size, iCustom; - - /* - * This can happen if multiple images are open with different - * codecs which have private tags. The global tag information - * table may then have tags that are valid for one file but not - * the other. If the client tries to set a tag that is not valid - * for the image's codec then we'll arrive here. This - * happens, for example, when tiffcp is used to convert between - * compression schemes and codec-specific tags are blindly copied. - */ - if(fip->field_bit != FIELD_CUSTOM) { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Invalid %stag \"%s\" (not supported by codec)", - tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", - fip->field_name); - status = 0; - break; - } - - /* - * Find the existing entry for this custom value. - */ - tv = NULL; - for (iCustom = 0; iCustom < td->td_customValueCount; iCustom++) { - if (td->td_customValues[iCustom].info->field_tag == tag) { - tv = td->td_customValues + iCustom; - if (tv->value != NULL) { - _TIFFfree(tv->value); - tv->value = NULL; - } - break; - } - } - - /* - * Grow the custom list if the entry was not found. - */ - if(tv == NULL) { - TIFFTagValue *new_customValues; - - td->td_customValueCount++; - new_customValues = (TIFFTagValue *) - _TIFFrealloc(td->td_customValues, - sizeof(TIFFTagValue) * td->td_customValueCount); - if (!new_customValues) { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Failed to allocate space for list of custom values", - tif->tif_name); - status = 0; - goto end; - } - - td->td_customValues = new_customValues; - - tv = td->td_customValues + (td->td_customValueCount - 1); - tv->info = fip; - tv->value = NULL; - tv->count = 0; - } - - /* - * Set custom value ... save a copy of the custom tag value. - */ - tv_size = _TIFFDataSize(fip->field_type); - if (tv_size == 0) { - status = 0; - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Bad field type %d for \"%s\"", - tif->tif_name, fip->field_type, - fip->field_name); - goto end; - } - - if (fip->field_type == TIFF_ASCII) - { - uint32 ma; - char* mb; - if (fip->field_passcount) - { - assert(fip->field_writecount==TIFF_VARIABLE2); - ma=(uint32)va_arg(ap,uint32); - mb=(char*)va_arg(ap,char*); - } - else - { - mb=(char*)va_arg(ap,char*); - ma=(uint32)(strlen(mb)+1); - } - tv->count=ma; - setByteArray(&tv->value,mb,ma,1); - } - else - { - if (fip->field_passcount) { - if (fip->field_writecount == TIFF_VARIABLE2) - tv->count = (uint32) va_arg(ap, uint32); - else - tv->count = (int) va_arg(ap, int); - } else if (fip->field_writecount == TIFF_VARIABLE - || fip->field_writecount == TIFF_VARIABLE2) - tv->count = 1; - else if (fip->field_writecount == TIFF_SPP) - tv->count = td->td_samplesperpixel; - else - tv->count = fip->field_writecount; - - if (tv->count == 0) { - status = 0; - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Null count for \"%s\" (type " - "%d, writecount %d, passcount %d)", - tif->tif_name, - fip->field_name, - fip->field_type, - fip->field_writecount, - fip->field_passcount); - goto end; - } - - tv->value = _TIFFCheckMalloc(tif, tv->count, tv_size, - "custom tag binary object"); - if (!tv->value) { - status = 0; - goto end; - } - - if (fip->field_tag == TIFFTAG_DOTRANGE - && strcmp(fip->field_name,"DotRange") == 0) { - /* TODO: This is an evil exception and should not have been - handled this way ... likely best if we move it into - the directory structure with an explicit field in - libtiff 4.1 and assign it a FIELD_ value */ - uint16 v2[2]; - v2[0] = (uint16)va_arg(ap, int); - v2[1] = (uint16)va_arg(ap, int); - _TIFFmemcpy(tv->value, &v2, 4); - } - - else if (fip->field_passcount - || fip->field_writecount == TIFF_VARIABLE - || fip->field_writecount == TIFF_VARIABLE2 - || fip->field_writecount == TIFF_SPP - || tv->count > 1) { - _TIFFmemcpy(tv->value, va_arg(ap, void *), - tv->count * tv_size); - } else { - char *val = (char *)tv->value; - assert( tv->count == 1 ); - - switch (fip->field_type) { - case TIFF_BYTE: - case TIFF_UNDEFINED: - { - uint8 v2 = (uint8)va_arg(ap, int); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_SBYTE: - { - int8 v2 = (int8)va_arg(ap, int); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_SHORT: - { - uint16 v2 = (uint16)va_arg(ap, int); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_SSHORT: - { - int16 v2 = (int16)va_arg(ap, int); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_LONG: - case TIFF_IFD: - { - uint32 v2 = va_arg(ap, uint32); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_SLONG: - { - int32 v2 = va_arg(ap, int32); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_LONG8: - case TIFF_IFD8: - { - uint64 v2 = va_arg(ap, uint64); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_SLONG8: - { - int64 v2 = va_arg(ap, int64); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - { - float v2 = TIFFClampDoubleToFloat(va_arg(ap, double)); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_DOUBLE: - { - double v2 = va_arg(ap, double); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - default: - _TIFFmemset(val, 0, tv_size); - status = 0; - break; - } - } - } - } - } - if (status) { - const TIFFField* fip2=TIFFFieldWithTag(tif,tag); - if (fip2) - TIFFSetFieldBit(tif, fip2->field_bit); - tif->tif_flags |= TIFF_DIRTYDIRECT; - } - -end: - va_end(ap); - return (status); -badvalue: - { - const TIFFField* fip2=TIFFFieldWithTag(tif,tag); - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Bad value %u for \"%s\" tag", - tif->tif_name, v, - fip2 ? fip2->field_name : "Unknown"); - va_end(ap); - } - return (0); -badvalue32: - { - const TIFFField* fip2=TIFFFieldWithTag(tif,tag); - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Bad value %u for \"%s\" tag", - tif->tif_name, v32, - fip2 ? fip2->field_name : "Unknown"); - va_end(ap); - } - return (0); -badvaluedouble: - { - const TIFFField* fip2=TIFFFieldWithTag(tif,tag); - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Bad value %f for \"%s\" tag", - tif->tif_name, dblval, - fip2 ? fip2->field_name : "Unknown"); - va_end(ap); - } - return (0); -} - -/* - * Return 1/0 according to whether or not - * it is permissible to set the tag's value. - * Note that we allow ImageLength to be changed - * so that we can append and extend to images. - * Any other tag may not be altered once writing - * has commenced, unless its value has no effect - * on the format of the data that is written. - */ -static int -OkToChangeTag(TIFF* tif, uint32 tag) -{ - const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY); - if (!fip) { /* unknown tag */ - TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", "%s: Unknown %stag %u", - tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", tag); - return (0); - } - if (tag != TIFFTAG_IMAGELENGTH && (tif->tif_flags & TIFF_BEENWRITING) && - !fip->field_oktochange) { - /* - * Consult info table to see if tag can be changed - * after we've started writing. We only allow changes - * to those tags that don't/shouldn't affect the - * compression and/or format of the data. - */ - TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", - "%s: Cannot modify tag \"%s\" while writing", - tif->tif_name, fip->field_name); - return (0); - } - return (1); -} - -/* - * Record the value of a field in the - * internal directory structure. The - * field will be written to the file - * when/if the directory structure is - * updated. - */ -int -TIFFSetField(TIFF* tif, uint32 tag, ...) -{ - va_list ap; - int status; - - va_start(ap, tag); - status = TIFFVSetField(tif, tag, ap); - va_end(ap); - return (status); -} - -/* - * Clear the contents of the field in the internal structure. - */ -int -TIFFUnsetField(TIFF* tif, uint32 tag) -{ - const TIFFField *fip = TIFFFieldWithTag(tif, tag); - TIFFDirectory* td = &tif->tif_dir; - - if( !fip ) - return 0; - - if( fip->field_bit != FIELD_CUSTOM ) - TIFFClrFieldBit(tif, fip->field_bit); - else - { - TIFFTagValue *tv = NULL; - int i; - - for (i = 0; i < td->td_customValueCount; i++) { - - tv = td->td_customValues + i; - if( tv->info->field_tag == tag ) - break; - } - - if( i < td->td_customValueCount ) - { - _TIFFfree(tv->value); - for( ; i < td->td_customValueCount-1; i++) { - td->td_customValues[i] = td->td_customValues[i+1]; - } - td->td_customValueCount--; - } - } - - tif->tif_flags |= TIFF_DIRTYDIRECT; - - return (1); -} - -/* - * Like TIFFSetField, but taking a varargs - * parameter list. This routine is useful - * for building higher-level interfaces on - * top of the library. - */ -int -TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) -{ - return OkToChangeTag(tif, tag) ? - (*tif->tif_tagmethods.vsetfield)(tif, tag, ap) : 0; -} - -static int -_TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) -{ - TIFFDirectory* td = &tif->tif_dir; - int ret_val = 1; - uint32 standard_tag = tag; - const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY); - if( fip == NULL ) /* cannot happen since TIFFGetField() already checks it */ - return 0; - - /* - * We want to force the custom code to be used for custom - * fields even if the tag happens to match a well known - * one - important for reinterpreted handling of standard - * tag values in custom directories (i.e. EXIF) - */ - if (fip->field_bit == FIELD_CUSTOM) { - standard_tag = 0; - } - - if( standard_tag == TIFFTAG_NUMBEROFINKS ) - { - int i; - for (i = 0; i < td->td_customValueCount; i++) { - uint16 val; - TIFFTagValue *tv = td->td_customValues + i; - if (tv->info->field_tag != standard_tag) - continue; - if( tv->value == NULL ) - return 0; - val = *(uint16 *)tv->value; - /* Truncate to SamplesPerPixel, since the */ - /* setting code for INKNAMES assume that there are SamplesPerPixel */ - /* inknames. */ - /* Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2599 */ - if( val > td->td_samplesperpixel ) - { - TIFFWarningExt(tif->tif_clientdata,"_TIFFVGetField", - "Truncating NumberOfInks from %u to %u", - val, td->td_samplesperpixel); - val = td->td_samplesperpixel; - } - *va_arg(ap, uint16*) = val; - return 1; - } - return 0; - } - - switch (standard_tag) { - case TIFFTAG_SUBFILETYPE: - *va_arg(ap, uint32*) = td->td_subfiletype; - break; - case TIFFTAG_IMAGEWIDTH: - *va_arg(ap, uint32*) = td->td_imagewidth; - break; - case TIFFTAG_IMAGELENGTH: - *va_arg(ap, uint32*) = td->td_imagelength; - break; - case TIFFTAG_BITSPERSAMPLE: - *va_arg(ap, uint16*) = td->td_bitspersample; - break; - case TIFFTAG_COMPRESSION: - *va_arg(ap, uint16*) = td->td_compression; - break; - case TIFFTAG_PHOTOMETRIC: - *va_arg(ap, uint16*) = td->td_photometric; - break; - case TIFFTAG_THRESHHOLDING: - *va_arg(ap, uint16*) = td->td_threshholding; - break; - case TIFFTAG_FILLORDER: - *va_arg(ap, uint16*) = td->td_fillorder; - break; - case TIFFTAG_ORIENTATION: - *va_arg(ap, uint16*) = td->td_orientation; - break; - case TIFFTAG_SAMPLESPERPIXEL: - *va_arg(ap, uint16*) = td->td_samplesperpixel; - break; - case TIFFTAG_ROWSPERSTRIP: - *va_arg(ap, uint32*) = td->td_rowsperstrip; - break; - case TIFFTAG_MINSAMPLEVALUE: - *va_arg(ap, uint16*) = td->td_minsamplevalue; - break; - case TIFFTAG_MAXSAMPLEVALUE: - *va_arg(ap, uint16*) = td->td_maxsamplevalue; - break; - case TIFFTAG_SMINSAMPLEVALUE: - if (tif->tif_flags & TIFF_PERSAMPLE) - *va_arg(ap, double**) = td->td_sminsamplevalue; - else - { - /* libtiff historically treats this as a single value. */ - uint16 i; - double v = td->td_sminsamplevalue[0]; - for (i=1; i < td->td_samplesperpixel; ++i) - if( td->td_sminsamplevalue[i] < v ) - v = td->td_sminsamplevalue[i]; - *va_arg(ap, double*) = v; - } - break; - case TIFFTAG_SMAXSAMPLEVALUE: - if (tif->tif_flags & TIFF_PERSAMPLE) - *va_arg(ap, double**) = td->td_smaxsamplevalue; - else - { - /* libtiff historically treats this as a single value. */ - uint16 i; - double v = td->td_smaxsamplevalue[0]; - for (i=1; i < td->td_samplesperpixel; ++i) - if( td->td_smaxsamplevalue[i] > v ) - v = td->td_smaxsamplevalue[i]; - *va_arg(ap, double*) = v; - } - break; - case TIFFTAG_XRESOLUTION: - *va_arg(ap, float*) = td->td_xresolution; - break; - case TIFFTAG_YRESOLUTION: - *va_arg(ap, float*) = td->td_yresolution; - break; - case TIFFTAG_PLANARCONFIG: - *va_arg(ap, uint16*) = td->td_planarconfig; - break; - case TIFFTAG_XPOSITION: - *va_arg(ap, float*) = td->td_xposition; - break; - case TIFFTAG_YPOSITION: - *va_arg(ap, float*) = td->td_yposition; - break; - case TIFFTAG_RESOLUTIONUNIT: - *va_arg(ap, uint16*) = td->td_resolutionunit; - break; - case TIFFTAG_PAGENUMBER: - *va_arg(ap, uint16*) = td->td_pagenumber[0]; - *va_arg(ap, uint16*) = td->td_pagenumber[1]; - break; - case TIFFTAG_HALFTONEHINTS: - *va_arg(ap, uint16*) = td->td_halftonehints[0]; - *va_arg(ap, uint16*) = td->td_halftonehints[1]; - break; - case TIFFTAG_COLORMAP: - *va_arg(ap, uint16**) = td->td_colormap[0]; - *va_arg(ap, uint16**) = td->td_colormap[1]; - *va_arg(ap, uint16**) = td->td_colormap[2]; - break; - case TIFFTAG_STRIPOFFSETS: - case TIFFTAG_TILEOFFSETS: - _TIFFFillStriles( tif ); - *va_arg(ap, uint64**) = td->td_stripoffset; - break; - case TIFFTAG_STRIPBYTECOUNTS: - case TIFFTAG_TILEBYTECOUNTS: - _TIFFFillStriles( tif ); - *va_arg(ap, uint64**) = td->td_stripbytecount; - break; - case TIFFTAG_MATTEING: - *va_arg(ap, uint16*) = - (td->td_extrasamples == 1 && - td->td_sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA); - break; - case TIFFTAG_EXTRASAMPLES: - *va_arg(ap, uint16*) = td->td_extrasamples; - *va_arg(ap, uint16**) = td->td_sampleinfo; - break; - case TIFFTAG_TILEWIDTH: - *va_arg(ap, uint32*) = td->td_tilewidth; - break; - case TIFFTAG_TILELENGTH: - *va_arg(ap, uint32*) = td->td_tilelength; - break; - case TIFFTAG_TILEDEPTH: - *va_arg(ap, uint32*) = td->td_tiledepth; - break; - case TIFFTAG_DATATYPE: - switch (td->td_sampleformat) { - case SAMPLEFORMAT_UINT: - *va_arg(ap, uint16*) = DATATYPE_UINT; - break; - case SAMPLEFORMAT_INT: - *va_arg(ap, uint16*) = DATATYPE_INT; - break; - case SAMPLEFORMAT_IEEEFP: - *va_arg(ap, uint16*) = DATATYPE_IEEEFP; - break; - case SAMPLEFORMAT_VOID: - *va_arg(ap, uint16*) = DATATYPE_VOID; - break; - } - break; - case TIFFTAG_SAMPLEFORMAT: - *va_arg(ap, uint16*) = td->td_sampleformat; - break; - case TIFFTAG_IMAGEDEPTH: - *va_arg(ap, uint32*) = td->td_imagedepth; - break; - case TIFFTAG_SUBIFD: - *va_arg(ap, uint16*) = td->td_nsubifd; - *va_arg(ap, uint64**) = td->td_subifd; - break; - case TIFFTAG_YCBCRPOSITIONING: - *va_arg(ap, uint16*) = td->td_ycbcrpositioning; - break; - case TIFFTAG_YCBCRSUBSAMPLING: - *va_arg(ap, uint16*) = td->td_ycbcrsubsampling[0]; - *va_arg(ap, uint16*) = td->td_ycbcrsubsampling[1]; - break; - case TIFFTAG_TRANSFERFUNCTION: - *va_arg(ap, uint16**) = td->td_transferfunction[0]; - if (td->td_samplesperpixel - td->td_extrasamples > 1) { - *va_arg(ap, uint16**) = td->td_transferfunction[1]; - *va_arg(ap, uint16**) = td->td_transferfunction[2]; - } else { - *va_arg(ap, uint16**) = NULL; - *va_arg(ap, uint16**) = NULL; - } - break; - case TIFFTAG_REFERENCEBLACKWHITE: - *va_arg(ap, float**) = td->td_refblackwhite; - break; - case TIFFTAG_INKNAMES: - *va_arg(ap, char**) = td->td_inknames; - break; - default: - { - int i; - - /* - * This can happen if multiple images are open - * with different codecs which have private - * tags. The global tag information table may - * then have tags that are valid for one file - * but not the other. If the client tries to - * get a tag that is not valid for the image's - * codec then we'll arrive here. - */ - if( fip->field_bit != FIELD_CUSTOM ) - { - TIFFErrorExt(tif->tif_clientdata, "_TIFFVGetField", - "%s: Invalid %stag \"%s\" " - "(not supported by codec)", - tif->tif_name, - isPseudoTag(tag) ? "pseudo-" : "", - fip->field_name); - ret_val = 0; - break; - } - - /* - * Do we have a custom value? - */ - ret_val = 0; - for (i = 0; i < td->td_customValueCount; i++) { - TIFFTagValue *tv = td->td_customValues + i; - - if (tv->info->field_tag != tag) - continue; - - if (fip->field_passcount) { - if (fip->field_readcount == TIFF_VARIABLE2) - *va_arg(ap, uint32*) = (uint32)tv->count; - else /* Assume TIFF_VARIABLE */ - *va_arg(ap, uint16*) = (uint16)tv->count; - *va_arg(ap, void **) = tv->value; - ret_val = 1; - } else if (fip->field_tag == TIFFTAG_DOTRANGE - && strcmp(fip->field_name,"DotRange") == 0) { - /* TODO: This is an evil exception and should not have been - handled this way ... likely best if we move it into - the directory structure with an explicit field in - libtiff 4.1 and assign it a FIELD_ value */ - *va_arg(ap, uint16*) = ((uint16 *)tv->value)[0]; - *va_arg(ap, uint16*) = ((uint16 *)tv->value)[1]; - ret_val = 1; - } else { - if (fip->field_type == TIFF_ASCII - || fip->field_readcount == TIFF_VARIABLE - || fip->field_readcount == TIFF_VARIABLE2 - || fip->field_readcount == TIFF_SPP - || tv->count > 1) { - *va_arg(ap, void **) = tv->value; - ret_val = 1; - } else { - char *val = (char *)tv->value; - assert( tv->count == 1 ); - switch (fip->field_type) { - case TIFF_BYTE: - case TIFF_UNDEFINED: - *va_arg(ap, uint8*) = - *(uint8 *)val; - ret_val = 1; - break; - case TIFF_SBYTE: - *va_arg(ap, int8*) = - *(int8 *)val; - ret_val = 1; - break; - case TIFF_SHORT: - *va_arg(ap, uint16*) = - *(uint16 *)val; - ret_val = 1; - break; - case TIFF_SSHORT: - *va_arg(ap, int16*) = - *(int16 *)val; - ret_val = 1; - break; - case TIFF_LONG: - case TIFF_IFD: - *va_arg(ap, uint32*) = - *(uint32 *)val; - ret_val = 1; - break; - case TIFF_SLONG: - *va_arg(ap, int32*) = - *(int32 *)val; - ret_val = 1; - break; - case TIFF_LONG8: - case TIFF_IFD8: - *va_arg(ap, uint64*) = - *(uint64 *)val; - ret_val = 1; - break; - case TIFF_SLONG8: - *va_arg(ap, int64*) = - *(int64 *)val; - ret_val = 1; - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - *va_arg(ap, float*) = - *(float *)val; - ret_val = 1; - break; - case TIFF_DOUBLE: - *va_arg(ap, double*) = - *(double *)val; - ret_val = 1; - break; - default: - ret_val = 0; - break; - } - } - } - break; - } - } - } - return(ret_val); -} - -/* - * Return the value of a field in the - * internal directory structure. - */ -int -TIFFGetField(TIFF* tif, uint32 tag, ...) -{ - int status; - va_list ap; - - va_start(ap, tag); - status = TIFFVGetField(tif, tag, ap); - va_end(ap); - return (status); -} - -/* - * Like TIFFGetField, but taking a varargs - * parameter list. This routine is useful - * for building higher-level interfaces on - * top of the library. - */ -int -TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) -{ - const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY); - return (fip && (isPseudoTag(tag) || TIFFFieldSet(tif, fip->field_bit)) ? - (*tif->tif_tagmethods.vgetfield)(tif, tag, ap) : 0); -} - -#define CleanupField(member) { \ - if (td->member) { \ - _TIFFfree(td->member); \ - td->member = 0; \ - } \ -} - -/* - * Release storage associated with a directory. - */ -void -TIFFFreeDirectory(TIFF* tif) -{ - TIFFDirectory *td = &tif->tif_dir; - int i; - - _TIFFmemset(td->td_fieldsset, 0, FIELD_SETLONGS); - CleanupField(td_sminsamplevalue); - CleanupField(td_smaxsamplevalue); - CleanupField(td_colormap[0]); - CleanupField(td_colormap[1]); - CleanupField(td_colormap[2]); - CleanupField(td_sampleinfo); - CleanupField(td_subifd); - CleanupField(td_inknames); - CleanupField(td_refblackwhite); - CleanupField(td_transferfunction[0]); - CleanupField(td_transferfunction[1]); - CleanupField(td_transferfunction[2]); - CleanupField(td_stripoffset); - CleanupField(td_stripbytecount); - TIFFClrFieldBit(tif, FIELD_YCBCRSUBSAMPLING); - TIFFClrFieldBit(tif, FIELD_YCBCRPOSITIONING); - - /* Cleanup custom tag values */ - for( i = 0; i < td->td_customValueCount; i++ ) { - if (td->td_customValues[i].value) - _TIFFfree(td->td_customValues[i].value); - } - - td->td_customValueCount = 0; - CleanupField(td_customValues); - -#if defined(DEFER_STRILE_LOAD) - _TIFFmemset( &(td->td_stripoffset_entry), 0, sizeof(TIFFDirEntry)); - _TIFFmemset( &(td->td_stripbytecount_entry), 0, sizeof(TIFFDirEntry)); -#endif -} -#undef CleanupField - -/* - * Client Tag extension support (from Niles Ritter). - */ -static TIFFExtendProc _TIFFextender = (TIFFExtendProc) NULL; - -TIFFExtendProc -TIFFSetTagExtender(TIFFExtendProc extender) -{ - TIFFExtendProc prev = _TIFFextender; - _TIFFextender = extender; - return (prev); -} - -/* - * Setup for a new directory. Should we automatically call - * TIFFWriteDirectory() if the current one is dirty? - * - * The newly created directory will not exist on the file till - * TIFFWriteDirectory(), TIFFFlush() or TIFFClose() is called. - */ -int -TIFFCreateDirectory(TIFF* tif) -{ - TIFFDefaultDirectory(tif); - tif->tif_diroff = 0; - tif->tif_nextdiroff = 0; - tif->tif_curoff = 0; - tif->tif_row = (uint32) -1; - tif->tif_curstrip = (uint32) -1; - - return 0; -} - -int -TIFFCreateCustomDirectory(TIFF* tif, const TIFFFieldArray* infoarray) -{ - TIFFDefaultDirectory(tif); - - /* - * Reset the field definitions to match the application provided list. - * Hopefully TIFFDefaultDirectory() won't have done anything irreversable - * based on it's assumption this is an image directory. - */ - _TIFFSetupFields(tif, infoarray); - - tif->tif_diroff = 0; - tif->tif_nextdiroff = 0; - tif->tif_curoff = 0; - tif->tif_row = (uint32) -1; - tif->tif_curstrip = (uint32) -1; - - return 0; -} - -int -TIFFCreateEXIFDirectory(TIFF* tif) -{ - const TIFFFieldArray* exifFieldArray; - exifFieldArray = _TIFFGetExifFields(); - return TIFFCreateCustomDirectory(tif, exifFieldArray); -} - -/* - * Setup a default directory structure. - */ -int -TIFFDefaultDirectory(TIFF* tif) -{ - register TIFFDirectory* td = &tif->tif_dir; - const TIFFFieldArray* tiffFieldArray; - - tiffFieldArray = _TIFFGetFields(); - _TIFFSetupFields(tif, tiffFieldArray); - - _TIFFmemset(td, 0, sizeof (*td)); - td->td_fillorder = FILLORDER_MSB2LSB; - td->td_bitspersample = 1; - td->td_threshholding = THRESHHOLD_BILEVEL; - td->td_orientation = ORIENTATION_TOPLEFT; - td->td_samplesperpixel = 1; - td->td_rowsperstrip = (uint32) -1; - td->td_tilewidth = 0; - td->td_tilelength = 0; - td->td_tiledepth = 1; - td->td_stripbytecountsorted = 1; /* Our own arrays always sorted. */ - td->td_resolutionunit = RESUNIT_INCH; - td->td_sampleformat = SAMPLEFORMAT_UINT; - td->td_imagedepth = 1; - td->td_ycbcrsubsampling[0] = 2; - td->td_ycbcrsubsampling[1] = 2; - td->td_ycbcrpositioning = YCBCRPOSITION_CENTERED; - tif->tif_postdecode = _TIFFNoPostDecode; - tif->tif_foundfield = NULL; - tif->tif_tagmethods.vsetfield = _TIFFVSetField; - tif->tif_tagmethods.vgetfield = _TIFFVGetField; - tif->tif_tagmethods.printdir = NULL; - /* - * Give client code a chance to install their own - * tag extensions & methods, prior to compression overloads, - * but do some prior cleanup first. (http://trac.osgeo.org/gdal/ticket/5054) - */ - if (tif->tif_nfieldscompat > 0) { - uint32 i; - - for (i = 0; i < tif->tif_nfieldscompat; i++) { - if (tif->tif_fieldscompat[i].allocated_size) - _TIFFfree(tif->tif_fieldscompat[i].fields); - } - _TIFFfree(tif->tif_fieldscompat); - tif->tif_nfieldscompat = 0; - tif->tif_fieldscompat = NULL; - } - if (_TIFFextender) - (*_TIFFextender)(tif); - (void) TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - /* - * NB: The directory is marked dirty as a result of setting - * up the default compression scheme. However, this really - * isn't correct -- we want TIFF_DIRTYDIRECT to be set only - * if the user does something. We could just do the setup - * by hand, but it seems better to use the normal mechanism - * (i.e. TIFFSetField). - */ - tif->tif_flags &= ~TIFF_DIRTYDIRECT; - - /* - * As per http://bugzilla.remotesensing.org/show_bug.cgi?id=19 - * we clear the ISTILED flag when setting up a new directory. - * Should we also be clearing stuff like INSUBIFD? - */ - tif->tif_flags &= ~TIFF_ISTILED; - - return (1); -} - -static int -TIFFAdvanceDirectory(TIFF* tif, uint64* nextdir, uint64* off) -{ - static const char module[] = "TIFFAdvanceDirectory"; - if (isMapped(tif)) - { - uint64 poff=*nextdir; - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - tmsize_t poffa,poffb,poffc,poffd; - uint16 dircount; - uint32 nextdir32; - poffa=(tmsize_t)poff; - poffb=poffa+sizeof(uint16); - if (((uint64)poffa!=poff)||(poffbtif->tif_size)) - { - TIFFErrorExt(tif->tif_clientdata,module,"Error fetching directory count"); - *nextdir=0; - return(0); - } - _TIFFmemcpy(&dircount,tif->tif_base+poffa,sizeof(uint16)); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort(&dircount); - poffc=poffb+dircount*12; - poffd=poffc+sizeof(uint32); - if ((poffctif->tif_size)) - { - TIFFErrorExt(tif->tif_clientdata,module,"Error fetching directory link"); - return(0); - } - if (off!=NULL) - *off=(uint64)poffc; - _TIFFmemcpy(&nextdir32,tif->tif_base+poffc,sizeof(uint32)); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&nextdir32); - *nextdir=nextdir32; - } - else - { - tmsize_t poffa,poffb,poffc,poffd; - uint64 dircount64; - uint16 dircount16; - poffa=(tmsize_t)poff; - poffb=poffa+sizeof(uint64); - if (((uint64)poffa!=poff)||(poffbtif->tif_size)) - { - TIFFErrorExt(tif->tif_clientdata,module,"Error fetching directory count"); - return(0); - } - _TIFFmemcpy(&dircount64,tif->tif_base+poffa,sizeof(uint64)); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64>0xFFFF) - { - TIFFErrorExt(tif->tif_clientdata,module,"Sanity check on directory count failed"); - return(0); - } - dircount16=(uint16)dircount64; - poffc=poffb+dircount16*20; - poffd=poffc+sizeof(uint64); - if ((poffctif->tif_size)) - { - TIFFErrorExt(tif->tif_clientdata,module,"Error fetching directory link"); - return(0); - } - if (off!=NULL) - *off=(uint64)poffc; - _TIFFmemcpy(nextdir,tif->tif_base+poffc,sizeof(uint64)); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8(nextdir); - } - return(1); - } - else - { - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint16 dircount; - uint32 nextdir32; - if (!SeekOK(tif, *nextdir) || - !ReadOK(tif, &dircount, sizeof (uint16))) { - TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory count", - tif->tif_name); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - if (off != NULL) - *off = TIFFSeekFile(tif, - dircount*12, SEEK_CUR); - else - (void) TIFFSeekFile(tif, - dircount*12, SEEK_CUR); - if (!ReadOK(tif, &nextdir32, sizeof (uint32))) { - TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory link", - tif->tif_name); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextdir32); - *nextdir=nextdir32; - } - else - { - uint64 dircount64; - uint16 dircount16; - if (!SeekOK(tif, *nextdir) || - !ReadOK(tif, &dircount64, sizeof (uint64))) { - TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory count", - tif->tif_name); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64>0xFFFF) - { - TIFFErrorExt(tif->tif_clientdata, module, "Error fetching directory count"); - return(0); - } - dircount16 = (uint16)dircount64; - if (off != NULL) - *off = TIFFSeekFile(tif, - dircount16*20, SEEK_CUR); - else - (void) TIFFSeekFile(tif, - dircount16*20, SEEK_CUR); - if (!ReadOK(tif, nextdir, sizeof (uint64))) { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Error fetching directory link", - tif->tif_name); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(nextdir); - } - return (1); - } -} - -/* - * Count the number of directories in a file. - */ -uint16 -TIFFNumberOfDirectories(TIFF* tif) -{ - static const char module[] = "TIFFNumberOfDirectories"; - uint64 nextdir; - uint16 n; - if (!(tif->tif_flags&TIFF_BIGTIFF)) - nextdir = tif->tif_header.classic.tiff_diroff; - else - nextdir = tif->tif_header.big.tiff_diroff; - n = 0; - while (nextdir != 0 && TIFFAdvanceDirectory(tif, &nextdir, NULL)) - { - if (n != 65535) { - ++n; - } - else - { - TIFFErrorExt(tif->tif_clientdata, module, - "Directory count exceeded 65535 limit," - " giving up on counting."); - return (65535); - } - } - return (n); -} - -/* - * Set the n-th directory as the current directory. - * NB: Directories are numbered starting at 0. - */ -int -TIFFSetDirectory(TIFF* tif, uint16 dirn) -{ - uint64 nextdir; - uint16 n; - - if (!(tif->tif_flags&TIFF_BIGTIFF)) - nextdir = tif->tif_header.classic.tiff_diroff; - else - nextdir = tif->tif_header.big.tiff_diroff; - for (n = dirn; n > 0 && nextdir != 0; n--) - if (!TIFFAdvanceDirectory(tif, &nextdir, NULL)) - return (0); - tif->tif_nextdiroff = nextdir; - /* - * Set curdir to the actual directory index. The - * -1 is because TIFFReadDirectory will increment - * tif_curdir after successfully reading the directory. - */ - tif->tif_curdir = (dirn - n) - 1; - /* - * Reset tif_dirnumber counter and start new list of seen directories. - * We need this to prevent IFD loops. - */ - tif->tif_dirnumber = 0; - return (TIFFReadDirectory(tif)); -} - -/* - * Set the current directory to be the directory - * located at the specified file offset. This interface - * is used mainly to access directories linked with - * the SubIFD tag (e.g. thumbnail images). - */ -int -TIFFSetSubDirectory(TIFF* tif, uint64 diroff) -{ - tif->tif_nextdiroff = diroff; - /* - * Reset tif_dirnumber counter and start new list of seen directories. - * We need this to prevent IFD loops. - */ - tif->tif_dirnumber = 0; - return (TIFFReadDirectory(tif)); -} - -/* - * Return file offset of the current directory. - */ -uint64 -TIFFCurrentDirOffset(TIFF* tif) -{ - return (tif->tif_diroff); -} - -/* - * Return an indication of whether or not we are - * at the last directory in the file. - */ -int -TIFFLastDirectory(TIFF* tif) -{ - return (tif->tif_nextdiroff == 0); -} - -/* - * Unlink the specified directory from the directory chain. - */ -int -TIFFUnlinkDirectory(TIFF* tif, uint16 dirn) -{ - static const char module[] = "TIFFUnlinkDirectory"; - uint64 nextdir; - uint64 off; - uint16 n; - - if (tif->tif_mode == O_RDONLY) { - TIFFErrorExt(tif->tif_clientdata, module, - "Can not unlink directory in read-only file"); - return (0); - } - /* - * Go to the directory before the one we want - * to unlink and nab the offset of the link - * field we'll need to patch. - */ - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - nextdir = tif->tif_header.classic.tiff_diroff; - off = 4; - } - else - { - nextdir = tif->tif_header.big.tiff_diroff; - off = 8; - } - for (n = dirn-1; n > 0; n--) { - if (nextdir == 0) { - TIFFErrorExt(tif->tif_clientdata, module, "Directory %d does not exist", dirn); - return (0); - } - if (!TIFFAdvanceDirectory(tif, &nextdir, &off)) - return (0); - } - /* - * Advance to the directory to be unlinked and fetch - * the offset of the directory that follows. - */ - if (!TIFFAdvanceDirectory(tif, &nextdir, NULL)) - return (0); - /* - * Go back and patch the link field of the preceding - * directory to point to the offset of the directory - * that follows. - */ - (void) TIFFSeekFile(tif, off, SEEK_SET); - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint32 nextdir32; - nextdir32=(uint32)nextdir; - assert((uint64)nextdir32==nextdir); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextdir32); - if (!WriteOK(tif, &nextdir32, sizeof (uint32))) { - TIFFErrorExt(tif->tif_clientdata, module, "Error writing directory link"); - return (0); - } - } - else - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&nextdir); - if (!WriteOK(tif, &nextdir, sizeof (uint64))) { - TIFFErrorExt(tif->tif_clientdata, module, "Error writing directory link"); - return (0); - } - } - /* - * Leave directory state setup safely. We don't have - * facilities for doing inserting and removing directories, - * so it's safest to just invalidate everything. This - * means that the caller can only append to the directory - * chain. - */ - (*tif->tif_cleanup)(tif); - if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) { - _TIFFfree(tif->tif_rawdata); - tif->tif_rawdata = NULL; - tif->tif_rawcc = 0; - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = 0; - } - tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP|TIFF_POSTENCODE|TIFF_BUF4WRITE); - TIFFFreeDirectory(tif); - TIFFDefaultDirectory(tif); - tif->tif_diroff = 0; /* force link on next write */ - tif->tif_nextdiroff = 0; /* next write must be at end */ - tif->tif_curoff = 0; - tif->tif_row = (uint32) -1; - tif->tif_curstrip = (uint32) -1; - return (1); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_dir.h b/Dependencies/FreeImage/Source/LibTIFF4/tif_dir.h deleted file mode 100644 index bdc6a8a..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_dir.h +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFFDIR_ -#define _TIFFDIR_ -/* - * ``Library-private'' Directory-related Definitions. - */ - -typedef struct { - const TIFFField *info; - int count; - void *value; -} TIFFTagValue; - -/* - * TIFF Image File Directories are comprised of a table of field - * descriptors of the form shown below. The table is sorted in - * ascending order by tag. The values associated with each entry are - * disjoint and may appear anywhere in the file (so long as they are - * placed on a word boundary). - * - * If the value is 4 bytes or less, in ClassicTIFF, or 8 bytes or less in - * BigTIFF, then it is placed in the offset field to save space. If so, - * it is left-justified in the offset field. - */ -typedef struct { - uint16 tdir_tag; /* see below */ - uint16 tdir_type; /* data type; see below */ - uint64 tdir_count; /* number of items; length in spec */ - union { - uint16 toff_short; - uint32 toff_long; - uint64 toff_long8; - } tdir_offset; /* either offset or the data itself if fits */ -} TIFFDirEntry; - -/* - * Internal format of a TIFF directory entry. - */ -typedef struct { -#define FIELD_SETLONGS 4 - /* bit vector of fields that are set */ - unsigned long td_fieldsset[FIELD_SETLONGS]; - - uint32 td_imagewidth, td_imagelength, td_imagedepth; - uint32 td_tilewidth, td_tilelength, td_tiledepth; - uint32 td_subfiletype; - uint16 td_bitspersample; - uint16 td_sampleformat; - uint16 td_compression; - uint16 td_photometric; - uint16 td_threshholding; - uint16 td_fillorder; - uint16 td_orientation; - uint16 td_samplesperpixel; - uint32 td_rowsperstrip; - uint16 td_minsamplevalue, td_maxsamplevalue; - double* td_sminsamplevalue; - double* td_smaxsamplevalue; - float td_xresolution, td_yresolution; - uint16 td_resolutionunit; - uint16 td_planarconfig; - float td_xposition, td_yposition; - uint16 td_pagenumber[2]; - uint16* td_colormap[3]; - uint16 td_halftonehints[2]; - uint16 td_extrasamples; - uint16* td_sampleinfo; - /* even though the name is misleading, td_stripsperimage is the number - * of striles (=strips or tiles) per plane, and td_nstrips the total - * number of striles */ - uint32 td_stripsperimage; - uint32 td_nstrips; /* size of offset & bytecount arrays */ - uint64* td_stripoffset; - uint64* td_stripbytecount; - int td_stripbytecountsorted; /* is the bytecount array sorted ascending? */ -#if defined(DEFER_STRILE_LOAD) - TIFFDirEntry td_stripoffset_entry; /* for deferred loading */ - TIFFDirEntry td_stripbytecount_entry; /* for deferred loading */ -#endif - uint16 td_nsubifd; - uint64* td_subifd; - /* YCbCr parameters */ - uint16 td_ycbcrsubsampling[2]; - uint16 td_ycbcrpositioning; - /* Colorimetry parameters */ - uint16* td_transferfunction[3]; - float* td_refblackwhite; - /* CMYK parameters */ - int td_inknameslen; - char* td_inknames; - - int td_customValueCount; - TIFFTagValue *td_customValues; -} TIFFDirectory; - -/* - * Field flags used to indicate fields that have been set in a directory, and - * to reference fields when manipulating a directory. - */ - -/* - * FIELD_IGNORE is used to signify tags that are to be processed but otherwise - * ignored. This permits antiquated tags to be quietly read and discarded. - * Note that a bit *is* allocated for ignored tags; this is understood by the - * directory reading logic which uses this fact to avoid special-case handling - */ -#define FIELD_IGNORE 0 - -/* multi-item fields */ -#define FIELD_IMAGEDIMENSIONS 1 -#define FIELD_TILEDIMENSIONS 2 -#define FIELD_RESOLUTION 3 -#define FIELD_POSITION 4 - -/* single-item fields */ -#define FIELD_SUBFILETYPE 5 -#define FIELD_BITSPERSAMPLE 6 -#define FIELD_COMPRESSION 7 -#define FIELD_PHOTOMETRIC 8 -#define FIELD_THRESHHOLDING 9 -#define FIELD_FILLORDER 10 -#define FIELD_ORIENTATION 15 -#define FIELD_SAMPLESPERPIXEL 16 -#define FIELD_ROWSPERSTRIP 17 -#define FIELD_MINSAMPLEVALUE 18 -#define FIELD_MAXSAMPLEVALUE 19 -#define FIELD_PLANARCONFIG 20 -#define FIELD_RESOLUTIONUNIT 22 -#define FIELD_PAGENUMBER 23 -#define FIELD_STRIPBYTECOUNTS 24 -#define FIELD_STRIPOFFSETS 25 -#define FIELD_COLORMAP 26 -#define FIELD_EXTRASAMPLES 31 -#define FIELD_SAMPLEFORMAT 32 -#define FIELD_SMINSAMPLEVALUE 33 -#define FIELD_SMAXSAMPLEVALUE 34 -#define FIELD_IMAGEDEPTH 35 -#define FIELD_TILEDEPTH 36 -#define FIELD_HALFTONEHINTS 37 -#define FIELD_YCBCRSUBSAMPLING 39 -#define FIELD_YCBCRPOSITIONING 40 -#define FIELD_REFBLACKWHITE 41 -#define FIELD_TRANSFERFUNCTION 44 -#define FIELD_INKNAMES 46 -#define FIELD_SUBIFD 49 -/* FIELD_CUSTOM (see tiffio.h) 65 */ -/* end of support for well-known tags; codec-private tags follow */ -#define FIELD_CODEC 66 /* base of codec-private tags */ - - -/* - * Pseudo-tags don't normally need field bits since they are not written to an - * output file (by definition). The library also has express logic to always - * query a codec for a pseudo-tag so allocating a field bit for one is a - * waste. If codec wants to promote the notion of a pseudo-tag being ``set'' - * or ``unset'' then it can do using internal state flags without polluting - * the field bit space defined for real tags. - */ -#define FIELD_PSEUDO 0 - -#define FIELD_LAST (32*FIELD_SETLONGS-1) - -#define BITn(n) (((unsigned long)1L)<<((n)&0x1f)) -#define BITFIELDn(tif, n) ((tif)->tif_dir.td_fieldsset[(n)/32]) -#define TIFFFieldSet(tif, field) (BITFIELDn(tif, field) & BITn(field)) -#define TIFFSetFieldBit(tif, field) (BITFIELDn(tif, field) |= BITn(field)) -#define TIFFClrFieldBit(tif, field) (BITFIELDn(tif, field) &= ~BITn(field)) - -#define FieldSet(fields, f) (fields[(f)/32] & BITn(f)) -#define ResetFieldBit(fields, f) (fields[(f)/32] &= ~BITn(f)) - -typedef enum { - TIFF_SETGET_UNDEFINED = 0, - TIFF_SETGET_ASCII = 1, - TIFF_SETGET_UINT8 = 2, - TIFF_SETGET_SINT8 = 3, - TIFF_SETGET_UINT16 = 4, - TIFF_SETGET_SINT16 = 5, - TIFF_SETGET_UINT32 = 6, - TIFF_SETGET_SINT32 = 7, - TIFF_SETGET_UINT64 = 8, - TIFF_SETGET_SINT64 = 9, - TIFF_SETGET_FLOAT = 10, - TIFF_SETGET_DOUBLE = 11, - TIFF_SETGET_IFD8 = 12, - TIFF_SETGET_INT = 13, - TIFF_SETGET_UINT16_PAIR = 14, - TIFF_SETGET_C0_ASCII = 15, - TIFF_SETGET_C0_UINT8 = 16, - TIFF_SETGET_C0_SINT8 = 17, - TIFF_SETGET_C0_UINT16 = 18, - TIFF_SETGET_C0_SINT16 = 19, - TIFF_SETGET_C0_UINT32 = 20, - TIFF_SETGET_C0_SINT32 = 21, - TIFF_SETGET_C0_UINT64 = 22, - TIFF_SETGET_C0_SINT64 = 23, - TIFF_SETGET_C0_FLOAT = 24, - TIFF_SETGET_C0_DOUBLE = 25, - TIFF_SETGET_C0_IFD8 = 26, - TIFF_SETGET_C16_ASCII = 27, - TIFF_SETGET_C16_UINT8 = 28, - TIFF_SETGET_C16_SINT8 = 29, - TIFF_SETGET_C16_UINT16 = 30, - TIFF_SETGET_C16_SINT16 = 31, - TIFF_SETGET_C16_UINT32 = 32, - TIFF_SETGET_C16_SINT32 = 33, - TIFF_SETGET_C16_UINT64 = 34, - TIFF_SETGET_C16_SINT64 = 35, - TIFF_SETGET_C16_FLOAT = 36, - TIFF_SETGET_C16_DOUBLE = 37, - TIFF_SETGET_C16_IFD8 = 38, - TIFF_SETGET_C32_ASCII = 39, - TIFF_SETGET_C32_UINT8 = 40, - TIFF_SETGET_C32_SINT8 = 41, - TIFF_SETGET_C32_UINT16 = 42, - TIFF_SETGET_C32_SINT16 = 43, - TIFF_SETGET_C32_UINT32 = 44, - TIFF_SETGET_C32_SINT32 = 45, - TIFF_SETGET_C32_UINT64 = 46, - TIFF_SETGET_C32_SINT64 = 47, - TIFF_SETGET_C32_FLOAT = 48, - TIFF_SETGET_C32_DOUBLE = 49, - TIFF_SETGET_C32_IFD8 = 50, - TIFF_SETGET_OTHER = 51 -} TIFFSetGetFieldType; - -#if defined(__cplusplus) -extern "C" { -#endif - -extern const TIFFFieldArray* _TIFFGetFields(void); -extern const TIFFFieldArray* _TIFFGetExifFields(void); -extern void _TIFFSetupFields(TIFF* tif, const TIFFFieldArray* infoarray); -extern void _TIFFPrintFieldInfo(TIFF*, FILE*); - -extern int _TIFFFillStriles(TIFF*); - -typedef enum { - tfiatImage, - tfiatExif, - tfiatOther -} TIFFFieldArrayType; - -struct _TIFFFieldArray { - TIFFFieldArrayType type; /* array type, will be used to determine if IFD is image and such */ - uint32 allocated_size; /* 0 if array is constant, other if modified by future definition extension support */ - uint32 count; /* number of elements in fields array */ - TIFFField* fields; /* actual field info */ -}; - -struct _TIFFField { - uint32 field_tag; /* field's tag */ - short field_readcount; /* read count/TIFF_VARIABLE/TIFF_SPP */ - short field_writecount; /* write count/TIFF_VARIABLE */ - TIFFDataType field_type; /* type of associated data */ - uint32 reserved; /* reserved for future extension */ - TIFFSetGetFieldType set_field_type; /* type to be passed to TIFFSetField */ - TIFFSetGetFieldType get_field_type; /* type to be passed to TIFFGetField */ - unsigned short field_bit; /* bit in fieldsset bit vector */ - unsigned char field_oktochange; /* if true, can change while writing */ - unsigned char field_passcount; /* if true, pass dir count on set */ - char* field_name; /* ASCII name */ - TIFFFieldArray* field_subfields; /* if field points to child ifds, child ifd field definition array */ -}; - -extern int _TIFFMergeFields(TIFF*, const TIFFField[], uint32); -extern const TIFFField* _TIFFFindOrRegisterField(TIFF *, uint32, TIFFDataType); -extern TIFFField* _TIFFCreateAnonField(TIFF *, uint32, TIFFDataType); -extern int _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag); - -#if defined(__cplusplus) -} -#endif -#endif /* _TIFFDIR_ */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_dirinfo.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_dirinfo.c deleted file mode 100644 index 57eecfd..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_dirinfo.c +++ /dev/null @@ -1,1072 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Core Directory Tag Support. - */ -#include "tiffiop.h" -#include - -/* - * NOTE: THIS ARRAY IS ASSUMED TO BE SORTED BY TAG. - * - * NOTE: The second field (field_readcount) and third field (field_writecount) - * sometimes use the values TIFF_VARIABLE (-1), TIFF_VARIABLE2 (-3) - * and TIFF_SPP (-2). The macros should be used but would throw off - * the formatting of the code, so please interpret the -1, -2 and -3 - * values accordingly. - */ - -/* const object should be initialized */ -#ifdef _MSC_VER -#pragma warning( push ) -#pragma warning( disable : 4132 ) -#endif -static const TIFFFieldArray tiffFieldArray; -static const TIFFFieldArray exifFieldArray; -#ifdef _MSC_VER -#pragma warning( pop ) -#endif - -static const TIFFField -tiffFields[] = { - { TIFFTAG_SUBFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_SUBFILETYPE, 1, 0, "SubfileType", NULL }, - { TIFFTAG_OSUBFILETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_SUBFILETYPE, 1, 0, "OldSubfileType", NULL }, - { TIFFTAG_IMAGEWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_IMAGEDIMENSIONS, 0, 0, "ImageWidth", NULL }, - { TIFFTAG_IMAGELENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_IMAGEDIMENSIONS, 1, 0, "ImageLength", NULL }, - { TIFFTAG_BITSPERSAMPLE, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_BITSPERSAMPLE, 0, 0, "BitsPerSample", NULL }, - { TIFFTAG_COMPRESSION, -1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_COMPRESSION, 0, 0, "Compression", NULL }, - { TIFFTAG_PHOTOMETRIC, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_PHOTOMETRIC, 0, 0, "PhotometricInterpretation", NULL }, - { TIFFTAG_THRESHHOLDING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_THRESHHOLDING, 1, 0, "Threshholding", NULL }, - { TIFFTAG_CELLWIDTH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "CellWidth", NULL }, - { TIFFTAG_CELLLENGTH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "CellLength", NULL }, - { TIFFTAG_FILLORDER, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_FILLORDER, 0, 0, "FillOrder", NULL }, - { TIFFTAG_DOCUMENTNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DocumentName", NULL }, - { TIFFTAG_IMAGEDESCRIPTION, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageDescription", NULL }, - { TIFFTAG_MAKE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Make", NULL }, - { TIFFTAG_MODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Model", NULL }, - { TIFFTAG_STRIPOFFSETS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPOFFSETS, 0, 0, "StripOffsets", NULL }, - { TIFFTAG_ORIENTATION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_ORIENTATION, 0, 0, "Orientation", NULL }, - { TIFFTAG_SAMPLESPERPIXEL, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_SAMPLESPERPIXEL, 0, 0, "SamplesPerPixel", NULL }, - { TIFFTAG_ROWSPERSTRIP, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_ROWSPERSTRIP, 0, 0, "RowsPerStrip", NULL }, - { TIFFTAG_STRIPBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "StripByteCounts", NULL }, - { TIFFTAG_MINSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_MINSAMPLEVALUE, 1, 0, "MinSampleValue", NULL }, - { TIFFTAG_MAXSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_MAXSAMPLEVALUE, 1, 0, "MaxSampleValue", NULL }, - { TIFFTAG_XRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "XResolution", NULL }, - { TIFFTAG_YRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "YResolution", NULL }, - { TIFFTAG_PLANARCONFIG, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_PLANARCONFIG, 0, 0, "PlanarConfiguration", NULL }, - { TIFFTAG_PAGENAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PageName", NULL }, - { TIFFTAG_XPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "XPosition", NULL }, - { TIFFTAG_YPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "YPosition", NULL }, - { TIFFTAG_FREEOFFSETS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeOffsets", NULL }, - { TIFFTAG_FREEBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeByteCounts", NULL }, - { TIFFTAG_GRAYRESPONSEUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "GrayResponseUnit", NULL }, - { TIFFTAG_GRAYRESPONSECURVE, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "GrayResponseCurve", NULL }, - { TIFFTAG_RESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTIONUNIT, 1, 0, "ResolutionUnit", NULL }, - { TIFFTAG_PAGENUMBER, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_PAGENUMBER, 1, 0, "PageNumber", NULL }, - { TIFFTAG_COLORRESPONSEUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "ColorResponseUnit", NULL }, - { TIFFTAG_TRANSFERFUNCTION, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_OTHER, TIFF_SETGET_UNDEFINED, FIELD_TRANSFERFUNCTION, 1, 0, "TransferFunction", NULL }, - { TIFFTAG_SOFTWARE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Software", NULL }, - { TIFFTAG_DATETIME, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DateTime", NULL }, - { TIFFTAG_ARTIST, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Artist", NULL }, - { TIFFTAG_HOSTCOMPUTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "HostComputer", NULL }, - { TIFFTAG_WHITEPOINT, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "WhitePoint", NULL }, - { TIFFTAG_PRIMARYCHROMATICITIES, 6, 6, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PrimaryChromaticities", NULL }, - { TIFFTAG_COLORMAP, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_OTHER, TIFF_SETGET_UNDEFINED, FIELD_COLORMAP, 1, 0, "ColorMap", NULL }, - { TIFFTAG_HALFTONEHINTS, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_HALFTONEHINTS, 1, 0, "HalftoneHints", NULL }, - { TIFFTAG_TILEWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_TILEDIMENSIONS, 0, 0, "TileWidth", NULL }, - { TIFFTAG_TILELENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_TILEDIMENSIONS, 0, 0, "TileLength", NULL }, - { TIFFTAG_TILEOFFSETS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPOFFSETS, 0, 0, "TileOffsets", NULL }, - { TIFFTAG_TILEBYTECOUNTS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "TileByteCounts", NULL }, - { TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray*) &tiffFieldArray }, - { TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet", NULL }, - { TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, TIFF_SETGET_UNDEFINED, FIELD_INKNAMES, 1, 1, "InkNames", NULL }, - { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NumberOfInks", NULL }, - { TIFFTAG_DOTRANGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DotRange", NULL }, - { TIFFTAG_TARGETPRINTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TargetPrinter", NULL }, - { TIFFTAG_EXTRASAMPLES, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_EXTRASAMPLES, 0, 1, "ExtraSamples", NULL }, - { TIFFTAG_SAMPLEFORMAT, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_SAMPLEFORMAT, 0, 0, "SampleFormat", NULL }, - { TIFFTAG_SMINSAMPLEVALUE, -2, -1, TIFF_ANY, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_SMINSAMPLEVALUE, 1, 0, "SMinSampleValue", NULL }, - { TIFFTAG_SMAXSAMPLEVALUE, -2, -1, TIFF_ANY, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_SMAXSAMPLEVALUE, 1, 0, "SMaxSampleValue", NULL }, - { TIFFTAG_CLIPPATH, -1, -3, TIFF_BYTE, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ClipPath", NULL }, - { TIFFTAG_XCLIPPATHUNITS, 1, 1, TIFF_SLONG, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "XClipPathUnits", NULL }, - { TIFFTAG_XCLIPPATHUNITS, 1, 1, TIFF_SBYTE, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "XClipPathUnits", NULL }, - { TIFFTAG_YCLIPPATHUNITS, 1, 1, TIFF_SLONG, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "YClipPathUnits", NULL }, - { TIFFTAG_YCBCRCOEFFICIENTS, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "YCbCrCoefficients", NULL }, - { TIFFTAG_YCBCRSUBSAMPLING, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_YCBCRSUBSAMPLING, 0, 0, "YCbCrSubsampling", NULL }, - { TIFFTAG_YCBCRPOSITIONING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_YCBCRPOSITIONING, 0, 0, "YCbCrPositioning", NULL }, - { TIFFTAG_REFERENCEBLACKWHITE, 6, 6, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_REFBLACKWHITE, 1, 0, "ReferenceBlackWhite", NULL }, - { TIFFTAG_XMLPACKET, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "XMLPacket", NULL }, - /* begin SGI tags */ - { TIFFTAG_MATTEING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_EXTRASAMPLES, 0, 0, "Matteing", NULL }, - { TIFFTAG_DATATYPE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_SAMPLEFORMAT, 0, 0, "DataType", NULL }, - { TIFFTAG_IMAGEDEPTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_IMAGEDEPTH, 0, 0, "ImageDepth", NULL }, - { TIFFTAG_TILEDEPTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_TILEDEPTH, 0, 0, "TileDepth", NULL }, - /* end SGI tags */ - /* begin Pixar tags */ - { TIFFTAG_PIXAR_IMAGEFULLWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageFullWidth", NULL }, - { TIFFTAG_PIXAR_IMAGEFULLLENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageFullLength", NULL }, - { TIFFTAG_PIXAR_TEXTUREFORMAT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TextureFormat", NULL }, - { TIFFTAG_PIXAR_WRAPMODES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TextureWrapModes", NULL }, - { TIFFTAG_PIXAR_FOVCOT, 1, 1, TIFF_FLOAT, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FieldOfViewCotangent", NULL }, - { TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToScreen", NULL }, - { TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToCamera", NULL }, - { TIFFTAG_CFAREPEATPATTERNDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CFARepeatPatternDim", NULL }, - { TIFFTAG_CFAPATTERN, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CFAPattern" , NULL}, - { TIFFTAG_COPYRIGHT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Copyright", NULL }, - /* end Pixar tags */ - { TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_LONG, 0, TIFF_SETGET_C32_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "RichTIFFIPTC", NULL }, - { TIFFTAG_PHOTOSHOP, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "Photoshop", NULL }, - { TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "EXIFIFDOffset", (TIFFFieldArray*) &exifFieldArray }, - { TIFFTAG_ICCPROFILE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ICC Profile", NULL }, - { TIFFTAG_GPSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "GPSIFDOffset", NULL }, - { TIFFTAG_FAXRECVPARAMS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvParams", NULL }, - { TIFFTAG_FAXSUBADDRESS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_ASCII, FIELD_CUSTOM, TRUE, FALSE, "FaxSubAddress", NULL }, - { TIFFTAG_FAXRECVTIME, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvTime", NULL }, - { TIFFTAG_FAXDCS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_ASCII, FIELD_CUSTOM, TRUE, FALSE, "FaxDcs", NULL }, - { TIFFTAG_STONITS, 1, 1, TIFF_DOUBLE, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "StoNits", NULL }, - { TIFFTAG_INTEROPERABILITYIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InteroperabilityIFDOffset", NULL }, - /* begin DNG tags */ - { TIFFTAG_DNGVERSION, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DNGVersion", NULL }, - { TIFFTAG_DNGBACKWARDVERSION, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DNGBackwardVersion", NULL }, - { TIFFTAG_UNIQUECAMERAMODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "UniqueCameraModel", NULL }, - { TIFFTAG_LOCALIZEDCAMERAMODEL, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "LocalizedCameraModel", NULL }, - { TIFFTAG_CFAPLANECOLOR, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "CFAPlaneColor", NULL }, - { TIFFTAG_CFALAYOUT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CFALayout", NULL }, - { TIFFTAG_LINEARIZATIONTABLE, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "LinearizationTable", NULL }, - { TIFFTAG_BLACKLEVELREPEATDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BlackLevelRepeatDim", NULL }, - { TIFFTAG_BLACKLEVEL, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "BlackLevel", NULL }, - { TIFFTAG_BLACKLEVELDELTAH, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "BlackLevelDeltaH", NULL }, - { TIFFTAG_BLACKLEVELDELTAV, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "BlackLevelDeltaV", NULL }, - { TIFFTAG_WHITELEVEL, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "WhiteLevel", NULL }, - { TIFFTAG_DEFAULTSCALE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultScale", NULL }, - { TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BestQualityScale", NULL }, - { TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultCropOrigin", NULL }, - { TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultCropSize", NULL }, - { TIFFTAG_COLORMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ColorMatrix1", NULL }, - { TIFFTAG_COLORMATRIX2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ColorMatrix2", NULL }, - { TIFFTAG_CAMERACALIBRATION1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "CameraCalibration1", NULL }, - { TIFFTAG_CAMERACALIBRATION2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "CameraCalibration2", NULL }, - { TIFFTAG_REDUCTIONMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ReductionMatrix1", NULL }, - { TIFFTAG_REDUCTIONMATRIX2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ReductionMatrix2", NULL }, - { TIFFTAG_ANALOGBALANCE, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "AnalogBalance", NULL }, - { TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "AsShotNeutral", NULL }, - { TIFFTAG_ASSHOTWHITEXY, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "AsShotWhiteXY", NULL }, - { TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineExposure", NULL }, - { TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineNoise", NULL }, - { TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineSharpness", NULL }, - { TIFFTAG_BAYERGREENSPLIT, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BayerGreenSplit", NULL }, - { TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "LinearResponseLimit", NULL }, - { TIFFTAG_CAMERASERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CameraSerialNumber", NULL }, - { TIFFTAG_LENSINFO, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "LensInfo", NULL }, - { TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ChromaBlurRadius", NULL }, - { TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "AntiAliasStrength", NULL }, - { TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ShadowScale", NULL }, - { TIFFTAG_DNGPRIVATEDATA, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "DNGPrivateData", NULL }, - { TIFFTAG_MAKERNOTESAFETY, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "MakerNoteSafety", NULL }, - { TIFFTAG_CALIBRATIONILLUMINANT1, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CalibrationIlluminant1", NULL }, - { TIFFTAG_CALIBRATIONILLUMINANT2, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CalibrationIlluminant2", NULL }, - { TIFFTAG_RAWDATAUNIQUEID, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "RawDataUniqueID", NULL }, - { TIFFTAG_ORIGINALRAWFILENAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "OriginalRawFileName", NULL }, - { TIFFTAG_ORIGINALRAWFILEDATA, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "OriginalRawFileData", NULL }, - { TIFFTAG_ACTIVEAREA, 4, 4, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ActiveArea", NULL }, - { TIFFTAG_MASKEDAREAS, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "MaskedAreas", NULL }, - { TIFFTAG_ASSHOTICCPROFILE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "AsShotICCProfile", NULL }, - { TIFFTAG_ASSHOTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "AsShotPreProfileMatrix", NULL }, - { TIFFTAG_CURRENTICCPROFILE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "CurrentICCProfile", NULL }, - { TIFFTAG_CURRENTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "CurrentPreProfileMatrix", NULL }, - { TIFFTAG_PERSAMPLE, 0, 0, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "PerSample", NULL}, - /* end DNG tags */ - /* begin TIFF/FX tags */ - { TIFFTAG_INDEXED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "Indexed", NULL }, - { TIFFTAG_GLOBALPARAMETERSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "GlobalParametersIFD", NULL }, - { TIFFTAG_PROFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ProfileType", NULL }, - { TIFFTAG_FAXPROFILE, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "FaxProfile", NULL }, - { TIFFTAG_CODINGMETHODS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CodingMethods", NULL }, - { TIFFTAG_VERSIONYEAR, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "VersionYear", NULL }, - { TIFFTAG_MODENUMBER, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ModeNumber", NULL }, - { TIFFTAG_DECODE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "Decode", NULL }, - { TIFFTAG_IMAGEBASECOLOR, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ImageBaseColor", NULL }, - { TIFFTAG_T82OPTIONS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "T82Options", NULL }, - { TIFFTAG_STRIPROWCOUNTS, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "StripRowCounts", NULL }, - { TIFFTAG_IMAGELAYER, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ImageLayer", NULL }, - /* end TIFF/FX tags */ - /* begin pseudo tags */ -}; - -static const TIFFField -exifFields[] = { - { EXIFTAG_EXPOSURETIME, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureTime", NULL }, - { EXIFTAG_FNUMBER, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FNumber", NULL }, - { EXIFTAG_EXPOSUREPROGRAM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureProgram", NULL }, - { EXIFTAG_SPECTRALSENSITIVITY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SpectralSensitivity", NULL }, - { EXIFTAG_ISOSPEEDRATINGS, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ISOSpeedRatings", NULL }, - { EXIFTAG_OECF, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "OptoelectricConversionFactor", NULL }, - { EXIFTAG_EXIFVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExifVersion", NULL }, - { EXIFTAG_DATETIMEORIGINAL, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DateTimeOriginal", NULL }, - { EXIFTAG_DATETIMEDIGITIZED, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DateTimeDigitized", NULL }, - { EXIFTAG_COMPONENTSCONFIGURATION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ComponentsConfiguration", NULL }, - { EXIFTAG_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CompressedBitsPerPixel", NULL }, - { EXIFTAG_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ShutterSpeedValue", NULL }, - { EXIFTAG_APERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ApertureValue", NULL }, - { EXIFTAG_BRIGHTNESSVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BrightnessValue", NULL }, - { EXIFTAG_EXPOSUREBIASVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureBiasValue", NULL }, - { EXIFTAG_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MaxApertureValue", NULL }, - { EXIFTAG_SUBJECTDISTANCE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectDistance", NULL }, - { EXIFTAG_METERINGMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MeteringMode", NULL }, - { EXIFTAG_LIGHTSOURCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LightSource", NULL }, - { EXIFTAG_FLASH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Flash", NULL }, - { EXIFTAG_FOCALLENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalLength", NULL }, - { EXIFTAG_SUBJECTAREA, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "SubjectArea", NULL }, - { EXIFTAG_MAKERNOTE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "MakerNote", NULL }, - { EXIFTAG_USERCOMMENT, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "UserComment", NULL }, - { EXIFTAG_SUBSECTIME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTime", NULL }, - { EXIFTAG_SUBSECTIMEORIGINAL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTimeOriginal", NULL }, - { EXIFTAG_SUBSECTIMEDIGITIZED, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTimeDigitized", NULL }, - { EXIFTAG_FLASHPIXVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FlashpixVersion", NULL }, - { EXIFTAG_COLORSPACE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ColorSpace", NULL }, - { EXIFTAG_PIXELXDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PixelXDimension", NULL }, - { EXIFTAG_PIXELYDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PixelYDimension", NULL }, - { EXIFTAG_RELATEDSOUNDFILE, 13, 13, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "RelatedSoundFile", NULL }, - { EXIFTAG_FLASHENERGY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FlashEnergy", NULL }, - { EXIFTAG_SPATIALFREQUENCYRESPONSE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "SpatialFrequencyResponse", NULL }, - { EXIFTAG_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneXResolution", NULL }, - { EXIFTAG_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneYResolution", NULL }, - { EXIFTAG_FOCALPLANERESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneResolutionUnit", NULL }, - { EXIFTAG_SUBJECTLOCATION, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectLocation", NULL }, - { EXIFTAG_EXPOSUREINDEX, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureIndex", NULL }, - { EXIFTAG_SENSINGMETHOD, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SensingMethod", NULL }, - { EXIFTAG_FILESOURCE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FileSource", NULL }, - { EXIFTAG_SCENETYPE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SceneType", NULL }, - { EXIFTAG_CFAPATTERN, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "CFAPattern", NULL }, - { EXIFTAG_CUSTOMRENDERED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CustomRendered", NULL }, - { EXIFTAG_EXPOSUREMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureMode", NULL }, - { EXIFTAG_WHITEBALANCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "WhiteBalance", NULL }, - { EXIFTAG_DIGITALZOOMRATIO, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DigitalZoomRatio", NULL }, - { EXIFTAG_FOCALLENGTHIN35MMFILM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalLengthIn35mmFilm", NULL }, - { EXIFTAG_SCENECAPTURETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SceneCaptureType", NULL }, - { EXIFTAG_GAINCONTROL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "GainControl", NULL }, - { EXIFTAG_CONTRAST, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Contrast", NULL }, - { EXIFTAG_SATURATION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Saturation", NULL }, - { EXIFTAG_SHARPNESS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Sharpness", NULL }, - { EXIFTAG_DEVICESETTINGDESCRIPTION, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "DeviceSettingDescription", NULL }, - { EXIFTAG_SUBJECTDISTANCERANGE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectDistanceRange", NULL }, - { EXIFTAG_IMAGEUNIQUEID, 33, 33, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageUniqueID", NULL } -}; - -static const TIFFFieldArray -tiffFieldArray = { tfiatImage, 0, TIFFArrayCount(tiffFields), (TIFFField*) tiffFields }; -static const TIFFFieldArray -exifFieldArray = { tfiatExif, 0, TIFFArrayCount(exifFields), (TIFFField*) exifFields }; - -/* - * We have our own local lfind() equivalent to avoid subtle differences - * in types passed to lfind() on different systems. - */ - -static void * -td_lfind(const void *key, const void *base, size_t *nmemb, size_t size, - int(*compar)(const void *, const void *)) -{ - char *element, *end; - - end = (char *)base + *nmemb * size; - for (element = (char *)base; element < end; element += size) - if (!compar(key, element)) /* key found */ - return element; - - return NULL; -} - -const TIFFFieldArray* -_TIFFGetFields(void) -{ - return(&tiffFieldArray); -} - -const TIFFFieldArray* -_TIFFGetExifFields(void) -{ - return(&exifFieldArray); -} - -void -_TIFFSetupFields(TIFF* tif, const TIFFFieldArray* fieldarray) -{ - if (tif->tif_fields && tif->tif_nfields > 0) { - uint32 i; - - for (i = 0; i < tif->tif_nfields; i++) { - TIFFField *fld = tif->tif_fields[i]; - if (fld->field_bit == FIELD_CUSTOM && - strncmp("Tag ", fld->field_name, 4) == 0) { - _TIFFfree(fld->field_name); - _TIFFfree(fld); - } - } - - _TIFFfree(tif->tif_fields); - tif->tif_fields = NULL; - tif->tif_nfields = 0; - } - if (!_TIFFMergeFields(tif, fieldarray->fields, fieldarray->count)) { - TIFFErrorExt(tif->tif_clientdata, "_TIFFSetupFields", - "Setting up field info failed"); - } -} - -static int -tagCompare(const void* a, const void* b) -{ - const TIFFField* ta = *(const TIFFField**) a; - const TIFFField* tb = *(const TIFFField**) b; - /* NB: be careful of return values for 16-bit platforms */ - if (ta->field_tag != tb->field_tag) - return (int)ta->field_tag - (int)tb->field_tag; - else - return (ta->field_type == TIFF_ANY) ? - 0 : ((int)tb->field_type - (int)ta->field_type); -} - -static int -tagNameCompare(const void* a, const void* b) -{ - const TIFFField* ta = *(const TIFFField**) a; - const TIFFField* tb = *(const TIFFField**) b; - int ret = strcmp(ta->field_name, tb->field_name); - - if (ret) - return ret; - else - return (ta->field_type == TIFF_ANY) ? - 0 : ((int)tb->field_type - (int)ta->field_type); -} - -int -_TIFFMergeFields(TIFF* tif, const TIFFField info[], uint32 n) -{ - static const char module[] = "_TIFFMergeFields"; - static const char reason[] = "for fields array"; - /* TIFFField** tp; */ - uint32 i; - - tif->tif_foundfield = NULL; - - if (tif->tif_fields && tif->tif_nfields > 0) { - tif->tif_fields = (TIFFField**) - _TIFFCheckRealloc(tif, tif->tif_fields, - (tif->tif_nfields + n), - sizeof(TIFFField *), reason); - } else { - tif->tif_fields = (TIFFField **) - _TIFFCheckMalloc(tif, n, sizeof(TIFFField *), - reason); - } - if (!tif->tif_fields) { - TIFFErrorExt(tif->tif_clientdata, module, - "Failed to allocate fields array"); - return 0; - } - - /* tp = tif->tif_fields + tif->tif_nfields; */ - for (i = 0; i < n; i++) { - const TIFFField *fip = - TIFFFindField(tif, info[i].field_tag, TIFF_ANY); - - /* only add definitions that aren't already present */ - if (!fip) { - tif->tif_fields[tif->tif_nfields] = (TIFFField *) (info+i); - tif->tif_nfields++; - } - } - - /* Sort the field info by tag number */ - qsort(tif->tif_fields, tif->tif_nfields, - sizeof(TIFFField *), tagCompare); - - return n; -} - -void -_TIFFPrintFieldInfo(TIFF* tif, FILE* fd) -{ - uint32 i; - - fprintf(fd, "%s: \n", tif->tif_name); - for (i = 0; i < tif->tif_nfields; i++) { - const TIFFField* fip = tif->tif_fields[i]; - fprintf(fd, "field[%2d] %5lu, %2d, %2d, %d, %2d, %5s, %5s, %s\n" - , (int)i - , (unsigned long) fip->field_tag - , fip->field_readcount, fip->field_writecount - , fip->field_type - , fip->field_bit - , fip->field_oktochange ? "TRUE" : "FALSE" - , fip->field_passcount ? "TRUE" : "FALSE" - , fip->field_name - ); - } -} - -/* - * Return size of TIFFDataType in bytes - */ -int -TIFFDataWidth(TIFFDataType type) -{ - switch(type) - { - case 0: /* nothing */ - case TIFF_BYTE: - case TIFF_ASCII: - case TIFF_SBYTE: - case TIFF_UNDEFINED: - return 1; - case TIFF_SHORT: - case TIFF_SSHORT: - return 2; - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_FLOAT: - case TIFF_IFD: - return 4; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_DOUBLE: - case TIFF_LONG8: - case TIFF_SLONG8: - case TIFF_IFD8: - return 8; - default: - return 0; /* will return 0 for unknown types */ - } -} - -/* - * Return size of TIFFDataType in bytes. - * - * XXX: We need a separate function to determine the space needed - * to store the value. For TIFF_RATIONAL values TIFFDataWidth() returns 8, - * but we use 4-byte float to represent rationals. - */ -int -_TIFFDataSize(TIFFDataType type) -{ - switch (type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_ASCII: - case TIFF_UNDEFINED: - return 1; - case TIFF_SHORT: - case TIFF_SSHORT: - return 2; - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_FLOAT: - case TIFF_IFD: - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - return 4; - case TIFF_DOUBLE: - case TIFF_LONG8: - case TIFF_SLONG8: - case TIFF_IFD8: - return 8; - default: - return 0; - } -} - -const TIFFField* -TIFFFindField(TIFF* tif, uint32 tag, TIFFDataType dt) -{ - TIFFField key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, 0, NULL, NULL}; - TIFFField* pkey = &key; - const TIFFField **ret; - if (tif->tif_foundfield && tif->tif_foundfield->field_tag == tag && - (dt == TIFF_ANY || dt == tif->tif_foundfield->field_type)) - return tif->tif_foundfield; - - /* If we are invoked with no field information, then just return. */ - if (!tif->tif_fields) - return NULL; - - /* NB: use sorted search (e.g. binary search) */ - - key.field_tag = tag; - key.field_type = dt; - - ret = (const TIFFField **) bsearch(&pkey, tif->tif_fields, - tif->tif_nfields, - sizeof(TIFFField *), tagCompare); - return tif->tif_foundfield = (ret ? *ret : NULL); -} - -static const TIFFField* -_TIFFFindFieldByName(TIFF* tif, const char *field_name, TIFFDataType dt) -{ - TIFFField key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, 0, NULL, NULL}; - TIFFField* pkey = &key; - const TIFFField **ret; - if (tif->tif_foundfield - && streq(tif->tif_foundfield->field_name, field_name) - && (dt == TIFF_ANY || dt == tif->tif_foundfield->field_type)) - return (tif->tif_foundfield); - - /* If we are invoked with no field information, then just return. */ - if (!tif->tif_fields) - return NULL; - - /* NB: use linear search since list is sorted by key#, not name */ - - key.field_name = (char *)field_name; - key.field_type = dt; - - ret = (const TIFFField **) - td_lfind(&pkey, tif->tif_fields, &tif->tif_nfields, - sizeof(TIFFField *), tagNameCompare); - - return tif->tif_foundfield = (ret ? *ret : NULL); -} - -const TIFFField* -TIFFFieldWithTag(TIFF* tif, uint32 tag) -{ - const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY); - if (!fip) { - TIFFErrorExt(tif->tif_clientdata, "TIFFFieldWithTag", - "Internal error, unknown tag 0x%x", - (unsigned int) tag); - } - return (fip); -} - -const TIFFField* -TIFFFieldWithName(TIFF* tif, const char *field_name) -{ - const TIFFField* fip = - _TIFFFindFieldByName(tif, field_name, TIFF_ANY); - if (!fip) { - TIFFErrorExt(tif->tif_clientdata, "TIFFFieldWithName", - "Internal error, unknown tag %s", field_name); - } - return (fip); -} - -uint32 -TIFFFieldTag(const TIFFField* fip) -{ - return fip->field_tag; -} - -const char * -TIFFFieldName(const TIFFField* fip) -{ - return fip->field_name; -} - -TIFFDataType -TIFFFieldDataType(const TIFFField* fip) -{ - return fip->field_type; -} - -int -TIFFFieldPassCount(const TIFFField* fip) -{ - return fip->field_passcount; -} - -int -TIFFFieldReadCount(const TIFFField* fip) -{ - return fip->field_readcount; -} - -int -TIFFFieldWriteCount(const TIFFField* fip) -{ - return fip->field_writecount; -} - -const TIFFField* -_TIFFFindOrRegisterField(TIFF *tif, uint32 tag, TIFFDataType dt) - -{ - const TIFFField *fld; - - fld = TIFFFindField(tif, tag, dt); - if (fld == NULL) { - fld = _TIFFCreateAnonField(tif, tag, dt); - if (!_TIFFMergeFields(tif, fld, 1)) - return NULL; - } - - return fld; -} - -TIFFField* -_TIFFCreateAnonField(TIFF *tif, uint32 tag, TIFFDataType field_type) -{ - TIFFField *fld; - (void) tif; - - fld = (TIFFField *) _TIFFmalloc(sizeof (TIFFField)); - if (fld == NULL) - return NULL; - _TIFFmemset(fld, 0, sizeof(TIFFField)); - - fld->field_tag = tag; - fld->field_readcount = TIFF_VARIABLE2; - fld->field_writecount = TIFF_VARIABLE2; - fld->field_type = field_type; - fld->reserved = 0; - switch (field_type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - fld->set_field_type = TIFF_SETGET_C32_UINT8; - fld->get_field_type = TIFF_SETGET_C32_UINT8; - break; - case TIFF_ASCII: - fld->set_field_type = TIFF_SETGET_C32_ASCII; - fld->get_field_type = TIFF_SETGET_C32_ASCII; - break; - case TIFF_SHORT: - fld->set_field_type = TIFF_SETGET_C32_UINT16; - fld->get_field_type = TIFF_SETGET_C32_UINT16; - break; - case TIFF_LONG: - fld->set_field_type = TIFF_SETGET_C32_UINT32; - fld->get_field_type = TIFF_SETGET_C32_UINT32; - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - fld->set_field_type = TIFF_SETGET_C32_FLOAT; - fld->get_field_type = TIFF_SETGET_C32_FLOAT; - break; - case TIFF_SBYTE: - fld->set_field_type = TIFF_SETGET_C32_SINT8; - fld->get_field_type = TIFF_SETGET_C32_SINT8; - break; - case TIFF_SSHORT: - fld->set_field_type = TIFF_SETGET_C32_SINT16; - fld->get_field_type = TIFF_SETGET_C32_SINT16; - break; - case TIFF_SLONG: - fld->set_field_type = TIFF_SETGET_C32_SINT32; - fld->get_field_type = TIFF_SETGET_C32_SINT32; - break; - case TIFF_DOUBLE: - fld->set_field_type = TIFF_SETGET_C32_DOUBLE; - fld->get_field_type = TIFF_SETGET_C32_DOUBLE; - break; - case TIFF_IFD: - case TIFF_IFD8: - fld->set_field_type = TIFF_SETGET_C32_IFD8; - fld->get_field_type = TIFF_SETGET_C32_IFD8; - break; - case TIFF_LONG8: - fld->set_field_type = TIFF_SETGET_C32_UINT64; - fld->get_field_type = TIFF_SETGET_C32_UINT64; - break; - case TIFF_SLONG8: - fld->set_field_type = TIFF_SETGET_C32_SINT64; - fld->get_field_type = TIFF_SETGET_C32_SINT64; - break; - default: - fld->set_field_type = TIFF_SETGET_UNDEFINED; - fld->get_field_type = TIFF_SETGET_UNDEFINED; - break; - } - fld->field_bit = FIELD_CUSTOM; - fld->field_oktochange = TRUE; - fld->field_passcount = TRUE; - fld->field_name = (char *) _TIFFmalloc(32); - if (fld->field_name == NULL) { - _TIFFfree(fld); - return NULL; - } - fld->field_subfields = NULL; - - /* - * note that this name is a special sign to TIFFClose() and - * _TIFFSetupFields() to free the field - */ - (void) snprintf(fld->field_name, 32, "Tag %d", (int) tag); - - return fld; -} - -/**************************************************************************** - * O B S O L E T E D I N T E R F A C E S - * - * Don't use this stuff in your applications, it may be removed in the future - * libtiff versions. - ****************************************************************************/ - -static TIFFSetGetFieldType -_TIFFSetGetType(TIFFDataType type, short count, unsigned char passcount) -{ - if (type == TIFF_ASCII && count == TIFF_VARIABLE && passcount == 0) - return TIFF_SETGET_ASCII; - - else if (count == 1 && passcount == 0) { - switch (type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - return TIFF_SETGET_UINT8; - case TIFF_ASCII: - return TIFF_SETGET_ASCII; - case TIFF_SHORT: - return TIFF_SETGET_UINT16; - case TIFF_LONG: - return TIFF_SETGET_UINT32; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - return TIFF_SETGET_FLOAT; - case TIFF_SBYTE: - return TIFF_SETGET_SINT8; - case TIFF_SSHORT: - return TIFF_SETGET_SINT16; - case TIFF_SLONG: - return TIFF_SETGET_SINT32; - case TIFF_DOUBLE: - return TIFF_SETGET_DOUBLE; - case TIFF_IFD: - case TIFF_IFD8: - return TIFF_SETGET_IFD8; - case TIFF_LONG8: - return TIFF_SETGET_UINT64; - case TIFF_SLONG8: - return TIFF_SETGET_SINT64; - default: - return TIFF_SETGET_UNDEFINED; - } - } - - else if (count >= 1 && passcount == 0) { - switch (type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - return TIFF_SETGET_C0_UINT8; - case TIFF_ASCII: - return TIFF_SETGET_C0_ASCII; - case TIFF_SHORT: - return TIFF_SETGET_C0_UINT16; - case TIFF_LONG: - return TIFF_SETGET_C0_UINT32; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - return TIFF_SETGET_C0_FLOAT; - case TIFF_SBYTE: - return TIFF_SETGET_C0_SINT8; - case TIFF_SSHORT: - return TIFF_SETGET_C0_SINT16; - case TIFF_SLONG: - return TIFF_SETGET_C0_SINT32; - case TIFF_DOUBLE: - return TIFF_SETGET_C0_DOUBLE; - case TIFF_IFD: - case TIFF_IFD8: - return TIFF_SETGET_C0_IFD8; - case TIFF_LONG8: - return TIFF_SETGET_C0_UINT64; - case TIFF_SLONG8: - return TIFF_SETGET_C0_SINT64; - default: - return TIFF_SETGET_UNDEFINED; - } - } - - else if (count == TIFF_VARIABLE && passcount == 1) { - switch (type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - return TIFF_SETGET_C16_UINT8; - case TIFF_ASCII: - return TIFF_SETGET_C16_ASCII; - case TIFF_SHORT: - return TIFF_SETGET_C16_UINT16; - case TIFF_LONG: - return TIFF_SETGET_C16_UINT32; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - return TIFF_SETGET_C16_FLOAT; - case TIFF_SBYTE: - return TIFF_SETGET_C16_SINT8; - case TIFF_SSHORT: - return TIFF_SETGET_C16_SINT16; - case TIFF_SLONG: - return TIFF_SETGET_C16_SINT32; - case TIFF_DOUBLE: - return TIFF_SETGET_C16_DOUBLE; - case TIFF_IFD: - case TIFF_IFD8: - return TIFF_SETGET_C16_IFD8; - case TIFF_LONG8: - return TIFF_SETGET_C16_UINT64; - case TIFF_SLONG8: - return TIFF_SETGET_C16_SINT64; - default: - return TIFF_SETGET_UNDEFINED; - } - } - - else if (count == TIFF_VARIABLE2 && passcount == 1) { - switch (type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - return TIFF_SETGET_C32_UINT8; - case TIFF_ASCII: - return TIFF_SETGET_C32_ASCII; - case TIFF_SHORT: - return TIFF_SETGET_C32_UINT16; - case TIFF_LONG: - return TIFF_SETGET_C32_UINT32; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - return TIFF_SETGET_C32_FLOAT; - case TIFF_SBYTE: - return TIFF_SETGET_C32_SINT8; - case TIFF_SSHORT: - return TIFF_SETGET_C32_SINT16; - case TIFF_SLONG: - return TIFF_SETGET_C32_SINT32; - case TIFF_DOUBLE: - return TIFF_SETGET_C32_DOUBLE; - case TIFF_IFD: - case TIFF_IFD8: - return TIFF_SETGET_C32_IFD8; - case TIFF_LONG8: - return TIFF_SETGET_C32_UINT64; - case TIFF_SLONG8: - return TIFF_SETGET_C32_SINT64; - default: - return TIFF_SETGET_UNDEFINED; - } - } - - return TIFF_SETGET_UNDEFINED; -} - -int -TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], uint32 n) -{ - static const char module[] = "TIFFMergeFieldInfo"; - static const char reason[] = "for fields array"; - TIFFField *tp; - size_t nfields; - uint32 i; - - if (tif->tif_nfieldscompat > 0) { - tif->tif_fieldscompat = (TIFFFieldArray *) - _TIFFCheckRealloc(tif, tif->tif_fieldscompat, - tif->tif_nfieldscompat + 1, - sizeof(TIFFFieldArray), reason); - } else { - tif->tif_fieldscompat = (TIFFFieldArray *) - _TIFFCheckMalloc(tif, 1, sizeof(TIFFFieldArray), - reason); - } - if (!tif->tif_fieldscompat) { - TIFFErrorExt(tif->tif_clientdata, module, - "Failed to allocate fields array"); - return -1; - } - nfields = tif->tif_nfieldscompat++; - - tif->tif_fieldscompat[nfields].type = tfiatOther; - tif->tif_fieldscompat[nfields].allocated_size = n; - tif->tif_fieldscompat[nfields].count = n; - tif->tif_fieldscompat[nfields].fields = - (TIFFField *)_TIFFCheckMalloc(tif, n, sizeof(TIFFField), - reason); - if (!tif->tif_fieldscompat[nfields].fields) { - TIFFErrorExt(tif->tif_clientdata, module, - "Failed to allocate fields array"); - return -1; - } - - tp = tif->tif_fieldscompat[nfields].fields; - for (i = 0; i < n; i++) { - tp->field_tag = info[i].field_tag; - tp->field_readcount = info[i].field_readcount; - tp->field_writecount = info[i].field_writecount; - tp->field_type = info[i].field_type; - tp->reserved = 0; - tp->set_field_type = - _TIFFSetGetType(info[i].field_type, - info[i].field_readcount, - info[i].field_passcount); - tp->get_field_type = - _TIFFSetGetType(info[i].field_type, - info[i].field_readcount, - info[i].field_passcount); - tp->field_bit = info[i].field_bit; - tp->field_oktochange = info[i].field_oktochange; - tp->field_passcount = info[i].field_passcount; - tp->field_name = info[i].field_name; - tp->field_subfields = NULL; - tp++; - } - - if (!_TIFFMergeFields(tif, tif->tif_fieldscompat[nfields].fields, n)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Setting up field info failed"); - return -1; - } - - return 0; -} - -int -_TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag) -{ - /* Filter out non-codec specific tags */ - switch (tag) { - /* Shared tags */ - case TIFFTAG_PREDICTOR: - /* JPEG tags */ - case TIFFTAG_JPEGTABLES: - /* OJPEG tags */ - case TIFFTAG_JPEGIFOFFSET: - case TIFFTAG_JPEGIFBYTECOUNT: - case TIFFTAG_JPEGQTABLES: - case TIFFTAG_JPEGDCTABLES: - case TIFFTAG_JPEGACTABLES: - case TIFFTAG_JPEGPROC: - case TIFFTAG_JPEGRESTARTINTERVAL: - /* CCITT* */ - case TIFFTAG_BADFAXLINES: - case TIFFTAG_CLEANFAXDATA: - case TIFFTAG_CONSECUTIVEBADFAXLINES: - case TIFFTAG_GROUP3OPTIONS: - case TIFFTAG_GROUP4OPTIONS: - break; - default: - return 1; - } - /* Check if codec specific tags are allowed for the current - * compression scheme (codec) */ - switch (tif->tif_dir.td_compression) { - case COMPRESSION_LZW: - if (tag == TIFFTAG_PREDICTOR) - return 1; - break; - case COMPRESSION_PACKBITS: - /* No codec-specific tags */ - break; - case COMPRESSION_THUNDERSCAN: - /* No codec-specific tags */ - break; - case COMPRESSION_NEXT: - /* No codec-specific tags */ - break; - case COMPRESSION_JPEG: - if (tag == TIFFTAG_JPEGTABLES) - return 1; - break; - case COMPRESSION_OJPEG: - switch (tag) { - case TIFFTAG_JPEGIFOFFSET: - case TIFFTAG_JPEGIFBYTECOUNT: - case TIFFTAG_JPEGQTABLES: - case TIFFTAG_JPEGDCTABLES: - case TIFFTAG_JPEGACTABLES: - case TIFFTAG_JPEGPROC: - case TIFFTAG_JPEGRESTARTINTERVAL: - return 1; - } - break; - case COMPRESSION_CCITTRLE: - case COMPRESSION_CCITTRLEW: - case COMPRESSION_CCITTFAX3: - case COMPRESSION_CCITTFAX4: - switch (tag) { - case TIFFTAG_BADFAXLINES: - case TIFFTAG_CLEANFAXDATA: - case TIFFTAG_CONSECUTIVEBADFAXLINES: - return 1; - case TIFFTAG_GROUP3OPTIONS: - if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX3) - return 1; - break; - case TIFFTAG_GROUP4OPTIONS: - if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX4) - return 1; - break; - } - break; - case COMPRESSION_JBIG: - /* No codec-specific tags */ - break; - case COMPRESSION_DEFLATE: - case COMPRESSION_ADOBE_DEFLATE: - if (tag == TIFFTAG_PREDICTOR) - return 1; - break; - case COMPRESSION_PIXARLOG: - if (tag == TIFFTAG_PREDICTOR) - return 1; - break; - case COMPRESSION_SGILOG: - case COMPRESSION_SGILOG24: - /* No codec-specific tags */ - break; - case COMPRESSION_LZMA: - if (tag == TIFFTAG_PREDICTOR) - return 1; - break; - case COMPRESSION_ZSTD: - if (tag == TIFFTAG_PREDICTOR) - return 1; - break; - - } - return 0; -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_dirread.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_dirread.c deleted file mode 100644 index cfe922b..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_dirread.c +++ /dev/null @@ -1,5874 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Directory Read Support Routines. - */ - -/* Suggested pending improvements: - * - add a field 'ignore' to the TIFFDirEntry structure, to flag status, - * eliminating current use of the IGNORE value, and therefore eliminating - * current irrational behaviour on tags with tag id code 0 - * - add a field 'field_info' to the TIFFDirEntry structure, and set that with - * the pointer to the appropriate TIFFField structure early on in - * TIFFReadDirectory, so as to eliminate current possibly repetitive lookup. - */ - -#include "tiffiop.h" -#include -#include - -#define IGNORE 0 /* tag placeholder used below */ -#define FAILED_FII ((uint32) -1) - -#ifdef HAVE_IEEEFP -# define TIFFCvtIEEEFloatToNative(tif, n, fp) -# define TIFFCvtIEEEDoubleToNative(tif, n, dp) -#else -extern void TIFFCvtIEEEFloatToNative(TIFF*, uint32, float*); -extern void TIFFCvtIEEEDoubleToNative(TIFF*, uint32, double*); -#endif - -enum TIFFReadDirEntryErr { - TIFFReadDirEntryErrOk = 0, - TIFFReadDirEntryErrCount = 1, - TIFFReadDirEntryErrType = 2, - TIFFReadDirEntryErrIo = 3, - TIFFReadDirEntryErrRange = 4, - TIFFReadDirEntryErrPsdif = 5, - TIFFReadDirEntryErrSizesan = 6, - TIFFReadDirEntryErrAlloc = 7, -}; - -static enum TIFFReadDirEntryErr TIFFReadDirEntryByte(TIFF* tif, TIFFDirEntry* direntry, uint8* value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryShort(TIFF* tif, TIFFDirEntry* direntry, uint16* value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryLong(TIFF* tif, TIFFDirEntry* direntry, uint32* value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8(TIFF* tif, TIFFDirEntry* direntry, uint64* value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryFloat(TIFF* tif, TIFFDirEntry* direntry, float* value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryDouble(TIFF* tif, TIFFDirEntry* direntry, double* value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryIfd8(TIFF* tif, TIFFDirEntry* direntry, uint64* value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryArray(TIFF* tif, TIFFDirEntry* direntry, uint32* count, uint32 desttypesize, void** value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryByteArray(TIFF* tif, TIFFDirEntry* direntry, uint8** value); -static enum TIFFReadDirEntryErr TIFFReadDirEntrySbyteArray(TIFF* tif, TIFFDirEntry* direntry, int8** value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryShortArray(TIFF* tif, TIFFDirEntry* direntry, uint16** value); -static enum TIFFReadDirEntryErr TIFFReadDirEntrySshortArray(TIFF* tif, TIFFDirEntry* direntry, int16** value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryLongArray(TIFF* tif, TIFFDirEntry* direntry, uint32** value); -static enum TIFFReadDirEntryErr TIFFReadDirEntrySlongArray(TIFF* tif, TIFFDirEntry* direntry, int32** value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8Array(TIFF* tif, TIFFDirEntry* direntry, uint64** value); -static enum TIFFReadDirEntryErr TIFFReadDirEntrySlong8Array(TIFF* tif, TIFFDirEntry* direntry, int64** value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryFloatArray(TIFF* tif, TIFFDirEntry* direntry, float** value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryDoubleArray(TIFF* tif, TIFFDirEntry* direntry, double** value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryIfd8Array(TIFF* tif, TIFFDirEntry* direntry, uint64** value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryPersampleShort(TIFF* tif, TIFFDirEntry* direntry, uint16* value); -#if 0 -static enum TIFFReadDirEntryErr TIFFReadDirEntryPersampleDouble(TIFF* tif, TIFFDirEntry* direntry, double* value); -#endif - -static void TIFFReadDirEntryCheckedByte(TIFF* tif, TIFFDirEntry* direntry, uint8* value); -static void TIFFReadDirEntryCheckedSbyte(TIFF* tif, TIFFDirEntry* direntry, int8* value); -static void TIFFReadDirEntryCheckedShort(TIFF* tif, TIFFDirEntry* direntry, uint16* value); -static void TIFFReadDirEntryCheckedSshort(TIFF* tif, TIFFDirEntry* direntry, int16* value); -static void TIFFReadDirEntryCheckedLong(TIFF* tif, TIFFDirEntry* direntry, uint32* value); -static void TIFFReadDirEntryCheckedSlong(TIFF* tif, TIFFDirEntry* direntry, int32* value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedLong8(TIFF* tif, TIFFDirEntry* direntry, uint64* value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedSlong8(TIFF* tif, TIFFDirEntry* direntry, int64* value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedRational(TIFF* tif, TIFFDirEntry* direntry, double* value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedSrational(TIFF* tif, TIFFDirEntry* direntry, double* value); -static void TIFFReadDirEntryCheckedFloat(TIFF* tif, TIFFDirEntry* direntry, float* value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedDouble(TIFF* tif, TIFFDirEntry* direntry, double* value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSbyte(int8 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteShort(uint16 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSshort(int16 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteLong(uint32 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSlong(int32 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteLong8(uint64 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSlong8(int64 value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteByte(uint8 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteShort(uint16 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteSshort(int16 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteLong(uint32 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteSlong(int32 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteLong8(uint64 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteSlong8(int64 value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSbyte(int8 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSshort(int16 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortLong(uint32 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSlong(int32 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortLong8(uint64 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSlong8(int64 value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortShort(uint16 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortLong(uint32 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortSlong(int32 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortLong8(uint64 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortSlong8(int64 value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSbyte(int8 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSshort(int16 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSlong(int32 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongLong8(uint64 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSlong8(int64 value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlongLong(uint32 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlongLong8(uint64 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlongSlong8(int64 value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLong8Sbyte(int8 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLong8Sshort(int16 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLong8Slong(int32 value); -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLong8Slong8(int64 value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlong8Long8(uint64 value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryData(TIFF* tif, uint64 offset, tmsize_t size, void* dest); -static void TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, const char* module, const char* tagname, int recover); - -static void TIFFReadDirectoryCheckOrder(TIFF* tif, TIFFDirEntry* dir, uint16 dircount); -static TIFFDirEntry* TIFFReadDirectoryFindEntry(TIFF* tif, TIFFDirEntry* dir, uint16 dircount, uint16 tagid); -static void TIFFReadDirectoryFindFieldInfo(TIFF* tif, uint16 tagid, uint32* fii); - -static int EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount); -static void MissingRequired(TIFF*, const char*); -static int TIFFCheckDirOffset(TIFF* tif, uint64 diroff); -static int CheckDirCount(TIFF*, TIFFDirEntry*, uint32); -static uint16 TIFFFetchDirectory(TIFF* tif, uint64 diroff, TIFFDirEntry** pdir, uint64* nextdiroff); -static int TIFFFetchNormalTag(TIFF*, TIFFDirEntry*, int recover); -static int TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, uint32 nstrips, uint64** lpp); -static int TIFFFetchSubjectDistance(TIFF*, TIFFDirEntry*); -static void ChopUpSingleUncompressedStrip(TIFF*); -static uint64 TIFFReadUInt64(const uint8 *value); -static int _TIFFGetMaxColorChannels(uint16 photometric); - -static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount ); - -typedef union _UInt64Aligned_t -{ - double d; - uint64 l; - uint32 i[2]; - uint16 s[4]; - uint8 c[8]; -} UInt64Aligned_t; - -/* - Unaligned safe copy of a uint64 value from an octet array. -*/ -static uint64 TIFFReadUInt64(const uint8 *value) -{ - UInt64Aligned_t result; - - result.c[0]=value[0]; - result.c[1]=value[1]; - result.c[2]=value[2]; - result.c[3]=value[3]; - result.c[4]=value[4]; - result.c[5]=value[5]; - result.c[6]=value[6]; - result.c[7]=value[7]; - - return result.l; -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryByte(TIFF* tif, TIFFDirEntry* direntry, uint8* value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count!=1) - return(TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - TIFFReadDirEntryCheckedByte(tif,direntry,value); - return(TIFFReadDirEntryErrOk); - case TIFF_SBYTE: - { - int8 m; - TIFFReadDirEntryCheckedSbyte(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeByteSbyte(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint8)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16 m; - TIFFReadDirEntryCheckedShort(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeByteShort(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint8)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16 m; - TIFFReadDirEntryCheckedSshort(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeByteSshort(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint8)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32 m; - TIFFReadDirEntryCheckedLong(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeByteLong(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint8)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32 m; - TIFFReadDirEntryCheckedSlong(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeByteSlong(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint8)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64 m; - err=TIFFReadDirEntryCheckedLong8(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - err=TIFFReadDirEntryCheckRangeByteLong8(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint8)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64 m; - err=TIFFReadDirEntryCheckedSlong8(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - err=TIFFReadDirEntryCheckRangeByteSlong8(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint8)m; - return(TIFFReadDirEntryErrOk); - } - default: - return(TIFFReadDirEntryErrType); - } -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryShort(TIFF* tif, TIFFDirEntry* direntry, uint16* value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count!=1) - return(TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8 m; - TIFFReadDirEntryCheckedByte(tif,direntry,&m); - *value=(uint16)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8 m; - TIFFReadDirEntryCheckedSbyte(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeShortSbyte(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint16)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - TIFFReadDirEntryCheckedShort(tif,direntry,value); - return(TIFFReadDirEntryErrOk); - case TIFF_SSHORT: - { - int16 m; - TIFFReadDirEntryCheckedSshort(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeShortSshort(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint16)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32 m; - TIFFReadDirEntryCheckedLong(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeShortLong(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint16)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32 m; - TIFFReadDirEntryCheckedSlong(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeShortSlong(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint16)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64 m; - err=TIFFReadDirEntryCheckedLong8(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - err=TIFFReadDirEntryCheckRangeShortLong8(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint16)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64 m; - err=TIFFReadDirEntryCheckedSlong8(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - err=TIFFReadDirEntryCheckRangeShortSlong8(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint16)m; - return(TIFFReadDirEntryErrOk); - } - default: - return(TIFFReadDirEntryErrType); - } -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryLong(TIFF* tif, TIFFDirEntry* direntry, uint32* value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count!=1) - return(TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8 m; - TIFFReadDirEntryCheckedByte(tif,direntry,&m); - *value=(uint32)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8 m; - TIFFReadDirEntryCheckedSbyte(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeLongSbyte(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint32)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16 m; - TIFFReadDirEntryCheckedShort(tif,direntry,&m); - *value=(uint32)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16 m; - TIFFReadDirEntryCheckedSshort(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeLongSshort(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint32)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - TIFFReadDirEntryCheckedLong(tif,direntry,value); - return(TIFFReadDirEntryErrOk); - case TIFF_SLONG: - { - int32 m; - TIFFReadDirEntryCheckedSlong(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeLongSlong(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint32)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64 m; - err=TIFFReadDirEntryCheckedLong8(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - err=TIFFReadDirEntryCheckRangeLongLong8(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint32)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64 m; - err=TIFFReadDirEntryCheckedSlong8(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - err=TIFFReadDirEntryCheckRangeLongSlong8(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint32)m; - return(TIFFReadDirEntryErrOk); - } - default: - return(TIFFReadDirEntryErrType); - } -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8(TIFF* tif, TIFFDirEntry* direntry, uint64* value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count!=1) - return(TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8 m; - TIFFReadDirEntryCheckedByte(tif,direntry,&m); - *value=(uint64)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8 m; - TIFFReadDirEntryCheckedSbyte(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeLong8Sbyte(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint64)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16 m; - TIFFReadDirEntryCheckedShort(tif,direntry,&m); - *value=(uint64)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16 m; - TIFFReadDirEntryCheckedSshort(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeLong8Sshort(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint64)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32 m; - TIFFReadDirEntryCheckedLong(tif,direntry,&m); - *value=(uint64)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32 m; - TIFFReadDirEntryCheckedSlong(tif,direntry,&m); - err=TIFFReadDirEntryCheckRangeLong8Slong(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint64)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - err=TIFFReadDirEntryCheckedLong8(tif,direntry,value); - return(err); - case TIFF_SLONG8: - { - int64 m; - err=TIFFReadDirEntryCheckedSlong8(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - err=TIFFReadDirEntryCheckRangeLong8Slong8(m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(uint64)m; - return(TIFFReadDirEntryErrOk); - } - default: - return(TIFFReadDirEntryErrType); - } -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryFloat(TIFF* tif, TIFFDirEntry* direntry, float* value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count!=1) - return(TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8 m; - TIFFReadDirEntryCheckedByte(tif,direntry,&m); - *value=(float)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8 m; - TIFFReadDirEntryCheckedSbyte(tif,direntry,&m); - *value=(float)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16 m; - TIFFReadDirEntryCheckedShort(tif,direntry,&m); - *value=(float)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16 m; - TIFFReadDirEntryCheckedSshort(tif,direntry,&m); - *value=(float)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32 m; - TIFFReadDirEntryCheckedLong(tif,direntry,&m); - *value=(float)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32 m; - TIFFReadDirEntryCheckedSlong(tif,direntry,&m); - *value=(float)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64 m; - err=TIFFReadDirEntryCheckedLong8(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); -#if defined(__WIN32__) && (_MSC_VER < 1500) - /* - * XXX: MSVC 6.0 does not support conversion - * of 64-bit integers into floating point - * values. - */ - *value = _TIFFUInt64ToFloat(m); -#else - *value=(float)m; -#endif - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64 m; - err=TIFFReadDirEntryCheckedSlong8(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(float)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_RATIONAL: - { - double m; - err=TIFFReadDirEntryCheckedRational(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(float)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SRATIONAL: - { - double m; - err=TIFFReadDirEntryCheckedSrational(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(float)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_FLOAT: - TIFFReadDirEntryCheckedFloat(tif,direntry,value); - return(TIFFReadDirEntryErrOk); - case TIFF_DOUBLE: - { - double m; - err=TIFFReadDirEntryCheckedDouble(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - if ((m > FLT_MAX) || (m < FLT_MIN)) - return(TIFFReadDirEntryErrRange); - *value=(float)m; - return(TIFFReadDirEntryErrOk); - } - default: - return(TIFFReadDirEntryErrType); - } -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryDouble(TIFF* tif, TIFFDirEntry* direntry, double* value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count!=1) - return(TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8 m; - TIFFReadDirEntryCheckedByte(tif,direntry,&m); - *value=(double)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8 m; - TIFFReadDirEntryCheckedSbyte(tif,direntry,&m); - *value=(double)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16 m; - TIFFReadDirEntryCheckedShort(tif,direntry,&m); - *value=(double)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16 m; - TIFFReadDirEntryCheckedSshort(tif,direntry,&m); - *value=(double)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32 m; - TIFFReadDirEntryCheckedLong(tif,direntry,&m); - *value=(double)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32 m; - TIFFReadDirEntryCheckedSlong(tif,direntry,&m); - *value=(double)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64 m; - err=TIFFReadDirEntryCheckedLong8(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); -#if defined(__WIN32__) && (_MSC_VER < 1500) - /* - * XXX: MSVC 6.0 does not support conversion - * of 64-bit integers into floating point - * values. - */ - *value = _TIFFUInt64ToDouble(m); -#else - *value = (double)m; -#endif - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64 m; - err=TIFFReadDirEntryCheckedSlong8(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - *value=(double)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_RATIONAL: - err=TIFFReadDirEntryCheckedRational(tif,direntry,value); - return(err); - case TIFF_SRATIONAL: - err=TIFFReadDirEntryCheckedSrational(tif,direntry,value); - return(err); - case TIFF_FLOAT: - { - float m; - TIFFReadDirEntryCheckedFloat(tif,direntry,&m); - *value=(double)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_DOUBLE: - err=TIFFReadDirEntryCheckedDouble(tif,direntry,value); - return(err); - default: - return(TIFFReadDirEntryErrType); - } -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryIfd8(TIFF* tif, TIFFDirEntry* direntry, uint64* value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count!=1) - return(TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_LONG: - case TIFF_IFD: - { - uint32 m; - TIFFReadDirEntryCheckedLong(tif,direntry,&m); - *value=(uint64)m; - return(TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - case TIFF_IFD8: - err=TIFFReadDirEntryCheckedLong8(tif,direntry,value); - return(err); - default: - return(TIFFReadDirEntryErrType); - } -} - - -#define INITIAL_THRESHOLD (1024 * 1024) -#define THRESHOLD_MULTIPLIER 10 -#define MAX_THRESHOLD (THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * INITIAL_THRESHOLD) - -static enum TIFFReadDirEntryErr TIFFReadDirEntryDataAndRealloc( - TIFF* tif, uint64 offset, tmsize_t size, void** pdest) -{ -#if SIZEOF_SIZE_T == 8 - tmsize_t threshold = INITIAL_THRESHOLD; -#endif - tmsize_t already_read = 0; - - assert( !isMapped(tif) ); - - if (!SeekOK(tif,offset)) - return(TIFFReadDirEntryErrIo); - - /* On 64 bit processes, read first a maximum of 1 MB, then 10 MB, etc */ - /* so as to avoid allocating too much memory in case the file is too */ - /* short. We could ask for the file size, but this might be */ - /* expensive with some I/O layers (think of reading a gzipped file) */ - /* Restrict to 64 bit processes, so as to avoid reallocs() */ - /* on 32 bit processes where virtual memory is scarce. */ - while( already_read < size ) - { - void* new_dest; - tmsize_t bytes_read; - tmsize_t to_read = size - already_read; -#if SIZEOF_SIZE_T == 8 - if( to_read >= threshold && threshold < MAX_THRESHOLD ) - { - to_read = threshold; - threshold *= THRESHOLD_MULTIPLIER; - } -#endif - - new_dest = (uint8*) _TIFFrealloc( - *pdest, already_read + to_read); - if( new_dest == NULL ) - { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Failed to allocate memory for %s " - "(%ld elements of %ld bytes each)", - "TIFFReadDirEntryArray", - (long) 1, (long) (already_read + to_read)); - return TIFFReadDirEntryErrAlloc; - } - *pdest = new_dest; - - bytes_read = TIFFReadFile(tif, - (char*)*pdest + already_read, to_read); - already_read += bytes_read; - if (bytes_read != to_read) { - return TIFFReadDirEntryErrIo; - } - } - return TIFFReadDirEntryErrOk; -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryArrayWithLimit( - TIFF* tif, TIFFDirEntry* direntry, uint32* count, uint32 desttypesize, - void** value, uint64 maxcount) -{ - int typesize; - uint32 datasize; - void* data; - uint64 target_count64; - typesize=TIFFDataWidth(direntry->tdir_type); - - target_count64 = (direntry->tdir_count > maxcount) ? - maxcount : direntry->tdir_count; - - if ((target_count64==0)||(typesize==0)) - { - *value=0; - return(TIFFReadDirEntryErrOk); - } - (void) desttypesize; - - /* - * As a sanity check, make sure we have no more than a 2GB tag array - * in either the current data type or the dest data type. This also - * avoids problems with overflow of tmsize_t on 32bit systems. - */ - if ((uint64)(2147483647/typesize)0); - - if( isMapped(tif) && datasize > (uint32)tif->tif_size ) - return TIFFReadDirEntryErrIo; - - if( !isMapped(tif) && - (((tif->tif_flags&TIFF_BIGTIFF) && datasize > 8) || - (!(tif->tif_flags&TIFF_BIGTIFF) && datasize > 4)) ) - { - data = NULL; - } - else - { - data=_TIFFCheckMalloc(tif, *count, typesize, "ReadDirEntryArray"); - if (data==0) - return(TIFFReadDirEntryErrAlloc); - } - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - if (datasize<=4) - _TIFFmemcpy(data,&direntry->tdir_offset,datasize); - else - { - enum TIFFReadDirEntryErr err; - uint32 offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&offset); - if( isMapped(tif) ) - err=TIFFReadDirEntryData(tif,(uint64)offset,(tmsize_t)datasize,data); - else - err=TIFFReadDirEntryDataAndRealloc(tif,(uint64)offset,(tmsize_t)datasize,&data); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } - } - } - else - { - if (datasize<=8) - _TIFFmemcpy(data,&direntry->tdir_offset,datasize); - else - { - enum TIFFReadDirEntryErr err; - uint64 offset = direntry->tdir_offset.toff_long8; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8(&offset); - if( isMapped(tif) ) - err=TIFFReadDirEntryData(tif,(uint64)offset,(tmsize_t)datasize,data); - else - err=TIFFReadDirEntryDataAndRealloc(tif,(uint64)offset,(tmsize_t)datasize,&data); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } - } - } - *value=data; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryArray(TIFF* tif, TIFFDirEntry* direntry, uint32* count, uint32 desttypesize, void** value) -{ - return TIFFReadDirEntryArrayWithLimit(tif, direntry, count, - desttypesize, value, ~((uint64)0)); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryByteArray(TIFF* tif, TIFFDirEntry* direntry, uint8** value) -{ - enum TIFFReadDirEntryErr err; - uint32 count; - void* origdata; - uint8* data; - switch (direntry->tdir_type) - { - case TIFF_ASCII: - case TIFF_UNDEFINED: - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return(TIFFReadDirEntryErrType); - } - err=TIFFReadDirEntryArray(tif,direntry,&count,1,&origdata); - if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) - { - *value=0; - return(err); - } - switch (direntry->tdir_type) - { - case TIFF_ASCII: - case TIFF_UNDEFINED: - case TIFF_BYTE: - *value=(uint8*)origdata; - return(TIFFReadDirEntryErrOk); - case TIFF_SBYTE: - { - int8* m; - uint32 n; - m=(int8*)origdata; - for (n=0; ntdir_type) - { - case TIFF_SHORT: - { - uint16* ma; - uint8* mb; - uint32 n; - ma=(uint16*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort(ma); - err=TIFFReadDirEntryCheckRangeByteShort(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint8)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16* ma; - uint8* mb; - uint32 n; - ma=(int16*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)ma); - err=TIFFReadDirEntryCheckRangeByteSshort(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint8)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32* ma; - uint8* mb; - uint32 n; - ma=(uint32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - err=TIFFReadDirEntryCheckRangeByteLong(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint8)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32* ma; - uint8* mb; - uint32 n; - ma=(int32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)ma); - err=TIFFReadDirEntryCheckRangeByteSlong(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint8)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64* ma; - uint8* mb; - uint32 n; - ma=(uint64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8(ma); - err=TIFFReadDirEntryCheckRangeByteLong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint8)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64* ma; - uint8* mb; - uint32 n; - ma=(int64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)ma); - err=TIFFReadDirEntryCheckRangeByteSlong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint8)(*ma++); - } - } - break; - } - _TIFFfree(origdata); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } - *value=data; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntrySbyteArray(TIFF* tif, TIFFDirEntry* direntry, int8** value) -{ - enum TIFFReadDirEntryErr err; - uint32 count; - void* origdata; - int8* data; - switch (direntry->tdir_type) - { - case TIFF_UNDEFINED: - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return(TIFFReadDirEntryErrType); - } - err=TIFFReadDirEntryArray(tif,direntry,&count,1,&origdata); - if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) - { - *value=0; - return(err); - } - switch (direntry->tdir_type) - { - case TIFF_UNDEFINED: - case TIFF_BYTE: - { - uint8* m; - uint32 n; - m=(uint8*)origdata; - for (n=0; ntdir_type) - { - case TIFF_SHORT: - { - uint16* ma; - int8* mb; - uint32 n; - ma=(uint16*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort(ma); - err=TIFFReadDirEntryCheckRangeSbyteShort(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int8)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16* ma; - int8* mb; - uint32 n; - ma=(int16*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)ma); - err=TIFFReadDirEntryCheckRangeSbyteSshort(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int8)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32* ma; - int8* mb; - uint32 n; - ma=(uint32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - err=TIFFReadDirEntryCheckRangeSbyteLong(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int8)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32* ma; - int8* mb; - uint32 n; - ma=(int32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)ma); - err=TIFFReadDirEntryCheckRangeSbyteSlong(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int8)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64* ma; - int8* mb; - uint32 n; - ma=(uint64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8(ma); - err=TIFFReadDirEntryCheckRangeSbyteLong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int8)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64* ma; - int8* mb; - uint32 n; - ma=(int64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)ma); - err=TIFFReadDirEntryCheckRangeSbyteSlong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int8)(*ma++); - } - } - break; - } - _TIFFfree(origdata); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } - *value=data; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryShortArray(TIFF* tif, TIFFDirEntry* direntry, uint16** value) -{ - enum TIFFReadDirEntryErr err; - uint32 count; - void* origdata; - uint16* data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return(TIFFReadDirEntryErrType); - } - err=TIFFReadDirEntryArray(tif,direntry,&count,2,&origdata); - if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) - { - *value=0; - return(err); - } - switch (direntry->tdir_type) - { - case TIFF_SHORT: - *value=(uint16*)origdata; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfShort(*value,count); - return(TIFFReadDirEntryErrOk); - case TIFF_SSHORT: - { - int16* m; - uint32 n; - m=(int16*)origdata; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)m); - err=TIFFReadDirEntryCheckRangeShortSshort(*m); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(origdata); - return(err); - } - m++; - } - *value=(uint16*)origdata; - return(TIFFReadDirEntryErrOk); - } - } - data=(uint16*)_TIFFmalloc(count*2); - if (data==0) - { - _TIFFfree(origdata); - return(TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8* ma; - uint16* mb; - uint32 n; - ma=(uint8*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - err=TIFFReadDirEntryCheckRangeShortLong(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint16)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32* ma; - uint16* mb; - uint32 n; - ma=(int32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)ma); - err=TIFFReadDirEntryCheckRangeShortSlong(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint16)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64* ma; - uint16* mb; - uint32 n; - ma=(uint64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8(ma); - err=TIFFReadDirEntryCheckRangeShortLong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint16)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64* ma; - uint16* mb; - uint32 n; - ma=(int64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)ma); - err=TIFFReadDirEntryCheckRangeShortSlong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint16)(*ma++); - } - } - break; - } - _TIFFfree(origdata); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } - *value=data; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntrySshortArray(TIFF* tif, TIFFDirEntry* direntry, int16** value) -{ - enum TIFFReadDirEntryErr err; - uint32 count; - void* origdata; - int16* data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return(TIFFReadDirEntryErrType); - } - err=TIFFReadDirEntryArray(tif,direntry,&count,2,&origdata); - if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) - { - *value=0; - return(err); - } - switch (direntry->tdir_type) - { - case TIFF_SHORT: - { - uint16* m; - uint32 n; - m=(uint16*)origdata; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort(m); - err=TIFFReadDirEntryCheckRangeSshortShort(*m); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(origdata); - return(err); - } - m++; - } - *value=(int16*)origdata; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - *value=(int16*)origdata; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfShort((uint16*)(*value),count); - return(TIFFReadDirEntryErrOk); - } - data=(int16*)_TIFFmalloc(count*2); - if (data==0) - { - _TIFFfree(origdata); - return(TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8* ma; - int16* mb; - uint32 n; - ma=(uint8*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - err=TIFFReadDirEntryCheckRangeSshortLong(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int16)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32* ma; - int16* mb; - uint32 n; - ma=(int32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)ma); - err=TIFFReadDirEntryCheckRangeSshortSlong(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int16)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64* ma; - int16* mb; - uint32 n; - ma=(uint64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8(ma); - err=TIFFReadDirEntryCheckRangeSshortLong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int16)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64* ma; - int16* mb; - uint32 n; - ma=(int64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)ma); - err=TIFFReadDirEntryCheckRangeSshortSlong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int16)(*ma++); - } - } - break; - } - _TIFFfree(origdata); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } - *value=data; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryLongArray(TIFF* tif, TIFFDirEntry* direntry, uint32** value) -{ - enum TIFFReadDirEntryErr err; - uint32 count; - void* origdata; - uint32* data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return(TIFFReadDirEntryErrType); - } - err=TIFFReadDirEntryArray(tif,direntry,&count,4,&origdata); - if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) - { - *value=0; - return(err); - } - switch (direntry->tdir_type) - { - case TIFF_LONG: - *value=(uint32*)origdata; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong(*value,count); - return(TIFFReadDirEntryErrOk); - case TIFF_SLONG: - { - int32* m; - uint32 n; - m=(int32*)origdata; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)m); - err=TIFFReadDirEntryCheckRangeLongSlong(*m); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(origdata); - return(err); - } - m++; - } - *value=(uint32*)origdata; - return(TIFFReadDirEntryErrOk); - } - } - data=(uint32*)_TIFFmalloc(count*4); - if (data==0) - { - _TIFFfree(origdata); - return(TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8* ma; - uint32* mb; - uint32 n; - ma=(uint8*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort(ma); - *mb++=(uint32)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16* ma; - uint32* mb; - uint32 n; - ma=(int16*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)ma); - err=TIFFReadDirEntryCheckRangeLongSshort(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint32)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64* ma; - uint32* mb; - uint32 n; - ma=(uint64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8(ma); - err=TIFFReadDirEntryCheckRangeLongLong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint32)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64* ma; - uint32* mb; - uint32 n; - ma=(int64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)ma); - err=TIFFReadDirEntryCheckRangeLongSlong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint32)(*ma++); - } - } - break; - } - _TIFFfree(origdata); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } - *value=data; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntrySlongArray(TIFF* tif, TIFFDirEntry* direntry, int32** value) -{ - enum TIFFReadDirEntryErr err; - uint32 count; - void* origdata; - int32* data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return(TIFFReadDirEntryErrType); - } - err=TIFFReadDirEntryArray(tif,direntry,&count,4,&origdata); - if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) - { - *value=0; - return(err); - } - switch (direntry->tdir_type) - { - case TIFF_LONG: - { - uint32* m; - uint32 n; - m=(uint32*)origdata; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)m); - err=TIFFReadDirEntryCheckRangeSlongLong(*m); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(origdata); - return(err); - } - m++; - } - *value=(int32*)origdata; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - *value=(int32*)origdata; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong((uint32*)(*value),count); - return(TIFFReadDirEntryErrOk); - } - data=(int32*)_TIFFmalloc(count*4); - if (data==0) - { - _TIFFfree(origdata); - return(TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8* ma; - int32* mb; - uint32 n; - ma=(uint8*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort(ma); - *mb++=(int32)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16* ma; - int32* mb; - uint32 n; - ma=(int16*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)ma); - *mb++=(int32)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64* ma; - int32* mb; - uint32 n; - ma=(uint64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8(ma); - err=TIFFReadDirEntryCheckRangeSlongLong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int32)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64* ma; - int32* mb; - uint32 n; - ma=(int64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)ma); - err=TIFFReadDirEntryCheckRangeSlongSlong8(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(int32)(*ma++); - } - } - break; - } - _TIFFfree(origdata); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } - *value=data; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8ArrayWithLimit( - TIFF* tif, TIFFDirEntry* direntry, uint64** value, uint64 maxcount) -{ - enum TIFFReadDirEntryErr err; - uint32 count; - void* origdata; - uint64* data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return(TIFFReadDirEntryErrType); - } - err=TIFFReadDirEntryArrayWithLimit(tif,direntry,&count,8,&origdata,maxcount); - if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) - { - *value=0; - return(err); - } - switch (direntry->tdir_type) - { - case TIFF_LONG8: - *value=(uint64*)origdata; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong8(*value,count); - return(TIFFReadDirEntryErrOk); - case TIFF_SLONG8: - { - int64* m; - uint32 n; - m=(int64*)origdata; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)m); - err=TIFFReadDirEntryCheckRangeLong8Slong8(*m); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(origdata); - return(err); - } - m++; - } - *value=(uint64*)origdata; - return(TIFFReadDirEntryErrOk); - } - } - data=(uint64*)_TIFFmalloc(count*8); - if (data==0) - { - _TIFFfree(origdata); - return(TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8* ma; - uint64* mb; - uint32 n; - ma=(uint8*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort(ma); - *mb++=(uint64)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16* ma; - uint64* mb; - uint32 n; - ma=(int16*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)ma); - err=TIFFReadDirEntryCheckRangeLong8Sshort(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint64)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32* ma; - uint64* mb; - uint32 n; - ma=(uint32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - *mb++=(uint64)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32* ma; - uint64* mb; - uint32 n; - ma=(int32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)ma); - err=TIFFReadDirEntryCheckRangeLong8Slong(*ma); - if (err!=TIFFReadDirEntryErrOk) - break; - *mb++=(uint64)(*ma++); - } - } - break; - } - _TIFFfree(origdata); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } - *value=data; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8Array(TIFF* tif, TIFFDirEntry* direntry, uint64** value) -{ - return TIFFReadDirEntryLong8ArrayWithLimit(tif, direntry, value, ~((uint64)0)); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntrySlong8Array(TIFF* tif, TIFFDirEntry* direntry, int64** value) -{ - enum TIFFReadDirEntryErr err; - uint32 count; - void* origdata; - int64* data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return(TIFFReadDirEntryErrType); - } - err=TIFFReadDirEntryArray(tif,direntry,&count,8,&origdata); - if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) - { - *value=0; - return(err); - } - switch (direntry->tdir_type) - { - case TIFF_LONG8: - { - uint64* m; - uint32 n; - m=(uint64*)origdata; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8(m); - err=TIFFReadDirEntryCheckRangeSlong8Long8(*m); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(origdata); - return(err); - } - m++; - } - *value=(int64*)origdata; - return(TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - *value=(int64*)origdata; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong8((uint64*)(*value),count); - return(TIFFReadDirEntryErrOk); - } - data=(int64*)_TIFFmalloc(count*8); - if (data==0) - { - _TIFFfree(origdata); - return(TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8* ma; - int64* mb; - uint32 n; - ma=(uint8*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort(ma); - *mb++=(int64)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16* ma; - int64* mb; - uint32 n; - ma=(int16*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)ma); - *mb++=(int64)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32* ma; - int64* mb; - uint32 n; - ma=(uint32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - *mb++=(int64)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32* ma; - int64* mb; - uint32 n; - ma=(int32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)ma); - *mb++=(int64)(*ma++); - } - } - break; - } - _TIFFfree(origdata); - *value=data; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryFloatArray(TIFF* tif, TIFFDirEntry* direntry, float** value) -{ - enum TIFFReadDirEntryErr err; - uint32 count; - void* origdata; - float* data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - case TIFF_DOUBLE: - break; - default: - return(TIFFReadDirEntryErrType); - } - err=TIFFReadDirEntryArray(tif,direntry,&count,4,&origdata); - if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) - { - *value=0; - return(err); - } - switch (direntry->tdir_type) - { - case TIFF_FLOAT: - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong((uint32*)origdata,count); - TIFFCvtIEEEDoubleToNative(tif,count,(float*)origdata); - *value=(float*)origdata; - return(TIFFReadDirEntryErrOk); - } - data=(float*)_TIFFmalloc(count*sizeof(float)); - if (data==0) - { - _TIFFfree(origdata); - return(TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8* ma; - float* mb; - uint32 n; - ma=(uint8*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort(ma); - *mb++=(float)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16* ma; - float* mb; - uint32 n; - ma=(int16*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)ma); - *mb++=(float)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32* ma; - float* mb; - uint32 n; - ma=(uint32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - *mb++=(float)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32* ma; - float* mb; - uint32 n; - ma=(int32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)ma); - *mb++=(float)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64* ma; - float* mb; - uint32 n; - ma=(uint64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8(ma); -#if defined(__WIN32__) && (_MSC_VER < 1500) - /* - * XXX: MSVC 6.0 does not support - * conversion of 64-bit integers into - * floating point values. - */ - *mb++ = _TIFFUInt64ToFloat(*ma++); -#else - *mb++ = (float)(*ma++); -#endif - } - } - break; - case TIFF_SLONG8: - { - int64* ma; - float* mb; - uint32 n; - ma=(int64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)ma); - *mb++=(float)(*ma++); - } - } - break; - case TIFF_RATIONAL: - { - uint32* ma; - uint32 maa; - uint32 mab; - float* mb; - uint32 n; - ma=(uint32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - maa=*ma++; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - mab=*ma++; - if (mab==0) - *mb++=0.0; - else - *mb++=(float)maa/(float)mab; - } - } - break; - case TIFF_SRATIONAL: - { - uint32* ma; - int32 maa; - uint32 mab; - float* mb; - uint32 n; - ma=(uint32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - maa=*(int32*)ma; - ma++; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - mab=*ma++; - if (mab==0) - *mb++=0.0; - else - *mb++=(float)maa/(float)mab; - } - } - break; - case TIFF_DOUBLE: - { - double* ma; - float* mb; - uint32 n; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong8((uint64*)origdata,count); - TIFFCvtIEEEDoubleToNative(tif,count,(double*)origdata); - ma=(double*)origdata; - mb=data; - for (n=0; n FLT_MAX ) - val = FLT_MAX; - else if( val < -FLT_MAX ) - val = -FLT_MAX; - *mb++=(float)val; - } - } - break; - } - _TIFFfree(origdata); - *value=data; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryDoubleArray(TIFF* tif, TIFFDirEntry* direntry, double** value) -{ - enum TIFFReadDirEntryErr err; - uint32 count; - void* origdata; - double* data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - case TIFF_DOUBLE: - break; - default: - return(TIFFReadDirEntryErrType); - } - err=TIFFReadDirEntryArray(tif,direntry,&count,8,&origdata); - if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) - { - *value=0; - return(err); - } - switch (direntry->tdir_type) - { - case TIFF_DOUBLE: - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong8((uint64*)origdata,count); - TIFFCvtIEEEDoubleToNative(tif,count,(double*)origdata); - *value=(double*)origdata; - return(TIFFReadDirEntryErrOk); - } - data=(double*)_TIFFmalloc(count*sizeof(double)); - if (data==0) - { - _TIFFfree(origdata); - return(TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8* ma; - double* mb; - uint32 n; - ma=(uint8*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort(ma); - *mb++=(double)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16* ma; - double* mb; - uint32 n; - ma=(int16*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)ma); - *mb++=(double)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32* ma; - double* mb; - uint32 n; - ma=(uint32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - *mb++=(double)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32* ma; - double* mb; - uint32 n; - ma=(int32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)ma); - *mb++=(double)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64* ma; - double* mb; - uint32 n; - ma=(uint64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8(ma); -#if defined(__WIN32__) && (_MSC_VER < 1500) - /* - * XXX: MSVC 6.0 does not support - * conversion of 64-bit integers into - * floating point values. - */ - *mb++ = _TIFFUInt64ToDouble(*ma++); -#else - *mb++ = (double)(*ma++); -#endif - } - } - break; - case TIFF_SLONG8: - { - int64* ma; - double* mb; - uint32 n; - ma=(int64*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)ma); - *mb++=(double)(*ma++); - } - } - break; - case TIFF_RATIONAL: - { - uint32* ma; - uint32 maa; - uint32 mab; - double* mb; - uint32 n; - ma=(uint32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - maa=*ma++; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - mab=*ma++; - if (mab==0) - *mb++=0.0; - else - *mb++=(double)maa/(double)mab; - } - } - break; - case TIFF_SRATIONAL: - { - uint32* ma; - int32 maa; - uint32 mab; - double* mb; - uint32 n; - ma=(uint32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - maa=*(int32*)ma; - ma++; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - mab=*ma++; - if (mab==0) - *mb++=0.0; - else - *mb++=(double)maa/(double)mab; - } - } - break; - case TIFF_FLOAT: - { - float* ma; - double* mb; - uint32 n; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong((uint32*)origdata,count); - TIFFCvtIEEEFloatToNative(tif,count,(float*)origdata); - ma=(float*)origdata; - mb=data; - for (n=0; ntdir_type) - { - case TIFF_LONG: - case TIFF_LONG8: - case TIFF_IFD: - case TIFF_IFD8: - break; - default: - return(TIFFReadDirEntryErrType); - } - err=TIFFReadDirEntryArray(tif,direntry,&count,8,&origdata); - if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) - { - *value=0; - return(err); - } - switch (direntry->tdir_type) - { - case TIFF_LONG8: - case TIFF_IFD8: - *value=(uint64*)origdata; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong8(*value,count); - return(TIFFReadDirEntryErrOk); - } - data=(uint64*)_TIFFmalloc(count*8); - if (data==0) - { - _TIFFfree(origdata); - return(TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_LONG: - case TIFF_IFD: - { - uint32* ma; - uint64* mb; - uint32 n; - ma=(uint32*)origdata; - mb=data; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabLong(ma); - *mb++=(uint64)(*ma++); - } - } - break; - } - _TIFFfree(origdata); - *value=data; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryPersampleShort(TIFF* tif, TIFFDirEntry* direntry, uint16* value) -{ - enum TIFFReadDirEntryErr err; - uint16* m; - uint16* na; - uint16 nb; - if (direntry->tdir_count<(uint64)tif->tif_dir.td_samplesperpixel) - return(TIFFReadDirEntryErrCount); - err=TIFFReadDirEntryShortArray(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk || m == NULL) - return(err); - na=m; - nb=tif->tif_dir.td_samplesperpixel; - *value=*na++; - nb--; - while (nb>0) - { - if (*na++!=*value) - { - err=TIFFReadDirEntryErrPsdif; - break; - } - nb--; - } - _TIFFfree(m); - return(err); -} - -#if 0 -static enum TIFFReadDirEntryErr TIFFReadDirEntryPersampleDouble(TIFF* tif, TIFFDirEntry* direntry, double* value) -{ - enum TIFFReadDirEntryErr err; - double* m; - double* na; - uint16 nb; - if (direntry->tdir_count<(uint64)tif->tif_dir.td_samplesperpixel) - return(TIFFReadDirEntryErrCount); - err=TIFFReadDirEntryDoubleArray(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) - return(err); - na=m; - nb=tif->tif_dir.td_samplesperpixel; - *value=*na++; - nb--; - while (nb>0) - { - if (*na++!=*value) - { - err=TIFFReadDirEntryErrPsdif; - break; - } - nb--; - } - _TIFFfree(m); - return(err); -} -#endif - -static void TIFFReadDirEntryCheckedByte(TIFF* tif, TIFFDirEntry* direntry, uint8* value) -{ - (void) tif; - *value=*(uint8*)(&direntry->tdir_offset); -} - -static void TIFFReadDirEntryCheckedSbyte(TIFF* tif, TIFFDirEntry* direntry, int8* value) -{ - (void) tif; - *value=*(int8*)(&direntry->tdir_offset); -} - -static void TIFFReadDirEntryCheckedShort(TIFF* tif, TIFFDirEntry* direntry, uint16* value) -{ - *value = direntry->tdir_offset.toff_short; - /* *value=*(uint16*)(&direntry->tdir_offset); */ - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort(value); -} - -static void TIFFReadDirEntryCheckedSshort(TIFF* tif, TIFFDirEntry* direntry, int16* value) -{ - *value=*(int16*)(&direntry->tdir_offset); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)value); -} - -static void TIFFReadDirEntryCheckedLong(TIFF* tif, TIFFDirEntry* direntry, uint32* value) -{ - *value=*(uint32*)(&direntry->tdir_offset); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(value); -} - -static void TIFFReadDirEntryCheckedSlong(TIFF* tif, TIFFDirEntry* direntry, int32* value) -{ - *value=*(int32*)(&direntry->tdir_offset); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)value); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedLong8(TIFF* tif, TIFFDirEntry* direntry, uint64* value) -{ - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - enum TIFFReadDirEntryErr err; - uint32 offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&offset); - err=TIFFReadDirEntryData(tif,offset,8,value); - if (err!=TIFFReadDirEntryErrOk) - return(err); - } - else - *value = direntry->tdir_offset.toff_long8; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8(value); - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedSlong8(TIFF* tif, TIFFDirEntry* direntry, int64* value) -{ - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - enum TIFFReadDirEntryErr err; - uint32 offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&offset); - err=TIFFReadDirEntryData(tif,offset,8,value); - if (err!=TIFFReadDirEntryErrOk) - return(err); - } - else - *value=*(int64*)(&direntry->tdir_offset); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)value); - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedRational(TIFF* tif, TIFFDirEntry* direntry, double* value) -{ - UInt64Aligned_t m; - - assert(sizeof(double)==8); - assert(sizeof(uint64)==8); - assert(sizeof(uint32)==4); - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - enum TIFFReadDirEntryErr err; - uint32 offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&offset); - err=TIFFReadDirEntryData(tif,offset,8,m.i); - if (err!=TIFFReadDirEntryErrOk) - return(err); - } - else - m.l = direntry->tdir_offset.toff_long8; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong(m.i,2); - /* Not completely sure what we should do when m.i[1]==0, but some */ - /* sanitizers do not like division by 0.0: */ - /* http://bugzilla.maptools.org/show_bug.cgi?id=2644 */ - if (m.i[0]==0 || m.i[1]==0) - *value=0.0; - else - *value=(double)m.i[0]/(double)m.i[1]; - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedSrational(TIFF* tif, TIFFDirEntry* direntry, double* value) -{ - UInt64Aligned_t m; - assert(sizeof(double)==8); - assert(sizeof(uint64)==8); - assert(sizeof(int32)==4); - assert(sizeof(uint32)==4); - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - enum TIFFReadDirEntryErr err; - uint32 offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&offset); - err=TIFFReadDirEntryData(tif,offset,8,m.i); - if (err!=TIFFReadDirEntryErrOk) - return(err); - } - else - m.l=direntry->tdir_offset.toff_long8; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong(m.i,2); - /* Not completely sure what we should do when m.i[1]==0, but some */ - /* sanitizers do not like division by 0.0: */ - /* http://bugzilla.maptools.org/show_bug.cgi?id=2644 */ - if ((int32)m.i[0]==0 || m.i[1]==0) - *value=0.0; - else - *value=(double)((int32)m.i[0])/(double)m.i[1]; - return(TIFFReadDirEntryErrOk); -} - -static void TIFFReadDirEntryCheckedFloat(TIFF* tif, TIFFDirEntry* direntry, float* value) -{ - union - { - float f; - uint32 i; - } float_union; - assert(sizeof(float)==4); - assert(sizeof(uint32)==4); - assert(sizeof(float_union)==4); - float_union.i=*(uint32*)(&direntry->tdir_offset); - *value=float_union.f; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)value); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedDouble(TIFF* tif, TIFFDirEntry* direntry, double* value) -{ - assert(sizeof(double)==8); - assert(sizeof(uint64)==8); - assert(sizeof(UInt64Aligned_t)==8); - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - enum TIFFReadDirEntryErr err; - uint32 offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&offset); - err=TIFFReadDirEntryData(tif,offset,8,value); - if (err!=TIFFReadDirEntryErrOk) - return(err); - } - else - { - UInt64Aligned_t uint64_union; - uint64_union.l=direntry->tdir_offset.toff_long8; - *value=uint64_union.d; - } - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)value); - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSbyte(int8 value) -{ - if (value<0) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteShort(uint16 value) -{ - if (value>0xFF) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSshort(int16 value) -{ - if ((value<0)||(value>0xFF)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteLong(uint32 value) -{ - if (value>0xFF) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSlong(int32 value) -{ - if ((value<0)||(value>0xFF)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteLong8(uint64 value) -{ - if (value>0xFF) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSlong8(int64 value) -{ - if ((value<0)||(value>0xFF)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteByte(uint8 value) -{ - if (value>0x7F) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteShort(uint16 value) -{ - if (value>0x7F) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteSshort(int16 value) -{ - if ((value<-0x80)||(value>0x7F)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteLong(uint32 value) -{ - if (value>0x7F) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteSlong(int32 value) -{ - if ((value<-0x80)||(value>0x7F)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteLong8(uint64 value) -{ - if (value>0x7F) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteSlong8(int64 value) -{ - if ((value<-0x80)||(value>0x7F)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSbyte(int8 value) -{ - if (value<0) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSshort(int16 value) -{ - if (value<0) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortLong(uint32 value) -{ - if (value>0xFFFF) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSlong(int32 value) -{ - if ((value<0)||(value>0xFFFF)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortLong8(uint64 value) -{ - if (value>0xFFFF) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSlong8(int64 value) -{ - if ((value<0)||(value>0xFFFF)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortShort(uint16 value) -{ - if (value>0x7FFF) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortLong(uint32 value) -{ - if (value>0x7FFF) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortSlong(int32 value) -{ - if ((value<-0x8000)||(value>0x7FFF)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortLong8(uint64 value) -{ - if (value>0x7FFF) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortSlong8(int64 value) -{ - if ((value<-0x8000)||(value>0x7FFF)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSbyte(int8 value) -{ - if (value<0) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSshort(int16 value) -{ - if (value<0) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSlong(int32 value) -{ - if (value<0) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -/* - * Largest 32-bit unsigned integer value. - */ -#define TIFF_UINT32_MAX 0xFFFFFFFFU - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongLong8(uint64 value) -{ - if (value > TIFF_UINT32_MAX) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongSlong8(int64 value) -{ - if ((value < 0) || (value > (int64) TIFF_UINT32_MAX)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -#undef TIFF_UINT32_MAX - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlongLong(uint32 value) -{ - if (value > 0x7FFFFFFFUL) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -/* Check that the 8-byte unsigned value can fit in a 4-byte unsigned range */ -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlongLong8(uint64 value) -{ - if (value > 0x7FFFFFFF) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -/* Check that the 8-byte signed value can fit in a 4-byte signed range */ -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlongSlong8(int64 value) -{ - if ((value < 0-((int64) 0x7FFFFFFF+1)) || (value > 0x7FFFFFFF)) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Sbyte(int8 value) -{ - if (value < 0) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Sshort(int16 value) -{ - if (value < 0) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Slong(int32 value) -{ - if (value < 0) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Slong8(int64 value) -{ - if (value < 0) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -/* - * Largest 64-bit signed integer value. - */ -#define TIFF_INT64_MAX ((int64)(((uint64) ~0) >> 1)) - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlong8Long8(uint64 value) -{ - if (value > TIFF_INT64_MAX) - return(TIFFReadDirEntryErrRange); - else - return(TIFFReadDirEntryErrOk); -} - -#undef TIFF_INT64_MAX - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryData(TIFF* tif, uint64 offset, tmsize_t size, void* dest) -{ - assert(size>0); - if (!isMapped(tif)) { - if (!SeekOK(tif,offset)) - return(TIFFReadDirEntryErrIo); - if (!ReadOK(tif,dest,size)) - return(TIFFReadDirEntryErrIo); - } else { - size_t ma,mb; - ma=(size_t)offset; - mb=ma+size; - if (((uint64)ma!=offset) - || (mb < ma) - || (mb - ma != (size_t) size) - || (mb < (size_t)size) - || (mb > (size_t)tif->tif_size) - ) - return(TIFFReadDirEntryErrIo); - _TIFFmemcpy(dest,tif->tif_base+ma,size); - } - return(TIFFReadDirEntryErrOk); -} - -static void TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, const char* module, const char* tagname, int recover) -{ - if (!recover) { - switch (err) { - case TIFFReadDirEntryErrCount: - TIFFErrorExt(tif->tif_clientdata, module, - "Incorrect count for \"%s\"", - tagname); - break; - case TIFFReadDirEntryErrType: - TIFFErrorExt(tif->tif_clientdata, module, - "Incompatible type for \"%s\"", - tagname); - break; - case TIFFReadDirEntryErrIo: - TIFFErrorExt(tif->tif_clientdata, module, - "IO error during reading of \"%s\"", - tagname); - break; - case TIFFReadDirEntryErrRange: - TIFFErrorExt(tif->tif_clientdata, module, - "Incorrect value for \"%s\"", - tagname); - break; - case TIFFReadDirEntryErrPsdif: - TIFFErrorExt(tif->tif_clientdata, module, - "Cannot handle different values per sample for \"%s\"", - tagname); - break; - case TIFFReadDirEntryErrSizesan: - TIFFErrorExt(tif->tif_clientdata, module, - "Sanity check on size of \"%s\" value failed", - tagname); - break; - case TIFFReadDirEntryErrAlloc: - TIFFErrorExt(tif->tif_clientdata, module, - "Out of memory reading of \"%s\"", - tagname); - break; - default: - assert(0); /* we should never get here */ - break; - } - } else { - switch (err) { - case TIFFReadDirEntryErrCount: - TIFFWarningExt(tif->tif_clientdata, module, - "Incorrect count for \"%s\"; tag ignored", - tagname); - break; - case TIFFReadDirEntryErrType: - TIFFWarningExt(tif->tif_clientdata, module, - "Incompatible type for \"%s\"; tag ignored", - tagname); - break; - case TIFFReadDirEntryErrIo: - TIFFWarningExt(tif->tif_clientdata, module, - "IO error during reading of \"%s\"; tag ignored", - tagname); - break; - case TIFFReadDirEntryErrRange: - TIFFWarningExt(tif->tif_clientdata, module, - "Incorrect value for \"%s\"; tag ignored", - tagname); - break; - case TIFFReadDirEntryErrPsdif: - TIFFWarningExt(tif->tif_clientdata, module, - "Cannot handle different values per sample for \"%s\"; tag ignored", - tagname); - break; - case TIFFReadDirEntryErrSizesan: - TIFFWarningExt(tif->tif_clientdata, module, - "Sanity check on size of \"%s\" value failed; tag ignored", - tagname); - break; - case TIFFReadDirEntryErrAlloc: - TIFFWarningExt(tif->tif_clientdata, module, - "Out of memory reading of \"%s\"; tag ignored", - tagname); - break; - default: - assert(0); /* we should never get here */ - break; - } - } -} - -/* - * Return the maximum number of color channels specified for a given photometric - * type. 0 is returned if photometric type isn't supported or no default value - * is defined by the specification. - */ -static int _TIFFGetMaxColorChannels( uint16 photometric ) -{ - switch (photometric) { - case PHOTOMETRIC_PALETTE: - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - return 1; - case PHOTOMETRIC_YCBCR: - case PHOTOMETRIC_RGB: - case PHOTOMETRIC_CIELAB: - case PHOTOMETRIC_LOGLUV: - case PHOTOMETRIC_ITULAB: - case PHOTOMETRIC_ICCLAB: - return 3; - case PHOTOMETRIC_SEPARATED: - case PHOTOMETRIC_MASK: - return 4; - case PHOTOMETRIC_LOGL: - case PHOTOMETRIC_CFA: - default: - return 0; - } -} - -/* - * Read the next TIFF directory from a file and convert it to the internal - * format. We read directories sequentially. - */ -int -TIFFReadDirectory(TIFF* tif) -{ - static const char module[] = "TIFFReadDirectory"; - TIFFDirEntry* dir; - uint16 dircount; - TIFFDirEntry* dp; - uint16 di; - const TIFFField* fip; - uint32 fii=FAILED_FII; - toff_t nextdiroff; - int bitspersample_read = FALSE; - int color_channels; - - tif->tif_diroff=tif->tif_nextdiroff; - if (!TIFFCheckDirOffset(tif,tif->tif_nextdiroff)) - return 0; /* last offset or bad offset (IFD looping) */ - (*tif->tif_cleanup)(tif); /* cleanup any previous compression state */ - tif->tif_curdir++; - nextdiroff = tif->tif_nextdiroff; - dircount=TIFFFetchDirectory(tif,nextdiroff,&dir,&tif->tif_nextdiroff); - if (!dircount) - { - TIFFErrorExt(tif->tif_clientdata,module, - "Failed to read directory at offset " TIFF_UINT64_FORMAT,nextdiroff); - return 0; - } - TIFFReadDirectoryCheckOrder(tif,dir,dircount); - - /* - * Mark duplicates of any tag to be ignored (bugzilla 1994) - * to avoid certain pathological problems. - */ - { - TIFFDirEntry* ma; - uint16 mb; - for (ma=dir, mb=0; mbtdir_tag==na->tdir_tag) - na->tdir_tag=IGNORE; - } - } - } - - tif->tif_flags &= ~TIFF_BEENWRITING; /* reset before new dir */ - tif->tif_flags &= ~TIFF_BUF4WRITE; /* reset before new dir */ - /* free any old stuff and reinit */ - TIFFFreeDirectory(tif); - TIFFDefaultDirectory(tif); - /* - * Electronic Arts writes gray-scale TIFF files - * without a PlanarConfiguration directory entry. - * Thus we setup a default value here, even though - * the TIFF spec says there is no default value. - */ - TIFFSetField(tif,TIFFTAG_PLANARCONFIG,PLANARCONFIG_CONTIG); - /* - * Setup default value and then make a pass over - * the fields to check type and tag information, - * and to extract info required to size data - * structures. A second pass is made afterwards - * to read in everything not taken in the first pass. - * But we must process the Compression tag first - * in order to merge in codec-private tag definitions (otherwise - * we may get complaints about unknown tags). However, the - * Compression tag may be dependent on the SamplesPerPixel - * tag value because older TIFF specs permitted Compression - * to be written as a SamplesPerPixel-count tag entry. - * Thus if we don't first figure out the correct SamplesPerPixel - * tag value then we may end up ignoring the Compression tag - * value because it has an incorrect count value (if the - * true value of SamplesPerPixel is not 1). - */ - dp=TIFFReadDirectoryFindEntry(tif,dir,dircount,TIFFTAG_SAMPLESPERPIXEL); - if (dp) - { - if (!TIFFFetchNormalTag(tif,dp,0)) - goto bad; - dp->tdir_tag=IGNORE; - } - dp=TIFFReadDirectoryFindEntry(tif,dir,dircount,TIFFTAG_COMPRESSION); - if (dp) - { - /* - * The 5.0 spec says the Compression tag has one value, while - * earlier specs say it has one value per sample. Because of - * this, we accept the tag if one value is supplied with either - * count. - */ - uint16 value; - enum TIFFReadDirEntryErr err; - err=TIFFReadDirEntryShort(tif,dp,&value); - if (err==TIFFReadDirEntryErrCount) - err=TIFFReadDirEntryPersampleShort(tif,dp,&value); - if (err!=TIFFReadDirEntryErrOk) - { - TIFFReadDirEntryOutputErr(tif,err,module,"Compression",0); - goto bad; - } - if (!TIFFSetField(tif,TIFFTAG_COMPRESSION,value)) - goto bad; - dp->tdir_tag=IGNORE; - } - else - { - if (!TIFFSetField(tif,TIFFTAG_COMPRESSION,COMPRESSION_NONE)) - goto bad; - } - /* - * First real pass over the directory. - */ - for (di=0, dp=dir; ditdir_tag!=IGNORE) - { - TIFFReadDirectoryFindFieldInfo(tif,dp->tdir_tag,&fii); - if (fii == FAILED_FII) - { - TIFFWarningExt(tif->tif_clientdata, module, - "Unknown field with tag %d (0x%x) encountered", - dp->tdir_tag,dp->tdir_tag); - /* the following knowingly leaks the - anonymous field structure */ - if (!_TIFFMergeFields(tif, - _TIFFCreateAnonField(tif, - dp->tdir_tag, - (TIFFDataType) dp->tdir_type), - 1)) { - TIFFWarningExt(tif->tif_clientdata, - module, - "Registering anonymous field with tag %d (0x%x) failed", - dp->tdir_tag, - dp->tdir_tag); - dp->tdir_tag=IGNORE; - } else { - TIFFReadDirectoryFindFieldInfo(tif,dp->tdir_tag,&fii); - assert(fii != FAILED_FII); - } - } - } - if (dp->tdir_tag!=IGNORE) - { - fip=tif->tif_fields[fii]; - if (fip->field_bit==FIELD_IGNORE) - dp->tdir_tag=IGNORE; - else - { - switch (dp->tdir_tag) - { - case TIFFTAG_STRIPOFFSETS: - case TIFFTAG_STRIPBYTECOUNTS: - case TIFFTAG_TILEOFFSETS: - case TIFFTAG_TILEBYTECOUNTS: - TIFFSetFieldBit(tif,fip->field_bit); - break; - case TIFFTAG_IMAGEWIDTH: - case TIFFTAG_IMAGELENGTH: - case TIFFTAG_IMAGEDEPTH: - case TIFFTAG_TILELENGTH: - case TIFFTAG_TILEWIDTH: - case TIFFTAG_TILEDEPTH: - case TIFFTAG_PLANARCONFIG: - case TIFFTAG_ROWSPERSTRIP: - case TIFFTAG_EXTRASAMPLES: - if (!TIFFFetchNormalTag(tif,dp,0)) - goto bad; - dp->tdir_tag=IGNORE; - break; - default: - if( !_TIFFCheckFieldIsValidForCodec(tif, dp->tdir_tag) ) - dp->tdir_tag=IGNORE; - break; - } - } - } - } - /* - * XXX: OJPEG hack. - * If a) compression is OJPEG, b) planarconfig tag says it's separate, - * c) strip offsets/bytecounts tag are both present and - * d) both contain exactly one value, then we consistently find - * that the buggy implementation of the buggy compression scheme - * matches contig planarconfig best. So we 'fix-up' the tag here - */ - if ((tif->tif_dir.td_compression==COMPRESSION_OJPEG)&& - (tif->tif_dir.td_planarconfig==PLANARCONFIG_SEPARATE)) - { - if (!_TIFFFillStriles(tif)) - goto bad; - dp=TIFFReadDirectoryFindEntry(tif,dir,dircount,TIFFTAG_STRIPOFFSETS); - if ((dp!=0)&&(dp->tdir_count==1)) - { - dp=TIFFReadDirectoryFindEntry(tif,dir,dircount, - TIFFTAG_STRIPBYTECOUNTS); - if ((dp!=0)&&(dp->tdir_count==1)) - { - tif->tif_dir.td_planarconfig=PLANARCONFIG_CONTIG; - TIFFWarningExt(tif->tif_clientdata,module, - "Planarconfig tag value assumed incorrect, " - "assuming data is contig instead of chunky"); - } - } - } - /* - * Allocate directory structure and setup defaults. - */ - if (!TIFFFieldSet(tif,FIELD_IMAGEDIMENSIONS)) - { - MissingRequired(tif,"ImageLength"); - goto bad; - } - /* - * Setup appropriate structures (by strip or by tile) - */ - if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) { - tif->tif_dir.td_nstrips = TIFFNumberOfStrips(tif); - tif->tif_dir.td_tilewidth = tif->tif_dir.td_imagewidth; - tif->tif_dir.td_tilelength = tif->tif_dir.td_rowsperstrip; - tif->tif_dir.td_tiledepth = tif->tif_dir.td_imagedepth; - tif->tif_flags &= ~TIFF_ISTILED; - } else { - tif->tif_dir.td_nstrips = TIFFNumberOfTiles(tif); - tif->tif_flags |= TIFF_ISTILED; - } - if (!tif->tif_dir.td_nstrips) { - TIFFErrorExt(tif->tif_clientdata, module, - "Cannot handle zero number of %s", - isTiled(tif) ? "tiles" : "strips"); - goto bad; - } - tif->tif_dir.td_stripsperimage = tif->tif_dir.td_nstrips; - if (tif->tif_dir.td_planarconfig == PLANARCONFIG_SEPARATE) - tif->tif_dir.td_stripsperimage /= tif->tif_dir.td_samplesperpixel; - if (!TIFFFieldSet(tif, FIELD_STRIPOFFSETS)) { -#ifdef OJPEG_SUPPORT - if ((tif->tif_dir.td_compression==COMPRESSION_OJPEG) && - (isTiled(tif)==0) && - (tif->tif_dir.td_nstrips==1)) { - /* - * XXX: OJPEG hack. - * If a) compression is OJPEG, b) it's not a tiled TIFF, - * and c) the number of strips is 1, - * then we tolerate the absence of stripoffsets tag, - * because, presumably, all required data is in the - * JpegInterchangeFormat stream. - */ - TIFFSetFieldBit(tif, FIELD_STRIPOFFSETS); - } else -#endif - { - MissingRequired(tif, - isTiled(tif) ? "TileOffsets" : "StripOffsets"); - goto bad; - } - } - /* - * Second pass: extract other information. - */ - for (di=0, dp=dir; ditdir_tag) - { - case IGNORE: - break; - case TIFFTAG_MINSAMPLEVALUE: - case TIFFTAG_MAXSAMPLEVALUE: - case TIFFTAG_BITSPERSAMPLE: - case TIFFTAG_DATATYPE: - case TIFFTAG_SAMPLEFORMAT: - /* - * The MinSampleValue, MaxSampleValue, BitsPerSample - * DataType and SampleFormat tags are supposed to be - * written as one value/sample, but some vendors - * incorrectly write one value only -- so we accept - * that as well (yuck). Other vendors write correct - * value for NumberOfSamples, but incorrect one for - * BitsPerSample and friends, and we will read this - * too. - */ - { - uint16 value; - enum TIFFReadDirEntryErr err; - err=TIFFReadDirEntryShort(tif,dp,&value); - if (err==TIFFReadDirEntryErrCount) - err=TIFFReadDirEntryPersampleShort(tif,dp,&value); - if (err!=TIFFReadDirEntryErrOk) - { - fip = TIFFFieldWithTag(tif,dp->tdir_tag); - TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",0); - goto bad; - } - if (!TIFFSetField(tif,dp->tdir_tag,value)) - goto bad; - if( dp->tdir_tag == TIFFTAG_BITSPERSAMPLE ) - bitspersample_read = TRUE; - } - break; - case TIFFTAG_SMINSAMPLEVALUE: - case TIFFTAG_SMAXSAMPLEVALUE: - { - - double *data = NULL; - enum TIFFReadDirEntryErr err; - uint32 saved_flags; - int m; - if (dp->tdir_count != (uint64)tif->tif_dir.td_samplesperpixel) - err = TIFFReadDirEntryErrCount; - else - err = TIFFReadDirEntryDoubleArray(tif, dp, &data); - if (err!=TIFFReadDirEntryErrOk) - { - fip = TIFFFieldWithTag(tif,dp->tdir_tag); - TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",0); - goto bad; - } - saved_flags = tif->tif_flags; - tif->tif_flags |= TIFF_PERSAMPLE; - m = TIFFSetField(tif,dp->tdir_tag,data); - tif->tif_flags = saved_flags; - _TIFFfree(data); - if (!m) - goto bad; - } - break; - case TIFFTAG_STRIPOFFSETS: - case TIFFTAG_TILEOFFSETS: -#if defined(DEFER_STRILE_LOAD) - _TIFFmemcpy( &(tif->tif_dir.td_stripoffset_entry), - dp, sizeof(TIFFDirEntry) ); -#else - if( tif->tif_dir.td_stripoffset != NULL ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "tif->tif_dir.td_stripoffset is " - "already allocated. Likely duplicated " - "StripOffsets/TileOffsets tag"); - goto bad; - } - if (!TIFFFetchStripThing(tif,dp,tif->tif_dir.td_nstrips,&tif->tif_dir.td_stripoffset)) - goto bad; -#endif - break; - case TIFFTAG_STRIPBYTECOUNTS: - case TIFFTAG_TILEBYTECOUNTS: -#if defined(DEFER_STRILE_LOAD) - _TIFFmemcpy( &(tif->tif_dir.td_stripbytecount_entry), - dp, sizeof(TIFFDirEntry) ); -#else - if( tif->tif_dir.td_stripbytecount != NULL ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "tif->tif_dir.td_stripbytecount is " - "already allocated. Likely duplicated " - "StripByteCounts/TileByteCounts tag"); - goto bad; - } - if (!TIFFFetchStripThing(tif,dp,tif->tif_dir.td_nstrips,&tif->tif_dir.td_stripbytecount)) - goto bad; -#endif - break; - case TIFFTAG_COLORMAP: - case TIFFTAG_TRANSFERFUNCTION: - { - enum TIFFReadDirEntryErr err; - uint32 countpersample; - uint32 countrequired; - uint32 incrementpersample; - uint16* value=NULL; - /* It would be dangerous to instantiate those tag values */ - /* since if td_bitspersample has not yet been read (due to */ - /* unordered tags), it could be read afterwards with a */ - /* values greater than the default one (1), which may cause */ - /* crashes in user code */ - if( !bitspersample_read ) - { - fip = TIFFFieldWithTag(tif,dp->tdir_tag); - TIFFWarningExt(tif->tif_clientdata,module, - "Ignoring %s since BitsPerSample tag not found", - fip ? fip->field_name : "unknown tagname"); - continue; - } - /* ColorMap or TransferFunction for high bit */ - /* depths do not make much sense and could be */ - /* used as a denial of service vector */ - if (tif->tif_dir.td_bitspersample > 24) - { - fip = TIFFFieldWithTag(tif,dp->tdir_tag); - TIFFWarningExt(tif->tif_clientdata,module, - "Ignoring %s because BitsPerSample=%d>24", - fip ? fip->field_name : "unknown tagname", - tif->tif_dir.td_bitspersample); - continue; - } - countpersample=(1U<tif_dir.td_bitspersample); - if ((dp->tdir_tag==TIFFTAG_TRANSFERFUNCTION)&&(dp->tdir_count==(uint64)countpersample)) - { - countrequired=countpersample; - incrementpersample=0; - } - else - { - countrequired=3*countpersample; - incrementpersample=countpersample; - } - if (dp->tdir_count!=(uint64)countrequired) - err=TIFFReadDirEntryErrCount; - else - err=TIFFReadDirEntryShortArray(tif,dp,&value); - if (err!=TIFFReadDirEntryErrOk) - { - fip = TIFFFieldWithTag(tif,dp->tdir_tag); - TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",1); - } - else - { - TIFFSetField(tif,dp->tdir_tag,value,value+incrementpersample,value+2*incrementpersample); - _TIFFfree(value); - } - } - break; -/* BEGIN REV 4.0 COMPATIBILITY */ - case TIFFTAG_OSUBFILETYPE: - { - uint16 valueo; - uint32 value; - if (TIFFReadDirEntryShort(tif,dp,&valueo)==TIFFReadDirEntryErrOk) - { - switch (valueo) - { - case OFILETYPE_REDUCEDIMAGE: value=FILETYPE_REDUCEDIMAGE; break; - case OFILETYPE_PAGE: value=FILETYPE_PAGE; break; - default: value=0; break; - } - if (value!=0) - TIFFSetField(tif,TIFFTAG_SUBFILETYPE,value); - } - } - break; -/* END REV 4.0 COMPATIBILITY */ - default: - (void) TIFFFetchNormalTag(tif, dp, TRUE); - break; - } - } - /* - * OJPEG hack: - * - If a) compression is OJPEG, and b) photometric tag is missing, - * then we consistently find that photometric should be YCbCr - * - If a) compression is OJPEG, and b) photometric tag says it's RGB, - * then we consistently find that the buggy implementation of the - * buggy compression scheme matches photometric YCbCr instead. - * - If a) compression is OJPEG, and b) bitspersample tag is missing, - * then we consistently find bitspersample should be 8. - * - If a) compression is OJPEG, b) samplesperpixel tag is missing, - * and c) photometric is RGB or YCbCr, then we consistently find - * samplesperpixel should be 3 - * - If a) compression is OJPEG, b) samplesperpixel tag is missing, - * and c) photometric is MINISWHITE or MINISBLACK, then we consistently - * find samplesperpixel should be 3 - */ - if (tif->tif_dir.td_compression==COMPRESSION_OJPEG) - { - if (!TIFFFieldSet(tif,FIELD_PHOTOMETRIC)) - { - TIFFWarningExt(tif->tif_clientdata, module, - "Photometric tag is missing, assuming data is YCbCr"); - if (!TIFFSetField(tif,TIFFTAG_PHOTOMETRIC,PHOTOMETRIC_YCBCR)) - goto bad; - } - else if (tif->tif_dir.td_photometric==PHOTOMETRIC_RGB) - { - tif->tif_dir.td_photometric=PHOTOMETRIC_YCBCR; - TIFFWarningExt(tif->tif_clientdata, module, - "Photometric tag value assumed incorrect, " - "assuming data is YCbCr instead of RGB"); - } - if (!TIFFFieldSet(tif,FIELD_BITSPERSAMPLE)) - { - TIFFWarningExt(tif->tif_clientdata,module, - "BitsPerSample tag is missing, assuming 8 bits per sample"); - if (!TIFFSetField(tif,TIFFTAG_BITSPERSAMPLE,8)) - goto bad; - } - if (!TIFFFieldSet(tif,FIELD_SAMPLESPERPIXEL)) - { - if (tif->tif_dir.td_photometric==PHOTOMETRIC_RGB) - { - TIFFWarningExt(tif->tif_clientdata,module, - "SamplesPerPixel tag is missing, " - "assuming correct SamplesPerPixel value is 3"); - if (!TIFFSetField(tif,TIFFTAG_SAMPLESPERPIXEL,3)) - goto bad; - } - if (tif->tif_dir.td_photometric==PHOTOMETRIC_YCBCR) - { - TIFFWarningExt(tif->tif_clientdata,module, - "SamplesPerPixel tag is missing, " - "applying correct SamplesPerPixel value of 3"); - if (!TIFFSetField(tif,TIFFTAG_SAMPLESPERPIXEL,3)) - goto bad; - } - else if ((tif->tif_dir.td_photometric==PHOTOMETRIC_MINISWHITE) - || (tif->tif_dir.td_photometric==PHOTOMETRIC_MINISBLACK)) - { - /* - * SamplesPerPixel tag is missing, but is not required - * by spec. Assume correct SamplesPerPixel value of 1. - */ - if (!TIFFSetField(tif,TIFFTAG_SAMPLESPERPIXEL,1)) - goto bad; - } - } - } - - /* - * Make sure all non-color channels are extrasamples. - * If it's not the case, define them as such. - */ - color_channels = _TIFFGetMaxColorChannels(tif->tif_dir.td_photometric); - if (color_channels && tif->tif_dir.td_samplesperpixel - tif->tif_dir.td_extrasamples > color_channels) { - uint16 old_extrasamples; - uint16 *new_sampleinfo; - - TIFFWarningExt(tif->tif_clientdata,module, "Sum of Photometric type-related " - "color channels and ExtraSamples doesn't match SamplesPerPixel. " - "Defining non-color channels as ExtraSamples."); - - old_extrasamples = tif->tif_dir.td_extrasamples; - tif->tif_dir.td_extrasamples = (uint16) (tif->tif_dir.td_samplesperpixel - color_channels); - - // sampleinfo should contain information relative to these new extra samples - new_sampleinfo = (uint16*) _TIFFcalloc(tif->tif_dir.td_extrasamples, sizeof(uint16)); - if (!new_sampleinfo) { - TIFFErrorExt(tif->tif_clientdata, module, "Failed to allocate memory for " - "temporary new sampleinfo array (%d 16 bit elements)", - tif->tif_dir.td_extrasamples); - goto bad; - } - - memcpy(new_sampleinfo, tif->tif_dir.td_sampleinfo, old_extrasamples * sizeof(uint16)); - _TIFFsetShortArray(&tif->tif_dir.td_sampleinfo, new_sampleinfo, tif->tif_dir.td_extrasamples); - _TIFFfree(new_sampleinfo); - } - - /* - * Verify Palette image has a Colormap. - */ - if (tif->tif_dir.td_photometric == PHOTOMETRIC_PALETTE && - !TIFFFieldSet(tif, FIELD_COLORMAP)) { - if ( tif->tif_dir.td_bitspersample>=8 && tif->tif_dir.td_samplesperpixel==3) - tif->tif_dir.td_photometric = PHOTOMETRIC_RGB; - else if (tif->tif_dir.td_bitspersample>=8) - tif->tif_dir.td_photometric = PHOTOMETRIC_MINISBLACK; - else { - MissingRequired(tif, "Colormap"); - goto bad; - } - } - /* - * OJPEG hack: - * We do no further messing with strip/tile offsets/bytecounts in OJPEG - * TIFFs - */ - if (tif->tif_dir.td_compression!=COMPRESSION_OJPEG) - { - /* - * Attempt to deal with a missing StripByteCounts tag. - */ - if (!TIFFFieldSet(tif, FIELD_STRIPBYTECOUNTS)) { - /* - * Some manufacturers violate the spec by not giving - * the size of the strips. In this case, assume there - * is one uncompressed strip of data. - */ - if ((tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG && - tif->tif_dir.td_nstrips > 1) || - (tif->tif_dir.td_planarconfig == PLANARCONFIG_SEPARATE && - tif->tif_dir.td_nstrips != (uint32)tif->tif_dir.td_samplesperpixel)) { - MissingRequired(tif, "StripByteCounts"); - goto bad; - } - TIFFWarningExt(tif->tif_clientdata, module, - "TIFF directory is missing required " - "\"StripByteCounts\" field, calculating from imagelength"); - if (EstimateStripByteCounts(tif, dir, dircount) < 0) - goto bad; - /* - * Assume we have wrong StripByteCount value (in case - * of single strip) in following cases: - * - it is equal to zero along with StripOffset; - * - it is larger than file itself (in case of uncompressed - * image); - * - it is smaller than the size of the bytes per row - * multiplied on the number of rows. The last case should - * not be checked in the case of writing new image, - * because we may do not know the exact strip size - * until the whole image will be written and directory - * dumped out. - */ - #define BYTECOUNTLOOKSBAD \ - ( (tif->tif_dir.td_stripbytecount[0] == 0 && tif->tif_dir.td_stripoffset[0] != 0) || \ - (tif->tif_dir.td_compression == COMPRESSION_NONE && \ - (tif->tif_dir.td_stripoffset[0] <= TIFFGetFileSize(tif) && \ - tif->tif_dir.td_stripbytecount[0] > TIFFGetFileSize(tif) - tif->tif_dir.td_stripoffset[0])) || \ - (tif->tif_mode == O_RDONLY && \ - tif->tif_dir.td_compression == COMPRESSION_NONE && \ - tif->tif_dir.td_stripbytecount[0] < TIFFScanlineSize64(tif) * tif->tif_dir.td_imagelength) ) - - } else if (tif->tif_dir.td_nstrips == 1 - && !(tif->tif_flags&TIFF_ISTILED) - && _TIFFFillStriles(tif) - && tif->tif_dir.td_stripoffset[0] != 0 - && BYTECOUNTLOOKSBAD) { - /* - * XXX: Plexus (and others) sometimes give a value of - * zero for a tag when they don't know what the - * correct value is! Try and handle the simple case - * of estimating the size of a one strip image. - */ - TIFFWarningExt(tif->tif_clientdata, module, - "Bogus \"StripByteCounts\" field, ignoring and calculating from imagelength"); - if(EstimateStripByteCounts(tif, dir, dircount) < 0) - goto bad; - -#if !defined(DEFER_STRILE_LOAD) - } else if (tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG - && tif->tif_dir.td_nstrips > 2 - && tif->tif_dir.td_compression == COMPRESSION_NONE - && tif->tif_dir.td_stripbytecount[0] != tif->tif_dir.td_stripbytecount[1] - && tif->tif_dir.td_stripbytecount[0] != 0 - && tif->tif_dir.td_stripbytecount[1] != 0 ) { - /* - * XXX: Some vendors fill StripByteCount array with - * absolutely wrong values (it can be equal to - * StripOffset array, for example). Catch this case - * here. - * - * We avoid this check if deferring strile loading - * as it would always force us to load the strip/tile - * information. - */ - TIFFWarningExt(tif->tif_clientdata, module, - "Wrong \"StripByteCounts\" field, ignoring and calculating from imagelength"); - if (EstimateStripByteCounts(tif, dir, dircount) < 0) - goto bad; -#endif /* !defined(DEFER_STRILE_LOAD) */ - } - } - if (dir) - { - _TIFFfree(dir); - dir=NULL; - } - if (!TIFFFieldSet(tif, FIELD_MAXSAMPLEVALUE)) - { - if (tif->tif_dir.td_bitspersample>=16) - tif->tif_dir.td_maxsamplevalue=0xFFFF; - else - tif->tif_dir.td_maxsamplevalue = (uint16)((1L<tif_dir.td_bitspersample)-1); - } - /* - * XXX: We can optimize checking for the strip bounds using the sorted - * bytecounts array. See also comments for TIFFAppendToStrip() - * function in tif_write.c. - */ -#if !defined(DEFER_STRILE_LOAD) - if (tif->tif_dir.td_nstrips > 1) { - uint32 strip; - - tif->tif_dir.td_stripbytecountsorted = 1; - for (strip = 1; strip < tif->tif_dir.td_nstrips; strip++) { - if (tif->tif_dir.td_stripoffset[strip - 1] > - tif->tif_dir.td_stripoffset[strip]) { - tif->tif_dir.td_stripbytecountsorted = 0; - break; - } - } - } -#endif /* !defined(DEFER_STRILE_LOAD) */ - - /* - * An opportunity for compression mode dependent tag fixup - */ - (*tif->tif_fixuptags)(tif); - - /* - * Some manufacturers make life difficult by writing - * large amounts of uncompressed data as a single strip. - * This is contrary to the recommendations of the spec. - * The following makes an attempt at breaking such images - * into strips closer to the recommended 8k bytes. A - * side effect, however, is that the RowsPerStrip tag - * value may be changed. - */ - if ((tif->tif_dir.td_planarconfig==PLANARCONFIG_CONTIG)&& - (tif->tif_dir.td_nstrips==1)&& - (tif->tif_dir.td_compression==COMPRESSION_NONE)&& - ((tif->tif_flags&(TIFF_STRIPCHOP|TIFF_ISTILED))==TIFF_STRIPCHOP)) - { - if ( !_TIFFFillStriles(tif) || !tif->tif_dir.td_stripbytecount ) - return 0; - ChopUpSingleUncompressedStrip(tif); - } - - /* - * Clear the dirty directory flag. - */ - tif->tif_flags &= ~TIFF_DIRTYDIRECT; - tif->tif_flags &= ~TIFF_DIRTYSTRIP; - - /* - * Reinitialize i/o since we are starting on a new directory. - */ - tif->tif_row = (uint32) -1; - tif->tif_curstrip = (uint32) -1; - tif->tif_col = (uint32) -1; - tif->tif_curtile = (uint32) -1; - tif->tif_tilesize = (tmsize_t) -1; - - tif->tif_scanlinesize = TIFFScanlineSize(tif); - if (!tif->tif_scanlinesize) { - TIFFErrorExt(tif->tif_clientdata, module, - "Cannot handle zero scanline size"); - return (0); - } - - if (isTiled(tif)) { - tif->tif_tilesize = TIFFTileSize(tif); - if (!tif->tif_tilesize) { - TIFFErrorExt(tif->tif_clientdata, module, - "Cannot handle zero tile size"); - return (0); - } - } else { - if (!TIFFStripSize(tif)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Cannot handle zero strip size"); - return (0); - } - } - return (1); -bad: - if (dir) - _TIFFfree(dir); - return (0); -} - -static void -TIFFReadDirectoryCheckOrder(TIFF* tif, TIFFDirEntry* dir, uint16 dircount) -{ - static const char module[] = "TIFFReadDirectoryCheckOrder"; - uint16 m; - uint16 n; - TIFFDirEntry* o; - m=0; - for (n=0, o=dir; ntdir_tagtif_clientdata,module, - "Invalid TIFF directory; tags are not sorted in ascending order"); - break; - } - m=o->tdir_tag+1; - } -} - -static TIFFDirEntry* -TIFFReadDirectoryFindEntry(TIFF* tif, TIFFDirEntry* dir, uint16 dircount, uint16 tagid) -{ - TIFFDirEntry* m; - uint16 n; - (void) tif; - for (m=dir, n=0; ntdir_tag==tagid) - return(m); - } - return(0); -} - -static void -TIFFReadDirectoryFindFieldInfo(TIFF* tif, uint16 tagid, uint32* fii) -{ - int32 ma,mb,mc; - ma=-1; - mc=(int32)tif->tif_nfields; - while (1) - { - if (ma+1==mc) - { - *fii = FAILED_FII; - return; - } - mb=(ma+mc)/2; - if (tif->tif_fields[mb]->field_tag==(uint32)tagid) - break; - if (tif->tif_fields[mb]->field_tag<(uint32)tagid) - ma=mb; - else - mc=mb; - } - while (1) - { - if (mb==0) - break; - if (tif->tif_fields[mb-1]->field_tag!=(uint32)tagid) - break; - mb--; - } - *fii=mb; -} - -/* - * Read custom directory from the arbitrary offset. - * The code is very similar to TIFFReadDirectory(). - */ -int -TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, - const TIFFFieldArray* infoarray) -{ - static const char module[] = "TIFFReadCustomDirectory"; - TIFFDirEntry* dir; - uint16 dircount; - TIFFDirEntry* dp; - uint16 di; - const TIFFField* fip; - uint32 fii; - _TIFFSetupFields(tif, infoarray); - dircount=TIFFFetchDirectory(tif,diroff,&dir,NULL); - if (!dircount) - { - TIFFErrorExt(tif->tif_clientdata,module, - "Failed to read custom directory at offset " TIFF_UINT64_FORMAT,diroff); - return 0; - } - TIFFFreeDirectory(tif); - _TIFFmemset(&tif->tif_dir, 0, sizeof(TIFFDirectory)); - TIFFReadDirectoryCheckOrder(tif,dir,dircount); - for (di=0, dp=dir; ditdir_tag,&fii); - if (fii == FAILED_FII) - { - TIFFWarningExt(tif->tif_clientdata, module, - "Unknown field with tag %d (0x%x) encountered", - dp->tdir_tag, dp->tdir_tag); - if (!_TIFFMergeFields(tif, _TIFFCreateAnonField(tif, - dp->tdir_tag, - (TIFFDataType) dp->tdir_type), - 1)) { - TIFFWarningExt(tif->tif_clientdata, module, - "Registering anonymous field with tag %d (0x%x) failed", - dp->tdir_tag, dp->tdir_tag); - dp->tdir_tag=IGNORE; - } else { - TIFFReadDirectoryFindFieldInfo(tif,dp->tdir_tag,&fii); - assert( fii != FAILED_FII ); - } - } - if (dp->tdir_tag!=IGNORE) - { - fip=tif->tif_fields[fii]; - if (fip->field_bit==FIELD_IGNORE) - dp->tdir_tag=IGNORE; - else - { - /* check data type */ - while ((fip->field_type!=TIFF_ANY)&&(fip->field_type!=dp->tdir_type)) - { - fii++; - if ((fii==tif->tif_nfields)|| - (tif->tif_fields[fii]->field_tag!=(uint32)dp->tdir_tag)) - { - fii=0xFFFF; - break; - } - fip=tif->tif_fields[fii]; - } - if (fii==0xFFFF) - { - TIFFWarningExt(tif->tif_clientdata, module, - "Wrong data type %d for \"%s\"; tag ignored", - dp->tdir_type,fip->field_name); - dp->tdir_tag=IGNORE; - } - else - { - /* check count if known in advance */ - if ((fip->field_readcount!=TIFF_VARIABLE)&& - (fip->field_readcount!=TIFF_VARIABLE2)) - { - uint32 expected; - if (fip->field_readcount==TIFF_SPP) - expected=(uint32)tif->tif_dir.td_samplesperpixel; - else - expected=(uint32)fip->field_readcount; - if (!CheckDirCount(tif,dp,expected)) - dp->tdir_tag=IGNORE; - } - } - } - switch (dp->tdir_tag) - { - case IGNORE: - break; - case EXIFTAG_SUBJECTDISTANCE: - (void) TIFFFetchSubjectDistance(tif,dp); - break; - default: - (void) TIFFFetchNormalTag(tif, dp, TRUE); - break; - } - } - } - if (dir) - _TIFFfree(dir); - return 1; -} - -/* - * EXIF is important special case of custom IFD, so we have a special - * function to read it. - */ -int -TIFFReadEXIFDirectory(TIFF* tif, toff_t diroff) -{ - const TIFFFieldArray* exifFieldArray; - exifFieldArray = _TIFFGetExifFields(); - return TIFFReadCustomDirectory(tif, diroff, exifFieldArray); -} - -static int -EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount) -{ - static const char module[] = "EstimateStripByteCounts"; - - TIFFDirEntry *dp; - TIFFDirectory *td = &tif->tif_dir; - uint32 strip; - - /* Do not try to load stripbytecount as we will compute it */ - if( !_TIFFFillStrilesInternal( tif, 0 ) ) - return -1; - - if (td->td_stripbytecount) - _TIFFfree(td->td_stripbytecount); - td->td_stripbytecount = (uint64*) - _TIFFCheckMalloc(tif, td->td_nstrips, sizeof (uint64), - "for \"StripByteCounts\" array"); - if( td->td_stripbytecount == NULL ) - return -1; - - if (td->td_compression != COMPRESSION_NONE) { - uint64 space; - uint64 filesize; - uint16 n; - filesize = TIFFGetFileSize(tif); - if (!(tif->tif_flags&TIFF_BIGTIFF)) - space=sizeof(TIFFHeaderClassic)+2+dircount*12+4; - else - space=sizeof(TIFFHeaderBig)+8+dircount*20+8; - /* calculate amount of space used by indirect values */ - for (dp = dir, n = dircount; n > 0; n--, dp++) - { - uint32 typewidth; - uint64 datasize; - typewidth = TIFFDataWidth((TIFFDataType) dp->tdir_type); - if (typewidth == 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Cannot determine size of unknown tag type %d", - dp->tdir_type); - return -1; - } - datasize=(uint64)typewidth*dp->tdir_count; - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - if (datasize<=4) - datasize=0; - } - else - { - if (datasize<=8) - datasize=0; - } - space+=datasize; - } - if( filesize < space ) - /* we should perhaps return in error ? */ - space = filesize; - else - space = filesize - space; - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - space /= td->td_samplesperpixel; - for (strip = 0; strip < td->td_nstrips; strip++) - td->td_stripbytecount[strip] = space; - /* - * This gross hack handles the case were the offset to - * the last strip is past the place where we think the strip - * should begin. Since a strip of data must be contiguous, - * it's safe to assume that we've overestimated the amount - * of data in the strip and trim this number back accordingly. - */ - strip--; - if (td->td_stripoffset[strip]+td->td_stripbytecount[strip] > filesize) - td->td_stripbytecount[strip] = filesize - td->td_stripoffset[strip]; - } else if (isTiled(tif)) { - uint64 bytespertile = TIFFTileSize64(tif); - - for (strip = 0; strip < td->td_nstrips; strip++) - td->td_stripbytecount[strip] = bytespertile; - } else { - uint64 rowbytes = TIFFScanlineSize64(tif); - uint32 rowsperstrip = td->td_imagelength/td->td_stripsperimage; - for (strip = 0; strip < td->td_nstrips; strip++) - td->td_stripbytecount[strip] = rowbytes * rowsperstrip; - } - TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS); - if (!TIFFFieldSet(tif, FIELD_ROWSPERSTRIP)) - td->td_rowsperstrip = td->td_imagelength; - return 1; -} - -static void -MissingRequired(TIFF* tif, const char* tagname) -{ - static const char module[] = "MissingRequired"; - - TIFFErrorExt(tif->tif_clientdata, module, - "TIFF directory is missing required \"%s\" field", - tagname); -} - -/* - * Check the directory offset against the list of already seen directory - * offsets. This is a trick to prevent IFD looping. The one can create TIFF - * file with looped directory pointers. We will maintain a list of already - * seen directories and check every IFD offset against that list. - */ -static int -TIFFCheckDirOffset(TIFF* tif, uint64 diroff) -{ - uint16 n; - - if (diroff == 0) /* no more directories */ - return 0; - if (tif->tif_dirnumber == 65535) { - TIFFErrorExt(tif->tif_clientdata, "TIFFCheckDirOffset", - "Cannot handle more than 65535 TIFF directories"); - return 0; - } - - for (n = 0; n < tif->tif_dirnumber && tif->tif_dirlist; n++) { - if (tif->tif_dirlist[n] == diroff) - return 0; - } - - tif->tif_dirnumber++; - - if (tif->tif_dirlist == NULL || tif->tif_dirnumber > tif->tif_dirlistsize) { - uint64* new_dirlist; - - /* - * XXX: Reduce memory allocation granularity of the dirlist - * array. - */ - new_dirlist = (uint64*)_TIFFCheckRealloc(tif, tif->tif_dirlist, - tif->tif_dirnumber, 2 * sizeof(uint64), "for IFD list"); - if (!new_dirlist) - return 0; - if( tif->tif_dirnumber >= 32768 ) - tif->tif_dirlistsize = 65535; - else - tif->tif_dirlistsize = 2 * tif->tif_dirnumber; - tif->tif_dirlist = new_dirlist; - } - - tif->tif_dirlist[tif->tif_dirnumber - 1] = diroff; - - return 1; -} - -/* - * Check the count field of a directory entry against a known value. The - * caller is expected to skip/ignore the tag if there is a mismatch. - */ -static int -CheckDirCount(TIFF* tif, TIFFDirEntry* dir, uint32 count) -{ - if ((uint64)count > dir->tdir_count) { - const TIFFField* fip = TIFFFieldWithTag(tif, dir->tdir_tag); - TIFFWarningExt(tif->tif_clientdata, tif->tif_name, - "incorrect count for field \"%s\" (" TIFF_UINT64_FORMAT ", expecting %u); tag ignored", - fip ? fip->field_name : "unknown tagname", - dir->tdir_count, count); - return (0); - } else if ((uint64)count < dir->tdir_count) { - const TIFFField* fip = TIFFFieldWithTag(tif, dir->tdir_tag); - TIFFWarningExt(tif->tif_clientdata, tif->tif_name, - "incorrect count for field \"%s\" (" TIFF_UINT64_FORMAT ", expecting %u); tag trimmed", - fip ? fip->field_name : "unknown tagname", - dir->tdir_count, count); - dir->tdir_count = count; - return (1); - } - return (1); -} - -/* - * Read IFD structure from the specified offset. If the pointer to - * nextdiroff variable has been specified, read it too. Function returns a - * number of fields in the directory or 0 if failed. - */ -static uint16 -TIFFFetchDirectory(TIFF* tif, uint64 diroff, TIFFDirEntry** pdir, - uint64 *nextdiroff) -{ - static const char module[] = "TIFFFetchDirectory"; - - void* origdir; - uint16 dircount16; - uint32 dirsize; - TIFFDirEntry* dir; - uint8* ma; - TIFFDirEntry* mb; - uint16 n; - - assert(pdir); - - tif->tif_diroff = diroff; - if (nextdiroff) - *nextdiroff = 0; - if (!isMapped(tif)) { - if (!SeekOK(tif, tif->tif_diroff)) { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Seek error accessing TIFF directory", - tif->tif_name); - return 0; - } - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - if (!ReadOK(tif, &dircount16, sizeof (uint16))) { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Can not read TIFF directory count", - tif->tif_name); - return 0; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount16); - if (dircount16>4096) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Sanity check on directory count failed, this is probably not a valid IFD offset"); - return 0; - } - dirsize = 12; - } else { - uint64 dircount64; - if (!ReadOK(tif, &dircount64, sizeof (uint64))) { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Can not read TIFF directory count", - tif->tif_name); - return 0; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64>4096) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Sanity check on directory count failed, this is probably not a valid IFD offset"); - return 0; - } - dircount16 = (uint16)dircount64; - dirsize = 20; - } - origdir = _TIFFCheckMalloc(tif, dircount16, - dirsize, "to read TIFF directory"); - if (origdir == NULL) - return 0; - if (!ReadOK(tif, origdir, (tmsize_t)(dircount16*dirsize))) { - TIFFErrorExt(tif->tif_clientdata, module, - "%.100s: Can not read TIFF directory", - tif->tif_name); - _TIFFfree(origdir); - return 0; - } - /* - * Read offset to next directory for sequential scans if - * needed. - */ - if (nextdiroff) - { - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint32 nextdiroff32; - if (!ReadOK(tif, &nextdiroff32, sizeof(uint32))) - nextdiroff32 = 0; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&nextdiroff32); - *nextdiroff=nextdiroff32; - } else { - if (!ReadOK(tif, nextdiroff, sizeof(uint64))) - *nextdiroff = 0; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8(nextdiroff); - } - } - } else { - tmsize_t m; - tmsize_t off = (tmsize_t) tif->tif_diroff; - if ((uint64)off!=tif->tif_diroff) - { - TIFFErrorExt(tif->tif_clientdata,module,"Can not read TIFF directory count"); - return(0); - } - - /* - * Check for integer overflow when validating the dir_off, - * otherwise a very high offset may cause an OOB read and - * crash the client. Make two comparisons instead of - * - * off + sizeof(uint16) > tif->tif_size - * - * to avoid overflow. - */ - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - m=off+sizeof(uint16); - if ((mtif->tif_size)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Can not read TIFF directory count"); - return 0; - } else { - _TIFFmemcpy(&dircount16, tif->tif_base + off, - sizeof(uint16)); - } - off += sizeof (uint16); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount16); - if (dircount16>4096) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Sanity check on directory count failed, this is probably not a valid IFD offset"); - return 0; - } - dirsize = 12; - } - else - { - uint64 dircount64; - m=off+sizeof(uint64); - if ((mtif->tif_size)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Can not read TIFF directory count"); - return 0; - } else { - _TIFFmemcpy(&dircount64, tif->tif_base + off, - sizeof(uint64)); - } - off += sizeof (uint64); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64>4096) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Sanity check on directory count failed, this is probably not a valid IFD offset"); - return 0; - } - dircount16 = (uint16)dircount64; - dirsize = 20; - } - if (dircount16 == 0 ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Sanity check on directory count failed, zero tag directories not supported"); - return 0; - } - origdir = _TIFFCheckMalloc(tif, dircount16, - dirsize, - "to read TIFF directory"); - if (origdir == NULL) - return 0; - m=off+dircount16*dirsize; - if ((mtif->tif_size)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Can not read TIFF directory"); - _TIFFfree(origdir); - return 0; - } else { - _TIFFmemcpy(origdir, tif->tif_base + off, - dircount16 * dirsize); - } - if (nextdiroff) { - off += dircount16 * dirsize; - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint32 nextdiroff32; - m=off+sizeof(uint32); - if ((mtif->tif_size)) - nextdiroff32 = 0; - else - _TIFFmemcpy(&nextdiroff32, tif->tif_base + off, - sizeof (uint32)); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&nextdiroff32); - *nextdiroff = nextdiroff32; - } - else - { - m=off+sizeof(uint64); - if ((mtif->tif_size)) - *nextdiroff = 0; - else - _TIFFmemcpy(nextdiroff, tif->tif_base + off, - sizeof (uint64)); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8(nextdiroff); - } - } - } - dir = (TIFFDirEntry*)_TIFFCheckMalloc(tif, dircount16, - sizeof(TIFFDirEntry), - "to read TIFF directory"); - if (dir==0) - { - _TIFFfree(origdir); - return 0; - } - ma=(uint8*)origdir; - mb=dir; - for (n=0; ntif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)ma); - mb->tdir_tag=*(uint16*)ma; - ma+=sizeof(uint16); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)ma); - mb->tdir_type=*(uint16*)ma; - ma+=sizeof(uint16); - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)ma); - mb->tdir_count=(uint64)(*(uint32*)ma); - ma+=sizeof(uint32); - *(uint32*)(&mb->tdir_offset)=*(uint32*)ma; - ma+=sizeof(uint32); - } - else - { - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)ma); - mb->tdir_count=TIFFReadUInt64(ma); - ma+=sizeof(uint64); - mb->tdir_offset.toff_long8=TIFFReadUInt64(ma); - ma+=sizeof(uint64); - } - mb++; - } - _TIFFfree(origdir); - *pdir = dir; - return dircount16; -} - -/* - * Fetch a tag that is not handled by special case code. - */ -static int -TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover) -{ - static const char module[] = "TIFFFetchNormalTag"; - enum TIFFReadDirEntryErr err; - uint32 fii; - const TIFFField* fip = NULL; - TIFFReadDirectoryFindFieldInfo(tif,dp->tdir_tag,&fii); - if( fii == FAILED_FII ) - { - TIFFErrorExt(tif->tif_clientdata, "TIFFFetchNormalTag", - "No definition found for tag %d", - dp->tdir_tag); - return 0; - } - fip=tif->tif_fields[fii]; - assert(fip != NULL); /* should not happen */ - assert(fip->set_field_type!=TIFF_SETGET_OTHER); /* if so, we shouldn't arrive here but deal with this in specialized code */ - assert(fip->set_field_type!=TIFF_SETGET_INT); /* if so, we shouldn't arrive here as this is only the case for pseudo-tags */ - err=TIFFReadDirEntryErrOk; - switch (fip->set_field_type) - { - case TIFF_SETGET_UNDEFINED: - break; - case TIFF_SETGET_ASCII: - { - uint8* data; - assert(fip->field_passcount==0); - err=TIFFReadDirEntryByteArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - uint32 mb = 0; - int n; - if (data != NULL) - { - uint8* ma = data; - while (mb<(uint32)dp->tdir_count) - { - if (*ma==0) - break; - ma++; - mb++; - } - } - if (mb+1<(uint32)dp->tdir_count) - TIFFWarningExt(tif->tif_clientdata,module,"ASCII value for tag \"%s\" contains null byte in value; value incorrectly truncated during reading due to implementation limitations",fip->field_name); - else if (mb+1>(uint32)dp->tdir_count) - { - uint8* o; - TIFFWarningExt(tif->tif_clientdata,module,"ASCII value for tag \"%s\" does not end in null byte",fip->field_name); - if ((uint32)dp->tdir_count+1!=dp->tdir_count+1) - o=NULL; - else - o=_TIFFmalloc((uint32)dp->tdir_count+1); - if (o==NULL) - { - if (data!=NULL) - _TIFFfree(data); - return(0); - } - _TIFFmemcpy(o,data,(uint32)dp->tdir_count); - o[(uint32)dp->tdir_count]=0; - if (data!=0) - _TIFFfree(data); - data=o; - } - n=TIFFSetField(tif,dp->tdir_tag,data); - if (data!=0) - _TIFFfree(data); - if (!n) - return(0); - } - } - break; - case TIFF_SETGET_UINT8: - { - uint8 data=0; - assert(fip->field_readcount==1); - assert(fip->field_passcount==0); - err=TIFFReadDirEntryByte(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif,dp->tdir_tag,data)) - return(0); - } - } - break; - case TIFF_SETGET_UINT16: - { - uint16 data; - assert(fip->field_readcount==1); - assert(fip->field_passcount==0); - err=TIFFReadDirEntryShort(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif,dp->tdir_tag,data)) - return(0); - } - } - break; - case TIFF_SETGET_UINT32: - { - uint32 data; - assert(fip->field_readcount==1); - assert(fip->field_passcount==0); - err=TIFFReadDirEntryLong(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif,dp->tdir_tag,data)) - return(0); - } - } - break; - case TIFF_SETGET_UINT64: - { - uint64 data; - assert(fip->field_readcount==1); - assert(fip->field_passcount==0); - err=TIFFReadDirEntryLong8(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif,dp->tdir_tag,data)) - return(0); - } - } - break; - case TIFF_SETGET_FLOAT: - { - float data; - assert(fip->field_readcount==1); - assert(fip->field_passcount==0); - err=TIFFReadDirEntryFloat(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif,dp->tdir_tag,data)) - return(0); - } - } - break; - case TIFF_SETGET_DOUBLE: - { - double data; - assert(fip->field_readcount==1); - assert(fip->field_passcount==0); - err=TIFFReadDirEntryDouble(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif,dp->tdir_tag,data)) - return(0); - } - } - break; - case TIFF_SETGET_IFD8: - { - uint64 data; - assert(fip->field_readcount==1); - assert(fip->field_passcount==0); - err=TIFFReadDirEntryIfd8(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif,dp->tdir_tag,data)) - return(0); - } - } - break; - case TIFF_SETGET_UINT16_PAIR: - { - uint16* data; - assert(fip->field_readcount==2); - assert(fip->field_passcount==0); - if (dp->tdir_count!=2) { - TIFFWarningExt(tif->tif_clientdata,module, - "incorrect count for field \"%s\", expected 2, got %d", - fip->field_name,(int)dp->tdir_count); - return(0); - } - err=TIFFReadDirEntryShortArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,data[0],data[1]); - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C0_UINT8: - { - uint8* data; - assert(fip->field_readcount>=1); - assert(fip->field_passcount==0); - if (dp->tdir_count!=(uint64)fip->field_readcount) { - TIFFWarningExt(tif->tif_clientdata,module, - "incorrect count for field \"%s\", expected %d, got %d", - fip->field_name,(int) fip->field_readcount, (int)dp->tdir_count); - return 0; - } - else - { - err=TIFFReadDirEntryByteArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C0_UINT16: - { - uint16* data; - assert(fip->field_readcount>=1); - assert(fip->field_passcount==0); - if (dp->tdir_count!=(uint64)fip->field_readcount) - /* corrupt file */; - else - { - err=TIFFReadDirEntryShortArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C0_UINT32: - { - uint32* data; - assert(fip->field_readcount>=1); - assert(fip->field_passcount==0); - if (dp->tdir_count!=(uint64)fip->field_readcount) - /* corrupt file */; - else - { - err=TIFFReadDirEntryLongArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C0_FLOAT: - { - float* data; - assert(fip->field_readcount>=1); - assert(fip->field_passcount==0); - if (dp->tdir_count!=(uint64)fip->field_readcount) - /* corrupt file */; - else - { - err=TIFFReadDirEntryFloatArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C16_ASCII: - { - uint8* data; - assert(fip->field_readcount==TIFF_VARIABLE); - assert(fip->field_passcount==1); - if (dp->tdir_count>0xFFFF) - err=TIFFReadDirEntryErrCount; - else - { - err=TIFFReadDirEntryByteArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - if( data != 0 && dp->tdir_count > 0 && data[dp->tdir_count-1] != '\0' ) - { - TIFFWarningExt(tif->tif_clientdata,module,"ASCII value for tag \"%s\" does not end in null byte. Forcing it to be null",fip->field_name); - data[dp->tdir_count-1] = '\0'; - } - m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C16_UINT8: - { - uint8* data; - assert(fip->field_readcount==TIFF_VARIABLE); - assert(fip->field_passcount==1); - if (dp->tdir_count>0xFFFF) - err=TIFFReadDirEntryErrCount; - else - { - err=TIFFReadDirEntryByteArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C16_UINT16: - { - uint16* data; - assert(fip->field_readcount==TIFF_VARIABLE); - assert(fip->field_passcount==1); - if (dp->tdir_count>0xFFFF) - err=TIFFReadDirEntryErrCount; - else - { - err=TIFFReadDirEntryShortArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C16_UINT32: - { - uint32* data; - assert(fip->field_readcount==TIFF_VARIABLE); - assert(fip->field_passcount==1); - if (dp->tdir_count>0xFFFF) - err=TIFFReadDirEntryErrCount; - else - { - err=TIFFReadDirEntryLongArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C16_UINT64: - { - uint64* data; - assert(fip->field_readcount==TIFF_VARIABLE); - assert(fip->field_passcount==1); - if (dp->tdir_count>0xFFFF) - err=TIFFReadDirEntryErrCount; - else - { - err=TIFFReadDirEntryLong8Array(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C16_FLOAT: - { - float* data; - assert(fip->field_readcount==TIFF_VARIABLE); - assert(fip->field_passcount==1); - if (dp->tdir_count>0xFFFF) - err=TIFFReadDirEntryErrCount; - else - { - err=TIFFReadDirEntryFloatArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C16_DOUBLE: - { - double* data; - assert(fip->field_readcount==TIFF_VARIABLE); - assert(fip->field_passcount==1); - if (dp->tdir_count>0xFFFF) - err=TIFFReadDirEntryErrCount; - else - { - err=TIFFReadDirEntryDoubleArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C16_IFD8: - { - uint64* data; - assert(fip->field_readcount==TIFF_VARIABLE); - assert(fip->field_passcount==1); - if (dp->tdir_count>0xFFFF) - err=TIFFReadDirEntryErrCount; - else - { - err=TIFFReadDirEntryIfd8Array(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - } - break; - case TIFF_SETGET_C32_ASCII: - { - uint8* data; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntryByteArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - if( data != 0 && dp->tdir_count > 0 && data[dp->tdir_count-1] != '\0' ) - { - TIFFWarningExt(tif->tif_clientdata,module,"ASCII value for tag \"%s\" does not end in null byte. Forcing it to be null",fip->field_name); - data[dp->tdir_count-1] = '\0'; - } - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C32_UINT8: - { - uint8* data; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntryByteArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C32_SINT8: - { - int8* data = NULL; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntrySbyteArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C32_UINT16: - { - uint16* data; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntryShortArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C32_SINT16: - { - int16* data = NULL; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntrySshortArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C32_UINT32: - { - uint32* data; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntryLongArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C32_SINT32: - { - int32* data = NULL; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntrySlongArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C32_UINT64: - { - uint64* data; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntryLong8Array(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C32_SINT64: - { - int64* data = NULL; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntrySlong8Array(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C32_FLOAT: - { - float* data; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntryFloatArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C32_DOUBLE: - { - double* data; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntryDoubleArray(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - case TIFF_SETGET_C32_IFD8: - { - uint64* data; - assert(fip->field_readcount==TIFF_VARIABLE2); - assert(fip->field_passcount==1); - err=TIFFReadDirEntryIfd8Array(tif,dp,&data); - if (err==TIFFReadDirEntryErrOk) - { - int m; - m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); - if (data!=0) - _TIFFfree(data); - if (!m) - return(0); - } - } - break; - default: - assert(0); /* we should never get here */ - break; - } - if (err!=TIFFReadDirEntryErrOk) - { - TIFFReadDirEntryOutputErr(tif,err,module,fip->field_name,recover); - return(0); - } - return(1); -} - -/* - * Fetch a set of offsets or lengths. - * While this routine says "strips", in fact it's also used for tiles. - */ -static int -TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, uint32 nstrips, uint64** lpp) -{ - static const char module[] = "TIFFFetchStripThing"; - enum TIFFReadDirEntryErr err; - uint64* data; - err=TIFFReadDirEntryLong8ArrayWithLimit(tif,dir,&data,nstrips); - if (err!=TIFFReadDirEntryErrOk) - { - const TIFFField* fip = TIFFFieldWithTag(tif,dir->tdir_tag); - TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",0); - return(0); - } - if (dir->tdir_count<(uint64)nstrips) - { - uint64* resizeddata; - const TIFFField* fip = TIFFFieldWithTag(tif,dir->tdir_tag); - const char* pszMax = getenv("LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT"); - uint32 max_nstrips = 1000000; - if( pszMax ) - max_nstrips = (uint32) atoi(pszMax); - TIFFReadDirEntryOutputErr(tif,TIFFReadDirEntryErrCount, - module, - fip ? fip->field_name : "unknown tagname", - ( nstrips <= max_nstrips ) ); - - if( nstrips > max_nstrips ) - { - _TIFFfree(data); - return(0); - } - - resizeddata=(uint64*)_TIFFCheckMalloc(tif,nstrips,sizeof(uint64),"for strip array"); - if (resizeddata==0) { - _TIFFfree(data); - return(0); - } - _TIFFmemcpy(resizeddata,data,(uint32)dir->tdir_count*sizeof(uint64)); - _TIFFmemset(resizeddata+(uint32)dir->tdir_count,0,(nstrips-(uint32)dir->tdir_count)*sizeof(uint64)); - _TIFFfree(data); - data=resizeddata; - } - *lpp=data; - return(1); -} - -/* - * Fetch and set the SubjectDistance EXIF tag. - */ -static int -TIFFFetchSubjectDistance(TIFF* tif, TIFFDirEntry* dir) -{ - static const char module[] = "TIFFFetchSubjectDistance"; - enum TIFFReadDirEntryErr err; - UInt64Aligned_t m; - m.l=0; - assert(sizeof(double)==8); - assert(sizeof(uint64)==8); - assert(sizeof(uint32)==4); - if (dir->tdir_count!=1) - err=TIFFReadDirEntryErrCount; - else if (dir->tdir_type!=TIFF_RATIONAL) - err=TIFFReadDirEntryErrType; - else - { - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint32 offset; - offset=*(uint32*)(&dir->tdir_offset); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&offset); - err=TIFFReadDirEntryData(tif,offset,8,m.i); - } - else - { - m.l=dir->tdir_offset.toff_long8; - err=TIFFReadDirEntryErrOk; - } - } - if (err==TIFFReadDirEntryErrOk) - { - double n; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong(m.i,2); - if (m.i[0]==0) - n=0.0; - else if (m.i[0]==0xFFFFFFFF) - /* - * XXX: Numerator 0xFFFFFFFF means that we have infinite - * distance. Indicate that with a negative floating point - * SubjectDistance value. - */ - n=-1.0; - else - n=(double)m.i[0]/(double)m.i[1]; - return(TIFFSetField(tif,dir->tdir_tag,n)); - } - else - { - TIFFReadDirEntryOutputErr(tif,err,module,"SubjectDistance",TRUE); - return(0); - } -} - -/* - * Replace a single strip (tile) of uncompressed data by multiple strips - * (tiles), each approximately STRIP_SIZE_DEFAULT bytes. This is useful for - * dealing with large images or for dealing with machines with a limited - * amount memory. - */ -static void -ChopUpSingleUncompressedStrip(TIFF* tif) -{ - register TIFFDirectory *td = &tif->tif_dir; - uint64 bytecount; - uint64 offset; - uint32 rowblock; - uint64 rowblockbytes; - uint64 stripbytes; - uint32 strip; - uint32 nstrips; - uint32 rowsperstrip; - uint64* newcounts; - uint64* newoffsets; - - bytecount = td->td_stripbytecount[0]; - /* On a newly created file, just re-opened to be filled, we */ - /* don't want strip chop to trigger as it is going to cause issues */ - /* later ( StripOffsets and StripByteCounts improperly filled) . */ - if( bytecount == 0 && tif->tif_mode != O_RDONLY ) - return; - offset = td->td_stripoffset[0]; - assert(td->td_planarconfig == PLANARCONFIG_CONTIG); - if ((td->td_photometric == PHOTOMETRIC_YCBCR)&& - (!isUpSampled(tif))) - rowblock = td->td_ycbcrsubsampling[1]; - else - rowblock = 1; - rowblockbytes = TIFFVTileSize64(tif, rowblock); - /* - * Make the rows hold at least one scanline, but fill specified amount - * of data if possible. - */ - if (rowblockbytes > STRIP_SIZE_DEFAULT) { - stripbytes = rowblockbytes; - rowsperstrip = rowblock; - } else if (rowblockbytes > 0 ) { - uint32 rowblocksperstrip; - rowblocksperstrip = (uint32) (STRIP_SIZE_DEFAULT / rowblockbytes); - rowsperstrip = rowblocksperstrip * rowblock; - stripbytes = rowblocksperstrip * rowblockbytes; - } - else - return; - - /* - * never increase the number of rows per strip - */ - if (rowsperstrip >= td->td_rowsperstrip) - return; - nstrips = TIFFhowmany_32(td->td_imagelength, rowsperstrip); - if( nstrips == 0 ) - return; - - /* If we are going to allocate a lot of memory, make sure that the */ - /* file is as big as needed */ - if( tif->tif_mode == O_RDONLY && - nstrips > 1000000 && - (offset >= TIFFGetFileSize(tif) || - stripbytes > (TIFFGetFileSize(tif) - offset) / (nstrips - 1)) ) - { - return; - } - - newcounts = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64), - "for chopped \"StripByteCounts\" array"); - newoffsets = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64), - "for chopped \"StripOffsets\" array"); - if (newcounts == NULL || newoffsets == NULL) { - /* - * Unable to allocate new strip information, give up and use - * the original one strip information. - */ - if (newcounts != NULL) - _TIFFfree(newcounts); - if (newoffsets != NULL) - _TIFFfree(newoffsets); - return; - } - /* - * Fill the strip information arrays with new bytecounts and offsets - * that reflect the broken-up format. - */ - for (strip = 0; strip < nstrips; strip++) { - if (stripbytes > bytecount) - stripbytes = bytecount; - newcounts[strip] = stripbytes; - newoffsets[strip] = stripbytes ? offset : 0; - offset += stripbytes; - bytecount -= stripbytes; - } - /* - * Replace old single strip info with multi-strip info. - */ - td->td_stripsperimage = td->td_nstrips = nstrips; - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - - _TIFFfree(td->td_stripbytecount); - _TIFFfree(td->td_stripoffset); - td->td_stripbytecount = newcounts; - td->td_stripoffset = newoffsets; - td->td_stripbytecountsorted = 1; -} - -int _TIFFFillStriles( TIFF *tif ) -{ - return _TIFFFillStrilesInternal( tif, 1 ); -} - -static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount ) -{ -#if defined(DEFER_STRILE_LOAD) - register TIFFDirectory *td = &tif->tif_dir; - int return_value = 1; - - if( td->td_stripoffset != NULL ) - return 1; - - if( td->td_stripoffset_entry.tdir_count == 0 ) - return 0; - - if (!TIFFFetchStripThing(tif,&(td->td_stripoffset_entry), - td->td_nstrips,&td->td_stripoffset)) - { - return_value = 0; - } - - if (loadStripByteCount && - !TIFFFetchStripThing(tif,&(td->td_stripbytecount_entry), - td->td_nstrips,&td->td_stripbytecount)) - { - return_value = 0; - } - - _TIFFmemset( &(td->td_stripoffset_entry), 0, sizeof(TIFFDirEntry)); - _TIFFmemset( &(td->td_stripbytecount_entry), 0, sizeof(TIFFDirEntry)); - - if (tif->tif_dir.td_nstrips > 1 && return_value == 1 ) { - uint32 strip; - - tif->tif_dir.td_stripbytecountsorted = 1; - for (strip = 1; strip < tif->tif_dir.td_nstrips; strip++) { - if (tif->tif_dir.td_stripoffset[strip - 1] > - tif->tif_dir.td_stripoffset[strip]) { - tif->tif_dir.td_stripbytecountsorted = 0; - break; - } - } - } - - return return_value; -#else /* !defined(DEFER_STRILE_LOAD) */ - (void) tif; - (void) loadStripByteCount; - return 1; -#endif -} - - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_dirwrite.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_dirwrite.c deleted file mode 100644 index 3ca33eb..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_dirwrite.c +++ /dev/null @@ -1,3025 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Directory Write Support Routines. - */ -#include "tiffiop.h" -#include - -#ifdef HAVE_IEEEFP -#define TIFFCvtNativeToIEEEFloat(tif, n, fp) -#define TIFFCvtNativeToIEEEDouble(tif, n, dp) -#else -extern void TIFFCvtNativeToIEEEFloat(TIFF* tif, uint32 n, float* fp); -extern void TIFFCvtNativeToIEEEDouble(TIFF* tif, uint32 n, double* dp); -#endif - -static int TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff); - -static int TIFFWriteDirectoryTagSampleformatArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value); -#if 0 -static int TIFFWriteDirectoryTagSampleformatPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value); -#endif - -static int TIFFWriteDirectoryTagAscii(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, char* value); -static int TIFFWriteDirectoryTagUndefinedArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint8* value); -#ifdef notdef -static int TIFFWriteDirectoryTagByte(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint8 value); -#endif -static int TIFFWriteDirectoryTagByteArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint8* value); -#if 0 -static int TIFFWriteDirectoryTagBytePerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint8 value); -#endif -#ifdef notdef -static int TIFFWriteDirectoryTagSbyte(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int8 value); -#endif -static int TIFFWriteDirectoryTagSbyteArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int8* value); -#if 0 -static int TIFFWriteDirectoryTagSbytePerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int8 value); -#endif -static int TIFFWriteDirectoryTagShort(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 value); -static int TIFFWriteDirectoryTagShortArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint16* value); -static int TIFFWriteDirectoryTagShortPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 value); -#ifdef notdef -static int TIFFWriteDirectoryTagSshort(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int16 value); -#endif -static int TIFFWriteDirectoryTagSshortArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int16* value); -#if 0 -static int TIFFWriteDirectoryTagSshortPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int16 value); -#endif -static int TIFFWriteDirectoryTagLong(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 value); -static int TIFFWriteDirectoryTagLongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value); -#if 0 -static int TIFFWriteDirectoryTagLongPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 value); -#endif -#ifdef notdef -static int TIFFWriteDirectoryTagSlong(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int32 value); -#endif -static int TIFFWriteDirectoryTagSlongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int32* value); -#if 0 -static int TIFFWriteDirectoryTagSlongPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int32 value); -#endif -#ifdef notdef -static int TIFFWriteDirectoryTagLong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint64 value); -#endif -static int TIFFWriteDirectoryTagLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value); -#ifdef notdef -static int TIFFWriteDirectoryTagSlong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int64 value); -#endif -static int TIFFWriteDirectoryTagSlong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int64* value); -static int TIFFWriteDirectoryTagRational(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value); -static int TIFFWriteDirectoryTagRationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value); -static int TIFFWriteDirectoryTagSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value); -#ifdef notdef -static int TIFFWriteDirectoryTagFloat(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, float value); -#endif -static int TIFFWriteDirectoryTagFloatArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value); -#if 0 -static int TIFFWriteDirectoryTagFloatPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, float value); -#endif -#ifdef notdef -static int TIFFWriteDirectoryTagDouble(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value); -#endif -static int TIFFWriteDirectoryTagDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value); -#if 0 -static int TIFFWriteDirectoryTagDoublePerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value); -#endif -static int TIFFWriteDirectoryTagIfdArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value); -#ifdef notdef -static int TIFFWriteDirectoryTagIfd8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value); -#endif -static int TIFFWriteDirectoryTagShortLong(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 value); -static int TIFFWriteDirectoryTagLongLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value); -static int TIFFWriteDirectoryTagIfdIfd8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value); -#ifdef notdef -static int TIFFWriteDirectoryTagShortLongLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value); -#endif -static int TIFFWriteDirectoryTagColormap(TIFF* tif, uint32* ndir, TIFFDirEntry* dir); -static int TIFFWriteDirectoryTagTransferfunction(TIFF* tif, uint32* ndir, TIFFDirEntry* dir); -static int TIFFWriteDirectoryTagSubifd(TIFF* tif, uint32* ndir, TIFFDirEntry* dir); - -static int TIFFWriteDirectoryTagCheckedAscii(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, char* value); -static int TIFFWriteDirectoryTagCheckedUndefinedArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint8* value); -#ifdef notdef -static int TIFFWriteDirectoryTagCheckedByte(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint8 value); -#endif -static int TIFFWriteDirectoryTagCheckedByteArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint8* value); -#ifdef notdef -static int TIFFWriteDirectoryTagCheckedSbyte(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int8 value); -#endif -static int TIFFWriteDirectoryTagCheckedSbyteArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int8* value); -static int TIFFWriteDirectoryTagCheckedShort(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 value); -static int TIFFWriteDirectoryTagCheckedShortArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint16* value); -#ifdef notdef -static int TIFFWriteDirectoryTagCheckedSshort(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int16 value); -#endif -static int TIFFWriteDirectoryTagCheckedSshortArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int16* value); -static int TIFFWriteDirectoryTagCheckedLong(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 value); -static int TIFFWriteDirectoryTagCheckedLongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value); -#ifdef notdef -static int TIFFWriteDirectoryTagCheckedSlong(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int32 value); -#endif -static int TIFFWriteDirectoryTagCheckedSlongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int32* value); -#ifdef notdef -static int TIFFWriteDirectoryTagCheckedLong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint64 value); -#endif -static int TIFFWriteDirectoryTagCheckedLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value); -#ifdef notdef -static int TIFFWriteDirectoryTagCheckedSlong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int64 value); -#endif -static int TIFFWriteDirectoryTagCheckedSlong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int64* value); -static int TIFFWriteDirectoryTagCheckedRational(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value); -static int TIFFWriteDirectoryTagCheckedRationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value); -static int TIFFWriteDirectoryTagCheckedSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value); -#ifdef notdef -static int TIFFWriteDirectoryTagCheckedFloat(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, float value); -#endif -static int TIFFWriteDirectoryTagCheckedFloatArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value); -#ifdef notdef -static int TIFFWriteDirectoryTagCheckedDouble(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value); -#endif -static int TIFFWriteDirectoryTagCheckedDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value); -static int TIFFWriteDirectoryTagCheckedIfdArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value); -static int TIFFWriteDirectoryTagCheckedIfd8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value); - -static int TIFFWriteDirectoryTagData(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 datatype, uint32 count, uint32 datalength, void* data); - -static int TIFFLinkDirectory(TIFF*); - -/* - * Write the contents of the current directory - * to the specified file. This routine doesn't - * handle overwriting a directory with auxiliary - * storage that's been changed. - */ -int -TIFFWriteDirectory(TIFF* tif) -{ - return TIFFWriteDirectorySec(tif,TRUE,TRUE,NULL); -} - -/* - * Similar to TIFFWriteDirectory(), writes the directory out - * but leaves all data structures in memory so that it can be - * written again. This will make a partially written TIFF file - * readable before it is successfully completed/closed. - */ -int -TIFFCheckpointDirectory(TIFF* tif) -{ - int rc; - /* Setup the strips arrays, if they haven't already been. */ - if (tif->tif_dir.td_stripoffset == NULL) - (void) TIFFSetupStrips(tif); - rc = TIFFWriteDirectorySec(tif,TRUE,FALSE,NULL); - (void) TIFFSetWriteOffset(tif, TIFFSeekFile(tif, 0, SEEK_END)); - return rc; -} - -int -TIFFWriteCustomDirectory(TIFF* tif, uint64* pdiroff) -{ - return TIFFWriteDirectorySec(tif,FALSE,FALSE,pdiroff); -} - -/* - * Similar to TIFFWriteDirectory(), but if the directory has already - * been written once, it is relocated to the end of the file, in case it - * has changed in size. Note that this will result in the loss of the - * previously used directory space. - */ -int -TIFFRewriteDirectory( TIFF *tif ) -{ - static const char module[] = "TIFFRewriteDirectory"; - - /* We don't need to do anything special if it hasn't been written. */ - if( tif->tif_diroff == 0 ) - return TIFFWriteDirectory( tif ); - - /* - * Find and zero the pointer to this directory, so that TIFFLinkDirectory - * will cause it to be added after this directories current pre-link. - */ - - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - if (tif->tif_header.classic.tiff_diroff == tif->tif_diroff) - { - tif->tif_header.classic.tiff_diroff = 0; - tif->tif_diroff = 0; - - TIFFSeekFile(tif,4,SEEK_SET); - if (!WriteOK(tif, &(tif->tif_header.classic.tiff_diroff),4)) - { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Error updating TIFF header"); - return (0); - } - } - else - { - uint32 nextdir; - nextdir = tif->tif_header.classic.tiff_diroff; - while(1) { - uint16 dircount; - uint32 nextnextdir; - - if (!SeekOK(tif, nextdir) || - !ReadOK(tif, &dircount, 2)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error fetching directory count"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - (void) TIFFSeekFile(tif, - nextdir+2+dircount*12, SEEK_SET); - if (!ReadOK(tif, &nextnextdir, 4)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error fetching directory link"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextnextdir); - if (nextnextdir==tif->tif_diroff) - { - uint32 m; - m=0; - (void) TIFFSeekFile(tif, - nextdir+2+dircount*12, SEEK_SET); - if (!WriteOK(tif, &m, 4)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error writing directory link"); - return (0); - } - tif->tif_diroff=0; - break; - } - nextdir=nextnextdir; - } - } - } - else - { - if (tif->tif_header.big.tiff_diroff == tif->tif_diroff) - { - tif->tif_header.big.tiff_diroff = 0; - tif->tif_diroff = 0; - - TIFFSeekFile(tif,8,SEEK_SET); - if (!WriteOK(tif, &(tif->tif_header.big.tiff_diroff),8)) - { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Error updating TIFF header"); - return (0); - } - } - else - { - uint64 nextdir; - nextdir = tif->tif_header.big.tiff_diroff; - while(1) { - uint64 dircount64; - uint16 dircount; - uint64 nextnextdir; - - if (!SeekOK(tif, nextdir) || - !ReadOK(tif, &dircount64, 8)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error fetching directory count"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64>0xFFFF) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Sanity check on tag count failed, likely corrupt TIFF"); - return (0); - } - dircount=(uint16)dircount64; - (void) TIFFSeekFile(tif, - nextdir+8+dircount*20, SEEK_SET); - if (!ReadOK(tif, &nextnextdir, 8)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error fetching directory link"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&nextnextdir); - if (nextnextdir==tif->tif_diroff) - { - uint64 m; - m=0; - (void) TIFFSeekFile(tif, - nextdir+8+dircount*20, SEEK_SET); - if (!WriteOK(tif, &m, 8)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error writing directory link"); - return (0); - } - tif->tif_diroff=0; - break; - } - nextdir=nextnextdir; - } - } - } - - /* - * Now use TIFFWriteDirectory() normally. - */ - - return TIFFWriteDirectory( tif ); -} - -static int -TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) -{ - static const char module[] = "TIFFWriteDirectorySec"; - uint32 ndir; - TIFFDirEntry* dir; - uint32 dirsize; - void* dirmem; - uint32 m; - if (tif->tif_mode == O_RDONLY) - return (1); - - _TIFFFillStriles( tif ); - - /* - * Clear write state so that subsequent images with - * different characteristics get the right buffers - * setup for them. - */ - if (imagedone) - { - if (tif->tif_flags & TIFF_POSTENCODE) - { - tif->tif_flags &= ~TIFF_POSTENCODE; - if (!(*tif->tif_postencode)(tif)) - { - TIFFErrorExt(tif->tif_clientdata,module, - "Error post-encoding before directory write"); - return (0); - } - } - (*tif->tif_close)(tif); /* shutdown encoder */ - /* - * Flush any data that might have been written - * by the compression close+cleanup routines. But - * be careful not to write stuff if we didn't add data - * in the previous steps as the "rawcc" data may well be - * a previously read tile/strip in mixed read/write mode. - */ - if (tif->tif_rawcc > 0 - && (tif->tif_flags & TIFF_BEENWRITING) != 0 ) - { - if( !TIFFFlushData1(tif) ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Error flushing data before directory write"); - return (0); - } - } - if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) - { - _TIFFfree(tif->tif_rawdata); - tif->tif_rawdata = NULL; - tif->tif_rawcc = 0; - tif->tif_rawdatasize = 0; - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = 0; - } - tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP); - } - dir=NULL; - dirmem=NULL; - dirsize=0; - while (1) - { - ndir=0; - if (isimage) - { - if (TIFFFieldSet(tif,FIELD_IMAGEDIMENSIONS)) - { - if (!TIFFWriteDirectoryTagShortLong(tif,&ndir,dir,TIFFTAG_IMAGEWIDTH,tif->tif_dir.td_imagewidth)) - goto bad; - if (!TIFFWriteDirectoryTagShortLong(tif,&ndir,dir,TIFFTAG_IMAGELENGTH,tif->tif_dir.td_imagelength)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_TILEDIMENSIONS)) - { - if (!TIFFWriteDirectoryTagShortLong(tif,&ndir,dir,TIFFTAG_TILEWIDTH,tif->tif_dir.td_tilewidth)) - goto bad; - if (!TIFFWriteDirectoryTagShortLong(tif,&ndir,dir,TIFFTAG_TILELENGTH,tif->tif_dir.td_tilelength)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_RESOLUTION)) - { - if (!TIFFWriteDirectoryTagRational(tif,&ndir,dir,TIFFTAG_XRESOLUTION,tif->tif_dir.td_xresolution)) - goto bad; - if (!TIFFWriteDirectoryTagRational(tif,&ndir,dir,TIFFTAG_YRESOLUTION,tif->tif_dir.td_yresolution)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_POSITION)) - { - if (!TIFFWriteDirectoryTagRational(tif,&ndir,dir,TIFFTAG_XPOSITION,tif->tif_dir.td_xposition)) - goto bad; - if (!TIFFWriteDirectoryTagRational(tif,&ndir,dir,TIFFTAG_YPOSITION,tif->tif_dir.td_yposition)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_SUBFILETYPE)) - { - if (!TIFFWriteDirectoryTagLong(tif,&ndir,dir,TIFFTAG_SUBFILETYPE,tif->tif_dir.td_subfiletype)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_BITSPERSAMPLE)) - { - if (!TIFFWriteDirectoryTagShortPerSample(tif,&ndir,dir,TIFFTAG_BITSPERSAMPLE,tif->tif_dir.td_bitspersample)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_COMPRESSION)) - { - if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,TIFFTAG_COMPRESSION,tif->tif_dir.td_compression)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_PHOTOMETRIC)) - { - if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,TIFFTAG_PHOTOMETRIC,tif->tif_dir.td_photometric)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_THRESHHOLDING)) - { - if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,TIFFTAG_THRESHHOLDING,tif->tif_dir.td_threshholding)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_FILLORDER)) - { - if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,TIFFTAG_FILLORDER,tif->tif_dir.td_fillorder)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_ORIENTATION)) - { - if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,TIFFTAG_ORIENTATION,tif->tif_dir.td_orientation)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_SAMPLESPERPIXEL)) - { - if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,TIFFTAG_SAMPLESPERPIXEL,tif->tif_dir.td_samplesperpixel)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_ROWSPERSTRIP)) - { - if (!TIFFWriteDirectoryTagShortLong(tif,&ndir,dir,TIFFTAG_ROWSPERSTRIP,tif->tif_dir.td_rowsperstrip)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_MINSAMPLEVALUE)) - { - if (!TIFFWriteDirectoryTagShortPerSample(tif,&ndir,dir,TIFFTAG_MINSAMPLEVALUE,tif->tif_dir.td_minsamplevalue)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_MAXSAMPLEVALUE)) - { - if (!TIFFWriteDirectoryTagShortPerSample(tif,&ndir,dir,TIFFTAG_MAXSAMPLEVALUE,tif->tif_dir.td_maxsamplevalue)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_PLANARCONFIG)) - { - if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,TIFFTAG_PLANARCONFIG,tif->tif_dir.td_planarconfig)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_RESOLUTIONUNIT)) - { - if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,TIFFTAG_RESOLUTIONUNIT,tif->tif_dir.td_resolutionunit)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_PAGENUMBER)) - { - if (!TIFFWriteDirectoryTagShortArray(tif,&ndir,dir,TIFFTAG_PAGENUMBER,2,&tif->tif_dir.td_pagenumber[0])) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_STRIPBYTECOUNTS)) - { - if (!isTiled(tif)) - { - if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPBYTECOUNTS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripbytecount)) - goto bad; - } - else - { - if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_TILEBYTECOUNTS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripbytecount)) - goto bad; - } - } - if (TIFFFieldSet(tif,FIELD_STRIPOFFSETS)) - { - if (!isTiled(tif)) - { - /* td_stripoffset might be NULL in an odd OJPEG case. See - * tif_dirread.c around line 3634. - * XXX: OJPEG hack. - * If a) compression is OJPEG, b) it's not a tiled TIFF, - * and c) the number of strips is 1, - * then we tolerate the absence of stripoffsets tag, - * because, presumably, all required data is in the - * JpegInterchangeFormat stream. - * We can get here when using tiffset on such a file. - * See http://bugzilla.maptools.org/show_bug.cgi?id=2500 - */ - if (tif->tif_dir.td_stripoffset != NULL && - !TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPOFFSETS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripoffset)) - goto bad; - } - else - { - if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_TILEOFFSETS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripoffset)) - goto bad; - } - } - if (TIFFFieldSet(tif,FIELD_COLORMAP)) - { - if (!TIFFWriteDirectoryTagColormap(tif,&ndir,dir)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_EXTRASAMPLES)) - { - if (tif->tif_dir.td_extrasamples) - { - uint16 na; - uint16* nb; - TIFFGetFieldDefaulted(tif,TIFFTAG_EXTRASAMPLES,&na,&nb); - if (!TIFFWriteDirectoryTagShortArray(tif,&ndir,dir,TIFFTAG_EXTRASAMPLES,na,nb)) - goto bad; - } - } - if (TIFFFieldSet(tif,FIELD_SAMPLEFORMAT)) - { - if (!TIFFWriteDirectoryTagShortPerSample(tif,&ndir,dir,TIFFTAG_SAMPLEFORMAT,tif->tif_dir.td_sampleformat)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_SMINSAMPLEVALUE)) - { - if (!TIFFWriteDirectoryTagSampleformatArray(tif,&ndir,dir,TIFFTAG_SMINSAMPLEVALUE,tif->tif_dir.td_samplesperpixel,tif->tif_dir.td_sminsamplevalue)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_SMAXSAMPLEVALUE)) - { - if (!TIFFWriteDirectoryTagSampleformatArray(tif,&ndir,dir,TIFFTAG_SMAXSAMPLEVALUE,tif->tif_dir.td_samplesperpixel,tif->tif_dir.td_smaxsamplevalue)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_IMAGEDEPTH)) - { - if (!TIFFWriteDirectoryTagLong(tif,&ndir,dir,TIFFTAG_IMAGEDEPTH,tif->tif_dir.td_imagedepth)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_TILEDEPTH)) - { - if (!TIFFWriteDirectoryTagLong(tif,&ndir,dir,TIFFTAG_TILEDEPTH,tif->tif_dir.td_tiledepth)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_HALFTONEHINTS)) - { - if (!TIFFWriteDirectoryTagShortArray(tif,&ndir,dir,TIFFTAG_HALFTONEHINTS,2,&tif->tif_dir.td_halftonehints[0])) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_YCBCRSUBSAMPLING)) - { - if (!TIFFWriteDirectoryTagShortArray(tif,&ndir,dir,TIFFTAG_YCBCRSUBSAMPLING,2,&tif->tif_dir.td_ycbcrsubsampling[0])) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_YCBCRPOSITIONING)) - { - if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,TIFFTAG_YCBCRPOSITIONING,tif->tif_dir.td_ycbcrpositioning)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_REFBLACKWHITE)) - { - if (!TIFFWriteDirectoryTagRationalArray(tif,&ndir,dir,TIFFTAG_REFERENCEBLACKWHITE,6,tif->tif_dir.td_refblackwhite)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_TRANSFERFUNCTION)) - { - if (!TIFFWriteDirectoryTagTransferfunction(tif,&ndir,dir)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_INKNAMES)) - { - if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,TIFFTAG_INKNAMES,tif->tif_dir.td_inknameslen,tif->tif_dir.td_inknames)) - goto bad; - } - if (TIFFFieldSet(tif,FIELD_SUBIFD)) - { - if (!TIFFWriteDirectoryTagSubifd(tif,&ndir,dir)) - goto bad; - } - { - uint32 n; - for (n=0; ntif_nfields; n++) { - const TIFFField* o; - o = tif->tif_fields[n]; - if ((o->field_bit>=FIELD_CODEC)&&(TIFFFieldSet(tif,o->field_bit))) - { - switch (o->get_field_type) - { - case TIFF_SETGET_ASCII: - { - uint32 pa; - char* pb; - assert(o->field_type==TIFF_ASCII); - assert(o->field_readcount==TIFF_VARIABLE); - assert(o->field_passcount==0); - TIFFGetField(tif,o->field_tag,&pb); - pa=(uint32)(strlen(pb)); - if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,(uint16)o->field_tag,pa,pb)) - goto bad; - } - break; - case TIFF_SETGET_UINT16: - { - uint16 p; - assert(o->field_type==TIFF_SHORT); - assert(o->field_readcount==1); - assert(o->field_passcount==0); - TIFFGetField(tif,o->field_tag,&p); - if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,(uint16)o->field_tag,p)) - goto bad; - } - break; - case TIFF_SETGET_UINT32: - { - uint32 p; - assert(o->field_type==TIFF_LONG); - assert(o->field_readcount==1); - assert(o->field_passcount==0); - TIFFGetField(tif,o->field_tag,&p); - if (!TIFFWriteDirectoryTagLong(tif,&ndir,dir,(uint16)o->field_tag,p)) - goto bad; - } - break; - case TIFF_SETGET_C32_UINT8: - { - uint32 pa; - void* pb; - assert(o->field_type==TIFF_UNDEFINED); - assert(o->field_readcount==TIFF_VARIABLE2); - assert(o->field_passcount==1); - TIFFGetField(tif,o->field_tag,&pa,&pb); - if (!TIFFWriteDirectoryTagUndefinedArray(tif,&ndir,dir,(uint16)o->field_tag,pa,pb)) - goto bad; - } - break; - default: - TIFFErrorExt(tif->tif_clientdata,module, - "Cannot write tag %d (%s)", - TIFFFieldTag(o), - o->field_name ? o->field_name : "unknown"); - goto bad; - } - } - } - } - } - for (m=0; m<(uint32)(tif->tif_dir.td_customValueCount); m++) - { - uint16 tag = (uint16)tif->tif_dir.td_customValues[m].info->field_tag; - uint32 count = tif->tif_dir.td_customValues[m].count; - switch (tif->tif_dir.td_customValues[m].info->field_type) - { - case TIFF_ASCII: - if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_UNDEFINED: - if (!TIFFWriteDirectoryTagUndefinedArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_BYTE: - if (!TIFFWriteDirectoryTagByteArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_SBYTE: - if (!TIFFWriteDirectoryTagSbyteArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_SHORT: - if (!TIFFWriteDirectoryTagShortArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_SSHORT: - if (!TIFFWriteDirectoryTagSshortArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_LONG: - if (!TIFFWriteDirectoryTagLongArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_SLONG: - if (!TIFFWriteDirectoryTagSlongArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_LONG8: - if (!TIFFWriteDirectoryTagLong8Array(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_SLONG8: - if (!TIFFWriteDirectoryTagSlong8Array(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_RATIONAL: - if (!TIFFWriteDirectoryTagRationalArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_SRATIONAL: - if (!TIFFWriteDirectoryTagSrationalArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_FLOAT: - if (!TIFFWriteDirectoryTagFloatArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_DOUBLE: - if (!TIFFWriteDirectoryTagDoubleArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_IFD: - if (!TIFFWriteDirectoryTagIfdArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_IFD8: - if (!TIFFWriteDirectoryTagIfdIfd8Array(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - default: - assert(0); /* we should never get here */ - break; - } - } - if (dir!=NULL) - break; - dir=_TIFFmalloc(ndir*sizeof(TIFFDirEntry)); - if (dir==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - goto bad; - } - if (isimage) - { - if ((tif->tif_diroff==0)&&(!TIFFLinkDirectory(tif))) - goto bad; - } - else - tif->tif_diroff=(TIFFSeekFile(tif,0,SEEK_END)+1)&(~((toff_t)1)); - if (pdiroff!=NULL) - *pdiroff=tif->tif_diroff; - if (!(tif->tif_flags&TIFF_BIGTIFF)) - dirsize=2+ndir*12+4; - else - dirsize=8+ndir*20+8; - tif->tif_dataoff=tif->tif_diroff+dirsize; - if (!(tif->tif_flags&TIFF_BIGTIFF)) - tif->tif_dataoff=(uint32)tif->tif_dataoff; - if ((tif->tif_dataofftif_diroff)||(tif->tif_dataoff<(uint64)dirsize)) - { - TIFFErrorExt(tif->tif_clientdata,module,"Maximum TIFF file size exceeded"); - goto bad; - } - if (tif->tif_dataoff&1) - tif->tif_dataoff++; - if (isimage) - tif->tif_curdir++; - } - if (isimage) - { - if (TIFFFieldSet(tif,FIELD_SUBIFD)&&(tif->tif_subifdoff==0)) - { - uint32 na; - TIFFDirEntry* nb; - for (na=0, nb=dir; ; na++, nb++) - { - if( na == ndir ) - { - TIFFErrorExt(tif->tif_clientdata,module, - "Cannot find SubIFD tag"); - goto bad; - } - if (nb->tdir_tag==TIFFTAG_SUBIFD) - break; - } - if (!(tif->tif_flags&TIFF_BIGTIFF)) - tif->tif_subifdoff=tif->tif_diroff+2+na*12+8; - else - tif->tif_subifdoff=tif->tif_diroff+8+na*20+12; - } - } - dirmem=_TIFFmalloc(dirsize); - if (dirmem==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - goto bad; - } - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint8* n; - uint32 nTmp; - TIFFDirEntry* o; - n=dirmem; - *(uint16*)n=(uint16)ndir; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)n); - n+=2; - o=dir; - for (m=0; mtdir_tag; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)n); - n+=2; - *(uint16*)n=o->tdir_type; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)n); - n+=2; - nTmp = (uint32)o->tdir_count; - _TIFFmemcpy(n,&nTmp,4); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)n); - n+=4; - /* This is correct. The data has been */ - /* swabbed previously in TIFFWriteDirectoryTagData */ - _TIFFmemcpy(n,&o->tdir_offset,4); - n+=4; - o++; - } - nTmp = (uint32)tif->tif_nextdiroff; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&nTmp); - _TIFFmemcpy(n,&nTmp,4); - } - else - { - uint8* n; - TIFFDirEntry* o; - n=dirmem; - *(uint64*)n=ndir; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)n); - n+=8; - o=dir; - for (m=0; mtdir_tag; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)n); - n+=2; - *(uint16*)n=o->tdir_type; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)n); - n+=2; - _TIFFmemcpy(n,&o->tdir_count,8); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)n); - n+=8; - _TIFFmemcpy(n,&o->tdir_offset,8); - n+=8; - o++; - } - _TIFFmemcpy(n,&tif->tif_nextdiroff,8); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)n); - } - _TIFFfree(dir); - dir=NULL; - if (!SeekOK(tif,tif->tif_diroff)) - { - TIFFErrorExt(tif->tif_clientdata,module,"IO error writing directory"); - goto bad; - } - if (!WriteOK(tif,dirmem,(tmsize_t)dirsize)) - { - TIFFErrorExt(tif->tif_clientdata,module,"IO error writing directory"); - goto bad; - } - _TIFFfree(dirmem); - if (imagedone) - { - TIFFFreeDirectory(tif); - tif->tif_flags &= ~TIFF_DIRTYDIRECT; - tif->tif_flags &= ~TIFF_DIRTYSTRIP; - (*tif->tif_cleanup)(tif); - /* - * Reset directory-related state for subsequent - * directories. - */ - TIFFCreateDirectory(tif); - } - return(1); -bad: - if (dir!=NULL) - _TIFFfree(dir); - if (dirmem!=NULL) - _TIFFfree(dirmem); - return(0); -} - -static float TIFFClampDoubleToFloat( double val ) -{ - if( val > FLT_MAX ) - return FLT_MAX; - if( val < -FLT_MAX ) - return -FLT_MAX; - return (float)val; -} - -static int8 TIFFClampDoubleToInt8( double val ) -{ - if( val > 127 ) - return 127; - if( val < -128 || val != val ) - return -128; - return (int8)val; -} - -static int16 TIFFClampDoubleToInt16( double val ) -{ - if( val > 32767 ) - return 32767; - if( val < -32768 || val != val ) - return -32768; - return (int16)val; -} - -static int32 TIFFClampDoubleToInt32( double val ) -{ - if( val > 0x7FFFFFFF ) - return 0x7FFFFFFF; - if( val < -0x7FFFFFFF-1 || val != val ) - return -0x7FFFFFFF-1; - return (int32)val; -} - -static uint8 TIFFClampDoubleToUInt8( double val ) -{ - if( val < 0 ) - return 0; - if( val > 255 || val != val ) - return 255; - return (uint8)val; -} - -static uint16 TIFFClampDoubleToUInt16( double val ) -{ - if( val < 0 ) - return 0; - if( val > 65535 || val != val ) - return 65535; - return (uint16)val; -} - -static uint32 TIFFClampDoubleToUInt32( double val ) -{ - if( val < 0 ) - return 0; - if( val > 0xFFFFFFFFU || val != val ) - return 0xFFFFFFFFU; - return (uint32)val; -} - -static int -TIFFWriteDirectoryTagSampleformatArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value) -{ - static const char module[] = "TIFFWriteDirectoryTagSampleformatArray"; - void* conv; - uint32 i; - int ok; - conv = _TIFFmalloc(count*sizeof(double)); - if (conv == NULL) - { - TIFFErrorExt(tif->tif_clientdata, module, "Out of memory"); - return (0); - } - - switch (tif->tif_dir.td_sampleformat) - { - case SAMPLEFORMAT_IEEEFP: - if (tif->tif_dir.td_bitspersample<=32) - { - for (i = 0; i < count; ++i) - ((float*)conv)[i] = TIFFClampDoubleToFloat(value[i]); - ok = TIFFWriteDirectoryTagFloatArray(tif,ndir,dir,tag,count,(float*)conv); - } - else - { - ok = TIFFWriteDirectoryTagDoubleArray(tif,ndir,dir,tag,count,value); - } - break; - case SAMPLEFORMAT_INT: - if (tif->tif_dir.td_bitspersample<=8) - { - for (i = 0; i < count; ++i) - ((int8*)conv)[i] = TIFFClampDoubleToInt8(value[i]); - ok = TIFFWriteDirectoryTagSbyteArray(tif,ndir,dir,tag,count,(int8*)conv); - } - else if (tif->tif_dir.td_bitspersample<=16) - { - for (i = 0; i < count; ++i) - ((int16*)conv)[i] = TIFFClampDoubleToInt16(value[i]); - ok = TIFFWriteDirectoryTagSshortArray(tif,ndir,dir,tag,count,(int16*)conv); - } - else - { - for (i = 0; i < count; ++i) - ((int32*)conv)[i] = TIFFClampDoubleToInt32(value[i]); - ok = TIFFWriteDirectoryTagSlongArray(tif,ndir,dir,tag,count,(int32*)conv); - } - break; - case SAMPLEFORMAT_UINT: - if (tif->tif_dir.td_bitspersample<=8) - { - for (i = 0; i < count; ++i) - ((uint8*)conv)[i] = TIFFClampDoubleToUInt8(value[i]); - ok = TIFFWriteDirectoryTagByteArray(tif,ndir,dir,tag,count,(uint8*)conv); - } - else if (tif->tif_dir.td_bitspersample<=16) - { - for (i = 0; i < count; ++i) - ((uint16*)conv)[i] = TIFFClampDoubleToUInt16(value[i]); - ok = TIFFWriteDirectoryTagShortArray(tif,ndir,dir,tag,count,(uint16*)conv); - } - else - { - for (i = 0; i < count; ++i) - ((uint32*)conv)[i] = TIFFClampDoubleToUInt32(value[i]); - ok = TIFFWriteDirectoryTagLongArray(tif,ndir,dir,tag,count,(uint32*)conv); - } - break; - default: - ok = 0; - } - - _TIFFfree(conv); - return (ok); -} - -#if 0 -static int -TIFFWriteDirectoryTagSampleformatPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value) -{ - switch (tif->tif_dir.td_sampleformat) - { - case SAMPLEFORMAT_IEEEFP: - if (tif->tif_dir.td_bitspersample<=32) - return(TIFFWriteDirectoryTagFloatPerSample(tif,ndir,dir,tag,(float)value)); - else - return(TIFFWriteDirectoryTagDoublePerSample(tif,ndir,dir,tag,value)); - case SAMPLEFORMAT_INT: - if (tif->tif_dir.td_bitspersample<=8) - return(TIFFWriteDirectoryTagSbytePerSample(tif,ndir,dir,tag,(int8)value)); - else if (tif->tif_dir.td_bitspersample<=16) - return(TIFFWriteDirectoryTagSshortPerSample(tif,ndir,dir,tag,(int16)value)); - else - return(TIFFWriteDirectoryTagSlongPerSample(tif,ndir,dir,tag,(int32)value)); - case SAMPLEFORMAT_UINT: - if (tif->tif_dir.td_bitspersample<=8) - return(TIFFWriteDirectoryTagBytePerSample(tif,ndir,dir,tag,(uint8)value)); - else if (tif->tif_dir.td_bitspersample<=16) - return(TIFFWriteDirectoryTagShortPerSample(tif,ndir,dir,tag,(uint16)value)); - else - return(TIFFWriteDirectoryTagLongPerSample(tif,ndir,dir,tag,(uint32)value)); - default: - return(1); - } -} -#endif - -static int -TIFFWriteDirectoryTagAscii(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, char* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedAscii(tif,ndir,dir,tag,count,value)); -} - -static int -TIFFWriteDirectoryTagUndefinedArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint8* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedUndefinedArray(tif,ndir,dir,tag,count,value)); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagByte(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint8 value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedByte(tif,ndir,dir,tag,value)); -} -#endif - -static int -TIFFWriteDirectoryTagByteArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint8* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedByteArray(tif,ndir,dir,tag,count,value)); -} - -#if 0 -static int -TIFFWriteDirectoryTagBytePerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint8 value) -{ - static const char module[] = "TIFFWriteDirectoryTagBytePerSample"; - uint8* m; - uint8* na; - uint16 nb; - int o; - if (dir==NULL) - { - (*ndir)++; - return(1); - } - m=_TIFFmalloc(tif->tif_dir.td_samplesperpixel*sizeof(uint8)); - if (m==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - for (na=m, nb=0; nbtif_dir.td_samplesperpixel; na++, nb++) - *na=value; - o=TIFFWriteDirectoryTagCheckedByteArray(tif,ndir,dir,tag,tif->tif_dir.td_samplesperpixel,m); - _TIFFfree(m); - return(o); -} -#endif - -#ifdef notdef -static int -TIFFWriteDirectoryTagSbyte(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int8 value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedSbyte(tif,ndir,dir,tag,value)); -} -#endif - -static int -TIFFWriteDirectoryTagSbyteArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int8* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedSbyteArray(tif,ndir,dir,tag,count,value)); -} - -#if 0 -static int -TIFFWriteDirectoryTagSbytePerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int8 value) -{ - static const char module[] = "TIFFWriteDirectoryTagSbytePerSample"; - int8* m; - int8* na; - uint16 nb; - int o; - if (dir==NULL) - { - (*ndir)++; - return(1); - } - m=_TIFFmalloc(tif->tif_dir.td_samplesperpixel*sizeof(int8)); - if (m==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - for (na=m, nb=0; nbtif_dir.td_samplesperpixel; na++, nb++) - *na=value; - o=TIFFWriteDirectoryTagCheckedSbyteArray(tif,ndir,dir,tag,tif->tif_dir.td_samplesperpixel,m); - _TIFFfree(m); - return(o); -} -#endif - -static int -TIFFWriteDirectoryTagShort(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedShort(tif,ndir,dir,tag,value)); -} - -static int -TIFFWriteDirectoryTagShortArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint16* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedShortArray(tif,ndir,dir,tag,count,value)); -} - -static int -TIFFWriteDirectoryTagShortPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 value) -{ - static const char module[] = "TIFFWriteDirectoryTagShortPerSample"; - uint16* m; - uint16* na; - uint16 nb; - int o; - if (dir==NULL) - { - (*ndir)++; - return(1); - } - m=_TIFFmalloc(tif->tif_dir.td_samplesperpixel*sizeof(uint16)); - if (m==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - for (na=m, nb=0; nbtif_dir.td_samplesperpixel; na++, nb++) - *na=value; - o=TIFFWriteDirectoryTagCheckedShortArray(tif,ndir,dir,tag,tif->tif_dir.td_samplesperpixel,m); - _TIFFfree(m); - return(o); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagSshort(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int16 value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedSshort(tif,ndir,dir,tag,value)); -} -#endif - -static int -TIFFWriteDirectoryTagSshortArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int16* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedSshortArray(tif,ndir,dir,tag,count,value)); -} - -#if 0 -static int -TIFFWriteDirectoryTagSshortPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int16 value) -{ - static const char module[] = "TIFFWriteDirectoryTagSshortPerSample"; - int16* m; - int16* na; - uint16 nb; - int o; - if (dir==NULL) - { - (*ndir)++; - return(1); - } - m=_TIFFmalloc(tif->tif_dir.td_samplesperpixel*sizeof(int16)); - if (m==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - for (na=m, nb=0; nbtif_dir.td_samplesperpixel; na++, nb++) - *na=value; - o=TIFFWriteDirectoryTagCheckedSshortArray(tif,ndir,dir,tag,tif->tif_dir.td_samplesperpixel,m); - _TIFFfree(m); - return(o); -} -#endif - -static int -TIFFWriteDirectoryTagLong(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedLong(tif,ndir,dir,tag,value)); -} - -static int -TIFFWriteDirectoryTagLongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedLongArray(tif,ndir,dir,tag,count,value)); -} - -#if 0 -static int -TIFFWriteDirectoryTagLongPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 value) -{ - static const char module[] = "TIFFWriteDirectoryTagLongPerSample"; - uint32* m; - uint32* na; - uint16 nb; - int o; - if (dir==NULL) - { - (*ndir)++; - return(1); - } - m=_TIFFmalloc(tif->tif_dir.td_samplesperpixel*sizeof(uint32)); - if (m==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - for (na=m, nb=0; nbtif_dir.td_samplesperpixel; na++, nb++) - *na=value; - o=TIFFWriteDirectoryTagCheckedLongArray(tif,ndir,dir,tag,tif->tif_dir.td_samplesperpixel,m); - _TIFFfree(m); - return(o); -} -#endif - -#ifdef notdef -static int -TIFFWriteDirectoryTagSlong(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int32 value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedSlong(tif,ndir,dir,tag,value)); -} -#endif - -static int -TIFFWriteDirectoryTagSlongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int32* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedSlongArray(tif,ndir,dir,tag,count,value)); -} - -#if 0 -static int -TIFFWriteDirectoryTagSlongPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int32 value) -{ - static const char module[] = "TIFFWriteDirectoryTagSlongPerSample"; - int32* m; - int32* na; - uint16 nb; - int o; - if (dir==NULL) - { - (*ndir)++; - return(1); - } - m=_TIFFmalloc(tif->tif_dir.td_samplesperpixel*sizeof(int32)); - if (m==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - for (na=m, nb=0; nbtif_dir.td_samplesperpixel; na++, nb++) - *na=value; - o=TIFFWriteDirectoryTagCheckedSlongArray(tif,ndir,dir,tag,tif->tif_dir.td_samplesperpixel,m); - _TIFFfree(m); - return(o); -} -#endif - -#ifdef notdef -static int -TIFFWriteDirectoryTagLong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint64 value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedLong8(tif,ndir,dir,tag,value)); -} -#endif - -static int -TIFFWriteDirectoryTagLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedLong8Array(tif,ndir,dir,tag,count,value)); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagSlong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int64 value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedSlong8(tif,ndir,dir,tag,value)); -} -#endif - -static int -TIFFWriteDirectoryTagSlong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int64* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedSlong8Array(tif,ndir,dir,tag,count,value)); -} - -static int -TIFFWriteDirectoryTagRational(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedRational(tif,ndir,dir,tag,value)); -} - -static int -TIFFWriteDirectoryTagRationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedRationalArray(tif,ndir,dir,tag,count,value)); -} - -static int -TIFFWriteDirectoryTagSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedSrationalArray(tif,ndir,dir,tag,count,value)); -} - -#ifdef notdef -static int TIFFWriteDirectoryTagFloat(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, float value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedFloat(tif,ndir,dir,tag,value)); -} -#endif - -static int TIFFWriteDirectoryTagFloatArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedFloatArray(tif,ndir,dir,tag,count,value)); -} - -#if 0 -static int TIFFWriteDirectoryTagFloatPerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, float value) -{ - static const char module[] = "TIFFWriteDirectoryTagFloatPerSample"; - float* m; - float* na; - uint16 nb; - int o; - if (dir==NULL) - { - (*ndir)++; - return(1); - } - m=_TIFFmalloc(tif->tif_dir.td_samplesperpixel*sizeof(float)); - if (m==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - for (na=m, nb=0; nbtif_dir.td_samplesperpixel; na++, nb++) - *na=value; - o=TIFFWriteDirectoryTagCheckedFloatArray(tif,ndir,dir,tag,tif->tif_dir.td_samplesperpixel,m); - _TIFFfree(m); - return(o); -} -#endif - -#ifdef notdef -static int TIFFWriteDirectoryTagDouble(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedDouble(tif,ndir,dir,tag,value)); -} -#endif - -static int TIFFWriteDirectoryTagDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedDoubleArray(tif,ndir,dir,tag,count,value)); -} - -#if 0 -static int TIFFWriteDirectoryTagDoublePerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value) -{ - static const char module[] = "TIFFWriteDirectoryTagDoublePerSample"; - double* m; - double* na; - uint16 nb; - int o; - if (dir==NULL) - { - (*ndir)++; - return(1); - } - m=_TIFFmalloc(tif->tif_dir.td_samplesperpixel*sizeof(double)); - if (m==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - for (na=m, nb=0; nbtif_dir.td_samplesperpixel; na++, nb++) - *na=value; - o=TIFFWriteDirectoryTagCheckedDoubleArray(tif,ndir,dir,tag,tif->tif_dir.td_samplesperpixel,m); - _TIFFfree(m); - return(o); -} -#endif - -static int -TIFFWriteDirectoryTagIfdArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedIfdArray(tif,ndir,dir,tag,count,value)); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagIfd8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - return(TIFFWriteDirectoryTagCheckedIfd8Array(tif,ndir,dir,tag,count,value)); -} -#endif - -static int -TIFFWriteDirectoryTagShortLong(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 value) -{ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - if (value<=0xFFFF) - return(TIFFWriteDirectoryTagCheckedShort(tif,ndir,dir,tag,(uint16)value)); - else - return(TIFFWriteDirectoryTagCheckedLong(tif,ndir,dir,tag,value)); -} - -/************************************************************************/ -/* TIFFWriteDirectoryTagLongLong8Array() */ -/* */ -/* Write out LONG8 array as LONG8 for BigTIFF or LONG for */ -/* Classic TIFF with some checking. */ -/************************************************************************/ - -static int -TIFFWriteDirectoryTagLongLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value) -{ - static const char module[] = "TIFFWriteDirectoryTagLongLong8Array"; - uint64* ma; - uint32 mb; - uint32* p; - uint32* q; - int o; - - /* is this just a counting pass? */ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - - /* We always write LONG8 for BigTIFF, no checking needed. */ - if( tif->tif_flags&TIFF_BIGTIFF ) - return TIFFWriteDirectoryTagCheckedLong8Array(tif,ndir,dir, - tag,count,value); - - /* - ** For classic tiff we want to verify everything is in range for LONG - ** and convert to long format. - */ - - p = _TIFFmalloc(count*sizeof(uint32)); - if (p==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - - for (q=p, ma=value, mb=0; mb0xFFFFFFFF) - { - TIFFErrorExt(tif->tif_clientdata,module, - "Attempt to write value larger than 0xFFFFFFFF in Classic TIFF file."); - _TIFFfree(p); - return(0); - } - *q= (uint32)(*ma); - } - - o=TIFFWriteDirectoryTagCheckedLongArray(tif,ndir,dir,tag,count,p); - _TIFFfree(p); - - return(o); -} - -/************************************************************************/ -/* TIFFWriteDirectoryTagIfdIfd8Array() */ -/* */ -/* Write either IFD8 or IFD array depending on file type. */ -/************************************************************************/ - -static int -TIFFWriteDirectoryTagIfdIfd8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value) -{ - static const char module[] = "TIFFWriteDirectoryTagIfdIfd8Array"; - uint64* ma; - uint32 mb; - uint32* p; - uint32* q; - int o; - - /* is this just a counting pass? */ - if (dir==NULL) - { - (*ndir)++; - return(1); - } - - /* We always write IFD8 for BigTIFF, no checking needed. */ - if( tif->tif_flags&TIFF_BIGTIFF ) - return TIFFWriteDirectoryTagCheckedIfd8Array(tif,ndir,dir, - tag,count,value); - - /* - ** For classic tiff we want to verify everything is in range for IFD - ** and convert to long format. - */ - - p = _TIFFmalloc(count*sizeof(uint32)); - if (p==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - - for (q=p, ma=value, mb=0; mb0xFFFFFFFF) - { - TIFFErrorExt(tif->tif_clientdata,module, - "Attempt to write value larger than 0xFFFFFFFF in Classic TIFF file."); - _TIFFfree(p); - return(0); - } - *q= (uint32)(*ma); - } - - o=TIFFWriteDirectoryTagCheckedIfdArray(tif,ndir,dir,tag,count,p); - _TIFFfree(p); - - return(o); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagShortLongLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value) -{ - static const char module[] = "TIFFWriteDirectoryTagShortLongLong8Array"; - uint64* ma; - uint32 mb; - uint8 n; - int o; - if (dir==NULL) - { - (*ndir)++; - return(1); - } - n=0; - for (ma=value, mb=0; mb0xFFFF)) - n=1; - if ((n==1)&&(*ma>0xFFFFFFFF)) - { - n=2; - break; - } - } - if (n==0) - { - uint16* p; - uint16* q; - p=_TIFFmalloc(count*sizeof(uint16)); - if (p==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - for (ma=value, mb=0, q=p; mbtif_clientdata,module,"Out of memory"); - return(0); - } - for (ma=value, mb=0, q=p; mbtif_dir.td_bitspersample); - n=_TIFFmalloc(3*m*sizeof(uint16)); - if (n==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - _TIFFmemcpy(&n[0],tif->tif_dir.td_colormap[0],m*sizeof(uint16)); - _TIFFmemcpy(&n[m],tif->tif_dir.td_colormap[1],m*sizeof(uint16)); - _TIFFmemcpy(&n[2*m],tif->tif_dir.td_colormap[2],m*sizeof(uint16)); - o=TIFFWriteDirectoryTagCheckedShortArray(tif,ndir,dir,TIFFTAG_COLORMAP,3*m,n); - _TIFFfree(n); - return(o); -} - -static int -TIFFWriteDirectoryTagTransferfunction(TIFF* tif, uint32* ndir, TIFFDirEntry* dir) -{ - static const char module[] = "TIFFWriteDirectoryTagTransferfunction"; - uint32 m; - uint16 n; - uint16* o; - int p; - if (dir==NULL) - { - (*ndir)++; - return(1); - } - m=(1<tif_dir.td_bitspersample); - n=tif->tif_dir.td_samplesperpixel-tif->tif_dir.td_extrasamples; - /* - * Check if the table can be written as a single column, - * or if it must be written as 3 columns. Note that we - * write a 3-column tag if there are 2 samples/pixel and - * a single column of data won't suffice--hmm. - */ - if (n>3) - n=3; - if (n==3) - { - if (!_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[2],m*sizeof(uint16))) - n=2; - } - if (n==2) - { - if (!_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[1],m*sizeof(uint16))) - n=1; - } - if (n==0) - n=1; - o=_TIFFmalloc(n*m*sizeof(uint16)); - if (o==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - _TIFFmemcpy(&o[0],tif->tif_dir.td_transferfunction[0],m*sizeof(uint16)); - if (n>1) - _TIFFmemcpy(&o[m],tif->tif_dir.td_transferfunction[1],m*sizeof(uint16)); - if (n>2) - _TIFFmemcpy(&o[2*m],tif->tif_dir.td_transferfunction[2],m*sizeof(uint16)); - p=TIFFWriteDirectoryTagCheckedShortArray(tif,ndir,dir,TIFFTAG_TRANSFERFUNCTION,n*m,o); - _TIFFfree(o); - return(p); -} - -static int -TIFFWriteDirectoryTagSubifd(TIFF* tif, uint32* ndir, TIFFDirEntry* dir) -{ - static const char module[] = "TIFFWriteDirectoryTagSubifd"; - uint64 m; - int n; - if (tif->tif_dir.td_nsubifd==0) - return(1); - if (dir==NULL) - { - (*ndir)++; - return(1); - } - m=tif->tif_dataoff; - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint32* o; - uint64* pa; - uint32* pb; - uint16 p; - o=_TIFFmalloc(tif->tif_dir.td_nsubifd*sizeof(uint32)); - if (o==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - pa=tif->tif_dir.td_subifd; - pb=o; - for (p=0; p < tif->tif_dir.td_nsubifd; p++) - { - assert(pa != 0); - - /* Could happen if an classicTIFF has a SubIFD of type LONG8 (which is illegal) */ - if( *pa > 0xFFFFFFFFUL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Illegal value for SubIFD tag"); - _TIFFfree(o); - return(0); - } - *pb++=(uint32)(*pa++); - } - n=TIFFWriteDirectoryTagCheckedIfdArray(tif,ndir,dir,TIFFTAG_SUBIFD,tif->tif_dir.td_nsubifd,o); - _TIFFfree(o); - } - else - n=TIFFWriteDirectoryTagCheckedIfd8Array(tif,ndir,dir,TIFFTAG_SUBIFD,tif->tif_dir.td_nsubifd,tif->tif_dir.td_subifd); - if (!n) - return(0); - /* - * Total hack: if this directory includes a SubIFD - * tag then force the next directories to be - * written as ``sub directories'' of this one. This - * is used to write things like thumbnails and - * image masks that one wants to keep out of the - * normal directory linkage access mechanism. - */ - tif->tif_flags|=TIFF_INSUBIFD; - tif->tif_nsubifd=tif->tif_dir.td_nsubifd; - if (tif->tif_dir.td_nsubifd==1) - tif->tif_subifdoff=0; - else - tif->tif_subifdoff=m; - return(1); -} - -static int -TIFFWriteDirectoryTagCheckedAscii(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, char* value) -{ - assert(sizeof(char)==1); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_ASCII,count,count,value)); -} - -static int -TIFFWriteDirectoryTagCheckedUndefinedArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint8* value) -{ - assert(sizeof(uint8)==1); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_UNDEFINED,count,count,value)); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagCheckedByte(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint8 value) -{ - assert(sizeof(uint8)==1); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_BYTE,1,1,&value)); -} -#endif - -static int -TIFFWriteDirectoryTagCheckedByteArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint8* value) -{ - assert(sizeof(uint8)==1); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_BYTE,count,count,value)); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagCheckedSbyte(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int8 value) -{ - assert(sizeof(int8)==1); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SBYTE,1,1,&value)); -} -#endif - -static int -TIFFWriteDirectoryTagCheckedSbyteArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int8* value) -{ - assert(sizeof(int8)==1); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SBYTE,count,count,value)); -} - -static int -TIFFWriteDirectoryTagCheckedShort(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 value) -{ - uint16 m; - assert(sizeof(uint16)==2); - m=value; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort(&m); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SHORT,1,2,&m)); -} - -static int -TIFFWriteDirectoryTagCheckedShortArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint16* value) -{ - assert(count<0x80000000); - assert(sizeof(uint16)==2); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfShort(value,count); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SHORT,count,count*2,value)); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagCheckedSshort(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int16 value) -{ - int16 m; - assert(sizeof(int16)==2); - m=value; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort((uint16*)(&m)); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SSHORT,1,2,&m)); -} -#endif - -static int -TIFFWriteDirectoryTagCheckedSshortArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int16* value) -{ - assert(count<0x80000000); - assert(sizeof(int16)==2); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfShort((uint16*)value,count); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SSHORT,count,count*2,value)); -} - -static int -TIFFWriteDirectoryTagCheckedLong(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 value) -{ - uint32 m; - assert(sizeof(uint32)==4); - m=value; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&m); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_LONG,1,4,&m)); -} - -static int -TIFFWriteDirectoryTagCheckedLongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value) -{ - assert(count<0x40000000); - assert(sizeof(uint32)==4); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong(value,count); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_LONG,count,count*4,value)); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagCheckedSlong(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int32 value) -{ - int32 m; - assert(sizeof(int32)==4); - m=value; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong((uint32*)(&m)); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SLONG,1,4,&m)); -} -#endif - -static int -TIFFWriteDirectoryTagCheckedSlongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int32* value) -{ - assert(count<0x40000000); - assert(sizeof(int32)==4); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong((uint32*)value,count); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SLONG,count,count*4,value)); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagCheckedLong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint64 value) -{ - uint64 m; - assert(sizeof(uint64)==8); - if( !(tif->tif_flags&TIFF_BIGTIFF) ) { - TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8","LONG8 not allowed for ClassicTIFF"); - return(0); - } - m=value; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8(&m); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_LONG8,1,8,&m)); -} -#endif - -static int -TIFFWriteDirectoryTagCheckedLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value) -{ - assert(count<0x20000000); - assert(sizeof(uint64)==8); - if( !(tif->tif_flags&TIFF_BIGTIFF) ) { - TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8Array","LONG8 not allowed for ClassicTIFF"); - return(0); - } - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong8(value,count); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_LONG8,count,count*8,value)); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagCheckedSlong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int64 value) -{ - int64 m; - assert(sizeof(int64)==8); - if( !(tif->tif_flags&TIFF_BIGTIFF) ) { - TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedSlong8","SLONG8 not allowed for ClassicTIFF"); - return(0); - } - m=value; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8((uint64*)(&m)); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SLONG8,1,8,&m)); -} -#endif - -static int -TIFFWriteDirectoryTagCheckedSlong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int64* value) -{ - assert(count<0x20000000); - assert(sizeof(int64)==8); - if( !(tif->tif_flags&TIFF_BIGTIFF) ) { - TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedSlong8Array","SLONG8 not allowed for ClassicTIFF"); - return(0); - } - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong8((uint64*)value,count); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SLONG8,count,count*8,value)); -} - -static int -TIFFWriteDirectoryTagCheckedRational(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value) -{ - static const char module[] = "TIFFWriteDirectoryTagCheckedRational"; - uint32 m[2]; - assert(sizeof(uint32)==4); - if( value < 0 ) - { - TIFFErrorExt(tif->tif_clientdata,module,"Negative value is illegal"); - return 0; - } - else if( value != value ) - { - TIFFErrorExt(tif->tif_clientdata,module,"Not-a-number value is illegal"); - return 0; - } - else if (value==0.0) - { - m[0]=0; - m[1]=1; - } - else if (value <= 0xFFFFFFFFU && value==(double)(uint32)value) - { - m[0]=(uint32)value; - m[1]=1; - } - else if (value<1.0) - { - m[0]=(uint32)(value*0xFFFFFFFF); - m[1]=0xFFFFFFFF; - } - else - { - m[0]=0xFFFFFFFF; - m[1]=(uint32)(0xFFFFFFFF/value); - } - if (tif->tif_flags&TIFF_SWAB) - { - TIFFSwabLong(&m[0]); - TIFFSwabLong(&m[1]); - } - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_RATIONAL,1,8,&m[0])); -} - -static int -TIFFWriteDirectoryTagCheckedRationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value) -{ - static const char module[] = "TIFFWriteDirectoryTagCheckedRationalArray"; - uint32* m; - float* na; - uint32* nb; - uint32 nc; - int o; - assert(sizeof(uint32)==4); - m=_TIFFmalloc(count*2*sizeof(uint32)); - if (m==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - for (na=value, nb=m, nc=0; nc= 0 && *na <= (float)0xFFFFFFFFU && - *na==(float)(uint32)(*na)) - { - nb[0]=(uint32)(*na); - nb[1]=1; - } - else if (*na<1.0) - { - nb[0]=(uint32)((double)(*na)*0xFFFFFFFF); - nb[1]=0xFFFFFFFF; - } - else - { - nb[0]=0xFFFFFFFF; - nb[1]=(uint32)((double)0xFFFFFFFF/(*na)); - } - } - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong(m,count*2); - o=TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_RATIONAL,count,count*8,&m[0]); - _TIFFfree(m); - return(o); -} - -static int -TIFFWriteDirectoryTagCheckedSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value) -{ - static const char module[] = "TIFFWriteDirectoryTagCheckedSrationalArray"; - int32* m; - float* na; - int32* nb; - uint32 nc; - int o; - assert(sizeof(int32)==4); - m=_TIFFmalloc(count*2*sizeof(int32)); - if (m==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - for (na=value, nb=m, nc=0; nc-1.0) - { - nb[0]=-(int32)((double)(-*na)*0x7FFFFFFF); - nb[1]=0x7FFFFFFF; - } - else - { - nb[0]=-0x7FFFFFFF; - nb[1]=(int32)((double)0x7FFFFFFF/(-*na)); - } - } - else - { - if (*na==(int32)(*na)) - { - nb[0]=(int32)(*na); - nb[1]=1; - } - else if (*na<1.0) - { - nb[0]=(int32)((double)(*na)*0x7FFFFFFF); - nb[1]=0x7FFFFFFF; - } - else - { - nb[0]=0x7FFFFFFF; - nb[1]=(int32)((double)0x7FFFFFFF/(*na)); - } - } - } - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong((uint32*)m,count*2); - o=TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SRATIONAL,count,count*8,&m[0]); - _TIFFfree(m); - return(o); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagCheckedFloat(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, float value) -{ - float m; - assert(sizeof(float)==4); - m=value; - TIFFCvtNativeToIEEEFloat(tif,1,&m); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabFloat(&m); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_FLOAT,1,4,&m)); -} -#endif - -static int -TIFFWriteDirectoryTagCheckedFloatArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value) -{ - assert(count<0x40000000); - assert(sizeof(float)==4); - TIFFCvtNativeToIEEEFloat(tif,count,&value); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfFloat(value,count); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_FLOAT,count,count*4,value)); -} - -#ifdef notdef -static int -TIFFWriteDirectoryTagCheckedDouble(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value) -{ - double m; - assert(sizeof(double)==8); - m=value; - TIFFCvtNativeToIEEEDouble(tif,1,&m); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabDouble(&m); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_DOUBLE,1,8,&m)); -} -#endif - -static int -TIFFWriteDirectoryTagCheckedDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value) -{ - assert(count<0x20000000); - assert(sizeof(double)==8); - TIFFCvtNativeToIEEEDouble(tif,count,&value); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfDouble(value,count); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_DOUBLE,count,count*8,value)); -} - -static int -TIFFWriteDirectoryTagCheckedIfdArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value) -{ - assert(count<0x40000000); - assert(sizeof(uint32)==4); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong(value,count); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_IFD,count,count*4,value)); -} - -static int -TIFFWriteDirectoryTagCheckedIfd8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value) -{ - assert(count<0x20000000); - assert(sizeof(uint64)==8); - assert(tif->tif_flags&TIFF_BIGTIFF); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabArrayOfLong8(value,count); - return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_IFD8,count,count*8,value)); -} - -static int -TIFFWriteDirectoryTagData(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 datatype, uint32 count, uint32 datalength, void* data) -{ - static const char module[] = "TIFFWriteDirectoryTagData"; - uint32 m; - m=0; - while (m<(*ndir)) - { - assert(dir[m].tdir_tag!=tag); - if (dir[m].tdir_tag>tag) - break; - m++; - } - if (m<(*ndir)) - { - uint32 n; - for (n=*ndir; n>m; n--) - dir[n]=dir[n-1]; - } - dir[m].tdir_tag=tag; - dir[m].tdir_type=datatype; - dir[m].tdir_count=count; - dir[m].tdir_offset.toff_long8 = 0; - if (datalength<=((tif->tif_flags&TIFF_BIGTIFF)?0x8U:0x4U)) - _TIFFmemcpy(&dir[m].tdir_offset,data,datalength); - else - { - uint64 na,nb; - na=tif->tif_dataoff; - nb=na+datalength; - if (!(tif->tif_flags&TIFF_BIGTIFF)) - nb=(uint32)nb; - if ((nbtif_clientdata,module,"Maximum TIFF file size exceeded"); - return(0); - } - if (!SeekOK(tif,na)) - { - TIFFErrorExt(tif->tif_clientdata,module,"IO error writing tag data"); - return(0); - } - assert(datalength<0x80000000UL); - if (!WriteOK(tif,data,(tmsize_t)datalength)) - { - TIFFErrorExt(tif->tif_clientdata,module,"IO error writing tag data"); - return(0); - } - tif->tif_dataoff=nb; - if (tif->tif_dataoff&1) - tif->tif_dataoff++; - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint32 o; - o=(uint32)na; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong(&o); - _TIFFmemcpy(&dir[m].tdir_offset,&o,4); - } - else - { - dir[m].tdir_offset.toff_long8 = na; - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8(&dir[m].tdir_offset.toff_long8); - } - } - (*ndir)++; - return(1); -} - -/* - * Link the current directory into the directory chain for the file. - */ -static int -TIFFLinkDirectory(TIFF* tif) -{ - static const char module[] = "TIFFLinkDirectory"; - - tif->tif_diroff = (TIFFSeekFile(tif,0,SEEK_END)+1) & (~((toff_t)1)); - - /* - * Handle SubIFDs - */ - if (tif->tif_flags & TIFF_INSUBIFD) - { - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint32 m; - m = (uint32)tif->tif_diroff; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&m); - (void) TIFFSeekFile(tif, tif->tif_subifdoff, SEEK_SET); - if (!WriteOK(tif, &m, 4)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error writing SubIFD directory link"); - return (0); - } - /* - * Advance to the next SubIFD or, if this is - * the last one configured, revert back to the - * normal directory linkage. - */ - if (--tif->tif_nsubifd) - tif->tif_subifdoff += 4; - else - tif->tif_flags &= ~TIFF_INSUBIFD; - return (1); - } - else - { - uint64 m; - m = tif->tif_diroff; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&m); - (void) TIFFSeekFile(tif, tif->tif_subifdoff, SEEK_SET); - if (!WriteOK(tif, &m, 8)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error writing SubIFD directory link"); - return (0); - } - /* - * Advance to the next SubIFD or, if this is - * the last one configured, revert back to the - * normal directory linkage. - */ - if (--tif->tif_nsubifd) - tif->tif_subifdoff += 8; - else - tif->tif_flags &= ~TIFF_INSUBIFD; - return (1); - } - } - - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint32 m; - uint32 nextdir; - m = (uint32)(tif->tif_diroff); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&m); - if (tif->tif_header.classic.tiff_diroff == 0) { - /* - * First directory, overwrite offset in header. - */ - tif->tif_header.classic.tiff_diroff = (uint32) tif->tif_diroff; - (void) TIFFSeekFile(tif,4, SEEK_SET); - if (!WriteOK(tif, &m, 4)) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Error writing TIFF header"); - return (0); - } - return (1); - } - /* - * Not the first directory, search to the last and append. - */ - nextdir = tif->tif_header.classic.tiff_diroff; - while(1) { - uint16 dircount; - uint32 nextnextdir; - - if (!SeekOK(tif, nextdir) || - !ReadOK(tif, &dircount, 2)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error fetching directory count"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - (void) TIFFSeekFile(tif, - nextdir+2+dircount*12, SEEK_SET); - if (!ReadOK(tif, &nextnextdir, 4)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error fetching directory link"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextnextdir); - if (nextnextdir==0) - { - (void) TIFFSeekFile(tif, - nextdir+2+dircount*12, SEEK_SET); - if (!WriteOK(tif, &m, 4)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error writing directory link"); - return (0); - } - break; - } - nextdir=nextnextdir; - } - } - else - { - uint64 m; - uint64 nextdir; - m = tif->tif_diroff; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&m); - if (tif->tif_header.big.tiff_diroff == 0) { - /* - * First directory, overwrite offset in header. - */ - tif->tif_header.big.tiff_diroff = tif->tif_diroff; - (void) TIFFSeekFile(tif,8, SEEK_SET); - if (!WriteOK(tif, &m, 8)) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Error writing TIFF header"); - return (0); - } - return (1); - } - /* - * Not the first directory, search to the last and append. - */ - nextdir = tif->tif_header.big.tiff_diroff; - while(1) { - uint64 dircount64; - uint16 dircount; - uint64 nextnextdir; - - if (!SeekOK(tif, nextdir) || - !ReadOK(tif, &dircount64, 8)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error fetching directory count"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64>0xFFFF) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Sanity check on tag count failed, likely corrupt TIFF"); - return (0); - } - dircount=(uint16)dircount64; - (void) TIFFSeekFile(tif, - nextdir+8+dircount*20, SEEK_SET); - if (!ReadOK(tif, &nextnextdir, 8)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error fetching directory link"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&nextnextdir); - if (nextnextdir==0) - { - (void) TIFFSeekFile(tif, - nextdir+8+dircount*20, SEEK_SET); - if (!WriteOK(tif, &m, 8)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error writing directory link"); - return (0); - } - break; - } - nextdir=nextnextdir; - } - } - return (1); -} - -/************************************************************************/ -/* TIFFRewriteField() */ -/* */ -/* Rewrite a field in the directory on disk without regard to */ -/* updating the TIFF directory structure in memory. Currently */ -/* only supported for field that already exist in the on-disk */ -/* directory. Mainly used for updating stripoffset / */ -/* stripbytecount values after the directory is already on */ -/* disk. */ -/* */ -/* Returns zero on failure, and one on success. */ -/************************************************************************/ - -int -_TIFFRewriteField(TIFF* tif, uint16 tag, TIFFDataType in_datatype, - tmsize_t count, void* data) -{ - static const char module[] = "TIFFResetField"; - /* const TIFFField* fip = NULL; */ - uint16 dircount; - tmsize_t dirsize; - uint8 direntry_raw[20]; - uint16 entry_tag = 0; - uint16 entry_type = 0; - uint64 entry_count = 0; - uint64 entry_offset = 0; - int value_in_entry = 0; - uint64 read_offset; - uint8 *buf_to_write = NULL; - TIFFDataType datatype; - -/* -------------------------------------------------------------------- */ -/* Find field definition. */ -/* -------------------------------------------------------------------- */ - /*fip =*/ TIFFFindField(tif, tag, TIFF_ANY); - -/* -------------------------------------------------------------------- */ -/* Do some checking this is a straight forward case. */ -/* -------------------------------------------------------------------- */ - if( isMapped(tif) ) - { - TIFFErrorExt( tif->tif_clientdata, module, - "Memory mapped files not currently supported for this operation." ); - return 0; - } - - if( tif->tif_diroff == 0 ) - { - TIFFErrorExt( tif->tif_clientdata, module, - "Attempt to reset field on directory not already on disk." ); - return 0; - } - -/* -------------------------------------------------------------------- */ -/* Read the directory entry count. */ -/* -------------------------------------------------------------------- */ - if (!SeekOK(tif, tif->tif_diroff)) { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Seek error accessing TIFF directory", - tif->tif_name); - return 0; - } - - read_offset = tif->tif_diroff; - - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - if (!ReadOK(tif, &dircount, sizeof (uint16))) { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Can not read TIFF directory count", - tif->tif_name); - return 0; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - dirsize = 12; - read_offset += 2; - } else { - uint64 dircount64; - if (!ReadOK(tif, &dircount64, sizeof (uint64))) { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Can not read TIFF directory count", - tif->tif_name); - return 0; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - dircount = (uint16)dircount64; - dirsize = 20; - read_offset += 8; - } - -/* -------------------------------------------------------------------- */ -/* Read through directory to find target tag. */ -/* -------------------------------------------------------------------- */ - while( dircount > 0 ) - { - if (!ReadOK(tif, direntry_raw, dirsize)) { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Can not read TIFF directory entry.", - tif->tif_name); - return 0; - } - - memcpy( &entry_tag, direntry_raw + 0, sizeof(uint16) ); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort( &entry_tag ); - - if( entry_tag == tag ) - break; - - read_offset += dirsize; - } - - if( entry_tag != tag ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Could not find tag %d.", - tif->tif_name, tag ); - return 0; - } - -/* -------------------------------------------------------------------- */ -/* Extract the type, count and offset for this entry. */ -/* -------------------------------------------------------------------- */ - memcpy( &entry_type, direntry_raw + 2, sizeof(uint16) ); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort( &entry_type ); - - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint32 value; - - memcpy( &value, direntry_raw + 4, sizeof(uint32) ); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong( &value ); - entry_count = value; - - memcpy( &value, direntry_raw + 8, sizeof(uint32) ); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong( &value ); - entry_offset = value; - } - else - { - memcpy( &entry_count, direntry_raw + 4, sizeof(uint64) ); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8( &entry_count ); - - memcpy( &entry_offset, direntry_raw + 12, sizeof(uint64) ); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8( &entry_offset ); - } - -/* -------------------------------------------------------------------- */ -/* What data type do we want to write this as? */ -/* -------------------------------------------------------------------- */ - if( TIFFDataWidth(in_datatype) == 8 && !(tif->tif_flags&TIFF_BIGTIFF) ) - { - if( in_datatype == TIFF_LONG8 ) - datatype = TIFF_LONG; - else if( in_datatype == TIFF_SLONG8 ) - datatype = TIFF_SLONG; - else if( in_datatype == TIFF_IFD8 ) - datatype = TIFF_IFD; - else - datatype = in_datatype; - } - else - datatype = in_datatype; - -/* -------------------------------------------------------------------- */ -/* Prepare buffer of actual data to write. This includes */ -/* swabbing as needed. */ -/* -------------------------------------------------------------------- */ - buf_to_write = - (uint8 *)_TIFFCheckMalloc(tif, count, TIFFDataWidth(datatype), - "for field buffer."); - if (!buf_to_write) - return 0; - - if( datatype == in_datatype ) - memcpy( buf_to_write, data, count * TIFFDataWidth(datatype) ); - else if( datatype == TIFF_SLONG && in_datatype == TIFF_SLONG8 ) - { - tmsize_t i; - - for( i = 0; i < count; i++ ) - { - ((int32 *) buf_to_write)[i] = - (int32) ((int64 *) data)[i]; - if( (int64) ((int32 *) buf_to_write)[i] != ((int64 *) data)[i] ) - { - _TIFFfree( buf_to_write ); - TIFFErrorExt( tif->tif_clientdata, module, - "Value exceeds 32bit range of output type." ); - return 0; - } - } - } - else if( (datatype == TIFF_LONG && in_datatype == TIFF_LONG8) - || (datatype == TIFF_IFD && in_datatype == TIFF_IFD8) ) - { - tmsize_t i; - - for( i = 0; i < count; i++ ) - { - ((uint32 *) buf_to_write)[i] = - (uint32) ((uint64 *) data)[i]; - if( (uint64) ((uint32 *) buf_to_write)[i] != ((uint64 *) data)[i] ) - { - _TIFFfree( buf_to_write ); - TIFFErrorExt( tif->tif_clientdata, module, - "Value exceeds 32bit range of output type." ); - return 0; - } - } - } - - if( TIFFDataWidth(datatype) > 1 && (tif->tif_flags&TIFF_SWAB) ) - { - if( TIFFDataWidth(datatype) == 2 ) - TIFFSwabArrayOfShort( (uint16 *) buf_to_write, count ); - else if( TIFFDataWidth(datatype) == 4 ) - TIFFSwabArrayOfLong( (uint32 *) buf_to_write, count ); - else if( TIFFDataWidth(datatype) == 8 ) - TIFFSwabArrayOfLong8( (uint64 *) buf_to_write, count ); - } - -/* -------------------------------------------------------------------- */ -/* Is this a value that fits into the directory entry? */ -/* -------------------------------------------------------------------- */ - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - if( TIFFDataWidth(datatype) * count <= 4 ) - { - entry_offset = read_offset + 8; - value_in_entry = 1; - } - } - else - { - if( TIFFDataWidth(datatype) * count <= 8 ) - { - entry_offset = read_offset + 12; - value_in_entry = 1; - } - } - -/* -------------------------------------------------------------------- */ -/* If the tag type, and count match, then we just write it out */ -/* over the old values without altering the directory entry at */ -/* all. */ -/* -------------------------------------------------------------------- */ - if( entry_count == (uint64)count && entry_type == (uint16) datatype ) - { - if (!SeekOK(tif, entry_offset)) { - _TIFFfree( buf_to_write ); - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Seek error accessing TIFF directory", - tif->tif_name); - return 0; - } - if (!WriteOK(tif, buf_to_write, count*TIFFDataWidth(datatype))) { - _TIFFfree( buf_to_write ); - TIFFErrorExt(tif->tif_clientdata, module, - "Error writing directory link"); - return (0); - } - - _TIFFfree( buf_to_write ); - return 1; - } - -/* -------------------------------------------------------------------- */ -/* Otherwise, we write the new tag data at the end of the file. */ -/* -------------------------------------------------------------------- */ - if( !value_in_entry ) - { - entry_offset = TIFFSeekFile(tif,0,SEEK_END); - - if (!WriteOK(tif, buf_to_write, count*TIFFDataWidth(datatype))) { - _TIFFfree( buf_to_write ); - TIFFErrorExt(tif->tif_clientdata, module, - "Error writing directory link"); - return (0); - } - } - else - { - memcpy( &entry_offset, buf_to_write, count*TIFFDataWidth(datatype)); - } - - _TIFFfree( buf_to_write ); - buf_to_write = 0; - -/* -------------------------------------------------------------------- */ -/* Adjust the directory entry. */ -/* -------------------------------------------------------------------- */ - entry_type = datatype; - memcpy( direntry_raw + 2, &entry_type, sizeof(uint16) ); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabShort( (uint16 *) (direntry_raw + 2) ); - - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - uint32 value; - - value = (uint32) entry_count; - memcpy( direntry_raw + 4, &value, sizeof(uint32) ); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong( (uint32 *) (direntry_raw + 4) ); - - value = (uint32) entry_offset; - memcpy( direntry_raw + 8, &value, sizeof(uint32) ); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong( (uint32 *) (direntry_raw + 8) ); - } - else - { - memcpy( direntry_raw + 4, &entry_count, sizeof(uint64) ); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8( (uint64 *) (direntry_raw + 4) ); - - memcpy( direntry_raw + 12, &entry_offset, sizeof(uint64) ); - if (tif->tif_flags&TIFF_SWAB) - TIFFSwabLong8( (uint64 *) (direntry_raw + 12) ); - } - -/* -------------------------------------------------------------------- */ -/* Write the directory entry out to disk. */ -/* -------------------------------------------------------------------- */ - if (!SeekOK(tif, read_offset )) { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Seek error accessing TIFF directory", - tif->tif_name); - return 0; - } - - if (!WriteOK(tif, direntry_raw,dirsize)) - { - TIFFErrorExt(tif->tif_clientdata, module, - "%s: Can not write TIFF directory entry.", - tif->tif_name); - return 0; - } - - return 1; -} -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_dumpmode.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_dumpmode.c deleted file mode 100644 index dae174f..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_dumpmode.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * "Null" Compression Algorithm Support. - */ -#include "tiffiop.h" - -static int -DumpFixupTags(TIFF* tif) -{ - (void) tif; - return (1); -} - -/* - * Encode a hunk of pixels. - */ -static int -DumpModeEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) -{ - (void) s; - while (cc > 0) { - tmsize_t n; - - n = cc; - if (tif->tif_rawcc + n > tif->tif_rawdatasize) - n = tif->tif_rawdatasize - tif->tif_rawcc; - - assert( n > 0 ); - - /* - * Avoid copy if client has setup raw - * data buffer to avoid extra copy. - */ - if (tif->tif_rawcp != pp) - _TIFFmemcpy(tif->tif_rawcp, pp, n); - tif->tif_rawcp += n; - tif->tif_rawcc += n; - pp += n; - cc -= n; - if (tif->tif_rawcc >= tif->tif_rawdatasize && - !TIFFFlushData1(tif)) - return (0); - } - return (1); -} - -/* - * Decode a hunk of pixels. - */ -static int -DumpModeDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) -{ - static const char module[] = "DumpModeDecode"; - (void) s; - if (tif->tif_rawcc < cc) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, -"Not enough data for scanline %lu, expected a request for at most %I64d bytes, got a request for %I64d bytes", - (unsigned long) tif->tif_row, - (signed __int64) tif->tif_rawcc, - (signed __int64) cc); -#else - TIFFErrorExt(tif->tif_clientdata, module, -"Not enough data for scanline %lu, expected a request for at most %lld bytes, got a request for %lld bytes", - (unsigned long) tif->tif_row, - (signed long long) tif->tif_rawcc, - (signed long long) cc); -#endif - return (0); - } - /* - * Avoid copy if client has setup raw - * data buffer to avoid extra copy. - */ - if (tif->tif_rawcp != buf) - _TIFFmemcpy(buf, tif->tif_rawcp, cc); - tif->tif_rawcp += cc; - tif->tif_rawcc -= cc; - return (1); -} - -/* - * Seek forwards nrows in the current strip. - */ -static int -DumpModeSeek(TIFF* tif, uint32 nrows) -{ - tif->tif_rawcp += nrows * tif->tif_scanlinesize; - tif->tif_rawcc -= nrows * tif->tif_scanlinesize; - return (1); -} - -/* - * Initialize dump mode. - */ -int -TIFFInitDumpMode(TIFF* tif, int scheme) -{ - (void) scheme; - tif->tif_fixuptags = DumpFixupTags; - tif->tif_decoderow = DumpModeDecode; - tif->tif_decodestrip = DumpModeDecode; - tif->tif_decodetile = DumpModeDecode; - tif->tif_encoderow = DumpModeEncode; - tif->tif_encodestrip = DumpModeEncode; - tif->tif_encodetile = DumpModeEncode; - tif->tif_seek = DumpModeSeek; - return (1); -} -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_error.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_error.c deleted file mode 100644 index 9ccf9f8..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_error.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - */ -#include "tiffiop.h" - -TIFFErrorHandlerExt _TIFFerrorHandlerExt = NULL; - -TIFFErrorHandler -TIFFSetErrorHandler(TIFFErrorHandler handler) -{ - TIFFErrorHandler prev = _TIFFerrorHandler; - _TIFFerrorHandler = handler; - return (prev); -} - -TIFFErrorHandlerExt -TIFFSetErrorHandlerExt(TIFFErrorHandlerExt handler) -{ - TIFFErrorHandlerExt prev = _TIFFerrorHandlerExt; - _TIFFerrorHandlerExt = handler; - return (prev); -} - -void -TIFFError(const char* module, const char* fmt, ...) -{ - va_list ap; - if (_TIFFerrorHandler) { - va_start(ap, fmt); - (*_TIFFerrorHandler)(module, fmt, ap); - va_end(ap); - } - if (_TIFFerrorHandlerExt) { - va_start(ap, fmt); - (*_TIFFerrorHandlerExt)(0, module, fmt, ap); - va_end(ap); - } -} - -void -TIFFErrorExt(thandle_t fd, const char* module, const char* fmt, ...) -{ - va_list ap; - if (_TIFFerrorHandler) { - va_start(ap, fmt); - (*_TIFFerrorHandler)(module, fmt, ap); - va_end(ap); - } - if (_TIFFerrorHandlerExt) { - va_start(ap, fmt); - (*_TIFFerrorHandlerExt)(fd, module, fmt, ap); - va_end(ap); - } -} - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_extension.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_extension.c deleted file mode 100644 index 6afb438..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_extension.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Various routines support external extension of the tag set, and other - * application extension capabilities. - */ - -#include "tiffiop.h" - -int TIFFGetTagListCount( TIFF *tif ) - -{ - TIFFDirectory* td = &tif->tif_dir; - - return td->td_customValueCount; -} - -uint32 TIFFGetTagListEntry( TIFF *tif, int tag_index ) - -{ - TIFFDirectory* td = &tif->tif_dir; - - if( tag_index < 0 || tag_index >= td->td_customValueCount ) - return (uint32)(-1); - else - return td->td_customValues[tag_index].info->field_tag; -} - -/* -** This provides read/write access to the TIFFTagMethods within the TIFF -** structure to application code without giving access to the private -** TIFF structure. -*/ -TIFFTagMethods *TIFFAccessTagMethods( TIFF *tif ) - -{ - return &(tif->tif_tagmethods); -} - -void *TIFFGetClientInfo( TIFF *tif, const char *name ) - -{ - TIFFClientInfoLink *psLink = tif->tif_clientinfo; - - while( psLink != NULL && strcmp(psLink->name,name) != 0 ) - psLink = psLink->next; - - if( psLink != NULL ) - return psLink->data; - else - return NULL; -} - -void TIFFSetClientInfo( TIFF *tif, void *data, const char *name ) - -{ - TIFFClientInfoLink *psLink = tif->tif_clientinfo; - - /* - ** Do we have an existing link with this name? If so, just - ** set it. - */ - while( psLink != NULL && strcmp(psLink->name,name) != 0 ) - psLink = psLink->next; - - if( psLink != NULL ) - { - psLink->data = data; - return; - } - - /* - ** Create a new link. - */ - - psLink = (TIFFClientInfoLink *) _TIFFmalloc(sizeof(TIFFClientInfoLink)); - assert (psLink != NULL); - psLink->next = tif->tif_clientinfo; - psLink->name = (char *) _TIFFmalloc((tmsize_t)(strlen(name)+1)); - assert (psLink->name != NULL); - strcpy(psLink->name, name); - psLink->data = data; - - tif->tif_clientinfo = psLink; -} -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_fax3.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_fax3.c deleted file mode 100644 index e6e1bb1..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_fax3.c +++ /dev/null @@ -1,1646 +0,0 @@ -/* - * Copyright (c) 1990-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef CCITT_SUPPORT -/* - * TIFF Library. - * - * CCITT Group 3 (T.4) and Group 4 (T.6) Compression Support. - * - * This file contains support for decoding and encoding TIFF - * compression algorithms 2, 3, 4, and 32771. - * - * Decoder support is derived, with permission, from the code - * in Frank Cringle's viewfax program; - * Copyright (C) 1990, 1995 Frank D. Cringle. - */ -#include "tif_fax3.h" -#define G3CODES -#include "t4.h" -#include - -/* - * Compression+decompression state blocks are - * derived from this ``base state'' block. - */ -typedef struct { - int rw_mode; /* O_RDONLY for decode, else encode */ - int mode; /* operating mode */ - tmsize_t rowbytes; /* bytes in a decoded scanline */ - uint32 rowpixels; /* pixels in a scanline */ - - uint16 cleanfaxdata; /* CleanFaxData tag */ - uint32 badfaxrun; /* BadFaxRun tag */ - uint32 badfaxlines; /* BadFaxLines tag */ - uint32 groupoptions; /* Group 3/4 options tag */ - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ - TIFFPrintMethod printdir; /* super-class method */ -} Fax3BaseState; -#define Fax3State(tif) ((Fax3BaseState*) (tif)->tif_data) - -typedef enum { G3_1D, G3_2D } Ttag; -typedef struct { - Fax3BaseState b; - - /* Decoder state info */ - const unsigned char* bitmap; /* bit reversal table */ - uint32 data; /* current i/o byte/word */ - int bit; /* current i/o bit in byte */ - int EOLcnt; /* count of EOL codes recognized */ - TIFFFaxFillFunc fill; /* fill routine */ - uint32* runs; /* b&w runs for current/previous row */ - uint32* refruns; /* runs for reference line */ - uint32* curruns; /* runs for current line */ - - /* Encoder state info */ - Ttag tag; /* encoding state */ - unsigned char* refline; /* reference line for 2d decoding */ - int k; /* #rows left that can be 2d encoded */ - int maxk; /* max #rows that can be 2d encoded */ - - int line; -} Fax3CodecState; -#define DecoderState(tif) ((Fax3CodecState*) Fax3State(tif)) -#define EncoderState(tif) ((Fax3CodecState*) Fax3State(tif)) - -#define is2DEncoding(sp) (sp->b.groupoptions & GROUP3OPT_2DENCODING) -#define isAligned(p,t) ((((size_t)(p)) & (sizeof (t)-1)) == 0) - -/* - * Group 3 and Group 4 Decoding. - */ - -/* - * These macros glue the TIFF library state to - * the state expected by Frank's decoder. - */ -#define DECLARE_STATE(tif, sp, mod) \ - static const char module[] = mod; \ - Fax3CodecState* sp = DecoderState(tif); \ - int a0; /* reference element */ \ - int lastx = sp->b.rowpixels; /* last element in row */ \ - uint32 BitAcc; /* bit accumulator */ \ - int BitsAvail; /* # valid bits in BitAcc */ \ - int RunLength; /* length of current run */ \ - unsigned char* cp; /* next byte of input data */ \ - unsigned char* ep; /* end of input data */ \ - uint32* pa; /* place to stuff next run */ \ - uint32* thisrun; /* current row's run array */ \ - int EOLcnt; /* # EOL codes recognized */ \ - const unsigned char* bitmap = sp->bitmap; /* input data bit reverser */ \ - const TIFFFaxTabEnt* TabEnt -#define DECLARE_STATE_2D(tif, sp, mod) \ - DECLARE_STATE(tif, sp, mod); \ - int b1; /* next change on prev line */ \ - uint32* pb /* next run in reference line */\ -/* - * Load any state that may be changed during decoding. - */ -#define CACHE_STATE(tif, sp) do { \ - BitAcc = sp->data; \ - BitsAvail = sp->bit; \ - EOLcnt = sp->EOLcnt; \ - cp = (unsigned char*) tif->tif_rawcp; \ - ep = cp + tif->tif_rawcc; \ -} while (0) -/* - * Save state possibly changed during decoding. - */ -#define UNCACHE_STATE(tif, sp) do { \ - sp->bit = BitsAvail; \ - sp->data = BitAcc; \ - sp->EOLcnt = EOLcnt; \ - tif->tif_rawcc -= (tmsize_t)((uint8*) cp - tif->tif_rawcp); \ - tif->tif_rawcp = (uint8*) cp; \ -} while (0) - -/* - * Setup state for decoding a strip. - */ -static int -Fax3PreDecode(TIFF* tif, uint16 s) -{ - Fax3CodecState* sp = DecoderState(tif); - - (void) s; - assert(sp != NULL); - sp->bit = 0; /* force initial read */ - sp->data = 0; - sp->EOLcnt = 0; /* force initial scan for EOL */ - /* - * Decoder assumes lsb-to-msb bit order. Note that we select - * this here rather than in Fax3SetupState so that viewers can - * hold the image open, fiddle with the FillOrder tag value, - * and then re-decode the image. Otherwise they'd need to close - * and open the image to get the state reset. - */ - sp->bitmap = - TIFFGetBitRevTable(tif->tif_dir.td_fillorder != FILLORDER_LSB2MSB); - if (sp->refruns) { /* init reference line to white */ - sp->refruns[0] = (uint32) sp->b.rowpixels; - sp->refruns[1] = 0; - } - sp->line = 0; - return (1); -} - -/* - * Routine for handling various errors/conditions. - * Note how they are "glued into the decoder" by - * overriding the definitions used by the decoder. - */ - -static void -Fax3Unexpected(const char* module, TIFF* tif, uint32 line, uint32 a0) -{ - TIFFErrorExt(tif->tif_clientdata, module, "Bad code word at line %u of %s %u (x %u)", - line, isTiled(tif) ? "tile" : "strip", - (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip), - a0); -} -#define unexpected(table, a0) Fax3Unexpected(module, tif, sp->line, a0) - -static void -Fax3Extension(const char* module, TIFF* tif, uint32 line, uint32 a0) -{ - TIFFErrorExt(tif->tif_clientdata, module, - "Uncompressed data (not supported) at line %u of %s %u (x %u)", - line, isTiled(tif) ? "tile" : "strip", - (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip), - a0); -} -#define extension(a0) Fax3Extension(module, tif, sp->line, a0) - -static void -Fax3BadLength(const char* module, TIFF* tif, uint32 line, uint32 a0, uint32 lastx) -{ - TIFFWarningExt(tif->tif_clientdata, module, "%s at line %u of %s %u (got %u, expected %u)", - a0 < lastx ? "Premature EOL" : "Line length mismatch", - line, isTiled(tif) ? "tile" : "strip", - (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip), - a0, lastx); -} -#define badlength(a0,lastx) Fax3BadLength(module, tif, sp->line, a0, lastx) - -static void -Fax3PrematureEOF(const char* module, TIFF* tif, uint32 line, uint32 a0) -{ - TIFFWarningExt(tif->tif_clientdata, module, "Premature EOF at line %u of %s %u (x %u)", - line, isTiled(tif) ? "tile" : "strip", - (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip), - a0); -} -#define prematureEOF(a0) Fax3PrematureEOF(module, tif, sp->line, a0) - -#define Nop - -/* - * Decode the requested amount of G3 1D-encoded data. - */ -static int -Fax3Decode1D(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) -{ - DECLARE_STATE(tif, sp, "Fax3Decode1D"); - (void) s; - if (occ % sp->b.rowbytes) - { - TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be read"); - return (-1); - } - CACHE_STATE(tif, sp); - thisrun = sp->curruns; - while (occ > 0) { - a0 = 0; - RunLength = 0; - pa = thisrun; -#ifdef FAX3_DEBUG - printf("\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail); - printf("-------------------- %d\n", tif->tif_row); - fflush(stdout); -#endif - SYNC_EOL(EOF1D); - EXPAND1D(EOF1Da); - (*sp->fill)(buf, thisrun, pa, lastx); - buf += sp->b.rowbytes; - occ -= sp->b.rowbytes; - sp->line++; - continue; - EOF1D: /* premature EOF */ - CLEANUP_RUNS(); - EOF1Da: /* premature EOF */ - (*sp->fill)(buf, thisrun, pa, lastx); - UNCACHE_STATE(tif, sp); - return (-1); - } - UNCACHE_STATE(tif, sp); - return (1); -} - -#define SWAP(t,a,b) { t x; x = (a); (a) = (b); (b) = x; } -/* - * Decode the requested amount of G3 2D-encoded data. - */ -static int -Fax3Decode2D(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) -{ - DECLARE_STATE_2D(tif, sp, "Fax3Decode2D"); - int is1D; /* current line is 1d/2d-encoded */ - (void) s; - if (occ % sp->b.rowbytes) - { - TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be read"); - return (-1); - } - CACHE_STATE(tif, sp); - while (occ > 0) { - a0 = 0; - RunLength = 0; - pa = thisrun = sp->curruns; -#ifdef FAX3_DEBUG - printf("\nBitAcc=%08X, BitsAvail = %d EOLcnt = %d", - BitAcc, BitsAvail, EOLcnt); -#endif - SYNC_EOL(EOF2D); - NeedBits8(1, EOF2D); - is1D = GetBits(1); /* 1D/2D-encoding tag bit */ - ClrBits(1); -#ifdef FAX3_DEBUG - printf(" %s\n-------------------- %d\n", - is1D ? "1D" : "2D", tif->tif_row); - fflush(stdout); -#endif - pb = sp->refruns; - b1 = *pb++; - if (is1D) - EXPAND1D(EOF2Da); - else - EXPAND2D(EOF2Da); - (*sp->fill)(buf, thisrun, pa, lastx); - SETVALUE(0); /* imaginary change for reference */ - SWAP(uint32*, sp->curruns, sp->refruns); - buf += sp->b.rowbytes; - occ -= sp->b.rowbytes; - sp->line++; - continue; - EOF2D: /* premature EOF */ - CLEANUP_RUNS(); - EOF2Da: /* premature EOF */ - (*sp->fill)(buf, thisrun, pa, lastx); - UNCACHE_STATE(tif, sp); - return (-1); - } - UNCACHE_STATE(tif, sp); - return (1); -} -#undef SWAP - -/* - * The ZERO & FILL macros must handle spans < 2*sizeof(long) bytes. - * For machines with 64-bit longs this is <16 bytes; otherwise - * this is <8 bytes. We optimize the code here to reflect the - * machine characteristics. - */ -#if SIZEOF_UNSIGNED_LONG == 8 -# define FILL(n, cp) \ - switch (n) { \ - case 15:(cp)[14] = 0xff; /*-fallthrough*/ \ - case 14:(cp)[13] = 0xff; /*-fallthrough*/ \ - case 13:(cp)[12] = 0xff; /*-fallthrough*/ \ - case 12:(cp)[11] = 0xff; /*-fallthrough*/ \ - case 11:(cp)[10] = 0xff; /*-fallthrough*/ \ - case 10: (cp)[9] = 0xff; /*-fallthrough*/ \ - case 9: (cp)[8] = 0xff; /*-fallthrough*/ \ - case 8: (cp)[7] = 0xff; /*-fallthrough*/ \ - case 7: (cp)[6] = 0xff; /*-fallthrough*/ \ - case 6: (cp)[5] = 0xff; /*-fallthrough*/ \ - case 5: (cp)[4] = 0xff; /*-fallthrough*/ \ - case 4: (cp)[3] = 0xff; /*-fallthrough*/ \ - case 3: (cp)[2] = 0xff; /*-fallthrough*/ \ - case 2: (cp)[1] = 0xff; /*-fallthrough*/ \ - case 1: (cp)[0] = 0xff; (cp) += (n); /*-fallthrough*/ \ - case 0: ; \ - } -# define ZERO(n, cp) \ - switch (n) { \ - case 15:(cp)[14] = 0; /*-fallthrough*/ \ - case 14:(cp)[13] = 0; /*-fallthrough*/ \ - case 13:(cp)[12] = 0; /*-fallthrough*/ \ - case 12:(cp)[11] = 0; /*-fallthrough*/ \ - case 11:(cp)[10] = 0; /*-fallthrough*/ \ - case 10: (cp)[9] = 0; /*-fallthrough*/ \ - case 9: (cp)[8] = 0; /*-fallthrough*/ \ - case 8: (cp)[7] = 0; /*-fallthrough*/ \ - case 7: (cp)[6] = 0; /*-fallthrough*/ \ - case 6: (cp)[5] = 0; /*-fallthrough*/ \ - case 5: (cp)[4] = 0; /*-fallthrough*/ \ - case 4: (cp)[3] = 0; /*-fallthrough*/ \ - case 3: (cp)[2] = 0; /*-fallthrough*/ \ - case 2: (cp)[1] = 0; /*-fallthrough*/ \ - case 1: (cp)[0] = 0; (cp) += (n); /*-fallthrough*/ \ - case 0: ; \ - } -#else -# define FILL(n, cp) \ - switch (n) { \ - case 7: (cp)[6] = 0xff; /*-fallthrough*/ \ - case 6: (cp)[5] = 0xff; /*-fallthrough*/ \ - case 5: (cp)[4] = 0xff; /*-fallthrough*/ \ - case 4: (cp)[3] = 0xff; /*-fallthrough*/ \ - case 3: (cp)[2] = 0xff; /*-fallthrough*/ \ - case 2: (cp)[1] = 0xff; /*-fallthrough*/ \ - case 1: (cp)[0] = 0xff; (cp) += (n); /*-fallthrough*/ \ - case 0: ; \ - } -# define ZERO(n, cp) \ - switch (n) { \ - case 7: (cp)[6] = 0; /*-fallthrough*/ \ - case 6: (cp)[5] = 0; /*-fallthrough*/ \ - case 5: (cp)[4] = 0; /*-fallthrough*/ \ - case 4: (cp)[3] = 0; /*-fallthrough*/ \ - case 3: (cp)[2] = 0; /*-fallthrough*/ \ - case 2: (cp)[1] = 0; /*-fallthrough*/ \ - case 1: (cp)[0] = 0; (cp) += (n); /*-fallthrough*/ \ - case 0: ; \ - } -#endif - -/* - * Bit-fill a row according to the white/black - * runs generated during G3/G4 decoding. - */ -void -_TIFFFax3fillruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx) -{ - static const unsigned char _fillmasks[] = - { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff }; - unsigned char* cp; - uint32 x, bx, run; - int32 n, nw; - long* lp; - - if ((erun-runs)&1) - *erun++ = 0; - x = 0; - for (; runs < erun; runs += 2) { - run = runs[0]; - if (x+run > lastx || run > lastx ) - run = runs[0] = (uint32) (lastx - x); - if (run) { - cp = buf + (x>>3); - bx = x&7; - if (run > 8-bx) { - if (bx) { /* align to byte boundary */ - *cp++ &= 0xff << (8-bx); - run -= 8-bx; - } - if( (n = run >> 3) != 0 ) { /* multiple bytes to fill */ - if ((n/sizeof (long)) > 1) { - /* - * Align to longword boundary and fill. - */ - for (; n && !isAligned(cp, long); n--) - *cp++ = 0x00; - lp = (long*) cp; - nw = (int32)(n / sizeof (long)); - n -= nw * sizeof (long); - do { - *lp++ = 0L; - } while (--nw); - cp = (unsigned char*) lp; - } - ZERO(n, cp); - run &= 7; - } - if (run) - cp[0] &= 0xff >> run; - } else - cp[0] &= ~(_fillmasks[run]>>bx); - x += runs[0]; - } - run = runs[1]; - if (x+run > lastx || run > lastx ) - run = runs[1] = lastx - x; - if (run) { - cp = buf + (x>>3); - bx = x&7; - if (run > 8-bx) { - if (bx) { /* align to byte boundary */ - *cp++ |= 0xff >> bx; - run -= 8-bx; - } - if( (n = run>>3) != 0 ) { /* multiple bytes to fill */ - if ((n/sizeof (long)) > 1) { - /* - * Align to longword boundary and fill. - */ - for (; n && !isAligned(cp, long); n--) - *cp++ = 0xff; - lp = (long*) cp; - nw = (int32)(n / sizeof (long)); - n -= nw * sizeof (long); - do { - *lp++ = -1L; - } while (--nw); - cp = (unsigned char*) lp; - } - FILL(n, cp); - run &= 7; - } - /* Explicit 0xff masking to make icc -check=conversions happy */ - if (run) - cp[0] = (unsigned char)((cp[0] | (0xff00 >> run))&0xff); - } else - cp[0] |= _fillmasks[run]>>bx; - x += runs[1]; - } - } - assert(x == lastx); -} -#undef ZERO -#undef FILL - -static int -Fax3FixupTags(TIFF* tif) -{ - (void) tif; - return (1); -} - -/* - * Setup G3/G4-related compression/decompression state - * before data is processed. This routine is called once - * per image -- it sets up different state based on whether - * or not decoding or encoding is being done and whether - * 1D- or 2D-encoded data is involved. - */ -static int -Fax3SetupState(TIFF* tif) -{ - static const char module[] = "Fax3SetupState"; - TIFFDirectory* td = &tif->tif_dir; - Fax3BaseState* sp = Fax3State(tif); - int needsRefLine; - Fax3CodecState* dsp = (Fax3CodecState*) Fax3State(tif); - tmsize_t rowbytes; - uint32 rowpixels, nruns; - - if (td->td_bitspersample != 1) { - TIFFErrorExt(tif->tif_clientdata, module, - "Bits/sample must be 1 for Group 3/4 encoding/decoding"); - return (0); - } - /* - * Calculate the scanline/tile widths. - */ - if (isTiled(tif)) { - rowbytes = TIFFTileRowSize(tif); - rowpixels = td->td_tilewidth; - } else { - rowbytes = TIFFScanlineSize(tif); - rowpixels = td->td_imagewidth; - } - sp->rowbytes = rowbytes; - sp->rowpixels = rowpixels; - /* - * Allocate any additional space required for decoding/encoding. - */ - needsRefLine = ( - (sp->groupoptions & GROUP3OPT_2DENCODING) || - td->td_compression == COMPRESSION_CCITTFAX4 - ); - - /* - Assure that allocation computations do not overflow. - - TIFFroundup and TIFFSafeMultiply return zero on integer overflow - */ - dsp->runs=(uint32*) NULL; - nruns = TIFFroundup_32(rowpixels,32); - if (needsRefLine) { - nruns = TIFFSafeMultiply(uint32,nruns,2); - } - if ((nruns == 0) || (TIFFSafeMultiply(uint32,nruns,2) == 0)) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Row pixels integer overflow (rowpixels %u)", - rowpixels); - return (0); - } - dsp->runs = (uint32*) _TIFFCheckMalloc(tif, - TIFFSafeMultiply(uint32,nruns,2), - sizeof (uint32), - "for Group 3/4 run arrays"); - if (dsp->runs == NULL) - return (0); - memset( dsp->runs, 0, TIFFSafeMultiply(uint32,nruns,2)*sizeof(uint32)); - dsp->curruns = dsp->runs; - if (needsRefLine) - dsp->refruns = dsp->runs + nruns; - else - dsp->refruns = NULL; - if (td->td_compression == COMPRESSION_CCITTFAX3 - && is2DEncoding(dsp)) { /* NB: default is 1D routine */ - tif->tif_decoderow = Fax3Decode2D; - tif->tif_decodestrip = Fax3Decode2D; - tif->tif_decodetile = Fax3Decode2D; - } - - if (needsRefLine) { /* 2d encoding */ - Fax3CodecState* esp = EncoderState(tif); - /* - * 2d encoding requires a scanline - * buffer for the ``reference line''; the - * scanline against which delta encoding - * is referenced. The reference line must - * be initialized to be ``white'' (done elsewhere). - */ - esp->refline = (unsigned char*) _TIFFmalloc(rowbytes); - if (esp->refline == NULL) { - TIFFErrorExt(tif->tif_clientdata, module, - "No space for Group 3/4 reference line"); - return (0); - } - } else /* 1d encoding */ - EncoderState(tif)->refline = NULL; - - return (1); -} - -/* - * CCITT Group 3 FAX Encoding. - */ - -#define Fax3FlushBits(tif, sp) { \ - if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \ - (void) TIFFFlushData1(tif); \ - *(tif)->tif_rawcp++ = (uint8) (sp)->data; \ - (tif)->tif_rawcc++; \ - (sp)->data = 0, (sp)->bit = 8; \ -} -#define _FlushBits(tif) { \ - if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \ - (void) TIFFFlushData1(tif); \ - *(tif)->tif_rawcp++ = (uint8) data; \ - (tif)->tif_rawcc++; \ - data = 0, bit = 8; \ -} -static const int _msbmask[9] = - { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff }; -#define _PutBits(tif, bits, length) { \ - while (length > bit) { \ - data |= bits >> (length - bit); \ - length -= bit; \ - _FlushBits(tif); \ - } \ - assert( length < 9 ); \ - data |= (bits & _msbmask[length]) << (bit - length); \ - bit -= length; \ - if (bit == 0) \ - _FlushBits(tif); \ -} - -/* - * Write a variable-length bit-value to - * the output stream. Values are - * assumed to be at most 16 bits. - */ -static void -Fax3PutBits(TIFF* tif, unsigned int bits, unsigned int length) -{ - Fax3CodecState* sp = EncoderState(tif); - unsigned int bit = sp->bit; - int data = sp->data; - - _PutBits(tif, bits, length); - - sp->data = data; - sp->bit = bit; -} - -/* - * Write a code to the output stream. - */ -#define putcode(tif, te) Fax3PutBits(tif, (te)->code, (te)->length) - -#ifdef FAX3_DEBUG -#define DEBUG_COLOR(w) (tab == TIFFFaxWhiteCodes ? w "W" : w "B") -#define DEBUG_PRINT(what,len) { \ - int t; \ - printf("%08X/%-2d: %s%5d\t", data, bit, DEBUG_COLOR(what), len); \ - for (t = length-1; t >= 0; t--) \ - putchar(code & (1<bit; - int data = sp->data; - unsigned int code, length; - - while (span >= 2624) { - const tableentry* te = &tab[63 + (2560>>6)]; - code = te->code; - length = te->length; -#ifdef FAX3_DEBUG - DEBUG_PRINT("MakeUp", te->runlen); -#endif - _PutBits(tif, code, length); - span -= te->runlen; - } - if (span >= 64) { - const tableentry* te = &tab[63 + (span>>6)]; - assert(te->runlen == 64*(span>>6)); - code = te->code; - length = te->length; -#ifdef FAX3_DEBUG - DEBUG_PRINT("MakeUp", te->runlen); -#endif - _PutBits(tif, code, length); - span -= te->runlen; - } - code = tab[span].code; - length = tab[span].length; -#ifdef FAX3_DEBUG - DEBUG_PRINT(" Term", tab[span].runlen); -#endif - _PutBits(tif, code, length); - - sp->data = data; - sp->bit = bit; -} - -/* - * Write an EOL code to the output stream. The zero-fill - * logic for byte-aligning encoded scanlines is handled - * here. We also handle writing the tag bit for the next - * scanline when doing 2d encoding. - */ -static void -Fax3PutEOL(TIFF* tif) -{ - Fax3CodecState* sp = EncoderState(tif); - unsigned int bit = sp->bit; - int data = sp->data; - unsigned int code, length, tparm; - - if (sp->b.groupoptions & GROUP3OPT_FILLBITS) { - /* - * Force bit alignment so EOL will terminate on - * a byte boundary. That is, force the bit alignment - * to 16-12 = 4 before putting out the EOL code. - */ - int align = 8 - 4; - if (align != sp->bit) { - if (align > sp->bit) - align = sp->bit + (8 - align); - else - align = sp->bit - align; - tparm=align; - _PutBits(tif, 0, tparm); - } - } - code = EOL; - length = 12; - if (is2DEncoding(sp)) { - code = (code<<1) | (sp->tag == G3_1D); - length++; - } - _PutBits(tif, code, length); - - sp->data = data; - sp->bit = bit; -} - -/* - * Reset encoding state at the start of a strip. - */ -static int -Fax3PreEncode(TIFF* tif, uint16 s) -{ - Fax3CodecState* sp = EncoderState(tif); - - (void) s; - assert(sp != NULL); - sp->bit = 8; - sp->data = 0; - sp->tag = G3_1D; - /* - * This is necessary for Group 4; otherwise it isn't - * needed because the first scanline of each strip ends - * up being copied into the refline. - */ - if (sp->refline) - _TIFFmemset(sp->refline, 0x00, sp->b.rowbytes); - if (is2DEncoding(sp)) { - float res = tif->tif_dir.td_yresolution; - /* - * The CCITT spec says that when doing 2d encoding, you - * should only do it on K consecutive scanlines, where K - * depends on the resolution of the image being encoded - * (2 for <= 200 lpi, 4 for > 200 lpi). Since the directory - * code initializes td_yresolution to 0, this code will - * select a K of 2 unless the YResolution tag is set - * appropriately. (Note also that we fudge a little here - * and use 150 lpi to avoid problems with units conversion.) - */ - if (tif->tif_dir.td_resolutionunit == RESUNIT_CENTIMETER) - res *= 2.54f; /* convert to inches */ - sp->maxk = (res > 150 ? 4 : 2); - sp->k = sp->maxk-1; - } else - sp->k = sp->maxk = 0; - sp->line = 0; - return (1); -} - -static const unsigned char zeroruns[256] = { - 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x00 - 0x0f */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 - 0x1f */ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x20 - 0x2f */ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x30 - 0x3f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x40 - 0x4f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x50 - 0x5f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x60 - 0x6f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x70 - 0x7f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 - 0x8f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 - 0x9f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 - 0xaf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 - 0xbf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 - 0xcf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 - 0xdf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 - 0xef */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 - 0xff */ -}; -static const unsigned char oneruns[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 - 0x0f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 - 0x1f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 - 0x2f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 - 0x3f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 - 0x4f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 - 0x5f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 - 0x6f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 - 0x7f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x80 - 0x8f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x90 - 0x9f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xa0 - 0xaf */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xb0 - 0xbf */ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0xc0 - 0xcf */ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0xd0 - 0xdf */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0xe0 - 0xef */ - 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, /* 0xf0 - 0xff */ -}; - -/* - * On certain systems it pays to inline - * the routines that find pixel spans. - */ -#ifdef VAXC -static int32 find0span(unsigned char*, int32, int32); -static int32 find1span(unsigned char*, int32, int32); -#pragma inline(find0span,find1span) -#endif - -/* - * Find a span of ones or zeros using the supplied - * table. The ``base'' of the bit string is supplied - * along with the start+end bit indices. - */ -inline static int32 -find0span(unsigned char* bp, int32 bs, int32 be) -{ - int32 bits = be - bs; - int32 n, span; - - bp += bs>>3; - /* - * Check partial byte on lhs. - */ - if (bits > 0 && (n = (bs & 7)) != 0) { - span = zeroruns[(*bp << n) & 0xff]; - if (span > 8-n) /* table value too generous */ - span = 8-n; - if (span > bits) /* constrain span to bit range */ - span = bits; - if (n+span < 8) /* doesn't extend to edge of byte */ - return (span); - bits -= span; - bp++; - } else - span = 0; - if (bits >= (int32)(2 * 8 * sizeof(long))) { - long* lp; - /* - * Align to longword boundary and check longwords. - */ - while (!isAligned(bp, long)) { - if (*bp != 0x00) - return (span + zeroruns[*bp]); - span += 8; - bits -= 8; - bp++; - } - lp = (long*) bp; - while ((bits >= (int32)(8 * sizeof(long))) && (0 == *lp)) { - span += 8*sizeof (long); - bits -= 8*sizeof (long); - lp++; - } - bp = (unsigned char*) lp; - } - /* - * Scan full bytes for all 0's. - */ - while (bits >= 8) { - if (*bp != 0x00) /* end of run */ - return (span + zeroruns[*bp]); - span += 8; - bits -= 8; - bp++; - } - /* - * Check partial byte on rhs. - */ - if (bits > 0) { - n = zeroruns[*bp]; - span += (n > bits ? bits : n); - } - return (span); -} - -inline static int32 -find1span(unsigned char* bp, int32 bs, int32 be) -{ - int32 bits = be - bs; - int32 n, span; - - bp += bs>>3; - /* - * Check partial byte on lhs. - */ - if (bits > 0 && (n = (bs & 7)) != 0) { - span = oneruns[(*bp << n) & 0xff]; - if (span > 8-n) /* table value too generous */ - span = 8-n; - if (span > bits) /* constrain span to bit range */ - span = bits; - if (n+span < 8) /* doesn't extend to edge of byte */ - return (span); - bits -= span; - bp++; - } else - span = 0; - if (bits >= (int32)(2 * 8 * sizeof(long))) { - long* lp; - /* - * Align to longword boundary and check longwords. - */ - while (!isAligned(bp, long)) { - if (*bp != 0xff) - return (span + oneruns[*bp]); - span += 8; - bits -= 8; - bp++; - } - lp = (long*) bp; - while ((bits >= (int32)(8 * sizeof(long))) && (~0 == *lp)) { - span += 8*sizeof (long); - bits -= 8*sizeof (long); - lp++; - } - bp = (unsigned char*) lp; - } - /* - * Scan full bytes for all 1's. - */ - while (bits >= 8) { - if (*bp != 0xff) /* end of run */ - return (span + oneruns[*bp]); - span += 8; - bits -= 8; - bp++; - } - /* - * Check partial byte on rhs. - */ - if (bits > 0) { - n = oneruns[*bp]; - span += (n > bits ? bits : n); - } - return (span); -} - -/* - * Return the offset of the next bit in the range - * [bs..be] that is different from the specified - * color. The end, be, is returned if no such bit - * exists. - */ -#define finddiff(_cp, _bs, _be, _color) \ - (_bs + (_color ? find1span(_cp,_bs,_be) : find0span(_cp,_bs,_be))) -/* - * Like finddiff, but also check the starting bit - * against the end in case start > end. - */ -#define finddiff2(_cp, _bs, _be, _color) \ - (_bs < _be ? finddiff(_cp,_bs,_be,_color) : _be) - -/* - * 1d-encode a row of pixels. The encoding is - * a sequence of all-white or all-black spans - * of pixels encoded with Huffman codes. - */ -static int -Fax3Encode1DRow(TIFF* tif, unsigned char* bp, uint32 bits) -{ - Fax3CodecState* sp = EncoderState(tif); - int32 span; - uint32 bs = 0; - - for (;;) { - span = find0span(bp, bs, bits); /* white span */ - putspan(tif, span, TIFFFaxWhiteCodes); - bs += span; - if (bs >= bits) - break; - span = find1span(bp, bs, bits); /* black span */ - putspan(tif, span, TIFFFaxBlackCodes); - bs += span; - if (bs >= bits) - break; - } - if (sp->b.mode & (FAXMODE_BYTEALIGN|FAXMODE_WORDALIGN)) { - if (sp->bit != 8) /* byte-align */ - Fax3FlushBits(tif, sp); - if ((sp->b.mode&FAXMODE_WORDALIGN) && - !isAligned(tif->tif_rawcp, uint16)) - Fax3FlushBits(tif, sp); - } - return (1); -} - -static const tableentry horizcode = - { 3, 0x1, 0 }; /* 001 */ -static const tableentry passcode = - { 4, 0x1, 0 }; /* 0001 */ -static const tableentry vcodes[7] = { - { 7, 0x03, 0 }, /* 0000 011 */ - { 6, 0x03, 0 }, /* 0000 11 */ - { 3, 0x03, 0 }, /* 011 */ - { 1, 0x1, 0 }, /* 1 */ - { 3, 0x2, 0 }, /* 010 */ - { 6, 0x02, 0 }, /* 0000 10 */ - { 7, 0x02, 0 } /* 0000 010 */ -}; - -/* - * 2d-encode a row of pixels. Consult the CCITT - * documentation for the algorithm. - */ -static int -Fax3Encode2DRow(TIFF* tif, unsigned char* bp, unsigned char* rp, uint32 bits) -{ -#define PIXEL(buf,ix) ((((buf)[(ix)>>3]) >> (7-((ix)&7))) & 1) - uint32 a0 = 0; - uint32 a1 = (PIXEL(bp, 0) != 0 ? 0 : finddiff(bp, 0, bits, 0)); - uint32 b1 = (PIXEL(rp, 0) != 0 ? 0 : finddiff(rp, 0, bits, 0)); - uint32 a2, b2; - - for (;;) { - b2 = finddiff2(rp, b1, bits, PIXEL(rp,b1)); - if (b2 >= a1) { - /* Naive computation triggers -fsanitize=undefined,unsigned-integer-overflow */ - /* although it is correct unless the difference between both is < 31 bit */ - /* int32 d = b1 - a1; */ - int32 d = (b1 >= a1 && b1 - a1 <= 3U) ? (int32)(b1 - a1): - (b1 < a1 && a1 - b1 <= 3U) ? -(int32)(a1 - b1) : 0x7FFFFFFF; - if (!(-3 <= d && d <= 3)) { /* horizontal mode */ - a2 = finddiff2(bp, a1, bits, PIXEL(bp,a1)); - putcode(tif, &horizcode); - if (a0+a1 == 0 || PIXEL(bp, a0) == 0) { - putspan(tif, a1-a0, TIFFFaxWhiteCodes); - putspan(tif, a2-a1, TIFFFaxBlackCodes); - } else { - putspan(tif, a1-a0, TIFFFaxBlackCodes); - putspan(tif, a2-a1, TIFFFaxWhiteCodes); - } - a0 = a2; - } else { /* vertical mode */ - putcode(tif, &vcodes[d+3]); - a0 = a1; - } - } else { /* pass mode */ - putcode(tif, &passcode); - a0 = b2; - } - if (a0 >= bits) - break; - a1 = finddiff(bp, a0, bits, PIXEL(bp,a0)); - b1 = finddiff(rp, a0, bits, !PIXEL(bp,a0)); - b1 = finddiff(rp, b1, bits, PIXEL(bp,a0)); - } - return (1); -#undef PIXEL -} - -/* - * Encode a buffer of pixels. - */ -static int -Fax3Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - static const char module[] = "Fax3Encode"; - Fax3CodecState* sp = EncoderState(tif); - (void) s; - if (cc % sp->b.rowbytes) - { - TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be written"); - return (0); - } - while (cc > 0) { - if ((sp->b.mode & FAXMODE_NOEOL) == 0) - Fax3PutEOL(tif); - if (is2DEncoding(sp)) { - if (sp->tag == G3_1D) { - if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels)) - return (0); - sp->tag = G3_2D; - } else { - if (!Fax3Encode2DRow(tif, bp, sp->refline, - sp->b.rowpixels)) - return (0); - sp->k--; - } - if (sp->k == 0) { - sp->tag = G3_1D; - sp->k = sp->maxk-1; - } else - _TIFFmemcpy(sp->refline, bp, sp->b.rowbytes); - } else { - if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels)) - return (0); - } - bp += sp->b.rowbytes; - cc -= sp->b.rowbytes; - } - return (1); -} - -static int -Fax3PostEncode(TIFF* tif) -{ - Fax3CodecState* sp = EncoderState(tif); - - if (sp->bit != 8) - Fax3FlushBits(tif, sp); - return (1); -} - -static void -Fax3Close(TIFF* tif) -{ - if ((Fax3State(tif)->mode & FAXMODE_NORTC) == 0 && tif->tif_rawcp) { - Fax3CodecState* sp = EncoderState(tif); - unsigned int code = EOL; - unsigned int length = 12; - int i; - - if (is2DEncoding(sp)) { - code = (code<<1) | (sp->tag == G3_1D); - length++; - } - for (i = 0; i < 6; i++) - Fax3PutBits(tif, code, length); - Fax3FlushBits(tif, sp); - } -} - -static void -Fax3Cleanup(TIFF* tif) -{ - Fax3CodecState* sp = DecoderState(tif); - - assert(sp != 0); - - tif->tif_tagmethods.vgetfield = sp->b.vgetparent; - tif->tif_tagmethods.vsetfield = sp->b.vsetparent; - tif->tif_tagmethods.printdir = sp->b.printdir; - - if (sp->runs) - _TIFFfree(sp->runs); - if (sp->refline) - _TIFFfree(sp->refline); - - _TIFFfree(tif->tif_data); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -#define FIELD_BADFAXLINES (FIELD_CODEC+0) -#define FIELD_CLEANFAXDATA (FIELD_CODEC+1) -#define FIELD_BADFAXRUN (FIELD_CODEC+2) - -#define FIELD_OPTIONS (FIELD_CODEC+7) - -static const TIFFField faxFields[] = { - { TIFFTAG_FAXMODE, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, FALSE, FALSE, "FaxMode", NULL }, - { TIFFTAG_FAXFILLFUNC, 0, 0, TIFF_ANY, 0, TIFF_SETGET_OTHER, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, FALSE, FALSE, "FaxFillFunc", NULL }, - { TIFFTAG_BADFAXLINES, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_BADFAXLINES, TRUE, FALSE, "BadFaxLines", NULL }, - { TIFFTAG_CLEANFAXDATA, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UINT16, FIELD_CLEANFAXDATA, TRUE, FALSE, "CleanFaxData", NULL }, - { TIFFTAG_CONSECUTIVEBADFAXLINES, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_BADFAXRUN, TRUE, FALSE, "ConsecutiveBadFaxLines", NULL }}; -static const TIFFField fax3Fields[] = { - { TIFFTAG_GROUP3OPTIONS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_OPTIONS, FALSE, FALSE, "Group3Options", NULL }, -}; -static const TIFFField fax4Fields[] = { - { TIFFTAG_GROUP4OPTIONS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_OPTIONS, FALSE, FALSE, "Group4Options", NULL }, -}; - -static int -Fax3VSetField(TIFF* tif, uint32 tag, va_list ap) -{ - Fax3BaseState* sp = Fax3State(tif); - const TIFFField* fip; - - assert(sp != 0); - assert(sp->vsetparent != 0); - - switch (tag) { - case TIFFTAG_FAXMODE: - sp->mode = (int) va_arg(ap, int); - return 1; /* NB: pseudo tag */ - case TIFFTAG_FAXFILLFUNC: - DecoderState(tif)->fill = va_arg(ap, TIFFFaxFillFunc); - return 1; /* NB: pseudo tag */ - case TIFFTAG_GROUP3OPTIONS: - /* XXX: avoid reading options if compression mismatches. */ - if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX3) - sp->groupoptions = (uint32) va_arg(ap, uint32); - break; - case TIFFTAG_GROUP4OPTIONS: - /* XXX: avoid reading options if compression mismatches. */ - if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX4) - sp->groupoptions = (uint32) va_arg(ap, uint32); - break; - case TIFFTAG_BADFAXLINES: - sp->badfaxlines = (uint32) va_arg(ap, uint32); - break; - case TIFFTAG_CLEANFAXDATA: - sp->cleanfaxdata = (uint16) va_arg(ap, uint16_vap); - break; - case TIFFTAG_CONSECUTIVEBADFAXLINES: - sp->badfaxrun = (uint32) va_arg(ap, uint32); - break; - default: - return (*sp->vsetparent)(tif, tag, ap); - } - - if ((fip = TIFFFieldWithTag(tif, tag)) != NULL) - TIFFSetFieldBit(tif, fip->field_bit); - else - return 0; - - tif->tif_flags |= TIFF_DIRTYDIRECT; - return 1; -} - -static int -Fax3VGetField(TIFF* tif, uint32 tag, va_list ap) -{ - Fax3BaseState* sp = Fax3State(tif); - - assert(sp != 0); - - switch (tag) { - case TIFFTAG_FAXMODE: - *va_arg(ap, int*) = sp->mode; - break; - case TIFFTAG_FAXFILLFUNC: - *va_arg(ap, TIFFFaxFillFunc*) = DecoderState(tif)->fill; - break; - case TIFFTAG_GROUP3OPTIONS: - case TIFFTAG_GROUP4OPTIONS: - *va_arg(ap, uint32*) = sp->groupoptions; - break; - case TIFFTAG_BADFAXLINES: - *va_arg(ap, uint32*) = sp->badfaxlines; - break; - case TIFFTAG_CLEANFAXDATA: - *va_arg(ap, uint16*) = sp->cleanfaxdata; - break; - case TIFFTAG_CONSECUTIVEBADFAXLINES: - *va_arg(ap, uint32*) = sp->badfaxrun; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return (1); -} - -static void -Fax3PrintDir(TIFF* tif, FILE* fd, long flags) -{ - Fax3BaseState* sp = Fax3State(tif); - - assert(sp != 0); - - (void) flags; - if (TIFFFieldSet(tif,FIELD_OPTIONS)) { - const char* sep = " "; - if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX4) { - fprintf(fd, " Group 4 Options:"); - if (sp->groupoptions & GROUP4OPT_UNCOMPRESSED) - fprintf(fd, "%suncompressed data", sep); - } else { - - fprintf(fd, " Group 3 Options:"); - if (sp->groupoptions & GROUP3OPT_2DENCODING) { - fprintf(fd, "%s2-d encoding", sep); - sep = "+"; - } - if (sp->groupoptions & GROUP3OPT_FILLBITS) { - fprintf(fd, "%sEOL padding", sep); - sep = "+"; - } - if (sp->groupoptions & GROUP3OPT_UNCOMPRESSED) - fprintf(fd, "%suncompressed data", sep); - } - fprintf(fd, " (%lu = 0x%lx)\n", - (unsigned long) sp->groupoptions, - (unsigned long) sp->groupoptions); - } - if (TIFFFieldSet(tif,FIELD_CLEANFAXDATA)) { - fprintf(fd, " Fax Data:"); - switch (sp->cleanfaxdata) { - case CLEANFAXDATA_CLEAN: - fprintf(fd, " clean"); - break; - case CLEANFAXDATA_REGENERATED: - fprintf(fd, " receiver regenerated"); - break; - case CLEANFAXDATA_UNCLEAN: - fprintf(fd, " uncorrected errors"); - break; - } - fprintf(fd, " (%u = 0x%x)\n", - sp->cleanfaxdata, sp->cleanfaxdata); - } - if (TIFFFieldSet(tif,FIELD_BADFAXLINES)) - fprintf(fd, " Bad Fax Lines: %lu\n", - (unsigned long) sp->badfaxlines); - if (TIFFFieldSet(tif,FIELD_BADFAXRUN)) - fprintf(fd, " Consecutive Bad Fax Lines: %lu\n", - (unsigned long) sp->badfaxrun); - if (sp->printdir) - (*sp->printdir)(tif, fd, flags); -} - -static int -InitCCITTFax3(TIFF* tif) -{ - static const char module[] = "InitCCITTFax3"; - Fax3BaseState* sp; - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, faxFields, TIFFArrayCount(faxFields))) { - TIFFErrorExt(tif->tif_clientdata, "InitCCITTFax3", - "Merging common CCITT Fax codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8*) - _TIFFmalloc(sizeof (Fax3CodecState)); - - if (tif->tif_data == NULL) { - TIFFErrorExt(tif->tif_clientdata, module, - "No space for state block"); - return (0); - } - _TIFFmemset(tif->tif_data, 0, sizeof (Fax3CodecState)); - - sp = Fax3State(tif); - sp->rw_mode = tif->tif_mode; - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = Fax3VGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = Fax3VSetField; /* hook for codec tags */ - sp->printdir = tif->tif_tagmethods.printdir; - tif->tif_tagmethods.printdir = Fax3PrintDir; /* hook for codec tags */ - sp->groupoptions = 0; - - if (sp->rw_mode == O_RDONLY) /* FIXME: improve for in place update */ - tif->tif_flags |= TIFF_NOBITREV; /* decoder does bit reversal */ - DecoderState(tif)->runs = NULL; - TIFFSetField(tif, TIFFTAG_FAXFILLFUNC, _TIFFFax3fillruns); - EncoderState(tif)->refline = NULL; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = Fax3FixupTags; - tif->tif_setupdecode = Fax3SetupState; - tif->tif_predecode = Fax3PreDecode; - tif->tif_decoderow = Fax3Decode1D; - tif->tif_decodestrip = Fax3Decode1D; - tif->tif_decodetile = Fax3Decode1D; - tif->tif_setupencode = Fax3SetupState; - tif->tif_preencode = Fax3PreEncode; - tif->tif_postencode = Fax3PostEncode; - tif->tif_encoderow = Fax3Encode; - tif->tif_encodestrip = Fax3Encode; - tif->tif_encodetile = Fax3Encode; - tif->tif_close = Fax3Close; - tif->tif_cleanup = Fax3Cleanup; - - return (1); -} - -int -TIFFInitCCITTFax3(TIFF* tif, int scheme) -{ - (void) scheme; - if (InitCCITTFax3(tif)) { - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, fax3Fields, - TIFFArrayCount(fax3Fields))) { - TIFFErrorExt(tif->tif_clientdata, "TIFFInitCCITTFax3", - "Merging CCITT Fax 3 codec-specific tags failed"); - return 0; - } - - /* - * The default format is Class/F-style w/o RTC. - */ - return TIFFSetField(tif, TIFFTAG_FAXMODE, FAXMODE_CLASSF); - } else - return 01; -} - -/* - * CCITT Group 4 (T.6) Facsimile-compatible - * Compression Scheme Support. - */ - -#define SWAP(t,a,b) { t x; x = (a); (a) = (b); (b) = x; } -/* - * Decode the requested amount of G4-encoded data. - */ -static int -Fax4Decode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) -{ - DECLARE_STATE_2D(tif, sp, "Fax4Decode"); - (void) s; - if (occ % sp->b.rowbytes) - { - TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be read"); - return (-1); - } - CACHE_STATE(tif, sp); - while (occ > 0) { - a0 = 0; - RunLength = 0; - pa = thisrun = sp->curruns; - pb = sp->refruns; - b1 = *pb++; -#ifdef FAX3_DEBUG - printf("\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail); - printf("-------------------- %d\n", tif->tif_row); - fflush(stdout); -#endif - EXPAND2D(EOFG4); - if (EOLcnt) - goto EOFG4; - (*sp->fill)(buf, thisrun, pa, lastx); - SETVALUE(0); /* imaginary change for reference */ - SWAP(uint32*, sp->curruns, sp->refruns); - buf += sp->b.rowbytes; - occ -= sp->b.rowbytes; - sp->line++; - continue; - EOFG4: - NeedBits16( 13, BADG4 ); - BADG4: -#ifdef FAX3_DEBUG - if( GetBits(13) != 0x1001 ) - fputs( "Bad EOFB\n", stderr ); -#endif - ClrBits( 13 ); - (*sp->fill)(buf, thisrun, pa, lastx); - UNCACHE_STATE(tif, sp); - return ( sp->line ? 1 : -1); /* don't error on badly-terminated strips */ - } - UNCACHE_STATE(tif, sp); - return (1); -} -#undef SWAP - -/* - * Encode the requested amount of data. - */ -static int -Fax4Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - static const char module[] = "Fax4Encode"; - Fax3CodecState *sp = EncoderState(tif); - (void) s; - if (cc % sp->b.rowbytes) - { - TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be written"); - return (0); - } - while (cc > 0) { - if (!Fax3Encode2DRow(tif, bp, sp->refline, sp->b.rowpixels)) - return (0); - _TIFFmemcpy(sp->refline, bp, sp->b.rowbytes); - bp += sp->b.rowbytes; - cc -= sp->b.rowbytes; - } - return (1); -} - -static int -Fax4PostEncode(TIFF* tif) -{ - Fax3CodecState *sp = EncoderState(tif); - - /* terminate strip w/ EOFB */ - Fax3PutBits(tif, EOL, 12); - Fax3PutBits(tif, EOL, 12); - if (sp->bit != 8) - Fax3FlushBits(tif, sp); - return (1); -} - -int -TIFFInitCCITTFax4(TIFF* tif, int scheme) -{ - (void) scheme; - if (InitCCITTFax3(tif)) { /* reuse G3 support */ - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, fax4Fields, - TIFFArrayCount(fax4Fields))) { - TIFFErrorExt(tif->tif_clientdata, "TIFFInitCCITTFax4", - "Merging CCITT Fax 4 codec-specific tags failed"); - return 0; - } - - tif->tif_decoderow = Fax4Decode; - tif->tif_decodestrip = Fax4Decode; - tif->tif_decodetile = Fax4Decode; - tif->tif_encoderow = Fax4Encode; - tif->tif_encodestrip = Fax4Encode; - tif->tif_encodetile = Fax4Encode; - tif->tif_postencode = Fax4PostEncode; - /* - * Suppress RTC at the end of each strip. - */ - return TIFFSetField(tif, TIFFTAG_FAXMODE, FAXMODE_NORTC); - } else - return (0); -} - -/* - * CCITT Group 3 1-D Modified Huffman RLE Compression Support. - * (Compression algorithms 2 and 32771) - */ - -/* - * Decode the requested amount of RLE-encoded data. - */ -static int -Fax3DecodeRLE(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) -{ - DECLARE_STATE(tif, sp, "Fax3DecodeRLE"); - int mode = sp->b.mode; - (void) s; - if (occ % sp->b.rowbytes) - { - TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be read"); - return (-1); - } - CACHE_STATE(tif, sp); - thisrun = sp->curruns; - while (occ > 0) { - a0 = 0; - RunLength = 0; - pa = thisrun; -#ifdef FAX3_DEBUG - printf("\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail); - printf("-------------------- %d\n", tif->tif_row); - fflush(stdout); -#endif - EXPAND1D(EOFRLE); - (*sp->fill)(buf, thisrun, pa, lastx); - /* - * Cleanup at the end of the row. - */ - if (mode & FAXMODE_BYTEALIGN) { - int n = BitsAvail - (BitsAvail &~ 7); - ClrBits(n); - } else if (mode & FAXMODE_WORDALIGN) { - int n = BitsAvail - (BitsAvail &~ 15); - ClrBits(n); - if (BitsAvail == 0 && !isAligned(cp, uint16)) - cp++; - } - buf += sp->b.rowbytes; - occ -= sp->b.rowbytes; - sp->line++; - continue; - EOFRLE: /* premature EOF */ - (*sp->fill)(buf, thisrun, pa, lastx); - UNCACHE_STATE(tif, sp); - return (-1); - } - UNCACHE_STATE(tif, sp); - return (1); -} - -int -TIFFInitCCITTRLE(TIFF* tif, int scheme) -{ - (void) scheme; - if (InitCCITTFax3(tif)) { /* reuse G3 support */ - tif->tif_decoderow = Fax3DecodeRLE; - tif->tif_decodestrip = Fax3DecodeRLE; - tif->tif_decodetile = Fax3DecodeRLE; - /* - * Suppress RTC+EOLs when encoding and byte-align data. - */ - return TIFFSetField(tif, TIFFTAG_FAXMODE, - FAXMODE_NORTC|FAXMODE_NOEOL|FAXMODE_BYTEALIGN); - } else - return (0); -} - -int -TIFFInitCCITTRLEW(TIFF* tif, int scheme) -{ - (void) scheme; - if (InitCCITTFax3(tif)) { /* reuse G3 support */ - tif->tif_decoderow = Fax3DecodeRLE; - tif->tif_decodestrip = Fax3DecodeRLE; - tif->tif_decodetile = Fax3DecodeRLE; - /* - * Suppress RTC+EOLs when encoding and word-align data. - */ - return TIFFSetField(tif, TIFFTAG_FAXMODE, - FAXMODE_NORTC|FAXMODE_NOEOL|FAXMODE_WORDALIGN); - } else - return (0); -} -#endif /* CCITT_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_fax3.h b/Dependencies/FreeImage/Source/LibTIFF4/tif_fax3.h deleted file mode 100644 index b1856ea..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_fax3.h +++ /dev/null @@ -1,538 +0,0 @@ -/* - * Copyright (c) 1990-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _FAX3_ -#define _FAX3_ -/* - * TIFF Library. - * - * CCITT Group 3 (T.4) and Group 4 (T.6) Decompression Support. - * - * Decoder support is derived, with permission, from the code - * in Frank Cringle's viewfax program; - * Copyright (C) 1990, 1995 Frank D. Cringle. - */ -#include "tiff.h" - -/* - * To override the default routine used to image decoded - * spans one can use the pseudo tag TIFFTAG_FAXFILLFUNC. - * The routine must have the type signature given below; - * for example: - * - * fillruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx) - * - * where buf is place to set the bits, runs is the array of b&w run - * lengths (white then black), erun is the last run in the array, and - * lastx is the width of the row in pixels. Fill routines can assume - * the run array has room for at least lastx runs and can overwrite - * data in the run array as needed (e.g. to append zero runs to bring - * the count up to a nice multiple). - */ -typedef void (*TIFFFaxFillFunc)(unsigned char*, uint32*, uint32*, uint32); - -/* - * The default run filler; made external for other decoders. - */ -#if defined(__cplusplus) -extern "C" { -#endif -extern void _TIFFFax3fillruns(unsigned char*, uint32*, uint32*, uint32); -#if defined(__cplusplus) -} -#endif - - -/* finite state machine codes */ -#define S_Null 0 -#define S_Pass 1 -#define S_Horiz 2 -#define S_V0 3 -#define S_VR 4 -#define S_VL 5 -#define S_Ext 6 -#define S_TermW 7 -#define S_TermB 8 -#define S_MakeUpW 9 -#define S_MakeUpB 10 -#define S_MakeUp 11 -#define S_EOL 12 - -/* WARNING: do not change the layout of this structure as the HylaFAX software */ -/* really depends on it. See http://bugzilla.maptools.org/show_bug.cgi?id=2636 */ -typedef struct { /* state table entry */ - unsigned char State; /* see above */ - unsigned char Width; /* width of code in bits */ - uint32 Param; /* unsigned 32-bit run length in bits (holds on 16 bit actually, but cannot be changed. See above warning) */ -} TIFFFaxTabEnt; - -extern const TIFFFaxTabEnt TIFFFaxMainTable[]; -extern const TIFFFaxTabEnt TIFFFaxWhiteTable[]; -extern const TIFFFaxTabEnt TIFFFaxBlackTable[]; - -/* - * The following macros define the majority of the G3/G4 decoder - * algorithm using the state tables defined elsewhere. To build - * a decoder you need some setup code and some glue code. Note - * that you may also need/want to change the way the NeedBits* - * macros get input data if, for example, you know the data to be - * decoded is properly aligned and oriented (doing so before running - * the decoder can be a big performance win). - * - * Consult the decoder in the TIFF library for an idea of what you - * need to define and setup to make use of these definitions. - * - * NB: to enable a debugging version of these macros define FAX3_DEBUG - * before including this file. Trace output goes to stdout. - */ - -#ifndef EndOfData -#define EndOfData() (cp >= ep) -#endif -/* - * Need <=8 or <=16 bits of input data. Unlike viewfax we - * cannot use/assume a word-aligned, properly bit swizzled - * input data set because data may come from an arbitrarily - * aligned, read-only source such as a memory-mapped file. - * Note also that the viewfax decoder does not check for - * running off the end of the input data buffer. This is - * possible for G3-encoded data because it prescans the input - * data to count EOL markers, but can cause problems for G4 - * data. In any event, we don't prescan and must watch for - * running out of data since we can't permit the library to - * scan past the end of the input data buffer. - * - * Finally, note that we must handle remaindered data at the end - * of a strip specially. The coder asks for a fixed number of - * bits when scanning for the next code. This may be more bits - * than are actually present in the data stream. If we appear - * to run out of data but still have some number of valid bits - * remaining then we makeup the requested amount with zeros and - * return successfully. If the returned data is incorrect then - * we should be called again and get a premature EOF error; - * otherwise we should get the right answer. - */ -#ifndef NeedBits8 -#define NeedBits8(n,eoflab) do { \ - if (BitsAvail < (n)) { \ - if (EndOfData()) { \ - if (BitsAvail == 0) /* no valid bits */ \ - goto eoflab; \ - BitsAvail = (n); /* pad with zeros */ \ - } else { \ - BitAcc |= ((uint32) bitmap[*cp++])<>= (n); \ -} while (0) - -#ifdef FAX3_DEBUG -static const char* StateNames[] = { - "Null ", - "Pass ", - "Horiz ", - "V0 ", - "VR ", - "VL ", - "Ext ", - "TermW ", - "TermB ", - "MakeUpW", - "MakeUpB", - "MakeUp ", - "EOL ", -}; -#define DEBUG_SHOW putchar(BitAcc & (1 << t) ? '1' : '0') -#define LOOKUP8(wid,tab,eoflab) do { \ - int t; \ - NeedBits8(wid,eoflab); \ - TabEnt = tab + GetBits(wid); \ - printf("%08lX/%d: %s%5d\t", (long) BitAcc, BitsAvail, \ - StateNames[TabEnt->State], TabEnt->Param); \ - for (t = 0; t < TabEnt->Width; t++) \ - DEBUG_SHOW; \ - putchar('\n'); \ - fflush(stdout); \ - ClrBits(TabEnt->Width); \ -} while (0) -#define LOOKUP16(wid,tab,eoflab) do { \ - int t; \ - NeedBits16(wid,eoflab); \ - TabEnt = tab + GetBits(wid); \ - printf("%08lX/%d: %s%5d\t", (long) BitAcc, BitsAvail, \ - StateNames[TabEnt->State], TabEnt->Param); \ - for (t = 0; t < TabEnt->Width; t++) \ - DEBUG_SHOW; \ - putchar('\n'); \ - fflush(stdout); \ - ClrBits(TabEnt->Width); \ -} while (0) - -#define SETVALUE(x) do { \ - *pa++ = RunLength + (x); \ - printf("SETVALUE: %d\t%d\n", RunLength + (x), a0); \ - a0 += x; \ - RunLength = 0; \ -} while (0) -#else -#define LOOKUP8(wid,tab,eoflab) do { \ - NeedBits8(wid,eoflab); \ - TabEnt = tab + GetBits(wid); \ - ClrBits(TabEnt->Width); \ -} while (0) -#define LOOKUP16(wid,tab,eoflab) do { \ - NeedBits16(wid,eoflab); \ - TabEnt = tab + GetBits(wid); \ - ClrBits(TabEnt->Width); \ -} while (0) - -/* - * Append a run to the run length array for the - * current row and reset decoding state. - */ -#define SETVALUE(x) do { \ - *pa++ = RunLength + (x); \ - a0 += (x); \ - RunLength = 0; \ -} while (0) -#endif - -/* - * Synchronize input decoding at the start of each - * row by scanning for an EOL (if appropriate) and - * skipping any trash data that might be present - * after a decoding error. Note that the decoding - * done elsewhere that recognizes an EOL only consumes - * 11 consecutive zero bits. This means that if EOLcnt - * is non-zero then we still need to scan for the final flag - * bit that is part of the EOL code. - */ -#define SYNC_EOL(eoflab) do { \ - if (EOLcnt == 0) { \ - for (;;) { \ - NeedBits16(11,eoflab); \ - if (GetBits(11) == 0) \ - break; \ - ClrBits(1); \ - } \ - } \ - for (;;) { \ - NeedBits8(8,eoflab); \ - if (GetBits(8)) \ - break; \ - ClrBits(8); \ - } \ - while (GetBits(1) == 0) \ - ClrBits(1); \ - ClrBits(1); /* EOL bit */ \ - EOLcnt = 0; /* reset EOL counter/flag */ \ -} while (0) - -/* - * Cleanup the array of runs after decoding a row. - * We adjust final runs to insure the user buffer is not - * overwritten and/or undecoded area is white filled. - */ -#define CLEANUP_RUNS() do { \ - if (RunLength) \ - SETVALUE(0); \ - if (a0 != lastx) { \ - badlength(a0, lastx); \ - while (a0 > lastx && pa > thisrun) \ - a0 -= *--pa; \ - if (a0 < lastx) { \ - if (a0 < 0) \ - a0 = 0; \ - if ((pa-thisrun)&1) \ - SETVALUE(0); \ - SETVALUE(lastx - a0); \ - } else if (a0 > lastx) { \ - SETVALUE(lastx); \ - SETVALUE(0); \ - } \ - } \ -} while (0) - -/* - * Decode a line of 1D-encoded data. - * - * The line expanders are written as macros so that they can be reused - * but still have direct access to the local variables of the "calling" - * function. - * - * Note that unlike the original version we have to explicitly test for - * a0 >= lastx after each black/white run is decoded. This is because - * the original code depended on the input data being zero-padded to - * insure the decoder recognized an EOL before running out of data. - */ -#define EXPAND1D(eoflab) do { \ - for (;;) { \ - for (;;) { \ - LOOKUP16(12, TIFFFaxWhiteTable, eof1d); \ - switch (TabEnt->State) { \ - case S_EOL: \ - EOLcnt = 1; \ - goto done1d; \ - case S_TermW: \ - SETVALUE(TabEnt->Param); \ - goto doneWhite1d; \ - case S_MakeUpW: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - unexpected("WhiteTable", a0); \ - goto done1d; \ - } \ - } \ - doneWhite1d: \ - if (a0 >= lastx) \ - goto done1d; \ - for (;;) { \ - LOOKUP16(13, TIFFFaxBlackTable, eof1d); \ - switch (TabEnt->State) { \ - case S_EOL: \ - EOLcnt = 1; \ - goto done1d; \ - case S_TermB: \ - SETVALUE(TabEnt->Param); \ - goto doneBlack1d; \ - case S_MakeUpB: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - unexpected("BlackTable", a0); \ - goto done1d; \ - } \ - } \ - doneBlack1d: \ - if (a0 >= lastx) \ - goto done1d; \ - if( *(pa-1) == 0 && *(pa-2) == 0 ) \ - pa -= 2; \ - } \ -eof1d: \ - prematureEOF(a0); \ - CLEANUP_RUNS(); \ - goto eoflab; \ -done1d: \ - CLEANUP_RUNS(); \ -} while (0) - -/* - * Update the value of b1 using the array - * of runs for the reference line. - */ -#define CHECK_b1 do { \ - if (pa != thisrun) while (b1 <= a0 && b1 < lastx) { \ - b1 += pb[0] + pb[1]; \ - pb += 2; \ - } \ -} while (0) - -/* - * Expand a row of 2D-encoded data. - */ -#define EXPAND2D(eoflab) do { \ - while (a0 < lastx) { \ - LOOKUP8(7, TIFFFaxMainTable, eof2d); \ - switch (TabEnt->State) { \ - case S_Pass: \ - CHECK_b1; \ - b1 += *pb++; \ - RunLength += b1 - a0; \ - a0 = b1; \ - b1 += *pb++; \ - break; \ - case S_Horiz: \ - if ((pa-thisrun)&1) { \ - for (;;) { /* black first */ \ - LOOKUP16(13, TIFFFaxBlackTable, eof2d); \ - switch (TabEnt->State) { \ - case S_TermB: \ - SETVALUE(TabEnt->Param); \ - goto doneWhite2da; \ - case S_MakeUpB: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - goto badBlack2d; \ - } \ - } \ - doneWhite2da:; \ - for (;;) { /* then white */ \ - LOOKUP16(12, TIFFFaxWhiteTable, eof2d); \ - switch (TabEnt->State) { \ - case S_TermW: \ - SETVALUE(TabEnt->Param); \ - goto doneBlack2da; \ - case S_MakeUpW: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - goto badWhite2d; \ - } \ - } \ - doneBlack2da:; \ - } else { \ - for (;;) { /* white first */ \ - LOOKUP16(12, TIFFFaxWhiteTable, eof2d); \ - switch (TabEnt->State) { \ - case S_TermW: \ - SETVALUE(TabEnt->Param); \ - goto doneWhite2db; \ - case S_MakeUpW: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - goto badWhite2d; \ - } \ - } \ - doneWhite2db:; \ - for (;;) { /* then black */ \ - LOOKUP16(13, TIFFFaxBlackTable, eof2d); \ - switch (TabEnt->State) { \ - case S_TermB: \ - SETVALUE(TabEnt->Param); \ - goto doneBlack2db; \ - case S_MakeUpB: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - goto badBlack2d; \ - } \ - } \ - doneBlack2db:; \ - } \ - CHECK_b1; \ - break; \ - case S_V0: \ - CHECK_b1; \ - SETVALUE(b1 - a0); \ - b1 += *pb++; \ - break; \ - case S_VR: \ - CHECK_b1; \ - SETVALUE(b1 - a0 + TabEnt->Param); \ - b1 += *pb++; \ - break; \ - case S_VL: \ - CHECK_b1; \ - if (b1 <= (int) (a0 + TabEnt->Param)) { \ - if (b1 < (int) (a0 + TabEnt->Param) || pa != thisrun) { \ - unexpected("VL", a0); \ - goto eol2d; \ - } \ - } \ - SETVALUE(b1 - a0 - TabEnt->Param); \ - b1 -= *--pb; \ - break; \ - case S_Ext: \ - *pa++ = lastx - a0; \ - extension(a0); \ - goto eol2d; \ - case S_EOL: \ - *pa++ = lastx - a0; \ - NeedBits8(4,eof2d); \ - if (GetBits(4)) \ - unexpected("EOL", a0); \ - ClrBits(4); \ - EOLcnt = 1; \ - goto eol2d; \ - default: \ - badMain2d: \ - unexpected("MainTable", a0); \ - goto eol2d; \ - badBlack2d: \ - unexpected("BlackTable", a0); \ - goto eol2d; \ - badWhite2d: \ - unexpected("WhiteTable", a0); \ - goto eol2d; \ - eof2d: \ - prematureEOF(a0); \ - CLEANUP_RUNS(); \ - goto eoflab; \ - } \ - } \ - if (RunLength) { \ - if (RunLength + a0 < lastx) { \ - /* expect a final V0 */ \ - NeedBits8(1,eof2d); \ - if (!GetBits(1)) \ - goto badMain2d; \ - ClrBits(1); \ - } \ - SETVALUE(0); \ - } \ -eol2d: \ - CLEANUP_RUNS(); \ -} while (0) -#endif /* _FAX3_ */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_fax3sm.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_fax3sm.c deleted file mode 100644 index 1e2fe42..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_fax3sm.c +++ /dev/null @@ -1,1260 +0,0 @@ -/* WARNING, this file was automatically generated by the - mkg3states program */ -#include "tiff.h" -#include "tif_fax3.h" - const TIFFFaxTabEnt TIFFFaxMainTable[128] = { -{12,7,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{1,4,0},{3,1,0}, -{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{5,6,2},{3,1,0},{5,3,1},{3,1,0}, -{2,3,0},{3,1,0},{4,3,1},{3,1,0},{1,4,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0}, -{4,3,1},{3,1,0},{5,7,3},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0}, -{1,4,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{4,6,2},{3,1,0}, -{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{1,4,0},{3,1,0},{5,3,1},{3,1,0}, -{2,3,0},{3,1,0},{4,3,1},{3,1,0},{6,7,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0}, -{4,3,1},{3,1,0},{1,4,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0}, -{5,6,2},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{1,4,0},{3,1,0}, -{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{4,7,3},{3,1,0},{5,3,1},{3,1,0}, -{2,3,0},{3,1,0},{4,3,1},{3,1,0},{1,4,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0}, -{4,3,1},{3,1,0},{4,6,2},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0}, -{1,4,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0} -}; - const TIFFFaxTabEnt TIFFFaxWhiteTable[4096] = { -{12,11,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6}, -{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7}, -{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,960},{7,4,6},{7,8,31},{7,5,8}, -{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,11,1792},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16}, -{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128}, -{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1600},{7,4,5}, -{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3}, -{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6}, -{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3}, -{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15}, -{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1536},{7,4,5},{7,8,43},{7,6,17}, -{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128}, -{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5}, -{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,768},{7,4,6}, -{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,11,1856},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,896},{7,4,6},{7,7,19},{7,5,8}, -{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5}, -{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5},{7,8,44},{7,6,17},{9,9,1408},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14}, -{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16}, -{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128}, -{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9}, -{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4}, -{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,960},{7,4,6}, -{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15}, -{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{11,12,2112},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,40},{7,6,16},{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6}, -{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1600},{7,4,5},{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7}, -{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6},{7,8,32},{7,5,8}, -{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16}, -{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128}, -{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1536},{7,4,5}, -{7,8,43},{7,6,17},{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3}, -{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,9,768},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,12,2368},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,896},{7,4,6}, -{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3}, -{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15}, -{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5},{7,8,44},{7,6,17}, -{9,9,1408},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128}, -{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5}, -{7,8,42},{7,6,16},{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6}, -{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8}, -{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5}, -{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14}, -{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16}, -{9,9,960},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128}, -{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{11,12,1984},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9}, -{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1600},{7,4,5},{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4}, -{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6}, -{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15}, -{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6}, -{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1536},{7,4,5},{7,8,43},{7,6,17},{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7}, -{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8}, -{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,9,768},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,11,1920},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16}, -{9,9,896},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128}, -{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5}, -{7,8,44},{7,6,17},{9,9,1408},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3}, -{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6}, -{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3}, -{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15}, -{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1472},{7,4,5},{7,8,43},{7,6,17}, -{9,9,1216},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128}, -{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5}, -{7,8,41},{7,6,16},{9,9,960},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,704},{7,4,6}, -{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,12,2240},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,832},{7,4,6},{7,7,19},{7,5,8}, -{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5}, -{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1600},{7,4,5},{7,8,44},{7,6,17},{9,9,1344},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14}, -{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16}, -{9,9,1088},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128}, -{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9}, -{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1536},{7,4,5},{7,8,43},{7,6,17},{9,9,1280},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4}, -{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,1024},{7,4,6}, -{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,768},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15}, -{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{11,12,2496},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,40},{7,6,16},{9,9,896},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6}, -{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1728},{7,4,5},{7,8,44},{7,6,17},{9,9,1408},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7}, -{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1152},{7,4,6},{7,8,32},{7,5,8}, -{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{12,11,0},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16}, -{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128}, -{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1472},{7,4,5}, -{7,8,43},{7,6,17},{9,9,1216},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3}, -{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,960},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,9,704},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,11,1792},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,832},{7,4,6}, -{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3}, -{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15}, -{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1600},{7,4,5},{7,8,44},{7,6,17}, -{9,9,1344},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128}, -{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5}, -{7,8,42},{7,6,16},{9,9,1088},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6}, -{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8}, -{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5}, -{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1536},{7,4,5},{7,8,43},{7,6,17},{9,9,1280},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14}, -{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16}, -{9,9,1024},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,768},{7,4,6},{7,8,37},{9,5,128}, -{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{11,11,1856},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,896},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9}, -{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1728},{7,4,5},{7,8,44},{7,6,17},{9,9,1408},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4}, -{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1152},{7,4,6}, -{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15}, -{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6}, -{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7}, -{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,960},{7,4,6},{7,8,31},{7,5,8}, -{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,12,2176},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16}, -{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128}, -{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1600},{7,4,5}, -{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3}, -{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6}, -{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3}, -{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15}, -{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1536},{7,4,5},{7,8,43},{7,6,17}, -{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128}, -{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5}, -{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,768},{7,4,6}, -{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,12,2432},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,896},{7,4,6},{7,7,19},{7,5,8}, -{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5}, -{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5},{7,8,44},{7,6,17},{9,9,1408},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14}, -{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16}, -{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128}, -{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9}, -{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4}, -{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,960},{7,4,6}, -{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15}, -{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{11,12,2048},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,40},{7,6,16},{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6}, -{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1600},{7,4,5},{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7}, -{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6},{7,8,32},{7,5,8}, -{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16}, -{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128}, -{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1536},{7,4,5}, -{7,8,43},{7,6,17},{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3}, -{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,9,768},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,11,1920},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,896},{7,4,6}, -{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3}, -{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15}, -{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5},{7,8,44},{7,6,17}, -{9,9,1408},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128}, -{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5}, -{7,8,42},{7,6,16},{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6}, -{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8}, -{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5}, -{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14}, -{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16}, -{9,9,960},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128}, -{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{11,12,2304},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9}, -{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1600},{7,4,5},{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4}, -{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6}, -{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15}, -{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6}, -{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1536},{7,4,5},{7,8,43},{7,6,17},{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7}, -{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8}, -{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,9,768},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,12,2560},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16}, -{9,9,896},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128}, -{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5}, -{7,8,44},{7,6,17},{9,9,1408},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3}, -{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7} -}; - const TIFFFaxTabEnt TIFFFaxBlackTable[8192] = { -{12,11,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,18},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,17},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1792},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,23},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,20},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,11,25},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,128},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,56},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,30},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1856},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,57},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,11,21},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,54},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,52},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,48},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,12,2112},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,44},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,36},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,384},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,28},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,60},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,40},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2368},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,16},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,10,64},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,18},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,10,17},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,12,1984},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,50},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,34},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1664},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,26},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1408},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,32},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1920},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,61},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,42},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,13,1024},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,13,768},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,62},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2240},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,46},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,38},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,512},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,19},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,24},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,22},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,12,2496},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,16},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,10,64},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{12,11,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,18},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,17},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1792},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,23},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,20},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,25},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,12,192},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1280},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,31},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,11,1856},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,58},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,21},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,896},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,640},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,49},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2176},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,45},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,37},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,12,448},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,29},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,13,1536},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,41},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2432},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,16},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,10,64},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,18},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,17},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,12,2048},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,51},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,35},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,320},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,27},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,59},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,33},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1920},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,256},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,43},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,13,1152},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,55},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,63},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,12,2304},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,47},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,39},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,53},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,19},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,24},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,22},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2560},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,10,16},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,10,64},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{12,11,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,10,18},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,17},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1792},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,23},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,11,20},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,25},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,12,128},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,56},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,30},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,11,1856},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,57},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,21},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,54},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,52},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,48},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2112},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,44},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,36},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,12,384},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,28},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,60},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,40},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,12,2368},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,16},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,10,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,10,64},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,18},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,17},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,1984},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,50},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,34},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,13,1728},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,26},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,13,1472},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,32},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1920},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,61},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,42},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1088},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,832},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,62},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,12,2240},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,46},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,38},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,576},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,19},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,11,24},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,22},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2496},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,16},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,10,64},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{12,11,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,18},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,10,17},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,11,1792},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,23},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,20},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,25},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,192},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1344},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,31},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1856},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,58},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,21},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,13,960},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,13,704},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,49},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2176},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,45},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,37},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,448},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,29},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1600},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,41},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,12,2432},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,16},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,10,64},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,18},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,17},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2048},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,51},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,35},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,12,320},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,27},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,59},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,33},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,11,1920},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,256},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,43},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1216},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,55},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,63},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2304},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,47},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,39},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,53},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,19},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,24},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,11,22},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2560},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,16},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,10,64},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2} -}; -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_flush.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_flush.c deleted file mode 100644 index 002be5c..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_flush.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - */ -#include "tiffiop.h" - -int -TIFFFlush(TIFF* tif) -{ - if( tif->tif_mode == O_RDONLY ) - return 1; - - if (!TIFFFlushData(tif)) - return (0); - - /* In update (r+) mode we try to detect the case where - only the strip/tile map has been altered, and we try to - rewrite only that portion of the directory without - making any other changes */ - - if( (tif->tif_flags & TIFF_DIRTYSTRIP) - && !(tif->tif_flags & TIFF_DIRTYDIRECT) - && tif->tif_mode == O_RDWR ) - { - uint64 *offsets=NULL, *sizes=NULL; - - if( TIFFIsTiled(tif) ) - { - if( TIFFGetField( tif, TIFFTAG_TILEOFFSETS, &offsets ) - && TIFFGetField( tif, TIFFTAG_TILEBYTECOUNTS, &sizes ) - && _TIFFRewriteField( tif, TIFFTAG_TILEOFFSETS, TIFF_LONG8, - tif->tif_dir.td_nstrips, offsets ) - && _TIFFRewriteField( tif, TIFFTAG_TILEBYTECOUNTS, TIFF_LONG8, - tif->tif_dir.td_nstrips, sizes ) ) - { - tif->tif_flags &= ~TIFF_DIRTYSTRIP; - tif->tif_flags &= ~TIFF_BEENWRITING; - return 1; - } - } - else - { - if( TIFFGetField( tif, TIFFTAG_STRIPOFFSETS, &offsets ) - && TIFFGetField( tif, TIFFTAG_STRIPBYTECOUNTS, &sizes ) - && _TIFFRewriteField( tif, TIFFTAG_STRIPOFFSETS, TIFF_LONG8, - tif->tif_dir.td_nstrips, offsets ) - && _TIFFRewriteField( tif, TIFFTAG_STRIPBYTECOUNTS, TIFF_LONG8, - tif->tif_dir.td_nstrips, sizes ) ) - { - tif->tif_flags &= ~TIFF_DIRTYSTRIP; - tif->tif_flags &= ~TIFF_BEENWRITING; - return 1; - } - } - } - - if ((tif->tif_flags & (TIFF_DIRTYDIRECT|TIFF_DIRTYSTRIP)) - && !TIFFRewriteDirectory(tif)) - return (0); - - return (1); -} - -/* - * Flush buffered data to the file. - * - * Frank Warmerdam'2000: I modified this to return 1 if TIFF_BEENWRITING - * is not set, so that TIFFFlush() will proceed to write out the directory. - * The documentation says returning 1 is an error indicator, but not having - * been writing isn't exactly a an error. Hopefully this doesn't cause - * problems for other people. - */ -int -TIFFFlushData(TIFF* tif) -{ - if ((tif->tif_flags & TIFF_BEENWRITING) == 0) - return (1); - if (tif->tif_flags & TIFF_POSTENCODE) { - tif->tif_flags &= ~TIFF_POSTENCODE; - if (!(*tif->tif_postencode)(tif)) - return (0); - } - return (TIFFFlushData1(tif)); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_getimage.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_getimage.c deleted file mode 100644 index 0f27879..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_getimage.c +++ /dev/null @@ -1,3046 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Read and return a packed RGBA image. - */ -#include "tiffiop.h" -#include - -static int gtTileContig(TIFFRGBAImage*, uint32*, uint32, uint32); -static int gtTileSeparate(TIFFRGBAImage*, uint32*, uint32, uint32); -static int gtStripContig(TIFFRGBAImage*, uint32*, uint32, uint32); -static int gtStripSeparate(TIFFRGBAImage*, uint32*, uint32, uint32); -static int PickContigCase(TIFFRGBAImage*); -static int PickSeparateCase(TIFFRGBAImage*); - -static int BuildMapUaToAa(TIFFRGBAImage* img); -static int BuildMapBitdepth16To8(TIFFRGBAImage* img); - -static const char photoTag[] = "PhotometricInterpretation"; - -/* - * Helper constants used in Orientation tag handling - */ -#define FLIP_VERTICALLY 0x01 -#define FLIP_HORIZONTALLY 0x02 - -/* - * Color conversion constants. We will define display types here. - */ - -static const TIFFDisplay display_sRGB = { - { /* XYZ -> luminance matrix */ - { 3.2410F, -1.5374F, -0.4986F }, - { -0.9692F, 1.8760F, 0.0416F }, - { 0.0556F, -0.2040F, 1.0570F } - }, - 100.0F, 100.0F, 100.0F, /* Light o/p for reference white */ - 255, 255, 255, /* Pixel values for ref. white */ - 1.0F, 1.0F, 1.0F, /* Residual light o/p for black pixel */ - 2.4F, 2.4F, 2.4F, /* Gamma values for the three guns */ -}; - -/* - * Check the image to see if TIFFReadRGBAImage can deal with it. - * 1/0 is returned according to whether or not the image can - * be handled. If 0 is returned, emsg contains the reason - * why it is being rejected. - */ -int -TIFFRGBAImageOK(TIFF* tif, char emsg[1024]) -{ - TIFFDirectory* td = &tif->tif_dir; - uint16 photometric; - int colorchannels; - - if (!tif->tif_decodestatus) { - sprintf(emsg, "Sorry, requested compression method is not configured"); - return (0); - } - switch (td->td_bitspersample) { - case 1: - case 2: - case 4: - case 8: - case 16: - break; - default: - sprintf(emsg, "Sorry, can not handle images with %d-bit samples", - td->td_bitspersample); - return (0); - } - if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP) { - sprintf(emsg, "Sorry, can not handle images with IEEE floating-point samples"); - return (0); - } - colorchannels = td->td_samplesperpixel - td->td_extrasamples; - if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric)) { - switch (colorchannels) { - case 1: - photometric = PHOTOMETRIC_MINISBLACK; - break; - case 3: - photometric = PHOTOMETRIC_RGB; - break; - default: - sprintf(emsg, "Missing needed %s tag", photoTag); - return (0); - } - } - switch (photometric) { - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - case PHOTOMETRIC_PALETTE: - if (td->td_planarconfig == PLANARCONFIG_CONTIG - && td->td_samplesperpixel != 1 - && td->td_bitspersample < 8 ) { - sprintf(emsg, - "Sorry, can not handle contiguous data with %s=%d, " - "and %s=%d and Bits/Sample=%d", - photoTag, photometric, - "Samples/pixel", td->td_samplesperpixel, - td->td_bitspersample); - return (0); - } - /* - * We should likely validate that any extra samples are either - * to be ignored, or are alpha, and if alpha we should try to use - * them. But for now we won't bother with this. - */ - break; - case PHOTOMETRIC_YCBCR: - /* - * TODO: if at all meaningful and useful, make more complete - * support check here, or better still, refactor to let supporting - * code decide whether there is support and what meaningful - * error to return - */ - break; - case PHOTOMETRIC_RGB: - if (colorchannels < 3) { - sprintf(emsg, "Sorry, can not handle RGB image with %s=%d", - "Color channels", colorchannels); - return (0); - } - break; - case PHOTOMETRIC_SEPARATED: - { - uint16 inkset; - TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset); - if (inkset != INKSET_CMYK) { - sprintf(emsg, - "Sorry, can not handle separated image with %s=%d", - "InkSet", inkset); - return 0; - } - if (td->td_samplesperpixel < 4) { - sprintf(emsg, - "Sorry, can not handle separated image with %s=%d", - "Samples/pixel", td->td_samplesperpixel); - return 0; - } - break; - } - case PHOTOMETRIC_LOGL: - if (td->td_compression != COMPRESSION_SGILOG) { - sprintf(emsg, "Sorry, LogL data must have %s=%d", - "Compression", COMPRESSION_SGILOG); - return (0); - } - break; - case PHOTOMETRIC_LOGLUV: - if (td->td_compression != COMPRESSION_SGILOG && - td->td_compression != COMPRESSION_SGILOG24) { - sprintf(emsg, "Sorry, LogLuv data must have %s=%d or %d", - "Compression", COMPRESSION_SGILOG, COMPRESSION_SGILOG24); - return (0); - } - if (td->td_planarconfig != PLANARCONFIG_CONTIG) { - sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d", - "Planarconfiguration", td->td_planarconfig); - return (0); - } - if ( td->td_samplesperpixel != 3 || colorchannels != 3 ) { - sprintf(emsg, - "Sorry, can not handle image with %s=%d, %s=%d", - "Samples/pixel", td->td_samplesperpixel, - "colorchannels", colorchannels); - return 0; - } - break; - case PHOTOMETRIC_CIELAB: - if ( td->td_samplesperpixel != 3 || colorchannels != 3 || td->td_bitspersample != 8 ) { - sprintf(emsg, - "Sorry, can not handle image with %s=%d, %s=%d and %s=%d", - "Samples/pixel", td->td_samplesperpixel, - "colorchannels", colorchannels, - "Bits/sample", td->td_bitspersample); - return 0; - } - break; - default: - sprintf(emsg, "Sorry, can not handle image with %s=%d", - photoTag, photometric); - return (0); - } - return (1); -} - -void -TIFFRGBAImageEnd(TIFFRGBAImage* img) -{ - if (img->Map) { - _TIFFfree(img->Map); - img->Map = NULL; - } - if (img->BWmap) { - _TIFFfree(img->BWmap); - img->BWmap = NULL; - } - if (img->PALmap) { - _TIFFfree(img->PALmap); - img->PALmap = NULL; - } - if (img->ycbcr) { - _TIFFfree(img->ycbcr); - img->ycbcr = NULL; - } - if (img->cielab) { - _TIFFfree(img->cielab); - img->cielab = NULL; - } - if (img->UaToAa) { - _TIFFfree(img->UaToAa); - img->UaToAa = NULL; - } - if (img->Bitdepth16To8) { - _TIFFfree(img->Bitdepth16To8); - img->Bitdepth16To8 = NULL; - } - - if( img->redcmap ) { - _TIFFfree( img->redcmap ); - _TIFFfree( img->greencmap ); - _TIFFfree( img->bluecmap ); - img->redcmap = img->greencmap = img->bluecmap = NULL; - } -} - -static int -isCCITTCompression(TIFF* tif) -{ - uint16 compress; - TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress); - return (compress == COMPRESSION_CCITTFAX3 || - compress == COMPRESSION_CCITTFAX4 || - compress == COMPRESSION_CCITTRLE || - compress == COMPRESSION_CCITTRLEW); -} - -int -TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) -{ - uint16* sampleinfo; - uint16 extrasamples; - uint16 planarconfig; - uint16 compress; - int colorchannels; - uint16 *red_orig, *green_orig, *blue_orig; - int n_color; - - if( !TIFFRGBAImageOK(tif, emsg) ) - return 0; - - /* Initialize to normal values */ - img->row_offset = 0; - img->col_offset = 0; - img->redcmap = NULL; - img->greencmap = NULL; - img->bluecmap = NULL; - img->Map = NULL; - img->BWmap = NULL; - img->PALmap = NULL; - img->ycbcr = NULL; - img->cielab = NULL; - img->UaToAa = NULL; - img->Bitdepth16To8 = NULL; - img->req_orientation = ORIENTATION_BOTLEFT; /* It is the default */ - - img->tif = tif; - img->stoponerr = stop; - TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &img->bitspersample); - switch (img->bitspersample) { - case 1: - case 2: - case 4: - case 8: - case 16: - break; - default: - sprintf(emsg, "Sorry, can not handle images with %d-bit samples", - img->bitspersample); - goto fail_return; - } - img->alpha = 0; - TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &img->samplesperpixel); - TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES, - &extrasamples, &sampleinfo); - if (extrasamples >= 1) - { - switch (sampleinfo[0]) { - case EXTRASAMPLE_UNSPECIFIED: /* Workaround for some images without */ - if (img->samplesperpixel > 3) /* correct info about alpha channel */ - img->alpha = EXTRASAMPLE_ASSOCALPHA; - break; - case EXTRASAMPLE_ASSOCALPHA: /* data is pre-multiplied */ - case EXTRASAMPLE_UNASSALPHA: /* data is not pre-multiplied */ - img->alpha = sampleinfo[0]; - break; - } - } - -#ifdef DEFAULT_EXTRASAMPLE_AS_ALPHA - if( !TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric)) - img->photometric = PHOTOMETRIC_MINISWHITE; - - if( extrasamples == 0 - && img->samplesperpixel == 4 - && img->photometric == PHOTOMETRIC_RGB ) - { - img->alpha = EXTRASAMPLE_ASSOCALPHA; - extrasamples = 1; - } -#endif - - colorchannels = img->samplesperpixel - extrasamples; - TIFFGetFieldDefaulted(tif, TIFFTAG_COMPRESSION, &compress); - TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfig); - if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric)) { - switch (colorchannels) { - case 1: - if (isCCITTCompression(tif)) - img->photometric = PHOTOMETRIC_MINISWHITE; - else - img->photometric = PHOTOMETRIC_MINISBLACK; - break; - case 3: - img->photometric = PHOTOMETRIC_RGB; - break; - default: - sprintf(emsg, "Missing needed %s tag", photoTag); - goto fail_return; - } - } - switch (img->photometric) { - case PHOTOMETRIC_PALETTE: - if (!TIFFGetField(tif, TIFFTAG_COLORMAP, - &red_orig, &green_orig, &blue_orig)) { - sprintf(emsg, "Missing required \"Colormap\" tag"); - goto fail_return; - } - - /* copy the colormaps so we can modify them */ - n_color = (1U << img->bitspersample); - img->redcmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color); - img->greencmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color); - img->bluecmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color); - if( !img->redcmap || !img->greencmap || !img->bluecmap ) { - sprintf(emsg, "Out of memory for colormap copy"); - goto fail_return; - } - - _TIFFmemcpy( img->redcmap, red_orig, n_color * 2 ); - _TIFFmemcpy( img->greencmap, green_orig, n_color * 2 ); - _TIFFmemcpy( img->bluecmap, blue_orig, n_color * 2 ); - - /* fall through... */ - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - if (planarconfig == PLANARCONFIG_CONTIG - && img->samplesperpixel != 1 - && img->bitspersample < 8 ) { - sprintf(emsg, - "Sorry, can not handle contiguous data with %s=%d, " - "and %s=%d and Bits/Sample=%d", - photoTag, img->photometric, - "Samples/pixel", img->samplesperpixel, - img->bitspersample); - goto fail_return; - } - break; - case PHOTOMETRIC_YCBCR: - /* It would probably be nice to have a reality check here. */ - if (planarconfig == PLANARCONFIG_CONTIG) - /* can rely on libjpeg to convert to RGB */ - /* XXX should restore current state on exit */ - switch (compress) { - case COMPRESSION_JPEG: - /* - * TODO: when complete tests verify complete desubsampling - * and YCbCr handling, remove use of TIFFTAG_JPEGCOLORMODE in - * favor of tif_getimage.c native handling - */ - TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); - img->photometric = PHOTOMETRIC_RGB; - break; - default: - /* do nothing */; - break; - } - /* - * TODO: if at all meaningful and useful, make more complete - * support check here, or better still, refactor to let supporting - * code decide whether there is support and what meaningful - * error to return - */ - break; - case PHOTOMETRIC_RGB: - if (colorchannels < 3) { - sprintf(emsg, "Sorry, can not handle RGB image with %s=%d", - "Color channels", colorchannels); - goto fail_return; - } - break; - case PHOTOMETRIC_SEPARATED: - { - uint16 inkset; - TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset); - if (inkset != INKSET_CMYK) { - sprintf(emsg, "Sorry, can not handle separated image with %s=%d", - "InkSet", inkset); - goto fail_return; - } - if (img->samplesperpixel < 4) { - sprintf(emsg, "Sorry, can not handle separated image with %s=%d", - "Samples/pixel", img->samplesperpixel); - goto fail_return; - } - } - break; - case PHOTOMETRIC_LOGL: - if (compress != COMPRESSION_SGILOG) { - sprintf(emsg, "Sorry, LogL data must have %s=%d", - "Compression", COMPRESSION_SGILOG); - goto fail_return; - } - TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT); - img->photometric = PHOTOMETRIC_MINISBLACK; /* little white lie */ - img->bitspersample = 8; - break; - case PHOTOMETRIC_LOGLUV: - if (compress != COMPRESSION_SGILOG && compress != COMPRESSION_SGILOG24) { - sprintf(emsg, "Sorry, LogLuv data must have %s=%d or %d", - "Compression", COMPRESSION_SGILOG, COMPRESSION_SGILOG24); - goto fail_return; - } - if (planarconfig != PLANARCONFIG_CONTIG) { - sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d", - "Planarconfiguration", planarconfig); - return (0); - } - TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT); - img->photometric = PHOTOMETRIC_RGB; /* little white lie */ - img->bitspersample = 8; - break; - case PHOTOMETRIC_CIELAB: - break; - default: - sprintf(emsg, "Sorry, can not handle image with %s=%d", - photoTag, img->photometric); - goto fail_return; - } - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &img->width); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &img->height); - TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &img->orientation); - img->isContig = - !(planarconfig == PLANARCONFIG_SEPARATE && img->samplesperpixel > 1); - if (img->isContig) { - if (!PickContigCase(img)) { - sprintf(emsg, "Sorry, can not handle image"); - goto fail_return; - } - } else { - if (!PickSeparateCase(img)) { - sprintf(emsg, "Sorry, can not handle image"); - goto fail_return; - } - } - return 1; - - fail_return: - TIFFRGBAImageEnd( img ); - return 0; -} - -int -TIFFRGBAImageGet(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) -{ - if (img->get == NULL) { - TIFFErrorExt(img->tif->tif_clientdata, TIFFFileName(img->tif), "No \"get\" routine setup"); - return (0); - } - if (img->put.any == NULL) { - TIFFErrorExt(img->tif->tif_clientdata, TIFFFileName(img->tif), - "No \"put\" routine setupl; probably can not handle image format"); - return (0); - } - return (*img->get)(img, raster, w, h); -} - -/* - * Read the specified image into an ABGR-format rastertaking in account - * specified orientation. - */ -int -TIFFReadRGBAImageOriented(TIFF* tif, - uint32 rwidth, uint32 rheight, uint32* raster, - int orientation, int stop) -{ - char emsg[1024] = ""; - TIFFRGBAImage img; - int ok; - - if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, stop, emsg)) { - img.req_orientation = (uint16)orientation; - /* XXX verify rwidth and rheight against width and height */ - ok = TIFFRGBAImageGet(&img, raster+(rheight-img.height)*rwidth, - rwidth, img.height); - TIFFRGBAImageEnd(&img); - } else { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", emsg); - ok = 0; - } - return (ok); -} - -/* - * Read the specified image into an ABGR-format raster. Use bottom left - * origin for raster by default. - */ -int -TIFFReadRGBAImage(TIFF* tif, - uint32 rwidth, uint32 rheight, uint32* raster, int stop) -{ - return TIFFReadRGBAImageOriented(tif, rwidth, rheight, raster, - ORIENTATION_BOTLEFT, stop); -} - -static int -setorientation(TIFFRGBAImage* img) -{ - switch (img->orientation) { - case ORIENTATION_TOPLEFT: - case ORIENTATION_LEFTTOP: - if (img->req_orientation == ORIENTATION_TOPRIGHT || - img->req_orientation == ORIENTATION_RIGHTTOP) - return FLIP_HORIZONTALLY; - else if (img->req_orientation == ORIENTATION_BOTRIGHT || - img->req_orientation == ORIENTATION_RIGHTBOT) - return FLIP_HORIZONTALLY | FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTLEFT || - img->req_orientation == ORIENTATION_LEFTBOT) - return FLIP_VERTICALLY; - else - return 0; - case ORIENTATION_TOPRIGHT: - case ORIENTATION_RIGHTTOP: - if (img->req_orientation == ORIENTATION_TOPLEFT || - img->req_orientation == ORIENTATION_LEFTTOP) - return FLIP_HORIZONTALLY; - else if (img->req_orientation == ORIENTATION_BOTRIGHT || - img->req_orientation == ORIENTATION_RIGHTBOT) - return FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTLEFT || - img->req_orientation == ORIENTATION_LEFTBOT) - return FLIP_HORIZONTALLY | FLIP_VERTICALLY; - else - return 0; - case ORIENTATION_BOTRIGHT: - case ORIENTATION_RIGHTBOT: - if (img->req_orientation == ORIENTATION_TOPLEFT || - img->req_orientation == ORIENTATION_LEFTTOP) - return FLIP_HORIZONTALLY | FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_TOPRIGHT || - img->req_orientation == ORIENTATION_RIGHTTOP) - return FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTLEFT || - img->req_orientation == ORIENTATION_LEFTBOT) - return FLIP_HORIZONTALLY; - else - return 0; - case ORIENTATION_BOTLEFT: - case ORIENTATION_LEFTBOT: - if (img->req_orientation == ORIENTATION_TOPLEFT || - img->req_orientation == ORIENTATION_LEFTTOP) - return FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_TOPRIGHT || - img->req_orientation == ORIENTATION_RIGHTTOP) - return FLIP_HORIZONTALLY | FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTRIGHT || - img->req_orientation == ORIENTATION_RIGHTBOT) - return FLIP_HORIZONTALLY; - else - return 0; - default: /* NOTREACHED */ - return 0; - } -} - -/* - * Get an tile-organized image that has - * PlanarConfiguration contiguous if SamplesPerPixel > 1 - * or - * SamplesPerPixel == 1 - */ -static int -gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) -{ - TIFF* tif = img->tif; - tileContigRoutine put = img->put.contig; - uint32 col, row, y, rowstoread; - tmsize_t pos; - uint32 tw, th; - unsigned char* buf = NULL; - int32 fromskew, toskew; - uint32 nrow; - int ret = 1, flip; - uint32 this_tw, tocol; - int32 this_toskew, leftmost_toskew; - int32 leftmost_fromskew; - uint32 leftmost_tw; - tmsize_t bufsize; - - bufsize = TIFFTileSize(tif); - if (bufsize == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "No space for tile buffer"); - return (0); - } - - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); - - flip = setorientation(img); - if (flip & FLIP_VERTICALLY) { - y = h - 1; - toskew = -(int32)(tw + w); - } - else { - y = 0; - toskew = -(int32)(tw - w); - } - - /* - * Leftmost tile is clipped on left side if col_offset > 0. - */ - leftmost_fromskew = img->col_offset % tw; - leftmost_tw = tw - leftmost_fromskew; - leftmost_toskew = toskew + leftmost_fromskew; - for (row = 0; ret != 0 && row < h; row += nrow) - { - rowstoread = th - (row + img->row_offset) % th; - nrow = (row + rowstoread > h ? h - row : rowstoread); - fromskew = leftmost_fromskew; - this_tw = leftmost_tw; - this_toskew = leftmost_toskew; - tocol = 0; - col = img->col_offset; - while (tocol < w) - { - if (_TIFFReadTileAndAllocBuffer(tif, (void**) &buf, bufsize, col, - row+img->row_offset, 0, 0)==(tmsize_t)(-1) && - (buf == NULL || img->stoponerr)) - { - ret = 0; - break; - } - pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif) + \ - ((tmsize_t) fromskew * img->samplesperpixel); - if (tocol + this_tw > w) - { - /* - * Rightmost tile is clipped on right side. - */ - fromskew = tw - (w - tocol); - this_tw = tw - fromskew; - this_toskew = toskew + fromskew; - } - (*put)(img, raster+y*w+tocol, tocol, y, this_tw, nrow, fromskew, this_toskew, buf + pos); - tocol += this_tw; - col += this_tw; - /* - * After the leftmost tile, tiles are no longer clipped on left side. - */ - fromskew = 0; - this_tw = tw; - this_toskew = toskew; - } - - y += ((flip & FLIP_VERTICALLY) ? -(int32) nrow : (int32) nrow); - } - _TIFFfree(buf); - - if (flip & FLIP_HORIZONTALLY) { - uint32 line; - - for (line = 0; line < h; line++) { - uint32 *left = raster + (line * w); - uint32 *right = left + w - 1; - - while ( left < right ) { - uint32 temp = *left; - *left = *right; - *right = temp; - left++; - right--; - } - } - } - - return (ret); -} - -/* - * Get an tile-organized image that has - * SamplesPerPixel > 1 - * PlanarConfiguration separated - * We assume that all such images are RGB. - */ -static int -gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) -{ - TIFF* tif = img->tif; - tileSeparateRoutine put = img->put.separate; - uint32 col, row, y, rowstoread; - tmsize_t pos; - uint32 tw, th; - unsigned char* buf = NULL; - unsigned char* p0 = NULL; - unsigned char* p1 = NULL; - unsigned char* p2 = NULL; - unsigned char* pa = NULL; - tmsize_t tilesize; - tmsize_t bufsize; - int32 fromskew, toskew; - int alpha = img->alpha; - uint32 nrow; - int ret = 1, flip; - uint16 colorchannels; - uint32 this_tw, tocol; - int32 this_toskew, leftmost_toskew; - int32 leftmost_fromskew; - uint32 leftmost_tw; - - tilesize = TIFFTileSize(tif); - bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,tilesize); - if (bufsize == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtTileSeparate"); - return (0); - } - - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); - - flip = setorientation(img); - if (flip & FLIP_VERTICALLY) { - y = h - 1; - toskew = -(int32)(tw + w); - } - else { - y = 0; - toskew = -(int32)(tw - w); - } - - switch( img->photometric ) - { - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - case PHOTOMETRIC_PALETTE: - colorchannels = 1; - break; - - default: - colorchannels = 3; - break; - } - - /* - * Leftmost tile is clipped on left side if col_offset > 0. - */ - leftmost_fromskew = img->col_offset % tw; - leftmost_tw = tw - leftmost_fromskew; - leftmost_toskew = toskew + leftmost_fromskew; - for (row = 0; ret != 0 && row < h; row += nrow) - { - rowstoread = th - (row + img->row_offset) % th; - nrow = (row + rowstoread > h ? h - row : rowstoread); - fromskew = leftmost_fromskew; - this_tw = leftmost_tw; - this_toskew = leftmost_toskew; - tocol = 0; - col = img->col_offset; - while (tocol < w) - { - if( buf == NULL ) - { - if (_TIFFReadTileAndAllocBuffer( - tif, (void**) &buf, bufsize, col, - row+img->row_offset,0,0)==(tmsize_t)(-1) - && (buf == NULL || img->stoponerr)) - { - ret = 0; - break; - } - p0 = buf; - if( colorchannels == 1 ) - { - p2 = p1 = p0; - pa = (alpha?(p0+3*tilesize):NULL); - } - else - { - p1 = p0 + tilesize; - p2 = p1 + tilesize; - pa = (alpha?(p2+tilesize):NULL); - } - } - else if (TIFFReadTile(tif, p0, col, - row+img->row_offset,0,0)==(tmsize_t)(-1) && img->stoponerr) - { - ret = 0; - break; - } - if (colorchannels > 1 - && TIFFReadTile(tif, p1, col, - row+img->row_offset,0,1) == (tmsize_t)(-1) - && img->stoponerr) - { - ret = 0; - break; - } - if (colorchannels > 1 - && TIFFReadTile(tif, p2, col, - row+img->row_offset,0,2) == (tmsize_t)(-1) - && img->stoponerr) - { - ret = 0; - break; - } - if (alpha - && TIFFReadTile(tif,pa,col, - row+img->row_offset,0,colorchannels) == (tmsize_t)(-1) - && img->stoponerr) - { - ret = 0; - break; - } - - pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif) + \ - ((tmsize_t) fromskew * img->samplesperpixel); - if (tocol + this_tw > w) - { - /* - * Rightmost tile is clipped on right side. - */ - fromskew = tw - (w - tocol); - this_tw = tw - fromskew; - this_toskew = toskew + fromskew; - } - (*put)(img, raster+y*w+tocol, tocol, y, this_tw, nrow, fromskew, this_toskew, \ - p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL)); - tocol += this_tw; - col += this_tw; - /* - * After the leftmost tile, tiles are no longer clipped on left side. - */ - fromskew = 0; - this_tw = tw; - this_toskew = toskew; - } - - y += ((flip & FLIP_VERTICALLY) ?-(int32) nrow : (int32) nrow); - } - - if (flip & FLIP_HORIZONTALLY) { - uint32 line; - - for (line = 0; line < h; line++) { - uint32 *left = raster + (line * w); - uint32 *right = left + w - 1; - - while ( left < right ) { - uint32 temp = *left; - *left = *right; - *right = temp; - left++; - right--; - } - } - } - - _TIFFfree(buf); - return (ret); -} - -/* - * Get a strip-organized image that has - * PlanarConfiguration contiguous if SamplesPerPixel > 1 - * or - * SamplesPerPixel == 1 - */ -static int -gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) -{ - TIFF* tif = img->tif; - tileContigRoutine put = img->put.contig; - uint32 row, y, nrow, nrowsub, rowstoread; - tmsize_t pos; - unsigned char* buf = NULL; - uint32 rowsperstrip; - uint16 subsamplinghor,subsamplingver; - uint32 imagewidth = img->width; - tmsize_t scanline; - int32 fromskew, toskew; - int ret = 1, flip; - tmsize_t maxstripsize; - - TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, &subsamplinghor, &subsamplingver); - if( subsamplingver == 0 ) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Invalid vertical YCbCr subsampling"); - return (0); - } - - maxstripsize = TIFFStripSize(tif); - - flip = setorientation(img); - if (flip & FLIP_VERTICALLY) { - y = h - 1; - toskew = -(int32)(w + w); - } else { - y = 0; - toskew = -(int32)(w - w); - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - - scanline = TIFFScanlineSize(tif); - fromskew = (w < imagewidth ? imagewidth - w : 0); - for (row = 0; row < h; row += nrow) - { - rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip; - nrow = (row + rowstoread > h ? h - row : rowstoread); - nrowsub = nrow; - if ((nrowsub%subsamplingver)!=0) - nrowsub+=subsamplingver-nrowsub%subsamplingver; - if (_TIFFReadEncodedStripAndAllocBuffer(tif, - TIFFComputeStrip(tif,row+img->row_offset, 0), - (void**)(&buf), - maxstripsize, - ((row + img->row_offset)%rowsperstrip + nrowsub) * scanline)==(tmsize_t)(-1) - && (buf == NULL || img->stoponerr)) - { - ret = 0; - break; - } - - pos = ((row + img->row_offset) % rowsperstrip) * scanline + \ - ((tmsize_t) img->col_offset * img->samplesperpixel); - (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, buf + pos); - y += ((flip & FLIP_VERTICALLY) ? -(int32) nrow : (int32) nrow); - } - - if (flip & FLIP_HORIZONTALLY) { - uint32 line; - - for (line = 0; line < h; line++) { - uint32 *left = raster + (line * w); - uint32 *right = left + w - 1; - - while ( left < right ) { - uint32 temp = *left; - *left = *right; - *right = temp; - left++; - right--; - } - } - } - - _TIFFfree(buf); - return (ret); -} - -/* - * Get a strip-organized image with - * SamplesPerPixel > 1 - * PlanarConfiguration separated - * We assume that all such images are RGB. - */ -static int -gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) -{ - TIFF* tif = img->tif; - tileSeparateRoutine put = img->put.separate; - unsigned char *buf = NULL; - unsigned char *p0 = NULL, *p1 = NULL, *p2 = NULL, *pa = NULL; - uint32 row, y, nrow, rowstoread; - tmsize_t pos; - tmsize_t scanline; - uint32 rowsperstrip, offset_row; - uint32 imagewidth = img->width; - tmsize_t stripsize; - tmsize_t bufsize; - int32 fromskew, toskew; - int alpha = img->alpha; - int ret = 1, flip; - uint16 colorchannels; - - stripsize = TIFFStripSize(tif); - bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,stripsize); - if (bufsize == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtStripSeparate"); - return (0); - } - - flip = setorientation(img); - if (flip & FLIP_VERTICALLY) { - y = h - 1; - toskew = -(int32)(w + w); - } - else { - y = 0; - toskew = -(int32)(w - w); - } - - switch( img->photometric ) - { - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - case PHOTOMETRIC_PALETTE: - colorchannels = 1; - break; - - default: - colorchannels = 3; - break; - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - scanline = TIFFScanlineSize(tif); - fromskew = (w < imagewidth ? imagewidth - w : 0); - for (row = 0; row < h; row += nrow) - { - rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip; - nrow = (row + rowstoread > h ? h - row : rowstoread); - offset_row = row + img->row_offset; - if( buf == NULL ) - { - if (_TIFFReadEncodedStripAndAllocBuffer( - tif, TIFFComputeStrip(tif, offset_row, 0), - (void**) &buf, bufsize, - ((row + img->row_offset)%rowsperstrip + nrow) * scanline)==(tmsize_t)(-1) - && (buf == NULL || img->stoponerr)) - { - ret = 0; - break; - } - p0 = buf; - if( colorchannels == 1 ) - { - p2 = p1 = p0; - pa = (alpha?(p0+3*stripsize):NULL); - } - else - { - p1 = p0 + stripsize; - p2 = p1 + stripsize; - pa = (alpha?(p2+stripsize):NULL); - } - } - else if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0), - p0, ((row + img->row_offset)%rowsperstrip + nrow) * scanline)==(tmsize_t)(-1) - && img->stoponerr) - { - ret = 0; - break; - } - if (colorchannels > 1 - && TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1), - p1, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) == (tmsize_t)(-1) - && img->stoponerr) - { - ret = 0; - break; - } - if (colorchannels > 1 - && TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2), - p2, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) == (tmsize_t)(-1) - && img->stoponerr) - { - ret = 0; - break; - } - if (alpha) - { - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, colorchannels), - pa, ((row + img->row_offset)%rowsperstrip + nrow) * scanline)==(tmsize_t)(-1) - && img->stoponerr) - { - ret = 0; - break; - } - } - - pos = ((row + img->row_offset) % rowsperstrip) * scanline + \ - ((tmsize_t) img->col_offset * img->samplesperpixel); - (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, p0 + pos, p1 + pos, - p2 + pos, (alpha?(pa+pos):NULL)); - y += ((flip & FLIP_VERTICALLY) ? -(int32) nrow : (int32) nrow); - } - - if (flip & FLIP_HORIZONTALLY) { - uint32 line; - - for (line = 0; line < h; line++) { - uint32 *left = raster + (line * w); - uint32 *right = left + w - 1; - - while ( left < right ) { - uint32 temp = *left; - *left = *right; - *right = temp; - left++; - right--; - } - } - } - - _TIFFfree(buf); - return (ret); -} - -/* - * The following routines move decoded data returned - * from the TIFF library into rasters filled with packed - * ABGR pixels (i.e. suitable for passing to lrecwrite.) - * - * The routines have been created according to the most - * important cases and optimized. PickContigCase and - * PickSeparateCase analyze the parameters and select - * the appropriate "get" and "put" routine to use. - */ -#define REPEAT8(op) REPEAT4(op); REPEAT4(op) -#define REPEAT4(op) REPEAT2(op); REPEAT2(op) -#define REPEAT2(op) op; op -#define CASE8(x,op) \ - switch (x) { \ - case 7: op; /*-fallthrough*/ \ - case 6: op; /*-fallthrough*/ \ - case 5: op; /*-fallthrough*/ \ - case 4: op; /*-fallthrough*/ \ - case 3: op; /*-fallthrough*/ \ - case 2: op; /*-fallthrough*/ \ - case 1: op; \ - } -#define CASE4(x,op) switch (x) { case 3: op; /*-fallthrough*/ case 2: op; /*-fallthrough*/ case 1: op; } -#define NOP - -#define UNROLL8(w, op1, op2) { \ - uint32 _x; \ - for (_x = w; _x >= 8; _x -= 8) { \ - op1; \ - REPEAT8(op2); \ - } \ - if (_x > 0) { \ - op1; \ - CASE8(_x,op2); \ - } \ -} -#define UNROLL4(w, op1, op2) { \ - uint32 _x; \ - for (_x = w; _x >= 4; _x -= 4) { \ - op1; \ - REPEAT4(op2); \ - } \ - if (_x > 0) { \ - op1; \ - CASE4(_x,op2); \ - } \ -} -#define UNROLL2(w, op1, op2) { \ - uint32 _x; \ - for (_x = w; _x >= 2; _x -= 2) { \ - op1; \ - REPEAT2(op2); \ - } \ - if (_x) { \ - op1; \ - op2; \ - } \ -} - -#define SKEW(r,g,b,skew) { r += skew; g += skew; b += skew; } -#define SKEW4(r,g,b,a,skew) { r += skew; g += skew; b += skew; a+= skew; } - -#define A1 (((uint32)0xffL)<<24) -#define PACK(r,g,b) \ - ((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|A1) -#define PACK4(r,g,b,a) \ - ((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|((uint32)(a)<<24)) -#define W2B(v) (((v)>>8)&0xff) -/* TODO: PACKW should have be made redundant in favor of Bitdepth16To8 LUT */ -#define PACKW(r,g,b) \ - ((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|A1) -#define PACKW4(r,g,b,a) \ - ((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|((uint32)W2B(a)<<24)) - -#define DECLAREContigPutFunc(name) \ -static void name(\ - TIFFRGBAImage* img, \ - uint32* cp, \ - uint32 x, uint32 y, \ - uint32 w, uint32 h, \ - int32 fromskew, int32 toskew, \ - unsigned char* pp \ -) - -/* - * 8-bit palette => colormap/RGB - */ -DECLAREContigPutFunc(put8bitcmaptile) -{ - uint32** PALmap = img->PALmap; - int samplesperpixel = img->samplesperpixel; - - (void) y; - for( ; h > 0; --h) { - for (x = w; x > 0; --x) - { - *cp++ = PALmap[*pp][0]; - pp += samplesperpixel; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * 4-bit palette => colormap/RGB - */ -DECLAREContigPutFunc(put4bitcmaptile) -{ - uint32** PALmap = img->PALmap; - - (void) x; (void) y; - fromskew /= 2; - for( ; h > 0; --h) { - uint32* bw; - UNROLL2(w, bw = PALmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 2-bit palette => colormap/RGB - */ -DECLAREContigPutFunc(put2bitcmaptile) -{ - uint32** PALmap = img->PALmap; - - (void) x; (void) y; - fromskew /= 4; - for( ; h > 0; --h) { - uint32* bw; - UNROLL4(w, bw = PALmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 1-bit palette => colormap/RGB - */ -DECLAREContigPutFunc(put1bitcmaptile) -{ - uint32** PALmap = img->PALmap; - - (void) x; (void) y; - fromskew /= 8; - for( ; h > 0; --h) { - uint32* bw; - UNROLL8(w, bw = PALmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit greyscale => colormap/RGB - */ -DECLAREContigPutFunc(putgreytile) -{ - int samplesperpixel = img->samplesperpixel; - uint32** BWmap = img->BWmap; - - (void) y; - for( ; h > 0; --h) { - for (x = w; x > 0; --x) - { - *cp++ = BWmap[*pp][0]; - pp += samplesperpixel; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit greyscale with associated alpha => colormap/RGBA - */ -DECLAREContigPutFunc(putagreytile) -{ - int samplesperpixel = img->samplesperpixel; - uint32** BWmap = img->BWmap; - - (void) y; - for( ; h > 0; --h) { - for (x = w; x > 0; --x) - { - *cp++ = BWmap[*pp][0] & ((uint32)*(pp+1) << 24 | ~A1); - pp += samplesperpixel; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * 16-bit greyscale => colormap/RGB - */ -DECLAREContigPutFunc(put16bitbwtile) -{ - int samplesperpixel = img->samplesperpixel; - uint32** BWmap = img->BWmap; - - (void) y; - for( ; h > 0; --h) { - uint16 *wp = (uint16 *) pp; - - for (x = w; x > 0; --x) - { - /* use high order byte of 16bit value */ - - *cp++ = BWmap[*wp >> 8][0]; - pp += 2 * samplesperpixel; - wp += samplesperpixel; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * 1-bit bilevel => colormap/RGB - */ -DECLAREContigPutFunc(put1bitbwtile) -{ - uint32** BWmap = img->BWmap; - - (void) x; (void) y; - fromskew /= 8; - for( ; h > 0; --h) { - uint32* bw; - UNROLL8(w, bw = BWmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 2-bit greyscale => colormap/RGB - */ -DECLAREContigPutFunc(put2bitbwtile) -{ - uint32** BWmap = img->BWmap; - - (void) x; (void) y; - fromskew /= 4; - for( ; h > 0; --h) { - uint32* bw; - UNROLL4(w, bw = BWmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 4-bit greyscale => colormap/RGB - */ -DECLAREContigPutFunc(put4bitbwtile) -{ - uint32** BWmap = img->BWmap; - - (void) x; (void) y; - fromskew /= 2; - for( ; h > 0; --h) { - uint32* bw; - UNROLL2(w, bw = BWmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit packed samples, no Map => RGB - */ -DECLAREContigPutFunc(putRGBcontig8bittile) -{ - int samplesperpixel = img->samplesperpixel; - - (void) x; (void) y; - fromskew *= samplesperpixel; - for( ; h > 0; --h) { - UNROLL8(w, NOP, - *cp++ = PACK(pp[0], pp[1], pp[2]); - pp += samplesperpixel); - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit packed samples => RGBA w/ associated alpha - * (known to have Map == NULL) - */ -DECLAREContigPutFunc(putRGBAAcontig8bittile) -{ - int samplesperpixel = img->samplesperpixel; - - (void) x; (void) y; - fromskew *= samplesperpixel; - for( ; h > 0; --h) { - UNROLL8(w, NOP, - *cp++ = PACK4(pp[0], pp[1], pp[2], pp[3]); - pp += samplesperpixel); - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit packed samples => RGBA w/ unassociated alpha - * (known to have Map == NULL) - */ -DECLAREContigPutFunc(putRGBUAcontig8bittile) -{ - int samplesperpixel = img->samplesperpixel; - (void) y; - fromskew *= samplesperpixel; - for( ; h > 0; --h) { - uint32 r, g, b, a; - uint8* m; - for (x = w; x > 0; --x) { - a = pp[3]; - m = img->UaToAa+((size_t) a<<8); - r = m[pp[0]]; - g = m[pp[1]]; - b = m[pp[2]]; - *cp++ = PACK4(r,g,b,a); - pp += samplesperpixel; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * 16-bit packed samples => RGB - */ -DECLAREContigPutFunc(putRGBcontig16bittile) -{ - int samplesperpixel = img->samplesperpixel; - uint16 *wp = (uint16 *)pp; - (void) y; - fromskew *= samplesperpixel; - for( ; h > 0; --h) { - for (x = w; x > 0; --x) { - *cp++ = PACK(img->Bitdepth16To8[wp[0]], - img->Bitdepth16To8[wp[1]], - img->Bitdepth16To8[wp[2]]); - wp += samplesperpixel; - } - cp += toskew; - wp += fromskew; - } -} - -/* - * 16-bit packed samples => RGBA w/ associated alpha - * (known to have Map == NULL) - */ -DECLAREContigPutFunc(putRGBAAcontig16bittile) -{ - int samplesperpixel = img->samplesperpixel; - uint16 *wp = (uint16 *)pp; - (void) y; - fromskew *= samplesperpixel; - for( ; h > 0; --h) { - for (x = w; x > 0; --x) { - *cp++ = PACK4(img->Bitdepth16To8[wp[0]], - img->Bitdepth16To8[wp[1]], - img->Bitdepth16To8[wp[2]], - img->Bitdepth16To8[wp[3]]); - wp += samplesperpixel; - } - cp += toskew; - wp += fromskew; - } -} - -/* - * 16-bit packed samples => RGBA w/ unassociated alpha - * (known to have Map == NULL) - */ -DECLAREContigPutFunc(putRGBUAcontig16bittile) -{ - int samplesperpixel = img->samplesperpixel; - uint16 *wp = (uint16 *)pp; - (void) y; - fromskew *= samplesperpixel; - for( ; h > 0; --h) { - uint32 r,g,b,a; - uint8* m; - for (x = w; x > 0; --x) { - a = img->Bitdepth16To8[wp[3]]; - m = img->UaToAa+((size_t) a<<8); - r = m[img->Bitdepth16To8[wp[0]]]; - g = m[img->Bitdepth16To8[wp[1]]]; - b = m[img->Bitdepth16To8[wp[2]]]; - *cp++ = PACK4(r,g,b,a); - wp += samplesperpixel; - } - cp += toskew; - wp += fromskew; - } -} - -/* - * 8-bit packed CMYK samples w/o Map => RGB - * - * NB: The conversion of CMYK->RGB is *very* crude. - */ -DECLAREContigPutFunc(putRGBcontig8bitCMYKtile) -{ - int samplesperpixel = img->samplesperpixel; - uint16 r, g, b, k; - - (void) x; (void) y; - fromskew *= samplesperpixel; - for( ; h > 0; --h) { - UNROLL8(w, NOP, - k = 255 - pp[3]; - r = (k*(255-pp[0]))/255; - g = (k*(255-pp[1]))/255; - b = (k*(255-pp[2]))/255; - *cp++ = PACK(r, g, b); - pp += samplesperpixel); - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit packed CMYK samples w/Map => RGB - * - * NB: The conversion of CMYK->RGB is *very* crude. - */ -DECLAREContigPutFunc(putRGBcontig8bitCMYKMaptile) -{ - int samplesperpixel = img->samplesperpixel; - TIFFRGBValue* Map = img->Map; - uint16 r, g, b, k; - - (void) y; - fromskew *= samplesperpixel; - for( ; h > 0; --h) { - for (x = w; x > 0; --x) { - k = 255 - pp[3]; - r = (k*(255-pp[0]))/255; - g = (k*(255-pp[1]))/255; - b = (k*(255-pp[2]))/255; - *cp++ = PACK(Map[r], Map[g], Map[b]); - pp += samplesperpixel; - } - pp += fromskew; - cp += toskew; - } -} - -#define DECLARESepPutFunc(name) \ -static void name(\ - TIFFRGBAImage* img,\ - uint32* cp,\ - uint32 x, uint32 y, \ - uint32 w, uint32 h,\ - int32 fromskew, int32 toskew,\ - unsigned char* r, unsigned char* g, unsigned char* b, unsigned char* a\ -) - -/* - * 8-bit unpacked samples => RGB - */ -DECLARESepPutFunc(putRGBseparate8bittile) -{ - (void) img; (void) x; (void) y; (void) a; - for( ; h > 0; --h) { - UNROLL8(w, NOP, *cp++ = PACK(*r++, *g++, *b++)); - SKEW(r, g, b, fromskew); - cp += toskew; - } -} - -/* - * 8-bit unpacked samples => RGBA w/ associated alpha - */ -DECLARESepPutFunc(putRGBAAseparate8bittile) -{ - (void) img; (void) x; (void) y; - for( ; h > 0; --h) { - UNROLL8(w, NOP, *cp++ = PACK4(*r++, *g++, *b++, *a++)); - SKEW4(r, g, b, a, fromskew); - cp += toskew; - } -} - -/* - * 8-bit unpacked CMYK samples => RGBA - */ -DECLARESepPutFunc(putCMYKseparate8bittile) -{ - (void) img; (void) y; - for( ; h > 0; --h) { - uint32 rv, gv, bv, kv; - for (x = w; x > 0; --x) { - kv = 255 - *a++; - rv = (kv*(255-*r++))/255; - gv = (kv*(255-*g++))/255; - bv = (kv*(255-*b++))/255; - *cp++ = PACK4(rv,gv,bv,255); - } - SKEW4(r, g, b, a, fromskew); - cp += toskew; - } -} - -/* - * 8-bit unpacked samples => RGBA w/ unassociated alpha - */ -DECLARESepPutFunc(putRGBUAseparate8bittile) -{ - (void) img; (void) y; - for( ; h > 0; --h) { - uint32 rv, gv, bv, av; - uint8* m; - for (x = w; x > 0; --x) { - av = *a++; - m = img->UaToAa+((size_t) av<<8); - rv = m[*r++]; - gv = m[*g++]; - bv = m[*b++]; - *cp++ = PACK4(rv,gv,bv,av); - } - SKEW4(r, g, b, a, fromskew); - cp += toskew; - } -} - -/* - * 16-bit unpacked samples => RGB - */ -DECLARESepPutFunc(putRGBseparate16bittile) -{ - uint16 *wr = (uint16*) r; - uint16 *wg = (uint16*) g; - uint16 *wb = (uint16*) b; - (void) img; (void) y; (void) a; - for( ; h > 0; --h) { - for (x = 0; x < w; x++) - *cp++ = PACK(img->Bitdepth16To8[*wr++], - img->Bitdepth16To8[*wg++], - img->Bitdepth16To8[*wb++]); - SKEW(wr, wg, wb, fromskew); - cp += toskew; - } -} - -/* - * 16-bit unpacked samples => RGBA w/ associated alpha - */ -DECLARESepPutFunc(putRGBAAseparate16bittile) -{ - uint16 *wr = (uint16*) r; - uint16 *wg = (uint16*) g; - uint16 *wb = (uint16*) b; - uint16 *wa = (uint16*) a; - (void) img; (void) y; - for( ; h > 0; --h) { - for (x = 0; x < w; x++) - *cp++ = PACK4(img->Bitdepth16To8[*wr++], - img->Bitdepth16To8[*wg++], - img->Bitdepth16To8[*wb++], - img->Bitdepth16To8[*wa++]); - SKEW4(wr, wg, wb, wa, fromskew); - cp += toskew; - } -} - -/* - * 16-bit unpacked samples => RGBA w/ unassociated alpha - */ -DECLARESepPutFunc(putRGBUAseparate16bittile) -{ - uint16 *wr = (uint16*) r; - uint16 *wg = (uint16*) g; - uint16 *wb = (uint16*) b; - uint16 *wa = (uint16*) a; - (void) img; (void) y; - for( ; h > 0; --h) { - uint32 r2,g2,b2,a2; - uint8* m; - for (x = w; x > 0; --x) { - a2 = img->Bitdepth16To8[*wa++]; - m = img->UaToAa+((size_t) a2<<8); - r2 = m[img->Bitdepth16To8[*wr++]]; - g2 = m[img->Bitdepth16To8[*wg++]]; - b2 = m[img->Bitdepth16To8[*wb++]]; - *cp++ = PACK4(r2,g2,b2,a2); - } - SKEW4(wr, wg, wb, wa, fromskew); - cp += toskew; - } -} - -/* - * 8-bit packed CIE L*a*b 1976 samples => RGB - */ -DECLAREContigPutFunc(putcontig8bitCIELab) -{ - float X, Y, Z; - uint32 r, g, b; - (void) y; - fromskew *= 3; - for( ; h > 0; --h) { - for (x = w; x > 0; --x) { - TIFFCIELabToXYZ(img->cielab, - (unsigned char)pp[0], - (signed char)pp[1], - (signed char)pp[2], - &X, &Y, &Z); - TIFFXYZToRGB(img->cielab, X, Y, Z, &r, &g, &b); - *cp++ = PACK(r, g, b); - pp += 3; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * YCbCr -> RGB conversion and packing routines. - */ - -#define YCbCrtoRGB(dst, Y) { \ - uint32 r, g, b; \ - TIFFYCbCrtoRGB(img->ycbcr, (Y), Cb, Cr, &r, &g, &b); \ - dst = PACK(r, g, b); \ -} - -/* - * 8-bit packed YCbCr samples => RGB - * This function is generic for different sampling sizes, - * and can handle blocks sizes that aren't multiples of the - * sampling size. However, it is substantially less optimized - * than the specific sampling cases. It is used as a fallback - * for difficult blocks. - */ -#ifdef notdef -static void putcontig8bitYCbCrGenericTile( - TIFFRGBAImage* img, - uint32* cp, - uint32 x, uint32 y, - uint32 w, uint32 h, - int32 fromskew, int32 toskew, - unsigned char* pp, - int h_group, - int v_group ) - -{ - uint32* cp1 = cp+w+toskew; - uint32* cp2 = cp1+w+toskew; - uint32* cp3 = cp2+w+toskew; - int32 incr = 3*w+4*toskew; - int32 Cb, Cr; - int group_size = v_group * h_group + 2; - - (void) y; - fromskew = (fromskew * group_size) / h_group; - - for( yy = 0; yy < h; yy++ ) - { - unsigned char *pp_line; - int y_line_group = yy / v_group; - int y_remainder = yy - y_line_group * v_group; - - pp_line = pp + v_line_group * - - - for( xx = 0; xx < w; xx++ ) - { - Cb = pp - } - } - for (; h >= 4; h -= 4) { - x = w>>2; - do { - Cb = pp[16]; - Cr = pp[17]; - - YCbCrtoRGB(cp [0], pp[ 0]); - YCbCrtoRGB(cp [1], pp[ 1]); - YCbCrtoRGB(cp [2], pp[ 2]); - YCbCrtoRGB(cp [3], pp[ 3]); - YCbCrtoRGB(cp1[0], pp[ 4]); - YCbCrtoRGB(cp1[1], pp[ 5]); - YCbCrtoRGB(cp1[2], pp[ 6]); - YCbCrtoRGB(cp1[3], pp[ 7]); - YCbCrtoRGB(cp2[0], pp[ 8]); - YCbCrtoRGB(cp2[1], pp[ 9]); - YCbCrtoRGB(cp2[2], pp[10]); - YCbCrtoRGB(cp2[3], pp[11]); - YCbCrtoRGB(cp3[0], pp[12]); - YCbCrtoRGB(cp3[1], pp[13]); - YCbCrtoRGB(cp3[2], pp[14]); - YCbCrtoRGB(cp3[3], pp[15]); - - cp += 4, cp1 += 4, cp2 += 4, cp3 += 4; - pp += 18; - } while (--x); - cp += incr, cp1 += incr, cp2 += incr, cp3 += incr; - pp += fromskew; - } -} -#endif - -/* - * 8-bit packed YCbCr samples w/ 4,4 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr44tile) -{ - uint32* cp1 = cp+w+toskew; - uint32* cp2 = cp1+w+toskew; - uint32* cp3 = cp2+w+toskew; - int32 incr = 3*w+4*toskew; - - (void) y; - /* adjust fromskew */ - fromskew = (fromskew / 4) * (4*2+2); - if ((h & 3) == 0 && (w & 3) == 0) { - for (; h >= 4; h -= 4) { - x = w>>2; - do { - int32 Cb = pp[16]; - int32 Cr = pp[17]; - - YCbCrtoRGB(cp [0], pp[ 0]); - YCbCrtoRGB(cp [1], pp[ 1]); - YCbCrtoRGB(cp [2], pp[ 2]); - YCbCrtoRGB(cp [3], pp[ 3]); - YCbCrtoRGB(cp1[0], pp[ 4]); - YCbCrtoRGB(cp1[1], pp[ 5]); - YCbCrtoRGB(cp1[2], pp[ 6]); - YCbCrtoRGB(cp1[3], pp[ 7]); - YCbCrtoRGB(cp2[0], pp[ 8]); - YCbCrtoRGB(cp2[1], pp[ 9]); - YCbCrtoRGB(cp2[2], pp[10]); - YCbCrtoRGB(cp2[3], pp[11]); - YCbCrtoRGB(cp3[0], pp[12]); - YCbCrtoRGB(cp3[1], pp[13]); - YCbCrtoRGB(cp3[2], pp[14]); - YCbCrtoRGB(cp3[3], pp[15]); - - cp += 4; - cp1 += 4; - cp2 += 4; - cp3 += 4; - pp += 18; - } while (--x); - cp += incr; - cp1 += incr; - cp2 += incr; - cp3 += incr; - pp += fromskew; - } - } else { - while (h > 0) { - for (x = w; x > 0;) { - int32 Cb = pp[16]; - int32 Cr = pp[17]; - switch (x) { - default: - switch (h) { - default: YCbCrtoRGB(cp3[3], pp[15]); /* FALLTHROUGH */ - case 3: YCbCrtoRGB(cp2[3], pp[11]); /* FALLTHROUGH */ - case 2: YCbCrtoRGB(cp1[3], pp[ 7]); /* FALLTHROUGH */ - case 1: YCbCrtoRGB(cp [3], pp[ 3]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 3: - switch (h) { - default: YCbCrtoRGB(cp3[2], pp[14]); /* FALLTHROUGH */ - case 3: YCbCrtoRGB(cp2[2], pp[10]); /* FALLTHROUGH */ - case 2: YCbCrtoRGB(cp1[2], pp[ 6]); /* FALLTHROUGH */ - case 1: YCbCrtoRGB(cp [2], pp[ 2]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 2: - switch (h) { - default: YCbCrtoRGB(cp3[1], pp[13]); /* FALLTHROUGH */ - case 3: YCbCrtoRGB(cp2[1], pp[ 9]); /* FALLTHROUGH */ - case 2: YCbCrtoRGB(cp1[1], pp[ 5]); /* FALLTHROUGH */ - case 1: YCbCrtoRGB(cp [1], pp[ 1]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 1: - switch (h) { - default: YCbCrtoRGB(cp3[0], pp[12]); /* FALLTHROUGH */ - case 3: YCbCrtoRGB(cp2[0], pp[ 8]); /* FALLTHROUGH */ - case 2: YCbCrtoRGB(cp1[0], pp[ 4]); /* FALLTHROUGH */ - case 1: YCbCrtoRGB(cp [0], pp[ 0]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - } - if (x < 4) { - cp += x; cp1 += x; cp2 += x; cp3 += x; - x = 0; - } - else { - cp += 4; cp1 += 4; cp2 += 4; cp3 += 4; - x -= 4; - } - pp += 18; - } - if (h <= 4) - break; - h -= 4; - cp += incr; - cp1 += incr; - cp2 += incr; - cp3 += incr; - pp += fromskew; - } - } -} - -/* - * 8-bit packed YCbCr samples w/ 4,2 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr42tile) -{ - uint32* cp1 = cp+w+toskew; - int32 incr = 2*toskew+w; - - (void) y; - fromskew = (fromskew / 4) * (4*2+2); - if ((w & 3) == 0 && (h & 1) == 0) { - for (; h >= 2; h -= 2) { - x = w>>2; - do { - int32 Cb = pp[8]; - int32 Cr = pp[9]; - - YCbCrtoRGB(cp [0], pp[0]); - YCbCrtoRGB(cp [1], pp[1]); - YCbCrtoRGB(cp [2], pp[2]); - YCbCrtoRGB(cp [3], pp[3]); - YCbCrtoRGB(cp1[0], pp[4]); - YCbCrtoRGB(cp1[1], pp[5]); - YCbCrtoRGB(cp1[2], pp[6]); - YCbCrtoRGB(cp1[3], pp[7]); - - cp += 4; - cp1 += 4; - pp += 10; - } while (--x); - cp += incr; - cp1 += incr; - pp += fromskew; - } - } else { - while (h > 0) { - for (x = w; x > 0;) { - int32 Cb = pp[8]; - int32 Cr = pp[9]; - switch (x) { - default: - switch (h) { - default: YCbCrtoRGB(cp1[3], pp[ 7]); /* FALLTHROUGH */ - case 1: YCbCrtoRGB(cp [3], pp[ 3]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 3: - switch (h) { - default: YCbCrtoRGB(cp1[2], pp[ 6]); /* FALLTHROUGH */ - case 1: YCbCrtoRGB(cp [2], pp[ 2]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 2: - switch (h) { - default: YCbCrtoRGB(cp1[1], pp[ 5]); /* FALLTHROUGH */ - case 1: YCbCrtoRGB(cp [1], pp[ 1]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 1: - switch (h) { - default: YCbCrtoRGB(cp1[0], pp[ 4]); /* FALLTHROUGH */ - case 1: YCbCrtoRGB(cp [0], pp[ 0]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - } - if (x < 4) { - cp += x; cp1 += x; - x = 0; - } - else { - cp += 4; cp1 += 4; - x -= 4; - } - pp += 10; - } - if (h <= 2) - break; - h -= 2; - cp += incr; - cp1 += incr; - pp += fromskew; - } - } -} - -/* - * 8-bit packed YCbCr samples w/ 4,1 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr41tile) -{ - (void) y; - fromskew = (fromskew / 4) * (4*1+2); - do { - x = w>>2; - while(x>0) { - int32 Cb = pp[4]; - int32 Cr = pp[5]; - - YCbCrtoRGB(cp [0], pp[0]); - YCbCrtoRGB(cp [1], pp[1]); - YCbCrtoRGB(cp [2], pp[2]); - YCbCrtoRGB(cp [3], pp[3]); - - cp += 4; - pp += 6; - x--; - } - - if( (w&3) != 0 ) - { - int32 Cb = pp[4]; - int32 Cr = pp[5]; - - switch( (w&3) ) { - case 3: YCbCrtoRGB(cp [2], pp[2]); /*-fallthrough*/ - case 2: YCbCrtoRGB(cp [1], pp[1]); /*-fallthrough*/ - case 1: YCbCrtoRGB(cp [0], pp[0]); /*-fallthrough*/ - case 0: break; - } - - cp += (w&3); - pp += 6; - } - - cp += toskew; - pp += fromskew; - } while (--h); - -} - -/* - * 8-bit packed YCbCr samples w/ 2,2 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr22tile) -{ - uint32* cp2; - int32 incr = 2*toskew+w; - (void) y; - fromskew = (fromskew / 2) * (2*2+2); - cp2 = cp+w+toskew; - while (h>=2) { - x = w; - while (x>=2) { - uint32 Cb = pp[4]; - uint32 Cr = pp[5]; - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp[1], pp[1]); - YCbCrtoRGB(cp2[0], pp[2]); - YCbCrtoRGB(cp2[1], pp[3]); - cp += 2; - cp2 += 2; - pp += 6; - x -= 2; - } - if (x==1) { - uint32 Cb = pp[4]; - uint32 Cr = pp[5]; - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp2[0], pp[2]); - cp ++ ; - cp2 ++ ; - pp += 6; - } - cp += incr; - cp2 += incr; - pp += fromskew; - h-=2; - } - if (h==1) { - x = w; - while (x>=2) { - uint32 Cb = pp[4]; - uint32 Cr = pp[5]; - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp[1], pp[1]); - cp += 2; - cp2 += 2; - pp += 6; - x -= 2; - } - if (x==1) { - uint32 Cb = pp[4]; - uint32 Cr = pp[5]; - YCbCrtoRGB(cp[0], pp[0]); - } - } -} - -/* - * 8-bit packed YCbCr samples w/ 2,1 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr21tile) -{ - (void) y; - fromskew = (fromskew / 2) * (2*1+2); - do { - x = w>>1; - while(x>0) { - int32 Cb = pp[2]; - int32 Cr = pp[3]; - - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp[1], pp[1]); - - cp += 2; - pp += 4; - x --; - } - - if( (w&1) != 0 ) - { - int32 Cb = pp[2]; - int32 Cr = pp[3]; - - YCbCrtoRGB(cp[0], pp[0]); - - cp += 1; - pp += 4; - } - - cp += toskew; - pp += fromskew; - } while (--h); -} - -/* - * 8-bit packed YCbCr samples w/ 1,2 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr12tile) -{ - uint32* cp2; - int32 incr = 2*toskew+w; - (void) y; - fromskew = (fromskew / 1) * (1 * 2 + 2); - cp2 = cp+w+toskew; - while (h>=2) { - x = w; - do { - uint32 Cb = pp[2]; - uint32 Cr = pp[3]; - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp2[0], pp[1]); - cp ++; - cp2 ++; - pp += 4; - } while (--x); - cp += incr; - cp2 += incr; - pp += fromskew; - h-=2; - } - if (h==1) { - x = w; - do { - uint32 Cb = pp[2]; - uint32 Cr = pp[3]; - YCbCrtoRGB(cp[0], pp[0]); - cp ++; - pp += 4; - } while (--x); - } -} - -/* - * 8-bit packed YCbCr samples w/ no subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr11tile) -{ - (void) y; - fromskew = (fromskew / 1) * (1 * 1 + 2); - do { - x = w; /* was x = w>>1; patched 2000/09/25 warmerda@home.com */ - do { - int32 Cb = pp[1]; - int32 Cr = pp[2]; - - YCbCrtoRGB(*cp++, pp[0]); - - pp += 3; - } while (--x); - cp += toskew; - pp += fromskew; - } while (--h); -} - -/* - * 8-bit packed YCbCr samples w/ no subsampling => RGB - */ -DECLARESepPutFunc(putseparate8bitYCbCr11tile) -{ - (void) y; - (void) a; - /* TODO: naming of input vars is still off, change obfuscating declaration inside define, or resolve obfuscation */ - for( ; h > 0; --h) { - x = w; - do { - uint32 dr, dg, db; - TIFFYCbCrtoRGB(img->ycbcr,*r++,*g++,*b++,&dr,&dg,&db); - *cp++ = PACK(dr,dg,db); - } while (--x); - SKEW(r, g, b, fromskew); - cp += toskew; - } -} -#undef YCbCrtoRGB - -static int isInRefBlackWhiteRange(float f) -{ - return f > (float)(-0x7FFFFFFF + 128) && f < (float)0x7FFFFFFF; -} - -static int -initYCbCrConversion(TIFFRGBAImage* img) -{ - static const char module[] = "initYCbCrConversion"; - - float *luma, *refBlackWhite; - - if (img->ycbcr == NULL) { - img->ycbcr = (TIFFYCbCrToRGB*) _TIFFmalloc( - TIFFroundup_32(sizeof (TIFFYCbCrToRGB), sizeof (long)) - + 4*256*sizeof (TIFFRGBValue) - + 2*256*sizeof (int) - + 3*256*sizeof (int32) - ); - if (img->ycbcr == NULL) { - TIFFErrorExt(img->tif->tif_clientdata, module, - "No space for YCbCr->RGB conversion state"); - return (0); - } - } - - TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma); - TIFFGetFieldDefaulted(img->tif, TIFFTAG_REFERENCEBLACKWHITE, - &refBlackWhite); - - /* Do some validation to avoid later issues. Detect NaN for now */ - /* and also if lumaGreen is zero since we divide by it later */ - if( luma[0] != luma[0] || - luma[1] != luma[1] || - luma[1] == 0.0 || - luma[2] != luma[2] ) - { - TIFFErrorExt(img->tif->tif_clientdata, module, - "Invalid values for YCbCrCoefficients tag"); - return (0); - } - - if( !isInRefBlackWhiteRange(refBlackWhite[0]) || - !isInRefBlackWhiteRange(refBlackWhite[1]) || - !isInRefBlackWhiteRange(refBlackWhite[2]) || - !isInRefBlackWhiteRange(refBlackWhite[3]) || - !isInRefBlackWhiteRange(refBlackWhite[4]) || - !isInRefBlackWhiteRange(refBlackWhite[5]) ) - { - TIFFErrorExt(img->tif->tif_clientdata, module, - "Invalid values for ReferenceBlackWhite tag"); - return (0); - } - - if (TIFFYCbCrToRGBInit(img->ycbcr, luma, refBlackWhite) < 0) - return(0); - return (1); -} - -static tileContigRoutine -initCIELabConversion(TIFFRGBAImage* img) -{ - static const char module[] = "initCIELabConversion"; - - float *whitePoint; - float refWhite[3]; - - TIFFGetFieldDefaulted(img->tif, TIFFTAG_WHITEPOINT, &whitePoint); - if (whitePoint[1] == 0.0f ) { - TIFFErrorExt(img->tif->tif_clientdata, module, - "Invalid value for WhitePoint tag."); - return NULL; - } - - if (!img->cielab) { - img->cielab = (TIFFCIELabToRGB *) - _TIFFmalloc(sizeof(TIFFCIELabToRGB)); - if (!img->cielab) { - TIFFErrorExt(img->tif->tif_clientdata, module, - "No space for CIE L*a*b*->RGB conversion state."); - return NULL; - } - } - - refWhite[1] = 100.0F; - refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1]; - refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1]) - / whitePoint[1] * refWhite[1]; - if (TIFFCIELabToRGBInit(img->cielab, &display_sRGB, refWhite) < 0) { - TIFFErrorExt(img->tif->tif_clientdata, module, - "Failed to initialize CIE L*a*b*->RGB conversion state."); - _TIFFfree(img->cielab); - return NULL; - } - - return putcontig8bitCIELab; -} - -/* - * Greyscale images with less than 8 bits/sample are handled - * with a table to avoid lots of shifts and masks. The table - * is setup so that put*bwtile (below) can retrieve 8/bitspersample - * pixel values simply by indexing into the table with one - * number. - */ -static int -makebwmap(TIFFRGBAImage* img) -{ - TIFFRGBValue* Map = img->Map; - int bitspersample = img->bitspersample; - int nsamples = 8 / bitspersample; - int i; - uint32* p; - - if( nsamples == 0 ) - nsamples = 1; - - img->BWmap = (uint32**) _TIFFmalloc( - 256*sizeof (uint32 *)+(256*nsamples*sizeof(uint32))); - if (img->BWmap == NULL) { - TIFFErrorExt(img->tif->tif_clientdata, TIFFFileName(img->tif), "No space for B&W mapping table"); - return (0); - } - p = (uint32*)(img->BWmap + 256); - for (i = 0; i < 256; i++) { - TIFFRGBValue c; - img->BWmap[i] = p; - switch (bitspersample) { -#define GREY(x) c = Map[x]; *p++ = PACK(c,c,c); - case 1: - GREY(i>>7); - GREY((i>>6)&1); - GREY((i>>5)&1); - GREY((i>>4)&1); - GREY((i>>3)&1); - GREY((i>>2)&1); - GREY((i>>1)&1); - GREY(i&1); - break; - case 2: - GREY(i>>6); - GREY((i>>4)&3); - GREY((i>>2)&3); - GREY(i&3); - break; - case 4: - GREY(i>>4); - GREY(i&0xf); - break; - case 8: - case 16: - GREY(i); - break; - } -#undef GREY - } - return (1); -} - -/* - * Construct a mapping table to convert from the range - * of the data samples to [0,255] --for display. This - * process also handles inverting B&W images when needed. - */ -static int -setupMap(TIFFRGBAImage* img) -{ - int32 x, range; - - range = (int32)((1L<bitspersample)-1); - - /* treat 16 bit the same as eight bit */ - if( img->bitspersample == 16 ) - range = (int32) 255; - - img->Map = (TIFFRGBValue*) _TIFFmalloc((range+1) * sizeof (TIFFRGBValue)); - if (img->Map == NULL) { - TIFFErrorExt(img->tif->tif_clientdata, TIFFFileName(img->tif), - "No space for photometric conversion table"); - return (0); - } - if (img->photometric == PHOTOMETRIC_MINISWHITE) { - for (x = 0; x <= range; x++) - img->Map[x] = (TIFFRGBValue) (((range - x) * 255) / range); - } else { - for (x = 0; x <= range; x++) - img->Map[x] = (TIFFRGBValue) ((x * 255) / range); - } - if (img->bitspersample <= 16 && - (img->photometric == PHOTOMETRIC_MINISBLACK || - img->photometric == PHOTOMETRIC_MINISWHITE)) { - /* - * Use photometric mapping table to construct - * unpacking tables for samples <= 8 bits. - */ - if (!makebwmap(img)) - return (0); - /* no longer need Map, free it */ - _TIFFfree(img->Map); - img->Map = NULL; - } - return (1); -} - -static int -checkcmap(TIFFRGBAImage* img) -{ - uint16* r = img->redcmap; - uint16* g = img->greencmap; - uint16* b = img->bluecmap; - long n = 1L<bitspersample; - - while (n-- > 0) - if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256) - return (16); - return (8); -} - -static void -cvtcmap(TIFFRGBAImage* img) -{ - uint16* r = img->redcmap; - uint16* g = img->greencmap; - uint16* b = img->bluecmap; - long i; - - for (i = (1L<bitspersample)-1; i >= 0; i--) { -#define CVT(x) ((uint16)((x)>>8)) - r[i] = CVT(r[i]); - g[i] = CVT(g[i]); - b[i] = CVT(b[i]); -#undef CVT - } -} - -/* - * Palette images with <= 8 bits/sample are handled - * with a table to avoid lots of shifts and masks. The table - * is setup so that put*cmaptile (below) can retrieve 8/bitspersample - * pixel values simply by indexing into the table with one - * number. - */ -static int -makecmap(TIFFRGBAImage* img) -{ - int bitspersample = img->bitspersample; - int nsamples = 8 / bitspersample; - uint16* r = img->redcmap; - uint16* g = img->greencmap; - uint16* b = img->bluecmap; - uint32 *p; - int i; - - img->PALmap = (uint32**) _TIFFmalloc( - 256*sizeof (uint32 *)+(256*nsamples*sizeof(uint32))); - if (img->PALmap == NULL) { - TIFFErrorExt(img->tif->tif_clientdata, TIFFFileName(img->tif), "No space for Palette mapping table"); - return (0); - } - p = (uint32*)(img->PALmap + 256); - for (i = 0; i < 256; i++) { - TIFFRGBValue c; - img->PALmap[i] = p; -#define CMAP(x) c = (TIFFRGBValue) x; *p++ = PACK(r[c]&0xff, g[c]&0xff, b[c]&0xff); - switch (bitspersample) { - case 1: - CMAP(i>>7); - CMAP((i>>6)&1); - CMAP((i>>5)&1); - CMAP((i>>4)&1); - CMAP((i>>3)&1); - CMAP((i>>2)&1); - CMAP((i>>1)&1); - CMAP(i&1); - break; - case 2: - CMAP(i>>6); - CMAP((i>>4)&3); - CMAP((i>>2)&3); - CMAP(i&3); - break; - case 4: - CMAP(i>>4); - CMAP(i&0xf); - break; - case 8: - CMAP(i); - break; - } -#undef CMAP - } - return (1); -} - -/* - * Construct any mapping table used - * by the associated put routine. - */ -static int -buildMap(TIFFRGBAImage* img) -{ - switch (img->photometric) { - case PHOTOMETRIC_RGB: - case PHOTOMETRIC_YCBCR: - case PHOTOMETRIC_SEPARATED: - if (img->bitspersample == 8) - break; - /* fall through... */ - case PHOTOMETRIC_MINISBLACK: - case PHOTOMETRIC_MINISWHITE: - if (!setupMap(img)) - return (0); - break; - case PHOTOMETRIC_PALETTE: - /* - * Convert 16-bit colormap to 8-bit (unless it looks - * like an old-style 8-bit colormap). - */ - if (checkcmap(img) == 16) - cvtcmap(img); - else - TIFFWarningExt(img->tif->tif_clientdata, TIFFFileName(img->tif), "Assuming 8-bit colormap"); - /* - * Use mapping table and colormap to construct - * unpacking tables for samples < 8 bits. - */ - if (img->bitspersample <= 8 && !makecmap(img)) - return (0); - break; - } - return (1); -} - -/* - * Select the appropriate conversion routine for packed data. - */ -static int -PickContigCase(TIFFRGBAImage* img) -{ - img->get = TIFFIsTiled(img->tif) ? gtTileContig : gtStripContig; - img->put.contig = NULL; - switch (img->photometric) { - case PHOTOMETRIC_RGB: - switch (img->bitspersample) { - case 8: - if (img->alpha == EXTRASAMPLE_ASSOCALPHA && - img->samplesperpixel >= 4) - img->put.contig = putRGBAAcontig8bittile; - else if (img->alpha == EXTRASAMPLE_UNASSALPHA && - img->samplesperpixel >= 4) - { - if (BuildMapUaToAa(img)) - img->put.contig = putRGBUAcontig8bittile; - } - else if( img->samplesperpixel >= 3 ) - img->put.contig = putRGBcontig8bittile; - break; - case 16: - if (img->alpha == EXTRASAMPLE_ASSOCALPHA && - img->samplesperpixel >=4 ) - { - if (BuildMapBitdepth16To8(img)) - img->put.contig = putRGBAAcontig16bittile; - } - else if (img->alpha == EXTRASAMPLE_UNASSALPHA && - img->samplesperpixel >=4 ) - { - if (BuildMapBitdepth16To8(img) && - BuildMapUaToAa(img)) - img->put.contig = putRGBUAcontig16bittile; - } - else if( img->samplesperpixel >=3 ) - { - if (BuildMapBitdepth16To8(img)) - img->put.contig = putRGBcontig16bittile; - } - break; - } - break; - case PHOTOMETRIC_SEPARATED: - if (img->samplesperpixel >=4 && buildMap(img)) { - if (img->bitspersample == 8) { - if (!img->Map) - img->put.contig = putRGBcontig8bitCMYKtile; - else - img->put.contig = putRGBcontig8bitCMYKMaptile; - } - } - break; - case PHOTOMETRIC_PALETTE: - if (buildMap(img)) { - switch (img->bitspersample) { - case 8: - img->put.contig = put8bitcmaptile; - break; - case 4: - img->put.contig = put4bitcmaptile; - break; - case 2: - img->put.contig = put2bitcmaptile; - break; - case 1: - img->put.contig = put1bitcmaptile; - break; - } - } - break; - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - if (buildMap(img)) { - switch (img->bitspersample) { - case 16: - img->put.contig = put16bitbwtile; - break; - case 8: - if (img->alpha && img->samplesperpixel == 2) - img->put.contig = putagreytile; - else - img->put.contig = putgreytile; - break; - case 4: - img->put.contig = put4bitbwtile; - break; - case 2: - img->put.contig = put2bitbwtile; - break; - case 1: - img->put.contig = put1bitbwtile; - break; - } - } - break; - case PHOTOMETRIC_YCBCR: - if ((img->bitspersample==8) && (img->samplesperpixel==3)) - { - if (initYCbCrConversion(img)!=0) - { - /* - * The 6.0 spec says that subsampling must be - * one of 1, 2, or 4, and that vertical subsampling - * must always be <= horizontal subsampling; so - * there are only a few possibilities and we just - * enumerate the cases. - * Joris: added support for the [1,2] case, nonetheless, to accommodate - * some OJPEG files - */ - uint16 SubsamplingHor; - uint16 SubsamplingVer; - TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, &SubsamplingHor, &SubsamplingVer); - switch ((SubsamplingHor<<4)|SubsamplingVer) { - case 0x44: - img->put.contig = putcontig8bitYCbCr44tile; - break; - case 0x42: - img->put.contig = putcontig8bitYCbCr42tile; - break; - case 0x41: - img->put.contig = putcontig8bitYCbCr41tile; - break; - case 0x22: - img->put.contig = putcontig8bitYCbCr22tile; - break; - case 0x21: - img->put.contig = putcontig8bitYCbCr21tile; - break; - case 0x12: - img->put.contig = putcontig8bitYCbCr12tile; - break; - case 0x11: - img->put.contig = putcontig8bitYCbCr11tile; - break; - } - } - } - break; - case PHOTOMETRIC_CIELAB: - if (img->samplesperpixel == 3 && buildMap(img)) { - if (img->bitspersample == 8) - img->put.contig = initCIELabConversion(img); - break; - } - } - return ((img->get!=NULL) && (img->put.contig!=NULL)); -} - -/* - * Select the appropriate conversion routine for unpacked data. - * - * NB: we assume that unpacked single channel data is directed - * to the "packed routines. - */ -static int -PickSeparateCase(TIFFRGBAImage* img) -{ - img->get = TIFFIsTiled(img->tif) ? gtTileSeparate : gtStripSeparate; - img->put.separate = NULL; - switch (img->photometric) { - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - /* greyscale images processed pretty much as RGB by gtTileSeparate */ - case PHOTOMETRIC_RGB: - switch (img->bitspersample) { - case 8: - if (img->alpha == EXTRASAMPLE_ASSOCALPHA) - img->put.separate = putRGBAAseparate8bittile; - else if (img->alpha == EXTRASAMPLE_UNASSALPHA) - { - if (BuildMapUaToAa(img)) - img->put.separate = putRGBUAseparate8bittile; - } - else - img->put.separate = putRGBseparate8bittile; - break; - case 16: - if (img->alpha == EXTRASAMPLE_ASSOCALPHA) - { - if (BuildMapBitdepth16To8(img)) - img->put.separate = putRGBAAseparate16bittile; - } - else if (img->alpha == EXTRASAMPLE_UNASSALPHA) - { - if (BuildMapBitdepth16To8(img) && - BuildMapUaToAa(img)) - img->put.separate = putRGBUAseparate16bittile; - } - else - { - if (BuildMapBitdepth16To8(img)) - img->put.separate = putRGBseparate16bittile; - } - break; - } - break; - case PHOTOMETRIC_SEPARATED: - if (img->bitspersample == 8 && img->samplesperpixel == 4) - { - img->alpha = 1; // Not alpha, but seems like the only way to get 4th band - img->put.separate = putCMYKseparate8bittile; - } - break; - case PHOTOMETRIC_YCBCR: - if ((img->bitspersample==8) && (img->samplesperpixel==3)) - { - if (initYCbCrConversion(img)!=0) - { - uint16 hs, vs; - TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, &hs, &vs); - switch ((hs<<4)|vs) { - case 0x11: - img->put.separate = putseparate8bitYCbCr11tile; - break; - /* TODO: add other cases here */ - } - } - } - break; - } - return ((img->get!=NULL) && (img->put.separate!=NULL)); -} - -static int -BuildMapUaToAa(TIFFRGBAImage* img) -{ - static const char module[]="BuildMapUaToAa"; - uint8* m; - uint16 na,nv; - assert(img->UaToAa==NULL); - img->UaToAa=_TIFFmalloc(65536); - if (img->UaToAa==NULL) - { - TIFFErrorExt(img->tif->tif_clientdata,module,"Out of memory"); - return(0); - } - m=img->UaToAa; - for (na=0; na<256; na++) - { - for (nv=0; nv<256; nv++) - *m++=(uint8)((nv*na+127)/255); - } - return(1); -} - -static int -BuildMapBitdepth16To8(TIFFRGBAImage* img) -{ - static const char module[]="BuildMapBitdepth16To8"; - uint8* m; - uint32 n; - assert(img->Bitdepth16To8==NULL); - img->Bitdepth16To8=_TIFFmalloc(65536); - if (img->Bitdepth16To8==NULL) - { - TIFFErrorExt(img->tif->tif_clientdata,module,"Out of memory"); - return(0); - } - m=img->Bitdepth16To8; - for (n=0; n<65536; n++) - *m++=(uint8)((n+128)/257); - return(1); -} - - -/* - * Read a whole strip off data from the file, and convert to RGBA form. - * If this is the last strip, then it will only contain the portion of - * the strip that is actually within the image space. The result is - * organized in bottom to top form. - */ - - -int -TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster ) - -{ - return TIFFReadRGBAStripExt(tif, row, raster, 0 ); -} - -int -TIFFReadRGBAStripExt(TIFF* tif, uint32 row, uint32 * raster, int stop_on_error) - -{ - char emsg[1024] = ""; - TIFFRGBAImage img; - int ok; - uint32 rowsperstrip, rows_to_read; - - if( TIFFIsTiled( tif ) ) - { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), - "Can't use TIFFReadRGBAStrip() with tiled file."); - return (0); - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - if( (row % rowsperstrip) != 0 ) - { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), - "Row passed to TIFFReadRGBAStrip() must be first in a strip."); - return (0); - } - - if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, stop_on_error, emsg)) { - - img.row_offset = row; - img.col_offset = 0; - - if( row + rowsperstrip > img.height ) - rows_to_read = img.height - row; - else - rows_to_read = rowsperstrip; - - ok = TIFFRGBAImageGet(&img, raster, img.width, rows_to_read ); - - TIFFRGBAImageEnd(&img); - } else { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", emsg); - ok = 0; - } - - return (ok); -} - -/* - * Read a whole tile off data from the file, and convert to RGBA form. - * The returned RGBA data is organized from bottom to top of tile, - * and may include zeroed areas if the tile extends off the image. - */ - -int -TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster) - -{ - return TIFFReadRGBATileExt(tif, col, row, raster, 0 ); -} - - -int -TIFFReadRGBATileExt(TIFF* tif, uint32 col, uint32 row, uint32 * raster, int stop_on_error ) -{ - char emsg[1024] = ""; - TIFFRGBAImage img; - int ok; - uint32 tile_xsize, tile_ysize; - uint32 read_xsize, read_ysize; - uint32 i_row; - - /* - * Verify that our request is legal - on a tile file, and on a - * tile boundary. - */ - - if( !TIFFIsTiled( tif ) ) - { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), - "Can't use TIFFReadRGBATile() with stripped file."); - return (0); - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_TILEWIDTH, &tile_xsize); - TIFFGetFieldDefaulted(tif, TIFFTAG_TILELENGTH, &tile_ysize); - if( (col % tile_xsize) != 0 || (row % tile_ysize) != 0 ) - { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), - "Row/col passed to TIFFReadRGBATile() must be top" - "left corner of a tile."); - return (0); - } - - /* - * Setup the RGBA reader. - */ - - if (!TIFFRGBAImageOK(tif, emsg) - || !TIFFRGBAImageBegin(&img, tif, stop_on_error, emsg)) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", emsg); - return( 0 ); - } - - /* - * The TIFFRGBAImageGet() function doesn't allow us to get off the - * edge of the image, even to fill an otherwise valid tile. So we - * figure out how much we can read, and fix up the tile buffer to - * a full tile configuration afterwards. - */ - - if( row + tile_ysize > img.height ) - read_ysize = img.height - row; - else - read_ysize = tile_ysize; - - if( col + tile_xsize > img.width ) - read_xsize = img.width - col; - else - read_xsize = tile_xsize; - - /* - * Read the chunk of imagery. - */ - - img.row_offset = row; - img.col_offset = col; - - ok = TIFFRGBAImageGet(&img, raster, read_xsize, read_ysize ); - - TIFFRGBAImageEnd(&img); - - /* - * If our read was incomplete we will need to fix up the tile by - * shifting the data around as if a full tile of data is being returned. - * - * This is all the more complicated because the image is organized in - * bottom to top format. - */ - - if( read_xsize == tile_xsize && read_ysize == tile_ysize ) - return( ok ); - - for( i_row = 0; i_row < read_ysize; i_row++ ) { - memmove( raster + (tile_ysize - i_row - 1) * tile_xsize, - raster + (read_ysize - i_row - 1) * read_xsize, - read_xsize * sizeof(uint32) ); - _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize, - 0, sizeof(uint32) * (tile_xsize - read_xsize) ); - } - - for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) { - _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize, - 0, sizeof(uint32) * tile_xsize ); - } - - return (ok); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_jbig.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_jbig.c deleted file mode 100644 index 7a97c60..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_jbig.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * JBIG Compression Algorithm Support. - * Contributed by Lee Howard - * - */ - -#include "tiffiop.h" - -#ifdef JBIG_SUPPORT -#include "jbig.h" - -static int JBIGSetupDecode(TIFF* tif) -{ - if (TIFFNumberOfStrips(tif) != 1) - { - TIFFErrorExt(tif->tif_clientdata, "JBIG", "Multistrip images not supported in decoder"); - return 0; - } - - return 1; -} - -static int JBIGDecode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s) -{ - struct jbg_dec_state decoder; - int decodeStatus = 0; - unsigned char* pImage = NULL; - (void) size, (void) s; - - if (isFillOrder(tif, tif->tif_dir.td_fillorder)) - { - TIFFReverseBits(tif->tif_rawdata, tif->tif_rawdatasize); - } - - jbg_dec_init(&decoder); - -#if defined(HAVE_JBG_NEWLEN) - jbg_newlen(tif->tif_rawdata, (size_t)tif->tif_rawdatasize); - /* - * I do not check the return status of jbg_newlen because even if this - * function fails it does not necessarily mean that decoding the image - * will fail. It is generally only needed for received fax images - * that do not contain the actual length of the image in the BIE - * header. I do not log when an error occurs because that will cause - * problems when converting JBIG encoded TIFF's to - * PostScript. As long as the actual image length is contained in the - * BIE header jbg_dec_in should succeed. - */ -#endif /* HAVE_JBG_NEWLEN */ - - decodeStatus = jbg_dec_in(&decoder, (unsigned char*)tif->tif_rawdata, - (size_t)tif->tif_rawdatasize, NULL); - if (JBG_EOK != decodeStatus) - { - /* - * XXX: JBG_EN constant was defined in pre-2.0 releases of the - * JBIG-KIT. Since the 2.0 the error reporting functions were - * changed. We will handle both cases here. - */ - TIFFErrorExt(tif->tif_clientdata, - "JBIG", "Error (%d) decoding: %s", - decodeStatus, -#if defined(JBG_EN) - jbg_strerror(decodeStatus, JBG_EN) -#else - jbg_strerror(decodeStatus) -#endif - ); - jbg_dec_free(&decoder); - return 0; - } - - pImage = jbg_dec_getimage(&decoder, 0); - _TIFFmemcpy(buffer, pImage, jbg_dec_getsize(&decoder)); - jbg_dec_free(&decoder); - return 1; -} - -static int JBIGSetupEncode(TIFF* tif) -{ - if (TIFFNumberOfStrips(tif) != 1) - { - TIFFErrorExt(tif->tif_clientdata, "JBIG", "Multistrip images not supported in encoder"); - return 0; - } - - return 1; -} - -static int JBIGCopyEncodedData(TIFF* tif, unsigned char* pp, size_t cc, uint16 s) -{ - (void) s; - while (cc > 0) - { - tmsize_t n = (tmsize_t)cc; - - if (tif->tif_rawcc + n > tif->tif_rawdatasize) - { - n = tif->tif_rawdatasize - tif->tif_rawcc; - } - - assert(n > 0); - _TIFFmemcpy(tif->tif_rawcp, pp, n); - tif->tif_rawcp += n; - tif->tif_rawcc += n; - pp += n; - cc -= (size_t)n; - if (tif->tif_rawcc >= tif->tif_rawdatasize && - !TIFFFlushData1(tif)) - { - return (-1); - } - } - - return (1); -} - -static void JBIGOutputBie(unsigned char* buffer, size_t len, void* userData) -{ - TIFF* tif = (TIFF*)userData; - - if (isFillOrder(tif, tif->tif_dir.td_fillorder)) - { - TIFFReverseBits(buffer, (tmsize_t)len); - } - - JBIGCopyEncodedData(tif, buffer, len, 0); -} - -static int JBIGEncode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s) -{ - TIFFDirectory* dir = &tif->tif_dir; - struct jbg_enc_state encoder; - - (void) size, (void) s; - - jbg_enc_init(&encoder, - dir->td_imagewidth, - dir->td_imagelength, - 1, - &buffer, - JBIGOutputBie, - tif); - /* - * jbg_enc_out does the "real" encoding. As data is encoded, - * JBIGOutputBie is called, which writes the data to the directory. - */ - jbg_enc_out(&encoder); - jbg_enc_free(&encoder); - - return 1; -} - -int TIFFInitJBIG(TIFF* tif, int scheme) -{ - assert(scheme == COMPRESSION_JBIG); - - /* - * These flags are set so the JBIG Codec can control when to reverse - * bits and when not to and to allow the jbig decoder and bit reverser - * to write to memory when necessary. - */ - tif->tif_flags |= TIFF_NOBITREV; - tif->tif_flags &= ~TIFF_MAPPED; - - /* Setup the function pointers for encode, decode, and cleanup. */ - tif->tif_setupdecode = JBIGSetupDecode; - tif->tif_decodestrip = JBIGDecode; - - tif->tif_setupencode = JBIGSetupEncode; - tif->tif_encodestrip = JBIGEncode; - - return 1; -} - -#endif /* JBIG_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_jpeg.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_jpeg.c deleted file mode 100644 index 4781a53..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_jpeg.c +++ /dev/null @@ -1,2599 +0,0 @@ -/* - * Copyright (c) 1994-1997 Sam Leffler - * Copyright (c) 1994-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#define WIN32_LEAN_AND_MEAN -#define VC_EXTRALEAN - -#include "tiffiop.h" -#include - -#ifdef JPEG_SUPPORT - -/* - * TIFF Library - * - * JPEG Compression support per TIFF Technical Note #2 - * (*not* per the original TIFF 6.0 spec). - * - * This file is simply an interface to the libjpeg library written by - * the Independent JPEG Group. You need release 5 or later of the IJG - * code, which you can find on the Internet at ftp.uu.net:/graphics/jpeg/. - * - * Contributed by Tom Lane . - */ -#include - -int TIFFFillStrip(TIFF* tif, uint32 strip); -int TIFFFillTile(TIFF* tif, uint32 tile); -int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode ); -int TIFFJPEGIsFullStripRequired_12(TIFF* tif); - -/* We undefine FAR to avoid conflict with JPEG definition */ - -#ifdef FAR -#undef FAR -#endif - -/* - Libjpeg's jmorecfg.h defines INT16 and INT32, but only if XMD_H is - not defined. Unfortunately, the MinGW and Borland compilers include - a typedef for INT32, which causes a conflict. MSVC does not include - a conflicting typedef given the headers which are included. -*/ -#if defined(__BORLANDC__) || defined(__MINGW32__) -# define XMD_H 1 -#endif - -/* - The windows RPCNDR.H file defines boolean, but defines it with the - unsigned char size. You should compile JPEG library using appropriate - definitions in jconfig.h header, but many users compile library in wrong - way. That causes errors of the following type: - - "JPEGLib: JPEG parameter struct mismatch: library thinks size is 432, - caller expects 464" - - For such users we will fix the problem here. See install.doc file from - the JPEG library distribution for details. -*/ - -/* Define "boolean" as unsigned char, not int, per Windows custom. */ -#if defined(__WIN32__) && !defined(__MINGW32__) -# ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ - typedef unsigned char boolean; -# endif -# define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -#endif - -#include "jpeglib.h" -#include "jerror.h" - -/* - * Do we want to do special processing suitable for when JSAMPLE is a - * 16bit value? - */ - -#if defined(JPEG_LIB_MK1) -# define JPEG_LIB_MK1_OR_12BIT 1 -#elif BITS_IN_JSAMPLE == 12 -# define JPEG_LIB_MK1_OR_12BIT 1 -#endif - -/* - * We are using width_in_blocks which is supposed to be private to - * libjpeg. Unfortunately, the libjpeg delivered with Cygwin has - * renamed this member to width_in_data_units. Since the header has - * also renamed a define, use that unique define name in order to - * detect the problem header and adjust to suit. - */ -#if defined(D_MAX_DATA_UNITS_IN_MCU) -#define width_in_blocks width_in_data_units -#endif - -/* - * On some machines it may be worthwhile to use _setjmp or sigsetjmp - * in place of plain setjmp. These macros will make it easier. - */ -#define SETJMP(jbuf) setjmp(jbuf) -#define LONGJMP(jbuf,code) longjmp(jbuf,code) -#define JMP_BUF jmp_buf - -typedef struct jpeg_destination_mgr jpeg_destination_mgr; -typedef struct jpeg_source_mgr jpeg_source_mgr; -typedef struct jpeg_error_mgr jpeg_error_mgr; - -/* - * State block for each open TIFF file using - * libjpeg to do JPEG compression/decompression. - * - * libjpeg's visible state is either a jpeg_compress_struct - * or jpeg_decompress_struct depending on which way we - * are going. comm can be used to refer to the fields - * which are common to both. - * - * NB: cinfo is required to be the first member of JPEGState, - * so we can safely cast JPEGState* -> jpeg_xxx_struct* - * and vice versa! - */ -typedef struct { - union { - struct jpeg_compress_struct c; - struct jpeg_decompress_struct d; - struct jpeg_common_struct comm; - } cinfo; /* NB: must be first */ - int cinfo_initialized; - - jpeg_error_mgr err; /* libjpeg error manager */ - JMP_BUF exit_jmpbuf; /* for catching libjpeg failures */ - - struct jpeg_progress_mgr progress; - /* - * The following two members could be a union, but - * they're small enough that it's not worth the effort. - */ - jpeg_destination_mgr dest; /* data dest for compression */ - jpeg_source_mgr src; /* data source for decompression */ - /* private state */ - TIFF* tif; /* back link needed by some code */ - uint16 photometric; /* copy of PhotometricInterpretation */ - uint16 h_sampling; /* luminance sampling factors */ - uint16 v_sampling; - tmsize_t bytesperline; /* decompressed bytes per scanline */ - /* pointers to intermediate buffers when processing downsampled data */ - JSAMPARRAY ds_buffer[MAX_COMPONENTS]; - int scancount; /* number of "scanlines" accumulated */ - int samplesperclump; - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ - TIFFPrintMethod printdir; /* super-class method */ - TIFFStripMethod defsparent; /* super-class method */ - TIFFTileMethod deftparent; /* super-class method */ - /* pseudo-tag fields */ - void* jpegtables; /* JPEGTables tag value, or NULL */ - uint32 jpegtables_length; /* number of bytes in same */ - int jpegquality; /* Compression quality level */ - int jpegcolormode; /* Auto RGB<=>YCbCr convert? */ - int jpegtablesmode; /* What to put in JPEGTables */ - - int ycbcrsampling_fetched; - int max_allowed_scan_number; -} JPEGState; - -#define JState(tif) ((JPEGState*)(tif)->tif_data) - -static int JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); -static int JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); -static int JPEGEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); -static int JPEGEncodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); -static int JPEGInitializeLibJPEG(TIFF * tif, int decode ); -static int DecodeRowError(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); - -#define FIELD_JPEGTABLES (FIELD_CODEC+0) - -static const TIFFField jpegFields[] = { - { TIFFTAG_JPEGTABLES, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_C32_UINT8, FIELD_JPEGTABLES, FALSE, TRUE, "JPEGTables", NULL }, - { TIFFTAG_JPEGQUALITY, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "", NULL }, - { TIFFTAG_JPEGCOLORMODE, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, FALSE, FALSE, "", NULL }, - { TIFFTAG_JPEGTABLESMODE, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, FALSE, FALSE, "", NULL } -}; - -/* - * libjpeg interface layer. - * - * We use setjmp/longjmp to return control to libtiff - * when a fatal error is encountered within the JPEG - * library. We also direct libjpeg error and warning - * messages through the appropriate libtiff handlers. - */ - -/* - * Error handling routines (these replace corresponding - * IJG routines from jerror.c). These are used for both - * compression and decompression. - */ -static void -TIFFjpeg_error_exit(j_common_ptr cinfo) -{ - JPEGState *sp = (JPEGState *) cinfo; /* NB: cinfo assumed first */ - char buffer[JMSG_LENGTH_MAX]; - - (*cinfo->err->format_message) (cinfo, buffer); - TIFFErrorExt(sp->tif->tif_clientdata, "JPEGLib", "%s", buffer); /* display the error message */ - jpeg_abort(cinfo); /* clean up libjpeg state */ - LONGJMP(sp->exit_jmpbuf, 1); /* return to libtiff caller */ -} - -/* - * This routine is invoked only for warning messages, - * since error_exit does its own thing and trace_level - * is never set > 0. - */ -static void -TIFFjpeg_output_message(j_common_ptr cinfo) -{ - char buffer[JMSG_LENGTH_MAX]; - - (*cinfo->err->format_message) (cinfo, buffer); - TIFFWarningExt(((JPEGState *) cinfo)->tif->tif_clientdata, "JPEGLib", "%s", buffer); -} - -/* Avoid the risk of denial-of-service on crafted JPEGs with an insane */ -/* number of scans. */ -/* See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf */ -static void -TIFFjpeg_progress_monitor(j_common_ptr cinfo) -{ - JPEGState *sp = (JPEGState *) cinfo; /* NB: cinfo assumed first */ - if (cinfo->is_decompressor) - { - const int scan_no = - ((j_decompress_ptr)cinfo)->input_scan_number; - if (scan_no >= sp->max_allowed_scan_number) - { - TIFFErrorExt(((JPEGState *) cinfo)->tif->tif_clientdata, - "TIFFjpeg_progress_monitor", - "Scan number %d exceeds maximum scans (%d). This limit " - "can be raised through the LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER " - "environment variable.", - scan_no, sp->max_allowed_scan_number); - - jpeg_abort(cinfo); /* clean up libjpeg state */ - LONGJMP(sp->exit_jmpbuf, 1); /* return to libtiff caller */ - } - } -} - - -/* - * Interface routines. This layer of routines exists - * primarily to limit side-effects from using setjmp. - * Also, normal/error returns are converted into return - * values per libtiff practice. - */ -#define CALLJPEG(sp, fail, op) (SETJMP((sp)->exit_jmpbuf) ? (fail) : (op)) -#define CALLVJPEG(sp, op) CALLJPEG(sp, 0, ((op),1)) - -static int -TIFFjpeg_create_compress(JPEGState* sp) -{ - /* initialize JPEG error handling */ - sp->cinfo.c.err = jpeg_std_error(&sp->err); - sp->err.error_exit = TIFFjpeg_error_exit; - sp->err.output_message = TIFFjpeg_output_message; - - /* set client_data to avoid UMR warning from tools like Purify */ - sp->cinfo.c.client_data = NULL; - - return CALLVJPEG(sp, jpeg_create_compress(&sp->cinfo.c)); -} - -static int -TIFFjpeg_create_decompress(JPEGState* sp) -{ - /* initialize JPEG error handling */ - sp->cinfo.d.err = jpeg_std_error(&sp->err); - sp->err.error_exit = TIFFjpeg_error_exit; - sp->err.output_message = TIFFjpeg_output_message; - - /* set client_data to avoid UMR warning from tools like Purify */ - sp->cinfo.d.client_data = NULL; - - return CALLVJPEG(sp, jpeg_create_decompress(&sp->cinfo.d)); -} - -static int -TIFFjpeg_set_defaults(JPEGState* sp) -{ - return CALLVJPEG(sp, jpeg_set_defaults(&sp->cinfo.c)); -} - -static int -TIFFjpeg_set_colorspace(JPEGState* sp, J_COLOR_SPACE colorspace) -{ - return CALLVJPEG(sp, jpeg_set_colorspace(&sp->cinfo.c, colorspace)); -} - -static int -TIFFjpeg_set_quality(JPEGState* sp, int quality, boolean force_baseline) -{ - return CALLVJPEG(sp, - jpeg_set_quality(&sp->cinfo.c, quality, force_baseline)); -} - -static int -TIFFjpeg_suppress_tables(JPEGState* sp, boolean suppress) -{ - return CALLVJPEG(sp, jpeg_suppress_tables(&sp->cinfo.c, suppress)); -} - -static int -TIFFjpeg_start_compress(JPEGState* sp, boolean write_all_tables) -{ - return CALLVJPEG(sp, - jpeg_start_compress(&sp->cinfo.c, write_all_tables)); -} - -static int -TIFFjpeg_write_scanlines(JPEGState* sp, JSAMPARRAY scanlines, int num_lines) -{ - return CALLJPEG(sp, -1, (int) jpeg_write_scanlines(&sp->cinfo.c, - scanlines, (JDIMENSION) num_lines)); -} - -static int -TIFFjpeg_write_raw_data(JPEGState* sp, JSAMPIMAGE data, int num_lines) -{ - return CALLJPEG(sp, -1, (int) jpeg_write_raw_data(&sp->cinfo.c, - data, (JDIMENSION) num_lines)); -} - -static int -TIFFjpeg_finish_compress(JPEGState* sp) -{ - return CALLVJPEG(sp, jpeg_finish_compress(&sp->cinfo.c)); -} - -static int -TIFFjpeg_write_tables(JPEGState* sp) -{ - return CALLVJPEG(sp, jpeg_write_tables(&sp->cinfo.c)); -} - -static int -TIFFjpeg_read_header(JPEGState* sp, boolean require_image) -{ - return CALLJPEG(sp, -1, jpeg_read_header(&sp->cinfo.d, require_image)); -} - -static int -TIFFjpeg_has_multiple_scans(JPEGState* sp) -{ - return CALLJPEG(sp, 0, jpeg_has_multiple_scans(&sp->cinfo.d)); -} - -static int -TIFFjpeg_start_decompress(JPEGState* sp) -{ - const char* sz_max_allowed_scan_number; - /* progress monitor */ - sp->cinfo.d.progress = &sp->progress; - sp->progress.progress_monitor = TIFFjpeg_progress_monitor; - sp->max_allowed_scan_number = 100; - sz_max_allowed_scan_number = getenv("LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER"); - if( sz_max_allowed_scan_number ) - sp->max_allowed_scan_number = atoi(sz_max_allowed_scan_number); - - return CALLVJPEG(sp, jpeg_start_decompress(&sp->cinfo.d)); -} - -static int -TIFFjpeg_read_scanlines(JPEGState* sp, JSAMPARRAY scanlines, int max_lines) -{ - return CALLJPEG(sp, -1, (int) jpeg_read_scanlines(&sp->cinfo.d, - scanlines, (JDIMENSION) max_lines)); -} - -static int -TIFFjpeg_read_raw_data(JPEGState* sp, JSAMPIMAGE data, int max_lines) -{ - return CALLJPEG(sp, -1, (int) jpeg_read_raw_data(&sp->cinfo.d, - data, (JDIMENSION) max_lines)); -} - -static int -TIFFjpeg_finish_decompress(JPEGState* sp) -{ - return CALLJPEG(sp, -1, (int) jpeg_finish_decompress(&sp->cinfo.d)); -} - -static int -TIFFjpeg_abort(JPEGState* sp) -{ - return CALLVJPEG(sp, jpeg_abort(&sp->cinfo.comm)); -} - -static int -TIFFjpeg_destroy(JPEGState* sp) -{ - return CALLVJPEG(sp, jpeg_destroy(&sp->cinfo.comm)); -} - -static JSAMPARRAY -TIFFjpeg_alloc_sarray(JPEGState* sp, int pool_id, - JDIMENSION samplesperrow, JDIMENSION numrows) -{ - return CALLJPEG(sp, (JSAMPARRAY) NULL, - (*sp->cinfo.comm.mem->alloc_sarray) - (&sp->cinfo.comm, pool_id, samplesperrow, numrows)); -} - -/* - * JPEG library destination data manager. - * These routines direct compressed data from libjpeg into the - * libtiff output buffer. - */ - -static void -std_init_destination(j_compress_ptr cinfo) -{ - JPEGState* sp = (JPEGState*) cinfo; - TIFF* tif = sp->tif; - - sp->dest.next_output_byte = (JOCTET*) tif->tif_rawdata; - sp->dest.free_in_buffer = (size_t) tif->tif_rawdatasize; -} - -static boolean -std_empty_output_buffer(j_compress_ptr cinfo) -{ - JPEGState* sp = (JPEGState*) cinfo; - TIFF* tif = sp->tif; - - /* the entire buffer has been filled */ - tif->tif_rawcc = tif->tif_rawdatasize; - -#ifdef IPPJ_HUFF - /* - * The Intel IPP performance library does not necessarily fill up - * the whole output buffer on each pass, so only dump out the parts - * that have been filled. - * http://trac.osgeo.org/gdal/wiki/JpegIPP - */ - if ( sp->dest.free_in_buffer >= 0 ) { - tif->tif_rawcc = tif->tif_rawdatasize - sp->dest.free_in_buffer; - } -#endif - - TIFFFlushData1(tif); - sp->dest.next_output_byte = (JOCTET*) tif->tif_rawdata; - sp->dest.free_in_buffer = (size_t) tif->tif_rawdatasize; - - return (TRUE); -} - -static void -std_term_destination(j_compress_ptr cinfo) -{ - JPEGState* sp = (JPEGState*) cinfo; - TIFF* tif = sp->tif; - - tif->tif_rawcp = (uint8*) sp->dest.next_output_byte; - tif->tif_rawcc = - tif->tif_rawdatasize - (tmsize_t) sp->dest.free_in_buffer; - /* NB: libtiff does the final buffer flush */ -} - -static void -TIFFjpeg_data_dest(JPEGState* sp, TIFF* tif) -{ - (void) tif; - sp->cinfo.c.dest = &sp->dest; - sp->dest.init_destination = std_init_destination; - sp->dest.empty_output_buffer = std_empty_output_buffer; - sp->dest.term_destination = std_term_destination; -} - -/* - * Alternate destination manager for outputting to JPEGTables field. - */ - -static void -tables_init_destination(j_compress_ptr cinfo) -{ - JPEGState* sp = (JPEGState*) cinfo; - - /* while building, jpegtables_length is allocated buffer size */ - sp->dest.next_output_byte = (JOCTET*) sp->jpegtables; - sp->dest.free_in_buffer = (size_t) sp->jpegtables_length; -} - -static boolean -tables_empty_output_buffer(j_compress_ptr cinfo) -{ - JPEGState* sp = (JPEGState*) cinfo; - void* newbuf; - - /* the entire buffer has been filled; enlarge it by 1000 bytes */ - newbuf = _TIFFrealloc((void*) sp->jpegtables, - (tmsize_t) (sp->jpegtables_length + 1000)); - if (newbuf == NULL) - ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 100); - sp->dest.next_output_byte = (JOCTET*) newbuf + sp->jpegtables_length; - sp->dest.free_in_buffer = (size_t) 1000; - sp->jpegtables = newbuf; - sp->jpegtables_length += 1000; - return (TRUE); -} - -static void -tables_term_destination(j_compress_ptr cinfo) -{ - JPEGState* sp = (JPEGState*) cinfo; - - /* set tables length to number of bytes actually emitted */ - sp->jpegtables_length -= (uint32) sp->dest.free_in_buffer; -} - -static int -TIFFjpeg_tables_dest(JPEGState* sp, TIFF* tif) -{ - (void) tif; - /* - * Allocate a working buffer for building tables. - * Initial size is 1000 bytes, which is usually adequate. - */ - if (sp->jpegtables) - _TIFFfree(sp->jpegtables); - sp->jpegtables_length = 1000; - sp->jpegtables = (void*) _TIFFmalloc((tmsize_t) sp->jpegtables_length); - if (sp->jpegtables == NULL) { - sp->jpegtables_length = 0; - TIFFErrorExt(sp->tif->tif_clientdata, "TIFFjpeg_tables_dest", "No space for JPEGTables"); - return (0); - } - sp->cinfo.c.dest = &sp->dest; - sp->dest.init_destination = tables_init_destination; - sp->dest.empty_output_buffer = tables_empty_output_buffer; - sp->dest.term_destination = tables_term_destination; - return (1); -} - -/* - * JPEG library source data manager. - * These routines supply compressed data to libjpeg. - */ - -static void -std_init_source(j_decompress_ptr cinfo) -{ - JPEGState* sp = (JPEGState*) cinfo; - TIFF* tif = sp->tif; - - sp->src.next_input_byte = (const JOCTET*) tif->tif_rawdata; - sp->src.bytes_in_buffer = (size_t) tif->tif_rawcc; -} - -static boolean -std_fill_input_buffer(j_decompress_ptr cinfo) -{ - JPEGState* sp = (JPEGState* ) cinfo; - static const JOCTET dummy_EOI[2] = { 0xFF, JPEG_EOI }; - -#ifdef IPPJ_HUFF - /* - * The Intel IPP performance library does not necessarily read the whole - * input buffer in one pass, so it is possible to get here with data - * yet to read. - * - * We just return without doing anything, until the entire buffer has - * been read. - * http://trac.osgeo.org/gdal/wiki/JpegIPP - */ - if( sp->src.bytes_in_buffer > 0 ) { - return (TRUE); - } -#endif - - /* - * Normally the whole strip/tile is read and so we don't need to do - * a fill. In the case of CHUNKY_STRIP_READ_SUPPORT we might not have - * all the data, but the rawdata is refreshed between scanlines and - * we push this into the io machinery in JPEGDecode(). - * http://trac.osgeo.org/gdal/ticket/3894 - */ - - WARNMS(cinfo, JWRN_JPEG_EOF); - /* insert a fake EOI marker */ - sp->src.next_input_byte = dummy_EOI; - sp->src.bytes_in_buffer = 2; - return (TRUE); -} - -static void -std_skip_input_data(j_decompress_ptr cinfo, long num_bytes) -{ - JPEGState* sp = (JPEGState*) cinfo; - - if (num_bytes > 0) { - if ((size_t)num_bytes > sp->src.bytes_in_buffer) { - /* oops, buffer overrun */ - (void) std_fill_input_buffer(cinfo); - } else { - sp->src.next_input_byte += (size_t) num_bytes; - sp->src.bytes_in_buffer -= (size_t) num_bytes; - } - } -} - -static void -std_term_source(j_decompress_ptr cinfo) -{ - /* No work necessary here */ - (void) cinfo; -} - -static void -TIFFjpeg_data_src(JPEGState* sp) -{ - sp->cinfo.d.src = &sp->src; - sp->src.init_source = std_init_source; - sp->src.fill_input_buffer = std_fill_input_buffer; - sp->src.skip_input_data = std_skip_input_data; - sp->src.resync_to_restart = jpeg_resync_to_restart; - sp->src.term_source = std_term_source; - sp->src.bytes_in_buffer = 0; /* for safety */ - sp->src.next_input_byte = NULL; -} - -/* - * Alternate source manager for reading from JPEGTables. - * We can share all the code except for the init routine. - */ - -static void -tables_init_source(j_decompress_ptr cinfo) -{ - JPEGState* sp = (JPEGState*) cinfo; - - sp->src.next_input_byte = (const JOCTET*) sp->jpegtables; - sp->src.bytes_in_buffer = (size_t) sp->jpegtables_length; -} - -static void -TIFFjpeg_tables_src(JPEGState* sp) -{ - TIFFjpeg_data_src(sp); - sp->src.init_source = tables_init_source; -} - -/* - * Allocate downsampled-data buffers needed for downsampled I/O. - * We use values computed in jpeg_start_compress or jpeg_start_decompress. - * We use libjpeg's allocator so that buffers will be released automatically - * when done with strip/tile. - * This is also a handy place to compute samplesperclump, bytesperline. - */ -static int -alloc_downsampled_buffers(TIFF* tif, jpeg_component_info* comp_info, - int num_components) -{ - JPEGState* sp = JState(tif); - int ci; - jpeg_component_info* compptr; - JSAMPARRAY buf; - int samples_per_clump = 0; - - for (ci = 0, compptr = comp_info; ci < num_components; - ci++, compptr++) { - samples_per_clump += compptr->h_samp_factor * - compptr->v_samp_factor; - buf = TIFFjpeg_alloc_sarray(sp, JPOOL_IMAGE, - compptr->width_in_blocks * DCTSIZE, - (JDIMENSION) (compptr->v_samp_factor*DCTSIZE)); - if (buf == NULL) - return (0); - sp->ds_buffer[ci] = buf; - } - sp->samplesperclump = samples_per_clump; - return (1); -} - - -/* - * JPEG Decoding. - */ - -#ifdef CHECK_JPEG_YCBCR_SUBSAMPLING - -#define JPEG_MARKER_SOF0 0xC0 -#define JPEG_MARKER_SOF1 0xC1 -#define JPEG_MARKER_SOF2 0xC2 -#define JPEG_MARKER_SOF9 0xC9 -#define JPEG_MARKER_SOF10 0xCA -#define JPEG_MARKER_DHT 0xC4 -#define JPEG_MARKER_SOI 0xD8 -#define JPEG_MARKER_SOS 0xDA -#define JPEG_MARKER_DQT 0xDB -#define JPEG_MARKER_DRI 0xDD -#define JPEG_MARKER_APP0 0xE0 -#define JPEG_MARKER_COM 0xFE -struct JPEGFixupTagsSubsamplingData -{ - TIFF* tif; - void* buffer; - uint32 buffersize; - uint8* buffercurrentbyte; - uint32 bufferbytesleft; - uint64 fileoffset; - uint64 filebytesleft; - uint8 filepositioned; -}; -static void JPEGFixupTagsSubsampling(TIFF* tif); -static int JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData* data); -static int JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData* data, uint8* result); -static int JPEGFixupTagsSubsamplingReadWord(struct JPEGFixupTagsSubsamplingData* data, uint16* result); -static void JPEGFixupTagsSubsamplingSkip(struct JPEGFixupTagsSubsamplingData* data, uint16 skiplength); - -#endif - -static int -JPEGFixupTags(TIFF* tif) -{ -#ifdef CHECK_JPEG_YCBCR_SUBSAMPLING - JPEGState* sp = JState(tif); - if ((tif->tif_dir.td_photometric==PHOTOMETRIC_YCBCR)&& - (tif->tif_dir.td_planarconfig==PLANARCONFIG_CONTIG)&& - (tif->tif_dir.td_samplesperpixel==3) && - !sp->ycbcrsampling_fetched) - JPEGFixupTagsSubsampling(tif); -#endif - - return(1); -} - -#ifdef CHECK_JPEG_YCBCR_SUBSAMPLING - -static void -JPEGFixupTagsSubsampling(TIFF* tif) -{ - /* - * Some JPEG-in-TIFF produces do not emit the YCBCRSUBSAMPLING values in - * the TIFF tags, but still use non-default (2,2) values within the jpeg - * data stream itself. In order for TIFF applications to work properly - * - for instance to get the strip buffer size right - it is imperative - * that the subsampling be available before we start reading the image - * data normally. This function will attempt to analyze the first strip in - * order to get the sampling values from the jpeg data stream. - * - * Note that JPEGPreDeocode() will produce a fairly loud warning when the - * discovered sampling does not match the default sampling (2,2) or whatever - * was actually in the tiff tags. - * - * See the bug in bugzilla for details: - * - * http://bugzilla.remotesensing.org/show_bug.cgi?id=168 - * - * Frank Warmerdam, July 2002 - * Joris Van Damme, May 2007 - */ - static const char module[] = "JPEGFixupTagsSubsampling"; - struct JPEGFixupTagsSubsamplingData m; - - _TIFFFillStriles( tif ); - - if( tif->tif_dir.td_stripbytecount == NULL - || tif->tif_dir.td_stripoffset == NULL - || tif->tif_dir.td_stripbytecount[0] == 0 ) - { - /* Do not even try to check if the first strip/tile does not - yet exist, as occurs when GDAL has created a new NULL file - for instance. */ - return; - } - - m.tif=tif; - m.buffersize=2048; - m.buffer=_TIFFmalloc(m.buffersize); - if (m.buffer==NULL) - { - TIFFWarningExt(tif->tif_clientdata,module, - "Unable to allocate memory for auto-correcting of subsampling values; auto-correcting skipped"); - return; - } - m.buffercurrentbyte=NULL; - m.bufferbytesleft=0; - m.fileoffset=tif->tif_dir.td_stripoffset[0]; - m.filepositioned=0; - m.filebytesleft=tif->tif_dir.td_stripbytecount[0]; - if (!JPEGFixupTagsSubsamplingSec(&m)) - TIFFWarningExt(tif->tif_clientdata,module, - "Unable to auto-correct subsampling values, likely corrupt JPEG compressed data in first strip/tile; auto-correcting skipped"); - _TIFFfree(m.buffer); -} - -static int -JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData* data) -{ - static const char module[] = "JPEGFixupTagsSubsamplingSec"; - uint8 m; - while (1) - { - while (1) - { - if (!JPEGFixupTagsSubsamplingReadByte(data,&m)) - return(0); - if (m==255) - break; - } - while (1) - { - if (!JPEGFixupTagsSubsamplingReadByte(data,&m)) - return(0); - if (m!=255) - break; - } - switch (m) - { - case JPEG_MARKER_SOI: - /* this type of marker has no data and should be skipped */ - break; - case JPEG_MARKER_COM: - case JPEG_MARKER_APP0: - case JPEG_MARKER_APP0+1: - case JPEG_MARKER_APP0+2: - case JPEG_MARKER_APP0+3: - case JPEG_MARKER_APP0+4: - case JPEG_MARKER_APP0+5: - case JPEG_MARKER_APP0+6: - case JPEG_MARKER_APP0+7: - case JPEG_MARKER_APP0+8: - case JPEG_MARKER_APP0+9: - case JPEG_MARKER_APP0+10: - case JPEG_MARKER_APP0+11: - case JPEG_MARKER_APP0+12: - case JPEG_MARKER_APP0+13: - case JPEG_MARKER_APP0+14: - case JPEG_MARKER_APP0+15: - case JPEG_MARKER_DQT: - case JPEG_MARKER_SOS: - case JPEG_MARKER_DHT: - case JPEG_MARKER_DRI: - /* this type of marker has data, but it has no use to us and should be skipped */ - { - uint16 n; - if (!JPEGFixupTagsSubsamplingReadWord(data,&n)) - return(0); - if (n<2) - return(0); - n-=2; - if (n>0) - JPEGFixupTagsSubsamplingSkip(data,n); - } - break; - case JPEG_MARKER_SOF0: /* Baseline sequential Huffman */ - case JPEG_MARKER_SOF1: /* Extended sequential Huffman */ - case JPEG_MARKER_SOF2: /* Progressive Huffman: normally not allowed by TechNote, but that doesn't hurt supporting it */ - case JPEG_MARKER_SOF9: /* Extended sequential arithmetic */ - case JPEG_MARKER_SOF10: /* Progressive arithmetic: normally not allowed by TechNote, but that doesn't hurt supporting it */ - /* this marker contains the subsampling factors we're scanning for */ - { - uint16 n; - uint16 o; - uint8 p; - uint8 ph,pv; - if (!JPEGFixupTagsSubsamplingReadWord(data,&n)) - return(0); - if (n!=8+data->tif->tif_dir.td_samplesperpixel*3) - return(0); - JPEGFixupTagsSubsamplingSkip(data,7); - if (!JPEGFixupTagsSubsamplingReadByte(data,&p)) - return(0); - ph=(p>>4); - pv=(p&15); - JPEGFixupTagsSubsamplingSkip(data,1); - for (o=1; otif->tif_dir.td_samplesperpixel; o++) - { - JPEGFixupTagsSubsamplingSkip(data,1); - if (!JPEGFixupTagsSubsamplingReadByte(data,&p)) - return(0); - if (p!=0x11) - { - TIFFWarningExt(data->tif->tif_clientdata,module, - "Subsampling values inside JPEG compressed data have no TIFF equivalent, auto-correction of TIFF subsampling values failed"); - return(1); - } - JPEGFixupTagsSubsamplingSkip(data,1); - } - if (((ph!=1)&&(ph!=2)&&(ph!=4))||((pv!=1)&&(pv!=2)&&(pv!=4))) - { - TIFFWarningExt(data->tif->tif_clientdata,module, - "Subsampling values inside JPEG compressed data have no TIFF equivalent, auto-correction of TIFF subsampling values failed"); - return(1); - } - if ((ph!=data->tif->tif_dir.td_ycbcrsubsampling[0])||(pv!=data->tif->tif_dir.td_ycbcrsubsampling[1])) - { - TIFFWarningExt(data->tif->tif_clientdata,module, - "Auto-corrected former TIFF subsampling values [%d,%d] to match subsampling values inside JPEG compressed data [%d,%d]", - (int)data->tif->tif_dir.td_ycbcrsubsampling[0], - (int)data->tif->tif_dir.td_ycbcrsubsampling[1], - (int)ph,(int)pv); - data->tif->tif_dir.td_ycbcrsubsampling[0]=ph; - data->tif->tif_dir.td_ycbcrsubsampling[1]=pv; - } - } - return(1); - default: - return(0); - } - } -} - -static int -JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData* data, uint8* result) -{ - if (data->bufferbytesleft==0) - { - uint32 m; - if (data->filebytesleft==0) - return(0); - if (!data->filepositioned) - { - TIFFSeekFile(data->tif,data->fileoffset,SEEK_SET); - data->filepositioned=1; - } - m=data->buffersize; - if ((uint64)m>data->filebytesleft) - m=(uint32)data->filebytesleft; - assert(m<0x80000000UL); - if (TIFFReadFile(data->tif,data->buffer,(tmsize_t)m)!=(tmsize_t)m) - return(0); - data->buffercurrentbyte=data->buffer; - data->bufferbytesleft=m; - data->fileoffset+=m; - data->filebytesleft-=m; - } - *result=*data->buffercurrentbyte; - data->buffercurrentbyte++; - data->bufferbytesleft--; - return(1); -} - -static int -JPEGFixupTagsSubsamplingReadWord(struct JPEGFixupTagsSubsamplingData* data, uint16* result) -{ - uint8 ma; - uint8 mb; - if (!JPEGFixupTagsSubsamplingReadByte(data,&ma)) - return(0); - if (!JPEGFixupTagsSubsamplingReadByte(data,&mb)) - return(0); - *result=(ma<<8)|mb; - return(1); -} - -static void -JPEGFixupTagsSubsamplingSkip(struct JPEGFixupTagsSubsamplingData* data, uint16 skiplength) -{ - if ((uint32)skiplength<=data->bufferbytesleft) - { - data->buffercurrentbyte+=skiplength; - data->bufferbytesleft-=skiplength; - } - else - { - uint16 m; - m=(uint16)(skiplength-data->bufferbytesleft); - if (m<=data->filebytesleft) - { - data->bufferbytesleft=0; - data->fileoffset+=m; - data->filebytesleft-=m; - data->filepositioned=0; - } - else - { - data->bufferbytesleft=0; - data->filebytesleft=0; - } - } -} - -#endif - - -static int -JPEGSetupDecode(TIFF* tif) -{ - JPEGState* sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - -#if defined(JPEG_DUAL_MODE_8_12) && !defined(TIFFInitJPEG) - if( tif->tif_dir.td_bitspersample == 12 ) - return TIFFReInitJPEG_12( tif, COMPRESSION_JPEG, 0 ); -#endif - - JPEGInitializeLibJPEG( tif, TRUE ); - - assert(sp != NULL); - assert(sp->cinfo.comm.is_decompressor); - - /* Read JPEGTables if it is present */ - if (TIFFFieldSet(tif,FIELD_JPEGTABLES)) { - TIFFjpeg_tables_src(sp); - if(TIFFjpeg_read_header(sp,FALSE) != JPEG_HEADER_TABLES_ONLY) { - TIFFErrorExt(tif->tif_clientdata, "JPEGSetupDecode", "Bogus JPEGTables field"); - return (0); - } - } - - /* Grab parameters that are same for all strips/tiles */ - sp->photometric = td->td_photometric; - switch (sp->photometric) { - case PHOTOMETRIC_YCBCR: - sp->h_sampling = td->td_ycbcrsubsampling[0]; - sp->v_sampling = td->td_ycbcrsubsampling[1]; - break; - default: - /* TIFF 6.0 forbids subsampling of all other color spaces */ - sp->h_sampling = 1; - sp->v_sampling = 1; - break; - } - - /* Set up for reading normal data */ - TIFFjpeg_data_src(sp); - tif->tif_postdecode = _TIFFNoPostDecode; /* override byte swapping */ - return (1); -} - -/* Returns 1 if the full strip should be read, even when doing scanline per */ -/* scanline decoding. This happens when the JPEG stream uses multiple scans. */ -/* Currently only called in CHUNKY_STRIP_READ_SUPPORT mode through */ -/* scanline interface. */ -/* Only reads tif->tif_dir.td_bitspersample, tif->tif_rawdata and */ -/* tif->tif_rawcc members. */ -/* Can be called independently of the usual setup/predecode/decode states */ -int TIFFJPEGIsFullStripRequired(TIFF* tif) -{ - int ret; - JPEGState state; - -#if defined(JPEG_DUAL_MODE_8_12) && !defined(TIFFJPEGIsFullStripRequired) - if( tif->tif_dir.td_bitspersample == 12 ) - return TIFFJPEGIsFullStripRequired_12( tif ); -#endif - - memset(&state, 0, sizeof(JPEGState)); - state.tif = tif; - - TIFFjpeg_create_decompress(&state); - - TIFFjpeg_data_src(&state); - - if (TIFFjpeg_read_header(&state, TRUE) != JPEG_HEADER_OK) - { - TIFFjpeg_destroy(&state); - return (0); - } - ret = TIFFjpeg_has_multiple_scans(&state); - - TIFFjpeg_destroy(&state); - - return ret; -} - -/* - * Set up for decoding a strip or tile. - */ -/*ARGSUSED*/ static int -JPEGPreDecode(TIFF* tif, uint16 s) -{ - JPEGState *sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - static const char module[] = "JPEGPreDecode"; - uint32 segment_width, segment_height; - int downsampled_output; - int ci; - - assert(sp != NULL); - - if (sp->cinfo.comm.is_decompressor == 0) - { - tif->tif_setupdecode( tif ); - } - - assert(sp->cinfo.comm.is_decompressor); - /* - * Reset decoder state from any previous strip/tile, - * in case application didn't read the whole strip. - */ - if (!TIFFjpeg_abort(sp)) - return (0); - /* - * Read the header for this strip/tile. - */ - - if (TIFFjpeg_read_header(sp, TRUE) != JPEG_HEADER_OK) - return (0); - - tif->tif_rawcp = (uint8*) sp->src.next_input_byte; - tif->tif_rawcc = sp->src.bytes_in_buffer; - - /* - * Check image parameters and set decompression parameters. - */ - if (isTiled(tif)) { - segment_width = td->td_tilewidth; - segment_height = td->td_tilelength; - sp->bytesperline = TIFFTileRowSize(tif); - } else { - segment_width = td->td_imagewidth; - segment_height = td->td_imagelength - tif->tif_row; - if (segment_height > td->td_rowsperstrip) - segment_height = td->td_rowsperstrip; - sp->bytesperline = TIFFScanlineSize(tif); - } - if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) { - /* - * For PC 2, scale down the expected strip/tile size - * to match a downsampled component - */ - segment_width = TIFFhowmany_32(segment_width, sp->h_sampling); - segment_height = TIFFhowmany_32(segment_height, sp->v_sampling); - } - if (sp->cinfo.d.image_width < segment_width || - sp->cinfo.d.image_height < segment_height) { - TIFFWarningExt(tif->tif_clientdata, module, - "Improper JPEG strip/tile size, " - "expected %dx%d, got %dx%d", - segment_width, segment_height, - sp->cinfo.d.image_width, - sp->cinfo.d.image_height); - } - if( sp->cinfo.d.image_width == segment_width && - sp->cinfo.d.image_height > segment_height && - tif->tif_row + segment_height == td->td_imagelength && - !isTiled(tif) ) { - /* Some files have a last strip, that should be truncated, */ - /* but their JPEG codestream has still the maximum strip */ - /* height. Warn about this as this is non compliant, but */ - /* we can safely recover from that. */ - TIFFWarningExt(tif->tif_clientdata, module, - "JPEG strip size exceeds expected dimensions," - " expected %dx%d, got %dx%d", - segment_width, segment_height, - sp->cinfo.d.image_width, sp->cinfo.d.image_height); - } - else if (sp->cinfo.d.image_width > segment_width || - sp->cinfo.d.image_height > segment_height) { - /* - * This case could be dangerous, if the strip or tile size has - * been reported as less than the amount of data jpeg will - * return, some potential security issues arise. Catch this - * case and error out. - */ - TIFFErrorExt(tif->tif_clientdata, module, - "JPEG strip/tile size exceeds expected dimensions," - " expected %dx%d, got %dx%d", - segment_width, segment_height, - sp->cinfo.d.image_width, sp->cinfo.d.image_height); - return (0); - } - if (sp->cinfo.d.num_components != - (td->td_planarconfig == PLANARCONFIG_CONTIG ? - td->td_samplesperpixel : 1)) { - TIFFErrorExt(tif->tif_clientdata, module, "Improper JPEG component count"); - return (0); - } -#ifdef JPEG_LIB_MK1 - if (12 != td->td_bitspersample && 8 != td->td_bitspersample) { - TIFFErrorExt(tif->tif_clientdata, module, "Improper JPEG data precision"); - return (0); - } - sp->cinfo.d.data_precision = td->td_bitspersample; - sp->cinfo.d.bits_in_jsample = td->td_bitspersample; -#else - if (sp->cinfo.d.data_precision != td->td_bitspersample) { - TIFFErrorExt(tif->tif_clientdata, module, "Improper JPEG data precision"); - return (0); - } -#endif - - /* In some cases, libjpeg needs to allocate a lot of memory */ - /* http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf */ - if( TIFFjpeg_has_multiple_scans(sp) ) - { - /* In this case libjpeg will need to allocate memory or backing */ - /* store for all coefficients */ - /* See call to jinit_d_coef_controller() from master_selection() */ - /* in libjpeg */ - toff_t nRequiredMemory = (toff_t)sp->cinfo.d.image_width * - sp->cinfo.d.image_height * - sp->cinfo.d.num_components * - ((td->td_bitspersample+7)/8); - /* BLOCK_SMOOTHING_SUPPORTED is generally defined, so we need */ - /* to replicate the logic of jinit_d_coef_controller() */ - if( sp->cinfo.d.progressive_mode ) - nRequiredMemory *= 3; - -#ifndef TIFF_LIBJPEG_LARGEST_MEM_ALLOC -#define TIFF_LIBJPEG_LARGEST_MEM_ALLOC (100 * 1024 * 1024) -#endif - - if( nRequiredMemory > TIFF_LIBJPEG_LARGEST_MEM_ALLOC && - getenv("LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC") == NULL ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Reading this strip would require libjpeg to allocate " - "at least %u bytes. " - "This is disabled since above the %u threshold. " - "You may override this restriction by defining the " - "LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, " - "or recompile libtiff by defining the " - "TIFF_LIBJPEG_LARGEST_MEM_ALLOC macro to a value greater " - "than %u", - (unsigned)nRequiredMemory, - (unsigned)TIFF_LIBJPEG_LARGEST_MEM_ALLOC, - (unsigned)TIFF_LIBJPEG_LARGEST_MEM_ALLOC); - return (0); - } - } - - if (td->td_planarconfig == PLANARCONFIG_CONTIG) { - /* Component 0 should have expected sampling factors */ - if (sp->cinfo.d.comp_info[0].h_samp_factor != sp->h_sampling || - sp->cinfo.d.comp_info[0].v_samp_factor != sp->v_sampling) { - TIFFErrorExt(tif->tif_clientdata, module, - "Improper JPEG sampling factors %d,%d\n" - "Apparently should be %d,%d.", - sp->cinfo.d.comp_info[0].h_samp_factor, - sp->cinfo.d.comp_info[0].v_samp_factor, - sp->h_sampling, sp->v_sampling); - return (0); - } - /* Rest should have sampling factors 1,1 */ - for (ci = 1; ci < sp->cinfo.d.num_components; ci++) { - if (sp->cinfo.d.comp_info[ci].h_samp_factor != 1 || - sp->cinfo.d.comp_info[ci].v_samp_factor != 1) { - TIFFErrorExt(tif->tif_clientdata, module, "Improper JPEG sampling factors"); - return (0); - } - } - } else { - /* PC 2's single component should have sampling factors 1,1 */ - if (sp->cinfo.d.comp_info[0].h_samp_factor != 1 || - sp->cinfo.d.comp_info[0].v_samp_factor != 1) { - TIFFErrorExt(tif->tif_clientdata, module, "Improper JPEG sampling factors"); - return (0); - } - } - downsampled_output = FALSE; - if (td->td_planarconfig == PLANARCONFIG_CONTIG && - sp->photometric == PHOTOMETRIC_YCBCR && - sp->jpegcolormode == JPEGCOLORMODE_RGB) { - /* Convert YCbCr to RGB */ - sp->cinfo.d.jpeg_color_space = JCS_YCbCr; - sp->cinfo.d.out_color_space = JCS_RGB; - } else { - /* Suppress colorspace handling */ - sp->cinfo.d.jpeg_color_space = JCS_UNKNOWN; - sp->cinfo.d.out_color_space = JCS_UNKNOWN; - if (td->td_planarconfig == PLANARCONFIG_CONTIG && - (sp->h_sampling != 1 || sp->v_sampling != 1)) - downsampled_output = TRUE; - /* XXX what about up-sampling? */ - } - if (downsampled_output) { - /* Need to use raw-data interface to libjpeg */ - sp->cinfo.d.raw_data_out = TRUE; -#if JPEG_LIB_VERSION >= 70 - sp->cinfo.d.do_fancy_upsampling = FALSE; -#endif /* JPEG_LIB_VERSION >= 70 */ - tif->tif_decoderow = DecodeRowError; - tif->tif_decodestrip = JPEGDecodeRaw; - tif->tif_decodetile = JPEGDecodeRaw; - } else { - /* Use normal interface to libjpeg */ - sp->cinfo.d.raw_data_out = FALSE; - tif->tif_decoderow = JPEGDecode; - tif->tif_decodestrip = JPEGDecode; - tif->tif_decodetile = JPEGDecode; - } - /* Start JPEG decompressor */ - if (!TIFFjpeg_start_decompress(sp)) - return (0); - /* Allocate downsampled-data buffers if needed */ - if (downsampled_output) { - if (!alloc_downsampled_buffers(tif, sp->cinfo.d.comp_info, - sp->cinfo.d.num_components)) - return (0); - sp->scancount = DCTSIZE; /* mark buffer empty */ - } - return (1); -} - -/* - * Decode a chunk of pixels. - * "Standard" case: returned data is not downsampled. - */ -#if !JPEG_LIB_MK1_OR_12BIT -static int -JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) -{ - JPEGState *sp = JState(tif); - tmsize_t nrows; - (void) s; - - /* - ** Update available information, buffer may have been refilled - ** between decode requests - */ - sp->src.next_input_byte = (const JOCTET*) tif->tif_rawcp; - sp->src.bytes_in_buffer = (size_t) tif->tif_rawcc; - - if( sp->bytesperline == 0 ) - return 0; - - nrows = cc / sp->bytesperline; - if (cc % sp->bytesperline) - TIFFWarningExt(tif->tif_clientdata, tif->tif_name, - "fractional scanline not read"); - - if( nrows > (tmsize_t) sp->cinfo.d.image_height ) - nrows = sp->cinfo.d.image_height; - - /* data is expected to be read in multiples of a scanline */ - if (nrows) - { - do - { - /* - * In the libjpeg6b-9a 8bit case. We read directly into - * the TIFF buffer. - */ - JSAMPROW bufptr = (JSAMPROW)buf; - - if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1) - return (0); - - ++tif->tif_row; - buf += sp->bytesperline; - cc -= sp->bytesperline; - } while (--nrows > 0); - } - - /* Update information on consumed data */ - tif->tif_rawcp = (uint8*) sp->src.next_input_byte; - tif->tif_rawcc = sp->src.bytes_in_buffer; - - /* Close down the decompressor if we've finished the strip or tile. */ - return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height - || TIFFjpeg_finish_decompress(sp); -} -#endif /* !JPEG_LIB_MK1_OR_12BIT */ - -#if JPEG_LIB_MK1_OR_12BIT -/*ARGSUSED*/ static int -JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) -{ - JPEGState *sp = JState(tif); - tmsize_t nrows; - (void) s; - - /* - ** Update available information, buffer may have been refilled - ** between decode requests - */ - sp->src.next_input_byte = (const JOCTET*) tif->tif_rawcp; - sp->src.bytes_in_buffer = (size_t) tif->tif_rawcc; - - if( sp->bytesperline == 0 ) - return 0; - - nrows = cc / sp->bytesperline; - if (cc % sp->bytesperline) - TIFFWarningExt(tif->tif_clientdata, tif->tif_name, - "fractional scanline not read"); - - if( nrows > (tmsize_t) sp->cinfo.d.image_height ) - nrows = sp->cinfo.d.image_height; - - /* data is expected to be read in multiples of a scanline */ - if (nrows) - { - JSAMPROW line_work_buf = NULL; - - /* - * For 6B, only use temporary buffer for 12 bit imagery. - * For Mk1 always use it. - */ - if( sp->cinfo.d.data_precision == 12 ) - { - line_work_buf = (JSAMPROW) - _TIFFmalloc(sizeof(short) * sp->cinfo.d.output_width - * sp->cinfo.d.num_components ); - } - - do - { - if( line_work_buf != NULL ) - { - /* - * In the MK1 case, we always read into a 16bit - * buffer, and then pack down to 12bit or 8bit. - * In 6B case we only read into 16 bit buffer - * for 12bit data, which we need to repack. - */ - if (TIFFjpeg_read_scanlines(sp, &line_work_buf, 1) != 1) - return (0); - - if( sp->cinfo.d.data_precision == 12 ) - { - int value_pairs = (sp->cinfo.d.output_width - * sp->cinfo.d.num_components) / 2; - int iPair; - - for( iPair = 0; iPair < value_pairs; iPair++ ) - { - unsigned char *out_ptr = - ((unsigned char *) buf) + iPair * 3; - JSAMPLE *in_ptr = line_work_buf + iPair * 2; - - out_ptr[0] = (unsigned char)((in_ptr[0] & 0xff0) >> 4); - out_ptr[1] = (unsigned char)(((in_ptr[0] & 0xf) << 4) - | ((in_ptr[1] & 0xf00) >> 8)); - out_ptr[2] = (unsigned char)(((in_ptr[1] & 0xff) >> 0)); - } - } - else if( sp->cinfo.d.data_precision == 8 ) - { - int value_count = (sp->cinfo.d.output_width - * sp->cinfo.d.num_components); - int iValue; - - for( iValue = 0; iValue < value_count; iValue++ ) - { - ((unsigned char *) buf)[iValue] = - line_work_buf[iValue] & 0xff; - } - } - } - - ++tif->tif_row; - buf += sp->bytesperline; - cc -= sp->bytesperline; - } while (--nrows > 0); - - if( line_work_buf != NULL ) - _TIFFfree( line_work_buf ); - } - - /* Update information on consumed data */ - tif->tif_rawcp = (uint8*) sp->src.next_input_byte; - tif->tif_rawcc = sp->src.bytes_in_buffer; - - /* Close down the decompressor if we've finished the strip or tile. */ - return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height - || TIFFjpeg_finish_decompress(sp); -} -#endif /* JPEG_LIB_MK1_OR_12BIT */ - -/*ARGSUSED*/ static int -DecodeRowError(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) - -{ - (void) buf; - (void) cc; - (void) s; - - TIFFErrorExt(tif->tif_clientdata, "TIFFReadScanline", - "scanline oriented access is not supported for downsampled JPEG compressed images, consider enabling TIFF_JPEGCOLORMODE as JPEGCOLORMODE_RGB." ); - return 0; -} - -/* - * Decode a chunk of pixels. - * Returned data is downsampled per sampling factors. - */ -/*ARGSUSED*/ static int -JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) -{ - JPEGState *sp = JState(tif); - tmsize_t nrows; - TIFFDirectory *td = &tif->tif_dir; - (void) s; - - nrows = sp->cinfo.d.image_height; - /* For last strip, limit number of rows to its truncated height */ - /* even if the codestream height is larger (which is not compliant, */ - /* but that we tolerate) */ - if( (uint32)nrows > td->td_imagelength - tif->tif_row && !isTiled(tif) ) - nrows = td->td_imagelength - tif->tif_row; - - /* data is expected to be read in multiples of a scanline */ - if ( nrows != 0 ) { - - /* Cb,Cr both have sampling factors 1, so this is correct */ - JDIMENSION clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width; - int samples_per_clump = sp->samplesperclump; - -#if defined(JPEG_LIB_MK1_OR_12BIT) - unsigned short* tmpbuf = _TIFFmalloc(sizeof(unsigned short) * - sp->cinfo.d.output_width * - sp->cinfo.d.num_components); - if(tmpbuf==NULL) { - TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw", - "Out of memory"); - return 0; - } -#endif - - do { - jpeg_component_info *compptr; - int ci, clumpoffset; - - if( cc < sp->bytesperline ) { - TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw", - "application buffer not large enough for all data."); - return 0; - } - - /* Reload downsampled-data buffer if needed */ - if (sp->scancount >= DCTSIZE) { - int n = sp->cinfo.d.max_v_samp_factor * DCTSIZE; - if (TIFFjpeg_read_raw_data(sp, sp->ds_buffer, n) != n) - return (0); - sp->scancount = 0; - } - /* - * Fastest way to unseparate data is to make one pass - * over the scanline for each row of each component. - */ - clumpoffset = 0; /* first sample in clump */ - for (ci = 0, compptr = sp->cinfo.d.comp_info; - ci < sp->cinfo.d.num_components; - ci++, compptr++) { - int hsamp = compptr->h_samp_factor; - int vsamp = compptr->v_samp_factor; - int ypos; - - for (ypos = 0; ypos < vsamp; ypos++) { - JSAMPLE *inptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos]; - JDIMENSION nclump; -#if defined(JPEG_LIB_MK1_OR_12BIT) - JSAMPLE *outptr = (JSAMPLE*)tmpbuf + clumpoffset; -#else - JSAMPLE *outptr = (JSAMPLE*)buf + clumpoffset; - if (cc < (tmsize_t) (clumpoffset + samples_per_clump*(clumps_per_line-1) + hsamp)) { - TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw", - "application buffer not large enough for all data, possible subsampling issue"); - return 0; - } -#endif - - if (hsamp == 1) { - /* fast path for at least Cb and Cr */ - for (nclump = clumps_per_line; nclump-- > 0; ) { - outptr[0] = *inptr++; - outptr += samples_per_clump; - } - } else { - int xpos; - - /* general case */ - for (nclump = clumps_per_line; nclump-- > 0; ) { - for (xpos = 0; xpos < hsamp; xpos++) - outptr[xpos] = *inptr++; - outptr += samples_per_clump; - } - } - clumpoffset += hsamp; - } - } - -#if defined(JPEG_LIB_MK1_OR_12BIT) - { - if (sp->cinfo.d.data_precision == 8) - { - int i=0; - int len = sp->cinfo.d.output_width * sp->cinfo.d.num_components; - for (i=0; icinfo.d.output_width - * sp->cinfo.d.num_components) / 2; - int iPair; - for( iPair = 0; iPair < value_pairs; iPair++ ) - { - unsigned char *out_ptr = ((unsigned char *) buf) + iPair * 3; - JSAMPLE *in_ptr = (JSAMPLE *) (tmpbuf + iPair * 2); - out_ptr[0] = (unsigned char)((in_ptr[0] & 0xff0) >> 4); - out_ptr[1] = (unsigned char)(((in_ptr[0] & 0xf) << 4) - | ((in_ptr[1] & 0xf00) >> 8)); - out_ptr[2] = (unsigned char)(((in_ptr[1] & 0xff) >> 0)); - } - } - } -#endif - - sp->scancount ++; - tif->tif_row += sp->v_sampling; - - buf += sp->bytesperline; - cc -= sp->bytesperline; - - nrows -= sp->v_sampling; - } while (nrows > 0); - -#if defined(JPEG_LIB_MK1_OR_12BIT) - _TIFFfree(tmpbuf); -#endif - - } - - /* Close down the decompressor if done. */ - return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height - || TIFFjpeg_finish_decompress(sp); -} - - -/* - * JPEG Encoding. - */ - -static void -unsuppress_quant_table (JPEGState* sp, int tblno) -{ - JQUANT_TBL* qtbl; - - if ((qtbl = sp->cinfo.c.quant_tbl_ptrs[tblno]) != NULL) - qtbl->sent_table = FALSE; -} - -static void -suppress_quant_table (JPEGState* sp, int tblno) -{ - JQUANT_TBL* qtbl; - - if ((qtbl = sp->cinfo.c.quant_tbl_ptrs[tblno]) != NULL) - qtbl->sent_table = TRUE; -} - -static void -unsuppress_huff_table (JPEGState* sp, int tblno) -{ - JHUFF_TBL* htbl; - - if ((htbl = sp->cinfo.c.dc_huff_tbl_ptrs[tblno]) != NULL) - htbl->sent_table = FALSE; - if ((htbl = sp->cinfo.c.ac_huff_tbl_ptrs[tblno]) != NULL) - htbl->sent_table = FALSE; -} - -static void -suppress_huff_table (JPEGState* sp, int tblno) -{ - JHUFF_TBL* htbl; - - if ((htbl = sp->cinfo.c.dc_huff_tbl_ptrs[tblno]) != NULL) - htbl->sent_table = TRUE; - if ((htbl = sp->cinfo.c.ac_huff_tbl_ptrs[tblno]) != NULL) - htbl->sent_table = TRUE; -} - -static int -prepare_JPEGTables(TIFF* tif) -{ - JPEGState* sp = JState(tif); - - /* Initialize quant tables for current quality setting */ - if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE)) - return (0); - /* Mark only the tables we want for output */ - /* NB: chrominance tables are currently used only with YCbCr */ - if (!TIFFjpeg_suppress_tables(sp, TRUE)) - return (0); - if (sp->jpegtablesmode & JPEGTABLESMODE_QUANT) { - unsuppress_quant_table(sp, 0); - if (sp->photometric == PHOTOMETRIC_YCBCR) - unsuppress_quant_table(sp, 1); - } - if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF) { - unsuppress_huff_table(sp, 0); - if (sp->photometric == PHOTOMETRIC_YCBCR) - unsuppress_huff_table(sp, 1); - } - /* Direct libjpeg output into jpegtables */ - if (!TIFFjpeg_tables_dest(sp, tif)) - return (0); - /* Emit tables-only datastream */ - if (!TIFFjpeg_write_tables(sp)) - return (0); - - return (1); -} - -static int -JPEGSetupEncode(TIFF* tif) -{ - JPEGState* sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - static const char module[] = "JPEGSetupEncode"; - -#if defined(JPEG_DUAL_MODE_8_12) && !defined(TIFFInitJPEG) - if( tif->tif_dir.td_bitspersample == 12 ) - return TIFFReInitJPEG_12( tif, COMPRESSION_JPEG, 1 ); -#endif - - JPEGInitializeLibJPEG( tif, FALSE ); - - assert(sp != NULL); - assert(!sp->cinfo.comm.is_decompressor); - - sp->photometric = td->td_photometric; - - /* - * Initialize all JPEG parameters to default values. - * Note that jpeg_set_defaults needs legal values for - * in_color_space and input_components. - */ - if (td->td_planarconfig == PLANARCONFIG_CONTIG) { - sp->cinfo.c.input_components = td->td_samplesperpixel; - if (sp->photometric == PHOTOMETRIC_YCBCR) { - if (sp->jpegcolormode == JPEGCOLORMODE_RGB) { - sp->cinfo.c.in_color_space = JCS_RGB; - } else { - sp->cinfo.c.in_color_space = JCS_YCbCr; - } - } else { - if ((td->td_photometric == PHOTOMETRIC_MINISWHITE || td->td_photometric == PHOTOMETRIC_MINISBLACK) && td->td_samplesperpixel == 1) - sp->cinfo.c.in_color_space = JCS_GRAYSCALE; - else if (td->td_photometric == PHOTOMETRIC_RGB && td->td_samplesperpixel == 3) - sp->cinfo.c.in_color_space = JCS_RGB; - else if (td->td_photometric == PHOTOMETRIC_SEPARATED && td->td_samplesperpixel == 4) - sp->cinfo.c.in_color_space = JCS_CMYK; - else - sp->cinfo.c.in_color_space = JCS_UNKNOWN; - } - } else { - sp->cinfo.c.input_components = 1; - sp->cinfo.c.in_color_space = JCS_UNKNOWN; - } - if (!TIFFjpeg_set_defaults(sp)) - return (0); - /* Set per-file parameters */ - switch (sp->photometric) { - case PHOTOMETRIC_YCBCR: - sp->h_sampling = td->td_ycbcrsubsampling[0]; - sp->v_sampling = td->td_ycbcrsubsampling[1]; - if( sp->h_sampling == 0 || sp->v_sampling == 0 ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Invalig horizontal/vertical sampling value"); - return (0); - } - if( td->td_bitspersample > 16 ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "BitsPerSample %d not allowed for JPEG", - td->td_bitspersample); - return (0); - } - - /* - * A ReferenceBlackWhite field *must* be present since the - * default value is inappropriate for YCbCr. Fill in the - * proper value if application didn't set it. - */ - { - float *ref; - if (!TIFFGetField(tif, TIFFTAG_REFERENCEBLACKWHITE, - &ref)) { - float refbw[6]; - long top = 1L << td->td_bitspersample; - refbw[0] = 0; - refbw[1] = (float)(top-1L); - refbw[2] = (float)(top>>1); - refbw[3] = refbw[1]; - refbw[4] = refbw[2]; - refbw[5] = refbw[1]; - TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, - refbw); - } - } - break; - case PHOTOMETRIC_PALETTE: /* disallowed by Tech Note */ - case PHOTOMETRIC_MASK: - TIFFErrorExt(tif->tif_clientdata, module, - "PhotometricInterpretation %d not allowed for JPEG", - (int) sp->photometric); - return (0); - default: - /* TIFF 6.0 forbids subsampling of all other color spaces */ - sp->h_sampling = 1; - sp->v_sampling = 1; - break; - } - - /* Verify miscellaneous parameters */ - - /* - * This would need work if libtiff ever supports different - * depths for different components, or if libjpeg ever supports - * run-time selection of depth. Neither is imminent. - */ -#ifdef JPEG_LIB_MK1 - /* BITS_IN_JSAMPLE now permits 8 and 12 --- dgilbert */ - if (td->td_bitspersample != 8 && td->td_bitspersample != 12) -#else - if (td->td_bitspersample != BITS_IN_JSAMPLE ) -#endif - { - TIFFErrorExt(tif->tif_clientdata, module, "BitsPerSample %d not allowed for JPEG", - (int) td->td_bitspersample); - return (0); - } - sp->cinfo.c.data_precision = td->td_bitspersample; -#ifdef JPEG_LIB_MK1 - sp->cinfo.c.bits_in_jsample = td->td_bitspersample; -#endif - if (isTiled(tif)) { - if ((td->td_tilelength % (sp->v_sampling * DCTSIZE)) != 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "JPEG tile height must be multiple of %d", - sp->v_sampling * DCTSIZE); - return (0); - } - if ((td->td_tilewidth % (sp->h_sampling * DCTSIZE)) != 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "JPEG tile width must be multiple of %d", - sp->h_sampling * DCTSIZE); - return (0); - } - } else { - if (td->td_rowsperstrip < td->td_imagelength && - (td->td_rowsperstrip % (sp->v_sampling * DCTSIZE)) != 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "RowsPerStrip must be multiple of %d for JPEG", - sp->v_sampling * DCTSIZE); - return (0); - } - } - - /* Create a JPEGTables field if appropriate */ - if (sp->jpegtablesmode & (JPEGTABLESMODE_QUANT|JPEGTABLESMODE_HUFF)) { - if( sp->jpegtables == NULL - || memcmp(sp->jpegtables,"\0\0\0\0\0\0\0\0\0",8) == 0 ) - { - if (!prepare_JPEGTables(tif)) - return (0); - /* Mark the field present */ - /* Can't use TIFFSetField since BEENWRITING is already set! */ - tif->tif_flags |= TIFF_DIRTYDIRECT; - TIFFSetFieldBit(tif, FIELD_JPEGTABLES); - } - } else { - /* We do not support application-supplied JPEGTables, */ - /* so mark the field not present */ - TIFFClrFieldBit(tif, FIELD_JPEGTABLES); - } - - /* Direct libjpeg output to libtiff's output buffer */ - TIFFjpeg_data_dest(sp, tif); - - return (1); -} - -/* - * Set encoding state at the start of a strip or tile. - */ -static int -JPEGPreEncode(TIFF* tif, uint16 s) -{ - JPEGState *sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - static const char module[] = "JPEGPreEncode"; - uint32 segment_width, segment_height; - int downsampled_input; - - assert(sp != NULL); - - if (sp->cinfo.comm.is_decompressor == 1) - { - tif->tif_setupencode( tif ); - } - - assert(!sp->cinfo.comm.is_decompressor); - /* - * Set encoding parameters for this strip/tile. - */ - if (isTiled(tif)) { - segment_width = td->td_tilewidth; - segment_height = td->td_tilelength; - sp->bytesperline = TIFFTileRowSize(tif); - } else { - segment_width = td->td_imagewidth; - segment_height = td->td_imagelength - tif->tif_row; - if (segment_height > td->td_rowsperstrip) - segment_height = td->td_rowsperstrip; - sp->bytesperline = TIFFScanlineSize(tif); - } - if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) { - /* for PC 2, scale down the strip/tile size - * to match a downsampled component - */ - segment_width = TIFFhowmany_32(segment_width, sp->h_sampling); - segment_height = TIFFhowmany_32(segment_height, sp->v_sampling); - } - if (segment_width > 65535 || segment_height > 65535) { - TIFFErrorExt(tif->tif_clientdata, module, "Strip/tile too large for JPEG"); - return (0); - } - sp->cinfo.c.image_width = segment_width; - sp->cinfo.c.image_height = segment_height; - downsampled_input = FALSE; - if (td->td_planarconfig == PLANARCONFIG_CONTIG) { - sp->cinfo.c.input_components = td->td_samplesperpixel; - if (sp->photometric == PHOTOMETRIC_YCBCR) { - if (sp->jpegcolormode != JPEGCOLORMODE_RGB) { - if (sp->h_sampling != 1 || sp->v_sampling != 1) - downsampled_input = TRUE; - } - if (!TIFFjpeg_set_colorspace(sp, JCS_YCbCr)) - return (0); - /* - * Set Y sampling factors; - * we assume jpeg_set_colorspace() set the rest to 1 - */ - sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling; - sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling; - } else { - if (!TIFFjpeg_set_colorspace(sp, sp->cinfo.c.in_color_space)) - return (0); - /* jpeg_set_colorspace set all sampling factors to 1 */ - } - } else { - if (!TIFFjpeg_set_colorspace(sp, JCS_UNKNOWN)) - return (0); - sp->cinfo.c.comp_info[0].component_id = s; - /* jpeg_set_colorspace() set sampling factors to 1 */ - if (sp->photometric == PHOTOMETRIC_YCBCR && s > 0) { - sp->cinfo.c.comp_info[0].quant_tbl_no = 1; - sp->cinfo.c.comp_info[0].dc_tbl_no = 1; - sp->cinfo.c.comp_info[0].ac_tbl_no = 1; - } - } - /* ensure libjpeg won't write any extraneous markers */ - sp->cinfo.c.write_JFIF_header = FALSE; - sp->cinfo.c.write_Adobe_marker = FALSE; - /* set up table handling correctly */ - /* calling TIFFjpeg_set_quality() causes quantization tables to be flagged */ - /* as being to be emitted, which we don't want in the JPEGTABLESMODE_QUANT */ - /* mode, so we must manually suppress them. However TIFFjpeg_set_quality() */ - /* should really be called when dealing with files with directories with */ - /* mixed qualities. see http://trac.osgeo.org/gdal/ticket/3539 */ - if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE)) - return (0); - if (sp->jpegtablesmode & JPEGTABLESMODE_QUANT) { - suppress_quant_table(sp, 0); - suppress_quant_table(sp, 1); - } - else { - unsuppress_quant_table(sp, 0); - unsuppress_quant_table(sp, 1); - } - if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF) - { - /* Explicit suppression is only needed if we did not go through the */ - /* prepare_JPEGTables() code path, which may be the case if updating */ - /* an existing file */ - suppress_huff_table(sp, 0); - suppress_huff_table(sp, 1); - sp->cinfo.c.optimize_coding = FALSE; - } - else - sp->cinfo.c.optimize_coding = TRUE; - if (downsampled_input) { - /* Need to use raw-data interface to libjpeg */ - sp->cinfo.c.raw_data_in = TRUE; - tif->tif_encoderow = JPEGEncodeRaw; - tif->tif_encodestrip = JPEGEncodeRaw; - tif->tif_encodetile = JPEGEncodeRaw; - } else { - /* Use normal interface to libjpeg */ - sp->cinfo.c.raw_data_in = FALSE; - tif->tif_encoderow = JPEGEncode; - tif->tif_encodestrip = JPEGEncode; - tif->tif_encodetile = JPEGEncode; - } - /* Start JPEG compressor */ - if (!TIFFjpeg_start_compress(sp, FALSE)) - return (0); - /* Allocate downsampled-data buffers if needed */ - if (downsampled_input) { - if (!alloc_downsampled_buffers(tif, sp->cinfo.c.comp_info, - sp->cinfo.c.num_components)) - return (0); - } - sp->scancount = 0; - - return (1); -} - -/* - * Encode a chunk of pixels. - * "Standard" case: incoming data is not downsampled. - */ -static int -JPEGEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) -{ - JPEGState *sp = JState(tif); - tmsize_t nrows; - JSAMPROW bufptr[1]; - short *line16 = NULL; - int line16_count = 0; - - (void) s; - assert(sp != NULL); - /* data is expected to be supplied in multiples of a scanline */ - nrows = cc / sp->bytesperline; - if (cc % sp->bytesperline) - TIFFWarningExt(tif->tif_clientdata, tif->tif_name, - "fractional scanline discarded"); - - /* The last strip will be limited to image size */ - if( !isTiled(tif) && tif->tif_row+nrows > tif->tif_dir.td_imagelength ) - nrows = tif->tif_dir.td_imagelength - tif->tif_row; - - if( sp->cinfo.c.data_precision == 12 ) - { - line16_count = (int)((sp->bytesperline * 2) / 3); - line16 = (short *) _TIFFmalloc(sizeof(short) * line16_count); - if (!line16) - { - TIFFErrorExt(tif->tif_clientdata, - "JPEGEncode", - "Failed to allocate memory"); - - return 0; - } - } - - while (nrows-- > 0) { - - if( sp->cinfo.c.data_precision == 12 ) - { - - int value_pairs = line16_count / 2; - int iPair; - - bufptr[0] = (JSAMPROW) line16; - - for( iPair = 0; iPair < value_pairs; iPair++ ) - { - unsigned char *in_ptr = - ((unsigned char *) buf) + iPair * 3; - JSAMPLE *out_ptr = (JSAMPLE *) (line16 + iPair * 2); - - out_ptr[0] = (in_ptr[0] << 4) | ((in_ptr[1] & 0xf0) >> 4); - out_ptr[1] = ((in_ptr[1] & 0x0f) << 8) | in_ptr[2]; - } - } - else - { - bufptr[0] = (JSAMPROW) buf; - } - if (TIFFjpeg_write_scanlines(sp, bufptr, 1) != 1) - return (0); - if (nrows > 0) - tif->tif_row++; - buf += sp->bytesperline; - } - - if( sp->cinfo.c.data_precision == 12 ) - { - _TIFFfree( line16 ); - } - - return (1); -} - -/* - * Encode a chunk of pixels. - * Incoming data is expected to be downsampled per sampling factors. - */ -static int -JPEGEncodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) -{ - JPEGState *sp = JState(tif); - JSAMPLE* inptr; - JSAMPLE* outptr; - tmsize_t nrows; - JDIMENSION clumps_per_line, nclump; - int clumpoffset, ci, xpos, ypos; - jpeg_component_info* compptr; - int samples_per_clump = sp->samplesperclump; - tmsize_t bytesperclumpline; - - (void) s; - assert(sp != NULL); - /* data is expected to be supplied in multiples of a clumpline */ - /* a clumpline is equivalent to v_sampling desubsampled scanlines */ - /* TODO: the following calculation of bytesperclumpline, should substitute calculation of sp->bytesperline, except that it is per v_sampling lines */ - bytesperclumpline = (((sp->cinfo.c.image_width+sp->h_sampling-1)/sp->h_sampling) - *(sp->h_sampling*sp->v_sampling+2)*sp->cinfo.c.data_precision+7) - /8; - - nrows = ( cc / bytesperclumpline ) * sp->v_sampling; - if (cc % bytesperclumpline) - TIFFWarningExt(tif->tif_clientdata, tif->tif_name, "fractional scanline discarded"); - - /* Cb,Cr both have sampling factors 1, so this is correct */ - clumps_per_line = sp->cinfo.c.comp_info[1].downsampled_width; - - while (nrows > 0) { - /* - * Fastest way to separate the data is to make one pass - * over the scanline for each row of each component. - */ - clumpoffset = 0; /* first sample in clump */ - for (ci = 0, compptr = sp->cinfo.c.comp_info; - ci < sp->cinfo.c.num_components; - ci++, compptr++) { - int hsamp = compptr->h_samp_factor; - int vsamp = compptr->v_samp_factor; - int padding = (int) (compptr->width_in_blocks * DCTSIZE - - clumps_per_line * hsamp); - for (ypos = 0; ypos < vsamp; ypos++) { - inptr = ((JSAMPLE*) buf) + clumpoffset; - outptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos]; - if (hsamp == 1) { - /* fast path for at least Cb and Cr */ - for (nclump = clumps_per_line; nclump-- > 0; ) { - *outptr++ = inptr[0]; - inptr += samples_per_clump; - } - } else { - /* general case */ - for (nclump = clumps_per_line; nclump-- > 0; ) { - for (xpos = 0; xpos < hsamp; xpos++) - *outptr++ = inptr[xpos]; - inptr += samples_per_clump; - } - } - /* pad each scanline as needed */ - for (xpos = 0; xpos < padding; xpos++) { - *outptr = outptr[-1]; - outptr++; - } - clumpoffset += hsamp; - } - } - sp->scancount++; - if (sp->scancount >= DCTSIZE) { - int n = sp->cinfo.c.max_v_samp_factor * DCTSIZE; - if (TIFFjpeg_write_raw_data(sp, sp->ds_buffer, n) != n) - return (0); - sp->scancount = 0; - } - tif->tif_row += sp->v_sampling; - buf += bytesperclumpline; - nrows -= sp->v_sampling; - } - return (1); -} - -/* - * Finish up at the end of a strip or tile. - */ -static int -JPEGPostEncode(TIFF* tif) -{ - JPEGState *sp = JState(tif); - - if (sp->scancount > 0) { - /* - * Need to emit a partial bufferload of downsampled data. - * Pad the data vertically. - */ - int ci, ypos, n; - jpeg_component_info* compptr; - - for (ci = 0, compptr = sp->cinfo.c.comp_info; - ci < sp->cinfo.c.num_components; - ci++, compptr++) { - int vsamp = compptr->v_samp_factor; - tmsize_t row_width = compptr->width_in_blocks * DCTSIZE - * sizeof(JSAMPLE); - for (ypos = sp->scancount * vsamp; - ypos < DCTSIZE * vsamp; ypos++) { - _TIFFmemcpy((void*)sp->ds_buffer[ci][ypos], - (void*)sp->ds_buffer[ci][ypos-1], - row_width); - - } - } - n = sp->cinfo.c.max_v_samp_factor * DCTSIZE; - if (TIFFjpeg_write_raw_data(sp, sp->ds_buffer, n) != n) - return (0); - } - - return (TIFFjpeg_finish_compress(JState(tif))); -} - -static void -JPEGCleanup(TIFF* tif) -{ - JPEGState *sp = JState(tif); - - assert(sp != 0); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - tif->tif_tagmethods.printdir = sp->printdir; - if( sp->cinfo_initialized ) - TIFFjpeg_destroy(sp); /* release libjpeg resources */ - if (sp->jpegtables) /* tag value */ - _TIFFfree(sp->jpegtables); - _TIFFfree(tif->tif_data); /* release local state */ - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static void -JPEGResetUpsampled( TIFF* tif ) -{ - JPEGState* sp = JState(tif); - TIFFDirectory* td = &tif->tif_dir; - - /* - * Mark whether returned data is up-sampled or not so TIFFStripSize - * and TIFFTileSize return values that reflect the true amount of - * data. - */ - tif->tif_flags &= ~TIFF_UPSAMPLED; - if (td->td_planarconfig == PLANARCONFIG_CONTIG) { - if (td->td_photometric == PHOTOMETRIC_YCBCR && - sp->jpegcolormode == JPEGCOLORMODE_RGB) { - tif->tif_flags |= TIFF_UPSAMPLED; - } else { -#ifdef notdef - if (td->td_ycbcrsubsampling[0] != 1 || - td->td_ycbcrsubsampling[1] != 1) - ; /* XXX what about up-sampling? */ -#endif - } - } - - /* - * Must recalculate cached tile size in case sampling state changed. - * Should we really be doing this now if image size isn't set? - */ - if( tif->tif_tilesize > 0 ) - tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tmsize_t)(-1); - if( tif->tif_scanlinesize > 0 ) - tif->tif_scanlinesize = TIFFScanlineSize(tif); -} - -static int -JPEGVSetField(TIFF* tif, uint32 tag, va_list ap) -{ - JPEGState* sp = JState(tif); - const TIFFField* fip; - uint32 v32; - - assert(sp != NULL); - - switch (tag) { - case TIFFTAG_JPEGTABLES: - v32 = (uint32) va_arg(ap, uint32); - if (v32 == 0) { - /* XXX */ - return (0); - } - _TIFFsetByteArray(&sp->jpegtables, va_arg(ap, void*), v32); - sp->jpegtables_length = v32; - TIFFSetFieldBit(tif, FIELD_JPEGTABLES); - break; - case TIFFTAG_JPEGQUALITY: - sp->jpegquality = (int) va_arg(ap, int); - return (1); /* pseudo tag */ - case TIFFTAG_JPEGCOLORMODE: - sp->jpegcolormode = (int) va_arg(ap, int); - JPEGResetUpsampled( tif ); - return (1); /* pseudo tag */ - case TIFFTAG_PHOTOMETRIC: - { - int ret_value = (*sp->vsetparent)(tif, tag, ap); - JPEGResetUpsampled( tif ); - return ret_value; - } - case TIFFTAG_JPEGTABLESMODE: - sp->jpegtablesmode = (int) va_arg(ap, int); - return (1); /* pseudo tag */ - case TIFFTAG_YCBCRSUBSAMPLING: - /* mark the fact that we have a real ycbcrsubsampling! */ - sp->ycbcrsampling_fetched = 1; - /* should we be recomputing upsampling info here? */ - return (*sp->vsetparent)(tif, tag, ap); - default: - return (*sp->vsetparent)(tif, tag, ap); - } - - if ((fip = TIFFFieldWithTag(tif, tag)) != NULL) { - TIFFSetFieldBit(tif, fip->field_bit); - } else { - return (0); - } - - tif->tif_flags |= TIFF_DIRTYDIRECT; - return (1); -} - -static int -JPEGVGetField(TIFF* tif, uint32 tag, va_list ap) -{ - JPEGState* sp = JState(tif); - - assert(sp != NULL); - - switch (tag) { - case TIFFTAG_JPEGTABLES: - *va_arg(ap, uint32*) = sp->jpegtables_length; - *va_arg(ap, void**) = sp->jpegtables; - break; - case TIFFTAG_JPEGQUALITY: - *va_arg(ap, int*) = sp->jpegquality; - break; - case TIFFTAG_JPEGCOLORMODE: - *va_arg(ap, int*) = sp->jpegcolormode; - break; - case TIFFTAG_JPEGTABLESMODE: - *va_arg(ap, int*) = sp->jpegtablesmode; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return (1); -} - -static void -JPEGPrintDir(TIFF* tif, FILE* fd, long flags) -{ - JPEGState* sp = JState(tif); - - assert(sp != NULL); - (void) flags; - - if( sp != NULL ) { - if (TIFFFieldSet(tif,FIELD_JPEGTABLES)) - fprintf(fd, " JPEG Tables: (%lu bytes)\n", - (unsigned long) sp->jpegtables_length); - if (sp->printdir) - (*sp->printdir)(tif, fd, flags); - } -} - -static uint32 -JPEGDefaultStripSize(TIFF* tif, uint32 s) -{ - JPEGState* sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - - s = (*sp->defsparent)(tif, s); - if (s < td->td_imagelength) - s = TIFFroundup_32(s, td->td_ycbcrsubsampling[1] * DCTSIZE); - return (s); -} - -static void -JPEGDefaultTileSize(TIFF* tif, uint32* tw, uint32* th) -{ - JPEGState* sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - - (*sp->deftparent)(tif, tw, th); - *tw = TIFFroundup_32(*tw, td->td_ycbcrsubsampling[0] * DCTSIZE); - *th = TIFFroundup_32(*th, td->td_ycbcrsubsampling[1] * DCTSIZE); -} - -/* - * The JPEG library initialized used to be done in TIFFInitJPEG(), but - * now that we allow a TIFF file to be opened in update mode it is necessary - * to have some way of deciding whether compression or decompression is - * desired other than looking at tif->tif_mode. We accomplish this by - * examining {TILE/STRIP}BYTECOUNTS to see if there is a non-zero entry. - * If so, we assume decompression is desired. - * - * This is tricky, because TIFFInitJPEG() is called while the directory is - * being read, and generally speaking the BYTECOUNTS tag won't have been read - * at that point. So we try to defer jpeg library initialization till we - * do have that tag ... basically any access that might require the compressor - * or decompressor that occurs after the reading of the directory. - * - * In an ideal world compressors or decompressors would be setup - * at the point where a single tile or strip was accessed (for read or write) - * so that stuff like update of missing tiles, or replacement of tiles could - * be done. However, we aren't trying to crack that nut just yet ... - * - * NFW, Feb 3rd, 2003. - */ - -static int JPEGInitializeLibJPEG( TIFF * tif, int decompress ) -{ - JPEGState* sp = JState(tif); - - if(sp->cinfo_initialized) - { - if( !decompress && sp->cinfo.comm.is_decompressor ) - TIFFjpeg_destroy( sp ); - else if( decompress && !sp->cinfo.comm.is_decompressor ) - TIFFjpeg_destroy( sp ); - else - return 1; - - sp->cinfo_initialized = 0; - } - - /* - * Initialize libjpeg. - */ - if ( decompress ) { - if (!TIFFjpeg_create_decompress(sp)) - return (0); - } else { - if (!TIFFjpeg_create_compress(sp)) - return (0); -#ifndef TIFF_JPEG_MAX_MEMORY_TO_USE -#define TIFF_JPEG_MAX_MEMORY_TO_USE (10 * 1024 * 1024) -#endif - /* libjpeg turbo 1.5.2 honours max_memory_to_use, but has no backing */ - /* store implementation, so better not set max_memory_to_use ourselves. */ - /* See https://github.com/libjpeg-turbo/libjpeg-turbo/issues/162 */ - if( sp->cinfo.c.mem->max_memory_to_use > 0 ) - { - /* This is to address bug related in ticket GDAL #1795. */ - if (getenv("JPEGMEM") == NULL) - { - /* Increase the max memory usable. This helps when creating files */ - /* with "big" tile, without using libjpeg temporary files. */ - /* For example a 512x512 tile with 3 bands */ - /* requires 1.5 MB which is above libjpeg 1MB default */ - if( sp->cinfo.c.mem->max_memory_to_use < TIFF_JPEG_MAX_MEMORY_TO_USE ) - sp->cinfo.c.mem->max_memory_to_use = TIFF_JPEG_MAX_MEMORY_TO_USE; - } - } - } - - sp->cinfo_initialized = TRUE; - - return 1; -} - -int -TIFFInitJPEG(TIFF* tif, int scheme) -{ - JPEGState* sp; - - assert(scheme == COMPRESSION_JPEG); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, jpegFields, TIFFArrayCount(jpegFields))) { - TIFFErrorExt(tif->tif_clientdata, - "TIFFInitJPEG", - "Merging JPEG codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8*) _TIFFmalloc(sizeof (JPEGState)); - - if (tif->tif_data == NULL) { - TIFFErrorExt(tif->tif_clientdata, - "TIFFInitJPEG", "No space for JPEG state block"); - return 0; - } - _TIFFmemset(tif->tif_data, 0, sizeof(JPEGState)); - - sp = JState(tif); - sp->tif = tif; /* back link */ - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = JPEGVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = JPEGVSetField; /* hook for codec tags */ - sp->printdir = tif->tif_tagmethods.printdir; - tif->tif_tagmethods.printdir = JPEGPrintDir; /* hook for codec tags */ - - /* Default values for codec-specific fields */ - sp->jpegtables = NULL; - sp->jpegtables_length = 0; - sp->jpegquality = 75; /* Default IJG quality */ - sp->jpegcolormode = JPEGCOLORMODE_RAW; - sp->jpegtablesmode = JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF; - sp->ycbcrsampling_fetched = 0; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = JPEGFixupTags; - tif->tif_setupdecode = JPEGSetupDecode; - tif->tif_predecode = JPEGPreDecode; - tif->tif_decoderow = JPEGDecode; - tif->tif_decodestrip = JPEGDecode; - tif->tif_decodetile = JPEGDecode; - tif->tif_setupencode = JPEGSetupEncode; - tif->tif_preencode = JPEGPreEncode; - tif->tif_postencode = JPEGPostEncode; - tif->tif_encoderow = JPEGEncode; - tif->tif_encodestrip = JPEGEncode; - tif->tif_encodetile = JPEGEncode; - tif->tif_cleanup = JPEGCleanup; - sp->defsparent = tif->tif_defstripsize; - tif->tif_defstripsize = JPEGDefaultStripSize; - sp->deftparent = tif->tif_deftilesize; - tif->tif_deftilesize = JPEGDefaultTileSize; - tif->tif_flags |= TIFF_NOBITREV; /* no bit reversal, please */ - - sp->cinfo_initialized = FALSE; - - /* - ** Create a JPEGTables field if no directory has yet been created. - ** We do this just to ensure that sufficient space is reserved for - ** the JPEGTables field. It will be properly created the right - ** size later. - */ - if( tif->tif_diroff == 0 ) - { -#define SIZE_OF_JPEGTABLES 2000 -/* -The following line assumes incorrectly that all JPEG-in-TIFF files will have -a JPEGTABLES tag generated and causes null-filled JPEGTABLES tags to be written -when the JPEG data is placed with TIFFWriteRawStrip. The field bit should be -set, anyway, later when actual JPEGTABLES header is generated, so removing it -here hopefully is harmless. - TIFFSetFieldBit(tif, FIELD_JPEGTABLES); -*/ - sp->jpegtables_length = SIZE_OF_JPEGTABLES; - sp->jpegtables = (void *) _TIFFmalloc(sp->jpegtables_length); - if (sp->jpegtables) - { - _TIFFmemset(sp->jpegtables, 0, SIZE_OF_JPEGTABLES); - } - else - { - TIFFErrorExt(tif->tif_clientdata, - "TIFFInitJPEG", - "Failed to allocate memory for JPEG tables"); - return 0; - } -#undef SIZE_OF_JPEGTABLES - } - - return 1; -} -#endif /* JPEG_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_jpeg_12.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_jpeg_12.c deleted file mode 100644 index f5462ea..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_jpeg_12.c +++ /dev/null @@ -1,69 +0,0 @@ - -#include "tiffiop.h" - -#if defined(JPEG_DUAL_MODE_8_12) - -# define TIFFInitJPEG TIFFInitJPEG_12 -# define TIFFJPEGIsFullStripRequired TIFFJPEGIsFullStripRequired_12 - -int -TIFFInitJPEG_12(TIFF* tif, int scheme); - -# include LIBJPEG_12_PATH - -# include "tif_jpeg.c" - -int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode ) - -{ - JPEGState* sp; - - assert(scheme == COMPRESSION_JPEG); - - sp = JState(tif); - sp->tif = tif; /* back link */ - - /* - * Override parent get/set field methods. - */ - tif->tif_tagmethods.vgetfield = JPEGVGetField; /* hook for codec tags */ - tif->tif_tagmethods.vsetfield = JPEGVSetField; /* hook for codec tags */ - tif->tif_tagmethods.printdir = JPEGPrintDir; /* hook for codec tags */ - - /* - * Install codec methods. - */ - tif->tif_fixuptags = JPEGFixupTags; - tif->tif_setupdecode = JPEGSetupDecode; - tif->tif_predecode = JPEGPreDecode; - tif->tif_decoderow = JPEGDecode; - tif->tif_decodestrip = JPEGDecode; - tif->tif_decodetile = JPEGDecode; - tif->tif_setupencode = JPEGSetupEncode; - tif->tif_preencode = JPEGPreEncode; - tif->tif_postencode = JPEGPostEncode; - tif->tif_encoderow = JPEGEncode; - tif->tif_encodestrip = JPEGEncode; - tif->tif_encodetile = JPEGEncode; - tif->tif_cleanup = JPEGCleanup; - tif->tif_defstripsize = JPEGDefaultStripSize; - tif->tif_deftilesize = JPEGDefaultTileSize; - tif->tif_flags |= TIFF_NOBITREV; /* no bit reversal, please */ - - sp->cinfo_initialized = FALSE; - - if( is_encode ) - return JPEGSetupEncode(tif); - else - return JPEGSetupDecode(tif); -} - -#endif /* defined(JPEG_DUAL_MODE_8_12) */ - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_luv.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_luv.c deleted file mode 100644 index e487ffc..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_luv.c +++ /dev/null @@ -1,1765 +0,0 @@ -/* - * Copyright (c) 1997 Greg Ward Larson - * Copyright (c) 1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler, Greg Larson and Silicon Graphics may not be used in any - * advertising or publicity relating to the software without the specific, - * prior written permission of Sam Leffler, Greg Larson and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER, GREG LARSON OR SILICON GRAPHICS BE LIABLE - * FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef LOGLUV_SUPPORT - -/* - * TIFF Library. - * LogLuv compression support for high dynamic range images. - * - * Contributed by Greg Larson. - * - * LogLuv image support uses the TIFF library to store 16 or 10-bit - * log luminance values with 8 bits each of u and v or a 14-bit index. - * - * The codec can take as input and produce as output 32-bit IEEE float values - * as well as 16-bit integer values. A 16-bit luminance is interpreted - * as a sign bit followed by a 15-bit integer that is converted - * to and from a linear magnitude using the transformation: - * - * L = 2^( (Le+.5)/256 - 64 ) # real from 15-bit - * - * Le = floor( 256*(log2(L) + 64) ) # 15-bit from real - * - * The actual conversion to world luminance units in candelas per sq. meter - * requires an additional multiplier, which is stored in the TIFFTAG_STONITS. - * This value is usually set such that a reasonable exposure comes from - * clamping decoded luminances above 1 to 1 in the displayed image. - * - * The 16-bit values for u and v may be converted to real values by dividing - * each by 32768. (This allows for negative values, which aren't useful as - * far as we know, but are left in case of future improvements in human - * color vision.) - * - * Conversion from (u,v), which is actually the CIE (u',v') system for - * you color scientists, is accomplished by the following transformation: - * - * u = 4*x / (-2*x + 12*y + 3) - * v = 9*y / (-2*x + 12*y + 3) - * - * x = 9*u / (6*u - 16*v + 12) - * y = 4*v / (6*u - 16*v + 12) - * - * This process is greatly simplified by passing 32-bit IEEE floats - * for each of three CIE XYZ coordinates. The codec then takes care - * of conversion to and from LogLuv, though the application is still - * responsible for interpreting the TIFFTAG_STONITS calibration factor. - * - * By definition, a CIE XYZ vector of [1 1 1] corresponds to a neutral white - * point of (x,y)=(1/3,1/3). However, most color systems assume some other - * white point, such as D65, and an absolute color conversion to XYZ then - * to another color space with a different white point may introduce an - * unwanted color cast to the image. It is often desirable, therefore, to - * perform a white point conversion that maps the input white to [1 1 1] - * in XYZ, then record the original white point using the TIFFTAG_WHITEPOINT - * tag value. A decoder that demands absolute color calibration may use - * this white point tag to get back the original colors, but usually it - * will be ignored and the new white point will be used instead that - * matches the output color space. - * - * Pixel information is compressed into one of two basic encodings, depending - * on the setting of the compression tag, which is one of COMPRESSION_SGILOG - * or COMPRESSION_SGILOG24. For COMPRESSION_SGILOG, greyscale data is - * stored as: - * - * 1 15 - * |-+---------------| - * - * COMPRESSION_SGILOG color data is stored as: - * - * 1 15 8 8 - * |-+---------------|--------+--------| - * S Le ue ve - * - * For the 24-bit COMPRESSION_SGILOG24 color format, the data is stored as: - * - * 10 14 - * |----------|--------------| - * Le' Ce - * - * There is no sign bit in the 24-bit case, and the (u,v) chromaticity is - * encoded as an index for optimal color resolution. The 10 log bits are - * defined by the following conversions: - * - * L = 2^((Le'+.5)/64 - 12) # real from 10-bit - * - * Le' = floor( 64*(log2(L) + 12) ) # 10-bit from real - * - * The 10 bits of the smaller format may be converted into the 15 bits of - * the larger format by multiplying by 4 and adding 13314. Obviously, - * a smaller range of magnitudes is covered (about 5 orders of magnitude - * instead of 38), and the lack of a sign bit means that negative luminances - * are not allowed. (Well, they aren't allowed in the real world, either, - * but they are useful for certain types of image processing.) - * - * The desired user format is controlled by the setting the internal - * pseudo tag TIFFTAG_SGILOGDATAFMT to one of: - * SGILOGDATAFMT_FLOAT = IEEE 32-bit float XYZ values - * SGILOGDATAFMT_16BIT = 16-bit integer encodings of logL, u and v - * Raw data i/o is also possible using: - * SGILOGDATAFMT_RAW = 32-bit unsigned integer with encoded pixel - * In addition, the following decoding is provided for ease of display: - * SGILOGDATAFMT_8BIT = 8-bit default RGB gamma-corrected values - * - * For grayscale images, we provide the following data formats: - * SGILOGDATAFMT_FLOAT = IEEE 32-bit float Y values - * SGILOGDATAFMT_16BIT = 16-bit integer w/ encoded luminance - * SGILOGDATAFMT_8BIT = 8-bit gray monitor values - * - * Note that the COMPRESSION_SGILOG applies a simple run-length encoding - * scheme by separating the logL, u and v bytes for each row and applying - * a PackBits type of compression. Since the 24-bit encoding is not - * adaptive, the 32-bit color format takes less space in many cases. - * - * Further control is provided over the conversion from higher-resolution - * formats to final encoded values through the pseudo tag - * TIFFTAG_SGILOGENCODE: - * SGILOGENCODE_NODITHER = do not dither encoded values - * SGILOGENCODE_RANDITHER = apply random dithering during encoding - * - * The default value of this tag is SGILOGENCODE_NODITHER for - * COMPRESSION_SGILOG to maximize run-length encoding and - * SGILOGENCODE_RANDITHER for COMPRESSION_SGILOG24 to turn - * quantization errors into noise. - */ - -#include -#include -#include - -/* - * State block for each open TIFF - * file using LogLuv compression/decompression. - */ -typedef struct logLuvState LogLuvState; - -struct logLuvState { - int encoder_state; /* 1 if encoder correctly initialized */ - int user_datafmt; /* user data format */ - int encode_meth; /* encoding method */ - int pixel_size; /* bytes per pixel */ - - uint8* tbuf; /* translation buffer */ - tmsize_t tbuflen; /* buffer length */ - void (*tfunc)(LogLuvState*, uint8*, tmsize_t); - - TIFFVSetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ -}; - -#define DecoderState(tif) ((LogLuvState*) (tif)->tif_data) -#define EncoderState(tif) ((LogLuvState*) (tif)->tif_data) - -#define SGILOGDATAFMT_UNKNOWN -1 - -#define MINRUN 4 /* minimum run length */ - -/* - * Decode a string of 16-bit gray pixels. - */ -static int -LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) -{ - static const char module[] = "LogL16Decode"; - LogLuvState* sp = DecoderState(tif); - int shft; - tmsize_t i; - tmsize_t npixels; - unsigned char* bp; - int16* tp; - int16 b; - tmsize_t cc; - int rc; - - assert(s == 0); - assert(sp != NULL); - - npixels = occ / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_16BIT) - tp = (int16*) op; - else { - if(sp->tbuflen < npixels) { - TIFFErrorExt(tif->tif_clientdata, module, - "Translation buffer too short"); - return (0); - } - tp = (int16*) sp->tbuf; - } - _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0])); - - bp = (unsigned char*) tif->tif_rawcp; - cc = tif->tif_rawcc; - /* get each byte string */ - for (shft = 8; shft >= 0; shft -=8) { - for (i = 0; i < npixels && cc > 0; ) { - if (*bp >= 128) { /* run */ - if( cc < 2 ) - break; - rc = *bp++ + (2-128); - b = (int16)(*bp++ << shft); - cc -= 2; - while (rc-- && i < npixels) - tp[i++] |= b; - } else { /* non-run */ - rc = *bp++; /* nul is noop */ - while (--cc && rc-- && i < npixels) - tp[i++] |= (int16)*bp++ << shft; - } - } - if (i != npixels) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at row %lu (short %I64d pixels)", - (unsigned long) tif->tif_row, - (unsigned __int64) (npixels - i)); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at row %lu (short %llu pixels)", - (unsigned long) tif->tif_row, - (unsigned long long) (npixels - i)); -#endif - tif->tif_rawcp = (uint8*) bp; - tif->tif_rawcc = cc; - return (0); - } - } - (*sp->tfunc)(sp, op, npixels); - tif->tif_rawcp = (uint8*) bp; - tif->tif_rawcc = cc; - return (1); -} - -/* - * Decode a string of 24-bit pixels. - */ -static int -LogLuvDecode24(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) -{ - static const char module[] = "LogLuvDecode24"; - LogLuvState* sp = DecoderState(tif); - tmsize_t cc; - tmsize_t i; - tmsize_t npixels; - unsigned char* bp; - uint32* tp; - - assert(s == 0); - assert(sp != NULL); - - npixels = occ / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_RAW) - tp = (uint32 *)op; - else { - if(sp->tbuflen < npixels) { - TIFFErrorExt(tif->tif_clientdata, module, - "Translation buffer too short"); - return (0); - } - tp = (uint32 *) sp->tbuf; - } - /* copy to array of uint32 */ - bp = (unsigned char*) tif->tif_rawcp; - cc = tif->tif_rawcc; - for (i = 0; i < npixels && cc >= 3; i++) { - tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2]; - bp += 3; - cc -= 3; - } - tif->tif_rawcp = (uint8*) bp; - tif->tif_rawcc = cc; - if (i != npixels) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at row %lu (short %I64d pixels)", - (unsigned long) tif->tif_row, - (unsigned __int64) (npixels - i)); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at row %lu (short %llu pixels)", - (unsigned long) tif->tif_row, - (unsigned long long) (npixels - i)); -#endif - return (0); - } - (*sp->tfunc)(sp, op, npixels); - return (1); -} - -/* - * Decode a string of 32-bit pixels. - */ -static int -LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) -{ - static const char module[] = "LogLuvDecode32"; - LogLuvState* sp; - int shft; - tmsize_t i; - tmsize_t npixels; - unsigned char* bp; - uint32* tp; - uint32 b; - tmsize_t cc; - int rc; - - assert(s == 0); - sp = DecoderState(tif); - assert(sp != NULL); - - npixels = occ / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_RAW) - tp = (uint32*) op; - else { - if(sp->tbuflen < npixels) { - TIFFErrorExt(tif->tif_clientdata, module, - "Translation buffer too short"); - return (0); - } - tp = (uint32*) sp->tbuf; - } - _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0])); - - bp = (unsigned char*) tif->tif_rawcp; - cc = tif->tif_rawcc; - /* get each byte string */ - for (shft = 24; shft >= 0; shft -=8) { - for (i = 0; i < npixels && cc > 0; ) { - if (*bp >= 128) { /* run */ - if( cc < 2 ) - break; - rc = *bp++ + (2-128); - b = (uint32)*bp++ << shft; - cc -= 2; - while (rc-- && i < npixels) - tp[i++] |= b; - } else { /* non-run */ - rc = *bp++; /* nul is noop */ - while (--cc && rc-- && i < npixels) - tp[i++] |= (uint32)*bp++ << shft; - } - } - if (i != npixels) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at row %lu (short %I64d pixels)", - (unsigned long) tif->tif_row, - (unsigned __int64) (npixels - i)); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at row %lu (short %llu pixels)", - (unsigned long) tif->tif_row, - (unsigned long long) (npixels - i)); -#endif - tif->tif_rawcp = (uint8*) bp; - tif->tif_rawcc = cc; - return (0); - } - } - (*sp->tfunc)(sp, op, npixels); - tif->tif_rawcp = (uint8*) bp; - tif->tif_rawcc = cc; - return (1); -} - -/* - * Decode a strip of pixels. We break it into rows to - * maintain synchrony with the encode algorithm, which - * is row by row. - */ -static int -LogLuvDecodeStrip(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - tmsize_t rowlen = TIFFScanlineSize(tif); - - if (rowlen == 0) - return 0; - - assert(cc%rowlen == 0); - while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) { - bp += rowlen; - cc -= rowlen; - } - return (cc == 0); -} - -/* - * Decode a tile of pixels. We break it into rows to - * maintain synchrony with the encode algorithm, which - * is row by row. - */ -static int -LogLuvDecodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - tmsize_t rowlen = TIFFTileRowSize(tif); - - if (rowlen == 0) - return 0; - - assert(cc%rowlen == 0); - while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) { - bp += rowlen; - cc -= rowlen; - } - return (cc == 0); -} - -/* - * Encode a row of 16-bit pixels. - */ -static int -LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - static const char module[] = "LogL16Encode"; - LogLuvState* sp = EncoderState(tif); - int shft; - tmsize_t i; - tmsize_t j; - tmsize_t npixels; - uint8* op; - int16* tp; - int16 b; - tmsize_t occ; - int rc=0, mask; - tmsize_t beg; - - assert(s == 0); - assert(sp != NULL); - npixels = cc / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_16BIT) - tp = (int16*) bp; - else { - tp = (int16*) sp->tbuf; - if(sp->tbuflen < npixels) { - TIFFErrorExt(tif->tif_clientdata, module, - "Translation buffer too short"); - return (0); - } - (*sp->tfunc)(sp, bp, npixels); - } - /* compress each byte string */ - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - for (shft = 8; shft >= 0; shft -=8) { - for (i = 0; i < npixels; i += rc) { - if (occ < 4) { - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - } - mask = 0xff << shft; /* find next run */ - for (beg = i; beg < npixels; beg += rc) { - b = (int16) (tp[beg] & mask); - rc = 1; - while (rc < 127+2 && beg+rc < npixels && - (tp[beg+rc] & mask) == b) - rc++; - if (rc >= MINRUN) - break; /* long enough */ - } - if (beg-i > 1 && beg-i < MINRUN) { - b = (int16) (tp[i] & mask);/*check short run */ - j = i+1; - while ((tp[j++] & mask) == b) - if (j == beg) { - *op++ = (uint8)(128-2+j-i); - *op++ = (uint8)(b >> shft); - occ -= 2; - i = beg; - break; - } - } - while (i < beg) { /* write out non-run */ - if ((j = beg-i) > 127) j = 127; - if (occ < j+3) { - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - } - *op++ = (uint8) j; occ--; - while (j--) { - *op++ = (uint8) (tp[i++] >> shft & 0xff); - occ--; - } - } - if (rc >= MINRUN) { /* write out run */ - *op++ = (uint8) (128-2+rc); - *op++ = (uint8) (tp[beg] >> shft & 0xff); - occ -= 2; - } else - rc = 0; - } - } - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - - return (1); -} - -/* - * Encode a row of 24-bit pixels. - */ -static int -LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - static const char module[] = "LogLuvEncode24"; - LogLuvState* sp = EncoderState(tif); - tmsize_t i; - tmsize_t npixels; - tmsize_t occ; - uint8* op; - uint32* tp; - - assert(s == 0); - assert(sp != NULL); - npixels = cc / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_RAW) - tp = (uint32*) bp; - else { - tp = (uint32*) sp->tbuf; - if(sp->tbuflen < npixels) { - TIFFErrorExt(tif->tif_clientdata, module, - "Translation buffer too short"); - return (0); - } - (*sp->tfunc)(sp, bp, npixels); - } - /* write out encoded pixels */ - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - for (i = npixels; i--; ) { - if (occ < 3) { - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - } - *op++ = (uint8)(*tp >> 16); - *op++ = (uint8)(*tp >> 8 & 0xff); - *op++ = (uint8)(*tp++ & 0xff); - occ -= 3; - } - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - - return (1); -} - -/* - * Encode a row of 32-bit pixels. - */ -static int -LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - static const char module[] = "LogLuvEncode32"; - LogLuvState* sp = EncoderState(tif); - int shft; - tmsize_t i; - tmsize_t j; - tmsize_t npixels; - uint8* op; - uint32* tp; - uint32 b; - tmsize_t occ; - int rc=0, mask; - tmsize_t beg; - - assert(s == 0); - assert(sp != NULL); - - npixels = cc / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_RAW) - tp = (uint32*) bp; - else { - tp = (uint32*) sp->tbuf; - if(sp->tbuflen < npixels) { - TIFFErrorExt(tif->tif_clientdata, module, - "Translation buffer too short"); - return (0); - } - (*sp->tfunc)(sp, bp, npixels); - } - /* compress each byte string */ - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - for (shft = 24; shft >= 0; shft -=8) { - for (i = 0; i < npixels; i += rc) { - if (occ < 4) { - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - } - mask = 0xff << shft; /* find next run */ - for (beg = i; beg < npixels; beg += rc) { - b = tp[beg] & mask; - rc = 1; - while (rc < 127+2 && beg+rc < npixels && - (tp[beg+rc] & mask) == b) - rc++; - if (rc >= MINRUN) - break; /* long enough */ - } - if (beg-i > 1 && beg-i < MINRUN) { - b = tp[i] & mask; /* check short run */ - j = i+1; - while ((tp[j++] & mask) == b) - if (j == beg) { - *op++ = (uint8)(128-2+j-i); - *op++ = (uint8)(b >> shft); - occ -= 2; - i = beg; - break; - } - } - while (i < beg) { /* write out non-run */ - if ((j = beg-i) > 127) j = 127; - if (occ < j+3) { - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - } - *op++ = (uint8) j; occ--; - while (j--) { - *op++ = (uint8)(tp[i++] >> shft & 0xff); - occ--; - } - } - if (rc >= MINRUN) { /* write out run */ - *op++ = (uint8) (128-2+rc); - *op++ = (uint8)(tp[beg] >> shft & 0xff); - occ -= 2; - } else - rc = 0; - } - } - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - - return (1); -} - -/* - * Encode a strip of pixels. We break it into rows to - * avoid encoding runs across row boundaries. - */ -static int -LogLuvEncodeStrip(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - tmsize_t rowlen = TIFFScanlineSize(tif); - - if (rowlen == 0) - return 0; - - assert(cc%rowlen == 0); - while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1) { - bp += rowlen; - cc -= rowlen; - } - return (cc == 0); -} - -/* - * Encode a tile of pixels. We break it into rows to - * avoid encoding runs across row boundaries. - */ -static int -LogLuvEncodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - tmsize_t rowlen = TIFFTileRowSize(tif); - - if (rowlen == 0) - return 0; - - assert(cc%rowlen == 0); - while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1) { - bp += rowlen; - cc -= rowlen; - } - return (cc == 0); -} - -/* - * Encode/Decode functions for converting to and from user formats. - */ - -#include "uvcode.h" - -#ifndef UVSCALE -#define U_NEU 0.210526316 -#define V_NEU 0.473684211 -#define UVSCALE 410. -#endif - -#ifndef M_LN2 -#define M_LN2 0.69314718055994530942 -#endif -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif -#undef log2 /* Conflict with C'99 function */ -#define log2(x) ((1./M_LN2)*log(x)) -#undef exp2 /* Conflict with C'99 function */ -#define exp2(x) exp(M_LN2*(x)) - -#define itrunc(x,m) ((m)==SGILOGENCODE_NODITHER ? \ - (int)(x) : \ - (int)((x) + rand()*(1./RAND_MAX) - .5)) - -#if !LOGLUV_PUBLIC -static -#endif -double -LogL16toY(int p16) /* compute luminance from 16-bit LogL */ -{ - int Le = p16 & 0x7fff; - double Y; - - if (!Le) - return (0.); - Y = exp(M_LN2/256.*(Le+.5) - M_LN2*64.); - return (!(p16 & 0x8000) ? Y : -Y); -} - -#if !LOGLUV_PUBLIC -static -#endif -int -LogL16fromY(double Y, int em) /* get 16-bit LogL from Y */ -{ - if (Y >= 1.8371976e19) - return (0x7fff); - if (Y <= -1.8371976e19) - return (0xffff); - if (Y > 5.4136769e-20) - return itrunc(256.*(log2(Y) + 64.), em); - if (Y < -5.4136769e-20) - return (~0x7fff | itrunc(256.*(log2(-Y) + 64.), em)); - return (0); -} - -static void -L16toY(LogLuvState* sp, uint8* op, tmsize_t n) -{ - int16* l16 = (int16*) sp->tbuf; - float* yp = (float*) op; - - while (n-- > 0) - *yp++ = (float)LogL16toY(*l16++); -} - -static void -L16toGry(LogLuvState* sp, uint8* op, tmsize_t n) -{ - int16* l16 = (int16*) sp->tbuf; - uint8* gp = (uint8*) op; - - while (n-- > 0) { - double Y = LogL16toY(*l16++); - *gp++ = (uint8) ((Y <= 0.) ? 0 : (Y >= 1.) ? 255 : (int)(256.*sqrt(Y))); - } -} - -static void -L16fromY(LogLuvState* sp, uint8* op, tmsize_t n) -{ - int16* l16 = (int16*) sp->tbuf; - float* yp = (float*) op; - - while (n-- > 0) - *l16++ = (int16) (LogL16fromY(*yp++, sp->encode_meth)); -} - -#if !LOGLUV_PUBLIC -static -#endif -void -XYZtoRGB24(float xyz[3], uint8 rgb[3]) -{ - double r, g, b; - /* assume CCIR-709 primaries */ - r = 2.690*xyz[0] + -1.276*xyz[1] + -0.414*xyz[2]; - g = -1.022*xyz[0] + 1.978*xyz[1] + 0.044*xyz[2]; - b = 0.061*xyz[0] + -0.224*xyz[1] + 1.163*xyz[2]; - /* assume 2.0 gamma for speed */ - /* could use integer sqrt approx., but this is probably faster */ - rgb[0] = (uint8)((r<=0.) ? 0 : (r >= 1.) ? 255 : (int)(256.*sqrt(r))); - rgb[1] = (uint8)((g<=0.) ? 0 : (g >= 1.) ? 255 : (int)(256.*sqrt(g))); - rgb[2] = (uint8)((b<=0.) ? 0 : (b >= 1.) ? 255 : (int)(256.*sqrt(b))); -} - -#if !LOGLUV_PUBLIC -static -#endif -double -LogL10toY(int p10) /* compute luminance from 10-bit LogL */ -{ - if (p10 == 0) - return (0.); - return (exp(M_LN2/64.*(p10+.5) - M_LN2*12.)); -} - -#if !LOGLUV_PUBLIC -static -#endif -int -LogL10fromY(double Y, int em) /* get 10-bit LogL from Y */ -{ - if (Y >= 15.742) - return (0x3ff); - else if (Y <= .00024283) - return (0); - else - return itrunc(64.*(log2(Y) + 12.), em); -} - -#define NANGLES 100 -#define uv2ang(u, v) ( (NANGLES*.499999999/M_PI) \ - * atan2((v)-V_NEU,(u)-U_NEU) + .5*NANGLES ) - -static int -oog_encode(double u, double v) /* encode out-of-gamut chroma */ -{ - static int oog_table[NANGLES]; - static int initialized = 0; - register int i; - - if (!initialized) { /* set up perimeter table */ - double eps[NANGLES], ua, va, ang, epsa; - int ui, vi, ustep; - for (i = NANGLES; i--; ) - eps[i] = 2.; - for (vi = UV_NVS; vi--; ) { - va = UV_VSTART + (vi+.5)*UV_SQSIZ; - ustep = uv_row[vi].nus-1; - if (vi == UV_NVS-1 || vi == 0 || ustep <= 0) - ustep = 1; - for (ui = uv_row[vi].nus-1; ui >= 0; ui -= ustep) { - ua = uv_row[vi].ustart + (ui+.5)*UV_SQSIZ; - ang = uv2ang(ua, va); - i = (int) ang; - epsa = fabs(ang - (i+.5)); - if (epsa < eps[i]) { - oog_table[i] = uv_row[vi].ncum + ui; - eps[i] = epsa; - } - } - } - for (i = NANGLES; i--; ) /* fill any holes */ - if (eps[i] > 1.5) { - int i1, i2; - for (i1 = 1; i1 < NANGLES/2; i1++) - if (eps[(i+i1)%NANGLES] < 1.5) - break; - for (i2 = 1; i2 < NANGLES/2; i2++) - if (eps[(i+NANGLES-i2)%NANGLES] < 1.5) - break; - if (i1 < i2) - oog_table[i] = - oog_table[(i+i1)%NANGLES]; - else - oog_table[i] = - oog_table[(i+NANGLES-i2)%NANGLES]; - } - initialized = 1; - } - i = (int) uv2ang(u, v); /* look up hue angle */ - return (oog_table[i]); -} - -#undef uv2ang -#undef NANGLES - -#if !LOGLUV_PUBLIC -static -#endif -int -uv_encode(double u, double v, int em) /* encode (u',v') coordinates */ -{ - register int vi, ui; - - if (v < UV_VSTART) - return oog_encode(u, v); - vi = itrunc((v - UV_VSTART)*(1./UV_SQSIZ), em); - if (vi >= UV_NVS) - return oog_encode(u, v); - if (u < uv_row[vi].ustart) - return oog_encode(u, v); - ui = itrunc((u - uv_row[vi].ustart)*(1./UV_SQSIZ), em); - if (ui >= uv_row[vi].nus) - return oog_encode(u, v); - - return (uv_row[vi].ncum + ui); -} - -#if !LOGLUV_PUBLIC -static -#endif -int -uv_decode(double *up, double *vp, int c) /* decode (u',v') index */ -{ - int upper, lower; - register int ui, vi; - - if (c < 0 || c >= UV_NDIVS) - return (-1); - lower = 0; /* binary search */ - upper = UV_NVS; - while (upper - lower > 1) { - vi = (lower + upper) >> 1; - ui = c - uv_row[vi].ncum; - if (ui > 0) - lower = vi; - else if (ui < 0) - upper = vi; - else { - lower = vi; - break; - } - } - vi = lower; - ui = c - uv_row[vi].ncum; - *up = uv_row[vi].ustart + (ui+.5)*UV_SQSIZ; - *vp = UV_VSTART + (vi+.5)*UV_SQSIZ; - return (0); -} - -#if !LOGLUV_PUBLIC -static -#endif -void -LogLuv24toXYZ(uint32 p, float XYZ[3]) -{ - int Ce; - double L, u, v, s, x, y; - /* decode luminance */ - L = LogL10toY(p>>14 & 0x3ff); - if (L <= 0.) { - XYZ[0] = XYZ[1] = XYZ[2] = 0.; - return; - } - /* decode color */ - Ce = p & 0x3fff; - if (uv_decode(&u, &v, Ce) < 0) { - u = U_NEU; v = V_NEU; - } - s = 1./(6.*u - 16.*v + 12.); - x = 9.*u * s; - y = 4.*v * s; - /* convert to XYZ */ - XYZ[0] = (float)(x/y * L); - XYZ[1] = (float)L; - XYZ[2] = (float)((1.-x-y)/y * L); -} - -#if !LOGLUV_PUBLIC -static -#endif -uint32 -LogLuv24fromXYZ(float XYZ[3], int em) -{ - int Le, Ce; - double u, v, s; - /* encode luminance */ - Le = LogL10fromY(XYZ[1], em); - /* encode color */ - s = XYZ[0] + 15.*XYZ[1] + 3.*XYZ[2]; - if (!Le || s <= 0.) { - u = U_NEU; - v = V_NEU; - } else { - u = 4.*XYZ[0] / s; - v = 9.*XYZ[1] / s; - } - Ce = uv_encode(u, v, em); - if (Ce < 0) /* never happens */ - Ce = uv_encode(U_NEU, V_NEU, SGILOGENCODE_NODITHER); - /* combine encodings */ - return (Le << 14 | Ce); -} - -static void -Luv24toXYZ(LogLuvState* sp, uint8* op, tmsize_t n) -{ - uint32* luv = (uint32*) sp->tbuf; - float* xyz = (float*) op; - - while (n-- > 0) { - LogLuv24toXYZ(*luv, xyz); - xyz += 3; - luv++; - } -} - -static void -Luv24toLuv48(LogLuvState* sp, uint8* op, tmsize_t n) -{ - uint32* luv = (uint32*) sp->tbuf; - int16* luv3 = (int16*) op; - - while (n-- > 0) { - double u, v; - - *luv3++ = (int16)((*luv >> 12 & 0xffd) + 13314); - if (uv_decode(&u, &v, *luv&0x3fff) < 0) { - u = U_NEU; - v = V_NEU; - } - *luv3++ = (int16)(u * (1L<<15)); - *luv3++ = (int16)(v * (1L<<15)); - luv++; - } -} - -static void -Luv24toRGB(LogLuvState* sp, uint8* op, tmsize_t n) -{ - uint32* luv = (uint32*) sp->tbuf; - uint8* rgb = (uint8*) op; - - while (n-- > 0) { - float xyz[3]; - - LogLuv24toXYZ(*luv++, xyz); - XYZtoRGB24(xyz, rgb); - rgb += 3; - } -} - -static void -Luv24fromXYZ(LogLuvState* sp, uint8* op, tmsize_t n) -{ - uint32* luv = (uint32*) sp->tbuf; - float* xyz = (float*) op; - - while (n-- > 0) { - *luv++ = LogLuv24fromXYZ(xyz, sp->encode_meth); - xyz += 3; - } -} - -static void -Luv24fromLuv48(LogLuvState* sp, uint8* op, tmsize_t n) -{ - uint32* luv = (uint32*) sp->tbuf; - int16* luv3 = (int16*) op; - - while (n-- > 0) { - int Le, Ce; - - if (luv3[0] <= 0) - Le = 0; - else if (luv3[0] >= (1<<12)+3314) - Le = (1<<10) - 1; - else if (sp->encode_meth == SGILOGENCODE_NODITHER) - Le = (luv3[0]-3314) >> 2; - else - Le = itrunc(.25*(luv3[0]-3314.), sp->encode_meth); - - Ce = uv_encode((luv3[1]+.5)/(1<<15), (luv3[2]+.5)/(1<<15), - sp->encode_meth); - if (Ce < 0) /* never happens */ - Ce = uv_encode(U_NEU, V_NEU, SGILOGENCODE_NODITHER); - *luv++ = (uint32)Le << 14 | Ce; - luv3 += 3; - } -} - -#if !LOGLUV_PUBLIC -static -#endif -void -LogLuv32toXYZ(uint32 p, float XYZ[3]) -{ - double L, u, v, s, x, y; - /* decode luminance */ - L = LogL16toY((int)p >> 16); - if (L <= 0.) { - XYZ[0] = XYZ[1] = XYZ[2] = 0.; - return; - } - /* decode color */ - u = 1./UVSCALE * ((p>>8 & 0xff) + .5); - v = 1./UVSCALE * ((p & 0xff) + .5); - s = 1./(6.*u - 16.*v + 12.); - x = 9.*u * s; - y = 4.*v * s; - /* convert to XYZ */ - XYZ[0] = (float)(x/y * L); - XYZ[1] = (float)L; - XYZ[2] = (float)((1.-x-y)/y * L); -} - -#if !LOGLUV_PUBLIC -static -#endif -uint32 -LogLuv32fromXYZ(float XYZ[3], int em) -{ - unsigned int Le, ue, ve; - double u, v, s; - /* encode luminance */ - Le = (unsigned int)LogL16fromY(XYZ[1], em); - /* encode color */ - s = XYZ[0] + 15.*XYZ[1] + 3.*XYZ[2]; - if (!Le || s <= 0.) { - u = U_NEU; - v = V_NEU; - } else { - u = 4.*XYZ[0] / s; - v = 9.*XYZ[1] / s; - } - if (u <= 0.) ue = 0; - else ue = itrunc(UVSCALE*u, em); - if (ue > 255) ue = 255; - if (v <= 0.) ve = 0; - else ve = itrunc(UVSCALE*v, em); - if (ve > 255) ve = 255; - /* combine encodings */ - return (Le << 16 | ue << 8 | ve); -} - -static void -Luv32toXYZ(LogLuvState* sp, uint8* op, tmsize_t n) -{ - uint32* luv = (uint32*) sp->tbuf; - float* xyz = (float*) op; - - while (n-- > 0) { - LogLuv32toXYZ(*luv++, xyz); - xyz += 3; - } -} - -static void -Luv32toLuv48(LogLuvState* sp, uint8* op, tmsize_t n) -{ - uint32* luv = (uint32*) sp->tbuf; - int16* luv3 = (int16*) op; - - while (n-- > 0) { - double u, v; - - *luv3++ = (int16)(*luv >> 16); - u = 1./UVSCALE * ((*luv>>8 & 0xff) + .5); - v = 1./UVSCALE * ((*luv & 0xff) + .5); - *luv3++ = (int16)(u * (1L<<15)); - *luv3++ = (int16)(v * (1L<<15)); - luv++; - } -} - -static void -Luv32toRGB(LogLuvState* sp, uint8* op, tmsize_t n) -{ - uint32* luv = (uint32*) sp->tbuf; - uint8* rgb = (uint8*) op; - - while (n-- > 0) { - float xyz[3]; - - LogLuv32toXYZ(*luv++, xyz); - XYZtoRGB24(xyz, rgb); - rgb += 3; - } -} - -static void -Luv32fromXYZ(LogLuvState* sp, uint8* op, tmsize_t n) -{ - uint32* luv = (uint32*) sp->tbuf; - float* xyz = (float*) op; - - while (n-- > 0) { - *luv++ = LogLuv32fromXYZ(xyz, sp->encode_meth); - xyz += 3; - } -} - -static void -Luv32fromLuv48(LogLuvState* sp, uint8* op, tmsize_t n) -{ - uint32* luv = (uint32*) sp->tbuf; - int16* luv3 = (int16*) op; - - if (sp->encode_meth == SGILOGENCODE_NODITHER) { - while (n-- > 0) { - *luv++ = (uint32)luv3[0] << 16 | - (luv3[1]*(uint32)(UVSCALE+.5) >> 7 & 0xff00) | - (luv3[2]*(uint32)(UVSCALE+.5) >> 15 & 0xff); - luv3 += 3; - } - return; - } - while (n-- > 0) { - *luv++ = (uint32)luv3[0] << 16 | - (itrunc(luv3[1]*(UVSCALE/(1<<15)), sp->encode_meth) << 8 & 0xff00) | - (itrunc(luv3[2]*(UVSCALE/(1<<15)), sp->encode_meth) & 0xff); - luv3 += 3; - } -} - -static void -_logLuvNop(LogLuvState* sp, uint8* op, tmsize_t n) -{ - (void) sp; (void) op; (void) n; -} - -static int -LogL16GuessDataFmt(TIFFDirectory *td) -{ -#define PACK(s,b,f) (((b)<<6)|((s)<<3)|(f)) - switch (PACK(td->td_samplesperpixel, td->td_bitspersample, td->td_sampleformat)) { - case PACK(1, 32, SAMPLEFORMAT_IEEEFP): - return (SGILOGDATAFMT_FLOAT); - case PACK(1, 16, SAMPLEFORMAT_VOID): - case PACK(1, 16, SAMPLEFORMAT_INT): - case PACK(1, 16, SAMPLEFORMAT_UINT): - return (SGILOGDATAFMT_16BIT); - case PACK(1, 8, SAMPLEFORMAT_VOID): - case PACK(1, 8, SAMPLEFORMAT_UINT): - return (SGILOGDATAFMT_8BIT); - } -#undef PACK - return (SGILOGDATAFMT_UNKNOWN); -} - - -#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0)) -#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1) - -static tmsize_t -multiply_ms(tmsize_t m1, tmsize_t m2) -{ - if( m1 == 0 || m2 > TIFF_TMSIZE_T_MAX / m1 ) - return 0; - return m1 * m2; -} - -static int -LogL16InitState(TIFF* tif) -{ - static const char module[] = "LogL16InitState"; - TIFFDirectory *td = &tif->tif_dir; - LogLuvState* sp = DecoderState(tif); - - assert(sp != NULL); - assert(td->td_photometric == PHOTOMETRIC_LOGL); - - if( td->td_samplesperpixel != 1 ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Sorry, can not handle LogL image with %s=%d", - "Samples/pixel", td->td_samplesperpixel); - return 0; - } - - /* for some reason, we can't do this in TIFFInitLogL16 */ - if (sp->user_datafmt == SGILOGDATAFMT_UNKNOWN) - sp->user_datafmt = LogL16GuessDataFmt(td); - switch (sp->user_datafmt) { - case SGILOGDATAFMT_FLOAT: - sp->pixel_size = sizeof (float); - break; - case SGILOGDATAFMT_16BIT: - sp->pixel_size = sizeof (int16); - break; - case SGILOGDATAFMT_8BIT: - sp->pixel_size = sizeof (uint8); - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, - "No support for converting user data format to LogL"); - return (0); - } - if( isTiled(tif) ) - sp->tbuflen = multiply_ms(td->td_tilewidth, td->td_tilelength); - else if( td->td_rowsperstrip < td->td_imagelength ) - sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_rowsperstrip); - else - sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_imagelength); - if (multiply_ms(sp->tbuflen, sizeof (int16)) == 0 || - (sp->tbuf = (uint8*) _TIFFmalloc(sp->tbuflen * sizeof (int16))) == NULL) { - TIFFErrorExt(tif->tif_clientdata, module, "No space for SGILog translation buffer"); - return (0); - } - return (1); -} - -static int -LogLuvGuessDataFmt(TIFFDirectory *td) -{ - int guess; - - /* - * If the user didn't tell us their datafmt, - * take our best guess from the bitspersample. - */ -#define PACK(a,b) (((a)<<3)|(b)) - switch (PACK(td->td_bitspersample, td->td_sampleformat)) { - case PACK(32, SAMPLEFORMAT_IEEEFP): - guess = SGILOGDATAFMT_FLOAT; - break; - case PACK(32, SAMPLEFORMAT_VOID): - case PACK(32, SAMPLEFORMAT_UINT): - case PACK(32, SAMPLEFORMAT_INT): - guess = SGILOGDATAFMT_RAW; - break; - case PACK(16, SAMPLEFORMAT_VOID): - case PACK(16, SAMPLEFORMAT_INT): - case PACK(16, SAMPLEFORMAT_UINT): - guess = SGILOGDATAFMT_16BIT; - break; - case PACK( 8, SAMPLEFORMAT_VOID): - case PACK( 8, SAMPLEFORMAT_UINT): - guess = SGILOGDATAFMT_8BIT; - break; - default: - guess = SGILOGDATAFMT_UNKNOWN; - break; -#undef PACK - } - /* - * Double-check samples per pixel. - */ - switch (td->td_samplesperpixel) { - case 1: - if (guess != SGILOGDATAFMT_RAW) - guess = SGILOGDATAFMT_UNKNOWN; - break; - case 3: - if (guess == SGILOGDATAFMT_RAW) - guess = SGILOGDATAFMT_UNKNOWN; - break; - default: - guess = SGILOGDATAFMT_UNKNOWN; - break; - } - return (guess); -} - -static int -LogLuvInitState(TIFF* tif) -{ - static const char module[] = "LogLuvInitState"; - TIFFDirectory* td = &tif->tif_dir; - LogLuvState* sp = DecoderState(tif); - - assert(sp != NULL); - assert(td->td_photometric == PHOTOMETRIC_LOGLUV); - - /* for some reason, we can't do this in TIFFInitLogLuv */ - if (td->td_planarconfig != PLANARCONFIG_CONTIG) { - TIFFErrorExt(tif->tif_clientdata, module, - "SGILog compression cannot handle non-contiguous data"); - return (0); - } - if (sp->user_datafmt == SGILOGDATAFMT_UNKNOWN) - sp->user_datafmt = LogLuvGuessDataFmt(td); - switch (sp->user_datafmt) { - case SGILOGDATAFMT_FLOAT: - sp->pixel_size = 3*sizeof (float); - break; - case SGILOGDATAFMT_16BIT: - sp->pixel_size = 3*sizeof (int16); - break; - case SGILOGDATAFMT_RAW: - sp->pixel_size = sizeof (uint32); - break; - case SGILOGDATAFMT_8BIT: - sp->pixel_size = 3*sizeof (uint8); - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, - "No support for converting user data format to LogLuv"); - return (0); - } - if( isTiled(tif) ) - sp->tbuflen = multiply_ms(td->td_tilewidth, td->td_tilelength); - else if( td->td_rowsperstrip < td->td_imagelength ) - sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_rowsperstrip); - else - sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_imagelength); - if (multiply_ms(sp->tbuflen, sizeof (uint32)) == 0 || - (sp->tbuf = (uint8*) _TIFFmalloc(sp->tbuflen * sizeof (uint32))) == NULL) { - TIFFErrorExt(tif->tif_clientdata, module, "No space for SGILog translation buffer"); - return (0); - } - return (1); -} - -static int -LogLuvFixupTags(TIFF* tif) -{ - (void) tif; - return (1); -} - -static int -LogLuvSetupDecode(TIFF* tif) -{ - static const char module[] = "LogLuvSetupDecode"; - LogLuvState* sp = DecoderState(tif); - TIFFDirectory* td = &tif->tif_dir; - - tif->tif_postdecode = _TIFFNoPostDecode; - switch (td->td_photometric) { - case PHOTOMETRIC_LOGLUV: - if (!LogLuvInitState(tif)) - break; - if (td->td_compression == COMPRESSION_SGILOG24) { - tif->tif_decoderow = LogLuvDecode24; - switch (sp->user_datafmt) { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = Luv24toXYZ; - break; - case SGILOGDATAFMT_16BIT: - sp->tfunc = Luv24toLuv48; - break; - case SGILOGDATAFMT_8BIT: - sp->tfunc = Luv24toRGB; - break; - } - } else { - tif->tif_decoderow = LogLuvDecode32; - switch (sp->user_datafmt) { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = Luv32toXYZ; - break; - case SGILOGDATAFMT_16BIT: - sp->tfunc = Luv32toLuv48; - break; - case SGILOGDATAFMT_8BIT: - sp->tfunc = Luv32toRGB; - break; - } - } - return (1); - case PHOTOMETRIC_LOGL: - if (!LogL16InitState(tif)) - break; - tif->tif_decoderow = LogL16Decode; - switch (sp->user_datafmt) { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = L16toY; - break; - case SGILOGDATAFMT_8BIT: - sp->tfunc = L16toGry; - break; - } - return (1); - default: - TIFFErrorExt(tif->tif_clientdata, module, - "Inappropriate photometric interpretation %d for SGILog compression; %s", - td->td_photometric, "must be either LogLUV or LogL"); - break; - } - return (0); -} - -static int -LogLuvSetupEncode(TIFF* tif) -{ - static const char module[] = "LogLuvSetupEncode"; - LogLuvState* sp = EncoderState(tif); - TIFFDirectory* td = &tif->tif_dir; - - switch (td->td_photometric) { - case PHOTOMETRIC_LOGLUV: - if (!LogLuvInitState(tif)) - break; - if (td->td_compression == COMPRESSION_SGILOG24) { - tif->tif_encoderow = LogLuvEncode24; - switch (sp->user_datafmt) { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = Luv24fromXYZ; - break; - case SGILOGDATAFMT_16BIT: - sp->tfunc = Luv24fromLuv48; - break; - case SGILOGDATAFMT_RAW: - break; - default: - goto notsupported; - } - } else { - tif->tif_encoderow = LogLuvEncode32; - switch (sp->user_datafmt) { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = Luv32fromXYZ; - break; - case SGILOGDATAFMT_16BIT: - sp->tfunc = Luv32fromLuv48; - break; - case SGILOGDATAFMT_RAW: - break; - default: - goto notsupported; - } - } - break; - case PHOTOMETRIC_LOGL: - if (!LogL16InitState(tif)) - break; - tif->tif_encoderow = LogL16Encode; - switch (sp->user_datafmt) { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = L16fromY; - break; - case SGILOGDATAFMT_16BIT: - break; - default: - goto notsupported; - } - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, - "Inappropriate photometric interpretation %d for SGILog compression; %s", - td->td_photometric, "must be either LogLUV or LogL"); - break; - } - sp->encoder_state = 1; - return (1); -notsupported: - TIFFErrorExt(tif->tif_clientdata, module, - "SGILog compression supported only for %s, or raw data", - td->td_photometric == PHOTOMETRIC_LOGL ? "Y, L" : "XYZ, Luv"); - return (0); -} - -static void -LogLuvClose(TIFF* tif) -{ - LogLuvState* sp = (LogLuvState*) tif->tif_data; - TIFFDirectory *td = &tif->tif_dir; - - assert(sp != 0); - /* - * For consistency, we always want to write out the same - * bitspersample and sampleformat for our TIFF file, - * regardless of the data format being used by the application. - * Since this routine is called after tags have been set but - * before they have been recorded in the file, we reset them here. - * Note: this is really a nasty approach. See PixarLogClose - */ - if( sp->encoder_state ) - { - /* See PixarLogClose. Might avoid issues with tags whose size depends - * on those below, but not completely sure this is enough. */ - td->td_samplesperpixel = - (td->td_photometric == PHOTOMETRIC_LOGL) ? 1 : 3; - td->td_bitspersample = 16; - td->td_sampleformat = SAMPLEFORMAT_INT; - } -} - -static void -LogLuvCleanup(TIFF* tif) -{ - LogLuvState* sp = (LogLuvState *)tif->tif_data; - - assert(sp != 0); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->tbuf) - _TIFFfree(sp->tbuf); - _TIFFfree(sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int -LogLuvVSetField(TIFF* tif, uint32 tag, va_list ap) -{ - static const char module[] = "LogLuvVSetField"; - LogLuvState* sp = DecoderState(tif); - int bps, fmt; - - switch (tag) { - case TIFFTAG_SGILOGDATAFMT: - sp->user_datafmt = (int) va_arg(ap, int); - /* - * Tweak the TIFF header so that the rest of libtiff knows what - * size of data will be passed between app and library, and - * assume that the app knows what it is doing and is not - * confused by these header manipulations... - */ - switch (sp->user_datafmt) { - case SGILOGDATAFMT_FLOAT: - bps = 32; - fmt = SAMPLEFORMAT_IEEEFP; - break; - case SGILOGDATAFMT_16BIT: - bps = 16; - fmt = SAMPLEFORMAT_INT; - break; - case SGILOGDATAFMT_RAW: - bps = 32; - fmt = SAMPLEFORMAT_UINT; - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - break; - case SGILOGDATAFMT_8BIT: - bps = 8; - fmt = SAMPLEFORMAT_UINT; - break; - default: - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "Unknown data format %d for LogLuv compression", - sp->user_datafmt); - return (0); - } - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, fmt); - /* - * Must recalculate sizes should bits/sample change. - */ - tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tmsize_t) -1; - tif->tif_scanlinesize = TIFFScanlineSize(tif); - return (1); - case TIFFTAG_SGILOGENCODE: - sp->encode_meth = (int) va_arg(ap, int); - if (sp->encode_meth != SGILOGENCODE_NODITHER && - sp->encode_meth != SGILOGENCODE_RANDITHER) { - TIFFErrorExt(tif->tif_clientdata, module, - "Unknown encoding %d for LogLuv compression", - sp->encode_meth); - return (0); - } - return (1); - default: - return (*sp->vsetparent)(tif, tag, ap); - } -} - -static int -LogLuvVGetField(TIFF* tif, uint32 tag, va_list ap) -{ - LogLuvState *sp = (LogLuvState *)tif->tif_data; - - switch (tag) { - case TIFFTAG_SGILOGDATAFMT: - *va_arg(ap, int*) = sp->user_datafmt; - return (1); - default: - return (*sp->vgetparent)(tif, tag, ap); - } -} - -static const TIFFField LogLuvFields[] = { - { TIFFTAG_SGILOGDATAFMT, 0, 0, TIFF_SHORT, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "SGILogDataFmt", NULL}, - { TIFFTAG_SGILOGENCODE, 0, 0, TIFF_SHORT, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "SGILogEncode", NULL} -}; - -int -TIFFInitSGILog(TIFF* tif, int scheme) -{ - static const char module[] = "TIFFInitSGILog"; - LogLuvState* sp; - - assert(scheme == COMPRESSION_SGILOG24 || scheme == COMPRESSION_SGILOG); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, LogLuvFields, - TIFFArrayCount(LogLuvFields))) { - TIFFErrorExt(tif->tif_clientdata, module, - "Merging SGILog codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8*) _TIFFmalloc(sizeof (LogLuvState)); - if (tif->tif_data == NULL) - goto bad; - sp = (LogLuvState*) tif->tif_data; - _TIFFmemset((void*)sp, 0, sizeof (*sp)); - sp->user_datafmt = SGILOGDATAFMT_UNKNOWN; - sp->encode_meth = (scheme == COMPRESSION_SGILOG24) ? - SGILOGENCODE_RANDITHER : SGILOGENCODE_NODITHER; - sp->tfunc = _logLuvNop; - - /* - * Install codec methods. - * NB: tif_decoderow & tif_encoderow are filled - * in at setup time. - */ - tif->tif_fixuptags = LogLuvFixupTags; - tif->tif_setupdecode = LogLuvSetupDecode; - tif->tif_decodestrip = LogLuvDecodeStrip; - tif->tif_decodetile = LogLuvDecodeTile; - tif->tif_setupencode = LogLuvSetupEncode; - tif->tif_encodestrip = LogLuvEncodeStrip; - tif->tif_encodetile = LogLuvEncodeTile; - tif->tif_close = LogLuvClose; - tif->tif_cleanup = LogLuvCleanup; - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = LogLuvVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = LogLuvVSetField; /* hook for codec tags */ - - return (1); -bad: - TIFFErrorExt(tif->tif_clientdata, module, - "%s: No space for LogLuv state block", tif->tif_name); - return (0); -} -#endif /* LOGLUV_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_lzma.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_lzma.c deleted file mode 100644 index 4ddb04f..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_lzma.c +++ /dev/null @@ -1,493 +0,0 @@ -/* - * Copyright (c) 2010, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef LZMA_SUPPORT -/* - * TIFF Library. - * - * LZMA2 Compression Support - * - * You need an LZMA2 SDK to link with. See http://tukaani.org/xz/ for details. - * - * The codec is derived from ZLIB codec (tif_zip.c). - */ - -#include "tif_predict.h" -#include "lzma.h" - -#include - -/* - * State block for each open TIFF file using LZMA2 compression/decompression. - */ -typedef struct { - TIFFPredictorState predict; - lzma_stream stream; - lzma_filter filters[LZMA_FILTERS_MAX + 1]; - lzma_options_delta opt_delta; /* delta filter options */ - lzma_options_lzma opt_lzma; /* LZMA2 filter options */ - int preset; /* compression level */ - lzma_check check; /* type of the integrity check */ - int state; /* state flags */ -#define LSTATE_INIT_DECODE 0x01 -#define LSTATE_INIT_ENCODE 0x02 - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ -} LZMAState; - -#define LState(tif) ((LZMAState*) (tif)->tif_data) -#define DecoderState(tif) LState(tif) -#define EncoderState(tif) LState(tif) - -static int LZMAEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); -static int LZMADecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s); - -static const char * -LZMAStrerror(lzma_ret ret) -{ - switch (ret) { - case LZMA_OK: - return "operation completed successfully"; - case LZMA_STREAM_END: - return "end of stream was reached"; - case LZMA_NO_CHECK: - return "input stream has no integrity check"; - case LZMA_UNSUPPORTED_CHECK: - return "cannot calculate the integrity check"; - case LZMA_GET_CHECK: - return "integrity check type is now available"; - case LZMA_MEM_ERROR: - return "cannot allocate memory"; - case LZMA_MEMLIMIT_ERROR: - return "memory usage limit was reached"; - case LZMA_FORMAT_ERROR: - return "file format not recognized"; - case LZMA_OPTIONS_ERROR: - return "invalid or unsupported options"; - case LZMA_DATA_ERROR: - return "data is corrupt"; - case LZMA_BUF_ERROR: - return "no progress is possible (stream is truncated or corrupt)"; - case LZMA_PROG_ERROR: - return "programming error"; - default: - return "unidentified liblzma error"; - } -} - -static int -LZMAFixupTags(TIFF* tif) -{ - (void) tif; - return 1; -} - -static int -LZMASetupDecode(TIFF* tif) -{ - LZMAState* sp = DecoderState(tif); - - assert(sp != NULL); - - /* if we were last encoding, terminate this mode */ - if (sp->state & LSTATE_INIT_ENCODE) { - lzma_end(&sp->stream); - sp->state = 0; - } - - sp->state |= LSTATE_INIT_DECODE; - return 1; -} - -/* - * Setup state for decoding a strip. - */ -static int -LZMAPreDecode(TIFF* tif, uint16 s) -{ - static const char module[] = "LZMAPreDecode"; - LZMAState* sp = DecoderState(tif); - lzma_ret ret; - - (void) s; - assert(sp != NULL); - - if( (sp->state & LSTATE_INIT_DECODE) == 0 ) - tif->tif_setupdecode(tif); - - sp->stream.next_in = tif->tif_rawdata; - sp->stream.avail_in = (size_t) tif->tif_rawcc; - if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc) { - TIFFErrorExt(tif->tif_clientdata, module, - "Liblzma cannot deal with buffers this size"); - return 0; - } - - /* - * Disable memory limit when decoding. UINT64_MAX is a flag to disable - * the limit, we are passing (uint64_t)-1 which should be the same. - */ - ret = lzma_stream_decoder(&sp->stream, (uint64_t)-1, 0); - if (ret != LZMA_OK) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error initializing the stream decoder, %s", - LZMAStrerror(ret)); - return 0; - } - return 1; -} - -static int -LZMADecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) -{ - static const char module[] = "LZMADecode"; - LZMAState* sp = DecoderState(tif); - - (void) s; - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_DECODE); - - sp->stream.next_in = tif->tif_rawcp; - sp->stream.avail_in = (size_t) tif->tif_rawcc; - - sp->stream.next_out = op; - sp->stream.avail_out = (size_t) occ; - if ((tmsize_t)sp->stream.avail_out != occ) { - TIFFErrorExt(tif->tif_clientdata, module, - "Liblzma cannot deal with buffers this size"); - return 0; - } - - do { - /* - * Save the current stream state to properly recover from the - * decoding errors later. - */ - const uint8_t *next_in = sp->stream.next_in; - size_t avail_in = sp->stream.avail_in; - - lzma_ret ret = lzma_code(&sp->stream, LZMA_RUN); - if (ret == LZMA_STREAM_END) - break; - if (ret == LZMA_MEMLIMIT_ERROR) { - lzma_ret r = lzma_stream_decoder(&sp->stream, - lzma_memusage(&sp->stream), 0); - if (r != LZMA_OK) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error initializing the stream decoder, %s", - LZMAStrerror(r)); - break; - } - sp->stream.next_in = next_in; - sp->stream.avail_in = avail_in; - continue; - } - if (ret != LZMA_OK) { - TIFFErrorExt(tif->tif_clientdata, module, - "Decoding error at scanline %lu, %s", - (unsigned long) tif->tif_row, LZMAStrerror(ret)); - break; - } - } while (sp->stream.avail_out > 0); - if (sp->stream.avail_out != 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at scanline %lu (short %lu bytes)", - (unsigned long) tif->tif_row, (unsigned long) sp->stream.avail_out); - return 0; - } - - tif->tif_rawcp = (uint8 *)sp->stream.next_in; /* cast away const */ - tif->tif_rawcc = sp->stream.avail_in; - - return 1; -} - -static int -LZMASetupEncode(TIFF* tif) -{ - LZMAState* sp = EncoderState(tif); - - assert(sp != NULL); - if (sp->state & LSTATE_INIT_DECODE) { - lzma_end(&sp->stream); - sp->state = 0; - } - - sp->state |= LSTATE_INIT_ENCODE; - return 1; -} - -/* - * Reset encoding state at the start of a strip. - */ -static int -LZMAPreEncode(TIFF* tif, uint16 s) -{ - static const char module[] = "LZMAPreEncode"; - LZMAState *sp = EncoderState(tif); - - (void) s; - assert(sp != NULL); - if( sp->state != LSTATE_INIT_ENCODE ) - tif->tif_setupencode(tif); - - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = (size_t)tif->tif_rawdatasize; - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) { - TIFFErrorExt(tif->tif_clientdata, module, - "Liblzma cannot deal with buffers this size"); - return 0; - } - return (lzma_stream_encoder(&sp->stream, sp->filters, sp->check) == LZMA_OK); -} - -/* - * Encode a chunk of pixels. - */ -static int -LZMAEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - static const char module[] = "LZMAEncode"; - LZMAState *sp = EncoderState(tif); - - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_ENCODE); - - (void) s; - sp->stream.next_in = bp; - sp->stream.avail_in = (size_t) cc; - if ((tmsize_t)sp->stream.avail_in != cc) { - TIFFErrorExt(tif->tif_clientdata, module, - "Liblzma cannot deal with buffers this size"); - return 0; - } - do { - lzma_ret ret = lzma_code(&sp->stream, LZMA_RUN); - if (ret != LZMA_OK) { - TIFFErrorExt(tif->tif_clientdata, module, - "Encoding error at scanline %lu, %s", - (unsigned long) tif->tif_row, LZMAStrerror(ret)); - return 0; - } - if (sp->stream.avail_out == 0) { - tif->tif_rawcc = tif->tif_rawdatasize; - TIFFFlushData1(tif); - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = (size_t)tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in LZMAPreEncode */ - } - } while (sp->stream.avail_in > 0); - return 1; -} - -/* - * Finish off an encoded strip by flushing the last - * string and tacking on an End Of Information code. - */ -static int -LZMAPostEncode(TIFF* tif) -{ - static const char module[] = "LZMAPostEncode"; - LZMAState *sp = EncoderState(tif); - lzma_ret ret; - - sp->stream.avail_in = 0; - do { - ret = lzma_code(&sp->stream, LZMA_FINISH); - switch (ret) { - case LZMA_STREAM_END: - case LZMA_OK: - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) { - tif->tif_rawcc = - tif->tif_rawdatasize - sp->stream.avail_out; - TIFFFlushData1(tif); - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = (size_t)tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in ZIPPreEncode */ - } - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, "Liblzma error: %s", - LZMAStrerror(ret)); - return 0; - } - } while (ret != LZMA_STREAM_END); - return 1; -} - -static void -LZMACleanup(TIFF* tif) -{ - LZMAState* sp = LState(tif); - - assert(sp != 0); - - (void)TIFFPredictorCleanup(tif); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->state) { - lzma_end(&sp->stream); - sp->state = 0; - } - _TIFFfree(sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int -LZMAVSetField(TIFF* tif, uint32 tag, va_list ap) -{ - static const char module[] = "LZMAVSetField"; - LZMAState* sp = LState(tif); - - switch (tag) { - case TIFFTAG_LZMAPRESET: - sp->preset = (int) va_arg(ap, int); - lzma_lzma_preset(&sp->opt_lzma, sp->preset); - if (sp->state & LSTATE_INIT_ENCODE) { - lzma_ret ret = lzma_stream_encoder(&sp->stream, - sp->filters, - sp->check); - if (ret != LZMA_OK) { - TIFFErrorExt(tif->tif_clientdata, module, - "Liblzma error: %s", - LZMAStrerror(ret)); - } - } - return 1; - default: - return (*sp->vsetparent)(tif, tag, ap); - } - /*NOTREACHED*/ -} - -static int -LZMAVGetField(TIFF* tif, uint32 tag, va_list ap) -{ - LZMAState* sp = LState(tif); - - switch (tag) { - case TIFFTAG_LZMAPRESET: - *va_arg(ap, int*) = sp->preset; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return 1; -} - -static const TIFFField lzmaFields[] = { - { TIFFTAG_LZMAPRESET, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, - FIELD_PSEUDO, TRUE, FALSE, "LZMA2 Compression Preset", NULL }, -}; - -int -TIFFInitLZMA(TIFF* tif, int scheme) -{ - static const char module[] = "TIFFInitLZMA"; - LZMAState* sp; - lzma_stream tmp_stream = LZMA_STREAM_INIT; - - assert( scheme == COMPRESSION_LZMA ); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, lzmaFields, TIFFArrayCount(lzmaFields))) { - TIFFErrorExt(tif->tif_clientdata, module, - "Merging LZMA2 codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8*) _TIFFmalloc(sizeof(LZMAState)); - if (tif->tif_data == NULL) - goto bad; - sp = LState(tif); - memcpy(&sp->stream, &tmp_stream, sizeof(lzma_stream)); - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = LZMAVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = LZMAVSetField; /* hook for codec tags */ - - /* Default values for codec-specific fields */ - sp->preset = LZMA_PRESET_DEFAULT; /* default comp. level */ - sp->check = LZMA_CHECK_NONE; - sp->state = 0; - - /* Data filters. So far we are using delta and LZMA2 filters only. */ - sp->opt_delta.type = LZMA_DELTA_TYPE_BYTE; - /* - * The sample size in bytes seems to be reasonable distance for delta - * filter. - */ - sp->opt_delta.dist = (tif->tif_dir.td_bitspersample % 8) ? - 1 : tif->tif_dir.td_bitspersample / 8; - sp->filters[0].id = LZMA_FILTER_DELTA; - sp->filters[0].options = &sp->opt_delta; - - lzma_lzma_preset(&sp->opt_lzma, sp->preset); - sp->filters[1].id = LZMA_FILTER_LZMA2; - sp->filters[1].options = &sp->opt_lzma; - - sp->filters[2].id = LZMA_VLI_UNKNOWN; - sp->filters[2].options = NULL; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = LZMAFixupTags; - tif->tif_setupdecode = LZMASetupDecode; - tif->tif_predecode = LZMAPreDecode; - tif->tif_decoderow = LZMADecode; - tif->tif_decodestrip = LZMADecode; - tif->tif_decodetile = LZMADecode; - tif->tif_setupencode = LZMASetupEncode; - tif->tif_preencode = LZMAPreEncode; - tif->tif_postencode = LZMAPostEncode; - tif->tif_encoderow = LZMAEncode; - tif->tif_encodestrip = LZMAEncode; - tif->tif_encodetile = LZMAEncode; - tif->tif_cleanup = LZMACleanup; - /* - * Setup predictor setup. - */ - (void) TIFFPredictorInit(tif); - return 1; -bad: - TIFFErrorExt(tif->tif_clientdata, module, - "No space for LZMA2 state block"); - return 0; -} -#endif /* LZMA_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_lzw.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_lzw.c deleted file mode 100644 index ca96d46..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_lzw.c +++ /dev/null @@ -1,1222 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef LZW_SUPPORT -/* - * TIFF Library. - * Rev 5.0 Lempel-Ziv & Welch Compression Support - * - * This code is derived from the compress program whose code is - * derived from software contributed to Berkeley by James A. Woods, - * derived from original work by Spencer Thomas and Joseph Orost. - * - * The original Berkeley copyright notice appears below in its entirety. - */ -#include "tif_predict.h" - -#include - -/* - * NB: The 5.0 spec describes a different algorithm than Aldus - * implements. Specifically, Aldus does code length transitions - * one code earlier than should be done (for real LZW). - * Earlier versions of this library implemented the correct - * LZW algorithm, but emitted codes in a bit order opposite - * to the TIFF spec. Thus, to maintain compatibility w/ Aldus - * we interpret MSB-LSB ordered codes to be images written w/ - * old versions of this library, but otherwise adhere to the - * Aldus "off by one" algorithm. - * - * Future revisions to the TIFF spec are expected to "clarify this issue". - */ -#define LZW_COMPAT /* include backwards compatibility code */ -/* - * Each strip of data is supposed to be terminated by a CODE_EOI. - * If the following #define is included, the decoder will also - * check for end-of-strip w/o seeing this code. This makes the - * library more robust, but also slower. - */ -#define LZW_CHECKEOS /* include checks for strips w/o EOI code */ - -#define MAXCODE(n) ((1L<<(n))-1) -/* - * The TIFF spec specifies that encoded bit - * strings range from 9 to 12 bits. - */ -#define BITS_MIN 9 /* start with 9 bits */ -#define BITS_MAX 12 /* max of 12 bit strings */ -/* predefined codes */ -#define CODE_CLEAR 256 /* code to clear string table */ -#define CODE_EOI 257 /* end-of-information code */ -#define CODE_FIRST 258 /* first free code entry */ -#define CODE_MAX MAXCODE(BITS_MAX) -#define HSIZE 9001L /* 91% occupancy */ -#define HSHIFT (13-8) -#ifdef LZW_COMPAT -/* NB: +1024 is for compatibility with old files */ -#define CSIZE (MAXCODE(BITS_MAX)+1024L) -#else -#define CSIZE (MAXCODE(BITS_MAX)+1L) -#endif - -/* - * State block for each open TIFF file using LZW - * compression/decompression. Note that the predictor - * state block must be first in this data structure. - */ -typedef struct { - TIFFPredictorState predict; /* predictor super class */ - - unsigned short nbits; /* # of bits/code */ - unsigned short maxcode; /* maximum code for lzw_nbits */ - unsigned short free_ent; /* next free entry in hash table */ - unsigned long nextdata; /* next bits of i/o */ - long nextbits; /* # of valid bits in lzw_nextdata */ - - int rw_mode; /* preserve rw_mode from init */ -} LZWBaseState; - -#define lzw_nbits base.nbits -#define lzw_maxcode base.maxcode -#define lzw_free_ent base.free_ent -#define lzw_nextdata base.nextdata -#define lzw_nextbits base.nextbits - -/* - * Encoding-specific state. - */ -typedef uint16 hcode_t; /* codes fit in 16 bits */ -typedef struct { - long hash; - hcode_t code; -} hash_t; - -/* - * Decoding-specific state. - */ -typedef struct code_ent { - struct code_ent *next; - unsigned short length; /* string len, including this token */ - unsigned char value; /* data value */ - unsigned char firstchar; /* first token of string */ -} code_t; - -typedef int (*decodeFunc)(TIFF*, uint8*, tmsize_t, uint16); - -typedef struct { - LZWBaseState base; - - /* Decoding specific data */ - long dec_nbitsmask; /* lzw_nbits 1 bits, right adjusted */ - long dec_restart; /* restart count */ -#ifdef LZW_CHECKEOS - uint64 dec_bitsleft; /* available bits in raw data */ -#endif - decodeFunc dec_decode; /* regular or backwards compatible */ - code_t* dec_codep; /* current recognized code */ - code_t* dec_oldcodep; /* previously recognized code */ - code_t* dec_free_entp; /* next free entry */ - code_t* dec_maxcodep; /* max available entry */ - code_t* dec_codetab; /* kept separate for small machines */ - - /* Encoding specific data */ - int enc_oldcode; /* last code encountered */ - long enc_checkpoint; /* point at which to clear table */ -#define CHECK_GAP 10000 /* enc_ratio check interval */ - long enc_ratio; /* current compression ratio */ - long enc_incount; /* (input) data bytes encoded */ - long enc_outcount; /* encoded (output) bytes */ - uint8* enc_rawlimit; /* bound on tif_rawdata buffer */ - hash_t* enc_hashtab; /* kept separate for small machines */ -} LZWCodecState; - -#define LZWState(tif) ((LZWBaseState*) (tif)->tif_data) -#define DecoderState(tif) ((LZWCodecState*) LZWState(tif)) -#define EncoderState(tif) ((LZWCodecState*) LZWState(tif)) - -static int LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s); -#ifdef LZW_COMPAT -static int LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s); -#endif -static void cl_hash(LZWCodecState*); - -/* - * LZW Decoder. - */ - -#ifdef LZW_CHECKEOS -/* - * This check shouldn't be necessary because each - * strip is suppose to be terminated with CODE_EOI. - */ -#define NextCode(_tif, _sp, _bp, _code, _get) { \ - if ((_sp)->dec_bitsleft < (uint64)nbits) { \ - TIFFWarningExt(_tif->tif_clientdata, module, \ - "LZWDecode: Strip %d not terminated with EOI code", \ - _tif->tif_curstrip); \ - _code = CODE_EOI; \ - } else { \ - _get(_sp,_bp,_code); \ - (_sp)->dec_bitsleft -= nbits; \ - } \ -} -#else -#define NextCode(tif, sp, bp, code, get) get(sp, bp, code) -#endif - -static int -LZWFixupTags(TIFF* tif) -{ - (void) tif; - return (1); -} - -static int -LZWSetupDecode(TIFF* tif) -{ - static const char module[] = "LZWSetupDecode"; - LZWCodecState* sp = DecoderState(tif); - int code; - - if( sp == NULL ) - { - /* - * Allocate state block so tag methods have storage to record - * values. - */ - tif->tif_data = (uint8*) _TIFFmalloc(sizeof(LZWCodecState)); - if (tif->tif_data == NULL) - { - TIFFErrorExt(tif->tif_clientdata, module, "No space for LZW state block"); - return (0); - } - - DecoderState(tif)->dec_codetab = NULL; - DecoderState(tif)->dec_decode = NULL; - - /* - * Setup predictor setup. - */ - (void) TIFFPredictorInit(tif); - - sp = DecoderState(tif); - } - - assert(sp != NULL); - - if (sp->dec_codetab == NULL) { - sp->dec_codetab = (code_t*)_TIFFmalloc(CSIZE*sizeof (code_t)); - if (sp->dec_codetab == NULL) { - TIFFErrorExt(tif->tif_clientdata, module, - "No space for LZW code table"); - return (0); - } - /* - * Pre-load the table. - */ - code = 255; - do { - sp->dec_codetab[code].value = (unsigned char)code; - sp->dec_codetab[code].firstchar = (unsigned char)code; - sp->dec_codetab[code].length = 1; - sp->dec_codetab[code].next = NULL; - } while (code--); - /* - * Zero-out the unused entries - */ - _TIFFmemset(&sp->dec_codetab[CODE_CLEAR], 0, - (CODE_FIRST - CODE_CLEAR) * sizeof (code_t)); - } - return (1); -} - -/* - * Setup state for decoding a strip. - */ -static int -LZWPreDecode(TIFF* tif, uint16 s) -{ - static const char module[] = "LZWPreDecode"; - LZWCodecState *sp = DecoderState(tif); - - (void) s; - assert(sp != NULL); - if( sp->dec_codetab == NULL ) - { - tif->tif_setupdecode( tif ); - if( sp->dec_codetab == NULL ) - return (0); - } - - /* - * Check for old bit-reversed codes. - */ - if (tif->tif_rawcc >= 2 && - tif->tif_rawdata[0] == 0 && (tif->tif_rawdata[1] & 0x1)) { -#ifdef LZW_COMPAT - if (!sp->dec_decode) { - TIFFWarningExt(tif->tif_clientdata, module, - "Old-style LZW codes, convert file"); - /* - * Override default decoding methods with - * ones that deal with the old coding. - * Otherwise the predictor versions set - * above will call the compatibility routines - * through the dec_decode method. - */ - tif->tif_decoderow = LZWDecodeCompat; - tif->tif_decodestrip = LZWDecodeCompat; - tif->tif_decodetile = LZWDecodeCompat; - /* - * If doing horizontal differencing, must - * re-setup the predictor logic since we - * switched the basic decoder methods... - */ - (*tif->tif_setupdecode)(tif); - sp->dec_decode = LZWDecodeCompat; - } - sp->lzw_maxcode = MAXCODE(BITS_MIN); -#else /* !LZW_COMPAT */ - if (!sp->dec_decode) { - TIFFErrorExt(tif->tif_clientdata, module, - "Old-style LZW codes not supported"); - sp->dec_decode = LZWDecode; - } - return (0); -#endif/* !LZW_COMPAT */ - } else { - sp->lzw_maxcode = MAXCODE(BITS_MIN)-1; - sp->dec_decode = LZWDecode; - } - sp->lzw_nbits = BITS_MIN; - sp->lzw_nextbits = 0; - sp->lzw_nextdata = 0; - - sp->dec_restart = 0; - sp->dec_nbitsmask = MAXCODE(BITS_MIN); -#ifdef LZW_CHECKEOS - sp->dec_bitsleft = 0; -#endif - sp->dec_free_entp = sp->dec_codetab + CODE_FIRST; - /* - * Zero entries that are not yet filled in. We do - * this to guard against bogus input data that causes - * us to index into undefined entries. If you can - * come up with a way to safely bounds-check input codes - * while decoding then you can remove this operation. - */ - _TIFFmemset(sp->dec_free_entp, 0, (CSIZE-CODE_FIRST)*sizeof (code_t)); - sp->dec_oldcodep = &sp->dec_codetab[-1]; - sp->dec_maxcodep = &sp->dec_codetab[sp->dec_nbitsmask-1]; - return (1); -} - -/* - * Decode a "hunk of data". - */ -#define GetNextCode(sp, bp, code) { \ - nextdata = (nextdata<<8) | *(bp)++; \ - nextbits += 8; \ - if (nextbits < nbits) { \ - nextdata = (nextdata<<8) | *(bp)++; \ - nextbits += 8; \ - } \ - code = (hcode_t)((nextdata >> (nextbits-nbits)) & nbitsmask); \ - nextbits -= nbits; \ -} - -static void -codeLoop(TIFF* tif, const char* module) -{ - TIFFErrorExt(tif->tif_clientdata, module, - "Bogus encoding, loop in the code table; scanline %d", - tif->tif_row); -} - -static int -LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) -{ - static const char module[] = "LZWDecode"; - LZWCodecState *sp = DecoderState(tif); - char *op = (char*) op0; - long occ = (long) occ0; - char *tp; - unsigned char *bp; - hcode_t code; - int len; - long nbits, nextbits, nbitsmask; - unsigned long nextdata; - code_t *codep, *free_entp, *maxcodep, *oldcodep; - - (void) s; - assert(sp != NULL); - assert(sp->dec_codetab != NULL); - - /* - Fail if value does not fit in long. - */ - if ((tmsize_t) occ != occ0) - return (0); - /* - * Restart interrupted output operation. - */ - if (sp->dec_restart) { - long residue; - - codep = sp->dec_codep; - residue = codep->length - sp->dec_restart; - if (residue > occ) { - /* - * Residue from previous decode is sufficient - * to satisfy decode request. Skip to the - * start of the decoded string, place decoded - * values in the output buffer, and return. - */ - sp->dec_restart += occ; - do { - codep = codep->next; - } while (--residue > occ && codep); - if (codep) { - tp = op + occ; - do { - *--tp = codep->value; - codep = codep->next; - } while (--occ && codep); - } - return (1); - } - /* - * Residue satisfies only part of the decode request. - */ - op += residue; - occ -= residue; - tp = op; - do { - int t; - --tp; - t = codep->value; - codep = codep->next; - *tp = (char)t; - } while (--residue && codep); - sp->dec_restart = 0; - } - - bp = (unsigned char *)tif->tif_rawcp; -#ifdef LZW_CHECKEOS - sp->dec_bitsleft = (((uint64)tif->tif_rawcc) << 3); -#endif - nbits = sp->lzw_nbits; - nextdata = sp->lzw_nextdata; - nextbits = sp->lzw_nextbits; - nbitsmask = sp->dec_nbitsmask; - oldcodep = sp->dec_oldcodep; - free_entp = sp->dec_free_entp; - maxcodep = sp->dec_maxcodep; - - while (occ > 0) { - NextCode(tif, sp, bp, code, GetNextCode); - if (code == CODE_EOI) - break; - if (code == CODE_CLEAR) { - do { - free_entp = sp->dec_codetab + CODE_FIRST; - _TIFFmemset(free_entp, 0, - (CSIZE - CODE_FIRST) * sizeof (code_t)); - nbits = BITS_MIN; - nbitsmask = MAXCODE(BITS_MIN); - maxcodep = sp->dec_codetab + nbitsmask-1; - NextCode(tif, sp, bp, code, GetNextCode); - } while (code == CODE_CLEAR); /* consecutive CODE_CLEAR codes */ - if (code == CODE_EOI) - break; - if (code > CODE_CLEAR) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "LZWDecode: Corrupted LZW table at scanline %d", - tif->tif_row); - return (0); - } - *op++ = (char)code; - occ--; - oldcodep = sp->dec_codetab + code; - continue; - } - codep = sp->dec_codetab + code; - - /* - * Add the new entry to the code table. - */ - if (free_entp < &sp->dec_codetab[0] || - free_entp >= &sp->dec_codetab[CSIZE]) { - TIFFErrorExt(tif->tif_clientdata, module, - "Corrupted LZW table at scanline %d", - tif->tif_row); - return (0); - } - - free_entp->next = oldcodep; - if (free_entp->next < &sp->dec_codetab[0] || - free_entp->next >= &sp->dec_codetab[CSIZE]) { - TIFFErrorExt(tif->tif_clientdata, module, - "Corrupted LZW table at scanline %d", - tif->tif_row); - return (0); - } - free_entp->firstchar = free_entp->next->firstchar; - free_entp->length = free_entp->next->length+1; - free_entp->value = (codep < free_entp) ? - codep->firstchar : free_entp->firstchar; - if (++free_entp > maxcodep) { - if (++nbits > BITS_MAX) /* should not happen */ - nbits = BITS_MAX; - nbitsmask = MAXCODE(nbits); - maxcodep = sp->dec_codetab + nbitsmask-1; - } - oldcodep = codep; - if (code >= 256) { - /* - * Code maps to a string, copy string - * value to output (written in reverse). - */ - if(codep->length == 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Wrong length of decoded string: " - "data probably corrupted at scanline %d", - tif->tif_row); - return (0); - } - if (codep->length > occ) { - /* - * String is too long for decode buffer, - * locate portion that will fit, copy to - * the decode buffer, and setup restart - * logic for the next decoding call. - */ - sp->dec_codep = codep; - do { - codep = codep->next; - } while (codep && codep->length > occ); - if (codep) { - sp->dec_restart = (long)occ; - tp = op + occ; - do { - *--tp = codep->value; - codep = codep->next; - } while (--occ && codep); - if (codep) - codeLoop(tif, module); - } - break; - } - len = codep->length; - tp = op + len; - do { - int t; - --tp; - t = codep->value; - codep = codep->next; - *tp = (char)t; - } while (codep && tp > op); - if (codep) { - codeLoop(tif, module); - break; - } - assert(occ >= len); - op += len; - occ -= len; - } else { - *op++ = (char)code; - occ--; - } - } - - tif->tif_rawcc -= (tmsize_t)( (uint8*) bp - tif->tif_rawcp ); - tif->tif_rawcp = (uint8*) bp; - sp->lzw_nbits = (unsigned short) nbits; - sp->lzw_nextdata = nextdata; - sp->lzw_nextbits = nextbits; - sp->dec_nbitsmask = nbitsmask; - sp->dec_oldcodep = oldcodep; - sp->dec_free_entp = free_entp; - sp->dec_maxcodep = maxcodep; - - if (occ > 0) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at scanline %d (short %I64d bytes)", - tif->tif_row, (unsigned __int64) occ); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at scanline %d (short %llu bytes)", - tif->tif_row, (unsigned long long) occ); -#endif - return (0); - } - return (1); -} - -#ifdef LZW_COMPAT -/* - * Decode a "hunk of data" for old images. - */ -#define GetNextCodeCompat(sp, bp, code) { \ - nextdata |= (unsigned long) *(bp)++ << nextbits; \ - nextbits += 8; \ - if (nextbits < nbits) { \ - nextdata |= (unsigned long) *(bp)++ << nextbits;\ - nextbits += 8; \ - } \ - code = (hcode_t)(nextdata & nbitsmask); \ - nextdata >>= nbits; \ - nextbits -= nbits; \ -} - -static int -LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) -{ - static const char module[] = "LZWDecodeCompat"; - LZWCodecState *sp = DecoderState(tif); - char *op = (char*) op0; - long occ = (long) occ0; - char *tp; - unsigned char *bp; - int code, nbits; - int len; - long nextbits, nextdata, nbitsmask; - code_t *codep, *free_entp, *maxcodep, *oldcodep; - - (void) s; - assert(sp != NULL); - - /* - Fail if value does not fit in long. - */ - if ((tmsize_t) occ != occ0) - return (0); - - /* - * Restart interrupted output operation. - */ - if (sp->dec_restart) { - long residue; - - codep = sp->dec_codep; - residue = codep->length - sp->dec_restart; - if (residue > occ) { - /* - * Residue from previous decode is sufficient - * to satisfy decode request. Skip to the - * start of the decoded string, place decoded - * values in the output buffer, and return. - */ - sp->dec_restart += occ; - do { - codep = codep->next; - } while (--residue > occ); - tp = op + occ; - do { - *--tp = codep->value; - codep = codep->next; - } while (--occ); - return (1); - } - /* - * Residue satisfies only part of the decode request. - */ - op += residue; - occ -= residue; - tp = op; - do { - *--tp = codep->value; - codep = codep->next; - } while (--residue); - sp->dec_restart = 0; - } - - bp = (unsigned char *)tif->tif_rawcp; -#ifdef LZW_CHECKEOS - sp->dec_bitsleft = (((uint64)tif->tif_rawcc) << 3); -#endif - nbits = sp->lzw_nbits; - nextdata = sp->lzw_nextdata; - nextbits = sp->lzw_nextbits; - nbitsmask = sp->dec_nbitsmask; - oldcodep = sp->dec_oldcodep; - free_entp = sp->dec_free_entp; - maxcodep = sp->dec_maxcodep; - - while (occ > 0) { - NextCode(tif, sp, bp, code, GetNextCodeCompat); - if (code == CODE_EOI) - break; - if (code == CODE_CLEAR) { - do { - free_entp = sp->dec_codetab + CODE_FIRST; - _TIFFmemset(free_entp, 0, - (CSIZE - CODE_FIRST) * sizeof (code_t)); - nbits = BITS_MIN; - nbitsmask = MAXCODE(BITS_MIN); - maxcodep = sp->dec_codetab + nbitsmask; - NextCode(tif, sp, bp, code, GetNextCodeCompat); - } while (code == CODE_CLEAR); /* consecutive CODE_CLEAR codes */ - if (code == CODE_EOI) - break; - if (code > CODE_CLEAR) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "LZWDecode: Corrupted LZW table at scanline %d", - tif->tif_row); - return (0); - } - *op++ = (char)code; - occ--; - oldcodep = sp->dec_codetab + code; - continue; - } - codep = sp->dec_codetab + code; - - /* - * Add the new entry to the code table. - */ - if (free_entp < &sp->dec_codetab[0] || - free_entp >= &sp->dec_codetab[CSIZE]) { - TIFFErrorExt(tif->tif_clientdata, module, - "Corrupted LZW table at scanline %d", tif->tif_row); - return (0); - } - - free_entp->next = oldcodep; - if (free_entp->next < &sp->dec_codetab[0] || - free_entp->next >= &sp->dec_codetab[CSIZE]) { - TIFFErrorExt(tif->tif_clientdata, module, - "Corrupted LZW table at scanline %d", tif->tif_row); - return (0); - } - free_entp->firstchar = free_entp->next->firstchar; - free_entp->length = free_entp->next->length+1; - free_entp->value = (codep < free_entp) ? - codep->firstchar : free_entp->firstchar; - if (++free_entp > maxcodep) { - if (++nbits > BITS_MAX) /* should not happen */ - nbits = BITS_MAX; - nbitsmask = MAXCODE(nbits); - maxcodep = sp->dec_codetab + nbitsmask; - } - oldcodep = codep; - if (code >= 256) { - /* - * Code maps to a string, copy string - * value to output (written in reverse). - */ - if(codep->length == 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Wrong length of decoded " - "string: data probably corrupted at scanline %d", - tif->tif_row); - return (0); - } - if (codep->length > occ) { - /* - * String is too long for decode buffer, - * locate portion that will fit, copy to - * the decode buffer, and setup restart - * logic for the next decoding call. - */ - sp->dec_codep = codep; - do { - codep = codep->next; - } while (codep->length > occ); - sp->dec_restart = occ; - tp = op + occ; - do { - *--tp = codep->value; - codep = codep->next; - } while (--occ); - break; - } - len = codep->length; - tp = op + len; - do { - int t; - --tp; - t = codep->value; - codep = codep->next; - *tp = (char)t; - } while (codep && tp > op); - assert(occ >= len); - op += len; - occ -= len; - } else { - *op++ = (char)code; - occ--; - } - } - - tif->tif_rawcc -= (tmsize_t)( (uint8*) bp - tif->tif_rawcp ); - tif->tif_rawcp = (uint8*) bp; - sp->lzw_nbits = (unsigned short)nbits; - sp->lzw_nextdata = nextdata; - sp->lzw_nextbits = nextbits; - sp->dec_nbitsmask = nbitsmask; - sp->dec_oldcodep = oldcodep; - sp->dec_free_entp = free_entp; - sp->dec_maxcodep = maxcodep; - - if (occ > 0) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at scanline %d (short %I64d bytes)", - tif->tif_row, (unsigned __int64) occ); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at scanline %d (short %llu bytes)", - tif->tif_row, (unsigned long long) occ); -#endif - return (0); - } - return (1); -} -#endif /* LZW_COMPAT */ - -/* - * LZW Encoding. - */ - -static int -LZWSetupEncode(TIFF* tif) -{ - static const char module[] = "LZWSetupEncode"; - LZWCodecState* sp = EncoderState(tif); - - assert(sp != NULL); - sp->enc_hashtab = (hash_t*) _TIFFmalloc(HSIZE*sizeof (hash_t)); - if (sp->enc_hashtab == NULL) { - TIFFErrorExt(tif->tif_clientdata, module, - "No space for LZW hash table"); - return (0); - } - return (1); -} - -/* - * Reset encoding state at the start of a strip. - */ -static int -LZWPreEncode(TIFF* tif, uint16 s) -{ - LZWCodecState *sp = EncoderState(tif); - - (void) s; - assert(sp != NULL); - - if( sp->enc_hashtab == NULL ) - { - tif->tif_setupencode( tif ); - } - - sp->lzw_nbits = BITS_MIN; - sp->lzw_maxcode = MAXCODE(BITS_MIN); - sp->lzw_free_ent = CODE_FIRST; - sp->lzw_nextbits = 0; - sp->lzw_nextdata = 0; - sp->enc_checkpoint = CHECK_GAP; - sp->enc_ratio = 0; - sp->enc_incount = 0; - sp->enc_outcount = 0; - /* - * The 4 here insures there is space for 2 max-sized - * codes in LZWEncode and LZWPostDecode. - */ - sp->enc_rawlimit = tif->tif_rawdata + tif->tif_rawdatasize-1 - 4; - cl_hash(sp); /* clear hash table */ - sp->enc_oldcode = (hcode_t) -1; /* generates CODE_CLEAR in LZWEncode */ - return (1); -} - -#define CALCRATIO(sp, rat) { \ - if (incount > 0x007fffff) { /* NB: shift will overflow */\ - rat = outcount >> 8; \ - rat = (rat == 0 ? 0x7fffffff : incount/rat); \ - } else \ - rat = (incount<<8) / outcount; \ -} - -/* Explicit 0xff masking to make icc -check=conversions happy */ -#define PutNextCode(op, c) { \ - nextdata = (nextdata << nbits) | c; \ - nextbits += nbits; \ - *op++ = (unsigned char)((nextdata >> (nextbits-8))&0xff); \ - nextbits -= 8; \ - if (nextbits >= 8) { \ - *op++ = (unsigned char)((nextdata >> (nextbits-8))&0xff); \ - nextbits -= 8; \ - } \ - outcount += nbits; \ -} - -/* - * Encode a chunk of pixels. - * - * Uses an open addressing double hashing (no chaining) on the - * prefix code/next 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. Here, the modular division - * first probe is gives way to a faster exclusive-or manipulation. - * Also do block compression with an adaptive reset, whereby the - * code table is cleared when the compression ratio decreases, - * but after the table fills. The variable-length output codes - * are re-sized at this point, and a CODE_CLEAR is generated - * for the decoder. - */ -static int -LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - register LZWCodecState *sp = EncoderState(tif); - register long fcode; - register hash_t *hp; - register int h, c; - hcode_t ent; - long disp; - long incount, outcount, checkpoint; - unsigned long nextdata; - long nextbits; - int free_ent, maxcode, nbits; - uint8* op; - uint8* limit; - - (void) s; - if (sp == NULL) - return (0); - - assert(sp->enc_hashtab != NULL); - - /* - * Load local state. - */ - incount = sp->enc_incount; - outcount = sp->enc_outcount; - checkpoint = sp->enc_checkpoint; - nextdata = sp->lzw_nextdata; - nextbits = sp->lzw_nextbits; - free_ent = sp->lzw_free_ent; - maxcode = sp->lzw_maxcode; - nbits = sp->lzw_nbits; - op = tif->tif_rawcp; - limit = sp->enc_rawlimit; - ent = (hcode_t)sp->enc_oldcode; - - if (ent == (hcode_t) -1 && cc > 0) { - /* - * NB: This is safe because it can only happen - * at the start of a strip where we know there - * is space in the data buffer. - */ - PutNextCode(op, CODE_CLEAR); - ent = *bp++; cc--; incount++; - } - while (cc > 0) { - c = *bp++; cc--; incount++; - fcode = ((long)c << BITS_MAX) + ent; - h = (c << HSHIFT) ^ ent; /* xor hashing */ -#ifdef _WINDOWS - /* - * Check hash index for an overflow. - */ - if (h >= HSIZE) - h -= HSIZE; -#endif - hp = &sp->enc_hashtab[h]; - if (hp->hash == fcode) { - ent = hp->code; - continue; - } - if (hp->hash >= 0) { - /* - * Primary hash failed, check secondary hash. - */ - disp = HSIZE - h; - if (h == 0) - disp = 1; - do { - /* - * Avoid pointer arithmetic because of - * wraparound problems with segments. - */ - if ((h -= disp) < 0) - h += HSIZE; - hp = &sp->enc_hashtab[h]; - if (hp->hash == fcode) { - ent = hp->code; - goto hit; - } - } while (hp->hash >= 0); - } - /* - * New entry, emit code and add to table. - */ - /* - * Verify there is space in the buffer for the code - * and any potential Clear code that might be emitted - * below. The value of limit is setup so that there - * are at least 4 bytes free--room for 2 codes. - */ - if (op > limit) { - tif->tif_rawcc = (tmsize_t)(op - tif->tif_rawdata); - if( !TIFFFlushData1(tif) ) - return 0; - op = tif->tif_rawdata; - } - PutNextCode(op, ent); - ent = (hcode_t)c; - hp->code = (hcode_t)(free_ent++); - hp->hash = fcode; - if (free_ent == CODE_MAX-1) { - /* table is full, emit clear code and reset */ - cl_hash(sp); - sp->enc_ratio = 0; - incount = 0; - outcount = 0; - free_ent = CODE_FIRST; - PutNextCode(op, CODE_CLEAR); - nbits = BITS_MIN; - maxcode = MAXCODE(BITS_MIN); - } else { - /* - * If the next entry is going to be too big for - * the code size, then increase it, if possible. - */ - if (free_ent > maxcode) { - nbits++; - assert(nbits <= BITS_MAX); - maxcode = (int) MAXCODE(nbits); - } else if (incount >= checkpoint) { - long rat; - /* - * Check compression ratio and, if things seem - * to be slipping, clear the hash table and - * reset state. The compression ratio is a - * 24+8-bit fractional number. - */ - checkpoint = incount+CHECK_GAP; - CALCRATIO(sp, rat); - if (rat <= sp->enc_ratio) { - cl_hash(sp); - sp->enc_ratio = 0; - incount = 0; - outcount = 0; - free_ent = CODE_FIRST; - PutNextCode(op, CODE_CLEAR); - nbits = BITS_MIN; - maxcode = MAXCODE(BITS_MIN); - } else - sp->enc_ratio = rat; - } - } - hit: - ; - } - - /* - * Restore global state. - */ - sp->enc_incount = incount; - sp->enc_outcount = outcount; - sp->enc_checkpoint = checkpoint; - sp->enc_oldcode = ent; - sp->lzw_nextdata = nextdata; - sp->lzw_nextbits = nextbits; - sp->lzw_free_ent = (unsigned short)free_ent; - sp->lzw_maxcode = (unsigned short)maxcode; - sp->lzw_nbits = (unsigned short)nbits; - tif->tif_rawcp = op; - return (1); -} - -/* - * Finish off an encoded strip by flushing the last - * string and tacking on an End Of Information code. - */ -static int -LZWPostEncode(TIFF* tif) -{ - register LZWCodecState *sp = EncoderState(tif); - uint8* op = tif->tif_rawcp; - long nextbits = sp->lzw_nextbits; - unsigned long nextdata = sp->lzw_nextdata; - long outcount = sp->enc_outcount; - int nbits = sp->lzw_nbits; - - if (op > sp->enc_rawlimit) { - tif->tif_rawcc = (tmsize_t)(op - tif->tif_rawdata); - if( !TIFFFlushData1(tif) ) - return 0; - op = tif->tif_rawdata; - } - if (sp->enc_oldcode != (hcode_t) -1) { - int free_ent = sp->lzw_free_ent; - - PutNextCode(op, sp->enc_oldcode); - sp->enc_oldcode = (hcode_t) -1; - free_ent ++; - - if (free_ent == CODE_MAX-1) { - /* table is full, emit clear code and reset */ - outcount = 0; - PutNextCode(op, CODE_CLEAR); - nbits = BITS_MIN; - } else { - /* - * If the next entry is going to be too big for - * the code size, then increase it, if possible. - */ - if (free_ent > sp->lzw_maxcode) { - nbits++; - assert(nbits <= BITS_MAX); - } - } - } - PutNextCode(op, CODE_EOI); - /* Explicit 0xff masking to make icc -check=conversions happy */ - if (nextbits > 0) - *op++ = (unsigned char)((nextdata << (8-nextbits))&0xff); - tif->tif_rawcc = (tmsize_t)(op - tif->tif_rawdata); - return (1); -} - -/* - * Reset encoding hash table. - */ -static void -cl_hash(LZWCodecState* sp) -{ - register hash_t *hp = &sp->enc_hashtab[HSIZE-1]; - register long i = HSIZE-8; - - do { - i -= 8; - hp[-7].hash = -1; - hp[-6].hash = -1; - hp[-5].hash = -1; - hp[-4].hash = -1; - hp[-3].hash = -1; - hp[-2].hash = -1; - hp[-1].hash = -1; - hp[ 0].hash = -1; - hp -= 8; - } while (i >= 0); - for (i += 8; i > 0; i--, hp--) - hp->hash = -1; -} - -static void -LZWCleanup(TIFF* tif) -{ - (void)TIFFPredictorCleanup(tif); - - assert(tif->tif_data != 0); - - if (DecoderState(tif)->dec_codetab) - _TIFFfree(DecoderState(tif)->dec_codetab); - - if (EncoderState(tif)->enc_hashtab) - _TIFFfree(EncoderState(tif)->enc_hashtab); - - _TIFFfree(tif->tif_data); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -int -TIFFInitLZW(TIFF* tif, int scheme) -{ - static const char module[] = "TIFFInitLZW"; - assert(scheme == COMPRESSION_LZW); - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8*) _TIFFmalloc(sizeof (LZWCodecState)); - if (tif->tif_data == NULL) - goto bad; - DecoderState(tif)->dec_codetab = NULL; - DecoderState(tif)->dec_decode = NULL; - EncoderState(tif)->enc_hashtab = NULL; - LZWState(tif)->rw_mode = tif->tif_mode; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = LZWFixupTags; - tif->tif_setupdecode = LZWSetupDecode; - tif->tif_predecode = LZWPreDecode; - tif->tif_decoderow = LZWDecode; - tif->tif_decodestrip = LZWDecode; - tif->tif_decodetile = LZWDecode; - tif->tif_setupencode = LZWSetupEncode; - tif->tif_preencode = LZWPreEncode; - tif->tif_postencode = LZWPostEncode; - tif->tif_encoderow = LZWEncode; - tif->tif_encodestrip = LZWEncode; - tif->tif_encodetile = LZWEncode; - tif->tif_cleanup = LZWCleanup; - /* - * Setup predictor setup. - */ - (void) TIFFPredictorInit(tif); - return (1); -bad: - TIFFErrorExt(tif->tif_clientdata, module, - "No space for LZW state block"); - return (0); -} - -/* - * Copyright (c) 1985, 1986 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * James A. Woods, derived from original work by Spencer Thomas - * and Joseph Orost. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -#endif /* LZW_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_next.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_next.c deleted file mode 100644 index dde3da6..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_next.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef NEXT_SUPPORT -/* - * TIFF Library. - * - * NeXT 2-bit Grey Scale Compression Algorithm Support - */ - -#define SETPIXEL(op, v) { \ - switch (npixels++ & 3) { \ - case 0: op[0] = (unsigned char) ((v) << 6); break; \ - case 1: op[0] |= (v) << 4; break; \ - case 2: op[0] |= (v) << 2; break; \ - case 3: *op++ |= (v); op_offset++; break; \ - } \ -} - -#define LITERALROW 0x00 -#define LITERALSPAN 0x40 -#define WHITE ((1<<2)-1) - -static int -NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) -{ - static const char module[] = "NeXTDecode"; - unsigned char *bp, *op; - tmsize_t cc; - uint8* row; - tmsize_t scanline, n; - - (void) s; - /* - * Each scanline is assumed to start off as all - * white (we assume a PhotometricInterpretation - * of ``min-is-black''). - */ - for (op = (unsigned char*) buf, cc = occ; cc-- > 0;) - *op++ = 0xff; - - bp = (unsigned char *)tif->tif_rawcp; - cc = tif->tif_rawcc; - scanline = tif->tif_scanlinesize; - if (occ % scanline) - { - TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be read"); - return (0); - } - for (row = buf; cc > 0 && occ > 0; occ -= scanline, row += scanline) { - n = *bp++; - cc--; - switch (n) { - case LITERALROW: - /* - * The entire scanline is given as literal values. - */ - if (cc < scanline) - goto bad; - _TIFFmemcpy(row, bp, scanline); - bp += scanline; - cc -= scanline; - break; - case LITERALSPAN: { - tmsize_t off; - /* - * The scanline has a literal span that begins at some - * offset. - */ - if( cc < 4 ) - goto bad; - off = (bp[0] * 256) + bp[1]; - n = (bp[2] * 256) + bp[3]; - if (cc < 4+n || off+n > scanline) - goto bad; - _TIFFmemcpy(row+off, bp+4, n); - bp += 4+n; - cc -= 4+n; - break; - } - default: { - uint32 npixels = 0, grey; - tmsize_t op_offset = 0; - uint32 imagewidth = tif->tif_dir.td_imagewidth; - if( isTiled(tif) ) - imagewidth = tif->tif_dir.td_tilewidth; - - /* - * The scanline is composed of a sequence of constant - * color ``runs''. We shift into ``run mode'' and - * interpret bytes as codes of the form - * until we've filled the scanline. - */ - op = row; - for (;;) { - grey = (uint32)((n>>6) & 0x3); - n &= 0x3f; - /* - * Ensure the run does not exceed the scanline - * bounds, potentially resulting in a security - * issue. - */ - while (n-- > 0 && npixels < imagewidth && op_offset < scanline) - SETPIXEL(op, grey); - if (npixels >= imagewidth) - break; - if (op_offset >= scanline ) { - TIFFErrorExt(tif->tif_clientdata, module, "Invalid data for scanline %ld", - (long) tif->tif_row); - return (0); - } - if (cc == 0) - goto bad; - n = *bp++; - cc--; - } - break; - } - } - } - tif->tif_rawcp = (uint8*) bp; - tif->tif_rawcc = cc; - return (1); -bad: - TIFFErrorExt(tif->tif_clientdata, module, "Not enough data for scanline %ld", - (long) tif->tif_row); - return (0); -} - -static int -NeXTPreDecode(TIFF* tif, uint16 s) -{ - static const char module[] = "NeXTPreDecode"; - TIFFDirectory *td = &tif->tif_dir; - (void)s; - - if( td->td_bitspersample != 2 ) - { - TIFFErrorExt(tif->tif_clientdata, module, "Unsupported BitsPerSample = %d", - td->td_bitspersample); - return (0); - } - return (1); -} - -int -TIFFInitNeXT(TIFF* tif, int scheme) -{ - (void) scheme; - tif->tif_predecode = NeXTPreDecode; - tif->tif_decoderow = NeXTDecode; - tif->tif_decodestrip = NeXTDecode; - tif->tif_decodetile = NeXTDecode; - return (1); -} -#endif /* NEXT_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_ojpeg.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_ojpeg.c deleted file mode 100644 index 802f43d..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_ojpeg.c +++ /dev/null @@ -1,2561 +0,0 @@ -/* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0 - specification is now totally obsolete and deprecated for new applications and - images. This file was was created solely in order to read unconverted images - still present on some users' computer systems. It will never be extended - to write such files. Writing new-style JPEG compressed TIFFs is implemented - in tif_jpeg.c. - - The code is carefully crafted to robustly read all gathered JPEG-in-TIFF - testfiles, and anticipate as much as possible all other... But still, it may - fail on some. If you encounter problems, please report them on the TIFF - mailing list and/or to Joris Van Damme . - - Please read the file called "TIFF Technical Note #2" if you need to be - convinced this compression scheme is bad and breaks TIFF. That document - is linked to from the LibTiff site - and from AWare Systems' TIFF section - . It is also absorbed - in Adobe's specification supplements, marked "draft" up to this day, but - supported by the TIFF community. - - This file interfaces with Release 6B of the JPEG Library written by the - Independent JPEG Group. Previous versions of this file required a hack inside - the LibJpeg library. This version no longer requires that. Remember to - remove the hack if you update from the old version. - - Copyright (c) Joris Van Damme - Copyright (c) AWare Systems - - The licence agreement for this file is the same as the rest of the LibTiff - library. - - IN NO EVENT SHALL JORIS VAN DAMME OR AWARE SYSTEMS BE LIABLE FOR - ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - OF THIS SOFTWARE. - - Joris Van Damme and/or AWare Systems may be available for custom - development. If you like what you see, and need anything similar or related, - contact . -*/ - -/* What is what, and what is not? - - This decoder starts with an input stream, that is essentially the JpegInterchangeFormat - stream, if any, followed by the strile data, if any. This stream is read in - OJPEGReadByte and related functions. - - It analyzes the start of this stream, until it encounters non-marker data, i.e. - compressed image data. Some of the header markers it sees have no actual content, - like the SOI marker, and APP/COM markers that really shouldn't even be there. Some - other markers do have content, and the valuable bits and pieces of information - in these markers are saved, checking all to verify that the stream is more or - less within expected bounds. This happens inside the OJPEGReadHeaderInfoSecStreamXxx - functions. - - Some OJPEG imagery contains no valid JPEG header markers. This situation is picked - up on if we've seen no SOF marker when we're at the start of the compressed image - data. In this case, the tables are read from JpegXxxTables tags, and the other - bits and pieces of information is initialized to its most basic value. This is - implemented in the OJPEGReadHeaderInfoSecTablesXxx functions. - - When this is complete, a good and valid JPEG header can be assembled, and this is - passed through to LibJpeg. When that's done, the remainder of the input stream, i.e. - the compressed image data, can be passed through unchanged. This is done in - OJPEGWriteStream functions. - - LibTiff rightly expects to know the subsampling values before decompression. Just like - in new-style JPEG-in-TIFF, though, or even more so, actually, the YCbCrsubsampling - tag is notoriously unreliable. To correct these tag values with the ones inside - the JPEG stream, the first part of the input stream is pre-scanned in - OJPEGSubsamplingCorrect, making no note of any other data, reporting no warnings - or errors, up to the point where either these values are read, or it's clear they - aren't there. This means that some of the data is read twice, but we feel speed - in correcting these values is important enough to warrant this sacrifice. Although - there is currently no define or other configuration mechanism to disable this behaviour, - the actual header scanning is build to robustly respond with error report if it - should encounter an uncorrected mismatch of subsampling values. See - OJPEGReadHeaderInfoSecStreamSof. - - The restart interval and restart markers are the most tricky part... The restart - interval can be specified in a tag. It can also be set inside the input JPEG stream. - It can be used inside the input JPEG stream. If reading from strile data, we've - consistently discovered the need to insert restart markers in between the different - striles, as is also probably the most likely interpretation of the original TIFF 6.0 - specification. With all this setting of interval, and actual use of markers that is not - predictable at the time of valid JPEG header assembly, the restart thing may turn - out the Achilles heel of this implementation. Fortunately, most OJPEG writer vendors - succeed in reading back what they write, which may be the reason why we've been able - to discover ways that seem to work. - - Some special provision is made for planarconfig separate OJPEG files. These seem - to consistently contain header info, a SOS marker, a plane, SOS marker, plane, SOS, - and plane. This may or may not be a valid JPEG configuration, we don't know and don't - care. We want LibTiff to be able to access the planes individually, without huge - buffering inside LibJpeg, anyway. So we compose headers to feed to LibJpeg, in this - case, that allow us to pass a single plane such that LibJpeg sees a valid - single-channel JPEG stream. Locating subsequent SOS markers, and thus subsequent - planes, is done inside OJPEGReadSecondarySos. - - The benefit of the scheme is... that it works, basically. We know of no other that - does. It works without checking software tag, or otherwise going about things in an - OJPEG flavor specific manner. Instead, it is a single scheme, that covers the cases - with and without JpegInterchangeFormat, with and without striles, with part of - the header in JpegInterchangeFormat and remainder in first strile, etc. It is forgiving - and robust, may likely work with OJPEG flavors we've not seen yet, and makes most out - of the data. - - Another nice side-effect is that a complete JPEG single valid stream is build if - planarconfig is not separate (vast majority). We may one day use that to build - converters to JPEG, and/or to new-style JPEG compression inside TIFF. - - A disadvantage is the lack of random access to the individual striles. This is the - reason for much of the complicated restart-and-position stuff inside OJPEGPreDecode. - Applications would do well accessing all striles in order, as this will result in - a single sequential scan of the input stream, and no restarting of LibJpeg decoding - session. -*/ - -#define WIN32_LEAN_AND_MEAN -#define VC_EXTRALEAN - -#include "tiffiop.h" -#ifdef OJPEG_SUPPORT - -/* Configuration defines here are: - * JPEG_ENCAP_EXTERNAL: The normal way to call libjpeg, uses longjump. In some environments, - * like eg LibTiffDelphi, this is not possible. For this reason, the actual calls to - * libjpeg, with longjump stuff, are encapsulated in dedicated functions. When - * JPEG_ENCAP_EXTERNAL is defined, these encapsulating functions are declared external - * to this unit, and can be defined elsewhere to use stuff other then longjump. - * The default mode, without JPEG_ENCAP_EXTERNAL, implements the call encapsulators - * here, internally, with normal longjump. - * SETJMP, LONGJMP, JMP_BUF: On some machines/environments a longjump equivalent is - * conveniently available, but still it may be worthwhile to use _setjmp or sigsetjmp - * in place of plain setjmp. These macros will make it easier. It is useless - * to fiddle with these if you define JPEG_ENCAP_EXTERNAL. - * OJPEG_BUFFER: Define the size of the desired buffer here. Should be small enough so as to guarantee - * instant processing, optimal streaming and optimal use of processor cache, but also big - * enough so as to not result in significant call overhead. It should be at least a few - * bytes to accommodate some structures (this is verified in asserts), but it would not be - * sensible to make it this small anyway, and it should be at most 64K since it is indexed - * with uint16. We recommend 2K. - * EGYPTIANWALK: You could also define EGYPTIANWALK here, but it is not used anywhere and has - * absolutely no effect. That is why most people insist the EGYPTIANWALK is a bit silly. - */ - -/* define LIBJPEG_ENCAP_EXTERNAL */ -#define SETJMP(jbuf) setjmp(jbuf) -#define LONGJMP(jbuf,code) longjmp(jbuf,code) -#define JMP_BUF jmp_buf -#define OJPEG_BUFFER 2048 -/* define EGYPTIANWALK */ - -#define JPEG_MARKER_SOF0 0xC0 -#define JPEG_MARKER_SOF1 0xC1 -#define JPEG_MARKER_SOF3 0xC3 -#define JPEG_MARKER_DHT 0xC4 -#define JPEG_MARKER_RST0 0XD0 -#define JPEG_MARKER_SOI 0xD8 -#define JPEG_MARKER_EOI 0xD9 -#define JPEG_MARKER_SOS 0xDA -#define JPEG_MARKER_DQT 0xDB -#define JPEG_MARKER_DRI 0xDD -#define JPEG_MARKER_APP0 0xE0 -#define JPEG_MARKER_COM 0xFE - -#define FIELD_OJPEG_JPEGINTERCHANGEFORMAT (FIELD_CODEC+0) -#define FIELD_OJPEG_JPEGINTERCHANGEFORMATLENGTH (FIELD_CODEC+1) -#define FIELD_OJPEG_JPEGQTABLES (FIELD_CODEC+2) -#define FIELD_OJPEG_JPEGDCTABLES (FIELD_CODEC+3) -#define FIELD_OJPEG_JPEGACTABLES (FIELD_CODEC+4) -#define FIELD_OJPEG_JPEGPROC (FIELD_CODEC+5) -#define FIELD_OJPEG_JPEGRESTARTINTERVAL (FIELD_CODEC+6) - -static const TIFFField ojpegFields[] = { - {TIFFTAG_JPEGIFOFFSET,1,1,TIFF_LONG8,0,TIFF_SETGET_UINT64,TIFF_SETGET_UNDEFINED,FIELD_OJPEG_JPEGINTERCHANGEFORMAT,TRUE,FALSE,"JpegInterchangeFormat",NULL}, - {TIFFTAG_JPEGIFBYTECOUNT,1,1,TIFF_LONG8,0,TIFF_SETGET_UINT64,TIFF_SETGET_UNDEFINED,FIELD_OJPEG_JPEGINTERCHANGEFORMATLENGTH,TRUE,FALSE,"JpegInterchangeFormatLength",NULL}, - {TIFFTAG_JPEGQTABLES,TIFF_VARIABLE2,TIFF_VARIABLE2,TIFF_LONG8,0,TIFF_SETGET_C32_UINT64,TIFF_SETGET_UNDEFINED,FIELD_OJPEG_JPEGQTABLES,FALSE,TRUE,"JpegQTables",NULL}, - {TIFFTAG_JPEGDCTABLES,TIFF_VARIABLE2,TIFF_VARIABLE2,TIFF_LONG8,0,TIFF_SETGET_C32_UINT64,TIFF_SETGET_UNDEFINED,FIELD_OJPEG_JPEGDCTABLES,FALSE,TRUE,"JpegDcTables",NULL}, - {TIFFTAG_JPEGACTABLES,TIFF_VARIABLE2,TIFF_VARIABLE2,TIFF_LONG8,0,TIFF_SETGET_C32_UINT64,TIFF_SETGET_UNDEFINED,FIELD_OJPEG_JPEGACTABLES,FALSE,TRUE,"JpegAcTables",NULL}, - {TIFFTAG_JPEGPROC,1,1,TIFF_SHORT,0,TIFF_SETGET_UINT16,TIFF_SETGET_UNDEFINED,FIELD_OJPEG_JPEGPROC,FALSE,FALSE,"JpegProc",NULL}, - {TIFFTAG_JPEGRESTARTINTERVAL,1,1,TIFF_SHORT,0,TIFF_SETGET_UINT16,TIFF_SETGET_UNDEFINED,FIELD_OJPEG_JPEGRESTARTINTERVAL,FALSE,FALSE,"JpegRestartInterval",NULL}, -}; - -#ifndef LIBJPEG_ENCAP_EXTERNAL -#include -#endif - -/* We undefine FAR to avoid conflict with JPEG definition */ - -#ifdef FAR -#undef FAR -#endif - -/* - Libjpeg's jmorecfg.h defines INT16 and INT32, but only if XMD_H is - not defined. Unfortunately, the MinGW and Borland compilers include - a typedef for INT32, which causes a conflict. MSVC does not include - a conflicting typedef given the headers which are included. -*/ -#if defined(__BORLANDC__) || defined(__MINGW32__) -# define XMD_H 1 -#endif - -/* Define "boolean" as unsigned char, not int, per Windows custom. */ -#if defined(__WIN32__) && !defined(__MINGW32__) -# ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ - typedef unsigned char boolean; -# endif -# define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -#endif - -#include "jpeglib.h" -#include "jerror.h" - -typedef struct jpeg_error_mgr jpeg_error_mgr; -typedef struct jpeg_common_struct jpeg_common_struct; -typedef struct jpeg_decompress_struct jpeg_decompress_struct; -typedef struct jpeg_source_mgr jpeg_source_mgr; - -typedef enum { - osibsNotSetYet, - osibsJpegInterchangeFormat, - osibsStrile, - osibsEof -} OJPEGStateInBufferSource; - -typedef enum { - ososSoi, - ososQTable0,ososQTable1,ososQTable2,ososQTable3, - ososDcTable0,ososDcTable1,ososDcTable2,ososDcTable3, - ososAcTable0,ososAcTable1,ososAcTable2,ososAcTable3, - ososDri, - ososSof, - ososSos, - ososCompressed, - ososRst, - ososEoi -} OJPEGStateOutState; - -typedef struct { - TIFF* tif; - int decoder_ok; - #ifndef LIBJPEG_ENCAP_EXTERNAL - JMP_BUF exit_jmpbuf; - #endif - TIFFVGetMethod vgetparent; - TIFFVSetMethod vsetparent; - TIFFPrintMethod printdir; - uint64 file_size; - uint32 image_width; - uint32 image_length; - uint32 strile_width; - uint32 strile_length; - uint32 strile_length_total; - uint8 samples_per_pixel; - uint8 plane_sample_offset; - uint8 samples_per_pixel_per_plane; - uint64 jpeg_interchange_format; - uint64 jpeg_interchange_format_length; - uint8 jpeg_proc; - uint8 subsamplingcorrect; - uint8 subsamplingcorrect_done; - uint8 subsampling_tag; - uint8 subsampling_hor; - uint8 subsampling_ver; - uint8 subsampling_force_desubsampling_inside_decompression; - uint8 qtable_offset_count; - uint8 dctable_offset_count; - uint8 actable_offset_count; - uint64 qtable_offset[3]; - uint64 dctable_offset[3]; - uint64 actable_offset[3]; - uint8* qtable[4]; - uint8* dctable[4]; - uint8* actable[4]; - uint16 restart_interval; - uint8 restart_index; - uint8 sof_log; - uint8 sof_marker_id; - uint32 sof_x; - uint32 sof_y; - uint8 sof_c[3]; - uint8 sof_hv[3]; - uint8 sof_tq[3]; - uint8 sos_cs[3]; - uint8 sos_tda[3]; - struct { - uint8 log; - OJPEGStateInBufferSource in_buffer_source; - uint32 in_buffer_next_strile; - uint64 in_buffer_file_pos; - uint64 in_buffer_file_togo; - } sos_end[3]; - uint8 readheader_done; - uint8 writeheader_done; - uint16 write_cursample; - uint32 write_curstrile; - uint8 libjpeg_session_active; - uint8 libjpeg_jpeg_query_style; - jpeg_error_mgr libjpeg_jpeg_error_mgr; - jpeg_decompress_struct libjpeg_jpeg_decompress_struct; - jpeg_source_mgr libjpeg_jpeg_source_mgr; - uint8 subsampling_convert_log; - uint32 subsampling_convert_ylinelen; - uint32 subsampling_convert_ylines; - uint32 subsampling_convert_clinelen; - uint32 subsampling_convert_clines; - uint32 subsampling_convert_ybuflen; - uint32 subsampling_convert_cbuflen; - uint32 subsampling_convert_ycbcrbuflen; - uint8* subsampling_convert_ycbcrbuf; - uint8* subsampling_convert_ybuf; - uint8* subsampling_convert_cbbuf; - uint8* subsampling_convert_crbuf; - uint32 subsampling_convert_ycbcrimagelen; - uint8** subsampling_convert_ycbcrimage; - uint32 subsampling_convert_clinelenout; - uint32 subsampling_convert_state; - uint32 bytes_per_line; /* if the codec outputs subsampled data, a 'line' in bytes_per_line */ - uint32 lines_per_strile; /* and lines_per_strile means subsampling_ver desubsampled rows */ - OJPEGStateInBufferSource in_buffer_source; - uint32 in_buffer_next_strile; - uint32 in_buffer_strile_count; - uint64 in_buffer_file_pos; - uint8 in_buffer_file_pos_log; - uint64 in_buffer_file_togo; - uint16 in_buffer_togo; - uint8* in_buffer_cur; - uint8 in_buffer[OJPEG_BUFFER]; - OJPEGStateOutState out_state; - uint8 out_buffer[OJPEG_BUFFER]; - uint8* skip_buffer; -} OJPEGState; - -static int OJPEGVGetField(TIFF* tif, uint32 tag, va_list ap); -static int OJPEGVSetField(TIFF* tif, uint32 tag, va_list ap); -static void OJPEGPrintDir(TIFF* tif, FILE* fd, long flags); - -static int OJPEGFixupTags(TIFF* tif); -static int OJPEGSetupDecode(TIFF* tif); -static int OJPEGPreDecode(TIFF* tif, uint16 s); -static int OJPEGPreDecodeSkipRaw(TIFF* tif); -static int OJPEGPreDecodeSkipScanlines(TIFF* tif); -static int OJPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); -static int OJPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc); -static int OJPEGDecodeScanlines(TIFF* tif, uint8* buf, tmsize_t cc); -static void OJPEGPostDecode(TIFF* tif, uint8* buf, tmsize_t cc); -static int OJPEGSetupEncode(TIFF* tif); -static int OJPEGPreEncode(TIFF* tif, uint16 s); -static int OJPEGEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s); -static int OJPEGPostEncode(TIFF* tif); -static void OJPEGCleanup(TIFF* tif); - -static void OJPEGSubsamplingCorrect(TIFF* tif); -static int OJPEGReadHeaderInfo(TIFF* tif); -static int OJPEGReadSecondarySos(TIFF* tif, uint16 s); -static int OJPEGWriteHeaderInfo(TIFF* tif); -static void OJPEGLibjpegSessionAbort(TIFF* tif); - -static int OJPEGReadHeaderInfoSec(TIFF* tif); -static int OJPEGReadHeaderInfoSecStreamDri(TIFF* tif); -static int OJPEGReadHeaderInfoSecStreamDqt(TIFF* tif); -static int OJPEGReadHeaderInfoSecStreamDht(TIFF* tif); -static int OJPEGReadHeaderInfoSecStreamSof(TIFF* tif, uint8 marker_id); -static int OJPEGReadHeaderInfoSecStreamSos(TIFF* tif); -static int OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif); -static int OJPEGReadHeaderInfoSecTablesDcTable(TIFF* tif); -static int OJPEGReadHeaderInfoSecTablesAcTable(TIFF* tif); - -static int OJPEGReadBufferFill(OJPEGState* sp); -static int OJPEGReadByte(OJPEGState* sp, uint8* byte); -static int OJPEGReadBytePeek(OJPEGState* sp, uint8* byte); -static void OJPEGReadByteAdvance(OJPEGState* sp); -static int OJPEGReadWord(OJPEGState* sp, uint16* word); -static int OJPEGReadBlock(OJPEGState* sp, uint16 len, void* mem); -static void OJPEGReadSkip(OJPEGState* sp, uint16 len); - -static int OJPEGWriteStream(TIFF* tif, void** mem, uint32* len); -static void OJPEGWriteStreamSoi(TIFF* tif, void** mem, uint32* len); -static void OJPEGWriteStreamQTable(TIFF* tif, uint8 table_index, void** mem, uint32* len); -static void OJPEGWriteStreamDcTable(TIFF* tif, uint8 table_index, void** mem, uint32* len); -static void OJPEGWriteStreamAcTable(TIFF* tif, uint8 table_index, void** mem, uint32* len); -static void OJPEGWriteStreamDri(TIFF* tif, void** mem, uint32* len); -static void OJPEGWriteStreamSof(TIFF* tif, void** mem, uint32* len); -static void OJPEGWriteStreamSos(TIFF* tif, void** mem, uint32* len); -static int OJPEGWriteStreamCompressed(TIFF* tif, void** mem, uint32* len); -static void OJPEGWriteStreamRst(TIFF* tif, void** mem, uint32* len); -static void OJPEGWriteStreamEoi(TIFF* tif, void** mem, uint32* len); - -#ifdef LIBJPEG_ENCAP_EXTERNAL -extern int jpeg_create_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo); -extern int jpeg_read_header_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, uint8 require_image); -extern int jpeg_start_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo); -extern int jpeg_read_scanlines_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* scanlines, uint32 max_lines); -extern int jpeg_read_raw_data_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* data, uint32 max_lines); -extern void jpeg_encap_unwind(TIFF* tif); -#else -static int jpeg_create_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* j); -static int jpeg_read_header_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, uint8 require_image); -static int jpeg_start_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo); -static int jpeg_read_scanlines_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* scanlines, uint32 max_lines); -static int jpeg_read_raw_data_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* data, uint32 max_lines); -static void jpeg_encap_unwind(TIFF* tif); -#endif - -static void OJPEGLibjpegJpegErrorMgrOutputMessage(jpeg_common_struct* cinfo); -static void OJPEGLibjpegJpegErrorMgrErrorExit(jpeg_common_struct* cinfo); -static void OJPEGLibjpegJpegSourceMgrInitSource(jpeg_decompress_struct* cinfo); -static boolean OJPEGLibjpegJpegSourceMgrFillInputBuffer(jpeg_decompress_struct* cinfo); -static void OJPEGLibjpegJpegSourceMgrSkipInputData(jpeg_decompress_struct* cinfo, long num_bytes); -static boolean OJPEGLibjpegJpegSourceMgrResyncToRestart(jpeg_decompress_struct* cinfo, int desired); -static void OJPEGLibjpegJpegSourceMgrTermSource(jpeg_decompress_struct* cinfo); - -int -TIFFInitOJPEG(TIFF* tif, int scheme) -{ - static const char module[]="TIFFInitOJPEG"; - OJPEGState* sp; - - assert(scheme==COMPRESSION_OJPEG); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, ojpegFields, TIFFArrayCount(ojpegFields))) { - TIFFErrorExt(tif->tif_clientdata, module, - "Merging Old JPEG codec-specific tags failed"); - return 0; - } - - /* state block */ - sp=_TIFFmalloc(sizeof(OJPEGState)); - if (sp==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"No space for OJPEG state block"); - return(0); - } - _TIFFmemset(sp,0,sizeof(OJPEGState)); - sp->tif=tif; - sp->jpeg_proc=1; - sp->subsampling_hor=2; - sp->subsampling_ver=2; - TIFFSetField(tif,TIFFTAG_YCBCRSUBSAMPLING,2,2); - /* tif codec methods */ - tif->tif_fixuptags=OJPEGFixupTags; - tif->tif_setupdecode=OJPEGSetupDecode; - tif->tif_predecode=OJPEGPreDecode; - tif->tif_postdecode=OJPEGPostDecode; - tif->tif_decoderow=OJPEGDecode; - tif->tif_decodestrip=OJPEGDecode; - tif->tif_decodetile=OJPEGDecode; - tif->tif_setupencode=OJPEGSetupEncode; - tif->tif_preencode=OJPEGPreEncode; - tif->tif_postencode=OJPEGPostEncode; - tif->tif_encoderow=OJPEGEncode; - tif->tif_encodestrip=OJPEGEncode; - tif->tif_encodetile=OJPEGEncode; - tif->tif_cleanup=OJPEGCleanup; - tif->tif_data=(uint8*)sp; - /* tif tag methods */ - sp->vgetparent=tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield=OJPEGVGetField; - sp->vsetparent=tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield=OJPEGVSetField; - sp->printdir=tif->tif_tagmethods.printdir; - tif->tif_tagmethods.printdir=OJPEGPrintDir; - /* Some OJPEG files don't have strip or tile offsets or bytecounts tags. - Some others do, but have totally meaningless or corrupt values - in these tags. In these cases, the JpegInterchangeFormat stream is - reliable. In any case, this decoder reads the compressed data itself, - from the most reliable locations, and we need to notify encapsulating - LibTiff not to read raw strips or tiles for us. */ - tif->tif_flags|=TIFF_NOREADRAW; - return(1); -} - -static int -OJPEGVGetField(TIFF* tif, uint32 tag, va_list ap) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - switch(tag) - { - case TIFFTAG_JPEGIFOFFSET: - *va_arg(ap,uint64*)=(uint64)sp->jpeg_interchange_format; - break; - case TIFFTAG_JPEGIFBYTECOUNT: - *va_arg(ap,uint64*)=(uint64)sp->jpeg_interchange_format_length; - break; - case TIFFTAG_YCBCRSUBSAMPLING: - if (sp->subsamplingcorrect_done==0) - OJPEGSubsamplingCorrect(tif); - *va_arg(ap,uint16*)=(uint16)sp->subsampling_hor; - *va_arg(ap,uint16*)=(uint16)sp->subsampling_ver; - break; - case TIFFTAG_JPEGQTABLES: - *va_arg(ap,uint32*)=(uint32)sp->qtable_offset_count; - *va_arg(ap,void**)=(void*)sp->qtable_offset; - break; - case TIFFTAG_JPEGDCTABLES: - *va_arg(ap,uint32*)=(uint32)sp->dctable_offset_count; - *va_arg(ap,void**)=(void*)sp->dctable_offset; - break; - case TIFFTAG_JPEGACTABLES: - *va_arg(ap,uint32*)=(uint32)sp->actable_offset_count; - *va_arg(ap,void**)=(void*)sp->actable_offset; - break; - case TIFFTAG_JPEGPROC: - *va_arg(ap,uint16*)=(uint16)sp->jpeg_proc; - break; - case TIFFTAG_JPEGRESTARTINTERVAL: - *va_arg(ap,uint16*)=sp->restart_interval; - break; - default: - return (*sp->vgetparent)(tif,tag,ap); - } - return (1); -} - -static int -OJPEGVSetField(TIFF* tif, uint32 tag, va_list ap) -{ - static const char module[]="OJPEGVSetField"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint32 ma; - uint64* mb; - uint32 n; - const TIFFField* fip; - - switch(tag) - { - case TIFFTAG_JPEGIFOFFSET: - sp->jpeg_interchange_format=(uint64)va_arg(ap,uint64); - break; - case TIFFTAG_JPEGIFBYTECOUNT: - sp->jpeg_interchange_format_length=(uint64)va_arg(ap,uint64); - break; - case TIFFTAG_YCBCRSUBSAMPLING: - sp->subsampling_tag=1; - sp->subsampling_hor=(uint8)va_arg(ap,uint16_vap); - sp->subsampling_ver=(uint8)va_arg(ap,uint16_vap); - tif->tif_dir.td_ycbcrsubsampling[0]=sp->subsampling_hor; - tif->tif_dir.td_ycbcrsubsampling[1]=sp->subsampling_ver; - break; - case TIFFTAG_JPEGQTABLES: - ma=(uint32)va_arg(ap,uint32); - if (ma!=0) - { - if (ma>3) - { - TIFFErrorExt(tif->tif_clientdata,module,"JpegQTables tag has incorrect count"); - return(0); - } - sp->qtable_offset_count=(uint8)ma; - mb=(uint64*)va_arg(ap,uint64*); - for (n=0; nqtable_offset[n]=mb[n]; - } - break; - case TIFFTAG_JPEGDCTABLES: - ma=(uint32)va_arg(ap,uint32); - if (ma!=0) - { - if (ma>3) - { - TIFFErrorExt(tif->tif_clientdata,module,"JpegDcTables tag has incorrect count"); - return(0); - } - sp->dctable_offset_count=(uint8)ma; - mb=(uint64*)va_arg(ap,uint64*); - for (n=0; ndctable_offset[n]=mb[n]; - } - break; - case TIFFTAG_JPEGACTABLES: - ma=(uint32)va_arg(ap,uint32); - if (ma!=0) - { - if (ma>3) - { - TIFFErrorExt(tif->tif_clientdata,module,"JpegAcTables tag has incorrect count"); - return(0); - } - sp->actable_offset_count=(uint8)ma; - mb=(uint64*)va_arg(ap,uint64*); - for (n=0; nactable_offset[n]=mb[n]; - } - break; - case TIFFTAG_JPEGPROC: - sp->jpeg_proc=(uint8)va_arg(ap,uint16_vap); - break; - case TIFFTAG_JPEGRESTARTINTERVAL: - sp->restart_interval=(uint16)va_arg(ap,uint16_vap); - break; - default: - return (*sp->vsetparent)(tif,tag,ap); - } - fip = TIFFFieldWithTag(tif,tag); - if( fip == NULL ) /* shouldn't happen */ - return(0); - TIFFSetFieldBit(tif,fip->field_bit); - tif->tif_flags|=TIFF_DIRTYDIRECT; - return(1); -} - -static void -OJPEGPrintDir(TIFF* tif, FILE* fd, long flags) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8 m; - (void)flags; - assert(sp!=NULL); - if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGINTERCHANGEFORMAT)) - fprintf(fd," JpegInterchangeFormat: " TIFF_UINT64_FORMAT "\n",(TIFF_UINT64_T)sp->jpeg_interchange_format); - if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGINTERCHANGEFORMATLENGTH)) - fprintf(fd," JpegInterchangeFormatLength: " TIFF_UINT64_FORMAT "\n",(TIFF_UINT64_T)sp->jpeg_interchange_format_length); - if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGQTABLES)) - { - fprintf(fd," JpegQTables:"); - for (m=0; mqtable_offset_count; m++) - fprintf(fd," " TIFF_UINT64_FORMAT,(TIFF_UINT64_T)sp->qtable_offset[m]); - fprintf(fd,"\n"); - } - if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGDCTABLES)) - { - fprintf(fd," JpegDcTables:"); - for (m=0; mdctable_offset_count; m++) - fprintf(fd," " TIFF_UINT64_FORMAT,(TIFF_UINT64_T)sp->dctable_offset[m]); - fprintf(fd,"\n"); - } - if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGACTABLES)) - { - fprintf(fd," JpegAcTables:"); - for (m=0; mactable_offset_count; m++) - fprintf(fd," " TIFF_UINT64_FORMAT,(TIFF_UINT64_T)sp->actable_offset[m]); - fprintf(fd,"\n"); - } - if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGPROC)) - fprintf(fd," JpegProc: %u\n",(unsigned int)sp->jpeg_proc); - if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGRESTARTINTERVAL)) - fprintf(fd," JpegRestartInterval: %u\n",(unsigned int)sp->restart_interval); - if (sp->printdir) - (*sp->printdir)(tif, fd, flags); -} - -static int -OJPEGFixupTags(TIFF* tif) -{ - (void) tif; - return(1); -} - -static int -OJPEGSetupDecode(TIFF* tif) -{ - static const char module[]="OJPEGSetupDecode"; - TIFFWarningExt(tif->tif_clientdata,module,"Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software"); - return(1); -} - -static int -OJPEGPreDecode(TIFF* tif, uint16 s) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint32 m; - if (sp->subsamplingcorrect_done==0) - OJPEGSubsamplingCorrect(tif); - if (sp->readheader_done==0) - { - if (OJPEGReadHeaderInfo(tif)==0) - return(0); - } - if (sp->sos_end[s].log==0) - { - if (OJPEGReadSecondarySos(tif,s)==0) - return(0); - } - if isTiled(tif) - m=tif->tif_curtile; - else - m=tif->tif_curstrip; - if ((sp->writeheader_done!=0) && ((sp->write_cursample!=s) || (sp->write_curstrile>m))) - { - if (sp->libjpeg_session_active!=0) - OJPEGLibjpegSessionAbort(tif); - sp->writeheader_done=0; - } - if (sp->writeheader_done==0) - { - sp->plane_sample_offset=(uint8)s; - sp->write_cursample=s; - sp->write_curstrile=s*tif->tif_dir.td_stripsperimage; - if ((sp->in_buffer_file_pos_log==0) || - (sp->in_buffer_file_pos-sp->in_buffer_togo!=sp->sos_end[s].in_buffer_file_pos)) - { - sp->in_buffer_source=sp->sos_end[s].in_buffer_source; - sp->in_buffer_next_strile=sp->sos_end[s].in_buffer_next_strile; - sp->in_buffer_file_pos=sp->sos_end[s].in_buffer_file_pos; - sp->in_buffer_file_pos_log=0; - sp->in_buffer_file_togo=sp->sos_end[s].in_buffer_file_togo; - sp->in_buffer_togo=0; - sp->in_buffer_cur=0; - } - if (OJPEGWriteHeaderInfo(tif)==0) - return(0); - } - while (sp->write_curstrilelibjpeg_jpeg_query_style==0) - { - if (OJPEGPreDecodeSkipRaw(tif)==0) - return(0); - } - else - { - if (OJPEGPreDecodeSkipScanlines(tif)==0) - return(0); - } - sp->write_curstrile++; - } - sp->decoder_ok = 1; - return(1); -} - -static int -OJPEGPreDecodeSkipRaw(TIFF* tif) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint32 m; - m=sp->lines_per_strile; - if (sp->subsampling_convert_state!=0) - { - if (sp->subsampling_convert_clines-sp->subsampling_convert_state>=m) - { - sp->subsampling_convert_state+=m; - if (sp->subsampling_convert_state==sp->subsampling_convert_clines) - sp->subsampling_convert_state=0; - return(1); - } - m-=sp->subsampling_convert_clines-sp->subsampling_convert_state; - sp->subsampling_convert_state=0; - } - while (m>=sp->subsampling_convert_clines) - { - if (jpeg_read_raw_data_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),sp->subsampling_convert_ycbcrimage,sp->subsampling_ver*8)==0) - return(0); - m-=sp->subsampling_convert_clines; - } - if (m>0) - { - if (jpeg_read_raw_data_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),sp->subsampling_convert_ycbcrimage,sp->subsampling_ver*8)==0) - return(0); - sp->subsampling_convert_state=m; - } - return(1); -} - -static int -OJPEGPreDecodeSkipScanlines(TIFF* tif) -{ - static const char module[]="OJPEGPreDecodeSkipScanlines"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint32 m; - if (sp->skip_buffer==NULL) - { - sp->skip_buffer=_TIFFmalloc(sp->bytes_per_line); - if (sp->skip_buffer==NULL) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - } - for (m=0; mlines_per_strile; m++) - { - if (jpeg_read_scanlines_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),&sp->skip_buffer,1)==0) - return(0); - } - return(1); -} - -static int -OJPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) -{ - static const char module[]="OJPEGDecode"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - (void)s; - if( !sp->decoder_ok ) - { - TIFFErrorExt(tif->tif_clientdata,module,"Cannot decode: decoder not correctly initialized"); - return 0; - } - if (sp->libjpeg_jpeg_query_style==0) - { - if (OJPEGDecodeRaw(tif,buf,cc)==0) - return(0); - } - else - { - if (OJPEGDecodeScanlines(tif,buf,cc)==0) - return(0); - } - return(1); -} - -static int -OJPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc) -{ - static const char module[]="OJPEGDecodeRaw"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8* m; - tmsize_t n; - uint8* oy; - uint8* ocb; - uint8* ocr; - uint8* p; - uint32 q; - uint8* r; - uint8 sx,sy; - if (cc%sp->bytes_per_line!=0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Fractional scanline not read"); - return(0); - } - assert(cc>0); - m=buf; - n=cc; - do - { - if (sp->subsampling_convert_state==0) - { - if (jpeg_read_raw_data_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),sp->subsampling_convert_ycbcrimage,sp->subsampling_ver*8)==0) - return(0); - } - oy=sp->subsampling_convert_ybuf+sp->subsampling_convert_state*sp->subsampling_ver*sp->subsampling_convert_ylinelen; - ocb=sp->subsampling_convert_cbbuf+sp->subsampling_convert_state*sp->subsampling_convert_clinelen; - ocr=sp->subsampling_convert_crbuf+sp->subsampling_convert_state*sp->subsampling_convert_clinelen; - p=m; - for (q=0; qsubsampling_convert_clinelenout; q++) - { - r=oy; - for (sy=0; sysubsampling_ver; sy++) - { - for (sx=0; sxsubsampling_hor; sx++) - *p++=*r++; - r+=sp->subsampling_convert_ylinelen-sp->subsampling_hor; - } - oy+=sp->subsampling_hor; - *p++=*ocb++; - *p++=*ocr++; - } - sp->subsampling_convert_state++; - if (sp->subsampling_convert_state==sp->subsampling_convert_clines) - sp->subsampling_convert_state=0; - m+=sp->bytes_per_line; - n-=sp->bytes_per_line; - } while(n>0); - return(1); -} - -static int -OJPEGDecodeScanlines(TIFF* tif, uint8* buf, tmsize_t cc) -{ - static const char module[]="OJPEGDecodeScanlines"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8* m; - tmsize_t n; - if (cc%sp->bytes_per_line!=0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Fractional scanline not read"); - return(0); - } - assert(cc>0); - m=buf; - n=cc; - do - { - if (jpeg_read_scanlines_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),&m,1)==0) - return(0); - m+=sp->bytes_per_line; - n-=sp->bytes_per_line; - } while(n>0); - return(1); -} - -static void -OJPEGPostDecode(TIFF* tif, uint8* buf, tmsize_t cc) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - (void)buf; - (void)cc; - sp->write_curstrile++; - if (sp->write_curstrile%tif->tif_dir.td_stripsperimage==0) - { - assert(sp->libjpeg_session_active!=0); - OJPEGLibjpegSessionAbort(tif); - sp->writeheader_done=0; - } -} - -static int -OJPEGSetupEncode(TIFF* tif) -{ - static const char module[]="OJPEGSetupEncode"; - TIFFErrorExt(tif->tif_clientdata,module,"OJPEG encoding not supported; use new-style JPEG compression instead"); - return(0); -} - -static int -OJPEGPreEncode(TIFF* tif, uint16 s) -{ - static const char module[]="OJPEGPreEncode"; - (void)s; - TIFFErrorExt(tif->tif_clientdata,module,"OJPEG encoding not supported; use new-style JPEG compression instead"); - return(0); -} - -static int -OJPEGEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) -{ - static const char module[]="OJPEGEncode"; - (void)buf; - (void)cc; - (void)s; - TIFFErrorExt(tif->tif_clientdata,module,"OJPEG encoding not supported; use new-style JPEG compression instead"); - return(0); -} - -static int -OJPEGPostEncode(TIFF* tif) -{ - static const char module[]="OJPEGPostEncode"; - TIFFErrorExt(tif->tif_clientdata,module,"OJPEG encoding not supported; use new-style JPEG compression instead"); - return(0); -} - -static void -OJPEGCleanup(TIFF* tif) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - if (sp!=0) - { - tif->tif_tagmethods.vgetfield=sp->vgetparent; - tif->tif_tagmethods.vsetfield=sp->vsetparent; - tif->tif_tagmethods.printdir=sp->printdir; - if (sp->qtable[0]!=0) - _TIFFfree(sp->qtable[0]); - if (sp->qtable[1]!=0) - _TIFFfree(sp->qtable[1]); - if (sp->qtable[2]!=0) - _TIFFfree(sp->qtable[2]); - if (sp->qtable[3]!=0) - _TIFFfree(sp->qtable[3]); - if (sp->dctable[0]!=0) - _TIFFfree(sp->dctable[0]); - if (sp->dctable[1]!=0) - _TIFFfree(sp->dctable[1]); - if (sp->dctable[2]!=0) - _TIFFfree(sp->dctable[2]); - if (sp->dctable[3]!=0) - _TIFFfree(sp->dctable[3]); - if (sp->actable[0]!=0) - _TIFFfree(sp->actable[0]); - if (sp->actable[1]!=0) - _TIFFfree(sp->actable[1]); - if (sp->actable[2]!=0) - _TIFFfree(sp->actable[2]); - if (sp->actable[3]!=0) - _TIFFfree(sp->actable[3]); - if (sp->libjpeg_session_active!=0) - OJPEGLibjpegSessionAbort(tif); - if (sp->subsampling_convert_ycbcrbuf!=0) - _TIFFfree(sp->subsampling_convert_ycbcrbuf); - if (sp->subsampling_convert_ycbcrimage!=0) - _TIFFfree(sp->subsampling_convert_ycbcrimage); - if (sp->skip_buffer!=0) - _TIFFfree(sp->skip_buffer); - _TIFFfree(sp); - tif->tif_data=NULL; - _TIFFSetDefaultCompressionState(tif); - } -} - -static void -OJPEGSubsamplingCorrect(TIFF* tif) -{ - static const char module[]="OJPEGSubsamplingCorrect"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8 mh; - uint8 mv; - _TIFFFillStriles( tif ); - - assert(sp->subsamplingcorrect_done==0); - if ((tif->tif_dir.td_samplesperpixel!=3) || ((tif->tif_dir.td_photometric!=PHOTOMETRIC_YCBCR) && - (tif->tif_dir.td_photometric!=PHOTOMETRIC_ITULAB))) - { - if (sp->subsampling_tag!=0) - TIFFWarningExt(tif->tif_clientdata,module,"Subsampling tag not appropriate for this Photometric and/or SamplesPerPixel"); - sp->subsampling_hor=1; - sp->subsampling_ver=1; - sp->subsampling_force_desubsampling_inside_decompression=0; - } - else - { - sp->subsamplingcorrect_done=1; - mh=sp->subsampling_hor; - mv=sp->subsampling_ver; - sp->subsamplingcorrect=1; - OJPEGReadHeaderInfoSec(tif); - if (sp->subsampling_force_desubsampling_inside_decompression!=0) - { - sp->subsampling_hor=1; - sp->subsampling_ver=1; - } - sp->subsamplingcorrect=0; - if (((sp->subsampling_hor!=mh) || (sp->subsampling_ver!=mv)) && (sp->subsampling_force_desubsampling_inside_decompression==0)) - { - if (sp->subsampling_tag==0) - TIFFWarningExt(tif->tif_clientdata,module,"Subsampling tag is not set, yet subsampling inside JPEG data [%d,%d] does not match default values [2,2]; assuming subsampling inside JPEG data is correct",sp->subsampling_hor,sp->subsampling_ver); - else - TIFFWarningExt(tif->tif_clientdata,module,"Subsampling inside JPEG data [%d,%d] does not match subsampling tag values [%d,%d]; assuming subsampling inside JPEG data is correct",sp->subsampling_hor,sp->subsampling_ver,mh,mv); - } - if (sp->subsampling_force_desubsampling_inside_decompression!=0) - { - if (sp->subsampling_tag==0) - TIFFWarningExt(tif->tif_clientdata,module,"Subsampling tag is not set, yet subsampling inside JPEG data does not match default values [2,2] (nor any other values allowed in TIFF); assuming subsampling inside JPEG data is correct and desubsampling inside JPEG decompression"); - else - TIFFWarningExt(tif->tif_clientdata,module,"Subsampling inside JPEG data does not match subsampling tag values [%d,%d] (nor any other values allowed in TIFF); assuming subsampling inside JPEG data is correct and desubsampling inside JPEG decompression",mh,mv); - } - if (sp->subsampling_force_desubsampling_inside_decompression==0) - { - if (sp->subsampling_horsubsampling_ver) - TIFFWarningExt(tif->tif_clientdata,module,"Subsampling values [%d,%d] are not allowed in TIFF",sp->subsampling_hor,sp->subsampling_ver); - } - } - sp->subsamplingcorrect_done=1; -} - -static int -OJPEGReadHeaderInfo(TIFF* tif) -{ - static const char module[]="OJPEGReadHeaderInfo"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - assert(sp->readheader_done==0); - sp->image_width=tif->tif_dir.td_imagewidth; - sp->image_length=tif->tif_dir.td_imagelength; - if isTiled(tif) - { - sp->strile_width=tif->tif_dir.td_tilewidth; - sp->strile_length=tif->tif_dir.td_tilelength; - sp->strile_length_total=((sp->image_length+sp->strile_length-1)/sp->strile_length)*sp->strile_length; - } - else - { - sp->strile_width=sp->image_width; - sp->strile_length=tif->tif_dir.td_rowsperstrip; - sp->strile_length_total=sp->image_length; - } - if (tif->tif_dir.td_samplesperpixel==1) - { - sp->samples_per_pixel=1; - sp->plane_sample_offset=0; - sp->samples_per_pixel_per_plane=sp->samples_per_pixel; - sp->subsampling_hor=1; - sp->subsampling_ver=1; - } - else - { - if (tif->tif_dir.td_samplesperpixel!=3) - { - TIFFErrorExt(tif->tif_clientdata,module,"SamplesPerPixel %d not supported for this compression scheme",sp->samples_per_pixel); - return(0); - } - sp->samples_per_pixel=3; - sp->plane_sample_offset=0; - if (tif->tif_dir.td_planarconfig==PLANARCONFIG_CONTIG) - sp->samples_per_pixel_per_plane=3; - else - sp->samples_per_pixel_per_plane=1; - } - if (sp->strile_lengthimage_length) - { - if (sp->strile_length%(sp->subsampling_ver*8)!=0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Incompatible vertical subsampling and image strip/tile length"); - return(0); - } - sp->restart_interval=(uint16)(((sp->strile_width+sp->subsampling_hor*8-1)/(sp->subsampling_hor*8))*(sp->strile_length/(sp->subsampling_ver*8))); - } - if (OJPEGReadHeaderInfoSec(tif)==0) - return(0); - sp->sos_end[0].log=1; - sp->sos_end[0].in_buffer_source=sp->in_buffer_source; - sp->sos_end[0].in_buffer_next_strile=sp->in_buffer_next_strile; - sp->sos_end[0].in_buffer_file_pos=sp->in_buffer_file_pos-sp->in_buffer_togo; - sp->sos_end[0].in_buffer_file_togo=sp->in_buffer_file_togo+sp->in_buffer_togo; - sp->readheader_done=1; - return(1); -} - -static int -OJPEGReadSecondarySos(TIFF* tif, uint16 s) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8 m; - assert(s>0); - assert(s<3); - assert(sp->sos_end[0].log!=0); - assert(sp->sos_end[s].log==0); - sp->plane_sample_offset=(uint8)(s-1); - while(sp->sos_end[sp->plane_sample_offset].log==0) - sp->plane_sample_offset--; - sp->in_buffer_source=sp->sos_end[sp->plane_sample_offset].in_buffer_source; - sp->in_buffer_next_strile=sp->sos_end[sp->plane_sample_offset].in_buffer_next_strile; - sp->in_buffer_file_pos=sp->sos_end[sp->plane_sample_offset].in_buffer_file_pos; - sp->in_buffer_file_pos_log=0; - sp->in_buffer_file_togo=sp->sos_end[sp->plane_sample_offset].in_buffer_file_togo; - sp->in_buffer_togo=0; - sp->in_buffer_cur=0; - while(sp->plane_sample_offsetplane_sample_offset++; - if (OJPEGReadHeaderInfoSecStreamSos(tif)==0) - return(0); - sp->sos_end[sp->plane_sample_offset].log=1; - sp->sos_end[sp->plane_sample_offset].in_buffer_source=sp->in_buffer_source; - sp->sos_end[sp->plane_sample_offset].in_buffer_next_strile=sp->in_buffer_next_strile; - sp->sos_end[sp->plane_sample_offset].in_buffer_file_pos=sp->in_buffer_file_pos-sp->in_buffer_togo; - sp->sos_end[sp->plane_sample_offset].in_buffer_file_togo=sp->in_buffer_file_togo+sp->in_buffer_togo; - } - return(1); -} - -static int -OJPEGWriteHeaderInfo(TIFF* tif) -{ - static const char module[]="OJPEGWriteHeaderInfo"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8** m; - uint32 n; - /* if a previous attempt failed, don't try again */ - if (sp->libjpeg_session_active != 0) - return 0; - sp->out_state=ososSoi; - sp->restart_index=0; - jpeg_std_error(&(sp->libjpeg_jpeg_error_mgr)); - sp->libjpeg_jpeg_error_mgr.output_message=OJPEGLibjpegJpegErrorMgrOutputMessage; - sp->libjpeg_jpeg_error_mgr.error_exit=OJPEGLibjpegJpegErrorMgrErrorExit; - sp->libjpeg_jpeg_decompress_struct.err=&(sp->libjpeg_jpeg_error_mgr); - sp->libjpeg_jpeg_decompress_struct.client_data=(void*)tif; - if (jpeg_create_decompress_encap(sp,&(sp->libjpeg_jpeg_decompress_struct))==0) - return(0); - sp->libjpeg_session_active=1; - sp->libjpeg_jpeg_source_mgr.bytes_in_buffer=0; - sp->libjpeg_jpeg_source_mgr.init_source=OJPEGLibjpegJpegSourceMgrInitSource; - sp->libjpeg_jpeg_source_mgr.fill_input_buffer=OJPEGLibjpegJpegSourceMgrFillInputBuffer; - sp->libjpeg_jpeg_source_mgr.skip_input_data=OJPEGLibjpegJpegSourceMgrSkipInputData; - sp->libjpeg_jpeg_source_mgr.resync_to_restart=OJPEGLibjpegJpegSourceMgrResyncToRestart; - sp->libjpeg_jpeg_source_mgr.term_source=OJPEGLibjpegJpegSourceMgrTermSource; - sp->libjpeg_jpeg_decompress_struct.src=&(sp->libjpeg_jpeg_source_mgr); - if (jpeg_read_header_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),1)==0) - return(0); - if ((sp->subsampling_force_desubsampling_inside_decompression==0) && (sp->samples_per_pixel_per_plane>1)) - { - sp->libjpeg_jpeg_decompress_struct.raw_data_out=1; -#if JPEG_LIB_VERSION >= 70 - sp->libjpeg_jpeg_decompress_struct.do_fancy_upsampling=FALSE; -#endif - sp->libjpeg_jpeg_query_style=0; - if (sp->subsampling_convert_log==0) - { - assert(sp->subsampling_convert_ycbcrbuf==0); - assert(sp->subsampling_convert_ycbcrimage==0); - sp->subsampling_convert_ylinelen=((sp->strile_width+sp->subsampling_hor*8-1)/(sp->subsampling_hor*8)*sp->subsampling_hor*8); - sp->subsampling_convert_ylines=sp->subsampling_ver*8; - sp->subsampling_convert_clinelen=sp->subsampling_convert_ylinelen/sp->subsampling_hor; - sp->subsampling_convert_clines=8; - sp->subsampling_convert_ybuflen=sp->subsampling_convert_ylinelen*sp->subsampling_convert_ylines; - sp->subsampling_convert_cbuflen=sp->subsampling_convert_clinelen*sp->subsampling_convert_clines; - sp->subsampling_convert_ycbcrbuflen=sp->subsampling_convert_ybuflen+2*sp->subsampling_convert_cbuflen; - sp->subsampling_convert_ycbcrbuf=_TIFFmalloc(sp->subsampling_convert_ycbcrbuflen); - if (sp->subsampling_convert_ycbcrbuf==0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - sp->subsampling_convert_ybuf=sp->subsampling_convert_ycbcrbuf; - sp->subsampling_convert_cbbuf=sp->subsampling_convert_ybuf+sp->subsampling_convert_ybuflen; - sp->subsampling_convert_crbuf=sp->subsampling_convert_cbbuf+sp->subsampling_convert_cbuflen; - sp->subsampling_convert_ycbcrimagelen=3+sp->subsampling_convert_ylines+2*sp->subsampling_convert_clines; - sp->subsampling_convert_ycbcrimage=_TIFFmalloc(sp->subsampling_convert_ycbcrimagelen*sizeof(uint8*)); - if (sp->subsampling_convert_ycbcrimage==0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - m=sp->subsampling_convert_ycbcrimage; - *m++=(uint8*)(sp->subsampling_convert_ycbcrimage+3); - *m++=(uint8*)(sp->subsampling_convert_ycbcrimage+3+sp->subsampling_convert_ylines); - *m++=(uint8*)(sp->subsampling_convert_ycbcrimage+3+sp->subsampling_convert_ylines+sp->subsampling_convert_clines); - for (n=0; nsubsampling_convert_ylines; n++) - *m++=sp->subsampling_convert_ybuf+n*sp->subsampling_convert_ylinelen; - for (n=0; nsubsampling_convert_clines; n++) - *m++=sp->subsampling_convert_cbbuf+n*sp->subsampling_convert_clinelen; - for (n=0; nsubsampling_convert_clines; n++) - *m++=sp->subsampling_convert_crbuf+n*sp->subsampling_convert_clinelen; - sp->subsampling_convert_clinelenout=((sp->strile_width+sp->subsampling_hor-1)/sp->subsampling_hor); - sp->subsampling_convert_state=0; - sp->bytes_per_line=sp->subsampling_convert_clinelenout*(sp->subsampling_ver*sp->subsampling_hor+2); - sp->lines_per_strile=((sp->strile_length+sp->subsampling_ver-1)/sp->subsampling_ver); - sp->subsampling_convert_log=1; - } - } - else - { - sp->libjpeg_jpeg_decompress_struct.jpeg_color_space=JCS_UNKNOWN; - sp->libjpeg_jpeg_decompress_struct.out_color_space=JCS_UNKNOWN; - sp->libjpeg_jpeg_query_style=1; - sp->bytes_per_line=sp->samples_per_pixel_per_plane*sp->strile_width; - sp->lines_per_strile=sp->strile_length; - } - if (jpeg_start_decompress_encap(sp,&(sp->libjpeg_jpeg_decompress_struct))==0) - return(0); - sp->writeheader_done=1; - return(1); -} - -static void -OJPEGLibjpegSessionAbort(TIFF* tif) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - assert(sp->libjpeg_session_active!=0); - jpeg_destroy((jpeg_common_struct*)(&(sp->libjpeg_jpeg_decompress_struct))); - sp->libjpeg_session_active=0; -} - -static int -OJPEGReadHeaderInfoSec(TIFF* tif) -{ - static const char module[]="OJPEGReadHeaderInfoSec"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8 m; - uint16 n; - uint8 o; - if (sp->file_size==0) - sp->file_size=TIFFGetFileSize(tif); - if (sp->jpeg_interchange_format!=0) - { - if (sp->jpeg_interchange_format>=sp->file_size) - { - sp->jpeg_interchange_format=0; - sp->jpeg_interchange_format_length=0; - } - else - { - if ((sp->jpeg_interchange_format_length==0) || (sp->jpeg_interchange_format+sp->jpeg_interchange_format_length>sp->file_size)) - sp->jpeg_interchange_format_length=sp->file_size-sp->jpeg_interchange_format; - } - } - sp->in_buffer_source=osibsNotSetYet; - sp->in_buffer_next_strile=0; - sp->in_buffer_strile_count=tif->tif_dir.td_nstrips; - sp->in_buffer_file_togo=0; - sp->in_buffer_togo=0; - do - { - if (OJPEGReadBytePeek(sp,&m)==0) - return(0); - if (m!=255) - break; - OJPEGReadByteAdvance(sp); - do - { - if (OJPEGReadByte(sp,&m)==0) - return(0); - } while(m==255); - switch(m) - { - case JPEG_MARKER_SOI: - /* this type of marker has no data, and should be skipped */ - break; - case JPEG_MARKER_COM: - case JPEG_MARKER_APP0: - case JPEG_MARKER_APP0+1: - case JPEG_MARKER_APP0+2: - case JPEG_MARKER_APP0+3: - case JPEG_MARKER_APP0+4: - case JPEG_MARKER_APP0+5: - case JPEG_MARKER_APP0+6: - case JPEG_MARKER_APP0+7: - case JPEG_MARKER_APP0+8: - case JPEG_MARKER_APP0+9: - case JPEG_MARKER_APP0+10: - case JPEG_MARKER_APP0+11: - case JPEG_MARKER_APP0+12: - case JPEG_MARKER_APP0+13: - case JPEG_MARKER_APP0+14: - case JPEG_MARKER_APP0+15: - /* this type of marker has data, but it has no use to us (and no place here) and should be skipped */ - if (OJPEGReadWord(sp,&n)==0) - return(0); - if (n<2) - { - if (sp->subsamplingcorrect==0) - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt JPEG data"); - return(0); - } - if (n>2) - OJPEGReadSkip(sp,n-2); - break; - case JPEG_MARKER_DRI: - if (OJPEGReadHeaderInfoSecStreamDri(tif)==0) - return(0); - break; - case JPEG_MARKER_DQT: - if (OJPEGReadHeaderInfoSecStreamDqt(tif)==0) - return(0); - break; - case JPEG_MARKER_DHT: - if (OJPEGReadHeaderInfoSecStreamDht(tif)==0) - return(0); - break; - case JPEG_MARKER_SOF0: - case JPEG_MARKER_SOF1: - case JPEG_MARKER_SOF3: - if (OJPEGReadHeaderInfoSecStreamSof(tif,m)==0) - return(0); - if (sp->subsamplingcorrect!=0) - return(1); - break; - case JPEG_MARKER_SOS: - if (sp->subsamplingcorrect!=0) - return(1); - assert(sp->plane_sample_offset==0); - if (OJPEGReadHeaderInfoSecStreamSos(tif)==0) - return(0); - break; - default: - TIFFErrorExt(tif->tif_clientdata,module,"Unknown marker type %d in JPEG data",m); - return(0); - } - } while(m!=JPEG_MARKER_SOS); - if (sp->subsamplingcorrect) - return(1); - if (sp->sof_log==0) - { - if (OJPEGReadHeaderInfoSecTablesQTable(tif)==0) - return(0); - sp->sof_marker_id=JPEG_MARKER_SOF0; - for (o=0; osamples_per_pixel; o++) - sp->sof_c[o]=o; - sp->sof_hv[0]=((sp->subsampling_hor<<4)|sp->subsampling_ver); - for (o=1; osamples_per_pixel; o++) - sp->sof_hv[o]=17; - sp->sof_x=sp->strile_width; - sp->sof_y=sp->strile_length_total; - sp->sof_log=1; - if (OJPEGReadHeaderInfoSecTablesDcTable(tif)==0) - return(0); - if (OJPEGReadHeaderInfoSecTablesAcTable(tif)==0) - return(0); - for (o=1; osamples_per_pixel; o++) - sp->sos_cs[o]=o; - } - return(1); -} - -static int -OJPEGReadHeaderInfoSecStreamDri(TIFF* tif) -{ - /* This could easily cause trouble in some cases... but no such cases have - occurred so far */ - static const char module[]="OJPEGReadHeaderInfoSecStreamDri"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint16 m; - if (OJPEGReadWord(sp,&m)==0) - return(0); - if (m!=4) - { - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DRI marker in JPEG data"); - return(0); - } - if (OJPEGReadWord(sp,&m)==0) - return(0); - sp->restart_interval=m; - return(1); -} - -static int -OJPEGReadHeaderInfoSecStreamDqt(TIFF* tif) -{ - /* this is a table marker, and it is to be saved as a whole for exact pushing on the jpeg stream later on */ - static const char module[]="OJPEGReadHeaderInfoSecStreamDqt"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint16 m; - uint32 na; - uint8* nb; - uint8 o; - if (OJPEGReadWord(sp,&m)==0) - return(0); - if (m<=2) - { - if (sp->subsamplingcorrect==0) - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DQT marker in JPEG data"); - return(0); - } - if (sp->subsamplingcorrect!=0) - OJPEGReadSkip(sp,m-2); - else - { - m-=2; - do - { - if (m<65) - { - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DQT marker in JPEG data"); - return(0); - } - na=sizeof(uint32)+69; - nb=_TIFFmalloc(na); - if (nb==0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - *(uint32*)nb=na; - nb[sizeof(uint32)]=255; - nb[sizeof(uint32)+1]=JPEG_MARKER_DQT; - nb[sizeof(uint32)+2]=0; - nb[sizeof(uint32)+3]=67; - if (OJPEGReadBlock(sp,65,&nb[sizeof(uint32)+4])==0) { - _TIFFfree(nb); - return(0); - } - o=nb[sizeof(uint32)+4]&15; - if (3tif_clientdata,module,"Corrupt DQT marker in JPEG data"); - _TIFFfree(nb); - return(0); - } - if (sp->qtable[o]!=0) - _TIFFfree(sp->qtable[o]); - sp->qtable[o]=nb; - m-=65; - } while(m>0); - } - return(1); -} - -static int -OJPEGReadHeaderInfoSecStreamDht(TIFF* tif) -{ - /* this is a table marker, and it is to be saved as a whole for exact pushing on the jpeg stream later on */ - /* TODO: the following assumes there is only one table in this marker... but i'm not quite sure that assumption is guaranteed correct */ - static const char module[]="OJPEGReadHeaderInfoSecStreamDht"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint16 m; - uint32 na; - uint8* nb; - uint8 o; - if (OJPEGReadWord(sp,&m)==0) - return(0); - if (m<=2) - { - if (sp->subsamplingcorrect==0) - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DHT marker in JPEG data"); - return(0); - } - if (sp->subsamplingcorrect!=0) - { - OJPEGReadSkip(sp,m-2); - } - else - { - na=sizeof(uint32)+2+m; - nb=_TIFFmalloc(na); - if (nb==0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - *(uint32*)nb=na; - nb[sizeof(uint32)]=255; - nb[sizeof(uint32)+1]=JPEG_MARKER_DHT; - nb[sizeof(uint32)+2]=(m>>8); - nb[sizeof(uint32)+3]=(m&255); - if (OJPEGReadBlock(sp,m-2,&nb[sizeof(uint32)+4])==0) { - _TIFFfree(nb); - return(0); - } - o=nb[sizeof(uint32)+4]; - if ((o&240)==0) - { - if (3tif_clientdata,module,"Corrupt DHT marker in JPEG data"); - _TIFFfree(nb); - return(0); - } - if (sp->dctable[o]!=0) - _TIFFfree(sp->dctable[o]); - sp->dctable[o]=nb; - } - else - { - if ((o&240)!=16) - { - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DHT marker in JPEG data"); - _TIFFfree(nb); - return(0); - } - o&=15; - if (3tif_clientdata,module,"Corrupt DHT marker in JPEG data"); - _TIFFfree(nb); - return(0); - } - if (sp->actable[o]!=0) - _TIFFfree(sp->actable[o]); - sp->actable[o]=nb; - } - } - return(1); -} - -static int -OJPEGReadHeaderInfoSecStreamSof(TIFF* tif, uint8 marker_id) -{ - /* this marker needs to be checked, and part of its data needs to be saved for regeneration later on */ - static const char module[]="OJPEGReadHeaderInfoSecStreamSof"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint16 m; - uint16 n; - uint8 o; - uint16 p; - uint16 q; - if (sp->sof_log!=0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt JPEG data"); - return(0); - } - if (sp->subsamplingcorrect==0) - sp->sof_marker_id=marker_id; - /* Lf: data length */ - if (OJPEGReadWord(sp,&m)==0) - return(0); - if (m<11) - { - if (sp->subsamplingcorrect==0) - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOF marker in JPEG data"); - return(0); - } - m-=8; - if (m%3!=0) - { - if (sp->subsamplingcorrect==0) - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOF marker in JPEG data"); - return(0); - } - n=m/3; - if (sp->subsamplingcorrect==0) - { - if (n!=sp->samples_per_pixel) - { - TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected number of samples"); - return(0); - } - } - /* P: Sample precision */ - if (OJPEGReadByte(sp,&o)==0) - return(0); - if (o!=8) - { - if (sp->subsamplingcorrect==0) - TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected number of bits per sample"); - return(0); - } - /* Y: Number of lines, X: Number of samples per line */ - if (sp->subsamplingcorrect) - OJPEGReadSkip(sp,4); - else - { - /* Y: Number of lines */ - if (OJPEGReadWord(sp,&p)==0) - return(0); - if (((uint32)pimage_length) && ((uint32)pstrile_length_total)) - { - TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected height"); - return(0); - } - sp->sof_y=p; - /* X: Number of samples per line */ - if (OJPEGReadWord(sp,&p)==0) - return(0); - if (((uint32)pimage_width) && ((uint32)pstrile_width)) - { - TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected width"); - return(0); - } - if ((uint32)p>sp->strile_width) - { - TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data image width exceeds expected image width"); - return(0); - } - sp->sof_x=p; - } - /* Nf: Number of image components in frame */ - if (OJPEGReadByte(sp,&o)==0) - return(0); - if (o!=n) - { - if (sp->subsamplingcorrect==0) - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOF marker in JPEG data"); - return(0); - } - /* per component stuff */ - /* TODO: double-check that flow implies that n cannot be as big as to make us overflow sof_c, sof_hv and sof_tq arrays */ - for (q=0; qsubsamplingcorrect==0) - sp->sof_c[q]=o; - /* H: Horizontal sampling factor, and V: Vertical sampling factor */ - if (OJPEGReadByte(sp,&o)==0) - return(0); - if (sp->subsamplingcorrect!=0) - { - if (q==0) - { - sp->subsampling_hor=(o>>4); - sp->subsampling_ver=(o&15); - if (((sp->subsampling_hor!=1) && (sp->subsampling_hor!=2) && (sp->subsampling_hor!=4)) || - ((sp->subsampling_ver!=1) && (sp->subsampling_ver!=2) && (sp->subsampling_ver!=4))) - sp->subsampling_force_desubsampling_inside_decompression=1; - } - else - { - if (o!=17) - sp->subsampling_force_desubsampling_inside_decompression=1; - } - } - else - { - sp->sof_hv[q]=o; - if (sp->subsampling_force_desubsampling_inside_decompression==0) - { - if (q==0) - { - if (o!=((sp->subsampling_hor<<4)|sp->subsampling_ver)) - { - TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected subsampling values"); - return(0); - } - } - else - { - if (o!=17) - { - TIFFErrorExt(tif->tif_clientdata,module,"JPEG compressed data indicates unexpected subsampling values"); - return(0); - } - } - } - } - /* Tq: Quantization table destination selector */ - if (OJPEGReadByte(sp,&o)==0) - return(0); - if (sp->subsamplingcorrect==0) - sp->sof_tq[q]=o; - } - if (sp->subsamplingcorrect==0) - sp->sof_log=1; - return(1); -} - -static int -OJPEGReadHeaderInfoSecStreamSos(TIFF* tif) -{ - /* this marker needs to be checked, and part of its data needs to be saved for regeneration later on */ - static const char module[]="OJPEGReadHeaderInfoSecStreamSos"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint16 m; - uint8 n; - uint8 o; - assert(sp->subsamplingcorrect==0); - if (sp->sof_log==0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOS marker in JPEG data"); - return(0); - } - /* Ls */ - if (OJPEGReadWord(sp,&m)==0) - return(0); - if (m!=6+sp->samples_per_pixel_per_plane*2) - { - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOS marker in JPEG data"); - return(0); - } - /* Ns */ - if (OJPEGReadByte(sp,&n)==0) - return(0); - if (n!=sp->samples_per_pixel_per_plane) - { - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt SOS marker in JPEG data"); - return(0); - } - /* Cs, Td, and Ta */ - for (o=0; osamples_per_pixel_per_plane; o++) - { - /* Cs */ - if (OJPEGReadByte(sp,&n)==0) - return(0); - sp->sos_cs[sp->plane_sample_offset+o]=n; - /* Td and Ta */ - if (OJPEGReadByte(sp,&n)==0) - return(0); - sp->sos_tda[sp->plane_sample_offset+o]=n; - } - /* skip Ss, Se, Ah, en Al -> no check, as per Tom Lane recommendation, as per LibJpeg source */ - OJPEGReadSkip(sp,3); - return(1); -} - -static int -OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif) -{ - static const char module[]="OJPEGReadHeaderInfoSecTablesQTable"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8 m; - uint8 n; - uint32 oa; - uint8* ob; - uint32 p; - if (sp->qtable_offset[0]==0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables"); - return(0); - } - sp->in_buffer_file_pos_log=0; - for (m=0; msamples_per_pixel; m++) - { - if ((sp->qtable_offset[m]!=0) && ((m==0) || (sp->qtable_offset[m]!=sp->qtable_offset[m-1]))) - { - for (n=0; nqtable_offset[m]==sp->qtable_offset[n]) - { - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt JpegQTables tag value"); - return(0); - } - } - oa=sizeof(uint32)+69; - ob=_TIFFmalloc(oa); - if (ob==0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - *(uint32*)ob=oa; - ob[sizeof(uint32)]=255; - ob[sizeof(uint32)+1]=JPEG_MARKER_DQT; - ob[sizeof(uint32)+2]=0; - ob[sizeof(uint32)+3]=67; - ob[sizeof(uint32)+4]=m; - TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); - p=(uint32)TIFFReadFile(tif,&ob[sizeof(uint32)+5],64); - if (p!=64) - { - _TIFFfree(ob); - return(0); - } - if (sp->qtable[m]!=0) - _TIFFfree(sp->qtable[m]); - sp->qtable[m]=ob; - sp->sof_tq[m]=m; - } - else - sp->sof_tq[m]=sp->sof_tq[m-1]; - } - return(1); -} - -static int -OJPEGReadHeaderInfoSecTablesDcTable(TIFF* tif) -{ - static const char module[]="OJPEGReadHeaderInfoSecTablesDcTable"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8 m; - uint8 n; - uint8 o[16]; - uint32 p; - uint32 q; - uint32 ra; - uint8* rb; - if (sp->dctable_offset[0]==0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables"); - return(0); - } - sp->in_buffer_file_pos_log=0; - for (m=0; msamples_per_pixel; m++) - { - if ((sp->dctable_offset[m]!=0) && ((m==0) || (sp->dctable_offset[m]!=sp->dctable_offset[m-1]))) - { - for (n=0; ndctable_offset[m]==sp->dctable_offset[n]) - { - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt JpegDcTables tag value"); - return(0); - } - } - TIFFSeekFile(tif,sp->dctable_offset[m],SEEK_SET); - p=(uint32)TIFFReadFile(tif,o,16); - if (p!=16) - return(0); - q=0; - for (n=0; n<16; n++) - q+=o[n]; - ra=sizeof(uint32)+21+q; - rb=_TIFFmalloc(ra); - if (rb==0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - *(uint32*)rb=ra; - rb[sizeof(uint32)]=255; - rb[sizeof(uint32)+1]=JPEG_MARKER_DHT; - rb[sizeof(uint32)+2]=(uint8)((19+q)>>8); - rb[sizeof(uint32)+3]=((19+q)&255); - rb[sizeof(uint32)+4]=m; - for (n=0; n<16; n++) - rb[sizeof(uint32)+5+n]=o[n]; - p=(uint32)TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q); - if (p!=q) - { - _TIFFfree(rb); - return(0); - } - if (sp->dctable[m]!=0) - _TIFFfree(sp->dctable[m]); - sp->dctable[m]=rb; - sp->sos_tda[m]=(m<<4); - } - else - sp->sos_tda[m]=sp->sos_tda[m-1]; - } - return(1); -} - -static int -OJPEGReadHeaderInfoSecTablesAcTable(TIFF* tif) -{ - static const char module[]="OJPEGReadHeaderInfoSecTablesAcTable"; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8 m; - uint8 n; - uint8 o[16]; - uint32 p; - uint32 q; - uint32 ra; - uint8* rb; - if (sp->actable_offset[0]==0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables"); - return(0); - } - sp->in_buffer_file_pos_log=0; - for (m=0; msamples_per_pixel; m++) - { - if ((sp->actable_offset[m]!=0) && ((m==0) || (sp->actable_offset[m]!=sp->actable_offset[m-1]))) - { - for (n=0; nactable_offset[m]==sp->actable_offset[n]) - { - TIFFErrorExt(tif->tif_clientdata,module,"Corrupt JpegAcTables tag value"); - return(0); - } - } - TIFFSeekFile(tif,sp->actable_offset[m],SEEK_SET); - p=(uint32)TIFFReadFile(tif,o,16); - if (p!=16) - return(0); - q=0; - for (n=0; n<16; n++) - q+=o[n]; - ra=sizeof(uint32)+21+q; - rb=_TIFFmalloc(ra); - if (rb==0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); - } - *(uint32*)rb=ra; - rb[sizeof(uint32)]=255; - rb[sizeof(uint32)+1]=JPEG_MARKER_DHT; - rb[sizeof(uint32)+2]=(uint8)((19+q)>>8); - rb[sizeof(uint32)+3]=((19+q)&255); - rb[sizeof(uint32)+4]=(16|m); - for (n=0; n<16; n++) - rb[sizeof(uint32)+5+n]=o[n]; - p=(uint32)TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q); - if (p!=q) - { - _TIFFfree(rb); - return(0); - } - if (sp->actable[m]!=0) - _TIFFfree(sp->actable[m]); - sp->actable[m]=rb; - sp->sos_tda[m]=(sp->sos_tda[m]|m); - } - else - sp->sos_tda[m]=(sp->sos_tda[m]|(sp->sos_tda[m-1]&15)); - } - return(1); -} - -static int -OJPEGReadBufferFill(OJPEGState* sp) -{ - uint16 m; - tmsize_t n; - /* TODO: double-check: when subsamplingcorrect is set, no call to TIFFErrorExt or TIFFWarningExt should be made - * in any other case, seek or read errors should be passed through */ - do - { - if (sp->in_buffer_file_togo!=0) - { - if (sp->in_buffer_file_pos_log==0) - { - TIFFSeekFile(sp->tif,sp->in_buffer_file_pos,SEEK_SET); - sp->in_buffer_file_pos_log=1; - } - m=OJPEG_BUFFER; - if ((uint64)m>sp->in_buffer_file_togo) - m=(uint16)sp->in_buffer_file_togo; - n=TIFFReadFile(sp->tif,sp->in_buffer,(tmsize_t)m); - if (n==0) - return(0); - assert(n>0); - assert(n<=OJPEG_BUFFER); - assert(n<65536); - assert((uint64)n<=sp->in_buffer_file_togo); - m=(uint16)n; - sp->in_buffer_togo=m; - sp->in_buffer_cur=sp->in_buffer; - sp->in_buffer_file_togo-=m; - sp->in_buffer_file_pos+=m; - break; - } - sp->in_buffer_file_pos_log=0; - switch(sp->in_buffer_source) - { - case osibsNotSetYet: - if (sp->jpeg_interchange_format!=0) - { - sp->in_buffer_file_pos=sp->jpeg_interchange_format; - sp->in_buffer_file_togo=sp->jpeg_interchange_format_length; - } - sp->in_buffer_source=osibsJpegInterchangeFormat; - break; - case osibsJpegInterchangeFormat: - sp->in_buffer_source=osibsStrile; - break; - case osibsStrile: - if (!_TIFFFillStriles( sp->tif ) - || sp->tif->tif_dir.td_stripoffset == NULL - || sp->tif->tif_dir.td_stripbytecount == NULL) - return 0; - - if (sp->in_buffer_next_strile==sp->in_buffer_strile_count) - sp->in_buffer_source=osibsEof; - else - { - sp->in_buffer_file_pos=sp->tif->tif_dir.td_stripoffset[sp->in_buffer_next_strile]; - if (sp->in_buffer_file_pos!=0) - { - if (sp->in_buffer_file_pos>=sp->file_size) - sp->in_buffer_file_pos=0; - else if (sp->tif->tif_dir.td_stripbytecount==NULL) - sp->in_buffer_file_togo=sp->file_size-sp->in_buffer_file_pos; - else - { - if (sp->tif->tif_dir.td_stripbytecount == 0) { - TIFFErrorExt(sp->tif->tif_clientdata,sp->tif->tif_name,"Strip byte counts are missing"); - return(0); - } - sp->in_buffer_file_togo=sp->tif->tif_dir.td_stripbytecount[sp->in_buffer_next_strile]; - if (sp->in_buffer_file_togo==0) - sp->in_buffer_file_pos=0; - else if (sp->in_buffer_file_pos+sp->in_buffer_file_togo>sp->file_size) - sp->in_buffer_file_togo=sp->file_size-sp->in_buffer_file_pos; - } - } - sp->in_buffer_next_strile++; - } - break; - default: - return(0); - } - } while (1); - return(1); -} - -static int -OJPEGReadByte(OJPEGState* sp, uint8* byte) -{ - if (sp->in_buffer_togo==0) - { - if (OJPEGReadBufferFill(sp)==0) - return(0); - assert(sp->in_buffer_togo>0); - } - *byte=*(sp->in_buffer_cur); - sp->in_buffer_cur++; - sp->in_buffer_togo--; - return(1); -} - -static int -OJPEGReadBytePeek(OJPEGState* sp, uint8* byte) -{ - if (sp->in_buffer_togo==0) - { - if (OJPEGReadBufferFill(sp)==0) - return(0); - assert(sp->in_buffer_togo>0); - } - *byte=*(sp->in_buffer_cur); - return(1); -} - -static void -OJPEGReadByteAdvance(OJPEGState* sp) -{ - assert(sp->in_buffer_togo>0); - sp->in_buffer_cur++; - sp->in_buffer_togo--; -} - -static int -OJPEGReadWord(OJPEGState* sp, uint16* word) -{ - uint8 m; - if (OJPEGReadByte(sp,&m)==0) - return(0); - *word=(m<<8); - if (OJPEGReadByte(sp,&m)==0) - return(0); - *word|=m; - return(1); -} - -static int -OJPEGReadBlock(OJPEGState* sp, uint16 len, void* mem) -{ - uint16 mlen; - uint8* mmem; - uint16 n; - assert(len>0); - mlen=len; - mmem=mem; - do - { - if (sp->in_buffer_togo==0) - { - if (OJPEGReadBufferFill(sp)==0) - return(0); - assert(sp->in_buffer_togo>0); - } - n=mlen; - if (n>sp->in_buffer_togo) - n=sp->in_buffer_togo; - _TIFFmemcpy(mmem,sp->in_buffer_cur,n); - sp->in_buffer_cur+=n; - sp->in_buffer_togo-=n; - mlen-=n; - mmem+=n; - } while(mlen>0); - return(1); -} - -static void -OJPEGReadSkip(OJPEGState* sp, uint16 len) -{ - uint16 m; - uint16 n; - m=len; - n=m; - if (n>sp->in_buffer_togo) - n=sp->in_buffer_togo; - sp->in_buffer_cur+=n; - sp->in_buffer_togo-=n; - m-=n; - if (m>0) - { - assert(sp->in_buffer_togo==0); - n=m; - if ((uint64)n>sp->in_buffer_file_togo) - n=(uint16)sp->in_buffer_file_togo; - sp->in_buffer_file_pos+=n; - sp->in_buffer_file_togo-=n; - sp->in_buffer_file_pos_log=0; - /* we don't skip past jpeginterchangeformat/strile block... - * if that is asked from us, we're dealing with totally bazurk - * data anyway, and we've not seen this happening on any - * testfile, so we might as well likely cause some other - * meaningless error to be passed at some later time - */ - } -} - -static int -OJPEGWriteStream(TIFF* tif, void** mem, uint32* len) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - *len=0; - do - { - assert(sp->out_state<=ososEoi); - switch(sp->out_state) - { - case ososSoi: - OJPEGWriteStreamSoi(tif,mem,len); - break; - case ososQTable0: - OJPEGWriteStreamQTable(tif,0,mem,len); - break; - case ososQTable1: - OJPEGWriteStreamQTable(tif,1,mem,len); - break; - case ososQTable2: - OJPEGWriteStreamQTable(tif,2,mem,len); - break; - case ososQTable3: - OJPEGWriteStreamQTable(tif,3,mem,len); - break; - case ososDcTable0: - OJPEGWriteStreamDcTable(tif,0,mem,len); - break; - case ososDcTable1: - OJPEGWriteStreamDcTable(tif,1,mem,len); - break; - case ososDcTable2: - OJPEGWriteStreamDcTable(tif,2,mem,len); - break; - case ososDcTable3: - OJPEGWriteStreamDcTable(tif,3,mem,len); - break; - case ososAcTable0: - OJPEGWriteStreamAcTable(tif,0,mem,len); - break; - case ososAcTable1: - OJPEGWriteStreamAcTable(tif,1,mem,len); - break; - case ososAcTable2: - OJPEGWriteStreamAcTable(tif,2,mem,len); - break; - case ososAcTable3: - OJPEGWriteStreamAcTable(tif,3,mem,len); - break; - case ososDri: - OJPEGWriteStreamDri(tif,mem,len); - break; - case ososSof: - OJPEGWriteStreamSof(tif,mem,len); - break; - case ososSos: - OJPEGWriteStreamSos(tif,mem,len); - break; - case ososCompressed: - if (OJPEGWriteStreamCompressed(tif,mem,len)==0) - return(0); - break; - case ososRst: - OJPEGWriteStreamRst(tif,mem,len); - break; - case ososEoi: - OJPEGWriteStreamEoi(tif,mem,len); - break; - } - } while (*len==0); - return(1); -} - -static void -OJPEGWriteStreamSoi(TIFF* tif, void** mem, uint32* len) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - assert(OJPEG_BUFFER>=2); - sp->out_buffer[0]=255; - sp->out_buffer[1]=JPEG_MARKER_SOI; - *len=2; - *mem=(void*)sp->out_buffer; - sp->out_state++; -} - -static void -OJPEGWriteStreamQTable(TIFF* tif, uint8 table_index, void** mem, uint32* len) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - if (sp->qtable[table_index]!=0) - { - *mem=(void*)(sp->qtable[table_index]+sizeof(uint32)); - *len=*((uint32*)sp->qtable[table_index])-sizeof(uint32); - } - sp->out_state++; -} - -static void -OJPEGWriteStreamDcTable(TIFF* tif, uint8 table_index, void** mem, uint32* len) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - if (sp->dctable[table_index]!=0) - { - *mem=(void*)(sp->dctable[table_index]+sizeof(uint32)); - *len=*((uint32*)sp->dctable[table_index])-sizeof(uint32); - } - sp->out_state++; -} - -static void -OJPEGWriteStreamAcTable(TIFF* tif, uint8 table_index, void** mem, uint32* len) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - if (sp->actable[table_index]!=0) - { - *mem=(void*)(sp->actable[table_index]+sizeof(uint32)); - *len=*((uint32*)sp->actable[table_index])-sizeof(uint32); - } - sp->out_state++; -} - -static void -OJPEGWriteStreamDri(TIFF* tif, void** mem, uint32* len) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - assert(OJPEG_BUFFER>=6); - if (sp->restart_interval!=0) - { - sp->out_buffer[0]=255; - sp->out_buffer[1]=JPEG_MARKER_DRI; - sp->out_buffer[2]=0; - sp->out_buffer[3]=4; - sp->out_buffer[4]=(sp->restart_interval>>8); - sp->out_buffer[5]=(sp->restart_interval&255); - *len=6; - *mem=(void*)sp->out_buffer; - } - sp->out_state++; -} - -static void -OJPEGWriteStreamSof(TIFF* tif, void** mem, uint32* len) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8 m; - assert(OJPEG_BUFFER>=2+8+sp->samples_per_pixel_per_plane*3); - assert(255>=8+sp->samples_per_pixel_per_plane*3); - sp->out_buffer[0]=255; - sp->out_buffer[1]=sp->sof_marker_id; - /* Lf */ - sp->out_buffer[2]=0; - sp->out_buffer[3]=8+sp->samples_per_pixel_per_plane*3; - /* P */ - sp->out_buffer[4]=8; - /* Y */ - sp->out_buffer[5]=(uint8)(sp->sof_y>>8); - sp->out_buffer[6]=(sp->sof_y&255); - /* X */ - sp->out_buffer[7]=(uint8)(sp->sof_x>>8); - sp->out_buffer[8]=(sp->sof_x&255); - /* Nf */ - sp->out_buffer[9]=sp->samples_per_pixel_per_plane; - for (m=0; msamples_per_pixel_per_plane; m++) - { - /* C */ - sp->out_buffer[10+m*3]=sp->sof_c[sp->plane_sample_offset+m]; - /* H and V */ - sp->out_buffer[10+m*3+1]=sp->sof_hv[sp->plane_sample_offset+m]; - /* Tq */ - sp->out_buffer[10+m*3+2]=sp->sof_tq[sp->plane_sample_offset+m]; - } - *len=10+sp->samples_per_pixel_per_plane*3; - *mem=(void*)sp->out_buffer; - sp->out_state++; -} - -static void -OJPEGWriteStreamSos(TIFF* tif, void** mem, uint32* len) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - uint8 m; - assert(OJPEG_BUFFER>=2+6+sp->samples_per_pixel_per_plane*2); - assert(255>=6+sp->samples_per_pixel_per_plane*2); - sp->out_buffer[0]=255; - sp->out_buffer[1]=JPEG_MARKER_SOS; - /* Ls */ - sp->out_buffer[2]=0; - sp->out_buffer[3]=6+sp->samples_per_pixel_per_plane*2; - /* Ns */ - sp->out_buffer[4]=sp->samples_per_pixel_per_plane; - for (m=0; msamples_per_pixel_per_plane; m++) - { - /* Cs */ - sp->out_buffer[5+m*2]=sp->sos_cs[sp->plane_sample_offset+m]; - /* Td and Ta */ - sp->out_buffer[5+m*2+1]=sp->sos_tda[sp->plane_sample_offset+m]; - } - /* Ss */ - sp->out_buffer[5+sp->samples_per_pixel_per_plane*2]=0; - /* Se */ - sp->out_buffer[5+sp->samples_per_pixel_per_plane*2+1]=63; - /* Ah and Al */ - sp->out_buffer[5+sp->samples_per_pixel_per_plane*2+2]=0; - *len=8+sp->samples_per_pixel_per_plane*2; - *mem=(void*)sp->out_buffer; - sp->out_state++; -} - -static int -OJPEGWriteStreamCompressed(TIFF* tif, void** mem, uint32* len) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - if (sp->in_buffer_togo==0) - { - if (OJPEGReadBufferFill(sp)==0) - return(0); - assert(sp->in_buffer_togo>0); - } - *len=sp->in_buffer_togo; - *mem=(void*)sp->in_buffer_cur; - sp->in_buffer_togo=0; - if (sp->in_buffer_file_togo==0) - { - switch(sp->in_buffer_source) - { - case osibsStrile: - if (sp->in_buffer_next_strilein_buffer_strile_count) - sp->out_state=ososRst; - else - sp->out_state=ososEoi; - break; - case osibsEof: - sp->out_state=ososEoi; - break; - default: - break; - } - } - return(1); -} - -static void -OJPEGWriteStreamRst(TIFF* tif, void** mem, uint32* len) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - assert(OJPEG_BUFFER>=2); - sp->out_buffer[0]=255; - sp->out_buffer[1]=JPEG_MARKER_RST0+sp->restart_index; - sp->restart_index++; - if (sp->restart_index==8) - sp->restart_index=0; - *len=2; - *mem=(void*)sp->out_buffer; - sp->out_state=ososCompressed; -} - -static void -OJPEGWriteStreamEoi(TIFF* tif, void** mem, uint32* len) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - assert(OJPEG_BUFFER>=2); - sp->out_buffer[0]=255; - sp->out_buffer[1]=JPEG_MARKER_EOI; - *len=2; - *mem=(void*)sp->out_buffer; -} - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static int -jpeg_create_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo) -{ - if( SETJMP(sp->exit_jmpbuf) ) - return 0; - else { - jpeg_create_decompress(cinfo); - return 1; - } -} -#endif - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static int -jpeg_read_header_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, uint8 require_image) -{ - if( SETJMP(sp->exit_jmpbuf) ) - return 0; - else { - jpeg_read_header(cinfo,require_image); - return 1; - } -} -#endif - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static int -jpeg_start_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo) -{ - if( SETJMP(sp->exit_jmpbuf) ) - return 0; - else { - jpeg_start_decompress(cinfo); - return 1; - } -} -#endif - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static int -jpeg_read_scanlines_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* scanlines, uint32 max_lines) -{ - if( SETJMP(sp->exit_jmpbuf) ) - return 0; - else { - jpeg_read_scanlines(cinfo,scanlines,max_lines); - return 1; - } -} -#endif - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static int -jpeg_read_raw_data_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* data, uint32 max_lines) -{ - if( SETJMP(sp->exit_jmpbuf) ) - return 0; - else { - jpeg_read_raw_data(cinfo,data,max_lines); - return 1; - } -} -#endif - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static void -jpeg_encap_unwind(TIFF* tif) -{ - OJPEGState* sp=(OJPEGState*)tif->tif_data; - LONGJMP(sp->exit_jmpbuf,1); -} -#endif - -static void -OJPEGLibjpegJpegErrorMgrOutputMessage(jpeg_common_struct* cinfo) -{ - char buffer[JMSG_LENGTH_MAX]; - (*cinfo->err->format_message)(cinfo,buffer); - TIFFWarningExt(((TIFF*)(cinfo->client_data))->tif_clientdata,"LibJpeg","%s",buffer); -} - -static void -OJPEGLibjpegJpegErrorMgrErrorExit(jpeg_common_struct* cinfo) -{ - char buffer[JMSG_LENGTH_MAX]; - (*cinfo->err->format_message)(cinfo,buffer); - TIFFErrorExt(((TIFF*)(cinfo->client_data))->tif_clientdata,"LibJpeg","%s",buffer); - jpeg_encap_unwind((TIFF*)(cinfo->client_data)); -} - -static void -OJPEGLibjpegJpegSourceMgrInitSource(jpeg_decompress_struct* cinfo) -{ - (void)cinfo; -} - -static boolean -OJPEGLibjpegJpegSourceMgrFillInputBuffer(jpeg_decompress_struct* cinfo) -{ - TIFF* tif=(TIFF*)cinfo->client_data; - OJPEGState* sp=(OJPEGState*)tif->tif_data; - void* mem=0; - uint32 len=0U; - if (OJPEGWriteStream(tif,&mem,&len)==0) - { - TIFFErrorExt(tif->tif_clientdata,"LibJpeg","Premature end of JPEG data"); - jpeg_encap_unwind(tif); - } - sp->libjpeg_jpeg_source_mgr.bytes_in_buffer=len; - sp->libjpeg_jpeg_source_mgr.next_input_byte=mem; - return(1); -} - -static void -OJPEGLibjpegJpegSourceMgrSkipInputData(jpeg_decompress_struct* cinfo, long num_bytes) -{ - TIFF* tif=(TIFF*)cinfo->client_data; - (void)num_bytes; - TIFFErrorExt(tif->tif_clientdata,"LibJpeg","Unexpected error"); - jpeg_encap_unwind(tif); -} - -#ifdef _MSC_VER -#pragma warning( push ) -#pragma warning( disable : 4702 ) /* unreachable code */ -#endif -static boolean -OJPEGLibjpegJpegSourceMgrResyncToRestart(jpeg_decompress_struct* cinfo, int desired) -{ - TIFF* tif=(TIFF*)cinfo->client_data; - (void)desired; - TIFFErrorExt(tif->tif_clientdata,"LibJpeg","Unexpected error"); - jpeg_encap_unwind(tif); - return(0); -} -#ifdef _MSC_VER -#pragma warning( pop ) -#endif - -static void -OJPEGLibjpegJpegSourceMgrTermSource(jpeg_decompress_struct* cinfo) -{ - (void)cinfo; -} - -#endif - - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_open.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_open.c deleted file mode 100644 index 4b17563..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_open.c +++ /dev/null @@ -1,723 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - */ -#include "tiffiop.h" - -/* - * Dummy functions to fill the omitted client procedures. - */ -static int -_tiffDummyMapProc(thandle_t fd, void** pbase, toff_t* psize) -{ - (void) fd; (void) pbase; (void) psize; - return (0); -} - -static void -_tiffDummyUnmapProc(thandle_t fd, void* base, toff_t size) -{ - (void) fd; (void) base; (void) size; -} - -int -_TIFFgetMode(const char* mode, const char* module) -{ - int m = -1; - - switch (mode[0]) { - case 'r': - m = O_RDONLY; - if (mode[1] == '+') - m = O_RDWR; - break; - case 'w': - case 'a': - m = O_RDWR|O_CREAT; - if (mode[0] == 'w') - m |= O_TRUNC; - break; - default: - TIFFErrorExt(0, module, "\"%s\": Bad mode", mode); - break; - } - return (m); -} - -TIFF* -TIFFClientOpen( - const char* name, const char* mode, - thandle_t clientdata, - TIFFReadWriteProc readproc, - TIFFReadWriteProc writeproc, - TIFFSeekProc seekproc, - TIFFCloseProc closeproc, - TIFFSizeProc sizeproc, - TIFFMapFileProc mapproc, - TIFFUnmapFileProc unmapproc -) -{ - static const char module[] = "TIFFClientOpen"; - TIFF *tif; - int m; - const char* cp; - - /* The following are configuration checks. They should be redundant, but should not - * compile to any actual code in an optimised release build anyway. If any of them - * fail, (makefile-based or other) configuration is not correct */ - assert(sizeof(uint8)==1); - assert(sizeof(int8)==1); - assert(sizeof(uint16)==2); - assert(sizeof(int16)==2); - assert(sizeof(uint32)==4); - assert(sizeof(int32)==4); - assert(sizeof(uint64)==8); - assert(sizeof(int64)==8); - assert(sizeof(tmsize_t)==sizeof(void*)); - { - union{ - uint8 a8[2]; - uint16 a16; - } n; - n.a8[0]=1; - n.a8[1]=0; - #ifdef WORDS_BIGENDIAN - assert(n.a16==256); - #else - assert(n.a16==1); - #endif - } - - m = _TIFFgetMode(mode, module); - if (m == -1) - goto bad2; - tif = (TIFF *)_TIFFmalloc((tmsize_t)(sizeof (TIFF) + strlen(name) + 1)); - if (tif == NULL) { - TIFFErrorExt(clientdata, module, "%s: Out of memory (TIFF structure)", name); - goto bad2; - } - _TIFFmemset(tif, 0, sizeof (*tif)); - tif->tif_name = (char *)tif + sizeof (TIFF); - strcpy(tif->tif_name, name); - tif->tif_mode = m &~ (O_CREAT|O_TRUNC); - tif->tif_curdir = (uint16) -1; /* non-existent directory */ - tif->tif_curoff = 0; - tif->tif_curstrip = (uint32) -1; /* invalid strip */ - tif->tif_row = (uint32) -1; /* read/write pre-increment */ - tif->tif_clientdata = clientdata; - if (!readproc || !writeproc || !seekproc || !closeproc || !sizeproc) { - TIFFErrorExt(clientdata, module, - "One of the client procedures is NULL pointer."); - goto bad2; - } - tif->tif_readproc = readproc; - tif->tif_writeproc = writeproc; - tif->tif_seekproc = seekproc; - tif->tif_closeproc = closeproc; - tif->tif_sizeproc = sizeproc; - if (mapproc) - tif->tif_mapproc = mapproc; - else - tif->tif_mapproc = _tiffDummyMapProc; - if (unmapproc) - tif->tif_unmapproc = unmapproc; - else - tif->tif_unmapproc = _tiffDummyUnmapProc; - _TIFFSetDefaultCompressionState(tif); /* setup default state */ - /* - * Default is to return data MSB2LSB and enable the - * use of memory-mapped files and strip chopping when - * a file is opened read-only. - */ - tif->tif_flags = FILLORDER_MSB2LSB; - if (m == O_RDONLY ) - tif->tif_flags |= TIFF_MAPPED; - - #ifdef STRIPCHOP_DEFAULT - if (m == O_RDONLY || m == O_RDWR) - tif->tif_flags |= STRIPCHOP_DEFAULT; - #endif - - /* - * Process library-specific flags in the open mode string. - * The following flags may be used to control intrinsic library - * behaviour that may or may not be desirable (usually for - * compatibility with some application that claims to support - * TIFF but only supports some brain dead idea of what the - * vendor thinks TIFF is): - * - * 'l' use little-endian byte order for creating a file - * 'b' use big-endian byte order for creating a file - * 'L' read/write information using LSB2MSB bit order - * 'B' read/write information using MSB2LSB bit order - * 'H' read/write information using host bit order - * 'M' enable use of memory-mapped files when supported - * 'm' disable use of memory-mapped files - * 'C' enable strip chopping support when reading - * 'c' disable strip chopping support - * 'h' read TIFF header only, do not load the first IFD - * '4' ClassicTIFF for creating a file (default) - * '8' BigTIFF for creating a file - * - * The use of the 'l' and 'b' flags is strongly discouraged. - * These flags are provided solely because numerous vendors, - * typically on the PC, do not correctly support TIFF; they - * only support the Intel little-endian byte order. This - * support is not configured by default because it supports - * the violation of the TIFF spec that says that readers *MUST* - * support both byte orders. It is strongly recommended that - * you not use this feature except to deal with busted apps - * that write invalid TIFF. And even in those cases you should - * bang on the vendors to fix their software. - * - * The 'L', 'B', and 'H' flags are intended for applications - * that can optimize operations on data by using a particular - * bit order. By default the library returns data in MSB2LSB - * bit order for compatibility with older versions of this - * library. Returning data in the bit order of the native CPU - * makes the most sense but also requires applications to check - * the value of the FillOrder tag; something they probably do - * not do right now. - * - * The 'M' and 'm' flags are provided because some virtual memory - * systems exhibit poor behaviour when large images are mapped. - * These options permit clients to control the use of memory-mapped - * files on a per-file basis. - * - * The 'C' and 'c' flags are provided because the library support - * for chopping up large strips into multiple smaller strips is not - * application-transparent and as such can cause problems. The 'c' - * option permits applications that only want to look at the tags, - * for example, to get the unadulterated TIFF tag information. - */ - for (cp = mode; *cp; cp++) - switch (*cp) { - case 'b': - #ifndef WORDS_BIGENDIAN - if (m&O_CREAT) - tif->tif_flags |= TIFF_SWAB; - #endif - break; - case 'l': - #ifdef WORDS_BIGENDIAN - if ((m&O_CREAT)) - tif->tif_flags |= TIFF_SWAB; - #endif - break; - case 'B': - tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) | - FILLORDER_MSB2LSB; - break; - case 'L': - tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) | - FILLORDER_LSB2MSB; - break; - case 'H': - tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) | - HOST_FILLORDER; - break; - case 'M': - if (m == O_RDONLY) - tif->tif_flags |= TIFF_MAPPED; - break; - case 'm': - if (m == O_RDONLY) - tif->tif_flags &= ~TIFF_MAPPED; - break; - case 'C': - if (m == O_RDONLY) - tif->tif_flags |= TIFF_STRIPCHOP; - break; - case 'c': - if (m == O_RDONLY) - tif->tif_flags &= ~TIFF_STRIPCHOP; - break; - case 'h': - tif->tif_flags |= TIFF_HEADERONLY; - break; - case '8': - if (m&O_CREAT) - tif->tif_flags |= TIFF_BIGTIFF; - break; - } - /* - * Read in TIFF header. - */ - if ((m & O_TRUNC) || - !ReadOK(tif, &tif->tif_header, sizeof (TIFFHeaderClassic))) { - if (tif->tif_mode == O_RDONLY) { - TIFFErrorExt(tif->tif_clientdata, name, - "Cannot read TIFF header"); - goto bad; - } - /* - * Setup header and write. - */ - #ifdef WORDS_BIGENDIAN - tif->tif_header.common.tiff_magic = (tif->tif_flags & TIFF_SWAB) - ? TIFF_LITTLEENDIAN : TIFF_BIGENDIAN; - #else - tif->tif_header.common.tiff_magic = (tif->tif_flags & TIFF_SWAB) - ? TIFF_BIGENDIAN : TIFF_LITTLEENDIAN; - #endif - if (!(tif->tif_flags&TIFF_BIGTIFF)) - { - tif->tif_header.common.tiff_version = TIFF_VERSION_CLASSIC; - tif->tif_header.classic.tiff_diroff = 0; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&tif->tif_header.common.tiff_version); - tif->tif_header_size = sizeof(TIFFHeaderClassic); - } - else - { - tif->tif_header.common.tiff_version = TIFF_VERSION_BIG; - tif->tif_header.big.tiff_offsetsize = 8; - tif->tif_header.big.tiff_unused = 0; - tif->tif_header.big.tiff_diroff = 0; - if (tif->tif_flags & TIFF_SWAB) - { - TIFFSwabShort(&tif->tif_header.common.tiff_version); - TIFFSwabShort(&tif->tif_header.big.tiff_offsetsize); - } - tif->tif_header_size = sizeof (TIFFHeaderBig); - } - /* - * The doc for "fopen" for some STD_C_LIBs says that if you - * open a file for modify ("+"), then you must fseek (or - * fflush?) between any freads and fwrites. This is not - * necessary on most systems, but has been shown to be needed - * on Solaris. - */ - TIFFSeekFile( tif, 0, SEEK_SET ); - if (!WriteOK(tif, &tif->tif_header, (tmsize_t)(tif->tif_header_size))) { - TIFFErrorExt(tif->tif_clientdata, name, - "Error writing TIFF header"); - goto bad; - } - /* - * Setup the byte order handling. - */ - if (tif->tif_header.common.tiff_magic == TIFF_BIGENDIAN) { - #ifndef WORDS_BIGENDIAN - tif->tif_flags |= TIFF_SWAB; - #endif - } else { - #ifdef WORDS_BIGENDIAN - tif->tif_flags |= TIFF_SWAB; - #endif - } - /* - * Setup default directory. - */ - if (!TIFFDefaultDirectory(tif)) - goto bad; - tif->tif_diroff = 0; - tif->tif_dirlist = NULL; - tif->tif_dirlistsize = 0; - tif->tif_dirnumber = 0; - return (tif); - } - /* - * Setup the byte order handling. - */ - if (tif->tif_header.common.tiff_magic != TIFF_BIGENDIAN && - tif->tif_header.common.tiff_magic != TIFF_LITTLEENDIAN - #if MDI_SUPPORT - && - #if HOST_BIGENDIAN - tif->tif_header.common.tiff_magic != MDI_BIGENDIAN - #else - tif->tif_header.common.tiff_magic != MDI_LITTLEENDIAN - #endif - ) { - TIFFErrorExt(tif->tif_clientdata, name, - "Not a TIFF or MDI file, bad magic number %d (0x%x)", - #else - ) { - TIFFErrorExt(tif->tif_clientdata, name, - "Not a TIFF file, bad magic number %d (0x%x)", - #endif - tif->tif_header.common.tiff_magic, - tif->tif_header.common.tiff_magic); - goto bad; - } - if (tif->tif_header.common.tiff_magic == TIFF_BIGENDIAN) { - #ifndef WORDS_BIGENDIAN - tif->tif_flags |= TIFF_SWAB; - #endif - } else { - #ifdef WORDS_BIGENDIAN - tif->tif_flags |= TIFF_SWAB; - #endif - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&tif->tif_header.common.tiff_version); - if ((tif->tif_header.common.tiff_version != TIFF_VERSION_CLASSIC)&& - (tif->tif_header.common.tiff_version != TIFF_VERSION_BIG)) { - TIFFErrorExt(tif->tif_clientdata, name, - "Not a TIFF file, bad version number %d (0x%x)", - tif->tif_header.common.tiff_version, - tif->tif_header.common.tiff_version); - goto bad; - } - if (tif->tif_header.common.tiff_version == TIFF_VERSION_CLASSIC) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&tif->tif_header.classic.tiff_diroff); - tif->tif_header_size = sizeof(TIFFHeaderClassic); - } - else - { - if (!ReadOK(tif, ((uint8*)(&tif->tif_header) + sizeof(TIFFHeaderClassic)), (sizeof(TIFFHeaderBig)-sizeof(TIFFHeaderClassic)))) - { - TIFFErrorExt(tif->tif_clientdata, name, - "Cannot read TIFF header"); - goto bad; - } - if (tif->tif_flags & TIFF_SWAB) - { - TIFFSwabShort(&tif->tif_header.big.tiff_offsetsize); - TIFFSwabLong8(&tif->tif_header.big.tiff_diroff); - } - if (tif->tif_header.big.tiff_offsetsize != 8) - { - TIFFErrorExt(tif->tif_clientdata, name, - "Not a TIFF file, bad BigTIFF offsetsize %d (0x%x)", - tif->tif_header.big.tiff_offsetsize, - tif->tif_header.big.tiff_offsetsize); - goto bad; - } - if (tif->tif_header.big.tiff_unused != 0) - { - TIFFErrorExt(tif->tif_clientdata, name, - "Not a TIFF file, bad BigTIFF unused %d (0x%x)", - tif->tif_header.big.tiff_unused, - tif->tif_header.big.tiff_unused); - goto bad; - } - tif->tif_header_size = sizeof(TIFFHeaderBig); - tif->tif_flags |= TIFF_BIGTIFF; - } - tif->tif_flags |= TIFF_MYBUFFER; - tif->tif_rawcp = tif->tif_rawdata = 0; - tif->tif_rawdatasize = 0; - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = 0; - - switch (mode[0]) { - case 'r': - if (!(tif->tif_flags&TIFF_BIGTIFF)) - tif->tif_nextdiroff = tif->tif_header.classic.tiff_diroff; - else - tif->tif_nextdiroff = tif->tif_header.big.tiff_diroff; - /* - * Try to use a memory-mapped file if the client - * has not explicitly suppressed usage with the - * 'm' flag in the open mode (see above). - */ - if (tif->tif_flags & TIFF_MAPPED) - { - toff_t n; - if (TIFFMapFileContents(tif,(void**)(&tif->tif_base),&n)) - { - tif->tif_size=(tmsize_t)n; - assert((toff_t)tif->tif_size==n); - } - else - tif->tif_flags &= ~TIFF_MAPPED; - } - /* - * Sometimes we do not want to read the first directory (for example, - * it may be broken) and want to proceed to other directories. I this - * case we use the TIFF_HEADERONLY flag to open file and return - * immediately after reading TIFF header. - */ - if (tif->tif_flags & TIFF_HEADERONLY) - return (tif); - - /* - * Setup initial directory. - */ - if (TIFFReadDirectory(tif)) { - tif->tif_rawcc = (tmsize_t)-1; - tif->tif_flags |= TIFF_BUFFERSETUP; - return (tif); - } - break; - case 'a': - /* - * New directories are automatically append - * to the end of the directory chain when they - * are written out (see TIFFWriteDirectory). - */ - if (!TIFFDefaultDirectory(tif)) - goto bad; - return (tif); - } -bad: - tif->tif_mode = O_RDONLY; /* XXX avoid flush */ - TIFFCleanup(tif); -bad2: - return ((TIFF*)0); -} - -/* - * Query functions to access private data. - */ - -/* - * Return open file's name. - */ -const char * -TIFFFileName(TIFF* tif) -{ - return (tif->tif_name); -} - -/* - * Set the file name. - */ -const char * -TIFFSetFileName(TIFF* tif, const char *name) -{ - const char* old_name = tif->tif_name; - tif->tif_name = (char *)name; - return (old_name); -} - -/* - * Return open file's I/O descriptor. - */ -int -TIFFFileno(TIFF* tif) -{ - return (tif->tif_fd); -} - -/* - * Set open file's I/O descriptor, and return previous value. - */ -int -TIFFSetFileno(TIFF* tif, int fd) -{ - int old_fd = tif->tif_fd; - tif->tif_fd = fd; - return old_fd; -} - -/* - * Return open file's clientdata. - */ -thandle_t -TIFFClientdata(TIFF* tif) -{ - return (tif->tif_clientdata); -} - -/* - * Set open file's clientdata, and return previous value. - */ -thandle_t -TIFFSetClientdata(TIFF* tif, thandle_t newvalue) -{ - thandle_t m = tif->tif_clientdata; - tif->tif_clientdata = newvalue; - return m; -} - -/* - * Return read/write mode. - */ -int -TIFFGetMode(TIFF* tif) -{ - return (tif->tif_mode); -} - -/* - * Return read/write mode. - */ -int -TIFFSetMode(TIFF* tif, int mode) -{ - int old_mode = tif->tif_mode; - tif->tif_mode = mode; - return (old_mode); -} - -/* - * Return nonzero if file is organized in - * tiles; zero if organized as strips. - */ -int -TIFFIsTiled(TIFF* tif) -{ - return (isTiled(tif)); -} - -/* - * Return current row being read/written. - */ -uint32 -TIFFCurrentRow(TIFF* tif) -{ - return (tif->tif_row); -} - -/* - * Return index of the current directory. - */ -uint16 -TIFFCurrentDirectory(TIFF* tif) -{ - return (tif->tif_curdir); -} - -/* - * Return current strip. - */ -uint32 -TIFFCurrentStrip(TIFF* tif) -{ - return (tif->tif_curstrip); -} - -/* - * Return current tile. - */ -uint32 -TIFFCurrentTile(TIFF* tif) -{ - return (tif->tif_curtile); -} - -/* - * Return nonzero if the file has byte-swapped data. - */ -int -TIFFIsByteSwapped(TIFF* tif) -{ - return ((tif->tif_flags & TIFF_SWAB) != 0); -} - -/* - * Return nonzero if the data is returned up-sampled. - */ -int -TIFFIsUpSampled(TIFF* tif) -{ - return (isUpSampled(tif)); -} - -/* - * Return nonzero if the data is returned in MSB-to-LSB bit order. - */ -int -TIFFIsMSB2LSB(TIFF* tif) -{ - return (isFillOrder(tif, FILLORDER_MSB2LSB)); -} - -/* - * Return nonzero if given file was written in big-endian order. - */ -int -TIFFIsBigEndian(TIFF* tif) -{ - return (tif->tif_header.common.tiff_magic == TIFF_BIGENDIAN); -} - -/* - * Return pointer to file read method. - */ -TIFFReadWriteProc -TIFFGetReadProc(TIFF* tif) -{ - return (tif->tif_readproc); -} - -/* - * Return pointer to file write method. - */ -TIFFReadWriteProc -TIFFGetWriteProc(TIFF* tif) -{ - return (tif->tif_writeproc); -} - -/* - * Return pointer to file seek method. - */ -TIFFSeekProc -TIFFGetSeekProc(TIFF* tif) -{ - return (tif->tif_seekproc); -} - -/* - * Return pointer to file close method. - */ -TIFFCloseProc -TIFFGetCloseProc(TIFF* tif) -{ - return (tif->tif_closeproc); -} - -/* - * Return pointer to file size requesting method. - */ -TIFFSizeProc -TIFFGetSizeProc(TIFF* tif) -{ - return (tif->tif_sizeproc); -} - -/* - * Return pointer to memory mapping method. - */ -TIFFMapFileProc -TIFFGetMapFileProc(TIFF* tif) -{ - return (tif->tif_mapproc); -} - -/* - * Return pointer to memory unmapping method. - */ -TIFFUnmapFileProc -TIFFGetUnmapFileProc(TIFF* tif) -{ - return (tif->tif_unmapproc); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_packbits.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_packbits.c deleted file mode 100644 index 99e959e..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_packbits.c +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef PACKBITS_SUPPORT -/* - * TIFF Library. - * - * PackBits Compression Algorithm Support - */ -#include - -static int -PackBitsPreEncode(TIFF* tif, uint16 s) -{ - (void) s; - - tif->tif_data = (uint8*)_TIFFmalloc(sizeof(tmsize_t)); - if (tif->tif_data == NULL) - return (0); - /* - * Calculate the scanline/tile-width size in bytes. - */ - if (isTiled(tif)) - *(tmsize_t*)tif->tif_data = TIFFTileRowSize(tif); - else - *(tmsize_t*)tif->tif_data = TIFFScanlineSize(tif); - return (1); -} - -static int -PackBitsPostEncode(TIFF* tif) -{ - if (tif->tif_data) - _TIFFfree(tif->tif_data); - return (1); -} - -/* - * Encode a run of pixels. - */ -static int -PackBitsEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) -{ - unsigned char* bp = (unsigned char*) buf; - uint8* op; - uint8* ep; - uint8* lastliteral; - long n, slop; - int b; - enum { BASE, LITERAL, RUN, LITERAL_RUN } state; - - (void) s; - op = tif->tif_rawcp; - ep = tif->tif_rawdata + tif->tif_rawdatasize; - state = BASE; - lastliteral = 0; - while (cc > 0) { - /* - * Find the longest string of identical bytes. - */ - b = *bp++; - cc--; - n = 1; - for (; cc > 0 && b == *bp; cc--, bp++) - n++; - again: - if (op + 2 >= ep) { /* insure space for new data */ - /* - * Be careful about writing the last - * literal. Must write up to that point - * and then copy the remainder to the - * front of the buffer. - */ - if (state == LITERAL || state == LITERAL_RUN) { - slop = (long)(op - lastliteral); - tif->tif_rawcc += (tmsize_t)(lastliteral - tif->tif_rawcp); - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - while (slop-- > 0) - *op++ = *lastliteral++; - lastliteral = tif->tif_rawcp; - } else { - tif->tif_rawcc += (tmsize_t)(op - tif->tif_rawcp); - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - } - } - switch (state) { - case BASE: /* initial state, set run/literal */ - if (n > 1) { - state = RUN; - if (n > 128) { - *op++ = (uint8) -127; - *op++ = (uint8) b; - n -= 128; - goto again; - } - *op++ = (uint8)(-(n-1)); - *op++ = (uint8) b; - } else { - lastliteral = op; - *op++ = 0; - *op++ = (uint8) b; - state = LITERAL; - } - break; - case LITERAL: /* last object was literal string */ - if (n > 1) { - state = LITERAL_RUN; - if (n > 128) { - *op++ = (uint8) -127; - *op++ = (uint8) b; - n -= 128; - goto again; - } - *op++ = (uint8)(-(n-1)); /* encode run */ - *op++ = (uint8) b; - } else { /* extend literal */ - if (++(*lastliteral) == 127) - state = BASE; - *op++ = (uint8) b; - } - break; - case RUN: /* last object was run */ - if (n > 1) { - if (n > 128) { - *op++ = (uint8) -127; - *op++ = (uint8) b; - n -= 128; - goto again; - } - *op++ = (uint8)(-(n-1)); - *op++ = (uint8) b; - } else { - lastliteral = op; - *op++ = 0; - *op++ = (uint8) b; - state = LITERAL; - } - break; - case LITERAL_RUN: /* literal followed by a run */ - /* - * Check to see if previous run should - * be converted to a literal, in which - * case we convert literal-run-literal - * to a single literal. - */ - if (n == 1 && op[-2] == (uint8) -1 && - *lastliteral < 126) { - state = (((*lastliteral) += 2) == 127 ? - BASE : LITERAL); - op[-2] = op[-1]; /* replicate */ - } else - state = RUN; - goto again; - } - } - tif->tif_rawcc += (tmsize_t)(op - tif->tif_rawcp); - tif->tif_rawcp = op; - return (1); -} - -/* - * Encode a rectangular chunk of pixels. We break it up - * into row-sized pieces to insure that encoded runs do - * not span rows. Otherwise, there can be problems with - * the decoder if data is read, for example, by scanlines - * when it was encoded by strips. - */ -static int -PackBitsEncodeChunk(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - tmsize_t rowsize = *(tmsize_t*)tif->tif_data; - - while (cc > 0) { - tmsize_t chunk = rowsize; - - if( cc < chunk ) - chunk = cc; - - if (PackBitsEncode(tif, bp, chunk, s) < 0) - return (-1); - bp += chunk; - cc -= chunk; - } - return (1); -} - -static int -PackBitsDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) -{ - static const char module[] = "PackBitsDecode"; - char *bp; - tmsize_t cc; - long n; - int b; - - (void) s; - bp = (char*) tif->tif_rawcp; - cc = tif->tif_rawcc; - while (cc > 0 && occ > 0) { - n = (long) *bp++; - cc--; - /* - * Watch out for compilers that - * don't sign extend chars... - */ - if (n >= 128) - n -= 256; - if (n < 0) { /* replicate next byte -n+1 times */ - if (n == -128) /* nop */ - continue; - n = -n + 1; - if( occ < (tmsize_t)n ) - { - TIFFWarningExt(tif->tif_clientdata, module, - "Discarding %lu bytes to avoid buffer overrun", - (unsigned long) ((tmsize_t)n - occ)); - n = (long)occ; - } - if( cc == 0 ) - { - TIFFWarningExt(tif->tif_clientdata, module, - "Terminating PackBitsDecode due to lack of data."); - break; - } - occ -= n; - b = *bp++; - cc--; - while (n-- > 0) - *op++ = (uint8) b; - } else { /* copy next n+1 bytes literally */ - if (occ < (tmsize_t)(n + 1)) - { - TIFFWarningExt(tif->tif_clientdata, module, - "Discarding %lu bytes to avoid buffer overrun", - (unsigned long) ((tmsize_t)n - occ + 1)); - n = (long)occ - 1; - } - if (cc < (tmsize_t) (n+1)) - { - TIFFWarningExt(tif->tif_clientdata, module, - "Terminating PackBitsDecode due to lack of data."); - break; - } - _TIFFmemcpy(op, bp, ++n); - op += n; occ -= n; - bp += n; cc -= n; - } - } - tif->tif_rawcp = (uint8*) bp; - tif->tif_rawcc = cc; - if (occ > 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data for scanline %lu", - (unsigned long) tif->tif_row); - return (0); - } - return (1); -} - -int -TIFFInitPackBits(TIFF* tif, int scheme) -{ - (void) scheme; - tif->tif_decoderow = PackBitsDecode; - tif->tif_decodestrip = PackBitsDecode; - tif->tif_decodetile = PackBitsDecode; - tif->tif_preencode = PackBitsPreEncode; - tif->tif_postencode = PackBitsPostEncode; - tif->tif_encoderow = PackBitsEncode; - tif->tif_encodestrip = PackBitsEncodeChunk; - tif->tif_encodetile = PackBitsEncodeChunk; - return (1); -} -#endif /* PACKBITS_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_pixarlog.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_pixarlog.c deleted file mode 100644 index d294aac..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_pixarlog.c +++ /dev/null @@ -1,1483 +0,0 @@ -/* - * Copyright (c) 1996-1997 Sam Leffler - * Copyright (c) 1996 Pixar - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Pixar, Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Pixar, Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL PIXAR, SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef PIXARLOG_SUPPORT - -/* - * TIFF Library. - * PixarLog Compression Support - * - * Contributed by Dan McCoy. - * - * PixarLog film support uses the TIFF library to store companded - * 11 bit values into a tiff file, which are compressed using the - * zip compressor. - * - * The codec can take as input and produce as output 32-bit IEEE float values - * as well as 16-bit or 8-bit unsigned integer values. - * - * On writing any of the above are converted into the internal - * 11-bit log format. In the case of 8 and 16 bit values, the - * input is assumed to be unsigned linear color values that represent - * the range 0-1. In the case of IEEE values, the 0-1 range is assumed to - * be the normal linear color range, in addition over 1 values are - * accepted up to a value of about 25.0 to encode "hot" highlights and such. - * The encoding is lossless for 8-bit values, slightly lossy for the - * other bit depths. The actual color precision should be better - * than the human eye can perceive with extra room to allow for - * error introduced by further image computation. As with any quantized - * color format, it is possible to perform image calculations which - * expose the quantization error. This format should certainly be less - * susceptible to such errors than standard 8-bit encodings, but more - * susceptible than straight 16-bit or 32-bit encodings. - * - * On reading the internal format is converted to the desired output format. - * The program can request which format it desires by setting the internal - * pseudo tag TIFFTAG_PIXARLOGDATAFMT to one of these possible values: - * PIXARLOGDATAFMT_FLOAT = provide IEEE float values. - * PIXARLOGDATAFMT_16BIT = provide unsigned 16-bit integer values - * PIXARLOGDATAFMT_8BIT = provide unsigned 8-bit integer values - * - * alternately PIXARLOGDATAFMT_8BITABGR provides unsigned 8-bit integer - * values with the difference that if there are exactly three or four channels - * (rgb or rgba) it swaps the channel order (bgr or abgr). - * - * PIXARLOGDATAFMT_11BITLOG provides the internal encoding directly - * packed in 16-bit values. However no tools are supplied for interpreting - * these values. - * - * "hot" (over 1.0) areas written in floating point get clamped to - * 1.0 in the integer data types. - * - * When the file is closed after writing, the bit depth and sample format - * are set always to appear as if 8-bit data has been written into it. - * That way a naive program unaware of the particulars of the encoding - * gets the format it is most likely able to handle. - * - * The codec does it's own horizontal differencing step on the coded - * values so the libraries predictor stuff should be turned off. - * The codec also handle byte swapping the encoded values as necessary - * since the library does not have the information necessary - * to know the bit depth of the raw unencoded buffer. - * - * NOTE: This decoder does not appear to update tif_rawcp, and tif_rawcc. - * This can cause problems with the implementation of CHUNKY_STRIP_READ_SUPPORT - * as noted in http://trac.osgeo.org/gdal/ticket/3894. FrankW - Jan'11 - */ - -#include "tif_predict.h" -#include "zlib.h" - -#include -#include -#include - -/* Tables for converting to/from 11 bit coded values */ - -#define TSIZE 2048 /* decode table size (11-bit tokens) */ -#define TSIZEP1 2049 /* Plus one for slop */ -#define ONE 1250 /* token value of 1.0 exactly */ -#define RATIO 1.004 /* nominal ratio for log part */ - -#define CODE_MASK 0x7ff /* 11 bits. */ - -static float Fltsize; -static float LogK1, LogK2; - -#define REPEAT(n, op) { int i; i=n; do { i--; op; } while (i>0); } - -static void -horizontalAccumulateF(uint16 *wp, int n, int stride, float *op, - float *ToLinearF) -{ - register unsigned int cr, cg, cb, ca, mask; - register float t0, t1, t2, t3; - - if (n >= stride) { - mask = CODE_MASK; - if (stride == 3) { - t0 = ToLinearF[cr = (wp[0] & mask)]; - t1 = ToLinearF[cg = (wp[1] & mask)]; - t2 = ToLinearF[cb = (wp[2] & mask)]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - n -= 3; - while (n > 0) { - wp += 3; - op += 3; - n -= 3; - t0 = ToLinearF[(cr += wp[0]) & mask]; - t1 = ToLinearF[(cg += wp[1]) & mask]; - t2 = ToLinearF[(cb += wp[2]) & mask]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - } - } else if (stride == 4) { - t0 = ToLinearF[cr = (wp[0] & mask)]; - t1 = ToLinearF[cg = (wp[1] & mask)]; - t2 = ToLinearF[cb = (wp[2] & mask)]; - t3 = ToLinearF[ca = (wp[3] & mask)]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - op[3] = t3; - n -= 4; - while (n > 0) { - wp += 4; - op += 4; - n -= 4; - t0 = ToLinearF[(cr += wp[0]) & mask]; - t1 = ToLinearF[(cg += wp[1]) & mask]; - t2 = ToLinearF[(cb += wp[2]) & mask]; - t3 = ToLinearF[(ca += wp[3]) & mask]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - op[3] = t3; - } - } else { - REPEAT(stride, *op = ToLinearF[*wp&mask]; wp++; op++) - n -= stride; - while (n > 0) { - REPEAT(stride, - wp[stride] += *wp; *op = ToLinearF[*wp&mask]; wp++; op++) - n -= stride; - } - } - } -} - -static void -horizontalAccumulate12(uint16 *wp, int n, int stride, int16 *op, - float *ToLinearF) -{ - register unsigned int cr, cg, cb, ca, mask; - register float t0, t1, t2, t3; - -#define SCALE12 2048.0F -#define CLAMP12(t) (((t) < 3071) ? (uint16) (t) : 3071) - - if (n >= stride) { - mask = CODE_MASK; - if (stride == 3) { - t0 = ToLinearF[cr = (wp[0] & mask)] * SCALE12; - t1 = ToLinearF[cg = (wp[1] & mask)] * SCALE12; - t2 = ToLinearF[cb = (wp[2] & mask)] * SCALE12; - op[0] = CLAMP12(t0); - op[1] = CLAMP12(t1); - op[2] = CLAMP12(t2); - n -= 3; - while (n > 0) { - wp += 3; - op += 3; - n -= 3; - t0 = ToLinearF[(cr += wp[0]) & mask] * SCALE12; - t1 = ToLinearF[(cg += wp[1]) & mask] * SCALE12; - t2 = ToLinearF[(cb += wp[2]) & mask] * SCALE12; - op[0] = CLAMP12(t0); - op[1] = CLAMP12(t1); - op[2] = CLAMP12(t2); - } - } else if (stride == 4) { - t0 = ToLinearF[cr = (wp[0] & mask)] * SCALE12; - t1 = ToLinearF[cg = (wp[1] & mask)] * SCALE12; - t2 = ToLinearF[cb = (wp[2] & mask)] * SCALE12; - t3 = ToLinearF[ca = (wp[3] & mask)] * SCALE12; - op[0] = CLAMP12(t0); - op[1] = CLAMP12(t1); - op[2] = CLAMP12(t2); - op[3] = CLAMP12(t3); - n -= 4; - while (n > 0) { - wp += 4; - op += 4; - n -= 4; - t0 = ToLinearF[(cr += wp[0]) & mask] * SCALE12; - t1 = ToLinearF[(cg += wp[1]) & mask] * SCALE12; - t2 = ToLinearF[(cb += wp[2]) & mask] * SCALE12; - t3 = ToLinearF[(ca += wp[3]) & mask] * SCALE12; - op[0] = CLAMP12(t0); - op[1] = CLAMP12(t1); - op[2] = CLAMP12(t2); - op[3] = CLAMP12(t3); - } - } else { - REPEAT(stride, t0 = ToLinearF[*wp&mask] * SCALE12; - *op = CLAMP12(t0); wp++; op++) - n -= stride; - while (n > 0) { - REPEAT(stride, - wp[stride] += *wp; t0 = ToLinearF[wp[stride]&mask]*SCALE12; - *op = CLAMP12(t0); wp++; op++) - n -= stride; - } - } - } -} - -static void -horizontalAccumulate16(uint16 *wp, int n, int stride, uint16 *op, - uint16 *ToLinear16) -{ - register unsigned int cr, cg, cb, ca, mask; - - if (n >= stride) { - mask = CODE_MASK; - if (stride == 3) { - op[0] = ToLinear16[cr = (wp[0] & mask)]; - op[1] = ToLinear16[cg = (wp[1] & mask)]; - op[2] = ToLinear16[cb = (wp[2] & mask)]; - n -= 3; - while (n > 0) { - wp += 3; - op += 3; - n -= 3; - op[0] = ToLinear16[(cr += wp[0]) & mask]; - op[1] = ToLinear16[(cg += wp[1]) & mask]; - op[2] = ToLinear16[(cb += wp[2]) & mask]; - } - } else if (stride == 4) { - op[0] = ToLinear16[cr = (wp[0] & mask)]; - op[1] = ToLinear16[cg = (wp[1] & mask)]; - op[2] = ToLinear16[cb = (wp[2] & mask)]; - op[3] = ToLinear16[ca = (wp[3] & mask)]; - n -= 4; - while (n > 0) { - wp += 4; - op += 4; - n -= 4; - op[0] = ToLinear16[(cr += wp[0]) & mask]; - op[1] = ToLinear16[(cg += wp[1]) & mask]; - op[2] = ToLinear16[(cb += wp[2]) & mask]; - op[3] = ToLinear16[(ca += wp[3]) & mask]; - } - } else { - REPEAT(stride, *op = ToLinear16[*wp&mask]; wp++; op++) - n -= stride; - while (n > 0) { - REPEAT(stride, - wp[stride] += *wp; *op = ToLinear16[*wp&mask]; wp++; op++) - n -= stride; - } - } - } -} - -/* - * Returns the log encoded 11-bit values with the horizontal - * differencing undone. - */ -static void -horizontalAccumulate11(uint16 *wp, int n, int stride, uint16 *op) -{ - register unsigned int cr, cg, cb, ca, mask; - - if (n >= stride) { - mask = CODE_MASK; - if (stride == 3) { - op[0] = wp[0]; op[1] = wp[1]; op[2] = wp[2]; - cr = wp[0]; cg = wp[1]; cb = wp[2]; - n -= 3; - while (n > 0) { - wp += 3; - op += 3; - n -= 3; - op[0] = (uint16)((cr += wp[0]) & mask); - op[1] = (uint16)((cg += wp[1]) & mask); - op[2] = (uint16)((cb += wp[2]) & mask); - } - } else if (stride == 4) { - op[0] = wp[0]; op[1] = wp[1]; - op[2] = wp[2]; op[3] = wp[3]; - cr = wp[0]; cg = wp[1]; cb = wp[2]; ca = wp[3]; - n -= 4; - while (n > 0) { - wp += 4; - op += 4; - n -= 4; - op[0] = (uint16)((cr += wp[0]) & mask); - op[1] = (uint16)((cg += wp[1]) & mask); - op[2] = (uint16)((cb += wp[2]) & mask); - op[3] = (uint16)((ca += wp[3]) & mask); - } - } else { - REPEAT(stride, *op = *wp&mask; wp++; op++) - n -= stride; - while (n > 0) { - REPEAT(stride, - wp[stride] += *wp; *op = *wp&mask; wp++; op++) - n -= stride; - } - } - } -} - -static void -horizontalAccumulate8(uint16 *wp, int n, int stride, unsigned char *op, - unsigned char *ToLinear8) -{ - register unsigned int cr, cg, cb, ca, mask; - - if (n >= stride) { - mask = CODE_MASK; - if (stride == 3) { - op[0] = ToLinear8[cr = (wp[0] & mask)]; - op[1] = ToLinear8[cg = (wp[1] & mask)]; - op[2] = ToLinear8[cb = (wp[2] & mask)]; - n -= 3; - while (n > 0) { - n -= 3; - wp += 3; - op += 3; - op[0] = ToLinear8[(cr += wp[0]) & mask]; - op[1] = ToLinear8[(cg += wp[1]) & mask]; - op[2] = ToLinear8[(cb += wp[2]) & mask]; - } - } else if (stride == 4) { - op[0] = ToLinear8[cr = (wp[0] & mask)]; - op[1] = ToLinear8[cg = (wp[1] & mask)]; - op[2] = ToLinear8[cb = (wp[2] & mask)]; - op[3] = ToLinear8[ca = (wp[3] & mask)]; - n -= 4; - while (n > 0) { - n -= 4; - wp += 4; - op += 4; - op[0] = ToLinear8[(cr += wp[0]) & mask]; - op[1] = ToLinear8[(cg += wp[1]) & mask]; - op[2] = ToLinear8[(cb += wp[2]) & mask]; - op[3] = ToLinear8[(ca += wp[3]) & mask]; - } - } else { - REPEAT(stride, *op = ToLinear8[*wp&mask]; wp++; op++) - n -= stride; - while (n > 0) { - REPEAT(stride, - wp[stride] += *wp; *op = ToLinear8[*wp&mask]; wp++; op++) - n -= stride; - } - } - } -} - - -static void -horizontalAccumulate8abgr(uint16 *wp, int n, int stride, unsigned char *op, - unsigned char *ToLinear8) -{ - register unsigned int cr, cg, cb, ca, mask; - register unsigned char t0, t1, t2, t3; - - if (n >= stride) { - mask = CODE_MASK; - if (stride == 3) { - op[0] = 0; - t1 = ToLinear8[cb = (wp[2] & mask)]; - t2 = ToLinear8[cg = (wp[1] & mask)]; - t3 = ToLinear8[cr = (wp[0] & mask)]; - op[1] = t1; - op[2] = t2; - op[3] = t3; - n -= 3; - while (n > 0) { - n -= 3; - wp += 3; - op += 4; - op[0] = 0; - t1 = ToLinear8[(cb += wp[2]) & mask]; - t2 = ToLinear8[(cg += wp[1]) & mask]; - t3 = ToLinear8[(cr += wp[0]) & mask]; - op[1] = t1; - op[2] = t2; - op[3] = t3; - } - } else if (stride == 4) { - t0 = ToLinear8[ca = (wp[3] & mask)]; - t1 = ToLinear8[cb = (wp[2] & mask)]; - t2 = ToLinear8[cg = (wp[1] & mask)]; - t3 = ToLinear8[cr = (wp[0] & mask)]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - op[3] = t3; - n -= 4; - while (n > 0) { - n -= 4; - wp += 4; - op += 4; - t0 = ToLinear8[(ca += wp[3]) & mask]; - t1 = ToLinear8[(cb += wp[2]) & mask]; - t2 = ToLinear8[(cg += wp[1]) & mask]; - t3 = ToLinear8[(cr += wp[0]) & mask]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - op[3] = t3; - } - } else { - REPEAT(stride, *op = ToLinear8[*wp&mask]; wp++; op++) - n -= stride; - while (n > 0) { - REPEAT(stride, - wp[stride] += *wp; *op = ToLinear8[*wp&mask]; wp++; op++) - n -= stride; - } - } - } -} - -/* - * State block for each open TIFF - * file using PixarLog compression/decompression. - */ -typedef struct { - TIFFPredictorState predict; - z_stream stream; - tmsize_t tbuf_size; /* only set/used on reading for now */ - uint16 *tbuf; - uint16 stride; - int state; - int user_datafmt; - int quality; -#define PLSTATE_INIT 1 - - TIFFVSetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ - - float *ToLinearF; - uint16 *ToLinear16; - unsigned char *ToLinear8; - uint16 *FromLT2; - uint16 *From14; /* Really for 16-bit data, but we shift down 2 */ - uint16 *From8; - -} PixarLogState; - -static int -PixarLogMakeTables(PixarLogState *sp) -{ - -/* - * We make several tables here to convert between various external - * representations (float, 16-bit, and 8-bit) and the internal - * 11-bit companded representation. The 11-bit representation has two - * distinct regions. A linear bottom end up through .018316 in steps - * of about .000073, and a region of constant ratio up to about 25. - * These floating point numbers are stored in the main table ToLinearF. - * All other tables are derived from this one. The tables (and the - * ratios) are continuous at the internal seam. - */ - - int nlin, lt2size; - int i, j; - double b, c, linstep, v; - float *ToLinearF; - uint16 *ToLinear16; - unsigned char *ToLinear8; - uint16 *FromLT2; - uint16 *From14; /* Really for 16-bit data, but we shift down 2 */ - uint16 *From8; - - c = log(RATIO); - nlin = (int)(1./c); /* nlin must be an integer */ - c = 1./nlin; - b = exp(-c*ONE); /* multiplicative scale factor [b*exp(c*ONE) = 1] */ - linstep = b*c*exp(1.); - - LogK1 = (float)(1./c); /* if (v >= 2) token = k1*log(v*k2) */ - LogK2 = (float)(1./b); - lt2size = (int)(2./linstep) + 1; - FromLT2 = (uint16 *)_TIFFmalloc(lt2size*sizeof(uint16)); - From14 = (uint16 *)_TIFFmalloc(16384*sizeof(uint16)); - From8 = (uint16 *)_TIFFmalloc(256*sizeof(uint16)); - ToLinearF = (float *)_TIFFmalloc(TSIZEP1 * sizeof(float)); - ToLinear16 = (uint16 *)_TIFFmalloc(TSIZEP1 * sizeof(uint16)); - ToLinear8 = (unsigned char *)_TIFFmalloc(TSIZEP1 * sizeof(unsigned char)); - if (FromLT2 == NULL || From14 == NULL || From8 == NULL || - ToLinearF == NULL || ToLinear16 == NULL || ToLinear8 == NULL) { - if (FromLT2) _TIFFfree(FromLT2); - if (From14) _TIFFfree(From14); - if (From8) _TIFFfree(From8); - if (ToLinearF) _TIFFfree(ToLinearF); - if (ToLinear16) _TIFFfree(ToLinear16); - if (ToLinear8) _TIFFfree(ToLinear8); - sp->FromLT2 = NULL; - sp->From14 = NULL; - sp->From8 = NULL; - sp->ToLinearF = NULL; - sp->ToLinear16 = NULL; - sp->ToLinear8 = NULL; - return 0; - } - - j = 0; - - for (i = 0; i < nlin; i++) { - v = i * linstep; - ToLinearF[j++] = (float)v; - } - - for (i = nlin; i < TSIZE; i++) - ToLinearF[j++] = (float)(b*exp(c*i)); - - ToLinearF[2048] = ToLinearF[2047]; - - for (i = 0; i < TSIZEP1; i++) { - v = ToLinearF[i]*65535.0 + 0.5; - ToLinear16[i] = (v > 65535.0) ? 65535 : (uint16)v; - v = ToLinearF[i]*255.0 + 0.5; - ToLinear8[i] = (v > 255.0) ? 255 : (unsigned char)v; - } - - j = 0; - for (i = 0; i < lt2size; i++) { - if ((i*linstep)*(i*linstep) > ToLinearF[j]*ToLinearF[j+1]) - j++; - FromLT2[i] = (uint16)j; - } - - /* - * Since we lose info anyway on 16-bit data, we set up a 14-bit - * table and shift 16-bit values down two bits on input. - * saves a little table space. - */ - j = 0; - for (i = 0; i < 16384; i++) { - while ((i/16383.)*(i/16383.) > ToLinearF[j]*ToLinearF[j+1]) - j++; - From14[i] = (uint16)j; - } - - j = 0; - for (i = 0; i < 256; i++) { - while ((i/255.)*(i/255.) > ToLinearF[j]*ToLinearF[j+1]) - j++; - From8[i] = (uint16)j; - } - - Fltsize = (float)(lt2size/2); - - sp->ToLinearF = ToLinearF; - sp->ToLinear16 = ToLinear16; - sp->ToLinear8 = ToLinear8; - sp->FromLT2 = FromLT2; - sp->From14 = From14; - sp->From8 = From8; - - return 1; -} - -#define DecoderState(tif) ((PixarLogState*) (tif)->tif_data) -#define EncoderState(tif) ((PixarLogState*) (tif)->tif_data) - -static int PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); -static int PixarLogDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s); - -#define PIXARLOGDATAFMT_UNKNOWN -1 - -static int -PixarLogGuessDataFmt(TIFFDirectory *td) -{ - int guess = PIXARLOGDATAFMT_UNKNOWN; - int format = td->td_sampleformat; - - /* If the user didn't tell us his datafmt, - * take our best guess from the bitspersample. - */ - switch (td->td_bitspersample) { - case 32: - if (format == SAMPLEFORMAT_IEEEFP) - guess = PIXARLOGDATAFMT_FLOAT; - break; - case 16: - if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT) - guess = PIXARLOGDATAFMT_16BIT; - break; - case 12: - if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_INT) - guess = PIXARLOGDATAFMT_12BITPICIO; - break; - case 11: - if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT) - guess = PIXARLOGDATAFMT_11BITLOG; - break; - case 8: - if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT) - guess = PIXARLOGDATAFMT_8BIT; - break; - } - - return guess; -} - -#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0)) -#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1) - -static tmsize_t -multiply_ms(tmsize_t m1, tmsize_t m2) -{ - if( m1 == 0 || m2 > TIFF_TMSIZE_T_MAX / m1 ) - return 0; - return m1 * m2; -} - -static tmsize_t -add_ms(tmsize_t m1, tmsize_t m2) -{ - /* if either input is zero, assume overflow already occurred */ - if (m1 == 0 || m2 == 0) - return 0; - else if (m1 > TIFF_TMSIZE_T_MAX - m2) - return 0; - - return m1 + m2; -} - -static int -PixarLogFixupTags(TIFF* tif) -{ - (void) tif; - return (1); -} - -static int -PixarLogSetupDecode(TIFF* tif) -{ - static const char module[] = "PixarLogSetupDecode"; - TIFFDirectory *td = &tif->tif_dir; - PixarLogState* sp = DecoderState(tif); - tmsize_t tbuf_size; - uint32 strip_height; - - assert(sp != NULL); - - /* This function can possibly be called several times by */ - /* PredictorSetupDecode() if this function succeeds but */ - /* PredictorSetup() fails */ - if( (sp->state & PLSTATE_INIT) != 0 ) - return 1; - - strip_height = td->td_rowsperstrip; - if( strip_height > td->td_imagelength ) - strip_height = td->td_imagelength; - - /* Make sure no byte swapping happens on the data - * after decompression. */ - tif->tif_postdecode = _TIFFNoPostDecode; - - /* for some reason, we can't do this in TIFFInitPixarLog */ - - sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ? - td->td_samplesperpixel : 1); - tbuf_size = multiply_ms(multiply_ms(multiply_ms(sp->stride, td->td_imagewidth), - strip_height), sizeof(uint16)); - /* add one more stride in case input ends mid-stride */ - tbuf_size = add_ms(tbuf_size, sizeof(uint16) * sp->stride); - if (tbuf_size == 0) - return (0); /* TODO: this is an error return without error report through TIFFErrorExt */ - sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size); - if (sp->tbuf == NULL) - return (0); - sp->tbuf_size = tbuf_size; - if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) - sp->user_datafmt = PixarLogGuessDataFmt(td); - if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) { - _TIFFfree(sp->tbuf); - sp->tbuf = NULL; - sp->tbuf_size = 0; - TIFFErrorExt(tif->tif_clientdata, module, - "PixarLog compression can't handle bits depth/data format combination (depth: %d)", - td->td_bitspersample); - return (0); - } - - if (inflateInit(&sp->stream) != Z_OK) { - _TIFFfree(sp->tbuf); - sp->tbuf = NULL; - sp->tbuf_size = 0; - TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg ? sp->stream.msg : "(null)"); - return (0); - } else { - sp->state |= PLSTATE_INIT; - return (1); - } -} - -/* - * Setup state for decoding a strip. - */ -static int -PixarLogPreDecode(TIFF* tif, uint16 s) -{ - static const char module[] = "PixarLogPreDecode"; - PixarLogState* sp = DecoderState(tif); - - (void) s; - assert(sp != NULL); - sp->stream.next_in = tif->tif_rawdata; - assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_in = (uInt) tif->tif_rawcc; - if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc) - { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); - return (0); - } - return (inflateReset(&sp->stream) == Z_OK); -} - -static int -PixarLogDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) -{ - static const char module[] = "PixarLogDecode"; - TIFFDirectory *td = &tif->tif_dir; - PixarLogState* sp = DecoderState(tif); - tmsize_t i; - tmsize_t nsamples; - int llen; - uint16 *up; - - switch (sp->user_datafmt) { - case PIXARLOGDATAFMT_FLOAT: - nsamples = occ / sizeof(float); /* XXX float == 32 bits */ - break; - case PIXARLOGDATAFMT_16BIT: - case PIXARLOGDATAFMT_12BITPICIO: - case PIXARLOGDATAFMT_11BITLOG: - nsamples = occ / sizeof(uint16); /* XXX uint16 == 16 bits */ - break; - case PIXARLOGDATAFMT_8BIT: - case PIXARLOGDATAFMT_8BITABGR: - nsamples = occ; - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, - "%d bit input not supported in PixarLog", - td->td_bitspersample); - return 0; - } - - llen = sp->stride * td->td_imagewidth; - - (void) s; - assert(sp != NULL); - - sp->stream.next_in = tif->tif_rawcp; - sp->stream.avail_in = (uInt) tif->tif_rawcc; - - sp->stream.next_out = (unsigned char *) sp->tbuf; - assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_out = (uInt) (nsamples * sizeof(uint16)); - if (sp->stream.avail_out != nsamples * sizeof(uint16)) - { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); - return (0); - } - /* Check that we will not fill more than what was allocated */ - if ((tmsize_t)sp->stream.avail_out > sp->tbuf_size) - { - TIFFErrorExt(tif->tif_clientdata, module, "sp->stream.avail_out > sp->tbuf_size"); - return (0); - } - do { - int state = inflate(&sp->stream, Z_PARTIAL_FLUSH); - if (state == Z_STREAM_END) { - break; /* XXX */ - } - if (state == Z_DATA_ERROR) { - TIFFErrorExt(tif->tif_clientdata, module, - "Decoding error at scanline %lu, %s", - (unsigned long) tif->tif_row, sp->stream.msg ? sp->stream.msg : "(null)"); - if (inflateSync(&sp->stream) != Z_OK) - return (0); - continue; - } - if (state != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s", - sp->stream.msg ? sp->stream.msg : "(null)"); - return (0); - } - } while (sp->stream.avail_out > 0); - - /* hopefully, we got all the bytes we needed */ - if (sp->stream.avail_out != 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at scanline %lu (short " TIFF_UINT64_FORMAT " bytes)", - (unsigned long) tif->tif_row, (TIFF_UINT64_T) sp->stream.avail_out); - return (0); - } - - tif->tif_rawcp = sp->stream.next_in; - tif->tif_rawcc = sp->stream.avail_in; - - up = sp->tbuf; - /* Swap bytes in the data if from a different endian machine. */ - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfShort(up, nsamples); - - /* - * if llen is not an exact multiple of nsamples, the decode operation - * may overflow the output buffer, so truncate it enough to prevent - * that but still salvage as much data as possible. - */ - if (nsamples % llen) { - TIFFWarningExt(tif->tif_clientdata, module, - "stride %lu is not a multiple of sample count, " - "%lu, data truncated.", (unsigned long) llen, (unsigned long) nsamples); - nsamples -= nsamples % llen; - } - - for (i = 0; i < nsamples; i += llen, up += llen) { - switch (sp->user_datafmt) { - case PIXARLOGDATAFMT_FLOAT: - horizontalAccumulateF(up, llen, sp->stride, - (float *)op, sp->ToLinearF); - op += llen * sizeof(float); - break; - case PIXARLOGDATAFMT_16BIT: - horizontalAccumulate16(up, llen, sp->stride, - (uint16 *)op, sp->ToLinear16); - op += llen * sizeof(uint16); - break; - case PIXARLOGDATAFMT_12BITPICIO: - horizontalAccumulate12(up, llen, sp->stride, - (int16 *)op, sp->ToLinearF); - op += llen * sizeof(int16); - break; - case PIXARLOGDATAFMT_11BITLOG: - horizontalAccumulate11(up, llen, sp->stride, - (uint16 *)op); - op += llen * sizeof(uint16); - break; - case PIXARLOGDATAFMT_8BIT: - horizontalAccumulate8(up, llen, sp->stride, - (unsigned char *)op, sp->ToLinear8); - op += llen * sizeof(unsigned char); - break; - case PIXARLOGDATAFMT_8BITABGR: - horizontalAccumulate8abgr(up, llen, sp->stride, - (unsigned char *)op, sp->ToLinear8); - op += llen * sizeof(unsigned char); - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, - "Unsupported bits/sample: %d", - td->td_bitspersample); - return (0); - } - } - - return (1); -} - -static int -PixarLogSetupEncode(TIFF* tif) -{ - static const char module[] = "PixarLogSetupEncode"; - TIFFDirectory *td = &tif->tif_dir; - PixarLogState* sp = EncoderState(tif); - tmsize_t tbuf_size; - - assert(sp != NULL); - - /* for some reason, we can't do this in TIFFInitPixarLog */ - - sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ? - td->td_samplesperpixel : 1); - tbuf_size = multiply_ms(multiply_ms(multiply_ms(sp->stride, td->td_imagewidth), - td->td_rowsperstrip), sizeof(uint16)); - if (tbuf_size == 0) - return (0); /* TODO: this is an error return without error report through TIFFErrorExt */ - sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size); - if (sp->tbuf == NULL) - return (0); - if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) - sp->user_datafmt = PixarLogGuessDataFmt(td); - if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) { - TIFFErrorExt(tif->tif_clientdata, module, "PixarLog compression can't handle %d bit linear encodings", td->td_bitspersample); - return (0); - } - - if (deflateInit(&sp->stream, sp->quality) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg ? sp->stream.msg : "(null)"); - return (0); - } else { - sp->state |= PLSTATE_INIT; - return (1); - } -} - -/* - * Reset encoding state at the start of a strip. - */ -static int -PixarLogPreEncode(TIFF* tif, uint16 s) -{ - static const char module[] = "PixarLogPreEncode"; - PixarLogState *sp = EncoderState(tif); - - (void) s; - assert(sp != NULL); - sp->stream.next_out = tif->tif_rawdata; - assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_out = (uInt)tif->tif_rawdatasize; - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) - { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); - return (0); - } - return (deflateReset(&sp->stream) == Z_OK); -} - -static void -horizontalDifferenceF(float *ip, int n, int stride, uint16 *wp, uint16 *FromLT2) -{ - int32 r1, g1, b1, a1, r2, g2, b2, a2, mask; - float fltsize = Fltsize; - -#define CLAMP(v) ( (v<(float)0.) ? 0 \ - : (v<(float)2.) ? FromLT2[(int)(v*fltsize)] \ - : (v>(float)24.2) ? 2047 \ - : LogK1*log(v*LogK2) + 0.5 ) - - mask = CODE_MASK; - if (n >= stride) { - if (stride == 3) { - r2 = wp[0] = (uint16) CLAMP(ip[0]); - g2 = wp[1] = (uint16) CLAMP(ip[1]); - b2 = wp[2] = (uint16) CLAMP(ip[2]); - n -= 3; - while (n > 0) { - n -= 3; - wp += 3; - ip += 3; - r1 = (int32) CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1; - g1 = (int32) CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1; - b1 = (int32) CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1; - } - } else if (stride == 4) { - r2 = wp[0] = (uint16) CLAMP(ip[0]); - g2 = wp[1] = (uint16) CLAMP(ip[1]); - b2 = wp[2] = (uint16) CLAMP(ip[2]); - a2 = wp[3] = (uint16) CLAMP(ip[3]); - n -= 4; - while (n > 0) { - n -= 4; - wp += 4; - ip += 4; - r1 = (int32) CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1; - g1 = (int32) CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1; - b1 = (int32) CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1; - a1 = (int32) CLAMP(ip[3]); wp[3] = (uint16)((a1-a2) & mask); a2 = a1; - } - } else { - REPEAT(stride, wp[0] = (uint16) CLAMP(ip[0]); wp++; ip++) - n -= stride; - while (n > 0) { - REPEAT(stride, - wp[0] = (uint16)(((int32)CLAMP(ip[0])-(int32)CLAMP(ip[-stride])) & mask); - wp++; ip++) - n -= stride; - } - } - } -} - -static void -horizontalDifference16(unsigned short *ip, int n, int stride, - unsigned short *wp, uint16 *From14) -{ - register int r1, g1, b1, a1, r2, g2, b2, a2, mask; - -/* assumption is unsigned pixel values */ -#undef CLAMP -#define CLAMP(v) From14[(v) >> 2] - - mask = CODE_MASK; - if (n >= stride) { - if (stride == 3) { - r2 = wp[0] = CLAMP(ip[0]); g2 = wp[1] = CLAMP(ip[1]); - b2 = wp[2] = CLAMP(ip[2]); - n -= 3; - while (n > 0) { - n -= 3; - wp += 3; - ip += 3; - r1 = CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1; - g1 = CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1; - b1 = CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1; - } - } else if (stride == 4) { - r2 = wp[0] = CLAMP(ip[0]); g2 = wp[1] = CLAMP(ip[1]); - b2 = wp[2] = CLAMP(ip[2]); a2 = wp[3] = CLAMP(ip[3]); - n -= 4; - while (n > 0) { - n -= 4; - wp += 4; - ip += 4; - r1 = CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1; - g1 = CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1; - b1 = CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1; - a1 = CLAMP(ip[3]); wp[3] = (uint16)((a1-a2) & mask); a2 = a1; - } - } else { - REPEAT(stride, wp[0] = CLAMP(ip[0]); wp++; ip++) - n -= stride; - while (n > 0) { - REPEAT(stride, - wp[0] = (uint16)((CLAMP(ip[0])-CLAMP(ip[-stride])) & mask); - wp++; ip++) - n -= stride; - } - } - } -} - - -static void -horizontalDifference8(unsigned char *ip, int n, int stride, - unsigned short *wp, uint16 *From8) -{ - register int r1, g1, b1, a1, r2, g2, b2, a2, mask; - -#undef CLAMP -#define CLAMP(v) (From8[(v)]) - - mask = CODE_MASK; - if (n >= stride) { - if (stride == 3) { - r2 = wp[0] = CLAMP(ip[0]); g2 = wp[1] = CLAMP(ip[1]); - b2 = wp[2] = CLAMP(ip[2]); - n -= 3; - while (n > 0) { - n -= 3; - r1 = CLAMP(ip[3]); wp[3] = (uint16)((r1-r2) & mask); r2 = r1; - g1 = CLAMP(ip[4]); wp[4] = (uint16)((g1-g2) & mask); g2 = g1; - b1 = CLAMP(ip[5]); wp[5] = (uint16)((b1-b2) & mask); b2 = b1; - wp += 3; - ip += 3; - } - } else if (stride == 4) { - r2 = wp[0] = CLAMP(ip[0]); g2 = wp[1] = CLAMP(ip[1]); - b2 = wp[2] = CLAMP(ip[2]); a2 = wp[3] = CLAMP(ip[3]); - n -= 4; - while (n > 0) { - n -= 4; - r1 = CLAMP(ip[4]); wp[4] = (uint16)((r1-r2) & mask); r2 = r1; - g1 = CLAMP(ip[5]); wp[5] = (uint16)((g1-g2) & mask); g2 = g1; - b1 = CLAMP(ip[6]); wp[6] = (uint16)((b1-b2) & mask); b2 = b1; - a1 = CLAMP(ip[7]); wp[7] = (uint16)((a1-a2) & mask); a2 = a1; - wp += 4; - ip += 4; - } - } else { - REPEAT(stride, wp[0] = CLAMP(ip[0]); wp++; ip++) - n -= stride; - while (n > 0) { - REPEAT(stride, - wp[0] = (uint16)((CLAMP(ip[0])-CLAMP(ip[-stride])) & mask); - wp++; ip++) - n -= stride; - } - } - } -} - -/* - * Encode a chunk of pixels. - */ -static int -PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - static const char module[] = "PixarLogEncode"; - TIFFDirectory *td = &tif->tif_dir; - PixarLogState *sp = EncoderState(tif); - tmsize_t i; - tmsize_t n; - int llen; - unsigned short * up; - - (void) s; - - switch (sp->user_datafmt) { - case PIXARLOGDATAFMT_FLOAT: - n = cc / sizeof(float); /* XXX float == 32 bits */ - break; - case PIXARLOGDATAFMT_16BIT: - case PIXARLOGDATAFMT_12BITPICIO: - case PIXARLOGDATAFMT_11BITLOG: - n = cc / sizeof(uint16); /* XXX uint16 == 16 bits */ - break; - case PIXARLOGDATAFMT_8BIT: - case PIXARLOGDATAFMT_8BITABGR: - n = cc; - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, - "%d bit input not supported in PixarLog", - td->td_bitspersample); - return 0; - } - - llen = sp->stride * td->td_imagewidth; - /* Check against the number of elements (of size uint16) of sp->tbuf */ - if( n > (tmsize_t)(td->td_rowsperstrip * llen) ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Too many input bytes provided"); - return 0; - } - - for (i = 0, up = sp->tbuf; i < n; i += llen, up += llen) { - switch (sp->user_datafmt) { - case PIXARLOGDATAFMT_FLOAT: - horizontalDifferenceF((float *)bp, llen, - sp->stride, up, sp->FromLT2); - bp += llen * sizeof(float); - break; - case PIXARLOGDATAFMT_16BIT: - horizontalDifference16((uint16 *)bp, llen, - sp->stride, up, sp->From14); - bp += llen * sizeof(uint16); - break; - case PIXARLOGDATAFMT_8BIT: - horizontalDifference8((unsigned char *)bp, llen, - sp->stride, up, sp->From8); - bp += llen * sizeof(unsigned char); - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, - "%d bit input not supported in PixarLog", - td->td_bitspersample); - return 0; - } - } - - sp->stream.next_in = (unsigned char *) sp->tbuf; - assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_in = (uInt) (n * sizeof(uint16)); - if ((sp->stream.avail_in / sizeof(uint16)) != (uInt) n) - { - TIFFErrorExt(tif->tif_clientdata, module, - "ZLib cannot deal with buffers this size"); - return (0); - } - - do { - if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "Encoder error: %s", - sp->stream.msg ? sp->stream.msg : "(null)"); - return (0); - } - if (sp->stream.avail_out == 0) { - tif->tif_rawcc = tif->tif_rawdatasize; - TIFFFlushData1(tif); - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in PixarLogPreEncode */ - } - } while (sp->stream.avail_in > 0); - return (1); -} - -/* - * Finish off an encoded strip by flushing the last - * string and tacking on an End Of Information code. - */ - -static int -PixarLogPostEncode(TIFF* tif) -{ - static const char module[] = "PixarLogPostEncode"; - PixarLogState *sp = EncoderState(tif); - int state; - - sp->stream.avail_in = 0; - - do { - state = deflate(&sp->stream, Z_FINISH); - switch (state) { - case Z_STREAM_END: - case Z_OK: - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) { - tif->tif_rawcc = - tif->tif_rawdatasize - sp->stream.avail_out; - TIFFFlushData1(tif); - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in PixarLogPreEncode */ - } - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s", - sp->stream.msg ? sp->stream.msg : "(null)"); - return (0); - } - } while (state != Z_STREAM_END); - return (1); -} - -static void -PixarLogClose(TIFF* tif) -{ - PixarLogState* sp = (PixarLogState*) tif->tif_data; - TIFFDirectory *td = &tif->tif_dir; - - assert(sp != 0); - /* In a really sneaky (and really incorrect, and untruthful, and - * troublesome, and error-prone) maneuver that completely goes against - * the spirit of TIFF, and breaks TIFF, on close, we covertly - * modify both bitspersample and sampleformat in the directory to - * indicate 8-bit linear. This way, the decode "just works" even for - * readers that don't know about PixarLog, or how to set - * the PIXARLOGDATFMT pseudo-tag. - */ - - if (sp->state&PLSTATE_INIT) { - /* We test the state to avoid an issue such as in - * http://bugzilla.maptools.org/show_bug.cgi?id=2604 - * What appends in that case is that the bitspersample is 1 and - * a TransferFunction is set. The size of the TransferFunction - * depends on 1<td_bitspersample = 8; - td->td_sampleformat = SAMPLEFORMAT_UINT; - } -} - -static void -PixarLogCleanup(TIFF* tif) -{ - PixarLogState* sp = (PixarLogState*) tif->tif_data; - - assert(sp != 0); - - (void)TIFFPredictorCleanup(tif); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->FromLT2) _TIFFfree(sp->FromLT2); - if (sp->From14) _TIFFfree(sp->From14); - if (sp->From8) _TIFFfree(sp->From8); - if (sp->ToLinearF) _TIFFfree(sp->ToLinearF); - if (sp->ToLinear16) _TIFFfree(sp->ToLinear16); - if (sp->ToLinear8) _TIFFfree(sp->ToLinear8); - if (sp->state&PLSTATE_INIT) { - if (tif->tif_mode == O_RDONLY) - inflateEnd(&sp->stream); - else - deflateEnd(&sp->stream); - } - if (sp->tbuf) - _TIFFfree(sp->tbuf); - _TIFFfree(sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int -PixarLogVSetField(TIFF* tif, uint32 tag, va_list ap) -{ - static const char module[] = "PixarLogVSetField"; - PixarLogState *sp = (PixarLogState *)tif->tif_data; - int result; - - switch (tag) { - case TIFFTAG_PIXARLOGQUALITY: - sp->quality = (int) va_arg(ap, int); - if (tif->tif_mode != O_RDONLY && (sp->state&PLSTATE_INIT)) { - if (deflateParams(&sp->stream, - sp->quality, Z_DEFAULT_STRATEGY) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s", - sp->stream.msg ? sp->stream.msg : "(null)"); - return (0); - } - } - return (1); - case TIFFTAG_PIXARLOGDATAFMT: - sp->user_datafmt = (int) va_arg(ap, int); - /* Tweak the TIFF header so that the rest of libtiff knows what - * size of data will be passed between app and library, and - * assume that the app knows what it is doing and is not - * confused by these header manipulations... - */ - switch (sp->user_datafmt) { - case PIXARLOGDATAFMT_8BIT: - case PIXARLOGDATAFMT_8BITABGR: - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT); - break; - case PIXARLOGDATAFMT_11BITLOG: - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT); - break; - case PIXARLOGDATAFMT_12BITPICIO: - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_INT); - break; - case PIXARLOGDATAFMT_16BIT: - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT); - break; - case PIXARLOGDATAFMT_FLOAT: - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 32); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP); - break; - } - /* - * Must recalculate sizes should bits/sample change. - */ - tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tmsize_t)(-1); - tif->tif_scanlinesize = TIFFScanlineSize(tif); - result = 1; /* NB: pseudo tag */ - break; - default: - result = (*sp->vsetparent)(tif, tag, ap); - } - return (result); -} - -static int -PixarLogVGetField(TIFF* tif, uint32 tag, va_list ap) -{ - PixarLogState *sp = (PixarLogState *)tif->tif_data; - - switch (tag) { - case TIFFTAG_PIXARLOGQUALITY: - *va_arg(ap, int*) = sp->quality; - break; - case TIFFTAG_PIXARLOGDATAFMT: - *va_arg(ap, int*) = sp->user_datafmt; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return (1); -} - -static const TIFFField pixarlogFields[] = { - {TIFFTAG_PIXARLOGDATAFMT, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, FALSE, FALSE, "", NULL}, - {TIFFTAG_PIXARLOGQUALITY, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, FALSE, FALSE, "", NULL} -}; - -int -TIFFInitPixarLog(TIFF* tif, int scheme) -{ - static const char module[] = "TIFFInitPixarLog"; - - PixarLogState* sp; - - assert(scheme == COMPRESSION_PIXARLOG); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, pixarlogFields, - TIFFArrayCount(pixarlogFields))) { - TIFFErrorExt(tif->tif_clientdata, module, - "Merging PixarLog codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8*) _TIFFmalloc(sizeof (PixarLogState)); - if (tif->tif_data == NULL) - goto bad; - sp = (PixarLogState*) tif->tif_data; - _TIFFmemset(sp, 0, sizeof (*sp)); - sp->stream.data_type = Z_BINARY; - sp->user_datafmt = PIXARLOGDATAFMT_UNKNOWN; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = PixarLogFixupTags; - tif->tif_setupdecode = PixarLogSetupDecode; - tif->tif_predecode = PixarLogPreDecode; - tif->tif_decoderow = PixarLogDecode; - tif->tif_decodestrip = PixarLogDecode; - tif->tif_decodetile = PixarLogDecode; - tif->tif_setupencode = PixarLogSetupEncode; - tif->tif_preencode = PixarLogPreEncode; - tif->tif_postencode = PixarLogPostEncode; - tif->tif_encoderow = PixarLogEncode; - tif->tif_encodestrip = PixarLogEncode; - tif->tif_encodetile = PixarLogEncode; - tif->tif_close = PixarLogClose; - tif->tif_cleanup = PixarLogCleanup; - - /* Override SetField so we can handle our private pseudo-tag */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = PixarLogVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = PixarLogVSetField; /* hook for codec tags */ - - /* Default values for codec-specific fields */ - sp->quality = Z_DEFAULT_COMPRESSION; /* default comp. level */ - sp->state = 0; - - /* we don't wish to use the predictor, - * the default is none, which predictor value 1 - */ - (void) TIFFPredictorInit(tif); - - /* - * build the companding tables - */ - PixarLogMakeTables(sp); - - return (1); -bad: - TIFFErrorExt(tif->tif_clientdata, module, - "No space for PixarLog state block"); - return (0); -} -#endif /* PIXARLOG_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_predict.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_predict.c deleted file mode 100644 index f7c41a1..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_predict.c +++ /dev/null @@ -1,879 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Predictor Tag Support (used by multiple codecs). - */ -#include "tiffiop.h" -#include "tif_predict.h" - -#define PredictorState(tif) ((TIFFPredictorState*) (tif)->tif_data) - -static int horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc); -static int horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc); -static int horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc); -static int swabHorAcc16(TIFF* tif, uint8* cp0, tmsize_t cc); -static int swabHorAcc32(TIFF* tif, uint8* cp0, tmsize_t cc); -static int horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc); -static int horDiff16(TIFF* tif, uint8* cp0, tmsize_t cc); -static int horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc); -static int swabHorDiff16(TIFF* tif, uint8* cp0, tmsize_t cc); -static int swabHorDiff32(TIFF* tif, uint8* cp0, tmsize_t cc); -static int fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc); -static int fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc); -static int PredictorDecodeRow(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s); -static int PredictorDecodeTile(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s); -static int PredictorEncodeRow(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); -static int PredictorEncodeTile(TIFF* tif, uint8* bp0, tmsize_t cc0, uint16 s); - -static int -PredictorSetup(TIFF* tif) -{ - static const char module[] = "PredictorSetup"; - - TIFFPredictorState* sp = PredictorState(tif); - TIFFDirectory* td = &tif->tif_dir; - - switch (sp->predictor) /* no differencing */ - { - case PREDICTOR_NONE: - return 1; - case PREDICTOR_HORIZONTAL: - if (td->td_bitspersample != 8 - && td->td_bitspersample != 16 - && td->td_bitspersample != 32) { - TIFFErrorExt(tif->tif_clientdata, module, - "Horizontal differencing \"Predictor\" not supported with %d-bit samples", - td->td_bitspersample); - return 0; - } - break; - case PREDICTOR_FLOATINGPOINT: - if (td->td_sampleformat != SAMPLEFORMAT_IEEEFP) { - TIFFErrorExt(tif->tif_clientdata, module, - "Floating point \"Predictor\" not supported with %d data format", - td->td_sampleformat); - return 0; - } - if (td->td_bitspersample != 16 - && td->td_bitspersample != 24 - && td->td_bitspersample != 32 - && td->td_bitspersample != 64) { /* Should 64 be allowed? */ - TIFFErrorExt(tif->tif_clientdata, module, - "Floating point \"Predictor\" not supported with %d-bit samples", - td->td_bitspersample); - return 0; - } - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, - "\"Predictor\" value %d not supported", - sp->predictor); - return 0; - } - sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ? - td->td_samplesperpixel : 1); - /* - * Calculate the scanline/tile-width size in bytes. - */ - if (isTiled(tif)) - sp->rowsize = TIFFTileRowSize(tif); - else - sp->rowsize = TIFFScanlineSize(tif); - if (sp->rowsize == 0) - return 0; - - return 1; -} - -static int -PredictorSetupDecode(TIFF* tif) -{ - TIFFPredictorState* sp = PredictorState(tif); - TIFFDirectory* td = &tif->tif_dir; - - /* Note: when PredictorSetup() fails, the effets of setupdecode() */ - /* will not be "cancelled" so setupdecode() might be robust to */ - /* be called several times. */ - if (!(*sp->setupdecode)(tif) || !PredictorSetup(tif)) - return 0; - - if (sp->predictor == 2) { - switch (td->td_bitspersample) { - case 8: sp->decodepfunc = horAcc8; break; - case 16: sp->decodepfunc = horAcc16; break; - case 32: sp->decodepfunc = horAcc32; break; - } - /* - * Override default decoding method with one that does the - * predictor stuff. - */ - if( tif->tif_decoderow != PredictorDecodeRow ) - { - sp->decoderow = tif->tif_decoderow; - tif->tif_decoderow = PredictorDecodeRow; - sp->decodestrip = tif->tif_decodestrip; - tif->tif_decodestrip = PredictorDecodeTile; - sp->decodetile = tif->tif_decodetile; - tif->tif_decodetile = PredictorDecodeTile; - } - - /* - * If the data is horizontally differenced 16-bit data that - * requires byte-swapping, then it must be byte swapped before - * the accumulation step. We do this with a special-purpose - * routine and override the normal post decoding logic that - * the library setup when the directory was read. - */ - if (tif->tif_flags & TIFF_SWAB) { - if (sp->decodepfunc == horAcc16) { - sp->decodepfunc = swabHorAcc16; - tif->tif_postdecode = _TIFFNoPostDecode; - } else if (sp->decodepfunc == horAcc32) { - sp->decodepfunc = swabHorAcc32; - tif->tif_postdecode = _TIFFNoPostDecode; - } - } - } - - else if (sp->predictor == 3) { - sp->decodepfunc = fpAcc; - /* - * Override default decoding method with one that does the - * predictor stuff. - */ - if( tif->tif_decoderow != PredictorDecodeRow ) - { - sp->decoderow = tif->tif_decoderow; - tif->tif_decoderow = PredictorDecodeRow; - sp->decodestrip = tif->tif_decodestrip; - tif->tif_decodestrip = PredictorDecodeTile; - sp->decodetile = tif->tif_decodetile; - tif->tif_decodetile = PredictorDecodeTile; - } - /* - * The data should not be swapped outside of the floating - * point predictor, the accumulation routine should return - * byres in the native order. - */ - if (tif->tif_flags & TIFF_SWAB) { - tif->tif_postdecode = _TIFFNoPostDecode; - } - /* - * Allocate buffer to keep the decoded bytes before - * rearranging in the right order - */ - } - - return 1; -} - -static int -PredictorSetupEncode(TIFF* tif) -{ - TIFFPredictorState* sp = PredictorState(tif); - TIFFDirectory* td = &tif->tif_dir; - - if (!(*sp->setupencode)(tif) || !PredictorSetup(tif)) - return 0; - - if (sp->predictor == 2) { - switch (td->td_bitspersample) { - case 8: sp->encodepfunc = horDiff8; break; - case 16: sp->encodepfunc = horDiff16; break; - case 32: sp->encodepfunc = horDiff32; break; - } - /* - * Override default encoding method with one that does the - * predictor stuff. - */ - if( tif->tif_encoderow != PredictorEncodeRow ) - { - sp->encoderow = tif->tif_encoderow; - tif->tif_encoderow = PredictorEncodeRow; - sp->encodestrip = tif->tif_encodestrip; - tif->tif_encodestrip = PredictorEncodeTile; - sp->encodetile = tif->tif_encodetile; - tif->tif_encodetile = PredictorEncodeTile; - } - - /* - * If the data is horizontally differenced 16-bit data that - * requires byte-swapping, then it must be byte swapped after - * the differentiation step. We do this with a special-purpose - * routine and override the normal post decoding logic that - * the library setup when the directory was read. - */ - if (tif->tif_flags & TIFF_SWAB) { - if (sp->encodepfunc == horDiff16) { - sp->encodepfunc = swabHorDiff16; - tif->tif_postdecode = _TIFFNoPostDecode; - } else if (sp->encodepfunc == horDiff32) { - sp->encodepfunc = swabHorDiff32; - tif->tif_postdecode = _TIFFNoPostDecode; - } - } - } - - else if (sp->predictor == 3) { - sp->encodepfunc = fpDiff; - /* - * Override default encoding method with one that does the - * predictor stuff. - */ - if( tif->tif_encoderow != PredictorEncodeRow ) - { - sp->encoderow = tif->tif_encoderow; - tif->tif_encoderow = PredictorEncodeRow; - sp->encodestrip = tif->tif_encodestrip; - tif->tif_encodestrip = PredictorEncodeTile; - sp->encodetile = tif->tif_encodetile; - tif->tif_encodetile = PredictorEncodeTile; - } - } - - return 1; -} - -#define REPEAT4(n, op) \ - switch (n) { \ - default: { \ - tmsize_t i; for (i = n-4; i > 0; i--) { op; } } /*-fallthrough*/ \ - case 4: op; /*-fallthrough*/ \ - case 3: op; /*-fallthrough*/ \ - case 2: op; /*-fallthrough*/ \ - case 1: op; /*-fallthrough*/ \ - case 0: ; \ - } - -/* Remarks related to C standard compliance in all below functions : */ -/* - to avoid any undefined behaviour, we only operate on unsigned types */ -/* since the behaviour of "overflows" is defined (wrap over) */ -/* - when storing into the byte stream, we explicitly mask with 0xff so */ -/* as to make icc -check=conversions happy (not necessary by the standard) */ - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int -horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - tmsize_t stride = PredictorState(tif)->stride; - - unsigned char* cp = (unsigned char*) cp0; - if((cc%stride)!=0) - { - TIFFErrorExt(tif->tif_clientdata, "horAcc8", - "%s", "(cc%stride)!=0"); - return 0; - } - - if (cc > stride) { - /* - * Pipeline the most common cases. - */ - if (stride == 3) { - unsigned int cr = cp[0]; - unsigned int cg = cp[1]; - unsigned int cb = cp[2]; - cc -= 3; - cp += 3; - while (cc>0) { - cp[0] = (unsigned char) ((cr += cp[0]) & 0xff); - cp[1] = (unsigned char) ((cg += cp[1]) & 0xff); - cp[2] = (unsigned char) ((cb += cp[2]) & 0xff); - cc -= 3; - cp += 3; - } - } else if (stride == 4) { - unsigned int cr = cp[0]; - unsigned int cg = cp[1]; - unsigned int cb = cp[2]; - unsigned int ca = cp[3]; - cc -= 4; - cp += 4; - while (cc>0) { - cp[0] = (unsigned char) ((cr += cp[0]) & 0xff); - cp[1] = (unsigned char) ((cg += cp[1]) & 0xff); - cp[2] = (unsigned char) ((cb += cp[2]) & 0xff); - cp[3] = (unsigned char) ((ca += cp[3]) & 0xff); - cc -= 4; - cp += 4; - } - } else { - cc -= stride; - do { - REPEAT4(stride, cp[stride] = - (unsigned char) ((cp[stride] + *cp) & 0xff); cp++) - cc -= stride; - } while (cc>0); - } - } - return 1; -} - -static int -swabHorAcc16(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - uint16* wp = (uint16*) cp0; - tmsize_t wc = cc / 2; - - TIFFSwabArrayOfShort(wp, wc); - return horAcc16(tif, cp0, cc); -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int -horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - tmsize_t stride = PredictorState(tif)->stride; - uint16* wp = (uint16*) cp0; - tmsize_t wc = cc / 2; - - if((cc%(2*stride))!=0) - { - TIFFErrorExt(tif->tif_clientdata, "horAcc16", - "%s", "cc%(2*stride))!=0"); - return 0; - } - - if (wc > stride) { - wc -= stride; - do { - REPEAT4(stride, wp[stride] = (uint16)(((unsigned int)wp[stride] + (unsigned int)wp[0]) & 0xffff); wp++) - wc -= stride; - } while (wc > 0); - } - return 1; -} - -static int -swabHorAcc32(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - uint32* wp = (uint32*) cp0; - tmsize_t wc = cc / 4; - - TIFFSwabArrayOfLong(wp, wc); - return horAcc32(tif, cp0, cc); -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int -horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - tmsize_t stride = PredictorState(tif)->stride; - uint32* wp = (uint32*) cp0; - tmsize_t wc = cc / 4; - - if((cc%(4*stride))!=0) - { - TIFFErrorExt(tif->tif_clientdata, "horAcc32", - "%s", "cc%(4*stride))!=0"); - return 0; - } - - if (wc > stride) { - wc -= stride; - do { - REPEAT4(stride, wp[stride] += wp[0]; wp++) - wc -= stride; - } while (wc > 0); - } - return 1; -} - -/* - * Floating point predictor accumulation routine. - */ -static int -fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - tmsize_t stride = PredictorState(tif)->stride; - uint32 bps = tif->tif_dir.td_bitspersample / 8; - tmsize_t wc = cc / bps; - tmsize_t count = cc; - uint8 *cp = (uint8 *) cp0; - uint8 *tmp; - - if(cc%(bps*stride)!=0) - { - TIFFErrorExt(tif->tif_clientdata, "fpAcc", - "%s", "cc%(bps*stride))!=0"); - return 0; - } - - tmp = (uint8 *)_TIFFmalloc(cc); - if (!tmp) - return 0; - - while (count > stride) { - REPEAT4(stride, cp[stride] = - (unsigned char) ((cp[stride] + cp[0]) & 0xff); cp++) - count -= stride; - } - - _TIFFmemcpy(tmp, cp0, cc); - cp = (uint8 *) cp0; - for (count = 0; count < wc; count++) { - uint32 byte; - for (byte = 0; byte < bps; byte++) { - #if WORDS_BIGENDIAN - cp[bps * count + byte] = tmp[byte * wc + count]; - #else - cp[bps * count + byte] = - tmp[(bps - byte - 1) * wc + count]; - #endif - } - } - _TIFFfree(tmp); - return 1; -} - -/* - * Decode a scanline and apply the predictor routine. - */ -static int -PredictorDecodeRow(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) -{ - TIFFPredictorState *sp = PredictorState(tif); - - assert(sp != NULL); - assert(sp->decoderow != NULL); - assert(sp->decodepfunc != NULL); - - if ((*sp->decoderow)(tif, op0, occ0, s)) { - return (*sp->decodepfunc)(tif, op0, occ0); - } else - return 0; -} - -/* - * Decode a tile/strip and apply the predictor routine. - * Note that horizontal differencing must be done on a - * row-by-row basis. The width of a "row" has already - * been calculated at pre-decode time according to the - * strip/tile dimensions. - */ -static int -PredictorDecodeTile(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) -{ - TIFFPredictorState *sp = PredictorState(tif); - - assert(sp != NULL); - assert(sp->decodetile != NULL); - - if ((*sp->decodetile)(tif, op0, occ0, s)) { - tmsize_t rowsize = sp->rowsize; - assert(rowsize > 0); - if((occ0%rowsize) !=0) - { - TIFFErrorExt(tif->tif_clientdata, "PredictorDecodeTile", - "%s", "occ0%rowsize != 0"); - return 0; - } - assert(sp->decodepfunc != NULL); - while (occ0 > 0) { - if( !(*sp->decodepfunc)(tif, op0, rowsize) ) - return 0; - occ0 -= rowsize; - op0 += rowsize; - } - return 1; - } else - return 0; -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int -horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - TIFFPredictorState* sp = PredictorState(tif); - tmsize_t stride = sp->stride; - unsigned char* cp = (unsigned char*) cp0; - - if((cc%stride)!=0) - { - TIFFErrorExt(tif->tif_clientdata, "horDiff8", - "%s", "(cc%stride)!=0"); - return 0; - } - - if (cc > stride) { - cc -= stride; - /* - * Pipeline the most common cases. - */ - if (stride == 3) { - unsigned int r1, g1, b1; - unsigned int r2 = cp[0]; - unsigned int g2 = cp[1]; - unsigned int b2 = cp[2]; - do { - r1 = cp[3]; cp[3] = (unsigned char)((r1-r2)&0xff); r2 = r1; - g1 = cp[4]; cp[4] = (unsigned char)((g1-g2)&0xff); g2 = g1; - b1 = cp[5]; cp[5] = (unsigned char)((b1-b2)&0xff); b2 = b1; - cp += 3; - } while ((cc -= 3) > 0); - } else if (stride == 4) { - unsigned int r1, g1, b1, a1; - unsigned int r2 = cp[0]; - unsigned int g2 = cp[1]; - unsigned int b2 = cp[2]; - unsigned int a2 = cp[3]; - do { - r1 = cp[4]; cp[4] = (unsigned char)((r1-r2)&0xff); r2 = r1; - g1 = cp[5]; cp[5] = (unsigned char)((g1-g2)&0xff); g2 = g1; - b1 = cp[6]; cp[6] = (unsigned char)((b1-b2)&0xff); b2 = b1; - a1 = cp[7]; cp[7] = (unsigned char)((a1-a2)&0xff); a2 = a1; - cp += 4; - } while ((cc -= 4) > 0); - } else { - cp += cc - 1; - do { - REPEAT4(stride, cp[stride] = (unsigned char)((cp[stride] - cp[0])&0xff); cp--) - } while ((cc -= stride) > 0); - } - } - return 1; -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int -horDiff16(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - TIFFPredictorState* sp = PredictorState(tif); - tmsize_t stride = sp->stride; - uint16 *wp = (uint16*) cp0; - tmsize_t wc = cc/2; - - if((cc%(2*stride))!=0) - { - TIFFErrorExt(tif->tif_clientdata, "horDiff8", - "%s", "(cc%(2*stride))!=0"); - return 0; - } - - if (wc > stride) { - wc -= stride; - wp += wc - 1; - do { - REPEAT4(stride, wp[stride] = (uint16)(((unsigned int)wp[stride] - (unsigned int)wp[0]) & 0xffff); wp--) - wc -= stride; - } while (wc > 0); - } - return 1; -} - -static int -swabHorDiff16(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - uint16* wp = (uint16*) cp0; - tmsize_t wc = cc / 2; - - if( !horDiff16(tif, cp0, cc) ) - return 0; - - TIFFSwabArrayOfShort(wp, wc); - return 1; -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int -horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - TIFFPredictorState* sp = PredictorState(tif); - tmsize_t stride = sp->stride; - uint32 *wp = (uint32*) cp0; - tmsize_t wc = cc/4; - - if((cc%(4*stride))!=0) - { - TIFFErrorExt(tif->tif_clientdata, "horDiff32", - "%s", "(cc%(4*stride))!=0"); - return 0; - } - - if (wc > stride) { - wc -= stride; - wp += wc - 1; - do { - REPEAT4(stride, wp[stride] -= wp[0]; wp--) - wc -= stride; - } while (wc > 0); - } - return 1; -} - -static int -swabHorDiff32(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - uint32* wp = (uint32*) cp0; - tmsize_t wc = cc / 4; - - if( !horDiff32(tif, cp0, cc) ) - return 0; - - TIFFSwabArrayOfLong(wp, wc); - return 1; -} - -/* - * Floating point predictor differencing routine. - */ -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int -fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc) -{ - tmsize_t stride = PredictorState(tif)->stride; - uint32 bps = tif->tif_dir.td_bitspersample / 8; - tmsize_t wc = cc / bps; - tmsize_t count; - uint8 *cp = (uint8 *) cp0; - uint8 *tmp; - - if((cc%(bps*stride))!=0) - { - TIFFErrorExt(tif->tif_clientdata, "fpDiff", - "%s", "(cc%(bps*stride))!=0"); - return 0; - } - - tmp = (uint8 *)_TIFFmalloc(cc); - if (!tmp) - return 0; - - _TIFFmemcpy(tmp, cp0, cc); - for (count = 0; count < wc; count++) { - uint32 byte; - for (byte = 0; byte < bps; byte++) { - #if WORDS_BIGENDIAN - cp[byte * wc + count] = tmp[bps * count + byte]; - #else - cp[(bps - byte - 1) * wc + count] = - tmp[bps * count + byte]; - #endif - } - } - _TIFFfree(tmp); - - cp = (uint8 *) cp0; - cp += cc - stride - 1; - for (count = cc; count > stride; count -= stride) - REPEAT4(stride, cp[stride] = (unsigned char)((cp[stride] - cp[0])&0xff); cp--) - return 1; -} - -static int -PredictorEncodeRow(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - TIFFPredictorState *sp = PredictorState(tif); - - assert(sp != NULL); - assert(sp->encodepfunc != NULL); - assert(sp->encoderow != NULL); - - /* XXX horizontal differencing alters user's data XXX */ - if( !(*sp->encodepfunc)(tif, bp, cc) ) - return 0; - return (*sp->encoderow)(tif, bp, cc, s); -} - -static int -PredictorEncodeTile(TIFF* tif, uint8* bp0, tmsize_t cc0, uint16 s) -{ - static const char module[] = "PredictorEncodeTile"; - TIFFPredictorState *sp = PredictorState(tif); - uint8 *working_copy; - tmsize_t cc = cc0, rowsize; - unsigned char* bp; - int result_code; - - assert(sp != NULL); - assert(sp->encodepfunc != NULL); - assert(sp->encodetile != NULL); - - /* - * Do predictor manipulation in a working buffer to avoid altering - * the callers buffer. http://trac.osgeo.org/gdal/ticket/1965 - */ - working_copy = (uint8*) _TIFFmalloc(cc0); - if( working_copy == NULL ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Out of memory allocating " TIFF_SSIZE_FORMAT " byte temp buffer.", - cc0 ); - return 0; - } - memcpy( working_copy, bp0, cc0 ); - bp = working_copy; - - rowsize = sp->rowsize; - assert(rowsize > 0); - if((cc0%rowsize)!=0) - { - TIFFErrorExt(tif->tif_clientdata, "PredictorEncodeTile", - "%s", "(cc0%rowsize)!=0"); - _TIFFfree( working_copy ); - return 0; - } - while (cc > 0) { - (*sp->encodepfunc)(tif, bp, rowsize); - cc -= rowsize; - bp += rowsize; - } - result_code = (*sp->encodetile)(tif, working_copy, cc0, s); - - _TIFFfree( working_copy ); - - return result_code; -} - -#define FIELD_PREDICTOR (FIELD_CODEC+0) /* XXX */ - -static const TIFFField predictFields[] = { - { TIFFTAG_PREDICTOR, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UINT16, FIELD_PREDICTOR, FALSE, FALSE, "Predictor", NULL }, -}; - -static int -PredictorVSetField(TIFF* tif, uint32 tag, va_list ap) -{ - TIFFPredictorState *sp = PredictorState(tif); - - assert(sp != NULL); - assert(sp->vsetparent != NULL); - - switch (tag) { - case TIFFTAG_PREDICTOR: - sp->predictor = (uint16) va_arg(ap, uint16_vap); - TIFFSetFieldBit(tif, FIELD_PREDICTOR); - break; - default: - return (*sp->vsetparent)(tif, tag, ap); - } - tif->tif_flags |= TIFF_DIRTYDIRECT; - return 1; -} - -static int -PredictorVGetField(TIFF* tif, uint32 tag, va_list ap) -{ - TIFFPredictorState *sp = PredictorState(tif); - - assert(sp != NULL); - assert(sp->vgetparent != NULL); - - switch (tag) { - case TIFFTAG_PREDICTOR: - *va_arg(ap, uint16*) = (uint16)sp->predictor; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return 1; -} - -static void -PredictorPrintDir(TIFF* tif, FILE* fd, long flags) -{ - TIFFPredictorState* sp = PredictorState(tif); - - (void) flags; - if (TIFFFieldSet(tif,FIELD_PREDICTOR)) { - fprintf(fd, " Predictor: "); - switch (sp->predictor) { - case 1: fprintf(fd, "none "); break; - case 2: fprintf(fd, "horizontal differencing "); break; - case 3: fprintf(fd, "floating point predictor "); break; - } - fprintf(fd, "%d (0x%x)\n", sp->predictor, sp->predictor); - } - if (sp->printdir) - (*sp->printdir)(tif, fd, flags); -} - -int -TIFFPredictorInit(TIFF* tif) -{ - TIFFPredictorState* sp = PredictorState(tif); - - assert(sp != 0); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, predictFields, - TIFFArrayCount(predictFields))) { - TIFFErrorExt(tif->tif_clientdata, "TIFFPredictorInit", - "Merging Predictor codec-specific tags failed"); - return 0; - } - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = - PredictorVGetField;/* hook for predictor tag */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = - PredictorVSetField;/* hook for predictor tag */ - sp->printdir = tif->tif_tagmethods.printdir; - tif->tif_tagmethods.printdir = - PredictorPrintDir; /* hook for predictor tag */ - - sp->setupdecode = tif->tif_setupdecode; - tif->tif_setupdecode = PredictorSetupDecode; - sp->setupencode = tif->tif_setupencode; - tif->tif_setupencode = PredictorSetupEncode; - - sp->predictor = 1; /* default value */ - sp->encodepfunc = NULL; /* no predictor routine */ - sp->decodepfunc = NULL; /* no predictor routine */ - return 1; -} - -int -TIFFPredictorCleanup(TIFF* tif) -{ - TIFFPredictorState* sp = PredictorState(tif); - - assert(sp != 0); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - tif->tif_tagmethods.printdir = sp->printdir; - tif->tif_setupdecode = sp->setupdecode; - tif->tif_setupencode = sp->setupencode; - - return 1; -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_predict.h b/Dependencies/FreeImage/Source/LibTIFF4/tif_predict.h deleted file mode 100644 index ccb1f46..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_predict.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 1995-1997 Sam Leffler - * Copyright (c) 1995-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFFPREDICT_ -#define _TIFFPREDICT_ -/* - * ``Library-private'' Support for the Predictor Tag - */ - -typedef int (*TIFFEncodeDecodeMethod)(TIFF* tif, uint8* buf, tmsize_t size); - -/* - * Codecs that want to support the Predictor tag must place - * this structure first in their private state block so that - * the predictor code can cast tif_data to find its state. - */ -typedef struct { - int predictor; /* predictor tag value */ - tmsize_t stride; /* sample stride over data */ - tmsize_t rowsize; /* tile/strip row size */ - - TIFFCodeMethod encoderow; /* parent codec encode/decode row */ - TIFFCodeMethod encodestrip; /* parent codec encode/decode strip */ - TIFFCodeMethod encodetile; /* parent codec encode/decode tile */ - TIFFEncodeDecodeMethod encodepfunc; /* horizontal differencer */ - - TIFFCodeMethod decoderow; /* parent codec encode/decode row */ - TIFFCodeMethod decodestrip; /* parent codec encode/decode strip */ - TIFFCodeMethod decodetile; /* parent codec encode/decode tile */ - TIFFEncodeDecodeMethod decodepfunc; /* horizontal accumulator */ - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ - TIFFPrintMethod printdir; /* super-class method */ - TIFFBoolMethod setupdecode; /* super-class method */ - TIFFBoolMethod setupencode; /* super-class method */ -} TIFFPredictorState; - -#if defined(__cplusplus) -extern "C" { -#endif -extern int TIFFPredictorInit(TIFF*); -extern int TIFFPredictorCleanup(TIFF*); -#if defined(__cplusplus) -} -#endif -#endif /* _TIFFPREDICT_ */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_print.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_print.c deleted file mode 100644 index 97d0d0d..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_print.c +++ /dev/null @@ -1,720 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Directory Printing Support - */ -#include "tiffiop.h" -#include - -#include - -static void -_TIFFprintAsciiBounded(FILE* fd, const char* cp, size_t max_chars); - -static const char * const photoNames[] = { - "min-is-white", /* PHOTOMETRIC_MINISWHITE */ - "min-is-black", /* PHOTOMETRIC_MINISBLACK */ - "RGB color", /* PHOTOMETRIC_RGB */ - "palette color (RGB from colormap)", /* PHOTOMETRIC_PALETTE */ - "transparency mask", /* PHOTOMETRIC_MASK */ - "separated", /* PHOTOMETRIC_SEPARATED */ - "YCbCr", /* PHOTOMETRIC_YCBCR */ - "7 (0x7)", - "CIE L*a*b*", /* PHOTOMETRIC_CIELAB */ - "ICC L*a*b*", /* PHOTOMETRIC_ICCLAB */ - "ITU L*a*b*" /* PHOTOMETRIC_ITULAB */ -}; -#define NPHOTONAMES (sizeof (photoNames) / sizeof (photoNames[0])) - -static const char * const orientNames[] = { - "0 (0x0)", - "row 0 top, col 0 lhs", /* ORIENTATION_TOPLEFT */ - "row 0 top, col 0 rhs", /* ORIENTATION_TOPRIGHT */ - "row 0 bottom, col 0 rhs", /* ORIENTATION_BOTRIGHT */ - "row 0 bottom, col 0 lhs", /* ORIENTATION_BOTLEFT */ - "row 0 lhs, col 0 top", /* ORIENTATION_LEFTTOP */ - "row 0 rhs, col 0 top", /* ORIENTATION_RIGHTTOP */ - "row 0 rhs, col 0 bottom", /* ORIENTATION_RIGHTBOT */ - "row 0 lhs, col 0 bottom", /* ORIENTATION_LEFTBOT */ -}; -#define NORIENTNAMES (sizeof (orientNames) / sizeof (orientNames[0])) - -static void -_TIFFPrintField(FILE* fd, const TIFFField *fip, - uint32 value_count, void *raw_data) -{ - uint32 j; - - fprintf(fd, " %s: ", fip->field_name); - - for(j = 0; j < value_count; j++) { - if(fip->field_type == TIFF_BYTE) - fprintf(fd, "%u", ((uint8 *) raw_data)[j]); - else if(fip->field_type == TIFF_UNDEFINED) - fprintf(fd, "0x%x", - (unsigned int) ((unsigned char *) raw_data)[j]); - else if(fip->field_type == TIFF_SBYTE) - fprintf(fd, "%d", ((int8 *) raw_data)[j]); - else if(fip->field_type == TIFF_SHORT) - fprintf(fd, "%u", ((uint16 *) raw_data)[j]); - else if(fip->field_type == TIFF_SSHORT) - fprintf(fd, "%d", ((int16 *) raw_data)[j]); - else if(fip->field_type == TIFF_LONG) - fprintf(fd, "%lu", - (unsigned long)((uint32 *) raw_data)[j]); - else if(fip->field_type == TIFF_SLONG) - fprintf(fd, "%ld", (long)((int32 *) raw_data)[j]); - else if(fip->field_type == TIFF_IFD) - fprintf(fd, "0x%lx", - (unsigned long)((uint32 *) raw_data)[j]); - else if(fip->field_type == TIFF_RATIONAL - || fip->field_type == TIFF_SRATIONAL - || fip->field_type == TIFF_FLOAT) - fprintf(fd, "%f", ((float *) raw_data)[j]); - else if(fip->field_type == TIFF_LONG8) -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - fprintf(fd, "%I64u", - (unsigned __int64)((uint64 *) raw_data)[j]); -#else - fprintf(fd, "%llu", - (unsigned long long)((uint64 *) raw_data)[j]); -#endif - else if(fip->field_type == TIFF_SLONG8) -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - fprintf(fd, "%I64d", (__int64)((int64 *) raw_data)[j]); -#else - fprintf(fd, "%lld", (long long)((int64 *) raw_data)[j]); -#endif - else if(fip->field_type == TIFF_IFD8) -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - fprintf(fd, "0x%I64x", - (unsigned __int64)((uint64 *) raw_data)[j]); -#else - fprintf(fd, "0x%llx", - (unsigned long long)((uint64 *) raw_data)[j]); -#endif - else if(fip->field_type == TIFF_FLOAT) - fprintf(fd, "%f", ((float *)raw_data)[j]); - else if(fip->field_type == TIFF_DOUBLE) - fprintf(fd, "%f", ((double *) raw_data)[j]); - else if(fip->field_type == TIFF_ASCII) { - fprintf(fd, "%s", (char *) raw_data); - break; - } - else { - fprintf(fd, ""); - break; - } - - if(j < value_count - 1) - fprintf(fd, ","); - } - - fprintf(fd, "\n"); -} - -static int -_TIFFPrettyPrintField(TIFF* tif, const TIFFField *fip, FILE* fd, uint32 tag, - uint32 value_count, void *raw_data) -{ - (void) tif; - - /* do not try to pretty print auto-defined fields */ - if (strncmp(fip->field_name,"Tag ", 4) == 0) { - return 0; - } - - switch (tag) - { - case TIFFTAG_INKSET: - if (value_count == 2 && fip->field_type == TIFF_SHORT) { - fprintf(fd, " Ink Set: "); - switch (*((uint16*)raw_data)) { - case INKSET_CMYK: - fprintf(fd, "CMYK\n"); - break; - default: - fprintf(fd, "%u (0x%x)\n", - *((uint16*)raw_data), - *((uint16*)raw_data)); - break; - } - return 1; - } - return 0; - - case TIFFTAG_DOTRANGE: - if (value_count == 2 && fip->field_type == TIFF_SHORT) { - fprintf(fd, " Dot Range: %u-%u\n", - ((uint16*)raw_data)[0], ((uint16*)raw_data)[1]); - return 1; - } - return 0; - - case TIFFTAG_WHITEPOINT: - if (value_count == 2 && fip->field_type == TIFF_RATIONAL) { - fprintf(fd, " White Point: %g-%g\n", - ((float *)raw_data)[0], ((float *)raw_data)[1]); - return 1; - } - return 0; - - case TIFFTAG_XMLPACKET: - { - uint32 i; - - fprintf(fd, " XMLPacket (XMP Metadata):\n" ); - for(i = 0; i < value_count; i++) - fputc(((char *)raw_data)[i], fd); - fprintf( fd, "\n" ); - return 1; - } - case TIFFTAG_RICHTIFFIPTC: - /* - * XXX: for some weird reason RichTIFFIPTC tag - * defined as array of LONG values. - */ - fprintf(fd, - " RichTIFFIPTC Data: , %lu bytes\n", - (unsigned long) value_count * 4); - return 1; - - case TIFFTAG_PHOTOSHOP: - fprintf(fd, " Photoshop Data: , %lu bytes\n", - (unsigned long) value_count); - return 1; - - case TIFFTAG_ICCPROFILE: - fprintf(fd, " ICC Profile: , %lu bytes\n", - (unsigned long) value_count); - return 1; - - case TIFFTAG_STONITS: - if (value_count == 1 && fip->field_type == TIFF_DOUBLE) { - fprintf(fd, - " Sample to Nits conversion factor: %.4e\n", - *((double*)raw_data)); - return 1; - } - return 0; - } - - return 0; -} - -/* - * Print the contents of the current directory - * to the specified stdio file stream. - */ -void -TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) -{ - TIFFDirectory *td = &tif->tif_dir; - char *sep; - long l, n; - -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - fprintf(fd, "TIFF Directory at offset 0x%I64x (%I64u)\n", - (unsigned __int64) tif->tif_diroff, - (unsigned __int64) tif->tif_diroff); -#else - fprintf(fd, "TIFF Directory at offset 0x%llx (%llu)\n", - (unsigned long long) tif->tif_diroff, - (unsigned long long) tif->tif_diroff); -#endif - if (TIFFFieldSet(tif,FIELD_SUBFILETYPE)) { - fprintf(fd, " Subfile Type:"); - sep = " "; - if (td->td_subfiletype & FILETYPE_REDUCEDIMAGE) { - fprintf(fd, "%sreduced-resolution image", sep); - sep = "/"; - } - if (td->td_subfiletype & FILETYPE_PAGE) { - fprintf(fd, "%smulti-page document", sep); - sep = "/"; - } - if (td->td_subfiletype & FILETYPE_MASK) - fprintf(fd, "%stransparency mask", sep); - fprintf(fd, " (%lu = 0x%lx)\n", - (unsigned long) td->td_subfiletype, (long) td->td_subfiletype); - } - if (TIFFFieldSet(tif,FIELD_IMAGEDIMENSIONS)) { - fprintf(fd, " Image Width: %lu Image Length: %lu", - (unsigned long) td->td_imagewidth, (unsigned long) td->td_imagelength); - if (TIFFFieldSet(tif,FIELD_IMAGEDEPTH)) - fprintf(fd, " Image Depth: %lu", - (unsigned long) td->td_imagedepth); - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif,FIELD_TILEDIMENSIONS)) { - fprintf(fd, " Tile Width: %lu Tile Length: %lu", - (unsigned long) td->td_tilewidth, (unsigned long) td->td_tilelength); - if (TIFFFieldSet(tif,FIELD_TILEDEPTH)) - fprintf(fd, " Tile Depth: %lu", - (unsigned long) td->td_tiledepth); - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif,FIELD_RESOLUTION)) { - fprintf(fd, " Resolution: %g, %g", - td->td_xresolution, td->td_yresolution); - if (TIFFFieldSet(tif,FIELD_RESOLUTIONUNIT)) { - switch (td->td_resolutionunit) { - case RESUNIT_NONE: - fprintf(fd, " (unitless)"); - break; - case RESUNIT_INCH: - fprintf(fd, " pixels/inch"); - break; - case RESUNIT_CENTIMETER: - fprintf(fd, " pixels/cm"); - break; - default: - fprintf(fd, " (unit %u = 0x%x)", - td->td_resolutionunit, - td->td_resolutionunit); - break; - } - } - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif,FIELD_POSITION)) - fprintf(fd, " Position: %g, %g\n", - td->td_xposition, td->td_yposition); - if (TIFFFieldSet(tif,FIELD_BITSPERSAMPLE)) - fprintf(fd, " Bits/Sample: %u\n", td->td_bitspersample); - if (TIFFFieldSet(tif,FIELD_SAMPLEFORMAT)) { - fprintf(fd, " Sample Format: "); - switch (td->td_sampleformat) { - case SAMPLEFORMAT_VOID: - fprintf(fd, "void\n"); - break; - case SAMPLEFORMAT_INT: - fprintf(fd, "signed integer\n"); - break; - case SAMPLEFORMAT_UINT: - fprintf(fd, "unsigned integer\n"); - break; - case SAMPLEFORMAT_IEEEFP: - fprintf(fd, "IEEE floating point\n"); - break; - case SAMPLEFORMAT_COMPLEXINT: - fprintf(fd, "complex signed integer\n"); - break; - case SAMPLEFORMAT_COMPLEXIEEEFP: - fprintf(fd, "complex IEEE floating point\n"); - break; - default: - fprintf(fd, "%u (0x%x)\n", - td->td_sampleformat, td->td_sampleformat); - break; - } - } - if (TIFFFieldSet(tif,FIELD_COMPRESSION)) { - const TIFFCodec* c = TIFFFindCODEC(td->td_compression); - fprintf(fd, " Compression Scheme: "); - if (c) - fprintf(fd, "%s\n", c->name); - else - fprintf(fd, "%u (0x%x)\n", - td->td_compression, td->td_compression); - } - if (TIFFFieldSet(tif,FIELD_PHOTOMETRIC)) { - fprintf(fd, " Photometric Interpretation: "); - if (td->td_photometric < NPHOTONAMES) - fprintf(fd, "%s\n", photoNames[td->td_photometric]); - else { - switch (td->td_photometric) { - case PHOTOMETRIC_LOGL: - fprintf(fd, "CIE Log2(L)\n"); - break; - case PHOTOMETRIC_LOGLUV: - fprintf(fd, "CIE Log2(L) (u',v')\n"); - break; - default: - fprintf(fd, "%u (0x%x)\n", - td->td_photometric, td->td_photometric); - break; - } - } - } - if (TIFFFieldSet(tif,FIELD_EXTRASAMPLES) && td->td_extrasamples) { - uint16 i; - fprintf(fd, " Extra Samples: %u<", td->td_extrasamples); - sep = ""; - for (i = 0; i < td->td_extrasamples; i++) { - switch (td->td_sampleinfo[i]) { - case EXTRASAMPLE_UNSPECIFIED: - fprintf(fd, "%sunspecified", sep); - break; - case EXTRASAMPLE_ASSOCALPHA: - fprintf(fd, "%sassoc-alpha", sep); - break; - case EXTRASAMPLE_UNASSALPHA: - fprintf(fd, "%sunassoc-alpha", sep); - break; - default: - fprintf(fd, "%s%u (0x%x)", sep, - td->td_sampleinfo[i], td->td_sampleinfo[i]); - break; - } - sep = ", "; - } - fprintf(fd, ">\n"); - } - if (TIFFFieldSet(tif,FIELD_INKNAMES)) { - char* cp; - uint16 i; - fprintf(fd, " Ink Names: "); - i = td->td_samplesperpixel; - sep = ""; - for (cp = td->td_inknames; - i > 0 && cp < td->td_inknames + td->td_inknameslen; - cp = strchr(cp,'\0')+1, i--) { - size_t max_chars = - td->td_inknameslen - (cp - td->td_inknames); - fputs(sep, fd); - _TIFFprintAsciiBounded(fd, cp, max_chars); - sep = ", "; - } - fputs("\n", fd); - } - if (TIFFFieldSet(tif,FIELD_THRESHHOLDING)) { - fprintf(fd, " Thresholding: "); - switch (td->td_threshholding) { - case THRESHHOLD_BILEVEL: - fprintf(fd, "bilevel art scan\n"); - break; - case THRESHHOLD_HALFTONE: - fprintf(fd, "halftone or dithered scan\n"); - break; - case THRESHHOLD_ERRORDIFFUSE: - fprintf(fd, "error diffused\n"); - break; - default: - fprintf(fd, "%u (0x%x)\n", - td->td_threshholding, td->td_threshholding); - break; - } - } - if (TIFFFieldSet(tif,FIELD_FILLORDER)) { - fprintf(fd, " FillOrder: "); - switch (td->td_fillorder) { - case FILLORDER_MSB2LSB: - fprintf(fd, "msb-to-lsb\n"); - break; - case FILLORDER_LSB2MSB: - fprintf(fd, "lsb-to-msb\n"); - break; - default: - fprintf(fd, "%u (0x%x)\n", - td->td_fillorder, td->td_fillorder); - break; - } - } - if (TIFFFieldSet(tif,FIELD_YCBCRSUBSAMPLING)) - { - fprintf(fd, " YCbCr Subsampling: %u, %u\n", - td->td_ycbcrsubsampling[0], td->td_ycbcrsubsampling[1] ); - } - if (TIFFFieldSet(tif,FIELD_YCBCRPOSITIONING)) { - fprintf(fd, " YCbCr Positioning: "); - switch (td->td_ycbcrpositioning) { - case YCBCRPOSITION_CENTERED: - fprintf(fd, "centered\n"); - break; - case YCBCRPOSITION_COSITED: - fprintf(fd, "cosited\n"); - break; - default: - fprintf(fd, "%u (0x%x)\n", - td->td_ycbcrpositioning, td->td_ycbcrpositioning); - break; - } - } - if (TIFFFieldSet(tif,FIELD_HALFTONEHINTS)) - fprintf(fd, " Halftone Hints: light %u dark %u\n", - td->td_halftonehints[0], td->td_halftonehints[1]); - if (TIFFFieldSet(tif,FIELD_ORIENTATION)) { - fprintf(fd, " Orientation: "); - if (td->td_orientation < NORIENTNAMES) - fprintf(fd, "%s\n", orientNames[td->td_orientation]); - else - fprintf(fd, "%u (0x%x)\n", - td->td_orientation, td->td_orientation); - } - if (TIFFFieldSet(tif,FIELD_SAMPLESPERPIXEL)) - fprintf(fd, " Samples/Pixel: %u\n", td->td_samplesperpixel); - if (TIFFFieldSet(tif,FIELD_ROWSPERSTRIP)) { - fprintf(fd, " Rows/Strip: "); - if (td->td_rowsperstrip == (uint32) -1) - fprintf(fd, "(infinite)\n"); - else - fprintf(fd, "%lu\n", (unsigned long) td->td_rowsperstrip); - } - if (TIFFFieldSet(tif,FIELD_MINSAMPLEVALUE)) - fprintf(fd, " Min Sample Value: %u\n", td->td_minsamplevalue); - if (TIFFFieldSet(tif,FIELD_MAXSAMPLEVALUE)) - fprintf(fd, " Max Sample Value: %u\n", td->td_maxsamplevalue); - if (TIFFFieldSet(tif,FIELD_SMINSAMPLEVALUE)) { - int i; - int count = (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1; - fprintf(fd, " SMin Sample Value:"); - for (i = 0; i < count; ++i) - fprintf(fd, " %g", td->td_sminsamplevalue[i]); - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif,FIELD_SMAXSAMPLEVALUE)) { - int i; - int count = (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1; - fprintf(fd, " SMax Sample Value:"); - for (i = 0; i < count; ++i) - fprintf(fd, " %g", td->td_smaxsamplevalue[i]); - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif,FIELD_PLANARCONFIG)) { - fprintf(fd, " Planar Configuration: "); - switch (td->td_planarconfig) { - case PLANARCONFIG_CONTIG: - fprintf(fd, "single image plane\n"); - break; - case PLANARCONFIG_SEPARATE: - fprintf(fd, "separate image planes\n"); - break; - default: - fprintf(fd, "%u (0x%x)\n", - td->td_planarconfig, td->td_planarconfig); - break; - } - } - if (TIFFFieldSet(tif,FIELD_PAGENUMBER)) - fprintf(fd, " Page Number: %u-%u\n", - td->td_pagenumber[0], td->td_pagenumber[1]); - if (TIFFFieldSet(tif,FIELD_COLORMAP)) { - fprintf(fd, " Color Map: "); - if (flags & TIFFPRINT_COLORMAP) { - fprintf(fd, "\n"); - n = 1L<td_bitspersample; - for (l = 0; l < n; l++) - fprintf(fd, " %5ld: %5u %5u %5u\n", - l, - td->td_colormap[0][l], - td->td_colormap[1][l], - td->td_colormap[2][l]); - } else - fprintf(fd, "(present)\n"); - } - if (TIFFFieldSet(tif,FIELD_REFBLACKWHITE)) { - int i; - fprintf(fd, " Reference Black/White:\n"); - for (i = 0; i < 3; i++) - fprintf(fd, " %2d: %5g %5g\n", i, - td->td_refblackwhite[2*i+0], - td->td_refblackwhite[2*i+1]); - } - if (TIFFFieldSet(tif,FIELD_TRANSFERFUNCTION)) { - fprintf(fd, " Transfer Function: "); - if (flags & TIFFPRINT_CURVES) { - fprintf(fd, "\n"); - n = 1L<td_bitspersample; - for (l = 0; l < n; l++) { - uint16 i; - fprintf(fd, " %2ld: %5u", - l, td->td_transferfunction[0][l]); - for (i = 1; i < td->td_samplesperpixel - td->td_extrasamples && i < 3; i++) - fprintf(fd, " %5u", - td->td_transferfunction[i][l]); - fputc('\n', fd); - } - } else - fprintf(fd, "(present)\n"); - } - if (TIFFFieldSet(tif, FIELD_SUBIFD) && (td->td_subifd)) { - uint16 i; - fprintf(fd, " SubIFD Offsets:"); - for (i = 0; i < td->td_nsubifd; i++) -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - fprintf(fd, " %5I64u", - (unsigned __int64) td->td_subifd[i]); -#else - fprintf(fd, " %5llu", - (unsigned long long) td->td_subifd[i]); -#endif - fputc('\n', fd); - } - - /* - ** Custom tag support. - */ - { - int i; - short count; - - count = (short) TIFFGetTagListCount(tif); - for(i = 0; i < count; i++) { - uint32 tag = TIFFGetTagListEntry(tif, i); - const TIFFField *fip; - uint32 value_count; - int mem_alloc = 0; - void *raw_data; - - fip = TIFFFieldWithTag(tif, tag); - if(fip == NULL) - continue; - - if(fip->field_passcount) { - if (fip->field_readcount == TIFF_VARIABLE2 ) { - if(TIFFGetField(tif, tag, &value_count, &raw_data) != 1) - continue; - } else if (fip->field_readcount == TIFF_VARIABLE ) { - uint16 small_value_count; - if(TIFFGetField(tif, tag, &small_value_count, &raw_data) != 1) - continue; - value_count = small_value_count; - } else { - assert (fip->field_readcount == TIFF_VARIABLE - || fip->field_readcount == TIFF_VARIABLE2); - continue; - } - } else { - if (fip->field_readcount == TIFF_VARIABLE - || fip->field_readcount == TIFF_VARIABLE2) - value_count = 1; - else if (fip->field_readcount == TIFF_SPP) - value_count = td->td_samplesperpixel; - else - value_count = fip->field_readcount; - if (fip->field_tag == TIFFTAG_DOTRANGE - && strcmp(fip->field_name,"DotRange") == 0) { - /* TODO: This is an evil exception and should not have been - handled this way ... likely best if we move it into - the directory structure with an explicit field in - libtiff 4.1 and assign it a FIELD_ value */ - static uint16 dotrange[2]; - raw_data = dotrange; - TIFFGetField(tif, tag, dotrange+0, dotrange+1); - } else if (fip->field_type == TIFF_ASCII - || fip->field_readcount == TIFF_VARIABLE - || fip->field_readcount == TIFF_VARIABLE2 - || fip->field_readcount == TIFF_SPP - || value_count > 1) { - if(TIFFGetField(tif, tag, &raw_data) != 1) - continue; - } else { - raw_data = _TIFFmalloc( - _TIFFDataSize(fip->field_type) - * value_count); - mem_alloc = 1; - if(TIFFGetField(tif, tag, raw_data) != 1) { - _TIFFfree(raw_data); - continue; - } - } - } - - /* - * Catch the tags which needs to be specially handled - * and pretty print them. If tag not handled in - * _TIFFPrettyPrintField() fall down and print it as - * any other tag. - */ - if (!_TIFFPrettyPrintField(tif, fip, fd, tag, value_count, raw_data)) - _TIFFPrintField(fd, fip, value_count, raw_data); - - if(mem_alloc) - _TIFFfree(raw_data); - } - } - - if (tif->tif_tagmethods.printdir) - (*tif->tif_tagmethods.printdir)(tif, fd, flags); - - _TIFFFillStriles( tif ); - - if ((flags & TIFFPRINT_STRIPS) && - TIFFFieldSet(tif,FIELD_STRIPOFFSETS)) { - uint32 s; - - fprintf(fd, " %lu %s:\n", - (unsigned long) td->td_nstrips, - isTiled(tif) ? "Tiles" : "Strips"); - for (s = 0; s < td->td_nstrips; s++) -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - fprintf(fd, " %3lu: [%8I64u, %8I64u]\n", - (unsigned long) s, - td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0, - td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0); -#else - fprintf(fd, " %3lu: [%8llu, %8llu]\n", - (unsigned long) s, - td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0, - td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0); -#endif - } -} - -void -_TIFFprintAscii(FILE* fd, const char* cp) -{ - _TIFFprintAsciiBounded( fd, cp, strlen(cp)); -} - -static void -_TIFFprintAsciiBounded(FILE* fd, const char* cp, size_t max_chars) -{ - for (; max_chars > 0 && *cp != '\0'; cp++, max_chars--) { - const char* tp; - - if (isprint((int)*cp)) { - fputc(*cp, fd); - continue; - } - for (tp = "\tt\bb\rr\nn\vv"; *tp; tp++) - if (*tp++ == *cp) - break; - if (*tp) - fprintf(fd, "\\%c", *tp); - else - fprintf(fd, "\\%03o", *cp & 0xff); - } -} - -void -_TIFFprintAsciiTag(FILE* fd, const char* name, const char* value) -{ - fprintf(fd, " %s: \"", name); - _TIFFprintAscii(fd, value); - fprintf(fd, "\"\n"); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_read.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_read.c deleted file mode 100644 index 4d3091c..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_read.c +++ /dev/null @@ -1,1570 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * Scanline-oriented Read Support - */ -#include "tiffiop.h" -#include - -#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0)) -#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1) - -int TIFFFillStrip(TIFF* tif, uint32 strip); -int TIFFFillTile(TIFF* tif, uint32 tile); -static int TIFFStartStrip(TIFF* tif, uint32 strip); -static int TIFFStartTile(TIFF* tif, uint32 tile); -static int TIFFCheckRead(TIFF*, int); -static tmsize_t -TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size,const char* module); -static tmsize_t -TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* module); - -#define NOSTRIP ((uint32)(-1)) /* undefined state */ -#define NOTILE ((uint32)(-1)) /* undefined state */ - -#define INITIAL_THRESHOLD (1024 * 1024) -#define THRESHOLD_MULTIPLIER 10 -#define MAX_THRESHOLD (THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * INITIAL_THRESHOLD) - -/* Read 'size' bytes in tif_rawdata buffer starting at offset 'rawdata_offset' - * Returns 1 in case of success, 0 otherwise. */ -static int TIFFReadAndRealloc( TIFF* tif, tmsize_t size, - tmsize_t rawdata_offset, - int is_strip, uint32 strip_or_tile, - const char* module ) -{ -#if SIZEOF_SIZE_T == 8 - tmsize_t threshold = INITIAL_THRESHOLD; -#endif - tmsize_t already_read = 0; - - /* On 64 bit processes, read first a maximum of 1 MB, then 10 MB, etc */ - /* so as to avoid allocating too much memory in case the file is too */ - /* short. We could ask for the file size, but this might be */ - /* expensive with some I/O layers (think of reading a gzipped file) */ - /* Restrict to 64 bit processes, so as to avoid reallocs() */ - /* on 32 bit processes where virtual memory is scarce. */ - while( already_read < size ) - { - tmsize_t bytes_read; - tmsize_t to_read = size - already_read; -#if SIZEOF_SIZE_T == 8 - if( to_read >= threshold && threshold < MAX_THRESHOLD && - already_read + to_read + rawdata_offset > tif->tif_rawdatasize ) - { - to_read = threshold; - threshold *= THRESHOLD_MULTIPLIER; - } -#endif - if (already_read + to_read + rawdata_offset > tif->tif_rawdatasize) { - uint8* new_rawdata; - assert((tif->tif_flags & TIFF_MYBUFFER) != 0); - tif->tif_rawdatasize = (tmsize_t)TIFFroundup_64( - (uint64)already_read + to_read + rawdata_offset, 1024); - if (tif->tif_rawdatasize==0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Invalid buffer size"); - return 0; - } - new_rawdata = (uint8*) _TIFFrealloc( - tif->tif_rawdata, tif->tif_rawdatasize); - if( new_rawdata == 0 ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "No space for data buffer at scanline %lu", - (unsigned long) tif->tif_row); - _TIFFfree(tif->tif_rawdata); - tif->tif_rawdata = 0; - tif->tif_rawdatasize = 0; - return 0; - } - tif->tif_rawdata = new_rawdata; - } - - bytes_read = TIFFReadFile(tif, - tif->tif_rawdata + rawdata_offset + already_read, to_read); - already_read += bytes_read; - if (bytes_read != to_read) { - memset( tif->tif_rawdata + rawdata_offset + already_read, 0, - tif->tif_rawdatasize - rawdata_offset - already_read ); -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - if( is_strip ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at scanline %lu; got %I64u bytes, " - "expected %I64u", - (unsigned long) tif->tif_row, - (unsigned __int64) already_read, - (unsigned __int64) size); - } - else - { - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at row %lu, col %lu, tile %lu; " - "got %I64u bytes, expected %I64u", - (unsigned long) tif->tif_row, - (unsigned long) tif->tif_col, - (unsigned long) strip_or_tile, - (unsigned __int64) already_read, - (unsigned __int64) size); - } -#else - if( is_strip ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at scanline %lu; got %llu bytes, " - "expected %llu", - (unsigned long) tif->tif_row, - (unsigned long long) already_read, - (unsigned long long) size); - } - else - { - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at row %lu, col %lu, tile %lu; " - "got %llu bytes, expected %llu", - (unsigned long) tif->tif_row, - (unsigned long) tif->tif_col, - (unsigned long) strip_or_tile, - (unsigned long long) already_read, - (unsigned long long) size); - } -#endif - return 0; - } - } - return 1; -} - - -static int -TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart ) -{ - static const char module[] = "TIFFFillStripPartial"; - register TIFFDirectory *td = &tif->tif_dir; - tmsize_t unused_data; - uint64 read_offset; - tmsize_t to_read; - tmsize_t read_ahead_mod; - /* tmsize_t bytecountm; */ - - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; - - /* - * Expand raw data buffer, if needed, to hold data - * strip coming from file (perhaps should set upper - * bound on the size of a buffer we'll use?). - */ - - /* bytecountm=(tmsize_t) td->td_stripbytecount[strip]; */ - - /* Not completely sure where the * 2 comes from, but probably for */ - /* an exponentional growth strategy of tif_rawdatasize */ - if( read_ahead < TIFF_TMSIZE_T_MAX / 2 ) - read_ahead_mod = read_ahead * 2; - else - read_ahead_mod = read_ahead; - if (read_ahead_mod > tif->tif_rawdatasize) { - assert( restart ); - - tif->tif_curstrip = NOSTRIP; - if ((tif->tif_flags & TIFF_MYBUFFER) == 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Data buffer too small to hold part of strip %lu", - (unsigned long) strip); - return (0); - } - } - - if( restart ) - { - tif->tif_rawdataloaded = 0; - tif->tif_rawdataoff = 0; - } - - /* - ** If we are reading more data, move any unused data to the - ** start of the buffer. - */ - if( tif->tif_rawdataloaded > 0 ) - unused_data = tif->tif_rawdataloaded - (tif->tif_rawcp - tif->tif_rawdata); - else - unused_data = 0; - - if( unused_data > 0 ) - { - assert((tif->tif_flags&TIFF_BUFFERMMAP)==0); - memmove( tif->tif_rawdata, tif->tif_rawcp, unused_data ); - } - - /* - ** Seek to the point in the file where more data should be read. - */ - read_offset = td->td_stripoffset[strip] - + tif->tif_rawdataoff + tif->tif_rawdataloaded; - - if (!SeekOK(tif, read_offset)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Seek error at scanline %lu, strip %lu", - (unsigned long) tif->tif_row, (unsigned long) strip); - return 0; - } - - /* - ** How much do we want to read? - */ - if( read_ahead_mod > tif->tif_rawdatasize ) - to_read = read_ahead_mod - unused_data; - else - to_read = tif->tif_rawdatasize - unused_data; - if( (uint64) to_read > td->td_stripbytecount[strip] - - tif->tif_rawdataoff - tif->tif_rawdataloaded ) - { - to_read = (tmsize_t) td->td_stripbytecount[strip] - - tif->tif_rawdataoff - tif->tif_rawdataloaded; - } - - assert((tif->tif_flags&TIFF_BUFFERMMAP)==0); - if( !TIFFReadAndRealloc( tif, to_read, unused_data, - 1, /* is_strip */ - 0, /* strip_or_tile */ - module) ) - { - return 0; - } - - tif->tif_rawdataoff = tif->tif_rawdataoff + tif->tif_rawdataloaded - unused_data ; - tif->tif_rawdataloaded = unused_data + to_read; - - tif->tif_rawcc = tif->tif_rawdataloaded; - tif->tif_rawcp = tif->tif_rawdata; - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) { - assert((tif->tif_flags&TIFF_BUFFERMMAP)==0); - TIFFReverseBits(tif->tif_rawdata + unused_data, to_read ); - } - - /* - ** When starting a strip from the beginning we need to - ** restart the decoder. - */ - if( restart ) - { - -#ifdef JPEG_SUPPORT - /* A bit messy since breaks the codec abstraction. Ultimately */ - /* there should be a function pointer for that, but it seems */ - /* only JPEG is affected. */ - /* For JPEG, if there are multiple scans (can generally be known */ - /* with the read_ahead used), we need to read the whole strip */ - if( tif->tif_dir.td_compression==COMPRESSION_JPEG && - (uint64)tif->tif_rawcc < td->td_stripbytecount[strip] ) - { - if( TIFFJPEGIsFullStripRequired(tif) ) - { - return TIFFFillStrip(tif, strip); - } - } -#endif - - return TIFFStartStrip(tif, strip); - } - else - { - return 1; - } -} - -/* - * Seek to a random row+sample in a file. - * - * Only used by TIFFReadScanline, and is only used on - * strip organized files. We do some tricky stuff to try - * and avoid reading the whole compressed raw data for big - * strips. - */ -static int -TIFFSeek(TIFF* tif, uint32 row, uint16 sample ) -{ - register TIFFDirectory *td = &tif->tif_dir; - uint32 strip; - int whole_strip; - tmsize_t read_ahead = 0; - - /* - ** Establish what strip we are working from. - */ - if (row >= td->td_imagelength) { /* out of range */ - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "%lu: Row out of range, max %lu", - (unsigned long) row, - (unsigned long) td->td_imagelength); - return (0); - } - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { - if (sample >= td->td_samplesperpixel) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "%lu: Sample out of range, max %lu", - (unsigned long) sample, (unsigned long) td->td_samplesperpixel); - return (0); - } - strip = (uint32)sample*td->td_stripsperimage + row/td->td_rowsperstrip; - } else - strip = row / td->td_rowsperstrip; - - /* - * Do we want to treat this strip as one whole chunk or - * read it a few lines at a time? - */ -#if defined(CHUNKY_STRIP_READ_SUPPORT) - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; - whole_strip = tif->tif_dir.td_stripbytecount[strip] < 10 - || isMapped(tif); -#else - whole_strip = 1; -#endif - - if( !whole_strip ) - { - /* 16 is for YCbCr mode where we may need to read 16 */ - /* lines at a time to get a decompressed line, and 5000 */ - /* is some constant value, for example for JPEG tables */ - if( tif->tif_scanlinesize < TIFF_TMSIZE_T_MAX / 16 && - tif->tif_scanlinesize * 16 < TIFF_TMSIZE_T_MAX - 5000 ) - { - read_ahead = tif->tif_scanlinesize * 16 + 5000; - } - else - { - read_ahead = tif->tif_scanlinesize; - } - } - - /* - * If we haven't loaded this strip, do so now, possibly - * only reading the first part. - */ - if (strip != tif->tif_curstrip) { /* different strip, refill */ - - if( whole_strip ) - { - if (!TIFFFillStrip(tif, strip)) - return (0); - } - else - { - if( !TIFFFillStripPartial(tif,strip,read_ahead,1) ) - return 0; - } - } - - /* - ** If we already have some data loaded, do we need to read some more? - */ - else if( !whole_strip ) - { - if( ((tif->tif_rawdata + tif->tif_rawdataloaded) - tif->tif_rawcp) < read_ahead - && (uint64) tif->tif_rawdataoff+tif->tif_rawdataloaded < td->td_stripbytecount[strip] ) - { - if( !TIFFFillStripPartial(tif,strip,read_ahead,0) ) - return 0; - } - } - - if (row < tif->tif_row) { - /* - * Moving backwards within the same strip: backup - * to the start and then decode forward (below). - * - * NB: If you're planning on lots of random access within a - * strip, it's better to just read and decode the entire - * strip, and then access the decoded data in a random fashion. - */ - - if( tif->tif_rawdataoff != 0 ) - { - if( !TIFFFillStripPartial(tif,strip,read_ahead,1) ) - return 0; - } - else - { - if (!TIFFStartStrip(tif, strip)) - return (0); - } - } - - if (row != tif->tif_row) { - /* - * Seek forward to the desired row. - */ - - /* TODO: Will this really work with partial buffers? */ - - if (!(*tif->tif_seek)(tif, row - tif->tif_row)) - return (0); - tif->tif_row = row; - } - - return (1); -} - -int -TIFFReadScanline(TIFF* tif, void* buf, uint32 row, uint16 sample) -{ - int e; - - if (!TIFFCheckRead(tif, 0)) - return (-1); - if( (e = TIFFSeek(tif, row, sample)) != 0) { - /* - * Decompress desired row into user buffer. - */ - e = (*tif->tif_decoderow) - (tif, (uint8*) buf, tif->tif_scanlinesize, sample); - - /* we are now poised at the beginning of the next row */ - tif->tif_row = row + 1; - - if (e) - (*tif->tif_postdecode)(tif, (uint8*) buf, - tif->tif_scanlinesize); - } - return (e > 0 ? 1 : -1); -} - -/* - * Calculate the strip size according to the number of - * rows in the strip (check for truncated last strip on any - * of the separations). - */ -static tmsize_t TIFFReadEncodedStripGetStripSize(TIFF* tif, uint32 strip, uint16* pplane) -{ - static const char module[] = "TIFFReadEncodedStrip"; - TIFFDirectory *td = &tif->tif_dir; - uint32 rowsperstrip; - uint32 stripsperplane; - uint32 stripinplane; - uint32 rows; - tmsize_t stripsize; - if (!TIFFCheckRead(tif,0)) - return((tmsize_t)(-1)); - if (strip>=td->td_nstrips) - { - TIFFErrorExt(tif->tif_clientdata,module, - "%lu: Strip out of range, max %lu",(unsigned long)strip, - (unsigned long)td->td_nstrips); - return((tmsize_t)(-1)); - } - - rowsperstrip=td->td_rowsperstrip; - if (rowsperstrip>td->td_imagelength) - rowsperstrip=td->td_imagelength; - stripsperplane= TIFFhowmany_32_maxuint_compat(td->td_imagelength, rowsperstrip); - stripinplane=(strip%stripsperplane); - if( pplane ) *pplane=(uint16)(strip/stripsperplane); - rows=td->td_imagelength-stripinplane*rowsperstrip; - if (rows>rowsperstrip) - rows=rowsperstrip; - stripsize=TIFFVStripSize(tif,rows); - if (stripsize==0) - return((tmsize_t)(-1)); - return stripsize; -} - -/* - * Read a strip of data and decompress the specified - * amount into the user-supplied buffer. - */ -tmsize_t -TIFFReadEncodedStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size) -{ - static const char module[] = "TIFFReadEncodedStrip"; - TIFFDirectory *td = &tif->tif_dir; - tmsize_t stripsize; - uint16 plane; - - stripsize=TIFFReadEncodedStripGetStripSize(tif, strip, &plane); - if (stripsize==((tmsize_t)(-1))) - return((tmsize_t)(-1)); - - /* shortcut to avoid an extra memcpy() */ - if( td->td_compression == COMPRESSION_NONE && - size!=(tmsize_t)(-1) && size >= stripsize && - !isMapped(tif) && - ((tif->tif_flags&TIFF_NOREADRAW)==0) ) - { - if (TIFFReadRawStrip1(tif, strip, buf, stripsize, module) != stripsize) - return ((tmsize_t)(-1)); - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits(buf,stripsize); - - (*tif->tif_postdecode)(tif,buf,stripsize); - return (stripsize); - } - - if ((size!=(tmsize_t)(-1))&&(sizetif_decodestrip)(tif,buf,stripsize,plane)<=0) - return((tmsize_t)(-1)); - (*tif->tif_postdecode)(tif,buf,stripsize); - return(stripsize); -} - -/* Variant of TIFFReadEncodedStrip() that does - * * if *buf == NULL, *buf = _TIFFmalloc(bufsizetoalloc) only after TIFFFillStrip() has - * succeeded. This avoid excessive memory allocation in case of truncated - * file. - * * calls regular TIFFReadEncodedStrip() if *buf != NULL - */ -tmsize_t -_TIFFReadEncodedStripAndAllocBuffer(TIFF* tif, uint32 strip, - void **buf, tmsize_t bufsizetoalloc, - tmsize_t size_to_read) -{ - tmsize_t this_stripsize; - uint16 plane; - - if( *buf != NULL ) - { - return TIFFReadEncodedStrip(tif, strip, *buf, size_to_read); - } - - this_stripsize=TIFFReadEncodedStripGetStripSize(tif, strip, &plane); - if (this_stripsize==((tmsize_t)(-1))) - return((tmsize_t)(-1)); - - if ((size_to_read!=(tmsize_t)(-1))&&(size_to_readtif_clientdata, TIFFFileName(tif), "No space for strip buffer"); - return((tmsize_t)(-1)); - } - _TIFFmemset(*buf, 0, bufsizetoalloc); - - if ((*tif->tif_decodestrip)(tif,*buf,this_stripsize,plane)<=0) - return((tmsize_t)(-1)); - (*tif->tif_postdecode)(tif,*buf,this_stripsize); - return(this_stripsize); - - -} - -static tmsize_t -TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size, - const char* module) -{ - TIFFDirectory *td = &tif->tif_dir; - - if (!_TIFFFillStriles( tif )) - return ((tmsize_t)(-1)); - - assert((tif->tif_flags&TIFF_NOREADRAW)==0); - if (!isMapped(tif)) { - tmsize_t cc; - - if (!SeekOK(tif, td->td_stripoffset[strip])) { - TIFFErrorExt(tif->tif_clientdata, module, - "Seek error at scanline %lu, strip %lu", - (unsigned long) tif->tif_row, (unsigned long) strip); - return ((tmsize_t)(-1)); - } - cc = TIFFReadFile(tif, buf, size); - if (cc != size) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at scanline %lu; got %I64u bytes, expected %I64u", - (unsigned long) tif->tif_row, - (unsigned __int64) cc, - (unsigned __int64) size); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at scanline %lu; got %llu bytes, expected %llu", - (unsigned long) tif->tif_row, - (unsigned long long) cc, - (unsigned long long) size); -#endif - return ((tmsize_t)(-1)); - } - } else { - tmsize_t ma = 0; - tmsize_t n; - if ((td->td_stripoffset[strip] > (uint64)TIFF_TMSIZE_T_MAX)|| - ((ma=(tmsize_t)td->td_stripoffset[strip])>tif->tif_size)) - { - n=0; - } - else if( ma > TIFF_TMSIZE_T_MAX - size ) - { - n=0; - } - else - { - tmsize_t mb=ma+size; - if (mb>tif->tif_size) - n=tif->tif_size-ma; - else - n=size; - } - if (n!=size) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at scanline %lu, strip %lu; got %I64u bytes, expected %I64u", - (unsigned long) tif->tif_row, - (unsigned long) strip, - (unsigned __int64) n, - (unsigned __int64) size); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at scanline %lu, strip %lu; got %llu bytes, expected %llu", - (unsigned long) tif->tif_row, - (unsigned long) strip, - (unsigned long long) n, - (unsigned long long) size); -#endif - return ((tmsize_t)(-1)); - } - _TIFFmemcpy(buf, tif->tif_base + ma, - size); - } - return (size); -} - -static tmsize_t -TIFFReadRawStripOrTile2(TIFF* tif, uint32 strip_or_tile, int is_strip, - tmsize_t size, const char* module) -{ - TIFFDirectory *td = &tif->tif_dir; - - assert( !isMapped(tif) ); - assert((tif->tif_flags&TIFF_NOREADRAW)==0); - - if (!SeekOK(tif, td->td_stripoffset[strip_or_tile])) { - if( is_strip ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Seek error at scanline %lu, strip %lu", - (unsigned long) tif->tif_row, - (unsigned long) strip_or_tile); - } - else - { - TIFFErrorExt(tif->tif_clientdata, module, - "Seek error at row %lu, col %lu, tile %lu", - (unsigned long) tif->tif_row, - (unsigned long) tif->tif_col, - (unsigned long) strip_or_tile); - } - return ((tmsize_t)(-1)); - } - - if( !TIFFReadAndRealloc( tif, size, 0, is_strip, - strip_or_tile, module ) ) - { - return ((tmsize_t)(-1)); - } - - return (size); -} - -/* - * Read a strip of data from the file. - */ -tmsize_t -TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size) -{ - static const char module[] = "TIFFReadRawStrip"; - TIFFDirectory *td = &tif->tif_dir; - uint64 bytecount; - tmsize_t bytecountm; - - if (!TIFFCheckRead(tif, 0)) - return ((tmsize_t)(-1)); - if (strip >= td->td_nstrips) { - TIFFErrorExt(tif->tif_clientdata, module, - "%lu: Strip out of range, max %lu", - (unsigned long) strip, - (unsigned long) td->td_nstrips); - return ((tmsize_t)(-1)); - } - if (tif->tif_flags&TIFF_NOREADRAW) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Compression scheme does not support access to raw uncompressed data"); - return ((tmsize_t)(-1)); - } - bytecount = td->td_stripbytecount[strip]; - if ((int64)bytecount <= 0) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "%I64u: Invalid strip byte count, strip %lu", - (unsigned __int64) bytecount, - (unsigned long) strip); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "%llu: Invalid strip byte count, strip %lu", - (unsigned long long) bytecount, - (unsigned long) strip); -#endif - return ((tmsize_t)(-1)); - } - bytecountm = (tmsize_t)bytecount; - if ((uint64)bytecountm!=bytecount) { - TIFFErrorExt(tif->tif_clientdata, module, "Integer overflow"); - return ((tmsize_t)(-1)); - } - if (size != (tmsize_t)(-1) && size < bytecountm) - bytecountm = size; - return (TIFFReadRawStrip1(tif, strip, buf, bytecountm, module)); -} - -/* - * Read the specified strip and setup for decoding. The data buffer is - * expanded, as necessary, to hold the strip's data. - */ -int -TIFFFillStrip(TIFF* tif, uint32 strip) -{ - static const char module[] = "TIFFFillStrip"; - TIFFDirectory *td = &tif->tif_dir; - - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; - - if ((tif->tif_flags&TIFF_NOREADRAW)==0) - { - uint64 bytecount = td->td_stripbytecount[strip]; - if ((int64)bytecount <= 0) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "Invalid strip byte count %I64u, strip %lu", - (unsigned __int64) bytecount, - (unsigned long) strip); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Invalid strip byte count %llu, strip %lu", - (unsigned long long) bytecount, - (unsigned long) strip); -#endif - return (0); - } - - /* To avoid excessive memory allocations: */ - /* Byte count should normally not be larger than a number of */ - /* times the uncompressed size plus some margin */ - if( bytecount > 1024 * 1024 ) - { - /* 10 and 4096 are just values that could be adjusted. */ - /* Hopefully they are safe enough for all codecs */ - tmsize_t stripsize = TIFFStripSize(tif); - if( stripsize != 0 && - (bytecount - 4096) / 10 > (uint64)stripsize ) - { - uint64 newbytecount = (uint64)stripsize * 10 + 4096; - if( (int64)newbytecount >= 0 ) - { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFWarningExt(tif->tif_clientdata, module, - "Too large strip byte count %I64u, strip %lu. Limiting to %I64u", - (unsigned __int64) bytecount, - (unsigned long) strip, - (unsigned __int64) newbytecount); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Too large strip byte count %llu, strip %lu. Limiting to %llu", - (unsigned long long) bytecount, - (unsigned long) strip, - (unsigned long long) newbytecount); -#endif - bytecount = newbytecount; - } - } - } - - if (isMapped(tif)) { - /* - * We must check for overflow, potentially causing - * an OOB read. Instead of simple - * - * td->td_stripoffset[strip]+bytecount > tif->tif_size - * - * comparison (which can overflow) we do the following - * two comparisons: - */ - if (bytecount > (uint64)tif->tif_size || - td->td_stripoffset[strip] > (uint64)tif->tif_size - bytecount) { - /* - * This error message might seem strange, but - * it's what would happen if a read were done - * instead. - */ -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - - "Read error on strip %lu; " - "got %I64u bytes, expected %I64u", - (unsigned long) strip, - (unsigned __int64) tif->tif_size - td->td_stripoffset[strip], - (unsigned __int64) bytecount); -#else - TIFFErrorExt(tif->tif_clientdata, module, - - "Read error on strip %lu; " - "got %llu bytes, expected %llu", - (unsigned long) strip, - (unsigned long long) tif->tif_size - td->td_stripoffset[strip], - (unsigned long long) bytecount); -#endif - tif->tif_curstrip = NOSTRIP; - return (0); - } - } - - if (isMapped(tif) && - (isFillOrder(tif, td->td_fillorder) - || (tif->tif_flags & TIFF_NOBITREV))) { - /* - * The image is mapped into memory and we either don't - * need to flip bits or the compression routine is - * going to handle this operation itself. In this - * case, avoid copying the raw data and instead just - * reference the data from the memory mapped file - * image. This assumes that the decompression - * routines do not modify the contents of the raw data - * buffer (if they try to, the application will get a - * fault since the file is mapped read-only). - */ - if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) { - _TIFFfree(tif->tif_rawdata); - tif->tif_rawdata = NULL; - tif->tif_rawdatasize = 0; - } - tif->tif_flags &= ~TIFF_MYBUFFER; - tif->tif_rawdatasize = (tmsize_t)bytecount; - tif->tif_rawdata = tif->tif_base + (tmsize_t)td->td_stripoffset[strip]; - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = (tmsize_t) bytecount; - - /* - * When we have tif_rawdata reference directly into the memory mapped file - * we need to be pretty careful about how we use the rawdata. It is not - * a general purpose working buffer as it normally otherwise is. So we - * keep track of this fact to avoid using it improperly. - */ - tif->tif_flags |= TIFF_BUFFERMMAP; - } else { - /* - * Expand raw data buffer, if needed, to hold data - * strip coming from file (perhaps should set upper - * bound on the size of a buffer we'll use?). - */ - tmsize_t bytecountm; - bytecountm=(tmsize_t)bytecount; - if ((uint64)bytecountm!=bytecount) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - return(0); - } - if (bytecountm > tif->tif_rawdatasize) { - tif->tif_curstrip = NOSTRIP; - if ((tif->tif_flags & TIFF_MYBUFFER) == 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Data buffer too small to hold strip %lu", - (unsigned long) strip); - return (0); - } - } - if (tif->tif_flags&TIFF_BUFFERMMAP) { - tif->tif_curstrip = NOSTRIP; - tif->tif_rawdata = NULL; - tif->tif_rawdatasize = 0; - tif->tif_flags &= ~TIFF_BUFFERMMAP; - } - - if( isMapped(tif) ) - { - if (bytecountm > tif->tif_rawdatasize && - !TIFFReadBufferSetup(tif, 0, bytecountm)) - { - return (0); - } - if (TIFFReadRawStrip1(tif, strip, tif->tif_rawdata, - bytecountm, module) != bytecountm) - { - return (0); - } - } - else - { - if (TIFFReadRawStripOrTile2(tif, strip, 1, - bytecountm, module) != bytecountm) - { - return (0); - } - } - - - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = bytecountm; - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits(tif->tif_rawdata, bytecountm); - } - } - return (TIFFStartStrip(tif, strip)); -} - -/* - * Tile-oriented Read Support - * Contributed by Nancy Cam (Silicon Graphics). - */ - -/* - * Read and decompress a tile of data. The - * tile is selected by the (x,y,z,s) coordinates. - */ -tmsize_t -TIFFReadTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s) -{ - if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s)) - return ((tmsize_t)(-1)); - return (TIFFReadEncodedTile(tif, - TIFFComputeTile(tif, x, y, z, s), buf, (tmsize_t)(-1))); -} - -/* - * Read a tile of data and decompress the specified - * amount into the user-supplied buffer. - */ -tmsize_t -TIFFReadEncodedTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size) -{ - static const char module[] = "TIFFReadEncodedTile"; - TIFFDirectory *td = &tif->tif_dir; - tmsize_t tilesize = tif->tif_tilesize; - - if (!TIFFCheckRead(tif, 1)) - return ((tmsize_t)(-1)); - if (tile >= td->td_nstrips) { - TIFFErrorExt(tif->tif_clientdata, module, - "%lu: Tile out of range, max %lu", - (unsigned long) tile, (unsigned long) td->td_nstrips); - return ((tmsize_t)(-1)); - } - - /* shortcut to avoid an extra memcpy() */ - if( td->td_compression == COMPRESSION_NONE && - size!=(tmsize_t)(-1) && size >= tilesize && - !isMapped(tif) && - ((tif->tif_flags&TIFF_NOREADRAW)==0) ) - { - if (TIFFReadRawTile1(tif, tile, buf, tilesize, module) != tilesize) - return ((tmsize_t)(-1)); - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits(buf,tilesize); - - (*tif->tif_postdecode)(tif,buf,tilesize); - return (tilesize); - } - - if (size == (tmsize_t)(-1)) - size = tilesize; - else if (size > tilesize) - size = tilesize; - if (TIFFFillTile(tif, tile) && (*tif->tif_decodetile)(tif, - (uint8*) buf, size, (uint16)(tile/td->td_stripsperimage))) { - (*tif->tif_postdecode)(tif, (uint8*) buf, size); - return (size); - } else - return ((tmsize_t)(-1)); -} - -/* Variant of TIFFReadTile() that does - * * if *buf == NULL, *buf = _TIFFmalloc(bufsizetoalloc) only after TIFFFillTile() has - * succeeded. This avoid excessive memory allocation in case of truncated - * file. - * * calls regular TIFFReadEncodedTile() if *buf != NULL - */ -tmsize_t -_TIFFReadTileAndAllocBuffer(TIFF* tif, - void **buf, tmsize_t bufsizetoalloc, - uint32 x, uint32 y, uint32 z, uint16 s) -{ - if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s)) - return ((tmsize_t)(-1)); - return (_TIFFReadEncodedTileAndAllocBuffer(tif, - TIFFComputeTile(tif, x, y, z, s), - buf, bufsizetoalloc, - (tmsize_t)(-1))); -} - -/* Variant of TIFFReadEncodedTile() that does - * * if *buf == NULL, *buf = _TIFFmalloc(bufsizetoalloc) only after TIFFFillTile() has - * succeeded. This avoid excessive memory allocation in case of truncated - * file. - * * calls regular TIFFReadEncodedTile() if *buf != NULL - */ -tmsize_t -_TIFFReadEncodedTileAndAllocBuffer(TIFF* tif, uint32 tile, - void **buf, tmsize_t bufsizetoalloc, - tmsize_t size_to_read) -{ - static const char module[] = "_TIFFReadEncodedTileAndAllocBuffer"; - TIFFDirectory *td = &tif->tif_dir; - tmsize_t tilesize = tif->tif_tilesize; - - if( *buf != NULL ) - { - return TIFFReadEncodedTile(tif, tile, *buf, size_to_read); - } - - if (!TIFFCheckRead(tif, 1)) - return ((tmsize_t)(-1)); - if (tile >= td->td_nstrips) { - TIFFErrorExt(tif->tif_clientdata, module, - "%lu: Tile out of range, max %lu", - (unsigned long) tile, (unsigned long) td->td_nstrips); - return ((tmsize_t)(-1)); - } - - if (!TIFFFillTile(tif,tile)) - return((tmsize_t)(-1)); - - *buf = _TIFFmalloc(bufsizetoalloc); - if (*buf == NULL) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), - "No space for tile buffer"); - return((tmsize_t)(-1)); - } - _TIFFmemset(*buf, 0, bufsizetoalloc); - - if (size_to_read == (tmsize_t)(-1)) - size_to_read = tilesize; - else if (size_to_read > tilesize) - size_to_read = tilesize; - if( (*tif->tif_decodetile)(tif, - (uint8*) *buf, size_to_read, (uint16)(tile/td->td_stripsperimage))) { - (*tif->tif_postdecode)(tif, (uint8*) *buf, size_to_read); - return (size_to_read); - } else - return ((tmsize_t)(-1)); -} - -static tmsize_t -TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* module) -{ - TIFFDirectory *td = &tif->tif_dir; - - if (!_TIFFFillStriles( tif )) - return ((tmsize_t)(-1)); - - assert((tif->tif_flags&TIFF_NOREADRAW)==0); - if (!isMapped(tif)) { - tmsize_t cc; - - if (!SeekOK(tif, td->td_stripoffset[tile])) { - TIFFErrorExt(tif->tif_clientdata, module, - "Seek error at row %lu, col %lu, tile %lu", - (unsigned long) tif->tif_row, - (unsigned long) tif->tif_col, - (unsigned long) tile); - return ((tmsize_t)(-1)); - } - cc = TIFFReadFile(tif, buf, size); - if (cc != size) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at row %lu, col %lu; got %I64u bytes, expected %I64u", - (unsigned long) tif->tif_row, - (unsigned long) tif->tif_col, - (unsigned __int64) cc, - (unsigned __int64) size); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at row %lu, col %lu; got %llu bytes, expected %llu", - (unsigned long) tif->tif_row, - (unsigned long) tif->tif_col, - (unsigned long long) cc, - (unsigned long long) size); -#endif - return ((tmsize_t)(-1)); - } - } else { - tmsize_t ma,mb; - tmsize_t n; - ma=(tmsize_t)td->td_stripoffset[tile]; - mb=ma+size; - if ((td->td_stripoffset[tile] > (uint64)TIFF_TMSIZE_T_MAX)||(ma>tif->tif_size)) - n=0; - else if ((mbtif->tif_size)) - n=tif->tif_size-ma; - else - n=size; - if (n!=size) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, -"Read error at row %lu, col %lu, tile %lu; got %I64u bytes, expected %I64u", - (unsigned long) tif->tif_row, - (unsigned long) tif->tif_col, - (unsigned long) tile, - (unsigned __int64) n, - (unsigned __int64) size); -#else - TIFFErrorExt(tif->tif_clientdata, module, -"Read error at row %lu, col %lu, tile %lu; got %llu bytes, expected %llu", - (unsigned long) tif->tif_row, - (unsigned long) tif->tif_col, - (unsigned long) tile, - (unsigned long long) n, - (unsigned long long) size); -#endif - return ((tmsize_t)(-1)); - } - _TIFFmemcpy(buf, tif->tif_base + ma, size); - } - return (size); -} - -/* - * Read a tile of data from the file. - */ -tmsize_t -TIFFReadRawTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size) -{ - static const char module[] = "TIFFReadRawTile"; - TIFFDirectory *td = &tif->tif_dir; - uint64 bytecount64; - tmsize_t bytecountm; - - if (!TIFFCheckRead(tif, 1)) - return ((tmsize_t)(-1)); - if (tile >= td->td_nstrips) { - TIFFErrorExt(tif->tif_clientdata, module, - "%lu: Tile out of range, max %lu", - (unsigned long) tile, (unsigned long) td->td_nstrips); - return ((tmsize_t)(-1)); - } - if (tif->tif_flags&TIFF_NOREADRAW) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Compression scheme does not support access to raw uncompressed data"); - return ((tmsize_t)(-1)); - } - bytecount64 = td->td_stripbytecount[tile]; - if (size != (tmsize_t)(-1) && (uint64)size < bytecount64) - bytecount64 = (uint64)size; - bytecountm = (tmsize_t)bytecount64; - if ((uint64)bytecountm!=bytecount64) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - return ((tmsize_t)(-1)); - } - return (TIFFReadRawTile1(tif, tile, buf, bytecountm, module)); -} - -/* - * Read the specified tile and setup for decoding. The data buffer is - * expanded, as necessary, to hold the tile's data. - */ -int -TIFFFillTile(TIFF* tif, uint32 tile) -{ - static const char module[] = "TIFFFillTile"; - TIFFDirectory *td = &tif->tif_dir; - - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; - - if ((tif->tif_flags&TIFF_NOREADRAW)==0) - { - uint64 bytecount = td->td_stripbytecount[tile]; - if ((int64)bytecount <= 0) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "%I64u: Invalid tile byte count, tile %lu", - (unsigned __int64) bytecount, - (unsigned long) tile); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "%llu: Invalid tile byte count, tile %lu", - (unsigned long long) bytecount, - (unsigned long) tile); -#endif - return (0); - } - - /* To avoid excessive memory allocations: */ - /* Byte count should normally not be larger than a number of */ - /* times the uncompressed size plus some margin */ - if( bytecount > 1024 * 1024 ) - { - /* 10 and 4096 are just values that could be adjusted. */ - /* Hopefully they are safe enough for all codecs */ - tmsize_t stripsize = TIFFTileSize(tif); - if( stripsize != 0 && - (bytecount - 4096) / 10 > (uint64)stripsize ) - { - uint64 newbytecount = (uint64)stripsize * 10 + 4096; - if( (int64)newbytecount >= 0 ) - { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFWarningExt(tif->tif_clientdata, module, - "Too large tile byte count %I64u, tile %lu. Limiting to %I64u", - (unsigned __int64) bytecount, - (unsigned long) tile, - (unsigned __int64) newbytecount); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Too large tile byte count %llu, tile %lu. Limiting to %llu", - (unsigned long long) bytecount, - (unsigned long) tile, - (unsigned long long) newbytecount); -#endif - bytecount = newbytecount; - } - } - } - - if (isMapped(tif)) { - /* - * We must check for overflow, potentially causing - * an OOB read. Instead of simple - * - * td->td_stripoffset[tile]+bytecount > tif->tif_size - * - * comparison (which can overflow) we do the following - * two comparisons: - */ - if (bytecount > (uint64)tif->tif_size || - td->td_stripoffset[tile] > (uint64)tif->tif_size - bytecount) { - tif->tif_curtile = NOTILE; - return (0); - } - } - - if (isMapped(tif) && - (isFillOrder(tif, td->td_fillorder) - || (tif->tif_flags & TIFF_NOBITREV))) { - /* - * The image is mapped into memory and we either don't - * need to flip bits or the compression routine is - * going to handle this operation itself. In this - * case, avoid copying the raw data and instead just - * reference the data from the memory mapped file - * image. This assumes that the decompression - * routines do not modify the contents of the raw data - * buffer (if they try to, the application will get a - * fault since the file is mapped read-only). - */ - if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) { - _TIFFfree(tif->tif_rawdata); - tif->tif_rawdata = NULL; - tif->tif_rawdatasize = 0; - } - tif->tif_flags &= ~TIFF_MYBUFFER; - - tif->tif_rawdatasize = (tmsize_t)bytecount; - tif->tif_rawdata = - tif->tif_base + (tmsize_t)td->td_stripoffset[tile]; - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = (tmsize_t) bytecount; - tif->tif_flags |= TIFF_BUFFERMMAP; - } else { - /* - * Expand raw data buffer, if needed, to hold data - * tile coming from file (perhaps should set upper - * bound on the size of a buffer we'll use?). - */ - tmsize_t bytecountm; - bytecountm=(tmsize_t)bytecount; - if ((uint64)bytecountm!=bytecount) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - return(0); - } - if (bytecountm > tif->tif_rawdatasize) { - tif->tif_curtile = NOTILE; - if ((tif->tif_flags & TIFF_MYBUFFER) == 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Data buffer too small to hold tile %lu", - (unsigned long) tile); - return (0); - } - } - if (tif->tif_flags&TIFF_BUFFERMMAP) { - tif->tif_curtile = NOTILE; - tif->tif_rawdata = NULL; - tif->tif_rawdatasize = 0; - tif->tif_flags &= ~TIFF_BUFFERMMAP; - } - - if( isMapped(tif) ) - { - if (bytecountm > tif->tif_rawdatasize && - !TIFFReadBufferSetup(tif, 0, bytecountm)) - { - return (0); - } - if (TIFFReadRawTile1(tif, tile, tif->tif_rawdata, - bytecountm, module) != bytecountm) - { - return (0); - } - } - else - { - if (TIFFReadRawStripOrTile2(tif, tile, 0, - bytecountm, module) != bytecountm) - { - return (0); - } - } - - - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = bytecountm; - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits(tif->tif_rawdata, - tif->tif_rawdataloaded); - } - } - return (TIFFStartTile(tif, tile)); -} - -/* - * Setup the raw data buffer in preparation for - * reading a strip of raw data. If the buffer - * is specified as zero, then a buffer of appropriate - * size is allocated by the library. Otherwise, - * the client must guarantee that the buffer is - * large enough to hold any individual strip of - * raw data. - */ -int -TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size) -{ - static const char module[] = "TIFFReadBufferSetup"; - - assert((tif->tif_flags&TIFF_NOREADRAW)==0); - tif->tif_flags &= ~TIFF_BUFFERMMAP; - - if (tif->tif_rawdata) { - if (tif->tif_flags & TIFF_MYBUFFER) - _TIFFfree(tif->tif_rawdata); - tif->tif_rawdata = NULL; - tif->tif_rawdatasize = 0; - } - if (bp) { - tif->tif_rawdatasize = size; - tif->tif_rawdata = (uint8*) bp; - tif->tif_flags &= ~TIFF_MYBUFFER; - } else { - tif->tif_rawdatasize = (tmsize_t)TIFFroundup_64((uint64)size, 1024); - if (tif->tif_rawdatasize==0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Invalid buffer size"); - return (0); - } - /* Initialize to zero to avoid uninitialized buffers in case of */ - /* short reads (http://bugzilla.maptools.org/show_bug.cgi?id=2651) */ - tif->tif_rawdata = (uint8*) _TIFFcalloc(1, tif->tif_rawdatasize); - tif->tif_flags |= TIFF_MYBUFFER; - } - if (tif->tif_rawdata == NULL) { - TIFFErrorExt(tif->tif_clientdata, module, - "No space for data buffer at scanline %lu", - (unsigned long) tif->tif_row); - tif->tif_rawdatasize = 0; - return (0); - } - return (1); -} - -/* - * Set state to appear as if a - * strip has just been read in. - */ -static int -TIFFStartStrip(TIFF* tif, uint32 strip) -{ - TIFFDirectory *td = &tif->tif_dir; - - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; - - if ((tif->tif_flags & TIFF_CODERSETUP) == 0) { - if (!(*tif->tif_setupdecode)(tif)) - return (0); - tif->tif_flags |= TIFF_CODERSETUP; - } - tif->tif_curstrip = strip; - tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; - tif->tif_flags &= ~TIFF_BUF4WRITE; - - if (tif->tif_flags&TIFF_NOREADRAW) - { - tif->tif_rawcp = NULL; - tif->tif_rawcc = 0; - } - else - { - tif->tif_rawcp = tif->tif_rawdata; - if( tif->tif_rawdataloaded > 0 ) - tif->tif_rawcc = tif->tif_rawdataloaded; - else - tif->tif_rawcc = (tmsize_t)td->td_stripbytecount[strip]; - } - return ((*tif->tif_predecode)(tif, - (uint16)(strip / td->td_stripsperimage))); -} - -/* - * Set state to appear as if a - * tile has just been read in. - */ -static int -TIFFStartTile(TIFF* tif, uint32 tile) -{ - static const char module[] = "TIFFStartTile"; - TIFFDirectory *td = &tif->tif_dir; - uint32 howmany32; - - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; - - if ((tif->tif_flags & TIFF_CODERSETUP) == 0) { - if (!(*tif->tif_setupdecode)(tif)) - return (0); - tif->tif_flags |= TIFF_CODERSETUP; - } - tif->tif_curtile = tile; - howmany32=TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth); - if (howmany32 == 0) { - TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles"); - return 0; - } - tif->tif_row = (tile % howmany32) * td->td_tilelength; - howmany32=TIFFhowmany_32(td->td_imagelength, td->td_tilelength); - if (howmany32 == 0) { - TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles"); - return 0; - } - tif->tif_col = (tile % howmany32) * td->td_tilewidth; - tif->tif_flags &= ~TIFF_BUF4WRITE; - if (tif->tif_flags&TIFF_NOREADRAW) - { - tif->tif_rawcp = NULL; - tif->tif_rawcc = 0; - } - else - { - tif->tif_rawcp = tif->tif_rawdata; - if( tif->tif_rawdataloaded > 0 ) - tif->tif_rawcc = tif->tif_rawdataloaded; - else - tif->tif_rawcc = (tmsize_t)td->td_stripbytecount[tile]; - } - return ((*tif->tif_predecode)(tif, - (uint16)(tile/td->td_stripsperimage))); -} - -static int -TIFFCheckRead(TIFF* tif, int tiles) -{ - if (tif->tif_mode == O_WRONLY) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "File not open for reading"); - return (0); - } - if (tiles ^ isTiled(tif)) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, tiles ? - "Can not read tiles from a stripped image" : - "Can not read scanlines from a tiled image"); - return (0); - } - return (1); -} - -void -_TIFFNoPostDecode(TIFF* tif, uint8* buf, tmsize_t cc) -{ - (void) tif; (void) buf; (void) cc; -} - -void -_TIFFSwab16BitData(TIFF* tif, uint8* buf, tmsize_t cc) -{ - (void) tif; - assert((cc & 1) == 0); - TIFFSwabArrayOfShort((uint16*) buf, cc/2); -} - -void -_TIFFSwab24BitData(TIFF* tif, uint8* buf, tmsize_t cc) -{ - (void) tif; - assert((cc % 3) == 0); - TIFFSwabArrayOfTriples((uint8*) buf, cc/3); -} - -void -_TIFFSwab32BitData(TIFF* tif, uint8* buf, tmsize_t cc) -{ - (void) tif; - assert((cc & 3) == 0); - TIFFSwabArrayOfLong((uint32*) buf, cc/4); -} - -void -_TIFFSwab64BitData(TIFF* tif, uint8* buf, tmsize_t cc) -{ - (void) tif; - assert((cc & 7) == 0); - TIFFSwabArrayOfDouble((double*) buf, cc/8); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_stream.cxx b/Dependencies/FreeImage/Source/LibTIFF4/tif_stream.cxx deleted file mode 100644 index 10cd068..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_stream.cxx +++ /dev/null @@ -1,434 +0,0 @@ -/* - * Copyright (c) 1988-1996 Sam Leffler - * Copyright (c) 1991-1996 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library UNIX-specific Routines. - */ -#include "tiffiop.h" -#include - -#ifndef __VMS -using namespace std; -#endif - -/* - ISO C++ uses a 'std::streamsize' type to define counts. This makes - it similar to, (but perhaps not the same as) size_t. - - The std::ios::pos_type is used to represent stream positions as used - by tellg(), tellp(), seekg(), and seekp(). This makes it similar to - (but perhaps not the same as) 'off_t'. The std::ios::streampos type - is used for character streams, but is documented to not be an - integral type anymore, so it should *not* be assigned to an integral - type. - - The std::ios::off_type is used to specify relative offsets needed by - the variants of seekg() and seekp() which accept a relative offset - argument. - - Useful prototype knowledge: - - Obtain read position - ios::pos_type basic_istream::tellg() - - Set read position - basic_istream& basic_istream::seekg(ios::pos_type) - basic_istream& basic_istream::seekg(ios::off_type, ios_base::seekdir) - - Read data - basic_istream& istream::read(char *str, streamsize count) - - Number of characters read in last unformatted read - streamsize istream::gcount(); - - Obtain write position - ios::pos_type basic_ostream::tellp() - - Set write position - basic_ostream& basic_ostream::seekp(ios::pos_type) - basic_ostream& basic_ostream::seekp(ios::off_type, ios_base::seekdir) - - Write data - basic_ostream& ostream::write(const char *str, streamsize count) -*/ - -struct tiffis_data; -struct tiffos_data; - -extern "C" { - - static tmsize_t _tiffosReadProc(thandle_t, void*, tmsize_t); - static tmsize_t _tiffisReadProc(thandle_t fd, void* buf, tmsize_t size); - static tmsize_t _tiffosWriteProc(thandle_t fd, void* buf, tmsize_t size); - static tmsize_t _tiffisWriteProc(thandle_t, void*, tmsize_t); - static uint64 _tiffosSeekProc(thandle_t fd, uint64 off, int whence); - static uint64 _tiffisSeekProc(thandle_t fd, uint64 off, int whence); - static uint64 _tiffosSizeProc(thandle_t fd); - static uint64 _tiffisSizeProc(thandle_t fd); - static int _tiffosCloseProc(thandle_t fd); - static int _tiffisCloseProc(thandle_t fd); - static int _tiffDummyMapProc(thandle_t , void** base, toff_t* size ); - static void _tiffDummyUnmapProc(thandle_t , void* base, toff_t size ); - static TIFF* _tiffStreamOpen(const char* name, const char* mode, void *fd); - -struct tiffis_data -{ - istream *stream; - ios::pos_type start_pos; -}; - -struct tiffos_data -{ - ostream *stream; - ios::pos_type start_pos; -}; - -static tmsize_t -_tiffosReadProc(thandle_t, void*, tmsize_t) -{ - return 0; -} - -static tmsize_t -_tiffisReadProc(thandle_t fd, void* buf, tmsize_t size) -{ - tiffis_data *data = reinterpret_cast(fd); - - // Verify that type does not overflow. - streamsize request_size = size; - if (static_cast(request_size) != size) - return static_cast(-1); - - data->stream->read((char *) buf, request_size); - - return static_cast(data->stream->gcount()); -} - -static tmsize_t -_tiffosWriteProc(thandle_t fd, void* buf, tmsize_t size) -{ - tiffos_data *data = reinterpret_cast(fd); - ostream *os = data->stream; - ios::pos_type pos = os->tellp(); - - // Verify that type does not overflow. - streamsize request_size = size; - if (static_cast(request_size) != size) - return static_cast(-1); - - os->write(reinterpret_cast(buf), request_size); - - return static_cast(os->tellp() - pos); -} - -static tmsize_t -_tiffisWriteProc(thandle_t, void*, tmsize_t) -{ - return 0; -} - -static uint64 -_tiffosSeekProc(thandle_t fd, uint64 off, int whence) -{ - tiffos_data *data = reinterpret_cast(fd); - ostream *os = data->stream; - - // if the stream has already failed, don't do anything - if( os->fail() ) - return static_cast(-1); - - switch(whence) { - case SEEK_SET: - { - // Compute 64-bit offset - uint64 new_offset = static_cast(data->start_pos) + off; - - // Verify that value does not overflow - ios::off_type offset = static_cast(new_offset); - if (static_cast(offset) != new_offset) - return static_cast(-1); - - os->seekp(offset, ios::beg); - break; - } - case SEEK_CUR: - { - // Verify that value does not overflow - ios::off_type offset = static_cast(off); - if (static_cast(offset) != off) - return static_cast(-1); - - os->seekp(offset, ios::cur); - break; - } - case SEEK_END: - { - // Verify that value does not overflow - ios::off_type offset = static_cast(off); - if (static_cast(offset) != off) - return static_cast(-1); - - os->seekp(offset, ios::end); - break; - } - } - - // Attempt to workaround problems with seeking past the end of the - // stream. ofstream doesn't have a problem with this but - // ostrstream/ostringstream does. In that situation, add intermediate - // '\0' characters. - if( os->fail() ) { -#ifdef __VMS - int old_state; -#else - ios::iostate old_state; -#endif - ios::pos_type origin; - - old_state = os->rdstate(); - // reset the fail bit or else tellp() won't work below - os->clear(os->rdstate() & ~ios::failbit); - switch( whence ) { - case SEEK_SET: - default: - origin = data->start_pos; - break; - case SEEK_CUR: - origin = os->tellp(); - break; - case SEEK_END: - os->seekp(0, ios::end); - origin = os->tellp(); - break; - } - // restore original stream state - os->clear(old_state); - - // only do something if desired seek position is valid - if( (static_cast(origin) + off) > static_cast(data->start_pos) ) { - uint64 num_fill; - - // clear the fail bit - os->clear(os->rdstate() & ~ios::failbit); - - // extend the stream to the expected size - os->seekp(0, ios::end); - num_fill = (static_cast(origin)) + off - os->tellp(); - for( uint64 i = 0; i < num_fill; i++ ) - os->put('\0'); - - // retry the seek - os->seekp(static_cast(static_cast(origin) + off), ios::beg); - } - } - - return static_cast(os->tellp()); -} - -static uint64 -_tiffisSeekProc(thandle_t fd, uint64 off, int whence) -{ - tiffis_data *data = reinterpret_cast(fd); - - switch(whence) { - case SEEK_SET: - { - // Compute 64-bit offset - uint64 new_offset = static_cast(data->start_pos) + off; - - // Verify that value does not overflow - ios::off_type offset = static_cast(new_offset); - if (static_cast(offset) != new_offset) - return static_cast(-1); - - data->stream->seekg(offset, ios::beg); - break; - } - case SEEK_CUR: - { - // Verify that value does not overflow - ios::off_type offset = static_cast(off); - if (static_cast(offset) != off) - return static_cast(-1); - - data->stream->seekg(offset, ios::cur); - break; - } - case SEEK_END: - { - // Verify that value does not overflow - ios::off_type offset = static_cast(off); - if (static_cast(offset) != off) - return static_cast(-1); - - data->stream->seekg(offset, ios::end); - break; - } - } - - return (uint64) (data->stream->tellg() - data->start_pos); -} - -static uint64 -_tiffosSizeProc(thandle_t fd) -{ - tiffos_data *data = reinterpret_cast(fd); - ostream *os = data->stream; - ios::pos_type pos = os->tellp(); - ios::pos_type len; - - os->seekp(0, ios::end); - len = os->tellp(); - os->seekp(pos); - - return (uint64) len; -} - -static uint64 -_tiffisSizeProc(thandle_t fd) -{ - tiffis_data *data = reinterpret_cast(fd); - ios::pos_type pos = data->stream->tellg(); - ios::pos_type len; - - data->stream->seekg(0, ios::end); - len = data->stream->tellg(); - data->stream->seekg(pos); - - return (uint64) len; -} - -static int -_tiffosCloseProc(thandle_t fd) -{ - // Our stream was not allocated by us, so it shouldn't be closed by us. - delete reinterpret_cast(fd); - return 0; -} - -static int -_tiffisCloseProc(thandle_t fd) -{ - // Our stream was not allocated by us, so it shouldn't be closed by us. - delete reinterpret_cast(fd); - return 0; -} - -static int -_tiffDummyMapProc(thandle_t , void** base, toff_t* size ) -{ - (void) base; - (void) size; - return (0); -} - -static void -_tiffDummyUnmapProc(thandle_t , void* base, toff_t size ) -{ - (void) base; - (void) size; -} - -/* - * Open a TIFF file descriptor for read/writing. - */ -static TIFF* -_tiffStreamOpen(const char* name, const char* mode, void *fd) -{ - TIFF* tif; - - if( strchr(mode, 'w') ) { - tiffos_data *data = new tiffos_data; - data->stream = reinterpret_cast(fd); - data->start_pos = data->stream->tellp(); - - // Open for writing. - tif = TIFFClientOpen(name, mode, - reinterpret_cast(data), - _tiffosReadProc, - _tiffosWriteProc, - _tiffosSeekProc, - _tiffosCloseProc, - _tiffosSizeProc, - _tiffDummyMapProc, - _tiffDummyUnmapProc); - if (!tif) { - delete data; - } - } else { - tiffis_data *data = new tiffis_data; - data->stream = reinterpret_cast(fd); - data->start_pos = data->stream->tellg(); - // Open for reading. - tif = TIFFClientOpen(name, mode, - reinterpret_cast(data), - _tiffisReadProc, - _tiffisWriteProc, - _tiffisSeekProc, - _tiffisCloseProc, - _tiffisSizeProc, - _tiffDummyMapProc, - _tiffDummyUnmapProc); - if (!tif) { - delete data; - } - } - - return (tif); -} - -} /* extern "C" */ - -TIFF* -TIFFStreamOpen(const char* name, ostream *os) -{ - // If os is either a ostrstream or ostringstream, and has no data - // written to it yet, then tellp() will return -1 which will break us. - // We workaround this by writing out a dummy character and - // then seek back to the beginning. - if( !os->fail() && static_cast(os->tellp()) < 0 ) { - *os << '\0'; - os->seekp(0); - } - - // NB: We don't support mapped files with streams so add 'm' - return _tiffStreamOpen(name, "wm", os); -} - -TIFF* -TIFFStreamOpen(const char* name, istream *is) -{ - // NB: We don't support mapped files with streams so add 'm' - return _tiffStreamOpen(name, "rm", is); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ - diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_strip.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_strip.c deleted file mode 100644 index 2f0da5d..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_strip.c +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Strip-organized Image Support Routines. - */ -#include "tiffiop.h" - -/* - * Compute which strip a (row,sample) value is in. - */ -uint32 -TIFFComputeStrip(TIFF* tif, uint32 row, uint16 sample) -{ - static const char module[] = "TIFFComputeStrip"; - TIFFDirectory *td = &tif->tif_dir; - uint32 strip; - - strip = row / td->td_rowsperstrip; - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { - if (sample >= td->td_samplesperpixel) { - TIFFErrorExt(tif->tif_clientdata, module, - "%lu: Sample out of range, max %lu", - (unsigned long) sample, (unsigned long) td->td_samplesperpixel); - return (0); - } - strip += (uint32)sample*td->td_stripsperimage; - } - return (strip); -} - -/* - * Compute how many strips are in an image. - */ -uint32 -TIFFNumberOfStrips(TIFF* tif) -{ - TIFFDirectory *td = &tif->tif_dir; - uint32 nstrips; - - nstrips = (td->td_rowsperstrip == (uint32) -1 ? 1 : - TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip)); - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - nstrips = _TIFFMultiply32(tif, nstrips, (uint32)td->td_samplesperpixel, - "TIFFNumberOfStrips"); - return (nstrips); -} - -/* - * Compute the # bytes in a variable height, row-aligned strip. - */ -uint64 -TIFFVStripSize64(TIFF* tif, uint32 nrows) -{ - static const char module[] = "TIFFVStripSize64"; - TIFFDirectory *td = &tif->tif_dir; - if (nrows==(uint32)(-1)) - nrows=td->td_imagelength; - if ((td->td_planarconfig==PLANARCONFIG_CONTIG)&& - (td->td_photometric == PHOTOMETRIC_YCBCR)&& - (!isUpSampled(tif))) - { - /* - * Packed YCbCr data contain one Cb+Cr for every - * HorizontalSampling*VerticalSampling Y values. - * Must also roundup width and height when calculating - * since images that are not a multiple of the - * horizontal/vertical subsampling area include - * YCbCr data for the extended image. - */ - uint16 ycbcrsubsampling[2]; - uint16 samplingblock_samples; - uint32 samplingblocks_hor; - uint32 samplingblocks_ver; - uint64 samplingrow_samples; - uint64 samplingrow_size; - if(td->td_samplesperpixel!=3) - { - TIFFErrorExt(tif->tif_clientdata,module, - "Invalid td_samplesperpixel value"); - return 0; - } - TIFFGetFieldDefaulted(tif,TIFFTAG_YCBCRSUBSAMPLING,ycbcrsubsampling+0, - ycbcrsubsampling+1); - if ((ycbcrsubsampling[0] != 1 && ycbcrsubsampling[0] != 2 && ycbcrsubsampling[0] != 4) - ||(ycbcrsubsampling[1] != 1 && ycbcrsubsampling[1] != 2 && ycbcrsubsampling[1] != 4)) - { - TIFFErrorExt(tif->tif_clientdata,module, - "Invalid YCbCr subsampling (%dx%d)", - ycbcrsubsampling[0], - ycbcrsubsampling[1] ); - return 0; - } - samplingblock_samples=ycbcrsubsampling[0]*ycbcrsubsampling[1]+2; - samplingblocks_hor=TIFFhowmany_32(td->td_imagewidth,ycbcrsubsampling[0]); - samplingblocks_ver=TIFFhowmany_32(nrows,ycbcrsubsampling[1]); - samplingrow_samples=_TIFFMultiply64(tif,samplingblocks_hor,samplingblock_samples,module); - samplingrow_size=TIFFhowmany8_64(_TIFFMultiply64(tif,samplingrow_samples,td->td_bitspersample,module)); - return(_TIFFMultiply64(tif,samplingrow_size,samplingblocks_ver,module)); - } - else - return(_TIFFMultiply64(tif,nrows,TIFFScanlineSize64(tif),module)); -} -tmsize_t -TIFFVStripSize(TIFF* tif, uint32 nrows) -{ - static const char module[] = "TIFFVStripSize"; - uint64 m; - tmsize_t n; - m=TIFFVStripSize64(tif,nrows); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - n=0; - } - return(n); -} - -/* - * Compute the # bytes in a raw strip. - */ -uint64 -TIFFRawStripSize64(TIFF* tif, uint32 strip) -{ - static const char module[] = "TIFFRawStripSize64"; - TIFFDirectory* td = &tif->tif_dir; - uint64 bytecount = td->td_stripbytecount[strip]; - - if (bytecount == 0) - { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "%I64u: Invalid strip byte count, strip %lu", - (unsigned __int64) bytecount, - (unsigned long) strip); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "%llu: Invalid strip byte count, strip %lu", - (unsigned long long) bytecount, - (unsigned long) strip); -#endif - bytecount = (uint64) -1; - } - - return bytecount; -} -tmsize_t -TIFFRawStripSize(TIFF* tif, uint32 strip) -{ - static const char module[] = "TIFFRawStripSize"; - uint64 m; - tmsize_t n; - m=TIFFRawStripSize64(tif,strip); - if (m==(uint64)(-1)) - n=(tmsize_t)(-1); - else - { - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - n=0; - } - } - return(n); -} - -/* - * Compute the # bytes in a (row-aligned) strip. - * - * Note that if RowsPerStrip is larger than the - * recorded ImageLength, then the strip size is - * truncated to reflect the actual space required - * to hold the strip. - */ -uint64 -TIFFStripSize64(TIFF* tif) -{ - TIFFDirectory* td = &tif->tif_dir; - uint32 rps = td->td_rowsperstrip; - if (rps > td->td_imagelength) - rps = td->td_imagelength; - return (TIFFVStripSize64(tif, rps)); -} -tmsize_t -TIFFStripSize(TIFF* tif) -{ - static const char module[] = "TIFFStripSize"; - uint64 m; - tmsize_t n; - m=TIFFStripSize64(tif); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - n=0; - } - return(n); -} - -/* - * Compute a default strip size based on the image - * characteristics and a requested value. If the - * request is <1 then we choose a strip size according - * to certain heuristics. - */ -uint32 -TIFFDefaultStripSize(TIFF* tif, uint32 request) -{ - return (*tif->tif_defstripsize)(tif, request); -} - -uint32 -_TIFFDefaultStripSize(TIFF* tif, uint32 s) -{ - if ((int32) s < 1) { - /* - * If RowsPerStrip is unspecified, try to break the - * image up into strips that are approximately - * STRIP_SIZE_DEFAULT bytes long. - */ - uint64 scanlinesize; - uint64 rows; - scanlinesize=TIFFScanlineSize64(tif); - if (scanlinesize==0) - scanlinesize=1; - rows=(uint64)STRIP_SIZE_DEFAULT/scanlinesize; - if (rows==0) - rows=1; - else if (rows>0xFFFFFFFF) - rows=0xFFFFFFFF; - s=(uint32)rows; - } - return (s); -} - -/* - * Return the number of bytes to read/write in a call to - * one of the scanline-oriented i/o routines. Note that - * this number may be 1/samples-per-pixel if data is - * stored as separate planes. - * The ScanlineSize in case of YCbCrSubsampling is defined as the - * strip size divided by the strip height, i.e. the size of a pack of vertical - * subsampling lines divided by vertical subsampling. It should thus make - * sense when multiplied by a multiple of vertical subsampling. - */ -uint64 -TIFFScanlineSize64(TIFF* tif) -{ - static const char module[] = "TIFFScanlineSize64"; - TIFFDirectory *td = &tif->tif_dir; - uint64 scanline_size; - if (td->td_planarconfig==PLANARCONFIG_CONTIG) - { - if ((td->td_photometric==PHOTOMETRIC_YCBCR)&& - (td->td_samplesperpixel==3)&& - (!isUpSampled(tif))) - { - uint16 ycbcrsubsampling[2]; - uint16 samplingblock_samples; - uint32 samplingblocks_hor; - uint64 samplingrow_samples; - uint64 samplingrow_size; - if(td->td_samplesperpixel!=3) - { - TIFFErrorExt(tif->tif_clientdata,module, - "Invalid td_samplesperpixel value"); - return 0; - } - TIFFGetFieldDefaulted(tif,TIFFTAG_YCBCRSUBSAMPLING, - ycbcrsubsampling+0, - ycbcrsubsampling+1); - if (((ycbcrsubsampling[0]!=1)&&(ycbcrsubsampling[0]!=2)&&(ycbcrsubsampling[0]!=4)) || - ((ycbcrsubsampling[1]!=1)&&(ycbcrsubsampling[1]!=2)&&(ycbcrsubsampling[1]!=4))) - { - TIFFErrorExt(tif->tif_clientdata,module, - "Invalid YCbCr subsampling"); - return 0; - } - samplingblock_samples = ycbcrsubsampling[0]*ycbcrsubsampling[1]+2; - samplingblocks_hor = TIFFhowmany_32(td->td_imagewidth,ycbcrsubsampling[0]); - samplingrow_samples = _TIFFMultiply64(tif,samplingblocks_hor,samplingblock_samples,module); - samplingrow_size = TIFFhowmany_64(_TIFFMultiply64(tif,samplingrow_samples,td->td_bitspersample,module),8); - scanline_size = (samplingrow_size/ycbcrsubsampling[1]); - } - else - { - uint64 scanline_samples; - scanline_samples=_TIFFMultiply64(tif,td->td_imagewidth,td->td_samplesperpixel,module); - scanline_size=TIFFhowmany_64(_TIFFMultiply64(tif,scanline_samples,td->td_bitspersample,module),8); - } - } - else - { - scanline_size=TIFFhowmany_64(_TIFFMultiply64(tif,td->td_imagewidth,td->td_bitspersample,module),8); - } - if (scanline_size == 0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Computed scanline size is zero"); - return 0; - } - return(scanline_size); -} -tmsize_t -TIFFScanlineSize(TIFF* tif) -{ - static const char module[] = "TIFFScanlineSize"; - uint64 m; - tmsize_t n; - m=TIFFScanlineSize64(tif); - n=(tmsize_t)m; - if ((uint64)n!=m) { - TIFFErrorExt(tif->tif_clientdata,module,"Integer arithmetic overflow"); - n=0; - } - return(n); -} - -/* - * Return the number of bytes required to store a complete - * decoded and packed raster scanline (as opposed to the - * I/O size returned by TIFFScanlineSize which may be less - * if data is store as separate planes). - */ -uint64 -TIFFRasterScanlineSize64(TIFF* tif) -{ - static const char module[] = "TIFFRasterScanlineSize64"; - TIFFDirectory *td = &tif->tif_dir; - uint64 scanline; - - scanline = _TIFFMultiply64(tif, td->td_bitspersample, td->td_imagewidth, module); - if (td->td_planarconfig == PLANARCONFIG_CONTIG) { - scanline = _TIFFMultiply64(tif, scanline, td->td_samplesperpixel, module); - return (TIFFhowmany8_64(scanline)); - } else - return (_TIFFMultiply64(tif, TIFFhowmany8_64(scanline), - td->td_samplesperpixel, module)); -} -tmsize_t -TIFFRasterScanlineSize(TIFF* tif) -{ - static const char module[] = "TIFFRasterScanlineSize"; - uint64 m; - tmsize_t n; - m=TIFFRasterScanlineSize64(tif); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer arithmetic overflow"); - n=0; - } - return(n); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_swab.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_swab.c deleted file mode 100644 index 3b1721c..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_swab.c +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library Bit & Byte Swapping Support. - * - * XXX We assume short = 16-bits and long = 32-bits XXX - */ -#include "tiffiop.h" - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabShort) -void -TIFFSwabShort(uint16* wp) -{ - register unsigned char* cp = (unsigned char*) wp; - unsigned char t; - assert(sizeof(uint16)==2); - t = cp[1]; cp[1] = cp[0]; cp[0] = t; -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabLong) -void -TIFFSwabLong(uint32* lp) -{ - register unsigned char* cp = (unsigned char*) lp; - unsigned char t; - assert(sizeof(uint32)==4); - t = cp[3]; cp[3] = cp[0]; cp[0] = t; - t = cp[2]; cp[2] = cp[1]; cp[1] = t; -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabLong8) -void -TIFFSwabLong8(uint64* lp) -{ - register unsigned char* cp = (unsigned char*) lp; - unsigned char t; - assert(sizeof(uint64)==8); - t = cp[7]; cp[7] = cp[0]; cp[0] = t; - t = cp[6]; cp[6] = cp[1]; cp[1] = t; - t = cp[5]; cp[5] = cp[2]; cp[2] = t; - t = cp[4]; cp[4] = cp[3]; cp[3] = t; -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfShort) -void -TIFFSwabArrayOfShort(register uint16* wp, tmsize_t n) -{ - register unsigned char* cp; - register unsigned char t; - assert(sizeof(uint16)==2); - /* XXX unroll loop some */ - while (n-- > 0) { - cp = (unsigned char*) wp; - t = cp[1]; cp[1] = cp[0]; cp[0] = t; - wp++; - } -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfTriples) -void -TIFFSwabArrayOfTriples(register uint8* tp, tmsize_t n) -{ - unsigned char* cp; - unsigned char t; - - /* XXX unroll loop some */ - while (n-- > 0) { - cp = (unsigned char*) tp; - t = cp[2]; cp[2] = cp[0]; cp[0] = t; - tp += 3; - } -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfLong) -void -TIFFSwabArrayOfLong(register uint32* lp, tmsize_t n) -{ - register unsigned char *cp; - register unsigned char t; - assert(sizeof(uint32)==4); - /* XXX unroll loop some */ - while (n-- > 0) { - cp = (unsigned char *)lp; - t = cp[3]; cp[3] = cp[0]; cp[0] = t; - t = cp[2]; cp[2] = cp[1]; cp[1] = t; - lp++; - } -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfLong8) -void -TIFFSwabArrayOfLong8(register uint64* lp, tmsize_t n) -{ - register unsigned char *cp; - register unsigned char t; - assert(sizeof(uint64)==8); - /* XXX unroll loop some */ - while (n-- > 0) { - cp = (unsigned char *)lp; - t = cp[7]; cp[7] = cp[0]; cp[0] = t; - t = cp[6]; cp[6] = cp[1]; cp[1] = t; - t = cp[5]; cp[5] = cp[2]; cp[2] = t; - t = cp[4]; cp[4] = cp[3]; cp[3] = t; - lp++; - } -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabFloat) -void -TIFFSwabFloat(float* fp) -{ - register unsigned char* cp = (unsigned char*) fp; - unsigned char t; - assert(sizeof(float)==4); - t = cp[3]; cp[3] = cp[0]; cp[0] = t; - t = cp[2]; cp[2] = cp[1]; cp[1] = t; -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfFloat) -void -TIFFSwabArrayOfFloat(register float* fp, tmsize_t n) -{ - register unsigned char *cp; - register unsigned char t; - assert(sizeof(float)==4); - /* XXX unroll loop some */ - while (n-- > 0) { - cp = (unsigned char *)fp; - t = cp[3]; cp[3] = cp[0]; cp[0] = t; - t = cp[2]; cp[2] = cp[1]; cp[1] = t; - fp++; - } -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabDouble) -void -TIFFSwabDouble(double *dp) -{ - register unsigned char* cp = (unsigned char*) dp; - unsigned char t; - assert(sizeof(double)==8); - t = cp[7]; cp[7] = cp[0]; cp[0] = t; - t = cp[6]; cp[6] = cp[1]; cp[1] = t; - t = cp[5]; cp[5] = cp[2]; cp[2] = t; - t = cp[4]; cp[4] = cp[3]; cp[3] = t; -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfDouble) -void -TIFFSwabArrayOfDouble(double* dp, tmsize_t n) -{ - register unsigned char *cp; - register unsigned char t; - assert(sizeof(double)==8); - /* XXX unroll loop some */ - while (n-- > 0) { - cp = (unsigned char *)dp; - t = cp[7]; cp[7] = cp[0]; cp[0] = t; - t = cp[6]; cp[6] = cp[1]; cp[1] = t; - t = cp[5]; cp[5] = cp[2]; cp[2] = t; - t = cp[4]; cp[4] = cp[3]; cp[3] = t; - dp++; - } -} -#endif - -/* - * Bit reversal tables. TIFFBitRevTable[] gives - * the bit reversed value of . Used in various - * places in the library when the FillOrder requires - * bit reversal of byte values (e.g. CCITT Fax 3 - * encoding/decoding). TIFFNoBitRevTable is provided - * for algorithms that want an equivalent table that - * do not reverse bit values. - */ -static const unsigned char TIFFBitRevTable[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 unsigned char TIFFNoBitRevTable[256] = { - 0x00, 0x01, 0x02, 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, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, -}; - -const unsigned char* -TIFFGetBitRevTable(int reversed) -{ - return (reversed ? TIFFBitRevTable : TIFFNoBitRevTable); -} - -void -TIFFReverseBits(uint8* cp, tmsize_t n) -{ - for (; n > 8; n -= 8) { - cp[0] = TIFFBitRevTable[cp[0]]; - cp[1] = TIFFBitRevTable[cp[1]]; - cp[2] = TIFFBitRevTable[cp[2]]; - cp[3] = TIFFBitRevTable[cp[3]]; - cp[4] = TIFFBitRevTable[cp[4]]; - cp[5] = TIFFBitRevTable[cp[5]]; - cp[6] = TIFFBitRevTable[cp[6]]; - cp[7] = TIFFBitRevTable[cp[7]]; - cp += 8; - } - while (n-- > 0) { - *cp = TIFFBitRevTable[*cp]; - cp++; - } -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_thunder.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_thunder.c deleted file mode 100644 index f50724a..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_thunder.c +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#include -#ifdef THUNDER_SUPPORT -/* - * TIFF Library. - * - * ThunderScan 4-bit Compression Algorithm Support - */ - -/* - * ThunderScan uses an encoding scheme designed for - * 4-bit pixel values. Data is encoded in bytes, with - * each byte split into a 2-bit code word and a 6-bit - * data value. The encoding gives raw data, runs of - * pixels, or pixel values encoded as a delta from the - * previous pixel value. For the latter, either 2-bit - * or 3-bit delta values are used, with the deltas packed - * into a single byte. - */ -#define THUNDER_DATA 0x3f /* mask for 6-bit data */ -#define THUNDER_CODE 0xc0 /* mask for 2-bit code word */ -/* code values */ -#define THUNDER_RUN 0x00 /* run of pixels w/ encoded count */ -#define THUNDER_2BITDELTAS 0x40 /* 3 pixels w/ encoded 2-bit deltas */ -#define DELTA2_SKIP 2 /* skip code for 2-bit deltas */ -#define THUNDER_3BITDELTAS 0x80 /* 2 pixels w/ encoded 3-bit deltas */ -#define DELTA3_SKIP 4 /* skip code for 3-bit deltas */ -#define THUNDER_RAW 0xc0 /* raw data encoded */ - -static const int twobitdeltas[4] = { 0, 1, 0, -1 }; -static const int threebitdeltas[8] = { 0, 1, 2, 3, 0, -3, -2, -1 }; - -#define SETPIXEL(op, v) { \ - lastpixel = (v) & 0xf; \ - if ( npixels < maxpixels ) \ - { \ - if (npixels++ & 1) \ - *op++ |= lastpixel; \ - else \ - op[0] = (uint8) (lastpixel << 4); \ - } \ -} - -static int -ThunderSetupDecode(TIFF* tif) -{ - static const char module[] = "ThunderSetupDecode"; - - if( tif->tif_dir.td_bitspersample != 4 ) - { - TIFFErrorExt(tif->tif_clientdata, module, - "Wrong bitspersample value (%d), Thunder decoder only supports 4bits per sample.", - (int) tif->tif_dir.td_bitspersample ); - return 0; - } - - - return (1); -} - -static int -ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels) -{ - static const char module[] = "ThunderDecode"; - register unsigned char *bp; - register tmsize_t cc; - unsigned int lastpixel; - tmsize_t npixels; - - bp = (unsigned char *)tif->tif_rawcp; - cc = tif->tif_rawcc; - lastpixel = 0; - npixels = 0; - while (cc > 0 && npixels < maxpixels) { - int n, delta; - - n = *bp++; - cc--; - switch (n & THUNDER_CODE) { - case THUNDER_RUN: /* pixel run */ - /* - * Replicate the last pixel n times, - * where n is the lower-order 6 bits. - */ - if (npixels & 1) { - op[0] |= lastpixel; - lastpixel = *op++; npixels++; n--; - } else - lastpixel |= lastpixel << 4; - npixels += n; - if (npixels < maxpixels) { - for (; n > 0; n -= 2) - *op++ = (uint8) lastpixel; - } - if (n == -1) - *--op &= 0xf0; - lastpixel &= 0xf; - break; - case THUNDER_2BITDELTAS: /* 2-bit deltas */ - if ((delta = ((n >> 4) & 3)) != DELTA2_SKIP) - SETPIXEL(op, lastpixel + twobitdeltas[delta]); - if ((delta = ((n >> 2) & 3)) != DELTA2_SKIP) - SETPIXEL(op, lastpixel + twobitdeltas[delta]); - if ((delta = (n & 3)) != DELTA2_SKIP) - SETPIXEL(op, lastpixel + twobitdeltas[delta]); - break; - case THUNDER_3BITDELTAS: /* 3-bit deltas */ - if ((delta = ((n >> 3) & 7)) != DELTA3_SKIP) - SETPIXEL(op, lastpixel + threebitdeltas[delta]); - if ((delta = (n & 7)) != DELTA3_SKIP) - SETPIXEL(op, lastpixel + threebitdeltas[delta]); - break; - case THUNDER_RAW: /* raw data */ - SETPIXEL(op, n); - break; - } - } - tif->tif_rawcp = (uint8*) bp; - tif->tif_rawcc = cc; - if (npixels != maxpixels) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "%s data at scanline %lu (%I64u != %I64u)", - npixels < maxpixels ? "Not enough" : "Too much", - (unsigned long) tif->tif_row, - (unsigned __int64) npixels, - (unsigned __int64) maxpixels); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "%s data at scanline %lu (%llu != %llu)", - npixels < maxpixels ? "Not enough" : "Too much", - (unsigned long) tif->tif_row, - (unsigned long long) npixels, - (unsigned long long) maxpixels); -#endif - return (0); - } - - return (1); -} - -static int -ThunderDecodeRow(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) -{ - static const char module[] = "ThunderDecodeRow"; - uint8* row = buf; - - (void) s; - if (occ % tif->tif_scanlinesize) - { - TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be read"); - return (0); - } - while (occ > 0) { - if (!ThunderDecode(tif, row, tif->tif_dir.td_imagewidth)) - return (0); - occ -= tif->tif_scanlinesize; - row += tif->tif_scanlinesize; - } - return (1); -} - -int -TIFFInitThunderScan(TIFF* tif, int scheme) -{ - (void) scheme; - - tif->tif_setupdecode = ThunderSetupDecode; - tif->tif_decoderow = ThunderDecodeRow; - tif->tif_decodestrip = ThunderDecodeRow; - return (1); -} -#endif /* THUNDER_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_tile.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_tile.c deleted file mode 100644 index ae63c2e..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_tile.c +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Tiled Image Support Routines. - */ -#include "tiffiop.h" - -/* - * Compute which tile an (x,y,z,s) value is in. - */ -uint32 -TIFFComputeTile(TIFF* tif, uint32 x, uint32 y, uint32 z, uint16 s) -{ - TIFFDirectory *td = &tif->tif_dir; - uint32 dx = td->td_tilewidth; - uint32 dy = td->td_tilelength; - uint32 dz = td->td_tiledepth; - uint32 tile = 1; - - if (td->td_imagedepth == 1) - z = 0; - if (dx == (uint32) -1) - dx = td->td_imagewidth; - if (dy == (uint32) -1) - dy = td->td_imagelength; - if (dz == (uint32) -1) - dz = td->td_imagedepth; - if (dx != 0 && dy != 0 && dz != 0) { - uint32 xpt = TIFFhowmany_32(td->td_imagewidth, dx); - uint32 ypt = TIFFhowmany_32(td->td_imagelength, dy); - uint32 zpt = TIFFhowmany_32(td->td_imagedepth, dz); - - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - tile = (xpt*ypt*zpt)*s + - (xpt*ypt)*(z/dz) + - xpt*(y/dy) + - x/dx; - else - tile = (xpt*ypt)*(z/dz) + xpt*(y/dy) + x/dx; - } - return (tile); -} - -/* - * Check an (x,y,z,s) coordinate - * against the image bounds. - */ -int -TIFFCheckTile(TIFF* tif, uint32 x, uint32 y, uint32 z, uint16 s) -{ - TIFFDirectory *td = &tif->tif_dir; - - if (x >= td->td_imagewidth) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "%lu: Col out of range, max %lu", - (unsigned long) x, - (unsigned long) (td->td_imagewidth - 1)); - return (0); - } - if (y >= td->td_imagelength) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "%lu: Row out of range, max %lu", - (unsigned long) y, - (unsigned long) (td->td_imagelength - 1)); - return (0); - } - if (z >= td->td_imagedepth) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "%lu: Depth out of range, max %lu", - (unsigned long) z, - (unsigned long) (td->td_imagedepth - 1)); - return (0); - } - if (td->td_planarconfig == PLANARCONFIG_SEPARATE && - s >= td->td_samplesperpixel) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "%lu: Sample out of range, max %lu", - (unsigned long) s, - (unsigned long) (td->td_samplesperpixel - 1)); - return (0); - } - return (1); -} - -/* - * Compute how many tiles are in an image. - */ -uint32 -TIFFNumberOfTiles(TIFF* tif) -{ - TIFFDirectory *td = &tif->tif_dir; - uint32 dx = td->td_tilewidth; - uint32 dy = td->td_tilelength; - uint32 dz = td->td_tiledepth; - uint32 ntiles; - - if (dx == (uint32) -1) - dx = td->td_imagewidth; - if (dy == (uint32) -1) - dy = td->td_imagelength; - if (dz == (uint32) -1) - dz = td->td_imagedepth; - ntiles = (dx == 0 || dy == 0 || dz == 0) ? 0 : - _TIFFMultiply32(tif, _TIFFMultiply32(tif, TIFFhowmany_32(td->td_imagewidth, dx), - TIFFhowmany_32(td->td_imagelength, dy), - "TIFFNumberOfTiles"), - TIFFhowmany_32(td->td_imagedepth, dz), "TIFFNumberOfTiles"); - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - ntiles = _TIFFMultiply32(tif, ntiles, td->td_samplesperpixel, - "TIFFNumberOfTiles"); - return (ntiles); -} - -/* - * Compute the # bytes in each row of a tile. - */ -uint64 -TIFFTileRowSize64(TIFF* tif) -{ - static const char module[] = "TIFFTileRowSize64"; - TIFFDirectory *td = &tif->tif_dir; - uint64 rowsize; - uint64 tilerowsize; - - if (td->td_tilelength == 0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Tile length is zero"); - return 0; - } - if (td->td_tilewidth == 0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Tile width is zero"); - return (0); - } - rowsize = _TIFFMultiply64(tif, td->td_bitspersample, td->td_tilewidth, - "TIFFTileRowSize"); - if (td->td_planarconfig == PLANARCONFIG_CONTIG) - { - if (td->td_samplesperpixel == 0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Samples per pixel is zero"); - return 0; - } - rowsize = _TIFFMultiply64(tif, rowsize, td->td_samplesperpixel, - "TIFFTileRowSize"); - } - tilerowsize=TIFFhowmany8_64(rowsize); - if (tilerowsize == 0) - { - TIFFErrorExt(tif->tif_clientdata,module,"Computed tile row size is zero"); - return 0; - } - return (tilerowsize); -} -tmsize_t -TIFFTileRowSize(TIFF* tif) -{ - static const char module[] = "TIFFTileRowSize"; - uint64 m; - tmsize_t n; - m=TIFFTileRowSize64(tif); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - n=0; - } - return(n); -} - -/* - * Compute the # bytes in a variable length, row-aligned tile. - */ -uint64 -TIFFVTileSize64(TIFF* tif, uint32 nrows) -{ - static const char module[] = "TIFFVTileSize64"; - TIFFDirectory *td = &tif->tif_dir; - if (td->td_tilelength == 0 || td->td_tilewidth == 0 || - td->td_tiledepth == 0) - return (0); - if ((td->td_planarconfig==PLANARCONFIG_CONTIG)&& - (td->td_photometric==PHOTOMETRIC_YCBCR)&& - (td->td_samplesperpixel==3)&& - (!isUpSampled(tif))) - { - /* - * Packed YCbCr data contain one Cb+Cr for every - * HorizontalSampling*VerticalSampling Y values. - * Must also roundup width and height when calculating - * since images that are not a multiple of the - * horizontal/vertical subsampling area include - * YCbCr data for the extended image. - */ - uint16 ycbcrsubsampling[2]; - uint16 samplingblock_samples; - uint32 samplingblocks_hor; - uint32 samplingblocks_ver; - uint64 samplingrow_samples; - uint64 samplingrow_size; - TIFFGetFieldDefaulted(tif,TIFFTAG_YCBCRSUBSAMPLING,ycbcrsubsampling+0, - ycbcrsubsampling+1); - if ((ycbcrsubsampling[0] != 1 && ycbcrsubsampling[0] != 2 && ycbcrsubsampling[0] != 4) - ||(ycbcrsubsampling[1] != 1 && ycbcrsubsampling[1] != 2 && ycbcrsubsampling[1] != 4)) - { - TIFFErrorExt(tif->tif_clientdata,module, - "Invalid YCbCr subsampling (%dx%d)", - ycbcrsubsampling[0], - ycbcrsubsampling[1] ); - return 0; - } - samplingblock_samples=ycbcrsubsampling[0]*ycbcrsubsampling[1]+2; - samplingblocks_hor=TIFFhowmany_32(td->td_tilewidth,ycbcrsubsampling[0]); - samplingblocks_ver=TIFFhowmany_32(nrows,ycbcrsubsampling[1]); - samplingrow_samples=_TIFFMultiply64(tif,samplingblocks_hor,samplingblock_samples,module); - samplingrow_size=TIFFhowmany8_64(_TIFFMultiply64(tif,samplingrow_samples,td->td_bitspersample,module)); - return(_TIFFMultiply64(tif,samplingrow_size,samplingblocks_ver,module)); - } - else - return(_TIFFMultiply64(tif,nrows,TIFFTileRowSize64(tif),module)); -} -tmsize_t -TIFFVTileSize(TIFF* tif, uint32 nrows) -{ - static const char module[] = "TIFFVTileSize"; - uint64 m; - tmsize_t n; - m=TIFFVTileSize64(tif,nrows); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - n=0; - } - return(n); -} - -/* - * Compute the # bytes in a row-aligned tile. - */ -uint64 -TIFFTileSize64(TIFF* tif) -{ - return (TIFFVTileSize64(tif, tif->tif_dir.td_tilelength)); -} -tmsize_t -TIFFTileSize(TIFF* tif) -{ - static const char module[] = "TIFFTileSize"; - uint64 m; - tmsize_t n; - m=TIFFTileSize64(tif); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - n=0; - } - return(n); -} - -/* - * Compute a default tile size based on the image - * characteristics and a requested value. If a - * request is <1 then we choose a size according - * to certain heuristics. - */ -void -TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th) -{ - (*tif->tif_deftilesize)(tif, tw, th); -} - -void -_TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th) -{ - (void) tif; - if (*(int32*) tw < 1) - *tw = 256; - if (*(int32*) th < 1) - *th = 256; - /* roundup to a multiple of 16 per the spec */ - if (*tw & 0xf) - *tw = TIFFroundup_32(*tw, 16); - if (*th & 0xf) - *th = TIFFroundup_32(*th, 16); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_unix.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_unix.c deleted file mode 100644 index ff9da3f..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_unix.c +++ /dev/null @@ -1,384 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library UNIX-specific Routines. These are should also work with the - * Windows Common RunTime Library. - */ - -#include "tif_config.h" - -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#include - -#include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifdef HAVE_FCNTL_H -# include -#endif - -#ifdef HAVE_IO_H -# include -#endif - -#include "tiffiop.h" - - -#define TIFF_IO_MAX 2147483647U - - -typedef union fd_as_handle_union -{ - int fd; - thandle_t h; -} fd_as_handle_union_t; - -static tmsize_t -_tiffReadProc(thandle_t fd, void* buf, tmsize_t size) -{ - fd_as_handle_union_t fdh; - const size_t bytes_total = (size_t) size; - size_t bytes_read; - tmsize_t count = -1; - if ((tmsize_t) bytes_total != size) - { - errno=EINVAL; - return (tmsize_t) -1; - } - fdh.h = fd; - for (bytes_read=0; bytes_read < bytes_total; bytes_read+=count) - { - char *buf_offset = (char *) buf+bytes_read; - size_t io_size = bytes_total-bytes_read; - if (io_size > TIFF_IO_MAX) - io_size = TIFF_IO_MAX; - count=read(fdh.fd, buf_offset, (TIFFIOSize_t) io_size); - if (count <= 0) - break; - } - if (count < 0) - return (tmsize_t)-1; - return (tmsize_t) bytes_read; -} - -static tmsize_t -_tiffWriteProc(thandle_t fd, void* buf, tmsize_t size) -{ - fd_as_handle_union_t fdh; - const size_t bytes_total = (size_t) size; - size_t bytes_written; - tmsize_t count = -1; - if ((tmsize_t) bytes_total != size) - { - errno=EINVAL; - return (tmsize_t) -1; - } - fdh.h = fd; - for (bytes_written=0; bytes_written < bytes_total; bytes_written+=count) - { - const char *buf_offset = (char *) buf+bytes_written; - size_t io_size = bytes_total-bytes_written; - if (io_size > TIFF_IO_MAX) - io_size = TIFF_IO_MAX; - count=write(fdh.fd, buf_offset, (TIFFIOSize_t) io_size); - if (count <= 0) - break; - } - if (count < 0) - return (tmsize_t)-1; - return (tmsize_t) bytes_written; - /* return ((tmsize_t) write(fdh.fd, buf, bytes_total)); */ -} - -static uint64 -_tiffSeekProc(thandle_t fd, uint64 off, int whence) -{ - fd_as_handle_union_t fdh; - _TIFF_off_t off_io = (_TIFF_off_t) off; - if ((uint64) off_io != off) - { - errno=EINVAL; - return (uint64) -1; /* this is really gross */ - } - fdh.h = fd; - return((uint64)_TIFF_lseek_f(fdh.fd,off_io,whence)); -} - -static int -_tiffCloseProc(thandle_t fd) -{ - fd_as_handle_union_t fdh; - fdh.h = fd; - return(close(fdh.fd)); -} - -static uint64 -_tiffSizeProc(thandle_t fd) -{ - _TIFF_stat_s sb; - fd_as_handle_union_t fdh; - fdh.h = fd; - if (_TIFF_fstat_f(fdh.fd,&sb)<0) - return(0); - else - return((uint64)sb.st_size); -} - -#ifdef HAVE_MMAP -#include - -static int -_tiffMapProc(thandle_t fd, void** pbase, toff_t* psize) -{ - uint64 size64 = _tiffSizeProc(fd); - tmsize_t sizem = (tmsize_t)size64; - if ((uint64)sizem==size64) { - fd_as_handle_union_t fdh; - fdh.h = fd; - *pbase = (void*) - mmap(0, (size_t)sizem, PROT_READ, MAP_SHARED, fdh.fd, 0); - if (*pbase != (void*) -1) { - *psize = (tmsize_t)sizem; - return (1); - } - } - return (0); -} - -static void -_tiffUnmapProc(thandle_t fd, void* base, toff_t size) -{ - (void) fd; - (void) munmap(base, (off_t) size); -} -#else /* !HAVE_MMAP */ -static int -_tiffMapProc(thandle_t fd, void** pbase, toff_t* psize) -{ - (void) fd; (void) pbase; (void) psize; - return (0); -} - -static void -_tiffUnmapProc(thandle_t fd, void* base, toff_t size) -{ - (void) fd; (void) base; (void) size; -} -#endif /* !HAVE_MMAP */ - -/* - * Open a TIFF file descriptor for read/writing. - */ -TIFF* -TIFFFdOpen(int fd, const char* name, const char* mode) -{ - TIFF* tif; - - fd_as_handle_union_t fdh; - fdh.fd = fd; - tif = TIFFClientOpen(name, mode, - fdh.h, - _tiffReadProc, _tiffWriteProc, - _tiffSeekProc, _tiffCloseProc, _tiffSizeProc, - _tiffMapProc, _tiffUnmapProc); - if (tif) - tif->tif_fd = fd; - return (tif); -} - -/* - * Open a TIFF file for read/writing. - */ -TIFF* -TIFFOpen(const char* name, const char* mode) -{ - static const char module[] = "TIFFOpen"; - int m, fd; - TIFF* tif; - - m = _TIFFgetMode(mode, module); - if (m == -1) - return ((TIFF*)0); - -/* for cygwin and mingw */ -#ifdef O_BINARY - m |= O_BINARY; -#endif - - fd = open(name, m, 0666); - if (fd < 0) { - if (errno > 0 && strerror(errno) != NULL ) { - TIFFErrorExt(0, module, "%s: %s", name, strerror(errno) ); - } else { - TIFFErrorExt(0, module, "%s: Cannot open", name); - } - return ((TIFF *)0); - } - - tif = TIFFFdOpen((int)fd, name, mode); - if(!tif) - close(fd); - return tif; -} - -#ifdef __WIN32__ -#include -/* - * Open a TIFF file with a Unicode filename, for read/writing. - */ -TIFF* -TIFFOpenW(const wchar_t* name, const char* mode) -{ - static const char module[] = "TIFFOpenW"; - int m, fd; - int mbsize; - char *mbname; - TIFF* tif; - - m = _TIFFgetMode(mode, module); - if (m == -1) - return ((TIFF*)0); - -/* for cygwin and mingw */ -#ifdef O_BINARY - m |= O_BINARY; -#endif - - fd = _wopen(name, m, 0666); - if (fd < 0) { - TIFFErrorExt(0, module, "%ls: Cannot open", name); - return ((TIFF *)0); - } - - mbname = NULL; - mbsize = WideCharToMultiByte(CP_ACP, 0, name, -1, NULL, 0, NULL, NULL); - if (mbsize > 0) { - mbname = _TIFFmalloc(mbsize); - if (!mbname) { - TIFFErrorExt(0, module, - "Can't allocate space for filename conversion buffer"); - return ((TIFF*)0); - } - - WideCharToMultiByte(CP_ACP, 0, name, -1, mbname, mbsize, - NULL, NULL); - } - - tif = TIFFFdOpen((int)fd, (mbname != NULL) ? mbname : "", - mode); - - _TIFFfree(mbname); - - if(!tif) - close(fd); - return tif; -} -#endif - -void* -_TIFFmalloc(tmsize_t s) -{ - if (s == 0) - return ((void *) NULL); - - return (malloc((size_t) s)); -} - -void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz) -{ - if( nmemb == 0 || siz == 0 ) - return ((void *) NULL); - - return calloc((size_t) nmemb, (size_t)siz); -} - -void -_TIFFfree(void* p) -{ - free(p); -} - -void* -_TIFFrealloc(void* p, tmsize_t s) -{ - return (realloc(p, (size_t) s)); -} - -void -_TIFFmemset(void* p, int v, tmsize_t c) -{ - memset(p, v, (size_t) c); -} - -void -_TIFFmemcpy(void* d, const void* s, tmsize_t c) -{ - memcpy(d, s, (size_t) c); -} - -int -_TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) -{ - return (memcmp(p1, p2, (size_t) c)); -} - -static void -unixWarningHandler(const char* module, const char* fmt, va_list ap) -{ - if (module != NULL) - fprintf(stderr, "%s: ", module); - fprintf(stderr, "Warning, "); - vfprintf(stderr, fmt, ap); - fprintf(stderr, ".\n"); -} -TIFFErrorHandler _TIFFwarningHandler = unixWarningHandler; - -static void -unixErrorHandler(const char* module, const char* fmt, va_list ap) -{ - if (module != NULL) - fprintf(stderr, "%s: ", module); - vfprintf(stderr, fmt, ap); - fprintf(stderr, ".\n"); -} -TIFFErrorHandler _TIFFerrorHandler = unixErrorHandler; - -/* vim: set ts=8 sts=8 sw=8 noet: */ - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_version.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_version.c deleted file mode 100644 index 6e6636d..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_version.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 1992-1997 Sam Leffler - * Copyright (c) 1992-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ -#include "tiffiop.h" - -static const char TIFFVersion[] = TIFFLIB_VERSION_STR; - -const char* -TIFFGetVersion(void) -{ - return (TIFFVersion); -} -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_vms.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_vms.c deleted file mode 100644 index 99824a2..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_vms.c +++ /dev/null @@ -1,609 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library VMS-specific Routines. - */ - -#include "tiffiop.h" -#include -#include -#if !HAVE_IEEEFP -#include -#endif - -#ifdef VAXC -#define NOSHARE noshare -#else -#define NOSHARE -#endif - -COMPILATION SHOULD FAIL -This file is not yet updated to reflect changes in LibTiff 4.0. If you have -the opportunity to update and test this file, please contact LibTiff folks -for all assistance you may require and contribute the results - -#ifdef __alpha -/* Dummy entry point for backwards compatibility */ -void TIFFModeCCITTFax3(void){} -#endif - -static tsize_t -_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size) -{ - return (read((int) fd, buf, size)); -} - -static tsize_t -_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size) -{ - return (write((int) fd, buf, size)); -} - -static toff_t -_tiffSeekProc(thandle_t fd, toff_t off, int whence) -{ - return ((toff_t) _TIFF_lseek_f((int) fd, (_TIFF_off_t) off, whence)); -} - -static int -_tiffCloseProc(thandle_t fd) -{ - return (close((int) fd)); -} - -#include - -static toff_t -_tiffSizeProc(thandle_t fd) -{ - _TIFF_stat_s sb; - return (toff_t) (_TIFF_fstat_f((int) fd, &sb) < 0 ? 0 : sb.st_size); -} - -#ifdef HAVE_MMAP -#include -#include -#include - -/* - * Table for storing information on current open sections. - * (Should really be a linked list) - */ -#define MAX_MAPPED 100 -static int no_mapped = 0; -static struct { - char *base; - char *top; - unsigned short channel; -} map_table[MAX_MAPPED]; - -/* - * This routine maps a file into a private section. Note that this - * method of accessing a file is by far the fastest under VMS. - * The routine may fail (i.e. return 0) for several reasons, for - * example: - * - There is no more room for storing the info on sections. - * - The process is out of open file quota, channels, ... - * - fd does not describe an opened file. - * - The file is already opened for write access by this process - * or another process - * - There is no free "hole" in virtual memory that fits the - * size of the file - */ -static int -_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize) -{ - char name[256]; - struct FAB fab; - unsigned short channel; - char *inadr[2], *retadr[2]; - unsigned long status; - long size; - - if (no_mapped >= MAX_MAPPED) - return(0); - /* - * We cannot use a file descriptor, we - * must open the file once more. - */ - if (getname((int)fd, name, 1) == NULL) - return(0); - /* prepare the FAB for a user file open */ - fab = cc$rms_fab; - fab.fab$l_fop |= FAB$V_UFO; - fab.fab$b_fac = FAB$M_GET; - fab.fab$b_shr = FAB$M_SHRGET; - fab.fab$l_fna = name; - fab.fab$b_fns = strlen(name); - status = sys$open(&fab); /* open file & get channel number */ - if ((status&1) == 0) - return(0); - channel = (unsigned short)fab.fab$l_stv; - inadr[0] = inadr[1] = (char *)0; /* just an address in P0 space */ - /* - * Map the blocks of the file up to - * the EOF block into virtual memory. - */ - size = _tiffSizeProc(fd); - status = sys$crmpsc(inadr, retadr, 0, SEC$M_EXPREG, 0,0,0, channel, - TIFFhowmany(size,512), 0,0,0); ddd - if ((status&1) == 0){ - sys$dassgn(channel); - return(0); - } - *pbase = (tdata_t) retadr[0]; /* starting virtual address */ - /* - * Use the size of the file up to the - * EOF mark for UNIX compatibility. - */ - *psize = (toff_t) size; - /* Record the section in the table */ - map_table[no_mapped].base = retadr[0]; - map_table[no_mapped].top = retadr[1]; - map_table[no_mapped].channel = channel; - no_mapped++; - - return(1); -} - -/* - * This routine unmaps a section from the virtual address space of - * the process, but only if the base was the one returned from a - * call to TIFFMapFileContents. - */ -static void -_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size) -{ - char *inadr[2]; - int i, j; - - /* Find the section in the table */ - for (i = 0;i < no_mapped; i++) { - if (map_table[i].base == (char *) base) { - /* Unmap the section */ - inadr[0] = (char *) base; - inadr[1] = map_table[i].top; - sys$deltva(inadr, 0, 0); - sys$dassgn(map_table[i].channel); - /* Remove this section from the list */ - for (j = i+1; j < no_mapped; j++) - map_table[j-1] = map_table[j]; - no_mapped--; - return; - } - } -} -#else /* !HAVE_MMAP */ -static int -_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize) -{ - return (0); -} - -static void -_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size) -{ -} -#endif /* !HAVE_MMAP */ - -/* - * Open a TIFF file descriptor for read/writing. - */ -TIFF* -TIFFFdOpen(int fd, const char* name, const char* mode) -{ - TIFF* tif; - - tif = TIFFClientOpen(name, mode, ddd - (thandle_t) fd, - _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc, - _tiffSizeProc, _tiffMapProc, _tiffUnmapProc); - if (tif) - tif->tif_fd = fd; - return (tif); -} - -/* - * Open a TIFF file for read/writing. - */ -TIFF* -TIFFOpen(const char* name, const char* mode) -{ - static const char module[] = "TIFFOpen"; - int m, fd; - - m = _TIFFgetMode(mode, module); - if (m == -1) - return ((TIFF*)0); - if (m&O_TRUNC){ - /* - * There is a bug in open in VAXC. If you use - * open w/ m=O_RDWR|O_CREAT|O_TRUNC the - * wrong thing happens. On the other hand - * creat does the right thing. - */ - fd = creat((char *) /* bug in stdio.h */ name, 0666, - "alq = 128", "deq = 64", "mbc = 32", - "fop = tef"); - } else if (m&O_RDWR) { - fd = open(name, m, 0666, - "deq = 64", "mbc = 32", "fop = tef", "ctx = stm"); - } else - fd = open(name, m, 0666, "mbc = 32", "ctx = stm"); - if (fd < 0) { - TIFFErrorExt(0, module, "%s: Cannot open", name); - return ((TIFF*)0); - } - return (TIFFFdOpen(fd, name, mode)); -} - -tdata_t -_TIFFmalloc(tsize_t s) -{ - if (s == 0) - return ((void *) NULL); - - return (malloc((size_t) s)); -} - -void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz) -{ - if( nmemb == 0 || siz == 0 ) - return ((void *) NULL); - - return calloc((size_t) nmemb, (size_t)siz); -} - -void -_TIFFfree(tdata_t p) -{ - free(p); -} - -tdata_t -_TIFFrealloc(tdata_t p, tsize_t s) -{ - return (realloc(p, (size_t) s)); -} - -void -_TIFFmemset(tdata_t p, int v, tsize_t c) -{ - memset(p, v, (size_t) c); -} - -void -_TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c) -{ - memcpy(d, s, (size_t) c); -} - -int -_TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c) -{ - return (memcmp(p1, p2, (size_t) c)); -} - -/* - * On the VAX, we need to make those global, writable pointers - * non-shareable, otherwise they would be made shareable by default. - * On the AXP, this brain damage has been corrected. - * - * I (Karsten Spang, krs@kampsax.dk) have dug around in the GCC - * manual and the GAS code and have come up with the following - * construct, but I don't have GCC on my VAX, so it is untested. - * Please tell me if it does not work. - */ - -static void -vmsWarningHandler(const char* module, const char* fmt, va_list ap) -{ - if (module != NULL) - fprintf(stderr, "%s: ", module); - fprintf(stderr, "Warning, "); - vfprintf(stderr, fmt, ap); - fprintf(stderr, ".\n"); -} - -NOSHARE TIFFErrorHandler _TIFFwarningHandler = vmsWarningHandler -#if defined(VAX) && defined(__GNUC__) -asm("_$$PsectAttributes_NOSHR$$_TIFFwarningHandler") -#endif -; - -static void -vmsErrorHandler(const char* module, const char* fmt, va_list ap) -{ - if (module != NULL) - fprintf(stderr, "%s: ", module); - vfprintf(stderr, fmt, ap); - fprintf(stderr, ".\n"); -} - -NOSHARE TIFFErrorHandler _TIFFerrorHandler = vmsErrorHandler -#if defined(VAX) && defined(__GNUC__) -asm("_$$PsectAttributes_NOSHR$$_TIFFerrorHandler") -#endif -; - - -#if !HAVE_IEEEFP -/* IEEE floting point handling */ - -typedef struct ieeedouble { - unsigned long mant2; /* fix NDR: full 8-byte swap */ - unsigned long mant : 20, - exp : 11, - sign : 1; -} ieeedouble; -typedef struct ieeefloat { - unsigned long mant : 23, - exp : 8, - sign : 1; -} ieeefloat; - -/* - * NB: These are D_FLOAT's, not G_FLOAT's. A G_FLOAT is - * simply a reverse-IEEE float/double. - */ - -typedef struct { - unsigned long mant1 : 7, - exp : 8, - sign : 1, - mant2 : 16, - mant3 : 16, - mant4 : 16; -} nativedouble; -typedef struct { - unsigned long mant1 : 7, - exp : 8, - sign : 1, - mant2 : 16; -} nativefloat; - -typedef union { - ieeedouble ieee; - nativedouble native; - char b[8]; - uint32 l[2]; - double d; -} double_t; - -typedef union { - ieeefloat ieee; - nativefloat native; - char b[4]; - uint32 l; - float f; -} float_t; - -#if defined(VAXC) || defined(DECC) -#pragma inline(ieeetod,dtoieee) -#endif - -/* - * Convert an IEEE double precision number to native double precision. - * The source is contained in two longwords, the second holding the sign, - * exponent and the higher order bits of the mantissa, and the first - * holding the rest of the mantissa as follows: - * (Note: It is assumed that the number has been eight-byte swapped to - * LSB first.) - * - * First longword: - * 32 least significant bits of mantissa - * Second longword: - * 0-19: 20 most significant bits of mantissa - * 20-30: exponent - * 31: sign - * The exponent is stored as excess 1023. - * The most significant bit of the mantissa is implied 1, and not stored. - * If the exponent and mantissa are zero, the number is zero. - * If the exponent is 0 (i.e. -1023) and the mantissa is non-zero, it is an - * unnormalized number with the most significant bit NOT implied. - * If the exponent is 2047, the number is invalid, in case the mantissa is zero, - * this means overflow (+/- depending of the sign bit), otherwise - * it simply means invalid number. - * - * If the number is too large for the machine or was specified as overflow, - * +/-HUGE_VAL is returned. - */ -INLINE static void -ieeetod(double *dp) -{ - double_t source; - long sign,exp,mant; - double dmant; - - source.ieee = ((double_t*)dp)->ieee; - sign = source.ieee.sign; - exp = source.ieee.exp; - mant = source.ieee.mant; - - if (exp == 2047) { - if (mant) /* Not a Number (NAN) */ - *dp = HUGE_VAL; - else /* +/- infinity */ - *dp = (sign ? -HUGE_VAL : HUGE_VAL); - return; - } - if (!exp) { - if (!(mant || source.ieee.mant2)) { /* zero */ - *dp=0; - return; - } else { /* Unnormalized number */ - /* NB: not -1023, the 1 bit is not implied */ - exp= -1022; - } - } else { - mant |= 1<<20; - exp -= 1023; - } - dmant = (((double) mant) + - ((double) source.ieee.mant2) / (((double) (1<<16)) * - ((double) (1<<16)))) / (double) (1<<20); - dmant = ldexp(dmant, exp); - if (sign) - dmant= -dmant; - *dp = dmant; -} - -INLINE static void -dtoieee(double *dp) -{ - double_t num; - double x; - int exp; - - num.d = *dp; - if (!num.d) { /* Zero is just binary all zeros */ - num.l[0] = num.l[1] = 0; - return; - } - - if (num.d < 0) { /* Sign is encoded separately */ - num.d = -num.d; - num.ieee.sign = 1; - } else { - num.ieee.sign = 0; - } - - /* Now separate the absolute value into mantissa and exponent */ - x = frexp(num.d, &exp); - - /* - * Handle cases where the value is outside the - * range for IEEE floating point numbers. - * (Overflow cannot happen on a VAX, but underflow - * can happen for G float.) - */ - if (exp < -1022) { /* Unnormalized number */ - x = ldexp(x, -1023-exp); - exp = 0; - } else if (exp > 1023) { /* +/- infinity */ - x = 0; - exp = 2047; - } else { /* Get rid of most significant bit */ - x *= 2; - x -= 1; - exp += 1022; /* fix NDR: 1.0 -> x=0.5, exp=1 -> ieee.exp = 1023 */ - } - num.ieee.exp = exp; - - x *= (double) (1<<20); - num.ieee.mant = (long) x; - x -= (double) num.ieee.mant; - num.ieee.mant2 = (long) (x*((double) (1<<16)*(double) (1<<16))); - - if (!(num.ieee.mant || num.ieee.exp || num.ieee.mant2)) { - /* Avoid negative zero */ - num.ieee.sign = 0; - } - ((double_t*)dp)->ieee = num.ieee; -} - -/* - * Beware, these do not handle over/under-flow - * during conversion from ieee to native format. - */ -#define NATIVE2IEEEFLOAT(fp) { \ - float_t t; \ - if (t.ieee.exp = (fp)->native.exp) \ - t.ieee.exp += -129 + 127; \ - t.ieee.sign = (fp)->native.sign; \ - t.ieee.mant = ((fp)->native.mant1<<16)|(fp)->native.mant2; \ - *(fp) = t; \ -} -#define IEEEFLOAT2NATIVE(fp) { \ - float_t t; int v = (fp)->ieee.exp; \ - if (v) v += -127 + 129; /* alter bias of exponent */\ - t.native.exp = v; /* implicit truncation of exponent */\ - t.native.sign = (fp)->ieee.sign; \ - v = (fp)->ieee.mant; \ - t.native.mant1 = v >> 16; \ - t.native.mant2 = v;\ - *(fp) = t; \ -} - -#define IEEEDOUBLE2NATIVE(dp) ieeetod(dp) - -#define NATIVE2IEEEDOUBLE(dp) dtoieee(dp) - - -/* - * These unions are used during floating point - * conversions. The above macros define the - * conversion operations. - */ -void -TIFFCvtIEEEFloatToNative(TIFF* tif, u_int n, float* f) -{ - float_t* fp = (float_t*) f; - - while (n-- > 0) { - IEEEFLOAT2NATIVE(fp); - fp++; - } -} - -void -TIFFCvtNativeToIEEEFloat(TIFF* tif, u_int n, float* f) -{ - float_t* fp = (float_t*) f; - - while (n-- > 0) { - NATIVE2IEEEFLOAT(fp); - fp++; - } -} -void -TIFFCvtIEEEDoubleToNative(TIFF* tif, u_int n, double* f) -{ - double_t* fp = (double_t*) f; - - while (n-- > 0) { - IEEEDOUBLE2NATIVE(fp); - fp++; - } -} - -void -TIFFCvtNativeToIEEEDouble(TIFF* tif, u_int n, double* f) -{ - double_t* fp = (double_t*) f; - - while (n-- > 0) { - NATIVE2IEEEDOUBLE(fp); - fp++; - } -} -#endif -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_warning.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_warning.c deleted file mode 100644 index 8c1d9a8..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_warning.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - */ -#include "tiffiop.h" - -TIFFErrorHandlerExt _TIFFwarningHandlerExt = NULL; - -TIFFErrorHandler -TIFFSetWarningHandler(TIFFErrorHandler handler) -{ - TIFFErrorHandler prev = _TIFFwarningHandler; - _TIFFwarningHandler = handler; - return (prev); -} - -TIFFErrorHandlerExt -TIFFSetWarningHandlerExt(TIFFErrorHandlerExt handler) -{ - TIFFErrorHandlerExt prev = _TIFFwarningHandlerExt; - _TIFFwarningHandlerExt = handler; - return (prev); -} - -void -TIFFWarning(const char* module, const char* fmt, ...) -{ - va_list ap; - if (_TIFFwarningHandler) { - va_start(ap, fmt); - (*_TIFFwarningHandler)(module, fmt, ap); - va_end(ap); - } - if (_TIFFwarningHandlerExt) { - va_start(ap, fmt); - (*_TIFFwarningHandlerExt)(0, module, fmt, ap); - va_end(ap); - } -} - -void -TIFFWarningExt(thandle_t fd, const char* module, const char* fmt, ...) -{ - va_list ap; - if (_TIFFwarningHandler) { - va_start(ap, fmt); - (*_TIFFwarningHandler)(module, fmt, ap); - va_end(ap); - } - if (_TIFFwarningHandlerExt) { - va_start(ap, fmt); - (*_TIFFwarningHandlerExt)(fd, module, fmt, ap); - va_end(ap); - } -} - - -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_win32.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_win32.c deleted file mode 100644 index de2d06f..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_win32.c +++ /dev/null @@ -1,474 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library Win32-specific Routines. Adapted from tif_unix.c 4/5/95 by - * Scott Wagner (wagner@itek.com), Itek Graphix, Rochester, NY USA - */ - -/* - CreateFileA/CreateFileW return type 'HANDLE'. - - thandle_t is declared like - - DECLARE_HANDLE(thandle_t); - - in tiffio.h. - - Windows (from winnt.h) DECLARE_HANDLE logic looks like - - #ifdef STRICT - typedef void *HANDLE; - #define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name - #else - typedef PVOID HANDLE; - #define DECLARE_HANDLE(name) typedef HANDLE name - #endif - - See http://bugzilla.maptools.org/show_bug.cgi?id=1941 for problems in WIN64 - builds resulting from this. Unfortunately, the proposed patch was lost. - -*/ - -#include "tiffiop.h" - -#include - -static tmsize_t -_tiffReadProc(thandle_t fd, void* buf, tmsize_t size) -{ - /* tmsize_t is 64bit on 64bit systems, but the WinAPI ReadFile takes - * 32bit sizes, so we loop through the data in suitable 32bit sized - * chunks */ - uint8* ma; - uint64 mb; - DWORD n; - DWORD o; - tmsize_t p; - ma=(uint8*)buf; - mb=size; - p=0; - while (mb>0) - { - n=0x80000000UL; - if ((uint64)n>mb) - n=(DWORD)mb; - if (!ReadFile(fd,(LPVOID)ma,n,&o,NULL)) - return(0); - ma+=o; - mb-=o; - p+=o; - if (o!=n) - break; - } - return(p); -} - -static tmsize_t -_tiffWriteProc(thandle_t fd, void* buf, tmsize_t size) -{ - /* tmsize_t is 64bit on 64bit systems, but the WinAPI WriteFile takes - * 32bit sizes, so we loop through the data in suitable 32bit sized - * chunks */ - uint8* ma; - uint64 mb; - DWORD n; - DWORD o; - tmsize_t p; - ma=(uint8*)buf; - mb=size; - p=0; - while (mb>0) - { - n=0x80000000UL; - if ((uint64)n>mb) - n=(DWORD)mb; - if (!WriteFile(fd,(LPVOID)ma,n,&o,NULL)) - return(0); - ma+=o; - mb-=o; - p+=o; - if (o!=n) - break; - } - return(p); -} - -static uint64 -_tiffSeekProc(thandle_t fd, uint64 off, int whence) -{ - LARGE_INTEGER offli; - DWORD dwMoveMethod; - offli.QuadPart = off; - switch(whence) - { - case SEEK_SET: - dwMoveMethod = FILE_BEGIN; - break; - case SEEK_CUR: - dwMoveMethod = FILE_CURRENT; - break; - case SEEK_END: - dwMoveMethod = FILE_END; - break; - default: - dwMoveMethod = FILE_BEGIN; - break; - } - offli.LowPart=SetFilePointer(fd,offli.LowPart,&offli.HighPart,dwMoveMethod); - if ((offli.LowPart==INVALID_SET_FILE_POINTER)&&(GetLastError()!=NO_ERROR)) - offli.QuadPart=0; - return(offli.QuadPart); -} - -static int -_tiffCloseProc(thandle_t fd) -{ - return (CloseHandle(fd) ? 0 : -1); -} - -static uint64 -_tiffSizeProc(thandle_t fd) -{ - ULARGE_INTEGER m; - m.LowPart=GetFileSize(fd,&m.HighPart); - return(m.QuadPart); -} - -static int -_tiffDummyMapProc(thandle_t fd, void** pbase, toff_t* psize) -{ - (void) fd; - (void) pbase; - (void) psize; - return (0); -} - -/* - * From "Hermann Josef Hill" : - * - * Windows uses both a handle and a pointer for file mapping, - * but according to the SDK documentation and Richter's book - * "Advanced Windows Programming" it is safe to free the handle - * after obtaining the file mapping pointer - * - * This removes a nasty OS dependency and cures a problem - * with Visual C++ 5.0 - */ -static int -_tiffMapProc(thandle_t fd, void** pbase, toff_t* psize) -{ - uint64 size; - tmsize_t sizem; - HANDLE hMapFile; - - size = _tiffSizeProc(fd); - sizem = (tmsize_t)size; - if ((uint64)sizem!=size) - return (0); - - /* By passing in 0 for the maximum file size, it specifies that we - create a file mapping object for the full file size. */ - hMapFile = CreateFileMapping(fd, NULL, PAGE_READONLY, 0, 0, NULL); - if (hMapFile == NULL) - return (0); - *pbase = MapViewOfFile(hMapFile, FILE_MAP_READ, 0, 0, 0); - CloseHandle(hMapFile); - if (*pbase == NULL) - return (0); - *psize = size; - return(1); -} - -static void -_tiffDummyUnmapProc(thandle_t fd, void* base, toff_t size) -{ - (void) fd; - (void) base; - (void) size; -} - -static void -_tiffUnmapProc(thandle_t fd, void* base, toff_t size) -{ - (void) fd; - (void) size; - UnmapViewOfFile(base); -} - -/* - * Open a TIFF file descriptor for read/writing. - * Note that TIFFFdOpen and TIFFOpen recognise the character 'u' in the mode - * string, which forces the file to be opened unmapped. - */ -TIFF* -TIFFFdOpen(int ifd, const char* name, const char* mode) -{ - TIFF* tif; - int fSuppressMap; - int m; - fSuppressMap=0; - for (m=0; mode[m]!=0; m++) - { - if (mode[m]=='u') - { - fSuppressMap=1; - break; - } - } - tif = TIFFClientOpen(name, mode, (thandle_t)ifd, /* FIXME: WIN64 cast to pointer warning */ - _tiffReadProc, _tiffWriteProc, - _tiffSeekProc, _tiffCloseProc, _tiffSizeProc, - fSuppressMap ? _tiffDummyMapProc : _tiffMapProc, - fSuppressMap ? _tiffDummyUnmapProc : _tiffUnmapProc); - if (tif) - tif->tif_fd = ifd; - return (tif); -} - -#ifndef _WIN32_WCE - -/* - * Open a TIFF file for read/writing. - */ -TIFF* -TIFFOpen(const char* name, const char* mode) -{ - static const char module[] = "TIFFOpen"; - thandle_t fd; - int m; - DWORD dwMode; - TIFF* tif; - - m = _TIFFgetMode(mode, module); - - switch(m) { - case O_RDONLY: dwMode = OPEN_EXISTING; break; - case O_RDWR: dwMode = OPEN_ALWAYS; break; - case O_RDWR|O_CREAT: dwMode = OPEN_ALWAYS; break; - case O_RDWR|O_TRUNC: dwMode = CREATE_ALWAYS; break; - case O_RDWR|O_CREAT|O_TRUNC: dwMode = CREATE_ALWAYS; break; - default: return ((TIFF*)0); - } - - fd = (thandle_t)CreateFileA(name, - (m == O_RDONLY)?GENERIC_READ:(GENERIC_READ | GENERIC_WRITE), - FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, dwMode, - (m == O_RDONLY)?FILE_ATTRIBUTE_READONLY:FILE_ATTRIBUTE_NORMAL, - NULL); - if (fd == INVALID_HANDLE_VALUE) { - TIFFErrorExt(0, module, "%s: Cannot open", name); - return ((TIFF *)0); - } - - tif = TIFFFdOpen((int)fd, name, mode); /* FIXME: WIN64 cast from pointer to int warning */ - if(!tif) - CloseHandle(fd); - return tif; -} - -/* - * Open a TIFF file with a Unicode filename, for read/writing. - */ -TIFF* -TIFFOpenW(const wchar_t* name, const char* mode) -{ - static const char module[] = "TIFFOpenW"; - thandle_t fd; - int m; - DWORD dwMode; - int mbsize; - char *mbname; - TIFF *tif; - - m = _TIFFgetMode(mode, module); - - switch(m) { - case O_RDONLY: dwMode = OPEN_EXISTING; break; - case O_RDWR: dwMode = OPEN_ALWAYS; break; - case O_RDWR|O_CREAT: dwMode = OPEN_ALWAYS; break; - case O_RDWR|O_TRUNC: dwMode = CREATE_ALWAYS; break; - case O_RDWR|O_CREAT|O_TRUNC: dwMode = CREATE_ALWAYS; break; - default: return ((TIFF*)0); - } - - fd = (thandle_t)CreateFileW(name, - (m == O_RDONLY)?GENERIC_READ:(GENERIC_READ|GENERIC_WRITE), - FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, dwMode, - (m == O_RDONLY)?FILE_ATTRIBUTE_READONLY:FILE_ATTRIBUTE_NORMAL, - NULL); - if (fd == INVALID_HANDLE_VALUE) { - TIFFErrorExt(0, module, "%S: Cannot open", name); - return ((TIFF *)0); - } - - mbname = NULL; - mbsize = WideCharToMultiByte(CP_ACP, 0, name, -1, NULL, 0, NULL, NULL); - if (mbsize > 0) { - mbname = (char *)_TIFFmalloc(mbsize); - if (!mbname) { - TIFFErrorExt(0, module, - "Can't allocate space for filename conversion buffer"); - return ((TIFF*)0); - } - - WideCharToMultiByte(CP_ACP, 0, name, -1, mbname, mbsize, - NULL, NULL); - } - - tif = TIFFFdOpen((int)fd, /* FIXME: WIN64 cast from pointer to int warning */ - (mbname != NULL) ? mbname : "", mode); - if(!tif) - CloseHandle(fd); - - _TIFFfree(mbname); - - return tif; -} - -#endif /* ndef _WIN32_WCE */ - -void* -_TIFFmalloc(tmsize_t s) -{ - if (s == 0) - return ((void *) NULL); - - return (malloc((size_t) s)); -} - -void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz) -{ - if( nmemb == 0 || siz == 0 ) - return ((void *) NULL); - - return calloc((size_t) nmemb, (size_t)siz); -} - -void -_TIFFfree(void* p) -{ - free(p); -} - -void* -_TIFFrealloc(void* p, tmsize_t s) -{ - return (realloc(p, (size_t) s)); -} - -void -_TIFFmemset(void* p, int v, tmsize_t c) -{ - memset(p, v, (size_t) c); -} - -void -_TIFFmemcpy(void* d, const void* s, tmsize_t c) -{ - memcpy(d, s, (size_t) c); -} - -int -_TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) -{ - return (memcmp(p1, p2, (size_t) c)); -} - -#ifndef _WIN32_WCE - -#if (_MSC_VER < 1500) -# define vsnprintf _vsnprintf -#endif - -static void -Win32WarningHandler(const char* module, const char* fmt, va_list ap) -{ -#ifndef TIF_PLATFORM_CONSOLE - LPTSTR szTitle; - LPTSTR szTmp; - LPCTSTR szTitleText = "%s Warning"; - LPCTSTR szDefaultModule = "LIBTIFF"; - LPCTSTR szTmpModule = (module == NULL) ? szDefaultModule : module; - SIZE_T nBufSize = (strlen(szTmpModule) + - strlen(szTitleText) + strlen(fmt) + 256)*sizeof(char); - - if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, nBufSize)) == NULL) - return; - sprintf(szTitle, szTitleText, szTmpModule); - szTmp = szTitle + (strlen(szTitle)+2)*sizeof(char); - vsnprintf(szTmp, nBufSize-(strlen(szTitle)+2)*sizeof(char), fmt, ap); - MessageBoxA(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONINFORMATION); - LocalFree(szTitle); - - return; -#else - if (module != NULL) - fprintf(stderr, "%s: ", module); - fprintf(stderr, "Warning, "); - vfprintf(stderr, fmt, ap); - fprintf(stderr, ".\n"); -#endif -} -TIFFErrorHandler _TIFFwarningHandler = Win32WarningHandler; - -static void -Win32ErrorHandler(const char* module, const char* fmt, va_list ap) -{ -#ifndef TIF_PLATFORM_CONSOLE - LPTSTR szTitle; - LPTSTR szTmp; - LPCTSTR szTitleText = "%s Error"; - LPCTSTR szDefaultModule = "LIBTIFF"; - LPCTSTR szTmpModule = (module == NULL) ? szDefaultModule : module; - SIZE_T nBufSize = (strlen(szTmpModule) + - strlen(szTitleText) + strlen(fmt) + 256)*sizeof(char); - - if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, nBufSize)) == NULL) - return; - sprintf(szTitle, szTitleText, szTmpModule); - szTmp = szTitle + (strlen(szTitle)+2)*sizeof(char); - vsnprintf(szTmp, nBufSize-(strlen(szTitle)+2)*sizeof(char), fmt, ap); - MessageBoxA(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONEXCLAMATION); - LocalFree(szTitle); - return; -#else - if (module != NULL) - fprintf(stderr, "%s: ", module); - vfprintf(stderr, fmt, ap); - fprintf(stderr, ".\n"); -#endif -} -TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler; - -#endif /* ndef _WIN32_WCE */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_wince.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_wince.c deleted file mode 100644 index c149ee6..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_wince.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * Windows CE-specific routines for TIFF Library. - * Adapted from tif_win32.c 01/10/2006 by Mateusz Loskot (mateusz@loskot.net) - */ - -#ifndef _WIN32_WCE -# error "Only Windows CE target is supported!" -#endif - -#include "tiffiop.h" -#include - -/* Turn off console support on Windows CE. */ -#undef TIF_PLATFORM_CONSOLE - -COMPILATION SHOULD FAIL -This file is not yet updated to reflect changes in LibTiff 4.0. If you have -the opportunity to update and test this file, please contact LibTiff folks -for all assistance you may require and contribute the results - - -/* - * Open a TIFF file for read/writing. - */ -TIFF* -TIFFOpen(const char* name, const char* mode) -{ - static const char module[] = "TIFFOpen"; - thandle_t fd; - int m; - DWORD dwMode; - TIFF* tif; - size_t nLen; - size_t nWideLen; - wchar_t* wchName; - - m = _TIFFgetMode(mode, module); - - switch(m) - { - case O_RDONLY: - dwMode = OPEN_EXISTING; - break; - case O_RDWR: - dwMode = OPEN_ALWAYS; - break; - case O_RDWR|O_CREAT: - dwMode = OPEN_ALWAYS; - break; - case O_RDWR|O_TRUNC: - dwMode = CREATE_ALWAYS; - break; - case O_RDWR|O_CREAT|O_TRUNC: - dwMode = CREATE_ALWAYS; - break; - default: - return ((TIFF*)0); - } - - /* On Windows CE, CreateFile is mapped to CreateFileW, - * but file path is passed as char-based string, - * so the path has to be converted to wchar_t. - */ - - nWideLen = 0; - wchName = NULL; - nLen = strlen(name) + 1; - - nWideLen = MultiByteToWideChar(CP_ACP, 0, name, nLen, NULL, 0); - wchName = (wchar_t*)malloc(sizeof(wchar_t) * nWideLen); - if (NULL == wchName) - { - TIFFErrorExt(0, module, "Memory allocation error!"); - return ((TIFF *)0); - } - memset(wchName, 0, sizeof(wchar_t) * nWideLen); - MultiByteToWideChar(CP_ACP, 0, name, nLen, wchName, nWideLen); - - fd = (thandle_t)CreateFile(wchName, - (m == O_RDONLY)?GENERIC_READ:(GENERIC_READ | GENERIC_WRITE), - FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, dwMode, - (m == O_RDONLY)?FILE_ATTRIBUTE_READONLY:FILE_ATTRIBUTE_NORMAL, - NULL); - - free(wchName); - - if (fd == INVALID_HANDLE_VALUE) { - TIFFErrorExt(0, module, "%s: Cannot open", name); - return ((TIFF *)0); - } - - /* TODO - mloskot: change to TIFFdOpenW and pass wchar path */ - - tif = TIFFFdOpen((int)fd, name, mode); - if(!tif) - CloseHandle(fd); - return tif; -} - -/* - * Open a TIFF file with a Unicode filename, for read/writing. - */ -TIFF* -TIFFOpenW(const wchar_t* name, const char* mode) -{ - static const char module[] = "TIFFOpenW"; - thandle_t fd; - int m; - DWORD dwMode; - int mbsize; - char *mbname; - TIFF *tif; - - m = _TIFFgetMode(mode, module); - - switch(m) { - case O_RDONLY: dwMode = OPEN_EXISTING; break; - case O_RDWR: dwMode = OPEN_ALWAYS; break; - case O_RDWR|O_CREAT: dwMode = OPEN_ALWAYS; break; - case O_RDWR|O_TRUNC: dwMode = CREATE_ALWAYS; break; - case O_RDWR|O_CREAT|O_TRUNC: dwMode = CREATE_ALWAYS; break; - default: return ((TIFF*)0); - } - - /* On Windows CE, CreateFile is mapped to CreateFileW, - * so no conversion of wchar_t to char is required. - */ - - fd = (thandle_t)CreateFile(name, - (m == O_RDONLY)?GENERIC_READ:(GENERIC_READ|GENERIC_WRITE), - FILE_SHARE_READ, NULL, dwMode, - (m == O_RDONLY)?FILE_ATTRIBUTE_READONLY:FILE_ATTRIBUTE_NORMAL, - NULL); - if (fd == INVALID_HANDLE_VALUE) { - TIFFErrorExt(0, module, "%S: Cannot open", name); - return ((TIFF *)0); - } - - mbname = NULL; - mbsize = WideCharToMultiByte(CP_ACP, 0, name, -1, NULL, 0, NULL, NULL); - if (mbsize > 0) { - mbname = (char *)_TIFFmalloc(mbsize); - if (!mbname) { - TIFFErrorExt(0, module, - "Can't allocate space for filename conversion buffer"); - return ((TIFF*)0); - } - - WideCharToMultiByte(CP_ACP, 0, name, -1, mbname, mbsize, - NULL, NULL); - } - - tif = TIFFFdOpen((int)fd, - (mbname != NULL) ? mbname : "", mode); - if(!tif) - CloseHandle(fd); - - _TIFFfree(mbname); - - return tif; -} - -static void -Win32WarningHandler(const char* module, const char* fmt, va_list ap) -{ - /* On Windows CE, MessageBox is mapped to wide-char based MessageBoxW. */ - - size_t nWideLen = 0; - LPTSTR szWideTitle = NULL; - LPTSTR szWideMsg = NULL; - - LPSTR szTitle; - LPSTR szTmp; - LPCSTR szTitleText = "%s Warning"; - LPCSTR szDefaultModule = "LIBTIFF"; - LPCSTR szTmpModule; - - szTmpModule = (module == NULL) ? szDefaultModule : module; - if ((szTitle = (LPSTR)LocalAlloc(LMEM_FIXED, - (strlen(szTmpModule) + strlen(szTitleText) - + strlen(fmt) + 128) * sizeof(char))) == NULL) - return; - - sprintf(szTitle, szTitleText, szTmpModule); - szTmp = szTitle + (strlen(szTitle) + 2) * sizeof(char); - vsprintf(szTmp, fmt, ap); - - /* Convert error message to Unicode. */ - - nWideLen = MultiByteToWideChar(CP_ACP, 0, szTitle, -1, NULL, 0); - szWideTitle = (wchar_t*)malloc(sizeof(wchar_t) * nWideLen); - MultiByteToWideChar(CP_ACP, 0, szTitle, -1, szWideTitle, nWideLen); - - nWideLen = MultiByteToWideChar(CP_ACP, 0, szTmp, -1, NULL, 0); - szWideMsg = (wchar_t*)malloc(sizeof(wchar_t) * nWideLen); - MultiByteToWideChar(CP_ACP, 0, szTmp, -1, szWideMsg, nWideLen); - - /* Display message */ - - MessageBox(GetFocus(), szWideMsg, szWideTitle, MB_OK | MB_ICONEXCLAMATION); - - /* Free resources */ - - LocalFree(szTitle); - free(szWideMsg); - free(szWideTitle); -} - -TIFFErrorHandler _TIFFwarningHandler = Win32WarningHandler; - -static void -Win32ErrorHandler(const char* module, const char* fmt, va_list ap) -{ - /* On Windows CE, MessageBox is mapped to wide-char based MessageBoxW. */ - - size_t nWideLen = 0; - LPTSTR szWideTitle = NULL; - LPTSTR szWideMsg = NULL; - - LPSTR szTitle; - LPSTR szTmp; - LPCSTR szTitleText = "%s Error"; - LPCSTR szDefaultModule = "LIBTIFF"; - LPCSTR szTmpModule; - - szTmpModule = (module == NULL) ? szDefaultModule : module; - if ((szTitle = (LPSTR)LocalAlloc(LMEM_FIXED, - (strlen(szTmpModule) + strlen(szTitleText) - + strlen(fmt) + 128) * sizeof(char))) == NULL) - return; - - sprintf(szTitle, szTitleText, szTmpModule); - szTmp = szTitle + (strlen(szTitle) + 2) * sizeof(char); - vsprintf(szTmp, fmt, ap); - - /* Convert error message to Unicode. */ - - nWideLen = MultiByteToWideChar(CP_ACP, 0, szTitle, -1, NULL, 0); - szWideTitle = (wchar_t*)malloc(sizeof(wchar_t) * nWideLen); - MultiByteToWideChar(CP_ACP, 0, szTitle, -1, szWideTitle, nWideLen); - - nWideLen = MultiByteToWideChar(CP_ACP, 0, szTmp, -1, NULL, 0); - szWideMsg = (wchar_t*)malloc(sizeof(wchar_t) * nWideLen); - MultiByteToWideChar(CP_ACP, 0, szTmp, -1, szWideMsg, nWideLen); - - /* Display message */ - - MessageBox(GetFocus(), szWideMsg, szWideTitle, MB_OK | MB_ICONEXCLAMATION); - - /* Free resources */ - - LocalFree(szTitle); - free(szWideMsg); - free(szWideTitle); -} - -TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler; - - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_write.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_write.c deleted file mode 100644 index cf76a0c..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_write.c +++ /dev/null @@ -1,832 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Scanline-oriented Write Support - */ -#include "tiffiop.h" -#include - -#define STRIPINCR 20 /* expansion factor on strip array */ - -#define WRITECHECKSTRIPS(tif, module) \ - (((tif)->tif_flags&TIFF_BEENWRITING) || TIFFWriteCheck((tif),0,module)) -#define WRITECHECKTILES(tif, module) \ - (((tif)->tif_flags&TIFF_BEENWRITING) || TIFFWriteCheck((tif),1,module)) -#define BUFFERCHECK(tif) \ - ((((tif)->tif_flags & TIFF_BUFFERSETUP) && tif->tif_rawdata) || \ - TIFFWriteBufferSetup((tif), NULL, (tmsize_t) -1)) - -static int TIFFGrowStrips(TIFF* tif, uint32 delta, const char* module); -static int TIFFAppendToStrip(TIFF* tif, uint32 strip, uint8* data, tmsize_t cc); - -int -TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample) -{ - static const char module[] = "TIFFWriteScanline"; - register TIFFDirectory *td; - int status, imagegrew = 0; - uint32 strip; - - if (!WRITECHECKSTRIPS(tif, module)) - return (-1); - /* - * Handle delayed allocation of data buffer. This - * permits it to be sized more intelligently (using - * directory information). - */ - if (!BUFFERCHECK(tif)) - return (-1); - tif->tif_flags |= TIFF_BUF4WRITE; /* not strictly sure this is right*/ - - td = &tif->tif_dir; - /* - * Extend image length if needed - * (but only for PlanarConfig=1). - */ - if (row >= td->td_imagelength) { /* extend image */ - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { - TIFFErrorExt(tif->tif_clientdata, module, - "Can not change \"ImageLength\" when using separate planes"); - return (-1); - } - td->td_imagelength = row+1; - imagegrew = 1; - } - /* - * Calculate strip and check for crossings. - */ - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { - if (sample >= td->td_samplesperpixel) { - TIFFErrorExt(tif->tif_clientdata, module, - "%lu: Sample out of range, max %lu", - (unsigned long) sample, (unsigned long) td->td_samplesperpixel); - return (-1); - } - strip = sample*td->td_stripsperimage + row/td->td_rowsperstrip; - } else - strip = row / td->td_rowsperstrip; - /* - * Check strip array to make sure there's space. We don't support - * dynamically growing files that have data organized in separate - * bitplanes because it's too painful. In that case we require that - * the imagelength be set properly before the first write (so that the - * strips array will be fully allocated above). - */ - if (strip >= td->td_nstrips && !TIFFGrowStrips(tif, 1, module)) - return (-1); - if (strip != tif->tif_curstrip) { - /* - * Changing strips -- flush any data present. - */ - if (!TIFFFlushData(tif)) - return (-1); - tif->tif_curstrip = strip; - /* - * Watch out for a growing image. The value of strips/image - * will initially be 1 (since it can't be deduced until the - * imagelength is known). - */ - if (strip >= td->td_stripsperimage && imagegrew) - td->td_stripsperimage = - TIFFhowmany_32(td->td_imagelength,td->td_rowsperstrip); - if (td->td_stripsperimage == 0) { - TIFFErrorExt(tif->tif_clientdata, module, "Zero strips per image"); - return (-1); - } - tif->tif_row = - (strip % td->td_stripsperimage) * td->td_rowsperstrip; - if ((tif->tif_flags & TIFF_CODERSETUP) == 0) { - if (!(*tif->tif_setupencode)(tif)) - return (-1); - tif->tif_flags |= TIFF_CODERSETUP; - } - - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - - if( td->td_stripbytecount[strip] > 0 ) - { - /* if we are writing over existing tiles, zero length */ - td->td_stripbytecount[strip] = 0; - - /* this forces TIFFAppendToStrip() to do a seek */ - tif->tif_curoff = 0; - } - - if (!(*tif->tif_preencode)(tif, sample)) - return (-1); - tif->tif_flags |= TIFF_POSTENCODE; - } - /* - * Ensure the write is either sequential or at the - * beginning of a strip (or that we can randomly - * access the data -- i.e. no encoding). - */ - if (row != tif->tif_row) { - if (row < tif->tif_row) { - /* - * Moving backwards within the same strip: - * backup to the start and then decode - * forward (below). - */ - tif->tif_row = (strip % td->td_stripsperimage) * - td->td_rowsperstrip; - tif->tif_rawcp = tif->tif_rawdata; - } - /* - * Seek forward to the desired row. - */ - if (!(*tif->tif_seek)(tif, row - tif->tif_row)) - return (-1); - tif->tif_row = row; - } - - /* swab if needed - note that source buffer will be altered */ - tif->tif_postdecode( tif, (uint8*) buf, tif->tif_scanlinesize ); - - status = (*tif->tif_encoderow)(tif, (uint8*) buf, - tif->tif_scanlinesize, sample); - - /* we are now poised at the beginning of the next row */ - tif->tif_row = row + 1; - return (status); -} - -/* - * Encode the supplied data and write it to the - * specified strip. - * - * NB: Image length must be setup before writing. - */ -tmsize_t -TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc) -{ - static const char module[] = "TIFFWriteEncodedStrip"; - TIFFDirectory *td = &tif->tif_dir; - uint16 sample; - - if (!WRITECHECKSTRIPS(tif, module)) - return ((tmsize_t) -1); - /* - * Check strip array to make sure there's space. - * We don't support dynamically growing files that - * have data organized in separate bitplanes because - * it's too painful. In that case we require that - * the imagelength be set properly before the first - * write (so that the strips array will be fully - * allocated above). - */ - if (strip >= td->td_nstrips) { - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { - TIFFErrorExt(tif->tif_clientdata, module, - "Can not grow image by strips when using separate planes"); - return ((tmsize_t) -1); - } - if (!TIFFGrowStrips(tif, 1, module)) - return ((tmsize_t) -1); - td->td_stripsperimage = - TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip); - } - /* - * Handle delayed allocation of data buffer. This - * permits it to be sized according to the directory - * info. - */ - if (!BUFFERCHECK(tif)) - return ((tmsize_t) -1); - - tif->tif_flags |= TIFF_BUF4WRITE; - tif->tif_curstrip = strip; - - if (td->td_stripsperimage == 0) { - TIFFErrorExt(tif->tif_clientdata, module, "Zero strips per image"); - return ((tmsize_t) -1); - } - - tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; - if ((tif->tif_flags & TIFF_CODERSETUP) == 0) { - if (!(*tif->tif_setupencode)(tif)) - return ((tmsize_t) -1); - tif->tif_flags |= TIFF_CODERSETUP; - } - - if( td->td_stripbytecount[strip] > 0 ) - { - /* Make sure that at the first attempt of rewriting the tile, we will have */ - /* more bytes available in the output buffer than the previous byte count, */ - /* so that TIFFAppendToStrip() will detect the overflow when it is called the first */ - /* time if the new compressed tile is bigger than the older one. (GDAL #4771) */ - if( tif->tif_rawdatasize <= (tmsize_t)td->td_stripbytecount[strip] ) - { - if( !(TIFFWriteBufferSetup(tif, NULL, - (tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[strip] + 1), 1024))) ) - return ((tmsize_t)(-1)); - } - - /* Force TIFFAppendToStrip() to consider placing data at end - of file. */ - tif->tif_curoff = 0; - } - - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - - tif->tif_flags &= ~TIFF_POSTENCODE; - - /* shortcut to avoid an extra memcpy() */ - if( td->td_compression == COMPRESSION_NONE ) - { - /* swab if needed - note that source buffer will be altered */ - tif->tif_postdecode( tif, (uint8*) data, cc ); - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits((uint8*) data, cc); - - if (cc > 0 && - !TIFFAppendToStrip(tif, strip, (uint8*) data, cc)) - return ((tmsize_t) -1); - return (cc); - } - - sample = (uint16)(strip / td->td_stripsperimage); - if (!(*tif->tif_preencode)(tif, sample)) - return ((tmsize_t) -1); - - /* swab if needed - note that source buffer will be altered */ - tif->tif_postdecode( tif, (uint8*) data, cc ); - - if (!(*tif->tif_encodestrip)(tif, (uint8*) data, cc, sample)) - return ((tmsize_t) -1); - if (!(*tif->tif_postencode)(tif)) - return ((tmsize_t) -1); - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits(tif->tif_rawdata, tif->tif_rawcc); - if (tif->tif_rawcc > 0 && - !TIFFAppendToStrip(tif, strip, tif->tif_rawdata, tif->tif_rawcc)) - return ((tmsize_t) -1); - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - return (cc); -} - -/* - * Write the supplied data to the specified strip. - * - * NB: Image length must be setup before writing. - */ -tmsize_t -TIFFWriteRawStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc) -{ - static const char module[] = "TIFFWriteRawStrip"; - TIFFDirectory *td = &tif->tif_dir; - - if (!WRITECHECKSTRIPS(tif, module)) - return ((tmsize_t) -1); - /* - * Check strip array to make sure there's space. - * We don't support dynamically growing files that - * have data organized in separate bitplanes because - * it's too painful. In that case we require that - * the imagelength be set properly before the first - * write (so that the strips array will be fully - * allocated above). - */ - if (strip >= td->td_nstrips) { - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { - TIFFErrorExt(tif->tif_clientdata, module, - "Can not grow image by strips when using separate planes"); - return ((tmsize_t) -1); - } - /* - * Watch out for a growing image. The value of - * strips/image will initially be 1 (since it - * can't be deduced until the imagelength is known). - */ - if (strip >= td->td_stripsperimage) - td->td_stripsperimage = - TIFFhowmany_32(td->td_imagelength,td->td_rowsperstrip); - if (!TIFFGrowStrips(tif, 1, module)) - return ((tmsize_t) -1); - } - tif->tif_curstrip = strip; - if (td->td_stripsperimage == 0) { - TIFFErrorExt(tif->tif_clientdata, module,"Zero strips per image"); - return ((tmsize_t) -1); - } - tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; - return (TIFFAppendToStrip(tif, strip, (uint8*) data, cc) ? - cc : (tmsize_t) -1); -} - -/* - * Write and compress a tile of data. The - * tile is selected by the (x,y,z,s) coordinates. - */ -tmsize_t -TIFFWriteTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s) -{ - if (!TIFFCheckTile(tif, x, y, z, s)) - return ((tmsize_t)(-1)); - /* - * NB: A tile size of -1 is used instead of tif_tilesize knowing - * that TIFFWriteEncodedTile will clamp this to the tile size. - * This is done because the tile size may not be defined until - * after the output buffer is setup in TIFFWriteBufferSetup. - */ - return (TIFFWriteEncodedTile(tif, - TIFFComputeTile(tif, x, y, z, s), buf, (tmsize_t)(-1))); -} - -/* - * Encode the supplied data and write it to the - * specified tile. There must be space for the - * data. The function clamps individual writes - * to a tile to the tile size, but does not (and - * can not) check that multiple writes to the same - * tile do not write more than tile size data. - * - * NB: Image length must be setup before writing; this - * interface does not support automatically growing - * the image on each write (as TIFFWriteScanline does). - */ -tmsize_t -TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc) -{ - static const char module[] = "TIFFWriteEncodedTile"; - TIFFDirectory *td; - uint16 sample; - uint32 howmany32; - - if (!WRITECHECKTILES(tif, module)) - return ((tmsize_t)(-1)); - td = &tif->tif_dir; - if (tile >= td->td_nstrips) { - TIFFErrorExt(tif->tif_clientdata, module, "Tile %lu out of range, max %lu", - (unsigned long) tile, (unsigned long) td->td_nstrips); - return ((tmsize_t)(-1)); - } - /* - * Handle delayed allocation of data buffer. This - * permits it to be sized more intelligently (using - * directory information). - */ - if (!BUFFERCHECK(tif)) - return ((tmsize_t)(-1)); - - tif->tif_flags |= TIFF_BUF4WRITE; - tif->tif_curtile = tile; - - if( td->td_stripbytecount[tile] > 0 ) - { - /* Make sure that at the first attempt of rewriting the tile, we will have */ - /* more bytes available in the output buffer than the previous byte count, */ - /* so that TIFFAppendToStrip() will detect the overflow when it is called the first */ - /* time if the new compressed tile is bigger than the older one. (GDAL #4771) */ - if( tif->tif_rawdatasize <= (tmsize_t) td->td_stripbytecount[tile] ) - { - if( !(TIFFWriteBufferSetup(tif, NULL, - (tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[tile] + 1), 1024))) ) - return ((tmsize_t)(-1)); - } - - /* Force TIFFAppendToStrip() to consider placing data at end - of file. */ - tif->tif_curoff = 0; - } - - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - - /* - * Compute tiles per row & per column to compute - * current row and column - */ - howmany32=TIFFhowmany_32(td->td_imagelength, td->td_tilelength); - if (howmany32 == 0) { - TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles"); - return ((tmsize_t)(-1)); - } - tif->tif_row = (tile % howmany32) * td->td_tilelength; - howmany32=TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth); - if (howmany32 == 0) { - TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles"); - return ((tmsize_t)(-1)); - } - tif->tif_col = (tile % howmany32) * td->td_tilewidth; - - if ((tif->tif_flags & TIFF_CODERSETUP) == 0) { - if (!(*tif->tif_setupencode)(tif)) - return ((tmsize_t)(-1)); - tif->tif_flags |= TIFF_CODERSETUP; - } - tif->tif_flags &= ~TIFF_POSTENCODE; - - /* - * Clamp write amount to the tile size. This is mostly - * done so that callers can pass in some large number - * (e.g. -1) and have the tile size used instead. - */ - if ( cc < 1 || cc > tif->tif_tilesize) - cc = tif->tif_tilesize; - - /* shortcut to avoid an extra memcpy() */ - if( td->td_compression == COMPRESSION_NONE ) - { - /* swab if needed - note that source buffer will be altered */ - tif->tif_postdecode( tif, (uint8*) data, cc ); - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits((uint8*) data, cc); - - if (cc > 0 && - !TIFFAppendToStrip(tif, tile, (uint8*) data, cc)) - return ((tmsize_t) -1); - return (cc); - } - - sample = (uint16)(tile/td->td_stripsperimage); - if (!(*tif->tif_preencode)(tif, sample)) - return ((tmsize_t)(-1)); - /* swab if needed - note that source buffer will be altered */ - tif->tif_postdecode( tif, (uint8*) data, cc ); - - if (!(*tif->tif_encodetile)(tif, (uint8*) data, cc, sample)) - return ((tmsize_t) -1); - if (!(*tif->tif_postencode)(tif)) - return ((tmsize_t)(-1)); - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits((uint8*)tif->tif_rawdata, tif->tif_rawcc); - if (tif->tif_rawcc > 0 && !TIFFAppendToStrip(tif, tile, - tif->tif_rawdata, tif->tif_rawcc)) - return ((tmsize_t)(-1)); - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - return (cc); -} - -/* - * Write the supplied data to the specified strip. - * There must be space for the data; we don't check - * if strips overlap! - * - * NB: Image length must be setup before writing; this - * interface does not support automatically growing - * the image on each write (as TIFFWriteScanline does). - */ -tmsize_t -TIFFWriteRawTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc) -{ - static const char module[] = "TIFFWriteRawTile"; - - if (!WRITECHECKTILES(tif, module)) - return ((tmsize_t)(-1)); - if (tile >= tif->tif_dir.td_nstrips) { - TIFFErrorExt(tif->tif_clientdata, module, "Tile %lu out of range, max %lu", - (unsigned long) tile, - (unsigned long) tif->tif_dir.td_nstrips); - return ((tmsize_t)(-1)); - } - return (TIFFAppendToStrip(tif, tile, (uint8*) data, cc) ? - cc : (tmsize_t)(-1)); -} - -#define isUnspecified(tif, f) \ - (TIFFFieldSet(tif,f) && (tif)->tif_dir.td_imagelength == 0) - -int -TIFFSetupStrips(TIFF* tif) -{ - TIFFDirectory* td = &tif->tif_dir; - - if (isTiled(tif)) - td->td_stripsperimage = - isUnspecified(tif, FIELD_TILEDIMENSIONS) ? - td->td_samplesperpixel : TIFFNumberOfTiles(tif); - else - td->td_stripsperimage = - isUnspecified(tif, FIELD_ROWSPERSTRIP) ? - td->td_samplesperpixel : TIFFNumberOfStrips(tif); - td->td_nstrips = td->td_stripsperimage; - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - td->td_stripsperimage /= td->td_samplesperpixel; - td->td_stripoffset = (uint64 *) - _TIFFmalloc(td->td_nstrips * sizeof (uint64)); - td->td_stripbytecount = (uint64 *) - _TIFFmalloc(td->td_nstrips * sizeof (uint64)); - if (td->td_stripoffset == NULL || td->td_stripbytecount == NULL) - return (0); - /* - * Place data at the end-of-file - * (by setting offsets to zero). - */ - _TIFFmemset(td->td_stripoffset, 0, td->td_nstrips*sizeof (uint64)); - _TIFFmemset(td->td_stripbytecount, 0, td->td_nstrips*sizeof (uint64)); - TIFFSetFieldBit(tif, FIELD_STRIPOFFSETS); - TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS); - return (1); -} -#undef isUnspecified - -/* - * Verify file is writable and that the directory - * information is setup properly. In doing the latter - * we also "freeze" the state of the directory so - * that important information is not changed. - */ -int -TIFFWriteCheck(TIFF* tif, int tiles, const char* module) -{ - if (tif->tif_mode == O_RDONLY) { - TIFFErrorExt(tif->tif_clientdata, module, "File not open for writing"); - return (0); - } - if (tiles ^ isTiled(tif)) { - TIFFErrorExt(tif->tif_clientdata, module, tiles ? - "Can not write tiles to a stripped image" : - "Can not write scanlines to a tiled image"); - return (0); - } - - _TIFFFillStriles( tif ); - - /* - * On the first write verify all the required information - * has been setup and initialize any data structures that - * had to wait until directory information was set. - * Note that a lot of our work is assumed to remain valid - * because we disallow any of the important parameters - * from changing after we start writing (i.e. once - * TIFF_BEENWRITING is set, TIFFSetField will only allow - * the image's length to be changed). - */ - if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Must set \"ImageWidth\" before writing data"); - return (0); - } - if (tif->tif_dir.td_samplesperpixel == 1) { - /* - * Planarconfiguration is irrelevant in case of single band - * images and need not be included. We will set it anyway, - * because this field is used in other parts of library even - * in the single band case. - */ - if (!TIFFFieldSet(tif, FIELD_PLANARCONFIG)) - tif->tif_dir.td_planarconfig = PLANARCONFIG_CONTIG; - } else { - if (!TIFFFieldSet(tif, FIELD_PLANARCONFIG)) { - TIFFErrorExt(tif->tif_clientdata, module, - "Must set \"PlanarConfiguration\" before writing data"); - return (0); - } - } - if (tif->tif_dir.td_stripoffset == NULL && !TIFFSetupStrips(tif)) { - tif->tif_dir.td_nstrips = 0; - TIFFErrorExt(tif->tif_clientdata, module, "No space for %s arrays", - isTiled(tif) ? "tile" : "strip"); - return (0); - } - if (isTiled(tif)) - { - tif->tif_tilesize = TIFFTileSize(tif); - if (tif->tif_tilesize == 0) - return (0); - } - else - tif->tif_tilesize = (tmsize_t)(-1); - tif->tif_scanlinesize = TIFFScanlineSize(tif); - if (tif->tif_scanlinesize == 0) - return (0); - tif->tif_flags |= TIFF_BEENWRITING; - return (1); -} - -/* - * Setup the raw data buffer used for encoding. - */ -int -TIFFWriteBufferSetup(TIFF* tif, void* bp, tmsize_t size) -{ - static const char module[] = "TIFFWriteBufferSetup"; - - if (tif->tif_rawdata) { - if (tif->tif_flags & TIFF_MYBUFFER) { - _TIFFfree(tif->tif_rawdata); - tif->tif_flags &= ~TIFF_MYBUFFER; - } - tif->tif_rawdata = NULL; - } - if (size == (tmsize_t)(-1)) { - size = (isTiled(tif) ? - tif->tif_tilesize : TIFFStripSize(tif)); - /* - * Make raw data buffer at least 8K - */ - if (size < 8*1024) - size = 8*1024; - bp = NULL; /* NB: force malloc */ - } - if (bp == NULL) { - bp = _TIFFmalloc(size); - if (bp == NULL) { - TIFFErrorExt(tif->tif_clientdata, module, "No space for output buffer"); - return (0); - } - tif->tif_flags |= TIFF_MYBUFFER; - } else - tif->tif_flags &= ~TIFF_MYBUFFER; - tif->tif_rawdata = (uint8*) bp; - tif->tif_rawdatasize = size; - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - tif->tif_flags |= TIFF_BUFFERSETUP; - return (1); -} - -/* - * Grow the strip data structures by delta strips. - */ -static int -TIFFGrowStrips(TIFF* tif, uint32 delta, const char* module) -{ - TIFFDirectory *td = &tif->tif_dir; - uint64* new_stripoffset; - uint64* new_stripbytecount; - - assert(td->td_planarconfig == PLANARCONFIG_CONTIG); - new_stripoffset = (uint64*)_TIFFrealloc(td->td_stripoffset, - (td->td_nstrips + delta) * sizeof (uint64)); - new_stripbytecount = (uint64*)_TIFFrealloc(td->td_stripbytecount, - (td->td_nstrips + delta) * sizeof (uint64)); - if (new_stripoffset == NULL || new_stripbytecount == NULL) { - if (new_stripoffset) - _TIFFfree(new_stripoffset); - if (new_stripbytecount) - _TIFFfree(new_stripbytecount); - td->td_nstrips = 0; - TIFFErrorExt(tif->tif_clientdata, module, "No space to expand strip arrays"); - return (0); - } - td->td_stripoffset = new_stripoffset; - td->td_stripbytecount = new_stripbytecount; - _TIFFmemset(td->td_stripoffset + td->td_nstrips, - 0, delta*sizeof (uint64)); - _TIFFmemset(td->td_stripbytecount + td->td_nstrips, - 0, delta*sizeof (uint64)); - td->td_nstrips += delta; - tif->tif_flags |= TIFF_DIRTYDIRECT; - - return (1); -} - -/* - * Append the data to the specified strip. - */ -static int -TIFFAppendToStrip(TIFF* tif, uint32 strip, uint8* data, tmsize_t cc) -{ - static const char module[] = "TIFFAppendToStrip"; - TIFFDirectory *td = &tif->tif_dir; - uint64 m; - int64 old_byte_count = -1; - - if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) { - assert(td->td_nstrips > 0); - - if( td->td_stripbytecount[strip] != 0 - && td->td_stripoffset[strip] != 0 - && td->td_stripbytecount[strip] >= (uint64) cc ) - { - /* - * There is already tile data on disk, and the new tile - * data we have will fit in the same space. The only - * aspect of this that is risky is that there could be - * more data to append to this strip before we are done - * depending on how we are getting called. - */ - if (!SeekOK(tif, td->td_stripoffset[strip])) { - TIFFErrorExt(tif->tif_clientdata, module, - "Seek error at scanline %lu", - (unsigned long)tif->tif_row); - return (0); - } - } - else - { - /* - * Seek to end of file, and set that as our location to - * write this strip. - */ - td->td_stripoffset[strip] = TIFFSeekFile(tif, 0, SEEK_END); - tif->tif_flags |= TIFF_DIRTYSTRIP; - } - - tif->tif_curoff = td->td_stripoffset[strip]; - - /* - * We are starting a fresh strip/tile, so set the size to zero. - */ - old_byte_count = td->td_stripbytecount[strip]; - td->td_stripbytecount[strip] = 0; - } - - m = tif->tif_curoff+cc; - if (!(tif->tif_flags&TIFF_BIGTIFF)) - m = (uint32)m; - if ((mtif_curoff)||(m<(uint64)cc)) - { - TIFFErrorExt(tif->tif_clientdata, module, "Maximum TIFF file size exceeded"); - return (0); - } - if (!WriteOK(tif, data, cc)) { - TIFFErrorExt(tif->tif_clientdata, module, "Write error at scanline %lu", - (unsigned long) tif->tif_row); - return (0); - } - tif->tif_curoff = m; - td->td_stripbytecount[strip] += cc; - - if( (int64) td->td_stripbytecount[strip] != old_byte_count ) - tif->tif_flags |= TIFF_DIRTYSTRIP; - - return (1); -} - -/* - * Internal version of TIFFFlushData that can be - * called by ``encodestrip routines'' w/o concern - * for infinite recursion. - */ -int -TIFFFlushData1(TIFF* tif) -{ - if (tif->tif_rawcc > 0 && tif->tif_flags & TIFF_BUF4WRITE ) { - if (!isFillOrder(tif, tif->tif_dir.td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits((uint8*)tif->tif_rawdata, - tif->tif_rawcc); - if (!TIFFAppendToStrip(tif, - isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip, - tif->tif_rawdata, tif->tif_rawcc)) - { - /* We update those variables even in case of error since there's */ - /* code that doesn't really check the return code of this */ - /* function */ - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - return (0); - } - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - } - return (1); -} - -/* - * Set the current write offset. This should only be - * used to set the offset to a known previous location - * (very carefully), or to 0 so that the next write gets - * appended to the end of the file. - */ -void -TIFFSetWriteOffset(TIFF* tif, toff_t off) -{ - tif->tif_curoff = off; -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_zip.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_zip.c deleted file mode 100644 index f12ad79..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_zip.c +++ /dev/null @@ -1,474 +0,0 @@ -/* - * Copyright (c) 1995-1997 Sam Leffler - * Copyright (c) 1995-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef ZIP_SUPPORT -/* - * TIFF Library. - * - * ZIP (aka Deflate) Compression Support - * - * This file is simply an interface to the zlib library written by - * Jean-loup Gailly and Mark Adler. You must use version 1.0 or later - * of the library: this code assumes the 1.0 API and also depends on - * the ability to write the zlib header multiple times (one per strip) - * which was not possible with versions prior to 0.95. Note also that - * older versions of this codec avoided this bug by suppressing the header - * entirely. This means that files written with the old library cannot - * be read; they should be converted to a different compression scheme - * and then reconverted. - * - * The data format used by the zlib library is described in the files - * zlib-3.1.doc, deflate-1.1.doc and gzip-4.1.doc, available in the - * directory ftp://ftp.uu.net/pub/archiving/zip/doc. The library was - * last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz. - */ -#include "tif_predict.h" -#include "zlib.h" - -#include - -/* - * Sigh, ZLIB_VERSION is defined as a string so there's no - * way to do a proper check here. Instead we guess based - * on the presence of #defines that were added between the - * 0.95 and 1.0 distributions. - */ -#if !defined(Z_NO_COMPRESSION) || !defined(Z_DEFLATED) -#error "Antiquated ZLIB software; you must use version 1.0 or later" -#endif - -#define SAFE_MSG(sp) ((sp)->stream.msg == NULL ? "" : (sp)->stream.msg) - -/* - * State block for each open TIFF - * file using ZIP compression/decompression. - */ -typedef struct { - TIFFPredictorState predict; - z_stream stream; - int zipquality; /* compression level */ - int state; /* state flags */ -#define ZSTATE_INIT_DECODE 0x01 -#define ZSTATE_INIT_ENCODE 0x02 - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ -} ZIPState; - -#define ZState(tif) ((ZIPState*) (tif)->tif_data) -#define DecoderState(tif) ZState(tif) -#define EncoderState(tif) ZState(tif) - -static int ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); -static int ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s); - -static int -ZIPFixupTags(TIFF* tif) -{ - (void) tif; - return (1); -} - -static int -ZIPSetupDecode(TIFF* tif) -{ - static const char module[] = "ZIPSetupDecode"; - ZIPState* sp = DecoderState(tif); - - assert(sp != NULL); - - /* if we were last encoding, terminate this mode */ - if (sp->state & ZSTATE_INIT_ENCODE) { - deflateEnd(&sp->stream); - sp->state = 0; - } - - /* This function can possibly be called several times by */ - /* PredictorSetupDecode() if this function succeeds but */ - /* PredictorSetup() fails */ - if ((sp->state & ZSTATE_INIT_DECODE) == 0 && - inflateInit(&sp->stream) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "%s", SAFE_MSG(sp)); - return (0); - } else { - sp->state |= ZSTATE_INIT_DECODE; - return (1); - } -} - -/* - * Setup state for decoding a strip. - */ -static int -ZIPPreDecode(TIFF* tif, uint16 s) -{ - static const char module[] = "ZIPPreDecode"; - ZIPState* sp = DecoderState(tif); - - (void) s; - assert(sp != NULL); - - if( (sp->state & ZSTATE_INIT_DECODE) == 0 ) - tif->tif_setupdecode( tif ); - - sp->stream.next_in = tif->tif_rawdata; - assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_in = (uInt) tif->tif_rawcc; - if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc) - { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); - return (0); - } - return (inflateReset(&sp->stream) == Z_OK); -} - -static int -ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) -{ - static const char module[] = "ZIPDecode"; - ZIPState* sp = DecoderState(tif); - - (void) s; - assert(sp != NULL); - assert(sp->state == ZSTATE_INIT_DECODE); - - sp->stream.next_in = tif->tif_rawcp; - sp->stream.avail_in = (uInt) tif->tif_rawcc; - - sp->stream.next_out = op; - assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_out = (uInt) occ; - if ((tmsize_t)sp->stream.avail_out != occ) - { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); - return (0); - } - do { - int state = inflate(&sp->stream, Z_PARTIAL_FLUSH); - if (state == Z_STREAM_END) - break; - if (state == Z_DATA_ERROR) { - TIFFErrorExt(tif->tif_clientdata, module, - "Decoding error at scanline %lu, %s", - (unsigned long) tif->tif_row, SAFE_MSG(sp)); - if (inflateSync(&sp->stream) != Z_OK) - return (0); - continue; - } - if (state != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, - "ZLib error: %s", SAFE_MSG(sp)); - return (0); - } - } while (sp->stream.avail_out > 0); - if (sp->stream.avail_out != 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at scanline %lu (short " TIFF_UINT64_FORMAT " bytes)", - (unsigned long) tif->tif_row, (TIFF_UINT64_T) sp->stream.avail_out); - return (0); - } - - tif->tif_rawcp = sp->stream.next_in; - tif->tif_rawcc = sp->stream.avail_in; - - return (1); -} - -static int -ZIPSetupEncode(TIFF* tif) -{ - static const char module[] = "ZIPSetupEncode"; - ZIPState* sp = EncoderState(tif); - - assert(sp != NULL); - if (sp->state & ZSTATE_INIT_DECODE) { - inflateEnd(&sp->stream); - sp->state = 0; - } - - if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "%s", SAFE_MSG(sp)); - return (0); - } else { - sp->state |= ZSTATE_INIT_ENCODE; - return (1); - } -} - -/* - * Reset encoding state at the start of a strip. - */ -static int -ZIPPreEncode(TIFF* tif, uint16 s) -{ - static const char module[] = "ZIPPreEncode"; - ZIPState *sp = EncoderState(tif); - - (void) s; - assert(sp != NULL); - if( sp->state != ZSTATE_INIT_ENCODE ) - tif->tif_setupencode( tif ); - - sp->stream.next_out = tif->tif_rawdata; - assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_out = (uInt)tif->tif_rawdatasize; - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) - { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); - return (0); - } - return (deflateReset(&sp->stream) == Z_OK); -} - -/* - * Encode a chunk of pixels. - */ -static int -ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - static const char module[] = "ZIPEncode"; - ZIPState *sp = EncoderState(tif); - - assert(sp != NULL); - assert(sp->state == ZSTATE_INIT_ENCODE); - - (void) s; - sp->stream.next_in = bp; - assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_in = (uInt) cc; - if ((tmsize_t)sp->stream.avail_in != cc) - { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); - return (0); - } - do { - if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, - "Encoder error: %s", - SAFE_MSG(sp)); - return (0); - } - if (sp->stream.avail_out == 0) { - tif->tif_rawcc = tif->tif_rawdatasize; - TIFFFlushData1(tif); - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in ZIPPreEncode */ - } - } while (sp->stream.avail_in > 0); - return (1); -} - -/* - * Finish off an encoded strip by flushing the last - * string and tacking on an End Of Information code. - */ -static int -ZIPPostEncode(TIFF* tif) -{ - static const char module[] = "ZIPPostEncode"; - ZIPState *sp = EncoderState(tif); - int state; - - sp->stream.avail_in = 0; - do { - state = deflate(&sp->stream, Z_FINISH); - switch (state) { - case Z_STREAM_END: - case Z_OK: - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) - { - tif->tif_rawcc = tif->tif_rawdatasize - sp->stream.avail_out; - TIFFFlushData1(tif); - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in ZIPPreEncode */ - } - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, - "ZLib error: %s", SAFE_MSG(sp)); - return (0); - } - } while (state != Z_STREAM_END); - return (1); -} - -static void -ZIPCleanup(TIFF* tif) -{ - ZIPState* sp = ZState(tif); - - assert(sp != 0); - - (void)TIFFPredictorCleanup(tif); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->state & ZSTATE_INIT_ENCODE) { - deflateEnd(&sp->stream); - sp->state = 0; - } else if( sp->state & ZSTATE_INIT_DECODE) { - inflateEnd(&sp->stream); - sp->state = 0; - } - _TIFFfree(sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int -ZIPVSetField(TIFF* tif, uint32 tag, va_list ap) -{ - static const char module[] = "ZIPVSetField"; - ZIPState* sp = ZState(tif); - - switch (tag) { - case TIFFTAG_ZIPQUALITY: - sp->zipquality = (int) va_arg(ap, int); - if ( sp->state&ZSTATE_INIT_ENCODE ) { - if (deflateParams(&sp->stream, - sp->zipquality, Z_DEFAULT_STRATEGY) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s", - SAFE_MSG(sp)); - return (0); - } - } - return (1); - default: - return (*sp->vsetparent)(tif, tag, ap); - } - /*NOTREACHED*/ -} - -static int -ZIPVGetField(TIFF* tif, uint32 tag, va_list ap) -{ - ZIPState* sp = ZState(tif); - - switch (tag) { - case TIFFTAG_ZIPQUALITY: - *va_arg(ap, int*) = sp->zipquality; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return (1); -} - -static const TIFFField zipFields[] = { - { TIFFTAG_ZIPQUALITY, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "", NULL }, -}; - -int -TIFFInitZIP(TIFF* tif, int scheme) -{ - static const char module[] = "TIFFInitZIP"; - ZIPState* sp; - - assert( (scheme == COMPRESSION_DEFLATE) - || (scheme == COMPRESSION_ADOBE_DEFLATE)); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, zipFields, TIFFArrayCount(zipFields))) { - TIFFErrorExt(tif->tif_clientdata, module, - "Merging Deflate codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8*) _TIFFmalloc(sizeof (ZIPState)); - if (tif->tif_data == NULL) - goto bad; - sp = ZState(tif); - sp->stream.zalloc = NULL; - sp->stream.zfree = NULL; - sp->stream.opaque = NULL; - sp->stream.data_type = Z_BINARY; - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = ZIPVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = ZIPVSetField; /* hook for codec tags */ - - /* Default values for codec-specific fields */ - sp->zipquality = Z_DEFAULT_COMPRESSION; /* default comp. level */ - sp->state = 0; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = ZIPFixupTags; - tif->tif_setupdecode = ZIPSetupDecode; - tif->tif_predecode = ZIPPreDecode; - tif->tif_decoderow = ZIPDecode; - tif->tif_decodestrip = ZIPDecode; - tif->tif_decodetile = ZIPDecode; - tif->tif_setupencode = ZIPSetupEncode; - tif->tif_preencode = ZIPPreEncode; - tif->tif_postencode = ZIPPostEncode; - tif->tif_encoderow = ZIPEncode; - tif->tif_encodestrip = ZIPEncode; - tif->tif_encodetile = ZIPEncode; - tif->tif_cleanup = ZIPCleanup; - /* - * Setup predictor setup. - */ - (void) TIFFPredictorInit(tif); - return (1); -bad: - TIFFErrorExt(tif->tif_clientdata, module, - "No space for ZIP state block"); - return (0); -} -#endif /* ZIP_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tif_zstd.c b/Dependencies/FreeImage/Source/LibTIFF4/tif_zstd.c deleted file mode 100644 index 1e6a1a1..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tif_zstd.c +++ /dev/null @@ -1,442 +0,0 @@ -/* -* Copyright (c) 2017, Planet Labs -* Author: -* -* Permission to use, copy, modify, distribute, and sell this software and -* its documentation for any purpose is hereby granted without fee, provided -* that (i) the above copyright notices and this permission notice appear in -* all copies of the software and related documentation, and (ii) the names of -* Sam Leffler and Silicon Graphics may not be used in any advertising or -* publicity relating to the software without the specific, prior written -* permission of Sam Leffler and Silicon Graphics. -* -* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -* -* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -* OF THIS SOFTWARE. -*/ - -#include "tiffiop.h" -#ifdef ZSTD_SUPPORT -/* -* TIFF Library. -* -* ZSTD Compression Support -* -*/ - -#include "tif_predict.h" -#include "zstd.h" - -#include - -/* -* State block for each open TIFF file using ZSTD compression/decompression. -*/ -typedef struct { - TIFFPredictorState predict; - ZSTD_DStream* dstream; - ZSTD_CStream* cstream; - int compression_level; /* compression level */ - ZSTD_outBuffer out_buffer; - int state; /* state flags */ -#define LSTATE_INIT_DECODE 0x01 -#define LSTATE_INIT_ENCODE 0x02 - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ -} ZSTDState; - -#define LState(tif) ((ZSTDState*) (tif)->tif_data) -#define DecoderState(tif) LState(tif) -#define EncoderState(tif) LState(tif) - -static int ZSTDEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); -static int ZSTDDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s); - -static int -ZSTDFixupTags(TIFF* tif) -{ - (void) tif; - return 1; -} - -static int -ZSTDSetupDecode(TIFF* tif) -{ - ZSTDState* sp = DecoderState(tif); - - assert(sp != NULL); - - /* if we were last encoding, terminate this mode */ - if (sp->state & LSTATE_INIT_ENCODE) { - ZSTD_freeCStream(sp->cstream); - sp->cstream = NULL; - sp->state = 0; - } - - sp->state |= LSTATE_INIT_DECODE; - return 1; -} - -/* -* Setup state for decoding a strip. -*/ -static int -ZSTDPreDecode(TIFF* tif, uint16 s) -{ - static const char module[] = "ZSTDPreDecode"; - ZSTDState* sp = DecoderState(tif); - size_t zstd_ret; - - (void) s; - assert(sp != NULL); - - if( (sp->state & LSTATE_INIT_DECODE) == 0 ) - tif->tif_setupdecode(tif); - - if( sp->dstream ) - { - ZSTD_freeDStream(sp->dstream); - sp->dstream = NULL; - } - - sp->dstream = ZSTD_createDStream(); - if( sp->dstream == NULL ) { - TIFFErrorExt(tif->tif_clientdata, module, - "Cannot allocate decompression stream"); - return 0; - } - zstd_ret = ZSTD_initDStream(sp->dstream); - if( ZSTD_isError(zstd_ret) ) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error in ZSTD_initDStream(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - - return 1; -} - -static int -ZSTDDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) -{ - static const char module[] = "ZSTDDecode"; - ZSTDState* sp = DecoderState(tif); - ZSTD_inBuffer in_buffer; - ZSTD_outBuffer out_buffer; - size_t zstd_ret; - - (void) s; - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_DECODE); - - in_buffer.src = tif->tif_rawcp; - in_buffer.size = (size_t) tif->tif_rawcc; - in_buffer.pos = 0; - - out_buffer.dst = op; - out_buffer.size = (size_t) occ; - out_buffer.pos = 0; - - do { - zstd_ret = ZSTD_decompressStream(sp->dstream, &out_buffer, - &in_buffer); - if( ZSTD_isError(zstd_ret) ) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error in ZSTD_decompressStream(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - } while( zstd_ret != 0 && - in_buffer.pos < in_buffer.size && - out_buffer.pos < out_buffer.size ); - - if (out_buffer.pos < (size_t)occ) { - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at scanline %lu (short %lu bytes)", - (unsigned long) tif->tif_row, - (unsigned long) (size_t)occ - out_buffer.pos); - return 0; - } - - tif->tif_rawcp += in_buffer.pos; - tif->tif_rawcc -= in_buffer.pos; - - return 1; -} - -static int -ZSTDSetupEncode(TIFF* tif) -{ - ZSTDState* sp = EncoderState(tif); - - assert(sp != NULL); - if (sp->state & LSTATE_INIT_DECODE) { - ZSTD_freeDStream(sp->dstream); - sp->dstream = NULL; - sp->state = 0; - } - - sp->state |= LSTATE_INIT_ENCODE; - return 1; -} - -/* -* Reset encoding state at the start of a strip. -*/ -static int -ZSTDPreEncode(TIFF* tif, uint16 s) -{ - static const char module[] = "ZSTDPreEncode"; - ZSTDState *sp = EncoderState(tif); - size_t zstd_ret; - - (void) s; - assert(sp != NULL); - if( sp->state != LSTATE_INIT_ENCODE ) - tif->tif_setupencode(tif); - - if (sp->cstream) { - ZSTD_freeCStream(sp->cstream); - sp->cstream = NULL; - } - sp->cstream = ZSTD_createCStream(); - if( sp->cstream == NULL ) { - TIFFErrorExt(tif->tif_clientdata, module, - "Cannot allocate compression stream"); - return 0; - } - - zstd_ret = ZSTD_initCStream(sp->cstream, sp->compression_level); - if( ZSTD_isError(zstd_ret) ) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error in ZSTD_initCStream(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - - sp->out_buffer.dst = tif->tif_rawdata; - sp->out_buffer.size = (size_t)tif->tif_rawdatasize; - sp->out_buffer.pos = 0; - - return 1; -} - -/* -* Encode a chunk of pixels. -*/ -static int -ZSTDEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - static const char module[] = "ZSTDEncode"; - ZSTDState *sp = EncoderState(tif); - ZSTD_inBuffer in_buffer; - size_t zstd_ret; - - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_ENCODE); - - (void) s; - - in_buffer.src = bp; - in_buffer.size = (size_t)cc; - in_buffer.pos = 0; - - do { - zstd_ret = ZSTD_compressStream(sp->cstream, &sp->out_buffer, - &in_buffer); - if( ZSTD_isError(zstd_ret) ) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error in ZSTD_compressStream(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - if( sp->out_buffer.pos == sp->out_buffer.size ) { - tif->tif_rawcc = tif->tif_rawdatasize; - TIFFFlushData1(tif); - sp->out_buffer.dst = tif->tif_rawcp; - sp->out_buffer.size = (size_t) tif->tif_rawcc; - sp->out_buffer.pos = 0; - } - } while( in_buffer.pos < in_buffer.size ); - - return 1; -} - -/* -* Finish off an encoded strip by flushing it. -*/ -static int -ZSTDPostEncode(TIFF* tif) -{ - static const char module[] = "ZSTDPostEncode"; - ZSTDState *sp = EncoderState(tif); - size_t zstd_ret; - - do { - zstd_ret = ZSTD_endStream(sp->cstream, &sp->out_buffer); - if( ZSTD_isError(zstd_ret) ) { - TIFFErrorExt(tif->tif_clientdata, module, - "Error in ZSTD_endStream(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - if( sp->out_buffer.pos > 0 ) { - tif->tif_rawcc = sp->out_buffer.pos; - TIFFFlushData1(tif); - sp->out_buffer.dst = tif->tif_rawcp; - sp->out_buffer.size = (size_t) tif->tif_rawcc; - sp->out_buffer.pos = 0; - } - } while (zstd_ret != 0); - return 1; -} - -static void -ZSTDCleanup(TIFF* tif) -{ - ZSTDState* sp = LState(tif); - - assert(sp != 0); - - (void)TIFFPredictorCleanup(tif); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->dstream) { - ZSTD_freeDStream(sp->dstream); - sp->dstream = NULL; - } - if (sp->cstream) { - ZSTD_freeCStream(sp->cstream); - sp->cstream = NULL; - } - _TIFFfree(sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int -ZSTDVSetField(TIFF* tif, uint32 tag, va_list ap) -{ - static const char module[] = "ZSTDVSetField"; - ZSTDState* sp = LState(tif); - - switch (tag) { - case TIFFTAG_ZSTD_LEVEL: - sp->compression_level = (int) va_arg(ap, int); - if( sp->compression_level <= 0 || - sp->compression_level > ZSTD_maxCLevel() ) - { - TIFFWarningExt(tif->tif_clientdata, module, - "ZSTD_LEVEL should be between 1 and %d", - ZSTD_maxCLevel()); - } - return 1; - default: - return (*sp->vsetparent)(tif, tag, ap); - } - /*NOTREACHED*/ -} - -static int -ZSTDVGetField(TIFF* tif, uint32 tag, va_list ap) -{ - ZSTDState* sp = LState(tif); - - switch (tag) { - case TIFFTAG_ZSTD_LEVEL: - *va_arg(ap, int*) = sp->compression_level; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return 1; -} - -static const TIFFField ZSTDFields[] = { - { TIFFTAG_ZSTD_LEVEL, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, - TIFF_SETGET_UNDEFINED, - FIELD_PSEUDO, TRUE, FALSE, "ZSTD compression_level", NULL }, -}; - -int -TIFFInitZSTD(TIFF* tif, int scheme) -{ - static const char module[] = "TIFFInitZSTD"; - ZSTDState* sp; - - assert( scheme == COMPRESSION_ZSTD ); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, ZSTDFields, TIFFArrayCount(ZSTDFields))) { - TIFFErrorExt(tif->tif_clientdata, module, - "Merging ZSTD codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8*) _TIFFmalloc(sizeof(ZSTDState)); - if (tif->tif_data == NULL) - goto bad; - sp = LState(tif); - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = ZSTDVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = ZSTDVSetField; /* hook for codec tags */ - - /* Default values for codec-specific fields */ - sp->compression_level = 9; /* default comp. level */ - sp->state = 0; - sp->dstream = 0; - sp->cstream = 0; - sp->out_buffer.dst = NULL; - sp->out_buffer.size = 0; - sp->out_buffer.pos = 0; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = ZSTDFixupTags; - tif->tif_setupdecode = ZSTDSetupDecode; - tif->tif_predecode = ZSTDPreDecode; - tif->tif_decoderow = ZSTDDecode; - tif->tif_decodestrip = ZSTDDecode; - tif->tif_decodetile = ZSTDDecode; - tif->tif_setupencode = ZSTDSetupEncode; - tif->tif_preencode = ZSTDPreEncode; - tif->tif_postencode = ZSTDPostEncode; - tif->tif_encoderow = ZSTDEncode; - tif->tif_encodestrip = ZSTDEncode; - tif->tif_encodetile = ZSTDEncode; - tif->tif_cleanup = ZSTDCleanup; - /* - * Setup predictor setup. - */ - (void) TIFFPredictorInit(tif); - return 1; -bad: - TIFFErrorExt(tif->tif_clientdata, module, - "No space for ZSTD state block"); - return 0; -} -#endif /* ZSTD_SUPPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiff.h b/Dependencies/FreeImage/Source/LibTIFF4/tiff.h deleted file mode 100644 index eee7c44..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiff.h +++ /dev/null @@ -1,681 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFF_ -#define _TIFF_ - -#include "tiffconf.h" - -/* - * Tag Image File Format (TIFF) - * - * Based on Rev 6.0 from: - * Developer's Desk - * Aldus Corporation - * 411 First Ave. South - * Suite 200 - * Seattle, WA 98104 - * 206-622-5500 - * - * (http://partners.adobe.com/asn/developer/PDFS/TN/TIFF6.pdf) - * - * For BigTIFF design notes see the following links - * http://www.remotesensing.org/libtiff/bigtiffdesign.html - * http://www.awaresystems.be/imaging/tiff/bigtiff.html - */ - -#define TIFF_VERSION_CLASSIC 42 -#define TIFF_VERSION_BIG 43 - -#define TIFF_BIGENDIAN 0x4d4d -#define TIFF_LITTLEENDIAN 0x4949 -#define MDI_LITTLEENDIAN 0x5045 -#define MDI_BIGENDIAN 0x4550 - -/* - * Intrinsic data types required by the file format: - * - * 8-bit quantities int8/uint8 - * 16-bit quantities int16/uint16 - * 32-bit quantities int32/uint32 - * 64-bit quantities int64/uint64 - * strings unsigned char* - */ - -typedef TIFF_INT8_T int8; -typedef TIFF_UINT8_T uint8; - -typedef TIFF_INT16_T int16; -typedef TIFF_UINT16_T uint16; - -typedef TIFF_INT32_T int32; -typedef TIFF_UINT32_T uint32; - -typedef TIFF_INT64_T int64; -typedef TIFF_UINT64_T uint64; - -/* - * Some types as promoted in a variable argument list - * We use uint16_vap rather then directly using int, because this way - * we document the type we actually want to pass through, conceptually, - * rather then confusing the issue by merely stating the type it gets - * promoted to - */ - -typedef int uint16_vap; - -/* - * TIFF header. - */ -typedef struct { - uint16 tiff_magic; /* magic number (defines byte order) */ - uint16 tiff_version; /* TIFF version number */ -} TIFFHeaderCommon; -typedef struct { - uint16 tiff_magic; /* magic number (defines byte order) */ - uint16 tiff_version; /* TIFF version number */ - uint32 tiff_diroff; /* byte offset to first directory */ -} TIFFHeaderClassic; -typedef struct { - uint16 tiff_magic; /* magic number (defines byte order) */ - uint16 tiff_version; /* TIFF version number */ - uint16 tiff_offsetsize; /* size of offsets, should be 8 */ - uint16 tiff_unused; /* unused word, should be 0 */ - uint64 tiff_diroff; /* byte offset to first directory */ -} TIFFHeaderBig; - - -/* - * NB: In the comments below, - * - items marked with a + are obsoleted by revision 5.0, - * - items marked with a ! are introduced in revision 6.0. - * - items marked with a % are introduced post revision 6.0. - * - items marked with a $ are obsoleted by revision 6.0. - * - items marked with a & are introduced by Adobe DNG specification. - */ - -/* - * Tag data type information. - * - * Note: RATIONALs are the ratio of two 32-bit integer values. - */ -typedef enum { - TIFF_NOTYPE = 0, /* placeholder */ - TIFF_BYTE = 1, /* 8-bit unsigned integer */ - TIFF_ASCII = 2, /* 8-bit bytes w/ last byte null */ - TIFF_SHORT = 3, /* 16-bit unsigned integer */ - TIFF_LONG = 4, /* 32-bit unsigned integer */ - TIFF_RATIONAL = 5, /* 64-bit unsigned fraction */ - TIFF_SBYTE = 6, /* !8-bit signed integer */ - TIFF_UNDEFINED = 7, /* !8-bit untyped data */ - TIFF_SSHORT = 8, /* !16-bit signed integer */ - TIFF_SLONG = 9, /* !32-bit signed integer */ - TIFF_SRATIONAL = 10, /* !64-bit signed fraction */ - TIFF_FLOAT = 11, /* !32-bit IEEE floating point */ - TIFF_DOUBLE = 12, /* !64-bit IEEE floating point */ - TIFF_IFD = 13, /* %32-bit unsigned integer (offset) */ - TIFF_LONG8 = 16, /* BigTIFF 64-bit unsigned integer */ - TIFF_SLONG8 = 17, /* BigTIFF 64-bit signed integer */ - TIFF_IFD8 = 18 /* BigTIFF 64-bit unsigned integer (offset) */ -} TIFFDataType; - -/* - * TIFF Tag Definitions. - */ -#define TIFFTAG_SUBFILETYPE 254 /* subfile data descriptor */ -#define FILETYPE_REDUCEDIMAGE 0x1 /* reduced resolution version */ -#define FILETYPE_PAGE 0x2 /* one page of many */ -#define FILETYPE_MASK 0x4 /* transparency mask */ -#define TIFFTAG_OSUBFILETYPE 255 /* +kind of data in subfile */ -#define OFILETYPE_IMAGE 1 /* full resolution image data */ -#define OFILETYPE_REDUCEDIMAGE 2 /* reduced size image data */ -#define OFILETYPE_PAGE 3 /* one page of many */ -#define TIFFTAG_IMAGEWIDTH 256 /* image width in pixels */ -#define TIFFTAG_IMAGELENGTH 257 /* image height in pixels */ -#define TIFFTAG_BITSPERSAMPLE 258 /* bits per channel (sample) */ -#define TIFFTAG_COMPRESSION 259 /* data compression technique */ -#define COMPRESSION_NONE 1 /* dump mode */ -#define COMPRESSION_CCITTRLE 2 /* CCITT modified Huffman RLE */ -#define COMPRESSION_CCITTFAX3 3 /* CCITT Group 3 fax encoding */ -#define COMPRESSION_CCITT_T4 3 /* CCITT T.4 (TIFF 6 name) */ -#define COMPRESSION_CCITTFAX4 4 /* CCITT Group 4 fax encoding */ -#define COMPRESSION_CCITT_T6 4 /* CCITT T.6 (TIFF 6 name) */ -#define COMPRESSION_LZW 5 /* Lempel-Ziv & Welch */ -#define COMPRESSION_OJPEG 6 /* !6.0 JPEG */ -#define COMPRESSION_JPEG 7 /* %JPEG DCT compression */ -#define COMPRESSION_T85 9 /* !TIFF/FX T.85 JBIG compression */ -#define COMPRESSION_T43 10 /* !TIFF/FX T.43 colour by layered JBIG compression */ -#define COMPRESSION_NEXT 32766 /* NeXT 2-bit RLE */ -#define COMPRESSION_CCITTRLEW 32771 /* #1 w/ word alignment */ -#define COMPRESSION_PACKBITS 32773 /* Macintosh RLE */ -#define COMPRESSION_THUNDERSCAN 32809 /* ThunderScan RLE */ -/* codes 32895-32898 are reserved for ANSI IT8 TIFF/IT */ -#define COMPRESSION_DCS 32947 /* Kodak DCS encoding */ -#define COMPRESSION_JBIG 34661 /* ISO JBIG */ -#define COMPRESSION_SGILOG 34676 /* SGI Log Luminance RLE */ -#define COMPRESSION_SGILOG24 34677 /* SGI Log 24-bit packed */ -#define COMPRESSION_JP2000 34712 /* Leadtools JPEG2000 */ -#define COMPRESSION_LZMA 34925 /* LZMA2 */ -#define COMPRESSION_ZSTD 34926 /* ZSTD: WARNING not registered in Adobe-maintained registry */ -#define TIFFTAG_PHOTOMETRIC 262 /* photometric interpretation */ -#define PHOTOMETRIC_MINISWHITE 0 /* min value is white */ -#define PHOTOMETRIC_MINISBLACK 1 /* min value is black */ -#define PHOTOMETRIC_RGB 2 /* RGB color model */ -#define PHOTOMETRIC_PALETTE 3 /* color map indexed */ -#define PHOTOMETRIC_MASK 4 /* $holdout mask */ -#define PHOTOMETRIC_SEPARATED 5 /* !color separations */ -#define PHOTOMETRIC_YCBCR 6 /* !CCIR 601 */ -#define PHOTOMETRIC_CIELAB 8 /* !1976 CIE L*a*b* */ -#define PHOTOMETRIC_ICCLAB 9 /* ICC L*a*b* [Adobe TIFF Technote 4] */ -#define PHOTOMETRIC_ITULAB 10 /* ITU L*a*b* */ -#define PHOTOMETRIC_CFA 32803 /* color filter array */ -#define PHOTOMETRIC_LOGL 32844 /* CIE Log2(L) */ -#define PHOTOMETRIC_LOGLUV 32845 /* CIE Log2(L) (u',v') */ -#define TIFFTAG_THRESHHOLDING 263 /* +thresholding used on data */ -#define THRESHHOLD_BILEVEL 1 /* b&w art scan */ -#define THRESHHOLD_HALFTONE 2 /* or dithered scan */ -#define THRESHHOLD_ERRORDIFFUSE 3 /* usually floyd-steinberg */ -#define TIFFTAG_CELLWIDTH 264 /* +dithering matrix width */ -#define TIFFTAG_CELLLENGTH 265 /* +dithering matrix height */ -#define TIFFTAG_FILLORDER 266 /* data order within a byte */ -#define FILLORDER_MSB2LSB 1 /* most significant -> least */ -#define FILLORDER_LSB2MSB 2 /* least significant -> most */ -#define TIFFTAG_DOCUMENTNAME 269 /* name of doc. image is from */ -#define TIFFTAG_IMAGEDESCRIPTION 270 /* info about image */ -#define TIFFTAG_MAKE 271 /* scanner manufacturer name */ -#define TIFFTAG_MODEL 272 /* scanner model name/number */ -#define TIFFTAG_STRIPOFFSETS 273 /* offsets to data strips */ -#define TIFFTAG_ORIENTATION 274 /* +image orientation */ -#define ORIENTATION_TOPLEFT 1 /* row 0 top, col 0 lhs */ -#define ORIENTATION_TOPRIGHT 2 /* row 0 top, col 0 rhs */ -#define ORIENTATION_BOTRIGHT 3 /* row 0 bottom, col 0 rhs */ -#define ORIENTATION_BOTLEFT 4 /* row 0 bottom, col 0 lhs */ -#define ORIENTATION_LEFTTOP 5 /* row 0 lhs, col 0 top */ -#define ORIENTATION_RIGHTTOP 6 /* row 0 rhs, col 0 top */ -#define ORIENTATION_RIGHTBOT 7 /* row 0 rhs, col 0 bottom */ -#define ORIENTATION_LEFTBOT 8 /* row 0 lhs, col 0 bottom */ -#define TIFFTAG_SAMPLESPERPIXEL 277 /* samples per pixel */ -#define TIFFTAG_ROWSPERSTRIP 278 /* rows per strip of data */ -#define TIFFTAG_STRIPBYTECOUNTS 279 /* bytes counts for strips */ -#define TIFFTAG_MINSAMPLEVALUE 280 /* +minimum sample value */ -#define TIFFTAG_MAXSAMPLEVALUE 281 /* +maximum sample value */ -#define TIFFTAG_XRESOLUTION 282 /* pixels/resolution in x */ -#define TIFFTAG_YRESOLUTION 283 /* pixels/resolution in y */ -#define TIFFTAG_PLANARCONFIG 284 /* storage organization */ -#define PLANARCONFIG_CONTIG 1 /* single image plane */ -#define PLANARCONFIG_SEPARATE 2 /* separate planes of data */ -#define TIFFTAG_PAGENAME 285 /* page name image is from */ -#define TIFFTAG_XPOSITION 286 /* x page offset of image lhs */ -#define TIFFTAG_YPOSITION 287 /* y page offset of image lhs */ -#define TIFFTAG_FREEOFFSETS 288 /* +byte offset to free block */ -#define TIFFTAG_FREEBYTECOUNTS 289 /* +sizes of free blocks */ -#define TIFFTAG_GRAYRESPONSEUNIT 290 /* $gray scale curve accuracy */ -#define GRAYRESPONSEUNIT_10S 1 /* tenths of a unit */ -#define GRAYRESPONSEUNIT_100S 2 /* hundredths of a unit */ -#define GRAYRESPONSEUNIT_1000S 3 /* thousandths of a unit */ -#define GRAYRESPONSEUNIT_10000S 4 /* ten-thousandths of a unit */ -#define GRAYRESPONSEUNIT_100000S 5 /* hundred-thousandths */ -#define TIFFTAG_GRAYRESPONSECURVE 291 /* $gray scale response curve */ -#define TIFFTAG_GROUP3OPTIONS 292 /* 32 flag bits */ -#define TIFFTAG_T4OPTIONS 292 /* TIFF 6.0 proper name alias */ -#define GROUP3OPT_2DENCODING 0x1 /* 2-dimensional coding */ -#define GROUP3OPT_UNCOMPRESSED 0x2 /* data not compressed */ -#define GROUP3OPT_FILLBITS 0x4 /* fill to byte boundary */ -#define TIFFTAG_GROUP4OPTIONS 293 /* 32 flag bits */ -#define TIFFTAG_T6OPTIONS 293 /* TIFF 6.0 proper name */ -#define GROUP4OPT_UNCOMPRESSED 0x2 /* data not compressed */ -#define TIFFTAG_RESOLUTIONUNIT 296 /* units of resolutions */ -#define RESUNIT_NONE 1 /* no meaningful units */ -#define RESUNIT_INCH 2 /* english */ -#define RESUNIT_CENTIMETER 3 /* metric */ -#define TIFFTAG_PAGENUMBER 297 /* page numbers of multi-page */ -#define TIFFTAG_COLORRESPONSEUNIT 300 /* $color curve accuracy */ -#define COLORRESPONSEUNIT_10S 1 /* tenths of a unit */ -#define COLORRESPONSEUNIT_100S 2 /* hundredths of a unit */ -#define COLORRESPONSEUNIT_1000S 3 /* thousandths of a unit */ -#define COLORRESPONSEUNIT_10000S 4 /* ten-thousandths of a unit */ -#define COLORRESPONSEUNIT_100000S 5 /* hundred-thousandths */ -#define TIFFTAG_TRANSFERFUNCTION 301 /* !colorimetry info */ -#define TIFFTAG_SOFTWARE 305 /* name & release */ -#define TIFFTAG_DATETIME 306 /* creation date and time */ -#define TIFFTAG_ARTIST 315 /* creator of image */ -#define TIFFTAG_HOSTCOMPUTER 316 /* machine where created */ -#define TIFFTAG_PREDICTOR 317 /* prediction scheme w/ LZW */ -#define PREDICTOR_NONE 1 /* no prediction scheme used */ -#define PREDICTOR_HORIZONTAL 2 /* horizontal differencing */ -#define PREDICTOR_FLOATINGPOINT 3 /* floating point predictor */ -#define TIFFTAG_WHITEPOINT 318 /* image white point */ -#define TIFFTAG_PRIMARYCHROMATICITIES 319 /* !primary chromaticities */ -#define TIFFTAG_COLORMAP 320 /* RGB map for palette image */ -#define TIFFTAG_HALFTONEHINTS 321 /* !highlight+shadow info */ -#define TIFFTAG_TILEWIDTH 322 /* !tile width in pixels */ -#define TIFFTAG_TILELENGTH 323 /* !tile height in pixels */ -#define TIFFTAG_TILEOFFSETS 324 /* !offsets to data tiles */ -#define TIFFTAG_TILEBYTECOUNTS 325 /* !byte counts for tiles */ -#define TIFFTAG_BADFAXLINES 326 /* lines w/ wrong pixel count */ -#define TIFFTAG_CLEANFAXDATA 327 /* regenerated line info */ -#define CLEANFAXDATA_CLEAN 0 /* no errors detected */ -#define CLEANFAXDATA_REGENERATED 1 /* receiver regenerated lines */ -#define CLEANFAXDATA_UNCLEAN 2 /* uncorrected errors exist */ -#define TIFFTAG_CONSECUTIVEBADFAXLINES 328 /* max consecutive bad lines */ -#define TIFFTAG_SUBIFD 330 /* subimage descriptors */ -#define TIFFTAG_INKSET 332 /* !inks in separated image */ -#define INKSET_CMYK 1 /* !cyan-magenta-yellow-black color */ -#define INKSET_MULTIINK 2 /* !multi-ink or hi-fi color */ -#define TIFFTAG_INKNAMES 333 /* !ascii names of inks */ -#define TIFFTAG_NUMBEROFINKS 334 /* !number of inks */ -#define TIFFTAG_DOTRANGE 336 /* !0% and 100% dot codes */ -#define TIFFTAG_TARGETPRINTER 337 /* !separation target */ -#define TIFFTAG_EXTRASAMPLES 338 /* !info about extra samples */ -#define EXTRASAMPLE_UNSPECIFIED 0 /* !unspecified data */ -#define EXTRASAMPLE_ASSOCALPHA 1 /* !associated alpha data */ -#define EXTRASAMPLE_UNASSALPHA 2 /* !unassociated alpha data */ -#define TIFFTAG_SAMPLEFORMAT 339 /* !data sample format */ -#define SAMPLEFORMAT_UINT 1 /* !unsigned integer data */ -#define SAMPLEFORMAT_INT 2 /* !signed integer data */ -#define SAMPLEFORMAT_IEEEFP 3 /* !IEEE floating point data */ -#define SAMPLEFORMAT_VOID 4 /* !untyped data */ -#define SAMPLEFORMAT_COMPLEXINT 5 /* !complex signed int */ -#define SAMPLEFORMAT_COMPLEXIEEEFP 6 /* !complex ieee floating */ -#define TIFFTAG_SMINSAMPLEVALUE 340 /* !variable MinSampleValue */ -#define TIFFTAG_SMAXSAMPLEVALUE 341 /* !variable MaxSampleValue */ -#define TIFFTAG_CLIPPATH 343 /* %ClipPath - [Adobe TIFF technote 2] */ -#define TIFFTAG_XCLIPPATHUNITS 344 /* %XClipPathUnits - [Adobe TIFF technote 2] */ -#define TIFFTAG_YCLIPPATHUNITS 345 /* %YClipPathUnits - [Adobe TIFF technote 2] */ -#define TIFFTAG_INDEXED 346 /* %Indexed - [Adobe TIFF Technote 3] */ -#define TIFFTAG_JPEGTABLES 347 /* %JPEG table stream */ -#define TIFFTAG_OPIPROXY 351 /* %OPI Proxy [Adobe TIFF technote] */ -/* Tags 400-435 are from the TIFF/FX spec */ -#define TIFFTAG_GLOBALPARAMETERSIFD 400 /* ! */ -#define TIFFTAG_PROFILETYPE 401 /* ! */ -#define PROFILETYPE_UNSPECIFIED 0 /* ! */ -#define PROFILETYPE_G3_FAX 1 /* ! */ -#define TIFFTAG_FAXPROFILE 402 /* ! */ -#define FAXPROFILE_S 1 /* !TIFF/FX FAX profile S */ -#define FAXPROFILE_F 2 /* !TIFF/FX FAX profile F */ -#define FAXPROFILE_J 3 /* !TIFF/FX FAX profile J */ -#define FAXPROFILE_C 4 /* !TIFF/FX FAX profile C */ -#define FAXPROFILE_L 5 /* !TIFF/FX FAX profile L */ -#define FAXPROFILE_M 6 /* !TIFF/FX FAX profile LM */ -#define TIFFTAG_CODINGMETHODS 403 /* !TIFF/FX coding methods */ -#define CODINGMETHODS_T4_1D (1 << 1) /* !T.4 1D */ -#define CODINGMETHODS_T4_2D (1 << 2) /* !T.4 2D */ -#define CODINGMETHODS_T6 (1 << 3) /* !T.6 */ -#define CODINGMETHODS_T85 (1 << 4) /* !T.85 JBIG */ -#define CODINGMETHODS_T42 (1 << 5) /* !T.42 JPEG */ -#define CODINGMETHODS_T43 (1 << 6) /* !T.43 colour by layered JBIG */ -#define TIFFTAG_VERSIONYEAR 404 /* !TIFF/FX version year */ -#define TIFFTAG_MODENUMBER 405 /* !TIFF/FX mode number */ -#define TIFFTAG_DECODE 433 /* !TIFF/FX decode */ -#define TIFFTAG_IMAGEBASECOLOR 434 /* !TIFF/FX image base colour */ -#define TIFFTAG_T82OPTIONS 435 /* !TIFF/FX T.82 options */ -/* - * Tags 512-521 are obsoleted by Technical Note #2 which specifies a - * revised JPEG-in-TIFF scheme. - */ -#define TIFFTAG_JPEGPROC 512 /* !JPEG processing algorithm */ -#define JPEGPROC_BASELINE 1 /* !baseline sequential */ -#define JPEGPROC_LOSSLESS 14 /* !Huffman coded lossless */ -#define TIFFTAG_JPEGIFOFFSET 513 /* !pointer to SOI marker */ -#define TIFFTAG_JPEGIFBYTECOUNT 514 /* !JFIF stream length */ -#define TIFFTAG_JPEGRESTARTINTERVAL 515 /* !restart interval length */ -#define TIFFTAG_JPEGLOSSLESSPREDICTORS 517 /* !lossless proc predictor */ -#define TIFFTAG_JPEGPOINTTRANSFORM 518 /* !lossless point transform */ -#define TIFFTAG_JPEGQTABLES 519 /* !Q matrix offsets */ -#define TIFFTAG_JPEGDCTABLES 520 /* !DCT table offsets */ -#define TIFFTAG_JPEGACTABLES 521 /* !AC coefficient offsets */ -#define TIFFTAG_YCBCRCOEFFICIENTS 529 /* !RGB -> YCbCr transform */ -#define TIFFTAG_YCBCRSUBSAMPLING 530 /* !YCbCr subsampling factors */ -#define TIFFTAG_YCBCRPOSITIONING 531 /* !subsample positioning */ -#define YCBCRPOSITION_CENTERED 1 /* !as in PostScript Level 2 */ -#define YCBCRPOSITION_COSITED 2 /* !as in CCIR 601-1 */ -#define TIFFTAG_REFERENCEBLACKWHITE 532 /* !colorimetry info */ -#define TIFFTAG_STRIPROWCOUNTS 559 /* !TIFF/FX strip row counts */ -#define TIFFTAG_XMLPACKET 700 /* %XML packet - [Adobe XMP Specification, - January 2004 */ -#define TIFFTAG_OPIIMAGEID 32781 /* %OPI ImageID - [Adobe TIFF technote] */ -/* tags 32952-32956 are private tags registered to Island Graphics */ -#define TIFFTAG_REFPTS 32953 /* image reference points */ -#define TIFFTAG_REGIONTACKPOINT 32954 /* region-xform tack point */ -#define TIFFTAG_REGIONWARPCORNERS 32955 /* warp quadrilateral */ -#define TIFFTAG_REGIONAFFINE 32956 /* affine transformation mat */ -/* tags 32995-32999 are private tags registered to SGI */ -#define TIFFTAG_MATTEING 32995 /* $use ExtraSamples */ -#define TIFFTAG_DATATYPE 32996 /* $use SampleFormat */ -#define TIFFTAG_IMAGEDEPTH 32997 /* z depth of image */ -#define TIFFTAG_TILEDEPTH 32998 /* z depth/data tile */ -/* tags 33300-33309 are private tags registered to Pixar */ -/* - * TIFFTAG_PIXAR_IMAGEFULLWIDTH and TIFFTAG_PIXAR_IMAGEFULLLENGTH - * are set when an image has been cropped out of a larger image. - * They reflect the size of the original uncropped image. - * The TIFFTAG_XPOSITION and TIFFTAG_YPOSITION can be used - * to determine the position of the smaller image in the larger one. - */ -#define TIFFTAG_PIXAR_IMAGEFULLWIDTH 33300 /* full image size in x */ -#define TIFFTAG_PIXAR_IMAGEFULLLENGTH 33301 /* full image size in y */ - /* Tags 33302-33306 are used to identify special image modes and data - * used by Pixar's texture formats. - */ -#define TIFFTAG_PIXAR_TEXTUREFORMAT 33302 /* texture map format */ -#define TIFFTAG_PIXAR_WRAPMODES 33303 /* s & t wrap modes */ -#define TIFFTAG_PIXAR_FOVCOT 33304 /* cotan(fov) for env. maps */ -#define TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 33305 -#define TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 33306 -/* tag 33405 is a private tag registered to Eastman Kodak */ -#define TIFFTAG_WRITERSERIALNUMBER 33405 /* device serial number */ -#define TIFFTAG_CFAREPEATPATTERNDIM 33421 /* dimensions of CFA pattern */ -#define TIFFTAG_CFAPATTERN 33422 /* color filter array pattern */ -/* tag 33432 is listed in the 6.0 spec w/ unknown ownership */ -#define TIFFTAG_COPYRIGHT 33432 /* copyright string */ -/* IPTC TAG from RichTIFF specifications */ -#define TIFFTAG_RICHTIFFIPTC 33723 -/* 34016-34029 are reserved for ANSI IT8 TIFF/IT */ -#define TIFFTAG_STONITS 37439 /* Sample value to Nits */ -/* tag 34929 is a private tag registered to FedEx */ -#define TIFFTAG_FEDEX_EDR 34929 /* unknown use */ -#define TIFFTAG_INTEROPERABILITYIFD 40965 /* Pointer to Interoperability private directory */ -/* Adobe Digital Negative (DNG) format tags */ -#define TIFFTAG_DNGVERSION 50706 /* &DNG version number */ -#define TIFFTAG_DNGBACKWARDVERSION 50707 /* &DNG compatibility version */ -#define TIFFTAG_UNIQUECAMERAMODEL 50708 /* &name for the camera model */ -#define TIFFTAG_LOCALIZEDCAMERAMODEL 50709 /* &localized camera model - name */ -#define TIFFTAG_CFAPLANECOLOR 50710 /* &CFAPattern->LinearRaw space - mapping */ -#define TIFFTAG_CFALAYOUT 50711 /* &spatial layout of the CFA */ -#define TIFFTAG_LINEARIZATIONTABLE 50712 /* &lookup table description */ -#define TIFFTAG_BLACKLEVELREPEATDIM 50713 /* &repeat pattern size for - the BlackLevel tag */ -#define TIFFTAG_BLACKLEVEL 50714 /* &zero light encoding level */ -#define TIFFTAG_BLACKLEVELDELTAH 50715 /* &zero light encoding level - differences (columns) */ -#define TIFFTAG_BLACKLEVELDELTAV 50716 /* &zero light encoding level - differences (rows) */ -#define TIFFTAG_WHITELEVEL 50717 /* &fully saturated encoding - level */ -#define TIFFTAG_DEFAULTSCALE 50718 /* &default scale factors */ -#define TIFFTAG_DEFAULTCROPORIGIN 50719 /* &origin of the final image - area */ -#define TIFFTAG_DEFAULTCROPSIZE 50720 /* &size of the final image - area */ -#define TIFFTAG_COLORMATRIX1 50721 /* &XYZ->reference color space - transformation matrix 1 */ -#define TIFFTAG_COLORMATRIX2 50722 /* &XYZ->reference color space - transformation matrix 2 */ -#define TIFFTAG_CAMERACALIBRATION1 50723 /* &calibration matrix 1 */ -#define TIFFTAG_CAMERACALIBRATION2 50724 /* &calibration matrix 2 */ -#define TIFFTAG_REDUCTIONMATRIX1 50725 /* &dimensionality reduction - matrix 1 */ -#define TIFFTAG_REDUCTIONMATRIX2 50726 /* &dimensionality reduction - matrix 2 */ -#define TIFFTAG_ANALOGBALANCE 50727 /* &gain applied the stored raw - values*/ -#define TIFFTAG_ASSHOTNEUTRAL 50728 /* &selected white balance in - linear reference space */ -#define TIFFTAG_ASSHOTWHITEXY 50729 /* &selected white balance in - x-y chromaticity - coordinates */ -#define TIFFTAG_BASELINEEXPOSURE 50730 /* &how much to move the zero - point */ -#define TIFFTAG_BASELINENOISE 50731 /* &relative noise level */ -#define TIFFTAG_BASELINESHARPNESS 50732 /* &relative amount of - sharpening */ -#define TIFFTAG_BAYERGREENSPLIT 50733 /* &how closely the values of - the green pixels in the - blue/green rows track the - values of the green pixels - in the red/green rows */ -#define TIFFTAG_LINEARRESPONSELIMIT 50734 /* &non-linear encoding range */ -#define TIFFTAG_CAMERASERIALNUMBER 50735 /* &camera's serial number */ -#define TIFFTAG_LENSINFO 50736 /* info about the lens */ -#define TIFFTAG_CHROMABLURRADIUS 50737 /* &chroma blur radius */ -#define TIFFTAG_ANTIALIASSTRENGTH 50738 /* &relative strength of the - camera's anti-alias filter */ -#define TIFFTAG_SHADOWSCALE 50739 /* &used by Adobe Camera Raw */ -#define TIFFTAG_DNGPRIVATEDATA 50740 /* &manufacturer's private data */ -#define TIFFTAG_MAKERNOTESAFETY 50741 /* &whether the EXIF MakerNote - tag is safe to preserve - along with the rest of the - EXIF data */ -#define TIFFTAG_CALIBRATIONILLUMINANT1 50778 /* &illuminant 1 */ -#define TIFFTAG_CALIBRATIONILLUMINANT2 50779 /* &illuminant 2 */ -#define TIFFTAG_BESTQUALITYSCALE 50780 /* &best quality multiplier */ -#define TIFFTAG_RAWDATAUNIQUEID 50781 /* &unique identifier for - the raw image data */ -#define TIFFTAG_ORIGINALRAWFILENAME 50827 /* &file name of the original - raw file */ -#define TIFFTAG_ORIGINALRAWFILEDATA 50828 /* &contents of the original - raw file */ -#define TIFFTAG_ACTIVEAREA 50829 /* &active (non-masked) pixels - of the sensor */ -#define TIFFTAG_MASKEDAREAS 50830 /* &list of coordinates - of fully masked pixels */ -#define TIFFTAG_ASSHOTICCPROFILE 50831 /* &these two tags used to */ -#define TIFFTAG_ASSHOTPREPROFILEMATRIX 50832 /* map cameras's color space - into ICC profile space */ -#define TIFFTAG_CURRENTICCPROFILE 50833 /* & */ -#define TIFFTAG_CURRENTPREPROFILEMATRIX 50834 /* & */ -/* tag 65535 is an undefined tag used by Eastman Kodak */ -#define TIFFTAG_DCSHUESHIFTVALUES 65535 /* hue shift correction data */ - -/* - * The following are ``pseudo tags'' that can be used to control - * codec-specific functionality. These tags are not written to file. - * Note that these values start at 0xffff+1 so that they'll never - * collide with Aldus-assigned tags. - * - * If you want your private pseudo tags ``registered'' (i.e. added to - * this file), please post a bug report via the tracking system at - * http://www.remotesensing.org/libtiff/bugs.html with the appropriate - * C definitions to add. - */ -#define TIFFTAG_FAXMODE 65536 /* Group 3/4 format control */ -#define FAXMODE_CLASSIC 0x0000 /* default, include RTC */ -#define FAXMODE_NORTC 0x0001 /* no RTC at end of data */ -#define FAXMODE_NOEOL 0x0002 /* no EOL code at end of row */ -#define FAXMODE_BYTEALIGN 0x0004 /* byte align row */ -#define FAXMODE_WORDALIGN 0x0008 /* word align row */ -#define FAXMODE_CLASSF FAXMODE_NORTC /* TIFF Class F */ -#define TIFFTAG_JPEGQUALITY 65537 /* Compression quality level */ -/* Note: quality level is on the IJG 0-100 scale. Default value is 75 */ -#define TIFFTAG_JPEGCOLORMODE 65538 /* Auto RGB<=>YCbCr convert? */ -#define JPEGCOLORMODE_RAW 0x0000 /* no conversion (default) */ -#define JPEGCOLORMODE_RGB 0x0001 /* do auto conversion */ -#define TIFFTAG_JPEGTABLESMODE 65539 /* What to put in JPEGTables */ -#define JPEGTABLESMODE_QUANT 0x0001 /* include quantization tbls */ -#define JPEGTABLESMODE_HUFF 0x0002 /* include Huffman tbls */ -/* Note: default is JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF */ -#define TIFFTAG_FAXFILLFUNC 65540 /* G3/G4 fill function */ -#define TIFFTAG_PIXARLOGDATAFMT 65549 /* PixarLogCodec I/O data sz */ -#define PIXARLOGDATAFMT_8BIT 0 /* regular u_char samples */ -#define PIXARLOGDATAFMT_8BITABGR 1 /* ABGR-order u_chars */ -#define PIXARLOGDATAFMT_11BITLOG 2 /* 11-bit log-encoded (raw) */ -#define PIXARLOGDATAFMT_12BITPICIO 3 /* as per PICIO (1.0==2048) */ -#define PIXARLOGDATAFMT_16BIT 4 /* signed short samples */ -#define PIXARLOGDATAFMT_FLOAT 5 /* IEEE float samples */ -/* 65550-65556 are allocated to Oceana Matrix */ -#define TIFFTAG_DCSIMAGERTYPE 65550 /* imager model & filter */ -#define DCSIMAGERMODEL_M3 0 /* M3 chip (1280 x 1024) */ -#define DCSIMAGERMODEL_M5 1 /* M5 chip (1536 x 1024) */ -#define DCSIMAGERMODEL_M6 2 /* M6 chip (3072 x 2048) */ -#define DCSIMAGERFILTER_IR 0 /* infrared filter */ -#define DCSIMAGERFILTER_MONO 1 /* monochrome filter */ -#define DCSIMAGERFILTER_CFA 2 /* color filter array */ -#define DCSIMAGERFILTER_OTHER 3 /* other filter */ -#define TIFFTAG_DCSINTERPMODE 65551 /* interpolation mode */ -#define DCSINTERPMODE_NORMAL 0x0 /* whole image, default */ -#define DCSINTERPMODE_PREVIEW 0x1 /* preview of image (384x256) */ -#define TIFFTAG_DCSBALANCEARRAY 65552 /* color balance values */ -#define TIFFTAG_DCSCORRECTMATRIX 65553 /* color correction values */ -#define TIFFTAG_DCSGAMMA 65554 /* gamma value */ -#define TIFFTAG_DCSTOESHOULDERPTS 65555 /* toe & shoulder points */ -#define TIFFTAG_DCSCALIBRATIONFD 65556 /* calibration file desc */ -/* Note: quality level is on the ZLIB 1-9 scale. Default value is -1 */ -#define TIFFTAG_ZIPQUALITY 65557 /* compression quality level */ -#define TIFFTAG_PIXARLOGQUALITY 65558 /* PixarLog uses same scale */ -/* 65559 is allocated to Oceana Matrix */ -#define TIFFTAG_DCSCLIPRECTANGLE 65559 /* area of image to acquire */ -#define TIFFTAG_SGILOGDATAFMT 65560 /* SGILog user data format */ -#define SGILOGDATAFMT_FLOAT 0 /* IEEE float samples */ -#define SGILOGDATAFMT_16BIT 1 /* 16-bit samples */ -#define SGILOGDATAFMT_RAW 2 /* uninterpreted data */ -#define SGILOGDATAFMT_8BIT 3 /* 8-bit RGB monitor values */ -#define TIFFTAG_SGILOGENCODE 65561 /* SGILog data encoding control*/ -#define SGILOGENCODE_NODITHER 0 /* do not dither encoded values*/ -#define SGILOGENCODE_RANDITHER 1 /* randomly dither encd values */ -#define TIFFTAG_LZMAPRESET 65562 /* LZMA2 preset (compression level) */ -#define TIFFTAG_PERSAMPLE 65563 /* interface for per sample tags */ -#define PERSAMPLE_MERGED 0 /* present as a single value */ -#define PERSAMPLE_MULTI 1 /* present as multiple values */ -#define TIFFTAG_ZSTD_LEVEL 65564 /* ZSTD compression level */ - -/* - * EXIF tags - */ -#define EXIFTAG_EXPOSURETIME 33434 /* Exposure time */ -#define EXIFTAG_FNUMBER 33437 /* F number */ -#define EXIFTAG_EXPOSUREPROGRAM 34850 /* Exposure program */ -#define EXIFTAG_SPECTRALSENSITIVITY 34852 /* Spectral sensitivity */ -#define EXIFTAG_ISOSPEEDRATINGS 34855 /* ISO speed rating */ -#define EXIFTAG_OECF 34856 /* Optoelectric conversion - factor */ -#define EXIFTAG_EXIFVERSION 36864 /* Exif version */ -#define EXIFTAG_DATETIMEORIGINAL 36867 /* Date and time of original - data generation */ -#define EXIFTAG_DATETIMEDIGITIZED 36868 /* Date and time of digital - data generation */ -#define EXIFTAG_COMPONENTSCONFIGURATION 37121 /* Meaning of each component */ -#define EXIFTAG_COMPRESSEDBITSPERPIXEL 37122 /* Image compression mode */ -#define EXIFTAG_SHUTTERSPEEDVALUE 37377 /* Shutter speed */ -#define EXIFTAG_APERTUREVALUE 37378 /* Aperture */ -#define EXIFTAG_BRIGHTNESSVALUE 37379 /* Brightness */ -#define EXIFTAG_EXPOSUREBIASVALUE 37380 /* Exposure bias */ -#define EXIFTAG_MAXAPERTUREVALUE 37381 /* Maximum lens aperture */ -#define EXIFTAG_SUBJECTDISTANCE 37382 /* Subject distance */ -#define EXIFTAG_METERINGMODE 37383 /* Metering mode */ -#define EXIFTAG_LIGHTSOURCE 37384 /* Light source */ -#define EXIFTAG_FLASH 37385 /* Flash */ -#define EXIFTAG_FOCALLENGTH 37386 /* Lens focal length */ -#define EXIFTAG_SUBJECTAREA 37396 /* Subject area */ -#define EXIFTAG_MAKERNOTE 37500 /* Manufacturer notes */ -#define EXIFTAG_USERCOMMENT 37510 /* User comments */ -#define EXIFTAG_SUBSECTIME 37520 /* DateTime subseconds */ -#define EXIFTAG_SUBSECTIMEORIGINAL 37521 /* DateTimeOriginal subseconds */ -#define EXIFTAG_SUBSECTIMEDIGITIZED 37522 /* DateTimeDigitized subseconds */ -#define EXIFTAG_FLASHPIXVERSION 40960 /* Supported Flashpix version */ -#define EXIFTAG_COLORSPACE 40961 /* Color space information */ -#define EXIFTAG_PIXELXDIMENSION 40962 /* Valid image width */ -#define EXIFTAG_PIXELYDIMENSION 40963 /* Valid image height */ -#define EXIFTAG_RELATEDSOUNDFILE 40964 /* Related audio file */ -#define EXIFTAG_FLASHENERGY 41483 /* Flash energy */ -#define EXIFTAG_SPATIALFREQUENCYRESPONSE 41484 /* Spatial frequency response */ -#define EXIFTAG_FOCALPLANEXRESOLUTION 41486 /* Focal plane X resolution */ -#define EXIFTAG_FOCALPLANEYRESOLUTION 41487 /* Focal plane Y resolution */ -#define EXIFTAG_FOCALPLANERESOLUTIONUNIT 41488 /* Focal plane resolution unit */ -#define EXIFTAG_SUBJECTLOCATION 41492 /* Subject location */ -#define EXIFTAG_EXPOSUREINDEX 41493 /* Exposure index */ -#define EXIFTAG_SENSINGMETHOD 41495 /* Sensing method */ -#define EXIFTAG_FILESOURCE 41728 /* File source */ -#define EXIFTAG_SCENETYPE 41729 /* Scene type */ -#define EXIFTAG_CFAPATTERN 41730 /* CFA pattern */ -#define EXIFTAG_CUSTOMRENDERED 41985 /* Custom image processing */ -#define EXIFTAG_EXPOSUREMODE 41986 /* Exposure mode */ -#define EXIFTAG_WHITEBALANCE 41987 /* White balance */ -#define EXIFTAG_DIGITALZOOMRATIO 41988 /* Digital zoom ratio */ -#define EXIFTAG_FOCALLENGTHIN35MMFILM 41989 /* Focal length in 35 mm film */ -#define EXIFTAG_SCENECAPTURETYPE 41990 /* Scene capture type */ -#define EXIFTAG_GAINCONTROL 41991 /* Gain control */ -#define EXIFTAG_CONTRAST 41992 /* Contrast */ -#define EXIFTAG_SATURATION 41993 /* Saturation */ -#define EXIFTAG_SHARPNESS 41994 /* Sharpness */ -#define EXIFTAG_DEVICESETTINGDESCRIPTION 41995 /* Device settings description */ -#define EXIFTAG_SUBJECTDISTANCERANGE 41996 /* Subject distance range */ -#define EXIFTAG_GAINCONTROL 41991 /* Gain control */ -#define EXIFTAG_GAINCONTROL 41991 /* Gain control */ -#define EXIFTAG_IMAGEUNIQUEID 42016 /* Unique image ID */ - -#endif /* _TIFF_ */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h b/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h deleted file mode 100644 index e2b7375..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - Configuration defines for installed libtiff. - This file maintained for backward compatibility. Do not use definitions - from this file in your programs. -*/ - -#ifndef _TIFFCONF_ -#define _TIFFCONF_ - -/* The size of a `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of a `long', as computed by sizeof. */ -#include -#if (LONG_MAX == +9223372036854775807L) -#define SIZEOF_LONG 8 -#define SIZEOF_UNSIGNED_LONG 8 -#elif (LONG_MAX == +2147483647) -#define SIZEOF_LONG 4 -#define SIZEOF_UNSIGNED_LONG 4 -#else -#error "Cannot detect SIZEOF_LONG" -#endif - -/* Signed 8-bit type */ -#define TIFF_INT8_T signed char - -/* Unsigned 8-bit type */ -#define TIFF_UINT8_T unsigned char - -/* Signed 16-bit type */ -#define TIFF_INT16_T signed short - -/* Unsigned 16-bit type */ -#define TIFF_UINT16_T unsigned short - -/* Signed 32-bit type */ -#define TIFF_INT32_T signed int - -/* Unsigned 32-bit type */ -#define TIFF_UINT32_T unsigned int - -/* Signed / Unsigned 64-bit type */ -#ifdef _MSC_VER -#define TIFF_INT64_T signed __int64 -#define TIFF_UINT64_T unsigned __int64 -#else -#include -#define TIFF_INT64_T int64_t -#define TIFF_UINT64_T uint64_t -#endif // _MSC_VER - -/* Signed 64-bit type */ -#if defined(_WIN64) -#define TIFF_SSIZE_T signed __int64 -#else -#define TIFF_SSIZE_T signed long -#endif - -/* Pointer difference type */ -#define TIFF_PTRDIFF_T ptrdiff_t - -/* Compatibility stuff. */ - -/* Define as 0 or 1 according to the floating point format suported by the - machine */ -#define HAVE_IEEEFP 1 - -/* ------------------------------------------------------------------------ -Byte order ------------------------------------------------------------------------ -*/ - -/* -Define WORDS_BIGENDIAN to 1 if your processor stores words with the most -significant byte first (like Motorola and SPARC, unlike Intel). -Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined -If your big endian system isn't being detected, add an OS specific check -*/ -#if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || \ - (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || \ - defined(__BIG_ENDIAN__) -/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ -#define HOST_FILLORDER FILLORDER_MSB2LSB -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel) */ -#define WORDS_BIGENDIAN 1 -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel) */ -#define HOST_BIGENDIAN 1 -#else -/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ -#define HOST_FILLORDER FILLORDER_LSB2MSB -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel) */ -#undef WORDS_BIGENDIAN -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel) */ -#undef HOST_BIGENDIAN -#endif // BYTE_ORDER - -/* Support CCITT Group 3 & 4 algorithms */ -#define CCITT_SUPPORT 1 - -/* Support JPEG compression (requires IJG JPEG library) */ -#define JPEG_SUPPORT 1 - -/* Support JBIG compression (requires JBIG-KIT library) */ -/* #undef JBIG_SUPPORT */ - -/* Support LogLuv high dynamic range encoding */ -#define LOGLUV_SUPPORT 1 - -/* Support LZW algorithm */ -#define LZW_SUPPORT 1 - -/* Support NeXT 2-bit RLE algorithm */ -#define NEXT_SUPPORT 1 - -/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation - fails with unpatched IJG JPEG library) */ -#define OJPEG_SUPPORT 1 - -/* Support Macintosh PackBits algorithm */ -#define PACKBITS_SUPPORT 1 - -/* Support Pixar log-format algorithm (requires Zlib) */ -#define PIXARLOG_SUPPORT 1 - -/* Support ThunderScan 4-bit RLE algorithm */ -#define THUNDER_SUPPORT 1 - -/* Support Deflate compression */ -#define ZIP_SUPPORT 1 - -/* Support LZMA2 compression */ -#undef LZMA_SUPPORT - -/* Support Microsoft Document Imaging format */ -#undef MDI_SUPPORT - -/* Support strip chopping (whether or not to convert single-strip uncompressed - images to mutiple strips of ~8Kb to reduce memory usage) */ -#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP - -/* Enable SubIFD tag (330) support */ -#define SUBIFD_SUPPORT 1 - -/* Treat extra sample as alpha (default enabled). The RGBA interface will - treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many - packages produce RGBA files but don't mark the alpha properly. */ -#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1 - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#define CHECK_JPEG_YCBCR_SUBSAMPLING 1 - -/* Support MS MDI magic number files as TIFF */ -/* #undef MDI_SUPPORT */ - -/* - * Feature support definitions. - * XXX: These macros are obsoleted. Don't use them in your apps! - * Macros stays here for backward compatibility and should be always defined. - */ -#define COLORIMETRY_SUPPORT -#define YCBCR_SUPPORT -#define CMYK_SUPPORT -#define ICC_SUPPORT -#define PHOTOSHOP_SUPPORT -#define IPTC_SUPPORT - -#endif /* _TIFFCONF_ */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h-vms b/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h-vms deleted file mode 100644 index 9286290..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h-vms +++ /dev/null @@ -1,90 +0,0 @@ -/* - Configuration defines for installed libtiff. - This file maintained for backward compatibility. Do not use definitions - from this file in your programs. -*/ - -#ifndef _TIFFCONF_ -#define _TIFFCONF_ - -/* The size of a `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of a `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - -/* Compatibility stuff. */ - -/* Define as 0 or 1 according to the floating point format suported by the - machine */ -#define HAVE_IEEEFP 1 - -#define HAVE_GETOPT 1 - -/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ -#define HOST_FILLORDER FILLORDER_LSB2MSB - -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian - (Intel) */ -#define HOST_BIGENDIAN 0 - -/* Support CCITT Group 3 & 4 algorithms */ -#define CCITT_SUPPORT 1 - -/* Support JPEG compression (requires IJG JPEG library) */ -#define JPEG_SUPPORT - -/* Support LogLuv high dynamic range encoding */ -#define LOGLUV_SUPPORT 1 - -/* Support LZW algorithm */ -#define LZW_SUPPORT 1 - -/* Support NeXT 2-bit RLE algorithm */ -#define NEXT_SUPPORT 1 - -/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation - fails with unpatched IJG JPEG library) */ -/* #undef OJPEG_SUPPORT */ - -/* Support Macintosh PackBits algorithm */ -#define PACKBITS_SUPPORT 1 - -/* Support Pixar log-format algorithm (requires Zlib) */ -/* #undef PIXARLOG_SUPPORT */ - -/* Support ThunderScan 4-bit RLE algorithm */ -#define THUNDER_SUPPORT 1 - -/* Support Deflate compression */ -/* #undef ZIP_SUPPORT */ - -/* Support strip chopping (whether or not to convert single-strip uncompressed - images to mutiple strips of ~8Kb to reduce memory usage) */ -#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP - -/* Enable SubIFD tag (330) support */ -#define SUBIFD_SUPPORT 1 - -/* Treat extra sample as alpha (default enabled). The RGBA interface will - treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many - packages produce RGBA files but don't mark the alpha properly. */ -#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1 - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#define CHECK_JPEG_YCBCR_SUBSAMPLING 1 - -/* - * Feature support definitions. - * XXX: These macros are obsoleted. Don't use them in your apps! - * Macros stays here for backward compatibility and should be always defined. - */ -#define COLORIMETRY_SUPPORT -#define YCBCR_SUPPORT -#define CMYK_SUPPORT -#define ICC_SUPPORT -#define PHOTOSHOP_SUPPORT -#define IPTC_SUPPORT - -#endif /* _TIFFCONF_ */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h.cmake.in b/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h.cmake.in deleted file mode 100644 index f4ecc8d..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h.cmake.in +++ /dev/null @@ -1,121 +0,0 @@ -/* - Configuration defines for installed libtiff. - This file maintained for backward compatibility. Do not use definitions - from this file in your programs. -*/ - -#ifndef _TIFFCONF_ -#define _TIFFCONF_ - -/* Signed 16-bit type */ -#define TIFF_INT16_T @TIFF_INT16_T@ - -/* Signed 32-bit type */ -#define TIFF_INT32_T @TIFF_INT32_T@ - -/* Signed 64-bit type */ -#define TIFF_INT64_T @TIFF_INT64_T@ - -/* Signed 8-bit type */ -#define TIFF_INT8_T @TIFF_INT8_T@ - -/* Unsigned 16-bit type */ -#define TIFF_UINT16_T @TIFF_UINT16_T@ - -/* Unsigned 32-bit type */ -#define TIFF_UINT32_T @TIFF_UINT32_T@ - -/* Unsigned 64-bit type */ -#define TIFF_UINT64_T @TIFF_UINT64_T@ - -/* Unsigned 8-bit type */ -#define TIFF_UINT8_T @TIFF_UINT8_T@ - -/* Unsigned size type */ -#define TIFF_SIZE_T @TIFF_SIZE_T@ - -/* Signed size type */ -#define TIFF_SSIZE_T @TIFF_SSIZE_T@ - -/* Pointer difference type */ -#define TIFF_PTRDIFF_T @TIFF_PTRDIFF_T@ - -/* Compatibility stuff. */ - -/* Define as 0 or 1 according to the floating point format suported by the - machine */ -#cmakedefine HAVE_IEEEFP 1 - -/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ -#define HOST_FILLORDER @HOST_FILLORDER@ - -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian - (Intel) */ -#define HOST_BIGENDIAN @HOST_BIG_ENDIAN@ - -/* Support CCITT Group 3 & 4 algorithms */ -#cmakedefine CCITT_SUPPORT 1 - -/* Support JPEG compression (requires IJG JPEG library) */ -#cmakedefine JPEG_SUPPORT 1 - -/* Support JBIG compression (requires JBIG-KIT library) */ -#cmakedefine JBIG_SUPPORT - -/* Support LogLuv high dynamic range encoding */ -#cmakedefine LOGLUV_SUPPORT 1 - -/* Support LZW algorithm */ -#cmakedefine LZW_SUPPORT 1 - -/* Support NeXT 2-bit RLE algorithm */ -#cmakedefine NEXT_SUPPORT 1 - -/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation - fails with unpatched IJG JPEG library) */ -#cmakedefine OJPEG_SUPPORT 1 - -/* Support Macintosh PackBits algorithm */ -#cmakedefine PACKBITS_SUPPORT 1 - -/* Support Pixar log-format algorithm (requires Zlib) */ -#cmakedefine PIXARLOG_SUPPORT 1 - -/* Support ThunderScan 4-bit RLE algorithm */ -#cmakedefine THUNDER_SUPPORT 1 - -/* Support Deflate compression */ -#cmakedefine ZIP_SUPPORT 1 - -/* Support strip chopping (whether or not to convert single-strip uncompressed - images to mutiple strips of ~8Kb to reduce memory usage) */ -#cmakedefine STRIPCHOP_DEFAULT 1 - -/* Enable SubIFD tag (330) support */ -#cmakedefine SUBIFD_SUPPORT 1 - -/* Treat extra sample as alpha (default enabled). The RGBA interface will - treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many - packages produce RGBA files but don't mark the alpha properly. */ -#cmakedefine DEFAULT_EXTRASAMPLE_AS_ALPHA 1 - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#cmakedefine CHECK_JPEG_YCBCR_SUBSAMPLING 1 - -/* Support MS MDI magic number files as TIFF */ -#cmakedefine MDI_SUPPORT 1 - -/* - * Feature support definitions. - * XXX: These macros are obsoleted. Don't use them in your apps! - * Macros stays here for backward compatibility and should be always defined. - */ -#define COLORIMETRY_SUPPORT -#define YCBCR_SUPPORT -#define CMYK_SUPPORT -#define ICC_SUPPORT -#define PHOTOSHOP_SUPPORT -#define IPTC_SUPPORT - -#endif /* _TIFFCONF_ */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h.in b/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h.in deleted file mode 100644 index 499c4d1..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.h.in +++ /dev/null @@ -1,118 +0,0 @@ -/* - Configuration defines for installed libtiff. - This file maintained for backward compatibility. Do not use definitions - from this file in your programs. -*/ - -#ifndef _TIFFCONF_ -#define _TIFFCONF_ - -/* Signed 16-bit type */ -#undef TIFF_INT16_T - -/* Signed 32-bit type */ -#undef TIFF_INT32_T - -/* Signed 64-bit type */ -#undef TIFF_INT64_T - -/* Signed 8-bit type */ -#undef TIFF_INT8_T - -/* Unsigned 16-bit type */ -#undef TIFF_UINT16_T - -/* Unsigned 32-bit type */ -#undef TIFF_UINT32_T - -/* Unsigned 64-bit type */ -#undef TIFF_UINT64_T - -/* Unsigned 8-bit type */ -#undef TIFF_UINT8_T - -/* Signed size type */ -#undef TIFF_SSIZE_T - -/* Pointer difference type */ -#undef TIFF_PTRDIFF_T - -/* Compatibility stuff. */ - -/* Define as 0 or 1 according to the floating point format suported by the - machine */ -#undef HAVE_IEEEFP - -/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ -#undef HOST_FILLORDER - -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian - (Intel) */ -#undef HOST_BIGENDIAN - -/* Support CCITT Group 3 & 4 algorithms */ -#undef CCITT_SUPPORT - -/* Support JPEG compression (requires IJG JPEG library) */ -#undef JPEG_SUPPORT - -/* Support JBIG compression (requires JBIG-KIT library) */ -#undef JBIG_SUPPORT - -/* Support LogLuv high dynamic range encoding */ -#undef LOGLUV_SUPPORT - -/* Support LZW algorithm */ -#undef LZW_SUPPORT - -/* Support NeXT 2-bit RLE algorithm */ -#undef NEXT_SUPPORT - -/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation - fails with unpatched IJG JPEG library) */ -#undef OJPEG_SUPPORT - -/* Support Macintosh PackBits algorithm */ -#undef PACKBITS_SUPPORT - -/* Support Pixar log-format algorithm (requires Zlib) */ -#undef PIXARLOG_SUPPORT - -/* Support ThunderScan 4-bit RLE algorithm */ -#undef THUNDER_SUPPORT - -/* Support Deflate compression */ -#undef ZIP_SUPPORT - -/* Support strip chopping (whether or not to convert single-strip uncompressed - images to mutiple strips of ~8Kb to reduce memory usage) */ -#undef STRIPCHOP_DEFAULT - -/* Enable SubIFD tag (330) support */ -#undef SUBIFD_SUPPORT - -/* Treat extra sample as alpha (default enabled). The RGBA interface will - treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many - packages produce RGBA files but don't mark the alpha properly. */ -#undef DEFAULT_EXTRASAMPLE_AS_ALPHA - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#undef CHECK_JPEG_YCBCR_SUBSAMPLING - -/* Support MS MDI magic number files as TIFF */ -#undef MDI_SUPPORT - -/* - * Feature support definitions. - * XXX: These macros are obsoleted. Don't use them in your apps! - * Macros stays here for backward compatibility and should be always defined. - */ -#define COLORIMETRY_SUPPORT -#define YCBCR_SUPPORT -#define CMYK_SUPPORT -#define ICC_SUPPORT -#define PHOTOSHOP_SUPPORT -#define IPTC_SUPPORT - -#endif /* _TIFFCONF_ */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.vc.h b/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.vc.h deleted file mode 100644 index 2197a7b..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.vc.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - Configuration defines for installed libtiff. - This file maintained for backward compatibility. Do not use definitions - from this file in your programs. -*/ - -#ifndef _TIFFCONF_ -#define _TIFFCONF_ - -/* The size of a `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* Signed 8-bit type */ -#define TIFF_INT8_T signed char - -/* Unsigned 8-bit type */ -#define TIFF_UINT8_T unsigned char - -/* Signed 16-bit type */ -#define TIFF_INT16_T signed short - -/* Unsigned 16-bit type */ -#define TIFF_UINT16_T unsigned short - -/* Signed 32-bit type formatter */ -#define TIFF_INT32_FORMAT "%d" - -/* Signed 32-bit type */ -#define TIFF_INT32_T signed int - -/* Unsigned 32-bit type formatter */ -#define TIFF_UINT32_FORMAT "%u" - -/* Unsigned 32-bit type */ -#define TIFF_UINT32_T unsigned int - -/* Signed 64-bit type formatter */ -#define TIFF_INT64_FORMAT "%I64d" - -/* Signed 64-bit type */ -#define TIFF_INT64_T signed __int64 - -/* Unsigned 64-bit type formatter */ -#define TIFF_UINT64_FORMAT "%I64u" - -/* Unsigned 64-bit type */ -#define TIFF_UINT64_T unsigned __int64 - -#if _WIN64 -/* - Windows 64-bit build -*/ - -/* Signed size type */ -# define TIFF_SSIZE_T TIFF_INT64_T - -#else -/* - Windows 32-bit build -*/ - -/* Signed size type */ -# define TIFF_SSIZE_T signed int - -#endif - -/* Compatibility stuff. */ - -/* Define as 0 or 1 according to the floating point format suported by the - machine */ -#define HAVE_IEEEFP 1 - -/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ -#define HOST_FILLORDER FILLORDER_LSB2MSB - -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian - (Intel) */ -#define HOST_BIGENDIAN 0 - -/* Support CCITT Group 3 & 4 algorithms */ -#define CCITT_SUPPORT 1 - -/* Support JPEG compression (requires IJG JPEG library) */ -/* #undef JPEG_SUPPORT */ - -/* Support JBIG compression (requires JBIG-KIT library) */ -/* #undef JBIG_SUPPORT */ - -/* Support LogLuv high dynamic range encoding */ -#define LOGLUV_SUPPORT 1 - -/* Support LZW algorithm */ -#define LZW_SUPPORT 1 - -/* Support NeXT 2-bit RLE algorithm */ -#define NEXT_SUPPORT 1 - -/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation - fails with unpatched IJG JPEG library) */ -/* #undef OJPEG_SUPPORT */ - -/* Support Macintosh PackBits algorithm */ -#define PACKBITS_SUPPORT 1 - -/* Support Pixar log-format algorithm (requires Zlib) */ -/* #undef PIXARLOG_SUPPORT */ - -/* Support ThunderScan 4-bit RLE algorithm */ -#define THUNDER_SUPPORT 1 - -/* Support Deflate compression */ -/* #undef ZIP_SUPPORT */ - -/* Support strip chopping (whether or not to convert single-strip uncompressed - images to mutiple strips of ~8Kb to reduce memory usage) */ -#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP - -/* Enable SubIFD tag (330) support */ -#define SUBIFD_SUPPORT 1 - -/* Treat extra sample as alpha (default enabled). The RGBA interface will - treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many - packages produce RGBA files but don't mark the alpha properly. */ -#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1 - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#define CHECK_JPEG_YCBCR_SUBSAMPLING 1 - -/* Support MS MDI magic number files as TIFF */ -/* #undef MDI_SUPPORT */ - -/* - * Feature support definitions. - * XXX: These macros are obsoleted. Don't use them in your apps! - * Macros stays here for backward compatibility and should be always defined. - */ -#define COLORIMETRY_SUPPORT -#define YCBCR_SUPPORT -#define CMYK_SUPPORT -#define ICC_SUPPORT -#define PHOTOSHOP_SUPPORT -#define IPTC_SUPPORT - -#endif /* _TIFFCONF_ */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.wince.h b/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.wince.h deleted file mode 100644 index cc32dad..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiffconf.wince.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Windows CE platform tiffconf.wince.h - * Created by Mateusz Loskot (mateusz@loskot.net) - * - * NOTE: Requires WCELIBCEX library with wceex_* functions, - * It's an extension to C library on Windows CE platform. - * For example, HAVE_STDIO_H definition indicates there are - * following files available: - * stdio.h - from Windows CE / Windows Mobile SDK - * wce_stdio.h - from WCELIBCEX library - */ - - -/* - Configuration defines for installed libtiff. - This file maintained for backward compatibility. Do not use definitions - from this file in your programs. -*/ - -#ifndef _WIN32_WCE -# error This version of tif_config.h header is dedicated for Windows CE platform! -#endif - - -#ifndef _TIFFCONF_ -#define _TIFFCONF_ - -/* The size of a `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* Compatibility stuff. */ - -/* Define as 0 or 1 according to the floating point format suported by the - machine */ -#define HAVE_IEEEFP 1 - -/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ -#define HOST_FILLORDER FILLORDER_LSB2MSB - -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian - (Intel) */ -#define HOST_BIGENDIAN 0 - -/* Support CCITT Group 3 & 4 algorithms */ -#define CCITT_SUPPORT 1 - -/* Support JPEG compression (requires IJG JPEG library) */ -/* #undef JPEG_SUPPORT */ - -/* Support LogLuv high dynamic range encoding */ -#define LOGLUV_SUPPORT 1 - -/* Support LZW algorithm */ -#define LZW_SUPPORT 1 - -/* Support NeXT 2-bit RLE algorithm */ -#define NEXT_SUPPORT 1 - -/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation - fails with unpatched IJG JPEG library) */ -/* #undef OJPEG_SUPPORT */ - -/* Support Macintosh PackBits algorithm */ -#define PACKBITS_SUPPORT 1 - -/* Support Pixar log-format algorithm (requires Zlib) */ -/* #undef PIXARLOG_SUPPORT */ - -/* Support ThunderScan 4-bit RLE algorithm */ -#define THUNDER_SUPPORT 1 - -/* Support Deflate compression */ -/* #undef ZIP_SUPPORT */ - -/* Support strip chopping (whether or not to convert single-strip uncompressed - images to mutiple strips of ~8Kb to reduce memory usage) */ -#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP - -/* Enable SubIFD tag (330) support */ -#define SUBIFD_SUPPORT 1 - -/* Treat extra sample as alpha (default enabled). The RGBA interface will - treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many - packages produce RGBA files but don't mark the alpha properly. */ -#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1 - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#define CHECK_JPEG_YCBCR_SUBSAMPLING 1 - -/* - * Feature support definitions. - * XXX: These macros are obsoleted. Don't use them in your apps! - * Macros stays here for backward compatibility and should be always defined. - */ -#define COLORIMETRY_SUPPORT -#define YCBCR_SUPPORT -#define CMYK_SUPPORT -#define ICC_SUPPORT -#define PHOTOSHOP_SUPPORT -#define IPTC_SUPPORT - -#endif /* _TIFFCONF_ */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiffio.h b/Dependencies/FreeImage/Source/LibTIFF4/tiffio.h deleted file mode 100644 index b91ff64..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiffio.h +++ /dev/null @@ -1,558 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFFIO_ -#define _TIFFIO_ - -/* - * TIFF I/O Library Definitions. - */ -#include "tiff.h" -#include "tiffvers.h" - -/* - * TIFF is defined as an incomplete type to hide the - * library's internal data structures from clients. - */ -typedef struct tiff TIFF; - -/* - * The following typedefs define the intrinsic size of - * data types used in the *exported* interfaces. These - * definitions depend on the proper definition of types - * in tiff.h. Note also that the varargs interface used - * to pass tag types and values uses the types defined in - * tiff.h directly. - * - * NB: ttag_t is unsigned int and not unsigned short because - * ANSI C requires that the type before the ellipsis be a - * promoted type (i.e. one of int, unsigned int, pointer, - * or double) and because we defined pseudo-tags that are - * outside the range of legal Aldus-assigned tags. - * NB: tsize_t is int32 and not uint32 because some functions - * return -1. - * NB: toff_t is not off_t for many reasons; TIFFs max out at - * 32-bit file offsets, and BigTIFF maxes out at 64-bit - * offsets being the most important, and to ensure use of - * a consistently unsigned type across architectures. - * Prior to libtiff 4.0, this was an unsigned 32 bit type. - */ -/* - * this is the machine addressing size type, only it's signed, so make it - * int32 on 32bit machines, int64 on 64bit machines - */ -typedef TIFF_SSIZE_T tmsize_t; -typedef uint64 toff_t; /* file offset */ -/* the following are deprecated and should be replaced by their defining - counterparts */ -typedef uint32 ttag_t; /* directory tag */ -typedef uint16 tdir_t; /* directory index */ -typedef uint16 tsample_t; /* sample number */ -typedef uint32 tstrile_t; /* strip or tile number */ -typedef tstrile_t tstrip_t; /* strip number */ -typedef tstrile_t ttile_t; /* tile number */ -typedef tmsize_t tsize_t; /* i/o size in bytes */ -typedef void* tdata_t; /* image data ref */ - -#if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32)) -#define __WIN32__ -#endif - -/* - * On windows you should define USE_WIN32_FILEIO if you are using tif_win32.c - * or AVOID_WIN32_FILEIO if you are using something else (like tif_unix.c). - * - * By default tif_unix.c is assumed. - */ - -#if defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows) -# if !defined(__CYGWIN) && !defined(AVOID_WIN32_FILEIO) && !defined(USE_WIN32_FILEIO) -# define AVOID_WIN32_FILEIO -# endif -#endif - -#if defined(USE_WIN32_FILEIO) -# define VC_EXTRALEAN -# include -# ifdef __WIN32__ -DECLARE_HANDLE(thandle_t); /* Win32 file handle */ -# else -typedef HFILE thandle_t; /* client data handle */ -# endif /* __WIN32__ */ -#else -typedef void* thandle_t; /* client data handle */ -#endif /* USE_WIN32_FILEIO */ - -/* - * Flags to pass to TIFFPrintDirectory to control - * printing of data structures that are potentially - * very large. Bit-or these flags to enable printing - * multiple items. - */ -#define TIFFPRINT_NONE 0x0 /* no extra info */ -#define TIFFPRINT_STRIPS 0x1 /* strips/tiles info */ -#define TIFFPRINT_CURVES 0x2 /* color/gray response curves */ -#define TIFFPRINT_COLORMAP 0x4 /* colormap */ -#define TIFFPRINT_JPEGQTABLES 0x100 /* JPEG Q matrices */ -#define TIFFPRINT_JPEGACTABLES 0x200 /* JPEG AC tables */ -#define TIFFPRINT_JPEGDCTABLES 0x200 /* JPEG DC tables */ - -/* - * Colour conversion stuff - */ - -/* reference white */ -#define D65_X0 (95.0470F) -#define D65_Y0 (100.0F) -#define D65_Z0 (108.8827F) - -#define D50_X0 (96.4250F) -#define D50_Y0 (100.0F) -#define D50_Z0 (82.4680F) - -/* Structure for holding information about a display device. */ - -typedef unsigned char TIFFRGBValue; /* 8-bit samples */ - -typedef struct { - float d_mat[3][3]; /* XYZ -> luminance matrix */ - float d_YCR; /* Light o/p for reference white */ - float d_YCG; - float d_YCB; - uint32 d_Vrwr; /* Pixel values for ref. white */ - uint32 d_Vrwg; - uint32 d_Vrwb; - float d_Y0R; /* Residual light for black pixel */ - float d_Y0G; - float d_Y0B; - float d_gammaR; /* Gamma values for the three guns */ - float d_gammaG; - float d_gammaB; -} TIFFDisplay; - -typedef struct { /* YCbCr->RGB support */ - TIFFRGBValue* clamptab; /* range clamping table */ - int* Cr_r_tab; - int* Cb_b_tab; - int32* Cr_g_tab; - int32* Cb_g_tab; - int32* Y_tab; -} TIFFYCbCrToRGB; - -typedef struct { /* CIE Lab 1976->RGB support */ - int range; /* Size of conversion table */ -#define CIELABTORGB_TABLE_RANGE 1500 - float rstep, gstep, bstep; - float X0, Y0, Z0; /* Reference white point */ - TIFFDisplay display; - float Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */ - float Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */ - float Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */ -} TIFFCIELabToRGB; - -/* - * RGBA-style image support. - */ -typedef struct _TIFFRGBAImage TIFFRGBAImage; -/* - * The image reading and conversion routines invoke - * ``put routines'' to copy/image/whatever tiles of - * raw image data. A default set of routines are - * provided to convert/copy raw image data to 8-bit - * packed ABGR format rasters. Applications can supply - * alternate routines that unpack the data into a - * different format or, for example, unpack the data - * and draw the unpacked raster on the display. - */ -typedef void (*tileContigRoutine) - (TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32, - unsigned char*); -typedef void (*tileSeparateRoutine) - (TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32, - unsigned char*, unsigned char*, unsigned char*, unsigned char*); -/* - * RGBA-reader state. - */ -struct _TIFFRGBAImage { - TIFF* tif; /* image handle */ - int stoponerr; /* stop on read error */ - int isContig; /* data is packed/separate */ - int alpha; /* type of alpha data present */ - uint32 width; /* image width */ - uint32 height; /* image height */ - uint16 bitspersample; /* image bits/sample */ - uint16 samplesperpixel; /* image samples/pixel */ - uint16 orientation; /* image orientation */ - uint16 req_orientation; /* requested orientation */ - uint16 photometric; /* image photometric interp */ - uint16* redcmap; /* colormap palette */ - uint16* greencmap; - uint16* bluecmap; - /* get image data routine */ - int (*get)(TIFFRGBAImage*, uint32*, uint32, uint32); - /* put decoded strip/tile */ - union { - void (*any)(TIFFRGBAImage*); - tileContigRoutine contig; - tileSeparateRoutine separate; - } put; - TIFFRGBValue* Map; /* sample mapping array */ - uint32** BWmap; /* black&white map */ - uint32** PALmap; /* palette image map */ - TIFFYCbCrToRGB* ycbcr; /* YCbCr conversion state */ - TIFFCIELabToRGB* cielab; /* CIE L*a*b conversion state */ - - uint8* UaToAa; /* Unassociated alpha to associated alpha conversion LUT */ - uint8* Bitdepth16To8; /* LUT for conversion from 16bit to 8bit values */ - - int row_offset; - int col_offset; -}; - -/* - * Macros for extracting components from the - * packed ABGR form returned by TIFFReadRGBAImage. - */ -#define TIFFGetR(abgr) ((abgr) & 0xff) -#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff) -#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff) -#define TIFFGetA(abgr) (((abgr) >> 24) & 0xff) - -/* - * A CODEC is a software package that implements decoding, - * encoding, or decoding+encoding of a compression algorithm. - * The library provides a collection of builtin codecs. - * More codecs may be registered through calls to the library - * and/or the builtin implementations may be overridden. - */ -typedef int (*TIFFInitMethod)(TIFF*, int); -typedef struct { - char* name; - uint16 scheme; - TIFFInitMethod init; -} TIFFCodec; - -#include -#include - -/* share internal LogLuv conversion routines? */ -#ifndef LOGLUV_PUBLIC -#define LOGLUV_PUBLIC 1 -#endif - -#if !defined(__GNUC__) && !defined(__attribute__) -# define __attribute__(x) /*nothing*/ -#endif - -#if defined(c_plusplus) || defined(__cplusplus) -extern "C" { -#endif -typedef void (*TIFFErrorHandler)(const char*, const char*, va_list); -typedef void (*TIFFErrorHandlerExt)(thandle_t, const char*, const char*, va_list); -typedef tmsize_t (*TIFFReadWriteProc)(thandle_t, void*, tmsize_t); -typedef toff_t (*TIFFSeekProc)(thandle_t, toff_t, int); -typedef int (*TIFFCloseProc)(thandle_t); -typedef toff_t (*TIFFSizeProc)(thandle_t); -typedef int (*TIFFMapFileProc)(thandle_t, void** base, toff_t* size); -typedef void (*TIFFUnmapFileProc)(thandle_t, void* base, toff_t size); -typedef void (*TIFFExtendProc)(TIFF*); - -extern const char* TIFFGetVersion(void); - -extern const TIFFCodec* TIFFFindCODEC(uint16); -extern TIFFCodec* TIFFRegisterCODEC(uint16, const char*, TIFFInitMethod); -extern void TIFFUnRegisterCODEC(TIFFCodec*); -extern int TIFFIsCODECConfigured(uint16); -extern TIFFCodec* TIFFGetConfiguredCODECs(void); - -/* - * Auxiliary functions. - */ - -extern void* _TIFFmalloc(tmsize_t s); -extern void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz); -extern void* _TIFFrealloc(void* p, tmsize_t s); -extern void _TIFFmemset(void* p, int v, tmsize_t c); -extern void _TIFFmemcpy(void* d, const void* s, tmsize_t c); -extern int _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c); -extern void _TIFFfree(void* p); - -/* -** Stuff, related to tag handling and creating custom tags. -*/ -extern int TIFFGetTagListCount( TIFF * ); -extern uint32 TIFFGetTagListEntry( TIFF *, int tag_index ); - -#define TIFF_ANY TIFF_NOTYPE /* for field descriptor searching */ -#define TIFF_VARIABLE -1 /* marker for variable length tags */ -#define TIFF_SPP -2 /* marker for SamplesPerPixel tags */ -#define TIFF_VARIABLE2 -3 /* marker for uint32 var-length tags */ - -#define FIELD_CUSTOM 65 - -typedef struct _TIFFField TIFFField; -typedef struct _TIFFFieldArray TIFFFieldArray; - -extern const TIFFField* TIFFFindField(TIFF *, uint32, TIFFDataType); -extern const TIFFField* TIFFFieldWithTag(TIFF*, uint32); -extern const TIFFField* TIFFFieldWithName(TIFF*, const char *); - -extern uint32 TIFFFieldTag(const TIFFField*); -extern const char* TIFFFieldName(const TIFFField*); -extern TIFFDataType TIFFFieldDataType(const TIFFField*); -extern int TIFFFieldPassCount(const TIFFField*); -extern int TIFFFieldReadCount(const TIFFField*); -extern int TIFFFieldWriteCount(const TIFFField*); - -typedef int (*TIFFVSetMethod)(TIFF*, uint32, va_list); -typedef int (*TIFFVGetMethod)(TIFF*, uint32, va_list); -typedef void (*TIFFPrintMethod)(TIFF*, FILE*, long); - -typedef struct { - TIFFVSetMethod vsetfield; /* tag set routine */ - TIFFVGetMethod vgetfield; /* tag get routine */ - TIFFPrintMethod printdir; /* directory print routine */ -} TIFFTagMethods; - -extern TIFFTagMethods *TIFFAccessTagMethods(TIFF *); -extern void *TIFFGetClientInfo(TIFF *, const char *); -extern void TIFFSetClientInfo(TIFF *, void *, const char *); - -extern void TIFFCleanup(TIFF* tif); -extern void TIFFClose(TIFF* tif); -extern int TIFFFlush(TIFF* tif); -extern int TIFFFlushData(TIFF* tif); -extern int TIFFGetField(TIFF* tif, uint32 tag, ...); -extern int TIFFVGetField(TIFF* tif, uint32 tag, va_list ap); -extern int TIFFGetFieldDefaulted(TIFF* tif, uint32 tag, ...); -extern int TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap); -extern int TIFFReadDirectory(TIFF* tif); -extern int TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, const TIFFFieldArray* infoarray); -extern int TIFFReadEXIFDirectory(TIFF* tif, toff_t diroff); -extern uint64 TIFFScanlineSize64(TIFF* tif); -extern tmsize_t TIFFScanlineSize(TIFF* tif); -extern uint64 TIFFRasterScanlineSize64(TIFF* tif); -extern tmsize_t TIFFRasterScanlineSize(TIFF* tif); -extern uint64 TIFFStripSize64(TIFF* tif); -extern tmsize_t TIFFStripSize(TIFF* tif); -extern uint64 TIFFRawStripSize64(TIFF* tif, uint32 strip); -extern tmsize_t TIFFRawStripSize(TIFF* tif, uint32 strip); -extern uint64 TIFFVStripSize64(TIFF* tif, uint32 nrows); -extern tmsize_t TIFFVStripSize(TIFF* tif, uint32 nrows); -extern uint64 TIFFTileRowSize64(TIFF* tif); -extern tmsize_t TIFFTileRowSize(TIFF* tif); -extern uint64 TIFFTileSize64(TIFF* tif); -extern tmsize_t TIFFTileSize(TIFF* tif); -extern uint64 TIFFVTileSize64(TIFF* tif, uint32 nrows); -extern tmsize_t TIFFVTileSize(TIFF* tif, uint32 nrows); -extern uint32 TIFFDefaultStripSize(TIFF* tif, uint32 request); -extern void TIFFDefaultTileSize(TIFF*, uint32*, uint32*); -extern int TIFFFileno(TIFF*); -extern int TIFFSetFileno(TIFF*, int); -extern thandle_t TIFFClientdata(TIFF*); -extern thandle_t TIFFSetClientdata(TIFF*, thandle_t); -extern int TIFFGetMode(TIFF*); -extern int TIFFSetMode(TIFF*, int); -extern int TIFFIsTiled(TIFF*); -extern int TIFFIsByteSwapped(TIFF*); -extern int TIFFIsUpSampled(TIFF*); -extern int TIFFIsMSB2LSB(TIFF*); -extern int TIFFIsBigEndian(TIFF*); -extern TIFFReadWriteProc TIFFGetReadProc(TIFF*); -extern TIFFReadWriteProc TIFFGetWriteProc(TIFF*); -extern TIFFSeekProc TIFFGetSeekProc(TIFF*); -extern TIFFCloseProc TIFFGetCloseProc(TIFF*); -extern TIFFSizeProc TIFFGetSizeProc(TIFF*); -extern TIFFMapFileProc TIFFGetMapFileProc(TIFF*); -extern TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF*); -extern uint32 TIFFCurrentRow(TIFF*); -extern uint16 TIFFCurrentDirectory(TIFF*); -extern uint16 TIFFNumberOfDirectories(TIFF*); -extern uint64 TIFFCurrentDirOffset(TIFF*); -extern uint32 TIFFCurrentStrip(TIFF*); -extern uint32 TIFFCurrentTile(TIFF* tif); -extern int TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size); -extern int TIFFWriteBufferSetup(TIFF* tif, void* bp, tmsize_t size); -extern int TIFFSetupStrips(TIFF *); -extern int TIFFWriteCheck(TIFF*, int, const char *); -extern void TIFFFreeDirectory(TIFF*); -extern int TIFFCreateDirectory(TIFF*); -extern int TIFFCreateCustomDirectory(TIFF*,const TIFFFieldArray*); -extern int TIFFCreateEXIFDirectory(TIFF*); -extern int TIFFLastDirectory(TIFF*); -extern int TIFFSetDirectory(TIFF*, uint16); -extern int TIFFSetSubDirectory(TIFF*, uint64); -extern int TIFFUnlinkDirectory(TIFF*, uint16); -extern int TIFFSetField(TIFF*, uint32, ...); -extern int TIFFVSetField(TIFF*, uint32, va_list); -extern int TIFFUnsetField(TIFF*, uint32); -extern int TIFFWriteDirectory(TIFF *); -extern int TIFFWriteCustomDirectory(TIFF *, uint64 *); -extern int TIFFCheckpointDirectory(TIFF *); -extern int TIFFRewriteDirectory(TIFF *); - -#if defined(c_plusplus) || defined(__cplusplus) -extern void TIFFPrintDirectory(TIFF*, FILE*, long = 0); -extern int TIFFReadScanline(TIFF* tif, void* buf, uint32 row, uint16 sample = 0); -extern int TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample = 0); -extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int = 0); -extern int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*, - int = ORIENTATION_BOTLEFT, int = 0); -#else -extern void TIFFPrintDirectory(TIFF*, FILE*, long); -extern int TIFFReadScanline(TIFF* tif, void* buf, uint32 row, uint16 sample); -extern int TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample); -extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int); -extern int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*, int, int); -#endif - -extern int TIFFReadRGBAStrip(TIFF*, uint32, uint32 * ); -extern int TIFFReadRGBATile(TIFF*, uint32, uint32, uint32 * ); -extern int TIFFReadRGBAStripExt(TIFF*, uint32, uint32 *, int stop_on_error ); -extern int TIFFReadRGBATileExt(TIFF*, uint32, uint32, uint32 *, int stop_on_error ); -extern int TIFFRGBAImageOK(TIFF*, char [1024]); -extern int TIFFRGBAImageBegin(TIFFRGBAImage*, TIFF*, int, char [1024]); -extern int TIFFRGBAImageGet(TIFFRGBAImage*, uint32*, uint32, uint32); -extern void TIFFRGBAImageEnd(TIFFRGBAImage*); -extern TIFF* TIFFOpen(const char*, const char*); -# ifdef __WIN32__ -extern TIFF* TIFFOpenW(const wchar_t*, const char*); -# endif /* __WIN32__ */ -extern TIFF* TIFFFdOpen(int, const char*, const char*); -extern TIFF* TIFFClientOpen(const char*, const char*, - thandle_t, - TIFFReadWriteProc, TIFFReadWriteProc, - TIFFSeekProc, TIFFCloseProc, - TIFFSizeProc, - TIFFMapFileProc, TIFFUnmapFileProc); -extern const char* TIFFFileName(TIFF*); -extern const char* TIFFSetFileName(TIFF*, const char *); -extern void TIFFError(const char*, const char*, ...) __attribute__((__format__ (__printf__,2,3))); -extern void TIFFErrorExt(thandle_t, const char*, const char*, ...) __attribute__((__format__ (__printf__,3,4))); -extern void TIFFWarning(const char*, const char*, ...) __attribute__((__format__ (__printf__,2,3))); -extern void TIFFWarningExt(thandle_t, const char*, const char*, ...) __attribute__((__format__ (__printf__,3,4))); -extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler); -extern TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt); -extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler); -extern TIFFErrorHandlerExt TIFFSetWarningHandlerExt(TIFFErrorHandlerExt); -extern TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc); -extern uint32 TIFFComputeTile(TIFF* tif, uint32 x, uint32 y, uint32 z, uint16 s); -extern int TIFFCheckTile(TIFF* tif, uint32 x, uint32 y, uint32 z, uint16 s); -extern uint32 TIFFNumberOfTiles(TIFF*); -extern tmsize_t TIFFReadTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s); -extern tmsize_t TIFFWriteTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s); -extern uint32 TIFFComputeStrip(TIFF*, uint32, uint16); -extern uint32 TIFFNumberOfStrips(TIFF*); -extern tmsize_t TIFFReadEncodedStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size); -extern tmsize_t TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size); -extern tmsize_t TIFFReadEncodedTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size); -extern tmsize_t TIFFReadRawTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size); -extern tmsize_t TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc); -extern tmsize_t TIFFWriteRawStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc); -extern tmsize_t TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc); -extern tmsize_t TIFFWriteRawTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc); -extern int TIFFDataWidth(TIFFDataType); /* table of tag datatype widths */ -extern void TIFFSetWriteOffset(TIFF* tif, toff_t off); -extern void TIFFSwabShort(uint16*); -extern void TIFFSwabLong(uint32*); -extern void TIFFSwabLong8(uint64*); -extern void TIFFSwabFloat(float*); -extern void TIFFSwabDouble(double*); -extern void TIFFSwabArrayOfShort(uint16* wp, tmsize_t n); -extern void TIFFSwabArrayOfTriples(uint8* tp, tmsize_t n); -extern void TIFFSwabArrayOfLong(uint32* lp, tmsize_t n); -extern void TIFFSwabArrayOfLong8(uint64* lp, tmsize_t n); -extern void TIFFSwabArrayOfFloat(float* fp, tmsize_t n); -extern void TIFFSwabArrayOfDouble(double* dp, tmsize_t n); -extern void TIFFReverseBits(uint8* cp, tmsize_t n); -extern const unsigned char* TIFFGetBitRevTable(int); - -#ifdef LOGLUV_PUBLIC -#define U_NEU 0.210526316 -#define V_NEU 0.473684211 -#define UVSCALE 410. -extern double LogL16toY(int); -extern double LogL10toY(int); -extern void XYZtoRGB24(float*, uint8*); -extern int uv_decode(double*, double*, int); -extern void LogLuv24toXYZ(uint32, float*); -extern void LogLuv32toXYZ(uint32, float*); -#if defined(c_plusplus) || defined(__cplusplus) -extern int LogL16fromY(double, int = SGILOGENCODE_NODITHER); -extern int LogL10fromY(double, int = SGILOGENCODE_NODITHER); -extern int uv_encode(double, double, int = SGILOGENCODE_NODITHER); -extern uint32 LogLuv24fromXYZ(float*, int = SGILOGENCODE_NODITHER); -extern uint32 LogLuv32fromXYZ(float*, int = SGILOGENCODE_NODITHER); -#else -extern int LogL16fromY(double, int); -extern int LogL10fromY(double, int); -extern int uv_encode(double, double, int); -extern uint32 LogLuv24fromXYZ(float*, int); -extern uint32 LogLuv32fromXYZ(float*, int); -#endif -#endif /* LOGLUV_PUBLIC */ - -extern int TIFFCIELabToRGBInit(TIFFCIELabToRGB*, const TIFFDisplay *, float*); -extern void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32, int32, int32, - float *, float *, float *); -extern void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float, - uint32 *, uint32 *, uint32 *); - -extern int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB*, float*, float*); -extern void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32, int32, int32, - uint32 *, uint32 *, uint32 *); - -/**************************************************************************** - * O B S O L E T E D I N T E R F A C E S - * - * Don't use this stuff in your applications, it may be removed in the future - * libtiff versions. - ****************************************************************************/ -typedef struct { - ttag_t field_tag; /* field's tag */ - short field_readcount; /* read count/TIFF_VARIABLE/TIFF_SPP */ - short field_writecount; /* write count/TIFF_VARIABLE */ - TIFFDataType field_type; /* type of associated data */ - unsigned short field_bit; /* bit in fieldsset bit vector */ - unsigned char field_oktochange; /* if true, can change while writing */ - unsigned char field_passcount; /* if true, pass dir count on set */ - char *field_name; /* ASCII name */ -} TIFFFieldInfo; - -extern int TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], uint32); - -#if defined(c_plusplus) || defined(__cplusplus) -} -#endif - -#endif /* _TIFFIO_ */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiffio.hxx b/Dependencies/FreeImage/Source/LibTIFF4/tiffio.hxx deleted file mode 100644 index dc14d09..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiffio.hxx +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFFIO_HXX_ -#define _TIFFIO_HXX_ - -/* - * TIFF I/O library definitions which provide C++ streams API. - */ - -#include -#include "tiff.h" - -extern TIFF* TIFFStreamOpen(const char*, std::ostream *); -extern TIFF* TIFFStreamOpen(const char*, std::istream *); - -#endif /* _TIFFIO_HXX_ */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c++ - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiffiop.h b/Dependencies/FreeImage/Source/LibTIFF4/tiffiop.h deleted file mode 100644 index ab5833c..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiffiop.h +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFFIOP_ -#define _TIFFIOP_ -/* - * ``Library-private'' definitions. - */ - -#include "tif_config.h" - -#ifdef HAVE_FCNTL_H -# include -#endif - -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#ifdef HAVE_STRING_H -# include -#endif - -#ifdef HAVE_ASSERT_H -# include -#else -# define assert(x) -#endif - -#ifdef HAVE_SEARCH_H -# include -#else -extern void *lfind(const void *, const void *, size_t *, size_t, - int (*)(const void *, const void *)); -#endif - -#if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF) -#undef snprintf -#define snprintf _TIFF_snprintf_f -extern int snprintf(char* str, size_t size, const char* format, ...); -#endif - -#include "tiffio.h" - -#include "tif_dir.h" - -#ifndef STRIP_SIZE_DEFAULT -# define STRIP_SIZE_DEFAULT 8192 -#endif - -#define streq(a,b) (strcmp(a,b) == 0) - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -typedef struct client_info { - struct client_info *next; - void *data; - char *name; -} TIFFClientInfoLink; - -/* - * Typedefs for ``method pointers'' used internally. - * these are deprecated and provided only for backwards compatibility. - */ -typedef unsigned char tidataval_t; /* internal image data value type */ -typedef tidataval_t* tidata_t; /* reference to internal image data */ - -typedef void (*TIFFVoidMethod)(TIFF*); -typedef int (*TIFFBoolMethod)(TIFF*); -typedef int (*TIFFPreMethod)(TIFF*, uint16); -typedef int (*TIFFCodeMethod)(TIFF* tif, uint8* buf, tmsize_t size, uint16 sample); -typedef int (*TIFFSeekMethod)(TIFF*, uint32); -typedef void (*TIFFPostMethod)(TIFF* tif, uint8* buf, tmsize_t size); -typedef uint32 (*TIFFStripMethod)(TIFF*, uint32); -typedef void (*TIFFTileMethod)(TIFF*, uint32*, uint32*); - -struct tiff { - char* tif_name; /* name of open file */ - int tif_fd; /* open file descriptor */ - int tif_mode; /* open mode (O_*) */ - uint32 tif_flags; - #define TIFF_FILLORDER 0x00003U /* natural bit fill order for machine */ - #define TIFF_DIRTYHEADER 0x00004U /* header must be written on close */ - #define TIFF_DIRTYDIRECT 0x00008U /* current directory must be written */ - #define TIFF_BUFFERSETUP 0x00010U /* data buffers setup */ - #define TIFF_CODERSETUP 0x00020U /* encoder/decoder setup done */ - #define TIFF_BEENWRITING 0x00040U /* written 1+ scanlines to file */ - #define TIFF_SWAB 0x00080U /* byte swap file information */ - #define TIFF_NOBITREV 0x00100U /* inhibit bit reversal logic */ - #define TIFF_MYBUFFER 0x00200U /* my raw data buffer; free on close */ - #define TIFF_ISTILED 0x00400U /* file is tile, not strip- based */ - #define TIFF_MAPPED 0x00800U /* file is mapped into memory */ - #define TIFF_POSTENCODE 0x01000U /* need call to postencode routine */ - #define TIFF_INSUBIFD 0x02000U /* currently writing a subifd */ - #define TIFF_UPSAMPLED 0x04000U /* library is doing data up-sampling */ - #define TIFF_STRIPCHOP 0x08000U /* enable strip chopping support */ - #define TIFF_HEADERONLY 0x10000U /* read header only, do not process the first directory */ - #define TIFF_NOREADRAW 0x20000U /* skip reading of raw uncompressed image data */ - #define TIFF_INCUSTOMIFD 0x40000U /* currently writing a custom IFD */ - #define TIFF_BIGTIFF 0x80000U /* read/write bigtiff */ - #define TIFF_BUF4WRITE 0x100000U /* rawcc bytes are for writing */ - #define TIFF_DIRTYSTRIP 0x200000U /* stripoffsets/stripbytecount dirty*/ - #define TIFF_PERSAMPLE 0x400000U /* get/set per sample tags as arrays */ - #define TIFF_BUFFERMMAP 0x800000U /* read buffer (tif_rawdata) points into mmap() memory */ - uint64 tif_diroff; /* file offset of current directory */ - uint64 tif_nextdiroff; /* file offset of following directory */ - uint64* tif_dirlist; /* list of offsets to already seen directories to prevent IFD looping */ - uint16 tif_dirlistsize; /* number of entries in offset list */ - uint16 tif_dirnumber; /* number of already seen directories */ - TIFFDirectory tif_dir; /* internal rep of current directory */ - TIFFDirectory tif_customdir; /* custom IFDs are separated from the main ones */ - union { - TIFFHeaderCommon common; - TIFFHeaderClassic classic; - TIFFHeaderBig big; - } tif_header; - uint16 tif_header_size; /* file's header block and its length */ - uint32 tif_row; /* current scanline */ - uint16 tif_curdir; /* current directory (index) */ - uint32 tif_curstrip; /* current strip for read/write */ - uint64 tif_curoff; /* current offset for read/write */ - uint64 tif_dataoff; /* current offset for writing dir */ - /* SubIFD support */ - uint16 tif_nsubifd; /* remaining subifds to write */ - uint64 tif_subifdoff; /* offset for patching SubIFD link */ - /* tiling support */ - uint32 tif_col; /* current column (offset by row too) */ - uint32 tif_curtile; /* current tile for read/write */ - tmsize_t tif_tilesize; /* # of bytes in a tile */ - /* compression scheme hooks */ - int tif_decodestatus; - TIFFBoolMethod tif_fixuptags; /* called in TIFFReadDirectory */ - TIFFBoolMethod tif_setupdecode; /* called once before predecode */ - TIFFPreMethod tif_predecode; /* pre- row/strip/tile decoding */ - TIFFBoolMethod tif_setupencode; /* called once before preencode */ - int tif_encodestatus; - TIFFPreMethod tif_preencode; /* pre- row/strip/tile encoding */ - TIFFBoolMethod tif_postencode; /* post- row/strip/tile encoding */ - TIFFCodeMethod tif_decoderow; /* scanline decoding routine */ - TIFFCodeMethod tif_encoderow; /* scanline encoding routine */ - TIFFCodeMethod tif_decodestrip; /* strip decoding routine */ - TIFFCodeMethod tif_encodestrip; /* strip encoding routine */ - TIFFCodeMethod tif_decodetile; /* tile decoding routine */ - TIFFCodeMethod tif_encodetile; /* tile encoding routine */ - TIFFVoidMethod tif_close; /* cleanup-on-close routine */ - TIFFSeekMethod tif_seek; /* position within a strip routine */ - TIFFVoidMethod tif_cleanup; /* cleanup state routine */ - TIFFStripMethod tif_defstripsize; /* calculate/constrain strip size */ - TIFFTileMethod tif_deftilesize; /* calculate/constrain tile size */ - uint8* tif_data; /* compression scheme private data */ - /* input/output buffering */ - tmsize_t tif_scanlinesize; /* # of bytes in a scanline */ - tmsize_t tif_scanlineskew; /* scanline skew for reading strips */ - uint8* tif_rawdata; /* raw data buffer */ - tmsize_t tif_rawdatasize; /* # of bytes in raw data buffer */ - tmsize_t tif_rawdataoff; /* rawdata offset within strip */ - tmsize_t tif_rawdataloaded;/* amount of data in rawdata */ - uint8* tif_rawcp; /* current spot in raw buffer */ - tmsize_t tif_rawcc; /* bytes unread from raw buffer */ - /* memory-mapped file support */ - uint8* tif_base; /* base of mapped file */ - tmsize_t tif_size; /* size of mapped file region (bytes, thus tmsize_t) */ - TIFFMapFileProc tif_mapproc; /* map file method */ - TIFFUnmapFileProc tif_unmapproc; /* unmap file method */ - /* input/output callback methods */ - thandle_t tif_clientdata; /* callback parameter */ - TIFFReadWriteProc tif_readproc; /* read method */ - TIFFReadWriteProc tif_writeproc; /* write method */ - TIFFSeekProc tif_seekproc; /* lseek method */ - TIFFCloseProc tif_closeproc; /* close method */ - TIFFSizeProc tif_sizeproc; /* filesize method */ - /* post-decoding support */ - TIFFPostMethod tif_postdecode; /* post decoding routine */ - /* tag support */ - TIFFField** tif_fields; /* sorted table of registered tags */ - size_t tif_nfields; /* # entries in registered tag table */ - const TIFFField* tif_foundfield; /* cached pointer to already found tag */ - TIFFTagMethods tif_tagmethods; /* tag get/set/print routines */ - TIFFClientInfoLink* tif_clientinfo; /* extra client information. */ - /* Backward compatibility stuff. We need these two fields for - * setting up an old tag extension scheme. */ - TIFFFieldArray* tif_fieldscompat; - size_t tif_nfieldscompat; -}; - -#define isPseudoTag(t) (t > 0xffff) /* is tag value normal or pseudo */ - -#define isTiled(tif) (((tif)->tif_flags & TIFF_ISTILED) != 0) -#define isMapped(tif) (((tif)->tif_flags & TIFF_MAPPED) != 0) -#define isFillOrder(tif, o) (((tif)->tif_flags & (o)) != 0) -#define isUpSampled(tif) (((tif)->tif_flags & TIFF_UPSAMPLED) != 0) -#define TIFFReadFile(tif, buf, size) \ - ((*(tif)->tif_readproc)((tif)->tif_clientdata,(buf),(size))) -#define TIFFWriteFile(tif, buf, size) \ - ((*(tif)->tif_writeproc)((tif)->tif_clientdata,(buf),(size))) -#define TIFFSeekFile(tif, off, whence) \ - ((*(tif)->tif_seekproc)((tif)->tif_clientdata,(off),(whence))) -#define TIFFCloseFile(tif) \ - ((*(tif)->tif_closeproc)((tif)->tif_clientdata)) -#define TIFFGetFileSize(tif) \ - ((*(tif)->tif_sizeproc)((tif)->tif_clientdata)) -#define TIFFMapFileContents(tif, paddr, psize) \ - ((*(tif)->tif_mapproc)((tif)->tif_clientdata,(paddr),(psize))) -#define TIFFUnmapFileContents(tif, addr, size) \ - ((*(tif)->tif_unmapproc)((tif)->tif_clientdata,(addr),(size))) - -/* - * Default Read/Seek/Write definitions. - */ -#ifndef ReadOK -#define ReadOK(tif, buf, size) \ - (TIFFReadFile((tif),(buf),(size))==(size)) -#endif -#ifndef SeekOK -#define SeekOK(tif, off) _TIFFSeekOK(tif, off) -#endif -#ifndef WriteOK -#define WriteOK(tif, buf, size) \ - (TIFFWriteFile((tif),(buf),(size))==(size)) -#endif - -/* NB: the uint32 casts are to silence certain ANSI-C compilers */ -#define TIFFhowmany_32(x, y) (((uint32)x < (0xffffffff - (uint32)(y-1))) ? \ - ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y))) : \ - 0U) -/* Variant of TIFFhowmany_32() that doesn't return 0 if x close to MAXUINT. */ -/* Caution: TIFFhowmany_32_maxuint_compat(x,y)*y might overflow */ -#define TIFFhowmany_32_maxuint_compat(x, y) \ - (((uint32)(x) / (uint32)(y)) + ((((uint32)(x) % (uint32)(y)) != 0) ? 1 : 0)) -#define TIFFhowmany8_32(x) (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3) -#define TIFFroundup_32(x, y) (TIFFhowmany_32(x,y)*(y)) -#define TIFFhowmany_64(x, y) ((((uint64)(x))+(((uint64)(y))-1))/((uint64)(y))) -#define TIFFhowmany8_64(x) (((x)&0x07)?((uint64)(x)>>3)+1:(uint64)(x)>>3) -#define TIFFroundup_64(x, y) (TIFFhowmany_64(x,y)*(y)) - -/* Safe multiply which returns zero if there is an integer overflow */ -#define TIFFSafeMultiply(t,v,m) ((((t)(m) != (t)0) && (((t)(((v)*(m))/(m))) == (t)(v))) ? (t)((v)*(m)) : (t)0) - -#define TIFFmax(A,B) ((A)>(B)?(A):(B)) -#define TIFFmin(A,B) ((A)<(B)?(A):(B)) - -#define TIFFArrayCount(a) (sizeof (a) / sizeof ((a)[0])) - -/* - Support for large files. - - Windows read/write APIs support only 'unsigned int' rather than 'size_t'. - Windows off_t is only 32-bit, even in 64-bit builds. -*/ -#if defined(HAVE_FSEEKO) -/* - Use fseeko() and ftello() if they are available since they use - 'off_t' rather than 'long'. It is wrong to use fseeko() and - ftello() only on systems with special LFS support since some systems - (e.g. FreeBSD) support a 64-bit off_t by default. - - For MinGW, __MSVCRT_VERSION__ must be at least 0x800 to expose these - interfaces. The MinGW compiler must support the requested version. MinGW - does not distribute the CRT (it is supplied by Microsoft) so the correct CRT - must be available on the target computer in order for the program to run. -*/ -#if defined(HAVE_FSEEKO) -# define fseek(stream,offset,whence) fseeko(stream,offset,whence) -# define ftell(stream,offset,whence) ftello(stream,offset,whence) -#endif -#endif -#if defined(__WIN32__) && \ - !(defined(_MSC_VER) && _MSC_VER < 1400) && \ - !(defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < 0x800) -typedef unsigned int TIFFIOSize_t; -#define _TIFF_lseek_f(fildes,offset,whence) _lseeki64(fildes,/* __int64 */ offset,whence) -/* #define _TIFF_tell_f(fildes) /\* __int64 *\/ _telli64(fildes) */ -#define _TIFF_fseek_f(stream,offset,whence) _fseeki64(stream,/* __int64 */ offset,whence) -#define _TIFF_fstat_f(fildes,stat_buff) _fstati64(fildes,/* struct _stati64 */ stat_buff) -/* #define _TIFF_ftell_f(stream) /\* __int64 *\/ _ftelli64(stream) */ -/* #define _TIFF_stat_f(path,stat_buff) _stati64(path,/\* struct _stati64 *\/ stat_buff) */ -#define _TIFF_stat_s struct _stati64 -#define _TIFF_off_t __int64 -#else -typedef size_t TIFFIOSize_t; -#define _TIFF_lseek_f(fildes,offset,whence) lseek(fildes,offset,whence) -/* #define _TIFF_tell_f(fildes) (_TIFF_lseek_f(fildes,0,SEEK_CUR)) */ -#define _TIFF_fseek_f(stream,offset,whence) fseek(stream,offset,whence) -#define _TIFF_fstat_f(fildes,stat_buff) fstat(fildes,stat_buff) -/* #define _TIFF_ftell_f(stream) ftell(stream) */ -/* #define _TIFF_stat_f(path,stat_buff) stat(path,stat_buff) */ -#define _TIFF_stat_s struct stat -#define _TIFF_off_t off_t -#endif - -#if defined(__has_attribute) && defined(__clang__) -#if __has_attribute(no_sanitize) -#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW __attribute__((no_sanitize("unsigned-integer-overflow"))) -#else -#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -#endif -#else -#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -#endif - - -#if defined(__cplusplus) -extern "C" { -#endif -extern int _TIFFgetMode(const char* mode, const char* module); -extern int _TIFFNoRowEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s); -extern int _TIFFNoStripEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s); -extern int _TIFFNoTileEncode(TIFF*, uint8* pp, tmsize_t cc, uint16 s); -extern int _TIFFNoRowDecode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s); -extern int _TIFFNoStripDecode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s); -extern int _TIFFNoTileDecode(TIFF*, uint8* pp, tmsize_t cc, uint16 s); -extern void _TIFFNoPostDecode(TIFF* tif, uint8* buf, tmsize_t cc); -extern int _TIFFNoPreCode(TIFF* tif, uint16 s); -extern int _TIFFNoSeek(TIFF* tif, uint32 off); -extern void _TIFFSwab16BitData(TIFF* tif, uint8* buf, tmsize_t cc); -extern void _TIFFSwab24BitData(TIFF* tif, uint8* buf, tmsize_t cc); -extern void _TIFFSwab32BitData(TIFF* tif, uint8* buf, tmsize_t cc); -extern void _TIFFSwab64BitData(TIFF* tif, uint8* buf, tmsize_t cc); -extern int TIFFFlushData1(TIFF* tif); -extern int TIFFDefaultDirectory(TIFF* tif); -extern void _TIFFSetDefaultCompressionState(TIFF* tif); -extern int _TIFFRewriteField(TIFF *, uint16, TIFFDataType, tmsize_t, void *); -extern int TIFFSetCompressionScheme(TIFF* tif, int scheme); -extern int TIFFSetDefaultCompressionState(TIFF* tif); -extern uint32 _TIFFDefaultStripSize(TIFF* tif, uint32 s); -extern void _TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th); -extern int _TIFFDataSize(TIFFDataType type); - -extern void _TIFFsetByteArray(void**, void*, uint32); -extern void _TIFFsetString(char**, char*); -extern void _TIFFsetShortArray(uint16**, uint16*, uint32); -extern void _TIFFsetLongArray(uint32**, uint32*, uint32); -extern void _TIFFsetFloatArray(float**, float*, uint32); -extern void _TIFFsetDoubleArray(double**, double*, uint32); - -extern void _TIFFprintAscii(FILE*, const char*); -extern void _TIFFprintAsciiTag(FILE*, const char*, const char*); - -extern TIFFErrorHandler _TIFFwarningHandler; -extern TIFFErrorHandler _TIFFerrorHandler; -extern TIFFErrorHandlerExt _TIFFwarningHandlerExt; -extern TIFFErrorHandlerExt _TIFFerrorHandlerExt; - -extern uint32 _TIFFMultiply32(TIFF*, uint32, uint32, const char*); -extern uint64 _TIFFMultiply64(TIFF*, uint64, uint64, const char*); -extern void* _TIFFCheckMalloc(TIFF*, tmsize_t, tmsize_t, const char*); -extern void* _TIFFCheckRealloc(TIFF*, void*, tmsize_t, tmsize_t, const char*); - -extern double _TIFFUInt64ToDouble(uint64); -extern float _TIFFUInt64ToFloat(uint64); - -extern tmsize_t -_TIFFReadEncodedStripAndAllocBuffer(TIFF* tif, uint32 strip, - void **buf, tmsize_t bufsizetoalloc, - tmsize_t size_to_read); -extern tmsize_t -_TIFFReadEncodedTileAndAllocBuffer(TIFF* tif, uint32 tile, - void **buf, tmsize_t bufsizetoalloc, - tmsize_t size_to_read); -extern tmsize_t -_TIFFReadTileAndAllocBuffer(TIFF* tif, - void **buf, tmsize_t bufsizetoalloc, - uint32 x, uint32 y, uint32 z, uint16 s); -extern int _TIFFSeekOK(TIFF* tif, toff_t off); - -extern int TIFFInitDumpMode(TIFF*, int); -#ifdef PACKBITS_SUPPORT -extern int TIFFInitPackBits(TIFF*, int); -#endif -#ifdef CCITT_SUPPORT -extern int TIFFInitCCITTRLE(TIFF*, int), TIFFInitCCITTRLEW(TIFF*, int); -extern int TIFFInitCCITTFax3(TIFF*, int), TIFFInitCCITTFax4(TIFF*, int); -#endif -#ifdef THUNDER_SUPPORT -extern int TIFFInitThunderScan(TIFF*, int); -#endif -#ifdef NEXT_SUPPORT -extern int TIFFInitNeXT(TIFF*, int); -#endif -#ifdef LZW_SUPPORT -extern int TIFFInitLZW(TIFF*, int); -#endif -#ifdef OJPEG_SUPPORT -extern int TIFFInitOJPEG(TIFF*, int); -#endif -#ifdef JPEG_SUPPORT -extern int TIFFInitJPEG(TIFF*, int); -extern int TIFFJPEGIsFullStripRequired(TIFF*); -#endif -#ifdef JBIG_SUPPORT -extern int TIFFInitJBIG(TIFF*, int); -#endif -#ifdef ZIP_SUPPORT -extern int TIFFInitZIP(TIFF*, int); -#endif -#ifdef PIXARLOG_SUPPORT -extern int TIFFInitPixarLog(TIFF*, int); -#endif -#ifdef LOGLUV_SUPPORT -extern int TIFFInitSGILog(TIFF*, int); -#endif -#ifdef LZMA_SUPPORT -extern int TIFFInitLZMA(TIFF*, int); -#endif -#ifdef ZSTD_SUPPORT -extern int TIFFInitZSTD(TIFF*, int); -#endif -#ifdef VMS -extern const TIFFCodec _TIFFBuiltinCODECS[]; -#else -extern TIFFCodec _TIFFBuiltinCODECS[]; -#endif - -#if defined(__cplusplus) -} -#endif -#endif /* _TIFFIOP_ */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiffvers.h b/Dependencies/FreeImage/Source/LibTIFF4/tiffvers.h deleted file mode 100644 index 70686c8..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiffvers.h +++ /dev/null @@ -1,9 +0,0 @@ -#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.9\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." -/* - * This define can be used in code that requires - * compilation-related definitions specific to a - * version or versions of the library. Runtime - * version checking should be done based on the - * string returned by TIFFGetVersion. - */ -#define TIFFLIB_VERSION 20171118 diff --git a/Dependencies/FreeImage/Source/LibTIFF4/tiffvers.h.in b/Dependencies/FreeImage/Source/LibTIFF4/tiffvers.h.in deleted file mode 100644 index c855630..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/tiffvers.h.in +++ /dev/null @@ -1,9 +0,0 @@ -#define TIFFLIB_VERSION_STR "LIBTIFF, Version LIBTIFF_VERSION\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." -/* - * This define can be used in code that requires - * compilation-related definitions specific to a - * version or versions of the library. Runtime - * version checking should be done based on the - * string returned by TIFFGetVersion. - */ -#define TIFFLIB_VERSION LIBTIFF_RELEASE_DATE diff --git a/Dependencies/FreeImage/Source/LibTIFF4/uvcode.h b/Dependencies/FreeImage/Source/LibTIFF4/uvcode.h deleted file mode 100644 index fcbfdd3..0000000 --- a/Dependencies/FreeImage/Source/LibTIFF4/uvcode.h +++ /dev/null @@ -1,180 +0,0 @@ -/* Version 1.0 generated April 7, 1997 by Greg Ward Larson, SGI */ -#define UV_SQSIZ (float)0.003500 -#define UV_NDIVS 16289 -#define UV_VSTART (float)0.016940 -#define UV_NVS 163 -static const struct { - float ustart; - short nus, ncum; -} uv_row[UV_NVS] = { - { (float)0.247663, 4, 0 }, - { (float)0.243779, 6, 4 }, - { (float)0.241684, 7, 10 }, - { (float)0.237874, 9, 17 }, - { (float)0.235906, 10, 26 }, - { (float)0.232153, 12, 36 }, - { (float)0.228352, 14, 48 }, - { (float)0.226259, 15, 62 }, - { (float)0.222371, 17, 77 }, - { (float)0.220410, 18, 94 }, - { (float)0.214710, 21, 112 }, - { (float)0.212714, 22, 133 }, - { (float)0.210721, 23, 155 }, - { (float)0.204976, 26, 178 }, - { (float)0.202986, 27, 204 }, - { (float)0.199245, 29, 231 }, - { (float)0.195525, 31, 260 }, - { (float)0.193560, 32, 291 }, - { (float)0.189878, 34, 323 }, - { (float)0.186216, 36, 357 }, - { (float)0.186216, 36, 393 }, - { (float)0.182592, 38, 429 }, - { (float)0.179003, 40, 467 }, - { (float)0.175466, 42, 507 }, - { (float)0.172001, 44, 549 }, - { (float)0.172001, 44, 593 }, - { (float)0.168612, 46, 637 }, - { (float)0.168612, 46, 683 }, - { (float)0.163575, 49, 729 }, - { (float)0.158642, 52, 778 }, - { (float)0.158642, 52, 830 }, - { (float)0.158642, 52, 882 }, - { (float)0.153815, 55, 934 }, - { (float)0.153815, 55, 989 }, - { (float)0.149097, 58, 1044 }, - { (float)0.149097, 58, 1102 }, - { (float)0.142746, 62, 1160 }, - { (float)0.142746, 62, 1222 }, - { (float)0.142746, 62, 1284 }, - { (float)0.138270, 65, 1346 }, - { (float)0.138270, 65, 1411 }, - { (float)0.138270, 65, 1476 }, - { (float)0.132166, 69, 1541 }, - { (float)0.132166, 69, 1610 }, - { (float)0.126204, 73, 1679 }, - { (float)0.126204, 73, 1752 }, - { (float)0.126204, 73, 1825 }, - { (float)0.120381, 77, 1898 }, - { (float)0.120381, 77, 1975 }, - { (float)0.120381, 77, 2052 }, - { (float)0.120381, 77, 2129 }, - { (float)0.112962, 82, 2206 }, - { (float)0.112962, 82, 2288 }, - { (float)0.112962, 82, 2370 }, - { (float)0.107450, 86, 2452 }, - { (float)0.107450, 86, 2538 }, - { (float)0.107450, 86, 2624 }, - { (float)0.107450, 86, 2710 }, - { (float)0.100343, 91, 2796 }, - { (float)0.100343, 91, 2887 }, - { (float)0.100343, 91, 2978 }, - { (float)0.095126, 95, 3069 }, - { (float)0.095126, 95, 3164 }, - { (float)0.095126, 95, 3259 }, - { (float)0.095126, 95, 3354 }, - { (float)0.088276, 100, 3449 }, - { (float)0.088276, 100, 3549 }, - { (float)0.088276, 100, 3649 }, - { (float)0.088276, 100, 3749 }, - { (float)0.081523, 105, 3849 }, - { (float)0.081523, 105, 3954 }, - { (float)0.081523, 105, 4059 }, - { (float)0.081523, 105, 4164 }, - { (float)0.074861, 110, 4269 }, - { (float)0.074861, 110, 4379 }, - { (float)0.074861, 110, 4489 }, - { (float)0.074861, 110, 4599 }, - { (float)0.068290, 115, 4709 }, - { (float)0.068290, 115, 4824 }, - { (float)0.068290, 115, 4939 }, - { (float)0.068290, 115, 5054 }, - { (float)0.063573, 119, 5169 }, - { (float)0.063573, 119, 5288 }, - { (float)0.063573, 119, 5407 }, - { (float)0.063573, 119, 5526 }, - { (float)0.057219, 124, 5645 }, - { (float)0.057219, 124, 5769 }, - { (float)0.057219, 124, 5893 }, - { (float)0.057219, 124, 6017 }, - { (float)0.050985, 129, 6141 }, - { (float)0.050985, 129, 6270 }, - { (float)0.050985, 129, 6399 }, - { (float)0.050985, 129, 6528 }, - { (float)0.050985, 129, 6657 }, - { (float)0.044859, 134, 6786 }, - { (float)0.044859, 134, 6920 }, - { (float)0.044859, 134, 7054 }, - { (float)0.044859, 134, 7188 }, - { (float)0.040571, 138, 7322 }, - { (float)0.040571, 138, 7460 }, - { (float)0.040571, 138, 7598 }, - { (float)0.040571, 138, 7736 }, - { (float)0.036339, 142, 7874 }, - { (float)0.036339, 142, 8016 }, - { (float)0.036339, 142, 8158 }, - { (float)0.036339, 142, 8300 }, - { (float)0.032139, 146, 8442 }, - { (float)0.032139, 146, 8588 }, - { (float)0.032139, 146, 8734 }, - { (float)0.032139, 146, 8880 }, - { (float)0.027947, 150, 9026 }, - { (float)0.027947, 150, 9176 }, - { (float)0.027947, 150, 9326 }, - { (float)0.023739, 154, 9476 }, - { (float)0.023739, 154, 9630 }, - { (float)0.023739, 154, 9784 }, - { (float)0.023739, 154, 9938 }, - { (float)0.019504, 158, 10092 }, - { (float)0.019504, 158, 10250 }, - { (float)0.019504, 158, 10408 }, - { (float)0.016976, 161, 10566 }, - { (float)0.016976, 161, 10727 }, - { (float)0.016976, 161, 10888 }, - { (float)0.016976, 161, 11049 }, - { (float)0.012639, 165, 11210 }, - { (float)0.012639, 165, 11375 }, - { (float)0.012639, 165, 11540 }, - { (float)0.009991, 168, 11705 }, - { (float)0.009991, 168, 11873 }, - { (float)0.009991, 168, 12041 }, - { (float)0.009016, 170, 12209 }, - { (float)0.009016, 170, 12379 }, - { (float)0.009016, 170, 12549 }, - { (float)0.006217, 173, 12719 }, - { (float)0.006217, 173, 12892 }, - { (float)0.005097, 175, 13065 }, - { (float)0.005097, 175, 13240 }, - { (float)0.005097, 175, 13415 }, - { (float)0.003909, 177, 13590 }, - { (float)0.003909, 177, 13767 }, - { (float)0.002340, 177, 13944 }, - { (float)0.002389, 170, 14121 }, - { (float)0.001068, 164, 14291 }, - { (float)0.001653, 157, 14455 }, - { (float)0.000717, 150, 14612 }, - { (float)0.001614, 143, 14762 }, - { (float)0.000270, 136, 14905 }, - { (float)0.000484, 129, 15041 }, - { (float)0.001103, 123, 15170 }, - { (float)0.001242, 115, 15293 }, - { (float)0.001188, 109, 15408 }, - { (float)0.001011, 103, 15517 }, - { (float)0.000709, 97, 15620 }, - { (float)0.000301, 89, 15717 }, - { (float)0.002416, 82, 15806 }, - { (float)0.003251, 76, 15888 }, - { (float)0.003246, 69, 15964 }, - { (float)0.004141, 62, 16033 }, - { (float)0.005963, 55, 16095 }, - { (float)0.008839, 47, 16150 }, - { (float)0.010490, 40, 16197 }, - { (float)0.016994, 31, 16237 }, - { (float)0.023659, 21, 16268 }, -}; -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/Dependencies/FreeImage/Source/LibWebP/AUTHORS b/Dependencies/FreeImage/Source/LibWebP/AUTHORS deleted file mode 100644 index f9a33c9..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/AUTHORS +++ /dev/null @@ -1,39 +0,0 @@ -Contributors: -- Charles Munger (clm at google dot com) -- Christian Duvivier (cduvivier at google dot com) -- Djordje Pesut (djordje dot pesut at imgtec dot com) -- Hui Su (huisu at google dot com) -- James Zern (jzern at google dot com) -- Jan Engelhardt (jengelh at medozas dot de) -- Jehan (jehan at girinstud dot io) -- Johann (johann dot koenig at duck dot com) -- Jovan Zelincevic (jovan dot zelincevic at imgtec dot com) -- Jyrki Alakuijala (jyrki at google dot com) -- Lode Vandevenne (lode at google dot com) -- Lou Quillio (louquillio at google dot com) -- Mans Rullgard (mans at mansr dot com) -- Marcin Kowalczyk (qrczak at google dot com) -- Martin Olsson (mnemo at minimum dot se) -- Mikołaj Zalewski (mikolajz at google dot com) -- Mislav Bradac (mislavm at google dot com) -- Nico Weber (thakis at chromium dot org) -- Noel Chromium (noel at chromium dot org) -- Owen Rodley (orodley at google dot com) -- Parag Salasakar (img dot mips1 at gmail dot com) -- Pascal Massimino (pascal dot massimino at gmail dot com) -- Paweł Hajdan, Jr (phajdan dot jr at chromium dot org) -- Pierre Joye (pierre dot php at gmail dot com) -- Sam Clegg (sbc at chromium dot org) -- Scott Hancher (seh at google dot com) -- Scott LaVarnway (slavarnway at google dot com) -- Scott Talbot (s at chikachow dot org) -- Slobodan Prijic (slobodan dot prijic at imgtec dot com) -- Somnath Banerjee (somnath dot banerjee at gmail dot com) -- Sriraman Tallam (tmsriram at google dot com) -- Tamar Levy (tamar dot levy at intel dot com) -- Timothy Gu (timothygu99 at gmail dot com) -- Urvang Joshi (urvang at google dot com) -- Vikas Arora (vikasa at google dot com) -- Vincent Rabaud (vrabaud at google dot com) -- Vlad Tsyrklevich (vtsyrklevich at chromium dot org) -- Yang Zhang (yang dot zhang at arm dot com) diff --git a/Dependencies/FreeImage/Source/LibWebP/COPYING b/Dependencies/FreeImage/Source/LibWebP/COPYING deleted file mode 100644 index 947fb3e..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/COPYING +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (c) 2010, Google Inc. 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 Google nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Dependencies/FreeImage/Source/LibWebP/ChangeLog b/Dependencies/FreeImage/Source/LibWebP/ChangeLog deleted file mode 100644 index 9eb60c3..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/ChangeLog +++ /dev/null @@ -1,3852 +0,0 @@ -8d510751 webp-container-spec: correct frame duration=0 note -e6b2164e vwebp: Copy Chrome's behavior w/frame duration == 0 -d20b7707 update ChangeLog (tag: v1.0.0-rc3) -0d5fad46 add WEBP_DSP_INIT / WEBP_DSP_INIT_FUNC -c1cb86af fix 16b overflow in SSE2 -e577feb7 makefile.unix: add DEBUG flag for compiling w/ debug-symbol -99be34b3 cwebp,get_disto: fix bpp output -f5565ca8 cmake: Make sure we use near-lossless by default. -d898dc14 fix bug in WebPImport565: alpha value was not set -882784b0 update ChangeLog (tag: v1.0.0-rc2) -2f930e08 Revert "Use proper targets for CMake." -8165e8fb Use proper targets for CMake. -3f157dd5 Remove some very hard TODOs. -cd758a17 {de,}mux/Makefile.am: add missing headers -b892b8ba makefile.unix,dist: use ascii for text output -64a57d05 add -version option to anim_dump,anim_diff and img2webp -fc1b8e3a webp_js: fix webp_js demo html -15aa48d9 update ChangeLog (tag: v1.0.0-rc1) -e607dabc update AUTHORS -38410c08 [CFI] Remove function pointer casts -c57b2736 bump version to 1.0.0 -cba28853 update NEWS -c909d531 Merge "remove some deprecation warning on MacOSX" -217443c7 remove some deprecation warning on MacOSX -b672bdfa configure: quiet glut deprecation warnings on OS X -daa9fcaf configure: use sdl-config if available -dd174cae Merge "imagedec: support metadata reading for WebP image decoding" -641cedcc imagedec: support metadata reading for WebP image decoding -065b2ce1 anim_diff: add a couple missing newlines in Help() -c4cc1147 Merge "gif2webp: force low duration frames to 100ms" -09333097 gif2webp: force low duration frames to 100ms -e03f0ec3 sharp_yuv: use 14b fixed-point precision for gamma -b2db361c image_enc,WebPWritePNG: move locals after setjmp -74e82ec6 Merge "WebPPictureDistortion: fix big-endian results order" -645d04ca Merge "cwebp,get_disto: report bpp" -120f58c3 Merge "lossless*sse2: improve non-const 16-bit vector creation" -a7fe9412 WebPPictureDistortion: fix big-endian results order -e26fe066 cwebp,get_disto: report bpp -9df64e28 Merge changes Id5b4a1a4,Ia20ce844 -8043504f lossless*sse2: improve non-const 16-bit vector creation -1e3dfc48 Import: extract condition from loop -3b07d327 Import,RGBA: fix for BigEndian import -551948e4 Remove unused argument in VP8LBitsEntropy. -3005237a ReadWebP: fix for big-endian -499c395a Merge "anim_diff: expose the -max_diff option" -f69dcd69 Merge "remove WEBP_EXPERIMENTAL_FEATURES" -07d884d5 anim_diff: expose the -max_diff option -f4dd9256 remove WEBP_EXPERIMENTAL_FEATURES -94a8377b extract the command-line parsing helpers to example_util -fc09e6e2 PNM decoder: prevent unsupported depth=2 PAM case. -6de58603 MIPS64: Fix defined-but-not-used errors with WEBP_REDUCE_CSP -cbde5728 gif2webp: add support for reading from stdin -cf1c5054 Add an SSE4 version of some lossless color transforms. -45a8b5eb Fix lint error with man page. -cff38e8f Merge "PNG decoder: handle gAMA chunk" -59cb1a48 Merge "enable dc error-diffusion always" -78318b30 PNG decoder: handle gAMA chunk -664c21dd Merge "remove some TODOs" -815652de enable dc error-diffusion always -aec45cec remove some TODOs -5715dfce fix block-count[] increment in case of large image -c2d04f3e enable DC error-diffusion always for multi-pass -96bf07c5 use DC error diffusion for U/V at low-quality -1c59020b fix missing sse41 targets in makefile.unix -7a8e814b cosmetics: s/color_space/colorspace/ -05f6fe24 upsampling: rm asserts w/REDUCE_CSP+OMIT_C_CODE -b4cf5597 Merge "Upsampling SSE2/SSE4 speedup." -ccbeb32c Makefile.vc: add missing sse41 files -55403a9a Upsampling SSE2/SSE4 speedup. -807b53c4 Implement the upsampling/yuv functions in SSE41 -84101a81 Fix wasm WebP compilation -8bebd2a3 fix warning on MSVC -a7f93fe3 webpmux: allow reading argument from a file -b69f18a7 gif2webp.1: fix -loop_compatibility layout -72d530c0 Merge "fix lossless decoding w/WEBP_REDUCE_SIZE" -296c7dc4 fix lossless decoding w/WEBP_REDUCE_SIZE -0d5d029c Merge "ImgIoUtilReadFile: fix file leak upon error" -ae568ce7 ImgIoUtilReadFile: fix file leak upon error -796b5a8a Merge tag 'v0.6.1' -6b7a95fd update ChangeLog (tag: v0.6.1) -f66955de WEBP_REDUCE_CSP: restrict colorspace support -1af0df76 Merge "WEBP_REDUCE_CSP: restrict colorspace support" -6de20df0 WEBP_REDUCE_CSP: restrict colorspace support -a289d8e7 update ChangeLog (tag: v0.6.1-rc2) -c10a493c vwebp: disable double buffering on windows & mac -0d4466c2 webp_to_sdl.c: fix file mode -1b27bf8b WEBP_REDUCE_SIZE: disable all rescaler code -126be109 webpinfo: add -version option -0df22b9e WEBP_REDUCE_SIZE: disable all rescaler code -9add62b5 bump version to 0.6.1 -d3e26144 update NEWS -2edda639 README: add webpinfo section -9ca568ef Merge "right-size some tables" -31f1995c Merge "SSE2 implementation of HasAlphaXXX" -a80c46bd SSE2 implementation of HasAlphaXXX -083507f2 right-size some tables -2e5785b2 anim_utils.c: remove warning when !defined(WEBP_HAVE_GIF) -b299c47e add WEBP_REDUCE_SIZE -f593d71a enc: disable pic->stats/extra_info w/WEBP_DISABLE_STATS -541179a9 Merge "predictor_enc: fix build w/--disable-near-lossless" -5755a7ec predictor_enc: fix build w/--disable-near-lossless -eab5bab7 add WEBP_DISABLE_STATS -8052c585 remove some petty TODOs from vwebp. -c245343d move LOAD8x4 and STORE8x2 closer to their use location -b9e734fd dec,cosmetics: normalize function naming style -c188d546 dec: harmonize function suffixes -28c5ac81 dec_sse41: harmonize function suffixes -e65b72a3 Merge "introduce WebPHasAlpha8b and WebPHasAlpha32b" -b94cee98 dec_sse2: remove HE8uv_SSE2 -44a0ee3f introduce WebPHasAlpha8b and WebPHasAlpha32b -aebf59ac Merge "WebPPictureAllocARGB: align argb allocation" -c184665e WebPPictureAllocARGB: align argb allocation -3daf7509 WebPParseHeaders: remove obsolete animation TODO -80285d97 cmake: avoid security warnings under msvc -650eac55 cmake: don't set -Wall with MSVC -c462cd00 Remove useless code. -01a98217 Merge "remove WebPWorkerImpl declaration from the header" -3c49fc47 Merge "thread_utils: fix potentially bad call to Execute" -fde2782e thread_utils: fix potentially bad call to Execute -2a270c1d remove WebPWorkerImpl declaration from the header -f1f437cc remove mention of 'lossy-only parameters' from the doc -3879074d Merge "WebPMemToUint32: remove ptr cast to int" -04b029d2 WebPMemToUint32: remove ptr cast to int -b7971d0e dsp: avoid defining _C functions w/NEON builds -6ba98764 webpdec: correct alloc size check w/use_argb -5cfb3b0f normalize include guards -f433205e Merge changes Ia17c7dfc,I75423abb,Ia2f716b4,I161caa14,I4210081a, ... -8d033b14 {dec,enc}_neon: harmonize function suffixes x2 -0295e981 upsampling_neon: harmonize function suffixes -d572c4e5 yuv_neon: harmonize function suffixes -ab9c2500 rescaler_neon: harmonize function suffixes -93e0ce27 lossless_neon: harmonize function suffixes -22fbc50e lossless_enc_neon: harmonize function suffixes -447875b4 filters_neon,cosmetics: fix indent -e51bdd43 remove unused VP8TokenToStats() function -785da7ea enc_neon: harmonize function suffixes -bc1a251f dec_neon: harmonize function suffixes -61e535f1 dsp/lossless: workaround gcc-4.8 bug on arm -68b2eab7 cwebp: fix alpha reporting w/lossless & metadata -30042faa WebPDemuxGetI: add doc details around WebPFormatFeature -0a17f471 Merge "WIP: list includes as descendants of the project dir" -a4399721 WIP: list includes as descendants of the project dir -08275708 Merge "Make sure we reach the full range for alpha blending." -d361a6a7 yuv_sse2: harmonize function suffixes -6921aa6f upsampling_sse2: harmonize function suffixes -08c67d3e ssim_sse2: harmonize function suffixes -582a1b57 rescaler_sse2: harmonize function suffixes -2c1b18ba lossless_sse2: harmonize function suffixes -0ac46e81 lossless_enc_sse2: harmonize function suffixes -bc634d57 enc_sse2: harmonize function suffixes -bcb7347c dec_sse2: harmonize function suffixes -e14ad93c Make sure we reach the full range for alpha blending. -7038ca8d demux,StoreFrame: restore hdr size check to min req -fb3daad6 cpu: fix ssse3 check -be590e06 Merge "Fix CMake redefinition for HAVE_CPU_FEATURES_H" -35f736e1 Fix CMake redefinition for HAVE_CPU_FEATURES_H -a5216efc Fix integer overflow warning. -a9c8916b decode.h,WebPIDecGetRGB: clarify output ptr validity -3c74c645 gif2webp: handle 1-frame case properly + fix anim_diff -c7f295d3 Merge "gif2webp: introduce -loop_compatibility option" -b4e04677 gif2webp: introduce -loop_compatibility option -f78da3de add LOCAL_CLANG_PREREQ and avoid WORK_AROUND_GCC w/3.8+ -01c426f1 define WEBP_USE_INTRINSICS w/gcc-4.9+ -8635973d use sdl-config (if available) to determine the link flags -e9459382 use CPPFLAGS before CFLAGS -4a9d788e Merge "Android.mk,mips: fix clang build with r15" -4fbdc9fb Android.mk,mips: fix clang build with r15 -a80fcc4a ifdef code not used by Chrome/Android. -3993af12 Fix signed integer overflows. -f66f94ef anim_dump: small tool to dump frames from animated WebP -6eba857b Merge "rationalize the Makefile.am" -c5e34fba function definition cleanup -3822762a rationalize the Makefile.am -501ef6e4 configure style fix: animdiff -> anim_diff -f8bdc268 Merge "protect against NULL dump_folder[] value in ReadAnimatedImage()" -23bfc652 protect against NULL dump_folder[] value in ReadAnimatedImage() -8dc3d71b cosmetics,ReadAnimatedWebP: correct function comment -5bd40066 Merge changes I66a64a0a,I4d2e520f -7945575c cosmetics,webpinfo: remove an else after a return -8729fa11 cosmetics,cwebp: remove an else after a return -f324b7f9 cosmetics: normalize fn proto & decl param names -869eb369 CMake cleanups. -289e62a3 Remove declaration of unimplemented VP8ApplyNearLosslessPredict -20a94186 pnmdec,PAM: validate depth before calculating bytes_per_px -34130afe anim_encode: fix integer overflow -42c79aa6 Merge "Encoder: harmonize function suffixes" -b09307dc Encoder: harmonize function suffixes -bed0456d Merge "SSIM: harmonize the function suffix" -54f6a3cf lossless_sse2.c: fix some missed suffix changes -088f1dcc SSIM: harmonize the function suffix -86fc4dd9 webpdec: use ImgIoUtilCheckSizeArgumentsOverflow -08ea9ecd imageio: add ability restrict max image size -6f9daa4a jpegdec,ReadError: fix leaks on error -a0f72a4f VP8LTransformColorFunc: drop an non-respected 'const' from the signature. -8c934902 Merge "Lossess dec: harmonize the function suffixes" -622242aa Lossess dec: harmonize the function suffixes -1411f027 Lossless Enc: harmonize the function suffixes -24ad2e3c add const to two variables -46efe062 Merge "Allow the lossless cruncher to work for alpha." -8c3f9a47 Speed-up LZ77. -1aef4c71 Allow the lossless cruncher to work for alpha. -b8821dbd Improve the box LZ77 speed. -7beed280 add missing ()s to macro parameters -6473d20b Merge "fix Android standalone toolchain build" -dcefed95 Merge "build.gradle: fix arm64 build" -0c83a8bc Merge "yuv: harmonize suffix naming" -c6d1db4b fix Android standalone toolchain build -663a6d9d unify the ALTERNATE_CODE flag usage -73ea9f27 yuv: harmonize suffix naming -c71b68ac build.gradle: fix arm64 build -c4568b47 Rescaler: harmonize the suffix naming -6cb13b05 Merge "alpha_processing: harmonize the naming suffixes to be _C()" -83a3e69a Merge "simplify WEBP_EXTERN macro" -7295fde2 Merge "filters: harmonize the suffixes naming to _SSE2(), _C(), etc." -8e42ba4c simplify WEBP_EXTERN macro -331ab34b cost*.c: harmonize the suffix namings -b161f670 filters: harmonize the suffixes naming to _SSE2(), _C(), etc. -dec5e4d3 alpha_processing: harmonize the naming suffixes to be _C() -6878d427 fix memory leak in SDL_Init() -461ae555 Merge "configure: fix warnings in sdl check" -62486a22 configure: test for -Wundef -92982609 dsp.h: fix -Wundef w/__mips_dsp_rev -0265cede configure: fix warnings in sdl check -88c73d8a backward_references_enc.h: fix WINDOW_SIZE_BITS check -4ea49f6b rescaler_sse2.c: fix WEBP_RESCALER_FIX -> _RFIX typo -1b526638 Clean-up some CMake -87f57a4b Merge "cmake: fix gif lib detection when cross compiling" -b34a9db1 cosmetics,dec_sse2: remove some redundant comments -471c5755 cmake: fix gif lib detection when cross compiling -c793417a cmake: disable gif2webp if gif lib isn't found -dcbc1c88 cmake: split gif detection from IMG deps -66ad84f0 Merge "muxread: remove unreachable code" -50ec3ab7 muxread: remove unreachable code -7d67a164 Lossy encoding: smoothen transparent areas to improve compression -e50650c7 Merge "fix signature for DISABLE_TOKEN_BUFFER compilation" -671d2567 fix signature for DISABLE_TOKEN_BUFFER compilation -d6755580 cpu.cmake: use unique flag to test simd disable flags -28914528 Merge "Remove the argb* files." -8acb4942 Remove the argb* files. -3b62347b README: correct cmake invocation note -7ca0df13 Have the SSE2 version of PackARGB use common code. -7b250459 Merge "Re-use the transformed image when trying several LZ77 in lossless." -e132072f Re-use the transformed image when trying several LZ77 in lossless. -5d7a50ef Get code to compile in C++. -7b012987 configure: test for -Wparentheses-equality -f0569adb Fix man pages for multi-threading. -f1d5a397 multithread cruncher: only copy stats when picture->stats != NULL -f8c2ac15 Multi-thread the lossless cruncher. -a88c6522 Merge "Integrate a new LZ77 looking for matches in the neighborhood of a pixel only." -8f6df1d0 Unroll Predictors 10, 11 and 12. -355c3d1b Integrate a new LZ77 looking for matches in the neighborhood of a pixel only. -a1779a01 Refactor LZ77 handling in preparation for a new method. -67de68b5 Android.mk/build.gradle: fix mips build with clang from r14b -f209a548 Use the plane code and not the distance when computing statistics. -b903b80c Split cost-based backward references in its own file. -498cad34 Cosmetic changes in backward reference. -e4eb4587 lossless, VP8LTransformColor_C: make sure no overflow happens with colors. -af6deaff webpinfo: handle alpha flag mismatch -7caef29b Fix typo that creeped in. -39e19f92 Merge "near lossless: fix unsigned int overflow warnings." -9bbc0891 near lossless: fix unsigned int overflow warnings. -e1118d62 Merge "cosmetics,FindClosestDiscretized: use uint in mask creation" -186bc9b7 Merge "webpinfo: tolerate ALPH+VP8L" -b5887297 cosmetics,FindClosestDiscretized: use uint in mask creation -f1784aee near_lossless,FindClosestDiscretized: use unsigned ops -0d20abb3 webpinfo: tolerate ALPH+VP8L -972104b3 webpmux: tolerate false positive Alpha flag -dd7e83cc tiffdec,ReadTIFF: ensure data_size is < tsize_t max -d988eb7b tiffdec,MyRead: quiet -Wshorten-64-to-32 warning -dabda707 webpinfo: add support to parse Alpha bitstream -4c117643 webpinfo: correct background color output, BGRA->ARGB -defc98d7 Doc: clarify the role of quality in WebPConfig. -d78ff780 Merge "Fix code to compile with C++." -c8f14093 Fix code to compile with C++. -497dc6a7 pnmdec: sanitize invalid header output -d78e5867 Merge "configure: test for -Wconstant-conversion" -481e91eb Merge "pnmdec,PAM: set bytes_per_px based on depth when missing" -93b12753 configure: test for -Wconstant-conversion -645f0c53 pnmdec,PAM: set bytes_per_px based on depth when missing -e9154605 Merge "vwebp: activate GLUT double-buffering" -818d795b vwebp: activate GLUT double-buffering -d63e6f4b Add a man page for webpinfo -4d708435 Merge "NEON: implement ConvertRGB24ToY/BGR24/ARGB/RGBA32ToUV/ARGBToUV" -faf42213 NEON: implement ConvertRGB24ToY/BGR24/ARGB/RGBA32ToUV/ARGBToUV -b4d576fa Install man pages with CMake. -cbc1b921 webpinfo: add features to parse bitstream header -e644c556 Fix bad bit writer initialization. -b62cdad2 Merge "Implement a cruncher for lossless at method 6." -da3e4dfb use the exact constant for the gamma transfer function -a9c701e0 Merge "tiffdec: fix EXTRASAMPLES check" -adab8ce0 Implement a cruncher for lossless at method 6. -1b92b237 Merge "Fix VP8ApplyNearLossless to respect const and stride." -1923ff02 tiffdec: fix EXTRASAMPLES check -97cce5ba tiffdec: only request EXTRASAMPLES w/> 3 samples/px -0dcd85b6 Fix VP8ApplyNearLossless to respect const and stride. -f7682189 yuv: rationalize the C/SSE2 function naming -52245424 NEON implementation of some Sharp-YUV420 functions -690efd82 Avoid several backward reference copies. -4bb1f607 src/dec/vp8_dec.h, cosmetics: fix comments -285748be cmake: build/install webpinfo -78fd199c backward_references_enc.c: clear -Wshadow warnings -ae836410 WebPLog2FloorC: clear -Wshadow warning -d0b7404e Merge "WASM support" -134e314f WASM support -c08adb6f Merge "VP8LEnc: remove use of BitsLog2Ceiling()" -28c37ebd VP8LEnc: remove use of BitsLog2Ceiling() -2cb58ab2 webpinfo: output format as a human readable string -bb175a93 Merge "rename some symbols clashing with MSVC headers" -39eda658 Remove a duplicated pixel hash implementation. -36b8274d rename some symbols clashing with MSVC headers -274daf54 Add webpinfo tool. -ec5036e4 add explicit reference to /usr/local/{lib,inc} -18f0dfac Merge "fix TIFF encoder regarding rgbA/RGBA" -4e2b0b50 Merge "webpdec.h: fix a doc typo" -e2eeabff Merge "Install binaries, libraries and headers in CMake." -836607e6 webpdec.h: fix a doc typo -9273e441 fix TIFF encoder regarding rgbA/RGBA -17e3c11f Add limited PAM decoding support -5f624871 Install binaries, libraries and headers in CMake. -976adac1 Merge "lossless incremental decoding: fix missing eos_ test" -f8fad4fa lossless incremental decoding: fix missing eos_ test -27415d41 Merge "vwebp_sdl: fix the makefile.unix" -49566182 Merge "ImgIoUtilWriteFile(): use ImgIoUtilSetBinaryMode" -6f75a51b Analyze the transform entropy on the whole image. -a5e4e3af Use palette only if we can in entropy analysis. -75a9c3c4 Improve compression by better entropy analysis. -39cf6f4f vwebp_sdl: fix the makefile.unix -699b0416 ImgIoUtilWriteFile(): use ImgIoUtilSetBinaryMode -7d985bd1 Fix small entropy analysis bug. -6e7caf06 Optimize the color cache size. -833c9219 More efficient stochastic histogram merge. -5183326b Refactor the greedy histogram merge. -99f6f462 Merge "histogram_enc.c,MyRand: s/ul/u/ for unsigned constants" -80a22186 ssim.c: remove dead include -a128dfff histogram_enc.c,MyRand: s/ul/u/ for unsigned constants -693bf74e move the SSIM calculation code in ssim.c / ssim_sse2.c -10d791ca Merge "Fix the random generator in HistogramCombineStochastic." -fa63a966 Fix the random generator in HistogramCombineStochastic. -16be192f VP8LSetBitPos: remove the eos_ setting -027151ca don't erase the surface before blitting. -4105d565 disable WEBP_USE_XXX optimisations when EMSCRIPTEN is defined -9ee32a75 Merge "WebP-JS: emscripten-based Javascript decoder" -ca9f7b7d WebP-JS: emscripten-based Javascript decoder -868aa690 Perform greedy histogram merge in a unified way. -5b393f2d Merge "fix path typo for vwebp_sdl in Makefile.vc" -e0012bea CMake: only use libwebpdecoder for building dwebp -84c2a7b0 fix path typo for vwebp_sdl in Makefile.vc -1b0e4abf Merge "Add a flag to disable SIMD optimizations." -32263250 Add a flag to disable SIMD optimizations. -b494fdec optimize the ARGB->ARGB Import to use memcpy -f1536039 Merge "ReadWebP: decode directly into a pre-allocated buffer" -e69ed291 ReadWebP: decode directly into a pre-allocated buffer -57d8de8a Merge "vwebp_sdl: simple viewer based on SDL" -5cfd4ebc LZ77 interval speedups. Faster, smaller, simpler. -1e7ad88b PNM header decoder: add some basic numerical validation -17c7890c Merge "Add a decoder only library for WebP in CMake." -be733786 Merge "Add clang build fix for MSA" -03cda0e4 Add a decoder only library for WebP in CMake. -aa893914 Add clang build fix for MSA -31a92e97 Merge "imageio: add limited PNM support for reading" -dcf9d82a imageio: add limited PNM support for reading -6524fcd6 vwebp_sdl: simple viewer based on SDL -6cf24a24 get_disto: fix reference file read -43d472aa Merge tag 'v0.6.0' -50d1a848 update ChangeLog (tag: v0.6.0, origin/0.6.0, 0.6.0) -20a7fea0 extras/Makefile.am: fix libwebpextras.la reference -415f3ffe update ChangeLog (tag: v0.6.0-rc3) -3c6d1224 update NEWS -ee4a4141 update AUTHORS -32ed856f Fix "all|no frames are keyframes" settings. -1c3190b6 Merge "Fix "all|no frames are keyframes" settings." -f4dc56fd disable GradientUnfilter_NEON -4f3e3bbd disable GradientUnfilter_NEON -2dc0bdca Fix "all|no frames are keyframes" settings. -0d8e0588 img2webp: treat -loop as a no-op w/single images -b0450139 ReadImage(): restore size reporting -0ad3b4ef update ChangeLog (tag: v0.6.0-rc2) -6451709e img2webp,get_disto: fix image decode w/WIC builds -92504d21 get_disto: make ReadPicture() return a bool -c3e4b3a9 update NEWS -3363eb6d man/img2webp.1: fix formatting warning -4d1312f2 update NEWS -36c42ea4 bump version to 0.6.0 -bb498a51 update AUTHORS -84cef16f Makefile.vc: fix CFG=debug-dynamic build -919f9e2f Merge "add .rc files for windows dll versioning" -f1ae8af4 Merge ".gitignore: add img2webp" -4689ce16 cwebp: add a -sharp_yuv option for 'sharp' RGB->YUV conversion -79bf46f1 rename the pretentious SmartYUV into SharpYUV -eb1dc89a silently expose use_delta_palette in the WebPConfig API -c85b0dde .gitignore: add img2webp -43d3f01a add .rc files for windows dll versioning -668e1dd4 src/{dec,enc,utils}: give filenames a unique suffix -0e6b7f33 Merge "iosbuild.sh: only add required headers to framework" -29ed6f9a iosbuild.sh: only add required headers to framework -71c53f1a NEON: speed-up strong filtering -73f567ea Merge "get_disto: remove redundant reader check" -9e14276f Merge "makefiles: prune get_disto & webp_quality deps" -99965bac Merge "Makefile.vc: add get_disto.exe, webp_quality.exe" -d4912238 get_disto: remove redundant reader check -ea482409 makefiles: prune get_disto & webp_quality deps -2ede5a19 Makefile.vc: add get_disto.exe, webp_quality.exe -a345068a ARM: speed up bitreader by avoiding tables -1dc82a6b Merge "introduce a generic GetCoeffs() function pointer" -8074b89e introduce a generic GetCoeffs() function pointer -749a45a5 Merge "NEON: implement alpha-filters (horizontal/vertical/gradient)" -74c053b5 Merge "NEON: fix overflow in SSE NxN calculation" -0a3aeff7 Merge "dsp: WebPExtractGreen function for alpha decompression" -1de931c6 NEON: implement alpha-filters (horizontal/vertical/gradient) -9b3aca40 NEON: fix overflow in SSE NxN calculation -1c07a3c6 dsp: WebPExtractGreen function for alpha decompression -9ed5e3e5 use pointers for WebPRescaler's in WebPDecParams -db013a8d Merge "ARM: don't use USE_GENERIC_TREE" -fcd4784d use a 8b table for C-version for clz() -fbb5c473 ARM: don't use USE_GENERIC_TREE -8fda5612 Merge "add a kSlowSSSE3 feature for CPUInfo" -86bbd245 add a kSlowSSSE3 feature for CPUInfo -7c2779e9 Get code to fully compile in C++. -250c3586 Merge "When compiling as C++, avoid narrowing warnings." -c0648ac2 When compiling as C++, avoid narrowing warnings. -0d55f60c 40% faster ApplyAlphaMultiply_SSE2 -49d0280d NEON: implement several alpha-processing functions -48b1e85f SSE2: 15% faster alpha-processing functions -e3b8abbc fix warning from static analysis. -28fe054e SSE2: 30% faster ApplyAlphaMultiply() -f44acd25 Merge "Properly compute the optimal color cache size." -527844fe Properly compute the optimal color cache size. -be0ef639 fix a comment typo -8874b162 Fix a non-deterministic color cache size computation. -d712e20d Do not allow a color cache size bigger than the number of colors. -ecff04f6 re-introduce some comments in Huffman Cost. -259e9828 replace 'ptr + y * stride' by 'ptr += stride' -00b08c88 Merge "NEON: 5% faster conversion to RGB565 and RGBA4444" -0e7f4447 Merge "NEON: faster fancy upsampling" -b016cb91 NEON: faster fancy upsampling -1cb63801 Call the C function to finish off lossless SSE loops only when necessary. -875fafc1 Implement BundleColorMap in SSE2. -3674d49e Merge "remove Clang warnings with unused arch arguments." -f04eb376 Merge tag 'v0.5.2' -341d711c NEON: 5% faster conversion to RGB565 and RGBA4444 -abb54827 remove Clang warnings with unused arch arguments. -ece9684f update ChangeLog (tag: v0.5.2-rc2, tag: v0.5.2, origin/0.5.2, 0.5.2) -aa7744ca anim_util: quiet implicit conv warnings in 32-bit -d9120271 jpegdec: correct ContextFill signature -24eb3940 Remove some errors when compiling the code as C++. -a4a8e5f3 vwebp: clear canvas during resize w/o animation -67c25ad5 vwebp: clear canvas during resize w/o animation -a4bbe4b3 fix indentation -31ca2a80 tiffdec: restore libtiff 3.9.x compatibility -b2f77b57 update NEWS -5ab6d9de AnimEncoder: avoid freeing uninitialized memory pointer. -f29bf582 WebPAnimEncoder: If 'minimize_size' and 'allow_mixed' on, try lossy + lossless. -3ebe1c00 AnimEncoder: avoid freeing uninitialized memory pointer. -df780e0e fix a potential overflow with MALLOC_LIMIT -58fc5078 Merge "PredictorSub: implement fully-SSE2 version" -9cc42167 PredictorSub: implement fully-SSE2 version -0aa1f35c remove dependency of imageio/ to stopwatch.h -cb9ec84b Merge "remove the dependency to stop_watch.[ch] in imageio" -dc0c01fb Merge "anim_util: quiet implicit conv warnings in 32-bit" -827d3c50 Merge "fix a potential overflow with MALLOC_LIMIT" -1e2e25b0 anim_util: quiet implicit conv warnings in 32-bit -218460cd bump version to 0.5.2 -de7d654d update AUTHORS & .mailmap -273367c1 Merge "dsp/lossless.c,cosmetics: fix indent" -76bbcf2e fix a potential overflow with MALLOC_LIMIT -8ac1abfe Merge "jpegdec: correct ContextFill signature" -cb215aed remove the dependency to stop_watch.[ch] in imageio -2423017a dsp/lossless.c,cosmetics: fix indent -74a12b10 iosbuild.sh: add WebPDecoder.framework + encoder -a9cc7621 Merge "iosbuild.sh: add WebPDecoder.framework + encoder" -fbba5bc2 optimize predictor #1 in plain-C For some reason, gcc has hard time inlining this one... -9ae0b3f6 Merge "SSE2: slightly (~2%) faster Predictor #1" -c1f97bd7 SSE2: slightly (~2%) faster Predictor #1 -ea664b89 SSE2: 10% faster Predictor #11 -be7dcc08 AnimEncoder: Correctly skip a frame when sub-rectangle is empty. -40885830 Fix assertions in WebPRescalerExportRow() -1d5046d1 iosbuild.sh: add WebPDecoder.framework + encoder -cec72014 jpegdec: correct ContextFill signature -8f38c72e fix a typo in WebPPictureYUVAToARGB's doc -33ca93f9 systematically call WebPDemuxReleaseIterator() on dec->prev_iter_ -76e19073 doc: use two's complement explicitly for uint8->int8 conversion -f91ba963 Anim_encoder: correctly handle enc->prev_candidate_undecided_ -25d74e65 WebPPictureDistortion(): free() -> WebPSafeFree() -03f1c008 mux/Makefile.am: add missing -lm -58410cd6 fix bug in RefineUsingDistortion() -e168af8c fix filtering auto-adjustment -ed9dec41 fix doc and code snippet for WebPINewDecoder() doc -3c49178f prevent 32b overflow for very large canvas_width / height -9595f290 fix anim_util.c compilation when HAVE_GIF is not defined. -7ec9552c Make gif transparent color to be transparent black -b3fb8bb6 slightly faster Predictor #11 in NEON -9871335f Add a CMake option for WEBP_SWAP_16BIT_CSP. -0ae32226 Fix missing cpu-features for Android. -ab4c8056 cpu.cmake: improve webp_check_compiler_flag output -eec5fa3a Provide support for CMake on Android studio 2.2. -004d5690 Split the main CMake file. -4fe5d588 Android.mk: use -fvisibility=hidden -bd63a31a vwebp: ensure setenv() is available in stdlib.h -363a5681 vwebp: handle window resizing properly -a0d2753f lower WEBP_MAX_ALLOCABLE_MEMORY default -31fe11a5 fix infinite loop in case of PARTITION0 overflow -532215dd Change the rule of picking UV mode in MBAnalyzeBestUVMode() -9c75dbd3 cwebp.1: improve some grammar -af2e05cb vwebp: Clear previous frame when a key triggers a redraw -26ffa296 Add descriptions of default configuration in help info. -7416280d Fix an unsigned integer overflow error in enc/cost.h -13cf1d2e Do token recording and counting in a single loop -eb9a4b97 Reset segment id if we decide not to update segment map -42ebe3b7 configure: fix NEON flag detection under gcc 6 -76ebbfff NEON: implement predictor #13 -95b12a08 Merge "Revert Average3 and Average4" -54ab2e75 Revert Average3 and Average4 -fe12330c 3-5% faster Predictor #5, #6, #7 and #10 for NEON -fbfb3bef ~2% faster predictor #10 for NEON -d4b7d801 lossless_sse2: use the local functions -a5e3b225 Lossless decoder SSE2 improvements. -58a1f124 ~2% faster predictor #12 in NEON. -906c3b63 Merge "Implement lossless transforms in NEON." -d23abe4e Implement lossless transforms in NEON. -2e6cb6f3 Give more flexibility to the predictor generating macro. -28e0bb70 Merge "Fix race condition in multi-threading initialization." -64704530 Fix race condition in multi-threading initialization. -bded7848 img2webp: fix default -lossless value and use pic.argb=1 -0e61a513 Merge "img2webp: convert a sequence of images to an animated webp" -1cc79e92 AnimEncoder: Correctly skip a frame when sub-rectangle is empty. -03f40955 img2webp: convert a sequence of images to an animated webp -ea72cd60 add missing 'extern' keyword for predictor dcl -67879e6d SSE implementation of decoding predictors. -34aee990 Merge "vwebp: make 'd' key toggle the debugging of fragments" -a41296ae Fix potentially uninitialized value. -c85adb33 vwebp: make 'd' key toggle the debugging of fragments -4239a148 Make the lossless predictors work on a batch of pixels. -bc18ebad fix extra 'const's in signatures -71e2f5ca Remove memcpy in lossless decoding. -7474d46e Do not use a register array in SSE. -67748b41 Improve latency of FTransform2. -16951b19 Merge "Provide an SSE implementation of ConvertBGRAToRGB" -6540cd0e Provide an SSE implementation of ConvertBGRAToRGB -de568abf Android.mk: use -fvisibility=hidden -3c2a61b0 remove some unneeded casts -9ac063c3 add dsp functions for SmartYUV -22efabdd Merge "smart_yuv: switch to planar instead of packed r/g/b processing" -1d6e7bf3 smart_yuv: switch to planar instead of packed r/g/b processing -0a3838ca fix bug in RefineUsingDistortion() -c0699515 webpmux -duration: set default 'end' value equal to 'start' -83cbfa09 Import: use relative pointer offsets -a1ade40e PreprocessARGB: use relative pointer offsets -fd4d090f ConvertWRGBToYUV: use relative pointer offsets -9daad459 ImportYUVAFromRGBA: use relative pointer offsets -f90c60d1 Merge "add a "-duration duration,start,end" option to webpmux" -3f182d36 add a "-duration duration,start,end" option to webpmux -342e15f0 Import: use relative pointer offsets -1147ab4e PreprocessARGB: use relative pointer offsets -e4cd4daf fix filtering auto-adjustment -e7152856 fix doc and code snippet for WebPINewDecoder() doc -de9fa507 ConvertWRGBToYUV: use relative pointer offsets -deb1b831 ImportYUVAFromRGBA: use relative pointer offsets -c284780f imageio_util: add ImgIoUtilCheckSizeArgumentsOverflow -e375080d gifdec,Remap: avoid out of bounds colormap read -c222a053 additional fix for stride type as size_t -bb233617 fix potential overflow when width * height * 4 >= (1<<32) -883d41fb gif2webp: fix crash with NULL extension data -cac9a36a gifdec,Remap: avoid out of bounds colormap read -4595e01f Revert "gifdec,Remap: avoid out of bounds colormap read" -fb52d443 gifdec: make some constants unsigned -f048d38d gifdec,Remap: avoid out of bounds colormap read -31b1e343 fix SSIM metric ... by ignoring too-dark area -2f51b614 introduce WebPPlaneDistortion to compute plane distortion -0104d730 configure: fix NEON flag detection under gcc 6 -265abbe9 Merge "additional fix for stride type as size_t" -f7601aa6 Merge "Introduce a generic WebPGetImageReader(type) function" -ce873320 Introduce a generic WebPGetImageReader(type) function -2a2773ea imageio/*dec,Read*: add input parameter checks -9f5c8eca additional fix for stride type as size_t -4eb5df28 remove unused stride fields from VP8Iterator -11bc423a MIN_LENGTH cleanups. -273d035a Merge "fix a typo in WebPPictureYUVAToARGB's doc" -4db82a17 Merge "fix potential overflow when width * height * 4 >= (1<<32)" -e2affacc fix potential overflow when width * height * 4 >= (1<<32) -dc789ada fix a typo in WebPPictureYUVAToARGB's doc -539f5a68 Fix non-included header in config.c. -aaf2a6a6 systematically call WebPDemuxReleaseIterator() on dec->prev_iter_ -20ef9915 Merge "imageio_util: add ImgIoUtilCheckSizeArgumentsOverflow" -bc86b7a8 imageio_util: add ImgIoUtilCheckSizeArgumentsOverflow -806f6279 gif2webp: fix crash with NULL extension data -68ae5b67 Add libwebp/src/mux/animi.h -28ce3043 Remove some errors when compiling the code as C++. -b34abcb8 Favor keeping the areas locally similar in spatial prediction mode selection -ba843a92 fix some SSIM calculations -51b71fd2 Merge "vwebp: ensure setenv() is available in stdlib.h" -fb01743a get_disto: fix the r/g/b order for luma calculation -bfab8947 vwebp: ensure setenv() is available in stdlib.h -9310d192 vwebp: handle window resizing properly -f79450ca Speedup ApplyMap. -cfdda7c6 Merge "prevent 32b overflow for very large canvas_width / height" -e36396ba Merge "get_disto: new option to compute SSIM map and convert to gray" -18a9a0ab Add an API to import a color-mapped image. -30d43706 Speed-up Combined entropy for palettized histograms. -36aa087b get_disto: new option to compute SSIM map and convert to gray -86a84b35 2x faster SSE2 implementation of SSIMGet -b8384b53 lower WEBP_MAX_ALLOCABLE_MEMORY default -1c364400 prevent 32b overflow for very large canvas_width / height -eee0cce1 Merge "Small LZ77 speedups." -5f1caf29 Small LZ77 speedups. -1effde7b fix anim_util.c compilation when HAVE_GIF is not defined. -a2fe9bf4 Speedup TrellisQuantizeBlock(). -573cce27 smartYUV improvements -21e7537a fix infinite loop in case of PARTITION0 overflow -053a1565 Merge "Change the rule of picking UV mode in MBAnalyzeBestUVMode()" -1377ac2e Change the rule of picking UV mode in MBAnalyzeBestUVMode() -7c1fb7d0 fix uint32_t initialization (0. -> 0) -bfff0bf3 speed-up SSIM calculation -64577de8 De-VP8L-ize GetEntropUnrefinedHelper. -a7be7328 Merge "refactor the PSNR / SSIM calculation code" -50c3d7da refactor the PSNR / SSIM calculation code -d6228aed indentation fix after I7055d3ee3bd7ed5e78e94ae82cb858fa7db3ddc0 -dd538b19 Remove unused declaration. -6cc48b17 Move some lossless logic out of dsp. -78363e9e Merge "Remove a redundant call to InitLeft() in VP8IteratorReset()" -ffd01929 Refactor VP8IteratorNext(). -c4f6d9c9 Remove a redundant call to InitLeft() in VP8IteratorReset() -c27d8210 Merge "smartYUV: simplify main loop" -07795296 smartYUV: simplify main loop -c9b45863 Split off common lossless dsp inline functions. -490ae5b1 smartYUV: improve initial state for faster convergence -894232be smartYUV: fix and simplify the over-zealous stop criterion -8de08483 Remove unused code in webpi.h -41cab7fe imageio/Android.mk: correct imagedec dependencies -82c91c70 Merge "libimageenc.a: extract image-saving code from dwebp" -af1ad3e2 libimageenc.a: extract image-saving code from dwebp -dd7309e3 Merge "doc: use two's complement explicitly for uint8->int8 conversion" -6105777e Merge "add gif2webp to CMake" -13ae011e doc: use two's complement explicitly for uint8->int8 conversion -4bda0cfb add gif2webp to CMake -6029c7fe Merge "remove mention of fragment, frgm, FRGM, etc." -545c147f remove mention of fragment, frgm, FRGM, etc. -5b46f7fc cwebp.1: improve some grammar -9e478f80 dec/vp8l.c: add assertions in EmitRescaledRowsRGBA/YUVA -43bd8958 Make gif transparent color to be transparent black -0887fc2d Merge "get_disto: add a '-o file' option to save a diff map" -0de48e18 get_disto: add a '-o file' option to save a diff map -0a57ad0d cosmetics: WebPSafeAlloc -> WebPSafeMalloc -0a4699bc Merge "WebPPictureDistortion(): free() -> WebPSafeFree()" -29fedbf5 Anim_encoder: correctly handle enc->prev_candidate_undecided_ -32dead4e WebPPictureDistortion(): free() -> WebPSafeFree() -85cd5d06 Smarter LZ77 for uniform regions. -6585075f Change PixelsAreSimilar() to handle black pixels correctly. -c0a27fd2 vwebp: Clear previous frame when a key triggers a redraw -57a5e3b6 webp_quality should return '0' in case of success. -7f1b897b Faster stochastic histogram merging. -48c810b8 Merge "remove WEBP_FORCE_ALIGNED and use memcpy() instead." -3884972e remove WEBP_FORCE_ALIGNED and use memcpy() instead. -485cac1a switch libimagedec.a and libimageio_util.a to avoid undefined symbol -005e15b1 Merge "{extras,mux}/Makefile.am: add missing -lm" -6ab496ed fix some 'unsigned integer overflow' warnings in ubsan -8a4ebc6a Revert "fix 'unsigned integer overflow' warnings in ubsan" -9d4f209f Merge changes I25711dd5,I43188fab -e44f5248 fix 'unsigned integer overflow' warnings in ubsan -27b5d991 Fix assertions in WebPRescalerExportRow() -74f6f9e7 Add descriptions of default configuration in help info. -aaf2530c {extras,mux}/Makefile.am: add missing -lm -1269dc7c Refactor VP8LColorCacheContains() -40872fb2 dec_neon,NeedsHev: micro optimization -7b54e26b Add a CMake option for WEBP_SWAP_16BIT_CSP. -d2223d8d Fix missing cpu-features for Android. -bf16a4b4 Merge "cpu.cmake: improve webp_check_compiler_flag output" -ee1057e3 cpu.cmake: improve webp_check_compiler_flag output -b551e587 cosmetics: add {}s on continued control statements -d2e4484e dsp/Makefile.am: put msa source in correct lib -c7f66c82 Merge "utils/thread.c,cosmetics: join a few lines" -98d8f295 Merge "examples/Makefile.am,cosmetics: sort binary targets" -39f4ffbc utils/thread.c,cosmetics: join a few lines -a86ce2b1 Merge "extras/Makefile.am: don't install libwebpextras" -6fa9fe24 extras/Makefile.am: don't install libwebpextras -0b2c58a9 Fix an unsigned integer overflow error in enc/cost.h -d7ce4a2e examples/Makefile.am,cosmetics: sort binary targets -386e4ba2 Reset segment id if we decide not to update segment map -7b87e848 Merge "Add MSA optimized YUV to RGB upsampling functions" -d3ddacb6 Add MSA optimized YUV to RGB upsampling functions -eb98d8d8 webp_quality: detect lossless format and features -ebee57f4 move imageio/example_util.[hc] (back to) examples/ -99542bbf webpdec: s/ExUtil// -da573cf4 imageio_util: s/ExUtil/ImgIoUtil/ -bdda5bd4 split example_util.h -15ed462b .gitignore: add extras/{get_disto,webp_quality} -7be57489 Merge "VP8EstimateQuality(): roughty estimate webp bitstream quality factor" -57020525 Makefile.vc: add missing imageio target -e8ab6a82 VP8EstimateQuality(): roughty estimate webp bitstream quality factor -fee7b3d6 Merge "'extras/get_disto' example: compute PSNR between two files" -1e7d4401 'extras/get_disto' example: compute PSNR between two files -4cecab63 pngdec.c,jpegdec.[hc]: remove unnecessary includes -259f0434 makefile.unix: normalize image decode lib name -ed34c39b fix: examples/libexample_dec.a => imageio/libexample_dec.a -33d8d0d4 Merge "move examples/{example_util,image_dec} to imageio/" -c960b82e Merge "extras.h: correct include guard" -fe3cd28a Merge ".gitignore: add .gradle, /build" -45fbeba5 Merge "Do token recording and counting in a single loop" -4f33c820 .gitignore: add .gradle, /build -c379b55a move examples/{example_util,image_dec} to imageio/ -5108d9aa extras.h: correct include guard -ad497fbc move src/extras to the top-level -0c0fb832 Do token recording and counting in a single loop -9ac74f92 Add MSA optimized rescaling functions -cb19dbc1 Add MSA optimized color transform functions -3f4042b5 WebPAnimEncoder: If 'minimize_size' and 'allow_mixed' on, try lossy + lossless. -5e2eb89e cosmetics,dsp/*msa.c: associate '*' with the type -5b60db5c FastMBAnalyze() for quick i16/i4 decision -567e6977 Add MSA optimized CollectHistogram function -c54ab8dd Add MSA optimized quantization functions -ec6f68c5 Merge "Remove QuantizeBlockWHT() in enc.c" -2a5c417c Apply the RLE heuristic to LZ77. -91b59e88 Remove QuantizeBlockWHT() in enc.c -fe572737 Add MSA optimized SSE functions -6b53ca87 cosmetics,(dec|enc)_sse2.c: fix indent -b15d00d9 Merge "Add MSA optimized encoder IntraChromaPreds function" -afe3cec8 Add MSA optimized encoder IntraChromaPreds function -fc8cad9f reduce the number of malloc/free cycles in huffman.c -7b4b05e0 Add MSA optimized encoder Intra16Preds function -c18787a0 Add MSA optimized encoder Intra4Preds function -479d1908 webpmux: Also print compression info per frame. -a80e8cfd Provide support for CMake on Android studio 2.2. -6c628410 Split the main CMake file. -bbb6ecd9 Merge "Add MSA optimized distortion functions" -7915396f Add MSA optimized distortion functions -652e944f Merge "build.gradle: remove tab" -c0991a14 io,EmitRescaledAlphaYUV: factor out a common expr -48bf5ed1 build.gradle: remove tab -bfef6c9f Merge tag 'v0.5.1' -3d97bb75 update ChangeLog (tag: v0.5.1, origin/0.5.1, 0.5.1) -deb54d91 Clarify the expected 'config' lifespan in WebPIDecode() -435308e0 Add MSA optimized encoder transform functions -dce64bfa Add MSA optimized alpha filter functions -429120d0 Add MSA optimized color transform functions -c7e2d245 update ChangeLog (tag: v0.5.1-rc5) -55b2fede normalize the macros' "do {...} while (0)" constructs -701c772e Add MSA optimized colorspace conversion functions -c7eb06f7 Fix corner case in CostManagerInit. -f918cb10 fix rescaling bug: alpha plane wasn't filled with 0xff -ab7937a5 gif2webp: normalize the number of .'s in the help message -3cdec847 vwebp: normalize the number of .'s in the help message -bdf6241e cwebp: normalize the number of .'s in the help message -06a38c7b fix rescaling bug: alpha plane wasn't filled with 0xff -319e37be Improve lossless compression. -6a197937 Add MSA optimized intra pred chroma functions -447adbce 'our bug tracker' -> 'the bug tracker' -97b9e644 normalize the number of .'s in the help message -293d786f Added MSA optimized intra prediction 16x16 functions -0afa0ce2 Added MSA optimized intra prediction 4x4 functions -a6621bac Added MSA optimized simple edge filtering functions -bb50bf42 pngdec,ReadFunc: throw an error on invalid read -38063af1 decode.h,WebPGetInfo: normalize function comment -1ebf193c Added MSA optimized chroma edge filtering functions -9ad2352d Merge "Added MSA optimized edge filtering functions" -60751096 Added MSA optimized edge filtering functions -9e8e1b7b Inline GetResidual for speed. -7d58d1b7 Speed-up uniform-region processing. -8ec7032b simplify HistogramCombineEntropyBin() -23e29cb1 Merge "Fix a boundary case in BackwardReferencesHashChainDistanceOnly." into 0.5.1 -472a049b remove bin_map[] allocation altogether -0bb23b2c free -> WebPSafeFree() -a977b4b5 Merge "rewrite the bin_map clustering to use less memory" -3591ba66 rewrite the bin_map clustering to use less memory -e6ac450c utils.[hc]: s/MAX_COLOR_COUNT/MAX_PALETTE_SIZE/ -e7b91772 Merge "DecodeImageData(): change the incorrect assert" into 0.5.1 -2abfa54f DecodeImageData(): change the incorrect assert -5a48fcd8 Merge "configure: test for -Wfloat-conversion" -0174d18d Fix a boundary case in BackwardReferencesHashChainDistanceOnly. -6a9c262a Merge "Added MSA optimized transform functions" -cfbcc5ec Make sure to consider small distances in LZ77. -5e60c42a Added MSA optimized transform functions -3dc28d76 configure: test for -Wfloat-conversion -f2a0946a add some asserts to delimit the perimeter of CostManager's operation -9a583c66 fix invalid-write bug for alpha-decoding -f66512db make gradlew executable -6fda58f1 backward_references: quiet double->int warning -a48cc9d2 Merge "Fix a compression regression for images with long uniform regions." into 0.5.1 -cc2720c1 Merge "Revert an LZ77 boundary constant." into 0.5.1 -059aab4f Fix a compression regression for images with long uniform regions. -b0c7e49e Check more backward matches with higher quality. -a3611513 Revert an LZ77 boundary constant. -8190374c README: fix typo -7551db44 update NEWS -0fb2269c bump version to 0.5.1 -f4537610 update AUTHORS & .mailmap -3259571e Refactor GetColorPalette method. -1df5e260 avoid using tmp histogram in PreparePair() -7685123a fix comment typos -a246b921 Speedup backward references. -76d73f18 Merge "CostManager: introduce a free-list of ~10 intervals" -eab39d81 CostManager: introduce a free-list of ~10 intervals -4c59aac0 Merge "mips msa webp configuration" -043c33f1 Merge "Improve speed and compression in backward reference for lossless." -71be9b8c Merge "clarify variable names in HistogramRemap()" -0ba7fd70 Improve speed and compression in backward reference for lossless. -0481d42a CostManager: cache one interval and re-use it when possible -41b7e6b5 Merge "histogram: fix bin calculation" -96c3d624 histogram: fix bin calculation -fe9e31ef clarify variable names in HistogramRemap() -ce3c8247 disable near-lossless quantization if palette is used -e11da081 mips msa webp configuration -5f8f998d mux: Presence of unknown chunks should trigger VP8X chunk output. -cadec0b1 Merge "Sync mips32 and dsp_r2 YUV->RGB code with C verison" -d9637758 Compute the hash chain once and for all for lossless compression. -50a48665 Sync mips32 and dsp_r2 YUV->RGB code with C verison -eee788e2 Merge "introduce a common signature for all image reader function" -d77b877c introduce a common signature for all image reader function -ca8d9519 remove some obsolete TODOs -ae2a7222 collect all decoding utilities from examples/ in libexampledec.a -0b8ae852 Merge "Move DitherCombine8x8 to dsp/dec.c" -77cad885 Merge "ReadWebP: avoid conversion to ARGB if final format is YUVA" -ab8d6698 ReadWebP: avoid conversion to ARGB if final format is YUVA -f8b7ce9e Merge "test pointer to NULL explicitly" -5df6f214 test pointer to NULL explicitly -77f21c9c Move DitherCombine8x8 to dsp/dec.c -c9e6d865 Add gradle support -c65f41e8 Revert "Add gradle support" -bf731ede Add gradle support -08333b85 WebPAnimEncoder: Detect when canvas is modified, restore only when needed. -0209d7e6 Merge "speed-up MapToPalette() with binary search" -fdd29a3d speed-up MapToPalette() with binary search -cf4a651b Revert "Refactor GetColorPalette method." -0a27aca3 Merge changes Idfa8ce83,I19adc9c4 -f25c4406 WebPAnimEncoder: Restore original canvas between multiple encodes. -169004b1 Refactor GetColorPalette method. -576362ab VP8LDoFillBitWindow: support big-endian in fast path -ac49e4e4 bit_reader.c: s/VP8L_USE_UNALIGNED_LOAD/VP8L_USE_FAST_LOAD/ -d39ceb58 VP8LDoFillBitWindow: remove stale TODO -2ec2de14 Merge "Speed-up BackwardReferencesHashChainDistanceOnly." -3e023c17 Speed-up BackwardReferencesHashChainDistanceOnly. -f2e1efbe Improve near lossless compression when a prediction filter is used. -e15afbce dsp.h: fix ubsan macro name -e53c9ccb dsp.h: add WEBP_UBSAN_IGNORE_UNSIGNED_OVERFLOW -af81fdb7 utils.h: quiet -fsanitize=undefined warnings -ea0be354 dsp.h: remove utils.h include -cd276aec utils/*.c: ../utils/utils.h -> ./utils.h -c8927131 utils/Makefile.am: add some missing headers -ea24e026 Merge "dsp.h: add WEBP_UBSAN_IGNORE_UNDEF" -369e264e dsp.h: add WEBP_UBSAN_IGNORE_UNDEF -0d020a78 Merge "add runtime NEON detection" -5ee2136a Merge "add VP8LAddPixels() to lossless.h" -47435a61 add VP8LAddPixels() to lossless.h -8fa6ac68 remove two ubsan warnings -74fb56fb add runtime NEON detection -4154a839 MIPS update to new Unfilter API -c80b9fc8 Merge "cherry-pick decoder fix for 64-bit android devices" -6235147e cherry-pick decoder fix for 64-bit android devices -d41b8c43 configure: test for -Wformat-* w/-Wformat present -5f95589f Fix WEBP_ALIGN in case the argument is a pointer to a type larger than a byte. -2309fd5c replace num_parts_ by num_parts_minus_one_ (unsigned) -9629f4bc SimplifySegments: quiet -Warray-bounds warning -de47492e Merge "update the Unfilter API in dsp to process one row independently" -2102ccd0 update the Unfilter API in dsp to process one row independently -e3912d56 WebPAnimEncoder: Restore canvas before evaluating blending possibility. -6e12e1e3 WebPAnimEncoder: Fix for single-frame optimization. -602f344a Merge changes I1d03acac,Ifcb64219 -95ecccf6 only apply color-mapping for alpha on the cropped area -47dd0708 anim_diff: Add an experimental option for max inter-frame diff. -aa809cfe only allocate alpha_plane_ up to crop_bottom row -31f2b8d8 WebPAnimEncoder: FlattenSimilarPixels(): look for similar -774dfbdc perform alpha filtering within the decoding loop -a4cae68d lossless decoding: only process decoded row up to last_row -238cdcdb Only call WebPDequantizeLevels() on cropped area -cf6c713a alpha: preparatory cleanup -b95ac0a2 Merge "VP8GetHeaders(): initialize VP8Io with sane value for crop/scale dimensions" -89231394 VP8GetHeaders(): initialize VP8Io with sane value for crop/scale dimensions -5828e199 use_8b_decode -> use_8b_decode_ -8dca0247 fix bug in alpha.c that was triggering a memory error in incremental mode -9a950c53 WebPAnimEncoder: Disable filtering when blending is used with lossy encoding. -eb423903 WebPAnimEncoder: choose max diff for framerect based on quality. -ff0a94be WebPAnimEncoder lossy: ignore small pixel differences for frame rectangles. -f8040084 gif2webp: Remove the 'prev_to_prev_canvas' buffer. -6d8c07d3 Merge "WebPDequantizeLevels(): use stride in CountLevels()" -d96fe5e0 WebPDequantizeLevels(): use stride in CountLevels() -ec1b2407 WebPPictureImport*: check output pointer -c0768769 Merge "Revert "Re-enable encoding of alpha plane with color cache for next release."" -41f14bcb WebPPictureImport*: check src pointer -64eed387 Pass stride parameter to WebPDequantizeLevels() -97934e24 Revert "Re-enable encoding of alpha plane with color cache for next release." -e88c4ca0 fix -m 2 mode-cost evaluation (causing partition0 overflow) -4562e83d Merge "add extra meaning to WebPDecBuffer::is_external_memory" -abdb109f add extra meaning to WebPDecBuffer::is_external_memory -875aec70 enc_neon,cosmetics: break long comment -71e856cf GetMBSSIM,cosmetics: fix alignment -a90edffb fix missing 'extern' for SSIM function in dsp/ -423ecaf4 move some SSIM-accumulation function for dsp/ -f08e6624 Merge "Fix FindClosestDiscretized in near lossless:" -0d40cc5e enc_neon,Disto4x4: remove an unnecessary transpose -e8feb20e Fix FindClosestDiscretized in near lossless: -82006430 anim_util: quiet static analysis warning -a6f23c49 Merge "AnimEncoder: Support progress hook and user data." -a5193774 Merge "Near lossless feature: fix some comments." -da98d31c AnimEncoder: Support progress hook and user data. -33357131 Near lossless feature: fix some comments. -0beed01a cosmetics: fix indent after 2f5e898 -6753f35c Merge "FTransformWHT optimization." -6583bb1a Improve SSE4.1 implementation of TTransform. -7561d0c3 FTransformWHT optimization. -7ccdb734 fix indentation after patch #328220 -6ec0d2a9 clarify the logic of the error path when decoding fails. -8aa352b2 Merge "Remove an unnecessary transposition in TTransform." -db860884 Merge "remove useless #include" -9960c316 Remove an unnecessary transposition in TTransform. -6e36b511 Small speedup in FTransform. -9dbd4aad Merge "fix C and SIMD flags completion." -e60853ea Add missing common_sse2.h file to makefile.unix -696eb2b0 fix C and SIMD flags completion. -2b4fe33e Merge "fix multiple allocation for transform buffer" -2f5e8986 fix multiple allocation for transform buffer -bf2b4f11 Regroup common SSE code + optimization. -4ed650a1 force "-pass 6" if -psnr or -size is used but -pass isn't. -3ef1ce98 yuv_sse2: fix -Wconstant-conversion warning -a7a03e9f Merge changes I4852d18f,I51ccb85d -5e122bd6 gif2webp: set enc_options.verbose = 0 w/-quiet -ab3c2583 anim_encode,DefaultEncoderOptions: init verbose -8f0dee77 Merge "configure: fix builtin detection w/-Werror" -4a7b85a9 cmake: fix builtin detection w/-Werror -b74657fb configure: fix builtin detection w/-Werror -3661b980 Add a CMakeLists.txt -75f4af4d remove useless #include -6c1d7631 avoid Yoda style for comparison -8ce975ac SSE optimization for vector mismatch. -7db53831 Merge tag 'v0.5.0' -37f04949 update ChangeLog (tag: v0.5.0-rc1, tag: v0.5.0, origin/0.5.0, 0.5.0) -7e7b6ccc faster rgb565/rgb4444/argb output -4c7f565f update NEWS -1f62b6b2 update AUTHORS -e224fdc8 update mailmap -71100500 bump version to 0.5.0 -230a685e README: update help text, repo link -d48e427b Merge "demux: accept raw bitstreams" -99a01f4f Merge "Unify some entropy functions." -4b025f10 Merge "configure: disable asserts by default" -92cbddf8 Merge "fix PrintBlockInfo()" -ca509a33 Unify some entropy functions. -367bf903 fix PrintBlockInfo() -b0547ff0 move back common constants for lossless_enc*.c into the .h -fb4c7832 lossless: simpler alpha cleanup preprocessing -ba7f4b68 Merge "anim_diff: add brief description of options" -47ddd5a4 Move some codec logic out of ./dsp . -b4106c44 anim_diff: add brief description of options -357f455d yuv_sse2: fix 32-bit visual studio build -b9d80fa4 configure: disable asserts by default -7badd3da cosmetic fix: sizeof(type) -> sizeof(*var) -80ce27d3 Speed up 24-bit packing / unpacking in YUV / RGB conversions. -68eebcb0 remove a TODO about rotation -2dee2966 remove few obsolete TODO about aligned loads in SSE2 -e0c0bb34 remove TODO about unused ref_lf_delta[] -9cf1cc2b remove few TODO: * 256 -> RD_DISTO_MULT * don't use TDisto for UV mode picking -79189645 Merge changes from topic 'demux-fragment-cleanup' -47399f92 demux: remove GetFragment() -d3cfb79a demux: remove dead fragment related TODO -ab714b8a demux, Frame: remove is_fragment_ field -b105921c yuv_sse2, cosmetics: fix indent -466c92e8 demux,WebPIterator: remove fragment_num/num_fragments -11714ff1 demux: remove WebPDemuxSelectFragment -c0f7cc47 fix for bug #280: UMR in next->bits -578beeb8 Merge "enc/Makefile.am: add missing headers" -1a819f00 makefile.unix: make visibility=hidden the default -d4f9c2ef enc/Makefile.am: add missing headers -846caff4 configure: check for -fvisibility=hidden -3f3ea2c5 demux: accept raw bitstreams -d6dad5d0 man cwebp: add precision about exactness of the 'lossless' mode -46bb1e34 Merge "gifdec: remove utils.h include" -2b882e94 Merge "Makefile.vc: define WEBP_HAVE_GIF for gifdec.c" -892b9238 Merge "man/*, AUTHORS: clarify origin of the tool" -e5687a18 Merge "fix optimized build with -mcmodel=medium" -e56e6859 Makefile.vc: define WEBP_HAVE_GIF for gifdec.c -4077d944 gifdec: remove utils.h include -b5e30dac man/*, AUTHORS: clarify origin of the tool -b275e598 fix optimized build with -mcmodel=medium -64da45a9 cosmetics, cwebp: fix indent -038a060d Merge "add disto-based refinement for UV mode (if method = 1 or 2)" -2835089d Provide an SSE2 implementation of CombinedShannonEntropy. -e6c93519 add disto-based refinement for UV mode (if method = 1 or 2) -04507dc9 Merge "fix undefined behaviour during shift, using a cast" -793c5261 Merge "wicdec: add support for reading from stdin" -d3d16397 Optimize the heap usage in HistogramCombineGreedy. -202a710b fix undefined behaviour during shift, using a cast -14d27a46 improve method #2 by merging DistoRefine() and SimpleQuantize() -cb1ce996 Merge "10% faster table-less SSE2/NEON version of YUV->RGB conversion" -ac761a37 10% faster table-less SSE2/NEON version of YUV->RGB conversion -79fcf29a wicdec: add support for reading from stdin -015f173f Merge "cwebp: add support for stdin input" -a9947c32 cwebp: add support for stdin input -7eb01ff3 Merge "Improved alpha cleanup for the webp encoder when prediction transform is used." -fb8c9106 Merge "introduce WebPMemToUint32 and WebPUint32ToMem for memory access" -bd91af20 Merge "bit_reader: remove aarch64 BITS TODO" -6c702b81 Speed up hash chain initialization using memset. -4c60f63c make ReadPNG and ReadJPEG take a filename instead of a FILE -464ed10f bit_reader: remove aarch64 BITS TODO -d478e589 Merge "configure: update issue tracker" -69381113 Improved alpha cleanup for the webp encoder when prediction transform is used. -2c08aac8 introduce WebPMemToUint32 and WebPUint32ToMem for memory access -010ca3d1 Fix FindMatchLength with non-aligned buffers. -a90e1e3f README: add prerequisites for an autoconf build -458f0866 configure: update issue tracker -33914595 vwebp: work around the transparent background with GLUT bug -e4a7eed4 cosmetics: fix indent -08375129 Merge "Make a separate case for low_effort in CopyImageWithPrediction" -aa2eb2d4 Merge "cosmetics: fix indent" -b7551e90 cosmetics: fix indent -5bda52d4 Make a separate case for low_effort in CopyImageWithPrediction -66fa598a Merge "configure: fix intrinsics build w/older gcc" -5ae220be backward_references.c: Fixed compiler warning -1556da09 Merge "configure: restore 2 warnings" -71a17e58 configure: restore 2 warnings -9eeabc07 configure: fix intrinsics build w/older gcc -363babe2 Merge "fix some warning about unaligned 32b reads" -a1411782 Optimization in hash chain comparison for 64 bit Arrays were compared 32 bits at a time, it is now done 64 bits at a time. Overall encoding speed-up is only of 0.2% on @skal's small PNG corpus. It is of 3% on my initial 1.3 Mp desktop screenshot image. -829bd141 Combine Huffman cost and bit entropy into one loop -a7a954c8 Merge "lossless: make prediction in encoder work per scanline" -61b605b4 Merge "fix of undefined multiply (int32 overflow)" -239421c5 lossless: make prediction in encoder work per scanline -f5ca40e0 fix of undefined multiply (int32 overflow) -5cd2ef4c Merge changes from topic 'win-threading-compat' -76ce9187 Makefile.vc: enable WEBP_USE_THREAD for windows phone -d2afe974 thread: use CreateThread for windows phone -0fd0e12b thread: use WaitForSingleObjectEx if available -63fadc9f thread: use InitializeCriticalSectionEx if available -110ad583 thread: use native windows cond var if available -912c9fdf dec/webp: use GetLE(24|32) from utils -f1694481 utils/GetLE32: correct uint32 promotion -158763de Merge "always call WebPInitSamplers(), don't try to be smart" -3770f3bb Merge "cleanup the YFIX/TFIX difference by removing some code and #define" -a40f60a9 Merge "3% speed improvement for lossless webp encoder for low effort mode:" -ed1c2bc6 always call WebPInitSamplers(), don't try to be smart -b8c44f1a 3% speed improvement for lossless webp encoder for low effort mode: -997e1038 cleanup the YFIX/TFIX difference by removing some code and #define -d73d1c8b Merge "Make discarding invisible RGB values (cleanup alpha) the default." -1f9be97c Make discarding invisible RGB values (cleanup alpha) the default. -f240117b Make dwebp listen more to the -quiet flag -b37b0179 fix for issue #275: don't compare to out-of-bound pointers -21735e06 speed-up trivial one-symbol decoding case for lossless -397863bd Refactor CopyPlane() and CopyPixels() methods: put them in utils. -6ecd72f8 Re-enable encoding of alpha plane with color cache for next release. -1f7148a4 Merge "remove unused fields from WebPDecoderOptions and WebPBitstreamFeatures" -6ae395fa Merge "use ExReadFile() for ReadYUV()" -8076a00e gitignore list: add anim_diff. -1c1702d8 use ExReadFile() for ReadYUV() -775d3a37 remove unused fields from WebPDecoderOptions and WebPBitstreamFeatures -c13245c7 AnimEncoder: Add a GetError() method. -688b265d AnimDecoder API: Add a GetDemuxer() method. -1aa4e3d6 WebPAnimDecoder: add an option to enable multi-threaded decoding. -3584abca AnimDecoder: option to decode to common color modes. -afd5a62c Merge "mux.h does NOT need to include encode.h" -8550d443 Merge "migrate anim_diff tool from C++ to C89" -96201e50 migrate anim_diff tool from C++ to C89 -945cfa3b mux.h does NOT need to include encode.h -8da07e8d Merge "~2x faster SSE2 RGB24toY, BGR24toY, ARGBToY|UV" -bfd3fc02 ~2x faster SSE2 RGB24toY, BGR24toY, ARGBToY|UV -02432427 man/cwebp.1, cosmetics: escape '-'s -96f5b423 man/cwebp: group lossy-only options -52fdbdfe extract some RGB24 to Luma conversion function from enc/ to dsp/ -ab8c2300 add missing \n -8304179a sync NEWS with 0.4.4 -5bd04a08 sync versions with 0.4.4 -8f1fcc15 Merge "Move ARGB->YUV functions from dec/vp8l.c to dsp/yuv.c" -25bf2ce5 fix some warning about unaligned 32b reads -922268fd s/TIFF/WebP -fa8927ef Move ARGB->YUV functions from dec/vp8l.c to dsp/yuv.c -9b373598 Merge "for ReadXXXX() image-readers, use the value of pic->use_argb" -f7c507a5 Merge "remove unnecessary #include "yuv.h"" -7861578b for ReadXXXX() image-readers, use the value of pic->use_argb -14e4043b remove unnecessary #include "yuv.h" -469ba2cd vwebp: fix incorrect clipping w/NO_BLEND -4b9186b2 update issue tracker url -d64d376c change WEBP_ALIGN_CST value to 31 -f717b828 vp8l.c, cosmetics: fix indent after 95509f9 -927ccdc4 Merge "fix alignment of allocated memory in AllocateTransformBuffer" -fea94b2b fix alignment of allocated memory in AllocateTransformBuffer -5aa8d61f Merge "MIPS: rescaler code synced with C implementation" -e7fb267d MIPS: rescaler code synced with C implementation -93c86ed5 Merge "format_constants.h: MKFOURCC, correct cast" -5d791d26 format_constants.h: MKFOURCC, correct cast -65726cd3 dsp/lossless: Average2, make a constant unsigned -d26d9def Use __has_builtin to check clang support -12ec204e moved ALIGN_CST into util/utils.h and renamed WEBP_ALIGN_xxx -a2640838 Merge "rescaler: ~20% faster SSE2 implementation for lossless ImportRowExpand" -3fb600d5 Merge "wicdec: fix alpha detection w/64bpp BGRA/RGBA" -67c547fd rescaler: ~20% faster SSE2 implementation for lossless ImportRowExpand -99e3f812 Merge "large re-organization of the delta-palettization code" -95509f99 large re-organization of the delta-palettization code -74fb458b fix for weird msvc warning message -ae49ad86 Merge "SSE2 implementation of ImportRowShrink" -932fd4df SSE2 implementation of ImportRowShrink -badfcbaa wicdec: fix alpha detection w/64bpp BGRA/RGBA -35cafa6c Merge "iosbuild: fix linking with Xcode 7 / iOS SDK 9" -b0c9d8af label rename: NO_CHANGE -> NoChange -b4e731cd neon-implementation for rescaler code -db1321a6 iosbuild: fix linking with Xcode 7 / iOS SDK 9 -6dfa5e3e rescaler: better handling of the fxy_scale=0 special case. -55c05293 Revert "rescaler: better handling of the fxy_scale=0 special case." -9f226bf8 rescaler: better handling of the fxy_scale=0 special case. -f7b8f907 delta_palettization.*: add copyright -c1e1b710 Changed delta palette to compress better -0dd28267 Merge "Add delta_palettization feature to WebP" -48f66b66 Add delta_palettization feature to WebP -27933e2a anim_encoder: drop a frame if it has same pixels as the prev frame. -df9f6ec8 Merge "webpmux/DisplayInfo: send non-error output to stdout" -8af4993b Merge "rescaler_mips_dsp_r2: cosmetics, fix indent" -2b9d2495 Merge "rescaler: cosmetics, join two lines" -cc020a8c webpmux/DisplayInfo: send non-error output to stdout -a288e746 configure: add -Wshorten-64-to-32 -c4c3cf2d pngdec: fix type conversion warnings -bef8e97d webpmux: fix type conversion warning -5a84460d rescaler_mips_dsp_r2: cosmetics, fix indent -acde0aae rescaler: cosmetics, join two lines -306ce4fd rescaler: move the 1x1 or 2x1 handling one level up -cced974b remove _mm_set_epi64x(), which is too specific -56668c9f fix warnings about uint64_t -> uint32_t conversion -76a7dc39 rescaler: add some SSE2 code -1df1d0ee rescaler: harmonize function protos -9ba1894b rescaler: simplify ImportRow logic -5ff0079e fix rescaler vertical interpolation -cd82440e VP8LAllocateHistogramSet: align histogram[] entries -a406b1dd Merge "fix memory over-allocation in lossless rescaler init" -0fde33e3 add missing const in VP8InitFrame signature -ac7d5e8d fix memory over-allocation in lossless rescaler init -017f8ccc Loosen the buffer size checks for Y/U/V/A too. -15ca5014 loosen the padding check on buffer size -d623a870 dec_neon: add whitespace around stringizing operator -29377d55 dsp/mips: cosmetics: add whitespace around XSTR macro -eebaf97f dsp/mips: add whitespace around stringizing operator -d39dc8f3 Create a WebPAnimDecoder API. -03fb7522 gif2webp: print output file size -14efabbf Android: limit use of cpufeatures -7b83adbe preparatory cosmetics for Rescaler code fix and clean-up -77fb41c2 dec/vp8l/DecodeAlphaData: remove redundant cast -90fcfcd9 Insert less hash chain entries from the beginnings of long copies. -bd55604d SSE2: add yuv444 converters, re-using yuv_sse2.c -41a5d99d add a -quiet option to 'dwebp' -80ab3edb Merge "README: update dwebp help output after 1e595fe" -32b71b2e README: update dwebp help output after 1e595fe -3ec11827 use the DispatchAlpha() call from dsp -c5f00621 incorporate bzero() into WebPRescalerInit() instead of call site -3ebcdd41 remove duplicate "#include " -1e595fe1 dwebp: add -resize as a synonym for -scale -24a96932 dec: allow 0 as a scaling dimension -b9187242 utils/rescaler: add WebPRescalerGetScaledDimensions -923e8eda Merge "update NEWS" -020fd099 Merge "WebPPictureDistortion: support ARGB format for 'pic' when computing distortion." -6a5292f6 update NEWS -56a2e9f5 WebPPictureDistortion: support ARGB format for 'pic' when computing distortion. -0ae582e4 configure: test and add -Wunreachable-code -c2f9dc06 bit_writer: convert VP8L macro values to immediates -b969f888 Reduce magic in palette reordering -acb297e9 anim_diff: add a -raw_comparison flag -155c1b22 Merge changes I76f4d6fe,I45434639 -717e4d5a mips32/mipsDSPr2: function ImportRow rebased -7df93893 fix rescaling bug (uninitialized read, see bug #254). -5cdcd561 lossless_enc_neon: add VP8LTransformColor -a53c3369 lossless_neon: add VP8LTransformColorInverse -99131e7f Merge changes I9fb25a89,Ibc648e9e -c4556766 simplify the main loop for downscaling -2a010f99 lossless_neon: remove predictors 5-13 -ca221bbc ll_enc_neon: enable VP8LSubtractGreenFromBlueAndRed -585d93db Container spec: clarify ordering of ALPH chunk. -01d61fd9 lossless: ~20 % speedup -f722c8f0 lossless: Speed up ComputeCacheEntropy by 40 % -1ceecdc8 add a VP8LColorCacheSet() method for color cache -17eb6099 lossless: Allow copying from prev row in rle-mode. -f3a7a5bf lossless: bit writer optimization -d97b9ff7 Merge changes from topic 'lossless-enc-improvements' -0250dfcc msvc: fix pointer type warning in BitsLog2Floor -52931fd5 lossless: combine the Huffman code with extra bits -c4855ca2 lossless: Inlining add literal -8e9c94de lossless: simplify HashChainFindCopy heuristics -888429f4 lossless: 0.5 % compression density improvement -7b23b198 lossless: Add zeroes into the predicted histograms. -85b44d8a lossless: encoding, don't compute unnecessary histo -d92453f3 lossless: Remove about 25 % of the speed degradation -2cce0317 Faster alpha coding for webp -5e75642e lossless: rle mode not to accept lengths smaller than 4. -84326e4a lossless: Less code for the entropy selection -16ab951a lossless: 0.37 % compression density improvement -822f113e add WebPFree() to the API -0ae2c2e4 SSE2/SSE41: optimize SSE_16xN loops -39216e59 cosmetics: fix indent after 32462a07 -559e54ca Merge "SSE2: slightly faster FTransformWHT" -8ef9a63b SSE2: slightly faster FTransformWHT -f27f7735 lossless_neon: enable VP8LAddGreenToBlueAndRed -36e9c4bc SSE2: minor cosmetrics on in-loop filter code -4741fac4 dsp/lossless_*sse2: remove some unnecessary inlines -1819965e fix warning ("left shift of negative value") using a cast -70170014 SSE2: speed-up some lossless-encoding functions -abcb0128 Merge "SSE2: slightly faster (~5%) AddGreenToBlueAndRed()" -2df5bd30 Merge "Speedup to HuffmanCostCombinedCount" -9e356d6b SSE2: slightly faster (~5%) AddGreenToBlueAndRed() -fc6c75a2 SSE2: 53% faster TransformColor[Inverse] -49073da6 SSE2: 46% speed-up of TransformColor[Inverse] -32462a07 Speedup to HuffmanCostCombinedCount -f3d687e3 SSE4.1 implementation of some lossless encoding functions -bfc300c7 SSE4.1 implementation of some alpha-processing functions -7f9c98f2 Merge "sse2 in-loop: simplify SignedShift8b() a bit" -ef314a5d dec_sse2/GetNotHEV: micro optimization -a729cff9 sse2 in-loop: simplify SignedShift8b() a bit -422ec9fb simplify Load8x4() a bit -8df238ec Merge "remove some duplicate FlipSign()" -751506c4 remove some duplicate FlipSign() -65ef5afc Merge "lossless: 0.13% compression density gain" -2beef2f2 lossless: 0.13% compression density gain -3033f24c lossless: 0.06 % compression density improvement -64960da9 dec_neon: add VE8uv / VE16 -14dbd87b dec_neon: add HE8uv / HE16 -ac768011 introduce FTransform2 to perform two transforms at a time. -aa6065ae dec_neon: use vld1_dup(mem) rather than vdup(mem[0]) -8b63ac78 Merge "dec_neon: add TM16" -f51be09e Merge "dec_neon/TrueMotion: simply left border load" -dc48196b dec_neon: add TM16 -ea95b305 dec_neon/TrueMotion: simply left border load -f262d612 speed-up SetResidualSSE2 -bf46d0ac fix mips2 build target -929a0fdc enc_sse2/TTransform: simplify abs calculation -17dbd058 enc_sse2/CollectHistogram: simplify abs calculation -a6c15936 dec_neon: add DC16 intra predictors -03b4f50d Makefile.vc: add anim_diff build support. -1b989874 Merge changes I9cd84125,Iee7e387f,I7548be72 -acd7b5af Introduce a test tool anim_diff. -f274a96c dsp/enc_sse2: add luma4 intra predictors -040b11bd dsp/enc_sse2: add chroma intra predictors -aee021bb dsp/enc_sse2: add luma16 intra predictors -9e00a499 makefile.unix: remove superclean target -cefc9c09 makefile.unix: clean up after extras target -4c9af023 dec_neon: add DC8uvNoTopLeft -dd55b873 Merge "doc/webp-container-spec: update repo browser link" -f0486968 doc/webp-container-spec: update repo browser link -9287761d Merge "GetResidualCostSSE2: simplify abs calculation" -0e009366 dsp/cpu.c(x86): check maximum supported cpuid feature -b243a4bc GetResidualCostSSE2: simplify abs calculation -6d4602b8 Merge "fix typo: constitutes -> constitute" -5fe1fe37 fix typo: constitutes -> constitute -b83bd7c4 Merge "populate 'libwebpextras' with: import gray, rgb565 and rgb4444 functions" -b0114a32 Merge "histogram.h: cosmetics: remove unnecessary includes" -feab45ef gifdec: Move inclusion of webp/config.h to header. -dbba67d1 histogram.h: cosmetics: remove unnecessary includes -e978fec6 Merge "VP8LBitReader: fix remaining ubsan error with large shifts" -d6fe5884 Merge "ReconstructRow: move some one-time inits out of the main loop" -a21d647c ReconstructRow: move some one-time inits out of the main loop -7a01c3c3 VP8LBitReader: fix remaining ubsan error with large shifts -7fa67c9b change GetPixPairHash64() return type to uint32_t -ec1fb9f8 Merge "dsp/enc.c: cosmetics: move DST() def closer to use" -7073bfb3 Merge "split 64-mult hashing into two 32-bit multiplies" -0768b252 dsp/enc.c: cosmetics: move DST() def closer to use -6a48b8f0 Merge "fix MSVC size_t->int conversion warning" -1db07cde Merge "anim_encode: cosmetics: fix alignment" -e28271a3 anim_encode: cosmetics: fix alignment -7fe357b8 split 64-mult hashing into two 32-bit multiplies -af74c145 populate 'libwebpextras' with: import gray, rgb565 and rgb4444 functions -61214134 remove VP8Residual::cost unused field -e2544823 fix MSVC size_t->int conversion warning -b69a6c35 vwebp: don't redefine snprintf with VS2015+ -0ac29c51 AnimEncoder API: Consistent use of trailing underscores in struct. -d4845550 AnimEncoder API: Use timestamp instead of duration as input to Add(). -9904e365 dsp/dec_sse2: DC8uv / DC8uvNoLeft speedup -7df20497 dsp/dec_sse2: DC16 / DC16NoLeft speedup -8e515dfe Merge "makefile.unix: add some missing headers" -db12250f cosmetics: vp8enci.h: break long line -bf516a87 makefile.unix: add some missing headers -b44eda3f dsp: add DSP_INIT_STUB -03e76e96 clarify the comment about double-setting the status in SetError() -9fecdd71 remove unused EmitRGB() -43f010dd move ReconstructRow to top -82d98020 add a dec/common.h header to collect common enc/dec #defines -5d4744a2 Merge "enc_sse41: add Disto4x4 / Disto16x16" -e38886a7 mux.h: Bump up ABI version -46305ca6 configure: add --disable- -2fc8b658 CPPFLAGS->CFLAGS for detecting sse4.1 in preprocessor -1a338fb3 enc_sse41: add Disto4x4 / Disto16x16 -94055503 encoding SSE4.1 stub for StoreHistogram + Quantize + SSE_16xN -c64659e1 remove duplicate variables after the lossless{_enc}.c split -67ba7c7a enc_sse2: call local FTransform in CollectHistogram -18249799 dsp: s/VP8LSetHistogramData/VP8SetHistogramData/ -ede5e158 cosmetics: dsp/lossless.h: reorder prototypes -553051f7 dsp/lossless: split enc/dec functions -9064adc8 Merge "conditionally add -msse4.1 in Makefile.unix" -cecf5096 dsp/yuv*.c: rework WEBP_USE_ ifdef -6584d398 dsp/upsampling*.c: rework WEBP_USE_ ifdef -80809422 dsp/rescaler*.c: rework WEBP_USE_ ifdef -1d93ddec dsp/lossless*.c: rework WEBP_USE_ ifdef -73805ff2 dsp/filters*.c: rework WEBP_USE_ ifdef -fbdcef24 dsp/enc*.c: rework WEBP_USE_ ifdef -66de69c1 dsp/dec*.c: rework WEBP_USE_ ifdef -48e4ffd1 dsp/cost*.c: rework WEBP_USE_ ifdef -29fd6f90 dsp/argb*.c: rework WEBP_USE_ ifdef -80ff3813 dsp/alpha*.c: rework WEBP_USE_ ifdef -bf09cf1e conditionally add -msse4.1 in Makefile.unix -e9570dd9 stub for SSE4.1 support. -4a95384b Merge "dsp: add sse4.1 detection" -cabf4bd2 dsp: add sse4.1 detection -4ecba1ab thread.h: rename interface param -b8d706c8 Merge "sync versions with 0.4.3" -ae64a711 Merge "add shell for libwebpextras" -92a5da9c sync versions with 0.4.3 -9d4e2d16 Merge "~30% faster smart-yuv (-pre 4) with early-out criterion" -b1bdbbab ~30% faster smart-yuv (-pre 4) with early-out criterion -7efb9748 Merge "Disable NEON code on Native Client" -ac4f5784 Disable NEON code on Native Client -0873f85b AnimEncoder API: Support input frames in YUV(A) format. -5c176d2d add shell for libwebpextras -44bd9561 fix signature for VP8RecordCoeffTokens() -c9b8ea0e small cosmetics on TokenBuffer. -76394c09 Merge "MIPS: dspr2: added optimization for TrueMotion" -0f773693 WebPPictureRescale: add a note about 0 width/height -241bb5d9 MIPS: dspr2: added optimization for TrueMotion -6cef0e4f examples/Android.mk: add webpmux_example target -53c16ff0 Android.mk: add webpmux target -21852a00 Android.mk: add webpdemux target -8697a3bc Android.mk: add webpdecoder{,_static} targets -4a670491 Android.mk: split source lists per-directory -b5e79422 MIPS: dspr2: Added optimization for some convert functions -0f595db6 MIPS: dspr2: Added optimization for some convert functions -8a218b4a MIPS: [mips32|dspr2]: GetResidualCost rebased -ef987500 Speedup method StoreImageToBitMask by 5%. -602a00f9 fix iOS arm64 build with Xcode 6.3 -23820507 1-2% faster encoding by removing an indirection in GetResidualCost() -eddb7e70 MIPS: dspr2: added otpimization for DC8uv, DC8uvNoTop and DC8uvNoLeft -73ba2915 MIPS: dspr2: added optimization for functions RD4 and LD4 -c7129da5 Merge "4-5% faster encoding using SSE2 for GetResidualCost" -94380d00 MIPS: dspr2: added optimizaton for functions VE4 and DC4 -2a407092 4-5% faster encoding using SSE2 for GetResidualCost -17e19862 Merge "MIPS: dspr2: added optimization for simple filtering functions" -3ec404c4 Merge "dsp: normalize WEBP_TSAN_IGNORE_FUNCTION usage" -b969f5df dsp: normalize WEBP_TSAN_IGNORE_FUNCTION usage -d7b8e711 MIPS: dspr2: added optimization for simple filtering functions -235f774e Merge "MIPS: dspr2: Added optimization for function VP8LTransformColorInverse_C" -42a8a628 MIPS: dspr2: Added optimization for function VP8LTransformColorInverse_C -b442bef3 Merge "ApplyFiltersAndEncode: only copy lossless stats" -b510fbfe doc/webp-container-spec: note MSB order for chunk diagrams -9bc0f922 ApplyFiltersAndEncode: only copy lossless stats -3030f115 Merge "dsp/mips: add some missing TSan annotations" -dfcf4593 Merge "MIPS: dspr2: Added optimization for function VP8LAddGreenToBlueAndRed_C" -55c75a25 dsp/mips: add some missing TSan annotations -2cb879f0 MIPS: dspr2: Added optimization for function VP8LAddGreenToBlueAndRed_C -e1556010 move some cost tables from enc/ to dsp/ -c3a03168 Merge "picture_csp: fix build w/USE_GAMMA_COMPRESSION undefined" -39537d7c Merge "VP8LDspInitMIPSdspR2: add missing TSan annotation" -1dd419ce picture_csp: fix build w/USE_GAMMA_COMPRESSION undefined -43fd3543 VP8LDspInitMIPSdspR2: add missing TSan annotation -c7233dfc Merge "VP8LDspInit: remove memcpy" -0ec4da96 picture_csp::InitGammaTables*: add missing TSan annotations -35579a49 VP8LDspInit: remove memcpy -97f6aff8 VP8YUVInit: add missing TSan annotation -f9016d66 dsp/enc::InitTables: add missing TSan annotation -e3d9771a VP8EncDspCostInit*: add missing TSan annotations -d97c143d Merge "doc/webp-container-spec: cosmetics" -309b7908 MIPS: mips32: Added optimization for function SetResidualCoeffs -a987faed MIPS: dspr2: added optimization for function GetResidualCost -e7d3df23 doc/webp-container-spec: cosmetics -be6635e9 Merge "VP8TBufferClear: remove some misleading const's" -02971e72 Merge "VP8EmitTokens: remove unnecessary param void cast" -3b77e5a7 VP8TBufferClear: remove some misleading const's -aa139c8f VP8EmitTokens: remove unnecessary param void cast -c24d8f14 cosmetics: upsampling_sse2: add const to some casts -1829c42c cosmetics: lossless_sse2: add const to some casts -183168f3 cosmetics: enc_sse2: add const to some casts -860badca cosmetics: dec_sse2: add const to some casts -0254db97 cosmetics: argb_sse2: add const to some casts -1aadf856 cosmetics: alpha_processing_sse2: add const to some casts -1579de3c vwebp: clear canvas at the beginning of each loop -4b9fa5d0 Merge "webp-container-spec: clarify background clear on loop" -4c82284d Updated the near-lossless level mapping. -56039479 webp-container-spec: clarify background clear on loop -19f0ba0e Implement true-motion prediction in SSE2 -774d4cb7 make VP8PredLuma16[] array non-const -d7eabb80 Merge "MIPS: dspr2: Added optimization for function CollectHistogram" -fe42739c Use integers for kmin/kmax for simplicity. -b9df35f7 AnimEncode API: kmax=0 should imply all keyframes. -6ce296da MIPS: dspr2: Added optimization for function CollectHistogram -2c906c40 vwebp: remove unnecessary static Help() prototype -be0fd1d5 Merge "dec/vp8: clear 'dither_' on skipped blocks" -e96170fe Merge "vwebp/animation: display last frame on end-of-loop" -0f017b56 vwebp/animation: display last frame on end-of-loop -c86b40cc enc/near_lossless.c: fix alignment -66935fb9 dec/vp8: clear 'dither_' on skipped blocks -b7de7946 Merge "lossless_neon: enable subtract green for aarch64" -77724f70 SSE2 version of GradientUnfilter -416e1cea lossless_neon: enable subtract green for aarch64 -72831f6b Speedup AnalyzeAndInit for low effort compression. -a6597483 Speedup Analyze methods for lossless compression. -98c81386 Enable Near-lossless feature. -c6b24543 AnimEncoder API: Fix for kmax=1 and default kmin case. -022d2f88 add SSE2 variants for alpha filtering functions -2db15a95 Temporarily disable encoding of alpha plane with color cache. -1d575ccd Merge "Lossless decoding: Remove an unnecessary if condition." -cafa1d88 Merge "Simplify backward refs calculation for low-effort." -7afdaf84 Alpha coding: reorganize the filter/unfiltering code -4d6d7285 Simplify backward refs calculation for low-effort. -ec0d1be5 Cleaup Near-lossless code. -9814ddb6 Remove the post-transform near-lossless heuristic. -4509e32e Lossless decoding: Remove an unnecessary if condition. -f2ebc4a8 Merge "Regression fix for lossless decoding" -783a8cda Regression fix for lossless decoding -9a062b8e AnimEncoder: Bugfix for kmin = 1 and kmax = 2. -0f027a72 simplify smart RGB->YUV conversion code -0d5b334e BackwardReferencesHashChainFollowChosenPath: remove unused variable -f480d1a7 Fix to near lossless artefacts on palettized images. -d4615d08 Merge changes Ia1686828,I399fda40 -cb4a18a7 rename HashChainInit into HashChainReset -f079e487 use uint16_t for chosen_path[] -da091212 MIPS: dspr2: Added optimization for function FTransformWHT -b8c20135 Merge "wicdec: (msvs) quiet some /analyze warnings" -9b228b54 wicdec: (msvs) quiet some /analyze warnings -daeb276a Merge "MIPS: dspr2: Added optimization for MultARGBRow function" -cc087424 Merge "dsp/cpu: (msvs) add include for __cpuidex" -4a82aab5 Merge changes I87544e92,I0bb6cda5 -7a191398 dwebp/WritePNG: mark png variables volatile -775dfad2 dwebp: include setjmp.h w/WEBP_HAVE_PNG -47d26be7 dwebp: correct sign in format strings -f0e0677b VP8LEncodeStream: add an assert -c5f7747f VP8LColorCacheCopy: promote an int before shifting -0de5f33e dsp/cpu: (msvs) add include for __cpuidex -7d850f7b MIPS: dspr2: Added optimization for MultARGBRow function -54875293 MIPS: dspr2: added optimization for function QuantizeBlock -4fbe9cf2 dsp/cpu: (msvs) avoid immintrin.h on _M_ARM -3fd59039 simplify/reorganize arguments for CollectColorBlueTransforms -b9e356b9 Disable costly TraceBackwards for method=0. -a7e7caa4 MIPS: dspr2: added optimization for function TransformColorRed -2cb39180 Merge "MIPS: dspr2: added optimization for function TransformColorBlue" -279e6613 Merge "dsp/cpu: add include for _xgetbv() w/MSVS" -b6c0428e dsp/cpu: add include for _xgetbv() w/MSVS -d1c4ffae gif2webp: Move GIF decoding related code to a support library. -07c39559 Merge "AnimEncoder API: Add info in README.mux" -7b161973 MIPS: dspr2: added optimization for function TransformColorBlue -d7c4b02a cpu: fix AVX2 detection for gcc/clang targets -9d299469 AnimEncoder API: Add info in README.mux -d581ba40 follow-up: clean up WebPRescalerXXX dsp function -f8740f0d dsp: s/USE_INTRINSICS/WEBP_USE_INTRINSICS/ -ce73abe0 Merge "introduce a separate WebPRescalerDspInit to initialize pointers" -ab66beca introduce a separate WebPRescalerDspInit to initialize pointers -205c7f26 fix handling of zero-sized partition #0 corner case -cbcdd5ff Merge "move rescaler functions to rescaler* files in src/dsp/" -bf586e88 Merge changes I230b3532,Idf3057a7 -6dc79dc2 Merge "anim_encode: fix type conversion warnings" -11fce25a Merge "dec_neon: remove returns from void functions" -c4e63f99 Makefile.vc: add gif2webp target -4f43d38c enable NEON for Windows ARM builds -3f6615ac Makefile.vc: add rudimentary Windows ARM support -e7c5954c dec_neon: remove returns from void functions -f79c163b anim_encode: fix type conversion warnings -0f54f1ec Remove gif2webp_util which is no longer needed. -cbcbedd0 move rescaler functions to rescaler* files in src/dsp/ -ac79ed19 webpmux: remove experimental fragment handling -e8694d4d mux: remove experimental FRGM parsing -9e92b6ea AnimEncoder API: Optimize single-frame animated images -abbae279 Merge "Move over gif2webp to the new AnimEncoder API." -a28c4b36 MIPS: move WORK_AROUND_GCC define to appropriate place -012d2c60 MIPS: dspr2: added optimization for functions SSEAxB -67720c8b Move over gif2webp to the new AnimEncoder API. -9241ecf4 MIPS: dspr2: added optimization for function Average -9422211d Merge "Tune BackwardReferencesLz77 for low_effort (m=0)." -df40057b Merge "Speedup VP8LGetHistoImageSymbols for low effort (m=0) mode." -ea08466d Tune BackwardReferencesLz77 for low_effort (m=0). -b0b973c3 Speedup VP8LGetHistoImageSymbols for low effort (m=0) mode. -c6d32927 argb_sse2: cosmetics -67f601cd make the 'last_cpuinfo_used' variable names unique -b9489861 AnimEncoder API: Init method for default options. -856f8ec1 Merge "AnimEncoder API: Remove AnimEncoderFrameOptions." -c537514d Merge "AnimEncoder API: GenerateCandidates bugfix." -dc0ce039 Merge "AnimEncoder API: Compute change rectangle for first frame too." -f00b639b Merge "AnimEncoder API: In Assemble(), always set animation parameters." -29ed796c Merge "AnimEncoder lib cleanup: prev to prev canvas not needed." -9f0dd6e5 Merge "WebPAnimEncoder API: Header and implementation" -5e56bbe0 AnimEncoder API: Remove AnimEncoderFrameOptions. -b902c3ea AnimEncoder API: GenerateCandidates bugfix. -ef3c39bb AnimEncoder API: Compute change rectangle for first frame too. -eec423ab AnimEncoder API: In Assemble(), always set animation parameters. -ae1c046e AnimEncoder lib cleanup: prev to prev canvas not needed. -4b997ae4 WebPAnimEncoder API: Header and implementation -72208bec move argb_*.o build target to encoder list -95920538 Merge "multi-thread fix: lock each entry points with a static var" -4c1b300a Merge "SSE2 implementation of VP8PackARGB" -fbcc2004 Merge "add -Wformat-nonliteral and -Wformat-security" -80d950d9 add -Wformat-nonliteral and -Wformat-security -04c20e75 Merge "MIPS: dspr2: added optimization for function Intra4Preds" -a437694a multi-thread fix: lock each entry points with a static var -ca7f60db SSE2 implementation of VP8PackARGB -72d573f6 simplify the PackARGB signature -4e2589ff demux: restore strict fragment flag check -4ba8e074 Merge "webp-container-spec: remove references to fragments" -e752f0a6 Merge "demux: remove experimental FRGM parsing" -f8abb112 Merge changes I109ec4d9,I73fe7743 -ae2188a4 MIPS: dspr2: added optimization for function Intra4Preds -1f4b8642 move VP8EncDspARGBInit() call closer to where it's needed -14108d78 dec_neon: add DC8uvNoTop / DC8uvNoLeft -d8340da7 dec_neon: add DC8uv -a66e66c7 webp-container-spec: remove references to fragments -7ce8788b MIPS: dspr2: added optimization for function MakeARGB32 -012e623d demux: remove experimental FRGM parsing -87c3d531 method=0: Don't evaluate any predictor -6f4fcb98 Merge "MIPS: dspr2: added optimization for function ImportRow" -24284459 replace unneeded calls to HistogramCopy() by swaps -bdf7b40c MIPS: dspr2: added optimization for function ImportRow -e66a9225 Merge "MIPS: dspr2: added optimization for function ExportRowC" -c279fec1 MIPS: dspr2: added optimization for function ExportRowC -31a9cf64 Speedup WebP lossless compression for low effort (m=0) mode with following: - Disable Cross-Color transform. - Evaluate predictors #11 (paeth), #12 and #13 only. -9275d91c MIPS: dspr2: added optimization for function TrueMotion -26106d66 Merge "enc_neon: fix building with non-Xcode clang (iOS)" -1c4e3efe unroll the kBands[] indirection to remove a dereference in GetCoeffs() -a3946b89 enc_neon: fix building with non-Xcode clang (iOS) -8ed9c00d Merge "simplify the Histogram struct, to only store max_value and last_nz" -bad77571 simplify the Histogram struct, to only store max_value and last_nz -3cca0dc7 MIPS: dspr2: Added optimization for DCMode function -37e395fd MIPS: fix functions to use generic BPS istead of hardcoded value -9475bef4 PickBestUV: fix VP8Copy16x8 invocation -441f273f Merge changes I55f8da52,Id73a1e96 -4a279a68 cosmetics: add some missing != NULL comparisons -66ad3725 factorize BPS definition in dsp.h and add VP8Copy16x8 -432e5b55 make ALIGN_xxx naming consistent -57606047 encoder: switch BPS to 32 instead of 16 -1b66bbe9 MIPS: dspr2: added optimization for function TransformColor_C -c6d0f9e7 histogram: cosmetics -f399d307 Merge changes I6eac17e5,I32d2b514 -9de9074c dec_neon: add TM8uv -8e517eca bit_reader/kVP8NewRange: range_t -> uint8_t -e1857139 dsp: initialize VP8PredChroma8 in VP8DspInit() -e0c809ad Move Entropy methods to lossless.c -a96ccf8f iosbuild: add x64_64 simulator support -a0df5510 Remove handling for WEBP_HINT_GRAPH -413dfc0c Move static method definition before its usage. -0f235665 Update BackwardRefsWithLocalCache. -d69e36ec Remove TODOs from lossless encoder code. -fdaac8e0 Optmize VP8LGetBackwardReferences LZ77 references. -2f0e2ba8 MIPS: dspr2: added optimization for function Select -a3e79a46 Merge "WebPEncode: Support encoding same pic twice (even if modified)" -e4f4dddb WebPEncode: Support encoding same pic twice (even if modified) -cbc3fbb4 Merge "Updated VP8LGetBackwardReferences and color cache." -95a9bd85 Updated VP8LGetBackwardReferences and color cache. -54f2c14c MIPS: dspr2: added optimization for function FTransform -aa42f423 MIPS: dspr2: Added optimization for function VP8LSubtractGreenFromBlueAndRed -11a25f75 Merge "FlattenSimilarBlocks should only be tried when blending is possible." -5cccdadf FlattenSimilarBlocks should only be tried when blending is possible. -95ca44a7 MIPS: dspr2: added optimization for Disto4x4 -4171b672 backward_references.c: reindent after c8581b0 -c8581b06 Optimize BackwardReferences for RLE encoding. -5798eee6 MIPS: dspr2: unfilters bugfix (Ie7b7387478a6b5c3f08691628ae00f059cf6d899) -4167a3f5 Optimize backwardreferences -d18554c3 Merge "webp/types.h: use inline for clang++/-std=c++11" -7489b0e7 gif2webp: Add '-min-size' option to get best compression. -77bdddf0 Speed up BackwardReferences -6638710b webp/types.h: use inline for clang++/-std=c++11 -abf04205 Enable entropy based merge histo for (q<100) -572022a3 filters_mips_dsp_r2.c: disable unfilters -a28e21b1 MIPS: dspr2: Added optimization for function ClampedAddSubtractFull -18d5a1ef MIPS: dspr2: added optimization for function ClampedAddSubtractHalf -829a8c19 MIPS: dspr2: added optimization for ITransform -c94ed49e gif2webp: Use the default hint instead of WEBP_HINT_GRAPH. -653ace55 Increase the MAX_COLOR_CACHE_BITS from 9 to 10. -919220c7 Change the logic adjusting the Histogram bits. -53b096c0 Merge "Fix bug in VP8LCalculateEstimateForCacheSize." -e912bd55 Fix bug in VP8LCalculateEstimateForCacheSize. -541d7839 Merge "dec_neon: add RD4 intra predictor" -f8cd0672 Merge "Makefile.vc: add a 'legacy' RTLIBCFG option" -22881c99 dec_neon: add RD4 intra predictor -613d281e update NEWS -1304eb34 Merge "dec_neon: DC4: use pair-wise adds for top row" -34c20c06 Makefile.vc: add a 'legacy' RTLIBCFG option -7083006b Merge "dsp/dec_{neon,sse2}: VE4: normalize variable names" -0db9031c dsp/dec_{neon,sse2}: VE4: normalize variable names -b5bc1530 dec_neon: DC4: use pair-wise adds for top row -5b90d8fe Unify the API between VP8BitWriter and VP8LBitWriter -f7ada560 Merge changes I2e06907b,Ia9ed4ca6,I782282ff -5beb6bf0 Merge "dec_neon: add VE4 intra predictor" -eba6ce06 dec_neon: add DC4 intra predictor -79abfbd9 dec_neon: add TM4 intra predictor -fe395f0e dec_neon: add LD4 intra predictor -32de385e dec_neon: add VE4 intra predictor -72395ba9 Merge "Modify CostModel to allocate optimal memory." -65e5eb8a gif2webp: Support GIF_DISPOSE_RESTORE_PREVIOUS -e4c829ef gif2webp: Handle frames with odd offsets + disposal to background. -c2b5a039 Modify CostModel to allocate optimal memory. -b7a33d7e implement VE4/HE4/RD4/... in SSE2 -97c76f1f make VP8PredLuma4[] non-const and initialize array in VP8DspInit() -0ea8c6c2 Merge "PrintReg: output to stderr" -d7ff2f97 Merge "stopwatch.h: fix includes" -f85ec712 PrintReg: output to stderr -54edbf65 stopwatch.h: fix includes -139142e4 Optimize BackwardReferenceHashChainFollowPath. -5f36b68d enc/backward_references.c: fix indent -e0e9960d Merge "sync version numbers to 0.4.2 release" -64ac5144 sync version numbers to 0.4.2 release -c24f8954 Simplify and speedup Backward refs computation. -d1c359ef fix shared object build with -fvisibility=hidden -a4c3a31b WEBP_TSAN_IGNORE_FUNCTION: fix gcc compat warning -f358eeb8 add code for testing random incremental decoding in dwebp -80247291 mark some init function as being safe for thread_sanitizer. -79b5bdbf bit_reader.h: cosmetics: fix a typo -6c673681 Improved near-lossless mode. -0ce27e71 enc_mips32: workaround gcc-4.9 bug -aca1b98f enc/vp8l.c: fix indent -ca005027 Evaluate non-palette compression for palette image -c8a87bb6 AssignSegments: quiet -Warray-bounds warning -32f67e30 Merge "enc_neon: initialize vectors w/vdup_n_u32" -fabc65da 1-3% faster encoding optimizing SSE_NxN functions -7534d716 enc_neon: initialize vectors w/vdup_n_u32 -5f813912 Merge "Fix return code of EncodeImageInternal()" -e321abe4 Fix return code of EncodeImageInternal() -f82cb06a optimize palette ordering -f545feee don't set the alpha value for histogram index image -2d9b0a44 add WebPDispatchAlphaToGreen() to dsp -1bd4c2ad Merge "Change Entropy based Histogram Combine heuristic." -e295b8f1 Merge "iosbuild: cleanup" -1be4e760 Merge "iosbuild: output autoconf req. on failure" -d5e498d4 Change Entropy based Histogram Combine heuristic. -47a2d8e1 fix MSVC float->int conversion warning -041956f6 iosbuild: cleanup -767eb402 iosbuild: output autoconf req. on failure -35ad48b8 HistoHeapInit: correct positions allocation size -45d9635f lossless: entropy clustering for high qualities. -dc37df8c fix type warning for VS9_x64 -9f7d9e6d iosbuild: make iOS 6 the minimum requirement -fdd6528b Remove unused VP8LDecoder member variable -ea3bba5a Merge "rewrite Disto4x4 in enc_neon.c with intrinsic" -f060dfc4 add lossless incremental decoding support -ab70794d rewrite Disto4x4 in enc_neon.c with intrinsic -d4471637 MIPS: dspr2: added optimization for function FilterLoop24 -2aef54d4 Merge "prepare VP8LDecodeImage for incremental decode" -aed0f5a2 Merge "MIPS: dspr2: added optimization for function FilterLoop26" -28630685 prepare VP8LDecodeImage for incremental decode -248f3aed remove br->error_ field -49e15044 MIPS: dspr2: added optimization for function FilterLoop26 -38128cb9 iobuild.sh: only install .h files in Headers -c792d412 Premultiply with alpha during U/V downsampling -0cc811d7 gif2webp: Background color correction -d7167ff7 Amend the lossless spec according to issue #205, #206 and #224 -b901416b Record the lossless size stats. -cddd3340 Add a WebPExtractAlpha function to dsp -0716a98e fix indent after I0204949917836f74c0eb4ba5a7f4052a4797833b -f9ced95a Optimize lossless decoding for trivial(ARB) codes. -924fcfd9 Merge "webpmux: simplify InitializeConfig()" -c0a462ca webpmux: simplify InitializeConfig() -6986bb5e webpmux: fix indent -f89e1690 webpmux: fix exit status on numeric value parse error -2172cb62 Merge "webpmux: fix loop_count range check" -e3b343ec Merge "examples: warn on invalid numeric parameters" -0e23c487 webpmux: fix loop_count range check -6208338a Merge "fix loop bug in DispatchAlpha()" -d51f3e40 gif2webp: Handle frames with missing graphic control extension -690b491a fix loop bug in DispatchAlpha() -96d43a87 examples: warn on invalid numeric parameters -3101f537 MIPS: dspr2: added optimization for TransformOne -a6bb9b17 SSE2 for inverse Mult(ARGB)Row and ApplyAlphaMultiply -d84a8ffd Remove default initialization of decoder status. -be70b86c configure: simplify libpng-config invocation -e0a99321 Rectify bug in lossless incremental decoding. -e2502a97 MIPS: dspr2: added optimization for TransformAC3 -24e1072a MIPS: dspr2: added optimization for TransformDC -c0e84df8 Merge "Slightly faster lossless decoding (1%)" -8dd28bb5 Slightly faster lossless decoding (1%) -f0103595 MIPS: dspr2: added optimization for ColorIndexInverseTransforms -d3242aee make VP8LSetBitPos() set br->eos_ flag -a9decb55 Lossless decoding: fix eos_ flag condition -3fea6a28 fix erroneous dec->status_ setting -80b8099f MIPS: dspr2: add some specific mips code to commit I2c3f2b12f8df15b785fad5a9c56316e954ae0c53 -e5640625 Merge "further refine the COPY_PATTERN optim for DecodeAlpha" -854509fe enc/histogram.c: reindent after f4059d0 -34421964 Merge "~3-5% faster encoding optimizing PickBestIntra*()" -865069c1 further refine the COPY_PATTERN optim for DecodeAlpha -a5956228 added C-level optimization for DecodeAlphaData function -187d379d add a fallback to ALPHA_NO_COMPRESSION -a48a2d76 ~3-5% faster encoding optimizing PickBestIntra*() -a6140194 ExUtilReadFromStdin: (windows) open stdin in bin mode -e80eab1f webpmux: (windows) open stdout in binary mode -e9bfb116 cwebp: (windows) open stdout in binary mode -5927e15b example_util: add ExUtilSetBinaryMode -30f3b75b webpmux man page: Clarify some title, descriptions and examples -77d4c7e3 address cosmetic comments from patch #71380 -f75dfbf2 Speed up Huffman decoding for lossless -637b3888 dsp/lossless: workaround gcc-4.9 bug on arm -8323a903 dsp.h: collect gcc/clang version test macros -e6c4b52f move static initialization of WebPYUV444Converters[] to the Init function. -49911d4d Merge "fix indentation" -f4059d0c Code cleanup for HistogramRemap. -e632b092 fix indentation -f5c04d64 Merge "add a DispatchAlpha() for SSE2 that handles 8 pixels at a time" -fc98edd9 add a DispatchAlpha() for SSE2 that handles 8 pixels at a time -73d361dd introduce VP8EncQuantize2Blocks to quantize two blocks at a time -0b21c30b MIPS: dspr2: added optimization for EmitAlphaRGB -953acd56 enc_neon: enable QuantizeBlock for aarch64 -f4ae1437 MIPS: mips32: code rebase -56977154 MIPS: dspr2: added optimizations for VP8YuvTo* -2523aa73 SmartRGBYUV: fix odd-width problem with pixel replication -ee52dc4e fix some MSVC64 warning about float conversion -3fca851a cpu: check for _MSC_VER before using msvc inline asm -e2a83d71 faster RGB->YUV conversion function (~7% speedup) -de2d03e1 Merge "Add smart RGB->YUV conversion option -pre 4" -3fc4c539 Add smart RGB->YUV conversion option -pre 4 -b4dc4069 MIPS: dspr2: added optimization for (un)filters -137e6090 Merge "configure: add work around for gcc-4.9 aarch64 bug" -b61c9cec MIPS: dspr2: Optimization of some simple point-sampling functions -e2b8cec0 configure: add work around for gcc-4.9 aarch64 bug -98c54107 MIPS: mips32r2: added optimization for BSwap32 -dab702b3 Update PATENTS to reflect s/VP8/WebM/g -b564f7c7 Merge "MIPS: detect mips32r6 and disable mips32r1 code" -b7e5a5c4 MIPS: detect mips32r6 and disable mips32r1 code -63c2fc02 Correctly use the AC_CANONICAL_* macros -bb07022b Merge "cosmetics" -e300c9d8 cosmetics -0e519eea Merge "cosmetics: remove some extraneous 'extern's" -3ef0f08a Merge "vp8enci.h: cosmetics: fix '*' placement" -4c6dde37 bit_writer: cosmetics: rename kFlush() -> Flush() -f7b4c48b cosmetics: remove some extraneous 'extern's -b47fb00a vp8enci.h: cosmetics: fix '*' placement -b5a36cc9 add -near_lossless [0..100] experimental option -0524d9e5 dsp: detect mips64 & disable mips32 code -d3485d96 cwebp.1: fix quality description placement -29a9fe22 Merge tag 'v0.4.1' -8af27718 update ChangeLog (tag: v0.4.1, origin/0.4.1, 0.4.1) -e09e9ff6 Record & log the image pre-processing time. -f59c0b4b iosbuild.sh: specify optimization flags -8d34ea3e update ChangeLog (tag: v0.4.1-rc1) -dbc3da66 makefile.unix: add vwebp.1 to the dist target -89a7c83c update ChangeLog -ffe67ee9 Merge "update NEWS for the next release" into 0.4.1 -2def1fe6 gif2webp: dust up the help message -fb668d78 remove -noalphadither option from README/vwebp.1 -e49f693b update NEWS for the next release -cd013580 Merge "update AUTHORS" into 0.4.1 -268d01eb update AUTHORS -85213b9b bump version to 0.4.1 -695f80ae Merge "restore mux API compatibility" into 0.4.1 -862d296c restore mux API compatibility -8f6f8c5d remove the !WEBP_REFERENCE_IMPLEMENTATION tweak in Put8x8uv -d713a696 Merge changes If4debc15,I437a5d5f into 0.4.1 -c2fc52e4 restore encode API compatibility -793368e8 restore decode API compatibility -b8984f31 gif2webp: fix compile with giflib 5.1.0 -222f9b1a gif2webp: simplify giflib version checking -d2cc61b7 Extend MakeARGB32() to accept Alpha channel. -4595b62b Merge "use explicit size of kErrorMessages[] arrays" -157de015 Merge "Actuate memory stats for PRINT_MEMORY_INFO" -fbda2f49 JPEG decoder: delay conversion to YUV to WebPEncode() call -0b747b1b use explicit size of kErrorMessages[] arrays -3398d81a Actuate memory stats for PRINT_MEMORY_INFO -6f3202be Merge "move WebPPictureInit to picture.c" -6c347bbb move WebPPictureInit to picture.c -fb3acf19 fix configure message for multi-thread -40b086f7 configure: check for _beginthreadex -1549d620 reorder the YUVA->ARGB and ARGB->YUVA functions correctly -c6461bfd Merge "extract colorspace code from picture.c into picture_csp.c" -736f2a17 extract colorspace code from picture.c into picture_csp.c -645daa03 Merge "configure: check for -Wformat-security" -abafed86 configure: check for -Wformat-security -fbadb480 split monolithic picture.c into picture_{tools,psnr,rescale}.c -c76f07ec dec_neon/TransformAC3: initialize vector w/vcreate -bb4fc051 gif2webp: Allow single-frame animations -46fd44c1 thread: remove harmless race on status_ in End() -5a1a7264 Merge "configure: check for __builtin_bswapXX()" -6781423b configure: check for __builtin_bswapXX() -6450c48d configure: fix iOS builds -6422e683 VP8LFillBitWindow: enable fast path for 32-bit builds -4f7f52b2 VP8LFillBitWindow: respect WEBP_FORCE_ALIGNED -e458badc endian_inl.h: implement htoleXX with BSwapXX -f2664d1a endian_inl.h: add BSwap16 -6fbf5345 Merge "configure: add --enable-aligned" -dc0f479d configure: add --enable-aligned -9cc69e2b Merge "configure: support WIC + OpenGL under mingw64" -257adfb0 remove experimental YUV444 YUV422 and YUV400 code -10f4257c configure: support WIC + OpenGL under mingw64 -380cca4f configure.ac: add AC_C_BIGENDIAN -ee70a901 endian_inl.h: add BSwap64 -47779d46 endian_inl.h: add BSwap32 -d5104b1f utils: add endian_inl.h -58ab6224 Merge "make alpha-detection loop in IsKeyFrame() in good x/y order" -9d562902 make alpha-detection loop in IsKeyFrame() in good x/y order -516971b1 lossless: Remove unaligned read warning -b8b596f6 Merge "configure.ac: add an autoconf version prerequisite" -34b02f8c configure.ac: add an autoconf version prerequisite -e59f5360 neon: normalize vdup_n_* usage -6ee7160d Merge changes I0da7b3d3,Idad2f278,I4accc305 -abc02f24 Merge "fix (uncompiled) typo" -bc03670f neon: add INIT_VECTOR4 -6c1c632b neon: add INIT_VECTOR3 -dc7687e5 neon: add INIT_VECTOR2 -4536e7c4 add WebPMuxSetCanvasSize() to the mux API -824eab10 fix (uncompiled) typo -1f3e5f1e remove unused 'shift' argument and QFIX2 define -8e867051 Merge "VP8LoadNewBytes: use __builtin_bswap32 if available" -1b6a2635 Merge "Fix handling of weird GIF with canvas dimension 0x0" -1da3d461 VP8LoadNewBytes: use __builtin_bswap32 if available -1582e402 Fix handling of weird GIF with canvas dimension 0x0 -b8811dac Merge "rename interface -> winterface" -db8b8b5f Fix logic in the GIF LOOP-detection parsing -25aaddc8 rename interface -> winterface -5584d9d2 make WebPSetWorkerInterface() check its arguments -a9ef7ef9 Merge "cosmetics: update thread.h comments" -c6af9991 Merge "dust up the help message" -0a8b8863 dust up the help message -a9cf3191 cosmetics: update thread.h comments -27bfeee4 QuantizeBlock SSE2 Optimization: -2bc0dc3e Merge "webpmux: warn when odd frame offsets are used" -3114ebe4 Merge changes Id8edd3c1,Id418eb96,Ide05e3be -c0726634 webpmux: warn when odd frame offsets are used -c5c6b408 Merge "add alpha dithering for lossy" -d5146784 examples/Android.mk: add cwebp -ca0fa7c7 Android.mk: move dwebp to examples/Android.mk -73d8fca0 Android.mk: add ENABLE_SHARED flag -6e93317f muxread: fix out of bounds read -8b0f6a48 Makefile.vc: fix CFLAGS assignment w/HAVE_AVX2=1 -bbe32df1 add alpha dithering for lossy -79020767 Merge "make error-code reporting consistent upon malloc failure" -77bf4410 make error-code reporting consistent upon malloc failure -7a93c000 **/Makefile.am: remove unused AM_CPPFLAGS -24e30805 Add an interface abstraction to the WebP worker thread implementation -d6cd6358 Merge "fix orig_rect==NULL case" -2bfd1ffa fix orig_rect==NULL case -059e21c1 Merge "configure: move config.h to src/webp/config.h" -f05fe006 properly report back encoding error code in WebPFrameCacheAddFrame() -32b31379 configure: move config.h to src/webp/config.h -90090d99 Merge changes I7c675e51,I84f7d785 -ae7661b3 makefiles: define WEBP_HAVE_AVX2 when appropriate -69fce2ea remove the special casing for res->first in VP8SetResidualCoeffs -6e61a3a9 configure: test for -msse2 -b9d2efc6 rename upsampling_mips32.c to yuv_mips32.c -bdfeebaa dsp/yuv: move sse2 functions to yuv_sse2.c -46b32e86 Merge "configure: set WEBP_HAVE_AVX2 when available" -88305db4 Merge "VP8RandomBits2: prevent signed int overflow" -73fee88c VP8RandomBits2: prevent signed int overflow -db4860b3 enc_sse2: prevent signed int overflow -3fdaf4d2 Merge "real fix for longjmp warning" -385e3340 real fix for longjmp warning -230a0555 configure: set WEBP_HAVE_AVX2 when available -a2ac8a42 restore original value_/range_ field order -5e2ee56f Merge "remove libwebpdspdecode dep on libwebpdsp_avx2" -61362db5 remove libwebpdspdecode dep on libwebpdsp_avx2 -42c447ae Merge "lossy bit-reader clean-up:" -479ffd8b Merge "remove unused #include's" -9754d39a Merge "strong filtering speed-up (~2-3% x86, ~1-2% for NEON)" -158aff9b remove unused #include's -09545eea lossy bit-reader clean-up: -ea8b0a17 strong filtering speed-up (~2-3% x86, ~1-2% for NEON) -6679f899 Optimize VP8SetResidualCoeffs. -ac591cf2 fix for gcc-4.9 warnings about longjmp + local variables -4dfa86b2 dsp/cpu: NaCl has no support for xgetbv -4c398699 Merge "cwebp: fallback to native webp decode in WIC builds" -33aa497e Merge "cwebp: add some missing newlines in longhelp output" -c9b340a2 fix missing WebPInitAlphaProcessing call for premultiplied colorspace output -57897bae Merge "lossless_neon: use vcreate_*() where appropriate" -6aa4777b Merge "(enc|dec)_neon: use vcreate_*() where appropriate" -0d346e41 Always reinit VP8TransformWHT instead of hard-coding -7d039fc3 cwebp: fallback to native webp decode in WIC builds -d471f424 cwebp: add some missing newlines in longhelp output -bf0e0030 lossless_neon: use vcreate_*() where appropriate -9251c2f6 (enc|dec)_neon: use vcreate_*() where appropriate -399b916d lossy decoding: correct alpha-rescaling for YUVA format -78c12ed8 Merge "Makefile.vc: add rudimentary avx2 support" -dc5b122f try to remove the spurious warning for static analysis -ddfefd62 Makefile.vc: add rudimentary avx2 support -a8911643 Merge "simplify VP8LInitBitReader()" -fdbcd44d simplify VP8LInitBitReader() -7c004287 makefile.unix: add rudimentary avx2 support -515e35cf Merge "add stub dsp/enc_avx2.c" -a05dc140 SSE2: yuv->rgb speed-up for point-sampling -178e9a69 add stub dsp/enc_avx2.c -1b99c09c Merge "configure: add a test for -mavx2" -fe728071 configure: add a test for -mavx2 -e46a247c cpu: fix check for __cpuidex availability -176fda26 fix the bit-writer for lossless in 32bit mode -541784c7 dsp.h: add a check for AVX2 / define WEBP_USE_AVX2 -bdb151ee dsp/cpu: add AVX2 detection -ab9f2f86 Merge "revamp the point-sampling functions by processing a full plane" -a2f8b289 revamp the point-sampling functions by processing a full plane -ef076026 use decoder's DSP functions for autofilter -2b5cb326 Merge "dsp/cpu: add AVX detection" -df08e67e dsp/cpu: add AVX detection -e2f405c9 Merge "clean-up and slight speed-up in-loop filtering SSE2" -f60957bf clean-up and slight speed-up in-loop filtering SSE2 -9fc3ae46 .gitattributes: treat .ppm as binary -3da924b5 Merge "dsp/WEBP_USE_NEON: test for __aarch64__" -c7164490 Android.mk: always include *_neon.c in the build -a577b23a dsp/WEBP_USE_NEON: test for __aarch64__ -54bfffca move RemapBitReader() from idec.c to bit_reader code -34168ecb Merge "remove all unused layer code" -f1e77173 remove all unused layer code -b0757db7 Code cleanup for VP8LGetHistoImageSymbols. -5fe628d3 make the token page size be variable instead of fixed 8192 -f948d08c memory debug: allow setting pre-defined malloc failure points -ca3d746e use block-based allocation for backward refs storage, and free-lists -1ba61b09 enable NEON intrinsics in aarch64 builds -b9d2bb67 dsp/neon.h: coalesce intrinsics-related defines -b5c75258 iosbuild: add support for iOSv7/aarch64 -9383afd5 Reduce number of memory allocations while decoding lossless. -888e63ed Merge "dsp/lossless: prevent signed int overflow in left shift ops" -8137f3ed Merge "instrument memory allocation routines for debugging" -2aa18736 instrument memory allocation routines for debugging -d3bcf72b Don't allocate VP8LHashChain, but treat like automatic object -bd6b8619 dsp/lossless: prevent signed int overflow in left shift ops -b7f19b83 Merge "dec/vp8l: prevent signed int overflow in left shift ops" -29059d51 Merge "remove some uint64_t casts and use." -e69a1df4 dec/vp8l: prevent signed int overflow in left shift ops -cf5eb8ad remove some uint64_t casts and use. -38e2db3e MIPS: MIPS32r1: Added optimization for HistogramAdd. -e0609ade dwebp: fix exit code on webp load failure -bbd358a8 Merge "example_util.h: avoid forward declaring enums" -8955da21 example_util.h: avoid forward declaring enums -6d6865f0 Added SSE2 variants for Average2/3/4 -b3a616b3 make HistogramAdd() a pointer in dsp -c8bbb636 dec_neon: relocate some inline-asm defines -4e393bb9 dec_neon: enable intrinsics-only functions -ba99a922 dec_neon: use positive tests for USE_INTRINSICS -69058ff8 Merge "example_util: add ExUtilDecodeWebPIncremental" -a7828e8b dec_neon: make WORK_AROUND_GCC conditional on version -3f3d717a Merge "enc_neon: enable intrinsics-only functions" -de3cb6c8 Merge "move LOCAL_GCC_VERSION def to dsp.h" -1b2fe14d example_util: add ExUtilDecodeWebPIncremental -ca49e7ad Merge "enc_neon: move Transpose4x4 to dsp/neon.h" -ad900abd Merge "fix warning about size_t -> int conversion" -4825b436 fix warning about size_t -> int conversion -42b35e08 enc_neon: enable intrinsics-only functions -f937e012 move LOCAL_GCC_VERSION def to dsp.h -5e1a17ef enc_neon: move Transpose4x4 to dsp/neon.h -c7b92a5a dec_neon: (WORK_AROUND_GCC) delete unused Load4x8 -8e5f90b0 Merge "make ExUtilLoadWebP() accept NULL bitstream param." -05d4c1b7 Merge "cwebp: add webpdec" -ddeb6ac8 cwebp: add webpdec -35d7d095 Merge "Reduce memory footprint for encoding WebP lossless." -0b896101 Reduce memory footprint for encoding WebP lossless. -f0b65c9a make ExUtilLoadWebP() accept NULL bitstream param. -9c0a60cc Merge "dwebp: move webp decoding to example_util" -1d62acf6 MIPS: MIPS32r1: Added optimization for HuffmanCost functions. -4a0e7390 dwebp: move webp decoding to example_util -c0220460 Merge "Bugfix: Incremental decode of lossy-alpha" -8c7cd722 Bugfix: Incremental decode of lossy-alpha -7955152d MIPS: fix error with number of registers. -b1dabe37 Merge "Move the HuffmanCost() function to dsp lib" -75b12006 Move the HuffmanCost() function to dsp lib -2772b8bd MIPS: fix assembler error revealed by clang's debug build -6653b601 enc_mips32: fix unused symbol warning in debug -8dec1209 enc_mips32: disable ITransform(One) in debug builds -98519dd5 enc_neon: convert Disto4x4 to intrinsics -fe9317c9 cosmetics: -953b0746 enc_neon: cosmetics -a9fc697c Merge "WIP: extract the float-calculation of HuffmanCost from loop" -3f84b521 Merge "replace some mult-long (vmull_u8) with mult-long-accumulate (vmlal_u8)" -4ae0533f MIPS: MIPS32r1: Added optimizations for ExtraCost functions. -b30a04cf WIP: extract the float-calculation of HuffmanCost from loop -a8fe8ce2 Merge "NEON intrinsics version of CollectHistogram" -95203d2d NEON intrinsics version of CollectHistogram -7ca2e74b replace some mult-long (vmull_u8) with mult-long-accumulate (vmlal_u8) -41c6efbd fix lossless_neon.c -8ff96a02 NEON intrinsics version of FTransform -0214f4a9 Merge "MIPS: MIPS32r1: Added optimizations for FastLog2" -baabf1ea MIPS: MIPS32r1: Added optimizations for FastLog2 -3d49871d NEON functions for lossless coding -3fe02915 MIPS: MIPS32r1: Added optimizations for SSE functions. -c503b485 Merge "fix the gcc-4.6.0 bug by implementing alternative method" -abe6f487 fix the gcc-4.6.0 bug by implementing alternative method -5598bdec enc_mips32.c: fix file mode -2b1b4d5a MIPS: MIPS32r1: Add optimization for GetResidualCost -f0a1f3cd Merge "MIPS: MIPS32r1: Added optimization for FTransform" -7231f610 MIPS: MIPS32r1: Added optimization for FTransform -869eaf6c ~30% encoding speedup: use NEON for QuantizeBlock() -f758af6b enc_neon: convert FTransformWHT to intrinsics -7dad095b MIPS: MIPS32r1: Added optimization for Disto4x4 (TTransform) -2298d5f3 MIPS: MIPS32r1: Added optimization for QuantizeBlock -e88150c9 Merge "MIPS: MIPS32r1: Add optimization for ITransform" -de693f25 lossless_neon: disable VP8LConvert* functions -4143332b NEON intrinsics for encoding -0ca2914b MIPS: MIPS32r1: Add optimization for ITransform -71bca5ec dec_neon: use vst_lane instead of vget_lane -bf061052 Intrinsics NEON version of TransformOne -19c6f1ba Merge "dec_neon: use vld?_lane instead of vset?_lane" -7a94c0cf upsampling_neon: drop NEON suffix from local functions -d14669c8 upsampling_sse2: drop SSE2 suffix from local functions -2ca42a4f enc_sse2: drop SSE2 suffix from local functions -d038e619 dec_sse2: drop SSE2 suffix from local functions -fa52d752 dec_neon: use vld?_lane instead of vset?_lane -c520e77d cosmetic: fix long line -4b0f2dae Merge "add intrinsics NEON code for chroma strong-filtering" -e351ec07 add intrinsics NEON code for chroma strong-filtering -aaf734b8 Merge "Add SSE2 version of forward cross-color transform" -c90a902e Add SSE2 version of forward cross-color transform -bc374ff3 Use histogram_bits to initalize transform_bits. -2132992d Merge "Add strong filtering intrinsics (inner and outer edges)" -5fbff3a6 Add strong filtering intrinsics (inner and outer edges) -d4813f0c Add SSE2 function for Inverse Cross-color Transform -26029568 dec_neon: add strong loopfilter intrinsics -cca7d7ef Merge "add intrinsics version of SimpleHFilter16NEON()" -1a05dfa7 windows: fix dll builds -d6c50d8a Merge "add some colorspace conversion functions in NEON" -4fd7c82e SSE2 variants of Subtract-Green: Rectify loop condition -97e5fac3 add some colorspace conversion functions in NEON -b9a7a45f add intrinsics version of SimpleHFilter16NEON() -daccbf40 add light filtering NEON intrinsics -af444608 fix typo in STORE_WHT -6af6b8e1 Tune HistogramCombineBin for large images. -af93bdd6 use WebPSafe[CM]alloc/WebPSafeFree instead of [cm]alloc/free -51f406a5 lossless_sse2: relocate VP8LDspInitSSE2 proto -0f4f721b separate SSE2 lossless functions into its own file -514fc251 VP8LConvertFromBGRA: use conversion function pointers -6d2f3527 dsp/dec: TransformDCUV: use VP8TransformDC -defc8e1b Merge "fix out-of-bound read during alpha-plane decoding" -fbed3643 Merge "dsp: reuse wht transform from dec in encoder" -d8467084 Merge "Add SSE2 version of ARGB -> BGR/RGB/... conversion functions" -207d03b4 fix out-of-bound read during alpha-plane decoding -d1b33ad5 2-5% faster trellis with clang/MacOS (and ~2-3% on ARM) -369c26dd Add SSE2 version of ARGB -> BGR/RGB/... conversion functions -df230f27 dsp: reuse wht transform from dec in encoder -80e218d4 Android.mk: fix build with APP_ABI=armeabi-v7a-hard -59daf083 Merge "cosmetics:" -53622008 cosmetics: -3e7f34a3 AssignSegments: quiet array-bounds warning -3c2ebf58 Merge "UpdateHistogramCost: avoid implicit double->float" -cf821c82 UpdateHistogramCost: avoid implicit double->float -312e638f Extend the search space for GetBestGreenRedToBlue -1c58526f Fix few nits -fef22704 Optimize and re-structure VP8LGetHistoImageSymbols -068b14ac Optimize lossless decoding. -5f0cfa80 Do a binary search to get the optimum cache bits. -24ca3678 Merge "allow 'cwebp -o -' to emit output to stdout" -e12f874e allow 'cwebp -o -' to emit output to stdout -2bcad89b allow some more stdin/stout I/O -84ed4b3a fix cwebp.1 typos after patch #69199 -65b99f1c add a -z option to cwebp, and WebPConfigLosslessPreset() function -30176619 4-5% faster trellis by removing some unneeded calculations. -687a58ec histogram.c: reindent after b33e8a0 -06d456f6 Merge "~3-4% faster lossless encoding" -c60de260 ~3-4% faster lossless encoding -42eb06fc Merge "few cosmetics after patch #69079" -82af8264 few cosmetics after patch #69079 -b33e8a05 Refactor code for HistogramCombine. -ca1bfff5 Merge "5-10% encoding speedup with faster trellis (-m 6)" -5aeeb087 5-10% encoding speedup with faster trellis (-m 6) -82ae1bf2 cosmetics: normalize VP8GetCPUInfo checks -e3dd9243 Merge "Refactor GetBestPredictorForTile for future tuning." -206cc1be Refactor GetBestPredictorForTile for future tuning. -3cb84062 Merge "speed-up trellis quant (~5-10% overall speed-up)" -b66f2227 Merge "lossy encoding: ~3% speed-up" -4287d0d4 speed-up trellis quant (~5-10% overall speed-up) -390c8b31 lossy encoding: ~3% speed-up -9a463c4a Merge "dec_neon: convert TransformWHT to intrinsics" -e8605e96 Merge "dec_neon: add ConvertU8ToS16" -4aa3e412 MIPS: MIPS32r1: rescaler bugfix -c16cd99a Speed up lossless encoder. -9d6b5ff1 dec_neon: convert TransformWHT to intrinsics -2ff0aae2 dec_neon: add ConvertU8ToS16 -77a8f919 fix compilation with USE_YUVj flag -4acbec1b Merge changes I3b240ffb,Ia9370283,Ia2d28728 -2719bb7e dec_neon: TransformAC3: work on packed vectors -b7b60ca1 dec_neon: add SaturateAndStore4x4 -b7685d73 Rescale: let ImportRow / ExportRow be pointer-to-function -e02f16ef dec_neon.c: convert TransformDC to intrinsics -9cba963f add missing file -8992ddb7 use static clipping tables -0235d5e4 1-2% faster quantization in SSE2 -b2fbc36c fix VC12-x64 warning -6e37cb94 Merge "cosmetics: backward_references.c: reindent after a7d2ee3" -a42ea974 cosmetics: backward_references.c: reindent after a7d2ee3 -6c327442 Merge "fix missing __BIG_ENDIAN__ definition on some platform" -a8b6aad1 fix missing __BIG_ENDIAN__ definition on some platform -fde2904b Increase initial buffer size for VP8L Bit Writer. -a7d2ee39 Optimize cache estimate logic. -7fb6095b Merge "dec_neon.c: add TransformAC3" -bf182e83 VP8LBitWriter: use a bit-accumulator -3f40b4a5 Merge "MIPS: MIPS32r1: clang macro warning resolved" -1684f4ee WebP Decoder: Mark some truncated bitstreams as invalid -acbedac4 MIPS: MIPS32r1: clang macro warning resolved -228e4877 dec_neon.c: add TransformAC3 -393f89b7 Android.mk: avoid gcc-specific flags with clang -32aeaf11 revamp VP8LColorSpaceTransform() a bit -0c7cc4ca Merge "Don't dereference NULL, ensure HashChain fully initialized" -391316fe Don't dereference NULL, ensure HashChain fully initialized -926ff402 WEBP_SWAP_16BIT_CSP: remove code dup -1d1cd3bb Fix decode bug for rgbA_4444/RGBA_4444 color-modes. -939e70e7 update AUTHORS file -8934a622 cosmetics: *_mips32.c -dd438c9a MIPS: MIPS32r1: Optimization of some simple point-sampling functions. PATCH [6/6] -53520911 Added support for calling sampling functions via pointers. -d16c6974 MIPS: MIPS32r1: Optimization of filter functions. PATCH [5/6] -04336fc7 MIPS: MIPS32r1: Optimization of function TransformOne. PATCH [4/6] -92d8fc7d MIPS: MIPS32r1: Optimization of function WebPRescalerImportRow. PATCH [3/6] -bbc23ff3 parse one row of intra modes altogether -a2f608f9 Merge "MIPS: MIPS32r1: Optimization of function WebPRescalerExportRow. [2/6]" -88230854 MIPS: MIPS32r1: Optimization of function WebPRescalerExportRow. [2/6] -c5a5b028 decode mt+incremental: fix segfault in debug builds -9882b2f9 always use fast-analysis for all methods. -000adac0 Merge "autoconf: update ax_pthread.m4" -2d2fc37d update .gitignore -5bf4255a Merge "Make it possible to avoid automagic dependencies" -c1cb1933 disable NEON for arm64 platform -73a304e9 Make it possible to avoid automagic dependencies -4d493f8d MIPS: MIPS32r1: Decoder bit reader function optimized. PATCH [1/6] -c741183c make WebPCleanupTransparentArea work with argb picture -5da18552 add a decoding option to flip image vertically -00c3c4e1 Merge "add man/vwebp.1" -2c6bb428 add man/vwebp.1 -ea59a8e9 Merge "Merge tag 'v0.4.0'" -7574bed4 fix comments related to array sizes -0b5a90fd dwebp.1: fix option formatting -effcb0fd Merge tag 'v0.4.0' -7c76255d autoconf: update ax_pthread.m4 -fff2a11b make -short work with -print_ssim, -print_psnr, etc. -68e7901d update ChangeLog (tag: v0.4.0-rc1, tag: v0.4.0, origin/0.4.0, 0.4.0) -256e4333 update NEWS description with new general features -29625340 Merge "gif2webp: don't use C99 %zu" into 0.4.0 -3b9f9dd0 gif2webp: don't use C99 %zu -b5b2e3c7 cwebp: fix metadata output w/lossy+alpha -ad26df1a makefile.unix: clean up libgif2webp_util.a -c3b45570 update Changelog -ca841121 Merge "bump version to 0.4.0" into 0.4.0 -8c524db8 bump version to 0.4.0 -eec2398c update AUTHORS & .mailmap -b9bbf6a1 update NEWS for 0.4.0 -c72e0811 Merge "dec/webp.c: don't wait for data before reporting w/h" -5ad65314 dec/frame.c: fix formatting -f7fc4bc8 dec/webp.c: don't wait for data before reporting w/h -66a32af5 Merge "NEON speed up" -26d842eb NEON speed up -f307f98b Merge "webpmux: let -- stop parameter parsing" -fe051da7 Merge "README: add a section on gif2webp" -6fd2bd62 Merge "manpage pedantry" -4af19007 README: add a section on gif2webp -6f36ade9 manpage pedantry -f9016cb9 README: update dwebp options -b4fa0a47 webpmux: let -- stop parameter parsing -a9a20acf gif2webp: Add a multi-threaded encode option -495bef41 fix bug in TrellisQuantize -605a7127 simplify __cplusplus ifdef -33109f99 Merge "drop: ifdef __cplusplus checks from C files" -7f9de0b9 Merge changes I994a5587,I8467bb71,I13b50688,I1e2c9c7b -5459030b gif2webp: let -- stop parameter parsing -a4b0aa06 vwebp: let -- stop parameter parsing -98af68fe cwebp: let -- stop parameter parsing -a33831e2 dwebp: let -- stop parameter parsing -36301249 add some checks on error paths -ce4c7139 Merge "autoconf: add --disable-wic" -5227d991 drop: ifdef __cplusplus checks from C files -f6453559 dwebp.1: fix typo -f91034f2 Merge "cwebp: print metadata stats when no output file is given" -d4934553 gif2webp: Backward compatibility for giflib version <= 4.1.3 -4c617d32 gif2webp: Disable output of ICC profile by default -73b731fb introduce a special quantization function for WHT -41c0cc4b Make Forward WHT transform use 32bit fixed-point calculation -a3359f5d Only compute quantization params once -70490437 cwebp: print metadata stats when no output file is given -d513bb62 * fix off-by-one zthresh calculation * remove the sharpening for non luma-AC coeffs * adjust the bias a little bit to compensate for this -ad9dec0c Merge "cosmetics: dwebp: fix local function name format" -f737f037 Merge "dwebp: remove a dead store" -3c3a70da Merge "makefile.unix: install binaries in $(DESTDIR)/bin/" -150b655f Merge "Android.mk: add some release compile flags" -dbebd33b cosmetics: dwebp: fix local function name format -27749951 dwebp: remove a dead store -a01e04fe autoconf: add --disable-wic -5009b227 makefile.unix: install binaries in $(DESTDIR)/bin/ -bab30fca Merge "fix -print_psnr / ssim options" -ebef7fb3 fix -print_psnr / ssim options -cb637855 Merge "fix bug due to overzealous check in WebPPictureYUVAToARGB()" -8189885b Merge "EstimateBestFilter: use an int to iterate WEBP_FILTER_TYPE" -4ad7d335 Android.mk: add some release compile flags -c12e2369 cosmetics: fix a few typos -6f104034 fix bug due to overzealous check in WebPPictureYUVAToARGB() -3f6c35c6 EstimateBestFilter: use an int to iterate WEBP_FILTER_TYPE -cc55790e Merge changes I8bb7a4dc,I2c180051,I021a014f,I8a224a62 -c536afb5 Merge "cosmetics: fix some typos" -cbdd3e6e add a -dither dithering option to the decoder -e8124012 Updated iosbuild.sh for XCode 5.x -4931c329 cosmetics: fix some typos -05aacf77 mux: add some missing casts -617d9348 enc/vp8l: add a missing cast -46db2865 idec: add some missing casts -b524e336 ErrorStatusLossless: correct return type -cb261f79 fix a descaling bug for vertical/horizontal U/V interpolation -bcb3955c Merge changes I48968468,I181bc736 -73f52133 gif2webp: Add a mixed compression mode -6198715e demux: split chunk parsing from ParseVP8X -d2e3f4e6 demux: add a tail pointer for chunks -87cffcc3 demux: cosmetics: s/has_frames/is_animation/ -e18e6677 demux: strictly enforce the animation flag -c4f39f4a demux: cosmetics: remove a useless break -61cb884d demux: (non-exp) fail if the fragmented flag is set -ff379db3 few % speedup of lossless encoding -df3649a2 remove all disabled code related to P-frames -6d0cb3de Merge "gif2webp: kmin = 0 should suppress key-frame addition." -36555983 gif2webp: kmin = 0 should suppress key-frame addition. -7708e609 Merge "detect flatness in blocks and favor DC prediction" -06b1503e Merge "add comment about the kLevelsFromDelta[][] LUT generation" -5935259c add comment about the kLevelsFromDelta[][] LUT generation -e3312ea6 detect flatness in blocks and favor DC prediction -ebc9b1ee Merge "VPLBitReader bugfix: Catch error if bit_pos > LBITS too." -96ad0e0a VPLBitReader bugfix: Catch error if bit_pos > LBITS too. -a014e9c9 tune quantization biases toward higher precision -1e898619 add helpful PrintBlockInfo() function -596a6d73 make use of 'extern' consistent in function declarations -c8d48c6e Merge "extract random utils to their own file util/random.[ch]" -98aa33cf extract random utils to their own file util/random.[ch] -432a723e Merge "swig: add basic go bindings" -fab618b5 Merge "rename libwebp.i -> libwebp.swig" -e4e7fcd6 swig: add basic go bindings -d3408720 Merge "fast auto-determined filtering strength" -f8bfd5cd fast auto-determined filtering strength -ac0bf951 small clean-up in ExpandMatrix() -1939607e rename libwebp.i -> libwebp.swig -43148b6c filtering: precompute ilimit and hev_threshold -18f992ec simplify f_inner calculation a little -241d11f1 add missing const -86c0031e add a 'format' field to WebPBitstreamFeatures -dde91fde Demux: Correct the extended format validation -5d6c5bd2 add entry for '-resize' option in cwebp's man -7c098d18 Use some gamma-curve range compression when computing U/V average -0b2b0504 Use deterministic random-dithering during RGB->YUV conversion -8a2fa099 Add a second multi-thread method -7d6f2da0 Merge "up to 20% faster multi-threaded decoding" -266f63ea Merge "libwebp.jar: build w/Java 1.6 for Android compat" -0532149c up to 20% faster multi-threaded decoding -38efdc2e Simplify the gif2webp tool: move the optimization details to util -de899516 libwebp.jar: build w/Java 1.6 for Android compat -cb221552 Decode a full row of bitstream before reconstructing -dca8a4d3 Merge "NEON/simple loopfilter: avoid q4-q7 registers" -9e84d901 Merge "NEON/TransformWHT: avoid q4-q7 registers" -fc10249b NEON/simple loopfilter: avoid q4-q7 registers -2f09d63e NEON/TransformWHT: avoid q4-q7 registers -77585a2b Merge "use a macrofunc for setting NzCoeffs bits" -d155507c Merge "use HINT_GRAPH as image_hint for gif source" -9c561646 Merge "only print GIF_DISPOSE_WARNING once" -05879865 use HINT_GRAPH as image_hint for gif source -0b28d7ab use a macrofunc for setting NzCoeffs bits -f9bbc2a0 Special-case sparse transform -00125196 gif2webp: detect and flatten uniformly similar blocks -0deaf0fa only print GIF_DISPOSE_WARNING once -6a8c0eb7 Merge "small optimization in segment-smoothing loop" -f7146bc1 small optimization in segment-smoothing loop -5a7533ce small gif2webp fix -4df0c89e Merge changes Ic697660c,I27285521 -5b2e6bd3 Android.mk: add a dwebp target -f910a84e Android.mk: update build flags -63f9aba4 special-case WHT transform when there's only DC -80911aef Merge "7-8% faster decoding by rewriting GetCoeffs()" -606c4304 gif2webp: Improved compression for lossy animated WebP -fb887f7f gif2webp: Different kmin/kmax defaults for lossy and lossless -2a981366 7-8% faster decoding by rewriting GetCoeffs() -92d47e4c improve VP8L signature detection by checking the version bits too -5cd43e43 Add -incremental option to dwebp -54b8e3f6 webpmux: DisplayInfo(): remove unnecessary error checks. -40ae3520 fix memleak in WebPIDelete() -d9662658 mux.h doc: WebPMuxGetFrame() can return WEBP_MUX_MEMORY_ERROR too. -0e6747f8 webpmux -info: display dimensions and has_alpha per frame -d78a82c4 Sanity check for underflow -8498f4bf Merge "remove -Wshadow warnings" -e89c6fc8 Avoid a potential memleak -3ebe1757 Merge "break down the proba 4D-array into some handy structs" -6a44550a break down the proba 4D-array into some handy structs -2f5e8934 remove -Wshadow warnings -bf3a29b3 Merge "add proper WEBP_HAVE_GIF and WEBP_HAVE_GL flags" -2b0a7593 Merge "fix some warnings from static analysis" -22dd07ce mux.h: Some doc corrections -79ff0346 add proper WEBP_HAVE_GIF and WEBP_HAVE_GL flags -d51f45f0 fix some warnings from static analysis -d134307b fix conversion warning on MSVC -d538cea8 gif2webp: Support a 'min' and 'max' key frame interval -80b54e1c allow search with token buffer loop and fix PARTITION0 problem -b7d4e042 add VP8EstimateTokenSize() -10fddf53 enc/quant.c: silence a warning -399cd456 Merge "fix compile error on ARM/gcc" -9f24519e encoder: misc rate-related fixes -c663bb21 Merge "simplify VP8IteratorSaveBoundary() arg passing" -fa46b312 Demux.h: Correct a method name reference -f8398c9d fix compile error on ARM/gcc -f691f0e4 simplify VP8IteratorSaveBoundary() arg passing -42542be8 up to 6% faster encoding with clang compiler -93402f02 multi-threaded segment analysis -7e2d6595 Merge "remove the PACK() bit-packing tricks" -c13fecf9 remove the PACK() bit-packing tricks -2fd091c9 Merge "use NULL for lf_stats_ testing, not bool" -b11c9d62 dwebp: use default dct_method -4bb8465f Merge "(de)mux.h: wrap pseudo-code in /* */" -cfb56b17 make -pass option work with token buffers -5416aab4 (de)mux.h: wrap pseudo-code in /* */ -35dba337 use NULL for lf_stats_ testing, not bool -733a7faa enc->Iterator memory cleanup -e81fac86 Add support for "no blend" in webpmux binary -3b80bc48 gif2webp: Separate out each step into a method -bef7e9cc Add doc precision about demux object keeping pointers to data. -61405a14 dwebp: enable stdout output with WIC -6eabb886 Merge "Animated WebP: add "do no blend" option to spec" -be20decb fix compilation for BITS 24 -e58cc137 Merge "dwebp: s/unsigned char/uint8_t/" -72501d43 dwebp: s/unsigned char/uint8_t/ -2c9633e8 Merge "gif2webp: Insert independent frames at regular intervals." -f0d6a14b gif2webp: Insert independent frames at regular intervals. -b25a6fbf yuv.h: fix indent -ede3602e Merge "cosmetics: fix indent" -3a65122a dwebp: fix stdout related output -388a7249 cosmetics: fix indent -4c7322c8 Merge "dsp: msvc compatibility" -d50c7e32 Merge "5-7% faster SSE2 versions of YUV->RGB conversion functions" -b8ab7847 Merge "simplify upsampler calls: only allow 'bottom' to be NULL" -df6cebfa 5-7% faster SSE2 versions of YUV->RGB conversion functions -ad6ac32d simplify upsampler calls: only allow 'bottom' to be NULL -a5e8afaf output to stdout if file name is "-" -f358450f dsp: msvc compatibility -43a7c8eb Merge "cosmetics" -4c5f19c1 Merge "bit_reader.h: cosmetics" -f72fab70 cosmetics -14dd5e78 fix const-ness -b20aec49 Merge "Support for 'do not blend' option in vwebp" -dcf65222 Support for 'do not blend' option in vwebp -d5bad033 Animated WebP: add "do no blend" option to spec -a2f5f73d Merge "Support for "Do not blend" in mux and demux libraries" -e081f2f3 Pack code & extra_bits to Struct (VP8LPrefixCode). -6284854b Support for "Do not blend" in mux and demux libraries -f486aaa9 Merge "slightly faster ParseIntraMode" -d1718632 slightly faster ParseIntraMode -3ceca8ad bit_reader.h: cosmetics -69257f70 Create LUT for PrefixEncode. -988b7084 add WebPWorkerExecute() for convenient bypass -06e24987 Merge "VP8EncIterator clean-up" -de4d4ad5 VP8EncIterator clean-up -7bbe9529 Merge "cosmetics: thread.c: drop a redundant comment" -da411485 cosmetics: thread.c: drop a redundant comment -feb4b6e6 thread.h: #ifdef when checking WEBP_USE_THREAD -8924a3a7 thread.c: drop WebPWorker prefix from static funcs -1aed8f2a Merge "fix indent" -4038ed15 fix indent -1693fd9b Demux: A new state WEBP_DEMUX_PARSE_ERROR -8dcae8b3 fix rescaling-with-alpha inaccuracy -11249abf Merge changes I9b4dc36c,I4e0eef4d -52508a1f Mux: support parsing unknown chunks within a frame/fragment. -05db0572 WebPMuxSetChunk: remove unused variable -8ba1bf61 Stricter check for presence of alpha when writing lossless images -a03c3516 Demux: WebPIterator now also denotes if the frame has alpha. -6df743a3 Decoder: handle fragments case correctly too. -faa4b07e Support for unknown chunks in mux library -7d60bbc6 Speed up HashChainFindCopy function. -66740140 Speedup Alpha plane encoding. -b7346a1e 0.1 % speedup to decoding -c606182e webp-container-spec: Tighten language added by last -a34a5029 pngdec: output error messages from libpng -e84c625d Merge "Detect canvas and image size mismatch in decoder." -f626fe2e Detect canvas and image size mismatch in decoder. -f5fbdee0 demux: stricter image bounds check -30c8158a add extra assert in Huffman decode code -8967b9f3 SSE2 for lossless decoding (critical) functions. -699d80ea Jump-lookup for Huffman coding -c34307ab fix some VS9 warnings about type conversion -eeada35c pngdec: add missing include -54b65108 gif2webp: If aligning to even offsets, extra pixels should be transparent -0bcf5ce3 Merge "remove a malloc() in case we're using only FILTER_NONE for alpha" -2c07143b remove a malloc() in case we're using only FILTER_NONE for alpha -a4d5f59d Faster lossless decoding -fd53bb75 Merge "alternate LUT-base reverse-bits code" -d1c166ef Merge "Container spec: a clarification on background color." -fdb91779 Rename a method -5e967532 Container spec: a clarification on background color. -30e77d0f Merge branch '0.3.0' -1b631e29 alternate LUT-base reverse-bits code -24cc307a ~20% faster lossless decoding -313d853f Speedup for decoding lossless WebP photographs: -24ee098a change the bytes_per_pixels_ field into more evocative use_8b_decode -2a04b034 update ChangeLog (tag: v0.3.1-rc2, tag: v0.3.1) -7288950b Regression fix for alpha channels using color cache: -2e377b53 wicdec: silence a format warning -ad9e42a6 muxedit: silence some uninitialized warnings -3307c163 Don't set alpha-channel to 0xff for alpha->green uplift -5130770c Merge "wicdec: silence a format warning" -a37eff47 Regression fix for alpha channels using color cache: -241cf99b Merge "muxedit: silence some uninitialized warnings" -c8f9c84d Regression fix for alpha unfiltering: -14cd5c6c muxedit: silence some uninitialized warnings -a368db81 dec/vp8l: quiet vs9 x64 type conversion warning -ffae9f31 wicdec: silence a format warning -8cf0701e Alpha encoding: never filter in case of NO_COMPRESSION -825e73b1 update ChangeLog (tag: v0.3.1-rc1) -abf6f691 update NEWS -5a92c1a5 bump version to 0.3.1 -86daf77c store top Y/U/V samples in packed fashion -67bc353e Revert "add WebPBlendAlpha() function to blend colors against background" -068db59e Intertwined decoding of alpha and RGB -38cc0114 Simplify forward-WHT + SSE2 version -3fa595a5 Support decoding upto given row in DECODE_DATA_FUNC -520f005f DequantizeLevels(): Add 'row' and 'num_rows' args -47374b82 Alpha unfilter for given set of rows -f32097e0 probe input file and quick-check for WebP format. -a2aed1d0 configure: improve gl/glut library test -c7e89cbb update copyright text -a00380d2 configure: remove use of AS_VAR_APPEND -a94a88dd fix EXIF parsing in PNG -a71e5d84 add doc precision for WebPPictureCopy() and WebPPictureView() -8287012e remove datatype qualifier for vmnv -e1908430 fix a memory leak in gif2webp -0b18b9ee fix two minor memory leaks in webpmux -db5095d5 remove some cruft from swig/libwebp.jar -850e956f README: update swig notes -bddd9b0a swig/python: add minimal documentation -d573a8d5 swig: add python encode support -6b931875 swig/java: reduce wrapper function code duplication -6fe536f4 swig/java: rework uint8_t typemap -a2ea4643 Fix the bug in ApplyPalette. -7bb28d2a webp/lossless: fix big endian BGRA output -f036d4bf Speed up ApplyPalette for ARGB pixels. -8112c8cf remove some warnings: -cc128e0b Further reduce memory to decode lossy+alpha images -07db70d2 fix for big-endian -eda8a7de gif2webp: Fix signed/unsigned comparison mismatch -31f346fe Makefile.vc: fix libwebpdemux dll variable typo -6c76d28e swig: add python (decode) support -b4f5bb6c swig: cosmetics -498d4dd6 WebP-Lossless encoding improvements. -26e72442 swig: ifdef some Java specific code -8ecec686 configure: add warning related flags -e676b043 configure: add GLUT detection; build vwebp -b0ffc437 Alpha decoding: significantly reduce memory usage -20aa7a8d configure: add --enable-everything -b8307cc0 configure.ac: add some helper macros -980e7ae9 Remove the gcc compilation comments -7f25ff99 gif2webp: Fix ICC and XMP support -d8e53211 Add missing name to AUTHORS -11edf5e2 Demux: Fix a potential memleak -c7b92184 don't forward declare enums -7a650c6a prevent signed int overflow in left shift ops -31bea324 add precision about dynamic output reallocation with IDecoder -c22877f7 Add incremental support for extended format files -5051245f Makefile.vc: have 'all' target build everything -8191deca Makefile.vc: flags cleanup -b9d74735 Makefile.vc: drop /FD flag -5568dbcf update gitignore -f4c7b654 WebPEncode: An additional check. Start VP8EncLoop/VP8EncTokenLoop only if VP8EncStartAlpha succeeded. -1fb04bec pngdec: Avoid a double-free. -dcbb1ca5 add WebPBlendAlpha() function to blend colors against background -bc9f5fbe configure.ac: add AM_PROG_AR for automake >= 1.12 -bf867bf2 Tuned cross_color parameter (step) for lower qual -90e2ec5a Merge "probe input file and quick-check for WebP format." -7180d7ff Merge "update copyright text" -830f72b7 probe input file and quick-check for WebP format. -2ccf58d6 configure: improve gl/glut library test -d640614d update copyright text -c2113ad4 Merge "configure: remove use of AS_VAR_APPEND" -9326a56f configure: remove use of AS_VAR_APPEND -ea63d619 fix a type warning on VS9 x86 -bec11092 fix EXIF parsing in PNG -b6e65f3d Merge "fix warnings for vs9 x64" -438946dc fix warnings for vs9 x64 -f4710e3b collect macroblock reconstruction data in VP8MBData struct -23d28e21 add doc precision for WebPPictureCopy() and WebPPictureView() -518f2cd7 cosmetics: gif2webp: fix indent -af358e68 Merge "remove datatype qualifier for vmnv" -3fe91635 remove datatype qualifier for vmnv -764fdffa fix a memory leak in gif2webp -3e59a74d fix two minor memory leaks in webpmux -47b9862f Merge "README: update swig notes" -325d15ff remove some cruft from swig/libwebp.jar -4a7627c2 README: update swig notes -5da81e33 Merge "swig/python: add minimal documentation" -f39e08f2 Merge "swig: add python encode support" -6ca4a3e3 Merge "swig/java: reduce wrapper function code duplication" -8f8702b0 Merge "swig/java: rework uint8_t typemap" -91413be2 reduce memory for VP8MB and remove bitfields use -7413394e Fix the memory leak in ApplyFilters. -2053c2cf simplify the alpha-filter testing loop -825b64db swig/python: add minimal documentation -14677e11 swig: add python encode support -a5c297c8 swig/java: reduce wrapper function code duplication -ad4a367d swig/java: rework uint8_t typemap -0d25876b use uint8_t for inv_palette[] -afa3450c Fix the bug in ApplyPalette. -2d6ac422 Merge "webp/lossless: fix big endian BGRA output" -2ca83968 webp/lossless: fix big endian BGRA output -742110cc Speed up ApplyPalette for ARGB pixels. -2451e47d misc code cleanup -83db4043 Merge "swig: add python (decode) support" -eeeea8b5 Merge "swig: cosmetics" -d5f9b8f3 Merge "libwebp: fix vp8 encoder mem alloc offsetting" -d8edd835 libwebp: fix vp8 encoder mem alloc offsetting -8983b83e remove use of bit-fields in VP8FInfo -87a4fca2 remove some warnings: -ba8f74e2 Merge "fix for big-endian" -a65067fa Merge "Further reduce memory to decode lossy+alpha images" -64c84486 Further reduce memory to decode lossy+alpha images -332130b9 Mux: make a few methods static -44370617 fix for big-endian -5199eab5 Merge "add uncompressed TIFF output support" -a3aede97 add uncompressed TIFF output support -f975b67f Merge "gif2webp: Fix signed/unsigned comparison mismatch" -5fbc734b Merge "GetFeatures: Detect invalid VP8X/VP8/VP8L data" -d5060c87 Merge "mux.h: A comment fix + some consistency fixes" -352d0dee GetFeatures: Detect invalid VP8X/VP8/VP8L data -3ef79fef Cosmetic: "width * height" -043e1ae4 gif2webp: Fix signed/unsigned comparison mismatch -5818cff7 mux.h: A comment fix + some consistency fixes -1153f888 Merge "swig: ifdef some Java specific code" -3eeedae1 Makefile.vc: fix libwebpdemux dll variable typo -f980faf4 swig: add python (decode) support -7f5f42bb swig: cosmetics -8eae188a WebP-Lossless encoding improvements. -c7247c4c swig: ifdef some Java specific code -4cb234d5 Merge "Mux: make ValidateForSingleImage() method static" -ed6f5308 Merge "Add GetCanvasSize() method to mux" -1d530c9a Mux: make ValidateForSingleImage() method static -bba4c2b2 configure: add warning related flags -fffefd18 Add GetCanvasSize() method to mux -732da8d0 Merge "configure: add GLUT detection; build vwebp" -0e513f7a configure: add GLUT detection; build vwebp -55d1c150 Merge "Alpha decoding: significantly reduce memory usage" -13d99fb5 Merge "configure: add --enable-everything" -2bf698fe Merge "configure.ac: add some helper macros" -edccd194 Alpha decoding: significantly reduce memory usage -3cafcc9a configure: add --enable-everything -4ef14477 configure.ac: add some helper macros -a4e1cdbb Remove the gcc compilation comments -6393fe4b Cosmetic fixes -9c4ce971 Simplify forward-WHT + SSE2 version -878b9da5 fix missed optim -00046171 VP8GetInfo(): Check for zero width or height. -9bf31293 align VP8Encoder::nz_ allocation -5da165cf fix CheckMode() signature -0ece07dc Merge "explicitly pad bitfields to 32-bits" -9dbc9d19 explicitly pad bitfields to 32-bits -5369a80f Merge "prevent signed int overflow in left shift ops" -70e39712 Merge "cosmetics: remove unnecessary ';'s" -d3136ce2 Merge "don't forward declare enums" -b26e5ad5 gif2webp: Fix ICC and XMP support -46089b20 Add missing name to AUTHORS -94328d64 Demux: Fix a potential memleak -96e948d7 don't forward declare enums -f4f90880 prevent signed int overflow in left shift ops -0261545e cosmetics: remove unnecessary ';'s -7ebdf110 Merge "Fix few missing comparisons to NULL" -1579989e Fix few missing comparisons to NULL -ea1b21cf Cleaned up VP8GetHeaders() so that it parses only frame header -b66caee4 dwebp: add support for BMP output -ff885bfe add precision about dynamic output reallocation with IDecoder -79241d5a Merge "Makefile.vc: have 'all' target build everything" -ac1c729b Merge "Makefile.vc: flags cleanup" -118a055c Merge "Makefile.vc: drop /FD flag" -ecad0109 Merge "update gitignore" -a681b4f4 Rename PRE_VP8 state to WEBP_HEADER -ead4d478 Add incremental support for extended format files -69d0f926 Makefile.vc: have 'all' target build everything -52967498 Makefile.vc: flags cleanup -c61baf0c Makefile.vc: drop /FD flag -3a15125d update gitignore -5167ca47 Merge "WebPEncode: An additional check. Start VP8EncLoop/VP8EncTokenLoop only if VP8EncStartAlpha succeeded." -67708d67 WebPEncode: An additional check. Start VP8EncLoop/VP8EncTokenLoop only if VP8EncStartAlpha succeeded. -b68912af pngdec: Avoid a double-free. -82abbe12 Merge "configure.ac: add AM_PROG_AR for automake >= 1.12" -e7d9548c add WebPBlendAlpha() function to blend colors against background -ed4dc717 configure.ac: add AM_PROG_AR for automake >= 1.12 -df4a406d Merge branch '0.3.0' -1e0d4b8c Update ChangeLog (tag: v0.3.0-rc7, tag: v0.3.0) -d52b405d Cosmetic fixes -6cb4a618 misc style fix -68111ab0 add missing YUVA->ARGB automatic conversion in WebPEncode() -e9a7990b Cosmetic fixes -403bfe82 Container spec: Clarify frame disposal -2aaa423b Merge "add missing YUVA->ARGB automatic conversion in WebPEncode()" -07d87bda add missing YUVA->ARGB automatic conversion in WebPEncode() -142c4629 misc style fix -3e7a13a0 Merge "Container spec: clarify the background color field" into 0.3.0 -14af7745 container doc: add a note about the 'ANMF' payload -cc635efa Container spec: clarify the background color field -e3e33949 container doc: move RIFF description to own section -4299f398 libwebp/mux: fix double free -33f9a692 Merge "demux: keep a frame tail pointer; used in AddFrame" into 0.3.0 -a2a7b959 use WebPDataCopy() instead of re-coding it. -6f18f12f demux: keep a frame tail pointer; used in AddFrame -e5af49e9 add doc precision about WebPParseHeaders() return codes -db46daab Merge "Makefile.vc: fix dynamic builds" into 0.3.0 -53c77afc Merge "gif2webp: Bgcolor fix for a special case" into 0.3.0 -a5ebd143 gif2webp: Bgcolor fix for a special case -6378f238 Merge "vwebp/animation: fix background dispose" into 0.3.0 -3c8eb9a8 fix bad saturation order in QuantizeBlock -04c7a2ec vwebp/animation: fix background dispose -81a50695 Makefile.vc: fix dynamic builds -5f25c396 update ChangeLog (tag: v0.3.0-rc6) -14d42af2 examples: don't use C99 %zu -5ccf1fe5 update ChangeLog -2560c243 update NEWS -f43bafc3 Merge changes Iecccb09c,If5ee9fd2,I3e181ce4 into 0.3.0 -a788644f dwebp: warn when decoding animated webp's -302efcdb Decode: return more meaningful error for animation -ad452735 WebPBitstreamFeatures: add has_animation field -783dfa49 disable FRGM decoding for good in libwebpmux -4b956be0 Update ChangeLog -ad8b86d7 update NEWS -3e084f63 Merge "demux cosmetics: comments/rename internal function" into 0.3.0 -d3f8c621 Merge "move WebPFeatureFlags declaration" into 0.3.0 -7386fe50 Merge "libwebp{demux,mux}: install mux_types.h" into 0.3.0 -d6cd4e90 Merge "bump decode abi" into 0.3.0 -17f8da5c bump decode abi -97684ae2 Merge "add doc precision about WebPDemuxPartial()" into 0.3.0 -f933fd2a move WebPFeatureFlags declaration -289bc47b libwebp{demux,mux}: install mux_types.h -224e8d46 add doc precision about WebPDemuxPartial() -4c18e80c demux cosmetics: comments/rename internal function -7cfd1bf1 update AUTHORS -401f7b85 Merge "speed-up lossless (~3%) with ad-hoc histogram cost evaluation" into 0.3.0 -1fc8ffca Merge "makefile.unix: dist related changes" into 0.3.0 -8a89c6ed Merge changes I466c377f,Ib761ebd3,I694857fc into 0.3.0 -f4ffb2d5 speed-up lossless (~3%) with ad-hoc histogram cost evaluation -723847d5 gif2webp: only write error messages to stderr -701b9e2a makefile.unix: dist related changes -bb85b437 Merge "update NEWS" into 0.3.0 -59423a24 gif2webp: fix crash on open failure with libgif5 -9acb17de gif2webp: silence a unused param warning -7d9fdc23 Merge "README updates" into 0.3.0 -5621934e Merge "build: fix install race on shared headers" into 0.3.0 -70809d89 Merge "bump version to 0.3.0" into 0.3.0 -d851cd1d demux: make the parse a bit more strict -28bb4107 update NEWS -cef93882 bump version to 0.3.0 -9048494d build: fix install race on shared headers -1e67e8ef README updates -42b611a4 Merge "configure: drop experimental from mux/demux" into 0.3.0 -096a8e32 Merge "vwebp: add color profile support" into 0.3.0 -ddfee5dc vwebp: add color profile support -0d6927d3 Merge "Mark fragment options as experimental in webpmux" into 0.3.0 -5dbd4030 Mark fragment options as experimental in webpmux -a0a6648c configure: drop experimental from mux/demux -ee65bad8 Merge "add support for BITS > 32" into 0.3.0 -744930db add support for BITS > 32 -7dd288f0 cwebp: fix build -19a8dd01 Merge "Makefile.vc: add vwebp.exe target" into 0.3.0 -50eeddad Merge "examples: normalize icc related program arguments" into 0.3.0 -757f637f Merge "Makefile.vc: add libwebpdecoder target" into 0.3.0 -b65c4b7c Makefile.vc: add libwebpdecoder target -f8db7b4a Merge "vwebp: replace doubles w/floats where appropriate" into 0.3.0 -d99aa56f Makefile.vc: add vwebp.exe target -013023e7 vwebp: replace doubles w/floats where appropriate -9b3db894 README.mux: add version reference -7b6a26cf Merge "cwebp: output metadata statistics" into 0.3.0 -d8dc72a0 examples: normalize icc related program arguments -7bfc9056 Merge "make alpha unfilter work in-place" into 0.3.0 -0037b2d2 Merge "add LUT-free reference code for YUV->RGB conversion." into 0.3.0 -166bf744 Merge "demux: disable fragment parsing" into 0.3.0 -126974b4 add LUT-free reference code for YUV->RGB conversion. -0aef3ebd make alpha unfilter work in-place -14ef5005 Merge "Remove 'status: experimental' from container spec" into 0.3.0 -d40c98e1 Merge "webpmux binary: tiny style fix" into 0.3.0 -0bc42689 cwebp: output metadata statistics -bc039803 Merge "autoconf: normalize experimental define" into 0.3.0 -d1e21b13 Remove 'status: experimental' from container spec -7681bb96 webpmux binary: tiny style fix -a3dd3d0f avoid installing example_util.h -252320e2 demux: disable fragment parsing -537bde05 autoconf: normalize experimental define -5e338e0b Merge changes I33e8a613,I8e8a7b44 into 0.3.0 -d9d0ea1b Merge changes If21e3ec7,I991fc30b into 0.3.0 -627f5ca6 automake: add reference to libwebp for mux/demux -eef73d07 don't consolidate proba stats too often -05ec4cc2 libwebp{,decoder}.pc: add pthread flags -1bfcf5bf add libwebpmux.pc -26ca843d add libwebpdemux.pc -69e25906 Merge "Tune Lossless compression for lower qualities." -0478b5d2 Tune Lossless compression for lower qualities. -39f7586f add a mention of parallel alpha encoding in the NEWS -5a21d967 Merge "1.5x-2x faster encoding for method 3 and up" -9bfbdd14 1.5x-2x faster encoding for method 3 and up -27dc741b Correct frame options order in README.mux -be2fd173 Mux: fix a scenario with bad ANMF/FRGM size -19eb012c Merge "Demux: Add option to get frame count using GetI()" -7368b8cb Merge "WebPGetFeatures() out of if condition for clarity." -f604c9a4 Merge "fix windows build" -153f94e8 fix windows build -847b4924 Merge "vwebp: use magenta for 'i'nfo display" -25ea46bd Merge "vwebp: add keyboard shortcuts to help output" -bea7ccaf vwebp: use magenta for 'i'nfo display -8fab161a webpmux: correct -frame param order in help output -03cc23d6 vwebp: add keyboard shortcuts to help output -068eba8d Demux: Add option to get frame count using GetI() -988b8f56 WebPGetFeatures() out of if condition for clarity. -6933d910 Merge "gif2webp: Be lenient about background color index." -4d0f7c55 Merge "WebPGetFeatures() behavior change:" -fdeeb01d gif2webp: Be lenient about background color index. -ad250320 Merge "multi-threaded alpha encoding for lossy" -4e32d3e1 Merge "fix compilation of token.c" -f817930a multi-threaded alpha encoding for lossy -88050351 fix compilation of token.c -fc816219 code using the actual values for num_parts_, not the ones from config -72655350 Merge "move the config check from .c to .h" -dd9e76f7 move the config check from .c to .h -956b217a WebPGetFeatures() behavior change: -df02e4ce WebPDemuxGetI behavior change: -633c004d Merge "rebalance method tools (-m) for methods [0..4]" -58ca6f65 rebalance method tools (-m) for methods [0..4] -7648c3cc Merge "describe rd-opt levels introduce VP8RDLevel enum" -67fb1003 Merge "autoconf: enable silent-rules by default" -a5042a32 GetVersion() methods for mux and demux -5189957e describe rd-opt levels introduce VP8RDLevel enum -4e094ace autoconf: enable silent-rules by default -b7eaa85d inline VP8LFastLog2() and VP8LFastSLog2 for small values -5cf7792e split quant_levels.c into decoder and encoder version -e5d3ffe2 Merge "Update code example in README.mux" -ac5a9156 Update code example in README.mux -38a91e99 Add example code snippet for demux API -5f557f3c README.mux: add info about Demux API and vwebp -c0ba0903 backward_references: avoid signed integer overflow -943386db disable SSE2 for now -9479fb7d lossless encoding speedup -ec2030a8 merge two lines together -b67956c0 Merge "Remove ReadOneBit() and ReadSymbolUnsafe()" -1667bded Remove ReadOneBit() and ReadSymbolUnsafe() -3151669b wicdec + dwebp cosmetics: normalize formatting -92668da6 change default filtering parameters: * type is now 'strong' * strength is now '60' -b7490f85 introduce WEBP_REFERENCE_IMPLEMENTATION compile option -33838857 faster decoding (3%-6%) -5c3e381b Merge "add a -jpeg_like option" -c2311046 remove unused declaration of VP8Zigzag -36152957 Merge "wicdec: add alpha support for paletted formats" -c9f16490 wicdec: add alpha support for paletted formats -1262f81e Merge "wicdec: silence some warnings" -e7ea61eb wicdec: silence some warnings -23c0f354 fix missing intptr_t->int cast for MSVC -e895059a add a -jpeg_like option -1f803f64 Merge "Tune alpha quality mapping to more reasonable values." -1267d498 Tune alpha quality mapping to more reasonable values. -043076e2 Merge "speed-up lossless in BackwardTrace" -f3a44dcd remove one malloc from TraceBackwards() -0fc1a3a0 speed-up lossless in BackwardTrace -7c732e59 cwebp: centralize WebPCleanupTransparentArea() -7381254e Merge "wicdec: add ICC profile extraction" -e83ff7de wicdec: add ICC profile extraction -146c6e3b Merge "cosmetics: pngdec: normalize default label location" -a8f549d7 Merge "manpages: italicize option parameters" -e118db83 Merge "encode.h: note the need to free() WebPMemoryWriter" -1dfee6db cosmetics: pngdec: normalize default label location -14c38200 manpages: italicize option parameters -7defbfad encode.h: note the need to free() WebPMemoryWriter -88d382a0 cwebp: cleanup after memory_writer -12d6cecf fix extra space in dwebp.1 man -b01681a9 Fix for demuxer frame iteration: -56c12aa6 Demuxer creation fix: -66c810bc add a -yuv option to dwebp (very similar to -pgm) -841a3ba5 Merge "Remove -Wshadow warnings." -8fd02527 Merge "upsampling_neon.c: fix build" -6efed268 Remove -Wshadow warnings. -60904aa6 Merge "allow WebPINewRGB/YUVA to be passed a NULL output buffer." -b7adf376 allow WebPINewRGB/YUVA to be passed a NULL output buffer. -27f8f742 upsampling_neon.c: fix build -06b9cdf1 gitignore: add IOS related directories -f112221e Merge "Fix more comments for iobuild.sh" -fe4d25dd Fix more comments for iobuild.sh -1de3e252 Merge "NEON optimised yuv to rgb conversion" -090b708a NEON optimised yuv to rgb conversion -daa06476 Merge "Add ios build script for building iOS library." -79fe39e2 Add ios build script for building iOS library. -126c035f remove some more -Wshadow warnings -522e9d61 Merge "cwebp: enable '-metadata'" -76ec5fa1 cwebp: enable '-metadata' -aeb91a9d Merge "cosmetics: break a few long lines" -be7c96b0 cosmetics: break a few long lines -cff8ddb6 Merge "add libwebpdecoder.pc" -93148ab8 Merge "libwebp.pc.in: detab" -6477f955 Merge "Makefile.vc: normalize path separator" -bed1ed7c add libwebpdecoder.pc -46168b2d libwebp.pc.in: detab -a941a346 Fixed few nits in the build files. -dd7a49b2 Makefile.vc: normalize path separator -9161be86 Merge "cwebp: extract WIC decoding to its own module" -08e7c58e Merge "Provide an option to build decoder library." -0aeba528 Provide an option to build decoder library. -757ebcb1 catch malloc(0)/calloc(0) with an assert -152ec3d2 Merge "handle malloc(0) and calloc(0) uniformly on all platforms" -a452a555 cwebp: extract WIC decoding to its own module -2b252a53 Merge "Provide option to swap bytes for 16 bit colormodes" -94a48b4b Provide option to swap bytes for 16 bit colormodes -42f8f934 handle malloc(0) and calloc(0) uniformly on all platforms -8b2152c5 Merge "add an extra assert to check memory bounds" -0d19fbff remove some -Wshadow warnings -cd22f655 add an extra assert to check memory bounds -8189feda Merge "Add details and reference about the YUV->RGB conversion" -1d2702b1 Merge "Formatting fixes in lossless bitstream spec" -8425aaee Formatting fixes in lossless bitstream spec -a556cb1a Add details and reference about the YUV->RGB conversion -d8f21e0b add link to SSIM description on Wikipedia -18e9167e Merge "WebP-lossless spec clarifications:" -98e25b9b Merge "cwebp: add -metadata option" -f01c2a53 WebP-lossless spec clarifications: -f4a97970 Merge "Disto4x4 and Disto16x16 in NEON" -47b7b0ba Disto4x4 and Disto16x16 in NEON -7eaee9f1 cwebp: add -metadata option -36c52c2c tiffdec: use toff_t for exif ifd offset -7c8111e4 Merge "cwebp/tiffdec: add TIFF metadata extraction" -e6409adc Remove redundant include from dsp/lossless code. -1ab5b3a7 Merge "configure: fix --with-gifincludedir" -03c749eb configure: fix --with-gifincludedir -8b650635 multiple libgif versions support for gif2webp -476e293f gif2webp: Use DGifOpenFileName() -b50f277b tiffdec: correct format string -2b9048e3 Merge "tiffdec: check error returns for width/height" -a1b5a9a3 Merge "cwebp/tiff: use the first image directory" -079423f5 tiffdec: check error returns for width/height -d62824af Merge "cwebp/jpegdec: add JPEG metadata extraction" -03afaca4 Merge "cwebp: add PNG metadata extraction" -2c724968 cwebp/jpegdec: add JPEG metadata extraction -dba64d91 cwebp: add PNG metadata extraction -1f075f89 Lossless spec corrections/rewording/clarifications -2914ecfd cwebp/tiffdec: add TIFF metadata extraction -d82a3e33 More corrections/clarifications in lossless spec: -bd002557 cwebp/tiff: use the first image directory -df7aa076 Merge "Cleanup around jpegdec" -0f57dcc3 decoding speed-up (~1%) -bcec339b Lossless bitstream clarification: -6bf20874 add examples/metadata.c -207f89c0 Merge "configure: add libwebpdemux status to summary" -1bd287a6 Cleanup around jpegdec -91455679 Merge "cosmetics: use '== 0' in size checks" -d6b88b76 cosmetics: use '== 0' in size checks -d3dace2f cosmetics: jpegdec -2f69af73 configure: add libwebpdemux status to summary -1c1c5646 cwebp: extract tiff decoding to its own module -6a871d66 cwebp: extract jpeg decoding to its own module -2ee228f9 cwebp: extract png decoding to its own module -4679db00 Merge "cwebp: add metadata framework" -63aba3ae cwebp: add metadata framework -931bd516 lossless bitstream: block size bits correction -e4fc4c1c lossless bitstream: block size bits correction -d65ec678 fix build, move token.c to src/enc/ -657f5c91 move token buffer to its own file (token.c) -c34a3758 introduce GetLargeValue() to slim-fast GetCoeffs(). -d5838cd5 faster non-transposing SSE2 4x4 FTransform -f76191f9 speed up GetResidualCost() -ba2aa0fd Add support for BITS=24 case -2e7f6e8e makefile.unix: Dependency on libraries -dca84219 Merge "Separate out mux and demux code and libraries:" -23782f95 Separate out mux and demux code and libraries: -bd56a01f configure: add summary output -90e5e319 dwebp manual: point to webpmux, gif2webp. -540790ca gif2webp.c: add a note about prerequisites -d1edf697 cwebp man page: meaning of '-q' for lossy/lossless -79efa1d0 Add man page for gif2webp utility -2243e40c Merge "gif2webp build support with autoconf tools" -c40efca1 gif2webp build support with autoconf tools -6523e2d4 WebP Container: -4da788da Merge "simplify the fwd transform" -42c3b550 simplify the fwd transform -41a6ced9 user GLfloat instead of float -b5426119 fix indentation -68f282f7 * handle offset in anim viewer 'vwebp' * fix gif2webp to handle disposal method and odd offset correctly -118cb312 Merge "add SSE2 version of Sum of Square error for 16x16, 16x8 and 8x8 case" -8a7c3cc8 Merge "Change the order of -frame argument to be more natural" -99e0a707 Merge "Simplify the texture evaluation Disto4x4()" -0f923c3f make the bundling work in a tmp buffer -e5c3b3f5 Simplify the texture evaluation Disto4x4() -48600084 Change the order of -frame argument to be more natural -35bfd4c0 add SSE2 version of Sum of Square error for 16x16, 16x8 and 8x8 case -a7305c2e Clarification for unknown chunks -4c4398e2 Refine WebP Container Spec wrt unknown chunks. -2ca642e0 Rectify WebPMuxGetFeatures: -7caab1d8 Some cosmetic/comment fixes. -60b2651a Merge "Write a GIF to WebP converter based on libgif." -c7127a4d Merge "Add NEON version of FTransformWHT" -11b27212 Write a GIF to WebP converter based on libgif. -e9a15a37 ExUtilWriteFile() to write memory segment to file -74356eb5 Add a simple cleanup step in mux assembly: -51bb1e5d mux.h: correct WebPDemuxSelectFragment() prototype -22a0fd9d Add NEON version of FTransformWHT -fa30c863 Update mux code to match the spec wrt animation -d9c5fbef by-pass Analysis pass in case segments=1 -d2ad4450 Merge changes Ibeccffc3,Id1585b16 -5c8be251 Merge "Chunk fourCCs for XMP/EXIF" -a00a3daf Use 'frgm' instead of 'tile' in webpmux parameters -81b8a741 Design change in ANMF and FRGM chunks: -f903cbab Chunk fourCCs for XMP/EXIF -812933d6 Tune performance of HistogramCombine -52ad1979 Animation specification in container spec -001b9302 Image fragment specification in container spec -391f9db9 Ordering of description of bits in container spec -d5735776 Metadata specification in container spec -1c4609b1 Merge commit 'v0.2.1' -0ca584cb Merge "Color profile specification in container spec" -e8b41ad1 add NEON asm version for WHT inverse transform -af6f0db2 Color profile specification in container spec -a61a824b Merge "Add NULL check in chunk APIs" -0e8b7eed fix WebPPictureView() unassigned strides -75e5f17e ARM/NEON: 30% encoding speed-up -02b43568 Add NULL check in chunk APIs -a0770727 mux struct naming -6c66dde8 Merge "Tune Lossless encoder" -ab5ea217 Tune Lossless encoder -74fefc8c Update ChangeLog (tag: v0.2.1, origin/0.2.0, 0.2.0) -92f8059c Rename some chunks: -3bb4bbeb Merge "Mux API change:" -d0c79f05 Mux API change: -abc06044 Merge "update NEWS" into 0.2.0 -57cf313b update NEWS -25f585c4 bump version to 0.2.1 -fed7c048 libwebp: validate chunk size in ParseOptionalChunks -552cd9bc cwebp (windows): fix alpha image import on XP -b14fea99 autoconf/libwebp: enable dll builds for mingw -4a8fb272 [cd]webp: always output windows errors -d6621580 fix double to float conversion warning -72b96a69 cwebp: fix jpg encodes on XP -734f762a VP8LAllocateHistogramSet: fix overflow in size calculation -f9cb58fb GetHistoBits: fix integer overflow -b30add20 EncodeImageInternal: fix uninitialized free -3de58d77 fix the -g/O3 discrepancy for 32bit compile -77aa7d50 fix the BITS=8 case -e5970bda Make *InitSSE2() functions be empty on non-SSE2 platform -ef5cc47e make *InitSSE2() functions be empty on non-SSE2 platform -c4ea259d make VP8DspInitNEON() public -8344eadf Merge "libwebp: validate chunk size in ParseOptionalChunks" -4828bb93 Merge "cwebp (windows): fix alpha image import on XP" -30763333 libwebp: validate chunk size in ParseOptionalChunks -70481898 AccumulateLSIM: fix double -> float warnings -eda8ee4b cwebp (windows): fix alpha image import on XP -c6e98658 Merge "add EXPERIMENTAL code for YUV-JPEG colorspace" -f0360b4f add EXPERIMENTAL code for YUV-JPEG colorspace -f86e6abe add LSIM metric to WebPPictureDistortion() -c3aa215a Speed up HistogramCombine for lower qualities. -1765cb1c Merge "autoconf/libwebp: enable dll builds for mingw" -a13562e8 autoconf/libwebp: enable dll builds for mingw -9f469b57 typo: no_fancy -> no_fancy_upsampling -1a27f2f8 Merge "fix double to float conversion warning" -cf1e90de Merge "cwebp: fix jpg encodes on XP" -f2b5d19b [cd]webp: always output windows errors -e855208c fix double to float conversion warning -ecd66f77 cwebp: fix jpg encodes on XP -7b3eb372 Tune lossless compression to get better gains. -ce8bff45 Merge "VP8LAllocateHistogramSet: fix overflow in size calculation" -ab5b67a1 Merge "EncodeImageInternal: fix uninitialized free" -7fee5d12 Merge "GetHistoBits: fix integer overflow" -a6ae04d4 VP8LAllocateHistogramSet: fix overflow in size calculation -80237c43 GetHistoBits: fix integer overflow -8a997235 EncodeImageInternal: fix uninitialized free -0b9e6829 minor cosmetics -a792b913 fix the -g/O3 discrepancy for 32bit compile -73ba4357 Merge "detect and merge similar segments" -fee66275 detect and merge similar segments -0c44f415 src/webp/*.h: don't forward declare enums in C++ -d7a5ac86 vwebp: use demux interface -931e0ea1 Merge "replace 'typedef struct {} X;" by "typedef struct X X; struct X {};"" -8f216f7e remove cases of equal comparison for qsort() -28d25c82 replace 'typedef struct {} X;" by "typedef struct X X; struct X {};" -2afee60a speed up for ARM using 8bit for boolean decoder -5725caba new segmentation algorithm -2cf1f815 Merge "fix the BITS=8 case" -12f78aec fix the BITS=8 case -6920c71f fix MSVC warnings regarding implicit uint64 to uint32 conversions -f6c096aa webpmux binary: Rename 'xmp' option to 'meta' -ddfe871a webpmux help correction -b7c55442 Merge "Make *InitSSE2() functions be empty on non-SSE2 platform" -1c04a0d4 Common APIs for chunks metadata and color profile. -2a3117a1 Merge "Create WebPMuxFrameInfo struct for Mux APIs" -5c3a7231 Make *InitSSE2() functions be empty on non-SSE2 platform -7c6e60f4 make *InitSSE2() functions be empty on non-SSE2 platform -c7eb4576 make VP8DspInitNEON() public -ab3234ae Create WebPMuxFrameInfo struct for Mux APIs -e3990fd8 Alignment fixes -e55fbd6d Merge branch '0.2.0' -4238bc0a Update ChangeLog (tag: v0.2.0) -c655380c dec/io.c: cosmetics -fe1958f1 RGBA4444: harmonize lossless/lossy alpha values -681cb30a fix RGBA4444 output w/fancy upsampling -f06c1d8f Merge "Alignment fix" into 0.2.0 -f56e98fd Alignment fix -6fe843ba avoid rgb-premultiply if there's only trivial alpha values -528a11af fix the ARGB4444 premultiply arithmetic -a0a48855 Lossless decoder fix for a special transform order -62dd9bb2 Update encoding heuristic w.r.t palette colors. -6f4272b0 remove unused ApplyInverseTransform() -93bf0faa Update ChangeLog (tag: v0.2.0-rc1) -5934fc59 update AUTHORS -014a711d update NEWS -43b0d610 add support for ARGB -> YUVA conversion for lossless decoder -33705ca0 bump version to 0.2.0 -c40d7ef1 fix alpha-plane check + add extra checks -a06f8023 MODE_YUVA: set alpha to opaque if the image has none -52a87dd7 Merge "silence one more warning" into 0.2.0 -3b023093 silence one more warning -f94b04f0 move some RGB->YUV functions to yuv.h -4b71ba03 README: sync [cd]webp help output -c9ae57f5 man/dwebp.1: add links to output file format details -292ec5cc quiet a few 'uninitialized' warnings -4af3f6c4 fix indentation -9b261bf5 remove the last NOT_HAVE_LOG2 instances -323dc4d9 remove use of log2(). Use VP8LFastLog2() instead. -8c515d54 Merge "harness some malloc/calloc to use WebPSafeMalloc and WebPSafeCalloc" into 0.2.0 -d4b4bb02 Merge changes I46090628,I1a41b2ce into 0.2.0 -bff34ac1 harness some malloc/calloc to use WebPSafeMalloc and WebPSafeCalloc -a3c063c7 Merge "extra size check for security" into 0.2.0 -5e796300 Merge "WebPEncode: clear stats at the start of encode" into 0.2.0 -f1edf62f Merge "rationalize use of color-cache" into 0.2.0 -c1933317 extra size check for security -906be657 rationalize use of color-cache -dd1c3873 Add image-hint for low-color images. -4eb7aa64 Merge "WebPCheckMalloc() and WebPCheckCalloc():" into 0.2.0 -80cc7303 WebPCheckMalloc() and WebPCheckCalloc(): -183cba83 check VP8LBitWriterInit return -cbfa9eec lossless: fix crash on user abort -256afefa cwebp: exit immediately on version mismatch -475d87d7 WebPEncode: clear stats at the start of encode -a7cc7291 fix type and conversion warnings -7d853d79 add stats for lossless -d39177b7 make QuantizeLevels() store the sum of squared error -5955cf5e replace x*155/100 by x*101581>>16 -7d732f90 make QuantizeLevels() store the sum of squared error -e45a446a replace x*155/100 by x*101581>>16 -159b75d3 cwebp output size consistency: -cbee59eb Merge commit 'v0.1.99' -1889e9b6 dwebp: report -alpha option -3bc3f7c0 Merge "dwebp: add PAM output support" into 0.2.0 -d919ed06 dwebp: add PAM output support -85e215d3 README/manpages/configure: update website link -c3a207b9 Update ChangeLog (tag: v0.1.99) -d1fd7826 Merge "add extra precision about default values and behaviour" into 0.2.0 -efc826e0 add extra precision about default values and behaviour -9f29635d header/doc clean up -ff9fd1ba Makefile.vc: fix webpmux.exe *-dynamic builds -8aacc7b0 remove INAM, ICOP, ... chunks from the test webp file. -2fc13015 harmonize authors as "Name (mail@address)" -4a9f37b7 Merge "update NEWS" into 0.2.0 -7415ae13 makefile.unix: provide examples/webpmux target -ce82cedc update NEWS -641e28e8 Merge "man/cwebp.1: wording, change the date" into 0.2.0 -c37c23e5 README: cosmetics -3976dcd5 man/cwebp.1: wording, change the date -3e5bbe1c Merge "rename 'use_argb_input' to 'use_argb'" into 0.2.0 -ce90847a Merge "add some padding bytes areas for later use" into 0.2.0 -2390dabc Merge "fixing the findings by Frederic Kayser to the bitstream spec" into 0.2.0 -02751591 add a very crude progress report for lossless -a4b9b1c6 Remove some unused enum values. -dd108176 rename 'use_argb_input' to 'use_argb' -90516ae8 add some padding bytes areas for later use -d03b2503 fixing the findings by Frederic Kayser to the bitstream spec -ce156afc add missing ABI compatibility checks -9d45416a Merge "Doc: container spec text tweaks" into 0.2.0 -4e2e0a8c Doc: container spec text tweaks -f7f16a29 add ABI compatibility check -2a775570 Merge "swig: add WebPEncodeLossless* wrappers" into 0.2.0 -a3ec6225 mux.h: remove '* const' from function parameters -31426eba encode.h: remove '* const' from function parameters -9838e5d5 decode.h: remove '* const' from function parameters -4972302d swig: add WebPEncodeLossless* wrappers -9ff00cae bump encoder/decoder versions -c2416c9b add lossless quick encoding functions to the public API -4c1f5d64 Merge "NEWS: mention decode_vp8.h is no longer installed" into 0.2.0 -6cb2277d NEWS: mention decode_vp8.h is no longer installed -d5e5ad63 move decode_vp8.h from webp/ to dec/ -8d3b04a2 Merge "header clean-up" into 0.2.0 -02201c35 Merge "remove one malloc() by making color_cache non dynamic" into 0.2.0 -d708ec14 Merge "move MIN/MAX_HISTO_BITS to format_constants.h" into 0.2.0 -ab2da3e9 Merge "add a malloc() check" into 0.2.0 -2d571bd8 add a malloc() check -7f0c178e remove one malloc() by making color_cache non dynamic -6569cd7c Merge "VP8LFillBitWindow: use 64-bit path for msvc x64 builds" into 0.2.0 -23d34f31 header clean-up -2a3ab6f9 move MIN/MAX_HISTO_BITS to format_constants.h -985d3da6 Merge "shuffle variables in HashChainFindCopy" into 0.2.0 -cdf885c6 shuffle variables in HashChainFindCopy -c3b014db Android.mk: add missing lossless files -8c1cc6b5 makefile.unix dist: explicitly name installed includes -7f4647ee Merge "clarify the colorspace naming and byte ordering of decoded samples" into 0.2.0 -cbf69724 clarify the colorspace naming and byte ordering of decoded samples -857650c8 Mux: Add WebPDataInit() and remove WebPImageInfo -ff771e77 don't install webp/decode_vp8.h -596dff78 VP8LFillBitWindow: use 64-bit path for msvc x64 builds -3ca7ce98 Merge "doc: remove non-finalized chunk references" into 0.2.0 -1efaa5a3 Merge "bump versions" into 0.2.0 -51fa13e1 Merge "README: update cwebp help output" into 0.2.0 -12f9aede README: update cwebp help output -f0b5defb bump versions -4c42a61b update AUTHORS -6431a1ce doc: remove non-finalized chunk references -8130c4cc Merge "build: remove libwebpmux from default targets/config" -23b44438 Merge "configure: broaden test for libpng-config" -85bff2cd Merge "doc: correct lossless prefix coding table & code" -05108f6e Merge "More spec/code matching in mux:" -6808e69d More spec/code matching in mux: -bd2b46f5 Merge "doc/webp-container-spec: light cosmetics" -20ead329 doc/webp-container-spec: light cosmetics -1d40a8bc configure: add pthread detection -b5e9067a fix some int <-> size_t mix for buffer sizes -e41a7596 build: remove libwebpmux from default targets/config -0fc2baae configure: broaden test for libpng-config -45b8272c Merge "restore authorship to lossless bitstream doc" -06ba0590 restore authorship to lossless bitstream doc -44a09a3c add missing description of the alpha filtering methods -63db87dd Merge "vwebp: add checkboard background for alpha display" -a73b8978 vwebp: add checkboard background for alpha display -939158ce Merge "vwebp: fix info display" -b35c07d9 vwebp: fix info display -48b39eb1 fix underflow for very short bitstreams -7e622984 cosmetics: param alignment, manpage wording -1bd7dd50 Merge changes I7b0afb0d,I7ecc9708 -ac69e63e Merge "Updated cwebp man's help for Alpha & Lossless." -c0e8859d Get rid of image_info_ from WebPChunk struct. -135ca69e WebP Container Spec: -eb6f9b8a Updated cwebp man's help for Alpha & Lossless. -0fa844fb cosmetic fixes on assert and 'const' where applicable -7f22bd25 check limit of width * height is 32 bits -16c46e83 autoconf/make: cosmetics: break long lines -ab22a07a configure: add helper macro to define --with-* -c17699b3 configure: add libtiff test -0e09732c Merge "cwebp: fix crash with yuv input + lossless" -88a510ff Merge "fix big-endian VP8LWriteBits" -da99e3bf Merge "Makefile.vc: split mux into separate lib" -7bda392b cwebp: fix crash with yuv input + lossless -f56a369a fix big-endian VP8LWriteBits -54169d6c Merge "cwebp: name InputFileFormat members consistently" -e2feefa9 Makefile.vc: split mux into separate lib -27caa5aa Merge "cwebp: add basic TIFF support" -d8921dd4 cwebp: name InputFileFormat members consistently -6f76d246 cwebp: add basic TIFF support -4691407b Merge changes If39ab7f5,I3658b5ae -cca7c7b8 Fixed nit: 10 -> 10.f -5d09a244 WebPMuxCreate() error handling: -777341c3 Fix a memleak in WebPMuxCreate() -61c9d161 doc: correct lossless prefix coding table & code -4c397579 Merge "mark VP8{,L}{GetInfo,CheckSignature} as WEBP_EXTERN" -e4e36cc6 Merge "Mux: Allow only some frames/tiles to have alpha." -ad2aad3c Merge "WebP Decoding error handling:" -97649c8f Mux: Allow only some frames/tiles to have alpha. -f864be3b Lower the quality settings for Alpha encoding. -3ba81bbe WebP Decoding error handling: -fcc69923 add automatic YUVA/ARGB conversion during WebPEncode() -802e012a fix compilation in non-FANCY_UPSAMPLING mode -e012dfd9 make width/height coding match the spec -228d96a5 mark VP8{,L}{GetInfo,CheckSignature} as WEBP_EXTERN -637a314f remove the now unused *KeepA variants -d11f6fcc webpmux returns error strings rather than numbers -fcec0593 makefile.unix: cwebp: fix OSX link -6b811f1b Merge "doc: remove lossless pdf" -c9634821 doc: remove lossless pdf -b9ae4f0d cosmetics after mux changes b74ed6e, b494ad5 -b494ad50 Mux: only allow adding frame/tiles at the end. -2c341b0e Merge "Added image characteristic hint for the codec." -d373076a Added image characteristic hint for the codec. -2ed2adb5 Merge "msvc: add intrinsic based BitsLog2Floor" -e595e7c5 Merge "add demux.c to the makefiles" -da47b5bd Merge "demux: add {Next,Prev}Chunk" -e5f46742 add demux.c to the makefiles -4708393c demux: add {Next,Prev}Chunk -e8a0a821 demux: quiet msvc warnings -7f8472a6 Update the WebP Container Spec. -31b68fe6 cleanup WebPPicture struct and API -9144a186 add overflow check before calling malloc() -81720c91 consistency cosmetics -2ebe8394 Merge "Add kramdown version information to README" -71443084 enc/vp8l.c: fix build -b7ac19fe Add kramdown version information to README -efdcb667 Merge "Edit for consistency, usage and grammar." -08220102 Enable alpha in vvwebp -8de9a084 Merge "Mux API change:" -b74ed6e7 Mux API change: -233a589e take picture->argb_stride into account for lossless coding -04e33f17 Edit for consistency, usage and grammar. -a575b4bc Merge "cosmetics: add missing const" -8d99b0f4 Merge "cosmetics: remove unimplemented function proto" -69d02217 cosmetics: add missing const -5b08318b cosmetics: remove unimplemented function proto -b7fb0ed5 Log warning for unsupported options for lossless. -e1f769fe msvc: add intrinsic based BitsLog2Floor -8a69c7d8 Bug-fix: Clamp backward dist to 1. -b5b6ac97 Merge "Bring the special writer 'WebPMemoryWriter' to public API" -a6a1909f Merge "Fix floating point exception with cwebp -progress" -f2cee067 Fix floating point exception with cwebp -progress -91b7a8c7 Bring the special writer 'WebPMemoryWriter' to public API -310e2972 support resize and crop for RGBA input -a89835d3 Merge changes Ice662960,Ie8d7aa90,I2d996d5e,I01c04772 -ce614c0c Merge "dec/vp8: avoid setting decoder status twice" -900285da dec/vp8: avoid setting decoder status twice -8227adc8 Merge changes I6f02b0d0,I5cbc9c0a,I9dd9d4ed,Id684d2a1 -dcda59c1 Merge "demux: rename SetTile to SelectTile" -622ef12e demux: rename SetTile to SelectTile -81ebd375 Merge "demux: add {Next,Prev}Frame" -02dd37a2 demux: add {Next,Prev}Frame -4b79fa59 Merge "Limit the maximum size of huffman Image to 16MB." -9aa34b34 Manually number "chapters," as chapter numbers are used in the narrative. -2a4c6c29 Re-wrap at <= 72 columns -a45adc19 Apply inline emphasis and monospacing, per gdoc / PDF -91011206 Incorporate gdoc changes through 2012-06-08 -7a182487 Removed CodeRay syntax declarations ... -b3ec18c5 Provide for code-block syntax highlighting. -709d7702 Replace high ASCII artifacts (curly quotes, etc.). -930e8abb Lossless WebP doc largely ported to markdown text. -18cae37b msvc: silence some build warnings -b3923084 Limit the maximum size of huffman Image to 16MB. -f180df2a Merge "libwebp/demux: add Frame/Chunk iteration" -2bbe1c9a Merge "Enable lossless encoder code" -d0601b01 Merge changes I1d97a633,I81c59093 -78f3e345 Enable lossless encoder code -d974a9cc Merge "libwebp/demux: add simple format parsing" -26bf2232 Merge "libwebp: add WebPDemux stub functions" -2f666688 Merge "modify WebPParseHeaders to allow reuse by GetFeatures" -b402b1fb libwebp/demux: add Frame/Chunk iteration -ad9ada3b libwebp/demux: add WebPDemuxGetI -2f2d4d58 libwebp/demux: add extended format parsing -962dcef6 libwebp/demux: add simple format parsing -f8f94081 libwebp: add WebPDemux stub functions -fb47bb5c Merge "NumNamedElements() should take an enum param." -7c689805 Fix asserts in Palette and BackwardReference code. -fbdcb7ea NumNamedElements() should take an enum param. -fb4943bd modify WebPParseHeaders to allow reuse by GetFeatures -3697b5ce write an ad-hoc EncodeImageInternal variant -eaee9e79 Bug-Fix: Decode small (less than 32 bytes) images. -0bceae48 Merge "cwebp: fix alpha reporting in stats output" -0424b1ef Rebase default encoding settings. -c71ff9e3 cwebp: fix alpha reporting in stats output -e2ffe446 Merge "Stop indefinite recursion for Huffman Image." -70eb2bd6 Stop indefinite recursion for Huffman Image. -f3bab8eb Update vwebp -6d5c797c Remove support for partial files in Mux. -f1df5587 WebPMuxAssemble() returns WebPData*. -814a0639 Rename 'Add' APIs to 'Set'. -bbb0218f Update Mux psuedo-code examples. -4fc4a47f Use WebPData in MUX set APIs -c67bc979 Merge "add WebPPictureImportRGBX() and WebPPictureImportBGRX()" -27519bc2 add WebPPictureImportRGBX() and WebPPictureImportBGRX() -f80cd27e factorize code in Import() -9b715026 histogram: add log2 wrapper -8c34378f Merge "fix some implicit type conversion warnings" -42f6df9d fix some implicit type conversion warnings -250c16e3 Merge "doc: update lossless pdf" -9d9daba4 Merge "add a PDF of the lossless spec" -8fbb9188 prefer webp/types.h over stdint.h -0ca170c2 doc: update lossless pdf -0862ac6e add a PDF of the lossless spec -437999fb introduce a generic WebPPictureHasTransparency() function -d2b6c6c0 cosmetic fixes after Idaba281a -b4e6645c Merge "add colorspace for premultiplied alpha" -48f82757 add colorspace for premultiplied alpha -069f903a Change in lossless bit-stream. -5f7bb3f5 Merge "WebPReportProgress: use non-encoder specific params" -f18281ff WebPReportProgress: use non-encoder specific params -9ef32283 Add support for raw lossless bitstream in decoder. -7cbee29a Fix bug: InitIo reseting fancy_upsampling flag. -880fd98c vwebp: fix exit w/freeglut -1875d926 trap two unchecked error conditions -87b4a908 no need to have mux.h as noinst clause in enc/ -88f41ec6 doc: fix bit alignment in VP8X chunk -52f5a4ef Merge "fix bug with lossy-alpha output stride" -3bde22d7 fix bug with lossy-alpha output stride -42d61b6d update the spec for the lossy-alpha compression methods. -e75dc805 Move some more defines to format_constants.h -c13f6632 Move consts to internal header format_constants.h -7f2dfc92 use a bit-set transforms_seen_ instead of looping -18da1f53 modulate alpha-compression effort according to config.method -f5f2fff6 Merge "Alpha flag fix for lossless." -c975c44e Alpha flag fix for lossless. -4f067fb2 Merge "Android: only build dec_neon with NEON support" -255c66b4 Android: only build dec_neon with NEON support -8f9117a9 cosmetics: signature fixes -39bf5d64 use header-less lossless bitstream for alpha channel -75d7f3b2 Merge "make input data be 'const' for VP8LInverseTransform()" -9a721c6d make input data be 'const' for VP8LInverseTransform() -9fc64edc Disallow re-use of same transformation. -98ec717f use a function pointer for ProcessRows() -f7ae5e37 cosmetics: join line -140b89a3 factor out buffer alloc in AllocateARGBBuffers() -a107dfa8 Rectify WebPParseOptionalChunks(). -237eab67 Add two more color-spaces for lossless decoding. -27f417ab fix orthographic typo -489ec335 add VP8LEncodeStream() to compress lossless image stream -fa8bc3db make WebPEncodingSetError() take a const picture -638528cd bitstream update for lossy alpha compression -d73e63a7 add DequantizeLevels() placeholder -ec122e09 remove arch-dependent rand() -d40e7653 fix alignment -1dd6a8b6 Merge "remove tcoder, switch alpha-plane compression to lossless" -3e863dda remove tcoder, switch alpha-plane compression to lossless -8d77dc29 Add support for lossless in mux: -831bd131 Make tile size a function of encoding method. -778c5228 Merge "remove some variable shadowing" -817c9dce Few more HuffmanTreeToken conversions. -37a77a6b remove some variable shadowing -89c07c96 Merge "normalize example header includes" -4aff411f Merge "add example_util.[hc]" -00b29e28 normalize example header includes -061263a7 add example_util.[hc] -c6882c49 merge all tree processing into a single VP8LProcessTree() -9c7a3cf5 fix VP8LHistogramNumCodes to handle the case palette_code_bits == 0 -b5551d2e Merge "Added HuffmanTreeCode Struct for tree codes." -8b85d01c Added HuffmanTreeCode Struct for tree codes. -093f76d8 Merge "Allocate single memory in GetHuffBitLengthsAndCodes." -41d80494 Allocate single memory in GetHuffBitLengthsAndCodes. -1b04f6d2 Correct size in VP8L header. -2924a5ae Makefile.vc: split object lists based on directory -c8f24165 Merge "add assert(tokens)" -43239947 add assert(tokens) -9f547450 Catch an error in DecodeImageData(). -ac8e5e42 minor typo and style fix -9f566d1d clean-up around Huffman-encode -c579a710 Introduce CHUNK_SIZE_BYTES in muxi.h. -14757f8a Make sure huffman trees always have valid symbols -41050618 makefile.unix: add support for building vwebp -48b37721 Merge "fixed signed/unsigned comparison warning" -57f696da Merge "EncodeImageInternal: fix potential leak" -d972cdf2 EncodeImageInternal: fix potential leak -5cd12c3d fixed signed/unsigned comparison warning -cdca30d0 Merge "cosmetics: shorten long line" -e025fb55 cosmetics: shorten long line -22671ed6 Merge "enc/vp8l: fix double free on error" -e1b9b052 Merge "cosmetics: VP8LCreateHuffmanTree: fix indent" -a8e725f8 enc/vp8l: fix double free on error -27541fbd cosmetics: VP8LCreateHuffmanTree: fix indent -1d38b258 cwebp/windows: use MAKE_REFGUID where appropriate -817ef6e9 Merge "cwebp: fix WIC/Microsoft SDK compatibility issue" -902d3e3b cwebp: fix WIC/Microsoft SDK compatibility issue -89d803c4 Merge "Fix a crash due to wrong pointer-integer arithmetic." -cb1bd741 Merge "Fix a crash in lossless decoder." -de2fe202 Merge "Some cleanup in VP8LCreateHuffmanTree() (and related functions CompareHuffmanTrees() and SetBitDepths()): - Move 'tree_size' initialization and malloc for 'tree + tree_pool' outside the loop. - Some renames/tweaks for readability." -ce69177a Fix a crash due to wrong pointer-integer arithmetic. -e40a3684 Fix a crash in lossless decoder. -3927ff3a remove unneeded error condition for WebPMuxNumNamedElements() -2c140e11 Some cleanup in VP8LCreateHuffmanTree() (and related functions CompareHuffmanTrees() and SetBitDepths()): - Move 'tree_size' initialization and malloc for 'tree + tree_pool' outside the loop. - Some renames/tweaks for readability. -861a5b7b add support for animation -eb5c16cc Merge "Set correct encode size in encoder's stats." -4abe04a2 fix the return value and handle missing input file case. -2fafb855 Set correct encode size in encoder's stats. -e7167a2b Provide one entry point for backward references. -c4ccab64 Print relevant lossless encoding stats in cwebp. -e3302cfd GetHuffBitLengthsAndCodes: reduce level of indirection -b5f2a9ed enc/vp8l: fix uninitialized variable warning -7885f8b2 makefile.unix: add lossless encoder files -1261a4c8 Merge "cosmetics" -3926b5be Merge "dsp/cpu.c: Android: fix crash on non-neon arm builds" -834f937f dsp/cpu.c: Android: fix crash on non-neon arm builds -126e1606 cosmetics -e38602d2 Merge branch 'lossless_encoder' -e8d3d6a0 split StoreHuffmanCode() into smaller functions -d0d88990 more consolidation: introduce VP8LHistogramSet -1a210ef1 big code clean-up and refactoring and optimization -41b5c8ff Some cosmetics in histogram.c -ada6ff77 Approximate FastLog between value range [256, 8192] -ec123ca3 Forgot to update out_bit_costs to symbol_bit_costs at one instance. -cf33ccd1 Evaluate output cluster's bit_costs once in HistogramRefine. -781c01f4 Simple Huffman code changes. -a2849bc5 Lossless decoder: remove an unneeded param in ReadHuffmanCodeLengths(). -b39e7487 Reducing emerging palette size from 11 to 9 bits. -bfc73db4 Move GetHistImageSymbols to histogram.c -889a5786 Improve predict vs no-predict heuristic. -01f50663 code-moving and clean-up -31035f3b reduce memory usage by allocating only one histo -fbb501b8 Restrict histo_bits to ensure histo_image size is under 32MB -8415ddf3 further simplification for the meta-Huffman coding -e4917299 A quick pass of cleanup in backward reference code -83332b3c Make transform bits a function of encode method (-m). -72920caa introduce -lossless option, protected by USE_LOSSLESS_ENCODER -c6ac4dfb Run TraceBackwards for higher qualities. -412222c8 Make histo_bits and transform_bits function of quality. -149b5098 Update lossless encoder strategy: -0e6fa065 cache_bits passed to EncodeImageInternal() -e38b40a9 Factorize code for clearing HtreeGroup. -6f4a16ea Removing the indirection of meta-huffman tables. -3d33ecd1 Some renaming/comments related to palette in lossless encoder. -4d02d586 Lossless encoder: correction in Palette storage -4a636235 fix a memleak in EncodeImageInternal() -0993a611 Full and final fix for prediction transform -afd2102f Fix cross-color transform in lossless encoder -b96d8740 Need to write a '0' bit at the end of transforms. -54dad7e5 Color cache size should be counted as 0 when cache bits = 0 -4f0c5caf Fix prediction transform in lossless encoder. -36dabdad Fix memory leak in method EncodeImageInternal for histogram_image. -352a4f49 Get rid of PackLiteralBitLengths() -d673b6b9 Change the predictor function to pass left pixel -b2f99465 Fix CopyTileWithPrediction() -84547f54 Add EncodeImageInternal() method. -6b38378a Guard the lossless encoder (in flux) under a flag -09f7532c Fix few nits (const qualifiers) -648be393 Added implementation for various lossless functions -32714ce3 Add VP8L prefix to backward ref & histogram methods. -fcba7be2 Fixed header file tag (WEBP_UTILS_HUFFMAN_ENCODE_H_) -bc703746 Add backward_ref, histogram & huffman encode modules from lossless. -fdccaadd Fixing nits -227110c4 libwebp interface changes for lossless encoding. -50679acf minor style fixes -b38dfccf remove unneeded reference to NUM_LITERAL_CODES -8979675b harmonize header description -c04eb7be tcoder.c: define NOT_HAVE_LOG2 for MSVC builds -9a214fa1 Merge "VP8[L]GetInfo: check input pointers" -5c5be8ba VP8[L]GetInfo: check input pointers -0c188fec Merge changes I431acdfe,I713659b7 -b3515c62 mux: drop 'chunk' from ChunkInfo member names -aea7923c muxi.h: remove some unused defines -01422492 update NEWS file for next release -29e3f7ec Merge "dec: remove deprecated WebPINew()" -4718e449 Merge "muxedit: a few more size_t changes" -82654f96 Merge "muxedit: remove a few redundant NULL checks" -02f27fbd dec: remove deprecated WebPINew() -ccddb3fc muxedit: remove a few redundant NULL checks -a6cdf710 muxedit: a few more size_t changes -a3846892 Merge "mux: remove unused LIST_ID" -11ae46ae alpha.c: quiet some size_t -> int conversion warnings -dee46692 mux: remove unused LIST_ID -03f1f493 mux: add version checked entry points -6a0abdaa Merge "doc: tile/alpha corrections" -c8139fbe Merge "few cosmetics" -68338737 Merge "lossless: remove some size_t -> int conversions" -5249e94a doc: tile/alpha corrections -d96e722b huffman: quiet int64 -> int conversion warning -532020f2 lossless: remove some size_t -> int conversions -23be6edf few cosmetics -1349edad Merge "configure: AC_ARG_* use AS_HELP_STRING" -bfbcc60a configure: AC_ARG_* use AS_HELP_STRING -1427ca8e Merge "Makefile.am: header file maintenance" -087332e3 Merge "remove unused parameter 'round' from CalcProba()" -9630e168 remove unused parameter 'round' from CalcProba() -92092eaa Merge "bit_reader.h: correct include" -a87fc3f6 Merge "mux: ensure # images = # tiles" -53af99b1 Merge "mux: use size_t consistently" -39a57dae Makefile.am: header file maintenance -1bd0bd0d bit_reader.h: correct include -326a3c6b mux: ensure # images = # tiles -95667b8d mux: use size_t consistently -231ec1fb Removing the indirection of meta-huffman tables. -15ebcbaa check return pointer from MuxImageGetListFromId -b0d6c4a7 Merge "configure: remove test for zlib.h" -8cccac50 Merge "dsp/lossless: silence some build warnings" -b08819a6 dsp/lossless: silence some build warnings -7ae22521 Android.mk: SSE2 & NEON updates -0a49e3f3 Merge "makefile.unix add missing header files" -2e75a9a1 Merge "decode.h: use size_t consistently" -fa13035e configure: remove test for zlib.h -d3adc81d makefile.unix add missing header files -262fe01b Merge "makefile.unix & Android.mk: cosmetics" -4cce137e Merge "enc_sse2 add missing stdlib.h include" -80256b85 enc_sse2 add missing stdlib.h include -9b3d1f3a decode.h: use size_t consistently -64083d3c Merge "Makefile.am: cosmetics" -dceb8b4d Merge changes If1331d3c,I86fe3847 -0e33d7bf Merge "webp/decode.h: fix prototypes" -fac0f12e rename BitReader to VP8LBitReader -fbd82b5a types.h: centralize use of stddef.h -2154835f Makefile.am: cosmetics -1c92bd37 vp8io: use size_t for buffer size -90ead710 fix some more uint32_t -> size_t typing -cbe705c7 webp/decode.h: fix prototypes -3f8ec1c2 makefile.unix & Android.mk: cosmetics -217ec7f4 Remove tabs in configure.ac -b3d35fc1 Merge "Android.mk & Makefile.vc: add new files" -0df04b9e Android.mk & Makefile.vc: add new files -e4f20c5b Merge "automake: replace 'silent-rules' w/AM_SILENT_RULES" -8d254a09 cosmetics -6860c2ea fix some uint32_t -> size_t typing -4af1858a Fix a crash due to max symbol in a tree >= alphabet size -6f01b830 split the VP8 and VP8L decoding properly -f2623dbe enable lossless decoder -b96efd7d add dec/vp8i.h changes from experimental -19f6398e add dec/vp8l{i.h,.c} from experimental -c4ae53c8 add utils/bit_reader.[hc] changes from experimental -514d0089 add dsp/lossless.[hc] from experimental -9c67291d add utils/huffman.[hc] from experimental -337914a0 add utils/color_cache.[hc] from experimental -b3bf8fe7 the read-overflow code-path wasn't reporting as an error -1db888ba take colorspace into account when cropping -61c2d51f move the rescaling code into its own file and make enc/ and dec/ use it. -efc2016a Make rescaler methods generic -3eacee81 Move rescaler methods out of io.c. -a69b893d automake: replace 'silent-rules' w/AM_SILENT_RULES -6f7bf645 issue 111: fix little-endian problem in bit-reader -ed278e22 Removed unnecessary lookup -cd8c3ba7 fix some warnings: down-cast and possibly-uninitialized variable -0a7102ba ~1% improvement of alpha compression -3bc1b141 Merge "Reformat container doc" -dc17abdc mux: cosmetics -cb5810df Merge "WebPMuxGetImage: allow image param to be NULL" -506a4af2 mux: cosmetics -135e8b19 WebPMuxGetImage: allow image param to be NULL -de556b68 Merge "README.mux: reword some descriptions" -0ee2aeb9 Makefile.vc: use batch mode rules -d9acddc0 msvc: move {i,p}db creation to object directory -237c9aa7 Merge "expose WebPFree function for DLL builds" -b3e4054f silence msvc debug build warning -45feb55d expose WebPFree function for DLL builds -11316d84 README.mux: reword some descriptions -4be52f4a factorize WebPMuxValidate -14f6b9f6 mux: light cleanup -5e96a5db add more param checks to WebPPictureDistortion() -8abaf820 Merge "silence some type size related warnings" -1601a39b silence some type size related warnings -f3abe520 Merge "idec: simplify buffer size calculation" -a9c5cd4c idec: simplify buffer size calculation -7b06bd7f Merge "configure/automake: add silent-rules option" -e9a7d145 Reformat container doc -d4e5c7f3 configure/automake: add silent-rules option -5081db78 configure/automake: no -version-info for convenience libs -85b6ff68 Merge "idec: fix WebPIUpdate failure" -7bb6a9cc idec: fix internal state corruption -89cd1bb8 idec: fix WebPIUpdate failure -01b63806 4-5% faster decoding, optimized byte loads in arithmetic decoder. -631117ea Merge "cosmetics & warnings" -a0b2736d cosmetics & warnings -f73947f4 use 32bit for storing dequant coeffs, instead of 16b. -b9600308 Merge "store prediction mode array as uint8_t[16], not int[16]." -7b67881a store prediction mode array as uint8_t[16], not int[16]. -cab8d4dc Merge "NEON TransformOne" -ba503fda NEON TransformOne -9f740e3b Merge "gcc warning fix: remove the 'const' qualifier." -f76d3587 gcc warning fix: remove the 'const' qualifier. -e78478d6 Merge "webpmux: make more use of WebPData" -f85bba3d Merge "manpages: add BUGS section" -48a43bbf Merge "makefile.unix: variable cosmetics" -c274dc96 makefile.unix: variable cosmetics -1f7b8595 re-organize the error-handling in the main loop a bit -1336fa71 Only recompute level_cost_[] when needed -771ee449 manpages: add BUGS section -0f7820e6 webpmux: make more use of WebPData -974aaff3 examples: logging updates -6c14aadd Merge "better token buffer code" -f4054250 better token buffer code -18d959fa Merge "mux: add WebPData type" -eec4b877 mux: add WebPData type -0de3096b use 16bit counters for recording proba counts -7f23678d fix for LevelCost + little speed-up -7107d544 further speed-up/cleanup of RecordCoeffs() and GetResidualCost() -fd221040 Introduce Token buffer (unused for now) -5fa148f4 Merge "speed-up GetResidualCost()" -28a9d9b4 speed-up GetResidualCost() -11e7dadd Merge "misc cosmetics" -378086bd misc cosmetics -d61479f9 add -print_psnr and -print_ssim options to cwebp. -2e3e8b2e add a WebPCleanupTransparentArea() method -552c1217 Merge "mux: plug some memory leaks on error" -a2a81f7d Merge "fix Mach-O shared library build" -b3482c43 Merge "fix gcc-4.0 apple 32-bit build" -e4e3ec19 fix gcc-4.0 apple 32-bit build -b0d2fecf mux: plug some memory leaks on error -f0d2c7a7 pass of cosmetics -b309a6f9 fix Mach-O shared library build -241ddd38 doc: delete mux container pdf -8b1ba272 doc: update VP8 decode guide link -7e4371c5 WebPMuxCreate: fix unchecked malloc -eb425586 Merge "have makefile.unix clean up src/webp/*~ too" -a85c3631 Merge "correct EncodeAlpha documentation" -a33842fd Merge "Update webp container spec with alpha filter options." -8d6490da Incremental support for some of the mux APIs. -b8375abd have makefile.unix clean up src/webp/*~ too -b5855fc7 correct EncodeAlpha documentation -dba37fea Update webp container spec with alpha filter options. -2e74ec8b fix compile under MINGW -716d1d7f fix suboptimal MAX_LEN cut-off limit -57cab7b8 Harmonize the alpha-filter predictions at boundary -3a989534 Merge "Fix bug for Alpha in RGBA_4444 color-mode." -8ca2076d Introduce a 'fast' alpha mode -221a06bb Fix bug for Alpha in RGBA_4444 color-mode. -ad1e163a cosmetics: normalize copyright headers -c77424d7 cosmetics: light include cleanup -9d0e17c9 fix msvc build breakage after 252028a -7c4c177c Some readability fixes for mux library -d8a47e66 Merge "Add predictive filtering option for Alpha." -252028aa Add predictive filtering option for Alpha. -9b69be1c Merge "Simplify mux library code" -a056170e Simplify mux library code -992187a3 improve log2 test -e852f832 update Android.mk file list -a90cb2be reduce number of copies and mallocs in alpha plane enc/dec -b1662b05 fix some more type conversion warnings w/MSVC -223d8c60 fix some uint64_t -> int conversion warnings with MSC -c1a0437b Merge "simplify checks for enabling SSE2 code" -f06817aa simplify checks for enabling SSE2 code -948d4fe9 silence a msvc build warning -91179549 vwebp: msvc build tweaks -7937b409 simple WebP viewer, based on OpenGL -6aac1df1 add a bunch of missing 'extern "C"' -421eb99d Merge "Remove assigned-but-not-used variable "br"" -91e27f45 better fitting names for upsampling functions -a5d7ed5c Remove assigned-but-not-used variable "br" -f62d2c94 remove unused 'has_alpha' from VP8GetInfo() signature -08e86582 trap alpha-decoding error -b361eca1 add cut-off to arith coder probability update. -8666a93a Some bug-fixes for images with alpha. -273a12a0 fix off-by-1 diff in case cropping and simple filtering -2f741d1e webpmux: ReadImage: fix ptr free in error case -721f3f48 fix alpha decode -60942c8c fix the has_alpha_ order -30971c9e Implement progress report (and user abort) -eda520a9 cosmetics after 9523f2a -38bd5bb5 Merge "Better alpha support in webpmux binary" -ccbaebfe Merge "Updated the includes to relative paths." -d71fbdcc fix small typo in error message array -cdf97aa2 Better alpha support in webpmux binary -885f25bc Updated the includes to relative paths. -a0ec9aac Update WebP encoder (cwebp) to support Alpha. -667b769a Fixed the include for types.h within mux.h -9523f2a5 Add Alpha Encode support from WebPEncode. -16612ddd Merge "Add Alpha Decode support from WebPDecode." -d117a940 Add Alpha Decode support from WebPDecode. -67228734 cosmetics after e1947a9 -e1947a92 Add Alpha encode/decode code. -afc4c5d6 simplify code by introducing a CopyPlane() helper func -113b3128 Merge "MUX API Updates" -c398f595 MUX API Updates -5acf04ef remove orphan source file -059f03ef Merge "dec: validate colorspace before using as array index" -70a03989 Merge "factorize some code" -9b243b3d factorize some code -372e2b46 Correct a bug in ReadPNG() with GRAY_ALPHA images -469d6eb9 Merge "Makefile.am: remove redundant noinst_HEADERS" -9fe3372f dec: validate colorspace before using as array index -8962030f remove orphan source file -ced3e3f4 Makefile.am: remove redundant noinst_HEADERS -964387ed use WEBP_INLINE for inline function declarations -90880a11 Merge "manpages: break long lines" -b5910895 Merge "manpages: minor formatting updates" -4c451e4a Merge "Rectify the Chunk parsing logic." -04e84cf1 examples: slight cleanup -099717ce manpages: break long lines -1daf39bb manpages: minor formatting updates -abd030b5 fix missing "(void)" in function signature -f6a7d758 remove useless test -f07b2138 Rectify the Chunk parsing logic. -b8634f7d webpmux: fix lib link order -42c2e682 Fix missing coma (on uncompiled code) -d8329d41 Android.mk: add missing source files -13a54df5 Merge "More aggressive copy-edit; add TODO; validate HTML5" -868b96ae More aggressive copy-edit; add TODO; validate HTML5 -767afea2 configure: check for a symbol contained in libpng -408b8918 Merge "Linewrap at 72 cols. Casual copy-edit." -3ae318c7 Merge "Restore (most) emphasis; add emphasis to normative RFC 2119 terms (MUST, etc.)" -918eb2d8 Merge "Basic container doc source clean-up; fix lists and pseudocode blocks." -03bec9e0 Linewrap at 72 cols. Casual copy-edit. -2678d819 Restore (most) emphasis; add emphasis to normative RFC 2119 terms (MUST, etc.) -428674da Basic container doc source clean-up; fix lists and pseudocode blocks. -6a77d928 Merge "Makefile.vc: cosmetics" -28c38e8c Merge "Makefile.vc: condense directory creation rules" -55be2cf8 Initial import of container spec document, from pdftotext transform. -a82a788b Makefile.vc: cosmetics -c8f41ce5 Makefile.vc: condense directory creation rules -2b877cd0 Some fixes to Makefile.vc to support the src\mux directory. -3eb969b3 Merge "Add Makefile.vc for Mux library & binary." -e78e971e Add Makefile.vc for Mux library & binary. -6aedde58 Add manual for WebPMux tool. -8a360d0a Merge "Added WebPMux Binary." -a4f32cae Added WebPMux Binary. -f3bf4c76 Added Mux Container Spec & README for MUX-API. -9f761cfa Changed function signature for WebPMuxCreate -5f31b5ec Merge "Add Mux library for manipulating WebP container." -2315785f Add Mux library for manipulating WebP container. -7e198abb update ChangeLog (tag: v0.1.3) -dfc9c1ea Harmonize the dates -28ad70c5 Fix PNG decoding bug -846e93c5 Update AUTHORS & add .mailmap -563e52d6 cosmetics after '76036f5 Refactor decoder library' -76036f54 Refactor decoder library -377ef43c configure.ac: update AC_INIT params -7a8d8762 use a user-visible MACRO for max width/height. -d4e9f559 NEON decode support in WebP -0ee683b5 update libtool version-info -fdbe02c5 windows: match _cond_destroy logic w/return variable name -206b686b README: correct advanced decode api pseudo-code -6a32a0f5 make VP8BitReader a typedef, for better re-use -b112e836 create a libwebputils under src/utils -ee697d9f harmonize the include guards and #endif comments -a1ec07a6 Fixing compiler error in non x86 arch. -dcfa509a Fixed recursive inclusion of bit_writer.h and vp8enci.h. -e06ac088 create a separate libwebpdsp under src/dsp -ebeb412a use unsigned int for bitfields -341cc56a make kNewRange a static array -227a91e5 README: minor wording update -05bd8e6a add man pages to dist -812dfa1a bump up versions in preparations for 0.1.3 -a5b78c81 wrap alpha-related options under WEBP_EXPERIMENTAL_FEATURES flag -34dc7907 regen ChangeLog for 0.1.3-rc2 -7c436630 Silence some (more) Visual Studio warnings. -60306e8c add top-level gitattributes -2aa6b80e Slience some Visual Studio warnings. -4cbbb290 Merge "bump up version for next freeze" -a3291674 bump up version for next freeze -c7e86aba cosmetics: fix comment line lengths -c9e037ab makefile.unix: add simple dist target -87d58ce9 makefile.unix: rule maintenance -d477de77 mend -fac15ec7 Update NEWS & README for next release V0.1.3 -6215595c Merge "add a -partition_limit option to limit the number of bits used by intra4x4" -3814b76c Merge "reorganize chunk-parsing code" -900286e0 add a -partition_limit option to limit the number of bits used by intra4x4 -cd12b4b0 add the missing cost for I4/I16 mode selection -dfcc2136 reorganize chunk-parsing code -3cf20306 initialize pointers to function within VP8DspInit() -d21b4795 Merge "windows: add decode threading support" -473ae953 fix hang on thread creation failure -fccca420 windows: add decode threading support -a31f843a Use the exact PNG_INCLUDES/PNG_LIBS when testing for -lpng -ad9b45f1 Merge "Makefile.vc: rule maintenance" -565a2cab Makefile.vc: rule maintenance -2d0da681 makefile.unix: disable Wvla by default -fc7815d6 multi-thread decoding: ~25-30% faster -acd8ba42 io->teardown() was not always called upon error -c85527b1 Merge "Makefile.vc: add DLL configs" -e1e9be35 cosmetics: spelling/grammar in README and lib headers -b4d0ef8f Makefile.vc: add DLL configs -998754a7 remove unused nb_i4_ and nb_i16_ fields. -9f01ce3a rename WebPDecBuffer::memory -> private_memory -fb5d659b fix an overflow bug in LUT calculation -d646d5c7 swig: add WebPDecodeARGB -78aeed40 add missing WebPDecodeARGBInto() and switch ARGB4444 to RGBA4444 as was intended -cd7c5292 explicitly mark library functions as extern -19db59f8 add support for RGB565, ARGB4444 and ARGB colorspace (decoder) -c915fb2a encoder speed-up: hardcode special level values -c558bdad Rename and improve the API to retrieve decoded area -bf599d74 Merge "makefile.unix: disable -Wvla by default" -c9ea03d7 SSE2 version of strong filtering -993af3e2 makefile.unix: disable -Wvla by default -3827e1bc Merge "examples: (windows/WIC) add alpha support" -e291fae0 SSE2 functions for the fancy upsampler. -a06bbe2e add WebPISetIOHooks() to set some custom hooks on the incremental decoder object. -7643a6f2 Merge "makefile.unix: use uname to detect OSX environment" -5142a0be export alpha channel (if present) when dumping to PGM format -14d5731c makefile.unix: use uname to detect OSX environment -08057062 examples: quiet warnings -3cfe0888 examples: (windows/WIC) add alpha support -13ed94b8 add compile warning for variable-length-array -5a18eb1a Merge "add Advanced Decoding Interface" -5c4f27f9 add missing \n -f4c4e416 80 cols fix -d2603105 add Advanced Decoding Interface -bd2f65f6 sse2 version of the complex filter -96ed9ce0 perform two idct transforms at a time when possible -01af7b69 use aligned stored -0e1d1fdf Merge "Makefile.vc: add experimental target" -2a1292a6 Makefile.vc: add experimental target -23bf351e Enable decode SSE2 for Visual Studio -131a4b7b dec/dsp_sse2: fix visual studio compile -00d9d680 swig: file reorganization -7fc7e0d9 Merge "swig/java: basic encode support" -3be57b16 fix MSVC compile for WEBP_EXPERIMENTAL_FEATURES -40a7e347 dec/dsp: disable sse2 for Visual Studio builds -e4d540c8 add SSE2 code for transform -54f2170a swig/java: basic encode support -c5d4584b call function pointers instead of C-version -ea43f045 Merge "configure: mingw32 targets: test for WIC support" -a11009d7 SSE2 version of simple in-loop filtering -42548da9 shave one unneeded filter-cache line -31f9dc6f configure: mingw32 targets: test for WIC support -19559699 Merge "split expression in two." -415dbe46 split expression in two. -e29072a8 configure: test for zlib only w/--enable-experimental -b2b0090b Simplify Visual Studio ifdefs -ca7a2fd6 Add error reporting from encoding failures. -6c9405db Merge "Makefile.vc: require CFG with clean target" -0424ecd9 Makefile.vc: require CFG with clean target -003417c7 Enable SSE2 for Visual Studio builds -af10db4a little speed up for VP8BitUpdate() -e71418f8 more MSVC files to ignore -46d90363 cosmetics -edf59ab3 typo fix -72229f5f Add support for x64 and SSE2 builds under Windows. -92e5c6e1 VP8GetInfo() + WebPResetDecParams() -416b7a6b raise the fixed-point precision for the rescaler -aa87e4e0 fix alignment -eb66670c disable WEBP_EXPERIMENTAL_FEATURES -c5ae7f65 typo fix: USE_ => WEBP_ -d041efae swig: add libwebp.jar/libwebp_java_wrap.c -f6fb3877 add swig interface -e9273902 align buffer for double too -842c009b fix -strong option -d0a70387 Merge "cosmetics" -fc0a02e5 fix the dichotomy loop -38369c03 cosmetics -8dfc4c6f factorize and unify GetAlpha() between the C and SSE2 version -6d0e66c2 prepare experimentation with yuv444 / 422 -79cc49f5 add a --enable-experimental option to './configure' -d7575238 sse2 version of CollectHistogram() -c1c728d6 add an extra #ifdef WEBP_EXPERIMENTAL_FEATURES to avoid 'unused variable' warning -60c61d2d always call VP*EncDeleteAlpha() unconditionnally, for simplicity -0f8c6384 simply don't call WriteExtensions() if WEBP_EXPERIMENTAL_FEATURES is not defined -47c661d5 rename swap -> swap_rb -10d55bbb move chunk[] declaration out of the for() loop -517cec21 fix indentation -f7d9e261 fix merge problems -8fd42b3a add a stride 'a_stride' for the alpha plane -b8dcbf2f fix alpha-plane copy and crop methods -cdef89de fix some 'unused variable' warning -fb29c262 SSE2 version of the fwd transform and the squared sum metric -2ab4b72f EXPERIMENTAL: add support for alpha channel -cfbf88a6 add SSE2 functions. ~2x faster encoding on average. -e7ff3f9a merge two ITransforms together when applicable and change the TTransform to return the sum directly. -ca554137 fix WebPIDecGetRGB() to accept any RGB(A) mode, not just MODE_RGB -8aa50efd fix some 'man' typos -d3f3bdda update ChangeLog (tag: v0.1.2) -d7e9a69c update contributor list -261abb8e add a 'superclean' section -276ae825 Remove files not mean to be in git, and update .gitignore -24868455 build: prepare libwebp.pc -14ceb6e8 add "-version" description to man pages -b247a3b2 Create the m4 directory, and also place .gitignore in there for libtool. -cdd734c9 Resolve automake warnings -c5fa726e build: add pkgconfig files -b20aaca2 build: just use autoreconf, avoid calling tools manually -4b0b0d66 cwebp: use modern functions -efbc6c41 update Android.mk -7777570b better version of ChangeLog -fa70d2b7 update version number in the DOC -f8db5d5d more C89-fixes -0de013b3 fix typos -650ffa3b add version getters for decoder and encoder -be4867d2 doc for incremental decoding -56732a1b add idec.obj in MSVC makefile -208afb5e add c++ guards -8bf76fe0 add incremental decoding -1f288328 'inline' isn't defined in strict ansi c89 -8b77c632 move the quantization function to dsp.c -b2c3575c add a 'last_y' field to WebPDecParams -2654c3da correctly pass along the exact same status returned from ParsePartitions -4704146a add missing precision in the man -6d978a6c add error messages -6463e6ab add some install instructions, and fix intel-mac flags -05fb7bfc Merge ".gitignore: initial version" -c33f0195 .gitignore: initial version -e532b9ab Makefile: allow out of tree builds -4c0da7aa enable sparse dc/ac transforms -07dbb8d5 clarify the return logic -5c69e1bb fix bigger-by-1 array -7c5267e3 fix a (harmless) typo: non_zero_ -> non_zero_ac_ -bc752135 fix missing free() -af3e2aaa remove trailing spaces -13e50da6 make the bitreader preload at least 8bits, instead of post-load them (this makes initialization easier and will be helpful for incremental decoding). Modify ParsePartitions() to accommodate for truncated input. -f4888f77 emit 9 - nb_bits trailing zeros instead of 8 -3db65255 separate block-parsing into a visible VP8DecodeMB() -a871de02 add missing extern "C" -b3ce8c52 remove a gcc warning about type pun by using a proper union'd type -e1863715 update after addition of webpi.h -3e856e2d Extract some useful functions around decoding buffer WebPDecParams. -d5bc05a4 make the filtering process match libvpx and ffvp8 -dd60138d add man pages for cwebp(1) and dwebp(1) -c4fa3644 fix header -5b70b378 * add an option to bypass_filtering in VP8Io. -b97a4003 simplify QuantizeBlock code a bit -84b58ebb add more checks around picture allocation -b65a3e10 remove absolute_delta_ field and syntax code -0744e842 Dont' open output file until we're sure the input file is valid -d5bd54c7 fix typo and buggy line -f7a9549d Add a simple top-level makefile.unix for quick & easy build. -5f36b944 update the doc for the -f option -f61d14aa a WebP encoder converts PNG & JPEG to WebP -81c96621 oops: forgotten call to Initialize() + move the error message to a more useful place -87ffa005 typo: fix a missing 'R', was confusing. -b04b857a * add decoding measurement using stopwatch.h (use -v option) * support PNG output through WIC on Win32 -746a4820 * make (*put)() hook return a bool for abort request. * add an enum for VP8Status() to make things clearer -73c973e6 * strengthen riff/chunk size checks * don't consider odd-sized chunks being an error -1dc4611a add support for PNG output (default) regularize include guards -860641df fix a typo: sizeof(kYModeProbaInter0) => sizeof(kUVModeProbaInter0) -3254fc52 fix some petty constness fix the ./configure file too -504d3393 fix eof_ mis-initialization -2bc0778f leftover Makefile.* from previous commit -d2cf04e4 move Makefile.am one level below, to src/dec fix typos here and there dwebp is now an installed program -ade92de8 typo: vp8.h -> decode_vp8.h -d7241241 forgot to declare types.h to be installed -6421a7a4 move the decoder sourcetree to a sub-location src/dec to make room for future libs sources -a9b3eab6 correct layout name is IMC4. -2330522c handle corner case of zero-dimensions -280c3658 make VP8Init() handle short buffers (< 2 bytes) correctly -b1c9e8b4 handle error cases more robustly -0e94935c Merge "table-less version of clip_8b()" -1e0a2d25 table-less version of clip_8b() -e12109ee dwebp: change -yuv option to -raw change the layout to IMC2 -d72180a4 speed-up fancy upscaler -9145f3bc reset eof_ at construction time -a7ee0559 simplify the logic of GetCoeffs() -f67b5939 lot of cosmetics -ea27d7c6 fix endian problem on PowerPC -beb0a1ba fix signature of VP8StoreBlock -b128c5e2 Merge "fancy chroma upscaling" -6a37a2aa fancy chroma upscaling -ff565edc fix two numeric typos -5a936a0a use uintptr_t for casting pointers to ints -e14a0301 for cross_compiling=yes to prevent executing any binary -83b545ee add vc9+ makefile -296f6914 fix output loop for small height -cbfbb5c3 convert to plain-C -f09f96ee Fix declaration after statement warning -5981ee55 Fix UV plane ac/dc quantizer transposition -c8d15efa convert to ANSI-C -c3f41cb4 Initial commit diff --git a/Dependencies/FreeImage/Source/LibWebP/LibWebP.2013.vcxproj b/Dependencies/FreeImage/Source/LibWebP/LibWebP.2013.vcxproj deleted file mode 100644 index 198e87a..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/LibWebP.2013.vcxproj +++ /dev/null @@ -1,352 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - LibWebP - {097D9F6C-FD0E-4CBC-9676-009012AAECA8} - LibWebP - Win32Proj - - - - StaticLibrary - v120 - MultiByte - true - - - StaticLibrary - v120 - MultiByte - - - StaticLibrary - v120 - MultiByte - true - - - StaticLibrary - v120 - MultiByte - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Disabled - Default - %(AdditionalIncludeDirectories);./ - WIN32;_WINDOWS;_DEBUG;_LIB;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) - false - false - - EnableFastChecks - MultiThreadedDebug - true - false - NotUsing - Level3 - ProgramDatabase - Default - false - - - true - - - - - - X64 - - - Disabled - Default - %(AdditionalIncludeDirectories);./ - WIN32;_WINDOWS;_DEBUG;_LIB;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) - false - false - - EnableFastChecks - MultiThreadedDebug - true - false - NotUsing - Level3 - ProgramDatabase - Default - false - - - true - - - - - - Full - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - false - false - - MultiThreaded - true - false - NotUsing - Level3 - None - CompileAsC - false - AnySuitable - %(AdditionalIncludeDirectories);./ - Speed - true - false - - - - - - X64 - - - Full - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - false - false - - MultiThreaded - true - false - NotUsing - Level3 - None - CompileAsC - false - AnySuitable - %(AdditionalIncludeDirectories);./ - Speed - true - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibWebP/LibWebP.2013.vcxproj.filters b/Dependencies/FreeImage/Source/LibWebP/LibWebP.2013.vcxproj.filters deleted file mode 100644 index 6c87d1e..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/LibWebP.2013.vcxproj.filters +++ /dev/null @@ -1,527 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {898f62af-7401-4f82-9452-2b72677517d7} - - - {3e44808f-e2b1-4d2b-b50f-8b8d56f209ac} - - - {40bf922d-3f05-4278-a848-9a8f9c1d9474} - - - {d906e31e-f602-4b1f-ba68-b1abb5ff9738} - - - {4eeaa0c9-dead-4997-bff0-6c9a5af48cdd} - - - {c7c9cc92-92ca-4844-b506-87ba16fe9d1d} - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {dff32b80-f0b7-49d7-b771-b92f85ee9848} - - - {88e77c9d-2044-4a31-920e-ee5f93256344} - - - {a9d95275-6425-4ea0-841b-40c54d451735} - - - {f8ab3946-dc90-46c3-856a-5b56f14bce33} - - - {fb7ba256-3298-47b1-8382-c5a3e8d62004} - - - {d494e420-63fe-4350-80fa-44e7c4786e1a} - - - - - Header Files\dec - - - Header Files\dec - - - Header Files\dec - - - Header Files\dec - - - Header Files\dec - - - Header Files\dec - - - Header Files\enc - - - Header Files\enc - - - Header Files\enc - - - Header Files\enc - - - Header Files\enc - - - Header Files\enc - - - Header Files\mux - - - Header Files\mux - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\webp - - - Header Files\webp - - - Header Files\webp - - - Header Files\webp - - - Header Files\webp - - - Header Files\webp - - - Header Files\webp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\demux - - - Source Files\demux - - - Source Files\mux - - - Source Files\mux - - - Source Files\mux - - - Source Files\mux - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibWebP/LibWebP.2017.vcxproj b/Dependencies/FreeImage/Source/LibWebP/LibWebP.2017.vcxproj deleted file mode 100644 index 13a5f12..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/LibWebP.2017.vcxproj +++ /dev/null @@ -1,353 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - LibWebP - {097D9F6C-FD0E-4CBC-9676-009012AAECA8} - LibWebP - Win32Proj - 10.0.16299.0 - - - - StaticLibrary - v141 - MultiByte - true - - - StaticLibrary - v141 - MultiByte - - - StaticLibrary - v141 - MultiByte - true - - - StaticLibrary - v141 - MultiByte - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Disabled - Default - %(AdditionalIncludeDirectories);./ - WIN32;_WINDOWS;_DEBUG;_LIB;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) - false - false - - EnableFastChecks - MultiThreadedDebug - true - false - NotUsing - Level3 - ProgramDatabase - Default - false - - - true - - - - - - X64 - - - Disabled - Default - %(AdditionalIncludeDirectories);./ - WIN32;_WINDOWS;_DEBUG;_LIB;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) - false - false - - EnableFastChecks - MultiThreadedDebug - true - false - NotUsing - Level3 - ProgramDatabase - Default - false - - - true - - - - - - Full - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - false - false - - MultiThreaded - true - false - NotUsing - Level3 - None - CompileAsC - false - AnySuitable - %(AdditionalIncludeDirectories);./ - Speed - true - false - - - - - - X64 - - - Full - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - false - false - - MultiThreaded - true - false - NotUsing - Level3 - None - CompileAsC - false - AnySuitable - %(AdditionalIncludeDirectories);./ - Speed - true - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibWebP/LibWebP.2017.vcxproj.filters b/Dependencies/FreeImage/Source/LibWebP/LibWebP.2017.vcxproj.filters deleted file mode 100644 index 6c87d1e..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/LibWebP.2017.vcxproj.filters +++ /dev/null @@ -1,527 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {898f62af-7401-4f82-9452-2b72677517d7} - - - {3e44808f-e2b1-4d2b-b50f-8b8d56f209ac} - - - {40bf922d-3f05-4278-a848-9a8f9c1d9474} - - - {d906e31e-f602-4b1f-ba68-b1abb5ff9738} - - - {4eeaa0c9-dead-4997-bff0-6c9a5af48cdd} - - - {c7c9cc92-92ca-4844-b506-87ba16fe9d1d} - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {dff32b80-f0b7-49d7-b771-b92f85ee9848} - - - {88e77c9d-2044-4a31-920e-ee5f93256344} - - - {a9d95275-6425-4ea0-841b-40c54d451735} - - - {f8ab3946-dc90-46c3-856a-5b56f14bce33} - - - {fb7ba256-3298-47b1-8382-c5a3e8d62004} - - - {d494e420-63fe-4350-80fa-44e7c4786e1a} - - - - - Header Files\dec - - - Header Files\dec - - - Header Files\dec - - - Header Files\dec - - - Header Files\dec - - - Header Files\dec - - - Header Files\enc - - - Header Files\enc - - - Header Files\enc - - - Header Files\enc - - - Header Files\enc - - - Header Files\enc - - - Header Files\mux - - - Header Files\mux - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\utils - - - Header Files\webp - - - Header Files\webp - - - Header Files\webp - - - Header Files\webp - - - Header Files\webp - - - Header Files\webp - - - Header Files\webp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - Header Files\dsp - - - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\dec - - - Source Files\demux - - - Source Files\demux - - - Source Files\mux - - - Source Files\mux - - - Source Files\mux - - - Source Files\mux - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\utils - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\dsp - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - Source Files\enc - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/LibWebP/NEWS b/Dependencies/FreeImage/Source/LibWebP/NEWS deleted file mode 100644 index ff28a02..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/NEWS +++ /dev/null @@ -1,199 +0,0 @@ -- 4/2/2018: version 1.0.0 - This is a binary compatible release. - * lossy encoder improvements to avoid chroma shifts in various circumstances - (issues #308, #340) - * big-endian fixes for decode, RGBA import and WebPPictureDistortion - Tool updates: - gifwebp, anim_diff - default duration behavior (<= 10ms) changed to match - web browsers, transcoding tools (issue #379) - img2webp, webpmux - allow options to be passed in via a file (issue #355) - -- 11/24/2017: version 0.6.1 - This is a binary compatible release. - * lossless performance and compression improvements + a new 'cruncher' mode - (-m 6 -q 100) - * ARM performance improvements with clang (15-20% w/ndk r15c, issue #339) - * webp-js: emscripten/webassembly based javascript decoder - * miscellaneous bug & build fixes (issue #329, #332, #343, #353, #360, #361, - #363) - Tool updates / additions: - added webpinfo - prints file format information (issue #330) - gif2webp - loop behavior modified to match Chrome M63+ (crbug.com/649264); - '-loop_compatibility' can be used for the old behavior - -- 1/26/2017: version 0.6.0 - * lossless performance and compression improvements - * miscellaneous performance improvements (SSE2, NEON, MSA) - * webpmux gained a -duration option allowing for frame timing modification - * new img2webp utility allowing a sequence of images to be converted to - animated webp - * API changes: - - libwebp: - WebPPictureSharpARGBToYUVA - WebPPlaneDistortion - - libwebpmux / gif2webp: - WebPAnimEncoderOptions: kmax <= 0 now disables keyframes, kmax == 1 - forces all keyframes. See mux.h and the gif2webp - manpage for details. - -- 12/13/2016: version 0.5.2 - This is a binary compatible release. - This release covers CVE-2016-8888 and CVE-2016-9085. - * further security related hardening in the tools; fixes to - gif2webp/AnimEncoder (issues #310, #314, #316, #322), cwebp/libwebp (issue - #312) - * full libwebp (encoder & decoder) iOS framework; libwebpdecoder - WebP.framework renamed to WebPDecoder.framework (issue #307) - * CMake support for Android Studio (2.2) - * miscellaneous build related fixes (issue #306, #313) - * miscellaneous documentation improvements (issue #225) - * minor lossy encoder fixes and improvements - -- 6/14/2016: version 0.5.1 - This is a binary compatible release. - * miscellaneous bug fixes (issues #280, #289) - * reverted alpha plane encoding with color cache for compatibility with - libwebp 0.4.0->0.4.3 (issues #291, #298) - * lossless encoding performance improvements - * memory reduction in both lossless encoding and decoding - * force mux output to be in the extended format (VP8X) when undefined chunks - are present (issue #294) - * gradle, cmake build support - * workaround for compiler bug causing 64-bit decode failures on android - devices using clang-3.8 in the r11c NDK - * various WebPAnimEncoder improvements - -- 12/17/2015: version 0.5.0 - * miscellaneous bug & build fixes (issues #234, #258, #274, #275, #278) - * encoder & decoder speed-ups on x86/ARM/MIPS for lossy & lossless - - note! YUV->RGB conversion was sped-up, but the results will be slightly - different from previous releases - * various lossless encoder improvements - * gif2webp improvements, -min_size option added - * tools fully support input from stdin and output to stdout (issue #168) - * New WebPAnimEncoder API for creating animations - * New WebPAnimDecoder API for decoding animations - * other API changes: - - libwebp: - WebPPictureSmartARGBToYUVA() (-pre 4 in cwebp) - WebPConfig::exact (-exact in cwebp; -alpha_cleanup is now the default) - WebPConfig::near_lossless (-near_lossless in cwebp) - WebPFree() (free'ing webp allocated memory in other languages) - WebPConfigLosslessPreset() - WebPMemoryWriterClear() - - libwebpdemux: removed experimental fragment related fields and functions - - libwebpmux: WebPMuxSetCanvasSize() - * new libwebpextras library with some uncommon import functions: - WebPImportGray/WebPImportRGB565/WebPImportRGB4444 - -- 10/15/15: version 0.4.4 - This is a binary compatible release. - * rescaling out-of-bounds read fix (issue #254) - * various build fixes and improvements (issues #253, #259, #262, #267, #268) - * container documentation update - * gif2webp transparency fix (issue #245) - -- 3/3/15: version 0.4.3 - This is a binary compatible release. - * Android / gcc / iOS / MSVS build fixes and improvements - * lossless decode fix (issue #239 -- since 0.4.0) - * documentation / vwebp updates for animation - * multi-threading fix (issue #234) - -- 10/13/14: version 0.4.2 - This is a binary compatible release. - * Android / gcc build fixes - * (Windows) fix reading from stdin and writing to stdout - * gif2webp: miscellaneous fixes - * fix 'alpha-leak' with lossy compression (issue #220) - * the lossless bitstream spec has been amended to reflect the current code - -- 7/24/14: version 0.4.1 - This is a binary compatible release. - * AArch64 (arm64) & MIPS support/optimizations - * NEON assembly additions: - - ~25% faster lossy decode / encode (-m 4) - - ~10% faster lossless decode - - ~5-10% faster lossless encode (-m 3/4) - * dwebp/vwebp can read from stdin - * cwebp/gif2webp can write to stdout - * cwebp can read webp files; useful if storing sources as webp lossless - -- 12/19/13: version 0.4.0 - * improved gif2webp tool - * numerous fixes, compression improvement and speed-up - * dither option added to decoder (dwebp -dither 50 ...) - * improved multi-threaded modes (-mt option) - * improved filtering strength determination - * New function: WebPMuxGetCanvasSize - * BMP and TIFF format output added to 'dwebp' - * Significant memory reduction for decoding lossy images with alpha. - * Intertwined decoding of RGB and alpha for a shorter - time-to-first-decoded-pixel. - * WebPIterator has a new member 'has_alpha' denoting whether the frame - contains transparency. - * Container spec amended with new 'blending method' for animation. - -- 6/13/13: version 0.3.1 - This is a binary compatible release. - * Add incremental decoding support for images containing ALPH and ICCP chunks. - * Python bindings via swig for the simple encode/decode interfaces similar to - Java. - -- 3/20/13: version 0.3.0 - This is a binary compatible release. - * WebPINewRGB/WebPINewYUVA accept being passed a NULL output buffer - and will perform auto-allocation. - * default filter option is now '-strong -f 60' - * encoding speed-up for lossy methods 3 to 6 - * alpha encoding can be done in parallel to lossy using 'cwebp -mt ...' - * color profile, metadata (XMP/EXIF) and animation support finalized in the - container. - * various NEON assembly additions - Tool updates / additions: - * gif2webp added - * vwebp given color profile & animation support - * cwebp can preserve color profile / metadata with '-metadata' - -- 10/30/12: version 0.2.1 - * Various security related fixes - * cwebp.exe: fix import errors on Windows XP - * enable DLL builds for mingw targets - -- 8/3/12: version 0.2.0 - * Add support for ARGB -> YUVA conversion for lossless decoder - New functions: WebPINewYUVA, WebPIDecGetYUVA - * Add stats for lossless and alpha encoding - * Security related hardening: allocation and size checks - * Add PAM output support to dwebp - -- 7/19/12: version 0.1.99 - * This is a pre-release of 0.2.0, not an rc to allow for further - incompatible changes based on user feedback. - * Alpha channel encode/decode support. - * Lossless encoder/decoder. - * Add TIFF input support to cwebp. - Incompatible changes: - * The encode ABI has been modified to support alpha encoding. - * Deprecated function WebPINew() has been removed. - * Decode function signatures have changed to consistently use size_t over - int/uint32_t. - * decode_vp8.h is no longer installed system-wide. - * cwebp will encode the alpha channel if present. - -- 9/19/11: version 0.1.3 - * Advanced decoding APIs. - * On-the-fly cropping and rescaling of images. - * SSE2 instructions for decoding performance optimizations on x86 based - platforms. - * Support Multi-threaded decoding. - * 40% improvement in Decoding performance. - * Add support for RGB565, RGBA4444 & ARGB image colorspace. - * Better handling of large picture encoding. - -- 3/25/11: version 0.1.2 - * Incremental decoding: picture can be decoded byte-by-byte if needs be. - * lot of bug-fixes, consolidation and stabilization - -- 2/23/11: initial release of version 0.1, with the new encoder -- 9/30/10: initial release version with only the lightweight decoder diff --git a/Dependencies/FreeImage/Source/LibWebP/PATENTS b/Dependencies/FreeImage/Source/LibWebP/PATENTS deleted file mode 100644 index e1a8d63..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/PATENTS +++ /dev/null @@ -1,23 +0,0 @@ -Additional IP Rights Grant (Patents) ------------------------------------- - -"These implementations" means the copyrightable works that implement the WebM -codecs distributed by Google as part of the WebM Project. - -Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge, -royalty-free, irrevocable (except as stated in this section) patent license to -make, have made, use, offer to sell, sell, import, transfer, and otherwise -run, modify and propagate the contents of these implementations of WebM, where -such license applies only to those patent claims, both currently owned by -Google and acquired in the future, licensable by Google that are necessarily -infringed by these implementations of WebM. This grant does not include claims -that would be infringed only as a consequence of further modification of these -implementations. If you or your agent or exclusive licensee institute or order -or agree to the institution of patent litigation or any other patent -enforcement activity against any entity (including a cross-claim or -counterclaim in a lawsuit) alleging that any of these implementations of WebM -or any code incorporated within any of these implementations of WebM -constitute direct or contributory patent infringement, or inducement of -patent infringement, then any patent rights granted to you under this License -for these implementations of WebM shall terminate as of the date such -litigation is filed. diff --git a/Dependencies/FreeImage/Source/LibWebP/README b/Dependencies/FreeImage/Source/LibWebP/README deleted file mode 100644 index f4c0f24..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/README +++ /dev/null @@ -1,784 +0,0 @@ - __ __ ____ ____ ____ - / \\/ \/ _ \/ _ )/ _ \ - \ / __/ _ \ __/ - \__\__/\____/\_____/__/ ____ ___ - / _/ / \ \ / _ \/ _/ - / \_/ / / \ \ __/ \__ - \____/____/\_____/_____/____/v1.0.0 - -Description: -============ - -WebP codec: library to encode and decode images in WebP format. This package -contains the library that can be used in other programs to add WebP support, -as well as the command line tools 'cwebp' and 'dwebp'. - -See http://developers.google.com/speed/webp - -The latest source tree is available at -https://chromium.googlesource.com/webm/libwebp - -It is released under the same license as the WebM project. -See http://www.webmproject.org/license/software/ or the -"COPYING" file for details. An additional intellectual -property rights grant can be found in the file PATENTS. - -Building: -========= - -Windows build: --------------- - -By running: - - nmake /f Makefile.vc CFG=release-static RTLIBCFG=static OBJDIR=output - -the directory output\release-static\(x64|x86)\bin will contain the tools -cwebp.exe and dwebp.exe. The directory output\release-static\(x64|x86)\lib will -contain the libwebp static library. -The target architecture (x86/x64) is detected by Makefile.vc from the Visual -Studio compiler (cl.exe) available in the system path. - -Unix build using makefile.unix: -------------------------------- - -On platforms with GNU tools installed (gcc and make), running - - make -f makefile.unix - -will build the binaries examples/cwebp and examples/dwebp, along -with the static library src/libwebp.a. No system-wide installation -is supplied, as this is a simple alternative to the full installation -system based on the autoconf tools (see below). -Please refer to makefile.unix for additional details and customizations. - -Using autoconf tools: ---------------------- -Prerequisites: -A compiler (e.g., gcc), make, autoconf, automake, libtool. -On a Debian-like system the following should install everything you need for a -minimal build: -$ sudo apt-get install gcc make autoconf automake libtool - -When building from git sources, you will need to run autogen.sh to generate the -configure script. - -./configure -make -make install - -should be all you need to have the following files - -/usr/local/include/webp/decode.h -/usr/local/include/webp/encode.h -/usr/local/include/webp/types.h -/usr/local/lib/libwebp.* -/usr/local/bin/cwebp -/usr/local/bin/dwebp - -installed. - -Note: A decode-only library, libwebpdecoder, is available using the -'--enable-libwebpdecoder' flag. The encode library is built separately and can -be installed independently using a minor modification in the corresponding -Makefile.am configure files (see comments there). See './configure --help' for -more options. - -Building for MIPS Linux: ------------------------- -MIPS Linux toolchain stable available releases can be found at: -https://community.imgtec.com/developers/mips/tools/codescape-mips-sdk/available-releases/ - -# Add toolchain to PATH -export PATH=$PATH:/path/to/toolchain/bin - -# 32-bit build for mips32r5 (p5600) -HOST=mips-mti-linux-gnu -MIPS_CFLAGS="-O3 -mips32r5 -mabi=32 -mtune=p5600 -mmsa -mfp64 \ - -msched-weight -mload-store-pairs -fPIE" -MIPS_LDFLAGS="-mips32r5 -mabi=32 -mmsa -mfp64 -pie" - -# 64-bit build for mips64r6 (i6400) -HOST=mips-img-linux-gnu -MIPS_CFLAGS="-O3 -mips64r6 -mabi=64 -mtune=i6400 -mmsa -mfp64 \ - -msched-weight -mload-store-pairs -fPIE" -MIPS_LDFLAGS="-mips64r6 -mabi=64 -mmsa -mfp64 -pie" - -./configure --host=${HOST} --build=`config.guess` \ - CC="${HOST}-gcc -EL" \ - CFLAGS="$MIPS_CFLAGS" \ - LDFLAGS="$MIPS_LDFLAGS" -make -make install - -CMake: ------- -With CMake, you can compile libwebp, cwebp, dwebp, gif2web, img2webp, webpinfo -and the JS bindings. - -Prerequisites: -A compiler (e.g., gcc with autotools) and CMake. -On a Debian-like system the following should install everything you need for a -minimal build: -$ sudo apt-get install build-essential cmake - -When building from git sources, you will need to run cmake to generate the -makefiles. - -mkdir build && cd build && cmake ../ -make -make install - -If you also want any of the executables, you will need to enable them through -CMake, e.g.: - -cmake -DWEBP_BUILD_CWEBP=ON -DWEBP_BUILD_DWEBP=ON ../ - -or through your favorite interface (like ccmake or cmake-qt-gui). - -Finally, once installed, you can also use WebP in your CMake project by doing: - -find_package(WebP) - -which will define the CMake variables WebP_INCLUDE_DIRS and WebP_LIBRARIES. - -Gradle: -------- -The support for Gradle is minimal: it only helps you compile libwebp, cwebp and -dwebp and webpmux_example. - -Prerequisites: -A compiler (e.g., gcc with autotools) and gradle. -On a Debian-like system the following should install everything you need for a -minimal build: -$ sudo apt-get install build-essential gradle - -When building from git sources, you will need to run the Gradle wrapper with the -appropriate target, e.g. : - -./gradlew buildAllExecutables - -SWIG bindings: --------------- - -To generate language bindings from swig/libwebp.swig at least swig-1.3 -(http://www.swig.org) is required. - -Currently the following functions are mapped: -Decode: - WebPGetDecoderVersion - WebPGetInfo - WebPDecodeRGBA - WebPDecodeARGB - WebPDecodeBGRA - WebPDecodeBGR - WebPDecodeRGB - -Encode: - WebPGetEncoderVersion - WebPEncodeRGBA - WebPEncodeBGRA - WebPEncodeRGB - WebPEncodeBGR - WebPEncodeLosslessRGBA - WebPEncodeLosslessBGRA - WebPEncodeLosslessRGB - WebPEncodeLosslessBGR - -See swig/README for more detailed build instructions. - -Java bindings: - -To build the swig-generated JNI wrapper code at least JDK-1.5 (or equivalent) -is necessary for enum support. The output is intended to be a shared object / -DLL that can be loaded via System.loadLibrary("webp_jni"). - -Python bindings: - -To build the swig-generated Python extension code at least Python 2.6 is -required. Python < 2.6 may build with some minor changes to libwebp.swig or the -generated code, but is untested. - -Encoding tool: -============== - -The examples/ directory contains tools for encoding (cwebp) and -decoding (dwebp) images. - -The easiest use should look like: - cwebp input.png -q 80 -o output.webp -which will convert the input file to a WebP file using a quality factor of 80 -on a 0->100 scale (0 being the lowest quality, 100 being the best. Default -value is 75). -You might want to try the -lossless flag too, which will compress the source -(in RGBA format) without any loss. The -q quality parameter will in this case -control the amount of processing time spent trying to make the output file as -small as possible. - -A longer list of options is available using the -longhelp command line flag: - -> cwebp -longhelp -Usage: - cwebp [-preset <...>] [options] in_file [-o out_file] - -If input size (-s) for an image is not specified, it is -assumed to be a PNG, JPEG, TIFF or WebP file. - -Options: - -h / -help ............. short help - -H / -longhelp ......... long help - -q ............. quality factor (0:small..100:big), default=75 - -alpha_q ......... transparency-compression quality (0..100), - default=100 - -preset ....... preset setting, one of: - default, photo, picture, - drawing, icon, text - -preset must come first, as it overwrites other parameters - -z ............... activates lossless preset with given - level in [0:fast, ..., 9:slowest] - - -m ............... compression method (0=fast, 6=slowest), default=4 - -segments ........ number of segments to use (1..4), default=4 - -size ............ target size (in bytes) - -psnr .......... target PSNR (in dB. typically: 42) - - -s ......... input size (width x height) for YUV - -sns ............. spatial noise shaping (0:off, 100:max), default=50 - -f ............... filter strength (0=off..100), default=60 - -sharpness ....... filter sharpness (0:most .. 7:least sharp), default=0 - -strong ................ use strong filter instead of simple (default) - -nostrong .............. use simple filter instead of strong - -sharp_yuv ............. use sharper (and slower) RGB->YUV conversion - -partition_limit . limit quality to fit the 512k limit on - the first partition (0=no degradation ... 100=full) - -pass ............ analysis pass number (1..10) - -crop .. crop picture with the given rectangle - -resize ........ resize picture (after any cropping) - -mt .................... use multi-threading if available - -low_memory ............ reduce memory usage (slower encoding) - -map ............. print map of extra info - -print_psnr ............ prints averaged PSNR distortion - -print_ssim ............ prints averaged SSIM distortion - -print_lsim ............ prints local-similarity distortion - -d .......... dump the compressed output (PGM file) - -alpha_method .... transparency-compression method (0..1), default=1 - -alpha_filter . predictive filtering for alpha plane, - one of: none, fast (default) or best - -exact ................. preserve RGB values in transparent area, default=off - -blend_alpha ..... blend colors against background color - expressed as RGB values written in - hexadecimal, e.g. 0xc0e0d0 for red=0xc0 - green=0xe0 and blue=0xd0 - -noalpha ............... discard any transparency information - -lossless .............. encode image losslessly, default=off - -near_lossless ... use near-lossless image - preprocessing (0..100=off), default=100 - -hint ......... specify image characteristics hint, - one of: photo, picture or graph - - -metadata ..... comma separated list of metadata to - copy from the input to the output if present. - Valid values: all, none (default), exif, icc, xmp - - -short ................. condense printed message - -quiet ................. don't print anything - -version ............... print version number and exit - -noasm ................. disable all assembly optimizations - -v ..................... verbose, e.g. print encoding/decoding times - -progress .............. report encoding progress - -Experimental Options: - -jpeg_like ............. roughly match expected JPEG size - -af .................... auto-adjust filter strength - -pre ............. pre-processing filter - -The main options you might want to try in order to further tune the -visual quality are: - -preset - -sns - -f - -m - -Namely: - * 'preset' will set up a default encoding configuration targeting a - particular type of input. It should appear first in the list of options, - so that subsequent options can take effect on top of this preset. - Default value is 'default'. - * 'sns' will progressively turn on (when going from 0 to 100) some additional - visual optimizations (like: segmentation map re-enforcement). This option - will balance the bit allocation differently. It tries to take bits from the - "easy" parts of the picture and use them in the "difficult" ones instead. - Usually, raising the sns value (at fixed -q value) leads to larger files, - but with better quality. - Typical value is around '75'. - * 'f' option directly links to the filtering strength used by the codec's - in-loop processing. The higher the value, the smoother the - highly-compressed area will look. This is particularly useful when aiming - at very small files. Typical values are around 20-30. Note that using the - option -strong/-nostrong will change the type of filtering. Use "-f 0" to - turn filtering off. - * 'm' controls the trade-off between encoding speed and quality. Default is 4. - You can try -m 5 or -m 6 to explore more (time-consuming) encoding - possibilities. A lower value will result in faster encoding at the expense - of quality. - -Decoding tool: -============== - -There is a decoding sample in examples/dwebp.c which will take -a .webp file and decode it to a PNG image file (amongst other formats). -This is simply to demonstrate the use of the API. You can verify the -file test.webp decodes to exactly the same as test_ref.ppm by using: - - cd examples - ./dwebp test.webp -ppm -o test.ppm - diff test.ppm test_ref.ppm - -The full list of options is available using -h: - -> dwebp -h -Usage: dwebp in_file [options] [-o out_file] - -Decodes the WebP image file to PNG format [Default] -Use following options to convert into alternate image formats: - -pam ......... save the raw RGBA samples as a color PAM - -ppm ......... save the raw RGB samples as a color PPM - -bmp ......... save as uncompressed BMP format - -tiff ........ save as uncompressed TIFF format - -pgm ......... save the raw YUV samples as a grayscale PGM - file with IMC4 layout - -yuv ......... save the raw YUV samples in flat layout - - Other options are: - -version ..... print version number and exit - -nofancy ..... don't use the fancy YUV420 upscaler - -nofilter .... disable in-loop filtering - -nodither .... disable dithering - -dither .. dithering strength (in 0..100) - -alpha_dither use alpha-plane dithering if needed - -mt .......... use multi-threading - -crop ... crop output with the given rectangle - -resize ......... scale the output (*after* any cropping) - -flip ........ flip the output vertically - -alpha ....... only save the alpha plane - -incremental . use incremental decoding (useful for tests) - -h ........... this help message - -v ........... verbose (e.g. print encoding/decoding times) - -quiet ....... quiet mode, don't print anything - -noasm ....... disable all assembly optimizations - -WebP file analysis tool: -======================== - -'webpinfo' can be used to print out the chunk level structure and bitstream -header information of WebP files. It can also check if the files are of valid -WebP format. - -Usage: webpinfo [options] in_files -Note: there could be multiple input files; - options must come before input files. -Options: - -version ........... Print version number and exit. - -quiet ............. Do not show chunk parsing information. - -diag .............. Show parsing error diagnosis. - -summary ........... Show chunk stats summary. - -bitstream_info .... Parse bitstream header. - -Visualization tool: -=================== - -There's a little self-serve visualization tool called 'vwebp' under the -examples/ directory. It uses OpenGL to open a simple drawing window and show -a decoded WebP file. It's not yet integrated in the automake build system, but -you can try to manually compile it using the recommendations below. - -Usage: vwebp in_file [options] - -Decodes the WebP image file and visualize it using OpenGL -Options are: - -version ..... print version number and exit - -noicc ....... don't use the icc profile if present - -nofancy ..... don't use the fancy YUV420 upscaler - -nofilter .... disable in-loop filtering - -dither dithering strength (0..100), default=50 - -noalphadither disable alpha plane dithering - -usebgcolor .. display background color - -mt .......... use multi-threading - -info ........ print info - -h ........... this help message - -Keyboard shortcuts: - 'c' ................ toggle use of color profile - 'b' ................ toggle background color display - 'i' ................ overlay file information - 'd' ................ disable blending & disposal (debug) - 'q' / 'Q' / ESC .... quit - -Building: ---------- - -Prerequisites: -1) OpenGL & OpenGL Utility Toolkit (GLUT) - Linux: - $ sudo apt-get install freeglut3-dev mesa-common-dev - Mac + XCode: - - These libraries should be available in the OpenGL / GLUT frameworks. - Windows: - http://freeglut.sourceforge.net/index.php#download - -2) (Optional) qcms (Quick Color Management System) - i. Download qcms from Mozilla / Chromium: - http://hg.mozilla.org/mozilla-central/file/0e7639e3bdfb/gfx/qcms - http://src.chromium.org/viewvc/chrome/trunk/src/third_party/qcms - ii. Build and archive the source files as libqcms.a / qcms.lib - iii. Update makefile.unix / Makefile.vc - a) Define WEBP_HAVE_QCMS - b) Update include / library paths to reference the qcms directory. - -Build using makefile.unix / Makefile.vc: -$ make -f makefile.unix examples/vwebp -> nmake /f Makefile.vc CFG=release-static \ - ../obj/x64/release-static/bin/vwebp.exe - -Animation creation tool: -======================== -The utility 'img2webp' can turn a sequence of input images (PNG, JPEG, ...) -into an animated WebP file. It offers fine control over duration, encoding -modes, etc. - -Usage: - - img2webp [file-level options] [image files...] [per-frame options...] - -File-level options (only used at the start of compression): - -min_size ............ minimize size - -loop .......... loop count (default: 0, = infinite loop) - -kmax .......... maximum number of frame between key-frames - (0=only keyframes) - -kmin .......... minimum number of frame between key-frames - (0=disable key-frames altogether) - -mixed ............... use mixed lossy/lossless automatic mode - -v ................... verbose mode - -h ................... this help - -version ............. print version number and exit - -Per-frame options (only used for subsequent images input): - -d ............. frame duration in ms (default: 100) - -lossless ........... use lossless mode (default) - -lossy ... ........... use lossy mode - -q ........... quality - -m ............. method to use - -example: img2webp -loop 2 in0.png -lossy in1.jpg - -d 80 in2.tiff -o out.webp - -Animated GIF conversion: -======================== -Animated GIF files can be converted to WebP files with animation using the -gif2webp utility available under examples/. The files can then be viewed using -vwebp. - -Usage: - gif2webp [options] gif_file -o webp_file -Options: - -h / -help ............. this help - -lossy ................. encode image using lossy compression - -mixed ................. for each frame in the image, pick lossy - or lossless compression heuristically - -q ............. quality factor (0:small..100:big) - -m ............... compression method (0=fast, 6=slowest) - -min_size .............. minimize output size (default:off) - lossless compression by default; can be - combined with -q, -m, -lossy or -mixed - options - -kmin ............ min distance between key frames - -kmax ............ max distance between key frames - -f ............... filter strength (0=off..100) - -metadata ..... comma separated list of metadata to - copy from the input to the output if present - Valid values: all, none, icc, xmp (default) - -loop_compatibility .... use compatibility mode for Chrome - version prior to M62 (inclusive) - -mt .................... use multi-threading if available - - -version ............... print version number and exit - -v ..................... verbose - -quiet ................. don't print anything - -Building: ---------- -With the libgif development files installed, gif2webp can be built using -makefile.unix: -$ make -f makefile.unix examples/gif2webp - -or using autoconf: -$ ./configure --enable-everything -$ make - -Comparison of animated images: -============================== -Test utility anim_diff under examples/ can be used to compare two animated -images (each can be GIF or WebP). - -Usage: anim_diff [options] - -Options: - -dump_frames dump decoded frames in PAM format - -min_psnr ... minimum per-frame PSNR - -raw_comparison ..... if this flag is not used, RGB is - premultiplied before comparison - -max_diff ..... maximum allowed difference per channel - between corresponding pixels in subsequent - frames - -h .................. this help - -version ............ print version number and exit - -Building: ---------- -With the libgif development files and a C++ compiler installed, anim_diff can -be built using makefile.unix: -$ make -f makefile.unix examples/anim_diff - -or using autoconf: -$ ./configure --enable-everything -$ make - -Encoding API: -============= - -The main encoding functions are available in the header src/webp/encode.h -The ready-to-use ones are: -size_t WebPEncodeRGB(const uint8_t* rgb, int width, int height, int stride, - float quality_factor, uint8_t** output); -size_t WebPEncodeBGR(const uint8_t* bgr, int width, int height, int stride, - float quality_factor, uint8_t** output); -size_t WebPEncodeRGBA(const uint8_t* rgba, int width, int height, int stride, - float quality_factor, uint8_t** output); -size_t WebPEncodeBGRA(const uint8_t* bgra, int width, int height, int stride, - float quality_factor, uint8_t** output); - -They will convert raw RGB samples to a WebP data. The only control supplied -is the quality factor. - -There are some variants for using the lossless format: - -size_t WebPEncodeLosslessRGB(const uint8_t* rgb, int width, int height, - int stride, uint8_t** output); -size_t WebPEncodeLosslessBGR(const uint8_t* bgr, int width, int height, - int stride, uint8_t** output); -size_t WebPEncodeLosslessRGBA(const uint8_t* rgba, int width, int height, - int stride, uint8_t** output); -size_t WebPEncodeLosslessBGRA(const uint8_t* bgra, int width, int height, - int stride, uint8_t** output); - -Of course in this case, no quality factor is needed since the compression -occurs without loss of the input values, at the expense of larger output sizes. - -Advanced encoding API: ----------------------- - -A more advanced API is based on the WebPConfig and WebPPicture structures. - -WebPConfig contains the encoding settings and is not tied to a particular -picture. -WebPPicture contains input data, on which some WebPConfig will be used for -compression. -The encoding flow looks like: - --------------------------------------- BEGIN PSEUDO EXAMPLE - -#include - - // Setup a config, starting form a preset and tuning some additional - // parameters - WebPConfig config; - if (!WebPConfigPreset(&config, WEBP_PRESET_PHOTO, quality_factor)) - return 0; // version error - } - // ... additional tuning - config.sns_strength = 90; - config.filter_sharpness = 6; - config_error = WebPValidateConfig(&config); // not mandatory, but useful - - // Setup the input data - WebPPicture pic; - if (!WebPPictureInit(&pic)) { - return 0; // version error - } - pic.width = width; - pic.height = height; - // allocated picture of dimension width x height - if (!WebPPictureAllocate(&pic)) { - return 0; // memory error - } - // at this point, 'pic' has been initialized as a container, - // and can receive the Y/U/V samples. - // Alternatively, one could use ready-made import functions like - // WebPPictureImportRGB(), which will take care of memory allocation. - // In any case, past this point, one will have to call - // WebPPictureFree(&pic) to reclaim memory. - - // Set up a byte-output write method. WebPMemoryWriter, for instance. - WebPMemoryWriter wrt; - WebPMemoryWriterInit(&wrt); // initialize 'wrt' - - pic.writer = MyFileWriter; - pic.custom_ptr = my_opaque_structure_to_make_MyFileWriter_work; - - // Compress! - int ok = WebPEncode(&config, &pic); // ok = 0 => error occurred! - WebPPictureFree(&pic); // must be called independently of the 'ok' result. - - // output data should have been handled by the writer at that point. - // -> compressed data is the memory buffer described by wrt.mem / wrt.size - - // deallocate the memory used by compressed data - WebPMemoryWriterClear(&wrt); - --------------------------------------- END PSEUDO EXAMPLE - -Decoding API: -============= - -This is mainly just one function to call: - -#include "webp/decode.h" -uint8_t* WebPDecodeRGB(const uint8_t* data, size_t data_size, - int* width, int* height); - -Please have a look at the file src/webp/decode.h for the details. -There are variants for decoding in BGR/RGBA/ARGB/BGRA order, along with -decoding to raw Y'CbCr samples. One can also decode the image directly into a -pre-allocated buffer. - -To detect a WebP file and gather the picture's dimensions, the function: - int WebPGetInfo(const uint8_t* data, size_t data_size, - int* width, int* height); -is supplied. No decoding is involved when using it. - -Incremental decoding API: -========================= - -In the case when data is being progressively transmitted, pictures can still -be incrementally decoded using a slightly more complicated API. Decoder state -is stored into an instance of the WebPIDecoder object. This object can be -created with the purpose of decoding either RGB or Y'CbCr samples. -For instance: - - WebPDecBuffer buffer; - WebPInitDecBuffer(&buffer); - buffer.colorspace = MODE_BGR; - ... - WebPIDecoder* idec = WebPINewDecoder(&buffer); - -As data is made progressively available, this incremental-decoder object -can be used to decode the picture further. There are two (mutually exclusive) -ways to pass freshly arrived data: - -either by appending the fresh bytes: - - WebPIAppend(idec, fresh_data, size_of_fresh_data); - -or by just mentioning the new size of the transmitted data: - - WebPIUpdate(idec, buffer, size_of_transmitted_buffer); - -Note that 'buffer' can be modified between each call to WebPIUpdate, in -particular when the buffer is resized to accommodate larger data. - -These functions will return the decoding status: either VP8_STATUS_SUSPENDED if -decoding is not finished yet or VP8_STATUS_OK when decoding is done. Any other -status is an error condition. - -The 'idec' object must always be released (even upon an error condition) by -calling: WebPDelete(idec). - -To retrieve partially decoded picture samples, one must use the corresponding -method: WebPIDecGetRGB or WebPIDecGetYUVA. -It will return the last displayable pixel row. - -Lastly, note that decoding can also be performed into a pre-allocated pixel -buffer. This buffer must be passed when creating a WebPIDecoder, calling -WebPINewRGB() or WebPINewYUVA(). - -Please have a look at the src/webp/decode.h header for further details. - -Advanced Decoding API: -====================== - -WebP decoding supports an advanced API which provides on-the-fly cropping and -rescaling, something of great usefulness on memory-constrained environments like -mobile phones. Basically, the memory usage will scale with the output's size, -not the input's, when one only needs a quick preview or a zoomed in portion of -an otherwise too-large picture. Some CPU can be saved too, incidentally. - --------------------------------------- BEGIN PSEUDO EXAMPLE - // A) Init a configuration object - WebPDecoderConfig config; - CHECK(WebPInitDecoderConfig(&config)); - - // B) optional: retrieve the bitstream's features. - CHECK(WebPGetFeatures(data, data_size, &config.input) == VP8_STATUS_OK); - - // C) Adjust 'config' options, if needed - config.options.no_fancy_upsampling = 1; - config.options.use_scaling = 1; - config.options.scaled_width = scaledWidth(); - config.options.scaled_height = scaledHeight(); - // etc. - - // D) Specify 'config' output options for specifying output colorspace. - // Optionally the external image decode buffer can also be specified. - config.output.colorspace = MODE_BGRA; - // Optionally, the config.output can be pointed to an external buffer as - // well for decoding the image. This externally supplied memory buffer - // should be big enough to store the decoded picture. - config.output.u.RGBA.rgba = (uint8_t*) memory_buffer; - config.output.u.RGBA.stride = scanline_stride; - config.output.u.RGBA.size = total_size_of_the_memory_buffer; - config.output.is_external_memory = 1; - - // E) Decode the WebP image. There are two variants w.r.t decoding image. - // The first one (E.1) decodes the full image and the second one (E.2) is - // used to incrementally decode the image using small input buffers. - // Any one of these steps can be used to decode the WebP image. - - // E.1) Decode full image. - CHECK(WebPDecode(data, data_size, &config) == VP8_STATUS_OK); - - // E.2) Decode image incrementally. - WebPIDecoder* const idec = WebPIDecode(NULL, NULL, &config); - CHECK(idec != NULL); - while (bytes_remaining > 0) { - VP8StatusCode status = WebPIAppend(idec, input, bytes_read); - if (status == VP8_STATUS_OK || status == VP8_STATUS_SUSPENDED) { - bytes_remaining -= bytes_read; - } else { - break; - } - } - WebPIDelete(idec); - - // F) Decoded image is now in config.output (and config.output.u.RGBA). - // It can be saved, displayed or otherwise processed. - - // G) Reclaim memory allocated in config's object. It's safe to call - // this function even if the memory is external and wasn't allocated - // by WebPDecode(). - WebPFreeDecBuffer(&config.output); - --------------------------------------- END PSEUDO EXAMPLE - -Bugs: -===== - -Please report all bugs to the issue tracker: - https://bugs.chromium.org/p/webp -Patches welcome! See this page to get started: - http://www.webmproject.org/code/contribute/submitting-patches/ - -Discuss: -======== - -Email: webp-discuss@webmproject.org -Web: http://groups.google.com/a/webmproject.org/group/webp-discuss diff --git a/Dependencies/FreeImage/Source/LibWebP/README.mux b/Dependencies/FreeImage/Source/LibWebP/README.mux deleted file mode 100644 index 1d98fdb..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/README.mux +++ /dev/null @@ -1,227 +0,0 @@ - __ __ ____ ____ ____ __ __ _ __ __ - / \\/ \/ _ \/ _ \/ _ \/ \ \/ \___/_ / _\ - \ / __/ _ \ __/ / / (_/ /__ - \__\__/\_____/_____/__/ \__//_/\_____/__/___/v1.0.0 - - -Description: -============ - -WebPMux: set of two libraries 'Mux' and 'Demux' for creation, extraction and -manipulation of an extended format WebP file, which can have features like -color profile, metadata and animation. Reference command-line tools 'webpmux' -and 'vwebp' as well as the WebP container specification -'doc/webp-container-spec.txt' are also provided in this package. - -WebP Mux tool: -============== - -The examples/ directory contains a tool (webpmux) for manipulating WebP -files. The webpmux tool can be used to create an extended format WebP file and -also to extract or strip relevant data from such a file. - -A list of options is available using the -help command line flag: - -> webpmux -help -Usage: webpmux -get GET_OPTIONS INPUT -o OUTPUT - webpmux -set SET_OPTIONS INPUT -o OUTPUT - webpmux -duration DURATION_OPTIONS [-duration ...] - INPUT -o OUTPUT - webpmux -strip STRIP_OPTIONS INPUT -o OUTPUT - webpmux -frame FRAME_OPTIONS [-frame...] [-loop LOOP_COUNT] - [-bgcolor BACKGROUND_COLOR] -o OUTPUT - webpmux -info INPUT - webpmux [-h|-help] - webpmux -version - webpmux argument_file_name - -GET_OPTIONS: - Extract relevant data: - icc get ICC profile - exif get EXIF metadata - xmp get XMP metadata - frame n get nth frame - -SET_OPTIONS: - Set color profile/metadata: - icc file.icc set ICC profile - exif file.exif set EXIF metadata - xmp file.xmp set XMP metadata - where: 'file.icc' contains the ICC profile to be set, - 'file.exif' contains the EXIF metadata to be set - 'file.xmp' contains the XMP metadata to be set - -DURATION_OPTIONS: - Set duration of selected frames: - duration set duration for each frames - duration,frame set duration of a particular frame - duration,start,end set duration of frames in the - interval [start,end]) - where: 'duration' is the duration in milliseconds - 'start' is the start frame index - 'end' is the inclusive end frame index - The special 'end' value '0' means: last frame. - -STRIP_OPTIONS: - Strip color profile/metadata: - icc strip ICC profile - exif strip EXIF metadata - xmp strip XMP metadata - -FRAME_OPTIONS(i): - Create animation: - file_i +di+[xi+yi[+mi[bi]]] - where: 'file_i' is the i'th animation frame (WebP format), - 'di' is the pause duration before next frame, - 'xi','yi' specify the image offset for this frame, - 'mi' is the dispose method for this frame (0 or 1), - 'bi' is the blending method for this frame (+b or -b) - -LOOP_COUNT: - Number of times to repeat the animation. - Valid range is 0 to 65535 [Default: 0 (infinite)]. - -BACKGROUND_COLOR: - Background color of the canvas. - A,R,G,B - where: 'A', 'R', 'G' and 'B' are integers in the range 0 to 255 specifying - the Alpha, Red, Green and Blue component values respectively - [Default: 255,255,255,255] - -INPUT & OUTPUT are in WebP format. - -Note: The nature of EXIF, XMP and ICC data is not checked and is assumed to be -valid. - -Note: if a single file name is passed as the argument, the arguments will be -tokenized from this file. The file name must not start with the character '-'. - -Visualization tool: -=================== - -The examples/ directory also contains a tool (vwebp) for viewing WebP files. -It decodes the image and visualizes it using OpenGL. See the libwebp README -for details on building and running this program. - -Mux API: -======== -The Mux API contains methods for adding data to and reading data from WebP -files. This API currently supports XMP/EXIF metadata, ICC profile and animation. -Other features may be added in subsequent releases. - -Example#1 (pseudo code): Creating a WebPMux object with image data, color -profile and XMP metadata. - - int copy_data = 0; - WebPMux* mux = WebPMuxNew(); - // ... (Prepare image data). - WebPMuxSetImage(mux, &image, copy_data); - // ... (Prepare ICC profile data). - WebPMuxSetChunk(mux, "ICCP", &icc_profile, copy_data); - // ... (Prepare XMP metadata). - WebPMuxSetChunk(mux, "XMP ", &xmp, copy_data); - // Get data from mux in WebP RIFF format. - WebPMuxAssemble(mux, &output_data); - WebPMuxDelete(mux); - // ... (Consume output_data; e.g. write output_data.bytes to file). - WebPDataClear(&output_data); - - -Example#2 (pseudo code): Get image and color profile data from a WebP file. - - int copy_data = 0; - // ... (Read data from file). - WebPMux* mux = WebPMuxCreate(&data, copy_data); - WebPMuxGetFrame(mux, 1, &image); - // ... (Consume image; e.g. call WebPDecode() to decode the data). - WebPMuxGetChunk(mux, "ICCP", &icc_profile); - // ... (Consume icc_profile). - WebPMuxDelete(mux); - free(data); - - -For a detailed Mux API reference, please refer to the header file -(src/webp/mux.h). - -Demux API: -========== -The Demux API enables extraction of images and extended format data from -WebP files. This API currently supports reading of XMP/EXIF metadata, ICC -profile and animated images. Other features may be added in subsequent -releases. - -Code example: Demuxing WebP data to extract all the frames, ICC profile -and EXIF/XMP metadata. - - WebPDemuxer* demux = WebPDemux(&webp_data); - uint32_t width = WebPDemuxGetI(demux, WEBP_FF_CANVAS_WIDTH); - uint32_t height = WebPDemuxGetI(demux, WEBP_FF_CANVAS_HEIGHT); - // ... (Get information about the features present in the WebP file). - uint32_t flags = WebPDemuxGetI(demux, WEBP_FF_FORMAT_FLAGS); - - // ... (Iterate over all frames). - WebPIterator iter; - if (WebPDemuxGetFrame(demux, 1, &iter)) { - do { - // ... (Consume 'iter'; e.g. Decode 'iter.fragment' with WebPDecode(), - // ... and get other frame properties like width, height, offsets etc. - // ... see 'struct WebPIterator' below for more info). - } while (WebPDemuxNextFrame(&iter)); - WebPDemuxReleaseIterator(&iter); - } - - // ... (Extract metadata). - WebPChunkIterator chunk_iter; - if (flags & ICCP_FLAG) WebPDemuxGetChunk(demux, "ICCP", 1, &chunk_iter); - // ... (Consume the ICC profile in 'chunk_iter.chunk'). - WebPDemuxReleaseChunkIterator(&chunk_iter); - if (flags & EXIF_FLAG) WebPDemuxGetChunk(demux, "EXIF", 1, &chunk_iter); - // ... (Consume the EXIF metadata in 'chunk_iter.chunk'). - WebPDemuxReleaseChunkIterator(&chunk_iter); - if (flags & XMP_FLAG) WebPDemuxGetChunk(demux, "XMP ", 1, &chunk_iter); - // ... (Consume the XMP metadata in 'chunk_iter.chunk'). - WebPDemuxReleaseChunkIterator(&chunk_iter); - WebPDemuxDelete(demux); - - -For a detailed Demux API reference, please refer to the header file -(src/webp/demux.h). - -AnimEncoder API: -================ -The AnimEncoder API can be used to create animated WebP images. - -Code example: - - WebPAnimEncoderOptions enc_options; - WebPAnimEncoderOptionsInit(&enc_options); - // ... (Tune 'enc_options' as needed). - WebPAnimEncoder* enc = WebPAnimEncoderNew(width, height, &enc_options); - while() { - WebPConfig config; - WebPConfigInit(&config); - // ... (Tune 'config' as needed). - WebPAnimEncoderAdd(enc, frame, duration, &config); - } - WebPAnimEncoderAssemble(enc, webp_data); - WebPAnimEncoderDelete(enc); - // ... (Write the 'webp_data' to a file, or re-mux it further). - - -For a detailed AnimEncoder API reference, please refer to the header file -(src/webp/mux.h). - - -Bugs: -===== - -Please report all bugs to the issue tracker: - https://bugs.chromium.org/p/webp -Patches welcome! See this page to get started: - http://www.webmproject.org/code/contribute/submitting-patches/ - -Discuss: -======== - -Email: webp-discuss@webmproject.org -Web: http://groups.google.com/a/webmproject.org/group/webp-discuss diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/alpha_dec.c b/Dependencies/FreeImage/Source/LibWebP/src/dec/alpha_dec.c deleted file mode 100644 index e189b0c..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/alpha_dec.c +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Alpha-plane decompression. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include "src/dec/alphai_dec.h" -#include "src/dec/vp8i_dec.h" -#include "src/dec/vp8li_dec.h" -#include "src/dsp/dsp.h" -#include "src/utils/quant_levels_dec_utils.h" -#include "src/utils/utils.h" -#include "src/webp/format_constants.h" - -//------------------------------------------------------------------------------ -// ALPHDecoder object. - -// Allocates a new alpha decoder instance. -static ALPHDecoder* ALPHNew(void) { - ALPHDecoder* const dec = (ALPHDecoder*)WebPSafeCalloc(1ULL, sizeof(*dec)); - return dec; -} - -// Clears and deallocates an alpha decoder instance. -static void ALPHDelete(ALPHDecoder* const dec) { - if (dec != NULL) { - VP8LDelete(dec->vp8l_dec_); - dec->vp8l_dec_ = NULL; - WebPSafeFree(dec); - } -} - -//------------------------------------------------------------------------------ -// Decoding. - -// Initialize alpha decoding by parsing the alpha header and decoding the image -// header for alpha data stored using lossless compression. -// Returns false in case of error in alpha header (data too short, invalid -// compression method or filter, error in lossless header data etc). -static int ALPHInit(ALPHDecoder* const dec, const uint8_t* data, - size_t data_size, const VP8Io* const src_io, - uint8_t* output) { - int ok = 0; - const uint8_t* const alpha_data = data + ALPHA_HEADER_LEN; - const size_t alpha_data_size = data_size - ALPHA_HEADER_LEN; - int rsrv; - VP8Io* const io = &dec->io_; - - assert(data != NULL && output != NULL && src_io != NULL); - - VP8FiltersInit(); - dec->output_ = output; - dec->width_ = src_io->width; - dec->height_ = src_io->height; - assert(dec->width_ > 0 && dec->height_ > 0); - - if (data_size <= ALPHA_HEADER_LEN) { - return 0; - } - - dec->method_ = (data[0] >> 0) & 0x03; - dec->filter_ = (WEBP_FILTER_TYPE)((data[0] >> 2) & 0x03); - dec->pre_processing_ = (data[0] >> 4) & 0x03; - rsrv = (data[0] >> 6) & 0x03; - if (dec->method_ < ALPHA_NO_COMPRESSION || - dec->method_ > ALPHA_LOSSLESS_COMPRESSION || - dec->filter_ >= WEBP_FILTER_LAST || - dec->pre_processing_ > ALPHA_PREPROCESSED_LEVELS || - rsrv != 0) { - return 0; - } - - // Copy the necessary parameters from src_io to io - VP8InitIo(io); - WebPInitCustomIo(NULL, io); - io->opaque = dec; - io->width = src_io->width; - io->height = src_io->height; - - io->use_cropping = src_io->use_cropping; - io->crop_left = src_io->crop_left; - io->crop_right = src_io->crop_right; - io->crop_top = src_io->crop_top; - io->crop_bottom = src_io->crop_bottom; - // No need to copy the scaling parameters. - - if (dec->method_ == ALPHA_NO_COMPRESSION) { - const size_t alpha_decoded_size = dec->width_ * dec->height_; - ok = (alpha_data_size >= alpha_decoded_size); - } else { - assert(dec->method_ == ALPHA_LOSSLESS_COMPRESSION); - ok = VP8LDecodeAlphaHeader(dec, alpha_data, alpha_data_size); - } - - return ok; -} - -// Decodes, unfilters and dequantizes *at least* 'num_rows' rows of alpha -// starting from row number 'row'. It assumes that rows up to (row - 1) have -// already been decoded. -// Returns false in case of bitstream error. -static int ALPHDecode(VP8Decoder* const dec, int row, int num_rows) { - ALPHDecoder* const alph_dec = dec->alph_dec_; - const int width = alph_dec->width_; - const int height = alph_dec->io_.crop_bottom; - if (alph_dec->method_ == ALPHA_NO_COMPRESSION) { - int y; - const uint8_t* prev_line = dec->alpha_prev_line_; - const uint8_t* deltas = dec->alpha_data_ + ALPHA_HEADER_LEN + row * width; - uint8_t* dst = dec->alpha_plane_ + row * width; - assert(deltas <= &dec->alpha_data_[dec->alpha_data_size_]); - if (alph_dec->filter_ != WEBP_FILTER_NONE) { - assert(WebPUnfilters[alph_dec->filter_] != NULL); - for (y = 0; y < num_rows; ++y) { - WebPUnfilters[alph_dec->filter_](prev_line, deltas, dst, width); - prev_line = dst; - dst += width; - deltas += width; - } - } else { - for (y = 0; y < num_rows; ++y) { - memcpy(dst, deltas, width * sizeof(*dst)); - prev_line = dst; - dst += width; - deltas += width; - } - } - dec->alpha_prev_line_ = prev_line; - } else { // alph_dec->method_ == ALPHA_LOSSLESS_COMPRESSION - assert(alph_dec->vp8l_dec_ != NULL); - if (!VP8LDecodeAlphaImageStream(alph_dec, row + num_rows)) { - return 0; - } - } - - if (row + num_rows >= height) { - dec->is_alpha_decoded_ = 1; - } - return 1; -} - -static int AllocateAlphaPlane(VP8Decoder* const dec, const VP8Io* const io) { - const int stride = io->width; - const int height = io->crop_bottom; - const uint64_t alpha_size = (uint64_t)stride * height; - assert(dec->alpha_plane_mem_ == NULL); - dec->alpha_plane_mem_ = - (uint8_t*)WebPSafeMalloc(alpha_size, sizeof(*dec->alpha_plane_)); - if (dec->alpha_plane_mem_ == NULL) { - return 0; - } - dec->alpha_plane_ = dec->alpha_plane_mem_; - dec->alpha_prev_line_ = NULL; - return 1; -} - -void WebPDeallocateAlphaMemory(VP8Decoder* const dec) { - assert(dec != NULL); - WebPSafeFree(dec->alpha_plane_mem_); - dec->alpha_plane_mem_ = NULL; - dec->alpha_plane_ = NULL; - ALPHDelete(dec->alph_dec_); - dec->alph_dec_ = NULL; -} - -//------------------------------------------------------------------------------ -// Main entry point. - -const uint8_t* VP8DecompressAlphaRows(VP8Decoder* const dec, - const VP8Io* const io, - int row, int num_rows) { - const int width = io->width; - const int height = io->crop_bottom; - - assert(dec != NULL && io != NULL); - - if (row < 0 || num_rows <= 0 || row + num_rows > height) { - return NULL; // sanity check. - } - - if (!dec->is_alpha_decoded_) { - if (dec->alph_dec_ == NULL) { // Initialize decoder. - dec->alph_dec_ = ALPHNew(); - if (dec->alph_dec_ == NULL) return NULL; - if (!AllocateAlphaPlane(dec, io)) goto Error; - if (!ALPHInit(dec->alph_dec_, dec->alpha_data_, dec->alpha_data_size_, - io, dec->alpha_plane_)) { - goto Error; - } - // if we allowed use of alpha dithering, check whether it's needed at all - if (dec->alph_dec_->pre_processing_ != ALPHA_PREPROCESSED_LEVELS) { - dec->alpha_dithering_ = 0; // disable dithering - } else { - num_rows = height - row; // decode everything in one pass - } - } - - assert(dec->alph_dec_ != NULL); - assert(row + num_rows <= height); - if (!ALPHDecode(dec, row, num_rows)) goto Error; - - if (dec->is_alpha_decoded_) { // finished? - ALPHDelete(dec->alph_dec_); - dec->alph_dec_ = NULL; - if (dec->alpha_dithering_ > 0) { - uint8_t* const alpha = dec->alpha_plane_ + io->crop_top * width - + io->crop_left; - if (!WebPDequantizeLevels(alpha, - io->crop_right - io->crop_left, - io->crop_bottom - io->crop_top, - width, dec->alpha_dithering_)) { - goto Error; - } - } - } - } - - // Return a pointer to the current decoded row. - return dec->alpha_plane_ + row * width; - - Error: - WebPDeallocateAlphaMemory(dec); - return NULL; -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/alphai_dec.h b/Dependencies/FreeImage/Source/LibWebP/src/dec/alphai_dec.h deleted file mode 100644 index da21019..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/alphai_dec.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2013 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Alpha decoder: internal header. -// -// Author: Urvang (urvang@google.com) - -#ifndef WEBP_DEC_ALPHAI_DEC_H_ -#define WEBP_DEC_ALPHAI_DEC_H_ - -#include "src/dec/webpi_dec.h" -#include "src/utils/filters_utils.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct VP8LDecoder; // Defined in dec/vp8li.h. - -typedef struct ALPHDecoder ALPHDecoder; -struct ALPHDecoder { - int width_; - int height_; - int method_; - WEBP_FILTER_TYPE filter_; - int pre_processing_; - struct VP8LDecoder* vp8l_dec_; - VP8Io io_; - int use_8b_decode_; // Although alpha channel requires only 1 byte per - // pixel, sometimes VP8LDecoder may need to allocate - // 4 bytes per pixel internally during decode. - uint8_t* output_; - const uint8_t* prev_line_; // last output row (or NULL) -}; - -//------------------------------------------------------------------------------ -// internal functions. Not public. - -// Deallocate memory associated to dec->alpha_plane_ decoding -void WebPDeallocateAlphaMemory(VP8Decoder* const dec); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_DEC_ALPHAI_DEC_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/buffer_dec.c b/Dependencies/FreeImage/Source/LibWebP/src/dec/buffer_dec.c deleted file mode 100644 index 2a053ba..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/buffer_dec.c +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Everything about WebPDecBuffer -// -// Author: Skal (pascal.massimino@gmail.com) - -#include - -#include "src/dec/vp8i_dec.h" -#include "src/dec/webpi_dec.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ -// WebPDecBuffer - -// Number of bytes per pixel for the different color-spaces. -static const uint8_t kModeBpp[MODE_LAST] = { - 3, 4, 3, 4, 4, 2, 2, - 4, 4, 4, 2, // pre-multiplied modes - 1, 1 }; - -// Check that webp_csp_mode is within the bounds of WEBP_CSP_MODE. -// Convert to an integer to handle both the unsigned/signed enum cases -// without the need for casting to remove type limit warnings. -static int IsValidColorspace(int webp_csp_mode) { - return (webp_csp_mode >= MODE_RGB && webp_csp_mode < MODE_LAST); -} - -// strictly speaking, the very last (or first, if flipped) row -// doesn't require padding. -#define MIN_BUFFER_SIZE(WIDTH, HEIGHT, STRIDE) \ - ((uint64_t)(STRIDE) * ((HEIGHT) - 1) + (WIDTH)) - -static VP8StatusCode CheckDecBuffer(const WebPDecBuffer* const buffer) { - int ok = 1; - const WEBP_CSP_MODE mode = buffer->colorspace; - const int width = buffer->width; - const int height = buffer->height; - if (!IsValidColorspace(mode)) { - ok = 0; - } else if (!WebPIsRGBMode(mode)) { // YUV checks - const WebPYUVABuffer* const buf = &buffer->u.YUVA; - const int uv_width = (width + 1) / 2; - const int uv_height = (height + 1) / 2; - const int y_stride = abs(buf->y_stride); - const int u_stride = abs(buf->u_stride); - const int v_stride = abs(buf->v_stride); - const int a_stride = abs(buf->a_stride); - const uint64_t y_size = MIN_BUFFER_SIZE(width, height, y_stride); - const uint64_t u_size = MIN_BUFFER_SIZE(uv_width, uv_height, u_stride); - const uint64_t v_size = MIN_BUFFER_SIZE(uv_width, uv_height, v_stride); - const uint64_t a_size = MIN_BUFFER_SIZE(width, height, a_stride); - ok &= (y_size <= buf->y_size); - ok &= (u_size <= buf->u_size); - ok &= (v_size <= buf->v_size); - ok &= (y_stride >= width); - ok &= (u_stride >= uv_width); - ok &= (v_stride >= uv_width); - ok &= (buf->y != NULL); - ok &= (buf->u != NULL); - ok &= (buf->v != NULL); - if (mode == MODE_YUVA) { - ok &= (a_stride >= width); - ok &= (a_size <= buf->a_size); - ok &= (buf->a != NULL); - } - } else { // RGB checks - const WebPRGBABuffer* const buf = &buffer->u.RGBA; - const int stride = abs(buf->stride); - const uint64_t size = - MIN_BUFFER_SIZE(width * kModeBpp[mode], height, stride); - ok &= (size <= buf->size); - ok &= (stride >= width * kModeBpp[mode]); - ok &= (buf->rgba != NULL); - } - return ok ? VP8_STATUS_OK : VP8_STATUS_INVALID_PARAM; -} -#undef MIN_BUFFER_SIZE - -static VP8StatusCode AllocateBuffer(WebPDecBuffer* const buffer) { - const int w = buffer->width; - const int h = buffer->height; - const WEBP_CSP_MODE mode = buffer->colorspace; - - if (w <= 0 || h <= 0 || !IsValidColorspace(mode)) { - return VP8_STATUS_INVALID_PARAM; - } - - if (buffer->is_external_memory <= 0 && buffer->private_memory == NULL) { - uint8_t* output; - int uv_stride = 0, a_stride = 0; - uint64_t uv_size = 0, a_size = 0, total_size; - // We need memory and it hasn't been allocated yet. - // => initialize output buffer, now that dimensions are known. - int stride; - uint64_t size; - - if ((uint64_t)w * kModeBpp[mode] >= (1ull << 32)) { - return VP8_STATUS_INVALID_PARAM; - } - stride = w * kModeBpp[mode]; - size = (uint64_t)stride * h; - if (!WebPIsRGBMode(mode)) { - uv_stride = (w + 1) / 2; - uv_size = (uint64_t)uv_stride * ((h + 1) / 2); - if (mode == MODE_YUVA) { - a_stride = w; - a_size = (uint64_t)a_stride * h; - } - } - total_size = size + 2 * uv_size + a_size; - - // Security/sanity checks - output = (uint8_t*)WebPSafeMalloc(total_size, sizeof(*output)); - if (output == NULL) { - return VP8_STATUS_OUT_OF_MEMORY; - } - buffer->private_memory = output; - - if (!WebPIsRGBMode(mode)) { // YUVA initialization - WebPYUVABuffer* const buf = &buffer->u.YUVA; - buf->y = output; - buf->y_stride = stride; - buf->y_size = (size_t)size; - buf->u = output + size; - buf->u_stride = uv_stride; - buf->u_size = (size_t)uv_size; - buf->v = output + size + uv_size; - buf->v_stride = uv_stride; - buf->v_size = (size_t)uv_size; - if (mode == MODE_YUVA) { - buf->a = output + size + 2 * uv_size; - } - buf->a_size = (size_t)a_size; - buf->a_stride = a_stride; - } else { // RGBA initialization - WebPRGBABuffer* const buf = &buffer->u.RGBA; - buf->rgba = output; - buf->stride = stride; - buf->size = (size_t)size; - } - } - return CheckDecBuffer(buffer); -} - -VP8StatusCode WebPFlipBuffer(WebPDecBuffer* const buffer) { - if (buffer == NULL) { - return VP8_STATUS_INVALID_PARAM; - } - if (WebPIsRGBMode(buffer->colorspace)) { - WebPRGBABuffer* const buf = &buffer->u.RGBA; - buf->rgba += (buffer->height - 1) * buf->stride; - buf->stride = -buf->stride; - } else { - WebPYUVABuffer* const buf = &buffer->u.YUVA; - const int H = buffer->height; - buf->y += (H - 1) * buf->y_stride; - buf->y_stride = -buf->y_stride; - buf->u += ((H - 1) >> 1) * buf->u_stride; - buf->u_stride = -buf->u_stride; - buf->v += ((H - 1) >> 1) * buf->v_stride; - buf->v_stride = -buf->v_stride; - if (buf->a != NULL) { - buf->a += (H - 1) * buf->a_stride; - buf->a_stride = -buf->a_stride; - } - } - return VP8_STATUS_OK; -} - -VP8StatusCode WebPAllocateDecBuffer(int width, int height, - const WebPDecoderOptions* const options, - WebPDecBuffer* const buffer) { - VP8StatusCode status; - if (buffer == NULL || width <= 0 || height <= 0) { - return VP8_STATUS_INVALID_PARAM; - } - if (options != NULL) { // First, apply options if there is any. - if (options->use_cropping) { - const int cw = options->crop_width; - const int ch = options->crop_height; - const int x = options->crop_left & ~1; - const int y = options->crop_top & ~1; - if (x < 0 || y < 0 || cw <= 0 || ch <= 0 || - x + cw > width || y + ch > height) { - return VP8_STATUS_INVALID_PARAM; // out of frame boundary. - } - width = cw; - height = ch; - } - - if (options->use_scaling) { -#if !defined(WEBP_REDUCE_SIZE) - int scaled_width = options->scaled_width; - int scaled_height = options->scaled_height; - if (!WebPRescalerGetScaledDimensions( - width, height, &scaled_width, &scaled_height)) { - return VP8_STATUS_INVALID_PARAM; - } - width = scaled_width; - height = scaled_height; -#else - return VP8_STATUS_INVALID_PARAM; // rescaling not supported -#endif - } - } - buffer->width = width; - buffer->height = height; - - // Then, allocate buffer for real. - status = AllocateBuffer(buffer); - if (status != VP8_STATUS_OK) return status; - - // Use the stride trick if vertical flip is needed. - if (options != NULL && options->flip) { - status = WebPFlipBuffer(buffer); - } - return status; -} - -//------------------------------------------------------------------------------ -// constructors / destructors - -int WebPInitDecBufferInternal(WebPDecBuffer* buffer, int version) { - if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) { - return 0; // version mismatch - } - if (buffer == NULL) return 0; - memset(buffer, 0, sizeof(*buffer)); - return 1; -} - -void WebPFreeDecBuffer(WebPDecBuffer* buffer) { - if (buffer != NULL) { - if (buffer->is_external_memory <= 0) { - WebPSafeFree(buffer->private_memory); - } - buffer->private_memory = NULL; - } -} - -void WebPCopyDecBuffer(const WebPDecBuffer* const src, - WebPDecBuffer* const dst) { - if (src != NULL && dst != NULL) { - *dst = *src; - if (src->private_memory != NULL) { - dst->is_external_memory = 1; // dst buffer doesn't own the memory. - dst->private_memory = NULL; - } - } -} - -// Copy and transfer ownership from src to dst (beware of parameter order!) -void WebPGrabDecBuffer(WebPDecBuffer* const src, WebPDecBuffer* const dst) { - if (src != NULL && dst != NULL) { - *dst = *src; - if (src->private_memory != NULL) { - src->is_external_memory = 1; // src relinquishes ownership - src->private_memory = NULL; - } - } -} - -VP8StatusCode WebPCopyDecBufferPixels(const WebPDecBuffer* const src_buf, - WebPDecBuffer* const dst_buf) { - assert(src_buf != NULL && dst_buf != NULL); - assert(src_buf->colorspace == dst_buf->colorspace); - - dst_buf->width = src_buf->width; - dst_buf->height = src_buf->height; - if (CheckDecBuffer(dst_buf) != VP8_STATUS_OK) { - return VP8_STATUS_INVALID_PARAM; - } - if (WebPIsRGBMode(src_buf->colorspace)) { - const WebPRGBABuffer* const src = &src_buf->u.RGBA; - const WebPRGBABuffer* const dst = &dst_buf->u.RGBA; - WebPCopyPlane(src->rgba, src->stride, dst->rgba, dst->stride, - src_buf->width * kModeBpp[src_buf->colorspace], - src_buf->height); - } else { - const WebPYUVABuffer* const src = &src_buf->u.YUVA; - const WebPYUVABuffer* const dst = &dst_buf->u.YUVA; - WebPCopyPlane(src->y, src->y_stride, dst->y, dst->y_stride, - src_buf->width, src_buf->height); - WebPCopyPlane(src->u, src->u_stride, dst->u, dst->u_stride, - (src_buf->width + 1) / 2, (src_buf->height + 1) / 2); - WebPCopyPlane(src->v, src->v_stride, dst->v, dst->v_stride, - (src_buf->width + 1) / 2, (src_buf->height + 1) / 2); - if (WebPIsAlphaMode(src_buf->colorspace)) { - WebPCopyPlane(src->a, src->a_stride, dst->a, dst->a_stride, - src_buf->width, src_buf->height); - } - } - return VP8_STATUS_OK; -} - -int WebPAvoidSlowMemory(const WebPDecBuffer* const output, - const WebPBitstreamFeatures* const features) { - assert(output != NULL); - return (output->is_external_memory >= 2) && - WebPIsPremultipliedMode(output->colorspace) && - (features != NULL && features->has_alpha); -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/common_dec.h b/Dependencies/FreeImage/Source/LibWebP/src/dec/common_dec.h deleted file mode 100644 index 336e83f..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/common_dec.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Definitions and macros common to encoding and decoding -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_DEC_COMMON_DEC_H_ -#define WEBP_DEC_COMMON_DEC_H_ - -// intra prediction modes -enum { B_DC_PRED = 0, // 4x4 modes - B_TM_PRED = 1, - B_VE_PRED = 2, - B_HE_PRED = 3, - B_RD_PRED = 4, - B_VR_PRED = 5, - B_LD_PRED = 6, - B_VL_PRED = 7, - B_HD_PRED = 8, - B_HU_PRED = 9, - NUM_BMODES = B_HU_PRED + 1 - B_DC_PRED, // = 10 - - // Luma16 or UV modes - DC_PRED = B_DC_PRED, V_PRED = B_VE_PRED, - H_PRED = B_HE_PRED, TM_PRED = B_TM_PRED, - B_PRED = NUM_BMODES, // refined I4x4 mode - NUM_PRED_MODES = 4, - - // special modes - B_DC_PRED_NOTOP = 4, - B_DC_PRED_NOLEFT = 5, - B_DC_PRED_NOTOPLEFT = 6, - NUM_B_DC_MODES = 7 }; - -enum { MB_FEATURE_TREE_PROBS = 3, - NUM_MB_SEGMENTS = 4, - NUM_REF_LF_DELTAS = 4, - NUM_MODE_LF_DELTAS = 4, // I4x4, ZERO, *, SPLIT - MAX_NUM_PARTITIONS = 8, - // Probabilities - NUM_TYPES = 4, // 0: i16-AC, 1: i16-DC, 2:chroma-AC, 3:i4-AC - NUM_BANDS = 8, - NUM_CTX = 3, - NUM_PROBAS = 11 - }; - -#endif // WEBP_DEC_COMMON_DEC_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/frame_dec.c b/Dependencies/FreeImage/Source/LibWebP/src/dec/frame_dec.c deleted file mode 100644 index a6a1610..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/frame_dec.c +++ /dev/null @@ -1,810 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Frame-reconstruction function. Memory allocation. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include "src/dec/vp8i_dec.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ -// Main reconstruction function. - -static const uint16_t kScan[16] = { - 0 + 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS, - 0 + 4 * BPS, 4 + 4 * BPS, 8 + 4 * BPS, 12 + 4 * BPS, - 0 + 8 * BPS, 4 + 8 * BPS, 8 + 8 * BPS, 12 + 8 * BPS, - 0 + 12 * BPS, 4 + 12 * BPS, 8 + 12 * BPS, 12 + 12 * BPS -}; - -static int CheckMode(int mb_x, int mb_y, int mode) { - if (mode == B_DC_PRED) { - if (mb_x == 0) { - return (mb_y == 0) ? B_DC_PRED_NOTOPLEFT : B_DC_PRED_NOLEFT; - } else { - return (mb_y == 0) ? B_DC_PRED_NOTOP : B_DC_PRED; - } - } - return mode; -} - -static void Copy32b(uint8_t* const dst, const uint8_t* const src) { - memcpy(dst, src, 4); -} - -static WEBP_INLINE void DoTransform(uint32_t bits, const int16_t* const src, - uint8_t* const dst) { - switch (bits >> 30) { - case 3: - VP8Transform(src, dst, 0); - break; - case 2: - VP8TransformAC3(src, dst); - break; - case 1: - VP8TransformDC(src, dst); - break; - default: - break; - } -} - -static void DoUVTransform(uint32_t bits, const int16_t* const src, - uint8_t* const dst) { - if (bits & 0xff) { // any non-zero coeff at all? - if (bits & 0xaa) { // any non-zero AC coefficient? - VP8TransformUV(src, dst); // note we don't use the AC3 variant for U/V - } else { - VP8TransformDCUV(src, dst); - } - } -} - -static void ReconstructRow(const VP8Decoder* const dec, - const VP8ThreadContext* ctx) { - int j; - int mb_x; - const int mb_y = ctx->mb_y_; - const int cache_id = ctx->id_; - uint8_t* const y_dst = dec->yuv_b_ + Y_OFF; - uint8_t* const u_dst = dec->yuv_b_ + U_OFF; - uint8_t* const v_dst = dec->yuv_b_ + V_OFF; - - // Initialize left-most block. - for (j = 0; j < 16; ++j) { - y_dst[j * BPS - 1] = 129; - } - for (j = 0; j < 8; ++j) { - u_dst[j * BPS - 1] = 129; - v_dst[j * BPS - 1] = 129; - } - - // Init top-left sample on left column too. - if (mb_y > 0) { - y_dst[-1 - BPS] = u_dst[-1 - BPS] = v_dst[-1 - BPS] = 129; - } else { - // we only need to do this init once at block (0,0). - // Afterward, it remains valid for the whole topmost row. - memset(y_dst - BPS - 1, 127, 16 + 4 + 1); - memset(u_dst - BPS - 1, 127, 8 + 1); - memset(v_dst - BPS - 1, 127, 8 + 1); - } - - // Reconstruct one row. - for (mb_x = 0; mb_x < dec->mb_w_; ++mb_x) { - const VP8MBData* const block = ctx->mb_data_ + mb_x; - - // Rotate in the left samples from previously decoded block. We move four - // pixels at a time for alignment reason, and because of in-loop filter. - if (mb_x > 0) { - for (j = -1; j < 16; ++j) { - Copy32b(&y_dst[j * BPS - 4], &y_dst[j * BPS + 12]); - } - for (j = -1; j < 8; ++j) { - Copy32b(&u_dst[j * BPS - 4], &u_dst[j * BPS + 4]); - Copy32b(&v_dst[j * BPS - 4], &v_dst[j * BPS + 4]); - } - } - { - // bring top samples into the cache - VP8TopSamples* const top_yuv = dec->yuv_t_ + mb_x; - const int16_t* const coeffs = block->coeffs_; - uint32_t bits = block->non_zero_y_; - int n; - - if (mb_y > 0) { - memcpy(y_dst - BPS, top_yuv[0].y, 16); - memcpy(u_dst - BPS, top_yuv[0].u, 8); - memcpy(v_dst - BPS, top_yuv[0].v, 8); - } - - // predict and add residuals - if (block->is_i4x4_) { // 4x4 - uint32_t* const top_right = (uint32_t*)(y_dst - BPS + 16); - - if (mb_y > 0) { - if (mb_x >= dec->mb_w_ - 1) { // on rightmost border - memset(top_right, top_yuv[0].y[15], sizeof(*top_right)); - } else { - memcpy(top_right, top_yuv[1].y, sizeof(*top_right)); - } - } - // replicate the top-right pixels below - top_right[BPS] = top_right[2 * BPS] = top_right[3 * BPS] = top_right[0]; - - // predict and add residuals for all 4x4 blocks in turn. - for (n = 0; n < 16; ++n, bits <<= 2) { - uint8_t* const dst = y_dst + kScan[n]; - VP8PredLuma4[block->imodes_[n]](dst); - DoTransform(bits, coeffs + n * 16, dst); - } - } else { // 16x16 - const int pred_func = CheckMode(mb_x, mb_y, block->imodes_[0]); - VP8PredLuma16[pred_func](y_dst); - if (bits != 0) { - for (n = 0; n < 16; ++n, bits <<= 2) { - DoTransform(bits, coeffs + n * 16, y_dst + kScan[n]); - } - } - } - { - // Chroma - const uint32_t bits_uv = block->non_zero_uv_; - const int pred_func = CheckMode(mb_x, mb_y, block->uvmode_); - VP8PredChroma8[pred_func](u_dst); - VP8PredChroma8[pred_func](v_dst); - DoUVTransform(bits_uv >> 0, coeffs + 16 * 16, u_dst); - DoUVTransform(bits_uv >> 8, coeffs + 20 * 16, v_dst); - } - - // stash away top samples for next block - if (mb_y < dec->mb_h_ - 1) { - memcpy(top_yuv[0].y, y_dst + 15 * BPS, 16); - memcpy(top_yuv[0].u, u_dst + 7 * BPS, 8); - memcpy(top_yuv[0].v, v_dst + 7 * BPS, 8); - } - } - // Transfer reconstructed samples from yuv_b_ cache to final destination. - { - const int y_offset = cache_id * 16 * dec->cache_y_stride_; - const int uv_offset = cache_id * 8 * dec->cache_uv_stride_; - uint8_t* const y_out = dec->cache_y_ + mb_x * 16 + y_offset; - uint8_t* const u_out = dec->cache_u_ + mb_x * 8 + uv_offset; - uint8_t* const v_out = dec->cache_v_ + mb_x * 8 + uv_offset; - for (j = 0; j < 16; ++j) { - memcpy(y_out + j * dec->cache_y_stride_, y_dst + j * BPS, 16); - } - for (j = 0; j < 8; ++j) { - memcpy(u_out + j * dec->cache_uv_stride_, u_dst + j * BPS, 8); - memcpy(v_out + j * dec->cache_uv_stride_, v_dst + j * BPS, 8); - } - } - } -} - -//------------------------------------------------------------------------------ -// Filtering - -// kFilterExtraRows[] = How many extra lines are needed on the MB boundary -// for caching, given a filtering level. -// Simple filter: up to 2 luma samples are read and 1 is written. -// Complex filter: up to 4 luma samples are read and 3 are written. Same for -// U/V, so it's 8 samples total (because of the 2x upsampling). -static const uint8_t kFilterExtraRows[3] = { 0, 2, 8 }; - -static void DoFilter(const VP8Decoder* const dec, int mb_x, int mb_y) { - const VP8ThreadContext* const ctx = &dec->thread_ctx_; - const int cache_id = ctx->id_; - const int y_bps = dec->cache_y_stride_; - const VP8FInfo* const f_info = ctx->f_info_ + mb_x; - uint8_t* const y_dst = dec->cache_y_ + cache_id * 16 * y_bps + mb_x * 16; - const int ilevel = f_info->f_ilevel_; - const int limit = f_info->f_limit_; - if (limit == 0) { - return; - } - assert(limit >= 3); - if (dec->filter_type_ == 1) { // simple - if (mb_x > 0) { - VP8SimpleHFilter16(y_dst, y_bps, limit + 4); - } - if (f_info->f_inner_) { - VP8SimpleHFilter16i(y_dst, y_bps, limit); - } - if (mb_y > 0) { - VP8SimpleVFilter16(y_dst, y_bps, limit + 4); - } - if (f_info->f_inner_) { - VP8SimpleVFilter16i(y_dst, y_bps, limit); - } - } else { // complex - const int uv_bps = dec->cache_uv_stride_; - uint8_t* const u_dst = dec->cache_u_ + cache_id * 8 * uv_bps + mb_x * 8; - uint8_t* const v_dst = dec->cache_v_ + cache_id * 8 * uv_bps + mb_x * 8; - const int hev_thresh = f_info->hev_thresh_; - if (mb_x > 0) { - VP8HFilter16(y_dst, y_bps, limit + 4, ilevel, hev_thresh); - VP8HFilter8(u_dst, v_dst, uv_bps, limit + 4, ilevel, hev_thresh); - } - if (f_info->f_inner_) { - VP8HFilter16i(y_dst, y_bps, limit, ilevel, hev_thresh); - VP8HFilter8i(u_dst, v_dst, uv_bps, limit, ilevel, hev_thresh); - } - if (mb_y > 0) { - VP8VFilter16(y_dst, y_bps, limit + 4, ilevel, hev_thresh); - VP8VFilter8(u_dst, v_dst, uv_bps, limit + 4, ilevel, hev_thresh); - } - if (f_info->f_inner_) { - VP8VFilter16i(y_dst, y_bps, limit, ilevel, hev_thresh); - VP8VFilter8i(u_dst, v_dst, uv_bps, limit, ilevel, hev_thresh); - } - } -} - -// Filter the decoded macroblock row (if needed) -static void FilterRow(const VP8Decoder* const dec) { - int mb_x; - const int mb_y = dec->thread_ctx_.mb_y_; - assert(dec->thread_ctx_.filter_row_); - for (mb_x = dec->tl_mb_x_; mb_x < dec->br_mb_x_; ++mb_x) { - DoFilter(dec, mb_x, mb_y); - } -} - -//------------------------------------------------------------------------------ -// Precompute the filtering strength for each segment and each i4x4/i16x16 mode. - -static void PrecomputeFilterStrengths(VP8Decoder* const dec) { - if (dec->filter_type_ > 0) { - int s; - const VP8FilterHeader* const hdr = &dec->filter_hdr_; - for (s = 0; s < NUM_MB_SEGMENTS; ++s) { - int i4x4; - // First, compute the initial level - int base_level; - if (dec->segment_hdr_.use_segment_) { - base_level = dec->segment_hdr_.filter_strength_[s]; - if (!dec->segment_hdr_.absolute_delta_) { - base_level += hdr->level_; - } - } else { - base_level = hdr->level_; - } - for (i4x4 = 0; i4x4 <= 1; ++i4x4) { - VP8FInfo* const info = &dec->fstrengths_[s][i4x4]; - int level = base_level; - if (hdr->use_lf_delta_) { - level += hdr->ref_lf_delta_[0]; - if (i4x4) { - level += hdr->mode_lf_delta_[0]; - } - } - level = (level < 0) ? 0 : (level > 63) ? 63 : level; - if (level > 0) { - int ilevel = level; - if (hdr->sharpness_ > 0) { - if (hdr->sharpness_ > 4) { - ilevel >>= 2; - } else { - ilevel >>= 1; - } - if (ilevel > 9 - hdr->sharpness_) { - ilevel = 9 - hdr->sharpness_; - } - } - if (ilevel < 1) ilevel = 1; - info->f_ilevel_ = ilevel; - info->f_limit_ = 2 * level + ilevel; - info->hev_thresh_ = (level >= 40) ? 2 : (level >= 15) ? 1 : 0; - } else { - info->f_limit_ = 0; // no filtering - } - info->f_inner_ = i4x4; - } - } - } -} - -//------------------------------------------------------------------------------ -// Dithering - -// minimal amp that will provide a non-zero dithering effect -#define MIN_DITHER_AMP 4 - -#define DITHER_AMP_TAB_SIZE 12 -static const uint8_t kQuantToDitherAmp[DITHER_AMP_TAB_SIZE] = { - // roughly, it's dqm->uv_mat_[1] - 8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1 -}; - -void VP8InitDithering(const WebPDecoderOptions* const options, - VP8Decoder* const dec) { - assert(dec != NULL); - if (options != NULL) { - const int d = options->dithering_strength; - const int max_amp = (1 << VP8_RANDOM_DITHER_FIX) - 1; - const int f = (d < 0) ? 0 : (d > 100) ? max_amp : (d * max_amp / 100); - if (f > 0) { - int s; - int all_amp = 0; - for (s = 0; s < NUM_MB_SEGMENTS; ++s) { - VP8QuantMatrix* const dqm = &dec->dqm_[s]; - if (dqm->uv_quant_ < DITHER_AMP_TAB_SIZE) { - // TODO(skal): should we specially dither more for uv_quant_ < 0? - const int idx = (dqm->uv_quant_ < 0) ? 0 : dqm->uv_quant_; - dqm->dither_ = (f * kQuantToDitherAmp[idx]) >> 3; - } - all_amp |= dqm->dither_; - } - if (all_amp != 0) { - VP8InitRandom(&dec->dithering_rg_, 1.0f); - dec->dither_ = 1; - } - } - // potentially allow alpha dithering - dec->alpha_dithering_ = options->alpha_dithering_strength; - if (dec->alpha_dithering_ > 100) { - dec->alpha_dithering_ = 100; - } else if (dec->alpha_dithering_ < 0) { - dec->alpha_dithering_ = 0; - } - } -} - -// Convert to range: [-2,2] for dither=50, [-4,4] for dither=100 -static void Dither8x8(VP8Random* const rg, uint8_t* dst, int bps, int amp) { - uint8_t dither[64]; - int i; - for (i = 0; i < 8 * 8; ++i) { - dither[i] = VP8RandomBits2(rg, VP8_DITHER_AMP_BITS + 1, amp); - } - VP8DitherCombine8x8(dither, dst, bps); -} - -static void DitherRow(VP8Decoder* const dec) { - int mb_x; - assert(dec->dither_); - for (mb_x = dec->tl_mb_x_; mb_x < dec->br_mb_x_; ++mb_x) { - const VP8ThreadContext* const ctx = &dec->thread_ctx_; - const VP8MBData* const data = ctx->mb_data_ + mb_x; - const int cache_id = ctx->id_; - const int uv_bps = dec->cache_uv_stride_; - if (data->dither_ >= MIN_DITHER_AMP) { - uint8_t* const u_dst = dec->cache_u_ + cache_id * 8 * uv_bps + mb_x * 8; - uint8_t* const v_dst = dec->cache_v_ + cache_id * 8 * uv_bps + mb_x * 8; - Dither8x8(&dec->dithering_rg_, u_dst, uv_bps, data->dither_); - Dither8x8(&dec->dithering_rg_, v_dst, uv_bps, data->dither_); - } - } -} - -//------------------------------------------------------------------------------ -// This function is called after a row of macroblocks is finished decoding. -// It also takes into account the following restrictions: -// * In case of in-loop filtering, we must hold off sending some of the bottom -// pixels as they are yet unfiltered. They will be when the next macroblock -// row is decoded. Meanwhile, we must preserve them by rotating them in the -// cache area. This doesn't hold for the very bottom row of the uncropped -// picture of course. -// * we must clip the remaining pixels against the cropping area. The VP8Io -// struct must have the following fields set correctly before calling put(): - -#define MACROBLOCK_VPOS(mb_y) ((mb_y) * 16) // vertical position of a MB - -// Finalize and transmit a complete row. Return false in case of user-abort. -static int FinishRow(void* arg1, void* arg2) { - VP8Decoder* const dec = (VP8Decoder*)arg1; - VP8Io* const io = (VP8Io*)arg2; - int ok = 1; - const VP8ThreadContext* const ctx = &dec->thread_ctx_; - const int cache_id = ctx->id_; - const int extra_y_rows = kFilterExtraRows[dec->filter_type_]; - const int ysize = extra_y_rows * dec->cache_y_stride_; - const int uvsize = (extra_y_rows / 2) * dec->cache_uv_stride_; - const int y_offset = cache_id * 16 * dec->cache_y_stride_; - const int uv_offset = cache_id * 8 * dec->cache_uv_stride_; - uint8_t* const ydst = dec->cache_y_ - ysize + y_offset; - uint8_t* const udst = dec->cache_u_ - uvsize + uv_offset; - uint8_t* const vdst = dec->cache_v_ - uvsize + uv_offset; - const int mb_y = ctx->mb_y_; - const int is_first_row = (mb_y == 0); - const int is_last_row = (mb_y >= dec->br_mb_y_ - 1); - - if (dec->mt_method_ == 2) { - ReconstructRow(dec, ctx); - } - - if (ctx->filter_row_) { - FilterRow(dec); - } - - if (dec->dither_) { - DitherRow(dec); - } - - if (io->put != NULL) { - int y_start = MACROBLOCK_VPOS(mb_y); - int y_end = MACROBLOCK_VPOS(mb_y + 1); - if (!is_first_row) { - y_start -= extra_y_rows; - io->y = ydst; - io->u = udst; - io->v = vdst; - } else { - io->y = dec->cache_y_ + y_offset; - io->u = dec->cache_u_ + uv_offset; - io->v = dec->cache_v_ + uv_offset; - } - - if (!is_last_row) { - y_end -= extra_y_rows; - } - if (y_end > io->crop_bottom) { - y_end = io->crop_bottom; // make sure we don't overflow on last row. - } - // If dec->alpha_data_ is not NULL, we have some alpha plane present. - io->a = NULL; - if (dec->alpha_data_ != NULL && y_start < y_end) { - io->a = VP8DecompressAlphaRows(dec, io, y_start, y_end - y_start); - if (io->a == NULL) { - return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR, - "Could not decode alpha data."); - } - } - if (y_start < io->crop_top) { - const int delta_y = io->crop_top - y_start; - y_start = io->crop_top; - assert(!(delta_y & 1)); - io->y += dec->cache_y_stride_ * delta_y; - io->u += dec->cache_uv_stride_ * (delta_y >> 1); - io->v += dec->cache_uv_stride_ * (delta_y >> 1); - if (io->a != NULL) { - io->a += io->width * delta_y; - } - } - if (y_start < y_end) { - io->y += io->crop_left; - io->u += io->crop_left >> 1; - io->v += io->crop_left >> 1; - if (io->a != NULL) { - io->a += io->crop_left; - } - io->mb_y = y_start - io->crop_top; - io->mb_w = io->crop_right - io->crop_left; - io->mb_h = y_end - y_start; - ok = io->put(io); - } - } - // rotate top samples if needed - if (cache_id + 1 == dec->num_caches_) { - if (!is_last_row) { - memcpy(dec->cache_y_ - ysize, ydst + 16 * dec->cache_y_stride_, ysize); - memcpy(dec->cache_u_ - uvsize, udst + 8 * dec->cache_uv_stride_, uvsize); - memcpy(dec->cache_v_ - uvsize, vdst + 8 * dec->cache_uv_stride_, uvsize); - } - } - - return ok; -} - -#undef MACROBLOCK_VPOS - -//------------------------------------------------------------------------------ - -int VP8ProcessRow(VP8Decoder* const dec, VP8Io* const io) { - int ok = 1; - VP8ThreadContext* const ctx = &dec->thread_ctx_; - const int filter_row = - (dec->filter_type_ > 0) && - (dec->mb_y_ >= dec->tl_mb_y_) && (dec->mb_y_ <= dec->br_mb_y_); - if (dec->mt_method_ == 0) { - // ctx->id_ and ctx->f_info_ are already set - ctx->mb_y_ = dec->mb_y_; - ctx->filter_row_ = filter_row; - ReconstructRow(dec, ctx); - ok = FinishRow(dec, io); - } else { - WebPWorker* const worker = &dec->worker_; - // Finish previous job *before* updating context - ok &= WebPGetWorkerInterface()->Sync(worker); - assert(worker->status_ == OK); - if (ok) { // spawn a new deblocking/output job - ctx->io_ = *io; - ctx->id_ = dec->cache_id_; - ctx->mb_y_ = dec->mb_y_; - ctx->filter_row_ = filter_row; - if (dec->mt_method_ == 2) { // swap macroblock data - VP8MBData* const tmp = ctx->mb_data_; - ctx->mb_data_ = dec->mb_data_; - dec->mb_data_ = tmp; - } else { - // perform reconstruction directly in main thread - ReconstructRow(dec, ctx); - } - if (filter_row) { // swap filter info - VP8FInfo* const tmp = ctx->f_info_; - ctx->f_info_ = dec->f_info_; - dec->f_info_ = tmp; - } - // (reconstruct)+filter in parallel - WebPGetWorkerInterface()->Launch(worker); - if (++dec->cache_id_ == dec->num_caches_) { - dec->cache_id_ = 0; - } - } - } - return ok; -} - -//------------------------------------------------------------------------------ -// Finish setting up the decoding parameter once user's setup() is called. - -VP8StatusCode VP8EnterCritical(VP8Decoder* const dec, VP8Io* const io) { - // Call setup() first. This may trigger additional decoding features on 'io'. - // Note: Afterward, we must call teardown() no matter what. - if (io->setup != NULL && !io->setup(io)) { - VP8SetError(dec, VP8_STATUS_USER_ABORT, "Frame setup failed"); - return dec->status_; - } - - // Disable filtering per user request - if (io->bypass_filtering) { - dec->filter_type_ = 0; - } - - // Define the area where we can skip in-loop filtering, in case of cropping. - // - // 'Simple' filter reads two luma samples outside of the macroblock - // and filters one. It doesn't filter the chroma samples. Hence, we can - // avoid doing the in-loop filtering before crop_top/crop_left position. - // For the 'Complex' filter, 3 samples are read and up to 3 are filtered. - // Means: there's a dependency chain that goes all the way up to the - // top-left corner of the picture (MB #0). We must filter all the previous - // macroblocks. - { - const int extra_pixels = kFilterExtraRows[dec->filter_type_]; - if (dec->filter_type_ == 2) { - // For complex filter, we need to preserve the dependency chain. - dec->tl_mb_x_ = 0; - dec->tl_mb_y_ = 0; - } else { - // For simple filter, we can filter only the cropped region. - // We include 'extra_pixels' on the other side of the boundary, since - // vertical or horizontal filtering of the previous macroblock can - // modify some abutting pixels. - dec->tl_mb_x_ = (io->crop_left - extra_pixels) >> 4; - dec->tl_mb_y_ = (io->crop_top - extra_pixels) >> 4; - if (dec->tl_mb_x_ < 0) dec->tl_mb_x_ = 0; - if (dec->tl_mb_y_ < 0) dec->tl_mb_y_ = 0; - } - // We need some 'extra' pixels on the right/bottom. - dec->br_mb_y_ = (io->crop_bottom + 15 + extra_pixels) >> 4; - dec->br_mb_x_ = (io->crop_right + 15 + extra_pixels) >> 4; - if (dec->br_mb_x_ > dec->mb_w_) { - dec->br_mb_x_ = dec->mb_w_; - } - if (dec->br_mb_y_ > dec->mb_h_) { - dec->br_mb_y_ = dec->mb_h_; - } - } - PrecomputeFilterStrengths(dec); - return VP8_STATUS_OK; -} - -int VP8ExitCritical(VP8Decoder* const dec, VP8Io* const io) { - int ok = 1; - if (dec->mt_method_ > 0) { - ok = WebPGetWorkerInterface()->Sync(&dec->worker_); - } - - if (io->teardown != NULL) { - io->teardown(io); - } - return ok; -} - -//------------------------------------------------------------------------------ -// For multi-threaded decoding we need to use 3 rows of 16 pixels as delay line. -// -// Reason is: the deblocking filter cannot deblock the bottom horizontal edges -// immediately, and needs to wait for first few rows of the next macroblock to -// be decoded. Hence, deblocking is lagging behind by 4 or 8 pixels (depending -// on strength). -// With two threads, the vertical positions of the rows being decoded are: -// Decode: [ 0..15][16..31][32..47][48..63][64..79][... -// Deblock: [ 0..11][12..27][28..43][44..59][... -// If we use two threads and two caches of 16 pixels, the sequence would be: -// Decode: [ 0..15][16..31][ 0..15!!][16..31][ 0..15][... -// Deblock: [ 0..11][12..27!!][-4..11][12..27][... -// The problem occurs during row [12..15!!] that both the decoding and -// deblocking threads are writing simultaneously. -// With 3 cache lines, one get a safe write pattern: -// Decode: [ 0..15][16..31][32..47][ 0..15][16..31][32..47][0.. -// Deblock: [ 0..11][12..27][28..43][-4..11][12..27][28... -// Note that multi-threaded output _without_ deblocking can make use of two -// cache lines of 16 pixels only, since there's no lagging behind. The decoding -// and output process have non-concurrent writing: -// Decode: [ 0..15][16..31][ 0..15][16..31][... -// io->put: [ 0..15][16..31][ 0..15][... - -#define MT_CACHE_LINES 3 -#define ST_CACHE_LINES 1 // 1 cache row only for single-threaded case - -// Initialize multi/single-thread worker -static int InitThreadContext(VP8Decoder* const dec) { - dec->cache_id_ = 0; - if (dec->mt_method_ > 0) { - WebPWorker* const worker = &dec->worker_; - if (!WebPGetWorkerInterface()->Reset(worker)) { - return VP8SetError(dec, VP8_STATUS_OUT_OF_MEMORY, - "thread initialization failed."); - } - worker->data1 = dec; - worker->data2 = (void*)&dec->thread_ctx_.io_; - worker->hook = FinishRow; - dec->num_caches_ = - (dec->filter_type_ > 0) ? MT_CACHE_LINES : MT_CACHE_LINES - 1; - } else { - dec->num_caches_ = ST_CACHE_LINES; - } - return 1; -} - -int VP8GetThreadMethod(const WebPDecoderOptions* const options, - const WebPHeaderStructure* const headers, - int width, int height) { - if (options == NULL || options->use_threads == 0) { - return 0; - } - (void)headers; - (void)width; - (void)height; - assert(headers == NULL || !headers->is_lossless); -#if defined(WEBP_USE_THREAD) - if (width < MIN_WIDTH_FOR_THREADS) return 0; - // TODO(skal): tune the heuristic further -#if 0 - if (height < 2 * width) return 2; -#endif - return 2; -#else // !WEBP_USE_THREAD - return 0; -#endif -} - -#undef MT_CACHE_LINES -#undef ST_CACHE_LINES - -//------------------------------------------------------------------------------ -// Memory setup - -static int AllocateMemory(VP8Decoder* const dec) { - const int num_caches = dec->num_caches_; - const int mb_w = dec->mb_w_; - // Note: we use 'size_t' when there's no overflow risk, uint64_t otherwise. - const size_t intra_pred_mode_size = 4 * mb_w * sizeof(uint8_t); - const size_t top_size = sizeof(VP8TopSamples) * mb_w; - const size_t mb_info_size = (mb_w + 1) * sizeof(VP8MB); - const size_t f_info_size = - (dec->filter_type_ > 0) ? - mb_w * (dec->mt_method_ > 0 ? 2 : 1) * sizeof(VP8FInfo) - : 0; - const size_t yuv_size = YUV_SIZE * sizeof(*dec->yuv_b_); - const size_t mb_data_size = - (dec->mt_method_ == 2 ? 2 : 1) * mb_w * sizeof(*dec->mb_data_); - const size_t cache_height = (16 * num_caches - + kFilterExtraRows[dec->filter_type_]) * 3 / 2; - const size_t cache_size = top_size * cache_height; - // alpha_size is the only one that scales as width x height. - const uint64_t alpha_size = (dec->alpha_data_ != NULL) ? - (uint64_t)dec->pic_hdr_.width_ * dec->pic_hdr_.height_ : 0ULL; - const uint64_t needed = (uint64_t)intra_pred_mode_size - + top_size + mb_info_size + f_info_size - + yuv_size + mb_data_size - + cache_size + alpha_size + WEBP_ALIGN_CST; - uint8_t* mem; - - if (needed != (size_t)needed) return 0; // check for overflow - if (needed > dec->mem_size_) { - WebPSafeFree(dec->mem_); - dec->mem_size_ = 0; - dec->mem_ = WebPSafeMalloc(needed, sizeof(uint8_t)); - if (dec->mem_ == NULL) { - return VP8SetError(dec, VP8_STATUS_OUT_OF_MEMORY, - "no memory during frame initialization."); - } - // down-cast is ok, thanks to WebPSafeMalloc() above. - dec->mem_size_ = (size_t)needed; - } - - mem = (uint8_t*)dec->mem_; - dec->intra_t_ = mem; - mem += intra_pred_mode_size; - - dec->yuv_t_ = (VP8TopSamples*)mem; - mem += top_size; - - dec->mb_info_ = ((VP8MB*)mem) + 1; - mem += mb_info_size; - - dec->f_info_ = f_info_size ? (VP8FInfo*)mem : NULL; - mem += f_info_size; - dec->thread_ctx_.id_ = 0; - dec->thread_ctx_.f_info_ = dec->f_info_; - if (dec->mt_method_ > 0) { - // secondary cache line. The deblocking process need to make use of the - // filtering strength from previous macroblock row, while the new ones - // are being decoded in parallel. We'll just swap the pointers. - dec->thread_ctx_.f_info_ += mb_w; - } - - mem = (uint8_t*)WEBP_ALIGN(mem); - assert((yuv_size & WEBP_ALIGN_CST) == 0); - dec->yuv_b_ = mem; - mem += yuv_size; - - dec->mb_data_ = (VP8MBData*)mem; - dec->thread_ctx_.mb_data_ = (VP8MBData*)mem; - if (dec->mt_method_ == 2) { - dec->thread_ctx_.mb_data_ += mb_w; - } - mem += mb_data_size; - - dec->cache_y_stride_ = 16 * mb_w; - dec->cache_uv_stride_ = 8 * mb_w; - { - const int extra_rows = kFilterExtraRows[dec->filter_type_]; - const int extra_y = extra_rows * dec->cache_y_stride_; - const int extra_uv = (extra_rows / 2) * dec->cache_uv_stride_; - dec->cache_y_ = mem + extra_y; - dec->cache_u_ = dec->cache_y_ - + 16 * num_caches * dec->cache_y_stride_ + extra_uv; - dec->cache_v_ = dec->cache_u_ - + 8 * num_caches * dec->cache_uv_stride_ + extra_uv; - dec->cache_id_ = 0; - } - mem += cache_size; - - // alpha plane - dec->alpha_plane_ = alpha_size ? mem : NULL; - mem += alpha_size; - assert(mem <= (uint8_t*)dec->mem_ + dec->mem_size_); - - // note: left/top-info is initialized once for all. - memset(dec->mb_info_ - 1, 0, mb_info_size); - VP8InitScanline(dec); // initialize left too. - - // initialize top - memset(dec->intra_t_, B_DC_PRED, intra_pred_mode_size); - - return 1; -} - -static void InitIo(VP8Decoder* const dec, VP8Io* io) { - // prepare 'io' - io->mb_y = 0; - io->y = dec->cache_y_; - io->u = dec->cache_u_; - io->v = dec->cache_v_; - io->y_stride = dec->cache_y_stride_; - io->uv_stride = dec->cache_uv_stride_; - io->a = NULL; -} - -int VP8InitFrame(VP8Decoder* const dec, VP8Io* const io) { - if (!InitThreadContext(dec)) return 0; // call first. Sets dec->num_caches_. - if (!AllocateMemory(dec)) return 0; - InitIo(dec, io); - VP8DspInit(); // Init critical function pointers and look-up tables. - return 1; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/idec_dec.c b/Dependencies/FreeImage/Source/LibWebP/src/dec/idec_dec.c deleted file mode 100644 index df86de9..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/idec_dec.c +++ /dev/null @@ -1,903 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Incremental decoding -// -// Author: somnath@google.com (Somnath Banerjee) - -#include -#include -#include - -#include "src/dec/alphai_dec.h" -#include "src/dec/webpi_dec.h" -#include "src/dec/vp8i_dec.h" -#include "src/utils/utils.h" - -// In append mode, buffer allocations increase as multiples of this value. -// Needs to be a power of 2. -#define CHUNK_SIZE 4096 -#define MAX_MB_SIZE 4096 - -//------------------------------------------------------------------------------ -// Data structures for memory and states - -// Decoding states. State normally flows as: -// WEBP_HEADER->VP8_HEADER->VP8_PARTS0->VP8_DATA->DONE for a lossy image, and -// WEBP_HEADER->VP8L_HEADER->VP8L_DATA->DONE for a lossless image. -// If there is any error the decoder goes into state ERROR. -typedef enum { - STATE_WEBP_HEADER, // All the data before that of the VP8/VP8L chunk. - STATE_VP8_HEADER, // The VP8 Frame header (within the VP8 chunk). - STATE_VP8_PARTS0, - STATE_VP8_DATA, - STATE_VP8L_HEADER, - STATE_VP8L_DATA, - STATE_DONE, - STATE_ERROR -} DecState; - -// Operating state for the MemBuffer -typedef enum { - MEM_MODE_NONE = 0, - MEM_MODE_APPEND, - MEM_MODE_MAP -} MemBufferMode; - -// storage for partition #0 and partial data (in a rolling fashion) -typedef struct { - MemBufferMode mode_; // Operation mode - size_t start_; // start location of the data to be decoded - size_t end_; // end location - size_t buf_size_; // size of the allocated buffer - uint8_t* buf_; // We don't own this buffer in case WebPIUpdate() - - size_t part0_size_; // size of partition #0 - const uint8_t* part0_buf_; // buffer to store partition #0 -} MemBuffer; - -struct WebPIDecoder { - DecState state_; // current decoding state - WebPDecParams params_; // Params to store output info - int is_lossless_; // for down-casting 'dec_'. - void* dec_; // either a VP8Decoder or a VP8LDecoder instance - VP8Io io_; - - MemBuffer mem_; // input memory buffer. - WebPDecBuffer output_; // output buffer (when no external one is supplied, - // or if the external one has slow-memory) - WebPDecBuffer* final_output_; // Slow-memory output to copy to eventually. - size_t chunk_size_; // Compressed VP8/VP8L size extracted from Header. - - int last_mb_y_; // last row reached for intra-mode decoding -}; - -// MB context to restore in case VP8DecodeMB() fails -typedef struct { - VP8MB left_; - VP8MB info_; - VP8BitReader token_br_; -} MBContext; - -//------------------------------------------------------------------------------ -// MemBuffer: incoming data handling - -static WEBP_INLINE size_t MemDataSize(const MemBuffer* mem) { - return (mem->end_ - mem->start_); -} - -// Check if we need to preserve the compressed alpha data, as it may not have -// been decoded yet. -static int NeedCompressedAlpha(const WebPIDecoder* const idec) { - if (idec->state_ == STATE_WEBP_HEADER) { - // We haven't parsed the headers yet, so we don't know whether the image is - // lossy or lossless. This also means that we haven't parsed the ALPH chunk. - return 0; - } - if (idec->is_lossless_) { - return 0; // ALPH chunk is not present for lossless images. - } else { - const VP8Decoder* const dec = (VP8Decoder*)idec->dec_; - assert(dec != NULL); // Must be true as idec->state_ != STATE_WEBP_HEADER. - return (dec->alpha_data_ != NULL) && !dec->is_alpha_decoded_; - } -} - -static void DoRemap(WebPIDecoder* const idec, ptrdiff_t offset) { - MemBuffer* const mem = &idec->mem_; - const uint8_t* const new_base = mem->buf_ + mem->start_; - // note: for VP8, setting up idec->io_ is only really needed at the beginning - // of the decoding, till partition #0 is complete. - idec->io_.data = new_base; - idec->io_.data_size = MemDataSize(mem); - - if (idec->dec_ != NULL) { - if (!idec->is_lossless_) { - VP8Decoder* const dec = (VP8Decoder*)idec->dec_; - const uint32_t last_part = dec->num_parts_minus_one_; - if (offset != 0) { - uint32_t p; - for (p = 0; p <= last_part; ++p) { - VP8RemapBitReader(dec->parts_ + p, offset); - } - // Remap partition #0 data pointer to new offset, but only in MAP - // mode (in APPEND mode, partition #0 is copied into a fixed memory). - if (mem->mode_ == MEM_MODE_MAP) { - VP8RemapBitReader(&dec->br_, offset); - } - } - { - const uint8_t* const last_start = dec->parts_[last_part].buf_; - VP8BitReaderSetBuffer(&dec->parts_[last_part], last_start, - mem->buf_ + mem->end_ - last_start); - } - if (NeedCompressedAlpha(idec)) { - ALPHDecoder* const alph_dec = dec->alph_dec_; - dec->alpha_data_ += offset; - if (alph_dec != NULL && alph_dec->vp8l_dec_ != NULL) { - if (alph_dec->method_ == ALPHA_LOSSLESS_COMPRESSION) { - VP8LDecoder* const alph_vp8l_dec = alph_dec->vp8l_dec_; - assert(dec->alpha_data_size_ >= ALPHA_HEADER_LEN); - VP8LBitReaderSetBuffer(&alph_vp8l_dec->br_, - dec->alpha_data_ + ALPHA_HEADER_LEN, - dec->alpha_data_size_ - ALPHA_HEADER_LEN); - } else { // alph_dec->method_ == ALPHA_NO_COMPRESSION - // Nothing special to do in this case. - } - } - } - } else { // Resize lossless bitreader - VP8LDecoder* const dec = (VP8LDecoder*)idec->dec_; - VP8LBitReaderSetBuffer(&dec->br_, new_base, MemDataSize(mem)); - } - } -} - -// Appends data to the end of MemBuffer->buf_. It expands the allocated memory -// size if required and also updates VP8BitReader's if new memory is allocated. -static int AppendToMemBuffer(WebPIDecoder* const idec, - const uint8_t* const data, size_t data_size) { - VP8Decoder* const dec = (VP8Decoder*)idec->dec_; - MemBuffer* const mem = &idec->mem_; - const int need_compressed_alpha = NeedCompressedAlpha(idec); - const uint8_t* const old_start = mem->buf_ + mem->start_; - const uint8_t* const old_base = - need_compressed_alpha ? dec->alpha_data_ : old_start; - assert(mem->mode_ == MEM_MODE_APPEND); - if (data_size > MAX_CHUNK_PAYLOAD) { - // security safeguard: trying to allocate more than what the format - // allows for a chunk should be considered a smoke smell. - return 0; - } - - if (mem->end_ + data_size > mem->buf_size_) { // Need some free memory - const size_t new_mem_start = old_start - old_base; - const size_t current_size = MemDataSize(mem) + new_mem_start; - const uint64_t new_size = (uint64_t)current_size + data_size; - const uint64_t extra_size = (new_size + CHUNK_SIZE - 1) & ~(CHUNK_SIZE - 1); - uint8_t* const new_buf = - (uint8_t*)WebPSafeMalloc(extra_size, sizeof(*new_buf)); - if (new_buf == NULL) return 0; - memcpy(new_buf, old_base, current_size); - WebPSafeFree(mem->buf_); - mem->buf_ = new_buf; - mem->buf_size_ = (size_t)extra_size; - mem->start_ = new_mem_start; - mem->end_ = current_size; - } - - memcpy(mem->buf_ + mem->end_, data, data_size); - mem->end_ += data_size; - assert(mem->end_ <= mem->buf_size_); - - DoRemap(idec, mem->buf_ + mem->start_ - old_start); - return 1; -} - -static int RemapMemBuffer(WebPIDecoder* const idec, - const uint8_t* const data, size_t data_size) { - MemBuffer* const mem = &idec->mem_; - const uint8_t* const old_buf = mem->buf_; - const uint8_t* const old_start = old_buf + mem->start_; - assert(mem->mode_ == MEM_MODE_MAP); - - if (data_size < mem->buf_size_) return 0; // can't remap to a shorter buffer! - - mem->buf_ = (uint8_t*)data; - mem->end_ = mem->buf_size_ = data_size; - - DoRemap(idec, mem->buf_ + mem->start_ - old_start); - return 1; -} - -static void InitMemBuffer(MemBuffer* const mem) { - mem->mode_ = MEM_MODE_NONE; - mem->buf_ = NULL; - mem->buf_size_ = 0; - mem->part0_buf_ = NULL; - mem->part0_size_ = 0; -} - -static void ClearMemBuffer(MemBuffer* const mem) { - assert(mem); - if (mem->mode_ == MEM_MODE_APPEND) { - WebPSafeFree(mem->buf_); - WebPSafeFree((void*)mem->part0_buf_); - } -} - -static int CheckMemBufferMode(MemBuffer* const mem, MemBufferMode expected) { - if (mem->mode_ == MEM_MODE_NONE) { - mem->mode_ = expected; // switch to the expected mode - } else if (mem->mode_ != expected) { - return 0; // we mixed the modes => error - } - assert(mem->mode_ == expected); // mode is ok - return 1; -} - -// To be called last. -static VP8StatusCode FinishDecoding(WebPIDecoder* const idec) { - const WebPDecoderOptions* const options = idec->params_.options; - WebPDecBuffer* const output = idec->params_.output; - - idec->state_ = STATE_DONE; - if (options != NULL && options->flip) { - const VP8StatusCode status = WebPFlipBuffer(output); - if (status != VP8_STATUS_OK) return status; - } - if (idec->final_output_ != NULL) { - WebPCopyDecBufferPixels(output, idec->final_output_); // do the slow-copy - WebPFreeDecBuffer(&idec->output_); - *output = *idec->final_output_; - idec->final_output_ = NULL; - } - return VP8_STATUS_OK; -} - -//------------------------------------------------------------------------------ -// Macroblock-decoding contexts - -static void SaveContext(const VP8Decoder* dec, const VP8BitReader* token_br, - MBContext* const context) { - context->left_ = dec->mb_info_[-1]; - context->info_ = dec->mb_info_[dec->mb_x_]; - context->token_br_ = *token_br; -} - -static void RestoreContext(const MBContext* context, VP8Decoder* const dec, - VP8BitReader* const token_br) { - dec->mb_info_[-1] = context->left_; - dec->mb_info_[dec->mb_x_] = context->info_; - *token_br = context->token_br_; -} - -//------------------------------------------------------------------------------ - -static VP8StatusCode IDecError(WebPIDecoder* const idec, VP8StatusCode error) { - if (idec->state_ == STATE_VP8_DATA) { - // Synchronize the thread, clean-up and check for errors. - VP8ExitCritical((VP8Decoder*)idec->dec_, &idec->io_); - } - idec->state_ = STATE_ERROR; - return error; -} - -static void ChangeState(WebPIDecoder* const idec, DecState new_state, - size_t consumed_bytes) { - MemBuffer* const mem = &idec->mem_; - idec->state_ = new_state; - mem->start_ += consumed_bytes; - assert(mem->start_ <= mem->end_); - idec->io_.data = mem->buf_ + mem->start_; - idec->io_.data_size = MemDataSize(mem); -} - -// Headers -static VP8StatusCode DecodeWebPHeaders(WebPIDecoder* const idec) { - MemBuffer* const mem = &idec->mem_; - const uint8_t* data = mem->buf_ + mem->start_; - size_t curr_size = MemDataSize(mem); - VP8StatusCode status; - WebPHeaderStructure headers; - - headers.data = data; - headers.data_size = curr_size; - headers.have_all_data = 0; - status = WebPParseHeaders(&headers); - if (status == VP8_STATUS_NOT_ENOUGH_DATA) { - return VP8_STATUS_SUSPENDED; // We haven't found a VP8 chunk yet. - } else if (status != VP8_STATUS_OK) { - return IDecError(idec, status); - } - - idec->chunk_size_ = headers.compressed_size; - idec->is_lossless_ = headers.is_lossless; - if (!idec->is_lossless_) { - VP8Decoder* const dec = VP8New(); - if (dec == NULL) { - return VP8_STATUS_OUT_OF_MEMORY; - } - idec->dec_ = dec; - dec->alpha_data_ = headers.alpha_data; - dec->alpha_data_size_ = headers.alpha_data_size; - ChangeState(idec, STATE_VP8_HEADER, headers.offset); - } else { - VP8LDecoder* const dec = VP8LNew(); - if (dec == NULL) { - return VP8_STATUS_OUT_OF_MEMORY; - } - idec->dec_ = dec; - ChangeState(idec, STATE_VP8L_HEADER, headers.offset); - } - return VP8_STATUS_OK; -} - -static VP8StatusCode DecodeVP8FrameHeader(WebPIDecoder* const idec) { - const uint8_t* data = idec->mem_.buf_ + idec->mem_.start_; - const size_t curr_size = MemDataSize(&idec->mem_); - int width, height; - uint32_t bits; - - if (curr_size < VP8_FRAME_HEADER_SIZE) { - // Not enough data bytes to extract VP8 Frame Header. - return VP8_STATUS_SUSPENDED; - } - if (!VP8GetInfo(data, curr_size, idec->chunk_size_, &width, &height)) { - return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR); - } - - bits = data[0] | (data[1] << 8) | (data[2] << 16); - idec->mem_.part0_size_ = (bits >> 5) + VP8_FRAME_HEADER_SIZE; - - idec->io_.data = data; - idec->io_.data_size = curr_size; - idec->state_ = STATE_VP8_PARTS0; - return VP8_STATUS_OK; -} - -// Partition #0 -static VP8StatusCode CopyParts0Data(WebPIDecoder* const idec) { - VP8Decoder* const dec = (VP8Decoder*)idec->dec_; - VP8BitReader* const br = &dec->br_; - const size_t part_size = br->buf_end_ - br->buf_; - MemBuffer* const mem = &idec->mem_; - assert(!idec->is_lossless_); - assert(mem->part0_buf_ == NULL); - // the following is a format limitation, no need for runtime check: - assert(part_size <= mem->part0_size_); - if (part_size == 0) { // can't have zero-size partition #0 - return VP8_STATUS_BITSTREAM_ERROR; - } - if (mem->mode_ == MEM_MODE_APPEND) { - // We copy and grab ownership of the partition #0 data. - uint8_t* const part0_buf = (uint8_t*)WebPSafeMalloc(1ULL, part_size); - if (part0_buf == NULL) { - return VP8_STATUS_OUT_OF_MEMORY; - } - memcpy(part0_buf, br->buf_, part_size); - mem->part0_buf_ = part0_buf; - VP8BitReaderSetBuffer(br, part0_buf, part_size); - } else { - // Else: just keep pointers to the partition #0's data in dec_->br_. - } - mem->start_ += part_size; - return VP8_STATUS_OK; -} - -static VP8StatusCode DecodePartition0(WebPIDecoder* const idec) { - VP8Decoder* const dec = (VP8Decoder*)idec->dec_; - VP8Io* const io = &idec->io_; - const WebPDecParams* const params = &idec->params_; - WebPDecBuffer* const output = params->output; - - // Wait till we have enough data for the whole partition #0 - if (MemDataSize(&idec->mem_) < idec->mem_.part0_size_) { - return VP8_STATUS_SUSPENDED; - } - - if (!VP8GetHeaders(dec, io)) { - const VP8StatusCode status = dec->status_; - if (status == VP8_STATUS_SUSPENDED || - status == VP8_STATUS_NOT_ENOUGH_DATA) { - // treating NOT_ENOUGH_DATA as SUSPENDED state - return VP8_STATUS_SUSPENDED; - } - return IDecError(idec, status); - } - - // Allocate/Verify output buffer now - dec->status_ = WebPAllocateDecBuffer(io->width, io->height, params->options, - output); - if (dec->status_ != VP8_STATUS_OK) { - return IDecError(idec, dec->status_); - } - // This change must be done before calling VP8InitFrame() - dec->mt_method_ = VP8GetThreadMethod(params->options, NULL, - io->width, io->height); - VP8InitDithering(params->options, dec); - - dec->status_ = CopyParts0Data(idec); - if (dec->status_ != VP8_STATUS_OK) { - return IDecError(idec, dec->status_); - } - - // Finish setting up the decoding parameters. Will call io->setup(). - if (VP8EnterCritical(dec, io) != VP8_STATUS_OK) { - return IDecError(idec, dec->status_); - } - - // Note: past this point, teardown() must always be called - // in case of error. - idec->state_ = STATE_VP8_DATA; - // Allocate memory and prepare everything. - if (!VP8InitFrame(dec, io)) { - return IDecError(idec, dec->status_); - } - return VP8_STATUS_OK; -} - -// Remaining partitions -static VP8StatusCode DecodeRemaining(WebPIDecoder* const idec) { - VP8Decoder* const dec = (VP8Decoder*)idec->dec_; - VP8Io* const io = &idec->io_; - - // Make sure partition #0 has been read before, to set dec to ready_. - if (!dec->ready_) { - return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR); - } - for (; dec->mb_y_ < dec->mb_h_; ++dec->mb_y_) { - if (idec->last_mb_y_ != dec->mb_y_) { - if (!VP8ParseIntraModeRow(&dec->br_, dec)) { - // note: normally, error shouldn't occur since we already have the whole - // partition0 available here in DecodeRemaining(). Reaching EOF while - // reading intra modes really means a BITSTREAM_ERROR. - return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR); - } - idec->last_mb_y_ = dec->mb_y_; - } - for (; dec->mb_x_ < dec->mb_w_; ++dec->mb_x_) { - VP8BitReader* const token_br = - &dec->parts_[dec->mb_y_ & dec->num_parts_minus_one_]; - MBContext context; - SaveContext(dec, token_br, &context); - if (!VP8DecodeMB(dec, token_br)) { - // We shouldn't fail when MAX_MB data was available - if (dec->num_parts_minus_one_ == 0 && - MemDataSize(&idec->mem_) > MAX_MB_SIZE) { - return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR); - } - // Synchronize the threads. - if (dec->mt_method_ > 0) { - if (!WebPGetWorkerInterface()->Sync(&dec->worker_)) { - return IDecError(idec, VP8_STATUS_BITSTREAM_ERROR); - } - } - RestoreContext(&context, dec, token_br); - return VP8_STATUS_SUSPENDED; - } - // Release buffer only if there is only one partition - if (dec->num_parts_minus_one_ == 0) { - idec->mem_.start_ = token_br->buf_ - idec->mem_.buf_; - assert(idec->mem_.start_ <= idec->mem_.end_); - } - } - VP8InitScanline(dec); // Prepare for next scanline - - // Reconstruct, filter and emit the row. - if (!VP8ProcessRow(dec, io)) { - return IDecError(idec, VP8_STATUS_USER_ABORT); - } - } - // Synchronize the thread and check for errors. - if (!VP8ExitCritical(dec, io)) { - idec->state_ = STATE_ERROR; // prevent re-entry in IDecError - return IDecError(idec, VP8_STATUS_USER_ABORT); - } - dec->ready_ = 0; - return FinishDecoding(idec); -} - -static VP8StatusCode ErrorStatusLossless(WebPIDecoder* const idec, - VP8StatusCode status) { - if (status == VP8_STATUS_SUSPENDED || status == VP8_STATUS_NOT_ENOUGH_DATA) { - return VP8_STATUS_SUSPENDED; - } - return IDecError(idec, status); -} - -static VP8StatusCode DecodeVP8LHeader(WebPIDecoder* const idec) { - VP8Io* const io = &idec->io_; - VP8LDecoder* const dec = (VP8LDecoder*)idec->dec_; - const WebPDecParams* const params = &idec->params_; - WebPDecBuffer* const output = params->output; - size_t curr_size = MemDataSize(&idec->mem_); - assert(idec->is_lossless_); - - // Wait until there's enough data for decoding header. - if (curr_size < (idec->chunk_size_ >> 3)) { - dec->status_ = VP8_STATUS_SUSPENDED; - return ErrorStatusLossless(idec, dec->status_); - } - - if (!VP8LDecodeHeader(dec, io)) { - if (dec->status_ == VP8_STATUS_BITSTREAM_ERROR && - curr_size < idec->chunk_size_) { - dec->status_ = VP8_STATUS_SUSPENDED; - } - return ErrorStatusLossless(idec, dec->status_); - } - // Allocate/verify output buffer now. - dec->status_ = WebPAllocateDecBuffer(io->width, io->height, params->options, - output); - if (dec->status_ != VP8_STATUS_OK) { - return IDecError(idec, dec->status_); - } - - idec->state_ = STATE_VP8L_DATA; - return VP8_STATUS_OK; -} - -static VP8StatusCode DecodeVP8LData(WebPIDecoder* const idec) { - VP8LDecoder* const dec = (VP8LDecoder*)idec->dec_; - const size_t curr_size = MemDataSize(&idec->mem_); - assert(idec->is_lossless_); - - // Switch to incremental decoding if we don't have all the bytes available. - dec->incremental_ = (curr_size < idec->chunk_size_); - - if (!VP8LDecodeImage(dec)) { - return ErrorStatusLossless(idec, dec->status_); - } - assert(dec->status_ == VP8_STATUS_OK || dec->status_ == VP8_STATUS_SUSPENDED); - return (dec->status_ == VP8_STATUS_SUSPENDED) ? dec->status_ - : FinishDecoding(idec); -} - - // Main decoding loop -static VP8StatusCode IDecode(WebPIDecoder* idec) { - VP8StatusCode status = VP8_STATUS_SUSPENDED; - - if (idec->state_ == STATE_WEBP_HEADER) { - status = DecodeWebPHeaders(idec); - } else { - if (idec->dec_ == NULL) { - return VP8_STATUS_SUSPENDED; // can't continue if we have no decoder. - } - } - if (idec->state_ == STATE_VP8_HEADER) { - status = DecodeVP8FrameHeader(idec); - } - if (idec->state_ == STATE_VP8_PARTS0) { - status = DecodePartition0(idec); - } - if (idec->state_ == STATE_VP8_DATA) { - const VP8Decoder* const dec = (VP8Decoder*)idec->dec_; - if (dec == NULL) { - return VP8_STATUS_SUSPENDED; // can't continue if we have no decoder. - } - status = DecodeRemaining(idec); - } - if (idec->state_ == STATE_VP8L_HEADER) { - status = DecodeVP8LHeader(idec); - } - if (idec->state_ == STATE_VP8L_DATA) { - status = DecodeVP8LData(idec); - } - return status; -} - -//------------------------------------------------------------------------------ -// Internal constructor - -static WebPIDecoder* NewDecoder(WebPDecBuffer* const output_buffer, - const WebPBitstreamFeatures* const features) { - WebPIDecoder* idec = (WebPIDecoder*)WebPSafeCalloc(1ULL, sizeof(*idec)); - if (idec == NULL) { - return NULL; - } - - idec->state_ = STATE_WEBP_HEADER; - idec->chunk_size_ = 0; - - idec->last_mb_y_ = -1; - - InitMemBuffer(&idec->mem_); - WebPInitDecBuffer(&idec->output_); - VP8InitIo(&idec->io_); - - WebPResetDecParams(&idec->params_); - if (output_buffer == NULL || WebPAvoidSlowMemory(output_buffer, features)) { - idec->params_.output = &idec->output_; - idec->final_output_ = output_buffer; - if (output_buffer != NULL) { - idec->params_.output->colorspace = output_buffer->colorspace; - } - } else { - idec->params_.output = output_buffer; - idec->final_output_ = NULL; - } - WebPInitCustomIo(&idec->params_, &idec->io_); // Plug the I/O functions. - - return idec; -} - -//------------------------------------------------------------------------------ -// Public functions - -WebPIDecoder* WebPINewDecoder(WebPDecBuffer* output_buffer) { - return NewDecoder(output_buffer, NULL); -} - -WebPIDecoder* WebPIDecode(const uint8_t* data, size_t data_size, - WebPDecoderConfig* config) { - WebPIDecoder* idec; - WebPBitstreamFeatures tmp_features; - WebPBitstreamFeatures* const features = - (config == NULL) ? &tmp_features : &config->input; - memset(&tmp_features, 0, sizeof(tmp_features)); - - // Parse the bitstream's features, if requested: - if (data != NULL && data_size > 0) { - if (WebPGetFeatures(data, data_size, features) != VP8_STATUS_OK) { - return NULL; - } - } - - // Create an instance of the incremental decoder - idec = (config != NULL) ? NewDecoder(&config->output, features) - : NewDecoder(NULL, features); - if (idec == NULL) { - return NULL; - } - // Finish initialization - if (config != NULL) { - idec->params_.options = &config->options; - } - return idec; -} - -void WebPIDelete(WebPIDecoder* idec) { - if (idec == NULL) return; - if (idec->dec_ != NULL) { - if (!idec->is_lossless_) { - if (idec->state_ == STATE_VP8_DATA) { - // Synchronize the thread, clean-up and check for errors. - VP8ExitCritical((VP8Decoder*)idec->dec_, &idec->io_); - } - VP8Delete((VP8Decoder*)idec->dec_); - } else { - VP8LDelete((VP8LDecoder*)idec->dec_); - } - } - ClearMemBuffer(&idec->mem_); - WebPFreeDecBuffer(&idec->output_); - WebPSafeFree(idec); -} - -//------------------------------------------------------------------------------ -// Wrapper toward WebPINewDecoder - -WebPIDecoder* WebPINewRGB(WEBP_CSP_MODE csp, uint8_t* output_buffer, - size_t output_buffer_size, int output_stride) { - const int is_external_memory = (output_buffer != NULL) ? 1 : 0; - WebPIDecoder* idec; - - if (csp >= MODE_YUV) return NULL; - if (is_external_memory == 0) { // Overwrite parameters to sane values. - output_buffer_size = 0; - output_stride = 0; - } else { // A buffer was passed. Validate the other params. - if (output_stride == 0 || output_buffer_size == 0) { - return NULL; // invalid parameter. - } - } - idec = WebPINewDecoder(NULL); - if (idec == NULL) return NULL; - idec->output_.colorspace = csp; - idec->output_.is_external_memory = is_external_memory; - idec->output_.u.RGBA.rgba = output_buffer; - idec->output_.u.RGBA.stride = output_stride; - idec->output_.u.RGBA.size = output_buffer_size; - return idec; -} - -WebPIDecoder* WebPINewYUVA(uint8_t* luma, size_t luma_size, int luma_stride, - uint8_t* u, size_t u_size, int u_stride, - uint8_t* v, size_t v_size, int v_stride, - uint8_t* a, size_t a_size, int a_stride) { - const int is_external_memory = (luma != NULL) ? 1 : 0; - WebPIDecoder* idec; - WEBP_CSP_MODE colorspace; - - if (is_external_memory == 0) { // Overwrite parameters to sane values. - luma_size = u_size = v_size = a_size = 0; - luma_stride = u_stride = v_stride = a_stride = 0; - u = v = a = NULL; - colorspace = MODE_YUVA; - } else { // A luma buffer was passed. Validate the other parameters. - if (u == NULL || v == NULL) return NULL; - if (luma_size == 0 || u_size == 0 || v_size == 0) return NULL; - if (luma_stride == 0 || u_stride == 0 || v_stride == 0) return NULL; - if (a != NULL) { - if (a_size == 0 || a_stride == 0) return NULL; - } - colorspace = (a == NULL) ? MODE_YUV : MODE_YUVA; - } - - idec = WebPINewDecoder(NULL); - if (idec == NULL) return NULL; - - idec->output_.colorspace = colorspace; - idec->output_.is_external_memory = is_external_memory; - idec->output_.u.YUVA.y = luma; - idec->output_.u.YUVA.y_stride = luma_stride; - idec->output_.u.YUVA.y_size = luma_size; - idec->output_.u.YUVA.u = u; - idec->output_.u.YUVA.u_stride = u_stride; - idec->output_.u.YUVA.u_size = u_size; - idec->output_.u.YUVA.v = v; - idec->output_.u.YUVA.v_stride = v_stride; - idec->output_.u.YUVA.v_size = v_size; - idec->output_.u.YUVA.a = a; - idec->output_.u.YUVA.a_stride = a_stride; - idec->output_.u.YUVA.a_size = a_size; - return idec; -} - -WebPIDecoder* WebPINewYUV(uint8_t* luma, size_t luma_size, int luma_stride, - uint8_t* u, size_t u_size, int u_stride, - uint8_t* v, size_t v_size, int v_stride) { - return WebPINewYUVA(luma, luma_size, luma_stride, - u, u_size, u_stride, - v, v_size, v_stride, - NULL, 0, 0); -} - -//------------------------------------------------------------------------------ - -static VP8StatusCode IDecCheckStatus(const WebPIDecoder* const idec) { - assert(idec); - if (idec->state_ == STATE_ERROR) { - return VP8_STATUS_BITSTREAM_ERROR; - } - if (idec->state_ == STATE_DONE) { - return VP8_STATUS_OK; - } - return VP8_STATUS_SUSPENDED; -} - -VP8StatusCode WebPIAppend(WebPIDecoder* idec, - const uint8_t* data, size_t data_size) { - VP8StatusCode status; - if (idec == NULL || data == NULL) { - return VP8_STATUS_INVALID_PARAM; - } - status = IDecCheckStatus(idec); - if (status != VP8_STATUS_SUSPENDED) { - return status; - } - // Check mixed calls between RemapMemBuffer and AppendToMemBuffer. - if (!CheckMemBufferMode(&idec->mem_, MEM_MODE_APPEND)) { - return VP8_STATUS_INVALID_PARAM; - } - // Append data to memory buffer - if (!AppendToMemBuffer(idec, data, data_size)) { - return VP8_STATUS_OUT_OF_MEMORY; - } - return IDecode(idec); -} - -VP8StatusCode WebPIUpdate(WebPIDecoder* idec, - const uint8_t* data, size_t data_size) { - VP8StatusCode status; - if (idec == NULL || data == NULL) { - return VP8_STATUS_INVALID_PARAM; - } - status = IDecCheckStatus(idec); - if (status != VP8_STATUS_SUSPENDED) { - return status; - } - // Check mixed calls between RemapMemBuffer and AppendToMemBuffer. - if (!CheckMemBufferMode(&idec->mem_, MEM_MODE_MAP)) { - return VP8_STATUS_INVALID_PARAM; - } - // Make the memory buffer point to the new buffer - if (!RemapMemBuffer(idec, data, data_size)) { - return VP8_STATUS_INVALID_PARAM; - } - return IDecode(idec); -} - -//------------------------------------------------------------------------------ - -static const WebPDecBuffer* GetOutputBuffer(const WebPIDecoder* const idec) { - if (idec == NULL || idec->dec_ == NULL) { - return NULL; - } - if (idec->state_ <= STATE_VP8_PARTS0) { - return NULL; - } - if (idec->final_output_ != NULL) { - return NULL; // not yet slow-copied - } - return idec->params_.output; -} - -const WebPDecBuffer* WebPIDecodedArea(const WebPIDecoder* idec, - int* left, int* top, - int* width, int* height) { - const WebPDecBuffer* const src = GetOutputBuffer(idec); - if (left != NULL) *left = 0; - if (top != NULL) *top = 0; - if (src != NULL) { - if (width != NULL) *width = src->width; - if (height != NULL) *height = idec->params_.last_y; - } else { - if (width != NULL) *width = 0; - if (height != NULL) *height = 0; - } - return src; -} - -uint8_t* WebPIDecGetRGB(const WebPIDecoder* idec, int* last_y, - int* width, int* height, int* stride) { - const WebPDecBuffer* const src = GetOutputBuffer(idec); - if (src == NULL) return NULL; - if (src->colorspace >= MODE_YUV) { - return NULL; - } - - if (last_y != NULL) *last_y = idec->params_.last_y; - if (width != NULL) *width = src->width; - if (height != NULL) *height = src->height; - if (stride != NULL) *stride = src->u.RGBA.stride; - - return src->u.RGBA.rgba; -} - -uint8_t* WebPIDecGetYUVA(const WebPIDecoder* idec, int* last_y, - uint8_t** u, uint8_t** v, uint8_t** a, - int* width, int* height, - int* stride, int* uv_stride, int* a_stride) { - const WebPDecBuffer* const src = GetOutputBuffer(idec); - if (src == NULL) return NULL; - if (src->colorspace < MODE_YUV) { - return NULL; - } - - if (last_y != NULL) *last_y = idec->params_.last_y; - if (u != NULL) *u = src->u.YUVA.u; - if (v != NULL) *v = src->u.YUVA.v; - if (a != NULL) *a = src->u.YUVA.a; - if (width != NULL) *width = src->width; - if (height != NULL) *height = src->height; - if (stride != NULL) *stride = src->u.YUVA.y_stride; - if (uv_stride != NULL) *uv_stride = src->u.YUVA.u_stride; - if (a_stride != NULL) *a_stride = src->u.YUVA.a_stride; - - return src->u.YUVA.y; -} - -int WebPISetIOHooks(WebPIDecoder* const idec, - VP8IoPutHook put, - VP8IoSetupHook setup, - VP8IoTeardownHook teardown, - void* user_data) { - if (idec == NULL || idec->state_ > STATE_WEBP_HEADER) { - return 0; - } - - idec->io_.put = put; - idec->io_.setup = setup; - idec->io_.teardown = teardown; - idec->io_.opaque = user_data; - - return 1; -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/io_dec.c b/Dependencies/FreeImage/Source/LibWebP/src/dec/io_dec.c deleted file mode 100644 index 1d09093..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/io_dec.c +++ /dev/null @@ -1,649 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// functions for sample output. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include -#include "src/dec/vp8i_dec.h" -#include "src/dec/webpi_dec.h" -#include "src/dsp/dsp.h" -#include "src/dsp/yuv.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ -// Main YUV<->RGB conversion functions - -static int EmitYUV(const VP8Io* const io, WebPDecParams* const p) { - WebPDecBuffer* output = p->output; - const WebPYUVABuffer* const buf = &output->u.YUVA; - uint8_t* const y_dst = buf->y + io->mb_y * buf->y_stride; - uint8_t* const u_dst = buf->u + (io->mb_y >> 1) * buf->u_stride; - uint8_t* const v_dst = buf->v + (io->mb_y >> 1) * buf->v_stride; - const int mb_w = io->mb_w; - const int mb_h = io->mb_h; - const int uv_w = (mb_w + 1) / 2; - const int uv_h = (mb_h + 1) / 2; - int j; - for (j = 0; j < mb_h; ++j) { - memcpy(y_dst + j * buf->y_stride, io->y + j * io->y_stride, mb_w); - } - for (j = 0; j < uv_h; ++j) { - memcpy(u_dst + j * buf->u_stride, io->u + j * io->uv_stride, uv_w); - memcpy(v_dst + j * buf->v_stride, io->v + j * io->uv_stride, uv_w); - } - return io->mb_h; -} - -// Point-sampling U/V sampler. -static int EmitSampledRGB(const VP8Io* const io, WebPDecParams* const p) { - WebPDecBuffer* const output = p->output; - WebPRGBABuffer* const buf = &output->u.RGBA; - uint8_t* const dst = buf->rgba + io->mb_y * buf->stride; - WebPSamplerProcessPlane(io->y, io->y_stride, - io->u, io->v, io->uv_stride, - dst, buf->stride, io->mb_w, io->mb_h, - WebPSamplers[output->colorspace]); - return io->mb_h; -} - -//------------------------------------------------------------------------------ -// Fancy upsampling - -#ifdef FANCY_UPSAMPLING -static int EmitFancyRGB(const VP8Io* const io, WebPDecParams* const p) { - int num_lines_out = io->mb_h; // a priori guess - const WebPRGBABuffer* const buf = &p->output->u.RGBA; - uint8_t* dst = buf->rgba + io->mb_y * buf->stride; - WebPUpsampleLinePairFunc upsample = WebPUpsamplers[p->output->colorspace]; - const uint8_t* cur_y = io->y; - const uint8_t* cur_u = io->u; - const uint8_t* cur_v = io->v; - const uint8_t* top_u = p->tmp_u; - const uint8_t* top_v = p->tmp_v; - int y = io->mb_y; - const int y_end = io->mb_y + io->mb_h; - const int mb_w = io->mb_w; - const int uv_w = (mb_w + 1) / 2; - - if (y == 0) { - // First line is special cased. We mirror the u/v samples at boundary. - upsample(cur_y, NULL, cur_u, cur_v, cur_u, cur_v, dst, NULL, mb_w); - } else { - // We can finish the left-over line from previous call. - upsample(p->tmp_y, cur_y, top_u, top_v, cur_u, cur_v, - dst - buf->stride, dst, mb_w); - ++num_lines_out; - } - // Loop over each output pairs of row. - for (; y + 2 < y_end; y += 2) { - top_u = cur_u; - top_v = cur_v; - cur_u += io->uv_stride; - cur_v += io->uv_stride; - dst += 2 * buf->stride; - cur_y += 2 * io->y_stride; - upsample(cur_y - io->y_stride, cur_y, - top_u, top_v, cur_u, cur_v, - dst - buf->stride, dst, mb_w); - } - // move to last row - cur_y += io->y_stride; - if (io->crop_top + y_end < io->crop_bottom) { - // Save the unfinished samples for next call (as we're not done yet). - memcpy(p->tmp_y, cur_y, mb_w * sizeof(*p->tmp_y)); - memcpy(p->tmp_u, cur_u, uv_w * sizeof(*p->tmp_u)); - memcpy(p->tmp_v, cur_v, uv_w * sizeof(*p->tmp_v)); - // The fancy upsampler leaves a row unfinished behind - // (except for the very last row) - num_lines_out--; - } else { - // Process the very last row of even-sized picture - if (!(y_end & 1)) { - upsample(cur_y, NULL, cur_u, cur_v, cur_u, cur_v, - dst + buf->stride, NULL, mb_w); - } - } - return num_lines_out; -} - -#endif /* FANCY_UPSAMPLING */ - -//------------------------------------------------------------------------------ - -static void FillAlphaPlane(uint8_t* dst, int w, int h, int stride) { - int j; - for (j = 0; j < h; ++j) { - memset(dst, 0xff, w * sizeof(*dst)); - dst += stride; - } -} - -static int EmitAlphaYUV(const VP8Io* const io, WebPDecParams* const p, - int expected_num_lines_out) { - const uint8_t* alpha = io->a; - const WebPYUVABuffer* const buf = &p->output->u.YUVA; - const int mb_w = io->mb_w; - const int mb_h = io->mb_h; - uint8_t* dst = buf->a + io->mb_y * buf->a_stride; - int j; - (void)expected_num_lines_out; - assert(expected_num_lines_out == mb_h); - if (alpha != NULL) { - for (j = 0; j < mb_h; ++j) { - memcpy(dst, alpha, mb_w * sizeof(*dst)); - alpha += io->width; - dst += buf->a_stride; - } - } else if (buf->a != NULL) { - // the user requested alpha, but there is none, set it to opaque. - FillAlphaPlane(dst, mb_w, mb_h, buf->a_stride); - } - return 0; -} - -static int GetAlphaSourceRow(const VP8Io* const io, - const uint8_t** alpha, int* const num_rows) { - int start_y = io->mb_y; - *num_rows = io->mb_h; - - // Compensate for the 1-line delay of the fancy upscaler. - // This is similar to EmitFancyRGB(). - if (io->fancy_upsampling) { - if (start_y == 0) { - // We don't process the last row yet. It'll be done during the next call. - --*num_rows; - } else { - --start_y; - // Fortunately, *alpha data is persistent, so we can go back - // one row and finish alpha blending, now that the fancy upscaler - // completed the YUV->RGB interpolation. - *alpha -= io->width; - } - if (io->crop_top + io->mb_y + io->mb_h == io->crop_bottom) { - // If it's the very last call, we process all the remaining rows! - *num_rows = io->crop_bottom - io->crop_top - start_y; - } - } - return start_y; -} - -static int EmitAlphaRGB(const VP8Io* const io, WebPDecParams* const p, - int expected_num_lines_out) { - const uint8_t* alpha = io->a; - if (alpha != NULL) { - const int mb_w = io->mb_w; - const WEBP_CSP_MODE colorspace = p->output->colorspace; - const int alpha_first = - (colorspace == MODE_ARGB || colorspace == MODE_Argb); - const WebPRGBABuffer* const buf = &p->output->u.RGBA; - int num_rows; - const int start_y = GetAlphaSourceRow(io, &alpha, &num_rows); - uint8_t* const base_rgba = buf->rgba + start_y * buf->stride; - uint8_t* const dst = base_rgba + (alpha_first ? 0 : 3); - const int has_alpha = WebPDispatchAlpha(alpha, io->width, mb_w, - num_rows, dst, buf->stride); - (void)expected_num_lines_out; - assert(expected_num_lines_out == num_rows); - // has_alpha is true if there's non-trivial alpha to premultiply with. - if (has_alpha && WebPIsPremultipliedMode(colorspace)) { - WebPApplyAlphaMultiply(base_rgba, alpha_first, - mb_w, num_rows, buf->stride); - } - } - return 0; -} - -static int EmitAlphaRGBA4444(const VP8Io* const io, WebPDecParams* const p, - int expected_num_lines_out) { - const uint8_t* alpha = io->a; - if (alpha != NULL) { - const int mb_w = io->mb_w; - const WEBP_CSP_MODE colorspace = p->output->colorspace; - const WebPRGBABuffer* const buf = &p->output->u.RGBA; - int num_rows; - const int start_y = GetAlphaSourceRow(io, &alpha, &num_rows); - uint8_t* const base_rgba = buf->rgba + start_y * buf->stride; -#if (WEBP_SWAP_16BIT_CSP == 1) - uint8_t* alpha_dst = base_rgba; -#else - uint8_t* alpha_dst = base_rgba + 1; -#endif - uint32_t alpha_mask = 0x0f; - int i, j; - for (j = 0; j < num_rows; ++j) { - for (i = 0; i < mb_w; ++i) { - // Fill in the alpha value (converted to 4 bits). - const uint32_t alpha_value = alpha[i] >> 4; - alpha_dst[2 * i] = (alpha_dst[2 * i] & 0xf0) | alpha_value; - alpha_mask &= alpha_value; - } - alpha += io->width; - alpha_dst += buf->stride; - } - (void)expected_num_lines_out; - assert(expected_num_lines_out == num_rows); - if (alpha_mask != 0x0f && WebPIsPremultipliedMode(colorspace)) { - WebPApplyAlphaMultiply4444(base_rgba, mb_w, num_rows, buf->stride); - } - } - return 0; -} - -//------------------------------------------------------------------------------ -// YUV rescaling (no final RGB conversion needed) - -#if !defined(WEBP_REDUCE_SIZE) -static int Rescale(const uint8_t* src, int src_stride, - int new_lines, WebPRescaler* const wrk) { - int num_lines_out = 0; - while (new_lines > 0) { // import new contributions of source rows. - const int lines_in = WebPRescalerImport(wrk, new_lines, src, src_stride); - src += lines_in * src_stride; - new_lines -= lines_in; - num_lines_out += WebPRescalerExport(wrk); // emit output row(s) - } - return num_lines_out; -} - -static int EmitRescaledYUV(const VP8Io* const io, WebPDecParams* const p) { - const int mb_h = io->mb_h; - const int uv_mb_h = (mb_h + 1) >> 1; - WebPRescaler* const scaler = p->scaler_y; - int num_lines_out = 0; - if (WebPIsAlphaMode(p->output->colorspace) && io->a != NULL) { - // Before rescaling, we premultiply the luma directly into the io->y - // internal buffer. This is OK since these samples are not used for - // intra-prediction (the top samples are saved in cache_y_/u_/v_). - // But we need to cast the const away, though. - WebPMultRows((uint8_t*)io->y, io->y_stride, - io->a, io->width, io->mb_w, mb_h, 0); - } - num_lines_out = Rescale(io->y, io->y_stride, mb_h, scaler); - Rescale(io->u, io->uv_stride, uv_mb_h, p->scaler_u); - Rescale(io->v, io->uv_stride, uv_mb_h, p->scaler_v); - return num_lines_out; -} - -static int EmitRescaledAlphaYUV(const VP8Io* const io, WebPDecParams* const p, - int expected_num_lines_out) { - const WebPYUVABuffer* const buf = &p->output->u.YUVA; - uint8_t* const dst_a = buf->a + p->last_y * buf->a_stride; - if (io->a != NULL) { - uint8_t* const dst_y = buf->y + p->last_y * buf->y_stride; - const int num_lines_out = Rescale(io->a, io->width, io->mb_h, p->scaler_a); - assert(expected_num_lines_out == num_lines_out); - if (num_lines_out > 0) { // unmultiply the Y - WebPMultRows(dst_y, buf->y_stride, dst_a, buf->a_stride, - p->scaler_a->dst_width, num_lines_out, 1); - } - } else if (buf->a != NULL) { - // the user requested alpha, but there is none, set it to opaque. - assert(p->last_y + expected_num_lines_out <= io->scaled_height); - FillAlphaPlane(dst_a, io->scaled_width, expected_num_lines_out, - buf->a_stride); - } - return 0; -} - -static int InitYUVRescaler(const VP8Io* const io, WebPDecParams* const p) { - const int has_alpha = WebPIsAlphaMode(p->output->colorspace); - const WebPYUVABuffer* const buf = &p->output->u.YUVA; - const int out_width = io->scaled_width; - const int out_height = io->scaled_height; - const int uv_out_width = (out_width + 1) >> 1; - const int uv_out_height = (out_height + 1) >> 1; - const int uv_in_width = (io->mb_w + 1) >> 1; - const int uv_in_height = (io->mb_h + 1) >> 1; - const size_t work_size = 2 * out_width; // scratch memory for luma rescaler - const size_t uv_work_size = 2 * uv_out_width; // and for each u/v ones - size_t tmp_size, rescaler_size; - rescaler_t* work; - WebPRescaler* scalers; - const int num_rescalers = has_alpha ? 4 : 3; - - tmp_size = (work_size + 2 * uv_work_size) * sizeof(*work); - if (has_alpha) { - tmp_size += work_size * sizeof(*work); - } - rescaler_size = num_rescalers * sizeof(*p->scaler_y) + WEBP_ALIGN_CST; - - p->memory = WebPSafeMalloc(1ULL, tmp_size + rescaler_size); - if (p->memory == NULL) { - return 0; // memory error - } - work = (rescaler_t*)p->memory; - - scalers = (WebPRescaler*)WEBP_ALIGN((const uint8_t*)work + tmp_size); - p->scaler_y = &scalers[0]; - p->scaler_u = &scalers[1]; - p->scaler_v = &scalers[2]; - p->scaler_a = has_alpha ? &scalers[3] : NULL; - - WebPRescalerInit(p->scaler_y, io->mb_w, io->mb_h, - buf->y, out_width, out_height, buf->y_stride, 1, - work); - WebPRescalerInit(p->scaler_u, uv_in_width, uv_in_height, - buf->u, uv_out_width, uv_out_height, buf->u_stride, 1, - work + work_size); - WebPRescalerInit(p->scaler_v, uv_in_width, uv_in_height, - buf->v, uv_out_width, uv_out_height, buf->v_stride, 1, - work + work_size + uv_work_size); - p->emit = EmitRescaledYUV; - - if (has_alpha) { - WebPRescalerInit(p->scaler_a, io->mb_w, io->mb_h, - buf->a, out_width, out_height, buf->a_stride, 1, - work + work_size + 2 * uv_work_size); - p->emit_alpha = EmitRescaledAlphaYUV; - WebPInitAlphaProcessing(); - } - return 1; -} - -//------------------------------------------------------------------------------ -// RGBA rescaling - -static int ExportRGB(WebPDecParams* const p, int y_pos) { - const WebPYUV444Converter convert = - WebPYUV444Converters[p->output->colorspace]; - const WebPRGBABuffer* const buf = &p->output->u.RGBA; - uint8_t* dst = buf->rgba + y_pos * buf->stride; - int num_lines_out = 0; - // For RGB rescaling, because of the YUV420, current scan position - // U/V can be +1/-1 line from the Y one. Hence the double test. - while (WebPRescalerHasPendingOutput(p->scaler_y) && - WebPRescalerHasPendingOutput(p->scaler_u)) { - assert(y_pos + num_lines_out < p->output->height); - assert(p->scaler_u->y_accum == p->scaler_v->y_accum); - WebPRescalerExportRow(p->scaler_y); - WebPRescalerExportRow(p->scaler_u); - WebPRescalerExportRow(p->scaler_v); - convert(p->scaler_y->dst, p->scaler_u->dst, p->scaler_v->dst, - dst, p->scaler_y->dst_width); - dst += buf->stride; - ++num_lines_out; - } - return num_lines_out; -} - -static int EmitRescaledRGB(const VP8Io* const io, WebPDecParams* const p) { - const int mb_h = io->mb_h; - const int uv_mb_h = (mb_h + 1) >> 1; - int j = 0, uv_j = 0; - int num_lines_out = 0; - while (j < mb_h) { - const int y_lines_in = - WebPRescalerImport(p->scaler_y, mb_h - j, - io->y + j * io->y_stride, io->y_stride); - j += y_lines_in; - if (WebPRescaleNeededLines(p->scaler_u, uv_mb_h - uv_j)) { - const int u_lines_in = - WebPRescalerImport(p->scaler_u, uv_mb_h - uv_j, - io->u + uv_j * io->uv_stride, io->uv_stride); - const int v_lines_in = - WebPRescalerImport(p->scaler_v, uv_mb_h - uv_j, - io->v + uv_j * io->uv_stride, io->uv_stride); - (void)v_lines_in; // remove a gcc warning - assert(u_lines_in == v_lines_in); - uv_j += u_lines_in; - } - num_lines_out += ExportRGB(p, p->last_y + num_lines_out); - } - return num_lines_out; -} - -static int ExportAlpha(WebPDecParams* const p, int y_pos, int max_lines_out) { - const WebPRGBABuffer* const buf = &p->output->u.RGBA; - uint8_t* const base_rgba = buf->rgba + y_pos * buf->stride; - const WEBP_CSP_MODE colorspace = p->output->colorspace; - const int alpha_first = - (colorspace == MODE_ARGB || colorspace == MODE_Argb); - uint8_t* dst = base_rgba + (alpha_first ? 0 : 3); - int num_lines_out = 0; - const int is_premult_alpha = WebPIsPremultipliedMode(colorspace); - uint32_t non_opaque = 0; - const int width = p->scaler_a->dst_width; - - while (WebPRescalerHasPendingOutput(p->scaler_a) && - num_lines_out < max_lines_out) { - assert(y_pos + num_lines_out < p->output->height); - WebPRescalerExportRow(p->scaler_a); - non_opaque |= WebPDispatchAlpha(p->scaler_a->dst, 0, width, 1, dst, 0); - dst += buf->stride; - ++num_lines_out; - } - if (is_premult_alpha && non_opaque) { - WebPApplyAlphaMultiply(base_rgba, alpha_first, - width, num_lines_out, buf->stride); - } - return num_lines_out; -} - -static int ExportAlphaRGBA4444(WebPDecParams* const p, int y_pos, - int max_lines_out) { - const WebPRGBABuffer* const buf = &p->output->u.RGBA; - uint8_t* const base_rgba = buf->rgba + y_pos * buf->stride; -#if (WEBP_SWAP_16BIT_CSP == 1) - uint8_t* alpha_dst = base_rgba; -#else - uint8_t* alpha_dst = base_rgba + 1; -#endif - int num_lines_out = 0; - const WEBP_CSP_MODE colorspace = p->output->colorspace; - const int width = p->scaler_a->dst_width; - const int is_premult_alpha = WebPIsPremultipliedMode(colorspace); - uint32_t alpha_mask = 0x0f; - - while (WebPRescalerHasPendingOutput(p->scaler_a) && - num_lines_out < max_lines_out) { - int i; - assert(y_pos + num_lines_out < p->output->height); - WebPRescalerExportRow(p->scaler_a); - for (i = 0; i < width; ++i) { - // Fill in the alpha value (converted to 4 bits). - const uint32_t alpha_value = p->scaler_a->dst[i] >> 4; - alpha_dst[2 * i] = (alpha_dst[2 * i] & 0xf0) | alpha_value; - alpha_mask &= alpha_value; - } - alpha_dst += buf->stride; - ++num_lines_out; - } - if (is_premult_alpha && alpha_mask != 0x0f) { - WebPApplyAlphaMultiply4444(base_rgba, width, num_lines_out, buf->stride); - } - return num_lines_out; -} - -static int EmitRescaledAlphaRGB(const VP8Io* const io, WebPDecParams* const p, - int expected_num_out_lines) { - if (io->a != NULL) { - WebPRescaler* const scaler = p->scaler_a; - int lines_left = expected_num_out_lines; - const int y_end = p->last_y + lines_left; - while (lines_left > 0) { - const int row_offset = scaler->src_y - io->mb_y; - WebPRescalerImport(scaler, io->mb_h + io->mb_y - scaler->src_y, - io->a + row_offset * io->width, io->width); - lines_left -= p->emit_alpha_row(p, y_end - lines_left, lines_left); - } - } - return 0; -} - -static int InitRGBRescaler(const VP8Io* const io, WebPDecParams* const p) { - const int has_alpha = WebPIsAlphaMode(p->output->colorspace); - const int out_width = io->scaled_width; - const int out_height = io->scaled_height; - const int uv_in_width = (io->mb_w + 1) >> 1; - const int uv_in_height = (io->mb_h + 1) >> 1; - const size_t work_size = 2 * out_width; // scratch memory for one rescaler - rescaler_t* work; // rescalers work area - uint8_t* tmp; // tmp storage for scaled YUV444 samples before RGB conversion - size_t tmp_size1, tmp_size2, total_size, rescaler_size; - WebPRescaler* scalers; - const int num_rescalers = has_alpha ? 4 : 3; - - tmp_size1 = 3 * work_size; - tmp_size2 = 3 * out_width; - if (has_alpha) { - tmp_size1 += work_size; - tmp_size2 += out_width; - } - total_size = tmp_size1 * sizeof(*work) + tmp_size2 * sizeof(*tmp); - rescaler_size = num_rescalers * sizeof(*p->scaler_y) + WEBP_ALIGN_CST; - - p->memory = WebPSafeMalloc(1ULL, total_size + rescaler_size); - if (p->memory == NULL) { - return 0; // memory error - } - work = (rescaler_t*)p->memory; - tmp = (uint8_t*)(work + tmp_size1); - - scalers = (WebPRescaler*)WEBP_ALIGN((const uint8_t*)work + total_size); - p->scaler_y = &scalers[0]; - p->scaler_u = &scalers[1]; - p->scaler_v = &scalers[2]; - p->scaler_a = has_alpha ? &scalers[3] : NULL; - - WebPRescalerInit(p->scaler_y, io->mb_w, io->mb_h, - tmp + 0 * out_width, out_width, out_height, 0, 1, - work + 0 * work_size); - WebPRescalerInit(p->scaler_u, uv_in_width, uv_in_height, - tmp + 1 * out_width, out_width, out_height, 0, 1, - work + 1 * work_size); - WebPRescalerInit(p->scaler_v, uv_in_width, uv_in_height, - tmp + 2 * out_width, out_width, out_height, 0, 1, - work + 2 * work_size); - p->emit = EmitRescaledRGB; - WebPInitYUV444Converters(); - - if (has_alpha) { - WebPRescalerInit(p->scaler_a, io->mb_w, io->mb_h, - tmp + 3 * out_width, out_width, out_height, 0, 1, - work + 3 * work_size); - p->emit_alpha = EmitRescaledAlphaRGB; - if (p->output->colorspace == MODE_RGBA_4444 || - p->output->colorspace == MODE_rgbA_4444) { - p->emit_alpha_row = ExportAlphaRGBA4444; - } else { - p->emit_alpha_row = ExportAlpha; - } - WebPInitAlphaProcessing(); - } - return 1; -} - -#endif // WEBP_REDUCE_SIZE - -//------------------------------------------------------------------------------ -// Default custom functions - -static int CustomSetup(VP8Io* io) { - WebPDecParams* const p = (WebPDecParams*)io->opaque; - const WEBP_CSP_MODE colorspace = p->output->colorspace; - const int is_rgb = WebPIsRGBMode(colorspace); - const int is_alpha = WebPIsAlphaMode(colorspace); - - p->memory = NULL; - p->emit = NULL; - p->emit_alpha = NULL; - p->emit_alpha_row = NULL; - if (!WebPIoInitFromOptions(p->options, io, is_alpha ? MODE_YUV : MODE_YUVA)) { - return 0; - } - if (is_alpha && WebPIsPremultipliedMode(colorspace)) { - WebPInitUpsamplers(); - } - if (io->use_scaling) { -#if !defined(WEBP_REDUCE_SIZE) - const int ok = is_rgb ? InitRGBRescaler(io, p) : InitYUVRescaler(io, p); - if (!ok) { - return 0; // memory error - } -#else - return 0; // rescaling support not compiled -#endif - } else { - if (is_rgb) { - WebPInitSamplers(); - p->emit = EmitSampledRGB; // default - if (io->fancy_upsampling) { -#ifdef FANCY_UPSAMPLING - const int uv_width = (io->mb_w + 1) >> 1; - p->memory = WebPSafeMalloc(1ULL, (size_t)(io->mb_w + 2 * uv_width)); - if (p->memory == NULL) { - return 0; // memory error. - } - p->tmp_y = (uint8_t*)p->memory; - p->tmp_u = p->tmp_y + io->mb_w; - p->tmp_v = p->tmp_u + uv_width; - p->emit = EmitFancyRGB; - WebPInitUpsamplers(); -#endif - } - } else { - p->emit = EmitYUV; - } - if (is_alpha) { // need transparency output - p->emit_alpha = - (colorspace == MODE_RGBA_4444 || colorspace == MODE_rgbA_4444) ? - EmitAlphaRGBA4444 - : is_rgb ? EmitAlphaRGB - : EmitAlphaYUV; - if (is_rgb) { - WebPInitAlphaProcessing(); - } - } - } - - return 1; -} - -//------------------------------------------------------------------------------ - -static int CustomPut(const VP8Io* io) { - WebPDecParams* const p = (WebPDecParams*)io->opaque; - const int mb_w = io->mb_w; - const int mb_h = io->mb_h; - int num_lines_out; - assert(!(io->mb_y & 1)); - - if (mb_w <= 0 || mb_h <= 0) { - return 0; - } - num_lines_out = p->emit(io, p); - if (p->emit_alpha != NULL) { - p->emit_alpha(io, p, num_lines_out); - } - p->last_y += num_lines_out; - return 1; -} - -//------------------------------------------------------------------------------ - -static void CustomTeardown(const VP8Io* io) { - WebPDecParams* const p = (WebPDecParams*)io->opaque; - WebPSafeFree(p->memory); - p->memory = NULL; -} - -//------------------------------------------------------------------------------ -// Main entry point - -void WebPInitCustomIo(WebPDecParams* const params, VP8Io* const io) { - io->put = CustomPut; - io->setup = CustomSetup; - io->teardown = CustomTeardown; - io->opaque = params; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/quant_dec.c b/Dependencies/FreeImage/Source/LibWebP/src/dec/quant_dec.c deleted file mode 100644 index 0fb2892..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/quant_dec.c +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Quantizer initialization -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dec/vp8i_dec.h" - -static WEBP_INLINE int clip(int v, int M) { - return v < 0 ? 0 : v > M ? M : v; -} - -// Paragraph 14.1 -static const uint8_t kDcTable[128] = { - 4, 5, 6, 7, 8, 9, 10, 10, - 11, 12, 13, 14, 15, 16, 17, 17, - 18, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 25, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, - 37, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, - 91, 93, 95, 96, 98, 100, 101, 102, - 104, 106, 108, 110, 112, 114, 116, 118, - 122, 124, 126, 128, 130, 132, 134, 136, - 138, 140, 143, 145, 148, 151, 154, 157 -}; - -static const uint16_t kAcTable[128] = { - 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 60, - 62, 64, 66, 68, 70, 72, 74, 76, - 78, 80, 82, 84, 86, 88, 90, 92, - 94, 96, 98, 100, 102, 104, 106, 108, - 110, 112, 114, 116, 119, 122, 125, 128, - 131, 134, 137, 140, 143, 146, 149, 152, - 155, 158, 161, 164, 167, 170, 173, 177, - 181, 185, 189, 193, 197, 201, 205, 209, - 213, 217, 221, 225, 229, 234, 239, 245, - 249, 254, 259, 264, 269, 274, 279, 284 -}; - -//------------------------------------------------------------------------------ -// Paragraph 9.6 - -void VP8ParseQuant(VP8Decoder* const dec) { - VP8BitReader* const br = &dec->br_; - const int base_q0 = VP8GetValue(br, 7); - const int dqy1_dc = VP8Get(br) ? VP8GetSignedValue(br, 4) : 0; - const int dqy2_dc = VP8Get(br) ? VP8GetSignedValue(br, 4) : 0; - const int dqy2_ac = VP8Get(br) ? VP8GetSignedValue(br, 4) : 0; - const int dquv_dc = VP8Get(br) ? VP8GetSignedValue(br, 4) : 0; - const int dquv_ac = VP8Get(br) ? VP8GetSignedValue(br, 4) : 0; - - const VP8SegmentHeader* const hdr = &dec->segment_hdr_; - int i; - - for (i = 0; i < NUM_MB_SEGMENTS; ++i) { - int q; - if (hdr->use_segment_) { - q = hdr->quantizer_[i]; - if (!hdr->absolute_delta_) { - q += base_q0; - } - } else { - if (i > 0) { - dec->dqm_[i] = dec->dqm_[0]; - continue; - } else { - q = base_q0; - } - } - { - VP8QuantMatrix* const m = &dec->dqm_[i]; - m->y1_mat_[0] = kDcTable[clip(q + dqy1_dc, 127)]; - m->y1_mat_[1] = kAcTable[clip(q + 0, 127)]; - - m->y2_mat_[0] = kDcTable[clip(q + dqy2_dc, 127)] * 2; - // For all x in [0..284], x*155/100 is bitwise equal to (x*101581) >> 16. - // The smallest precision for that is '(x*6349) >> 12' but 16 is a good - // word size. - m->y2_mat_[1] = (kAcTable[clip(q + dqy2_ac, 127)] * 101581) >> 16; - if (m->y2_mat_[1] < 8) m->y2_mat_[1] = 8; - - m->uv_mat_[0] = kDcTable[clip(q + dquv_dc, 117)]; - m->uv_mat_[1] = kAcTable[clip(q + dquv_ac, 127)]; - - m->uv_quant_ = q + dquv_ac; // for dithering strength evaluation - } - } -} - -//------------------------------------------------------------------------------ - diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/tree_dec.c b/Dependencies/FreeImage/Source/LibWebP/src/dec/tree_dec.c deleted file mode 100644 index 2c1e2c9..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/tree_dec.c +++ /dev/null @@ -1,532 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Coding trees and probas -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dec/vp8i_dec.h" -#include "src/utils/bit_reader_inl_utils.h" - -#if !defined(USE_GENERIC_TREE) -#if !defined(__arm__) && !defined(_M_ARM) && !defined(__aarch64__) -// using a table is ~1-2% slower on ARM. Prefer the coded-tree approach then. -#define USE_GENERIC_TREE 1 // ALTERNATE_CODE -#else -#define USE_GENERIC_TREE 0 -#endif -#endif // USE_GENERIC_TREE - -#if (USE_GENERIC_TREE == 1) -static const int8_t kYModesIntra4[18] = { - -B_DC_PRED, 1, - -B_TM_PRED, 2, - -B_VE_PRED, 3, - 4, 6, - -B_HE_PRED, 5, - -B_RD_PRED, -B_VR_PRED, - -B_LD_PRED, 7, - -B_VL_PRED, 8, - -B_HD_PRED, -B_HU_PRED -}; -#endif - -//------------------------------------------------------------------------------ -// Default probabilities - -// Paragraph 13.5 -static const uint8_t - CoeffsProba0[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS] = { - { { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } - }, - { { 253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128 }, - { 189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128 }, - { 106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128 } - }, - { { 1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128 }, - { 181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128 }, - { 78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128 }, - }, - { { 1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128 }, - { 184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128 }, - { 77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128 }, - }, - { { 1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128 }, - { 170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128 }, - { 37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128 } - }, - { { 1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128 }, - { 207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128 }, - { 102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128 } - }, - { { 1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128 }, - { 177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128 }, - { 80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128 } - }, - { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } - } - }, - { { { 198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62 }, - { 131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1 }, - { 68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128 } - }, - { { 1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128 }, - { 184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128 }, - { 81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128 } - }, - { { 1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128 }, - { 99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128 }, - { 23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128 } - }, - { { 1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128 }, - { 109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128 }, - { 44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128 } - }, - { { 1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128 }, - { 94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128 }, - { 22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128 } - }, - { { 1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128 }, - { 124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128 }, - { 35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128 } - }, - { { 1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128 }, - { 121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128 }, - { 45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128 } - }, - { { 1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128 }, - { 203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128 } - } - }, - { { { 253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128 }, - { 175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128 }, - { 73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128 } - }, - { { 1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128 }, - { 239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128 }, - { 155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128 } - }, - { { 1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128 }, - { 201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128 }, - { 69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128 } - }, - { { 1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128 }, - { 141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128 } - }, - { { 1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128 }, - { 149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 } - }, - { { 1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128 } - }, - { { 1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128 } - }, - { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } - } - }, - { { { 202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255 }, - { 126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128 }, - { 61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128 } - }, - { { 1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128 }, - { 166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128 }, - { 39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128 } - }, - { { 1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128 }, - { 124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128 }, - { 24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128 } - }, - { { 1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128 }, - { 149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128 }, - { 28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128 } - }, - { { 1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128 }, - { 123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128 }, - { 20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128 } - }, - { { 1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128 }, - { 168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128 }, - { 47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128 } - }, - { { 1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128 }, - { 141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128 }, - { 42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128 } - }, - { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 } - } - } -}; - -// Paragraph 11.5 -static const uint8_t kBModesProba[NUM_BMODES][NUM_BMODES][NUM_BMODES - 1] = { - { { 231, 120, 48, 89, 115, 113, 120, 152, 112 }, - { 152, 179, 64, 126, 170, 118, 46, 70, 95 }, - { 175, 69, 143, 80, 85, 82, 72, 155, 103 }, - { 56, 58, 10, 171, 218, 189, 17, 13, 152 }, - { 114, 26, 17, 163, 44, 195, 21, 10, 173 }, - { 121, 24, 80, 195, 26, 62, 44, 64, 85 }, - { 144, 71, 10, 38, 171, 213, 144, 34, 26 }, - { 170, 46, 55, 19, 136, 160, 33, 206, 71 }, - { 63, 20, 8, 114, 114, 208, 12, 9, 226 }, - { 81, 40, 11, 96, 182, 84, 29, 16, 36 } }, - { { 134, 183, 89, 137, 98, 101, 106, 165, 148 }, - { 72, 187, 100, 130, 157, 111, 32, 75, 80 }, - { 66, 102, 167, 99, 74, 62, 40, 234, 128 }, - { 41, 53, 9, 178, 241, 141, 26, 8, 107 }, - { 74, 43, 26, 146, 73, 166, 49, 23, 157 }, - { 65, 38, 105, 160, 51, 52, 31, 115, 128 }, - { 104, 79, 12, 27, 217, 255, 87, 17, 7 }, - { 87, 68, 71, 44, 114, 51, 15, 186, 23 }, - { 47, 41, 14, 110, 182, 183, 21, 17, 194 }, - { 66, 45, 25, 102, 197, 189, 23, 18, 22 } }, - { { 88, 88, 147, 150, 42, 46, 45, 196, 205 }, - { 43, 97, 183, 117, 85, 38, 35, 179, 61 }, - { 39, 53, 200, 87, 26, 21, 43, 232, 171 }, - { 56, 34, 51, 104, 114, 102, 29, 93, 77 }, - { 39, 28, 85, 171, 58, 165, 90, 98, 64 }, - { 34, 22, 116, 206, 23, 34, 43, 166, 73 }, - { 107, 54, 32, 26, 51, 1, 81, 43, 31 }, - { 68, 25, 106, 22, 64, 171, 36, 225, 114 }, - { 34, 19, 21, 102, 132, 188, 16, 76, 124 }, - { 62, 18, 78, 95, 85, 57, 50, 48, 51 } }, - { { 193, 101, 35, 159, 215, 111, 89, 46, 111 }, - { 60, 148, 31, 172, 219, 228, 21, 18, 111 }, - { 112, 113, 77, 85, 179, 255, 38, 120, 114 }, - { 40, 42, 1, 196, 245, 209, 10, 25, 109 }, - { 88, 43, 29, 140, 166, 213, 37, 43, 154 }, - { 61, 63, 30, 155, 67, 45, 68, 1, 209 }, - { 100, 80, 8, 43, 154, 1, 51, 26, 71 }, - { 142, 78, 78, 16, 255, 128, 34, 197, 171 }, - { 41, 40, 5, 102, 211, 183, 4, 1, 221 }, - { 51, 50, 17, 168, 209, 192, 23, 25, 82 } }, - { { 138, 31, 36, 171, 27, 166, 38, 44, 229 }, - { 67, 87, 58, 169, 82, 115, 26, 59, 179 }, - { 63, 59, 90, 180, 59, 166, 93, 73, 154 }, - { 40, 40, 21, 116, 143, 209, 34, 39, 175 }, - { 47, 15, 16, 183, 34, 223, 49, 45, 183 }, - { 46, 17, 33, 183, 6, 98, 15, 32, 183 }, - { 57, 46, 22, 24, 128, 1, 54, 17, 37 }, - { 65, 32, 73, 115, 28, 128, 23, 128, 205 }, - { 40, 3, 9, 115, 51, 192, 18, 6, 223 }, - { 87, 37, 9, 115, 59, 77, 64, 21, 47 } }, - { { 104, 55, 44, 218, 9, 54, 53, 130, 226 }, - { 64, 90, 70, 205, 40, 41, 23, 26, 57 }, - { 54, 57, 112, 184, 5, 41, 38, 166, 213 }, - { 30, 34, 26, 133, 152, 116, 10, 32, 134 }, - { 39, 19, 53, 221, 26, 114, 32, 73, 255 }, - { 31, 9, 65, 234, 2, 15, 1, 118, 73 }, - { 75, 32, 12, 51, 192, 255, 160, 43, 51 }, - { 88, 31, 35, 67, 102, 85, 55, 186, 85 }, - { 56, 21, 23, 111, 59, 205, 45, 37, 192 }, - { 55, 38, 70, 124, 73, 102, 1, 34, 98 } }, - { { 125, 98, 42, 88, 104, 85, 117, 175, 82 }, - { 95, 84, 53, 89, 128, 100, 113, 101, 45 }, - { 75, 79, 123, 47, 51, 128, 81, 171, 1 }, - { 57, 17, 5, 71, 102, 57, 53, 41, 49 }, - { 38, 33, 13, 121, 57, 73, 26, 1, 85 }, - { 41, 10, 67, 138, 77, 110, 90, 47, 114 }, - { 115, 21, 2, 10, 102, 255, 166, 23, 6 }, - { 101, 29, 16, 10, 85, 128, 101, 196, 26 }, - { 57, 18, 10, 102, 102, 213, 34, 20, 43 }, - { 117, 20, 15, 36, 163, 128, 68, 1, 26 } }, - { { 102, 61, 71, 37, 34, 53, 31, 243, 192 }, - { 69, 60, 71, 38, 73, 119, 28, 222, 37 }, - { 68, 45, 128, 34, 1, 47, 11, 245, 171 }, - { 62, 17, 19, 70, 146, 85, 55, 62, 70 }, - { 37, 43, 37, 154, 100, 163, 85, 160, 1 }, - { 63, 9, 92, 136, 28, 64, 32, 201, 85 }, - { 75, 15, 9, 9, 64, 255, 184, 119, 16 }, - { 86, 6, 28, 5, 64, 255, 25, 248, 1 }, - { 56, 8, 17, 132, 137, 255, 55, 116, 128 }, - { 58, 15, 20, 82, 135, 57, 26, 121, 40 } }, - { { 164, 50, 31, 137, 154, 133, 25, 35, 218 }, - { 51, 103, 44, 131, 131, 123, 31, 6, 158 }, - { 86, 40, 64, 135, 148, 224, 45, 183, 128 }, - { 22, 26, 17, 131, 240, 154, 14, 1, 209 }, - { 45, 16, 21, 91, 64, 222, 7, 1, 197 }, - { 56, 21, 39, 155, 60, 138, 23, 102, 213 }, - { 83, 12, 13, 54, 192, 255, 68, 47, 28 }, - { 85, 26, 85, 85, 128, 128, 32, 146, 171 }, - { 18, 11, 7, 63, 144, 171, 4, 4, 246 }, - { 35, 27, 10, 146, 174, 171, 12, 26, 128 } }, - { { 190, 80, 35, 99, 180, 80, 126, 54, 45 }, - { 85, 126, 47, 87, 176, 51, 41, 20, 32 }, - { 101, 75, 128, 139, 118, 146, 116, 128, 85 }, - { 56, 41, 15, 176, 236, 85, 37, 9, 62 }, - { 71, 30, 17, 119, 118, 255, 17, 18, 138 }, - { 101, 38, 60, 138, 55, 70, 43, 26, 142 }, - { 146, 36, 19, 30, 171, 255, 97, 27, 20 }, - { 138, 45, 61, 62, 219, 1, 81, 188, 64 }, - { 32, 41, 20, 117, 151, 142, 20, 21, 163 }, - { 112, 19, 12, 61, 195, 128, 48, 4, 24 } } -}; - -void VP8ResetProba(VP8Proba* const proba) { - memset(proba->segments_, 255u, sizeof(proba->segments_)); - // proba->bands_[][] is initialized later -} - -static void ParseIntraMode(VP8BitReader* const br, - VP8Decoder* const dec, int mb_x) { - uint8_t* const top = dec->intra_t_ + 4 * mb_x; - uint8_t* const left = dec->intra_l_; - VP8MBData* const block = dec->mb_data_ + mb_x; - - // Note: we don't save segment map (yet), as we don't expect - // to decode more than 1 keyframe. - if (dec->segment_hdr_.update_map_) { - // Hardcoded tree parsing - block->segment_ = !VP8GetBit(br, dec->proba_.segments_[0]) - ? VP8GetBit(br, dec->proba_.segments_[1]) - : 2 + VP8GetBit(br, dec->proba_.segments_[2]); - } else { - block->segment_ = 0; // default for intra - } - if (dec->use_skip_proba_) block->skip_ = VP8GetBit(br, dec->skip_p_); - - block->is_i4x4_ = !VP8GetBit(br, 145); // decide for B_PRED first - if (!block->is_i4x4_) { - // Hardcoded 16x16 intra-mode decision tree. - const int ymode = - VP8GetBit(br, 156) ? (VP8GetBit(br, 128) ? TM_PRED : H_PRED) - : (VP8GetBit(br, 163) ? V_PRED : DC_PRED); - block->imodes_[0] = ymode; - memset(top, ymode, 4 * sizeof(*top)); - memset(left, ymode, 4 * sizeof(*left)); - } else { - uint8_t* modes = block->imodes_; - int y; - for (y = 0; y < 4; ++y) { - int ymode = left[y]; - int x; - for (x = 0; x < 4; ++x) { - const uint8_t* const prob = kBModesProba[top[x]][ymode]; -#if (USE_GENERIC_TREE == 1) - // Generic tree-parsing - int i = kYModesIntra4[VP8GetBit(br, prob[0])]; - while (i > 0) { - i = kYModesIntra4[2 * i + VP8GetBit(br, prob[i])]; - } - ymode = -i; -#else - // Hardcoded tree parsing - ymode = !VP8GetBit(br, prob[0]) ? B_DC_PRED : - !VP8GetBit(br, prob[1]) ? B_TM_PRED : - !VP8GetBit(br, prob[2]) ? B_VE_PRED : - !VP8GetBit(br, prob[3]) ? - (!VP8GetBit(br, prob[4]) ? B_HE_PRED : - (!VP8GetBit(br, prob[5]) ? B_RD_PRED : B_VR_PRED)) : - (!VP8GetBit(br, prob[6]) ? B_LD_PRED : - (!VP8GetBit(br, prob[7]) ? B_VL_PRED : - (!VP8GetBit(br, prob[8]) ? B_HD_PRED : B_HU_PRED))); -#endif // USE_GENERIC_TREE - top[x] = ymode; - } - memcpy(modes, top, 4 * sizeof(*top)); - modes += 4; - left[y] = ymode; - } - } - // Hardcoded UVMode decision tree - block->uvmode_ = !VP8GetBit(br, 142) ? DC_PRED - : !VP8GetBit(br, 114) ? V_PRED - : VP8GetBit(br, 183) ? TM_PRED : H_PRED; -} - -int VP8ParseIntraModeRow(VP8BitReader* const br, VP8Decoder* const dec) { - int mb_x; - for (mb_x = 0; mb_x < dec->mb_w_; ++mb_x) { - ParseIntraMode(br, dec, mb_x); - } - return !dec->br_.eof_; -} - -//------------------------------------------------------------------------------ -// Paragraph 13 - -static const uint8_t - CoeffsUpdateProba[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS] = { - { { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255 }, - { 250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - } - }, - { { { 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255 }, - { 234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255 } - }, - { { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - } - }, - { { { 186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255 } - }, - { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - } - }, - { { { 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255 }, - { 248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - } - } -}; - -// Paragraph 9.9 - -static const uint8_t kBands[16 + 1] = { - 0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, - 0 // extra entry as sentinel -}; - -void VP8ParseProba(VP8BitReader* const br, VP8Decoder* const dec) { - VP8Proba* const proba = &dec->proba_; - int t, b, c, p; - for (t = 0; t < NUM_TYPES; ++t) { - for (b = 0; b < NUM_BANDS; ++b) { - for (c = 0; c < NUM_CTX; ++c) { - for (p = 0; p < NUM_PROBAS; ++p) { - const int v = VP8GetBit(br, CoeffsUpdateProba[t][b][c][p]) ? - VP8GetValue(br, 8) : CoeffsProba0[t][b][c][p]; - proba->bands_[t][b].probas_[c][p] = v; - } - } - } - for (b = 0; b < 16 + 1; ++b) { - proba->bands_ptr_[t][b] = &proba->bands_[t][kBands[b]]; - } - } - dec->use_skip_proba_ = VP8Get(br); - if (dec->use_skip_proba_) { - dec->skip_p_ = VP8GetValue(br, 8); - } -} - diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8_dec.c b/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8_dec.c deleted file mode 100644 index c2ea8dd..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8_dec.c +++ /dev/null @@ -1,721 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// main entry for the decoder -// -// Author: Skal (pascal.massimino@gmail.com) - -#include - -#include "src/dec/alphai_dec.h" -#include "src/dec/vp8i_dec.h" -#include "src/dec/vp8li_dec.h" -#include "src/dec/webpi_dec.h" -#include "src/utils/bit_reader_inl_utils.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ - -int WebPGetDecoderVersion(void) { - return (DEC_MAJ_VERSION << 16) | (DEC_MIN_VERSION << 8) | DEC_REV_VERSION; -} - -//------------------------------------------------------------------------------ -// Signature and pointer-to-function for GetCoeffs() variants below. - -typedef int (*GetCoeffsFunc)(VP8BitReader* const br, - const VP8BandProbas* const prob[], - int ctx, const quant_t dq, int n, int16_t* out); -static volatile GetCoeffsFunc GetCoeffs = NULL; - -static void InitGetCoeffs(void); - -//------------------------------------------------------------------------------ -// VP8Decoder - -static void SetOk(VP8Decoder* const dec) { - dec->status_ = VP8_STATUS_OK; - dec->error_msg_ = "OK"; -} - -int VP8InitIoInternal(VP8Io* const io, int version) { - if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) { - return 0; // mismatch error - } - if (io != NULL) { - memset(io, 0, sizeof(*io)); - } - return 1; -} - -VP8Decoder* VP8New(void) { - VP8Decoder* const dec = (VP8Decoder*)WebPSafeCalloc(1ULL, sizeof(*dec)); - if (dec != NULL) { - SetOk(dec); - WebPGetWorkerInterface()->Init(&dec->worker_); - dec->ready_ = 0; - dec->num_parts_minus_one_ = 0; - InitGetCoeffs(); - } - return dec; -} - -VP8StatusCode VP8Status(VP8Decoder* const dec) { - if (!dec) return VP8_STATUS_INVALID_PARAM; - return dec->status_; -} - -const char* VP8StatusMessage(VP8Decoder* const dec) { - if (dec == NULL) return "no object"; - if (!dec->error_msg_) return "OK"; - return dec->error_msg_; -} - -void VP8Delete(VP8Decoder* const dec) { - if (dec != NULL) { - VP8Clear(dec); - WebPSafeFree(dec); - } -} - -int VP8SetError(VP8Decoder* const dec, - VP8StatusCode error, const char* const msg) { - // The oldest error reported takes precedence over the new one. - if (dec->status_ == VP8_STATUS_OK) { - dec->status_ = error; - dec->error_msg_ = msg; - dec->ready_ = 0; - } - return 0; -} - -//------------------------------------------------------------------------------ - -int VP8CheckSignature(const uint8_t* const data, size_t data_size) { - return (data_size >= 3 && - data[0] == 0x9d && data[1] == 0x01 && data[2] == 0x2a); -} - -int VP8GetInfo(const uint8_t* data, size_t data_size, size_t chunk_size, - int* const width, int* const height) { - if (data == NULL || data_size < VP8_FRAME_HEADER_SIZE) { - return 0; // not enough data - } - // check signature - if (!VP8CheckSignature(data + 3, data_size - 3)) { - return 0; // Wrong signature. - } else { - const uint32_t bits = data[0] | (data[1] << 8) | (data[2] << 16); - const int key_frame = !(bits & 1); - const int w = ((data[7] << 8) | data[6]) & 0x3fff; - const int h = ((data[9] << 8) | data[8]) & 0x3fff; - - if (!key_frame) { // Not a keyframe. - return 0; - } - - if (((bits >> 1) & 7) > 3) { - return 0; // unknown profile - } - if (!((bits >> 4) & 1)) { - return 0; // first frame is invisible! - } - if (((bits >> 5)) >= chunk_size) { // partition_length - return 0; // inconsistent size information. - } - if (w == 0 || h == 0) { - return 0; // We don't support both width and height to be zero. - } - - if (width) { - *width = w; - } - if (height) { - *height = h; - } - - return 1; - } -} - -//------------------------------------------------------------------------------ -// Header parsing - -static void ResetSegmentHeader(VP8SegmentHeader* const hdr) { - assert(hdr != NULL); - hdr->use_segment_ = 0; - hdr->update_map_ = 0; - hdr->absolute_delta_ = 1; - memset(hdr->quantizer_, 0, sizeof(hdr->quantizer_)); - memset(hdr->filter_strength_, 0, sizeof(hdr->filter_strength_)); -} - -// Paragraph 9.3 -static int ParseSegmentHeader(VP8BitReader* br, - VP8SegmentHeader* hdr, VP8Proba* proba) { - assert(br != NULL); - assert(hdr != NULL); - hdr->use_segment_ = VP8Get(br); - if (hdr->use_segment_) { - hdr->update_map_ = VP8Get(br); - if (VP8Get(br)) { // update data - int s; - hdr->absolute_delta_ = VP8Get(br); - for (s = 0; s < NUM_MB_SEGMENTS; ++s) { - hdr->quantizer_[s] = VP8Get(br) ? VP8GetSignedValue(br, 7) : 0; - } - for (s = 0; s < NUM_MB_SEGMENTS; ++s) { - hdr->filter_strength_[s] = VP8Get(br) ? VP8GetSignedValue(br, 6) : 0; - } - } - if (hdr->update_map_) { - int s; - for (s = 0; s < MB_FEATURE_TREE_PROBS; ++s) { - proba->segments_[s] = VP8Get(br) ? VP8GetValue(br, 8) : 255u; - } - } - } else { - hdr->update_map_ = 0; - } - return !br->eof_; -} - -// Paragraph 9.5 -// This function returns VP8_STATUS_SUSPENDED if we don't have all the -// necessary data in 'buf'. -// This case is not necessarily an error (for incremental decoding). -// Still, no bitreader is ever initialized to make it possible to read -// unavailable memory. -// If we don't even have the partitions' sizes, than VP8_STATUS_NOT_ENOUGH_DATA -// is returned, and this is an unrecoverable error. -// If the partitions were positioned ok, VP8_STATUS_OK is returned. -static VP8StatusCode ParsePartitions(VP8Decoder* const dec, - const uint8_t* buf, size_t size) { - VP8BitReader* const br = &dec->br_; - const uint8_t* sz = buf; - const uint8_t* buf_end = buf + size; - const uint8_t* part_start; - size_t size_left = size; - size_t last_part; - size_t p; - - dec->num_parts_minus_one_ = (1 << VP8GetValue(br, 2)) - 1; - last_part = dec->num_parts_minus_one_; - if (size < 3 * last_part) { - // we can't even read the sizes with sz[]! That's a failure. - return VP8_STATUS_NOT_ENOUGH_DATA; - } - part_start = buf + last_part * 3; - size_left -= last_part * 3; - for (p = 0; p < last_part; ++p) { - size_t psize = sz[0] | (sz[1] << 8) | (sz[2] << 16); - if (psize > size_left) psize = size_left; - VP8InitBitReader(dec->parts_ + p, part_start, psize); - part_start += psize; - size_left -= psize; - sz += 3; - } - VP8InitBitReader(dec->parts_ + last_part, part_start, size_left); - return (part_start < buf_end) ? VP8_STATUS_OK : - VP8_STATUS_SUSPENDED; // Init is ok, but there's not enough data -} - -// Paragraph 9.4 -static int ParseFilterHeader(VP8BitReader* br, VP8Decoder* const dec) { - VP8FilterHeader* const hdr = &dec->filter_hdr_; - hdr->simple_ = VP8Get(br); - hdr->level_ = VP8GetValue(br, 6); - hdr->sharpness_ = VP8GetValue(br, 3); - hdr->use_lf_delta_ = VP8Get(br); - if (hdr->use_lf_delta_) { - if (VP8Get(br)) { // update lf-delta? - int i; - for (i = 0; i < NUM_REF_LF_DELTAS; ++i) { - if (VP8Get(br)) { - hdr->ref_lf_delta_[i] = VP8GetSignedValue(br, 6); - } - } - for (i = 0; i < NUM_MODE_LF_DELTAS; ++i) { - if (VP8Get(br)) { - hdr->mode_lf_delta_[i] = VP8GetSignedValue(br, 6); - } - } - } - } - dec->filter_type_ = (hdr->level_ == 0) ? 0 : hdr->simple_ ? 1 : 2; - return !br->eof_; -} - -// Topmost call -int VP8GetHeaders(VP8Decoder* const dec, VP8Io* const io) { - const uint8_t* buf; - size_t buf_size; - VP8FrameHeader* frm_hdr; - VP8PictureHeader* pic_hdr; - VP8BitReader* br; - VP8StatusCode status; - - if (dec == NULL) { - return 0; - } - SetOk(dec); - if (io == NULL) { - return VP8SetError(dec, VP8_STATUS_INVALID_PARAM, - "null VP8Io passed to VP8GetHeaders()"); - } - buf = io->data; - buf_size = io->data_size; - if (buf_size < 4) { - return VP8SetError(dec, VP8_STATUS_NOT_ENOUGH_DATA, - "Truncated header."); - } - - // Paragraph 9.1 - { - const uint32_t bits = buf[0] | (buf[1] << 8) | (buf[2] << 16); - frm_hdr = &dec->frm_hdr_; - frm_hdr->key_frame_ = !(bits & 1); - frm_hdr->profile_ = (bits >> 1) & 7; - frm_hdr->show_ = (bits >> 4) & 1; - frm_hdr->partition_length_ = (bits >> 5); - if (frm_hdr->profile_ > 3) { - return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR, - "Incorrect keyframe parameters."); - } - if (!frm_hdr->show_) { - return VP8SetError(dec, VP8_STATUS_UNSUPPORTED_FEATURE, - "Frame not displayable."); - } - buf += 3; - buf_size -= 3; - } - - pic_hdr = &dec->pic_hdr_; - if (frm_hdr->key_frame_) { - // Paragraph 9.2 - if (buf_size < 7) { - return VP8SetError(dec, VP8_STATUS_NOT_ENOUGH_DATA, - "cannot parse picture header"); - } - if (!VP8CheckSignature(buf, buf_size)) { - return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR, - "Bad code word"); - } - pic_hdr->width_ = ((buf[4] << 8) | buf[3]) & 0x3fff; - pic_hdr->xscale_ = buf[4] >> 6; // ratio: 1, 5/4 5/3 or 2 - pic_hdr->height_ = ((buf[6] << 8) | buf[5]) & 0x3fff; - pic_hdr->yscale_ = buf[6] >> 6; - buf += 7; - buf_size -= 7; - - dec->mb_w_ = (pic_hdr->width_ + 15) >> 4; - dec->mb_h_ = (pic_hdr->height_ + 15) >> 4; - - // Setup default output area (can be later modified during io->setup()) - io->width = pic_hdr->width_; - io->height = pic_hdr->height_; - // IMPORTANT! use some sane dimensions in crop_* and scaled_* fields. - // So they can be used interchangeably without always testing for - // 'use_cropping'. - io->use_cropping = 0; - io->crop_top = 0; - io->crop_left = 0; - io->crop_right = io->width; - io->crop_bottom = io->height; - io->use_scaling = 0; - io->scaled_width = io->width; - io->scaled_height = io->height; - - io->mb_w = io->width; // sanity check - io->mb_h = io->height; // ditto - - VP8ResetProba(&dec->proba_); - ResetSegmentHeader(&dec->segment_hdr_); - } - - // Check if we have all the partition #0 available, and initialize dec->br_ - // to read this partition (and this partition only). - if (frm_hdr->partition_length_ > buf_size) { - return VP8SetError(dec, VP8_STATUS_NOT_ENOUGH_DATA, - "bad partition length"); - } - - br = &dec->br_; - VP8InitBitReader(br, buf, frm_hdr->partition_length_); - buf += frm_hdr->partition_length_; - buf_size -= frm_hdr->partition_length_; - - if (frm_hdr->key_frame_) { - pic_hdr->colorspace_ = VP8Get(br); - pic_hdr->clamp_type_ = VP8Get(br); - } - if (!ParseSegmentHeader(br, &dec->segment_hdr_, &dec->proba_)) { - return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR, - "cannot parse segment header"); - } - // Filter specs - if (!ParseFilterHeader(br, dec)) { - return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR, - "cannot parse filter header"); - } - status = ParsePartitions(dec, buf, buf_size); - if (status != VP8_STATUS_OK) { - return VP8SetError(dec, status, "cannot parse partitions"); - } - - // quantizer change - VP8ParseQuant(dec); - - // Frame buffer marking - if (!frm_hdr->key_frame_) { - return VP8SetError(dec, VP8_STATUS_UNSUPPORTED_FEATURE, - "Not a key frame."); - } - - VP8Get(br); // ignore the value of update_proba_ - - VP8ParseProba(br, dec); - - // sanitized state - dec->ready_ = 1; - return 1; -} - -//------------------------------------------------------------------------------ -// Residual decoding (Paragraph 13.2 / 13.3) - -static const uint8_t kCat3[] = { 173, 148, 140, 0 }; -static const uint8_t kCat4[] = { 176, 155, 140, 135, 0 }; -static const uint8_t kCat5[] = { 180, 157, 141, 134, 130, 0 }; -static const uint8_t kCat6[] = - { 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 }; -static const uint8_t* const kCat3456[] = { kCat3, kCat4, kCat5, kCat6 }; -static const uint8_t kZigzag[16] = { - 0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15 -}; - -// See section 13-2: http://tools.ietf.org/html/rfc6386#section-13.2 -static int GetLargeValue(VP8BitReader* const br, const uint8_t* const p) { - int v; - if (!VP8GetBit(br, p[3])) { - if (!VP8GetBit(br, p[4])) { - v = 2; - } else { - v = 3 + VP8GetBit(br, p[5]); - } - } else { - if (!VP8GetBit(br, p[6])) { - if (!VP8GetBit(br, p[7])) { - v = 5 + VP8GetBit(br, 159); - } else { - v = 7 + 2 * VP8GetBit(br, 165); - v += VP8GetBit(br, 145); - } - } else { - const uint8_t* tab; - const int bit1 = VP8GetBit(br, p[8]); - const int bit0 = VP8GetBit(br, p[9 + bit1]); - const int cat = 2 * bit1 + bit0; - v = 0; - for (tab = kCat3456[cat]; *tab; ++tab) { - v += v + VP8GetBit(br, *tab); - } - v += 3 + (8 << cat); - } - } - return v; -} - -// Returns the position of the last non-zero coeff plus one -static int GetCoeffsFast(VP8BitReader* const br, - const VP8BandProbas* const prob[], - int ctx, const quant_t dq, int n, int16_t* out) { - const uint8_t* p = prob[n]->probas_[ctx]; - for (; n < 16; ++n) { - if (!VP8GetBit(br, p[0])) { - return n; // previous coeff was last non-zero coeff - } - while (!VP8GetBit(br, p[1])) { // sequence of zero coeffs - p = prob[++n]->probas_[0]; - if (n == 16) return 16; - } - { // non zero coeff - const VP8ProbaArray* const p_ctx = &prob[n + 1]->probas_[0]; - int v; - if (!VP8GetBit(br, p[2])) { - v = 1; - p = p_ctx[1]; - } else { - v = GetLargeValue(br, p); - p = p_ctx[2]; - } - out[kZigzag[n]] = VP8GetSigned(br, v) * dq[n > 0]; - } - } - return 16; -} - -// This version of GetCoeffs() uses VP8GetBitAlt() which is an alternate version -// of VP8GetBitAlt() targeting specific platforms. -static int GetCoeffsAlt(VP8BitReader* const br, - const VP8BandProbas* const prob[], - int ctx, const quant_t dq, int n, int16_t* out) { - const uint8_t* p = prob[n]->probas_[ctx]; - for (; n < 16; ++n) { - if (!VP8GetBitAlt(br, p[0])) { - return n; // previous coeff was last non-zero coeff - } - while (!VP8GetBitAlt(br, p[1])) { // sequence of zero coeffs - p = prob[++n]->probas_[0]; - if (n == 16) return 16; - } - { // non zero coeff - const VP8ProbaArray* const p_ctx = &prob[n + 1]->probas_[0]; - int v; - if (!VP8GetBitAlt(br, p[2])) { - v = 1; - p = p_ctx[1]; - } else { - v = GetLargeValue(br, p); - p = p_ctx[2]; - } - out[kZigzag[n]] = VP8GetSigned(br, v) * dq[n > 0]; - } - } - return 16; -} - -static WEBP_TSAN_IGNORE_FUNCTION void InitGetCoeffs(void) { - if (GetCoeffs == NULL) { - if (VP8GetCPUInfo != NULL && VP8GetCPUInfo(kSlowSSSE3)) { - GetCoeffs = GetCoeffsAlt; - } else { - GetCoeffs = GetCoeffsFast; - } - } -} - -static WEBP_INLINE uint32_t NzCodeBits(uint32_t nz_coeffs, int nz, int dc_nz) { - nz_coeffs <<= 2; - nz_coeffs |= (nz > 3) ? 3 : (nz > 1) ? 2 : dc_nz; - return nz_coeffs; -} - -static int ParseResiduals(VP8Decoder* const dec, - VP8MB* const mb, VP8BitReader* const token_br) { - const VP8BandProbas* (* const bands)[16 + 1] = dec->proba_.bands_ptr_; - const VP8BandProbas* const * ac_proba; - VP8MBData* const block = dec->mb_data_ + dec->mb_x_; - const VP8QuantMatrix* const q = &dec->dqm_[block->segment_]; - int16_t* dst = block->coeffs_; - VP8MB* const left_mb = dec->mb_info_ - 1; - uint8_t tnz, lnz; - uint32_t non_zero_y = 0; - uint32_t non_zero_uv = 0; - int x, y, ch; - uint32_t out_t_nz, out_l_nz; - int first; - - memset(dst, 0, 384 * sizeof(*dst)); - if (!block->is_i4x4_) { // parse DC - int16_t dc[16] = { 0 }; - const int ctx = mb->nz_dc_ + left_mb->nz_dc_; - const int nz = GetCoeffs(token_br, bands[1], ctx, q->y2_mat_, 0, dc); - mb->nz_dc_ = left_mb->nz_dc_ = (nz > 0); - if (nz > 1) { // more than just the DC -> perform the full transform - VP8TransformWHT(dc, dst); - } else { // only DC is non-zero -> inlined simplified transform - int i; - const int dc0 = (dc[0] + 3) >> 3; - for (i = 0; i < 16 * 16; i += 16) dst[i] = dc0; - } - first = 1; - ac_proba = bands[0]; - } else { - first = 0; - ac_proba = bands[3]; - } - - tnz = mb->nz_ & 0x0f; - lnz = left_mb->nz_ & 0x0f; - for (y = 0; y < 4; ++y) { - int l = lnz & 1; - uint32_t nz_coeffs = 0; - for (x = 0; x < 4; ++x) { - const int ctx = l + (tnz & 1); - const int nz = GetCoeffs(token_br, ac_proba, ctx, q->y1_mat_, first, dst); - l = (nz > first); - tnz = (tnz >> 1) | (l << 7); - nz_coeffs = NzCodeBits(nz_coeffs, nz, dst[0] != 0); - dst += 16; - } - tnz >>= 4; - lnz = (lnz >> 1) | (l << 7); - non_zero_y = (non_zero_y << 8) | nz_coeffs; - } - out_t_nz = tnz; - out_l_nz = lnz >> 4; - - for (ch = 0; ch < 4; ch += 2) { - uint32_t nz_coeffs = 0; - tnz = mb->nz_ >> (4 + ch); - lnz = left_mb->nz_ >> (4 + ch); - for (y = 0; y < 2; ++y) { - int l = lnz & 1; - for (x = 0; x < 2; ++x) { - const int ctx = l + (tnz & 1); - const int nz = GetCoeffs(token_br, bands[2], ctx, q->uv_mat_, 0, dst); - l = (nz > 0); - tnz = (tnz >> 1) | (l << 3); - nz_coeffs = NzCodeBits(nz_coeffs, nz, dst[0] != 0); - dst += 16; - } - tnz >>= 2; - lnz = (lnz >> 1) | (l << 5); - } - // Note: we don't really need the per-4x4 details for U/V blocks. - non_zero_uv |= nz_coeffs << (4 * ch); - out_t_nz |= (tnz << 4) << ch; - out_l_nz |= (lnz & 0xf0) << ch; - } - mb->nz_ = out_t_nz; - left_mb->nz_ = out_l_nz; - - block->non_zero_y_ = non_zero_y; - block->non_zero_uv_ = non_zero_uv; - - // We look at the mode-code of each block and check if some blocks have less - // than three non-zero coeffs (code < 2). This is to avoid dithering flat and - // empty blocks. - block->dither_ = (non_zero_uv & 0xaaaa) ? 0 : q->dither_; - - return !(non_zero_y | non_zero_uv); // will be used for further optimization -} - -//------------------------------------------------------------------------------ -// Main loop - -int VP8DecodeMB(VP8Decoder* const dec, VP8BitReader* const token_br) { - VP8MB* const left = dec->mb_info_ - 1; - VP8MB* const mb = dec->mb_info_ + dec->mb_x_; - VP8MBData* const block = dec->mb_data_ + dec->mb_x_; - int skip = dec->use_skip_proba_ ? block->skip_ : 0; - - if (!skip) { - skip = ParseResiduals(dec, mb, token_br); - } else { - left->nz_ = mb->nz_ = 0; - if (!block->is_i4x4_) { - left->nz_dc_ = mb->nz_dc_ = 0; - } - block->non_zero_y_ = 0; - block->non_zero_uv_ = 0; - block->dither_ = 0; - } - - if (dec->filter_type_ > 0) { // store filter info - VP8FInfo* const finfo = dec->f_info_ + dec->mb_x_; - *finfo = dec->fstrengths_[block->segment_][block->is_i4x4_]; - finfo->f_inner_ |= !skip; - } - - return !token_br->eof_; -} - -void VP8InitScanline(VP8Decoder* const dec) { - VP8MB* const left = dec->mb_info_ - 1; - left->nz_ = 0; - left->nz_dc_ = 0; - memset(dec->intra_l_, B_DC_PRED, sizeof(dec->intra_l_)); - dec->mb_x_ = 0; -} - -static int ParseFrame(VP8Decoder* const dec, VP8Io* io) { - for (dec->mb_y_ = 0; dec->mb_y_ < dec->br_mb_y_; ++dec->mb_y_) { - // Parse bitstream for this row. - VP8BitReader* const token_br = - &dec->parts_[dec->mb_y_ & dec->num_parts_minus_one_]; - if (!VP8ParseIntraModeRow(&dec->br_, dec)) { - return VP8SetError(dec, VP8_STATUS_NOT_ENOUGH_DATA, - "Premature end-of-partition0 encountered."); - } - for (; dec->mb_x_ < dec->mb_w_; ++dec->mb_x_) { - if (!VP8DecodeMB(dec, token_br)) { - return VP8SetError(dec, VP8_STATUS_NOT_ENOUGH_DATA, - "Premature end-of-file encountered."); - } - } - VP8InitScanline(dec); // Prepare for next scanline - - // Reconstruct, filter and emit the row. - if (!VP8ProcessRow(dec, io)) { - return VP8SetError(dec, VP8_STATUS_USER_ABORT, "Output aborted."); - } - } - if (dec->mt_method_ > 0) { - if (!WebPGetWorkerInterface()->Sync(&dec->worker_)) return 0; - } - - return 1; -} - -// Main entry point -int VP8Decode(VP8Decoder* const dec, VP8Io* const io) { - int ok = 0; - if (dec == NULL) { - return 0; - } - if (io == NULL) { - return VP8SetError(dec, VP8_STATUS_INVALID_PARAM, - "NULL VP8Io parameter in VP8Decode()."); - } - - if (!dec->ready_) { - if (!VP8GetHeaders(dec, io)) { - return 0; - } - } - assert(dec->ready_); - - // Finish setting up the decoding parameter. Will call io->setup(). - ok = (VP8EnterCritical(dec, io) == VP8_STATUS_OK); - if (ok) { // good to go. - // Will allocate memory and prepare everything. - if (ok) ok = VP8InitFrame(dec, io); - - // Main decoding loop - if (ok) ok = ParseFrame(dec, io); - - // Exit. - ok &= VP8ExitCritical(dec, io); - } - - if (!ok) { - VP8Clear(dec); - return 0; - } - - dec->ready_ = 0; - return ok; -} - -void VP8Clear(VP8Decoder* const dec) { - if (dec == NULL) { - return; - } - WebPGetWorkerInterface()->End(&dec->worker_); - WebPDeallocateAlphaMemory(dec); - WebPSafeFree(dec->mem_); - dec->mem_ = NULL; - dec->mem_size_ = 0; - memset(&dec->br_, 0, sizeof(dec->br_)); - dec->ready_ = 0; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8_dec.h b/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8_dec.h deleted file mode 100644 index bcdc815..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8_dec.h +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Low-level API for VP8 decoder -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_DEC_VP8_DEC_H_ -#define WEBP_DEC_VP8_DEC_H_ - -#include "src/webp/decode.h" - -#ifdef __cplusplus -extern "C" { -#endif - -//------------------------------------------------------------------------------ -// Lower-level API -// -// These functions provide fine-grained control of the decoding process. -// The call flow should resemble: -// -// VP8Io io; -// VP8InitIo(&io); -// io.data = data; -// io.data_size = size; -// /* customize io's functions (setup()/put()/teardown()) if needed. */ -// -// VP8Decoder* dec = VP8New(); -// int ok = VP8Decode(dec, &io); -// if (!ok) printf("Error: %s\n", VP8StatusMessage(dec)); -// VP8Delete(dec); -// return ok; - -// Input / Output -typedef struct VP8Io VP8Io; -typedef int (*VP8IoPutHook)(const VP8Io* io); -typedef int (*VP8IoSetupHook)(VP8Io* io); -typedef void (*VP8IoTeardownHook)(const VP8Io* io); - -struct VP8Io { - // set by VP8GetHeaders() - int width, height; // picture dimensions, in pixels (invariable). - // These are the original, uncropped dimensions. - // The actual area passed to put() is stored - // in mb_w / mb_h fields. - - // set before calling put() - int mb_y; // position of the current rows (in pixels) - int mb_w; // number of columns in the sample - int mb_h; // number of rows in the sample - const uint8_t* y, *u, *v; // rows to copy (in yuv420 format) - int y_stride; // row stride for luma - int uv_stride; // row stride for chroma - - void* opaque; // user data - - // called when fresh samples are available. Currently, samples are in - // YUV420 format, and can be up to width x 24 in size (depending on the - // in-loop filtering level, e.g.). Should return false in case of error - // or abort request. The actual size of the area to update is mb_w x mb_h - // in size, taking cropping into account. - VP8IoPutHook put; - - // called just before starting to decode the blocks. - // Must return false in case of setup error, true otherwise. If false is - // returned, teardown() will NOT be called. But if the setup succeeded - // and true is returned, then teardown() will always be called afterward. - VP8IoSetupHook setup; - - // Called just after block decoding is finished (or when an error occurred - // during put()). Is NOT called if setup() failed. - VP8IoTeardownHook teardown; - - // this is a recommendation for the user-side yuv->rgb converter. This flag - // is set when calling setup() hook and can be overwritten by it. It then - // can be taken into consideration during the put() method. - int fancy_upsampling; - - // Input buffer. - size_t data_size; - const uint8_t* data; - - // If true, in-loop filtering will not be performed even if present in the - // bitstream. Switching off filtering may speed up decoding at the expense - // of more visible blocking. Note that output will also be non-compliant - // with the VP8 specifications. - int bypass_filtering; - - // Cropping parameters. - int use_cropping; - int crop_left, crop_right, crop_top, crop_bottom; - - // Scaling parameters. - int use_scaling; - int scaled_width, scaled_height; - - // If non NULL, pointer to the alpha data (if present) corresponding to the - // start of the current row (That is: it is pre-offset by mb_y and takes - // cropping into account). - const uint8_t* a; -}; - -// Internal, version-checked, entry point -int VP8InitIoInternal(VP8Io* const, int); - -// Set the custom IO function pointers and user-data. The setter for IO hooks -// should be called before initiating incremental decoding. Returns true if -// WebPIDecoder object is successfully modified, false otherwise. -int WebPISetIOHooks(WebPIDecoder* const idec, - VP8IoPutHook put, - VP8IoSetupHook setup, - VP8IoTeardownHook teardown, - void* user_data); - -// Main decoding object. This is an opaque structure. -typedef struct VP8Decoder VP8Decoder; - -// Create a new decoder object. -VP8Decoder* VP8New(void); - -// Must be called to make sure 'io' is initialized properly. -// Returns false in case of version mismatch. Upon such failure, no other -// decoding function should be called (VP8Decode, VP8GetHeaders, ...) -static WEBP_INLINE int VP8InitIo(VP8Io* const io) { - return VP8InitIoInternal(io, WEBP_DECODER_ABI_VERSION); -} - -// Decode the VP8 frame header. Returns true if ok. -// Note: 'io->data' must be pointing to the start of the VP8 frame header. -int VP8GetHeaders(VP8Decoder* const dec, VP8Io* const io); - -// Decode a picture. Will call VP8GetHeaders() if it wasn't done already. -// Returns false in case of error. -int VP8Decode(VP8Decoder* const dec, VP8Io* const io); - -// Return current status of the decoder: -VP8StatusCode VP8Status(VP8Decoder* const dec); - -// return readable string corresponding to the last status. -const char* VP8StatusMessage(VP8Decoder* const dec); - -// Resets the decoder in its initial state, reclaiming memory. -// Not a mandatory call between calls to VP8Decode(). -void VP8Clear(VP8Decoder* const dec); - -// Destroy the decoder object. -void VP8Delete(VP8Decoder* const dec); - -//------------------------------------------------------------------------------ -// Miscellaneous VP8/VP8L bitstream probing functions. - -// Returns true if the next 3 bytes in data contain the VP8 signature. -WEBP_EXTERN int VP8CheckSignature(const uint8_t* const data, size_t data_size); - -// Validates the VP8 data-header and retrieves basic header information viz -// width and height. Returns 0 in case of formatting error. *width/*height -// can be passed NULL. -WEBP_EXTERN int VP8GetInfo( - const uint8_t* data, - size_t data_size, // data available so far - size_t chunk_size, // total data size expected in the chunk - int* const width, int* const height); - -// Returns true if the next byte(s) in data is a VP8L signature. -WEBP_EXTERN int VP8LCheckSignature(const uint8_t* const data, size_t size); - -// Validates the VP8L data-header and retrieves basic header information viz -// width, height and alpha. Returns 0 in case of formatting error. -// width/height/has_alpha can be passed NULL. -WEBP_EXTERN int VP8LGetInfo( - const uint8_t* data, size_t data_size, // data available so far - int* const width, int* const height, int* const has_alpha); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_DEC_VP8_DEC_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8i_dec.h b/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8i_dec.h deleted file mode 100644 index 68c2857..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8i_dec.h +++ /dev/null @@ -1,319 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// VP8 decoder: internal header. -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_DEC_VP8I_DEC_H_ -#define WEBP_DEC_VP8I_DEC_H_ - -#include // for memcpy() -#include "src/dec/common_dec.h" -#include "src/dec/vp8li_dec.h" -#include "src/utils/bit_reader_utils.h" -#include "src/utils/random_utils.h" -#include "src/utils/thread_utils.h" -#include "src/dsp/dsp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -//------------------------------------------------------------------------------ -// Various defines and enums - -// version numbers -#define DEC_MAJ_VERSION 1 -#define DEC_MIN_VERSION 0 -#define DEC_REV_VERSION 0 - -// YUV-cache parameters. Cache is 32-bytes wide (= one cacheline). -// Constraints are: We need to store one 16x16 block of luma samples (y), -// and two 8x8 chroma blocks (u/v). These are better be 16-bytes aligned, -// in order to be SIMD-friendly. We also need to store the top, left and -// top-left samples (from previously decoded blocks), along with four -// extra top-right samples for luma (intra4x4 prediction only). -// One possible layout is, using 32 * (17 + 9) bytes: -// -// .+------ <- only 1 pixel high -// .|yyyyt. -// .|yyyyt. -// .|yyyyt. -// .|yyyy.. -// .+--.+-- <- only 1 pixel high -// .|uu.|vv -// .|uu.|vv -// -// Every character is a 4x4 block, with legend: -// '.' = unused -// 'y' = y-samples 'u' = u-samples 'v' = u-samples -// '|' = left sample, '-' = top sample, '+' = top-left sample -// 't' = extra top-right sample for 4x4 modes -#define YUV_SIZE (BPS * 17 + BPS * 9) -#define Y_OFF (BPS * 1 + 8) -#define U_OFF (Y_OFF + BPS * 16 + BPS) -#define V_OFF (U_OFF + 16) - -// minimal width under which lossy multi-threading is always disabled -#define MIN_WIDTH_FOR_THREADS 512 - -//------------------------------------------------------------------------------ -// Headers - -typedef struct { - uint8_t key_frame_; - uint8_t profile_; - uint8_t show_; - uint32_t partition_length_; -} VP8FrameHeader; - -typedef struct { - uint16_t width_; - uint16_t height_; - uint8_t xscale_; - uint8_t yscale_; - uint8_t colorspace_; // 0 = YCbCr - uint8_t clamp_type_; -} VP8PictureHeader; - -// segment features -typedef struct { - int use_segment_; - int update_map_; // whether to update the segment map or not - int absolute_delta_; // absolute or delta values for quantizer and filter - int8_t quantizer_[NUM_MB_SEGMENTS]; // quantization changes - int8_t filter_strength_[NUM_MB_SEGMENTS]; // filter strength for segments -} VP8SegmentHeader; - -// probas associated to one of the contexts -typedef uint8_t VP8ProbaArray[NUM_PROBAS]; - -typedef struct { // all the probas associated to one band - VP8ProbaArray probas_[NUM_CTX]; -} VP8BandProbas; - -// Struct collecting all frame-persistent probabilities. -typedef struct { - uint8_t segments_[MB_FEATURE_TREE_PROBS]; - // Type: 0:Intra16-AC 1:Intra16-DC 2:Chroma 3:Intra4 - VP8BandProbas bands_[NUM_TYPES][NUM_BANDS]; - const VP8BandProbas* bands_ptr_[NUM_TYPES][16 + 1]; -} VP8Proba; - -// Filter parameters -typedef struct { - int simple_; // 0=complex, 1=simple - int level_; // [0..63] - int sharpness_; // [0..7] - int use_lf_delta_; - int ref_lf_delta_[NUM_REF_LF_DELTAS]; - int mode_lf_delta_[NUM_MODE_LF_DELTAS]; -} VP8FilterHeader; - -//------------------------------------------------------------------------------ -// Informations about the macroblocks. - -typedef struct { // filter specs - uint8_t f_limit_; // filter limit in [3..189], or 0 if no filtering - uint8_t f_ilevel_; // inner limit in [1..63] - uint8_t f_inner_; // do inner filtering? - uint8_t hev_thresh_; // high edge variance threshold in [0..2] -} VP8FInfo; - -typedef struct { // Top/Left Contexts used for syntax-parsing - uint8_t nz_; // non-zero AC/DC coeffs (4bit for luma + 4bit for chroma) - uint8_t nz_dc_; // non-zero DC coeff (1bit) -} VP8MB; - -// Dequantization matrices -typedef int quant_t[2]; // [DC / AC]. Can be 'uint16_t[2]' too (~slower). -typedef struct { - quant_t y1_mat_, y2_mat_, uv_mat_; - - int uv_quant_; // U/V quantizer value - int dither_; // dithering amplitude (0 = off, max=255) -} VP8QuantMatrix; - -// Data needed to reconstruct a macroblock -typedef struct { - int16_t coeffs_[384]; // 384 coeffs = (16+4+4) * 4*4 - uint8_t is_i4x4_; // true if intra4x4 - uint8_t imodes_[16]; // one 16x16 mode (#0) or sixteen 4x4 modes - uint8_t uvmode_; // chroma prediction mode - // bit-wise info about the content of each sub-4x4 blocks (in decoding order). - // Each of the 4x4 blocks for y/u/v is associated with a 2b code according to: - // code=0 -> no coefficient - // code=1 -> only DC - // code=2 -> first three coefficients are non-zero - // code=3 -> more than three coefficients are non-zero - // This allows to call specialized transform functions. - uint32_t non_zero_y_; - uint32_t non_zero_uv_; - uint8_t dither_; // local dithering strength (deduced from non_zero_*) - uint8_t skip_; - uint8_t segment_; -} VP8MBData; - -// Persistent information needed by the parallel processing -typedef struct { - int id_; // cache row to process (in [0..2]) - int mb_y_; // macroblock position of the row - int filter_row_; // true if row-filtering is needed - VP8FInfo* f_info_; // filter strengths (swapped with dec->f_info_) - VP8MBData* mb_data_; // reconstruction data (swapped with dec->mb_data_) - VP8Io io_; // copy of the VP8Io to pass to put() -} VP8ThreadContext; - -// Saved top samples, per macroblock. Fits into a cache-line. -typedef struct { - uint8_t y[16], u[8], v[8]; -} VP8TopSamples; - -//------------------------------------------------------------------------------ -// VP8Decoder: the main opaque structure handed over to user - -struct VP8Decoder { - VP8StatusCode status_; - int ready_; // true if ready to decode a picture with VP8Decode() - const char* error_msg_; // set when status_ is not OK. - - // Main data source - VP8BitReader br_; - - // headers - VP8FrameHeader frm_hdr_; - VP8PictureHeader pic_hdr_; - VP8FilterHeader filter_hdr_; - VP8SegmentHeader segment_hdr_; - - // Worker - WebPWorker worker_; - int mt_method_; // multi-thread method: 0=off, 1=[parse+recon][filter] - // 2=[parse][recon+filter] - int cache_id_; // current cache row - int num_caches_; // number of cached rows of 16 pixels (1, 2 or 3) - VP8ThreadContext thread_ctx_; // Thread context - - // dimension, in macroblock units. - int mb_w_, mb_h_; - - // Macroblock to process/filter, depending on cropping and filter_type. - int tl_mb_x_, tl_mb_y_; // top-left MB that must be in-loop filtered - int br_mb_x_, br_mb_y_; // last bottom-right MB that must be decoded - - // number of partitions minus one. - uint32_t num_parts_minus_one_; - // per-partition boolean decoders. - VP8BitReader parts_[MAX_NUM_PARTITIONS]; - - // Dithering strength, deduced from decoding options - int dither_; // whether to use dithering or not - VP8Random dithering_rg_; // random generator for dithering - - // dequantization (one set of DC/AC dequant factor per segment) - VP8QuantMatrix dqm_[NUM_MB_SEGMENTS]; - - // probabilities - VP8Proba proba_; - int use_skip_proba_; - uint8_t skip_p_; - - // Boundary data cache and persistent buffers. - uint8_t* intra_t_; // top intra modes values: 4 * mb_w_ - uint8_t intra_l_[4]; // left intra modes values - - VP8TopSamples* yuv_t_; // top y/u/v samples - - VP8MB* mb_info_; // contextual macroblock info (mb_w_ + 1) - VP8FInfo* f_info_; // filter strength info - uint8_t* yuv_b_; // main block for Y/U/V (size = YUV_SIZE) - - uint8_t* cache_y_; // macroblock row for storing unfiltered samples - uint8_t* cache_u_; - uint8_t* cache_v_; - int cache_y_stride_; - int cache_uv_stride_; - - // main memory chunk for the above data. Persistent. - void* mem_; - size_t mem_size_; - - // Per macroblock non-persistent infos. - int mb_x_, mb_y_; // current position, in macroblock units - VP8MBData* mb_data_; // parsed reconstruction data - - // Filtering side-info - int filter_type_; // 0=off, 1=simple, 2=complex - VP8FInfo fstrengths_[NUM_MB_SEGMENTS][2]; // precalculated per-segment/type - - // Alpha - struct ALPHDecoder* alph_dec_; // alpha-plane decoder object - const uint8_t* alpha_data_; // compressed alpha data (if present) - size_t alpha_data_size_; - int is_alpha_decoded_; // true if alpha_data_ is decoded in alpha_plane_ - uint8_t* alpha_plane_mem_; // memory allocated for alpha_plane_ - uint8_t* alpha_plane_; // output. Persistent, contains the whole data. - const uint8_t* alpha_prev_line_; // last decoded alpha row (or NULL) - int alpha_dithering_; // derived from decoding options (0=off, 100=full) -}; - -//------------------------------------------------------------------------------ -// internal functions. Not public. - -// in vp8.c -int VP8SetError(VP8Decoder* const dec, - VP8StatusCode error, const char* const msg); - -// in tree.c -void VP8ResetProba(VP8Proba* const proba); -void VP8ParseProba(VP8BitReader* const br, VP8Decoder* const dec); -// parses one row of intra mode data in partition 0, returns !eof -int VP8ParseIntraModeRow(VP8BitReader* const br, VP8Decoder* const dec); - -// in quant.c -void VP8ParseQuant(VP8Decoder* const dec); - -// in frame.c -int VP8InitFrame(VP8Decoder* const dec, VP8Io* const io); -// Call io->setup() and finish setting up scan parameters. -// After this call returns, one must always call VP8ExitCritical() with the -// same parameters. Both functions should be used in pair. Returns VP8_STATUS_OK -// if ok, otherwise sets and returns the error status on *dec. -VP8StatusCode VP8EnterCritical(VP8Decoder* const dec, VP8Io* const io); -// Must always be called in pair with VP8EnterCritical(). -// Returns false in case of error. -int VP8ExitCritical(VP8Decoder* const dec, VP8Io* const io); -// Return the multi-threading method to use (0=off), depending -// on options and bitstream size. Only for lossy decoding. -int VP8GetThreadMethod(const WebPDecoderOptions* const options, - const WebPHeaderStructure* const headers, - int width, int height); -// Initialize dithering post-process if needed. -void VP8InitDithering(const WebPDecoderOptions* const options, - VP8Decoder* const dec); -// Process the last decoded row (filtering + output). -int VP8ProcessRow(VP8Decoder* const dec, VP8Io* const io); -// To be called at the start of a new scanline, to initialize predictors. -void VP8InitScanline(VP8Decoder* const dec); -// Decode one macroblock. Returns false if there is not enough data. -int VP8DecodeMB(VP8Decoder* const dec, VP8BitReader* const token_br); - -// in alpha.c -const uint8_t* VP8DecompressAlphaRows(VP8Decoder* const dec, - const VP8Io* const io, - int row, int num_rows); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_DEC_VP8I_DEC_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8l_dec.c b/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8l_dec.c deleted file mode 100644 index b98936b..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8l_dec.c +++ /dev/null @@ -1,1742 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// main entry for the decoder -// -// Authors: Vikas Arora (vikaas.arora@gmail.com) -// Jyrki Alakuijala (jyrki@google.com) - -#include - -#include "src/dec/alphai_dec.h" -#include "src/dec/vp8li_dec.h" -#include "src/dsp/dsp.h" -#include "src/dsp/lossless.h" -#include "src/dsp/lossless_common.h" -#include "src/dsp/yuv.h" -#include "src/utils/endian_inl_utils.h" -#include "src/utils/huffman_utils.h" -#include "src/utils/utils.h" - -#define NUM_ARGB_CACHE_ROWS 16 - -static const int kCodeLengthLiterals = 16; -static const int kCodeLengthRepeatCode = 16; -static const uint8_t kCodeLengthExtraBits[3] = { 2, 3, 7 }; -static const uint8_t kCodeLengthRepeatOffsets[3] = { 3, 3, 11 }; - -// ----------------------------------------------------------------------------- -// Five Huffman codes are used at each meta code: -// 1. green + length prefix codes + color cache codes, -// 2. alpha, -// 3. red, -// 4. blue, and, -// 5. distance prefix codes. -typedef enum { - GREEN = 0, - RED = 1, - BLUE = 2, - ALPHA = 3, - DIST = 4 -} HuffIndex; - -static const uint16_t kAlphabetSize[HUFFMAN_CODES_PER_META_CODE] = { - NUM_LITERAL_CODES + NUM_LENGTH_CODES, - NUM_LITERAL_CODES, NUM_LITERAL_CODES, NUM_LITERAL_CODES, - NUM_DISTANCE_CODES -}; - -static const uint8_t kLiteralMap[HUFFMAN_CODES_PER_META_CODE] = { - 0, 1, 1, 1, 0 -}; - -#define NUM_CODE_LENGTH_CODES 19 -static const uint8_t kCodeLengthCodeOrder[NUM_CODE_LENGTH_CODES] = { - 17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 -}; - -#define CODE_TO_PLANE_CODES 120 -static const uint8_t kCodeToPlane[CODE_TO_PLANE_CODES] = { - 0x18, 0x07, 0x17, 0x19, 0x28, 0x06, 0x27, 0x29, 0x16, 0x1a, - 0x26, 0x2a, 0x38, 0x05, 0x37, 0x39, 0x15, 0x1b, 0x36, 0x3a, - 0x25, 0x2b, 0x48, 0x04, 0x47, 0x49, 0x14, 0x1c, 0x35, 0x3b, - 0x46, 0x4a, 0x24, 0x2c, 0x58, 0x45, 0x4b, 0x34, 0x3c, 0x03, - 0x57, 0x59, 0x13, 0x1d, 0x56, 0x5a, 0x23, 0x2d, 0x44, 0x4c, - 0x55, 0x5b, 0x33, 0x3d, 0x68, 0x02, 0x67, 0x69, 0x12, 0x1e, - 0x66, 0x6a, 0x22, 0x2e, 0x54, 0x5c, 0x43, 0x4d, 0x65, 0x6b, - 0x32, 0x3e, 0x78, 0x01, 0x77, 0x79, 0x53, 0x5d, 0x11, 0x1f, - 0x64, 0x6c, 0x42, 0x4e, 0x76, 0x7a, 0x21, 0x2f, 0x75, 0x7b, - 0x31, 0x3f, 0x63, 0x6d, 0x52, 0x5e, 0x00, 0x74, 0x7c, 0x41, - 0x4f, 0x10, 0x20, 0x62, 0x6e, 0x30, 0x73, 0x7d, 0x51, 0x5f, - 0x40, 0x72, 0x7e, 0x61, 0x6f, 0x50, 0x71, 0x7f, 0x60, 0x70 -}; - -// Memory needed for lookup tables of one Huffman tree group. Red, blue, alpha -// and distance alphabets are constant (256 for red, blue and alpha, 40 for -// distance) and lookup table sizes for them in worst case are 630 and 410 -// respectively. Size of green alphabet depends on color cache size and is equal -// to 256 (green component values) + 24 (length prefix values) -// + color_cache_size (between 0 and 2048). -// All values computed for 8-bit first level lookup with Mark Adler's tool: -// http://www.hdfgroup.org/ftp/lib-external/zlib/zlib-1.2.5/examples/enough.c -#define FIXED_TABLE_SIZE (630 * 3 + 410) -static const uint16_t kTableSize[12] = { - FIXED_TABLE_SIZE + 654, - FIXED_TABLE_SIZE + 656, - FIXED_TABLE_SIZE + 658, - FIXED_TABLE_SIZE + 662, - FIXED_TABLE_SIZE + 670, - FIXED_TABLE_SIZE + 686, - FIXED_TABLE_SIZE + 718, - FIXED_TABLE_SIZE + 782, - FIXED_TABLE_SIZE + 912, - FIXED_TABLE_SIZE + 1168, - FIXED_TABLE_SIZE + 1680, - FIXED_TABLE_SIZE + 2704 -}; - -static int DecodeImageStream(int xsize, int ysize, - int is_level0, - VP8LDecoder* const dec, - uint32_t** const decoded_data); - -//------------------------------------------------------------------------------ - -int VP8LCheckSignature(const uint8_t* const data, size_t size) { - return (size >= VP8L_FRAME_HEADER_SIZE && - data[0] == VP8L_MAGIC_BYTE && - (data[4] >> 5) == 0); // version -} - -static int ReadImageInfo(VP8LBitReader* const br, - int* const width, int* const height, - int* const has_alpha) { - if (VP8LReadBits(br, 8) != VP8L_MAGIC_BYTE) return 0; - *width = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1; - *height = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1; - *has_alpha = VP8LReadBits(br, 1); - if (VP8LReadBits(br, VP8L_VERSION_BITS) != 0) return 0; - return !br->eos_; -} - -int VP8LGetInfo(const uint8_t* data, size_t data_size, - int* const width, int* const height, int* const has_alpha) { - if (data == NULL || data_size < VP8L_FRAME_HEADER_SIZE) { - return 0; // not enough data - } else if (!VP8LCheckSignature(data, data_size)) { - return 0; // bad signature - } else { - int w, h, a; - VP8LBitReader br; - VP8LInitBitReader(&br, data, data_size); - if (!ReadImageInfo(&br, &w, &h, &a)) { - return 0; - } - if (width != NULL) *width = w; - if (height != NULL) *height = h; - if (has_alpha != NULL) *has_alpha = a; - return 1; - } -} - -//------------------------------------------------------------------------------ - -static WEBP_INLINE int GetCopyDistance(int distance_symbol, - VP8LBitReader* const br) { - int extra_bits, offset; - if (distance_symbol < 4) { - return distance_symbol + 1; - } - extra_bits = (distance_symbol - 2) >> 1; - offset = (2 + (distance_symbol & 1)) << extra_bits; - return offset + VP8LReadBits(br, extra_bits) + 1; -} - -static WEBP_INLINE int GetCopyLength(int length_symbol, - VP8LBitReader* const br) { - // Length and distance prefixes are encoded the same way. - return GetCopyDistance(length_symbol, br); -} - -static WEBP_INLINE int PlaneCodeToDistance(int xsize, int plane_code) { - if (plane_code > CODE_TO_PLANE_CODES) { - return plane_code - CODE_TO_PLANE_CODES; - } else { - const int dist_code = kCodeToPlane[plane_code - 1]; - const int yoffset = dist_code >> 4; - const int xoffset = 8 - (dist_code & 0xf); - const int dist = yoffset * xsize + xoffset; - return (dist >= 1) ? dist : 1; // dist<1 can happen if xsize is very small - } -} - -//------------------------------------------------------------------------------ -// Decodes the next Huffman code from bit-stream. -// FillBitWindow(br) needs to be called at minimum every second call -// to ReadSymbol, in order to pre-fetch enough bits. -static WEBP_INLINE int ReadSymbol(const HuffmanCode* table, - VP8LBitReader* const br) { - int nbits; - uint32_t val = VP8LPrefetchBits(br); - table += val & HUFFMAN_TABLE_MASK; - nbits = table->bits - HUFFMAN_TABLE_BITS; - if (nbits > 0) { - VP8LSetBitPos(br, br->bit_pos_ + HUFFMAN_TABLE_BITS); - val = VP8LPrefetchBits(br); - table += table->value; - table += val & ((1 << nbits) - 1); - } - VP8LSetBitPos(br, br->bit_pos_ + table->bits); - return table->value; -} - -// Reads packed symbol depending on GREEN channel -#define BITS_SPECIAL_MARKER 0x100 // something large enough (and a bit-mask) -#define PACKED_NON_LITERAL_CODE 0 // must be < NUM_LITERAL_CODES -static WEBP_INLINE int ReadPackedSymbols(const HTreeGroup* group, - VP8LBitReader* const br, - uint32_t* const dst) { - const uint32_t val = VP8LPrefetchBits(br) & (HUFFMAN_PACKED_TABLE_SIZE - 1); - const HuffmanCode32 code = group->packed_table[val]; - assert(group->use_packed_table); - if (code.bits < BITS_SPECIAL_MARKER) { - VP8LSetBitPos(br, br->bit_pos_ + code.bits); - *dst = code.value; - return PACKED_NON_LITERAL_CODE; - } else { - VP8LSetBitPos(br, br->bit_pos_ + code.bits - BITS_SPECIAL_MARKER); - assert(code.value >= NUM_LITERAL_CODES); - return code.value; - } -} - -static int AccumulateHCode(HuffmanCode hcode, int shift, - HuffmanCode32* const huff) { - huff->bits += hcode.bits; - huff->value |= (uint32_t)hcode.value << shift; - assert(huff->bits <= HUFFMAN_TABLE_BITS); - return hcode.bits; -} - -static void BuildPackedTable(HTreeGroup* const htree_group) { - uint32_t code; - for (code = 0; code < HUFFMAN_PACKED_TABLE_SIZE; ++code) { - uint32_t bits = code; - HuffmanCode32* const huff = &htree_group->packed_table[bits]; - HuffmanCode hcode = htree_group->htrees[GREEN][bits]; - if (hcode.value >= NUM_LITERAL_CODES) { - huff->bits = hcode.bits + BITS_SPECIAL_MARKER; - huff->value = hcode.value; - } else { - huff->bits = 0; - huff->value = 0; - bits >>= AccumulateHCode(hcode, 8, huff); - bits >>= AccumulateHCode(htree_group->htrees[RED][bits], 16, huff); - bits >>= AccumulateHCode(htree_group->htrees[BLUE][bits], 0, huff); - bits >>= AccumulateHCode(htree_group->htrees[ALPHA][bits], 24, huff); - (void)bits; - } - } -} - -static int ReadHuffmanCodeLengths( - VP8LDecoder* const dec, const int* const code_length_code_lengths, - int num_symbols, int* const code_lengths) { - int ok = 0; - VP8LBitReader* const br = &dec->br_; - int symbol; - int max_symbol; - int prev_code_len = DEFAULT_CODE_LENGTH; - HuffmanCode table[1 << LENGTHS_TABLE_BITS]; - - if (!VP8LBuildHuffmanTable(table, LENGTHS_TABLE_BITS, - code_length_code_lengths, - NUM_CODE_LENGTH_CODES)) { - goto End; - } - - if (VP8LReadBits(br, 1)) { // use length - const int length_nbits = 2 + 2 * VP8LReadBits(br, 3); - max_symbol = 2 + VP8LReadBits(br, length_nbits); - if (max_symbol > num_symbols) { - goto End; - } - } else { - max_symbol = num_symbols; - } - - symbol = 0; - while (symbol < num_symbols) { - const HuffmanCode* p; - int code_len; - if (max_symbol-- == 0) break; - VP8LFillBitWindow(br); - p = &table[VP8LPrefetchBits(br) & LENGTHS_TABLE_MASK]; - VP8LSetBitPos(br, br->bit_pos_ + p->bits); - code_len = p->value; - if (code_len < kCodeLengthLiterals) { - code_lengths[symbol++] = code_len; - if (code_len != 0) prev_code_len = code_len; - } else { - const int use_prev = (code_len == kCodeLengthRepeatCode); - const int slot = code_len - kCodeLengthLiterals; - const int extra_bits = kCodeLengthExtraBits[slot]; - const int repeat_offset = kCodeLengthRepeatOffsets[slot]; - int repeat = VP8LReadBits(br, extra_bits) + repeat_offset; - if (symbol + repeat > num_symbols) { - goto End; - } else { - const int length = use_prev ? prev_code_len : 0; - while (repeat-- > 0) code_lengths[symbol++] = length; - } - } - } - ok = 1; - - End: - if (!ok) dec->status_ = VP8_STATUS_BITSTREAM_ERROR; - return ok; -} - -// 'code_lengths' is pre-allocated temporary buffer, used for creating Huffman -// tree. -static int ReadHuffmanCode(int alphabet_size, VP8LDecoder* const dec, - int* const code_lengths, HuffmanCode* const table) { - int ok = 0; - int size = 0; - VP8LBitReader* const br = &dec->br_; - const int simple_code = VP8LReadBits(br, 1); - - memset(code_lengths, 0, alphabet_size * sizeof(*code_lengths)); - - if (simple_code) { // Read symbols, codes & code lengths directly. - const int num_symbols = VP8LReadBits(br, 1) + 1; - const int first_symbol_len_code = VP8LReadBits(br, 1); - // The first code is either 1 bit or 8 bit code. - int symbol = VP8LReadBits(br, (first_symbol_len_code == 0) ? 1 : 8); - code_lengths[symbol] = 1; - // The second code (if present), is always 8 bit long. - if (num_symbols == 2) { - symbol = VP8LReadBits(br, 8); - code_lengths[symbol] = 1; - } - ok = 1; - } else { // Decode Huffman-coded code lengths. - int i; - int code_length_code_lengths[NUM_CODE_LENGTH_CODES] = { 0 }; - const int num_codes = VP8LReadBits(br, 4) + 4; - if (num_codes > NUM_CODE_LENGTH_CODES) { - dec->status_ = VP8_STATUS_BITSTREAM_ERROR; - return 0; - } - - for (i = 0; i < num_codes; ++i) { - code_length_code_lengths[kCodeLengthCodeOrder[i]] = VP8LReadBits(br, 3); - } - ok = ReadHuffmanCodeLengths(dec, code_length_code_lengths, alphabet_size, - code_lengths); - } - - ok = ok && !br->eos_; - if (ok) { - size = VP8LBuildHuffmanTable(table, HUFFMAN_TABLE_BITS, - code_lengths, alphabet_size); - } - if (!ok || size == 0) { - dec->status_ = VP8_STATUS_BITSTREAM_ERROR; - return 0; - } - return size; -} - -static int ReadHuffmanCodes(VP8LDecoder* const dec, int xsize, int ysize, - int color_cache_bits, int allow_recursion) { - int i, j; - VP8LBitReader* const br = &dec->br_; - VP8LMetadata* const hdr = &dec->hdr_; - uint32_t* huffman_image = NULL; - HTreeGroup* htree_groups = NULL; - // When reading htrees, some might be unused, as the format allows it. - // We will still read them but put them in this htree_group_bogus. - HTreeGroup htree_group_bogus; - HuffmanCode* huffman_tables = NULL; - HuffmanCode* huffman_tables_bogus = NULL; - HuffmanCode* next = NULL; - int num_htree_groups = 1; - int num_htree_groups_max = 1; - int max_alphabet_size = 0; - int* code_lengths = NULL; - const int table_size = kTableSize[color_cache_bits]; - int* mapping = NULL; - int ok = 0; - - if (allow_recursion && VP8LReadBits(br, 1)) { - // use meta Huffman codes. - const int huffman_precision = VP8LReadBits(br, 3) + 2; - const int huffman_xsize = VP8LSubSampleSize(xsize, huffman_precision); - const int huffman_ysize = VP8LSubSampleSize(ysize, huffman_precision); - const int huffman_pixs = huffman_xsize * huffman_ysize; - if (!DecodeImageStream(huffman_xsize, huffman_ysize, 0, dec, - &huffman_image)) { - goto Error; - } - hdr->huffman_subsample_bits_ = huffman_precision; - for (i = 0; i < huffman_pixs; ++i) { - // The huffman data is stored in red and green bytes. - const int group = (huffman_image[i] >> 8) & 0xffff; - huffman_image[i] = group; - if (group >= num_htree_groups_max) { - num_htree_groups_max = group + 1; - } - } - // Check the validity of num_htree_groups_max. If it seems too big, use a - // smaller value for later. This will prevent big memory allocations to end - // up with a bad bitstream anyway. - // The value of 1000 is totally arbitrary. We know that num_htree_groups_max - // is smaller than (1 << 16) and should be smaller than the number of pixels - // (though the format allows it to be bigger). - if (num_htree_groups_max > 1000 || num_htree_groups_max > xsize * ysize) { - // Create a mapping from the used indices to the minimal set of used - // values [0, num_htree_groups) - mapping = (int*)WebPSafeMalloc(num_htree_groups_max, sizeof(*mapping)); - if (mapping == NULL) { - dec->status_ = VP8_STATUS_OUT_OF_MEMORY; - goto Error; - } - // -1 means a value is unmapped, and therefore unused in the Huffman - // image. - memset(mapping, 0xff, num_htree_groups_max * sizeof(*mapping)); - for (num_htree_groups = 0, i = 0; i < huffman_pixs; ++i) { - // Get the current mapping for the group and remap the Huffman image. - int* const mapped_group = &mapping[huffman_image[i]]; - if (*mapped_group == -1) *mapped_group = num_htree_groups++; - huffman_image[i] = *mapped_group; - } - huffman_tables_bogus = (HuffmanCode*)WebPSafeMalloc( - table_size, sizeof(*huffman_tables_bogus)); - if (huffman_tables_bogus == NULL) { - dec->status_ = VP8_STATUS_OUT_OF_MEMORY; - goto Error; - } - } else { - num_htree_groups = num_htree_groups_max; - } - } - - if (br->eos_) goto Error; - - // Find maximum alphabet size for the htree group. - for (j = 0; j < HUFFMAN_CODES_PER_META_CODE; ++j) { - int alphabet_size = kAlphabetSize[j]; - if (j == 0 && color_cache_bits > 0) { - alphabet_size += 1 << color_cache_bits; - } - if (max_alphabet_size < alphabet_size) { - max_alphabet_size = alphabet_size; - } - } - - code_lengths = (int*)WebPSafeCalloc((uint64_t)max_alphabet_size, - sizeof(*code_lengths)); - huffman_tables = (HuffmanCode*)WebPSafeMalloc(num_htree_groups * table_size, - sizeof(*huffman_tables)); - htree_groups = VP8LHtreeGroupsNew(num_htree_groups); - - if (htree_groups == NULL || code_lengths == NULL || huffman_tables == NULL) { - dec->status_ = VP8_STATUS_OUT_OF_MEMORY; - goto Error; - } - - next = huffman_tables; - for (i = 0; i < num_htree_groups_max; ++i) { - // If the index "i" is unused in the Huffman image, read the coefficients - // but store them to a bogus htree_group. - const int is_bogus = (mapping != NULL && mapping[i] == -1); - HTreeGroup* const htree_group = - is_bogus ? &htree_group_bogus : - &htree_groups[(mapping == NULL) ? i : mapping[i]]; - HuffmanCode** const htrees = htree_group->htrees; - HuffmanCode* huffman_tables_i = is_bogus ? huffman_tables_bogus : next; - int size; - int total_size = 0; - int is_trivial_literal = 1; - int max_bits = 0; - for (j = 0; j < HUFFMAN_CODES_PER_META_CODE; ++j) { - int alphabet_size = kAlphabetSize[j]; - htrees[j] = huffman_tables_i; - if (j == 0 && color_cache_bits > 0) { - alphabet_size += 1 << color_cache_bits; - } - size = - ReadHuffmanCode(alphabet_size, dec, code_lengths, huffman_tables_i); - if (size == 0) { - goto Error; - } - if (is_trivial_literal && kLiteralMap[j] == 1) { - is_trivial_literal = (huffman_tables_i->bits == 0); - } - total_size += huffman_tables_i->bits; - huffman_tables_i += size; - if (j <= ALPHA) { - int local_max_bits = code_lengths[0]; - int k; - for (k = 1; k < alphabet_size; ++k) { - if (code_lengths[k] > local_max_bits) { - local_max_bits = code_lengths[k]; - } - } - max_bits += local_max_bits; - } - } - if (!is_bogus) next = huffman_tables_i; - htree_group->is_trivial_literal = is_trivial_literal; - htree_group->is_trivial_code = 0; - if (is_trivial_literal) { - const int red = htrees[RED][0].value; - const int blue = htrees[BLUE][0].value; - const int alpha = htrees[ALPHA][0].value; - htree_group->literal_arb = ((uint32_t)alpha << 24) | (red << 16) | blue; - if (total_size == 0 && htrees[GREEN][0].value < NUM_LITERAL_CODES) { - htree_group->is_trivial_code = 1; - htree_group->literal_arb |= htrees[GREEN][0].value << 8; - } - } - htree_group->use_packed_table = - !htree_group->is_trivial_code && (max_bits < HUFFMAN_PACKED_BITS); - if (htree_group->use_packed_table) BuildPackedTable(htree_group); - } - ok = 1; - - // All OK. Finalize pointers. - hdr->huffman_image_ = huffman_image; - hdr->num_htree_groups_ = num_htree_groups; - hdr->htree_groups_ = htree_groups; - hdr->huffman_tables_ = huffman_tables; - - Error: - WebPSafeFree(code_lengths); - WebPSafeFree(huffman_tables_bogus); - WebPSafeFree(mapping); - if (!ok) { - WebPSafeFree(huffman_image); - WebPSafeFree(huffman_tables); - VP8LHtreeGroupsFree(htree_groups); - } - return ok; -} - -//------------------------------------------------------------------------------ -// Scaling. - -#if !defined(WEBP_REDUCE_SIZE) -static int AllocateAndInitRescaler(VP8LDecoder* const dec, VP8Io* const io) { - const int num_channels = 4; - const int in_width = io->mb_w; - const int out_width = io->scaled_width; - const int in_height = io->mb_h; - const int out_height = io->scaled_height; - const uint64_t work_size = 2 * num_channels * (uint64_t)out_width; - rescaler_t* work; // Rescaler work area. - const uint64_t scaled_data_size = (uint64_t)out_width; - uint32_t* scaled_data; // Temporary storage for scaled BGRA data. - const uint64_t memory_size = sizeof(*dec->rescaler) + - work_size * sizeof(*work) + - scaled_data_size * sizeof(*scaled_data); - uint8_t* memory = (uint8_t*)WebPSafeMalloc(memory_size, sizeof(*memory)); - if (memory == NULL) { - dec->status_ = VP8_STATUS_OUT_OF_MEMORY; - return 0; - } - assert(dec->rescaler_memory == NULL); - dec->rescaler_memory = memory; - - dec->rescaler = (WebPRescaler*)memory; - memory += sizeof(*dec->rescaler); - work = (rescaler_t*)memory; - memory += work_size * sizeof(*work); - scaled_data = (uint32_t*)memory; - - WebPRescalerInit(dec->rescaler, in_width, in_height, (uint8_t*)scaled_data, - out_width, out_height, 0, num_channels, work); - return 1; -} -#endif // WEBP_REDUCE_SIZE - -//------------------------------------------------------------------------------ -// Export to ARGB - -#if !defined(WEBP_REDUCE_SIZE) - -// We have special "export" function since we need to convert from BGRA -static int Export(WebPRescaler* const rescaler, WEBP_CSP_MODE colorspace, - int rgba_stride, uint8_t* const rgba) { - uint32_t* const src = (uint32_t*)rescaler->dst; - const int dst_width = rescaler->dst_width; - int num_lines_out = 0; - while (WebPRescalerHasPendingOutput(rescaler)) { - uint8_t* const dst = rgba + num_lines_out * rgba_stride; - WebPRescalerExportRow(rescaler); - WebPMultARGBRow(src, dst_width, 1); - VP8LConvertFromBGRA(src, dst_width, colorspace, dst); - ++num_lines_out; - } - return num_lines_out; -} - -// Emit scaled rows. -static int EmitRescaledRowsRGBA(const VP8LDecoder* const dec, - uint8_t* in, int in_stride, int mb_h, - uint8_t* const out, int out_stride) { - const WEBP_CSP_MODE colorspace = dec->output_->colorspace; - int num_lines_in = 0; - int num_lines_out = 0; - while (num_lines_in < mb_h) { - uint8_t* const row_in = in + num_lines_in * in_stride; - uint8_t* const row_out = out + num_lines_out * out_stride; - const int lines_left = mb_h - num_lines_in; - const int needed_lines = WebPRescaleNeededLines(dec->rescaler, lines_left); - int lines_imported; - assert(needed_lines > 0 && needed_lines <= lines_left); - WebPMultARGBRows(row_in, in_stride, - dec->rescaler->src_width, needed_lines, 0); - lines_imported = - WebPRescalerImport(dec->rescaler, lines_left, row_in, in_stride); - assert(lines_imported == needed_lines); - num_lines_in += lines_imported; - num_lines_out += Export(dec->rescaler, colorspace, out_stride, row_out); - } - return num_lines_out; -} - -#endif // WEBP_REDUCE_SIZE - -// Emit rows without any scaling. -static int EmitRows(WEBP_CSP_MODE colorspace, - const uint8_t* row_in, int in_stride, - int mb_w, int mb_h, - uint8_t* const out, int out_stride) { - int lines = mb_h; - uint8_t* row_out = out; - while (lines-- > 0) { - VP8LConvertFromBGRA((const uint32_t*)row_in, mb_w, colorspace, row_out); - row_in += in_stride; - row_out += out_stride; - } - return mb_h; // Num rows out == num rows in. -} - -//------------------------------------------------------------------------------ -// Export to YUVA - -static void ConvertToYUVA(const uint32_t* const src, int width, int y_pos, - const WebPDecBuffer* const output) { - const WebPYUVABuffer* const buf = &output->u.YUVA; - - // first, the luma plane - WebPConvertARGBToY(src, buf->y + y_pos * buf->y_stride, width); - - // then U/V planes - { - uint8_t* const u = buf->u + (y_pos >> 1) * buf->u_stride; - uint8_t* const v = buf->v + (y_pos >> 1) * buf->v_stride; - // even lines: store values - // odd lines: average with previous values - WebPConvertARGBToUV(src, u, v, width, !(y_pos & 1)); - } - // Lastly, store alpha if needed. - if (buf->a != NULL) { - uint8_t* const a = buf->a + y_pos * buf->a_stride; -#if defined(WORDS_BIGENDIAN) - WebPExtractAlpha((uint8_t*)src + 0, 0, width, 1, a, 0); -#else - WebPExtractAlpha((uint8_t*)src + 3, 0, width, 1, a, 0); -#endif - } -} - -static int ExportYUVA(const VP8LDecoder* const dec, int y_pos) { - WebPRescaler* const rescaler = dec->rescaler; - uint32_t* const src = (uint32_t*)rescaler->dst; - const int dst_width = rescaler->dst_width; - int num_lines_out = 0; - while (WebPRescalerHasPendingOutput(rescaler)) { - WebPRescalerExportRow(rescaler); - WebPMultARGBRow(src, dst_width, 1); - ConvertToYUVA(src, dst_width, y_pos, dec->output_); - ++y_pos; - ++num_lines_out; - } - return num_lines_out; -} - -static int EmitRescaledRowsYUVA(const VP8LDecoder* const dec, - uint8_t* in, int in_stride, int mb_h) { - int num_lines_in = 0; - int y_pos = dec->last_out_row_; - while (num_lines_in < mb_h) { - const int lines_left = mb_h - num_lines_in; - const int needed_lines = WebPRescaleNeededLines(dec->rescaler, lines_left); - int lines_imported; - WebPMultARGBRows(in, in_stride, dec->rescaler->src_width, needed_lines, 0); - lines_imported = - WebPRescalerImport(dec->rescaler, lines_left, in, in_stride); - assert(lines_imported == needed_lines); - num_lines_in += lines_imported; - in += needed_lines * in_stride; - y_pos += ExportYUVA(dec, y_pos); - } - return y_pos; -} - -static int EmitRowsYUVA(const VP8LDecoder* const dec, - const uint8_t* in, int in_stride, - int mb_w, int num_rows) { - int y_pos = dec->last_out_row_; - while (num_rows-- > 0) { - ConvertToYUVA((const uint32_t*)in, mb_w, y_pos, dec->output_); - in += in_stride; - ++y_pos; - } - return y_pos; -} - -//------------------------------------------------------------------------------ -// Cropping. - -// Sets io->mb_y, io->mb_h & io->mb_w according to start row, end row and -// crop options. Also updates the input data pointer, so that it points to the -// start of the cropped window. Note that pixels are in ARGB format even if -// 'in_data' is uint8_t*. -// Returns true if the crop window is not empty. -static int SetCropWindow(VP8Io* const io, int y_start, int y_end, - uint8_t** const in_data, int pixel_stride) { - assert(y_start < y_end); - assert(io->crop_left < io->crop_right); - if (y_end > io->crop_bottom) { - y_end = io->crop_bottom; // make sure we don't overflow on last row. - } - if (y_start < io->crop_top) { - const int delta = io->crop_top - y_start; - y_start = io->crop_top; - *in_data += delta * pixel_stride; - } - if (y_start >= y_end) return 0; // Crop window is empty. - - *in_data += io->crop_left * sizeof(uint32_t); - - io->mb_y = y_start - io->crop_top; - io->mb_w = io->crop_right - io->crop_left; - io->mb_h = y_end - y_start; - return 1; // Non-empty crop window. -} - -//------------------------------------------------------------------------------ - -static WEBP_INLINE int GetMetaIndex( - const uint32_t* const image, int xsize, int bits, int x, int y) { - if (bits == 0) return 0; - return image[xsize * (y >> bits) + (x >> bits)]; -} - -static WEBP_INLINE HTreeGroup* GetHtreeGroupForPos(VP8LMetadata* const hdr, - int x, int y) { - const int meta_index = GetMetaIndex(hdr->huffman_image_, hdr->huffman_xsize_, - hdr->huffman_subsample_bits_, x, y); - assert(meta_index < hdr->num_htree_groups_); - return hdr->htree_groups_ + meta_index; -} - -//------------------------------------------------------------------------------ -// Main loop, with custom row-processing function - -typedef void (*ProcessRowsFunc)(VP8LDecoder* const dec, int row); - -static void ApplyInverseTransforms(VP8LDecoder* const dec, int num_rows, - const uint32_t* const rows) { - int n = dec->next_transform_; - const int cache_pixs = dec->width_ * num_rows; - const int start_row = dec->last_row_; - const int end_row = start_row + num_rows; - const uint32_t* rows_in = rows; - uint32_t* const rows_out = dec->argb_cache_; - - // Inverse transforms. - while (n-- > 0) { - VP8LTransform* const transform = &dec->transforms_[n]; - VP8LInverseTransform(transform, start_row, end_row, rows_in, rows_out); - rows_in = rows_out; - } - if (rows_in != rows_out) { - // No transform called, hence just copy. - memcpy(rows_out, rows_in, cache_pixs * sizeof(*rows_out)); - } -} - -// Processes (transforms, scales & color-converts) the rows decoded after the -// last call. -static void ProcessRows(VP8LDecoder* const dec, int row) { - const uint32_t* const rows = dec->pixels_ + dec->width_ * dec->last_row_; - const int num_rows = row - dec->last_row_; - - assert(row <= dec->io_->crop_bottom); - // We can't process more than NUM_ARGB_CACHE_ROWS at a time (that's the size - // of argb_cache_), but we currently don't need more than that. - assert(num_rows <= NUM_ARGB_CACHE_ROWS); - if (num_rows > 0) { // Emit output. - VP8Io* const io = dec->io_; - uint8_t* rows_data = (uint8_t*)dec->argb_cache_; - const int in_stride = io->width * sizeof(uint32_t); // in unit of RGBA - - ApplyInverseTransforms(dec, num_rows, rows); - if (!SetCropWindow(io, dec->last_row_, row, &rows_data, in_stride)) { - // Nothing to output (this time). - } else { - const WebPDecBuffer* const output = dec->output_; - if (WebPIsRGBMode(output->colorspace)) { // convert to RGBA - const WebPRGBABuffer* const buf = &output->u.RGBA; - uint8_t* const rgba = buf->rgba + dec->last_out_row_ * buf->stride; - const int num_rows_out = -#if !defined(WEBP_REDUCE_SIZE) - io->use_scaling ? - EmitRescaledRowsRGBA(dec, rows_data, in_stride, io->mb_h, - rgba, buf->stride) : -#endif // WEBP_REDUCE_SIZE - EmitRows(output->colorspace, rows_data, in_stride, - io->mb_w, io->mb_h, rgba, buf->stride); - // Update 'last_out_row_'. - dec->last_out_row_ += num_rows_out; - } else { // convert to YUVA - dec->last_out_row_ = io->use_scaling ? - EmitRescaledRowsYUVA(dec, rows_data, in_stride, io->mb_h) : - EmitRowsYUVA(dec, rows_data, in_stride, io->mb_w, io->mb_h); - } - assert(dec->last_out_row_ <= output->height); - } - } - - // Update 'last_row_'. - dec->last_row_ = row; - assert(dec->last_row_ <= dec->height_); -} - -// Row-processing for the special case when alpha data contains only one -// transform (color indexing), and trivial non-green literals. -static int Is8bOptimizable(const VP8LMetadata* const hdr) { - int i; - if (hdr->color_cache_size_ > 0) return 0; - // When the Huffman tree contains only one symbol, we can skip the - // call to ReadSymbol() for red/blue/alpha channels. - for (i = 0; i < hdr->num_htree_groups_; ++i) { - HuffmanCode** const htrees = hdr->htree_groups_[i].htrees; - if (htrees[RED][0].bits > 0) return 0; - if (htrees[BLUE][0].bits > 0) return 0; - if (htrees[ALPHA][0].bits > 0) return 0; - } - return 1; -} - -static void AlphaApplyFilter(ALPHDecoder* const alph_dec, - int first_row, int last_row, - uint8_t* out, int stride) { - if (alph_dec->filter_ != WEBP_FILTER_NONE) { - int y; - const uint8_t* prev_line = alph_dec->prev_line_; - assert(WebPUnfilters[alph_dec->filter_] != NULL); - for (y = first_row; y < last_row; ++y) { - WebPUnfilters[alph_dec->filter_](prev_line, out, out, stride); - prev_line = out; - out += stride; - } - alph_dec->prev_line_ = prev_line; - } -} - -static void ExtractPalettedAlphaRows(VP8LDecoder* const dec, int last_row) { - // For vertical and gradient filtering, we need to decode the part above the - // crop_top row, in order to have the correct spatial predictors. - ALPHDecoder* const alph_dec = (ALPHDecoder*)dec->io_->opaque; - const int top_row = - (alph_dec->filter_ == WEBP_FILTER_NONE || - alph_dec->filter_ == WEBP_FILTER_HORIZONTAL) ? dec->io_->crop_top - : dec->last_row_; - const int first_row = (dec->last_row_ < top_row) ? top_row : dec->last_row_; - assert(last_row <= dec->io_->crop_bottom); - if (last_row > first_row) { - // Special method for paletted alpha data. We only process the cropped area. - const int width = dec->io_->width; - uint8_t* out = alph_dec->output_ + width * first_row; - const uint8_t* const in = - (uint8_t*)dec->pixels_ + dec->width_ * first_row; - VP8LTransform* const transform = &dec->transforms_[0]; - assert(dec->next_transform_ == 1); - assert(transform->type_ == COLOR_INDEXING_TRANSFORM); - VP8LColorIndexInverseTransformAlpha(transform, first_row, last_row, - in, out); - AlphaApplyFilter(alph_dec, first_row, last_row, out, width); - } - dec->last_row_ = dec->last_out_row_ = last_row; -} - -//------------------------------------------------------------------------------ -// Helper functions for fast pattern copy (8b and 32b) - -// cyclic rotation of pattern word -static WEBP_INLINE uint32_t Rotate8b(uint32_t V) { -#if defined(WORDS_BIGENDIAN) - return ((V & 0xff000000u) >> 24) | (V << 8); -#else - return ((V & 0xffu) << 24) | (V >> 8); -#endif -} - -// copy 1, 2 or 4-bytes pattern -static WEBP_INLINE void CopySmallPattern8b(const uint8_t* src, uint8_t* dst, - int length, uint32_t pattern) { - int i; - // align 'dst' to 4-bytes boundary. Adjust the pattern along the way. - while ((uintptr_t)dst & 3) { - *dst++ = *src++; - pattern = Rotate8b(pattern); - --length; - } - // Copy the pattern 4 bytes at a time. - for (i = 0; i < (length >> 2); ++i) { - ((uint32_t*)dst)[i] = pattern; - } - // Finish with left-overs. 'pattern' is still correctly positioned, - // so no Rotate8b() call is needed. - for (i <<= 2; i < length; ++i) { - dst[i] = src[i]; - } -} - -static WEBP_INLINE void CopyBlock8b(uint8_t* const dst, int dist, int length) { - const uint8_t* src = dst - dist; - if (length >= 8) { - uint32_t pattern = 0; - switch (dist) { - case 1: - pattern = src[0]; -#if defined(__arm__) || defined(_M_ARM) // arm doesn't like multiply that much - pattern |= pattern << 8; - pattern |= pattern << 16; -#elif defined(WEBP_USE_MIPS_DSP_R2) - __asm__ volatile ("replv.qb %0, %0" : "+r"(pattern)); -#else - pattern = 0x01010101u * pattern; -#endif - break; - case 2: -#if !defined(WORDS_BIGENDIAN) - memcpy(&pattern, src, sizeof(uint16_t)); -#else - pattern = ((uint32_t)src[0] << 8) | src[1]; -#endif -#if defined(__arm__) || defined(_M_ARM) - pattern |= pattern << 16; -#elif defined(WEBP_USE_MIPS_DSP_R2) - __asm__ volatile ("replv.ph %0, %0" : "+r"(pattern)); -#else - pattern = 0x00010001u * pattern; -#endif - break; - case 4: - memcpy(&pattern, src, sizeof(uint32_t)); - break; - default: - goto Copy; - break; - } - CopySmallPattern8b(src, dst, length, pattern); - return; - } - Copy: - if (dist >= length) { // no overlap -> use memcpy() - memcpy(dst, src, length * sizeof(*dst)); - } else { - int i; - for (i = 0; i < length; ++i) dst[i] = src[i]; - } -} - -// copy pattern of 1 or 2 uint32_t's -static WEBP_INLINE void CopySmallPattern32b(const uint32_t* src, - uint32_t* dst, - int length, uint64_t pattern) { - int i; - if ((uintptr_t)dst & 4) { // Align 'dst' to 8-bytes boundary. - *dst++ = *src++; - pattern = (pattern >> 32) | (pattern << 32); - --length; - } - assert(0 == ((uintptr_t)dst & 7)); - for (i = 0; i < (length >> 1); ++i) { - ((uint64_t*)dst)[i] = pattern; // Copy the pattern 8 bytes at a time. - } - if (length & 1) { // Finish with left-over. - dst[i << 1] = src[i << 1]; - } -} - -static WEBP_INLINE void CopyBlock32b(uint32_t* const dst, - int dist, int length) { - const uint32_t* const src = dst - dist; - if (dist <= 2 && length >= 4 && ((uintptr_t)dst & 3) == 0) { - uint64_t pattern; - if (dist == 1) { - pattern = (uint64_t)src[0]; - pattern |= pattern << 32; - } else { - memcpy(&pattern, src, sizeof(pattern)); - } - CopySmallPattern32b(src, dst, length, pattern); - } else if (dist >= length) { // no overlap - memcpy(dst, src, length * sizeof(*dst)); - } else { - int i; - for (i = 0; i < length; ++i) dst[i] = src[i]; - } -} - -//------------------------------------------------------------------------------ - -static int DecodeAlphaData(VP8LDecoder* const dec, uint8_t* const data, - int width, int height, int last_row) { - int ok = 1; - int row = dec->last_pixel_ / width; - int col = dec->last_pixel_ % width; - VP8LBitReader* const br = &dec->br_; - VP8LMetadata* const hdr = &dec->hdr_; - int pos = dec->last_pixel_; // current position - const int end = width * height; // End of data - const int last = width * last_row; // Last pixel to decode - const int len_code_limit = NUM_LITERAL_CODES + NUM_LENGTH_CODES; - const int mask = hdr->huffman_mask_; - const HTreeGroup* htree_group = - (pos < last) ? GetHtreeGroupForPos(hdr, col, row) : NULL; - assert(pos <= end); - assert(last_row <= height); - assert(Is8bOptimizable(hdr)); - - while (!br->eos_ && pos < last) { - int code; - // Only update when changing tile. - if ((col & mask) == 0) { - htree_group = GetHtreeGroupForPos(hdr, col, row); - } - assert(htree_group != NULL); - VP8LFillBitWindow(br); - code = ReadSymbol(htree_group->htrees[GREEN], br); - if (code < NUM_LITERAL_CODES) { // Literal - data[pos] = code; - ++pos; - ++col; - if (col >= width) { - col = 0; - ++row; - if (row <= last_row && (row % NUM_ARGB_CACHE_ROWS == 0)) { - ExtractPalettedAlphaRows(dec, row); - } - } - } else if (code < len_code_limit) { // Backward reference - int dist_code, dist; - const int length_sym = code - NUM_LITERAL_CODES; - const int length = GetCopyLength(length_sym, br); - const int dist_symbol = ReadSymbol(htree_group->htrees[DIST], br); - VP8LFillBitWindow(br); - dist_code = GetCopyDistance(dist_symbol, br); - dist = PlaneCodeToDistance(width, dist_code); - if (pos >= dist && end - pos >= length) { - CopyBlock8b(data + pos, dist, length); - } else { - ok = 0; - goto End; - } - pos += length; - col += length; - while (col >= width) { - col -= width; - ++row; - if (row <= last_row && (row % NUM_ARGB_CACHE_ROWS == 0)) { - ExtractPalettedAlphaRows(dec, row); - } - } - if (pos < last && (col & mask)) { - htree_group = GetHtreeGroupForPos(hdr, col, row); - } - } else { // Not reached - ok = 0; - goto End; - } - br->eos_ = VP8LIsEndOfStream(br); - } - // Process the remaining rows corresponding to last row-block. - ExtractPalettedAlphaRows(dec, row > last_row ? last_row : row); - - End: - br->eos_ = VP8LIsEndOfStream(br); - if (!ok || (br->eos_ && pos < end)) { - ok = 0; - dec->status_ = br->eos_ ? VP8_STATUS_SUSPENDED - : VP8_STATUS_BITSTREAM_ERROR; - } else { - dec->last_pixel_ = pos; - } - return ok; -} - -static void SaveState(VP8LDecoder* const dec, int last_pixel) { - assert(dec->incremental_); - dec->saved_br_ = dec->br_; - dec->saved_last_pixel_ = last_pixel; - if (dec->hdr_.color_cache_size_ > 0) { - VP8LColorCacheCopy(&dec->hdr_.color_cache_, &dec->hdr_.saved_color_cache_); - } -} - -static void RestoreState(VP8LDecoder* const dec) { - assert(dec->br_.eos_); - dec->status_ = VP8_STATUS_SUSPENDED; - dec->br_ = dec->saved_br_; - dec->last_pixel_ = dec->saved_last_pixel_; - if (dec->hdr_.color_cache_size_ > 0) { - VP8LColorCacheCopy(&dec->hdr_.saved_color_cache_, &dec->hdr_.color_cache_); - } -} - -#define SYNC_EVERY_N_ROWS 8 // minimum number of rows between check-points -static int DecodeImageData(VP8LDecoder* const dec, uint32_t* const data, - int width, int height, int last_row, - ProcessRowsFunc process_func) { - int row = dec->last_pixel_ / width; - int col = dec->last_pixel_ % width; - VP8LBitReader* const br = &dec->br_; - VP8LMetadata* const hdr = &dec->hdr_; - uint32_t* src = data + dec->last_pixel_; - uint32_t* last_cached = src; - uint32_t* const src_end = data + width * height; // End of data - uint32_t* const src_last = data + width * last_row; // Last pixel to decode - const int len_code_limit = NUM_LITERAL_CODES + NUM_LENGTH_CODES; - const int color_cache_limit = len_code_limit + hdr->color_cache_size_; - int next_sync_row = dec->incremental_ ? row : 1 << 24; - VP8LColorCache* const color_cache = - (hdr->color_cache_size_ > 0) ? &hdr->color_cache_ : NULL; - const int mask = hdr->huffman_mask_; - const HTreeGroup* htree_group = - (src < src_last) ? GetHtreeGroupForPos(hdr, col, row) : NULL; - assert(dec->last_row_ < last_row); - assert(src_last <= src_end); - - while (src < src_last) { - int code; - if (row >= next_sync_row) { - SaveState(dec, (int)(src - data)); - next_sync_row = row + SYNC_EVERY_N_ROWS; - } - // Only update when changing tile. Note we could use this test: - // if "((((prev_col ^ col) | prev_row ^ row)) > mask)" -> tile changed - // but that's actually slower and needs storing the previous col/row. - if ((col & mask) == 0) { - htree_group = GetHtreeGroupForPos(hdr, col, row); - } - assert(htree_group != NULL); - if (htree_group->is_trivial_code) { - *src = htree_group->literal_arb; - goto AdvanceByOne; - } - VP8LFillBitWindow(br); - if (htree_group->use_packed_table) { - code = ReadPackedSymbols(htree_group, br, src); - if (VP8LIsEndOfStream(br)) break; - if (code == PACKED_NON_LITERAL_CODE) goto AdvanceByOne; - } else { - code = ReadSymbol(htree_group->htrees[GREEN], br); - } - if (VP8LIsEndOfStream(br)) break; - if (code < NUM_LITERAL_CODES) { // Literal - if (htree_group->is_trivial_literal) { - *src = htree_group->literal_arb | (code << 8); - } else { - int red, blue, alpha; - red = ReadSymbol(htree_group->htrees[RED], br); - VP8LFillBitWindow(br); - blue = ReadSymbol(htree_group->htrees[BLUE], br); - alpha = ReadSymbol(htree_group->htrees[ALPHA], br); - if (VP8LIsEndOfStream(br)) break; - *src = ((uint32_t)alpha << 24) | (red << 16) | (code << 8) | blue; - } - AdvanceByOne: - ++src; - ++col; - if (col >= width) { - col = 0; - ++row; - if (process_func != NULL) { - if (row <= last_row && (row % NUM_ARGB_CACHE_ROWS == 0)) { - process_func(dec, row); - } - } - if (color_cache != NULL) { - while (last_cached < src) { - VP8LColorCacheInsert(color_cache, *last_cached++); - } - } - } - } else if (code < len_code_limit) { // Backward reference - int dist_code, dist; - const int length_sym = code - NUM_LITERAL_CODES; - const int length = GetCopyLength(length_sym, br); - const int dist_symbol = ReadSymbol(htree_group->htrees[DIST], br); - VP8LFillBitWindow(br); - dist_code = GetCopyDistance(dist_symbol, br); - dist = PlaneCodeToDistance(width, dist_code); - if (VP8LIsEndOfStream(br)) break; - if (src - data < (ptrdiff_t)dist || src_end - src < (ptrdiff_t)length) { - goto Error; - } else { - CopyBlock32b(src, dist, length); - } - src += length; - col += length; - while (col >= width) { - col -= width; - ++row; - if (process_func != NULL) { - if (row <= last_row && (row % NUM_ARGB_CACHE_ROWS == 0)) { - process_func(dec, row); - } - } - } - // Because of the check done above (before 'src' was incremented by - // 'length'), the following holds true. - assert(src <= src_end); - if (col & mask) htree_group = GetHtreeGroupForPos(hdr, col, row); - if (color_cache != NULL) { - while (last_cached < src) { - VP8LColorCacheInsert(color_cache, *last_cached++); - } - } - } else if (code < color_cache_limit) { // Color cache - const int key = code - len_code_limit; - assert(color_cache != NULL); - while (last_cached < src) { - VP8LColorCacheInsert(color_cache, *last_cached++); - } - *src = VP8LColorCacheLookup(color_cache, key); - goto AdvanceByOne; - } else { // Not reached - goto Error; - } - } - - br->eos_ = VP8LIsEndOfStream(br); - if (dec->incremental_ && br->eos_ && src < src_end) { - RestoreState(dec); - } else if (!br->eos_) { - // Process the remaining rows corresponding to last row-block. - if (process_func != NULL) { - process_func(dec, row > last_row ? last_row : row); - } - dec->status_ = VP8_STATUS_OK; - dec->last_pixel_ = (int)(src - data); // end-of-scan marker - } else { - // if not incremental, and we are past the end of buffer (eos_=1), then this - // is a real bitstream error. - goto Error; - } - return 1; - - Error: - dec->status_ = VP8_STATUS_BITSTREAM_ERROR; - return 0; -} - -// ----------------------------------------------------------------------------- -// VP8LTransform - -static void ClearTransform(VP8LTransform* const transform) { - WebPSafeFree(transform->data_); - transform->data_ = NULL; -} - -// For security reason, we need to remap the color map to span -// the total possible bundled values, and not just the num_colors. -static int ExpandColorMap(int num_colors, VP8LTransform* const transform) { - int i; - const int final_num_colors = 1 << (8 >> transform->bits_); - uint32_t* const new_color_map = - (uint32_t*)WebPSafeMalloc((uint64_t)final_num_colors, - sizeof(*new_color_map)); - if (new_color_map == NULL) { - return 0; - } else { - uint8_t* const data = (uint8_t*)transform->data_; - uint8_t* const new_data = (uint8_t*)new_color_map; - new_color_map[0] = transform->data_[0]; - for (i = 4; i < 4 * num_colors; ++i) { - // Equivalent to AddPixelEq(), on a byte-basis. - new_data[i] = (data[i] + new_data[i - 4]) & 0xff; - } - for (; i < 4 * final_num_colors; ++i) { - new_data[i] = 0; // black tail. - } - WebPSafeFree(transform->data_); - transform->data_ = new_color_map; - } - return 1; -} - -static int ReadTransform(int* const xsize, int const* ysize, - VP8LDecoder* const dec) { - int ok = 1; - VP8LBitReader* const br = &dec->br_; - VP8LTransform* transform = &dec->transforms_[dec->next_transform_]; - const VP8LImageTransformType type = - (VP8LImageTransformType)VP8LReadBits(br, 2); - - // Each transform type can only be present once in the stream. - if (dec->transforms_seen_ & (1U << type)) { - return 0; // Already there, let's not accept the second same transform. - } - dec->transforms_seen_ |= (1U << type); - - transform->type_ = type; - transform->xsize_ = *xsize; - transform->ysize_ = *ysize; - transform->data_ = NULL; - ++dec->next_transform_; - assert(dec->next_transform_ <= NUM_TRANSFORMS); - - switch (type) { - case PREDICTOR_TRANSFORM: - case CROSS_COLOR_TRANSFORM: - transform->bits_ = VP8LReadBits(br, 3) + 2; - ok = DecodeImageStream(VP8LSubSampleSize(transform->xsize_, - transform->bits_), - VP8LSubSampleSize(transform->ysize_, - transform->bits_), - 0, dec, &transform->data_); - break; - case COLOR_INDEXING_TRANSFORM: { - const int num_colors = VP8LReadBits(br, 8) + 1; - const int bits = (num_colors > 16) ? 0 - : (num_colors > 4) ? 1 - : (num_colors > 2) ? 2 - : 3; - *xsize = VP8LSubSampleSize(transform->xsize_, bits); - transform->bits_ = bits; - ok = DecodeImageStream(num_colors, 1, 0, dec, &transform->data_); - ok = ok && ExpandColorMap(num_colors, transform); - break; - } - case SUBTRACT_GREEN: - break; - default: - assert(0); // can't happen - break; - } - - return ok; -} - -// ----------------------------------------------------------------------------- -// VP8LMetadata - -static void InitMetadata(VP8LMetadata* const hdr) { - assert(hdr != NULL); - memset(hdr, 0, sizeof(*hdr)); -} - -static void ClearMetadata(VP8LMetadata* const hdr) { - assert(hdr != NULL); - - WebPSafeFree(hdr->huffman_image_); - WebPSafeFree(hdr->huffman_tables_); - VP8LHtreeGroupsFree(hdr->htree_groups_); - VP8LColorCacheClear(&hdr->color_cache_); - VP8LColorCacheClear(&hdr->saved_color_cache_); - InitMetadata(hdr); -} - -// ----------------------------------------------------------------------------- -// VP8LDecoder - -VP8LDecoder* VP8LNew(void) { - VP8LDecoder* const dec = (VP8LDecoder*)WebPSafeCalloc(1ULL, sizeof(*dec)); - if (dec == NULL) return NULL; - dec->status_ = VP8_STATUS_OK; - dec->state_ = READ_DIM; - - VP8LDspInit(); // Init critical function pointers. - - return dec; -} - -void VP8LClear(VP8LDecoder* const dec) { - int i; - if (dec == NULL) return; - ClearMetadata(&dec->hdr_); - - WebPSafeFree(dec->pixels_); - dec->pixels_ = NULL; - for (i = 0; i < dec->next_transform_; ++i) { - ClearTransform(&dec->transforms_[i]); - } - dec->next_transform_ = 0; - dec->transforms_seen_ = 0; - - WebPSafeFree(dec->rescaler_memory); - dec->rescaler_memory = NULL; - - dec->output_ = NULL; // leave no trace behind -} - -void VP8LDelete(VP8LDecoder* const dec) { - if (dec != NULL) { - VP8LClear(dec); - WebPSafeFree(dec); - } -} - -static void UpdateDecoder(VP8LDecoder* const dec, int width, int height) { - VP8LMetadata* const hdr = &dec->hdr_; - const int num_bits = hdr->huffman_subsample_bits_; - dec->width_ = width; - dec->height_ = height; - - hdr->huffman_xsize_ = VP8LSubSampleSize(width, num_bits); - hdr->huffman_mask_ = (num_bits == 0) ? ~0 : (1 << num_bits) - 1; -} - -static int DecodeImageStream(int xsize, int ysize, - int is_level0, - VP8LDecoder* const dec, - uint32_t** const decoded_data) { - int ok = 1; - int transform_xsize = xsize; - int transform_ysize = ysize; - VP8LBitReader* const br = &dec->br_; - VP8LMetadata* const hdr = &dec->hdr_; - uint32_t* data = NULL; - int color_cache_bits = 0; - - // Read the transforms (may recurse). - if (is_level0) { - while (ok && VP8LReadBits(br, 1)) { - ok = ReadTransform(&transform_xsize, &transform_ysize, dec); - } - } - - // Color cache - if (ok && VP8LReadBits(br, 1)) { - color_cache_bits = VP8LReadBits(br, 4); - ok = (color_cache_bits >= 1 && color_cache_bits <= MAX_CACHE_BITS); - if (!ok) { - dec->status_ = VP8_STATUS_BITSTREAM_ERROR; - goto End; - } - } - - // Read the Huffman codes (may recurse). - ok = ok && ReadHuffmanCodes(dec, transform_xsize, transform_ysize, - color_cache_bits, is_level0); - if (!ok) { - dec->status_ = VP8_STATUS_BITSTREAM_ERROR; - goto End; - } - - // Finish setting up the color-cache - if (color_cache_bits > 0) { - hdr->color_cache_size_ = 1 << color_cache_bits; - if (!VP8LColorCacheInit(&hdr->color_cache_, color_cache_bits)) { - dec->status_ = VP8_STATUS_OUT_OF_MEMORY; - ok = 0; - goto End; - } - } else { - hdr->color_cache_size_ = 0; - } - UpdateDecoder(dec, transform_xsize, transform_ysize); - - if (is_level0) { // level 0 complete - dec->state_ = READ_HDR; - goto End; - } - - { - const uint64_t total_size = (uint64_t)transform_xsize * transform_ysize; - data = (uint32_t*)WebPSafeMalloc(total_size, sizeof(*data)); - if (data == NULL) { - dec->status_ = VP8_STATUS_OUT_OF_MEMORY; - ok = 0; - goto End; - } - } - - // Use the Huffman trees to decode the LZ77 encoded data. - ok = DecodeImageData(dec, data, transform_xsize, transform_ysize, - transform_ysize, NULL); - ok = ok && !br->eos_; - - End: - if (!ok) { - WebPSafeFree(data); - ClearMetadata(hdr); - } else { - if (decoded_data != NULL) { - *decoded_data = data; - } else { - // We allocate image data in this function only for transforms. At level 0 - // (that is: not the transforms), we shouldn't have allocated anything. - assert(data == NULL); - assert(is_level0); - } - dec->last_pixel_ = 0; // Reset for future DECODE_DATA_FUNC() calls. - if (!is_level0) ClearMetadata(hdr); // Clean up temporary data behind. - } - return ok; -} - -//------------------------------------------------------------------------------ -// Allocate internal buffers dec->pixels_ and dec->argb_cache_. -static int AllocateInternalBuffers32b(VP8LDecoder* const dec, int final_width) { - const uint64_t num_pixels = (uint64_t)dec->width_ * dec->height_; - // Scratch buffer corresponding to top-prediction row for transforming the - // first row in the row-blocks. Not needed for paletted alpha. - const uint64_t cache_top_pixels = (uint16_t)final_width; - // Scratch buffer for temporary BGRA storage. Not needed for paletted alpha. - const uint64_t cache_pixels = (uint64_t)final_width * NUM_ARGB_CACHE_ROWS; - const uint64_t total_num_pixels = - num_pixels + cache_top_pixels + cache_pixels; - - assert(dec->width_ <= final_width); - dec->pixels_ = (uint32_t*)WebPSafeMalloc(total_num_pixels, sizeof(uint32_t)); - if (dec->pixels_ == NULL) { - dec->argb_cache_ = NULL; // for sanity check - dec->status_ = VP8_STATUS_OUT_OF_MEMORY; - return 0; - } - dec->argb_cache_ = dec->pixels_ + num_pixels + cache_top_pixels; - return 1; -} - -static int AllocateInternalBuffers8b(VP8LDecoder* const dec) { - const uint64_t total_num_pixels = (uint64_t)dec->width_ * dec->height_; - dec->argb_cache_ = NULL; // for sanity check - dec->pixels_ = (uint32_t*)WebPSafeMalloc(total_num_pixels, sizeof(uint8_t)); - if (dec->pixels_ == NULL) { - dec->status_ = VP8_STATUS_OUT_OF_MEMORY; - return 0; - } - return 1; -} - -//------------------------------------------------------------------------------ - -// Special row-processing that only stores the alpha data. -static void ExtractAlphaRows(VP8LDecoder* const dec, int last_row) { - int cur_row = dec->last_row_; - int num_rows = last_row - cur_row; - const uint32_t* in = dec->pixels_ + dec->width_ * cur_row; - - assert(last_row <= dec->io_->crop_bottom); - while (num_rows > 0) { - const int num_rows_to_process = - (num_rows > NUM_ARGB_CACHE_ROWS) ? NUM_ARGB_CACHE_ROWS : num_rows; - // Extract alpha (which is stored in the green plane). - ALPHDecoder* const alph_dec = (ALPHDecoder*)dec->io_->opaque; - uint8_t* const output = alph_dec->output_; - const int width = dec->io_->width; // the final width (!= dec->width_) - const int cache_pixs = width * num_rows_to_process; - uint8_t* const dst = output + width * cur_row; - const uint32_t* const src = dec->argb_cache_; - ApplyInverseTransforms(dec, num_rows_to_process, in); - WebPExtractGreen(src, dst, cache_pixs); - AlphaApplyFilter(alph_dec, - cur_row, cur_row + num_rows_to_process, dst, width); - num_rows -= num_rows_to_process; - in += num_rows_to_process * dec->width_; - cur_row += num_rows_to_process; - } - assert(cur_row == last_row); - dec->last_row_ = dec->last_out_row_ = last_row; -} - -int VP8LDecodeAlphaHeader(ALPHDecoder* const alph_dec, - const uint8_t* const data, size_t data_size) { - int ok = 0; - VP8LDecoder* dec = VP8LNew(); - - if (dec == NULL) return 0; - - assert(alph_dec != NULL); - - dec->width_ = alph_dec->width_; - dec->height_ = alph_dec->height_; - dec->io_ = &alph_dec->io_; - dec->io_->opaque = alph_dec; - dec->io_->width = alph_dec->width_; - dec->io_->height = alph_dec->height_; - - dec->status_ = VP8_STATUS_OK; - VP8LInitBitReader(&dec->br_, data, data_size); - - if (!DecodeImageStream(alph_dec->width_, alph_dec->height_, 1, dec, NULL)) { - goto Err; - } - - // Special case: if alpha data uses only the color indexing transform and - // doesn't use color cache (a frequent case), we will use DecodeAlphaData() - // method that only needs allocation of 1 byte per pixel (alpha channel). - if (dec->next_transform_ == 1 && - dec->transforms_[0].type_ == COLOR_INDEXING_TRANSFORM && - Is8bOptimizable(&dec->hdr_)) { - alph_dec->use_8b_decode_ = 1; - ok = AllocateInternalBuffers8b(dec); - } else { - // Allocate internal buffers (note that dec->width_ may have changed here). - alph_dec->use_8b_decode_ = 0; - ok = AllocateInternalBuffers32b(dec, alph_dec->width_); - } - - if (!ok) goto Err; - - // Only set here, once we are sure it is valid (to avoid thread races). - alph_dec->vp8l_dec_ = dec; - return 1; - - Err: - VP8LDelete(dec); - return 0; -} - -int VP8LDecodeAlphaImageStream(ALPHDecoder* const alph_dec, int last_row) { - VP8LDecoder* const dec = alph_dec->vp8l_dec_; - assert(dec != NULL); - assert(last_row <= dec->height_); - - if (dec->last_row_ >= last_row) { - return 1; // done - } - - if (!alph_dec->use_8b_decode_) WebPInitAlphaProcessing(); - - // Decode (with special row processing). - return alph_dec->use_8b_decode_ ? - DecodeAlphaData(dec, (uint8_t*)dec->pixels_, dec->width_, dec->height_, - last_row) : - DecodeImageData(dec, dec->pixels_, dec->width_, dec->height_, - last_row, ExtractAlphaRows); -} - -//------------------------------------------------------------------------------ - -int VP8LDecodeHeader(VP8LDecoder* const dec, VP8Io* const io) { - int width, height, has_alpha; - - if (dec == NULL) return 0; - if (io == NULL) { - dec->status_ = VP8_STATUS_INVALID_PARAM; - return 0; - } - - dec->io_ = io; - dec->status_ = VP8_STATUS_OK; - VP8LInitBitReader(&dec->br_, io->data, io->data_size); - if (!ReadImageInfo(&dec->br_, &width, &height, &has_alpha)) { - dec->status_ = VP8_STATUS_BITSTREAM_ERROR; - goto Error; - } - dec->state_ = READ_DIM; - io->width = width; - io->height = height; - - if (!DecodeImageStream(width, height, 1, dec, NULL)) goto Error; - return 1; - - Error: - VP8LClear(dec); - assert(dec->status_ != VP8_STATUS_OK); - return 0; -} - -int VP8LDecodeImage(VP8LDecoder* const dec) { - VP8Io* io = NULL; - WebPDecParams* params = NULL; - - // Sanity checks. - if (dec == NULL) return 0; - - assert(dec->hdr_.huffman_tables_ != NULL); - assert(dec->hdr_.htree_groups_ != NULL); - assert(dec->hdr_.num_htree_groups_ > 0); - - io = dec->io_; - assert(io != NULL); - params = (WebPDecParams*)io->opaque; - assert(params != NULL); - - // Initialization. - if (dec->state_ != READ_DATA) { - dec->output_ = params->output; - assert(dec->output_ != NULL); - - if (!WebPIoInitFromOptions(params->options, io, MODE_BGRA)) { - dec->status_ = VP8_STATUS_INVALID_PARAM; - goto Err; - } - - if (!AllocateInternalBuffers32b(dec, io->width)) goto Err; - -#if !defined(WEBP_REDUCE_SIZE) - if (io->use_scaling && !AllocateAndInitRescaler(dec, io)) goto Err; -#else - if (io->use_scaling) { - dec->status_ = VP8_STATUS_INVALID_PARAM; - goto Err; - } -#endif - if (io->use_scaling || WebPIsPremultipliedMode(dec->output_->colorspace)) { - // need the alpha-multiply functions for premultiplied output or rescaling - WebPInitAlphaProcessing(); - } - - if (!WebPIsRGBMode(dec->output_->colorspace)) { - WebPInitConvertARGBToYUV(); - if (dec->output_->u.YUVA.a != NULL) WebPInitAlphaProcessing(); - } - if (dec->incremental_) { - if (dec->hdr_.color_cache_size_ > 0 && - dec->hdr_.saved_color_cache_.colors_ == NULL) { - if (!VP8LColorCacheInit(&dec->hdr_.saved_color_cache_, - dec->hdr_.color_cache_.hash_bits_)) { - dec->status_ = VP8_STATUS_OUT_OF_MEMORY; - goto Err; - } - } - } - dec->state_ = READ_DATA; - } - - // Decode. - if (!DecodeImageData(dec, dec->pixels_, dec->width_, dec->height_, - io->crop_bottom, ProcessRows)) { - goto Err; - } - - params->last_y = dec->last_out_row_; - return 1; - - Err: - VP8LClear(dec); - assert(dec->status_ != VP8_STATUS_OK); - return 0; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8li_dec.h b/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8li_dec.h deleted file mode 100644 index 1dc98f0..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/vp8li_dec.h +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Lossless decoder: internal header. -// -// Author: Skal (pascal.massimino@gmail.com) -// Vikas Arora(vikaas.arora@gmail.com) - -#ifndef WEBP_DEC_VP8LI_DEC_H_ -#define WEBP_DEC_VP8LI_DEC_H_ - -#include // for memcpy() -#include "src/dec/webpi_dec.h" -#include "src/utils/bit_reader_utils.h" -#include "src/utils/color_cache_utils.h" -#include "src/utils/huffman_utils.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - READ_DATA = 0, - READ_HDR = 1, - READ_DIM = 2 -} VP8LDecodeState; - -typedef struct VP8LTransform VP8LTransform; -struct VP8LTransform { - VP8LImageTransformType type_; // transform type. - int bits_; // subsampling bits defining transform window. - int xsize_; // transform window X index. - int ysize_; // transform window Y index. - uint32_t *data_; // transform data. -}; - -typedef struct { - int color_cache_size_; - VP8LColorCache color_cache_; - VP8LColorCache saved_color_cache_; // for incremental - - int huffman_mask_; - int huffman_subsample_bits_; - int huffman_xsize_; - uint32_t *huffman_image_; - int num_htree_groups_; - HTreeGroup *htree_groups_; - HuffmanCode *huffman_tables_; -} VP8LMetadata; - -typedef struct VP8LDecoder VP8LDecoder; -struct VP8LDecoder { - VP8StatusCode status_; - VP8LDecodeState state_; - VP8Io *io_; - - const WebPDecBuffer *output_; // shortcut to io->opaque->output - - uint32_t *pixels_; // Internal data: either uint8_t* for alpha - // or uint32_t* for BGRA. - uint32_t *argb_cache_; // Scratch buffer for temporary BGRA storage. - - VP8LBitReader br_; - int incremental_; // if true, incremental decoding is expected - VP8LBitReader saved_br_; // note: could be local variables too - int saved_last_pixel_; - - int width_; - int height_; - int last_row_; // last input row decoded so far. - int last_pixel_; // last pixel decoded so far. However, it may - // not be transformed, scaled and - // color-converted yet. - int last_out_row_; // last row output so far. - - VP8LMetadata hdr_; - - int next_transform_; - VP8LTransform transforms_[NUM_TRANSFORMS]; - // or'd bitset storing the transforms types. - uint32_t transforms_seen_; - - uint8_t *rescaler_memory; // Working memory for rescaling work. - WebPRescaler *rescaler; // Common rescaler for all channels. -}; - -//------------------------------------------------------------------------------ -// internal functions. Not public. - -struct ALPHDecoder; // Defined in dec/alphai.h. - -// in vp8l.c - -// Decodes image header for alpha data stored using lossless compression. -// Returns false in case of error. -int VP8LDecodeAlphaHeader(struct ALPHDecoder* const alph_dec, - const uint8_t* const data, size_t data_size); - -// Decodes *at least* 'last_row' rows of alpha. If some of the initial rows are -// already decoded in previous call(s), it will resume decoding from where it -// was paused. -// Returns false in case of bitstream error. -int VP8LDecodeAlphaImageStream(struct ALPHDecoder* const alph_dec, - int last_row); - -// Allocates and initialize a new lossless decoder instance. -VP8LDecoder* VP8LNew(void); - -// Decodes the image header. Returns false in case of error. -int VP8LDecodeHeader(VP8LDecoder* const dec, VP8Io* const io); - -// Decodes an image. It's required to decode the lossless header before calling -// this function. Returns false in case of error, with updated dec->status_. -int VP8LDecodeImage(VP8LDecoder* const dec); - -// Resets the decoder in its initial state, reclaiming memory. -// Preserves the dec->status_ value. -void VP8LClear(VP8LDecoder* const dec); - -// Clears and deallocate a lossless decoder instance. -void VP8LDelete(VP8LDecoder* const dec); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_DEC_VP8LI_DEC_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/webp_dec.c b/Dependencies/FreeImage/Source/LibWebP/src/dec/webp_dec.c deleted file mode 100644 index c71c6ef..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/webp_dec.c +++ /dev/null @@ -1,845 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Main decoding functions for WEBP images. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include - -#include "src/dec/vp8i_dec.h" -#include "src/dec/vp8li_dec.h" -#include "src/dec/webpi_dec.h" -#include "src/utils/utils.h" -#include "src/webp/mux_types.h" // ALPHA_FLAG - -//------------------------------------------------------------------------------ -// RIFF layout is: -// Offset tag -// 0...3 "RIFF" 4-byte tag -// 4...7 size of image data (including metadata) starting at offset 8 -// 8...11 "WEBP" our form-type signature -// The RIFF container (12 bytes) is followed by appropriate chunks: -// 12..15 "VP8 ": 4-bytes tags, signaling the use of VP8 video format -// 16..19 size of the raw VP8 image data, starting at offset 20 -// 20.... the VP8 bytes -// Or, -// 12..15 "VP8L": 4-bytes tags, signaling the use of VP8L lossless format -// 16..19 size of the raw VP8L image data, starting at offset 20 -// 20.... the VP8L bytes -// Or, -// 12..15 "VP8X": 4-bytes tags, describing the extended-VP8 chunk. -// 16..19 size of the VP8X chunk starting at offset 20. -// 20..23 VP8X flags bit-map corresponding to the chunk-types present. -// 24..26 Width of the Canvas Image. -// 27..29 Height of the Canvas Image. -// There can be extra chunks after the "VP8X" chunk (ICCP, ANMF, VP8, VP8L, -// XMP, EXIF ...) -// All sizes are in little-endian order. -// Note: chunk data size must be padded to multiple of 2 when written. - -// Validates the RIFF container (if detected) and skips over it. -// If a RIFF container is detected, returns: -// VP8_STATUS_BITSTREAM_ERROR for invalid header, -// VP8_STATUS_NOT_ENOUGH_DATA for truncated data if have_all_data is true, -// and VP8_STATUS_OK otherwise. -// In case there are not enough bytes (partial RIFF container), return 0 for -// *riff_size. Else return the RIFF size extracted from the header. -static VP8StatusCode ParseRIFF(const uint8_t** const data, - size_t* const data_size, int have_all_data, - size_t* const riff_size) { - assert(data != NULL); - assert(data_size != NULL); - assert(riff_size != NULL); - - *riff_size = 0; // Default: no RIFF present. - if (*data_size >= RIFF_HEADER_SIZE && !memcmp(*data, "RIFF", TAG_SIZE)) { - if (memcmp(*data + 8, "WEBP", TAG_SIZE)) { - return VP8_STATUS_BITSTREAM_ERROR; // Wrong image file signature. - } else { - const uint32_t size = GetLE32(*data + TAG_SIZE); - // Check that we have at least one chunk (i.e "WEBP" + "VP8?nnnn"). - if (size < TAG_SIZE + CHUNK_HEADER_SIZE) { - return VP8_STATUS_BITSTREAM_ERROR; - } - if (size > MAX_CHUNK_PAYLOAD) { - return VP8_STATUS_BITSTREAM_ERROR; - } - if (have_all_data && (size > *data_size - CHUNK_HEADER_SIZE)) { - return VP8_STATUS_NOT_ENOUGH_DATA; // Truncated bitstream. - } - // We have a RIFF container. Skip it. - *riff_size = size; - *data += RIFF_HEADER_SIZE; - *data_size -= RIFF_HEADER_SIZE; - } - } - return VP8_STATUS_OK; -} - -// Validates the VP8X header and skips over it. -// Returns VP8_STATUS_BITSTREAM_ERROR for invalid VP8X header, -// VP8_STATUS_NOT_ENOUGH_DATA in case of insufficient data, and -// VP8_STATUS_OK otherwise. -// If a VP8X chunk is found, found_vp8x is set to true and *width_ptr, -// *height_ptr and *flags_ptr are set to the corresponding values extracted -// from the VP8X chunk. -static VP8StatusCode ParseVP8X(const uint8_t** const data, - size_t* const data_size, - int* const found_vp8x, - int* const width_ptr, int* const height_ptr, - uint32_t* const flags_ptr) { - const uint32_t vp8x_size = CHUNK_HEADER_SIZE + VP8X_CHUNK_SIZE; - assert(data != NULL); - assert(data_size != NULL); - assert(found_vp8x != NULL); - - *found_vp8x = 0; - - if (*data_size < CHUNK_HEADER_SIZE) { - return VP8_STATUS_NOT_ENOUGH_DATA; // Insufficient data. - } - - if (!memcmp(*data, "VP8X", TAG_SIZE)) { - int width, height; - uint32_t flags; - const uint32_t chunk_size = GetLE32(*data + TAG_SIZE); - if (chunk_size != VP8X_CHUNK_SIZE) { - return VP8_STATUS_BITSTREAM_ERROR; // Wrong chunk size. - } - - // Verify if enough data is available to validate the VP8X chunk. - if (*data_size < vp8x_size) { - return VP8_STATUS_NOT_ENOUGH_DATA; // Insufficient data. - } - flags = GetLE32(*data + 8); - width = 1 + GetLE24(*data + 12); - height = 1 + GetLE24(*data + 15); - if (width * (uint64_t)height >= MAX_IMAGE_AREA) { - return VP8_STATUS_BITSTREAM_ERROR; // image is too large - } - - if (flags_ptr != NULL) *flags_ptr = flags; - if (width_ptr != NULL) *width_ptr = width; - if (height_ptr != NULL) *height_ptr = height; - // Skip over VP8X header bytes. - *data += vp8x_size; - *data_size -= vp8x_size; - *found_vp8x = 1; - } - return VP8_STATUS_OK; -} - -// Skips to the next VP8/VP8L chunk header in the data given the size of the -// RIFF chunk 'riff_size'. -// Returns VP8_STATUS_BITSTREAM_ERROR if any invalid chunk size is encountered, -// VP8_STATUS_NOT_ENOUGH_DATA in case of insufficient data, and -// VP8_STATUS_OK otherwise. -// If an alpha chunk is found, *alpha_data and *alpha_size are set -// appropriately. -static VP8StatusCode ParseOptionalChunks(const uint8_t** const data, - size_t* const data_size, - size_t const riff_size, - const uint8_t** const alpha_data, - size_t* const alpha_size) { - const uint8_t* buf; - size_t buf_size; - uint32_t total_size = TAG_SIZE + // "WEBP". - CHUNK_HEADER_SIZE + // "VP8Xnnnn". - VP8X_CHUNK_SIZE; // data. - assert(data != NULL); - assert(data_size != NULL); - buf = *data; - buf_size = *data_size; - - assert(alpha_data != NULL); - assert(alpha_size != NULL); - *alpha_data = NULL; - *alpha_size = 0; - - while (1) { - uint32_t chunk_size; - uint32_t disk_chunk_size; // chunk_size with padding - - *data = buf; - *data_size = buf_size; - - if (buf_size < CHUNK_HEADER_SIZE) { // Insufficient data. - return VP8_STATUS_NOT_ENOUGH_DATA; - } - - chunk_size = GetLE32(buf + TAG_SIZE); - if (chunk_size > MAX_CHUNK_PAYLOAD) { - return VP8_STATUS_BITSTREAM_ERROR; // Not a valid chunk size. - } - // For odd-sized chunk-payload, there's one byte padding at the end. - disk_chunk_size = (CHUNK_HEADER_SIZE + chunk_size + 1) & ~1; - total_size += disk_chunk_size; - - // Check that total bytes skipped so far does not exceed riff_size. - if (riff_size > 0 && (total_size > riff_size)) { - return VP8_STATUS_BITSTREAM_ERROR; // Not a valid chunk size. - } - - // Start of a (possibly incomplete) VP8/VP8L chunk implies that we have - // parsed all the optional chunks. - // Note: This check must occur before the check 'buf_size < disk_chunk_size' - // below to allow incomplete VP8/VP8L chunks. - if (!memcmp(buf, "VP8 ", TAG_SIZE) || - !memcmp(buf, "VP8L", TAG_SIZE)) { - return VP8_STATUS_OK; - } - - if (buf_size < disk_chunk_size) { // Insufficient data. - return VP8_STATUS_NOT_ENOUGH_DATA; - } - - if (!memcmp(buf, "ALPH", TAG_SIZE)) { // A valid ALPH header. - *alpha_data = buf + CHUNK_HEADER_SIZE; - *alpha_size = chunk_size; - } - - // We have a full and valid chunk; skip it. - buf += disk_chunk_size; - buf_size -= disk_chunk_size; - } -} - -// Validates the VP8/VP8L Header ("VP8 nnnn" or "VP8L nnnn") and skips over it. -// Returns VP8_STATUS_BITSTREAM_ERROR for invalid (chunk larger than -// riff_size) VP8/VP8L header, -// VP8_STATUS_NOT_ENOUGH_DATA in case of insufficient data, and -// VP8_STATUS_OK otherwise. -// If a VP8/VP8L chunk is found, *chunk_size is set to the total number of bytes -// extracted from the VP8/VP8L chunk header. -// The flag '*is_lossless' is set to 1 in case of VP8L chunk / raw VP8L data. -static VP8StatusCode ParseVP8Header(const uint8_t** const data_ptr, - size_t* const data_size, int have_all_data, - size_t riff_size, size_t* const chunk_size, - int* const is_lossless) { - const uint8_t* const data = *data_ptr; - const int is_vp8 = !memcmp(data, "VP8 ", TAG_SIZE); - const int is_vp8l = !memcmp(data, "VP8L", TAG_SIZE); - const uint32_t minimal_size = - TAG_SIZE + CHUNK_HEADER_SIZE; // "WEBP" + "VP8 nnnn" OR - // "WEBP" + "VP8Lnnnn" - assert(data != NULL); - assert(data_size != NULL); - assert(chunk_size != NULL); - assert(is_lossless != NULL); - - if (*data_size < CHUNK_HEADER_SIZE) { - return VP8_STATUS_NOT_ENOUGH_DATA; // Insufficient data. - } - - if (is_vp8 || is_vp8l) { - // Bitstream contains VP8/VP8L header. - const uint32_t size = GetLE32(data + TAG_SIZE); - if ((riff_size >= minimal_size) && (size > riff_size - minimal_size)) { - return VP8_STATUS_BITSTREAM_ERROR; // Inconsistent size information. - } - if (have_all_data && (size > *data_size - CHUNK_HEADER_SIZE)) { - return VP8_STATUS_NOT_ENOUGH_DATA; // Truncated bitstream. - } - // Skip over CHUNK_HEADER_SIZE bytes from VP8/VP8L Header. - *chunk_size = size; - *data_ptr += CHUNK_HEADER_SIZE; - *data_size -= CHUNK_HEADER_SIZE; - *is_lossless = is_vp8l; - } else { - // Raw VP8/VP8L bitstream (no header). - *is_lossless = VP8LCheckSignature(data, *data_size); - *chunk_size = *data_size; - } - - return VP8_STATUS_OK; -} - -//------------------------------------------------------------------------------ - -// Fetch '*width', '*height', '*has_alpha' and fill out 'headers' based on -// 'data'. All the output parameters may be NULL. If 'headers' is NULL only the -// minimal amount will be read to fetch the remaining parameters. -// If 'headers' is non-NULL this function will attempt to locate both alpha -// data (with or without a VP8X chunk) and the bitstream chunk (VP8/VP8L). -// Note: The following chunk sequences (before the raw VP8/VP8L data) are -// considered valid by this function: -// RIFF + VP8(L) -// RIFF + VP8X + (optional chunks) + VP8(L) -// ALPH + VP8 <-- Not a valid WebP format: only allowed for internal purpose. -// VP8(L) <-- Not a valid WebP format: only allowed for internal purpose. -static VP8StatusCode ParseHeadersInternal(const uint8_t* data, - size_t data_size, - int* const width, - int* const height, - int* const has_alpha, - int* const has_animation, - int* const format, - WebPHeaderStructure* const headers) { - int canvas_width = 0; - int canvas_height = 0; - int image_width = 0; - int image_height = 0; - int found_riff = 0; - int found_vp8x = 0; - int animation_present = 0; - const int have_all_data = (headers != NULL) ? headers->have_all_data : 0; - - VP8StatusCode status; - WebPHeaderStructure hdrs; - - if (data == NULL || data_size < RIFF_HEADER_SIZE) { - return VP8_STATUS_NOT_ENOUGH_DATA; - } - memset(&hdrs, 0, sizeof(hdrs)); - hdrs.data = data; - hdrs.data_size = data_size; - - // Skip over RIFF header. - status = ParseRIFF(&data, &data_size, have_all_data, &hdrs.riff_size); - if (status != VP8_STATUS_OK) { - return status; // Wrong RIFF header / insufficient data. - } - found_riff = (hdrs.riff_size > 0); - - // Skip over VP8X. - { - uint32_t flags = 0; - status = ParseVP8X(&data, &data_size, &found_vp8x, - &canvas_width, &canvas_height, &flags); - if (status != VP8_STATUS_OK) { - return status; // Wrong VP8X / insufficient data. - } - animation_present = !!(flags & ANIMATION_FLAG); - if (!found_riff && found_vp8x) { - // Note: This restriction may be removed in the future, if it becomes - // necessary to send VP8X chunk to the decoder. - return VP8_STATUS_BITSTREAM_ERROR; - } - if (has_alpha != NULL) *has_alpha = !!(flags & ALPHA_FLAG); - if (has_animation != NULL) *has_animation = animation_present; - if (format != NULL) *format = 0; // default = undefined - - image_width = canvas_width; - image_height = canvas_height; - if (found_vp8x && animation_present && headers == NULL) { - status = VP8_STATUS_OK; - goto ReturnWidthHeight; // Just return features from VP8X header. - } - } - - if (data_size < TAG_SIZE) { - status = VP8_STATUS_NOT_ENOUGH_DATA; - goto ReturnWidthHeight; - } - - // Skip over optional chunks if data started with "RIFF + VP8X" or "ALPH". - if ((found_riff && found_vp8x) || - (!found_riff && !found_vp8x && !memcmp(data, "ALPH", TAG_SIZE))) { - status = ParseOptionalChunks(&data, &data_size, hdrs.riff_size, - &hdrs.alpha_data, &hdrs.alpha_data_size); - if (status != VP8_STATUS_OK) { - goto ReturnWidthHeight; // Invalid chunk size / insufficient data. - } - } - - // Skip over VP8/VP8L header. - status = ParseVP8Header(&data, &data_size, have_all_data, hdrs.riff_size, - &hdrs.compressed_size, &hdrs.is_lossless); - if (status != VP8_STATUS_OK) { - goto ReturnWidthHeight; // Wrong VP8/VP8L chunk-header / insufficient data. - } - if (hdrs.compressed_size > MAX_CHUNK_PAYLOAD) { - return VP8_STATUS_BITSTREAM_ERROR; - } - - if (format != NULL && !animation_present) { - *format = hdrs.is_lossless ? 2 : 1; - } - - if (!hdrs.is_lossless) { - if (data_size < VP8_FRAME_HEADER_SIZE) { - status = VP8_STATUS_NOT_ENOUGH_DATA; - goto ReturnWidthHeight; - } - // Validates raw VP8 data. - if (!VP8GetInfo(data, data_size, (uint32_t)hdrs.compressed_size, - &image_width, &image_height)) { - return VP8_STATUS_BITSTREAM_ERROR; - } - } else { - if (data_size < VP8L_FRAME_HEADER_SIZE) { - status = VP8_STATUS_NOT_ENOUGH_DATA; - goto ReturnWidthHeight; - } - // Validates raw VP8L data. - if (!VP8LGetInfo(data, data_size, &image_width, &image_height, has_alpha)) { - return VP8_STATUS_BITSTREAM_ERROR; - } - } - // Validates image size coherency. - if (found_vp8x) { - if (canvas_width != image_width || canvas_height != image_height) { - return VP8_STATUS_BITSTREAM_ERROR; - } - } - if (headers != NULL) { - *headers = hdrs; - headers->offset = data - headers->data; - assert((uint64_t)(data - headers->data) < MAX_CHUNK_PAYLOAD); - assert(headers->offset == headers->data_size - data_size); - } - ReturnWidthHeight: - if (status == VP8_STATUS_OK || - (status == VP8_STATUS_NOT_ENOUGH_DATA && found_vp8x && headers == NULL)) { - if (has_alpha != NULL) { - // If the data did not contain a VP8X/VP8L chunk the only definitive way - // to set this is by looking for alpha data (from an ALPH chunk). - *has_alpha |= (hdrs.alpha_data != NULL); - } - if (width != NULL) *width = image_width; - if (height != NULL) *height = image_height; - return VP8_STATUS_OK; - } else { - return status; - } -} - -VP8StatusCode WebPParseHeaders(WebPHeaderStructure* const headers) { - // status is marked volatile as a workaround for a clang-3.8 (aarch64) bug - volatile VP8StatusCode status; - int has_animation = 0; - assert(headers != NULL); - // fill out headers, ignore width/height/has_alpha. - status = ParseHeadersInternal(headers->data, headers->data_size, - NULL, NULL, NULL, &has_animation, - NULL, headers); - if (status == VP8_STATUS_OK || status == VP8_STATUS_NOT_ENOUGH_DATA) { - // The WebPDemux API + libwebp can be used to decode individual - // uncomposited frames or the WebPAnimDecoder can be used to fully - // reconstruct them (see webp/demux.h). - if (has_animation) { - status = VP8_STATUS_UNSUPPORTED_FEATURE; - } - } - return status; -} - -//------------------------------------------------------------------------------ -// WebPDecParams - -void WebPResetDecParams(WebPDecParams* const params) { - if (params != NULL) { - memset(params, 0, sizeof(*params)); - } -} - -//------------------------------------------------------------------------------ -// "Into" decoding variants - -// Main flow -static VP8StatusCode DecodeInto(const uint8_t* const data, size_t data_size, - WebPDecParams* const params) { - VP8StatusCode status; - VP8Io io; - WebPHeaderStructure headers; - - headers.data = data; - headers.data_size = data_size; - headers.have_all_data = 1; - status = WebPParseHeaders(&headers); // Process Pre-VP8 chunks. - if (status != VP8_STATUS_OK) { - return status; - } - - assert(params != NULL); - VP8InitIo(&io); - io.data = headers.data + headers.offset; - io.data_size = headers.data_size - headers.offset; - WebPInitCustomIo(params, &io); // Plug the I/O functions. - - if (!headers.is_lossless) { - VP8Decoder* const dec = VP8New(); - if (dec == NULL) { - return VP8_STATUS_OUT_OF_MEMORY; - } - dec->alpha_data_ = headers.alpha_data; - dec->alpha_data_size_ = headers.alpha_data_size; - - // Decode bitstream header, update io->width/io->height. - if (!VP8GetHeaders(dec, &io)) { - status = dec->status_; // An error occurred. Grab error status. - } else { - // Allocate/check output buffers. - status = WebPAllocateDecBuffer(io.width, io.height, params->options, - params->output); - if (status == VP8_STATUS_OK) { // Decode - // This change must be done before calling VP8Decode() - dec->mt_method_ = VP8GetThreadMethod(params->options, &headers, - io.width, io.height); - VP8InitDithering(params->options, dec); - if (!VP8Decode(dec, &io)) { - status = dec->status_; - } - } - } - VP8Delete(dec); - } else { - VP8LDecoder* const dec = VP8LNew(); - if (dec == NULL) { - return VP8_STATUS_OUT_OF_MEMORY; - } - if (!VP8LDecodeHeader(dec, &io)) { - status = dec->status_; // An error occurred. Grab error status. - } else { - // Allocate/check output buffers. - status = WebPAllocateDecBuffer(io.width, io.height, params->options, - params->output); - if (status == VP8_STATUS_OK) { // Decode - if (!VP8LDecodeImage(dec)) { - status = dec->status_; - } - } - } - VP8LDelete(dec); - } - - if (status != VP8_STATUS_OK) { - WebPFreeDecBuffer(params->output); - } else { - if (params->options != NULL && params->options->flip) { - // This restores the original stride values if options->flip was used - // during the call to WebPAllocateDecBuffer above. - status = WebPFlipBuffer(params->output); - } - } - return status; -} - -// Helpers -static uint8_t* DecodeIntoRGBABuffer(WEBP_CSP_MODE colorspace, - const uint8_t* const data, - size_t data_size, - uint8_t* const rgba, - int stride, size_t size) { - WebPDecParams params; - WebPDecBuffer buf; - if (rgba == NULL) { - return NULL; - } - WebPInitDecBuffer(&buf); - WebPResetDecParams(¶ms); - params.output = &buf; - buf.colorspace = colorspace; - buf.u.RGBA.rgba = rgba; - buf.u.RGBA.stride = stride; - buf.u.RGBA.size = size; - buf.is_external_memory = 1; - if (DecodeInto(data, data_size, ¶ms) != VP8_STATUS_OK) { - return NULL; - } - return rgba; -} - -uint8_t* WebPDecodeRGBInto(const uint8_t* data, size_t data_size, - uint8_t* output, size_t size, int stride) { - return DecodeIntoRGBABuffer(MODE_RGB, data, data_size, output, stride, size); -} - -uint8_t* WebPDecodeRGBAInto(const uint8_t* data, size_t data_size, - uint8_t* output, size_t size, int stride) { - return DecodeIntoRGBABuffer(MODE_RGBA, data, data_size, output, stride, size); -} - -uint8_t* WebPDecodeARGBInto(const uint8_t* data, size_t data_size, - uint8_t* output, size_t size, int stride) { - return DecodeIntoRGBABuffer(MODE_ARGB, data, data_size, output, stride, size); -} - -uint8_t* WebPDecodeBGRInto(const uint8_t* data, size_t data_size, - uint8_t* output, size_t size, int stride) { - return DecodeIntoRGBABuffer(MODE_BGR, data, data_size, output, stride, size); -} - -uint8_t* WebPDecodeBGRAInto(const uint8_t* data, size_t data_size, - uint8_t* output, size_t size, int stride) { - return DecodeIntoRGBABuffer(MODE_BGRA, data, data_size, output, stride, size); -} - -uint8_t* WebPDecodeYUVInto(const uint8_t* data, size_t data_size, - uint8_t* luma, size_t luma_size, int luma_stride, - uint8_t* u, size_t u_size, int u_stride, - uint8_t* v, size_t v_size, int v_stride) { - WebPDecParams params; - WebPDecBuffer output; - if (luma == NULL) return NULL; - WebPInitDecBuffer(&output); - WebPResetDecParams(¶ms); - params.output = &output; - output.colorspace = MODE_YUV; - output.u.YUVA.y = luma; - output.u.YUVA.y_stride = luma_stride; - output.u.YUVA.y_size = luma_size; - output.u.YUVA.u = u; - output.u.YUVA.u_stride = u_stride; - output.u.YUVA.u_size = u_size; - output.u.YUVA.v = v; - output.u.YUVA.v_stride = v_stride; - output.u.YUVA.v_size = v_size; - output.is_external_memory = 1; - if (DecodeInto(data, data_size, ¶ms) != VP8_STATUS_OK) { - return NULL; - } - return luma; -} - -//------------------------------------------------------------------------------ - -static uint8_t* Decode(WEBP_CSP_MODE mode, const uint8_t* const data, - size_t data_size, int* const width, int* const height, - WebPDecBuffer* const keep_info) { - WebPDecParams params; - WebPDecBuffer output; - - WebPInitDecBuffer(&output); - WebPResetDecParams(¶ms); - params.output = &output; - output.colorspace = mode; - - // Retrieve (and report back) the required dimensions from bitstream. - if (!WebPGetInfo(data, data_size, &output.width, &output.height)) { - return NULL; - } - if (width != NULL) *width = output.width; - if (height != NULL) *height = output.height; - - // Decode - if (DecodeInto(data, data_size, ¶ms) != VP8_STATUS_OK) { - return NULL; - } - if (keep_info != NULL) { // keep track of the side-info - WebPCopyDecBuffer(&output, keep_info); - } - // return decoded samples (don't clear 'output'!) - return WebPIsRGBMode(mode) ? output.u.RGBA.rgba : output.u.YUVA.y; -} - -uint8_t* WebPDecodeRGB(const uint8_t* data, size_t data_size, - int* width, int* height) { - return Decode(MODE_RGB, data, data_size, width, height, NULL); -} - -uint8_t* WebPDecodeRGBA(const uint8_t* data, size_t data_size, - int* width, int* height) { - return Decode(MODE_RGBA, data, data_size, width, height, NULL); -} - -uint8_t* WebPDecodeARGB(const uint8_t* data, size_t data_size, - int* width, int* height) { - return Decode(MODE_ARGB, data, data_size, width, height, NULL); -} - -uint8_t* WebPDecodeBGR(const uint8_t* data, size_t data_size, - int* width, int* height) { - return Decode(MODE_BGR, data, data_size, width, height, NULL); -} - -uint8_t* WebPDecodeBGRA(const uint8_t* data, size_t data_size, - int* width, int* height) { - return Decode(MODE_BGRA, data, data_size, width, height, NULL); -} - -uint8_t* WebPDecodeYUV(const uint8_t* data, size_t data_size, - int* width, int* height, uint8_t** u, uint8_t** v, - int* stride, int* uv_stride) { - WebPDecBuffer output; // only to preserve the side-infos - uint8_t* const out = Decode(MODE_YUV, data, data_size, - width, height, &output); - - if (out != NULL) { - const WebPYUVABuffer* const buf = &output.u.YUVA; - *u = buf->u; - *v = buf->v; - *stride = buf->y_stride; - *uv_stride = buf->u_stride; - assert(buf->u_stride == buf->v_stride); - } - return out; -} - -static void DefaultFeatures(WebPBitstreamFeatures* const features) { - assert(features != NULL); - memset(features, 0, sizeof(*features)); -} - -static VP8StatusCode GetFeatures(const uint8_t* const data, size_t data_size, - WebPBitstreamFeatures* const features) { - if (features == NULL || data == NULL) { - return VP8_STATUS_INVALID_PARAM; - } - DefaultFeatures(features); - - // Only parse enough of the data to retrieve the features. - return ParseHeadersInternal(data, data_size, - &features->width, &features->height, - &features->has_alpha, &features->has_animation, - &features->format, NULL); -} - -//------------------------------------------------------------------------------ -// WebPGetInfo() - -int WebPGetInfo(const uint8_t* data, size_t data_size, - int* width, int* height) { - WebPBitstreamFeatures features; - - if (GetFeatures(data, data_size, &features) != VP8_STATUS_OK) { - return 0; - } - - if (width != NULL) { - *width = features.width; - } - if (height != NULL) { - *height = features.height; - } - - return 1; -} - -//------------------------------------------------------------------------------ -// Advance decoding API - -int WebPInitDecoderConfigInternal(WebPDecoderConfig* config, - int version) { - if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) { - return 0; // version mismatch - } - if (config == NULL) { - return 0; - } - memset(config, 0, sizeof(*config)); - DefaultFeatures(&config->input); - WebPInitDecBuffer(&config->output); - return 1; -} - -VP8StatusCode WebPGetFeaturesInternal(const uint8_t* data, size_t data_size, - WebPBitstreamFeatures* features, - int version) { - if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) { - return VP8_STATUS_INVALID_PARAM; // version mismatch - } - if (features == NULL) { - return VP8_STATUS_INVALID_PARAM; - } - return GetFeatures(data, data_size, features); -} - -VP8StatusCode WebPDecode(const uint8_t* data, size_t data_size, - WebPDecoderConfig* config) { - WebPDecParams params; - VP8StatusCode status; - - if (config == NULL) { - return VP8_STATUS_INVALID_PARAM; - } - - status = GetFeatures(data, data_size, &config->input); - if (status != VP8_STATUS_OK) { - if (status == VP8_STATUS_NOT_ENOUGH_DATA) { - return VP8_STATUS_BITSTREAM_ERROR; // Not-enough-data treated as error. - } - return status; - } - - WebPResetDecParams(¶ms); - params.options = &config->options; - params.output = &config->output; - if (WebPAvoidSlowMemory(params.output, &config->input)) { - // decoding to slow memory: use a temporary in-mem buffer to decode into. - WebPDecBuffer in_mem_buffer; - WebPInitDecBuffer(&in_mem_buffer); - in_mem_buffer.colorspace = config->output.colorspace; - in_mem_buffer.width = config->input.width; - in_mem_buffer.height = config->input.height; - params.output = &in_mem_buffer; - status = DecodeInto(data, data_size, ¶ms); - if (status == VP8_STATUS_OK) { // do the slow-copy - status = WebPCopyDecBufferPixels(&in_mem_buffer, &config->output); - } - WebPFreeDecBuffer(&in_mem_buffer); - } else { - status = DecodeInto(data, data_size, ¶ms); - } - - return status; -} - -//------------------------------------------------------------------------------ -// Cropping and rescaling. - -int WebPIoInitFromOptions(const WebPDecoderOptions* const options, - VP8Io* const io, WEBP_CSP_MODE src_colorspace) { - const int W = io->width; - const int H = io->height; - int x = 0, y = 0, w = W, h = H; - - // Cropping - io->use_cropping = (options != NULL) && (options->use_cropping > 0); - if (io->use_cropping) { - w = options->crop_width; - h = options->crop_height; - x = options->crop_left; - y = options->crop_top; - if (!WebPIsRGBMode(src_colorspace)) { // only snap for YUV420 - x &= ~1; - y &= ~1; - } - if (x < 0 || y < 0 || w <= 0 || h <= 0 || x + w > W || y + h > H) { - return 0; // out of frame boundary error - } - } - io->crop_left = x; - io->crop_top = y; - io->crop_right = x + w; - io->crop_bottom = y + h; - io->mb_w = w; - io->mb_h = h; - - // Scaling - io->use_scaling = (options != NULL) && (options->use_scaling > 0); - if (io->use_scaling) { - int scaled_width = options->scaled_width; - int scaled_height = options->scaled_height; - if (!WebPRescalerGetScaledDimensions(w, h, &scaled_width, &scaled_height)) { - return 0; - } - io->scaled_width = scaled_width; - io->scaled_height = scaled_height; - } - - // Filter - io->bypass_filtering = (options != NULL) && options->bypass_filtering; - - // Fancy upsampler -#ifdef FANCY_UPSAMPLING - io->fancy_upsampling = (options == NULL) || (!options->no_fancy_upsampling); -#endif - - if (io->use_scaling) { - // disable filter (only for large downscaling ratio). - io->bypass_filtering = (io->scaled_width < W * 3 / 4) && - (io->scaled_height < H * 3 / 4); - io->fancy_upsampling = 0; - } - return 1; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dec/webpi_dec.h b/Dependencies/FreeImage/Source/LibWebP/src/dec/webpi_dec.h deleted file mode 100644 index baa05a7..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dec/webpi_dec.h +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Internal header: WebP decoding parameters and custom IO on buffer -// -// Author: somnath@google.com (Somnath Banerjee) - -#ifndef WEBP_DEC_WEBPI_DEC_H_ -#define WEBP_DEC_WEBPI_DEC_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "src/utils/rescaler_utils.h" -#include "src/dec/vp8_dec.h" - -//------------------------------------------------------------------------------ -// WebPDecParams: Decoding output parameters. Transient internal object. - -typedef struct WebPDecParams WebPDecParams; -typedef int (*OutputFunc)(const VP8Io* const io, WebPDecParams* const p); -typedef int (*OutputAlphaFunc)(const VP8Io* const io, WebPDecParams* const p, - int expected_num_out_lines); -typedef int (*OutputRowFunc)(WebPDecParams* const p, int y_pos, - int max_out_lines); - -struct WebPDecParams { - WebPDecBuffer* output; // output buffer. - uint8_t* tmp_y, *tmp_u, *tmp_v; // cache for the fancy upsampler - // or used for tmp rescaling - - int last_y; // coordinate of the line that was last output - const WebPDecoderOptions* options; // if not NULL, use alt decoding features - - WebPRescaler* scaler_y, *scaler_u, *scaler_v, *scaler_a; // rescalers - void* memory; // overall scratch memory for the output work. - - OutputFunc emit; // output RGB or YUV samples - OutputAlphaFunc emit_alpha; // output alpha channel - OutputRowFunc emit_alpha_row; // output one line of rescaled alpha values -}; - -// Should be called first, before any use of the WebPDecParams object. -void WebPResetDecParams(WebPDecParams* const params); - -//------------------------------------------------------------------------------ -// Header parsing helpers - -// Structure storing a description of the RIFF headers. -typedef struct { - const uint8_t* data; // input buffer - size_t data_size; // input buffer size - int have_all_data; // true if all data is known to be available - size_t offset; // offset to main data chunk (VP8 or VP8L) - const uint8_t* alpha_data; // points to alpha chunk (if present) - size_t alpha_data_size; // alpha chunk size - size_t compressed_size; // VP8/VP8L compressed data size - size_t riff_size; // size of the riff payload (or 0 if absent) - int is_lossless; // true if a VP8L chunk is present -} WebPHeaderStructure; - -// Skips over all valid chunks prior to the first VP8/VP8L frame header. -// Returns: VP8_STATUS_OK, VP8_STATUS_BITSTREAM_ERROR (invalid header/chunk), -// VP8_STATUS_NOT_ENOUGH_DATA (partial input) or VP8_STATUS_UNSUPPORTED_FEATURE -// in the case of non-decodable features (animation for instance). -// In 'headers', compressed_size, offset, alpha_data, alpha_size, and lossless -// fields are updated appropriately upon success. -VP8StatusCode WebPParseHeaders(WebPHeaderStructure* const headers); - -//------------------------------------------------------------------------------ -// Misc utils - -// Initializes VP8Io with custom setup, io and teardown functions. The default -// hooks will use the supplied 'params' as io->opaque handle. -void WebPInitCustomIo(WebPDecParams* const params, VP8Io* const io); - -// Setup crop_xxx fields, mb_w and mb_h in io. 'src_colorspace' refers -// to the *compressed* format, not the output one. -int WebPIoInitFromOptions(const WebPDecoderOptions* const options, - VP8Io* const io, WEBP_CSP_MODE src_colorspace); - -//------------------------------------------------------------------------------ -// Internal functions regarding WebPDecBuffer memory (in buffer.c). -// Don't really need to be externally visible for now. - -// Prepare 'buffer' with the requested initial dimensions width/height. -// If no external storage is supplied, initializes buffer by allocating output -// memory and setting up the stride information. Validate the parameters. Return -// an error code in case of problem (no memory, or invalid stride / size / -// dimension / etc.). If *options is not NULL, also verify that the options' -// parameters are valid and apply them to the width/height dimensions of the -// output buffer. This takes cropping / scaling / rotation into account. -// Also incorporates the options->flip flag to flip the buffer parameters if -// needed. -VP8StatusCode WebPAllocateDecBuffer(int width, int height, - const WebPDecoderOptions* const options, - WebPDecBuffer* const buffer); - -// Flip buffer vertically by negating the various strides. -VP8StatusCode WebPFlipBuffer(WebPDecBuffer* const buffer); - -// Copy 'src' into 'dst' buffer, making sure 'dst' is not marked as owner of the -// memory (still held by 'src'). No pixels are copied. -void WebPCopyDecBuffer(const WebPDecBuffer* const src, - WebPDecBuffer* const dst); - -// Copy and transfer ownership from src to dst (beware of parameter order!) -void WebPGrabDecBuffer(WebPDecBuffer* const src, WebPDecBuffer* const dst); - -// Copy pixels from 'src' into a *preallocated* 'dst' buffer. Returns -// VP8_STATUS_INVALID_PARAM if the 'dst' is not set up correctly for the copy. -VP8StatusCode WebPCopyDecBufferPixels(const WebPDecBuffer* const src, - WebPDecBuffer* const dst); - -// Returns true if decoding will be slow with the current configuration -// and bitstream features. -int WebPAvoidSlowMemory(const WebPDecBuffer* const output, - const WebPBitstreamFeatures* const features); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_DEC_WEBPI_DEC_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/demux/anim_decode.c b/Dependencies/FreeImage/Source/LibWebP/src/demux/anim_decode.c deleted file mode 100644 index 8f30337..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/demux/anim_decode.c +++ /dev/null @@ -1,454 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// AnimDecoder implementation. -// - -#ifdef HAVE_CONFIG_H -#include "src/webp/config.h" -#endif - -#include -#include - -#include "src/utils/utils.h" -#include "src/webp/decode.h" -#include "src/webp/demux.h" - -#define NUM_CHANNELS 4 - -typedef void (*BlendRowFunc)(uint32_t* const, const uint32_t* const, int); -static void BlendPixelRowNonPremult(uint32_t* const src, - const uint32_t* const dst, int num_pixels); -static void BlendPixelRowPremult(uint32_t* const src, const uint32_t* const dst, - int num_pixels); - -struct WebPAnimDecoder { - WebPDemuxer* demux_; // Demuxer created from given WebP bitstream. - WebPDecoderConfig config_; // Decoder config. - // Note: we use a pointer to a function blending multiple pixels at a time to - // allow possible inlining of per-pixel blending function. - BlendRowFunc blend_func_; // Pointer to the chose blend row function. - WebPAnimInfo info_; // Global info about the animation. - uint8_t* curr_frame_; // Current canvas (not disposed). - uint8_t* prev_frame_disposed_; // Previous canvas (properly disposed). - int prev_frame_timestamp_; // Previous frame timestamp (milliseconds). - WebPIterator prev_iter_; // Iterator object for previous frame. - int prev_frame_was_keyframe_; // True if previous frame was a keyframe. - int next_frame_; // Index of the next frame to be decoded - // (starting from 1). -}; - -static void DefaultDecoderOptions(WebPAnimDecoderOptions* const dec_options) { - dec_options->color_mode = MODE_RGBA; - dec_options->use_threads = 0; -} - -int WebPAnimDecoderOptionsInitInternal(WebPAnimDecoderOptions* dec_options, - int abi_version) { - if (dec_options == NULL || - WEBP_ABI_IS_INCOMPATIBLE(abi_version, WEBP_DEMUX_ABI_VERSION)) { - return 0; - } - DefaultDecoderOptions(dec_options); - return 1; -} - -static int ApplyDecoderOptions(const WebPAnimDecoderOptions* const dec_options, - WebPAnimDecoder* const dec) { - WEBP_CSP_MODE mode; - WebPDecoderConfig* config = &dec->config_; - assert(dec_options != NULL); - - mode = dec_options->color_mode; - if (mode != MODE_RGBA && mode != MODE_BGRA && - mode != MODE_rgbA && mode != MODE_bgrA) { - return 0; - } - dec->blend_func_ = (mode == MODE_RGBA || mode == MODE_BGRA) - ? &BlendPixelRowNonPremult - : &BlendPixelRowPremult; - WebPInitDecoderConfig(config); - config->output.colorspace = mode; - config->output.is_external_memory = 1; - config->options.use_threads = dec_options->use_threads; - // Note: config->output.u.RGBA is set at the time of decoding each frame. - return 1; -} - -WebPAnimDecoder* WebPAnimDecoderNewInternal( - const WebPData* webp_data, const WebPAnimDecoderOptions* dec_options, - int abi_version) { - WebPAnimDecoderOptions options; - WebPAnimDecoder* dec = NULL; - if (webp_data == NULL || - WEBP_ABI_IS_INCOMPATIBLE(abi_version, WEBP_DEMUX_ABI_VERSION)) { - return NULL; - } - - // Note: calloc() so that the pointer members are initialized to NULL. - dec = (WebPAnimDecoder*)WebPSafeCalloc(1ULL, sizeof(*dec)); - if (dec == NULL) goto Error; - - if (dec_options != NULL) { - options = *dec_options; - } else { - DefaultDecoderOptions(&options); - } - if (!ApplyDecoderOptions(&options, dec)) goto Error; - - dec->demux_ = WebPDemux(webp_data); - if (dec->demux_ == NULL) goto Error; - - dec->info_.canvas_width = WebPDemuxGetI(dec->demux_, WEBP_FF_CANVAS_WIDTH); - dec->info_.canvas_height = WebPDemuxGetI(dec->demux_, WEBP_FF_CANVAS_HEIGHT); - dec->info_.loop_count = WebPDemuxGetI(dec->demux_, WEBP_FF_LOOP_COUNT); - dec->info_.bgcolor = WebPDemuxGetI(dec->demux_, WEBP_FF_BACKGROUND_COLOR); - dec->info_.frame_count = WebPDemuxGetI(dec->demux_, WEBP_FF_FRAME_COUNT); - - // Note: calloc() because we fill frame with zeroes as well. - dec->curr_frame_ = (uint8_t*)WebPSafeCalloc( - dec->info_.canvas_width * NUM_CHANNELS, dec->info_.canvas_height); - if (dec->curr_frame_ == NULL) goto Error; - dec->prev_frame_disposed_ = (uint8_t*)WebPSafeCalloc( - dec->info_.canvas_width * NUM_CHANNELS, dec->info_.canvas_height); - if (dec->prev_frame_disposed_ == NULL) goto Error; - - WebPAnimDecoderReset(dec); - return dec; - - Error: - WebPAnimDecoderDelete(dec); - return NULL; -} - -int WebPAnimDecoderGetInfo(const WebPAnimDecoder* dec, WebPAnimInfo* info) { - if (dec == NULL || info == NULL) return 0; - *info = dec->info_; - return 1; -} - -// Returns true if the frame covers the full canvas. -static int IsFullFrame(int width, int height, int canvas_width, - int canvas_height) { - return (width == canvas_width && height == canvas_height); -} - -// Clear the canvas to transparent. -static int ZeroFillCanvas(uint8_t* buf, uint32_t canvas_width, - uint32_t canvas_height) { - const uint64_t size = - (uint64_t)canvas_width * canvas_height * NUM_CHANNELS * sizeof(*buf); - if (size != (size_t)size) return 0; - memset(buf, 0, (size_t)size); - return 1; -} - -// Clear given frame rectangle to transparent. -static void ZeroFillFrameRect(uint8_t* buf, int buf_stride, int x_offset, - int y_offset, int width, int height) { - int j; - assert(width * NUM_CHANNELS <= buf_stride); - buf += y_offset * buf_stride + x_offset * NUM_CHANNELS; - for (j = 0; j < height; ++j) { - memset(buf, 0, width * NUM_CHANNELS); - buf += buf_stride; - } -} - -// Copy width * height pixels from 'src' to 'dst'. -static int CopyCanvas(const uint8_t* src, uint8_t* dst, - uint32_t width, uint32_t height) { - const uint64_t size = (uint64_t)width * height * NUM_CHANNELS; - if (size != (size_t)size) return 0; - assert(src != NULL && dst != NULL); - memcpy(dst, src, (size_t)size); - return 1; -} - -// Returns true if the current frame is a key-frame. -static int IsKeyFrame(const WebPIterator* const curr, - const WebPIterator* const prev, - int prev_frame_was_key_frame, - int canvas_width, int canvas_height) { - if (curr->frame_num == 1) { - return 1; - } else if ((!curr->has_alpha || curr->blend_method == WEBP_MUX_NO_BLEND) && - IsFullFrame(curr->width, curr->height, - canvas_width, canvas_height)) { - return 1; - } else { - return (prev->dispose_method == WEBP_MUX_DISPOSE_BACKGROUND) && - (IsFullFrame(prev->width, prev->height, canvas_width, - canvas_height) || - prev_frame_was_key_frame); - } -} - - -// Blend a single channel of 'src' over 'dst', given their alpha channel values. -// 'src' and 'dst' are assumed to be NOT pre-multiplied by alpha. -static uint8_t BlendChannelNonPremult(uint32_t src, uint8_t src_a, - uint32_t dst, uint8_t dst_a, - uint32_t scale, int shift) { - const uint8_t src_channel = (src >> shift) & 0xff; - const uint8_t dst_channel = (dst >> shift) & 0xff; - const uint32_t blend_unscaled = src_channel * src_a + dst_channel * dst_a; - assert(blend_unscaled < (1ULL << 32) / scale); - return (blend_unscaled * scale) >> 24; -} - -// Blend 'src' over 'dst' assuming they are NOT pre-multiplied by alpha. -static uint32_t BlendPixelNonPremult(uint32_t src, uint32_t dst) { - const uint8_t src_a = (src >> 24) & 0xff; - - if (src_a == 0) { - return dst; - } else { - const uint8_t dst_a = (dst >> 24) & 0xff; - // This is the approximate integer arithmetic for the actual formula: - // dst_factor_a = (dst_a * (255 - src_a)) / 255. - const uint8_t dst_factor_a = (dst_a * (256 - src_a)) >> 8; - const uint8_t blend_a = src_a + dst_factor_a; - const uint32_t scale = (1UL << 24) / blend_a; - - const uint8_t blend_r = - BlendChannelNonPremult(src, src_a, dst, dst_factor_a, scale, 0); - const uint8_t blend_g = - BlendChannelNonPremult(src, src_a, dst, dst_factor_a, scale, 8); - const uint8_t blend_b = - BlendChannelNonPremult(src, src_a, dst, dst_factor_a, scale, 16); - assert(src_a + dst_factor_a < 256); - - return (blend_r << 0) | - (blend_g << 8) | - (blend_b << 16) | - ((uint32_t)blend_a << 24); - } -} - -// Blend 'num_pixels' in 'src' over 'dst' assuming they are NOT pre-multiplied -// by alpha. -static void BlendPixelRowNonPremult(uint32_t* const src, - const uint32_t* const dst, int num_pixels) { - int i; - for (i = 0; i < num_pixels; ++i) { - const uint8_t src_alpha = (src[i] >> 24) & 0xff; - if (src_alpha != 0xff) { - src[i] = BlendPixelNonPremult(src[i], dst[i]); - } - } -} - -// Individually multiply each channel in 'pix' by 'scale'. -static WEBP_INLINE uint32_t ChannelwiseMultiply(uint32_t pix, uint32_t scale) { - uint32_t mask = 0x00FF00FF; - uint32_t rb = ((pix & mask) * scale) >> 8; - uint32_t ag = ((pix >> 8) & mask) * scale; - return (rb & mask) | (ag & ~mask); -} - -// Blend 'src' over 'dst' assuming they are pre-multiplied by alpha. -static uint32_t BlendPixelPremult(uint32_t src, uint32_t dst) { - const uint8_t src_a = (src >> 24) & 0xff; - return src + ChannelwiseMultiply(dst, 256 - src_a); -} - -// Blend 'num_pixels' in 'src' over 'dst' assuming they are pre-multiplied by -// alpha. -static void BlendPixelRowPremult(uint32_t* const src, const uint32_t* const dst, - int num_pixels) { - int i; - for (i = 0; i < num_pixels; ++i) { - const uint8_t src_alpha = (src[i] >> 24) & 0xff; - if (src_alpha != 0xff) { - src[i] = BlendPixelPremult(src[i], dst[i]); - } - } -} - -// Returns two ranges ( pairs) at row 'canvas_y', that belong to -// 'src' but not 'dst'. A point range is empty if the corresponding width is 0. -static void FindBlendRangeAtRow(const WebPIterator* const src, - const WebPIterator* const dst, int canvas_y, - int* const left1, int* const width1, - int* const left2, int* const width2) { - const int src_max_x = src->x_offset + src->width; - const int dst_max_x = dst->x_offset + dst->width; - const int dst_max_y = dst->y_offset + dst->height; - assert(canvas_y >= src->y_offset && canvas_y < (src->y_offset + src->height)); - *left1 = -1; - *width1 = 0; - *left2 = -1; - *width2 = 0; - - if (canvas_y < dst->y_offset || canvas_y >= dst_max_y || - src->x_offset >= dst_max_x || src_max_x <= dst->x_offset) { - *left1 = src->x_offset; - *width1 = src->width; - return; - } - - if (src->x_offset < dst->x_offset) { - *left1 = src->x_offset; - *width1 = dst->x_offset - src->x_offset; - } - - if (src_max_x > dst_max_x) { - *left2 = dst_max_x; - *width2 = src_max_x - dst_max_x; - } -} - -int WebPAnimDecoderGetNext(WebPAnimDecoder* dec, - uint8_t** buf_ptr, int* timestamp_ptr) { - WebPIterator iter; - uint32_t width; - uint32_t height; - int is_key_frame; - int timestamp; - BlendRowFunc blend_row; - - if (dec == NULL || buf_ptr == NULL || timestamp_ptr == NULL) return 0; - if (!WebPAnimDecoderHasMoreFrames(dec)) return 0; - - width = dec->info_.canvas_width; - height = dec->info_.canvas_height; - blend_row = dec->blend_func_; - - // Get compressed frame. - if (!WebPDemuxGetFrame(dec->demux_, dec->next_frame_, &iter)) { - return 0; - } - timestamp = dec->prev_frame_timestamp_ + iter.duration; - - // Initialize. - is_key_frame = IsKeyFrame(&iter, &dec->prev_iter_, - dec->prev_frame_was_keyframe_, width, height); - if (is_key_frame) { - if (!ZeroFillCanvas(dec->curr_frame_, width, height)) { - goto Error; - } - } else { - if (!CopyCanvas(dec->prev_frame_disposed_, dec->curr_frame_, - width, height)) { - goto Error; - } - } - - // Decode. - { - const uint8_t* in = iter.fragment.bytes; - const size_t in_size = iter.fragment.size; - const size_t out_offset = - (iter.y_offset * width + iter.x_offset) * NUM_CHANNELS; - WebPDecoderConfig* const config = &dec->config_; - WebPRGBABuffer* const buf = &config->output.u.RGBA; - buf->stride = NUM_CHANNELS * width; - buf->size = buf->stride * iter.height; - buf->rgba = dec->curr_frame_ + out_offset; - - if (WebPDecode(in, in_size, config) != VP8_STATUS_OK) { - goto Error; - } - } - - // During the decoding of current frame, we may have set some pixels to be - // transparent (i.e. alpha < 255). However, the value of each of these - // pixels should have been determined by blending it against the value of - // that pixel in the previous frame if blending method of is WEBP_MUX_BLEND. - if (iter.frame_num > 1 && iter.blend_method == WEBP_MUX_BLEND && - !is_key_frame) { - if (dec->prev_iter_.dispose_method == WEBP_MUX_DISPOSE_NONE) { - int y; - // Blend transparent pixels with pixels in previous canvas. - for (y = 0; y < iter.height; ++y) { - const size_t offset = - (iter.y_offset + y) * width + iter.x_offset; - blend_row((uint32_t*)dec->curr_frame_ + offset, - (uint32_t*)dec->prev_frame_disposed_ + offset, iter.width); - } - } else { - int y; - assert(dec->prev_iter_.dispose_method == WEBP_MUX_DISPOSE_BACKGROUND); - // We need to blend a transparent pixel with its value just after - // initialization. That is, blend it with: - // * Fully transparent pixel if it belongs to prevRect <-- No-op. - // * The pixel in the previous canvas otherwise <-- Need alpha-blending. - for (y = 0; y < iter.height; ++y) { - const int canvas_y = iter.y_offset + y; - int left1, width1, left2, width2; - FindBlendRangeAtRow(&iter, &dec->prev_iter_, canvas_y, &left1, &width1, - &left2, &width2); - if (width1 > 0) { - const size_t offset1 = canvas_y * width + left1; - blend_row((uint32_t*)dec->curr_frame_ + offset1, - (uint32_t*)dec->prev_frame_disposed_ + offset1, width1); - } - if (width2 > 0) { - const size_t offset2 = canvas_y * width + left2; - blend_row((uint32_t*)dec->curr_frame_ + offset2, - (uint32_t*)dec->prev_frame_disposed_ + offset2, width2); - } - } - } - } - - // Update info of the previous frame and dispose it for the next iteration. - dec->prev_frame_timestamp_ = timestamp; - WebPDemuxReleaseIterator(&dec->prev_iter_); - dec->prev_iter_ = iter; - dec->prev_frame_was_keyframe_ = is_key_frame; - CopyCanvas(dec->curr_frame_, dec->prev_frame_disposed_, width, height); - if (dec->prev_iter_.dispose_method == WEBP_MUX_DISPOSE_BACKGROUND) { - ZeroFillFrameRect(dec->prev_frame_disposed_, width * NUM_CHANNELS, - dec->prev_iter_.x_offset, dec->prev_iter_.y_offset, - dec->prev_iter_.width, dec->prev_iter_.height); - } - ++dec->next_frame_; - - // All OK, fill in the values. - *buf_ptr = dec->curr_frame_; - *timestamp_ptr = timestamp; - return 1; - - Error: - WebPDemuxReleaseIterator(&iter); - return 0; -} - -int WebPAnimDecoderHasMoreFrames(const WebPAnimDecoder* dec) { - if (dec == NULL) return 0; - return (dec->next_frame_ <= (int)dec->info_.frame_count); -} - -void WebPAnimDecoderReset(WebPAnimDecoder* dec) { - if (dec != NULL) { - dec->prev_frame_timestamp_ = 0; - WebPDemuxReleaseIterator(&dec->prev_iter_); - memset(&dec->prev_iter_, 0, sizeof(dec->prev_iter_)); - dec->prev_frame_was_keyframe_ = 0; - dec->next_frame_ = 1; - } -} - -const WebPDemuxer* WebPAnimDecoderGetDemuxer(const WebPAnimDecoder* dec) { - if (dec == NULL) return NULL; - return dec->demux_; -} - -void WebPAnimDecoderDelete(WebPAnimDecoder* dec) { - if (dec != NULL) { - WebPDemuxReleaseIterator(&dec->prev_iter_); - WebPDemuxDelete(dec->demux_); - WebPSafeFree(dec->curr_frame_); - WebPSafeFree(dec->prev_frame_disposed_); - WebPSafeFree(dec); - } -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/demux/demux.c b/Dependencies/FreeImage/Source/LibWebP/src/demux/demux.c deleted file mode 100644 index 636bbd4..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/demux/demux.c +++ /dev/null @@ -1,967 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// WebP container demux. -// - -#ifdef HAVE_CONFIG_H -#include "src/webp/config.h" -#endif - -#include -#include -#include - -#include "src/utils/utils.h" -#include "src/webp/decode.h" // WebPGetFeatures -#include "src/webp/demux.h" -#include "src/webp/format_constants.h" - -#define DMUX_MAJ_VERSION 1 -#define DMUX_MIN_VERSION 0 -#define DMUX_REV_VERSION 0 - -typedef struct { - size_t start_; // start location of the data - size_t end_; // end location - size_t riff_end_; // riff chunk end location, can be > end_. - size_t buf_size_; // size of the buffer - const uint8_t* buf_; -} MemBuffer; - -typedef struct { - size_t offset_; - size_t size_; -} ChunkData; - -typedef struct Frame { - int x_offset_, y_offset_; - int width_, height_; - int has_alpha_; - int duration_; - WebPMuxAnimDispose dispose_method_; - WebPMuxAnimBlend blend_method_; - int frame_num_; - int complete_; // img_components_ contains a full image. - ChunkData img_components_[2]; // 0=VP8{,L} 1=ALPH - struct Frame* next_; -} Frame; - -typedef struct Chunk { - ChunkData data_; - struct Chunk* next_; -} Chunk; - -struct WebPDemuxer { - MemBuffer mem_; - WebPDemuxState state_; - int is_ext_format_; - uint32_t feature_flags_; - int canvas_width_, canvas_height_; - int loop_count_; - uint32_t bgcolor_; - int num_frames_; - Frame* frames_; - Frame** frames_tail_; - Chunk* chunks_; // non-image chunks - Chunk** chunks_tail_; -}; - -typedef enum { - PARSE_OK, - PARSE_NEED_MORE_DATA, - PARSE_ERROR -} ParseStatus; - -typedef struct ChunkParser { - uint8_t id[4]; - ParseStatus (*parse)(WebPDemuxer* const dmux); - int (*valid)(const WebPDemuxer* const dmux); -} ChunkParser; - -static ParseStatus ParseSingleImage(WebPDemuxer* const dmux); -static ParseStatus ParseVP8X(WebPDemuxer* const dmux); -static int IsValidSimpleFormat(const WebPDemuxer* const dmux); -static int IsValidExtendedFormat(const WebPDemuxer* const dmux); - -static const ChunkParser kMasterChunks[] = { - { { 'V', 'P', '8', ' ' }, ParseSingleImage, IsValidSimpleFormat }, - { { 'V', 'P', '8', 'L' }, ParseSingleImage, IsValidSimpleFormat }, - { { 'V', 'P', '8', 'X' }, ParseVP8X, IsValidExtendedFormat }, - { { '0', '0', '0', '0' }, NULL, NULL }, -}; - -//------------------------------------------------------------------------------ - -int WebPGetDemuxVersion(void) { - return (DMUX_MAJ_VERSION << 16) | (DMUX_MIN_VERSION << 8) | DMUX_REV_VERSION; -} - -// ----------------------------------------------------------------------------- -// MemBuffer - -static int RemapMemBuffer(MemBuffer* const mem, - const uint8_t* data, size_t size) { - if (size < mem->buf_size_) return 0; // can't remap to a shorter buffer! - - mem->buf_ = data; - mem->end_ = mem->buf_size_ = size; - return 1; -} - -static int InitMemBuffer(MemBuffer* const mem, - const uint8_t* data, size_t size) { - memset(mem, 0, sizeof(*mem)); - return RemapMemBuffer(mem, data, size); -} - -// Return the remaining data size available in 'mem'. -static WEBP_INLINE size_t MemDataSize(const MemBuffer* const mem) { - return (mem->end_ - mem->start_); -} - -// Return true if 'size' exceeds the end of the RIFF chunk. -static WEBP_INLINE int SizeIsInvalid(const MemBuffer* const mem, size_t size) { - return (size > mem->riff_end_ - mem->start_); -} - -static WEBP_INLINE void Skip(MemBuffer* const mem, size_t size) { - mem->start_ += size; -} - -static WEBP_INLINE void Rewind(MemBuffer* const mem, size_t size) { - mem->start_ -= size; -} - -static WEBP_INLINE const uint8_t* GetBuffer(MemBuffer* const mem) { - return mem->buf_ + mem->start_; -} - -// Read from 'mem' and skip the read bytes. -static WEBP_INLINE uint8_t ReadByte(MemBuffer* const mem) { - const uint8_t byte = mem->buf_[mem->start_]; - Skip(mem, 1); - return byte; -} - -static WEBP_INLINE int ReadLE16s(MemBuffer* const mem) { - const uint8_t* const data = mem->buf_ + mem->start_; - const int val = GetLE16(data); - Skip(mem, 2); - return val; -} - -static WEBP_INLINE int ReadLE24s(MemBuffer* const mem) { - const uint8_t* const data = mem->buf_ + mem->start_; - const int val = GetLE24(data); - Skip(mem, 3); - return val; -} - -static WEBP_INLINE uint32_t ReadLE32(MemBuffer* const mem) { - const uint8_t* const data = mem->buf_ + mem->start_; - const uint32_t val = GetLE32(data); - Skip(mem, 4); - return val; -} - -// ----------------------------------------------------------------------------- -// Secondary chunk parsing - -static void AddChunk(WebPDemuxer* const dmux, Chunk* const chunk) { - *dmux->chunks_tail_ = chunk; - chunk->next_ = NULL; - dmux->chunks_tail_ = &chunk->next_; -} - -// Add a frame to the end of the list, ensuring the last frame is complete. -// Returns true on success, false otherwise. -static int AddFrame(WebPDemuxer* const dmux, Frame* const frame) { - const Frame* const last_frame = *dmux->frames_tail_; - if (last_frame != NULL && !last_frame->complete_) return 0; - - *dmux->frames_tail_ = frame; - frame->next_ = NULL; - dmux->frames_tail_ = &frame->next_; - return 1; -} - -static void SetFrameInfo(size_t start_offset, size_t size, - int frame_num, int complete, - const WebPBitstreamFeatures* const features, - Frame* const frame) { - frame->img_components_[0].offset_ = start_offset; - frame->img_components_[0].size_ = size; - frame->width_ = features->width; - frame->height_ = features->height; - frame->has_alpha_ |= features->has_alpha; - frame->frame_num_ = frame_num; - frame->complete_ = complete; -} - -// Store image bearing chunks to 'frame'. 'min_size' is an optional size -// requirement, it may be zero. -static ParseStatus StoreFrame(int frame_num, uint32_t min_size, - MemBuffer* const mem, Frame* const frame) { - int alpha_chunks = 0; - int image_chunks = 0; - int done = (MemDataSize(mem) < CHUNK_HEADER_SIZE || - MemDataSize(mem) < min_size); - ParseStatus status = PARSE_OK; - - if (done) return PARSE_NEED_MORE_DATA; - - do { - const size_t chunk_start_offset = mem->start_; - const uint32_t fourcc = ReadLE32(mem); - const uint32_t payload_size = ReadLE32(mem); - const uint32_t payload_size_padded = payload_size + (payload_size & 1); - const size_t payload_available = (payload_size_padded > MemDataSize(mem)) - ? MemDataSize(mem) : payload_size_padded; - const size_t chunk_size = CHUNK_HEADER_SIZE + payload_available; - - if (payload_size > MAX_CHUNK_PAYLOAD) return PARSE_ERROR; - if (SizeIsInvalid(mem, payload_size_padded)) return PARSE_ERROR; - if (payload_size_padded > MemDataSize(mem)) status = PARSE_NEED_MORE_DATA; - - switch (fourcc) { - case MKFOURCC('A', 'L', 'P', 'H'): - if (alpha_chunks == 0) { - ++alpha_chunks; - frame->img_components_[1].offset_ = chunk_start_offset; - frame->img_components_[1].size_ = chunk_size; - frame->has_alpha_ = 1; - frame->frame_num_ = frame_num; - Skip(mem, payload_available); - } else { - goto Done; - } - break; - case MKFOURCC('V', 'P', '8', 'L'): - if (alpha_chunks > 0) return PARSE_ERROR; // VP8L has its own alpha - // fall through - case MKFOURCC('V', 'P', '8', ' '): - if (image_chunks == 0) { - // Extract the bitstream features, tolerating failures when the data - // is incomplete. - WebPBitstreamFeatures features; - const VP8StatusCode vp8_status = - WebPGetFeatures(mem->buf_ + chunk_start_offset, chunk_size, - &features); - if (status == PARSE_NEED_MORE_DATA && - vp8_status == VP8_STATUS_NOT_ENOUGH_DATA) { - return PARSE_NEED_MORE_DATA; - } else if (vp8_status != VP8_STATUS_OK) { - // We have enough data, and yet WebPGetFeatures() failed. - return PARSE_ERROR; - } - ++image_chunks; - SetFrameInfo(chunk_start_offset, chunk_size, frame_num, - status == PARSE_OK, &features, frame); - Skip(mem, payload_available); - } else { - goto Done; - } - break; - Done: - default: - // Restore fourcc/size when moving up one level in parsing. - Rewind(mem, CHUNK_HEADER_SIZE); - done = 1; - break; - } - - if (mem->start_ == mem->riff_end_) { - done = 1; - } else if (MemDataSize(mem) < CHUNK_HEADER_SIZE) { - status = PARSE_NEED_MORE_DATA; - } - } while (!done && status == PARSE_OK); - - return status; -} - -// Creates a new Frame if 'actual_size' is within bounds and 'mem' contains -// enough data ('min_size') to parse the payload. -// Returns PARSE_OK on success with *frame pointing to the new Frame. -// Returns PARSE_NEED_MORE_DATA with insufficient data, PARSE_ERROR otherwise. -static ParseStatus NewFrame(const MemBuffer* const mem, - uint32_t min_size, uint32_t actual_size, - Frame** frame) { - if (SizeIsInvalid(mem, min_size)) return PARSE_ERROR; - if (actual_size < min_size) return PARSE_ERROR; - if (MemDataSize(mem) < min_size) return PARSE_NEED_MORE_DATA; - - *frame = (Frame*)WebPSafeCalloc(1ULL, sizeof(**frame)); - return (*frame == NULL) ? PARSE_ERROR : PARSE_OK; -} - -// Parse a 'ANMF' chunk and any image bearing chunks that immediately follow. -// 'frame_chunk_size' is the previously validated, padded chunk size. -static ParseStatus ParseAnimationFrame( - WebPDemuxer* const dmux, uint32_t frame_chunk_size) { - const int is_animation = !!(dmux->feature_flags_ & ANIMATION_FLAG); - const uint32_t anmf_payload_size = frame_chunk_size - ANMF_CHUNK_SIZE; - int added_frame = 0; - int bits; - MemBuffer* const mem = &dmux->mem_; - Frame* frame; - ParseStatus status = - NewFrame(mem, ANMF_CHUNK_SIZE, frame_chunk_size, &frame); - if (status != PARSE_OK) return status; - - frame->x_offset_ = 2 * ReadLE24s(mem); - frame->y_offset_ = 2 * ReadLE24s(mem); - frame->width_ = 1 + ReadLE24s(mem); - frame->height_ = 1 + ReadLE24s(mem); - frame->duration_ = ReadLE24s(mem); - bits = ReadByte(mem); - frame->dispose_method_ = - (bits & 1) ? WEBP_MUX_DISPOSE_BACKGROUND : WEBP_MUX_DISPOSE_NONE; - frame->blend_method_ = (bits & 2) ? WEBP_MUX_NO_BLEND : WEBP_MUX_BLEND; - if (frame->width_ * (uint64_t)frame->height_ >= MAX_IMAGE_AREA) { - WebPSafeFree(frame); - return PARSE_ERROR; - } - - // Store a frame only if the animation flag is set there is some data for - // this frame is available. - status = StoreFrame(dmux->num_frames_ + 1, anmf_payload_size, mem, frame); - if (status != PARSE_ERROR && is_animation && frame->frame_num_ > 0) { - added_frame = AddFrame(dmux, frame); - if (added_frame) { - ++dmux->num_frames_; - } else { - status = PARSE_ERROR; - } - } - - if (!added_frame) WebPSafeFree(frame); - return status; -} - -// General chunk storage, starting with the header at 'start_offset', allowing -// the user to request the payload via a fourcc string. 'size' includes the -// header and the unpadded payload size. -// Returns true on success, false otherwise. -static int StoreChunk(WebPDemuxer* const dmux, - size_t start_offset, uint32_t size) { - Chunk* const chunk = (Chunk*)WebPSafeCalloc(1ULL, sizeof(*chunk)); - if (chunk == NULL) return 0; - - chunk->data_.offset_ = start_offset; - chunk->data_.size_ = size; - AddChunk(dmux, chunk); - return 1; -} - -// ----------------------------------------------------------------------------- -// Primary chunk parsing - -static ParseStatus ReadHeader(MemBuffer* const mem) { - const size_t min_size = RIFF_HEADER_SIZE + CHUNK_HEADER_SIZE; - uint32_t riff_size; - - // Basic file level validation. - if (MemDataSize(mem) < min_size) return PARSE_NEED_MORE_DATA; - if (memcmp(GetBuffer(mem), "RIFF", CHUNK_SIZE_BYTES) || - memcmp(GetBuffer(mem) + CHUNK_HEADER_SIZE, "WEBP", CHUNK_SIZE_BYTES)) { - return PARSE_ERROR; - } - - riff_size = GetLE32(GetBuffer(mem) + TAG_SIZE); - if (riff_size < CHUNK_HEADER_SIZE) return PARSE_ERROR; - if (riff_size > MAX_CHUNK_PAYLOAD) return PARSE_ERROR; - - // There's no point in reading past the end of the RIFF chunk - mem->riff_end_ = riff_size + CHUNK_HEADER_SIZE; - if (mem->buf_size_ > mem->riff_end_) { - mem->buf_size_ = mem->end_ = mem->riff_end_; - } - - Skip(mem, RIFF_HEADER_SIZE); - return PARSE_OK; -} - -static ParseStatus ParseSingleImage(WebPDemuxer* const dmux) { - const size_t min_size = CHUNK_HEADER_SIZE; - MemBuffer* const mem = &dmux->mem_; - Frame* frame; - ParseStatus status; - int image_added = 0; - - if (dmux->frames_ != NULL) return PARSE_ERROR; - if (SizeIsInvalid(mem, min_size)) return PARSE_ERROR; - if (MemDataSize(mem) < min_size) return PARSE_NEED_MORE_DATA; - - frame = (Frame*)WebPSafeCalloc(1ULL, sizeof(*frame)); - if (frame == NULL) return PARSE_ERROR; - - // For the single image case we allow parsing of a partial frame, so no - // minimum size is imposed here. - status = StoreFrame(1, 0, &dmux->mem_, frame); - if (status != PARSE_ERROR) { - const int has_alpha = !!(dmux->feature_flags_ & ALPHA_FLAG); - // Clear any alpha when the alpha flag is missing. - if (!has_alpha && frame->img_components_[1].size_ > 0) { - frame->img_components_[1].offset_ = 0; - frame->img_components_[1].size_ = 0; - frame->has_alpha_ = 0; - } - - // Use the frame width/height as the canvas values for non-vp8x files. - // Also, set ALPHA_FLAG if this is a lossless image with alpha. - if (!dmux->is_ext_format_ && frame->width_ > 0 && frame->height_ > 0) { - dmux->state_ = WEBP_DEMUX_PARSED_HEADER; - dmux->canvas_width_ = frame->width_; - dmux->canvas_height_ = frame->height_; - dmux->feature_flags_ |= frame->has_alpha_ ? ALPHA_FLAG : 0; - } - if (!AddFrame(dmux, frame)) { - status = PARSE_ERROR; // last frame was left incomplete - } else { - image_added = 1; - dmux->num_frames_ = 1; - } - } - - if (!image_added) WebPSafeFree(frame); - return status; -} - -static ParseStatus ParseVP8XChunks(WebPDemuxer* const dmux) { - const int is_animation = !!(dmux->feature_flags_ & ANIMATION_FLAG); - MemBuffer* const mem = &dmux->mem_; - int anim_chunks = 0; - ParseStatus status = PARSE_OK; - - do { - int store_chunk = 1; - const size_t chunk_start_offset = mem->start_; - const uint32_t fourcc = ReadLE32(mem); - const uint32_t chunk_size = ReadLE32(mem); - const uint32_t chunk_size_padded = chunk_size + (chunk_size & 1); - - if (chunk_size > MAX_CHUNK_PAYLOAD) return PARSE_ERROR; - if (SizeIsInvalid(mem, chunk_size_padded)) return PARSE_ERROR; - - switch (fourcc) { - case MKFOURCC('V', 'P', '8', 'X'): { - return PARSE_ERROR; - } - case MKFOURCC('A', 'L', 'P', 'H'): - case MKFOURCC('V', 'P', '8', ' '): - case MKFOURCC('V', 'P', '8', 'L'): { - // check that this isn't an animation (all frames should be in an ANMF). - if (anim_chunks > 0 || is_animation) return PARSE_ERROR; - - Rewind(mem, CHUNK_HEADER_SIZE); - status = ParseSingleImage(dmux); - break; - } - case MKFOURCC('A', 'N', 'I', 'M'): { - if (chunk_size_padded < ANIM_CHUNK_SIZE) return PARSE_ERROR; - - if (MemDataSize(mem) < chunk_size_padded) { - status = PARSE_NEED_MORE_DATA; - } else if (anim_chunks == 0) { - ++anim_chunks; - dmux->bgcolor_ = ReadLE32(mem); - dmux->loop_count_ = ReadLE16s(mem); - Skip(mem, chunk_size_padded - ANIM_CHUNK_SIZE); - } else { - store_chunk = 0; - goto Skip; - } - break; - } - case MKFOURCC('A', 'N', 'M', 'F'): { - if (anim_chunks == 0) return PARSE_ERROR; // 'ANIM' precedes frames. - status = ParseAnimationFrame(dmux, chunk_size_padded); - break; - } - case MKFOURCC('I', 'C', 'C', 'P'): { - store_chunk = !!(dmux->feature_flags_ & ICCP_FLAG); - goto Skip; - } - case MKFOURCC('E', 'X', 'I', 'F'): { - store_chunk = !!(dmux->feature_flags_ & EXIF_FLAG); - goto Skip; - } - case MKFOURCC('X', 'M', 'P', ' '): { - store_chunk = !!(dmux->feature_flags_ & XMP_FLAG); - goto Skip; - } - Skip: - default: { - if (chunk_size_padded <= MemDataSize(mem)) { - if (store_chunk) { - // Store only the chunk header and unpadded size as only the payload - // will be returned to the user. - if (!StoreChunk(dmux, chunk_start_offset, - CHUNK_HEADER_SIZE + chunk_size)) { - return PARSE_ERROR; - } - } - Skip(mem, chunk_size_padded); - } else { - status = PARSE_NEED_MORE_DATA; - } - } - } - - if (mem->start_ == mem->riff_end_) { - break; - } else if (MemDataSize(mem) < CHUNK_HEADER_SIZE) { - status = PARSE_NEED_MORE_DATA; - } - } while (status == PARSE_OK); - - return status; -} - -static ParseStatus ParseVP8X(WebPDemuxer* const dmux) { - MemBuffer* const mem = &dmux->mem_; - uint32_t vp8x_size; - - if (MemDataSize(mem) < CHUNK_HEADER_SIZE) return PARSE_NEED_MORE_DATA; - - dmux->is_ext_format_ = 1; - Skip(mem, TAG_SIZE); // VP8X - vp8x_size = ReadLE32(mem); - if (vp8x_size > MAX_CHUNK_PAYLOAD) return PARSE_ERROR; - if (vp8x_size < VP8X_CHUNK_SIZE) return PARSE_ERROR; - vp8x_size += vp8x_size & 1; - if (SizeIsInvalid(mem, vp8x_size)) return PARSE_ERROR; - if (MemDataSize(mem) < vp8x_size) return PARSE_NEED_MORE_DATA; - - dmux->feature_flags_ = ReadByte(mem); - Skip(mem, 3); // Reserved. - dmux->canvas_width_ = 1 + ReadLE24s(mem); - dmux->canvas_height_ = 1 + ReadLE24s(mem); - if (dmux->canvas_width_ * (uint64_t)dmux->canvas_height_ >= MAX_IMAGE_AREA) { - return PARSE_ERROR; // image final dimension is too large - } - Skip(mem, vp8x_size - VP8X_CHUNK_SIZE); // skip any trailing data. - dmux->state_ = WEBP_DEMUX_PARSED_HEADER; - - if (SizeIsInvalid(mem, CHUNK_HEADER_SIZE)) return PARSE_ERROR; - if (MemDataSize(mem) < CHUNK_HEADER_SIZE) return PARSE_NEED_MORE_DATA; - - return ParseVP8XChunks(dmux); -} - -// ----------------------------------------------------------------------------- -// Format validation - -static int IsValidSimpleFormat(const WebPDemuxer* const dmux) { - const Frame* const frame = dmux->frames_; - if (dmux->state_ == WEBP_DEMUX_PARSING_HEADER) return 1; - - if (dmux->canvas_width_ <= 0 || dmux->canvas_height_ <= 0) return 0; - if (dmux->state_ == WEBP_DEMUX_DONE && frame == NULL) return 0; - - if (frame->width_ <= 0 || frame->height_ <= 0) return 0; - return 1; -} - -// If 'exact' is true, check that the image resolution matches the canvas. -// If 'exact' is false, check that the x/y offsets do not exceed the canvas. -static int CheckFrameBounds(const Frame* const frame, int exact, - int canvas_width, int canvas_height) { - if (exact) { - if (frame->x_offset_ != 0 || frame->y_offset_ != 0) { - return 0; - } - if (frame->width_ != canvas_width || frame->height_ != canvas_height) { - return 0; - } - } else { - if (frame->x_offset_ < 0 || frame->y_offset_ < 0) return 0; - if (frame->width_ + frame->x_offset_ > canvas_width) return 0; - if (frame->height_ + frame->y_offset_ > canvas_height) return 0; - } - return 1; -} - -static int IsValidExtendedFormat(const WebPDemuxer* const dmux) { - const int is_animation = !!(dmux->feature_flags_ & ANIMATION_FLAG); - const Frame* f = dmux->frames_; - - if (dmux->state_ == WEBP_DEMUX_PARSING_HEADER) return 1; - - if (dmux->canvas_width_ <= 0 || dmux->canvas_height_ <= 0) return 0; - if (dmux->loop_count_ < 0) return 0; - if (dmux->state_ == WEBP_DEMUX_DONE && dmux->frames_ == NULL) return 0; - if (dmux->feature_flags_ & ~ALL_VALID_FLAGS) return 0; // invalid bitstream - - while (f != NULL) { - const int cur_frame_set = f->frame_num_; - int frame_count = 0; - - // Check frame properties. - for (; f != NULL && f->frame_num_ == cur_frame_set; f = f->next_) { - const ChunkData* const image = f->img_components_; - const ChunkData* const alpha = f->img_components_ + 1; - - if (!is_animation && f->frame_num_ > 1) return 0; - - if (f->complete_) { - if (alpha->size_ == 0 && image->size_ == 0) return 0; - // Ensure alpha precedes image bitstream. - if (alpha->size_ > 0 && alpha->offset_ > image->offset_) { - return 0; - } - - if (f->width_ <= 0 || f->height_ <= 0) return 0; - } else { - // There shouldn't be a partial frame in a complete file. - if (dmux->state_ == WEBP_DEMUX_DONE) return 0; - - // Ensure alpha precedes image bitstream. - if (alpha->size_ > 0 && image->size_ > 0 && - alpha->offset_ > image->offset_) { - return 0; - } - // There shouldn't be any frames after an incomplete one. - if (f->next_ != NULL) return 0; - } - - if (f->width_ > 0 && f->height_ > 0 && - !CheckFrameBounds(f, !is_animation, - dmux->canvas_width_, dmux->canvas_height_)) { - return 0; - } - - ++frame_count; - } - } - return 1; -} - -// ----------------------------------------------------------------------------- -// WebPDemuxer object - -static void InitDemux(WebPDemuxer* const dmux, const MemBuffer* const mem) { - dmux->state_ = WEBP_DEMUX_PARSING_HEADER; - dmux->loop_count_ = 1; - dmux->bgcolor_ = 0xFFFFFFFF; // White background by default. - dmux->canvas_width_ = -1; - dmux->canvas_height_ = -1; - dmux->frames_tail_ = &dmux->frames_; - dmux->chunks_tail_ = &dmux->chunks_; - dmux->mem_ = *mem; -} - -static ParseStatus CreateRawImageDemuxer(MemBuffer* const mem, - WebPDemuxer** demuxer) { - WebPBitstreamFeatures features; - const VP8StatusCode status = - WebPGetFeatures(mem->buf_, mem->buf_size_, &features); - *demuxer = NULL; - if (status != VP8_STATUS_OK) { - return (status == VP8_STATUS_NOT_ENOUGH_DATA) ? PARSE_NEED_MORE_DATA - : PARSE_ERROR; - } - - { - WebPDemuxer* const dmux = (WebPDemuxer*)WebPSafeCalloc(1ULL, sizeof(*dmux)); - Frame* const frame = (Frame*)WebPSafeCalloc(1ULL, sizeof(*frame)); - if (dmux == NULL || frame == NULL) goto Error; - InitDemux(dmux, mem); - SetFrameInfo(0, mem->buf_size_, 1 /*frame_num*/, 1 /*complete*/, &features, - frame); - if (!AddFrame(dmux, frame)) goto Error; - dmux->state_ = WEBP_DEMUX_DONE; - dmux->canvas_width_ = frame->width_; - dmux->canvas_height_ = frame->height_; - dmux->feature_flags_ |= frame->has_alpha_ ? ALPHA_FLAG : 0; - dmux->num_frames_ = 1; - assert(IsValidSimpleFormat(dmux)); - *demuxer = dmux; - return PARSE_OK; - - Error: - WebPSafeFree(dmux); - WebPSafeFree(frame); - return PARSE_ERROR; - } -} - -WebPDemuxer* WebPDemuxInternal(const WebPData* data, int allow_partial, - WebPDemuxState* state, int version) { - const ChunkParser* parser; - int partial; - ParseStatus status = PARSE_ERROR; - MemBuffer mem; - WebPDemuxer* dmux; - - if (state != NULL) *state = WEBP_DEMUX_PARSE_ERROR; - - if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DEMUX_ABI_VERSION)) return NULL; - if (data == NULL || data->bytes == NULL || data->size == 0) return NULL; - - if (!InitMemBuffer(&mem, data->bytes, data->size)) return NULL; - status = ReadHeader(&mem); - if (status != PARSE_OK) { - // If parsing of the webp file header fails attempt to handle a raw - // VP8/VP8L frame. Note 'allow_partial' is ignored in this case. - if (status == PARSE_ERROR) { - status = CreateRawImageDemuxer(&mem, &dmux); - if (status == PARSE_OK) { - if (state != NULL) *state = WEBP_DEMUX_DONE; - return dmux; - } - } - if (state != NULL) { - *state = (status == PARSE_NEED_MORE_DATA) ? WEBP_DEMUX_PARSING_HEADER - : WEBP_DEMUX_PARSE_ERROR; - } - return NULL; - } - - partial = (mem.buf_size_ < mem.riff_end_); - if (!allow_partial && partial) return NULL; - - dmux = (WebPDemuxer*)WebPSafeCalloc(1ULL, sizeof(*dmux)); - if (dmux == NULL) return NULL; - InitDemux(dmux, &mem); - - status = PARSE_ERROR; - for (parser = kMasterChunks; parser->parse != NULL; ++parser) { - if (!memcmp(parser->id, GetBuffer(&dmux->mem_), TAG_SIZE)) { - status = parser->parse(dmux); - if (status == PARSE_OK) dmux->state_ = WEBP_DEMUX_DONE; - if (status == PARSE_NEED_MORE_DATA && !partial) status = PARSE_ERROR; - if (status != PARSE_ERROR && !parser->valid(dmux)) status = PARSE_ERROR; - if (status == PARSE_ERROR) dmux->state_ = WEBP_DEMUX_PARSE_ERROR; - break; - } - } - if (state != NULL) *state = dmux->state_; - - if (status == PARSE_ERROR) { - WebPDemuxDelete(dmux); - return NULL; - } - return dmux; -} - -void WebPDemuxDelete(WebPDemuxer* dmux) { - Chunk* c; - Frame* f; - if (dmux == NULL) return; - - for (f = dmux->frames_; f != NULL;) { - Frame* const cur_frame = f; - f = f->next_; - WebPSafeFree(cur_frame); - } - for (c = dmux->chunks_; c != NULL;) { - Chunk* const cur_chunk = c; - c = c->next_; - WebPSafeFree(cur_chunk); - } - WebPSafeFree(dmux); -} - -// ----------------------------------------------------------------------------- - -uint32_t WebPDemuxGetI(const WebPDemuxer* dmux, WebPFormatFeature feature) { - if (dmux == NULL) return 0; - - switch (feature) { - case WEBP_FF_FORMAT_FLAGS: return dmux->feature_flags_; - case WEBP_FF_CANVAS_WIDTH: return (uint32_t)dmux->canvas_width_; - case WEBP_FF_CANVAS_HEIGHT: return (uint32_t)dmux->canvas_height_; - case WEBP_FF_LOOP_COUNT: return (uint32_t)dmux->loop_count_; - case WEBP_FF_BACKGROUND_COLOR: return dmux->bgcolor_; - case WEBP_FF_FRAME_COUNT: return (uint32_t)dmux->num_frames_; - } - return 0; -} - -// ----------------------------------------------------------------------------- -// Frame iteration - -static const Frame* GetFrame(const WebPDemuxer* const dmux, int frame_num) { - const Frame* f; - for (f = dmux->frames_; f != NULL; f = f->next_) { - if (frame_num == f->frame_num_) break; - } - return f; -} - -static const uint8_t* GetFramePayload(const uint8_t* const mem_buf, - const Frame* const frame, - size_t* const data_size) { - *data_size = 0; - if (frame != NULL) { - const ChunkData* const image = frame->img_components_; - const ChunkData* const alpha = frame->img_components_ + 1; - size_t start_offset = image->offset_; - *data_size = image->size_; - - // if alpha exists it precedes image, update the size allowing for - // intervening chunks. - if (alpha->size_ > 0) { - const size_t inter_size = (image->offset_ > 0) - ? image->offset_ - (alpha->offset_ + alpha->size_) - : 0; - start_offset = alpha->offset_; - *data_size += alpha->size_ + inter_size; - } - return mem_buf + start_offset; - } - return NULL; -} - -// Create a whole 'frame' from VP8 (+ alpha) or lossless. -static int SynthesizeFrame(const WebPDemuxer* const dmux, - const Frame* const frame, - WebPIterator* const iter) { - const uint8_t* const mem_buf = dmux->mem_.buf_; - size_t payload_size = 0; - const uint8_t* const payload = GetFramePayload(mem_buf, frame, &payload_size); - if (payload == NULL) return 0; - assert(frame != NULL); - - iter->frame_num = frame->frame_num_; - iter->num_frames = dmux->num_frames_; - iter->x_offset = frame->x_offset_; - iter->y_offset = frame->y_offset_; - iter->width = frame->width_; - iter->height = frame->height_; - iter->has_alpha = frame->has_alpha_; - iter->duration = frame->duration_; - iter->dispose_method = frame->dispose_method_; - iter->blend_method = frame->blend_method_; - iter->complete = frame->complete_; - iter->fragment.bytes = payload; - iter->fragment.size = payload_size; - return 1; -} - -static int SetFrame(int frame_num, WebPIterator* const iter) { - const Frame* frame; - const WebPDemuxer* const dmux = (WebPDemuxer*)iter->private_; - if (dmux == NULL || frame_num < 0) return 0; - if (frame_num > dmux->num_frames_) return 0; - if (frame_num == 0) frame_num = dmux->num_frames_; - - frame = GetFrame(dmux, frame_num); - if (frame == NULL) return 0; - - return SynthesizeFrame(dmux, frame, iter); -} - -int WebPDemuxGetFrame(const WebPDemuxer* dmux, int frame, WebPIterator* iter) { - if (iter == NULL) return 0; - - memset(iter, 0, sizeof(*iter)); - iter->private_ = (void*)dmux; - return SetFrame(frame, iter); -} - -int WebPDemuxNextFrame(WebPIterator* iter) { - if (iter == NULL) return 0; - return SetFrame(iter->frame_num + 1, iter); -} - -int WebPDemuxPrevFrame(WebPIterator* iter) { - if (iter == NULL) return 0; - if (iter->frame_num <= 1) return 0; - return SetFrame(iter->frame_num - 1, iter); -} - -void WebPDemuxReleaseIterator(WebPIterator* iter) { - (void)iter; -} - -// ----------------------------------------------------------------------------- -// Chunk iteration - -static int ChunkCount(const WebPDemuxer* const dmux, const char fourcc[4]) { - const uint8_t* const mem_buf = dmux->mem_.buf_; - const Chunk* c; - int count = 0; - for (c = dmux->chunks_; c != NULL; c = c->next_) { - const uint8_t* const header = mem_buf + c->data_.offset_; - if (!memcmp(header, fourcc, TAG_SIZE)) ++count; - } - return count; -} - -static const Chunk* GetChunk(const WebPDemuxer* const dmux, - const char fourcc[4], int chunk_num) { - const uint8_t* const mem_buf = dmux->mem_.buf_; - const Chunk* c; - int count = 0; - for (c = dmux->chunks_; c != NULL; c = c->next_) { - const uint8_t* const header = mem_buf + c->data_.offset_; - if (!memcmp(header, fourcc, TAG_SIZE)) ++count; - if (count == chunk_num) break; - } - return c; -} - -static int SetChunk(const char fourcc[4], int chunk_num, - WebPChunkIterator* const iter) { - const WebPDemuxer* const dmux = (WebPDemuxer*)iter->private_; - int count; - - if (dmux == NULL || fourcc == NULL || chunk_num < 0) return 0; - count = ChunkCount(dmux, fourcc); - if (count == 0) return 0; - if (chunk_num == 0) chunk_num = count; - - if (chunk_num <= count) { - const uint8_t* const mem_buf = dmux->mem_.buf_; - const Chunk* const chunk = GetChunk(dmux, fourcc, chunk_num); - iter->chunk.bytes = mem_buf + chunk->data_.offset_ + CHUNK_HEADER_SIZE; - iter->chunk.size = chunk->data_.size_ - CHUNK_HEADER_SIZE; - iter->num_chunks = count; - iter->chunk_num = chunk_num; - return 1; - } - return 0; -} - -int WebPDemuxGetChunk(const WebPDemuxer* dmux, - const char fourcc[4], int chunk_num, - WebPChunkIterator* iter) { - if (iter == NULL) return 0; - - memset(iter, 0, sizeof(*iter)); - iter->private_ = (void*)dmux; - return SetChunk(fourcc, chunk_num, iter); -} - -int WebPDemuxNextChunk(WebPChunkIterator* iter) { - if (iter != NULL) { - const char* const fourcc = - (const char*)iter->chunk.bytes - CHUNK_HEADER_SIZE; - return SetChunk(fourcc, iter->chunk_num + 1, iter); - } - return 0; -} - -int WebPDemuxPrevChunk(WebPChunkIterator* iter) { - if (iter != NULL && iter->chunk_num > 1) { - const char* const fourcc = - (const char*)iter->chunk.bytes - CHUNK_HEADER_SIZE; - return SetChunk(fourcc, iter->chunk_num - 1, iter); - } - return 0; -} - -void WebPDemuxReleaseChunkIterator(WebPChunkIterator* iter) { - (void)iter; -} - diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing.c deleted file mode 100644 index 3aa4fed..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing.c +++ /dev/null @@ -1,472 +0,0 @@ -// Copyright 2013 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Utilities for processing transparent channel. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include "src/dsp/dsp.h" - -// Tables can be faster on some platform but incur some extra binary size (~2k). -#if !defined(USE_TABLES_FOR_ALPHA_MULT) -#define USE_TABLES_FOR_ALPHA_MULT 0 // ALTERNATE_CODE -#endif - - -// ----------------------------------------------------------------------------- - -#define MFIX 24 // 24bit fixed-point arithmetic -#define HALF ((1u << MFIX) >> 1) -#define KINV_255 ((1u << MFIX) / 255u) - -static uint32_t Mult(uint8_t x, uint32_t mult) { - const uint32_t v = (x * mult + HALF) >> MFIX; - assert(v <= 255); // <- 24bit precision is enough to ensure that. - return v; -} - -#if (USE_TABLES_FOR_ALPHA_MULT == 1) - -static const uint32_t kMultTables[2][256] = { - { // (255u << MFIX) / alpha - 0x00000000, 0xff000000, 0x7f800000, 0x55000000, 0x3fc00000, 0x33000000, - 0x2a800000, 0x246db6db, 0x1fe00000, 0x1c555555, 0x19800000, 0x172e8ba2, - 0x15400000, 0x139d89d8, 0x1236db6d, 0x11000000, 0x0ff00000, 0x0f000000, - 0x0e2aaaaa, 0x0d6bca1a, 0x0cc00000, 0x0c249249, 0x0b9745d1, 0x0b1642c8, - 0x0aa00000, 0x0a333333, 0x09cec4ec, 0x0971c71c, 0x091b6db6, 0x08cb08d3, - 0x08800000, 0x0839ce73, 0x07f80000, 0x07ba2e8b, 0x07800000, 0x07492492, - 0x07155555, 0x06e45306, 0x06b5e50d, 0x0689d89d, 0x06600000, 0x063831f3, - 0x06124924, 0x05ee23b8, 0x05cba2e8, 0x05aaaaaa, 0x058b2164, 0x056cefa8, - 0x05500000, 0x05343eb1, 0x05199999, 0x05000000, 0x04e76276, 0x04cfb2b7, - 0x04b8e38e, 0x04a2e8ba, 0x048db6db, 0x0479435e, 0x04658469, 0x045270d0, - 0x04400000, 0x042e29f7, 0x041ce739, 0x040c30c3, 0x03fc0000, 0x03ec4ec4, - 0x03dd1745, 0x03ce540f, 0x03c00000, 0x03b21642, 0x03a49249, 0x03976fc6, - 0x038aaaaa, 0x037e3f1f, 0x03722983, 0x03666666, 0x035af286, 0x034fcace, - 0x0344ec4e, 0x033a5440, 0x03300000, 0x0325ed09, 0x031c18f9, 0x0312818a, - 0x03092492, 0x03000000, 0x02f711dc, 0x02ee5846, 0x02e5d174, 0x02dd7baf, - 0x02d55555, 0x02cd5cd5, 0x02c590b2, 0x02bdef7b, 0x02b677d4, 0x02af286b, - 0x02a80000, 0x02a0fd5c, 0x029a1f58, 0x029364d9, 0x028ccccc, 0x0286562d, - 0x02800000, 0x0279c952, 0x0273b13b, 0x026db6db, 0x0267d95b, 0x026217ec, - 0x025c71c7, 0x0256e62a, 0x0251745d, 0x024c1bac, 0x0246db6d, 0x0241b2f9, - 0x023ca1af, 0x0237a6f4, 0x0232c234, 0x022df2df, 0x02293868, 0x02249249, - 0x02200000, 0x021b810e, 0x021714fb, 0x0212bb51, 0x020e739c, 0x020a3d70, - 0x02061861, 0x02020408, 0x01fe0000, 0x01fa0be8, 0x01f62762, 0x01f25213, - 0x01ee8ba2, 0x01ead3ba, 0x01e72a07, 0x01e38e38, 0x01e00000, 0x01dc7f10, - 0x01d90b21, 0x01d5a3e9, 0x01d24924, 0x01cefa8d, 0x01cbb7e3, 0x01c880e5, - 0x01c55555, 0x01c234f7, 0x01bf1f8f, 0x01bc14e5, 0x01b914c1, 0x01b61eed, - 0x01b33333, 0x01b05160, 0x01ad7943, 0x01aaaaaa, 0x01a7e567, 0x01a5294a, - 0x01a27627, 0x019fcbd2, 0x019d2a20, 0x019a90e7, 0x01980000, 0x01957741, - 0x0192f684, 0x01907da4, 0x018e0c7c, 0x018ba2e8, 0x018940c5, 0x0186e5f0, - 0x01849249, 0x018245ae, 0x01800000, 0x017dc11f, 0x017b88ee, 0x0179574e, - 0x01772c23, 0x01750750, 0x0172e8ba, 0x0170d045, 0x016ebdd7, 0x016cb157, - 0x016aaaaa, 0x0168a9b9, 0x0166ae6a, 0x0164b8a7, 0x0162c859, 0x0160dd67, - 0x015ef7bd, 0x015d1745, 0x015b3bea, 0x01596596, 0x01579435, 0x0155c7b4, - 0x01540000, 0x01523d03, 0x01507eae, 0x014ec4ec, 0x014d0fac, 0x014b5edc, - 0x0149b26c, 0x01480a4a, 0x01466666, 0x0144c6af, 0x01432b16, 0x0141938b, - 0x01400000, 0x013e7063, 0x013ce4a9, 0x013b5cc0, 0x0139d89d, 0x01385830, - 0x0136db6d, 0x01356246, 0x0133ecad, 0x01327a97, 0x01310bf6, 0x012fa0be, - 0x012e38e3, 0x012cd459, 0x012b7315, 0x012a150a, 0x0128ba2e, 0x01276276, - 0x01260dd6, 0x0124bc44, 0x01236db6, 0x01222222, 0x0120d97c, 0x011f93bc, - 0x011e50d7, 0x011d10c4, 0x011bd37a, 0x011a98ef, 0x0119611a, 0x01182bf2, - 0x0116f96f, 0x0115c988, 0x01149c34, 0x0113716a, 0x01124924, 0x01112358, - 0x01100000, 0x010edf12, 0x010dc087, 0x010ca458, 0x010b8a7d, 0x010a72f0, - 0x01095da8, 0x01084a9f, 0x010739ce, 0x01062b2e, 0x01051eb8, 0x01041465, - 0x01030c30, 0x01020612, 0x01010204, 0x01000000 }, - { // alpha * KINV_255 - 0x00000000, 0x00010101, 0x00020202, 0x00030303, 0x00040404, 0x00050505, - 0x00060606, 0x00070707, 0x00080808, 0x00090909, 0x000a0a0a, 0x000b0b0b, - 0x000c0c0c, 0x000d0d0d, 0x000e0e0e, 0x000f0f0f, 0x00101010, 0x00111111, - 0x00121212, 0x00131313, 0x00141414, 0x00151515, 0x00161616, 0x00171717, - 0x00181818, 0x00191919, 0x001a1a1a, 0x001b1b1b, 0x001c1c1c, 0x001d1d1d, - 0x001e1e1e, 0x001f1f1f, 0x00202020, 0x00212121, 0x00222222, 0x00232323, - 0x00242424, 0x00252525, 0x00262626, 0x00272727, 0x00282828, 0x00292929, - 0x002a2a2a, 0x002b2b2b, 0x002c2c2c, 0x002d2d2d, 0x002e2e2e, 0x002f2f2f, - 0x00303030, 0x00313131, 0x00323232, 0x00333333, 0x00343434, 0x00353535, - 0x00363636, 0x00373737, 0x00383838, 0x00393939, 0x003a3a3a, 0x003b3b3b, - 0x003c3c3c, 0x003d3d3d, 0x003e3e3e, 0x003f3f3f, 0x00404040, 0x00414141, - 0x00424242, 0x00434343, 0x00444444, 0x00454545, 0x00464646, 0x00474747, - 0x00484848, 0x00494949, 0x004a4a4a, 0x004b4b4b, 0x004c4c4c, 0x004d4d4d, - 0x004e4e4e, 0x004f4f4f, 0x00505050, 0x00515151, 0x00525252, 0x00535353, - 0x00545454, 0x00555555, 0x00565656, 0x00575757, 0x00585858, 0x00595959, - 0x005a5a5a, 0x005b5b5b, 0x005c5c5c, 0x005d5d5d, 0x005e5e5e, 0x005f5f5f, - 0x00606060, 0x00616161, 0x00626262, 0x00636363, 0x00646464, 0x00656565, - 0x00666666, 0x00676767, 0x00686868, 0x00696969, 0x006a6a6a, 0x006b6b6b, - 0x006c6c6c, 0x006d6d6d, 0x006e6e6e, 0x006f6f6f, 0x00707070, 0x00717171, - 0x00727272, 0x00737373, 0x00747474, 0x00757575, 0x00767676, 0x00777777, - 0x00787878, 0x00797979, 0x007a7a7a, 0x007b7b7b, 0x007c7c7c, 0x007d7d7d, - 0x007e7e7e, 0x007f7f7f, 0x00808080, 0x00818181, 0x00828282, 0x00838383, - 0x00848484, 0x00858585, 0x00868686, 0x00878787, 0x00888888, 0x00898989, - 0x008a8a8a, 0x008b8b8b, 0x008c8c8c, 0x008d8d8d, 0x008e8e8e, 0x008f8f8f, - 0x00909090, 0x00919191, 0x00929292, 0x00939393, 0x00949494, 0x00959595, - 0x00969696, 0x00979797, 0x00989898, 0x00999999, 0x009a9a9a, 0x009b9b9b, - 0x009c9c9c, 0x009d9d9d, 0x009e9e9e, 0x009f9f9f, 0x00a0a0a0, 0x00a1a1a1, - 0x00a2a2a2, 0x00a3a3a3, 0x00a4a4a4, 0x00a5a5a5, 0x00a6a6a6, 0x00a7a7a7, - 0x00a8a8a8, 0x00a9a9a9, 0x00aaaaaa, 0x00ababab, 0x00acacac, 0x00adadad, - 0x00aeaeae, 0x00afafaf, 0x00b0b0b0, 0x00b1b1b1, 0x00b2b2b2, 0x00b3b3b3, - 0x00b4b4b4, 0x00b5b5b5, 0x00b6b6b6, 0x00b7b7b7, 0x00b8b8b8, 0x00b9b9b9, - 0x00bababa, 0x00bbbbbb, 0x00bcbcbc, 0x00bdbdbd, 0x00bebebe, 0x00bfbfbf, - 0x00c0c0c0, 0x00c1c1c1, 0x00c2c2c2, 0x00c3c3c3, 0x00c4c4c4, 0x00c5c5c5, - 0x00c6c6c6, 0x00c7c7c7, 0x00c8c8c8, 0x00c9c9c9, 0x00cacaca, 0x00cbcbcb, - 0x00cccccc, 0x00cdcdcd, 0x00cecece, 0x00cfcfcf, 0x00d0d0d0, 0x00d1d1d1, - 0x00d2d2d2, 0x00d3d3d3, 0x00d4d4d4, 0x00d5d5d5, 0x00d6d6d6, 0x00d7d7d7, - 0x00d8d8d8, 0x00d9d9d9, 0x00dadada, 0x00dbdbdb, 0x00dcdcdc, 0x00dddddd, - 0x00dedede, 0x00dfdfdf, 0x00e0e0e0, 0x00e1e1e1, 0x00e2e2e2, 0x00e3e3e3, - 0x00e4e4e4, 0x00e5e5e5, 0x00e6e6e6, 0x00e7e7e7, 0x00e8e8e8, 0x00e9e9e9, - 0x00eaeaea, 0x00ebebeb, 0x00ececec, 0x00ededed, 0x00eeeeee, 0x00efefef, - 0x00f0f0f0, 0x00f1f1f1, 0x00f2f2f2, 0x00f3f3f3, 0x00f4f4f4, 0x00f5f5f5, - 0x00f6f6f6, 0x00f7f7f7, 0x00f8f8f8, 0x00f9f9f9, 0x00fafafa, 0x00fbfbfb, - 0x00fcfcfc, 0x00fdfdfd, 0x00fefefe, 0x00ffffff } -}; - -static WEBP_INLINE uint32_t GetScale(uint32_t a, int inverse) { - return kMultTables[!inverse][a]; -} - -#else - -static WEBP_INLINE uint32_t GetScale(uint32_t a, int inverse) { - return inverse ? (255u << MFIX) / a : a * KINV_255; -} - -#endif // USE_TABLES_FOR_ALPHA_MULT - -void WebPMultARGBRow_C(uint32_t* const ptr, int width, int inverse) { - int x; - for (x = 0; x < width; ++x) { - const uint32_t argb = ptr[x]; - if (argb < 0xff000000u) { // alpha < 255 - if (argb <= 0x00ffffffu) { // alpha == 0 - ptr[x] = 0; - } else { - const uint32_t alpha = (argb >> 24) & 0xff; - const uint32_t scale = GetScale(alpha, inverse); - uint32_t out = argb & 0xff000000u; - out |= Mult(argb >> 0, scale) << 0; - out |= Mult(argb >> 8, scale) << 8; - out |= Mult(argb >> 16, scale) << 16; - ptr[x] = out; - } - } - } -} - -void WebPMultRow_C(uint8_t* const ptr, const uint8_t* const alpha, - int width, int inverse) { - int x; - for (x = 0; x < width; ++x) { - const uint32_t a = alpha[x]; - if (a != 255) { - if (a == 0) { - ptr[x] = 0; - } else { - const uint32_t scale = GetScale(a, inverse); - ptr[x] = Mult(ptr[x], scale); - } - } - } -} - -#undef KINV_255 -#undef HALF -#undef MFIX - -void (*WebPMultARGBRow)(uint32_t* const ptr, int width, int inverse); -void (*WebPMultRow)(uint8_t* const ptr, const uint8_t* const alpha, - int width, int inverse); - -//------------------------------------------------------------------------------ -// Generic per-plane calls - -void WebPMultARGBRows(uint8_t* ptr, int stride, int width, int num_rows, - int inverse) { - int n; - for (n = 0; n < num_rows; ++n) { - WebPMultARGBRow((uint32_t*)ptr, width, inverse); - ptr += stride; - } -} - -void WebPMultRows(uint8_t* ptr, int stride, - const uint8_t* alpha, int alpha_stride, - int width, int num_rows, int inverse) { - int n; - for (n = 0; n < num_rows; ++n) { - WebPMultRow(ptr, alpha, width, inverse); - ptr += stride; - alpha += alpha_stride; - } -} - -//------------------------------------------------------------------------------ -// Premultiplied modes - -// non dithered-modes - -// (x * a * 32897) >> 23 is bit-wise equivalent to (int)(x * a / 255.) -// for all 8bit x or a. For bit-wise equivalence to (int)(x * a / 255. + .5), -// one can use instead: (x * a * 65793 + (1 << 23)) >> 24 -#if 1 // (int)(x * a / 255.) -#define MULTIPLIER(a) ((a) * 32897U) -#define PREMULTIPLY(x, m) (((x) * (m)) >> 23) -#else // (int)(x * a / 255. + .5) -#define MULTIPLIER(a) ((a) * 65793U) -#define PREMULTIPLY(x, m) (((x) * (m) + (1U << 23)) >> 24) -#endif - -#if !WEBP_NEON_OMIT_C_CODE -static void ApplyAlphaMultiply_C(uint8_t* rgba, int alpha_first, - int w, int h, int stride) { - while (h-- > 0) { - uint8_t* const rgb = rgba + (alpha_first ? 1 : 0); - const uint8_t* const alpha = rgba + (alpha_first ? 0 : 3); - int i; - for (i = 0; i < w; ++i) { - const uint32_t a = alpha[4 * i]; - if (a != 0xff) { - const uint32_t mult = MULTIPLIER(a); - rgb[4 * i + 0] = PREMULTIPLY(rgb[4 * i + 0], mult); - rgb[4 * i + 1] = PREMULTIPLY(rgb[4 * i + 1], mult); - rgb[4 * i + 2] = PREMULTIPLY(rgb[4 * i + 2], mult); - } - } - rgba += stride; - } -} -#endif // !WEBP_NEON_OMIT_C_CODE -#undef MULTIPLIER -#undef PREMULTIPLY - -// rgbA4444 - -#define MULTIPLIER(a) ((a) * 0x1111) // 0x1111 ~= (1 << 16) / 15 - -static WEBP_INLINE uint8_t dither_hi(uint8_t x) { - return (x & 0xf0) | (x >> 4); -} - -static WEBP_INLINE uint8_t dither_lo(uint8_t x) { - return (x & 0x0f) | (x << 4); -} - -static WEBP_INLINE uint8_t multiply(uint8_t x, uint32_t m) { - return (x * m) >> 16; -} - -static WEBP_INLINE void ApplyAlphaMultiply4444_C(uint8_t* rgba4444, - int w, int h, int stride, - int rg_byte_pos /* 0 or 1 */) { - while (h-- > 0) { - int i; - for (i = 0; i < w; ++i) { - const uint32_t rg = rgba4444[2 * i + rg_byte_pos]; - const uint32_t ba = rgba4444[2 * i + (rg_byte_pos ^ 1)]; - const uint8_t a = ba & 0x0f; - const uint32_t mult = MULTIPLIER(a); - const uint8_t r = multiply(dither_hi(rg), mult); - const uint8_t g = multiply(dither_lo(rg), mult); - const uint8_t b = multiply(dither_hi(ba), mult); - rgba4444[2 * i + rg_byte_pos] = (r & 0xf0) | ((g >> 4) & 0x0f); - rgba4444[2 * i + (rg_byte_pos ^ 1)] = (b & 0xf0) | a; - } - rgba4444 += stride; - } -} -#undef MULTIPLIER - -static void ApplyAlphaMultiply_16b_C(uint8_t* rgba4444, - int w, int h, int stride) { -#if (WEBP_SWAP_16BIT_CSP == 1) - ApplyAlphaMultiply4444_C(rgba4444, w, h, stride, 1); -#else - ApplyAlphaMultiply4444_C(rgba4444, w, h, stride, 0); -#endif -} - -#if !WEBP_NEON_OMIT_C_CODE -static int DispatchAlpha_C(const uint8_t* alpha, int alpha_stride, - int width, int height, - uint8_t* dst, int dst_stride) { - uint32_t alpha_mask = 0xff; - int i, j; - - for (j = 0; j < height; ++j) { - for (i = 0; i < width; ++i) { - const uint32_t alpha_value = alpha[i]; - dst[4 * i] = alpha_value; - alpha_mask &= alpha_value; - } - alpha += alpha_stride; - dst += dst_stride; - } - - return (alpha_mask != 0xff); -} - -static void DispatchAlphaToGreen_C(const uint8_t* alpha, int alpha_stride, - int width, int height, - uint32_t* dst, int dst_stride) { - int i, j; - for (j = 0; j < height; ++j) { - for (i = 0; i < width; ++i) { - dst[i] = alpha[i] << 8; // leave A/R/B channels zero'd. - } - alpha += alpha_stride; - dst += dst_stride; - } -} - -static int ExtractAlpha_C(const uint8_t* argb, int argb_stride, - int width, int height, - uint8_t* alpha, int alpha_stride) { - uint8_t alpha_mask = 0xff; - int i, j; - - for (j = 0; j < height; ++j) { - for (i = 0; i < width; ++i) { - const uint8_t alpha_value = argb[4 * i]; - alpha[i] = alpha_value; - alpha_mask &= alpha_value; - } - argb += argb_stride; - alpha += alpha_stride; - } - return (alpha_mask == 0xff); -} - -static void ExtractGreen_C(const uint32_t* argb, uint8_t* alpha, int size) { - int i; - for (i = 0; i < size; ++i) alpha[i] = argb[i] >> 8; -} -#endif // !WEBP_NEON_OMIT_C_CODE - -//------------------------------------------------------------------------------ - -static int HasAlpha8b_C(const uint8_t* src, int length) { - while (length-- > 0) if (*src++ != 0xff) return 1; - return 0; -} - -static int HasAlpha32b_C(const uint8_t* src, int length) { - int x; - for (x = 0; length-- > 0; x += 4) if (src[x] != 0xff) return 1; - return 0; -} - -//------------------------------------------------------------------------------ -// Simple channel manipulations. - -static WEBP_INLINE uint32_t MakeARGB32(int a, int r, int g, int b) { - return (((uint32_t)a << 24) | (r << 16) | (g << 8) | b); -} - -#ifdef WORDS_BIGENDIAN -static void PackARGB_C(const uint8_t* a, const uint8_t* r, const uint8_t* g, - const uint8_t* b, int len, uint32_t* out) { - int i; - for (i = 0; i < len; ++i) { - out[i] = MakeARGB32(a[4 * i], r[4 * i], g[4 * i], b[4 * i]); - } -} -#endif - -static void PackRGB_C(const uint8_t* r, const uint8_t* g, const uint8_t* b, - int len, int step, uint32_t* out) { - int i, offset = 0; - for (i = 0; i < len; ++i) { - out[i] = MakeARGB32(0xff, r[offset], g[offset], b[offset]); - offset += step; - } -} - -void (*WebPApplyAlphaMultiply)(uint8_t*, int, int, int, int); -void (*WebPApplyAlphaMultiply4444)(uint8_t*, int, int, int); -int (*WebPDispatchAlpha)(const uint8_t*, int, int, int, uint8_t*, int); -void (*WebPDispatchAlphaToGreen)(const uint8_t*, int, int, int, uint32_t*, int); -int (*WebPExtractAlpha)(const uint8_t*, int, int, int, uint8_t*, int); -void (*WebPExtractGreen)(const uint32_t* argb, uint8_t* alpha, int size); -#ifdef WORDS_BIGENDIAN -void (*WebPPackARGB)(const uint8_t* a, const uint8_t* r, const uint8_t* g, - const uint8_t* b, int, uint32_t*); -#endif -void (*WebPPackRGB)(const uint8_t* r, const uint8_t* g, const uint8_t* b, - int len, int step, uint32_t* out); - -int (*WebPHasAlpha8b)(const uint8_t* src, int length); -int (*WebPHasAlpha32b)(const uint8_t* src, int length); - -//------------------------------------------------------------------------------ -// Init function - -extern void WebPInitAlphaProcessingMIPSdspR2(void); -extern void WebPInitAlphaProcessingSSE2(void); -extern void WebPInitAlphaProcessingSSE41(void); -extern void WebPInitAlphaProcessingNEON(void); - -WEBP_DSP_INIT_FUNC(WebPInitAlphaProcessing) { - WebPMultARGBRow = WebPMultARGBRow_C; - WebPMultRow = WebPMultRow_C; - WebPApplyAlphaMultiply4444 = ApplyAlphaMultiply_16b_C; - -#ifdef WORDS_BIGENDIAN - WebPPackARGB = PackARGB_C; -#endif - WebPPackRGB = PackRGB_C; -#if !WEBP_NEON_OMIT_C_CODE - WebPApplyAlphaMultiply = ApplyAlphaMultiply_C; - WebPDispatchAlpha = DispatchAlpha_C; - WebPDispatchAlphaToGreen = DispatchAlphaToGreen_C; - WebPExtractAlpha = ExtractAlpha_C; - WebPExtractGreen = ExtractGreen_C; -#endif - - WebPHasAlpha8b = HasAlpha8b_C; - WebPHasAlpha32b = HasAlpha32b_C; - - // If defined, use CPUInfo() to overwrite some pointers with faster versions. - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - WebPInitAlphaProcessingSSE2(); -#if defined(WEBP_USE_SSE41) - if (VP8GetCPUInfo(kSSE4_1)) { - WebPInitAlphaProcessingSSE41(); - } -#endif - } -#endif -#if defined(WEBP_USE_MIPS_DSP_R2) - if (VP8GetCPUInfo(kMIPSdspR2)) { - WebPInitAlphaProcessingMIPSdspR2(); - } -#endif - } - -#if defined(WEBP_USE_NEON) - if (WEBP_NEON_OMIT_C_CODE || - (VP8GetCPUInfo != NULL && VP8GetCPUInfo(kNEON))) { - WebPInitAlphaProcessingNEON(); - } -#endif - - assert(WebPMultARGBRow != NULL); - assert(WebPMultRow != NULL); - assert(WebPApplyAlphaMultiply != NULL); - assert(WebPApplyAlphaMultiply4444 != NULL); - assert(WebPDispatchAlpha != NULL); - assert(WebPDispatchAlphaToGreen != NULL); - assert(WebPExtractAlpha != NULL); - assert(WebPExtractGreen != NULL); -#ifdef WORDS_BIGENDIAN - assert(WebPPackARGB != NULL); -#endif - assert(WebPPackRGB != NULL); - assert(WebPHasAlpha8b != NULL); - assert(WebPHasAlpha32b != NULL); -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_mips_dsp_r2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_mips_dsp_r2.c deleted file mode 100644 index 9f9e37f..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_mips_dsp_r2.c +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Utilities for processing transparent channel. -// -// Author(s): Branimir Vasic (branimir.vasic@imgtec.com) -// Djordje Pesut (djordje.pesut@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS_DSP_R2) - -static int DispatchAlpha_MIPSdspR2(const uint8_t* alpha, int alpha_stride, - int width, int height, - uint8_t* dst, int dst_stride) { - uint32_t alpha_mask = 0xffffffff; - int i, j, temp0; - - for (j = 0; j < height; ++j) { - uint8_t* pdst = dst; - const uint8_t* palpha = alpha; - for (i = 0; i < (width >> 2); ++i) { - int temp1, temp2, temp3; - - __asm__ volatile ( - "ulw %[temp0], 0(%[palpha]) \n\t" - "addiu %[palpha], %[palpha], 4 \n\t" - "addiu %[pdst], %[pdst], 16 \n\t" - "srl %[temp1], %[temp0], 8 \n\t" - "srl %[temp2], %[temp0], 16 \n\t" - "srl %[temp3], %[temp0], 24 \n\t" - "and %[alpha_mask], %[alpha_mask], %[temp0] \n\t" - "sb %[temp0], -16(%[pdst]) \n\t" - "sb %[temp1], -12(%[pdst]) \n\t" - "sb %[temp2], -8(%[pdst]) \n\t" - "sb %[temp3], -4(%[pdst]) \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [palpha]"+r"(palpha), [pdst]"+r"(pdst), - [alpha_mask]"+r"(alpha_mask) - : - : "memory" - ); - } - - for (i = 0; i < (width & 3); ++i) { - __asm__ volatile ( - "lbu %[temp0], 0(%[palpha]) \n\t" - "addiu %[palpha], %[palpha], 1 \n\t" - "sb %[temp0], 0(%[pdst]) \n\t" - "and %[alpha_mask], %[alpha_mask], %[temp0] \n\t" - "addiu %[pdst], %[pdst], 4 \n\t" - : [temp0]"=&r"(temp0), [palpha]"+r"(palpha), [pdst]"+r"(pdst), - [alpha_mask]"+r"(alpha_mask) - : - : "memory" - ); - } - alpha += alpha_stride; - dst += dst_stride; - } - - __asm__ volatile ( - "ext %[temp0], %[alpha_mask], 0, 16 \n\t" - "srl %[alpha_mask], %[alpha_mask], 16 \n\t" - "and %[alpha_mask], %[alpha_mask], %[temp0] \n\t" - "ext %[temp0], %[alpha_mask], 0, 8 \n\t" - "srl %[alpha_mask], %[alpha_mask], 8 \n\t" - "and %[alpha_mask], %[alpha_mask], %[temp0] \n\t" - : [temp0]"=&r"(temp0), [alpha_mask]"+r"(alpha_mask) - : - ); - - return (alpha_mask != 0xff); -} - -static void MultARGBRow_MIPSdspR2(uint32_t* const ptr, int width, - int inverse) { - int x; - const uint32_t c_00ffffff = 0x00ffffffu; - const uint32_t c_ff000000 = 0xff000000u; - const uint32_t c_8000000 = 0x00800000u; - const uint32_t c_8000080 = 0x00800080u; - for (x = 0; x < width; ++x) { - const uint32_t argb = ptr[x]; - if (argb < 0xff000000u) { // alpha < 255 - if (argb <= 0x00ffffffu) { // alpha == 0 - ptr[x] = 0; - } else { - int temp0, temp1, temp2, temp3, alpha; - __asm__ volatile ( - "srl %[alpha], %[argb], 24 \n\t" - "replv.qb %[temp0], %[alpha] \n\t" - "and %[temp0], %[temp0], %[c_00ffffff] \n\t" - "beqz %[inverse], 0f \n\t" - "divu $zero, %[c_ff000000], %[alpha] \n\t" - "mflo %[temp0] \n\t" - "0: \n\t" - "andi %[temp1], %[argb], 0xff \n\t" - "ext %[temp2], %[argb], 8, 8 \n\t" - "ext %[temp3], %[argb], 16, 8 \n\t" - "mul %[temp1], %[temp1], %[temp0] \n\t" - "mul %[temp2], %[temp2], %[temp0] \n\t" - "mul %[temp3], %[temp3], %[temp0] \n\t" - "precrq.ph.w %[temp1], %[temp2], %[temp1] \n\t" - "addu %[temp3], %[temp3], %[c_8000000] \n\t" - "addu %[temp1], %[temp1], %[c_8000080] \n\t" - "precrq.ph.w %[temp3], %[argb], %[temp3] \n\t" - "precrq.qb.ph %[temp1], %[temp3], %[temp1] \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [alpha]"=&r"(alpha) - : [inverse]"r"(inverse), [c_00ffffff]"r"(c_00ffffff), - [c_8000000]"r"(c_8000000), [c_8000080]"r"(c_8000080), - [c_ff000000]"r"(c_ff000000), [argb]"r"(argb) - : "memory", "hi", "lo" - ); - ptr[x] = temp1; - } - } - } -} - -#ifdef WORDS_BIGENDIAN -static void PackARGB_MIPSdspR2(const uint8_t* a, const uint8_t* r, - const uint8_t* g, const uint8_t* b, int len, - uint32_t* out) { - int temp0, temp1, temp2, temp3, offset; - const int rest = len & 1; - const uint32_t* const loop_end = out + len - rest; - const int step = 4; - __asm__ volatile ( - "xor %[offset], %[offset], %[offset] \n\t" - "beq %[loop_end], %[out], 0f \n\t" - "2: \n\t" - "lbux %[temp0], %[offset](%[a]) \n\t" - "lbux %[temp1], %[offset](%[r]) \n\t" - "lbux %[temp2], %[offset](%[g]) \n\t" - "lbux %[temp3], %[offset](%[b]) \n\t" - "ins %[temp1], %[temp0], 16, 16 \n\t" - "ins %[temp3], %[temp2], 16, 16 \n\t" - "addiu %[out], %[out], 4 \n\t" - "precr.qb.ph %[temp0], %[temp1], %[temp3] \n\t" - "sw %[temp0], -4(%[out]) \n\t" - "addu %[offset], %[offset], %[step] \n\t" - "bne %[loop_end], %[out], 2b \n\t" - "0: \n\t" - "beq %[rest], $zero, 1f \n\t" - "lbux %[temp0], %[offset](%[a]) \n\t" - "lbux %[temp1], %[offset](%[r]) \n\t" - "lbux %[temp2], %[offset](%[g]) \n\t" - "lbux %[temp3], %[offset](%[b]) \n\t" - "ins %[temp1], %[temp0], 16, 16 \n\t" - "ins %[temp3], %[temp2], 16, 16 \n\t" - "precr.qb.ph %[temp0], %[temp1], %[temp3] \n\t" - "sw %[temp0], 0(%[out]) \n\t" - "1: \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [offset]"=&r"(offset), [out]"+&r"(out) - : [a]"r"(a), [r]"r"(r), [g]"r"(g), [b]"r"(b), [step]"r"(step), - [loop_end]"r"(loop_end), [rest]"r"(rest) - : "memory" - ); -} -#endif // WORDS_BIGENDIAN - -static void PackRGB_MIPSdspR2(const uint8_t* r, const uint8_t* g, - const uint8_t* b, int len, int step, - uint32_t* out) { - int temp0, temp1, temp2, offset; - const int rest = len & 1; - const int a = 0xff; - const uint32_t* const loop_end = out + len - rest; - __asm__ volatile ( - "xor %[offset], %[offset], %[offset] \n\t" - "beq %[loop_end], %[out], 0f \n\t" - "2: \n\t" - "lbux %[temp0], %[offset](%[r]) \n\t" - "lbux %[temp1], %[offset](%[g]) \n\t" - "lbux %[temp2], %[offset](%[b]) \n\t" - "ins %[temp0], %[a], 16, 16 \n\t" - "ins %[temp2], %[temp1], 16, 16 \n\t" - "addiu %[out], %[out], 4 \n\t" - "precr.qb.ph %[temp0], %[temp0], %[temp2] \n\t" - "sw %[temp0], -4(%[out]) \n\t" - "addu %[offset], %[offset], %[step] \n\t" - "bne %[loop_end], %[out], 2b \n\t" - "0: \n\t" - "beq %[rest], $zero, 1f \n\t" - "lbux %[temp0], %[offset](%[r]) \n\t" - "lbux %[temp1], %[offset](%[g]) \n\t" - "lbux %[temp2], %[offset](%[b]) \n\t" - "ins %[temp0], %[a], 16, 16 \n\t" - "ins %[temp2], %[temp1], 16, 16 \n\t" - "precr.qb.ph %[temp0], %[temp0], %[temp2] \n\t" - "sw %[temp0], 0(%[out]) \n\t" - "1: \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [offset]"=&r"(offset), [out]"+&r"(out) - : [a]"r"(a), [r]"r"(r), [g]"r"(g), [b]"r"(b), [step]"r"(step), - [loop_end]"r"(loop_end), [rest]"r"(rest) - : "memory" - ); -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPInitAlphaProcessingMIPSdspR2(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitAlphaProcessingMIPSdspR2(void) { - WebPDispatchAlpha = DispatchAlpha_MIPSdspR2; - WebPMultARGBRow = MultARGBRow_MIPSdspR2; -#ifdef WORDS_BIGENDIAN - WebPPackARGB = PackARGB_MIPSdspR2; -#endif - WebPPackRGB = PackRGB_MIPSdspR2; -} - -#else // !WEBP_USE_MIPS_DSP_R2 - -WEBP_DSP_INIT_STUB(WebPInitAlphaProcessingMIPSdspR2) - -#endif // WEBP_USE_MIPS_DSP_R2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_neon.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_neon.c deleted file mode 100644 index bf103e5..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_neon.c +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Utilities for processing transparent channel, NEON version. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_NEON) - -#include "src/dsp/neon.h" - -//------------------------------------------------------------------------------ - -#define MULTIPLIER(a) ((a) * 0x8081) -#define PREMULTIPLY(x, m) (((x) * (m)) >> 23) - -#define MULTIPLY_BY_ALPHA(V, ALPHA, OTHER) do { \ - const uint8x8_t alpha = (V).val[(ALPHA)]; \ - const uint16x8_t r1 = vmull_u8((V).val[1], alpha); \ - const uint16x8_t g1 = vmull_u8((V).val[2], alpha); \ - const uint16x8_t b1 = vmull_u8((V).val[(OTHER)], alpha); \ - /* we use: v / 255 = (v + 1 + (v >> 8)) >> 8 */ \ - const uint16x8_t r2 = vsraq_n_u16(r1, r1, 8); \ - const uint16x8_t g2 = vsraq_n_u16(g1, g1, 8); \ - const uint16x8_t b2 = vsraq_n_u16(b1, b1, 8); \ - const uint16x8_t r3 = vaddq_u16(r2, kOne); \ - const uint16x8_t g3 = vaddq_u16(g2, kOne); \ - const uint16x8_t b3 = vaddq_u16(b2, kOne); \ - (V).val[1] = vshrn_n_u16(r3, 8); \ - (V).val[2] = vshrn_n_u16(g3, 8); \ - (V).val[(OTHER)] = vshrn_n_u16(b3, 8); \ -} while (0) - -static void ApplyAlphaMultiply_NEON(uint8_t* rgba, int alpha_first, - int w, int h, int stride) { - const uint16x8_t kOne = vdupq_n_u16(1u); - while (h-- > 0) { - uint32_t* const rgbx = (uint32_t*)rgba; - int i = 0; - if (alpha_first) { - for (; i + 8 <= w; i += 8) { - // load aaaa...|rrrr...|gggg...|bbbb... - uint8x8x4_t RGBX = vld4_u8((const uint8_t*)(rgbx + i)); - MULTIPLY_BY_ALPHA(RGBX, 0, 3); - vst4_u8((uint8_t*)(rgbx + i), RGBX); - } - } else { - for (; i + 8 <= w; i += 8) { - uint8x8x4_t RGBX = vld4_u8((const uint8_t*)(rgbx + i)); - MULTIPLY_BY_ALPHA(RGBX, 3, 0); - vst4_u8((uint8_t*)(rgbx + i), RGBX); - } - } - // Finish with left-overs. - for (; i < w; ++i) { - uint8_t* const rgb = rgba + (alpha_first ? 1 : 0); - const uint8_t* const alpha = rgba + (alpha_first ? 0 : 3); - const uint32_t a = alpha[4 * i]; - if (a != 0xff) { - const uint32_t mult = MULTIPLIER(a); - rgb[4 * i + 0] = PREMULTIPLY(rgb[4 * i + 0], mult); - rgb[4 * i + 1] = PREMULTIPLY(rgb[4 * i + 1], mult); - rgb[4 * i + 2] = PREMULTIPLY(rgb[4 * i + 2], mult); - } - } - rgba += stride; - } -} -#undef MULTIPLY_BY_ALPHA -#undef MULTIPLIER -#undef PREMULTIPLY - -//------------------------------------------------------------------------------ - -static int DispatchAlpha_NEON(const uint8_t* alpha, int alpha_stride, - int width, int height, - uint8_t* dst, int dst_stride) { - uint32_t alpha_mask = 0xffffffffu; - uint8x8_t mask8 = vdup_n_u8(0xff); - uint32_t tmp[2]; - int i, j; - for (j = 0; j < height; ++j) { - // We don't know if alpha is first or last in dst[] (depending on rgbA/Argb - // mode). So we must be sure dst[4*i + 8 - 1] is writable for the store. - // Hence the test with 'width - 1' instead of just 'width'. - for (i = 0; i + 8 <= width - 1; i += 8) { - uint8x8x4_t rgbX = vld4_u8((const uint8_t*)(dst + 4 * i)); - const uint8x8_t alphas = vld1_u8(alpha + i); - rgbX.val[0] = alphas; - vst4_u8((uint8_t*)(dst + 4 * i), rgbX); - mask8 = vand_u8(mask8, alphas); - } - for (; i < width; ++i) { - const uint32_t alpha_value = alpha[i]; - dst[4 * i] = alpha_value; - alpha_mask &= alpha_value; - } - alpha += alpha_stride; - dst += dst_stride; - } - vst1_u8((uint8_t*)tmp, mask8); - alpha_mask &= tmp[0]; - alpha_mask &= tmp[1]; - return (alpha_mask != 0xffffffffu); -} - -static void DispatchAlphaToGreen_NEON(const uint8_t* alpha, int alpha_stride, - int width, int height, - uint32_t* dst, int dst_stride) { - int i, j; - uint8x8x4_t greens; // leave A/R/B channels zero'd. - greens.val[0] = vdup_n_u8(0); - greens.val[2] = vdup_n_u8(0); - greens.val[3] = vdup_n_u8(0); - for (j = 0; j < height; ++j) { - for (i = 0; i + 8 <= width; i += 8) { - greens.val[1] = vld1_u8(alpha + i); - vst4_u8((uint8_t*)(dst + i), greens); - } - for (; i < width; ++i) dst[i] = alpha[i] << 8; - alpha += alpha_stride; - dst += dst_stride; - } -} - -static int ExtractAlpha_NEON(const uint8_t* argb, int argb_stride, - int width, int height, - uint8_t* alpha, int alpha_stride) { - uint32_t alpha_mask = 0xffffffffu; - uint8x8_t mask8 = vdup_n_u8(0xff); - uint32_t tmp[2]; - int i, j; - for (j = 0; j < height; ++j) { - // We don't know if alpha is first or last in dst[] (depending on rgbA/Argb - // mode). So we must be sure dst[4*i + 8 - 1] is writable for the store. - // Hence the test with 'width - 1' instead of just 'width'. - for (i = 0; i + 8 <= width - 1; i += 8) { - const uint8x8x4_t rgbX = vld4_u8((const uint8_t*)(argb + 4 * i)); - const uint8x8_t alphas = rgbX.val[0]; - vst1_u8((uint8_t*)(alpha + i), alphas); - mask8 = vand_u8(mask8, alphas); - } - for (; i < width; ++i) { - alpha[i] = argb[4 * i]; - alpha_mask &= alpha[i]; - } - argb += argb_stride; - alpha += alpha_stride; - } - vst1_u8((uint8_t*)tmp, mask8); - alpha_mask &= tmp[0]; - alpha_mask &= tmp[1]; - return (alpha_mask == 0xffffffffu); -} - -static void ExtractGreen_NEON(const uint32_t* argb, - uint8_t* alpha, int size) { - int i; - for (i = 0; i + 16 <= size; i += 16) { - const uint8x16x4_t rgbX = vld4q_u8((const uint8_t*)(argb + i)); - const uint8x16_t greens = rgbX.val[1]; - vst1q_u8(alpha + i, greens); - } - for (; i < size; ++i) alpha[i] = (argb[i] >> 8) & 0xff; -} - -//------------------------------------------------------------------------------ - -extern void WebPInitAlphaProcessingNEON(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitAlphaProcessingNEON(void) { - WebPApplyAlphaMultiply = ApplyAlphaMultiply_NEON; - WebPDispatchAlpha = DispatchAlpha_NEON; - WebPDispatchAlphaToGreen = DispatchAlphaToGreen_NEON; - WebPExtractAlpha = ExtractAlpha_NEON; - WebPExtractGreen = ExtractGreen_NEON; -} - -#else // !WEBP_USE_NEON - -WEBP_DSP_INIT_STUB(WebPInitAlphaProcessingNEON) - -#endif // WEBP_USE_NEON diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_sse2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_sse2.c deleted file mode 100644 index 20db6de..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_sse2.c +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Utilities for processing transparent channel. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE2) -#include - -//------------------------------------------------------------------------------ - -static int DispatchAlpha_SSE2(const uint8_t* alpha, int alpha_stride, - int width, int height, - uint8_t* dst, int dst_stride) { - // alpha_and stores an 'and' operation of all the alpha[] values. The final - // value is not 0xff if any of the alpha[] is not equal to 0xff. - uint32_t alpha_and = 0xff; - int i, j; - const __m128i zero = _mm_setzero_si128(); - const __m128i rgb_mask = _mm_set1_epi32(0xffffff00u); // to preserve RGB - const __m128i all_0xff = _mm_set_epi32(0, 0, ~0u, ~0u); - __m128i all_alphas = all_0xff; - - // We must be able to access 3 extra bytes after the last written byte - // 'dst[4 * width - 4]', because we don't know if alpha is the first or the - // last byte of the quadruplet. - const int limit = (width - 1) & ~7; - - for (j = 0; j < height; ++j) { - __m128i* out = (__m128i*)dst; - for (i = 0; i < limit; i += 8) { - // load 8 alpha bytes - const __m128i a0 = _mm_loadl_epi64((const __m128i*)&alpha[i]); - const __m128i a1 = _mm_unpacklo_epi8(a0, zero); - const __m128i a2_lo = _mm_unpacklo_epi16(a1, zero); - const __m128i a2_hi = _mm_unpackhi_epi16(a1, zero); - // load 8 dst pixels (32 bytes) - const __m128i b0_lo = _mm_loadu_si128(out + 0); - const __m128i b0_hi = _mm_loadu_si128(out + 1); - // mask dst alpha values - const __m128i b1_lo = _mm_and_si128(b0_lo, rgb_mask); - const __m128i b1_hi = _mm_and_si128(b0_hi, rgb_mask); - // combine - const __m128i b2_lo = _mm_or_si128(b1_lo, a2_lo); - const __m128i b2_hi = _mm_or_si128(b1_hi, a2_hi); - // store - _mm_storeu_si128(out + 0, b2_lo); - _mm_storeu_si128(out + 1, b2_hi); - // accumulate eight alpha 'and' in parallel - all_alphas = _mm_and_si128(all_alphas, a0); - out += 2; - } - for (; i < width; ++i) { - const uint32_t alpha_value = alpha[i]; - dst[4 * i] = alpha_value; - alpha_and &= alpha_value; - } - alpha += alpha_stride; - dst += dst_stride; - } - // Combine the eight alpha 'and' into a 8-bit mask. - alpha_and &= _mm_movemask_epi8(_mm_cmpeq_epi8(all_alphas, all_0xff)); - return (alpha_and != 0xff); -} - -static void DispatchAlphaToGreen_SSE2(const uint8_t* alpha, int alpha_stride, - int width, int height, - uint32_t* dst, int dst_stride) { - int i, j; - const __m128i zero = _mm_setzero_si128(); - const int limit = width & ~15; - for (j = 0; j < height; ++j) { - for (i = 0; i < limit; i += 16) { // process 16 alpha bytes - const __m128i a0 = _mm_loadu_si128((const __m128i*)&alpha[i]); - const __m128i a1 = _mm_unpacklo_epi8(zero, a0); // note the 'zero' first! - const __m128i b1 = _mm_unpackhi_epi8(zero, a0); - const __m128i a2_lo = _mm_unpacklo_epi16(a1, zero); - const __m128i b2_lo = _mm_unpacklo_epi16(b1, zero); - const __m128i a2_hi = _mm_unpackhi_epi16(a1, zero); - const __m128i b2_hi = _mm_unpackhi_epi16(b1, zero); - _mm_storeu_si128((__m128i*)&dst[i + 0], a2_lo); - _mm_storeu_si128((__m128i*)&dst[i + 4], a2_hi); - _mm_storeu_si128((__m128i*)&dst[i + 8], b2_lo); - _mm_storeu_si128((__m128i*)&dst[i + 12], b2_hi); - } - for (; i < width; ++i) dst[i] = alpha[i] << 8; - alpha += alpha_stride; - dst += dst_stride; - } -} - -static int ExtractAlpha_SSE2(const uint8_t* argb, int argb_stride, - int width, int height, - uint8_t* alpha, int alpha_stride) { - // alpha_and stores an 'and' operation of all the alpha[] values. The final - // value is not 0xff if any of the alpha[] is not equal to 0xff. - uint32_t alpha_and = 0xff; - int i, j; - const __m128i a_mask = _mm_set1_epi32(0xffu); // to preserve alpha - const __m128i all_0xff = _mm_set_epi32(0, 0, ~0u, ~0u); - __m128i all_alphas = all_0xff; - - // We must be able to access 3 extra bytes after the last written byte - // 'src[4 * width - 4]', because we don't know if alpha is the first or the - // last byte of the quadruplet. - const int limit = (width - 1) & ~7; - - for (j = 0; j < height; ++j) { - const __m128i* src = (const __m128i*)argb; - for (i = 0; i < limit; i += 8) { - // load 32 argb bytes - const __m128i a0 = _mm_loadu_si128(src + 0); - const __m128i a1 = _mm_loadu_si128(src + 1); - const __m128i b0 = _mm_and_si128(a0, a_mask); - const __m128i b1 = _mm_and_si128(a1, a_mask); - const __m128i c0 = _mm_packs_epi32(b0, b1); - const __m128i d0 = _mm_packus_epi16(c0, c0); - // store - _mm_storel_epi64((__m128i*)&alpha[i], d0); - // accumulate eight alpha 'and' in parallel - all_alphas = _mm_and_si128(all_alphas, d0); - src += 2; - } - for (; i < width; ++i) { - const uint32_t alpha_value = argb[4 * i]; - alpha[i] = alpha_value; - alpha_and &= alpha_value; - } - argb += argb_stride; - alpha += alpha_stride; - } - // Combine the eight alpha 'and' into a 8-bit mask. - alpha_and &= _mm_movemask_epi8(_mm_cmpeq_epi8(all_alphas, all_0xff)); - return (alpha_and == 0xff); -} - -//------------------------------------------------------------------------------ -// Non-dither premultiplied modes - -#define MULTIPLIER(a) ((a) * 0x8081) -#define PREMULTIPLY(x, m) (((x) * (m)) >> 23) - -// We can't use a 'const int' for the SHUFFLE value, because it has to be an -// immediate in the _mm_shufflexx_epi16() instruction. We really need a macro. -// We use: v / 255 = (v * 0x8081) >> 23, where v = alpha * {r,g,b} is a 16bit -// value. -#define APPLY_ALPHA(RGBX, SHUFFLE) do { \ - const __m128i argb0 = _mm_loadu_si128((const __m128i*)&(RGBX)); \ - const __m128i argb1_lo = _mm_unpacklo_epi8(argb0, zero); \ - const __m128i argb1_hi = _mm_unpackhi_epi8(argb0, zero); \ - const __m128i alpha0_lo = _mm_or_si128(argb1_lo, kMask); \ - const __m128i alpha0_hi = _mm_or_si128(argb1_hi, kMask); \ - const __m128i alpha1_lo = _mm_shufflelo_epi16(alpha0_lo, SHUFFLE); \ - const __m128i alpha1_hi = _mm_shufflelo_epi16(alpha0_hi, SHUFFLE); \ - const __m128i alpha2_lo = _mm_shufflehi_epi16(alpha1_lo, SHUFFLE); \ - const __m128i alpha2_hi = _mm_shufflehi_epi16(alpha1_hi, SHUFFLE); \ - /* alpha2 = [ff a0 a0 a0][ff a1 a1 a1] */ \ - const __m128i A0_lo = _mm_mullo_epi16(alpha2_lo, argb1_lo); \ - const __m128i A0_hi = _mm_mullo_epi16(alpha2_hi, argb1_hi); \ - const __m128i A1_lo = _mm_mulhi_epu16(A0_lo, kMult); \ - const __m128i A1_hi = _mm_mulhi_epu16(A0_hi, kMult); \ - const __m128i A2_lo = _mm_srli_epi16(A1_lo, 7); \ - const __m128i A2_hi = _mm_srli_epi16(A1_hi, 7); \ - const __m128i A3 = _mm_packus_epi16(A2_lo, A2_hi); \ - _mm_storeu_si128((__m128i*)&(RGBX), A3); \ -} while (0) - -static void ApplyAlphaMultiply_SSE2(uint8_t* rgba, int alpha_first, - int w, int h, int stride) { - const __m128i zero = _mm_setzero_si128(); - const __m128i kMult = _mm_set1_epi16(0x8081u); - const __m128i kMask = _mm_set_epi16(0, 0xff, 0xff, 0, 0, 0xff, 0xff, 0); - const int kSpan = 4; - while (h-- > 0) { - uint32_t* const rgbx = (uint32_t*)rgba; - int i; - if (!alpha_first) { - for (i = 0; i + kSpan <= w; i += kSpan) { - APPLY_ALPHA(rgbx[i], _MM_SHUFFLE(2, 3, 3, 3)); - } - } else { - for (i = 0; i + kSpan <= w; i += kSpan) { - APPLY_ALPHA(rgbx[i], _MM_SHUFFLE(0, 0, 0, 1)); - } - } - // Finish with left-overs. - for (; i < w; ++i) { - uint8_t* const rgb = rgba + (alpha_first ? 1 : 0); - const uint8_t* const alpha = rgba + (alpha_first ? 0 : 3); - const uint32_t a = alpha[4 * i]; - if (a != 0xff) { - const uint32_t mult = MULTIPLIER(a); - rgb[4 * i + 0] = PREMULTIPLY(rgb[4 * i + 0], mult); - rgb[4 * i + 1] = PREMULTIPLY(rgb[4 * i + 1], mult); - rgb[4 * i + 2] = PREMULTIPLY(rgb[4 * i + 2], mult); - } - } - rgba += stride; - } -} -#undef MULTIPLIER -#undef PREMULTIPLY - -//------------------------------------------------------------------------------ -// Alpha detection - -static int HasAlpha8b_SSE2(const uint8_t* src, int length) { - const __m128i all_0xff = _mm_set1_epi8(0xff); - int i = 0; - for (; i + 16 <= length; i += 16) { - const __m128i v = _mm_loadu_si128((const __m128i*)(src + i)); - const __m128i bits = _mm_cmpeq_epi8(v, all_0xff); - const int mask = _mm_movemask_epi8(bits); - if (mask != 0xffff) return 1; - } - for (; i < length; ++i) if (src[i] != 0xff) return 1; - return 0; -} - -static int HasAlpha32b_SSE2(const uint8_t* src, int length) { - const __m128i alpha_mask = _mm_set1_epi32(0xff); - const __m128i all_0xff = _mm_set1_epi8(0xff); - int i = 0; - // We don't know if we can access the last 3 bytes after the last alpha - // value 'src[4 * length - 4]' (because we don't know if alpha is the first - // or the last byte of the quadruplet). Hence the '-3' protection below. - length = length * 4 - 3; // size in bytes - for (; i + 64 <= length; i += 64) { - const __m128i a0 = _mm_loadu_si128((const __m128i*)(src + i + 0)); - const __m128i a1 = _mm_loadu_si128((const __m128i*)(src + i + 16)); - const __m128i a2 = _mm_loadu_si128((const __m128i*)(src + i + 32)); - const __m128i a3 = _mm_loadu_si128((const __m128i*)(src + i + 48)); - const __m128i b0 = _mm_and_si128(a0, alpha_mask); - const __m128i b1 = _mm_and_si128(a1, alpha_mask); - const __m128i b2 = _mm_and_si128(a2, alpha_mask); - const __m128i b3 = _mm_and_si128(a3, alpha_mask); - const __m128i c0 = _mm_packs_epi32(b0, b1); - const __m128i c1 = _mm_packs_epi32(b2, b3); - const __m128i d = _mm_packus_epi16(c0, c1); - const __m128i bits = _mm_cmpeq_epi8(d, all_0xff); - const int mask = _mm_movemask_epi8(bits); - if (mask != 0xffff) return 1; - } - for (; i + 32 <= length; i += 32) { - const __m128i a0 = _mm_loadu_si128((const __m128i*)(src + i + 0)); - const __m128i a1 = _mm_loadu_si128((const __m128i*)(src + i + 16)); - const __m128i b0 = _mm_and_si128(a0, alpha_mask); - const __m128i b1 = _mm_and_si128(a1, alpha_mask); - const __m128i c = _mm_packs_epi32(b0, b1); - const __m128i d = _mm_packus_epi16(c, c); - const __m128i bits = _mm_cmpeq_epi8(d, all_0xff); - const int mask = _mm_movemask_epi8(bits); - if (mask != 0xffff) return 1; - } - for (; i <= length; i += 4) if (src[i] != 0xff) return 1; - return 0; -} - -// ----------------------------------------------------------------------------- -// Apply alpha value to rows - -static void MultARGBRow_SSE2(uint32_t* const ptr, int width, int inverse) { - int x = 0; - if (!inverse) { - const int kSpan = 2; - const __m128i zero = _mm_setzero_si128(); - const __m128i k128 = _mm_set1_epi16(128); - const __m128i kMult = _mm_set1_epi16(0x0101); - const __m128i kMask = _mm_set_epi16(0, 0xff, 0, 0, 0, 0xff, 0, 0); - for (x = 0; x + kSpan <= width; x += kSpan) { - // To compute 'result = (int)(a * x / 255. + .5)', we use: - // tmp = a * v + 128, result = (tmp * 0x0101u) >> 16 - const __m128i A0 = _mm_loadl_epi64((const __m128i*)&ptr[x]); - const __m128i A1 = _mm_unpacklo_epi8(A0, zero); - const __m128i A2 = _mm_or_si128(A1, kMask); - const __m128i A3 = _mm_shufflelo_epi16(A2, _MM_SHUFFLE(2, 3, 3, 3)); - const __m128i A4 = _mm_shufflehi_epi16(A3, _MM_SHUFFLE(2, 3, 3, 3)); - // here, A4 = [ff a0 a0 a0][ff a1 a1 a1] - const __m128i A5 = _mm_mullo_epi16(A4, A1); - const __m128i A6 = _mm_add_epi16(A5, k128); - const __m128i A7 = _mm_mulhi_epu16(A6, kMult); - const __m128i A10 = _mm_packus_epi16(A7, zero); - _mm_storel_epi64((__m128i*)&ptr[x], A10); - } - } - width -= x; - if (width > 0) WebPMultARGBRow_C(ptr + x, width, inverse); -} - -static void MultRow_SSE2(uint8_t* const ptr, const uint8_t* const alpha, - int width, int inverse) { - int x = 0; - if (!inverse) { - const __m128i zero = _mm_setzero_si128(); - const __m128i k128 = _mm_set1_epi16(128); - const __m128i kMult = _mm_set1_epi16(0x0101); - for (x = 0; x + 8 <= width; x += 8) { - const __m128i v0 = _mm_loadl_epi64((__m128i*)&ptr[x]); - const __m128i a0 = _mm_loadl_epi64((const __m128i*)&alpha[x]); - const __m128i v1 = _mm_unpacklo_epi8(v0, zero); - const __m128i a1 = _mm_unpacklo_epi8(a0, zero); - const __m128i v2 = _mm_mullo_epi16(v1, a1); - const __m128i v3 = _mm_add_epi16(v2, k128); - const __m128i v4 = _mm_mulhi_epu16(v3, kMult); - const __m128i v5 = _mm_packus_epi16(v4, zero); - _mm_storel_epi64((__m128i*)&ptr[x], v5); - } - } - width -= x; - if (width > 0) WebPMultRow_C(ptr + x, alpha + x, width, inverse); -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPInitAlphaProcessingSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitAlphaProcessingSSE2(void) { - WebPMultARGBRow = MultARGBRow_SSE2; - WebPMultRow = MultRow_SSE2; - WebPApplyAlphaMultiply = ApplyAlphaMultiply_SSE2; - WebPDispatchAlpha = DispatchAlpha_SSE2; - WebPDispatchAlphaToGreen = DispatchAlphaToGreen_SSE2; - WebPExtractAlpha = ExtractAlpha_SSE2; - - WebPHasAlpha8b = HasAlpha8b_SSE2; - WebPHasAlpha32b = HasAlpha32b_SSE2; -} - -#else // !WEBP_USE_SSE2 - -WEBP_DSP_INIT_STUB(WebPInitAlphaProcessingSSE2) - -#endif // WEBP_USE_SSE2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_sse41.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_sse41.c deleted file mode 100644 index b793b41..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/alpha_processing_sse41.c +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Utilities for processing transparent channel, SSE4.1 variant. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE41) - -#include - -//------------------------------------------------------------------------------ - -static int ExtractAlpha_SSE41(const uint8_t* argb, int argb_stride, - int width, int height, - uint8_t* alpha, int alpha_stride) { - // alpha_and stores an 'and' operation of all the alpha[] values. The final - // value is not 0xff if any of the alpha[] is not equal to 0xff. - uint32_t alpha_and = 0xff; - int i, j; - const __m128i all_0xff = _mm_set1_epi32(~0u); - __m128i all_alphas = all_0xff; - - // We must be able to access 3 extra bytes after the last written byte - // 'src[4 * width - 4]', because we don't know if alpha is the first or the - // last byte of the quadruplet. - const int limit = (width - 1) & ~15; - const __m128i kCstAlpha0 = _mm_set_epi8(-1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 12, 8, 4, 0); - const __m128i kCstAlpha1 = _mm_set_epi8(-1, -1, -1, -1, -1, -1, -1, -1, - 12, 8, 4, 0, -1, -1, -1, -1); - const __m128i kCstAlpha2 = _mm_set_epi8(-1, -1, -1, -1, 12, 8, 4, 0, - -1, -1, -1, -1, -1, -1, -1, -1); - const __m128i kCstAlpha3 = _mm_set_epi8(12, 8, 4, 0, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1); - for (j = 0; j < height; ++j) { - const __m128i* src = (const __m128i*)argb; - for (i = 0; i < limit; i += 16) { - // load 64 argb bytes - const __m128i a0 = _mm_loadu_si128(src + 0); - const __m128i a1 = _mm_loadu_si128(src + 1); - const __m128i a2 = _mm_loadu_si128(src + 2); - const __m128i a3 = _mm_loadu_si128(src + 3); - const __m128i b0 = _mm_shuffle_epi8(a0, kCstAlpha0); - const __m128i b1 = _mm_shuffle_epi8(a1, kCstAlpha1); - const __m128i b2 = _mm_shuffle_epi8(a2, kCstAlpha2); - const __m128i b3 = _mm_shuffle_epi8(a3, kCstAlpha3); - const __m128i c0 = _mm_or_si128(b0, b1); - const __m128i c1 = _mm_or_si128(b2, b3); - const __m128i d0 = _mm_or_si128(c0, c1); - // store - _mm_storeu_si128((__m128i*)&alpha[i], d0); - // accumulate sixteen alpha 'and' in parallel - all_alphas = _mm_and_si128(all_alphas, d0); - src += 4; - } - for (; i < width; ++i) { - const uint32_t alpha_value = argb[4 * i]; - alpha[i] = alpha_value; - alpha_and &= alpha_value; - } - argb += argb_stride; - alpha += alpha_stride; - } - // Combine the sixteen alpha 'and' into an 8-bit mask. - alpha_and |= 0xff00u; // pretend the upper bits [8..15] were tested ok. - alpha_and &= _mm_movemask_epi8(_mm_cmpeq_epi8(all_alphas, all_0xff)); - return (alpha_and == 0xffffu); -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPInitAlphaProcessingSSE41(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitAlphaProcessingSSE41(void) { - WebPExtractAlpha = ExtractAlpha_SSE41; -} - -#else // !WEBP_USE_SSE41 - -WEBP_DSP_INIT_STUB(WebPInitAlphaProcessingSSE41) - -#endif // WEBP_USE_SSE41 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/common_sse2.h b/Dependencies/FreeImage/Source/LibWebP/src/dsp/common_sse2.h deleted file mode 100644 index 6d001d5..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/common_sse2.h +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE2 code common to several files. -// -// Author: Vincent Rabaud (vrabaud@google.com) - -#ifndef WEBP_DSP_COMMON_SSE2_H_ -#define WEBP_DSP_COMMON_SSE2_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(WEBP_USE_SSE2) - -#include - -//------------------------------------------------------------------------------ -// Quite useful macro for debugging. Left here for convenience. - -#if 0 -#include -static WEBP_INLINE void PrintReg(const __m128i r, const char* const name, - int size) { - int n; - union { - __m128i r; - uint8_t i8[16]; - uint16_t i16[8]; - uint32_t i32[4]; - uint64_t i64[2]; - } tmp; - tmp.r = r; - fprintf(stderr, "%s\t: ", name); - if (size == 8) { - for (n = 0; n < 16; ++n) fprintf(stderr, "%.2x ", tmp.i8[n]); - } else if (size == 16) { - for (n = 0; n < 8; ++n) fprintf(stderr, "%.4x ", tmp.i16[n]); - } else if (size == 32) { - for (n = 0; n < 4; ++n) fprintf(stderr, "%.8x ", tmp.i32[n]); - } else { - for (n = 0; n < 2; ++n) fprintf(stderr, "%.16lx ", tmp.i64[n]); - } - fprintf(stderr, "\n"); -} -#endif - -//------------------------------------------------------------------------------ -// Math functions. - -// Return the sum of all the 8b in the register. -static WEBP_INLINE int VP8HorizontalAdd8b(const __m128i* const a) { - const __m128i zero = _mm_setzero_si128(); - const __m128i sad8x2 = _mm_sad_epu8(*a, zero); - // sum the two sads: sad8x2[0:1] + sad8x2[8:9] - const __m128i sum = _mm_add_epi32(sad8x2, _mm_shuffle_epi32(sad8x2, 2)); - return _mm_cvtsi128_si32(sum); -} - -// Transpose two 4x4 16b matrices horizontally stored in registers. -static WEBP_INLINE void VP8Transpose_2_4x4_16b( - const __m128i* const in0, const __m128i* const in1, - const __m128i* const in2, const __m128i* const in3, __m128i* const out0, - __m128i* const out1, __m128i* const out2, __m128i* const out3) { - // Transpose the two 4x4. - // a00 a01 a02 a03 b00 b01 b02 b03 - // a10 a11 a12 a13 b10 b11 b12 b13 - // a20 a21 a22 a23 b20 b21 b22 b23 - // a30 a31 a32 a33 b30 b31 b32 b33 - const __m128i transpose0_0 = _mm_unpacklo_epi16(*in0, *in1); - const __m128i transpose0_1 = _mm_unpacklo_epi16(*in2, *in3); - const __m128i transpose0_2 = _mm_unpackhi_epi16(*in0, *in1); - const __m128i transpose0_3 = _mm_unpackhi_epi16(*in2, *in3); - // a00 a10 a01 a11 a02 a12 a03 a13 - // a20 a30 a21 a31 a22 a32 a23 a33 - // b00 b10 b01 b11 b02 b12 b03 b13 - // b20 b30 b21 b31 b22 b32 b23 b33 - const __m128i transpose1_0 = _mm_unpacklo_epi32(transpose0_0, transpose0_1); - const __m128i transpose1_1 = _mm_unpacklo_epi32(transpose0_2, transpose0_3); - const __m128i transpose1_2 = _mm_unpackhi_epi32(transpose0_0, transpose0_1); - const __m128i transpose1_3 = _mm_unpackhi_epi32(transpose0_2, transpose0_3); - // a00 a10 a20 a30 a01 a11 a21 a31 - // b00 b10 b20 b30 b01 b11 b21 b31 - // a02 a12 a22 a32 a03 a13 a23 a33 - // b02 b12 a22 b32 b03 b13 b23 b33 - *out0 = _mm_unpacklo_epi64(transpose1_0, transpose1_1); - *out1 = _mm_unpackhi_epi64(transpose1_0, transpose1_1); - *out2 = _mm_unpacklo_epi64(transpose1_2, transpose1_3); - *out3 = _mm_unpackhi_epi64(transpose1_2, transpose1_3); - // a00 a10 a20 a30 b00 b10 b20 b30 - // a01 a11 a21 a31 b01 b11 b21 b31 - // a02 a12 a22 a32 b02 b12 b22 b32 - // a03 a13 a23 a33 b03 b13 b23 b33 -} - -//------------------------------------------------------------------------------ -// Channel mixing. - -// Function used several times in VP8PlanarTo24b. -// It samples the in buffer as follows: one every two unsigned char is stored -// at the beginning of the buffer, while the other half is stored at the end. -#define VP8PlanarTo24bHelper(IN, OUT) \ - do { \ - const __m128i v_mask = _mm_set1_epi16(0x00ff); \ - /* Take one every two upper 8b values.*/ \ - (OUT##0) = _mm_packus_epi16(_mm_and_si128((IN##0), v_mask), \ - _mm_and_si128((IN##1), v_mask)); \ - (OUT##1) = _mm_packus_epi16(_mm_and_si128((IN##2), v_mask), \ - _mm_and_si128((IN##3), v_mask)); \ - (OUT##2) = _mm_packus_epi16(_mm_and_si128((IN##4), v_mask), \ - _mm_and_si128((IN##5), v_mask)); \ - /* Take one every two lower 8b values.*/ \ - (OUT##3) = _mm_packus_epi16(_mm_srli_epi16((IN##0), 8), \ - _mm_srli_epi16((IN##1), 8)); \ - (OUT##4) = _mm_packus_epi16(_mm_srli_epi16((IN##2), 8), \ - _mm_srli_epi16((IN##3), 8)); \ - (OUT##5) = _mm_packus_epi16(_mm_srli_epi16((IN##4), 8), \ - _mm_srli_epi16((IN##5), 8)); \ - } while (0) - -// Pack the planar buffers -// rrrr... rrrr... gggg... gggg... bbbb... bbbb.... -// triplet by triplet in the output buffer rgb as rgbrgbrgbrgb ... -static WEBP_INLINE void VP8PlanarTo24b_SSE2( - __m128i* const in0, __m128i* const in1, __m128i* const in2, - __m128i* const in3, __m128i* const in4, __m128i* const in5) { - // The input is 6 registers of sixteen 8b but for the sake of explanation, - // let's take 6 registers of four 8b values. - // To pack, we will keep taking one every two 8b integer and move it - // around as follows: - // Input: - // r0r1r2r3 | r4r5r6r7 | g0g1g2g3 | g4g5g6g7 | b0b1b2b3 | b4b5b6b7 - // Split the 6 registers in two sets of 3 registers: the first set as the even - // 8b bytes, the second the odd ones: - // r0r2r4r6 | g0g2g4g6 | b0b2b4b6 | r1r3r5r7 | g1g3g5g7 | b1b3b5b7 - // Repeat the same permutations twice more: - // r0r4g0g4 | b0b4r1r5 | g1g5b1b5 | r2r6g2g6 | b2b6r3r7 | g3g7b3b7 - // r0g0b0r1 | g1b1r2g2 | b2r3g3b3 | r4g4b4r5 | g5b5r6g6 | b6r7g7b7 - __m128i tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; - VP8PlanarTo24bHelper(*in, tmp); - VP8PlanarTo24bHelper(tmp, *in); - VP8PlanarTo24bHelper(*in, tmp); - // We need to do it two more times than the example as we have sixteen bytes. - { - __m128i out0, out1, out2, out3, out4, out5; - VP8PlanarTo24bHelper(tmp, out); - VP8PlanarTo24bHelper(out, *in); - } -} - -#undef VP8PlanarTo24bHelper - -// Convert four packed four-channel buffers like argbargbargbargb... into the -// split channels aaaaa ... rrrr ... gggg .... bbbbb ...... -static WEBP_INLINE void VP8L32bToPlanar_SSE2(__m128i* const in0, - __m128i* const in1, - __m128i* const in2, - __m128i* const in3) { - // Column-wise transpose. - const __m128i A0 = _mm_unpacklo_epi8(*in0, *in1); - const __m128i A1 = _mm_unpackhi_epi8(*in0, *in1); - const __m128i A2 = _mm_unpacklo_epi8(*in2, *in3); - const __m128i A3 = _mm_unpackhi_epi8(*in2, *in3); - const __m128i B0 = _mm_unpacklo_epi8(A0, A1); - const __m128i B1 = _mm_unpackhi_epi8(A0, A1); - const __m128i B2 = _mm_unpacklo_epi8(A2, A3); - const __m128i B3 = _mm_unpackhi_epi8(A2, A3); - // C0 = g7 g6 ... g1 g0 | b7 b6 ... b1 b0 - // C1 = a7 a6 ... a1 a0 | r7 r6 ... r1 r0 - const __m128i C0 = _mm_unpacklo_epi8(B0, B1); - const __m128i C1 = _mm_unpackhi_epi8(B0, B1); - const __m128i C2 = _mm_unpacklo_epi8(B2, B3); - const __m128i C3 = _mm_unpackhi_epi8(B2, B3); - // Gather the channels. - *in0 = _mm_unpackhi_epi64(C1, C3); - *in1 = _mm_unpacklo_epi64(C1, C3); - *in2 = _mm_unpackhi_epi64(C0, C2); - *in3 = _mm_unpacklo_epi64(C0, C2); -} - -#endif // WEBP_USE_SSE2 - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // WEBP_DSP_COMMON_SSE2_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/common_sse41.h b/Dependencies/FreeImage/Source/LibWebP/src/dsp/common_sse41.h deleted file mode 100644 index d6d0c9c..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/common_sse41.h +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE4 code common to several files. -// -// Author: Vincent Rabaud (vrabaud@google.com) - -#ifndef WEBP_DSP_COMMON_SSE41_H_ -#define WEBP_DSP_COMMON_SSE41_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(WEBP_USE_SSE41) -#include - -//------------------------------------------------------------------------------ -// Channel mixing. -// Shuffles the input buffer as A0 0 0 A1 0 0 A2 ... -#define WEBP_SSE41_SHUFF(OUT, IN0, IN1) \ - OUT##0 = _mm_shuffle_epi8(*IN0, shuff0); \ - OUT##1 = _mm_shuffle_epi8(*IN0, shuff1); \ - OUT##2 = _mm_shuffle_epi8(*IN0, shuff2); \ - OUT##3 = _mm_shuffle_epi8(*IN1, shuff0); \ - OUT##4 = _mm_shuffle_epi8(*IN1, shuff1); \ - OUT##5 = _mm_shuffle_epi8(*IN1, shuff2); - -// Pack the planar buffers -// rrrr... rrrr... gggg... gggg... bbbb... bbbb.... -// triplet by triplet in the output buffer rgb as rgbrgbrgbrgb ... -static WEBP_INLINE void VP8PlanarTo24b_SSE41( - __m128i* const in0, __m128i* const in1, __m128i* const in2, - __m128i* const in3, __m128i* const in4, __m128i* const in5) { - __m128i R0, R1, R2, R3, R4, R5; - __m128i G0, G1, G2, G3, G4, G5; - __m128i B0, B1, B2, B3, B4, B5; - - // Process R. - { - const __m128i shuff0 = _mm_set_epi8( - 5, -1, -1, 4, -1, -1, 3, -1, -1, 2, -1, -1, 1, -1, -1, 0); - const __m128i shuff1 = _mm_set_epi8( - -1, 10, -1, -1, 9, -1, -1, 8, -1, -1, 7, -1, -1, 6, -1, -1); - const __m128i shuff2 = _mm_set_epi8( - -1, -1, 15, -1, -1, 14, -1, -1, 13, -1, -1, 12, -1, -1, 11, -1); - WEBP_SSE41_SHUFF(R, in0, in1) - } - - // Process G. - { - // Same as before, just shifted to the left by one and including the right - // padding. - const __m128i shuff0 = _mm_set_epi8( - -1, -1, 4, -1, -1, 3, -1, -1, 2, -1, -1, 1, -1, -1, 0, -1); - const __m128i shuff1 = _mm_set_epi8( - 10, -1, -1, 9, -1, -1, 8, -1, -1, 7, -1, -1, 6, -1, -1, 5); - const __m128i shuff2 = _mm_set_epi8( - -1, 15, -1, -1, 14, -1, -1, 13, -1, -1, 12, -1, -1, 11, -1, -1); - WEBP_SSE41_SHUFF(G, in2, in3) - } - - // Process B. - { - const __m128i shuff0 = _mm_set_epi8( - -1, 4, -1, -1, 3, -1, -1, 2, -1, -1, 1, -1, -1, 0, -1, -1); - const __m128i shuff1 = _mm_set_epi8( - -1, -1, 9, -1, -1, 8, -1, -1, 7, -1, -1, 6, -1, -1, 5, -1); - const __m128i shuff2 = _mm_set_epi8( - 15, -1, -1, 14, -1, -1, 13, -1, -1, 12, -1, -1, 11, -1, -1, 10); - WEBP_SSE41_SHUFF(B, in4, in5) - } - - // OR the different channels. - { - const __m128i RG0 = _mm_or_si128(R0, G0); - const __m128i RG1 = _mm_or_si128(R1, G1); - const __m128i RG2 = _mm_or_si128(R2, G2); - const __m128i RG3 = _mm_or_si128(R3, G3); - const __m128i RG4 = _mm_or_si128(R4, G4); - const __m128i RG5 = _mm_or_si128(R5, G5); - *in0 = _mm_or_si128(RG0, B0); - *in1 = _mm_or_si128(RG1, B1); - *in2 = _mm_or_si128(RG2, B2); - *in3 = _mm_or_si128(RG3, B3); - *in4 = _mm_or_si128(RG4, B4); - *in5 = _mm_or_si128(RG5, B5); - } -} - -#undef WEBP_SSE41_SHUFF - -// Convert four packed four-channel buffers like argbargbargbargb... into the -// split channels aaaaa ... rrrr ... gggg .... bbbbb ...... -static WEBP_INLINE void VP8L32bToPlanar_SSE41(__m128i* const in0, - __m128i* const in1, - __m128i* const in2, - __m128i* const in3) { - // aaaarrrrggggbbbb - const __m128i shuff0 = - _mm_set_epi8(15, 11, 7, 3, 14, 10, 6, 2, 13, 9, 5, 1, 12, 8, 4, 0); - const __m128i A0 = _mm_shuffle_epi8(*in0, shuff0); - const __m128i A1 = _mm_shuffle_epi8(*in1, shuff0); - const __m128i A2 = _mm_shuffle_epi8(*in2, shuff0); - const __m128i A3 = _mm_shuffle_epi8(*in3, shuff0); - // A0A1R0R1 - // G0G1B0B1 - // A2A3R2R3 - // G0G1B0B1 - const __m128i B0 = _mm_unpacklo_epi32(A0, A1); - const __m128i B1 = _mm_unpackhi_epi32(A0, A1); - const __m128i B2 = _mm_unpacklo_epi32(A2, A3); - const __m128i B3 = _mm_unpackhi_epi32(A2, A3); - *in3 = _mm_unpacklo_epi64(B0, B2); - *in2 = _mm_unpackhi_epi64(B0, B2); - *in1 = _mm_unpacklo_epi64(B1, B3); - *in0 = _mm_unpackhi_epi64(B1, B3); -} - -#endif // WEBP_USE_SSE41 - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // WEBP_DSP_COMMON_SSE41_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost.c deleted file mode 100644 index df6de5a..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost.c +++ /dev/null @@ -1,405 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" -#include "src/enc/cost_enc.h" - -//------------------------------------------------------------------------------ -// Boolean-cost cost table - -const uint16_t VP8EntropyCost[256] = { - 1792, 1792, 1792, 1536, 1536, 1408, 1366, 1280, 1280, 1216, - 1178, 1152, 1110, 1076, 1061, 1024, 1024, 992, 968, 951, - 939, 911, 896, 878, 871, 854, 838, 820, 811, 794, - 786, 768, 768, 752, 740, 732, 720, 709, 704, 690, - 683, 672, 666, 655, 647, 640, 631, 622, 615, 607, - 598, 592, 586, 576, 572, 564, 559, 555, 547, 541, - 534, 528, 522, 512, 512, 504, 500, 494, 488, 483, - 477, 473, 467, 461, 458, 452, 448, 443, 438, 434, - 427, 424, 419, 415, 410, 406, 403, 399, 394, 390, - 384, 384, 377, 374, 370, 366, 362, 359, 355, 351, - 347, 342, 342, 336, 333, 330, 326, 323, 320, 316, - 312, 308, 305, 302, 299, 296, 293, 288, 287, 283, - 280, 277, 274, 272, 268, 266, 262, 256, 256, 256, - 251, 248, 245, 242, 240, 237, 234, 232, 228, 226, - 223, 221, 218, 216, 214, 211, 208, 205, 203, 201, - 198, 196, 192, 191, 188, 187, 183, 181, 179, 176, - 175, 171, 171, 168, 165, 163, 160, 159, 156, 154, - 152, 150, 148, 146, 144, 142, 139, 138, 135, 133, - 131, 128, 128, 125, 123, 121, 119, 117, 115, 113, - 111, 110, 107, 105, 103, 102, 100, 98, 96, 94, - 92, 91, 89, 86, 86, 83, 82, 80, 77, 76, - 74, 73, 71, 69, 67, 66, 64, 63, 61, 59, - 57, 55, 54, 52, 51, 49, 47, 46, 44, 43, - 41, 40, 38, 36, 35, 33, 32, 30, 29, 27, - 25, 24, 22, 21, 19, 18, 16, 15, 13, 12, - 10, 9, 7, 6, 4, 3 -}; - -//------------------------------------------------------------------------------ -// Level cost tables - -// fixed costs for coding levels, deduce from the coding tree. -// This is only the part that doesn't depend on the probability state. -const uint16_t VP8LevelFixedCosts[MAX_LEVEL + 1] = { - 0, 256, 256, 256, 256, 432, 618, 630, - 731, 640, 640, 828, 901, 948, 1021, 1101, - 1174, 1221, 1294, 1042, 1085, 1115, 1158, 1202, - 1245, 1275, 1318, 1337, 1380, 1410, 1453, 1497, - 1540, 1570, 1613, 1280, 1295, 1317, 1332, 1358, - 1373, 1395, 1410, 1454, 1469, 1491, 1506, 1532, - 1547, 1569, 1584, 1601, 1616, 1638, 1653, 1679, - 1694, 1716, 1731, 1775, 1790, 1812, 1827, 1853, - 1868, 1890, 1905, 1727, 1733, 1742, 1748, 1759, - 1765, 1774, 1780, 1800, 1806, 1815, 1821, 1832, - 1838, 1847, 1853, 1878, 1884, 1893, 1899, 1910, - 1916, 1925, 1931, 1951, 1957, 1966, 1972, 1983, - 1989, 1998, 2004, 2027, 2033, 2042, 2048, 2059, - 2065, 2074, 2080, 2100, 2106, 2115, 2121, 2132, - 2138, 2147, 2153, 2178, 2184, 2193, 2199, 2210, - 2216, 2225, 2231, 2251, 2257, 2266, 2272, 2283, - 2289, 2298, 2304, 2168, 2174, 2183, 2189, 2200, - 2206, 2215, 2221, 2241, 2247, 2256, 2262, 2273, - 2279, 2288, 2294, 2319, 2325, 2334, 2340, 2351, - 2357, 2366, 2372, 2392, 2398, 2407, 2413, 2424, - 2430, 2439, 2445, 2468, 2474, 2483, 2489, 2500, - 2506, 2515, 2521, 2541, 2547, 2556, 2562, 2573, - 2579, 2588, 2594, 2619, 2625, 2634, 2640, 2651, - 2657, 2666, 2672, 2692, 2698, 2707, 2713, 2724, - 2730, 2739, 2745, 2540, 2546, 2555, 2561, 2572, - 2578, 2587, 2593, 2613, 2619, 2628, 2634, 2645, - 2651, 2660, 2666, 2691, 2697, 2706, 2712, 2723, - 2729, 2738, 2744, 2764, 2770, 2779, 2785, 2796, - 2802, 2811, 2817, 2840, 2846, 2855, 2861, 2872, - 2878, 2887, 2893, 2913, 2919, 2928, 2934, 2945, - 2951, 2960, 2966, 2991, 2997, 3006, 3012, 3023, - 3029, 3038, 3044, 3064, 3070, 3079, 3085, 3096, - 3102, 3111, 3117, 2981, 2987, 2996, 3002, 3013, - 3019, 3028, 3034, 3054, 3060, 3069, 3075, 3086, - 3092, 3101, 3107, 3132, 3138, 3147, 3153, 3164, - 3170, 3179, 3185, 3205, 3211, 3220, 3226, 3237, - 3243, 3252, 3258, 3281, 3287, 3296, 3302, 3313, - 3319, 3328, 3334, 3354, 3360, 3369, 3375, 3386, - 3392, 3401, 3407, 3432, 3438, 3447, 3453, 3464, - 3470, 3479, 3485, 3505, 3511, 3520, 3526, 3537, - 3543, 3552, 3558, 2816, 2822, 2831, 2837, 2848, - 2854, 2863, 2869, 2889, 2895, 2904, 2910, 2921, - 2927, 2936, 2942, 2967, 2973, 2982, 2988, 2999, - 3005, 3014, 3020, 3040, 3046, 3055, 3061, 3072, - 3078, 3087, 3093, 3116, 3122, 3131, 3137, 3148, - 3154, 3163, 3169, 3189, 3195, 3204, 3210, 3221, - 3227, 3236, 3242, 3267, 3273, 3282, 3288, 3299, - 3305, 3314, 3320, 3340, 3346, 3355, 3361, 3372, - 3378, 3387, 3393, 3257, 3263, 3272, 3278, 3289, - 3295, 3304, 3310, 3330, 3336, 3345, 3351, 3362, - 3368, 3377, 3383, 3408, 3414, 3423, 3429, 3440, - 3446, 3455, 3461, 3481, 3487, 3496, 3502, 3513, - 3519, 3528, 3534, 3557, 3563, 3572, 3578, 3589, - 3595, 3604, 3610, 3630, 3636, 3645, 3651, 3662, - 3668, 3677, 3683, 3708, 3714, 3723, 3729, 3740, - 3746, 3755, 3761, 3781, 3787, 3796, 3802, 3813, - 3819, 3828, 3834, 3629, 3635, 3644, 3650, 3661, - 3667, 3676, 3682, 3702, 3708, 3717, 3723, 3734, - 3740, 3749, 3755, 3780, 3786, 3795, 3801, 3812, - 3818, 3827, 3833, 3853, 3859, 3868, 3874, 3885, - 3891, 3900, 3906, 3929, 3935, 3944, 3950, 3961, - 3967, 3976, 3982, 4002, 4008, 4017, 4023, 4034, - 4040, 4049, 4055, 4080, 4086, 4095, 4101, 4112, - 4118, 4127, 4133, 4153, 4159, 4168, 4174, 4185, - 4191, 4200, 4206, 4070, 4076, 4085, 4091, 4102, - 4108, 4117, 4123, 4143, 4149, 4158, 4164, 4175, - 4181, 4190, 4196, 4221, 4227, 4236, 4242, 4253, - 4259, 4268, 4274, 4294, 4300, 4309, 4315, 4326, - 4332, 4341, 4347, 4370, 4376, 4385, 4391, 4402, - 4408, 4417, 4423, 4443, 4449, 4458, 4464, 4475, - 4481, 4490, 4496, 4521, 4527, 4536, 4542, 4553, - 4559, 4568, 4574, 4594, 4600, 4609, 4615, 4626, - 4632, 4641, 4647, 3515, 3521, 3530, 3536, 3547, - 3553, 3562, 3568, 3588, 3594, 3603, 3609, 3620, - 3626, 3635, 3641, 3666, 3672, 3681, 3687, 3698, - 3704, 3713, 3719, 3739, 3745, 3754, 3760, 3771, - 3777, 3786, 3792, 3815, 3821, 3830, 3836, 3847, - 3853, 3862, 3868, 3888, 3894, 3903, 3909, 3920, - 3926, 3935, 3941, 3966, 3972, 3981, 3987, 3998, - 4004, 4013, 4019, 4039, 4045, 4054, 4060, 4071, - 4077, 4086, 4092, 3956, 3962, 3971, 3977, 3988, - 3994, 4003, 4009, 4029, 4035, 4044, 4050, 4061, - 4067, 4076, 4082, 4107, 4113, 4122, 4128, 4139, - 4145, 4154, 4160, 4180, 4186, 4195, 4201, 4212, - 4218, 4227, 4233, 4256, 4262, 4271, 4277, 4288, - 4294, 4303, 4309, 4329, 4335, 4344, 4350, 4361, - 4367, 4376, 4382, 4407, 4413, 4422, 4428, 4439, - 4445, 4454, 4460, 4480, 4486, 4495, 4501, 4512, - 4518, 4527, 4533, 4328, 4334, 4343, 4349, 4360, - 4366, 4375, 4381, 4401, 4407, 4416, 4422, 4433, - 4439, 4448, 4454, 4479, 4485, 4494, 4500, 4511, - 4517, 4526, 4532, 4552, 4558, 4567, 4573, 4584, - 4590, 4599, 4605, 4628, 4634, 4643, 4649, 4660, - 4666, 4675, 4681, 4701, 4707, 4716, 4722, 4733, - 4739, 4748, 4754, 4779, 4785, 4794, 4800, 4811, - 4817, 4826, 4832, 4852, 4858, 4867, 4873, 4884, - 4890, 4899, 4905, 4769, 4775, 4784, 4790, 4801, - 4807, 4816, 4822, 4842, 4848, 4857, 4863, 4874, - 4880, 4889, 4895, 4920, 4926, 4935, 4941, 4952, - 4958, 4967, 4973, 4993, 4999, 5008, 5014, 5025, - 5031, 5040, 5046, 5069, 5075, 5084, 5090, 5101, - 5107, 5116, 5122, 5142, 5148, 5157, 5163, 5174, - 5180, 5189, 5195, 5220, 5226, 5235, 5241, 5252, - 5258, 5267, 5273, 5293, 5299, 5308, 5314, 5325, - 5331, 5340, 5346, 4604, 4610, 4619, 4625, 4636, - 4642, 4651, 4657, 4677, 4683, 4692, 4698, 4709, - 4715, 4724, 4730, 4755, 4761, 4770, 4776, 4787, - 4793, 4802, 4808, 4828, 4834, 4843, 4849, 4860, - 4866, 4875, 4881, 4904, 4910, 4919, 4925, 4936, - 4942, 4951, 4957, 4977, 4983, 4992, 4998, 5009, - 5015, 5024, 5030, 5055, 5061, 5070, 5076, 5087, - 5093, 5102, 5108, 5128, 5134, 5143, 5149, 5160, - 5166, 5175, 5181, 5045, 5051, 5060, 5066, 5077, - 5083, 5092, 5098, 5118, 5124, 5133, 5139, 5150, - 5156, 5165, 5171, 5196, 5202, 5211, 5217, 5228, - 5234, 5243, 5249, 5269, 5275, 5284, 5290, 5301, - 5307, 5316, 5322, 5345, 5351, 5360, 5366, 5377, - 5383, 5392, 5398, 5418, 5424, 5433, 5439, 5450, - 5456, 5465, 5471, 5496, 5502, 5511, 5517, 5528, - 5534, 5543, 5549, 5569, 5575, 5584, 5590, 5601, - 5607, 5616, 5622, 5417, 5423, 5432, 5438, 5449, - 5455, 5464, 5470, 5490, 5496, 5505, 5511, 5522, - 5528, 5537, 5543, 5568, 5574, 5583, 5589, 5600, - 5606, 5615, 5621, 5641, 5647, 5656, 5662, 5673, - 5679, 5688, 5694, 5717, 5723, 5732, 5738, 5749, - 5755, 5764, 5770, 5790, 5796, 5805, 5811, 5822, - 5828, 5837, 5843, 5868, 5874, 5883, 5889, 5900, - 5906, 5915, 5921, 5941, 5947, 5956, 5962, 5973, - 5979, 5988, 5994, 5858, 5864, 5873, 5879, 5890, - 5896, 5905, 5911, 5931, 5937, 5946, 5952, 5963, - 5969, 5978, 5984, 6009, 6015, 6024, 6030, 6041, - 6047, 6056, 6062, 6082, 6088, 6097, 6103, 6114, - 6120, 6129, 6135, 6158, 6164, 6173, 6179, 6190, - 6196, 6205, 6211, 6231, 6237, 6246, 6252, 6263, - 6269, 6278, 6284, 6309, 6315, 6324, 6330, 6341, - 6347, 6356, 6362, 6382, 6388, 6397, 6403, 6414, - 6420, 6429, 6435, 3515, 3521, 3530, 3536, 3547, - 3553, 3562, 3568, 3588, 3594, 3603, 3609, 3620, - 3626, 3635, 3641, 3666, 3672, 3681, 3687, 3698, - 3704, 3713, 3719, 3739, 3745, 3754, 3760, 3771, - 3777, 3786, 3792, 3815, 3821, 3830, 3836, 3847, - 3853, 3862, 3868, 3888, 3894, 3903, 3909, 3920, - 3926, 3935, 3941, 3966, 3972, 3981, 3987, 3998, - 4004, 4013, 4019, 4039, 4045, 4054, 4060, 4071, - 4077, 4086, 4092, 3956, 3962, 3971, 3977, 3988, - 3994, 4003, 4009, 4029, 4035, 4044, 4050, 4061, - 4067, 4076, 4082, 4107, 4113, 4122, 4128, 4139, - 4145, 4154, 4160, 4180, 4186, 4195, 4201, 4212, - 4218, 4227, 4233, 4256, 4262, 4271, 4277, 4288, - 4294, 4303, 4309, 4329, 4335, 4344, 4350, 4361, - 4367, 4376, 4382, 4407, 4413, 4422, 4428, 4439, - 4445, 4454, 4460, 4480, 4486, 4495, 4501, 4512, - 4518, 4527, 4533, 4328, 4334, 4343, 4349, 4360, - 4366, 4375, 4381, 4401, 4407, 4416, 4422, 4433, - 4439, 4448, 4454, 4479, 4485, 4494, 4500, 4511, - 4517, 4526, 4532, 4552, 4558, 4567, 4573, 4584, - 4590, 4599, 4605, 4628, 4634, 4643, 4649, 4660, - 4666, 4675, 4681, 4701, 4707, 4716, 4722, 4733, - 4739, 4748, 4754, 4779, 4785, 4794, 4800, 4811, - 4817, 4826, 4832, 4852, 4858, 4867, 4873, 4884, - 4890, 4899, 4905, 4769, 4775, 4784, 4790, 4801, - 4807, 4816, 4822, 4842, 4848, 4857, 4863, 4874, - 4880, 4889, 4895, 4920, 4926, 4935, 4941, 4952, - 4958, 4967, 4973, 4993, 4999, 5008, 5014, 5025, - 5031, 5040, 5046, 5069, 5075, 5084, 5090, 5101, - 5107, 5116, 5122, 5142, 5148, 5157, 5163, 5174, - 5180, 5189, 5195, 5220, 5226, 5235, 5241, 5252, - 5258, 5267, 5273, 5293, 5299, 5308, 5314, 5325, - 5331, 5340, 5346, 4604, 4610, 4619, 4625, 4636, - 4642, 4651, 4657, 4677, 4683, 4692, 4698, 4709, - 4715, 4724, 4730, 4755, 4761, 4770, 4776, 4787, - 4793, 4802, 4808, 4828, 4834, 4843, 4849, 4860, - 4866, 4875, 4881, 4904, 4910, 4919, 4925, 4936, - 4942, 4951, 4957, 4977, 4983, 4992, 4998, 5009, - 5015, 5024, 5030, 5055, 5061, 5070, 5076, 5087, - 5093, 5102, 5108, 5128, 5134, 5143, 5149, 5160, - 5166, 5175, 5181, 5045, 5051, 5060, 5066, 5077, - 5083, 5092, 5098, 5118, 5124, 5133, 5139, 5150, - 5156, 5165, 5171, 5196, 5202, 5211, 5217, 5228, - 5234, 5243, 5249, 5269, 5275, 5284, 5290, 5301, - 5307, 5316, 5322, 5345, 5351, 5360, 5366, 5377, - 5383, 5392, 5398, 5418, 5424, 5433, 5439, 5450, - 5456, 5465, 5471, 5496, 5502, 5511, 5517, 5528, - 5534, 5543, 5549, 5569, 5575, 5584, 5590, 5601, - 5607, 5616, 5622, 5417, 5423, 5432, 5438, 5449, - 5455, 5464, 5470, 5490, 5496, 5505, 5511, 5522, - 5528, 5537, 5543, 5568, 5574, 5583, 5589, 5600, - 5606, 5615, 5621, 5641, 5647, 5656, 5662, 5673, - 5679, 5688, 5694, 5717, 5723, 5732, 5738, 5749, - 5755, 5764, 5770, 5790, 5796, 5805, 5811, 5822, - 5828, 5837, 5843, 5868, 5874, 5883, 5889, 5900, - 5906, 5915, 5921, 5941, 5947, 5956, 5962, 5973, - 5979, 5988, 5994, 5858, 5864, 5873, 5879, 5890, - 5896, 5905, 5911, 5931, 5937, 5946, 5952, 5963, - 5969, 5978, 5984, 6009, 6015, 6024, 6030, 6041, - 6047, 6056, 6062, 6082, 6088, 6097, 6103, 6114, - 6120, 6129, 6135, 6158, 6164, 6173, 6179, 6190, - 6196, 6205, 6211, 6231, 6237, 6246, 6252, 6263, - 6269, 6278, 6284, 6309, 6315, 6324, 6330, 6341, - 6347, 6356, 6362, 6382, 6388, 6397, 6403, 6414, - 6420, 6429, 6435, 5303, 5309, 5318, 5324, 5335, - 5341, 5350, 5356, 5376, 5382, 5391, 5397, 5408, - 5414, 5423, 5429, 5454, 5460, 5469, 5475, 5486, - 5492, 5501, 5507, 5527, 5533, 5542, 5548, 5559, - 5565, 5574, 5580, 5603, 5609, 5618, 5624, 5635, - 5641, 5650, 5656, 5676, 5682, 5691, 5697, 5708, - 5714, 5723, 5729, 5754, 5760, 5769, 5775, 5786, - 5792, 5801, 5807, 5827, 5833, 5842, 5848, 5859, - 5865, 5874, 5880, 5744, 5750, 5759, 5765, 5776, - 5782, 5791, 5797, 5817, 5823, 5832, 5838, 5849, - 5855, 5864, 5870, 5895, 5901, 5910, 5916, 5927, - 5933, 5942, 5948, 5968, 5974, 5983, 5989, 6000, - 6006, 6015, 6021, 6044, 6050, 6059, 6065, 6076, - 6082, 6091, 6097, 6117, 6123, 6132, 6138, 6149, - 6155, 6164, 6170, 6195, 6201, 6210, 6216, 6227, - 6233, 6242, 6248, 6268, 6274, 6283, 6289, 6300, - 6306, 6315, 6321, 6116, 6122, 6131, 6137, 6148, - 6154, 6163, 6169, 6189, 6195, 6204, 6210, 6221, - 6227, 6236, 6242, 6267, 6273, 6282, 6288, 6299, - 6305, 6314, 6320, 6340, 6346, 6355, 6361, 6372, - 6378, 6387, 6393, 6416, 6422, 6431, 6437, 6448, - 6454, 6463, 6469, 6489, 6495, 6504, 6510, 6521, - 6527, 6536, 6542, 6567, 6573, 6582, 6588, 6599, - 6605, 6614, 6620, 6640, 6646, 6655, 6661, 6672, - 6678, 6687, 6693, 6557, 6563, 6572, 6578, 6589, - 6595, 6604, 6610, 6630, 6636, 6645, 6651, 6662, - 6668, 6677, 6683, 6708, 6714, 6723, 6729, 6740, - 6746, 6755, 6761, 6781, 6787, 6796, 6802, 6813, - 6819, 6828, 6834, 6857, 6863, 6872, 6878, 6889, - 6895, 6904, 6910, 6930, 6936, 6945, 6951, 6962, - 6968, 6977, 6983, 7008, 7014, 7023, 7029, 7040, - 7046, 7055, 7061, 7081, 7087, 7096, 7102, 7113, - 7119, 7128, 7134, 6392, 6398, 6407, 6413, 6424, - 6430, 6439, 6445, 6465, 6471, 6480, 6486, 6497, - 6503, 6512, 6518, 6543, 6549, 6558, 6564, 6575, - 6581, 6590, 6596, 6616, 6622, 6631, 6637, 6648, - 6654, 6663, 6669, 6692, 6698, 6707, 6713, 6724, - 6730, 6739, 6745, 6765, 6771, 6780, 6786, 6797, - 6803, 6812, 6818, 6843, 6849, 6858, 6864, 6875, - 6881, 6890, 6896, 6916, 6922, 6931, 6937, 6948, - 6954, 6963, 6969, 6833, 6839, 6848, 6854, 6865, - 6871, 6880, 6886, 6906, 6912, 6921, 6927, 6938, - 6944, 6953, 6959, 6984, 6990, 6999, 7005, 7016, - 7022, 7031, 7037, 7057, 7063, 7072, 7078, 7089, - 7095, 7104, 7110, 7133, 7139, 7148, 7154, 7165, - 7171, 7180, 7186, 7206, 7212, 7221, 7227, 7238, - 7244, 7253, 7259, 7284, 7290, 7299, 7305, 7316, - 7322, 7331, 7337, 7357, 7363, 7372, 7378, 7389, - 7395, 7404, 7410, 7205, 7211, 7220, 7226, 7237, - 7243, 7252, 7258, 7278, 7284, 7293, 7299, 7310, - 7316, 7325, 7331, 7356, 7362, 7371, 7377, 7388, - 7394, 7403, 7409, 7429, 7435, 7444, 7450, 7461, - 7467, 7476, 7482, 7505, 7511, 7520, 7526, 7537, - 7543, 7552, 7558, 7578, 7584, 7593, 7599, 7610, - 7616, 7625, 7631, 7656, 7662, 7671, 7677, 7688, - 7694, 7703, 7709, 7729, 7735, 7744, 7750, 7761 -}; - -//------------------------------------------------------------------------------ -// Tables for level coding - -const uint8_t VP8EncBands[16 + 1] = { - 0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, - 0 // sentinel -}; - -//------------------------------------------------------------------------------ -// Mode costs - -static int GetResidualCost_C(int ctx0, const VP8Residual* const res) { - int n = res->first; - // should be prob[VP8EncBands[n]], but it's equivalent for n=0 or 1 - const int p0 = res->prob[n][ctx0][0]; - CostArrayPtr const costs = res->costs; - const uint16_t* t = costs[n][ctx0]; - // bit_cost(1, p0) is already incorporated in t[] tables, but only if ctx != 0 - // (as required by the syntax). For ctx0 == 0, we need to add it here or it'll - // be missing during the loop. - int cost = (ctx0 == 0) ? VP8BitCost(1, p0) : 0; - - if (res->last < 0) { - return VP8BitCost(0, p0); - } - for (; n < res->last; ++n) { - const int v = abs(res->coeffs[n]); - const int ctx = (v >= 2) ? 2 : v; - cost += VP8LevelCost(t, v); - t = costs[n + 1][ctx]; - } - // Last coefficient is always non-zero - { - const int v = abs(res->coeffs[n]); - assert(v != 0); - cost += VP8LevelCost(t, v); - if (n < 15) { - const int b = VP8EncBands[n + 1]; - const int ctx = (v == 1) ? 1 : 2; - const int last_p0 = res->prob[b][ctx][0]; - cost += VP8BitCost(0, last_p0); - } - } - return cost; -} - -static void SetResidualCoeffs_C(const int16_t* const coeffs, - VP8Residual* const res) { - int n; - res->last = -1; - assert(res->first == 0 || coeffs[0] == 0); - for (n = 15; n >= 0; --n) { - if (coeffs[n]) { - res->last = n; - break; - } - } - res->coeffs = coeffs; -} - -//------------------------------------------------------------------------------ -// init function - -VP8GetResidualCostFunc VP8GetResidualCost; -VP8SetResidualCoeffsFunc VP8SetResidualCoeffs; - -extern void VP8EncDspCostInitMIPS32(void); -extern void VP8EncDspCostInitMIPSdspR2(void); -extern void VP8EncDspCostInitSSE2(void); - -WEBP_DSP_INIT_FUNC(VP8EncDspCostInit) { - VP8GetResidualCost = GetResidualCost_C; - VP8SetResidualCoeffs = SetResidualCoeffs_C; - - // If defined, use CPUInfo() to overwrite some pointers with faster versions. - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_MIPS32) - if (VP8GetCPUInfo(kMIPS32)) { - VP8EncDspCostInitMIPS32(); - } -#endif -#if defined(WEBP_USE_MIPS_DSP_R2) - if (VP8GetCPUInfo(kMIPSdspR2)) { - VP8EncDspCostInitMIPSdspR2(); - } -#endif -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - VP8EncDspCostInitSSE2(); - } -#endif - } -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost_mips32.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost_mips32.c deleted file mode 100644 index d401401..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost_mips32.c +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Author: Djordje Pesut (djordje.pesut@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS32) - -#include "src/enc/cost_enc.h" - -static int GetResidualCost_MIPS32(int ctx0, const VP8Residual* const res) { - int temp0, temp1; - int v_reg, ctx_reg; - int n = res->first; - // should be prob[VP8EncBands[n]], but it's equivalent for n=0 or 1 - int p0 = res->prob[n][ctx0][0]; - CostArrayPtr const costs = res->costs; - const uint16_t* t = costs[n][ctx0]; - // bit_cost(1, p0) is already incorporated in t[] tables, but only if ctx != 0 - // (as required by the syntax). For ctx0 == 0, we need to add it here or it'll - // be missing during the loop. - int cost = (ctx0 == 0) ? VP8BitCost(1, p0) : 0; - const int16_t* res_coeffs = res->coeffs; - const int res_last = res->last; - const int const_max_level = MAX_VARIABLE_LEVEL; - const int const_2 = 2; - const uint16_t** p_costs = &costs[n][0]; - const size_t inc_p_costs = NUM_CTX * sizeof(*p_costs); - - if (res->last < 0) { - return VP8BitCost(0, p0); - } - - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "subu %[temp1], %[res_last], %[n] \n\t" - "sll %[temp0], %[n], 1 \n\t" - "blez %[temp1], 2f \n\t" - " addu %[res_coeffs], %[res_coeffs], %[temp0] \n\t" - "1: \n\t" - "lh %[v_reg], 0(%[res_coeffs]) \n\t" - "addiu %[n], %[n], 1 \n\t" - "negu %[temp0], %[v_reg] \n\t" - "slti %[temp1], %[v_reg], 0 \n\t" - "movn %[v_reg], %[temp0], %[temp1] \n\t" - "sltiu %[temp0], %[v_reg], 2 \n\t" - "move %[ctx_reg], %[v_reg] \n\t" - "movz %[ctx_reg], %[const_2], %[temp0] \n\t" - "sll %[temp1], %[v_reg], 1 \n\t" - "addu %[temp1], %[temp1], %[VP8LevelFixedCosts] \n\t" - "lhu %[temp1], 0(%[temp1]) \n\t" - "slt %[temp0], %[v_reg], %[const_max_level] \n\t" - "movz %[v_reg], %[const_max_level], %[temp0] \n\t" - "addu %[cost], %[cost], %[temp1] \n\t" - "sll %[v_reg], %[v_reg], 1 \n\t" - "sll %[ctx_reg], %[ctx_reg], 2 \n\t" - "addu %[v_reg], %[v_reg], %[t] \n\t" - "lhu %[temp0], 0(%[v_reg]) \n\t" - "addu %[p_costs], %[p_costs], %[inc_p_costs] \n\t" - "addu %[t], %[p_costs], %[ctx_reg] \n\t" - "addu %[cost], %[cost], %[temp0] \n\t" - "addiu %[res_coeffs], %[res_coeffs], 2 \n\t" - "bne %[n], %[res_last], 1b \n\t" - " lw %[t], 0(%[t]) \n\t" - "2: \n\t" - ".set pop \n\t" - : [cost]"+&r"(cost), [t]"+&r"(t), [n]"+&r"(n), [v_reg]"=&r"(v_reg), - [ctx_reg]"=&r"(ctx_reg), [p_costs]"+&r"(p_costs), [temp0]"=&r"(temp0), - [temp1]"=&r"(temp1), [res_coeffs]"+&r"(res_coeffs) - : [const_2]"r"(const_2), [const_max_level]"r"(const_max_level), - [VP8LevelFixedCosts]"r"(VP8LevelFixedCosts), [res_last]"r"(res_last), - [inc_p_costs]"r"(inc_p_costs) - : "memory" - ); - - // Last coefficient is always non-zero - { - const int v = abs(res->coeffs[n]); - assert(v != 0); - cost += VP8LevelCost(t, v); - if (n < 15) { - const int b = VP8EncBands[n + 1]; - const int ctx = (v == 1) ? 1 : 2; - const int last_p0 = res->prob[b][ctx][0]; - cost += VP8BitCost(0, last_p0); - } - } - return cost; -} - -static void SetResidualCoeffs_MIPS32(const int16_t* const coeffs, - VP8Residual* const res) { - const int16_t* p_coeffs = (int16_t*)coeffs; - int temp0, temp1, temp2, n, n1; - assert(res->first == 0 || coeffs[0] == 0); - - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "addiu %[p_coeffs], %[p_coeffs], 28 \n\t" - "li %[n], 15 \n\t" - "li %[temp2], -1 \n\t" - "0: \n\t" - "ulw %[temp0], 0(%[p_coeffs]) \n\t" - "beqz %[temp0], 1f \n\t" -#if defined(WORDS_BIGENDIAN) - " sll %[temp1], %[temp0], 16 \n\t" -#else - " srl %[temp1], %[temp0], 16 \n\t" -#endif - "addiu %[n1], %[n], -1 \n\t" - "movz %[temp0], %[n1], %[temp1] \n\t" - "movn %[temp0], %[n], %[temp1] \n\t" - "j 2f \n\t" - " addiu %[temp2], %[temp0], 0 \n\t" - "1: \n\t" - "addiu %[n], %[n], -2 \n\t" - "bgtz %[n], 0b \n\t" - " addiu %[p_coeffs], %[p_coeffs], -4 \n\t" - "2: \n\t" - ".set pop \n\t" - : [p_coeffs]"+&r"(p_coeffs), [temp0]"=&r"(temp0), - [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [n]"=&r"(n), [n1]"=&r"(n1) - : - : "memory" - ); - res->last = temp2; - res->coeffs = coeffs; -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8EncDspCostInitMIPS32(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitMIPS32(void) { - VP8GetResidualCost = GetResidualCost_MIPS32; - VP8SetResidualCoeffs = SetResidualCoeffs_MIPS32; -} - -#else // !WEBP_USE_MIPS32 - -WEBP_DSP_INIT_STUB(VP8EncDspCostInitMIPS32) - -#endif // WEBP_USE_MIPS32 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost_mips_dsp_r2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost_mips_dsp_r2.c deleted file mode 100644 index c3a05d0..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost_mips_dsp_r2.c +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Author: Djordje Pesut (djordje.pesut@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS_DSP_R2) - -#include "src/enc/cost_enc.h" - -static int GetResidualCost_MIPSdspR2(int ctx0, const VP8Residual* const res) { - int temp0, temp1; - int v_reg, ctx_reg; - int n = res->first; - // should be prob[VP8EncBands[n]], but it's equivalent for n=0 or 1 - int p0 = res->prob[n][ctx0][0]; - CostArrayPtr const costs = res->costs; - const uint16_t* t = costs[n][ctx0]; - // bit_cost(1, p0) is already incorporated in t[] tables, but only if ctx != 0 - // (as required by the syntax). For ctx0 == 0, we need to add it here or it'll - // be missing during the loop. - int cost = (ctx0 == 0) ? VP8BitCost(1, p0) : 0; - const int16_t* res_coeffs = res->coeffs; - const int res_last = res->last; - const int const_max_level = MAX_VARIABLE_LEVEL; - const int const_2 = 2; - const uint16_t** p_costs = &costs[n][0]; - const size_t inc_p_costs = NUM_CTX * sizeof(*p_costs); - - if (res->last < 0) { - return VP8BitCost(0, p0); - } - - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "subu %[temp1], %[res_last], %[n] \n\t" - "blez %[temp1], 2f \n\t" - " nop \n\t" - "1: \n\t" - "sll %[temp0], %[n], 1 \n\t" - "lhx %[v_reg], %[temp0](%[res_coeffs]) \n\t" - "addiu %[n], %[n], 1 \n\t" - "absq_s.w %[v_reg], %[v_reg] \n\t" - "sltiu %[temp0], %[v_reg], 2 \n\t" - "move %[ctx_reg], %[v_reg] \n\t" - "movz %[ctx_reg], %[const_2], %[temp0] \n\t" - "sll %[temp1], %[v_reg], 1 \n\t" - "lhx %[temp1], %[temp1](%[VP8LevelFixedCosts]) \n\t" - "slt %[temp0], %[v_reg], %[const_max_level] \n\t" - "movz %[v_reg], %[const_max_level], %[temp0] \n\t" - "addu %[cost], %[cost], %[temp1] \n\t" - "sll %[v_reg], %[v_reg], 1 \n\t" - "sll %[ctx_reg], %[ctx_reg], 2 \n\t" - "lhx %[temp0], %[v_reg](%[t]) \n\t" - "addu %[p_costs], %[p_costs], %[inc_p_costs] \n\t" - "addu %[t], %[p_costs], %[ctx_reg] \n\t" - "addu %[cost], %[cost], %[temp0] \n\t" - "bne %[n], %[res_last], 1b \n\t" - " lw %[t], 0(%[t]) \n\t" - "2: \n\t" - ".set pop \n\t" - : [cost]"+&r"(cost), [t]"+&r"(t), [n]"+&r"(n), [v_reg]"=&r"(v_reg), - [ctx_reg]"=&r"(ctx_reg), [p_costs]"+&r"(p_costs), [temp0]"=&r"(temp0), - [temp1]"=&r"(temp1) - : [const_2]"r"(const_2), [const_max_level]"r"(const_max_level), - [VP8LevelFixedCosts]"r"(VP8LevelFixedCosts), [res_last]"r"(res_last), - [res_coeffs]"r"(res_coeffs), [inc_p_costs]"r"(inc_p_costs) - : "memory" - ); - - // Last coefficient is always non-zero - { - const int v = abs(res->coeffs[n]); - assert(v != 0); - cost += VP8LevelCost(t, v); - if (n < 15) { - const int b = VP8EncBands[n + 1]; - const int ctx = (v == 1) ? 1 : 2; - const int last_p0 = res->prob[b][ctx][0]; - cost += VP8BitCost(0, last_p0); - } - } - return cost; -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8EncDspCostInitMIPSdspR2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitMIPSdspR2(void) { - VP8GetResidualCost = GetResidualCost_MIPSdspR2; -} - -#else // !WEBP_USE_MIPS_DSP_R2 - -WEBP_DSP_INIT_STUB(VP8EncDspCostInitMIPSdspR2) - -#endif // WEBP_USE_MIPS_DSP_R2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost_sse2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost_sse2.c deleted file mode 100644 index 65a035a..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/cost_sse2.c +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE2 version of cost functions -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE2) -#include - -#include "src/enc/cost_enc.h" -#include "src/enc/vp8i_enc.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ - -static void SetResidualCoeffs_SSE2(const int16_t* const coeffs, - VP8Residual* const res) { - const __m128i c0 = _mm_loadu_si128((const __m128i*)(coeffs + 0)); - const __m128i c1 = _mm_loadu_si128((const __m128i*)(coeffs + 8)); - // Use SSE2 to compare 16 values with a single instruction. - const __m128i zero = _mm_setzero_si128(); - const __m128i m0 = _mm_packs_epi16(c0, c1); - const __m128i m1 = _mm_cmpeq_epi8(m0, zero); - // Get the comparison results as a bitmask into 16bits. Negate the mask to get - // the position of entries that are not equal to zero. We don't need to mask - // out least significant bits according to res->first, since coeffs[0] is 0 - // if res->first > 0. - const uint32_t mask = 0x0000ffffu ^ (uint32_t)_mm_movemask_epi8(m1); - // The position of the most significant non-zero bit indicates the position of - // the last non-zero value. - assert(res->first == 0 || coeffs[0] == 0); - res->last = mask ? BitsLog2Floor(mask) : -1; - res->coeffs = coeffs; -} - -static int GetResidualCost_SSE2(int ctx0, const VP8Residual* const res) { - uint8_t levels[16], ctxs[16]; - uint16_t abs_levels[16]; - int n = res->first; - // should be prob[VP8EncBands[n]], but it's equivalent for n=0 or 1 - const int p0 = res->prob[n][ctx0][0]; - CostArrayPtr const costs = res->costs; - const uint16_t* t = costs[n][ctx0]; - // bit_cost(1, p0) is already incorporated in t[] tables, but only if ctx != 0 - // (as required by the syntax). For ctx0 == 0, we need to add it here or it'll - // be missing during the loop. - int cost = (ctx0 == 0) ? VP8BitCost(1, p0) : 0; - - if (res->last < 0) { - return VP8BitCost(0, p0); - } - - { // precompute clamped levels and contexts, packed to 8b. - const __m128i zero = _mm_setzero_si128(); - const __m128i kCst2 = _mm_set1_epi8(2); - const __m128i kCst67 = _mm_set1_epi8(MAX_VARIABLE_LEVEL); - const __m128i c0 = _mm_loadu_si128((const __m128i*)&res->coeffs[0]); - const __m128i c1 = _mm_loadu_si128((const __m128i*)&res->coeffs[8]); - const __m128i D0 = _mm_sub_epi16(zero, c0); - const __m128i D1 = _mm_sub_epi16(zero, c1); - const __m128i E0 = _mm_max_epi16(c0, D0); // abs(v), 16b - const __m128i E1 = _mm_max_epi16(c1, D1); - const __m128i F = _mm_packs_epi16(E0, E1); - const __m128i G = _mm_min_epu8(F, kCst2); // context = 0,1,2 - const __m128i H = _mm_min_epu8(F, kCst67); // clamp_level in [0..67] - - _mm_storeu_si128((__m128i*)&ctxs[0], G); - _mm_storeu_si128((__m128i*)&levels[0], H); - - _mm_storeu_si128((__m128i*)&abs_levels[0], E0); - _mm_storeu_si128((__m128i*)&abs_levels[8], E1); - } - for (; n < res->last; ++n) { - const int ctx = ctxs[n]; - const int level = levels[n]; - const int flevel = abs_levels[n]; // full level - cost += VP8LevelFixedCosts[flevel] + t[level]; // simplified VP8LevelCost() - t = costs[n + 1][ctx]; - } - // Last coefficient is always non-zero - { - const int level = levels[n]; - const int flevel = abs_levels[n]; - assert(flevel != 0); - cost += VP8LevelFixedCosts[flevel] + t[level]; - if (n < 15) { - const int b = VP8EncBands[n + 1]; - const int ctx = ctxs[n]; - const int last_p0 = res->prob[b][ctx][0]; - cost += VP8BitCost(0, last_p0); - } - } - return cost; -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8EncDspCostInitSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitSSE2(void) { - VP8SetResidualCoeffs = SetResidualCoeffs_SSE2; - VP8GetResidualCost = GetResidualCost_SSE2; -} - -#else // !WEBP_USE_SSE2 - -WEBP_DSP_INIT_STUB(VP8EncDspCostInitSSE2) - -#endif // WEBP_USE_SSE2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/cpu.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/cpu.c deleted file mode 100644 index 6daddd9..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/cpu.c +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// CPU detection -// -// Author: Christian Duvivier (cduvivier@google.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_HAVE_NEON_RTCD) -#include -#include -#endif - -#if defined(WEBP_ANDROID_NEON) -#include -#endif - -//------------------------------------------------------------------------------ -// SSE2 detection. -// - -// apple/darwin gcc-4.0.1 defines __PIC__, but not __pic__ with -fPIC. -#if (defined(__pic__) || defined(__PIC__)) && defined(__i386__) -static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) { - __asm__ volatile ( - "mov %%ebx, %%edi\n" - "cpuid\n" - "xchg %%edi, %%ebx\n" - : "=a"(cpu_info[0]), "=D"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3]) - : "a"(info_type), "c"(0)); -} -#elif defined(__x86_64__) && \ - (defined(__code_model_medium__) || defined(__code_model_large__)) && \ - defined(__PIC__) -static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) { - __asm__ volatile ( - "xchg{q}\t{%%rbx}, %q1\n" - "cpuid\n" - "xchg{q}\t{%%rbx}, %q1\n" - : "=a"(cpu_info[0]), "=&r"(cpu_info[1]), "=c"(cpu_info[2]), - "=d"(cpu_info[3]) - : "a"(info_type), "c"(0)); -} -#elif defined(__i386__) || defined(__x86_64__) -static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) { - __asm__ volatile ( - "cpuid\n" - : "=a"(cpu_info[0]), "=b"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3]) - : "a"(info_type), "c"(0)); -} -#elif (defined(_M_X64) || defined(_M_IX86)) && \ - defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 150030729 // >= VS2008 SP1 -#include -#define GetCPUInfo(info, type) __cpuidex(info, type, 0) // set ecx=0 -#elif defined(WEBP_MSC_SSE2) -#define GetCPUInfo __cpuid -#endif - -// NaCl has no support for xgetbv or the raw opcode. -#if !defined(__native_client__) && (defined(__i386__) || defined(__x86_64__)) -static WEBP_INLINE uint64_t xgetbv(void) { - const uint32_t ecx = 0; - uint32_t eax, edx; - // Use the raw opcode for xgetbv for compatibility with older toolchains. - __asm__ volatile ( - ".byte 0x0f, 0x01, 0xd0\n" - : "=a"(eax), "=d"(edx) : "c" (ecx)); - return ((uint64_t)edx << 32) | eax; -} -#elif (defined(_M_X64) || defined(_M_IX86)) && \ - defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219 // >= VS2010 SP1 -#include -#define xgetbv() _xgetbv(0) -#elif defined(_MSC_VER) && defined(_M_IX86) -static WEBP_INLINE uint64_t xgetbv(void) { - uint32_t eax_, edx_; - __asm { - xor ecx, ecx // ecx = 0 - // Use the raw opcode for xgetbv for compatibility with older toolchains. - __asm _emit 0x0f __asm _emit 0x01 __asm _emit 0xd0 - mov eax_, eax - mov edx_, edx - } - return ((uint64_t)edx_ << 32) | eax_; -} -#else -#define xgetbv() 0U // no AVX for older x64 or unrecognized toolchains. -#endif - -#if defined(__i386__) || defined(__x86_64__) || defined(WEBP_MSC_SSE2) - -// helper function for run-time detection of slow SSSE3 platforms -static int CheckSlowModel(int info) { - // Table listing display models with longer latencies for the bsr instruction - // (ie 2 cycles vs 10/16 cycles) and some SSSE3 instructions like pshufb. - // Refer to Intel 64 and IA-32 Architectures Optimization Reference Manual. - static const uint8_t kSlowModels[] = { - 0x37, 0x4a, 0x4d, // Silvermont Microarchitecture - 0x1c, 0x26, 0x27 // Atom Microarchitecture - }; - const uint32_t model = ((info & 0xf0000) >> 12) | ((info >> 4) & 0xf); - const uint32_t family = (info >> 8) & 0xf; - if (family == 0x06) { - size_t i; - for (i = 0; i < sizeof(kSlowModels) / sizeof(kSlowModels[0]); ++i) { - if (model == kSlowModels[i]) return 1; - } - } - return 0; -} - -static int x86CPUInfo(CPUFeature feature) { - int max_cpuid_value; - int cpu_info[4]; - int is_intel = 0; - - // get the highest feature value cpuid supports - GetCPUInfo(cpu_info, 0); - max_cpuid_value = cpu_info[0]; - if (max_cpuid_value < 1) { - return 0; - } else { - const int VENDOR_ID_INTEL_EBX = 0x756e6547; // uneG - const int VENDOR_ID_INTEL_EDX = 0x49656e69; // Ieni - const int VENDOR_ID_INTEL_ECX = 0x6c65746e; // letn - is_intel = (cpu_info[1] == VENDOR_ID_INTEL_EBX && - cpu_info[2] == VENDOR_ID_INTEL_ECX && - cpu_info[3] == VENDOR_ID_INTEL_EDX); // genuine Intel? - } - - GetCPUInfo(cpu_info, 1); - if (feature == kSSE2) { - return !!(cpu_info[3] & (1 << 26)); - } - if (feature == kSSE3) { - return !!(cpu_info[2] & (1 << 0)); - } - if (feature == kSlowSSSE3) { - if (is_intel && (cpu_info[2] & (1 << 9))) { // SSSE3? - return CheckSlowModel(cpu_info[0]); - } - return 0; - } - - if (feature == kSSE4_1) { - return !!(cpu_info[2] & (1 << 19)); - } - if (feature == kAVX) { - // bits 27 (OSXSAVE) & 28 (256-bit AVX) - if ((cpu_info[2] & 0x18000000) == 0x18000000) { - // XMM state and YMM state enabled by the OS. - return (xgetbv() & 0x6) == 0x6; - } - } - if (feature == kAVX2) { - if (x86CPUInfo(kAVX) && max_cpuid_value >= 7) { - GetCPUInfo(cpu_info, 7); - return !!(cpu_info[1] & (1 << 5)); - } - } - return 0; -} -VP8CPUInfo VP8GetCPUInfo = x86CPUInfo; -#elif defined(WEBP_ANDROID_NEON) // NB: needs to be before generic NEON test. -static int AndroidCPUInfo(CPUFeature feature) { - const AndroidCpuFamily cpu_family = android_getCpuFamily(); - const uint64_t cpu_features = android_getCpuFeatures(); - if (feature == kNEON) { - return (cpu_family == ANDROID_CPU_FAMILY_ARM && - 0 != (cpu_features & ANDROID_CPU_ARM_FEATURE_NEON)); - } - return 0; -} -VP8CPUInfo VP8GetCPUInfo = AndroidCPUInfo; -#elif defined(WEBP_USE_NEON) -// define a dummy function to enable turning off NEON at runtime by setting -// VP8DecGetCPUInfo = NULL -static int armCPUInfo(CPUFeature feature) { - if (feature != kNEON) return 0; -#if defined(__linux__) && defined(WEBP_HAVE_NEON_RTCD) - { - int has_neon = 0; - char line[200]; - FILE* const cpuinfo = fopen("/proc/cpuinfo", "r"); - if (cpuinfo == NULL) return 0; - while (fgets(line, sizeof(line), cpuinfo)) { - if (!strncmp(line, "Features", 8)) { - if (strstr(line, " neon ") != NULL) { - has_neon = 1; - break; - } - } - } - fclose(cpuinfo); - return has_neon; - } -#else - return 1; -#endif -} -VP8CPUInfo VP8GetCPUInfo = armCPUInfo; -#elif defined(WEBP_USE_MIPS32) || defined(WEBP_USE_MIPS_DSP_R2) || \ - defined(WEBP_USE_MSA) -static int mipsCPUInfo(CPUFeature feature) { - if ((feature == kMIPS32) || (feature == kMIPSdspR2) || (feature == kMSA)) { - return 1; - } else { - return 0; - } - -} -VP8CPUInfo VP8GetCPUInfo = mipsCPUInfo; -#else -VP8CPUInfo VP8GetCPUInfo = NULL; -#endif diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec.c deleted file mode 100644 index c83fb0e..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec.c +++ /dev/null @@ -1,887 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Speed-critical decoding functions, default plain-C implementations. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include - -#include "src/dsp/dsp.h" -#include "src/dec/vp8i_dec.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ - -static WEBP_INLINE uint8_t clip_8b(int v) { - return (!(v & ~0xff)) ? v : (v < 0) ? 0 : 255; -} - -//------------------------------------------------------------------------------ -// Transforms (Paragraph 14.4) - -#define STORE(x, y, v) \ - dst[(x) + (y) * BPS] = clip_8b(dst[(x) + (y) * BPS] + ((v) >> 3)) - -#define STORE2(y, dc, d, c) do { \ - const int DC = (dc); \ - STORE(0, y, DC + (d)); \ - STORE(1, y, DC + (c)); \ - STORE(2, y, DC - (c)); \ - STORE(3, y, DC - (d)); \ -} while (0) - -#define MUL1(a) ((((a) * 20091) >> 16) + (a)) -#define MUL2(a) (((a) * 35468) >> 16) - -#if !WEBP_NEON_OMIT_C_CODE -static void TransformOne_C(const int16_t* in, uint8_t* dst) { - int C[4 * 4], *tmp; - int i; - tmp = C; - for (i = 0; i < 4; ++i) { // vertical pass - const int a = in[0] + in[8]; // [-4096, 4094] - const int b = in[0] - in[8]; // [-4095, 4095] - const int c = MUL2(in[4]) - MUL1(in[12]); // [-3783, 3783] - const int d = MUL1(in[4]) + MUL2(in[12]); // [-3785, 3781] - tmp[0] = a + d; // [-7881, 7875] - tmp[1] = b + c; // [-7878, 7878] - tmp[2] = b - c; // [-7878, 7878] - tmp[3] = a - d; // [-7877, 7879] - tmp += 4; - in++; - } - // Each pass is expanding the dynamic range by ~3.85 (upper bound). - // The exact value is (2. + (20091 + 35468) / 65536). - // After the second pass, maximum interval is [-3794, 3794], assuming - // an input in [-2048, 2047] interval. We then need to add a dst value - // in the [0, 255] range. - // In the worst case scenario, the input to clip_8b() can be as large as - // [-60713, 60968]. - tmp = C; - for (i = 0; i < 4; ++i) { // horizontal pass - const int dc = tmp[0] + 4; - const int a = dc + tmp[8]; - const int b = dc - tmp[8]; - const int c = MUL2(tmp[4]) - MUL1(tmp[12]); - const int d = MUL1(tmp[4]) + MUL2(tmp[12]); - STORE(0, 0, a + d); - STORE(1, 0, b + c); - STORE(2, 0, b - c); - STORE(3, 0, a - d); - tmp++; - dst += BPS; - } -} - -// Simplified transform when only in[0], in[1] and in[4] are non-zero -static void TransformAC3_C(const int16_t* in, uint8_t* dst) { - const int a = in[0] + 4; - const int c4 = MUL2(in[4]); - const int d4 = MUL1(in[4]); - const int c1 = MUL2(in[1]); - const int d1 = MUL1(in[1]); - STORE2(0, a + d4, d1, c1); - STORE2(1, a + c4, d1, c1); - STORE2(2, a - c4, d1, c1); - STORE2(3, a - d4, d1, c1); -} -#undef MUL1 -#undef MUL2 -#undef STORE2 - -static void TransformTwo_C(const int16_t* in, uint8_t* dst, int do_two) { - TransformOne_C(in, dst); - if (do_two) { - TransformOne_C(in + 16, dst + 4); - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -static void TransformUV_C(const int16_t* in, uint8_t* dst) { - VP8Transform(in + 0 * 16, dst, 1); - VP8Transform(in + 2 * 16, dst + 4 * BPS, 1); -} - -#if !WEBP_NEON_OMIT_C_CODE -static void TransformDC_C(const int16_t* in, uint8_t* dst) { - const int DC = in[0] + 4; - int i, j; - for (j = 0; j < 4; ++j) { - for (i = 0; i < 4; ++i) { - STORE(i, j, DC); - } - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -static void TransformDCUV_C(const int16_t* in, uint8_t* dst) { - if (in[0 * 16]) VP8TransformDC(in + 0 * 16, dst); - if (in[1 * 16]) VP8TransformDC(in + 1 * 16, dst + 4); - if (in[2 * 16]) VP8TransformDC(in + 2 * 16, dst + 4 * BPS); - if (in[3 * 16]) VP8TransformDC(in + 3 * 16, dst + 4 * BPS + 4); -} - -#undef STORE - -//------------------------------------------------------------------------------ -// Paragraph 14.3 - -#if !WEBP_NEON_OMIT_C_CODE -static void TransformWHT_C(const int16_t* in, int16_t* out) { - int tmp[16]; - int i; - for (i = 0; i < 4; ++i) { - const int a0 = in[0 + i] + in[12 + i]; - const int a1 = in[4 + i] + in[ 8 + i]; - const int a2 = in[4 + i] - in[ 8 + i]; - const int a3 = in[0 + i] - in[12 + i]; - tmp[0 + i] = a0 + a1; - tmp[8 + i] = a0 - a1; - tmp[4 + i] = a3 + a2; - tmp[12 + i] = a3 - a2; - } - for (i = 0; i < 4; ++i) { - const int dc = tmp[0 + i * 4] + 3; // w/ rounder - const int a0 = dc + tmp[3 + i * 4]; - const int a1 = tmp[1 + i * 4] + tmp[2 + i * 4]; - const int a2 = tmp[1 + i * 4] - tmp[2 + i * 4]; - const int a3 = dc - tmp[3 + i * 4]; - out[ 0] = (a0 + a1) >> 3; - out[16] = (a3 + a2) >> 3; - out[32] = (a0 - a1) >> 3; - out[48] = (a3 - a2) >> 3; - out += 64; - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -void (*VP8TransformWHT)(const int16_t* in, int16_t* out); - -//------------------------------------------------------------------------------ -// Intra predictions - -#define DST(x, y) dst[(x) + (y) * BPS] - -#if !WEBP_NEON_OMIT_C_CODE -static WEBP_INLINE void TrueMotion(uint8_t* dst, int size) { - const uint8_t* top = dst - BPS; - const uint8_t* const clip0 = VP8kclip1 - top[-1]; - int y; - for (y = 0; y < size; ++y) { - const uint8_t* const clip = clip0 + dst[-1]; - int x; - for (x = 0; x < size; ++x) { - dst[x] = clip[top[x]]; - } - dst += BPS; - } -} -static void TM4_C(uint8_t* dst) { TrueMotion(dst, 4); } -static void TM8uv_C(uint8_t* dst) { TrueMotion(dst, 8); } -static void TM16_C(uint8_t* dst) { TrueMotion(dst, 16); } - -//------------------------------------------------------------------------------ -// 16x16 - -static void VE16_C(uint8_t* dst) { // vertical - int j; - for (j = 0; j < 16; ++j) { - memcpy(dst + j * BPS, dst - BPS, 16); - } -} - -static void HE16_C(uint8_t* dst) { // horizontal - int j; - for (j = 16; j > 0; --j) { - memset(dst, dst[-1], 16); - dst += BPS; - } -} - -static WEBP_INLINE void Put16(int v, uint8_t* dst) { - int j; - for (j = 0; j < 16; ++j) { - memset(dst + j * BPS, v, 16); - } -} - -static void DC16_C(uint8_t* dst) { // DC - int DC = 16; - int j; - for (j = 0; j < 16; ++j) { - DC += dst[-1 + j * BPS] + dst[j - BPS]; - } - Put16(DC >> 5, dst); -} - -static void DC16NoTop_C(uint8_t* dst) { // DC with top samples not available - int DC = 8; - int j; - for (j = 0; j < 16; ++j) { - DC += dst[-1 + j * BPS]; - } - Put16(DC >> 4, dst); -} - -static void DC16NoLeft_C(uint8_t* dst) { // DC with left samples not available - int DC = 8; - int i; - for (i = 0; i < 16; ++i) { - DC += dst[i - BPS]; - } - Put16(DC >> 4, dst); -} - -static void DC16NoTopLeft_C(uint8_t* dst) { // DC with no top and left samples - Put16(0x80, dst); -} -#endif // !WEBP_NEON_OMIT_C_CODE - -VP8PredFunc VP8PredLuma16[NUM_B_DC_MODES]; - -//------------------------------------------------------------------------------ -// 4x4 - -#define AVG3(a, b, c) ((uint8_t)(((a) + 2 * (b) + (c) + 2) >> 2)) -#define AVG2(a, b) (((a) + (b) + 1) >> 1) - -#if !WEBP_NEON_OMIT_C_CODE -static void VE4_C(uint8_t* dst) { // vertical - const uint8_t* top = dst - BPS; - const uint8_t vals[4] = { - AVG3(top[-1], top[0], top[1]), - AVG3(top[ 0], top[1], top[2]), - AVG3(top[ 1], top[2], top[3]), - AVG3(top[ 2], top[3], top[4]) - }; - int i; - for (i = 0; i < 4; ++i) { - memcpy(dst + i * BPS, vals, sizeof(vals)); - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -static void HE4_C(uint8_t* dst) { // horizontal - const int A = dst[-1 - BPS]; - const int B = dst[-1]; - const int C = dst[-1 + BPS]; - const int D = dst[-1 + 2 * BPS]; - const int E = dst[-1 + 3 * BPS]; - WebPUint32ToMem(dst + 0 * BPS, 0x01010101U * AVG3(A, B, C)); - WebPUint32ToMem(dst + 1 * BPS, 0x01010101U * AVG3(B, C, D)); - WebPUint32ToMem(dst + 2 * BPS, 0x01010101U * AVG3(C, D, E)); - WebPUint32ToMem(dst + 3 * BPS, 0x01010101U * AVG3(D, E, E)); -} - -#if !WEBP_NEON_OMIT_C_CODE -static void DC4_C(uint8_t* dst) { // DC - uint32_t dc = 4; - int i; - for (i = 0; i < 4; ++i) dc += dst[i - BPS] + dst[-1 + i * BPS]; - dc >>= 3; - for (i = 0; i < 4; ++i) memset(dst + i * BPS, dc, 4); -} - -static void RD4_C(uint8_t* dst) { // Down-right - const int I = dst[-1 + 0 * BPS]; - const int J = dst[-1 + 1 * BPS]; - const int K = dst[-1 + 2 * BPS]; - const int L = dst[-1 + 3 * BPS]; - const int X = dst[-1 - BPS]; - const int A = dst[0 - BPS]; - const int B = dst[1 - BPS]; - const int C = dst[2 - BPS]; - const int D = dst[3 - BPS]; - DST(0, 3) = AVG3(J, K, L); - DST(1, 3) = DST(0, 2) = AVG3(I, J, K); - DST(2, 3) = DST(1, 2) = DST(0, 1) = AVG3(X, I, J); - DST(3, 3) = DST(2, 2) = DST(1, 1) = DST(0, 0) = AVG3(A, X, I); - DST(3, 2) = DST(2, 1) = DST(1, 0) = AVG3(B, A, X); - DST(3, 1) = DST(2, 0) = AVG3(C, B, A); - DST(3, 0) = AVG3(D, C, B); -} - -static void LD4_C(uint8_t* dst) { // Down-Left - const int A = dst[0 - BPS]; - const int B = dst[1 - BPS]; - const int C = dst[2 - BPS]; - const int D = dst[3 - BPS]; - const int E = dst[4 - BPS]; - const int F = dst[5 - BPS]; - const int G = dst[6 - BPS]; - const int H = dst[7 - BPS]; - DST(0, 0) = AVG3(A, B, C); - DST(1, 0) = DST(0, 1) = AVG3(B, C, D); - DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E); - DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F); - DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G); - DST(3, 2) = DST(2, 3) = AVG3(F, G, H); - DST(3, 3) = AVG3(G, H, H); -} -#endif // !WEBP_NEON_OMIT_C_CODE - -static void VR4_C(uint8_t* dst) { // Vertical-Right - const int I = dst[-1 + 0 * BPS]; - const int J = dst[-1 + 1 * BPS]; - const int K = dst[-1 + 2 * BPS]; - const int X = dst[-1 - BPS]; - const int A = dst[0 - BPS]; - const int B = dst[1 - BPS]; - const int C = dst[2 - BPS]; - const int D = dst[3 - BPS]; - DST(0, 0) = DST(1, 2) = AVG2(X, A); - DST(1, 0) = DST(2, 2) = AVG2(A, B); - DST(2, 0) = DST(3, 2) = AVG2(B, C); - DST(3, 0) = AVG2(C, D); - - DST(0, 3) = AVG3(K, J, I); - DST(0, 2) = AVG3(J, I, X); - DST(0, 1) = DST(1, 3) = AVG3(I, X, A); - DST(1, 1) = DST(2, 3) = AVG3(X, A, B); - DST(2, 1) = DST(3, 3) = AVG3(A, B, C); - DST(3, 1) = AVG3(B, C, D); -} - -static void VL4_C(uint8_t* dst) { // Vertical-Left - const int A = dst[0 - BPS]; - const int B = dst[1 - BPS]; - const int C = dst[2 - BPS]; - const int D = dst[3 - BPS]; - const int E = dst[4 - BPS]; - const int F = dst[5 - BPS]; - const int G = dst[6 - BPS]; - const int H = dst[7 - BPS]; - DST(0, 0) = AVG2(A, B); - DST(1, 0) = DST(0, 2) = AVG2(B, C); - DST(2, 0) = DST(1, 2) = AVG2(C, D); - DST(3, 0) = DST(2, 2) = AVG2(D, E); - - DST(0, 1) = AVG3(A, B, C); - DST(1, 1) = DST(0, 3) = AVG3(B, C, D); - DST(2, 1) = DST(1, 3) = AVG3(C, D, E); - DST(3, 1) = DST(2, 3) = AVG3(D, E, F); - DST(3, 2) = AVG3(E, F, G); - DST(3, 3) = AVG3(F, G, H); -} - -static void HU4_C(uint8_t* dst) { // Horizontal-Up - const int I = dst[-1 + 0 * BPS]; - const int J = dst[-1 + 1 * BPS]; - const int K = dst[-1 + 2 * BPS]; - const int L = dst[-1 + 3 * BPS]; - DST(0, 0) = AVG2(I, J); - DST(2, 0) = DST(0, 1) = AVG2(J, K); - DST(2, 1) = DST(0, 2) = AVG2(K, L); - DST(1, 0) = AVG3(I, J, K); - DST(3, 0) = DST(1, 1) = AVG3(J, K, L); - DST(3, 1) = DST(1, 2) = AVG3(K, L, L); - DST(3, 2) = DST(2, 2) = - DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L; -} - -static void HD4_C(uint8_t* dst) { // Horizontal-Down - const int I = dst[-1 + 0 * BPS]; - const int J = dst[-1 + 1 * BPS]; - const int K = dst[-1 + 2 * BPS]; - const int L = dst[-1 + 3 * BPS]; - const int X = dst[-1 - BPS]; - const int A = dst[0 - BPS]; - const int B = dst[1 - BPS]; - const int C = dst[2 - BPS]; - - DST(0, 0) = DST(2, 1) = AVG2(I, X); - DST(0, 1) = DST(2, 2) = AVG2(J, I); - DST(0, 2) = DST(2, 3) = AVG2(K, J); - DST(0, 3) = AVG2(L, K); - - DST(3, 0) = AVG3(A, B, C); - DST(2, 0) = AVG3(X, A, B); - DST(1, 0) = DST(3, 1) = AVG3(I, X, A); - DST(1, 1) = DST(3, 2) = AVG3(J, I, X); - DST(1, 2) = DST(3, 3) = AVG3(K, J, I); - DST(1, 3) = AVG3(L, K, J); -} - -#undef DST -#undef AVG3 -#undef AVG2 - -VP8PredFunc VP8PredLuma4[NUM_BMODES]; - -//------------------------------------------------------------------------------ -// Chroma - -#if !WEBP_NEON_OMIT_C_CODE -static void VE8uv_C(uint8_t* dst) { // vertical - int j; - for (j = 0; j < 8; ++j) { - memcpy(dst + j * BPS, dst - BPS, 8); - } -} - -static void HE8uv_C(uint8_t* dst) { // horizontal - int j; - for (j = 0; j < 8; ++j) { - memset(dst, dst[-1], 8); - dst += BPS; - } -} - -// helper for chroma-DC predictions -static WEBP_INLINE void Put8x8uv(uint8_t value, uint8_t* dst) { - int j; - for (j = 0; j < 8; ++j) { - memset(dst + j * BPS, value, 8); - } -} - -static void DC8uv_C(uint8_t* dst) { // DC - int dc0 = 8; - int i; - for (i = 0; i < 8; ++i) { - dc0 += dst[i - BPS] + dst[-1 + i * BPS]; - } - Put8x8uv(dc0 >> 4, dst); -} - -static void DC8uvNoLeft_C(uint8_t* dst) { // DC with no left samples - int dc0 = 4; - int i; - for (i = 0; i < 8; ++i) { - dc0 += dst[i - BPS]; - } - Put8x8uv(dc0 >> 3, dst); -} - -static void DC8uvNoTop_C(uint8_t* dst) { // DC with no top samples - int dc0 = 4; - int i; - for (i = 0; i < 8; ++i) { - dc0 += dst[-1 + i * BPS]; - } - Put8x8uv(dc0 >> 3, dst); -} - -static void DC8uvNoTopLeft_C(uint8_t* dst) { // DC with nothing - Put8x8uv(0x80, dst); -} -#endif // !WEBP_NEON_OMIT_C_CODE - -VP8PredFunc VP8PredChroma8[NUM_B_DC_MODES]; - -//------------------------------------------------------------------------------ -// Edge filtering functions - -#if !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC -// 4 pixels in, 2 pixels out -static WEBP_INLINE void DoFilter2_C(uint8_t* p, int step) { - const int p1 = p[-2*step], p0 = p[-step], q0 = p[0], q1 = p[step]; - const int a = 3 * (q0 - p0) + VP8ksclip1[p1 - q1]; // in [-893,892] - const int a1 = VP8ksclip2[(a + 4) >> 3]; // in [-16,15] - const int a2 = VP8ksclip2[(a + 3) >> 3]; - p[-step] = VP8kclip1[p0 + a2]; - p[ 0] = VP8kclip1[q0 - a1]; -} - -// 4 pixels in, 4 pixels out -static WEBP_INLINE void DoFilter4_C(uint8_t* p, int step) { - const int p1 = p[-2*step], p0 = p[-step], q0 = p[0], q1 = p[step]; - const int a = 3 * (q0 - p0); - const int a1 = VP8ksclip2[(a + 4) >> 3]; - const int a2 = VP8ksclip2[(a + 3) >> 3]; - const int a3 = (a1 + 1) >> 1; - p[-2*step] = VP8kclip1[p1 + a3]; - p[- step] = VP8kclip1[p0 + a2]; - p[ 0] = VP8kclip1[q0 - a1]; - p[ step] = VP8kclip1[q1 - a3]; -} - -// 6 pixels in, 6 pixels out -static WEBP_INLINE void DoFilter6_C(uint8_t* p, int step) { - const int p2 = p[-3*step], p1 = p[-2*step], p0 = p[-step]; - const int q0 = p[0], q1 = p[step], q2 = p[2*step]; - const int a = VP8ksclip1[3 * (q0 - p0) + VP8ksclip1[p1 - q1]]; - // a is in [-128,127], a1 in [-27,27], a2 in [-18,18] and a3 in [-9,9] - const int a1 = (27 * a + 63) >> 7; // eq. to ((3 * a + 7) * 9) >> 7 - const int a2 = (18 * a + 63) >> 7; // eq. to ((2 * a + 7) * 9) >> 7 - const int a3 = (9 * a + 63) >> 7; // eq. to ((1 * a + 7) * 9) >> 7 - p[-3*step] = VP8kclip1[p2 + a3]; - p[-2*step] = VP8kclip1[p1 + a2]; - p[- step] = VP8kclip1[p0 + a1]; - p[ 0] = VP8kclip1[q0 - a1]; - p[ step] = VP8kclip1[q1 - a2]; - p[ 2*step] = VP8kclip1[q2 - a3]; -} - -static WEBP_INLINE int Hev(const uint8_t* p, int step, int thresh) { - const int p1 = p[-2*step], p0 = p[-step], q0 = p[0], q1 = p[step]; - return (VP8kabs0[p1 - p0] > thresh) || (VP8kabs0[q1 - q0] > thresh); -} -#endif // !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC - -#if !WEBP_NEON_OMIT_C_CODE -static WEBP_INLINE int NeedsFilter_C(const uint8_t* p, int step, int t) { - const int p1 = p[-2 * step], p0 = p[-step], q0 = p[0], q1 = p[step]; - return ((4 * VP8kabs0[p0 - q0] + VP8kabs0[p1 - q1]) <= t); -} -#endif // !WEBP_NEON_OMIT_C_CODE - -#if !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC -static WEBP_INLINE int NeedsFilter2_C(const uint8_t* p, - int step, int t, int it) { - const int p3 = p[-4 * step], p2 = p[-3 * step], p1 = p[-2 * step]; - const int p0 = p[-step], q0 = p[0]; - const int q1 = p[step], q2 = p[2 * step], q3 = p[3 * step]; - if ((4 * VP8kabs0[p0 - q0] + VP8kabs0[p1 - q1]) > t) return 0; - return VP8kabs0[p3 - p2] <= it && VP8kabs0[p2 - p1] <= it && - VP8kabs0[p1 - p0] <= it && VP8kabs0[q3 - q2] <= it && - VP8kabs0[q2 - q1] <= it && VP8kabs0[q1 - q0] <= it; -} -#endif // !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC - -//------------------------------------------------------------------------------ -// Simple In-loop filtering (Paragraph 15.2) - -#if !WEBP_NEON_OMIT_C_CODE -static void SimpleVFilter16_C(uint8_t* p, int stride, int thresh) { - int i; - const int thresh2 = 2 * thresh + 1; - for (i = 0; i < 16; ++i) { - if (NeedsFilter_C(p + i, stride, thresh2)) { - DoFilter2_C(p + i, stride); - } - } -} - -static void SimpleHFilter16_C(uint8_t* p, int stride, int thresh) { - int i; - const int thresh2 = 2 * thresh + 1; - for (i = 0; i < 16; ++i) { - if (NeedsFilter_C(p + i * stride, 1, thresh2)) { - DoFilter2_C(p + i * stride, 1); - } - } -} - -static void SimpleVFilter16i_C(uint8_t* p, int stride, int thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4 * stride; - SimpleVFilter16_C(p, stride, thresh); - } -} - -static void SimpleHFilter16i_C(uint8_t* p, int stride, int thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4; - SimpleHFilter16_C(p, stride, thresh); - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -//------------------------------------------------------------------------------ -// Complex In-loop filtering (Paragraph 15.3) - -#if !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC -static WEBP_INLINE void FilterLoop26_C(uint8_t* p, - int hstride, int vstride, int size, - int thresh, int ithresh, - int hev_thresh) { - const int thresh2 = 2 * thresh + 1; - while (size-- > 0) { - if (NeedsFilter2_C(p, hstride, thresh2, ithresh)) { - if (Hev(p, hstride, hev_thresh)) { - DoFilter2_C(p, hstride); - } else { - DoFilter6_C(p, hstride); - } - } - p += vstride; - } -} - -static WEBP_INLINE void FilterLoop24_C(uint8_t* p, - int hstride, int vstride, int size, - int thresh, int ithresh, - int hev_thresh) { - const int thresh2 = 2 * thresh + 1; - while (size-- > 0) { - if (NeedsFilter2_C(p, hstride, thresh2, ithresh)) { - if (Hev(p, hstride, hev_thresh)) { - DoFilter2_C(p, hstride); - } else { - DoFilter4_C(p, hstride); - } - } - p += vstride; - } -} -#endif // !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC - -#if !WEBP_NEON_OMIT_C_CODE -// on macroblock edges -static void VFilter16_C(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26_C(p, stride, 1, 16, thresh, ithresh, hev_thresh); -} - -static void HFilter16_C(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26_C(p, 1, stride, 16, thresh, ithresh, hev_thresh); -} - -// on three inner edges -static void VFilter16i_C(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4 * stride; - FilterLoop24_C(p, stride, 1, 16, thresh, ithresh, hev_thresh); - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -#if !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC -static void HFilter16i_C(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4; - FilterLoop24_C(p, 1, stride, 16, thresh, ithresh, hev_thresh); - } -} -#endif // !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC - -#if !WEBP_NEON_OMIT_C_CODE -// 8-pixels wide variant, for chroma filtering -static void VFilter8_C(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26_C(u, stride, 1, 8, thresh, ithresh, hev_thresh); - FilterLoop26_C(v, stride, 1, 8, thresh, ithresh, hev_thresh); -} -#endif // !WEBP_NEON_OMIT_C_CODE - -#if !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC -static void HFilter8_C(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26_C(u, 1, stride, 8, thresh, ithresh, hev_thresh); - FilterLoop26_C(v, 1, stride, 8, thresh, ithresh, hev_thresh); -} -#endif // !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC - -#if !WEBP_NEON_OMIT_C_CODE -static void VFilter8i_C(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop24_C(u + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh); - FilterLoop24_C(v + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh); -} -#endif // !WEBP_NEON_OMIT_C_CODE - -#if !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC -static void HFilter8i_C(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop24_C(u + 4, 1, stride, 8, thresh, ithresh, hev_thresh); - FilterLoop24_C(v + 4, 1, stride, 8, thresh, ithresh, hev_thresh); -} -#endif // !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC - -//------------------------------------------------------------------------------ - -static void DitherCombine8x8_C(const uint8_t* dither, uint8_t* dst, - int dst_stride) { - int i, j; - for (j = 0; j < 8; ++j) { - for (i = 0; i < 8; ++i) { - const int delta0 = dither[i] - VP8_DITHER_AMP_CENTER; - const int delta1 = - (delta0 + VP8_DITHER_DESCALE_ROUNDER) >> VP8_DITHER_DESCALE; - dst[i] = clip_8b((int)dst[i] + delta1); - } - dst += dst_stride; - dither += 8; - } -} - -//------------------------------------------------------------------------------ - -VP8DecIdct2 VP8Transform; -VP8DecIdct VP8TransformAC3; -VP8DecIdct VP8TransformUV; -VP8DecIdct VP8TransformDC; -VP8DecIdct VP8TransformDCUV; - -VP8LumaFilterFunc VP8VFilter16; -VP8LumaFilterFunc VP8HFilter16; -VP8ChromaFilterFunc VP8VFilter8; -VP8ChromaFilterFunc VP8HFilter8; -VP8LumaFilterFunc VP8VFilter16i; -VP8LumaFilterFunc VP8HFilter16i; -VP8ChromaFilterFunc VP8VFilter8i; -VP8ChromaFilterFunc VP8HFilter8i; -VP8SimpleFilterFunc VP8SimpleVFilter16; -VP8SimpleFilterFunc VP8SimpleHFilter16; -VP8SimpleFilterFunc VP8SimpleVFilter16i; -VP8SimpleFilterFunc VP8SimpleHFilter16i; - -void (*VP8DitherCombine8x8)(const uint8_t* dither, uint8_t* dst, - int dst_stride); - -extern void VP8DspInitSSE2(void); -extern void VP8DspInitSSE41(void); -extern void VP8DspInitNEON(void); -extern void VP8DspInitMIPS32(void); -extern void VP8DspInitMIPSdspR2(void); -extern void VP8DspInitMSA(void); - -WEBP_DSP_INIT_FUNC(VP8DspInit) { - VP8InitClipTables(); - -#if !WEBP_NEON_OMIT_C_CODE - VP8TransformWHT = TransformWHT_C; - VP8Transform = TransformTwo_C; - VP8TransformDC = TransformDC_C; - VP8TransformAC3 = TransformAC3_C; -#endif - VP8TransformUV = TransformUV_C; - VP8TransformDCUV = TransformDCUV_C; - -#if !WEBP_NEON_OMIT_C_CODE - VP8VFilter16 = VFilter16_C; - VP8VFilter16i = VFilter16i_C; - VP8HFilter16 = HFilter16_C; - VP8VFilter8 = VFilter8_C; - VP8VFilter8i = VFilter8i_C; - VP8SimpleVFilter16 = SimpleVFilter16_C; - VP8SimpleHFilter16 = SimpleHFilter16_C; - VP8SimpleVFilter16i = SimpleVFilter16i_C; - VP8SimpleHFilter16i = SimpleHFilter16i_C; -#endif - -#if !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC - VP8HFilter16i = HFilter16i_C; - VP8HFilter8 = HFilter8_C; - VP8HFilter8i = HFilter8i_C; -#endif - -#if !WEBP_NEON_OMIT_C_CODE - VP8PredLuma4[0] = DC4_C; - VP8PredLuma4[1] = TM4_C; - VP8PredLuma4[2] = VE4_C; - VP8PredLuma4[4] = RD4_C; - VP8PredLuma4[6] = LD4_C; -#endif - - VP8PredLuma4[3] = HE4_C; - VP8PredLuma4[5] = VR4_C; - VP8PredLuma4[7] = VL4_C; - VP8PredLuma4[8] = HD4_C; - VP8PredLuma4[9] = HU4_C; - -#if !WEBP_NEON_OMIT_C_CODE - VP8PredLuma16[0] = DC16_C; - VP8PredLuma16[1] = TM16_C; - VP8PredLuma16[2] = VE16_C; - VP8PredLuma16[3] = HE16_C; - VP8PredLuma16[4] = DC16NoTop_C; - VP8PredLuma16[5] = DC16NoLeft_C; - VP8PredLuma16[6] = DC16NoTopLeft_C; - - VP8PredChroma8[0] = DC8uv_C; - VP8PredChroma8[1] = TM8uv_C; - VP8PredChroma8[2] = VE8uv_C; - VP8PredChroma8[3] = HE8uv_C; - VP8PredChroma8[4] = DC8uvNoTop_C; - VP8PredChroma8[5] = DC8uvNoLeft_C; - VP8PredChroma8[6] = DC8uvNoTopLeft_C; -#endif - - VP8DitherCombine8x8 = DitherCombine8x8_C; - - // If defined, use CPUInfo() to overwrite some pointers with faster versions. - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - VP8DspInitSSE2(); -#if defined(WEBP_USE_SSE41) - if (VP8GetCPUInfo(kSSE4_1)) { - VP8DspInitSSE41(); - } -#endif - } -#endif -#if defined(WEBP_USE_MIPS32) - if (VP8GetCPUInfo(kMIPS32)) { - VP8DspInitMIPS32(); - } -#endif -#if defined(WEBP_USE_MIPS_DSP_R2) - if (VP8GetCPUInfo(kMIPSdspR2)) { - VP8DspInitMIPSdspR2(); - } -#endif -#if defined(WEBP_USE_MSA) - if (VP8GetCPUInfo(kMSA)) { - VP8DspInitMSA(); - } -#endif - } - -#if defined(WEBP_USE_NEON) - if (WEBP_NEON_OMIT_C_CODE || - (VP8GetCPUInfo != NULL && VP8GetCPUInfo(kNEON))) { - VP8DspInitNEON(); - } -#endif - - assert(VP8TransformWHT != NULL); - assert(VP8Transform != NULL); - assert(VP8TransformDC != NULL); - assert(VP8TransformAC3 != NULL); - assert(VP8TransformUV != NULL); - assert(VP8TransformDCUV != NULL); - assert(VP8VFilter16 != NULL); - assert(VP8HFilter16 != NULL); - assert(VP8VFilter8 != NULL); - assert(VP8HFilter8 != NULL); - assert(VP8VFilter16i != NULL); - assert(VP8HFilter16i != NULL); - assert(VP8VFilter8i != NULL); - assert(VP8HFilter8i != NULL); - assert(VP8SimpleVFilter16 != NULL); - assert(VP8SimpleHFilter16 != NULL); - assert(VP8SimpleVFilter16i != NULL); - assert(VP8SimpleHFilter16i != NULL); - assert(VP8PredLuma4[0] != NULL); - assert(VP8PredLuma4[1] != NULL); - assert(VP8PredLuma4[2] != NULL); - assert(VP8PredLuma4[3] != NULL); - assert(VP8PredLuma4[4] != NULL); - assert(VP8PredLuma4[5] != NULL); - assert(VP8PredLuma4[6] != NULL); - assert(VP8PredLuma4[7] != NULL); - assert(VP8PredLuma4[8] != NULL); - assert(VP8PredLuma4[9] != NULL); - assert(VP8PredLuma16[0] != NULL); - assert(VP8PredLuma16[1] != NULL); - assert(VP8PredLuma16[2] != NULL); - assert(VP8PredLuma16[3] != NULL); - assert(VP8PredLuma16[4] != NULL); - assert(VP8PredLuma16[5] != NULL); - assert(VP8PredLuma16[6] != NULL); - assert(VP8PredChroma8[0] != NULL); - assert(VP8PredChroma8[1] != NULL); - assert(VP8PredChroma8[2] != NULL); - assert(VP8PredChroma8[3] != NULL); - assert(VP8PredChroma8[4] != NULL); - assert(VP8PredChroma8[5] != NULL); - assert(VP8PredChroma8[6] != NULL); - assert(VP8DitherCombine8x8 != NULL); -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_clip_tables.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_clip_tables.c deleted file mode 100644 index 5a9baf3..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_clip_tables.c +++ /dev/null @@ -1,369 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Clipping tables for filtering -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -// define to 0 to have run-time table initialization -#if !defined(USE_STATIC_TABLES) -#define USE_STATIC_TABLES 1 // ALTERNATE_CODE -#endif - -#if (USE_STATIC_TABLES == 1) - -static const uint8_t abs0[255 + 255 + 1] = { - 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, - 0xf3, 0xf2, 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec, 0xeb, 0xea, 0xe9, 0xe8, - 0xe7, 0xe6, 0xe5, 0xe4, 0xe3, 0xe2, 0xe1, 0xe0, 0xdf, 0xde, 0xdd, 0xdc, - 0xdb, 0xda, 0xd9, 0xd8, 0xd7, 0xd6, 0xd5, 0xd4, 0xd3, 0xd2, 0xd1, 0xd0, - 0xcf, 0xce, 0xcd, 0xcc, 0xcb, 0xca, 0xc9, 0xc8, 0xc7, 0xc6, 0xc5, 0xc4, - 0xc3, 0xc2, 0xc1, 0xc0, 0xbf, 0xbe, 0xbd, 0xbc, 0xbb, 0xba, 0xb9, 0xb8, - 0xb7, 0xb6, 0xb5, 0xb4, 0xb3, 0xb2, 0xb1, 0xb0, 0xaf, 0xae, 0xad, 0xac, - 0xab, 0xaa, 0xa9, 0xa8, 0xa7, 0xa6, 0xa5, 0xa4, 0xa3, 0xa2, 0xa1, 0xa0, - 0x9f, 0x9e, 0x9d, 0x9c, 0x9b, 0x9a, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, - 0x93, 0x92, 0x91, 0x90, 0x8f, 0x8e, 0x8d, 0x8c, 0x8b, 0x8a, 0x89, 0x88, - 0x87, 0x86, 0x85, 0x84, 0x83, 0x82, 0x81, 0x80, 0x7f, 0x7e, 0x7d, 0x7c, - 0x7b, 0x7a, 0x79, 0x78, 0x77, 0x76, 0x75, 0x74, 0x73, 0x72, 0x71, 0x70, - 0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x69, 0x68, 0x67, 0x66, 0x65, 0x64, - 0x63, 0x62, 0x61, 0x60, 0x5f, 0x5e, 0x5d, 0x5c, 0x5b, 0x5a, 0x59, 0x58, - 0x57, 0x56, 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, 0x34, - 0x33, 0x32, 0x31, 0x30, 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, - 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1f, 0x1e, 0x1d, 0x1c, - 0x1b, 0x1a, 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, - 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, - 0x03, 0x02, 0x01, 0x00, 0x01, 0x02, 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, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, - 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, - 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, - 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, - 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, - 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, - 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, - 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, - 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, - 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, - 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, - 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff -}; - -static const uint8_t sclip1[1020 + 1020 + 1] = { - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, - 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, - 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, - 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, - 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, - 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - 0x00, 0x01, 0x02, 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, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, - 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f -}; - -static const uint8_t sclip2[112 + 112 + 1] = { - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, - 0xfc, 0xfd, 0xfe, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f -}; - -static const uint8_t clip1[255 + 511 + 1] = { - 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, 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, - 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, 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, - 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, 0x01, 0x02, 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, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, - 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, - 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, - 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, - 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, - 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, - 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, - 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, - 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, - 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, - 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, - 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -}; - -#else - -// uninitialized tables -static uint8_t abs0[255 + 255 + 1]; -static int8_t sclip1[1020 + 1020 + 1]; -static int8_t sclip2[112 + 112 + 1]; -static uint8_t clip1[255 + 511 + 1]; - -// We declare this variable 'volatile' to prevent instruction reordering -// and make sure it's set to true _last_ (so as to be thread-safe) -static volatile int tables_ok = 0; - -#endif // USE_STATIC_TABLES - -const int8_t* const VP8ksclip1 = (const int8_t*)&sclip1[1020]; -const int8_t* const VP8ksclip2 = (const int8_t*)&sclip2[112]; -const uint8_t* const VP8kclip1 = &clip1[255]; -const uint8_t* const VP8kabs0 = &abs0[255]; - -WEBP_TSAN_IGNORE_FUNCTION void VP8InitClipTables(void) { -#if (USE_STATIC_TABLES == 0) - int i; - if (!tables_ok) { - for (i = -255; i <= 255; ++i) { - abs0[255 + i] = (i < 0) ? -i : i; - } - for (i = -1020; i <= 1020; ++i) { - sclip1[1020 + i] = (i < -128) ? -128 : (i > 127) ? 127 : i; - } - for (i = -112; i <= 112; ++i) { - sclip2[112 + i] = (i < -16) ? -16 : (i > 15) ? 15 : i; - } - for (i = -255; i <= 255 + 255; ++i) { - clip1[255 + i] = (i < 0) ? 0 : (i > 255) ? 255 : i; - } - tables_ok = 1; - } -#endif // USE_STATIC_TABLES -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_mips32.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_mips32.c deleted file mode 100644 index 3e6473d..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_mips32.c +++ /dev/null @@ -1,587 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MIPS version of dsp functions -// -// Author(s): Djordje Pesut (djordje.pesut@imgtec.com) -// Jovan Zelincevic (jovan.zelincevic@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS32) - -#include "src/dsp/mips_macro.h" - -static const int kC1 = 20091 + (1 << 16); -static const int kC2 = 35468; - -static WEBP_INLINE int abs_mips32(int x) { - const int sign = x >> 31; - return (x ^ sign) - sign; -} - -// 4 pixels in, 2 pixels out -static WEBP_INLINE void do_filter2(uint8_t* p, int step) { - const int p1 = p[-2 * step], p0 = p[-step], q0 = p[0], q1 = p[step]; - const int a = 3 * (q0 - p0) + VP8ksclip1[p1 - q1]; - const int a1 = VP8ksclip2[(a + 4) >> 3]; - const int a2 = VP8ksclip2[(a + 3) >> 3]; - p[-step] = VP8kclip1[p0 + a2]; - p[ 0] = VP8kclip1[q0 - a1]; -} - -// 4 pixels in, 4 pixels out -static WEBP_INLINE void do_filter4(uint8_t* p, int step) { - const int p1 = p[-2 * step], p0 = p[-step], q0 = p[0], q1 = p[step]; - const int a = 3 * (q0 - p0); - const int a1 = VP8ksclip2[(a + 4) >> 3]; - const int a2 = VP8ksclip2[(a + 3) >> 3]; - const int a3 = (a1 + 1) >> 1; - p[-2 * step] = VP8kclip1[p1 + a3]; - p[- step] = VP8kclip1[p0 + a2]; - p[ 0] = VP8kclip1[q0 - a1]; - p[ step] = VP8kclip1[q1 - a3]; -} - -// 6 pixels in, 6 pixels out -static WEBP_INLINE void do_filter6(uint8_t* p, int step) { - const int p2 = p[-3 * step], p1 = p[-2 * step], p0 = p[-step]; - const int q0 = p[0], q1 = p[step], q2 = p[2 * step]; - const int a = VP8ksclip1[3 * (q0 - p0) + VP8ksclip1[p1 - q1]]; - // a is in [-128,127], a1 in [-27,27], a2 in [-18,18] and a3 in [-9,9] - const int a1 = (27 * a + 63) >> 7; // eq. to ((3 * a + 7) * 9) >> 7 - const int a2 = (18 * a + 63) >> 7; // eq. to ((2 * a + 7) * 9) >> 7 - const int a3 = (9 * a + 63) >> 7; // eq. to ((1 * a + 7) * 9) >> 7 - p[-3 * step] = VP8kclip1[p2 + a3]; - p[-2 * step] = VP8kclip1[p1 + a2]; - p[- step] = VP8kclip1[p0 + a1]; - p[ 0] = VP8kclip1[q0 - a1]; - p[ step] = VP8kclip1[q1 - a2]; - p[ 2 * step] = VP8kclip1[q2 - a3]; -} - -static WEBP_INLINE int hev(const uint8_t* p, int step, int thresh) { - const int p1 = p[-2 * step], p0 = p[-step], q0 = p[0], q1 = p[step]; - return (abs_mips32(p1 - p0) > thresh) || (abs_mips32(q1 - q0) > thresh); -} - -static WEBP_INLINE int needs_filter(const uint8_t* p, int step, int t) { - const int p1 = p[-2 * step], p0 = p[-step], q0 = p[0], q1 = p[step]; - return ((4 * abs_mips32(p0 - q0) + abs_mips32(p1 - q1)) <= t); -} - -static WEBP_INLINE int needs_filter2(const uint8_t* p, - int step, int t, int it) { - const int p3 = p[-4 * step], p2 = p[-3 * step]; - const int p1 = p[-2 * step], p0 = p[-step]; - const int q0 = p[0], q1 = p[step], q2 = p[2 * step], q3 = p[3 * step]; - if ((4 * abs_mips32(p0 - q0) + abs_mips32(p1 - q1)) > t) { - return 0; - } - return abs_mips32(p3 - p2) <= it && abs_mips32(p2 - p1) <= it && - abs_mips32(p1 - p0) <= it && abs_mips32(q3 - q2) <= it && - abs_mips32(q2 - q1) <= it && abs_mips32(q1 - q0) <= it; -} - -static WEBP_INLINE void FilterLoop26(uint8_t* p, - int hstride, int vstride, int size, - int thresh, int ithresh, int hev_thresh) { - const int thresh2 = 2 * thresh + 1; - while (size-- > 0) { - if (needs_filter2(p, hstride, thresh2, ithresh)) { - if (hev(p, hstride, hev_thresh)) { - do_filter2(p, hstride); - } else { - do_filter6(p, hstride); - } - } - p += vstride; - } -} - -static WEBP_INLINE void FilterLoop24(uint8_t* p, - int hstride, int vstride, int size, - int thresh, int ithresh, int hev_thresh) { - const int thresh2 = 2 * thresh + 1; - while (size-- > 0) { - if (needs_filter2(p, hstride, thresh2, ithresh)) { - if (hev(p, hstride, hev_thresh)) { - do_filter2(p, hstride); - } else { - do_filter4(p, hstride); - } - } - p += vstride; - } -} - -// on macroblock edges -static void VFilter16(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26(p, stride, 1, 16, thresh, ithresh, hev_thresh); -} - -static void HFilter16(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26(p, 1, stride, 16, thresh, ithresh, hev_thresh); -} - -// 8-pixels wide variant, for chroma filtering -static void VFilter8(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26(u, stride, 1, 8, thresh, ithresh, hev_thresh); - FilterLoop26(v, stride, 1, 8, thresh, ithresh, hev_thresh); -} - -static void HFilter8(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26(u, 1, stride, 8, thresh, ithresh, hev_thresh); - FilterLoop26(v, 1, stride, 8, thresh, ithresh, hev_thresh); -} - -static void VFilter8i(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop24(u + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh); - FilterLoop24(v + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh); -} - -static void HFilter8i(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop24(u + 4, 1, stride, 8, thresh, ithresh, hev_thresh); - FilterLoop24(v + 4, 1, stride, 8, thresh, ithresh, hev_thresh); -} - -// on three inner edges -static void VFilter16i(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4 * stride; - FilterLoop24(p, stride, 1, 16, thresh, ithresh, hev_thresh); - } -} - -static void HFilter16i(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4; - FilterLoop24(p, 1, stride, 16, thresh, ithresh, hev_thresh); - } -} - -//------------------------------------------------------------------------------ -// Simple In-loop filtering (Paragraph 15.2) - -static void SimpleVFilter16(uint8_t* p, int stride, int thresh) { - int i; - const int thresh2 = 2 * thresh + 1; - for (i = 0; i < 16; ++i) { - if (needs_filter(p + i, stride, thresh2)) { - do_filter2(p + i, stride); - } - } -} - -static void SimpleHFilter16(uint8_t* p, int stride, int thresh) { - int i; - const int thresh2 = 2 * thresh + 1; - for (i = 0; i < 16; ++i) { - if (needs_filter(p + i * stride, 1, thresh2)) { - do_filter2(p + i * stride, 1); - } - } -} - -static void SimpleVFilter16i(uint8_t* p, int stride, int thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4 * stride; - SimpleVFilter16(p, stride, thresh); - } -} - -static void SimpleHFilter16i(uint8_t* p, int stride, int thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4; - SimpleHFilter16(p, stride, thresh); - } -} - -static void TransformOne(const int16_t* in, uint8_t* dst) { - int temp0, temp1, temp2, temp3, temp4; - int temp5, temp6, temp7, temp8, temp9; - int temp10, temp11, temp12, temp13, temp14; - int temp15, temp16, temp17, temp18; - int16_t* p_in = (int16_t*)in; - - // loops unrolled and merged to avoid usage of tmp buffer - // and to reduce number of stalls. MUL macro is written - // in assembler and inlined - __asm__ volatile( - "lh %[temp0], 0(%[in]) \n\t" - "lh %[temp8], 16(%[in]) \n\t" - "lh %[temp4], 8(%[in]) \n\t" - "lh %[temp12], 24(%[in]) \n\t" - "addu %[temp16], %[temp0], %[temp8] \n\t" - "subu %[temp0], %[temp0], %[temp8] \n\t" - "mul %[temp8], %[temp4], %[kC2] \n\t" - "mul %[temp17], %[temp12], %[kC1] \n\t" - "mul %[temp4], %[temp4], %[kC1] \n\t" - "mul %[temp12], %[temp12], %[kC2] \n\t" - "lh %[temp1], 2(%[in]) \n\t" - "lh %[temp5], 10(%[in]) \n\t" - "lh %[temp9], 18(%[in]) \n\t" - "lh %[temp13], 26(%[in]) \n\t" - "sra %[temp8], %[temp8], 16 \n\t" - "sra %[temp17], %[temp17], 16 \n\t" - "sra %[temp4], %[temp4], 16 \n\t" - "sra %[temp12], %[temp12], 16 \n\t" - "lh %[temp2], 4(%[in]) \n\t" - "lh %[temp6], 12(%[in]) \n\t" - "lh %[temp10], 20(%[in]) \n\t" - "lh %[temp14], 28(%[in]) \n\t" - "subu %[temp17], %[temp8], %[temp17] \n\t" - "addu %[temp4], %[temp4], %[temp12] \n\t" - "addu %[temp8], %[temp16], %[temp4] \n\t" - "subu %[temp4], %[temp16], %[temp4] \n\t" - "addu %[temp16], %[temp1], %[temp9] \n\t" - "subu %[temp1], %[temp1], %[temp9] \n\t" - "lh %[temp3], 6(%[in]) \n\t" - "lh %[temp7], 14(%[in]) \n\t" - "lh %[temp11], 22(%[in]) \n\t" - "lh %[temp15], 30(%[in]) \n\t" - "addu %[temp12], %[temp0], %[temp17] \n\t" - "subu %[temp0], %[temp0], %[temp17] \n\t" - "mul %[temp9], %[temp5], %[kC2] \n\t" - "mul %[temp17], %[temp13], %[kC1] \n\t" - "mul %[temp5], %[temp5], %[kC1] \n\t" - "mul %[temp13], %[temp13], %[kC2] \n\t" - "sra %[temp9], %[temp9], 16 \n\t" - "sra %[temp17], %[temp17], 16 \n\t" - "subu %[temp17], %[temp9], %[temp17] \n\t" - "sra %[temp5], %[temp5], 16 \n\t" - "sra %[temp13], %[temp13], 16 \n\t" - "addu %[temp5], %[temp5], %[temp13] \n\t" - "addu %[temp13], %[temp1], %[temp17] \n\t" - "subu %[temp1], %[temp1], %[temp17] \n\t" - "mul %[temp17], %[temp14], %[kC1] \n\t" - "mul %[temp14], %[temp14], %[kC2] \n\t" - "addu %[temp9], %[temp16], %[temp5] \n\t" - "subu %[temp5], %[temp16], %[temp5] \n\t" - "addu %[temp16], %[temp2], %[temp10] \n\t" - "subu %[temp2], %[temp2], %[temp10] \n\t" - "mul %[temp10], %[temp6], %[kC2] \n\t" - "mul %[temp6], %[temp6], %[kC1] \n\t" - "sra %[temp17], %[temp17], 16 \n\t" - "sra %[temp14], %[temp14], 16 \n\t" - "sra %[temp10], %[temp10], 16 \n\t" - "sra %[temp6], %[temp6], 16 \n\t" - "subu %[temp17], %[temp10], %[temp17] \n\t" - "addu %[temp6], %[temp6], %[temp14] \n\t" - "addu %[temp10], %[temp16], %[temp6] \n\t" - "subu %[temp6], %[temp16], %[temp6] \n\t" - "addu %[temp14], %[temp2], %[temp17] \n\t" - "subu %[temp2], %[temp2], %[temp17] \n\t" - "mul %[temp17], %[temp15], %[kC1] \n\t" - "mul %[temp15], %[temp15], %[kC2] \n\t" - "addu %[temp16], %[temp3], %[temp11] \n\t" - "subu %[temp3], %[temp3], %[temp11] \n\t" - "mul %[temp11], %[temp7], %[kC2] \n\t" - "mul %[temp7], %[temp7], %[kC1] \n\t" - "addiu %[temp8], %[temp8], 4 \n\t" - "addiu %[temp12], %[temp12], 4 \n\t" - "addiu %[temp0], %[temp0], 4 \n\t" - "addiu %[temp4], %[temp4], 4 \n\t" - "sra %[temp17], %[temp17], 16 \n\t" - "sra %[temp15], %[temp15], 16 \n\t" - "sra %[temp11], %[temp11], 16 \n\t" - "sra %[temp7], %[temp7], 16 \n\t" - "subu %[temp17], %[temp11], %[temp17] \n\t" - "addu %[temp7], %[temp7], %[temp15] \n\t" - "addu %[temp15], %[temp3], %[temp17] \n\t" - "subu %[temp3], %[temp3], %[temp17] \n\t" - "addu %[temp11], %[temp16], %[temp7] \n\t" - "subu %[temp7], %[temp16], %[temp7] \n\t" - "addu %[temp16], %[temp8], %[temp10] \n\t" - "subu %[temp8], %[temp8], %[temp10] \n\t" - "mul %[temp10], %[temp9], %[kC2] \n\t" - "mul %[temp17], %[temp11], %[kC1] \n\t" - "mul %[temp9], %[temp9], %[kC1] \n\t" - "mul %[temp11], %[temp11], %[kC2] \n\t" - "sra %[temp10], %[temp10], 16 \n\t" - "sra %[temp17], %[temp17], 16 \n\t" - "sra %[temp9], %[temp9], 16 \n\t" - "sra %[temp11], %[temp11], 16 \n\t" - "subu %[temp17], %[temp10], %[temp17] \n\t" - "addu %[temp11], %[temp9], %[temp11] \n\t" - "addu %[temp10], %[temp12], %[temp14] \n\t" - "subu %[temp12], %[temp12], %[temp14] \n\t" - "mul %[temp14], %[temp13], %[kC2] \n\t" - "mul %[temp9], %[temp15], %[kC1] \n\t" - "mul %[temp13], %[temp13], %[kC1] \n\t" - "mul %[temp15], %[temp15], %[kC2] \n\t" - "sra %[temp14], %[temp14], 16 \n\t" - "sra %[temp9], %[temp9], 16 \n\t" - "sra %[temp13], %[temp13], 16 \n\t" - "sra %[temp15], %[temp15], 16 \n\t" - "subu %[temp9], %[temp14], %[temp9] \n\t" - "addu %[temp15], %[temp13], %[temp15] \n\t" - "addu %[temp14], %[temp0], %[temp2] \n\t" - "subu %[temp0], %[temp0], %[temp2] \n\t" - "mul %[temp2], %[temp1], %[kC2] \n\t" - "mul %[temp13], %[temp3], %[kC1] \n\t" - "mul %[temp1], %[temp1], %[kC1] \n\t" - "mul %[temp3], %[temp3], %[kC2] \n\t" - "sra %[temp2], %[temp2], 16 \n\t" - "sra %[temp13], %[temp13], 16 \n\t" - "sra %[temp1], %[temp1], 16 \n\t" - "sra %[temp3], %[temp3], 16 \n\t" - "subu %[temp13], %[temp2], %[temp13] \n\t" - "addu %[temp3], %[temp1], %[temp3] \n\t" - "addu %[temp2], %[temp4], %[temp6] \n\t" - "subu %[temp4], %[temp4], %[temp6] \n\t" - "mul %[temp6], %[temp5], %[kC2] \n\t" - "mul %[temp1], %[temp7], %[kC1] \n\t" - "mul %[temp5], %[temp5], %[kC1] \n\t" - "mul %[temp7], %[temp7], %[kC2] \n\t" - "sra %[temp6], %[temp6], 16 \n\t" - "sra %[temp1], %[temp1], 16 \n\t" - "sra %[temp5], %[temp5], 16 \n\t" - "sra %[temp7], %[temp7], 16 \n\t" - "subu %[temp1], %[temp6], %[temp1] \n\t" - "addu %[temp7], %[temp5], %[temp7] \n\t" - "addu %[temp5], %[temp16], %[temp11] \n\t" - "subu %[temp16], %[temp16], %[temp11] \n\t" - "addu %[temp11], %[temp8], %[temp17] \n\t" - "subu %[temp8], %[temp8], %[temp17] \n\t" - "sra %[temp5], %[temp5], 3 \n\t" - "sra %[temp16], %[temp16], 3 \n\t" - "sra %[temp11], %[temp11], 3 \n\t" - "sra %[temp8], %[temp8], 3 \n\t" - "addu %[temp17], %[temp10], %[temp15] \n\t" - "subu %[temp10], %[temp10], %[temp15] \n\t" - "addu %[temp15], %[temp12], %[temp9] \n\t" - "subu %[temp12], %[temp12], %[temp9] \n\t" - "sra %[temp17], %[temp17], 3 \n\t" - "sra %[temp10], %[temp10], 3 \n\t" - "sra %[temp15], %[temp15], 3 \n\t" - "sra %[temp12], %[temp12], 3 \n\t" - "addu %[temp9], %[temp14], %[temp3] \n\t" - "subu %[temp14], %[temp14], %[temp3] \n\t" - "addu %[temp3], %[temp0], %[temp13] \n\t" - "subu %[temp0], %[temp0], %[temp13] \n\t" - "sra %[temp9], %[temp9], 3 \n\t" - "sra %[temp14], %[temp14], 3 \n\t" - "sra %[temp3], %[temp3], 3 \n\t" - "sra %[temp0], %[temp0], 3 \n\t" - "addu %[temp13], %[temp2], %[temp7] \n\t" - "subu %[temp2], %[temp2], %[temp7] \n\t" - "addu %[temp7], %[temp4], %[temp1] \n\t" - "subu %[temp4], %[temp4], %[temp1] \n\t" - "sra %[temp13], %[temp13], 3 \n\t" - "sra %[temp2], %[temp2], 3 \n\t" - "sra %[temp7], %[temp7], 3 \n\t" - "sra %[temp4], %[temp4], 3 \n\t" - "addiu %[temp6], $zero, 255 \n\t" - "lbu %[temp1], 0+0*" XSTR(BPS) "(%[dst]) \n\t" - "addu %[temp1], %[temp1], %[temp5] \n\t" - "sra %[temp5], %[temp1], 8 \n\t" - "sra %[temp18], %[temp1], 31 \n\t" - "beqz %[temp5], 1f \n\t" - "xor %[temp1], %[temp1], %[temp1] \n\t" - "movz %[temp1], %[temp6], %[temp18] \n\t" - "1: \n\t" - "lbu %[temp18], 1+0*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp1], 0+0*" XSTR(BPS) "(%[dst]) \n\t" - "addu %[temp18], %[temp18], %[temp11] \n\t" - "sra %[temp11], %[temp18], 8 \n\t" - "sra %[temp1], %[temp18], 31 \n\t" - "beqz %[temp11], 2f \n\t" - "xor %[temp18], %[temp18], %[temp18] \n\t" - "movz %[temp18], %[temp6], %[temp1] \n\t" - "2: \n\t" - "lbu %[temp1], 2+0*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp18], 1+0*" XSTR(BPS) "(%[dst]) \n\t" - "addu %[temp1], %[temp1], %[temp8] \n\t" - "sra %[temp8], %[temp1], 8 \n\t" - "sra %[temp18], %[temp1], 31 \n\t" - "beqz %[temp8], 3f \n\t" - "xor %[temp1], %[temp1], %[temp1] \n\t" - "movz %[temp1], %[temp6], %[temp18] \n\t" - "3: \n\t" - "lbu %[temp18], 3+0*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp1], 2+0*" XSTR(BPS) "(%[dst]) \n\t" - "addu %[temp18], %[temp18], %[temp16] \n\t" - "sra %[temp16], %[temp18], 8 \n\t" - "sra %[temp1], %[temp18], 31 \n\t" - "beqz %[temp16], 4f \n\t" - "xor %[temp18], %[temp18], %[temp18] \n\t" - "movz %[temp18], %[temp6], %[temp1] \n\t" - "4: \n\t" - "sb %[temp18], 3+0*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp5], 0+1*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp8], 1+1*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp11], 2+1*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp16], 3+1*" XSTR(BPS) "(%[dst]) \n\t" - "addu %[temp5], %[temp5], %[temp17] \n\t" - "addu %[temp8], %[temp8], %[temp15] \n\t" - "addu %[temp11], %[temp11], %[temp12] \n\t" - "addu %[temp16], %[temp16], %[temp10] \n\t" - "sra %[temp18], %[temp5], 8 \n\t" - "sra %[temp1], %[temp5], 31 \n\t" - "beqz %[temp18], 5f \n\t" - "xor %[temp5], %[temp5], %[temp5] \n\t" - "movz %[temp5], %[temp6], %[temp1] \n\t" - "5: \n\t" - "sra %[temp18], %[temp8], 8 \n\t" - "sra %[temp1], %[temp8], 31 \n\t" - "beqz %[temp18], 6f \n\t" - "xor %[temp8], %[temp8], %[temp8] \n\t" - "movz %[temp8], %[temp6], %[temp1] \n\t" - "6: \n\t" - "sra %[temp18], %[temp11], 8 \n\t" - "sra %[temp1], %[temp11], 31 \n\t" - "sra %[temp17], %[temp16], 8 \n\t" - "sra %[temp15], %[temp16], 31 \n\t" - "beqz %[temp18], 7f \n\t" - "xor %[temp11], %[temp11], %[temp11] \n\t" - "movz %[temp11], %[temp6], %[temp1] \n\t" - "7: \n\t" - "beqz %[temp17], 8f \n\t" - "xor %[temp16], %[temp16], %[temp16] \n\t" - "movz %[temp16], %[temp6], %[temp15] \n\t" - "8: \n\t" - "sb %[temp5], 0+1*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp8], 1+1*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp11], 2+1*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp16], 3+1*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp5], 0+2*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp8], 1+2*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp11], 2+2*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp16], 3+2*" XSTR(BPS) "(%[dst]) \n\t" - "addu %[temp5], %[temp5], %[temp9] \n\t" - "addu %[temp8], %[temp8], %[temp3] \n\t" - "addu %[temp11], %[temp11], %[temp0] \n\t" - "addu %[temp16], %[temp16], %[temp14] \n\t" - "sra %[temp18], %[temp5], 8 \n\t" - "sra %[temp1], %[temp5], 31 \n\t" - "sra %[temp17], %[temp8], 8 \n\t" - "sra %[temp15], %[temp8], 31 \n\t" - "sra %[temp12], %[temp11], 8 \n\t" - "sra %[temp10], %[temp11], 31 \n\t" - "sra %[temp9], %[temp16], 8 \n\t" - "sra %[temp3], %[temp16], 31 \n\t" - "beqz %[temp18], 9f \n\t" - "xor %[temp5], %[temp5], %[temp5] \n\t" - "movz %[temp5], %[temp6], %[temp1] \n\t" - "9: \n\t" - "beqz %[temp17], 10f \n\t" - "xor %[temp8], %[temp8], %[temp8] \n\t" - "movz %[temp8], %[temp6], %[temp15] \n\t" - "10: \n\t" - "beqz %[temp12], 11f \n\t" - "xor %[temp11], %[temp11], %[temp11] \n\t" - "movz %[temp11], %[temp6], %[temp10] \n\t" - "11: \n\t" - "beqz %[temp9], 12f \n\t" - "xor %[temp16], %[temp16], %[temp16] \n\t" - "movz %[temp16], %[temp6], %[temp3] \n\t" - "12: \n\t" - "sb %[temp5], 0+2*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp8], 1+2*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp11], 2+2*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp16], 3+2*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp5], 0+3*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp8], 1+3*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp11], 2+3*" XSTR(BPS) "(%[dst]) \n\t" - "lbu %[temp16], 3+3*" XSTR(BPS) "(%[dst]) \n\t" - "addu %[temp5], %[temp5], %[temp13] \n\t" - "addu %[temp8], %[temp8], %[temp7] \n\t" - "addu %[temp11], %[temp11], %[temp4] \n\t" - "addu %[temp16], %[temp16], %[temp2] \n\t" - "sra %[temp18], %[temp5], 8 \n\t" - "sra %[temp1], %[temp5], 31 \n\t" - "sra %[temp17], %[temp8], 8 \n\t" - "sra %[temp15], %[temp8], 31 \n\t" - "sra %[temp12], %[temp11], 8 \n\t" - "sra %[temp10], %[temp11], 31 \n\t" - "sra %[temp9], %[temp16], 8 \n\t" - "sra %[temp3], %[temp16], 31 \n\t" - "beqz %[temp18], 13f \n\t" - "xor %[temp5], %[temp5], %[temp5] \n\t" - "movz %[temp5], %[temp6], %[temp1] \n\t" - "13: \n\t" - "beqz %[temp17], 14f \n\t" - "xor %[temp8], %[temp8], %[temp8] \n\t" - "movz %[temp8], %[temp6], %[temp15] \n\t" - "14: \n\t" - "beqz %[temp12], 15f \n\t" - "xor %[temp11], %[temp11], %[temp11] \n\t" - "movz %[temp11], %[temp6], %[temp10] \n\t" - "15: \n\t" - "beqz %[temp9], 16f \n\t" - "xor %[temp16], %[temp16], %[temp16] \n\t" - "movz %[temp16], %[temp6], %[temp3] \n\t" - "16: \n\t" - "sb %[temp5], 0+3*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp8], 1+3*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp11], 2+3*" XSTR(BPS) "(%[dst]) \n\t" - "sb %[temp16], 3+3*" XSTR(BPS) "(%[dst]) \n\t" - - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [temp9]"=&r"(temp9), [temp10]"=&r"(temp10), [temp11]"=&r"(temp11), - [temp12]"=&r"(temp12), [temp13]"=&r"(temp13), [temp14]"=&r"(temp14), - [temp15]"=&r"(temp15), [temp16]"=&r"(temp16), [temp17]"=&r"(temp17), - [temp18]"=&r"(temp18) - : [in]"r"(p_in), [kC1]"r"(kC1), [kC2]"r"(kC2), [dst]"r"(dst) - : "memory", "hi", "lo" - ); -} - -static void TransformTwo(const int16_t* in, uint8_t* dst, int do_two) { - TransformOne(in, dst); - if (do_two) { - TransformOne(in + 16, dst + 4); - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8DspInitMIPS32(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitMIPS32(void) { - VP8InitClipTables(); - - VP8Transform = TransformTwo; - - VP8VFilter16 = VFilter16; - VP8HFilter16 = HFilter16; - VP8VFilter8 = VFilter8; - VP8HFilter8 = HFilter8; - VP8VFilter16i = VFilter16i; - VP8HFilter16i = HFilter16i; - VP8VFilter8i = VFilter8i; - VP8HFilter8i = HFilter8i; - - VP8SimpleVFilter16 = SimpleVFilter16; - VP8SimpleHFilter16 = SimpleHFilter16; - VP8SimpleVFilter16i = SimpleVFilter16i; - VP8SimpleHFilter16i = SimpleHFilter16i; -} - -#else // !WEBP_USE_MIPS32 - -WEBP_DSP_INIT_STUB(VP8DspInitMIPS32) - -#endif // WEBP_USE_MIPS32 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_mips_dsp_r2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_mips_dsp_r2.c deleted file mode 100644 index 15258f8..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_mips_dsp_r2.c +++ /dev/null @@ -1,994 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MIPS version of dsp functions -// -// Author(s): Djordje Pesut (djordje.pesut@imgtec.com) -// Jovan Zelincevic (jovan.zelincevic@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS_DSP_R2) - -#include "src/dsp/mips_macro.h" - -static const int kC1 = 20091 + (1 << 16); -static const int kC2 = 35468; - -#define MUL(a, b) (((a) * (b)) >> 16) - -static void TransformDC(const int16_t* in, uint8_t* dst) { - int temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10; - - __asm__ volatile ( - LOAD_WITH_OFFSET_X4(temp1, temp2, temp3, temp4, dst, - 0, 0, 0, 0, - 0, 1, 2, 3, - BPS) - "lh %[temp5], 0(%[in]) \n\t" - "addiu %[temp5], %[temp5], 4 \n\t" - "ins %[temp5], %[temp5], 16, 16 \n\t" - "shra.ph %[temp5], %[temp5], 3 \n\t" - CONVERT_2_BYTES_TO_HALF(temp6, temp7, temp8, temp9, temp10, temp1, temp2, - temp3, temp1, temp2, temp3, temp4) - STORE_SAT_SUM_X2(temp6, temp7, temp8, temp9, temp10, temp1, temp2, temp3, - temp5, temp5, temp5, temp5, temp5, temp5, temp5, temp5, - dst, 0, 1, 2, 3, BPS) - - OUTPUT_EARLY_CLOBBER_REGS_10() - : [in]"r"(in), [dst]"r"(dst) - : "memory" - ); -} - -static void TransformAC3(const int16_t* in, uint8_t* dst) { - const int a = in[0] + 4; - int c4 = MUL(in[4], kC2); - const int d4 = MUL(in[4], kC1); - const int c1 = MUL(in[1], kC2); - const int d1 = MUL(in[1], kC1); - int temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9; - int temp10, temp11, temp12, temp13, temp14, temp15, temp16, temp17, temp18; - - __asm__ volatile ( - "ins %[c4], %[d4], 16, 16 \n\t" - "replv.ph %[temp1], %[a] \n\t" - "replv.ph %[temp4], %[d1] \n\t" - ADD_SUB_HALVES(temp2, temp3, temp1, c4) - "replv.ph %[temp5], %[c1] \n\t" - SHIFT_R_SUM_X2(temp1, temp6, temp7, temp8, temp2, temp9, temp10, temp4, - temp2, temp2, temp3, temp3, temp4, temp5, temp4, temp5) - LOAD_WITH_OFFSET_X4(temp3, temp5, temp11, temp12, dst, - 0, 0, 0, 0, - 0, 1, 2, 3, - BPS) - CONVERT_2_BYTES_TO_HALF(temp13, temp14, temp3, temp15, temp5, temp16, - temp11, temp17, temp3, temp5, temp11, temp12) - PACK_2_HALVES_TO_WORD(temp12, temp18, temp7, temp6, temp1, temp8, temp2, - temp4, temp7, temp6, temp10, temp9) - STORE_SAT_SUM_X2(temp13, temp14, temp3, temp15, temp5, temp16, temp11, - temp17, temp12, temp18, temp1, temp8, temp2, temp4, - temp7, temp6, dst, 0, 1, 2, 3, BPS) - - OUTPUT_EARLY_CLOBBER_REGS_18(), - [c4]"+&r"(c4) - : [dst]"r"(dst), [a]"r"(a), [d1]"r"(d1), [d4]"r"(d4), [c1]"r"(c1) - : "memory" - ); -} - -static void TransformOne(const int16_t* in, uint8_t* dst) { - int temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9; - int temp10, temp11, temp12, temp13, temp14, temp15, temp16, temp17, temp18; - - __asm__ volatile ( - "ulw %[temp1], 0(%[in]) \n\t" - "ulw %[temp2], 16(%[in]) \n\t" - LOAD_IN_X2(temp5, temp6, 24, 26) - ADD_SUB_HALVES(temp3, temp4, temp1, temp2) - LOAD_IN_X2(temp1, temp2, 8, 10) - MUL_SHIFT_SUM(temp7, temp8, temp9, temp10, temp11, temp12, temp13, temp14, - temp10, temp8, temp9, temp7, temp1, temp2, temp5, temp6, - temp13, temp11, temp14, temp12) - INSERT_HALF_X2(temp8, temp7, temp10, temp9) - "ulw %[temp17], 4(%[in]) \n\t" - "ulw %[temp18], 20(%[in]) \n\t" - ADD_SUB_HALVES(temp1, temp2, temp3, temp8) - ADD_SUB_HALVES(temp5, temp6, temp4, temp7) - ADD_SUB_HALVES(temp7, temp8, temp17, temp18) - LOAD_IN_X2(temp17, temp18, 12, 14) - LOAD_IN_X2(temp9, temp10, 28, 30) - MUL_SHIFT_SUM(temp11, temp12, temp13, temp14, temp15, temp16, temp4, temp17, - temp12, temp14, temp11, temp13, temp17, temp18, temp9, temp10, - temp15, temp4, temp16, temp17) - INSERT_HALF_X2(temp11, temp12, temp13, temp14) - ADD_SUB_HALVES(temp17, temp8, temp8, temp11) - ADD_SUB_HALVES(temp3, temp4, temp7, temp12) - - // horizontal - SRA_16(temp9, temp10, temp11, temp12, temp1, temp2, temp5, temp6) - INSERT_HALF_X2(temp1, temp6, temp5, temp2) - SRA_16(temp13, temp14, temp15, temp16, temp3, temp4, temp17, temp8) - "repl.ph %[temp2], 0x4 \n\t" - INSERT_HALF_X2(temp3, temp8, temp17, temp4) - "addq.ph %[temp1], %[temp1], %[temp2] \n\t" - "addq.ph %[temp6], %[temp6], %[temp2] \n\t" - ADD_SUB_HALVES(temp2, temp4, temp1, temp3) - ADD_SUB_HALVES(temp5, temp7, temp6, temp8) - MUL_SHIFT_SUM(temp1, temp3, temp6, temp8, temp9, temp13, temp17, temp18, - temp3, temp13, temp1, temp9, temp9, temp13, temp11, temp15, - temp6, temp17, temp8, temp18) - MUL_SHIFT_SUM(temp6, temp8, temp18, temp17, temp11, temp15, temp12, temp16, - temp8, temp15, temp6, temp11, temp12, temp16, temp10, temp14, - temp18, temp12, temp17, temp16) - INSERT_HALF_X2(temp1, temp3, temp9, temp13) - INSERT_HALF_X2(temp6, temp8, temp11, temp15) - SHIFT_R_SUM_X2(temp9, temp10, temp11, temp12, temp13, temp14, temp15, - temp16, temp2, temp4, temp5, temp7, temp3, temp1, temp8, - temp6) - PACK_2_HALVES_TO_WORD(temp1, temp2, temp3, temp4, temp9, temp12, temp13, - temp16, temp11, temp10, temp15, temp14) - LOAD_WITH_OFFSET_X4(temp10, temp11, temp14, temp15, dst, - 0, 0, 0, 0, - 0, 1, 2, 3, - BPS) - CONVERT_2_BYTES_TO_HALF(temp5, temp6, temp7, temp8, temp17, temp18, temp10, - temp11, temp10, temp11, temp14, temp15) - STORE_SAT_SUM_X2(temp5, temp6, temp7, temp8, temp17, temp18, temp10, temp11, - temp9, temp12, temp1, temp2, temp13, temp16, temp3, temp4, - dst, 0, 1, 2, 3, BPS) - - OUTPUT_EARLY_CLOBBER_REGS_18() - : [dst]"r"(dst), [in]"r"(in), [kC1]"r"(kC1), [kC2]"r"(kC2) - : "memory", "hi", "lo" - ); -} - -static void TransformTwo(const int16_t* in, uint8_t* dst, int do_two) { - TransformOne(in, dst); - if (do_two) { - TransformOne(in + 16, dst + 4); - } -} - -static WEBP_INLINE void FilterLoop26(uint8_t* p, - int hstride, int vstride, int size, - int thresh, int ithresh, int hev_thresh) { - const int thresh2 = 2 * thresh + 1; - int temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9; - int temp10, temp11, temp12, temp13, temp14, temp15; - - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "1: \n\t" - "negu %[temp1], %[hstride] \n\t" - "addiu %[size], %[size], -1 \n\t" - "sll %[temp2], %[hstride], 1 \n\t" - "sll %[temp3], %[temp1], 1 \n\t" - "addu %[temp4], %[temp2], %[hstride] \n\t" - "addu %[temp5], %[temp3], %[temp1] \n\t" - "lbu %[temp7], 0(%[p]) \n\t" - "sll %[temp6], %[temp3], 1 \n\t" - "lbux %[temp8], %[temp5](%[p]) \n\t" - "lbux %[temp9], %[temp3](%[p]) \n\t" - "lbux %[temp10], %[temp1](%[p]) \n\t" - "lbux %[temp11], %[temp6](%[p]) \n\t" - "lbux %[temp12], %[hstride](%[p]) \n\t" - "lbux %[temp13], %[temp2](%[p]) \n\t" - "lbux %[temp14], %[temp4](%[p]) \n\t" - "subu %[temp1], %[temp10], %[temp7] \n\t" - "subu %[temp2], %[temp9], %[temp12] \n\t" - "absq_s.w %[temp3], %[temp1] \n\t" - "absq_s.w %[temp4], %[temp2] \n\t" - "negu %[temp1], %[temp1] \n\t" - "sll %[temp3], %[temp3], 2 \n\t" - "addu %[temp15], %[temp3], %[temp4] \n\t" - "subu %[temp3], %[temp15], %[thresh2] \n\t" - "sll %[temp6], %[temp1], 1 \n\t" - "bgtz %[temp3], 3f \n\t" - " subu %[temp4], %[temp11], %[temp8] \n\t" - "absq_s.w %[temp4], %[temp4] \n\t" - "shll_s.w %[temp2], %[temp2], 24 \n\t" - "subu %[temp4], %[temp4], %[ithresh] \n\t" - "bgtz %[temp4], 3f \n\t" - " subu %[temp3], %[temp8], %[temp9] \n\t" - "absq_s.w %[temp3], %[temp3] \n\t" - "subu %[temp3], %[temp3], %[ithresh] \n\t" - "bgtz %[temp3], 3f \n\t" - " subu %[temp5], %[temp9], %[temp10] \n\t" - "absq_s.w %[temp3], %[temp5] \n\t" - "absq_s.w %[temp5], %[temp5] \n\t" - "subu %[temp3], %[temp3], %[ithresh] \n\t" - "bgtz %[temp3], 3f \n\t" - " subu %[temp3], %[temp14], %[temp13] \n\t" - "absq_s.w %[temp3], %[temp3] \n\t" - "slt %[temp5], %[hev_thresh], %[temp5] \n\t" - "subu %[temp3], %[temp3], %[ithresh] \n\t" - "bgtz %[temp3], 3f \n\t" - " subu %[temp3], %[temp13], %[temp12] \n\t" - "absq_s.w %[temp3], %[temp3] \n\t" - "sra %[temp4], %[temp2], 24 \n\t" - "subu %[temp3], %[temp3], %[ithresh] \n\t" - "bgtz %[temp3], 3f \n\t" - " subu %[temp15], %[temp12], %[temp7] \n\t" - "absq_s.w %[temp3], %[temp15] \n\t" - "absq_s.w %[temp15], %[temp15] \n\t" - "subu %[temp3], %[temp3], %[ithresh] \n\t" - "bgtz %[temp3], 3f \n\t" - " slt %[temp15], %[hev_thresh], %[temp15] \n\t" - "addu %[temp3], %[temp6], %[temp1] \n\t" - "or %[temp2], %[temp5], %[temp15] \n\t" - "addu %[temp5], %[temp4], %[temp3] \n\t" - "beqz %[temp2], 4f \n\t" - " shra_r.w %[temp1], %[temp5], 3 \n\t" - "addiu %[temp2], %[temp5], 3 \n\t" - "sra %[temp2], %[temp2], 3 \n\t" - "shll_s.w %[temp1], %[temp1], 27 \n\t" - "shll_s.w %[temp2], %[temp2], 27 \n\t" - "subu %[temp3], %[p], %[hstride] \n\t" - "sra %[temp1], %[temp1], 27 \n\t" - "sra %[temp2], %[temp2], 27 \n\t" - "subu %[temp1], %[temp7], %[temp1] \n\t" - "addu %[temp2], %[temp10], %[temp2] \n\t" - "lbux %[temp2], %[temp2](%[VP8kclip1]) \n\t" - "lbux %[temp1], %[temp1](%[VP8kclip1]) \n\t" - "sb %[temp2], 0(%[temp3]) \n\t" - "j 3f \n\t" - " sb %[temp1], 0(%[p]) \n\t" - "4: \n\t" - "shll_s.w %[temp5], %[temp5], 24 \n\t" - "subu %[temp14], %[p], %[hstride] \n\t" - "subu %[temp11], %[temp14], %[hstride] \n\t" - "sra %[temp6], %[temp5], 24 \n\t" - "sll %[temp1], %[temp6], 3 \n\t" - "subu %[temp15], %[temp11], %[hstride] \n\t" - "addu %[temp2], %[temp6], %[temp1] \n\t" - "sll %[temp3], %[temp2], 1 \n\t" - "addu %[temp4], %[temp3], %[temp2] \n\t" - "addiu %[temp2], %[temp2], 63 \n\t" - "addiu %[temp3], %[temp3], 63 \n\t" - "addiu %[temp4], %[temp4], 63 \n\t" - "sra %[temp2], %[temp2], 7 \n\t" - "sra %[temp3], %[temp3], 7 \n\t" - "sra %[temp4], %[temp4], 7 \n\t" - "addu %[temp1], %[temp8], %[temp2] \n\t" - "addu %[temp5], %[temp9], %[temp3] \n\t" - "addu %[temp6], %[temp10], %[temp4] \n\t" - "subu %[temp8], %[temp7], %[temp4] \n\t" - "subu %[temp7], %[temp12], %[temp3] \n\t" - "addu %[temp10], %[p], %[hstride] \n\t" - "subu %[temp9], %[temp13], %[temp2] \n\t" - "addu %[temp12], %[temp10], %[hstride] \n\t" - "lbux %[temp2], %[temp1](%[VP8kclip1]) \n\t" - "lbux %[temp3], %[temp5](%[VP8kclip1]) \n\t" - "lbux %[temp4], %[temp6](%[VP8kclip1]) \n\t" - "lbux %[temp5], %[temp8](%[VP8kclip1]) \n\t" - "lbux %[temp6], %[temp7](%[VP8kclip1]) \n\t" - "lbux %[temp8], %[temp9](%[VP8kclip1]) \n\t" - "sb %[temp2], 0(%[temp15]) \n\t" - "sb %[temp3], 0(%[temp11]) \n\t" - "sb %[temp4], 0(%[temp14]) \n\t" - "sb %[temp5], 0(%[p]) \n\t" - "sb %[temp6], 0(%[temp10]) \n\t" - "sb %[temp8], 0(%[temp12]) \n\t" - "3: \n\t" - "bgtz %[size], 1b \n\t" - " addu %[p], %[p], %[vstride] \n\t" - ".set pop \n\t" - : [temp1]"=&r"(temp1), [temp2]"=&r"(temp2),[temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [temp6]"=&r"(temp6), - [temp7]"=&r"(temp7),[temp8]"=&r"(temp8),[temp9]"=&r"(temp9), - [temp10]"=&r"(temp10),[temp11]"=&r"(temp11),[temp12]"=&r"(temp12), - [temp13]"=&r"(temp13),[temp14]"=&r"(temp14),[temp15]"=&r"(temp15), - [size]"+&r"(size), [p]"+&r"(p) - : [hstride]"r"(hstride), [thresh2]"r"(thresh2), - [ithresh]"r"(ithresh),[vstride]"r"(vstride), [hev_thresh]"r"(hev_thresh), - [VP8kclip1]"r"(VP8kclip1) - : "memory" - ); -} - -static WEBP_INLINE void FilterLoop24(uint8_t* p, - int hstride, int vstride, int size, - int thresh, int ithresh, int hev_thresh) { - int p0, q0, p1, q1, p2, q2, p3, q3; - int step1, step2, temp1, temp2, temp3, temp4; - uint8_t* pTemp0; - uint8_t* pTemp1; - const int thresh2 = 2 * thresh + 1; - - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "bltz %[size], 3f \n\t" - " nop \n\t" - "2: \n\t" - "negu %[step1], %[hstride] \n\t" - "lbu %[q0], 0(%[p]) \n\t" - "lbux %[p0], %[step1](%[p]) \n\t" - "subu %[step1], %[step1], %[hstride] \n\t" - "lbux %[q1], %[hstride](%[p]) \n\t" - "subu %[temp1], %[p0], %[q0] \n\t" - "lbux %[p1], %[step1](%[p]) \n\t" - "addu %[step2], %[hstride], %[hstride] \n\t" - "absq_s.w %[temp2], %[temp1] \n\t" - "subu %[temp3], %[p1], %[q1] \n\t" - "absq_s.w %[temp4], %[temp3] \n\t" - "sll %[temp2], %[temp2], 2 \n\t" - "addu %[temp2], %[temp2], %[temp4] \n\t" - "subu %[temp4], %[temp2], %[thresh2] \n\t" - "subu %[step1], %[step1], %[hstride] \n\t" - "bgtz %[temp4], 0f \n\t" - " lbux %[p2], %[step1](%[p]) \n\t" - "subu %[step1], %[step1], %[hstride] \n\t" - "lbux %[q2], %[step2](%[p]) \n\t" - "lbux %[p3], %[step1](%[p]) \n\t" - "subu %[temp4], %[p2], %[p1] \n\t" - "addu %[step2], %[step2], %[hstride] \n\t" - "subu %[temp2], %[p3], %[p2] \n\t" - "absq_s.w %[temp4], %[temp4] \n\t" - "absq_s.w %[temp2], %[temp2] \n\t" - "lbux %[q3], %[step2](%[p]) \n\t" - "subu %[temp4], %[temp4], %[ithresh] \n\t" - "negu %[temp1], %[temp1] \n\t" - "bgtz %[temp4], 0f \n\t" - " subu %[temp2], %[temp2], %[ithresh] \n\t" - "subu %[p3], %[p1], %[p0] \n\t" - "bgtz %[temp2], 0f \n\t" - " absq_s.w %[p3], %[p3] \n\t" - "subu %[temp4], %[q3], %[q2] \n\t" - "subu %[pTemp0], %[p], %[hstride] \n\t" - "absq_s.w %[temp4], %[temp4] \n\t" - "subu %[temp2], %[p3], %[ithresh] \n\t" - "sll %[step1], %[temp1], 1 \n\t" - "bgtz %[temp2], 0f \n\t" - " subu %[temp4], %[temp4], %[ithresh] \n\t" - "subu %[temp2], %[q2], %[q1] \n\t" - "bgtz %[temp4], 0f \n\t" - " absq_s.w %[temp2], %[temp2] \n\t" - "subu %[q3], %[q1], %[q0] \n\t" - "absq_s.w %[q3], %[q3] \n\t" - "subu %[temp2], %[temp2], %[ithresh] \n\t" - "addu %[temp1], %[temp1], %[step1] \n\t" - "bgtz %[temp2], 0f \n\t" - " subu %[temp4], %[q3], %[ithresh] \n\t" - "slt %[p3], %[hev_thresh], %[p3] \n\t" - "bgtz %[temp4], 0f \n\t" - " slt %[q3], %[hev_thresh], %[q3] \n\t" - "or %[q3], %[q3], %[p3] \n\t" - "bgtz %[q3], 1f \n\t" - " shra_r.w %[temp2], %[temp1], 3 \n\t" - "addiu %[temp1], %[temp1], 3 \n\t" - "sra %[temp1], %[temp1], 3 \n\t" - "shll_s.w %[temp2], %[temp2], 27 \n\t" - "shll_s.w %[temp1], %[temp1], 27 \n\t" - "addu %[pTemp1], %[p], %[hstride] \n\t" - "sra %[temp2], %[temp2], 27 \n\t" - "sra %[temp1], %[temp1], 27 \n\t" - "addiu %[step1], %[temp2], 1 \n\t" - "sra %[step1], %[step1], 1 \n\t" - "addu %[p0], %[p0], %[temp1] \n\t" - "addu %[p1], %[p1], %[step1] \n\t" - "subu %[q0], %[q0], %[temp2] \n\t" - "subu %[q1], %[q1], %[step1] \n\t" - "lbux %[temp2], %[p0](%[VP8kclip1]) \n\t" - "lbux %[temp3], %[q0](%[VP8kclip1]) \n\t" - "lbux %[temp4], %[q1](%[VP8kclip1]) \n\t" - "sb %[temp2], 0(%[pTemp0]) \n\t" - "lbux %[temp1], %[p1](%[VP8kclip1]) \n\t" - "subu %[pTemp0], %[pTemp0], %[hstride] \n\t" - "sb %[temp3], 0(%[p]) \n\t" - "sb %[temp4], 0(%[pTemp1]) \n\t" - "j 0f \n\t" - " sb %[temp1], 0(%[pTemp0]) \n\t" - "1: \n\t" - "shll_s.w %[temp3], %[temp3], 24 \n\t" - "sra %[temp3], %[temp3], 24 \n\t" - "addu %[temp1], %[temp1], %[temp3] \n\t" - "shra_r.w %[temp2], %[temp1], 3 \n\t" - "addiu %[temp1], %[temp1], 3 \n\t" - "shll_s.w %[temp2], %[temp2], 27 \n\t" - "sra %[temp1], %[temp1], 3 \n\t" - "shll_s.w %[temp1], %[temp1], 27 \n\t" - "sra %[temp2], %[temp2], 27 \n\t" - "sra %[temp1], %[temp1], 27 \n\t" - "addu %[p0], %[p0], %[temp1] \n\t" - "subu %[q0], %[q0], %[temp2] \n\t" - "lbux %[temp1], %[p0](%[VP8kclip1]) \n\t" - "lbux %[temp2], %[q0](%[VP8kclip1]) \n\t" - "sb %[temp2], 0(%[p]) \n\t" - "sb %[temp1], 0(%[pTemp0]) \n\t" - "0: \n\t" - "subu %[size], %[size], 1 \n\t" - "bgtz %[size], 2b \n\t" - " addu %[p], %[p], %[vstride] \n\t" - "3: \n\t" - ".set pop \n\t" - : [p0]"=&r"(p0), [q0]"=&r"(q0), [p1]"=&r"(p1), [q1]"=&r"(q1), - [p2]"=&r"(p2), [q2]"=&r"(q2), [p3]"=&r"(p3), [q3]"=&r"(q3), - [step2]"=&r"(step2), [step1]"=&r"(step1), [temp1]"=&r"(temp1), - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), - [pTemp0]"=&r"(pTemp0), [pTemp1]"=&r"(pTemp1), [p]"+&r"(p), - [size]"+&r"(size) - : [vstride]"r"(vstride), [ithresh]"r"(ithresh), - [hev_thresh]"r"(hev_thresh), [hstride]"r"(hstride), - [VP8kclip1]"r"(VP8kclip1), [thresh2]"r"(thresh2) - : "memory" - ); -} - -// on macroblock edges -static void VFilter16(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26(p, stride, 1, 16, thresh, ithresh, hev_thresh); -} - -static void HFilter16(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26(p, 1, stride, 16, thresh, ithresh, hev_thresh); -} - -// 8-pixels wide variant, for chroma filtering -static void VFilter8(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26(u, stride, 1, 8, thresh, ithresh, hev_thresh); - FilterLoop26(v, stride, 1, 8, thresh, ithresh, hev_thresh); -} - -static void HFilter8(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop26(u, 1, stride, 8, thresh, ithresh, hev_thresh); - FilterLoop26(v, 1, stride, 8, thresh, ithresh, hev_thresh); -} - -// on three inner edges -static void VFilter16i(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4 * stride; - FilterLoop24(p, stride, 1, 16, thresh, ithresh, hev_thresh); - } -} - -static void HFilter16i(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4; - FilterLoop24(p, 1, stride, 16, thresh, ithresh, hev_thresh); - } -} - -static void VFilter8i(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop24(u + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh); - FilterLoop24(v + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh); -} - -static void HFilter8i(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - FilterLoop24(u + 4, 1, stride, 8, thresh, ithresh, hev_thresh); - FilterLoop24(v + 4, 1, stride, 8, thresh, ithresh, hev_thresh); -} - -#undef MUL - -//------------------------------------------------------------------------------ -// Simple In-loop filtering (Paragraph 15.2) - -static void SimpleVFilter16(uint8_t* p, int stride, int thresh) { - int i; - const int thresh2 = 2 * thresh + 1; - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8; - uint8_t* p1 = p - stride; - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "li %[i], 16 \n\t" - "0: \n\t" - "negu %[temp4], %[stride] \n\t" - "sll %[temp5], %[temp4], 1 \n\t" - "lbu %[temp2], 0(%[p]) \n\t" - "lbux %[temp3], %[stride](%[p]) \n\t" - "lbux %[temp1], %[temp4](%[p]) \n\t" - "lbux %[temp0], %[temp5](%[p]) \n\t" - "subu %[temp7], %[temp1], %[temp2] \n\t" - "subu %[temp6], %[temp0], %[temp3] \n\t" - "absq_s.w %[temp4], %[temp7] \n\t" - "absq_s.w %[temp5], %[temp6] \n\t" - "sll %[temp4], %[temp4], 2 \n\t" - "subu %[temp5], %[temp5], %[thresh2] \n\t" - "addu %[temp5], %[temp4], %[temp5] \n\t" - "negu %[temp8], %[temp7] \n\t" - "bgtz %[temp5], 1f \n\t" - " addiu %[i], %[i], -1 \n\t" - "sll %[temp4], %[temp8], 1 \n\t" - "shll_s.w %[temp5], %[temp6], 24 \n\t" - "addu %[temp3], %[temp4], %[temp8] \n\t" - "sra %[temp5], %[temp5], 24 \n\t" - "addu %[temp3], %[temp3], %[temp5] \n\t" - "addiu %[temp7], %[temp3], 3 \n\t" - "sra %[temp7], %[temp7], 3 \n\t" - "shra_r.w %[temp8], %[temp3], 3 \n\t" - "shll_s.w %[temp0], %[temp7], 27 \n\t" - "shll_s.w %[temp4], %[temp8], 27 \n\t" - "sra %[temp0], %[temp0], 27 \n\t" - "sra %[temp4], %[temp4], 27 \n\t" - "addu %[temp7], %[temp1], %[temp0] \n\t" - "subu %[temp2], %[temp2], %[temp4] \n\t" - "lbux %[temp3], %[temp7](%[VP8kclip1]) \n\t" - "lbux %[temp4], %[temp2](%[VP8kclip1]) \n\t" - "sb %[temp3], 0(%[p1]) \n\t" - "sb %[temp4], 0(%[p]) \n\t" - "1: \n\t" - "addiu %[p1], %[p1], 1 \n\t" - "bgtz %[i], 0b \n\t" - " addiu %[p], %[p], 1 \n\t" - " .set pop \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [p]"+&r"(p), [i]"=&r"(i), [p1]"+&r"(p1) - : [stride]"r"(stride), [VP8kclip1]"r"(VP8kclip1), [thresh2]"r"(thresh2) - : "memory" - ); -} - -// TEMP0 = SRC[A + A1 * BPS] -// TEMP1 = SRC[B + B1 * BPS] -// TEMP2 = SRC[C + C1 * BPS] -// TEMP3 = SRC[D + D1 * BPS] -#define LOAD_4_BYTES(TEMP0, TEMP1, TEMP2, TEMP3, \ - A, A1, B, B1, C, C1, D, D1, SRC) \ - "lbu %[" #TEMP0 "], " #A "+" #A1 "*" XSTR(BPS) "(%[" #SRC "]) \n\t" \ - "lbu %[" #TEMP1 "], " #B "+" #B1 "*" XSTR(BPS) "(%[" #SRC "]) \n\t" \ - "lbu %[" #TEMP2 "], " #C "+" #C1 "*" XSTR(BPS) "(%[" #SRC "]) \n\t" \ - "lbu %[" #TEMP3 "], " #D "+" #D1 "*" XSTR(BPS) "(%[" #SRC "]) \n\t" \ - -static void SimpleHFilter16(uint8_t* p, int stride, int thresh) { - int i; - const int thresh2 = 2 * thresh + 1; - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8; - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "li %[i], 16 \n\t" - "0: \n\t" - LOAD_4_BYTES(temp0, temp1, temp2, temp3, -2, 0, -1, 0, 0, 0, 1, 0, p) - "subu %[temp7], %[temp1], %[temp2] \n\t" - "subu %[temp6], %[temp0], %[temp3] \n\t" - "absq_s.w %[temp4], %[temp7] \n\t" - "absq_s.w %[temp5], %[temp6] \n\t" - "sll %[temp4], %[temp4], 2 \n\t" - "addu %[temp5], %[temp4], %[temp5] \n\t" - "subu %[temp5], %[temp5], %[thresh2] \n\t" - "negu %[temp8], %[temp7] \n\t" - "bgtz %[temp5], 1f \n\t" - " addiu %[i], %[i], -1 \n\t" - "sll %[temp4], %[temp8], 1 \n\t" - "shll_s.w %[temp5], %[temp6], 24 \n\t" - "addu %[temp3], %[temp4], %[temp8] \n\t" - "sra %[temp5], %[temp5], 24 \n\t" - "addu %[temp3], %[temp3], %[temp5] \n\t" - "addiu %[temp7], %[temp3], 3 \n\t" - "sra %[temp7], %[temp7], 3 \n\t" - "shra_r.w %[temp8], %[temp3], 3 \n\t" - "shll_s.w %[temp0], %[temp7], 27 \n\t" - "shll_s.w %[temp4], %[temp8], 27 \n\t" - "sra %[temp0], %[temp0], 27 \n\t" - "sra %[temp4], %[temp4], 27 \n\t" - "addu %[temp7], %[temp1], %[temp0] \n\t" - "subu %[temp2], %[temp2], %[temp4] \n\t" - "lbux %[temp3], %[temp7](%[VP8kclip1]) \n\t" - "lbux %[temp4], %[temp2](%[VP8kclip1]) \n\t" - "sb %[temp3], -1(%[p]) \n\t" - "sb %[temp4], 0(%[p]) \n\t" - "1: \n\t" - "bgtz %[i], 0b \n\t" - " addu %[p], %[p], %[stride] \n\t" - ".set pop \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [p]"+&r"(p), [i]"=&r"(i) - : [stride]"r"(stride), [VP8kclip1]"r"(VP8kclip1), [thresh2]"r"(thresh2) - : "memory" - ); -} - -static void SimpleVFilter16i(uint8_t* p, int stride, int thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4 * stride; - SimpleVFilter16(p, stride, thresh); - } -} - -static void SimpleHFilter16i(uint8_t* p, int stride, int thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4; - SimpleHFilter16(p, stride, thresh); - } -} - -// DST[A * BPS] = TEMP0 -// DST[B + C * BPS] = TEMP1 -#define STORE_8_BYTES(TEMP0, TEMP1, A, B, C, DST) \ - "usw %[" #TEMP0 "], " #A "*" XSTR(BPS) "(%[" #DST "]) \n\t" \ - "usw %[" #TEMP1 "], " #B "+" #C "*" XSTR(BPS) "(%[" #DST "]) \n\t" - -static void VE4(uint8_t* dst) { // vertical - const uint8_t* top = dst - BPS; - int temp0, temp1, temp2, temp3, temp4, temp5, temp6; - __asm__ volatile ( - "ulw %[temp0], -1(%[top]) \n\t" - "ulh %[temp1], 3(%[top]) \n\t" - "preceu.ph.qbr %[temp2], %[temp0] \n\t" - "preceu.ph.qbl %[temp3], %[temp0] \n\t" - "preceu.ph.qbr %[temp4], %[temp1] \n\t" - "packrl.ph %[temp5], %[temp3], %[temp2] \n\t" - "packrl.ph %[temp6], %[temp4], %[temp3] \n\t" - "shll.ph %[temp5], %[temp5], 1 \n\t" - "shll.ph %[temp6], %[temp6], 1 \n\t" - "addq.ph %[temp2], %[temp5], %[temp2] \n\t" - "addq.ph %[temp6], %[temp6], %[temp4] \n\t" - "addq.ph %[temp2], %[temp2], %[temp3] \n\t" - "addq.ph %[temp6], %[temp6], %[temp3] \n\t" - "shra_r.ph %[temp2], %[temp2], 2 \n\t" - "shra_r.ph %[temp6], %[temp6], 2 \n\t" - "precr.qb.ph %[temp4], %[temp6], %[temp2] \n\t" - STORE_8_BYTES(temp4, temp4, 0, 0, 1, dst) - STORE_8_BYTES(temp4, temp4, 2, 0, 3, dst) - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6) - : [top]"r"(top), [dst]"r"(dst) - : "memory" - ); -} - -static void DC4(uint8_t* dst) { // DC - int temp0, temp1, temp2, temp3, temp4; - __asm__ volatile ( - "ulw %[temp0], -1*" XSTR(BPS) "(%[dst]) \n\t" - LOAD_4_BYTES(temp1, temp2, temp3, temp4, -1, 0, -1, 1, -1, 2, -1, 3, dst) - "ins %[temp1], %[temp2], 8, 8 \n\t" - "ins %[temp1], %[temp3], 16, 8 \n\t" - "ins %[temp1], %[temp4], 24, 8 \n\t" - "raddu.w.qb %[temp0], %[temp0] \n\t" - "raddu.w.qb %[temp1], %[temp1] \n\t" - "addu %[temp0], %[temp0], %[temp1] \n\t" - "shra_r.w %[temp0], %[temp0], 3 \n\t" - "replv.qb %[temp0], %[temp0] \n\t" - STORE_8_BYTES(temp0, temp0, 0, 0, 1, dst) - STORE_8_BYTES(temp0, temp0, 2, 0, 3, dst) - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4) - : [dst]"r"(dst) - : "memory" - ); -} - -static void RD4(uint8_t* dst) { // Down-right - int temp0, temp1, temp2, temp3, temp4; - int temp5, temp6, temp7, temp8; - __asm__ volatile ( - LOAD_4_BYTES(temp0, temp1, temp2, temp3, -1, 0, -1, 1, -1, 2, -1, 3, dst) - "ulw %[temp7], -1-" XSTR(BPS) "(%[dst]) \n\t" - "ins %[temp1], %[temp0], 16, 16 \n\t" - "preceu.ph.qbr %[temp5], %[temp7] \n\t" - "ins %[temp2], %[temp1], 16, 16 \n\t" - "preceu.ph.qbl %[temp4], %[temp7] \n\t" - "ins %[temp3], %[temp2], 16, 16 \n\t" - "shll.ph %[temp2], %[temp2], 1 \n\t" - "addq.ph %[temp3], %[temp3], %[temp1] \n\t" - "packrl.ph %[temp6], %[temp5], %[temp1] \n\t" - "addq.ph %[temp3], %[temp3], %[temp2] \n\t" - "addq.ph %[temp1], %[temp1], %[temp5] \n\t" - "shll.ph %[temp6], %[temp6], 1 \n\t" - "addq.ph %[temp1], %[temp1], %[temp6] \n\t" - "packrl.ph %[temp0], %[temp4], %[temp5] \n\t" - "addq.ph %[temp8], %[temp5], %[temp4] \n\t" - "shra_r.ph %[temp3], %[temp3], 2 \n\t" - "shll.ph %[temp0], %[temp0], 1 \n\t" - "shra_r.ph %[temp1], %[temp1], 2 \n\t" - "addq.ph %[temp8], %[temp0], %[temp8] \n\t" - "lbu %[temp5], 3-" XSTR(BPS) "(%[dst]) \n\t" - "precrq.ph.w %[temp7], %[temp7], %[temp7] \n\t" - "shra_r.ph %[temp8], %[temp8], 2 \n\t" - "ins %[temp7], %[temp5], 0, 8 \n\t" - "precr.qb.ph %[temp2], %[temp1], %[temp3] \n\t" - "raddu.w.qb %[temp4], %[temp7] \n\t" - "precr.qb.ph %[temp6], %[temp8], %[temp1] \n\t" - "shra_r.w %[temp4], %[temp4], 2 \n\t" - STORE_8_BYTES(temp2, temp6, 3, 0, 1, dst) - "prepend %[temp2], %[temp8], 8 \n\t" - "prepend %[temp6], %[temp4], 8 \n\t" - STORE_8_BYTES(temp2, temp6, 2, 0, 0, dst) - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8) - : [dst]"r"(dst) - : "memory" - ); -} - -// TEMP0 = SRC[A * BPS] -// TEMP1 = SRC[B + C * BPS] -#define LOAD_8_BYTES(TEMP0, TEMP1, A, B, C, SRC) \ - "ulw %[" #TEMP0 "], " #A "*" XSTR(BPS) "(%[" #SRC "]) \n\t" \ - "ulw %[" #TEMP1 "], " #B "+" #C "*" XSTR(BPS) "(%[" #SRC "]) \n\t" - -static void LD4(uint8_t* dst) { // Down-Left - int temp0, temp1, temp2, temp3, temp4; - int temp5, temp6, temp7, temp8, temp9; - __asm__ volatile ( - LOAD_8_BYTES(temp0, temp1, -1, 4, -1, dst) - "preceu.ph.qbl %[temp2], %[temp0] \n\t" - "preceu.ph.qbr %[temp3], %[temp0] \n\t" - "preceu.ph.qbr %[temp4], %[temp1] \n\t" - "preceu.ph.qbl %[temp5], %[temp1] \n\t" - "packrl.ph %[temp6], %[temp2], %[temp3] \n\t" - "packrl.ph %[temp7], %[temp4], %[temp2] \n\t" - "packrl.ph %[temp8], %[temp5], %[temp4] \n\t" - "shll.ph %[temp6], %[temp6], 1 \n\t" - "addq.ph %[temp9], %[temp2], %[temp6] \n\t" - "shll.ph %[temp7], %[temp7], 1 \n\t" - "addq.ph %[temp9], %[temp9], %[temp3] \n\t" - "shll.ph %[temp8], %[temp8], 1 \n\t" - "shra_r.ph %[temp9], %[temp9], 2 \n\t" - "addq.ph %[temp3], %[temp4], %[temp7] \n\t" - "addq.ph %[temp0], %[temp5], %[temp8] \n\t" - "addq.ph %[temp3], %[temp3], %[temp2] \n\t" - "addq.ph %[temp0], %[temp0], %[temp4] \n\t" - "shra_r.ph %[temp3], %[temp3], 2 \n\t" - "shra_r.ph %[temp0], %[temp0], 2 \n\t" - "srl %[temp1], %[temp1], 24 \n\t" - "sll %[temp1], %[temp1], 1 \n\t" - "raddu.w.qb %[temp5], %[temp5] \n\t" - "precr.qb.ph %[temp9], %[temp3], %[temp9] \n\t" - "precr.qb.ph %[temp3], %[temp0], %[temp3] \n\t" - "addu %[temp1], %[temp1], %[temp5] \n\t" - "shra_r.w %[temp1], %[temp1], 2 \n\t" - STORE_8_BYTES(temp9, temp3, 0, 0, 2, dst) - "prepend %[temp9], %[temp0], 8 \n\t" - "prepend %[temp3], %[temp1], 8 \n\t" - STORE_8_BYTES(temp9, temp3, 1, 0, 3, dst) - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [temp9]"=&r"(temp9) - : [dst]"r"(dst) - : "memory" - ); -} - -//------------------------------------------------------------------------------ -// Chroma - -static void DC8uv(uint8_t* dst) { // DC - int temp0, temp1, temp2, temp3, temp4; - int temp5, temp6, temp7, temp8, temp9; - __asm__ volatile ( - LOAD_8_BYTES(temp0, temp1, -1, 4, -1, dst) - LOAD_4_BYTES(temp2, temp3, temp4, temp5, -1, 0, -1, 1, -1, 2, -1, 3, dst) - LOAD_4_BYTES(temp6, temp7, temp8, temp9, -1, 4, -1, 5, -1, 6, -1, 7, dst) - "raddu.w.qb %[temp0], %[temp0] \n\t" - "raddu.w.qb %[temp1], %[temp1] \n\t" - "addu %[temp2], %[temp2], %[temp3] \n\t" - "addu %[temp4], %[temp4], %[temp5] \n\t" - "addu %[temp6], %[temp6], %[temp7] \n\t" - "addu %[temp8], %[temp8], %[temp9] \n\t" - "addu %[temp0], %[temp0], %[temp1] \n\t" - "addu %[temp2], %[temp2], %[temp4] \n\t" - "addu %[temp6], %[temp6], %[temp8] \n\t" - "addu %[temp0], %[temp0], %[temp2] \n\t" - "addu %[temp0], %[temp0], %[temp6] \n\t" - "shra_r.w %[temp0], %[temp0], 4 \n\t" - "replv.qb %[temp0], %[temp0] \n\t" - STORE_8_BYTES(temp0, temp0, 0, 4, 0, dst) - STORE_8_BYTES(temp0, temp0, 1, 4, 1, dst) - STORE_8_BYTES(temp0, temp0, 2, 4, 2, dst) - STORE_8_BYTES(temp0, temp0, 3, 4, 3, dst) - STORE_8_BYTES(temp0, temp0, 4, 4, 4, dst) - STORE_8_BYTES(temp0, temp0, 5, 4, 5, dst) - STORE_8_BYTES(temp0, temp0, 6, 4, 6, dst) - STORE_8_BYTES(temp0, temp0, 7, 4, 7, dst) - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [temp9]"=&r"(temp9) - : [dst]"r"(dst) - : "memory" - ); -} - -static void DC8uvNoLeft(uint8_t* dst) { // DC with no left samples - int temp0, temp1; - __asm__ volatile ( - LOAD_8_BYTES(temp0, temp1, -1, 4, -1, dst) - "raddu.w.qb %[temp0], %[temp0] \n\t" - "raddu.w.qb %[temp1], %[temp1] \n\t" - "addu %[temp0], %[temp0], %[temp1] \n\t" - "shra_r.w %[temp0], %[temp0], 3 \n\t" - "replv.qb %[temp0], %[temp0] \n\t" - STORE_8_BYTES(temp0, temp0, 0, 4, 0, dst) - STORE_8_BYTES(temp0, temp0, 1, 4, 1, dst) - STORE_8_BYTES(temp0, temp0, 2, 4, 2, dst) - STORE_8_BYTES(temp0, temp0, 3, 4, 3, dst) - STORE_8_BYTES(temp0, temp0, 4, 4, 4, dst) - STORE_8_BYTES(temp0, temp0, 5, 4, 5, dst) - STORE_8_BYTES(temp0, temp0, 6, 4, 6, dst) - STORE_8_BYTES(temp0, temp0, 7, 4, 7, dst) - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1) - : [dst]"r"(dst) - : "memory" - ); -} - -static void DC8uvNoTop(uint8_t* dst) { // DC with no top samples - int temp0, temp1, temp2, temp3, temp4; - int temp5, temp6, temp7, temp8; - __asm__ volatile ( - LOAD_4_BYTES(temp2, temp3, temp4, temp5, -1, 0, -1, 1, -1, 2, -1, 3, dst) - LOAD_4_BYTES(temp6, temp7, temp8, temp1, -1, 4, -1, 5, -1, 6, -1, 7, dst) - "addu %[temp2], %[temp2], %[temp3] \n\t" - "addu %[temp4], %[temp4], %[temp5] \n\t" - "addu %[temp6], %[temp6], %[temp7] \n\t" - "addu %[temp8], %[temp8], %[temp1] \n\t" - "addu %[temp2], %[temp2], %[temp4] \n\t" - "addu %[temp6], %[temp6], %[temp8] \n\t" - "addu %[temp0], %[temp6], %[temp2] \n\t" - "shra_r.w %[temp0], %[temp0], 3 \n\t" - "replv.qb %[temp0], %[temp0] \n\t" - STORE_8_BYTES(temp0, temp0, 0, 4, 0, dst) - STORE_8_BYTES(temp0, temp0, 1, 4, 1, dst) - STORE_8_BYTES(temp0, temp0, 2, 4, 2, dst) - STORE_8_BYTES(temp0, temp0, 3, 4, 3, dst) - STORE_8_BYTES(temp0, temp0, 4, 4, 4, dst) - STORE_8_BYTES(temp0, temp0, 5, 4, 5, dst) - STORE_8_BYTES(temp0, temp0, 6, 4, 6, dst) - STORE_8_BYTES(temp0, temp0, 7, 4, 7, dst) - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8) - : [dst]"r"(dst) - : "memory" - ); -} - -#undef LOAD_8_BYTES -#undef STORE_8_BYTES -#undef LOAD_4_BYTES - -#define CLIPPING(SIZE) \ - "preceu.ph.qbl %[temp2], %[temp0] \n\t" \ - "preceu.ph.qbr %[temp0], %[temp0] \n\t" \ -".if " #SIZE " == 8 \n\t" \ - "preceu.ph.qbl %[temp3], %[temp1] \n\t" \ - "preceu.ph.qbr %[temp1], %[temp1] \n\t" \ -".endif \n\t" \ - "addu.ph %[temp2], %[temp2], %[dst_1] \n\t" \ - "addu.ph %[temp0], %[temp0], %[dst_1] \n\t" \ -".if " #SIZE " == 8 \n\t" \ - "addu.ph %[temp3], %[temp3], %[dst_1] \n\t" \ - "addu.ph %[temp1], %[temp1], %[dst_1] \n\t" \ -".endif \n\t" \ - "shll_s.ph %[temp2], %[temp2], 7 \n\t" \ - "shll_s.ph %[temp0], %[temp0], 7 \n\t" \ -".if " #SIZE " == 8 \n\t" \ - "shll_s.ph %[temp3], %[temp3], 7 \n\t" \ - "shll_s.ph %[temp1], %[temp1], 7 \n\t" \ -".endif \n\t" \ - "precrqu_s.qb.ph %[temp0], %[temp2], %[temp0] \n\t" \ -".if " #SIZE " == 8 \n\t" \ - "precrqu_s.qb.ph %[temp1], %[temp3], %[temp1] \n\t" \ -".endif \n\t" - - -#define CLIP_8B_TO_DST(DST, TOP, SIZE) do { \ - int dst_1 = ((int)(DST)[-1] << 16) + (DST)[-1]; \ - int temp0, temp1, temp2, temp3; \ - __asm__ volatile ( \ - ".if " #SIZE " < 8 \n\t" \ - "ulw %[temp0], 0(%[top]) \n\t" \ - "subu.ph %[dst_1], %[dst_1], %[top_1] \n\t" \ - CLIPPING(4) \ - "usw %[temp0], 0(%[dst]) \n\t" \ - ".else \n\t" \ - "ulw %[temp0], 0(%[top]) \n\t" \ - "ulw %[temp1], 4(%[top]) \n\t" \ - "subu.ph %[dst_1], %[dst_1], %[top_1] \n\t" \ - CLIPPING(8) \ - "usw %[temp0], 0(%[dst]) \n\t" \ - "usw %[temp1], 4(%[dst]) \n\t" \ - ".if " #SIZE " == 16 \n\t" \ - "ulw %[temp0], 8(%[top]) \n\t" \ - "ulw %[temp1], 12(%[top]) \n\t" \ - CLIPPING(8) \ - "usw %[temp0], 8(%[dst]) \n\t" \ - "usw %[temp1], 12(%[dst]) \n\t" \ - ".endif \n\t" \ - ".endif \n\t" \ - : [dst_1]"+&r"(dst_1), [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), \ - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3) \ - : [top_1]"r"(top_1), [top]"r"((TOP)), [dst]"r"((DST)) \ - : "memory" \ - ); \ -} while (0) - -#define CLIP_TO_DST(DST, SIZE) do { \ - int y; \ - const uint8_t* top = (DST) - BPS; \ - const int top_1 = ((int)top[-1] << 16) + top[-1]; \ - for (y = 0; y < (SIZE); ++y) { \ - CLIP_8B_TO_DST((DST), top, (SIZE)); \ - (DST) += BPS; \ - } \ -} while (0) - -#define TRUE_MOTION(DST, SIZE) \ -static void TrueMotion##SIZE(uint8_t* (DST)) { \ - CLIP_TO_DST((DST), (SIZE)); \ -} - -TRUE_MOTION(dst, 4) -TRUE_MOTION(dst, 8) -TRUE_MOTION(dst, 16) - -#undef TRUE_MOTION -#undef CLIP_TO_DST -#undef CLIP_8B_TO_DST -#undef CLIPPING - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8DspInitMIPSdspR2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitMIPSdspR2(void) { - VP8TransformDC = TransformDC; - VP8TransformAC3 = TransformAC3; - VP8Transform = TransformTwo; - - VP8VFilter16 = VFilter16; - VP8HFilter16 = HFilter16; - VP8VFilter8 = VFilter8; - VP8HFilter8 = HFilter8; - VP8VFilter16i = VFilter16i; - VP8HFilter16i = HFilter16i; - VP8VFilter8i = VFilter8i; - VP8HFilter8i = HFilter8i; - VP8SimpleVFilter16 = SimpleVFilter16; - VP8SimpleHFilter16 = SimpleHFilter16; - VP8SimpleVFilter16i = SimpleVFilter16i; - VP8SimpleHFilter16i = SimpleHFilter16i; - - VP8PredLuma4[0] = DC4; - VP8PredLuma4[1] = TrueMotion4; - VP8PredLuma4[2] = VE4; - VP8PredLuma4[4] = RD4; - VP8PredLuma4[6] = LD4; - - VP8PredChroma8[0] = DC8uv; - VP8PredChroma8[1] = TrueMotion8; - VP8PredChroma8[4] = DC8uvNoTop; - VP8PredChroma8[5] = DC8uvNoLeft; - - VP8PredLuma16[1] = TrueMotion16; -} - -#else // !WEBP_USE_MIPS_DSP_R2 - -WEBP_DSP_INIT_STUB(VP8DspInitMIPSdspR2) - -#endif // WEBP_USE_MIPS_DSP_R2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_msa.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_msa.c deleted file mode 100644 index 13fa5a3..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_msa.c +++ /dev/null @@ -1,1020 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MSA version of dsp functions -// -// Author(s): Prashant Patil (prashant.patil@imgtec.com) - - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MSA) - -#include "src/dsp/msa_macro.h" - -//------------------------------------------------------------------------------ -// Transforms - -#define IDCT_1D_W(in0, in1, in2, in3, out0, out1, out2, out3) { \ - v4i32 a1_m, b1_m, c1_m, d1_m; \ - v4i32 c_tmp1_m, c_tmp2_m, d_tmp1_m, d_tmp2_m; \ - const v4i32 cospi8sqrt2minus1 = __msa_fill_w(20091); \ - const v4i32 sinpi8sqrt2 = __msa_fill_w(35468); \ - \ - a1_m = in0 + in2; \ - b1_m = in0 - in2; \ - c_tmp1_m = (in1 * sinpi8sqrt2) >> 16; \ - c_tmp2_m = in3 + ((in3 * cospi8sqrt2minus1) >> 16); \ - c1_m = c_tmp1_m - c_tmp2_m; \ - d_tmp1_m = in1 + ((in1 * cospi8sqrt2minus1) >> 16); \ - d_tmp2_m = (in3 * sinpi8sqrt2) >> 16; \ - d1_m = d_tmp1_m + d_tmp2_m; \ - BUTTERFLY_4(a1_m, b1_m, c1_m, d1_m, out0, out1, out2, out3); \ -} -#define MULT1(a) ((((a) * 20091) >> 16) + (a)) -#define MULT2(a) (((a) * 35468) >> 16) - -static void TransformOne(const int16_t* in, uint8_t* dst) { - v8i16 input0, input1; - v4i32 in0, in1, in2, in3, hz0, hz1, hz2, hz3, vt0, vt1, vt2, vt3; - v4i32 res0, res1, res2, res3; - const v16i8 zero = { 0 }; - v16i8 dest0, dest1, dest2, dest3; - - LD_SH2(in, 8, input0, input1); - UNPCK_SH_SW(input0, in0, in1); - UNPCK_SH_SW(input1, in2, in3); - IDCT_1D_W(in0, in1, in2, in3, hz0, hz1, hz2, hz3); - TRANSPOSE4x4_SW_SW(hz0, hz1, hz2, hz3, hz0, hz1, hz2, hz3); - IDCT_1D_W(hz0, hz1, hz2, hz3, vt0, vt1, vt2, vt3); - SRARI_W4_SW(vt0, vt1, vt2, vt3, 3); - TRANSPOSE4x4_SW_SW(vt0, vt1, vt2, vt3, vt0, vt1, vt2, vt3); - LD_SB4(dst, BPS, dest0, dest1, dest2, dest3); - ILVR_B4_SW(zero, dest0, zero, dest1, zero, dest2, zero, dest3, - res0, res1, res2, res3); - ILVR_H4_SW(zero, res0, zero, res1, zero, res2, zero, res3, - res0, res1, res2, res3); - ADD4(res0, vt0, res1, vt1, res2, vt2, res3, vt3, res0, res1, res2, res3); - CLIP_SW4_0_255(res0, res1, res2, res3); - PCKEV_B2_SW(res0, res1, res2, res3, vt0, vt1); - res0 = (v4i32)__msa_pckev_b((v16i8)vt0, (v16i8)vt1); - ST4x4_UB(res0, res0, 3, 2, 1, 0, dst, BPS); -} - -static void TransformTwo(const int16_t* in, uint8_t* dst, int do_two) { - TransformOne(in, dst); - if (do_two) { - TransformOne(in + 16, dst + 4); - } -} - -static void TransformWHT(const int16_t* in, int16_t* out) { - v8i16 input0, input1; - const v8i16 mask0 = { 0, 1, 2, 3, 8, 9, 10, 11 }; - const v8i16 mask1 = { 4, 5, 6, 7, 12, 13, 14, 15 }; - const v8i16 mask2 = { 0, 4, 8, 12, 1, 5, 9, 13 }; - const v8i16 mask3 = { 3, 7, 11, 15, 2, 6, 10, 14 }; - v8i16 tmp0, tmp1, tmp2, tmp3; - v8i16 out0, out1; - - LD_SH2(in, 8, input0, input1); - input1 = SLDI_SH(input1, input1, 8); - tmp0 = input0 + input1; - tmp1 = input0 - input1; - VSHF_H2_SH(tmp0, tmp1, tmp0, tmp1, mask0, mask1, tmp2, tmp3); - out0 = tmp2 + tmp3; - out1 = tmp2 - tmp3; - VSHF_H2_SH(out0, out1, out0, out1, mask2, mask3, input0, input1); - tmp0 = input0 + input1; - tmp1 = input0 - input1; - VSHF_H2_SH(tmp0, tmp1, tmp0, tmp1, mask0, mask1, tmp2, tmp3); - tmp0 = tmp2 + tmp3; - tmp1 = tmp2 - tmp3; - ADDVI_H2_SH(tmp0, 3, tmp1, 3, out0, out1); - SRAI_H2_SH(out0, out1, 3); - out[0] = __msa_copy_s_h(out0, 0); - out[16] = __msa_copy_s_h(out0, 4); - out[32] = __msa_copy_s_h(out1, 0); - out[48] = __msa_copy_s_h(out1, 4); - out[64] = __msa_copy_s_h(out0, 1); - out[80] = __msa_copy_s_h(out0, 5); - out[96] = __msa_copy_s_h(out1, 1); - out[112] = __msa_copy_s_h(out1, 5); - out[128] = __msa_copy_s_h(out0, 2); - out[144] = __msa_copy_s_h(out0, 6); - out[160] = __msa_copy_s_h(out1, 2); - out[176] = __msa_copy_s_h(out1, 6); - out[192] = __msa_copy_s_h(out0, 3); - out[208] = __msa_copy_s_h(out0, 7); - out[224] = __msa_copy_s_h(out1, 3); - out[240] = __msa_copy_s_h(out1, 7); -} - -static void TransformDC(const int16_t* in, uint8_t* dst) { - const int DC = (in[0] + 4) >> 3; - const v8i16 tmp0 = __msa_fill_h(DC); - ADDBLK_ST4x4_UB(tmp0, tmp0, tmp0, tmp0, dst, BPS); -} - -static void TransformAC3(const int16_t* in, uint8_t* dst) { - const int a = in[0] + 4; - const int c4 = MULT2(in[4]); - const int d4 = MULT1(in[4]); - const int in2 = MULT2(in[1]); - const int in3 = MULT1(in[1]); - v4i32 tmp0 = { 0 }; - v4i32 out0 = __msa_fill_w(a + d4); - v4i32 out1 = __msa_fill_w(a + c4); - v4i32 out2 = __msa_fill_w(a - c4); - v4i32 out3 = __msa_fill_w(a - d4); - v4i32 res0, res1, res2, res3; - const v4i32 zero = { 0 }; - v16u8 dest0, dest1, dest2, dest3; - - INSERT_W4_SW(in3, in2, -in2, -in3, tmp0); - ADD4(out0, tmp0, out1, tmp0, out2, tmp0, out3, tmp0, - out0, out1, out2, out3); - SRAI_W4_SW(out0, out1, out2, out3, 3); - LD_UB4(dst, BPS, dest0, dest1, dest2, dest3); - ILVR_B4_SW(zero, dest0, zero, dest1, zero, dest2, zero, dest3, - res0, res1, res2, res3); - ILVR_H4_SW(zero, res0, zero, res1, zero, res2, zero, res3, - res0, res1, res2, res3); - ADD4(res0, out0, res1, out1, res2, out2, res3, out3, res0, res1, res2, res3); - CLIP_SW4_0_255(res0, res1, res2, res3); - PCKEV_B2_SW(res0, res1, res2, res3, out0, out1); - res0 = (v4i32)__msa_pckev_b((v16i8)out0, (v16i8)out1); - ST4x4_UB(res0, res0, 3, 2, 1, 0, dst, BPS); -} - -//------------------------------------------------------------------------------ -// Edge filtering functions - -#define FLIP_SIGN2(in0, in1, out0, out1) { \ - out0 = (v16i8)__msa_xori_b(in0, 0x80); \ - out1 = (v16i8)__msa_xori_b(in1, 0x80); \ -} - -#define FLIP_SIGN4(in0, in1, in2, in3, out0, out1, out2, out3) { \ - FLIP_SIGN2(in0, in1, out0, out1); \ - FLIP_SIGN2(in2, in3, out2, out3); \ -} - -#define FILT_VAL(q0_m, p0_m, mask, filt) do { \ - v16i8 q0_sub_p0; \ - q0_sub_p0 = __msa_subs_s_b(q0_m, p0_m); \ - filt = __msa_adds_s_b(filt, q0_sub_p0); \ - filt = __msa_adds_s_b(filt, q0_sub_p0); \ - filt = __msa_adds_s_b(filt, q0_sub_p0); \ - filt = filt & mask; \ -} while (0) - -#define FILT2(q_m, p_m, q, p) do { \ - u_r = SRAI_H(temp1, 7); \ - u_r = __msa_sat_s_h(u_r, 7); \ - u_l = SRAI_H(temp3, 7); \ - u_l = __msa_sat_s_h(u_l, 7); \ - u = __msa_pckev_b((v16i8)u_l, (v16i8)u_r); \ - q_m = __msa_subs_s_b(q_m, u); \ - p_m = __msa_adds_s_b(p_m, u); \ - q = __msa_xori_b((v16u8)q_m, 0x80); \ - p = __msa_xori_b((v16u8)p_m, 0x80); \ -} while (0) - -#define LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev) do { \ - v16i8 p1_m, p0_m, q0_m, q1_m; \ - v16i8 filt, t1, t2; \ - const v16i8 cnst4b = __msa_ldi_b(4); \ - const v16i8 cnst3b = __msa_ldi_b(3); \ - \ - FLIP_SIGN4(p1, p0, q0, q1, p1_m, p0_m, q0_m, q1_m); \ - filt = __msa_subs_s_b(p1_m, q1_m); \ - filt = filt & hev; \ - FILT_VAL(q0_m, p0_m, mask, filt); \ - t1 = __msa_adds_s_b(filt, cnst4b); \ - t1 = SRAI_B(t1, 3); \ - t2 = __msa_adds_s_b(filt, cnst3b); \ - t2 = SRAI_B(t2, 3); \ - q0_m = __msa_subs_s_b(q0_m, t1); \ - q0 = __msa_xori_b((v16u8)q0_m, 0x80); \ - p0_m = __msa_adds_s_b(p0_m, t2); \ - p0 = __msa_xori_b((v16u8)p0_m, 0x80); \ - filt = __msa_srari_b(t1, 1); \ - hev = __msa_xori_b(hev, 0xff); \ - filt = filt & hev; \ - q1_m = __msa_subs_s_b(q1_m, filt); \ - q1 = __msa_xori_b((v16u8)q1_m, 0x80); \ - p1_m = __msa_adds_s_b(p1_m, filt); \ - p1 = __msa_xori_b((v16u8)p1_m, 0x80); \ -} while (0) - -#define LPF_MBFILTER(p2, p1, p0, q0, q1, q2, mask, hev) do { \ - v16i8 p2_m, p1_m, p0_m, q2_m, q1_m, q0_m; \ - v16i8 u, filt, t1, t2, filt_sign; \ - v8i16 filt_r, filt_l, u_r, u_l; \ - v8i16 temp0, temp1, temp2, temp3; \ - const v16i8 cnst4b = __msa_ldi_b(4); \ - const v16i8 cnst3b = __msa_ldi_b(3); \ - const v8i16 cnst9h = __msa_ldi_h(9); \ - const v8i16 cnst63h = __msa_ldi_h(63); \ - \ - FLIP_SIGN4(p1, p0, q0, q1, p1_m, p0_m, q0_m, q1_m); \ - filt = __msa_subs_s_b(p1_m, q1_m); \ - FILT_VAL(q0_m, p0_m, mask, filt); \ - FLIP_SIGN2(p2, q2, p2_m, q2_m); \ - t2 = filt & hev; \ - /* filt_val &= ~hev */ \ - hev = __msa_xori_b(hev, 0xff); \ - filt = filt & hev; \ - t1 = __msa_adds_s_b(t2, cnst4b); \ - t1 = SRAI_B(t1, 3); \ - t2 = __msa_adds_s_b(t2, cnst3b); \ - t2 = SRAI_B(t2, 3); \ - q0_m = __msa_subs_s_b(q0_m, t1); \ - p0_m = __msa_adds_s_b(p0_m, t2); \ - filt_sign = __msa_clti_s_b(filt, 0); \ - ILVRL_B2_SH(filt_sign, filt, filt_r, filt_l); \ - /* update q2/p2 */ \ - temp0 = filt_r * cnst9h; \ - temp1 = temp0 + cnst63h; \ - temp2 = filt_l * cnst9h; \ - temp3 = temp2 + cnst63h; \ - FILT2(q2_m, p2_m, q2, p2); \ - /* update q1/p1 */ \ - temp1 = temp1 + temp0; \ - temp3 = temp3 + temp2; \ - FILT2(q1_m, p1_m, q1, p1); \ - /* update q0/p0 */ \ - temp1 = temp1 + temp0; \ - temp3 = temp3 + temp2; \ - FILT2(q0_m, p0_m, q0, p0); \ -} while (0) - -#define LPF_MASK_HEV(p3_in, p2_in, p1_in, p0_in, \ - q0_in, q1_in, q2_in, q3_in, \ - limit_in, b_limit_in, thresh_in, \ - hev_out, mask_out) do { \ - v16u8 p3_asub_p2_m, p2_asub_p1_m, p1_asub_p0_m, q1_asub_q0_m; \ - v16u8 p1_asub_q1_m, p0_asub_q0_m, q3_asub_q2_m, q2_asub_q1_m; \ - v16u8 flat_out; \ - \ - /* absolute subtraction of pixel values */ \ - p3_asub_p2_m = __msa_asub_u_b(p3_in, p2_in); \ - p2_asub_p1_m = __msa_asub_u_b(p2_in, p1_in); \ - p1_asub_p0_m = __msa_asub_u_b(p1_in, p0_in); \ - q1_asub_q0_m = __msa_asub_u_b(q1_in, q0_in); \ - q2_asub_q1_m = __msa_asub_u_b(q2_in, q1_in); \ - q3_asub_q2_m = __msa_asub_u_b(q3_in, q2_in); \ - p0_asub_q0_m = __msa_asub_u_b(p0_in, q0_in); \ - p1_asub_q1_m = __msa_asub_u_b(p1_in, q1_in); \ - /* calculation of hev */ \ - flat_out = __msa_max_u_b(p1_asub_p0_m, q1_asub_q0_m); \ - hev_out = (thresh_in < flat_out); \ - /* calculation of mask */ \ - p0_asub_q0_m = __msa_adds_u_b(p0_asub_q0_m, p0_asub_q0_m); \ - p1_asub_q1_m = SRAI_B(p1_asub_q1_m, 1); \ - p0_asub_q0_m = __msa_adds_u_b(p0_asub_q0_m, p1_asub_q1_m); \ - mask_out = (b_limit_in < p0_asub_q0_m); \ - mask_out = __msa_max_u_b(flat_out, mask_out); \ - p3_asub_p2_m = __msa_max_u_b(p3_asub_p2_m, p2_asub_p1_m); \ - mask_out = __msa_max_u_b(p3_asub_p2_m, mask_out); \ - q2_asub_q1_m = __msa_max_u_b(q2_asub_q1_m, q3_asub_q2_m); \ - mask_out = __msa_max_u_b(q2_asub_q1_m, mask_out); \ - mask_out = (limit_in < mask_out); \ - mask_out = __msa_xori_b(mask_out, 0xff); \ -} while (0) - -#define ST6x1_UB(in0, in0_idx, in1, in1_idx, pdst, stride) do { \ - const uint16_t tmp0_h = __msa_copy_s_h((v8i16)in1, in1_idx); \ - const uint32_t tmp0_w = __msa_copy_s_w((v4i32)in0, in0_idx); \ - SW(tmp0_w, pdst); \ - SH(tmp0_h, pdst + stride); \ -} while (0) - -#define ST6x4_UB(in0, start_in0_idx, in1, start_in1_idx, pdst, stride) do { \ - uint8_t* ptmp1 = (uint8_t*)pdst; \ - ST6x1_UB(in0, start_in0_idx, in1, start_in1_idx, ptmp1, 4); \ - ptmp1 += stride; \ - ST6x1_UB(in0, start_in0_idx + 1, in1, start_in1_idx + 1, ptmp1, 4); \ - ptmp1 += stride; \ - ST6x1_UB(in0, start_in0_idx + 2, in1, start_in1_idx + 2, ptmp1, 4); \ - ptmp1 += stride; \ - ST6x1_UB(in0, start_in0_idx + 3, in1, start_in1_idx + 3, ptmp1, 4); \ -} while (0) - -#define LPF_SIMPLE_FILT(p1_in, p0_in, q0_in, q1_in, mask) do { \ - v16i8 p1_m, p0_m, q0_m, q1_m, filt, filt1, filt2; \ - const v16i8 cnst4b = __msa_ldi_b(4); \ - const v16i8 cnst3b = __msa_ldi_b(3); \ - \ - FLIP_SIGN4(p1_in, p0_in, q0_in, q1_in, p1_m, p0_m, q0_m, q1_m); \ - filt = __msa_subs_s_b(p1_m, q1_m); \ - FILT_VAL(q0_m, p0_m, mask, filt); \ - filt1 = __msa_adds_s_b(filt, cnst4b); \ - filt1 = SRAI_B(filt1, 3); \ - filt2 = __msa_adds_s_b(filt, cnst3b); \ - filt2 = SRAI_B(filt2, 3); \ - q0_m = __msa_subs_s_b(q0_m, filt1); \ - p0_m = __msa_adds_s_b(p0_m, filt2); \ - q0_in = __msa_xori_b((v16u8)q0_m, 0x80); \ - p0_in = __msa_xori_b((v16u8)p0_m, 0x80); \ -} while (0) - -#define LPF_SIMPLE_MASK(p1, p0, q0, q1, b_limit, mask) do { \ - v16u8 p1_a_sub_q1, p0_a_sub_q0; \ - \ - p0_a_sub_q0 = __msa_asub_u_b(p0, q0); \ - p1_a_sub_q1 = __msa_asub_u_b(p1, q1); \ - p1_a_sub_q1 = (v16u8)__msa_srli_b((v16i8)p1_a_sub_q1, 1); \ - p0_a_sub_q0 = __msa_adds_u_b(p0_a_sub_q0, p0_a_sub_q0); \ - mask = __msa_adds_u_b(p0_a_sub_q0, p1_a_sub_q1); \ - mask = (mask <= b_limit); \ -} while (0) - -static void VFilter16(uint8_t* src, int stride, - int b_limit_in, int limit_in, int thresh_in) { - uint8_t* ptemp = src - 4 * stride; - v16u8 p3, p2, p1, p0, q3, q2, q1, q0; - v16u8 mask, hev; - const v16u8 thresh = (v16u8)__msa_fill_b(thresh_in); - const v16u8 limit = (v16u8)__msa_fill_b(limit_in); - const v16u8 b_limit = (v16u8)__msa_fill_b(b_limit_in); - - LD_UB8(ptemp, stride, p3, p2, p1, p0, q0, q1, q2, q3); - LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, - hev, mask); - LPF_MBFILTER(p2, p1, p0, q0, q1, q2, mask, hev); - ptemp = src - 3 * stride; - ST_UB4(p2, p1, p0, q0, ptemp, stride); - ptemp += (4 * stride); - ST_UB2(q1, q2, ptemp, stride); -} - -static void HFilter16(uint8_t* src, int stride, - int b_limit_in, int limit_in, int thresh_in) { - uint8_t* ptmp = src - 4; - v16u8 p3, p2, p1, p0, q3, q2, q1, q0; - v16u8 mask, hev; - v16u8 row0, row1, row2, row3, row4, row5, row6, row7, row8; - v16u8 row9, row10, row11, row12, row13, row14, row15; - v8i16 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - const v16u8 b_limit = (v16u8)__msa_fill_b(b_limit_in); - const v16u8 limit = (v16u8)__msa_fill_b(limit_in); - const v16u8 thresh = (v16u8)__msa_fill_b(thresh_in); - - LD_UB8(ptmp, stride, row0, row1, row2, row3, row4, row5, row6, row7); - ptmp += (8 * stride); - LD_UB8(ptmp, stride, row8, row9, row10, row11, row12, row13, row14, row15); - TRANSPOSE16x8_UB_UB(row0, row1, row2, row3, row4, row5, row6, row7, - row8, row9, row10, row11, row12, row13, row14, row15, - p3, p2, p1, p0, q0, q1, q2, q3); - LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, - hev, mask); - LPF_MBFILTER(p2, p1, p0, q0, q1, q2, mask, hev); - ILVR_B2_SH(p1, p2, q0, p0, tmp0, tmp1); - ILVRL_H2_SH(tmp1, tmp0, tmp3, tmp4); - ILVL_B2_SH(p1, p2, q0, p0, tmp0, tmp1); - ILVRL_H2_SH(tmp1, tmp0, tmp6, tmp7); - ILVRL_B2_SH(q2, q1, tmp2, tmp5); - ptmp = src - 3; - ST6x1_UB(tmp3, 0, tmp2, 0, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp3, 1, tmp2, 1, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp3, 2, tmp2, 2, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp3, 3, tmp2, 3, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp4, 0, tmp2, 4, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp4, 1, tmp2, 5, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp4, 2, tmp2, 6, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp4, 3, tmp2, 7, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp6, 0, tmp5, 0, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp6, 1, tmp5, 1, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp6, 2, tmp5, 2, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp6, 3, tmp5, 3, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp7, 0, tmp5, 4, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp7, 1, tmp5, 5, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp7, 2, tmp5, 6, ptmp, 4); - ptmp += stride; - ST6x1_UB(tmp7, 3, tmp5, 7, ptmp, 4); -} - -// on three inner edges -static void VFilterHorEdge16i(uint8_t* src, int stride, - int b_limit, int limit, int thresh) { - v16u8 mask, hev; - v16u8 p3, p2, p1, p0, q3, q2, q1, q0; - const v16u8 thresh0 = (v16u8)__msa_fill_b(thresh); - const v16u8 b_limit0 = (v16u8)__msa_fill_b(b_limit); - const v16u8 limit0 = (v16u8)__msa_fill_b(limit); - - LD_UB8((src - 4 * stride), stride, p3, p2, p1, p0, q0, q1, q2, q3); - LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit0, b_limit0, thresh0, - hev, mask); - LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev); - ST_UB4(p1, p0, q0, q1, (src - 2 * stride), stride); -} - -static void VFilter16i(uint8_t* src_y, int stride, - int b_limit, int limit, int thresh) { - VFilterHorEdge16i(src_y + 4 * stride, stride, b_limit, limit, thresh); - VFilterHorEdge16i(src_y + 8 * stride, stride, b_limit, limit, thresh); - VFilterHorEdge16i(src_y + 12 * stride, stride, b_limit, limit, thresh); -} - -static void HFilterVertEdge16i(uint8_t* src, int stride, - int b_limit, int limit, int thresh) { - v16u8 mask, hev; - v16u8 p3, p2, p1, p0, q3, q2, q1, q0; - v16u8 row0, row1, row2, row3, row4, row5, row6, row7; - v16u8 row8, row9, row10, row11, row12, row13, row14, row15; - v8i16 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; - const v16u8 thresh0 = (v16u8)__msa_fill_b(thresh); - const v16u8 b_limit0 = (v16u8)__msa_fill_b(b_limit); - const v16u8 limit0 = (v16u8)__msa_fill_b(limit); - - LD_UB8(src - 4, stride, row0, row1, row2, row3, row4, row5, row6, row7); - LD_UB8(src - 4 + (8 * stride), stride, - row8, row9, row10, row11, row12, row13, row14, row15); - TRANSPOSE16x8_UB_UB(row0, row1, row2, row3, row4, row5, row6, row7, - row8, row9, row10, row11, row12, row13, row14, row15, - p3, p2, p1, p0, q0, q1, q2, q3); - LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit0, b_limit0, thresh0, - hev, mask); - LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev); - ILVR_B2_SH(p0, p1, q1, q0, tmp0, tmp1); - ILVRL_H2_SH(tmp1, tmp0, tmp2, tmp3); - ILVL_B2_SH(p0, p1, q1, q0, tmp0, tmp1); - ILVRL_H2_SH(tmp1, tmp0, tmp4, tmp5); - src -= 2; - ST4x8_UB(tmp2, tmp3, src, stride); - src += (8 * stride); - ST4x8_UB(tmp4, tmp5, src, stride); -} - -static void HFilter16i(uint8_t* src_y, int stride, - int b_limit, int limit, int thresh) { - HFilterVertEdge16i(src_y + 4, stride, b_limit, limit, thresh); - HFilterVertEdge16i(src_y + 8, stride, b_limit, limit, thresh); - HFilterVertEdge16i(src_y + 12, stride, b_limit, limit, thresh); -} - -// 8-pixels wide variants, for chroma filtering -static void VFilter8(uint8_t* src_u, uint8_t* src_v, int stride, - int b_limit_in, int limit_in, int thresh_in) { - uint8_t* ptmp_src_u = src_u - 4 * stride; - uint8_t* ptmp_src_v = src_v - 4 * stride; - uint64_t p2_d, p1_d, p0_d, q0_d, q1_d, q2_d; - v16u8 p3, p2, p1, p0, q3, q2, q1, q0, mask, hev; - v16u8 p3_u, p2_u, p1_u, p0_u, q3_u, q2_u, q1_u, q0_u; - v16u8 p3_v, p2_v, p1_v, p0_v, q3_v, q2_v, q1_v, q0_v; - const v16u8 b_limit = (v16u8)__msa_fill_b(b_limit_in); - const v16u8 limit = (v16u8)__msa_fill_b(limit_in); - const v16u8 thresh = (v16u8)__msa_fill_b(thresh_in); - - LD_UB8(ptmp_src_u, stride, p3_u, p2_u, p1_u, p0_u, q0_u, q1_u, q2_u, q3_u); - LD_UB8(ptmp_src_v, stride, p3_v, p2_v, p1_v, p0_v, q0_v, q1_v, q2_v, q3_v); - ILVR_D4_UB(p3_v, p3_u, p2_v, p2_u, p1_v, p1_u, p0_v, p0_u, p3, p2, p1, p0); - ILVR_D4_UB(q0_v, q0_u, q1_v, q1_u, q2_v, q2_u, q3_v, q3_u, q0, q1, q2, q3); - LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, - hev, mask); - LPF_MBFILTER(p2, p1, p0, q0, q1, q2, mask, hev); - p2_d = __msa_copy_s_d((v2i64)p2, 0); - p1_d = __msa_copy_s_d((v2i64)p1, 0); - p0_d = __msa_copy_s_d((v2i64)p0, 0); - q0_d = __msa_copy_s_d((v2i64)q0, 0); - q1_d = __msa_copy_s_d((v2i64)q1, 0); - q2_d = __msa_copy_s_d((v2i64)q2, 0); - ptmp_src_u += stride; - SD4(p2_d, p1_d, p0_d, q0_d, ptmp_src_u, stride); - ptmp_src_u += (4 * stride); - SD(q1_d, ptmp_src_u); - ptmp_src_u += stride; - SD(q2_d, ptmp_src_u); - p2_d = __msa_copy_s_d((v2i64)p2, 1); - p1_d = __msa_copy_s_d((v2i64)p1, 1); - p0_d = __msa_copy_s_d((v2i64)p0, 1); - q0_d = __msa_copy_s_d((v2i64)q0, 1); - q1_d = __msa_copy_s_d((v2i64)q1, 1); - q2_d = __msa_copy_s_d((v2i64)q2, 1); - ptmp_src_v += stride; - SD4(p2_d, p1_d, p0_d, q0_d, ptmp_src_v, stride); - ptmp_src_v += (4 * stride); - SD(q1_d, ptmp_src_v); - ptmp_src_v += stride; - SD(q2_d, ptmp_src_v); -} - -static void HFilter8(uint8_t* src_u, uint8_t* src_v, int stride, - int b_limit_in, int limit_in, int thresh_in) { - uint8_t* ptmp_src_u = src_u - 4; - uint8_t* ptmp_src_v = src_v - 4; - v16u8 p3, p2, p1, p0, q3, q2, q1, q0, mask, hev; - v16u8 row0, row1, row2, row3, row4, row5, row6, row7, row8; - v16u8 row9, row10, row11, row12, row13, row14, row15; - v8i16 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - const v16u8 b_limit = (v16u8)__msa_fill_b(b_limit_in); - const v16u8 limit = (v16u8)__msa_fill_b(limit_in); - const v16u8 thresh = (v16u8)__msa_fill_b(thresh_in); - - LD_UB8(ptmp_src_u, stride, row0, row1, row2, row3, row4, row5, row6, row7); - LD_UB8(ptmp_src_v, stride, - row8, row9, row10, row11, row12, row13, row14, row15); - TRANSPOSE16x8_UB_UB(row0, row1, row2, row3, row4, row5, row6, row7, - row8, row9, row10, row11, row12, row13, row14, row15, - p3, p2, p1, p0, q0, q1, q2, q3); - LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, - hev, mask); - LPF_MBFILTER(p2, p1, p0, q0, q1, q2, mask, hev); - ILVR_B2_SH(p1, p2, q0, p0, tmp0, tmp1); - ILVRL_H2_SH(tmp1, tmp0, tmp3, tmp4); - ILVL_B2_SH(p1, p2, q0, p0, tmp0, tmp1); - ILVRL_H2_SH(tmp1, tmp0, tmp6, tmp7); - ILVRL_B2_SH(q2, q1, tmp2, tmp5); - ptmp_src_u += 1; - ST6x4_UB(tmp3, 0, tmp2, 0, ptmp_src_u, stride); - ptmp_src_u += 4 * stride; - ST6x4_UB(tmp4, 0, tmp2, 4, ptmp_src_u, stride); - ptmp_src_v += 1; - ST6x4_UB(tmp6, 0, tmp5, 0, ptmp_src_v, stride); - ptmp_src_v += 4 * stride; - ST6x4_UB(tmp7, 0, tmp5, 4, ptmp_src_v, stride); -} - -static void VFilter8i(uint8_t* src_u, uint8_t* src_v, int stride, - int b_limit_in, int limit_in, int thresh_in) { - uint64_t p1_d, p0_d, q0_d, q1_d; - v16u8 p3, p2, p1, p0, q3, q2, q1, q0, mask, hev; - v16u8 p3_u, p2_u, p1_u, p0_u, q3_u, q2_u, q1_u, q0_u; - v16u8 p3_v, p2_v, p1_v, p0_v, q3_v, q2_v, q1_v, q0_v; - const v16u8 thresh = (v16u8)__msa_fill_b(thresh_in); - const v16u8 limit = (v16u8)__msa_fill_b(limit_in); - const v16u8 b_limit = (v16u8)__msa_fill_b(b_limit_in); - - LD_UB8(src_u, stride, p3_u, p2_u, p1_u, p0_u, q0_u, q1_u, q2_u, q3_u); - src_u += (5 * stride); - LD_UB8(src_v, stride, p3_v, p2_v, p1_v, p0_v, q0_v, q1_v, q2_v, q3_v); - src_v += (5 * stride); - ILVR_D4_UB(p3_v, p3_u, p2_v, p2_u, p1_v, p1_u, p0_v, p0_u, p3, p2, p1, p0); - ILVR_D4_UB(q0_v, q0_u, q1_v, q1_u, q2_v, q2_u, q3_v, q3_u, q0, q1, q2, q3); - LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, - hev, mask); - LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev); - p1_d = __msa_copy_s_d((v2i64)p1, 0); - p0_d = __msa_copy_s_d((v2i64)p0, 0); - q0_d = __msa_copy_s_d((v2i64)q0, 0); - q1_d = __msa_copy_s_d((v2i64)q1, 0); - SD4(q1_d, q0_d, p0_d, p1_d, src_u, -stride); - p1_d = __msa_copy_s_d((v2i64)p1, 1); - p0_d = __msa_copy_s_d((v2i64)p0, 1); - q0_d = __msa_copy_s_d((v2i64)q0, 1); - q1_d = __msa_copy_s_d((v2i64)q1, 1); - SD4(q1_d, q0_d, p0_d, p1_d, src_v, -stride); -} - -static void HFilter8i(uint8_t* src_u, uint8_t* src_v, int stride, - int b_limit_in, int limit_in, int thresh_in) { - v16u8 p3, p2, p1, p0, q3, q2, q1, q0, mask, hev; - v16u8 row0, row1, row2, row3, row4, row5, row6, row7, row8; - v16u8 row9, row10, row11, row12, row13, row14, row15; - v4i32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; - const v16u8 thresh = (v16u8)__msa_fill_b(thresh_in); - const v16u8 limit = (v16u8)__msa_fill_b(limit_in); - const v16u8 b_limit = (v16u8)__msa_fill_b(b_limit_in); - - LD_UB8(src_u, stride, row0, row1, row2, row3, row4, row5, row6, row7); - LD_UB8(src_v, stride, - row8, row9, row10, row11, row12, row13, row14, row15); - TRANSPOSE16x8_UB_UB(row0, row1, row2, row3, row4, row5, row6, row7, - row8, row9, row10, row11, row12, row13, row14, row15, - p3, p2, p1, p0, q0, q1, q2, q3); - LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, - hev, mask); - LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev); - ILVR_B2_SW(p0, p1, q1, q0, tmp0, tmp1); - ILVRL_H2_SW(tmp1, tmp0, tmp2, tmp3); - ILVL_B2_SW(p0, p1, q1, q0, tmp0, tmp1); - ILVRL_H2_SW(tmp1, tmp0, tmp4, tmp5); - src_u += 2; - ST4x4_UB(tmp2, tmp2, 0, 1, 2, 3, src_u, stride); - src_u += 4 * stride; - ST4x4_UB(tmp3, tmp3, 0, 1, 2, 3, src_u, stride); - src_v += 2; - ST4x4_UB(tmp4, tmp4, 0, 1, 2, 3, src_v, stride); - src_v += 4 * stride; - ST4x4_UB(tmp5, tmp5, 0, 1, 2, 3, src_v, stride); -} - -static void SimpleVFilter16(uint8_t* src, int stride, int b_limit_in) { - v16u8 p1, p0, q1, q0, mask; - const v16u8 b_limit = (v16u8)__msa_fill_b(b_limit_in); - - LD_UB4(src - 2 * stride, stride, p1, p0, q0, q1); - LPF_SIMPLE_MASK(p1, p0, q0, q1, b_limit, mask); - LPF_SIMPLE_FILT(p1, p0, q0, q1, mask); - ST_UB2(p0, q0, src - stride, stride); -} - -static void SimpleHFilter16(uint8_t* src, int stride, int b_limit_in) { - v16u8 p1, p0, q1, q0, mask, row0, row1, row2, row3, row4, row5, row6, row7; - v16u8 row8, row9, row10, row11, row12, row13, row14, row15; - v8i16 tmp0, tmp1; - const v16u8 b_limit = (v16u8)__msa_fill_b(b_limit_in); - uint8_t* ptemp_src = src - 2; - - LD_UB8(ptemp_src, stride, row0, row1, row2, row3, row4, row5, row6, row7); - LD_UB8(ptemp_src + 8 * stride, stride, - row8, row9, row10, row11, row12, row13, row14, row15); - TRANSPOSE16x4_UB_UB(row0, row1, row2, row3, row4, row5, row6, row7, - row8, row9, row10, row11, row12, row13, row14, row15, - p1, p0, q0, q1); - LPF_SIMPLE_MASK(p1, p0, q0, q1, b_limit, mask); - LPF_SIMPLE_FILT(p1, p0, q0, q1, mask); - ILVRL_B2_SH(q0, p0, tmp1, tmp0); - ptemp_src += 1; - ST2x4_UB(tmp1, 0, ptemp_src, stride); - ptemp_src += 4 * stride; - ST2x4_UB(tmp1, 4, ptemp_src, stride); - ptemp_src += 4 * stride; - ST2x4_UB(tmp0, 0, ptemp_src, stride); - ptemp_src += 4 * stride; - ST2x4_UB(tmp0, 4, ptemp_src, stride); - ptemp_src += 4 * stride; -} - -static void SimpleVFilter16i(uint8_t* src_y, int stride, int b_limit_in) { - SimpleVFilter16(src_y + 4 * stride, stride, b_limit_in); - SimpleVFilter16(src_y + 8 * stride, stride, b_limit_in); - SimpleVFilter16(src_y + 12 * stride, stride, b_limit_in); -} - -static void SimpleHFilter16i(uint8_t* src_y, int stride, int b_limit_in) { - SimpleHFilter16(src_y + 4, stride, b_limit_in); - SimpleHFilter16(src_y + 8, stride, b_limit_in); - SimpleHFilter16(src_y + 12, stride, b_limit_in); -} - -//------------------------------------------------------------------------------ -// Intra predictions -//------------------------------------------------------------------------------ - -// 4x4 - -static void DC4(uint8_t* dst) { // DC - uint32_t dc = 4; - int i; - for (i = 0; i < 4; ++i) dc += dst[i - BPS] + dst[-1 + i * BPS]; - dc >>= 3; - dc = dc | (dc << 8) | (dc << 16) | (dc << 24); - SW4(dc, dc, dc, dc, dst, BPS); -} - -static void TM4(uint8_t* dst) { - const uint8_t* const ptemp = dst - BPS - 1; - v8i16 T, d, r0, r1, r2, r3; - const v16i8 zero = { 0 }; - const v8i16 TL = (v8i16)__msa_fill_h(ptemp[0 * BPS]); - const v8i16 L0 = (v8i16)__msa_fill_h(ptemp[1 * BPS]); - const v8i16 L1 = (v8i16)__msa_fill_h(ptemp[2 * BPS]); - const v8i16 L2 = (v8i16)__msa_fill_h(ptemp[3 * BPS]); - const v8i16 L3 = (v8i16)__msa_fill_h(ptemp[4 * BPS]); - const v16u8 T1 = LD_UB(ptemp + 1); - - T = (v8i16)__msa_ilvr_b(zero, (v16i8)T1); - d = T - TL; - ADD4(d, L0, d, L1, d, L2, d, L3, r0, r1, r2, r3); - CLIP_SH4_0_255(r0, r1, r2, r3); - PCKEV_ST4x4_UB(r0, r1, r2, r3, dst, BPS); -} - -static void VE4(uint8_t* dst) { // vertical - const uint8_t* const ptop = dst - BPS - 1; - const uint32_t val0 = LW(ptop + 0); - const uint32_t val1 = LW(ptop + 4); - uint32_t out; - v16u8 A = { 0 }, B, C, AC, B2, R; - - INSERT_W2_UB(val0, val1, A); - B = SLDI_UB(A, A, 1); - C = SLDI_UB(A, A, 2); - AC = __msa_ave_u_b(A, C); - B2 = __msa_ave_u_b(B, B); - R = __msa_aver_u_b(AC, B2); - out = __msa_copy_s_w((v4i32)R, 0); - SW4(out, out, out, out, dst, BPS); -} - -static void RD4(uint8_t* dst) { // Down-right - const uint8_t* const ptop = dst - 1 - BPS; - uint32_t val0 = LW(ptop + 0); - uint32_t val1 = LW(ptop + 4); - uint32_t val2, val3; - v16u8 A, B, C, AC, B2, R, A1 = { 0 }; - - INSERT_W2_UB(val0, val1, A1); - A = SLDI_UB(A1, A1, 12); - A = (v16u8)__msa_insert_b((v16i8)A, 3, ptop[1 * BPS]); - A = (v16u8)__msa_insert_b((v16i8)A, 2, ptop[2 * BPS]); - A = (v16u8)__msa_insert_b((v16i8)A, 1, ptop[3 * BPS]); - A = (v16u8)__msa_insert_b((v16i8)A, 0, ptop[4 * BPS]); - B = SLDI_UB(A, A, 1); - C = SLDI_UB(A, A, 2); - AC = __msa_ave_u_b(A, C); - B2 = __msa_ave_u_b(B, B); - R = __msa_aver_u_b(AC, B2); - val3 = __msa_copy_s_w((v4i32)R, 0); - R = SLDI_UB(R, R, 1); - val2 = __msa_copy_s_w((v4i32)R, 0); - R = SLDI_UB(R, R, 1); - val1 = __msa_copy_s_w((v4i32)R, 0); - R = SLDI_UB(R, R, 1); - val0 = __msa_copy_s_w((v4i32)R, 0); - SW4(val0, val1, val2, val3, dst, BPS); -} - -static void LD4(uint8_t* dst) { // Down-Left - const uint8_t* const ptop = dst - BPS; - uint32_t val0 = LW(ptop + 0); - uint32_t val1 = LW(ptop + 4); - uint32_t val2, val3; - v16u8 A = { 0 }, B, C, AC, B2, R; - - INSERT_W2_UB(val0, val1, A); - B = SLDI_UB(A, A, 1); - C = SLDI_UB(A, A, 2); - C = (v16u8)__msa_insert_b((v16i8)C, 6, ptop[7]); - AC = __msa_ave_u_b(A, C); - B2 = __msa_ave_u_b(B, B); - R = __msa_aver_u_b(AC, B2); - val0 = __msa_copy_s_w((v4i32)R, 0); - R = SLDI_UB(R, R, 1); - val1 = __msa_copy_s_w((v4i32)R, 0); - R = SLDI_UB(R, R, 1); - val2 = __msa_copy_s_w((v4i32)R, 0); - R = SLDI_UB(R, R, 1); - val3 = __msa_copy_s_w((v4i32)R, 0); - SW4(val0, val1, val2, val3, dst, BPS); -} - -// 16x16 - -static void DC16(uint8_t* dst) { // DC - uint32_t dc = 16; - int i; - const v16u8 rtop = LD_UB(dst - BPS); - const v8u16 dctop = __msa_hadd_u_h(rtop, rtop); - v16u8 out; - - for (i = 0; i < 16; ++i) { - dc += dst[-1 + i * BPS]; - } - dc += HADD_UH_U32(dctop); - out = (v16u8)__msa_fill_b(dc >> 5); - ST_UB8(out, out, out, out, out, out, out, out, dst, BPS); - ST_UB8(out, out, out, out, out, out, out, out, dst + 8 * BPS, BPS); -} - -static void TM16(uint8_t* dst) { - int j; - v8i16 d1, d2; - const v16i8 zero = { 0 }; - const v8i16 TL = (v8i16)__msa_fill_h(dst[-1 - BPS]); - const v16i8 T = LD_SB(dst - BPS); - - ILVRL_B2_SH(zero, T, d1, d2); - SUB2(d1, TL, d2, TL, d1, d2); - for (j = 0; j < 16; j += 4) { - v16i8 t0, t1, t2, t3; - v8i16 r0, r1, r2, r3, r4, r5, r6, r7; - const v8i16 L0 = (v8i16)__msa_fill_h(dst[-1 + 0 * BPS]); - const v8i16 L1 = (v8i16)__msa_fill_h(dst[-1 + 1 * BPS]); - const v8i16 L2 = (v8i16)__msa_fill_h(dst[-1 + 2 * BPS]); - const v8i16 L3 = (v8i16)__msa_fill_h(dst[-1 + 3 * BPS]); - ADD4(d1, L0, d1, L1, d1, L2, d1, L3, r0, r1, r2, r3); - ADD4(d2, L0, d2, L1, d2, L2, d2, L3, r4, r5, r6, r7); - CLIP_SH4_0_255(r0, r1, r2, r3); - CLIP_SH4_0_255(r4, r5, r6, r7); - PCKEV_B4_SB(r4, r0, r5, r1, r6, r2, r7, r3, t0, t1, t2, t3); - ST_SB4(t0, t1, t2, t3, dst, BPS); - dst += 4 * BPS; - } -} - -static void VE16(uint8_t* dst) { // vertical - const v16u8 rtop = LD_UB(dst - BPS); - ST_UB8(rtop, rtop, rtop, rtop, rtop, rtop, rtop, rtop, dst, BPS); - ST_UB8(rtop, rtop, rtop, rtop, rtop, rtop, rtop, rtop, dst + 8 * BPS, BPS); -} - -static void HE16(uint8_t* dst) { // horizontal - int j; - for (j = 16; j > 0; j -= 4) { - const v16u8 L0 = (v16u8)__msa_fill_b(dst[-1 + 0 * BPS]); - const v16u8 L1 = (v16u8)__msa_fill_b(dst[-1 + 1 * BPS]); - const v16u8 L2 = (v16u8)__msa_fill_b(dst[-1 + 2 * BPS]); - const v16u8 L3 = (v16u8)__msa_fill_b(dst[-1 + 3 * BPS]); - ST_UB4(L0, L1, L2, L3, dst, BPS); - dst += 4 * BPS; - } -} - -static void DC16NoTop(uint8_t* dst) { // DC with top samples not available - int j; - uint32_t dc = 8; - v16u8 out; - - for (j = 0; j < 16; ++j) { - dc += dst[-1 + j * BPS]; - } - out = (v16u8)__msa_fill_b(dc >> 4); - ST_UB8(out, out, out, out, out, out, out, out, dst, BPS); - ST_UB8(out, out, out, out, out, out, out, out, dst + 8 * BPS, BPS); -} - -static void DC16NoLeft(uint8_t* dst) { // DC with left samples not available - uint32_t dc = 8; - const v16u8 rtop = LD_UB(dst - BPS); - const v8u16 dctop = __msa_hadd_u_h(rtop, rtop); - v16u8 out; - - dc += HADD_UH_U32(dctop); - out = (v16u8)__msa_fill_b(dc >> 4); - ST_UB8(out, out, out, out, out, out, out, out, dst, BPS); - ST_UB8(out, out, out, out, out, out, out, out, dst + 8 * BPS, BPS); -} - -static void DC16NoTopLeft(uint8_t* dst) { // DC with nothing - const v16u8 out = (v16u8)__msa_fill_b(0x80); - ST_UB8(out, out, out, out, out, out, out, out, dst, BPS); - ST_UB8(out, out, out, out, out, out, out, out, dst + 8 * BPS, BPS); -} - -// Chroma - -#define STORE8x8(out, dst) do { \ - SD4(out, out, out, out, dst + 0 * BPS, BPS); \ - SD4(out, out, out, out, dst + 4 * BPS, BPS); \ -} while (0) - -static void DC8uv(uint8_t* dst) { // DC - uint32_t dc = 8; - int i; - uint64_t out; - const v16u8 rtop = LD_UB(dst - BPS); - const v8u16 temp0 = __msa_hadd_u_h(rtop, rtop); - const v4u32 temp1 = __msa_hadd_u_w(temp0, temp0); - const v2u64 temp2 = __msa_hadd_u_d(temp1, temp1); - v16u8 dctemp; - - for (i = 0; i < 8; ++i) { - dc += dst[-1 + i * BPS]; - } - dc += __msa_copy_s_w((v4i32)temp2, 0); - dctemp = (v16u8)__msa_fill_b(dc >> 4); - out = __msa_copy_s_d((v2i64)dctemp, 0); - STORE8x8(out, dst); -} - -static void TM8uv(uint8_t* dst) { - int j; - const v16i8 T1 = LD_SB(dst - BPS); - const v16i8 zero = { 0 }; - const v8i16 T = (v8i16)__msa_ilvr_b(zero, T1); - const v8i16 TL = (v8i16)__msa_fill_h(dst[-1 - BPS]); - const v8i16 d = T - TL; - - for (j = 0; j < 8; j += 4) { - v16i8 t0, t1; - v8i16 r0 = (v8i16)__msa_fill_h(dst[-1 + 0 * BPS]); - v8i16 r1 = (v8i16)__msa_fill_h(dst[-1 + 1 * BPS]); - v8i16 r2 = (v8i16)__msa_fill_h(dst[-1 + 2 * BPS]); - v8i16 r3 = (v8i16)__msa_fill_h(dst[-1 + 3 * BPS]); - ADD4(d, r0, d, r1, d, r2, d, r3, r0, r1, r2, r3); - CLIP_SH4_0_255(r0, r1, r2, r3); - PCKEV_B2_SB(r1, r0, r3, r2, t0, t1); - ST4x4_UB(t0, t1, 0, 2, 0, 2, dst, BPS); - ST4x4_UB(t0, t1, 1, 3, 1, 3, dst + 4, BPS); - dst += 4 * BPS; - } -} - -static void VE8uv(uint8_t* dst) { // vertical - const v16u8 rtop = LD_UB(dst - BPS); - const uint64_t out = __msa_copy_s_d((v2i64)rtop, 0); - STORE8x8(out, dst); -} - -static void HE8uv(uint8_t* dst) { // horizontal - int j; - for (j = 0; j < 8; j += 4) { - const v16u8 L0 = (v16u8)__msa_fill_b(dst[-1 + 0 * BPS]); - const v16u8 L1 = (v16u8)__msa_fill_b(dst[-1 + 1 * BPS]); - const v16u8 L2 = (v16u8)__msa_fill_b(dst[-1 + 2 * BPS]); - const v16u8 L3 = (v16u8)__msa_fill_b(dst[-1 + 3 * BPS]); - const uint64_t out0 = __msa_copy_s_d((v2i64)L0, 0); - const uint64_t out1 = __msa_copy_s_d((v2i64)L1, 0); - const uint64_t out2 = __msa_copy_s_d((v2i64)L2, 0); - const uint64_t out3 = __msa_copy_s_d((v2i64)L3, 0); - SD4(out0, out1, out2, out3, dst, BPS); - dst += 4 * BPS; - } -} - -static void DC8uvNoLeft(uint8_t* dst) { // DC with no left samples - const uint32_t dc = 4; - const v16u8 rtop = LD_UB(dst - BPS); - const v8u16 temp0 = __msa_hadd_u_h(rtop, rtop); - const v4u32 temp1 = __msa_hadd_u_w(temp0, temp0); - const v2u64 temp2 = __msa_hadd_u_d(temp1, temp1); - const uint32_t sum_m = __msa_copy_s_w((v4i32)temp2, 0); - const v16u8 dcval = (v16u8)__msa_fill_b((dc + sum_m) >> 3); - const uint64_t out = __msa_copy_s_d((v2i64)dcval, 0); - STORE8x8(out, dst); -} - -static void DC8uvNoTop(uint8_t* dst) { // DC with no top samples - uint32_t dc = 4; - int i; - uint64_t out; - v16u8 dctemp; - - for (i = 0; i < 8; ++i) { - dc += dst[-1 + i * BPS]; - } - dctemp = (v16u8)__msa_fill_b(dc >> 3); - out = __msa_copy_s_d((v2i64)dctemp, 0); - STORE8x8(out, dst); -} - -static void DC8uvNoTopLeft(uint8_t* dst) { // DC with nothing - const uint64_t out = 0x8080808080808080ULL; - STORE8x8(out, dst); -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8DspInitMSA(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitMSA(void) { - VP8TransformWHT = TransformWHT; - VP8Transform = TransformTwo; - VP8TransformDC = TransformDC; - VP8TransformAC3 = TransformAC3; - - VP8VFilter16 = VFilter16; - VP8HFilter16 = HFilter16; - VP8VFilter16i = VFilter16i; - VP8HFilter16i = HFilter16i; - VP8VFilter8 = VFilter8; - VP8HFilter8 = HFilter8; - VP8VFilter8i = VFilter8i; - VP8HFilter8i = HFilter8i; - VP8SimpleVFilter16 = SimpleVFilter16; - VP8SimpleHFilter16 = SimpleHFilter16; - VP8SimpleVFilter16i = SimpleVFilter16i; - VP8SimpleHFilter16i = SimpleHFilter16i; - - VP8PredLuma4[0] = DC4; - VP8PredLuma4[1] = TM4; - VP8PredLuma4[2] = VE4; - VP8PredLuma4[4] = RD4; - VP8PredLuma4[6] = LD4; - VP8PredLuma16[0] = DC16; - VP8PredLuma16[1] = TM16; - VP8PredLuma16[2] = VE16; - VP8PredLuma16[3] = HE16; - VP8PredLuma16[4] = DC16NoTop; - VP8PredLuma16[5] = DC16NoLeft; - VP8PredLuma16[6] = DC16NoTopLeft; - VP8PredChroma8[0] = DC8uv; - VP8PredChroma8[1] = TM8uv; - VP8PredChroma8[2] = VE8uv; - VP8PredChroma8[3] = HE8uv; - VP8PredChroma8[4] = DC8uvNoTop; - VP8PredChroma8[5] = DC8uvNoLeft; - VP8PredChroma8[6] = DC8uvNoTopLeft; -} - -#else // !WEBP_USE_MSA - -WEBP_DSP_INIT_STUB(VP8DspInitMSA) - -#endif // WEBP_USE_MSA diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_neon.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_neon.c deleted file mode 100644 index b7a2dd5..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_neon.c +++ /dev/null @@ -1,1652 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// ARM NEON version of dsp functions and loop filtering. -// -// Authors: Somnath Banerjee (somnath@google.com) -// Johann Koenig (johannkoenig@google.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_NEON) - -#include "src/dsp/neon.h" -#include "src/dec/vp8i_dec.h" - -//------------------------------------------------------------------------------ -// NxM Loading functions - -#if !defined(WORK_AROUND_GCC) - -// This intrinsics version makes gcc-4.6.3 crash during Load4x??() compilation -// (register alloc, probably). The variants somewhat mitigate the problem, but -// not quite. HFilter16i() remains problematic. -static WEBP_INLINE uint8x8x4_t Load4x8_NEON(const uint8_t* const src, - int stride) { - const uint8x8_t zero = vdup_n_u8(0); - uint8x8x4_t out; - INIT_VECTOR4(out, zero, zero, zero, zero); - out = vld4_lane_u8(src + 0 * stride, out, 0); - out = vld4_lane_u8(src + 1 * stride, out, 1); - out = vld4_lane_u8(src + 2 * stride, out, 2); - out = vld4_lane_u8(src + 3 * stride, out, 3); - out = vld4_lane_u8(src + 4 * stride, out, 4); - out = vld4_lane_u8(src + 5 * stride, out, 5); - out = vld4_lane_u8(src + 6 * stride, out, 6); - out = vld4_lane_u8(src + 7 * stride, out, 7); - return out; -} - -static WEBP_INLINE void Load4x16_NEON(const uint8_t* const src, int stride, - uint8x16_t* const p1, - uint8x16_t* const p0, - uint8x16_t* const q0, - uint8x16_t* const q1) { - // row0 = p1[0..7]|p0[0..7]|q0[0..7]|q1[0..7] - // row8 = p1[8..15]|p0[8..15]|q0[8..15]|q1[8..15] - const uint8x8x4_t row0 = Load4x8_NEON(src - 2 + 0 * stride, stride); - const uint8x8x4_t row8 = Load4x8_NEON(src - 2 + 8 * stride, stride); - *p1 = vcombine_u8(row0.val[0], row8.val[0]); - *p0 = vcombine_u8(row0.val[1], row8.val[1]); - *q0 = vcombine_u8(row0.val[2], row8.val[2]); - *q1 = vcombine_u8(row0.val[3], row8.val[3]); -} - -#else // WORK_AROUND_GCC - -#define LOADQ_LANE_32b(VALUE, LANE) do { \ - (VALUE) = vld1q_lane_u32((const uint32_t*)src, (VALUE), (LANE)); \ - src += stride; \ -} while (0) - -static WEBP_INLINE void Load4x16_NEON(const uint8_t* src, int stride, - uint8x16_t* const p1, - uint8x16_t* const p0, - uint8x16_t* const q0, - uint8x16_t* const q1) { - const uint32x4_t zero = vdupq_n_u32(0); - uint32x4x4_t in; - INIT_VECTOR4(in, zero, zero, zero, zero); - src -= 2; - LOADQ_LANE_32b(in.val[0], 0); - LOADQ_LANE_32b(in.val[1], 0); - LOADQ_LANE_32b(in.val[2], 0); - LOADQ_LANE_32b(in.val[3], 0); - LOADQ_LANE_32b(in.val[0], 1); - LOADQ_LANE_32b(in.val[1], 1); - LOADQ_LANE_32b(in.val[2], 1); - LOADQ_LANE_32b(in.val[3], 1); - LOADQ_LANE_32b(in.val[0], 2); - LOADQ_LANE_32b(in.val[1], 2); - LOADQ_LANE_32b(in.val[2], 2); - LOADQ_LANE_32b(in.val[3], 2); - LOADQ_LANE_32b(in.val[0], 3); - LOADQ_LANE_32b(in.val[1], 3); - LOADQ_LANE_32b(in.val[2], 3); - LOADQ_LANE_32b(in.val[3], 3); - // Transpose four 4x4 parts: - { - const uint8x16x2_t row01 = vtrnq_u8(vreinterpretq_u8_u32(in.val[0]), - vreinterpretq_u8_u32(in.val[1])); - const uint8x16x2_t row23 = vtrnq_u8(vreinterpretq_u8_u32(in.val[2]), - vreinterpretq_u8_u32(in.val[3])); - const uint16x8x2_t row02 = vtrnq_u16(vreinterpretq_u16_u8(row01.val[0]), - vreinterpretq_u16_u8(row23.val[0])); - const uint16x8x2_t row13 = vtrnq_u16(vreinterpretq_u16_u8(row01.val[1]), - vreinterpretq_u16_u8(row23.val[1])); - *p1 = vreinterpretq_u8_u16(row02.val[0]); - *p0 = vreinterpretq_u8_u16(row13.val[0]); - *q0 = vreinterpretq_u8_u16(row02.val[1]); - *q1 = vreinterpretq_u8_u16(row13.val[1]); - } -} -#undef LOADQ_LANE_32b - -#endif // !WORK_AROUND_GCC - -static WEBP_INLINE void Load8x16_NEON( - const uint8_t* const src, int stride, - uint8x16_t* const p3, uint8x16_t* const p2, uint8x16_t* const p1, - uint8x16_t* const p0, uint8x16_t* const q0, uint8x16_t* const q1, - uint8x16_t* const q2, uint8x16_t* const q3) { - Load4x16_NEON(src - 2, stride, p3, p2, p1, p0); - Load4x16_NEON(src + 2, stride, q0, q1, q2, q3); -} - -static WEBP_INLINE void Load16x4_NEON(const uint8_t* const src, int stride, - uint8x16_t* const p1, - uint8x16_t* const p0, - uint8x16_t* const q0, - uint8x16_t* const q1) { - *p1 = vld1q_u8(src - 2 * stride); - *p0 = vld1q_u8(src - 1 * stride); - *q0 = vld1q_u8(src + 0 * stride); - *q1 = vld1q_u8(src + 1 * stride); -} - -static WEBP_INLINE void Load16x8_NEON( - const uint8_t* const src, int stride, - uint8x16_t* const p3, uint8x16_t* const p2, uint8x16_t* const p1, - uint8x16_t* const p0, uint8x16_t* const q0, uint8x16_t* const q1, - uint8x16_t* const q2, uint8x16_t* const q3) { - Load16x4_NEON(src - 2 * stride, stride, p3, p2, p1, p0); - Load16x4_NEON(src + 2 * stride, stride, q0, q1, q2, q3); -} - -static WEBP_INLINE void Load8x8x2_NEON( - const uint8_t* const u, const uint8_t* const v, int stride, - uint8x16_t* const p3, uint8x16_t* const p2, uint8x16_t* const p1, - uint8x16_t* const p0, uint8x16_t* const q0, uint8x16_t* const q1, - uint8x16_t* const q2, uint8x16_t* const q3) { - // We pack the 8x8 u-samples in the lower half of the uint8x16_t destination - // and the v-samples on the higher half. - *p3 = vcombine_u8(vld1_u8(u - 4 * stride), vld1_u8(v - 4 * stride)); - *p2 = vcombine_u8(vld1_u8(u - 3 * stride), vld1_u8(v - 3 * stride)); - *p1 = vcombine_u8(vld1_u8(u - 2 * stride), vld1_u8(v - 2 * stride)); - *p0 = vcombine_u8(vld1_u8(u - 1 * stride), vld1_u8(v - 1 * stride)); - *q0 = vcombine_u8(vld1_u8(u + 0 * stride), vld1_u8(v + 0 * stride)); - *q1 = vcombine_u8(vld1_u8(u + 1 * stride), vld1_u8(v + 1 * stride)); - *q2 = vcombine_u8(vld1_u8(u + 2 * stride), vld1_u8(v + 2 * stride)); - *q3 = vcombine_u8(vld1_u8(u + 3 * stride), vld1_u8(v + 3 * stride)); -} - -#if !defined(WORK_AROUND_GCC) - -#define LOAD_UV_8(ROW) \ - vcombine_u8(vld1_u8(u - 4 + (ROW) * stride), vld1_u8(v - 4 + (ROW) * stride)) - -static WEBP_INLINE void Load8x8x2T_NEON( - const uint8_t* const u, const uint8_t* const v, int stride, - uint8x16_t* const p3, uint8x16_t* const p2, uint8x16_t* const p1, - uint8x16_t* const p0, uint8x16_t* const q0, uint8x16_t* const q1, - uint8x16_t* const q2, uint8x16_t* const q3) { - // We pack the 8x8 u-samples in the lower half of the uint8x16_t destination - // and the v-samples on the higher half. - const uint8x16_t row0 = LOAD_UV_8(0); - const uint8x16_t row1 = LOAD_UV_8(1); - const uint8x16_t row2 = LOAD_UV_8(2); - const uint8x16_t row3 = LOAD_UV_8(3); - const uint8x16_t row4 = LOAD_UV_8(4); - const uint8x16_t row5 = LOAD_UV_8(5); - const uint8x16_t row6 = LOAD_UV_8(6); - const uint8x16_t row7 = LOAD_UV_8(7); - // Perform two side-by-side 8x8 transposes - // u00 u01 u02 u03 u04 u05 u06 u07 | v00 v01 v02 v03 v04 v05 v06 v07 - // u10 u11 u12 u13 u14 u15 u16 u17 | v10 v11 v12 ... - // u20 u21 u22 u23 u24 u25 u26 u27 | v20 v21 ... - // u30 u31 u32 u33 u34 u35 u36 u37 | ... - // u40 u41 u42 u43 u44 u45 u46 u47 | ... - // u50 u51 u52 u53 u54 u55 u56 u57 | ... - // u60 u61 u62 u63 u64 u65 u66 u67 | v60 ... - // u70 u71 u72 u73 u74 u75 u76 u77 | v70 v71 v72 ... - const uint8x16x2_t row01 = vtrnq_u8(row0, row1); // u00 u10 u02 u12 ... - // u01 u11 u03 u13 ... - const uint8x16x2_t row23 = vtrnq_u8(row2, row3); // u20 u30 u22 u32 ... - // u21 u31 u23 u33 ... - const uint8x16x2_t row45 = vtrnq_u8(row4, row5); // ... - const uint8x16x2_t row67 = vtrnq_u8(row6, row7); // ... - const uint16x8x2_t row02 = vtrnq_u16(vreinterpretq_u16_u8(row01.val[0]), - vreinterpretq_u16_u8(row23.val[0])); - const uint16x8x2_t row13 = vtrnq_u16(vreinterpretq_u16_u8(row01.val[1]), - vreinterpretq_u16_u8(row23.val[1])); - const uint16x8x2_t row46 = vtrnq_u16(vreinterpretq_u16_u8(row45.val[0]), - vreinterpretq_u16_u8(row67.val[0])); - const uint16x8x2_t row57 = vtrnq_u16(vreinterpretq_u16_u8(row45.val[1]), - vreinterpretq_u16_u8(row67.val[1])); - const uint32x4x2_t row04 = vtrnq_u32(vreinterpretq_u32_u16(row02.val[0]), - vreinterpretq_u32_u16(row46.val[0])); - const uint32x4x2_t row26 = vtrnq_u32(vreinterpretq_u32_u16(row02.val[1]), - vreinterpretq_u32_u16(row46.val[1])); - const uint32x4x2_t row15 = vtrnq_u32(vreinterpretq_u32_u16(row13.val[0]), - vreinterpretq_u32_u16(row57.val[0])); - const uint32x4x2_t row37 = vtrnq_u32(vreinterpretq_u32_u16(row13.val[1]), - vreinterpretq_u32_u16(row57.val[1])); - *p3 = vreinterpretq_u8_u32(row04.val[0]); - *p2 = vreinterpretq_u8_u32(row15.val[0]); - *p1 = vreinterpretq_u8_u32(row26.val[0]); - *p0 = vreinterpretq_u8_u32(row37.val[0]); - *q0 = vreinterpretq_u8_u32(row04.val[1]); - *q1 = vreinterpretq_u8_u32(row15.val[1]); - *q2 = vreinterpretq_u8_u32(row26.val[1]); - *q3 = vreinterpretq_u8_u32(row37.val[1]); -} -#undef LOAD_UV_8 - -#endif // !WORK_AROUND_GCC - -static WEBP_INLINE void Store2x8_NEON(const uint8x8x2_t v, - uint8_t* const dst, int stride) { - vst2_lane_u8(dst + 0 * stride, v, 0); - vst2_lane_u8(dst + 1 * stride, v, 1); - vst2_lane_u8(dst + 2 * stride, v, 2); - vst2_lane_u8(dst + 3 * stride, v, 3); - vst2_lane_u8(dst + 4 * stride, v, 4); - vst2_lane_u8(dst + 5 * stride, v, 5); - vst2_lane_u8(dst + 6 * stride, v, 6); - vst2_lane_u8(dst + 7 * stride, v, 7); -} - -static WEBP_INLINE void Store2x16_NEON(const uint8x16_t p0, const uint8x16_t q0, - uint8_t* const dst, int stride) { - uint8x8x2_t lo, hi; - lo.val[0] = vget_low_u8(p0); - lo.val[1] = vget_low_u8(q0); - hi.val[0] = vget_high_u8(p0); - hi.val[1] = vget_high_u8(q0); - Store2x8_NEON(lo, dst - 1 + 0 * stride, stride); - Store2x8_NEON(hi, dst - 1 + 8 * stride, stride); -} - -#if !defined(WORK_AROUND_GCC) -static WEBP_INLINE void Store4x8_NEON(const uint8x8x4_t v, - uint8_t* const dst, int stride) { - vst4_lane_u8(dst + 0 * stride, v, 0); - vst4_lane_u8(dst + 1 * stride, v, 1); - vst4_lane_u8(dst + 2 * stride, v, 2); - vst4_lane_u8(dst + 3 * stride, v, 3); - vst4_lane_u8(dst + 4 * stride, v, 4); - vst4_lane_u8(dst + 5 * stride, v, 5); - vst4_lane_u8(dst + 6 * stride, v, 6); - vst4_lane_u8(dst + 7 * stride, v, 7); -} - -static WEBP_INLINE void Store4x16_NEON(const uint8x16_t p1, const uint8x16_t p0, - const uint8x16_t q0, const uint8x16_t q1, - uint8_t* const dst, int stride) { - uint8x8x4_t lo, hi; - INIT_VECTOR4(lo, - vget_low_u8(p1), vget_low_u8(p0), - vget_low_u8(q0), vget_low_u8(q1)); - INIT_VECTOR4(hi, - vget_high_u8(p1), vget_high_u8(p0), - vget_high_u8(q0), vget_high_u8(q1)); - Store4x8_NEON(lo, dst - 2 + 0 * stride, stride); - Store4x8_NEON(hi, dst - 2 + 8 * stride, stride); -} -#endif // !WORK_AROUND_GCC - -static WEBP_INLINE void Store16x2_NEON(const uint8x16_t p0, const uint8x16_t q0, - uint8_t* const dst, int stride) { - vst1q_u8(dst - stride, p0); - vst1q_u8(dst, q0); -} - -static WEBP_INLINE void Store16x4_NEON(const uint8x16_t p1, const uint8x16_t p0, - const uint8x16_t q0, const uint8x16_t q1, - uint8_t* const dst, int stride) { - Store16x2_NEON(p1, p0, dst - stride, stride); - Store16x2_NEON(q0, q1, dst + stride, stride); -} - -static WEBP_INLINE void Store8x2x2_NEON(const uint8x16_t p0, - const uint8x16_t q0, - uint8_t* const u, uint8_t* const v, - int stride) { - // p0 and q0 contain the u+v samples packed in low/high halves. - vst1_u8(u - stride, vget_low_u8(p0)); - vst1_u8(u, vget_low_u8(q0)); - vst1_u8(v - stride, vget_high_u8(p0)); - vst1_u8(v, vget_high_u8(q0)); -} - -static WEBP_INLINE void Store8x4x2_NEON(const uint8x16_t p1, - const uint8x16_t p0, - const uint8x16_t q0, - const uint8x16_t q1, - uint8_t* const u, uint8_t* const v, - int stride) { - // The p1...q1 registers contain the u+v samples packed in low/high halves. - Store8x2x2_NEON(p1, p0, u - stride, v - stride, stride); - Store8x2x2_NEON(q0, q1, u + stride, v + stride, stride); -} - -#if !defined(WORK_AROUND_GCC) - -#define STORE6_LANE(DST, VAL0, VAL1, LANE) do { \ - vst3_lane_u8((DST) - 3, (VAL0), (LANE)); \ - vst3_lane_u8((DST) + 0, (VAL1), (LANE)); \ - (DST) += stride; \ -} while (0) - -static WEBP_INLINE void Store6x8x2_NEON( - const uint8x16_t p2, const uint8x16_t p1, const uint8x16_t p0, - const uint8x16_t q0, const uint8x16_t q1, const uint8x16_t q2, - uint8_t* u, uint8_t* v, int stride) { - uint8x8x3_t u0, u1, v0, v1; - INIT_VECTOR3(u0, vget_low_u8(p2), vget_low_u8(p1), vget_low_u8(p0)); - INIT_VECTOR3(u1, vget_low_u8(q0), vget_low_u8(q1), vget_low_u8(q2)); - INIT_VECTOR3(v0, vget_high_u8(p2), vget_high_u8(p1), vget_high_u8(p0)); - INIT_VECTOR3(v1, vget_high_u8(q0), vget_high_u8(q1), vget_high_u8(q2)); - STORE6_LANE(u, u0, u1, 0); - STORE6_LANE(u, u0, u1, 1); - STORE6_LANE(u, u0, u1, 2); - STORE6_LANE(u, u0, u1, 3); - STORE6_LANE(u, u0, u1, 4); - STORE6_LANE(u, u0, u1, 5); - STORE6_LANE(u, u0, u1, 6); - STORE6_LANE(u, u0, u1, 7); - STORE6_LANE(v, v0, v1, 0); - STORE6_LANE(v, v0, v1, 1); - STORE6_LANE(v, v0, v1, 2); - STORE6_LANE(v, v0, v1, 3); - STORE6_LANE(v, v0, v1, 4); - STORE6_LANE(v, v0, v1, 5); - STORE6_LANE(v, v0, v1, 6); - STORE6_LANE(v, v0, v1, 7); -} -#undef STORE6_LANE - -static WEBP_INLINE void Store4x8x2_NEON(const uint8x16_t p1, - const uint8x16_t p0, - const uint8x16_t q0, - const uint8x16_t q1, - uint8_t* const u, uint8_t* const v, - int stride) { - uint8x8x4_t u0, v0; - INIT_VECTOR4(u0, - vget_low_u8(p1), vget_low_u8(p0), - vget_low_u8(q0), vget_low_u8(q1)); - INIT_VECTOR4(v0, - vget_high_u8(p1), vget_high_u8(p0), - vget_high_u8(q0), vget_high_u8(q1)); - vst4_lane_u8(u - 2 + 0 * stride, u0, 0); - vst4_lane_u8(u - 2 + 1 * stride, u0, 1); - vst4_lane_u8(u - 2 + 2 * stride, u0, 2); - vst4_lane_u8(u - 2 + 3 * stride, u0, 3); - vst4_lane_u8(u - 2 + 4 * stride, u0, 4); - vst4_lane_u8(u - 2 + 5 * stride, u0, 5); - vst4_lane_u8(u - 2 + 6 * stride, u0, 6); - vst4_lane_u8(u - 2 + 7 * stride, u0, 7); - vst4_lane_u8(v - 2 + 0 * stride, v0, 0); - vst4_lane_u8(v - 2 + 1 * stride, v0, 1); - vst4_lane_u8(v - 2 + 2 * stride, v0, 2); - vst4_lane_u8(v - 2 + 3 * stride, v0, 3); - vst4_lane_u8(v - 2 + 4 * stride, v0, 4); - vst4_lane_u8(v - 2 + 5 * stride, v0, 5); - vst4_lane_u8(v - 2 + 6 * stride, v0, 6); - vst4_lane_u8(v - 2 + 7 * stride, v0, 7); -} - -#endif // !WORK_AROUND_GCC - -// Zero extend 'v' to an int16x8_t. -static WEBP_INLINE int16x8_t ConvertU8ToS16_NEON(uint8x8_t v) { - return vreinterpretq_s16_u16(vmovl_u8(v)); -} - -// Performs unsigned 8b saturation on 'dst01' and 'dst23' storing the result -// to the corresponding rows of 'dst'. -static WEBP_INLINE void SaturateAndStore4x4_NEON(uint8_t* const dst, - const int16x8_t dst01, - const int16x8_t dst23) { - // Unsigned saturate to 8b. - const uint8x8_t dst01_u8 = vqmovun_s16(dst01); - const uint8x8_t dst23_u8 = vqmovun_s16(dst23); - - // Store the results. - vst1_lane_u32((uint32_t*)(dst + 0 * BPS), vreinterpret_u32_u8(dst01_u8), 0); - vst1_lane_u32((uint32_t*)(dst + 1 * BPS), vreinterpret_u32_u8(dst01_u8), 1); - vst1_lane_u32((uint32_t*)(dst + 2 * BPS), vreinterpret_u32_u8(dst23_u8), 0); - vst1_lane_u32((uint32_t*)(dst + 3 * BPS), vreinterpret_u32_u8(dst23_u8), 1); -} - -static WEBP_INLINE void Add4x4_NEON(const int16x8_t row01, - const int16x8_t row23, - uint8_t* const dst) { - uint32x2_t dst01 = vdup_n_u32(0); - uint32x2_t dst23 = vdup_n_u32(0); - - // Load the source pixels. - dst01 = vld1_lane_u32((uint32_t*)(dst + 0 * BPS), dst01, 0); - dst23 = vld1_lane_u32((uint32_t*)(dst + 2 * BPS), dst23, 0); - dst01 = vld1_lane_u32((uint32_t*)(dst + 1 * BPS), dst01, 1); - dst23 = vld1_lane_u32((uint32_t*)(dst + 3 * BPS), dst23, 1); - - { - // Convert to 16b. - const int16x8_t dst01_s16 = ConvertU8ToS16_NEON(vreinterpret_u8_u32(dst01)); - const int16x8_t dst23_s16 = ConvertU8ToS16_NEON(vreinterpret_u8_u32(dst23)); - - // Descale with rounding. - const int16x8_t out01 = vrsraq_n_s16(dst01_s16, row01, 3); - const int16x8_t out23 = vrsraq_n_s16(dst23_s16, row23, 3); - // Add the inverse transform. - SaturateAndStore4x4_NEON(dst, out01, out23); - } -} - -//----------------------------------------------------------------------------- -// Simple In-loop filtering (Paragraph 15.2) - -static uint8x16_t NeedsFilter_NEON(const uint8x16_t p1, const uint8x16_t p0, - const uint8x16_t q0, const uint8x16_t q1, - int thresh) { - const uint8x16_t thresh_v = vdupq_n_u8((uint8_t)thresh); - const uint8x16_t a_p0_q0 = vabdq_u8(p0, q0); // abs(p0-q0) - const uint8x16_t a_p1_q1 = vabdq_u8(p1, q1); // abs(p1-q1) - const uint8x16_t a_p0_q0_2 = vqaddq_u8(a_p0_q0, a_p0_q0); // 2 * abs(p0-q0) - const uint8x16_t a_p1_q1_2 = vshrq_n_u8(a_p1_q1, 1); // abs(p1-q1) / 2 - const uint8x16_t sum = vqaddq_u8(a_p0_q0_2, a_p1_q1_2); - const uint8x16_t mask = vcgeq_u8(thresh_v, sum); - return mask; -} - -static int8x16_t FlipSign_NEON(const uint8x16_t v) { - const uint8x16_t sign_bit = vdupq_n_u8(0x80); - return vreinterpretq_s8_u8(veorq_u8(v, sign_bit)); -} - -static uint8x16_t FlipSignBack_NEON(const int8x16_t v) { - const int8x16_t sign_bit = vdupq_n_s8(0x80); - return vreinterpretq_u8_s8(veorq_s8(v, sign_bit)); -} - -static int8x16_t GetBaseDelta_NEON(const int8x16_t p1, const int8x16_t p0, - const int8x16_t q0, const int8x16_t q1) { - const int8x16_t q0_p0 = vqsubq_s8(q0, p0); // (q0-p0) - const int8x16_t p1_q1 = vqsubq_s8(p1, q1); // (p1-q1) - const int8x16_t s1 = vqaddq_s8(p1_q1, q0_p0); // (p1-q1) + 1 * (q0 - p0) - const int8x16_t s2 = vqaddq_s8(q0_p0, s1); // (p1-q1) + 2 * (q0 - p0) - const int8x16_t s3 = vqaddq_s8(q0_p0, s2); // (p1-q1) + 3 * (q0 - p0) - return s3; -} - -static int8x16_t GetBaseDelta0_NEON(const int8x16_t p0, const int8x16_t q0) { - const int8x16_t q0_p0 = vqsubq_s8(q0, p0); // (q0-p0) - const int8x16_t s1 = vqaddq_s8(q0_p0, q0_p0); // 2 * (q0 - p0) - const int8x16_t s2 = vqaddq_s8(q0_p0, s1); // 3 * (q0 - p0) - return s2; -} - -//------------------------------------------------------------------------------ - -static void ApplyFilter2NoFlip_NEON(const int8x16_t p0s, const int8x16_t q0s, - const int8x16_t delta, - int8x16_t* const op0, - int8x16_t* const oq0) { - const int8x16_t kCst3 = vdupq_n_s8(0x03); - const int8x16_t kCst4 = vdupq_n_s8(0x04); - const int8x16_t delta_p3 = vqaddq_s8(delta, kCst3); - const int8x16_t delta_p4 = vqaddq_s8(delta, kCst4); - const int8x16_t delta3 = vshrq_n_s8(delta_p3, 3); - const int8x16_t delta4 = vshrq_n_s8(delta_p4, 3); - *op0 = vqaddq_s8(p0s, delta3); - *oq0 = vqsubq_s8(q0s, delta4); -} - -#if defined(WEBP_USE_INTRINSICS) - -static void ApplyFilter2_NEON(const int8x16_t p0s, const int8x16_t q0s, - const int8x16_t delta, - uint8x16_t* const op0, uint8x16_t* const oq0) { - const int8x16_t kCst3 = vdupq_n_s8(0x03); - const int8x16_t kCst4 = vdupq_n_s8(0x04); - const int8x16_t delta_p3 = vqaddq_s8(delta, kCst3); - const int8x16_t delta_p4 = vqaddq_s8(delta, kCst4); - const int8x16_t delta3 = vshrq_n_s8(delta_p3, 3); - const int8x16_t delta4 = vshrq_n_s8(delta_p4, 3); - const int8x16_t sp0 = vqaddq_s8(p0s, delta3); - const int8x16_t sq0 = vqsubq_s8(q0s, delta4); - *op0 = FlipSignBack_NEON(sp0); - *oq0 = FlipSignBack_NEON(sq0); -} - -static void DoFilter2_NEON(const uint8x16_t p1, const uint8x16_t p0, - const uint8x16_t q0, const uint8x16_t q1, - const uint8x16_t mask, - uint8x16_t* const op0, uint8x16_t* const oq0) { - const int8x16_t p1s = FlipSign_NEON(p1); - const int8x16_t p0s = FlipSign_NEON(p0); - const int8x16_t q0s = FlipSign_NEON(q0); - const int8x16_t q1s = FlipSign_NEON(q1); - const int8x16_t delta0 = GetBaseDelta_NEON(p1s, p0s, q0s, q1s); - const int8x16_t delta1 = vandq_s8(delta0, vreinterpretq_s8_u8(mask)); - ApplyFilter2_NEON(p0s, q0s, delta1, op0, oq0); -} - -static void SimpleVFilter16_NEON(uint8_t* p, int stride, int thresh) { - uint8x16_t p1, p0, q0, q1, op0, oq0; - Load16x4_NEON(p, stride, &p1, &p0, &q0, &q1); - { - const uint8x16_t mask = NeedsFilter_NEON(p1, p0, q0, q1, thresh); - DoFilter2_NEON(p1, p0, q0, q1, mask, &op0, &oq0); - } - Store16x2_NEON(op0, oq0, p, stride); -} - -static void SimpleHFilter16_NEON(uint8_t* p, int stride, int thresh) { - uint8x16_t p1, p0, q0, q1, oq0, op0; - Load4x16_NEON(p, stride, &p1, &p0, &q0, &q1); - { - const uint8x16_t mask = NeedsFilter_NEON(p1, p0, q0, q1, thresh); - DoFilter2_NEON(p1, p0, q0, q1, mask, &op0, &oq0); - } - Store2x16_NEON(op0, oq0, p, stride); -} - -#else - -// Load/Store vertical edge -#define LOAD8x4(c1, c2, c3, c4, b1, b2, stride) \ - "vld4.8 {" #c1 "[0]," #c2 "[0]," #c3 "[0]," #c4 "[0]}," #b1 "," #stride "\n" \ - "vld4.8 {" #c1 "[1]," #c2 "[1]," #c3 "[1]," #c4 "[1]}," #b2 "," #stride "\n" \ - "vld4.8 {" #c1 "[2]," #c2 "[2]," #c3 "[2]," #c4 "[2]}," #b1 "," #stride "\n" \ - "vld4.8 {" #c1 "[3]," #c2 "[3]," #c3 "[3]," #c4 "[3]}," #b2 "," #stride "\n" \ - "vld4.8 {" #c1 "[4]," #c2 "[4]," #c3 "[4]," #c4 "[4]}," #b1 "," #stride "\n" \ - "vld4.8 {" #c1 "[5]," #c2 "[5]," #c3 "[5]," #c4 "[5]}," #b2 "," #stride "\n" \ - "vld4.8 {" #c1 "[6]," #c2 "[6]," #c3 "[6]," #c4 "[6]}," #b1 "," #stride "\n" \ - "vld4.8 {" #c1 "[7]," #c2 "[7]," #c3 "[7]," #c4 "[7]}," #b2 "," #stride "\n" - -#define STORE8x2(c1, c2, p, stride) \ - "vst2.8 {" #c1 "[0], " #c2 "[0]}," #p "," #stride " \n" \ - "vst2.8 {" #c1 "[1], " #c2 "[1]}," #p "," #stride " \n" \ - "vst2.8 {" #c1 "[2], " #c2 "[2]}," #p "," #stride " \n" \ - "vst2.8 {" #c1 "[3], " #c2 "[3]}," #p "," #stride " \n" \ - "vst2.8 {" #c1 "[4], " #c2 "[4]}," #p "," #stride " \n" \ - "vst2.8 {" #c1 "[5], " #c2 "[5]}," #p "," #stride " \n" \ - "vst2.8 {" #c1 "[6], " #c2 "[6]}," #p "," #stride " \n" \ - "vst2.8 {" #c1 "[7], " #c2 "[7]}," #p "," #stride " \n" - -#define QRegs "q0", "q1", "q2", "q3", \ - "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15" - -#define FLIP_SIGN_BIT2(a, b, s) \ - "veor " #a "," #a "," #s " \n" \ - "veor " #b "," #b "," #s " \n" \ - -#define FLIP_SIGN_BIT4(a, b, c, d, s) \ - FLIP_SIGN_BIT2(a, b, s) \ - FLIP_SIGN_BIT2(c, d, s) \ - -#define NEEDS_FILTER(p1, p0, q0, q1, thresh, mask) \ - "vabd.u8 q15," #p0 "," #q0 " \n" /* abs(p0 - q0) */ \ - "vabd.u8 q14," #p1 "," #q1 " \n" /* abs(p1 - q1) */ \ - "vqadd.u8 q15, q15, q15 \n" /* abs(p0 - q0) * 2 */ \ - "vshr.u8 q14, q14, #1 \n" /* abs(p1 - q1) / 2 */ \ - "vqadd.u8 q15, q15, q14 \n" /* abs(p0 - q0) * 2 + abs(p1 - q1) / 2 */ \ - "vdup.8 q14, " #thresh " \n" \ - "vcge.u8 " #mask ", q14, q15 \n" /* mask <= thresh */ - -#define GET_BASE_DELTA(p1, p0, q0, q1, o) \ - "vqsub.s8 q15," #q0 "," #p0 " \n" /* (q0 - p0) */ \ - "vqsub.s8 " #o "," #p1 "," #q1 " \n" /* (p1 - q1) */ \ - "vqadd.s8 " #o "," #o ", q15 \n" /* (p1 - q1) + 1 * (p0 - q0) */ \ - "vqadd.s8 " #o "," #o ", q15 \n" /* (p1 - q1) + 2 * (p0 - q0) */ \ - "vqadd.s8 " #o "," #o ", q15 \n" /* (p1 - q1) + 3 * (p0 - q0) */ - -#define DO_SIMPLE_FILTER(p0, q0, fl) \ - "vmov.i8 q15, #0x03 \n" \ - "vqadd.s8 q15, q15, " #fl " \n" /* filter1 = filter + 3 */ \ - "vshr.s8 q15, q15, #3 \n" /* filter1 >> 3 */ \ - "vqadd.s8 " #p0 "," #p0 ", q15 \n" /* p0 += filter1 */ \ - \ - "vmov.i8 q15, #0x04 \n" \ - "vqadd.s8 q15, q15, " #fl " \n" /* filter1 = filter + 4 */ \ - "vshr.s8 q15, q15, #3 \n" /* filter2 >> 3 */ \ - "vqsub.s8 " #q0 "," #q0 ", q15 \n" /* q0 -= filter2 */ - -// Applies filter on 2 pixels (p0 and q0) -#define DO_FILTER2(p1, p0, q0, q1, thresh) \ - NEEDS_FILTER(p1, p0, q0, q1, thresh, q9) /* filter mask in q9 */ \ - "vmov.i8 q10, #0x80 \n" /* sign bit */ \ - FLIP_SIGN_BIT4(p1, p0, q0, q1, q10) /* convert to signed value */ \ - GET_BASE_DELTA(p1, p0, q0, q1, q11) /* get filter level */ \ - "vand q9, q9, q11 \n" /* apply filter mask */ \ - DO_SIMPLE_FILTER(p0, q0, q9) /* apply filter */ \ - FLIP_SIGN_BIT2(p0, q0, q10) - -static void SimpleVFilter16_NEON(uint8_t* p, int stride, int thresh) { - __asm__ volatile ( - "sub %[p], %[p], %[stride], lsl #1 \n" // p -= 2 * stride - - "vld1.u8 {q1}, [%[p]], %[stride] \n" // p1 - "vld1.u8 {q2}, [%[p]], %[stride] \n" // p0 - "vld1.u8 {q3}, [%[p]], %[stride] \n" // q0 - "vld1.u8 {q12}, [%[p]] \n" // q1 - - DO_FILTER2(q1, q2, q3, q12, %[thresh]) - - "sub %[p], %[p], %[stride], lsl #1 \n" // p -= 2 * stride - - "vst1.u8 {q2}, [%[p]], %[stride] \n" // store op0 - "vst1.u8 {q3}, [%[p]] \n" // store oq0 - : [p] "+r"(p) - : [stride] "r"(stride), [thresh] "r"(thresh) - : "memory", QRegs - ); -} - -static void SimpleHFilter16_NEON(uint8_t* p, int stride, int thresh) { - __asm__ volatile ( - "sub r4, %[p], #2 \n" // base1 = p - 2 - "lsl r6, %[stride], #1 \n" // r6 = 2 * stride - "add r5, r4, %[stride] \n" // base2 = base1 + stride - - LOAD8x4(d2, d3, d4, d5, [r4], [r5], r6) - LOAD8x4(d24, d25, d26, d27, [r4], [r5], r6) - "vswp d3, d24 \n" // p1:q1 p0:q3 - "vswp d5, d26 \n" // q0:q2 q1:q4 - "vswp q2, q12 \n" // p1:q1 p0:q2 q0:q3 q1:q4 - - DO_FILTER2(q1, q2, q12, q13, %[thresh]) - - "sub %[p], %[p], #1 \n" // p - 1 - - "vswp d5, d24 \n" - STORE8x2(d4, d5, [%[p]], %[stride]) - STORE8x2(d24, d25, [%[p]], %[stride]) - - : [p] "+r"(p) - : [stride] "r"(stride), [thresh] "r"(thresh) - : "memory", "r4", "r5", "r6", QRegs - ); -} - -#undef LOAD8x4 -#undef STORE8x2 - -#endif // WEBP_USE_INTRINSICS - -static void SimpleVFilter16i_NEON(uint8_t* p, int stride, int thresh) { - uint32_t k; - for (k = 3; k != 0; --k) { - p += 4 * stride; - SimpleVFilter16_NEON(p, stride, thresh); - } -} - -static void SimpleHFilter16i_NEON(uint8_t* p, int stride, int thresh) { - uint32_t k; - for (k = 3; k != 0; --k) { - p += 4; - SimpleHFilter16_NEON(p, stride, thresh); - } -} - -//------------------------------------------------------------------------------ -// Complex In-loop filtering (Paragraph 15.3) - -static uint8x16_t NeedsHev_NEON(const uint8x16_t p1, const uint8x16_t p0, - const uint8x16_t q0, const uint8x16_t q1, - int hev_thresh) { - const uint8x16_t hev_thresh_v = vdupq_n_u8((uint8_t)hev_thresh); - const uint8x16_t a_p1_p0 = vabdq_u8(p1, p0); // abs(p1 - p0) - const uint8x16_t a_q1_q0 = vabdq_u8(q1, q0); // abs(q1 - q0) - const uint8x16_t a_max = vmaxq_u8(a_p1_p0, a_q1_q0); - const uint8x16_t mask = vcgtq_u8(a_max, hev_thresh_v); - return mask; -} - -static uint8x16_t NeedsFilter2_NEON(const uint8x16_t p3, const uint8x16_t p2, - const uint8x16_t p1, const uint8x16_t p0, - const uint8x16_t q0, const uint8x16_t q1, - const uint8x16_t q2, const uint8x16_t q3, - int ithresh, int thresh) { - const uint8x16_t ithresh_v = vdupq_n_u8((uint8_t)ithresh); - const uint8x16_t a_p3_p2 = vabdq_u8(p3, p2); // abs(p3 - p2) - const uint8x16_t a_p2_p1 = vabdq_u8(p2, p1); // abs(p2 - p1) - const uint8x16_t a_p1_p0 = vabdq_u8(p1, p0); // abs(p1 - p0) - const uint8x16_t a_q3_q2 = vabdq_u8(q3, q2); // abs(q3 - q2) - const uint8x16_t a_q2_q1 = vabdq_u8(q2, q1); // abs(q2 - q1) - const uint8x16_t a_q1_q0 = vabdq_u8(q1, q0); // abs(q1 - q0) - const uint8x16_t max1 = vmaxq_u8(a_p3_p2, a_p2_p1); - const uint8x16_t max2 = vmaxq_u8(a_p1_p0, a_q3_q2); - const uint8x16_t max3 = vmaxq_u8(a_q2_q1, a_q1_q0); - const uint8x16_t max12 = vmaxq_u8(max1, max2); - const uint8x16_t max123 = vmaxq_u8(max12, max3); - const uint8x16_t mask2 = vcgeq_u8(ithresh_v, max123); - const uint8x16_t mask1 = NeedsFilter_NEON(p1, p0, q0, q1, thresh); - const uint8x16_t mask = vandq_u8(mask1, mask2); - return mask; -} - -// 4-points filter - -static void ApplyFilter4_NEON( - const int8x16_t p1, const int8x16_t p0, - const int8x16_t q0, const int8x16_t q1, - const int8x16_t delta0, - uint8x16_t* const op1, uint8x16_t* const op0, - uint8x16_t* const oq0, uint8x16_t* const oq1) { - const int8x16_t kCst3 = vdupq_n_s8(0x03); - const int8x16_t kCst4 = vdupq_n_s8(0x04); - const int8x16_t delta1 = vqaddq_s8(delta0, kCst4); - const int8x16_t delta2 = vqaddq_s8(delta0, kCst3); - const int8x16_t a1 = vshrq_n_s8(delta1, 3); - const int8x16_t a2 = vshrq_n_s8(delta2, 3); - const int8x16_t a3 = vrshrq_n_s8(a1, 1); // a3 = (a1 + 1) >> 1 - *op0 = FlipSignBack_NEON(vqaddq_s8(p0, a2)); // clip(p0 + a2) - *oq0 = FlipSignBack_NEON(vqsubq_s8(q0, a1)); // clip(q0 - a1) - *op1 = FlipSignBack_NEON(vqaddq_s8(p1, a3)); // clip(p1 + a3) - *oq1 = FlipSignBack_NEON(vqsubq_s8(q1, a3)); // clip(q1 - a3) -} - -static void DoFilter4_NEON( - const uint8x16_t p1, const uint8x16_t p0, - const uint8x16_t q0, const uint8x16_t q1, - const uint8x16_t mask, const uint8x16_t hev_mask, - uint8x16_t* const op1, uint8x16_t* const op0, - uint8x16_t* const oq0, uint8x16_t* const oq1) { - // This is a fused version of DoFilter2() calling ApplyFilter2 directly - const int8x16_t p1s = FlipSign_NEON(p1); - int8x16_t p0s = FlipSign_NEON(p0); - int8x16_t q0s = FlipSign_NEON(q0); - const int8x16_t q1s = FlipSign_NEON(q1); - const uint8x16_t simple_lf_mask = vandq_u8(mask, hev_mask); - - // do_filter2 part (simple loopfilter on pixels with hev) - { - const int8x16_t delta = GetBaseDelta_NEON(p1s, p0s, q0s, q1s); - const int8x16_t simple_lf_delta = - vandq_s8(delta, vreinterpretq_s8_u8(simple_lf_mask)); - ApplyFilter2NoFlip_NEON(p0s, q0s, simple_lf_delta, &p0s, &q0s); - } - - // do_filter4 part (complex loopfilter on pixels without hev) - { - const int8x16_t delta0 = GetBaseDelta0_NEON(p0s, q0s); - // we use: (mask & hev_mask) ^ mask = mask & !hev_mask - const uint8x16_t complex_lf_mask = veorq_u8(simple_lf_mask, mask); - const int8x16_t complex_lf_delta = - vandq_s8(delta0, vreinterpretq_s8_u8(complex_lf_mask)); - ApplyFilter4_NEON(p1s, p0s, q0s, q1s, complex_lf_delta, op1, op0, oq0, oq1); - } -} - -// 6-points filter - -static void ApplyFilter6_NEON( - const int8x16_t p2, const int8x16_t p1, const int8x16_t p0, - const int8x16_t q0, const int8x16_t q1, const int8x16_t q2, - const int8x16_t delta, - uint8x16_t* const op2, uint8x16_t* const op1, uint8x16_t* const op0, - uint8x16_t* const oq0, uint8x16_t* const oq1, uint8x16_t* const oq2) { - // We have to compute: X = (9*a+63) >> 7, Y = (18*a+63)>>7, Z = (27*a+63) >> 7 - // Turns out, there's a common sub-expression S=9 * a - 1 that can be used - // with the special vqrshrn_n_s16 rounding-shift-and-narrow instruction: - // X = (S + 64) >> 7, Y = (S + 32) >> 6, Z = (18 * a + S + 64) >> 7 - const int8x8_t delta_lo = vget_low_s8(delta); - const int8x8_t delta_hi = vget_high_s8(delta); - const int8x8_t kCst9 = vdup_n_s8(9); - const int16x8_t kCstm1 = vdupq_n_s16(-1); - const int8x8_t kCst18 = vdup_n_s8(18); - const int16x8_t S_lo = vmlal_s8(kCstm1, kCst9, delta_lo); // S = 9 * a - 1 - const int16x8_t S_hi = vmlal_s8(kCstm1, kCst9, delta_hi); - const int16x8_t Z_lo = vmlal_s8(S_lo, kCst18, delta_lo); // S + 18 * a - const int16x8_t Z_hi = vmlal_s8(S_hi, kCst18, delta_hi); - const int8x8_t a3_lo = vqrshrn_n_s16(S_lo, 7); // (9 * a + 63) >> 7 - const int8x8_t a3_hi = vqrshrn_n_s16(S_hi, 7); - const int8x8_t a2_lo = vqrshrn_n_s16(S_lo, 6); // (9 * a + 31) >> 6 - const int8x8_t a2_hi = vqrshrn_n_s16(S_hi, 6); - const int8x8_t a1_lo = vqrshrn_n_s16(Z_lo, 7); // (27 * a + 63) >> 7 - const int8x8_t a1_hi = vqrshrn_n_s16(Z_hi, 7); - const int8x16_t a1 = vcombine_s8(a1_lo, a1_hi); - const int8x16_t a2 = vcombine_s8(a2_lo, a2_hi); - const int8x16_t a3 = vcombine_s8(a3_lo, a3_hi); - - *op0 = FlipSignBack_NEON(vqaddq_s8(p0, a1)); // clip(p0 + a1) - *oq0 = FlipSignBack_NEON(vqsubq_s8(q0, a1)); // clip(q0 - q1) - *oq1 = FlipSignBack_NEON(vqsubq_s8(q1, a2)); // clip(q1 - a2) - *op1 = FlipSignBack_NEON(vqaddq_s8(p1, a2)); // clip(p1 + a2) - *oq2 = FlipSignBack_NEON(vqsubq_s8(q2, a3)); // clip(q2 - a3) - *op2 = FlipSignBack_NEON(vqaddq_s8(p2, a3)); // clip(p2 + a3) -} - -static void DoFilter6_NEON( - const uint8x16_t p2, const uint8x16_t p1, const uint8x16_t p0, - const uint8x16_t q0, const uint8x16_t q1, const uint8x16_t q2, - const uint8x16_t mask, const uint8x16_t hev_mask, - uint8x16_t* const op2, uint8x16_t* const op1, uint8x16_t* const op0, - uint8x16_t* const oq0, uint8x16_t* const oq1, uint8x16_t* const oq2) { - // This is a fused version of DoFilter2() calling ApplyFilter2 directly - const int8x16_t p2s = FlipSign_NEON(p2); - const int8x16_t p1s = FlipSign_NEON(p1); - int8x16_t p0s = FlipSign_NEON(p0); - int8x16_t q0s = FlipSign_NEON(q0); - const int8x16_t q1s = FlipSign_NEON(q1); - const int8x16_t q2s = FlipSign_NEON(q2); - const uint8x16_t simple_lf_mask = vandq_u8(mask, hev_mask); - const int8x16_t delta0 = GetBaseDelta_NEON(p1s, p0s, q0s, q1s); - - // do_filter2 part (simple loopfilter on pixels with hev) - { - const int8x16_t simple_lf_delta = - vandq_s8(delta0, vreinterpretq_s8_u8(simple_lf_mask)); - ApplyFilter2NoFlip_NEON(p0s, q0s, simple_lf_delta, &p0s, &q0s); - } - - // do_filter6 part (complex loopfilter on pixels without hev) - { - // we use: (mask & hev_mask) ^ mask = mask & !hev_mask - const uint8x16_t complex_lf_mask = veorq_u8(simple_lf_mask, mask); - const int8x16_t complex_lf_delta = - vandq_s8(delta0, vreinterpretq_s8_u8(complex_lf_mask)); - ApplyFilter6_NEON(p2s, p1s, p0s, q0s, q1s, q2s, complex_lf_delta, - op2, op1, op0, oq0, oq1, oq2); - } -} - -// on macroblock edges - -static void VFilter16_NEON(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - uint8x16_t p3, p2, p1, p0, q0, q1, q2, q3; - Load16x8_NEON(p, stride, &p3, &p2, &p1, &p0, &q0, &q1, &q2, &q3); - { - const uint8x16_t mask = NeedsFilter2_NEON(p3, p2, p1, p0, q0, q1, q2, q3, - ithresh, thresh); - const uint8x16_t hev_mask = NeedsHev_NEON(p1, p0, q0, q1, hev_thresh); - uint8x16_t op2, op1, op0, oq0, oq1, oq2; - DoFilter6_NEON(p2, p1, p0, q0, q1, q2, mask, hev_mask, - &op2, &op1, &op0, &oq0, &oq1, &oq2); - Store16x2_NEON(op2, op1, p - 2 * stride, stride); - Store16x2_NEON(op0, oq0, p + 0 * stride, stride); - Store16x2_NEON(oq1, oq2, p + 2 * stride, stride); - } -} - -static void HFilter16_NEON(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - uint8x16_t p3, p2, p1, p0, q0, q1, q2, q3; - Load8x16_NEON(p, stride, &p3, &p2, &p1, &p0, &q0, &q1, &q2, &q3); - { - const uint8x16_t mask = NeedsFilter2_NEON(p3, p2, p1, p0, q0, q1, q2, q3, - ithresh, thresh); - const uint8x16_t hev_mask = NeedsHev_NEON(p1, p0, q0, q1, hev_thresh); - uint8x16_t op2, op1, op0, oq0, oq1, oq2; - DoFilter6_NEON(p2, p1, p0, q0, q1, q2, mask, hev_mask, - &op2, &op1, &op0, &oq0, &oq1, &oq2); - Store2x16_NEON(op2, op1, p - 2, stride); - Store2x16_NEON(op0, oq0, p + 0, stride); - Store2x16_NEON(oq1, oq2, p + 2, stride); - } -} - -// on three inner edges -static void VFilter16i_NEON(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - uint32_t k; - uint8x16_t p3, p2, p1, p0; - Load16x4_NEON(p + 2 * stride, stride, &p3, &p2, &p1, &p0); - for (k = 3; k != 0; --k) { - uint8x16_t q0, q1, q2, q3; - p += 4 * stride; - Load16x4_NEON(p + 2 * stride, stride, &q0, &q1, &q2, &q3); - { - const uint8x16_t mask = - NeedsFilter2_NEON(p3, p2, p1, p0, q0, q1, q2, q3, ithresh, thresh); - const uint8x16_t hev_mask = NeedsHev_NEON(p1, p0, q0, q1, hev_thresh); - // p3 and p2 are not just temporary variables here: they will be - // re-used for next span. And q2/q3 will become p1/p0 accordingly. - DoFilter4_NEON(p1, p0, q0, q1, mask, hev_mask, &p1, &p0, &p3, &p2); - Store16x4_NEON(p1, p0, p3, p2, p, stride); - p1 = q2; - p0 = q3; - } - } -} - -#if !defined(WORK_AROUND_GCC) -static void HFilter16i_NEON(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - uint32_t k; - uint8x16_t p3, p2, p1, p0; - Load4x16_NEON(p + 2, stride, &p3, &p2, &p1, &p0); - for (k = 3; k != 0; --k) { - uint8x16_t q0, q1, q2, q3; - p += 4; - Load4x16_NEON(p + 2, stride, &q0, &q1, &q2, &q3); - { - const uint8x16_t mask = - NeedsFilter2_NEON(p3, p2, p1, p0, q0, q1, q2, q3, ithresh, thresh); - const uint8x16_t hev_mask = NeedsHev_NEON(p1, p0, q0, q1, hev_thresh); - DoFilter4_NEON(p1, p0, q0, q1, mask, hev_mask, &p1, &p0, &p3, &p2); - Store4x16_NEON(p1, p0, p3, p2, p, stride); - p1 = q2; - p0 = q3; - } - } -} -#endif // !WORK_AROUND_GCC - -// 8-pixels wide variant, for chroma filtering -static void VFilter8_NEON(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - uint8x16_t p3, p2, p1, p0, q0, q1, q2, q3; - Load8x8x2_NEON(u, v, stride, &p3, &p2, &p1, &p0, &q0, &q1, &q2, &q3); - { - const uint8x16_t mask = NeedsFilter2_NEON(p3, p2, p1, p0, q0, q1, q2, q3, - ithresh, thresh); - const uint8x16_t hev_mask = NeedsHev_NEON(p1, p0, q0, q1, hev_thresh); - uint8x16_t op2, op1, op0, oq0, oq1, oq2; - DoFilter6_NEON(p2, p1, p0, q0, q1, q2, mask, hev_mask, - &op2, &op1, &op0, &oq0, &oq1, &oq2); - Store8x2x2_NEON(op2, op1, u - 2 * stride, v - 2 * stride, stride); - Store8x2x2_NEON(op0, oq0, u + 0 * stride, v + 0 * stride, stride); - Store8x2x2_NEON(oq1, oq2, u + 2 * stride, v + 2 * stride, stride); - } -} -static void VFilter8i_NEON(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - uint8x16_t p3, p2, p1, p0, q0, q1, q2, q3; - u += 4 * stride; - v += 4 * stride; - Load8x8x2_NEON(u, v, stride, &p3, &p2, &p1, &p0, &q0, &q1, &q2, &q3); - { - const uint8x16_t mask = NeedsFilter2_NEON(p3, p2, p1, p0, q0, q1, q2, q3, - ithresh, thresh); - const uint8x16_t hev_mask = NeedsHev_NEON(p1, p0, q0, q1, hev_thresh); - uint8x16_t op1, op0, oq0, oq1; - DoFilter4_NEON(p1, p0, q0, q1, mask, hev_mask, &op1, &op0, &oq0, &oq1); - Store8x4x2_NEON(op1, op0, oq0, oq1, u, v, stride); - } -} - -#if !defined(WORK_AROUND_GCC) -static void HFilter8_NEON(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - uint8x16_t p3, p2, p1, p0, q0, q1, q2, q3; - Load8x8x2T_NEON(u, v, stride, &p3, &p2, &p1, &p0, &q0, &q1, &q2, &q3); - { - const uint8x16_t mask = NeedsFilter2_NEON(p3, p2, p1, p0, q0, q1, q2, q3, - ithresh, thresh); - const uint8x16_t hev_mask = NeedsHev_NEON(p1, p0, q0, q1, hev_thresh); - uint8x16_t op2, op1, op0, oq0, oq1, oq2; - DoFilter6_NEON(p2, p1, p0, q0, q1, q2, mask, hev_mask, - &op2, &op1, &op0, &oq0, &oq1, &oq2); - Store6x8x2_NEON(op2, op1, op0, oq0, oq1, oq2, u, v, stride); - } -} - -static void HFilter8i_NEON(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - uint8x16_t p3, p2, p1, p0, q0, q1, q2, q3; - u += 4; - v += 4; - Load8x8x2T_NEON(u, v, stride, &p3, &p2, &p1, &p0, &q0, &q1, &q2, &q3); - { - const uint8x16_t mask = NeedsFilter2_NEON(p3, p2, p1, p0, q0, q1, q2, q3, - ithresh, thresh); - const uint8x16_t hev_mask = NeedsHev_NEON(p1, p0, q0, q1, hev_thresh); - uint8x16_t op1, op0, oq0, oq1; - DoFilter4_NEON(p1, p0, q0, q1, mask, hev_mask, &op1, &op0, &oq0, &oq1); - Store4x8x2_NEON(op1, op0, oq0, oq1, u, v, stride); - } -} -#endif // !WORK_AROUND_GCC - -//----------------------------------------------------------------------------- -// Inverse transforms (Paragraph 14.4) - -// Technically these are unsigned but vqdmulh is only available in signed. -// vqdmulh returns high half (effectively >> 16) but also doubles the value, -// changing the >> 16 to >> 15 and requiring an additional >> 1. -// We use this to our advantage with kC2. The canonical value is 35468. -// However, the high bit is set so treating it as signed will give incorrect -// results. We avoid this by down shifting by 1 here to clear the highest bit. -// Combined with the doubling effect of vqdmulh we get >> 16. -// This can not be applied to kC1 because the lowest bit is set. Down shifting -// the constant would reduce precision. - -// libwebp uses a trick to avoid some extra addition that libvpx does. -// Instead of: -// temp2 = ip[12] + ((ip[12] * cospi8sqrt2minus1) >> 16); -// libwebp adds 1 << 16 to cospi8sqrt2minus1 (kC1). However, this causes the -// same issue with kC1 and vqdmulh that we work around by down shifting kC2 - -static const int16_t kC1 = 20091; -static const int16_t kC2 = 17734; // half of kC2, actually. See comment above. - -#if defined(WEBP_USE_INTRINSICS) -static WEBP_INLINE void Transpose8x2_NEON(const int16x8_t in0, - const int16x8_t in1, - int16x8x2_t* const out) { - // a0 a1 a2 a3 | b0 b1 b2 b3 => a0 b0 c0 d0 | a1 b1 c1 d1 - // c0 c1 c2 c3 | d0 d1 d2 d3 a2 b2 c2 d2 | a3 b3 c3 d3 - const int16x8x2_t tmp0 = vzipq_s16(in0, in1); // a0 c0 a1 c1 a2 c2 ... - // b0 d0 b1 d1 b2 d2 ... - *out = vzipq_s16(tmp0.val[0], tmp0.val[1]); -} - -static WEBP_INLINE void TransformPass_NEON(int16x8x2_t* const rows) { - // {rows} = in0 | in4 - // in8 | in12 - // B1 = in4 | in12 - const int16x8_t B1 = - vcombine_s16(vget_high_s16(rows->val[0]), vget_high_s16(rows->val[1])); - // C0 = kC1 * in4 | kC1 * in12 - // C1 = kC2 * in4 | kC2 * in12 - const int16x8_t C0 = vsraq_n_s16(B1, vqdmulhq_n_s16(B1, kC1), 1); - const int16x8_t C1 = vqdmulhq_n_s16(B1, kC2); - const int16x4_t a = vqadd_s16(vget_low_s16(rows->val[0]), - vget_low_s16(rows->val[1])); // in0 + in8 - const int16x4_t b = vqsub_s16(vget_low_s16(rows->val[0]), - vget_low_s16(rows->val[1])); // in0 - in8 - // c = kC2 * in4 - kC1 * in12 - // d = kC1 * in4 + kC2 * in12 - const int16x4_t c = vqsub_s16(vget_low_s16(C1), vget_high_s16(C0)); - const int16x4_t d = vqadd_s16(vget_low_s16(C0), vget_high_s16(C1)); - const int16x8_t D0 = vcombine_s16(a, b); // D0 = a | b - const int16x8_t D1 = vcombine_s16(d, c); // D1 = d | c - const int16x8_t E0 = vqaddq_s16(D0, D1); // a+d | b+c - const int16x8_t E_tmp = vqsubq_s16(D0, D1); // a-d | b-c - const int16x8_t E1 = vcombine_s16(vget_high_s16(E_tmp), vget_low_s16(E_tmp)); - Transpose8x2_NEON(E0, E1, rows); -} - -static void TransformOne_NEON(const int16_t* in, uint8_t* dst) { - int16x8x2_t rows; - INIT_VECTOR2(rows, vld1q_s16(in + 0), vld1q_s16(in + 8)); - TransformPass_NEON(&rows); - TransformPass_NEON(&rows); - Add4x4_NEON(rows.val[0], rows.val[1], dst); -} - -#else - -static void TransformOne_NEON(const int16_t* in, uint8_t* dst) { - const int kBPS = BPS; - // kC1, kC2. Padded because vld1.16 loads 8 bytes - const int16_t constants[4] = { kC1, kC2, 0, 0 }; - /* Adapted from libvpx: vp8/common/arm/neon/shortidct4x4llm_neon.asm */ - __asm__ volatile ( - "vld1.16 {q1, q2}, [%[in]] \n" - "vld1.16 {d0}, [%[constants]] \n" - - /* d2: in[0] - * d3: in[8] - * d4: in[4] - * d5: in[12] - */ - "vswp d3, d4 \n" - - /* q8 = {in[4], in[12]} * kC1 * 2 >> 16 - * q9 = {in[4], in[12]} * kC2 >> 16 - */ - "vqdmulh.s16 q8, q2, d0[0] \n" - "vqdmulh.s16 q9, q2, d0[1] \n" - - /* d22 = a = in[0] + in[8] - * d23 = b = in[0] - in[8] - */ - "vqadd.s16 d22, d2, d3 \n" - "vqsub.s16 d23, d2, d3 \n" - - /* The multiplication should be x * kC1 >> 16 - * However, with vqdmulh we get x * kC1 * 2 >> 16 - * (multiply, double, return high half) - * We avoided this in kC2 by pre-shifting the constant. - * q8 = in[4]/[12] * kC1 >> 16 - */ - "vshr.s16 q8, q8, #1 \n" - - /* Add {in[4], in[12]} back after the multiplication. This is handled by - * adding 1 << 16 to kC1 in the libwebp C code. - */ - "vqadd.s16 q8, q2, q8 \n" - - /* d20 = c = in[4]*kC2 - in[12]*kC1 - * d21 = d = in[4]*kC1 + in[12]*kC2 - */ - "vqsub.s16 d20, d18, d17 \n" - "vqadd.s16 d21, d19, d16 \n" - - /* d2 = tmp[0] = a + d - * d3 = tmp[1] = b + c - * d4 = tmp[2] = b - c - * d5 = tmp[3] = a - d - */ - "vqadd.s16 d2, d22, d21 \n" - "vqadd.s16 d3, d23, d20 \n" - "vqsub.s16 d4, d23, d20 \n" - "vqsub.s16 d5, d22, d21 \n" - - "vzip.16 q1, q2 \n" - "vzip.16 q1, q2 \n" - - "vswp d3, d4 \n" - - /* q8 = {tmp[4], tmp[12]} * kC1 * 2 >> 16 - * q9 = {tmp[4], tmp[12]} * kC2 >> 16 - */ - "vqdmulh.s16 q8, q2, d0[0] \n" - "vqdmulh.s16 q9, q2, d0[1] \n" - - /* d22 = a = tmp[0] + tmp[8] - * d23 = b = tmp[0] - tmp[8] - */ - "vqadd.s16 d22, d2, d3 \n" - "vqsub.s16 d23, d2, d3 \n" - - /* See long winded explanations prior */ - "vshr.s16 q8, q8, #1 \n" - "vqadd.s16 q8, q2, q8 \n" - - /* d20 = c = in[4]*kC2 - in[12]*kC1 - * d21 = d = in[4]*kC1 + in[12]*kC2 - */ - "vqsub.s16 d20, d18, d17 \n" - "vqadd.s16 d21, d19, d16 \n" - - /* d2 = tmp[0] = a + d - * d3 = tmp[1] = b + c - * d4 = tmp[2] = b - c - * d5 = tmp[3] = a - d - */ - "vqadd.s16 d2, d22, d21 \n" - "vqadd.s16 d3, d23, d20 \n" - "vqsub.s16 d4, d23, d20 \n" - "vqsub.s16 d5, d22, d21 \n" - - "vld1.32 d6[0], [%[dst]], %[kBPS] \n" - "vld1.32 d6[1], [%[dst]], %[kBPS] \n" - "vld1.32 d7[0], [%[dst]], %[kBPS] \n" - "vld1.32 d7[1], [%[dst]], %[kBPS] \n" - - "sub %[dst], %[dst], %[kBPS], lsl #2 \n" - - /* (val) + 4 >> 3 */ - "vrshr.s16 d2, d2, #3 \n" - "vrshr.s16 d3, d3, #3 \n" - "vrshr.s16 d4, d4, #3 \n" - "vrshr.s16 d5, d5, #3 \n" - - "vzip.16 q1, q2 \n" - "vzip.16 q1, q2 \n" - - /* Must accumulate before saturating */ - "vmovl.u8 q8, d6 \n" - "vmovl.u8 q9, d7 \n" - - "vqadd.s16 q1, q1, q8 \n" - "vqadd.s16 q2, q2, q9 \n" - - "vqmovun.s16 d0, q1 \n" - "vqmovun.s16 d1, q2 \n" - - "vst1.32 d0[0], [%[dst]], %[kBPS] \n" - "vst1.32 d0[1], [%[dst]], %[kBPS] \n" - "vst1.32 d1[0], [%[dst]], %[kBPS] \n" - "vst1.32 d1[1], [%[dst]] \n" - - : [in] "+r"(in), [dst] "+r"(dst) /* modified registers */ - : [kBPS] "r"(kBPS), [constants] "r"(constants) /* constants */ - : "memory", "q0", "q1", "q2", "q8", "q9", "q10", "q11" /* clobbered */ - ); -} - -#endif // WEBP_USE_INTRINSICS - -static void TransformTwo_NEON(const int16_t* in, uint8_t* dst, int do_two) { - TransformOne_NEON(in, dst); - if (do_two) { - TransformOne_NEON(in + 16, dst + 4); - } -} - -static void TransformDC_NEON(const int16_t* in, uint8_t* dst) { - const int16x8_t DC = vdupq_n_s16(in[0]); - Add4x4_NEON(DC, DC, dst); -} - -//------------------------------------------------------------------------------ - -#define STORE_WHT(dst, col, rows) do { \ - *dst = vgetq_lane_s32(rows.val[0], col); (dst) += 16; \ - *dst = vgetq_lane_s32(rows.val[1], col); (dst) += 16; \ - *dst = vgetq_lane_s32(rows.val[2], col); (dst) += 16; \ - *dst = vgetq_lane_s32(rows.val[3], col); (dst) += 16; \ -} while (0) - -static void TransformWHT_NEON(const int16_t* in, int16_t* out) { - int32x4x4_t tmp; - - { - // Load the source. - const int16x4_t in00_03 = vld1_s16(in + 0); - const int16x4_t in04_07 = vld1_s16(in + 4); - const int16x4_t in08_11 = vld1_s16(in + 8); - const int16x4_t in12_15 = vld1_s16(in + 12); - const int32x4_t a0 = vaddl_s16(in00_03, in12_15); // in[0..3] + in[12..15] - const int32x4_t a1 = vaddl_s16(in04_07, in08_11); // in[4..7] + in[8..11] - const int32x4_t a2 = vsubl_s16(in04_07, in08_11); // in[4..7] - in[8..11] - const int32x4_t a3 = vsubl_s16(in00_03, in12_15); // in[0..3] - in[12..15] - tmp.val[0] = vaddq_s32(a0, a1); - tmp.val[1] = vaddq_s32(a3, a2); - tmp.val[2] = vsubq_s32(a0, a1); - tmp.val[3] = vsubq_s32(a3, a2); - // Arrange the temporary results column-wise. - tmp = Transpose4x4_NEON(tmp); - } - - { - const int32x4_t kCst3 = vdupq_n_s32(3); - const int32x4_t dc = vaddq_s32(tmp.val[0], kCst3); // add rounder - const int32x4_t a0 = vaddq_s32(dc, tmp.val[3]); - const int32x4_t a1 = vaddq_s32(tmp.val[1], tmp.val[2]); - const int32x4_t a2 = vsubq_s32(tmp.val[1], tmp.val[2]); - const int32x4_t a3 = vsubq_s32(dc, tmp.val[3]); - - tmp.val[0] = vaddq_s32(a0, a1); - tmp.val[1] = vaddq_s32(a3, a2); - tmp.val[2] = vsubq_s32(a0, a1); - tmp.val[3] = vsubq_s32(a3, a2); - - // right shift the results by 3. - tmp.val[0] = vshrq_n_s32(tmp.val[0], 3); - tmp.val[1] = vshrq_n_s32(tmp.val[1], 3); - tmp.val[2] = vshrq_n_s32(tmp.val[2], 3); - tmp.val[3] = vshrq_n_s32(tmp.val[3], 3); - - STORE_WHT(out, 0, tmp); - STORE_WHT(out, 1, tmp); - STORE_WHT(out, 2, tmp); - STORE_WHT(out, 3, tmp); - } -} - -#undef STORE_WHT - -//------------------------------------------------------------------------------ - -#define MUL(a, b) (((a) * (b)) >> 16) -static void TransformAC3_NEON(const int16_t* in, uint8_t* dst) { - static const int kC1_full = 20091 + (1 << 16); - static const int kC2_full = 35468; - const int16x4_t A = vld1_dup_s16(in); - const int16x4_t c4 = vdup_n_s16(MUL(in[4], kC2_full)); - const int16x4_t d4 = vdup_n_s16(MUL(in[4], kC1_full)); - const int c1 = MUL(in[1], kC2_full); - const int d1 = MUL(in[1], kC1_full); - const uint64_t cd = (uint64_t)( d1 & 0xffff) << 0 | - (uint64_t)( c1 & 0xffff) << 16 | - (uint64_t)(-c1 & 0xffff) << 32 | - (uint64_t)(-d1 & 0xffff) << 48; - const int16x4_t CD = vcreate_s16(cd); - const int16x4_t B = vqadd_s16(A, CD); - const int16x8_t m0_m1 = vcombine_s16(vqadd_s16(B, d4), vqadd_s16(B, c4)); - const int16x8_t m2_m3 = vcombine_s16(vqsub_s16(B, c4), vqsub_s16(B, d4)); - Add4x4_NEON(m0_m1, m2_m3, dst); -} -#undef MUL - -//------------------------------------------------------------------------------ -// 4x4 - -static void DC4_NEON(uint8_t* dst) { // DC - const uint8x8_t A = vld1_u8(dst - BPS); // top row - const uint16x4_t p0 = vpaddl_u8(A); // cascading summation of the top - const uint16x4_t p1 = vpadd_u16(p0, p0); - const uint16x8_t L0 = vmovl_u8(vld1_u8(dst + 0 * BPS - 1)); - const uint16x8_t L1 = vmovl_u8(vld1_u8(dst + 1 * BPS - 1)); - const uint16x8_t L2 = vmovl_u8(vld1_u8(dst + 2 * BPS - 1)); - const uint16x8_t L3 = vmovl_u8(vld1_u8(dst + 3 * BPS - 1)); - const uint16x8_t s0 = vaddq_u16(L0, L1); - const uint16x8_t s1 = vaddq_u16(L2, L3); - const uint16x8_t s01 = vaddq_u16(s0, s1); - const uint16x8_t sum = vaddq_u16(s01, vcombine_u16(p1, p1)); - const uint8x8_t dc0 = vrshrn_n_u16(sum, 3); // (sum + 4) >> 3 - const uint8x8_t dc = vdup_lane_u8(dc0, 0); - int i; - for (i = 0; i < 4; ++i) { - vst1_lane_u32((uint32_t*)(dst + i * BPS), vreinterpret_u32_u8(dc), 0); - } -} - -// TrueMotion (4x4 + 8x8) -static WEBP_INLINE void TrueMotion_NEON(uint8_t* dst, int size) { - const uint8x8_t TL = vld1_dup_u8(dst - BPS - 1); // top-left pixel 'A[-1]' - const uint8x8_t T = vld1_u8(dst - BPS); // top row 'A[0..3]' - const int16x8_t d = vreinterpretq_s16_u16(vsubl_u8(T, TL)); // A[c] - A[-1] - int y; - for (y = 0; y < size; y += 4) { - // left edge - const int16x8_t L0 = ConvertU8ToS16_NEON(vld1_dup_u8(dst + 0 * BPS - 1)); - const int16x8_t L1 = ConvertU8ToS16_NEON(vld1_dup_u8(dst + 1 * BPS - 1)); - const int16x8_t L2 = ConvertU8ToS16_NEON(vld1_dup_u8(dst + 2 * BPS - 1)); - const int16x8_t L3 = ConvertU8ToS16_NEON(vld1_dup_u8(dst + 3 * BPS - 1)); - const int16x8_t r0 = vaddq_s16(L0, d); // L[r] + A[c] - A[-1] - const int16x8_t r1 = vaddq_s16(L1, d); - const int16x8_t r2 = vaddq_s16(L2, d); - const int16x8_t r3 = vaddq_s16(L3, d); - // Saturate and store the result. - const uint32x2_t r0_u32 = vreinterpret_u32_u8(vqmovun_s16(r0)); - const uint32x2_t r1_u32 = vreinterpret_u32_u8(vqmovun_s16(r1)); - const uint32x2_t r2_u32 = vreinterpret_u32_u8(vqmovun_s16(r2)); - const uint32x2_t r3_u32 = vreinterpret_u32_u8(vqmovun_s16(r3)); - if (size == 4) { - vst1_lane_u32((uint32_t*)(dst + 0 * BPS), r0_u32, 0); - vst1_lane_u32((uint32_t*)(dst + 1 * BPS), r1_u32, 0); - vst1_lane_u32((uint32_t*)(dst + 2 * BPS), r2_u32, 0); - vst1_lane_u32((uint32_t*)(dst + 3 * BPS), r3_u32, 0); - } else { - vst1_u32((uint32_t*)(dst + 0 * BPS), r0_u32); - vst1_u32((uint32_t*)(dst + 1 * BPS), r1_u32); - vst1_u32((uint32_t*)(dst + 2 * BPS), r2_u32); - vst1_u32((uint32_t*)(dst + 3 * BPS), r3_u32); - } - dst += 4 * BPS; - } -} - -static void TM4_NEON(uint8_t* dst) { TrueMotion_NEON(dst, 4); } - -static void VE4_NEON(uint8_t* dst) { // vertical - // NB: avoid vld1_u64 here as an alignment hint may be added -> SIGBUS. - const uint64x1_t A0 = vreinterpret_u64_u8(vld1_u8(dst - BPS - 1)); // top row - const uint64x1_t A1 = vshr_n_u64(A0, 8); - const uint64x1_t A2 = vshr_n_u64(A0, 16); - const uint8x8_t ABCDEFGH = vreinterpret_u8_u64(A0); - const uint8x8_t BCDEFGH0 = vreinterpret_u8_u64(A1); - const uint8x8_t CDEFGH00 = vreinterpret_u8_u64(A2); - const uint8x8_t b = vhadd_u8(ABCDEFGH, CDEFGH00); - const uint8x8_t avg = vrhadd_u8(b, BCDEFGH0); - int i; - for (i = 0; i < 4; ++i) { - vst1_lane_u32((uint32_t*)(dst + i * BPS), vreinterpret_u32_u8(avg), 0); - } -} - -static void RD4_NEON(uint8_t* dst) { // Down-right - const uint8x8_t XABCD_u8 = vld1_u8(dst - BPS - 1); - const uint64x1_t XABCD = vreinterpret_u64_u8(XABCD_u8); - const uint64x1_t ____XABC = vshl_n_u64(XABCD, 32); - const uint32_t I = dst[-1 + 0 * BPS]; - const uint32_t J = dst[-1 + 1 * BPS]; - const uint32_t K = dst[-1 + 2 * BPS]; - const uint32_t L = dst[-1 + 3 * BPS]; - const uint64x1_t LKJI____ = vcreate_u64(L | (K << 8) | (J << 16) | (I << 24)); - const uint64x1_t LKJIXABC = vorr_u64(LKJI____, ____XABC); - const uint8x8_t KJIXABC_ = vreinterpret_u8_u64(vshr_n_u64(LKJIXABC, 8)); - const uint8x8_t JIXABC__ = vreinterpret_u8_u64(vshr_n_u64(LKJIXABC, 16)); - const uint8_t D = vget_lane_u8(XABCD_u8, 4); - const uint8x8_t JIXABCD_ = vset_lane_u8(D, JIXABC__, 6); - const uint8x8_t LKJIXABC_u8 = vreinterpret_u8_u64(LKJIXABC); - const uint8x8_t avg1 = vhadd_u8(JIXABCD_, LKJIXABC_u8); - const uint8x8_t avg2 = vrhadd_u8(avg1, KJIXABC_); - const uint64x1_t avg2_u64 = vreinterpret_u64_u8(avg2); - const uint32x2_t r3 = vreinterpret_u32_u8(avg2); - const uint32x2_t r2 = vreinterpret_u32_u64(vshr_n_u64(avg2_u64, 8)); - const uint32x2_t r1 = vreinterpret_u32_u64(vshr_n_u64(avg2_u64, 16)); - const uint32x2_t r0 = vreinterpret_u32_u64(vshr_n_u64(avg2_u64, 24)); - vst1_lane_u32((uint32_t*)(dst + 0 * BPS), r0, 0); - vst1_lane_u32((uint32_t*)(dst + 1 * BPS), r1, 0); - vst1_lane_u32((uint32_t*)(dst + 2 * BPS), r2, 0); - vst1_lane_u32((uint32_t*)(dst + 3 * BPS), r3, 0); -} - -static void LD4_NEON(uint8_t* dst) { // Down-left - // Note using the same shift trick as VE4() is slower here. - const uint8x8_t ABCDEFGH = vld1_u8(dst - BPS + 0); - const uint8x8_t BCDEFGH0 = vld1_u8(dst - BPS + 1); - const uint8x8_t CDEFGH00 = vld1_u8(dst - BPS + 2); - const uint8x8_t CDEFGHH0 = vset_lane_u8(dst[-BPS + 7], CDEFGH00, 6); - const uint8x8_t avg1 = vhadd_u8(ABCDEFGH, CDEFGHH0); - const uint8x8_t avg2 = vrhadd_u8(avg1, BCDEFGH0); - const uint64x1_t avg2_u64 = vreinterpret_u64_u8(avg2); - const uint32x2_t r0 = vreinterpret_u32_u8(avg2); - const uint32x2_t r1 = vreinterpret_u32_u64(vshr_n_u64(avg2_u64, 8)); - const uint32x2_t r2 = vreinterpret_u32_u64(vshr_n_u64(avg2_u64, 16)); - const uint32x2_t r3 = vreinterpret_u32_u64(vshr_n_u64(avg2_u64, 24)); - vst1_lane_u32((uint32_t*)(dst + 0 * BPS), r0, 0); - vst1_lane_u32((uint32_t*)(dst + 1 * BPS), r1, 0); - vst1_lane_u32((uint32_t*)(dst + 2 * BPS), r2, 0); - vst1_lane_u32((uint32_t*)(dst + 3 * BPS), r3, 0); -} - -//------------------------------------------------------------------------------ -// Chroma - -static void VE8uv_NEON(uint8_t* dst) { // vertical - const uint8x8_t top = vld1_u8(dst - BPS); - int j; - for (j = 0; j < 8; ++j) { - vst1_u8(dst + j * BPS, top); - } -} - -static void HE8uv_NEON(uint8_t* dst) { // horizontal - int j; - for (j = 0; j < 8; ++j) { - const uint8x8_t left = vld1_dup_u8(dst - 1); - vst1_u8(dst, left); - dst += BPS; - } -} - -static WEBP_INLINE void DC8_NEON(uint8_t* dst, int do_top, int do_left) { - uint16x8_t sum_top; - uint16x8_t sum_left; - uint8x8_t dc0; - - if (do_top) { - const uint8x8_t A = vld1_u8(dst - BPS); // top row - const uint16x4_t p0 = vpaddl_u8(A); // cascading summation of the top - const uint16x4_t p1 = vpadd_u16(p0, p0); - const uint16x4_t p2 = vpadd_u16(p1, p1); - sum_top = vcombine_u16(p2, p2); - } - - if (do_left) { - const uint16x8_t L0 = vmovl_u8(vld1_u8(dst + 0 * BPS - 1)); - const uint16x8_t L1 = vmovl_u8(vld1_u8(dst + 1 * BPS - 1)); - const uint16x8_t L2 = vmovl_u8(vld1_u8(dst + 2 * BPS - 1)); - const uint16x8_t L3 = vmovl_u8(vld1_u8(dst + 3 * BPS - 1)); - const uint16x8_t L4 = vmovl_u8(vld1_u8(dst + 4 * BPS - 1)); - const uint16x8_t L5 = vmovl_u8(vld1_u8(dst + 5 * BPS - 1)); - const uint16x8_t L6 = vmovl_u8(vld1_u8(dst + 6 * BPS - 1)); - const uint16x8_t L7 = vmovl_u8(vld1_u8(dst + 7 * BPS - 1)); - const uint16x8_t s0 = vaddq_u16(L0, L1); - const uint16x8_t s1 = vaddq_u16(L2, L3); - const uint16x8_t s2 = vaddq_u16(L4, L5); - const uint16x8_t s3 = vaddq_u16(L6, L7); - const uint16x8_t s01 = vaddq_u16(s0, s1); - const uint16x8_t s23 = vaddq_u16(s2, s3); - sum_left = vaddq_u16(s01, s23); - } - - if (do_top && do_left) { - const uint16x8_t sum = vaddq_u16(sum_left, sum_top); - dc0 = vrshrn_n_u16(sum, 4); - } else if (do_top) { - dc0 = vrshrn_n_u16(sum_top, 3); - } else if (do_left) { - dc0 = vrshrn_n_u16(sum_left, 3); - } else { - dc0 = vdup_n_u8(0x80); - } - - { - const uint8x8_t dc = vdup_lane_u8(dc0, 0); - int i; - for (i = 0; i < 8; ++i) { - vst1_u32((uint32_t*)(dst + i * BPS), vreinterpret_u32_u8(dc)); - } - } -} - -static void DC8uv_NEON(uint8_t* dst) { DC8_NEON(dst, 1, 1); } -static void DC8uvNoTop_NEON(uint8_t* dst) { DC8_NEON(dst, 0, 1); } -static void DC8uvNoLeft_NEON(uint8_t* dst) { DC8_NEON(dst, 1, 0); } -static void DC8uvNoTopLeft_NEON(uint8_t* dst) { DC8_NEON(dst, 0, 0); } - -static void TM8uv_NEON(uint8_t* dst) { TrueMotion_NEON(dst, 8); } - -//------------------------------------------------------------------------------ -// 16x16 - -static void VE16_NEON(uint8_t* dst) { // vertical - const uint8x16_t top = vld1q_u8(dst - BPS); - int j; - for (j = 0; j < 16; ++j) { - vst1q_u8(dst + j * BPS, top); - } -} - -static void HE16_NEON(uint8_t* dst) { // horizontal - int j; - for (j = 0; j < 16; ++j) { - const uint8x16_t left = vld1q_dup_u8(dst - 1); - vst1q_u8(dst, left); - dst += BPS; - } -} - -static WEBP_INLINE void DC16_NEON(uint8_t* dst, int do_top, int do_left) { - uint16x8_t sum_top; - uint16x8_t sum_left; - uint8x8_t dc0; - - if (do_top) { - const uint8x16_t A = vld1q_u8(dst - BPS); // top row - const uint16x8_t p0 = vpaddlq_u8(A); // cascading summation of the top - const uint16x4_t p1 = vadd_u16(vget_low_u16(p0), vget_high_u16(p0)); - const uint16x4_t p2 = vpadd_u16(p1, p1); - const uint16x4_t p3 = vpadd_u16(p2, p2); - sum_top = vcombine_u16(p3, p3); - } - - if (do_left) { - int i; - sum_left = vdupq_n_u16(0); - for (i = 0; i < 16; i += 8) { - const uint16x8_t L0 = vmovl_u8(vld1_u8(dst + (i + 0) * BPS - 1)); - const uint16x8_t L1 = vmovl_u8(vld1_u8(dst + (i + 1) * BPS - 1)); - const uint16x8_t L2 = vmovl_u8(vld1_u8(dst + (i + 2) * BPS - 1)); - const uint16x8_t L3 = vmovl_u8(vld1_u8(dst + (i + 3) * BPS - 1)); - const uint16x8_t L4 = vmovl_u8(vld1_u8(dst + (i + 4) * BPS - 1)); - const uint16x8_t L5 = vmovl_u8(vld1_u8(dst + (i + 5) * BPS - 1)); - const uint16x8_t L6 = vmovl_u8(vld1_u8(dst + (i + 6) * BPS - 1)); - const uint16x8_t L7 = vmovl_u8(vld1_u8(dst + (i + 7) * BPS - 1)); - const uint16x8_t s0 = vaddq_u16(L0, L1); - const uint16x8_t s1 = vaddq_u16(L2, L3); - const uint16x8_t s2 = vaddq_u16(L4, L5); - const uint16x8_t s3 = vaddq_u16(L6, L7); - const uint16x8_t s01 = vaddq_u16(s0, s1); - const uint16x8_t s23 = vaddq_u16(s2, s3); - const uint16x8_t sum = vaddq_u16(s01, s23); - sum_left = vaddq_u16(sum_left, sum); - } - } - - if (do_top && do_left) { - const uint16x8_t sum = vaddq_u16(sum_left, sum_top); - dc0 = vrshrn_n_u16(sum, 5); - } else if (do_top) { - dc0 = vrshrn_n_u16(sum_top, 4); - } else if (do_left) { - dc0 = vrshrn_n_u16(sum_left, 4); - } else { - dc0 = vdup_n_u8(0x80); - } - - { - const uint8x16_t dc = vdupq_lane_u8(dc0, 0); - int i; - for (i = 0; i < 16; ++i) { - vst1q_u8(dst + i * BPS, dc); - } - } -} - -static void DC16TopLeft_NEON(uint8_t* dst) { DC16_NEON(dst, 1, 1); } -static void DC16NoTop_NEON(uint8_t* dst) { DC16_NEON(dst, 0, 1); } -static void DC16NoLeft_NEON(uint8_t* dst) { DC16_NEON(dst, 1, 0); } -static void DC16NoTopLeft_NEON(uint8_t* dst) { DC16_NEON(dst, 0, 0); } - -static void TM16_NEON(uint8_t* dst) { - const uint8x8_t TL = vld1_dup_u8(dst - BPS - 1); // top-left pixel 'A[-1]' - const uint8x16_t T = vld1q_u8(dst - BPS); // top row 'A[0..15]' - // A[c] - A[-1] - const int16x8_t d_lo = vreinterpretq_s16_u16(vsubl_u8(vget_low_u8(T), TL)); - const int16x8_t d_hi = vreinterpretq_s16_u16(vsubl_u8(vget_high_u8(T), TL)); - int y; - for (y = 0; y < 16; y += 4) { - // left edge - const int16x8_t L0 = ConvertU8ToS16_NEON(vld1_dup_u8(dst + 0 * BPS - 1)); - const int16x8_t L1 = ConvertU8ToS16_NEON(vld1_dup_u8(dst + 1 * BPS - 1)); - const int16x8_t L2 = ConvertU8ToS16_NEON(vld1_dup_u8(dst + 2 * BPS - 1)); - const int16x8_t L3 = ConvertU8ToS16_NEON(vld1_dup_u8(dst + 3 * BPS - 1)); - const int16x8_t r0_lo = vaddq_s16(L0, d_lo); // L[r] + A[c] - A[-1] - const int16x8_t r1_lo = vaddq_s16(L1, d_lo); - const int16x8_t r2_lo = vaddq_s16(L2, d_lo); - const int16x8_t r3_lo = vaddq_s16(L3, d_lo); - const int16x8_t r0_hi = vaddq_s16(L0, d_hi); - const int16x8_t r1_hi = vaddq_s16(L1, d_hi); - const int16x8_t r2_hi = vaddq_s16(L2, d_hi); - const int16x8_t r3_hi = vaddq_s16(L3, d_hi); - // Saturate and store the result. - const uint8x16_t row0 = vcombine_u8(vqmovun_s16(r0_lo), vqmovun_s16(r0_hi)); - const uint8x16_t row1 = vcombine_u8(vqmovun_s16(r1_lo), vqmovun_s16(r1_hi)); - const uint8x16_t row2 = vcombine_u8(vqmovun_s16(r2_lo), vqmovun_s16(r2_hi)); - const uint8x16_t row3 = vcombine_u8(vqmovun_s16(r3_lo), vqmovun_s16(r3_hi)); - vst1q_u8(dst + 0 * BPS, row0); - vst1q_u8(dst + 1 * BPS, row1); - vst1q_u8(dst + 2 * BPS, row2); - vst1q_u8(dst + 3 * BPS, row3); - dst += 4 * BPS; - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8DspInitNEON(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitNEON(void) { - VP8Transform = TransformTwo_NEON; - VP8TransformAC3 = TransformAC3_NEON; - VP8TransformDC = TransformDC_NEON; - VP8TransformWHT = TransformWHT_NEON; - - VP8VFilter16 = VFilter16_NEON; - VP8VFilter16i = VFilter16i_NEON; - VP8HFilter16 = HFilter16_NEON; -#if !defined(WORK_AROUND_GCC) - VP8HFilter16i = HFilter16i_NEON; -#endif - VP8VFilter8 = VFilter8_NEON; - VP8VFilter8i = VFilter8i_NEON; -#if !defined(WORK_AROUND_GCC) - VP8HFilter8 = HFilter8_NEON; - VP8HFilter8i = HFilter8i_NEON; -#endif - VP8SimpleVFilter16 = SimpleVFilter16_NEON; - VP8SimpleHFilter16 = SimpleHFilter16_NEON; - VP8SimpleVFilter16i = SimpleVFilter16i_NEON; - VP8SimpleHFilter16i = SimpleHFilter16i_NEON; - - VP8PredLuma4[0] = DC4_NEON; - VP8PredLuma4[1] = TM4_NEON; - VP8PredLuma4[2] = VE4_NEON; - VP8PredLuma4[4] = RD4_NEON; - VP8PredLuma4[6] = LD4_NEON; - - VP8PredLuma16[0] = DC16TopLeft_NEON; - VP8PredLuma16[1] = TM16_NEON; - VP8PredLuma16[2] = VE16_NEON; - VP8PredLuma16[3] = HE16_NEON; - VP8PredLuma16[4] = DC16NoTop_NEON; - VP8PredLuma16[5] = DC16NoLeft_NEON; - VP8PredLuma16[6] = DC16NoTopLeft_NEON; - - VP8PredChroma8[0] = DC8uv_NEON; - VP8PredChroma8[1] = TM8uv_NEON; - VP8PredChroma8[2] = VE8uv_NEON; - VP8PredChroma8[3] = HE8uv_NEON; - VP8PredChroma8[4] = DC8uvNoTop_NEON; - VP8PredChroma8[5] = DC8uvNoLeft_NEON; - VP8PredChroma8[6] = DC8uvNoTopLeft_NEON; -} - -#else // !WEBP_USE_NEON - -WEBP_DSP_INIT_STUB(VP8DspInitNEON) - -#endif // WEBP_USE_NEON diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_sse2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_sse2.c deleted file mode 100644 index 2b5b972..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_sse2.c +++ /dev/null @@ -1,1227 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE2 version of some decoding functions (idct, loop filtering). -// -// Author: somnath@google.com (Somnath Banerjee) -// cduvivier@google.com (Christian Duvivier) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE2) - -// The 3-coeff sparse transform in SSE2 is not really faster than the plain-C -// one it seems => disable it by default. Uncomment the following to enable: -#if !defined(USE_TRANSFORM_AC3) -#define USE_TRANSFORM_AC3 0 // ALTERNATE_CODE -#endif - -#include -#include "src/dsp/common_sse2.h" -#include "src/dec/vp8i_dec.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ -// Transforms (Paragraph 14.4) - -static void Transform_SSE2(const int16_t* in, uint8_t* dst, int do_two) { - // This implementation makes use of 16-bit fixed point versions of two - // multiply constants: - // K1 = sqrt(2) * cos (pi/8) ~= 85627 / 2^16 - // K2 = sqrt(2) * sin (pi/8) ~= 35468 / 2^16 - // - // To be able to use signed 16-bit integers, we use the following trick to - // have constants within range: - // - Associated constants are obtained by subtracting the 16-bit fixed point - // version of one: - // k = K - (1 << 16) => K = k + (1 << 16) - // K1 = 85267 => k1 = 20091 - // K2 = 35468 => k2 = -30068 - // - The multiplication of a variable by a constant become the sum of the - // variable and the multiplication of that variable by the associated - // constant: - // (x * K) >> 16 = (x * (k + (1 << 16))) >> 16 = ((x * k ) >> 16) + x - const __m128i k1 = _mm_set1_epi16(20091); - const __m128i k2 = _mm_set1_epi16(-30068); - __m128i T0, T1, T2, T3; - - // Load and concatenate the transform coefficients (we'll do two transforms - // in parallel). In the case of only one transform, the second half of the - // vectors will just contain random value we'll never use nor store. - __m128i in0, in1, in2, in3; - { - in0 = _mm_loadl_epi64((const __m128i*)&in[0]); - in1 = _mm_loadl_epi64((const __m128i*)&in[4]); - in2 = _mm_loadl_epi64((const __m128i*)&in[8]); - in3 = _mm_loadl_epi64((const __m128i*)&in[12]); - // a00 a10 a20 a30 x x x x - // a01 a11 a21 a31 x x x x - // a02 a12 a22 a32 x x x x - // a03 a13 a23 a33 x x x x - if (do_two) { - const __m128i inB0 = _mm_loadl_epi64((const __m128i*)&in[16]); - const __m128i inB1 = _mm_loadl_epi64((const __m128i*)&in[20]); - const __m128i inB2 = _mm_loadl_epi64((const __m128i*)&in[24]); - const __m128i inB3 = _mm_loadl_epi64((const __m128i*)&in[28]); - in0 = _mm_unpacklo_epi64(in0, inB0); - in1 = _mm_unpacklo_epi64(in1, inB1); - in2 = _mm_unpacklo_epi64(in2, inB2); - in3 = _mm_unpacklo_epi64(in3, inB3); - // a00 a10 a20 a30 b00 b10 b20 b30 - // a01 a11 a21 a31 b01 b11 b21 b31 - // a02 a12 a22 a32 b02 b12 b22 b32 - // a03 a13 a23 a33 b03 b13 b23 b33 - } - } - - // Vertical pass and subsequent transpose. - { - // First pass, c and d calculations are longer because of the "trick" - // multiplications. - const __m128i a = _mm_add_epi16(in0, in2); - const __m128i b = _mm_sub_epi16(in0, in2); - // c = MUL(in1, K2) - MUL(in3, K1) = MUL(in1, k2) - MUL(in3, k1) + in1 - in3 - const __m128i c1 = _mm_mulhi_epi16(in1, k2); - const __m128i c2 = _mm_mulhi_epi16(in3, k1); - const __m128i c3 = _mm_sub_epi16(in1, in3); - const __m128i c4 = _mm_sub_epi16(c1, c2); - const __m128i c = _mm_add_epi16(c3, c4); - // d = MUL(in1, K1) + MUL(in3, K2) = MUL(in1, k1) + MUL(in3, k2) + in1 + in3 - const __m128i d1 = _mm_mulhi_epi16(in1, k1); - const __m128i d2 = _mm_mulhi_epi16(in3, k2); - const __m128i d3 = _mm_add_epi16(in1, in3); - const __m128i d4 = _mm_add_epi16(d1, d2); - const __m128i d = _mm_add_epi16(d3, d4); - - // Second pass. - const __m128i tmp0 = _mm_add_epi16(a, d); - const __m128i tmp1 = _mm_add_epi16(b, c); - const __m128i tmp2 = _mm_sub_epi16(b, c); - const __m128i tmp3 = _mm_sub_epi16(a, d); - - // Transpose the two 4x4. - VP8Transpose_2_4x4_16b(&tmp0, &tmp1, &tmp2, &tmp3, &T0, &T1, &T2, &T3); - } - - // Horizontal pass and subsequent transpose. - { - // First pass, c and d calculations are longer because of the "trick" - // multiplications. - const __m128i four = _mm_set1_epi16(4); - const __m128i dc = _mm_add_epi16(T0, four); - const __m128i a = _mm_add_epi16(dc, T2); - const __m128i b = _mm_sub_epi16(dc, T2); - // c = MUL(T1, K2) - MUL(T3, K1) = MUL(T1, k2) - MUL(T3, k1) + T1 - T3 - const __m128i c1 = _mm_mulhi_epi16(T1, k2); - const __m128i c2 = _mm_mulhi_epi16(T3, k1); - const __m128i c3 = _mm_sub_epi16(T1, T3); - const __m128i c4 = _mm_sub_epi16(c1, c2); - const __m128i c = _mm_add_epi16(c3, c4); - // d = MUL(T1, K1) + MUL(T3, K2) = MUL(T1, k1) + MUL(T3, k2) + T1 + T3 - const __m128i d1 = _mm_mulhi_epi16(T1, k1); - const __m128i d2 = _mm_mulhi_epi16(T3, k2); - const __m128i d3 = _mm_add_epi16(T1, T3); - const __m128i d4 = _mm_add_epi16(d1, d2); - const __m128i d = _mm_add_epi16(d3, d4); - - // Second pass. - const __m128i tmp0 = _mm_add_epi16(a, d); - const __m128i tmp1 = _mm_add_epi16(b, c); - const __m128i tmp2 = _mm_sub_epi16(b, c); - const __m128i tmp3 = _mm_sub_epi16(a, d); - const __m128i shifted0 = _mm_srai_epi16(tmp0, 3); - const __m128i shifted1 = _mm_srai_epi16(tmp1, 3); - const __m128i shifted2 = _mm_srai_epi16(tmp2, 3); - const __m128i shifted3 = _mm_srai_epi16(tmp3, 3); - - // Transpose the two 4x4. - VP8Transpose_2_4x4_16b(&shifted0, &shifted1, &shifted2, &shifted3, &T0, &T1, - &T2, &T3); - } - - // Add inverse transform to 'dst' and store. - { - const __m128i zero = _mm_setzero_si128(); - // Load the reference(s). - __m128i dst0, dst1, dst2, dst3; - if (do_two) { - // Load eight bytes/pixels per line. - dst0 = _mm_loadl_epi64((__m128i*)(dst + 0 * BPS)); - dst1 = _mm_loadl_epi64((__m128i*)(dst + 1 * BPS)); - dst2 = _mm_loadl_epi64((__m128i*)(dst + 2 * BPS)); - dst3 = _mm_loadl_epi64((__m128i*)(dst + 3 * BPS)); - } else { - // Load four bytes/pixels per line. - dst0 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 0 * BPS)); - dst1 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 1 * BPS)); - dst2 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 2 * BPS)); - dst3 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 3 * BPS)); - } - // Convert to 16b. - dst0 = _mm_unpacklo_epi8(dst0, zero); - dst1 = _mm_unpacklo_epi8(dst1, zero); - dst2 = _mm_unpacklo_epi8(dst2, zero); - dst3 = _mm_unpacklo_epi8(dst3, zero); - // Add the inverse transform(s). - dst0 = _mm_add_epi16(dst0, T0); - dst1 = _mm_add_epi16(dst1, T1); - dst2 = _mm_add_epi16(dst2, T2); - dst3 = _mm_add_epi16(dst3, T3); - // Unsigned saturate to 8b. - dst0 = _mm_packus_epi16(dst0, dst0); - dst1 = _mm_packus_epi16(dst1, dst1); - dst2 = _mm_packus_epi16(dst2, dst2); - dst3 = _mm_packus_epi16(dst3, dst3); - // Store the results. - if (do_two) { - // Store eight bytes/pixels per line. - _mm_storel_epi64((__m128i*)(dst + 0 * BPS), dst0); - _mm_storel_epi64((__m128i*)(dst + 1 * BPS), dst1); - _mm_storel_epi64((__m128i*)(dst + 2 * BPS), dst2); - _mm_storel_epi64((__m128i*)(dst + 3 * BPS), dst3); - } else { - // Store four bytes/pixels per line. - WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32(dst0)); - WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(dst1)); - WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(dst2)); - WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(dst3)); - } - } -} - -#if (USE_TRANSFORM_AC3 == 1) -#define MUL(a, b) (((a) * (b)) >> 16) -static void TransformAC3(const int16_t* in, uint8_t* dst) { - static const int kC1 = 20091 + (1 << 16); - static const int kC2 = 35468; - const __m128i A = _mm_set1_epi16(in[0] + 4); - const __m128i c4 = _mm_set1_epi16(MUL(in[4], kC2)); - const __m128i d4 = _mm_set1_epi16(MUL(in[4], kC1)); - const int c1 = MUL(in[1], kC2); - const int d1 = MUL(in[1], kC1); - const __m128i CD = _mm_set_epi16(0, 0, 0, 0, -d1, -c1, c1, d1); - const __m128i B = _mm_adds_epi16(A, CD); - const __m128i m0 = _mm_adds_epi16(B, d4); - const __m128i m1 = _mm_adds_epi16(B, c4); - const __m128i m2 = _mm_subs_epi16(B, c4); - const __m128i m3 = _mm_subs_epi16(B, d4); - const __m128i zero = _mm_setzero_si128(); - // Load the source pixels. - __m128i dst0 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 0 * BPS)); - __m128i dst1 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 1 * BPS)); - __m128i dst2 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 2 * BPS)); - __m128i dst3 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 3 * BPS)); - // Convert to 16b. - dst0 = _mm_unpacklo_epi8(dst0, zero); - dst1 = _mm_unpacklo_epi8(dst1, zero); - dst2 = _mm_unpacklo_epi8(dst2, zero); - dst3 = _mm_unpacklo_epi8(dst3, zero); - // Add the inverse transform. - dst0 = _mm_adds_epi16(dst0, _mm_srai_epi16(m0, 3)); - dst1 = _mm_adds_epi16(dst1, _mm_srai_epi16(m1, 3)); - dst2 = _mm_adds_epi16(dst2, _mm_srai_epi16(m2, 3)); - dst3 = _mm_adds_epi16(dst3, _mm_srai_epi16(m3, 3)); - // Unsigned saturate to 8b. - dst0 = _mm_packus_epi16(dst0, dst0); - dst1 = _mm_packus_epi16(dst1, dst1); - dst2 = _mm_packus_epi16(dst2, dst2); - dst3 = _mm_packus_epi16(dst3, dst3); - // Store the results. - WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32(dst0)); - WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(dst1)); - WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(dst2)); - WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(dst3)); -} -#undef MUL -#endif // USE_TRANSFORM_AC3 - -//------------------------------------------------------------------------------ -// Loop Filter (Paragraph 15) - -// Compute abs(p - q) = subs(p - q) OR subs(q - p) -#define MM_ABS(p, q) _mm_or_si128( \ - _mm_subs_epu8((q), (p)), \ - _mm_subs_epu8((p), (q))) - -// Shift each byte of "x" by 3 bits while preserving by the sign bit. -static WEBP_INLINE void SignedShift8b_SSE2(__m128i* const x) { - const __m128i zero = _mm_setzero_si128(); - const __m128i lo_0 = _mm_unpacklo_epi8(zero, *x); - const __m128i hi_0 = _mm_unpackhi_epi8(zero, *x); - const __m128i lo_1 = _mm_srai_epi16(lo_0, 3 + 8); - const __m128i hi_1 = _mm_srai_epi16(hi_0, 3 + 8); - *x = _mm_packs_epi16(lo_1, hi_1); -} - -#define FLIP_SIGN_BIT2(a, b) { \ - (a) = _mm_xor_si128(a, sign_bit); \ - (b) = _mm_xor_si128(b, sign_bit); \ -} - -#define FLIP_SIGN_BIT4(a, b, c, d) { \ - FLIP_SIGN_BIT2(a, b); \ - FLIP_SIGN_BIT2(c, d); \ -} - -// input/output is uint8_t -static WEBP_INLINE void GetNotHEV_SSE2(const __m128i* const p1, - const __m128i* const p0, - const __m128i* const q0, - const __m128i* const q1, - int hev_thresh, __m128i* const not_hev) { - const __m128i zero = _mm_setzero_si128(); - const __m128i t_1 = MM_ABS(*p1, *p0); - const __m128i t_2 = MM_ABS(*q1, *q0); - - const __m128i h = _mm_set1_epi8(hev_thresh); - const __m128i t_max = _mm_max_epu8(t_1, t_2); - - const __m128i t_max_h = _mm_subs_epu8(t_max, h); - *not_hev = _mm_cmpeq_epi8(t_max_h, zero); // not_hev <= t1 && not_hev <= t2 -} - -// input pixels are int8_t -static WEBP_INLINE void GetBaseDelta_SSE2(const __m128i* const p1, - const __m128i* const p0, - const __m128i* const q0, - const __m128i* const q1, - __m128i* const delta) { - // beware of addition order, for saturation! - const __m128i p1_q1 = _mm_subs_epi8(*p1, *q1); // p1 - q1 - const __m128i q0_p0 = _mm_subs_epi8(*q0, *p0); // q0 - p0 - const __m128i s1 = _mm_adds_epi8(p1_q1, q0_p0); // p1 - q1 + 1 * (q0 - p0) - const __m128i s2 = _mm_adds_epi8(q0_p0, s1); // p1 - q1 + 2 * (q0 - p0) - const __m128i s3 = _mm_adds_epi8(q0_p0, s2); // p1 - q1 + 3 * (q0 - p0) - *delta = s3; -} - -// input and output are int8_t -static WEBP_INLINE void DoSimpleFilter_SSE2(__m128i* const p0, - __m128i* const q0, - const __m128i* const fl) { - const __m128i k3 = _mm_set1_epi8(3); - const __m128i k4 = _mm_set1_epi8(4); - __m128i v3 = _mm_adds_epi8(*fl, k3); - __m128i v4 = _mm_adds_epi8(*fl, k4); - - SignedShift8b_SSE2(&v4); // v4 >> 3 - SignedShift8b_SSE2(&v3); // v3 >> 3 - *q0 = _mm_subs_epi8(*q0, v4); // q0 -= v4 - *p0 = _mm_adds_epi8(*p0, v3); // p0 += v3 -} - -// Updates values of 2 pixels at MB edge during complex filtering. -// Update operations: -// q = q - delta and p = p + delta; where delta = [(a_hi >> 7), (a_lo >> 7)] -// Pixels 'pi' and 'qi' are int8_t on input, uint8_t on output (sign flip). -static WEBP_INLINE void Update2Pixels_SSE2(__m128i* const pi, __m128i* const qi, - const __m128i* const a0_lo, - const __m128i* const a0_hi) { - const __m128i a1_lo = _mm_srai_epi16(*a0_lo, 7); - const __m128i a1_hi = _mm_srai_epi16(*a0_hi, 7); - const __m128i delta = _mm_packs_epi16(a1_lo, a1_hi); - const __m128i sign_bit = _mm_set1_epi8(0x80); - *pi = _mm_adds_epi8(*pi, delta); - *qi = _mm_subs_epi8(*qi, delta); - FLIP_SIGN_BIT2(*pi, *qi); -} - -// input pixels are uint8_t -static WEBP_INLINE void NeedsFilter_SSE2(const __m128i* const p1, - const __m128i* const p0, - const __m128i* const q0, - const __m128i* const q1, - int thresh, __m128i* const mask) { - const __m128i m_thresh = _mm_set1_epi8(thresh); - const __m128i t1 = MM_ABS(*p1, *q1); // abs(p1 - q1) - const __m128i kFE = _mm_set1_epi8(0xFE); - const __m128i t2 = _mm_and_si128(t1, kFE); // set lsb of each byte to zero - const __m128i t3 = _mm_srli_epi16(t2, 1); // abs(p1 - q1) / 2 - - const __m128i t4 = MM_ABS(*p0, *q0); // abs(p0 - q0) - const __m128i t5 = _mm_adds_epu8(t4, t4); // abs(p0 - q0) * 2 - const __m128i t6 = _mm_adds_epu8(t5, t3); // abs(p0-q0)*2 + abs(p1-q1)/2 - - const __m128i t7 = _mm_subs_epu8(t6, m_thresh); // mask <= m_thresh - *mask = _mm_cmpeq_epi8(t7, _mm_setzero_si128()); -} - -//------------------------------------------------------------------------------ -// Edge filtering functions - -// Applies filter on 2 pixels (p0 and q0) -static WEBP_INLINE void DoFilter2_SSE2(__m128i* const p1, __m128i* const p0, - __m128i* const q0, __m128i* const q1, - int thresh) { - __m128i a, mask; - const __m128i sign_bit = _mm_set1_epi8(0x80); - // convert p1/q1 to int8_t (for GetBaseDelta_SSE2) - const __m128i p1s = _mm_xor_si128(*p1, sign_bit); - const __m128i q1s = _mm_xor_si128(*q1, sign_bit); - - NeedsFilter_SSE2(p1, p0, q0, q1, thresh, &mask); - - FLIP_SIGN_BIT2(*p0, *q0); - GetBaseDelta_SSE2(&p1s, p0, q0, &q1s, &a); - a = _mm_and_si128(a, mask); // mask filter values we don't care about - DoSimpleFilter_SSE2(p0, q0, &a); - FLIP_SIGN_BIT2(*p0, *q0); -} - -// Applies filter on 4 pixels (p1, p0, q0 and q1) -static WEBP_INLINE void DoFilter4_SSE2(__m128i* const p1, __m128i* const p0, - __m128i* const q0, __m128i* const q1, - const __m128i* const mask, - int hev_thresh) { - const __m128i zero = _mm_setzero_si128(); - const __m128i sign_bit = _mm_set1_epi8(0x80); - const __m128i k64 = _mm_set1_epi8(64); - const __m128i k3 = _mm_set1_epi8(3); - const __m128i k4 = _mm_set1_epi8(4); - __m128i not_hev; - __m128i t1, t2, t3; - - // compute hev mask - GetNotHEV_SSE2(p1, p0, q0, q1, hev_thresh, ¬_hev); - - // convert to signed values - FLIP_SIGN_BIT4(*p1, *p0, *q0, *q1); - - t1 = _mm_subs_epi8(*p1, *q1); // p1 - q1 - t1 = _mm_andnot_si128(not_hev, t1); // hev(p1 - q1) - t2 = _mm_subs_epi8(*q0, *p0); // q0 - p0 - t1 = _mm_adds_epi8(t1, t2); // hev(p1 - q1) + 1 * (q0 - p0) - t1 = _mm_adds_epi8(t1, t2); // hev(p1 - q1) + 2 * (q0 - p0) - t1 = _mm_adds_epi8(t1, t2); // hev(p1 - q1) + 3 * (q0 - p0) - t1 = _mm_and_si128(t1, *mask); // mask filter values we don't care about - - t2 = _mm_adds_epi8(t1, k3); // 3 * (q0 - p0) + hev(p1 - q1) + 3 - t3 = _mm_adds_epi8(t1, k4); // 3 * (q0 - p0) + hev(p1 - q1) + 4 - SignedShift8b_SSE2(&t2); // (3 * (q0 - p0) + hev(p1 - q1) + 3) >> 3 - SignedShift8b_SSE2(&t3); // (3 * (q0 - p0) + hev(p1 - q1) + 4) >> 3 - *p0 = _mm_adds_epi8(*p0, t2); // p0 += t2 - *q0 = _mm_subs_epi8(*q0, t3); // q0 -= t3 - FLIP_SIGN_BIT2(*p0, *q0); - - // this is equivalent to signed (a + 1) >> 1 calculation - t2 = _mm_add_epi8(t3, sign_bit); - t3 = _mm_avg_epu8(t2, zero); - t3 = _mm_sub_epi8(t3, k64); - - t3 = _mm_and_si128(not_hev, t3); // if !hev - *q1 = _mm_subs_epi8(*q1, t3); // q1 -= t3 - *p1 = _mm_adds_epi8(*p1, t3); // p1 += t3 - FLIP_SIGN_BIT2(*p1, *q1); -} - -// Applies filter on 6 pixels (p2, p1, p0, q0, q1 and q2) -static WEBP_INLINE void DoFilter6_SSE2(__m128i* const p2, __m128i* const p1, - __m128i* const p0, __m128i* const q0, - __m128i* const q1, __m128i* const q2, - const __m128i* const mask, - int hev_thresh) { - const __m128i zero = _mm_setzero_si128(); - const __m128i sign_bit = _mm_set1_epi8(0x80); - __m128i a, not_hev; - - // compute hev mask - GetNotHEV_SSE2(p1, p0, q0, q1, hev_thresh, ¬_hev); - - FLIP_SIGN_BIT4(*p1, *p0, *q0, *q1); - FLIP_SIGN_BIT2(*p2, *q2); - GetBaseDelta_SSE2(p1, p0, q0, q1, &a); - - { // do simple filter on pixels with hev - const __m128i m = _mm_andnot_si128(not_hev, *mask); - const __m128i f = _mm_and_si128(a, m); - DoSimpleFilter_SSE2(p0, q0, &f); - } - - { // do strong filter on pixels with not hev - const __m128i k9 = _mm_set1_epi16(0x0900); - const __m128i k63 = _mm_set1_epi16(63); - - const __m128i m = _mm_and_si128(not_hev, *mask); - const __m128i f = _mm_and_si128(a, m); - - const __m128i f_lo = _mm_unpacklo_epi8(zero, f); - const __m128i f_hi = _mm_unpackhi_epi8(zero, f); - - const __m128i f9_lo = _mm_mulhi_epi16(f_lo, k9); // Filter (lo) * 9 - const __m128i f9_hi = _mm_mulhi_epi16(f_hi, k9); // Filter (hi) * 9 - - const __m128i a2_lo = _mm_add_epi16(f9_lo, k63); // Filter * 9 + 63 - const __m128i a2_hi = _mm_add_epi16(f9_hi, k63); // Filter * 9 + 63 - - const __m128i a1_lo = _mm_add_epi16(a2_lo, f9_lo); // Filter * 18 + 63 - const __m128i a1_hi = _mm_add_epi16(a2_hi, f9_hi); // Filter * 18 + 63 - - const __m128i a0_lo = _mm_add_epi16(a1_lo, f9_lo); // Filter * 27 + 63 - const __m128i a0_hi = _mm_add_epi16(a1_hi, f9_hi); // Filter * 27 + 63 - - Update2Pixels_SSE2(p2, q2, &a2_lo, &a2_hi); - Update2Pixels_SSE2(p1, q1, &a1_lo, &a1_hi); - Update2Pixels_SSE2(p0, q0, &a0_lo, &a0_hi); - } -} - -// reads 8 rows across a vertical edge. -static WEBP_INLINE void Load8x4_SSE2(const uint8_t* const b, int stride, - __m128i* const p, __m128i* const q) { - // A0 = 63 62 61 60 23 22 21 20 43 42 41 40 03 02 01 00 - // A1 = 73 72 71 70 33 32 31 30 53 52 51 50 13 12 11 10 - const __m128i A0 = _mm_set_epi32( - WebPMemToUint32(&b[6 * stride]), WebPMemToUint32(&b[2 * stride]), - WebPMemToUint32(&b[4 * stride]), WebPMemToUint32(&b[0 * stride])); - const __m128i A1 = _mm_set_epi32( - WebPMemToUint32(&b[7 * stride]), WebPMemToUint32(&b[3 * stride]), - WebPMemToUint32(&b[5 * stride]), WebPMemToUint32(&b[1 * stride])); - - // B0 = 53 43 52 42 51 41 50 40 13 03 12 02 11 01 10 00 - // B1 = 73 63 72 62 71 61 70 60 33 23 32 22 31 21 30 20 - const __m128i B0 = _mm_unpacklo_epi8(A0, A1); - const __m128i B1 = _mm_unpackhi_epi8(A0, A1); - - // C0 = 33 23 13 03 32 22 12 02 31 21 11 01 30 20 10 00 - // C1 = 73 63 53 43 72 62 52 42 71 61 51 41 70 60 50 40 - const __m128i C0 = _mm_unpacklo_epi16(B0, B1); - const __m128i C1 = _mm_unpackhi_epi16(B0, B1); - - // *p = 71 61 51 41 31 21 11 01 70 60 50 40 30 20 10 00 - // *q = 73 63 53 43 33 23 13 03 72 62 52 42 32 22 12 02 - *p = _mm_unpacklo_epi32(C0, C1); - *q = _mm_unpackhi_epi32(C0, C1); -} - -static WEBP_INLINE void Load16x4_SSE2(const uint8_t* const r0, - const uint8_t* const r8, - int stride, - __m128i* const p1, __m128i* const p0, - __m128i* const q0, __m128i* const q1) { - // Assume the pixels around the edge (|) are numbered as follows - // 00 01 | 02 03 - // 10 11 | 12 13 - // ... | ... - // e0 e1 | e2 e3 - // f0 f1 | f2 f3 - // - // r0 is pointing to the 0th row (00) - // r8 is pointing to the 8th row (80) - - // Load - // p1 = 71 61 51 41 31 21 11 01 70 60 50 40 30 20 10 00 - // q0 = 73 63 53 43 33 23 13 03 72 62 52 42 32 22 12 02 - // p0 = f1 e1 d1 c1 b1 a1 91 81 f0 e0 d0 c0 b0 a0 90 80 - // q1 = f3 e3 d3 c3 b3 a3 93 83 f2 e2 d2 c2 b2 a2 92 82 - Load8x4_SSE2(r0, stride, p1, q0); - Load8x4_SSE2(r8, stride, p0, q1); - - { - // p1 = f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00 - // p0 = f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01 - // q0 = f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02 - // q1 = f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03 - const __m128i t1 = *p1; - const __m128i t2 = *q0; - *p1 = _mm_unpacklo_epi64(t1, *p0); - *p0 = _mm_unpackhi_epi64(t1, *p0); - *q0 = _mm_unpacklo_epi64(t2, *q1); - *q1 = _mm_unpackhi_epi64(t2, *q1); - } -} - -static WEBP_INLINE void Store4x4_SSE2(__m128i* const x, - uint8_t* dst, int stride) { - int i; - for (i = 0; i < 4; ++i, dst += stride) { - WebPUint32ToMem(dst, _mm_cvtsi128_si32(*x)); - *x = _mm_srli_si128(*x, 4); - } -} - -// Transpose back and store -static WEBP_INLINE void Store16x4_SSE2(const __m128i* const p1, - const __m128i* const p0, - const __m128i* const q0, - const __m128i* const q1, - uint8_t* r0, uint8_t* r8, - int stride) { - __m128i t1, p1_s, p0_s, q0_s, q1_s; - - // p0 = 71 70 61 60 51 50 41 40 31 30 21 20 11 10 01 00 - // p1 = f1 f0 e1 e0 d1 d0 c1 c0 b1 b0 a1 a0 91 90 81 80 - t1 = *p0; - p0_s = _mm_unpacklo_epi8(*p1, t1); - p1_s = _mm_unpackhi_epi8(*p1, t1); - - // q0 = 73 72 63 62 53 52 43 42 33 32 23 22 13 12 03 02 - // q1 = f3 f2 e3 e2 d3 d2 c3 c2 b3 b2 a3 a2 93 92 83 82 - t1 = *q0; - q0_s = _mm_unpacklo_epi8(t1, *q1); - q1_s = _mm_unpackhi_epi8(t1, *q1); - - // p0 = 33 32 31 30 23 22 21 20 13 12 11 10 03 02 01 00 - // q0 = 73 72 71 70 63 62 61 60 53 52 51 50 43 42 41 40 - t1 = p0_s; - p0_s = _mm_unpacklo_epi16(t1, q0_s); - q0_s = _mm_unpackhi_epi16(t1, q0_s); - - // p1 = b3 b2 b1 b0 a3 a2 a1 a0 93 92 91 90 83 82 81 80 - // q1 = f3 f2 f1 f0 e3 e2 e1 e0 d3 d2 d1 d0 c3 c2 c1 c0 - t1 = p1_s; - p1_s = _mm_unpacklo_epi16(t1, q1_s); - q1_s = _mm_unpackhi_epi16(t1, q1_s); - - Store4x4_SSE2(&p0_s, r0, stride); - r0 += 4 * stride; - Store4x4_SSE2(&q0_s, r0, stride); - - Store4x4_SSE2(&p1_s, r8, stride); - r8 += 4 * stride; - Store4x4_SSE2(&q1_s, r8, stride); -} - -//------------------------------------------------------------------------------ -// Simple In-loop filtering (Paragraph 15.2) - -static void SimpleVFilter16_SSE2(uint8_t* p, int stride, int thresh) { - // Load - __m128i p1 = _mm_loadu_si128((__m128i*)&p[-2 * stride]); - __m128i p0 = _mm_loadu_si128((__m128i*)&p[-stride]); - __m128i q0 = _mm_loadu_si128((__m128i*)&p[0]); - __m128i q1 = _mm_loadu_si128((__m128i*)&p[stride]); - - DoFilter2_SSE2(&p1, &p0, &q0, &q1, thresh); - - // Store - _mm_storeu_si128((__m128i*)&p[-stride], p0); - _mm_storeu_si128((__m128i*)&p[0], q0); -} - -static void SimpleHFilter16_SSE2(uint8_t* p, int stride, int thresh) { - __m128i p1, p0, q0, q1; - - p -= 2; // beginning of p1 - - Load16x4_SSE2(p, p + 8 * stride, stride, &p1, &p0, &q0, &q1); - DoFilter2_SSE2(&p1, &p0, &q0, &q1, thresh); - Store16x4_SSE2(&p1, &p0, &q0, &q1, p, p + 8 * stride, stride); -} - -static void SimpleVFilter16i_SSE2(uint8_t* p, int stride, int thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4 * stride; - SimpleVFilter16_SSE2(p, stride, thresh); - } -} - -static void SimpleHFilter16i_SSE2(uint8_t* p, int stride, int thresh) { - int k; - for (k = 3; k > 0; --k) { - p += 4; - SimpleHFilter16_SSE2(p, stride, thresh); - } -} - -//------------------------------------------------------------------------------ -// Complex In-loop filtering (Paragraph 15.3) - -#define MAX_DIFF1(p3, p2, p1, p0, m) do { \ - (m) = MM_ABS(p1, p0); \ - (m) = _mm_max_epu8(m, MM_ABS(p3, p2)); \ - (m) = _mm_max_epu8(m, MM_ABS(p2, p1)); \ -} while (0) - -#define MAX_DIFF2(p3, p2, p1, p0, m) do { \ - (m) = _mm_max_epu8(m, MM_ABS(p1, p0)); \ - (m) = _mm_max_epu8(m, MM_ABS(p3, p2)); \ - (m) = _mm_max_epu8(m, MM_ABS(p2, p1)); \ -} while (0) - -#define LOAD_H_EDGES4(p, stride, e1, e2, e3, e4) { \ - (e1) = _mm_loadu_si128((__m128i*)&(p)[0 * (stride)]); \ - (e2) = _mm_loadu_si128((__m128i*)&(p)[1 * (stride)]); \ - (e3) = _mm_loadu_si128((__m128i*)&(p)[2 * (stride)]); \ - (e4) = _mm_loadu_si128((__m128i*)&(p)[3 * (stride)]); \ -} - -#define LOADUV_H_EDGE(p, u, v, stride) do { \ - const __m128i U = _mm_loadl_epi64((__m128i*)&(u)[(stride)]); \ - const __m128i V = _mm_loadl_epi64((__m128i*)&(v)[(stride)]); \ - (p) = _mm_unpacklo_epi64(U, V); \ -} while (0) - -#define LOADUV_H_EDGES4(u, v, stride, e1, e2, e3, e4) { \ - LOADUV_H_EDGE(e1, u, v, 0 * (stride)); \ - LOADUV_H_EDGE(e2, u, v, 1 * (stride)); \ - LOADUV_H_EDGE(e3, u, v, 2 * (stride)); \ - LOADUV_H_EDGE(e4, u, v, 3 * (stride)); \ -} - -#define STOREUV(p, u, v, stride) { \ - _mm_storel_epi64((__m128i*)&(u)[(stride)], p); \ - (p) = _mm_srli_si128(p, 8); \ - _mm_storel_epi64((__m128i*)&(v)[(stride)], p); \ -} - -static WEBP_INLINE void ComplexMask_SSE2(const __m128i* const p1, - const __m128i* const p0, - const __m128i* const q0, - const __m128i* const q1, - int thresh, int ithresh, - __m128i* const mask) { - const __m128i it = _mm_set1_epi8(ithresh); - const __m128i diff = _mm_subs_epu8(*mask, it); - const __m128i thresh_mask = _mm_cmpeq_epi8(diff, _mm_setzero_si128()); - __m128i filter_mask; - NeedsFilter_SSE2(p1, p0, q0, q1, thresh, &filter_mask); - *mask = _mm_and_si128(thresh_mask, filter_mask); -} - -// on macroblock edges -static void VFilter16_SSE2(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - __m128i t1; - __m128i mask; - __m128i p2, p1, p0, q0, q1, q2; - - // Load p3, p2, p1, p0 - LOAD_H_EDGES4(p - 4 * stride, stride, t1, p2, p1, p0); - MAX_DIFF1(t1, p2, p1, p0, mask); - - // Load q0, q1, q2, q3 - LOAD_H_EDGES4(p, stride, q0, q1, q2, t1); - MAX_DIFF2(t1, q2, q1, q0, mask); - - ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask); - DoFilter6_SSE2(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh); - - // Store - _mm_storeu_si128((__m128i*)&p[-3 * stride], p2); - _mm_storeu_si128((__m128i*)&p[-2 * stride], p1); - _mm_storeu_si128((__m128i*)&p[-1 * stride], p0); - _mm_storeu_si128((__m128i*)&p[+0 * stride], q0); - _mm_storeu_si128((__m128i*)&p[+1 * stride], q1); - _mm_storeu_si128((__m128i*)&p[+2 * stride], q2); -} - -static void HFilter16_SSE2(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - __m128i mask; - __m128i p3, p2, p1, p0, q0, q1, q2, q3; - - uint8_t* const b = p - 4; - Load16x4_SSE2(b, b + 8 * stride, stride, &p3, &p2, &p1, &p0); - MAX_DIFF1(p3, p2, p1, p0, mask); - - Load16x4_SSE2(p, p + 8 * stride, stride, &q0, &q1, &q2, &q3); - MAX_DIFF2(q3, q2, q1, q0, mask); - - ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask); - DoFilter6_SSE2(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh); - - Store16x4_SSE2(&p3, &p2, &p1, &p0, b, b + 8 * stride, stride); - Store16x4_SSE2(&q0, &q1, &q2, &q3, p, p + 8 * stride, stride); -} - -// on three inner edges -static void VFilter16i_SSE2(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - int k; - __m128i p3, p2, p1, p0; // loop invariants - - LOAD_H_EDGES4(p, stride, p3, p2, p1, p0); // prologue - - for (k = 3; k > 0; --k) { - __m128i mask, tmp1, tmp2; - uint8_t* const b = p + 2 * stride; // beginning of p1 - p += 4 * stride; - - MAX_DIFF1(p3, p2, p1, p0, mask); // compute partial mask - LOAD_H_EDGES4(p, stride, p3, p2, tmp1, tmp2); - MAX_DIFF2(p3, p2, tmp1, tmp2, mask); - - // p3 and p2 are not just temporary variables here: they will be - // re-used for next span. And q2/q3 will become p1/p0 accordingly. - ComplexMask_SSE2(&p1, &p0, &p3, &p2, thresh, ithresh, &mask); - DoFilter4_SSE2(&p1, &p0, &p3, &p2, &mask, hev_thresh); - - // Store - _mm_storeu_si128((__m128i*)&b[0 * stride], p1); - _mm_storeu_si128((__m128i*)&b[1 * stride], p0); - _mm_storeu_si128((__m128i*)&b[2 * stride], p3); - _mm_storeu_si128((__m128i*)&b[3 * stride], p2); - - // rotate samples - p1 = tmp1; - p0 = tmp2; - } -} - -static void HFilter16i_SSE2(uint8_t* p, int stride, - int thresh, int ithresh, int hev_thresh) { - int k; - __m128i p3, p2, p1, p0; // loop invariants - - Load16x4_SSE2(p, p + 8 * stride, stride, &p3, &p2, &p1, &p0); // prologue - - for (k = 3; k > 0; --k) { - __m128i mask, tmp1, tmp2; - uint8_t* const b = p + 2; // beginning of p1 - - p += 4; // beginning of q0 (and next span) - - MAX_DIFF1(p3, p2, p1, p0, mask); // compute partial mask - Load16x4_SSE2(p, p + 8 * stride, stride, &p3, &p2, &tmp1, &tmp2); - MAX_DIFF2(p3, p2, tmp1, tmp2, mask); - - ComplexMask_SSE2(&p1, &p0, &p3, &p2, thresh, ithresh, &mask); - DoFilter4_SSE2(&p1, &p0, &p3, &p2, &mask, hev_thresh); - - Store16x4_SSE2(&p1, &p0, &p3, &p2, b, b + 8 * stride, stride); - - // rotate samples - p1 = tmp1; - p0 = tmp2; - } -} - -// 8-pixels wide variant, for chroma filtering -static void VFilter8_SSE2(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - __m128i mask; - __m128i t1, p2, p1, p0, q0, q1, q2; - - // Load p3, p2, p1, p0 - LOADUV_H_EDGES4(u - 4 * stride, v - 4 * stride, stride, t1, p2, p1, p0); - MAX_DIFF1(t1, p2, p1, p0, mask); - - // Load q0, q1, q2, q3 - LOADUV_H_EDGES4(u, v, stride, q0, q1, q2, t1); - MAX_DIFF2(t1, q2, q1, q0, mask); - - ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask); - DoFilter6_SSE2(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh); - - // Store - STOREUV(p2, u, v, -3 * stride); - STOREUV(p1, u, v, -2 * stride); - STOREUV(p0, u, v, -1 * stride); - STOREUV(q0, u, v, 0 * stride); - STOREUV(q1, u, v, 1 * stride); - STOREUV(q2, u, v, 2 * stride); -} - -static void HFilter8_SSE2(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - __m128i mask; - __m128i p3, p2, p1, p0, q0, q1, q2, q3; - - uint8_t* const tu = u - 4; - uint8_t* const tv = v - 4; - Load16x4_SSE2(tu, tv, stride, &p3, &p2, &p1, &p0); - MAX_DIFF1(p3, p2, p1, p0, mask); - - Load16x4_SSE2(u, v, stride, &q0, &q1, &q2, &q3); - MAX_DIFF2(q3, q2, q1, q0, mask); - - ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask); - DoFilter6_SSE2(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh); - - Store16x4_SSE2(&p3, &p2, &p1, &p0, tu, tv, stride); - Store16x4_SSE2(&q0, &q1, &q2, &q3, u, v, stride); -} - -static void VFilter8i_SSE2(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - __m128i mask; - __m128i t1, t2, p1, p0, q0, q1; - - // Load p3, p2, p1, p0 - LOADUV_H_EDGES4(u, v, stride, t2, t1, p1, p0); - MAX_DIFF1(t2, t1, p1, p0, mask); - - u += 4 * stride; - v += 4 * stride; - - // Load q0, q1, q2, q3 - LOADUV_H_EDGES4(u, v, stride, q0, q1, t1, t2); - MAX_DIFF2(t2, t1, q1, q0, mask); - - ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask); - DoFilter4_SSE2(&p1, &p0, &q0, &q1, &mask, hev_thresh); - - // Store - STOREUV(p1, u, v, -2 * stride); - STOREUV(p0, u, v, -1 * stride); - STOREUV(q0, u, v, 0 * stride); - STOREUV(q1, u, v, 1 * stride); -} - -static void HFilter8i_SSE2(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_thresh) { - __m128i mask; - __m128i t1, t2, p1, p0, q0, q1; - Load16x4_SSE2(u, v, stride, &t2, &t1, &p1, &p0); // p3, p2, p1, p0 - MAX_DIFF1(t2, t1, p1, p0, mask); - - u += 4; // beginning of q0 - v += 4; - Load16x4_SSE2(u, v, stride, &q0, &q1, &t1, &t2); // q0, q1, q2, q3 - MAX_DIFF2(t2, t1, q1, q0, mask); - - ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask); - DoFilter4_SSE2(&p1, &p0, &q0, &q1, &mask, hev_thresh); - - u -= 2; // beginning of p1 - v -= 2; - Store16x4_SSE2(&p1, &p0, &q0, &q1, u, v, stride); -} - -//------------------------------------------------------------------------------ -// 4x4 predictions - -#define DST(x, y) dst[(x) + (y) * BPS] -#define AVG3(a, b, c) (((a) + 2 * (b) + (c) + 2) >> 2) - -// We use the following 8b-arithmetic tricks: -// (a + 2 * b + c + 2) >> 2 = (AC + b + 1) >> 1 -// where: AC = (a + c) >> 1 = [(a + c + 1) >> 1] - [(a^c) & 1] -// and: -// (a + 2 * b + c + 2) >> 2 = (AB + BC + 1) >> 1 - (ab|bc)&lsb -// where: AC = (a + b + 1) >> 1, BC = (b + c + 1) >> 1 -// and ab = a ^ b, bc = b ^ c, lsb = (AC^BC)&1 - -static void VE4_SSE2(uint8_t* dst) { // vertical - const __m128i one = _mm_set1_epi8(1); - const __m128i ABCDEFGH = _mm_loadl_epi64((__m128i*)(dst - BPS - 1)); - const __m128i BCDEFGH0 = _mm_srli_si128(ABCDEFGH, 1); - const __m128i CDEFGH00 = _mm_srli_si128(ABCDEFGH, 2); - const __m128i a = _mm_avg_epu8(ABCDEFGH, CDEFGH00); - const __m128i lsb = _mm_and_si128(_mm_xor_si128(ABCDEFGH, CDEFGH00), one); - const __m128i b = _mm_subs_epu8(a, lsb); - const __m128i avg = _mm_avg_epu8(b, BCDEFGH0); - const uint32_t vals = _mm_cvtsi128_si32(avg); - int i; - for (i = 0; i < 4; ++i) { - WebPUint32ToMem(dst + i * BPS, vals); - } -} - -static void LD4_SSE2(uint8_t* dst) { // Down-Left - const __m128i one = _mm_set1_epi8(1); - const __m128i ABCDEFGH = _mm_loadl_epi64((__m128i*)(dst - BPS)); - const __m128i BCDEFGH0 = _mm_srli_si128(ABCDEFGH, 1); - const __m128i CDEFGH00 = _mm_srli_si128(ABCDEFGH, 2); - const __m128i CDEFGHH0 = _mm_insert_epi16(CDEFGH00, dst[-BPS + 7], 3); - const __m128i avg1 = _mm_avg_epu8(ABCDEFGH, CDEFGHH0); - const __m128i lsb = _mm_and_si128(_mm_xor_si128(ABCDEFGH, CDEFGHH0), one); - const __m128i avg2 = _mm_subs_epu8(avg1, lsb); - const __m128i abcdefg = _mm_avg_epu8(avg2, BCDEFGH0); - WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32( abcdefg )); - WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 1))); - WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 2))); - WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 3))); -} - -static void VR4_SSE2(uint8_t* dst) { // Vertical-Right - const __m128i one = _mm_set1_epi8(1); - const int I = dst[-1 + 0 * BPS]; - const int J = dst[-1 + 1 * BPS]; - const int K = dst[-1 + 2 * BPS]; - const int X = dst[-1 - BPS]; - const __m128i XABCD = _mm_loadl_epi64((__m128i*)(dst - BPS - 1)); - const __m128i ABCD0 = _mm_srli_si128(XABCD, 1); - const __m128i abcd = _mm_avg_epu8(XABCD, ABCD0); - const __m128i _XABCD = _mm_slli_si128(XABCD, 1); - const __m128i IXABCD = _mm_insert_epi16(_XABCD, I | (X << 8), 0); - const __m128i avg1 = _mm_avg_epu8(IXABCD, ABCD0); - const __m128i lsb = _mm_and_si128(_mm_xor_si128(IXABCD, ABCD0), one); - const __m128i avg2 = _mm_subs_epu8(avg1, lsb); - const __m128i efgh = _mm_avg_epu8(avg2, XABCD); - WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32( abcd )); - WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32( efgh )); - WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_slli_si128(abcd, 1))); - WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(_mm_slli_si128(efgh, 1))); - - // these two are hard to implement in SSE2, so we keep the C-version: - DST(0, 2) = AVG3(J, I, X); - DST(0, 3) = AVG3(K, J, I); -} - -static void VL4_SSE2(uint8_t* dst) { // Vertical-Left - const __m128i one = _mm_set1_epi8(1); - const __m128i ABCDEFGH = _mm_loadl_epi64((__m128i*)(dst - BPS)); - const __m128i BCDEFGH_ = _mm_srli_si128(ABCDEFGH, 1); - const __m128i CDEFGH__ = _mm_srli_si128(ABCDEFGH, 2); - const __m128i avg1 = _mm_avg_epu8(ABCDEFGH, BCDEFGH_); - const __m128i avg2 = _mm_avg_epu8(CDEFGH__, BCDEFGH_); - const __m128i avg3 = _mm_avg_epu8(avg1, avg2); - const __m128i lsb1 = _mm_and_si128(_mm_xor_si128(avg1, avg2), one); - const __m128i ab = _mm_xor_si128(ABCDEFGH, BCDEFGH_); - const __m128i bc = _mm_xor_si128(CDEFGH__, BCDEFGH_); - const __m128i abbc = _mm_or_si128(ab, bc); - const __m128i lsb2 = _mm_and_si128(abbc, lsb1); - const __m128i avg4 = _mm_subs_epu8(avg3, lsb2); - const uint32_t extra_out = _mm_cvtsi128_si32(_mm_srli_si128(avg4, 4)); - WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32( avg1 )); - WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32( avg4 )); - WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(avg1, 1))); - WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(avg4, 1))); - - // these two are hard to get and irregular - DST(3, 2) = (extra_out >> 0) & 0xff; - DST(3, 3) = (extra_out >> 8) & 0xff; -} - -static void RD4_SSE2(uint8_t* dst) { // Down-right - const __m128i one = _mm_set1_epi8(1); - const __m128i XABCD = _mm_loadl_epi64((__m128i*)(dst - BPS - 1)); - const __m128i ____XABCD = _mm_slli_si128(XABCD, 4); - const uint32_t I = dst[-1 + 0 * BPS]; - const uint32_t J = dst[-1 + 1 * BPS]; - const uint32_t K = dst[-1 + 2 * BPS]; - const uint32_t L = dst[-1 + 3 * BPS]; - const __m128i LKJI_____ = - _mm_cvtsi32_si128(L | (K << 8) | (J << 16) | (I << 24)); - const __m128i LKJIXABCD = _mm_or_si128(LKJI_____, ____XABCD); - const __m128i KJIXABCD_ = _mm_srli_si128(LKJIXABCD, 1); - const __m128i JIXABCD__ = _mm_srli_si128(LKJIXABCD, 2); - const __m128i avg1 = _mm_avg_epu8(JIXABCD__, LKJIXABCD); - const __m128i lsb = _mm_and_si128(_mm_xor_si128(JIXABCD__, LKJIXABCD), one); - const __m128i avg2 = _mm_subs_epu8(avg1, lsb); - const __m128i abcdefg = _mm_avg_epu8(avg2, KJIXABCD_); - WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32( abcdefg )); - WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 1))); - WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 2))); - WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 3))); -} - -#undef DST -#undef AVG3 - -//------------------------------------------------------------------------------ -// Luma 16x16 - -static WEBP_INLINE void TrueMotion_SSE2(uint8_t* dst, int size) { - const uint8_t* top = dst - BPS; - const __m128i zero = _mm_setzero_si128(); - int y; - if (size == 4) { - const __m128i top_values = _mm_cvtsi32_si128(WebPMemToUint32(top)); - const __m128i top_base = _mm_unpacklo_epi8(top_values, zero); - for (y = 0; y < 4; ++y, dst += BPS) { - const int val = dst[-1] - top[-1]; - const __m128i base = _mm_set1_epi16(val); - const __m128i out = _mm_packus_epi16(_mm_add_epi16(base, top_base), zero); - WebPUint32ToMem(dst, _mm_cvtsi128_si32(out)); - } - } else if (size == 8) { - const __m128i top_values = _mm_loadl_epi64((const __m128i*)top); - const __m128i top_base = _mm_unpacklo_epi8(top_values, zero); - for (y = 0; y < 8; ++y, dst += BPS) { - const int val = dst[-1] - top[-1]; - const __m128i base = _mm_set1_epi16(val); - const __m128i out = _mm_packus_epi16(_mm_add_epi16(base, top_base), zero); - _mm_storel_epi64((__m128i*)dst, out); - } - } else { - const __m128i top_values = _mm_loadu_si128((const __m128i*)top); - const __m128i top_base_0 = _mm_unpacklo_epi8(top_values, zero); - const __m128i top_base_1 = _mm_unpackhi_epi8(top_values, zero); - for (y = 0; y < 16; ++y, dst += BPS) { - const int val = dst[-1] - top[-1]; - const __m128i base = _mm_set1_epi16(val); - const __m128i out_0 = _mm_add_epi16(base, top_base_0); - const __m128i out_1 = _mm_add_epi16(base, top_base_1); - const __m128i out = _mm_packus_epi16(out_0, out_1); - _mm_storeu_si128((__m128i*)dst, out); - } - } -} - -static void TM4_SSE2(uint8_t* dst) { TrueMotion_SSE2(dst, 4); } -static void TM8uv_SSE2(uint8_t* dst) { TrueMotion_SSE2(dst, 8); } -static void TM16_SSE2(uint8_t* dst) { TrueMotion_SSE2(dst, 16); } - -static void VE16_SSE2(uint8_t* dst) { - const __m128i top = _mm_loadu_si128((const __m128i*)(dst - BPS)); - int j; - for (j = 0; j < 16; ++j) { - _mm_storeu_si128((__m128i*)(dst + j * BPS), top); - } -} - -static void HE16_SSE2(uint8_t* dst) { // horizontal - int j; - for (j = 16; j > 0; --j) { - const __m128i values = _mm_set1_epi8(dst[-1]); - _mm_storeu_si128((__m128i*)dst, values); - dst += BPS; - } -} - -static WEBP_INLINE void Put16_SSE2(uint8_t v, uint8_t* dst) { - int j; - const __m128i values = _mm_set1_epi8(v); - for (j = 0; j < 16; ++j) { - _mm_storeu_si128((__m128i*)(dst + j * BPS), values); - } -} - -static void DC16_SSE2(uint8_t* dst) { // DC - const __m128i zero = _mm_setzero_si128(); - const __m128i top = _mm_loadu_si128((const __m128i*)(dst - BPS)); - const __m128i sad8x2 = _mm_sad_epu8(top, zero); - // sum the two sads: sad8x2[0:1] + sad8x2[8:9] - const __m128i sum = _mm_add_epi16(sad8x2, _mm_shuffle_epi32(sad8x2, 2)); - int left = 0; - int j; - for (j = 0; j < 16; ++j) { - left += dst[-1 + j * BPS]; - } - { - const int DC = _mm_cvtsi128_si32(sum) + left + 16; - Put16_SSE2(DC >> 5, dst); - } -} - -static void DC16NoTop_SSE2(uint8_t* dst) { // DC with top samples unavailable - int DC = 8; - int j; - for (j = 0; j < 16; ++j) { - DC += dst[-1 + j * BPS]; - } - Put16_SSE2(DC >> 4, dst); -} - -static void DC16NoLeft_SSE2(uint8_t* dst) { // DC with left samples unavailable - const __m128i zero = _mm_setzero_si128(); - const __m128i top = _mm_loadu_si128((const __m128i*)(dst - BPS)); - const __m128i sad8x2 = _mm_sad_epu8(top, zero); - // sum the two sads: sad8x2[0:1] + sad8x2[8:9] - const __m128i sum = _mm_add_epi16(sad8x2, _mm_shuffle_epi32(sad8x2, 2)); - const int DC = _mm_cvtsi128_si32(sum) + 8; - Put16_SSE2(DC >> 4, dst); -} - -static void DC16NoTopLeft_SSE2(uint8_t* dst) { // DC with no top & left samples - Put16_SSE2(0x80, dst); -} - -//------------------------------------------------------------------------------ -// Chroma - -static void VE8uv_SSE2(uint8_t* dst) { // vertical - int j; - const __m128i top = _mm_loadl_epi64((const __m128i*)(dst - BPS)); - for (j = 0; j < 8; ++j) { - _mm_storel_epi64((__m128i*)(dst + j * BPS), top); - } -} - -// helper for chroma-DC predictions -static WEBP_INLINE void Put8x8uv_SSE2(uint8_t v, uint8_t* dst) { - int j; - const __m128i values = _mm_set1_epi8(v); - for (j = 0; j < 8; ++j) { - _mm_storel_epi64((__m128i*)(dst + j * BPS), values); - } -} - -static void DC8uv_SSE2(uint8_t* dst) { // DC - const __m128i zero = _mm_setzero_si128(); - const __m128i top = _mm_loadl_epi64((const __m128i*)(dst - BPS)); - const __m128i sum = _mm_sad_epu8(top, zero); - int left = 0; - int j; - for (j = 0; j < 8; ++j) { - left += dst[-1 + j * BPS]; - } - { - const int DC = _mm_cvtsi128_si32(sum) + left + 8; - Put8x8uv_SSE2(DC >> 4, dst); - } -} - -static void DC8uvNoLeft_SSE2(uint8_t* dst) { // DC with no left samples - const __m128i zero = _mm_setzero_si128(); - const __m128i top = _mm_loadl_epi64((const __m128i*)(dst - BPS)); - const __m128i sum = _mm_sad_epu8(top, zero); - const int DC = _mm_cvtsi128_si32(sum) + 4; - Put8x8uv_SSE2(DC >> 3, dst); -} - -static void DC8uvNoTop_SSE2(uint8_t* dst) { // DC with no top samples - int dc0 = 4; - int i; - for (i = 0; i < 8; ++i) { - dc0 += dst[-1 + i * BPS]; - } - Put8x8uv_SSE2(dc0 >> 3, dst); -} - -static void DC8uvNoTopLeft_SSE2(uint8_t* dst) { // DC with nothing - Put8x8uv_SSE2(0x80, dst); -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8DspInitSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitSSE2(void) { - VP8Transform = Transform_SSE2; -#if (USE_TRANSFORM_AC3 == 1) - VP8TransformAC3 = TransformAC3_SSE2; -#endif - - VP8VFilter16 = VFilter16_SSE2; - VP8HFilter16 = HFilter16_SSE2; - VP8VFilter8 = VFilter8_SSE2; - VP8HFilter8 = HFilter8_SSE2; - VP8VFilter16i = VFilter16i_SSE2; - VP8HFilter16i = HFilter16i_SSE2; - VP8VFilter8i = VFilter8i_SSE2; - VP8HFilter8i = HFilter8i_SSE2; - - VP8SimpleVFilter16 = SimpleVFilter16_SSE2; - VP8SimpleHFilter16 = SimpleHFilter16_SSE2; - VP8SimpleVFilter16i = SimpleVFilter16i_SSE2; - VP8SimpleHFilter16i = SimpleHFilter16i_SSE2; - - VP8PredLuma4[1] = TM4_SSE2; - VP8PredLuma4[2] = VE4_SSE2; - VP8PredLuma4[4] = RD4_SSE2; - VP8PredLuma4[5] = VR4_SSE2; - VP8PredLuma4[6] = LD4_SSE2; - VP8PredLuma4[7] = VL4_SSE2; - - VP8PredLuma16[0] = DC16_SSE2; - VP8PredLuma16[1] = TM16_SSE2; - VP8PredLuma16[2] = VE16_SSE2; - VP8PredLuma16[3] = HE16_SSE2; - VP8PredLuma16[4] = DC16NoTop_SSE2; - VP8PredLuma16[5] = DC16NoLeft_SSE2; - VP8PredLuma16[6] = DC16NoTopLeft_SSE2; - - VP8PredChroma8[0] = DC8uv_SSE2; - VP8PredChroma8[1] = TM8uv_SSE2; - VP8PredChroma8[2] = VE8uv_SSE2; - VP8PredChroma8[4] = DC8uvNoTop_SSE2; - VP8PredChroma8[5] = DC8uvNoLeft_SSE2; - VP8PredChroma8[6] = DC8uvNoTopLeft_SSE2; -} - -#else // !WEBP_USE_SSE2 - -WEBP_DSP_INIT_STUB(VP8DspInitSSE2) - -#endif // WEBP_USE_SSE2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_sse41.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_sse41.c deleted file mode 100644 index 26a2130..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dec_sse41.c +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE4 version of some decoding functions. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE41) - -#include -#include "src/dec/vp8i_dec.h" -#include "src/utils/utils.h" - -static void HE16_SSE41(uint8_t* dst) { // horizontal - int j; - const __m128i kShuffle3 = _mm_set1_epi8(3); - for (j = 16; j > 0; --j) { - const __m128i in = _mm_cvtsi32_si128(WebPMemToUint32(dst - 4)); - const __m128i values = _mm_shuffle_epi8(in, kShuffle3); - _mm_storeu_si128((__m128i*)dst, values); - dst += BPS; - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8DspInitSSE41(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitSSE41(void) { - VP8PredLuma16[3] = HE16_SSE41; -} - -#else // !WEBP_USE_SSE41 - -WEBP_DSP_INIT_STUB(VP8DspInitSSE41) - -#endif // WEBP_USE_SSE41 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dsp.h b/Dependencies/FreeImage/Source/LibWebP/src/dsp/dsp.h deleted file mode 100644 index adf7555..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/dsp.h +++ /dev/null @@ -1,682 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Speed-critical functions. -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_DSP_DSP_H_ -#define WEBP_DSP_DSP_H_ - -#ifdef HAVE_CONFIG_H -#include "src/webp/config.h" -#endif - -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define BPS 32 // this is the common stride for enc/dec - -//------------------------------------------------------------------------------ -// CPU detection - -#if defined(__GNUC__) -# define LOCAL_GCC_VERSION ((__GNUC__ << 8) | __GNUC_MINOR__) -# define LOCAL_GCC_PREREQ(maj, min) \ - (LOCAL_GCC_VERSION >= (((maj) << 8) | (min))) -#else -# define LOCAL_GCC_VERSION 0 -# define LOCAL_GCC_PREREQ(maj, min) 0 -#endif - -#if defined(__clang__) -# define LOCAL_CLANG_VERSION ((__clang_major__ << 8) | __clang_minor__) -# define LOCAL_CLANG_PREREQ(maj, min) \ - (LOCAL_CLANG_VERSION >= (((maj) << 8) | (min))) -#else -# define LOCAL_CLANG_VERSION 0 -# define LOCAL_CLANG_PREREQ(maj, min) 0 -#endif - -#ifndef __has_builtin -# define __has_builtin(x) 0 -#endif - -// for now, none of the optimizations below are available in emscripten -#if !defined(EMSCRIPTEN) - -#if defined(_MSC_VER) && _MSC_VER > 1310 && \ - (defined(_M_X64) || defined(_M_IX86)) -#define WEBP_MSC_SSE2 // Visual C++ SSE2 targets -#endif - -#if defined(_MSC_VER) && _MSC_VER >= 1500 && \ - (defined(_M_X64) || defined(_M_IX86)) -#define WEBP_MSC_SSE41 // Visual C++ SSE4.1 targets -#endif - -// WEBP_HAVE_* are used to indicate the presence of the instruction set in dsp -// files without intrinsics, allowing the corresponding Init() to be called. -// Files containing intrinsics will need to be built targeting the instruction -// set so should succeed on one of the earlier tests. -#if defined(__SSE2__) || defined(WEBP_MSC_SSE2) || defined(WEBP_HAVE_SSE2) -#define WEBP_USE_SSE2 -#endif - -#if defined(__SSE4_1__) || defined(WEBP_MSC_SSE41) || defined(WEBP_HAVE_SSE41) -#define WEBP_USE_SSE41 -#endif - -#if defined(__AVX2__) || defined(WEBP_HAVE_AVX2) -#define WEBP_USE_AVX2 -#endif - -// The intrinsics currently cause compiler errors with arm-nacl-gcc and the -// inline assembly would need to be modified for use with Native Client. -#if (defined(__ARM_NEON__) || \ - defined(__aarch64__) || defined(WEBP_HAVE_NEON)) && \ - !defined(__native_client__) -#define WEBP_USE_NEON -#endif - -#if !defined(WEBP_USE_NEON) && defined(__ANDROID__) && \ - defined(__ARM_ARCH_7A__) && defined(HAVE_CPU_FEATURES_H) -#define WEBP_ANDROID_NEON // Android targets that may have NEON -#define WEBP_USE_NEON -#endif - -#if defined(_MSC_VER) && _MSC_VER >= 1700 && defined(_M_ARM) -#define WEBP_USE_NEON -#define WEBP_USE_INTRINSICS -#endif - -#if defined(__mips__) && !defined(__mips64) && \ - defined(__mips_isa_rev) && (__mips_isa_rev >= 1) && (__mips_isa_rev < 6) -#define WEBP_USE_MIPS32 -#if (__mips_isa_rev >= 2) -#define WEBP_USE_MIPS32_R2 -#if defined(__mips_dspr2) || (defined(__mips_dsp_rev) && __mips_dsp_rev >= 2) -#define WEBP_USE_MIPS_DSP_R2 -#endif -#endif -#endif - -#if defined(__mips_msa) && defined(__mips_isa_rev) && (__mips_isa_rev >= 5) -#define WEBP_USE_MSA -#endif - -#endif /* EMSCRIPTEN */ - -#ifndef WEBP_DSP_OMIT_C_CODE -#define WEBP_DSP_OMIT_C_CODE 1 -#endif - -#if (defined(__aarch64__) || defined(__ARM_NEON__)) && WEBP_DSP_OMIT_C_CODE -#define WEBP_NEON_OMIT_C_CODE 1 -#else -#define WEBP_NEON_OMIT_C_CODE 0 -#endif - -#if !(LOCAL_CLANG_PREREQ(3,8) || LOCAL_GCC_PREREQ(4,8) || defined(__aarch64__)) -#define WEBP_NEON_WORK_AROUND_GCC 1 -#else -#define WEBP_NEON_WORK_AROUND_GCC 0 -#endif - -// This macro prevents thread_sanitizer from reporting known concurrent writes. -#define WEBP_TSAN_IGNORE_FUNCTION -#if defined(__has_feature) -#if __has_feature(thread_sanitizer) -#undef WEBP_TSAN_IGNORE_FUNCTION -#define WEBP_TSAN_IGNORE_FUNCTION __attribute__((no_sanitize_thread)) -#endif -#endif - -#if defined(WEBP_USE_THREAD) && !defined(_WIN32) -#include // NOLINT - -#define WEBP_DSP_INIT(func) do { \ - static volatile VP8CPUInfo func ## _last_cpuinfo_used = \ - (VP8CPUInfo)&func ## _last_cpuinfo_used; \ - static pthread_mutex_t func ## _lock = PTHREAD_MUTEX_INITIALIZER; \ - if (pthread_mutex_lock(&func ## _lock)) break; \ - if (func ## _last_cpuinfo_used != VP8GetCPUInfo) func(); \ - func ## _last_cpuinfo_used = VP8GetCPUInfo; \ - (void)pthread_mutex_unlock(&func ## _lock); \ -} while (0) -#else // !(defined(WEBP_USE_THREAD) && !defined(_WIN32)) -#define WEBP_DSP_INIT(func) do { \ - static volatile VP8CPUInfo func ## _last_cpuinfo_used = \ - (VP8CPUInfo)&func ## _last_cpuinfo_used; \ - if (func ## _last_cpuinfo_used == VP8GetCPUInfo) break; \ - func(); \ - func ## _last_cpuinfo_used = VP8GetCPUInfo; \ -} while (0) -#endif // defined(WEBP_USE_THREAD) && !defined(_WIN32) - -// Defines an Init + helper function that control multiple initialization of -// function pointers / tables. -/* Usage: - WEBP_DSP_INIT_FUNC(InitFunc) { - ...function body - } -*/ -#define WEBP_DSP_INIT_FUNC(name) \ - static WEBP_TSAN_IGNORE_FUNCTION void name ## _body(void); \ - WEBP_TSAN_IGNORE_FUNCTION void name(void) { \ - WEBP_DSP_INIT(name ## _body); \ - } \ - static WEBP_TSAN_IGNORE_FUNCTION void name ## _body(void) - -#define WEBP_UBSAN_IGNORE_UNDEF -#define WEBP_UBSAN_IGNORE_UNSIGNED_OVERFLOW -#if defined(__clang__) && defined(__has_attribute) -#if __has_attribute(no_sanitize) -// This macro prevents the undefined behavior sanitizer from reporting -// failures. This is only meant to silence unaligned loads on platforms that -// are known to support them. -#undef WEBP_UBSAN_IGNORE_UNDEF -#define WEBP_UBSAN_IGNORE_UNDEF \ - __attribute__((no_sanitize("undefined"))) - -// This macro prevents the undefined behavior sanitizer from reporting -// failures related to unsigned integer overflows. This is only meant to -// silence cases where this well defined behavior is expected. -#undef WEBP_UBSAN_IGNORE_UNSIGNED_OVERFLOW -#define WEBP_UBSAN_IGNORE_UNSIGNED_OVERFLOW \ - __attribute__((no_sanitize("unsigned-integer-overflow"))) -#endif -#endif - -// Regularize the definition of WEBP_SWAP_16BIT_CSP (backward compatibility) -#if !defined(WEBP_SWAP_16BIT_CSP) -#define WEBP_SWAP_16BIT_CSP 0 -#endif - -// some endian fix (e.g.: mips-gcc doesn't define __BIG_ENDIAN__) -#if !defined(WORDS_BIGENDIAN) && \ - (defined(__BIG_ENDIAN__) || defined(_M_PPC) || \ - (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))) -#define WORDS_BIGENDIAN -#endif - -typedef enum { - kSSE2, - kSSE3, - kSlowSSSE3, // special feature for slow SSSE3 architectures - kSSE4_1, - kAVX, - kAVX2, - kNEON, - kMIPS32, - kMIPSdspR2, - kMSA -} CPUFeature; -// returns true if the CPU supports the feature. -typedef int (*VP8CPUInfo)(CPUFeature feature); -WEBP_EXTERN VP8CPUInfo VP8GetCPUInfo; - -//------------------------------------------------------------------------------ -// Init stub generator - -// Defines an init function stub to ensure each module exposes a symbol, -// avoiding a compiler warning. -#define WEBP_DSP_INIT_STUB(func) \ - extern void func(void); \ - void func(void) {} - -//------------------------------------------------------------------------------ -// Encoding - -// Transforms -// VP8Idct: Does one of two inverse transforms. If do_two is set, the transforms -// will be done for (ref, in, dst) and (ref + 4, in + 16, dst + 4). -typedef void (*VP8Idct)(const uint8_t* ref, const int16_t* in, uint8_t* dst, - int do_two); -typedef void (*VP8Fdct)(const uint8_t* src, const uint8_t* ref, int16_t* out); -typedef void (*VP8WHT)(const int16_t* in, int16_t* out); -extern VP8Idct VP8ITransform; -extern VP8Fdct VP8FTransform; -extern VP8Fdct VP8FTransform2; // performs two transforms at a time -extern VP8WHT VP8FTransformWHT; -// Predictions -// *dst is the destination block. *top and *left can be NULL. -typedef void (*VP8IntraPreds)(uint8_t *dst, const uint8_t* left, - const uint8_t* top); -typedef void (*VP8Intra4Preds)(uint8_t *dst, const uint8_t* top); -extern VP8Intra4Preds VP8EncPredLuma4; -extern VP8IntraPreds VP8EncPredLuma16; -extern VP8IntraPreds VP8EncPredChroma8; - -typedef int (*VP8Metric)(const uint8_t* pix, const uint8_t* ref); -extern VP8Metric VP8SSE16x16, VP8SSE16x8, VP8SSE8x8, VP8SSE4x4; -typedef int (*VP8WMetric)(const uint8_t* pix, const uint8_t* ref, - const uint16_t* const weights); -// The weights for VP8TDisto4x4 and VP8TDisto16x16 contain a row-major -// 4 by 4 symmetric matrix. -extern VP8WMetric VP8TDisto4x4, VP8TDisto16x16; - -// Compute the average (DC) of four 4x4 blocks. -// Each sub-4x4 block #i sum is stored in dc[i]. -typedef void (*VP8MeanMetric)(const uint8_t* ref, uint32_t dc[4]); -extern VP8MeanMetric VP8Mean16x4; - -typedef void (*VP8BlockCopy)(const uint8_t* src, uint8_t* dst); -extern VP8BlockCopy VP8Copy4x4; -extern VP8BlockCopy VP8Copy16x8; -// Quantization -struct VP8Matrix; // forward declaration -typedef int (*VP8QuantizeBlock)(int16_t in[16], int16_t out[16], - const struct VP8Matrix* const mtx); -// Same as VP8QuantizeBlock, but quantizes two consecutive blocks. -typedef int (*VP8Quantize2Blocks)(int16_t in[32], int16_t out[32], - const struct VP8Matrix* const mtx); - -extern VP8QuantizeBlock VP8EncQuantizeBlock; -extern VP8Quantize2Blocks VP8EncQuantize2Blocks; - -// specific to 2nd transform: -typedef int (*VP8QuantizeBlockWHT)(int16_t in[16], int16_t out[16], - const struct VP8Matrix* const mtx); -extern VP8QuantizeBlockWHT VP8EncQuantizeBlockWHT; - -extern const int VP8DspScan[16 + 4 + 4]; - -// Collect histogram for susceptibility calculation. -#define MAX_COEFF_THRESH 31 // size of histogram used by CollectHistogram. -typedef struct { - // We only need to store max_value and last_non_zero, not the distribution. - int max_value; - int last_non_zero; -} VP8Histogram; -typedef void (*VP8CHisto)(const uint8_t* ref, const uint8_t* pred, - int start_block, int end_block, - VP8Histogram* const histo); -extern VP8CHisto VP8CollectHistogram; -// General-purpose util function to help VP8CollectHistogram(). -void VP8SetHistogramData(const int distribution[MAX_COEFF_THRESH + 1], - VP8Histogram* const histo); - -// must be called before using any of the above -void VP8EncDspInit(void); - -//------------------------------------------------------------------------------ -// cost functions (encoding) - -extern const uint16_t VP8EntropyCost[256]; // 8bit fixed-point log(p) -// approximate cost per level: -extern const uint16_t VP8LevelFixedCosts[2047 /*MAX_LEVEL*/ + 1]; -extern const uint8_t VP8EncBands[16 + 1]; - -struct VP8Residual; -typedef void (*VP8SetResidualCoeffsFunc)(const int16_t* const coeffs, - struct VP8Residual* const res); -extern VP8SetResidualCoeffsFunc VP8SetResidualCoeffs; - -// Cost calculation function. -typedef int (*VP8GetResidualCostFunc)(int ctx0, - const struct VP8Residual* const res); -extern VP8GetResidualCostFunc VP8GetResidualCost; - -// must be called before anything using the above -void VP8EncDspCostInit(void); - -//------------------------------------------------------------------------------ -// SSIM / PSNR utils - -// struct for accumulating statistical moments -typedef struct { - uint32_t w; // sum(w_i) : sum of weights - uint32_t xm, ym; // sum(w_i * x_i), sum(w_i * y_i) - uint32_t xxm, xym, yym; // sum(w_i * x_i * x_i), etc. -} VP8DistoStats; - -// Compute the final SSIM value -// The non-clipped version assumes stats->w = (2 * VP8_SSIM_KERNEL + 1)^2. -double VP8SSIMFromStats(const VP8DistoStats* const stats); -double VP8SSIMFromStatsClipped(const VP8DistoStats* const stats); - -#define VP8_SSIM_KERNEL 3 // total size of the kernel: 2 * VP8_SSIM_KERNEL + 1 -typedef double (*VP8SSIMGetClippedFunc)(const uint8_t* src1, int stride1, - const uint8_t* src2, int stride2, - int xo, int yo, // center position - int W, int H); // plane dimension - -#if !defined(WEBP_REDUCE_SIZE) -// This version is called with the guarantee that you can load 8 bytes and -// 8 rows at offset src1 and src2 -typedef double (*VP8SSIMGetFunc)(const uint8_t* src1, int stride1, - const uint8_t* src2, int stride2); - -extern VP8SSIMGetFunc VP8SSIMGet; // unclipped / unchecked -extern VP8SSIMGetClippedFunc VP8SSIMGetClipped; // with clipping -#endif - -#if !defined(WEBP_DISABLE_STATS) -typedef uint32_t (*VP8AccumulateSSEFunc)(const uint8_t* src1, - const uint8_t* src2, int len); -extern VP8AccumulateSSEFunc VP8AccumulateSSE; -#endif - -// must be called before using any of the above directly -void VP8SSIMDspInit(void); - -//------------------------------------------------------------------------------ -// Decoding - -typedef void (*VP8DecIdct)(const int16_t* coeffs, uint8_t* dst); -// when doing two transforms, coeffs is actually int16_t[2][16]. -typedef void (*VP8DecIdct2)(const int16_t* coeffs, uint8_t* dst, int do_two); -extern VP8DecIdct2 VP8Transform; -extern VP8DecIdct VP8TransformAC3; -extern VP8DecIdct VP8TransformUV; -extern VP8DecIdct VP8TransformDC; -extern VP8DecIdct VP8TransformDCUV; -extern VP8WHT VP8TransformWHT; - -// *dst is the destination block, with stride BPS. Boundary samples are -// assumed accessible when needed. -typedef void (*VP8PredFunc)(uint8_t* dst); -extern VP8PredFunc VP8PredLuma16[/* NUM_B_DC_MODES */]; -extern VP8PredFunc VP8PredChroma8[/* NUM_B_DC_MODES */]; -extern VP8PredFunc VP8PredLuma4[/* NUM_BMODES */]; - -// clipping tables (for filtering) -extern const int8_t* const VP8ksclip1; // clips [-1020, 1020] to [-128, 127] -extern const int8_t* const VP8ksclip2; // clips [-112, 112] to [-16, 15] -extern const uint8_t* const VP8kclip1; // clips [-255,511] to [0,255] -extern const uint8_t* const VP8kabs0; // abs(x) for x in [-255,255] -// must be called first -void VP8InitClipTables(void); - -// simple filter (only for luma) -typedef void (*VP8SimpleFilterFunc)(uint8_t* p, int stride, int thresh); -extern VP8SimpleFilterFunc VP8SimpleVFilter16; -extern VP8SimpleFilterFunc VP8SimpleHFilter16; -extern VP8SimpleFilterFunc VP8SimpleVFilter16i; // filter 3 inner edges -extern VP8SimpleFilterFunc VP8SimpleHFilter16i; - -// regular filter (on both macroblock edges and inner edges) -typedef void (*VP8LumaFilterFunc)(uint8_t* luma, int stride, - int thresh, int ithresh, int hev_t); -typedef void (*VP8ChromaFilterFunc)(uint8_t* u, uint8_t* v, int stride, - int thresh, int ithresh, int hev_t); -// on outer edge -extern VP8LumaFilterFunc VP8VFilter16; -extern VP8LumaFilterFunc VP8HFilter16; -extern VP8ChromaFilterFunc VP8VFilter8; -extern VP8ChromaFilterFunc VP8HFilter8; - -// on inner edge -extern VP8LumaFilterFunc VP8VFilter16i; // filtering 3 inner edges altogether -extern VP8LumaFilterFunc VP8HFilter16i; -extern VP8ChromaFilterFunc VP8VFilter8i; // filtering u and v altogether -extern VP8ChromaFilterFunc VP8HFilter8i; - -// Dithering. Combines dithering values (centered around 128) with dst[], -// according to: dst[] = clip(dst[] + (((dither[]-128) + 8) >> 4) -#define VP8_DITHER_DESCALE 4 -#define VP8_DITHER_DESCALE_ROUNDER (1 << (VP8_DITHER_DESCALE - 1)) -#define VP8_DITHER_AMP_BITS 7 -#define VP8_DITHER_AMP_CENTER (1 << VP8_DITHER_AMP_BITS) -extern void (*VP8DitherCombine8x8)(const uint8_t* dither, uint8_t* dst, - int dst_stride); - -// must be called before anything using the above -void VP8DspInit(void); - -//------------------------------------------------------------------------------ -// WebP I/O - -#define FANCY_UPSAMPLING // undefined to remove fancy upsampling support - -// Convert a pair of y/u/v lines together to the output rgb/a colorspace. -// bottom_y can be NULL if only one line of output is needed (at top/bottom). -typedef void (*WebPUpsampleLinePairFunc)( - const uint8_t* top_y, const uint8_t* bottom_y, - const uint8_t* top_u, const uint8_t* top_v, - const uint8_t* cur_u, const uint8_t* cur_v, - uint8_t* top_dst, uint8_t* bottom_dst, int len); - -#ifdef FANCY_UPSAMPLING - -// Fancy upsampling functions to convert YUV to RGB(A) modes -extern WebPUpsampleLinePairFunc WebPUpsamplers[/* MODE_LAST */]; - -#endif // FANCY_UPSAMPLING - -// Per-row point-sampling methods. -typedef void (*WebPSamplerRowFunc)(const uint8_t* y, - const uint8_t* u, const uint8_t* v, - uint8_t* dst, int len); -// Generic function to apply 'WebPSamplerRowFunc' to the whole plane: -void WebPSamplerProcessPlane(const uint8_t* y, int y_stride, - const uint8_t* u, const uint8_t* v, int uv_stride, - uint8_t* dst, int dst_stride, - int width, int height, WebPSamplerRowFunc func); - -// Sampling functions to convert rows of YUV to RGB(A) -extern WebPSamplerRowFunc WebPSamplers[/* MODE_LAST */]; - -// General function for converting two lines of ARGB or RGBA. -// 'alpha_is_last' should be true if 0xff000000 is stored in memory as -// as 0x00, 0x00, 0x00, 0xff (little endian). -WebPUpsampleLinePairFunc WebPGetLinePairConverter(int alpha_is_last); - -// YUV444->RGB converters -typedef void (*WebPYUV444Converter)(const uint8_t* y, - const uint8_t* u, const uint8_t* v, - uint8_t* dst, int len); - -extern WebPYUV444Converter WebPYUV444Converters[/* MODE_LAST */]; - -// Must be called before using the WebPUpsamplers[] (and for premultiplied -// colorspaces like rgbA, rgbA4444, etc) -void WebPInitUpsamplers(void); -// Must be called before using WebPSamplers[] -void WebPInitSamplers(void); -// Must be called before using WebPYUV444Converters[] -void WebPInitYUV444Converters(void); - -//------------------------------------------------------------------------------ -// ARGB -> YUV converters - -// Convert ARGB samples to luma Y. -extern void (*WebPConvertARGBToY)(const uint32_t* argb, uint8_t* y, int width); -// Convert ARGB samples to U/V with downsampling. do_store should be '1' for -// even lines and '0' for odd ones. 'src_width' is the original width, not -// the U/V one. -extern void (*WebPConvertARGBToUV)(const uint32_t* argb, uint8_t* u, uint8_t* v, - int src_width, int do_store); - -// Convert a row of accumulated (four-values) of rgba32 toward U/V -extern void (*WebPConvertRGBA32ToUV)(const uint16_t* rgb, - uint8_t* u, uint8_t* v, int width); - -// Convert RGB or BGR to Y -extern void (*WebPConvertRGB24ToY)(const uint8_t* rgb, uint8_t* y, int width); -extern void (*WebPConvertBGR24ToY)(const uint8_t* bgr, uint8_t* y, int width); - -// used for plain-C fallback. -extern void WebPConvertARGBToUV_C(const uint32_t* argb, uint8_t* u, uint8_t* v, - int src_width, int do_store); -extern void WebPConvertRGBA32ToUV_C(const uint16_t* rgb, - uint8_t* u, uint8_t* v, int width); - -// utilities for accurate RGB->YUV conversion -extern uint64_t (*WebPSharpYUVUpdateY)(const uint16_t* src, const uint16_t* ref, - uint16_t* dst, int len); -extern void (*WebPSharpYUVUpdateRGB)(const int16_t* src, const int16_t* ref, - int16_t* dst, int len); -extern void (*WebPSharpYUVFilterRow)(const int16_t* A, const int16_t* B, - int len, - const uint16_t* best_y, uint16_t* out); - -// Must be called before using the above. -void WebPInitConvertARGBToYUV(void); - -//------------------------------------------------------------------------------ -// Rescaler - -struct WebPRescaler; - -// Import a row of data and save its contribution in the rescaler. -// 'channel' denotes the channel number to be imported. 'Expand' corresponds to -// the wrk->x_expand case. Otherwise, 'Shrink' is to be used. -typedef void (*WebPRescalerImportRowFunc)(struct WebPRescaler* const wrk, - const uint8_t* src); - -extern WebPRescalerImportRowFunc WebPRescalerImportRowExpand; -extern WebPRescalerImportRowFunc WebPRescalerImportRowShrink; - -// Export one row (starting at x_out position) from rescaler. -// 'Expand' corresponds to the wrk->y_expand case. -// Otherwise 'Shrink' is to be used -typedef void (*WebPRescalerExportRowFunc)(struct WebPRescaler* const wrk); -extern WebPRescalerExportRowFunc WebPRescalerExportRowExpand; -extern WebPRescalerExportRowFunc WebPRescalerExportRowShrink; - -// Plain-C implementation, as fall-back. -extern void WebPRescalerImportRowExpand_C(struct WebPRescaler* const wrk, - const uint8_t* src); -extern void WebPRescalerImportRowShrink_C(struct WebPRescaler* const wrk, - const uint8_t* src); -extern void WebPRescalerExportRowExpand_C(struct WebPRescaler* const wrk); -extern void WebPRescalerExportRowShrink_C(struct WebPRescaler* const wrk); - -// Main entry calls: -extern void WebPRescalerImportRow(struct WebPRescaler* const wrk, - const uint8_t* src); -// Export one row (starting at x_out position) from rescaler. -extern void WebPRescalerExportRow(struct WebPRescaler* const wrk); - -// Must be called first before using the above. -void WebPRescalerDspInit(void); - -//------------------------------------------------------------------------------ -// Utilities for processing transparent channel. - -// Apply alpha pre-multiply on an rgba, bgra or argb plane of size w * h. -// alpha_first should be 0 for argb, 1 for rgba or bgra (where alpha is last). -extern void (*WebPApplyAlphaMultiply)( - uint8_t* rgba, int alpha_first, int w, int h, int stride); - -// Same, buf specifically for RGBA4444 format -extern void (*WebPApplyAlphaMultiply4444)( - uint8_t* rgba4444, int w, int h, int stride); - -// Dispatch the values from alpha[] plane to the ARGB destination 'dst'. -// Returns true if alpha[] plane has non-trivial values different from 0xff. -extern int (*WebPDispatchAlpha)(const uint8_t* alpha, int alpha_stride, - int width, int height, - uint8_t* dst, int dst_stride); - -// Transfer packed 8b alpha[] values to green channel in dst[], zero'ing the -// A/R/B values. 'dst_stride' is the stride for dst[] in uint32_t units. -extern void (*WebPDispatchAlphaToGreen)(const uint8_t* alpha, int alpha_stride, - int width, int height, - uint32_t* dst, int dst_stride); - -// Extract the alpha values from 32b values in argb[] and pack them into alpha[] -// (this is the opposite of WebPDispatchAlpha). -// Returns true if there's only trivial 0xff alpha values. -extern int (*WebPExtractAlpha)(const uint8_t* argb, int argb_stride, - int width, int height, - uint8_t* alpha, int alpha_stride); - -// Extract the green values from 32b values in argb[] and pack them into alpha[] -// (this is the opposite of WebPDispatchAlphaToGreen). -extern void (*WebPExtractGreen)(const uint32_t* argb, uint8_t* alpha, int size); - -// Pre-Multiply operation transforms x into x * A / 255 (where x=Y,R,G or B). -// Un-Multiply operation transforms x into x * 255 / A. - -// Pre-Multiply or Un-Multiply (if 'inverse' is true) argb values in a row. -extern void (*WebPMultARGBRow)(uint32_t* const ptr, int width, int inverse); - -// Same a WebPMultARGBRow(), but for several rows. -void WebPMultARGBRows(uint8_t* ptr, int stride, int width, int num_rows, - int inverse); - -// Same for a row of single values, with side alpha values. -extern void (*WebPMultRow)(uint8_t* const ptr, const uint8_t* const alpha, - int width, int inverse); - -// Same a WebPMultRow(), but for several 'num_rows' rows. -void WebPMultRows(uint8_t* ptr, int stride, - const uint8_t* alpha, int alpha_stride, - int width, int num_rows, int inverse); - -// Plain-C versions, used as fallback by some implementations. -void WebPMultRow_C(uint8_t* const ptr, const uint8_t* const alpha, - int width, int inverse); -void WebPMultARGBRow_C(uint32_t* const ptr, int width, int inverse); - -#ifdef WORDS_BIGENDIAN -// ARGB packing function: a/r/g/b input is rgba or bgra order. -extern void (*WebPPackARGB)(const uint8_t* a, const uint8_t* r, - const uint8_t* g, const uint8_t* b, int len, - uint32_t* out); -#endif - -// RGB packing function. 'step' can be 3 or 4. r/g/b input is rgb or bgr order. -extern void (*WebPPackRGB)(const uint8_t* r, const uint8_t* g, const uint8_t* b, - int len, int step, uint32_t* out); - -// This function returns true if src[i] contains a value different from 0xff. -extern int (*WebPHasAlpha8b)(const uint8_t* src, int length); -// This function returns true if src[4*i] contains a value different from 0xff. -extern int (*WebPHasAlpha32b)(const uint8_t* src, int length); - -// To be called first before using the above. -void WebPInitAlphaProcessing(void); - -//------------------------------------------------------------------------------ -// Filter functions - -typedef enum { // Filter types. - WEBP_FILTER_NONE = 0, - WEBP_FILTER_HORIZONTAL, - WEBP_FILTER_VERTICAL, - WEBP_FILTER_GRADIENT, - WEBP_FILTER_LAST = WEBP_FILTER_GRADIENT + 1, // end marker - WEBP_FILTER_BEST, // meta-types - WEBP_FILTER_FAST -} WEBP_FILTER_TYPE; - -typedef void (*WebPFilterFunc)(const uint8_t* in, int width, int height, - int stride, uint8_t* out); -// In-place un-filtering. -// Warning! 'prev_line' pointer can be equal to 'cur_line' or 'preds'. -typedef void (*WebPUnfilterFunc)(const uint8_t* prev_line, const uint8_t* preds, - uint8_t* cur_line, int width); - -// Filter the given data using the given predictor. -// 'in' corresponds to a 2-dimensional pixel array of size (stride * height) -// in raster order. -// 'stride' is number of bytes per scan line (with possible padding). -// 'out' should be pre-allocated. -extern WebPFilterFunc WebPFilters[WEBP_FILTER_LAST]; - -// In-place reconstruct the original data from the given filtered data. -// The reconstruction will be done for 'num_rows' rows starting from 'row' -// (assuming rows upto 'row - 1' are already reconstructed). -extern WebPUnfilterFunc WebPUnfilters[WEBP_FILTER_LAST]; - -// To be called first before using the above. -void VP8FiltersInit(void); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_DSP_DSP_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc.c deleted file mode 100644 index 2ff7f53..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc.c +++ /dev/null @@ -1,836 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Speed-critical encoding functions. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include // for abs() - -#include "src/dsp/dsp.h" -#include "src/enc/vp8i_enc.h" - -static WEBP_INLINE uint8_t clip_8b(int v) { - return (!(v & ~0xff)) ? v : (v < 0) ? 0 : 255; -} - -#if !WEBP_NEON_OMIT_C_CODE -static WEBP_INLINE int clip_max(int v, int max) { - return (v > max) ? max : v; -} -#endif // !WEBP_NEON_OMIT_C_CODE - -//------------------------------------------------------------------------------ -// Compute susceptibility based on DCT-coeff histograms: -// the higher, the "easier" the macroblock is to compress. - -const int VP8DspScan[16 + 4 + 4] = { - // Luma - 0 + 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS, - 0 + 4 * BPS, 4 + 4 * BPS, 8 + 4 * BPS, 12 + 4 * BPS, - 0 + 8 * BPS, 4 + 8 * BPS, 8 + 8 * BPS, 12 + 8 * BPS, - 0 + 12 * BPS, 4 + 12 * BPS, 8 + 12 * BPS, 12 + 12 * BPS, - - 0 + 0 * BPS, 4 + 0 * BPS, 0 + 4 * BPS, 4 + 4 * BPS, // U - 8 + 0 * BPS, 12 + 0 * BPS, 8 + 4 * BPS, 12 + 4 * BPS // V -}; - -// general-purpose util function -void VP8SetHistogramData(const int distribution[MAX_COEFF_THRESH + 1], - VP8Histogram* const histo) { - int max_value = 0, last_non_zero = 1; - int k; - for (k = 0; k <= MAX_COEFF_THRESH; ++k) { - const int value = distribution[k]; - if (value > 0) { - if (value > max_value) max_value = value; - last_non_zero = k; - } - } - histo->max_value = max_value; - histo->last_non_zero = last_non_zero; -} - -#if !WEBP_NEON_OMIT_C_CODE -static void CollectHistogram_C(const uint8_t* ref, const uint8_t* pred, - int start_block, int end_block, - VP8Histogram* const histo) { - int j; - int distribution[MAX_COEFF_THRESH + 1] = { 0 }; - for (j = start_block; j < end_block; ++j) { - int k; - int16_t out[16]; - - VP8FTransform(ref + VP8DspScan[j], pred + VP8DspScan[j], out); - - // Convert coefficients to bin. - for (k = 0; k < 16; ++k) { - const int v = abs(out[k]) >> 3; - const int clipped_value = clip_max(v, MAX_COEFF_THRESH); - ++distribution[clipped_value]; - } - } - VP8SetHistogramData(distribution, histo); -} -#endif // !WEBP_NEON_OMIT_C_CODE - -//------------------------------------------------------------------------------ -// run-time tables (~4k) - -static uint8_t clip1[255 + 510 + 1]; // clips [-255,510] to [0,255] - -// We declare this variable 'volatile' to prevent instruction reordering -// and make sure it's set to true _last_ (so as to be thread-safe) -static volatile int tables_ok = 0; - -static WEBP_TSAN_IGNORE_FUNCTION void InitTables(void) { - if (!tables_ok) { - int i; - for (i = -255; i <= 255 + 255; ++i) { - clip1[255 + i] = clip_8b(i); - } - tables_ok = 1; - } -} - - -//------------------------------------------------------------------------------ -// Transforms (Paragraph 14.4) - -#if !WEBP_NEON_OMIT_C_CODE - -#define STORE(x, y, v) \ - dst[(x) + (y) * BPS] = clip_8b(ref[(x) + (y) * BPS] + ((v) >> 3)) - -static const int kC1 = 20091 + (1 << 16); -static const int kC2 = 35468; -#define MUL(a, b) (((a) * (b)) >> 16) - -static WEBP_INLINE void ITransformOne(const uint8_t* ref, const int16_t* in, - uint8_t* dst) { - int C[4 * 4], *tmp; - int i; - tmp = C; - for (i = 0; i < 4; ++i) { // vertical pass - const int a = in[0] + in[8]; - const int b = in[0] - in[8]; - const int c = MUL(in[4], kC2) - MUL(in[12], kC1); - const int d = MUL(in[4], kC1) + MUL(in[12], kC2); - tmp[0] = a + d; - tmp[1] = b + c; - tmp[2] = b - c; - tmp[3] = a - d; - tmp += 4; - in++; - } - - tmp = C; - for (i = 0; i < 4; ++i) { // horizontal pass - const int dc = tmp[0] + 4; - const int a = dc + tmp[8]; - const int b = dc - tmp[8]; - const int c = MUL(tmp[4], kC2) - MUL(tmp[12], kC1); - const int d = MUL(tmp[4], kC1) + MUL(tmp[12], kC2); - STORE(0, i, a + d); - STORE(1, i, b + c); - STORE(2, i, b - c); - STORE(3, i, a - d); - tmp++; - } -} - -static void ITransform_C(const uint8_t* ref, const int16_t* in, uint8_t* dst, - int do_two) { - ITransformOne(ref, in, dst); - if (do_two) { - ITransformOne(ref + 4, in + 16, dst + 4); - } -} - -static void FTransform_C(const uint8_t* src, const uint8_t* ref, int16_t* out) { - int i; - int tmp[16]; - for (i = 0; i < 4; ++i, src += BPS, ref += BPS) { - const int d0 = src[0] - ref[0]; // 9bit dynamic range ([-255,255]) - const int d1 = src[1] - ref[1]; - const int d2 = src[2] - ref[2]; - const int d3 = src[3] - ref[3]; - const int a0 = (d0 + d3); // 10b [-510,510] - const int a1 = (d1 + d2); - const int a2 = (d1 - d2); - const int a3 = (d0 - d3); - tmp[0 + i * 4] = (a0 + a1) * 8; // 14b [-8160,8160] - tmp[1 + i * 4] = (a2 * 2217 + a3 * 5352 + 1812) >> 9; // [-7536,7542] - tmp[2 + i * 4] = (a0 - a1) * 8; - tmp[3 + i * 4] = (a3 * 2217 - a2 * 5352 + 937) >> 9; - } - for (i = 0; i < 4; ++i) { - const int a0 = (tmp[0 + i] + tmp[12 + i]); // 15b - const int a1 = (tmp[4 + i] + tmp[ 8 + i]); - const int a2 = (tmp[4 + i] - tmp[ 8 + i]); - const int a3 = (tmp[0 + i] - tmp[12 + i]); - out[0 + i] = (a0 + a1 + 7) >> 4; // 12b - out[4 + i] = ((a2 * 2217 + a3 * 5352 + 12000) >> 16) + (a3 != 0); - out[8 + i] = (a0 - a1 + 7) >> 4; - out[12+ i] = ((a3 * 2217 - a2 * 5352 + 51000) >> 16); - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -static void FTransform2_C(const uint8_t* src, const uint8_t* ref, - int16_t* out) { - VP8FTransform(src, ref, out); - VP8FTransform(src + 4, ref + 4, out + 16); -} - -#if !WEBP_NEON_OMIT_C_CODE -static void FTransformWHT_C(const int16_t* in, int16_t* out) { - // input is 12b signed - int32_t tmp[16]; - int i; - for (i = 0; i < 4; ++i, in += 64) { - const int a0 = (in[0 * 16] + in[2 * 16]); // 13b - const int a1 = (in[1 * 16] + in[3 * 16]); - const int a2 = (in[1 * 16] - in[3 * 16]); - const int a3 = (in[0 * 16] - in[2 * 16]); - tmp[0 + i * 4] = a0 + a1; // 14b - tmp[1 + i * 4] = a3 + a2; - tmp[2 + i * 4] = a3 - a2; - tmp[3 + i * 4] = a0 - a1; - } - for (i = 0; i < 4; ++i) { - const int a0 = (tmp[0 + i] + tmp[8 + i]); // 15b - const int a1 = (tmp[4 + i] + tmp[12+ i]); - const int a2 = (tmp[4 + i] - tmp[12+ i]); - const int a3 = (tmp[0 + i] - tmp[8 + i]); - const int b0 = a0 + a1; // 16b - const int b1 = a3 + a2; - const int b2 = a3 - a2; - const int b3 = a0 - a1; - out[ 0 + i] = b0 >> 1; // 15b - out[ 4 + i] = b1 >> 1; - out[ 8 + i] = b2 >> 1; - out[12 + i] = b3 >> 1; - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -#undef MUL -#undef STORE - -//------------------------------------------------------------------------------ -// Intra predictions - -static WEBP_INLINE void Fill(uint8_t* dst, int value, int size) { - int j; - for (j = 0; j < size; ++j) { - memset(dst + j * BPS, value, size); - } -} - -static WEBP_INLINE void VerticalPred(uint8_t* dst, - const uint8_t* top, int size) { - int j; - if (top != NULL) { - for (j = 0; j < size; ++j) memcpy(dst + j * BPS, top, size); - } else { - Fill(dst, 127, size); - } -} - -static WEBP_INLINE void HorizontalPred(uint8_t* dst, - const uint8_t* left, int size) { - if (left != NULL) { - int j; - for (j = 0; j < size; ++j) { - memset(dst + j * BPS, left[j], size); - } - } else { - Fill(dst, 129, size); - } -} - -static WEBP_INLINE void TrueMotion(uint8_t* dst, const uint8_t* left, - const uint8_t* top, int size) { - int y; - if (left != NULL) { - if (top != NULL) { - const uint8_t* const clip = clip1 + 255 - left[-1]; - for (y = 0; y < size; ++y) { - const uint8_t* const clip_table = clip + left[y]; - int x; - for (x = 0; x < size; ++x) { - dst[x] = clip_table[top[x]]; - } - dst += BPS; - } - } else { - HorizontalPred(dst, left, size); - } - } else { - // true motion without left samples (hence: with default 129 value) - // is equivalent to VE prediction where you just copy the top samples. - // Note that if top samples are not available, the default value is - // then 129, and not 127 as in the VerticalPred case. - if (top != NULL) { - VerticalPred(dst, top, size); - } else { - Fill(dst, 129, size); - } - } -} - -static WEBP_INLINE void DCMode(uint8_t* dst, const uint8_t* left, - const uint8_t* top, - int size, int round, int shift) { - int DC = 0; - int j; - if (top != NULL) { - for (j = 0; j < size; ++j) DC += top[j]; - if (left != NULL) { // top and left present - for (j = 0; j < size; ++j) DC += left[j]; - } else { // top, but no left - DC += DC; - } - DC = (DC + round) >> shift; - } else if (left != NULL) { // left but no top - for (j = 0; j < size; ++j) DC += left[j]; - DC += DC; - DC = (DC + round) >> shift; - } else { // no top, no left, nothing. - DC = 0x80; - } - Fill(dst, DC, size); -} - -//------------------------------------------------------------------------------ -// Chroma 8x8 prediction (paragraph 12.2) - -static void IntraChromaPreds_C(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - // U block - DCMode(C8DC8 + dst, left, top, 8, 8, 4); - VerticalPred(C8VE8 + dst, top, 8); - HorizontalPred(C8HE8 + dst, left, 8); - TrueMotion(C8TM8 + dst, left, top, 8); - // V block - dst += 8; - if (top != NULL) top += 8; - if (left != NULL) left += 16; - DCMode(C8DC8 + dst, left, top, 8, 8, 4); - VerticalPred(C8VE8 + dst, top, 8); - HorizontalPred(C8HE8 + dst, left, 8); - TrueMotion(C8TM8 + dst, left, top, 8); -} - -//------------------------------------------------------------------------------ -// luma 16x16 prediction (paragraph 12.3) - -static void Intra16Preds_C(uint8_t* dst, - const uint8_t* left, const uint8_t* top) { - DCMode(I16DC16 + dst, left, top, 16, 16, 5); - VerticalPred(I16VE16 + dst, top, 16); - HorizontalPred(I16HE16 + dst, left, 16); - TrueMotion(I16TM16 + dst, left, top, 16); -} - -//------------------------------------------------------------------------------ -// luma 4x4 prediction - -#define DST(x, y) dst[(x) + (y) * BPS] -#define AVG3(a, b, c) ((uint8_t)(((a) + 2 * (b) + (c) + 2) >> 2)) -#define AVG2(a, b) (((a) + (b) + 1) >> 1) - -static void VE4(uint8_t* dst, const uint8_t* top) { // vertical - const uint8_t vals[4] = { - AVG3(top[-1], top[0], top[1]), - AVG3(top[ 0], top[1], top[2]), - AVG3(top[ 1], top[2], top[3]), - AVG3(top[ 2], top[3], top[4]) - }; - int i; - for (i = 0; i < 4; ++i) { - memcpy(dst + i * BPS, vals, 4); - } -} - -static void HE4(uint8_t* dst, const uint8_t* top) { // horizontal - const int X = top[-1]; - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int L = top[-5]; - WebPUint32ToMem(dst + 0 * BPS, 0x01010101U * AVG3(X, I, J)); - WebPUint32ToMem(dst + 1 * BPS, 0x01010101U * AVG3(I, J, K)); - WebPUint32ToMem(dst + 2 * BPS, 0x01010101U * AVG3(J, K, L)); - WebPUint32ToMem(dst + 3 * BPS, 0x01010101U * AVG3(K, L, L)); -} - -static void DC4(uint8_t* dst, const uint8_t* top) { - uint32_t dc = 4; - int i; - for (i = 0; i < 4; ++i) dc += top[i] + top[-5 + i]; - Fill(dst, dc >> 3, 4); -} - -static void RD4(uint8_t* dst, const uint8_t* top) { - const int X = top[-1]; - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int L = top[-5]; - const int A = top[0]; - const int B = top[1]; - const int C = top[2]; - const int D = top[3]; - DST(0, 3) = AVG3(J, K, L); - DST(0, 2) = DST(1, 3) = AVG3(I, J, K); - DST(0, 1) = DST(1, 2) = DST(2, 3) = AVG3(X, I, J); - DST(0, 0) = DST(1, 1) = DST(2, 2) = DST(3, 3) = AVG3(A, X, I); - DST(1, 0) = DST(2, 1) = DST(3, 2) = AVG3(B, A, X); - DST(2, 0) = DST(3, 1) = AVG3(C, B, A); - DST(3, 0) = AVG3(D, C, B); -} - -static void LD4(uint8_t* dst, const uint8_t* top) { - const int A = top[0]; - const int B = top[1]; - const int C = top[2]; - const int D = top[3]; - const int E = top[4]; - const int F = top[5]; - const int G = top[6]; - const int H = top[7]; - DST(0, 0) = AVG3(A, B, C); - DST(1, 0) = DST(0, 1) = AVG3(B, C, D); - DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E); - DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F); - DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G); - DST(3, 2) = DST(2, 3) = AVG3(F, G, H); - DST(3, 3) = AVG3(G, H, H); -} - -static void VR4(uint8_t* dst, const uint8_t* top) { - const int X = top[-1]; - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int A = top[0]; - const int B = top[1]; - const int C = top[2]; - const int D = top[3]; - DST(0, 0) = DST(1, 2) = AVG2(X, A); - DST(1, 0) = DST(2, 2) = AVG2(A, B); - DST(2, 0) = DST(3, 2) = AVG2(B, C); - DST(3, 0) = AVG2(C, D); - - DST(0, 3) = AVG3(K, J, I); - DST(0, 2) = AVG3(J, I, X); - DST(0, 1) = DST(1, 3) = AVG3(I, X, A); - DST(1, 1) = DST(2, 3) = AVG3(X, A, B); - DST(2, 1) = DST(3, 3) = AVG3(A, B, C); - DST(3, 1) = AVG3(B, C, D); -} - -static void VL4(uint8_t* dst, const uint8_t* top) { - const int A = top[0]; - const int B = top[1]; - const int C = top[2]; - const int D = top[3]; - const int E = top[4]; - const int F = top[5]; - const int G = top[6]; - const int H = top[7]; - DST(0, 0) = AVG2(A, B); - DST(1, 0) = DST(0, 2) = AVG2(B, C); - DST(2, 0) = DST(1, 2) = AVG2(C, D); - DST(3, 0) = DST(2, 2) = AVG2(D, E); - - DST(0, 1) = AVG3(A, B, C); - DST(1, 1) = DST(0, 3) = AVG3(B, C, D); - DST(2, 1) = DST(1, 3) = AVG3(C, D, E); - DST(3, 1) = DST(2, 3) = AVG3(D, E, F); - DST(3, 2) = AVG3(E, F, G); - DST(3, 3) = AVG3(F, G, H); -} - -static void HU4(uint8_t* dst, const uint8_t* top) { - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int L = top[-5]; - DST(0, 0) = AVG2(I, J); - DST(2, 0) = DST(0, 1) = AVG2(J, K); - DST(2, 1) = DST(0, 2) = AVG2(K, L); - DST(1, 0) = AVG3(I, J, K); - DST(3, 0) = DST(1, 1) = AVG3(J, K, L); - DST(3, 1) = DST(1, 2) = AVG3(K, L, L); - DST(3, 2) = DST(2, 2) = - DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L; -} - -static void HD4(uint8_t* dst, const uint8_t* top) { - const int X = top[-1]; - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int L = top[-5]; - const int A = top[0]; - const int B = top[1]; - const int C = top[2]; - - DST(0, 0) = DST(2, 1) = AVG2(I, X); - DST(0, 1) = DST(2, 2) = AVG2(J, I); - DST(0, 2) = DST(2, 3) = AVG2(K, J); - DST(0, 3) = AVG2(L, K); - - DST(3, 0) = AVG3(A, B, C); - DST(2, 0) = AVG3(X, A, B); - DST(1, 0) = DST(3, 1) = AVG3(I, X, A); - DST(1, 1) = DST(3, 2) = AVG3(J, I, X); - DST(1, 2) = DST(3, 3) = AVG3(K, J, I); - DST(1, 3) = AVG3(L, K, J); -} - -static void TM4(uint8_t* dst, const uint8_t* top) { - int x, y; - const uint8_t* const clip = clip1 + 255 - top[-1]; - for (y = 0; y < 4; ++y) { - const uint8_t* const clip_table = clip + top[-2 - y]; - for (x = 0; x < 4; ++x) { - dst[x] = clip_table[top[x]]; - } - dst += BPS; - } -} - -#undef DST -#undef AVG3 -#undef AVG2 - -// Left samples are top[-5 .. -2], top_left is top[-1], top are -// located at top[0..3], and top right is top[4..7] -static void Intra4Preds_C(uint8_t* dst, const uint8_t* top) { - DC4(I4DC4 + dst, top); - TM4(I4TM4 + dst, top); - VE4(I4VE4 + dst, top); - HE4(I4HE4 + dst, top); - RD4(I4RD4 + dst, top); - VR4(I4VR4 + dst, top); - LD4(I4LD4 + dst, top); - VL4(I4VL4 + dst, top); - HD4(I4HD4 + dst, top); - HU4(I4HU4 + dst, top); -} - -//------------------------------------------------------------------------------ -// Metric - -#if !WEBP_NEON_OMIT_C_CODE -static WEBP_INLINE int GetSSE(const uint8_t* a, const uint8_t* b, - int w, int h) { - int count = 0; - int y, x; - for (y = 0; y < h; ++y) { - for (x = 0; x < w; ++x) { - const int diff = (int)a[x] - b[x]; - count += diff * diff; - } - a += BPS; - b += BPS; - } - return count; -} - -static int SSE16x16_C(const uint8_t* a, const uint8_t* b) { - return GetSSE(a, b, 16, 16); -} -static int SSE16x8_C(const uint8_t* a, const uint8_t* b) { - return GetSSE(a, b, 16, 8); -} -static int SSE8x8_C(const uint8_t* a, const uint8_t* b) { - return GetSSE(a, b, 8, 8); -} -static int SSE4x4_C(const uint8_t* a, const uint8_t* b) { - return GetSSE(a, b, 4, 4); -} -#endif // !WEBP_NEON_OMIT_C_CODE - -static void Mean16x4_C(const uint8_t* ref, uint32_t dc[4]) { - int k, x, y; - for (k = 0; k < 4; ++k) { - uint32_t avg = 0; - for (y = 0; y < 4; ++y) { - for (x = 0; x < 4; ++x) { - avg += ref[x + y * BPS]; - } - } - dc[k] = avg; - ref += 4; // go to next 4x4 block. - } -} - -//------------------------------------------------------------------------------ -// Texture distortion -// -// We try to match the spectral content (weighted) between source and -// reconstructed samples. - -#if !WEBP_NEON_OMIT_C_CODE -// Hadamard transform -// Returns the weighted sum of the absolute value of transformed coefficients. -// w[] contains a row-major 4 by 4 symmetric matrix. -static int TTransform(const uint8_t* in, const uint16_t* w) { - int sum = 0; - int tmp[16]; - int i; - // horizontal pass - for (i = 0; i < 4; ++i, in += BPS) { - const int a0 = in[0] + in[2]; - const int a1 = in[1] + in[3]; - const int a2 = in[1] - in[3]; - const int a3 = in[0] - in[2]; - tmp[0 + i * 4] = a0 + a1; - tmp[1 + i * 4] = a3 + a2; - tmp[2 + i * 4] = a3 - a2; - tmp[3 + i * 4] = a0 - a1; - } - // vertical pass - for (i = 0; i < 4; ++i, ++w) { - const int a0 = tmp[0 + i] + tmp[8 + i]; - const int a1 = tmp[4 + i] + tmp[12+ i]; - const int a2 = tmp[4 + i] - tmp[12+ i]; - const int a3 = tmp[0 + i] - tmp[8 + i]; - const int b0 = a0 + a1; - const int b1 = a3 + a2; - const int b2 = a3 - a2; - const int b3 = a0 - a1; - - sum += w[ 0] * abs(b0); - sum += w[ 4] * abs(b1); - sum += w[ 8] * abs(b2); - sum += w[12] * abs(b3); - } - return sum; -} - -static int Disto4x4_C(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - const int sum1 = TTransform(a, w); - const int sum2 = TTransform(b, w); - return abs(sum2 - sum1) >> 5; -} - -static int Disto16x16_C(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - int D = 0; - int x, y; - for (y = 0; y < 16 * BPS; y += 4 * BPS) { - for (x = 0; x < 16; x += 4) { - D += Disto4x4_C(a + x + y, b + x + y, w); - } - } - return D; -} -#endif // !WEBP_NEON_OMIT_C_CODE - -//------------------------------------------------------------------------------ -// Quantization -// - -static const uint8_t kZigzag[16] = { - 0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15 -}; - -// Simple quantization -static int QuantizeBlock_C(int16_t in[16], int16_t out[16], - const VP8Matrix* const mtx) { - int last = -1; - int n; - for (n = 0; n < 16; ++n) { - const int j = kZigzag[n]; - const int sign = (in[j] < 0); - const uint32_t coeff = (sign ? -in[j] : in[j]) + mtx->sharpen_[j]; - if (coeff > mtx->zthresh_[j]) { - const uint32_t Q = mtx->q_[j]; - const uint32_t iQ = mtx->iq_[j]; - const uint32_t B = mtx->bias_[j]; - int level = QUANTDIV(coeff, iQ, B); - if (level > MAX_LEVEL) level = MAX_LEVEL; - if (sign) level = -level; - in[j] = level * (int)Q; - out[n] = level; - if (level) last = n; - } else { - out[n] = 0; - in[j] = 0; - } - } - return (last >= 0); -} - -#if !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC -static int Quantize2Blocks_C(int16_t in[32], int16_t out[32], - const VP8Matrix* const mtx) { - int nz; - nz = VP8EncQuantizeBlock(in + 0 * 16, out + 0 * 16, mtx) << 0; - nz |= VP8EncQuantizeBlock(in + 1 * 16, out + 1 * 16, mtx) << 1; - return nz; -} -#endif // !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC - -//------------------------------------------------------------------------------ -// Block copy - -static WEBP_INLINE void Copy(const uint8_t* src, uint8_t* dst, int w, int h) { - int y; - for (y = 0; y < h; ++y) { - memcpy(dst, src, w); - src += BPS; - dst += BPS; - } -} - -static void Copy4x4_C(const uint8_t* src, uint8_t* dst) { - Copy(src, dst, 4, 4); -} - -static void Copy16x8_C(const uint8_t* src, uint8_t* dst) { - Copy(src, dst, 16, 8); -} - -//------------------------------------------------------------------------------ -// Initialization - -// Speed-critical function pointers. We have to initialize them to the default -// implementations within VP8EncDspInit(). -VP8CHisto VP8CollectHistogram; -VP8Idct VP8ITransform; -VP8Fdct VP8FTransform; -VP8Fdct VP8FTransform2; -VP8WHT VP8FTransformWHT; -VP8Intra4Preds VP8EncPredLuma4; -VP8IntraPreds VP8EncPredLuma16; -VP8IntraPreds VP8EncPredChroma8; -VP8Metric VP8SSE16x16; -VP8Metric VP8SSE8x8; -VP8Metric VP8SSE16x8; -VP8Metric VP8SSE4x4; -VP8WMetric VP8TDisto4x4; -VP8WMetric VP8TDisto16x16; -VP8MeanMetric VP8Mean16x4; -VP8QuantizeBlock VP8EncQuantizeBlock; -VP8Quantize2Blocks VP8EncQuantize2Blocks; -VP8QuantizeBlockWHT VP8EncQuantizeBlockWHT; -VP8BlockCopy VP8Copy4x4; -VP8BlockCopy VP8Copy16x8; - -extern void VP8EncDspInitSSE2(void); -extern void VP8EncDspInitSSE41(void); -extern void VP8EncDspInitAVX2(void); -extern void VP8EncDspInitNEON(void); -extern void VP8EncDspInitMIPS32(void); -extern void VP8EncDspInitMIPSdspR2(void); -extern void VP8EncDspInitMSA(void); - -WEBP_DSP_INIT_FUNC(VP8EncDspInit) { - VP8DspInit(); // common inverse transforms - InitTables(); - - // default C implementations -#if !WEBP_NEON_OMIT_C_CODE - VP8ITransform = ITransform_C; - VP8FTransform = FTransform_C; - VP8FTransformWHT = FTransformWHT_C; - VP8TDisto4x4 = Disto4x4_C; - VP8TDisto16x16 = Disto16x16_C; - VP8CollectHistogram = CollectHistogram_C; - VP8SSE16x16 = SSE16x16_C; - VP8SSE16x8 = SSE16x8_C; - VP8SSE8x8 = SSE8x8_C; - VP8SSE4x4 = SSE4x4_C; -#endif - -#if !WEBP_NEON_OMIT_C_CODE || WEBP_NEON_WORK_AROUND_GCC - VP8EncQuantizeBlock = QuantizeBlock_C; - VP8EncQuantize2Blocks = Quantize2Blocks_C; -#endif - - VP8FTransform2 = FTransform2_C; - VP8EncPredLuma4 = Intra4Preds_C; - VP8EncPredLuma16 = Intra16Preds_C; - VP8EncPredChroma8 = IntraChromaPreds_C; - VP8Mean16x4 = Mean16x4_C; - VP8EncQuantizeBlockWHT = QuantizeBlock_C; - VP8Copy4x4 = Copy4x4_C; - VP8Copy16x8 = Copy16x8_C; - - // If defined, use CPUInfo() to overwrite some pointers with faster versions. - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - VP8EncDspInitSSE2(); -#if defined(WEBP_USE_SSE41) - if (VP8GetCPUInfo(kSSE4_1)) { - VP8EncDspInitSSE41(); - } -#endif - } -#endif -#if defined(WEBP_USE_AVX2) - if (VP8GetCPUInfo(kAVX2)) { - VP8EncDspInitAVX2(); - } -#endif -#if defined(WEBP_USE_MIPS32) - if (VP8GetCPUInfo(kMIPS32)) { - VP8EncDspInitMIPS32(); - } -#endif -#if defined(WEBP_USE_MIPS_DSP_R2) - if (VP8GetCPUInfo(kMIPSdspR2)) { - VP8EncDspInitMIPSdspR2(); - } -#endif -#if defined(WEBP_USE_MSA) - if (VP8GetCPUInfo(kMSA)) { - VP8EncDspInitMSA(); - } -#endif - } - -#if defined(WEBP_USE_NEON) - if (WEBP_NEON_OMIT_C_CODE || - (VP8GetCPUInfo != NULL && VP8GetCPUInfo(kNEON))) { - VP8EncDspInitNEON(); - } -#endif - - assert(VP8ITransform != NULL); - assert(VP8FTransform != NULL); - assert(VP8FTransformWHT != NULL); - assert(VP8TDisto4x4 != NULL); - assert(VP8TDisto16x16 != NULL); - assert(VP8CollectHistogram != NULL); - assert(VP8SSE16x16 != NULL); - assert(VP8SSE16x8 != NULL); - assert(VP8SSE8x8 != NULL); - assert(VP8SSE4x4 != NULL); - assert(VP8EncQuantizeBlock != NULL); - assert(VP8EncQuantize2Blocks != NULL); - assert(VP8FTransform2 != NULL); - assert(VP8EncPredLuma4 != NULL); - assert(VP8EncPredLuma16 != NULL); - assert(VP8EncPredChroma8 != NULL); - assert(VP8Mean16x4 != NULL); - assert(VP8EncQuantizeBlockWHT != NULL); - assert(VP8Copy4x4 != NULL); - assert(VP8Copy16x8 != NULL); -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_avx2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_avx2.c deleted file mode 100644 index 12b81db..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_avx2.c +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// AVX2 version of speed-critical encoding functions. - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_AVX2) - -#endif // WEBP_USE_AVX2 - -//------------------------------------------------------------------------------ -// Entry point - -WEBP_DSP_INIT_STUB(VP8EncDspInitAVX2) diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_mips32.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_mips32.c deleted file mode 100644 index 309739a..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_mips32.c +++ /dev/null @@ -1,677 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MIPS version of speed-critical encoding functions. -// -// Author(s): Djordje Pesut (djordje.pesut@imgtec.com) -// Jovan Zelincevic (jovan.zelincevic@imgtec.com) -// Slobodan Prijic (slobodan.prijic@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS32) - -#include "src/dsp/mips_macro.h" -#include "src/enc/vp8i_enc.h" -#include "src/enc/cost_enc.h" - -static const int kC1 = 20091 + (1 << 16); -static const int kC2 = 35468; - -// macro for one vertical pass in ITransformOne -// MUL macro inlined -// temp0..temp15 holds tmp[0]..tmp[15] -// A..D - offsets in bytes to load from in buffer -// TEMP0..TEMP3 - registers for corresponding tmp elements -// TEMP4..TEMP5 - temporary registers -#define VERTICAL_PASS(A, B, C, D, TEMP4, TEMP0, TEMP1, TEMP2, TEMP3) \ - "lh %[temp16], " #A "(%[temp20]) \n\t" \ - "lh %[temp18], " #B "(%[temp20]) \n\t" \ - "lh %[temp17], " #C "(%[temp20]) \n\t" \ - "lh %[temp19], " #D "(%[temp20]) \n\t" \ - "addu %[" #TEMP4 "], %[temp16], %[temp18] \n\t" \ - "subu %[temp16], %[temp16], %[temp18] \n\t" \ - "mul %[" #TEMP0 "], %[temp17], %[kC2] \n\t" \ - "mul %[temp18], %[temp19], %[kC1] \n\t" \ - "mul %[temp17], %[temp17], %[kC1] \n\t" \ - "mul %[temp19], %[temp19], %[kC2] \n\t" \ - "sra %[" #TEMP0 "], %[" #TEMP0 "], 16 \n\n" \ - "sra %[temp18], %[temp18], 16 \n\n" \ - "sra %[temp17], %[temp17], 16 \n\n" \ - "sra %[temp19], %[temp19], 16 \n\n" \ - "subu %[" #TEMP2 "], %[" #TEMP0 "], %[temp18] \n\t" \ - "addu %[" #TEMP3 "], %[temp17], %[temp19] \n\t" \ - "addu %[" #TEMP0 "], %[" #TEMP4 "], %[" #TEMP3 "] \n\t" \ - "addu %[" #TEMP1 "], %[temp16], %[" #TEMP2 "] \n\t" \ - "subu %[" #TEMP2 "], %[temp16], %[" #TEMP2 "] \n\t" \ - "subu %[" #TEMP3 "], %[" #TEMP4 "], %[" #TEMP3 "] \n\t" - -// macro for one horizontal pass in ITransformOne -// MUL and STORE macros inlined -// a = clip_8b(a) is replaced with: a = max(a, 0); a = min(a, 255) -// temp0..temp15 holds tmp[0]..tmp[15] -// A - offset in bytes to load from ref and store to dst buffer -// TEMP0, TEMP4, TEMP8 and TEMP12 - registers for corresponding tmp elements -#define HORIZONTAL_PASS(A, TEMP0, TEMP4, TEMP8, TEMP12) \ - "addiu %[" #TEMP0 "], %[" #TEMP0 "], 4 \n\t" \ - "addu %[temp16], %[" #TEMP0 "], %[" #TEMP8 "] \n\t" \ - "subu %[temp17], %[" #TEMP0 "], %[" #TEMP8 "] \n\t" \ - "mul %[" #TEMP0 "], %[" #TEMP4 "], %[kC2] \n\t" \ - "mul %[" #TEMP8 "], %[" #TEMP12 "], %[kC1] \n\t" \ - "mul %[" #TEMP4 "], %[" #TEMP4 "], %[kC1] \n\t" \ - "mul %[" #TEMP12 "], %[" #TEMP12 "], %[kC2] \n\t" \ - "sra %[" #TEMP0 "], %[" #TEMP0 "], 16 \n\t" \ - "sra %[" #TEMP8 "], %[" #TEMP8 "], 16 \n\t" \ - "sra %[" #TEMP4 "], %[" #TEMP4 "], 16 \n\t" \ - "sra %[" #TEMP12 "], %[" #TEMP12 "], 16 \n\t" \ - "subu %[temp18], %[" #TEMP0 "], %[" #TEMP8 "] \n\t" \ - "addu %[temp19], %[" #TEMP4 "], %[" #TEMP12 "] \n\t" \ - "addu %[" #TEMP0 "], %[temp16], %[temp19] \n\t" \ - "addu %[" #TEMP4 "], %[temp17], %[temp18] \n\t" \ - "subu %[" #TEMP8 "], %[temp17], %[temp18] \n\t" \ - "subu %[" #TEMP12 "], %[temp16], %[temp19] \n\t" \ - "lw %[temp20], 0(%[args]) \n\t" \ - "sra %[" #TEMP0 "], %[" #TEMP0 "], 3 \n\t" \ - "sra %[" #TEMP4 "], %[" #TEMP4 "], 3 \n\t" \ - "sra %[" #TEMP8 "], %[" #TEMP8 "], 3 \n\t" \ - "sra %[" #TEMP12 "], %[" #TEMP12 "], 3 \n\t" \ - "lbu %[temp16], 0+" XSTR(BPS) "*" #A "(%[temp20]) \n\t" \ - "lbu %[temp17], 1+" XSTR(BPS) "*" #A "(%[temp20]) \n\t" \ - "lbu %[temp18], 2+" XSTR(BPS) "*" #A "(%[temp20]) \n\t" \ - "lbu %[temp19], 3+" XSTR(BPS) "*" #A "(%[temp20]) \n\t" \ - "addu %[" #TEMP0 "], %[temp16], %[" #TEMP0 "] \n\t" \ - "addu %[" #TEMP4 "], %[temp17], %[" #TEMP4 "] \n\t" \ - "addu %[" #TEMP8 "], %[temp18], %[" #TEMP8 "] \n\t" \ - "addu %[" #TEMP12 "], %[temp19], %[" #TEMP12 "] \n\t" \ - "slt %[temp16], %[" #TEMP0 "], $zero \n\t" \ - "slt %[temp17], %[" #TEMP4 "], $zero \n\t" \ - "slt %[temp18], %[" #TEMP8 "], $zero \n\t" \ - "slt %[temp19], %[" #TEMP12 "], $zero \n\t" \ - "movn %[" #TEMP0 "], $zero, %[temp16] \n\t" \ - "movn %[" #TEMP4 "], $zero, %[temp17] \n\t" \ - "movn %[" #TEMP8 "], $zero, %[temp18] \n\t" \ - "movn %[" #TEMP12 "], $zero, %[temp19] \n\t" \ - "addiu %[temp20], $zero, 255 \n\t" \ - "slt %[temp16], %[" #TEMP0 "], %[temp20] \n\t" \ - "slt %[temp17], %[" #TEMP4 "], %[temp20] \n\t" \ - "slt %[temp18], %[" #TEMP8 "], %[temp20] \n\t" \ - "slt %[temp19], %[" #TEMP12 "], %[temp20] \n\t" \ - "movz %[" #TEMP0 "], %[temp20], %[temp16] \n\t" \ - "movz %[" #TEMP4 "], %[temp20], %[temp17] \n\t" \ - "lw %[temp16], 8(%[args]) \n\t" \ - "movz %[" #TEMP8 "], %[temp20], %[temp18] \n\t" \ - "movz %[" #TEMP12 "], %[temp20], %[temp19] \n\t" \ - "sb %[" #TEMP0 "], 0+" XSTR(BPS) "*" #A "(%[temp16]) \n\t" \ - "sb %[" #TEMP4 "], 1+" XSTR(BPS) "*" #A "(%[temp16]) \n\t" \ - "sb %[" #TEMP8 "], 2+" XSTR(BPS) "*" #A "(%[temp16]) \n\t" \ - "sb %[" #TEMP12 "], 3+" XSTR(BPS) "*" #A "(%[temp16]) \n\t" - -// Does one or two inverse transforms. -static WEBP_INLINE void ITransformOne_MIPS32(const uint8_t* ref, - const int16_t* in, - uint8_t* dst) { - int temp0, temp1, temp2, temp3, temp4, temp5, temp6; - int temp7, temp8, temp9, temp10, temp11, temp12, temp13; - int temp14, temp15, temp16, temp17, temp18, temp19, temp20; - const int* args[3] = {(const int*)ref, (const int*)in, (const int*)dst}; - - __asm__ volatile( - "lw %[temp20], 4(%[args]) \n\t" - VERTICAL_PASS(0, 16, 8, 24, temp4, temp0, temp1, temp2, temp3) - VERTICAL_PASS(2, 18, 10, 26, temp8, temp4, temp5, temp6, temp7) - VERTICAL_PASS(4, 20, 12, 28, temp12, temp8, temp9, temp10, temp11) - VERTICAL_PASS(6, 22, 14, 30, temp20, temp12, temp13, temp14, temp15) - - HORIZONTAL_PASS(0, temp0, temp4, temp8, temp12) - HORIZONTAL_PASS(1, temp1, temp5, temp9, temp13) - HORIZONTAL_PASS(2, temp2, temp6, temp10, temp14) - HORIZONTAL_PASS(3, temp3, temp7, temp11, temp15) - - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [temp9]"=&r"(temp9), [temp10]"=&r"(temp10), [temp11]"=&r"(temp11), - [temp12]"=&r"(temp12), [temp13]"=&r"(temp13), [temp14]"=&r"(temp14), - [temp15]"=&r"(temp15), [temp16]"=&r"(temp16), [temp17]"=&r"(temp17), - [temp18]"=&r"(temp18), [temp19]"=&r"(temp19), [temp20]"=&r"(temp20) - : [args]"r"(args), [kC1]"r"(kC1), [kC2]"r"(kC2) - : "memory", "hi", "lo" - ); -} - -static void ITransform_MIPS32(const uint8_t* ref, const int16_t* in, - uint8_t* dst, int do_two) { - ITransformOne_MIPS32(ref, in, dst); - if (do_two) { - ITransformOne_MIPS32(ref + 4, in + 16, dst + 4); - } -} - -#undef VERTICAL_PASS -#undef HORIZONTAL_PASS - -// macro for one pass through for loop in QuantizeBlock -// QUANTDIV macro inlined -// J - offset in bytes (kZigzag[n] * 2) -// K - offset in bytes (kZigzag[n] * 4) -// N - offset in bytes (n * 2) -#define QUANTIZE_ONE(J, K, N) \ - "lh %[temp0], " #J "(%[ppin]) \n\t" \ - "lhu %[temp1], " #J "(%[ppsharpen]) \n\t" \ - "lw %[temp2], " #K "(%[ppzthresh]) \n\t" \ - "sra %[sign], %[temp0], 15 \n\t" \ - "xor %[coeff], %[temp0], %[sign] \n\t" \ - "subu %[coeff], %[coeff], %[sign] \n\t" \ - "addu %[coeff], %[coeff], %[temp1] \n\t" \ - "slt %[temp4], %[temp2], %[coeff] \n\t" \ - "addiu %[temp5], $zero, 0 \n\t" \ - "addiu %[level], $zero, 0 \n\t" \ - "beqz %[temp4], 2f \n\t" \ - "lhu %[temp1], " #J "(%[ppiq]) \n\t" \ - "lw %[temp2], " #K "(%[ppbias]) \n\t" \ - "lhu %[temp3], " #J "(%[ppq]) \n\t" \ - "mul %[level], %[coeff], %[temp1] \n\t" \ - "addu %[level], %[level], %[temp2] \n\t" \ - "sra %[level], %[level], 17 \n\t" \ - "slt %[temp4], %[max_level], %[level] \n\t" \ - "movn %[level], %[max_level], %[temp4] \n\t" \ - "xor %[level], %[level], %[sign] \n\t" \ - "subu %[level], %[level], %[sign] \n\t" \ - "mul %[temp5], %[level], %[temp3] \n\t" \ -"2: \n\t" \ - "sh %[temp5], " #J "(%[ppin]) \n\t" \ - "sh %[level], " #N "(%[pout]) \n\t" - -static int QuantizeBlock_MIPS32(int16_t in[16], int16_t out[16], - const VP8Matrix* const mtx) { - int temp0, temp1, temp2, temp3, temp4, temp5; - int sign, coeff, level, i; - int max_level = MAX_LEVEL; - - int16_t* ppin = &in[0]; - int16_t* pout = &out[0]; - const uint16_t* ppsharpen = &mtx->sharpen_[0]; - const uint32_t* ppzthresh = &mtx->zthresh_[0]; - const uint16_t* ppq = &mtx->q_[0]; - const uint16_t* ppiq = &mtx->iq_[0]; - const uint32_t* ppbias = &mtx->bias_[0]; - - __asm__ volatile( - QUANTIZE_ONE( 0, 0, 0) - QUANTIZE_ONE( 2, 4, 2) - QUANTIZE_ONE( 8, 16, 4) - QUANTIZE_ONE(16, 32, 6) - QUANTIZE_ONE(10, 20, 8) - QUANTIZE_ONE( 4, 8, 10) - QUANTIZE_ONE( 6, 12, 12) - QUANTIZE_ONE(12, 24, 14) - QUANTIZE_ONE(18, 36, 16) - QUANTIZE_ONE(24, 48, 18) - QUANTIZE_ONE(26, 52, 20) - QUANTIZE_ONE(20, 40, 22) - QUANTIZE_ONE(14, 28, 24) - QUANTIZE_ONE(22, 44, 26) - QUANTIZE_ONE(28, 56, 28) - QUANTIZE_ONE(30, 60, 30) - - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [sign]"=&r"(sign), [coeff]"=&r"(coeff), - [level]"=&r"(level) - : [pout]"r"(pout), [ppin]"r"(ppin), - [ppiq]"r"(ppiq), [max_level]"r"(max_level), - [ppbias]"r"(ppbias), [ppzthresh]"r"(ppzthresh), - [ppsharpen]"r"(ppsharpen), [ppq]"r"(ppq) - : "memory", "hi", "lo" - ); - - // moved out from macro to increase possibility for earlier breaking - for (i = 15; i >= 0; i--) { - if (out[i]) return 1; - } - return 0; -} - -static int Quantize2Blocks_MIPS32(int16_t in[32], int16_t out[32], - const VP8Matrix* const mtx) { - int nz; - nz = QuantizeBlock_MIPS32(in + 0 * 16, out + 0 * 16, mtx) << 0; - nz |= QuantizeBlock_MIPS32(in + 1 * 16, out + 1 * 16, mtx) << 1; - return nz; -} - -#undef QUANTIZE_ONE - -// macro for one horizontal pass in Disto4x4 (TTransform) -// two calls of function TTransform are merged into single one -// A - offset in bytes to load from a and b buffers -// E..H - offsets in bytes to store first results to tmp buffer -// E1..H1 - offsets in bytes to store second results to tmp buffer -#define HORIZONTAL_PASS(A, E, F, G, H, E1, F1, G1, H1) \ - "lbu %[temp0], 0+" XSTR(BPS) "*" #A "(%[a]) \n\t" \ - "lbu %[temp1], 1+" XSTR(BPS) "*" #A "(%[a]) \n\t" \ - "lbu %[temp2], 2+" XSTR(BPS) "*" #A "(%[a]) \n\t" \ - "lbu %[temp3], 3+" XSTR(BPS) "*" #A "(%[a]) \n\t" \ - "lbu %[temp4], 0+" XSTR(BPS) "*" #A "(%[b]) \n\t" \ - "lbu %[temp5], 1+" XSTR(BPS) "*" #A "(%[b]) \n\t" \ - "lbu %[temp6], 2+" XSTR(BPS) "*" #A "(%[b]) \n\t" \ - "lbu %[temp7], 3+" XSTR(BPS) "*" #A "(%[b]) \n\t" \ - "addu %[temp8], %[temp0], %[temp2] \n\t" \ - "subu %[temp0], %[temp0], %[temp2] \n\t" \ - "addu %[temp2], %[temp1], %[temp3] \n\t" \ - "subu %[temp1], %[temp1], %[temp3] \n\t" \ - "addu %[temp3], %[temp4], %[temp6] \n\t" \ - "subu %[temp4], %[temp4], %[temp6] \n\t" \ - "addu %[temp6], %[temp5], %[temp7] \n\t" \ - "subu %[temp5], %[temp5], %[temp7] \n\t" \ - "addu %[temp7], %[temp8], %[temp2] \n\t" \ - "subu %[temp2], %[temp8], %[temp2] \n\t" \ - "addu %[temp8], %[temp0], %[temp1] \n\t" \ - "subu %[temp0], %[temp0], %[temp1] \n\t" \ - "addu %[temp1], %[temp3], %[temp6] \n\t" \ - "subu %[temp3], %[temp3], %[temp6] \n\t" \ - "addu %[temp6], %[temp4], %[temp5] \n\t" \ - "subu %[temp4], %[temp4], %[temp5] \n\t" \ - "sw %[temp7], " #E "(%[tmp]) \n\t" \ - "sw %[temp2], " #H "(%[tmp]) \n\t" \ - "sw %[temp8], " #F "(%[tmp]) \n\t" \ - "sw %[temp0], " #G "(%[tmp]) \n\t" \ - "sw %[temp1], " #E1 "(%[tmp]) \n\t" \ - "sw %[temp3], " #H1 "(%[tmp]) \n\t" \ - "sw %[temp6], " #F1 "(%[tmp]) \n\t" \ - "sw %[temp4], " #G1 "(%[tmp]) \n\t" - -// macro for one vertical pass in Disto4x4 (TTransform) -// two calls of function TTransform are merged into single one -// since only one accu is available in mips32r1 instruction set -// first is done second call of function TTransform and after -// that first one. -// const int sum1 = TTransform(a, w); -// const int sum2 = TTransform(b, w); -// return abs(sum2 - sum1) >> 5; -// (sum2 - sum1) is calculated with madds (sub2) and msubs (sub1) -// A..D - offsets in bytes to load first results from tmp buffer -// A1..D1 - offsets in bytes to load second results from tmp buffer -// E..H - offsets in bytes to load from w buffer -#define VERTICAL_PASS(A, B, C, D, A1, B1, C1, D1, E, F, G, H) \ - "lw %[temp0], " #A1 "(%[tmp]) \n\t" \ - "lw %[temp1], " #C1 "(%[tmp]) \n\t" \ - "lw %[temp2], " #B1 "(%[tmp]) \n\t" \ - "lw %[temp3], " #D1 "(%[tmp]) \n\t" \ - "addu %[temp8], %[temp0], %[temp1] \n\t" \ - "subu %[temp0], %[temp0], %[temp1] \n\t" \ - "addu %[temp1], %[temp2], %[temp3] \n\t" \ - "subu %[temp2], %[temp2], %[temp3] \n\t" \ - "addu %[temp3], %[temp8], %[temp1] \n\t" \ - "subu %[temp8], %[temp8], %[temp1] \n\t" \ - "addu %[temp1], %[temp0], %[temp2] \n\t" \ - "subu %[temp0], %[temp0], %[temp2] \n\t" \ - "sra %[temp4], %[temp3], 31 \n\t" \ - "sra %[temp5], %[temp1], 31 \n\t" \ - "sra %[temp6], %[temp0], 31 \n\t" \ - "sra %[temp7], %[temp8], 31 \n\t" \ - "xor %[temp3], %[temp3], %[temp4] \n\t" \ - "xor %[temp1], %[temp1], %[temp5] \n\t" \ - "xor %[temp0], %[temp0], %[temp6] \n\t" \ - "xor %[temp8], %[temp8], %[temp7] \n\t" \ - "subu %[temp3], %[temp3], %[temp4] \n\t" \ - "subu %[temp1], %[temp1], %[temp5] \n\t" \ - "subu %[temp0], %[temp0], %[temp6] \n\t" \ - "subu %[temp8], %[temp8], %[temp7] \n\t" \ - "lhu %[temp4], " #E "(%[w]) \n\t" \ - "lhu %[temp5], " #F "(%[w]) \n\t" \ - "lhu %[temp6], " #G "(%[w]) \n\t" \ - "lhu %[temp7], " #H "(%[w]) \n\t" \ - "madd %[temp4], %[temp3] \n\t" \ - "madd %[temp5], %[temp1] \n\t" \ - "madd %[temp6], %[temp0] \n\t" \ - "madd %[temp7], %[temp8] \n\t" \ - "lw %[temp0], " #A "(%[tmp]) \n\t" \ - "lw %[temp1], " #C "(%[tmp]) \n\t" \ - "lw %[temp2], " #B "(%[tmp]) \n\t" \ - "lw %[temp3], " #D "(%[tmp]) \n\t" \ - "addu %[temp8], %[temp0], %[temp1] \n\t" \ - "subu %[temp0], %[temp0], %[temp1] \n\t" \ - "addu %[temp1], %[temp2], %[temp3] \n\t" \ - "subu %[temp2], %[temp2], %[temp3] \n\t" \ - "addu %[temp3], %[temp8], %[temp1] \n\t" \ - "subu %[temp1], %[temp8], %[temp1] \n\t" \ - "addu %[temp8], %[temp0], %[temp2] \n\t" \ - "subu %[temp0], %[temp0], %[temp2] \n\t" \ - "sra %[temp2], %[temp3], 31 \n\t" \ - "xor %[temp3], %[temp3], %[temp2] \n\t" \ - "subu %[temp3], %[temp3], %[temp2] \n\t" \ - "msub %[temp4], %[temp3] \n\t" \ - "sra %[temp2], %[temp8], 31 \n\t" \ - "sra %[temp3], %[temp0], 31 \n\t" \ - "sra %[temp4], %[temp1], 31 \n\t" \ - "xor %[temp8], %[temp8], %[temp2] \n\t" \ - "xor %[temp0], %[temp0], %[temp3] \n\t" \ - "xor %[temp1], %[temp1], %[temp4] \n\t" \ - "subu %[temp8], %[temp8], %[temp2] \n\t" \ - "subu %[temp0], %[temp0], %[temp3] \n\t" \ - "subu %[temp1], %[temp1], %[temp4] \n\t" \ - "msub %[temp5], %[temp8] \n\t" \ - "msub %[temp6], %[temp0] \n\t" \ - "msub %[temp7], %[temp1] \n\t" - -static int Disto4x4_MIPS32(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - int tmp[32]; - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8; - - __asm__ volatile( - HORIZONTAL_PASS(0, 0, 4, 8, 12, 64, 68, 72, 76) - HORIZONTAL_PASS(1, 16, 20, 24, 28, 80, 84, 88, 92) - HORIZONTAL_PASS(2, 32, 36, 40, 44, 96, 100, 104, 108) - HORIZONTAL_PASS(3, 48, 52, 56, 60, 112, 116, 120, 124) - "mthi $zero \n\t" - "mtlo $zero \n\t" - VERTICAL_PASS( 0, 16, 32, 48, 64, 80, 96, 112, 0, 8, 16, 24) - VERTICAL_PASS( 4, 20, 36, 52, 68, 84, 100, 116, 2, 10, 18, 26) - VERTICAL_PASS( 8, 24, 40, 56, 72, 88, 104, 120, 4, 12, 20, 28) - VERTICAL_PASS(12, 28, 44, 60, 76, 92, 108, 124, 6, 14, 22, 30) - "mflo %[temp0] \n\t" - "sra %[temp1], %[temp0], 31 \n\t" - "xor %[temp0], %[temp0], %[temp1] \n\t" - "subu %[temp0], %[temp0], %[temp1] \n\t" - "sra %[temp0], %[temp0], 5 \n\t" - - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8) - : [a]"r"(a), [b]"r"(b), [w]"r"(w), [tmp]"r"(tmp) - : "memory", "hi", "lo" - ); - - return temp0; -} - -#undef VERTICAL_PASS -#undef HORIZONTAL_PASS - -static int Disto16x16_MIPS32(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - int D = 0; - int x, y; - for (y = 0; y < 16 * BPS; y += 4 * BPS) { - for (x = 0; x < 16; x += 4) { - D += Disto4x4_MIPS32(a + x + y, b + x + y, w); - } - } - return D; -} - -// macro for one horizontal pass in FTransform -// temp0..temp15 holds tmp[0]..tmp[15] -// A - offset in bytes to load from src and ref buffers -// TEMP0..TEMP3 - registers for corresponding tmp elements -#define HORIZONTAL_PASS(A, TEMP0, TEMP1, TEMP2, TEMP3) \ - "lw %[" #TEMP1 "], 0(%[args]) \n\t" \ - "lw %[" #TEMP2 "], 4(%[args]) \n\t" \ - "lbu %[temp16], 0+" XSTR(BPS) "*" #A "(%[" #TEMP1 "]) \n\t" \ - "lbu %[temp17], 0+" XSTR(BPS) "*" #A "(%[" #TEMP2 "]) \n\t" \ - "lbu %[temp18], 1+" XSTR(BPS) "*" #A "(%[" #TEMP1 "]) \n\t" \ - "lbu %[temp19], 1+" XSTR(BPS) "*" #A "(%[" #TEMP2 "]) \n\t" \ - "subu %[temp20], %[temp16], %[temp17] \n\t" \ - "lbu %[temp16], 2+" XSTR(BPS) "*" #A "(%[" #TEMP1 "]) \n\t" \ - "lbu %[temp17], 2+" XSTR(BPS) "*" #A "(%[" #TEMP2 "]) \n\t" \ - "subu %[" #TEMP0 "], %[temp18], %[temp19] \n\t" \ - "lbu %[temp18], 3+" XSTR(BPS) "*" #A "(%[" #TEMP1 "]) \n\t" \ - "lbu %[temp19], 3+" XSTR(BPS) "*" #A "(%[" #TEMP2 "]) \n\t" \ - "subu %[" #TEMP1 "], %[temp16], %[temp17] \n\t" \ - "subu %[" #TEMP2 "], %[temp18], %[temp19] \n\t" \ - "addu %[" #TEMP3 "], %[temp20], %[" #TEMP2 "] \n\t" \ - "subu %[" #TEMP2 "], %[temp20], %[" #TEMP2 "] \n\t" \ - "addu %[temp20], %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ - "subu %[" #TEMP0 "], %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ - "mul %[temp16], %[" #TEMP2 "], %[c5352] \n\t" \ - "mul %[temp17], %[" #TEMP2 "], %[c2217] \n\t" \ - "mul %[temp18], %[" #TEMP0 "], %[c5352] \n\t" \ - "mul %[temp19], %[" #TEMP0 "], %[c2217] \n\t" \ - "addu %[" #TEMP1 "], %[" #TEMP3 "], %[temp20] \n\t" \ - "subu %[temp20], %[" #TEMP3 "], %[temp20] \n\t" \ - "sll %[" #TEMP0 "], %[" #TEMP1 "], 3 \n\t" \ - "sll %[" #TEMP2 "], %[temp20], 3 \n\t" \ - "addiu %[temp16], %[temp16], 1812 \n\t" \ - "addiu %[temp17], %[temp17], 937 \n\t" \ - "addu %[temp16], %[temp16], %[temp19] \n\t" \ - "subu %[temp17], %[temp17], %[temp18] \n\t" \ - "sra %[" #TEMP1 "], %[temp16], 9 \n\t" \ - "sra %[" #TEMP3 "], %[temp17], 9 \n\t" - -// macro for one vertical pass in FTransform -// temp0..temp15 holds tmp[0]..tmp[15] -// A..D - offsets in bytes to store to out buffer -// TEMP0, TEMP4, TEMP8 and TEMP12 - registers for corresponding tmp elements -#define VERTICAL_PASS(A, B, C, D, TEMP0, TEMP4, TEMP8, TEMP12) \ - "addu %[temp16], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ - "subu %[temp19], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ - "addu %[temp17], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ - "subu %[temp18], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ - "mul %[" #TEMP8 "], %[temp19], %[c2217] \n\t" \ - "mul %[" #TEMP12 "], %[temp18], %[c2217] \n\t" \ - "mul %[" #TEMP4 "], %[temp19], %[c5352] \n\t" \ - "mul %[temp18], %[temp18], %[c5352] \n\t" \ - "addiu %[temp16], %[temp16], 7 \n\t" \ - "addu %[" #TEMP0 "], %[temp16], %[temp17] \n\t" \ - "sra %[" #TEMP0 "], %[" #TEMP0 "], 4 \n\t" \ - "addu %[" #TEMP12 "], %[" #TEMP12 "], %[" #TEMP4 "] \n\t" \ - "subu %[" #TEMP4 "], %[temp16], %[temp17] \n\t" \ - "sra %[" #TEMP4 "], %[" #TEMP4 "], 4 \n\t" \ - "addiu %[" #TEMP8 "], %[" #TEMP8 "], 30000 \n\t" \ - "addiu %[" #TEMP12 "], %[" #TEMP12 "], 12000 \n\t" \ - "addiu %[" #TEMP8 "], %[" #TEMP8 "], 21000 \n\t" \ - "subu %[" #TEMP8 "], %[" #TEMP8 "], %[temp18] \n\t" \ - "sra %[" #TEMP12 "], %[" #TEMP12 "], 16 \n\t" \ - "sra %[" #TEMP8 "], %[" #TEMP8 "], 16 \n\t" \ - "addiu %[temp16], %[" #TEMP12 "], 1 \n\t" \ - "movn %[" #TEMP12 "], %[temp16], %[temp19] \n\t" \ - "sh %[" #TEMP0 "], " #A "(%[temp20]) \n\t" \ - "sh %[" #TEMP4 "], " #C "(%[temp20]) \n\t" \ - "sh %[" #TEMP8 "], " #D "(%[temp20]) \n\t" \ - "sh %[" #TEMP12 "], " #B "(%[temp20]) \n\t" - -static void FTransform_MIPS32(const uint8_t* src, const uint8_t* ref, - int16_t* out) { - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8; - int temp9, temp10, temp11, temp12, temp13, temp14, temp15, temp16; - int temp17, temp18, temp19, temp20; - const int c2217 = 2217; - const int c5352 = 5352; - const int* const args[3] = - { (const int*)src, (const int*)ref, (const int*)out }; - - __asm__ volatile( - HORIZONTAL_PASS(0, temp0, temp1, temp2, temp3) - HORIZONTAL_PASS(1, temp4, temp5, temp6, temp7) - HORIZONTAL_PASS(2, temp8, temp9, temp10, temp11) - HORIZONTAL_PASS(3, temp12, temp13, temp14, temp15) - "lw %[temp20], 8(%[args]) \n\t" - VERTICAL_PASS(0, 8, 16, 24, temp0, temp4, temp8, temp12) - VERTICAL_PASS(2, 10, 18, 26, temp1, temp5, temp9, temp13) - VERTICAL_PASS(4, 12, 20, 28, temp2, temp6, temp10, temp14) - VERTICAL_PASS(6, 14, 22, 30, temp3, temp7, temp11, temp15) - - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [temp9]"=&r"(temp9), [temp10]"=&r"(temp10), [temp11]"=&r"(temp11), - [temp12]"=&r"(temp12), [temp13]"=&r"(temp13), [temp14]"=&r"(temp14), - [temp15]"=&r"(temp15), [temp16]"=&r"(temp16), [temp17]"=&r"(temp17), - [temp18]"=&r"(temp18), [temp19]"=&r"(temp19), [temp20]"=&r"(temp20) - : [args]"r"(args), [c2217]"r"(c2217), [c5352]"r"(c5352) - : "memory", "hi", "lo" - ); -} - -#undef VERTICAL_PASS -#undef HORIZONTAL_PASS - -#if !defined(WORK_AROUND_GCC) - -#define GET_SSE_INNER(A, B, C, D) \ - "lbu %[temp0], " #A "(%[a]) \n\t" \ - "lbu %[temp1], " #A "(%[b]) \n\t" \ - "lbu %[temp2], " #B "(%[a]) \n\t" \ - "lbu %[temp3], " #B "(%[b]) \n\t" \ - "lbu %[temp4], " #C "(%[a]) \n\t" \ - "lbu %[temp5], " #C "(%[b]) \n\t" \ - "lbu %[temp6], " #D "(%[a]) \n\t" \ - "lbu %[temp7], " #D "(%[b]) \n\t" \ - "subu %[temp0], %[temp0], %[temp1] \n\t" \ - "subu %[temp2], %[temp2], %[temp3] \n\t" \ - "subu %[temp4], %[temp4], %[temp5] \n\t" \ - "subu %[temp6], %[temp6], %[temp7] \n\t" \ - "madd %[temp0], %[temp0] \n\t" \ - "madd %[temp2], %[temp2] \n\t" \ - "madd %[temp4], %[temp4] \n\t" \ - "madd %[temp6], %[temp6] \n\t" - -#define GET_SSE(A, B, C, D) \ - GET_SSE_INNER(A, A + 1, A + 2, A + 3) \ - GET_SSE_INNER(B, B + 1, B + 2, B + 3) \ - GET_SSE_INNER(C, C + 1, C + 2, C + 3) \ - GET_SSE_INNER(D, D + 1, D + 2, D + 3) - -static int SSE16x16_MIPS32(const uint8_t* a, const uint8_t* b) { - int count; - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; - - __asm__ volatile( - "mult $zero, $zero \n\t" - - GET_SSE( 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS) - GET_SSE( 1 * BPS, 4 + 1 * BPS, 8 + 1 * BPS, 12 + 1 * BPS) - GET_SSE( 2 * BPS, 4 + 2 * BPS, 8 + 2 * BPS, 12 + 2 * BPS) - GET_SSE( 3 * BPS, 4 + 3 * BPS, 8 + 3 * BPS, 12 + 3 * BPS) - GET_SSE( 4 * BPS, 4 + 4 * BPS, 8 + 4 * BPS, 12 + 4 * BPS) - GET_SSE( 5 * BPS, 4 + 5 * BPS, 8 + 5 * BPS, 12 + 5 * BPS) - GET_SSE( 6 * BPS, 4 + 6 * BPS, 8 + 6 * BPS, 12 + 6 * BPS) - GET_SSE( 7 * BPS, 4 + 7 * BPS, 8 + 7 * BPS, 12 + 7 * BPS) - GET_SSE( 8 * BPS, 4 + 8 * BPS, 8 + 8 * BPS, 12 + 8 * BPS) - GET_SSE( 9 * BPS, 4 + 9 * BPS, 8 + 9 * BPS, 12 + 9 * BPS) - GET_SSE(10 * BPS, 4 + 10 * BPS, 8 + 10 * BPS, 12 + 10 * BPS) - GET_SSE(11 * BPS, 4 + 11 * BPS, 8 + 11 * BPS, 12 + 11 * BPS) - GET_SSE(12 * BPS, 4 + 12 * BPS, 8 + 12 * BPS, 12 + 12 * BPS) - GET_SSE(13 * BPS, 4 + 13 * BPS, 8 + 13 * BPS, 12 + 13 * BPS) - GET_SSE(14 * BPS, 4 + 14 * BPS, 8 + 14 * BPS, 12 + 14 * BPS) - GET_SSE(15 * BPS, 4 + 15 * BPS, 8 + 15 * BPS, 12 + 15 * BPS) - - "mflo %[count] \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [count]"=&r"(count) - : [a]"r"(a), [b]"r"(b) - : "memory", "hi", "lo" - ); - return count; -} - -static int SSE16x8_MIPS32(const uint8_t* a, const uint8_t* b) { - int count; - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; - - __asm__ volatile( - "mult $zero, $zero \n\t" - - GET_SSE( 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS) - GET_SSE( 1 * BPS, 4 + 1 * BPS, 8 + 1 * BPS, 12 + 1 * BPS) - GET_SSE( 2 * BPS, 4 + 2 * BPS, 8 + 2 * BPS, 12 + 2 * BPS) - GET_SSE( 3 * BPS, 4 + 3 * BPS, 8 + 3 * BPS, 12 + 3 * BPS) - GET_SSE( 4 * BPS, 4 + 4 * BPS, 8 + 4 * BPS, 12 + 4 * BPS) - GET_SSE( 5 * BPS, 4 + 5 * BPS, 8 + 5 * BPS, 12 + 5 * BPS) - GET_SSE( 6 * BPS, 4 + 6 * BPS, 8 + 6 * BPS, 12 + 6 * BPS) - GET_SSE( 7 * BPS, 4 + 7 * BPS, 8 + 7 * BPS, 12 + 7 * BPS) - - "mflo %[count] \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [count]"=&r"(count) - : [a]"r"(a), [b]"r"(b) - : "memory", "hi", "lo" - ); - return count; -} - -static int SSE8x8_MIPS32(const uint8_t* a, const uint8_t* b) { - int count; - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; - - __asm__ volatile( - "mult $zero, $zero \n\t" - - GET_SSE(0 * BPS, 4 + 0 * BPS, 1 * BPS, 4 + 1 * BPS) - GET_SSE(2 * BPS, 4 + 2 * BPS, 3 * BPS, 4 + 3 * BPS) - GET_SSE(4 * BPS, 4 + 4 * BPS, 5 * BPS, 4 + 5 * BPS) - GET_SSE(6 * BPS, 4 + 6 * BPS, 7 * BPS, 4 + 7 * BPS) - - "mflo %[count] \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [count]"=&r"(count) - : [a]"r"(a), [b]"r"(b) - : "memory", "hi", "lo" - ); - return count; -} - -static int SSE4x4_MIPS32(const uint8_t* a, const uint8_t* b) { - int count; - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; - - __asm__ volatile( - "mult $zero, $zero \n\t" - - GET_SSE(0 * BPS, 1 * BPS, 2 * BPS, 3 * BPS) - - "mflo %[count] \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [count]"=&r"(count) - : [a]"r"(a), [b]"r"(b) - : "memory", "hi", "lo" - ); - return count; -} - -#undef GET_SSE -#undef GET_SSE_INNER - -#endif // !WORK_AROUND_GCC - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8EncDspInitMIPS32(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPS32(void) { - VP8ITransform = ITransform_MIPS32; - VP8FTransform = FTransform_MIPS32; - - VP8EncQuantizeBlock = QuantizeBlock_MIPS32; - VP8EncQuantize2Blocks = Quantize2Blocks_MIPS32; - - VP8TDisto4x4 = Disto4x4_MIPS32; - VP8TDisto16x16 = Disto16x16_MIPS32; - -#if !defined(WORK_AROUND_GCC) - VP8SSE16x16 = SSE16x16_MIPS32; - VP8SSE8x8 = SSE8x8_MIPS32; - VP8SSE16x8 = SSE16x8_MIPS32; - VP8SSE4x4 = SSE4x4_MIPS32; -#endif -} - -#else // !WEBP_USE_MIPS32 - -WEBP_DSP_INIT_STUB(VP8EncDspInitMIPS32) - -#endif // WEBP_USE_MIPS32 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_mips_dsp_r2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_mips_dsp_r2.c deleted file mode 100644 index 72f45c3..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_mips_dsp_r2.c +++ /dev/null @@ -1,1517 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MIPS version of speed-critical encoding functions. -// -// Author(s): Darko Laus (darko.laus@imgtec.com) -// Mirko Raus (mirko.raus@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS_DSP_R2) - -#include "src/dsp/mips_macro.h" -#include "src/enc/cost_enc.h" -#include "src/enc/vp8i_enc.h" - -static const int kC1 = 20091 + (1 << 16); -static const int kC2 = 35468; - -// O - output -// I - input (macro doesn't change it) -#define ADD_SUB_HALVES_X4(O0, O1, O2, O3, O4, O5, O6, O7, \ - I0, I1, I2, I3, I4, I5, I6, I7) \ - "addq.ph %[" #O0 "], %[" #I0 "], %[" #I1 "] \n\t" \ - "subq.ph %[" #O1 "], %[" #I0 "], %[" #I1 "] \n\t" \ - "addq.ph %[" #O2 "], %[" #I2 "], %[" #I3 "] \n\t" \ - "subq.ph %[" #O3 "], %[" #I2 "], %[" #I3 "] \n\t" \ - "addq.ph %[" #O4 "], %[" #I4 "], %[" #I5 "] \n\t" \ - "subq.ph %[" #O5 "], %[" #I4 "], %[" #I5 "] \n\t" \ - "addq.ph %[" #O6 "], %[" #I6 "], %[" #I7 "] \n\t" \ - "subq.ph %[" #O7 "], %[" #I6 "], %[" #I7 "] \n\t" - -// IO - input/output -#define ABS_X8(IO0, IO1, IO2, IO3, IO4, IO5, IO6, IO7) \ - "absq_s.ph %[" #IO0 "], %[" #IO0 "] \n\t" \ - "absq_s.ph %[" #IO1 "], %[" #IO1 "] \n\t" \ - "absq_s.ph %[" #IO2 "], %[" #IO2 "] \n\t" \ - "absq_s.ph %[" #IO3 "], %[" #IO3 "] \n\t" \ - "absq_s.ph %[" #IO4 "], %[" #IO4 "] \n\t" \ - "absq_s.ph %[" #IO5 "], %[" #IO5 "] \n\t" \ - "absq_s.ph %[" #IO6 "], %[" #IO6 "] \n\t" \ - "absq_s.ph %[" #IO7 "], %[" #IO7 "] \n\t" - -// dpa.w.ph $ac0 temp0 ,temp1 -// $ac += temp0[31..16] * temp1[31..16] + temp0[15..0] * temp1[15..0] -// dpax.w.ph $ac0 temp0 ,temp1 -// $ac += temp0[31..16] * temp1[15..0] + temp0[15..0] * temp1[31..16] -// O - output -// I - input (macro doesn't change it) -#define MUL_HALF(O0, I0, I1, I2, I3, I4, I5, I6, I7, \ - I8, I9, I10, I11, I12, I13, I14, I15) \ - "mult $ac0, $zero, $zero \n\t" \ - "dpa.w.ph $ac0, %[" #I2 "], %[" #I0 "] \n\t" \ - "dpax.w.ph $ac0, %[" #I5 "], %[" #I6 "] \n\t" \ - "dpa.w.ph $ac0, %[" #I8 "], %[" #I9 "] \n\t" \ - "dpax.w.ph $ac0, %[" #I11 "], %[" #I4 "] \n\t" \ - "dpa.w.ph $ac0, %[" #I12 "], %[" #I7 "] \n\t" \ - "dpax.w.ph $ac0, %[" #I13 "], %[" #I1 "] \n\t" \ - "dpa.w.ph $ac0, %[" #I14 "], %[" #I3 "] \n\t" \ - "dpax.w.ph $ac0, %[" #I15 "], %[" #I10 "] \n\t" \ - "mflo %[" #O0 "], $ac0 \n\t" - -#define OUTPUT_EARLY_CLOBBER_REGS_17() \ - OUTPUT_EARLY_CLOBBER_REGS_10(), \ - [temp11]"=&r"(temp11), [temp12]"=&r"(temp12), [temp13]"=&r"(temp13), \ - [temp14]"=&r"(temp14), [temp15]"=&r"(temp15), [temp16]"=&r"(temp16), \ - [temp17]"=&r"(temp17) - -// macro for one horizontal pass in FTransform -// temp0..temp15 holds tmp[0]..tmp[15] -// A - offset in bytes to load from src and ref buffers -// TEMP0..TEMP3 - registers for corresponding tmp elements -#define HORIZONTAL_PASS(A, TEMP0, TEMP1, TEMP2, TEMP3) \ - "lw %[" #TEMP0 "], 0(%[args]) \n\t" \ - "lw %[" #TEMP1 "], 4(%[args]) \n\t" \ - "lw %[" #TEMP2 "], " XSTR(BPS) "*" #A "(%[" #TEMP0 "]) \n\t" \ - "lw %[" #TEMP3 "], " XSTR(BPS) "*" #A "(%[" #TEMP1 "]) \n\t" \ - "preceu.ph.qbl %[" #TEMP0 "], %[" #TEMP2 "] \n\t" \ - "preceu.ph.qbl %[" #TEMP1 "], %[" #TEMP3 "] \n\t" \ - "preceu.ph.qbr %[" #TEMP2 "], %[" #TEMP2 "] \n\t" \ - "preceu.ph.qbr %[" #TEMP3 "], %[" #TEMP3 "] \n\t" \ - "subq.ph %[" #TEMP0 "], %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ - "subq.ph %[" #TEMP2 "], %[" #TEMP2 "], %[" #TEMP3 "] \n\t" \ - "rotr %[" #TEMP0 "], %[" #TEMP0 "], 16 \n\t" \ - "addq.ph %[" #TEMP1 "], %[" #TEMP2 "], %[" #TEMP0 "] \n\t" \ - "subq.ph %[" #TEMP3 "], %[" #TEMP2 "], %[" #TEMP0 "] \n\t" \ - "seh %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ - "sra %[temp16], %[" #TEMP1 "], 16 \n\t" \ - "seh %[temp19], %[" #TEMP3 "] \n\t" \ - "sra %[" #TEMP3 "], %[" #TEMP3 "], 16 \n\t" \ - "subu %[" #TEMP2 "], %[" #TEMP0 "], %[temp16] \n\t" \ - "addu %[" #TEMP0 "], %[" #TEMP0 "], %[temp16] \n\t" \ - "mul %[temp17], %[temp19], %[c2217] \n\t" \ - "mul %[temp18], %[" #TEMP3 "], %[c5352] \n\t" \ - "mul %[" #TEMP1 "], %[temp19], %[c5352] \n\t" \ - "mul %[temp16], %[" #TEMP3 "], %[c2217] \n\t" \ - "sll %[" #TEMP2 "], %[" #TEMP2 "], 3 \n\t" \ - "sll %[" #TEMP0 "], %[" #TEMP0 "], 3 \n\t" \ - "subu %[" #TEMP3 "], %[temp17], %[temp18] \n\t" \ - "addu %[" #TEMP1 "], %[temp16], %[" #TEMP1 "] \n\t" \ - "addiu %[" #TEMP3 "], %[" #TEMP3 "], 937 \n\t" \ - "addiu %[" #TEMP1 "], %[" #TEMP1 "], 1812 \n\t" \ - "sra %[" #TEMP3 "], %[" #TEMP3 "], 9 \n\t" \ - "sra %[" #TEMP1 "], %[" #TEMP1 "], 9 \n\t" - -// macro for one vertical pass in FTransform -// temp0..temp15 holds tmp[0]..tmp[15] -// A..D - offsets in bytes to store to out buffer -// TEMP0, TEMP4, TEMP8 and TEMP12 - registers for corresponding tmp elements -#define VERTICAL_PASS(A, B, C, D, TEMP0, TEMP4, TEMP8, TEMP12) \ - "addu %[temp16], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ - "subu %[temp19], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ - "addu %[temp17], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ - "subu %[temp18], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ - "mul %[" #TEMP8 "], %[temp19], %[c2217] \n\t" \ - "mul %[" #TEMP12 "], %[temp18], %[c2217] \n\t" \ - "mul %[" #TEMP4 "], %[temp19], %[c5352] \n\t" \ - "mul %[temp18], %[temp18], %[c5352] \n\t" \ - "addiu %[temp16], %[temp16], 7 \n\t" \ - "addu %[" #TEMP0 "], %[temp16], %[temp17] \n\t" \ - "sra %[" #TEMP0 "], %[" #TEMP0 "], 4 \n\t" \ - "addu %[" #TEMP12 "], %[" #TEMP12 "], %[" #TEMP4 "] \n\t" \ - "subu %[" #TEMP4 "], %[temp16], %[temp17] \n\t" \ - "sra %[" #TEMP4 "], %[" #TEMP4 "], 4 \n\t" \ - "addiu %[" #TEMP8 "], %[" #TEMP8 "], 30000 \n\t" \ - "addiu %[" #TEMP12 "], %[" #TEMP12 "], 12000 \n\t" \ - "addiu %[" #TEMP8 "], %[" #TEMP8 "], 21000 \n\t" \ - "subu %[" #TEMP8 "], %[" #TEMP8 "], %[temp18] \n\t" \ - "sra %[" #TEMP12 "], %[" #TEMP12 "], 16 \n\t" \ - "sra %[" #TEMP8 "], %[" #TEMP8 "], 16 \n\t" \ - "addiu %[temp16], %[" #TEMP12 "], 1 \n\t" \ - "movn %[" #TEMP12 "], %[temp16], %[temp19] \n\t" \ - "sh %[" #TEMP0 "], " #A "(%[temp20]) \n\t" \ - "sh %[" #TEMP4 "], " #C "(%[temp20]) \n\t" \ - "sh %[" #TEMP8 "], " #D "(%[temp20]) \n\t" \ - "sh %[" #TEMP12 "], " #B "(%[temp20]) \n\t" - -static void FTransform_MIPSdspR2(const uint8_t* src, const uint8_t* ref, - int16_t* out) { - const int c2217 = 2217; - const int c5352 = 5352; - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8; - int temp9, temp10, temp11, temp12, temp13, temp14, temp15, temp16; - int temp17, temp18, temp19, temp20; - const int* const args[3] = - { (const int*)src, (const int*)ref, (const int*)out }; - - __asm__ volatile ( - HORIZONTAL_PASS(0, temp0, temp1, temp2, temp3) - HORIZONTAL_PASS(1, temp4, temp5, temp6, temp7) - HORIZONTAL_PASS(2, temp8, temp9, temp10, temp11) - HORIZONTAL_PASS(3, temp12, temp13, temp14, temp15) - "lw %[temp20], 8(%[args]) \n\t" - VERTICAL_PASS(0, 8, 16, 24, temp0, temp4, temp8, temp12) - VERTICAL_PASS(2, 10, 18, 26, temp1, temp5, temp9, temp13) - VERTICAL_PASS(4, 12, 20, 28, temp2, temp6, temp10, temp14) - VERTICAL_PASS(6, 14, 22, 30, temp3, temp7, temp11, temp15) - OUTPUT_EARLY_CLOBBER_REGS_18(), - [temp0]"=&r"(temp0), [temp19]"=&r"(temp19), [temp20]"=&r"(temp20) - : [args]"r"(args), [c2217]"r"(c2217), [c5352]"r"(c5352) - : "memory", "hi", "lo" - ); -} - -#undef VERTICAL_PASS -#undef HORIZONTAL_PASS - -static WEBP_INLINE void ITransformOne(const uint8_t* ref, const int16_t* in, - uint8_t* dst) { - int temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9; - int temp10, temp11, temp12, temp13, temp14, temp15, temp16, temp17, temp18; - - __asm__ volatile ( - "ulw %[temp1], 0(%[in]) \n\t" - "ulw %[temp2], 16(%[in]) \n\t" - LOAD_IN_X2(temp5, temp6, 24, 26) - ADD_SUB_HALVES(temp3, temp4, temp1, temp2) - LOAD_IN_X2(temp1, temp2, 8, 10) - MUL_SHIFT_SUM(temp7, temp8, temp9, temp10, temp11, temp12, temp13, temp14, - temp10, temp8, temp9, temp7, temp1, temp2, temp5, temp6, - temp13, temp11, temp14, temp12) - INSERT_HALF_X2(temp8, temp7, temp10, temp9) - "ulw %[temp17], 4(%[in]) \n\t" - "ulw %[temp18], 20(%[in]) \n\t" - ADD_SUB_HALVES(temp1, temp2, temp3, temp8) - ADD_SUB_HALVES(temp5, temp6, temp4, temp7) - ADD_SUB_HALVES(temp7, temp8, temp17, temp18) - LOAD_IN_X2(temp17, temp18, 12, 14) - LOAD_IN_X2(temp9, temp10, 28, 30) - MUL_SHIFT_SUM(temp11, temp12, temp13, temp14, temp15, temp16, temp4, temp17, - temp12, temp14, temp11, temp13, temp17, temp18, temp9, temp10, - temp15, temp4, temp16, temp17) - INSERT_HALF_X2(temp11, temp12, temp13, temp14) - ADD_SUB_HALVES(temp17, temp8, temp8, temp11) - ADD_SUB_HALVES(temp3, temp4, temp7, temp12) - - // horizontal - SRA_16(temp9, temp10, temp11, temp12, temp1, temp2, temp5, temp6) - INSERT_HALF_X2(temp1, temp6, temp5, temp2) - SRA_16(temp13, temp14, temp15, temp16, temp3, temp4, temp17, temp8) - "repl.ph %[temp2], 0x4 \n\t" - INSERT_HALF_X2(temp3, temp8, temp17, temp4) - "addq.ph %[temp1], %[temp1], %[temp2] \n\t" - "addq.ph %[temp6], %[temp6], %[temp2] \n\t" - ADD_SUB_HALVES(temp2, temp4, temp1, temp3) - ADD_SUB_HALVES(temp5, temp7, temp6, temp8) - MUL_SHIFT_SUM(temp1, temp3, temp6, temp8, temp9, temp13, temp17, temp18, - temp3, temp13, temp1, temp9, temp9, temp13, temp11, temp15, - temp6, temp17, temp8, temp18) - MUL_SHIFT_SUM(temp6, temp8, temp18, temp17, temp11, temp15, temp12, temp16, - temp8, temp15, temp6, temp11, temp12, temp16, temp10, temp14, - temp18, temp12, temp17, temp16) - INSERT_HALF_X2(temp1, temp3, temp9, temp13) - INSERT_HALF_X2(temp6, temp8, temp11, temp15) - SHIFT_R_SUM_X2(temp9, temp10, temp11, temp12, temp13, temp14, temp15, - temp16, temp2, temp4, temp5, temp7, temp3, temp1, temp8, - temp6) - PACK_2_HALVES_TO_WORD(temp1, temp2, temp3, temp4, temp9, temp12, temp13, - temp16, temp11, temp10, temp15, temp14) - LOAD_WITH_OFFSET_X4(temp10, temp11, temp14, temp15, ref, - 0, 0, 0, 0, - 0, 1, 2, 3, - BPS) - CONVERT_2_BYTES_TO_HALF(temp5, temp6, temp7, temp8, temp17, temp18, temp10, - temp11, temp10, temp11, temp14, temp15) - STORE_SAT_SUM_X2(temp5, temp6, temp7, temp8, temp17, temp18, temp10, temp11, - temp9, temp12, temp1, temp2, temp13, temp16, temp3, temp4, - dst, 0, 1, 2, 3, BPS) - - OUTPUT_EARLY_CLOBBER_REGS_18() - : [dst]"r"(dst), [in]"r"(in), [kC1]"r"(kC1), [kC2]"r"(kC2), [ref]"r"(ref) - : "memory", "hi", "lo" - ); -} - -static void ITransform_MIPSdspR2(const uint8_t* ref, const int16_t* in, - uint8_t* dst, int do_two) { - ITransformOne(ref, in, dst); - if (do_two) { - ITransformOne(ref + 4, in + 16, dst + 4); - } -} - -static int Disto4x4_MIPSdspR2(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - int temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9; - int temp10, temp11, temp12, temp13, temp14, temp15, temp16, temp17; - - __asm__ volatile ( - LOAD_WITH_OFFSET_X4(temp1, temp2, temp3, temp4, a, - 0, 0, 0, 0, - 0, 1, 2, 3, - BPS) - CONVERT_2_BYTES_TO_HALF(temp5, temp6, temp7, temp8, temp9,temp10, temp11, - temp12, temp1, temp2, temp3, temp4) - ADD_SUB_HALVES_X4(temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, - temp5, temp6, temp7, temp8, temp9, temp10, temp11, temp12) - PACK_2_HALVES_TO_WORD(temp9, temp10, temp11, temp12, temp1, temp3, temp5, - temp7, temp2, temp4, temp6, temp8) - ADD_SUB_HALVES_X4(temp2, temp4, temp6, temp8, temp9, temp1, temp3, temp10, - temp1, temp9, temp3, temp10, temp5, temp11, temp7, temp12) - ADD_SUB_HALVES_X4(temp5, temp11, temp7, temp2, temp9, temp3, temp6, temp12, - temp2, temp9, temp6, temp3, temp4, temp1, temp8, temp10) - ADD_SUB_HALVES_X4(temp1, temp4, temp10, temp8, temp7, temp11, temp5, temp2, - temp5, temp7, temp11, temp2, temp9, temp6, temp3, temp12) - ABS_X8(temp1, temp4, temp10, temp8, temp7, temp11, temp5, temp2) - LOAD_WITH_OFFSET_X4(temp3, temp6, temp9, temp12, w, - 0, 4, 8, 12, - 0, 0, 0, 0, - 0) - LOAD_WITH_OFFSET_X4(temp13, temp14, temp15, temp16, w, - 0, 4, 8, 12, - 1, 1, 1, 1, - 16) - MUL_HALF(temp17, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, - temp9, temp10, temp11, temp12, temp13, temp14, temp15, temp16) - LOAD_WITH_OFFSET_X4(temp1, temp2, temp3, temp4, b, - 0, 0, 0, 0, - 0, 1, 2, 3, - BPS) - CONVERT_2_BYTES_TO_HALF(temp5,temp6, temp7, temp8, temp9,temp10, temp11, - temp12, temp1, temp2, temp3, temp4) - ADD_SUB_HALVES_X4(temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, - temp5, temp6, temp7, temp8, temp9, temp10, temp11, temp12) - PACK_2_HALVES_TO_WORD(temp9, temp10, temp11, temp12, temp1, temp3, temp5, - temp7, temp2, temp4, temp6, temp8) - ADD_SUB_HALVES_X4(temp2, temp4, temp6, temp8, temp9, temp1, temp3, temp10, - temp1, temp9, temp3, temp10, temp5, temp11, temp7, temp12) - ADD_SUB_HALVES_X4(temp5, temp11, temp7, temp2, temp9, temp3, temp6, temp12, - temp2, temp9, temp6, temp3, temp4, temp1, temp8, temp10) - ADD_SUB_HALVES_X4(temp1, temp4, temp10, temp8, temp7, temp11, temp5, temp2, - temp5, temp7, temp11, temp2, temp9, temp6, temp3, temp12) - ABS_X8(temp1, temp4, temp10, temp8, temp7, temp11, temp5, temp2) - LOAD_WITH_OFFSET_X4(temp3, temp6, temp9, temp12, w, - 0, 4, 8, 12, - 0, 0, 0, 0, - 0) - LOAD_WITH_OFFSET_X4(temp13, temp14, temp15, temp16, w, - 0, 4, 8, 12, - 1, 1, 1, 1, - 16) - MUL_HALF(temp3, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, - temp9, temp10, temp11, temp12, temp13, temp14, temp15, temp16) - OUTPUT_EARLY_CLOBBER_REGS_17() - : [a]"r"(a), [b]"r"(b), [w]"r"(w) - : "memory", "hi", "lo" - ); - return abs(temp3 - temp17) >> 5; -} - -static int Disto16x16_MIPSdspR2(const uint8_t* const a, - const uint8_t* const b, - const uint16_t* const w) { - int D = 0; - int x, y; - for (y = 0; y < 16 * BPS; y += 4 * BPS) { - for (x = 0; x < 16; x += 4) { - D += Disto4x4_MIPSdspR2(a + x + y, b + x + y, w); - } - } - return D; -} - -//------------------------------------------------------------------------------ -// Intra predictions - -#define FILL_PART(J, SIZE) \ - "usw %[value], 0+" #J "*" XSTR(BPS) "(%[dst]) \n\t" \ - "usw %[value], 4+" #J "*" XSTR(BPS) "(%[dst]) \n\t" \ - ".if " #SIZE " == 16 \n\t" \ - "usw %[value], 8+" #J "*" XSTR(BPS) "(%[dst]) \n\t" \ - "usw %[value], 12+" #J "*" XSTR(BPS) "(%[dst]) \n\t" \ - ".endif \n\t" - -#define FILL_8_OR_16(DST, VALUE, SIZE) do { \ - int value = (VALUE); \ - __asm__ volatile ( \ - "replv.qb %[value], %[value] \n\t" \ - FILL_PART( 0, SIZE) \ - FILL_PART( 1, SIZE) \ - FILL_PART( 2, SIZE) \ - FILL_PART( 3, SIZE) \ - FILL_PART( 4, SIZE) \ - FILL_PART( 5, SIZE) \ - FILL_PART( 6, SIZE) \ - FILL_PART( 7, SIZE) \ - ".if " #SIZE " == 16 \n\t" \ - FILL_PART( 8, 16) \ - FILL_PART( 9, 16) \ - FILL_PART(10, 16) \ - FILL_PART(11, 16) \ - FILL_PART(12, 16) \ - FILL_PART(13, 16) \ - FILL_PART(14, 16) \ - FILL_PART(15, 16) \ - ".endif \n\t" \ - : [value]"+&r"(value) \ - : [dst]"r"((DST)) \ - : "memory" \ - ); \ -} while (0) - -#define VERTICAL_PRED(DST, TOP, SIZE) \ -static WEBP_INLINE void VerticalPred##SIZE(uint8_t* (DST), \ - const uint8_t* (TOP)) { \ - int j; \ - if ((TOP)) { \ - for (j = 0; j < (SIZE); ++j) memcpy((DST) + j * BPS, (TOP), (SIZE)); \ - } else { \ - FILL_8_OR_16((DST), 127, (SIZE)); \ - } \ -} - -VERTICAL_PRED(dst, top, 8) -VERTICAL_PRED(dst, top, 16) - -#undef VERTICAL_PRED - -#define HORIZONTAL_PRED(DST, LEFT, SIZE) \ -static WEBP_INLINE void HorizontalPred##SIZE(uint8_t* (DST), \ - const uint8_t* (LEFT)) { \ - if (LEFT) { \ - int j; \ - for (j = 0; j < (SIZE); ++j) { \ - memset((DST) + j * BPS, (LEFT)[j], (SIZE)); \ - } \ - } else { \ - FILL_8_OR_16((DST), 129, (SIZE)); \ - } \ -} - -HORIZONTAL_PRED(dst, left, 8) -HORIZONTAL_PRED(dst, left, 16) - -#undef HORIZONTAL_PRED - -#define CLIPPING() \ - "preceu.ph.qbl %[temp2], %[temp0] \n\t" \ - "preceu.ph.qbr %[temp0], %[temp0] \n\t" \ - "preceu.ph.qbl %[temp3], %[temp1] \n\t" \ - "preceu.ph.qbr %[temp1], %[temp1] \n\t" \ - "addu.ph %[temp2], %[temp2], %[leftY_1] \n\t" \ - "addu.ph %[temp0], %[temp0], %[leftY_1] \n\t" \ - "addu.ph %[temp3], %[temp3], %[leftY_1] \n\t" \ - "addu.ph %[temp1], %[temp1], %[leftY_1] \n\t" \ - "shll_s.ph %[temp2], %[temp2], 7 \n\t" \ - "shll_s.ph %[temp0], %[temp0], 7 \n\t" \ - "shll_s.ph %[temp3], %[temp3], 7 \n\t" \ - "shll_s.ph %[temp1], %[temp1], 7 \n\t" \ - "precrqu_s.qb.ph %[temp0], %[temp2], %[temp0] \n\t" \ - "precrqu_s.qb.ph %[temp1], %[temp3], %[temp1] \n\t" - -#define CLIP_8B_TO_DST(DST, LEFT, TOP, SIZE) do { \ - int leftY_1 = ((int)(LEFT)[y] << 16) + (LEFT)[y]; \ - int temp0, temp1, temp2, temp3; \ - __asm__ volatile ( \ - "replv.ph %[leftY_1], %[leftY_1] \n\t" \ - "ulw %[temp0], 0(%[top]) \n\t" \ - "ulw %[temp1], 4(%[top]) \n\t" \ - "subu.ph %[leftY_1], %[leftY_1], %[left_1] \n\t" \ - CLIPPING() \ - "usw %[temp0], 0(%[dst]) \n\t" \ - "usw %[temp1], 4(%[dst]) \n\t" \ - ".if " #SIZE " == 16 \n\t" \ - "ulw %[temp0], 8(%[top]) \n\t" \ - "ulw %[temp1], 12(%[top]) \n\t" \ - CLIPPING() \ - "usw %[temp0], 8(%[dst]) \n\t" \ - "usw %[temp1], 12(%[dst]) \n\t" \ - ".endif \n\t" \ - : [leftY_1]"+&r"(leftY_1), [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), \ - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3) \ - : [left_1]"r"(left_1), [top]"r"((TOP)), [dst]"r"((DST)) \ - : "memory" \ - ); \ -} while (0) - -#define CLIP_TO_DST(DST, LEFT, TOP, SIZE) do { \ - int y; \ - const int left_1 = ((int)(LEFT)[-1] << 16) + (LEFT)[-1]; \ - for (y = 0; y < (SIZE); ++y) { \ - CLIP_8B_TO_DST((DST), (LEFT), (TOP), (SIZE)); \ - (DST) += BPS; \ - } \ -} while (0) - -#define TRUE_MOTION(DST, LEFT, TOP, SIZE) \ -static WEBP_INLINE void TrueMotion##SIZE(uint8_t* (DST), const uint8_t* (LEFT),\ - const uint8_t* (TOP)) { \ - if ((LEFT) != NULL) { \ - if ((TOP) != NULL) { \ - CLIP_TO_DST((DST), (LEFT), (TOP), (SIZE)); \ - } else { \ - HorizontalPred##SIZE((DST), (LEFT)); \ - } \ - } else { \ - /* true motion without left samples (hence: with default 129 value) */ \ - /* is equivalent to VE prediction where you just copy the top samples. */ \ - /* Note that if top samples are not available, the default value is */ \ - /* then 129, and not 127 as in the VerticalPred case. */ \ - if ((TOP) != NULL) { \ - VerticalPred##SIZE((DST), (TOP)); \ - } else { \ - FILL_8_OR_16((DST), 129, (SIZE)); \ - } \ - } \ -} - -TRUE_MOTION(dst, left, top, 8) -TRUE_MOTION(dst, left, top, 16) - -#undef TRUE_MOTION -#undef CLIP_TO_DST -#undef CLIP_8B_TO_DST -#undef CLIPPING - -static WEBP_INLINE void DCMode16(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - int DC, DC1; - int temp0, temp1, temp2, temp3; - - __asm__ volatile( - "beqz %[top], 2f \n\t" - LOAD_WITH_OFFSET_X4(temp0, temp1, temp2, temp3, top, - 0, 4, 8, 12, - 0, 0, 0, 0, - 0) - "raddu.w.qb %[temp0], %[temp0] \n\t" - "raddu.w.qb %[temp1], %[temp1] \n\t" - "raddu.w.qb %[temp2], %[temp2] \n\t" - "raddu.w.qb %[temp3], %[temp3] \n\t" - "addu %[temp0], %[temp0], %[temp1] \n\t" - "addu %[temp2], %[temp2], %[temp3] \n\t" - "addu %[DC], %[temp0], %[temp2] \n\t" - "move %[DC1], %[DC] \n\t" - "beqz %[left], 1f \n\t" - LOAD_WITH_OFFSET_X4(temp0, temp1, temp2, temp3, left, - 0, 4, 8, 12, - 0, 0, 0, 0, - 0) - "raddu.w.qb %[temp0], %[temp0] \n\t" - "raddu.w.qb %[temp1], %[temp1] \n\t" - "raddu.w.qb %[temp2], %[temp2] \n\t" - "raddu.w.qb %[temp3], %[temp3] \n\t" - "addu %[temp0], %[temp0], %[temp1] \n\t" - "addu %[temp2], %[temp2], %[temp3] \n\t" - "addu %[DC1], %[temp0], %[temp2] \n\t" - "1: \n\t" - "addu %[DC], %[DC], %[DC1] \n\t" - "j 3f \n\t" - "2: \n\t" - "beqz %[left], 4f \n\t" - LOAD_WITH_OFFSET_X4(temp0, temp1, temp2, temp3, left, - 0, 4, 8, 12, - 0, 0, 0, 0, - 0) - "raddu.w.qb %[temp0], %[temp0] \n\t" - "raddu.w.qb %[temp1], %[temp1] \n\t" - "raddu.w.qb %[temp2], %[temp2] \n\t" - "raddu.w.qb %[temp3], %[temp3] \n\t" - "addu %[temp0], %[temp0], %[temp1] \n\t" - "addu %[temp2], %[temp2], %[temp3] \n\t" - "addu %[DC], %[temp0], %[temp2] \n\t" - "addu %[DC], %[DC], %[DC] \n\t" - "3: \n\t" - "shra_r.w %[DC], %[DC], 5 \n\t" - "j 5f \n\t" - "4: \n\t" - "li %[DC], 0x80 \n\t" - "5: \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [DC]"=&r"(DC), - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), [DC1]"=&r"(DC1) - : [left]"r"(left), [top]"r"(top) - : "memory" - ); - - FILL_8_OR_16(dst, DC, 16); -} - -static WEBP_INLINE void DCMode8(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - int DC, DC1; - int temp0, temp1, temp2, temp3; - - __asm__ volatile( - "beqz %[top], 2f \n\t" - "ulw %[temp0], 0(%[top]) \n\t" - "ulw %[temp1], 4(%[top]) \n\t" - "raddu.w.qb %[temp0], %[temp0] \n\t" - "raddu.w.qb %[temp1], %[temp1] \n\t" - "addu %[DC], %[temp0], %[temp1] \n\t" - "move %[DC1], %[DC] \n\t" - "beqz %[left], 1f \n\t" - "ulw %[temp2], 0(%[left]) \n\t" - "ulw %[temp3], 4(%[left]) \n\t" - "raddu.w.qb %[temp2], %[temp2] \n\t" - "raddu.w.qb %[temp3], %[temp3] \n\t" - "addu %[DC1], %[temp2], %[temp3] \n\t" - "1: \n\t" - "addu %[DC], %[DC], %[DC1] \n\t" - "j 3f \n\t" - "2: \n\t" - "beqz %[left], 4f \n\t" - "ulw %[temp2], 0(%[left]) \n\t" - "ulw %[temp3], 4(%[left]) \n\t" - "raddu.w.qb %[temp2], %[temp2] \n\t" - "raddu.w.qb %[temp3], %[temp3] \n\t" - "addu %[DC], %[temp2], %[temp3] \n\t" - "addu %[DC], %[DC], %[DC] \n\t" - "3: \n\t" - "shra_r.w %[DC], %[DC], 4 \n\t" - "j 5f \n\t" - "4: \n\t" - "li %[DC], 0x80 \n\t" - "5: \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [DC]"=&r"(DC), - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), [DC1]"=&r"(DC1) - : [left]"r"(left), [top]"r"(top) - : "memory" - ); - - FILL_8_OR_16(dst, DC, 8); -} - -static void DC4(uint8_t* dst, const uint8_t* top) { - int temp0, temp1; - __asm__ volatile( - "ulw %[temp0], 0(%[top]) \n\t" - "ulw %[temp1], -5(%[top]) \n\t" - "raddu.w.qb %[temp0], %[temp0] \n\t" - "raddu.w.qb %[temp1], %[temp1] \n\t" - "addu %[temp0], %[temp0], %[temp1] \n\t" - "addiu %[temp0], %[temp0], 4 \n\t" - "srl %[temp0], %[temp0], 3 \n\t" - "replv.qb %[temp0], %[temp0] \n\t" - "usw %[temp0], 0*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp0], 1*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp0], 2*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp0], 3*" XSTR(BPS) "(%[dst]) \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1) - : [top]"r"(top), [dst]"r"(dst) - : "memory" - ); -} - -static void TM4(uint8_t* dst, const uint8_t* top) { - int a10, a32, temp0, temp1, temp2, temp3, temp4, temp5; - const int c35 = 0xff00ff; - __asm__ volatile ( - "lbu %[temp1], 0(%[top]) \n\t" - "lbu %[a10], 1(%[top]) \n\t" - "lbu %[temp2], 2(%[top]) \n\t" - "lbu %[a32], 3(%[top]) \n\t" - "ulw %[temp0], -5(%[top]) \n\t" - "lbu %[temp4], -1(%[top]) \n\t" - "append %[a10], %[temp1], 16 \n\t" - "append %[a32], %[temp2], 16 \n\t" - "replv.ph %[temp4], %[temp4] \n\t" - "shrl.ph %[temp1], %[temp0], 8 \n\t" - "and %[temp0], %[temp0], %[c35] \n\t" - "subu.ph %[temp1], %[temp1], %[temp4] \n\t" - "subu.ph %[temp0], %[temp0], %[temp4] \n\t" - "srl %[temp2], %[temp1], 16 \n\t" - "srl %[temp3], %[temp0], 16 \n\t" - "replv.ph %[temp2], %[temp2] \n\t" - "replv.ph %[temp3], %[temp3] \n\t" - "replv.ph %[temp4], %[temp1] \n\t" - "replv.ph %[temp5], %[temp0] \n\t" - "addu.ph %[temp0], %[temp3], %[a10] \n\t" - "addu.ph %[temp1], %[temp3], %[a32] \n\t" - "addu.ph %[temp3], %[temp2], %[a10] \n\t" - "addu.ph %[temp2], %[temp2], %[a32] \n\t" - "shll_s.ph %[temp0], %[temp0], 7 \n\t" - "shll_s.ph %[temp1], %[temp1], 7 \n\t" - "shll_s.ph %[temp3], %[temp3], 7 \n\t" - "shll_s.ph %[temp2], %[temp2], 7 \n\t" - "precrqu_s.qb.ph %[temp0], %[temp1], %[temp0] \n\t" - "precrqu_s.qb.ph %[temp1], %[temp2], %[temp3] \n\t" - "addu.ph %[temp2], %[temp5], %[a10] \n\t" - "addu.ph %[temp3], %[temp5], %[a32] \n\t" - "addu.ph %[temp5], %[temp4], %[a10] \n\t" - "addu.ph %[temp4], %[temp4], %[a32] \n\t" - "shll_s.ph %[temp2], %[temp2], 7 \n\t" - "shll_s.ph %[temp3], %[temp3], 7 \n\t" - "shll_s.ph %[temp4], %[temp4], 7 \n\t" - "shll_s.ph %[temp5], %[temp5], 7 \n\t" - "precrqu_s.qb.ph %[temp2], %[temp3], %[temp2] \n\t" - "precrqu_s.qb.ph %[temp3], %[temp4], %[temp5] \n\t" - "usw %[temp1], 0*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp0], 1*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp3], 2*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp2], 3*" XSTR(BPS) "(%[dst]) \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [a10]"=&r"(a10), [a32]"=&r"(a32) - : [c35]"r"(c35), [top]"r"(top), [dst]"r"(dst) - : "memory" - ); -} - -static void VE4(uint8_t* dst, const uint8_t* top) { - int temp0, temp1, temp2, temp3, temp4, temp5, temp6; - __asm__ volatile( - "ulw %[temp0], -1(%[top]) \n\t" - "ulh %[temp1], 3(%[top]) \n\t" - "preceu.ph.qbr %[temp2], %[temp0] \n\t" - "preceu.ph.qbl %[temp3], %[temp0] \n\t" - "preceu.ph.qbr %[temp4], %[temp1] \n\t" - "packrl.ph %[temp5], %[temp3], %[temp2] \n\t" - "packrl.ph %[temp6], %[temp4], %[temp3] \n\t" - "shll.ph %[temp5], %[temp5], 1 \n\t" - "shll.ph %[temp6], %[temp6], 1 \n\t" - "addq.ph %[temp2], %[temp5], %[temp2] \n\t" - "addq.ph %[temp6], %[temp6], %[temp4] \n\t" - "addq.ph %[temp2], %[temp2], %[temp3] \n\t" - "addq.ph %[temp6], %[temp6], %[temp3] \n\t" - "shra_r.ph %[temp2], %[temp2], 2 \n\t" - "shra_r.ph %[temp6], %[temp6], 2 \n\t" - "precr.qb.ph %[temp4], %[temp6], %[temp2] \n\t" - "usw %[temp4], 0*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp4], 1*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp4], 2*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp4], 3*" XSTR(BPS) "(%[dst]) \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6) - : [top]"r"(top), [dst]"r"(dst) - : "memory" - ); -} - -static void HE4(uint8_t* dst, const uint8_t* top) { - int temp0, temp1, temp2, temp3, temp4, temp5, temp6; - __asm__ volatile( - "ulw %[temp0], -4(%[top]) \n\t" - "lbu %[temp1], -5(%[top]) \n\t" - "preceu.ph.qbr %[temp2], %[temp0] \n\t" - "preceu.ph.qbl %[temp3], %[temp0] \n\t" - "replv.ph %[temp4], %[temp1] \n\t" - "packrl.ph %[temp5], %[temp3], %[temp2] \n\t" - "packrl.ph %[temp6], %[temp2], %[temp4] \n\t" - "shll.ph %[temp5], %[temp5], 1 \n\t" - "shll.ph %[temp6], %[temp6], 1 \n\t" - "addq.ph %[temp3], %[temp3], %[temp5] \n\t" - "addq.ph %[temp3], %[temp3], %[temp2] \n\t" - "addq.ph %[temp2], %[temp2], %[temp6] \n\t" - "addq.ph %[temp2], %[temp2], %[temp4] \n\t" - "shra_r.ph %[temp3], %[temp3], 2 \n\t" - "shra_r.ph %[temp2], %[temp2], 2 \n\t" - "replv.qb %[temp0], %[temp3] \n\t" - "replv.qb %[temp1], %[temp2] \n\t" - "srl %[temp3], %[temp3], 16 \n\t" - "srl %[temp2], %[temp2], 16 \n\t" - "replv.qb %[temp3], %[temp3] \n\t" - "replv.qb %[temp2], %[temp2] \n\t" - "usw %[temp3], 0*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp0], 1*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp2], 2*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp1], 3*" XSTR(BPS) "(%[dst]) \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6) - : [top]"r"(top), [dst]"r"(dst) - : "memory" - ); -} - -static void RD4(uint8_t* dst, const uint8_t* top) { - int temp0, temp1, temp2, temp3, temp4, temp5; - int temp6, temp7, temp8, temp9, temp10, temp11; - __asm__ volatile( - "ulw %[temp0], -5(%[top]) \n\t" - "ulw %[temp1], -1(%[top]) \n\t" - "preceu.ph.qbl %[temp2], %[temp0] \n\t" - "preceu.ph.qbr %[temp3], %[temp0] \n\t" - "preceu.ph.qbr %[temp4], %[temp1] \n\t" - "preceu.ph.qbl %[temp5], %[temp1] \n\t" - "packrl.ph %[temp6], %[temp2], %[temp3] \n\t" - "packrl.ph %[temp7], %[temp4], %[temp2] \n\t" - "packrl.ph %[temp8], %[temp5], %[temp4] \n\t" - "shll.ph %[temp6], %[temp6], 1 \n\t" - "addq.ph %[temp9], %[temp2], %[temp6] \n\t" - "shll.ph %[temp7], %[temp7], 1 \n\t" - "addq.ph %[temp9], %[temp9], %[temp3] \n\t" - "shll.ph %[temp8], %[temp8], 1 \n\t" - "shra_r.ph %[temp9], %[temp9], 2 \n\t" - "addq.ph %[temp10], %[temp4], %[temp7] \n\t" - "addq.ph %[temp11], %[temp5], %[temp8] \n\t" - "addq.ph %[temp10], %[temp10], %[temp2] \n\t" - "addq.ph %[temp11], %[temp11], %[temp4] \n\t" - "shra_r.ph %[temp10], %[temp10], 2 \n\t" - "shra_r.ph %[temp11], %[temp11], 2 \n\t" - "lbu %[temp0], 3(%[top]) \n\t" - "lbu %[temp1], 2(%[top]) \n\t" - "lbu %[temp2], 1(%[top]) \n\t" - "sll %[temp1], %[temp1], 1 \n\t" - "addu %[temp0], %[temp0], %[temp1] \n\t" - "addu %[temp0], %[temp0], %[temp2] \n\t" - "precr.qb.ph %[temp9], %[temp10], %[temp9] \n\t" - "shra_r.w %[temp0], %[temp0], 2 \n\t" - "precr.qb.ph %[temp10], %[temp11], %[temp10] \n\t" - "usw %[temp9], 3*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp10], 1*" XSTR(BPS) "(%[dst]) \n\t" - "prepend %[temp9], %[temp11], 8 \n\t" - "prepend %[temp10], %[temp0], 8 \n\t" - "usw %[temp9], 2*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp10], 0*" XSTR(BPS) "(%[dst]) \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [temp9]"=&r"(temp9), [temp10]"=&r"(temp10), [temp11]"=&r"(temp11) - : [top]"r"(top), [dst]"r"(dst) - : "memory" - ); -} - -static void VR4(uint8_t* dst, const uint8_t* top) { - int temp0, temp1, temp2, temp3, temp4; - int temp5, temp6, temp7, temp8, temp9; - __asm__ volatile ( - "ulw %[temp0], -4(%[top]) \n\t" - "ulw %[temp1], 0(%[top]) \n\t" - "preceu.ph.qbl %[temp2], %[temp0] \n\t" - "preceu.ph.qbr %[temp0], %[temp0] \n\t" - "preceu.ph.qbla %[temp3], %[temp1] \n\t" - "preceu.ph.qbra %[temp1], %[temp1] \n\t" - "packrl.ph %[temp7], %[temp3], %[temp2] \n\t" - "addqh_r.ph %[temp4], %[temp1], %[temp3] \n\t" - "move %[temp6], %[temp1] \n\t" - "append %[temp1], %[temp2], 16 \n\t" - "shll.ph %[temp9], %[temp6], 1 \n\t" - "addqh_r.ph %[temp5], %[temp7], %[temp6] \n\t" - "shll.ph %[temp8], %[temp7], 1 \n\t" - "addu.ph %[temp3], %[temp7], %[temp3] \n\t" - "addu.ph %[temp1], %[temp1], %[temp6] \n\t" - "packrl.ph %[temp7], %[temp2], %[temp0] \n\t" - "addu.ph %[temp6], %[temp0], %[temp2] \n\t" - "addu.ph %[temp3], %[temp3], %[temp9] \n\t" - "addu.ph %[temp1], %[temp1], %[temp8] \n\t" - "shll.ph %[temp7], %[temp7], 1 \n\t" - "shra_r.ph %[temp3], %[temp3], 2 \n\t" - "shra_r.ph %[temp1], %[temp1], 2 \n\t" - "addu.ph %[temp6], %[temp6], %[temp7] \n\t" - "shra_r.ph %[temp6], %[temp6], 2 \n\t" - "precrq.ph.w %[temp8], %[temp4], %[temp5] \n\t" - "append %[temp4], %[temp5], 16 \n\t" - "precrq.ph.w %[temp2], %[temp3], %[temp1] \n\t" - "append %[temp3], %[temp1], 16 \n\t" - "precr.qb.ph %[temp8], %[temp8], %[temp4] \n\t" - "precr.qb.ph %[temp3], %[temp2], %[temp3] \n\t" - "usw %[temp8], 0*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp3], 1*" XSTR(BPS) "(%[dst]) \n\t" - "append %[temp3], %[temp6], 8 \n\t" - "srl %[temp6], %[temp6], 16 \n\t" - "append %[temp8], %[temp6], 8 \n\t" - "usw %[temp3], 3*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp8], 2*" XSTR(BPS) "(%[dst]) \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [temp9]"=&r"(temp9) - : [top]"r"(top), [dst]"r"(dst) - : "memory" - ); -} - -static void LD4(uint8_t* dst, const uint8_t* top) { - int temp0, temp1, temp2, temp3, temp4, temp5; - int temp6, temp7, temp8, temp9, temp10, temp11; - __asm__ volatile( - "ulw %[temp0], 0(%[top]) \n\t" - "ulw %[temp1], 4(%[top]) \n\t" - "preceu.ph.qbl %[temp2], %[temp0] \n\t" - "preceu.ph.qbr %[temp3], %[temp0] \n\t" - "preceu.ph.qbr %[temp4], %[temp1] \n\t" - "preceu.ph.qbl %[temp5], %[temp1] \n\t" - "packrl.ph %[temp6], %[temp2], %[temp3] \n\t" - "packrl.ph %[temp7], %[temp4], %[temp2] \n\t" - "packrl.ph %[temp8], %[temp5], %[temp4] \n\t" - "shll.ph %[temp6], %[temp6], 1 \n\t" - "addq.ph %[temp9], %[temp2], %[temp6] \n\t" - "shll.ph %[temp7], %[temp7], 1 \n\t" - "addq.ph %[temp9], %[temp9], %[temp3] \n\t" - "shll.ph %[temp8], %[temp8], 1 \n\t" - "shra_r.ph %[temp9], %[temp9], 2 \n\t" - "addq.ph %[temp10], %[temp4], %[temp7] \n\t" - "addq.ph %[temp11], %[temp5], %[temp8] \n\t" - "addq.ph %[temp10], %[temp10], %[temp2] \n\t" - "addq.ph %[temp11], %[temp11], %[temp4] \n\t" - "shra_r.ph %[temp10], %[temp10], 2 \n\t" - "shra_r.ph %[temp11], %[temp11], 2 \n\t" - "srl %[temp1], %[temp1], 24 \n\t" - "sll %[temp1], %[temp1], 1 \n\t" - "raddu.w.qb %[temp5], %[temp5] \n\t" - "precr.qb.ph %[temp9], %[temp10], %[temp9] \n\t" - "precr.qb.ph %[temp10], %[temp11], %[temp10] \n\t" - "addu %[temp1], %[temp1], %[temp5] \n\t" - "shra_r.w %[temp1], %[temp1], 2 \n\t" - "usw %[temp9], 0*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp10], 2*" XSTR(BPS) "(%[dst]) \n\t" - "prepend %[temp9], %[temp11], 8 \n\t" - "prepend %[temp10], %[temp1], 8 \n\t" - "usw %[temp9], 1*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp10], 3*" XSTR(BPS) "(%[dst]) \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [temp9]"=&r"(temp9), [temp10]"=&r"(temp10), [temp11]"=&r"(temp11) - : [top]"r"(top), [dst]"r"(dst) - : "memory" - ); -} - -static void VL4(uint8_t* dst, const uint8_t* top) { - int temp0, temp1, temp2, temp3, temp4; - int temp5, temp6, temp7, temp8, temp9; - __asm__ volatile ( - "ulw %[temp0], 0(%[top]) \n\t" - "ulw %[temp1], 4(%[top]) \n\t" - "preceu.ph.qbla %[temp2], %[temp0] \n\t" - "preceu.ph.qbra %[temp0], %[temp0] \n\t" - "preceu.ph.qbl %[temp3], %[temp1] \n\t" - "preceu.ph.qbr %[temp1], %[temp1] \n\t" - "addqh_r.ph %[temp4], %[temp0], %[temp2] \n\t" - "packrl.ph %[temp7], %[temp1], %[temp0] \n\t" - "precrq.ph.w %[temp6], %[temp1], %[temp2] \n\t" - "shll.ph %[temp9], %[temp2], 1 \n\t" - "addqh_r.ph %[temp5], %[temp7], %[temp2] \n\t" - "shll.ph %[temp8], %[temp7], 1 \n\t" - "addu.ph %[temp2], %[temp2], %[temp6] \n\t" - "addu.ph %[temp0], %[temp0], %[temp7] \n\t" - "packrl.ph %[temp7], %[temp3], %[temp1] \n\t" - "addu.ph %[temp6], %[temp1], %[temp3] \n\t" - "addu.ph %[temp2], %[temp2], %[temp8] \n\t" - "addu.ph %[temp0], %[temp0], %[temp9] \n\t" - "shll.ph %[temp7], %[temp7], 1 \n\t" - "shra_r.ph %[temp2], %[temp2], 2 \n\t" - "shra_r.ph %[temp0], %[temp0], 2 \n\t" - "addu.ph %[temp6], %[temp6], %[temp7] \n\t" - "shra_r.ph %[temp6], %[temp6], 2 \n\t" - "precrq.ph.w %[temp8], %[temp5], %[temp4] \n\t" - "append %[temp5], %[temp4], 16 \n\t" - "precrq.ph.w %[temp3], %[temp2], %[temp0] \n\t" - "append %[temp2], %[temp0], 16 \n\t" - "precr.qb.ph %[temp8], %[temp8], %[temp5] \n\t" - "precr.qb.ph %[temp3], %[temp3], %[temp2] \n\t" - "usw %[temp8], 0*" XSTR(BPS) "(%[dst]) \n\t" - "prepend %[temp8], %[temp6], 8 \n\t" - "usw %[temp3], 1*" XSTR(BPS) "(%[dst]) \n\t" - "srl %[temp6], %[temp6], 16 \n\t" - "prepend %[temp3], %[temp6], 8 \n\t" - "usw %[temp8], 2*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp3], 3*" XSTR(BPS) "(%[dst]) \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [temp9]"=&r"(temp9) - : [top]"r"(top), [dst]"r"(dst) - : "memory" - ); -} - -static void HD4(uint8_t* dst, const uint8_t* top) { - int temp0, temp1, temp2, temp3, temp4; - int temp5, temp6, temp7, temp8, temp9; - __asm__ volatile ( - "ulw %[temp0], -5(%[top]) \n\t" - "ulw %[temp1], -1(%[top]) \n\t" - "preceu.ph.qbla %[temp2], %[temp0] \n\t" - "preceu.ph.qbra %[temp0], %[temp0] \n\t" - "preceu.ph.qbl %[temp3], %[temp1] \n\t" - "preceu.ph.qbr %[temp1], %[temp1] \n\t" - "addqh_r.ph %[temp4], %[temp0], %[temp2] \n\t" - "packrl.ph %[temp7], %[temp1], %[temp0] \n\t" - "precrq.ph.w %[temp6], %[temp1], %[temp2] \n\t" - "shll.ph %[temp9], %[temp2], 1 \n\t" - "addqh_r.ph %[temp5], %[temp7], %[temp2] \n\t" - "shll.ph %[temp8], %[temp7], 1 \n\t" - "addu.ph %[temp2], %[temp2], %[temp6] \n\t" - "addu.ph %[temp0], %[temp0], %[temp7] \n\t" - "packrl.ph %[temp7], %[temp3], %[temp1] \n\t" - "addu.ph %[temp6], %[temp1], %[temp3] \n\t" - "addu.ph %[temp2], %[temp2], %[temp8] \n\t" - "addu.ph %[temp0], %[temp0], %[temp9] \n\t" - "shll.ph %[temp7], %[temp7], 1 \n\t" - "shra_r.ph %[temp2], %[temp2], 2 \n\t" - "shra_r.ph %[temp0], %[temp0], 2 \n\t" - "addu.ph %[temp6], %[temp6], %[temp7] \n\t" - "shra_r.ph %[temp6], %[temp6], 2 \n\t" - "precrq.ph.w %[temp1], %[temp2], %[temp5] \n\t" - "precrq.ph.w %[temp3], %[temp0], %[temp4] \n\t" - "precr.qb.ph %[temp7], %[temp6], %[temp1] \n\t" - "precr.qb.ph %[temp6], %[temp1], %[temp3] \n\t" - "usw %[temp7], 0*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp6], 1*" XSTR(BPS) "(%[dst]) \n\t" - "append %[temp2], %[temp5], 16 \n\t" - "append %[temp0], %[temp4], 16 \n\t" - "precr.qb.ph %[temp5], %[temp3], %[temp2] \n\t" - "precr.qb.ph %[temp4], %[temp2], %[temp0] \n\t" - "usw %[temp5], 2*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp4], 3*" XSTR(BPS) "(%[dst]) \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [temp9]"=&r"(temp9) - : [top]"r"(top), [dst]"r"(dst) - : "memory" - ); -} - -static void HU4(uint8_t* dst, const uint8_t* top) { - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; - __asm__ volatile ( - "ulw %[temp0], -5(%[top]) \n\t" - "preceu.ph.qbl %[temp1], %[temp0] \n\t" - "preceu.ph.qbr %[temp2], %[temp0] \n\t" - "packrl.ph %[temp3], %[temp1], %[temp2] \n\t" - "replv.qb %[temp7], %[temp2] \n\t" - "addqh_r.ph %[temp4], %[temp1], %[temp3] \n\t" - "addqh_r.ph %[temp5], %[temp3], %[temp2] \n\t" - "shll.ph %[temp6], %[temp3], 1 \n\t" - "addu.ph %[temp3], %[temp2], %[temp3] \n\t" - "addu.ph %[temp6], %[temp1], %[temp6] \n\t" - "shll.ph %[temp0], %[temp2], 1 \n\t" - "addu.ph %[temp6], %[temp6], %[temp2] \n\t" - "addu.ph %[temp0], %[temp3], %[temp0] \n\t" - "shra_r.ph %[temp6], %[temp6], 2 \n\t" - "shra_r.ph %[temp0], %[temp0], 2 \n\t" - "packrl.ph %[temp3], %[temp6], %[temp5] \n\t" - "precrq.ph.w %[temp2], %[temp6], %[temp4] \n\t" - "append %[temp0], %[temp5], 16 \n\t" - "precr.qb.ph %[temp3], %[temp3], %[temp2] \n\t" - "usw %[temp3], 0*" XSTR(BPS) "(%[dst]) \n\t" - "precr.qb.ph %[temp1], %[temp7], %[temp0] \n\t" - "usw %[temp7], 3*" XSTR(BPS) "(%[dst]) \n\t" - "packrl.ph %[temp2], %[temp1], %[temp3] \n\t" - "usw %[temp1], 2*" XSTR(BPS) "(%[dst]) \n\t" - "usw %[temp2], 1*" XSTR(BPS) "(%[dst]) \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7) - : [top]"r"(top), [dst]"r"(dst) - : "memory" - ); -} - -//------------------------------------------------------------------------------ -// Chroma 8x8 prediction (paragraph 12.2) - -static void IntraChromaPreds_MIPSdspR2(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - // U block - DCMode8(C8DC8 + dst, left, top); - VerticalPred8(C8VE8 + dst, top); - HorizontalPred8(C8HE8 + dst, left); - TrueMotion8(C8TM8 + dst, left, top); - // V block - dst += 8; - if (top) top += 8; - if (left) left += 16; - DCMode8(C8DC8 + dst, left, top); - VerticalPred8(C8VE8 + dst, top); - HorizontalPred8(C8HE8 + dst, left); - TrueMotion8(C8TM8 + dst, left, top); -} - -//------------------------------------------------------------------------------ -// luma 16x16 prediction (paragraph 12.3) - -static void Intra16Preds_MIPSdspR2(uint8_t* dst, - const uint8_t* left, const uint8_t* top) { - DCMode16(I16DC16 + dst, left, top); - VerticalPred16(I16VE16 + dst, top); - HorizontalPred16(I16HE16 + dst, left); - TrueMotion16(I16TM16 + dst, left, top); -} - -// Left samples are top[-5 .. -2], top_left is top[-1], top are -// located at top[0..3], and top right is top[4..7] -static void Intra4Preds_MIPSdspR2(uint8_t* dst, const uint8_t* top) { - DC4(I4DC4 + dst, top); - TM4(I4TM4 + dst, top); - VE4(I4VE4 + dst, top); - HE4(I4HE4 + dst, top); - RD4(I4RD4 + dst, top); - VR4(I4VR4 + dst, top); - LD4(I4LD4 + dst, top); - VL4(I4VL4 + dst, top); - HD4(I4HD4 + dst, top); - HU4(I4HU4 + dst, top); -} - -//------------------------------------------------------------------------------ -// Metric - -#if !defined(WORK_AROUND_GCC) - -#define GET_SSE_INNER(A) \ - "lw %[temp0], " #A "(%[a]) \n\t" \ - "lw %[temp1], " #A "(%[b]) \n\t" \ - "preceu.ph.qbr %[temp2], %[temp0] \n\t" \ - "preceu.ph.qbl %[temp0], %[temp0] \n\t" \ - "preceu.ph.qbr %[temp3], %[temp1] \n\t" \ - "preceu.ph.qbl %[temp1], %[temp1] \n\t" \ - "subq.ph %[temp2], %[temp2], %[temp3] \n\t" \ - "subq.ph %[temp0], %[temp0], %[temp1] \n\t" \ - "dpa.w.ph $ac0, %[temp2], %[temp2] \n\t" \ - "dpa.w.ph $ac0, %[temp0], %[temp0] \n\t" - -#define GET_SSE(A, B, C, D) \ - GET_SSE_INNER(A) \ - GET_SSE_INNER(B) \ - GET_SSE_INNER(C) \ - GET_SSE_INNER(D) - -static int SSE16x16_MIPSdspR2(const uint8_t* a, const uint8_t* b) { - int count; - int temp0, temp1, temp2, temp3; - __asm__ volatile ( - "mult $zero, $zero \n\t" - GET_SSE( 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS) - GET_SSE( 1 * BPS, 4 + 1 * BPS, 8 + 1 * BPS, 12 + 1 * BPS) - GET_SSE( 2 * BPS, 4 + 2 * BPS, 8 + 2 * BPS, 12 + 2 * BPS) - GET_SSE( 3 * BPS, 4 + 3 * BPS, 8 + 3 * BPS, 12 + 3 * BPS) - GET_SSE( 4 * BPS, 4 + 4 * BPS, 8 + 4 * BPS, 12 + 4 * BPS) - GET_SSE( 5 * BPS, 4 + 5 * BPS, 8 + 5 * BPS, 12 + 5 * BPS) - GET_SSE( 6 * BPS, 4 + 6 * BPS, 8 + 6 * BPS, 12 + 6 * BPS) - GET_SSE( 7 * BPS, 4 + 7 * BPS, 8 + 7 * BPS, 12 + 7 * BPS) - GET_SSE( 8 * BPS, 4 + 8 * BPS, 8 + 8 * BPS, 12 + 8 * BPS) - GET_SSE( 9 * BPS, 4 + 9 * BPS, 8 + 9 * BPS, 12 + 9 * BPS) - GET_SSE(10 * BPS, 4 + 10 * BPS, 8 + 10 * BPS, 12 + 10 * BPS) - GET_SSE(11 * BPS, 4 + 11 * BPS, 8 + 11 * BPS, 12 + 11 * BPS) - GET_SSE(12 * BPS, 4 + 12 * BPS, 8 + 12 * BPS, 12 + 12 * BPS) - GET_SSE(13 * BPS, 4 + 13 * BPS, 8 + 13 * BPS, 12 + 13 * BPS) - GET_SSE(14 * BPS, 4 + 14 * BPS, 8 + 14 * BPS, 12 + 14 * BPS) - GET_SSE(15 * BPS, 4 + 15 * BPS, 8 + 15 * BPS, 12 + 15 * BPS) - "mflo %[count] \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [count]"=&r"(count) - : [a]"r"(a), [b]"r"(b) - : "memory", "hi", "lo" - ); - return count; -} - -static int SSE16x8_MIPSdspR2(const uint8_t* a, const uint8_t* b) { - int count; - int temp0, temp1, temp2, temp3; - __asm__ volatile ( - "mult $zero, $zero \n\t" - GET_SSE( 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS) - GET_SSE( 1 * BPS, 4 + 1 * BPS, 8 + 1 * BPS, 12 + 1 * BPS) - GET_SSE( 2 * BPS, 4 + 2 * BPS, 8 + 2 * BPS, 12 + 2 * BPS) - GET_SSE( 3 * BPS, 4 + 3 * BPS, 8 + 3 * BPS, 12 + 3 * BPS) - GET_SSE( 4 * BPS, 4 + 4 * BPS, 8 + 4 * BPS, 12 + 4 * BPS) - GET_SSE( 5 * BPS, 4 + 5 * BPS, 8 + 5 * BPS, 12 + 5 * BPS) - GET_SSE( 6 * BPS, 4 + 6 * BPS, 8 + 6 * BPS, 12 + 6 * BPS) - GET_SSE( 7 * BPS, 4 + 7 * BPS, 8 + 7 * BPS, 12 + 7 * BPS) - "mflo %[count] \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [count]"=&r"(count) - : [a]"r"(a), [b]"r"(b) - : "memory", "hi", "lo" - ); - return count; -} - -static int SSE8x8_MIPSdspR2(const uint8_t* a, const uint8_t* b) { - int count; - int temp0, temp1, temp2, temp3; - __asm__ volatile ( - "mult $zero, $zero \n\t" - GET_SSE(0 * BPS, 4 + 0 * BPS, 1 * BPS, 4 + 1 * BPS) - GET_SSE(2 * BPS, 4 + 2 * BPS, 3 * BPS, 4 + 3 * BPS) - GET_SSE(4 * BPS, 4 + 4 * BPS, 5 * BPS, 4 + 5 * BPS) - GET_SSE(6 * BPS, 4 + 6 * BPS, 7 * BPS, 4 + 7 * BPS) - "mflo %[count] \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [count]"=&r"(count) - : [a]"r"(a), [b]"r"(b) - : "memory", "hi", "lo" - ); - return count; -} - -static int SSE4x4_MIPSdspR2(const uint8_t* a, const uint8_t* b) { - int count; - int temp0, temp1, temp2, temp3; - __asm__ volatile ( - "mult $zero, $zero \n\t" - GET_SSE(0 * BPS, 1 * BPS, 2 * BPS, 3 * BPS) - "mflo %[count] \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [count]"=&r"(count) - : [a]"r"(a), [b]"r"(b) - : "memory", "hi", "lo" - ); - return count; -} - -#undef GET_SSE -#undef GET_SSE_INNER - -#endif // !WORK_AROUND_GCC - -#undef FILL_8_OR_16 -#undef FILL_PART -#undef OUTPUT_EARLY_CLOBBER_REGS_17 -#undef MUL_HALF -#undef ABS_X8 -#undef ADD_SUB_HALVES_X4 - -//------------------------------------------------------------------------------ -// Quantization -// - -// macro for one pass through for loop in QuantizeBlock reading 2 values at time -// QUANTDIV macro inlined -// J - offset in bytes (kZigzag[n] * 2) -// K - offset in bytes (kZigzag[n] * 4) -// N - offset in bytes (n * 2) -// N1 - offset in bytes ((n + 1) * 2) -#define QUANTIZE_ONE(J, K, N, N1) \ - "ulw %[temp1], " #J "(%[ppin]) \n\t" \ - "ulw %[temp2], " #J "(%[ppsharpen]) \n\t" \ - "lhu %[temp3], " #K "(%[ppzthresh]) \n\t" \ - "lhu %[temp6], " #K "+4(%[ppzthresh]) \n\t" \ - "absq_s.ph %[temp4], %[temp1] \n\t" \ - "ins %[temp3], %[temp6], 16, 16 \n\t" \ - "addu.ph %[coeff], %[temp4], %[temp2] \n\t" \ - "shra.ph %[sign], %[temp1], 15 \n\t" \ - "li %[level], 0x10001 \n\t" \ - "cmp.lt.ph %[temp3], %[coeff] \n\t" \ - "lhu %[temp1], " #J "(%[ppiq]) \n\t" \ - "pick.ph %[temp5], %[level], $0 \n\t" \ - "lw %[temp2], " #K "(%[ppbias]) \n\t" \ - "beqz %[temp5], 0f \n\t" \ - "lhu %[temp3], " #J "(%[ppq]) \n\t" \ - "beq %[temp5], %[level], 1f \n\t" \ - "andi %[temp5], %[temp5], 0x1 \n\t" \ - "andi %[temp4], %[coeff], 0xffff \n\t" \ - "beqz %[temp5], 2f \n\t" \ - "mul %[level], %[temp4], %[temp1] \n\t" \ - "sh $0, " #J "+2(%[ppin]) \n\t" \ - "sh $0, " #N1 "(%[pout]) \n\t" \ - "addu %[level], %[level], %[temp2] \n\t" \ - "sra %[level], %[level], 17 \n\t" \ - "slt %[temp4], %[max_level], %[level] \n\t" \ - "movn %[level], %[max_level], %[temp4] \n\t" \ - "andi %[temp6], %[sign], 0xffff \n\t" \ - "xor %[level], %[level], %[temp6] \n\t" \ - "subu %[level], %[level], %[temp6] \n\t" \ - "mul %[temp5], %[level], %[temp3] \n\t" \ - "or %[ret], %[ret], %[level] \n\t" \ - "sh %[level], " #N "(%[pout]) \n\t" \ - "sh %[temp5], " #J "(%[ppin]) \n\t" \ - "j 3f \n\t" \ -"2: \n\t" \ - "lhu %[temp1], " #J "+2(%[ppiq]) \n\t" \ - "srl %[temp5], %[coeff], 16 \n\t" \ - "mul %[level], %[temp5], %[temp1] \n\t" \ - "lw %[temp2], " #K "+4(%[ppbias]) \n\t" \ - "lhu %[temp3], " #J "+2(%[ppq]) \n\t" \ - "addu %[level], %[level], %[temp2] \n\t" \ - "sra %[level], %[level], 17 \n\t" \ - "srl %[temp6], %[sign], 16 \n\t" \ - "slt %[temp4], %[max_level], %[level] \n\t" \ - "movn %[level], %[max_level], %[temp4] \n\t" \ - "xor %[level], %[level], %[temp6] \n\t" \ - "subu %[level], %[level], %[temp6] \n\t" \ - "mul %[temp5], %[level], %[temp3] \n\t" \ - "sh $0, " #J "(%[ppin]) \n\t" \ - "sh $0, " #N "(%[pout]) \n\t" \ - "or %[ret], %[ret], %[level] \n\t" \ - "sh %[temp5], " #J "+2(%[ppin]) \n\t" \ - "sh %[level], " #N1 "(%[pout]) \n\t" \ - "j 3f \n\t" \ -"1: \n\t" \ - "lhu %[temp1], " #J "(%[ppiq]) \n\t" \ - "lw %[temp2], " #K "(%[ppbias]) \n\t" \ - "ulw %[temp3], " #J "(%[ppq]) \n\t" \ - "andi %[temp5], %[coeff], 0xffff \n\t" \ - "srl %[temp0], %[coeff], 16 \n\t" \ - "lhu %[temp6], " #J "+2(%[ppiq]) \n\t" \ - "lw %[coeff], " #K "+4(%[ppbias]) \n\t" \ - "mul %[level], %[temp5], %[temp1] \n\t" \ - "mul %[temp4], %[temp0], %[temp6] \n\t" \ - "addu %[level], %[level], %[temp2] \n\t" \ - "addu %[temp4], %[temp4], %[coeff] \n\t" \ - "precrq.ph.w %[level], %[temp4], %[level] \n\t" \ - "shra.ph %[level], %[level], 1 \n\t" \ - "cmp.lt.ph %[max_level1],%[level] \n\t" \ - "pick.ph %[level], %[max_level], %[level] \n\t" \ - "xor %[level], %[level], %[sign] \n\t" \ - "subu.ph %[level], %[level], %[sign] \n\t" \ - "mul.ph %[temp3], %[level], %[temp3] \n\t" \ - "or %[ret], %[ret], %[level] \n\t" \ - "sh %[level], " #N "(%[pout]) \n\t" \ - "srl %[level], %[level], 16 \n\t" \ - "sh %[level], " #N1 "(%[pout]) \n\t" \ - "usw %[temp3], " #J "(%[ppin]) \n\t" \ - "j 3f \n\t" \ -"0: \n\t" \ - "sh $0, " #N "(%[pout]) \n\t" \ - "sh $0, " #N1 "(%[pout]) \n\t" \ - "usw $0, " #J "(%[ppin]) \n\t" \ -"3: \n\t" - -static int QuantizeBlock_MIPSdspR2(int16_t in[16], int16_t out[16], - const VP8Matrix* const mtx) { - int temp0, temp1, temp2, temp3, temp4, temp5,temp6; - int sign, coeff, level; - int max_level = MAX_LEVEL; - int max_level1 = max_level << 16 | max_level; - int ret = 0; - - int16_t* ppin = &in[0]; - int16_t* pout = &out[0]; - const uint16_t* ppsharpen = &mtx->sharpen_[0]; - const uint32_t* ppzthresh = &mtx->zthresh_[0]; - const uint16_t* ppq = &mtx->q_[0]; - const uint16_t* ppiq = &mtx->iq_[0]; - const uint32_t* ppbias = &mtx->bias_[0]; - - __asm__ volatile ( - QUANTIZE_ONE( 0, 0, 0, 2) - QUANTIZE_ONE( 4, 8, 10, 12) - QUANTIZE_ONE( 8, 16, 4, 8) - QUANTIZE_ONE(12, 24, 14, 24) - QUANTIZE_ONE(16, 32, 6, 16) - QUANTIZE_ONE(20, 40, 22, 26) - QUANTIZE_ONE(24, 48, 18, 20) - QUANTIZE_ONE(28, 56, 28, 30) - - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [sign]"=&r"(sign), [coeff]"=&r"(coeff), - [level]"=&r"(level), [temp6]"=&r"(temp6), [ret]"+&r"(ret) - : [ppin]"r"(ppin), [pout]"r"(pout), [max_level1]"r"(max_level1), - [ppiq]"r"(ppiq), [max_level]"r"(max_level), - [ppbias]"r"(ppbias), [ppzthresh]"r"(ppzthresh), - [ppsharpen]"r"(ppsharpen), [ppq]"r"(ppq) - : "memory", "hi", "lo" - ); - - return (ret != 0); -} - -static int Quantize2Blocks_MIPSdspR2(int16_t in[32], int16_t out[32], - const VP8Matrix* const mtx) { - int nz; - nz = QuantizeBlock_MIPSdspR2(in + 0 * 16, out + 0 * 16, mtx) << 0; - nz |= QuantizeBlock_MIPSdspR2(in + 1 * 16, out + 1 * 16, mtx) << 1; - return nz; -} - -#undef QUANTIZE_ONE - -// macro for one horizontal pass in FTransformWHT -// temp0..temp7 holds tmp[0]..tmp[15] -// A, B, C, D - offset in bytes to load from in buffer -// TEMP0, TEMP1 - registers for corresponding tmp elements -#define HORIZONTAL_PASS_WHT(A, B, C, D, TEMP0, TEMP1) \ - "lh %[" #TEMP0 "], " #A "(%[in]) \n\t" \ - "lh %[" #TEMP1 "], " #B "(%[in]) \n\t" \ - "lh %[temp8], " #C "(%[in]) \n\t" \ - "lh %[temp9], " #D "(%[in]) \n\t" \ - "ins %[" #TEMP1 "], %[" #TEMP0 "], 16, 16 \n\t" \ - "ins %[temp9], %[temp8], 16, 16 \n\t" \ - "subq.ph %[temp8], %[" #TEMP1 "], %[temp9] \n\t" \ - "addq.ph %[temp9], %[" #TEMP1 "], %[temp9] \n\t" \ - "precrq.ph.w %[" #TEMP0 "], %[temp8], %[temp9] \n\t" \ - "append %[temp8], %[temp9], 16 \n\t" \ - "subq.ph %[" #TEMP1 "], %[" #TEMP0 "], %[temp8] \n\t" \ - "addq.ph %[" #TEMP0 "], %[" #TEMP0 "], %[temp8] \n\t" \ - "rotr %[" #TEMP1 "], %[" #TEMP1 "], 16 \n\t" - -// macro for one vertical pass in FTransformWHT -// temp0..temp7 holds tmp[0]..tmp[15] -// A, B, C, D - offsets in bytes to store to out buffer -// TEMP0, TEMP2, TEMP4 and TEMP6 - registers for corresponding tmp elements -#define VERTICAL_PASS_WHT(A, B, C, D, TEMP0, TEMP2, TEMP4, TEMP6) \ - "addq.ph %[temp8], %[" #TEMP0 "], %[" #TEMP4 "] \n\t" \ - "addq.ph %[temp9], %[" #TEMP2 "], %[" #TEMP6 "] \n\t" \ - "subq.ph %[" #TEMP2 "], %[" #TEMP2 "], %[" #TEMP6 "] \n\t" \ - "subq.ph %[" #TEMP6 "], %[" #TEMP0 "], %[" #TEMP4 "] \n\t" \ - "addqh.ph %[" #TEMP0 "], %[temp8], %[temp9] \n\t" \ - "subqh.ph %[" #TEMP4 "], %[" #TEMP6 "], %[" #TEMP2 "] \n\t" \ - "addqh.ph %[" #TEMP2 "], %[" #TEMP2 "], %[" #TEMP6 "] \n\t" \ - "subqh.ph %[" #TEMP6 "], %[temp8], %[temp9] \n\t" \ - "usw %[" #TEMP0 "], " #A "(%[out]) \n\t" \ - "usw %[" #TEMP2 "], " #B "(%[out]) \n\t" \ - "usw %[" #TEMP4 "], " #C "(%[out]) \n\t" \ - "usw %[" #TEMP6 "], " #D "(%[out]) \n\t" - -static void FTransformWHT_MIPSdspR2(const int16_t* in, int16_t* out) { - int temp0, temp1, temp2, temp3, temp4; - int temp5, temp6, temp7, temp8, temp9; - - __asm__ volatile ( - HORIZONTAL_PASS_WHT( 0, 32, 64, 96, temp0, temp1) - HORIZONTAL_PASS_WHT(128, 160, 192, 224, temp2, temp3) - HORIZONTAL_PASS_WHT(256, 288, 320, 352, temp4, temp5) - HORIZONTAL_PASS_WHT(384, 416, 448, 480, temp6, temp7) - VERTICAL_PASS_WHT(0, 8, 16, 24, temp0, temp2, temp4, temp6) - VERTICAL_PASS_WHT(4, 12, 20, 28, temp1, temp3, temp5, temp7) - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), - [temp9]"=&r"(temp9) - : [in]"r"(in), [out]"r"(out) - : "memory" - ); -} - -#undef VERTICAL_PASS_WHT -#undef HORIZONTAL_PASS_WHT - -// macro for converting coefficients to bin -// convert 8 coeffs at time -// A, B, C, D - offsets in bytes to load from out buffer -#define CONVERT_COEFFS_TO_BIN(A, B, C, D) \ - "ulw %[temp0], " #A "(%[out]) \n\t" \ - "ulw %[temp1], " #B "(%[out]) \n\t" \ - "ulw %[temp2], " #C "(%[out]) \n\t" \ - "ulw %[temp3], " #D "(%[out]) \n\t" \ - "absq_s.ph %[temp0], %[temp0] \n\t" \ - "absq_s.ph %[temp1], %[temp1] \n\t" \ - "absq_s.ph %[temp2], %[temp2] \n\t" \ - "absq_s.ph %[temp3], %[temp3] \n\t" \ - "shra.ph %[temp0], %[temp0], 3 \n\t" \ - "shra.ph %[temp1], %[temp1], 3 \n\t" \ - "shra.ph %[temp2], %[temp2], 3 \n\t" \ - "shra.ph %[temp3], %[temp3], 3 \n\t" \ - "shll_s.ph %[temp0], %[temp0], 10 \n\t" \ - "shll_s.ph %[temp1], %[temp1], 10 \n\t" \ - "shll_s.ph %[temp2], %[temp2], 10 \n\t" \ - "shll_s.ph %[temp3], %[temp3], 10 \n\t" \ - "shrl.ph %[temp0], %[temp0], 10 \n\t" \ - "shrl.ph %[temp1], %[temp1], 10 \n\t" \ - "shrl.ph %[temp2], %[temp2], 10 \n\t" \ - "shrl.ph %[temp3], %[temp3], 10 \n\t" \ - "shll.ph %[temp0], %[temp0], 2 \n\t" \ - "shll.ph %[temp1], %[temp1], 2 \n\t" \ - "shll.ph %[temp2], %[temp2], 2 \n\t" \ - "shll.ph %[temp3], %[temp3], 2 \n\t" \ - "ext %[temp4], %[temp0], 0, 16 \n\t" \ - "ext %[temp0], %[temp0], 16, 16 \n\t" \ - "addu %[temp4], %[temp4], %[dist] \n\t" \ - "addu %[temp0], %[temp0], %[dist] \n\t" \ - "ext %[temp5], %[temp1], 0, 16 \n\t" \ - "lw %[temp8], 0(%[temp4]) \n\t" \ - "ext %[temp1], %[temp1], 16, 16 \n\t" \ - "addu %[temp5], %[temp5], %[dist] \n\t" \ - "addiu %[temp8], %[temp8], 1 \n\t" \ - "sw %[temp8], 0(%[temp4]) \n\t" \ - "lw %[temp8], 0(%[temp0]) \n\t" \ - "addu %[temp1], %[temp1], %[dist] \n\t" \ - "ext %[temp6], %[temp2], 0, 16 \n\t" \ - "addiu %[temp8], %[temp8], 1 \n\t" \ - "sw %[temp8], 0(%[temp0]) \n\t" \ - "lw %[temp8], 0(%[temp5]) \n\t" \ - "ext %[temp2], %[temp2], 16, 16 \n\t" \ - "addu %[temp6], %[temp6], %[dist] \n\t" \ - "addiu %[temp8], %[temp8], 1 \n\t" \ - "sw %[temp8], 0(%[temp5]) \n\t" \ - "lw %[temp8], 0(%[temp1]) \n\t" \ - "addu %[temp2], %[temp2], %[dist] \n\t" \ - "ext %[temp7], %[temp3], 0, 16 \n\t" \ - "addiu %[temp8], %[temp8], 1 \n\t" \ - "sw %[temp8], 0(%[temp1]) \n\t" \ - "lw %[temp8], 0(%[temp6]) \n\t" \ - "ext %[temp3], %[temp3], 16, 16 \n\t" \ - "addu %[temp7], %[temp7], %[dist] \n\t" \ - "addiu %[temp8], %[temp8], 1 \n\t" \ - "sw %[temp8], 0(%[temp6]) \n\t" \ - "lw %[temp8], 0(%[temp2]) \n\t" \ - "addu %[temp3], %[temp3], %[dist] \n\t" \ - "addiu %[temp8], %[temp8], 1 \n\t" \ - "sw %[temp8], 0(%[temp2]) \n\t" \ - "lw %[temp8], 0(%[temp7]) \n\t" \ - "addiu %[temp8], %[temp8], 1 \n\t" \ - "sw %[temp8], 0(%[temp7]) \n\t" \ - "lw %[temp8], 0(%[temp3]) \n\t" \ - "addiu %[temp8], %[temp8], 1 \n\t" \ - "sw %[temp8], 0(%[temp3]) \n\t" - -static void CollectHistogram_MIPSdspR2(const uint8_t* ref, const uint8_t* pred, - int start_block, int end_block, - VP8Histogram* const histo) { - int j; - int distribution[MAX_COEFF_THRESH + 1] = { 0 }; - const int max_coeff = (MAX_COEFF_THRESH << 16) + MAX_COEFF_THRESH; - for (j = start_block; j < end_block; ++j) { - int16_t out[16]; - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8; - - VP8FTransform(ref + VP8DspScan[j], pred + VP8DspScan[j], out); - - // Convert coefficients to bin. - __asm__ volatile ( - CONVERT_COEFFS_TO_BIN( 0, 4, 8, 12) - CONVERT_COEFFS_TO_BIN(16, 20, 24, 28) - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [temp8]"=&r"(temp8) - : [dist]"r"(distribution), [out]"r"(out), [max_coeff]"r"(max_coeff) - : "memory" - ); - } - VP8SetHistogramData(distribution, histo); -} - -#undef CONVERT_COEFFS_TO_BIN - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8EncDspInitMIPSdspR2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPSdspR2(void) { - VP8FTransform = FTransform_MIPSdspR2; - VP8FTransformWHT = FTransformWHT_MIPSdspR2; - VP8ITransform = ITransform_MIPSdspR2; - - VP8TDisto4x4 = Disto4x4_MIPSdspR2; - VP8TDisto16x16 = Disto16x16_MIPSdspR2; - - VP8EncPredLuma16 = Intra16Preds_MIPSdspR2; - VP8EncPredChroma8 = IntraChromaPreds_MIPSdspR2; - VP8EncPredLuma4 = Intra4Preds_MIPSdspR2; - -#if !defined(WORK_AROUND_GCC) - VP8SSE16x16 = SSE16x16_MIPSdspR2; - VP8SSE8x8 = SSE8x8_MIPSdspR2; - VP8SSE16x8 = SSE16x8_MIPSdspR2; - VP8SSE4x4 = SSE4x4_MIPSdspR2; -#endif - - VP8EncQuantizeBlock = QuantizeBlock_MIPSdspR2; - VP8EncQuantize2Blocks = Quantize2Blocks_MIPSdspR2; - - VP8CollectHistogram = CollectHistogram_MIPSdspR2; -} - -#else // !WEBP_USE_MIPS_DSP_R2 - -WEBP_DSP_INIT_STUB(VP8EncDspInitMIPSdspR2) - -#endif // WEBP_USE_MIPS_DSP_R2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_msa.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_msa.c deleted file mode 100644 index ec81e0f..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_msa.c +++ /dev/null @@ -1,896 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MSA version of encoder dsp functions. -// -// Author: Prashant Patil (prashant.patil@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MSA) - -#include -#include "src/dsp/msa_macro.h" -#include "src/enc/vp8i_enc.h" - -//------------------------------------------------------------------------------ -// Transforms - -#define IDCT_1D_W(in0, in1, in2, in3, out0, out1, out2, out3) do { \ - v4i32 a1_m, b1_m, c1_m, d1_m; \ - const v4i32 cospi8sqrt2minus1 = __msa_fill_w(20091); \ - const v4i32 sinpi8sqrt2 = __msa_fill_w(35468); \ - v4i32 c_tmp1_m = in1 * sinpi8sqrt2; \ - v4i32 c_tmp2_m = in3 * cospi8sqrt2minus1; \ - v4i32 d_tmp1_m = in1 * cospi8sqrt2minus1; \ - v4i32 d_tmp2_m = in3 * sinpi8sqrt2; \ - \ - ADDSUB2(in0, in2, a1_m, b1_m); \ - SRAI_W2_SW(c_tmp1_m, c_tmp2_m, 16); \ - c_tmp2_m = c_tmp2_m + in3; \ - c1_m = c_tmp1_m - c_tmp2_m; \ - SRAI_W2_SW(d_tmp1_m, d_tmp2_m, 16); \ - d_tmp1_m = d_tmp1_m + in1; \ - d1_m = d_tmp1_m + d_tmp2_m; \ - BUTTERFLY_4(a1_m, b1_m, c1_m, d1_m, out0, out1, out2, out3); \ -} while (0) - -static WEBP_INLINE void ITransformOne(const uint8_t* ref, const int16_t* in, - uint8_t* dst) { - v8i16 input0, input1; - v4i32 in0, in1, in2, in3, hz0, hz1, hz2, hz3, vt0, vt1, vt2, vt3; - v4i32 res0, res1, res2, res3; - v16i8 dest0, dest1, dest2, dest3; - const v16i8 zero = { 0 }; - - LD_SH2(in, 8, input0, input1); - UNPCK_SH_SW(input0, in0, in1); - UNPCK_SH_SW(input1, in2, in3); - IDCT_1D_W(in0, in1, in2, in3, hz0, hz1, hz2, hz3); - TRANSPOSE4x4_SW_SW(hz0, hz1, hz2, hz3, hz0, hz1, hz2, hz3); - IDCT_1D_W(hz0, hz1, hz2, hz3, vt0, vt1, vt2, vt3); - SRARI_W4_SW(vt0, vt1, vt2, vt3, 3); - TRANSPOSE4x4_SW_SW(vt0, vt1, vt2, vt3, vt0, vt1, vt2, vt3); - LD_SB4(ref, BPS, dest0, dest1, dest2, dest3); - ILVR_B4_SW(zero, dest0, zero, dest1, zero, dest2, zero, dest3, - res0, res1, res2, res3); - ILVR_H4_SW(zero, res0, zero, res1, zero, res2, zero, res3, - res0, res1, res2, res3); - ADD4(res0, vt0, res1, vt1, res2, vt2, res3, vt3, res0, res1, res2, res3); - CLIP_SW4_0_255(res0, res1, res2, res3); - PCKEV_B2_SW(res0, res1, res2, res3, vt0, vt1); - res0 = (v4i32)__msa_pckev_b((v16i8)vt0, (v16i8)vt1); - ST4x4_UB(res0, res0, 3, 2, 1, 0, dst, BPS); -} - -static void ITransform_MSA(const uint8_t* ref, const int16_t* in, uint8_t* dst, - int do_two) { - ITransformOne(ref, in, dst); - if (do_two) { - ITransformOne(ref + 4, in + 16, dst + 4); - } -} - -static void FTransform_MSA(const uint8_t* src, const uint8_t* ref, - int16_t* out) { - uint64_t out0, out1, out2, out3; - uint32_t in0, in1, in2, in3; - v4i32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; - v8i16 t0, t1, t2, t3; - v16u8 srcl0, srcl1, src0 = { 0 }, src1 = { 0 }; - const v8i16 mask0 = { 0, 4, 8, 12, 1, 5, 9, 13 }; - const v8i16 mask1 = { 3, 7, 11, 15, 2, 6, 10, 14 }; - const v8i16 mask2 = { 4, 0, 5, 1, 6, 2, 7, 3 }; - const v8i16 mask3 = { 0, 4, 1, 5, 2, 6, 3, 7 }; - const v8i16 cnst0 = { 2217, -5352, 2217, -5352, 2217, -5352, 2217, -5352 }; - const v8i16 cnst1 = { 5352, 2217, 5352, 2217, 5352, 2217, 5352, 2217 }; - - LW4(src, BPS, in0, in1, in2, in3); - INSERT_W4_UB(in0, in1, in2, in3, src0); - LW4(ref, BPS, in0, in1, in2, in3); - INSERT_W4_UB(in0, in1, in2, in3, src1); - ILVRL_B2_UB(src0, src1, srcl0, srcl1); - HSUB_UB2_SH(srcl0, srcl1, t0, t1); - VSHF_H2_SH(t0, t1, t0, t1, mask0, mask1, t2, t3); - ADDSUB2(t2, t3, t0, t1); - t0 = SRLI_H(t0, 3); - VSHF_H2_SH(t0, t0, t1, t1, mask2, mask3, t3, t2); - tmp0 = __msa_hadd_s_w(t3, t3); - tmp2 = __msa_hsub_s_w(t3, t3); - FILL_W2_SW(1812, 937, tmp1, tmp3); - DPADD_SH2_SW(t2, t2, cnst0, cnst1, tmp3, tmp1); - SRAI_W2_SW(tmp1, tmp3, 9); - PCKEV_H2_SH(tmp1, tmp0, tmp3, tmp2, t0, t1); - VSHF_H2_SH(t0, t1, t0, t1, mask0, mask1, t2, t3); - ADDSUB2(t2, t3, t0, t1); - VSHF_H2_SH(t0, t0, t1, t1, mask2, mask3, t3, t2); - tmp0 = __msa_hadd_s_w(t3, t3); - tmp2 = __msa_hsub_s_w(t3, t3); - ADDVI_W2_SW(tmp0, 7, tmp2, 7, tmp0, tmp2); - SRAI_W2_SW(tmp0, tmp2, 4); - FILL_W2_SW(12000, 51000, tmp1, tmp3); - DPADD_SH2_SW(t2, t2, cnst0, cnst1, tmp3, tmp1); - SRAI_W2_SW(tmp1, tmp3, 16); - UNPCK_R_SH_SW(t1, tmp4); - tmp5 = __msa_ceqi_w(tmp4, 0); - tmp4 = (v4i32)__msa_nor_v((v16u8)tmp5, (v16u8)tmp5); - tmp5 = __msa_fill_w(1); - tmp5 = (v4i32)__msa_and_v((v16u8)tmp5, (v16u8)tmp4); - tmp1 += tmp5; - PCKEV_H2_SH(tmp1, tmp0, tmp3, tmp2, t0, t1); - out0 = __msa_copy_s_d((v2i64)t0, 0); - out1 = __msa_copy_s_d((v2i64)t0, 1); - out2 = __msa_copy_s_d((v2i64)t1, 0); - out3 = __msa_copy_s_d((v2i64)t1, 1); - SD4(out0, out1, out2, out3, out, 8); -} - -static void FTransformWHT_MSA(const int16_t* in, int16_t* out) { - v8i16 in0 = { 0 }; - v8i16 in1 = { 0 }; - v8i16 tmp0, tmp1, tmp2, tmp3; - v8i16 out0, out1; - const v8i16 mask0 = { 0, 1, 2, 3, 8, 9, 10, 11 }; - const v8i16 mask1 = { 4, 5, 6, 7, 12, 13, 14, 15 }; - const v8i16 mask2 = { 0, 4, 8, 12, 1, 5, 9, 13 }; - const v8i16 mask3 = { 3, 7, 11, 15, 2, 6, 10, 14 }; - - in0 = __msa_insert_h(in0, 0, in[ 0]); - in0 = __msa_insert_h(in0, 1, in[ 64]); - in0 = __msa_insert_h(in0, 2, in[128]); - in0 = __msa_insert_h(in0, 3, in[192]); - in0 = __msa_insert_h(in0, 4, in[ 16]); - in0 = __msa_insert_h(in0, 5, in[ 80]); - in0 = __msa_insert_h(in0, 6, in[144]); - in0 = __msa_insert_h(in0, 7, in[208]); - in1 = __msa_insert_h(in1, 0, in[ 48]); - in1 = __msa_insert_h(in1, 1, in[112]); - in1 = __msa_insert_h(in1, 2, in[176]); - in1 = __msa_insert_h(in1, 3, in[240]); - in1 = __msa_insert_h(in1, 4, in[ 32]); - in1 = __msa_insert_h(in1, 5, in[ 96]); - in1 = __msa_insert_h(in1, 6, in[160]); - in1 = __msa_insert_h(in1, 7, in[224]); - ADDSUB2(in0, in1, tmp0, tmp1); - VSHF_H2_SH(tmp0, tmp1, tmp0, tmp1, mask0, mask1, tmp2, tmp3); - ADDSUB2(tmp2, tmp3, tmp0, tmp1); - VSHF_H2_SH(tmp0, tmp1, tmp0, tmp1, mask2, mask3, in0, in1); - ADDSUB2(in0, in1, tmp0, tmp1); - VSHF_H2_SH(tmp0, tmp1, tmp0, tmp1, mask0, mask1, tmp2, tmp3); - ADDSUB2(tmp2, tmp3, out0, out1); - SRAI_H2_SH(out0, out1, 1); - ST_SH2(out0, out1, out, 8); -} - -static int TTransform_MSA(const uint8_t* in, const uint16_t* w) { - int sum; - uint32_t in0_m, in1_m, in2_m, in3_m; - v16i8 src0 = { 0 }; - v8i16 in0, in1, tmp0, tmp1, tmp2, tmp3; - v4i32 dst0, dst1; - const v16i8 zero = { 0 }; - const v8i16 mask0 = { 0, 1, 2, 3, 8, 9, 10, 11 }; - const v8i16 mask1 = { 4, 5, 6, 7, 12, 13, 14, 15 }; - const v8i16 mask2 = { 0, 4, 8, 12, 1, 5, 9, 13 }; - const v8i16 mask3 = { 3, 7, 11, 15, 2, 6, 10, 14 }; - - LW4(in, BPS, in0_m, in1_m, in2_m, in3_m); - INSERT_W4_SB(in0_m, in1_m, in2_m, in3_m, src0); - ILVRL_B2_SH(zero, src0, tmp0, tmp1); - VSHF_H2_SH(tmp0, tmp1, tmp0, tmp1, mask2, mask3, in0, in1); - ADDSUB2(in0, in1, tmp0, tmp1); - VSHF_H2_SH(tmp0, tmp1, tmp0, tmp1, mask0, mask1, tmp2, tmp3); - ADDSUB2(tmp2, tmp3, tmp0, tmp1); - VSHF_H2_SH(tmp0, tmp1, tmp0, tmp1, mask2, mask3, in0, in1); - ADDSUB2(in0, in1, tmp0, tmp1); - VSHF_H2_SH(tmp0, tmp1, tmp0, tmp1, mask0, mask1, tmp2, tmp3); - ADDSUB2(tmp2, tmp3, tmp0, tmp1); - tmp0 = __msa_add_a_h(tmp0, (v8i16)zero); - tmp1 = __msa_add_a_h(tmp1, (v8i16)zero); - LD_SH2(w, 8, tmp2, tmp3); - DOTP_SH2_SW(tmp0, tmp1, tmp2, tmp3, dst0, dst1); - dst0 = dst0 + dst1; - sum = HADD_SW_S32(dst0); - return sum; -} - -static int Disto4x4_MSA(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - const int sum1 = TTransform_MSA(a, w); - const int sum2 = TTransform_MSA(b, w); - return abs(sum2 - sum1) >> 5; -} - -static int Disto16x16_MSA(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - int D = 0; - int x, y; - for (y = 0; y < 16 * BPS; y += 4 * BPS) { - for (x = 0; x < 16; x += 4) { - D += Disto4x4_MSA(a + x + y, b + x + y, w); - } - } - return D; -} - -//------------------------------------------------------------------------------ -// Histogram - -static void CollectHistogram_MSA(const uint8_t* ref, const uint8_t* pred, - int start_block, int end_block, - VP8Histogram* const histo) { - int j; - int distribution[MAX_COEFF_THRESH + 1] = { 0 }; - for (j = start_block; j < end_block; ++j) { - int16_t out[16]; - VP8FTransform(ref + VP8DspScan[j], pred + VP8DspScan[j], out); - { - int k; - v8i16 coeff0, coeff1; - const v8i16 zero = { 0 }; - const v8i16 max_coeff_thr = __msa_ldi_h(MAX_COEFF_THRESH); - LD_SH2(&out[0], 8, coeff0, coeff1); - coeff0 = __msa_add_a_h(coeff0, zero); - coeff1 = __msa_add_a_h(coeff1, zero); - SRAI_H2_SH(coeff0, coeff1, 3); - coeff0 = __msa_min_s_h(coeff0, max_coeff_thr); - coeff1 = __msa_min_s_h(coeff1, max_coeff_thr); - ST_SH2(coeff0, coeff1, &out[0], 8); - for (k = 0; k < 16; ++k) { - ++distribution[out[k]]; - } - } - } - VP8SetHistogramData(distribution, histo); -} - -//------------------------------------------------------------------------------ -// Intra predictions - -// luma 4x4 prediction - -#define DST(x, y) dst[(x) + (y) * BPS] -#define AVG3(a, b, c) (((a) + 2 * (b) + (c) + 2) >> 2) -#define AVG2(a, b) (((a) + (b) + 1) >> 1) - -static WEBP_INLINE void VE4(uint8_t* dst, const uint8_t* top) { // vertical - const v16u8 A1 = { 0 }; - const uint64_t val_m = LD(top - 1); - const v16u8 A = (v16u8)__msa_insert_d((v2i64)A1, 0, val_m); - const v16u8 B = SLDI_UB(A, A, 1); - const v16u8 C = SLDI_UB(A, A, 2); - const v16u8 AC = __msa_ave_u_b(A, C); - const v16u8 B2 = __msa_ave_u_b(B, B); - const v16u8 R = __msa_aver_u_b(AC, B2); - const uint32_t out = __msa_copy_s_w((v4i32)R, 0); - SW4(out, out, out, out, dst, BPS); -} - -static WEBP_INLINE void HE4(uint8_t* dst, const uint8_t* top) { // horizontal - const int X = top[-1]; - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int L = top[-5]; - WebPUint32ToMem(dst + 0 * BPS, 0x01010101U * AVG3(X, I, J)); - WebPUint32ToMem(dst + 1 * BPS, 0x01010101U * AVG3(I, J, K)); - WebPUint32ToMem(dst + 2 * BPS, 0x01010101U * AVG3(J, K, L)); - WebPUint32ToMem(dst + 3 * BPS, 0x01010101U * AVG3(K, L, L)); -} - -static WEBP_INLINE void DC4(uint8_t* dst, const uint8_t* top) { - uint32_t dc = 4; - int i; - for (i = 0; i < 4; ++i) dc += top[i] + top[-5 + i]; - dc >>= 3; - dc = dc | (dc << 8) | (dc << 16) | (dc << 24); - SW4(dc, dc, dc, dc, dst, BPS); -} - -static WEBP_INLINE void RD4(uint8_t* dst, const uint8_t* top) { - const v16u8 A2 = { 0 }; - const uint64_t val_m = LD(top - 5); - const v16u8 A1 = (v16u8)__msa_insert_d((v2i64)A2, 0, val_m); - const v16u8 A = (v16u8)__msa_insert_b((v16i8)A1, 8, top[3]); - const v16u8 B = SLDI_UB(A, A, 1); - const v16u8 C = SLDI_UB(A, A, 2); - const v16u8 AC = __msa_ave_u_b(A, C); - const v16u8 B2 = __msa_ave_u_b(B, B); - const v16u8 R0 = __msa_aver_u_b(AC, B2); - const v16u8 R1 = SLDI_UB(R0, R0, 1); - const v16u8 R2 = SLDI_UB(R1, R1, 1); - const v16u8 R3 = SLDI_UB(R2, R2, 1); - const uint32_t val0 = __msa_copy_s_w((v4i32)R0, 0); - const uint32_t val1 = __msa_copy_s_w((v4i32)R1, 0); - const uint32_t val2 = __msa_copy_s_w((v4i32)R2, 0); - const uint32_t val3 = __msa_copy_s_w((v4i32)R3, 0); - SW4(val3, val2, val1, val0, dst, BPS); -} - -static WEBP_INLINE void LD4(uint8_t* dst, const uint8_t* top) { - const v16u8 A1 = { 0 }; - const uint64_t val_m = LD(top); - const v16u8 A = (v16u8)__msa_insert_d((v2i64)A1, 0, val_m); - const v16u8 B = SLDI_UB(A, A, 1); - const v16u8 C1 = SLDI_UB(A, A, 2); - const v16u8 C = (v16u8)__msa_insert_b((v16i8)C1, 6, top[7]); - const v16u8 AC = __msa_ave_u_b(A, C); - const v16u8 B2 = __msa_ave_u_b(B, B); - const v16u8 R0 = __msa_aver_u_b(AC, B2); - const v16u8 R1 = SLDI_UB(R0, R0, 1); - const v16u8 R2 = SLDI_UB(R1, R1, 1); - const v16u8 R3 = SLDI_UB(R2, R2, 1); - const uint32_t val0 = __msa_copy_s_w((v4i32)R0, 0); - const uint32_t val1 = __msa_copy_s_w((v4i32)R1, 0); - const uint32_t val2 = __msa_copy_s_w((v4i32)R2, 0); - const uint32_t val3 = __msa_copy_s_w((v4i32)R3, 0); - SW4(val0, val1, val2, val3, dst, BPS); -} - -static WEBP_INLINE void VR4(uint8_t* dst, const uint8_t* top) { - const int X = top[-1]; - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int A = top[0]; - const int B = top[1]; - const int C = top[2]; - const int D = top[3]; - DST(0, 0) = DST(1, 2) = AVG2(X, A); - DST(1, 0) = DST(2, 2) = AVG2(A, B); - DST(2, 0) = DST(3, 2) = AVG2(B, C); - DST(3, 0) = AVG2(C, D); - DST(0, 3) = AVG3(K, J, I); - DST(0, 2) = AVG3(J, I, X); - DST(0, 1) = DST(1, 3) = AVG3(I, X, A); - DST(1, 1) = DST(2, 3) = AVG3(X, A, B); - DST(2, 1) = DST(3, 3) = AVG3(A, B, C); - DST(3, 1) = AVG3(B, C, D); -} - -static WEBP_INLINE void VL4(uint8_t* dst, const uint8_t* top) { - const int A = top[0]; - const int B = top[1]; - const int C = top[2]; - const int D = top[3]; - const int E = top[4]; - const int F = top[5]; - const int G = top[6]; - const int H = top[7]; - DST(0, 0) = AVG2(A, B); - DST(1, 0) = DST(0, 2) = AVG2(B, C); - DST(2, 0) = DST(1, 2) = AVG2(C, D); - DST(3, 0) = DST(2, 2) = AVG2(D, E); - DST(0, 1) = AVG3(A, B, C); - DST(1, 1) = DST(0, 3) = AVG3(B, C, D); - DST(2, 1) = DST(1, 3) = AVG3(C, D, E); - DST(3, 1) = DST(2, 3) = AVG3(D, E, F); - DST(3, 2) = AVG3(E, F, G); - DST(3, 3) = AVG3(F, G, H); -} - -static WEBP_INLINE void HU4(uint8_t* dst, const uint8_t* top) { - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int L = top[-5]; - DST(0, 0) = AVG2(I, J); - DST(2, 0) = DST(0, 1) = AVG2(J, K); - DST(2, 1) = DST(0, 2) = AVG2(K, L); - DST(1, 0) = AVG3(I, J, K); - DST(3, 0) = DST(1, 1) = AVG3(J, K, L); - DST(3, 1) = DST(1, 2) = AVG3(K, L, L); - DST(3, 2) = DST(2, 2) = - DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L; -} - -static WEBP_INLINE void HD4(uint8_t* dst, const uint8_t* top) { - const int X = top[-1]; - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int L = top[-5]; - const int A = top[0]; - const int B = top[1]; - const int C = top[2]; - DST(0, 0) = DST(2, 1) = AVG2(I, X); - DST(0, 1) = DST(2, 2) = AVG2(J, I); - DST(0, 2) = DST(2, 3) = AVG2(K, J); - DST(0, 3) = AVG2(L, K); - DST(3, 0) = AVG3(A, B, C); - DST(2, 0) = AVG3(X, A, B); - DST(1, 0) = DST(3, 1) = AVG3(I, X, A); - DST(1, 1) = DST(3, 2) = AVG3(J, I, X); - DST(1, 2) = DST(3, 3) = AVG3(K, J, I); - DST(1, 3) = AVG3(L, K, J); -} - -static WEBP_INLINE void TM4(uint8_t* dst, const uint8_t* top) { - const v16i8 zero = { 0 }; - const v8i16 TL = (v8i16)__msa_fill_h(top[-1]); - const v8i16 L0 = (v8i16)__msa_fill_h(top[-2]); - const v8i16 L1 = (v8i16)__msa_fill_h(top[-3]); - const v8i16 L2 = (v8i16)__msa_fill_h(top[-4]); - const v8i16 L3 = (v8i16)__msa_fill_h(top[-5]); - const v16u8 T1 = LD_UB(top); - const v8i16 T = (v8i16)__msa_ilvr_b(zero, (v16i8)T1); - const v8i16 d = T - TL; - v8i16 r0, r1, r2, r3; - ADD4(d, L0, d, L1, d, L2, d, L3, r0, r1, r2, r3); - CLIP_SH4_0_255(r0, r1, r2, r3); - PCKEV_ST4x4_UB(r0, r1, r2, r3, dst, BPS); -} - -#undef DST -#undef AVG3 -#undef AVG2 - -static void Intra4Preds_MSA(uint8_t* dst, const uint8_t* top) { - DC4(I4DC4 + dst, top); - TM4(I4TM4 + dst, top); - VE4(I4VE4 + dst, top); - HE4(I4HE4 + dst, top); - RD4(I4RD4 + dst, top); - VR4(I4VR4 + dst, top); - LD4(I4LD4 + dst, top); - VL4(I4VL4 + dst, top); - HD4(I4HD4 + dst, top); - HU4(I4HU4 + dst, top); -} - -// luma 16x16 prediction - -#define STORE16x16(out, dst) do { \ - ST_UB8(out, out, out, out, out, out, out, out, dst + 0 * BPS, BPS); \ - ST_UB8(out, out, out, out, out, out, out, out, dst + 8 * BPS, BPS); \ -} while (0) - -static WEBP_INLINE void VerticalPred16x16(uint8_t* dst, const uint8_t* top) { - if (top != NULL) { - const v16u8 out = LD_UB(top); - STORE16x16(out, dst); - } else { - const v16u8 out = (v16u8)__msa_fill_b(0x7f); - STORE16x16(out, dst); - } -} - -static WEBP_INLINE void HorizontalPred16x16(uint8_t* dst, - const uint8_t* left) { - if (left != NULL) { - int j; - for (j = 0; j < 16; j += 4) { - const v16u8 L0 = (v16u8)__msa_fill_b(left[0]); - const v16u8 L1 = (v16u8)__msa_fill_b(left[1]); - const v16u8 L2 = (v16u8)__msa_fill_b(left[2]); - const v16u8 L3 = (v16u8)__msa_fill_b(left[3]); - ST_UB4(L0, L1, L2, L3, dst, BPS); - dst += 4 * BPS; - left += 4; - } - } else { - const v16u8 out = (v16u8)__msa_fill_b(0x81); - STORE16x16(out, dst); - } -} - -static WEBP_INLINE void TrueMotion16x16(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - if (left != NULL) { - if (top != NULL) { - int j; - v8i16 d1, d2; - const v16i8 zero = { 0 }; - const v8i16 TL = (v8i16)__msa_fill_h(left[-1]); - const v16u8 T = LD_UB(top); - ILVRL_B2_SH(zero, T, d1, d2); - SUB2(d1, TL, d2, TL, d1, d2); - for (j = 0; j < 16; j += 4) { - v16i8 t0, t1, t2, t3; - v8i16 r0, r1, r2, r3, r4, r5, r6, r7; - const v8i16 L0 = (v8i16)__msa_fill_h(left[j + 0]); - const v8i16 L1 = (v8i16)__msa_fill_h(left[j + 1]); - const v8i16 L2 = (v8i16)__msa_fill_h(left[j + 2]); - const v8i16 L3 = (v8i16)__msa_fill_h(left[j + 3]); - ADD4(d1, L0, d1, L1, d1, L2, d1, L3, r0, r1, r2, r3); - ADD4(d2, L0, d2, L1, d2, L2, d2, L3, r4, r5, r6, r7); - CLIP_SH4_0_255(r0, r1, r2, r3); - CLIP_SH4_0_255(r4, r5, r6, r7); - PCKEV_B4_SB(r4, r0, r5, r1, r6, r2, r7, r3, t0, t1, t2, t3); - ST_SB4(t0, t1, t2, t3, dst, BPS); - dst += 4 * BPS; - } - } else { - HorizontalPred16x16(dst, left); - } - } else { - if (top != NULL) { - VerticalPred16x16(dst, top); - } else { - const v16u8 out = (v16u8)__msa_fill_b(0x81); - STORE16x16(out, dst); - } - } -} - -static WEBP_INLINE void DCMode16x16(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - int DC; - v16u8 out; - if (top != NULL && left != NULL) { - const v16u8 rtop = LD_UB(top); - const v8u16 dctop = __msa_hadd_u_h(rtop, rtop); - const v16u8 rleft = LD_UB(left); - const v8u16 dcleft = __msa_hadd_u_h(rleft, rleft); - const v8u16 dctemp = dctop + dcleft; - DC = HADD_UH_U32(dctemp); - DC = (DC + 16) >> 5; - } else if (left != NULL) { // left but no top - const v16u8 rleft = LD_UB(left); - const v8u16 dcleft = __msa_hadd_u_h(rleft, rleft); - DC = HADD_UH_U32(dcleft); - DC = (DC + DC + 16) >> 5; - } else if (top != NULL) { // top but no left - const v16u8 rtop = LD_UB(top); - const v8u16 dctop = __msa_hadd_u_h(rtop, rtop); - DC = HADD_UH_U32(dctop); - DC = (DC + DC + 16) >> 5; - } else { // no top, no left, nothing. - DC = 0x80; - } - out = (v16u8)__msa_fill_b(DC); - STORE16x16(out, dst); -} - -static void Intra16Preds_MSA(uint8_t* dst, - const uint8_t* left, const uint8_t* top) { - DCMode16x16(I16DC16 + dst, left, top); - VerticalPred16x16(I16VE16 + dst, top); - HorizontalPred16x16(I16HE16 + dst, left); - TrueMotion16x16(I16TM16 + dst, left, top); -} - -// Chroma 8x8 prediction - -#define CALC_DC8(in, out) do { \ - const v8u16 temp0 = __msa_hadd_u_h(in, in); \ - const v4u32 temp1 = __msa_hadd_u_w(temp0, temp0); \ - const v2i64 temp2 = (v2i64)__msa_hadd_u_d(temp1, temp1); \ - const v2i64 temp3 = __msa_splati_d(temp2, 1); \ - const v2i64 temp4 = temp3 + temp2; \ - const v16i8 temp5 = (v16i8)__msa_srari_d(temp4, 4); \ - const v2i64 temp6 = (v2i64)__msa_splati_b(temp5, 0); \ - out = __msa_copy_s_d(temp6, 0); \ -} while (0) - -#define STORE8x8(out, dst) do { \ - SD4(out, out, out, out, dst + 0 * BPS, BPS); \ - SD4(out, out, out, out, dst + 4 * BPS, BPS); \ -} while (0) - -static WEBP_INLINE void VerticalPred8x8(uint8_t* dst, const uint8_t* top) { - if (top != NULL) { - const uint64_t out = LD(top); - STORE8x8(out, dst); - } else { - const uint64_t out = 0x7f7f7f7f7f7f7f7fULL; - STORE8x8(out, dst); - } -} - -static WEBP_INLINE void HorizontalPred8x8(uint8_t* dst, const uint8_t* left) { - if (left != NULL) { - int j; - for (j = 0; j < 8; j += 4) { - const v16u8 L0 = (v16u8)__msa_fill_b(left[0]); - const v16u8 L1 = (v16u8)__msa_fill_b(left[1]); - const v16u8 L2 = (v16u8)__msa_fill_b(left[2]); - const v16u8 L3 = (v16u8)__msa_fill_b(left[3]); - const uint64_t out0 = __msa_copy_s_d((v2i64)L0, 0); - const uint64_t out1 = __msa_copy_s_d((v2i64)L1, 0); - const uint64_t out2 = __msa_copy_s_d((v2i64)L2, 0); - const uint64_t out3 = __msa_copy_s_d((v2i64)L3, 0); - SD4(out0, out1, out2, out3, dst, BPS); - dst += 4 * BPS; - left += 4; - } - } else { - const uint64_t out = 0x8181818181818181ULL; - STORE8x8(out, dst); - } -} - -static WEBP_INLINE void TrueMotion8x8(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - if (left != NULL) { - if (top != NULL) { - int j; - const v8i16 TL = (v8i16)__msa_fill_h(left[-1]); - const v16u8 T1 = LD_UB(top); - const v16i8 zero = { 0 }; - const v8i16 T = (v8i16)__msa_ilvr_b(zero, (v16i8)T1); - const v8i16 d = T - TL; - for (j = 0; j < 8; j += 4) { - uint64_t out0, out1, out2, out3; - v16i8 t0, t1; - v8i16 r0 = (v8i16)__msa_fill_h(left[j + 0]); - v8i16 r1 = (v8i16)__msa_fill_h(left[j + 1]); - v8i16 r2 = (v8i16)__msa_fill_h(left[j + 2]); - v8i16 r3 = (v8i16)__msa_fill_h(left[j + 3]); - ADD4(d, r0, d, r1, d, r2, d, r3, r0, r1, r2, r3); - CLIP_SH4_0_255(r0, r1, r2, r3); - PCKEV_B2_SB(r1, r0, r3, r2, t0, t1); - out0 = __msa_copy_s_d((v2i64)t0, 0); - out1 = __msa_copy_s_d((v2i64)t0, 1); - out2 = __msa_copy_s_d((v2i64)t1, 0); - out3 = __msa_copy_s_d((v2i64)t1, 1); - SD4(out0, out1, out2, out3, dst, BPS); - dst += 4 * BPS; - } - } else { - HorizontalPred8x8(dst, left); - } - } else { - if (top != NULL) { - VerticalPred8x8(dst, top); - } else { - const uint64_t out = 0x8181818181818181ULL; - STORE8x8(out, dst); - } - } -} - -static WEBP_INLINE void DCMode8x8(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - uint64_t out; - v16u8 src = { 0 }; - if (top != NULL && left != NULL) { - const uint64_t left_m = LD(left); - const uint64_t top_m = LD(top); - INSERT_D2_UB(left_m, top_m, src); - CALC_DC8(src, out); - } else if (left != NULL) { // left but no top - const uint64_t left_m = LD(left); - INSERT_D2_UB(left_m, left_m, src); - CALC_DC8(src, out); - } else if (top != NULL) { // top but no left - const uint64_t top_m = LD(top); - INSERT_D2_UB(top_m, top_m, src); - CALC_DC8(src, out); - } else { // no top, no left, nothing. - src = (v16u8)__msa_fill_b(0x80); - out = __msa_copy_s_d((v2i64)src, 0); - } - STORE8x8(out, dst); -} - -static void IntraChromaPreds_MSA(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - // U block - DCMode8x8(C8DC8 + dst, left, top); - VerticalPred8x8(C8VE8 + dst, top); - HorizontalPred8x8(C8HE8 + dst, left); - TrueMotion8x8(C8TM8 + dst, left, top); - // V block - dst += 8; - if (top != NULL) top += 8; - if (left != NULL) left += 16; - DCMode8x8(C8DC8 + dst, left, top); - VerticalPred8x8(C8VE8 + dst, top); - HorizontalPred8x8(C8HE8 + dst, left); - TrueMotion8x8(C8TM8 + dst, left, top); -} - -//------------------------------------------------------------------------------ -// Metric - -#define PACK_DOTP_UB4_SW(in0, in1, in2, in3, out0, out1, out2, out3) do { \ - v16u8 tmp0, tmp1; \ - v8i16 tmp2, tmp3; \ - ILVRL_B2_UB(in0, in1, tmp0, tmp1); \ - HSUB_UB2_SH(tmp0, tmp1, tmp2, tmp3); \ - DOTP_SH2_SW(tmp2, tmp3, tmp2, tmp3, out0, out1); \ - ILVRL_B2_UB(in2, in3, tmp0, tmp1); \ - HSUB_UB2_SH(tmp0, tmp1, tmp2, tmp3); \ - DOTP_SH2_SW(tmp2, tmp3, tmp2, tmp3, out2, out3); \ -} while (0) - -#define PACK_DPADD_UB4_SW(in0, in1, in2, in3, out0, out1, out2, out3) do { \ - v16u8 tmp0, tmp1; \ - v8i16 tmp2, tmp3; \ - ILVRL_B2_UB(in0, in1, tmp0, tmp1); \ - HSUB_UB2_SH(tmp0, tmp1, tmp2, tmp3); \ - DPADD_SH2_SW(tmp2, tmp3, tmp2, tmp3, out0, out1); \ - ILVRL_B2_UB(in2, in3, tmp0, tmp1); \ - HSUB_UB2_SH(tmp0, tmp1, tmp2, tmp3); \ - DPADD_SH2_SW(tmp2, tmp3, tmp2, tmp3, out2, out3); \ -} while (0) - -static int SSE16x16_MSA(const uint8_t* a, const uint8_t* b) { - uint32_t sum; - v16u8 src0, src1, src2, src3, src4, src5, src6, src7; - v16u8 ref0, ref1, ref2, ref3, ref4, ref5, ref6, ref7; - v4i32 out0, out1, out2, out3; - - LD_UB8(a, BPS, src0, src1, src2, src3, src4, src5, src6, src7); - LD_UB8(b, BPS, ref0, ref1, ref2, ref3, ref4, ref5, ref6, ref7); - PACK_DOTP_UB4_SW(src0, ref0, src1, ref1, out0, out1, out2, out3); - PACK_DPADD_UB4_SW(src2, ref2, src3, ref3, out0, out1, out2, out3); - PACK_DPADD_UB4_SW(src4, ref4, src5, ref5, out0, out1, out2, out3); - PACK_DPADD_UB4_SW(src6, ref6, src7, ref7, out0, out1, out2, out3); - a += 8 * BPS; - b += 8 * BPS; - LD_UB8(a, BPS, src0, src1, src2, src3, src4, src5, src6, src7); - LD_UB8(b, BPS, ref0, ref1, ref2, ref3, ref4, ref5, ref6, ref7); - PACK_DPADD_UB4_SW(src0, ref0, src1, ref1, out0, out1, out2, out3); - PACK_DPADD_UB4_SW(src2, ref2, src3, ref3, out0, out1, out2, out3); - PACK_DPADD_UB4_SW(src4, ref4, src5, ref5, out0, out1, out2, out3); - PACK_DPADD_UB4_SW(src6, ref6, src7, ref7, out0, out1, out2, out3); - out0 += out1; - out2 += out3; - out0 += out2; - sum = HADD_SW_S32(out0); - return sum; -} - -static int SSE16x8_MSA(const uint8_t* a, const uint8_t* b) { - uint32_t sum; - v16u8 src0, src1, src2, src3, src4, src5, src6, src7; - v16u8 ref0, ref1, ref2, ref3, ref4, ref5, ref6, ref7; - v4i32 out0, out1, out2, out3; - - LD_UB8(a, BPS, src0, src1, src2, src3, src4, src5, src6, src7); - LD_UB8(b, BPS, ref0, ref1, ref2, ref3, ref4, ref5, ref6, ref7); - PACK_DOTP_UB4_SW(src0, ref0, src1, ref1, out0, out1, out2, out3); - PACK_DPADD_UB4_SW(src2, ref2, src3, ref3, out0, out1, out2, out3); - PACK_DPADD_UB4_SW(src4, ref4, src5, ref5, out0, out1, out2, out3); - PACK_DPADD_UB4_SW(src6, ref6, src7, ref7, out0, out1, out2, out3); - out0 += out1; - out2 += out3; - out0 += out2; - sum = HADD_SW_S32(out0); - return sum; -} - -static int SSE8x8_MSA(const uint8_t* a, const uint8_t* b) { - uint32_t sum; - v16u8 src0, src1, src2, src3, src4, src5, src6, src7; - v16u8 ref0, ref1, ref2, ref3, ref4, ref5, ref6, ref7; - v16u8 t0, t1, t2, t3; - v4i32 out0, out1, out2, out3; - - LD_UB8(a, BPS, src0, src1, src2, src3, src4, src5, src6, src7); - LD_UB8(b, BPS, ref0, ref1, ref2, ref3, ref4, ref5, ref6, ref7); - ILVR_B4_UB(src0, src1, src2, src3, ref0, ref1, ref2, ref3, t0, t1, t2, t3); - PACK_DOTP_UB4_SW(t0, t2, t1, t3, out0, out1, out2, out3); - ILVR_B4_UB(src4, src5, src6, src7, ref4, ref5, ref6, ref7, t0, t1, t2, t3); - PACK_DPADD_UB4_SW(t0, t2, t1, t3, out0, out1, out2, out3); - out0 += out1; - out2 += out3; - out0 += out2; - sum = HADD_SW_S32(out0); - return sum; -} - -static int SSE4x4_MSA(const uint8_t* a, const uint8_t* b) { - uint32_t sum = 0; - uint32_t src0, src1, src2, src3, ref0, ref1, ref2, ref3; - v16u8 src = { 0 }, ref = { 0 }, tmp0, tmp1; - v8i16 diff0, diff1; - v4i32 out0, out1; - - LW4(a, BPS, src0, src1, src2, src3); - LW4(b, BPS, ref0, ref1, ref2, ref3); - INSERT_W4_UB(src0, src1, src2, src3, src); - INSERT_W4_UB(ref0, ref1, ref2, ref3, ref); - ILVRL_B2_UB(src, ref, tmp0, tmp1); - HSUB_UB2_SH(tmp0, tmp1, diff0, diff1); - DOTP_SH2_SW(diff0, diff1, diff0, diff1, out0, out1); - out0 += out1; - sum = HADD_SW_S32(out0); - return sum; -} - -//------------------------------------------------------------------------------ -// Quantization - -static int QuantizeBlock_MSA(int16_t in[16], int16_t out[16], - const VP8Matrix* const mtx) { - int sum; - v8i16 in0, in1, sh0, sh1, out0, out1; - v8i16 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, sign0, sign1; - v4i32 s0, s1, s2, s3, b0, b1, b2, b3, t0, t1, t2, t3; - const v8i16 zero = { 0 }; - const v8i16 zigzag0 = { 0, 1, 4, 8, 5, 2, 3, 6 }; - const v8i16 zigzag1 = { 9, 12, 13, 10, 7, 11, 14, 15 }; - const v8i16 maxlevel = __msa_fill_h(MAX_LEVEL); - - LD_SH2(&in[0], 8, in0, in1); - LD_SH2(&mtx->sharpen_[0], 8, sh0, sh1); - tmp4 = __msa_add_a_h(in0, zero); - tmp5 = __msa_add_a_h(in1, zero); - ILVRL_H2_SH(sh0, tmp4, tmp0, tmp1); - ILVRL_H2_SH(sh1, tmp5, tmp2, tmp3); - HADD_SH4_SW(tmp0, tmp1, tmp2, tmp3, s0, s1, s2, s3); - sign0 = (in0 < zero); - sign1 = (in1 < zero); // sign - LD_SH2(&mtx->iq_[0], 8, tmp0, tmp1); // iq - ILVRL_H2_SW(zero, tmp0, t0, t1); - ILVRL_H2_SW(zero, tmp1, t2, t3); - LD_SW4(&mtx->bias_[0], 4, b0, b1, b2, b3); // bias - MUL4(t0, s0, t1, s1, t2, s2, t3, s3, t0, t1, t2, t3); - ADD4(b0, t0, b1, t1, b2, t2, b3, t3, b0, b1, b2, b3); - SRAI_W4_SW(b0, b1, b2, b3, 17); - PCKEV_H2_SH(b1, b0, b3, b2, tmp2, tmp3); - tmp0 = (tmp2 > maxlevel); - tmp1 = (tmp3 > maxlevel); - tmp2 = (v8i16)__msa_bmnz_v((v16u8)tmp2, (v16u8)maxlevel, (v16u8)tmp0); - tmp3 = (v8i16)__msa_bmnz_v((v16u8)tmp3, (v16u8)maxlevel, (v16u8)tmp1); - SUB2(zero, tmp2, zero, tmp3, tmp0, tmp1); - tmp2 = (v8i16)__msa_bmnz_v((v16u8)tmp2, (v16u8)tmp0, (v16u8)sign0); - tmp3 = (v8i16)__msa_bmnz_v((v16u8)tmp3, (v16u8)tmp1, (v16u8)sign1); - LD_SW4(&mtx->zthresh_[0], 4, t0, t1, t2, t3); // zthresh - t0 = (s0 > t0); - t1 = (s1 > t1); - t2 = (s2 > t2); - t3 = (s3 > t3); - PCKEV_H2_SH(t1, t0, t3, t2, tmp0, tmp1); - tmp4 = (v8i16)__msa_bmnz_v((v16u8)zero, (v16u8)tmp2, (v16u8)tmp0); - tmp5 = (v8i16)__msa_bmnz_v((v16u8)zero, (v16u8)tmp3, (v16u8)tmp1); - LD_SH2(&mtx->q_[0], 8, tmp0, tmp1); - MUL2(tmp4, tmp0, tmp5, tmp1, in0, in1); - VSHF_H2_SH(tmp4, tmp5, tmp4, tmp5, zigzag0, zigzag1, out0, out1); - ST_SH2(in0, in1, &in[0], 8); - ST_SH2(out0, out1, &out[0], 8); - out0 = __msa_add_a_h(out0, out1); - sum = HADD_SH_S32(out0); - return (sum > 0); -} - -static int Quantize2Blocks_MSA(int16_t in[32], int16_t out[32], - const VP8Matrix* const mtx) { - int nz; - nz = VP8EncQuantizeBlock(in + 0 * 16, out + 0 * 16, mtx) << 0; - nz |= VP8EncQuantizeBlock(in + 1 * 16, out + 1 * 16, mtx) << 1; - return nz; -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8EncDspInitMSA(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMSA(void) { - VP8ITransform = ITransform_MSA; - VP8FTransform = FTransform_MSA; - VP8FTransformWHT = FTransformWHT_MSA; - - VP8TDisto4x4 = Disto4x4_MSA; - VP8TDisto16x16 = Disto16x16_MSA; - VP8CollectHistogram = CollectHistogram_MSA; - - VP8EncPredLuma4 = Intra4Preds_MSA; - VP8EncPredLuma16 = Intra16Preds_MSA; - VP8EncPredChroma8 = IntraChromaPreds_MSA; - - VP8SSE16x16 = SSE16x16_MSA; - VP8SSE16x8 = SSE16x8_MSA; - VP8SSE8x8 = SSE8x8_MSA; - VP8SSE4x4 = SSE4x4_MSA; - - VP8EncQuantizeBlock = QuantizeBlock_MSA; - VP8EncQuantize2Blocks = Quantize2Blocks_MSA; - VP8EncQuantizeBlockWHT = QuantizeBlock_MSA; -} - -#else // !WEBP_USE_MSA - -WEBP_DSP_INIT_STUB(VP8EncDspInitMSA) - -#endif // WEBP_USE_MSA diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_neon.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_neon.c deleted file mode 100644 index 0eef336..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_neon.c +++ /dev/null @@ -1,938 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// ARM NEON version of speed-critical encoding functions. -// -// adapted from libvpx (http://www.webmproject.org/code/) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_NEON) - -#include - -#include "src/dsp/neon.h" -#include "src/enc/vp8i_enc.h" - -//------------------------------------------------------------------------------ -// Transforms (Paragraph 14.4) - -// Inverse transform. -// This code is pretty much the same as TransformOne in the dec_neon.c, except -// for subtraction to *ref. See the comments there for algorithmic explanations. - -static const int16_t kC1 = 20091; -static const int16_t kC2 = 17734; // half of kC2, actually. See comment above. - -// This code works but is *slower* than the inlined-asm version below -// (with gcc-4.6). So we disable it for now. Later, it'll be conditional to -// WEBP_USE_INTRINSICS define. -// With gcc-4.8, it's a little faster speed than inlined-assembly. -#if defined(WEBP_USE_INTRINSICS) - -// Treats 'v' as an uint8x8_t and zero extends to an int16x8_t. -static WEBP_INLINE int16x8_t ConvertU8ToS16_NEON(uint32x2_t v) { - return vreinterpretq_s16_u16(vmovl_u8(vreinterpret_u8_u32(v))); -} - -// Performs unsigned 8b saturation on 'dst01' and 'dst23' storing the result -// to the corresponding rows of 'dst'. -static WEBP_INLINE void SaturateAndStore4x4_NEON(uint8_t* const dst, - const int16x8_t dst01, - const int16x8_t dst23) { - // Unsigned saturate to 8b. - const uint8x8_t dst01_u8 = vqmovun_s16(dst01); - const uint8x8_t dst23_u8 = vqmovun_s16(dst23); - - // Store the results. - vst1_lane_u32((uint32_t*)(dst + 0 * BPS), vreinterpret_u32_u8(dst01_u8), 0); - vst1_lane_u32((uint32_t*)(dst + 1 * BPS), vreinterpret_u32_u8(dst01_u8), 1); - vst1_lane_u32((uint32_t*)(dst + 2 * BPS), vreinterpret_u32_u8(dst23_u8), 0); - vst1_lane_u32((uint32_t*)(dst + 3 * BPS), vreinterpret_u32_u8(dst23_u8), 1); -} - -static WEBP_INLINE void Add4x4_NEON(const int16x8_t row01, - const int16x8_t row23, - const uint8_t* const ref, - uint8_t* const dst) { - uint32x2_t dst01 = vdup_n_u32(0); - uint32x2_t dst23 = vdup_n_u32(0); - - // Load the source pixels. - dst01 = vld1_lane_u32((uint32_t*)(ref + 0 * BPS), dst01, 0); - dst23 = vld1_lane_u32((uint32_t*)(ref + 2 * BPS), dst23, 0); - dst01 = vld1_lane_u32((uint32_t*)(ref + 1 * BPS), dst01, 1); - dst23 = vld1_lane_u32((uint32_t*)(ref + 3 * BPS), dst23, 1); - - { - // Convert to 16b. - const int16x8_t dst01_s16 = ConvertU8ToS16_NEON(dst01); - const int16x8_t dst23_s16 = ConvertU8ToS16_NEON(dst23); - - // Descale with rounding. - const int16x8_t out01 = vrsraq_n_s16(dst01_s16, row01, 3); - const int16x8_t out23 = vrsraq_n_s16(dst23_s16, row23, 3); - // Add the inverse transform. - SaturateAndStore4x4_NEON(dst, out01, out23); - } -} - -static WEBP_INLINE void Transpose8x2_NEON(const int16x8_t in0, - const int16x8_t in1, - int16x8x2_t* const out) { - // a0 a1 a2 a3 | b0 b1 b2 b3 => a0 b0 c0 d0 | a1 b1 c1 d1 - // c0 c1 c2 c3 | d0 d1 d2 d3 a2 b2 c2 d2 | a3 b3 c3 d3 - const int16x8x2_t tmp0 = vzipq_s16(in0, in1); // a0 c0 a1 c1 a2 c2 ... - // b0 d0 b1 d1 b2 d2 ... - *out = vzipq_s16(tmp0.val[0], tmp0.val[1]); -} - -static WEBP_INLINE void TransformPass_NEON(int16x8x2_t* const rows) { - // {rows} = in0 | in4 - // in8 | in12 - // B1 = in4 | in12 - const int16x8_t B1 = - vcombine_s16(vget_high_s16(rows->val[0]), vget_high_s16(rows->val[1])); - // C0 = kC1 * in4 | kC1 * in12 - // C1 = kC2 * in4 | kC2 * in12 - const int16x8_t C0 = vsraq_n_s16(B1, vqdmulhq_n_s16(B1, kC1), 1); - const int16x8_t C1 = vqdmulhq_n_s16(B1, kC2); - const int16x4_t a = vqadd_s16(vget_low_s16(rows->val[0]), - vget_low_s16(rows->val[1])); // in0 + in8 - const int16x4_t b = vqsub_s16(vget_low_s16(rows->val[0]), - vget_low_s16(rows->val[1])); // in0 - in8 - // c = kC2 * in4 - kC1 * in12 - // d = kC1 * in4 + kC2 * in12 - const int16x4_t c = vqsub_s16(vget_low_s16(C1), vget_high_s16(C0)); - const int16x4_t d = vqadd_s16(vget_low_s16(C0), vget_high_s16(C1)); - const int16x8_t D0 = vcombine_s16(a, b); // D0 = a | b - const int16x8_t D1 = vcombine_s16(d, c); // D1 = d | c - const int16x8_t E0 = vqaddq_s16(D0, D1); // a+d | b+c - const int16x8_t E_tmp = vqsubq_s16(D0, D1); // a-d | b-c - const int16x8_t E1 = vcombine_s16(vget_high_s16(E_tmp), vget_low_s16(E_tmp)); - Transpose8x2_NEON(E0, E1, rows); -} - -static void ITransformOne_NEON(const uint8_t* ref, - const int16_t* in, uint8_t* dst) { - int16x8x2_t rows; - INIT_VECTOR2(rows, vld1q_s16(in + 0), vld1q_s16(in + 8)); - TransformPass_NEON(&rows); - TransformPass_NEON(&rows); - Add4x4_NEON(rows.val[0], rows.val[1], ref, dst); -} - -#else - -static void ITransformOne_NEON(const uint8_t* ref, - const int16_t* in, uint8_t* dst) { - const int kBPS = BPS; - const int16_t kC1C2[] = { kC1, kC2, 0, 0 }; - - __asm__ volatile ( - "vld1.16 {q1, q2}, [%[in]] \n" - "vld1.16 {d0}, [%[kC1C2]] \n" - - // d2: in[0] - // d3: in[8] - // d4: in[4] - // d5: in[12] - "vswp d3, d4 \n" - - // q8 = {in[4], in[12]} * kC1 * 2 >> 16 - // q9 = {in[4], in[12]} * kC2 >> 16 - "vqdmulh.s16 q8, q2, d0[0] \n" - "vqdmulh.s16 q9, q2, d0[1] \n" - - // d22 = a = in[0] + in[8] - // d23 = b = in[0] - in[8] - "vqadd.s16 d22, d2, d3 \n" - "vqsub.s16 d23, d2, d3 \n" - - // q8 = in[4]/[12] * kC1 >> 16 - "vshr.s16 q8, q8, #1 \n" - - // Add {in[4], in[12]} back after the multiplication. - "vqadd.s16 q8, q2, q8 \n" - - // d20 = c = in[4]*kC2 - in[12]*kC1 - // d21 = d = in[4]*kC1 + in[12]*kC2 - "vqsub.s16 d20, d18, d17 \n" - "vqadd.s16 d21, d19, d16 \n" - - // d2 = tmp[0] = a + d - // d3 = tmp[1] = b + c - // d4 = tmp[2] = b - c - // d5 = tmp[3] = a - d - "vqadd.s16 d2, d22, d21 \n" - "vqadd.s16 d3, d23, d20 \n" - "vqsub.s16 d4, d23, d20 \n" - "vqsub.s16 d5, d22, d21 \n" - - "vzip.16 q1, q2 \n" - "vzip.16 q1, q2 \n" - - "vswp d3, d4 \n" - - // q8 = {tmp[4], tmp[12]} * kC1 * 2 >> 16 - // q9 = {tmp[4], tmp[12]} * kC2 >> 16 - "vqdmulh.s16 q8, q2, d0[0] \n" - "vqdmulh.s16 q9, q2, d0[1] \n" - - // d22 = a = tmp[0] + tmp[8] - // d23 = b = tmp[0] - tmp[8] - "vqadd.s16 d22, d2, d3 \n" - "vqsub.s16 d23, d2, d3 \n" - - "vshr.s16 q8, q8, #1 \n" - "vqadd.s16 q8, q2, q8 \n" - - // d20 = c = in[4]*kC2 - in[12]*kC1 - // d21 = d = in[4]*kC1 + in[12]*kC2 - "vqsub.s16 d20, d18, d17 \n" - "vqadd.s16 d21, d19, d16 \n" - - // d2 = tmp[0] = a + d - // d3 = tmp[1] = b + c - // d4 = tmp[2] = b - c - // d5 = tmp[3] = a - d - "vqadd.s16 d2, d22, d21 \n" - "vqadd.s16 d3, d23, d20 \n" - "vqsub.s16 d4, d23, d20 \n" - "vqsub.s16 d5, d22, d21 \n" - - "vld1.32 d6[0], [%[ref]], %[kBPS] \n" - "vld1.32 d6[1], [%[ref]], %[kBPS] \n" - "vld1.32 d7[0], [%[ref]], %[kBPS] \n" - "vld1.32 d7[1], [%[ref]], %[kBPS] \n" - - "sub %[ref], %[ref], %[kBPS], lsl #2 \n" - - // (val) + 4 >> 3 - "vrshr.s16 d2, d2, #3 \n" - "vrshr.s16 d3, d3, #3 \n" - "vrshr.s16 d4, d4, #3 \n" - "vrshr.s16 d5, d5, #3 \n" - - "vzip.16 q1, q2 \n" - "vzip.16 q1, q2 \n" - - // Must accumulate before saturating - "vmovl.u8 q8, d6 \n" - "vmovl.u8 q9, d7 \n" - - "vqadd.s16 q1, q1, q8 \n" - "vqadd.s16 q2, q2, q9 \n" - - "vqmovun.s16 d0, q1 \n" - "vqmovun.s16 d1, q2 \n" - - "vst1.32 d0[0], [%[dst]], %[kBPS] \n" - "vst1.32 d0[1], [%[dst]], %[kBPS] \n" - "vst1.32 d1[0], [%[dst]], %[kBPS] \n" - "vst1.32 d1[1], [%[dst]] \n" - - : [in] "+r"(in), [dst] "+r"(dst) // modified registers - : [kBPS] "r"(kBPS), [kC1C2] "r"(kC1C2), [ref] "r"(ref) // constants - : "memory", "q0", "q1", "q2", "q8", "q9", "q10", "q11" // clobbered - ); -} - -#endif // WEBP_USE_INTRINSICS - -static void ITransform_NEON(const uint8_t* ref, - const int16_t* in, uint8_t* dst, int do_two) { - ITransformOne_NEON(ref, in, dst); - if (do_two) { - ITransformOne_NEON(ref + 4, in + 16, dst + 4); - } -} - -// Load all 4x4 pixels into a single uint8x16_t variable. -static uint8x16_t Load4x4_NEON(const uint8_t* src) { - uint32x4_t out = vdupq_n_u32(0); - out = vld1q_lane_u32((const uint32_t*)(src + 0 * BPS), out, 0); - out = vld1q_lane_u32((const uint32_t*)(src + 1 * BPS), out, 1); - out = vld1q_lane_u32((const uint32_t*)(src + 2 * BPS), out, 2); - out = vld1q_lane_u32((const uint32_t*)(src + 3 * BPS), out, 3); - return vreinterpretq_u8_u32(out); -} - -// Forward transform. - -#if defined(WEBP_USE_INTRINSICS) - -static WEBP_INLINE void Transpose4x4_S16_NEON(const int16x4_t A, - const int16x4_t B, - const int16x4_t C, - const int16x4_t D, - int16x8_t* const out01, - int16x8_t* const out32) { - const int16x4x2_t AB = vtrn_s16(A, B); - const int16x4x2_t CD = vtrn_s16(C, D); - const int32x2x2_t tmp02 = vtrn_s32(vreinterpret_s32_s16(AB.val[0]), - vreinterpret_s32_s16(CD.val[0])); - const int32x2x2_t tmp13 = vtrn_s32(vreinterpret_s32_s16(AB.val[1]), - vreinterpret_s32_s16(CD.val[1])); - *out01 = vreinterpretq_s16_s64( - vcombine_s64(vreinterpret_s64_s32(tmp02.val[0]), - vreinterpret_s64_s32(tmp13.val[0]))); - *out32 = vreinterpretq_s16_s64( - vcombine_s64(vreinterpret_s64_s32(tmp13.val[1]), - vreinterpret_s64_s32(tmp02.val[1]))); -} - -static WEBP_INLINE int16x8_t DiffU8ToS16_NEON(const uint8x8_t a, - const uint8x8_t b) { - return vreinterpretq_s16_u16(vsubl_u8(a, b)); -} - -static void FTransform_NEON(const uint8_t* src, const uint8_t* ref, - int16_t* out) { - int16x8_t d0d1, d3d2; // working 4x4 int16 variables - { - const uint8x16_t S0 = Load4x4_NEON(src); - const uint8x16_t R0 = Load4x4_NEON(ref); - const int16x8_t D0D1 = DiffU8ToS16_NEON(vget_low_u8(S0), vget_low_u8(R0)); - const int16x8_t D2D3 = DiffU8ToS16_NEON(vget_high_u8(S0), vget_high_u8(R0)); - const int16x4_t D0 = vget_low_s16(D0D1); - const int16x4_t D1 = vget_high_s16(D0D1); - const int16x4_t D2 = vget_low_s16(D2D3); - const int16x4_t D3 = vget_high_s16(D2D3); - Transpose4x4_S16_NEON(D0, D1, D2, D3, &d0d1, &d3d2); - } - { // 1rst pass - const int32x4_t kCst937 = vdupq_n_s32(937); - const int32x4_t kCst1812 = vdupq_n_s32(1812); - const int16x8_t a0a1 = vaddq_s16(d0d1, d3d2); // d0+d3 | d1+d2 (=a0|a1) - const int16x8_t a3a2 = vsubq_s16(d0d1, d3d2); // d0-d3 | d1-d2 (=a3|a2) - const int16x8_t a0a1_2 = vshlq_n_s16(a0a1, 3); - const int16x4_t tmp0 = vadd_s16(vget_low_s16(a0a1_2), - vget_high_s16(a0a1_2)); - const int16x4_t tmp2 = vsub_s16(vget_low_s16(a0a1_2), - vget_high_s16(a0a1_2)); - const int32x4_t a3_2217 = vmull_n_s16(vget_low_s16(a3a2), 2217); - const int32x4_t a2_2217 = vmull_n_s16(vget_high_s16(a3a2), 2217); - const int32x4_t a2_p_a3 = vmlal_n_s16(a2_2217, vget_low_s16(a3a2), 5352); - const int32x4_t a3_m_a2 = vmlsl_n_s16(a3_2217, vget_high_s16(a3a2), 5352); - const int16x4_t tmp1 = vshrn_n_s32(vaddq_s32(a2_p_a3, kCst1812), 9); - const int16x4_t tmp3 = vshrn_n_s32(vaddq_s32(a3_m_a2, kCst937), 9); - Transpose4x4_S16_NEON(tmp0, tmp1, tmp2, tmp3, &d0d1, &d3d2); - } - { // 2nd pass - // the (1<<16) addition is for the replacement: a3!=0 <-> 1-(a3==0) - const int32x4_t kCst12000 = vdupq_n_s32(12000 + (1 << 16)); - const int32x4_t kCst51000 = vdupq_n_s32(51000); - const int16x8_t a0a1 = vaddq_s16(d0d1, d3d2); // d0+d3 | d1+d2 (=a0|a1) - const int16x8_t a3a2 = vsubq_s16(d0d1, d3d2); // d0-d3 | d1-d2 (=a3|a2) - const int16x4_t a0_k7 = vadd_s16(vget_low_s16(a0a1), vdup_n_s16(7)); - const int16x4_t out0 = vshr_n_s16(vadd_s16(a0_k7, vget_high_s16(a0a1)), 4); - const int16x4_t out2 = vshr_n_s16(vsub_s16(a0_k7, vget_high_s16(a0a1)), 4); - const int32x4_t a3_2217 = vmull_n_s16(vget_low_s16(a3a2), 2217); - const int32x4_t a2_2217 = vmull_n_s16(vget_high_s16(a3a2), 2217); - const int32x4_t a2_p_a3 = vmlal_n_s16(a2_2217, vget_low_s16(a3a2), 5352); - const int32x4_t a3_m_a2 = vmlsl_n_s16(a3_2217, vget_high_s16(a3a2), 5352); - const int16x4_t tmp1 = vaddhn_s32(a2_p_a3, kCst12000); - const int16x4_t out3 = vaddhn_s32(a3_m_a2, kCst51000); - const int16x4_t a3_eq_0 = - vreinterpret_s16_u16(vceq_s16(vget_low_s16(a3a2), vdup_n_s16(0))); - const int16x4_t out1 = vadd_s16(tmp1, a3_eq_0); - vst1_s16(out + 0, out0); - vst1_s16(out + 4, out1); - vst1_s16(out + 8, out2); - vst1_s16(out + 12, out3); - } -} - -#else - -// adapted from vp8/encoder/arm/neon/shortfdct_neon.asm -static const int16_t kCoeff16[] = { - 5352, 5352, 5352, 5352, 2217, 2217, 2217, 2217 -}; -static const int32_t kCoeff32[] = { - 1812, 1812, 1812, 1812, - 937, 937, 937, 937, - 12000, 12000, 12000, 12000, - 51000, 51000, 51000, 51000 -}; - -static void FTransform_NEON(const uint8_t* src, const uint8_t* ref, - int16_t* out) { - const int kBPS = BPS; - const uint8_t* src_ptr = src; - const uint8_t* ref_ptr = ref; - const int16_t* coeff16 = kCoeff16; - const int32_t* coeff32 = kCoeff32; - - __asm__ volatile ( - // load src into q4, q5 in high half - "vld1.8 {d8}, [%[src_ptr]], %[kBPS] \n" - "vld1.8 {d10}, [%[src_ptr]], %[kBPS] \n" - "vld1.8 {d9}, [%[src_ptr]], %[kBPS] \n" - "vld1.8 {d11}, [%[src_ptr]] \n" - - // load ref into q6, q7 in high half - "vld1.8 {d12}, [%[ref_ptr]], %[kBPS] \n" - "vld1.8 {d14}, [%[ref_ptr]], %[kBPS] \n" - "vld1.8 {d13}, [%[ref_ptr]], %[kBPS] \n" - "vld1.8 {d15}, [%[ref_ptr]] \n" - - // Pack the high values in to q4 and q6 - "vtrn.32 q4, q5 \n" - "vtrn.32 q6, q7 \n" - - // d[0-3] = src - ref - "vsubl.u8 q0, d8, d12 \n" - "vsubl.u8 q1, d9, d13 \n" - - // load coeff16 into q8(d16=5352, d17=2217) - "vld1.16 {q8}, [%[coeff16]] \n" - - // load coeff32 high half into q9 = 1812, q10 = 937 - "vld1.32 {q9, q10}, [%[coeff32]]! \n" - - // load coeff32 low half into q11=12000, q12=51000 - "vld1.32 {q11,q12}, [%[coeff32]] \n" - - // part 1 - // Transpose. Register dN is the same as dN in C - "vtrn.32 d0, d2 \n" - "vtrn.32 d1, d3 \n" - "vtrn.16 d0, d1 \n" - "vtrn.16 d2, d3 \n" - - "vadd.s16 d4, d0, d3 \n" // a0 = d0 + d3 - "vadd.s16 d5, d1, d2 \n" // a1 = d1 + d2 - "vsub.s16 d6, d1, d2 \n" // a2 = d1 - d2 - "vsub.s16 d7, d0, d3 \n" // a3 = d0 - d3 - - "vadd.s16 d0, d4, d5 \n" // a0 + a1 - "vshl.s16 d0, d0, #3 \n" // temp[0+i*4] = (a0+a1) << 3 - "vsub.s16 d2, d4, d5 \n" // a0 - a1 - "vshl.s16 d2, d2, #3 \n" // (temp[2+i*4] = (a0-a1) << 3 - - "vmlal.s16 q9, d7, d16 \n" // a3*5352 + 1812 - "vmlal.s16 q10, d7, d17 \n" // a3*2217 + 937 - "vmlal.s16 q9, d6, d17 \n" // a2*2217 + a3*5352 + 1812 - "vmlsl.s16 q10, d6, d16 \n" // a3*2217 + 937 - a2*5352 - - // temp[1+i*4] = (d2*2217 + d3*5352 + 1812) >> 9 - // temp[3+i*4] = (d3*2217 + 937 - d2*5352) >> 9 - "vshrn.s32 d1, q9, #9 \n" - "vshrn.s32 d3, q10, #9 \n" - - // part 2 - // transpose d0=ip[0], d1=ip[4], d2=ip[8], d3=ip[12] - "vtrn.32 d0, d2 \n" - "vtrn.32 d1, d3 \n" - "vtrn.16 d0, d1 \n" - "vtrn.16 d2, d3 \n" - - "vmov.s16 d26, #7 \n" - - "vadd.s16 d4, d0, d3 \n" // a1 = ip[0] + ip[12] - "vadd.s16 d5, d1, d2 \n" // b1 = ip[4] + ip[8] - "vsub.s16 d6, d1, d2 \n" // c1 = ip[4] - ip[8] - "vadd.s16 d4, d4, d26 \n" // a1 + 7 - "vsub.s16 d7, d0, d3 \n" // d1 = ip[0] - ip[12] - - "vadd.s16 d0, d4, d5 \n" // op[0] = a1 + b1 + 7 - "vsub.s16 d2, d4, d5 \n" // op[8] = a1 - b1 + 7 - - "vmlal.s16 q11, d7, d16 \n" // d1*5352 + 12000 - "vmlal.s16 q12, d7, d17 \n" // d1*2217 + 51000 - - "vceq.s16 d4, d7, #0 \n" - - "vshr.s16 d0, d0, #4 \n" - "vshr.s16 d2, d2, #4 \n" - - "vmlal.s16 q11, d6, d17 \n" // c1*2217 + d1*5352 + 12000 - "vmlsl.s16 q12, d6, d16 \n" // d1*2217 - c1*5352 + 51000 - - "vmvn d4, d4 \n" // !(d1 == 0) - // op[4] = (c1*2217 + d1*5352 + 12000)>>16 - "vshrn.s32 d1, q11, #16 \n" - // op[4] += (d1!=0) - "vsub.s16 d1, d1, d4 \n" - // op[12]= (d1*2217 - c1*5352 + 51000)>>16 - "vshrn.s32 d3, q12, #16 \n" - - // set result to out array - "vst1.16 {q0, q1}, [%[out]] \n" - : [src_ptr] "+r"(src_ptr), [ref_ptr] "+r"(ref_ptr), - [coeff32] "+r"(coeff32) // modified registers - : [kBPS] "r"(kBPS), [coeff16] "r"(coeff16), - [out] "r"(out) // constants - : "memory", "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q9", - "q10", "q11", "q12", "q13" // clobbered - ); -} - -#endif - -#define LOAD_LANE_16b(VALUE, LANE) do { \ - (VALUE) = vld1_lane_s16(src, (VALUE), (LANE)); \ - src += stride; \ -} while (0) - -static void FTransformWHT_NEON(const int16_t* src, int16_t* out) { - const int stride = 16; - const int16x4_t zero = vdup_n_s16(0); - int32x4x4_t tmp0; - int16x4x4_t in; - INIT_VECTOR4(in, zero, zero, zero, zero); - LOAD_LANE_16b(in.val[0], 0); - LOAD_LANE_16b(in.val[1], 0); - LOAD_LANE_16b(in.val[2], 0); - LOAD_LANE_16b(in.val[3], 0); - LOAD_LANE_16b(in.val[0], 1); - LOAD_LANE_16b(in.val[1], 1); - LOAD_LANE_16b(in.val[2], 1); - LOAD_LANE_16b(in.val[3], 1); - LOAD_LANE_16b(in.val[0], 2); - LOAD_LANE_16b(in.val[1], 2); - LOAD_LANE_16b(in.val[2], 2); - LOAD_LANE_16b(in.val[3], 2); - LOAD_LANE_16b(in.val[0], 3); - LOAD_LANE_16b(in.val[1], 3); - LOAD_LANE_16b(in.val[2], 3); - LOAD_LANE_16b(in.val[3], 3); - - { - // a0 = in[0 * 16] + in[2 * 16] - // a1 = in[1 * 16] + in[3 * 16] - // a2 = in[1 * 16] - in[3 * 16] - // a3 = in[0 * 16] - in[2 * 16] - const int32x4_t a0 = vaddl_s16(in.val[0], in.val[2]); - const int32x4_t a1 = vaddl_s16(in.val[1], in.val[3]); - const int32x4_t a2 = vsubl_s16(in.val[1], in.val[3]); - const int32x4_t a3 = vsubl_s16(in.val[0], in.val[2]); - tmp0.val[0] = vaddq_s32(a0, a1); - tmp0.val[1] = vaddq_s32(a3, a2); - tmp0.val[2] = vsubq_s32(a3, a2); - tmp0.val[3] = vsubq_s32(a0, a1); - } - { - const int32x4x4_t tmp1 = Transpose4x4_NEON(tmp0); - // a0 = tmp[0 + i] + tmp[ 8 + i] - // a1 = tmp[4 + i] + tmp[12 + i] - // a2 = tmp[4 + i] - tmp[12 + i] - // a3 = tmp[0 + i] - tmp[ 8 + i] - const int32x4_t a0 = vaddq_s32(tmp1.val[0], tmp1.val[2]); - const int32x4_t a1 = vaddq_s32(tmp1.val[1], tmp1.val[3]); - const int32x4_t a2 = vsubq_s32(tmp1.val[1], tmp1.val[3]); - const int32x4_t a3 = vsubq_s32(tmp1.val[0], tmp1.val[2]); - const int32x4_t b0 = vhaddq_s32(a0, a1); // (a0 + a1) >> 1 - const int32x4_t b1 = vhaddq_s32(a3, a2); // (a3 + a2) >> 1 - const int32x4_t b2 = vhsubq_s32(a3, a2); // (a3 - a2) >> 1 - const int32x4_t b3 = vhsubq_s32(a0, a1); // (a0 - a1) >> 1 - const int16x4_t out0 = vmovn_s32(b0); - const int16x4_t out1 = vmovn_s32(b1); - const int16x4_t out2 = vmovn_s32(b2); - const int16x4_t out3 = vmovn_s32(b3); - - vst1_s16(out + 0, out0); - vst1_s16(out + 4, out1); - vst1_s16(out + 8, out2); - vst1_s16(out + 12, out3); - } -} -#undef LOAD_LANE_16b - -//------------------------------------------------------------------------------ -// Texture distortion -// -// We try to match the spectral content (weighted) between source and -// reconstructed samples. - -// a 0123, b 0123 -// a 4567, b 4567 -// a 89ab, b 89ab -// a cdef, b cdef -// -// transpose -// -// a 048c, b 048c -// a 159d, b 159d -// a 26ae, b 26ae -// a 37bf, b 37bf -// -static WEBP_INLINE int16x8x4_t DistoTranspose4x4S16_NEON(int16x8x4_t q4_in) { - const int16x8x2_t q2_tmp0 = vtrnq_s16(q4_in.val[0], q4_in.val[1]); - const int16x8x2_t q2_tmp1 = vtrnq_s16(q4_in.val[2], q4_in.val[3]); - const int32x4x2_t q2_tmp2 = vtrnq_s32(vreinterpretq_s32_s16(q2_tmp0.val[0]), - vreinterpretq_s32_s16(q2_tmp1.val[0])); - const int32x4x2_t q2_tmp3 = vtrnq_s32(vreinterpretq_s32_s16(q2_tmp0.val[1]), - vreinterpretq_s32_s16(q2_tmp1.val[1])); - q4_in.val[0] = vreinterpretq_s16_s32(q2_tmp2.val[0]); - q4_in.val[2] = vreinterpretq_s16_s32(q2_tmp2.val[1]); - q4_in.val[1] = vreinterpretq_s16_s32(q2_tmp3.val[0]); - q4_in.val[3] = vreinterpretq_s16_s32(q2_tmp3.val[1]); - return q4_in; -} - -static WEBP_INLINE int16x8x4_t DistoHorizontalPass_NEON( - const int16x8x4_t q4_in) { - // {a0, a1} = {in[0] + in[2], in[1] + in[3]} - // {a3, a2} = {in[0] - in[2], in[1] - in[3]} - const int16x8_t q_a0 = vaddq_s16(q4_in.val[0], q4_in.val[2]); - const int16x8_t q_a1 = vaddq_s16(q4_in.val[1], q4_in.val[3]); - const int16x8_t q_a3 = vsubq_s16(q4_in.val[0], q4_in.val[2]); - const int16x8_t q_a2 = vsubq_s16(q4_in.val[1], q4_in.val[3]); - int16x8x4_t q4_out; - // tmp[0] = a0 + a1 - // tmp[1] = a3 + a2 - // tmp[2] = a3 - a2 - // tmp[3] = a0 - a1 - INIT_VECTOR4(q4_out, - vabsq_s16(vaddq_s16(q_a0, q_a1)), - vabsq_s16(vaddq_s16(q_a3, q_a2)), - vabdq_s16(q_a3, q_a2), vabdq_s16(q_a0, q_a1)); - return q4_out; -} - -static WEBP_INLINE int16x8x4_t DistoVerticalPass_NEON(const uint8x8x4_t q4_in) { - const int16x8_t q_a0 = vreinterpretq_s16_u16(vaddl_u8(q4_in.val[0], - q4_in.val[2])); - const int16x8_t q_a1 = vreinterpretq_s16_u16(vaddl_u8(q4_in.val[1], - q4_in.val[3])); - const int16x8_t q_a2 = vreinterpretq_s16_u16(vsubl_u8(q4_in.val[1], - q4_in.val[3])); - const int16x8_t q_a3 = vreinterpretq_s16_u16(vsubl_u8(q4_in.val[0], - q4_in.val[2])); - int16x8x4_t q4_out; - - INIT_VECTOR4(q4_out, - vaddq_s16(q_a0, q_a1), vaddq_s16(q_a3, q_a2), - vsubq_s16(q_a3, q_a2), vsubq_s16(q_a0, q_a1)); - return q4_out; -} - -static WEBP_INLINE int16x4x4_t DistoLoadW_NEON(const uint16_t* w) { - const uint16x8_t q_w07 = vld1q_u16(&w[0]); - const uint16x8_t q_w8f = vld1q_u16(&w[8]); - int16x4x4_t d4_w; - INIT_VECTOR4(d4_w, - vget_low_s16(vreinterpretq_s16_u16(q_w07)), - vget_high_s16(vreinterpretq_s16_u16(q_w07)), - vget_low_s16(vreinterpretq_s16_u16(q_w8f)), - vget_high_s16(vreinterpretq_s16_u16(q_w8f))); - return d4_w; -} - -static WEBP_INLINE int32x2_t DistoSum_NEON(const int16x8x4_t q4_in, - const int16x4x4_t d4_w) { - int32x2_t d_sum; - // sum += w[ 0] * abs(b0); - // sum += w[ 4] * abs(b1); - // sum += w[ 8] * abs(b2); - // sum += w[12] * abs(b3); - int32x4_t q_sum0 = vmull_s16(d4_w.val[0], vget_low_s16(q4_in.val[0])); - int32x4_t q_sum1 = vmull_s16(d4_w.val[1], vget_low_s16(q4_in.val[1])); - int32x4_t q_sum2 = vmull_s16(d4_w.val[2], vget_low_s16(q4_in.val[2])); - int32x4_t q_sum3 = vmull_s16(d4_w.val[3], vget_low_s16(q4_in.val[3])); - q_sum0 = vmlsl_s16(q_sum0, d4_w.val[0], vget_high_s16(q4_in.val[0])); - q_sum1 = vmlsl_s16(q_sum1, d4_w.val[1], vget_high_s16(q4_in.val[1])); - q_sum2 = vmlsl_s16(q_sum2, d4_w.val[2], vget_high_s16(q4_in.val[2])); - q_sum3 = vmlsl_s16(q_sum3, d4_w.val[3], vget_high_s16(q4_in.val[3])); - - q_sum0 = vaddq_s32(q_sum0, q_sum1); - q_sum2 = vaddq_s32(q_sum2, q_sum3); - q_sum2 = vaddq_s32(q_sum0, q_sum2); - d_sum = vpadd_s32(vget_low_s32(q_sum2), vget_high_s32(q_sum2)); - d_sum = vpadd_s32(d_sum, d_sum); - return d_sum; -} - -#define LOAD_LANE_32b(src, VALUE, LANE) \ - (VALUE) = vld1_lane_u32((const uint32_t*)(src), (VALUE), (LANE)) - -// Hadamard transform -// Returns the weighted sum of the absolute value of transformed coefficients. -// w[] contains a row-major 4 by 4 symmetric matrix. -static int Disto4x4_NEON(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - uint32x2_t d_in_ab_0123 = vdup_n_u32(0); - uint32x2_t d_in_ab_4567 = vdup_n_u32(0); - uint32x2_t d_in_ab_89ab = vdup_n_u32(0); - uint32x2_t d_in_ab_cdef = vdup_n_u32(0); - uint8x8x4_t d4_in; - - // load data a, b - LOAD_LANE_32b(a + 0 * BPS, d_in_ab_0123, 0); - LOAD_LANE_32b(a + 1 * BPS, d_in_ab_4567, 0); - LOAD_LANE_32b(a + 2 * BPS, d_in_ab_89ab, 0); - LOAD_LANE_32b(a + 3 * BPS, d_in_ab_cdef, 0); - LOAD_LANE_32b(b + 0 * BPS, d_in_ab_0123, 1); - LOAD_LANE_32b(b + 1 * BPS, d_in_ab_4567, 1); - LOAD_LANE_32b(b + 2 * BPS, d_in_ab_89ab, 1); - LOAD_LANE_32b(b + 3 * BPS, d_in_ab_cdef, 1); - INIT_VECTOR4(d4_in, - vreinterpret_u8_u32(d_in_ab_0123), - vreinterpret_u8_u32(d_in_ab_4567), - vreinterpret_u8_u32(d_in_ab_89ab), - vreinterpret_u8_u32(d_in_ab_cdef)); - - { - // Vertical pass first to avoid a transpose (vertical and horizontal passes - // are commutative because w/kWeightY is symmetric) and subsequent - // transpose. - const int16x8x4_t q4_v = DistoVerticalPass_NEON(d4_in); - const int16x4x4_t d4_w = DistoLoadW_NEON(w); - // horizontal pass - const int16x8x4_t q4_t = DistoTranspose4x4S16_NEON(q4_v); - const int16x8x4_t q4_h = DistoHorizontalPass_NEON(q4_t); - int32x2_t d_sum = DistoSum_NEON(q4_h, d4_w); - - // abs(sum2 - sum1) >> 5 - d_sum = vabs_s32(d_sum); - d_sum = vshr_n_s32(d_sum, 5); - return vget_lane_s32(d_sum, 0); - } -} -#undef LOAD_LANE_32b - -static int Disto16x16_NEON(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - int D = 0; - int x, y; - for (y = 0; y < 16 * BPS; y += 4 * BPS) { - for (x = 0; x < 16; x += 4) { - D += Disto4x4_NEON(a + x + y, b + x + y, w); - } - } - return D; -} - -//------------------------------------------------------------------------------ - -static void CollectHistogram_NEON(const uint8_t* ref, const uint8_t* pred, - int start_block, int end_block, - VP8Histogram* const histo) { - const uint16x8_t max_coeff_thresh = vdupq_n_u16(MAX_COEFF_THRESH); - int j; - int distribution[MAX_COEFF_THRESH + 1] = { 0 }; - for (j = start_block; j < end_block; ++j) { - int16_t out[16]; - FTransform_NEON(ref + VP8DspScan[j], pred + VP8DspScan[j], out); - { - int k; - const int16x8_t a0 = vld1q_s16(out + 0); - const int16x8_t b0 = vld1q_s16(out + 8); - const uint16x8_t a1 = vreinterpretq_u16_s16(vabsq_s16(a0)); - const uint16x8_t b1 = vreinterpretq_u16_s16(vabsq_s16(b0)); - const uint16x8_t a2 = vshrq_n_u16(a1, 3); - const uint16x8_t b2 = vshrq_n_u16(b1, 3); - const uint16x8_t a3 = vminq_u16(a2, max_coeff_thresh); - const uint16x8_t b3 = vminq_u16(b2, max_coeff_thresh); - vst1q_s16(out + 0, vreinterpretq_s16_u16(a3)); - vst1q_s16(out + 8, vreinterpretq_s16_u16(b3)); - // Convert coefficients to bin. - for (k = 0; k < 16; ++k) { - ++distribution[out[k]]; - } - } - } - VP8SetHistogramData(distribution, histo); -} - -//------------------------------------------------------------------------------ - -static WEBP_INLINE void AccumulateSSE16_NEON(const uint8_t* const a, - const uint8_t* const b, - uint32x4_t* const sum) { - const uint8x16_t a0 = vld1q_u8(a); - const uint8x16_t b0 = vld1q_u8(b); - const uint8x16_t abs_diff = vabdq_u8(a0, b0); - const uint16x8_t prod1 = vmull_u8(vget_low_u8(abs_diff), - vget_low_u8(abs_diff)); - const uint16x8_t prod2 = vmull_u8(vget_high_u8(abs_diff), - vget_high_u8(abs_diff)); - /* pair-wise adds and widen */ - const uint32x4_t sum1 = vpaddlq_u16(prod1); - const uint32x4_t sum2 = vpaddlq_u16(prod2); - *sum = vaddq_u32(*sum, vaddq_u32(sum1, sum2)); -} - -// Horizontal sum of all four uint32_t values in 'sum'. -static int SumToInt_NEON(uint32x4_t sum) { - const uint64x2_t sum2 = vpaddlq_u32(sum); - const uint64_t sum3 = vgetq_lane_u64(sum2, 0) + vgetq_lane_u64(sum2, 1); - return (int)sum3; -} - -static int SSE16x16_NEON(const uint8_t* a, const uint8_t* b) { - uint32x4_t sum = vdupq_n_u32(0); - int y; - for (y = 0; y < 16; ++y) { - AccumulateSSE16_NEON(a + y * BPS, b + y * BPS, &sum); - } - return SumToInt_NEON(sum); -} - -static int SSE16x8_NEON(const uint8_t* a, const uint8_t* b) { - uint32x4_t sum = vdupq_n_u32(0); - int y; - for (y = 0; y < 8; ++y) { - AccumulateSSE16_NEON(a + y * BPS, b + y * BPS, &sum); - } - return SumToInt_NEON(sum); -} - -static int SSE8x8_NEON(const uint8_t* a, const uint8_t* b) { - uint32x4_t sum = vdupq_n_u32(0); - int y; - for (y = 0; y < 8; ++y) { - const uint8x8_t a0 = vld1_u8(a + y * BPS); - const uint8x8_t b0 = vld1_u8(b + y * BPS); - const uint8x8_t abs_diff = vabd_u8(a0, b0); - const uint16x8_t prod = vmull_u8(abs_diff, abs_diff); - sum = vpadalq_u16(sum, prod); - } - return SumToInt_NEON(sum); -} - -static int SSE4x4_NEON(const uint8_t* a, const uint8_t* b) { - const uint8x16_t a0 = Load4x4_NEON(a); - const uint8x16_t b0 = Load4x4_NEON(b); - const uint8x16_t abs_diff = vabdq_u8(a0, b0); - const uint16x8_t prod1 = vmull_u8(vget_low_u8(abs_diff), - vget_low_u8(abs_diff)); - const uint16x8_t prod2 = vmull_u8(vget_high_u8(abs_diff), - vget_high_u8(abs_diff)); - /* pair-wise adds and widen */ - const uint32x4_t sum1 = vpaddlq_u16(prod1); - const uint32x4_t sum2 = vpaddlq_u16(prod2); - return SumToInt_NEON(vaddq_u32(sum1, sum2)); -} - -//------------------------------------------------------------------------------ - -// Compilation with gcc-4.6.x is problematic for now. -#if !defined(WORK_AROUND_GCC) - -static int16x8_t Quantize_NEON(int16_t* const in, - const VP8Matrix* const mtx, int offset) { - const uint16x8_t sharp = vld1q_u16(&mtx->sharpen_[offset]); - const uint16x8_t q = vld1q_u16(&mtx->q_[offset]); - const uint16x8_t iq = vld1q_u16(&mtx->iq_[offset]); - const uint32x4_t bias0 = vld1q_u32(&mtx->bias_[offset + 0]); - const uint32x4_t bias1 = vld1q_u32(&mtx->bias_[offset + 4]); - - const int16x8_t a = vld1q_s16(in + offset); // in - const uint16x8_t b = vreinterpretq_u16_s16(vabsq_s16(a)); // coeff = abs(in) - const int16x8_t sign = vshrq_n_s16(a, 15); // sign - const uint16x8_t c = vaddq_u16(b, sharp); // + sharpen - const uint32x4_t m0 = vmull_u16(vget_low_u16(c), vget_low_u16(iq)); - const uint32x4_t m1 = vmull_u16(vget_high_u16(c), vget_high_u16(iq)); - const uint32x4_t m2 = vhaddq_u32(m0, bias0); - const uint32x4_t m3 = vhaddq_u32(m1, bias1); // (coeff * iQ + bias) >> 1 - const uint16x8_t c0 = vcombine_u16(vshrn_n_u32(m2, 16), - vshrn_n_u32(m3, 16)); // QFIX=17 = 16+1 - const uint16x8_t c1 = vminq_u16(c0, vdupq_n_u16(MAX_LEVEL)); - const int16x8_t c2 = veorq_s16(vreinterpretq_s16_u16(c1), sign); - const int16x8_t c3 = vsubq_s16(c2, sign); // restore sign - const int16x8_t c4 = vmulq_s16(c3, vreinterpretq_s16_u16(q)); - vst1q_s16(in + offset, c4); - assert(QFIX == 17); // this function can't work as is if QFIX != 16+1 - return c3; -} - -static const uint8_t kShuffles[4][8] = { - { 0, 1, 2, 3, 8, 9, 16, 17 }, - { 10, 11, 4, 5, 6, 7, 12, 13 }, - { 18, 19, 24, 25, 26, 27, 20, 21 }, - { 14, 15, 22, 23, 28, 29, 30, 31 } -}; - -static int QuantizeBlock_NEON(int16_t in[16], int16_t out[16], - const VP8Matrix* const mtx) { - const int16x8_t out0 = Quantize_NEON(in, mtx, 0); - const int16x8_t out1 = Quantize_NEON(in, mtx, 8); - uint8x8x4_t shuffles; - // vtbl?_u8 are marked unavailable for iOS arm64 with Xcode < 6.3, use - // non-standard versions there. -#if defined(__APPLE__) && defined(__aarch64__) && \ - defined(__apple_build_version__) && (__apple_build_version__< 6020037) - uint8x16x2_t all_out; - INIT_VECTOR2(all_out, vreinterpretq_u8_s16(out0), vreinterpretq_u8_s16(out1)); - INIT_VECTOR4(shuffles, - vtbl2q_u8(all_out, vld1_u8(kShuffles[0])), - vtbl2q_u8(all_out, vld1_u8(kShuffles[1])), - vtbl2q_u8(all_out, vld1_u8(kShuffles[2])), - vtbl2q_u8(all_out, vld1_u8(kShuffles[3]))); -#else - uint8x8x4_t all_out; - INIT_VECTOR4(all_out, - vreinterpret_u8_s16(vget_low_s16(out0)), - vreinterpret_u8_s16(vget_high_s16(out0)), - vreinterpret_u8_s16(vget_low_s16(out1)), - vreinterpret_u8_s16(vget_high_s16(out1))); - INIT_VECTOR4(shuffles, - vtbl4_u8(all_out, vld1_u8(kShuffles[0])), - vtbl4_u8(all_out, vld1_u8(kShuffles[1])), - vtbl4_u8(all_out, vld1_u8(kShuffles[2])), - vtbl4_u8(all_out, vld1_u8(kShuffles[3]))); -#endif - // Zigzag reordering - vst1_u8((uint8_t*)(out + 0), shuffles.val[0]); - vst1_u8((uint8_t*)(out + 4), shuffles.val[1]); - vst1_u8((uint8_t*)(out + 8), shuffles.val[2]); - vst1_u8((uint8_t*)(out + 12), shuffles.val[3]); - // test zeros - if (*(uint64_t*)(out + 0) != 0) return 1; - if (*(uint64_t*)(out + 4) != 0) return 1; - if (*(uint64_t*)(out + 8) != 0) return 1; - if (*(uint64_t*)(out + 12) != 0) return 1; - return 0; -} - -static int Quantize2Blocks_NEON(int16_t in[32], int16_t out[32], - const VP8Matrix* const mtx) { - int nz; - nz = QuantizeBlock_NEON(in + 0 * 16, out + 0 * 16, mtx) << 0; - nz |= QuantizeBlock_NEON(in + 1 * 16, out + 1 * 16, mtx) << 1; - return nz; -} - -#endif // !WORK_AROUND_GCC - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8EncDspInitNEON(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitNEON(void) { - VP8ITransform = ITransform_NEON; - VP8FTransform = FTransform_NEON; - - VP8FTransformWHT = FTransformWHT_NEON; - - VP8TDisto4x4 = Disto4x4_NEON; - VP8TDisto16x16 = Disto16x16_NEON; - VP8CollectHistogram = CollectHistogram_NEON; - - VP8SSE16x16 = SSE16x16_NEON; - VP8SSE16x8 = SSE16x8_NEON; - VP8SSE8x8 = SSE8x8_NEON; - VP8SSE4x4 = SSE4x4_NEON; - -#if !defined(WORK_AROUND_GCC) - VP8EncQuantizeBlock = QuantizeBlock_NEON; - VP8EncQuantize2Blocks = Quantize2Blocks_NEON; -#endif -} - -#else // !WEBP_USE_NEON - -WEBP_DSP_INIT_STUB(VP8EncDspInitNEON) - -#endif // WEBP_USE_NEON diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_sse2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_sse2.c deleted file mode 100644 index b58c1b6..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_sse2.c +++ /dev/null @@ -1,1381 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE2 version of speed-critical encoding functions. -// -// Author: Christian Duvivier (cduvivier@google.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE2) -#include -#include // for abs() -#include - -#include "src/dsp/common_sse2.h" -#include "src/enc/cost_enc.h" -#include "src/enc/vp8i_enc.h" - -//------------------------------------------------------------------------------ -// Transforms (Paragraph 14.4) - -// Does one or two inverse transforms. -static void ITransform_SSE2(const uint8_t* ref, const int16_t* in, uint8_t* dst, - int do_two) { - // This implementation makes use of 16-bit fixed point versions of two - // multiply constants: - // K1 = sqrt(2) * cos (pi/8) ~= 85627 / 2^16 - // K2 = sqrt(2) * sin (pi/8) ~= 35468 / 2^16 - // - // To be able to use signed 16-bit integers, we use the following trick to - // have constants within range: - // - Associated constants are obtained by subtracting the 16-bit fixed point - // version of one: - // k = K - (1 << 16) => K = k + (1 << 16) - // K1 = 85267 => k1 = 20091 - // K2 = 35468 => k2 = -30068 - // - The multiplication of a variable by a constant become the sum of the - // variable and the multiplication of that variable by the associated - // constant: - // (x * K) >> 16 = (x * (k + (1 << 16))) >> 16 = ((x * k ) >> 16) + x - const __m128i k1 = _mm_set1_epi16(20091); - const __m128i k2 = _mm_set1_epi16(-30068); - __m128i T0, T1, T2, T3; - - // Load and concatenate the transform coefficients (we'll do two inverse - // transforms in parallel). In the case of only one inverse transform, the - // second half of the vectors will just contain random value we'll never - // use nor store. - __m128i in0, in1, in2, in3; - { - in0 = _mm_loadl_epi64((const __m128i*)&in[0]); - in1 = _mm_loadl_epi64((const __m128i*)&in[4]); - in2 = _mm_loadl_epi64((const __m128i*)&in[8]); - in3 = _mm_loadl_epi64((const __m128i*)&in[12]); - // a00 a10 a20 a30 x x x x - // a01 a11 a21 a31 x x x x - // a02 a12 a22 a32 x x x x - // a03 a13 a23 a33 x x x x - if (do_two) { - const __m128i inB0 = _mm_loadl_epi64((const __m128i*)&in[16]); - const __m128i inB1 = _mm_loadl_epi64((const __m128i*)&in[20]); - const __m128i inB2 = _mm_loadl_epi64((const __m128i*)&in[24]); - const __m128i inB3 = _mm_loadl_epi64((const __m128i*)&in[28]); - in0 = _mm_unpacklo_epi64(in0, inB0); - in1 = _mm_unpacklo_epi64(in1, inB1); - in2 = _mm_unpacklo_epi64(in2, inB2); - in3 = _mm_unpacklo_epi64(in3, inB3); - // a00 a10 a20 a30 b00 b10 b20 b30 - // a01 a11 a21 a31 b01 b11 b21 b31 - // a02 a12 a22 a32 b02 b12 b22 b32 - // a03 a13 a23 a33 b03 b13 b23 b33 - } - } - - // Vertical pass and subsequent transpose. - { - // First pass, c and d calculations are longer because of the "trick" - // multiplications. - const __m128i a = _mm_add_epi16(in0, in2); - const __m128i b = _mm_sub_epi16(in0, in2); - // c = MUL(in1, K2) - MUL(in3, K1) = MUL(in1, k2) - MUL(in3, k1) + in1 - in3 - const __m128i c1 = _mm_mulhi_epi16(in1, k2); - const __m128i c2 = _mm_mulhi_epi16(in3, k1); - const __m128i c3 = _mm_sub_epi16(in1, in3); - const __m128i c4 = _mm_sub_epi16(c1, c2); - const __m128i c = _mm_add_epi16(c3, c4); - // d = MUL(in1, K1) + MUL(in3, K2) = MUL(in1, k1) + MUL(in3, k2) + in1 + in3 - const __m128i d1 = _mm_mulhi_epi16(in1, k1); - const __m128i d2 = _mm_mulhi_epi16(in3, k2); - const __m128i d3 = _mm_add_epi16(in1, in3); - const __m128i d4 = _mm_add_epi16(d1, d2); - const __m128i d = _mm_add_epi16(d3, d4); - - // Second pass. - const __m128i tmp0 = _mm_add_epi16(a, d); - const __m128i tmp1 = _mm_add_epi16(b, c); - const __m128i tmp2 = _mm_sub_epi16(b, c); - const __m128i tmp3 = _mm_sub_epi16(a, d); - - // Transpose the two 4x4. - VP8Transpose_2_4x4_16b(&tmp0, &tmp1, &tmp2, &tmp3, &T0, &T1, &T2, &T3); - } - - // Horizontal pass and subsequent transpose. - { - // First pass, c and d calculations are longer because of the "trick" - // multiplications. - const __m128i four = _mm_set1_epi16(4); - const __m128i dc = _mm_add_epi16(T0, four); - const __m128i a = _mm_add_epi16(dc, T2); - const __m128i b = _mm_sub_epi16(dc, T2); - // c = MUL(T1, K2) - MUL(T3, K1) = MUL(T1, k2) - MUL(T3, k1) + T1 - T3 - const __m128i c1 = _mm_mulhi_epi16(T1, k2); - const __m128i c2 = _mm_mulhi_epi16(T3, k1); - const __m128i c3 = _mm_sub_epi16(T1, T3); - const __m128i c4 = _mm_sub_epi16(c1, c2); - const __m128i c = _mm_add_epi16(c3, c4); - // d = MUL(T1, K1) + MUL(T3, K2) = MUL(T1, k1) + MUL(T3, k2) + T1 + T3 - const __m128i d1 = _mm_mulhi_epi16(T1, k1); - const __m128i d2 = _mm_mulhi_epi16(T3, k2); - const __m128i d3 = _mm_add_epi16(T1, T3); - const __m128i d4 = _mm_add_epi16(d1, d2); - const __m128i d = _mm_add_epi16(d3, d4); - - // Second pass. - const __m128i tmp0 = _mm_add_epi16(a, d); - const __m128i tmp1 = _mm_add_epi16(b, c); - const __m128i tmp2 = _mm_sub_epi16(b, c); - const __m128i tmp3 = _mm_sub_epi16(a, d); - const __m128i shifted0 = _mm_srai_epi16(tmp0, 3); - const __m128i shifted1 = _mm_srai_epi16(tmp1, 3); - const __m128i shifted2 = _mm_srai_epi16(tmp2, 3); - const __m128i shifted3 = _mm_srai_epi16(tmp3, 3); - - // Transpose the two 4x4. - VP8Transpose_2_4x4_16b(&shifted0, &shifted1, &shifted2, &shifted3, &T0, &T1, - &T2, &T3); - } - - // Add inverse transform to 'ref' and store. - { - const __m128i zero = _mm_setzero_si128(); - // Load the reference(s). - __m128i ref0, ref1, ref2, ref3; - if (do_two) { - // Load eight bytes/pixels per line. - ref0 = _mm_loadl_epi64((const __m128i*)&ref[0 * BPS]); - ref1 = _mm_loadl_epi64((const __m128i*)&ref[1 * BPS]); - ref2 = _mm_loadl_epi64((const __m128i*)&ref[2 * BPS]); - ref3 = _mm_loadl_epi64((const __m128i*)&ref[3 * BPS]); - } else { - // Load four bytes/pixels per line. - ref0 = _mm_cvtsi32_si128(WebPMemToUint32(&ref[0 * BPS])); - ref1 = _mm_cvtsi32_si128(WebPMemToUint32(&ref[1 * BPS])); - ref2 = _mm_cvtsi32_si128(WebPMemToUint32(&ref[2 * BPS])); - ref3 = _mm_cvtsi32_si128(WebPMemToUint32(&ref[3 * BPS])); - } - // Convert to 16b. - ref0 = _mm_unpacklo_epi8(ref0, zero); - ref1 = _mm_unpacklo_epi8(ref1, zero); - ref2 = _mm_unpacklo_epi8(ref2, zero); - ref3 = _mm_unpacklo_epi8(ref3, zero); - // Add the inverse transform(s). - ref0 = _mm_add_epi16(ref0, T0); - ref1 = _mm_add_epi16(ref1, T1); - ref2 = _mm_add_epi16(ref2, T2); - ref3 = _mm_add_epi16(ref3, T3); - // Unsigned saturate to 8b. - ref0 = _mm_packus_epi16(ref0, ref0); - ref1 = _mm_packus_epi16(ref1, ref1); - ref2 = _mm_packus_epi16(ref2, ref2); - ref3 = _mm_packus_epi16(ref3, ref3); - // Store the results. - if (do_two) { - // Store eight bytes/pixels per line. - _mm_storel_epi64((__m128i*)&dst[0 * BPS], ref0); - _mm_storel_epi64((__m128i*)&dst[1 * BPS], ref1); - _mm_storel_epi64((__m128i*)&dst[2 * BPS], ref2); - _mm_storel_epi64((__m128i*)&dst[3 * BPS], ref3); - } else { - // Store four bytes/pixels per line. - WebPUint32ToMem(&dst[0 * BPS], _mm_cvtsi128_si32(ref0)); - WebPUint32ToMem(&dst[1 * BPS], _mm_cvtsi128_si32(ref1)); - WebPUint32ToMem(&dst[2 * BPS], _mm_cvtsi128_si32(ref2)); - WebPUint32ToMem(&dst[3 * BPS], _mm_cvtsi128_si32(ref3)); - } - } -} - -static void FTransformPass1_SSE2(const __m128i* const in01, - const __m128i* const in23, - __m128i* const out01, - __m128i* const out32) { - const __m128i k937 = _mm_set1_epi32(937); - const __m128i k1812 = _mm_set1_epi32(1812); - - const __m128i k88p = _mm_set_epi16(8, 8, 8, 8, 8, 8, 8, 8); - const __m128i k88m = _mm_set_epi16(-8, 8, -8, 8, -8, 8, -8, 8); - const __m128i k5352_2217p = _mm_set_epi16(2217, 5352, 2217, 5352, - 2217, 5352, 2217, 5352); - const __m128i k5352_2217m = _mm_set_epi16(-5352, 2217, -5352, 2217, - -5352, 2217, -5352, 2217); - - // *in01 = 00 01 10 11 02 03 12 13 - // *in23 = 20 21 30 31 22 23 32 33 - const __m128i shuf01_p = _mm_shufflehi_epi16(*in01, _MM_SHUFFLE(2, 3, 0, 1)); - const __m128i shuf23_p = _mm_shufflehi_epi16(*in23, _MM_SHUFFLE(2, 3, 0, 1)); - // 00 01 10 11 03 02 13 12 - // 20 21 30 31 23 22 33 32 - const __m128i s01 = _mm_unpacklo_epi64(shuf01_p, shuf23_p); - const __m128i s32 = _mm_unpackhi_epi64(shuf01_p, shuf23_p); - // 00 01 10 11 20 21 30 31 - // 03 02 13 12 23 22 33 32 - const __m128i a01 = _mm_add_epi16(s01, s32); - const __m128i a32 = _mm_sub_epi16(s01, s32); - // [d0 + d3 | d1 + d2 | ...] = [a0 a1 | a0' a1' | ... ] - // [d0 - d3 | d1 - d2 | ...] = [a3 a2 | a3' a2' | ... ] - - const __m128i tmp0 = _mm_madd_epi16(a01, k88p); // [ (a0 + a1) << 3, ... ] - const __m128i tmp2 = _mm_madd_epi16(a01, k88m); // [ (a0 - a1) << 3, ... ] - const __m128i tmp1_1 = _mm_madd_epi16(a32, k5352_2217p); - const __m128i tmp3_1 = _mm_madd_epi16(a32, k5352_2217m); - const __m128i tmp1_2 = _mm_add_epi32(tmp1_1, k1812); - const __m128i tmp3_2 = _mm_add_epi32(tmp3_1, k937); - const __m128i tmp1 = _mm_srai_epi32(tmp1_2, 9); - const __m128i tmp3 = _mm_srai_epi32(tmp3_2, 9); - const __m128i s03 = _mm_packs_epi32(tmp0, tmp2); - const __m128i s12 = _mm_packs_epi32(tmp1, tmp3); - const __m128i s_lo = _mm_unpacklo_epi16(s03, s12); // 0 1 0 1 0 1... - const __m128i s_hi = _mm_unpackhi_epi16(s03, s12); // 2 3 2 3 2 3 - const __m128i v23 = _mm_unpackhi_epi32(s_lo, s_hi); - *out01 = _mm_unpacklo_epi32(s_lo, s_hi); - *out32 = _mm_shuffle_epi32(v23, _MM_SHUFFLE(1, 0, 3, 2)); // 3 2 3 2 3 2.. -} - -static void FTransformPass2_SSE2(const __m128i* const v01, - const __m128i* const v32, - int16_t* out) { - const __m128i zero = _mm_setzero_si128(); - const __m128i seven = _mm_set1_epi16(7); - const __m128i k5352_2217 = _mm_set_epi16(5352, 2217, 5352, 2217, - 5352, 2217, 5352, 2217); - const __m128i k2217_5352 = _mm_set_epi16(2217, -5352, 2217, -5352, - 2217, -5352, 2217, -5352); - const __m128i k12000_plus_one = _mm_set1_epi32(12000 + (1 << 16)); - const __m128i k51000 = _mm_set1_epi32(51000); - - // Same operations are done on the (0,3) and (1,2) pairs. - // a3 = v0 - v3 - // a2 = v1 - v2 - const __m128i a32 = _mm_sub_epi16(*v01, *v32); - const __m128i a22 = _mm_unpackhi_epi64(a32, a32); - - const __m128i b23 = _mm_unpacklo_epi16(a22, a32); - const __m128i c1 = _mm_madd_epi16(b23, k5352_2217); - const __m128i c3 = _mm_madd_epi16(b23, k2217_5352); - const __m128i d1 = _mm_add_epi32(c1, k12000_plus_one); - const __m128i d3 = _mm_add_epi32(c3, k51000); - const __m128i e1 = _mm_srai_epi32(d1, 16); - const __m128i e3 = _mm_srai_epi32(d3, 16); - // f1 = ((b3 * 5352 + b2 * 2217 + 12000) >> 16) - // f3 = ((b3 * 2217 - b2 * 5352 + 51000) >> 16) - const __m128i f1 = _mm_packs_epi32(e1, e1); - const __m128i f3 = _mm_packs_epi32(e3, e3); - // g1 = f1 + (a3 != 0); - // The compare will return (0xffff, 0) for (==0, !=0). To turn that into the - // desired (0, 1), we add one earlier through k12000_plus_one. - // -> g1 = f1 + 1 - (a3 == 0) - const __m128i g1 = _mm_add_epi16(f1, _mm_cmpeq_epi16(a32, zero)); - - // a0 = v0 + v3 - // a1 = v1 + v2 - const __m128i a01 = _mm_add_epi16(*v01, *v32); - const __m128i a01_plus_7 = _mm_add_epi16(a01, seven); - const __m128i a11 = _mm_unpackhi_epi64(a01, a01); - const __m128i c0 = _mm_add_epi16(a01_plus_7, a11); - const __m128i c2 = _mm_sub_epi16(a01_plus_7, a11); - // d0 = (a0 + a1 + 7) >> 4; - // d2 = (a0 - a1 + 7) >> 4; - const __m128i d0 = _mm_srai_epi16(c0, 4); - const __m128i d2 = _mm_srai_epi16(c2, 4); - - const __m128i d0_g1 = _mm_unpacklo_epi64(d0, g1); - const __m128i d2_f3 = _mm_unpacklo_epi64(d2, f3); - _mm_storeu_si128((__m128i*)&out[0], d0_g1); - _mm_storeu_si128((__m128i*)&out[8], d2_f3); -} - -static void FTransform_SSE2(const uint8_t* src, const uint8_t* ref, - int16_t* out) { - const __m128i zero = _mm_setzero_si128(); - // Load src. - const __m128i src0 = _mm_loadl_epi64((const __m128i*)&src[0 * BPS]); - const __m128i src1 = _mm_loadl_epi64((const __m128i*)&src[1 * BPS]); - const __m128i src2 = _mm_loadl_epi64((const __m128i*)&src[2 * BPS]); - const __m128i src3 = _mm_loadl_epi64((const __m128i*)&src[3 * BPS]); - // 00 01 02 03 * - // 10 11 12 13 * - // 20 21 22 23 * - // 30 31 32 33 * - // Shuffle. - const __m128i src_0 = _mm_unpacklo_epi16(src0, src1); - const __m128i src_1 = _mm_unpacklo_epi16(src2, src3); - // 00 01 10 11 02 03 12 13 * * ... - // 20 21 30 31 22 22 32 33 * * ... - - // Load ref. - const __m128i ref0 = _mm_loadl_epi64((const __m128i*)&ref[0 * BPS]); - const __m128i ref1 = _mm_loadl_epi64((const __m128i*)&ref[1 * BPS]); - const __m128i ref2 = _mm_loadl_epi64((const __m128i*)&ref[2 * BPS]); - const __m128i ref3 = _mm_loadl_epi64((const __m128i*)&ref[3 * BPS]); - const __m128i ref_0 = _mm_unpacklo_epi16(ref0, ref1); - const __m128i ref_1 = _mm_unpacklo_epi16(ref2, ref3); - - // Convert both to 16 bit. - const __m128i src_0_16b = _mm_unpacklo_epi8(src_0, zero); - const __m128i src_1_16b = _mm_unpacklo_epi8(src_1, zero); - const __m128i ref_0_16b = _mm_unpacklo_epi8(ref_0, zero); - const __m128i ref_1_16b = _mm_unpacklo_epi8(ref_1, zero); - - // Compute the difference. - const __m128i row01 = _mm_sub_epi16(src_0_16b, ref_0_16b); - const __m128i row23 = _mm_sub_epi16(src_1_16b, ref_1_16b); - __m128i v01, v32; - - // First pass - FTransformPass1_SSE2(&row01, &row23, &v01, &v32); - - // Second pass - FTransformPass2_SSE2(&v01, &v32, out); -} - -static void FTransform2_SSE2(const uint8_t* src, const uint8_t* ref, - int16_t* out) { - const __m128i zero = _mm_setzero_si128(); - - // Load src and convert to 16b. - const __m128i src0 = _mm_loadl_epi64((const __m128i*)&src[0 * BPS]); - const __m128i src1 = _mm_loadl_epi64((const __m128i*)&src[1 * BPS]); - const __m128i src2 = _mm_loadl_epi64((const __m128i*)&src[2 * BPS]); - const __m128i src3 = _mm_loadl_epi64((const __m128i*)&src[3 * BPS]); - const __m128i src_0 = _mm_unpacklo_epi8(src0, zero); - const __m128i src_1 = _mm_unpacklo_epi8(src1, zero); - const __m128i src_2 = _mm_unpacklo_epi8(src2, zero); - const __m128i src_3 = _mm_unpacklo_epi8(src3, zero); - // Load ref and convert to 16b. - const __m128i ref0 = _mm_loadl_epi64((const __m128i*)&ref[0 * BPS]); - const __m128i ref1 = _mm_loadl_epi64((const __m128i*)&ref[1 * BPS]); - const __m128i ref2 = _mm_loadl_epi64((const __m128i*)&ref[2 * BPS]); - const __m128i ref3 = _mm_loadl_epi64((const __m128i*)&ref[3 * BPS]); - const __m128i ref_0 = _mm_unpacklo_epi8(ref0, zero); - const __m128i ref_1 = _mm_unpacklo_epi8(ref1, zero); - const __m128i ref_2 = _mm_unpacklo_epi8(ref2, zero); - const __m128i ref_3 = _mm_unpacklo_epi8(ref3, zero); - // Compute difference. -> 00 01 02 03 00' 01' 02' 03' - const __m128i diff0 = _mm_sub_epi16(src_0, ref_0); - const __m128i diff1 = _mm_sub_epi16(src_1, ref_1); - const __m128i diff2 = _mm_sub_epi16(src_2, ref_2); - const __m128i diff3 = _mm_sub_epi16(src_3, ref_3); - - // Unpack and shuffle - // 00 01 02 03 0 0 0 0 - // 10 11 12 13 0 0 0 0 - // 20 21 22 23 0 0 0 0 - // 30 31 32 33 0 0 0 0 - const __m128i shuf01l = _mm_unpacklo_epi32(diff0, diff1); - const __m128i shuf23l = _mm_unpacklo_epi32(diff2, diff3); - const __m128i shuf01h = _mm_unpackhi_epi32(diff0, diff1); - const __m128i shuf23h = _mm_unpackhi_epi32(diff2, diff3); - __m128i v01l, v32l; - __m128i v01h, v32h; - - // First pass - FTransformPass1_SSE2(&shuf01l, &shuf23l, &v01l, &v32l); - FTransformPass1_SSE2(&shuf01h, &shuf23h, &v01h, &v32h); - - // Second pass - FTransformPass2_SSE2(&v01l, &v32l, out + 0); - FTransformPass2_SSE2(&v01h, &v32h, out + 16); -} - -static void FTransformWHTRow_SSE2(const int16_t* const in, __m128i* const out) { - const __m128i kMult = _mm_set_epi16(-1, 1, -1, 1, 1, 1, 1, 1); - const __m128i src0 = _mm_loadl_epi64((__m128i*)&in[0 * 16]); - const __m128i src1 = _mm_loadl_epi64((__m128i*)&in[1 * 16]); - const __m128i src2 = _mm_loadl_epi64((__m128i*)&in[2 * 16]); - const __m128i src3 = _mm_loadl_epi64((__m128i*)&in[3 * 16]); - const __m128i A01 = _mm_unpacklo_epi16(src0, src1); // A0 A1 | ... - const __m128i A23 = _mm_unpacklo_epi16(src2, src3); // A2 A3 | ... - const __m128i B0 = _mm_adds_epi16(A01, A23); // a0 | a1 | ... - const __m128i B1 = _mm_subs_epi16(A01, A23); // a3 | a2 | ... - const __m128i C0 = _mm_unpacklo_epi32(B0, B1); // a0 | a1 | a3 | a2 | ... - const __m128i C1 = _mm_unpacklo_epi32(B1, B0); // a3 | a2 | a0 | a1 | ... - const __m128i D = _mm_unpacklo_epi64(C0, C1); // a0 a1 a3 a2 a3 a2 a0 a1 - *out = _mm_madd_epi16(D, kMult); -} - -static void FTransformWHT_SSE2(const int16_t* in, int16_t* out) { - // Input is 12b signed. - __m128i row0, row1, row2, row3; - // Rows are 14b signed. - FTransformWHTRow_SSE2(in + 0 * 64, &row0); - FTransformWHTRow_SSE2(in + 1 * 64, &row1); - FTransformWHTRow_SSE2(in + 2 * 64, &row2); - FTransformWHTRow_SSE2(in + 3 * 64, &row3); - - { - // The a* are 15b signed. - const __m128i a0 = _mm_add_epi32(row0, row2); - const __m128i a1 = _mm_add_epi32(row1, row3); - const __m128i a2 = _mm_sub_epi32(row1, row3); - const __m128i a3 = _mm_sub_epi32(row0, row2); - const __m128i a0a3 = _mm_packs_epi32(a0, a3); - const __m128i a1a2 = _mm_packs_epi32(a1, a2); - - // The b* are 16b signed. - const __m128i b0b1 = _mm_add_epi16(a0a3, a1a2); - const __m128i b3b2 = _mm_sub_epi16(a0a3, a1a2); - const __m128i tmp_b2b3 = _mm_unpackhi_epi64(b3b2, b3b2); - const __m128i b2b3 = _mm_unpacklo_epi64(tmp_b2b3, b3b2); - - _mm_storeu_si128((__m128i*)&out[0], _mm_srai_epi16(b0b1, 1)); - _mm_storeu_si128((__m128i*)&out[8], _mm_srai_epi16(b2b3, 1)); - } -} - -//------------------------------------------------------------------------------ -// Compute susceptibility based on DCT-coeff histograms: -// the higher, the "easier" the macroblock is to compress. - -static void CollectHistogram_SSE2(const uint8_t* ref, const uint8_t* pred, - int start_block, int end_block, - VP8Histogram* const histo) { - const __m128i zero = _mm_setzero_si128(); - const __m128i max_coeff_thresh = _mm_set1_epi16(MAX_COEFF_THRESH); - int j; - int distribution[MAX_COEFF_THRESH + 1] = { 0 }; - for (j = start_block; j < end_block; ++j) { - int16_t out[16]; - int k; - - FTransform_SSE2(ref + VP8DspScan[j], pred + VP8DspScan[j], out); - - // Convert coefficients to bin (within out[]). - { - // Load. - const __m128i out0 = _mm_loadu_si128((__m128i*)&out[0]); - const __m128i out1 = _mm_loadu_si128((__m128i*)&out[8]); - const __m128i d0 = _mm_sub_epi16(zero, out0); - const __m128i d1 = _mm_sub_epi16(zero, out1); - const __m128i abs0 = _mm_max_epi16(out0, d0); // abs(v), 16b - const __m128i abs1 = _mm_max_epi16(out1, d1); - // v = abs(out) >> 3 - const __m128i v0 = _mm_srai_epi16(abs0, 3); - const __m128i v1 = _mm_srai_epi16(abs1, 3); - // bin = min(v, MAX_COEFF_THRESH) - const __m128i bin0 = _mm_min_epi16(v0, max_coeff_thresh); - const __m128i bin1 = _mm_min_epi16(v1, max_coeff_thresh); - // Store. - _mm_storeu_si128((__m128i*)&out[0], bin0); - _mm_storeu_si128((__m128i*)&out[8], bin1); - } - - // Convert coefficients to bin. - for (k = 0; k < 16; ++k) { - ++distribution[out[k]]; - } - } - VP8SetHistogramData(distribution, histo); -} - -//------------------------------------------------------------------------------ -// Intra predictions - -// helper for chroma-DC predictions -static WEBP_INLINE void Put8x8uv_SSE2(uint8_t v, uint8_t* dst) { - int j; - const __m128i values = _mm_set1_epi8(v); - for (j = 0; j < 8; ++j) { - _mm_storel_epi64((__m128i*)(dst + j * BPS), values); - } -} - -static WEBP_INLINE void Put16_SSE2(uint8_t v, uint8_t* dst) { - int j; - const __m128i values = _mm_set1_epi8(v); - for (j = 0; j < 16; ++j) { - _mm_store_si128((__m128i*)(dst + j * BPS), values); - } -} - -static WEBP_INLINE void Fill_SSE2(uint8_t* dst, int value, int size) { - if (size == 4) { - int j; - for (j = 0; j < 4; ++j) { - memset(dst + j * BPS, value, 4); - } - } else if (size == 8) { - Put8x8uv_SSE2(value, dst); - } else { - Put16_SSE2(value, dst); - } -} - -static WEBP_INLINE void VE8uv_SSE2(uint8_t* dst, const uint8_t* top) { - int j; - const __m128i top_values = _mm_loadl_epi64((const __m128i*)top); - for (j = 0; j < 8; ++j) { - _mm_storel_epi64((__m128i*)(dst + j * BPS), top_values); - } -} - -static WEBP_INLINE void VE16_SSE2(uint8_t* dst, const uint8_t* top) { - const __m128i top_values = _mm_load_si128((const __m128i*)top); - int j; - for (j = 0; j < 16; ++j) { - _mm_store_si128((__m128i*)(dst + j * BPS), top_values); - } -} - -static WEBP_INLINE void VerticalPred_SSE2(uint8_t* dst, - const uint8_t* top, int size) { - if (top != NULL) { - if (size == 8) { - VE8uv_SSE2(dst, top); - } else { - VE16_SSE2(dst, top); - } - } else { - Fill_SSE2(dst, 127, size); - } -} - -static WEBP_INLINE void HE8uv_SSE2(uint8_t* dst, const uint8_t* left) { - int j; - for (j = 0; j < 8; ++j) { - const __m128i values = _mm_set1_epi8(left[j]); - _mm_storel_epi64((__m128i*)dst, values); - dst += BPS; - } -} - -static WEBP_INLINE void HE16_SSE2(uint8_t* dst, const uint8_t* left) { - int j; - for (j = 0; j < 16; ++j) { - const __m128i values = _mm_set1_epi8(left[j]); - _mm_store_si128((__m128i*)dst, values); - dst += BPS; - } -} - -static WEBP_INLINE void HorizontalPred_SSE2(uint8_t* dst, - const uint8_t* left, int size) { - if (left != NULL) { - if (size == 8) { - HE8uv_SSE2(dst, left); - } else { - HE16_SSE2(dst, left); - } - } else { - Fill_SSE2(dst, 129, size); - } -} - -static WEBP_INLINE void TM_SSE2(uint8_t* dst, const uint8_t* left, - const uint8_t* top, int size) { - const __m128i zero = _mm_setzero_si128(); - int y; - if (size == 8) { - const __m128i top_values = _mm_loadl_epi64((const __m128i*)top); - const __m128i top_base = _mm_unpacklo_epi8(top_values, zero); - for (y = 0; y < 8; ++y, dst += BPS) { - const int val = left[y] - left[-1]; - const __m128i base = _mm_set1_epi16(val); - const __m128i out = _mm_packus_epi16(_mm_add_epi16(base, top_base), zero); - _mm_storel_epi64((__m128i*)dst, out); - } - } else { - const __m128i top_values = _mm_load_si128((const __m128i*)top); - const __m128i top_base_0 = _mm_unpacklo_epi8(top_values, zero); - const __m128i top_base_1 = _mm_unpackhi_epi8(top_values, zero); - for (y = 0; y < 16; ++y, dst += BPS) { - const int val = left[y] - left[-1]; - const __m128i base = _mm_set1_epi16(val); - const __m128i out_0 = _mm_add_epi16(base, top_base_0); - const __m128i out_1 = _mm_add_epi16(base, top_base_1); - const __m128i out = _mm_packus_epi16(out_0, out_1); - _mm_store_si128((__m128i*)dst, out); - } - } -} - -static WEBP_INLINE void TrueMotion_SSE2(uint8_t* dst, const uint8_t* left, - const uint8_t* top, int size) { - if (left != NULL) { - if (top != NULL) { - TM_SSE2(dst, left, top, size); - } else { - HorizontalPred_SSE2(dst, left, size); - } - } else { - // true motion without left samples (hence: with default 129 value) - // is equivalent to VE prediction where you just copy the top samples. - // Note that if top samples are not available, the default value is - // then 129, and not 127 as in the VerticalPred case. - if (top != NULL) { - VerticalPred_SSE2(dst, top, size); - } else { - Fill_SSE2(dst, 129, size); - } - } -} - -static WEBP_INLINE void DC8uv_SSE2(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - const __m128i top_values = _mm_loadl_epi64((const __m128i*)top); - const __m128i left_values = _mm_loadl_epi64((const __m128i*)left); - const __m128i combined = _mm_unpacklo_epi64(top_values, left_values); - const int DC = VP8HorizontalAdd8b(&combined) + 8; - Put8x8uv_SSE2(DC >> 4, dst); -} - -static WEBP_INLINE void DC8uvNoLeft_SSE2(uint8_t* dst, const uint8_t* top) { - const __m128i zero = _mm_setzero_si128(); - const __m128i top_values = _mm_loadl_epi64((const __m128i*)top); - const __m128i sum = _mm_sad_epu8(top_values, zero); - const int DC = _mm_cvtsi128_si32(sum) + 4; - Put8x8uv_SSE2(DC >> 3, dst); -} - -static WEBP_INLINE void DC8uvNoTop_SSE2(uint8_t* dst, const uint8_t* left) { - // 'left' is contiguous so we can reuse the top summation. - DC8uvNoLeft_SSE2(dst, left); -} - -static WEBP_INLINE void DC8uvNoTopLeft_SSE2(uint8_t* dst) { - Put8x8uv_SSE2(0x80, dst); -} - -static WEBP_INLINE void DC8uvMode_SSE2(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - if (top != NULL) { - if (left != NULL) { // top and left present - DC8uv_SSE2(dst, left, top); - } else { // top, but no left - DC8uvNoLeft_SSE2(dst, top); - } - } else if (left != NULL) { // left but no top - DC8uvNoTop_SSE2(dst, left); - } else { // no top, no left, nothing. - DC8uvNoTopLeft_SSE2(dst); - } -} - -static WEBP_INLINE void DC16_SSE2(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - const __m128i top_row = _mm_load_si128((const __m128i*)top); - const __m128i left_row = _mm_load_si128((const __m128i*)left); - const int DC = - VP8HorizontalAdd8b(&top_row) + VP8HorizontalAdd8b(&left_row) + 16; - Put16_SSE2(DC >> 5, dst); -} - -static WEBP_INLINE void DC16NoLeft_SSE2(uint8_t* dst, const uint8_t* top) { - const __m128i top_row = _mm_load_si128((const __m128i*)top); - const int DC = VP8HorizontalAdd8b(&top_row) + 8; - Put16_SSE2(DC >> 4, dst); -} - -static WEBP_INLINE void DC16NoTop_SSE2(uint8_t* dst, const uint8_t* left) { - // 'left' is contiguous so we can reuse the top summation. - DC16NoLeft_SSE2(dst, left); -} - -static WEBP_INLINE void DC16NoTopLeft_SSE2(uint8_t* dst) { - Put16_SSE2(0x80, dst); -} - -static WEBP_INLINE void DC16Mode_SSE2(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - if (top != NULL) { - if (left != NULL) { // top and left present - DC16_SSE2(dst, left, top); - } else { // top, but no left - DC16NoLeft_SSE2(dst, top); - } - } else if (left != NULL) { // left but no top - DC16NoTop_SSE2(dst, left); - } else { // no top, no left, nothing. - DC16NoTopLeft_SSE2(dst); - } -} - -//------------------------------------------------------------------------------ -// 4x4 predictions - -#define DST(x, y) dst[(x) + (y) * BPS] -#define AVG3(a, b, c) (((a) + 2 * (b) + (c) + 2) >> 2) -#define AVG2(a, b) (((a) + (b) + 1) >> 1) - -// We use the following 8b-arithmetic tricks: -// (a + 2 * b + c + 2) >> 2 = (AC + b + 1) >> 1 -// where: AC = (a + c) >> 1 = [(a + c + 1) >> 1] - [(a^c) & 1] -// and: -// (a + 2 * b + c + 2) >> 2 = (AB + BC + 1) >> 1 - (ab|bc)&lsb -// where: AC = (a + b + 1) >> 1, BC = (b + c + 1) >> 1 -// and ab = a ^ b, bc = b ^ c, lsb = (AC^BC)&1 - -static WEBP_INLINE void VE4_SSE2(uint8_t* dst, - const uint8_t* top) { // vertical - const __m128i one = _mm_set1_epi8(1); - const __m128i ABCDEFGH = _mm_loadl_epi64((__m128i*)(top - 1)); - const __m128i BCDEFGH0 = _mm_srli_si128(ABCDEFGH, 1); - const __m128i CDEFGH00 = _mm_srli_si128(ABCDEFGH, 2); - const __m128i a = _mm_avg_epu8(ABCDEFGH, CDEFGH00); - const __m128i lsb = _mm_and_si128(_mm_xor_si128(ABCDEFGH, CDEFGH00), one); - const __m128i b = _mm_subs_epu8(a, lsb); - const __m128i avg = _mm_avg_epu8(b, BCDEFGH0); - const uint32_t vals = _mm_cvtsi128_si32(avg); - int i; - for (i = 0; i < 4; ++i) { - WebPUint32ToMem(dst + i * BPS, vals); - } -} - -static WEBP_INLINE void HE4_SSE2(uint8_t* dst, - const uint8_t* top) { // horizontal - const int X = top[-1]; - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int L = top[-5]; - WebPUint32ToMem(dst + 0 * BPS, 0x01010101U * AVG3(X, I, J)); - WebPUint32ToMem(dst + 1 * BPS, 0x01010101U * AVG3(I, J, K)); - WebPUint32ToMem(dst + 2 * BPS, 0x01010101U * AVG3(J, K, L)); - WebPUint32ToMem(dst + 3 * BPS, 0x01010101U * AVG3(K, L, L)); -} - -static WEBP_INLINE void DC4_SSE2(uint8_t* dst, const uint8_t* top) { - uint32_t dc = 4; - int i; - for (i = 0; i < 4; ++i) dc += top[i] + top[-5 + i]; - Fill_SSE2(dst, dc >> 3, 4); -} - -static WEBP_INLINE void LD4_SSE2(uint8_t* dst, - const uint8_t* top) { // Down-Left - const __m128i one = _mm_set1_epi8(1); - const __m128i ABCDEFGH = _mm_loadl_epi64((const __m128i*)top); - const __m128i BCDEFGH0 = _mm_srli_si128(ABCDEFGH, 1); - const __m128i CDEFGH00 = _mm_srli_si128(ABCDEFGH, 2); - const __m128i CDEFGHH0 = _mm_insert_epi16(CDEFGH00, top[7], 3); - const __m128i avg1 = _mm_avg_epu8(ABCDEFGH, CDEFGHH0); - const __m128i lsb = _mm_and_si128(_mm_xor_si128(ABCDEFGH, CDEFGHH0), one); - const __m128i avg2 = _mm_subs_epu8(avg1, lsb); - const __m128i abcdefg = _mm_avg_epu8(avg2, BCDEFGH0); - WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32( abcdefg )); - WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 1))); - WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 2))); - WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 3))); -} - -static WEBP_INLINE void VR4_SSE2(uint8_t* dst, - const uint8_t* top) { // Vertical-Right - const __m128i one = _mm_set1_epi8(1); - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int X = top[-1]; - const __m128i XABCD = _mm_loadl_epi64((const __m128i*)(top - 1)); - const __m128i ABCD0 = _mm_srli_si128(XABCD, 1); - const __m128i abcd = _mm_avg_epu8(XABCD, ABCD0); - const __m128i _XABCD = _mm_slli_si128(XABCD, 1); - const __m128i IXABCD = _mm_insert_epi16(_XABCD, I | (X << 8), 0); - const __m128i avg1 = _mm_avg_epu8(IXABCD, ABCD0); - const __m128i lsb = _mm_and_si128(_mm_xor_si128(IXABCD, ABCD0), one); - const __m128i avg2 = _mm_subs_epu8(avg1, lsb); - const __m128i efgh = _mm_avg_epu8(avg2, XABCD); - WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32( abcd )); - WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32( efgh )); - WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_slli_si128(abcd, 1))); - WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(_mm_slli_si128(efgh, 1))); - - // these two are hard to implement in SSE2, so we keep the C-version: - DST(0, 2) = AVG3(J, I, X); - DST(0, 3) = AVG3(K, J, I); -} - -static WEBP_INLINE void VL4_SSE2(uint8_t* dst, - const uint8_t* top) { // Vertical-Left - const __m128i one = _mm_set1_epi8(1); - const __m128i ABCDEFGH = _mm_loadl_epi64((const __m128i*)top); - const __m128i BCDEFGH_ = _mm_srli_si128(ABCDEFGH, 1); - const __m128i CDEFGH__ = _mm_srli_si128(ABCDEFGH, 2); - const __m128i avg1 = _mm_avg_epu8(ABCDEFGH, BCDEFGH_); - const __m128i avg2 = _mm_avg_epu8(CDEFGH__, BCDEFGH_); - const __m128i avg3 = _mm_avg_epu8(avg1, avg2); - const __m128i lsb1 = _mm_and_si128(_mm_xor_si128(avg1, avg2), one); - const __m128i ab = _mm_xor_si128(ABCDEFGH, BCDEFGH_); - const __m128i bc = _mm_xor_si128(CDEFGH__, BCDEFGH_); - const __m128i abbc = _mm_or_si128(ab, bc); - const __m128i lsb2 = _mm_and_si128(abbc, lsb1); - const __m128i avg4 = _mm_subs_epu8(avg3, lsb2); - const uint32_t extra_out = _mm_cvtsi128_si32(_mm_srli_si128(avg4, 4)); - WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32( avg1 )); - WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32( avg4 )); - WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(avg1, 1))); - WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(avg4, 1))); - - // these two are hard to get and irregular - DST(3, 2) = (extra_out >> 0) & 0xff; - DST(3, 3) = (extra_out >> 8) & 0xff; -} - -static WEBP_INLINE void RD4_SSE2(uint8_t* dst, - const uint8_t* top) { // Down-right - const __m128i one = _mm_set1_epi8(1); - const __m128i LKJIXABC = _mm_loadl_epi64((const __m128i*)(top - 5)); - const __m128i LKJIXABCD = _mm_insert_epi16(LKJIXABC, top[3], 4); - const __m128i KJIXABCD_ = _mm_srli_si128(LKJIXABCD, 1); - const __m128i JIXABCD__ = _mm_srli_si128(LKJIXABCD, 2); - const __m128i avg1 = _mm_avg_epu8(JIXABCD__, LKJIXABCD); - const __m128i lsb = _mm_and_si128(_mm_xor_si128(JIXABCD__, LKJIXABCD), one); - const __m128i avg2 = _mm_subs_epu8(avg1, lsb); - const __m128i abcdefg = _mm_avg_epu8(avg2, KJIXABCD_); - WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32( abcdefg )); - WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 1))); - WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 2))); - WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 3))); -} - -static WEBP_INLINE void HU4_SSE2(uint8_t* dst, const uint8_t* top) { - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int L = top[-5]; - DST(0, 0) = AVG2(I, J); - DST(2, 0) = DST(0, 1) = AVG2(J, K); - DST(2, 1) = DST(0, 2) = AVG2(K, L); - DST(1, 0) = AVG3(I, J, K); - DST(3, 0) = DST(1, 1) = AVG3(J, K, L); - DST(3, 1) = DST(1, 2) = AVG3(K, L, L); - DST(3, 2) = DST(2, 2) = - DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L; -} - -static WEBP_INLINE void HD4_SSE2(uint8_t* dst, const uint8_t* top) { - const int X = top[-1]; - const int I = top[-2]; - const int J = top[-3]; - const int K = top[-4]; - const int L = top[-5]; - const int A = top[0]; - const int B = top[1]; - const int C = top[2]; - - DST(0, 0) = DST(2, 1) = AVG2(I, X); - DST(0, 1) = DST(2, 2) = AVG2(J, I); - DST(0, 2) = DST(2, 3) = AVG2(K, J); - DST(0, 3) = AVG2(L, K); - - DST(3, 0) = AVG3(A, B, C); - DST(2, 0) = AVG3(X, A, B); - DST(1, 0) = DST(3, 1) = AVG3(I, X, A); - DST(1, 1) = DST(3, 2) = AVG3(J, I, X); - DST(1, 2) = DST(3, 3) = AVG3(K, J, I); - DST(1, 3) = AVG3(L, K, J); -} - -static WEBP_INLINE void TM4_SSE2(uint8_t* dst, const uint8_t* top) { - const __m128i zero = _mm_setzero_si128(); - const __m128i top_values = _mm_cvtsi32_si128(WebPMemToUint32(top)); - const __m128i top_base = _mm_unpacklo_epi8(top_values, zero); - int y; - for (y = 0; y < 4; ++y, dst += BPS) { - const int val = top[-2 - y] - top[-1]; - const __m128i base = _mm_set1_epi16(val); - const __m128i out = _mm_packus_epi16(_mm_add_epi16(base, top_base), zero); - WebPUint32ToMem(dst, _mm_cvtsi128_si32(out)); - } -} - -#undef DST -#undef AVG3 -#undef AVG2 - -//------------------------------------------------------------------------------ -// luma 4x4 prediction - -// Left samples are top[-5 .. -2], top_left is top[-1], top are -// located at top[0..3], and top right is top[4..7] -static void Intra4Preds_SSE2(uint8_t* dst, const uint8_t* top) { - DC4_SSE2(I4DC4 + dst, top); - TM4_SSE2(I4TM4 + dst, top); - VE4_SSE2(I4VE4 + dst, top); - HE4_SSE2(I4HE4 + dst, top); - RD4_SSE2(I4RD4 + dst, top); - VR4_SSE2(I4VR4 + dst, top); - LD4_SSE2(I4LD4 + dst, top); - VL4_SSE2(I4VL4 + dst, top); - HD4_SSE2(I4HD4 + dst, top); - HU4_SSE2(I4HU4 + dst, top); -} - -//------------------------------------------------------------------------------ -// Chroma 8x8 prediction (paragraph 12.2) - -static void IntraChromaPreds_SSE2(uint8_t* dst, const uint8_t* left, - const uint8_t* top) { - // U block - DC8uvMode_SSE2(C8DC8 + dst, left, top); - VerticalPred_SSE2(C8VE8 + dst, top, 8); - HorizontalPred_SSE2(C8HE8 + dst, left, 8); - TrueMotion_SSE2(C8TM8 + dst, left, top, 8); - // V block - dst += 8; - if (top != NULL) top += 8; - if (left != NULL) left += 16; - DC8uvMode_SSE2(C8DC8 + dst, left, top); - VerticalPred_SSE2(C8VE8 + dst, top, 8); - HorizontalPred_SSE2(C8HE8 + dst, left, 8); - TrueMotion_SSE2(C8TM8 + dst, left, top, 8); -} - -//------------------------------------------------------------------------------ -// luma 16x16 prediction (paragraph 12.3) - -static void Intra16Preds_SSE2(uint8_t* dst, - const uint8_t* left, const uint8_t* top) { - DC16Mode_SSE2(I16DC16 + dst, left, top); - VerticalPred_SSE2(I16VE16 + dst, top, 16); - HorizontalPred_SSE2(I16HE16 + dst, left, 16); - TrueMotion_SSE2(I16TM16 + dst, left, top, 16); -} - -//------------------------------------------------------------------------------ -// Metric - -static WEBP_INLINE void SubtractAndAccumulate_SSE2(const __m128i a, - const __m128i b, - __m128i* const sum) { - // take abs(a-b) in 8b - const __m128i a_b = _mm_subs_epu8(a, b); - const __m128i b_a = _mm_subs_epu8(b, a); - const __m128i abs_a_b = _mm_or_si128(a_b, b_a); - // zero-extend to 16b - const __m128i zero = _mm_setzero_si128(); - const __m128i C0 = _mm_unpacklo_epi8(abs_a_b, zero); - const __m128i C1 = _mm_unpackhi_epi8(abs_a_b, zero); - // multiply with self - const __m128i sum1 = _mm_madd_epi16(C0, C0); - const __m128i sum2 = _mm_madd_epi16(C1, C1); - *sum = _mm_add_epi32(sum1, sum2); -} - -static WEBP_INLINE int SSE_16xN_SSE2(const uint8_t* a, const uint8_t* b, - int num_pairs) { - __m128i sum = _mm_setzero_si128(); - int32_t tmp[4]; - int i; - - for (i = 0; i < num_pairs; ++i) { - const __m128i a0 = _mm_loadu_si128((const __m128i*)&a[BPS * 0]); - const __m128i b0 = _mm_loadu_si128((const __m128i*)&b[BPS * 0]); - const __m128i a1 = _mm_loadu_si128((const __m128i*)&a[BPS * 1]); - const __m128i b1 = _mm_loadu_si128((const __m128i*)&b[BPS * 1]); - __m128i sum1, sum2; - SubtractAndAccumulate_SSE2(a0, b0, &sum1); - SubtractAndAccumulate_SSE2(a1, b1, &sum2); - sum = _mm_add_epi32(sum, _mm_add_epi32(sum1, sum2)); - a += 2 * BPS; - b += 2 * BPS; - } - _mm_storeu_si128((__m128i*)tmp, sum); - return (tmp[3] + tmp[2] + tmp[1] + tmp[0]); -} - -static int SSE16x16_SSE2(const uint8_t* a, const uint8_t* b) { - return SSE_16xN_SSE2(a, b, 8); -} - -static int SSE16x8_SSE2(const uint8_t* a, const uint8_t* b) { - return SSE_16xN_SSE2(a, b, 4); -} - -#define LOAD_8x16b(ptr) \ - _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i*)(ptr)), zero) - -static int SSE8x8_SSE2(const uint8_t* a, const uint8_t* b) { - const __m128i zero = _mm_setzero_si128(); - int num_pairs = 4; - __m128i sum = zero; - int32_t tmp[4]; - while (num_pairs-- > 0) { - const __m128i a0 = LOAD_8x16b(&a[BPS * 0]); - const __m128i a1 = LOAD_8x16b(&a[BPS * 1]); - const __m128i b0 = LOAD_8x16b(&b[BPS * 0]); - const __m128i b1 = LOAD_8x16b(&b[BPS * 1]); - // subtract - const __m128i c0 = _mm_subs_epi16(a0, b0); - const __m128i c1 = _mm_subs_epi16(a1, b1); - // multiply/accumulate with self - const __m128i d0 = _mm_madd_epi16(c0, c0); - const __m128i d1 = _mm_madd_epi16(c1, c1); - // collect - const __m128i sum01 = _mm_add_epi32(d0, d1); - sum = _mm_add_epi32(sum, sum01); - a += 2 * BPS; - b += 2 * BPS; - } - _mm_storeu_si128((__m128i*)tmp, sum); - return (tmp[3] + tmp[2] + tmp[1] + tmp[0]); -} -#undef LOAD_8x16b - -static int SSE4x4_SSE2(const uint8_t* a, const uint8_t* b) { - const __m128i zero = _mm_setzero_si128(); - - // Load values. Note that we read 8 pixels instead of 4, - // but the a/b buffers are over-allocated to that effect. - const __m128i a0 = _mm_loadl_epi64((const __m128i*)&a[BPS * 0]); - const __m128i a1 = _mm_loadl_epi64((const __m128i*)&a[BPS * 1]); - const __m128i a2 = _mm_loadl_epi64((const __m128i*)&a[BPS * 2]); - const __m128i a3 = _mm_loadl_epi64((const __m128i*)&a[BPS * 3]); - const __m128i b0 = _mm_loadl_epi64((const __m128i*)&b[BPS * 0]); - const __m128i b1 = _mm_loadl_epi64((const __m128i*)&b[BPS * 1]); - const __m128i b2 = _mm_loadl_epi64((const __m128i*)&b[BPS * 2]); - const __m128i b3 = _mm_loadl_epi64((const __m128i*)&b[BPS * 3]); - // Combine pair of lines. - const __m128i a01 = _mm_unpacklo_epi32(a0, a1); - const __m128i a23 = _mm_unpacklo_epi32(a2, a3); - const __m128i b01 = _mm_unpacklo_epi32(b0, b1); - const __m128i b23 = _mm_unpacklo_epi32(b2, b3); - // Convert to 16b. - const __m128i a01s = _mm_unpacklo_epi8(a01, zero); - const __m128i a23s = _mm_unpacklo_epi8(a23, zero); - const __m128i b01s = _mm_unpacklo_epi8(b01, zero); - const __m128i b23s = _mm_unpacklo_epi8(b23, zero); - // subtract, square and accumulate - const __m128i d0 = _mm_subs_epi16(a01s, b01s); - const __m128i d1 = _mm_subs_epi16(a23s, b23s); - const __m128i e0 = _mm_madd_epi16(d0, d0); - const __m128i e1 = _mm_madd_epi16(d1, d1); - const __m128i sum = _mm_add_epi32(e0, e1); - - int32_t tmp[4]; - _mm_storeu_si128((__m128i*)tmp, sum); - return (tmp[3] + tmp[2] + tmp[1] + tmp[0]); -} - -//------------------------------------------------------------------------------ - -static void Mean16x4_SSE2(const uint8_t* ref, uint32_t dc[4]) { - const __m128i mask = _mm_set1_epi16(0x00ff); - const __m128i a0 = _mm_loadu_si128((const __m128i*)&ref[BPS * 0]); - const __m128i a1 = _mm_loadu_si128((const __m128i*)&ref[BPS * 1]); - const __m128i a2 = _mm_loadu_si128((const __m128i*)&ref[BPS * 2]); - const __m128i a3 = _mm_loadu_si128((const __m128i*)&ref[BPS * 3]); - const __m128i b0 = _mm_srli_epi16(a0, 8); // hi byte - const __m128i b1 = _mm_srli_epi16(a1, 8); - const __m128i b2 = _mm_srli_epi16(a2, 8); - const __m128i b3 = _mm_srli_epi16(a3, 8); - const __m128i c0 = _mm_and_si128(a0, mask); // lo byte - const __m128i c1 = _mm_and_si128(a1, mask); - const __m128i c2 = _mm_and_si128(a2, mask); - const __m128i c3 = _mm_and_si128(a3, mask); - const __m128i d0 = _mm_add_epi32(b0, c0); - const __m128i d1 = _mm_add_epi32(b1, c1); - const __m128i d2 = _mm_add_epi32(b2, c2); - const __m128i d3 = _mm_add_epi32(b3, c3); - const __m128i e0 = _mm_add_epi32(d0, d1); - const __m128i e1 = _mm_add_epi32(d2, d3); - const __m128i f0 = _mm_add_epi32(e0, e1); - uint16_t tmp[8]; - _mm_storeu_si128((__m128i*)tmp, f0); - dc[0] = tmp[0] + tmp[1]; - dc[1] = tmp[2] + tmp[3]; - dc[2] = tmp[4] + tmp[5]; - dc[3] = tmp[6] + tmp[7]; -} - -//------------------------------------------------------------------------------ -// Texture distortion -// -// We try to match the spectral content (weighted) between source and -// reconstructed samples. - -// Hadamard transform -// Returns the weighted sum of the absolute value of transformed coefficients. -// w[] contains a row-major 4 by 4 symmetric matrix. -static int TTransform_SSE2(const uint8_t* inA, const uint8_t* inB, - const uint16_t* const w) { - int32_t sum[4]; - __m128i tmp_0, tmp_1, tmp_2, tmp_3; - const __m128i zero = _mm_setzero_si128(); - - // Load and combine inputs. - { - const __m128i inA_0 = _mm_loadl_epi64((const __m128i*)&inA[BPS * 0]); - const __m128i inA_1 = _mm_loadl_epi64((const __m128i*)&inA[BPS * 1]); - const __m128i inA_2 = _mm_loadl_epi64((const __m128i*)&inA[BPS * 2]); - const __m128i inA_3 = _mm_loadl_epi64((const __m128i*)&inA[BPS * 3]); - const __m128i inB_0 = _mm_loadl_epi64((const __m128i*)&inB[BPS * 0]); - const __m128i inB_1 = _mm_loadl_epi64((const __m128i*)&inB[BPS * 1]); - const __m128i inB_2 = _mm_loadl_epi64((const __m128i*)&inB[BPS * 2]); - const __m128i inB_3 = _mm_loadl_epi64((const __m128i*)&inB[BPS * 3]); - - // Combine inA and inB (we'll do two transforms in parallel). - const __m128i inAB_0 = _mm_unpacklo_epi32(inA_0, inB_0); - const __m128i inAB_1 = _mm_unpacklo_epi32(inA_1, inB_1); - const __m128i inAB_2 = _mm_unpacklo_epi32(inA_2, inB_2); - const __m128i inAB_3 = _mm_unpacklo_epi32(inA_3, inB_3); - tmp_0 = _mm_unpacklo_epi8(inAB_0, zero); - tmp_1 = _mm_unpacklo_epi8(inAB_1, zero); - tmp_2 = _mm_unpacklo_epi8(inAB_2, zero); - tmp_3 = _mm_unpacklo_epi8(inAB_3, zero); - // a00 a01 a02 a03 b00 b01 b02 b03 - // a10 a11 a12 a13 b10 b11 b12 b13 - // a20 a21 a22 a23 b20 b21 b22 b23 - // a30 a31 a32 a33 b30 b31 b32 b33 - } - - // Vertical pass first to avoid a transpose (vertical and horizontal passes - // are commutative because w/kWeightY is symmetric) and subsequent transpose. - { - // Calculate a and b (two 4x4 at once). - const __m128i a0 = _mm_add_epi16(tmp_0, tmp_2); - const __m128i a1 = _mm_add_epi16(tmp_1, tmp_3); - const __m128i a2 = _mm_sub_epi16(tmp_1, tmp_3); - const __m128i a3 = _mm_sub_epi16(tmp_0, tmp_2); - const __m128i b0 = _mm_add_epi16(a0, a1); - const __m128i b1 = _mm_add_epi16(a3, a2); - const __m128i b2 = _mm_sub_epi16(a3, a2); - const __m128i b3 = _mm_sub_epi16(a0, a1); - // a00 a01 a02 a03 b00 b01 b02 b03 - // a10 a11 a12 a13 b10 b11 b12 b13 - // a20 a21 a22 a23 b20 b21 b22 b23 - // a30 a31 a32 a33 b30 b31 b32 b33 - - // Transpose the two 4x4. - VP8Transpose_2_4x4_16b(&b0, &b1, &b2, &b3, &tmp_0, &tmp_1, &tmp_2, &tmp_3); - } - - // Horizontal pass and difference of weighted sums. - { - // Load all inputs. - const __m128i w_0 = _mm_loadu_si128((const __m128i*)&w[0]); - const __m128i w_8 = _mm_loadu_si128((const __m128i*)&w[8]); - - // Calculate a and b (two 4x4 at once). - const __m128i a0 = _mm_add_epi16(tmp_0, tmp_2); - const __m128i a1 = _mm_add_epi16(tmp_1, tmp_3); - const __m128i a2 = _mm_sub_epi16(tmp_1, tmp_3); - const __m128i a3 = _mm_sub_epi16(tmp_0, tmp_2); - const __m128i b0 = _mm_add_epi16(a0, a1); - const __m128i b1 = _mm_add_epi16(a3, a2); - const __m128i b2 = _mm_sub_epi16(a3, a2); - const __m128i b3 = _mm_sub_epi16(a0, a1); - - // Separate the transforms of inA and inB. - __m128i A_b0 = _mm_unpacklo_epi64(b0, b1); - __m128i A_b2 = _mm_unpacklo_epi64(b2, b3); - __m128i B_b0 = _mm_unpackhi_epi64(b0, b1); - __m128i B_b2 = _mm_unpackhi_epi64(b2, b3); - - { - const __m128i d0 = _mm_sub_epi16(zero, A_b0); - const __m128i d1 = _mm_sub_epi16(zero, A_b2); - const __m128i d2 = _mm_sub_epi16(zero, B_b0); - const __m128i d3 = _mm_sub_epi16(zero, B_b2); - A_b0 = _mm_max_epi16(A_b0, d0); // abs(v), 16b - A_b2 = _mm_max_epi16(A_b2, d1); - B_b0 = _mm_max_epi16(B_b0, d2); - B_b2 = _mm_max_epi16(B_b2, d3); - } - - // weighted sums - A_b0 = _mm_madd_epi16(A_b0, w_0); - A_b2 = _mm_madd_epi16(A_b2, w_8); - B_b0 = _mm_madd_epi16(B_b0, w_0); - B_b2 = _mm_madd_epi16(B_b2, w_8); - A_b0 = _mm_add_epi32(A_b0, A_b2); - B_b0 = _mm_add_epi32(B_b0, B_b2); - - // difference of weighted sums - A_b0 = _mm_sub_epi32(A_b0, B_b0); - _mm_storeu_si128((__m128i*)&sum[0], A_b0); - } - return sum[0] + sum[1] + sum[2] + sum[3]; -} - -static int Disto4x4_SSE2(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - const int diff_sum = TTransform_SSE2(a, b, w); - return abs(diff_sum) >> 5; -} - -static int Disto16x16_SSE2(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - int D = 0; - int x, y; - for (y = 0; y < 16 * BPS; y += 4 * BPS) { - for (x = 0; x < 16; x += 4) { - D += Disto4x4_SSE2(a + x + y, b + x + y, w); - } - } - return D; -} - -//------------------------------------------------------------------------------ -// Quantization -// - -static WEBP_INLINE int DoQuantizeBlock_SSE2(int16_t in[16], int16_t out[16], - const uint16_t* const sharpen, - const VP8Matrix* const mtx) { - const __m128i max_coeff_2047 = _mm_set1_epi16(MAX_LEVEL); - const __m128i zero = _mm_setzero_si128(); - __m128i coeff0, coeff8; - __m128i out0, out8; - __m128i packed_out; - - // Load all inputs. - __m128i in0 = _mm_loadu_si128((__m128i*)&in[0]); - __m128i in8 = _mm_loadu_si128((__m128i*)&in[8]); - const __m128i iq0 = _mm_loadu_si128((const __m128i*)&mtx->iq_[0]); - const __m128i iq8 = _mm_loadu_si128((const __m128i*)&mtx->iq_[8]); - const __m128i q0 = _mm_loadu_si128((const __m128i*)&mtx->q_[0]); - const __m128i q8 = _mm_loadu_si128((const __m128i*)&mtx->q_[8]); - - // extract sign(in) (0x0000 if positive, 0xffff if negative) - const __m128i sign0 = _mm_cmpgt_epi16(zero, in0); - const __m128i sign8 = _mm_cmpgt_epi16(zero, in8); - - // coeff = abs(in) = (in ^ sign) - sign - coeff0 = _mm_xor_si128(in0, sign0); - coeff8 = _mm_xor_si128(in8, sign8); - coeff0 = _mm_sub_epi16(coeff0, sign0); - coeff8 = _mm_sub_epi16(coeff8, sign8); - - // coeff = abs(in) + sharpen - if (sharpen != NULL) { - const __m128i sharpen0 = _mm_loadu_si128((const __m128i*)&sharpen[0]); - const __m128i sharpen8 = _mm_loadu_si128((const __m128i*)&sharpen[8]); - coeff0 = _mm_add_epi16(coeff0, sharpen0); - coeff8 = _mm_add_epi16(coeff8, sharpen8); - } - - // out = (coeff * iQ + B) >> QFIX - { - // doing calculations with 32b precision (QFIX=17) - // out = (coeff * iQ) - const __m128i coeff_iQ0H = _mm_mulhi_epu16(coeff0, iq0); - const __m128i coeff_iQ0L = _mm_mullo_epi16(coeff0, iq0); - const __m128i coeff_iQ8H = _mm_mulhi_epu16(coeff8, iq8); - const __m128i coeff_iQ8L = _mm_mullo_epi16(coeff8, iq8); - __m128i out_00 = _mm_unpacklo_epi16(coeff_iQ0L, coeff_iQ0H); - __m128i out_04 = _mm_unpackhi_epi16(coeff_iQ0L, coeff_iQ0H); - __m128i out_08 = _mm_unpacklo_epi16(coeff_iQ8L, coeff_iQ8H); - __m128i out_12 = _mm_unpackhi_epi16(coeff_iQ8L, coeff_iQ8H); - // out = (coeff * iQ + B) - const __m128i bias_00 = _mm_loadu_si128((const __m128i*)&mtx->bias_[0]); - const __m128i bias_04 = _mm_loadu_si128((const __m128i*)&mtx->bias_[4]); - const __m128i bias_08 = _mm_loadu_si128((const __m128i*)&mtx->bias_[8]); - const __m128i bias_12 = _mm_loadu_si128((const __m128i*)&mtx->bias_[12]); - out_00 = _mm_add_epi32(out_00, bias_00); - out_04 = _mm_add_epi32(out_04, bias_04); - out_08 = _mm_add_epi32(out_08, bias_08); - out_12 = _mm_add_epi32(out_12, bias_12); - // out = QUANTDIV(coeff, iQ, B, QFIX) - out_00 = _mm_srai_epi32(out_00, QFIX); - out_04 = _mm_srai_epi32(out_04, QFIX); - out_08 = _mm_srai_epi32(out_08, QFIX); - out_12 = _mm_srai_epi32(out_12, QFIX); - - // pack result as 16b - out0 = _mm_packs_epi32(out_00, out_04); - out8 = _mm_packs_epi32(out_08, out_12); - - // if (coeff > 2047) coeff = 2047 - out0 = _mm_min_epi16(out0, max_coeff_2047); - out8 = _mm_min_epi16(out8, max_coeff_2047); - } - - // get sign back (if (sign[j]) out_n = -out_n) - out0 = _mm_xor_si128(out0, sign0); - out8 = _mm_xor_si128(out8, sign8); - out0 = _mm_sub_epi16(out0, sign0); - out8 = _mm_sub_epi16(out8, sign8); - - // in = out * Q - in0 = _mm_mullo_epi16(out0, q0); - in8 = _mm_mullo_epi16(out8, q8); - - _mm_storeu_si128((__m128i*)&in[0], in0); - _mm_storeu_si128((__m128i*)&in[8], in8); - - // zigzag the output before storing it. - // - // The zigzag pattern can almost be reproduced with a small sequence of - // shuffles. After it, we only need to swap the 7th (ending up in third - // position instead of twelfth) and 8th values. - { - __m128i outZ0, outZ8; - outZ0 = _mm_shufflehi_epi16(out0, _MM_SHUFFLE(2, 1, 3, 0)); - outZ0 = _mm_shuffle_epi32 (outZ0, _MM_SHUFFLE(3, 1, 2, 0)); - outZ0 = _mm_shufflehi_epi16(outZ0, _MM_SHUFFLE(3, 1, 0, 2)); - outZ8 = _mm_shufflelo_epi16(out8, _MM_SHUFFLE(3, 0, 2, 1)); - outZ8 = _mm_shuffle_epi32 (outZ8, _MM_SHUFFLE(3, 1, 2, 0)); - outZ8 = _mm_shufflelo_epi16(outZ8, _MM_SHUFFLE(1, 3, 2, 0)); - _mm_storeu_si128((__m128i*)&out[0], outZ0); - _mm_storeu_si128((__m128i*)&out[8], outZ8); - packed_out = _mm_packs_epi16(outZ0, outZ8); - } - { - const int16_t outZ_12 = out[12]; - const int16_t outZ_3 = out[3]; - out[3] = outZ_12; - out[12] = outZ_3; - } - - // detect if all 'out' values are zeroes or not - return (_mm_movemask_epi8(_mm_cmpeq_epi8(packed_out, zero)) != 0xffff); -} - -static int QuantizeBlock_SSE2(int16_t in[16], int16_t out[16], - const VP8Matrix* const mtx) { - return DoQuantizeBlock_SSE2(in, out, &mtx->sharpen_[0], mtx); -} - -static int QuantizeBlockWHT_SSE2(int16_t in[16], int16_t out[16], - const VP8Matrix* const mtx) { - return DoQuantizeBlock_SSE2(in, out, NULL, mtx); -} - -static int Quantize2Blocks_SSE2(int16_t in[32], int16_t out[32], - const VP8Matrix* const mtx) { - int nz; - const uint16_t* const sharpen = &mtx->sharpen_[0]; - nz = DoQuantizeBlock_SSE2(in + 0 * 16, out + 0 * 16, sharpen, mtx) << 0; - nz |= DoQuantizeBlock_SSE2(in + 1 * 16, out + 1 * 16, sharpen, mtx) << 1; - return nz; -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8EncDspInitSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitSSE2(void) { - VP8CollectHistogram = CollectHistogram_SSE2; - VP8EncPredLuma16 = Intra16Preds_SSE2; - VP8EncPredChroma8 = IntraChromaPreds_SSE2; - VP8EncPredLuma4 = Intra4Preds_SSE2; - VP8EncQuantizeBlock = QuantizeBlock_SSE2; - VP8EncQuantize2Blocks = Quantize2Blocks_SSE2; - VP8EncQuantizeBlockWHT = QuantizeBlockWHT_SSE2; - VP8ITransform = ITransform_SSE2; - VP8FTransform = FTransform_SSE2; - VP8FTransform2 = FTransform2_SSE2; - VP8FTransformWHT = FTransformWHT_SSE2; - VP8SSE16x16 = SSE16x16_SSE2; - VP8SSE16x8 = SSE16x8_SSE2; - VP8SSE8x8 = SSE8x8_SSE2; - VP8SSE4x4 = SSE4x4_SSE2; - VP8TDisto4x4 = Disto4x4_SSE2; - VP8TDisto16x16 = Disto16x16_SSE2; - VP8Mean16x4 = Mean16x4_SSE2; -} - -#else // !WEBP_USE_SSE2 - -WEBP_DSP_INIT_STUB(VP8EncDspInitSSE2) - -#endif // WEBP_USE_SSE2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_sse41.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_sse41.c deleted file mode 100644 index 6845d79..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/enc_sse41.c +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE4 version of some encoding functions. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE41) -#include -#include // for abs() - -#include "src/dsp/common_sse2.h" -#include "src/enc/vp8i_enc.h" - -//------------------------------------------------------------------------------ -// Compute susceptibility based on DCT-coeff histograms. - -static void CollectHistogram_SSE41(const uint8_t* ref, const uint8_t* pred, - int start_block, int end_block, - VP8Histogram* const histo) { - const __m128i max_coeff_thresh = _mm_set1_epi16(MAX_COEFF_THRESH); - int j; - int distribution[MAX_COEFF_THRESH + 1] = { 0 }; - for (j = start_block; j < end_block; ++j) { - int16_t out[16]; - int k; - - VP8FTransform(ref + VP8DspScan[j], pred + VP8DspScan[j], out); - - // Convert coefficients to bin (within out[]). - { - // Load. - const __m128i out0 = _mm_loadu_si128((__m128i*)&out[0]); - const __m128i out1 = _mm_loadu_si128((__m128i*)&out[8]); - // v = abs(out) >> 3 - const __m128i abs0 = _mm_abs_epi16(out0); - const __m128i abs1 = _mm_abs_epi16(out1); - const __m128i v0 = _mm_srai_epi16(abs0, 3); - const __m128i v1 = _mm_srai_epi16(abs1, 3); - // bin = min(v, MAX_COEFF_THRESH) - const __m128i bin0 = _mm_min_epi16(v0, max_coeff_thresh); - const __m128i bin1 = _mm_min_epi16(v1, max_coeff_thresh); - // Store. - _mm_storeu_si128((__m128i*)&out[0], bin0); - _mm_storeu_si128((__m128i*)&out[8], bin1); - } - - // Convert coefficients to bin. - for (k = 0; k < 16; ++k) { - ++distribution[out[k]]; - } - } - VP8SetHistogramData(distribution, histo); -} - -//------------------------------------------------------------------------------ -// Texture distortion -// -// We try to match the spectral content (weighted) between source and -// reconstructed samples. - -// Hadamard transform -// Returns the weighted sum of the absolute value of transformed coefficients. -// w[] contains a row-major 4 by 4 symmetric matrix. -static int TTransform_SSE41(const uint8_t* inA, const uint8_t* inB, - const uint16_t* const w) { - int32_t sum[4]; - __m128i tmp_0, tmp_1, tmp_2, tmp_3; - - // Load and combine inputs. - { - const __m128i inA_0 = _mm_loadu_si128((const __m128i*)&inA[BPS * 0]); - const __m128i inA_1 = _mm_loadu_si128((const __m128i*)&inA[BPS * 1]); - const __m128i inA_2 = _mm_loadu_si128((const __m128i*)&inA[BPS * 2]); - // In SSE4.1, with gcc 4.8 at least (maybe other versions), - // _mm_loadu_si128 is faster than _mm_loadl_epi64. But for the last lump - // of inA and inB, _mm_loadl_epi64 is still used not to have an out of - // bound read. - const __m128i inA_3 = _mm_loadl_epi64((const __m128i*)&inA[BPS * 3]); - const __m128i inB_0 = _mm_loadu_si128((const __m128i*)&inB[BPS * 0]); - const __m128i inB_1 = _mm_loadu_si128((const __m128i*)&inB[BPS * 1]); - const __m128i inB_2 = _mm_loadu_si128((const __m128i*)&inB[BPS * 2]); - const __m128i inB_3 = _mm_loadl_epi64((const __m128i*)&inB[BPS * 3]); - - // Combine inA and inB (we'll do two transforms in parallel). - const __m128i inAB_0 = _mm_unpacklo_epi32(inA_0, inB_0); - const __m128i inAB_1 = _mm_unpacklo_epi32(inA_1, inB_1); - const __m128i inAB_2 = _mm_unpacklo_epi32(inA_2, inB_2); - const __m128i inAB_3 = _mm_unpacklo_epi32(inA_3, inB_3); - tmp_0 = _mm_cvtepu8_epi16(inAB_0); - tmp_1 = _mm_cvtepu8_epi16(inAB_1); - tmp_2 = _mm_cvtepu8_epi16(inAB_2); - tmp_3 = _mm_cvtepu8_epi16(inAB_3); - // a00 a01 a02 a03 b00 b01 b02 b03 - // a10 a11 a12 a13 b10 b11 b12 b13 - // a20 a21 a22 a23 b20 b21 b22 b23 - // a30 a31 a32 a33 b30 b31 b32 b33 - } - - // Vertical pass first to avoid a transpose (vertical and horizontal passes - // are commutative because w/kWeightY is symmetric) and subsequent transpose. - { - // Calculate a and b (two 4x4 at once). - const __m128i a0 = _mm_add_epi16(tmp_0, tmp_2); - const __m128i a1 = _mm_add_epi16(tmp_1, tmp_3); - const __m128i a2 = _mm_sub_epi16(tmp_1, tmp_3); - const __m128i a3 = _mm_sub_epi16(tmp_0, tmp_2); - const __m128i b0 = _mm_add_epi16(a0, a1); - const __m128i b1 = _mm_add_epi16(a3, a2); - const __m128i b2 = _mm_sub_epi16(a3, a2); - const __m128i b3 = _mm_sub_epi16(a0, a1); - // a00 a01 a02 a03 b00 b01 b02 b03 - // a10 a11 a12 a13 b10 b11 b12 b13 - // a20 a21 a22 a23 b20 b21 b22 b23 - // a30 a31 a32 a33 b30 b31 b32 b33 - - // Transpose the two 4x4. - VP8Transpose_2_4x4_16b(&b0, &b1, &b2, &b3, &tmp_0, &tmp_1, &tmp_2, &tmp_3); - } - - // Horizontal pass and difference of weighted sums. - { - // Load all inputs. - const __m128i w_0 = _mm_loadu_si128((const __m128i*)&w[0]); - const __m128i w_8 = _mm_loadu_si128((const __m128i*)&w[8]); - - // Calculate a and b (two 4x4 at once). - const __m128i a0 = _mm_add_epi16(tmp_0, tmp_2); - const __m128i a1 = _mm_add_epi16(tmp_1, tmp_3); - const __m128i a2 = _mm_sub_epi16(tmp_1, tmp_3); - const __m128i a3 = _mm_sub_epi16(tmp_0, tmp_2); - const __m128i b0 = _mm_add_epi16(a0, a1); - const __m128i b1 = _mm_add_epi16(a3, a2); - const __m128i b2 = _mm_sub_epi16(a3, a2); - const __m128i b3 = _mm_sub_epi16(a0, a1); - - // Separate the transforms of inA and inB. - __m128i A_b0 = _mm_unpacklo_epi64(b0, b1); - __m128i A_b2 = _mm_unpacklo_epi64(b2, b3); - __m128i B_b0 = _mm_unpackhi_epi64(b0, b1); - __m128i B_b2 = _mm_unpackhi_epi64(b2, b3); - - A_b0 = _mm_abs_epi16(A_b0); - A_b2 = _mm_abs_epi16(A_b2); - B_b0 = _mm_abs_epi16(B_b0); - B_b2 = _mm_abs_epi16(B_b2); - - // weighted sums - A_b0 = _mm_madd_epi16(A_b0, w_0); - A_b2 = _mm_madd_epi16(A_b2, w_8); - B_b0 = _mm_madd_epi16(B_b0, w_0); - B_b2 = _mm_madd_epi16(B_b2, w_8); - A_b0 = _mm_add_epi32(A_b0, A_b2); - B_b0 = _mm_add_epi32(B_b0, B_b2); - - // difference of weighted sums - A_b2 = _mm_sub_epi32(A_b0, B_b0); - _mm_storeu_si128((__m128i*)&sum[0], A_b2); - } - return sum[0] + sum[1] + sum[2] + sum[3]; -} - -static int Disto4x4_SSE41(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - const int diff_sum = TTransform_SSE41(a, b, w); - return abs(diff_sum) >> 5; -} - -static int Disto16x16_SSE41(const uint8_t* const a, const uint8_t* const b, - const uint16_t* const w) { - int D = 0; - int x, y; - for (y = 0; y < 16 * BPS; y += 4 * BPS) { - for (x = 0; x < 16; x += 4) { - D += Disto4x4_SSE41(a + x + y, b + x + y, w); - } - } - return D; -} - -//------------------------------------------------------------------------------ -// Quantization -// - -// Generates a pshufb constant for shuffling 16b words. -#define PSHUFB_CST(A,B,C,D,E,F,G,H) \ - _mm_set_epi8(2 * (H) + 1, 2 * (H) + 0, 2 * (G) + 1, 2 * (G) + 0, \ - 2 * (F) + 1, 2 * (F) + 0, 2 * (E) + 1, 2 * (E) + 0, \ - 2 * (D) + 1, 2 * (D) + 0, 2 * (C) + 1, 2 * (C) + 0, \ - 2 * (B) + 1, 2 * (B) + 0, 2 * (A) + 1, 2 * (A) + 0) - -static WEBP_INLINE int DoQuantizeBlock_SSE41(int16_t in[16], int16_t out[16], - const uint16_t* const sharpen, - const VP8Matrix* const mtx) { - const __m128i max_coeff_2047 = _mm_set1_epi16(MAX_LEVEL); - const __m128i zero = _mm_setzero_si128(); - __m128i out0, out8; - __m128i packed_out; - - // Load all inputs. - __m128i in0 = _mm_loadu_si128((__m128i*)&in[0]); - __m128i in8 = _mm_loadu_si128((__m128i*)&in[8]); - const __m128i iq0 = _mm_loadu_si128((const __m128i*)&mtx->iq_[0]); - const __m128i iq8 = _mm_loadu_si128((const __m128i*)&mtx->iq_[8]); - const __m128i q0 = _mm_loadu_si128((const __m128i*)&mtx->q_[0]); - const __m128i q8 = _mm_loadu_si128((const __m128i*)&mtx->q_[8]); - - // coeff = abs(in) - __m128i coeff0 = _mm_abs_epi16(in0); - __m128i coeff8 = _mm_abs_epi16(in8); - - // coeff = abs(in) + sharpen - if (sharpen != NULL) { - const __m128i sharpen0 = _mm_loadu_si128((const __m128i*)&sharpen[0]); - const __m128i sharpen8 = _mm_loadu_si128((const __m128i*)&sharpen[8]); - coeff0 = _mm_add_epi16(coeff0, sharpen0); - coeff8 = _mm_add_epi16(coeff8, sharpen8); - } - - // out = (coeff * iQ + B) >> QFIX - { - // doing calculations with 32b precision (QFIX=17) - // out = (coeff * iQ) - const __m128i coeff_iQ0H = _mm_mulhi_epu16(coeff0, iq0); - const __m128i coeff_iQ0L = _mm_mullo_epi16(coeff0, iq0); - const __m128i coeff_iQ8H = _mm_mulhi_epu16(coeff8, iq8); - const __m128i coeff_iQ8L = _mm_mullo_epi16(coeff8, iq8); - __m128i out_00 = _mm_unpacklo_epi16(coeff_iQ0L, coeff_iQ0H); - __m128i out_04 = _mm_unpackhi_epi16(coeff_iQ0L, coeff_iQ0H); - __m128i out_08 = _mm_unpacklo_epi16(coeff_iQ8L, coeff_iQ8H); - __m128i out_12 = _mm_unpackhi_epi16(coeff_iQ8L, coeff_iQ8H); - // out = (coeff * iQ + B) - const __m128i bias_00 = _mm_loadu_si128((const __m128i*)&mtx->bias_[0]); - const __m128i bias_04 = _mm_loadu_si128((const __m128i*)&mtx->bias_[4]); - const __m128i bias_08 = _mm_loadu_si128((const __m128i*)&mtx->bias_[8]); - const __m128i bias_12 = _mm_loadu_si128((const __m128i*)&mtx->bias_[12]); - out_00 = _mm_add_epi32(out_00, bias_00); - out_04 = _mm_add_epi32(out_04, bias_04); - out_08 = _mm_add_epi32(out_08, bias_08); - out_12 = _mm_add_epi32(out_12, bias_12); - // out = QUANTDIV(coeff, iQ, B, QFIX) - out_00 = _mm_srai_epi32(out_00, QFIX); - out_04 = _mm_srai_epi32(out_04, QFIX); - out_08 = _mm_srai_epi32(out_08, QFIX); - out_12 = _mm_srai_epi32(out_12, QFIX); - - // pack result as 16b - out0 = _mm_packs_epi32(out_00, out_04); - out8 = _mm_packs_epi32(out_08, out_12); - - // if (coeff > 2047) coeff = 2047 - out0 = _mm_min_epi16(out0, max_coeff_2047); - out8 = _mm_min_epi16(out8, max_coeff_2047); - } - - // put sign back - out0 = _mm_sign_epi16(out0, in0); - out8 = _mm_sign_epi16(out8, in8); - - // in = out * Q - in0 = _mm_mullo_epi16(out0, q0); - in8 = _mm_mullo_epi16(out8, q8); - - _mm_storeu_si128((__m128i*)&in[0], in0); - _mm_storeu_si128((__m128i*)&in[8], in8); - - // zigzag the output before storing it. The re-ordering is: - // 0 1 2 3 4 5 6 7 | 8 9 10 11 12 13 14 15 - // -> 0 1 4[8]5 2 3 6 | 9 12 13 10 [7]11 14 15 - // There's only two misplaced entries ([8] and [7]) that are crossing the - // reg's boundaries. - // We use pshufb instead of pshuflo/pshufhi. - { - const __m128i kCst_lo = PSHUFB_CST(0, 1, 4, -1, 5, 2, 3, 6); - const __m128i kCst_7 = PSHUFB_CST(-1, -1, -1, -1, 7, -1, -1, -1); - const __m128i tmp_lo = _mm_shuffle_epi8(out0, kCst_lo); - const __m128i tmp_7 = _mm_shuffle_epi8(out0, kCst_7); // extract #7 - const __m128i kCst_hi = PSHUFB_CST(1, 4, 5, 2, -1, 3, 6, 7); - const __m128i kCst_8 = PSHUFB_CST(-1, -1, -1, 0, -1, -1, -1, -1); - const __m128i tmp_hi = _mm_shuffle_epi8(out8, kCst_hi); - const __m128i tmp_8 = _mm_shuffle_epi8(out8, kCst_8); // extract #8 - const __m128i out_z0 = _mm_or_si128(tmp_lo, tmp_8); - const __m128i out_z8 = _mm_or_si128(tmp_hi, tmp_7); - _mm_storeu_si128((__m128i*)&out[0], out_z0); - _mm_storeu_si128((__m128i*)&out[8], out_z8); - packed_out = _mm_packs_epi16(out_z0, out_z8); - } - - // detect if all 'out' values are zeroes or not - return (_mm_movemask_epi8(_mm_cmpeq_epi8(packed_out, zero)) != 0xffff); -} - -#undef PSHUFB_CST - -static int QuantizeBlock_SSE41(int16_t in[16], int16_t out[16], - const VP8Matrix* const mtx) { - return DoQuantizeBlock_SSE41(in, out, &mtx->sharpen_[0], mtx); -} - -static int QuantizeBlockWHT_SSE41(int16_t in[16], int16_t out[16], - const VP8Matrix* const mtx) { - return DoQuantizeBlock_SSE41(in, out, NULL, mtx); -} - -static int Quantize2Blocks_SSE41(int16_t in[32], int16_t out[32], - const VP8Matrix* const mtx) { - int nz; - const uint16_t* const sharpen = &mtx->sharpen_[0]; - nz = DoQuantizeBlock_SSE41(in + 0 * 16, out + 0 * 16, sharpen, mtx) << 0; - nz |= DoQuantizeBlock_SSE41(in + 1 * 16, out + 1 * 16, sharpen, mtx) << 1; - return nz; -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8EncDspInitSSE41(void); -WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitSSE41(void) { - VP8CollectHistogram = CollectHistogram_SSE41; - VP8EncQuantizeBlock = QuantizeBlock_SSE41; - VP8EncQuantize2Blocks = Quantize2Blocks_SSE41; - VP8EncQuantizeBlockWHT = QuantizeBlockWHT_SSE41; - VP8TDisto4x4 = Disto4x4_SSE41; - VP8TDisto16x16 = Disto16x16_SSE41; -} - -#else // !WEBP_USE_SSE41 - -WEBP_DSP_INIT_STUB(VP8EncDspInitSSE41) - -#endif // WEBP_USE_SSE41 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters.c deleted file mode 100644 index 2490bca..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters.c +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Spatial prediction using various filters -// -// Author: Urvang (urvang@google.com) - -#include "src/dsp/dsp.h" -#include -#include -#include - -//------------------------------------------------------------------------------ -// Helpful macro. - -# define SANITY_CHECK(in, out) \ - assert((in) != NULL); \ - assert((out) != NULL); \ - assert(width > 0); \ - assert(height > 0); \ - assert(stride >= width); \ - assert(row >= 0 && num_rows > 0 && row + num_rows <= height); \ - (void)height; // Silence unused warning. - -#if !WEBP_NEON_OMIT_C_CODE -static WEBP_INLINE void PredictLine_C(const uint8_t* src, const uint8_t* pred, - uint8_t* dst, int length, int inverse) { - int i; - if (inverse) { - for (i = 0; i < length; ++i) dst[i] = src[i] + pred[i]; - } else { - for (i = 0; i < length; ++i) dst[i] = src[i] - pred[i]; - } -} - -//------------------------------------------------------------------------------ -// Horizontal filter. - -static WEBP_INLINE void DoHorizontalFilter_C(const uint8_t* in, - int width, int height, int stride, - int row, int num_rows, - int inverse, uint8_t* out) { - const uint8_t* preds; - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - preds = inverse ? out : in; - - if (row == 0) { - // Leftmost pixel is the same as input for topmost scanline. - out[0] = in[0]; - PredictLine_C(in + 1, preds, out + 1, width - 1, inverse); - row = 1; - preds += stride; - in += stride; - out += stride; - } - - // Filter line-by-line. - while (row < last_row) { - // Leftmost pixel is predicted from above. - PredictLine_C(in, preds - stride, out, 1, inverse); - PredictLine_C(in + 1, preds, out + 1, width - 1, inverse); - ++row; - preds += stride; - in += stride; - out += stride; - } -} - -//------------------------------------------------------------------------------ -// Vertical filter. - -static WEBP_INLINE void DoVerticalFilter_C(const uint8_t* in, - int width, int height, int stride, - int row, int num_rows, - int inverse, uint8_t* out) { - const uint8_t* preds; - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - preds = inverse ? out : in; - - if (row == 0) { - // Very first top-left pixel is copied. - out[0] = in[0]; - // Rest of top scan-line is left-predicted. - PredictLine_C(in + 1, preds, out + 1, width - 1, inverse); - row = 1; - in += stride; - out += stride; - } else { - // We are starting from in-between. Make sure 'preds' points to prev row. - preds -= stride; - } - - // Filter line-by-line. - while (row < last_row) { - PredictLine_C(in, preds, out, width, inverse); - ++row; - preds += stride; - in += stride; - out += stride; - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -//------------------------------------------------------------------------------ -// Gradient filter. - -static WEBP_INLINE int GradientPredictor_C(uint8_t a, uint8_t b, uint8_t c) { - const int g = a + b - c; - return ((g & ~0xff) == 0) ? g : (g < 0) ? 0 : 255; // clip to 8bit -} - -#if !WEBP_NEON_OMIT_C_CODE -static WEBP_INLINE void DoGradientFilter_C(const uint8_t* in, - int width, int height, int stride, - int row, int num_rows, - int inverse, uint8_t* out) { - const uint8_t* preds; - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - preds = inverse ? out : in; - - // left prediction for top scan-line - if (row == 0) { - out[0] = in[0]; - PredictLine_C(in + 1, preds, out + 1, width - 1, inverse); - row = 1; - preds += stride; - in += stride; - out += stride; - } - - // Filter line-by-line. - while (row < last_row) { - int w; - // leftmost pixel: predict from above. - PredictLine_C(in, preds - stride, out, 1, inverse); - for (w = 1; w < width; ++w) { - const int pred = GradientPredictor_C(preds[w - 1], - preds[w - stride], - preds[w - stride - 1]); - out[w] = in[w] + (inverse ? pred : -pred); - } - ++row; - preds += stride; - in += stride; - out += stride; - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -#undef SANITY_CHECK - -//------------------------------------------------------------------------------ - -#if !WEBP_NEON_OMIT_C_CODE -static void HorizontalFilter_C(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - DoHorizontalFilter_C(data, width, height, stride, 0, height, 0, - filtered_data); -} - -static void VerticalFilter_C(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - DoVerticalFilter_C(data, width, height, stride, 0, height, 0, filtered_data); -} - -static void GradientFilter_C(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - DoGradientFilter_C(data, width, height, stride, 0, height, 0, filtered_data); -} -#endif // !WEBP_NEON_OMIT_C_CODE - -//------------------------------------------------------------------------------ - -static void HorizontalUnfilter_C(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - uint8_t pred = (prev == NULL) ? 0 : prev[0]; - int i; - for (i = 0; i < width; ++i) { - out[i] = pred + in[i]; - pred = out[i]; - } -} - -#if !WEBP_NEON_OMIT_C_CODE -static void VerticalUnfilter_C(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - if (prev == NULL) { - HorizontalUnfilter_C(NULL, in, out, width); - } else { - int i; - for (i = 0; i < width; ++i) out[i] = prev[i] + in[i]; - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -static void GradientUnfilter_C(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - if (prev == NULL) { - HorizontalUnfilter_C(NULL, in, out, width); - } else { - uint8_t top = prev[0], top_left = top, left = top; - int i; - for (i = 0; i < width; ++i) { - top = prev[i]; // need to read this first, in case prev==out - left = in[i] + GradientPredictor_C(left, top, top_left); - top_left = top; - out[i] = left; - } - } -} - -//------------------------------------------------------------------------------ -// Init function - -WebPFilterFunc WebPFilters[WEBP_FILTER_LAST]; -WebPUnfilterFunc WebPUnfilters[WEBP_FILTER_LAST]; - -extern void VP8FiltersInitMIPSdspR2(void); -extern void VP8FiltersInitMSA(void); -extern void VP8FiltersInitNEON(void); -extern void VP8FiltersInitSSE2(void); - -WEBP_DSP_INIT_FUNC(VP8FiltersInit) { - WebPUnfilters[WEBP_FILTER_NONE] = NULL; -#if !WEBP_NEON_OMIT_C_CODE - WebPUnfilters[WEBP_FILTER_HORIZONTAL] = HorizontalUnfilter_C; - WebPUnfilters[WEBP_FILTER_VERTICAL] = VerticalUnfilter_C; -#endif - WebPUnfilters[WEBP_FILTER_GRADIENT] = GradientUnfilter_C; - - WebPFilters[WEBP_FILTER_NONE] = NULL; -#if !WEBP_NEON_OMIT_C_CODE - WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter_C; - WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter_C; - WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter_C; -#endif - - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - VP8FiltersInitSSE2(); - } -#endif -#if defined(WEBP_USE_MIPS_DSP_R2) - if (VP8GetCPUInfo(kMIPSdspR2)) { - VP8FiltersInitMIPSdspR2(); - } -#endif -#if defined(WEBP_USE_MSA) - if (VP8GetCPUInfo(kMSA)) { - VP8FiltersInitMSA(); - } -#endif - } - -#if defined(WEBP_USE_NEON) - if (WEBP_NEON_OMIT_C_CODE || - (VP8GetCPUInfo != NULL && VP8GetCPUInfo(kNEON))) { - VP8FiltersInitNEON(); - } -#endif - - assert(WebPUnfilters[WEBP_FILTER_HORIZONTAL] != NULL); - assert(WebPUnfilters[WEBP_FILTER_VERTICAL] != NULL); - assert(WebPUnfilters[WEBP_FILTER_GRADIENT] != NULL); - assert(WebPFilters[WEBP_FILTER_HORIZONTAL] != NULL); - assert(WebPFilters[WEBP_FILTER_VERTICAL] != NULL); - assert(WebPFilters[WEBP_FILTER_GRADIENT] != NULL); -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_mips_dsp_r2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_mips_dsp_r2.c deleted file mode 100644 index f33b858..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_mips_dsp_r2.c +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Spatial prediction using various filters -// -// Author(s): Branimir Vasic (branimir.vasic@imgtec.com) -// Djordje Pesut (djordje.pesut@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS_DSP_R2) - -#include "src/dsp/dsp.h" -#include -#include -#include - -//------------------------------------------------------------------------------ -// Helpful macro. - -# define SANITY_CHECK(in, out) \ - assert(in != NULL); \ - assert(out != NULL); \ - assert(width > 0); \ - assert(height > 0); \ - assert(stride >= width); \ - assert(row >= 0 && num_rows > 0 && row + num_rows <= height); \ - (void)height; // Silence unused warning. - -#define DO_PREDICT_LINE(SRC, DST, LENGTH, INVERSE) do { \ - const uint8_t* psrc = (uint8_t*)(SRC); \ - uint8_t* pdst = (uint8_t*)(DST); \ - const int ilength = (int)(LENGTH); \ - int temp0, temp1, temp2, temp3, temp4, temp5, temp6; \ - __asm__ volatile ( \ - ".set push \n\t" \ - ".set noreorder \n\t" \ - "srl %[temp0], %[length], 2 \n\t" \ - "beqz %[temp0], 4f \n\t" \ - " andi %[temp6], %[length], 3 \n\t" \ - ".if " #INVERSE " \n\t" \ - "1: \n\t" \ - "lbu %[temp1], -1(%[dst]) \n\t" \ - "lbu %[temp2], 0(%[src]) \n\t" \ - "lbu %[temp3], 1(%[src]) \n\t" \ - "lbu %[temp4], 2(%[src]) \n\t" \ - "lbu %[temp5], 3(%[src]) \n\t" \ - "addu %[temp1], %[temp1], %[temp2] \n\t" \ - "addu %[temp2], %[temp1], %[temp3] \n\t" \ - "addu %[temp3], %[temp2], %[temp4] \n\t" \ - "addu %[temp4], %[temp3], %[temp5] \n\t" \ - "sb %[temp1], 0(%[dst]) \n\t" \ - "sb %[temp2], 1(%[dst]) \n\t" \ - "sb %[temp3], 2(%[dst]) \n\t" \ - "sb %[temp4], 3(%[dst]) \n\t" \ - "addiu %[src], %[src], 4 \n\t" \ - "addiu %[temp0], %[temp0], -1 \n\t" \ - "bnez %[temp0], 1b \n\t" \ - " addiu %[dst], %[dst], 4 \n\t" \ - ".else \n\t" \ - "1: \n\t" \ - "ulw %[temp1], -1(%[src]) \n\t" \ - "ulw %[temp2], 0(%[src]) \n\t" \ - "addiu %[src], %[src], 4 \n\t" \ - "addiu %[temp0], %[temp0], -1 \n\t" \ - "subu.qb %[temp3], %[temp2], %[temp1] \n\t" \ - "usw %[temp3], 0(%[dst]) \n\t" \ - "bnez %[temp0], 1b \n\t" \ - " addiu %[dst], %[dst], 4 \n\t" \ - ".endif \n\t" \ - "4: \n\t" \ - "beqz %[temp6], 3f \n\t" \ - " nop \n\t" \ - "2: \n\t" \ - "lbu %[temp2], 0(%[src]) \n\t" \ - ".if " #INVERSE " \n\t" \ - "lbu %[temp1], -1(%[dst]) \n\t" \ - "addu %[temp3], %[temp1], %[temp2] \n\t" \ - ".else \n\t" \ - "lbu %[temp1], -1(%[src]) \n\t" \ - "subu %[temp3], %[temp1], %[temp2] \n\t" \ - ".endif \n\t" \ - "addiu %[src], %[src], 1 \n\t" \ - "sb %[temp3], 0(%[dst]) \n\t" \ - "addiu %[temp6], %[temp6], -1 \n\t" \ - "bnez %[temp6], 2b \n\t" \ - " addiu %[dst], %[dst], 1 \n\t" \ - "3: \n\t" \ - ".set pop \n\t" \ - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), \ - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), \ - [temp6]"=&r"(temp6), [dst]"+&r"(pdst), [src]"+&r"(psrc) \ - : [length]"r"(ilength) \ - : "memory" \ - ); \ - } while (0) - -static WEBP_INLINE void PredictLine_MIPSdspR2(const uint8_t* src, uint8_t* dst, - int length) { - DO_PREDICT_LINE(src, dst, length, 0); -} - -#define DO_PREDICT_LINE_VERTICAL(SRC, PRED, DST, LENGTH, INVERSE) do { \ - const uint8_t* psrc = (uint8_t*)(SRC); \ - const uint8_t* ppred = (uint8_t*)(PRED); \ - uint8_t* pdst = (uint8_t*)(DST); \ - const int ilength = (int)(LENGTH); \ - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; \ - __asm__ volatile ( \ - ".set push \n\t" \ - ".set noreorder \n\t" \ - "srl %[temp0], %[length], 0x3 \n\t" \ - "beqz %[temp0], 4f \n\t" \ - " andi %[temp7], %[length], 0x7 \n\t" \ - "1: \n\t" \ - "ulw %[temp1], 0(%[src]) \n\t" \ - "ulw %[temp2], 0(%[pred]) \n\t" \ - "ulw %[temp3], 4(%[src]) \n\t" \ - "ulw %[temp4], 4(%[pred]) \n\t" \ - "addiu %[src], %[src], 8 \n\t" \ - ".if " #INVERSE " \n\t" \ - "addu.qb %[temp5], %[temp1], %[temp2] \n\t" \ - "addu.qb %[temp6], %[temp3], %[temp4] \n\t" \ - ".else \n\t" \ - "subu.qb %[temp5], %[temp1], %[temp2] \n\t" \ - "subu.qb %[temp6], %[temp3], %[temp4] \n\t" \ - ".endif \n\t" \ - "addiu %[pred], %[pred], 8 \n\t" \ - "usw %[temp5], 0(%[dst]) \n\t" \ - "usw %[temp6], 4(%[dst]) \n\t" \ - "addiu %[temp0], %[temp0], -1 \n\t" \ - "bnez %[temp0], 1b \n\t" \ - " addiu %[dst], %[dst], 8 \n\t" \ - "4: \n\t" \ - "beqz %[temp7], 3f \n\t" \ - " nop \n\t" \ - "2: \n\t" \ - "lbu %[temp1], 0(%[src]) \n\t" \ - "lbu %[temp2], 0(%[pred]) \n\t" \ - "addiu %[src], %[src], 1 \n\t" \ - "addiu %[pred], %[pred], 1 \n\t" \ - ".if " #INVERSE " \n\t" \ - "addu %[temp3], %[temp1], %[temp2] \n\t" \ - ".else \n\t" \ - "subu %[temp3], %[temp1], %[temp2] \n\t" \ - ".endif \n\t" \ - "sb %[temp3], 0(%[dst]) \n\t" \ - "addiu %[temp7], %[temp7], -1 \n\t" \ - "bnez %[temp7], 2b \n\t" \ - " addiu %[dst], %[dst], 1 \n\t" \ - "3: \n\t" \ - ".set pop \n\t" \ - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), \ - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), \ - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), [pred]"+&r"(ppred), \ - [dst]"+&r"(pdst), [src]"+&r"(psrc) \ - : [length]"r"(ilength) \ - : "memory" \ - ); \ - } while (0) - -#define PREDICT_LINE_ONE_PASS(SRC, PRED, DST) do { \ - int temp1, temp2, temp3; \ - __asm__ volatile ( \ - "lbu %[temp1], 0(%[src]) \n\t" \ - "lbu %[temp2], 0(%[pred]) \n\t" \ - "subu %[temp3], %[temp1], %[temp2] \n\t" \ - "sb %[temp3], 0(%[dst]) \n\t" \ - : [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), [temp3]"=&r"(temp3) \ - : [pred]"r"((PRED)), [dst]"r"((DST)), [src]"r"((SRC)) \ - : "memory" \ - ); \ - } while (0) - -//------------------------------------------------------------------------------ -// Horizontal filter. - -#define FILTER_LINE_BY_LINE do { \ - while (row < last_row) { \ - PREDICT_LINE_ONE_PASS(in, preds - stride, out); \ - DO_PREDICT_LINE(in + 1, out + 1, width - 1, 0); \ - ++row; \ - preds += stride; \ - in += stride; \ - out += stride; \ - } \ - } while (0) - -static WEBP_INLINE void DoHorizontalFilter_MIPSdspR2(const uint8_t* in, - int width, int height, - int stride, - int row, int num_rows, - uint8_t* out) { - const uint8_t* preds; - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - preds = in; - - if (row == 0) { - // Leftmost pixel is the same as input for topmost scanline. - out[0] = in[0]; - PredictLine_MIPSdspR2(in + 1, out + 1, width - 1); - row = 1; - preds += stride; - in += stride; - out += stride; - } - - // Filter line-by-line. - FILTER_LINE_BY_LINE; -} -#undef FILTER_LINE_BY_LINE - -static void HorizontalFilter_MIPSdspR2(const uint8_t* data, - int width, int height, - int stride, uint8_t* filtered_data) { - DoHorizontalFilter_MIPSdspR2(data, width, height, stride, 0, height, - filtered_data); -} - -//------------------------------------------------------------------------------ -// Vertical filter. - -#define FILTER_LINE_BY_LINE do { \ - while (row < last_row) { \ - DO_PREDICT_LINE_VERTICAL(in, preds, out, width, 0); \ - ++row; \ - preds += stride; \ - in += stride; \ - out += stride; \ - } \ - } while (0) - -static WEBP_INLINE void DoVerticalFilter_MIPSdspR2(const uint8_t* in, - int width, int height, - int stride, - int row, int num_rows, - uint8_t* out) { - const uint8_t* preds; - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - preds = in; - - if (row == 0) { - // Very first top-left pixel is copied. - out[0] = in[0]; - // Rest of top scan-line is left-predicted. - PredictLine_MIPSdspR2(in + 1, out + 1, width - 1); - row = 1; - in += stride; - out += stride; - } else { - // We are starting from in-between. Make sure 'preds' points to prev row. - preds -= stride; - } - - // Filter line-by-line. - FILTER_LINE_BY_LINE; -} -#undef FILTER_LINE_BY_LINE - -static void VerticalFilter_MIPSdspR2(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - DoVerticalFilter_MIPSdspR2(data, width, height, stride, 0, height, - filtered_data); -} - -//------------------------------------------------------------------------------ -// Gradient filter. - -static int GradientPredictor_MIPSdspR2(uint8_t a, uint8_t b, uint8_t c) { - int temp0; - __asm__ volatile ( - "addu %[temp0], %[a], %[b] \n\t" - "subu %[temp0], %[temp0], %[c] \n\t" - "shll_s.w %[temp0], %[temp0], 23 \n\t" - "precrqu_s.qb.ph %[temp0], %[temp0], $zero \n\t" - "srl %[temp0], %[temp0], 24 \n\t" - : [temp0]"=&r"(temp0) - : [a]"r"(a),[b]"r"(b),[c]"r"(c) - ); - return temp0; -} - -#define FILTER_LINE_BY_LINE(PREDS, OPERATION) do { \ - while (row < last_row) { \ - int w; \ - PREDICT_LINE_ONE_PASS(in, PREDS - stride, out); \ - for (w = 1; w < width; ++w) { \ - const int pred = GradientPredictor_MIPSdspR2(PREDS[w - 1], \ - PREDS[w - stride], \ - PREDS[w - stride - 1]); \ - out[w] = in[w] OPERATION pred; \ - } \ - ++row; \ - in += stride; \ - out += stride; \ - } \ - } while (0) - -static void DoGradientFilter_MIPSdspR2(const uint8_t* in, - int width, int height, int stride, - int row, int num_rows, uint8_t* out) { - const uint8_t* preds; - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - preds = in; - - // left prediction for top scan-line - if (row == 0) { - out[0] = in[0]; - PredictLine_MIPSdspR2(in + 1, out + 1, width - 1); - row = 1; - preds += stride; - in += stride; - out += stride; - } - - // Filter line-by-line. - FILTER_LINE_BY_LINE(in, -); -} -#undef FILTER_LINE_BY_LINE - -static void GradientFilter_MIPSdspR2(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - DoGradientFilter_MIPSdspR2(data, width, height, stride, 0, height, - filtered_data); -} - -//------------------------------------------------------------------------------ - -static void HorizontalUnfilter_MIPSdspR2(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - out[0] = in[0] + (prev == NULL ? 0 : prev[0]); - DO_PREDICT_LINE(in + 1, out + 1, width - 1, 1); -} - -static void VerticalUnfilter_MIPSdspR2(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - if (prev == NULL) { - HorizontalUnfilter_MIPSdspR2(NULL, in, out, width); - } else { - DO_PREDICT_LINE_VERTICAL(in, prev, out, width, 1); - } -} - -static void GradientUnfilter_MIPSdspR2(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - if (prev == NULL) { - HorizontalUnfilter_MIPSdspR2(NULL, in, out, width); - } else { - uint8_t top = prev[0], top_left = top, left = top; - int i; - for (i = 0; i < width; ++i) { - top = prev[i]; // need to read this first, in case prev==dst - left = in[i] + GradientPredictor_MIPSdspR2(left, top, top_left); - top_left = top; - out[i] = left; - } - } -} - -#undef DO_PREDICT_LINE_VERTICAL -#undef PREDICT_LINE_ONE_PASS -#undef DO_PREDICT_LINE -#undef SANITY_CHECK - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8FiltersInitMIPSdspR2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitMIPSdspR2(void) { - WebPUnfilters[WEBP_FILTER_HORIZONTAL] = HorizontalUnfilter_MIPSdspR2; - WebPUnfilters[WEBP_FILTER_VERTICAL] = VerticalUnfilter_MIPSdspR2; - WebPUnfilters[WEBP_FILTER_GRADIENT] = GradientUnfilter_MIPSdspR2; - - WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter_MIPSdspR2; - WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter_MIPSdspR2; - WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter_MIPSdspR2; -} - -#else // !WEBP_USE_MIPS_DSP_R2 - -WEBP_DSP_INIT_STUB(VP8FiltersInitMIPSdspR2) - -#endif // WEBP_USE_MIPS_DSP_R2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_msa.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_msa.c deleted file mode 100644 index 2a26caf..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_msa.c +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MSA variant of alpha filters -// -// Author: Prashant Patil (prashant.patil@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MSA) - -#include "src/dsp/msa_macro.h" - -#include - -static WEBP_INLINE void PredictLineInverse0(const uint8_t* src, - const uint8_t* pred, - uint8_t* dst, int length) { - v16u8 src0, pred0, dst0; - assert(length >= 0); - while (length >= 32) { - v16u8 src1, pred1, dst1; - LD_UB2(src, 16, src0, src1); - LD_UB2(pred, 16, pred0, pred1); - SUB2(src0, pred0, src1, pred1, dst0, dst1); - ST_UB2(dst0, dst1, dst, 16); - src += 32; - pred += 32; - dst += 32; - length -= 32; - } - if (length > 0) { - int i; - if (length >= 16) { - src0 = LD_UB(src); - pred0 = LD_UB(pred); - dst0 = src0 - pred0; - ST_UB(dst0, dst); - src += 16; - pred += 16; - dst += 16; - length -= 16; - } - for (i = 0; i < length; i++) { - dst[i] = src[i] - pred[i]; - } - } -} - -//------------------------------------------------------------------------------ -// Helpful macro. - -#define SANITY_CHECK(in, out) \ - assert(in != NULL); \ - assert(out != NULL); \ - assert(width > 0); \ - assert(height > 0); \ - assert(stride >= width); - -//------------------------------------------------------------------------------ -// Horrizontal filter - -static void HorizontalFilter_MSA(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - const uint8_t* preds = data; - const uint8_t* in = data; - uint8_t* out = filtered_data; - int row = 1; - SANITY_CHECK(in, out); - - // Leftmost pixel is the same as input for topmost scanline. - out[0] = in[0]; - PredictLineInverse0(in + 1, preds, out + 1, width - 1); - preds += stride; - in += stride; - out += stride; - // Filter line-by-line. - while (row < height) { - // Leftmost pixel is predicted from above. - PredictLineInverse0(in, preds - stride, out, 1); - PredictLineInverse0(in + 1, preds, out + 1, width - 1); - ++row; - preds += stride; - in += stride; - out += stride; - } -} - -//------------------------------------------------------------------------------ -// Gradient filter - -static WEBP_INLINE void PredictLineGradient(const uint8_t* pinput, - const uint8_t* ppred, - uint8_t* poutput, int stride, - int size) { - int w; - const v16i8 zero = { 0 }; - while (size >= 16) { - v16u8 pred0, dst0; - v8i16 a0, a1, b0, b1, c0, c1; - const v16u8 tmp0 = LD_UB(ppred - 1); - const v16u8 tmp1 = LD_UB(ppred - stride); - const v16u8 tmp2 = LD_UB(ppred - stride - 1); - const v16u8 src0 = LD_UB(pinput); - ILVRL_B2_SH(zero, tmp0, a0, a1); - ILVRL_B2_SH(zero, tmp1, b0, b1); - ILVRL_B2_SH(zero, tmp2, c0, c1); - ADD2(a0, b0, a1, b1, a0, a1); - SUB2(a0, c0, a1, c1, a0, a1); - CLIP_SH2_0_255(a0, a1); - pred0 = (v16u8)__msa_pckev_b((v16i8)a1, (v16i8)a0); - dst0 = src0 - pred0; - ST_UB(dst0, poutput); - ppred += 16; - pinput += 16; - poutput += 16; - size -= 16; - } - for (w = 0; w < size; ++w) { - const int pred = ppred[w - 1] + ppred[w - stride] - ppred[w - stride - 1]; - poutput[w] = pinput[w] - (pred < 0 ? 0 : pred > 255 ? 255 : pred); - } -} - - -static void GradientFilter_MSA(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - const uint8_t* in = data; - const uint8_t* preds = data; - uint8_t* out = filtered_data; - int row = 1; - SANITY_CHECK(in, out); - - // left prediction for top scan-line - out[0] = in[0]; - PredictLineInverse0(in + 1, preds, out + 1, width - 1); - preds += stride; - in += stride; - out += stride; - // Filter line-by-line. - while (row < height) { - out[0] = in[0] - preds[- stride]; - PredictLineGradient(preds + 1, in + 1, out + 1, stride, width - 1); - ++row; - preds += stride; - in += stride; - out += stride; - } -} - -//------------------------------------------------------------------------------ -// Vertical filter - -static void VerticalFilter_MSA(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - const uint8_t* in = data; - const uint8_t* preds = data; - uint8_t* out = filtered_data; - int row = 1; - SANITY_CHECK(in, out); - - // Very first top-left pixel is copied. - out[0] = in[0]; - // Rest of top scan-line is left-predicted. - PredictLineInverse0(in + 1, preds, out + 1, width - 1); - in += stride; - out += stride; - - // Filter line-by-line. - while (row < height) { - PredictLineInverse0(in, preds, out, width); - ++row; - preds += stride; - in += stride; - out += stride; - } -} - -#undef SANITY_CHECK - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8FiltersInitMSA(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitMSA(void) { - WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter_MSA; - WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter_MSA; - WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter_MSA; -} - -#else // !WEBP_USE_MSA - -WEBP_DSP_INIT_STUB(VP8FiltersInitMSA) - -#endif // WEBP_USE_MSA diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_neon.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_neon.c deleted file mode 100644 index ff890ef..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_neon.c +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// NEON variant of alpha filters -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_NEON) - -#include -#include "src/dsp/neon.h" - -//------------------------------------------------------------------------------ -// Helpful macros. - -# define SANITY_CHECK(in, out) \ - assert(in != NULL); \ - assert(out != NULL); \ - assert(width > 0); \ - assert(height > 0); \ - assert(stride >= width); \ - assert(row >= 0 && num_rows > 0 && row + num_rows <= height); \ - (void)height; // Silence unused warning. - -// load eight u8 and widen to s16 -#define U8_TO_S16(A) vreinterpretq_s16_u16(vmovl_u8(A)) -#define LOAD_U8_TO_S16(A) U8_TO_S16(vld1_u8(A)) - -// shift left or right by N byte, inserting zeros -#define SHIFT_RIGHT_N_Q(A, N) vextq_u8((A), zero, (N)) -#define SHIFT_LEFT_N_Q(A, N) vextq_u8(zero, (A), (16 - (N)) % 16) - -// rotate left by N bytes -#define ROTATE_LEFT_N(A, N) vext_u8((A), (A), (N)) -// rotate right by N bytes -#define ROTATE_RIGHT_N(A, N) vext_u8((A), (A), (8 - (N)) % 8) - -static void PredictLine_NEON(const uint8_t* src, const uint8_t* pred, - uint8_t* dst, int length) { - int i; - assert(length >= 0); - for (i = 0; i + 16 <= length; i += 16) { - const uint8x16_t A = vld1q_u8(&src[i]); - const uint8x16_t B = vld1q_u8(&pred[i]); - const uint8x16_t C = vsubq_u8(A, B); - vst1q_u8(&dst[i], C); - } - for (; i < length; ++i) dst[i] = src[i] - pred[i]; -} - -// Special case for left-based prediction (when preds==dst-1 or preds==src-1). -static void PredictLineLeft_NEON(const uint8_t* src, uint8_t* dst, int length) { - PredictLine_NEON(src, src - 1, dst, length); -} - -//------------------------------------------------------------------------------ -// Horizontal filter. - -static WEBP_INLINE void DoHorizontalFilter_NEON(const uint8_t* in, - int width, int height, - int stride, - int row, int num_rows, - uint8_t* out) { - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - - if (row == 0) { - // Leftmost pixel is the same as input for topmost scanline. - out[0] = in[0]; - PredictLineLeft_NEON(in + 1, out + 1, width - 1); - row = 1; - in += stride; - out += stride; - } - - // Filter line-by-line. - while (row < last_row) { - // Leftmost pixel is predicted from above. - out[0] = in[0] - in[-stride]; - PredictLineLeft_NEON(in + 1, out + 1, width - 1); - ++row; - in += stride; - out += stride; - } -} - -static void HorizontalFilter_NEON(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - DoHorizontalFilter_NEON(data, width, height, stride, 0, height, - filtered_data); -} - -//------------------------------------------------------------------------------ -// Vertical filter. - -static WEBP_INLINE void DoVerticalFilter_NEON(const uint8_t* in, - int width, int height, int stride, - int row, int num_rows, - uint8_t* out) { - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - - if (row == 0) { - // Very first top-left pixel is copied. - out[0] = in[0]; - // Rest of top scan-line is left-predicted. - PredictLineLeft_NEON(in + 1, out + 1, width - 1); - row = 1; - in += stride; - out += stride; - } - - // Filter line-by-line. - while (row < last_row) { - PredictLine_NEON(in, in - stride, out, width); - ++row; - in += stride; - out += stride; - } -} - -static void VerticalFilter_NEON(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - DoVerticalFilter_NEON(data, width, height, stride, 0, height, - filtered_data); -} - -//------------------------------------------------------------------------------ -// Gradient filter. - -static WEBP_INLINE int GradientPredictor_C(uint8_t a, uint8_t b, uint8_t c) { - const int g = a + b - c; - return ((g & ~0xff) == 0) ? g : (g < 0) ? 0 : 255; // clip to 8bit -} - -static void GradientPredictDirect_NEON(const uint8_t* const row, - const uint8_t* const top, - uint8_t* const out, int length) { - int i; - for (i = 0; i + 8 <= length; i += 8) { - const uint8x8_t A = vld1_u8(&row[i - 1]); - const uint8x8_t B = vld1_u8(&top[i + 0]); - const int16x8_t C = vreinterpretq_s16_u16(vaddl_u8(A, B)); - const int16x8_t D = LOAD_U8_TO_S16(&top[i - 1]); - const uint8x8_t E = vqmovun_s16(vsubq_s16(C, D)); - const uint8x8_t F = vld1_u8(&row[i + 0]); - vst1_u8(&out[i], vsub_u8(F, E)); - } - for (; i < length; ++i) { - out[i] = row[i] - GradientPredictor_C(row[i - 1], top[i], top[i - 1]); - } -} - -static WEBP_INLINE void DoGradientFilter_NEON(const uint8_t* in, - int width, int height, - int stride, - int row, int num_rows, - uint8_t* out) { - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - - // left prediction for top scan-line - if (row == 0) { - out[0] = in[0]; - PredictLineLeft_NEON(in + 1, out + 1, width - 1); - row = 1; - in += stride; - out += stride; - } - - // Filter line-by-line. - while (row < last_row) { - out[0] = in[0] - in[-stride]; - GradientPredictDirect_NEON(in + 1, in + 1 - stride, out + 1, width - 1); - ++row; - in += stride; - out += stride; - } -} - -static void GradientFilter_NEON(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - DoGradientFilter_NEON(data, width, height, stride, 0, height, - filtered_data); -} - -#undef SANITY_CHECK - -//------------------------------------------------------------------------------ -// Inverse transforms - -static void HorizontalUnfilter_NEON(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - int i; - const uint8x16_t zero = vdupq_n_u8(0); - uint8x16_t last; - out[0] = in[0] + (prev == NULL ? 0 : prev[0]); - if (width <= 1) return; - last = vsetq_lane_u8(out[0], zero, 0); - for (i = 1; i + 16 <= width; i += 16) { - const uint8x16_t A0 = vld1q_u8(&in[i]); - const uint8x16_t A1 = vaddq_u8(A0, last); - const uint8x16_t A2 = SHIFT_LEFT_N_Q(A1, 1); - const uint8x16_t A3 = vaddq_u8(A1, A2); - const uint8x16_t A4 = SHIFT_LEFT_N_Q(A3, 2); - const uint8x16_t A5 = vaddq_u8(A3, A4); - const uint8x16_t A6 = SHIFT_LEFT_N_Q(A5, 4); - const uint8x16_t A7 = vaddq_u8(A5, A6); - const uint8x16_t A8 = SHIFT_LEFT_N_Q(A7, 8); - const uint8x16_t A9 = vaddq_u8(A7, A8); - vst1q_u8(&out[i], A9); - last = SHIFT_RIGHT_N_Q(A9, 15); - } - for (; i < width; ++i) out[i] = in[i] + out[i - 1]; -} - -static void VerticalUnfilter_NEON(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - if (prev == NULL) { - HorizontalUnfilter_NEON(NULL, in, out, width); - } else { - int i; - assert(width >= 0); - for (i = 0; i + 16 <= width; i += 16) { - const uint8x16_t A = vld1q_u8(&in[i]); - const uint8x16_t B = vld1q_u8(&prev[i]); - const uint8x16_t C = vaddq_u8(A, B); - vst1q_u8(&out[i], C); - } - for (; i < width; ++i) out[i] = in[i] + prev[i]; - } -} - -// GradientUnfilter_NEON is correct but slower than the C-version, -// at least on ARM64. For armv7, it's a wash. -// So best is to disable it for now, but keep the idea around... -#if !defined(USE_GRADIENT_UNFILTER) -#define USE_GRADIENT_UNFILTER 0 // ALTERNATE_CODE -#endif - -#if (USE_GRADIENT_UNFILTER == 1) -#define GRAD_PROCESS_LANE(L) do { \ - const uint8x8_t tmp1 = ROTATE_RIGHT_N(pred, 1); /* rotate predictor in */ \ - const int16x8_t tmp2 = vaddq_s16(BC, U8_TO_S16(tmp1)); \ - const uint8x8_t delta = vqmovun_s16(tmp2); \ - pred = vadd_u8(D, delta); \ - out = vext_u8(out, ROTATE_LEFT_N(pred, (L)), 1); \ -} while (0) - -static void GradientPredictInverse_NEON(const uint8_t* const in, - const uint8_t* const top, - uint8_t* const row, int length) { - if (length > 0) { - int i; - uint8x8_t pred = vdup_n_u8(row[-1]); // left sample - uint8x8_t out = vdup_n_u8(0); - for (i = 0; i + 8 <= length; i += 8) { - const int16x8_t B = LOAD_U8_TO_S16(&top[i + 0]); - const int16x8_t C = LOAD_U8_TO_S16(&top[i - 1]); - const int16x8_t BC = vsubq_s16(B, C); // unclipped gradient basis B - C - const uint8x8_t D = vld1_u8(&in[i]); // base input - GRAD_PROCESS_LANE(0); - GRAD_PROCESS_LANE(1); - GRAD_PROCESS_LANE(2); - GRAD_PROCESS_LANE(3); - GRAD_PROCESS_LANE(4); - GRAD_PROCESS_LANE(5); - GRAD_PROCESS_LANE(6); - GRAD_PROCESS_LANE(7); - vst1_u8(&row[i], out); - } - for (; i < length; ++i) { - row[i] = in[i] + GradientPredictor_C(row[i - 1], top[i], top[i - 1]); - } - } -} -#undef GRAD_PROCESS_LANE - -static void GradientUnfilter_NEON(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - if (prev == NULL) { - HorizontalUnfilter_NEON(NULL, in, out, width); - } else { - out[0] = in[0] + prev[0]; // predict from above - GradientPredictInverse_NEON(in + 1, prev + 1, out + 1, width - 1); - } -} - -#endif // USE_GRADIENT_UNFILTER - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8FiltersInitNEON(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitNEON(void) { - WebPUnfilters[WEBP_FILTER_HORIZONTAL] = HorizontalUnfilter_NEON; - WebPUnfilters[WEBP_FILTER_VERTICAL] = VerticalUnfilter_NEON; -#if (USE_GRADIENT_UNFILTER == 1) - WebPUnfilters[WEBP_FILTER_GRADIENT] = GradientUnfilter_NEON; -#endif - - WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter_NEON; - WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter_NEON; - WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter_NEON; -} - -#else // !WEBP_USE_NEON - -WEBP_DSP_INIT_STUB(VP8FiltersInitNEON) - -#endif // WEBP_USE_NEON diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_sse2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_sse2.c deleted file mode 100644 index b481e7d..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/filters_sse2.c +++ /dev/null @@ -1,333 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE2 variant of alpha filters -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE2) - -#include -#include -#include -#include - -//------------------------------------------------------------------------------ -// Helpful macro. - -# define SANITY_CHECK(in, out) \ - assert((in) != NULL); \ - assert((out) != NULL); \ - assert(width > 0); \ - assert(height > 0); \ - assert(stride >= width); \ - assert(row >= 0 && num_rows > 0 && row + num_rows <= height); \ - (void)height; // Silence unused warning. - -static void PredictLineTop_SSE2(const uint8_t* src, const uint8_t* pred, - uint8_t* dst, int length) { - int i; - const int max_pos = length & ~31; - assert(length >= 0); - for (i = 0; i < max_pos; i += 32) { - const __m128i A0 = _mm_loadu_si128((const __m128i*)&src[i + 0]); - const __m128i A1 = _mm_loadu_si128((const __m128i*)&src[i + 16]); - const __m128i B0 = _mm_loadu_si128((const __m128i*)&pred[i + 0]); - const __m128i B1 = _mm_loadu_si128((const __m128i*)&pred[i + 16]); - const __m128i C0 = _mm_sub_epi8(A0, B0); - const __m128i C1 = _mm_sub_epi8(A1, B1); - _mm_storeu_si128((__m128i*)&dst[i + 0], C0); - _mm_storeu_si128((__m128i*)&dst[i + 16], C1); - } - for (; i < length; ++i) dst[i] = src[i] - pred[i]; -} - -// Special case for left-based prediction (when preds==dst-1 or preds==src-1). -static void PredictLineLeft_SSE2(const uint8_t* src, uint8_t* dst, int length) { - int i; - const int max_pos = length & ~31; - assert(length >= 0); - for (i = 0; i < max_pos; i += 32) { - const __m128i A0 = _mm_loadu_si128((const __m128i*)(src + i + 0 )); - const __m128i B0 = _mm_loadu_si128((const __m128i*)(src + i + 0 - 1)); - const __m128i A1 = _mm_loadu_si128((const __m128i*)(src + i + 16 )); - const __m128i B1 = _mm_loadu_si128((const __m128i*)(src + i + 16 - 1)); - const __m128i C0 = _mm_sub_epi8(A0, B0); - const __m128i C1 = _mm_sub_epi8(A1, B1); - _mm_storeu_si128((__m128i*)(dst + i + 0), C0); - _mm_storeu_si128((__m128i*)(dst + i + 16), C1); - } - for (; i < length; ++i) dst[i] = src[i] - src[i - 1]; -} - -//------------------------------------------------------------------------------ -// Horizontal filter. - -static WEBP_INLINE void DoHorizontalFilter_SSE2(const uint8_t* in, - int width, int height, - int stride, - int row, int num_rows, - uint8_t* out) { - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - - if (row == 0) { - // Leftmost pixel is the same as input for topmost scanline. - out[0] = in[0]; - PredictLineLeft_SSE2(in + 1, out + 1, width - 1); - row = 1; - in += stride; - out += stride; - } - - // Filter line-by-line. - while (row < last_row) { - // Leftmost pixel is predicted from above. - out[0] = in[0] - in[-stride]; - PredictLineLeft_SSE2(in + 1, out + 1, width - 1); - ++row; - in += stride; - out += stride; - } -} - -//------------------------------------------------------------------------------ -// Vertical filter. - -static WEBP_INLINE void DoVerticalFilter_SSE2(const uint8_t* in, - int width, int height, int stride, - int row, int num_rows, - uint8_t* out) { - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - - if (row == 0) { - // Very first top-left pixel is copied. - out[0] = in[0]; - // Rest of top scan-line is left-predicted. - PredictLineLeft_SSE2(in + 1, out + 1, width - 1); - row = 1; - in += stride; - out += stride; - } - - // Filter line-by-line. - while (row < last_row) { - PredictLineTop_SSE2(in, in - stride, out, width); - ++row; - in += stride; - out += stride; - } -} - -//------------------------------------------------------------------------------ -// Gradient filter. - -static WEBP_INLINE int GradientPredictor_SSE2(uint8_t a, uint8_t b, uint8_t c) { - const int g = a + b - c; - return ((g & ~0xff) == 0) ? g : (g < 0) ? 0 : 255; // clip to 8bit -} - -static void GradientPredictDirect_SSE2(const uint8_t* const row, - const uint8_t* const top, - uint8_t* const out, int length) { - const int max_pos = length & ~7; - int i; - const __m128i zero = _mm_setzero_si128(); - for (i = 0; i < max_pos; i += 8) { - const __m128i A0 = _mm_loadl_epi64((const __m128i*)&row[i - 1]); - const __m128i B0 = _mm_loadl_epi64((const __m128i*)&top[i]); - const __m128i C0 = _mm_loadl_epi64((const __m128i*)&top[i - 1]); - const __m128i D = _mm_loadl_epi64((const __m128i*)&row[i]); - const __m128i A1 = _mm_unpacklo_epi8(A0, zero); - const __m128i B1 = _mm_unpacklo_epi8(B0, zero); - const __m128i C1 = _mm_unpacklo_epi8(C0, zero); - const __m128i E = _mm_add_epi16(A1, B1); - const __m128i F = _mm_sub_epi16(E, C1); - const __m128i G = _mm_packus_epi16(F, zero); - const __m128i H = _mm_sub_epi8(D, G); - _mm_storel_epi64((__m128i*)(out + i), H); - } - for (; i < length; ++i) { - out[i] = row[i] - GradientPredictor_SSE2(row[i - 1], top[i], top[i - 1]); - } -} - -static WEBP_INLINE void DoGradientFilter_SSE2(const uint8_t* in, - int width, int height, int stride, - int row, int num_rows, - uint8_t* out) { - const size_t start_offset = row * stride; - const int last_row = row + num_rows; - SANITY_CHECK(in, out); - in += start_offset; - out += start_offset; - - // left prediction for top scan-line - if (row == 0) { - out[0] = in[0]; - PredictLineLeft_SSE2(in + 1, out + 1, width - 1); - row = 1; - in += stride; - out += stride; - } - - // Filter line-by-line. - while (row < last_row) { - out[0] = in[0] - in[-stride]; - GradientPredictDirect_SSE2(in + 1, in + 1 - stride, out + 1, width - 1); - ++row; - in += stride; - out += stride; - } -} - -#undef SANITY_CHECK - -//------------------------------------------------------------------------------ - -static void HorizontalFilter_SSE2(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - DoHorizontalFilter_SSE2(data, width, height, stride, 0, height, - filtered_data); -} - -static void VerticalFilter_SSE2(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - DoVerticalFilter_SSE2(data, width, height, stride, 0, height, filtered_data); -} - -static void GradientFilter_SSE2(const uint8_t* data, int width, int height, - int stride, uint8_t* filtered_data) { - DoGradientFilter_SSE2(data, width, height, stride, 0, height, filtered_data); -} - -//------------------------------------------------------------------------------ -// Inverse transforms - -static void HorizontalUnfilter_SSE2(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - int i; - __m128i last; - out[0] = in[0] + (prev == NULL ? 0 : prev[0]); - if (width <= 1) return; - last = _mm_set_epi32(0, 0, 0, out[0]); - for (i = 1; i + 8 <= width; i += 8) { - const __m128i A0 = _mm_loadl_epi64((const __m128i*)(in + i)); - const __m128i A1 = _mm_add_epi8(A0, last); - const __m128i A2 = _mm_slli_si128(A1, 1); - const __m128i A3 = _mm_add_epi8(A1, A2); - const __m128i A4 = _mm_slli_si128(A3, 2); - const __m128i A5 = _mm_add_epi8(A3, A4); - const __m128i A6 = _mm_slli_si128(A5, 4); - const __m128i A7 = _mm_add_epi8(A5, A6); - _mm_storel_epi64((__m128i*)(out + i), A7); - last = _mm_srli_epi64(A7, 56); - } - for (; i < width; ++i) out[i] = in[i] + out[i - 1]; -} - -static void VerticalUnfilter_SSE2(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - if (prev == NULL) { - HorizontalUnfilter_SSE2(NULL, in, out, width); - } else { - int i; - const int max_pos = width & ~31; - assert(width >= 0); - for (i = 0; i < max_pos; i += 32) { - const __m128i A0 = _mm_loadu_si128((const __m128i*)&in[i + 0]); - const __m128i A1 = _mm_loadu_si128((const __m128i*)&in[i + 16]); - const __m128i B0 = _mm_loadu_si128((const __m128i*)&prev[i + 0]); - const __m128i B1 = _mm_loadu_si128((const __m128i*)&prev[i + 16]); - const __m128i C0 = _mm_add_epi8(A0, B0); - const __m128i C1 = _mm_add_epi8(A1, B1); - _mm_storeu_si128((__m128i*)&out[i + 0], C0); - _mm_storeu_si128((__m128i*)&out[i + 16], C1); - } - for (; i < width; ++i) out[i] = in[i] + prev[i]; - } -} - -static void GradientPredictInverse_SSE2(const uint8_t* const in, - const uint8_t* const top, - uint8_t* const row, int length) { - if (length > 0) { - int i; - const int max_pos = length & ~7; - const __m128i zero = _mm_setzero_si128(); - __m128i A = _mm_set_epi32(0, 0, 0, row[-1]); // left sample - for (i = 0; i < max_pos; i += 8) { - const __m128i tmp0 = _mm_loadl_epi64((const __m128i*)&top[i]); - const __m128i tmp1 = _mm_loadl_epi64((const __m128i*)&top[i - 1]); - const __m128i B = _mm_unpacklo_epi8(tmp0, zero); - const __m128i C = _mm_unpacklo_epi8(tmp1, zero); - const __m128i D = _mm_loadl_epi64((const __m128i*)&in[i]); // base input - const __m128i E = _mm_sub_epi16(B, C); // unclipped gradient basis B - C - __m128i out = zero; // accumulator for output - __m128i mask_hi = _mm_set_epi32(0, 0, 0, 0xff); - int k = 8; - while (1) { - const __m128i tmp3 = _mm_add_epi16(A, E); // delta = A + B - C - const __m128i tmp4 = _mm_packus_epi16(tmp3, zero); // saturate delta - const __m128i tmp5 = _mm_add_epi8(tmp4, D); // add to in[] - A = _mm_and_si128(tmp5, mask_hi); // 1-complement clip - out = _mm_or_si128(out, A); // accumulate output - if (--k == 0) break; - A = _mm_slli_si128(A, 1); // rotate left sample - mask_hi = _mm_slli_si128(mask_hi, 1); // rotate mask - A = _mm_unpacklo_epi8(A, zero); // convert 8b->16b - } - A = _mm_srli_si128(A, 7); // prepare left sample for next iteration - _mm_storel_epi64((__m128i*)&row[i], out); - } - for (; i < length; ++i) { - row[i] = in[i] + GradientPredictor_SSE2(row[i - 1], top[i], top[i - 1]); - } - } -} - -static void GradientUnfilter_SSE2(const uint8_t* prev, const uint8_t* in, - uint8_t* out, int width) { - if (prev == NULL) { - HorizontalUnfilter_SSE2(NULL, in, out, width); - } else { - out[0] = in[0] + prev[0]; // predict from above - GradientPredictInverse_SSE2(in + 1, prev + 1, out + 1, width - 1); - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8FiltersInitSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitSSE2(void) { - WebPUnfilters[WEBP_FILTER_HORIZONTAL] = HorizontalUnfilter_SSE2; - WebPUnfilters[WEBP_FILTER_VERTICAL] = VerticalUnfilter_SSE2; - WebPUnfilters[WEBP_FILTER_GRADIENT] = GradientUnfilter_SSE2; - - WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter_SSE2; - WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter_SSE2; - WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter_SSE2; -} - -#else // !WEBP_USE_SSE2 - -WEBP_DSP_INIT_STUB(VP8FiltersInitSSE2) - -#endif // WEBP_USE_SSE2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless.c deleted file mode 100644 index 5bc7ca5..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless.c +++ /dev/null @@ -1,659 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Image transforms and color space conversion methods for lossless decoder. -// -// Authors: Vikas Arora (vikaas.arora@gmail.com) -// Jyrki Alakuijala (jyrki@google.com) -// Urvang Joshi (urvang@google.com) - -#include "src/dsp/dsp.h" - -#include -#include -#include -#include "src/dec/vp8li_dec.h" -#include "src/utils/endian_inl_utils.h" -#include "src/dsp/lossless.h" -#include "src/dsp/lossless_common.h" - -#define MAX_DIFF_COST (1e30f) - -//------------------------------------------------------------------------------ -// Image transforms. - -static WEBP_INLINE uint32_t Average2(uint32_t a0, uint32_t a1) { - return (((a0 ^ a1) & 0xfefefefeu) >> 1) + (a0 & a1); -} - -static WEBP_INLINE uint32_t Average3(uint32_t a0, uint32_t a1, uint32_t a2) { - return Average2(Average2(a0, a2), a1); -} - -static WEBP_INLINE uint32_t Average4(uint32_t a0, uint32_t a1, - uint32_t a2, uint32_t a3) { - return Average2(Average2(a0, a1), Average2(a2, a3)); -} - -static WEBP_INLINE uint32_t Clip255(uint32_t a) { - if (a < 256) { - return a; - } - // return 0, when a is a negative integer. - // return 255, when a is positive. - return ~a >> 24; -} - -static WEBP_INLINE int AddSubtractComponentFull(int a, int b, int c) { - return Clip255(a + b - c); -} - -static WEBP_INLINE uint32_t ClampedAddSubtractFull(uint32_t c0, uint32_t c1, - uint32_t c2) { - const int a = AddSubtractComponentFull(c0 >> 24, c1 >> 24, c2 >> 24); - const int r = AddSubtractComponentFull((c0 >> 16) & 0xff, - (c1 >> 16) & 0xff, - (c2 >> 16) & 0xff); - const int g = AddSubtractComponentFull((c0 >> 8) & 0xff, - (c1 >> 8) & 0xff, - (c2 >> 8) & 0xff); - const int b = AddSubtractComponentFull(c0 & 0xff, c1 & 0xff, c2 & 0xff); - return ((uint32_t)a << 24) | (r << 16) | (g << 8) | b; -} - -static WEBP_INLINE int AddSubtractComponentHalf(int a, int b) { - return Clip255(a + (a - b) / 2); -} - -static WEBP_INLINE uint32_t ClampedAddSubtractHalf(uint32_t c0, uint32_t c1, - uint32_t c2) { - const uint32_t ave = Average2(c0, c1); - const int a = AddSubtractComponentHalf(ave >> 24, c2 >> 24); - const int r = AddSubtractComponentHalf((ave >> 16) & 0xff, (c2 >> 16) & 0xff); - const int g = AddSubtractComponentHalf((ave >> 8) & 0xff, (c2 >> 8) & 0xff); - const int b = AddSubtractComponentHalf((ave >> 0) & 0xff, (c2 >> 0) & 0xff); - return ((uint32_t)a << 24) | (r << 16) | (g << 8) | b; -} - -// gcc <= 4.9 on ARM generates incorrect code in Select() when Sub3() is -// inlined. -#if defined(__arm__) && LOCAL_GCC_VERSION <= 0x409 -# define LOCAL_INLINE __attribute__ ((noinline)) -#else -# define LOCAL_INLINE WEBP_INLINE -#endif - -static LOCAL_INLINE int Sub3(int a, int b, int c) { - const int pb = b - c; - const int pa = a - c; - return abs(pb) - abs(pa); -} - -#undef LOCAL_INLINE - -static WEBP_INLINE uint32_t Select(uint32_t a, uint32_t b, uint32_t c) { - const int pa_minus_pb = - Sub3((a >> 24) , (b >> 24) , (c >> 24) ) + - Sub3((a >> 16) & 0xff, (b >> 16) & 0xff, (c >> 16) & 0xff) + - Sub3((a >> 8) & 0xff, (b >> 8) & 0xff, (c >> 8) & 0xff) + - Sub3((a ) & 0xff, (b ) & 0xff, (c ) & 0xff); - return (pa_minus_pb <= 0) ? a : b; -} - -//------------------------------------------------------------------------------ -// Predictors - -static uint32_t Predictor0_C(uint32_t left, const uint32_t* const top) { - (void)top; - (void)left; - return ARGB_BLACK; -} -static uint32_t Predictor1_C(uint32_t left, const uint32_t* const top) { - (void)top; - return left; -} -static uint32_t Predictor2_C(uint32_t left, const uint32_t* const top) { - (void)left; - return top[0]; -} -static uint32_t Predictor3_C(uint32_t left, const uint32_t* const top) { - (void)left; - return top[1]; -} -static uint32_t Predictor4_C(uint32_t left, const uint32_t* const top) { - (void)left; - return top[-1]; -} -static uint32_t Predictor5_C(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average3(left, top[0], top[1]); - return pred; -} -static uint32_t Predictor6_C(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2(left, top[-1]); - return pred; -} -static uint32_t Predictor7_C(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2(left, top[0]); - return pred; -} -static uint32_t Predictor8_C(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2(top[-1], top[0]); - (void)left; - return pred; -} -static uint32_t Predictor9_C(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2(top[0], top[1]); - (void)left; - return pred; -} -static uint32_t Predictor10_C(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average4(left, top[-1], top[0], top[1]); - return pred; -} -static uint32_t Predictor11_C(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Select(top[0], left, top[-1]); - return pred; -} -static uint32_t Predictor12_C(uint32_t left, const uint32_t* const top) { - const uint32_t pred = ClampedAddSubtractFull(left, top[0], top[-1]); - return pred; -} -static uint32_t Predictor13_C(uint32_t left, const uint32_t* const top) { - const uint32_t pred = ClampedAddSubtractHalf(left, top[0], top[-1]); - return pred; -} - -GENERATE_PREDICTOR_ADD(Predictor0_C, PredictorAdd0_C) -static void PredictorAdd1_C(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - uint32_t left = out[-1]; - for (i = 0; i < num_pixels; ++i) { - out[i] = left = VP8LAddPixels(in[i], left); - } - (void)upper; -} -GENERATE_PREDICTOR_ADD(Predictor2_C, PredictorAdd2_C) -GENERATE_PREDICTOR_ADD(Predictor3_C, PredictorAdd3_C) -GENERATE_PREDICTOR_ADD(Predictor4_C, PredictorAdd4_C) -GENERATE_PREDICTOR_ADD(Predictor5_C, PredictorAdd5_C) -GENERATE_PREDICTOR_ADD(Predictor6_C, PredictorAdd6_C) -GENERATE_PREDICTOR_ADD(Predictor7_C, PredictorAdd7_C) -GENERATE_PREDICTOR_ADD(Predictor8_C, PredictorAdd8_C) -GENERATE_PREDICTOR_ADD(Predictor9_C, PredictorAdd9_C) -GENERATE_PREDICTOR_ADD(Predictor10_C, PredictorAdd10_C) -GENERATE_PREDICTOR_ADD(Predictor11_C, PredictorAdd11_C) -GENERATE_PREDICTOR_ADD(Predictor12_C, PredictorAdd12_C) -GENERATE_PREDICTOR_ADD(Predictor13_C, PredictorAdd13_C) - -//------------------------------------------------------------------------------ - -// Inverse prediction. -static void PredictorInverseTransform_C(const VP8LTransform* const transform, - int y_start, int y_end, - const uint32_t* in, uint32_t* out) { - const int width = transform->xsize_; - if (y_start == 0) { // First Row follows the L (mode=1) mode. - PredictorAdd0_C(in, NULL, 1, out); - PredictorAdd1_C(in + 1, NULL, width - 1, out + 1); - in += width; - out += width; - ++y_start; - } - - { - int y = y_start; - const int tile_width = 1 << transform->bits_; - const int mask = tile_width - 1; - const int tiles_per_row = VP8LSubSampleSize(width, transform->bits_); - const uint32_t* pred_mode_base = - transform->data_ + (y >> transform->bits_) * tiles_per_row; - - while (y < y_end) { - const uint32_t* pred_mode_src = pred_mode_base; - int x = 1; - // First pixel follows the T (mode=2) mode. - PredictorAdd2_C(in, out - width, 1, out); - // .. the rest: - while (x < width) { - const VP8LPredictorAddSubFunc pred_func = - VP8LPredictorsAdd[((*pred_mode_src++) >> 8) & 0xf]; - int x_end = (x & ~mask) + tile_width; - if (x_end > width) x_end = width; - pred_func(in + x, out + x - width, x_end - x, out + x); - x = x_end; - } - in += width; - out += width; - ++y; - if ((y & mask) == 0) { // Use the same mask, since tiles are squares. - pred_mode_base += tiles_per_row; - } - } - } -} - -// Add green to blue and red channels (i.e. perform the inverse transform of -// 'subtract green'). -void VP8LAddGreenToBlueAndRed_C(const uint32_t* src, int num_pixels, - uint32_t* dst) { - int i; - for (i = 0; i < num_pixels; ++i) { - const uint32_t argb = src[i]; - const uint32_t green = ((argb >> 8) & 0xff); - uint32_t red_blue = (argb & 0x00ff00ffu); - red_blue += (green << 16) | green; - red_blue &= 0x00ff00ffu; - dst[i] = (argb & 0xff00ff00u) | red_blue; - } -} - -static WEBP_INLINE int ColorTransformDelta(int8_t color_pred, - int8_t color) { - return ((int)color_pred * color) >> 5; -} - -static WEBP_INLINE void ColorCodeToMultipliers(uint32_t color_code, - VP8LMultipliers* const m) { - m->green_to_red_ = (color_code >> 0) & 0xff; - m->green_to_blue_ = (color_code >> 8) & 0xff; - m->red_to_blue_ = (color_code >> 16) & 0xff; -} - -void VP8LTransformColorInverse_C(const VP8LMultipliers* const m, - const uint32_t* src, int num_pixels, - uint32_t* dst) { - int i; - for (i = 0; i < num_pixels; ++i) { - const uint32_t argb = src[i]; - const uint32_t green = argb >> 8; - const uint32_t red = argb >> 16; - int new_red = red & 0xff; - int new_blue = argb & 0xff; - new_red += ColorTransformDelta(m->green_to_red_, green); - new_red &= 0xff; - new_blue += ColorTransformDelta(m->green_to_blue_, green); - new_blue += ColorTransformDelta(m->red_to_blue_, new_red); - new_blue &= 0xff; - dst[i] = (argb & 0xff00ff00u) | (new_red << 16) | (new_blue); - } -} - -// Color space inverse transform. -static void ColorSpaceInverseTransform_C(const VP8LTransform* const transform, - int y_start, int y_end, - const uint32_t* src, uint32_t* dst) { - const int width = transform->xsize_; - const int tile_width = 1 << transform->bits_; - const int mask = tile_width - 1; - const int safe_width = width & ~mask; - const int remaining_width = width - safe_width; - const int tiles_per_row = VP8LSubSampleSize(width, transform->bits_); - int y = y_start; - const uint32_t* pred_row = - transform->data_ + (y >> transform->bits_) * tiles_per_row; - - while (y < y_end) { - const uint32_t* pred = pred_row; - VP8LMultipliers m = { 0, 0, 0 }; - const uint32_t* const src_safe_end = src + safe_width; - const uint32_t* const src_end = src + width; - while (src < src_safe_end) { - ColorCodeToMultipliers(*pred++, &m); - VP8LTransformColorInverse(&m, src, tile_width, dst); - src += tile_width; - dst += tile_width; - } - if (src < src_end) { // Left-overs using C-version. - ColorCodeToMultipliers(*pred++, &m); - VP8LTransformColorInverse(&m, src, remaining_width, dst); - src += remaining_width; - dst += remaining_width; - } - ++y; - if ((y & mask) == 0) pred_row += tiles_per_row; - } -} - -// Separate out pixels packed together using pixel-bundling. -// We define two methods for ARGB data (uint32_t) and alpha-only data (uint8_t). -#define COLOR_INDEX_INVERSE(FUNC_NAME, F_NAME, STATIC_DECL, TYPE, BIT_SUFFIX, \ - GET_INDEX, GET_VALUE) \ -static void F_NAME(const TYPE* src, const uint32_t* const color_map, \ - TYPE* dst, int y_start, int y_end, int width) { \ - int y; \ - for (y = y_start; y < y_end; ++y) { \ - int x; \ - for (x = 0; x < width; ++x) { \ - *dst++ = GET_VALUE(color_map[GET_INDEX(*src++)]); \ - } \ - } \ -} \ -STATIC_DECL void FUNC_NAME(const VP8LTransform* const transform, \ - int y_start, int y_end, const TYPE* src, \ - TYPE* dst) { \ - int y; \ - const int bits_per_pixel = 8 >> transform->bits_; \ - const int width = transform->xsize_; \ - const uint32_t* const color_map = transform->data_; \ - if (bits_per_pixel < 8) { \ - const int pixels_per_byte = 1 << transform->bits_; \ - const int count_mask = pixels_per_byte - 1; \ - const uint32_t bit_mask = (1 << bits_per_pixel) - 1; \ - for (y = y_start; y < y_end; ++y) { \ - uint32_t packed_pixels = 0; \ - int x; \ - for (x = 0; x < width; ++x) { \ - /* We need to load fresh 'packed_pixels' once every */ \ - /* 'pixels_per_byte' increments of x. Fortunately, pixels_per_byte */ \ - /* is a power of 2, so can just use a mask for that, instead of */ \ - /* decrementing a counter. */ \ - if ((x & count_mask) == 0) packed_pixels = GET_INDEX(*src++); \ - *dst++ = GET_VALUE(color_map[packed_pixels & bit_mask]); \ - packed_pixels >>= bits_per_pixel; \ - } \ - } \ - } else { \ - VP8LMapColor##BIT_SUFFIX(src, color_map, dst, y_start, y_end, width); \ - } \ -} - -COLOR_INDEX_INVERSE(ColorIndexInverseTransform_C, MapARGB_C, static, - uint32_t, 32b, VP8GetARGBIndex, VP8GetARGBValue) -COLOR_INDEX_INVERSE(VP8LColorIndexInverseTransformAlpha, MapAlpha_C, , - uint8_t, 8b, VP8GetAlphaIndex, VP8GetAlphaValue) - -#undef COLOR_INDEX_INVERSE - -void VP8LInverseTransform(const VP8LTransform* const transform, - int row_start, int row_end, - const uint32_t* const in, uint32_t* const out) { - const int width = transform->xsize_; - assert(row_start < row_end); - assert(row_end <= transform->ysize_); - switch (transform->type_) { - case SUBTRACT_GREEN: - VP8LAddGreenToBlueAndRed(in, (row_end - row_start) * width, out); - break; - case PREDICTOR_TRANSFORM: - PredictorInverseTransform_C(transform, row_start, row_end, in, out); - if (row_end != transform->ysize_) { - // The last predicted row in this iteration will be the top-pred row - // for the first row in next iteration. - memcpy(out - width, out + (row_end - row_start - 1) * width, - width * sizeof(*out)); - } - break; - case CROSS_COLOR_TRANSFORM: - ColorSpaceInverseTransform_C(transform, row_start, row_end, in, out); - break; - case COLOR_INDEXING_TRANSFORM: - if (in == out && transform->bits_ > 0) { - // Move packed pixels to the end of unpacked region, so that unpacking - // can occur seamlessly. - // Also, note that this is the only transform that applies on - // the effective width of VP8LSubSampleSize(xsize_, bits_). All other - // transforms work on effective width of xsize_. - const int out_stride = (row_end - row_start) * width; - const int in_stride = (row_end - row_start) * - VP8LSubSampleSize(transform->xsize_, transform->bits_); - uint32_t* const src = out + out_stride - in_stride; - memmove(src, out, in_stride * sizeof(*src)); - ColorIndexInverseTransform_C(transform, row_start, row_end, src, out); - } else { - ColorIndexInverseTransform_C(transform, row_start, row_end, in, out); - } - break; - } -} - -//------------------------------------------------------------------------------ -// Color space conversion. - -static int is_big_endian(void) { - static const union { - uint16_t w; - uint8_t b[2]; - } tmp = { 1 }; - return (tmp.b[0] != 1); -} - -void VP8LConvertBGRAToRGB_C(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint32_t* const src_end = src + num_pixels; - while (src < src_end) { - const uint32_t argb = *src++; - *dst++ = (argb >> 16) & 0xff; - *dst++ = (argb >> 8) & 0xff; - *dst++ = (argb >> 0) & 0xff; - } -} - -void VP8LConvertBGRAToRGBA_C(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint32_t* const src_end = src + num_pixels; - while (src < src_end) { - const uint32_t argb = *src++; - *dst++ = (argb >> 16) & 0xff; - *dst++ = (argb >> 8) & 0xff; - *dst++ = (argb >> 0) & 0xff; - *dst++ = (argb >> 24) & 0xff; - } -} - -void VP8LConvertBGRAToRGBA4444_C(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint32_t* const src_end = src + num_pixels; - while (src < src_end) { - const uint32_t argb = *src++; - const uint8_t rg = ((argb >> 16) & 0xf0) | ((argb >> 12) & 0xf); - const uint8_t ba = ((argb >> 0) & 0xf0) | ((argb >> 28) & 0xf); -#if (WEBP_SWAP_16BIT_CSP == 1) - *dst++ = ba; - *dst++ = rg; -#else - *dst++ = rg; - *dst++ = ba; -#endif - } -} - -void VP8LConvertBGRAToRGB565_C(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint32_t* const src_end = src + num_pixels; - while (src < src_end) { - const uint32_t argb = *src++; - const uint8_t rg = ((argb >> 16) & 0xf8) | ((argb >> 13) & 0x7); - const uint8_t gb = ((argb >> 5) & 0xe0) | ((argb >> 3) & 0x1f); -#if (WEBP_SWAP_16BIT_CSP == 1) - *dst++ = gb; - *dst++ = rg; -#else - *dst++ = rg; - *dst++ = gb; -#endif - } -} - -void VP8LConvertBGRAToBGR_C(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint32_t* const src_end = src + num_pixels; - while (src < src_end) { - const uint32_t argb = *src++; - *dst++ = (argb >> 0) & 0xff; - *dst++ = (argb >> 8) & 0xff; - *dst++ = (argb >> 16) & 0xff; - } -} - -static void CopyOrSwap(const uint32_t* src, int num_pixels, uint8_t* dst, - int swap_on_big_endian) { - if (is_big_endian() == swap_on_big_endian) { - const uint32_t* const src_end = src + num_pixels; - while (src < src_end) { - const uint32_t argb = *src++; - WebPUint32ToMem(dst, BSwap32(argb)); - dst += sizeof(argb); - } - } else { - memcpy(dst, src, num_pixels * sizeof(*src)); - } -} - -void VP8LConvertFromBGRA(const uint32_t* const in_data, int num_pixels, - WEBP_CSP_MODE out_colorspace, uint8_t* const rgba) { - switch (out_colorspace) { - case MODE_RGB: - VP8LConvertBGRAToRGB(in_data, num_pixels, rgba); - break; - case MODE_RGBA: - VP8LConvertBGRAToRGBA(in_data, num_pixels, rgba); - break; - case MODE_rgbA: - VP8LConvertBGRAToRGBA(in_data, num_pixels, rgba); - WebPApplyAlphaMultiply(rgba, 0, num_pixels, 1, 0); - break; - case MODE_BGR: - VP8LConvertBGRAToBGR(in_data, num_pixels, rgba); - break; - case MODE_BGRA: - CopyOrSwap(in_data, num_pixels, rgba, 1); - break; - case MODE_bgrA: - CopyOrSwap(in_data, num_pixels, rgba, 1); - WebPApplyAlphaMultiply(rgba, 0, num_pixels, 1, 0); - break; - case MODE_ARGB: - CopyOrSwap(in_data, num_pixels, rgba, 0); - break; - case MODE_Argb: - CopyOrSwap(in_data, num_pixels, rgba, 0); - WebPApplyAlphaMultiply(rgba, 1, num_pixels, 1, 0); - break; - case MODE_RGBA_4444: - VP8LConvertBGRAToRGBA4444(in_data, num_pixels, rgba); - break; - case MODE_rgbA_4444: - VP8LConvertBGRAToRGBA4444(in_data, num_pixels, rgba); - WebPApplyAlphaMultiply4444(rgba, num_pixels, 1, 0); - break; - case MODE_RGB_565: - VP8LConvertBGRAToRGB565(in_data, num_pixels, rgba); - break; - default: - assert(0); // Code flow should not reach here. - } -} - -//------------------------------------------------------------------------------ - -VP8LProcessDecBlueAndRedFunc VP8LAddGreenToBlueAndRed; -VP8LPredictorAddSubFunc VP8LPredictorsAdd[16]; -VP8LPredictorFunc VP8LPredictors[16]; - -// exposed plain-C implementations -VP8LPredictorAddSubFunc VP8LPredictorsAdd_C[16]; -VP8LPredictorFunc VP8LPredictors_C[16]; - -VP8LTransformColorInverseFunc VP8LTransformColorInverse; - -VP8LConvertFunc VP8LConvertBGRAToRGB; -VP8LConvertFunc VP8LConvertBGRAToRGBA; -VP8LConvertFunc VP8LConvertBGRAToRGBA4444; -VP8LConvertFunc VP8LConvertBGRAToRGB565; -VP8LConvertFunc VP8LConvertBGRAToBGR; - -VP8LMapARGBFunc VP8LMapColor32b; -VP8LMapAlphaFunc VP8LMapColor8b; - -extern void VP8LDspInitSSE2(void); -extern void VP8LDspInitNEON(void); -extern void VP8LDspInitMIPSdspR2(void); -extern void VP8LDspInitMSA(void); - -#define COPY_PREDICTOR_ARRAY(IN, OUT) do { \ - (OUT)[0] = IN##0_C; \ - (OUT)[1] = IN##1_C; \ - (OUT)[2] = IN##2_C; \ - (OUT)[3] = IN##3_C; \ - (OUT)[4] = IN##4_C; \ - (OUT)[5] = IN##5_C; \ - (OUT)[6] = IN##6_C; \ - (OUT)[7] = IN##7_C; \ - (OUT)[8] = IN##8_C; \ - (OUT)[9] = IN##9_C; \ - (OUT)[10] = IN##10_C; \ - (OUT)[11] = IN##11_C; \ - (OUT)[12] = IN##12_C; \ - (OUT)[13] = IN##13_C; \ - (OUT)[14] = IN##0_C; /* <- padding security sentinels*/ \ - (OUT)[15] = IN##0_C; \ -} while (0); - -WEBP_DSP_INIT_FUNC(VP8LDspInit) { - COPY_PREDICTOR_ARRAY(Predictor, VP8LPredictors) - COPY_PREDICTOR_ARRAY(Predictor, VP8LPredictors_C) - COPY_PREDICTOR_ARRAY(PredictorAdd, VP8LPredictorsAdd) - COPY_PREDICTOR_ARRAY(PredictorAdd, VP8LPredictorsAdd_C) - -#if !WEBP_NEON_OMIT_C_CODE - VP8LAddGreenToBlueAndRed = VP8LAddGreenToBlueAndRed_C; - - VP8LTransformColorInverse = VP8LTransformColorInverse_C; - - VP8LConvertBGRAToRGBA = VP8LConvertBGRAToRGBA_C; - VP8LConvertBGRAToRGB = VP8LConvertBGRAToRGB_C; - VP8LConvertBGRAToBGR = VP8LConvertBGRAToBGR_C; -#endif - - VP8LConvertBGRAToRGBA4444 = VP8LConvertBGRAToRGBA4444_C; - VP8LConvertBGRAToRGB565 = VP8LConvertBGRAToRGB565_C; - - VP8LMapColor32b = MapARGB_C; - VP8LMapColor8b = MapAlpha_C; - - // If defined, use CPUInfo() to overwrite some pointers with faster versions. - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - VP8LDspInitSSE2(); - } -#endif -#if defined(WEBP_USE_MIPS_DSP_R2) - if (VP8GetCPUInfo(kMIPSdspR2)) { - VP8LDspInitMIPSdspR2(); - } -#endif -#if defined(WEBP_USE_MSA) - if (VP8GetCPUInfo(kMSA)) { - VP8LDspInitMSA(); - } -#endif - } - -#if defined(WEBP_USE_NEON) - if (WEBP_NEON_OMIT_C_CODE || - (VP8GetCPUInfo != NULL && VP8GetCPUInfo(kNEON))) { - VP8LDspInitNEON(); - } -#endif - - assert(VP8LAddGreenToBlueAndRed != NULL); - assert(VP8LTransformColorInverse != NULL); - assert(VP8LConvertBGRAToRGBA != NULL); - assert(VP8LConvertBGRAToRGB != NULL); - assert(VP8LConvertBGRAToBGR != NULL); - assert(VP8LConvertBGRAToRGBA4444 != NULL); - assert(VP8LConvertBGRAToRGB565 != NULL); - assert(VP8LMapColor32b != NULL); - assert(VP8LMapColor8b != NULL); -} -#undef COPY_PREDICTOR_ARRAY - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless.h b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless.h deleted file mode 100644 index a900404..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless.h +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Image transforms and color space conversion methods for lossless decoder. -// -// Authors: Vikas Arora (vikaas.arora@gmail.com) -// Jyrki Alakuijala (jyrki@google.com) - -#ifndef WEBP_DSP_LOSSLESS_H_ -#define WEBP_DSP_LOSSLESS_H_ - -#include "src/webp/types.h" -#include "src/webp/decode.h" - -#include "src/enc/histogram_enc.h" -#include "src/utils/utils.h" - -#ifdef __cplusplus -extern "C" { -#endif - -//------------------------------------------------------------------------------ -// Decoding - -typedef uint32_t (*VP8LPredictorFunc)(uint32_t left, const uint32_t* const top); -extern VP8LPredictorFunc VP8LPredictors[16]; -extern VP8LPredictorFunc VP8LPredictors_C[16]; -// These Add/Sub function expects upper[-1] and out[-1] to be readable. -typedef void (*VP8LPredictorAddSubFunc)(const uint32_t* in, - const uint32_t* upper, int num_pixels, - uint32_t* out); -extern VP8LPredictorAddSubFunc VP8LPredictorsAdd[16]; -extern VP8LPredictorAddSubFunc VP8LPredictorsAdd_C[16]; - -typedef void (*VP8LProcessDecBlueAndRedFunc)(const uint32_t* src, - int num_pixels, uint32_t* dst); -extern VP8LProcessDecBlueAndRedFunc VP8LAddGreenToBlueAndRed; - -typedef struct { - // Note: the members are uint8_t, so that any negative values are - // automatically converted to "mod 256" values. - uint8_t green_to_red_; - uint8_t green_to_blue_; - uint8_t red_to_blue_; -} VP8LMultipliers; -typedef void (*VP8LTransformColorInverseFunc)(const VP8LMultipliers* const m, - const uint32_t* src, - int num_pixels, uint32_t* dst); -extern VP8LTransformColorInverseFunc VP8LTransformColorInverse; - -struct VP8LTransform; // Defined in dec/vp8li.h. - -// Performs inverse transform of data given transform information, start and end -// rows. Transform will be applied to rows [row_start, row_end[. -// The *in and *out pointers refer to source and destination data respectively -// corresponding to the intermediate row (row_start). -void VP8LInverseTransform(const struct VP8LTransform* const transform, - int row_start, int row_end, - const uint32_t* const in, uint32_t* const out); - -// Color space conversion. -typedef void (*VP8LConvertFunc)(const uint32_t* src, int num_pixels, - uint8_t* dst); -extern VP8LConvertFunc VP8LConvertBGRAToRGB; -extern VP8LConvertFunc VP8LConvertBGRAToRGBA; -extern VP8LConvertFunc VP8LConvertBGRAToRGBA4444; -extern VP8LConvertFunc VP8LConvertBGRAToRGB565; -extern VP8LConvertFunc VP8LConvertBGRAToBGR; - -// Converts from BGRA to other color spaces. -void VP8LConvertFromBGRA(const uint32_t* const in_data, int num_pixels, - WEBP_CSP_MODE out_colorspace, uint8_t* const rgba); - -typedef void (*VP8LMapARGBFunc)(const uint32_t* src, - const uint32_t* const color_map, - uint32_t* dst, int y_start, - int y_end, int width); -typedef void (*VP8LMapAlphaFunc)(const uint8_t* src, - const uint32_t* const color_map, - uint8_t* dst, int y_start, - int y_end, int width); - -extern VP8LMapARGBFunc VP8LMapColor32b; -extern VP8LMapAlphaFunc VP8LMapColor8b; - -// Similar to the static method ColorIndexInverseTransform() that is part of -// lossless.c, but used only for alpha decoding. It takes uint8_t (rather than -// uint32_t) arguments for 'src' and 'dst'. -void VP8LColorIndexInverseTransformAlpha( - const struct VP8LTransform* const transform, int y_start, int y_end, - const uint8_t* src, uint8_t* dst); - -// Expose some C-only fallback functions -void VP8LTransformColorInverse_C(const VP8LMultipliers* const m, - const uint32_t* src, int num_pixels, - uint32_t* dst); - -void VP8LConvertBGRAToRGB_C(const uint32_t* src, int num_pixels, uint8_t* dst); -void VP8LConvertBGRAToRGBA_C(const uint32_t* src, int num_pixels, uint8_t* dst); -void VP8LConvertBGRAToRGBA4444_C(const uint32_t* src, - int num_pixels, uint8_t* dst); -void VP8LConvertBGRAToRGB565_C(const uint32_t* src, - int num_pixels, uint8_t* dst); -void VP8LConvertBGRAToBGR_C(const uint32_t* src, int num_pixels, uint8_t* dst); -void VP8LAddGreenToBlueAndRed_C(const uint32_t* src, int num_pixels, - uint32_t* dst); - -// Must be called before calling any of the above methods. -void VP8LDspInit(void); - -//------------------------------------------------------------------------------ -// Encoding - -typedef void (*VP8LProcessEncBlueAndRedFunc)(uint32_t* dst, int num_pixels); -extern VP8LProcessEncBlueAndRedFunc VP8LSubtractGreenFromBlueAndRed; -typedef void (*VP8LTransformColorFunc)(const VP8LMultipliers* const m, - uint32_t* dst, int num_pixels); -extern VP8LTransformColorFunc VP8LTransformColor; -typedef void (*VP8LCollectColorBlueTransformsFunc)( - const uint32_t* argb, int stride, - int tile_width, int tile_height, - int green_to_blue, int red_to_blue, int histo[]); -extern VP8LCollectColorBlueTransformsFunc VP8LCollectColorBlueTransforms; - -typedef void (*VP8LCollectColorRedTransformsFunc)( - const uint32_t* argb, int stride, - int tile_width, int tile_height, - int green_to_red, int histo[]); -extern VP8LCollectColorRedTransformsFunc VP8LCollectColorRedTransforms; - -// Expose some C-only fallback functions -void VP8LTransformColor_C(const VP8LMultipliers* const m, - uint32_t* data, int num_pixels); -void VP8LSubtractGreenFromBlueAndRed_C(uint32_t* argb_data, int num_pixels); -void VP8LCollectColorRedTransforms_C(const uint32_t* argb, int stride, - int tile_width, int tile_height, - int green_to_red, int histo[]); -void VP8LCollectColorBlueTransforms_C(const uint32_t* argb, int stride, - int tile_width, int tile_height, - int green_to_blue, int red_to_blue, - int histo[]); - -extern VP8LPredictorAddSubFunc VP8LPredictorsSub[16]; -extern VP8LPredictorAddSubFunc VP8LPredictorsSub_C[16]; - -// ----------------------------------------------------------------------------- -// Huffman-cost related functions. - -typedef double (*VP8LCostFunc)(const uint32_t* population, int length); -typedef double (*VP8LCostCombinedFunc)(const uint32_t* X, const uint32_t* Y, - int length); -typedef float (*VP8LCombinedShannonEntropyFunc)(const int X[256], - const int Y[256]); - -extern VP8LCostFunc VP8LExtraCost; -extern VP8LCostCombinedFunc VP8LExtraCostCombined; -extern VP8LCombinedShannonEntropyFunc VP8LCombinedShannonEntropy; - -typedef struct { // small struct to hold counters - int counts[2]; // index: 0=zero steak, 1=non-zero streak - int streaks[2][2]; // [zero/non-zero][streak<3 / streak>=3] -} VP8LStreaks; - -typedef struct { // small struct to hold bit entropy results - double entropy; // entropy - uint32_t sum; // sum of the population - int nonzeros; // number of non-zero elements in the population - uint32_t max_val; // maximum value in the population - uint32_t nonzero_code; // index of the last non-zero in the population -} VP8LBitEntropy; - -void VP8LBitEntropyInit(VP8LBitEntropy* const entropy); - -// Get the combined symbol bit entropy and Huffman cost stats for the -// distributions 'X' and 'Y'. Those results can then be refined according to -// codec specific heuristics. -typedef void (*VP8LGetCombinedEntropyUnrefinedFunc)( - const uint32_t X[], const uint32_t Y[], int length, - VP8LBitEntropy* const bit_entropy, VP8LStreaks* const stats); -extern VP8LGetCombinedEntropyUnrefinedFunc VP8LGetCombinedEntropyUnrefined; - -// Get the entropy for the distribution 'X'. -typedef void (*VP8LGetEntropyUnrefinedFunc)(const uint32_t X[], int length, - VP8LBitEntropy* const bit_entropy, - VP8LStreaks* const stats); -extern VP8LGetEntropyUnrefinedFunc VP8LGetEntropyUnrefined; - -void VP8LBitsEntropyUnrefined(const uint32_t* const array, int n, - VP8LBitEntropy* const entropy); - -typedef void (*VP8LHistogramAddFunc)(const VP8LHistogram* const a, - const VP8LHistogram* const b, - VP8LHistogram* const out); -extern VP8LHistogramAddFunc VP8LHistogramAdd; - -// ----------------------------------------------------------------------------- -// PrefixEncode() - -typedef int (*VP8LVectorMismatchFunc)(const uint32_t* const array1, - const uint32_t* const array2, int length); -// Returns the first index where array1 and array2 are different. -extern VP8LVectorMismatchFunc VP8LVectorMismatch; - -typedef void (*VP8LBundleColorMapFunc)(const uint8_t* const row, int width, - int xbits, uint32_t* dst); -extern VP8LBundleColorMapFunc VP8LBundleColorMap; -void VP8LBundleColorMap_C(const uint8_t* const row, int width, int xbits, - uint32_t* dst); - -// Must be called before calling any of the above methods. -void VP8LEncDspInit(void); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // WEBP_DSP_LOSSLESS_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_common.h b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_common.h deleted file mode 100644 index 32117b2..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_common.h +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Image transforms and color space conversion methods for lossless decoder. -// -// Authors: Vikas Arora (vikaas.arora@gmail.com) -// Jyrki Alakuijala (jyrki@google.com) -// Vincent Rabaud (vrabaud@google.com) - -#ifndef WEBP_DSP_LOSSLESS_COMMON_H_ -#define WEBP_DSP_LOSSLESS_COMMON_H_ - -#include "src/webp/types.h" - -#include "src/utils/utils.h" - -#ifdef __cplusplus -extern "C" { -#endif - -//------------------------------------------------------------------------------ -// Decoding - -// color mapping related functions. -static WEBP_INLINE uint32_t VP8GetARGBIndex(uint32_t idx) { - return (idx >> 8) & 0xff; -} - -static WEBP_INLINE uint8_t VP8GetAlphaIndex(uint8_t idx) { - return idx; -} - -static WEBP_INLINE uint32_t VP8GetARGBValue(uint32_t val) { - return val; -} - -static WEBP_INLINE uint8_t VP8GetAlphaValue(uint32_t val) { - return (val >> 8) & 0xff; -} - -//------------------------------------------------------------------------------ -// Misc methods. - -// Computes sampled size of 'size' when sampling using 'sampling bits'. -static WEBP_INLINE uint32_t VP8LSubSampleSize(uint32_t size, - uint32_t sampling_bits) { - return (size + (1 << sampling_bits) - 1) >> sampling_bits; -} - -// Converts near lossless quality into max number of bits shaved off. -static WEBP_INLINE int VP8LNearLosslessBits(int near_lossless_quality) { - // 100 -> 0 - // 80..99 -> 1 - // 60..79 -> 2 - // 40..59 -> 3 - // 20..39 -> 4 - // 0..19 -> 5 - return 5 - near_lossless_quality / 20; -} - -// ----------------------------------------------------------------------------- -// Faster logarithm for integers. Small values use a look-up table. - -// The threshold till approximate version of log_2 can be used. -// Practically, we can get rid of the call to log() as the two values match to -// very high degree (the ratio of these two is 0.99999x). -// Keeping a high threshold for now. -#define APPROX_LOG_WITH_CORRECTION_MAX 65536 -#define APPROX_LOG_MAX 4096 -#define LOG_2_RECIPROCAL 1.44269504088896338700465094007086 -#define LOG_LOOKUP_IDX_MAX 256 -extern const float kLog2Table[LOG_LOOKUP_IDX_MAX]; -extern const float kSLog2Table[LOG_LOOKUP_IDX_MAX]; -typedef float (*VP8LFastLog2SlowFunc)(uint32_t v); - -extern VP8LFastLog2SlowFunc VP8LFastLog2Slow; -extern VP8LFastLog2SlowFunc VP8LFastSLog2Slow; - -static WEBP_INLINE float VP8LFastLog2(uint32_t v) { - return (v < LOG_LOOKUP_IDX_MAX) ? kLog2Table[v] : VP8LFastLog2Slow(v); -} -// Fast calculation of v * log2(v) for integer input. -static WEBP_INLINE float VP8LFastSLog2(uint32_t v) { - return (v < LOG_LOOKUP_IDX_MAX) ? kSLog2Table[v] : VP8LFastSLog2Slow(v); -} - -// ----------------------------------------------------------------------------- -// PrefixEncode() - -// Splitting of distance and length codes into prefixes and -// extra bits. The prefixes are encoded with an entropy code -// while the extra bits are stored just as normal bits. -static WEBP_INLINE void VP8LPrefixEncodeBitsNoLUT(int distance, int* const code, - int* const extra_bits) { - const int highest_bit = BitsLog2Floor(--distance); - const int second_highest_bit = (distance >> (highest_bit - 1)) & 1; - *extra_bits = highest_bit - 1; - *code = 2 * highest_bit + second_highest_bit; -} - -static WEBP_INLINE void VP8LPrefixEncodeNoLUT(int distance, int* const code, - int* const extra_bits, - int* const extra_bits_value) { - const int highest_bit = BitsLog2Floor(--distance); - const int second_highest_bit = (distance >> (highest_bit - 1)) & 1; - *extra_bits = highest_bit - 1; - *extra_bits_value = distance & ((1 << *extra_bits) - 1); - *code = 2 * highest_bit + second_highest_bit; -} - -#define PREFIX_LOOKUP_IDX_MAX 512 -typedef struct { - int8_t code_; - int8_t extra_bits_; -} VP8LPrefixCode; - -// These tables are derived using VP8LPrefixEncodeNoLUT. -extern const VP8LPrefixCode kPrefixEncodeCode[PREFIX_LOOKUP_IDX_MAX]; -extern const uint8_t kPrefixEncodeExtraBitsValue[PREFIX_LOOKUP_IDX_MAX]; -static WEBP_INLINE void VP8LPrefixEncodeBits(int distance, int* const code, - int* const extra_bits) { - if (distance < PREFIX_LOOKUP_IDX_MAX) { - const VP8LPrefixCode prefix_code = kPrefixEncodeCode[distance]; - *code = prefix_code.code_; - *extra_bits = prefix_code.extra_bits_; - } else { - VP8LPrefixEncodeBitsNoLUT(distance, code, extra_bits); - } -} - -static WEBP_INLINE void VP8LPrefixEncode(int distance, int* const code, - int* const extra_bits, - int* const extra_bits_value) { - if (distance < PREFIX_LOOKUP_IDX_MAX) { - const VP8LPrefixCode prefix_code = kPrefixEncodeCode[distance]; - *code = prefix_code.code_; - *extra_bits = prefix_code.extra_bits_; - *extra_bits_value = kPrefixEncodeExtraBitsValue[distance]; - } else { - VP8LPrefixEncodeNoLUT(distance, code, extra_bits, extra_bits_value); - } -} - -// Sum of each component, mod 256. -static WEBP_UBSAN_IGNORE_UNSIGNED_OVERFLOW WEBP_INLINE -uint32_t VP8LAddPixels(uint32_t a, uint32_t b) { - const uint32_t alpha_and_green = (a & 0xff00ff00u) + (b & 0xff00ff00u); - const uint32_t red_and_blue = (a & 0x00ff00ffu) + (b & 0x00ff00ffu); - return (alpha_and_green & 0xff00ff00u) | (red_and_blue & 0x00ff00ffu); -} - -// Difference of each component, mod 256. -static WEBP_UBSAN_IGNORE_UNSIGNED_OVERFLOW WEBP_INLINE -uint32_t VP8LSubPixels(uint32_t a, uint32_t b) { - const uint32_t alpha_and_green = - 0x00ff00ffu + (a & 0xff00ff00u) - (b & 0xff00ff00u); - const uint32_t red_and_blue = - 0xff00ff00u + (a & 0x00ff00ffu) - (b & 0x00ff00ffu); - return (alpha_and_green & 0xff00ff00u) | (red_and_blue & 0x00ff00ffu); -} - -//------------------------------------------------------------------------------ -// Transform-related functions use din both encoding and decoding. - -// Macros used to create a batch predictor that iteratively uses a -// one-pixel predictor. - -// The predictor is added to the output pixel (which -// is therefore considered as a residual) to get the final prediction. -#define GENERATE_PREDICTOR_ADD(PREDICTOR, PREDICTOR_ADD) \ -static void PREDICTOR_ADD(const uint32_t* in, const uint32_t* upper, \ - int num_pixels, uint32_t* out) { \ - int x; \ - for (x = 0; x < num_pixels; ++x) { \ - const uint32_t pred = (PREDICTOR)(out[x - 1], upper + x); \ - out[x] = VP8LAddPixels(in[x], pred); \ - } \ -} - -// It subtracts the prediction from the input pixel and stores the residual -// in the output pixel. -#define GENERATE_PREDICTOR_SUB(PREDICTOR, PREDICTOR_SUB) \ -static void PREDICTOR_SUB(const uint32_t* in, const uint32_t* upper, \ - int num_pixels, uint32_t* out) { \ - int x; \ - for (x = 0; x < num_pixels; ++x) { \ - const uint32_t pred = (PREDICTOR)(in[x - 1], upper + x); \ - out[x] = VP8LSubPixels(in[x], pred); \ - } \ -} - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // WEBP_DSP_LOSSLESS_COMMON_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc.c deleted file mode 100644 index 617d529..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc.c +++ /dev/null @@ -1,1011 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Image transform methods for lossless encoder. -// -// Authors: Vikas Arora (vikaas.arora@gmail.com) -// Jyrki Alakuijala (jyrki@google.com) -// Urvang Joshi (urvang@google.com) - -#include "src/dsp/dsp.h" - -#include -#include -#include -#include "src/dec/vp8li_dec.h" -#include "src/utils/endian_inl_utils.h" -#include "src/dsp/lossless.h" -#include "src/dsp/lossless_common.h" -#include "src/dsp/yuv.h" - -// lookup table for small values of log2(int) -const float kLog2Table[LOG_LOOKUP_IDX_MAX] = { - 0.0000000000000000f, 0.0000000000000000f, - 1.0000000000000000f, 1.5849625007211560f, - 2.0000000000000000f, 2.3219280948873621f, - 2.5849625007211560f, 2.8073549220576041f, - 3.0000000000000000f, 3.1699250014423121f, - 3.3219280948873621f, 3.4594316186372973f, - 3.5849625007211560f, 3.7004397181410921f, - 3.8073549220576041f, 3.9068905956085187f, - 4.0000000000000000f, 4.0874628412503390f, - 4.1699250014423121f, 4.2479275134435852f, - 4.3219280948873626f, 4.3923174227787606f, - 4.4594316186372973f, 4.5235619560570130f, - 4.5849625007211560f, 4.6438561897747243f, - 4.7004397181410917f, 4.7548875021634682f, - 4.8073549220576037f, 4.8579809951275718f, - 4.9068905956085187f, 4.9541963103868749f, - 5.0000000000000000f, 5.0443941193584533f, - 5.0874628412503390f, 5.1292830169449663f, - 5.1699250014423121f, 5.2094533656289501f, - 5.2479275134435852f, 5.2854022188622487f, - 5.3219280948873626f, 5.3575520046180837f, - 5.3923174227787606f, 5.4262647547020979f, - 5.4594316186372973f, 5.4918530963296747f, - 5.5235619560570130f, 5.5545888516776376f, - 5.5849625007211560f, 5.6147098441152083f, - 5.6438561897747243f, 5.6724253419714951f, - 5.7004397181410917f, 5.7279204545631987f, - 5.7548875021634682f, 5.7813597135246599f, - 5.8073549220576037f, 5.8328900141647412f, - 5.8579809951275718f, 5.8826430493618415f, - 5.9068905956085187f, 5.9307373375628866f, - 5.9541963103868749f, 5.9772799234999167f, - 6.0000000000000000f, 6.0223678130284543f, - 6.0443941193584533f, 6.0660891904577720f, - 6.0874628412503390f, 6.1085244567781691f, - 6.1292830169449663f, 6.1497471195046822f, - 6.1699250014423121f, 6.1898245588800175f, - 6.2094533656289501f, 6.2288186904958804f, - 6.2479275134435852f, 6.2667865406949010f, - 6.2854022188622487f, 6.3037807481771030f, - 6.3219280948873626f, 6.3398500028846243f, - 6.3575520046180837f, 6.3750394313469245f, - 6.3923174227787606f, 6.4093909361377017f, - 6.4262647547020979f, 6.4429434958487279f, - 6.4594316186372973f, 6.4757334309663976f, - 6.4918530963296747f, 6.5077946401986963f, - 6.5235619560570130f, 6.5391588111080309f, - 6.5545888516776376f, 6.5698556083309478f, - 6.5849625007211560f, 6.5999128421871278f, - 6.6147098441152083f, 6.6293566200796094f, - 6.6438561897747243f, 6.6582114827517946f, - 6.6724253419714951f, 6.6865005271832185f, - 6.7004397181410917f, 6.7142455176661224f, - 6.7279204545631987f, 6.7414669864011464f, - 6.7548875021634682f, 6.7681843247769259f, - 6.7813597135246599f, 6.7944158663501061f, - 6.8073549220576037f, 6.8201789624151878f, - 6.8328900141647412f, 6.8454900509443747f, - 6.8579809951275718f, 6.8703647195834047f, - 6.8826430493618415f, 6.8948177633079437f, - 6.9068905956085187f, 6.9188632372745946f, - 6.9307373375628866f, 6.9425145053392398f, - 6.9541963103868749f, 6.9657842846620869f, - 6.9772799234999167f, 6.9886846867721654f, - 7.0000000000000000f, 7.0112272554232539f, - 7.0223678130284543f, 7.0334230015374501f, - 7.0443941193584533f, 7.0552824355011898f, - 7.0660891904577720f, 7.0768155970508308f, - 7.0874628412503390f, 7.0980320829605263f, - 7.1085244567781691f, 7.1189410727235076f, - 7.1292830169449663f, 7.1395513523987936f, - 7.1497471195046822f, 7.1598713367783890f, - 7.1699250014423121f, 7.1799090900149344f, - 7.1898245588800175f, 7.1996723448363644f, - 7.2094533656289501f, 7.2191685204621611f, - 7.2288186904958804f, 7.2384047393250785f, - 7.2479275134435852f, 7.2573878426926521f, - 7.2667865406949010f, 7.2761244052742375f, - 7.2854022188622487f, 7.2946207488916270f, - 7.3037807481771030f, 7.3128829552843557f, - 7.3219280948873626f, 7.3309168781146167f, - 7.3398500028846243f, 7.3487281542310771f, - 7.3575520046180837f, 7.3663222142458160f, - 7.3750394313469245f, 7.3837042924740519f, - 7.3923174227787606f, 7.4008794362821843f, - 7.4093909361377017f, 7.4178525148858982f, - 7.4262647547020979f, 7.4346282276367245f, - 7.4429434958487279f, 7.4512111118323289f, - 7.4594316186372973f, 7.4676055500829976f, - 7.4757334309663976f, 7.4838157772642563f, - 7.4918530963296747f, 7.4998458870832056f, - 7.5077946401986963f, 7.5156998382840427f, - 7.5235619560570130f, 7.5313814605163118f, - 7.5391588111080309f, 7.5468944598876364f, - 7.5545888516776376f, 7.5622424242210728f, - 7.5698556083309478f, 7.5774288280357486f, - 7.5849625007211560f, 7.5924570372680806f, - 7.5999128421871278f, 7.6073303137496104f, - 7.6147098441152083f, 7.6220518194563764f, - 7.6293566200796094f, 7.6366246205436487f, - 7.6438561897747243f, 7.6510516911789281f, - 7.6582114827517946f, 7.6653359171851764f, - 7.6724253419714951f, 7.6794800995054464f, - 7.6865005271832185f, 7.6934869574993252f, - 7.7004397181410917f, 7.7073591320808825f, - 7.7142455176661224f, 7.7210991887071855f, - 7.7279204545631987f, 7.7347096202258383f, - 7.7414669864011464f, 7.7481928495894605f, - 7.7548875021634682f, 7.7615512324444795f, - 7.7681843247769259f, 7.7747870596011736f, - 7.7813597135246599f, 7.7879025593914317f, - 7.7944158663501061f, 7.8008998999203047f, - 7.8073549220576037f, 7.8137811912170374f, - 7.8201789624151878f, 7.8265484872909150f, - 7.8328900141647412f, 7.8392037880969436f, - 7.8454900509443747f, 7.8517490414160571f, - 7.8579809951275718f, 7.8641861446542797f, - 7.8703647195834047f, 7.8765169465649993f, - 7.8826430493618415f, 7.8887432488982591f, - 7.8948177633079437f, 7.9008668079807486f, - 7.9068905956085187f, 7.9128893362299619f, - 7.9188632372745946f, 7.9248125036057812f, - 7.9307373375628866f, 7.9366379390025709f, - 7.9425145053392398f, 7.9483672315846778f, - 7.9541963103868749f, 7.9600019320680805f, - 7.9657842846620869f, 7.9715435539507719f, - 7.9772799234999167f, 7.9829935746943103f, - 7.9886846867721654f, 7.9943534368588577f -}; - -const float kSLog2Table[LOG_LOOKUP_IDX_MAX] = { - 0.00000000f, 0.00000000f, 2.00000000f, 4.75488750f, - 8.00000000f, 11.60964047f, 15.50977500f, 19.65148445f, - 24.00000000f, 28.52932501f, 33.21928095f, 38.05374781f, - 43.01955001f, 48.10571634f, 53.30296891f, 58.60335893f, - 64.00000000f, 69.48686830f, 75.05865003f, 80.71062276f, - 86.43856190f, 92.23866588f, 98.10749561f, 104.04192499f, - 110.03910002f, 116.09640474f, 122.21143267f, 128.38196256f, - 134.60593782f, 140.88144886f, 147.20671787f, 153.58008562f, - 160.00000000f, 166.46500594f, 172.97373660f, 179.52490559f, - 186.11730005f, 192.74977453f, 199.42124551f, 206.13068654f, - 212.87712380f, 219.65963219f, 226.47733176f, 233.32938445f, - 240.21499122f, 247.13338933f, 254.08384998f, 261.06567603f, - 268.07820003f, 275.12078236f, 282.19280949f, 289.29369244f, - 296.42286534f, 303.57978409f, 310.76392512f, 317.97478424f, - 325.21187564f, 332.47473081f, 339.76289772f, 347.07593991f, - 354.41343574f, 361.77497759f, 369.16017124f, 376.56863518f, - 384.00000000f, 391.45390785f, 398.93001188f, 406.42797576f, - 413.94747321f, 421.48818752f, 429.04981119f, 436.63204548f, - 444.23460010f, 451.85719280f, 459.49954906f, 467.16140179f, - 474.84249102f, 482.54256363f, 490.26137307f, 497.99867911f, - 505.75424759f, 513.52785023f, 521.31926438f, 529.12827280f, - 536.95466351f, 544.79822957f, 552.65876890f, 560.53608414f, - 568.42998244f, 576.34027536f, 584.26677867f, 592.20931226f, - 600.16769996f, 608.14176943f, 616.13135206f, 624.13628279f, - 632.15640007f, 640.19154569f, 648.24156472f, 656.30630539f, - 664.38561898f, 672.47935976f, 680.58738488f, 688.70955430f, - 696.84573069f, 704.99577935f, 713.15956818f, 721.33696754f, - 729.52785023f, 737.73209140f, 745.94956849f, 754.18016116f, - 762.42375127f, 770.68022275f, 778.94946161f, 787.23135586f, - 795.52579543f, 803.83267219f, 812.15187982f, 820.48331383f, - 828.82687147f, 837.18245171f, 845.54995518f, 853.92928416f, - 862.32034249f, 870.72303558f, 879.13727036f, 887.56295522f, - 896.00000000f, 904.44831595f, 912.90781569f, 921.37841320f, - 929.86002376f, 938.35256392f, 946.85595152f, 955.37010560f, - 963.89494641f, 972.43039537f, 980.97637504f, 989.53280911f, - 998.09962237f, 1006.67674069f, 1015.26409097f, 1023.86160116f, - 1032.46920021f, 1041.08681805f, 1049.71438560f, 1058.35183469f, - 1066.99909811f, 1075.65610955f, 1084.32280357f, 1092.99911564f, - 1101.68498204f, 1110.38033993f, 1119.08512727f, 1127.79928282f, - 1136.52274614f, 1145.25545758f, 1153.99735821f, 1162.74838989f, - 1171.50849518f, 1180.27761738f, 1189.05570047f, 1197.84268914f, - 1206.63852876f, 1215.44316535f, 1224.25654560f, 1233.07861684f, - 1241.90932703f, 1250.74862473f, 1259.59645914f, 1268.45278005f, - 1277.31753781f, 1286.19068338f, 1295.07216828f, 1303.96194457f, - 1312.85996488f, 1321.76618236f, 1330.68055071f, 1339.60302413f, - 1348.53355734f, 1357.47210556f, 1366.41862452f, 1375.37307041f, - 1384.33539991f, 1393.30557020f, 1402.28353887f, 1411.26926400f, - 1420.26270412f, 1429.26381818f, 1438.27256558f, 1447.28890615f, - 1456.31280014f, 1465.34420819f, 1474.38309138f, 1483.42941118f, - 1492.48312945f, 1501.54420843f, 1510.61261078f, 1519.68829949f, - 1528.77123795f, 1537.86138993f, 1546.95871952f, 1556.06319119f, - 1565.17476976f, 1574.29342040f, 1583.41910860f, 1592.55180020f, - 1601.69146137f, 1610.83805860f, 1619.99155871f, 1629.15192882f, - 1638.31913637f, 1647.49314911f, 1656.67393509f, 1665.86146266f, - 1675.05570047f, 1684.25661744f, 1693.46418280f, 1702.67836605f, - 1711.89913698f, 1721.12646563f, 1730.36032233f, 1739.60067768f, - 1748.84750254f, 1758.10076802f, 1767.36044551f, 1776.62650662f, - 1785.89892323f, 1795.17766747f, 1804.46271172f, 1813.75402857f, - 1823.05159087f, 1832.35537170f, 1841.66534438f, 1850.98148244f, - 1860.30375965f, 1869.63214999f, 1878.96662767f, 1888.30716711f, - 1897.65374295f, 1907.00633003f, 1916.36490342f, 1925.72943838f, - 1935.09991037f, 1944.47629506f, 1953.85856831f, 1963.24670620f, - 1972.64068498f, 1982.04048108f, 1991.44607117f, 2000.85743204f, - 2010.27454072f, 2019.69737440f, 2029.12591044f, 2038.56012640f -}; - -const VP8LPrefixCode kPrefixEncodeCode[PREFIX_LOOKUP_IDX_MAX] = { - { 0, 0}, { 0, 0}, { 1, 0}, { 2, 0}, { 3, 0}, { 4, 1}, { 4, 1}, { 5, 1}, - { 5, 1}, { 6, 2}, { 6, 2}, { 6, 2}, { 6, 2}, { 7, 2}, { 7, 2}, { 7, 2}, - { 7, 2}, { 8, 3}, { 8, 3}, { 8, 3}, { 8, 3}, { 8, 3}, { 8, 3}, { 8, 3}, - { 8, 3}, { 9, 3}, { 9, 3}, { 9, 3}, { 9, 3}, { 9, 3}, { 9, 3}, { 9, 3}, - { 9, 3}, {10, 4}, {10, 4}, {10, 4}, {10, 4}, {10, 4}, {10, 4}, {10, 4}, - {10, 4}, {10, 4}, {10, 4}, {10, 4}, {10, 4}, {10, 4}, {10, 4}, {10, 4}, - {10, 4}, {11, 4}, {11, 4}, {11, 4}, {11, 4}, {11, 4}, {11, 4}, {11, 4}, - {11, 4}, {11, 4}, {11, 4}, {11, 4}, {11, 4}, {11, 4}, {11, 4}, {11, 4}, - {11, 4}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, - {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, - {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, - {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, - {12, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, - {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, - {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, - {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, {13, 5}, - {13, 5}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, - {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, - {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, - {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, - {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, - {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, - {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, - {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, {14, 6}, - {14, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, - {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, - {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, - {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, - {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, - {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, - {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, - {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, {15, 6}, - {15, 6}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, {16, 7}, - {16, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, -}; - -const uint8_t kPrefixEncodeExtraBitsValue[PREFIX_LOOKUP_IDX_MAX] = { - 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, - 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126 -}; - -static float FastSLog2Slow_C(uint32_t v) { - assert(v >= LOG_LOOKUP_IDX_MAX); - if (v < APPROX_LOG_WITH_CORRECTION_MAX) { - int log_cnt = 0; - uint32_t y = 1; - int correction = 0; - const float v_f = (float)v; - const uint32_t orig_v = v; - do { - ++log_cnt; - v = v >> 1; - y = y << 1; - } while (v >= LOG_LOOKUP_IDX_MAX); - // vf = (2^log_cnt) * Xf; where y = 2^log_cnt and Xf < 256 - // Xf = floor(Xf) * (1 + (v % y) / v) - // log2(Xf) = log2(floor(Xf)) + log2(1 + (v % y) / v) - // The correction factor: log(1 + d) ~ d; for very small d values, so - // log2(1 + (v % y) / v) ~ LOG_2_RECIPROCAL * (v % y)/v - // LOG_2_RECIPROCAL ~ 23/16 - correction = (23 * (orig_v & (y - 1))) >> 4; - return v_f * (kLog2Table[v] + log_cnt) + correction; - } else { - return (float)(LOG_2_RECIPROCAL * v * log((double)v)); - } -} - -static float FastLog2Slow_C(uint32_t v) { - assert(v >= LOG_LOOKUP_IDX_MAX); - if (v < APPROX_LOG_WITH_CORRECTION_MAX) { - int log_cnt = 0; - uint32_t y = 1; - const uint32_t orig_v = v; - double log_2; - do { - ++log_cnt; - v = v >> 1; - y = y << 1; - } while (v >= LOG_LOOKUP_IDX_MAX); - log_2 = kLog2Table[v] + log_cnt; - if (orig_v >= APPROX_LOG_MAX) { - // Since the division is still expensive, add this correction factor only - // for large values of 'v'. - const int correction = (23 * (orig_v & (y - 1))) >> 4; - log_2 += (double)correction / orig_v; - } - return (float)log_2; - } else { - return (float)(LOG_2_RECIPROCAL * log((double)v)); - } -} - -//------------------------------------------------------------------------------ -// Methods to calculate Entropy (Shannon). - -// Compute the combined Shanon's entropy for distribution {X} and {X+Y} -static float CombinedShannonEntropy_C(const int X[256], const int Y[256]) { - int i; - double retval = 0.; - int sumX = 0, sumXY = 0; - for (i = 0; i < 256; ++i) { - const int x = X[i]; - if (x != 0) { - const int xy = x + Y[i]; - sumX += x; - retval -= VP8LFastSLog2(x); - sumXY += xy; - retval -= VP8LFastSLog2(xy); - } else if (Y[i] != 0) { - sumXY += Y[i]; - retval -= VP8LFastSLog2(Y[i]); - } - } - retval += VP8LFastSLog2(sumX) + VP8LFastSLog2(sumXY); - return (float)retval; -} - -void VP8LBitEntropyInit(VP8LBitEntropy* const entropy) { - entropy->entropy = 0.; - entropy->sum = 0; - entropy->nonzeros = 0; - entropy->max_val = 0; - entropy->nonzero_code = VP8L_NON_TRIVIAL_SYM; -} - -void VP8LBitsEntropyUnrefined(const uint32_t* const array, int n, - VP8LBitEntropy* const entropy) { - int i; - - VP8LBitEntropyInit(entropy); - - for (i = 0; i < n; ++i) { - if (array[i] != 0) { - entropy->sum += array[i]; - entropy->nonzero_code = i; - ++entropy->nonzeros; - entropy->entropy -= VP8LFastSLog2(array[i]); - if (entropy->max_val < array[i]) { - entropy->max_val = array[i]; - } - } - } - entropy->entropy += VP8LFastSLog2(entropy->sum); -} - -static WEBP_INLINE void GetEntropyUnrefinedHelper( - uint32_t val, int i, uint32_t* const val_prev, int* const i_prev, - VP8LBitEntropy* const bit_entropy, VP8LStreaks* const stats) { - const int streak = i - *i_prev; - - // Gather info for the bit entropy. - if (*val_prev != 0) { - bit_entropy->sum += (*val_prev) * streak; - bit_entropy->nonzeros += streak; - bit_entropy->nonzero_code = *i_prev; - bit_entropy->entropy -= VP8LFastSLog2(*val_prev) * streak; - if (bit_entropy->max_val < *val_prev) { - bit_entropy->max_val = *val_prev; - } - } - - // Gather info for the Huffman cost. - stats->counts[*val_prev != 0] += (streak > 3); - stats->streaks[*val_prev != 0][(streak > 3)] += streak; - - *val_prev = val; - *i_prev = i; -} - -static void GetEntropyUnrefined_C(const uint32_t X[], int length, - VP8LBitEntropy* const bit_entropy, - VP8LStreaks* const stats) { - int i; - int i_prev = 0; - uint32_t x_prev = X[0]; - - memset(stats, 0, sizeof(*stats)); - VP8LBitEntropyInit(bit_entropy); - - for (i = 1; i < length; ++i) { - const uint32_t x = X[i]; - if (x != x_prev) { - GetEntropyUnrefinedHelper(x, i, &x_prev, &i_prev, bit_entropy, stats); - } - } - GetEntropyUnrefinedHelper(0, i, &x_prev, &i_prev, bit_entropy, stats); - - bit_entropy->entropy += VP8LFastSLog2(bit_entropy->sum); -} - -static void GetCombinedEntropyUnrefined_C(const uint32_t X[], - const uint32_t Y[], - int length, - VP8LBitEntropy* const bit_entropy, - VP8LStreaks* const stats) { - int i = 1; - int i_prev = 0; - uint32_t xy_prev = X[0] + Y[0]; - - memset(stats, 0, sizeof(*stats)); - VP8LBitEntropyInit(bit_entropy); - - for (i = 1; i < length; ++i) { - const uint32_t xy = X[i] + Y[i]; - if (xy != xy_prev) { - GetEntropyUnrefinedHelper(xy, i, &xy_prev, &i_prev, bit_entropy, stats); - } - } - GetEntropyUnrefinedHelper(0, i, &xy_prev, &i_prev, bit_entropy, stats); - - bit_entropy->entropy += VP8LFastSLog2(bit_entropy->sum); -} - -//------------------------------------------------------------------------------ - -void VP8LSubtractGreenFromBlueAndRed_C(uint32_t* argb_data, int num_pixels) { - int i; - for (i = 0; i < num_pixels; ++i) { - const int argb = argb_data[i]; - const int green = (argb >> 8) & 0xff; - const uint32_t new_r = (((argb >> 16) & 0xff) - green) & 0xff; - const uint32_t new_b = (((argb >> 0) & 0xff) - green) & 0xff; - argb_data[i] = (argb & 0xff00ff00u) | (new_r << 16) | new_b; - } -} - -static WEBP_INLINE int ColorTransformDelta(int8_t color_pred, int8_t color) { - return ((int)color_pred * color) >> 5; -} - -void VP8LTransformColor_C(const VP8LMultipliers* const m, uint32_t* data, - int num_pixels) { - int i; - for (i = 0; i < num_pixels; ++i) { - const uint32_t argb = data[i]; - const uint32_t green = argb >> 8; - const uint32_t red = argb >> 16; - int new_red = red & 0xff; - int new_blue = argb & 0xff; - new_red -= ColorTransformDelta(m->green_to_red_, green); - new_red &= 0xff; - new_blue -= ColorTransformDelta(m->green_to_blue_, green); - new_blue -= ColorTransformDelta(m->red_to_blue_, red); - new_blue &= 0xff; - data[i] = (argb & 0xff00ff00u) | (new_red << 16) | (new_blue); - } -} - -static WEBP_INLINE uint8_t TransformColorRed(uint8_t green_to_red, - uint32_t argb) { - const uint32_t green = argb >> 8; - int new_red = argb >> 16; - new_red -= ColorTransformDelta(green_to_red, green); - return (new_red & 0xff); -} - -static WEBP_INLINE uint8_t TransformColorBlue(uint8_t green_to_blue, - uint8_t red_to_blue, - uint32_t argb) { - const uint32_t green = argb >> 8; - const uint32_t red = argb >> 16; - uint8_t new_blue = argb; - new_blue -= ColorTransformDelta(green_to_blue, green); - new_blue -= ColorTransformDelta(red_to_blue, red); - return (new_blue & 0xff); -} - -void VP8LCollectColorRedTransforms_C(const uint32_t* argb, int stride, - int tile_width, int tile_height, - int green_to_red, int histo[]) { - while (tile_height-- > 0) { - int x; - for (x = 0; x < tile_width; ++x) { - ++histo[TransformColorRed(green_to_red, argb[x])]; - } - argb += stride; - } -} - -void VP8LCollectColorBlueTransforms_C(const uint32_t* argb, int stride, - int tile_width, int tile_height, - int green_to_blue, int red_to_blue, - int histo[]) { - while (tile_height-- > 0) { - int x; - for (x = 0; x < tile_width; ++x) { - ++histo[TransformColorBlue(green_to_blue, red_to_blue, argb[x])]; - } - argb += stride; - } -} - -//------------------------------------------------------------------------------ - -static int VectorMismatch_C(const uint32_t* const array1, - const uint32_t* const array2, int length) { - int match_len = 0; - - while (match_len < length && array1[match_len] == array2[match_len]) { - ++match_len; - } - return match_len; -} - -// Bundles multiple (1, 2, 4 or 8) pixels into a single pixel. -void VP8LBundleColorMap_C(const uint8_t* const row, int width, int xbits, - uint32_t* dst) { - int x; - if (xbits > 0) { - const int bit_depth = 1 << (3 - xbits); - const int mask = (1 << xbits) - 1; - uint32_t code = 0xff000000; - for (x = 0; x < width; ++x) { - const int xsub = x & mask; - if (xsub == 0) { - code = 0xff000000; - } - code |= row[x] << (8 + bit_depth * xsub); - dst[x >> xbits] = code; - } - } else { - for (x = 0; x < width; ++x) dst[x] = 0xff000000 | (row[x] << 8); - } -} - -//------------------------------------------------------------------------------ - -static double ExtraCost_C(const uint32_t* population, int length) { - int i; - double cost = 0.; - for (i = 2; i < length - 2; ++i) cost += (i >> 1) * population[i + 2]; - return cost; -} - -static double ExtraCostCombined_C(const uint32_t* X, const uint32_t* Y, - int length) { - int i; - double cost = 0.; - for (i = 2; i < length - 2; ++i) { - const int xy = X[i + 2] + Y[i + 2]; - cost += (i >> 1) * xy; - } - return cost; -} - -//------------------------------------------------------------------------------ - -static void HistogramAdd_C(const VP8LHistogram* const a, - const VP8LHistogram* const b, - VP8LHistogram* const out) { - int i; - const int literal_size = VP8LHistogramNumCodes(a->palette_code_bits_); - assert(a->palette_code_bits_ == b->palette_code_bits_); - if (b != out) { - for (i = 0; i < literal_size; ++i) { - out->literal_[i] = a->literal_[i] + b->literal_[i]; - } - for (i = 0; i < NUM_DISTANCE_CODES; ++i) { - out->distance_[i] = a->distance_[i] + b->distance_[i]; - } - for (i = 0; i < NUM_LITERAL_CODES; ++i) { - out->red_[i] = a->red_[i] + b->red_[i]; - out->blue_[i] = a->blue_[i] + b->blue_[i]; - out->alpha_[i] = a->alpha_[i] + b->alpha_[i]; - } - } else { - for (i = 0; i < literal_size; ++i) { - out->literal_[i] += a->literal_[i]; - } - for (i = 0; i < NUM_DISTANCE_CODES; ++i) { - out->distance_[i] += a->distance_[i]; - } - for (i = 0; i < NUM_LITERAL_CODES; ++i) { - out->red_[i] += a->red_[i]; - out->blue_[i] += a->blue_[i]; - out->alpha_[i] += a->alpha_[i]; - } - } -} - -//------------------------------------------------------------------------------ -// Image transforms. - -static WEBP_INLINE uint32_t Average2(uint32_t a0, uint32_t a1) { - return (((a0 ^ a1) & 0xfefefefeu) >> 1) + (a0 & a1); -} - -static WEBP_INLINE uint32_t Average3(uint32_t a0, uint32_t a1, uint32_t a2) { - return Average2(Average2(a0, a2), a1); -} - -static WEBP_INLINE uint32_t Average4(uint32_t a0, uint32_t a1, - uint32_t a2, uint32_t a3) { - return Average2(Average2(a0, a1), Average2(a2, a3)); -} - -static WEBP_INLINE uint32_t Clip255(uint32_t a) { - if (a < 256) { - return a; - } - // return 0, when a is a negative integer. - // return 255, when a is positive. - return ~a >> 24; -} - -static WEBP_INLINE int AddSubtractComponentFull(int a, int b, int c) { - return Clip255(a + b - c); -} - -static WEBP_INLINE uint32_t ClampedAddSubtractFull(uint32_t c0, uint32_t c1, - uint32_t c2) { - const int a = AddSubtractComponentFull(c0 >> 24, c1 >> 24, c2 >> 24); - const int r = AddSubtractComponentFull((c0 >> 16) & 0xff, - (c1 >> 16) & 0xff, - (c2 >> 16) & 0xff); - const int g = AddSubtractComponentFull((c0 >> 8) & 0xff, - (c1 >> 8) & 0xff, - (c2 >> 8) & 0xff); - const int b = AddSubtractComponentFull(c0 & 0xff, c1 & 0xff, c2 & 0xff); - return ((uint32_t)a << 24) | (r << 16) | (g << 8) | b; -} - -static WEBP_INLINE int AddSubtractComponentHalf(int a, int b) { - return Clip255(a + (a - b) / 2); -} - -static WEBP_INLINE uint32_t ClampedAddSubtractHalf(uint32_t c0, uint32_t c1, - uint32_t c2) { - const uint32_t ave = Average2(c0, c1); - const int a = AddSubtractComponentHalf(ave >> 24, c2 >> 24); - const int r = AddSubtractComponentHalf((ave >> 16) & 0xff, (c2 >> 16) & 0xff); - const int g = AddSubtractComponentHalf((ave >> 8) & 0xff, (c2 >> 8) & 0xff); - const int b = AddSubtractComponentHalf((ave >> 0) & 0xff, (c2 >> 0) & 0xff); - return ((uint32_t)a << 24) | (r << 16) | (g << 8) | b; -} - -// gcc-4.9 on ARM generates incorrect code in Select() when Sub3() is inlined. -#if defined(__arm__) && \ - (LOCAL_GCC_VERSION == 0x409 || LOCAL_GCC_VERSION == 0x408) -# define LOCAL_INLINE __attribute__ ((noinline)) -#else -# define LOCAL_INLINE WEBP_INLINE -#endif - -static LOCAL_INLINE int Sub3(int a, int b, int c) { - const int pb = b - c; - const int pa = a - c; - return abs(pb) - abs(pa); -} - -#undef LOCAL_INLINE - -static WEBP_INLINE uint32_t Select(uint32_t a, uint32_t b, uint32_t c) { - const int pa_minus_pb = - Sub3((a >> 24) , (b >> 24) , (c >> 24) ) + - Sub3((a >> 16) & 0xff, (b >> 16) & 0xff, (c >> 16) & 0xff) + - Sub3((a >> 8) & 0xff, (b >> 8) & 0xff, (c >> 8) & 0xff) + - Sub3((a ) & 0xff, (b ) & 0xff, (c ) & 0xff); - return (pa_minus_pb <= 0) ? a : b; -} - -//------------------------------------------------------------------------------ -// Predictors - -static uint32_t Predictor2(uint32_t left, const uint32_t* const top) { - (void)left; - return top[0]; -} -static uint32_t Predictor3(uint32_t left, const uint32_t* const top) { - (void)left; - return top[1]; -} -static uint32_t Predictor4(uint32_t left, const uint32_t* const top) { - (void)left; - return top[-1]; -} -static uint32_t Predictor5(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average3(left, top[0], top[1]); - return pred; -} -static uint32_t Predictor6(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2(left, top[-1]); - return pred; -} -static uint32_t Predictor7(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2(left, top[0]); - return pred; -} -static uint32_t Predictor8(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2(top[-1], top[0]); - (void)left; - return pred; -} -static uint32_t Predictor9(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2(top[0], top[1]); - (void)left; - return pred; -} -static uint32_t Predictor10(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average4(left, top[-1], top[0], top[1]); - return pred; -} -static uint32_t Predictor11(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Select(top[0], left, top[-1]); - return pred; -} -static uint32_t Predictor12(uint32_t left, const uint32_t* const top) { - const uint32_t pred = ClampedAddSubtractFull(left, top[0], top[-1]); - return pred; -} -static uint32_t Predictor13(uint32_t left, const uint32_t* const top) { - const uint32_t pred = ClampedAddSubtractHalf(left, top[0], top[-1]); - return pred; -} - -//------------------------------------------------------------------------------ - -static void PredictorSub0_C(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - for (i = 0; i < num_pixels; ++i) out[i] = VP8LSubPixels(in[i], ARGB_BLACK); - (void)upper; -} - -static void PredictorSub1_C(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - for (i = 0; i < num_pixels; ++i) out[i] = VP8LSubPixels(in[i], in[i - 1]); - (void)upper; -} - -GENERATE_PREDICTOR_SUB(Predictor2, PredictorSub2_C) -GENERATE_PREDICTOR_SUB(Predictor3, PredictorSub3_C) -GENERATE_PREDICTOR_SUB(Predictor4, PredictorSub4_C) -GENERATE_PREDICTOR_SUB(Predictor5, PredictorSub5_C) -GENERATE_PREDICTOR_SUB(Predictor6, PredictorSub6_C) -GENERATE_PREDICTOR_SUB(Predictor7, PredictorSub7_C) -GENERATE_PREDICTOR_SUB(Predictor8, PredictorSub8_C) -GENERATE_PREDICTOR_SUB(Predictor9, PredictorSub9_C) -GENERATE_PREDICTOR_SUB(Predictor10, PredictorSub10_C) -GENERATE_PREDICTOR_SUB(Predictor11, PredictorSub11_C) -GENERATE_PREDICTOR_SUB(Predictor12, PredictorSub12_C) -GENERATE_PREDICTOR_SUB(Predictor13, PredictorSub13_C) - -//------------------------------------------------------------------------------ - -VP8LProcessEncBlueAndRedFunc VP8LSubtractGreenFromBlueAndRed; - -VP8LTransformColorFunc VP8LTransformColor; - -VP8LCollectColorBlueTransformsFunc VP8LCollectColorBlueTransforms; -VP8LCollectColorRedTransformsFunc VP8LCollectColorRedTransforms; - -VP8LFastLog2SlowFunc VP8LFastLog2Slow; -VP8LFastLog2SlowFunc VP8LFastSLog2Slow; - -VP8LCostFunc VP8LExtraCost; -VP8LCostCombinedFunc VP8LExtraCostCombined; -VP8LCombinedShannonEntropyFunc VP8LCombinedShannonEntropy; - -VP8LGetEntropyUnrefinedFunc VP8LGetEntropyUnrefined; -VP8LGetCombinedEntropyUnrefinedFunc VP8LGetCombinedEntropyUnrefined; - -VP8LHistogramAddFunc VP8LHistogramAdd; - -VP8LVectorMismatchFunc VP8LVectorMismatch; -VP8LBundleColorMapFunc VP8LBundleColorMap; - -VP8LPredictorAddSubFunc VP8LPredictorsSub[16]; -VP8LPredictorAddSubFunc VP8LPredictorsSub_C[16]; - -extern void VP8LEncDspInitSSE2(void); -extern void VP8LEncDspInitSSE41(void); -extern void VP8LEncDspInitNEON(void); -extern void VP8LEncDspInitMIPS32(void); -extern void VP8LEncDspInitMIPSdspR2(void); -extern void VP8LEncDspInitMSA(void); - -WEBP_DSP_INIT_FUNC(VP8LEncDspInit) { - VP8LDspInit(); - -#if !WEBP_NEON_OMIT_C_CODE - VP8LSubtractGreenFromBlueAndRed = VP8LSubtractGreenFromBlueAndRed_C; - - VP8LTransformColor = VP8LTransformColor_C; -#endif - - VP8LCollectColorBlueTransforms = VP8LCollectColorBlueTransforms_C; - VP8LCollectColorRedTransforms = VP8LCollectColorRedTransforms_C; - - VP8LFastLog2Slow = FastLog2Slow_C; - VP8LFastSLog2Slow = FastSLog2Slow_C; - - VP8LExtraCost = ExtraCost_C; - VP8LExtraCostCombined = ExtraCostCombined_C; - VP8LCombinedShannonEntropy = CombinedShannonEntropy_C; - - VP8LGetEntropyUnrefined = GetEntropyUnrefined_C; - VP8LGetCombinedEntropyUnrefined = GetCombinedEntropyUnrefined_C; - - VP8LHistogramAdd = HistogramAdd_C; - - VP8LVectorMismatch = VectorMismatch_C; - VP8LBundleColorMap = VP8LBundleColorMap_C; - - VP8LPredictorsSub[0] = PredictorSub0_C; - VP8LPredictorsSub[1] = PredictorSub1_C; - VP8LPredictorsSub[2] = PredictorSub2_C; - VP8LPredictorsSub[3] = PredictorSub3_C; - VP8LPredictorsSub[4] = PredictorSub4_C; - VP8LPredictorsSub[5] = PredictorSub5_C; - VP8LPredictorsSub[6] = PredictorSub6_C; - VP8LPredictorsSub[7] = PredictorSub7_C; - VP8LPredictorsSub[8] = PredictorSub8_C; - VP8LPredictorsSub[9] = PredictorSub9_C; - VP8LPredictorsSub[10] = PredictorSub10_C; - VP8LPredictorsSub[11] = PredictorSub11_C; - VP8LPredictorsSub[12] = PredictorSub12_C; - VP8LPredictorsSub[13] = PredictorSub13_C; - VP8LPredictorsSub[14] = PredictorSub0_C; // <- padding security sentinels - VP8LPredictorsSub[15] = PredictorSub0_C; - - VP8LPredictorsSub_C[0] = PredictorSub0_C; - VP8LPredictorsSub_C[1] = PredictorSub1_C; - VP8LPredictorsSub_C[2] = PredictorSub2_C; - VP8LPredictorsSub_C[3] = PredictorSub3_C; - VP8LPredictorsSub_C[4] = PredictorSub4_C; - VP8LPredictorsSub_C[5] = PredictorSub5_C; - VP8LPredictorsSub_C[6] = PredictorSub6_C; - VP8LPredictorsSub_C[7] = PredictorSub7_C; - VP8LPredictorsSub_C[8] = PredictorSub8_C; - VP8LPredictorsSub_C[9] = PredictorSub9_C; - VP8LPredictorsSub_C[10] = PredictorSub10_C; - VP8LPredictorsSub_C[11] = PredictorSub11_C; - VP8LPredictorsSub_C[12] = PredictorSub12_C; - VP8LPredictorsSub_C[13] = PredictorSub13_C; - VP8LPredictorsSub_C[14] = PredictorSub0_C; // <- padding security sentinels - VP8LPredictorsSub_C[15] = PredictorSub0_C; - - // If defined, use CPUInfo() to overwrite some pointers with faster versions. - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - VP8LEncDspInitSSE2(); -#if defined(WEBP_USE_SSE41) - if (VP8GetCPUInfo(kSSE4_1)) { - VP8LEncDspInitSSE41(); - } -#endif - } -#endif -#if defined(WEBP_USE_MIPS32) - if (VP8GetCPUInfo(kMIPS32)) { - VP8LEncDspInitMIPS32(); - } -#endif -#if defined(WEBP_USE_MIPS_DSP_R2) - if (VP8GetCPUInfo(kMIPSdspR2)) { - VP8LEncDspInitMIPSdspR2(); - } -#endif -#if defined(WEBP_USE_MSA) - if (VP8GetCPUInfo(kMSA)) { - VP8LEncDspInitMSA(); - } -#endif - } - -#if defined(WEBP_USE_NEON) - if (WEBP_NEON_OMIT_C_CODE || - (VP8GetCPUInfo != NULL && VP8GetCPUInfo(kNEON))) { - VP8LEncDspInitNEON(); - } -#endif - - assert(VP8LSubtractGreenFromBlueAndRed != NULL); - assert(VP8LTransformColor != NULL); - assert(VP8LCollectColorBlueTransforms != NULL); - assert(VP8LCollectColorRedTransforms != NULL); - assert(VP8LFastLog2Slow != NULL); - assert(VP8LFastSLog2Slow != NULL); - assert(VP8LExtraCost != NULL); - assert(VP8LExtraCostCombined != NULL); - assert(VP8LCombinedShannonEntropy != NULL); - assert(VP8LGetEntropyUnrefined != NULL); - assert(VP8LGetCombinedEntropyUnrefined != NULL); - assert(VP8LHistogramAdd != NULL); - assert(VP8LVectorMismatch != NULL); - assert(VP8LBundleColorMap != NULL); - assert(VP8LPredictorsSub[0] != NULL); - assert(VP8LPredictorsSub[1] != NULL); - assert(VP8LPredictorsSub[2] != NULL); - assert(VP8LPredictorsSub[3] != NULL); - assert(VP8LPredictorsSub[4] != NULL); - assert(VP8LPredictorsSub[5] != NULL); - assert(VP8LPredictorsSub[6] != NULL); - assert(VP8LPredictorsSub[7] != NULL); - assert(VP8LPredictorsSub[8] != NULL); - assert(VP8LPredictorsSub[9] != NULL); - assert(VP8LPredictorsSub[10] != NULL); - assert(VP8LPredictorsSub[11] != NULL); - assert(VP8LPredictorsSub[12] != NULL); - assert(VP8LPredictorsSub[13] != NULL); - assert(VP8LPredictorsSub[14] != NULL); - assert(VP8LPredictorsSub[15] != NULL); - assert(VP8LPredictorsSub_C[0] != NULL); - assert(VP8LPredictorsSub_C[1] != NULL); - assert(VP8LPredictorsSub_C[2] != NULL); - assert(VP8LPredictorsSub_C[3] != NULL); - assert(VP8LPredictorsSub_C[4] != NULL); - assert(VP8LPredictorsSub_C[5] != NULL); - assert(VP8LPredictorsSub_C[6] != NULL); - assert(VP8LPredictorsSub_C[7] != NULL); - assert(VP8LPredictorsSub_C[8] != NULL); - assert(VP8LPredictorsSub_C[9] != NULL); - assert(VP8LPredictorsSub_C[10] != NULL); - assert(VP8LPredictorsSub_C[11] != NULL); - assert(VP8LPredictorsSub_C[12] != NULL); - assert(VP8LPredictorsSub_C[13] != NULL); - assert(VP8LPredictorsSub_C[14] != NULL); - assert(VP8LPredictorsSub_C[15] != NULL); -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_mips32.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_mips32.c deleted file mode 100644 index ca7a13c..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_mips32.c +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MIPS version of lossless functions -// -// Author(s): Djordje Pesut (djordje.pesut@imgtec.com) -// Jovan Zelincevic (jovan.zelincevic@imgtec.com) - -#include "src/dsp/dsp.h" -#include "src/dsp/lossless.h" -#include "src/dsp/lossless_common.h" - -#if defined(WEBP_USE_MIPS32) - -#include -#include -#include -#include - -static float FastSLog2Slow_MIPS32(uint32_t v) { - assert(v >= LOG_LOOKUP_IDX_MAX); - if (v < APPROX_LOG_WITH_CORRECTION_MAX) { - uint32_t log_cnt, y, correction; - const int c24 = 24; - const float v_f = (float)v; - uint32_t temp; - - // Xf = 256 = 2^8 - // log_cnt is index of leading one in upper 24 bits - __asm__ volatile( - "clz %[log_cnt], %[v] \n\t" - "addiu %[y], $zero, 1 \n\t" - "subu %[log_cnt], %[c24], %[log_cnt] \n\t" - "sllv %[y], %[y], %[log_cnt] \n\t" - "srlv %[temp], %[v], %[log_cnt] \n\t" - : [log_cnt]"=&r"(log_cnt), [y]"=&r"(y), - [temp]"=r"(temp) - : [c24]"r"(c24), [v]"r"(v) - ); - - // vf = (2^log_cnt) * Xf; where y = 2^log_cnt and Xf < 256 - // Xf = floor(Xf) * (1 + (v % y) / v) - // log2(Xf) = log2(floor(Xf)) + log2(1 + (v % y) / v) - // The correction factor: log(1 + d) ~ d; for very small d values, so - // log2(1 + (v % y) / v) ~ LOG_2_RECIPROCAL * (v % y)/v - // LOG_2_RECIPROCAL ~ 23/16 - - // (v % y) = (v % 2^log_cnt) = v & (2^log_cnt - 1) - correction = (23 * (v & (y - 1))) >> 4; - return v_f * (kLog2Table[temp] + log_cnt) + correction; - } else { - return (float)(LOG_2_RECIPROCAL * v * log((double)v)); - } -} - -static float FastLog2Slow_MIPS32(uint32_t v) { - assert(v >= LOG_LOOKUP_IDX_MAX); - if (v < APPROX_LOG_WITH_CORRECTION_MAX) { - uint32_t log_cnt, y; - const int c24 = 24; - double log_2; - uint32_t temp; - - __asm__ volatile( - "clz %[log_cnt], %[v] \n\t" - "addiu %[y], $zero, 1 \n\t" - "subu %[log_cnt], %[c24], %[log_cnt] \n\t" - "sllv %[y], %[y], %[log_cnt] \n\t" - "srlv %[temp], %[v], %[log_cnt] \n\t" - : [log_cnt]"=&r"(log_cnt), [y]"=&r"(y), - [temp]"=r"(temp) - : [c24]"r"(c24), [v]"r"(v) - ); - - log_2 = kLog2Table[temp] + log_cnt; - if (v >= APPROX_LOG_MAX) { - // Since the division is still expensive, add this correction factor only - // for large values of 'v'. - - const uint32_t correction = (23 * (v & (y - 1))) >> 4; - log_2 += (double)correction / v; - } - return (float)log_2; - } else { - return (float)(LOG_2_RECIPROCAL * log((double)v)); - } -} - -// C version of this function: -// int i = 0; -// int64_t cost = 0; -// const uint32_t* pop = &population[4]; -// const uint32_t* LoopEnd = &population[length]; -// while (pop != LoopEnd) { -// ++i; -// cost += i * *pop; -// cost += i * *(pop + 1); -// pop += 2; -// } -// return (double)cost; -static double ExtraCost_MIPS32(const uint32_t* const population, int length) { - int i, temp0, temp1; - const uint32_t* pop = &population[4]; - const uint32_t* const LoopEnd = &population[length]; - - __asm__ volatile( - "mult $zero, $zero \n\t" - "xor %[i], %[i], %[i] \n\t" - "beq %[pop], %[LoopEnd], 2f \n\t" - "1: \n\t" - "lw %[temp0], 0(%[pop]) \n\t" - "lw %[temp1], 4(%[pop]) \n\t" - "addiu %[i], %[i], 1 \n\t" - "addiu %[pop], %[pop], 8 \n\t" - "madd %[i], %[temp0] \n\t" - "madd %[i], %[temp1] \n\t" - "bne %[pop], %[LoopEnd], 1b \n\t" - "2: \n\t" - "mfhi %[temp0] \n\t" - "mflo %[temp1] \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), - [i]"=&r"(i), [pop]"+r"(pop) - : [LoopEnd]"r"(LoopEnd) - : "memory", "hi", "lo" - ); - - return (double)((int64_t)temp0 << 32 | temp1); -} - -// C version of this function: -// int i = 0; -// int64_t cost = 0; -// const uint32_t* pX = &X[4]; -// const uint32_t* pY = &Y[4]; -// const uint32_t* LoopEnd = &X[length]; -// while (pX != LoopEnd) { -// const uint32_t xy0 = *pX + *pY; -// const uint32_t xy1 = *(pX + 1) + *(pY + 1); -// ++i; -// cost += i * xy0; -// cost += i * xy1; -// pX += 2; -// pY += 2; -// } -// return (double)cost; -static double ExtraCostCombined_MIPS32(const uint32_t* const X, - const uint32_t* const Y, int length) { - int i, temp0, temp1, temp2, temp3; - const uint32_t* pX = &X[4]; - const uint32_t* pY = &Y[4]; - const uint32_t* const LoopEnd = &X[length]; - - __asm__ volatile( - "mult $zero, $zero \n\t" - "xor %[i], %[i], %[i] \n\t" - "beq %[pX], %[LoopEnd], 2f \n\t" - "1: \n\t" - "lw %[temp0], 0(%[pX]) \n\t" - "lw %[temp1], 0(%[pY]) \n\t" - "lw %[temp2], 4(%[pX]) \n\t" - "lw %[temp3], 4(%[pY]) \n\t" - "addiu %[i], %[i], 1 \n\t" - "addu %[temp0], %[temp0], %[temp1] \n\t" - "addu %[temp2], %[temp2], %[temp3] \n\t" - "addiu %[pX], %[pX], 8 \n\t" - "addiu %[pY], %[pY], 8 \n\t" - "madd %[i], %[temp0] \n\t" - "madd %[i], %[temp2] \n\t" - "bne %[pX], %[LoopEnd], 1b \n\t" - "2: \n\t" - "mfhi %[temp0] \n\t" - "mflo %[temp1] \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), - [i]"=&r"(i), [pX]"+r"(pX), [pY]"+r"(pY) - : [LoopEnd]"r"(LoopEnd) - : "memory", "hi", "lo" - ); - - return (double)((int64_t)temp0 << 32 | temp1); -} - -#define HUFFMAN_COST_PASS \ - __asm__ volatile( \ - "sll %[temp1], %[temp0], 3 \n\t" \ - "addiu %[temp3], %[streak], -3 \n\t" \ - "addu %[temp2], %[pstreaks], %[temp1] \n\t" \ - "blez %[temp3], 1f \n\t" \ - "srl %[temp1], %[temp1], 1 \n\t" \ - "addu %[temp3], %[pcnts], %[temp1] \n\t" \ - "lw %[temp0], 4(%[temp2]) \n\t" \ - "lw %[temp1], 0(%[temp3]) \n\t" \ - "addu %[temp0], %[temp0], %[streak] \n\t" \ - "addiu %[temp1], %[temp1], 1 \n\t" \ - "sw %[temp0], 4(%[temp2]) \n\t" \ - "sw %[temp1], 0(%[temp3]) \n\t" \ - "b 2f \n\t" \ - "1: \n\t" \ - "lw %[temp0], 0(%[temp2]) \n\t" \ - "addu %[temp0], %[temp0], %[streak] \n\t" \ - "sw %[temp0], 0(%[temp2]) \n\t" \ - "2: \n\t" \ - : [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), \ - [temp3]"=&r"(temp3), [temp0]"+r"(temp0) \ - : [pstreaks]"r"(pstreaks), [pcnts]"r"(pcnts), \ - [streak]"r"(streak) \ - : "memory" \ - ); - -// Returns the various RLE counts -static WEBP_INLINE void GetEntropyUnrefinedHelper( - uint32_t val, int i, uint32_t* const val_prev, int* const i_prev, - VP8LBitEntropy* const bit_entropy, VP8LStreaks* const stats) { - int* const pstreaks = &stats->streaks[0][0]; - int* const pcnts = &stats->counts[0]; - int temp0, temp1, temp2, temp3; - const int streak = i - *i_prev; - - // Gather info for the bit entropy. - if (*val_prev != 0) { - bit_entropy->sum += (*val_prev) * streak; - bit_entropy->nonzeros += streak; - bit_entropy->nonzero_code = *i_prev; - bit_entropy->entropy -= VP8LFastSLog2(*val_prev) * streak; - if (bit_entropy->max_val < *val_prev) { - bit_entropy->max_val = *val_prev; - } - } - - // Gather info for the Huffman cost. - temp0 = (*val_prev != 0); - HUFFMAN_COST_PASS - - *val_prev = val; - *i_prev = i; -} - -static void GetEntropyUnrefined_MIPS32(const uint32_t X[], int length, - VP8LBitEntropy* const bit_entropy, - VP8LStreaks* const stats) { - int i; - int i_prev = 0; - uint32_t x_prev = X[0]; - - memset(stats, 0, sizeof(*stats)); - VP8LBitEntropyInit(bit_entropy); - - for (i = 1; i < length; ++i) { - const uint32_t x = X[i]; - if (x != x_prev) { - GetEntropyUnrefinedHelper(x, i, &x_prev, &i_prev, bit_entropy, stats); - } - } - GetEntropyUnrefinedHelper(0, i, &x_prev, &i_prev, bit_entropy, stats); - - bit_entropy->entropy += VP8LFastSLog2(bit_entropy->sum); -} - -static void GetCombinedEntropyUnrefined_MIPS32(const uint32_t X[], - const uint32_t Y[], - int length, - VP8LBitEntropy* const entropy, - VP8LStreaks* const stats) { - int i = 1; - int i_prev = 0; - uint32_t xy_prev = X[0] + Y[0]; - - memset(stats, 0, sizeof(*stats)); - VP8LBitEntropyInit(entropy); - - for (i = 1; i < length; ++i) { - const uint32_t xy = X[i] + Y[i]; - if (xy != xy_prev) { - GetEntropyUnrefinedHelper(xy, i, &xy_prev, &i_prev, entropy, stats); - } - } - GetEntropyUnrefinedHelper(0, i, &xy_prev, &i_prev, entropy, stats); - - entropy->entropy += VP8LFastSLog2(entropy->sum); -} - -#define ASM_START \ - __asm__ volatile( \ - ".set push \n\t" \ - ".set at \n\t" \ - ".set macro \n\t" \ - "1: \n\t" - -// P2 = P0 + P1 -// A..D - offsets -// E - temp variable to tell macro -// if pointer should be incremented -// literal_ and successive histograms could be unaligned -// so we must use ulw and usw -#define ADD_TO_OUT(A, B, C, D, E, P0, P1, P2) \ - "ulw %[temp0], " #A "(%[" #P0 "]) \n\t" \ - "ulw %[temp1], " #B "(%[" #P0 "]) \n\t" \ - "ulw %[temp2], " #C "(%[" #P0 "]) \n\t" \ - "ulw %[temp3], " #D "(%[" #P0 "]) \n\t" \ - "ulw %[temp4], " #A "(%[" #P1 "]) \n\t" \ - "ulw %[temp5], " #B "(%[" #P1 "]) \n\t" \ - "ulw %[temp6], " #C "(%[" #P1 "]) \n\t" \ - "ulw %[temp7], " #D "(%[" #P1 "]) \n\t" \ - "addu %[temp4], %[temp4], %[temp0] \n\t" \ - "addu %[temp5], %[temp5], %[temp1] \n\t" \ - "addu %[temp6], %[temp6], %[temp2] \n\t" \ - "addu %[temp7], %[temp7], %[temp3] \n\t" \ - "addiu %[" #P0 "], %[" #P0 "], 16 \n\t" \ - ".if " #E " == 1 \n\t" \ - "addiu %[" #P1 "], %[" #P1 "], 16 \n\t" \ - ".endif \n\t" \ - "usw %[temp4], " #A "(%[" #P2 "]) \n\t" \ - "usw %[temp5], " #B "(%[" #P2 "]) \n\t" \ - "usw %[temp6], " #C "(%[" #P2 "]) \n\t" \ - "usw %[temp7], " #D "(%[" #P2 "]) \n\t" \ - "addiu %[" #P2 "], %[" #P2 "], 16 \n\t" \ - "bne %[" #P0 "], %[LoopEnd], 1b \n\t" \ - ".set pop \n\t" \ - -#define ASM_END_COMMON_0 \ - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), \ - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), \ - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), \ - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7), \ - [pa]"+r"(pa), [pout]"+r"(pout) - -#define ASM_END_COMMON_1 \ - : [LoopEnd]"r"(LoopEnd) \ - : "memory", "at" \ - ); - -#define ASM_END_0 \ - ASM_END_COMMON_0 \ - , [pb]"+r"(pb) \ - ASM_END_COMMON_1 - -#define ASM_END_1 \ - ASM_END_COMMON_0 \ - ASM_END_COMMON_1 - -#define ADD_VECTOR(A, B, OUT, SIZE, EXTRA_SIZE) do { \ - const uint32_t* pa = (const uint32_t*)(A); \ - const uint32_t* pb = (const uint32_t*)(B); \ - uint32_t* pout = (uint32_t*)(OUT); \ - const uint32_t* const LoopEnd = pa + (SIZE); \ - assert((SIZE) % 4 == 0); \ - ASM_START \ - ADD_TO_OUT(0, 4, 8, 12, 1, pa, pb, pout) \ - ASM_END_0 \ - if ((EXTRA_SIZE) > 0) { \ - const int last = (EXTRA_SIZE); \ - int i; \ - for (i = 0; i < last; ++i) pout[i] = pa[i] + pb[i]; \ - } \ -} while (0) - -#define ADD_VECTOR_EQ(A, OUT, SIZE, EXTRA_SIZE) do { \ - const uint32_t* pa = (const uint32_t*)(A); \ - uint32_t* pout = (uint32_t*)(OUT); \ - const uint32_t* const LoopEnd = pa + (SIZE); \ - assert((SIZE) % 4 == 0); \ - ASM_START \ - ADD_TO_OUT(0, 4, 8, 12, 0, pa, pout, pout) \ - ASM_END_1 \ - if ((EXTRA_SIZE) > 0) { \ - const int last = (EXTRA_SIZE); \ - int i; \ - for (i = 0; i < last; ++i) pout[i] += pa[i]; \ - } \ -} while (0) - -static void HistogramAdd_MIPS32(const VP8LHistogram* const a, - const VP8LHistogram* const b, - VP8LHistogram* const out) { - uint32_t temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; - const int extra_cache_size = VP8LHistogramNumCodes(a->palette_code_bits_) - - (NUM_LITERAL_CODES + NUM_LENGTH_CODES); - assert(a->palette_code_bits_ == b->palette_code_bits_); - - if (b != out) { - ADD_VECTOR(a->literal_, b->literal_, out->literal_, - NUM_LITERAL_CODES + NUM_LENGTH_CODES, extra_cache_size); - ADD_VECTOR(a->distance_, b->distance_, out->distance_, - NUM_DISTANCE_CODES, 0); - ADD_VECTOR(a->red_, b->red_, out->red_, NUM_LITERAL_CODES, 0); - ADD_VECTOR(a->blue_, b->blue_, out->blue_, NUM_LITERAL_CODES, 0); - ADD_VECTOR(a->alpha_, b->alpha_, out->alpha_, NUM_LITERAL_CODES, 0); - } else { - ADD_VECTOR_EQ(a->literal_, out->literal_, - NUM_LITERAL_CODES + NUM_LENGTH_CODES, extra_cache_size); - ADD_VECTOR_EQ(a->distance_, out->distance_, NUM_DISTANCE_CODES, 0); - ADD_VECTOR_EQ(a->red_, out->red_, NUM_LITERAL_CODES, 0); - ADD_VECTOR_EQ(a->blue_, out->blue_, NUM_LITERAL_CODES, 0); - ADD_VECTOR_EQ(a->alpha_, out->alpha_, NUM_LITERAL_CODES, 0); - } -} - -#undef ADD_VECTOR_EQ -#undef ADD_VECTOR -#undef ASM_END_1 -#undef ASM_END_0 -#undef ASM_END_COMMON_1 -#undef ASM_END_COMMON_0 -#undef ADD_TO_OUT -#undef ASM_START - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8LEncDspInitMIPS32(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8LEncDspInitMIPS32(void) { - VP8LFastSLog2Slow = FastSLog2Slow_MIPS32; - VP8LFastLog2Slow = FastLog2Slow_MIPS32; - VP8LExtraCost = ExtraCost_MIPS32; - VP8LExtraCostCombined = ExtraCostCombined_MIPS32; - VP8LGetEntropyUnrefined = GetEntropyUnrefined_MIPS32; - VP8LGetCombinedEntropyUnrefined = GetCombinedEntropyUnrefined_MIPS32; - VP8LHistogramAdd = HistogramAdd_MIPS32; -} - -#else // !WEBP_USE_MIPS32 - -WEBP_DSP_INIT_STUB(VP8LEncDspInitMIPS32) - -#endif // WEBP_USE_MIPS32 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_mips_dsp_r2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_mips_dsp_r2.c deleted file mode 100644 index c16b3bc..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_mips_dsp_r2.c +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Image transform methods for lossless encoder. -// -// Author(s): Djordje Pesut (djordje.pesut@imgtec.com) -// Jovan Zelincevic (jovan.zelincevic@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS_DSP_R2) - -#include "src/dsp/lossless.h" - -static void SubtractGreenFromBlueAndRed_MIPSdspR2(uint32_t* argb_data, - int num_pixels) { - uint32_t temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; - uint32_t* const p_loop1_end = argb_data + (num_pixels & ~3); - uint32_t* const p_loop2_end = p_loop1_end + (num_pixels & 3); - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "beq %[argb_data], %[p_loop1_end], 3f \n\t" - " nop \n\t" - "0: \n\t" - "lw %[temp0], 0(%[argb_data]) \n\t" - "lw %[temp1], 4(%[argb_data]) \n\t" - "lw %[temp2], 8(%[argb_data]) \n\t" - "lw %[temp3], 12(%[argb_data]) \n\t" - "ext %[temp4], %[temp0], 8, 8 \n\t" - "ext %[temp5], %[temp1], 8, 8 \n\t" - "ext %[temp6], %[temp2], 8, 8 \n\t" - "ext %[temp7], %[temp3], 8, 8 \n\t" - "addiu %[argb_data], %[argb_data], 16 \n\t" - "replv.ph %[temp4], %[temp4] \n\t" - "replv.ph %[temp5], %[temp5] \n\t" - "replv.ph %[temp6], %[temp6] \n\t" - "replv.ph %[temp7], %[temp7] \n\t" - "subu.qb %[temp0], %[temp0], %[temp4] \n\t" - "subu.qb %[temp1], %[temp1], %[temp5] \n\t" - "subu.qb %[temp2], %[temp2], %[temp6] \n\t" - "subu.qb %[temp3], %[temp3], %[temp7] \n\t" - "sw %[temp0], -16(%[argb_data]) \n\t" - "sw %[temp1], -12(%[argb_data]) \n\t" - "sw %[temp2], -8(%[argb_data]) \n\t" - "bne %[argb_data], %[p_loop1_end], 0b \n\t" - " sw %[temp3], -4(%[argb_data]) \n\t" - "3: \n\t" - "beq %[argb_data], %[p_loop2_end], 2f \n\t" - " nop \n\t" - "1: \n\t" - "lw %[temp0], 0(%[argb_data]) \n\t" - "addiu %[argb_data], %[argb_data], 4 \n\t" - "ext %[temp4], %[temp0], 8, 8 \n\t" - "replv.ph %[temp4], %[temp4] \n\t" - "subu.qb %[temp0], %[temp0], %[temp4] \n\t" - "bne %[argb_data], %[p_loop2_end], 1b \n\t" - " sw %[temp0], -4(%[argb_data]) \n\t" - "2: \n\t" - ".set pop \n\t" - : [argb_data]"+&r"(argb_data), [temp0]"=&r"(temp0), - [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [temp6]"=&r"(temp6), - [temp7]"=&r"(temp7) - : [p_loop1_end]"r"(p_loop1_end), [p_loop2_end]"r"(p_loop2_end) - : "memory" - ); -} - -static WEBP_INLINE uint32_t ColorTransformDelta(int8_t color_pred, - int8_t color) { - return (uint32_t)((int)(color_pred) * color) >> 5; -} - -static void TransformColor_MIPSdspR2(const VP8LMultipliers* const m, - uint32_t* data, int num_pixels) { - int temp0, temp1, temp2, temp3, temp4, temp5; - uint32_t argb, argb1, new_red, new_red1; - const uint32_t G_to_R = m->green_to_red_; - const uint32_t G_to_B = m->green_to_blue_; - const uint32_t R_to_B = m->red_to_blue_; - uint32_t* const p_loop_end = data + (num_pixels & ~1); - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "beq %[data], %[p_loop_end], 1f \n\t" - " nop \n\t" - "replv.ph %[temp0], %[G_to_R] \n\t" - "replv.ph %[temp1], %[G_to_B] \n\t" - "replv.ph %[temp2], %[R_to_B] \n\t" - "shll.ph %[temp0], %[temp0], 8 \n\t" - "shll.ph %[temp1], %[temp1], 8 \n\t" - "shll.ph %[temp2], %[temp2], 8 \n\t" - "shra.ph %[temp0], %[temp0], 8 \n\t" - "shra.ph %[temp1], %[temp1], 8 \n\t" - "shra.ph %[temp2], %[temp2], 8 \n\t" - "0: \n\t" - "lw %[argb], 0(%[data]) \n\t" - "lw %[argb1], 4(%[data]) \n\t" - "lhu %[new_red], 2(%[data]) \n\t" - "lhu %[new_red1], 6(%[data]) \n\t" - "precrq.qb.ph %[temp3], %[argb], %[argb1] \n\t" - "precr.qb.ph %[temp4], %[argb], %[argb1] \n\t" - "preceu.ph.qbra %[temp3], %[temp3] \n\t" - "preceu.ph.qbla %[temp4], %[temp4] \n\t" - "shll.ph %[temp3], %[temp3], 8 \n\t" - "shll.ph %[temp4], %[temp4], 8 \n\t" - "shra.ph %[temp3], %[temp3], 8 \n\t" - "shra.ph %[temp4], %[temp4], 8 \n\t" - "mul.ph %[temp5], %[temp3], %[temp0] \n\t" - "mul.ph %[temp3], %[temp3], %[temp1] \n\t" - "mul.ph %[temp4], %[temp4], %[temp2] \n\t" - "addiu %[data], %[data], 8 \n\t" - "ins %[new_red1], %[new_red], 16, 16 \n\t" - "ins %[argb1], %[argb], 16, 16 \n\t" - "shra.ph %[temp5], %[temp5], 5 \n\t" - "shra.ph %[temp3], %[temp3], 5 \n\t" - "shra.ph %[temp4], %[temp4], 5 \n\t" - "subu.ph %[new_red1], %[new_red1], %[temp5] \n\t" - "subu.ph %[argb1], %[argb1], %[temp3] \n\t" - "preceu.ph.qbra %[temp5], %[new_red1] \n\t" - "subu.ph %[argb1], %[argb1], %[temp4] \n\t" - "preceu.ph.qbra %[temp3], %[argb1] \n\t" - "sb %[temp5], -2(%[data]) \n\t" - "sb %[temp3], -4(%[data]) \n\t" - "sra %[temp5], %[temp5], 16 \n\t" - "sra %[temp3], %[temp3], 16 \n\t" - "sb %[temp5], -6(%[data]) \n\t" - "bne %[data], %[p_loop_end], 0b \n\t" - " sb %[temp3], -8(%[data]) \n\t" - "1: \n\t" - ".set pop \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [new_red1]"=&r"(new_red1), [new_red]"=&r"(new_red), - [argb]"=&r"(argb), [argb1]"=&r"(argb1), [data]"+&r"(data) - : [G_to_R]"r"(G_to_R), [R_to_B]"r"(R_to_B), - [G_to_B]"r"(G_to_B), [p_loop_end]"r"(p_loop_end) - : "memory", "hi", "lo" - ); - - if (num_pixels & 1) { - const uint32_t argb_ = data[0]; - const uint32_t green = argb_ >> 8; - const uint32_t red = argb_ >> 16; - uint32_t new_blue = argb_; - new_red = red; - new_red -= ColorTransformDelta(m->green_to_red_, green); - new_red &= 0xff; - new_blue -= ColorTransformDelta(m->green_to_blue_, green); - new_blue -= ColorTransformDelta(m->red_to_blue_, red); - new_blue &= 0xff; - data[0] = (argb_ & 0xff00ff00u) | (new_red << 16) | (new_blue); - } -} - -static WEBP_INLINE uint8_t TransformColorBlue(uint8_t green_to_blue, - uint8_t red_to_blue, - uint32_t argb) { - const uint32_t green = argb >> 8; - const uint32_t red = argb >> 16; - uint8_t new_blue = argb; - new_blue -= ColorTransformDelta(green_to_blue, green); - new_blue -= ColorTransformDelta(red_to_blue, red); - return (new_blue & 0xff); -} - -static void CollectColorBlueTransforms_MIPSdspR2(const uint32_t* argb, - int stride, - int tile_width, - int tile_height, - int green_to_blue, - int red_to_blue, - int histo[]) { - const int rtb = (red_to_blue << 16) | (red_to_blue & 0xffff); - const int gtb = (green_to_blue << 16) | (green_to_blue & 0xffff); - const uint32_t mask = 0xff00ffu; - while (tile_height-- > 0) { - int x; - const uint32_t* p_argb = argb; - argb += stride; - for (x = 0; x < (tile_width >> 1); ++x) { - int temp0, temp1, temp2, temp3, temp4, temp5, temp6; - __asm__ volatile ( - "lw %[temp0], 0(%[p_argb]) \n\t" - "lw %[temp1], 4(%[p_argb]) \n\t" - "precr.qb.ph %[temp2], %[temp0], %[temp1] \n\t" - "ins %[temp1], %[temp0], 16, 16 \n\t" - "shra.ph %[temp2], %[temp2], 8 \n\t" - "shra.ph %[temp3], %[temp1], 8 \n\t" - "mul.ph %[temp5], %[temp2], %[rtb] \n\t" - "mul.ph %[temp6], %[temp3], %[gtb] \n\t" - "and %[temp4], %[temp1], %[mask] \n\t" - "addiu %[p_argb], %[p_argb], 8 \n\t" - "shra.ph %[temp5], %[temp5], 5 \n\t" - "shra.ph %[temp6], %[temp6], 5 \n\t" - "subu.qb %[temp2], %[temp4], %[temp5] \n\t" - "subu.qb %[temp2], %[temp2], %[temp6] \n\t" - : [p_argb]"+&r"(p_argb), [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), - [temp5]"=&r"(temp5), [temp6]"=&r"(temp6) - : [rtb]"r"(rtb), [gtb]"r"(gtb), [mask]"r"(mask) - : "memory", "hi", "lo" - ); - ++histo[(uint8_t)(temp2 >> 16)]; - ++histo[(uint8_t)temp2]; - } - if (tile_width & 1) { - ++histo[TransformColorBlue(green_to_blue, red_to_blue, *p_argb)]; - } - } -} - -static WEBP_INLINE uint8_t TransformColorRed(uint8_t green_to_red, - uint32_t argb) { - const uint32_t green = argb >> 8; - uint32_t new_red = argb >> 16; - new_red -= ColorTransformDelta(green_to_red, green); - return (new_red & 0xff); -} - -static void CollectColorRedTransforms_MIPSdspR2(const uint32_t* argb, - int stride, - int tile_width, - int tile_height, - int green_to_red, - int histo[]) { - const int gtr = (green_to_red << 16) | (green_to_red & 0xffff); - while (tile_height-- > 0) { - int x; - const uint32_t* p_argb = argb; - argb += stride; - for (x = 0; x < (tile_width >> 1); ++x) { - int temp0, temp1, temp2, temp3, temp4; - __asm__ volatile ( - "lw %[temp0], 0(%[p_argb]) \n\t" - "lw %[temp1], 4(%[p_argb]) \n\t" - "precrq.ph.w %[temp4], %[temp0], %[temp1] \n\t" - "ins %[temp1], %[temp0], 16, 16 \n\t" - "shra.ph %[temp3], %[temp1], 8 \n\t" - "mul.ph %[temp2], %[temp3], %[gtr] \n\t" - "addiu %[p_argb], %[p_argb], 8 \n\t" - "shra.ph %[temp2], %[temp2], 5 \n\t" - "subu.qb %[temp2], %[temp4], %[temp2] \n\t" - : [p_argb]"+&r"(p_argb), [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), [temp4]"=&r"(temp4) - : [gtr]"r"(gtr) - : "memory", "hi", "lo" - ); - ++histo[(uint8_t)(temp2 >> 16)]; - ++histo[(uint8_t)temp2]; - } - if (tile_width & 1) { - ++histo[TransformColorRed(green_to_red, *p_argb)]; - } - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8LEncDspInitMIPSdspR2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8LEncDspInitMIPSdspR2(void) { - VP8LSubtractGreenFromBlueAndRed = SubtractGreenFromBlueAndRed_MIPSdspR2; - VP8LTransformColor = TransformColor_MIPSdspR2; - VP8LCollectColorBlueTransforms = CollectColorBlueTransforms_MIPSdspR2; - VP8LCollectColorRedTransforms = CollectColorRedTransforms_MIPSdspR2; -} - -#else // !WEBP_USE_MIPS_DSP_R2 - -WEBP_DSP_INIT_STUB(VP8LEncDspInitMIPSdspR2) - -#endif // WEBP_USE_MIPS_DSP_R2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_msa.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_msa.c deleted file mode 100644 index fd99f5a..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_msa.c +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MSA variant of Image transform methods for lossless encoder. -// -// Authors: Prashant Patil (Prashant.Patil@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MSA) - -#include "src/dsp/lossless.h" -#include "src/dsp/msa_macro.h" - -#define TRANSFORM_COLOR_8(src0, src1, dst0, dst1, c0, c1, mask0, mask1) do { \ - v8i16 g0, g1, t0, t1, t2, t3; \ - v4i32 t4, t5; \ - VSHF_B2_SH(src0, src0, src1, src1, mask0, mask0, g0, g1); \ - DOTP_SB2_SH(g0, g1, c0, c0, t0, t1); \ - SRAI_H2_SH(t0, t1, 5); \ - t0 = __msa_subv_h((v8i16)src0, t0); \ - t1 = __msa_subv_h((v8i16)src1, t1); \ - t4 = __msa_srli_w((v4i32)src0, 16); \ - t5 = __msa_srli_w((v4i32)src1, 16); \ - DOTP_SB2_SH(t4, t5, c1, c1, t2, t3); \ - SRAI_H2_SH(t2, t3, 5); \ - SUB2(t0, t2, t1, t3, t0, t1); \ - VSHF_B2_UB(src0, t0, src1, t1, mask1, mask1, dst0, dst1); \ -} while (0) - -#define TRANSFORM_COLOR_4(src, dst, c0, c1, mask0, mask1) do { \ - const v16i8 g0 = VSHF_SB(src, src, mask0); \ - v8i16 t0 = __msa_dotp_s_h(c0, g0); \ - v8i16 t1; \ - v4i32 t2; \ - t0 = SRAI_H(t0, 5); \ - t0 = __msa_subv_h((v8i16)src, t0); \ - t2 = __msa_srli_w((v4i32)src, 16); \ - t1 = __msa_dotp_s_h(c1, (v16i8)t2); \ - t1 = SRAI_H(t1, 5); \ - t0 = t0 - t1; \ - dst = VSHF_UB(src, t0, mask1); \ -} while (0) - -static void TransformColor_MSA(const VP8LMultipliers* const m, uint32_t* data, - int num_pixels) { - v16u8 src0, dst0; - const v16i8 g2br = (v16i8)__msa_fill_w(m->green_to_blue_ | - (m->green_to_red_ << 16)); - const v16i8 r2b = (v16i8)__msa_fill_w(m->red_to_blue_); - const v16u8 mask0 = { 1, 255, 1, 255, 5, 255, 5, 255, 9, 255, 9, 255, - 13, 255, 13, 255 }; - const v16u8 mask1 = { 16, 1, 18, 3, 20, 5, 22, 7, 24, 9, 26, 11, - 28, 13, 30, 15 }; - - while (num_pixels >= 8) { - v16u8 src1, dst1; - LD_UB2(data, 4, src0, src1); - TRANSFORM_COLOR_8(src0, src1, dst0, dst1, g2br, r2b, mask0, mask1); - ST_UB2(dst0, dst1, data, 4); - data += 8; - num_pixels -= 8; - } - if (num_pixels > 0) { - if (num_pixels >= 4) { - src0 = LD_UB(data); - TRANSFORM_COLOR_4(src0, dst0, g2br, r2b, mask0, mask1); - ST_UB(dst0, data); - data += 4; - num_pixels -= 4; - } - if (num_pixels > 0) { - src0 = LD_UB(data); - TRANSFORM_COLOR_4(src0, dst0, g2br, r2b, mask0, mask1); - if (num_pixels == 3) { - const uint64_t pix_d = __msa_copy_s_d((v2i64)dst0, 0); - const uint32_t pix_w = __msa_copy_s_w((v4i32)dst0, 2); - SD(pix_d, data + 0); - SW(pix_w, data + 2); - } else if (num_pixels == 2) { - const uint64_t pix_d = __msa_copy_s_d((v2i64)dst0, 0); - SD(pix_d, data); - } else { - const uint32_t pix_w = __msa_copy_s_w((v4i32)dst0, 0); - SW(pix_w, data); - } - } - } -} - -static void SubtractGreenFromBlueAndRed_MSA(uint32_t* argb_data, - int num_pixels) { - int i; - uint8_t* ptemp_data = (uint8_t*)argb_data; - v16u8 src0, dst0, tmp0; - const v16u8 mask = { 1, 255, 1, 255, 5, 255, 5, 255, 9, 255, 9, 255, - 13, 255, 13, 255 }; - - while (num_pixels >= 8) { - v16u8 src1, dst1, tmp1; - LD_UB2(ptemp_data, 16, src0, src1); - VSHF_B2_UB(src0, src1, src1, src0, mask, mask, tmp0, tmp1); - SUB2(src0, tmp0, src1, tmp1, dst0, dst1); - ST_UB2(dst0, dst1, ptemp_data, 16); - ptemp_data += 8 * 4; - num_pixels -= 8; - } - if (num_pixels > 0) { - if (num_pixels >= 4) { - src0 = LD_UB(ptemp_data); - tmp0 = VSHF_UB(src0, src0, mask); - dst0 = src0 - tmp0; - ST_UB(dst0, ptemp_data); - ptemp_data += 4 * 4; - num_pixels -= 4; - } - for (i = 0; i < num_pixels; i++) { - const uint8_t b = ptemp_data[0]; - const uint8_t g = ptemp_data[1]; - const uint8_t r = ptemp_data[2]; - ptemp_data[0] = (b - g) & 0xff; - ptemp_data[2] = (r - g) & 0xff; - ptemp_data += 4; - } - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8LEncDspInitMSA(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8LEncDspInitMSA(void) { - VP8LSubtractGreenFromBlueAndRed = SubtractGreenFromBlueAndRed_MSA; - VP8LTransformColor = TransformColor_MSA; -} - -#else // !WEBP_USE_MSA - -WEBP_DSP_INIT_STUB(VP8LEncDspInitMSA) - -#endif // WEBP_USE_MSA diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_neon.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_neon.c deleted file mode 100644 index 9005a35..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_neon.c +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// NEON variant of methods for lossless encoder -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_NEON) - -#include - -#include "src/dsp/lossless.h" -#include "src/dsp/neon.h" - -//------------------------------------------------------------------------------ -// Subtract-Green Transform - -// vtbl?_u8 are marked unavailable for iOS arm64 with Xcode < 6.3, use -// non-standard versions there. -#if defined(__APPLE__) && defined(__aarch64__) && \ - defined(__apple_build_version__) && (__apple_build_version__< 6020037) -#define USE_VTBLQ -#endif - -#ifdef USE_VTBLQ -// 255 = byte will be zeroed -static const uint8_t kGreenShuffle[16] = { - 1, 255, 1, 255, 5, 255, 5, 255, 9, 255, 9, 255, 13, 255, 13, 255 -}; - -static WEBP_INLINE uint8x16_t DoGreenShuffle_NEON(const uint8x16_t argb, - const uint8x16_t shuffle) { - return vcombine_u8(vtbl1q_u8(argb, vget_low_u8(shuffle)), - vtbl1q_u8(argb, vget_high_u8(shuffle))); -} -#else // !USE_VTBLQ -// 255 = byte will be zeroed -static const uint8_t kGreenShuffle[8] = { 1, 255, 1, 255, 5, 255, 5, 255 }; - -static WEBP_INLINE uint8x16_t DoGreenShuffle_NEON(const uint8x16_t argb, - const uint8x8_t shuffle) { - return vcombine_u8(vtbl1_u8(vget_low_u8(argb), shuffle), - vtbl1_u8(vget_high_u8(argb), shuffle)); -} -#endif // USE_VTBLQ - -static void SubtractGreenFromBlueAndRed_NEON(uint32_t* argb_data, - int num_pixels) { - const uint32_t* const end = argb_data + (num_pixels & ~3); -#ifdef USE_VTBLQ - const uint8x16_t shuffle = vld1q_u8(kGreenShuffle); -#else - const uint8x8_t shuffle = vld1_u8(kGreenShuffle); -#endif - for (; argb_data < end; argb_data += 4) { - const uint8x16_t argb = vld1q_u8((uint8_t*)argb_data); - const uint8x16_t greens = DoGreenShuffle_NEON(argb, shuffle); - vst1q_u8((uint8_t*)argb_data, vsubq_u8(argb, greens)); - } - // fallthrough and finish off with plain-C - VP8LSubtractGreenFromBlueAndRed_C(argb_data, num_pixels & 3); -} - -//------------------------------------------------------------------------------ -// Color Transform - -static void TransformColor_NEON(const VP8LMultipliers* const m, - uint32_t* argb_data, int num_pixels) { - // sign-extended multiplying constants, pre-shifted by 6. -#define CST(X) (((int16_t)(m->X << 8)) >> 6) - const int16_t rb[8] = { - CST(green_to_blue_), CST(green_to_red_), - CST(green_to_blue_), CST(green_to_red_), - CST(green_to_blue_), CST(green_to_red_), - CST(green_to_blue_), CST(green_to_red_) - }; - const int16x8_t mults_rb = vld1q_s16(rb); - const int16_t b2[8] = { - 0, CST(red_to_blue_), 0, CST(red_to_blue_), - 0, CST(red_to_blue_), 0, CST(red_to_blue_), - }; - const int16x8_t mults_b2 = vld1q_s16(b2); -#undef CST -#ifdef USE_VTBLQ - static const uint8_t kg0g0[16] = { - 255, 1, 255, 1, 255, 5, 255, 5, 255, 9, 255, 9, 255, 13, 255, 13 - }; - const uint8x16_t shuffle = vld1q_u8(kg0g0); -#else - static const uint8_t k0g0g[8] = { 255, 1, 255, 1, 255, 5, 255, 5 }; - const uint8x8_t shuffle = vld1_u8(k0g0g); -#endif - const uint32x4_t mask_rb = vdupq_n_u32(0x00ff00ffu); // red-blue masks - int i; - for (i = 0; i + 4 <= num_pixels; i += 4) { - const uint8x16_t in = vld1q_u8((uint8_t*)(argb_data + i)); - // 0 g 0 g - const uint8x16_t greens = DoGreenShuffle_NEON(in, shuffle); - // x dr x db1 - const int16x8_t A = vqdmulhq_s16(vreinterpretq_s16_u8(greens), mults_rb); - // r 0 b 0 - const int16x8_t B = vshlq_n_s16(vreinterpretq_s16_u8(in), 8); - // x db2 0 0 - const int16x8_t C = vqdmulhq_s16(B, mults_b2); - // 0 0 x db2 - const uint32x4_t D = vshrq_n_u32(vreinterpretq_u32_s16(C), 16); - // x dr x db - const int8x16_t E = vaddq_s8(vreinterpretq_s8_u32(D), - vreinterpretq_s8_s16(A)); - // 0 dr 0 db - const uint32x4_t F = vandq_u32(vreinterpretq_u32_s8(E), mask_rb); - const int8x16_t out = vsubq_s8(vreinterpretq_s8_u8(in), - vreinterpretq_s8_u32(F)); - vst1q_s8((int8_t*)(argb_data + i), out); - } - // fallthrough and finish off with plain-C - VP8LTransformColor_C(m, argb_data + i, num_pixels - i); -} - -#undef USE_VTBLQ - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8LEncDspInitNEON(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8LEncDspInitNEON(void) { - VP8LSubtractGreenFromBlueAndRed = SubtractGreenFromBlueAndRed_NEON; - VP8LTransformColor = TransformColor_NEON; -} - -#else // !WEBP_USE_NEON - -WEBP_DSP_INIT_STUB(VP8LEncDspInitNEON) - -#endif // WEBP_USE_NEON diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_sse2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_sse2.c deleted file mode 100644 index 030b259..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_sse2.c +++ /dev/null @@ -1,705 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE2 variant of methods for lossless encoder -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE2) -#include -#include -#include "src/dsp/lossless.h" -#include "src/dsp/common_sse2.h" -#include "src/dsp/lossless_common.h" - -// For sign-extended multiplying constants, pre-shifted by 5: -#define CST_5b(X) (((int16_t)((uint16_t)(X) << 8)) >> 5) - -//------------------------------------------------------------------------------ -// Subtract-Green Transform - -static void SubtractGreenFromBlueAndRed_SSE2(uint32_t* argb_data, - int num_pixels) { - int i; - for (i = 0; i + 4 <= num_pixels; i += 4) { - const __m128i in = _mm_loadu_si128((__m128i*)&argb_data[i]); // argb - const __m128i A = _mm_srli_epi16(in, 8); // 0 a 0 g - const __m128i B = _mm_shufflelo_epi16(A, _MM_SHUFFLE(2, 2, 0, 0)); - const __m128i C = _mm_shufflehi_epi16(B, _MM_SHUFFLE(2, 2, 0, 0)); // 0g0g - const __m128i out = _mm_sub_epi8(in, C); - _mm_storeu_si128((__m128i*)&argb_data[i], out); - } - // fallthrough and finish off with plain-C - if (i != num_pixels) { - VP8LSubtractGreenFromBlueAndRed_C(argb_data + i, num_pixels - i); - } -} - -//------------------------------------------------------------------------------ -// Color Transform - -#define MK_CST_16(HI, LO) \ - _mm_set1_epi32((int)(((uint32_t)(HI) << 16) | ((LO) & 0xffff))) - -static void TransformColor_SSE2(const VP8LMultipliers* const m, - uint32_t* argb_data, int num_pixels) { - const __m128i mults_rb = MK_CST_16(CST_5b(m->green_to_red_), - CST_5b(m->green_to_blue_)); - const __m128i mults_b2 = MK_CST_16(CST_5b(m->red_to_blue_), 0); - const __m128i mask_ag = _mm_set1_epi32(0xff00ff00); // alpha-green masks - const __m128i mask_rb = _mm_set1_epi32(0x00ff00ff); // red-blue masks - int i; - for (i = 0; i + 4 <= num_pixels; i += 4) { - const __m128i in = _mm_loadu_si128((__m128i*)&argb_data[i]); // argb - const __m128i A = _mm_and_si128(in, mask_ag); // a 0 g 0 - const __m128i B = _mm_shufflelo_epi16(A, _MM_SHUFFLE(2, 2, 0, 0)); - const __m128i C = _mm_shufflehi_epi16(B, _MM_SHUFFLE(2, 2, 0, 0)); // g0g0 - const __m128i D = _mm_mulhi_epi16(C, mults_rb); // x dr x db1 - const __m128i E = _mm_slli_epi16(in, 8); // r 0 b 0 - const __m128i F = _mm_mulhi_epi16(E, mults_b2); // x db2 0 0 - const __m128i G = _mm_srli_epi32(F, 16); // 0 0 x db2 - const __m128i H = _mm_add_epi8(G, D); // x dr x db - const __m128i I = _mm_and_si128(H, mask_rb); // 0 dr 0 db - const __m128i out = _mm_sub_epi8(in, I); - _mm_storeu_si128((__m128i*)&argb_data[i], out); - } - // fallthrough and finish off with plain-C - if (i != num_pixels) { - VP8LTransformColor_C(m, argb_data + i, num_pixels - i); - } -} - -//------------------------------------------------------------------------------ -#define SPAN 8 -static void CollectColorBlueTransforms_SSE2(const uint32_t* argb, int stride, - int tile_width, int tile_height, - int green_to_blue, int red_to_blue, - int histo[]) { - const __m128i mults_r = MK_CST_16(CST_5b(red_to_blue), 0); - const __m128i mults_g = MK_CST_16(0, CST_5b(green_to_blue)); - const __m128i mask_g = _mm_set1_epi32(0x00ff00); // green mask - const __m128i mask_b = _mm_set1_epi32(0x0000ff); // blue mask - int y; - for (y = 0; y < tile_height; ++y) { - const uint32_t* const src = argb + y * stride; - int i, x; - for (x = 0; x + SPAN <= tile_width; x += SPAN) { - uint16_t values[SPAN]; - const __m128i in0 = _mm_loadu_si128((__m128i*)&src[x + 0]); - const __m128i in1 = _mm_loadu_si128((__m128i*)&src[x + SPAN / 2]); - const __m128i A0 = _mm_slli_epi16(in0, 8); // r 0 | b 0 - const __m128i A1 = _mm_slli_epi16(in1, 8); - const __m128i B0 = _mm_and_si128(in0, mask_g); // 0 0 | g 0 - const __m128i B1 = _mm_and_si128(in1, mask_g); - const __m128i C0 = _mm_mulhi_epi16(A0, mults_r); // x db | 0 0 - const __m128i C1 = _mm_mulhi_epi16(A1, mults_r); - const __m128i D0 = _mm_mulhi_epi16(B0, mults_g); // 0 0 | x db - const __m128i D1 = _mm_mulhi_epi16(B1, mults_g); - const __m128i E0 = _mm_sub_epi8(in0, D0); // x x | x b' - const __m128i E1 = _mm_sub_epi8(in1, D1); - const __m128i F0 = _mm_srli_epi32(C0, 16); // 0 0 | x db - const __m128i F1 = _mm_srli_epi32(C1, 16); - const __m128i G0 = _mm_sub_epi8(E0, F0); // 0 0 | x b' - const __m128i G1 = _mm_sub_epi8(E1, F1); - const __m128i H0 = _mm_and_si128(G0, mask_b); // 0 0 | 0 b - const __m128i H1 = _mm_and_si128(G1, mask_b); - const __m128i I = _mm_packs_epi32(H0, H1); // 0 b' | 0 b' - _mm_storeu_si128((__m128i*)values, I); - for (i = 0; i < SPAN; ++i) ++histo[values[i]]; - } - } - { - const int left_over = tile_width & (SPAN - 1); - if (left_over > 0) { - VP8LCollectColorBlueTransforms_C(argb + tile_width - left_over, stride, - left_over, tile_height, - green_to_blue, red_to_blue, histo); - } - } -} - -static void CollectColorRedTransforms_SSE2(const uint32_t* argb, int stride, - int tile_width, int tile_height, - int green_to_red, int histo[]) { - const __m128i mults_g = MK_CST_16(0, CST_5b(green_to_red)); - const __m128i mask_g = _mm_set1_epi32(0x00ff00); // green mask - const __m128i mask = _mm_set1_epi32(0xff); - - int y; - for (y = 0; y < tile_height; ++y) { - const uint32_t* const src = argb + y * stride; - int i, x; - for (x = 0; x + SPAN <= tile_width; x += SPAN) { - uint16_t values[SPAN]; - const __m128i in0 = _mm_loadu_si128((__m128i*)&src[x + 0]); - const __m128i in1 = _mm_loadu_si128((__m128i*)&src[x + SPAN / 2]); - const __m128i A0 = _mm_and_si128(in0, mask_g); // 0 0 | g 0 - const __m128i A1 = _mm_and_si128(in1, mask_g); - const __m128i B0 = _mm_srli_epi32(in0, 16); // 0 0 | x r - const __m128i B1 = _mm_srli_epi32(in1, 16); - const __m128i C0 = _mm_mulhi_epi16(A0, mults_g); // 0 0 | x dr - const __m128i C1 = _mm_mulhi_epi16(A1, mults_g); - const __m128i E0 = _mm_sub_epi8(B0, C0); // x x | x r' - const __m128i E1 = _mm_sub_epi8(B1, C1); - const __m128i F0 = _mm_and_si128(E0, mask); // 0 0 | 0 r' - const __m128i F1 = _mm_and_si128(E1, mask); - const __m128i I = _mm_packs_epi32(F0, F1); - _mm_storeu_si128((__m128i*)values, I); - for (i = 0; i < SPAN; ++i) ++histo[values[i]]; - } - } - { - const int left_over = tile_width & (SPAN - 1); - if (left_over > 0) { - VP8LCollectColorRedTransforms_C(argb + tile_width - left_over, stride, - left_over, tile_height, - green_to_red, histo); - } - } -} -#undef SPAN -#undef MK_CST_16 - -//------------------------------------------------------------------------------ - -#define LINE_SIZE 16 // 8 or 16 -static void AddVector_SSE2(const uint32_t* a, const uint32_t* b, uint32_t* out, - int size) { - int i; - assert(size % LINE_SIZE == 0); - for (i = 0; i < size; i += LINE_SIZE) { - const __m128i a0 = _mm_loadu_si128((const __m128i*)&a[i + 0]); - const __m128i a1 = _mm_loadu_si128((const __m128i*)&a[i + 4]); -#if (LINE_SIZE == 16) - const __m128i a2 = _mm_loadu_si128((const __m128i*)&a[i + 8]); - const __m128i a3 = _mm_loadu_si128((const __m128i*)&a[i + 12]); -#endif - const __m128i b0 = _mm_loadu_si128((const __m128i*)&b[i + 0]); - const __m128i b1 = _mm_loadu_si128((const __m128i*)&b[i + 4]); -#if (LINE_SIZE == 16) - const __m128i b2 = _mm_loadu_si128((const __m128i*)&b[i + 8]); - const __m128i b3 = _mm_loadu_si128((const __m128i*)&b[i + 12]); -#endif - _mm_storeu_si128((__m128i*)&out[i + 0], _mm_add_epi32(a0, b0)); - _mm_storeu_si128((__m128i*)&out[i + 4], _mm_add_epi32(a1, b1)); -#if (LINE_SIZE == 16) - _mm_storeu_si128((__m128i*)&out[i + 8], _mm_add_epi32(a2, b2)); - _mm_storeu_si128((__m128i*)&out[i + 12], _mm_add_epi32(a3, b3)); -#endif - } -} - -static void AddVectorEq_SSE2(const uint32_t* a, uint32_t* out, int size) { - int i; - assert(size % LINE_SIZE == 0); - for (i = 0; i < size; i += LINE_SIZE) { - const __m128i a0 = _mm_loadu_si128((const __m128i*)&a[i + 0]); - const __m128i a1 = _mm_loadu_si128((const __m128i*)&a[i + 4]); -#if (LINE_SIZE == 16) - const __m128i a2 = _mm_loadu_si128((const __m128i*)&a[i + 8]); - const __m128i a3 = _mm_loadu_si128((const __m128i*)&a[i + 12]); -#endif - const __m128i b0 = _mm_loadu_si128((const __m128i*)&out[i + 0]); - const __m128i b1 = _mm_loadu_si128((const __m128i*)&out[i + 4]); -#if (LINE_SIZE == 16) - const __m128i b2 = _mm_loadu_si128((const __m128i*)&out[i + 8]); - const __m128i b3 = _mm_loadu_si128((const __m128i*)&out[i + 12]); -#endif - _mm_storeu_si128((__m128i*)&out[i + 0], _mm_add_epi32(a0, b0)); - _mm_storeu_si128((__m128i*)&out[i + 4], _mm_add_epi32(a1, b1)); -#if (LINE_SIZE == 16) - _mm_storeu_si128((__m128i*)&out[i + 8], _mm_add_epi32(a2, b2)); - _mm_storeu_si128((__m128i*)&out[i + 12], _mm_add_epi32(a3, b3)); -#endif - } -} -#undef LINE_SIZE - -// Note we are adding uint32_t's as *signed* int32's (using _mm_add_epi32). But -// that's ok since the histogram values are less than 1<<28 (max picture size). -static void HistogramAdd_SSE2(const VP8LHistogram* const a, - const VP8LHistogram* const b, - VP8LHistogram* const out) { - int i; - const int literal_size = VP8LHistogramNumCodes(a->palette_code_bits_); - assert(a->palette_code_bits_ == b->palette_code_bits_); - if (b != out) { - AddVector_SSE2(a->literal_, b->literal_, out->literal_, NUM_LITERAL_CODES); - AddVector_SSE2(a->red_, b->red_, out->red_, NUM_LITERAL_CODES); - AddVector_SSE2(a->blue_, b->blue_, out->blue_, NUM_LITERAL_CODES); - AddVector_SSE2(a->alpha_, b->alpha_, out->alpha_, NUM_LITERAL_CODES); - } else { - AddVectorEq_SSE2(a->literal_, out->literal_, NUM_LITERAL_CODES); - AddVectorEq_SSE2(a->red_, out->red_, NUM_LITERAL_CODES); - AddVectorEq_SSE2(a->blue_, out->blue_, NUM_LITERAL_CODES); - AddVectorEq_SSE2(a->alpha_, out->alpha_, NUM_LITERAL_CODES); - } - for (i = NUM_LITERAL_CODES; i < literal_size; ++i) { - out->literal_[i] = a->literal_[i] + b->literal_[i]; - } - for (i = 0; i < NUM_DISTANCE_CODES; ++i) { - out->distance_[i] = a->distance_[i] + b->distance_[i]; - } -} - -//------------------------------------------------------------------------------ -// Entropy - -// Checks whether the X or Y contribution is worth computing and adding. -// Used in loop unrolling. -#define ANALYZE_X_OR_Y(x_or_y, j) \ - do { \ - if ((x_or_y)[i + (j)] != 0) retval -= VP8LFastSLog2((x_or_y)[i + (j)]); \ - } while (0) - -// Checks whether the X + Y contribution is worth computing and adding. -// Used in loop unrolling. -#define ANALYZE_XY(j) \ - do { \ - if (tmp[j] != 0) { \ - retval -= VP8LFastSLog2(tmp[j]); \ - ANALYZE_X_OR_Y(X, j); \ - } \ - } while (0) - -static float CombinedShannonEntropy_SSE2(const int X[256], const int Y[256]) { - int i; - double retval = 0.; - int sumX, sumXY; - int32_t tmp[4]; - __m128i zero = _mm_setzero_si128(); - // Sums up X + Y, 4 ints at a time (and will merge it at the end for sumXY). - __m128i sumXY_128 = zero; - __m128i sumX_128 = zero; - - for (i = 0; i < 256; i += 4) { - const __m128i x = _mm_loadu_si128((const __m128i*)(X + i)); - const __m128i y = _mm_loadu_si128((const __m128i*)(Y + i)); - - // Check if any X is non-zero: this actually provides a speedup as X is - // usually sparse. - if (_mm_movemask_epi8(_mm_cmpeq_epi32(x, zero)) != 0xFFFF) { - const __m128i xy_128 = _mm_add_epi32(x, y); - sumXY_128 = _mm_add_epi32(sumXY_128, xy_128); - - sumX_128 = _mm_add_epi32(sumX_128, x); - - // Analyze the different X + Y. - _mm_storeu_si128((__m128i*)tmp, xy_128); - - ANALYZE_XY(0); - ANALYZE_XY(1); - ANALYZE_XY(2); - ANALYZE_XY(3); - } else { - // X is fully 0, so only deal with Y. - sumXY_128 = _mm_add_epi32(sumXY_128, y); - - ANALYZE_X_OR_Y(Y, 0); - ANALYZE_X_OR_Y(Y, 1); - ANALYZE_X_OR_Y(Y, 2); - ANALYZE_X_OR_Y(Y, 3); - } - } - - // Sum up sumX_128 to get sumX. - _mm_storeu_si128((__m128i*)tmp, sumX_128); - sumX = tmp[3] + tmp[2] + tmp[1] + tmp[0]; - - // Sum up sumXY_128 to get sumXY. - _mm_storeu_si128((__m128i*)tmp, sumXY_128); - sumXY = tmp[3] + tmp[2] + tmp[1] + tmp[0]; - - retval += VP8LFastSLog2(sumX) + VP8LFastSLog2(sumXY); - return (float)retval; -} -#undef ANALYZE_X_OR_Y -#undef ANALYZE_XY - -//------------------------------------------------------------------------------ - -static int VectorMismatch_SSE2(const uint32_t* const array1, - const uint32_t* const array2, int length) { - int match_len; - - if (length >= 12) { - __m128i A0 = _mm_loadu_si128((const __m128i*)&array1[0]); - __m128i A1 = _mm_loadu_si128((const __m128i*)&array2[0]); - match_len = 0; - do { - // Loop unrolling and early load both provide a speedup of 10% for the - // current function. Also, max_limit can be MAX_LENGTH=4096 at most. - const __m128i cmpA = _mm_cmpeq_epi32(A0, A1); - const __m128i B0 = - _mm_loadu_si128((const __m128i*)&array1[match_len + 4]); - const __m128i B1 = - _mm_loadu_si128((const __m128i*)&array2[match_len + 4]); - if (_mm_movemask_epi8(cmpA) != 0xffff) break; - match_len += 4; - - { - const __m128i cmpB = _mm_cmpeq_epi32(B0, B1); - A0 = _mm_loadu_si128((const __m128i*)&array1[match_len + 4]); - A1 = _mm_loadu_si128((const __m128i*)&array2[match_len + 4]); - if (_mm_movemask_epi8(cmpB) != 0xffff) break; - match_len += 4; - } - } while (match_len + 12 < length); - } else { - match_len = 0; - // Unroll the potential first two loops. - if (length >= 4 && - _mm_movemask_epi8(_mm_cmpeq_epi32( - _mm_loadu_si128((const __m128i*)&array1[0]), - _mm_loadu_si128((const __m128i*)&array2[0]))) == 0xffff) { - match_len = 4; - if (length >= 8 && - _mm_movemask_epi8(_mm_cmpeq_epi32( - _mm_loadu_si128((const __m128i*)&array1[4]), - _mm_loadu_si128((const __m128i*)&array2[4]))) == 0xffff) { - match_len = 8; - } - } - } - - while (match_len < length && array1[match_len] == array2[match_len]) { - ++match_len; - } - return match_len; -} - -// Bundles multiple (1, 2, 4 or 8) pixels into a single pixel. -static void BundleColorMap_SSE2(const uint8_t* const row, int width, int xbits, - uint32_t* dst) { - int x; - assert(xbits >= 0); - assert(xbits <= 3); - switch (xbits) { - case 0: { - const __m128i ff = _mm_set1_epi16(0xff00); - const __m128i zero = _mm_setzero_si128(); - // Store 0xff000000 | (row[x] << 8). - for (x = 0; x + 16 <= width; x += 16, dst += 16) { - const __m128i in = _mm_loadu_si128((const __m128i*)&row[x]); - const __m128i in_lo = _mm_unpacklo_epi8(zero, in); - const __m128i dst0 = _mm_unpacklo_epi16(in_lo, ff); - const __m128i dst1 = _mm_unpackhi_epi16(in_lo, ff); - const __m128i in_hi = _mm_unpackhi_epi8(zero, in); - const __m128i dst2 = _mm_unpacklo_epi16(in_hi, ff); - const __m128i dst3 = _mm_unpackhi_epi16(in_hi, ff); - _mm_storeu_si128((__m128i*)&dst[0], dst0); - _mm_storeu_si128((__m128i*)&dst[4], dst1); - _mm_storeu_si128((__m128i*)&dst[8], dst2); - _mm_storeu_si128((__m128i*)&dst[12], dst3); - } - break; - } - case 1: { - const __m128i ff = _mm_set1_epi16(0xff00); - const __m128i mul = _mm_set1_epi16(0x110); - for (x = 0; x + 16 <= width; x += 16, dst += 8) { - // 0a0b | (where a/b are 4 bits). - const __m128i in = _mm_loadu_si128((const __m128i*)&row[x]); - const __m128i tmp = _mm_mullo_epi16(in, mul); // aba0 - const __m128i pack = _mm_and_si128(tmp, ff); // ab00 - const __m128i dst0 = _mm_unpacklo_epi16(pack, ff); - const __m128i dst1 = _mm_unpackhi_epi16(pack, ff); - _mm_storeu_si128((__m128i*)&dst[0], dst0); - _mm_storeu_si128((__m128i*)&dst[4], dst1); - } - break; - } - case 2: { - const __m128i mask_or = _mm_set1_epi32(0xff000000); - const __m128i mul_cst = _mm_set1_epi16(0x0104); - const __m128i mask_mul = _mm_set1_epi16(0x0f00); - for (x = 0; x + 16 <= width; x += 16, dst += 4) { - // 000a000b000c000d | (where a/b/c/d are 2 bits). - const __m128i in = _mm_loadu_si128((const __m128i*)&row[x]); - const __m128i mul = _mm_mullo_epi16(in, mul_cst); // 00ab00b000cd00d0 - const __m128i tmp = _mm_and_si128(mul, mask_mul); // 00ab000000cd0000 - const __m128i shift = _mm_srli_epi32(tmp, 12); // 00000000ab000000 - const __m128i pack = _mm_or_si128(shift, tmp); // 00000000abcd0000 - // Convert to 0xff00**00. - const __m128i res = _mm_or_si128(pack, mask_or); - _mm_storeu_si128((__m128i*)dst, res); - } - break; - } - default: { - assert(xbits == 3); - for (x = 0; x + 16 <= width; x += 16, dst += 2) { - // 0000000a00000000b... | (where a/b are 1 bit). - const __m128i in = _mm_loadu_si128((const __m128i*)&row[x]); - const __m128i shift = _mm_slli_epi64(in, 7); - const uint32_t move = _mm_movemask_epi8(shift); - dst[0] = 0xff000000 | ((move & 0xff) << 8); - dst[1] = 0xff000000 | (move & 0xff00); - } - break; - } - } - if (x != width) { - VP8LBundleColorMap_C(row + x, width - x, xbits, dst); - } -} - -//------------------------------------------------------------------------------ -// Batch version of Predictor Transform subtraction - -static WEBP_INLINE void Average2_m128i(const __m128i* const a0, - const __m128i* const a1, - __m128i* const avg) { - // (a + b) >> 1 = ((a + b + 1) >> 1) - ((a ^ b) & 1) - const __m128i ones = _mm_set1_epi8(1); - const __m128i avg1 = _mm_avg_epu8(*a0, *a1); - const __m128i one = _mm_and_si128(_mm_xor_si128(*a0, *a1), ones); - *avg = _mm_sub_epi8(avg1, one); -} - -// Predictor0: ARGB_BLACK. -static void PredictorSub0_SSE2(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - const __m128i black = _mm_set1_epi32(ARGB_BLACK); - for (i = 0; i + 4 <= num_pixels; i += 4) { - const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); - const __m128i res = _mm_sub_epi8(src, black); - _mm_storeu_si128((__m128i*)&out[i], res); - } - if (i != num_pixels) { - VP8LPredictorsSub_C[0](in + i, upper + i, num_pixels - i, out + i); - } -} - -#define GENERATE_PREDICTOR_1(X, IN) \ -static void PredictorSub##X##_SSE2(const uint32_t* in, const uint32_t* upper, \ - int num_pixels, uint32_t* out) { \ - int i; \ - for (i = 0; i + 4 <= num_pixels; i += 4) { \ - const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); \ - const __m128i pred = _mm_loadu_si128((const __m128i*)&(IN)); \ - const __m128i res = _mm_sub_epi8(src, pred); \ - _mm_storeu_si128((__m128i*)&out[i], res); \ - } \ - if (i != num_pixels) { \ - VP8LPredictorsSub_C[(X)](in + i, upper + i, num_pixels - i, out + i); \ - } \ -} - -GENERATE_PREDICTOR_1(1, in[i - 1]) // Predictor1: L -GENERATE_PREDICTOR_1(2, upper[i]) // Predictor2: T -GENERATE_PREDICTOR_1(3, upper[i + 1]) // Predictor3: TR -GENERATE_PREDICTOR_1(4, upper[i - 1]) // Predictor4: TL -#undef GENERATE_PREDICTOR_1 - -// Predictor5: avg2(avg2(L, TR), T) -static void PredictorSub5_SSE2(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - for (i = 0; i + 4 <= num_pixels; i += 4) { - const __m128i L = _mm_loadu_si128((const __m128i*)&in[i - 1]); - const __m128i T = _mm_loadu_si128((const __m128i*)&upper[i]); - const __m128i TR = _mm_loadu_si128((const __m128i*)&upper[i + 1]); - const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); - __m128i avg, pred, res; - Average2_m128i(&L, &TR, &avg); - Average2_m128i(&avg, &T, &pred); - res = _mm_sub_epi8(src, pred); - _mm_storeu_si128((__m128i*)&out[i], res); - } - if (i != num_pixels) { - VP8LPredictorsSub_C[5](in + i, upper + i, num_pixels - i, out + i); - } -} - -#define GENERATE_PREDICTOR_2(X, A, B) \ -static void PredictorSub##X##_SSE2(const uint32_t* in, const uint32_t* upper, \ - int num_pixels, uint32_t* out) { \ - int i; \ - for (i = 0; i + 4 <= num_pixels; i += 4) { \ - const __m128i tA = _mm_loadu_si128((const __m128i*)&(A)); \ - const __m128i tB = _mm_loadu_si128((const __m128i*)&(B)); \ - const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); \ - __m128i pred, res; \ - Average2_m128i(&tA, &tB, &pred); \ - res = _mm_sub_epi8(src, pred); \ - _mm_storeu_si128((__m128i*)&out[i], res); \ - } \ - if (i != num_pixels) { \ - VP8LPredictorsSub_C[(X)](in + i, upper + i, num_pixels - i, out + i); \ - } \ -} - -GENERATE_PREDICTOR_2(6, in[i - 1], upper[i - 1]) // Predictor6: avg(L, TL) -GENERATE_PREDICTOR_2(7, in[i - 1], upper[i]) // Predictor7: avg(L, T) -GENERATE_PREDICTOR_2(8, upper[i - 1], upper[i]) // Predictor8: avg(TL, T) -GENERATE_PREDICTOR_2(9, upper[i], upper[i + 1]) // Predictor9: average(T, TR) -#undef GENERATE_PREDICTOR_2 - -// Predictor10: avg(avg(L,TL), avg(T, TR)). -static void PredictorSub10_SSE2(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - for (i = 0; i + 4 <= num_pixels; i += 4) { - const __m128i L = _mm_loadu_si128((const __m128i*)&in[i - 1]); - const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); - const __m128i TL = _mm_loadu_si128((const __m128i*)&upper[i - 1]); - const __m128i T = _mm_loadu_si128((const __m128i*)&upper[i]); - const __m128i TR = _mm_loadu_si128((const __m128i*)&upper[i + 1]); - __m128i avgTTR, avgLTL, avg, res; - Average2_m128i(&T, &TR, &avgTTR); - Average2_m128i(&L, &TL, &avgLTL); - Average2_m128i(&avgTTR, &avgLTL, &avg); - res = _mm_sub_epi8(src, avg); - _mm_storeu_si128((__m128i*)&out[i], res); - } - if (i != num_pixels) { - VP8LPredictorsSub_C[10](in + i, upper + i, num_pixels - i, out + i); - } -} - -// Predictor11: select. -static void GetSumAbsDiff32_SSE2(const __m128i* const A, const __m128i* const B, - __m128i* const out) { - // We can unpack with any value on the upper 32 bits, provided it's the same - // on both operands (to that their sum of abs diff is zero). Here we use *A. - const __m128i A_lo = _mm_unpacklo_epi32(*A, *A); - const __m128i B_lo = _mm_unpacklo_epi32(*B, *A); - const __m128i A_hi = _mm_unpackhi_epi32(*A, *A); - const __m128i B_hi = _mm_unpackhi_epi32(*B, *A); - const __m128i s_lo = _mm_sad_epu8(A_lo, B_lo); - const __m128i s_hi = _mm_sad_epu8(A_hi, B_hi); - *out = _mm_packs_epi32(s_lo, s_hi); -} - -static void PredictorSub11_SSE2(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - for (i = 0; i + 4 <= num_pixels; i += 4) { - const __m128i L = _mm_loadu_si128((const __m128i*)&in[i - 1]); - const __m128i T = _mm_loadu_si128((const __m128i*)&upper[i]); - const __m128i TL = _mm_loadu_si128((const __m128i*)&upper[i - 1]); - const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); - __m128i pa, pb; - GetSumAbsDiff32_SSE2(&T, &TL, &pa); // pa = sum |T-TL| - GetSumAbsDiff32_SSE2(&L, &TL, &pb); // pb = sum |L-TL| - { - const __m128i mask = _mm_cmpgt_epi32(pb, pa); - const __m128i A = _mm_and_si128(mask, L); - const __m128i B = _mm_andnot_si128(mask, T); - const __m128i pred = _mm_or_si128(A, B); // pred = (L > T)? L : T - const __m128i res = _mm_sub_epi8(src, pred); - _mm_storeu_si128((__m128i*)&out[i], res); - } - } - if (i != num_pixels) { - VP8LPredictorsSub_C[11](in + i, upper + i, num_pixels - i, out + i); - } -} - -// Predictor12: ClampedSubSubtractFull. -static void PredictorSub12_SSE2(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - const __m128i zero = _mm_setzero_si128(); - for (i = 0; i + 4 <= num_pixels; i += 4) { - const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); - const __m128i L = _mm_loadu_si128((const __m128i*)&in[i - 1]); - const __m128i L_lo = _mm_unpacklo_epi8(L, zero); - const __m128i L_hi = _mm_unpackhi_epi8(L, zero); - const __m128i T = _mm_loadu_si128((const __m128i*)&upper[i]); - const __m128i T_lo = _mm_unpacklo_epi8(T, zero); - const __m128i T_hi = _mm_unpackhi_epi8(T, zero); - const __m128i TL = _mm_loadu_si128((const __m128i*)&upper[i - 1]); - const __m128i TL_lo = _mm_unpacklo_epi8(TL, zero); - const __m128i TL_hi = _mm_unpackhi_epi8(TL, zero); - const __m128i diff_lo = _mm_sub_epi16(T_lo, TL_lo); - const __m128i diff_hi = _mm_sub_epi16(T_hi, TL_hi); - const __m128i pred_lo = _mm_add_epi16(L_lo, diff_lo); - const __m128i pred_hi = _mm_add_epi16(L_hi, diff_hi); - const __m128i pred = _mm_packus_epi16(pred_lo, pred_hi); - const __m128i res = _mm_sub_epi8(src, pred); - _mm_storeu_si128((__m128i*)&out[i], res); - } - if (i != num_pixels) { - VP8LPredictorsSub_C[12](in + i, upper + i, num_pixels - i, out + i); - } -} - -// Predictors13: ClampedAddSubtractHalf -static void PredictorSub13_SSE2(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - const __m128i zero = _mm_setzero_si128(); - for (i = 0; i + 2 <= num_pixels; i += 2) { - // we can only process two pixels at a time - const __m128i L = _mm_loadl_epi64((const __m128i*)&in[i - 1]); - const __m128i src = _mm_loadl_epi64((const __m128i*)&in[i]); - const __m128i T = _mm_loadl_epi64((const __m128i*)&upper[i]); - const __m128i TL = _mm_loadl_epi64((const __m128i*)&upper[i - 1]); - const __m128i L_lo = _mm_unpacklo_epi8(L, zero); - const __m128i T_lo = _mm_unpacklo_epi8(T, zero); - const __m128i TL_lo = _mm_unpacklo_epi8(TL, zero); - const __m128i sum = _mm_add_epi16(T_lo, L_lo); - const __m128i avg = _mm_srli_epi16(sum, 1); - const __m128i A1 = _mm_sub_epi16(avg, TL_lo); - const __m128i bit_fix = _mm_cmpgt_epi16(TL_lo, avg); - const __m128i A2 = _mm_sub_epi16(A1, bit_fix); - const __m128i A3 = _mm_srai_epi16(A2, 1); - const __m128i A4 = _mm_add_epi16(avg, A3); - const __m128i pred = _mm_packus_epi16(A4, A4); - const __m128i res = _mm_sub_epi8(src, pred); - _mm_storel_epi64((__m128i*)&out[i], res); - } - if (i != num_pixels) { - VP8LPredictorsSub_C[13](in + i, upper + i, num_pixels - i, out + i); - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8LEncDspInitSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8LEncDspInitSSE2(void) { - VP8LSubtractGreenFromBlueAndRed = SubtractGreenFromBlueAndRed_SSE2; - VP8LTransformColor = TransformColor_SSE2; - VP8LCollectColorBlueTransforms = CollectColorBlueTransforms_SSE2; - VP8LCollectColorRedTransforms = CollectColorRedTransforms_SSE2; - VP8LHistogramAdd = HistogramAdd_SSE2; - VP8LCombinedShannonEntropy = CombinedShannonEntropy_SSE2; - VP8LVectorMismatch = VectorMismatch_SSE2; - VP8LBundleColorMap = BundleColorMap_SSE2; - - VP8LPredictorsSub[0] = PredictorSub0_SSE2; - VP8LPredictorsSub[1] = PredictorSub1_SSE2; - VP8LPredictorsSub[2] = PredictorSub2_SSE2; - VP8LPredictorsSub[3] = PredictorSub3_SSE2; - VP8LPredictorsSub[4] = PredictorSub4_SSE2; - VP8LPredictorsSub[5] = PredictorSub5_SSE2; - VP8LPredictorsSub[6] = PredictorSub6_SSE2; - VP8LPredictorsSub[7] = PredictorSub7_SSE2; - VP8LPredictorsSub[8] = PredictorSub8_SSE2; - VP8LPredictorsSub[9] = PredictorSub9_SSE2; - VP8LPredictorsSub[10] = PredictorSub10_SSE2; - VP8LPredictorsSub[11] = PredictorSub11_SSE2; - VP8LPredictorsSub[12] = PredictorSub12_SSE2; - VP8LPredictorsSub[13] = PredictorSub13_SSE2; - VP8LPredictorsSub[14] = PredictorSub0_SSE2; // <- padding security sentinels - VP8LPredictorsSub[15] = PredictorSub0_SSE2; -} - -#else // !WEBP_USE_SSE2 - -WEBP_DSP_INIT_STUB(VP8LEncDspInitSSE2) - -#endif // WEBP_USE_SSE2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_sse41.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_sse41.c deleted file mode 100644 index 9cac5f8..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_enc_sse41.c +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE4.1 variant of methods for lossless encoder -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE41) -#include -#include -#include "src/dsp/lossless.h" - -// For sign-extended multiplying constants, pre-shifted by 5: -#define CST_5b(X) (((int16_t)((uint16_t)(X) << 8)) >> 5) - -//------------------------------------------------------------------------------ -// Subtract-Green Transform - -static void SubtractGreenFromBlueAndRed_SSE41(uint32_t* argb_data, - int num_pixels) { - int i; - const __m128i kCstShuffle = _mm_set_epi8(-1, 13, -1, 13, -1, 9, -1, 9, - -1, 5, -1, 5, -1, 1, -1, 1); - for (i = 0; i + 4 <= num_pixels; i += 4) { - const __m128i in = _mm_loadu_si128((__m128i*)&argb_data[i]); - const __m128i in_0g0g = _mm_shuffle_epi8(in, kCstShuffle); - const __m128i out = _mm_sub_epi8(in, in_0g0g); - _mm_storeu_si128((__m128i*)&argb_data[i], out); - } - // fallthrough and finish off with plain-C - if (i != num_pixels) { - VP8LSubtractGreenFromBlueAndRed_C(argb_data + i, num_pixels - i); - } -} - -//------------------------------------------------------------------------------ -// Color Transform - -#define SPAN 8 -static void CollectColorBlueTransforms_SSE41(const uint32_t* argb, int stride, - int tile_width, int tile_height, - int green_to_blue, int red_to_blue, - int histo[]) { - const __m128i mults_r = _mm_set1_epi16(CST_5b(red_to_blue)); - const __m128i mults_g = _mm_set1_epi16(CST_5b(green_to_blue)); - const __m128i mask_g = _mm_set1_epi16(0xff00); // green mask - const __m128i mask_gb = _mm_set1_epi32(0xffff); // green/blue mask - const __m128i mask_b = _mm_set1_epi16(0x00ff); // blue mask - const __m128i shuffler_lo = _mm_setr_epi8(-1, 2, -1, 6, -1, 10, -1, 14, -1, - -1, -1, -1, -1, -1, -1, -1); - const __m128i shuffler_hi = _mm_setr_epi8(-1, -1, -1, -1, -1, -1, -1, -1, -1, - 2, -1, 6, -1, 10, -1, 14); - int y; - for (y = 0; y < tile_height; ++y) { - const uint32_t* const src = argb + y * stride; - int i, x; - for (x = 0; x + SPAN <= tile_width; x += SPAN) { - uint16_t values[SPAN]; - const __m128i in0 = _mm_loadu_si128((__m128i*)&src[x + 0]); - const __m128i in1 = _mm_loadu_si128((__m128i*)&src[x + SPAN / 2]); - const __m128i r0 = _mm_shuffle_epi8(in0, shuffler_lo); - const __m128i r1 = _mm_shuffle_epi8(in1, shuffler_hi); - const __m128i r = _mm_or_si128(r0, r1); // r 0 - const __m128i gb0 = _mm_and_si128(in0, mask_gb); - const __m128i gb1 = _mm_and_si128(in1, mask_gb); - const __m128i gb = _mm_packus_epi32(gb0, gb1); // g b - const __m128i g = _mm_and_si128(gb, mask_g); // g 0 - const __m128i A = _mm_mulhi_epi16(r, mults_r); // x dbr - const __m128i B = _mm_mulhi_epi16(g, mults_g); // x dbg - const __m128i C = _mm_sub_epi8(gb, B); // x b' - const __m128i D = _mm_sub_epi8(C, A); // x b'' - const __m128i E = _mm_and_si128(D, mask_b); // 0 b'' - _mm_storeu_si128((__m128i*)values, E); - for (i = 0; i < SPAN; ++i) ++histo[values[i]]; - } - } - { - const int left_over = tile_width & (SPAN - 1); - if (left_over > 0) { - VP8LCollectColorBlueTransforms_C(argb + tile_width - left_over, stride, - left_over, tile_height, - green_to_blue, red_to_blue, histo); - } - } -} - -static void CollectColorRedTransforms_SSE41(const uint32_t* argb, int stride, - int tile_width, int tile_height, - int green_to_red, int histo[]) { - const __m128i mults_g = _mm_set1_epi16(CST_5b(green_to_red)); - const __m128i mask_g = _mm_set1_epi32(0x00ff00); // green mask - const __m128i mask = _mm_set1_epi16(0xff); - - int y; - for (y = 0; y < tile_height; ++y) { - const uint32_t* const src = argb + y * stride; - int i, x; - for (x = 0; x + SPAN <= tile_width; x += SPAN) { - uint16_t values[SPAN]; - const __m128i in0 = _mm_loadu_si128((__m128i*)&src[x + 0]); - const __m128i in1 = _mm_loadu_si128((__m128i*)&src[x + SPAN / 2]); - const __m128i g0 = _mm_and_si128(in0, mask_g); // 0 0 | g 0 - const __m128i g1 = _mm_and_si128(in1, mask_g); - const __m128i g = _mm_packus_epi32(g0, g1); // g 0 - const __m128i A0 = _mm_srli_epi32(in0, 16); // 0 0 | x r - const __m128i A1 = _mm_srli_epi32(in1, 16); - const __m128i A = _mm_packus_epi32(A0, A1); // x r - const __m128i B = _mm_mulhi_epi16(g, mults_g); // x dr - const __m128i C = _mm_sub_epi8(A, B); // x r' - const __m128i D = _mm_and_si128(C, mask); // 0 r' - _mm_storeu_si128((__m128i*)values, D); - for (i = 0; i < SPAN; ++i) ++histo[values[i]]; - } - } - { - const int left_over = tile_width & (SPAN - 1); - if (left_over > 0) { - VP8LCollectColorRedTransforms_C(argb + tile_width - left_over, stride, - left_over, tile_height, green_to_red, - histo); - } - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8LEncDspInitSSE41(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8LEncDspInitSSE41(void) { - VP8LSubtractGreenFromBlueAndRed = SubtractGreenFromBlueAndRed_SSE41; - VP8LCollectColorBlueTransforms = CollectColorBlueTransforms_SSE41; - VP8LCollectColorRedTransforms = CollectColorRedTransforms_SSE41; -} - -#else // !WEBP_USE_SSE41 - -WEBP_DSP_INIT_STUB(VP8LEncDspInitSSE41) - -#endif // WEBP_USE_SSE41 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_mips_dsp_r2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_mips_dsp_r2.c deleted file mode 100644 index 4ef16dc..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_mips_dsp_r2.c +++ /dev/null @@ -1,696 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Image transforms and color space conversion methods for lossless decoder. -// -// Author(s): Djordje Pesut (djordje.pesut@imgtec.com) -// Jovan Zelincevic (jovan.zelincevic@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS_DSP_R2) - -#include "src/dsp/lossless.h" -#include "src/dsp/lossless_common.h" - -#define MAP_COLOR_FUNCS(FUNC_NAME, TYPE, GET_INDEX, GET_VALUE) \ -static void FUNC_NAME(const TYPE* src, \ - const uint32_t* const color_map, \ - TYPE* dst, int y_start, int y_end, \ - int width) { \ - int y; \ - for (y = y_start; y < y_end; ++y) { \ - int x; \ - for (x = 0; x < (width >> 2); ++x) { \ - int tmp1, tmp2, tmp3, tmp4; \ - __asm__ volatile ( \ - ".ifc " #TYPE ", uint8_t \n\t" \ - "lbu %[tmp1], 0(%[src]) \n\t" \ - "lbu %[tmp2], 1(%[src]) \n\t" \ - "lbu %[tmp3], 2(%[src]) \n\t" \ - "lbu %[tmp4], 3(%[src]) \n\t" \ - "addiu %[src], %[src], 4 \n\t" \ - ".endif \n\t" \ - ".ifc " #TYPE ", uint32_t \n\t" \ - "lw %[tmp1], 0(%[src]) \n\t" \ - "lw %[tmp2], 4(%[src]) \n\t" \ - "lw %[tmp3], 8(%[src]) \n\t" \ - "lw %[tmp4], 12(%[src]) \n\t" \ - "ext %[tmp1], %[tmp1], 8, 8 \n\t" \ - "ext %[tmp2], %[tmp2], 8, 8 \n\t" \ - "ext %[tmp3], %[tmp3], 8, 8 \n\t" \ - "ext %[tmp4], %[tmp4], 8, 8 \n\t" \ - "addiu %[src], %[src], 16 \n\t" \ - ".endif \n\t" \ - "sll %[tmp1], %[tmp1], 2 \n\t" \ - "sll %[tmp2], %[tmp2], 2 \n\t" \ - "sll %[tmp3], %[tmp3], 2 \n\t" \ - "sll %[tmp4], %[tmp4], 2 \n\t" \ - "lwx %[tmp1], %[tmp1](%[color_map]) \n\t" \ - "lwx %[tmp2], %[tmp2](%[color_map]) \n\t" \ - "lwx %[tmp3], %[tmp3](%[color_map]) \n\t" \ - "lwx %[tmp4], %[tmp4](%[color_map]) \n\t" \ - ".ifc " #TYPE ", uint8_t \n\t" \ - "ext %[tmp1], %[tmp1], 8, 8 \n\t" \ - "ext %[tmp2], %[tmp2], 8, 8 \n\t" \ - "ext %[tmp3], %[tmp3], 8, 8 \n\t" \ - "ext %[tmp4], %[tmp4], 8, 8 \n\t" \ - "sb %[tmp1], 0(%[dst]) \n\t" \ - "sb %[tmp2], 1(%[dst]) \n\t" \ - "sb %[tmp3], 2(%[dst]) \n\t" \ - "sb %[tmp4], 3(%[dst]) \n\t" \ - "addiu %[dst], %[dst], 4 \n\t" \ - ".endif \n\t" \ - ".ifc " #TYPE ", uint32_t \n\t" \ - "sw %[tmp1], 0(%[dst]) \n\t" \ - "sw %[tmp2], 4(%[dst]) \n\t" \ - "sw %[tmp3], 8(%[dst]) \n\t" \ - "sw %[tmp4], 12(%[dst]) \n\t" \ - "addiu %[dst], %[dst], 16 \n\t" \ - ".endif \n\t" \ - : [tmp1]"=&r"(tmp1), [tmp2]"=&r"(tmp2), [tmp3]"=&r"(tmp3), \ - [tmp4]"=&r"(tmp4), [src]"+&r"(src), [dst]"+r"(dst) \ - : [color_map]"r"(color_map) \ - : "memory" \ - ); \ - } \ - for (x = 0; x < (width & 3); ++x) { \ - *dst++ = GET_VALUE(color_map[GET_INDEX(*src++)]); \ - } \ - } \ -} - -MAP_COLOR_FUNCS(MapARGB_MIPSdspR2, uint32_t, VP8GetARGBIndex, VP8GetARGBValue) -MAP_COLOR_FUNCS(MapAlpha_MIPSdspR2, uint8_t, VP8GetAlphaIndex, VP8GetAlphaValue) - -#undef MAP_COLOR_FUNCS - -static WEBP_INLINE uint32_t ClampedAddSubtractFull(uint32_t c0, uint32_t c1, - uint32_t c2) { - int temp0, temp1, temp2, temp3, temp4, temp5; - __asm__ volatile ( - "preceu.ph.qbr %[temp1], %[c0] \n\t" - "preceu.ph.qbl %[temp2], %[c0] \n\t" - "preceu.ph.qbr %[temp3], %[c1] \n\t" - "preceu.ph.qbl %[temp4], %[c1] \n\t" - "preceu.ph.qbr %[temp5], %[c2] \n\t" - "preceu.ph.qbl %[temp0], %[c2] \n\t" - "subq.ph %[temp3], %[temp3], %[temp5] \n\t" - "subq.ph %[temp4], %[temp4], %[temp0] \n\t" - "addq.ph %[temp1], %[temp1], %[temp3] \n\t" - "addq.ph %[temp2], %[temp2], %[temp4] \n\t" - "shll_s.ph %[temp1], %[temp1], 7 \n\t" - "shll_s.ph %[temp2], %[temp2], 7 \n\t" - "precrqu_s.qb.ph %[temp2], %[temp2], %[temp1] \n\t" - : [temp0]"=r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5) - : [c0]"r"(c0), [c1]"r"(c1), [c2]"r"(c2) - : "memory" - ); - return temp2; -} - -static WEBP_INLINE uint32_t ClampedAddSubtractHalf(uint32_t c0, uint32_t c1, - uint32_t c2) { - int temp0, temp1, temp2, temp3, temp4, temp5; - __asm__ volatile ( - "adduh.qb %[temp5], %[c0], %[c1] \n\t" - "preceu.ph.qbr %[temp3], %[c2] \n\t" - "preceu.ph.qbr %[temp1], %[temp5] \n\t" - "preceu.ph.qbl %[temp2], %[temp5] \n\t" - "preceu.ph.qbl %[temp4], %[c2] \n\t" - "subq.ph %[temp3], %[temp1], %[temp3] \n\t" - "subq.ph %[temp4], %[temp2], %[temp4] \n\t" - "shrl.ph %[temp5], %[temp3], 15 \n\t" - "shrl.ph %[temp0], %[temp4], 15 \n\t" - "addq.ph %[temp3], %[temp3], %[temp5] \n\t" - "addq.ph %[temp4], %[temp0], %[temp4] \n\t" - "shra.ph %[temp3], %[temp3], 1 \n\t" - "shra.ph %[temp4], %[temp4], 1 \n\t" - "addq.ph %[temp1], %[temp1], %[temp3] \n\t" - "addq.ph %[temp2], %[temp2], %[temp4] \n\t" - "shll_s.ph %[temp1], %[temp1], 7 \n\t" - "shll_s.ph %[temp2], %[temp2], 7 \n\t" - "precrqu_s.qb.ph %[temp1], %[temp2], %[temp1] \n\t" - : [temp0]"=r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=r"(temp4), [temp5]"=&r"(temp5) - : [c0]"r"(c0), [c1]"r"(c1), [c2]"r"(c2) - : "memory" - ); - return temp1; -} - -static WEBP_INLINE uint32_t Select(uint32_t a, uint32_t b, uint32_t c) { - int temp0, temp1, temp2, temp3, temp4, temp5; - __asm__ volatile ( - "cmpgdu.lt.qb %[temp1], %[c], %[b] \n\t" - "pick.qb %[temp1], %[b], %[c] \n\t" - "pick.qb %[temp2], %[c], %[b] \n\t" - "cmpgdu.lt.qb %[temp4], %[c], %[a] \n\t" - "pick.qb %[temp4], %[a], %[c] \n\t" - "pick.qb %[temp5], %[c], %[a] \n\t" - "subu.qb %[temp3], %[temp1], %[temp2] \n\t" - "subu.qb %[temp0], %[temp4], %[temp5] \n\t" - "raddu.w.qb %[temp3], %[temp3] \n\t" - "raddu.w.qb %[temp0], %[temp0] \n\t" - "subu %[temp3], %[temp3], %[temp0] \n\t" - "slti %[temp0], %[temp3], 0x1 \n\t" - "movz %[a], %[b], %[temp0] \n\t" - : [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [temp0]"=&r"(temp0), - [a]"+&r"(a) - : [b]"r"(b), [c]"r"(c) - ); - return a; -} - -static WEBP_INLINE uint32_t Average2(uint32_t a0, uint32_t a1) { - __asm__ volatile ( - "adduh.qb %[a0], %[a0], %[a1] \n\t" - : [a0]"+r"(a0) - : [a1]"r"(a1) - ); - return a0; -} - -static WEBP_INLINE uint32_t Average3(uint32_t a0, uint32_t a1, uint32_t a2) { - return Average2(Average2(a0, a2), a1); -} - -static WEBP_INLINE uint32_t Average4(uint32_t a0, uint32_t a1, - uint32_t a2, uint32_t a3) { - return Average2(Average2(a0, a1), Average2(a2, a3)); -} - -static uint32_t Predictor5_MIPSdspR2(uint32_t left, const uint32_t* const top) { - return Average3(left, top[0], top[1]); -} - -static uint32_t Predictor6_MIPSdspR2(uint32_t left, const uint32_t* const top) { - return Average2(left, top[-1]); -} - -static uint32_t Predictor7_MIPSdspR2(uint32_t left, const uint32_t* const top) { - return Average2(left, top[0]); -} - -static uint32_t Predictor8_MIPSdspR2(uint32_t left, const uint32_t* const top) { - (void)left; - return Average2(top[-1], top[0]); -} - -static uint32_t Predictor9_MIPSdspR2(uint32_t left, const uint32_t* const top) { - (void)left; - return Average2(top[0], top[1]); -} - -static uint32_t Predictor10_MIPSdspR2(uint32_t left, - const uint32_t* const top) { - return Average4(left, top[-1], top[0], top[1]); -} - -static uint32_t Predictor11_MIPSdspR2(uint32_t left, - const uint32_t* const top) { - return Select(top[0], left, top[-1]); -} - -static uint32_t Predictor12_MIPSdspR2(uint32_t left, - const uint32_t* const top) { - return ClampedAddSubtractFull(left, top[0], top[-1]); -} - -static uint32_t Predictor13_MIPSdspR2(uint32_t left, - const uint32_t* const top) { - return ClampedAddSubtractHalf(left, top[0], top[-1]); -} - -// Add green to blue and red channels (i.e. perform the inverse transform of -// 'subtract green'). -static void AddGreenToBlueAndRed_MIPSdspR2(const uint32_t* src, int num_pixels, - uint32_t* dst) { - uint32_t temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; - const uint32_t* const p_loop1_end = src + (num_pixels & ~3); - const uint32_t* const p_loop2_end = src + num_pixels; - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "beq %[src], %[p_loop1_end], 3f \n\t" - " nop \n\t" - "0: \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "lw %[temp1], 4(%[src]) \n\t" - "lw %[temp2], 8(%[src]) \n\t" - "lw %[temp3], 12(%[src]) \n\t" - "ext %[temp4], %[temp0], 8, 8 \n\t" - "ext %[temp5], %[temp1], 8, 8 \n\t" - "ext %[temp6], %[temp2], 8, 8 \n\t" - "ext %[temp7], %[temp3], 8, 8 \n\t" - "addiu %[src], %[src], 16 \n\t" - "addiu %[dst], %[dst], 16 \n\t" - "replv.ph %[temp4], %[temp4] \n\t" - "replv.ph %[temp5], %[temp5] \n\t" - "replv.ph %[temp6], %[temp6] \n\t" - "replv.ph %[temp7], %[temp7] \n\t" - "addu.qb %[temp0], %[temp0], %[temp4] \n\t" - "addu.qb %[temp1], %[temp1], %[temp5] \n\t" - "addu.qb %[temp2], %[temp2], %[temp6] \n\t" - "addu.qb %[temp3], %[temp3], %[temp7] \n\t" - "sw %[temp0], -16(%[dst]) \n\t" - "sw %[temp1], -12(%[dst]) \n\t" - "sw %[temp2], -8(%[dst]) \n\t" - "bne %[src], %[p_loop1_end], 0b \n\t" - " sw %[temp3], -4(%[dst]) \n\t" - "3: \n\t" - "beq %[src], %[p_loop2_end], 2f \n\t" - " nop \n\t" - "1: \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "addiu %[src], %[src], 4 \n\t" - "addiu %[dst], %[dst], 4 \n\t" - "ext %[temp4], %[temp0], 8, 8 \n\t" - "replv.ph %[temp4], %[temp4] \n\t" - "addu.qb %[temp0], %[temp0], %[temp4] \n\t" - "bne %[src], %[p_loop2_end], 1b \n\t" - " sw %[temp0], -4(%[dst]) \n\t" - "2: \n\t" - ".set pop \n\t" - : [dst]"+&r"(dst), [src]"+&r"(src), [temp0]"=&r"(temp0), - [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [temp6]"=&r"(temp6), - [temp7]"=&r"(temp7) - : [p_loop1_end]"r"(p_loop1_end), [p_loop2_end]"r"(p_loop2_end) - : "memory" - ); -} - -static void TransformColorInverse_MIPSdspR2(const VP8LMultipliers* const m, - const uint32_t* src, int num_pixels, - uint32_t* dst) { - int temp0, temp1, temp2, temp3, temp4, temp5; - uint32_t argb, argb1, new_red; - const uint32_t G_to_R = m->green_to_red_; - const uint32_t G_to_B = m->green_to_blue_; - const uint32_t R_to_B = m->red_to_blue_; - const uint32_t* const p_loop_end = src + (num_pixels & ~1); - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "beq %[src], %[p_loop_end], 1f \n\t" - " nop \n\t" - "replv.ph %[temp0], %[G_to_R] \n\t" - "replv.ph %[temp1], %[G_to_B] \n\t" - "replv.ph %[temp2], %[R_to_B] \n\t" - "shll.ph %[temp0], %[temp0], 8 \n\t" - "shll.ph %[temp1], %[temp1], 8 \n\t" - "shll.ph %[temp2], %[temp2], 8 \n\t" - "shra.ph %[temp0], %[temp0], 8 \n\t" - "shra.ph %[temp1], %[temp1], 8 \n\t" - "shra.ph %[temp2], %[temp2], 8 \n\t" - "0: \n\t" - "lw %[argb], 0(%[src]) \n\t" - "lw %[argb1], 4(%[src]) \n\t" - "sw %[argb], 0(%[dst]) \n\t" - "sw %[argb1], 4(%[dst]) \n\t" - "addiu %[src], %[src], 8 \n\t" - "addiu %[dst], %[dst], 8 \n\t" - "precrq.qb.ph %[temp3], %[argb], %[argb1] \n\t" - "preceu.ph.qbra %[temp3], %[temp3] \n\t" - "shll.ph %[temp3], %[temp3], 8 \n\t" - "shra.ph %[temp3], %[temp3], 8 \n\t" - "mul.ph %[temp5], %[temp3], %[temp0] \n\t" - "mul.ph %[temp3], %[temp3], %[temp1] \n\t" - "precrq.ph.w %[new_red], %[argb], %[argb1] \n\t" - "ins %[argb1], %[argb], 16, 16 \n\t" - "shra.ph %[temp5], %[temp5], 5 \n\t" - "shra.ph %[temp3], %[temp3], 5 \n\t" - "addu.ph %[new_red], %[new_red], %[temp5] \n\t" - "addu.ph %[argb1], %[argb1], %[temp3] \n\t" - "preceu.ph.qbra %[temp5], %[new_red] \n\t" - "shll.ph %[temp4], %[temp5], 8 \n\t" - "shra.ph %[temp4], %[temp4], 8 \n\t" - "mul.ph %[temp4], %[temp4], %[temp2] \n\t" - "sb %[temp5], -2(%[dst]) \n\t" - "sra %[temp5], %[temp5], 16 \n\t" - "shra.ph %[temp4], %[temp4], 5 \n\t" - "addu.ph %[argb1], %[argb1], %[temp4] \n\t" - "preceu.ph.qbra %[temp3], %[argb1] \n\t" - "sb %[temp5], -6(%[dst]) \n\t" - "sb %[temp3], -4(%[dst]) \n\t" - "sra %[temp3], %[temp3], 16 \n\t" - "bne %[src], %[p_loop_end], 0b \n\t" - " sb %[temp3], -8(%[dst]) \n\t" - "1: \n\t" - ".set pop \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [new_red]"=&r"(new_red), [argb]"=&r"(argb), - [argb1]"=&r"(argb1), [dst]"+&r"(dst), [src]"+&r"(src) - : [G_to_R]"r"(G_to_R), [R_to_B]"r"(R_to_B), - [G_to_B]"r"(G_to_B), [p_loop_end]"r"(p_loop_end) - : "memory", "hi", "lo" - ); - - // Fall-back to C-version for left-overs. - if (num_pixels & 1) VP8LTransformColorInverse_C(m, src, 1, dst); -} - -static void ConvertBGRAToRGB_MIPSdspR2(const uint32_t* src, - int num_pixels, uint8_t* dst) { - int temp0, temp1, temp2, temp3; - const uint32_t* const p_loop1_end = src + (num_pixels & ~3); - const uint32_t* const p_loop2_end = src + num_pixels; - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "beq %[src], %[p_loop1_end], 3f \n\t" - " nop \n\t" - "0: \n\t" - "lw %[temp3], 12(%[src]) \n\t" - "lw %[temp2], 8(%[src]) \n\t" - "lw %[temp1], 4(%[src]) \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "ins %[temp3], %[temp2], 24, 8 \n\t" - "sll %[temp2], %[temp2], 8 \n\t" - "rotr %[temp3], %[temp3], 16 \n\t" - "ins %[temp2], %[temp1], 0, 16 \n\t" - "sll %[temp1], %[temp1], 8 \n\t" - "wsbh %[temp3], %[temp3] \n\t" - "balign %[temp0], %[temp1], 1 \n\t" - "wsbh %[temp2], %[temp2] \n\t" - "wsbh %[temp0], %[temp0] \n\t" - "usw %[temp3], 8(%[dst]) \n\t" - "rotr %[temp0], %[temp0], 16 \n\t" - "usw %[temp2], 4(%[dst]) \n\t" - "addiu %[src], %[src], 16 \n\t" - "usw %[temp0], 0(%[dst]) \n\t" - "bne %[src], %[p_loop1_end], 0b \n\t" - " addiu %[dst], %[dst], 12 \n\t" - "3: \n\t" - "beq %[src], %[p_loop2_end], 2f \n\t" - " nop \n\t" - "1: \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "addiu %[src], %[src], 4 \n\t" - "wsbh %[temp1], %[temp0] \n\t" - "addiu %[dst], %[dst], 3 \n\t" - "ush %[temp1], -2(%[dst]) \n\t" - "sra %[temp0], %[temp0], 16 \n\t" - "bne %[src], %[p_loop2_end], 1b \n\t" - " sb %[temp0], -3(%[dst]) \n\t" - "2: \n\t" - ".set pop \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [dst]"+&r"(dst), [src]"+&r"(src) - : [p_loop1_end]"r"(p_loop1_end), [p_loop2_end]"r"(p_loop2_end) - : "memory" - ); -} - -static void ConvertBGRAToRGBA_MIPSdspR2(const uint32_t* src, - int num_pixels, uint8_t* dst) { - int temp0, temp1, temp2, temp3; - const uint32_t* const p_loop1_end = src + (num_pixels & ~3); - const uint32_t* const p_loop2_end = src + num_pixels; - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "beq %[src], %[p_loop1_end], 3f \n\t" - " nop \n\t" - "0: \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "lw %[temp1], 4(%[src]) \n\t" - "lw %[temp2], 8(%[src]) \n\t" - "lw %[temp3], 12(%[src]) \n\t" - "wsbh %[temp0], %[temp0] \n\t" - "wsbh %[temp1], %[temp1] \n\t" - "wsbh %[temp2], %[temp2] \n\t" - "wsbh %[temp3], %[temp3] \n\t" - "addiu %[src], %[src], 16 \n\t" - "balign %[temp0], %[temp0], 1 \n\t" - "balign %[temp1], %[temp1], 1 \n\t" - "balign %[temp2], %[temp2], 1 \n\t" - "balign %[temp3], %[temp3], 1 \n\t" - "usw %[temp0], 0(%[dst]) \n\t" - "usw %[temp1], 4(%[dst]) \n\t" - "usw %[temp2], 8(%[dst]) \n\t" - "usw %[temp3], 12(%[dst]) \n\t" - "bne %[src], %[p_loop1_end], 0b \n\t" - " addiu %[dst], %[dst], 16 \n\t" - "3: \n\t" - "beq %[src], %[p_loop2_end], 2f \n\t" - " nop \n\t" - "1: \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "wsbh %[temp0], %[temp0] \n\t" - "addiu %[src], %[src], 4 \n\t" - "balign %[temp0], %[temp0], 1 \n\t" - "usw %[temp0], 0(%[dst]) \n\t" - "bne %[src], %[p_loop2_end], 1b \n\t" - " addiu %[dst], %[dst], 4 \n\t" - "2: \n\t" - ".set pop \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [dst]"+&r"(dst), [src]"+&r"(src) - : [p_loop1_end]"r"(p_loop1_end), [p_loop2_end]"r"(p_loop2_end) - : "memory" - ); -} - -static void ConvertBGRAToRGBA4444_MIPSdspR2(const uint32_t* src, - int num_pixels, uint8_t* dst) { - int temp0, temp1, temp2, temp3, temp4, temp5; - const uint32_t* const p_loop1_end = src + (num_pixels & ~3); - const uint32_t* const p_loop2_end = src + num_pixels; - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "beq %[src], %[p_loop1_end], 3f \n\t" - " nop \n\t" - "0: \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "lw %[temp1], 4(%[src]) \n\t" - "lw %[temp2], 8(%[src]) \n\t" - "lw %[temp3], 12(%[src]) \n\t" - "ext %[temp4], %[temp0], 28, 4 \n\t" - "ext %[temp5], %[temp0], 12, 4 \n\t" - "ins %[temp0], %[temp4], 0, 4 \n\t" - "ext %[temp4], %[temp1], 28, 4 \n\t" - "ins %[temp0], %[temp5], 16, 4 \n\t" - "ext %[temp5], %[temp1], 12, 4 \n\t" - "ins %[temp1], %[temp4], 0, 4 \n\t" - "ext %[temp4], %[temp2], 28, 4 \n\t" - "ins %[temp1], %[temp5], 16, 4 \n\t" - "ext %[temp5], %[temp2], 12, 4 \n\t" - "ins %[temp2], %[temp4], 0, 4 \n\t" - "ext %[temp4], %[temp3], 28, 4 \n\t" - "ins %[temp2], %[temp5], 16, 4 \n\t" - "ext %[temp5], %[temp3], 12, 4 \n\t" - "ins %[temp3], %[temp4], 0, 4 \n\t" - "precr.qb.ph %[temp1], %[temp1], %[temp0] \n\t" - "ins %[temp3], %[temp5], 16, 4 \n\t" - "addiu %[src], %[src], 16 \n\t" - "precr.qb.ph %[temp3], %[temp3], %[temp2] \n\t" -#if (WEBP_SWAP_16BIT_CSP == 1) - "usw %[temp1], 0(%[dst]) \n\t" - "usw %[temp3], 4(%[dst]) \n\t" -#else - "wsbh %[temp1], %[temp1] \n\t" - "wsbh %[temp3], %[temp3] \n\t" - "usw %[temp1], 0(%[dst]) \n\t" - "usw %[temp3], 4(%[dst]) \n\t" -#endif - "bne %[src], %[p_loop1_end], 0b \n\t" - " addiu %[dst], %[dst], 8 \n\t" - "3: \n\t" - "beq %[src], %[p_loop2_end], 2f \n\t" - " nop \n\t" - "1: \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "ext %[temp4], %[temp0], 28, 4 \n\t" - "ext %[temp5], %[temp0], 12, 4 \n\t" - "ins %[temp0], %[temp4], 0, 4 \n\t" - "ins %[temp0], %[temp5], 16, 4 \n\t" - "addiu %[src], %[src], 4 \n\t" - "precr.qb.ph %[temp0], %[temp0], %[temp0] \n\t" -#if (WEBP_SWAP_16BIT_CSP == 1) - "ush %[temp0], 0(%[dst]) \n\t" -#else - "wsbh %[temp0], %[temp0] \n\t" - "ush %[temp0], 0(%[dst]) \n\t" -#endif - "bne %[src], %[p_loop2_end], 1b \n\t" - " addiu %[dst], %[dst], 2 \n\t" - "2: \n\t" - ".set pop \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [dst]"+&r"(dst), [src]"+&r"(src) - : [p_loop1_end]"r"(p_loop1_end), [p_loop2_end]"r"(p_loop2_end) - : "memory" - ); -} - -static void ConvertBGRAToRGB565_MIPSdspR2(const uint32_t* src, - int num_pixels, uint8_t* dst) { - int temp0, temp1, temp2, temp3, temp4, temp5; - const uint32_t* const p_loop1_end = src + (num_pixels & ~3); - const uint32_t* const p_loop2_end = src + num_pixels; - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "beq %[src], %[p_loop1_end], 3f \n\t" - " nop \n\t" - "0: \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "lw %[temp1], 4(%[src]) \n\t" - "lw %[temp2], 8(%[src]) \n\t" - "lw %[temp3], 12(%[src]) \n\t" - "ext %[temp4], %[temp0], 8, 16 \n\t" - "ext %[temp5], %[temp0], 5, 11 \n\t" - "ext %[temp0], %[temp0], 3, 5 \n\t" - "ins %[temp4], %[temp5], 0, 11 \n\t" - "ext %[temp5], %[temp1], 5, 11 \n\t" - "ins %[temp4], %[temp0], 0, 5 \n\t" - "ext %[temp0], %[temp1], 8, 16 \n\t" - "ext %[temp1], %[temp1], 3, 5 \n\t" - "ins %[temp0], %[temp5], 0, 11 \n\t" - "ext %[temp5], %[temp2], 5, 11 \n\t" - "ins %[temp0], %[temp1], 0, 5 \n\t" - "ext %[temp1], %[temp2], 8, 16 \n\t" - "ext %[temp2], %[temp2], 3, 5 \n\t" - "ins %[temp1], %[temp5], 0, 11 \n\t" - "ext %[temp5], %[temp3], 5, 11 \n\t" - "ins %[temp1], %[temp2], 0, 5 \n\t" - "ext %[temp2], %[temp3], 8, 16 \n\t" - "ext %[temp3], %[temp3], 3, 5 \n\t" - "ins %[temp2], %[temp5], 0, 11 \n\t" - "append %[temp0], %[temp4], 16 \n\t" - "ins %[temp2], %[temp3], 0, 5 \n\t" - "addiu %[src], %[src], 16 \n\t" - "append %[temp2], %[temp1], 16 \n\t" -#if (WEBP_SWAP_16BIT_CSP == 1) - "usw %[temp0], 0(%[dst]) \n\t" - "usw %[temp2], 4(%[dst]) \n\t" -#else - "wsbh %[temp0], %[temp0] \n\t" - "wsbh %[temp2], %[temp2] \n\t" - "usw %[temp0], 0(%[dst]) \n\t" - "usw %[temp2], 4(%[dst]) \n\t" -#endif - "bne %[src], %[p_loop1_end], 0b \n\t" - " addiu %[dst], %[dst], 8 \n\t" - "3: \n\t" - "beq %[src], %[p_loop2_end], 2f \n\t" - " nop \n\t" - "1: \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "ext %[temp4], %[temp0], 8, 16 \n\t" - "ext %[temp5], %[temp0], 5, 11 \n\t" - "ext %[temp0], %[temp0], 3, 5 \n\t" - "ins %[temp4], %[temp5], 0, 11 \n\t" - "addiu %[src], %[src], 4 \n\t" - "ins %[temp4], %[temp0], 0, 5 \n\t" -#if (WEBP_SWAP_16BIT_CSP == 1) - "ush %[temp4], 0(%[dst]) \n\t" -#else - "wsbh %[temp4], %[temp4] \n\t" - "ush %[temp4], 0(%[dst]) \n\t" -#endif - "bne %[src], %[p_loop2_end], 1b \n\t" - " addiu %[dst], %[dst], 2 \n\t" - "2: \n\t" - ".set pop \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), - [dst]"+&r"(dst), [src]"+&r"(src) - : [p_loop1_end]"r"(p_loop1_end), [p_loop2_end]"r"(p_loop2_end) - : "memory" - ); -} - -static void ConvertBGRAToBGR_MIPSdspR2(const uint32_t* src, - int num_pixels, uint8_t* dst) { - int temp0, temp1, temp2, temp3; - const uint32_t* const p_loop1_end = src + (num_pixels & ~3); - const uint32_t* const p_loop2_end = src + num_pixels; - __asm__ volatile ( - ".set push \n\t" - ".set noreorder \n\t" - "beq %[src], %[p_loop1_end], 3f \n\t" - " nop \n\t" - "0: \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "lw %[temp1], 4(%[src]) \n\t" - "lw %[temp2], 8(%[src]) \n\t" - "lw %[temp3], 12(%[src]) \n\t" - "ins %[temp0], %[temp1], 24, 8 \n\t" - "sra %[temp1], %[temp1], 8 \n\t" - "ins %[temp1], %[temp2], 16, 16 \n\t" - "sll %[temp2], %[temp2], 8 \n\t" - "balign %[temp3], %[temp2], 1 \n\t" - "addiu %[src], %[src], 16 \n\t" - "usw %[temp0], 0(%[dst]) \n\t" - "usw %[temp1], 4(%[dst]) \n\t" - "usw %[temp3], 8(%[dst]) \n\t" - "bne %[src], %[p_loop1_end], 0b \n\t" - " addiu %[dst], %[dst], 12 \n\t" - "3: \n\t" - "beq %[src], %[p_loop2_end], 2f \n\t" - " nop \n\t" - "1: \n\t" - "lw %[temp0], 0(%[src]) \n\t" - "addiu %[src], %[src], 4 \n\t" - "addiu %[dst], %[dst], 3 \n\t" - "ush %[temp0], -3(%[dst]) \n\t" - "sra %[temp0], %[temp0], 16 \n\t" - "bne %[src], %[p_loop2_end], 1b \n\t" - " sb %[temp0], -1(%[dst]) \n\t" - "2: \n\t" - ".set pop \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), - [temp3]"=&r"(temp3), [dst]"+&r"(dst), [src]"+&r"(src) - : [p_loop1_end]"r"(p_loop1_end), [p_loop2_end]"r"(p_loop2_end) - : "memory" - ); -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8LDspInitMIPSdspR2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8LDspInitMIPSdspR2(void) { - VP8LMapColor32b = MapARGB_MIPSdspR2; - VP8LMapColor8b = MapAlpha_MIPSdspR2; - - VP8LPredictors[5] = Predictor5_MIPSdspR2; - VP8LPredictors[6] = Predictor6_MIPSdspR2; - VP8LPredictors[7] = Predictor7_MIPSdspR2; - VP8LPredictors[8] = Predictor8_MIPSdspR2; - VP8LPredictors[9] = Predictor9_MIPSdspR2; - VP8LPredictors[10] = Predictor10_MIPSdspR2; - VP8LPredictors[11] = Predictor11_MIPSdspR2; - VP8LPredictors[12] = Predictor12_MIPSdspR2; - VP8LPredictors[13] = Predictor13_MIPSdspR2; - - VP8LAddGreenToBlueAndRed = AddGreenToBlueAndRed_MIPSdspR2; - VP8LTransformColorInverse = TransformColorInverse_MIPSdspR2; - - VP8LConvertBGRAToRGB = ConvertBGRAToRGB_MIPSdspR2; - VP8LConvertBGRAToRGBA = ConvertBGRAToRGBA_MIPSdspR2; - VP8LConvertBGRAToRGBA4444 = ConvertBGRAToRGBA4444_MIPSdspR2; - VP8LConvertBGRAToRGB565 = ConvertBGRAToRGB565_MIPSdspR2; - VP8LConvertBGRAToBGR = ConvertBGRAToBGR_MIPSdspR2; -} - -#else // !WEBP_USE_MIPS_DSP_R2 - -WEBP_DSP_INIT_STUB(VP8LDspInitMIPSdspR2) - -#endif // WEBP_USE_MIPS_DSP_R2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_msa.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_msa.c deleted file mode 100644 index d893ae6..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_msa.c +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MSA variant of methods for lossless decoder -// -// Author: Prashant Patil (prashant.patil@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MSA) - -#include "src/dsp/lossless.h" -#include "src/dsp/msa_macro.h" - -//------------------------------------------------------------------------------ -// Colorspace conversion functions - -#define CONVERT16_BGRA_XXX(psrc, pdst, m0, m1, m2) do { \ - v16u8 src0, src1, src2, src3, dst0, dst1, dst2; \ - LD_UB4(psrc, 16, src0, src1, src2, src3); \ - VSHF_B2_UB(src0, src1, src1, src2, m0, m1, dst0, dst1); \ - dst2 = VSHF_UB(src2, src3, m2); \ - ST_UB2(dst0, dst1, pdst, 16); \ - ST_UB(dst2, pdst + 32); \ -} while (0) - -#define CONVERT12_BGRA_XXX(psrc, pdst, m0, m1, m2) do { \ - uint32_t pix_w; \ - v16u8 src0, src1, src2, dst0, dst1, dst2; \ - LD_UB3(psrc, 16, src0, src1, src2); \ - VSHF_B2_UB(src0, src1, src1, src2, m0, m1, dst0, dst1); \ - dst2 = VSHF_UB(src2, src2, m2); \ - ST_UB2(dst0, dst1, pdst, 16); \ - pix_w = __msa_copy_s_w((v4i32)dst2, 0); \ - SW(pix_w, pdst + 32); \ -} while (0) - -#define CONVERT8_BGRA_XXX(psrc, pdst, m0, m1) do { \ - uint64_t pix_d; \ - v16u8 src0, src1, src2 = { 0 }, dst0, dst1; \ - LD_UB2(psrc, 16, src0, src1); \ - VSHF_B2_UB(src0, src1, src1, src2, m0, m1, dst0, dst1); \ - ST_UB(dst0, pdst); \ - pix_d = __msa_copy_s_d((v2i64)dst1, 0); \ - SD(pix_d, pdst + 16); \ -} while (0) - -#define CONVERT4_BGRA_XXX(psrc, pdst, m) do { \ - const v16u8 src0 = LD_UB(psrc); \ - const v16u8 dst0 = VSHF_UB(src0, src0, m); \ - uint64_t pix_d = __msa_copy_s_d((v2i64)dst0, 0); \ - uint32_t pix_w = __msa_copy_s_w((v4i32)dst0, 2); \ - SD(pix_d, pdst + 0); \ - SW(pix_w, pdst + 8); \ -} while (0) - -#define CONVERT1_BGRA_BGR(psrc, pdst) do { \ - const int32_t b = (psrc)[0]; \ - const int32_t g = (psrc)[1]; \ - const int32_t r = (psrc)[2]; \ - (pdst)[0] = b; \ - (pdst)[1] = g; \ - (pdst)[2] = r; \ -} while (0) - -#define CONVERT1_BGRA_RGB(psrc, pdst) do { \ - const int32_t b = (psrc)[0]; \ - const int32_t g = (psrc)[1]; \ - const int32_t r = (psrc)[2]; \ - (pdst)[0] = r; \ - (pdst)[1] = g; \ - (pdst)[2] = b; \ -} while (0) - -#define TRANSFORM_COLOR_INVERSE_8(src0, src1, dst0, dst1, \ - c0, c1, mask0, mask1) do { \ - v8i16 g0, g1, t0, t1, t2, t3; \ - v4i32 t4, t5; \ - VSHF_B2_SH(src0, src0, src1, src1, mask0, mask0, g0, g1); \ - DOTP_SB2_SH(g0, g1, c0, c0, t0, t1); \ - SRAI_H2_SH(t0, t1, 5); \ - t0 = __msa_addv_h(t0, (v8i16)src0); \ - t1 = __msa_addv_h(t1, (v8i16)src1); \ - t4 = __msa_srli_w((v4i32)t0, 16); \ - t5 = __msa_srli_w((v4i32)t1, 16); \ - DOTP_SB2_SH(t4, t5, c1, c1, t2, t3); \ - SRAI_H2_SH(t2, t3, 5); \ - ADD2(t0, t2, t1, t3, t0, t1); \ - VSHF_B2_UB(src0, t0, src1, t1, mask1, mask1, dst0, dst1); \ -} while (0) - -#define TRANSFORM_COLOR_INVERSE_4(src, dst, c0, c1, mask0, mask1) do { \ - const v16i8 g0 = VSHF_SB(src, src, mask0); \ - v8i16 t0 = __msa_dotp_s_h(c0, g0); \ - v8i16 t1; \ - v4i32 t2; \ - t0 = SRAI_H(t0, 5); \ - t0 = __msa_addv_h(t0, (v8i16)src); \ - t2 = __msa_srli_w((v4i32)t0, 16); \ - t1 = __msa_dotp_s_h(c1, (v16i8)t2); \ - t1 = SRAI_H(t1, 5); \ - t0 = t0 + t1; \ - dst = VSHF_UB(src, t0, mask1); \ -} while (0) - -static void ConvertBGRAToRGBA_MSA(const uint32_t* src, - int num_pixels, uint8_t* dst) { - int i; - const uint8_t* ptemp_src = (const uint8_t*)src; - uint8_t* ptemp_dst = (uint8_t*)dst; - v16u8 src0, dst0; - const v16u8 mask = { 2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15 }; - - while (num_pixels >= 8) { - v16u8 src1, dst1; - LD_UB2(ptemp_src, 16, src0, src1); - VSHF_B2_UB(src0, src0, src1, src1, mask, mask, dst0, dst1); - ST_UB2(dst0, dst1, ptemp_dst, 16); - ptemp_src += 32; - ptemp_dst += 32; - num_pixels -= 8; - } - if (num_pixels > 0) { - if (num_pixels >= 4) { - src0 = LD_UB(ptemp_src); - dst0 = VSHF_UB(src0, src0, mask); - ST_UB(dst0, ptemp_dst); - ptemp_src += 16; - ptemp_dst += 16; - num_pixels -= 4; - } - for (i = 0; i < num_pixels; i++) { - const uint8_t b = ptemp_src[2]; - const uint8_t g = ptemp_src[1]; - const uint8_t r = ptemp_src[0]; - const uint8_t a = ptemp_src[3]; - ptemp_dst[0] = b; - ptemp_dst[1] = g; - ptemp_dst[2] = r; - ptemp_dst[3] = a; - ptemp_src += 4; - ptemp_dst += 4; - } - } -} - -static void ConvertBGRAToBGR_MSA(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint8_t* ptemp_src = (const uint8_t*)src; - uint8_t* ptemp_dst = (uint8_t*)dst; - const v16u8 mask0 = { 0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, - 16, 17, 18, 20 }; - const v16u8 mask1 = { 5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, - 21, 22, 24, 25 }; - const v16u8 mask2 = { 10, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, 25, - 26, 28, 29, 30 }; - - while (num_pixels >= 16) { - CONVERT16_BGRA_XXX(ptemp_src, ptemp_dst, mask0, mask1, mask2); - ptemp_src += 64; - ptemp_dst += 48; - num_pixels -= 16; - } - if (num_pixels > 0) { - if (num_pixels >= 12) { - CONVERT12_BGRA_XXX(ptemp_src, ptemp_dst, mask0, mask1, mask2); - ptemp_src += 48; - ptemp_dst += 36; - num_pixels -= 12; - } else if (num_pixels >= 8) { - CONVERT8_BGRA_XXX(ptemp_src, ptemp_dst, mask0, mask1); - ptemp_src += 32; - ptemp_dst += 24; - num_pixels -= 8; - } else if (num_pixels >= 4) { - CONVERT4_BGRA_XXX(ptemp_src, ptemp_dst, mask0); - ptemp_src += 16; - ptemp_dst += 12; - num_pixels -= 4; - } - if (num_pixels == 3) { - CONVERT1_BGRA_BGR(ptemp_src + 0, ptemp_dst + 0); - CONVERT1_BGRA_BGR(ptemp_src + 4, ptemp_dst + 3); - CONVERT1_BGRA_BGR(ptemp_src + 8, ptemp_dst + 6); - } else if (num_pixels == 2) { - CONVERT1_BGRA_BGR(ptemp_src + 0, ptemp_dst + 0); - CONVERT1_BGRA_BGR(ptemp_src + 4, ptemp_dst + 3); - } else if (num_pixels == 1) { - CONVERT1_BGRA_BGR(ptemp_src, ptemp_dst); - } - } -} - -static void ConvertBGRAToRGB_MSA(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint8_t* ptemp_src = (const uint8_t*)src; - uint8_t* ptemp_dst = (uint8_t*)dst; - const v16u8 mask0 = { 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, - 18, 17, 16, 22 }; - const v16u8 mask1 = { 5, 4, 10, 9, 8, 14, 13, 12, 18, 17, 16, 22, - 21, 20, 26, 25 }; - const v16u8 mask2 = { 8, 14, 13, 12, 18, 17, 16, 22, 21, 20, 26, 25, - 24, 30, 29, 28 }; - - while (num_pixels >= 16) { - CONVERT16_BGRA_XXX(ptemp_src, ptemp_dst, mask0, mask1, mask2); - ptemp_src += 64; - ptemp_dst += 48; - num_pixels -= 16; - } - if (num_pixels) { - if (num_pixels >= 12) { - CONVERT12_BGRA_XXX(ptemp_src, ptemp_dst, mask0, mask1, mask2); - ptemp_src += 48; - ptemp_dst += 36; - num_pixels -= 12; - } else if (num_pixels >= 8) { - CONVERT8_BGRA_XXX(ptemp_src, ptemp_dst, mask0, mask1); - ptemp_src += 32; - ptemp_dst += 24; - num_pixels -= 8; - } else if (num_pixels >= 4) { - CONVERT4_BGRA_XXX(ptemp_src, ptemp_dst, mask0); - ptemp_src += 16; - ptemp_dst += 12; - num_pixels -= 4; - } - if (num_pixels == 3) { - CONVERT1_BGRA_RGB(ptemp_src + 0, ptemp_dst + 0); - CONVERT1_BGRA_RGB(ptemp_src + 4, ptemp_dst + 3); - CONVERT1_BGRA_RGB(ptemp_src + 8, ptemp_dst + 6); - } else if (num_pixels == 2) { - CONVERT1_BGRA_RGB(ptemp_src + 0, ptemp_dst + 0); - CONVERT1_BGRA_RGB(ptemp_src + 4, ptemp_dst + 3); - } else if (num_pixels == 1) { - CONVERT1_BGRA_RGB(ptemp_src, ptemp_dst); - } - } -} - -static void AddGreenToBlueAndRed_MSA(const uint32_t* const src, int num_pixels, - uint32_t* dst) { - int i; - const uint8_t* in = (const uint8_t*)src; - uint8_t* out = (uint8_t*)dst; - v16u8 src0, dst0, tmp0; - const v16u8 mask = { 1, 255, 1, 255, 5, 255, 5, 255, 9, 255, 9, 255, - 13, 255, 13, 255 }; - - while (num_pixels >= 8) { - v16u8 src1, dst1, tmp1; - LD_UB2(in, 16, src0, src1); - VSHF_B2_UB(src0, src1, src1, src0, mask, mask, tmp0, tmp1); - ADD2(src0, tmp0, src1, tmp1, dst0, dst1); - ST_UB2(dst0, dst1, out, 16); - in += 32; - out += 32; - num_pixels -= 8; - } - if (num_pixels > 0) { - if (num_pixels >= 4) { - src0 = LD_UB(in); - tmp0 = VSHF_UB(src0, src0, mask); - dst0 = src0 + tmp0; - ST_UB(dst0, out); - in += 16; - out += 16; - num_pixels -= 4; - } - for (i = 0; i < num_pixels; i++) { - const uint8_t b = in[0]; - const uint8_t g = in[1]; - const uint8_t r = in[2]; - out[0] = (b + g) & 0xff; - out[1] = g; - out[2] = (r + g) & 0xff; - out[4] = in[4]; - out += 4; - } - } -} - -static void TransformColorInverse_MSA(const VP8LMultipliers* const m, - const uint32_t* src, int num_pixels, - uint32_t* dst) { - v16u8 src0, dst0; - const v16i8 g2br = (v16i8)__msa_fill_w(m->green_to_blue_ | - (m->green_to_red_ << 16)); - const v16i8 r2b = (v16i8)__msa_fill_w(m->red_to_blue_); - const v16u8 mask0 = { 1, 255, 1, 255, 5, 255, 5, 255, 9, 255, 9, 255, - 13, 255, 13, 255 }; - const v16u8 mask1 = { 16, 1, 18, 3, 20, 5, 22, 7, 24, 9, 26, 11, - 28, 13, 30, 15 }; - - while (num_pixels >= 8) { - v16u8 src1, dst1; - LD_UB2(src, 4, src0, src1); - TRANSFORM_COLOR_INVERSE_8(src0, src1, dst0, dst1, g2br, r2b, mask0, mask1); - ST_UB2(dst0, dst1, dst, 4); - src += 8; - dst += 8; - num_pixels -= 8; - } - if (num_pixels > 0) { - if (num_pixels >= 4) { - src0 = LD_UB(src); - TRANSFORM_COLOR_INVERSE_4(src0, dst0, g2br, r2b, mask0, mask1); - ST_UB(dst0, dst); - src += 4; - dst += 4; - num_pixels -= 4; - } - if (num_pixels > 0) { - src0 = LD_UB(src); - TRANSFORM_COLOR_INVERSE_4(src0, dst0, g2br, r2b, mask0, mask1); - if (num_pixels == 3) { - const uint64_t pix_d = __msa_copy_s_d((v2i64)dst0, 0); - const uint32_t pix_w = __msa_copy_s_w((v4i32)dst0, 2); - SD(pix_d, dst + 0); - SW(pix_w, dst + 2); - } else if (num_pixels == 2) { - const uint64_t pix_d = __msa_copy_s_d((v2i64)dst0, 0); - SD(pix_d, dst); - } else { - const uint32_t pix_w = __msa_copy_s_w((v4i32)dst0, 0); - SW(pix_w, dst); - } - } - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8LDspInitMSA(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8LDspInitMSA(void) { - VP8LConvertBGRAToRGBA = ConvertBGRAToRGBA_MSA; - VP8LConvertBGRAToBGR = ConvertBGRAToBGR_MSA; - VP8LConvertBGRAToRGB = ConvertBGRAToRGB_MSA; - - VP8LAddGreenToBlueAndRed = AddGreenToBlueAndRed_MSA; - VP8LTransformColorInverse = TransformColorInverse_MSA; -} - -#else // !WEBP_USE_MSA - -WEBP_DSP_INIT_STUB(VP8LDspInitMSA) - -#endif // WEBP_USE_MSA diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_neon.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_neon.c deleted file mode 100644 index f6cadd6..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_neon.c +++ /dev/null @@ -1,641 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// NEON variant of methods for lossless decoder -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_NEON) - -#include - -#include "src/dsp/lossless.h" -#include "src/dsp/neon.h" - -//------------------------------------------------------------------------------ -// Colorspace conversion functions - -#if !defined(WORK_AROUND_GCC) -// gcc 4.6.0 had some trouble (NDK-r9) with this code. We only use it for -// gcc-4.8.x at least. -static void ConvertBGRAToRGBA_NEON(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint32_t* const end = src + (num_pixels & ~15); - for (; src < end; src += 16) { - uint8x16x4_t pixel = vld4q_u8((uint8_t*)src); - // swap B and R. (VSWP d0,d2 has no intrinsics equivalent!) - const uint8x16_t tmp = pixel.val[0]; - pixel.val[0] = pixel.val[2]; - pixel.val[2] = tmp; - vst4q_u8(dst, pixel); - dst += 64; - } - VP8LConvertBGRAToRGBA_C(src, num_pixels & 15, dst); // left-overs -} - -static void ConvertBGRAToBGR_NEON(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint32_t* const end = src + (num_pixels & ~15); - for (; src < end; src += 16) { - const uint8x16x4_t pixel = vld4q_u8((uint8_t*)src); - const uint8x16x3_t tmp = { { pixel.val[0], pixel.val[1], pixel.val[2] } }; - vst3q_u8(dst, tmp); - dst += 48; - } - VP8LConvertBGRAToBGR_C(src, num_pixels & 15, dst); // left-overs -} - -static void ConvertBGRAToRGB_NEON(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint32_t* const end = src + (num_pixels & ~15); - for (; src < end; src += 16) { - const uint8x16x4_t pixel = vld4q_u8((uint8_t*)src); - const uint8x16x3_t tmp = { { pixel.val[2], pixel.val[1], pixel.val[0] } }; - vst3q_u8(dst, tmp); - dst += 48; - } - VP8LConvertBGRAToRGB_C(src, num_pixels & 15, dst); // left-overs -} - -#else // WORK_AROUND_GCC - -// gcc-4.6.0 fallback - -static const uint8_t kRGBAShuffle[8] = { 2, 1, 0, 3, 6, 5, 4, 7 }; - -static void ConvertBGRAToRGBA_NEON(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint32_t* const end = src + (num_pixels & ~1); - const uint8x8_t shuffle = vld1_u8(kRGBAShuffle); - for (; src < end; src += 2) { - const uint8x8_t pixels = vld1_u8((uint8_t*)src); - vst1_u8(dst, vtbl1_u8(pixels, shuffle)); - dst += 8; - } - VP8LConvertBGRAToRGBA_C(src, num_pixels & 1, dst); // left-overs -} - -static const uint8_t kBGRShuffle[3][8] = { - { 0, 1, 2, 4, 5, 6, 8, 9 }, - { 10, 12, 13, 14, 16, 17, 18, 20 }, - { 21, 22, 24, 25, 26, 28, 29, 30 } -}; - -static void ConvertBGRAToBGR_NEON(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint32_t* const end = src + (num_pixels & ~7); - const uint8x8_t shuffle0 = vld1_u8(kBGRShuffle[0]); - const uint8x8_t shuffle1 = vld1_u8(kBGRShuffle[1]); - const uint8x8_t shuffle2 = vld1_u8(kBGRShuffle[2]); - for (; src < end; src += 8) { - uint8x8x4_t pixels; - INIT_VECTOR4(pixels, - vld1_u8((const uint8_t*)(src + 0)), - vld1_u8((const uint8_t*)(src + 2)), - vld1_u8((const uint8_t*)(src + 4)), - vld1_u8((const uint8_t*)(src + 6))); - vst1_u8(dst + 0, vtbl4_u8(pixels, shuffle0)); - vst1_u8(dst + 8, vtbl4_u8(pixels, shuffle1)); - vst1_u8(dst + 16, vtbl4_u8(pixels, shuffle2)); - dst += 8 * 3; - } - VP8LConvertBGRAToBGR_C(src, num_pixels & 7, dst); // left-overs -} - -static const uint8_t kRGBShuffle[3][8] = { - { 2, 1, 0, 6, 5, 4, 10, 9 }, - { 8, 14, 13, 12, 18, 17, 16, 22 }, - { 21, 20, 26, 25, 24, 30, 29, 28 } -}; - -static void ConvertBGRAToRGB_NEON(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const uint32_t* const end = src + (num_pixels & ~7); - const uint8x8_t shuffle0 = vld1_u8(kRGBShuffle[0]); - const uint8x8_t shuffle1 = vld1_u8(kRGBShuffle[1]); - const uint8x8_t shuffle2 = vld1_u8(kRGBShuffle[2]); - for (; src < end; src += 8) { - uint8x8x4_t pixels; - INIT_VECTOR4(pixels, - vld1_u8((const uint8_t*)(src + 0)), - vld1_u8((const uint8_t*)(src + 2)), - vld1_u8((const uint8_t*)(src + 4)), - vld1_u8((const uint8_t*)(src + 6))); - vst1_u8(dst + 0, vtbl4_u8(pixels, shuffle0)); - vst1_u8(dst + 8, vtbl4_u8(pixels, shuffle1)); - vst1_u8(dst + 16, vtbl4_u8(pixels, shuffle2)); - dst += 8 * 3; - } - VP8LConvertBGRAToRGB_C(src, num_pixels & 7, dst); // left-overs -} - -#endif // !WORK_AROUND_GCC - -//------------------------------------------------------------------------------ -// Predictor Transform - -#define LOAD_U32_AS_U8(IN) vreinterpret_u8_u32(vdup_n_u32((IN))) -#define LOAD_U32P_AS_U8(IN) vreinterpret_u8_u32(vld1_u32((IN))) -#define LOADQ_U32_AS_U8(IN) vreinterpretq_u8_u32(vdupq_n_u32((IN))) -#define LOADQ_U32P_AS_U8(IN) vreinterpretq_u8_u32(vld1q_u32((IN))) -#define GET_U8_AS_U32(IN) vget_lane_u32(vreinterpret_u32_u8((IN)), 0); -#define GETQ_U8_AS_U32(IN) vgetq_lane_u32(vreinterpretq_u32_u8((IN)), 0); -#define STOREQ_U8_AS_U32P(OUT, IN) vst1q_u32((OUT), vreinterpretq_u32_u8((IN))); -#define ROTATE32_LEFT(L) vextq_u8((L), (L), 12) // D|C|B|A -> C|B|A|D - -static WEBP_INLINE uint8x8_t Average2_u8_NEON(uint32_t a0, uint32_t a1) { - const uint8x8_t A0 = LOAD_U32_AS_U8(a0); - const uint8x8_t A1 = LOAD_U32_AS_U8(a1); - return vhadd_u8(A0, A1); -} - -static WEBP_INLINE uint32_t ClampedAddSubtractHalf_NEON(uint32_t c0, - uint32_t c1, - uint32_t c2) { - const uint8x8_t avg = Average2_u8_NEON(c0, c1); - // Remove one to c2 when bigger than avg. - const uint8x8_t C2 = LOAD_U32_AS_U8(c2); - const uint8x8_t cmp = vcgt_u8(C2, avg); - const uint8x8_t C2_1 = vadd_u8(C2, cmp); - // Compute half of the difference between avg and c2. - const int8x8_t diff_avg = vreinterpret_s8_u8(vhsub_u8(avg, C2_1)); - // Compute the sum with avg and saturate. - const int16x8_t avg_16 = vreinterpretq_s16_u16(vmovl_u8(avg)); - const uint8x8_t res = vqmovun_s16(vaddw_s8(avg_16, diff_avg)); - const uint32_t output = GET_U8_AS_U32(res); - return output; -} - -static WEBP_INLINE uint32_t Average2_NEON(uint32_t a0, uint32_t a1) { - const uint8x8_t avg_u8x8 = Average2_u8_NEON(a0, a1); - const uint32_t avg = GET_U8_AS_U32(avg_u8x8); - return avg; -} - -static WEBP_INLINE uint32_t Average3_NEON(uint32_t a0, uint32_t a1, - uint32_t a2) { - const uint8x8_t avg0 = Average2_u8_NEON(a0, a2); - const uint8x8_t A1 = LOAD_U32_AS_U8(a1); - const uint32_t avg = GET_U8_AS_U32(vhadd_u8(avg0, A1)); - return avg; -} - -static uint32_t Predictor5_NEON(uint32_t left, const uint32_t* const top) { - return Average3_NEON(left, top[0], top[1]); -} -static uint32_t Predictor6_NEON(uint32_t left, const uint32_t* const top) { - return Average2_NEON(left, top[-1]); -} -static uint32_t Predictor7_NEON(uint32_t left, const uint32_t* const top) { - return Average2_NEON(left, top[0]); -} -static uint32_t Predictor13_NEON(uint32_t left, const uint32_t* const top) { - return ClampedAddSubtractHalf_NEON(left, top[0], top[-1]); -} - -// Batch versions of those functions. - -// Predictor0: ARGB_BLACK. -static void PredictorAdd0_NEON(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - const uint8x16_t black = vreinterpretq_u8_u32(vdupq_n_u32(ARGB_BLACK)); - for (i = 0; i + 4 <= num_pixels; i += 4) { - const uint8x16_t src = LOADQ_U32P_AS_U8(&in[i]); - const uint8x16_t res = vaddq_u8(src, black); - STOREQ_U8_AS_U32P(&out[i], res); - } - VP8LPredictorsAdd_C[0](in + i, upper + i, num_pixels - i, out + i); -} - -// Predictor1: left. -static void PredictorAdd1_NEON(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - const uint8x16_t zero = LOADQ_U32_AS_U8(0); - for (i = 0; i + 4 <= num_pixels; i += 4) { - // a | b | c | d - const uint8x16_t src = LOADQ_U32P_AS_U8(&in[i]); - // 0 | a | b | c - const uint8x16_t shift0 = vextq_u8(zero, src, 12); - // a | a + b | b + c | c + d - const uint8x16_t sum0 = vaddq_u8(src, shift0); - // 0 | 0 | a | a + b - const uint8x16_t shift1 = vextq_u8(zero, sum0, 8); - // a | a + b | a + b + c | a + b + c + d - const uint8x16_t sum1 = vaddq_u8(sum0, shift1); - const uint8x16_t prev = LOADQ_U32_AS_U8(out[i - 1]); - const uint8x16_t res = vaddq_u8(sum1, prev); - STOREQ_U8_AS_U32P(&out[i], res); - } - VP8LPredictorsAdd_C[1](in + i, upper + i, num_pixels - i, out + i); -} - -// Macro that adds 32-bit integers from IN using mod 256 arithmetic -// per 8 bit channel. -#define GENERATE_PREDICTOR_1(X, IN) \ -static void PredictorAdd##X##_NEON(const uint32_t* in, \ - const uint32_t* upper, int num_pixels, \ - uint32_t* out) { \ - int i; \ - for (i = 0; i + 4 <= num_pixels; i += 4) { \ - const uint8x16_t src = LOADQ_U32P_AS_U8(&in[i]); \ - const uint8x16_t other = LOADQ_U32P_AS_U8(&(IN)); \ - const uint8x16_t res = vaddq_u8(src, other); \ - STOREQ_U8_AS_U32P(&out[i], res); \ - } \ - VP8LPredictorsAdd_C[(X)](in + i, upper + i, num_pixels - i, out + i); \ -} -// Predictor2: Top. -GENERATE_PREDICTOR_1(2, upper[i]) -// Predictor3: Top-right. -GENERATE_PREDICTOR_1(3, upper[i + 1]) -// Predictor4: Top-left. -GENERATE_PREDICTOR_1(4, upper[i - 1]) -#undef GENERATE_PREDICTOR_1 - -// Predictor5: average(average(left, TR), T) -#define DO_PRED5(LANE) do { \ - const uint8x16_t avgLTR = vhaddq_u8(L, TR); \ - const uint8x16_t avg = vhaddq_u8(avgLTR, T); \ - const uint8x16_t res = vaddq_u8(avg, src); \ - vst1q_lane_u32(&out[i + (LANE)], vreinterpretq_u32_u8(res), (LANE)); \ - L = ROTATE32_LEFT(res); \ -} while (0) - -static void PredictorAdd5_NEON(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - uint8x16_t L = LOADQ_U32_AS_U8(out[-1]); - for (i = 0; i + 4 <= num_pixels; i += 4) { - const uint8x16_t src = LOADQ_U32P_AS_U8(&in[i]); - const uint8x16_t T = LOADQ_U32P_AS_U8(&upper[i + 0]); - const uint8x16_t TR = LOADQ_U32P_AS_U8(&upper[i + 1]); - DO_PRED5(0); - DO_PRED5(1); - DO_PRED5(2); - DO_PRED5(3); - } - VP8LPredictorsAdd_C[5](in + i, upper + i, num_pixels - i, out + i); -} -#undef DO_PRED5 - -#define DO_PRED67(LANE) do { \ - const uint8x16_t avg = vhaddq_u8(L, top); \ - const uint8x16_t res = vaddq_u8(avg, src); \ - vst1q_lane_u32(&out[i + (LANE)], vreinterpretq_u32_u8(res), (LANE)); \ - L = ROTATE32_LEFT(res); \ -} while (0) - -// Predictor6: average(left, TL) -static void PredictorAdd6_NEON(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - uint8x16_t L = LOADQ_U32_AS_U8(out[-1]); - for (i = 0; i + 4 <= num_pixels; i += 4) { - const uint8x16_t src = LOADQ_U32P_AS_U8(&in[i]); - const uint8x16_t top = LOADQ_U32P_AS_U8(&upper[i - 1]); - DO_PRED67(0); - DO_PRED67(1); - DO_PRED67(2); - DO_PRED67(3); - } - VP8LPredictorsAdd_C[6](in + i, upper + i, num_pixels - i, out + i); -} - -// Predictor7: average(left, T) -static void PredictorAdd7_NEON(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - uint8x16_t L = LOADQ_U32_AS_U8(out[-1]); - for (i = 0; i + 4 <= num_pixels; i += 4) { - const uint8x16_t src = LOADQ_U32P_AS_U8(&in[i]); - const uint8x16_t top = LOADQ_U32P_AS_U8(&upper[i]); - DO_PRED67(0); - DO_PRED67(1); - DO_PRED67(2); - DO_PRED67(3); - } - VP8LPredictorsAdd_C[7](in + i, upper + i, num_pixels - i, out + i); -} -#undef DO_PRED67 - -#define GENERATE_PREDICTOR_2(X, IN) \ -static void PredictorAdd##X##_NEON(const uint32_t* in, \ - const uint32_t* upper, int num_pixels, \ - uint32_t* out) { \ - int i; \ - for (i = 0; i + 4 <= num_pixels; i += 4) { \ - const uint8x16_t src = LOADQ_U32P_AS_U8(&in[i]); \ - const uint8x16_t Tother = LOADQ_U32P_AS_U8(&(IN)); \ - const uint8x16_t T = LOADQ_U32P_AS_U8(&upper[i]); \ - const uint8x16_t avg = vhaddq_u8(T, Tother); \ - const uint8x16_t res = vaddq_u8(avg, src); \ - STOREQ_U8_AS_U32P(&out[i], res); \ - } \ - VP8LPredictorsAdd_C[(X)](in + i, upper + i, num_pixels - i, out + i); \ -} -// Predictor8: average TL T. -GENERATE_PREDICTOR_2(8, upper[i - 1]) -// Predictor9: average T TR. -GENERATE_PREDICTOR_2(9, upper[i + 1]) -#undef GENERATE_PREDICTOR_2 - -// Predictor10: average of (average of (L,TL), average of (T, TR)). -#define DO_PRED10(LANE) do { \ - const uint8x16_t avgLTL = vhaddq_u8(L, TL); \ - const uint8x16_t avg = vhaddq_u8(avgTTR, avgLTL); \ - const uint8x16_t res = vaddq_u8(avg, src); \ - vst1q_lane_u32(&out[i + (LANE)], vreinterpretq_u32_u8(res), (LANE)); \ - L = ROTATE32_LEFT(res); \ -} while (0) - -static void PredictorAdd10_NEON(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - uint8x16_t L = LOADQ_U32_AS_U8(out[-1]); - for (i = 0; i + 4 <= num_pixels; i += 4) { - const uint8x16_t src = LOADQ_U32P_AS_U8(&in[i]); - const uint8x16_t TL = LOADQ_U32P_AS_U8(&upper[i - 1]); - const uint8x16_t T = LOADQ_U32P_AS_U8(&upper[i]); - const uint8x16_t TR = LOADQ_U32P_AS_U8(&upper[i + 1]); - const uint8x16_t avgTTR = vhaddq_u8(T, TR); - DO_PRED10(0); - DO_PRED10(1); - DO_PRED10(2); - DO_PRED10(3); - } - VP8LPredictorsAdd_C[10](in + i, upper + i, num_pixels - i, out + i); -} -#undef DO_PRED10 - -// Predictor11: select. -#define DO_PRED11(LANE) do { \ - const uint8x16_t sumLin = vaddq_u8(L, src); /* in + L */ \ - const uint8x16_t pLTL = vabdq_u8(L, TL); /* |L - TL| */ \ - const uint16x8_t sum_LTL = vpaddlq_u8(pLTL); \ - const uint32x4_t pa = vpaddlq_u16(sum_LTL); \ - const uint32x4_t mask = vcleq_u32(pa, pb); \ - const uint8x16_t res = vbslq_u8(vreinterpretq_u8_u32(mask), sumTin, sumLin); \ - vst1q_lane_u32(&out[i + (LANE)], vreinterpretq_u32_u8(res), (LANE)); \ - L = ROTATE32_LEFT(res); \ -} while (0) - -static void PredictorAdd11_NEON(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - uint8x16_t L = LOADQ_U32_AS_U8(out[-1]); - for (i = 0; i + 4 <= num_pixels; i += 4) { - const uint8x16_t T = LOADQ_U32P_AS_U8(&upper[i]); - const uint8x16_t TL = LOADQ_U32P_AS_U8(&upper[i - 1]); - const uint8x16_t pTTL = vabdq_u8(T, TL); // |T - TL| - const uint16x8_t sum_TTL = vpaddlq_u8(pTTL); - const uint32x4_t pb = vpaddlq_u16(sum_TTL); - const uint8x16_t src = LOADQ_U32P_AS_U8(&in[i]); - const uint8x16_t sumTin = vaddq_u8(T, src); // in + T - DO_PRED11(0); - DO_PRED11(1); - DO_PRED11(2); - DO_PRED11(3); - } - VP8LPredictorsAdd_C[11](in + i, upper + i, num_pixels - i, out + i); -} -#undef DO_PRED11 - -// Predictor12: ClampedAddSubtractFull. -#define DO_PRED12(DIFF, LANE) do { \ - const uint8x8_t pred = \ - vqmovun_s16(vaddq_s16(vreinterpretq_s16_u16(L), (DIFF))); \ - const uint8x8_t res = \ - vadd_u8(pred, (LANE <= 1) ? vget_low_u8(src) : vget_high_u8(src)); \ - const uint16x8_t res16 = vmovl_u8(res); \ - vst1_lane_u32(&out[i + (LANE)], vreinterpret_u32_u8(res), (LANE) & 1); \ - /* rotate in the left predictor for next iteration */ \ - L = vextq_u16(res16, res16, 4); \ -} while (0) - -static void PredictorAdd12_NEON(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - uint16x8_t L = vmovl_u8(LOAD_U32_AS_U8(out[-1])); - for (i = 0; i + 4 <= num_pixels; i += 4) { - // load four pixels of source - const uint8x16_t src = LOADQ_U32P_AS_U8(&in[i]); - // precompute the difference T - TL once for all, stored as s16 - const uint8x16_t TL = LOADQ_U32P_AS_U8(&upper[i - 1]); - const uint8x16_t T = LOADQ_U32P_AS_U8(&upper[i]); - const int16x8_t diff_lo = - vreinterpretq_s16_u16(vsubl_u8(vget_low_u8(T), vget_low_u8(TL))); - const int16x8_t diff_hi = - vreinterpretq_s16_u16(vsubl_u8(vget_high_u8(T), vget_high_u8(TL))); - // loop over the four reconstructed pixels - DO_PRED12(diff_lo, 0); - DO_PRED12(diff_lo, 1); - DO_PRED12(diff_hi, 2); - DO_PRED12(diff_hi, 3); - } - VP8LPredictorsAdd_C[12](in + i, upper + i, num_pixels - i, out + i); -} -#undef DO_PRED12 - -// Predictor13: ClampedAddSubtractHalf -#define DO_PRED13(LANE, LOW_OR_HI) do { \ - const uint8x16_t avg = vhaddq_u8(L, T); \ - const uint8x16_t cmp = vcgtq_u8(TL, avg); \ - const uint8x16_t TL_1 = vaddq_u8(TL, cmp); \ - /* Compute half of the difference between avg and TL'. */ \ - const int8x8_t diff_avg = \ - vreinterpret_s8_u8(LOW_OR_HI(vhsubq_u8(avg, TL_1))); \ - /* Compute the sum with avg and saturate. */ \ - const int16x8_t avg_16 = vreinterpretq_s16_u16(vmovl_u8(LOW_OR_HI(avg))); \ - const uint8x8_t delta = vqmovun_s16(vaddw_s8(avg_16, diff_avg)); \ - const uint8x8_t res = vadd_u8(LOW_OR_HI(src), delta); \ - const uint8x16_t res2 = vcombine_u8(res, res); \ - vst1_lane_u32(&out[i + (LANE)], vreinterpret_u32_u8(res), (LANE) & 1); \ - L = ROTATE32_LEFT(res2); \ -} while (0) - -static void PredictorAdd13_NEON(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - uint8x16_t L = LOADQ_U32_AS_U8(out[-1]); - for (i = 0; i + 4 <= num_pixels; i += 4) { - const uint8x16_t src = LOADQ_U32P_AS_U8(&in[i]); - const uint8x16_t T = LOADQ_U32P_AS_U8(&upper[i]); - const uint8x16_t TL = LOADQ_U32P_AS_U8(&upper[i - 1]); - DO_PRED13(0, vget_low_u8); - DO_PRED13(1, vget_low_u8); - DO_PRED13(2, vget_high_u8); - DO_PRED13(3, vget_high_u8); - } - VP8LPredictorsAdd_C[13](in + i, upper + i, num_pixels - i, out + i); -} -#undef DO_PRED13 - -#undef LOAD_U32_AS_U8 -#undef LOAD_U32P_AS_U8 -#undef LOADQ_U32_AS_U8 -#undef LOADQ_U32P_AS_U8 -#undef GET_U8_AS_U32 -#undef GETQ_U8_AS_U32 -#undef STOREQ_U8_AS_U32P -#undef ROTATE32_LEFT - -//------------------------------------------------------------------------------ -// Subtract-Green Transform - -// vtbl?_u8 are marked unavailable for iOS arm64 with Xcode < 6.3, use -// non-standard versions there. -#if defined(__APPLE__) && defined(__aarch64__) && \ - defined(__apple_build_version__) && (__apple_build_version__< 6020037) -#define USE_VTBLQ -#endif - -#ifdef USE_VTBLQ -// 255 = byte will be zeroed -static const uint8_t kGreenShuffle[16] = { - 1, 255, 1, 255, 5, 255, 5, 255, 9, 255, 9, 255, 13, 255, 13, 255 -}; - -static WEBP_INLINE uint8x16_t DoGreenShuffle_NEON(const uint8x16_t argb, - const uint8x16_t shuffle) { - return vcombine_u8(vtbl1q_u8(argb, vget_low_u8(shuffle)), - vtbl1q_u8(argb, vget_high_u8(shuffle))); -} -#else // !USE_VTBLQ -// 255 = byte will be zeroed -static const uint8_t kGreenShuffle[8] = { 1, 255, 1, 255, 5, 255, 5, 255 }; - -static WEBP_INLINE uint8x16_t DoGreenShuffle_NEON(const uint8x16_t argb, - const uint8x8_t shuffle) { - return vcombine_u8(vtbl1_u8(vget_low_u8(argb), shuffle), - vtbl1_u8(vget_high_u8(argb), shuffle)); -} -#endif // USE_VTBLQ - -static void AddGreenToBlueAndRed_NEON(const uint32_t* src, int num_pixels, - uint32_t* dst) { - const uint32_t* const end = src + (num_pixels & ~3); -#ifdef USE_VTBLQ - const uint8x16_t shuffle = vld1q_u8(kGreenShuffle); -#else - const uint8x8_t shuffle = vld1_u8(kGreenShuffle); -#endif - for (; src < end; src += 4, dst += 4) { - const uint8x16_t argb = vld1q_u8((const uint8_t*)src); - const uint8x16_t greens = DoGreenShuffle_NEON(argb, shuffle); - vst1q_u8((uint8_t*)dst, vaddq_u8(argb, greens)); - } - // fallthrough and finish off with plain-C - VP8LAddGreenToBlueAndRed_C(src, num_pixels & 3, dst); -} - -//------------------------------------------------------------------------------ -// Color Transform - -static void TransformColorInverse_NEON(const VP8LMultipliers* const m, - const uint32_t* const src, - int num_pixels, uint32_t* dst) { -// sign-extended multiplying constants, pre-shifted by 6. -#define CST(X) (((int16_t)(m->X << 8)) >> 6) - const int16_t rb[8] = { - CST(green_to_blue_), CST(green_to_red_), - CST(green_to_blue_), CST(green_to_red_), - CST(green_to_blue_), CST(green_to_red_), - CST(green_to_blue_), CST(green_to_red_) - }; - const int16x8_t mults_rb = vld1q_s16(rb); - const int16_t b2[8] = { - 0, CST(red_to_blue_), 0, CST(red_to_blue_), - 0, CST(red_to_blue_), 0, CST(red_to_blue_), - }; - const int16x8_t mults_b2 = vld1q_s16(b2); -#undef CST -#ifdef USE_VTBLQ - static const uint8_t kg0g0[16] = { - 255, 1, 255, 1, 255, 5, 255, 5, 255, 9, 255, 9, 255, 13, 255, 13 - }; - const uint8x16_t shuffle = vld1q_u8(kg0g0); -#else - static const uint8_t k0g0g[8] = { 255, 1, 255, 1, 255, 5, 255, 5 }; - const uint8x8_t shuffle = vld1_u8(k0g0g); -#endif - const uint32x4_t mask_ag = vdupq_n_u32(0xff00ff00u); - int i; - for (i = 0; i + 4 <= num_pixels; i += 4) { - const uint8x16_t in = vld1q_u8((const uint8_t*)(src + i)); - const uint32x4_t a0g0 = vandq_u32(vreinterpretq_u32_u8(in), mask_ag); - // 0 g 0 g - const uint8x16_t greens = DoGreenShuffle_NEON(in, shuffle); - // x dr x db1 - const int16x8_t A = vqdmulhq_s16(vreinterpretq_s16_u8(greens), mults_rb); - // x r' x b' - const int8x16_t B = vaddq_s8(vreinterpretq_s8_u8(in), - vreinterpretq_s8_s16(A)); - // r' 0 b' 0 - const int16x8_t C = vshlq_n_s16(vreinterpretq_s16_s8(B), 8); - // x db2 0 0 - const int16x8_t D = vqdmulhq_s16(C, mults_b2); - // 0 x db2 0 - const uint32x4_t E = vshrq_n_u32(vreinterpretq_u32_s16(D), 8); - // r' x b'' 0 - const int8x16_t F = vaddq_s8(vreinterpretq_s8_u32(E), - vreinterpretq_s8_s16(C)); - // 0 r' 0 b'' - const uint16x8_t G = vshrq_n_u16(vreinterpretq_u16_s8(F), 8); - const uint32x4_t out = vorrq_u32(vreinterpretq_u32_u16(G), a0g0); - vst1q_u32(dst + i, out); - } - // Fall-back to C-version for left-overs. - VP8LTransformColorInverse_C(m, src + i, num_pixels - i, dst + i); -} - -#undef USE_VTBLQ - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8LDspInitNEON(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8LDspInitNEON(void) { - VP8LPredictors[5] = Predictor5_NEON; - VP8LPredictors[6] = Predictor6_NEON; - VP8LPredictors[7] = Predictor7_NEON; - VP8LPredictors[13] = Predictor13_NEON; - - VP8LPredictorsAdd[0] = PredictorAdd0_NEON; - VP8LPredictorsAdd[1] = PredictorAdd1_NEON; - VP8LPredictorsAdd[2] = PredictorAdd2_NEON; - VP8LPredictorsAdd[3] = PredictorAdd3_NEON; - VP8LPredictorsAdd[4] = PredictorAdd4_NEON; - VP8LPredictorsAdd[5] = PredictorAdd5_NEON; - VP8LPredictorsAdd[6] = PredictorAdd6_NEON; - VP8LPredictorsAdd[7] = PredictorAdd7_NEON; - VP8LPredictorsAdd[8] = PredictorAdd8_NEON; - VP8LPredictorsAdd[9] = PredictorAdd9_NEON; - VP8LPredictorsAdd[10] = PredictorAdd10_NEON; - VP8LPredictorsAdd[11] = PredictorAdd11_NEON; - VP8LPredictorsAdd[12] = PredictorAdd12_NEON; - VP8LPredictorsAdd[13] = PredictorAdd13_NEON; - - VP8LConvertBGRAToRGBA = ConvertBGRAToRGBA_NEON; - VP8LConvertBGRAToBGR = ConvertBGRAToBGR_NEON; - VP8LConvertBGRAToRGB = ConvertBGRAToRGB_NEON; - - VP8LAddGreenToBlueAndRed = AddGreenToBlueAndRed_NEON; - VP8LTransformColorInverse = TransformColorInverse_NEON; -} - -#else // !WEBP_USE_NEON - -WEBP_DSP_INIT_STUB(VP8LDspInitNEON) - -#endif // WEBP_USE_NEON diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_sse2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_sse2.c deleted file mode 100644 index a3b7ebe..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/lossless_sse2.c +++ /dev/null @@ -1,707 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE2 variant of methods for lossless decoder -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE2) - -#include "src/dsp/common_sse2.h" -#include "src/dsp/lossless.h" -#include "src/dsp/lossless_common.h" -#include -#include - -//------------------------------------------------------------------------------ -// Predictor Transform - -static WEBP_INLINE uint32_t ClampedAddSubtractFull_SSE2(uint32_t c0, - uint32_t c1, - uint32_t c2) { - const __m128i zero = _mm_setzero_si128(); - const __m128i C0 = _mm_unpacklo_epi8(_mm_cvtsi32_si128(c0), zero); - const __m128i C1 = _mm_unpacklo_epi8(_mm_cvtsi32_si128(c1), zero); - const __m128i C2 = _mm_unpacklo_epi8(_mm_cvtsi32_si128(c2), zero); - const __m128i V1 = _mm_add_epi16(C0, C1); - const __m128i V2 = _mm_sub_epi16(V1, C2); - const __m128i b = _mm_packus_epi16(V2, V2); - const uint32_t output = _mm_cvtsi128_si32(b); - return output; -} - -static WEBP_INLINE uint32_t ClampedAddSubtractHalf_SSE2(uint32_t c0, - uint32_t c1, - uint32_t c2) { - const __m128i zero = _mm_setzero_si128(); - const __m128i C0 = _mm_unpacklo_epi8(_mm_cvtsi32_si128(c0), zero); - const __m128i C1 = _mm_unpacklo_epi8(_mm_cvtsi32_si128(c1), zero); - const __m128i B0 = _mm_unpacklo_epi8(_mm_cvtsi32_si128(c2), zero); - const __m128i avg = _mm_add_epi16(C1, C0); - const __m128i A0 = _mm_srli_epi16(avg, 1); - const __m128i A1 = _mm_sub_epi16(A0, B0); - const __m128i BgtA = _mm_cmpgt_epi16(B0, A0); - const __m128i A2 = _mm_sub_epi16(A1, BgtA); - const __m128i A3 = _mm_srai_epi16(A2, 1); - const __m128i A4 = _mm_add_epi16(A0, A3); - const __m128i A5 = _mm_packus_epi16(A4, A4); - const uint32_t output = _mm_cvtsi128_si32(A5); - return output; -} - -static WEBP_INLINE uint32_t Select_SSE2(uint32_t a, uint32_t b, uint32_t c) { - int pa_minus_pb; - const __m128i zero = _mm_setzero_si128(); - const __m128i A0 = _mm_cvtsi32_si128(a); - const __m128i B0 = _mm_cvtsi32_si128(b); - const __m128i C0 = _mm_cvtsi32_si128(c); - const __m128i AC0 = _mm_subs_epu8(A0, C0); - const __m128i CA0 = _mm_subs_epu8(C0, A0); - const __m128i BC0 = _mm_subs_epu8(B0, C0); - const __m128i CB0 = _mm_subs_epu8(C0, B0); - const __m128i AC = _mm_or_si128(AC0, CA0); - const __m128i BC = _mm_or_si128(BC0, CB0); - const __m128i pa = _mm_unpacklo_epi8(AC, zero); // |a - c| - const __m128i pb = _mm_unpacklo_epi8(BC, zero); // |b - c| - const __m128i diff = _mm_sub_epi16(pb, pa); - { - int16_t out[8]; - _mm_storeu_si128((__m128i*)out, diff); - pa_minus_pb = out[0] + out[1] + out[2] + out[3]; - } - return (pa_minus_pb <= 0) ? a : b; -} - -static WEBP_INLINE void Average2_m128i(const __m128i* const a0, - const __m128i* const a1, - __m128i* const avg) { - // (a + b) >> 1 = ((a + b + 1) >> 1) - ((a ^ b) & 1) - const __m128i ones = _mm_set1_epi8(1); - const __m128i avg1 = _mm_avg_epu8(*a0, *a1); - const __m128i one = _mm_and_si128(_mm_xor_si128(*a0, *a1), ones); - *avg = _mm_sub_epi8(avg1, one); -} - -static WEBP_INLINE void Average2_uint32_SSE2(const uint32_t a0, - const uint32_t a1, - __m128i* const avg) { - // (a + b) >> 1 = ((a + b + 1) >> 1) - ((a ^ b) & 1) - const __m128i ones = _mm_set1_epi8(1); - const __m128i A0 = _mm_cvtsi32_si128(a0); - const __m128i A1 = _mm_cvtsi32_si128(a1); - const __m128i avg1 = _mm_avg_epu8(A0, A1); - const __m128i one = _mm_and_si128(_mm_xor_si128(A0, A1), ones); - *avg = _mm_sub_epi8(avg1, one); -} - -static WEBP_INLINE __m128i Average2_uint32_16_SSE2(uint32_t a0, uint32_t a1) { - const __m128i zero = _mm_setzero_si128(); - const __m128i A0 = _mm_unpacklo_epi8(_mm_cvtsi32_si128(a0), zero); - const __m128i A1 = _mm_unpacklo_epi8(_mm_cvtsi32_si128(a1), zero); - const __m128i sum = _mm_add_epi16(A1, A0); - return _mm_srli_epi16(sum, 1); -} - -static WEBP_INLINE uint32_t Average2_SSE2(uint32_t a0, uint32_t a1) { - __m128i output; - Average2_uint32_SSE2(a0, a1, &output); - return _mm_cvtsi128_si32(output); -} - -static WEBP_INLINE uint32_t Average3_SSE2(uint32_t a0, uint32_t a1, - uint32_t a2) { - const __m128i zero = _mm_setzero_si128(); - const __m128i avg1 = Average2_uint32_16_SSE2(a0, a2); - const __m128i A1 = _mm_unpacklo_epi8(_mm_cvtsi32_si128(a1), zero); - const __m128i sum = _mm_add_epi16(avg1, A1); - const __m128i avg2 = _mm_srli_epi16(sum, 1); - const __m128i A2 = _mm_packus_epi16(avg2, avg2); - const uint32_t output = _mm_cvtsi128_si32(A2); - return output; -} - -static WEBP_INLINE uint32_t Average4_SSE2(uint32_t a0, uint32_t a1, - uint32_t a2, uint32_t a3) { - const __m128i avg1 = Average2_uint32_16_SSE2(a0, a1); - const __m128i avg2 = Average2_uint32_16_SSE2(a2, a3); - const __m128i sum = _mm_add_epi16(avg2, avg1); - const __m128i avg3 = _mm_srli_epi16(sum, 1); - const __m128i A0 = _mm_packus_epi16(avg3, avg3); - const uint32_t output = _mm_cvtsi128_si32(A0); - return output; -} - -static uint32_t Predictor5_SSE2(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average3_SSE2(left, top[0], top[1]); - return pred; -} -static uint32_t Predictor6_SSE2(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2_SSE2(left, top[-1]); - return pred; -} -static uint32_t Predictor7_SSE2(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2_SSE2(left, top[0]); - return pred; -} -static uint32_t Predictor8_SSE2(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2_SSE2(top[-1], top[0]); - (void)left; - return pred; -} -static uint32_t Predictor9_SSE2(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average2_SSE2(top[0], top[1]); - (void)left; - return pred; -} -static uint32_t Predictor10_SSE2(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Average4_SSE2(left, top[-1], top[0], top[1]); - return pred; -} -static uint32_t Predictor11_SSE2(uint32_t left, const uint32_t* const top) { - const uint32_t pred = Select_SSE2(top[0], left, top[-1]); - return pred; -} -static uint32_t Predictor12_SSE2(uint32_t left, const uint32_t* const top) { - const uint32_t pred = ClampedAddSubtractFull_SSE2(left, top[0], top[-1]); - return pred; -} -static uint32_t Predictor13_SSE2(uint32_t left, const uint32_t* const top) { - const uint32_t pred = ClampedAddSubtractHalf_SSE2(left, top[0], top[-1]); - return pred; -} - -// Batch versions of those functions. - -// Predictor0: ARGB_BLACK. -static void PredictorAdd0_SSE2(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - const __m128i black = _mm_set1_epi32(ARGB_BLACK); - for (i = 0; i + 4 <= num_pixels; i += 4) { - const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); - const __m128i res = _mm_add_epi8(src, black); - _mm_storeu_si128((__m128i*)&out[i], res); - } - if (i != num_pixels) { - VP8LPredictorsAdd_C[0](in + i, upper + i, num_pixels - i, out + i); - } -} - -// Predictor1: left. -static void PredictorAdd1_SSE2(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - __m128i prev = _mm_set1_epi32(out[-1]); - for (i = 0; i + 4 <= num_pixels; i += 4) { - // a | b | c | d - const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); - // 0 | a | b | c - const __m128i shift0 = _mm_slli_si128(src, 4); - // a | a + b | b + c | c + d - const __m128i sum0 = _mm_add_epi8(src, shift0); - // 0 | 0 | a | a + b - const __m128i shift1 = _mm_slli_si128(sum0, 8); - // a | a + b | a + b + c | a + b + c + d - const __m128i sum1 = _mm_add_epi8(sum0, shift1); - const __m128i res = _mm_add_epi8(sum1, prev); - _mm_storeu_si128((__m128i*)&out[i], res); - // replicate prev output on the four lanes - prev = _mm_shuffle_epi32(res, (3 << 0) | (3 << 2) | (3 << 4) | (3 << 6)); - } - if (i != num_pixels) { - VP8LPredictorsAdd_C[1](in + i, upper + i, num_pixels - i, out + i); - } -} - -// Macro that adds 32-bit integers from IN using mod 256 arithmetic -// per 8 bit channel. -#define GENERATE_PREDICTOR_1(X, IN) \ -static void PredictorAdd##X##_SSE2(const uint32_t* in, const uint32_t* upper, \ - int num_pixels, uint32_t* out) { \ - int i; \ - for (i = 0; i + 4 <= num_pixels; i += 4) { \ - const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); \ - const __m128i other = _mm_loadu_si128((const __m128i*)&(IN)); \ - const __m128i res = _mm_add_epi8(src, other); \ - _mm_storeu_si128((__m128i*)&out[i], res); \ - } \ - if (i != num_pixels) { \ - VP8LPredictorsAdd_C[(X)](in + i, upper + i, num_pixels - i, out + i); \ - } \ -} - -// Predictor2: Top. -GENERATE_PREDICTOR_1(2, upper[i]) -// Predictor3: Top-right. -GENERATE_PREDICTOR_1(3, upper[i + 1]) -// Predictor4: Top-left. -GENERATE_PREDICTOR_1(4, upper[i - 1]) -#undef GENERATE_PREDICTOR_1 - -// Due to averages with integers, values cannot be accumulated in parallel for -// predictors 5 to 7. -GENERATE_PREDICTOR_ADD(Predictor5_SSE2, PredictorAdd5_SSE2) -GENERATE_PREDICTOR_ADD(Predictor6_SSE2, PredictorAdd6_SSE2) -GENERATE_PREDICTOR_ADD(Predictor7_SSE2, PredictorAdd7_SSE2) - -#define GENERATE_PREDICTOR_2(X, IN) \ -static void PredictorAdd##X##_SSE2(const uint32_t* in, const uint32_t* upper, \ - int num_pixels, uint32_t* out) { \ - int i; \ - for (i = 0; i + 4 <= num_pixels; i += 4) { \ - const __m128i Tother = _mm_loadu_si128((const __m128i*)&(IN)); \ - const __m128i T = _mm_loadu_si128((const __m128i*)&upper[i]); \ - const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); \ - __m128i avg, res; \ - Average2_m128i(&T, &Tother, &avg); \ - res = _mm_add_epi8(avg, src); \ - _mm_storeu_si128((__m128i*)&out[i], res); \ - } \ - if (i != num_pixels) { \ - VP8LPredictorsAdd_C[(X)](in + i, upper + i, num_pixels - i, out + i); \ - } \ -} -// Predictor8: average TL T. -GENERATE_PREDICTOR_2(8, upper[i - 1]) -// Predictor9: average T TR. -GENERATE_PREDICTOR_2(9, upper[i + 1]) -#undef GENERATE_PREDICTOR_2 - -// Predictor10: average of (average of (L,TL), average of (T, TR)). -#define DO_PRED10(OUT) do { \ - __m128i avgLTL, avg; \ - Average2_m128i(&L, &TL, &avgLTL); \ - Average2_m128i(&avgTTR, &avgLTL, &avg); \ - L = _mm_add_epi8(avg, src); \ - out[i + (OUT)] = _mm_cvtsi128_si32(L); \ -} while (0) - -#define DO_PRED10_SHIFT do { \ - /* Rotate the pre-computed values for the next iteration.*/ \ - avgTTR = _mm_srli_si128(avgTTR, 4); \ - TL = _mm_srli_si128(TL, 4); \ - src = _mm_srli_si128(src, 4); \ -} while (0) - -static void PredictorAdd10_SSE2(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - __m128i L = _mm_cvtsi32_si128(out[-1]); - for (i = 0; i + 4 <= num_pixels; i += 4) { - __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); - __m128i TL = _mm_loadu_si128((const __m128i*)&upper[i - 1]); - const __m128i T = _mm_loadu_si128((const __m128i*)&upper[i]); - const __m128i TR = _mm_loadu_si128((const __m128i*)&upper[i + 1]); - __m128i avgTTR; - Average2_m128i(&T, &TR, &avgTTR); - DO_PRED10(0); - DO_PRED10_SHIFT; - DO_PRED10(1); - DO_PRED10_SHIFT; - DO_PRED10(2); - DO_PRED10_SHIFT; - DO_PRED10(3); - } - if (i != num_pixels) { - VP8LPredictorsAdd_C[10](in + i, upper + i, num_pixels - i, out + i); - } -} -#undef DO_PRED10 -#undef DO_PRED10_SHIFT - -// Predictor11: select. -#define DO_PRED11(OUT) do { \ - const __m128i L_lo = _mm_unpacklo_epi32(L, T); \ - const __m128i TL_lo = _mm_unpacklo_epi32(TL, T); \ - const __m128i pb = _mm_sad_epu8(L_lo, TL_lo); /* pb = sum |L-TL|*/ \ - const __m128i mask = _mm_cmpgt_epi32(pb, pa); \ - const __m128i A = _mm_and_si128(mask, L); \ - const __m128i B = _mm_andnot_si128(mask, T); \ - const __m128i pred = _mm_or_si128(A, B); /* pred = (pa > b)? L : T*/ \ - L = _mm_add_epi8(src, pred); \ - out[i + (OUT)] = _mm_cvtsi128_si32(L); \ -} while (0) - -#define DO_PRED11_SHIFT do { \ - /* Shift the pre-computed value for the next iteration.*/ \ - T = _mm_srli_si128(T, 4); \ - TL = _mm_srli_si128(TL, 4); \ - src = _mm_srli_si128(src, 4); \ - pa = _mm_srli_si128(pa, 4); \ -} while (0) - -static void PredictorAdd11_SSE2(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - __m128i pa; - __m128i L = _mm_cvtsi32_si128(out[-1]); - for (i = 0; i + 4 <= num_pixels; i += 4) { - __m128i T = _mm_loadu_si128((const __m128i*)&upper[i]); - __m128i TL = _mm_loadu_si128((const __m128i*)&upper[i - 1]); - __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); - { - // We can unpack with any value on the upper 32 bits, provided it's the - // same on both operands (so that their sum of abs diff is zero). Here we - // use T. - const __m128i T_lo = _mm_unpacklo_epi32(T, T); - const __m128i TL_lo = _mm_unpacklo_epi32(TL, T); - const __m128i T_hi = _mm_unpackhi_epi32(T, T); - const __m128i TL_hi = _mm_unpackhi_epi32(TL, T); - const __m128i s_lo = _mm_sad_epu8(T_lo, TL_lo); - const __m128i s_hi = _mm_sad_epu8(T_hi, TL_hi); - pa = _mm_packs_epi32(s_lo, s_hi); // pa = sum |T-TL| - } - DO_PRED11(0); - DO_PRED11_SHIFT; - DO_PRED11(1); - DO_PRED11_SHIFT; - DO_PRED11(2); - DO_PRED11_SHIFT; - DO_PRED11(3); - } - if (i != num_pixels) { - VP8LPredictorsAdd_C[11](in + i, upper + i, num_pixels - i, out + i); - } -} -#undef DO_PRED11 -#undef DO_PRED11_SHIFT - -// Predictor12: ClampedAddSubtractFull. -#define DO_PRED12(DIFF, LANE, OUT) do { \ - const __m128i all = _mm_add_epi16(L, (DIFF)); \ - const __m128i alls = _mm_packus_epi16(all, all); \ - const __m128i res = _mm_add_epi8(src, alls); \ - out[i + (OUT)] = _mm_cvtsi128_si32(res); \ - L = _mm_unpacklo_epi8(res, zero); \ -} while (0) - -#define DO_PRED12_SHIFT(DIFF, LANE) do { \ - /* Shift the pre-computed value for the next iteration.*/ \ - if ((LANE) == 0) (DIFF) = _mm_srli_si128((DIFF), 8); \ - src = _mm_srli_si128(src, 4); \ -} while (0) - -static void PredictorAdd12_SSE2(const uint32_t* in, const uint32_t* upper, - int num_pixels, uint32_t* out) { - int i; - const __m128i zero = _mm_setzero_si128(); - const __m128i L8 = _mm_cvtsi32_si128(out[-1]); - __m128i L = _mm_unpacklo_epi8(L8, zero); - for (i = 0; i + 4 <= num_pixels; i += 4) { - // Load 4 pixels at a time. - __m128i src = _mm_loadu_si128((const __m128i*)&in[i]); - const __m128i T = _mm_loadu_si128((const __m128i*)&upper[i]); - const __m128i T_lo = _mm_unpacklo_epi8(T, zero); - const __m128i T_hi = _mm_unpackhi_epi8(T, zero); - const __m128i TL = _mm_loadu_si128((const __m128i*)&upper[i - 1]); - const __m128i TL_lo = _mm_unpacklo_epi8(TL, zero); - const __m128i TL_hi = _mm_unpackhi_epi8(TL, zero); - __m128i diff_lo = _mm_sub_epi16(T_lo, TL_lo); - __m128i diff_hi = _mm_sub_epi16(T_hi, TL_hi); - DO_PRED12(diff_lo, 0, 0); - DO_PRED12_SHIFT(diff_lo, 0); - DO_PRED12(diff_lo, 1, 1); - DO_PRED12_SHIFT(diff_lo, 1); - DO_PRED12(diff_hi, 0, 2); - DO_PRED12_SHIFT(diff_hi, 0); - DO_PRED12(diff_hi, 1, 3); - } - if (i != num_pixels) { - VP8LPredictorsAdd_C[12](in + i, upper + i, num_pixels - i, out + i); - } -} -#undef DO_PRED12 -#undef DO_PRED12_SHIFT - -// Due to averages with integers, values cannot be accumulated in parallel for -// predictors 13. -GENERATE_PREDICTOR_ADD(Predictor13_SSE2, PredictorAdd13_SSE2) - -//------------------------------------------------------------------------------ -// Subtract-Green Transform - -static void AddGreenToBlueAndRed_SSE2(const uint32_t* const src, int num_pixels, - uint32_t* dst) { - int i; - for (i = 0; i + 4 <= num_pixels; i += 4) { - const __m128i in = _mm_loadu_si128((const __m128i*)&src[i]); // argb - const __m128i A = _mm_srli_epi16(in, 8); // 0 a 0 g - const __m128i B = _mm_shufflelo_epi16(A, _MM_SHUFFLE(2, 2, 0, 0)); - const __m128i C = _mm_shufflehi_epi16(B, _MM_SHUFFLE(2, 2, 0, 0)); // 0g0g - const __m128i out = _mm_add_epi8(in, C); - _mm_storeu_si128((__m128i*)&dst[i], out); - } - // fallthrough and finish off with plain-C - if (i != num_pixels) { - VP8LAddGreenToBlueAndRed_C(src + i, num_pixels - i, dst + i); - } -} - -//------------------------------------------------------------------------------ -// Color Transform - -static void TransformColorInverse_SSE2(const VP8LMultipliers* const m, - const uint32_t* const src, - int num_pixels, uint32_t* dst) { -// sign-extended multiplying constants, pre-shifted by 5. -#define CST(X) (((int16_t)(m->X << 8)) >> 5) // sign-extend -#define MK_CST_16(HI, LO) \ - _mm_set1_epi32((int)(((uint32_t)(HI) << 16) | ((LO) & 0xffff))) - const __m128i mults_rb = MK_CST_16(CST(green_to_red_), CST(green_to_blue_)); - const __m128i mults_b2 = MK_CST_16(CST(red_to_blue_), 0); -#undef MK_CST_16 -#undef CST - const __m128i mask_ag = _mm_set1_epi32(0xff00ff00); // alpha-green masks - int i; - for (i = 0; i + 4 <= num_pixels; i += 4) { - const __m128i in = _mm_loadu_si128((const __m128i*)&src[i]); // argb - const __m128i A = _mm_and_si128(in, mask_ag); // a 0 g 0 - const __m128i B = _mm_shufflelo_epi16(A, _MM_SHUFFLE(2, 2, 0, 0)); - const __m128i C = _mm_shufflehi_epi16(B, _MM_SHUFFLE(2, 2, 0, 0)); // g0g0 - const __m128i D = _mm_mulhi_epi16(C, mults_rb); // x dr x db1 - const __m128i E = _mm_add_epi8(in, D); // x r' x b' - const __m128i F = _mm_slli_epi16(E, 8); // r' 0 b' 0 - const __m128i G = _mm_mulhi_epi16(F, mults_b2); // x db2 0 0 - const __m128i H = _mm_srli_epi32(G, 8); // 0 x db2 0 - const __m128i I = _mm_add_epi8(H, F); // r' x b'' 0 - const __m128i J = _mm_srli_epi16(I, 8); // 0 r' 0 b'' - const __m128i out = _mm_or_si128(J, A); - _mm_storeu_si128((__m128i*)&dst[i], out); - } - // Fall-back to C-version for left-overs. - if (i != num_pixels) { - VP8LTransformColorInverse_C(m, src + i, num_pixels - i, dst + i); - } -} - -//------------------------------------------------------------------------------ -// Color-space conversion functions - -static void ConvertBGRAToRGB_SSE2(const uint32_t* src, int num_pixels, - uint8_t* dst) { - const __m128i* in = (const __m128i*)src; - __m128i* out = (__m128i*)dst; - - while (num_pixels >= 32) { - // Load the BGRA buffers. - __m128i in0 = _mm_loadu_si128(in + 0); - __m128i in1 = _mm_loadu_si128(in + 1); - __m128i in2 = _mm_loadu_si128(in + 2); - __m128i in3 = _mm_loadu_si128(in + 3); - __m128i in4 = _mm_loadu_si128(in + 4); - __m128i in5 = _mm_loadu_si128(in + 5); - __m128i in6 = _mm_loadu_si128(in + 6); - __m128i in7 = _mm_loadu_si128(in + 7); - VP8L32bToPlanar_SSE2(&in0, &in1, &in2, &in3); - VP8L32bToPlanar_SSE2(&in4, &in5, &in6, &in7); - // At this points, in1/in5 contains red only, in2/in6 green only ... - // Pack the colors in 24b RGB. - VP8PlanarTo24b_SSE2(&in1, &in5, &in2, &in6, &in3, &in7); - _mm_storeu_si128(out + 0, in1); - _mm_storeu_si128(out + 1, in5); - _mm_storeu_si128(out + 2, in2); - _mm_storeu_si128(out + 3, in6); - _mm_storeu_si128(out + 4, in3); - _mm_storeu_si128(out + 5, in7); - in += 8; - out += 6; - num_pixels -= 32; - } - // left-overs - if (num_pixels > 0) { - VP8LConvertBGRAToRGB_C((const uint32_t*)in, num_pixels, (uint8_t*)out); - } -} - -static void ConvertBGRAToRGBA_SSE2(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const __m128i red_blue_mask = _mm_set1_epi32(0x00ff00ffu); - const __m128i* in = (const __m128i*)src; - __m128i* out = (__m128i*)dst; - while (num_pixels >= 8) { - const __m128i A1 = _mm_loadu_si128(in++); - const __m128i A2 = _mm_loadu_si128(in++); - const __m128i B1 = _mm_and_si128(A1, red_blue_mask); // R 0 B 0 - const __m128i B2 = _mm_and_si128(A2, red_blue_mask); // R 0 B 0 - const __m128i C1 = _mm_andnot_si128(red_blue_mask, A1); // 0 G 0 A - const __m128i C2 = _mm_andnot_si128(red_blue_mask, A2); // 0 G 0 A - const __m128i D1 = _mm_shufflelo_epi16(B1, _MM_SHUFFLE(2, 3, 0, 1)); - const __m128i D2 = _mm_shufflelo_epi16(B2, _MM_SHUFFLE(2, 3, 0, 1)); - const __m128i E1 = _mm_shufflehi_epi16(D1, _MM_SHUFFLE(2, 3, 0, 1)); - const __m128i E2 = _mm_shufflehi_epi16(D2, _MM_SHUFFLE(2, 3, 0, 1)); - const __m128i F1 = _mm_or_si128(E1, C1); - const __m128i F2 = _mm_or_si128(E2, C2); - _mm_storeu_si128(out++, F1); - _mm_storeu_si128(out++, F2); - num_pixels -= 8; - } - // left-overs - if (num_pixels > 0) { - VP8LConvertBGRAToRGBA_C((const uint32_t*)in, num_pixels, (uint8_t*)out); - } -} - -static void ConvertBGRAToRGBA4444_SSE2(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const __m128i mask_0x0f = _mm_set1_epi8(0x0f); - const __m128i mask_0xf0 = _mm_set1_epi8(0xf0); - const __m128i* in = (const __m128i*)src; - __m128i* out = (__m128i*)dst; - while (num_pixels >= 8) { - const __m128i bgra0 = _mm_loadu_si128(in++); // bgra0|bgra1|bgra2|bgra3 - const __m128i bgra4 = _mm_loadu_si128(in++); // bgra4|bgra5|bgra6|bgra7 - const __m128i v0l = _mm_unpacklo_epi8(bgra0, bgra4); // b0b4g0g4r0r4a0a4... - const __m128i v0h = _mm_unpackhi_epi8(bgra0, bgra4); // b2b6g2g6r2r6a2a6... - const __m128i v1l = _mm_unpacklo_epi8(v0l, v0h); // b0b2b4b6g0g2g4g6... - const __m128i v1h = _mm_unpackhi_epi8(v0l, v0h); // b1b3b5b7g1g3g5g7... - const __m128i v2l = _mm_unpacklo_epi8(v1l, v1h); // b0...b7 | g0...g7 - const __m128i v2h = _mm_unpackhi_epi8(v1l, v1h); // r0...r7 | a0...a7 - const __m128i ga0 = _mm_unpackhi_epi64(v2l, v2h); // g0...g7 | a0...a7 - const __m128i rb0 = _mm_unpacklo_epi64(v2h, v2l); // r0...r7 | b0...b7 - const __m128i ga1 = _mm_srli_epi16(ga0, 4); // g0-|g1-|...|a6-|a7- - const __m128i rb1 = _mm_and_si128(rb0, mask_0xf0); // -r0|-r1|...|-b6|-a7 - const __m128i ga2 = _mm_and_si128(ga1, mask_0x0f); // g0-|g1-|...|a6-|a7- - const __m128i rgba0 = _mm_or_si128(ga2, rb1); // rg0..rg7 | ba0..ba7 - const __m128i rgba1 = _mm_srli_si128(rgba0, 8); // ba0..ba7 | 0 -#if (WEBP_SWAP_16BIT_CSP == 1) - const __m128i rgba = _mm_unpacklo_epi8(rgba1, rgba0); // barg0...barg7 -#else - const __m128i rgba = _mm_unpacklo_epi8(rgba0, rgba1); // rgba0...rgba7 -#endif - _mm_storeu_si128(out++, rgba); - num_pixels -= 8; - } - // left-overs - if (num_pixels > 0) { - VP8LConvertBGRAToRGBA4444_C((const uint32_t*)in, num_pixels, (uint8_t*)out); - } -} - -static void ConvertBGRAToRGB565_SSE2(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const __m128i mask_0xe0 = _mm_set1_epi8(0xe0); - const __m128i mask_0xf8 = _mm_set1_epi8(0xf8); - const __m128i mask_0x07 = _mm_set1_epi8(0x07); - const __m128i* in = (const __m128i*)src; - __m128i* out = (__m128i*)dst; - while (num_pixels >= 8) { - const __m128i bgra0 = _mm_loadu_si128(in++); // bgra0|bgra1|bgra2|bgra3 - const __m128i bgra4 = _mm_loadu_si128(in++); // bgra4|bgra5|bgra6|bgra7 - const __m128i v0l = _mm_unpacklo_epi8(bgra0, bgra4); // b0b4g0g4r0r4a0a4... - const __m128i v0h = _mm_unpackhi_epi8(bgra0, bgra4); // b2b6g2g6r2r6a2a6... - const __m128i v1l = _mm_unpacklo_epi8(v0l, v0h); // b0b2b4b6g0g2g4g6... - const __m128i v1h = _mm_unpackhi_epi8(v0l, v0h); // b1b3b5b7g1g3g5g7... - const __m128i v2l = _mm_unpacklo_epi8(v1l, v1h); // b0...b7 | g0...g7 - const __m128i v2h = _mm_unpackhi_epi8(v1l, v1h); // r0...r7 | a0...a7 - const __m128i ga0 = _mm_unpackhi_epi64(v2l, v2h); // g0...g7 | a0...a7 - const __m128i rb0 = _mm_unpacklo_epi64(v2h, v2l); // r0...r7 | b0...b7 - const __m128i rb1 = _mm_and_si128(rb0, mask_0xf8); // -r0..-r7|-b0..-b7 - const __m128i g_lo1 = _mm_srli_epi16(ga0, 5); - const __m128i g_lo2 = _mm_and_si128(g_lo1, mask_0x07); // g0-...g7-|xx (3b) - const __m128i g_hi1 = _mm_slli_epi16(ga0, 3); - const __m128i g_hi2 = _mm_and_si128(g_hi1, mask_0xe0); // -g0...-g7|xx (3b) - const __m128i b0 = _mm_srli_si128(rb1, 8); // -b0...-b7|0 - const __m128i rg1 = _mm_or_si128(rb1, g_lo2); // gr0...gr7|xx - const __m128i b1 = _mm_srli_epi16(b0, 3); - const __m128i gb1 = _mm_or_si128(b1, g_hi2); // bg0...bg7|xx -#if (WEBP_SWAP_16BIT_CSP == 1) - const __m128i rgba = _mm_unpacklo_epi8(gb1, rg1); // rggb0...rggb7 -#else - const __m128i rgba = _mm_unpacklo_epi8(rg1, gb1); // bgrb0...bgrb7 -#endif - _mm_storeu_si128(out++, rgba); - num_pixels -= 8; - } - // left-overs - if (num_pixels > 0) { - VP8LConvertBGRAToRGB565_C((const uint32_t*)in, num_pixels, (uint8_t*)out); - } -} - -static void ConvertBGRAToBGR_SSE2(const uint32_t* src, - int num_pixels, uint8_t* dst) { - const __m128i mask_l = _mm_set_epi32(0, 0x00ffffff, 0, 0x00ffffff); - const __m128i mask_h = _mm_set_epi32(0x00ffffff, 0, 0x00ffffff, 0); - const __m128i* in = (const __m128i*)src; - const uint8_t* const end = dst + num_pixels * 3; - // the last storel_epi64 below writes 8 bytes starting at offset 18 - while (dst + 26 <= end) { - const __m128i bgra0 = _mm_loadu_si128(in++); // bgra0|bgra1|bgra2|bgra3 - const __m128i bgra4 = _mm_loadu_si128(in++); // bgra4|bgra5|bgra6|bgra7 - const __m128i a0l = _mm_and_si128(bgra0, mask_l); // bgr0|0|bgr0|0 - const __m128i a4l = _mm_and_si128(bgra4, mask_l); // bgr0|0|bgr0|0 - const __m128i a0h = _mm_and_si128(bgra0, mask_h); // 0|bgr0|0|bgr0 - const __m128i a4h = _mm_and_si128(bgra4, mask_h); // 0|bgr0|0|bgr0 - const __m128i b0h = _mm_srli_epi64(a0h, 8); // 000b|gr00|000b|gr00 - const __m128i b4h = _mm_srli_epi64(a4h, 8); // 000b|gr00|000b|gr00 - const __m128i c0 = _mm_or_si128(a0l, b0h); // rgbrgb00|rgbrgb00 - const __m128i c4 = _mm_or_si128(a4l, b4h); // rgbrgb00|rgbrgb00 - const __m128i c2 = _mm_srli_si128(c0, 8); - const __m128i c6 = _mm_srli_si128(c4, 8); - _mm_storel_epi64((__m128i*)(dst + 0), c0); - _mm_storel_epi64((__m128i*)(dst + 6), c2); - _mm_storel_epi64((__m128i*)(dst + 12), c4); - _mm_storel_epi64((__m128i*)(dst + 18), c6); - dst += 24; - num_pixels -= 8; - } - // left-overs - if (num_pixels > 0) { - VP8LConvertBGRAToBGR_C((const uint32_t*)in, num_pixels, dst); - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void VP8LDspInitSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8LDspInitSSE2(void) { - VP8LPredictors[5] = Predictor5_SSE2; - VP8LPredictors[6] = Predictor6_SSE2; - VP8LPredictors[7] = Predictor7_SSE2; - VP8LPredictors[8] = Predictor8_SSE2; - VP8LPredictors[9] = Predictor9_SSE2; - VP8LPredictors[10] = Predictor10_SSE2; - VP8LPredictors[11] = Predictor11_SSE2; - VP8LPredictors[12] = Predictor12_SSE2; - VP8LPredictors[13] = Predictor13_SSE2; - - VP8LPredictorsAdd[0] = PredictorAdd0_SSE2; - VP8LPredictorsAdd[1] = PredictorAdd1_SSE2; - VP8LPredictorsAdd[2] = PredictorAdd2_SSE2; - VP8LPredictorsAdd[3] = PredictorAdd3_SSE2; - VP8LPredictorsAdd[4] = PredictorAdd4_SSE2; - VP8LPredictorsAdd[5] = PredictorAdd5_SSE2; - VP8LPredictorsAdd[6] = PredictorAdd6_SSE2; - VP8LPredictorsAdd[7] = PredictorAdd7_SSE2; - VP8LPredictorsAdd[8] = PredictorAdd8_SSE2; - VP8LPredictorsAdd[9] = PredictorAdd9_SSE2; - VP8LPredictorsAdd[10] = PredictorAdd10_SSE2; - VP8LPredictorsAdd[11] = PredictorAdd11_SSE2; - VP8LPredictorsAdd[12] = PredictorAdd12_SSE2; - VP8LPredictorsAdd[13] = PredictorAdd13_SSE2; - - VP8LAddGreenToBlueAndRed = AddGreenToBlueAndRed_SSE2; - VP8LTransformColorInverse = TransformColorInverse_SSE2; - - VP8LConvertBGRAToRGB = ConvertBGRAToRGB_SSE2; - VP8LConvertBGRAToRGBA = ConvertBGRAToRGBA_SSE2; - VP8LConvertBGRAToRGBA4444 = ConvertBGRAToRGBA4444_SSE2; - VP8LConvertBGRAToRGB565 = ConvertBGRAToRGB565_SSE2; - VP8LConvertBGRAToBGR = ConvertBGRAToBGR_SSE2; -} - -#else // !WEBP_USE_SSE2 - -WEBP_DSP_INIT_STUB(VP8LDspInitSSE2) - -#endif // WEBP_USE_SSE2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/mips_macro.h b/Dependencies/FreeImage/Source/LibWebP/src/dsp/mips_macro.h deleted file mode 100644 index e5371b0..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/mips_macro.h +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MIPS common macros - -#ifndef WEBP_DSP_MIPS_MACRO_H_ -#define WEBP_DSP_MIPS_MACRO_H_ - -#if defined(__GNUC__) && defined(__ANDROID__) && LOCAL_GCC_VERSION == 0x409 -#define WORK_AROUND_GCC -#endif - -#define STR(s) #s -#define XSTR(s) STR(s) - -// O0[31..16 | 15..0] = I0[31..16 | 15..0] + I1[31..16 | 15..0] -// O1[31..16 | 15..0] = I0[31..16 | 15..0] - I1[31..16 | 15..0] -// O - output -// I - input (macro doesn't change it) -#define ADD_SUB_HALVES(O0, O1, \ - I0, I1) \ - "addq.ph %[" #O0 "], %[" #I0 "], %[" #I1 "] \n\t" \ - "subq.ph %[" #O1 "], %[" #I0 "], %[" #I1 "] \n\t" - -// O - output -// I - input (macro doesn't change it) -// I[0/1] - offset in bytes -#define LOAD_IN_X2(O0, O1, \ - I0, I1) \ - "lh %[" #O0 "], " #I0 "(%[in]) \n\t" \ - "lh %[" #O1 "], " #I1 "(%[in]) \n\t" - -// I0 - location -// I1..I9 - offsets in bytes -#define LOAD_WITH_OFFSET_X4(O0, O1, O2, O3, \ - I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) \ - "ulw %[" #O0 "], " #I1 "+" XSTR(I9) "*" #I5 "(%[" #I0 "]) \n\t" \ - "ulw %[" #O1 "], " #I2 "+" XSTR(I9) "*" #I6 "(%[" #I0 "]) \n\t" \ - "ulw %[" #O2 "], " #I3 "+" XSTR(I9) "*" #I7 "(%[" #I0 "]) \n\t" \ - "ulw %[" #O3 "], " #I4 "+" XSTR(I9) "*" #I8 "(%[" #I0 "]) \n\t" - -// O - output -// IO - input/output -// I - input (macro doesn't change it) -#define MUL_SHIFT_SUM(O0, O1, O2, O3, O4, O5, O6, O7, \ - IO0, IO1, IO2, IO3, \ - I0, I1, I2, I3, I4, I5, I6, I7) \ - "mul %[" #O0 "], %[" #I0 "], %[kC2] \n\t" \ - "mul %[" #O1 "], %[" #I0 "], %[kC1] \n\t" \ - "mul %[" #O2 "], %[" #I1 "], %[kC2] \n\t" \ - "mul %[" #O3 "], %[" #I1 "], %[kC1] \n\t" \ - "mul %[" #O4 "], %[" #I2 "], %[kC2] \n\t" \ - "mul %[" #O5 "], %[" #I2 "], %[kC1] \n\t" \ - "mul %[" #O6 "], %[" #I3 "], %[kC2] \n\t" \ - "mul %[" #O7 "], %[" #I3 "], %[kC1] \n\t" \ - "sra %[" #O0 "], %[" #O0 "], 16 \n\t" \ - "sra %[" #O1 "], %[" #O1 "], 16 \n\t" \ - "sra %[" #O2 "], %[" #O2 "], 16 \n\t" \ - "sra %[" #O3 "], %[" #O3 "], 16 \n\t" \ - "sra %[" #O4 "], %[" #O4 "], 16 \n\t" \ - "sra %[" #O5 "], %[" #O5 "], 16 \n\t" \ - "sra %[" #O6 "], %[" #O6 "], 16 \n\t" \ - "sra %[" #O7 "], %[" #O7 "], 16 \n\t" \ - "addu %[" #IO0 "], %[" #IO0 "], %[" #I4 "] \n\t" \ - "addu %[" #IO1 "], %[" #IO1 "], %[" #I5 "] \n\t" \ - "subu %[" #IO2 "], %[" #IO2 "], %[" #I6 "] \n\t" \ - "subu %[" #IO3 "], %[" #IO3 "], %[" #I7 "] \n\t" - -// O - output -// I - input (macro doesn't change it) -#define INSERT_HALF_X2(O0, O1, \ - I0, I1) \ - "ins %[" #O0 "], %[" #I0 "], 16, 16 \n\t" \ - "ins %[" #O1 "], %[" #I1 "], 16, 16 \n\t" - -// O - output -// I - input (macro doesn't change it) -#define SRA_16(O0, O1, O2, O3, \ - I0, I1, I2, I3) \ - "sra %[" #O0 "], %[" #I0 "], 16 \n\t" \ - "sra %[" #O1 "], %[" #I1 "], 16 \n\t" \ - "sra %[" #O2 "], %[" #I2 "], 16 \n\t" \ - "sra %[" #O3 "], %[" #I3 "], 16 \n\t" - -// temp0[31..16 | 15..0] = temp8[31..16 | 15..0] + temp12[31..16 | 15..0] -// temp1[31..16 | 15..0] = temp8[31..16 | 15..0] - temp12[31..16 | 15..0] -// temp0[31..16 | 15..0] = temp0[31..16 >> 3 | 15..0 >> 3] -// temp1[31..16 | 15..0] = temp1[31..16 >> 3 | 15..0 >> 3] -// O - output -// I - input (macro doesn't change it) -#define SHIFT_R_SUM_X2(O0, O1, O2, O3, O4, O5, O6, O7, \ - I0, I1, I2, I3, I4, I5, I6, I7) \ - "addq.ph %[" #O0 "], %[" #I0 "], %[" #I4 "] \n\t" \ - "subq.ph %[" #O1 "], %[" #I0 "], %[" #I4 "] \n\t" \ - "addq.ph %[" #O2 "], %[" #I1 "], %[" #I5 "] \n\t" \ - "subq.ph %[" #O3 "], %[" #I1 "], %[" #I5 "] \n\t" \ - "addq.ph %[" #O4 "], %[" #I2 "], %[" #I6 "] \n\t" \ - "subq.ph %[" #O5 "], %[" #I2 "], %[" #I6 "] \n\t" \ - "addq.ph %[" #O6 "], %[" #I3 "], %[" #I7 "] \n\t" \ - "subq.ph %[" #O7 "], %[" #I3 "], %[" #I7 "] \n\t" \ - "shra.ph %[" #O0 "], %[" #O0 "], 3 \n\t" \ - "shra.ph %[" #O1 "], %[" #O1 "], 3 \n\t" \ - "shra.ph %[" #O2 "], %[" #O2 "], 3 \n\t" \ - "shra.ph %[" #O3 "], %[" #O3 "], 3 \n\t" \ - "shra.ph %[" #O4 "], %[" #O4 "], 3 \n\t" \ - "shra.ph %[" #O5 "], %[" #O5 "], 3 \n\t" \ - "shra.ph %[" #O6 "], %[" #O6 "], 3 \n\t" \ - "shra.ph %[" #O7 "], %[" #O7 "], 3 \n\t" - -// precrq.ph.w temp0, temp8, temp2 -// temp0 = temp8[31..16] | temp2[31..16] -// ins temp2, temp8, 16, 16 -// temp2 = temp8[31..16] | temp2[15..0] -// O - output -// IO - input/output -// I - input (macro doesn't change it) -#define PACK_2_HALVES_TO_WORD(O0, O1, O2, O3, \ - IO0, IO1, IO2, IO3, \ - I0, I1, I2, I3) \ - "precrq.ph.w %[" #O0 "], %[" #I0 "], %[" #IO0 "] \n\t" \ - "precrq.ph.w %[" #O1 "], %[" #I1 "], %[" #IO1 "] \n\t" \ - "ins %[" #IO0 "], %[" #I0 "], 16, 16 \n\t" \ - "ins %[" #IO1 "], %[" #I1 "], 16, 16 \n\t" \ - "precrq.ph.w %[" #O2 "], %[" #I2 "], %[" #IO2 "] \n\t" \ - "precrq.ph.w %[" #O3 "], %[" #I3 "], %[" #IO3 "] \n\t" \ - "ins %[" #IO2 "], %[" #I2 "], 16, 16 \n\t" \ - "ins %[" #IO3 "], %[" #I3 "], 16, 16 \n\t" - -// preceu.ph.qbr temp0, temp8 -// temp0 = 0 | 0 | temp8[23..16] | temp8[7..0] -// preceu.ph.qbl temp1, temp8 -// temp1 = temp8[23..16] | temp8[7..0] | 0 | 0 -// O - output -// I - input (macro doesn't change it) -#define CONVERT_2_BYTES_TO_HALF(O0, O1, O2, O3, O4, O5, O6, O7, \ - I0, I1, I2, I3) \ - "preceu.ph.qbr %[" #O0 "], %[" #I0 "] \n\t" \ - "preceu.ph.qbl %[" #O1 "], %[" #I0 "] \n\t" \ - "preceu.ph.qbr %[" #O2 "], %[" #I1 "] \n\t" \ - "preceu.ph.qbl %[" #O3 "], %[" #I1 "] \n\t" \ - "preceu.ph.qbr %[" #O4 "], %[" #I2 "] \n\t" \ - "preceu.ph.qbl %[" #O5 "], %[" #I2 "] \n\t" \ - "preceu.ph.qbr %[" #O6 "], %[" #I3 "] \n\t" \ - "preceu.ph.qbl %[" #O7 "], %[" #I3 "] \n\t" - -// temp0[31..16 | 15..0] = temp0[31..16 | 15..0] + temp8[31..16 | 15..0] -// temp0[31..16 | 15..0] = temp0[31..16 <<(s) 7 | 15..0 <<(s) 7] -// temp1..temp7 same as temp0 -// precrqu_s.qb.ph temp0, temp1, temp0: -// temp0 = temp1[31..24] | temp1[15..8] | temp0[31..24] | temp0[15..8] -// store temp0 to dst -// IO - input/output -// I - input (macro doesn't change it) -#define STORE_SAT_SUM_X2(IO0, IO1, IO2, IO3, IO4, IO5, IO6, IO7, \ - I0, I1, I2, I3, I4, I5, I6, I7, \ - I8, I9, I10, I11, I12, I13) \ - "addq.ph %[" #IO0 "], %[" #IO0 "], %[" #I0 "] \n\t" \ - "addq.ph %[" #IO1 "], %[" #IO1 "], %[" #I1 "] \n\t" \ - "addq.ph %[" #IO2 "], %[" #IO2 "], %[" #I2 "] \n\t" \ - "addq.ph %[" #IO3 "], %[" #IO3 "], %[" #I3 "] \n\t" \ - "addq.ph %[" #IO4 "], %[" #IO4 "], %[" #I4 "] \n\t" \ - "addq.ph %[" #IO5 "], %[" #IO5 "], %[" #I5 "] \n\t" \ - "addq.ph %[" #IO6 "], %[" #IO6 "], %[" #I6 "] \n\t" \ - "addq.ph %[" #IO7 "], %[" #IO7 "], %[" #I7 "] \n\t" \ - "shll_s.ph %[" #IO0 "], %[" #IO0 "], 7 \n\t" \ - "shll_s.ph %[" #IO1 "], %[" #IO1 "], 7 \n\t" \ - "shll_s.ph %[" #IO2 "], %[" #IO2 "], 7 \n\t" \ - "shll_s.ph %[" #IO3 "], %[" #IO3 "], 7 \n\t" \ - "shll_s.ph %[" #IO4 "], %[" #IO4 "], 7 \n\t" \ - "shll_s.ph %[" #IO5 "], %[" #IO5 "], 7 \n\t" \ - "shll_s.ph %[" #IO6 "], %[" #IO6 "], 7 \n\t" \ - "shll_s.ph %[" #IO7 "], %[" #IO7 "], 7 \n\t" \ - "precrqu_s.qb.ph %[" #IO0 "], %[" #IO1 "], %[" #IO0 "] \n\t" \ - "precrqu_s.qb.ph %[" #IO2 "], %[" #IO3 "], %[" #IO2 "] \n\t" \ - "precrqu_s.qb.ph %[" #IO4 "], %[" #IO5 "], %[" #IO4 "] \n\t" \ - "precrqu_s.qb.ph %[" #IO6 "], %[" #IO7 "], %[" #IO6 "] \n\t" \ - "usw %[" #IO0 "], " XSTR(I13) "*" #I9 "(%[" #I8 "]) \n\t" \ - "usw %[" #IO2 "], " XSTR(I13) "*" #I10 "(%[" #I8 "]) \n\t" \ - "usw %[" #IO4 "], " XSTR(I13) "*" #I11 "(%[" #I8 "]) \n\t" \ - "usw %[" #IO6 "], " XSTR(I13) "*" #I12 "(%[" #I8 "]) \n\t" - -#define OUTPUT_EARLY_CLOBBER_REGS_10() \ - : [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), \ - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [temp6]"=&r"(temp6), \ - [temp7]"=&r"(temp7), [temp8]"=&r"(temp8), [temp9]"=&r"(temp9), \ - [temp10]"=&r"(temp10) - -#define OUTPUT_EARLY_CLOBBER_REGS_18() \ - OUTPUT_EARLY_CLOBBER_REGS_10(), \ - [temp11]"=&r"(temp11), [temp12]"=&r"(temp12), [temp13]"=&r"(temp13), \ - [temp14]"=&r"(temp14), [temp15]"=&r"(temp15), [temp16]"=&r"(temp16), \ - [temp17]"=&r"(temp17), [temp18]"=&r"(temp18) - -#endif // WEBP_DSP_MIPS_MACRO_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/msa_macro.h b/Dependencies/FreeImage/Source/LibWebP/src/dsp/msa_macro.h deleted file mode 100644 index 32021fd..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/msa_macro.h +++ /dev/null @@ -1,1392 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MSA common macros -// -// Author(s): Prashant Patil (prashant.patil@imgtec.com) - -#ifndef WEBP_DSP_MSA_MACRO_H_ -#define WEBP_DSP_MSA_MACRO_H_ - -#include -#include - -#if defined(__clang__) - #define CLANG_BUILD -#endif - -#ifdef CLANG_BUILD - #define ALPHAVAL (-1) - #define ADDVI_H(a, b) __msa_addvi_h((v8i16)a, b) - #define ADDVI_W(a, b) __msa_addvi_w((v4i32)a, b) - #define SRAI_B(a, b) __msa_srai_b((v16i8)a, b) - #define SRAI_H(a, b) __msa_srai_h((v8i16)a, b) - #define SRAI_W(a, b) __msa_srai_w((v4i32)a, b) - #define SRLI_H(a, b) __msa_srli_h((v8i16)a, b) - #define SLLI_B(a, b) __msa_slli_b((v4i32)a, b) - #define ANDI_B(a, b) __msa_andi_b((v16u8)a, b) - #define ORI_B(a, b) __msa_ori_b((v16u8)a, b) -#else - #define ALPHAVAL (0xff) - #define ADDVI_H(a, b) (a + b) - #define ADDVI_W(a, b) (a + b) - #define SRAI_B(a, b) (a >> b) - #define SRAI_H(a, b) (a >> b) - #define SRAI_W(a, b) (a >> b) - #define SRLI_H(a, b) (a << b) - #define SLLI_B(a, b) (a << b) - #define ANDI_B(a, b) (a & b) - #define ORI_B(a, b) (a | b) -#endif - -#define LD_B(RTYPE, psrc) *((RTYPE*)(psrc)) -#define LD_UB(...) LD_B(v16u8, __VA_ARGS__) -#define LD_SB(...) LD_B(v16i8, __VA_ARGS__) - -#define LD_H(RTYPE, psrc) *((RTYPE*)(psrc)) -#define LD_UH(...) LD_H(v8u16, __VA_ARGS__) -#define LD_SH(...) LD_H(v8i16, __VA_ARGS__) - -#define LD_W(RTYPE, psrc) *((RTYPE*)(psrc)) -#define LD_UW(...) LD_W(v4u32, __VA_ARGS__) -#define LD_SW(...) LD_W(v4i32, __VA_ARGS__) - -#define ST_B(RTYPE, in, pdst) *((RTYPE*)(pdst)) = in -#define ST_UB(...) ST_B(v16u8, __VA_ARGS__) -#define ST_SB(...) ST_B(v16i8, __VA_ARGS__) - -#define ST_H(RTYPE, in, pdst) *((RTYPE*)(pdst)) = in -#define ST_UH(...) ST_H(v8u16, __VA_ARGS__) -#define ST_SH(...) ST_H(v8i16, __VA_ARGS__) - -#define ST_W(RTYPE, in, pdst) *((RTYPE*)(pdst)) = in -#define ST_UW(...) ST_W(v4u32, __VA_ARGS__) -#define ST_SW(...) ST_W(v4i32, __VA_ARGS__) - -#define MSA_LOAD_FUNC(TYPE, INSTR, FUNC_NAME) \ - static inline TYPE FUNC_NAME(const void* const psrc) { \ - const uint8_t* const psrc_m = (const uint8_t*)psrc; \ - TYPE val_m; \ - asm volatile ( \ - "" #INSTR " %[val_m], %[psrc_m] \n\t" \ - : [val_m] "=r" (val_m) \ - : [psrc_m] "m" (*psrc_m)); \ - return val_m; \ - } - -#define MSA_LOAD(psrc, FUNC_NAME) FUNC_NAME(psrc) - -#define MSA_STORE_FUNC(TYPE, INSTR, FUNC_NAME) \ - static inline void FUNC_NAME(TYPE val, void* const pdst) { \ - uint8_t* const pdst_m = (uint8_t*)pdst; \ - TYPE val_m = val; \ - asm volatile ( \ - " " #INSTR " %[val_m], %[pdst_m] \n\t" \ - : [pdst_m] "=m" (*pdst_m) \ - : [val_m] "r" (val_m)); \ - } - -#define MSA_STORE(val, pdst, FUNC_NAME) FUNC_NAME(val, pdst) - -#if (__mips_isa_rev >= 6) - MSA_LOAD_FUNC(uint16_t, lh, msa_lh); - #define LH(psrc) MSA_LOAD(psrc, msa_lh) - MSA_LOAD_FUNC(uint32_t, lw, msa_lw); - #define LW(psrc) MSA_LOAD(psrc, msa_lw) - #if (__mips == 64) - MSA_LOAD_FUNC(uint64_t, ld, msa_ld); - #define LD(psrc) MSA_LOAD(psrc, msa_ld) - #else // !(__mips == 64) - #define LD(psrc) ((((uint64_t)MSA_LOAD(psrc + 4, msa_lw)) << 32) | \ - MSA_LOAD(psrc, msa_lw)) - #endif // (__mips == 64) - - MSA_STORE_FUNC(uint16_t, sh, msa_sh); - #define SH(val, pdst) MSA_STORE(val, pdst, msa_sh) - MSA_STORE_FUNC(uint32_t, sw, msa_sw); - #define SW(val, pdst) MSA_STORE(val, pdst, msa_sw) - MSA_STORE_FUNC(uint64_t, sd, msa_sd); - #define SD(val, pdst) MSA_STORE(val, pdst, msa_sd) -#else // !(__mips_isa_rev >= 6) - MSA_LOAD_FUNC(uint16_t, ulh, msa_ulh); - #define LH(psrc) MSA_LOAD(psrc, msa_ulh) - MSA_LOAD_FUNC(uint32_t, ulw, msa_ulw); - #define LW(psrc) MSA_LOAD(psrc, msa_ulw) - #if (__mips == 64) - MSA_LOAD_FUNC(uint64_t, uld, msa_uld); - #define LD(psrc) MSA_LOAD(psrc, msa_uld) - #else // !(__mips == 64) - #define LD(psrc) ((((uint64_t)MSA_LOAD(psrc + 4, msa_ulw)) << 32) | \ - MSA_LOAD(psrc, msa_ulw)) - #endif // (__mips == 64) - - MSA_STORE_FUNC(uint16_t, ush, msa_ush); - #define SH(val, pdst) MSA_STORE(val, pdst, msa_ush) - MSA_STORE_FUNC(uint32_t, usw, msa_usw); - #define SW(val, pdst) MSA_STORE(val, pdst, msa_usw) - #define SD(val, pdst) do { \ - uint8_t* const pdst_sd_m = (uint8_t*)(pdst); \ - const uint32_t val0_m = (uint32_t)(val & 0x00000000FFFFFFFF); \ - const uint32_t val1_m = (uint32_t)((val >> 32) & 0x00000000FFFFFFFF); \ - SW(val0_m, pdst_sd_m); \ - SW(val1_m, pdst_sd_m + 4); \ - } while (0) -#endif // (__mips_isa_rev >= 6) - -/* Description : Load 4 words with stride - * Arguments : Inputs - psrc, stride - * Outputs - out0, out1, out2, out3 - * Details : Load word in 'out0' from (psrc) - * Load word in 'out1' from (psrc + stride) - * Load word in 'out2' from (psrc + 2 * stride) - * Load word in 'out3' from (psrc + 3 * stride) - */ -#define LW4(psrc, stride, out0, out1, out2, out3) do { \ - const uint8_t* ptmp = (const uint8_t*)psrc; \ - out0 = LW(ptmp); \ - ptmp += stride; \ - out1 = LW(ptmp); \ - ptmp += stride; \ - out2 = LW(ptmp); \ - ptmp += stride; \ - out3 = LW(ptmp); \ -} while (0) - -/* Description : Store words with stride - * Arguments : Inputs - in0, in1, in2, in3, pdst, stride - * Details : Store word from 'in0' to (pdst) - * Store word from 'in1' to (pdst + stride) - * Store word from 'in2' to (pdst + 2 * stride) - * Store word from 'in3' to (pdst + 3 * stride) - */ -#define SW4(in0, in1, in2, in3, pdst, stride) do { \ - uint8_t* ptmp = (uint8_t*)pdst; \ - SW(in0, ptmp); \ - ptmp += stride; \ - SW(in1, ptmp); \ - ptmp += stride; \ - SW(in2, ptmp); \ - ptmp += stride; \ - SW(in3, ptmp); \ -} while (0) - -#define SW3(in0, in1, in2, pdst, stride) do { \ - uint8_t* ptmp = (uint8_t*)pdst; \ - SW(in0, ptmp); \ - ptmp += stride; \ - SW(in1, ptmp); \ - ptmp += stride; \ - SW(in2, ptmp); \ -} while (0) - -#define SW2(in0, in1, pdst, stride) do { \ - uint8_t* ptmp = (uint8_t*)pdst; \ - SW(in0, ptmp); \ - ptmp += stride; \ - SW(in1, ptmp); \ -} while (0) - -/* Description : Store 4 double words with stride - * Arguments : Inputs - in0, in1, in2, in3, pdst, stride - * Details : Store double word from 'in0' to (pdst) - * Store double word from 'in1' to (pdst + stride) - * Store double word from 'in2' to (pdst + 2 * stride) - * Store double word from 'in3' to (pdst + 3 * stride) - */ -#define SD4(in0, in1, in2, in3, pdst, stride) do { \ - uint8_t* ptmp = (uint8_t*)pdst; \ - SD(in0, ptmp); \ - ptmp += stride; \ - SD(in1, ptmp); \ - ptmp += stride; \ - SD(in2, ptmp); \ - ptmp += stride; \ - SD(in3, ptmp); \ -} while (0) - -/* Description : Load vectors with 16 byte elements with stride - * Arguments : Inputs - psrc, stride - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Load 16 byte elements in 'out0' from (psrc) - * Load 16 byte elements in 'out1' from (psrc + stride) - */ -#define LD_B2(RTYPE, psrc, stride, out0, out1) do { \ - out0 = LD_B(RTYPE, psrc); \ - out1 = LD_B(RTYPE, psrc + stride); \ -} while (0) -#define LD_UB2(...) LD_B2(v16u8, __VA_ARGS__) -#define LD_SB2(...) LD_B2(v16i8, __VA_ARGS__) - -#define LD_B3(RTYPE, psrc, stride, out0, out1, out2) do { \ - LD_B2(RTYPE, psrc, stride, out0, out1); \ - out2 = LD_B(RTYPE, psrc + 2 * stride); \ -} while (0) -#define LD_UB3(...) LD_B3(v16u8, __VA_ARGS__) -#define LD_SB3(...) LD_B3(v16i8, __VA_ARGS__) - -#define LD_B4(RTYPE, psrc, stride, out0, out1, out2, out3) do { \ - LD_B2(RTYPE, psrc, stride, out0, out1); \ - LD_B2(RTYPE, psrc + 2 * stride , stride, out2, out3); \ -} while (0) -#define LD_UB4(...) LD_B4(v16u8, __VA_ARGS__) -#define LD_SB4(...) LD_B4(v16i8, __VA_ARGS__) - -#define LD_B8(RTYPE, psrc, stride, \ - out0, out1, out2, out3, out4, out5, out6, out7) do { \ - LD_B4(RTYPE, psrc, stride, out0, out1, out2, out3); \ - LD_B4(RTYPE, psrc + 4 * stride, stride, out4, out5, out6, out7); \ -} while (0) -#define LD_UB8(...) LD_B8(v16u8, __VA_ARGS__) -#define LD_SB8(...) LD_B8(v16i8, __VA_ARGS__) - -/* Description : Load vectors with 8 halfword elements with stride - * Arguments : Inputs - psrc, stride - * Outputs - out0, out1 - * Details : Load 8 halfword elements in 'out0' from (psrc) - * Load 8 halfword elements in 'out1' from (psrc + stride) - */ -#define LD_H2(RTYPE, psrc, stride, out0, out1) do { \ - out0 = LD_H(RTYPE, psrc); \ - out1 = LD_H(RTYPE, psrc + stride); \ -} while (0) -#define LD_UH2(...) LD_H2(v8u16, __VA_ARGS__) -#define LD_SH2(...) LD_H2(v8i16, __VA_ARGS__) - -/* Description : Load vectors with 4 word elements with stride - * Arguments : Inputs - psrc, stride - * Outputs - out0, out1, out2, out3 - * Details : Load 4 word elements in 'out0' from (psrc + 0 * stride) - * Load 4 word elements in 'out1' from (psrc + 1 * stride) - * Load 4 word elements in 'out2' from (psrc + 2 * stride) - * Load 4 word elements in 'out3' from (psrc + 3 * stride) - */ -#define LD_W2(RTYPE, psrc, stride, out0, out1) do { \ - out0 = LD_W(RTYPE, psrc); \ - out1 = LD_W(RTYPE, psrc + stride); \ -} while (0) -#define LD_UW2(...) LD_W2(v4u32, __VA_ARGS__) -#define LD_SW2(...) LD_W2(v4i32, __VA_ARGS__) - -#define LD_W3(RTYPE, psrc, stride, out0, out1, out2) do { \ - LD_W2(RTYPE, psrc, stride, out0, out1); \ - out2 = LD_W(RTYPE, psrc + 2 * stride); \ -} while (0) -#define LD_UW3(...) LD_W3(v4u32, __VA_ARGS__) -#define LD_SW3(...) LD_W3(v4i32, __VA_ARGS__) - -#define LD_W4(RTYPE, psrc, stride, out0, out1, out2, out3) do { \ - LD_W2(RTYPE, psrc, stride, out0, out1); \ - LD_W2(RTYPE, psrc + 2 * stride, stride, out2, out3); \ -} while (0) -#define LD_UW4(...) LD_W4(v4u32, __VA_ARGS__) -#define LD_SW4(...) LD_W4(v4i32, __VA_ARGS__) - -/* Description : Store vectors of 16 byte elements with stride - * Arguments : Inputs - in0, in1, pdst, stride - * Details : Store 16 byte elements from 'in0' to (pdst) - * Store 16 byte elements from 'in1' to (pdst + stride) - */ -#define ST_B2(RTYPE, in0, in1, pdst, stride) do { \ - ST_B(RTYPE, in0, pdst); \ - ST_B(RTYPE, in1, pdst + stride); \ -} while (0) -#define ST_UB2(...) ST_B2(v16u8, __VA_ARGS__) -#define ST_SB2(...) ST_B2(v16i8, __VA_ARGS__) - -#define ST_B4(RTYPE, in0, in1, in2, in3, pdst, stride) do { \ - ST_B2(RTYPE, in0, in1, pdst, stride); \ - ST_B2(RTYPE, in2, in3, pdst + 2 * stride, stride); \ -} while (0) -#define ST_UB4(...) ST_B4(v16u8, __VA_ARGS__) -#define ST_SB4(...) ST_B4(v16i8, __VA_ARGS__) - -#define ST_B8(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ - pdst, stride) do { \ - ST_B4(RTYPE, in0, in1, in2, in3, pdst, stride); \ - ST_B4(RTYPE, in4, in5, in6, in7, pdst + 4 * stride, stride); \ -} while (0) -#define ST_UB8(...) ST_B8(v16u8, __VA_ARGS__) - -/* Description : Store vectors of 4 word elements with stride - * Arguments : Inputs - in0, in1, in2, in3, pdst, stride - * Details : Store 4 word elements from 'in0' to (pdst + 0 * stride) - * Store 4 word elements from 'in1' to (pdst + 1 * stride) - * Store 4 word elements from 'in2' to (pdst + 2 * stride) - * Store 4 word elements from 'in3' to (pdst + 3 * stride) - */ -#define ST_W2(RTYPE, in0, in1, pdst, stride) do { \ - ST_W(RTYPE, in0, pdst); \ - ST_W(RTYPE, in1, pdst + stride); \ -} while (0) -#define ST_UW2(...) ST_W2(v4u32, __VA_ARGS__) -#define ST_SW2(...) ST_W2(v4i32, __VA_ARGS__) - -#define ST_W3(RTYPE, in0, in1, in2, pdst, stride) do { \ - ST_W2(RTYPE, in0, in1, pdst, stride); \ - ST_W(RTYPE, in2, pdst + 2 * stride); \ -} while (0) -#define ST_UW3(...) ST_W3(v4u32, __VA_ARGS__) -#define ST_SW3(...) ST_W3(v4i32, __VA_ARGS__) - -#define ST_W4(RTYPE, in0, in1, in2, in3, pdst, stride) do { \ - ST_W2(RTYPE, in0, in1, pdst, stride); \ - ST_W2(RTYPE, in2, in3, pdst + 2 * stride, stride); \ -} while (0) -#define ST_UW4(...) ST_W4(v4u32, __VA_ARGS__) -#define ST_SW4(...) ST_W4(v4i32, __VA_ARGS__) - -/* Description : Store vectors of 8 halfword elements with stride - * Arguments : Inputs - in0, in1, pdst, stride - * Details : Store 8 halfword elements from 'in0' to (pdst) - * Store 8 halfword elements from 'in1' to (pdst + stride) - */ -#define ST_H2(RTYPE, in0, in1, pdst, stride) do { \ - ST_H(RTYPE, in0, pdst); \ - ST_H(RTYPE, in1, pdst + stride); \ -} while (0) -#define ST_UH2(...) ST_H2(v8u16, __VA_ARGS__) -#define ST_SH2(...) ST_H2(v8i16, __VA_ARGS__) - -/* Description : Store 2x4 byte block to destination memory from input vector - * Arguments : Inputs - in, stidx, pdst, stride - * Details : Index 'stidx' halfword element from 'in' vector is copied to - * the GP register and stored to (pdst) - * Index 'stidx+1' halfword element from 'in' vector is copied to - * the GP register and stored to (pdst + stride) - * Index 'stidx+2' halfword element from 'in' vector is copied to - * the GP register and stored to (pdst + 2 * stride) - * Index 'stidx+3' halfword element from 'in' vector is copied to - * the GP register and stored to (pdst + 3 * stride) - */ -#define ST2x4_UB(in, stidx, pdst, stride) do { \ - uint8_t* pblk_2x4_m = (uint8_t*)pdst; \ - const uint16_t out0_m = __msa_copy_s_h((v8i16)in, stidx); \ - const uint16_t out1_m = __msa_copy_s_h((v8i16)in, stidx + 1); \ - const uint16_t out2_m = __msa_copy_s_h((v8i16)in, stidx + 2); \ - const uint16_t out3_m = __msa_copy_s_h((v8i16)in, stidx + 3); \ - SH(out0_m, pblk_2x4_m); \ - pblk_2x4_m += stride; \ - SH(out1_m, pblk_2x4_m); \ - pblk_2x4_m += stride; \ - SH(out2_m, pblk_2x4_m); \ - pblk_2x4_m += stride; \ - SH(out3_m, pblk_2x4_m); \ -} while (0) - -/* Description : Store 4x4 byte block to destination memory from input vector - * Arguments : Inputs - in0, in1, pdst, stride - * Details : 'Idx0' word element from input vector 'in0' is copied to the - * GP register and stored to (pdst) - * 'Idx1' word element from input vector 'in0' is copied to the - * GP register and stored to (pdst + stride) - * 'Idx2' word element from input vector 'in0' is copied to the - * GP register and stored to (pdst + 2 * stride) - * 'Idx3' word element from input vector 'in0' is copied to the - * GP register and stored to (pdst + 3 * stride) - */ -#define ST4x4_UB(in0, in1, idx0, idx1, idx2, idx3, pdst, stride) do { \ - uint8_t* const pblk_4x4_m = (uint8_t*)pdst; \ - const uint32_t out0_m = __msa_copy_s_w((v4i32)in0, idx0); \ - const uint32_t out1_m = __msa_copy_s_w((v4i32)in0, idx1); \ - const uint32_t out2_m = __msa_copy_s_w((v4i32)in1, idx2); \ - const uint32_t out3_m = __msa_copy_s_w((v4i32)in1, idx3); \ - SW4(out0_m, out1_m, out2_m, out3_m, pblk_4x4_m, stride); \ -} while (0) - -#define ST4x8_UB(in0, in1, pdst, stride) do { \ - uint8_t* const pblk_4x8 = (uint8_t*)pdst; \ - ST4x4_UB(in0, in0, 0, 1, 2, 3, pblk_4x8, stride); \ - ST4x4_UB(in1, in1, 0, 1, 2, 3, pblk_4x8 + 4 * stride, stride); \ -} while (0) - -/* Description : Immediate number of elements to slide - * Arguments : Inputs - in0, in1, slide_val - * Outputs - out - * Return Type - as per RTYPE - * Details : Byte elements from 'in1' vector are slid into 'in0' by - * value specified in the 'slide_val' - */ -#define SLDI_B(RTYPE, in0, in1, slide_val) \ - (RTYPE)__msa_sldi_b((v16i8)in0, (v16i8)in1, slide_val) \ - -#define SLDI_UB(...) SLDI_B(v16u8, __VA_ARGS__) -#define SLDI_SB(...) SLDI_B(v16i8, __VA_ARGS__) -#define SLDI_SH(...) SLDI_B(v8i16, __VA_ARGS__) - -/* Description : Shuffle byte vector elements as per mask vector - * Arguments : Inputs - in0, in1, in2, in3, mask0, mask1 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Byte elements from 'in0' & 'in1' are copied selectively to - * 'out0' as per control vector 'mask0' - */ -#define VSHF_B(RTYPE, in0, in1, mask) \ - (RTYPE)__msa_vshf_b((v16i8)mask, (v16i8)in1, (v16i8)in0) - -#define VSHF_UB(...) VSHF_B(v16u8, __VA_ARGS__) -#define VSHF_SB(...) VSHF_B(v16i8, __VA_ARGS__) -#define VSHF_UH(...) VSHF_B(v8u16, __VA_ARGS__) -#define VSHF_SH(...) VSHF_B(v8i16, __VA_ARGS__) - -#define VSHF_B2(RTYPE, in0, in1, in2, in3, mask0, mask1, out0, out1) do { \ - out0 = VSHF_B(RTYPE, in0, in1, mask0); \ - out1 = VSHF_B(RTYPE, in2, in3, mask1); \ -} while (0) -#define VSHF_B2_UB(...) VSHF_B2(v16u8, __VA_ARGS__) -#define VSHF_B2_SB(...) VSHF_B2(v16i8, __VA_ARGS__) -#define VSHF_B2_UH(...) VSHF_B2(v8u16, __VA_ARGS__) -#define VSHF_B2_SH(...) VSHF_B2(v8i16, __VA_ARGS__) - -/* Description : Shuffle halfword vector elements as per mask vector - * Arguments : Inputs - in0, in1, in2, in3, mask0, mask1 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : halfword elements from 'in0' & 'in1' are copied selectively to - * 'out0' as per control vector 'mask0' - */ -#define VSHF_H2(RTYPE, in0, in1, in2, in3, mask0, mask1, out0, out1) do { \ - out0 = (RTYPE)__msa_vshf_h((v8i16)mask0, (v8i16)in1, (v8i16)in0); \ - out1 = (RTYPE)__msa_vshf_h((v8i16)mask1, (v8i16)in3, (v8i16)in2); \ -} while (0) -#define VSHF_H2_UH(...) VSHF_H2(v8u16, __VA_ARGS__) -#define VSHF_H2_SH(...) VSHF_H2(v8i16, __VA_ARGS__) - -/* Description : Dot product of byte vector elements - * Arguments : Inputs - mult0, mult1, cnst0, cnst1 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Signed byte elements from 'mult0' are multiplied with - * signed byte elements from 'cnst0' producing a result - * twice the size of input i.e. signed halfword. - * The multiplication result of adjacent odd-even elements - * are added together and written to the 'out0' vector -*/ -#define DOTP_SB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) do { \ - out0 = (RTYPE)__msa_dotp_s_h((v16i8)mult0, (v16i8)cnst0); \ - out1 = (RTYPE)__msa_dotp_s_h((v16i8)mult1, (v16i8)cnst1); \ -} while (0) -#define DOTP_SB2_SH(...) DOTP_SB2(v8i16, __VA_ARGS__) - -/* Description : Dot product of halfword vector elements - * Arguments : Inputs - mult0, mult1, cnst0, cnst1 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Signed halfword elements from 'mult0' are multiplied with - * signed halfword elements from 'cnst0' producing a result - * twice the size of input i.e. signed word. - * The multiplication result of adjacent odd-even elements - * are added together and written to the 'out0' vector - */ -#define DOTP_SH2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) do { \ - out0 = (RTYPE)__msa_dotp_s_w((v8i16)mult0, (v8i16)cnst0); \ - out1 = (RTYPE)__msa_dotp_s_w((v8i16)mult1, (v8i16)cnst1); \ -} while (0) -#define DOTP_SH2_SW(...) DOTP_SH2(v4i32, __VA_ARGS__) - -/* Description : Dot product of unsigned word vector elements - * Arguments : Inputs - mult0, mult1, cnst0, cnst1 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Unsigned word elements from 'mult0' are multiplied with - * unsigned word elements from 'cnst0' producing a result - * twice the size of input i.e. unsigned double word. - * The multiplication result of adjacent odd-even elements - * are added together and written to the 'out0' vector - */ -#define DOTP_UW2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) do { \ - out0 = (RTYPE)__msa_dotp_u_d((v4u32)mult0, (v4u32)cnst0); \ - out1 = (RTYPE)__msa_dotp_u_d((v4u32)mult1, (v4u32)cnst1); \ -} while (0) -#define DOTP_UW2_UD(...) DOTP_UW2(v2u64, __VA_ARGS__) - -/* Description : Dot product & addition of halfword vector elements - * Arguments : Inputs - mult0, mult1, cnst0, cnst1 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Signed halfword elements from 'mult0' are multiplied with - * signed halfword elements from 'cnst0' producing a result - * twice the size of input i.e. signed word. - * The multiplication result of adjacent odd-even elements - * are added to the 'out0' vector - */ -#define DPADD_SH2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) do { \ - out0 = (RTYPE)__msa_dpadd_s_w((v4i32)out0, (v8i16)mult0, (v8i16)cnst0); \ - out1 = (RTYPE)__msa_dpadd_s_w((v4i32)out1, (v8i16)mult1, (v8i16)cnst1); \ -} while (0) -#define DPADD_SH2_SW(...) DPADD_SH2(v4i32, __VA_ARGS__) - -/* Description : Clips all signed halfword elements of input vector - * between 0 & 255 - * Arguments : Input/output - val - * Return Type - signed halfword - */ -#define CLIP_SH_0_255(val) do { \ - const v8i16 max_m = __msa_ldi_h(255); \ - val = __msa_maxi_s_h((v8i16)val, 0); \ - val = __msa_min_s_h(max_m, (v8i16)val); \ -} while (0) - -#define CLIP_SH2_0_255(in0, in1) do { \ - CLIP_SH_0_255(in0); \ - CLIP_SH_0_255(in1); \ -} while (0) - -#define CLIP_SH4_0_255(in0, in1, in2, in3) do { \ - CLIP_SH2_0_255(in0, in1); \ - CLIP_SH2_0_255(in2, in3); \ -} while (0) - -/* Description : Clips all unsigned halfword elements of input vector - * between 0 & 255 - * Arguments : Input - in - * Output - out_m - * Return Type - unsigned halfword - */ -#define CLIP_UH_0_255(in) do { \ - const v8u16 max_m = (v8u16)__msa_ldi_h(255); \ - in = __msa_maxi_u_h((v8u16) in, 0); \ - in = __msa_min_u_h((v8u16) max_m, (v8u16) in); \ -} while (0) - -#define CLIP_UH2_0_255(in0, in1) do { \ - CLIP_UH_0_255(in0); \ - CLIP_UH_0_255(in1); \ -} while (0) - -/* Description : Clips all signed word elements of input vector - * between 0 & 255 - * Arguments : Input/output - val - * Return Type - signed word - */ -#define CLIP_SW_0_255(val) do { \ - const v4i32 max_m = __msa_ldi_w(255); \ - val = __msa_maxi_s_w((v4i32)val, 0); \ - val = __msa_min_s_w(max_m, (v4i32)val); \ -} while (0) - -#define CLIP_SW4_0_255(in0, in1, in2, in3) do { \ - CLIP_SW_0_255(in0); \ - CLIP_SW_0_255(in1); \ - CLIP_SW_0_255(in2); \ - CLIP_SW_0_255(in3); \ -} while (0) - -/* Description : Horizontal addition of 4 signed word elements of input vector - * Arguments : Input - in (signed word vector) - * Output - sum_m (i32 sum) - * Return Type - signed word (GP) - * Details : 4 signed word elements of 'in' vector are added together and - * the resulting integer sum is returned - */ -static WEBP_INLINE int32_t func_hadd_sw_s32(v4i32 in) { - const v2i64 res0_m = __msa_hadd_s_d((v4i32)in, (v4i32)in); - const v2i64 res1_m = __msa_splati_d(res0_m, 1); - const v2i64 out = res0_m + res1_m; - int32_t sum_m = __msa_copy_s_w((v4i32)out, 0); - return sum_m; -} -#define HADD_SW_S32(in) func_hadd_sw_s32(in) - -/* Description : Horizontal addition of 8 signed halfword elements - * Arguments : Input - in (signed halfword vector) - * Output - sum_m (s32 sum) - * Return Type - signed word - * Details : 8 signed halfword elements of input vector are added - * together and the resulting integer sum is returned - */ -static WEBP_INLINE int32_t func_hadd_sh_s32(v8i16 in) { - const v4i32 res = __msa_hadd_s_w(in, in); - const v2i64 res0 = __msa_hadd_s_d(res, res); - const v2i64 res1 = __msa_splati_d(res0, 1); - const v2i64 res2 = res0 + res1; - const int32_t sum_m = __msa_copy_s_w((v4i32)res2, 0); - return sum_m; -} -#define HADD_SH_S32(in) func_hadd_sh_s32(in) - -/* Description : Horizontal addition of 8 unsigned halfword elements - * Arguments : Input - in (unsigned halfword vector) - * Output - sum_m (u32 sum) - * Return Type - unsigned word - * Details : 8 unsigned halfword elements of input vector are added - * together and the resulting integer sum is returned - */ -static WEBP_INLINE uint32_t func_hadd_uh_u32(v8u16 in) { - uint32_t sum_m; - const v4u32 res_m = __msa_hadd_u_w(in, in); - v2u64 res0_m = __msa_hadd_u_d(res_m, res_m); - v2u64 res1_m = (v2u64)__msa_splati_d((v2i64)res0_m, 1); - res0_m = res0_m + res1_m; - sum_m = __msa_copy_s_w((v4i32)res0_m, 0); - return sum_m; -} -#define HADD_UH_U32(in) func_hadd_uh_u32(in) - -/* Description : Horizontal addition of signed half word vector elements - Arguments : Inputs - in0, in1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Each signed odd half word element from 'in0' is added to - even signed half word element from 'in0' (pairwise) and the - halfword result is written in 'out0' -*/ -#define HADD_SH2(RTYPE, in0, in1, out0, out1) do { \ - out0 = (RTYPE)__msa_hadd_s_w((v8i16)in0, (v8i16)in0); \ - out1 = (RTYPE)__msa_hadd_s_w((v8i16)in1, (v8i16)in1); \ -} while (0) -#define HADD_SH2_SW(...) HADD_SH2(v4i32, __VA_ARGS__) - -#define HADD_SH4(RTYPE, in0, in1, in2, in3, out0, out1, out2, out3) do { \ - HADD_SH2(RTYPE, in0, in1, out0, out1); \ - HADD_SH2(RTYPE, in2, in3, out2, out3); \ -} while (0) -#define HADD_SH4_SW(...) HADD_SH4(v4i32, __VA_ARGS__) - -/* Description : Horizontal subtraction of unsigned byte vector elements - * Arguments : Inputs - in0, in1 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Each unsigned odd byte element from 'in0' is subtracted from - * even unsigned byte element from 'in0' (pairwise) and the - * halfword result is written to 'out0' - */ -#define HSUB_UB2(RTYPE, in0, in1, out0, out1) do { \ - out0 = (RTYPE)__msa_hsub_u_h((v16u8)in0, (v16u8)in0); \ - out1 = (RTYPE)__msa_hsub_u_h((v16u8)in1, (v16u8)in1); \ -} while (0) -#define HSUB_UB2_UH(...) HSUB_UB2(v8u16, __VA_ARGS__) -#define HSUB_UB2_SH(...) HSUB_UB2(v8i16, __VA_ARGS__) -#define HSUB_UB2_SW(...) HSUB_UB2(v4i32, __VA_ARGS__) - -/* Description : Set element n input vector to GPR value - * Arguments : Inputs - in0, in1, in2, in3 - * Output - out - * Return Type - as per RTYPE - * Details : Set element 0 in vector 'out' to value specified in 'in0' - */ -#define INSERT_W2(RTYPE, in0, in1, out) do { \ - out = (RTYPE)__msa_insert_w((v4i32)out, 0, in0); \ - out = (RTYPE)__msa_insert_w((v4i32)out, 1, in1); \ -} while (0) -#define INSERT_W2_UB(...) INSERT_W2(v16u8, __VA_ARGS__) -#define INSERT_W2_SB(...) INSERT_W2(v16i8, __VA_ARGS__) - -#define INSERT_W4(RTYPE, in0, in1, in2, in3, out) do { \ - out = (RTYPE)__msa_insert_w((v4i32)out, 0, in0); \ - out = (RTYPE)__msa_insert_w((v4i32)out, 1, in1); \ - out = (RTYPE)__msa_insert_w((v4i32)out, 2, in2); \ - out = (RTYPE)__msa_insert_w((v4i32)out, 3, in3); \ -} while (0) -#define INSERT_W4_UB(...) INSERT_W4(v16u8, __VA_ARGS__) -#define INSERT_W4_SB(...) INSERT_W4(v16i8, __VA_ARGS__) -#define INSERT_W4_SW(...) INSERT_W4(v4i32, __VA_ARGS__) - -/* Description : Set element n of double word input vector to GPR value - * Arguments : Inputs - in0, in1 - * Output - out - * Return Type - as per RTYPE - * Details : Set element 0 in vector 'out' to GPR value specified in 'in0' - * Set element 1 in vector 'out' to GPR value specified in 'in1' - */ -#define INSERT_D2(RTYPE, in0, in1, out) do { \ - out = (RTYPE)__msa_insert_d((v2i64)out, 0, in0); \ - out = (RTYPE)__msa_insert_d((v2i64)out, 1, in1); \ -} while (0) -#define INSERT_D2_UB(...) INSERT_D2(v16u8, __VA_ARGS__) -#define INSERT_D2_SB(...) INSERT_D2(v16i8, __VA_ARGS__) - -/* Description : Interleave even byte elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Even byte elements of 'in0' and 'in1' are interleaved - * and written to 'out0' - */ -#define ILVEV_B2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvev_b((v16i8)in1, (v16i8)in0); \ - out1 = (RTYPE)__msa_ilvev_b((v16i8)in3, (v16i8)in2); \ -} while (0) -#define ILVEV_B2_UB(...) ILVEV_B2(v16u8, __VA_ARGS__) -#define ILVEV_B2_SB(...) ILVEV_B2(v16i8, __VA_ARGS__) -#define ILVEV_B2_UH(...) ILVEV_B2(v8u16, __VA_ARGS__) -#define ILVEV_B2_SH(...) ILVEV_B2(v8i16, __VA_ARGS__) -#define ILVEV_B2_SD(...) ILVEV_B2(v2i64, __VA_ARGS__) - -/* Description : Interleave odd byte elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Odd byte elements of 'in0' and 'in1' are interleaved - * and written to 'out0' - */ -#define ILVOD_B2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvod_b((v16i8)in1, (v16i8)in0); \ - out1 = (RTYPE)__msa_ilvod_b((v16i8)in3, (v16i8)in2); \ -} while (0) -#define ILVOD_B2_UB(...) ILVOD_B2(v16u8, __VA_ARGS__) -#define ILVOD_B2_SB(...) ILVOD_B2(v16i8, __VA_ARGS__) -#define ILVOD_B2_UH(...) ILVOD_B2(v8u16, __VA_ARGS__) -#define ILVOD_B2_SH(...) ILVOD_B2(v8i16, __VA_ARGS__) -#define ILVOD_B2_SD(...) ILVOD_B2(v2i64, __VA_ARGS__) - -/* Description : Interleave even halfword elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Even halfword elements of 'in0' and 'in1' are interleaved - * and written to 'out0' - */ -#define ILVEV_H2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvev_h((v8i16)in1, (v8i16)in0); \ - out1 = (RTYPE)__msa_ilvev_h((v8i16)in3, (v8i16)in2); \ -} while (0) -#define ILVEV_H2_UB(...) ILVEV_H2(v16u8, __VA_ARGS__) -#define ILVEV_H2_UH(...) ILVEV_H2(v8u16, __VA_ARGS__) -#define ILVEV_H2_SH(...) ILVEV_H2(v8i16, __VA_ARGS__) -#define ILVEV_H2_SW(...) ILVEV_H2(v4i32, __VA_ARGS__) - -/* Description : Interleave odd halfword elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Odd halfword elements of 'in0' and 'in1' are interleaved - * and written to 'out0' - */ -#define ILVOD_H2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvod_h((v8i16)in1, (v8i16)in0); \ - out1 = (RTYPE)__msa_ilvod_h((v8i16)in3, (v8i16)in2); \ -} while (0) -#define ILVOD_H2_UB(...) ILVOD_H2(v16u8, __VA_ARGS__) -#define ILVOD_H2_UH(...) ILVOD_H2(v8u16, __VA_ARGS__) -#define ILVOD_H2_SH(...) ILVOD_H2(v8i16, __VA_ARGS__) -#define ILVOD_H2_SW(...) ILVOD_H2(v4i32, __VA_ARGS__) - -/* Description : Interleave even word elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Even word elements of 'in0' and 'in1' are interleaved - * and written to 'out0' - */ -#define ILVEV_W2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvev_w((v4i32)in1, (v4i32)in0); \ - out1 = (RTYPE)__msa_ilvev_w((v4i32)in3, (v4i32)in2); \ -} while (0) -#define ILVEV_W2_UB(...) ILVEV_W2(v16u8, __VA_ARGS__) -#define ILVEV_W2_SB(...) ILVEV_W2(v16i8, __VA_ARGS__) -#define ILVEV_W2_UH(...) ILVEV_W2(v8u16, __VA_ARGS__) -#define ILVEV_W2_SD(...) ILVEV_W2(v2i64, __VA_ARGS__) - -/* Description : Interleave even-odd word elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Even word elements of 'in0' and 'in1' are interleaved - * and written to 'out0' - * Odd word elements of 'in2' and 'in3' are interleaved - * and written to 'out1' - */ -#define ILVEVOD_W2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvev_w((v4i32)in1, (v4i32)in0); \ - out1 = (RTYPE)__msa_ilvod_w((v4i32)in3, (v4i32)in2); \ -} while (0) -#define ILVEVOD_W2_UB(...) ILVEVOD_W2(v16u8, __VA_ARGS__) -#define ILVEVOD_W2_UH(...) ILVEVOD_W2(v8u16, __VA_ARGS__) -#define ILVEVOD_W2_SH(...) ILVEVOD_W2(v8i16, __VA_ARGS__) -#define ILVEVOD_W2_SW(...) ILVEVOD_W2(v4i32, __VA_ARGS__) - -/* Description : Interleave even-odd half-word elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Even half-word elements of 'in0' and 'in1' are interleaved - * and written to 'out0' - * Odd half-word elements of 'in2' and 'in3' are interleaved - * and written to 'out1' - */ -#define ILVEVOD_H2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvev_h((v8i16)in1, (v8i16)in0); \ - out1 = (RTYPE)__msa_ilvod_h((v8i16)in3, (v8i16)in2); \ -} while (0) -#define ILVEVOD_H2_UB(...) ILVEVOD_H2(v16u8, __VA_ARGS__) -#define ILVEVOD_H2_UH(...) ILVEVOD_H2(v8u16, __VA_ARGS__) -#define ILVEVOD_H2_SH(...) ILVEVOD_H2(v8i16, __VA_ARGS__) -#define ILVEVOD_H2_SW(...) ILVEVOD_H2(v4i32, __VA_ARGS__) - -/* Description : Interleave even double word elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Even double word elements of 'in0' and 'in1' are interleaved - * and written to 'out0' - */ -#define ILVEV_D2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvev_d((v2i64)in1, (v2i64)in0); \ - out1 = (RTYPE)__msa_ilvev_d((v2i64)in3, (v2i64)in2); \ -} while (0) -#define ILVEV_D2_UB(...) ILVEV_D2(v16u8, __VA_ARGS__) -#define ILVEV_D2_SB(...) ILVEV_D2(v16i8, __VA_ARGS__) -#define ILVEV_D2_SW(...) ILVEV_D2(v4i32, __VA_ARGS__) -#define ILVEV_D2_SD(...) ILVEV_D2(v2i64, __VA_ARGS__) - -/* Description : Interleave left half of byte elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Left half of byte elements of 'in0' and 'in1' are interleaved - * and written to 'out0'. - */ -#define ILVL_B2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvl_b((v16i8)in0, (v16i8)in1); \ - out1 = (RTYPE)__msa_ilvl_b((v16i8)in2, (v16i8)in3); \ -} while (0) -#define ILVL_B2_UB(...) ILVL_B2(v16u8, __VA_ARGS__) -#define ILVL_B2_SB(...) ILVL_B2(v16i8, __VA_ARGS__) -#define ILVL_B2_UH(...) ILVL_B2(v8u16, __VA_ARGS__) -#define ILVL_B2_SH(...) ILVL_B2(v8i16, __VA_ARGS__) -#define ILVL_B2_SW(...) ILVL_B2(v4i32, __VA_ARGS__) - -/* Description : Interleave right half of byte elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Right half of byte elements of 'in0' and 'in1' are interleaved - * and written to out0. - */ -#define ILVR_B2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvr_b((v16i8)in0, (v16i8)in1); \ - out1 = (RTYPE)__msa_ilvr_b((v16i8)in2, (v16i8)in3); \ -} while (0) -#define ILVR_B2_UB(...) ILVR_B2(v16u8, __VA_ARGS__) -#define ILVR_B2_SB(...) ILVR_B2(v16i8, __VA_ARGS__) -#define ILVR_B2_UH(...) ILVR_B2(v8u16, __VA_ARGS__) -#define ILVR_B2_SH(...) ILVR_B2(v8i16, __VA_ARGS__) -#define ILVR_B2_SW(...) ILVR_B2(v4i32, __VA_ARGS__) - -#define ILVR_B4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ - out0, out1, out2, out3) do { \ - ILVR_B2(RTYPE, in0, in1, in2, in3, out0, out1); \ - ILVR_B2(RTYPE, in4, in5, in6, in7, out2, out3); \ -} while (0) -#define ILVR_B4_UB(...) ILVR_B4(v16u8, __VA_ARGS__) -#define ILVR_B4_SB(...) ILVR_B4(v16i8, __VA_ARGS__) -#define ILVR_B4_UH(...) ILVR_B4(v8u16, __VA_ARGS__) -#define ILVR_B4_SH(...) ILVR_B4(v8i16, __VA_ARGS__) -#define ILVR_B4_SW(...) ILVR_B4(v4i32, __VA_ARGS__) - -/* Description : Interleave right half of halfword elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Right half of halfword elements of 'in0' and 'in1' are - * interleaved and written to 'out0'. - */ -#define ILVR_H2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvr_h((v8i16)in0, (v8i16)in1); \ - out1 = (RTYPE)__msa_ilvr_h((v8i16)in2, (v8i16)in3); \ -} while (0) -#define ILVR_H2_UB(...) ILVR_H2(v16u8, __VA_ARGS__) -#define ILVR_H2_SH(...) ILVR_H2(v8i16, __VA_ARGS__) -#define ILVR_H2_SW(...) ILVR_H2(v4i32, __VA_ARGS__) - -#define ILVR_H4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ - out0, out1, out2, out3) do { \ - ILVR_H2(RTYPE, in0, in1, in2, in3, out0, out1); \ - ILVR_H2(RTYPE, in4, in5, in6, in7, out2, out3); \ -} while (0) -#define ILVR_H4_UB(...) ILVR_H4(v16u8, __VA_ARGS__) -#define ILVR_H4_SH(...) ILVR_H4(v8i16, __VA_ARGS__) -#define ILVR_H4_SW(...) ILVR_H4(v4i32, __VA_ARGS__) - -/* Description : Interleave right half of double word elements from vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Right half of double word elements of 'in0' and 'in1' are - * interleaved and written to 'out0'. - */ -#define ILVR_D2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvr_d((v2i64)in0, (v2i64)in1); \ - out1 = (RTYPE)__msa_ilvr_d((v2i64)in2, (v2i64)in3); \ -} while (0) -#define ILVR_D2_UB(...) ILVR_D2(v16u8, __VA_ARGS__) -#define ILVR_D2_SB(...) ILVR_D2(v16i8, __VA_ARGS__) -#define ILVR_D2_SH(...) ILVR_D2(v8i16, __VA_ARGS__) - -#define ILVR_D4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ - out0, out1, out2, out3) do { \ - ILVR_D2(RTYPE, in0, in1, in2, in3, out0, out1); \ - ILVR_D2(RTYPE, in4, in5, in6, in7, out2, out3); \ -} while (0) -#define ILVR_D4_SB(...) ILVR_D4(v16i8, __VA_ARGS__) -#define ILVR_D4_UB(...) ILVR_D4(v16u8, __VA_ARGS__) - -/* Description : Interleave both left and right half of input vectors - * Arguments : Inputs - in0, in1 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Right half of byte elements from 'in0' and 'in1' are - * interleaved and written to 'out0' - */ -#define ILVRL_B2(RTYPE, in0, in1, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvr_b((v16i8)in0, (v16i8)in1); \ - out1 = (RTYPE)__msa_ilvl_b((v16i8)in0, (v16i8)in1); \ -} while (0) -#define ILVRL_B2_UB(...) ILVRL_B2(v16u8, __VA_ARGS__) -#define ILVRL_B2_SB(...) ILVRL_B2(v16i8, __VA_ARGS__) -#define ILVRL_B2_UH(...) ILVRL_B2(v8u16, __VA_ARGS__) -#define ILVRL_B2_SH(...) ILVRL_B2(v8i16, __VA_ARGS__) -#define ILVRL_B2_SW(...) ILVRL_B2(v4i32, __VA_ARGS__) - -#define ILVRL_H2(RTYPE, in0, in1, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvr_h((v8i16)in0, (v8i16)in1); \ - out1 = (RTYPE)__msa_ilvl_h((v8i16)in0, (v8i16)in1); \ -} while (0) -#define ILVRL_H2_UB(...) ILVRL_H2(v16u8, __VA_ARGS__) -#define ILVRL_H2_SB(...) ILVRL_H2(v16i8, __VA_ARGS__) -#define ILVRL_H2_SH(...) ILVRL_H2(v8i16, __VA_ARGS__) -#define ILVRL_H2_SW(...) ILVRL_H2(v4i32, __VA_ARGS__) -#define ILVRL_H2_UW(...) ILVRL_H2(v4u32, __VA_ARGS__) - -#define ILVRL_W2(RTYPE, in0, in1, out0, out1) do { \ - out0 = (RTYPE)__msa_ilvr_w((v4i32)in0, (v4i32)in1); \ - out1 = (RTYPE)__msa_ilvl_w((v4i32)in0, (v4i32)in1); \ -} while (0) -#define ILVRL_W2_UB(...) ILVRL_W2(v16u8, __VA_ARGS__) -#define ILVRL_W2_SH(...) ILVRL_W2(v8i16, __VA_ARGS__) -#define ILVRL_W2_SW(...) ILVRL_W2(v4i32, __VA_ARGS__) -#define ILVRL_W2_UW(...) ILVRL_W2(v4u32, __VA_ARGS__) - -/* Description : Pack even byte elements of vector pairs - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Even byte elements of 'in0' are copied to the left half of - * 'out0' & even byte elements of 'in1' are copied to the right - * half of 'out0'. - */ -#define PCKEV_B2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_pckev_b((v16i8)in0, (v16i8)in1); \ - out1 = (RTYPE)__msa_pckev_b((v16i8)in2, (v16i8)in3); \ -} while (0) -#define PCKEV_B2_SB(...) PCKEV_B2(v16i8, __VA_ARGS__) -#define PCKEV_B2_UB(...) PCKEV_B2(v16u8, __VA_ARGS__) -#define PCKEV_B2_SH(...) PCKEV_B2(v8i16, __VA_ARGS__) -#define PCKEV_B2_SW(...) PCKEV_B2(v4i32, __VA_ARGS__) - -#define PCKEV_B4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ - out0, out1, out2, out3) do { \ - PCKEV_B2(RTYPE, in0, in1, in2, in3, out0, out1); \ - PCKEV_B2(RTYPE, in4, in5, in6, in7, out2, out3); \ -} while (0) -#define PCKEV_B4_SB(...) PCKEV_B4(v16i8, __VA_ARGS__) -#define PCKEV_B4_UB(...) PCKEV_B4(v16u8, __VA_ARGS__) -#define PCKEV_B4_SH(...) PCKEV_B4(v8i16, __VA_ARGS__) -#define PCKEV_B4_SW(...) PCKEV_B4(v4i32, __VA_ARGS__) - -/* Description : Pack even halfword elements of vector pairs - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Even halfword elements of 'in0' are copied to the left half of - * 'out0' & even halfword elements of 'in1' are copied to the - * right half of 'out0'. - */ -#define PCKEV_H2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_pckev_h((v8i16)in0, (v8i16)in1); \ - out1 = (RTYPE)__msa_pckev_h((v8i16)in2, (v8i16)in3); \ -} while (0) -#define PCKEV_H2_UH(...) PCKEV_H2(v8u16, __VA_ARGS__) -#define PCKEV_H2_SH(...) PCKEV_H2(v8i16, __VA_ARGS__) -#define PCKEV_H2_SW(...) PCKEV_H2(v4i32, __VA_ARGS__) -#define PCKEV_H2_UW(...) PCKEV_H2(v4u32, __VA_ARGS__) - -/* Description : Pack even word elements of vector pairs - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Even word elements of 'in0' are copied to the left half of - * 'out0' & even word elements of 'in1' are copied to the - * right half of 'out0'. - */ -#define PCKEV_W2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_pckev_w((v4i32)in0, (v4i32)in1); \ - out1 = (RTYPE)__msa_pckev_w((v4i32)in2, (v4i32)in3); \ -} while (0) -#define PCKEV_W2_UH(...) PCKEV_W2(v8u16, __VA_ARGS__) -#define PCKEV_W2_SH(...) PCKEV_W2(v8i16, __VA_ARGS__) -#define PCKEV_W2_SW(...) PCKEV_W2(v4i32, __VA_ARGS__) -#define PCKEV_W2_UW(...) PCKEV_W2(v4u32, __VA_ARGS__) - -/* Description : Pack odd halfword elements of vector pairs - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Odd halfword elements of 'in0' are copied to the left half of - * 'out0' & odd halfword elements of 'in1' are copied to the - * right half of 'out0'. - */ -#define PCKOD_H2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_pckod_h((v8i16)in0, (v8i16)in1); \ - out1 = (RTYPE)__msa_pckod_h((v8i16)in2, (v8i16)in3); \ -} while (0) -#define PCKOD_H2_UH(...) PCKOD_H2(v8u16, __VA_ARGS__) -#define PCKOD_H2_SH(...) PCKOD_H2(v8i16, __VA_ARGS__) -#define PCKOD_H2_SW(...) PCKOD_H2(v4i32, __VA_ARGS__) -#define PCKOD_H2_UW(...) PCKOD_H2(v4u32, __VA_ARGS__) - -/* Description : Arithmetic immediate shift right all elements of word vector - * Arguments : Inputs - in0, in1, shift - * Outputs - in place operation - * Return Type - as per input vector RTYPE - * Details : Each element of vector 'in0' is right shifted by 'shift' and - * the result is written in-place. 'shift' is a GP variable. - */ -#define SRAI_W2(RTYPE, in0, in1, shift_val) do { \ - in0 = (RTYPE)SRAI_W(in0, shift_val); \ - in1 = (RTYPE)SRAI_W(in1, shift_val); \ -} while (0) -#define SRAI_W2_SW(...) SRAI_W2(v4i32, __VA_ARGS__) -#define SRAI_W2_UW(...) SRAI_W2(v4u32, __VA_ARGS__) - -#define SRAI_W4(RTYPE, in0, in1, in2, in3, shift_val) do { \ - SRAI_W2(RTYPE, in0, in1, shift_val); \ - SRAI_W2(RTYPE, in2, in3, shift_val); \ -} while (0) -#define SRAI_W4_SW(...) SRAI_W4(v4i32, __VA_ARGS__) -#define SRAI_W4_UW(...) SRAI_W4(v4u32, __VA_ARGS__) - -/* Description : Arithmetic shift right all elements of half-word vector - * Arguments : Inputs - in0, in1, shift - * Outputs - in place operation - * Return Type - as per input vector RTYPE - * Details : Each element of vector 'in0' is right shifted by 'shift' and - * the result is written in-place. 'shift' is a GP variable. - */ -#define SRAI_H2(RTYPE, in0, in1, shift_val) do { \ - in0 = (RTYPE)SRAI_H(in0, shift_val); \ - in1 = (RTYPE)SRAI_H(in1, shift_val); \ -} while (0) -#define SRAI_H2_SH(...) SRAI_H2(v8i16, __VA_ARGS__) -#define SRAI_H2_UH(...) SRAI_H2(v8u16, __VA_ARGS__) - -/* Description : Arithmetic rounded shift right all elements of word vector - * Arguments : Inputs - in0, in1, shift - * Outputs - in place operation - * Return Type - as per input vector RTYPE - * Details : Each element of vector 'in0' is right shifted by 'shift' and - * the result is written in-place. 'shift' is a GP variable. - */ -#define SRARI_W2(RTYPE, in0, in1, shift) do { \ - in0 = (RTYPE)__msa_srari_w((v4i32)in0, shift); \ - in1 = (RTYPE)__msa_srari_w((v4i32)in1, shift); \ -} while (0) -#define SRARI_W2_SW(...) SRARI_W2(v4i32, __VA_ARGS__) - -#define SRARI_W4(RTYPE, in0, in1, in2, in3, shift) do { \ - SRARI_W2(RTYPE, in0, in1, shift); \ - SRARI_W2(RTYPE, in2, in3, shift); \ -} while (0) -#define SRARI_W4_SH(...) SRARI_W4(v8i16, __VA_ARGS__) -#define SRARI_W4_UW(...) SRARI_W4(v4u32, __VA_ARGS__) -#define SRARI_W4_SW(...) SRARI_W4(v4i32, __VA_ARGS__) - -/* Description : Shift right arithmetic rounded double words - * Arguments : Inputs - in0, in1, shift - * Outputs - in place operation - * Return Type - as per RTYPE - * Details : Each element of vector 'in0' is shifted right arithmetically by - * the number of bits in the corresponding element in the vector - * 'shift'. The last discarded bit is added to shifted value for - * rounding and the result is written in-place. - * 'shift' is a vector. - */ -#define SRAR_D2(RTYPE, in0, in1, shift) do { \ - in0 = (RTYPE)__msa_srar_d((v2i64)in0, (v2i64)shift); \ - in1 = (RTYPE)__msa_srar_d((v2i64)in1, (v2i64)shift); \ -} while (0) -#define SRAR_D2_SW(...) SRAR_D2(v4i32, __VA_ARGS__) -#define SRAR_D2_SD(...) SRAR_D2(v2i64, __VA_ARGS__) -#define SRAR_D2_UD(...) SRAR_D2(v2u64, __VA_ARGS__) - -#define SRAR_D4(RTYPE, in0, in1, in2, in3, shift) do { \ - SRAR_D2(RTYPE, in0, in1, shift); \ - SRAR_D2(RTYPE, in2, in3, shift); \ -} while (0) -#define SRAR_D4_SD(...) SRAR_D4(v2i64, __VA_ARGS__) -#define SRAR_D4_UD(...) SRAR_D4(v2u64, __VA_ARGS__) - -/* Description : Addition of 2 pairs of half-word vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Details : Each element in 'in0' is added to 'in1' and result is written - * to 'out0'. - */ -#define ADDVI_H2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)ADDVI_H(in0, in1); \ - out1 = (RTYPE)ADDVI_H(in2, in3); \ -} while (0) -#define ADDVI_H2_SH(...) ADDVI_H2(v8i16, __VA_ARGS__) -#define ADDVI_H2_UH(...) ADDVI_H2(v8u16, __VA_ARGS__) - -/* Description : Addition of 2 pairs of word vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Details : Each element in 'in0' is added to 'in1' and result is written - * to 'out0'. - */ -#define ADDVI_W2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)ADDVI_W(in0, in1); \ - out1 = (RTYPE)ADDVI_W(in2, in3); \ -} while (0) -#define ADDVI_W2_SW(...) ADDVI_W2(v4i32, __VA_ARGS__) - -/* Description : Fill 2 pairs of word vectors with GP registers - * Arguments : Inputs - in0, in1 - * Outputs - out0, out1 - * Details : GP register in0 is replicated in each word element of out0 - * GP register in1 is replicated in each word element of out1 - */ -#define FILL_W2(RTYPE, in0, in1, out0, out1) do { \ - out0 = (RTYPE)__msa_fill_w(in0); \ - out1 = (RTYPE)__msa_fill_w(in1); \ -} while (0) -#define FILL_W2_SW(...) FILL_W2(v4i32, __VA_ARGS__) - -/* Description : Addition of 2 pairs of vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Details : Each element in 'in0' is added to 'in1' and result is written - * to 'out0'. - */ -#define ADD2(in0, in1, in2, in3, out0, out1) do { \ - out0 = in0 + in1; \ - out1 = in2 + in3; \ -} while (0) - -#define ADD4(in0, in1, in2, in3, in4, in5, in6, in7, \ - out0, out1, out2, out3) do { \ - ADD2(in0, in1, in2, in3, out0, out1); \ - ADD2(in4, in5, in6, in7, out2, out3); \ -} while (0) - -/* Description : Subtraction of 2 pairs of vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Details : Each element in 'in1' is subtracted from 'in0' and result is - * written to 'out0'. - */ -#define SUB2(in0, in1, in2, in3, out0, out1) do { \ - out0 = in0 - in1; \ - out1 = in2 - in3; \ -} while (0) - -#define SUB3(in0, in1, in2, in3, in4, in5, out0, out1, out2) do { \ - out0 = in0 - in1; \ - out1 = in2 - in3; \ - out2 = in4 - in5; \ -} while (0) - -#define SUB4(in0, in1, in2, in3, in4, in5, in6, in7, \ - out0, out1, out2, out3) do { \ - out0 = in0 - in1; \ - out1 = in2 - in3; \ - out2 = in4 - in5; \ - out3 = in6 - in7; \ -} while (0) - -/* Description : Addition - Subtraction of input vectors - * Arguments : Inputs - in0, in1 - * Outputs - out0, out1 - * Details : Each element in 'in1' is added to 'in0' and result is - * written to 'out0'. - * Each element in 'in1' is subtracted from 'in0' and result is - * written to 'out1'. - */ -#define ADDSUB2(in0, in1, out0, out1) do { \ - out0 = in0 + in1; \ - out1 = in0 - in1; \ -} while (0) - -/* Description : Multiplication of pairs of vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1 - * Details : Each element from 'in0' is multiplied with elements from 'in1' - * and the result is written to 'out0' - */ -#define MUL2(in0, in1, in2, in3, out0, out1) do { \ - out0 = in0 * in1; \ - out1 = in2 * in3; \ -} while (0) - -#define MUL4(in0, in1, in2, in3, in4, in5, in6, in7, \ - out0, out1, out2, out3) do { \ - MUL2(in0, in1, in2, in3, out0, out1); \ - MUL2(in4, in5, in6, in7, out2, out3); \ -} while (0) - -/* Description : Sign extend halfword elements from right half of the vector - * Arguments : Input - in (halfword vector) - * Output - out (sign extended word vector) - * Return Type - signed word - * Details : Sign bit of halfword elements from input vector 'in' is - * extracted and interleaved with same vector 'in0' to generate - * 4 word elements keeping sign intact - */ -#define UNPCK_R_SH_SW(in, out) do { \ - const v8i16 sign_m = __msa_clti_s_h((v8i16)in, 0); \ - out = (v4i32)__msa_ilvr_h(sign_m, (v8i16)in); \ -} while (0) - -/* Description : Sign extend halfword elements from input vector and return - * the result in pair of vectors - * Arguments : Input - in (halfword vector) - * Outputs - out0, out1 (sign extended word vectors) - * Return Type - signed word - * Details : Sign bit of halfword elements from input vector 'in' is - * extracted and interleaved right with same vector 'in0' to - * generate 4 signed word elements in 'out0' - * Then interleaved left with same vector 'in0' to - * generate 4 signed word elements in 'out1' - */ -#define UNPCK_SH_SW(in, out0, out1) do { \ - const v8i16 tmp_m = __msa_clti_s_h((v8i16)in, 0); \ - ILVRL_H2_SW(tmp_m, in, out0, out1); \ -} while (0) - -/* Description : Butterfly of 4 input vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1, out2, out3 - * Details : Butterfly operation - */ -#define BUTTERFLY_4(in0, in1, in2, in3, out0, out1, out2, out3) do { \ - out0 = in0 + in3; \ - out1 = in1 + in2; \ - out2 = in1 - in2; \ - out3 = in0 - in3; \ -} while (0) - -/* Description : Transpose 16x4 block into 4x16 with byte elements in vectors - * Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, - * in8, in9, in10, in11, in12, in13, in14, in15 - * Outputs - out0, out1, out2, out3 - * Return Type - unsigned byte - */ -#define TRANSPOSE16x4_UB_UB(in0, in1, in2, in3, in4, in5, in6, in7, \ - in8, in9, in10, in11, in12, in13, in14, in15, \ - out0, out1, out2, out3) do { \ - v2i64 tmp0_m, tmp1_m, tmp2_m, tmp3_m, tmp4_m, tmp5_m; \ - ILVEV_W2_SD(in0, in4, in8, in12, tmp2_m, tmp3_m); \ - ILVEV_W2_SD(in1, in5, in9, in13, tmp0_m, tmp1_m); \ - ILVEV_D2_UB(tmp2_m, tmp3_m, tmp0_m, tmp1_m, out1, out3); \ - ILVEV_W2_SD(in2, in6, in10, in14, tmp4_m, tmp5_m); \ - ILVEV_W2_SD(in3, in7, in11, in15, tmp0_m, tmp1_m); \ - ILVEV_D2_SD(tmp4_m, tmp5_m, tmp0_m, tmp1_m, tmp2_m, tmp3_m); \ - ILVEV_B2_SD(out1, out3, tmp2_m, tmp3_m, tmp0_m, tmp1_m); \ - ILVEVOD_H2_UB(tmp0_m, tmp1_m, tmp0_m, tmp1_m, out0, out2); \ - ILVOD_B2_SD(out1, out3, tmp2_m, tmp3_m, tmp0_m, tmp1_m); \ - ILVEVOD_H2_UB(tmp0_m, tmp1_m, tmp0_m, tmp1_m, out1, out3); \ -} while (0) - -/* Description : Transpose 16x8 block into 8x16 with byte elements in vectors - * Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, - * in8, in9, in10, in11, in12, in13, in14, in15 - * Outputs - out0, out1, out2, out3, out4, out5, out6, out7 - * Return Type - unsigned byte - */ -#define TRANSPOSE16x8_UB_UB(in0, in1, in2, in3, in4, in5, in6, in7, \ - in8, in9, in10, in11, in12, in13, in14, in15, \ - out0, out1, out2, out3, out4, out5, \ - out6, out7) do { \ - v8i16 tmp0_m, tmp1_m, tmp4_m, tmp5_m, tmp6_m, tmp7_m; \ - v4i32 tmp2_m, tmp3_m; \ - ILVEV_D2_UB(in0, in8, in1, in9, out7, out6); \ - ILVEV_D2_UB(in2, in10, in3, in11, out5, out4); \ - ILVEV_D2_UB(in4, in12, in5, in13, out3, out2); \ - ILVEV_D2_UB(in6, in14, in7, in15, out1, out0); \ - ILVEV_B2_SH(out7, out6, out5, out4, tmp0_m, tmp1_m); \ - ILVOD_B2_SH(out7, out6, out5, out4, tmp4_m, tmp5_m); \ - ILVEV_B2_UB(out3, out2, out1, out0, out5, out7); \ - ILVOD_B2_SH(out3, out2, out1, out0, tmp6_m, tmp7_m); \ - ILVEV_H2_SW(tmp0_m, tmp1_m, out5, out7, tmp2_m, tmp3_m); \ - ILVEVOD_W2_UB(tmp2_m, tmp3_m, tmp2_m, tmp3_m, out0, out4); \ - ILVOD_H2_SW(tmp0_m, tmp1_m, out5, out7, tmp2_m, tmp3_m); \ - ILVEVOD_W2_UB(tmp2_m, tmp3_m, tmp2_m, tmp3_m, out2, out6); \ - ILVEV_H2_SW(tmp4_m, tmp5_m, tmp6_m, tmp7_m, tmp2_m, tmp3_m); \ - ILVEVOD_W2_UB(tmp2_m, tmp3_m, tmp2_m, tmp3_m, out1, out5); \ - ILVOD_H2_SW(tmp4_m, tmp5_m, tmp6_m, tmp7_m, tmp2_m, tmp3_m); \ - ILVEVOD_W2_UB(tmp2_m, tmp3_m, tmp2_m, tmp3_m, out3, out7); \ -} while (0) - -/* Description : Transpose 4x4 block with word elements in vectors - * Arguments : Inputs - in0, in1, in2, in3 - * Outputs - out0, out1, out2, out3 - * Return Type - as per RTYPE - */ -#define TRANSPOSE4x4_W(RTYPE, in0, in1, in2, in3, \ - out0, out1, out2, out3) do { \ - v4i32 s0_m, s1_m, s2_m, s3_m; \ - ILVRL_W2_SW(in1, in0, s0_m, s1_m); \ - ILVRL_W2_SW(in3, in2, s2_m, s3_m); \ - out0 = (RTYPE)__msa_ilvr_d((v2i64)s2_m, (v2i64)s0_m); \ - out1 = (RTYPE)__msa_ilvl_d((v2i64)s2_m, (v2i64)s0_m); \ - out2 = (RTYPE)__msa_ilvr_d((v2i64)s3_m, (v2i64)s1_m); \ - out3 = (RTYPE)__msa_ilvl_d((v2i64)s3_m, (v2i64)s1_m); \ -} while (0) -#define TRANSPOSE4x4_SW_SW(...) TRANSPOSE4x4_W(v4i32, __VA_ARGS__) - -/* Description : Add block 4x4 - * Arguments : Inputs - in0, in1, in2, in3, pdst, stride - * Details : Least significant 4 bytes from each input vector are added to - * the destination bytes, clipped between 0-255 and stored. - */ -#define ADDBLK_ST4x4_UB(in0, in1, in2, in3, pdst, stride) do { \ - uint32_t src0_m, src1_m, src2_m, src3_m; \ - v8i16 inp0_m, inp1_m, res0_m, res1_m; \ - v16i8 dst0_m = { 0 }; \ - v16i8 dst1_m = { 0 }; \ - const v16i8 zero_m = { 0 }; \ - ILVR_D2_SH(in1, in0, in3, in2, inp0_m, inp1_m); \ - LW4(pdst, stride, src0_m, src1_m, src2_m, src3_m); \ - INSERT_W2_SB(src0_m, src1_m, dst0_m); \ - INSERT_W2_SB(src2_m, src3_m, dst1_m); \ - ILVR_B2_SH(zero_m, dst0_m, zero_m, dst1_m, res0_m, res1_m); \ - ADD2(res0_m, inp0_m, res1_m, inp1_m, res0_m, res1_m); \ - CLIP_SH2_0_255(res0_m, res1_m); \ - PCKEV_B2_SB(res0_m, res0_m, res1_m, res1_m, dst0_m, dst1_m); \ - ST4x4_UB(dst0_m, dst1_m, 0, 1, 0, 1, pdst, stride); \ -} while (0) - -/* Description : Pack even byte elements, extract 0 & 2 index words from pair - * of results and store 4 words in destination memory as per - * stride - * Arguments : Inputs - in0, in1, in2, in3, pdst, stride - */ -#define PCKEV_ST4x4_UB(in0, in1, in2, in3, pdst, stride) do { \ - v16i8 tmp0_m, tmp1_m; \ - PCKEV_B2_SB(in1, in0, in3, in2, tmp0_m, tmp1_m); \ - ST4x4_UB(tmp0_m, tmp1_m, 0, 2, 0, 2, pdst, stride); \ -} while (0) - -/* Description : average with rounding (in0 + in1 + 1) / 2. - * Arguments : Inputs - in0, in1, in2, in3, - * Outputs - out0, out1 - * Return Type - as per RTYPE - * Details : Each unsigned byte element from 'in0' vector is added with - * each unsigned byte element from 'in1' vector. Then the average - * with rounding is calculated and written to 'out0' - */ -#define AVER_UB2(RTYPE, in0, in1, in2, in3, out0, out1) do { \ - out0 = (RTYPE)__msa_aver_u_b((v16u8)in0, (v16u8)in1); \ - out1 = (RTYPE)__msa_aver_u_b((v16u8)in2, (v16u8)in3); \ -} while (0) -#define AVER_UB2_UB(...) AVER_UB2(v16u8, __VA_ARGS__) - -#endif /* WEBP_DSP_MSA_MACRO_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/neon.h b/Dependencies/FreeImage/Source/LibWebP/src/dsp/neon.h deleted file mode 100644 index fb5a5d4..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/neon.h +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// NEON common code. - -#ifndef WEBP_DSP_NEON_H_ -#define WEBP_DSP_NEON_H_ - -#include - -#include "src/dsp/dsp.h" - -// Right now, some intrinsics functions seem slower, so we disable them -// everywhere except newer clang/gcc or aarch64 where the inline assembly is -// incompatible. -#if LOCAL_CLANG_PREREQ(3,8) || LOCAL_GCC_PREREQ(4,9) || defined(__aarch64__) -#define WEBP_USE_INTRINSICS // use intrinsics when possible -#endif - -#define INIT_VECTOR2(v, a, b) do { \ - v.val[0] = a; \ - v.val[1] = b; \ -} while (0) - -#define INIT_VECTOR3(v, a, b, c) do { \ - v.val[0] = a; \ - v.val[1] = b; \ - v.val[2] = c; \ -} while (0) - -#define INIT_VECTOR4(v, a, b, c, d) do { \ - v.val[0] = a; \ - v.val[1] = b; \ - v.val[2] = c; \ - v.val[3] = d; \ -} while (0) - -// if using intrinsics, this flag avoids some functions that make gcc-4.6.3 -// crash ("internal compiler error: in immed_double_const, at emit-rtl."). -// (probably similar to gcc.gnu.org/bugzilla/show_bug.cgi?id=48183) -#if !(LOCAL_CLANG_PREREQ(3,8) || LOCAL_GCC_PREREQ(4,8) || defined(__aarch64__)) -#define WORK_AROUND_GCC -#endif - -static WEBP_INLINE int32x4x4_t Transpose4x4_NEON(const int32x4x4_t rows) { - uint64x2x2_t row01, row23; - - row01.val[0] = vreinterpretq_u64_s32(rows.val[0]); - row01.val[1] = vreinterpretq_u64_s32(rows.val[1]); - row23.val[0] = vreinterpretq_u64_s32(rows.val[2]); - row23.val[1] = vreinterpretq_u64_s32(rows.val[3]); - // Transpose 64-bit values (there's no vswp equivalent) - { - const uint64x1_t row0h = vget_high_u64(row01.val[0]); - const uint64x1_t row2l = vget_low_u64(row23.val[0]); - const uint64x1_t row1h = vget_high_u64(row01.val[1]); - const uint64x1_t row3l = vget_low_u64(row23.val[1]); - row01.val[0] = vcombine_u64(vget_low_u64(row01.val[0]), row2l); - row23.val[0] = vcombine_u64(row0h, vget_high_u64(row23.val[0])); - row01.val[1] = vcombine_u64(vget_low_u64(row01.val[1]), row3l); - row23.val[1] = vcombine_u64(row1h, vget_high_u64(row23.val[1])); - } - { - const int32x4x2_t out01 = vtrnq_s32(vreinterpretq_s32_u64(row01.val[0]), - vreinterpretq_s32_u64(row01.val[1])); - const int32x4x2_t out23 = vtrnq_s32(vreinterpretq_s32_u64(row23.val[0]), - vreinterpretq_s32_u64(row23.val[1])); - int32x4x4_t out; - out.val[0] = out01.val[0]; - out.val[1] = out01.val[1]; - out.val[2] = out23.val[0]; - out.val[3] = out23.val[1]; - return out; - } -} - -#if 0 // Useful debug macro. -#include -#define PRINT_REG(REG, SIZE) do { \ - int i; \ - printf("%s \t[%d]: 0x", #REG, SIZE); \ - if (SIZE == 8) { \ - uint8_t _tmp[8]; \ - vst1_u8(_tmp, (REG)); \ - for (i = 0; i < 8; ++i) printf("%.2x ", _tmp[i]); \ - } else if (SIZE == 16) { \ - uint16_t _tmp[4]; \ - vst1_u16(_tmp, (REG)); \ - for (i = 0; i < 4; ++i) printf("%.4x ", _tmp[i]); \ - } \ - printf("\n"); \ -} while (0) -#endif - -#endif // WEBP_DSP_NEON_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler.c deleted file mode 100644 index 4124fdd..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler.c +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Rescaling functions -// -// Author: Skal (pascal.massimino@gmail.com) - -#include - -#include "src/dsp/dsp.h" -#include "src/utils/rescaler_utils.h" - -//------------------------------------------------------------------------------ -// Implementations of critical functions ImportRow / ExportRow - -#define ROUNDER (WEBP_RESCALER_ONE >> 1) -#define MULT_FIX(x, y) (((uint64_t)(x) * (y) + ROUNDER) >> WEBP_RESCALER_RFIX) -#define MULT_FIX_FLOOR(x, y) (((uint64_t)(x) * (y)) >> WEBP_RESCALER_RFIX) - -//------------------------------------------------------------------------------ -// Row import - -void WebPRescalerImportRowExpand_C(WebPRescaler* const wrk, - const uint8_t* src) { - const int x_stride = wrk->num_channels; - const int x_out_max = wrk->dst_width * wrk->num_channels; - int channel; - assert(!WebPRescalerInputDone(wrk)); - assert(wrk->x_expand); - for (channel = 0; channel < x_stride; ++channel) { - int x_in = channel; - int x_out = channel; - // simple bilinear interpolation - int accum = wrk->x_add; - int left = src[x_in]; - int right = (wrk->src_width > 1) ? src[x_in + x_stride] : left; - x_in += x_stride; - while (1) { - wrk->frow[x_out] = right * wrk->x_add + (left - right) * accum; - x_out += x_stride; - if (x_out >= x_out_max) break; - accum -= wrk->x_sub; - if (accum < 0) { - left = right; - x_in += x_stride; - assert(x_in < wrk->src_width * x_stride); - right = src[x_in]; - accum += wrk->x_add; - } - } - assert(wrk->x_sub == 0 /* <- special case for src_width=1 */ || accum == 0); - } -} - -void WebPRescalerImportRowShrink_C(WebPRescaler* const wrk, - const uint8_t* src) { - const int x_stride = wrk->num_channels; - const int x_out_max = wrk->dst_width * wrk->num_channels; - int channel; - assert(!WebPRescalerInputDone(wrk)); - assert(!wrk->x_expand); - for (channel = 0; channel < x_stride; ++channel) { - int x_in = channel; - int x_out = channel; - uint32_t sum = 0; - int accum = 0; - while (x_out < x_out_max) { - uint32_t base = 0; - accum += wrk->x_add; - while (accum > 0) { - accum -= wrk->x_sub; - assert(x_in < wrk->src_width * x_stride); - base = src[x_in]; - sum += base; - x_in += x_stride; - } - { // Emit next horizontal pixel. - const rescaler_t frac = base * (-accum); - wrk->frow[x_out] = sum * wrk->x_sub - frac; - // fresh fractional start for next pixel - sum = (int)MULT_FIX(frac, wrk->fx_scale); - } - x_out += x_stride; - } - assert(accum == 0); - } -} - -//------------------------------------------------------------------------------ -// Row export - -void WebPRescalerExportRowExpand_C(WebPRescaler* const wrk) { - int x_out; - uint8_t* const dst = wrk->dst; - rescaler_t* const irow = wrk->irow; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const rescaler_t* const frow = wrk->frow; - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0); - assert(wrk->y_expand); - assert(wrk->y_sub != 0); - if (wrk->y_accum == 0) { - for (x_out = 0; x_out < x_out_max; ++x_out) { - const uint32_t J = frow[x_out]; - const int v = (int)MULT_FIX(J, wrk->fy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - } - } else { - const uint32_t B = WEBP_RESCALER_FRAC(-wrk->y_accum, wrk->y_sub); - const uint32_t A = (uint32_t)(WEBP_RESCALER_ONE - B); - for (x_out = 0; x_out < x_out_max; ++x_out) { - const uint64_t I = (uint64_t)A * frow[x_out] - + (uint64_t)B * irow[x_out]; - const uint32_t J = (uint32_t)((I + ROUNDER) >> WEBP_RESCALER_RFIX); - const int v = (int)MULT_FIX(J, wrk->fy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - } - } -} - -void WebPRescalerExportRowShrink_C(WebPRescaler* const wrk) { - int x_out; - uint8_t* const dst = wrk->dst; - rescaler_t* const irow = wrk->irow; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const rescaler_t* const frow = wrk->frow; - const uint32_t yscale = wrk->fy_scale * (-wrk->y_accum); - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0); - assert(!wrk->y_expand); - if (yscale) { - for (x_out = 0; x_out < x_out_max; ++x_out) { - const uint32_t frac = (uint32_t)MULT_FIX(frow[x_out], yscale); - const int v = (int)MULT_FIX_FLOOR(irow[x_out] - frac, wrk->fxy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - irow[x_out] = frac; // new fractional start - } - } else { - for (x_out = 0; x_out < x_out_max; ++x_out) { - const int v = (int)MULT_FIX(irow[x_out], wrk->fxy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - irow[x_out] = 0; - } - } -} - -#undef MULT_FIX_FLOOR -#undef MULT_FIX -#undef ROUNDER - -//------------------------------------------------------------------------------ -// Main entry calls - -void WebPRescalerImportRow(WebPRescaler* const wrk, const uint8_t* src) { - assert(!WebPRescalerInputDone(wrk)); - if (!wrk->x_expand) { - WebPRescalerImportRowShrink(wrk, src); - } else { - WebPRescalerImportRowExpand(wrk, src); - } -} - -void WebPRescalerExportRow(WebPRescaler* const wrk) { - if (wrk->y_accum <= 0) { - assert(!WebPRescalerOutputDone(wrk)); - if (wrk->y_expand) { - WebPRescalerExportRowExpand(wrk); - } else if (wrk->fxy_scale) { - WebPRescalerExportRowShrink(wrk); - } else { // special case - int i; - assert(wrk->src_height == wrk->dst_height && wrk->x_add == 1); - assert(wrk->src_width == 1 && wrk->dst_width <= 2); - for (i = 0; i < wrk->num_channels * wrk->dst_width; ++i) { - wrk->dst[i] = wrk->irow[i]; - wrk->irow[i] = 0; - } - } - wrk->y_accum += wrk->y_add; - wrk->dst += wrk->dst_stride; - ++wrk->dst_y; - } -} - -//------------------------------------------------------------------------------ - -WebPRescalerImportRowFunc WebPRescalerImportRowExpand; -WebPRescalerImportRowFunc WebPRescalerImportRowShrink; - -WebPRescalerExportRowFunc WebPRescalerExportRowExpand; -WebPRescalerExportRowFunc WebPRescalerExportRowShrink; - -extern void WebPRescalerDspInitSSE2(void); -extern void WebPRescalerDspInitMIPS32(void); -extern void WebPRescalerDspInitMIPSdspR2(void); -extern void WebPRescalerDspInitMSA(void); -extern void WebPRescalerDspInitNEON(void); - -WEBP_DSP_INIT_FUNC(WebPRescalerDspInit) { -#if !defined(WEBP_REDUCE_SIZE) -#if !WEBP_NEON_OMIT_C_CODE - WebPRescalerExportRowExpand = WebPRescalerExportRowExpand_C; - WebPRescalerExportRowShrink = WebPRescalerExportRowShrink_C; -#endif - - WebPRescalerImportRowExpand = WebPRescalerImportRowExpand_C; - WebPRescalerImportRowShrink = WebPRescalerImportRowShrink_C; - - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - WebPRescalerDspInitSSE2(); - } -#endif -#if defined(WEBP_USE_MIPS32) - if (VP8GetCPUInfo(kMIPS32)) { - WebPRescalerDspInitMIPS32(); - } -#endif -#if defined(WEBP_USE_MIPS_DSP_R2) - if (VP8GetCPUInfo(kMIPSdspR2)) { - WebPRescalerDspInitMIPSdspR2(); - } -#endif -#if defined(WEBP_USE_MSA) - if (VP8GetCPUInfo(kMSA)) { - WebPRescalerDspInitMSA(); - } -#endif - } - -#if defined(WEBP_USE_NEON) - if (WEBP_NEON_OMIT_C_CODE || - (VP8GetCPUInfo != NULL && VP8GetCPUInfo(kNEON))) { - WebPRescalerDspInitNEON(); - } -#endif - - assert(WebPRescalerExportRowExpand != NULL); - assert(WebPRescalerExportRowShrink != NULL); - assert(WebPRescalerImportRowExpand != NULL); - assert(WebPRescalerImportRowShrink != NULL); -#endif // WEBP_REDUCE_SIZE -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_mips32.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_mips32.c deleted file mode 100644 index 9973690..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_mips32.c +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MIPS version of rescaling functions -// -// Author(s): Djordje Pesut (djordje.pesut@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS32) && !defined(WEBP_REDUCE_SIZE) - -#include -#include "src/utils/rescaler_utils.h" - -//------------------------------------------------------------------------------ -// Row import - -static void ImportRowShrink_MIPS32(WebPRescaler* const wrk, - const uint8_t* src) { - const int x_stride = wrk->num_channels; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const int fx_scale = wrk->fx_scale; - const int x_add = wrk->x_add; - const int x_sub = wrk->x_sub; - const int x_stride1 = x_stride << 2; - int channel; - assert(!wrk->x_expand); - assert(!WebPRescalerInputDone(wrk)); - - for (channel = 0; channel < x_stride; ++channel) { - const uint8_t* src1 = src + channel; - rescaler_t* frow = wrk->frow + channel; - int temp1, temp2, temp3; - int base, frac, sum; - int accum, accum1; - int loop_c = x_out_max - channel; - - __asm__ volatile ( - "li %[temp1], 0x8000 \n\t" - "li %[temp2], 0x10000 \n\t" - "li %[sum], 0 \n\t" - "li %[accum], 0 \n\t" - "1: \n\t" - "addu %[accum], %[accum], %[x_add] \n\t" - "li %[base], 0 \n\t" - "blez %[accum], 3f \n\t" - "2: \n\t" - "lbu %[base], 0(%[src1]) \n\t" - "subu %[accum], %[accum], %[x_sub] \n\t" - "addu %[src1], %[src1], %[x_stride] \n\t" - "addu %[sum], %[sum], %[base] \n\t" - "bgtz %[accum], 2b \n\t" - "3: \n\t" - "negu %[accum1], %[accum] \n\t" - "mul %[frac], %[base], %[accum1] \n\t" - "mul %[temp3], %[sum], %[x_sub] \n\t" - "subu %[loop_c], %[loop_c], %[x_stride] \n\t" - "mult %[temp1], %[temp2] \n\t" - "maddu %[frac], %[fx_scale] \n\t" - "mfhi %[sum] \n\t" - "subu %[temp3], %[temp3], %[frac] \n\t" - "sw %[temp3], 0(%[frow]) \n\t" - "addu %[frow], %[frow], %[x_stride1] \n\t" - "bgtz %[loop_c], 1b \n\t" - : [accum]"=&r"(accum), [src1]"+r"(src1), [temp3]"=&r"(temp3), - [sum]"=&r"(sum), [base]"=&r"(base), [frac]"=&r"(frac), - [frow]"+r"(frow), [accum1]"=&r"(accum1), - [temp2]"=&r"(temp2), [temp1]"=&r"(temp1) - : [x_stride]"r"(x_stride), [fx_scale]"r"(fx_scale), - [x_sub]"r"(x_sub), [x_add]"r"(x_add), - [loop_c]"r"(loop_c), [x_stride1]"r"(x_stride1) - : "memory", "hi", "lo" - ); - assert(accum == 0); - } -} - -static void ImportRowExpand_MIPS32(WebPRescaler* const wrk, - const uint8_t* src) { - const int x_stride = wrk->num_channels; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const int x_add = wrk->x_add; - const int x_sub = wrk->x_sub; - const int src_width = wrk->src_width; - const int x_stride1 = x_stride << 2; - int channel; - assert(wrk->x_expand); - assert(!WebPRescalerInputDone(wrk)); - - for (channel = 0; channel < x_stride; ++channel) { - const uint8_t* src1 = src + channel; - rescaler_t* frow = wrk->frow + channel; - int temp1, temp2, temp3, temp4; - int frac; - int accum; - int x_out = channel; - - __asm__ volatile ( - "addiu %[temp3], %[src_width], -1 \n\t" - "lbu %[temp2], 0(%[src1]) \n\t" - "addu %[src1], %[src1], %[x_stride] \n\t" - "bgtz %[temp3], 0f \n\t" - "addiu %[temp1], %[temp2], 0 \n\t" - "b 3f \n\t" - "0: \n\t" - "lbu %[temp1], 0(%[src1]) \n\t" - "3: \n\t" - "addiu %[accum], %[x_add], 0 \n\t" - "1: \n\t" - "subu %[temp3], %[temp2], %[temp1] \n\t" - "mul %[temp3], %[temp3], %[accum] \n\t" - "mul %[temp4], %[temp1], %[x_add] \n\t" - "addu %[temp3], %[temp4], %[temp3] \n\t" - "sw %[temp3], 0(%[frow]) \n\t" - "addu %[frow], %[frow], %[x_stride1] \n\t" - "addu %[x_out], %[x_out], %[x_stride] \n\t" - "subu %[temp3], %[x_out], %[x_out_max] \n\t" - "bgez %[temp3], 2f \n\t" - "subu %[accum], %[accum], %[x_sub] \n\t" - "bgez %[accum], 4f \n\t" - "addiu %[temp2], %[temp1], 0 \n\t" - "addu %[src1], %[src1], %[x_stride] \n\t" - "lbu %[temp1], 0(%[src1]) \n\t" - "addu %[accum], %[accum], %[x_add] \n\t" - "4: \n\t" - "b 1b \n\t" - "2: \n\t" - : [src1]"+r"(src1), [accum]"=&r"(accum), [temp1]"=&r"(temp1), - [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), - [x_out]"+r"(x_out), [frac]"=&r"(frac), [frow]"+r"(frow) - : [x_stride]"r"(x_stride), [x_add]"r"(x_add), [x_sub]"r"(x_sub), - [x_stride1]"r"(x_stride1), [src_width]"r"(src_width), - [x_out_max]"r"(x_out_max) - : "memory", "hi", "lo" - ); - assert(wrk->x_sub == 0 /* <- special case for src_width=1 */ || accum == 0); - } -} - -//------------------------------------------------------------------------------ -// Row export - -static void ExportRowExpand_MIPS32(WebPRescaler* const wrk) { - uint8_t* dst = wrk->dst; - rescaler_t* irow = wrk->irow; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const rescaler_t* frow = wrk->frow; - int temp0, temp1, temp3, temp4, temp5, loop_end; - const int temp2 = (int)wrk->fy_scale; - const int temp6 = x_out_max << 2; - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0); - assert(wrk->y_expand); - assert(wrk->y_sub != 0); - if (wrk->y_accum == 0) { - __asm__ volatile ( - "li %[temp3], 0x10000 \n\t" - "li %[temp4], 0x8000 \n\t" - "addu %[loop_end], %[frow], %[temp6] \n\t" - "1: \n\t" - "lw %[temp0], 0(%[frow]) \n\t" - "addiu %[dst], %[dst], 1 \n\t" - "addiu %[frow], %[frow], 4 \n\t" - "mult %[temp3], %[temp4] \n\t" - "maddu %[temp0], %[temp2] \n\t" - "mfhi %[temp5] \n\t" - "sb %[temp5], -1(%[dst]) \n\t" - "bne %[frow], %[loop_end], 1b \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [frow]"+r"(frow), - [dst]"+r"(dst), [loop_end]"=&r"(loop_end) - : [temp2]"r"(temp2), [temp6]"r"(temp6) - : "memory", "hi", "lo" - ); - } else { - const uint32_t B = WEBP_RESCALER_FRAC(-wrk->y_accum, wrk->y_sub); - const uint32_t A = (uint32_t)(WEBP_RESCALER_ONE - B); - __asm__ volatile ( - "li %[temp3], 0x10000 \n\t" - "li %[temp4], 0x8000 \n\t" - "addu %[loop_end], %[frow], %[temp6] \n\t" - "1: \n\t" - "lw %[temp0], 0(%[frow]) \n\t" - "lw %[temp1], 0(%[irow]) \n\t" - "addiu %[dst], %[dst], 1 \n\t" - "mult %[temp3], %[temp4] \n\t" - "maddu %[A], %[temp0] \n\t" - "maddu %[B], %[temp1] \n\t" - "addiu %[frow], %[frow], 4 \n\t" - "addiu %[irow], %[irow], 4 \n\t" - "mfhi %[temp5] \n\t" - "mult %[temp3], %[temp4] \n\t" - "maddu %[temp5], %[temp2] \n\t" - "mfhi %[temp5] \n\t" - "sb %[temp5], -1(%[dst]) \n\t" - "bne %[frow], %[loop_end], 1b \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [frow]"+r"(frow), - [irow]"+r"(irow), [dst]"+r"(dst), [loop_end]"=&r"(loop_end) - : [temp2]"r"(temp2), [temp6]"r"(temp6), [A]"r"(A), [B]"r"(B) - : "memory", "hi", "lo" - ); - } -} - -#if 0 // disabled for now. TODO(skal): make match the C-code -static void ExportRowShrink_MIPS32(WebPRescaler* const wrk) { - const int x_out_max = wrk->dst_width * wrk->num_channels; - uint8_t* dst = wrk->dst; - rescaler_t* irow = wrk->irow; - const rescaler_t* frow = wrk->frow; - const int yscale = wrk->fy_scale * (-wrk->y_accum); - int temp0, temp1, temp3, temp4, temp5, loop_end; - const int temp2 = (int)wrk->fxy_scale; - const int temp6 = x_out_max << 2; - - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0); - assert(!wrk->y_expand); - assert(wrk->fxy_scale != 0); - if (yscale) { - __asm__ volatile ( - "li %[temp3], 0x10000 \n\t" - "li %[temp4], 0x8000 \n\t" - "addu %[loop_end], %[frow], %[temp6] \n\t" - "1: \n\t" - "lw %[temp0], 0(%[frow]) \n\t" - "mult %[temp3], %[temp4] \n\t" - "addiu %[frow], %[frow], 4 \n\t" - "maddu %[temp0], %[yscale] \n\t" - "mfhi %[temp1] \n\t" - "lw %[temp0], 0(%[irow]) \n\t" - "addiu %[dst], %[dst], 1 \n\t" - "addiu %[irow], %[irow], 4 \n\t" - "subu %[temp0], %[temp0], %[temp1] \n\t" - "mult %[temp3], %[temp4] \n\t" - "maddu %[temp0], %[temp2] \n\t" - "mfhi %[temp5] \n\t" - "sw %[temp1], -4(%[irow]) \n\t" - "sb %[temp5], -1(%[dst]) \n\t" - "bne %[frow], %[loop_end], 1b \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [frow]"+r"(frow), - [irow]"+r"(irow), [dst]"+r"(dst), [loop_end]"=&r"(loop_end) - : [temp2]"r"(temp2), [yscale]"r"(yscale), [temp6]"r"(temp6) - : "memory", "hi", "lo" - ); - } else { - __asm__ volatile ( - "li %[temp3], 0x10000 \n\t" - "li %[temp4], 0x8000 \n\t" - "addu %[loop_end], %[irow], %[temp6] \n\t" - "1: \n\t" - "lw %[temp0], 0(%[irow]) \n\t" - "addiu %[dst], %[dst], 1 \n\t" - "addiu %[irow], %[irow], 4 \n\t" - "mult %[temp3], %[temp4] \n\t" - "maddu %[temp0], %[temp2] \n\t" - "mfhi %[temp5] \n\t" - "sw $zero, -4(%[irow]) \n\t" - "sb %[temp5], -1(%[dst]) \n\t" - "bne %[irow], %[loop_end], 1b \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [irow]"+r"(irow), - [dst]"+r"(dst), [loop_end]"=&r"(loop_end) - : [temp2]"r"(temp2), [temp6]"r"(temp6) - : "memory", "hi", "lo" - ); - } -} -#endif // 0 - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPRescalerDspInitMIPS32(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPRescalerDspInitMIPS32(void) { - WebPRescalerImportRowExpand = ImportRowExpand_MIPS32; - WebPRescalerImportRowShrink = ImportRowShrink_MIPS32; - WebPRescalerExportRowExpand = ExportRowExpand_MIPS32; -// WebPRescalerExportRowShrink = ExportRowShrink_MIPS32; -} - -#else // !WEBP_USE_MIPS32 - -WEBP_DSP_INIT_STUB(WebPRescalerDspInitMIPS32) - -#endif // WEBP_USE_MIPS32 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_mips_dsp_r2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_mips_dsp_r2.c deleted file mode 100644 index 74b3c4e..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_mips_dsp_r2.c +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MIPS version of rescaling functions -// -// Author(s): Djordje Pesut (djordje.pesut@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS_DSP_R2) && !defined(WEBP_REDUCE_SIZE) - -#include -#include "src/utils/rescaler_utils.h" - -#define ROUNDER (WEBP_RESCALER_ONE >> 1) -#define MULT_FIX(x, y) (((uint64_t)(x) * (y) + ROUNDER) >> WEBP_RESCALER_RFIX) -#define MULT_FIX_FLOOR(x, y) (((uint64_t)(x) * (y)) >> WEBP_RESCALER_RFIX) - -//------------------------------------------------------------------------------ -// Row export - -#if 0 // disabled for now. TODO(skal): make match the C-code -static void ExportRowShrink_MIPSdspR2(WebPRescaler* const wrk) { - int i; - const int x_out_max = wrk->dst_width * wrk->num_channels; - uint8_t* dst = wrk->dst; - rescaler_t* irow = wrk->irow; - const rescaler_t* frow = wrk->frow; - const int yscale = wrk->fy_scale * (-wrk->y_accum); - int temp0, temp1, temp2, temp3, temp4, temp5, loop_end; - const int temp7 = (int)wrk->fxy_scale; - const int temp6 = (x_out_max & ~0x3) << 2; - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0); - assert(!wrk->y_expand); - assert(wrk->fxy_scale != 0); - if (yscale) { - if (x_out_max >= 4) { - int temp8, temp9, temp10, temp11; - __asm__ volatile ( - "li %[temp3], 0x10000 \n\t" - "li %[temp4], 0x8000 \n\t" - "addu %[loop_end], %[frow], %[temp6] \n\t" - "1: \n\t" - "lw %[temp0], 0(%[frow]) \n\t" - "lw %[temp1], 4(%[frow]) \n\t" - "lw %[temp2], 8(%[frow]) \n\t" - "lw %[temp5], 12(%[frow]) \n\t" - "mult $ac0, %[temp3], %[temp4] \n\t" - "maddu $ac0, %[temp0], %[yscale] \n\t" - "mult $ac1, %[temp3], %[temp4] \n\t" - "maddu $ac1, %[temp1], %[yscale] \n\t" - "mult $ac2, %[temp3], %[temp4] \n\t" - "maddu $ac2, %[temp2], %[yscale] \n\t" - "mult $ac3, %[temp3], %[temp4] \n\t" - "maddu $ac3, %[temp5], %[yscale] \n\t" - "addiu %[frow], %[frow], 16 \n\t" - "mfhi %[temp0], $ac0 \n\t" - "mfhi %[temp1], $ac1 \n\t" - "mfhi %[temp2], $ac2 \n\t" - "mfhi %[temp5], $ac3 \n\t" - "lw %[temp8], 0(%[irow]) \n\t" - "lw %[temp9], 4(%[irow]) \n\t" - "lw %[temp10], 8(%[irow]) \n\t" - "lw %[temp11], 12(%[irow]) \n\t" - "addiu %[dst], %[dst], 4 \n\t" - "addiu %[irow], %[irow], 16 \n\t" - "subu %[temp8], %[temp8], %[temp0] \n\t" - "subu %[temp9], %[temp9], %[temp1] \n\t" - "subu %[temp10], %[temp10], %[temp2] \n\t" - "subu %[temp11], %[temp11], %[temp5] \n\t" - "mult $ac0, %[temp3], %[temp4] \n\t" - "maddu $ac0, %[temp8], %[temp7] \n\t" - "mult $ac1, %[temp3], %[temp4] \n\t" - "maddu $ac1, %[temp9], %[temp7] \n\t" - "mult $ac2, %[temp3], %[temp4] \n\t" - "maddu $ac2, %[temp10], %[temp7] \n\t" - "mult $ac3, %[temp3], %[temp4] \n\t" - "maddu $ac3, %[temp11], %[temp7] \n\t" - "mfhi %[temp8], $ac0 \n\t" - "mfhi %[temp9], $ac1 \n\t" - "mfhi %[temp10], $ac2 \n\t" - "mfhi %[temp11], $ac3 \n\t" - "sw %[temp0], -16(%[irow]) \n\t" - "sw %[temp1], -12(%[irow]) \n\t" - "sw %[temp2], -8(%[irow]) \n\t" - "sw %[temp5], -4(%[irow]) \n\t" - "sb %[temp8], -4(%[dst]) \n\t" - "sb %[temp9], -3(%[dst]) \n\t" - "sb %[temp10], -2(%[dst]) \n\t" - "sb %[temp11], -1(%[dst]) \n\t" - "bne %[frow], %[loop_end], 1b \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [frow]"+r"(frow), - [irow]"+r"(irow), [dst]"+r"(dst), [loop_end]"=&r"(loop_end), - [temp8]"=&r"(temp8), [temp9]"=&r"(temp9), [temp10]"=&r"(temp10), - [temp11]"=&r"(temp11), [temp2]"=&r"(temp2) - : [temp7]"r"(temp7), [yscale]"r"(yscale), [temp6]"r"(temp6) - : "memory", "hi", "lo", "$ac1hi", "$ac1lo", - "$ac2hi", "$ac2lo", "$ac3hi", "$ac3lo" - ); - } - for (i = 0; i < (x_out_max & 0x3); ++i) { - const uint32_t frac = (uint32_t)MULT_FIX(*frow++, yscale); - const int v = (int)MULT_FIX_FLOOR(*irow - frac, wrk->fxy_scale); - assert(v >= 0 && v <= 255); - *dst++ = v; - *irow++ = frac; // new fractional start - } - } else { - if (x_out_max >= 4) { - __asm__ volatile ( - "li %[temp3], 0x10000 \n\t" - "li %[temp4], 0x8000 \n\t" - "addu %[loop_end], %[irow], %[temp6] \n\t" - "1: \n\t" - "lw %[temp0], 0(%[irow]) \n\t" - "lw %[temp1], 4(%[irow]) \n\t" - "lw %[temp2], 8(%[irow]) \n\t" - "lw %[temp5], 12(%[irow]) \n\t" - "addiu %[dst], %[dst], 4 \n\t" - "addiu %[irow], %[irow], 16 \n\t" - "mult $ac0, %[temp3], %[temp4] \n\t" - "maddu $ac0, %[temp0], %[temp7] \n\t" - "mult $ac1, %[temp3], %[temp4] \n\t" - "maddu $ac1, %[temp1], %[temp7] \n\t" - "mult $ac2, %[temp3], %[temp4] \n\t" - "maddu $ac2, %[temp2], %[temp7] \n\t" - "mult $ac3, %[temp3], %[temp4] \n\t" - "maddu $ac3, %[temp5], %[temp7] \n\t" - "mfhi %[temp0], $ac0 \n\t" - "mfhi %[temp1], $ac1 \n\t" - "mfhi %[temp2], $ac2 \n\t" - "mfhi %[temp5], $ac3 \n\t" - "sw $zero, -16(%[irow]) \n\t" - "sw $zero, -12(%[irow]) \n\t" - "sw $zero, -8(%[irow]) \n\t" - "sw $zero, -4(%[irow]) \n\t" - "sb %[temp0], -4(%[dst]) \n\t" - "sb %[temp1], -3(%[dst]) \n\t" - "sb %[temp2], -2(%[dst]) \n\t" - "sb %[temp5], -1(%[dst]) \n\t" - "bne %[irow], %[loop_end], 1b \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [irow]"+r"(irow), - [dst]"+r"(dst), [loop_end]"=&r"(loop_end), [temp2]"=&r"(temp2) - : [temp7]"r"(temp7), [temp6]"r"(temp6) - : "memory", "hi", "lo", "$ac1hi", "$ac1lo", - "$ac2hi", "$ac2lo", "$ac3hi", "$ac3lo" - ); - } - for (i = 0; i < (x_out_max & 0x3); ++i) { - const int v = (int)MULT_FIX_FLOOR(*irow, wrk->fxy_scale); - assert(v >= 0 && v <= 255); - *dst++ = v; - *irow++ = 0; - } - } -} -#endif // 0 - -static void ExportRowExpand_MIPSdspR2(WebPRescaler* const wrk) { - int i; - uint8_t* dst = wrk->dst; - rescaler_t* irow = wrk->irow; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const rescaler_t* frow = wrk->frow; - int temp0, temp1, temp2, temp3, temp4, temp5, loop_end; - const int temp6 = (x_out_max & ~0x3) << 2; - const int temp7 = (int)wrk->fy_scale; - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0); - assert(wrk->y_expand); - assert(wrk->y_sub != 0); - if (wrk->y_accum == 0) { - if (x_out_max >= 4) { - __asm__ volatile ( - "li %[temp4], 0x10000 \n\t" - "li %[temp5], 0x8000 \n\t" - "addu %[loop_end], %[frow], %[temp6] \n\t" - "1: \n\t" - "lw %[temp0], 0(%[frow]) \n\t" - "lw %[temp1], 4(%[frow]) \n\t" - "lw %[temp2], 8(%[frow]) \n\t" - "lw %[temp3], 12(%[frow]) \n\t" - "addiu %[dst], %[dst], 4 \n\t" - "addiu %[frow], %[frow], 16 \n\t" - "mult $ac0, %[temp4], %[temp5] \n\t" - "maddu $ac0, %[temp0], %[temp7] \n\t" - "mult $ac1, %[temp4], %[temp5] \n\t" - "maddu $ac1, %[temp1], %[temp7] \n\t" - "mult $ac2, %[temp4], %[temp5] \n\t" - "maddu $ac2, %[temp2], %[temp7] \n\t" - "mult $ac3, %[temp4], %[temp5] \n\t" - "maddu $ac3, %[temp3], %[temp7] \n\t" - "mfhi %[temp0], $ac0 \n\t" - "mfhi %[temp1], $ac1 \n\t" - "mfhi %[temp2], $ac2 \n\t" - "mfhi %[temp3], $ac3 \n\t" - "sb %[temp0], -4(%[dst]) \n\t" - "sb %[temp1], -3(%[dst]) \n\t" - "sb %[temp2], -2(%[dst]) \n\t" - "sb %[temp3], -1(%[dst]) \n\t" - "bne %[frow], %[loop_end], 1b \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [frow]"+r"(frow), - [dst]"+r"(dst), [loop_end]"=&r"(loop_end), [temp2]"=&r"(temp2) - : [temp7]"r"(temp7), [temp6]"r"(temp6) - : "memory", "hi", "lo", "$ac1hi", "$ac1lo", - "$ac2hi", "$ac2lo", "$ac3hi", "$ac3lo" - ); - } - for (i = 0; i < (x_out_max & 0x3); ++i) { - const uint32_t J = *frow++; - const int v = (int)MULT_FIX(J, wrk->fy_scale); - assert(v >= 0 && v <= 255); - *dst++ = v; - } - } else { - const uint32_t B = WEBP_RESCALER_FRAC(-wrk->y_accum, wrk->y_sub); - const uint32_t A = (uint32_t)(WEBP_RESCALER_ONE - B); - if (x_out_max >= 4) { - int temp8, temp9, temp10, temp11; - __asm__ volatile ( - "li %[temp8], 0x10000 \n\t" - "li %[temp9], 0x8000 \n\t" - "addu %[loop_end], %[frow], %[temp6] \n\t" - "1: \n\t" - "lw %[temp0], 0(%[frow]) \n\t" - "lw %[temp1], 4(%[frow]) \n\t" - "lw %[temp2], 8(%[frow]) \n\t" - "lw %[temp3], 12(%[frow]) \n\t" - "lw %[temp4], 0(%[irow]) \n\t" - "lw %[temp5], 4(%[irow]) \n\t" - "lw %[temp10], 8(%[irow]) \n\t" - "lw %[temp11], 12(%[irow]) \n\t" - "addiu %[dst], %[dst], 4 \n\t" - "mult $ac0, %[temp8], %[temp9] \n\t" - "maddu $ac0, %[A], %[temp0] \n\t" - "maddu $ac0, %[B], %[temp4] \n\t" - "mult $ac1, %[temp8], %[temp9] \n\t" - "maddu $ac1, %[A], %[temp1] \n\t" - "maddu $ac1, %[B], %[temp5] \n\t" - "mult $ac2, %[temp8], %[temp9] \n\t" - "maddu $ac2, %[A], %[temp2] \n\t" - "maddu $ac2, %[B], %[temp10] \n\t" - "mult $ac3, %[temp8], %[temp9] \n\t" - "maddu $ac3, %[A], %[temp3] \n\t" - "maddu $ac3, %[B], %[temp11] \n\t" - "addiu %[frow], %[frow], 16 \n\t" - "addiu %[irow], %[irow], 16 \n\t" - "mfhi %[temp0], $ac0 \n\t" - "mfhi %[temp1], $ac1 \n\t" - "mfhi %[temp2], $ac2 \n\t" - "mfhi %[temp3], $ac3 \n\t" - "mult $ac0, %[temp8], %[temp9] \n\t" - "maddu $ac0, %[temp0], %[temp7] \n\t" - "mult $ac1, %[temp8], %[temp9] \n\t" - "maddu $ac1, %[temp1], %[temp7] \n\t" - "mult $ac2, %[temp8], %[temp9] \n\t" - "maddu $ac2, %[temp2], %[temp7] \n\t" - "mult $ac3, %[temp8], %[temp9] \n\t" - "maddu $ac3, %[temp3], %[temp7] \n\t" - "mfhi %[temp0], $ac0 \n\t" - "mfhi %[temp1], $ac1 \n\t" - "mfhi %[temp2], $ac2 \n\t" - "mfhi %[temp3], $ac3 \n\t" - "sb %[temp0], -4(%[dst]) \n\t" - "sb %[temp1], -3(%[dst]) \n\t" - "sb %[temp2], -2(%[dst]) \n\t" - "sb %[temp3], -1(%[dst]) \n\t" - "bne %[frow], %[loop_end], 1b \n\t" - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3), - [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [frow]"+r"(frow), - [irow]"+r"(irow), [dst]"+r"(dst), [loop_end]"=&r"(loop_end), - [temp8]"=&r"(temp8), [temp9]"=&r"(temp9), [temp10]"=&r"(temp10), - [temp11]"=&r"(temp11), [temp2]"=&r"(temp2) - : [temp7]"r"(temp7), [temp6]"r"(temp6), [A]"r"(A), [B]"r"(B) - : "memory", "hi", "lo", "$ac1hi", "$ac1lo", - "$ac2hi", "$ac2lo", "$ac3hi", "$ac3lo" - ); - } - for (i = 0; i < (x_out_max & 0x3); ++i) { - const uint64_t I = (uint64_t)A * *frow++ - + (uint64_t)B * *irow++; - const uint32_t J = (uint32_t)((I + ROUNDER) >> WEBP_RESCALER_RFIX); - const int v = (int)MULT_FIX(J, wrk->fy_scale); - assert(v >= 0 && v <= 255); - *dst++ = v; - } - } -} - -#undef MULT_FIX_FLOOR -#undef MULT_FIX -#undef ROUNDER - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPRescalerDspInitMIPSdspR2(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPRescalerDspInitMIPSdspR2(void) { - WebPRescalerExportRowExpand = ExportRowExpand_MIPSdspR2; -// WebPRescalerExportRowShrink = ExportRowShrink_MIPSdspR2; -} - -#else // !WEBP_USE_MIPS_DSP_R2 - -WEBP_DSP_INIT_STUB(WebPRescalerDspInitMIPSdspR2) - -#endif // WEBP_USE_MIPS_DSP_R2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_msa.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_msa.c deleted file mode 100644 index 5dda26b..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_msa.c +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MSA version of rescaling functions -// -// Author: Prashant Patil (prashant.patil@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MSA) && !defined(WEBP_REDUCE_SIZE) - -#include - -#include "src/utils/rescaler_utils.h" -#include "src/dsp/msa_macro.h" - -#define ROUNDER (WEBP_RESCALER_ONE >> 1) -#define MULT_FIX(x, y) (((uint64_t)(x) * (y) + ROUNDER) >> WEBP_RESCALER_RFIX) -#define MULT_FIX_FLOOR(x, y) (((uint64_t)(x) * (y)) >> WEBP_RESCALER_RFIX) - -#define CALC_MULT_FIX_16(in0, in1, in2, in3, scale, shift, dst) do { \ - v4u32 tmp0, tmp1, tmp2, tmp3; \ - v16u8 t0, t1, t2, t3, t4, t5; \ - v2u64 out0, out1, out2, out3; \ - ILVRL_W2_UW(zero, in0, tmp0, tmp1); \ - ILVRL_W2_UW(zero, in1, tmp2, tmp3); \ - DOTP_UW2_UD(tmp0, tmp1, scale, scale, out0, out1); \ - DOTP_UW2_UD(tmp2, tmp3, scale, scale, out2, out3); \ - SRAR_D4_UD(out0, out1, out2, out3, shift); \ - PCKEV_B2_UB(out1, out0, out3, out2, t0, t1); \ - ILVRL_W2_UW(zero, in2, tmp0, tmp1); \ - ILVRL_W2_UW(zero, in3, tmp2, tmp3); \ - DOTP_UW2_UD(tmp0, tmp1, scale, scale, out0, out1); \ - DOTP_UW2_UD(tmp2, tmp3, scale, scale, out2, out3); \ - SRAR_D4_UD(out0, out1, out2, out3, shift); \ - PCKEV_B2_UB(out1, out0, out3, out2, t2, t3); \ - PCKEV_B2_UB(t1, t0, t3, t2, t4, t5); \ - dst = (v16u8)__msa_pckev_b((v16i8)t5, (v16i8)t4); \ -} while (0) - -#define CALC_MULT_FIX_4(in0, scale, shift, dst) do { \ - v4u32 tmp0, tmp1; \ - v16i8 t0, t1; \ - v2u64 out0, out1; \ - ILVRL_W2_UW(zero, in0, tmp0, tmp1); \ - DOTP_UW2_UD(tmp0, tmp1, scale, scale, out0, out1); \ - SRAR_D2_UD(out0, out1, shift); \ - t0 = __msa_pckev_b((v16i8)out1, (v16i8)out0); \ - t1 = __msa_pckev_b(t0, t0); \ - t0 = __msa_pckev_b(t1, t1); \ - dst = __msa_copy_s_w((v4i32)t0, 0); \ -} while (0) - -#define CALC_MULT_FIX1_16(in0, in1, in2, in3, fyscale, shift, \ - dst0, dst1, dst2, dst3) do { \ - v4u32 tmp0, tmp1, tmp2, tmp3; \ - v2u64 out0, out1, out2, out3; \ - ILVRL_W2_UW(zero, in0, tmp0, tmp1); \ - ILVRL_W2_UW(zero, in1, tmp2, tmp3); \ - DOTP_UW2_UD(tmp0, tmp1, fyscale, fyscale, out0, out1); \ - DOTP_UW2_UD(tmp2, tmp3, fyscale, fyscale, out2, out3); \ - SRAR_D4_UD(out0, out1, out2, out3, shift); \ - PCKEV_W2_UW(out1, out0, out3, out2, dst0, dst1); \ - ILVRL_W2_UW(zero, in2, tmp0, tmp1); \ - ILVRL_W2_UW(zero, in3, tmp2, tmp3); \ - DOTP_UW2_UD(tmp0, tmp1, fyscale, fyscale, out0, out1); \ - DOTP_UW2_UD(tmp2, tmp3, fyscale, fyscale, out2, out3); \ - SRAR_D4_UD(out0, out1, out2, out3, shift); \ - PCKEV_W2_UW(out1, out0, out3, out2, dst2, dst3); \ -} while (0) - -#define CALC_MULT_FIX1_4(in0, scale, shift, dst) do { \ - v4u32 tmp0, tmp1; \ - v2u64 out0, out1; \ - ILVRL_W2_UW(zero, in0, tmp0, tmp1); \ - DOTP_UW2_UD(tmp0, tmp1, scale, scale, out0, out1); \ - SRAR_D2_UD(out0, out1, shift); \ - dst = (v4u32)__msa_pckev_w((v4i32)out1, (v4i32)out0); \ -} while (0) - -#define CALC_MULT_FIX2_16(in0, in1, in2, in3, mult, scale, shift, \ - dst0, dst1) do { \ - v4u32 tmp0, tmp1, tmp2, tmp3; \ - v2u64 out0, out1, out2, out3; \ - ILVRL_W2_UW(in0, in2, tmp0, tmp1); \ - ILVRL_W2_UW(in1, in3, tmp2, tmp3); \ - DOTP_UW2_UD(tmp0, tmp1, mult, mult, out0, out1); \ - DOTP_UW2_UD(tmp2, tmp3, mult, mult, out2, out3); \ - SRAR_D4_UD(out0, out1, out2, out3, shift); \ - DOTP_UW2_UD(out0, out1, scale, scale, out0, out1); \ - DOTP_UW2_UD(out2, out3, scale, scale, out2, out3); \ - SRAR_D4_UD(out0, out1, out2, out3, shift); \ - PCKEV_B2_UB(out1, out0, out3, out2, dst0, dst1); \ -} while (0) - -#define CALC_MULT_FIX2_4(in0, in1, mult, scale, shift, dst) do { \ - v4u32 tmp0, tmp1; \ - v2u64 out0, out1; \ - v16i8 t0, t1; \ - ILVRL_W2_UW(in0, in1, tmp0, tmp1); \ - DOTP_UW2_UD(tmp0, tmp1, mult, mult, out0, out1); \ - SRAR_D2_UD(out0, out1, shift); \ - DOTP_UW2_UD(out0, out1, scale, scale, out0, out1); \ - SRAR_D2_UD(out0, out1, shift); \ - t0 = __msa_pckev_b((v16i8)out1, (v16i8)out0); \ - t1 = __msa_pckev_b(t0, t0); \ - t0 = __msa_pckev_b(t1, t1); \ - dst = __msa_copy_s_w((v4i32)t0, 0); \ -} while (0) - -static WEBP_INLINE void ExportRowExpand_0(const uint32_t* frow, uint8_t* dst, - int length, - WebPRescaler* const wrk) { - const v4u32 scale = (v4u32)__msa_fill_w(wrk->fy_scale); - const v4u32 shift = (v4u32)__msa_fill_w(WEBP_RESCALER_RFIX); - const v4i32 zero = { 0 }; - - while (length >= 16) { - v4u32 src0, src1, src2, src3; - v16u8 out; - LD_UW4(frow, 4, src0, src1, src2, src3); - CALC_MULT_FIX_16(src0, src1, src2, src3, scale, shift, out); - ST_UB(out, dst); - length -= 16; - frow += 16; - dst += 16; - } - if (length > 0) { - int x_out; - if (length >= 12) { - uint32_t val0_m, val1_m, val2_m; - v4u32 src0, src1, src2; - LD_UW3(frow, 4, src0, src1, src2); - CALC_MULT_FIX_4(src0, scale, shift, val0_m); - CALC_MULT_FIX_4(src1, scale, shift, val1_m); - CALC_MULT_FIX_4(src2, scale, shift, val2_m); - SW3(val0_m, val1_m, val2_m, dst, 4); - length -= 12; - frow += 12; - dst += 12; - } else if (length >= 8) { - uint32_t val0_m, val1_m; - v4u32 src0, src1; - LD_UW2(frow, 4, src0, src1); - CALC_MULT_FIX_4(src0, scale, shift, val0_m); - CALC_MULT_FIX_4(src1, scale, shift, val1_m); - SW2(val0_m, val1_m, dst, 4); - length -= 8; - frow += 8; - dst += 8; - } else if (length >= 4) { - uint32_t val0_m; - const v4u32 src0 = LD_UW(frow); - CALC_MULT_FIX_4(src0, scale, shift, val0_m); - SW(val0_m, dst); - length -= 4; - frow += 4; - dst += 4; - } - for (x_out = 0; x_out < length; ++x_out) { - const uint32_t J = frow[x_out]; - const int v = (int)MULT_FIX(J, wrk->fy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - } - } -} - -static WEBP_INLINE void ExportRowExpand_1(const uint32_t* frow, uint32_t* irow, - uint8_t* dst, int length, - WebPRescaler* const wrk) { - const uint32_t B = WEBP_RESCALER_FRAC(-wrk->y_accum, wrk->y_sub); - const uint32_t A = (uint32_t)(WEBP_RESCALER_ONE - B); - const v4i32 B1 = __msa_fill_w(B); - const v4i32 A1 = __msa_fill_w(A); - const v4i32 AB = __msa_ilvr_w(A1, B1); - const v4u32 scale = (v4u32)__msa_fill_w(wrk->fy_scale); - const v4u32 shift = (v4u32)__msa_fill_w(WEBP_RESCALER_RFIX); - - while (length >= 16) { - v4u32 frow0, frow1, frow2, frow3, irow0, irow1, irow2, irow3; - v16u8 t0, t1, t2, t3, t4, t5; - LD_UW4(frow, 4, frow0, frow1, frow2, frow3); - LD_UW4(irow, 4, irow0, irow1, irow2, irow3); - CALC_MULT_FIX2_16(frow0, frow1, irow0, irow1, AB, scale, shift, t0, t1); - CALC_MULT_FIX2_16(frow2, frow3, irow2, irow3, AB, scale, shift, t2, t3); - PCKEV_B2_UB(t1, t0, t3, t2, t4, t5); - t0 = (v16u8)__msa_pckev_b((v16i8)t5, (v16i8)t4); - ST_UB(t0, dst); - frow += 16; - irow += 16; - dst += 16; - length -= 16; - } - if (length > 0) { - int x_out; - if (length >= 12) { - uint32_t val0_m, val1_m, val2_m; - v4u32 frow0, frow1, frow2, irow0, irow1, irow2; - LD_UW3(frow, 4, frow0, frow1, frow2); - LD_UW3(irow, 4, irow0, irow1, irow2); - CALC_MULT_FIX2_4(frow0, irow0, AB, scale, shift, val0_m); - CALC_MULT_FIX2_4(frow1, irow1, AB, scale, shift, val1_m); - CALC_MULT_FIX2_4(frow2, irow2, AB, scale, shift, val2_m); - SW3(val0_m, val1_m, val2_m, dst, 4); - frow += 12; - irow += 12; - dst += 12; - length -= 12; - } else if (length >= 8) { - uint32_t val0_m, val1_m; - v4u32 frow0, frow1, irow0, irow1; - LD_UW2(frow, 4, frow0, frow1); - LD_UW2(irow, 4, irow0, irow1); - CALC_MULT_FIX2_4(frow0, irow0, AB, scale, shift, val0_m); - CALC_MULT_FIX2_4(frow1, irow1, AB, scale, shift, val1_m); - SW2(val0_m, val1_m, dst, 4); - frow += 4; - irow += 4; - dst += 4; - length -= 4; - } else if (length >= 4) { - uint32_t val0_m; - const v4u32 frow0 = LD_UW(frow + 0); - const v4u32 irow0 = LD_UW(irow + 0); - CALC_MULT_FIX2_4(frow0, irow0, AB, scale, shift, val0_m); - SW(val0_m, dst); - frow += 4; - irow += 4; - dst += 4; - length -= 4; - } - for (x_out = 0; x_out < length; ++x_out) { - const uint64_t I = (uint64_t)A * frow[x_out] - + (uint64_t)B * irow[x_out]; - const uint32_t J = (uint32_t)((I + ROUNDER) >> WEBP_RESCALER_RFIX); - const int v = (int)MULT_FIX(J, wrk->fy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - } - } -} - -static void RescalerExportRowExpand_MIPSdspR2(WebPRescaler* const wrk) { - uint8_t* dst = wrk->dst; - rescaler_t* irow = wrk->irow; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const rescaler_t* frow = wrk->frow; - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0); - assert(wrk->y_expand); - assert(wrk->y_sub != 0); - if (wrk->y_accum == 0) { - ExportRowExpand_0(frow, dst, x_out_max, wrk); - } else { - ExportRowExpand_1(frow, irow, dst, x_out_max, wrk); - } -} - -#if 0 // disabled for now. TODO(skal): make match the C-code -static WEBP_INLINE void ExportRowShrink_0(const uint32_t* frow, uint32_t* irow, - uint8_t* dst, int length, - const uint32_t yscale, - WebPRescaler* const wrk) { - const v4u32 y_scale = (v4u32)__msa_fill_w(yscale); - const v4u32 fxyscale = (v4u32)__msa_fill_w(wrk->fxy_scale); - const v4u32 shiftval = (v4u32)__msa_fill_w(WEBP_RESCALER_RFIX); - const v4i32 zero = { 0 }; - - while (length >= 16) { - v4u32 src0, src1, src2, src3, frac0, frac1, frac2, frac3; - v16u8 out; - LD_UW4(frow, 4, src0, src1, src2, src3); - CALC_MULT_FIX1_16(src0, src1, src2, src3, y_scale, shiftval, - frac0, frac1, frac2, frac3); - LD_UW4(irow, 4, src0, src1, src2, src3); - SUB4(src0, frac0, src1, frac1, src2, frac2, src3, frac3, - src0, src1, src2, src3); - CALC_MULT_FIX_16(src0, src1, src2, src3, fxyscale, shiftval, out); - ST_UB(out, dst); - ST_UW4(frac0, frac1, frac2, frac3, irow, 4); - frow += 16; - irow += 16; - dst += 16; - length -= 16; - } - if (length > 0) { - int x_out; - if (length >= 12) { - uint32_t val0_m, val1_m, val2_m; - v4u32 src0, src1, src2, frac0, frac1, frac2; - LD_UW3(frow, 4, src0, src1, src2); - CALC_MULT_FIX1_4(src0, y_scale, shiftval, frac0); - CALC_MULT_FIX1_4(src1, y_scale, shiftval, frac1); - CALC_MULT_FIX1_4(src2, y_scale, shiftval, frac2); - LD_UW3(irow, 4, src0, src1, src2); - SUB3(src0, frac0, src1, frac1, src2, frac2, src0, src1, src2); - CALC_MULT_FIX_4(src0, fxyscale, shiftval, val0_m); - CALC_MULT_FIX_4(src1, fxyscale, shiftval, val1_m); - CALC_MULT_FIX_4(src2, fxyscale, shiftval, val2_m); - SW3(val0_m, val1_m, val2_m, dst, 4); - ST_UW3(frac0, frac1, frac2, irow, 4); - frow += 12; - irow += 12; - dst += 12; - length -= 12; - } else if (length >= 8) { - uint32_t val0_m, val1_m; - v4u32 src0, src1, frac0, frac1; - LD_UW2(frow, 4, src0, src1); - CALC_MULT_FIX1_4(src0, y_scale, shiftval, frac0); - CALC_MULT_FIX1_4(src1, y_scale, shiftval, frac1); - LD_UW2(irow, 4, src0, src1); - SUB2(src0, frac0, src1, frac1, src0, src1); - CALC_MULT_FIX_4(src0, fxyscale, shiftval, val0_m); - CALC_MULT_FIX_4(src1, fxyscale, shiftval, val1_m); - SW2(val0_m, val1_m, dst, 4); - ST_UW2(frac0, frac1, irow, 4); - frow += 8; - irow += 8; - dst += 8; - length -= 8; - } else if (length >= 4) { - uint32_t val0_m; - v4u32 frac0; - v4u32 src0 = LD_UW(frow); - CALC_MULT_FIX1_4(src0, y_scale, shiftval, frac0); - src0 = LD_UW(irow); - src0 = src0 - frac0; - CALC_MULT_FIX_4(src0, fxyscale, shiftval, val0_m); - SW(val0_m, dst); - ST_UW(frac0, irow); - frow += 4; - irow += 4; - dst += 4; - length -= 4; - } - for (x_out = 0; x_out < length; ++x_out) { - const uint32_t frac = (uint32_t)MULT_FIX(frow[x_out], yscale); - const int v = (int)MULT_FIX_FLOOR(irow[x_out] - frac, wrk->fxy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - irow[x_out] = frac; - } - } -} - -static WEBP_INLINE void ExportRowShrink_1(uint32_t* irow, uint8_t* dst, - int length, - WebPRescaler* const wrk) { - const v4u32 scale = (v4u32)__msa_fill_w(wrk->fxy_scale); - const v4u32 shift = (v4u32)__msa_fill_w(WEBP_RESCALER_RFIX); - const v4i32 zero = { 0 }; - - while (length >= 16) { - v4u32 src0, src1, src2, src3; - v16u8 dst0; - LD_UW4(irow, 4, src0, src1, src2, src3); - CALC_MULT_FIX_16(src0, src1, src2, src3, scale, shift, dst0); - ST_UB(dst0, dst); - ST_SW4(zero, zero, zero, zero, irow, 4); - length -= 16; - irow += 16; - dst += 16; - } - if (length > 0) { - int x_out; - if (length >= 12) { - uint32_t val0_m, val1_m, val2_m; - v4u32 src0, src1, src2; - LD_UW3(irow, 4, src0, src1, src2); - CALC_MULT_FIX_4(src0, scale, shift, val0_m); - CALC_MULT_FIX_4(src1, scale, shift, val1_m); - CALC_MULT_FIX_4(src2, scale, shift, val2_m); - SW3(val0_m, val1_m, val2_m, dst, 4); - ST_SW3(zero, zero, zero, irow, 4); - length -= 12; - irow += 12; - dst += 12; - } else if (length >= 8) { - uint32_t val0_m, val1_m; - v4u32 src0, src1; - LD_UW2(irow, 4, src0, src1); - CALC_MULT_FIX_4(src0, scale, shift, val0_m); - CALC_MULT_FIX_4(src1, scale, shift, val1_m); - SW2(val0_m, val1_m, dst, 4); - ST_SW2(zero, zero, irow, 4); - length -= 8; - irow += 8; - dst += 8; - } else if (length >= 4) { - uint32_t val0_m; - const v4u32 src0 = LD_UW(irow + 0); - CALC_MULT_FIX_4(src0, scale, shift, val0_m); - SW(val0_m, dst); - ST_SW(zero, irow); - length -= 4; - irow += 4; - dst += 4; - } - for (x_out = 0; x_out < length; ++x_out) { - const int v = (int)MULT_FIX(irow[x_out], wrk->fxy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - irow[x_out] = 0; - } - } -} - -static void RescalerExportRowShrink_MIPSdspR2(WebPRescaler* const wrk) { - uint8_t* dst = wrk->dst; - rescaler_t* irow = wrk->irow; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const rescaler_t* frow = wrk->frow; - const uint32_t yscale = wrk->fy_scale * (-wrk->y_accum); - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0); - assert(!wrk->y_expand); - if (yscale) { - ExportRowShrink_0(frow, irow, dst, x_out_max, yscale, wrk); - } else { - ExportRowShrink_1(irow, dst, x_out_max, wrk); - } -} -#endif // 0 - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPRescalerDspInitMSA(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPRescalerDspInitMSA(void) { - WebPRescalerExportRowExpand = RescalerExportRowExpand_MIPSdspR2; -// WebPRescalerExportRowShrink = RescalerExportRowShrink_MIPSdspR2; -} - -#else // !WEBP_USE_MSA - -WEBP_DSP_INIT_STUB(WebPRescalerDspInitMSA) - -#endif // WEBP_USE_MSA diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_neon.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_neon.c deleted file mode 100644 index 53d7ba8..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_neon.c +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// NEON version of rescaling functions -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_NEON) && !defined(WEBP_REDUCE_SIZE) - -#include -#include -#include "src/dsp/neon.h" -#include "src/utils/rescaler_utils.h" - -#define ROUNDER (WEBP_RESCALER_ONE >> 1) -#define MULT_FIX_C(x, y) (((uint64_t)(x) * (y) + ROUNDER) >> WEBP_RESCALER_RFIX) -#define MULT_FIX_FLOOR_C(x, y) (((uint64_t)(x) * (y)) >> WEBP_RESCALER_RFIX) - -#define LOAD_32x4(SRC, DST) const uint32x4_t DST = vld1q_u32((SRC)) -#define LOAD_32x8(SRC, DST0, DST1) \ - LOAD_32x4(SRC + 0, DST0); \ - LOAD_32x4(SRC + 4, DST1) - -#define STORE_32x8(SRC0, SRC1, DST) do { \ - vst1q_u32((DST) + 0, SRC0); \ - vst1q_u32((DST) + 4, SRC1); \ -} while (0); - -#if (WEBP_RESCALER_RFIX == 32) -#define MAKE_HALF_CST(C) vdupq_n_s32((int32_t)((C) >> 1)) -// note: B is actualy scale>>1. See MAKE_HALF_CST -#define MULT_FIX(A, B) \ - vreinterpretq_u32_s32(vqrdmulhq_s32(vreinterpretq_s32_u32((A)), (B))) -#define MULT_FIX_FLOOR(A, B) \ - vreinterpretq_u32_s32(vqdmulhq_s32(vreinterpretq_s32_u32((A)), (B))) -#else -#error "MULT_FIX/WEBP_RESCALER_RFIX need some more work" -#endif - -static uint32x4_t Interpolate_NEON(const rescaler_t* const frow, - const rescaler_t* const irow, - uint32_t A, uint32_t B) { - LOAD_32x4(frow, A0); - LOAD_32x4(irow, B0); - const uint64x2_t C0 = vmull_n_u32(vget_low_u32(A0), A); - const uint64x2_t C1 = vmull_n_u32(vget_high_u32(A0), A); - const uint64x2_t D0 = vmlal_n_u32(C0, vget_low_u32(B0), B); - const uint64x2_t D1 = vmlal_n_u32(C1, vget_high_u32(B0), B); - const uint32x4_t E = vcombine_u32( - vrshrn_n_u64(D0, WEBP_RESCALER_RFIX), - vrshrn_n_u64(D1, WEBP_RESCALER_RFIX)); - return E; -} - -static void RescalerExportRowExpand_NEON(WebPRescaler* const wrk) { - int x_out; - uint8_t* const dst = wrk->dst; - rescaler_t* const irow = wrk->irow; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const int max_span = x_out_max & ~7; - const rescaler_t* const frow = wrk->frow; - const uint32_t fy_scale = wrk->fy_scale; - const int32x4_t fy_scale_half = MAKE_HALF_CST(fy_scale); - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0); - assert(wrk->y_expand); - assert(wrk->y_sub != 0); - if (wrk->y_accum == 0) { - for (x_out = 0; x_out < max_span; x_out += 8) { - LOAD_32x4(frow + x_out + 0, A0); - LOAD_32x4(frow + x_out + 4, A1); - const uint32x4_t B0 = MULT_FIX(A0, fy_scale_half); - const uint32x4_t B1 = MULT_FIX(A1, fy_scale_half); - const uint16x4_t C0 = vmovn_u32(B0); - const uint16x4_t C1 = vmovn_u32(B1); - const uint8x8_t D = vmovn_u16(vcombine_u16(C0, C1)); - vst1_u8(dst + x_out, D); - } - for (; x_out < x_out_max; ++x_out) { - const uint32_t J = frow[x_out]; - const int v = (int)MULT_FIX_C(J, fy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - } - } else { - const uint32_t B = WEBP_RESCALER_FRAC(-wrk->y_accum, wrk->y_sub); - const uint32_t A = (uint32_t)(WEBP_RESCALER_ONE - B); - for (x_out = 0; x_out < max_span; x_out += 8) { - const uint32x4_t C0 = - Interpolate_NEON(frow + x_out + 0, irow + x_out + 0, A, B); - const uint32x4_t C1 = - Interpolate_NEON(frow + x_out + 4, irow + x_out + 4, A, B); - const uint32x4_t D0 = MULT_FIX(C0, fy_scale_half); - const uint32x4_t D1 = MULT_FIX(C1, fy_scale_half); - const uint16x4_t E0 = vmovn_u32(D0); - const uint16x4_t E1 = vmovn_u32(D1); - const uint8x8_t F = vmovn_u16(vcombine_u16(E0, E1)); - vst1_u8(dst + x_out, F); - } - for (; x_out < x_out_max; ++x_out) { - const uint64_t I = (uint64_t)A * frow[x_out] - + (uint64_t)B * irow[x_out]; - const uint32_t J = (uint32_t)((I + ROUNDER) >> WEBP_RESCALER_RFIX); - const int v = (int)MULT_FIX_C(J, fy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - } - } -} - -static void RescalerExportRowShrink_NEON(WebPRescaler* const wrk) { - int x_out; - uint8_t* const dst = wrk->dst; - rescaler_t* const irow = wrk->irow; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const int max_span = x_out_max & ~7; - const rescaler_t* const frow = wrk->frow; - const uint32_t yscale = wrk->fy_scale * (-wrk->y_accum); - const uint32_t fxy_scale = wrk->fxy_scale; - const uint32x4_t zero = vdupq_n_u32(0); - const int32x4_t yscale_half = MAKE_HALF_CST(yscale); - const int32x4_t fxy_scale_half = MAKE_HALF_CST(fxy_scale); - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0); - assert(!wrk->y_expand); - if (yscale) { - for (x_out = 0; x_out < max_span; x_out += 8) { - LOAD_32x8(frow + x_out, in0, in1); - LOAD_32x8(irow + x_out, in2, in3); - const uint32x4_t A0 = MULT_FIX(in0, yscale_half); - const uint32x4_t A1 = MULT_FIX(in1, yscale_half); - const uint32x4_t B0 = vqsubq_u32(in2, A0); - const uint32x4_t B1 = vqsubq_u32(in3, A1); - const uint32x4_t C0 = MULT_FIX_FLOOR(B0, fxy_scale_half); - const uint32x4_t C1 = MULT_FIX_FLOOR(B1, fxy_scale_half); - const uint16x4_t D0 = vmovn_u32(C0); - const uint16x4_t D1 = vmovn_u32(C1); - const uint8x8_t E = vmovn_u16(vcombine_u16(D0, D1)); - vst1_u8(dst + x_out, E); - STORE_32x8(A0, A1, irow + x_out); - } - for (; x_out < x_out_max; ++x_out) { - const uint32_t frac = (uint32_t)MULT_FIX_C(frow[x_out], yscale); - const int v = (int)MULT_FIX_FLOOR_C(irow[x_out] - frac, fxy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - irow[x_out] = frac; // new fractional start - } - } else { - for (x_out = 0; x_out < max_span; x_out += 8) { - LOAD_32x8(irow + x_out, in0, in1); - const uint32x4_t A0 = MULT_FIX(in0, fxy_scale_half); - const uint32x4_t A1 = MULT_FIX(in1, fxy_scale_half); - const uint16x4_t B0 = vmovn_u32(A0); - const uint16x4_t B1 = vmovn_u32(A1); - const uint8x8_t C = vmovn_u16(vcombine_u16(B0, B1)); - vst1_u8(dst + x_out, C); - STORE_32x8(zero, zero, irow + x_out); - } - for (; x_out < x_out_max; ++x_out) { - const int v = (int)MULT_FIX_C(irow[x_out], fxy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - irow[x_out] = 0; - } - } -} - -#undef MULT_FIX_FLOOR_C -#undef MULT_FIX_C -#undef MULT_FIX_FLOOR -#undef MULT_FIX -#undef ROUNDER - -//------------------------------------------------------------------------------ - -extern void WebPRescalerDspInitNEON(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPRescalerDspInitNEON(void) { - WebPRescalerExportRowExpand = RescalerExportRowExpand_NEON; - WebPRescalerExportRowShrink = RescalerExportRowShrink_NEON; -} - -#else // !WEBP_USE_NEON - -WEBP_DSP_INIT_STUB(WebPRescalerDspInitNEON) - -#endif // WEBP_USE_NEON diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_sse2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_sse2.c deleted file mode 100644 index efc7e6d..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/rescaler_sse2.c +++ /dev/null @@ -1,404 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE2 Rescaling functions -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE2) && !defined(WEBP_REDUCE_SIZE) -#include - -#include -#include "src/utils/rescaler_utils.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ -// Implementations of critical functions ImportRow / ExportRow - -#define ROUNDER (WEBP_RESCALER_ONE >> 1) -#define MULT_FIX(x, y) (((uint64_t)(x) * (y) + ROUNDER) >> WEBP_RESCALER_RFIX) -#define MULT_FIX_FLOOR(x, y) (((uint64_t)(x) * (y)) >> WEBP_RESCALER_RFIX) - -// input: 8 bytes ABCDEFGH -> output: A0E0B0F0C0G0D0H0 -static void LoadTwoPixels_SSE2(const uint8_t* const src, __m128i* out) { - const __m128i zero = _mm_setzero_si128(); - const __m128i A = _mm_loadl_epi64((const __m128i*)(src)); // ABCDEFGH - const __m128i B = _mm_unpacklo_epi8(A, zero); // A0B0C0D0E0F0G0H0 - const __m128i C = _mm_srli_si128(B, 8); // E0F0G0H0 - *out = _mm_unpacklo_epi16(B, C); -} - -// input: 8 bytes ABCDEFGH -> output: A0B0C0D0E0F0G0H0 -static void LoadEightPixels_SSE2(const uint8_t* const src, __m128i* out) { - const __m128i zero = _mm_setzero_si128(); - const __m128i A = _mm_loadl_epi64((const __m128i*)(src)); // ABCDEFGH - *out = _mm_unpacklo_epi8(A, zero); -} - -static void RescalerImportRowExpand_SSE2(WebPRescaler* const wrk, - const uint8_t* src) { - rescaler_t* frow = wrk->frow; - const rescaler_t* const frow_end = frow + wrk->dst_width * wrk->num_channels; - const int x_add = wrk->x_add; - int accum = x_add; - __m128i cur_pixels; - - // SSE2 implementation only works with 16b signed arithmetic at max. - if (wrk->src_width < 8 || accum >= (1 << 15)) { - WebPRescalerImportRowExpand_C(wrk, src); - return; - } - - assert(!WebPRescalerInputDone(wrk)); - assert(wrk->x_expand); - if (wrk->num_channels == 4) { - LoadTwoPixels_SSE2(src, &cur_pixels); - src += 4; - while (1) { - const __m128i mult = _mm_set1_epi32(((x_add - accum) << 16) | accum); - const __m128i out = _mm_madd_epi16(cur_pixels, mult); - _mm_storeu_si128((__m128i*)frow, out); - frow += 4; - if (frow >= frow_end) break; - accum -= wrk->x_sub; - if (accum < 0) { - LoadTwoPixels_SSE2(src, &cur_pixels); - src += 4; - accum += x_add; - } - } - } else { - int left; - const uint8_t* const src_limit = src + wrk->src_width - 8; - LoadEightPixels_SSE2(src, &cur_pixels); - src += 7; - left = 7; - while (1) { - const __m128i mult = _mm_cvtsi32_si128(((x_add - accum) << 16) | accum); - const __m128i out = _mm_madd_epi16(cur_pixels, mult); - assert(sizeof(*frow) == sizeof(uint32_t)); - WebPUint32ToMem((uint8_t*)frow, _mm_cvtsi128_si32(out)); - frow += 1; - if (frow >= frow_end) break; - accum -= wrk->x_sub; - if (accum < 0) { - if (--left) { - cur_pixels = _mm_srli_si128(cur_pixels, 2); - } else if (src <= src_limit) { - LoadEightPixels_SSE2(src, &cur_pixels); - src += 7; - left = 7; - } else { // tail - cur_pixels = _mm_srli_si128(cur_pixels, 2); - cur_pixels = _mm_insert_epi16(cur_pixels, src[1], 1); - src += 1; - left = 1; - } - accum += x_add; - } - } - } - assert(accum == 0); -} - -static void RescalerImportRowShrink_SSE2(WebPRescaler* const wrk, - const uint8_t* src) { - const int x_sub = wrk->x_sub; - int accum = 0; - const __m128i zero = _mm_setzero_si128(); - const __m128i mult0 = _mm_set1_epi16(x_sub); - const __m128i mult1 = _mm_set1_epi32(wrk->fx_scale); - const __m128i rounder = _mm_set_epi32(0, ROUNDER, 0, ROUNDER); - __m128i sum = zero; - rescaler_t* frow = wrk->frow; - const rescaler_t* const frow_end = wrk->frow + 4 * wrk->dst_width; - - if (wrk->num_channels != 4 || wrk->x_add > (x_sub << 7)) { - WebPRescalerImportRowShrink_C(wrk, src); - return; - } - assert(!WebPRescalerInputDone(wrk)); - assert(!wrk->x_expand); - - for (; frow < frow_end; frow += 4) { - __m128i base = zero; - accum += wrk->x_add; - while (accum > 0) { - const __m128i A = _mm_cvtsi32_si128(WebPMemToUint32(src)); - src += 4; - base = _mm_unpacklo_epi8(A, zero); - // To avoid overflow, we need: base * x_add / x_sub < 32768 - // => x_add < x_sub << 7. That's a 1/128 reduction ratio limit. - sum = _mm_add_epi16(sum, base); - accum -= x_sub; - } - { // Emit next horizontal pixel. - const __m128i mult = _mm_set1_epi16(-accum); - const __m128i frac0 = _mm_mullo_epi16(base, mult); // 16b x 16b -> 32b - const __m128i frac1 = _mm_mulhi_epu16(base, mult); - const __m128i frac = _mm_unpacklo_epi16(frac0, frac1); // frac is 32b - const __m128i A0 = _mm_mullo_epi16(sum, mult0); - const __m128i A1 = _mm_mulhi_epu16(sum, mult0); - const __m128i B0 = _mm_unpacklo_epi16(A0, A1); // sum * x_sub - const __m128i frow_out = _mm_sub_epi32(B0, frac); // sum * x_sub - frac - const __m128i D0 = _mm_srli_epi64(frac, 32); - const __m128i D1 = _mm_mul_epu32(frac, mult1); // 32b x 16b -> 64b - const __m128i D2 = _mm_mul_epu32(D0, mult1); - const __m128i E1 = _mm_add_epi64(D1, rounder); - const __m128i E2 = _mm_add_epi64(D2, rounder); - const __m128i F1 = _mm_shuffle_epi32(E1, 1 | (3 << 2)); - const __m128i F2 = _mm_shuffle_epi32(E2, 1 | (3 << 2)); - const __m128i G = _mm_unpacklo_epi32(F1, F2); - sum = _mm_packs_epi32(G, zero); - _mm_storeu_si128((__m128i*)frow, frow_out); - } - } - assert(accum == 0); -} - -//------------------------------------------------------------------------------ -// Row export - -// load *src as epi64, multiply by mult and store result in [out0 ... out3] -static WEBP_INLINE void LoadDispatchAndMult_SSE2(const rescaler_t* const src, - const __m128i* const mult, - __m128i* const out0, - __m128i* const out1, - __m128i* const out2, - __m128i* const out3) { - const __m128i A0 = _mm_loadu_si128((const __m128i*)(src + 0)); - const __m128i A1 = _mm_loadu_si128((const __m128i*)(src + 4)); - const __m128i A2 = _mm_srli_epi64(A0, 32); - const __m128i A3 = _mm_srli_epi64(A1, 32); - if (mult != NULL) { - *out0 = _mm_mul_epu32(A0, *mult); - *out1 = _mm_mul_epu32(A1, *mult); - *out2 = _mm_mul_epu32(A2, *mult); - *out3 = _mm_mul_epu32(A3, *mult); - } else { - *out0 = A0; - *out1 = A1; - *out2 = A2; - *out3 = A3; - } -} - -static WEBP_INLINE void ProcessRow_SSE2(const __m128i* const A0, - const __m128i* const A1, - const __m128i* const A2, - const __m128i* const A3, - const __m128i* const mult, - uint8_t* const dst) { - const __m128i rounder = _mm_set_epi32(0, ROUNDER, 0, ROUNDER); - const __m128i mask = _mm_set_epi32(0xffffffffu, 0, 0xffffffffu, 0); - const __m128i B0 = _mm_mul_epu32(*A0, *mult); - const __m128i B1 = _mm_mul_epu32(*A1, *mult); - const __m128i B2 = _mm_mul_epu32(*A2, *mult); - const __m128i B3 = _mm_mul_epu32(*A3, *mult); - const __m128i C0 = _mm_add_epi64(B0, rounder); - const __m128i C1 = _mm_add_epi64(B1, rounder); - const __m128i C2 = _mm_add_epi64(B2, rounder); - const __m128i C3 = _mm_add_epi64(B3, rounder); - const __m128i D0 = _mm_srli_epi64(C0, WEBP_RESCALER_RFIX); - const __m128i D1 = _mm_srli_epi64(C1, WEBP_RESCALER_RFIX); -#if (WEBP_RESCALER_RFIX < 32) - const __m128i D2 = - _mm_and_si128(_mm_slli_epi64(C2, 32 - WEBP_RESCALER_RFIX), mask); - const __m128i D3 = - _mm_and_si128(_mm_slli_epi64(C3, 32 - WEBP_RESCALER_RFIX), mask); -#else - const __m128i D2 = _mm_and_si128(C2, mask); - const __m128i D3 = _mm_and_si128(C3, mask); -#endif - const __m128i E0 = _mm_or_si128(D0, D2); - const __m128i E1 = _mm_or_si128(D1, D3); - const __m128i F = _mm_packs_epi32(E0, E1); - const __m128i G = _mm_packus_epi16(F, F); - _mm_storel_epi64((__m128i*)dst, G); -} - -static WEBP_INLINE void ProcessRow_Floor_SSE2(const __m128i* const A0, - const __m128i* const A1, - const __m128i* const A2, - const __m128i* const A3, - const __m128i* const mult, - uint8_t* const dst) { - const __m128i mask = _mm_set_epi32(0xffffffffu, 0, 0xffffffffu, 0); - const __m128i B0 = _mm_mul_epu32(*A0, *mult); - const __m128i B1 = _mm_mul_epu32(*A1, *mult); - const __m128i B2 = _mm_mul_epu32(*A2, *mult); - const __m128i B3 = _mm_mul_epu32(*A3, *mult); - const __m128i D0 = _mm_srli_epi64(B0, WEBP_RESCALER_RFIX); - const __m128i D1 = _mm_srli_epi64(B1, WEBP_RESCALER_RFIX); -#if (WEBP_RESCALER_RFIX < 32) - const __m128i D2 = - _mm_and_si128(_mm_slli_epi64(B2, 32 - WEBP_RESCALER_RFIX), mask); - const __m128i D3 = - _mm_and_si128(_mm_slli_epi64(B3, 32 - WEBP_RESCALER_RFIX), mask); -#else - const __m128i D2 = _mm_and_si128(B2, mask); - const __m128i D3 = _mm_and_si128(B3, mask); -#endif - const __m128i E0 = _mm_or_si128(D0, D2); - const __m128i E1 = _mm_or_si128(D1, D3); - const __m128i F = _mm_packs_epi32(E0, E1); - const __m128i G = _mm_packus_epi16(F, F); - _mm_storel_epi64((__m128i*)dst, G); -} - -static void RescalerExportRowExpand_SSE2(WebPRescaler* const wrk) { - int x_out; - uint8_t* const dst = wrk->dst; - rescaler_t* const irow = wrk->irow; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const rescaler_t* const frow = wrk->frow; - const __m128i mult = _mm_set_epi32(0, wrk->fy_scale, 0, wrk->fy_scale); - - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0 && wrk->y_sub + wrk->y_accum >= 0); - assert(wrk->y_expand); - if (wrk->y_accum == 0) { - for (x_out = 0; x_out + 8 <= x_out_max; x_out += 8) { - __m128i A0, A1, A2, A3; - LoadDispatchAndMult_SSE2(frow + x_out, NULL, &A0, &A1, &A2, &A3); - ProcessRow_SSE2(&A0, &A1, &A2, &A3, &mult, dst + x_out); - } - for (; x_out < x_out_max; ++x_out) { - const uint32_t J = frow[x_out]; - const int v = (int)MULT_FIX(J, wrk->fy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - } - } else { - const uint32_t B = WEBP_RESCALER_FRAC(-wrk->y_accum, wrk->y_sub); - const uint32_t A = (uint32_t)(WEBP_RESCALER_ONE - B); - const __m128i mA = _mm_set_epi32(0, A, 0, A); - const __m128i mB = _mm_set_epi32(0, B, 0, B); - const __m128i rounder = _mm_set_epi32(0, ROUNDER, 0, ROUNDER); - for (x_out = 0; x_out + 8 <= x_out_max; x_out += 8) { - __m128i A0, A1, A2, A3, B0, B1, B2, B3; - LoadDispatchAndMult_SSE2(frow + x_out, &mA, &A0, &A1, &A2, &A3); - LoadDispatchAndMult_SSE2(irow + x_out, &mB, &B0, &B1, &B2, &B3); - { - const __m128i C0 = _mm_add_epi64(A0, B0); - const __m128i C1 = _mm_add_epi64(A1, B1); - const __m128i C2 = _mm_add_epi64(A2, B2); - const __m128i C3 = _mm_add_epi64(A3, B3); - const __m128i D0 = _mm_add_epi64(C0, rounder); - const __m128i D1 = _mm_add_epi64(C1, rounder); - const __m128i D2 = _mm_add_epi64(C2, rounder); - const __m128i D3 = _mm_add_epi64(C3, rounder); - const __m128i E0 = _mm_srli_epi64(D0, WEBP_RESCALER_RFIX); - const __m128i E1 = _mm_srli_epi64(D1, WEBP_RESCALER_RFIX); - const __m128i E2 = _mm_srli_epi64(D2, WEBP_RESCALER_RFIX); - const __m128i E3 = _mm_srli_epi64(D3, WEBP_RESCALER_RFIX); - ProcessRow_SSE2(&E0, &E1, &E2, &E3, &mult, dst + x_out); - } - } - for (; x_out < x_out_max; ++x_out) { - const uint64_t I = (uint64_t)A * frow[x_out] - + (uint64_t)B * irow[x_out]; - const uint32_t J = (uint32_t)((I + ROUNDER) >> WEBP_RESCALER_RFIX); - const int v = (int)MULT_FIX(J, wrk->fy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - } - } -} - -static void RescalerExportRowShrink_SSE2(WebPRescaler* const wrk) { - int x_out; - uint8_t* const dst = wrk->dst; - rescaler_t* const irow = wrk->irow; - const int x_out_max = wrk->dst_width * wrk->num_channels; - const rescaler_t* const frow = wrk->frow; - const uint32_t yscale = wrk->fy_scale * (-wrk->y_accum); - assert(!WebPRescalerOutputDone(wrk)); - assert(wrk->y_accum <= 0); - assert(!wrk->y_expand); - if (yscale) { - const int scale_xy = wrk->fxy_scale; - const __m128i mult_xy = _mm_set_epi32(0, scale_xy, 0, scale_xy); - const __m128i mult_y = _mm_set_epi32(0, yscale, 0, yscale); - const __m128i rounder = _mm_set_epi32(0, ROUNDER, 0, ROUNDER); - for (x_out = 0; x_out + 8 <= x_out_max; x_out += 8) { - __m128i A0, A1, A2, A3, B0, B1, B2, B3; - LoadDispatchAndMult_SSE2(irow + x_out, NULL, &A0, &A1, &A2, &A3); - LoadDispatchAndMult_SSE2(frow + x_out, &mult_y, &B0, &B1, &B2, &B3); - { - const __m128i C0 = _mm_add_epi64(B0, rounder); - const __m128i C1 = _mm_add_epi64(B1, rounder); - const __m128i C2 = _mm_add_epi64(B2, rounder); - const __m128i C3 = _mm_add_epi64(B3, rounder); - const __m128i D0 = _mm_srli_epi64(C0, WEBP_RESCALER_RFIX); // = frac - const __m128i D1 = _mm_srli_epi64(C1, WEBP_RESCALER_RFIX); - const __m128i D2 = _mm_srli_epi64(C2, WEBP_RESCALER_RFIX); - const __m128i D3 = _mm_srli_epi64(C3, WEBP_RESCALER_RFIX); - const __m128i E0 = _mm_sub_epi64(A0, D0); // irow[x] - frac - const __m128i E1 = _mm_sub_epi64(A1, D1); - const __m128i E2 = _mm_sub_epi64(A2, D2); - const __m128i E3 = _mm_sub_epi64(A3, D3); - const __m128i F2 = _mm_slli_epi64(D2, 32); - const __m128i F3 = _mm_slli_epi64(D3, 32); - const __m128i G0 = _mm_or_si128(D0, F2); - const __m128i G1 = _mm_or_si128(D1, F3); - _mm_storeu_si128((__m128i*)(irow + x_out + 0), G0); - _mm_storeu_si128((__m128i*)(irow + x_out + 4), G1); - ProcessRow_Floor_SSE2(&E0, &E1, &E2, &E3, &mult_xy, dst + x_out); - } - } - for (; x_out < x_out_max; ++x_out) { - const uint32_t frac = (int)MULT_FIX(frow[x_out], yscale); - const int v = (int)MULT_FIX_FLOOR(irow[x_out] - frac, wrk->fxy_scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - irow[x_out] = frac; // new fractional start - } - } else { - const uint32_t scale = wrk->fxy_scale; - const __m128i mult = _mm_set_epi32(0, scale, 0, scale); - const __m128i zero = _mm_setzero_si128(); - for (x_out = 0; x_out + 8 <= x_out_max; x_out += 8) { - __m128i A0, A1, A2, A3; - LoadDispatchAndMult_SSE2(irow + x_out, NULL, &A0, &A1, &A2, &A3); - _mm_storeu_si128((__m128i*)(irow + x_out + 0), zero); - _mm_storeu_si128((__m128i*)(irow + x_out + 4), zero); - ProcessRow_SSE2(&A0, &A1, &A2, &A3, &mult, dst + x_out); - } - for (; x_out < x_out_max; ++x_out) { - const int v = (int)MULT_FIX(irow[x_out], scale); - assert(v >= 0 && v <= 255); - dst[x_out] = v; - irow[x_out] = 0; - } - } -} - -#undef MULT_FIX_FLOOR -#undef MULT_FIX -#undef ROUNDER - -//------------------------------------------------------------------------------ - -extern void WebPRescalerDspInitSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPRescalerDspInitSSE2(void) { - WebPRescalerImportRowExpand = RescalerImportRowExpand_SSE2; - WebPRescalerImportRowShrink = RescalerImportRowShrink_SSE2; - WebPRescalerExportRowExpand = RescalerExportRowExpand_SSE2; - WebPRescalerExportRowShrink = RescalerExportRowShrink_SSE2; -} - -#else // !WEBP_USE_SSE2 - -WEBP_DSP_INIT_STUB(WebPRescalerDspInitSSE2) - -#endif // WEBP_USE_SSE2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/ssim.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/ssim.c deleted file mode 100644 index 35d184c..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/ssim.c +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// distortion calculation -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include // for abs() - -#include "src/dsp/dsp.h" - -#if !defined(WEBP_REDUCE_SIZE) - -//------------------------------------------------------------------------------ -// SSIM / PSNR - -// hat-shaped filter. Sum of coefficients is equal to 16. -static const uint32_t kWeight[2 * VP8_SSIM_KERNEL + 1] = { - 1, 2, 3, 4, 3, 2, 1 -}; -static const uint32_t kWeightSum = 16 * 16; // sum{kWeight}^2 - -static WEBP_INLINE double SSIMCalculation( - const VP8DistoStats* const stats, uint32_t N /*num samples*/) { - const uint32_t w2 = N * N; - const uint32_t C1 = 20 * w2; - const uint32_t C2 = 60 * w2; - const uint32_t C3 = 8 * 8 * w2; // 'dark' limit ~= 6 - const uint64_t xmxm = (uint64_t)stats->xm * stats->xm; - const uint64_t ymym = (uint64_t)stats->ym * stats->ym; - if (xmxm + ymym >= C3) { - const int64_t xmym = (int64_t)stats->xm * stats->ym; - const int64_t sxy = (int64_t)stats->xym * N - xmym; // can be negative - const uint64_t sxx = (uint64_t)stats->xxm * N - xmxm; - const uint64_t syy = (uint64_t)stats->yym * N - ymym; - // we descale by 8 to prevent overflow during the fnum/fden multiply. - const uint64_t num_S = (2 * (uint64_t)(sxy < 0 ? 0 : sxy) + C2) >> 8; - const uint64_t den_S = (sxx + syy + C2) >> 8; - const uint64_t fnum = (2 * xmym + C1) * num_S; - const uint64_t fden = (xmxm + ymym + C1) * den_S; - const double r = (double)fnum / fden; - assert(r >= 0. && r <= 1.0); - return r; - } - return 1.; // area is too dark to contribute meaningfully -} - -double VP8SSIMFromStats(const VP8DistoStats* const stats) { - return SSIMCalculation(stats, kWeightSum); -} - -double VP8SSIMFromStatsClipped(const VP8DistoStats* const stats) { - return SSIMCalculation(stats, stats->w); -} - -static double SSIMGetClipped_C(const uint8_t* src1, int stride1, - const uint8_t* src2, int stride2, - int xo, int yo, int W, int H) { - VP8DistoStats stats = { 0, 0, 0, 0, 0, 0 }; - const int ymin = (yo - VP8_SSIM_KERNEL < 0) ? 0 : yo - VP8_SSIM_KERNEL; - const int ymax = (yo + VP8_SSIM_KERNEL > H - 1) ? H - 1 - : yo + VP8_SSIM_KERNEL; - const int xmin = (xo - VP8_SSIM_KERNEL < 0) ? 0 : xo - VP8_SSIM_KERNEL; - const int xmax = (xo + VP8_SSIM_KERNEL > W - 1) ? W - 1 - : xo + VP8_SSIM_KERNEL; - int x, y; - src1 += ymin * stride1; - src2 += ymin * stride2; - for (y = ymin; y <= ymax; ++y, src1 += stride1, src2 += stride2) { - for (x = xmin; x <= xmax; ++x) { - const uint32_t w = kWeight[VP8_SSIM_KERNEL + x - xo] - * kWeight[VP8_SSIM_KERNEL + y - yo]; - const uint32_t s1 = src1[x]; - const uint32_t s2 = src2[x]; - stats.w += w; - stats.xm += w * s1; - stats.ym += w * s2; - stats.xxm += w * s1 * s1; - stats.xym += w * s1 * s2; - stats.yym += w * s2 * s2; - } - } - return VP8SSIMFromStatsClipped(&stats); -} - -static double SSIMGet_C(const uint8_t* src1, int stride1, - const uint8_t* src2, int stride2) { - VP8DistoStats stats = { 0, 0, 0, 0, 0, 0 }; - int x, y; - for (y = 0; y <= 2 * VP8_SSIM_KERNEL; ++y, src1 += stride1, src2 += stride2) { - for (x = 0; x <= 2 * VP8_SSIM_KERNEL; ++x) { - const uint32_t w = kWeight[x] * kWeight[y]; - const uint32_t s1 = src1[x]; - const uint32_t s2 = src2[x]; - stats.xm += w * s1; - stats.ym += w * s2; - stats.xxm += w * s1 * s1; - stats.xym += w * s1 * s2; - stats.yym += w * s2 * s2; - } - } - return VP8SSIMFromStats(&stats); -} - -#endif // !defined(WEBP_REDUCE_SIZE) - -//------------------------------------------------------------------------------ - -#if !defined(WEBP_DISABLE_STATS) -static uint32_t AccumulateSSE_C(const uint8_t* src1, - const uint8_t* src2, int len) { - int i; - uint32_t sse2 = 0; - assert(len <= 65535); // to ensure that accumulation fits within uint32_t - for (i = 0; i < len; ++i) { - const int32_t diff = src1[i] - src2[i]; - sse2 += diff * diff; - } - return sse2; -} -#endif - -//------------------------------------------------------------------------------ - -#if !defined(WEBP_REDUCE_SIZE) -VP8SSIMGetFunc VP8SSIMGet; -VP8SSIMGetClippedFunc VP8SSIMGetClipped; -#endif -#if !defined(WEBP_DISABLE_STATS) -VP8AccumulateSSEFunc VP8AccumulateSSE; -#endif - -extern void VP8SSIMDspInitSSE2(void); - -WEBP_DSP_INIT_FUNC(VP8SSIMDspInit) { -#if !defined(WEBP_REDUCE_SIZE) - VP8SSIMGetClipped = SSIMGetClipped_C; - VP8SSIMGet = SSIMGet_C; -#endif - -#if !defined(WEBP_DISABLE_STATS) - VP8AccumulateSSE = AccumulateSSE_C; -#endif - - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - VP8SSIMDspInitSSE2(); - } -#endif - } -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/ssim_sse2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/ssim_sse2.c deleted file mode 100644 index 2ba176d..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/ssim_sse2.c +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE2 version of distortion calculation -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE2) - -#include -#include - -#include "src/dsp/common_sse2.h" - -#if !defined(WEBP_DISABLE_STATS) - -// Helper function -static WEBP_INLINE void SubtractAndSquare_SSE2(const __m128i a, const __m128i b, - __m128i* const sum) { - // take abs(a-b) in 8b - const __m128i a_b = _mm_subs_epu8(a, b); - const __m128i b_a = _mm_subs_epu8(b, a); - const __m128i abs_a_b = _mm_or_si128(a_b, b_a); - // zero-extend to 16b - const __m128i zero = _mm_setzero_si128(); - const __m128i C0 = _mm_unpacklo_epi8(abs_a_b, zero); - const __m128i C1 = _mm_unpackhi_epi8(abs_a_b, zero); - // multiply with self - const __m128i sum1 = _mm_madd_epi16(C0, C0); - const __m128i sum2 = _mm_madd_epi16(C1, C1); - *sum = _mm_add_epi32(sum1, sum2); -} - -//------------------------------------------------------------------------------ -// SSIM / PSNR entry point - -static uint32_t AccumulateSSE_SSE2(const uint8_t* src1, - const uint8_t* src2, int len) { - int i = 0; - uint32_t sse2 = 0; - if (len >= 16) { - const int limit = len - 32; - int32_t tmp[4]; - __m128i sum1; - __m128i sum = _mm_setzero_si128(); - __m128i a0 = _mm_loadu_si128((const __m128i*)&src1[i]); - __m128i b0 = _mm_loadu_si128((const __m128i*)&src2[i]); - i += 16; - while (i <= limit) { - const __m128i a1 = _mm_loadu_si128((const __m128i*)&src1[i]); - const __m128i b1 = _mm_loadu_si128((const __m128i*)&src2[i]); - __m128i sum2; - i += 16; - SubtractAndSquare_SSE2(a0, b0, &sum1); - sum = _mm_add_epi32(sum, sum1); - a0 = _mm_loadu_si128((const __m128i*)&src1[i]); - b0 = _mm_loadu_si128((const __m128i*)&src2[i]); - i += 16; - SubtractAndSquare_SSE2(a1, b1, &sum2); - sum = _mm_add_epi32(sum, sum2); - } - SubtractAndSquare_SSE2(a0, b0, &sum1); - sum = _mm_add_epi32(sum, sum1); - _mm_storeu_si128((__m128i*)tmp, sum); - sse2 += (tmp[3] + tmp[2] + tmp[1] + tmp[0]); - } - - for (; i < len; ++i) { - const int32_t diff = src1[i] - src2[i]; - sse2 += diff * diff; - } - return sse2; -} -#endif // !defined(WEBP_DISABLE_STATS) - -#if !defined(WEBP_REDUCE_SIZE) - -static uint32_t HorizontalAdd16b_SSE2(const __m128i* const m) { - uint16_t tmp[8]; - const __m128i a = _mm_srli_si128(*m, 8); - const __m128i b = _mm_add_epi16(*m, a); - _mm_storeu_si128((__m128i*)tmp, b); - return (uint32_t)tmp[3] + tmp[2] + tmp[1] + tmp[0]; -} - -static uint32_t HorizontalAdd32b_SSE2(const __m128i* const m) { - const __m128i a = _mm_srli_si128(*m, 8); - const __m128i b = _mm_add_epi32(*m, a); - const __m128i c = _mm_add_epi32(b, _mm_srli_si128(b, 4)); - return (uint32_t)_mm_cvtsi128_si32(c); -} - -static const uint16_t kWeight[] = { 1, 2, 3, 4, 3, 2, 1, 0 }; - -#define ACCUMULATE_ROW(WEIGHT) do { \ - /* compute row weight (Wx * Wy) */ \ - const __m128i Wy = _mm_set1_epi16((WEIGHT)); \ - const __m128i W = _mm_mullo_epi16(Wx, Wy); \ - /* process 8 bytes at a time (7 bytes, actually) */ \ - const __m128i a0 = _mm_loadl_epi64((const __m128i*)src1); \ - const __m128i b0 = _mm_loadl_epi64((const __m128i*)src2); \ - /* convert to 16b and multiply by weight */ \ - const __m128i a1 = _mm_unpacklo_epi8(a0, zero); \ - const __m128i b1 = _mm_unpacklo_epi8(b0, zero); \ - const __m128i wa1 = _mm_mullo_epi16(a1, W); \ - const __m128i wb1 = _mm_mullo_epi16(b1, W); \ - /* accumulate */ \ - xm = _mm_add_epi16(xm, wa1); \ - ym = _mm_add_epi16(ym, wb1); \ - xxm = _mm_add_epi32(xxm, _mm_madd_epi16(a1, wa1)); \ - xym = _mm_add_epi32(xym, _mm_madd_epi16(a1, wb1)); \ - yym = _mm_add_epi32(yym, _mm_madd_epi16(b1, wb1)); \ - src1 += stride1; \ - src2 += stride2; \ -} while (0) - -static double SSIMGet_SSE2(const uint8_t* src1, int stride1, - const uint8_t* src2, int stride2) { - VP8DistoStats stats; - const __m128i zero = _mm_setzero_si128(); - __m128i xm = zero, ym = zero; // 16b accums - __m128i xxm = zero, yym = zero, xym = zero; // 32b accum - const __m128i Wx = _mm_loadu_si128((const __m128i*)kWeight); - assert(2 * VP8_SSIM_KERNEL + 1 == 7); - ACCUMULATE_ROW(1); - ACCUMULATE_ROW(2); - ACCUMULATE_ROW(3); - ACCUMULATE_ROW(4); - ACCUMULATE_ROW(3); - ACCUMULATE_ROW(2); - ACCUMULATE_ROW(1); - stats.xm = HorizontalAdd16b_SSE2(&xm); - stats.ym = HorizontalAdd16b_SSE2(&ym); - stats.xxm = HorizontalAdd32b_SSE2(&xxm); - stats.xym = HorizontalAdd32b_SSE2(&xym); - stats.yym = HorizontalAdd32b_SSE2(&yym); - return VP8SSIMFromStats(&stats); -} - -#endif // !defined(WEBP_REDUCE_SIZE) - -extern void VP8SSIMDspInitSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void VP8SSIMDspInitSSE2(void) { -#if !defined(WEBP_DISABLE_STATS) - VP8AccumulateSSE = AccumulateSSE_SSE2; -#endif -#if !defined(WEBP_REDUCE_SIZE) - VP8SSIMGet = SSIMGet_SSE2; -#endif -} - -#else // !WEBP_USE_SSE2 - -WEBP_DSP_INIT_STUB(VP8SSIMDspInitSSE2) - -#endif // WEBP_USE_SSE2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling.c deleted file mode 100644 index 0ca7265..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling.c +++ /dev/null @@ -1,327 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// YUV to RGB upsampling functions. -// -// Author: somnath@google.com (Somnath Banerjee) - -#include "src/dsp/dsp.h" -#include "src/dsp/yuv.h" - -#include - -//------------------------------------------------------------------------------ -// Fancy upsampler - -#ifdef FANCY_UPSAMPLING - -// Fancy upsampling functions to convert YUV to RGB -WebPUpsampleLinePairFunc WebPUpsamplers[MODE_LAST]; - -// Given samples laid out in a square as: -// [a b] -// [c d] -// we interpolate u/v as: -// ([9*a + 3*b + 3*c + d 3*a + 9*b + 3*c + d] + [8 8]) / 16 -// ([3*a + b + 9*c + 3*d a + 3*b + 3*c + 9*d] [8 8]) / 16 - -// We process u and v together stashed into 32bit (16bit each). -#define LOAD_UV(u, v) ((u) | ((v) << 16)) - -#define UPSAMPLE_FUNC(FUNC_NAME, FUNC, XSTEP) \ -static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \ - const uint8_t* top_u, const uint8_t* top_v, \ - const uint8_t* cur_u, const uint8_t* cur_v, \ - uint8_t* top_dst, uint8_t* bottom_dst, int len) { \ - int x; \ - const int last_pixel_pair = (len - 1) >> 1; \ - uint32_t tl_uv = LOAD_UV(top_u[0], top_v[0]); /* top-left sample */ \ - uint32_t l_uv = LOAD_UV(cur_u[0], cur_v[0]); /* left-sample */ \ - assert(top_y != NULL); \ - { \ - const uint32_t uv0 = (3 * tl_uv + l_uv + 0x00020002u) >> 2; \ - FUNC(top_y[0], uv0 & 0xff, (uv0 >> 16), top_dst); \ - } \ - if (bottom_y != NULL) { \ - const uint32_t uv0 = (3 * l_uv + tl_uv + 0x00020002u) >> 2; \ - FUNC(bottom_y[0], uv0 & 0xff, (uv0 >> 16), bottom_dst); \ - } \ - for (x = 1; x <= last_pixel_pair; ++x) { \ - const uint32_t t_uv = LOAD_UV(top_u[x], top_v[x]); /* top sample */ \ - const uint32_t uv = LOAD_UV(cur_u[x], cur_v[x]); /* sample */ \ - /* precompute invariant values associated with first and second diagonals*/\ - const uint32_t avg = tl_uv + t_uv + l_uv + uv + 0x00080008u; \ - const uint32_t diag_12 = (avg + 2 * (t_uv + l_uv)) >> 3; \ - const uint32_t diag_03 = (avg + 2 * (tl_uv + uv)) >> 3; \ - { \ - const uint32_t uv0 = (diag_12 + tl_uv) >> 1; \ - const uint32_t uv1 = (diag_03 + t_uv) >> 1; \ - FUNC(top_y[2 * x - 1], uv0 & 0xff, (uv0 >> 16), \ - top_dst + (2 * x - 1) * (XSTEP)); \ - FUNC(top_y[2 * x - 0], uv1 & 0xff, (uv1 >> 16), \ - top_dst + (2 * x - 0) * (XSTEP)); \ - } \ - if (bottom_y != NULL) { \ - const uint32_t uv0 = (diag_03 + l_uv) >> 1; \ - const uint32_t uv1 = (diag_12 + uv) >> 1; \ - FUNC(bottom_y[2 * x - 1], uv0 & 0xff, (uv0 >> 16), \ - bottom_dst + (2 * x - 1) * (XSTEP)); \ - FUNC(bottom_y[2 * x + 0], uv1 & 0xff, (uv1 >> 16), \ - bottom_dst + (2 * x + 0) * (XSTEP)); \ - } \ - tl_uv = t_uv; \ - l_uv = uv; \ - } \ - if (!(len & 1)) { \ - { \ - const uint32_t uv0 = (3 * tl_uv + l_uv + 0x00020002u) >> 2; \ - FUNC(top_y[len - 1], uv0 & 0xff, (uv0 >> 16), \ - top_dst + (len - 1) * (XSTEP)); \ - } \ - if (bottom_y != NULL) { \ - const uint32_t uv0 = (3 * l_uv + tl_uv + 0x00020002u) >> 2; \ - FUNC(bottom_y[len - 1], uv0 & 0xff, (uv0 >> 16), \ - bottom_dst + (len - 1) * (XSTEP)); \ - } \ - } \ -} - -// All variants implemented. -#if !WEBP_NEON_OMIT_C_CODE -UPSAMPLE_FUNC(UpsampleRgbaLinePair_C, VP8YuvToRgba, 4) -UPSAMPLE_FUNC(UpsampleBgraLinePair_C, VP8YuvToBgra, 4) -#if !defined(WEBP_REDUCE_CSP) -UPSAMPLE_FUNC(UpsampleArgbLinePair_C, VP8YuvToArgb, 4) -UPSAMPLE_FUNC(UpsampleRgbLinePair_C, VP8YuvToRgb, 3) -UPSAMPLE_FUNC(UpsampleBgrLinePair_C, VP8YuvToBgr, 3) -UPSAMPLE_FUNC(UpsampleRgba4444LinePair_C, VP8YuvToRgba4444, 2) -UPSAMPLE_FUNC(UpsampleRgb565LinePair_C, VP8YuvToRgb565, 2) -#else -static void EmptyUpsampleFunc(const uint8_t* top_y, const uint8_t* bottom_y, - const uint8_t* top_u, const uint8_t* top_v, - const uint8_t* cur_u, const uint8_t* cur_v, - uint8_t* top_dst, uint8_t* bottom_dst, int len) { - (void)top_y; - (void)bottom_y; - (void)top_u; - (void)top_v; - (void)cur_u; - (void)cur_v; - (void)top_dst; - (void)bottom_dst; - (void)len; - assert(0); // COLORSPACE SUPPORT NOT COMPILED -} -#define UpsampleArgbLinePair_C EmptyUpsampleFunc -#define UpsampleRgbLinePair_C EmptyUpsampleFunc -#define UpsampleBgrLinePair_C EmptyUpsampleFunc -#define UpsampleRgba4444LinePair_C EmptyUpsampleFunc -#define UpsampleRgb565LinePair_C EmptyUpsampleFunc -#endif // WEBP_REDUCE_CSP - -#endif - -#undef LOAD_UV -#undef UPSAMPLE_FUNC - -#endif // FANCY_UPSAMPLING - -//------------------------------------------------------------------------------ - -#if !defined(FANCY_UPSAMPLING) -#define DUAL_SAMPLE_FUNC(FUNC_NAME, FUNC) \ -static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bot_y, \ - const uint8_t* top_u, const uint8_t* top_v, \ - const uint8_t* bot_u, const uint8_t* bot_v, \ - uint8_t* top_dst, uint8_t* bot_dst, int len) { \ - const int half_len = len >> 1; \ - int x; \ - assert(top_dst != NULL); \ - { \ - for (x = 0; x < half_len; ++x) { \ - FUNC(top_y[2 * x + 0], top_u[x], top_v[x], top_dst + 8 * x + 0); \ - FUNC(top_y[2 * x + 1], top_u[x], top_v[x], top_dst + 8 * x + 4); \ - } \ - if (len & 1) FUNC(top_y[2 * x + 0], top_u[x], top_v[x], top_dst + 8 * x); \ - } \ - if (bot_dst != NULL) { \ - for (x = 0; x < half_len; ++x) { \ - FUNC(bot_y[2 * x + 0], bot_u[x], bot_v[x], bot_dst + 8 * x + 0); \ - FUNC(bot_y[2 * x + 1], bot_u[x], bot_v[x], bot_dst + 8 * x + 4); \ - } \ - if (len & 1) FUNC(bot_y[2 * x + 0], bot_u[x], bot_v[x], bot_dst + 8 * x); \ - } \ -} - -DUAL_SAMPLE_FUNC(DualLineSamplerBGRA, VP8YuvToBgra) -DUAL_SAMPLE_FUNC(DualLineSamplerARGB, VP8YuvToArgb) -#undef DUAL_SAMPLE_FUNC - -#endif // !FANCY_UPSAMPLING - -WebPUpsampleLinePairFunc WebPGetLinePairConverter(int alpha_is_last) { - WebPInitUpsamplers(); -#ifdef FANCY_UPSAMPLING - return WebPUpsamplers[alpha_is_last ? MODE_BGRA : MODE_ARGB]; -#else - return (alpha_is_last ? DualLineSamplerBGRA : DualLineSamplerARGB); -#endif -} - -//------------------------------------------------------------------------------ -// YUV444 converter - -#define YUV444_FUNC(FUNC_NAME, FUNC, XSTEP) \ -extern void FUNC_NAME(const uint8_t* y, const uint8_t* u, const uint8_t* v, \ - uint8_t* dst, int len); \ -void FUNC_NAME(const uint8_t* y, const uint8_t* u, const uint8_t* v, \ - uint8_t* dst, int len) { \ - int i; \ - for (i = 0; i < len; ++i) FUNC(y[i], u[i], v[i], &dst[i * (XSTEP)]); \ -} - -YUV444_FUNC(WebPYuv444ToRgba_C, VP8YuvToRgba, 4) -YUV444_FUNC(WebPYuv444ToBgra_C, VP8YuvToBgra, 4) -#if !defined(WEBP_REDUCE_CSP) -YUV444_FUNC(WebPYuv444ToRgb_C, VP8YuvToRgb, 3) -YUV444_FUNC(WebPYuv444ToBgr_C, VP8YuvToBgr, 3) -YUV444_FUNC(WebPYuv444ToArgb_C, VP8YuvToArgb, 4) -YUV444_FUNC(WebPYuv444ToRgba4444_C, VP8YuvToRgba4444, 2) -YUV444_FUNC(WebPYuv444ToRgb565_C, VP8YuvToRgb565, 2) -#else -static void EmptyYuv444Func(const uint8_t* y, - const uint8_t* u, const uint8_t* v, - uint8_t* dst, int len) { - (void)y; - (void)u; - (void)v; - (void)dst; - (void)len; -} -#define WebPYuv444ToRgb_C EmptyYuv444Func -#define WebPYuv444ToBgr_C EmptyYuv444Func -#define WebPYuv444ToArgb_C EmptyYuv444Func -#define WebPYuv444ToRgba4444_C EmptyYuv444Func -#define WebPYuv444ToRgb565_C EmptyYuv444Func -#endif // WEBP_REDUCE_CSP - -#undef YUV444_FUNC - -WebPYUV444Converter WebPYUV444Converters[MODE_LAST]; - -extern void WebPInitYUV444ConvertersMIPSdspR2(void); -extern void WebPInitYUV444ConvertersSSE2(void); -extern void WebPInitYUV444ConvertersSSE41(void); - -WEBP_DSP_INIT_FUNC(WebPInitYUV444Converters) { - WebPYUV444Converters[MODE_RGBA] = WebPYuv444ToRgba_C; - WebPYUV444Converters[MODE_BGRA] = WebPYuv444ToBgra_C; - WebPYUV444Converters[MODE_RGB] = WebPYuv444ToRgb_C; - WebPYUV444Converters[MODE_BGR] = WebPYuv444ToBgr_C; - WebPYUV444Converters[MODE_ARGB] = WebPYuv444ToArgb_C; - WebPYUV444Converters[MODE_RGBA_4444] = WebPYuv444ToRgba4444_C; - WebPYUV444Converters[MODE_RGB_565] = WebPYuv444ToRgb565_C; - WebPYUV444Converters[MODE_rgbA] = WebPYuv444ToRgba_C; - WebPYUV444Converters[MODE_bgrA] = WebPYuv444ToBgra_C; - WebPYUV444Converters[MODE_Argb] = WebPYuv444ToArgb_C; - WebPYUV444Converters[MODE_rgbA_4444] = WebPYuv444ToRgba4444_C; - - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - WebPInitYUV444ConvertersSSE2(); - } -#endif -#if defined(WEBP_USE_SSE41) - if (VP8GetCPUInfo(kSSE4_1)) { - WebPInitYUV444ConvertersSSE41(); - } -#endif -#if defined(WEBP_USE_MIPS_DSP_R2) - if (VP8GetCPUInfo(kMIPSdspR2)) { - WebPInitYUV444ConvertersMIPSdspR2(); - } -#endif - } -} - -//------------------------------------------------------------------------------ -// Main calls - -extern void WebPInitUpsamplersSSE2(void); -extern void WebPInitUpsamplersSSE41(void); -extern void WebPInitUpsamplersNEON(void); -extern void WebPInitUpsamplersMIPSdspR2(void); -extern void WebPInitUpsamplersMSA(void); - -WEBP_DSP_INIT_FUNC(WebPInitUpsamplers) { -#ifdef FANCY_UPSAMPLING -#if !WEBP_NEON_OMIT_C_CODE - WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair_C; - WebPUpsamplers[MODE_BGRA] = UpsampleBgraLinePair_C; - WebPUpsamplers[MODE_rgbA] = UpsampleRgbaLinePair_C; - WebPUpsamplers[MODE_bgrA] = UpsampleBgraLinePair_C; - WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair_C; - WebPUpsamplers[MODE_BGR] = UpsampleBgrLinePair_C; - WebPUpsamplers[MODE_ARGB] = UpsampleArgbLinePair_C; - WebPUpsamplers[MODE_RGBA_4444] = UpsampleRgba4444LinePair_C; - WebPUpsamplers[MODE_RGB_565] = UpsampleRgb565LinePair_C; - WebPUpsamplers[MODE_Argb] = UpsampleArgbLinePair_C; - WebPUpsamplers[MODE_rgbA_4444] = UpsampleRgba4444LinePair_C; -#endif - - // If defined, use CPUInfo() to overwrite some pointers with faster versions. - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - WebPInitUpsamplersSSE2(); - } -#endif -#if defined(WEBP_USE_SSE41) - if (VP8GetCPUInfo(kSSE4_1)) { - WebPInitUpsamplersSSE41(); - } -#endif -#if defined(WEBP_USE_MIPS_DSP_R2) - if (VP8GetCPUInfo(kMIPSdspR2)) { - WebPInitUpsamplersMIPSdspR2(); - } -#endif -#if defined(WEBP_USE_MSA) - if (VP8GetCPUInfo(kMSA)) { - WebPInitUpsamplersMSA(); - } -#endif - } - -#if defined(WEBP_USE_NEON) - if (WEBP_NEON_OMIT_C_CODE || - (VP8GetCPUInfo != NULL && VP8GetCPUInfo(kNEON))) { - WebPInitUpsamplersNEON(); - } -#endif - - assert(WebPUpsamplers[MODE_RGBA] != NULL); - assert(WebPUpsamplers[MODE_BGRA] != NULL); - assert(WebPUpsamplers[MODE_rgbA] != NULL); - assert(WebPUpsamplers[MODE_bgrA] != NULL); -#if !defined(WEBP_REDUCE_CSP) || !WEBP_NEON_OMIT_C_CODE - assert(WebPUpsamplers[MODE_RGB] != NULL); - assert(WebPUpsamplers[MODE_BGR] != NULL); - assert(WebPUpsamplers[MODE_ARGB] != NULL); - assert(WebPUpsamplers[MODE_RGBA_4444] != NULL); - assert(WebPUpsamplers[MODE_RGB_565] != NULL); - assert(WebPUpsamplers[MODE_Argb] != NULL); - assert(WebPUpsamplers[MODE_rgbA_4444] != NULL); -#endif - -#endif // FANCY_UPSAMPLING -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_mips_dsp_r2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_mips_dsp_r2.c deleted file mode 100644 index bce4d3f..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_mips_dsp_r2.c +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// YUV to RGB upsampling functions. -// -// Author(s): Branimir Vasic (branimir.vasic@imgtec.com) -// Djordje Pesut (djordje.pesut@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS_DSP_R2) - -#include -#include "src/dsp/yuv.h" - -#define YUV_TO_RGB(Y, U, V, R, G, B) do { \ - const int t1 = MultHi(Y, 19077); \ - const int t2 = MultHi(V, 13320); \ - R = MultHi(V, 26149); \ - G = MultHi(U, 6419); \ - B = MultHi(U, 33050); \ - R = t1 + R; \ - G = t1 - G; \ - B = t1 + B; \ - R = R - 14234; \ - G = G - t2 + 8708; \ - B = B - 17685; \ - __asm__ volatile ( \ - "shll_s.w %[" #R "], %[" #R "], 17 \n\t" \ - "shll_s.w %[" #G "], %[" #G "], 17 \n\t" \ - "shll_s.w %[" #B "], %[" #B "], 17 \n\t" \ - "precrqu_s.qb.ph %[" #R "], %[" #R "], $zero \n\t" \ - "precrqu_s.qb.ph %[" #G "], %[" #G "], $zero \n\t" \ - "precrqu_s.qb.ph %[" #B "], %[" #B "], $zero \n\t" \ - "srl %[" #R "], %[" #R "], 24 \n\t" \ - "srl %[" #G "], %[" #G "], 24 \n\t" \ - "srl %[" #B "], %[" #B "], 24 \n\t" \ - : [R]"+r"(R), [G]"+r"(G), [B]"+r"(B) \ - : \ - ); \ - } while (0) - -#if !defined(WEBP_REDUCE_CSP) -static WEBP_INLINE void YuvToRgb(int y, int u, int v, uint8_t* const rgb) { - int r, g, b; - YUV_TO_RGB(y, u, v, r, g, b); - rgb[0] = r; - rgb[1] = g; - rgb[2] = b; -} -static WEBP_INLINE void YuvToBgr(int y, int u, int v, uint8_t* const bgr) { - int r, g, b; - YUV_TO_RGB(y, u, v, r, g, b); - bgr[0] = b; - bgr[1] = g; - bgr[2] = r; -} -static WEBP_INLINE void YuvToRgb565(int y, int u, int v, uint8_t* const rgb) { - int r, g, b; - YUV_TO_RGB(y, u, v, r, g, b); - { - const int rg = (r & 0xf8) | (g >> 5); - const int gb = ((g << 3) & 0xe0) | (b >> 3); -#if (WEBP_SWAP_16BIT_CSP == 1) - rgb[0] = gb; - rgb[1] = rg; -#else - rgb[0] = rg; - rgb[1] = gb; -#endif - } -} -static WEBP_INLINE void YuvToRgba4444(int y, int u, int v, - uint8_t* const argb) { - int r, g, b; - YUV_TO_RGB(y, u, v, r, g, b); - { - const int rg = (r & 0xf0) | (g >> 4); - const int ba = (b & 0xf0) | 0x0f; // overwrite the lower 4 bits -#if (WEBP_SWAP_16BIT_CSP == 1) - argb[0] = ba; - argb[1] = rg; -#else - argb[0] = rg; - argb[1] = ba; -#endif - } -} -#endif // WEBP_REDUCE_CSP - -//----------------------------------------------------------------------------- -// Alpha handling variants - -#if !defined(WEBP_REDUCE_CSP) -static WEBP_INLINE void YuvToArgb(uint8_t y, uint8_t u, uint8_t v, - uint8_t* const argb) { - int r, g, b; - YUV_TO_RGB(y, u, v, r, g, b); - argb[0] = 0xff; - argb[1] = r; - argb[2] = g; - argb[3] = b; -} -#endif // WEBP_REDUCE_CSP -static WEBP_INLINE void YuvToBgra(uint8_t y, uint8_t u, uint8_t v, - uint8_t* const bgra) { - int r, g, b; - YUV_TO_RGB(y, u, v, r, g, b); - bgra[0] = b; - bgra[1] = g; - bgra[2] = r; - bgra[3] = 0xff; -} -static WEBP_INLINE void YuvToRgba(uint8_t y, uint8_t u, uint8_t v, - uint8_t* const rgba) { - int r, g, b; - YUV_TO_RGB(y, u, v, r, g, b); - rgba[0] = r; - rgba[1] = g; - rgba[2] = b; - rgba[3] = 0xff; -} - -//------------------------------------------------------------------------------ -// Fancy upsampler - -#ifdef FANCY_UPSAMPLING - -// Given samples laid out in a square as: -// [a b] -// [c d] -// we interpolate u/v as: -// ([9*a + 3*b + 3*c + d 3*a + 9*b + 3*c + d] + [8 8]) / 16 -// ([3*a + b + 9*c + 3*d a + 3*b + 3*c + 9*d] [8 8]) / 16 - -// We process u and v together stashed into 32bit (16bit each). -#define LOAD_UV(u, v) ((u) | ((v) << 16)) - -#define UPSAMPLE_FUNC(FUNC_NAME, FUNC, XSTEP) \ -static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \ - const uint8_t* top_u, const uint8_t* top_v, \ - const uint8_t* cur_u, const uint8_t* cur_v, \ - uint8_t* top_dst, uint8_t* bottom_dst, int len) { \ - int x; \ - const int last_pixel_pair = (len - 1) >> 1; \ - uint32_t tl_uv = LOAD_UV(top_u[0], top_v[0]); /* top-left sample */ \ - uint32_t l_uv = LOAD_UV(cur_u[0], cur_v[0]); /* left-sample */ \ - assert(top_y != NULL); \ - { \ - const uint32_t uv0 = (3 * tl_uv + l_uv + 0x00020002u) >> 2; \ - FUNC(top_y[0], uv0 & 0xff, (uv0 >> 16), top_dst); \ - } \ - if (bottom_y != NULL) { \ - const uint32_t uv0 = (3 * l_uv + tl_uv + 0x00020002u) >> 2; \ - FUNC(bottom_y[0], uv0 & 0xff, (uv0 >> 16), bottom_dst); \ - } \ - for (x = 1; x <= last_pixel_pair; ++x) { \ - const uint32_t t_uv = LOAD_UV(top_u[x], top_v[x]); /* top sample */ \ - const uint32_t uv = LOAD_UV(cur_u[x], cur_v[x]); /* sample */ \ - /* precompute invariant values associated with first and second diagonals*/\ - const uint32_t avg = tl_uv + t_uv + l_uv + uv + 0x00080008u; \ - const uint32_t diag_12 = (avg + 2 * (t_uv + l_uv)) >> 3; \ - const uint32_t diag_03 = (avg + 2 * (tl_uv + uv)) >> 3; \ - { \ - const uint32_t uv0 = (diag_12 + tl_uv) >> 1; \ - const uint32_t uv1 = (diag_03 + t_uv) >> 1; \ - FUNC(top_y[2 * x - 1], uv0 & 0xff, (uv0 >> 16), \ - top_dst + (2 * x - 1) * XSTEP); \ - FUNC(top_y[2 * x - 0], uv1 & 0xff, (uv1 >> 16), \ - top_dst + (2 * x - 0) * XSTEP); \ - } \ - if (bottom_y != NULL) { \ - const uint32_t uv0 = (diag_03 + l_uv) >> 1; \ - const uint32_t uv1 = (diag_12 + uv) >> 1; \ - FUNC(bottom_y[2 * x - 1], uv0 & 0xff, (uv0 >> 16), \ - bottom_dst + (2 * x - 1) * XSTEP); \ - FUNC(bottom_y[2 * x + 0], uv1 & 0xff, (uv1 >> 16), \ - bottom_dst + (2 * x + 0) * XSTEP); \ - } \ - tl_uv = t_uv; \ - l_uv = uv; \ - } \ - if (!(len & 1)) { \ - { \ - const uint32_t uv0 = (3 * tl_uv + l_uv + 0x00020002u) >> 2; \ - FUNC(top_y[len - 1], uv0 & 0xff, (uv0 >> 16), \ - top_dst + (len - 1) * XSTEP); \ - } \ - if (bottom_y != NULL) { \ - const uint32_t uv0 = (3 * l_uv + tl_uv + 0x00020002u) >> 2; \ - FUNC(bottom_y[len - 1], uv0 & 0xff, (uv0 >> 16), \ - bottom_dst + (len - 1) * XSTEP); \ - } \ - } \ -} - -// All variants implemented. -UPSAMPLE_FUNC(UpsampleRgbaLinePair, YuvToRgba, 4) -UPSAMPLE_FUNC(UpsampleBgraLinePair, YuvToBgra, 4) -#if !defined(WEBP_REDUCE_CSP) -UPSAMPLE_FUNC(UpsampleRgbLinePair, YuvToRgb, 3) -UPSAMPLE_FUNC(UpsampleBgrLinePair, YuvToBgr, 3) -UPSAMPLE_FUNC(UpsampleArgbLinePair, YuvToArgb, 4) -UPSAMPLE_FUNC(UpsampleRgba4444LinePair, YuvToRgba4444, 2) -UPSAMPLE_FUNC(UpsampleRgb565LinePair, YuvToRgb565, 2) -#endif // WEBP_REDUCE_CSP - -#undef LOAD_UV -#undef UPSAMPLE_FUNC - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPInitUpsamplersMIPSdspR2(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplersMIPSdspR2(void) { - WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair; - WebPUpsamplers[MODE_BGRA] = UpsampleBgraLinePair; - WebPUpsamplers[MODE_rgbA] = UpsampleRgbaLinePair; - WebPUpsamplers[MODE_bgrA] = UpsampleBgraLinePair; -#if !defined(WEBP_REDUCE_CSP) - WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair; - WebPUpsamplers[MODE_BGR] = UpsampleBgrLinePair; - WebPUpsamplers[MODE_ARGB] = UpsampleArgbLinePair; - WebPUpsamplers[MODE_RGBA_4444] = UpsampleRgba4444LinePair; - WebPUpsamplers[MODE_RGB_565] = UpsampleRgb565LinePair; - WebPUpsamplers[MODE_Argb] = UpsampleArgbLinePair; - WebPUpsamplers[MODE_rgbA_4444] = UpsampleRgba4444LinePair; -#endif // WEBP_REDUCE_CSP -} - -#endif // FANCY_UPSAMPLING - -//------------------------------------------------------------------------------ -// YUV444 converter - -#define YUV444_FUNC(FUNC_NAME, FUNC, XSTEP) \ -static void FUNC_NAME(const uint8_t* y, const uint8_t* u, const uint8_t* v, \ - uint8_t* dst, int len) { \ - int i; \ - for (i = 0; i < len; ++i) FUNC(y[i], u[i], v[i], &dst[i * XSTEP]); \ -} - -YUV444_FUNC(Yuv444ToRgba, YuvToRgba, 4) -YUV444_FUNC(Yuv444ToBgra, YuvToBgra, 4) -#if !defined(WEBP_REDUCE_CSP) -YUV444_FUNC(Yuv444ToRgb, YuvToRgb, 3) -YUV444_FUNC(Yuv444ToBgr, YuvToBgr, 3) -YUV444_FUNC(Yuv444ToArgb, YuvToArgb, 4) -YUV444_FUNC(Yuv444ToRgba4444, YuvToRgba4444, 2) -YUV444_FUNC(Yuv444ToRgb565, YuvToRgb565, 2) -#endif // WEBP_REDUCE_CSP - -#undef YUV444_FUNC - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPInitYUV444ConvertersMIPSdspR2(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitYUV444ConvertersMIPSdspR2(void) { - WebPYUV444Converters[MODE_RGBA] = Yuv444ToRgba; - WebPYUV444Converters[MODE_BGRA] = Yuv444ToBgra; - WebPYUV444Converters[MODE_rgbA] = Yuv444ToRgba; - WebPYUV444Converters[MODE_bgrA] = Yuv444ToBgra; -#if !defined(WEBP_REDUCE_CSP) - WebPYUV444Converters[MODE_RGB] = Yuv444ToRgb; - WebPYUV444Converters[MODE_BGR] = Yuv444ToBgr; - WebPYUV444Converters[MODE_ARGB] = Yuv444ToArgb; - WebPYUV444Converters[MODE_RGBA_4444] = Yuv444ToRgba4444; - WebPYUV444Converters[MODE_RGB_565] = Yuv444ToRgb565; - WebPYUV444Converters[MODE_Argb] = Yuv444ToArgb; - WebPYUV444Converters[MODE_rgbA_4444] = Yuv444ToRgba4444; -#endif // WEBP_REDUCE_CSP -} - -#else // !WEBP_USE_MIPS_DSP_R2 - -WEBP_DSP_INIT_STUB(WebPInitYUV444ConvertersMIPSdspR2) - -#endif // WEBP_USE_MIPS_DSP_R2 - -#if !(defined(FANCY_UPSAMPLING) && defined(WEBP_USE_MIPS_DSP_R2)) -WEBP_DSP_INIT_STUB(WebPInitUpsamplersMIPSdspR2) -#endif diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_msa.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_msa.c deleted file mode 100644 index 8938acf..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_msa.c +++ /dev/null @@ -1,688 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MSA version of YUV to RGB upsampling functions. -// -// Author: Prashant Patil (prashant.patil@imgtec.com) - -#include -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MSA) - -#include "src/dsp/msa_macro.h" -#include "src/dsp/yuv.h" - -#ifdef FANCY_UPSAMPLING - -#define ILVR_UW2(in, out0, out1) do { \ - const v8i16 t0 = (v8i16)__msa_ilvr_b((v16i8)zero, (v16i8)in); \ - out0 = (v4u32)__msa_ilvr_h((v8i16)zero, t0); \ - out1 = (v4u32)__msa_ilvl_h((v8i16)zero, t0); \ -} while (0) - -#define ILVRL_UW4(in, out0, out1, out2, out3) do { \ - v16u8 t0, t1; \ - ILVRL_B2_UB(zero, in, t0, t1); \ - ILVRL_H2_UW(zero, t0, out0, out1); \ - ILVRL_H2_UW(zero, t1, out2, out3); \ -} while (0) - -#define MULTHI_16(in0, in1, in2, in3, cnst, out0, out1) do { \ - const v4i32 const0 = (v4i32)__msa_fill_w(cnst * 256); \ - v4u32 temp0, temp1, temp2, temp3; \ - MUL4(in0, const0, in1, const0, in2, const0, in3, const0, \ - temp0, temp1, temp2, temp3); \ - PCKOD_H2_UH(temp1, temp0, temp3, temp2, out0, out1); \ -} while (0) - -#define MULTHI_8(in0, in1, cnst, out0) do { \ - const v4i32 const0 = (v4i32)__msa_fill_w(cnst * 256); \ - v4u32 temp0, temp1; \ - MUL2(in0, const0, in1, const0, temp0, temp1); \ - out0 = (v8u16)__msa_pckod_h((v8i16)temp1, (v8i16)temp0); \ -} while (0) - -#define CALC_R16(y0, y1, v0, v1, dst) do { \ - const v8i16 const_a = (v8i16)__msa_fill_h(14234); \ - const v8i16 a0 = __msa_adds_s_h((v8i16)y0, (v8i16)v0); \ - const v8i16 a1 = __msa_adds_s_h((v8i16)y1, (v8i16)v1); \ - v8i16 b0 = __msa_subs_s_h(a0, const_a); \ - v8i16 b1 = __msa_subs_s_h(a1, const_a); \ - SRAI_H2_SH(b0, b1, 6); \ - CLIP_SH2_0_255(b0, b1); \ - dst = (v16u8)__msa_pckev_b((v16i8)b1, (v16i8)b0); \ -} while (0) - -#define CALC_R8(y0, v0, dst) do { \ - const v8i16 const_a = (v8i16)__msa_fill_h(14234); \ - const v8i16 a0 = __msa_adds_s_h((v8i16)y0, (v8i16)v0); \ - v8i16 b0 = __msa_subs_s_h(a0, const_a); \ - b0 = SRAI_H(b0, 6); \ - CLIP_SH_0_255(b0); \ - dst = (v16u8)__msa_pckev_b((v16i8)b0, (v16i8)b0); \ -} while (0) - -#define CALC_G16(y0, y1, u0, u1, v0, v1, dst) do { \ - const v8i16 const_a = (v8i16)__msa_fill_h(8708); \ - v8i16 a0 = __msa_subs_s_h((v8i16)y0, (v8i16)u0); \ - v8i16 a1 = __msa_subs_s_h((v8i16)y1, (v8i16)u1); \ - const v8i16 b0 = __msa_subs_s_h(a0, (v8i16)v0); \ - const v8i16 b1 = __msa_subs_s_h(a1, (v8i16)v1); \ - a0 = __msa_adds_s_h(b0, const_a); \ - a1 = __msa_adds_s_h(b1, const_a); \ - SRAI_H2_SH(a0, a1, 6); \ - CLIP_SH2_0_255(a0, a1); \ - dst = (v16u8)__msa_pckev_b((v16i8)a1, (v16i8)a0); \ -} while (0) - -#define CALC_G8(y0, u0, v0, dst) do { \ - const v8i16 const_a = (v8i16)__msa_fill_h(8708); \ - v8i16 a0 = __msa_subs_s_h((v8i16)y0, (v8i16)u0); \ - const v8i16 b0 = __msa_subs_s_h(a0, (v8i16)v0); \ - a0 = __msa_adds_s_h(b0, const_a); \ - a0 = SRAI_H(a0, 6); \ - CLIP_SH_0_255(a0); \ - dst = (v16u8)__msa_pckev_b((v16i8)a0, (v16i8)a0); \ -} while (0) - -#define CALC_B16(y0, y1, u0, u1, dst) do { \ - const v8u16 const_a = (v8u16)__msa_fill_h(17685); \ - const v8u16 a0 = __msa_adds_u_h((v8u16)y0, u0); \ - const v8u16 a1 = __msa_adds_u_h((v8u16)y1, u1); \ - v8u16 b0 = __msa_subs_u_h(a0, const_a); \ - v8u16 b1 = __msa_subs_u_h(a1, const_a); \ - SRAI_H2_UH(b0, b1, 6); \ - CLIP_UH2_0_255(b0, b1); \ - dst = (v16u8)__msa_pckev_b((v16i8)b1, (v16i8)b0); \ -} while (0) - -#define CALC_B8(y0, u0, dst) do { \ - const v8u16 const_a = (v8u16)__msa_fill_h(17685); \ - const v8u16 a0 = __msa_adds_u_h((v8u16)y0, u0); \ - v8u16 b0 = __msa_subs_u_h(a0, const_a); \ - b0 = SRAI_H(b0, 6); \ - CLIP_UH_0_255(b0); \ - dst = (v16u8)__msa_pckev_b((v16i8)b0, (v16i8)b0); \ -} while (0) - -#define CALC_RGB16(y, u, v, R, G, B) do { \ - const v16u8 zero = { 0 }; \ - v8u16 y0, y1, u0, u1, v0, v1; \ - v4u32 p0, p1, p2, p3; \ - const v16u8 in_y = LD_UB(y); \ - const v16u8 in_u = LD_UB(u); \ - const v16u8 in_v = LD_UB(v); \ - ILVRL_UW4(in_y, p0, p1, p2, p3); \ - MULTHI_16(p0, p1, p2, p3, 19077, y0, y1); \ - ILVRL_UW4(in_v, p0, p1, p2, p3); \ - MULTHI_16(p0, p1, p2, p3, 26149, v0, v1); \ - CALC_R16(y0, y1, v0, v1, R); \ - MULTHI_16(p0, p1, p2, p3, 13320, v0, v1); \ - ILVRL_UW4(in_u, p0, p1, p2, p3); \ - MULTHI_16(p0, p1, p2, p3, 6419, u0, u1); \ - CALC_G16(y0, y1, u0, u1, v0, v1, G); \ - MULTHI_16(p0, p1, p2, p3, 33050, u0, u1); \ - CALC_B16(y0, y1, u0, u1, B); \ -} while (0) - -#define CALC_RGB8(y, u, v, R, G, B) do { \ - const v16u8 zero = { 0 }; \ - v8u16 y0, u0, v0; \ - v4u32 p0, p1; \ - const v16u8 in_y = LD_UB(y); \ - const v16u8 in_u = LD_UB(u); \ - const v16u8 in_v = LD_UB(v); \ - ILVR_UW2(in_y, p0, p1); \ - MULTHI_8(p0, p1, 19077, y0); \ - ILVR_UW2(in_v, p0, p1); \ - MULTHI_8(p0, p1, 26149, v0); \ - CALC_R8(y0, v0, R); \ - MULTHI_8(p0, p1, 13320, v0); \ - ILVR_UW2(in_u, p0, p1); \ - MULTHI_8(p0, p1, 6419, u0); \ - CALC_G8(y0, u0, v0, G); \ - MULTHI_8(p0, p1, 33050, u0); \ - CALC_B8(y0, u0, B); \ -} while (0) - -#define STORE16_3(a0, a1, a2, dst) do { \ - const v16u8 mask0 = { 0, 1, 16, 2, 3, 17, 4, 5, 18, 6, 7, 19, \ - 8, 9, 20, 10 }; \ - const v16u8 mask1 = { 0, 21, 1, 2, 22, 3, 4, 23, 5, 6, 24, 7, \ - 8, 25, 9, 10 }; \ - const v16u8 mask2 = { 26, 0, 1, 27, 2, 3, 28, 4, 5, 29, 6, 7, \ - 30, 8, 9, 31 }; \ - v16u8 out0, out1, out2, tmp0, tmp1, tmp2; \ - ILVRL_B2_UB(a1, a0, tmp0, tmp1); \ - out0 = VSHF_UB(tmp0, a2, mask0); \ - tmp2 = SLDI_UB(tmp1, tmp0, 11); \ - out1 = VSHF_UB(tmp2, a2, mask1); \ - tmp2 = SLDI_UB(tmp1, tmp1, 6); \ - out2 = VSHF_UB(tmp2, a2, mask2); \ - ST_UB(out0, dst + 0); \ - ST_UB(out1, dst + 16); \ - ST_UB(out2, dst + 32); \ -} while (0) - -#define STORE8_3(a0, a1, a2, dst) do { \ - int64_t out_m; \ - const v16u8 mask0 = { 0, 1, 16, 2, 3, 17, 4, 5, 18, 6, 7, 19, \ - 8, 9, 20, 10 }; \ - const v16u8 mask1 = { 11, 21, 12, 13, 22, 14, 15, 23, \ - 255, 255, 255, 255, 255, 255, 255, 255 }; \ - const v16u8 tmp0 = (v16u8)__msa_ilvr_b((v16i8)a1, (v16i8)a0); \ - v16u8 out0, out1; \ - VSHF_B2_UB(tmp0, a2, tmp0, a2, mask0, mask1, out0, out1); \ - ST_UB(out0, dst); \ - out_m = __msa_copy_s_d((v2i64)out1, 0); \ - SD(out_m, dst + 16); \ -} while (0) - -#define STORE16_4(a0, a1, a2, a3, dst) do { \ - v16u8 tmp0, tmp1, tmp2, tmp3; \ - v16u8 out0, out1, out2, out3; \ - ILVRL_B2_UB(a1, a0, tmp0, tmp1); \ - ILVRL_B2_UB(a3, a2, tmp2, tmp3); \ - ILVRL_H2_UB(tmp2, tmp0, out0, out1); \ - ILVRL_H2_UB(tmp3, tmp1, out2, out3); \ - ST_UB(out0, dst + 0); \ - ST_UB(out1, dst + 16); \ - ST_UB(out2, dst + 32); \ - ST_UB(out3, dst + 48); \ -} while (0) - -#define STORE8_4(a0, a1, a2, a3, dst) do { \ - v16u8 tmp0, tmp1, tmp2, tmp3; \ - ILVR_B2_UB(a1, a0, a3, a2, tmp0, tmp1); \ - ILVRL_H2_UB(tmp1, tmp0, tmp2, tmp3); \ - ST_UB(tmp2, dst + 0); \ - ST_UB(tmp3, dst + 16); \ -} while (0) - -#define STORE2_16(a0, a1, dst) do { \ - v16u8 out0, out1; \ - ILVRL_B2_UB(a1, a0, out0, out1); \ - ST_UB(out0, dst + 0); \ - ST_UB(out1, dst + 16); \ -} while (0) - -#define STORE2_8(a0, a1, dst) do { \ - const v16u8 out0 = (v16u8)__msa_ilvr_b((v16i8)a1, (v16i8)a0); \ - ST_UB(out0, dst); \ -} while (0) - -#define CALC_RGBA4444(y, u, v, out0, out1, N, dst) do { \ - CALC_RGB##N(y, u, v, R, G, B); \ - tmp0 = ANDI_B(R, 0xf0); \ - tmp1 = SRAI_B(G, 4); \ - RG = tmp0 | tmp1; \ - tmp0 = ANDI_B(B, 0xf0); \ - BA = ORI_B(tmp0, 0x0f); \ - STORE2_##N(out0, out1, dst); \ -} while (0) - -#define CALC_RGB565(y, u, v, out0, out1, N, dst) do { \ - CALC_RGB##N(y, u, v, R, G, B); \ - tmp0 = ANDI_B(R, 0xf8); \ - tmp1 = SRAI_B(G, 5); \ - RG = tmp0 | tmp1; \ - tmp0 = SLLI_B(G, 3); \ - tmp1 = ANDI_B(tmp0, 0xe0); \ - tmp0 = SRAI_B(B, 3); \ - GB = tmp0 | tmp1; \ - STORE2_##N(out0, out1, dst); \ -} while (0) - -static WEBP_INLINE int Clip8(int v) { - return v < 0 ? 0 : v > 255 ? 255 : v; -} - -static void YuvToRgb(int y, int u, int v, uint8_t* const rgb) { - const int y1 = MultHi(y, 19077); - const int r1 = y1 + MultHi(v, 26149) - 14234; - const int g1 = y1 - MultHi(u, 6419) - MultHi(v, 13320) + 8708; - const int b1 = y1 + MultHi(u, 33050) - 17685; - rgb[0] = Clip8(r1 >> 6); - rgb[1] = Clip8(g1 >> 6); - rgb[2] = Clip8(b1 >> 6); -} - -static void YuvToBgr(int y, int u, int v, uint8_t* const bgr) { - const int y1 = MultHi(y, 19077); - const int r1 = y1 + MultHi(v, 26149) - 14234; - const int g1 = y1 - MultHi(u, 6419) - MultHi(v, 13320) + 8708; - const int b1 = y1 + MultHi(u, 33050) - 17685; - bgr[0] = Clip8(b1 >> 6); - bgr[1] = Clip8(g1 >> 6); - bgr[2] = Clip8(r1 >> 6); -} - -#if !defined(WEBP_REDUCE_CSP) -static void YuvToRgb565(int y, int u, int v, uint8_t* const rgb) { - const int y1 = MultHi(y, 19077); - const int r1 = y1 + MultHi(v, 26149) - 14234; - const int g1 = y1 - MultHi(u, 6419) - MultHi(v, 13320) + 8708; - const int b1 = y1 + MultHi(u, 33050) - 17685; - const int r = Clip8(r1 >> 6); - const int g = Clip8(g1 >> 6); - const int b = Clip8(b1 >> 6); - const int rg = (r & 0xf8) | (g >> 5); - const int gb = ((g << 3) & 0xe0) | (b >> 3); -#if (WEBP_SWAP_16BIT_CSP == 1) - rgb[0] = gb; - rgb[1] = rg; -#else - rgb[0] = rg; - rgb[1] = gb; -#endif -} - -static void YuvToRgba4444(int y, int u, int v, uint8_t* const argb) { - const int y1 = MultHi(y, 19077); - const int r1 = y1 + MultHi(v, 26149) - 14234; - const int g1 = y1 - MultHi(u, 6419) - MultHi(v, 13320) + 8708; - const int b1 = y1 + MultHi(u, 33050) - 17685; - const int r = Clip8(r1 >> 6); - const int g = Clip8(g1 >> 6); - const int b = Clip8(b1 >> 6); - const int rg = (r & 0xf0) | (g >> 4); - const int ba = (b & 0xf0) | 0x0f; // overwrite the lower 4 bits -#if (WEBP_SWAP_16BIT_CSP == 1) - argb[0] = ba; - argb[1] = rg; -#else - argb[0] = rg; - argb[1] = ba; -#endif -} - -static void YuvToArgb(uint8_t y, uint8_t u, uint8_t v, uint8_t* const argb) { - argb[0] = 0xff; - YuvToRgb(y, u, v, argb + 1); -} -#endif // WEBP_REDUCE_CSP - -static void YuvToBgra(uint8_t y, uint8_t u, uint8_t v, uint8_t* const bgra) { - YuvToBgr(y, u, v, bgra); - bgra[3] = 0xff; -} - -static void YuvToRgba(uint8_t y, uint8_t u, uint8_t v, uint8_t* const rgba) { - YuvToRgb(y, u, v, rgba); - rgba[3] = 0xff; -} - -#if !defined(WEBP_REDUCE_CSP) -static void YuvToRgbLine(const uint8_t* y, const uint8_t* u, - const uint8_t* v, uint8_t* dst, int length) { - v16u8 R, G, B; - while (length >= 16) { - CALC_RGB16(y, u, v, R, G, B); - STORE16_3(R, G, B, dst); - y += 16; - u += 16; - v += 16; - dst += 16 * 3; - length -= 16; - } - if (length > 8) { - uint8_t temp[3 * 16] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); - CALC_RGB16(temp, u, v, R, G, B); - STORE16_3(R, G, B, temp); - memcpy(dst, temp, length * 3 * sizeof(*dst)); - } else if (length > 0) { - uint8_t temp[3 * 8] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); - CALC_RGB8(temp, u, v, R, G, B); - STORE8_3(R, G, B, temp); - memcpy(dst, temp, length * 3 * sizeof(*dst)); - } -} - -static void YuvToBgrLine(const uint8_t* y, const uint8_t* u, - const uint8_t* v, uint8_t* dst, int length) { - v16u8 R, G, B; - while (length >= 16) { - CALC_RGB16(y, u, v, R, G, B); - STORE16_3(B, G, R, dst); - y += 16; - u += 16; - v += 16; - dst += 16 * 3; - length -= 16; - } - if (length > 8) { - uint8_t temp[3 * 16] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); - CALC_RGB16(temp, u, v, R, G, B); - STORE16_3(B, G, R, temp); - memcpy(dst, temp, length * 3 * sizeof(*dst)); - } else if (length > 0) { - uint8_t temp[3 * 8] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); - CALC_RGB8(temp, u, v, R, G, B); - STORE8_3(B, G, R, temp); - memcpy(dst, temp, length * 3 * sizeof(*dst)); - } -} -#endif // WEBP_REDUCE_CSP - -static void YuvToRgbaLine(const uint8_t* y, const uint8_t* u, - const uint8_t* v, uint8_t* dst, int length) { - v16u8 R, G, B; - const v16u8 A = (v16u8)__msa_ldi_b(ALPHAVAL); - while (length >= 16) { - CALC_RGB16(y, u, v, R, G, B); - STORE16_4(R, G, B, A, dst); - y += 16; - u += 16; - v += 16; - dst += 16 * 4; - length -= 16; - } - if (length > 8) { - uint8_t temp[4 * 16] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); - CALC_RGB16(&temp[0], u, v, R, G, B); - STORE16_4(R, G, B, A, temp); - memcpy(dst, temp, length * 4 * sizeof(*dst)); - } else if (length > 0) { - uint8_t temp[4 * 8] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); - CALC_RGB8(temp, u, v, R, G, B); - STORE8_4(R, G, B, A, temp); - memcpy(dst, temp, length * 4 * sizeof(*dst)); - } -} - -static void YuvToBgraLine(const uint8_t* y, const uint8_t* u, - const uint8_t* v, uint8_t* dst, int length) { - v16u8 R, G, B; - const v16u8 A = (v16u8)__msa_ldi_b(ALPHAVAL); - while (length >= 16) { - CALC_RGB16(y, u, v, R, G, B); - STORE16_4(B, G, R, A, dst); - y += 16; - u += 16; - v += 16; - dst += 16 * 4; - length -= 16; - } - if (length > 8) { - uint8_t temp[4 * 16] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); - CALC_RGB16(temp, u, v, R, G, B); - STORE16_4(B, G, R, A, temp); - memcpy(dst, temp, length * 4 * sizeof(*dst)); - } else if (length > 0) { - uint8_t temp[4 * 8] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); - CALC_RGB8(temp, u, v, R, G, B); - STORE8_4(B, G, R, A, temp); - memcpy(dst, temp, length * 4 * sizeof(*dst)); - } -} - -#if !defined(WEBP_REDUCE_CSP) -static void YuvToArgbLine(const uint8_t* y, const uint8_t* u, - const uint8_t* v, uint8_t* dst, int length) { - v16u8 R, G, B; - const v16u8 A = (v16u8)__msa_ldi_b(ALPHAVAL); - while (length >= 16) { - CALC_RGB16(y, u, v, R, G, B); - STORE16_4(A, R, G, B, dst); - y += 16; - u += 16; - v += 16; - dst += 16 * 4; - length -= 16; - } - if (length > 8) { - uint8_t temp[4 * 16] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); - CALC_RGB16(temp, u, v, R, G, B); - STORE16_4(A, R, G, B, temp); - memcpy(dst, temp, length * 4 * sizeof(*dst)); - } else if (length > 0) { - uint8_t temp[4 * 8] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); - CALC_RGB8(temp, u, v, R, G, B); - STORE8_4(A, R, G, B, temp); - memcpy(dst, temp, length * 4 * sizeof(*dst)); - } -} - -static void YuvToRgba4444Line(const uint8_t* y, const uint8_t* u, - const uint8_t* v, uint8_t* dst, int length) { - v16u8 R, G, B, RG, BA, tmp0, tmp1; - while (length >= 16) { -#if (WEBP_SWAP_16BIT_CSP == 1) - CALC_RGBA4444(y, u, v, BA, RG, 16, dst); -#else - CALC_RGBA4444(y, u, v, RG, BA, 16, dst); -#endif - y += 16; - u += 16; - v += 16; - dst += 16 * 2; - length -= 16; - } - if (length > 8) { - uint8_t temp[2 * 16] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); -#if (WEBP_SWAP_16BIT_CSP == 1) - CALC_RGBA4444(temp, u, v, BA, RG, 16, temp); -#else - CALC_RGBA4444(temp, u, v, RG, BA, 16, temp); -#endif - memcpy(dst, temp, length * 2 * sizeof(*dst)); - } else if (length > 0) { - uint8_t temp[2 * 8] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); -#if (WEBP_SWAP_16BIT_CSP == 1) - CALC_RGBA4444(temp, u, v, BA, RG, 8, temp); -#else - CALC_RGBA4444(temp, u, v, RG, BA, 8, temp); -#endif - memcpy(dst, temp, length * 2 * sizeof(*dst)); - } -} - -static void YuvToRgb565Line(const uint8_t* y, const uint8_t* u, - const uint8_t* v, uint8_t* dst, int length) { - v16u8 R, G, B, RG, GB, tmp0, tmp1; - while (length >= 16) { -#if (WEBP_SWAP_16BIT_CSP == 1) - CALC_RGB565(y, u, v, GB, RG, 16, dst); -#else - CALC_RGB565(y, u, v, RG, GB, 16, dst); -#endif - y += 16; - u += 16; - v += 16; - dst += 16 * 2; - length -= 16; - } - if (length > 8) { - uint8_t temp[2 * 16] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); -#if (WEBP_SWAP_16BIT_CSP == 1) - CALC_RGB565(temp, u, v, GB, RG, 16, temp); -#else - CALC_RGB565(temp, u, v, RG, GB, 16, temp); -#endif - memcpy(dst, temp, length * 2 * sizeof(*dst)); - } else if (length > 0) { - uint8_t temp[2 * 8] = { 0 }; - memcpy(temp, y, length * sizeof(*temp)); -#if (WEBP_SWAP_16BIT_CSP == 1) - CALC_RGB565(temp, u, v, GB, RG, 8, temp); -#else - CALC_RGB565(temp, u, v, RG, GB, 8, temp); -#endif - memcpy(dst, temp, length * 2 * sizeof(*dst)); - } -} -#endif // WEBP_REDUCE_CSP - -#define UPSAMPLE_32PIXELS(a, b, c, d) do { \ - v16u8 s = __msa_aver_u_b(a, d); \ - v16u8 t = __msa_aver_u_b(b, c); \ - const v16u8 st = s ^ t; \ - v16u8 ad = a ^ d; \ - v16u8 bc = b ^ c; \ - v16u8 t0 = ad | bc; \ - v16u8 t1 = t0 | st; \ - v16u8 t2 = ANDI_B(t1, 1); \ - v16u8 t3 = __msa_aver_u_b(s, t); \ - const v16u8 k = t3 - t2; \ - v16u8 diag1, diag2; \ - AVER_UB2_UB(t, k, s, k, t0, t1); \ - bc = bc & st; \ - ad = ad & st; \ - t = t ^ k; \ - s = s ^ k; \ - t2 = bc | t; \ - t3 = ad | s; \ - t2 = ANDI_B(t2, 1); \ - t3 = ANDI_B(t3, 1); \ - SUB2(t0, t2, t1, t3, diag1, diag2); \ - AVER_UB2_UB(a, diag1, b, diag2, t0, t1); \ - ILVRL_B2_UB(t1, t0, a, b); \ - if (pbot_y != NULL) { \ - AVER_UB2_UB(c, diag2, d, diag1, t0, t1); \ - ILVRL_B2_UB(t1, t0, c, d); \ - } \ -} while (0) - -#define UPSAMPLE_FUNC(FUNC_NAME, FUNC, XSTEP) \ -static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bot_y, \ - const uint8_t* top_u, const uint8_t* top_v, \ - const uint8_t* cur_u, const uint8_t* cur_v, \ - uint8_t* top_dst, uint8_t* bot_dst, int len) \ -{ \ - int size = (len - 1) >> 1; \ - uint8_t temp_u[64]; \ - uint8_t temp_v[64]; \ - const uint32_t tl_uv = ((top_u[0]) | ((top_v[0]) << 16)); \ - const uint32_t l_uv = ((cur_u[0]) | ((cur_v[0]) << 16)); \ - const uint32_t uv0 = (3 * tl_uv + l_uv + 0x00020002u) >> 2; \ - const uint8_t* ptop_y = &top_y[1]; \ - uint8_t *ptop_dst = top_dst + XSTEP; \ - const uint8_t* pbot_y = &bot_y[1]; \ - uint8_t *pbot_dst = bot_dst + XSTEP; \ - \ - FUNC(top_y[0], uv0 & 0xff, (uv0 >> 16), top_dst); \ - if (bot_y != NULL) { \ - const uint32_t uv1 = (3 * l_uv + tl_uv + 0x00020002u) >> 2; \ - FUNC(bot_y[0], uv1 & 0xff, (uv1 >> 16), bot_dst); \ - } \ - while (size >= 16) { \ - v16u8 tu0, tu1, tv0, tv1, cu0, cu1, cv0, cv1; \ - LD_UB2(top_u, 1, tu0, tu1); \ - LD_UB2(cur_u, 1, cu0, cu1); \ - LD_UB2(top_v, 1, tv0, tv1); \ - LD_UB2(cur_v, 1, cv0, cv1); \ - UPSAMPLE_32PIXELS(tu0, tu1, cu0, cu1); \ - UPSAMPLE_32PIXELS(tv0, tv1, cv0, cv1); \ - ST_UB4(tu0, tu1, cu0, cu1, &temp_u[0], 16); \ - ST_UB4(tv0, tv1, cv0, cv1, &temp_v[0], 16); \ - FUNC##Line(ptop_y, &temp_u[ 0], &temp_v[0], ptop_dst, 32); \ - if (bot_y != NULL) { \ - FUNC##Line(pbot_y, &temp_u[32], &temp_v[32], pbot_dst, 32); \ - } \ - ptop_y += 32; \ - pbot_y += 32; \ - ptop_dst += XSTEP * 32; \ - pbot_dst += XSTEP * 32; \ - top_u += 16; \ - top_v += 16; \ - cur_u += 16; \ - cur_v += 16; \ - size -= 16; \ - } \ - if (size > 0) { \ - v16u8 tu0, tu1, tv0, tv1, cu0, cu1, cv0, cv1; \ - memcpy(&temp_u[ 0], top_u, 17 * sizeof(uint8_t)); \ - memcpy(&temp_u[32], cur_u, 17 * sizeof(uint8_t)); \ - memcpy(&temp_v[ 0], top_v, 17 * sizeof(uint8_t)); \ - memcpy(&temp_v[32], cur_v, 17 * sizeof(uint8_t)); \ - LD_UB2(&temp_u[ 0], 1, tu0, tu1); \ - LD_UB2(&temp_u[32], 1, cu0, cu1); \ - LD_UB2(&temp_v[ 0], 1, tv0, tv1); \ - LD_UB2(&temp_v[32], 1, cv0, cv1); \ - UPSAMPLE_32PIXELS(tu0, tu1, cu0, cu1); \ - UPSAMPLE_32PIXELS(tv0, tv1, cv0, cv1); \ - ST_UB4(tu0, tu1, cu0, cu1, &temp_u[0], 16); \ - ST_UB4(tv0, tv1, cv0, cv1, &temp_v[0], 16); \ - FUNC##Line(ptop_y, &temp_u[ 0], &temp_v[0], ptop_dst, size * 2); \ - if (bot_y != NULL) { \ - FUNC##Line(pbot_y, &temp_u[32], &temp_v[32], pbot_dst, size * 2); \ - } \ - top_u += size; \ - top_v += size; \ - cur_u += size; \ - cur_v += size; \ - } \ - if (!(len & 1)) { \ - const uint32_t t0 = ((top_u[0]) | ((top_v[0]) << 16)); \ - const uint32_t c0 = ((cur_u[0]) | ((cur_v[0]) << 16)); \ - const uint32_t tmp0 = (3 * t0 + c0 + 0x00020002u) >> 2; \ - FUNC(top_y[len - 1], tmp0 & 0xff, (tmp0 >> 16), \ - top_dst + (len - 1) * XSTEP); \ - if (bot_y != NULL) { \ - const uint32_t tmp1 = (3 * c0 + t0 + 0x00020002u) >> 2; \ - FUNC(bot_y[len - 1], tmp1 & 0xff, (tmp1 >> 16), \ - bot_dst + (len - 1) * XSTEP); \ - } \ - } \ -} - -UPSAMPLE_FUNC(UpsampleRgbaLinePair, YuvToRgba, 4) -UPSAMPLE_FUNC(UpsampleBgraLinePair, YuvToBgra, 4) -#if !defined(WEBP_REDUCE_CSP) -UPSAMPLE_FUNC(UpsampleRgbLinePair, YuvToRgb, 3) -UPSAMPLE_FUNC(UpsampleBgrLinePair, YuvToBgr, 3) -UPSAMPLE_FUNC(UpsampleArgbLinePair, YuvToArgb, 4) -UPSAMPLE_FUNC(UpsampleRgba4444LinePair, YuvToRgba4444, 2) -UPSAMPLE_FUNC(UpsampleRgb565LinePair, YuvToRgb565, 2) -#endif // WEBP_REDUCE_CSP - -//------------------------------------------------------------------------------ -// Entry point - -extern WebPUpsampleLinePairFunc WebPUpsamplers[/* MODE_LAST */]; - -extern void WebPInitUpsamplersMSA(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplersMSA(void) { - WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair; - WebPUpsamplers[MODE_BGRA] = UpsampleBgraLinePair; - WebPUpsamplers[MODE_rgbA] = UpsampleRgbaLinePair; - WebPUpsamplers[MODE_bgrA] = UpsampleBgraLinePair; -#if !defined(WEBP_REDUCE_CSP) - WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair; - WebPUpsamplers[MODE_BGR] = UpsampleBgrLinePair; - WebPUpsamplers[MODE_ARGB] = UpsampleArgbLinePair; - WebPUpsamplers[MODE_Argb] = UpsampleArgbLinePair; - WebPUpsamplers[MODE_RGB_565] = UpsampleRgb565LinePair; - WebPUpsamplers[MODE_RGBA_4444] = UpsampleRgba4444LinePair; - WebPUpsamplers[MODE_rgbA_4444] = UpsampleRgba4444LinePair; -#endif // WEBP_REDUCE_CSP -} - -#endif // FANCY_UPSAMPLING - -#endif // WEBP_USE_MSA - -#if !(defined(FANCY_UPSAMPLING) && defined(WEBP_USE_MSA)) -WEBP_DSP_INIT_STUB(WebPInitUpsamplersMSA) -#endif diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_neon.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_neon.c deleted file mode 100644 index 90f09ea..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_neon.c +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// NEON version of YUV to RGB upsampling functions. -// -// Author: mans@mansr.com (Mans Rullgard) -// Based on SSE code by: somnath@google.com (Somnath Banerjee) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_NEON) - -#include -#include -#include -#include "src/dsp/neon.h" -#include "src/dsp/yuv.h" - -#ifdef FANCY_UPSAMPLING - -//----------------------------------------------------------------------------- -// U/V upsampling - -// Loads 9 pixels each from rows r1 and r2 and generates 16 pixels. -#define UPSAMPLE_16PIXELS(r1, r2, out) do { \ - const uint8x8_t a = vld1_u8(r1 + 0); \ - const uint8x8_t b = vld1_u8(r1 + 1); \ - const uint8x8_t c = vld1_u8(r2 + 0); \ - const uint8x8_t d = vld1_u8(r2 + 1); \ - /* a + b + c + d */ \ - const uint16x8_t ad = vaddl_u8(a, d); \ - const uint16x8_t bc = vaddl_u8(b, c); \ - const uint16x8_t abcd = vaddq_u16(ad, bc); \ - /* 3a + b + c + 3d */ \ - const uint16x8_t al = vaddq_u16(abcd, vshlq_n_u16(ad, 1)); \ - /* a + 3b + 3c + d */ \ - const uint16x8_t bl = vaddq_u16(abcd, vshlq_n_u16(bc, 1)); \ - \ - const uint8x8_t diag2 = vshrn_n_u16(al, 3); \ - const uint8x8_t diag1 = vshrn_n_u16(bl, 3); \ - \ - const uint8x8_t A = vrhadd_u8(a, diag1); \ - const uint8x8_t B = vrhadd_u8(b, diag2); \ - const uint8x8_t C = vrhadd_u8(c, diag2); \ - const uint8x8_t D = vrhadd_u8(d, diag1); \ - \ - uint8x8x2_t A_B, C_D; \ - INIT_VECTOR2(A_B, A, B); \ - INIT_VECTOR2(C_D, C, D); \ - vst2_u8(out + 0, A_B); \ - vst2_u8(out + 32, C_D); \ -} while (0) - -// Turn the macro into a function for reducing code-size when non-critical -static void Upsample16Pixels_NEON(const uint8_t *r1, const uint8_t *r2, - uint8_t *out) { - UPSAMPLE_16PIXELS(r1, r2, out); -} - -#define UPSAMPLE_LAST_BLOCK(tb, bb, num_pixels, out) { \ - uint8_t r1[9], r2[9]; \ - memcpy(r1, (tb), (num_pixels)); \ - memcpy(r2, (bb), (num_pixels)); \ - /* replicate last byte */ \ - memset(r1 + (num_pixels), r1[(num_pixels) - 1], 9 - (num_pixels)); \ - memset(r2 + (num_pixels), r2[(num_pixels) - 1], 9 - (num_pixels)); \ - Upsample16Pixels_NEON(r1, r2, out); \ -} - -//----------------------------------------------------------------------------- -// YUV->RGB conversion - -// note: we represent the 33050 large constant as 32768 + 282 -static const int16_t kCoeffs1[4] = { 19077, 26149, 6419, 13320 }; - -#define v255 vdup_n_u8(255) - -#define STORE_Rgb(out, r, g, b) do { \ - uint8x8x3_t r_g_b; \ - INIT_VECTOR3(r_g_b, r, g, b); \ - vst3_u8(out, r_g_b); \ -} while (0) - -#define STORE_Bgr(out, r, g, b) do { \ - uint8x8x3_t b_g_r; \ - INIT_VECTOR3(b_g_r, b, g, r); \ - vst3_u8(out, b_g_r); \ -} while (0) - -#define STORE_Rgba(out, r, g, b) do { \ - uint8x8x4_t r_g_b_v255; \ - INIT_VECTOR4(r_g_b_v255, r, g, b, v255); \ - vst4_u8(out, r_g_b_v255); \ -} while (0) - -#define STORE_Bgra(out, r, g, b) do { \ - uint8x8x4_t b_g_r_v255; \ - INIT_VECTOR4(b_g_r_v255, b, g, r, v255); \ - vst4_u8(out, b_g_r_v255); \ -} while (0) - -#define STORE_Argb(out, r, g, b) do { \ - uint8x8x4_t v255_r_g_b; \ - INIT_VECTOR4(v255_r_g_b, v255, r, g, b); \ - vst4_u8(out, v255_r_g_b); \ -} while (0) - -#if !defined(WEBP_SWAP_16BIT_CSP) -#define ZIP_U8(lo, hi) vzip_u8((lo), (hi)) -#else -#define ZIP_U8(lo, hi) vzip_u8((hi), (lo)) -#endif - -#define STORE_Rgba4444(out, r, g, b) do { \ - const uint8x8_t rg = vsri_n_u8(r, g, 4); /* shift g, insert r */ \ - const uint8x8_t ba = vsri_n_u8(b, v255, 4); /* shift a, insert b */ \ - const uint8x8x2_t rgba4444 = ZIP_U8(rg, ba); \ - vst1q_u8(out, vcombine_u8(rgba4444.val[0], rgba4444.val[1])); \ -} while (0) - -#define STORE_Rgb565(out, r, g, b) do { \ - const uint8x8_t rg = vsri_n_u8(r, g, 5); /* shift g and insert r */ \ - const uint8x8_t g1 = vshl_n_u8(g, 3); /* pre-shift g: 3bits */ \ - const uint8x8_t gb = vsri_n_u8(g1, b, 3); /* shift b and insert g */ \ - const uint8x8x2_t rgb565 = ZIP_U8(rg, gb); \ - vst1q_u8(out, vcombine_u8(rgb565.val[0], rgb565.val[1])); \ -} while (0) - -#define CONVERT8(FMT, XSTEP, N, src_y, src_uv, out, cur_x) do { \ - int i; \ - for (i = 0; i < N; i += 8) { \ - const int off = ((cur_x) + i) * XSTEP; \ - const uint8x8_t y = vld1_u8((src_y) + (cur_x) + i); \ - const uint8x8_t u = vld1_u8((src_uv) + i + 0); \ - const uint8x8_t v = vld1_u8((src_uv) + i + 16); \ - const int16x8_t Y0 = vreinterpretq_s16_u16(vshll_n_u8(y, 7)); \ - const int16x8_t U0 = vreinterpretq_s16_u16(vshll_n_u8(u, 7)); \ - const int16x8_t V0 = vreinterpretq_s16_u16(vshll_n_u8(v, 7)); \ - const int16x8_t Y1 = vqdmulhq_lane_s16(Y0, coeff1, 0); \ - const int16x8_t R0 = vqdmulhq_lane_s16(V0, coeff1, 1); \ - const int16x8_t G0 = vqdmulhq_lane_s16(U0, coeff1, 2); \ - const int16x8_t G1 = vqdmulhq_lane_s16(V0, coeff1, 3); \ - const int16x8_t B0 = vqdmulhq_n_s16(U0, 282); \ - const int16x8_t R1 = vqaddq_s16(Y1, R_Rounder); \ - const int16x8_t G2 = vqaddq_s16(Y1, G_Rounder); \ - const int16x8_t B1 = vqaddq_s16(Y1, B_Rounder); \ - const int16x8_t R2 = vqaddq_s16(R0, R1); \ - const int16x8_t G3 = vqaddq_s16(G0, G1); \ - const int16x8_t B2 = vqaddq_s16(B0, B1); \ - const int16x8_t G4 = vqsubq_s16(G2, G3); \ - const int16x8_t B3 = vqaddq_s16(B2, U0); \ - const uint8x8_t R = vqshrun_n_s16(R2, YUV_FIX2); \ - const uint8x8_t G = vqshrun_n_s16(G4, YUV_FIX2); \ - const uint8x8_t B = vqshrun_n_s16(B3, YUV_FIX2); \ - STORE_ ## FMT(out + off, R, G, B); \ - } \ -} while (0) - -#define CONVERT1(FUNC, XSTEP, N, src_y, src_uv, rgb, cur_x) { \ - int i; \ - for (i = 0; i < N; i++) { \ - const int off = ((cur_x) + i) * XSTEP; \ - const int y = src_y[(cur_x) + i]; \ - const int u = (src_uv)[i]; \ - const int v = (src_uv)[i + 16]; \ - FUNC(y, u, v, rgb + off); \ - } \ -} - -#define CONVERT2RGB_8(FMT, XSTEP, top_y, bottom_y, uv, \ - top_dst, bottom_dst, cur_x, len) { \ - CONVERT8(FMT, XSTEP, len, top_y, uv, top_dst, cur_x); \ - if (bottom_y != NULL) { \ - CONVERT8(FMT, XSTEP, len, bottom_y, (uv) + 32, bottom_dst, cur_x); \ - } \ -} - -#define CONVERT2RGB_1(FUNC, XSTEP, top_y, bottom_y, uv, \ - top_dst, bottom_dst, cur_x, len) { \ - CONVERT1(FUNC, XSTEP, len, top_y, uv, top_dst, cur_x); \ - if (bottom_y != NULL) { \ - CONVERT1(FUNC, XSTEP, len, bottom_y, (uv) + 32, bottom_dst, cur_x); \ - } \ -} - -#define NEON_UPSAMPLE_FUNC(FUNC_NAME, FMT, XSTEP) \ -static void FUNC_NAME(const uint8_t *top_y, const uint8_t *bottom_y, \ - const uint8_t *top_u, const uint8_t *top_v, \ - const uint8_t *cur_u, const uint8_t *cur_v, \ - uint8_t *top_dst, uint8_t *bottom_dst, int len) { \ - int block; \ - /* 16 byte aligned array to cache reconstructed u and v */ \ - uint8_t uv_buf[2 * 32 + 15]; \ - uint8_t *const r_uv = (uint8_t*)((uintptr_t)(uv_buf + 15) & ~15); \ - const int uv_len = (len + 1) >> 1; \ - /* 9 pixels must be read-able for each block */ \ - const int num_blocks = (uv_len - 1) >> 3; \ - const int leftover = uv_len - num_blocks * 8; \ - const int last_pos = 1 + 16 * num_blocks; \ - \ - const int u_diag = ((top_u[0] + cur_u[0]) >> 1) + 1; \ - const int v_diag = ((top_v[0] + cur_v[0]) >> 1) + 1; \ - \ - const int16x4_t coeff1 = vld1_s16(kCoeffs1); \ - const int16x8_t R_Rounder = vdupq_n_s16(-14234); \ - const int16x8_t G_Rounder = vdupq_n_s16(8708); \ - const int16x8_t B_Rounder = vdupq_n_s16(-17685); \ - \ - /* Treat the first pixel in regular way */ \ - assert(top_y != NULL); \ - { \ - const int u0 = (top_u[0] + u_diag) >> 1; \ - const int v0 = (top_v[0] + v_diag) >> 1; \ - VP8YuvTo ## FMT(top_y[0], u0, v0, top_dst); \ - } \ - if (bottom_y != NULL) { \ - const int u0 = (cur_u[0] + u_diag) >> 1; \ - const int v0 = (cur_v[0] + v_diag) >> 1; \ - VP8YuvTo ## FMT(bottom_y[0], u0, v0, bottom_dst); \ - } \ - \ - for (block = 0; block < num_blocks; ++block) { \ - UPSAMPLE_16PIXELS(top_u, cur_u, r_uv); \ - UPSAMPLE_16PIXELS(top_v, cur_v, r_uv + 16); \ - CONVERT2RGB_8(FMT, XSTEP, top_y, bottom_y, r_uv, \ - top_dst, bottom_dst, 16 * block + 1, 16); \ - top_u += 8; \ - cur_u += 8; \ - top_v += 8; \ - cur_v += 8; \ - } \ - \ - UPSAMPLE_LAST_BLOCK(top_u, cur_u, leftover, r_uv); \ - UPSAMPLE_LAST_BLOCK(top_v, cur_v, leftover, r_uv + 16); \ - CONVERT2RGB_1(VP8YuvTo ## FMT, XSTEP, top_y, bottom_y, r_uv, \ - top_dst, bottom_dst, last_pos, len - last_pos); \ -} - -// NEON variants of the fancy upsampler. -NEON_UPSAMPLE_FUNC(UpsampleRgbaLinePair_NEON, Rgba, 4) -NEON_UPSAMPLE_FUNC(UpsampleBgraLinePair_NEON, Bgra, 4) -#if !defined(WEBP_REDUCE_CSP) -NEON_UPSAMPLE_FUNC(UpsampleRgbLinePair_NEON, Rgb, 3) -NEON_UPSAMPLE_FUNC(UpsampleBgrLinePair_NEON, Bgr, 3) -NEON_UPSAMPLE_FUNC(UpsampleArgbLinePair_NEON, Argb, 4) -NEON_UPSAMPLE_FUNC(UpsampleRgba4444LinePair_NEON, Rgba4444, 2) -NEON_UPSAMPLE_FUNC(UpsampleRgb565LinePair_NEON, Rgb565, 2) -#endif // WEBP_REDUCE_CSP - -//------------------------------------------------------------------------------ -// Entry point - -extern WebPUpsampleLinePairFunc WebPUpsamplers[/* MODE_LAST */]; - -extern void WebPInitUpsamplersNEON(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplersNEON(void) { - WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair_NEON; - WebPUpsamplers[MODE_BGRA] = UpsampleBgraLinePair_NEON; - WebPUpsamplers[MODE_rgbA] = UpsampleRgbaLinePair_NEON; - WebPUpsamplers[MODE_bgrA] = UpsampleBgraLinePair_NEON; -#if !defined(WEBP_REDUCE_CSP) - WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair_NEON; - WebPUpsamplers[MODE_BGR] = UpsampleBgrLinePair_NEON; - WebPUpsamplers[MODE_ARGB] = UpsampleArgbLinePair_NEON; - WebPUpsamplers[MODE_Argb] = UpsampleArgbLinePair_NEON; - WebPUpsamplers[MODE_RGB_565] = UpsampleRgb565LinePair_NEON; - WebPUpsamplers[MODE_RGBA_4444] = UpsampleRgba4444LinePair_NEON; - WebPUpsamplers[MODE_rgbA_4444] = UpsampleRgba4444LinePair_NEON; -#endif // WEBP_REDUCE_CSP -} - -#endif // FANCY_UPSAMPLING - -#endif // WEBP_USE_NEON - -#if !(defined(FANCY_UPSAMPLING) && defined(WEBP_USE_NEON)) -WEBP_DSP_INIT_STUB(WebPInitUpsamplersNEON) -#endif diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_sse2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_sse2.c deleted file mode 100644 index 974bbec..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_sse2.c +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE2 version of YUV to RGB upsampling functions. -// -// Author: somnath@google.com (Somnath Banerjee) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE2) - -#include -#include -#include -#include "src/dsp/yuv.h" - -#ifdef FANCY_UPSAMPLING - -// We compute (9*a + 3*b + 3*c + d + 8) / 16 as follows -// u = (9*a + 3*b + 3*c + d + 8) / 16 -// = (a + (a + 3*b + 3*c + d) / 8 + 1) / 2 -// = (a + m + 1) / 2 -// where m = (a + 3*b + 3*c + d) / 8 -// = ((a + b + c + d) / 2 + b + c) / 4 -// -// Let's say k = (a + b + c + d) / 4. -// We can compute k as -// k = (s + t + 1) / 2 - ((a^d) | (b^c) | (s^t)) & 1 -// where s = (a + d + 1) / 2 and t = (b + c + 1) / 2 -// -// Then m can be written as -// m = (k + t + 1) / 2 - (((b^c) & (s^t)) | (k^t)) & 1 - -// Computes out = (k + in + 1) / 2 - ((ij & (s^t)) | (k^in)) & 1 -#define GET_M(ij, in, out) do { \ - const __m128i tmp0 = _mm_avg_epu8(k, (in)); /* (k + in + 1) / 2 */ \ - const __m128i tmp1 = _mm_and_si128((ij), st); /* (ij) & (s^t) */ \ - const __m128i tmp2 = _mm_xor_si128(k, (in)); /* (k^in) */ \ - const __m128i tmp3 = _mm_or_si128(tmp1, tmp2); /* ((ij) & (s^t)) | (k^in) */\ - const __m128i tmp4 = _mm_and_si128(tmp3, one); /* & 1 -> lsb_correction */ \ - (out) = _mm_sub_epi8(tmp0, tmp4); /* (k + in + 1) / 2 - lsb_correction */ \ -} while (0) - -// pack and store two alternating pixel rows -#define PACK_AND_STORE(a, b, da, db, out) do { \ - const __m128i t_a = _mm_avg_epu8(a, da); /* (9a + 3b + 3c + d + 8) / 16 */ \ - const __m128i t_b = _mm_avg_epu8(b, db); /* (3a + 9b + c + 3d + 8) / 16 */ \ - const __m128i t_1 = _mm_unpacklo_epi8(t_a, t_b); \ - const __m128i t_2 = _mm_unpackhi_epi8(t_a, t_b); \ - _mm_store_si128(((__m128i*)(out)) + 0, t_1); \ - _mm_store_si128(((__m128i*)(out)) + 1, t_2); \ -} while (0) - -// Loads 17 pixels each from rows r1 and r2 and generates 32 pixels. -#define UPSAMPLE_32PIXELS(r1, r2, out) { \ - const __m128i one = _mm_set1_epi8(1); \ - const __m128i a = _mm_loadu_si128((const __m128i*)&(r1)[0]); \ - const __m128i b = _mm_loadu_si128((const __m128i*)&(r1)[1]); \ - const __m128i c = _mm_loadu_si128((const __m128i*)&(r2)[0]); \ - const __m128i d = _mm_loadu_si128((const __m128i*)&(r2)[1]); \ - \ - const __m128i s = _mm_avg_epu8(a, d); /* s = (a + d + 1) / 2 */ \ - const __m128i t = _mm_avg_epu8(b, c); /* t = (b + c + 1) / 2 */ \ - const __m128i st = _mm_xor_si128(s, t); /* st = s^t */ \ - \ - const __m128i ad = _mm_xor_si128(a, d); /* ad = a^d */ \ - const __m128i bc = _mm_xor_si128(b, c); /* bc = b^c */ \ - \ - const __m128i t1 = _mm_or_si128(ad, bc); /* (a^d) | (b^c) */ \ - const __m128i t2 = _mm_or_si128(t1, st); /* (a^d) | (b^c) | (s^t) */ \ - const __m128i t3 = _mm_and_si128(t2, one); /* (a^d) | (b^c) | (s^t) & 1 */ \ - const __m128i t4 = _mm_avg_epu8(s, t); \ - const __m128i k = _mm_sub_epi8(t4, t3); /* k = (a + b + c + d) / 4 */ \ - __m128i diag1, diag2; \ - \ - GET_M(bc, t, diag1); /* diag1 = (a + 3b + 3c + d) / 8 */ \ - GET_M(ad, s, diag2); /* diag2 = (3a + b + c + 3d) / 8 */ \ - \ - /* pack the alternate pixels */ \ - PACK_AND_STORE(a, b, diag1, diag2, (out) + 0); /* store top */ \ - PACK_AND_STORE(c, d, diag2, diag1, (out) + 2 * 32); /* store bottom */ \ -} - -// Turn the macro into a function for reducing code-size when non-critical -static void Upsample32Pixels_SSE2(const uint8_t r1[], const uint8_t r2[], - uint8_t* const out) { - UPSAMPLE_32PIXELS(r1, r2, out); -} - -#define UPSAMPLE_LAST_BLOCK(tb, bb, num_pixels, out) { \ - uint8_t r1[17], r2[17]; \ - memcpy(r1, (tb), (num_pixels)); \ - memcpy(r2, (bb), (num_pixels)); \ - /* replicate last byte */ \ - memset(r1 + (num_pixels), r1[(num_pixels) - 1], 17 - (num_pixels)); \ - memset(r2 + (num_pixels), r2[(num_pixels) - 1], 17 - (num_pixels)); \ - /* using the shared function instead of the macro saves ~3k code size */ \ - Upsample32Pixels_SSE2(r1, r2, out); \ -} - -#define CONVERT2RGB_32(FUNC, XSTEP, top_y, bottom_y, \ - top_dst, bottom_dst, cur_x) do { \ - FUNC##32_SSE2((top_y) + (cur_x), r_u, r_v, (top_dst) + (cur_x) * (XSTEP)); \ - if ((bottom_y) != NULL) { \ - FUNC##32_SSE2((bottom_y) + (cur_x), r_u + 64, r_v + 64, \ - (bottom_dst) + (cur_x) * (XSTEP)); \ - } \ -} while (0) - -#define SSE2_UPSAMPLE_FUNC(FUNC_NAME, FUNC, XSTEP) \ -static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \ - const uint8_t* top_u, const uint8_t* top_v, \ - const uint8_t* cur_u, const uint8_t* cur_v, \ - uint8_t* top_dst, uint8_t* bottom_dst, int len) { \ - int uv_pos, pos; \ - /* 16byte-aligned array to cache reconstructed u and v */ \ - uint8_t uv_buf[14 * 32 + 15] = { 0 }; \ - uint8_t* const r_u = (uint8_t*)((uintptr_t)(uv_buf + 15) & ~15); \ - uint8_t* const r_v = r_u + 32; \ - \ - assert(top_y != NULL); \ - { /* Treat the first pixel in regular way */ \ - const int u_diag = ((top_u[0] + cur_u[0]) >> 1) + 1; \ - const int v_diag = ((top_v[0] + cur_v[0]) >> 1) + 1; \ - const int u0_t = (top_u[0] + u_diag) >> 1; \ - const int v0_t = (top_v[0] + v_diag) >> 1; \ - FUNC(top_y[0], u0_t, v0_t, top_dst); \ - if (bottom_y != NULL) { \ - const int u0_b = (cur_u[0] + u_diag) >> 1; \ - const int v0_b = (cur_v[0] + v_diag) >> 1; \ - FUNC(bottom_y[0], u0_b, v0_b, bottom_dst); \ - } \ - } \ - /* For UPSAMPLE_32PIXELS, 17 u/v values must be read-able for each block */ \ - for (pos = 1, uv_pos = 0; pos + 32 + 1 <= len; pos += 32, uv_pos += 16) { \ - UPSAMPLE_32PIXELS(top_u + uv_pos, cur_u + uv_pos, r_u); \ - UPSAMPLE_32PIXELS(top_v + uv_pos, cur_v + uv_pos, r_v); \ - CONVERT2RGB_32(FUNC, XSTEP, top_y, bottom_y, top_dst, bottom_dst, pos); \ - } \ - if (len > 1) { \ - const int left_over = ((len + 1) >> 1) - (pos >> 1); \ - uint8_t* const tmp_top_dst = r_u + 4 * 32; \ - uint8_t* const tmp_bottom_dst = tmp_top_dst + 4 * 32; \ - uint8_t* const tmp_top = tmp_bottom_dst + 4 * 32; \ - uint8_t* const tmp_bottom = (bottom_y == NULL) ? NULL : tmp_top + 32; \ - assert(left_over > 0); \ - UPSAMPLE_LAST_BLOCK(top_u + uv_pos, cur_u + uv_pos, left_over, r_u); \ - UPSAMPLE_LAST_BLOCK(top_v + uv_pos, cur_v + uv_pos, left_over, r_v); \ - memcpy(tmp_top, top_y + pos, len - pos); \ - if (bottom_y != NULL) memcpy(tmp_bottom, bottom_y + pos, len - pos); \ - CONVERT2RGB_32(FUNC, XSTEP, tmp_top, tmp_bottom, tmp_top_dst, \ - tmp_bottom_dst, 0); \ - memcpy(top_dst + pos * (XSTEP), tmp_top_dst, (len - pos) * (XSTEP)); \ - if (bottom_y != NULL) { \ - memcpy(bottom_dst + pos * (XSTEP), tmp_bottom_dst, \ - (len - pos) * (XSTEP)); \ - } \ - } \ -} - -// SSE2 variants of the fancy upsampler. -SSE2_UPSAMPLE_FUNC(UpsampleRgbaLinePair_SSE2, VP8YuvToRgba, 4) -SSE2_UPSAMPLE_FUNC(UpsampleBgraLinePair_SSE2, VP8YuvToBgra, 4) - -#if !defined(WEBP_REDUCE_CSP) -SSE2_UPSAMPLE_FUNC(UpsampleRgbLinePair_SSE2, VP8YuvToRgb, 3) -SSE2_UPSAMPLE_FUNC(UpsampleBgrLinePair_SSE2, VP8YuvToBgr, 3) -SSE2_UPSAMPLE_FUNC(UpsampleArgbLinePair_SSE2, VP8YuvToArgb, 4) -SSE2_UPSAMPLE_FUNC(UpsampleRgba4444LinePair_SSE2, VP8YuvToRgba4444, 2) -SSE2_UPSAMPLE_FUNC(UpsampleRgb565LinePair_SSE2, VP8YuvToRgb565, 2) -#endif // WEBP_REDUCE_CSP - -#undef GET_M -#undef PACK_AND_STORE -#undef UPSAMPLE_32PIXELS -#undef UPSAMPLE_LAST_BLOCK -#undef CONVERT2RGB -#undef CONVERT2RGB_32 -#undef SSE2_UPSAMPLE_FUNC - -//------------------------------------------------------------------------------ -// Entry point - -extern WebPUpsampleLinePairFunc WebPUpsamplers[/* MODE_LAST */]; - -extern void WebPInitUpsamplersSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplersSSE2(void) { - WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair_SSE2; - WebPUpsamplers[MODE_BGRA] = UpsampleBgraLinePair_SSE2; - WebPUpsamplers[MODE_rgbA] = UpsampleRgbaLinePair_SSE2; - WebPUpsamplers[MODE_bgrA] = UpsampleBgraLinePair_SSE2; -#if !defined(WEBP_REDUCE_CSP) - WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair_SSE2; - WebPUpsamplers[MODE_BGR] = UpsampleBgrLinePair_SSE2; - WebPUpsamplers[MODE_ARGB] = UpsampleArgbLinePair_SSE2; - WebPUpsamplers[MODE_Argb] = UpsampleArgbLinePair_SSE2; - WebPUpsamplers[MODE_RGB_565] = UpsampleRgb565LinePair_SSE2; - WebPUpsamplers[MODE_RGBA_4444] = UpsampleRgba4444LinePair_SSE2; - WebPUpsamplers[MODE_rgbA_4444] = UpsampleRgba4444LinePair_SSE2; -#endif // WEBP_REDUCE_CSP -} - -#endif // FANCY_UPSAMPLING - -//------------------------------------------------------------------------------ - -extern WebPYUV444Converter WebPYUV444Converters[/* MODE_LAST */]; -extern void WebPInitYUV444ConvertersSSE2(void); - -#define YUV444_FUNC(FUNC_NAME, CALL, CALL_C, XSTEP) \ -extern void CALL_C(const uint8_t* y, const uint8_t* u, const uint8_t* v, \ - uint8_t* dst, int len); \ -static void FUNC_NAME(const uint8_t* y, const uint8_t* u, const uint8_t* v, \ - uint8_t* dst, int len) { \ - int i; \ - const int max_len = len & ~31; \ - for (i = 0; i < max_len; i += 32) { \ - CALL(y + i, u + i, v + i, dst + i * (XSTEP)); \ - } \ - if (i < len) { /* C-fallback */ \ - CALL_C(y + i, u + i, v + i, dst + i * (XSTEP), len - i); \ - } \ -} - -YUV444_FUNC(Yuv444ToRgba_SSE2, VP8YuvToRgba32_SSE2, WebPYuv444ToRgba_C, 4); -YUV444_FUNC(Yuv444ToBgra_SSE2, VP8YuvToBgra32_SSE2, WebPYuv444ToBgra_C, 4); -#if !defined(WEBP_REDUCE_CSP) -YUV444_FUNC(Yuv444ToRgb_SSE2, VP8YuvToRgb32_SSE2, WebPYuv444ToRgb_C, 3); -YUV444_FUNC(Yuv444ToBgr_SSE2, VP8YuvToBgr32_SSE2, WebPYuv444ToBgr_C, 3); -YUV444_FUNC(Yuv444ToArgb_SSE2, VP8YuvToArgb32_SSE2, WebPYuv444ToArgb_C, 4) -YUV444_FUNC(Yuv444ToRgba4444_SSE2, VP8YuvToRgba444432_SSE2, \ - WebPYuv444ToRgba4444_C, 2) -YUV444_FUNC(Yuv444ToRgb565_SSE2, VP8YuvToRgb56532_SSE2, WebPYuv444ToRgb565_C, 2) -#endif // WEBP_REDUCE_CSP - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitYUV444ConvertersSSE2(void) { - WebPYUV444Converters[MODE_RGBA] = Yuv444ToRgba_SSE2; - WebPYUV444Converters[MODE_BGRA] = Yuv444ToBgra_SSE2; - WebPYUV444Converters[MODE_rgbA] = Yuv444ToRgba_SSE2; - WebPYUV444Converters[MODE_bgrA] = Yuv444ToBgra_SSE2; -#if !defined(WEBP_REDUCE_CSP) - WebPYUV444Converters[MODE_RGB] = Yuv444ToRgb_SSE2; - WebPYUV444Converters[MODE_BGR] = Yuv444ToBgr_SSE2; - WebPYUV444Converters[MODE_ARGB] = Yuv444ToArgb_SSE2; - WebPYUV444Converters[MODE_RGBA_4444] = Yuv444ToRgba4444_SSE2; - WebPYUV444Converters[MODE_RGB_565] = Yuv444ToRgb565_SSE2; - WebPYUV444Converters[MODE_Argb] = Yuv444ToArgb_SSE2; - WebPYUV444Converters[MODE_rgbA_4444] = Yuv444ToRgba4444_SSE2; -#endif // WEBP_REDUCE_CSP -} - -#else - -WEBP_DSP_INIT_STUB(WebPInitYUV444ConvertersSSE2) - -#endif // WEBP_USE_SSE2 - -#if !(defined(FANCY_UPSAMPLING) && defined(WEBP_USE_SSE2)) -WEBP_DSP_INIT_STUB(WebPInitUpsamplersSSE2) -#endif diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_sse41.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_sse41.c deleted file mode 100644 index 9f974c9..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/upsampling_sse41.c +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// SSE41 version of YUV to RGB upsampling functions. -// -// Author: somnath@google.com (Somnath Banerjee) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_SSE41) - -#include -#include -#include -#include "src/dsp/yuv.h" - -#ifdef FANCY_UPSAMPLING - -#if !defined(WEBP_REDUCE_CSP) - -// We compute (9*a + 3*b + 3*c + d + 8) / 16 as follows -// u = (9*a + 3*b + 3*c + d + 8) / 16 -// = (a + (a + 3*b + 3*c + d) / 8 + 1) / 2 -// = (a + m + 1) / 2 -// where m = (a + 3*b + 3*c + d) / 8 -// = ((a + b + c + d) / 2 + b + c) / 4 -// -// Let's say k = (a + b + c + d) / 4. -// We can compute k as -// k = (s + t + 1) / 2 - ((a^d) | (b^c) | (s^t)) & 1 -// where s = (a + d + 1) / 2 and t = (b + c + 1) / 2 -// -// Then m can be written as -// m = (k + t + 1) / 2 - (((b^c) & (s^t)) | (k^t)) & 1 - -// Computes out = (k + in + 1) / 2 - ((ij & (s^t)) | (k^in)) & 1 -#define GET_M(ij, in, out) do { \ - const __m128i tmp0 = _mm_avg_epu8(k, (in)); /* (k + in + 1) / 2 */ \ - const __m128i tmp1 = _mm_and_si128((ij), st); /* (ij) & (s^t) */ \ - const __m128i tmp2 = _mm_xor_si128(k, (in)); /* (k^in) */ \ - const __m128i tmp3 = _mm_or_si128(tmp1, tmp2); /* ((ij) & (s^t)) | (k^in) */\ - const __m128i tmp4 = _mm_and_si128(tmp3, one); /* & 1 -> lsb_correction */ \ - (out) = _mm_sub_epi8(tmp0, tmp4); /* (k + in + 1) / 2 - lsb_correction */ \ -} while (0) - -// pack and store two alternating pixel rows -#define PACK_AND_STORE(a, b, da, db, out) do { \ - const __m128i t_a = _mm_avg_epu8(a, da); /* (9a + 3b + 3c + d + 8) / 16 */ \ - const __m128i t_b = _mm_avg_epu8(b, db); /* (3a + 9b + c + 3d + 8) / 16 */ \ - const __m128i t_1 = _mm_unpacklo_epi8(t_a, t_b); \ - const __m128i t_2 = _mm_unpackhi_epi8(t_a, t_b); \ - _mm_store_si128(((__m128i*)(out)) + 0, t_1); \ - _mm_store_si128(((__m128i*)(out)) + 1, t_2); \ -} while (0) - -// Loads 17 pixels each from rows r1 and r2 and generates 32 pixels. -#define UPSAMPLE_32PIXELS(r1, r2, out) { \ - const __m128i one = _mm_set1_epi8(1); \ - const __m128i a = _mm_loadu_si128((const __m128i*)&(r1)[0]); \ - const __m128i b = _mm_loadu_si128((const __m128i*)&(r1)[1]); \ - const __m128i c = _mm_loadu_si128((const __m128i*)&(r2)[0]); \ - const __m128i d = _mm_loadu_si128((const __m128i*)&(r2)[1]); \ - \ - const __m128i s = _mm_avg_epu8(a, d); /* s = (a + d + 1) / 2 */ \ - const __m128i t = _mm_avg_epu8(b, c); /* t = (b + c + 1) / 2 */ \ - const __m128i st = _mm_xor_si128(s, t); /* st = s^t */ \ - \ - const __m128i ad = _mm_xor_si128(a, d); /* ad = a^d */ \ - const __m128i bc = _mm_xor_si128(b, c); /* bc = b^c */ \ - \ - const __m128i t1 = _mm_or_si128(ad, bc); /* (a^d) | (b^c) */ \ - const __m128i t2 = _mm_or_si128(t1, st); /* (a^d) | (b^c) | (s^t) */ \ - const __m128i t3 = _mm_and_si128(t2, one); /* (a^d) | (b^c) | (s^t) & 1 */ \ - const __m128i t4 = _mm_avg_epu8(s, t); \ - const __m128i k = _mm_sub_epi8(t4, t3); /* k = (a + b + c + d) / 4 */ \ - __m128i diag1, diag2; \ - \ - GET_M(bc, t, diag1); /* diag1 = (a + 3b + 3c + d) / 8 */ \ - GET_M(ad, s, diag2); /* diag2 = (3a + b + c + 3d) / 8 */ \ - \ - /* pack the alternate pixels */ \ - PACK_AND_STORE(a, b, diag1, diag2, (out) + 0); /* store top */ \ - PACK_AND_STORE(c, d, diag2, diag1, (out) + 2 * 32); /* store bottom */ \ -} - -// Turn the macro into a function for reducing code-size when non-critical -static void Upsample32Pixels_SSE41(const uint8_t r1[], const uint8_t r2[], - uint8_t* const out) { - UPSAMPLE_32PIXELS(r1, r2, out); -} - -#define UPSAMPLE_LAST_BLOCK(tb, bb, num_pixels, out) { \ - uint8_t r1[17], r2[17]; \ - memcpy(r1, (tb), (num_pixels)); \ - memcpy(r2, (bb), (num_pixels)); \ - /* replicate last byte */ \ - memset(r1 + (num_pixels), r1[(num_pixels) - 1], 17 - (num_pixels)); \ - memset(r2 + (num_pixels), r2[(num_pixels) - 1], 17 - (num_pixels)); \ - /* using the shared function instead of the macro saves ~3k code size */ \ - Upsample32Pixels_SSE41(r1, r2, out); \ -} - -#define CONVERT2RGB_32(FUNC, XSTEP, top_y, bottom_y, \ - top_dst, bottom_dst, cur_x) do { \ - FUNC##32_SSE41((top_y) + (cur_x), r_u, r_v, (top_dst) + (cur_x) * (XSTEP)); \ - if ((bottom_y) != NULL) { \ - FUNC##32_SSE41((bottom_y) + (cur_x), r_u + 64, r_v + 64, \ - (bottom_dst) + (cur_x) * (XSTEP)); \ - } \ -} while (0) - -#define SSE4_UPSAMPLE_FUNC(FUNC_NAME, FUNC, XSTEP) \ -static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \ - const uint8_t* top_u, const uint8_t* top_v, \ - const uint8_t* cur_u, const uint8_t* cur_v, \ - uint8_t* top_dst, uint8_t* bottom_dst, int len) { \ - int uv_pos, pos; \ - /* 16byte-aligned array to cache reconstructed u and v */ \ - uint8_t uv_buf[14 * 32 + 15] = { 0 }; \ - uint8_t* const r_u = (uint8_t*)((uintptr_t)(uv_buf + 15) & ~15); \ - uint8_t* const r_v = r_u + 32; \ - \ - assert(top_y != NULL); \ - { /* Treat the first pixel in regular way */ \ - const int u_diag = ((top_u[0] + cur_u[0]) >> 1) + 1; \ - const int v_diag = ((top_v[0] + cur_v[0]) >> 1) + 1; \ - const int u0_t = (top_u[0] + u_diag) >> 1; \ - const int v0_t = (top_v[0] + v_diag) >> 1; \ - FUNC(top_y[0], u0_t, v0_t, top_dst); \ - if (bottom_y != NULL) { \ - const int u0_b = (cur_u[0] + u_diag) >> 1; \ - const int v0_b = (cur_v[0] + v_diag) >> 1; \ - FUNC(bottom_y[0], u0_b, v0_b, bottom_dst); \ - } \ - } \ - /* For UPSAMPLE_32PIXELS, 17 u/v values must be read-able for each block */ \ - for (pos = 1, uv_pos = 0; pos + 32 + 1 <= len; pos += 32, uv_pos += 16) { \ - UPSAMPLE_32PIXELS(top_u + uv_pos, cur_u + uv_pos, r_u); \ - UPSAMPLE_32PIXELS(top_v + uv_pos, cur_v + uv_pos, r_v); \ - CONVERT2RGB_32(FUNC, XSTEP, top_y, bottom_y, top_dst, bottom_dst, pos); \ - } \ - if (len > 1) { \ - const int left_over = ((len + 1) >> 1) - (pos >> 1); \ - uint8_t* const tmp_top_dst = r_u + 4 * 32; \ - uint8_t* const tmp_bottom_dst = tmp_top_dst + 4 * 32; \ - uint8_t* const tmp_top = tmp_bottom_dst + 4 * 32; \ - uint8_t* const tmp_bottom = (bottom_y == NULL) ? NULL : tmp_top + 32; \ - assert(left_over > 0); \ - UPSAMPLE_LAST_BLOCK(top_u + uv_pos, cur_u + uv_pos, left_over, r_u); \ - UPSAMPLE_LAST_BLOCK(top_v + uv_pos, cur_v + uv_pos, left_over, r_v); \ - memcpy(tmp_top, top_y + pos, len - pos); \ - if (bottom_y != NULL) memcpy(tmp_bottom, bottom_y + pos, len - pos); \ - CONVERT2RGB_32(FUNC, XSTEP, tmp_top, tmp_bottom, tmp_top_dst, \ - tmp_bottom_dst, 0); \ - memcpy(top_dst + pos * (XSTEP), tmp_top_dst, (len - pos) * (XSTEP)); \ - if (bottom_y != NULL) { \ - memcpy(bottom_dst + pos * (XSTEP), tmp_bottom_dst, \ - (len - pos) * (XSTEP)); \ - } \ - } \ -} - -// SSE4 variants of the fancy upsampler. -SSE4_UPSAMPLE_FUNC(UpsampleRgbLinePair_SSE41, VP8YuvToRgb, 3) -SSE4_UPSAMPLE_FUNC(UpsampleBgrLinePair_SSE41, VP8YuvToBgr, 3) - -#undef GET_M -#undef PACK_AND_STORE -#undef UPSAMPLE_32PIXELS -#undef UPSAMPLE_LAST_BLOCK -#undef CONVERT2RGB -#undef CONVERT2RGB_32 -#undef SSE4_UPSAMPLE_FUNC - -#endif // WEBP_REDUCE_CSP - -//------------------------------------------------------------------------------ -// Entry point - -extern WebPUpsampleLinePairFunc WebPUpsamplers[/* MODE_LAST */]; - -extern void WebPInitUpsamplersSSE41(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplersSSE41(void) { -#if !defined(WEBP_REDUCE_CSP) - WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair_SSE41; - WebPUpsamplers[MODE_BGR] = UpsampleBgrLinePair_SSE41; -#endif // WEBP_REDUCE_CSP -} - -#endif // FANCY_UPSAMPLING - -//------------------------------------------------------------------------------ - -extern WebPYUV444Converter WebPYUV444Converters[/* MODE_LAST */]; -extern void WebPInitYUV444ConvertersSSE41(void); - -#define YUV444_FUNC(FUNC_NAME, CALL, CALL_C, XSTEP) \ -extern void CALL_C(const uint8_t* y, const uint8_t* u, const uint8_t* v, \ - uint8_t* dst, int len); \ -static void FUNC_NAME(const uint8_t* y, const uint8_t* u, const uint8_t* v, \ - uint8_t* dst, int len) { \ - int i; \ - const int max_len = len & ~31; \ - for (i = 0; i < max_len; i += 32) { \ - CALL(y + i, u + i, v + i, dst + i * (XSTEP)); \ - } \ - if (i < len) { /* C-fallback */ \ - CALL_C(y + i, u + i, v + i, dst + i * (XSTEP), len - i); \ - } \ -} - -#if !defined(WEBP_REDUCE_CSP) -YUV444_FUNC(Yuv444ToRgb_SSE41, VP8YuvToRgb32_SSE41, WebPYuv444ToRgb_C, 3); -YUV444_FUNC(Yuv444ToBgr_SSE41, VP8YuvToBgr32_SSE41, WebPYuv444ToBgr_C, 3); -#endif // WEBP_REDUCE_CSP - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitYUV444ConvertersSSE41(void) { -#if !defined(WEBP_REDUCE_CSP) - WebPYUV444Converters[MODE_RGB] = Yuv444ToRgb_SSE41; - WebPYUV444Converters[MODE_BGR] = Yuv444ToBgr_SSE41; -#endif // WEBP_REDUCE_CSP -} - -#else - -WEBP_DSP_INIT_STUB(WebPInitYUV444ConvertersSSE41) - -#endif // WEBP_USE_SSE41 - -#if !(defined(FANCY_UPSAMPLING) && defined(WEBP_USE_SSE41)) -WEBP_DSP_INIT_STUB(WebPInitUpsamplersSSE41) -#endif diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv.c deleted file mode 100644 index 39ecc74..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv.c +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// YUV->RGB conversion functions -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/yuv.h" - -#include -#include - -//----------------------------------------------------------------------------- -// Plain-C version - -#define ROW_FUNC(FUNC_NAME, FUNC, XSTEP) \ -static void FUNC_NAME(const uint8_t* y, \ - const uint8_t* u, const uint8_t* v, \ - uint8_t* dst, int len) { \ - const uint8_t* const end = dst + (len & ~1) * (XSTEP); \ - while (dst != end) { \ - FUNC(y[0], u[0], v[0], dst); \ - FUNC(y[1], u[0], v[0], dst + (XSTEP)); \ - y += 2; \ - ++u; \ - ++v; \ - dst += 2 * (XSTEP); \ - } \ - if (len & 1) { \ - FUNC(y[0], u[0], v[0], dst); \ - } \ -} \ - -// All variants implemented. -ROW_FUNC(YuvToRgbRow, VP8YuvToRgb, 3) -ROW_FUNC(YuvToBgrRow, VP8YuvToBgr, 3) -ROW_FUNC(YuvToRgbaRow, VP8YuvToRgba, 4) -ROW_FUNC(YuvToBgraRow, VP8YuvToBgra, 4) -ROW_FUNC(YuvToArgbRow, VP8YuvToArgb, 4) -ROW_FUNC(YuvToRgba4444Row, VP8YuvToRgba4444, 2) -ROW_FUNC(YuvToRgb565Row, VP8YuvToRgb565, 2) - -#undef ROW_FUNC - -// Main call for processing a plane with a WebPSamplerRowFunc function: -void WebPSamplerProcessPlane(const uint8_t* y, int y_stride, - const uint8_t* u, const uint8_t* v, int uv_stride, - uint8_t* dst, int dst_stride, - int width, int height, WebPSamplerRowFunc func) { - int j; - for (j = 0; j < height; ++j) { - func(y, u, v, dst, width); - y += y_stride; - if (j & 1) { - u += uv_stride; - v += uv_stride; - } - dst += dst_stride; - } -} - -//----------------------------------------------------------------------------- -// Main call - -WebPSamplerRowFunc WebPSamplers[MODE_LAST]; - -extern void WebPInitSamplersSSE2(void); -extern void WebPInitSamplersSSE41(void); -extern void WebPInitSamplersMIPS32(void); -extern void WebPInitSamplersMIPSdspR2(void); - -WEBP_DSP_INIT_FUNC(WebPInitSamplers) { - WebPSamplers[MODE_RGB] = YuvToRgbRow; - WebPSamplers[MODE_RGBA] = YuvToRgbaRow; - WebPSamplers[MODE_BGR] = YuvToBgrRow; - WebPSamplers[MODE_BGRA] = YuvToBgraRow; - WebPSamplers[MODE_ARGB] = YuvToArgbRow; - WebPSamplers[MODE_RGBA_4444] = YuvToRgba4444Row; - WebPSamplers[MODE_RGB_565] = YuvToRgb565Row; - WebPSamplers[MODE_rgbA] = YuvToRgbaRow; - WebPSamplers[MODE_bgrA] = YuvToBgraRow; - WebPSamplers[MODE_Argb] = YuvToArgbRow; - WebPSamplers[MODE_rgbA_4444] = YuvToRgba4444Row; - - // If defined, use CPUInfo() to overwrite some pointers with faster versions. - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - WebPInitSamplersSSE2(); - } -#endif // WEBP_USE_SSE2 -#if defined(WEBP_USE_SSE41) - if (VP8GetCPUInfo(kSSE4_1)) { - WebPInitSamplersSSE41(); - } -#endif // WEBP_USE_SSE41 -#if defined(WEBP_USE_MIPS32) - if (VP8GetCPUInfo(kMIPS32)) { - WebPInitSamplersMIPS32(); - } -#endif // WEBP_USE_MIPS32 -#if defined(WEBP_USE_MIPS_DSP_R2) - if (VP8GetCPUInfo(kMIPSdspR2)) { - WebPInitSamplersMIPSdspR2(); - } -#endif // WEBP_USE_MIPS_DSP_R2 - } -} - -//----------------------------------------------------------------------------- -// ARGB -> YUV converters - -static void ConvertARGBToY_C(const uint32_t* argb, uint8_t* y, int width) { - int i; - for (i = 0; i < width; ++i) { - const uint32_t p = argb[i]; - y[i] = VP8RGBToY((p >> 16) & 0xff, (p >> 8) & 0xff, (p >> 0) & 0xff, - YUV_HALF); - } -} - -void WebPConvertARGBToUV_C(const uint32_t* argb, uint8_t* u, uint8_t* v, - int src_width, int do_store) { - // No rounding. Last pixel is dealt with separately. - const int uv_width = src_width >> 1; - int i; - for (i = 0; i < uv_width; ++i) { - const uint32_t v0 = argb[2 * i + 0]; - const uint32_t v1 = argb[2 * i + 1]; - // VP8RGBToU/V expects four accumulated pixels. Hence we need to - // scale r/g/b value by a factor 2. We just shift v0/v1 one bit less. - const int r = ((v0 >> 15) & 0x1fe) + ((v1 >> 15) & 0x1fe); - const int g = ((v0 >> 7) & 0x1fe) + ((v1 >> 7) & 0x1fe); - const int b = ((v0 << 1) & 0x1fe) + ((v1 << 1) & 0x1fe); - const int tmp_u = VP8RGBToU(r, g, b, YUV_HALF << 2); - const int tmp_v = VP8RGBToV(r, g, b, YUV_HALF << 2); - if (do_store) { - u[i] = tmp_u; - v[i] = tmp_v; - } else { - // Approximated average-of-four. But it's an acceptable diff. - u[i] = (u[i] + tmp_u + 1) >> 1; - v[i] = (v[i] + tmp_v + 1) >> 1; - } - } - if (src_width & 1) { // last pixel - const uint32_t v0 = argb[2 * i + 0]; - const int r = (v0 >> 14) & 0x3fc; - const int g = (v0 >> 6) & 0x3fc; - const int b = (v0 << 2) & 0x3fc; - const int tmp_u = VP8RGBToU(r, g, b, YUV_HALF << 2); - const int tmp_v = VP8RGBToV(r, g, b, YUV_HALF << 2); - if (do_store) { - u[i] = tmp_u; - v[i] = tmp_v; - } else { - u[i] = (u[i] + tmp_u + 1) >> 1; - v[i] = (v[i] + tmp_v + 1) >> 1; - } - } -} - -//----------------------------------------------------------------------------- - -static void ConvertRGB24ToY_C(const uint8_t* rgb, uint8_t* y, int width) { - int i; - for (i = 0; i < width; ++i, rgb += 3) { - y[i] = VP8RGBToY(rgb[0], rgb[1], rgb[2], YUV_HALF); - } -} - -static void ConvertBGR24ToY_C(const uint8_t* bgr, uint8_t* y, int width) { - int i; - for (i = 0; i < width; ++i, bgr += 3) { - y[i] = VP8RGBToY(bgr[2], bgr[1], bgr[0], YUV_HALF); - } -} - -void WebPConvertRGBA32ToUV_C(const uint16_t* rgb, - uint8_t* u, uint8_t* v, int width) { - int i; - for (i = 0; i < width; i += 1, rgb += 4) { - const int r = rgb[0], g = rgb[1], b = rgb[2]; - u[i] = VP8RGBToU(r, g, b, YUV_HALF << 2); - v[i] = VP8RGBToV(r, g, b, YUV_HALF << 2); - } -} - -//----------------------------------------------------------------------------- - -#if !WEBP_NEON_OMIT_C_CODE -#define MAX_Y ((1 << 10) - 1) // 10b precision over 16b-arithmetic -static uint16_t clip_y(int v) { - return (v < 0) ? 0 : (v > MAX_Y) ? MAX_Y : (uint16_t)v; -} - -static uint64_t SharpYUVUpdateY_C(const uint16_t* ref, const uint16_t* src, - uint16_t* dst, int len) { - uint64_t diff = 0; - int i; - for (i = 0; i < len; ++i) { - const int diff_y = ref[i] - src[i]; - const int new_y = (int)dst[i] + diff_y; - dst[i] = clip_y(new_y); - diff += (uint64_t)abs(diff_y); - } - return diff; -} - -static void SharpYUVUpdateRGB_C(const int16_t* ref, const int16_t* src, - int16_t* dst, int len) { - int i; - for (i = 0; i < len; ++i) { - const int diff_uv = ref[i] - src[i]; - dst[i] += diff_uv; - } -} - -static void SharpYUVFilterRow_C(const int16_t* A, const int16_t* B, int len, - const uint16_t* best_y, uint16_t* out) { - int i; - for (i = 0; i < len; ++i, ++A, ++B) { - const int v0 = (A[0] * 9 + A[1] * 3 + B[0] * 3 + B[1] + 8) >> 4; - const int v1 = (A[1] * 9 + A[0] * 3 + B[1] * 3 + B[0] + 8) >> 4; - out[2 * i + 0] = clip_y(best_y[2 * i + 0] + v0); - out[2 * i + 1] = clip_y(best_y[2 * i + 1] + v1); - } -} -#endif // !WEBP_NEON_OMIT_C_CODE - -#undef MAX_Y - -//----------------------------------------------------------------------------- - -void (*WebPConvertRGB24ToY)(const uint8_t* rgb, uint8_t* y, int width); -void (*WebPConvertBGR24ToY)(const uint8_t* bgr, uint8_t* y, int width); -void (*WebPConvertRGBA32ToUV)(const uint16_t* rgb, - uint8_t* u, uint8_t* v, int width); - -void (*WebPConvertARGBToY)(const uint32_t* argb, uint8_t* y, int width); -void (*WebPConvertARGBToUV)(const uint32_t* argb, uint8_t* u, uint8_t* v, - int src_width, int do_store); - -uint64_t (*WebPSharpYUVUpdateY)(const uint16_t* ref, const uint16_t* src, - uint16_t* dst, int len); -void (*WebPSharpYUVUpdateRGB)(const int16_t* ref, const int16_t* src, - int16_t* dst, int len); -void (*WebPSharpYUVFilterRow)(const int16_t* A, const int16_t* B, int len, - const uint16_t* best_y, uint16_t* out); - -extern void WebPInitConvertARGBToYUVSSE2(void); -extern void WebPInitConvertARGBToYUVSSE41(void); -extern void WebPInitConvertARGBToYUVNEON(void); -extern void WebPInitSharpYUVSSE2(void); -extern void WebPInitSharpYUVNEON(void); - -WEBP_DSP_INIT_FUNC(WebPInitConvertARGBToYUV) { - WebPConvertARGBToY = ConvertARGBToY_C; - WebPConvertARGBToUV = WebPConvertARGBToUV_C; - - WebPConvertRGB24ToY = ConvertRGB24ToY_C; - WebPConvertBGR24ToY = ConvertBGR24ToY_C; - - WebPConvertRGBA32ToUV = WebPConvertRGBA32ToUV_C; - -#if !WEBP_NEON_OMIT_C_CODE - WebPSharpYUVUpdateY = SharpYUVUpdateY_C; - WebPSharpYUVUpdateRGB = SharpYUVUpdateRGB_C; - WebPSharpYUVFilterRow = SharpYUVFilterRow_C; -#endif - - if (VP8GetCPUInfo != NULL) { -#if defined(WEBP_USE_SSE2) - if (VP8GetCPUInfo(kSSE2)) { - WebPInitConvertARGBToYUVSSE2(); - WebPInitSharpYUVSSE2(); - } -#endif // WEBP_USE_SSE2 -#if defined(WEBP_USE_SSE41) - if (VP8GetCPUInfo(kSSE4_1)) { - WebPInitConvertARGBToYUVSSE41(); - } -#endif // WEBP_USE_SSE41 - } - -#if defined(WEBP_USE_NEON) - if (WEBP_NEON_OMIT_C_CODE || - (VP8GetCPUInfo != NULL && VP8GetCPUInfo(kNEON))) { - WebPInitConvertARGBToYUVNEON(); - WebPInitSharpYUVNEON(); - } -#endif // WEBP_USE_NEON - - assert(WebPConvertARGBToY != NULL); - assert(WebPConvertARGBToUV != NULL); - assert(WebPConvertRGB24ToY != NULL); - assert(WebPConvertBGR24ToY != NULL); - assert(WebPConvertRGBA32ToUV != NULL); - assert(WebPSharpYUVUpdateY != NULL); - assert(WebPSharpYUVUpdateRGB != NULL); - assert(WebPSharpYUVFilterRow != NULL); -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv.h b/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv.h deleted file mode 100644 index 008088e..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv.h +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// inline YUV<->RGB conversion function -// -// The exact naming is Y'CbCr, following the ITU-R BT.601 standard. -// More information at: http://en.wikipedia.org/wiki/YCbCr -// Y = 0.2569 * R + 0.5044 * G + 0.0979 * B + 16 -// U = -0.1483 * R - 0.2911 * G + 0.4394 * B + 128 -// V = 0.4394 * R - 0.3679 * G - 0.0715 * B + 128 -// We use 16bit fixed point operations for RGB->YUV conversion (YUV_FIX). -// -// For the Y'CbCr to RGB conversion, the BT.601 specification reads: -// R = 1.164 * (Y-16) + 1.596 * (V-128) -// G = 1.164 * (Y-16) - 0.813 * (V-128) - 0.391 * (U-128) -// B = 1.164 * (Y-16) + 2.018 * (U-128) -// where Y is in the [16,235] range, and U/V in the [16,240] range. -// -// The fixed-point implementation used here is: -// R = (19077 . y + 26149 . v - 14234) >> 6 -// G = (19077 . y - 6419 . u - 13320 . v + 8708) >> 6 -// B = (19077 . y + 33050 . u - 17685) >> 6 -// where the '.' operator is the mulhi_epu16 variant: -// a . b = ((a << 8) * b) >> 16 -// that preserves 8 bits of fractional precision before final descaling. - -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_DSP_YUV_H_ -#define WEBP_DSP_YUV_H_ - -#include "src/dsp/dsp.h" -#include "src/dec/vp8_dec.h" - -//------------------------------------------------------------------------------ -// YUV -> RGB conversion - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - YUV_FIX = 16, // fixed-point precision for RGB->YUV - YUV_HALF = 1 << (YUV_FIX - 1), - - YUV_FIX2 = 6, // fixed-point precision for YUV->RGB - YUV_MASK2 = (256 << YUV_FIX2) - 1 -}; - -//------------------------------------------------------------------------------ -// slower on x86 by ~7-8%, but bit-exact with the SSE2/NEON version - -static WEBP_INLINE int MultHi(int v, int coeff) { // _mm_mulhi_epu16 emulation - return (v * coeff) >> 8; -} - -static WEBP_INLINE int VP8Clip8(int v) { - return ((v & ~YUV_MASK2) == 0) ? (v >> YUV_FIX2) : (v < 0) ? 0 : 255; -} - -static WEBP_INLINE int VP8YUVToR(int y, int v) { - return VP8Clip8(MultHi(y, 19077) + MultHi(v, 26149) - 14234); -} - -static WEBP_INLINE int VP8YUVToG(int y, int u, int v) { - return VP8Clip8(MultHi(y, 19077) - MultHi(u, 6419) - MultHi(v, 13320) + 8708); -} - -static WEBP_INLINE int VP8YUVToB(int y, int u) { - return VP8Clip8(MultHi(y, 19077) + MultHi(u, 33050) - 17685); -} - -static WEBP_INLINE void VP8YuvToRgb(int y, int u, int v, - uint8_t* const rgb) { - rgb[0] = VP8YUVToR(y, v); - rgb[1] = VP8YUVToG(y, u, v); - rgb[2] = VP8YUVToB(y, u); -} - -static WEBP_INLINE void VP8YuvToBgr(int y, int u, int v, - uint8_t* const bgr) { - bgr[0] = VP8YUVToB(y, u); - bgr[1] = VP8YUVToG(y, u, v); - bgr[2] = VP8YUVToR(y, v); -} - -static WEBP_INLINE void VP8YuvToRgb565(int y, int u, int v, - uint8_t* const rgb) { - const int r = VP8YUVToR(y, v); // 5 usable bits - const int g = VP8YUVToG(y, u, v); // 6 usable bits - const int b = VP8YUVToB(y, u); // 5 usable bits - const int rg = (r & 0xf8) | (g >> 5); - const int gb = ((g << 3) & 0xe0) | (b >> 3); -#if (WEBP_SWAP_16BIT_CSP == 1) - rgb[0] = gb; - rgb[1] = rg; -#else - rgb[0] = rg; - rgb[1] = gb; -#endif -} - -static WEBP_INLINE void VP8YuvToRgba4444(int y, int u, int v, - uint8_t* const argb) { - const int r = VP8YUVToR(y, v); // 4 usable bits - const int g = VP8YUVToG(y, u, v); // 4 usable bits - const int b = VP8YUVToB(y, u); // 4 usable bits - const int rg = (r & 0xf0) | (g >> 4); - const int ba = (b & 0xf0) | 0x0f; // overwrite the lower 4 bits -#if (WEBP_SWAP_16BIT_CSP == 1) - argb[0] = ba; - argb[1] = rg; -#else - argb[0] = rg; - argb[1] = ba; -#endif -} - -//----------------------------------------------------------------------------- -// Alpha handling variants - -static WEBP_INLINE void VP8YuvToArgb(uint8_t y, uint8_t u, uint8_t v, - uint8_t* const argb) { - argb[0] = 0xff; - VP8YuvToRgb(y, u, v, argb + 1); -} - -static WEBP_INLINE void VP8YuvToBgra(uint8_t y, uint8_t u, uint8_t v, - uint8_t* const bgra) { - VP8YuvToBgr(y, u, v, bgra); - bgra[3] = 0xff; -} - -static WEBP_INLINE void VP8YuvToRgba(uint8_t y, uint8_t u, uint8_t v, - uint8_t* const rgba) { - VP8YuvToRgb(y, u, v, rgba); - rgba[3] = 0xff; -} - -//----------------------------------------------------------------------------- -// SSE2 extra functions (mostly for upsampling_sse2.c) - -#if defined(WEBP_USE_SSE2) - -// Process 32 pixels and store the result (16b, 24b or 32b per pixel) in *dst. -void VP8YuvToRgba32_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst); -void VP8YuvToRgb32_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst); -void VP8YuvToBgra32_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst); -void VP8YuvToBgr32_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst); -void VP8YuvToArgb32_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst); -void VP8YuvToRgba444432_SSE2(const uint8_t* y, const uint8_t* u, - const uint8_t* v, uint8_t* dst); -void VP8YuvToRgb56532_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst); - -#endif // WEBP_USE_SSE2 - -//----------------------------------------------------------------------------- -// SSE41 extra functions (mostly for upsampling_sse41.c) - -#if defined(WEBP_USE_SSE41) - -// Process 32 pixels and store the result (16b, 24b or 32b per pixel) in *dst. -void VP8YuvToRgb32_SSE41(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst); -void VP8YuvToBgr32_SSE41(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst); - -#endif // WEBP_USE_SSE41 - -//------------------------------------------------------------------------------ -// RGB -> YUV conversion - -// Stub functions that can be called with various rounding values: -static WEBP_INLINE int VP8ClipUV(int uv, int rounding) { - uv = (uv + rounding + (128 << (YUV_FIX + 2))) >> (YUV_FIX + 2); - return ((uv & ~0xff) == 0) ? uv : (uv < 0) ? 0 : 255; -} - -static WEBP_INLINE int VP8RGBToY(int r, int g, int b, int rounding) { - const int luma = 16839 * r + 33059 * g + 6420 * b; - return (luma + rounding + (16 << YUV_FIX)) >> YUV_FIX; // no need to clip -} - -static WEBP_INLINE int VP8RGBToU(int r, int g, int b, int rounding) { - const int u = -9719 * r - 19081 * g + 28800 * b; - return VP8ClipUV(u, rounding); -} - -static WEBP_INLINE int VP8RGBToV(int r, int g, int b, int rounding) { - const int v = +28800 * r - 24116 * g - 4684 * b; - return VP8ClipUV(v, rounding); -} - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_DSP_YUV_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_mips32.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_mips32.c deleted file mode 100644 index cae6e52..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_mips32.c +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MIPS version of YUV to RGB upsampling functions. -// -// Author(s): Djordje Pesut (djordje.pesut@imgtec.com) -// Jovan Zelincevic (jovan.zelincevic@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS32) - -#include "src/dsp/yuv.h" - -//------------------------------------------------------------------------------ -// simple point-sampling - -#define ROW_FUNC(FUNC_NAME, XSTEP, R, G, B, A) \ -static void FUNC_NAME(const uint8_t* y, \ - const uint8_t* u, const uint8_t* v, \ - uint8_t* dst, int len) { \ - int i, r, g, b; \ - int temp0, temp1, temp2, temp3, temp4; \ - for (i = 0; i < (len >> 1); i++) { \ - temp1 = MultHi(v[0], 26149); \ - temp3 = MultHi(v[0], 13320); \ - temp2 = MultHi(u[0], 6419); \ - temp4 = MultHi(u[0], 33050); \ - temp0 = MultHi(y[0], 19077); \ - temp1 -= 14234; \ - temp3 -= 8708; \ - temp2 += temp3; \ - temp4 -= 17685; \ - r = VP8Clip8(temp0 + temp1); \ - g = VP8Clip8(temp0 - temp2); \ - b = VP8Clip8(temp0 + temp4); \ - temp0 = MultHi(y[1], 19077); \ - dst[R] = r; \ - dst[G] = g; \ - dst[B] = b; \ - if (A) dst[A] = 0xff; \ - r = VP8Clip8(temp0 + temp1); \ - g = VP8Clip8(temp0 - temp2); \ - b = VP8Clip8(temp0 + temp4); \ - dst[R + XSTEP] = r; \ - dst[G + XSTEP] = g; \ - dst[B + XSTEP] = b; \ - if (A) dst[A + XSTEP] = 0xff; \ - y += 2; \ - ++u; \ - ++v; \ - dst += 2 * XSTEP; \ - } \ - if (len & 1) { \ - temp1 = MultHi(v[0], 26149); \ - temp3 = MultHi(v[0], 13320); \ - temp2 = MultHi(u[0], 6419); \ - temp4 = MultHi(u[0], 33050); \ - temp0 = MultHi(y[0], 19077); \ - temp1 -= 14234; \ - temp3 -= 8708; \ - temp2 += temp3; \ - temp4 -= 17685; \ - r = VP8Clip8(temp0 + temp1); \ - g = VP8Clip8(temp0 - temp2); \ - b = VP8Clip8(temp0 + temp4); \ - dst[R] = r; \ - dst[G] = g; \ - dst[B] = b; \ - if (A) dst[A] = 0xff; \ - } \ -} - -ROW_FUNC(YuvToRgbRow_MIPS32, 3, 0, 1, 2, 0) -ROW_FUNC(YuvToRgbaRow_MIPS32, 4, 0, 1, 2, 3) -ROW_FUNC(YuvToBgrRow_MIPS32, 3, 2, 1, 0, 0) -ROW_FUNC(YuvToBgraRow_MIPS32, 4, 2, 1, 0, 3) - -#undef ROW_FUNC - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPInitSamplersMIPS32(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPS32(void) { - WebPSamplers[MODE_RGB] = YuvToRgbRow_MIPS32; - WebPSamplers[MODE_RGBA] = YuvToRgbaRow_MIPS32; - WebPSamplers[MODE_BGR] = YuvToBgrRow_MIPS32; - WebPSamplers[MODE_BGRA] = YuvToBgraRow_MIPS32; -} - -#else // !WEBP_USE_MIPS32 - -WEBP_DSP_INIT_STUB(WebPInitSamplersMIPS32) - -#endif // WEBP_USE_MIPS32 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_mips_dsp_r2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_mips_dsp_r2.c deleted file mode 100644 index bdbe50a..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_mips_dsp_r2.c +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// MIPS DSPr2 version of YUV to RGB upsampling functions. -// -// Author(s): Branimir Vasic (branimir.vasic@imgtec.com) -// Djordje Pesut (djordje.pesut@imgtec.com) - -#include "src/dsp/dsp.h" - -#if defined(WEBP_USE_MIPS_DSP_R2) - -#include "src/dsp/yuv.h" - -//------------------------------------------------------------------------------ -// simple point-sampling - -#define ROW_FUNC_PART_1() \ - "lbu %[temp3], 0(%[v]) \n\t" \ - "lbu %[temp4], 0(%[u]) \n\t" \ - "lbu %[temp0], 0(%[y]) \n\t" \ - "mul %[temp1], %[t_con_1], %[temp3] \n\t" \ - "mul %[temp3], %[t_con_2], %[temp3] \n\t" \ - "mul %[temp2], %[t_con_3], %[temp4] \n\t" \ - "mul %[temp4], %[t_con_4], %[temp4] \n\t" \ - "mul %[temp0], %[t_con_5], %[temp0] \n\t" \ - "subu %[temp1], %[temp1], %[t_con_6] \n\t" \ - "subu %[temp3], %[temp3], %[t_con_7] \n\t" \ - "addu %[temp2], %[temp2], %[temp3] \n\t" \ - "subu %[temp4], %[temp4], %[t_con_8] \n\t" \ - -#define ROW_FUNC_PART_2(R, G, B, K) \ - "addu %[temp5], %[temp0], %[temp1] \n\t" \ - "subu %[temp6], %[temp0], %[temp2] \n\t" \ - "addu %[temp7], %[temp0], %[temp4] \n\t" \ -".if " #K " \n\t" \ - "lbu %[temp0], 1(%[y]) \n\t" \ -".endif \n\t" \ - "shll_s.w %[temp5], %[temp5], 17 \n\t" \ - "shll_s.w %[temp6], %[temp6], 17 \n\t" \ -".if " #K " \n\t" \ - "mul %[temp0], %[t_con_5], %[temp0] \n\t" \ -".endif \n\t" \ - "shll_s.w %[temp7], %[temp7], 17 \n\t" \ - "precrqu_s.qb.ph %[temp5], %[temp5], $zero \n\t" \ - "precrqu_s.qb.ph %[temp6], %[temp6], $zero \n\t" \ - "precrqu_s.qb.ph %[temp7], %[temp7], $zero \n\t" \ - "srl %[temp5], %[temp5], 24 \n\t" \ - "srl %[temp6], %[temp6], 24 \n\t" \ - "srl %[temp7], %[temp7], 24 \n\t" \ - "sb %[temp5], " #R "(%[dst]) \n\t" \ - "sb %[temp6], " #G "(%[dst]) \n\t" \ - "sb %[temp7], " #B "(%[dst]) \n\t" \ - -#define ASM_CLOBBER_LIST() \ - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), \ - [temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), \ - [temp6]"=&r"(temp6), [temp7]"=&r"(temp7) \ - : [t_con_1]"r"(t_con_1), [t_con_2]"r"(t_con_2), [t_con_3]"r"(t_con_3), \ - [t_con_4]"r"(t_con_4), [t_con_5]"r"(t_con_5), [t_con_6]"r"(t_con_6), \ - [u]"r"(u), [v]"r"(v), [y]"r"(y), [dst]"r"(dst), \ - [t_con_7]"r"(t_con_7), [t_con_8]"r"(t_con_8) \ - : "memory", "hi", "lo" \ - -#define ROW_FUNC(FUNC_NAME, XSTEP, R, G, B, A) \ -static void FUNC_NAME(const uint8_t* y, \ - const uint8_t* u, const uint8_t* v, \ - uint8_t* dst, int len) { \ - int i; \ - uint32_t temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; \ - const int t_con_1 = 26149; \ - const int t_con_2 = 13320; \ - const int t_con_3 = 6419; \ - const int t_con_4 = 33050; \ - const int t_con_5 = 19077; \ - const int t_con_6 = 14234; \ - const int t_con_7 = 8708; \ - const int t_con_8 = 17685; \ - for (i = 0; i < (len >> 1); i++) { \ - __asm__ volatile ( \ - ROW_FUNC_PART_1() \ - ROW_FUNC_PART_2(R, G, B, 1) \ - ROW_FUNC_PART_2(R + XSTEP, G + XSTEP, B + XSTEP, 0) \ - ASM_CLOBBER_LIST() \ - ); \ - if (A) dst[A] = dst[A + XSTEP] = 0xff; \ - y += 2; \ - ++u; \ - ++v; \ - dst += 2 * XSTEP; \ - } \ - if (len & 1) { \ - __asm__ volatile ( \ - ROW_FUNC_PART_1() \ - ROW_FUNC_PART_2(R, G, B, 0) \ - ASM_CLOBBER_LIST() \ - ); \ - if (A) dst[A] = 0xff; \ - } \ -} - -ROW_FUNC(YuvToRgbRow_MIPSdspR2, 3, 0, 1, 2, 0) -ROW_FUNC(YuvToRgbaRow_MIPSdspR2, 4, 0, 1, 2, 3) -ROW_FUNC(YuvToBgrRow_MIPSdspR2, 3, 2, 1, 0, 0) -ROW_FUNC(YuvToBgraRow_MIPSdspR2, 4, 2, 1, 0, 3) - -#undef ROW_FUNC -#undef ASM_CLOBBER_LIST -#undef ROW_FUNC_PART_2 -#undef ROW_FUNC_PART_1 - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPInitSamplersMIPSdspR2(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPSdspR2(void) { - WebPSamplers[MODE_RGB] = YuvToRgbRow_MIPSdspR2; - WebPSamplers[MODE_RGBA] = YuvToRgbaRow_MIPSdspR2; - WebPSamplers[MODE_BGR] = YuvToBgrRow_MIPSdspR2; - WebPSamplers[MODE_BGRA] = YuvToBgraRow_MIPSdspR2; -} - -#else // !WEBP_USE_MIPS_DSP_R2 - -WEBP_DSP_INIT_STUB(WebPInitSamplersMIPSdspR2) - -#endif // WEBP_USE_MIPS_DSP_R2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_neon.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_neon.c deleted file mode 100644 index e0c1497..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_neon.c +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// YUV->RGB conversion functions -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/yuv.h" - -#if defined(WEBP_USE_NEON) - -#include -#include - -#include "src/dsp/neon.h" - -//----------------------------------------------------------------------------- - -static uint8x8_t ConvertRGBToY_NEON(const uint8x8_t R, - const uint8x8_t G, - const uint8x8_t B) { - const uint16x8_t r = vmovl_u8(R); - const uint16x8_t g = vmovl_u8(G); - const uint16x8_t b = vmovl_u8(B); - const uint16x4_t r_lo = vget_low_u16(r); - const uint16x4_t r_hi = vget_high_u16(r); - const uint16x4_t g_lo = vget_low_u16(g); - const uint16x4_t g_hi = vget_high_u16(g); - const uint16x4_t b_lo = vget_low_u16(b); - const uint16x4_t b_hi = vget_high_u16(b); - const uint32x4_t tmp0_lo = vmull_n_u16( r_lo, 16839u); - const uint32x4_t tmp0_hi = vmull_n_u16( r_hi, 16839u); - const uint32x4_t tmp1_lo = vmlal_n_u16(tmp0_lo, g_lo, 33059u); - const uint32x4_t tmp1_hi = vmlal_n_u16(tmp0_hi, g_hi, 33059u); - const uint32x4_t tmp2_lo = vmlal_n_u16(tmp1_lo, b_lo, 6420u); - const uint32x4_t tmp2_hi = vmlal_n_u16(tmp1_hi, b_hi, 6420u); - const uint16x8_t Y1 = vcombine_u16(vrshrn_n_u32(tmp2_lo, 16), - vrshrn_n_u32(tmp2_hi, 16)); - const uint16x8_t Y2 = vaddq_u16(Y1, vdupq_n_u16(16)); - return vqmovn_u16(Y2); -} - -static void ConvertRGB24ToY_NEON(const uint8_t* rgb, uint8_t* y, int width) { - int i; - for (i = 0; i + 8 <= width; i += 8, rgb += 3 * 8) { - const uint8x8x3_t RGB = vld3_u8(rgb); - const uint8x8_t Y = ConvertRGBToY_NEON(RGB.val[0], RGB.val[1], RGB.val[2]); - vst1_u8(y + i, Y); - } - for (; i < width; ++i, rgb += 3) { // left-over - y[i] = VP8RGBToY(rgb[0], rgb[1], rgb[2], YUV_HALF); - } -} - -static void ConvertBGR24ToY_NEON(const uint8_t* bgr, uint8_t* y, int width) { - int i; - for (i = 0; i + 8 <= width; i += 8, bgr += 3 * 8) { - const uint8x8x3_t BGR = vld3_u8(bgr); - const uint8x8_t Y = ConvertRGBToY_NEON(BGR.val[2], BGR.val[1], BGR.val[0]); - vst1_u8(y + i, Y); - } - for (; i < width; ++i, bgr += 3) { // left-over - y[i] = VP8RGBToY(bgr[2], bgr[1], bgr[0], YUV_HALF); - } -} - -static void ConvertARGBToY_NEON(const uint32_t* argb, uint8_t* y, int width) { - int i; - for (i = 0; i + 8 <= width; i += 8) { - const uint8x8x4_t RGB = vld4_u8((const uint8_t*)&argb[i]); - const uint8x8_t Y = ConvertRGBToY_NEON(RGB.val[2], RGB.val[1], RGB.val[0]); - vst1_u8(y + i, Y); - } - for (; i < width; ++i) { // left-over - const uint32_t p = argb[i]; - y[i] = VP8RGBToY((p >> 16) & 0xff, (p >> 8) & 0xff, (p >> 0) & 0xff, - YUV_HALF); - } -} - -//----------------------------------------------------------------------------- - -// computes: DST_s16 = [(C0 * r + C1 * g + C2 * b) >> 16] + CST -#define MULTIPLY_16b_PREAMBLE(r, g, b) \ - const int16x4_t r_lo = vreinterpret_s16_u16(vget_low_u16(r)); \ - const int16x4_t r_hi = vreinterpret_s16_u16(vget_high_u16(r)); \ - const int16x4_t g_lo = vreinterpret_s16_u16(vget_low_u16(g)); \ - const int16x4_t g_hi = vreinterpret_s16_u16(vget_high_u16(g)); \ - const int16x4_t b_lo = vreinterpret_s16_u16(vget_low_u16(b)); \ - const int16x4_t b_hi = vreinterpret_s16_u16(vget_high_u16(b)) - -#define MULTIPLY_16b(C0, C1, C2, CST, DST_s16) do { \ - const int32x4_t tmp0_lo = vmull_n_s16( r_lo, C0); \ - const int32x4_t tmp0_hi = vmull_n_s16( r_hi, C0); \ - const int32x4_t tmp1_lo = vmlal_n_s16(tmp0_lo, g_lo, C1); \ - const int32x4_t tmp1_hi = vmlal_n_s16(tmp0_hi, g_hi, C1); \ - const int32x4_t tmp2_lo = vmlal_n_s16(tmp1_lo, b_lo, C2); \ - const int32x4_t tmp2_hi = vmlal_n_s16(tmp1_hi, b_hi, C2); \ - const int16x8_t tmp3 = vcombine_s16(vshrn_n_s32(tmp2_lo, 16), \ - vshrn_n_s32(tmp2_hi, 16)); \ - DST_s16 = vaddq_s16(tmp3, vdupq_n_s16(CST)); \ -} while (0) - -// This needs to be a macro, since (128 << SHIFT) needs to be an immediate. -#define CONVERT_RGB_TO_UV(r, g, b, SHIFT, U_DST, V_DST) do { \ - MULTIPLY_16b_PREAMBLE(r, g, b); \ - MULTIPLY_16b(-9719, -19081, 28800, 128 << SHIFT, U_DST); \ - MULTIPLY_16b(28800, -24116, -4684, 128 << SHIFT, V_DST); \ -} while (0) - -static void ConvertRGBA32ToUV_NEON(const uint16_t* rgb, - uint8_t* u, uint8_t* v, int width) { - int i; - for (i = 0; i + 8 <= width; i += 8, rgb += 4 * 8) { - const uint16x8x4_t RGB = vld4q_u16((const uint16_t*)rgb); - int16x8_t U, V; - CONVERT_RGB_TO_UV(RGB.val[0], RGB.val[1], RGB.val[2], 2, U, V); - vst1_u8(u + i, vqrshrun_n_s16(U, 2)); - vst1_u8(v + i, vqrshrun_n_s16(V, 2)); - } - for (; i < width; i += 1, rgb += 4) { - const int r = rgb[0], g = rgb[1], b = rgb[2]; - u[i] = VP8RGBToU(r, g, b, YUV_HALF << 2); - v[i] = VP8RGBToV(r, g, b, YUV_HALF << 2); - } -} - -static void ConvertARGBToUV_NEON(const uint32_t* argb, uint8_t* u, uint8_t* v, - int src_width, int do_store) { - int i; - for (i = 0; i + 16 <= src_width; i += 16, u += 8, v += 8) { - const uint8x16x4_t RGB = vld4q_u8((const uint8_t*)&argb[i]); - const uint16x8_t R = vpaddlq_u8(RGB.val[2]); // pair-wise adds - const uint16x8_t G = vpaddlq_u8(RGB.val[1]); - const uint16x8_t B = vpaddlq_u8(RGB.val[0]); - int16x8_t U_tmp, V_tmp; - CONVERT_RGB_TO_UV(R, G, B, 1, U_tmp, V_tmp); - { - const uint8x8_t U = vqrshrun_n_s16(U_tmp, 1); - const uint8x8_t V = vqrshrun_n_s16(V_tmp, 1); - if (do_store) { - vst1_u8(u, U); - vst1_u8(v, V); - } else { - const uint8x8_t prev_u = vld1_u8(u); - const uint8x8_t prev_v = vld1_u8(v); - vst1_u8(u, vrhadd_u8(U, prev_u)); - vst1_u8(v, vrhadd_u8(V, prev_v)); - } - } - } - if (i < src_width) { // left-over - WebPConvertARGBToUV_C(argb + i, u, v, src_width - i, do_store); - } -} - - -//------------------------------------------------------------------------------ - -extern void WebPInitConvertARGBToYUVNEON(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitConvertARGBToYUVNEON(void) { - WebPConvertRGB24ToY = ConvertRGB24ToY_NEON; - WebPConvertBGR24ToY = ConvertBGR24ToY_NEON; - WebPConvertARGBToY = ConvertARGBToY_NEON; - WebPConvertARGBToUV = ConvertARGBToUV_NEON; - WebPConvertRGBA32ToUV = ConvertRGBA32ToUV_NEON; -} - -//------------------------------------------------------------------------------ - -#define MAX_Y ((1 << 10) - 1) // 10b precision over 16b-arithmetic -static uint16_t clip_y_NEON(int v) { - return (v < 0) ? 0 : (v > MAX_Y) ? MAX_Y : (uint16_t)v; -} - -static uint64_t SharpYUVUpdateY_NEON(const uint16_t* ref, const uint16_t* src, - uint16_t* dst, int len) { - int i; - const int16x8_t zero = vdupq_n_s16(0); - const int16x8_t max = vdupq_n_s16(MAX_Y); - uint64x2_t sum = vdupq_n_u64(0); - uint64_t diff; - - for (i = 0; i + 8 <= len; i += 8) { - const int16x8_t A = vreinterpretq_s16_u16(vld1q_u16(ref + i)); - const int16x8_t B = vreinterpretq_s16_u16(vld1q_u16(src + i)); - const int16x8_t C = vreinterpretq_s16_u16(vld1q_u16(dst + i)); - const int16x8_t D = vsubq_s16(A, B); // diff_y - const int16x8_t F = vaddq_s16(C, D); // new_y - const uint16x8_t H = - vreinterpretq_u16_s16(vmaxq_s16(vminq_s16(F, max), zero)); - const int16x8_t I = vabsq_s16(D); // abs(diff_y) - vst1q_u16(dst + i, H); - sum = vpadalq_u32(sum, vpaddlq_u16(vreinterpretq_u16_s16(I))); - } - diff = vgetq_lane_u64(sum, 0) + vgetq_lane_u64(sum, 1); - for (; i < len; ++i) { - const int diff_y = ref[i] - src[i]; - const int new_y = (int)(dst[i]) + diff_y; - dst[i] = clip_y_NEON(new_y); - diff += (uint64_t)(abs(diff_y)); - } - return diff; -} - -static void SharpYUVUpdateRGB_NEON(const int16_t* ref, const int16_t* src, - int16_t* dst, int len) { - int i; - for (i = 0; i + 8 <= len; i += 8) { - const int16x8_t A = vld1q_s16(ref + i); - const int16x8_t B = vld1q_s16(src + i); - const int16x8_t C = vld1q_s16(dst + i); - const int16x8_t D = vsubq_s16(A, B); // diff_uv - const int16x8_t E = vaddq_s16(C, D); // new_uv - vst1q_s16(dst + i, E); - } - for (; i < len; ++i) { - const int diff_uv = ref[i] - src[i]; - dst[i] += diff_uv; - } -} - -static void SharpYUVFilterRow_NEON(const int16_t* A, const int16_t* B, int len, - const uint16_t* best_y, uint16_t* out) { - int i; - const int16x8_t max = vdupq_n_s16(MAX_Y); - const int16x8_t zero = vdupq_n_s16(0); - for (i = 0; i + 8 <= len; i += 8) { - const int16x8_t a0 = vld1q_s16(A + i + 0); - const int16x8_t a1 = vld1q_s16(A + i + 1); - const int16x8_t b0 = vld1q_s16(B + i + 0); - const int16x8_t b1 = vld1q_s16(B + i + 1); - const int16x8_t a0b1 = vaddq_s16(a0, b1); - const int16x8_t a1b0 = vaddq_s16(a1, b0); - const int16x8_t a0a1b0b1 = vaddq_s16(a0b1, a1b0); // A0+A1+B0+B1 - const int16x8_t a0b1_2 = vaddq_s16(a0b1, a0b1); // 2*(A0+B1) - const int16x8_t a1b0_2 = vaddq_s16(a1b0, a1b0); // 2*(A1+B0) - const int16x8_t c0 = vshrq_n_s16(vaddq_s16(a0b1_2, a0a1b0b1), 3); - const int16x8_t c1 = vshrq_n_s16(vaddq_s16(a1b0_2, a0a1b0b1), 3); - const int16x8_t d0 = vaddq_s16(c1, a0); - const int16x8_t d1 = vaddq_s16(c0, a1); - const int16x8_t e0 = vrshrq_n_s16(d0, 1); - const int16x8_t e1 = vrshrq_n_s16(d1, 1); - const int16x8x2_t f = vzipq_s16(e0, e1); - const int16x8_t g0 = vreinterpretq_s16_u16(vld1q_u16(best_y + 2 * i + 0)); - const int16x8_t g1 = vreinterpretq_s16_u16(vld1q_u16(best_y + 2 * i + 8)); - const int16x8_t h0 = vaddq_s16(g0, f.val[0]); - const int16x8_t h1 = vaddq_s16(g1, f.val[1]); - const int16x8_t i0 = vmaxq_s16(vminq_s16(h0, max), zero); - const int16x8_t i1 = vmaxq_s16(vminq_s16(h1, max), zero); - vst1q_u16(out + 2 * i + 0, vreinterpretq_u16_s16(i0)); - vst1q_u16(out + 2 * i + 8, vreinterpretq_u16_s16(i1)); - } - for (; i < len; ++i) { - const int a0b1 = A[i + 0] + B[i + 1]; - const int a1b0 = A[i + 1] + B[i + 0]; - const int a0a1b0b1 = a0b1 + a1b0 + 8; - const int v0 = (8 * A[i + 0] + 2 * a1b0 + a0a1b0b1) >> 4; - const int v1 = (8 * A[i + 1] + 2 * a0b1 + a0a1b0b1) >> 4; - out[2 * i + 0] = clip_y_NEON(best_y[2 * i + 0] + v0); - out[2 * i + 1] = clip_y_NEON(best_y[2 * i + 1] + v1); - } -} -#undef MAX_Y - -//------------------------------------------------------------------------------ - -extern void WebPInitSharpYUVNEON(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitSharpYUVNEON(void) { - WebPSharpYUVUpdateY = SharpYUVUpdateY_NEON; - WebPSharpYUVUpdateRGB = SharpYUVUpdateRGB_NEON; - WebPSharpYUVFilterRow = SharpYUVFilterRow_NEON; -} - -#else // !WEBP_USE_NEON - -WEBP_DSP_INIT_STUB(WebPInitConvertARGBToYUVNEON) -WEBP_DSP_INIT_STUB(WebPInitSharpYUVNEON) - -#endif // WEBP_USE_NEON diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_sse2.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_sse2.c deleted file mode 100644 index bf1efe4..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_sse2.c +++ /dev/null @@ -1,874 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// YUV->RGB conversion functions -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/yuv.h" - -#if defined(WEBP_USE_SSE2) - -#include "src/dsp/common_sse2.h" -#include -#include - -//----------------------------------------------------------------------------- -// Convert spans of 32 pixels to various RGB formats for the fancy upsampler. - -// These constants are 14b fixed-point version of ITU-R BT.601 constants. -// R = (19077 * y + 26149 * v - 14234) >> 6 -// G = (19077 * y - 6419 * u - 13320 * v + 8708) >> 6 -// B = (19077 * y + 33050 * u - 17685) >> 6 -static void ConvertYUV444ToRGB_SSE2(const __m128i* const Y0, - const __m128i* const U0, - const __m128i* const V0, - __m128i* const R, - __m128i* const G, - __m128i* const B) { - const __m128i k19077 = _mm_set1_epi16(19077); - const __m128i k26149 = _mm_set1_epi16(26149); - const __m128i k14234 = _mm_set1_epi16(14234); - // 33050 doesn't fit in a signed short: only use this with unsigned arithmetic - const __m128i k33050 = _mm_set1_epi16((short)33050); - const __m128i k17685 = _mm_set1_epi16(17685); - const __m128i k6419 = _mm_set1_epi16(6419); - const __m128i k13320 = _mm_set1_epi16(13320); - const __m128i k8708 = _mm_set1_epi16(8708); - - const __m128i Y1 = _mm_mulhi_epu16(*Y0, k19077); - - const __m128i R0 = _mm_mulhi_epu16(*V0, k26149); - const __m128i R1 = _mm_sub_epi16(Y1, k14234); - const __m128i R2 = _mm_add_epi16(R1, R0); - - const __m128i G0 = _mm_mulhi_epu16(*U0, k6419); - const __m128i G1 = _mm_mulhi_epu16(*V0, k13320); - const __m128i G2 = _mm_add_epi16(Y1, k8708); - const __m128i G3 = _mm_add_epi16(G0, G1); - const __m128i G4 = _mm_sub_epi16(G2, G3); - - // be careful with the saturated *unsigned* arithmetic here! - const __m128i B0 = _mm_mulhi_epu16(*U0, k33050); - const __m128i B1 = _mm_adds_epu16(B0, Y1); - const __m128i B2 = _mm_subs_epu16(B1, k17685); - - // use logical shift for B2, which can be larger than 32767 - *R = _mm_srai_epi16(R2, 6); // range: [-14234, 30815] - *G = _mm_srai_epi16(G4, 6); // range: [-10953, 27710] - *B = _mm_srli_epi16(B2, 6); // range: [0, 34238] -} - -// Load the bytes into the *upper* part of 16b words. That's "<< 8", basically. -static WEBP_INLINE __m128i Load_HI_16_SSE2(const uint8_t* src) { - const __m128i zero = _mm_setzero_si128(); - return _mm_unpacklo_epi8(zero, _mm_loadl_epi64((const __m128i*)src)); -} - -// Load and replicate the U/V samples -static WEBP_INLINE __m128i Load_UV_HI_8_SSE2(const uint8_t* src) { - const __m128i zero = _mm_setzero_si128(); - const __m128i tmp0 = _mm_cvtsi32_si128(*(const uint32_t*)src); - const __m128i tmp1 = _mm_unpacklo_epi8(zero, tmp0); - return _mm_unpacklo_epi16(tmp1, tmp1); // replicate samples -} - -// Convert 32 samples of YUV444 to R/G/B -static void YUV444ToRGB_SSE2(const uint8_t* const y, - const uint8_t* const u, - const uint8_t* const v, - __m128i* const R, __m128i* const G, - __m128i* const B) { - const __m128i Y0 = Load_HI_16_SSE2(y), U0 = Load_HI_16_SSE2(u), - V0 = Load_HI_16_SSE2(v); - ConvertYUV444ToRGB_SSE2(&Y0, &U0, &V0, R, G, B); -} - -// Convert 32 samples of YUV420 to R/G/B -static void YUV420ToRGB_SSE2(const uint8_t* const y, - const uint8_t* const u, - const uint8_t* const v, - __m128i* const R, __m128i* const G, - __m128i* const B) { - const __m128i Y0 = Load_HI_16_SSE2(y), U0 = Load_UV_HI_8_SSE2(u), - V0 = Load_UV_HI_8_SSE2(v); - ConvertYUV444ToRGB_SSE2(&Y0, &U0, &V0, R, G, B); -} - -// Pack R/G/B/A results into 32b output. -static WEBP_INLINE void PackAndStore4_SSE2(const __m128i* const R, - const __m128i* const G, - const __m128i* const B, - const __m128i* const A, - uint8_t* const dst) { - const __m128i rb = _mm_packus_epi16(*R, *B); - const __m128i ga = _mm_packus_epi16(*G, *A); - const __m128i rg = _mm_unpacklo_epi8(rb, ga); - const __m128i ba = _mm_unpackhi_epi8(rb, ga); - const __m128i RGBA_lo = _mm_unpacklo_epi16(rg, ba); - const __m128i RGBA_hi = _mm_unpackhi_epi16(rg, ba); - _mm_storeu_si128((__m128i*)(dst + 0), RGBA_lo); - _mm_storeu_si128((__m128i*)(dst + 16), RGBA_hi); -} - -// Pack R/G/B/A results into 16b output. -static WEBP_INLINE void PackAndStore4444_SSE2(const __m128i* const R, - const __m128i* const G, - const __m128i* const B, - const __m128i* const A, - uint8_t* const dst) { -#if (WEBP_SWAP_16BIT_CSP == 0) - const __m128i rg0 = _mm_packus_epi16(*R, *G); - const __m128i ba0 = _mm_packus_epi16(*B, *A); -#else - const __m128i rg0 = _mm_packus_epi16(*B, *A); - const __m128i ba0 = _mm_packus_epi16(*R, *G); -#endif - const __m128i mask_0xf0 = _mm_set1_epi8(0xf0); - const __m128i rb1 = _mm_unpacklo_epi8(rg0, ba0); // rbrbrbrbrb... - const __m128i ga1 = _mm_unpackhi_epi8(rg0, ba0); // gagagagaga... - const __m128i rb2 = _mm_and_si128(rb1, mask_0xf0); - const __m128i ga2 = _mm_srli_epi16(_mm_and_si128(ga1, mask_0xf0), 4); - const __m128i rgba4444 = _mm_or_si128(rb2, ga2); - _mm_storeu_si128((__m128i*)dst, rgba4444); -} - -// Pack R/G/B results into 16b output. -static WEBP_INLINE void PackAndStore565_SSE2(const __m128i* const R, - const __m128i* const G, - const __m128i* const B, - uint8_t* const dst) { - const __m128i r0 = _mm_packus_epi16(*R, *R); - const __m128i g0 = _mm_packus_epi16(*G, *G); - const __m128i b0 = _mm_packus_epi16(*B, *B); - const __m128i r1 = _mm_and_si128(r0, _mm_set1_epi8(0xf8)); - const __m128i b1 = _mm_and_si128(_mm_srli_epi16(b0, 3), _mm_set1_epi8(0x1f)); - const __m128i g1 = _mm_srli_epi16(_mm_and_si128(g0, _mm_set1_epi8(0xe0)), 5); - const __m128i g2 = _mm_slli_epi16(_mm_and_si128(g0, _mm_set1_epi8(0x1c)), 3); - const __m128i rg = _mm_or_si128(r1, g1); - const __m128i gb = _mm_or_si128(g2, b1); -#if (WEBP_SWAP_16BIT_CSP == 0) - const __m128i rgb565 = _mm_unpacklo_epi8(rg, gb); -#else - const __m128i rgb565 = _mm_unpacklo_epi8(gb, rg); -#endif - _mm_storeu_si128((__m128i*)dst, rgb565); -} - -// Pack the planar buffers -// rrrr... rrrr... gggg... gggg... bbbb... bbbb.... -// triplet by triplet in the output buffer rgb as rgbrgbrgbrgb ... -static WEBP_INLINE void PlanarTo24b_SSE2(__m128i* const in0, __m128i* const in1, - __m128i* const in2, __m128i* const in3, - __m128i* const in4, __m128i* const in5, - uint8_t* const rgb) { - // The input is 6 registers of sixteen 8b but for the sake of explanation, - // let's take 6 registers of four 8b values. - // To pack, we will keep taking one every two 8b integer and move it - // around as follows: - // Input: - // r0r1r2r3 | r4r5r6r7 | g0g1g2g3 | g4g5g6g7 | b0b1b2b3 | b4b5b6b7 - // Split the 6 registers in two sets of 3 registers: the first set as the even - // 8b bytes, the second the odd ones: - // r0r2r4r6 | g0g2g4g6 | b0b2b4b6 | r1r3r5r7 | g1g3g5g7 | b1b3b5b7 - // Repeat the same permutations twice more: - // r0r4g0g4 | b0b4r1r5 | g1g5b1b5 | r2r6g2g6 | b2b6r3r7 | g3g7b3b7 - // r0g0b0r1 | g1b1r2g2 | b2r3g3b3 | r4g4b4r5 | g5b5r6g6 | b6r7g7b7 - VP8PlanarTo24b_SSE2(in0, in1, in2, in3, in4, in5); - - _mm_storeu_si128((__m128i*)(rgb + 0), *in0); - _mm_storeu_si128((__m128i*)(rgb + 16), *in1); - _mm_storeu_si128((__m128i*)(rgb + 32), *in2); - _mm_storeu_si128((__m128i*)(rgb + 48), *in3); - _mm_storeu_si128((__m128i*)(rgb + 64), *in4); - _mm_storeu_si128((__m128i*)(rgb + 80), *in5); -} - -void VP8YuvToRgba32_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst) { - const __m128i kAlpha = _mm_set1_epi16(255); - int n; - for (n = 0; n < 32; n += 8, dst += 32) { - __m128i R, G, B; - YUV444ToRGB_SSE2(y + n, u + n, v + n, &R, &G, &B); - PackAndStore4_SSE2(&R, &G, &B, &kAlpha, dst); - } -} - -void VP8YuvToBgra32_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst) { - const __m128i kAlpha = _mm_set1_epi16(255); - int n; - for (n = 0; n < 32; n += 8, dst += 32) { - __m128i R, G, B; - YUV444ToRGB_SSE2(y + n, u + n, v + n, &R, &G, &B); - PackAndStore4_SSE2(&B, &G, &R, &kAlpha, dst); - } -} - -void VP8YuvToArgb32_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst) { - const __m128i kAlpha = _mm_set1_epi16(255); - int n; - for (n = 0; n < 32; n += 8, dst += 32) { - __m128i R, G, B; - YUV444ToRGB_SSE2(y + n, u + n, v + n, &R, &G, &B); - PackAndStore4_SSE2(&kAlpha, &R, &G, &B, dst); - } -} - -void VP8YuvToRgba444432_SSE2(const uint8_t* y, const uint8_t* u, - const uint8_t* v, uint8_t* dst) { - const __m128i kAlpha = _mm_set1_epi16(255); - int n; - for (n = 0; n < 32; n += 8, dst += 16) { - __m128i R, G, B; - YUV444ToRGB_SSE2(y + n, u + n, v + n, &R, &G, &B); - PackAndStore4444_SSE2(&R, &G, &B, &kAlpha, dst); - } -} - -void VP8YuvToRgb56532_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst) { - int n; - for (n = 0; n < 32; n += 8, dst += 16) { - __m128i R, G, B; - YUV444ToRGB_SSE2(y + n, u + n, v + n, &R, &G, &B); - PackAndStore565_SSE2(&R, &G, &B, dst); - } -} - -void VP8YuvToRgb32_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst) { - __m128i R0, R1, R2, R3, G0, G1, G2, G3, B0, B1, B2, B3; - __m128i rgb0, rgb1, rgb2, rgb3, rgb4, rgb5; - - YUV444ToRGB_SSE2(y + 0, u + 0, v + 0, &R0, &G0, &B0); - YUV444ToRGB_SSE2(y + 8, u + 8, v + 8, &R1, &G1, &B1); - YUV444ToRGB_SSE2(y + 16, u + 16, v + 16, &R2, &G2, &B2); - YUV444ToRGB_SSE2(y + 24, u + 24, v + 24, &R3, &G3, &B3); - - // Cast to 8b and store as RRRRGGGGBBBB. - rgb0 = _mm_packus_epi16(R0, R1); - rgb1 = _mm_packus_epi16(R2, R3); - rgb2 = _mm_packus_epi16(G0, G1); - rgb3 = _mm_packus_epi16(G2, G3); - rgb4 = _mm_packus_epi16(B0, B1); - rgb5 = _mm_packus_epi16(B2, B3); - - // Pack as RGBRGBRGBRGB. - PlanarTo24b_SSE2(&rgb0, &rgb1, &rgb2, &rgb3, &rgb4, &rgb5, dst); -} - -void VP8YuvToBgr32_SSE2(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst) { - __m128i R0, R1, R2, R3, G0, G1, G2, G3, B0, B1, B2, B3; - __m128i bgr0, bgr1, bgr2, bgr3, bgr4, bgr5; - - YUV444ToRGB_SSE2(y + 0, u + 0, v + 0, &R0, &G0, &B0); - YUV444ToRGB_SSE2(y + 8, u + 8, v + 8, &R1, &G1, &B1); - YUV444ToRGB_SSE2(y + 16, u + 16, v + 16, &R2, &G2, &B2); - YUV444ToRGB_SSE2(y + 24, u + 24, v + 24, &R3, &G3, &B3); - - // Cast to 8b and store as BBBBGGGGRRRR. - bgr0 = _mm_packus_epi16(B0, B1); - bgr1 = _mm_packus_epi16(B2, B3); - bgr2 = _mm_packus_epi16(G0, G1); - bgr3 = _mm_packus_epi16(G2, G3); - bgr4 = _mm_packus_epi16(R0, R1); - bgr5= _mm_packus_epi16(R2, R3); - - // Pack as BGRBGRBGRBGR. - PlanarTo24b_SSE2(&bgr0, &bgr1, &bgr2, &bgr3, &bgr4, &bgr5, dst); -} - -//----------------------------------------------------------------------------- -// Arbitrary-length row conversion functions - -static void YuvToRgbaRow_SSE2(const uint8_t* y, - const uint8_t* u, const uint8_t* v, - uint8_t* dst, int len) { - const __m128i kAlpha = _mm_set1_epi16(255); - int n; - for (n = 0; n + 8 <= len; n += 8, dst += 32) { - __m128i R, G, B; - YUV420ToRGB_SSE2(y, u, v, &R, &G, &B); - PackAndStore4_SSE2(&R, &G, &B, &kAlpha, dst); - y += 8; - u += 4; - v += 4; - } - for (; n < len; ++n) { // Finish off - VP8YuvToRgba(y[0], u[0], v[0], dst); - dst += 4; - y += 1; - u += (n & 1); - v += (n & 1); - } -} - -static void YuvToBgraRow_SSE2(const uint8_t* y, - const uint8_t* u, const uint8_t* v, - uint8_t* dst, int len) { - const __m128i kAlpha = _mm_set1_epi16(255); - int n; - for (n = 0; n + 8 <= len; n += 8, dst += 32) { - __m128i R, G, B; - YUV420ToRGB_SSE2(y, u, v, &R, &G, &B); - PackAndStore4_SSE2(&B, &G, &R, &kAlpha, dst); - y += 8; - u += 4; - v += 4; - } - for (; n < len; ++n) { // Finish off - VP8YuvToBgra(y[0], u[0], v[0], dst); - dst += 4; - y += 1; - u += (n & 1); - v += (n & 1); - } -} - -static void YuvToArgbRow_SSE2(const uint8_t* y, - const uint8_t* u, const uint8_t* v, - uint8_t* dst, int len) { - const __m128i kAlpha = _mm_set1_epi16(255); - int n; - for (n = 0; n + 8 <= len; n += 8, dst += 32) { - __m128i R, G, B; - YUV420ToRGB_SSE2(y, u, v, &R, &G, &B); - PackAndStore4_SSE2(&kAlpha, &R, &G, &B, dst); - y += 8; - u += 4; - v += 4; - } - for (; n < len; ++n) { // Finish off - VP8YuvToArgb(y[0], u[0], v[0], dst); - dst += 4; - y += 1; - u += (n & 1); - v += (n & 1); - } -} - -static void YuvToRgbRow_SSE2(const uint8_t* y, - const uint8_t* u, const uint8_t* v, - uint8_t* dst, int len) { - int n; - for (n = 0; n + 32 <= len; n += 32, dst += 32 * 3) { - __m128i R0, R1, R2, R3, G0, G1, G2, G3, B0, B1, B2, B3; - __m128i rgb0, rgb1, rgb2, rgb3, rgb4, rgb5; - - YUV420ToRGB_SSE2(y + 0, u + 0, v + 0, &R0, &G0, &B0); - YUV420ToRGB_SSE2(y + 8, u + 4, v + 4, &R1, &G1, &B1); - YUV420ToRGB_SSE2(y + 16, u + 8, v + 8, &R2, &G2, &B2); - YUV420ToRGB_SSE2(y + 24, u + 12, v + 12, &R3, &G3, &B3); - - // Cast to 8b and store as RRRRGGGGBBBB. - rgb0 = _mm_packus_epi16(R0, R1); - rgb1 = _mm_packus_epi16(R2, R3); - rgb2 = _mm_packus_epi16(G0, G1); - rgb3 = _mm_packus_epi16(G2, G3); - rgb4 = _mm_packus_epi16(B0, B1); - rgb5 = _mm_packus_epi16(B2, B3); - - // Pack as RGBRGBRGBRGB. - PlanarTo24b_SSE2(&rgb0, &rgb1, &rgb2, &rgb3, &rgb4, &rgb5, dst); - - y += 32; - u += 16; - v += 16; - } - for (; n < len; ++n) { // Finish off - VP8YuvToRgb(y[0], u[0], v[0], dst); - dst += 3; - y += 1; - u += (n & 1); - v += (n & 1); - } -} - -static void YuvToBgrRow_SSE2(const uint8_t* y, - const uint8_t* u, const uint8_t* v, - uint8_t* dst, int len) { - int n; - for (n = 0; n + 32 <= len; n += 32, dst += 32 * 3) { - __m128i R0, R1, R2, R3, G0, G1, G2, G3, B0, B1, B2, B3; - __m128i bgr0, bgr1, bgr2, bgr3, bgr4, bgr5; - - YUV420ToRGB_SSE2(y + 0, u + 0, v + 0, &R0, &G0, &B0); - YUV420ToRGB_SSE2(y + 8, u + 4, v + 4, &R1, &G1, &B1); - YUV420ToRGB_SSE2(y + 16, u + 8, v + 8, &R2, &G2, &B2); - YUV420ToRGB_SSE2(y + 24, u + 12, v + 12, &R3, &G3, &B3); - - // Cast to 8b and store as BBBBGGGGRRRR. - bgr0 = _mm_packus_epi16(B0, B1); - bgr1 = _mm_packus_epi16(B2, B3); - bgr2 = _mm_packus_epi16(G0, G1); - bgr3 = _mm_packus_epi16(G2, G3); - bgr4 = _mm_packus_epi16(R0, R1); - bgr5 = _mm_packus_epi16(R2, R3); - - // Pack as BGRBGRBGRBGR. - PlanarTo24b_SSE2(&bgr0, &bgr1, &bgr2, &bgr3, &bgr4, &bgr5, dst); - - y += 32; - u += 16; - v += 16; - } - for (; n < len; ++n) { // Finish off - VP8YuvToBgr(y[0], u[0], v[0], dst); - dst += 3; - y += 1; - u += (n & 1); - v += (n & 1); - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPInitSamplersSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersSSE2(void) { - WebPSamplers[MODE_RGB] = YuvToRgbRow_SSE2; - WebPSamplers[MODE_RGBA] = YuvToRgbaRow_SSE2; - WebPSamplers[MODE_BGR] = YuvToBgrRow_SSE2; - WebPSamplers[MODE_BGRA] = YuvToBgraRow_SSE2; - WebPSamplers[MODE_ARGB] = YuvToArgbRow_SSE2; -} - -//------------------------------------------------------------------------------ -// RGB24/32 -> YUV converters - -// Load eight 16b-words from *src. -#define LOAD_16(src) _mm_loadu_si128((const __m128i*)(src)) -// Store either 16b-words into *dst -#define STORE_16(V, dst) _mm_storeu_si128((__m128i*)(dst), (V)) - -// Function that inserts a value of the second half of the in buffer in between -// every two char of the first half. -static WEBP_INLINE void RGB24PackedToPlanarHelper_SSE2( - const __m128i* const in /*in[6]*/, __m128i* const out /*out[6]*/) { - out[0] = _mm_unpacklo_epi8(in[0], in[3]); - out[1] = _mm_unpackhi_epi8(in[0], in[3]); - out[2] = _mm_unpacklo_epi8(in[1], in[4]); - out[3] = _mm_unpackhi_epi8(in[1], in[4]); - out[4] = _mm_unpacklo_epi8(in[2], in[5]); - out[5] = _mm_unpackhi_epi8(in[2], in[5]); -} - -// Unpack the 8b input rgbrgbrgbrgb ... as contiguous registers: -// rrrr... rrrr... gggg... gggg... bbbb... bbbb.... -// Similar to PlanarTo24bHelper(), but in reverse order. -static WEBP_INLINE void RGB24PackedToPlanar_SSE2( - const uint8_t* const rgb, __m128i* const out /*out[6]*/) { - __m128i tmp[6]; - tmp[0] = _mm_loadu_si128((const __m128i*)(rgb + 0)); - tmp[1] = _mm_loadu_si128((const __m128i*)(rgb + 16)); - tmp[2] = _mm_loadu_si128((const __m128i*)(rgb + 32)); - tmp[3] = _mm_loadu_si128((const __m128i*)(rgb + 48)); - tmp[4] = _mm_loadu_si128((const __m128i*)(rgb + 64)); - tmp[5] = _mm_loadu_si128((const __m128i*)(rgb + 80)); - - RGB24PackedToPlanarHelper_SSE2(tmp, out); - RGB24PackedToPlanarHelper_SSE2(out, tmp); - RGB24PackedToPlanarHelper_SSE2(tmp, out); - RGB24PackedToPlanarHelper_SSE2(out, tmp); - RGB24PackedToPlanarHelper_SSE2(tmp, out); -} - -// Convert 8 packed ARGB to r[], g[], b[] -static WEBP_INLINE void RGB32PackedToPlanar_SSE2(const uint32_t* const argb, - __m128i* const rgb /*in[6]*/) { - const __m128i zero = _mm_setzero_si128(); - __m128i a0 = LOAD_16(argb + 0); - __m128i a1 = LOAD_16(argb + 4); - __m128i a2 = LOAD_16(argb + 8); - __m128i a3 = LOAD_16(argb + 12); - VP8L32bToPlanar_SSE2(&a0, &a1, &a2, &a3); - rgb[0] = _mm_unpacklo_epi8(a1, zero); - rgb[1] = _mm_unpackhi_epi8(a1, zero); - rgb[2] = _mm_unpacklo_epi8(a2, zero); - rgb[3] = _mm_unpackhi_epi8(a2, zero); - rgb[4] = _mm_unpacklo_epi8(a3, zero); - rgb[5] = _mm_unpackhi_epi8(a3, zero); -} - -// This macro computes (RG * MULT_RG + GB * MULT_GB + ROUNDER) >> DESCALE_FIX -// It's a macro and not a function because we need to use immediate values with -// srai_epi32, e.g. -#define TRANSFORM(RG_LO, RG_HI, GB_LO, GB_HI, MULT_RG, MULT_GB, \ - ROUNDER, DESCALE_FIX, OUT) do { \ - const __m128i V0_lo = _mm_madd_epi16(RG_LO, MULT_RG); \ - const __m128i V0_hi = _mm_madd_epi16(RG_HI, MULT_RG); \ - const __m128i V1_lo = _mm_madd_epi16(GB_LO, MULT_GB); \ - const __m128i V1_hi = _mm_madd_epi16(GB_HI, MULT_GB); \ - const __m128i V2_lo = _mm_add_epi32(V0_lo, V1_lo); \ - const __m128i V2_hi = _mm_add_epi32(V0_hi, V1_hi); \ - const __m128i V3_lo = _mm_add_epi32(V2_lo, ROUNDER); \ - const __m128i V3_hi = _mm_add_epi32(V2_hi, ROUNDER); \ - const __m128i V5_lo = _mm_srai_epi32(V3_lo, DESCALE_FIX); \ - const __m128i V5_hi = _mm_srai_epi32(V3_hi, DESCALE_FIX); \ - (OUT) = _mm_packs_epi32(V5_lo, V5_hi); \ -} while (0) - -#define MK_CST_16(A, B) _mm_set_epi16((B), (A), (B), (A), (B), (A), (B), (A)) -static WEBP_INLINE void ConvertRGBToY_SSE2(const __m128i* const R, - const __m128i* const G, - const __m128i* const B, - __m128i* const Y) { - const __m128i kRG_y = MK_CST_16(16839, 33059 - 16384); - const __m128i kGB_y = MK_CST_16(16384, 6420); - const __m128i kHALF_Y = _mm_set1_epi32((16 << YUV_FIX) + YUV_HALF); - - const __m128i RG_lo = _mm_unpacklo_epi16(*R, *G); - const __m128i RG_hi = _mm_unpackhi_epi16(*R, *G); - const __m128i GB_lo = _mm_unpacklo_epi16(*G, *B); - const __m128i GB_hi = _mm_unpackhi_epi16(*G, *B); - TRANSFORM(RG_lo, RG_hi, GB_lo, GB_hi, kRG_y, kGB_y, kHALF_Y, YUV_FIX, *Y); -} - -static WEBP_INLINE void ConvertRGBToUV_SSE2(const __m128i* const R, - const __m128i* const G, - const __m128i* const B, - __m128i* const U, - __m128i* const V) { - const __m128i kRG_u = MK_CST_16(-9719, -19081); - const __m128i kGB_u = MK_CST_16(0, 28800); - const __m128i kRG_v = MK_CST_16(28800, 0); - const __m128i kGB_v = MK_CST_16(-24116, -4684); - const __m128i kHALF_UV = _mm_set1_epi32(((128 << YUV_FIX) + YUV_HALF) << 2); - - const __m128i RG_lo = _mm_unpacklo_epi16(*R, *G); - const __m128i RG_hi = _mm_unpackhi_epi16(*R, *G); - const __m128i GB_lo = _mm_unpacklo_epi16(*G, *B); - const __m128i GB_hi = _mm_unpackhi_epi16(*G, *B); - TRANSFORM(RG_lo, RG_hi, GB_lo, GB_hi, kRG_u, kGB_u, - kHALF_UV, YUV_FIX + 2, *U); - TRANSFORM(RG_lo, RG_hi, GB_lo, GB_hi, kRG_v, kGB_v, - kHALF_UV, YUV_FIX + 2, *V); -} - -#undef MK_CST_16 -#undef TRANSFORM - -static void ConvertRGB24ToY_SSE2(const uint8_t* rgb, uint8_t* y, int width) { - const int max_width = width & ~31; - int i; - for (i = 0; i < max_width; rgb += 3 * 16 * 2) { - __m128i rgb_plane[6]; - int j; - - RGB24PackedToPlanar_SSE2(rgb, rgb_plane); - - for (j = 0; j < 2; ++j, i += 16) { - const __m128i zero = _mm_setzero_si128(); - __m128i r, g, b, Y0, Y1; - - // Convert to 16-bit Y. - r = _mm_unpacklo_epi8(rgb_plane[0 + j], zero); - g = _mm_unpacklo_epi8(rgb_plane[2 + j], zero); - b = _mm_unpacklo_epi8(rgb_plane[4 + j], zero); - ConvertRGBToY_SSE2(&r, &g, &b, &Y0); - - // Convert to 16-bit Y. - r = _mm_unpackhi_epi8(rgb_plane[0 + j], zero); - g = _mm_unpackhi_epi8(rgb_plane[2 + j], zero); - b = _mm_unpackhi_epi8(rgb_plane[4 + j], zero); - ConvertRGBToY_SSE2(&r, &g, &b, &Y1); - - // Cast to 8-bit and store. - STORE_16(_mm_packus_epi16(Y0, Y1), y + i); - } - } - for (; i < width; ++i, rgb += 3) { // left-over - y[i] = VP8RGBToY(rgb[0], rgb[1], rgb[2], YUV_HALF); - } -} - -static void ConvertBGR24ToY_SSE2(const uint8_t* bgr, uint8_t* y, int width) { - const int max_width = width & ~31; - int i; - for (i = 0; i < max_width; bgr += 3 * 16 * 2) { - __m128i bgr_plane[6]; - int j; - - RGB24PackedToPlanar_SSE2(bgr, bgr_plane); - - for (j = 0; j < 2; ++j, i += 16) { - const __m128i zero = _mm_setzero_si128(); - __m128i r, g, b, Y0, Y1; - - // Convert to 16-bit Y. - b = _mm_unpacklo_epi8(bgr_plane[0 + j], zero); - g = _mm_unpacklo_epi8(bgr_plane[2 + j], zero); - r = _mm_unpacklo_epi8(bgr_plane[4 + j], zero); - ConvertRGBToY_SSE2(&r, &g, &b, &Y0); - - // Convert to 16-bit Y. - b = _mm_unpackhi_epi8(bgr_plane[0 + j], zero); - g = _mm_unpackhi_epi8(bgr_plane[2 + j], zero); - r = _mm_unpackhi_epi8(bgr_plane[4 + j], zero); - ConvertRGBToY_SSE2(&r, &g, &b, &Y1); - - // Cast to 8-bit and store. - STORE_16(_mm_packus_epi16(Y0, Y1), y + i); - } - } - for (; i < width; ++i, bgr += 3) { // left-over - y[i] = VP8RGBToY(bgr[2], bgr[1], bgr[0], YUV_HALF); - } -} - -static void ConvertARGBToY_SSE2(const uint32_t* argb, uint8_t* y, int width) { - const int max_width = width & ~15; - int i; - for (i = 0; i < max_width; i += 16) { - __m128i Y0, Y1, rgb[6]; - RGB32PackedToPlanar_SSE2(&argb[i], rgb); - ConvertRGBToY_SSE2(&rgb[0], &rgb[2], &rgb[4], &Y0); - ConvertRGBToY_SSE2(&rgb[1], &rgb[3], &rgb[5], &Y1); - STORE_16(_mm_packus_epi16(Y0, Y1), y + i); - } - for (; i < width; ++i) { // left-over - const uint32_t p = argb[i]; - y[i] = VP8RGBToY((p >> 16) & 0xff, (p >> 8) & 0xff, (p >> 0) & 0xff, - YUV_HALF); - } -} - -// Horizontal add (doubled) of two 16b values, result is 16b. -// in: A | B | C | D | ... -> out: 2*(A+B) | 2*(C+D) | ... -static void HorizontalAddPack_SSE2(const __m128i* const A, - const __m128i* const B, - __m128i* const out) { - const __m128i k2 = _mm_set1_epi16(2); - const __m128i C = _mm_madd_epi16(*A, k2); - const __m128i D = _mm_madd_epi16(*B, k2); - *out = _mm_packs_epi32(C, D); -} - -static void ConvertARGBToUV_SSE2(const uint32_t* argb, - uint8_t* u, uint8_t* v, - int src_width, int do_store) { - const int max_width = src_width & ~31; - int i; - for (i = 0; i < max_width; i += 32, u += 16, v += 16) { - __m128i rgb[6], U0, V0, U1, V1; - RGB32PackedToPlanar_SSE2(&argb[i], rgb); - HorizontalAddPack_SSE2(&rgb[0], &rgb[1], &rgb[0]); - HorizontalAddPack_SSE2(&rgb[2], &rgb[3], &rgb[2]); - HorizontalAddPack_SSE2(&rgb[4], &rgb[5], &rgb[4]); - ConvertRGBToUV_SSE2(&rgb[0], &rgb[2], &rgb[4], &U0, &V0); - - RGB32PackedToPlanar_SSE2(&argb[i + 16], rgb); - HorizontalAddPack_SSE2(&rgb[0], &rgb[1], &rgb[0]); - HorizontalAddPack_SSE2(&rgb[2], &rgb[3], &rgb[2]); - HorizontalAddPack_SSE2(&rgb[4], &rgb[5], &rgb[4]); - ConvertRGBToUV_SSE2(&rgb[0], &rgb[2], &rgb[4], &U1, &V1); - - U0 = _mm_packus_epi16(U0, U1); - V0 = _mm_packus_epi16(V0, V1); - if (!do_store) { - const __m128i prev_u = LOAD_16(u); - const __m128i prev_v = LOAD_16(v); - U0 = _mm_avg_epu8(U0, prev_u); - V0 = _mm_avg_epu8(V0, prev_v); - } - STORE_16(U0, u); - STORE_16(V0, v); - } - if (i < src_width) { // left-over - WebPConvertARGBToUV_C(argb + i, u, v, src_width - i, do_store); - } -} - -// Convert 16 packed ARGB 16b-values to r[], g[], b[] -static WEBP_INLINE void RGBA32PackedToPlanar_16b_SSE2( - const uint16_t* const rgbx, - __m128i* const r, __m128i* const g, __m128i* const b) { - const __m128i in0 = LOAD_16(rgbx + 0); // r0 | g0 | b0 |x| r1 | g1 | b1 |x - const __m128i in1 = LOAD_16(rgbx + 8); // r2 | g2 | b2 |x| r3 | g3 | b3 |x - const __m128i in2 = LOAD_16(rgbx + 16); // r4 | ... - const __m128i in3 = LOAD_16(rgbx + 24); // r6 | ... - // column-wise transpose - const __m128i A0 = _mm_unpacklo_epi16(in0, in1); - const __m128i A1 = _mm_unpackhi_epi16(in0, in1); - const __m128i A2 = _mm_unpacklo_epi16(in2, in3); - const __m128i A3 = _mm_unpackhi_epi16(in2, in3); - const __m128i B0 = _mm_unpacklo_epi16(A0, A1); // r0 r1 r2 r3 | g0 g1 .. - const __m128i B1 = _mm_unpackhi_epi16(A0, A1); // b0 b1 b2 b3 | x x x x - const __m128i B2 = _mm_unpacklo_epi16(A2, A3); // r4 r5 r6 r7 | g4 g5 .. - const __m128i B3 = _mm_unpackhi_epi16(A2, A3); // b4 b5 b6 b7 | x x x x - *r = _mm_unpacklo_epi64(B0, B2); - *g = _mm_unpackhi_epi64(B0, B2); - *b = _mm_unpacklo_epi64(B1, B3); -} - -static void ConvertRGBA32ToUV_SSE2(const uint16_t* rgb, - uint8_t* u, uint8_t* v, int width) { - const int max_width = width & ~15; - const uint16_t* const last_rgb = rgb + 4 * max_width; - while (rgb < last_rgb) { - __m128i r, g, b, U0, V0, U1, V1; - RGBA32PackedToPlanar_16b_SSE2(rgb + 0, &r, &g, &b); - ConvertRGBToUV_SSE2(&r, &g, &b, &U0, &V0); - RGBA32PackedToPlanar_16b_SSE2(rgb + 32, &r, &g, &b); - ConvertRGBToUV_SSE2(&r, &g, &b, &U1, &V1); - STORE_16(_mm_packus_epi16(U0, U1), u); - STORE_16(_mm_packus_epi16(V0, V1), v); - u += 16; - v += 16; - rgb += 2 * 32; - } - if (max_width < width) { // left-over - WebPConvertRGBA32ToUV_C(rgb, u, v, width - max_width); - } -} - -//------------------------------------------------------------------------------ - -extern void WebPInitConvertARGBToYUVSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitConvertARGBToYUVSSE2(void) { - WebPConvertARGBToY = ConvertARGBToY_SSE2; - WebPConvertARGBToUV = ConvertARGBToUV_SSE2; - - WebPConvertRGB24ToY = ConvertRGB24ToY_SSE2; - WebPConvertBGR24ToY = ConvertBGR24ToY_SSE2; - - WebPConvertRGBA32ToUV = ConvertRGBA32ToUV_SSE2; -} - -//------------------------------------------------------------------------------ - -#define MAX_Y ((1 << 10) - 1) // 10b precision over 16b-arithmetic -static uint16_t clip_y(int v) { - return (v < 0) ? 0 : (v > MAX_Y) ? MAX_Y : (uint16_t)v; -} - -static uint64_t SharpYUVUpdateY_SSE2(const uint16_t* ref, const uint16_t* src, - uint16_t* dst, int len) { - uint64_t diff = 0; - uint32_t tmp[4]; - int i; - const __m128i zero = _mm_setzero_si128(); - const __m128i max = _mm_set1_epi16(MAX_Y); - const __m128i one = _mm_set1_epi16(1); - __m128i sum = zero; - - for (i = 0; i + 8 <= len; i += 8) { - const __m128i A = _mm_loadu_si128((const __m128i*)(ref + i)); - const __m128i B = _mm_loadu_si128((const __m128i*)(src + i)); - const __m128i C = _mm_loadu_si128((const __m128i*)(dst + i)); - const __m128i D = _mm_sub_epi16(A, B); // diff_y - const __m128i E = _mm_cmpgt_epi16(zero, D); // sign (-1 or 0) - const __m128i F = _mm_add_epi16(C, D); // new_y - const __m128i G = _mm_or_si128(E, one); // -1 or 1 - const __m128i H = _mm_max_epi16(_mm_min_epi16(F, max), zero); - const __m128i I = _mm_madd_epi16(D, G); // sum(abs(...)) - _mm_storeu_si128((__m128i*)(dst + i), H); - sum = _mm_add_epi32(sum, I); - } - _mm_storeu_si128((__m128i*)tmp, sum); - diff = tmp[3] + tmp[2] + tmp[1] + tmp[0]; - for (; i < len; ++i) { - const int diff_y = ref[i] - src[i]; - const int new_y = (int)dst[i] + diff_y; - dst[i] = clip_y(new_y); - diff += (uint64_t)abs(diff_y); - } - return diff; -} - -static void SharpYUVUpdateRGB_SSE2(const int16_t* ref, const int16_t* src, - int16_t* dst, int len) { - int i = 0; - for (i = 0; i + 8 <= len; i += 8) { - const __m128i A = _mm_loadu_si128((const __m128i*)(ref + i)); - const __m128i B = _mm_loadu_si128((const __m128i*)(src + i)); - const __m128i C = _mm_loadu_si128((const __m128i*)(dst + i)); - const __m128i D = _mm_sub_epi16(A, B); // diff_uv - const __m128i E = _mm_add_epi16(C, D); // new_uv - _mm_storeu_si128((__m128i*)(dst + i), E); - } - for (; i < len; ++i) { - const int diff_uv = ref[i] - src[i]; - dst[i] += diff_uv; - } -} - -static void SharpYUVFilterRow_SSE2(const int16_t* A, const int16_t* B, int len, - const uint16_t* best_y, uint16_t* out) { - int i; - const __m128i kCst8 = _mm_set1_epi16(8); - const __m128i max = _mm_set1_epi16(MAX_Y); - const __m128i zero = _mm_setzero_si128(); - for (i = 0; i + 8 <= len; i += 8) { - const __m128i a0 = _mm_loadu_si128((const __m128i*)(A + i + 0)); - const __m128i a1 = _mm_loadu_si128((const __m128i*)(A + i + 1)); - const __m128i b0 = _mm_loadu_si128((const __m128i*)(B + i + 0)); - const __m128i b1 = _mm_loadu_si128((const __m128i*)(B + i + 1)); - const __m128i a0b1 = _mm_add_epi16(a0, b1); - const __m128i a1b0 = _mm_add_epi16(a1, b0); - const __m128i a0a1b0b1 = _mm_add_epi16(a0b1, a1b0); // A0+A1+B0+B1 - const __m128i a0a1b0b1_8 = _mm_add_epi16(a0a1b0b1, kCst8); - const __m128i a0b1_2 = _mm_add_epi16(a0b1, a0b1); // 2*(A0+B1) - const __m128i a1b0_2 = _mm_add_epi16(a1b0, a1b0); // 2*(A1+B0) - const __m128i c0 = _mm_srai_epi16(_mm_add_epi16(a0b1_2, a0a1b0b1_8), 3); - const __m128i c1 = _mm_srai_epi16(_mm_add_epi16(a1b0_2, a0a1b0b1_8), 3); - const __m128i d0 = _mm_add_epi16(c1, a0); - const __m128i d1 = _mm_add_epi16(c0, a1); - const __m128i e0 = _mm_srai_epi16(d0, 1); - const __m128i e1 = _mm_srai_epi16(d1, 1); - const __m128i f0 = _mm_unpacklo_epi16(e0, e1); - const __m128i f1 = _mm_unpackhi_epi16(e0, e1); - const __m128i g0 = _mm_loadu_si128((const __m128i*)(best_y + 2 * i + 0)); - const __m128i g1 = _mm_loadu_si128((const __m128i*)(best_y + 2 * i + 8)); - const __m128i h0 = _mm_add_epi16(g0, f0); - const __m128i h1 = _mm_add_epi16(g1, f1); - const __m128i i0 = _mm_max_epi16(_mm_min_epi16(h0, max), zero); - const __m128i i1 = _mm_max_epi16(_mm_min_epi16(h1, max), zero); - _mm_storeu_si128((__m128i*)(out + 2 * i + 0), i0); - _mm_storeu_si128((__m128i*)(out + 2 * i + 8), i1); - } - for (; i < len; ++i) { - // (9 * A0 + 3 * A1 + 3 * B0 + B1 + 8) >> 4 = - // = (8 * A0 + 2 * (A1 + B0) + (A0 + A1 + B0 + B1 + 8)) >> 4 - // We reuse the common sub-expressions. - const int a0b1 = A[i + 0] + B[i + 1]; - const int a1b0 = A[i + 1] + B[i + 0]; - const int a0a1b0b1 = a0b1 + a1b0 + 8; - const int v0 = (8 * A[i + 0] + 2 * a1b0 + a0a1b0b1) >> 4; - const int v1 = (8 * A[i + 1] + 2 * a0b1 + a0a1b0b1) >> 4; - out[2 * i + 0] = clip_y(best_y[2 * i + 0] + v0); - out[2 * i + 1] = clip_y(best_y[2 * i + 1] + v1); - } -} - -#undef MAX_Y - -//------------------------------------------------------------------------------ - -extern void WebPInitSharpYUVSSE2(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitSharpYUVSSE2(void) { - WebPSharpYUVUpdateY = SharpYUVUpdateY_SSE2; - WebPSharpYUVUpdateRGB = SharpYUVUpdateRGB_SSE2; - WebPSharpYUVFilterRow = SharpYUVFilterRow_SSE2; -} - -#else // !WEBP_USE_SSE2 - -WEBP_DSP_INIT_STUB(WebPInitSamplersSSE2) -WEBP_DSP_INIT_STUB(WebPInitConvertARGBToYUVSSE2) -WEBP_DSP_INIT_STUB(WebPInitSharpYUVSSE2) - -#endif // WEBP_USE_SSE2 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_sse41.c b/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_sse41.c deleted file mode 100644 index 2521420..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/dsp/yuv_sse41.c +++ /dev/null @@ -1,613 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// YUV->RGB conversion functions -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/dsp/yuv.h" - -#if defined(WEBP_USE_SSE41) - -#include "src/dsp/common_sse41.h" -#include -#include - -//----------------------------------------------------------------------------- -// Convert spans of 32 pixels to various RGB formats for the fancy upsampler. - -// These constants are 14b fixed-point version of ITU-R BT.601 constants. -// R = (19077 * y + 26149 * v - 14234) >> 6 -// G = (19077 * y - 6419 * u - 13320 * v + 8708) >> 6 -// B = (19077 * y + 33050 * u - 17685) >> 6 -static void ConvertYUV444ToRGB_SSE41(const __m128i* const Y0, - const __m128i* const U0, - const __m128i* const V0, - __m128i* const R, - __m128i* const G, - __m128i* const B) { - const __m128i k19077 = _mm_set1_epi16(19077); - const __m128i k26149 = _mm_set1_epi16(26149); - const __m128i k14234 = _mm_set1_epi16(14234); - // 33050 doesn't fit in a signed short: only use this with unsigned arithmetic - const __m128i k33050 = _mm_set1_epi16((short)33050); - const __m128i k17685 = _mm_set1_epi16(17685); - const __m128i k6419 = _mm_set1_epi16(6419); - const __m128i k13320 = _mm_set1_epi16(13320); - const __m128i k8708 = _mm_set1_epi16(8708); - - const __m128i Y1 = _mm_mulhi_epu16(*Y0, k19077); - - const __m128i R0 = _mm_mulhi_epu16(*V0, k26149); - const __m128i R1 = _mm_sub_epi16(Y1, k14234); - const __m128i R2 = _mm_add_epi16(R1, R0); - - const __m128i G0 = _mm_mulhi_epu16(*U0, k6419); - const __m128i G1 = _mm_mulhi_epu16(*V0, k13320); - const __m128i G2 = _mm_add_epi16(Y1, k8708); - const __m128i G3 = _mm_add_epi16(G0, G1); - const __m128i G4 = _mm_sub_epi16(G2, G3); - - // be careful with the saturated *unsigned* arithmetic here! - const __m128i B0 = _mm_mulhi_epu16(*U0, k33050); - const __m128i B1 = _mm_adds_epu16(B0, Y1); - const __m128i B2 = _mm_subs_epu16(B1, k17685); - - // use logical shift for B2, which can be larger than 32767 - *R = _mm_srai_epi16(R2, 6); // range: [-14234, 30815] - *G = _mm_srai_epi16(G4, 6); // range: [-10953, 27710] - *B = _mm_srli_epi16(B2, 6); // range: [0, 34238] -} - -// Load the bytes into the *upper* part of 16b words. That's "<< 8", basically. -static WEBP_INLINE __m128i Load_HI_16_SSE41(const uint8_t* src) { - const __m128i zero = _mm_setzero_si128(); - return _mm_unpacklo_epi8(zero, _mm_loadl_epi64((const __m128i*)src)); -} - -// Load and replicate the U/V samples -static WEBP_INLINE __m128i Load_UV_HI_8_SSE41(const uint8_t* src) { - const __m128i zero = _mm_setzero_si128(); - const __m128i tmp0 = _mm_cvtsi32_si128(*(const uint32_t*)src); - const __m128i tmp1 = _mm_unpacklo_epi8(zero, tmp0); - return _mm_unpacklo_epi16(tmp1, tmp1); // replicate samples -} - -// Convert 32 samples of YUV444 to R/G/B -static void YUV444ToRGB_SSE41(const uint8_t* const y, - const uint8_t* const u, - const uint8_t* const v, - __m128i* const R, __m128i* const G, - __m128i* const B) { - const __m128i Y0 = Load_HI_16_SSE41(y), U0 = Load_HI_16_SSE41(u), - V0 = Load_HI_16_SSE41(v); - ConvertYUV444ToRGB_SSE41(&Y0, &U0, &V0, R, G, B); -} - -// Convert 32 samples of YUV420 to R/G/B -static void YUV420ToRGB_SSE41(const uint8_t* const y, - const uint8_t* const u, - const uint8_t* const v, - __m128i* const R, __m128i* const G, - __m128i* const B) { - const __m128i Y0 = Load_HI_16_SSE41(y), U0 = Load_UV_HI_8_SSE41(u), - V0 = Load_UV_HI_8_SSE41(v); - ConvertYUV444ToRGB_SSE41(&Y0, &U0, &V0, R, G, B); -} - -// Pack the planar buffers -// rrrr... rrrr... gggg... gggg... bbbb... bbbb.... -// triplet by triplet in the output buffer rgb as rgbrgbrgbrgb ... -static WEBP_INLINE void PlanarTo24b_SSE41( - __m128i* const in0, __m128i* const in1, __m128i* const in2, - __m128i* const in3, __m128i* const in4, __m128i* const in5, - uint8_t* const rgb) { - // The input is 6 registers of sixteen 8b but for the sake of explanation, - // let's take 6 registers of four 8b values. - // To pack, we will keep taking one every two 8b integer and move it - // around as follows: - // Input: - // r0r1r2r3 | r4r5r6r7 | g0g1g2g3 | g4g5g6g7 | b0b1b2b3 | b4b5b6b7 - // Split the 6 registers in two sets of 3 registers: the first set as the even - // 8b bytes, the second the odd ones: - // r0r2r4r6 | g0g2g4g6 | b0b2b4b6 | r1r3r5r7 | g1g3g5g7 | b1b3b5b7 - // Repeat the same permutations twice more: - // r0r4g0g4 | b0b4r1r5 | g1g5b1b5 | r2r6g2g6 | b2b6r3r7 | g3g7b3b7 - // r0g0b0r1 | g1b1r2g2 | b2r3g3b3 | r4g4b4r5 | g5b5r6g6 | b6r7g7b7 - VP8PlanarTo24b_SSE41(in0, in1, in2, in3, in4, in5); - - _mm_storeu_si128((__m128i*)(rgb + 0), *in0); - _mm_storeu_si128((__m128i*)(rgb + 16), *in1); - _mm_storeu_si128((__m128i*)(rgb + 32), *in2); - _mm_storeu_si128((__m128i*)(rgb + 48), *in3); - _mm_storeu_si128((__m128i*)(rgb + 64), *in4); - _mm_storeu_si128((__m128i*)(rgb + 80), *in5); -} - -void VP8YuvToRgb32_SSE41(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst) { - __m128i R0, R1, R2, R3, G0, G1, G2, G3, B0, B1, B2, B3; - __m128i rgb0, rgb1, rgb2, rgb3, rgb4, rgb5; - - YUV444ToRGB_SSE41(y + 0, u + 0, v + 0, &R0, &G0, &B0); - YUV444ToRGB_SSE41(y + 8, u + 8, v + 8, &R1, &G1, &B1); - YUV444ToRGB_SSE41(y + 16, u + 16, v + 16, &R2, &G2, &B2); - YUV444ToRGB_SSE41(y + 24, u + 24, v + 24, &R3, &G3, &B3); - - // Cast to 8b and store as RRRRGGGGBBBB. - rgb0 = _mm_packus_epi16(R0, R1); - rgb1 = _mm_packus_epi16(R2, R3); - rgb2 = _mm_packus_epi16(G0, G1); - rgb3 = _mm_packus_epi16(G2, G3); - rgb4 = _mm_packus_epi16(B0, B1); - rgb5 = _mm_packus_epi16(B2, B3); - - // Pack as RGBRGBRGBRGB. - PlanarTo24b_SSE41(&rgb0, &rgb1, &rgb2, &rgb3, &rgb4, &rgb5, dst); -} - -void VP8YuvToBgr32_SSE41(const uint8_t* y, const uint8_t* u, const uint8_t* v, - uint8_t* dst) { - __m128i R0, R1, R2, R3, G0, G1, G2, G3, B0, B1, B2, B3; - __m128i bgr0, bgr1, bgr2, bgr3, bgr4, bgr5; - - YUV444ToRGB_SSE41(y + 0, u + 0, v + 0, &R0, &G0, &B0); - YUV444ToRGB_SSE41(y + 8, u + 8, v + 8, &R1, &G1, &B1); - YUV444ToRGB_SSE41(y + 16, u + 16, v + 16, &R2, &G2, &B2); - YUV444ToRGB_SSE41(y + 24, u + 24, v + 24, &R3, &G3, &B3); - - // Cast to 8b and store as BBBBGGGGRRRR. - bgr0 = _mm_packus_epi16(B0, B1); - bgr1 = _mm_packus_epi16(B2, B3); - bgr2 = _mm_packus_epi16(G0, G1); - bgr3 = _mm_packus_epi16(G2, G3); - bgr4 = _mm_packus_epi16(R0, R1); - bgr5= _mm_packus_epi16(R2, R3); - - // Pack as BGRBGRBGRBGR. - PlanarTo24b_SSE41(&bgr0, &bgr1, &bgr2, &bgr3, &bgr4, &bgr5, dst); -} - -//----------------------------------------------------------------------------- -// Arbitrary-length row conversion functions - -static void YuvToRgbRow_SSE41(const uint8_t* y, - const uint8_t* u, const uint8_t* v, - uint8_t* dst, int len) { - int n; - for (n = 0; n + 32 <= len; n += 32, dst += 32 * 3) { - __m128i R0, R1, R2, R3, G0, G1, G2, G3, B0, B1, B2, B3; - __m128i rgb0, rgb1, rgb2, rgb3, rgb4, rgb5; - - YUV420ToRGB_SSE41(y + 0, u + 0, v + 0, &R0, &G0, &B0); - YUV420ToRGB_SSE41(y + 8, u + 4, v + 4, &R1, &G1, &B1); - YUV420ToRGB_SSE41(y + 16, u + 8, v + 8, &R2, &G2, &B2); - YUV420ToRGB_SSE41(y + 24, u + 12, v + 12, &R3, &G3, &B3); - - // Cast to 8b and store as RRRRGGGGBBBB. - rgb0 = _mm_packus_epi16(R0, R1); - rgb1 = _mm_packus_epi16(R2, R3); - rgb2 = _mm_packus_epi16(G0, G1); - rgb3 = _mm_packus_epi16(G2, G3); - rgb4 = _mm_packus_epi16(B0, B1); - rgb5 = _mm_packus_epi16(B2, B3); - - // Pack as RGBRGBRGBRGB. - PlanarTo24b_SSE41(&rgb0, &rgb1, &rgb2, &rgb3, &rgb4, &rgb5, dst); - - y += 32; - u += 16; - v += 16; - } - for (; n < len; ++n) { // Finish off - VP8YuvToRgb(y[0], u[0], v[0], dst); - dst += 3; - y += 1; - u += (n & 1); - v += (n & 1); - } -} - -static void YuvToBgrRow_SSE41(const uint8_t* y, - const uint8_t* u, const uint8_t* v, - uint8_t* dst, int len) { - int n; - for (n = 0; n + 32 <= len; n += 32, dst += 32 * 3) { - __m128i R0, R1, R2, R3, G0, G1, G2, G3, B0, B1, B2, B3; - __m128i bgr0, bgr1, bgr2, bgr3, bgr4, bgr5; - - YUV420ToRGB_SSE41(y + 0, u + 0, v + 0, &R0, &G0, &B0); - YUV420ToRGB_SSE41(y + 8, u + 4, v + 4, &R1, &G1, &B1); - YUV420ToRGB_SSE41(y + 16, u + 8, v + 8, &R2, &G2, &B2); - YUV420ToRGB_SSE41(y + 24, u + 12, v + 12, &R3, &G3, &B3); - - // Cast to 8b and store as BBBBGGGGRRRR. - bgr0 = _mm_packus_epi16(B0, B1); - bgr1 = _mm_packus_epi16(B2, B3); - bgr2 = _mm_packus_epi16(G0, G1); - bgr3 = _mm_packus_epi16(G2, G3); - bgr4 = _mm_packus_epi16(R0, R1); - bgr5 = _mm_packus_epi16(R2, R3); - - // Pack as BGRBGRBGRBGR. - PlanarTo24b_SSE41(&bgr0, &bgr1, &bgr2, &bgr3, &bgr4, &bgr5, dst); - - y += 32; - u += 16; - v += 16; - } - for (; n < len; ++n) { // Finish off - VP8YuvToBgr(y[0], u[0], v[0], dst); - dst += 3; - y += 1; - u += (n & 1); - v += (n & 1); - } -} - -//------------------------------------------------------------------------------ -// Entry point - -extern void WebPInitSamplersSSE41(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersSSE41(void) { - WebPSamplers[MODE_RGB] = YuvToRgbRow_SSE41; - WebPSamplers[MODE_BGR] = YuvToBgrRow_SSE41; -} - -//------------------------------------------------------------------------------ -// RGB24/32 -> YUV converters - -// Load eight 16b-words from *src. -#define LOAD_16(src) _mm_loadu_si128((const __m128i*)(src)) -// Store either 16b-words into *dst -#define STORE_16(V, dst) _mm_storeu_si128((__m128i*)(dst), (V)) - -#define WEBP_SSE41_SHUFF(OUT) do { \ - const __m128i tmp0 = _mm_shuffle_epi8(A0, shuff0); \ - const __m128i tmp1 = _mm_shuffle_epi8(A1, shuff1); \ - const __m128i tmp2 = _mm_shuffle_epi8(A2, shuff2); \ - const __m128i tmp3 = _mm_shuffle_epi8(A3, shuff0); \ - const __m128i tmp4 = _mm_shuffle_epi8(A4, shuff1); \ - const __m128i tmp5 = _mm_shuffle_epi8(A5, shuff2); \ - \ - /* OR everything to get one channel */ \ - const __m128i tmp6 = _mm_or_si128(tmp0, tmp1); \ - const __m128i tmp7 = _mm_or_si128(tmp3, tmp4); \ - out[OUT + 0] = _mm_or_si128(tmp6, tmp2); \ - out[OUT + 1] = _mm_or_si128(tmp7, tmp5); \ -} while (0); - -// Unpack the 8b input rgbrgbrgbrgb ... as contiguous registers: -// rrrr... rrrr... gggg... gggg... bbbb... bbbb.... -// Similar to PlanarTo24bHelper(), but in reverse order. -static WEBP_INLINE void RGB24PackedToPlanar_SSE41( - const uint8_t* const rgb, __m128i* const out /*out[6]*/) { - const __m128i A0 = _mm_loadu_si128((const __m128i*)(rgb + 0)); - const __m128i A1 = _mm_loadu_si128((const __m128i*)(rgb + 16)); - const __m128i A2 = _mm_loadu_si128((const __m128i*)(rgb + 32)); - const __m128i A3 = _mm_loadu_si128((const __m128i*)(rgb + 48)); - const __m128i A4 = _mm_loadu_si128((const __m128i*)(rgb + 64)); - const __m128i A5 = _mm_loadu_si128((const __m128i*)(rgb + 80)); - - // Compute RR. - { - const __m128i shuff0 = _mm_set_epi8( - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15, 12, 9, 6, 3, 0); - const __m128i shuff1 = _mm_set_epi8( - -1, -1, -1, -1, -1, 14, 11, 8, 5, 2, -1, -1, -1, -1, -1, -1); - const __m128i shuff2 = _mm_set_epi8( - 13, 10, 7, 4, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1); - WEBP_SSE41_SHUFF(0) - } - // Compute GG. - { - const __m128i shuff0 = _mm_set_epi8( - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, 10, 7, 4, 1); - const __m128i shuff1 = _mm_set_epi8( - -1, -1, -1, -1, -1, 15, 12, 9, 6, 3, 0, -1, -1, -1, -1, -1); - const __m128i shuff2 = _mm_set_epi8( - 14, 11, 8, 5, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1); - WEBP_SSE41_SHUFF(2) - } - // Compute BB. - { - const __m128i shuff0 = _mm_set_epi8( - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14, 11, 8, 5, 2); - const __m128i shuff1 = _mm_set_epi8( - -1, -1, -1, -1, -1, -1, 13, 10, 7, 4, 1, -1, -1, -1, -1, -1); - const __m128i shuff2 = _mm_set_epi8( - 15, 12, 9, 6, 3, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1); - WEBP_SSE41_SHUFF(4) - } -} - -#undef WEBP_SSE41_SHUFF - -// Convert 8 packed ARGB to r[], g[], b[] -static WEBP_INLINE void RGB32PackedToPlanar_SSE41( - const uint32_t* const argb, __m128i* const rgb /*in[6]*/) { - const __m128i zero = _mm_setzero_si128(); - __m128i a0 = LOAD_16(argb + 0); - __m128i a1 = LOAD_16(argb + 4); - __m128i a2 = LOAD_16(argb + 8); - __m128i a3 = LOAD_16(argb + 12); - VP8L32bToPlanar_SSE41(&a0, &a1, &a2, &a3); - rgb[0] = _mm_unpacklo_epi8(a1, zero); - rgb[1] = _mm_unpackhi_epi8(a1, zero); - rgb[2] = _mm_unpacklo_epi8(a2, zero); - rgb[3] = _mm_unpackhi_epi8(a2, zero); - rgb[4] = _mm_unpacklo_epi8(a3, zero); - rgb[5] = _mm_unpackhi_epi8(a3, zero); -} - -// This macro computes (RG * MULT_RG + GB * MULT_GB + ROUNDER) >> DESCALE_FIX -// It's a macro and not a function because we need to use immediate values with -// srai_epi32, e.g. -#define TRANSFORM(RG_LO, RG_HI, GB_LO, GB_HI, MULT_RG, MULT_GB, \ - ROUNDER, DESCALE_FIX, OUT) do { \ - const __m128i V0_lo = _mm_madd_epi16(RG_LO, MULT_RG); \ - const __m128i V0_hi = _mm_madd_epi16(RG_HI, MULT_RG); \ - const __m128i V1_lo = _mm_madd_epi16(GB_LO, MULT_GB); \ - const __m128i V1_hi = _mm_madd_epi16(GB_HI, MULT_GB); \ - const __m128i V2_lo = _mm_add_epi32(V0_lo, V1_lo); \ - const __m128i V2_hi = _mm_add_epi32(V0_hi, V1_hi); \ - const __m128i V3_lo = _mm_add_epi32(V2_lo, ROUNDER); \ - const __m128i V3_hi = _mm_add_epi32(V2_hi, ROUNDER); \ - const __m128i V5_lo = _mm_srai_epi32(V3_lo, DESCALE_FIX); \ - const __m128i V5_hi = _mm_srai_epi32(V3_hi, DESCALE_FIX); \ - (OUT) = _mm_packs_epi32(V5_lo, V5_hi); \ -} while (0) - -#define MK_CST_16(A, B) _mm_set_epi16((B), (A), (B), (A), (B), (A), (B), (A)) -static WEBP_INLINE void ConvertRGBToY_SSE41(const __m128i* const R, - const __m128i* const G, - const __m128i* const B, - __m128i* const Y) { - const __m128i kRG_y = MK_CST_16(16839, 33059 - 16384); - const __m128i kGB_y = MK_CST_16(16384, 6420); - const __m128i kHALF_Y = _mm_set1_epi32((16 << YUV_FIX) + YUV_HALF); - - const __m128i RG_lo = _mm_unpacklo_epi16(*R, *G); - const __m128i RG_hi = _mm_unpackhi_epi16(*R, *G); - const __m128i GB_lo = _mm_unpacklo_epi16(*G, *B); - const __m128i GB_hi = _mm_unpackhi_epi16(*G, *B); - TRANSFORM(RG_lo, RG_hi, GB_lo, GB_hi, kRG_y, kGB_y, kHALF_Y, YUV_FIX, *Y); -} - -static WEBP_INLINE void ConvertRGBToUV_SSE41(const __m128i* const R, - const __m128i* const G, - const __m128i* const B, - __m128i* const U, - __m128i* const V) { - const __m128i kRG_u = MK_CST_16(-9719, -19081); - const __m128i kGB_u = MK_CST_16(0, 28800); - const __m128i kRG_v = MK_CST_16(28800, 0); - const __m128i kGB_v = MK_CST_16(-24116, -4684); - const __m128i kHALF_UV = _mm_set1_epi32(((128 << YUV_FIX) + YUV_HALF) << 2); - - const __m128i RG_lo = _mm_unpacklo_epi16(*R, *G); - const __m128i RG_hi = _mm_unpackhi_epi16(*R, *G); - const __m128i GB_lo = _mm_unpacklo_epi16(*G, *B); - const __m128i GB_hi = _mm_unpackhi_epi16(*G, *B); - TRANSFORM(RG_lo, RG_hi, GB_lo, GB_hi, kRG_u, kGB_u, - kHALF_UV, YUV_FIX + 2, *U); - TRANSFORM(RG_lo, RG_hi, GB_lo, GB_hi, kRG_v, kGB_v, - kHALF_UV, YUV_FIX + 2, *V); -} - -#undef MK_CST_16 -#undef TRANSFORM - -static void ConvertRGB24ToY_SSE41(const uint8_t* rgb, uint8_t* y, int width) { - const int max_width = width & ~31; - int i; - for (i = 0; i < max_width; rgb += 3 * 16 * 2) { - __m128i rgb_plane[6]; - int j; - - RGB24PackedToPlanar_SSE41(rgb, rgb_plane); - - for (j = 0; j < 2; ++j, i += 16) { - const __m128i zero = _mm_setzero_si128(); - __m128i r, g, b, Y0, Y1; - - // Convert to 16-bit Y. - r = _mm_unpacklo_epi8(rgb_plane[0 + j], zero); - g = _mm_unpacklo_epi8(rgb_plane[2 + j], zero); - b = _mm_unpacklo_epi8(rgb_plane[4 + j], zero); - ConvertRGBToY_SSE41(&r, &g, &b, &Y0); - - // Convert to 16-bit Y. - r = _mm_unpackhi_epi8(rgb_plane[0 + j], zero); - g = _mm_unpackhi_epi8(rgb_plane[2 + j], zero); - b = _mm_unpackhi_epi8(rgb_plane[4 + j], zero); - ConvertRGBToY_SSE41(&r, &g, &b, &Y1); - - // Cast to 8-bit and store. - STORE_16(_mm_packus_epi16(Y0, Y1), y + i); - } - } - for (; i < width; ++i, rgb += 3) { // left-over - y[i] = VP8RGBToY(rgb[0], rgb[1], rgb[2], YUV_HALF); - } -} - -static void ConvertBGR24ToY_SSE41(const uint8_t* bgr, uint8_t* y, int width) { - const int max_width = width & ~31; - int i; - for (i = 0; i < max_width; bgr += 3 * 16 * 2) { - __m128i bgr_plane[6]; - int j; - - RGB24PackedToPlanar_SSE41(bgr, bgr_plane); - - for (j = 0; j < 2; ++j, i += 16) { - const __m128i zero = _mm_setzero_si128(); - __m128i r, g, b, Y0, Y1; - - // Convert to 16-bit Y. - b = _mm_unpacklo_epi8(bgr_plane[0 + j], zero); - g = _mm_unpacklo_epi8(bgr_plane[2 + j], zero); - r = _mm_unpacklo_epi8(bgr_plane[4 + j], zero); - ConvertRGBToY_SSE41(&r, &g, &b, &Y0); - - // Convert to 16-bit Y. - b = _mm_unpackhi_epi8(bgr_plane[0 + j], zero); - g = _mm_unpackhi_epi8(bgr_plane[2 + j], zero); - r = _mm_unpackhi_epi8(bgr_plane[4 + j], zero); - ConvertRGBToY_SSE41(&r, &g, &b, &Y1); - - // Cast to 8-bit and store. - STORE_16(_mm_packus_epi16(Y0, Y1), y + i); - } - } - for (; i < width; ++i, bgr += 3) { // left-over - y[i] = VP8RGBToY(bgr[2], bgr[1], bgr[0], YUV_HALF); - } -} - -static void ConvertARGBToY_SSE41(const uint32_t* argb, uint8_t* y, int width) { - const int max_width = width & ~15; - int i; - for (i = 0; i < max_width; i += 16) { - __m128i Y0, Y1, rgb[6]; - RGB32PackedToPlanar_SSE41(&argb[i], rgb); - ConvertRGBToY_SSE41(&rgb[0], &rgb[2], &rgb[4], &Y0); - ConvertRGBToY_SSE41(&rgb[1], &rgb[3], &rgb[5], &Y1); - STORE_16(_mm_packus_epi16(Y0, Y1), y + i); - } - for (; i < width; ++i) { // left-over - const uint32_t p = argb[i]; - y[i] = VP8RGBToY((p >> 16) & 0xff, (p >> 8) & 0xff, (p >> 0) & 0xff, - YUV_HALF); - } -} - -// Horizontal add (doubled) of two 16b values, result is 16b. -// in: A | B | C | D | ... -> out: 2*(A+B) | 2*(C+D) | ... -static void HorizontalAddPack_SSE41(const __m128i* const A, - const __m128i* const B, - __m128i* const out) { - const __m128i k2 = _mm_set1_epi16(2); - const __m128i C = _mm_madd_epi16(*A, k2); - const __m128i D = _mm_madd_epi16(*B, k2); - *out = _mm_packs_epi32(C, D); -} - -static void ConvertARGBToUV_SSE41(const uint32_t* argb, - uint8_t* u, uint8_t* v, - int src_width, int do_store) { - const int max_width = src_width & ~31; - int i; - for (i = 0; i < max_width; i += 32, u += 16, v += 16) { - __m128i rgb[6], U0, V0, U1, V1; - RGB32PackedToPlanar_SSE41(&argb[i], rgb); - HorizontalAddPack_SSE41(&rgb[0], &rgb[1], &rgb[0]); - HorizontalAddPack_SSE41(&rgb[2], &rgb[3], &rgb[2]); - HorizontalAddPack_SSE41(&rgb[4], &rgb[5], &rgb[4]); - ConvertRGBToUV_SSE41(&rgb[0], &rgb[2], &rgb[4], &U0, &V0); - - RGB32PackedToPlanar_SSE41(&argb[i + 16], rgb); - HorizontalAddPack_SSE41(&rgb[0], &rgb[1], &rgb[0]); - HorizontalAddPack_SSE41(&rgb[2], &rgb[3], &rgb[2]); - HorizontalAddPack_SSE41(&rgb[4], &rgb[5], &rgb[4]); - ConvertRGBToUV_SSE41(&rgb[0], &rgb[2], &rgb[4], &U1, &V1); - - U0 = _mm_packus_epi16(U0, U1); - V0 = _mm_packus_epi16(V0, V1); - if (!do_store) { - const __m128i prev_u = LOAD_16(u); - const __m128i prev_v = LOAD_16(v); - U0 = _mm_avg_epu8(U0, prev_u); - V0 = _mm_avg_epu8(V0, prev_v); - } - STORE_16(U0, u); - STORE_16(V0, v); - } - if (i < src_width) { // left-over - WebPConvertARGBToUV_C(argb + i, u, v, src_width - i, do_store); - } -} - -// Convert 16 packed ARGB 16b-values to r[], g[], b[] -static WEBP_INLINE void RGBA32PackedToPlanar_16b_SSE41( - const uint16_t* const rgbx, - __m128i* const r, __m128i* const g, __m128i* const b) { - const __m128i in0 = LOAD_16(rgbx + 0); // r0 | g0 | b0 |x| r1 | g1 | b1 |x - const __m128i in1 = LOAD_16(rgbx + 8); // r2 | g2 | b2 |x| r3 | g3 | b3 |x - const __m128i in2 = LOAD_16(rgbx + 16); // r4 | ... - const __m128i in3 = LOAD_16(rgbx + 24); // r6 | ... - // aarrggbb as 16-bit. - const __m128i shuff0 = - _mm_set_epi8(-1, -1, -1, -1, 13, 12, 5, 4, 11, 10, 3, 2, 9, 8, 1, 0); - const __m128i shuff1 = - _mm_set_epi8(13, 12, 5, 4, -1, -1, -1, -1, 11, 10, 3, 2, 9, 8, 1, 0); - const __m128i A0 = _mm_shuffle_epi8(in0, shuff0); - const __m128i A1 = _mm_shuffle_epi8(in1, shuff1); - const __m128i A2 = _mm_shuffle_epi8(in2, shuff0); - const __m128i A3 = _mm_shuffle_epi8(in3, shuff1); - // R0R1G0G1 - // B0B1**** - // R2R3G2G3 - // B2B3**** - // (OR is used to free port 5 for the unpack) - const __m128i B0 = _mm_unpacklo_epi32(A0, A1); - const __m128i B1 = _mm_or_si128(A0, A1); - const __m128i B2 = _mm_unpacklo_epi32(A2, A3); - const __m128i B3 = _mm_or_si128(A2, A3); - // Gather the channels. - *r = _mm_unpacklo_epi64(B0, B2); - *g = _mm_unpackhi_epi64(B0, B2); - *b = _mm_unpackhi_epi64(B1, B3); -} - -static void ConvertRGBA32ToUV_SSE41(const uint16_t* rgb, - uint8_t* u, uint8_t* v, int width) { - const int max_width = width & ~15; - const uint16_t* const last_rgb = rgb + 4 * max_width; - while (rgb < last_rgb) { - __m128i r, g, b, U0, V0, U1, V1; - RGBA32PackedToPlanar_16b_SSE41(rgb + 0, &r, &g, &b); - ConvertRGBToUV_SSE41(&r, &g, &b, &U0, &V0); - RGBA32PackedToPlanar_16b_SSE41(rgb + 32, &r, &g, &b); - ConvertRGBToUV_SSE41(&r, &g, &b, &U1, &V1); - STORE_16(_mm_packus_epi16(U0, U1), u); - STORE_16(_mm_packus_epi16(V0, V1), v); - u += 16; - v += 16; - rgb += 2 * 32; - } - if (max_width < width) { // left-over - WebPConvertRGBA32ToUV_C(rgb, u, v, width - max_width); - } -} - -//------------------------------------------------------------------------------ - -extern void WebPInitConvertARGBToYUVSSE41(void); - -WEBP_TSAN_IGNORE_FUNCTION void WebPInitConvertARGBToYUVSSE41(void) { - WebPConvertARGBToY = ConvertARGBToY_SSE41; - WebPConvertARGBToUV = ConvertARGBToUV_SSE41; - - WebPConvertRGB24ToY = ConvertRGB24ToY_SSE41; - WebPConvertBGR24ToY = ConvertBGR24ToY_SSE41; - - WebPConvertRGBA32ToUV = ConvertRGBA32ToUV_SSE41; -} - -//------------------------------------------------------------------------------ - -#else // !WEBP_USE_SSE41 - -WEBP_DSP_INIT_STUB(WebPInitSamplersSSE41) -WEBP_DSP_INIT_STUB(WebPInitConvertARGBToYUVSSE41) - -#endif // WEBP_USE_SSE41 diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/alpha_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/alpha_enc.c deleted file mode 100644 index 581f373..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/alpha_enc.c +++ /dev/null @@ -1,443 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Alpha-plane compression. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include - -#include "src/enc/vp8i_enc.h" -#include "src/dsp/dsp.h" -#include "src/utils/filters_utils.h" -#include "src/utils/quant_levels_utils.h" -#include "src/utils/utils.h" -#include "src/webp/format_constants.h" - -// ----------------------------------------------------------------------------- -// Encodes the given alpha data via specified compression method 'method'. -// The pre-processing (quantization) is performed if 'quality' is less than 100. -// For such cases, the encoding is lossy. The valid range is [0, 100] for -// 'quality' and [0, 1] for 'method': -// 'method = 0' - No compression; -// 'method = 1' - Use lossless coder on the alpha plane only -// 'filter' values [0, 4] correspond to prediction modes none, horizontal, -// vertical & gradient filters. The prediction mode 4 will try all the -// prediction modes 0 to 3 and pick the best one. -// 'effort_level': specifies how much effort must be spent to try and reduce -// the compressed output size. In range 0 (quick) to 6 (slow). -// -// 'output' corresponds to the buffer containing compressed alpha data. -// This buffer is allocated by this method and caller should call -// WebPSafeFree(*output) when done. -// 'output_size' corresponds to size of this compressed alpha buffer. -// -// Returns 1 on successfully encoding the alpha and -// 0 if either: -// invalid quality or method, or -// memory allocation for the compressed data fails. - -#include "src/enc/vp8li_enc.h" - -static int EncodeLossless(const uint8_t* const data, int width, int height, - int effort_level, // in [0..6] range - int use_quality_100, VP8LBitWriter* const bw, - WebPAuxStats* const stats) { - int ok = 0; - WebPConfig config; - WebPPicture picture; - - WebPPictureInit(&picture); - picture.width = width; - picture.height = height; - picture.use_argb = 1; - picture.stats = stats; - if (!WebPPictureAlloc(&picture)) return 0; - - // Transfer the alpha values to the green channel. - WebPDispatchAlphaToGreen(data, width, picture.width, picture.height, - picture.argb, picture.argb_stride); - - WebPConfigInit(&config); - config.lossless = 1; - // Enable exact, or it would alter RGB values of transparent alpha, which is - // normally OK but not here since we are not encoding the input image but an - // internal encoding-related image containing necessary exact information in - // RGB channels. - config.exact = 1; - config.method = effort_level; // impact is very small - // Set a low default quality for encoding alpha. Ensure that Alpha quality at - // lower methods (3 and below) is less than the threshold for triggering - // costly 'BackwardReferencesTraceBackwards'. - // If the alpha quality is set to 100 and the method to 6, allow for a high - // lossless quality to trigger the cruncher. - config.quality = - (use_quality_100 && effort_level == 6) ? 100 : 8.f * effort_level; - assert(config.quality >= 0 && config.quality <= 100.f); - - // TODO(urvang): Temporary fix to avoid generating images that trigger - // a decoder bug related to alpha with color cache. - // See: https://code.google.com/p/webp/issues/detail?id=239 - // Need to re-enable this later. - ok = (VP8LEncodeStream(&config, &picture, bw, 0 /*use_cache*/) == VP8_ENC_OK); - WebPPictureFree(&picture); - ok = ok && !bw->error_; - if (!ok) { - VP8LBitWriterWipeOut(bw); - return 0; - } - return 1; -} - -// ----------------------------------------------------------------------------- - -// Small struct to hold the result of a filter mode compression attempt. -typedef struct { - size_t score; - VP8BitWriter bw; - WebPAuxStats stats; -} FilterTrial; - -// This function always returns an initialized 'bw' object, even upon error. -static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, - int method, int filter, int reduce_levels, - int effort_level, // in [0..6] range - uint8_t* const tmp_alpha, - FilterTrial* result) { - int ok = 0; - const uint8_t* alpha_src; - WebPFilterFunc filter_func; - uint8_t header; - const size_t data_size = width * height; - const uint8_t* output = NULL; - size_t output_size = 0; - VP8LBitWriter tmp_bw; - - assert((uint64_t)data_size == (uint64_t)width * height); // as per spec - assert(filter >= 0 && filter < WEBP_FILTER_LAST); - assert(method >= ALPHA_NO_COMPRESSION); - assert(method <= ALPHA_LOSSLESS_COMPRESSION); - assert(sizeof(header) == ALPHA_HEADER_LEN); - - filter_func = WebPFilters[filter]; - if (filter_func != NULL) { - filter_func(data, width, height, width, tmp_alpha); - alpha_src = tmp_alpha; - } else { - alpha_src = data; - } - - if (method != ALPHA_NO_COMPRESSION) { - ok = VP8LBitWriterInit(&tmp_bw, data_size >> 3); - ok = ok && EncodeLossless(alpha_src, width, height, effort_level, - !reduce_levels, &tmp_bw, &result->stats); - if (ok) { - output = VP8LBitWriterFinish(&tmp_bw); - output_size = VP8LBitWriterNumBytes(&tmp_bw); - if (output_size > data_size) { - // compressed size is larger than source! Revert to uncompressed mode. - method = ALPHA_NO_COMPRESSION; - VP8LBitWriterWipeOut(&tmp_bw); - } - } else { - VP8LBitWriterWipeOut(&tmp_bw); - return 0; - } - } - - if (method == ALPHA_NO_COMPRESSION) { - output = alpha_src; - output_size = data_size; - ok = 1; - } - - // Emit final result. - header = method | (filter << 2); - if (reduce_levels) header |= ALPHA_PREPROCESSED_LEVELS << 4; - - VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size); - ok = ok && VP8BitWriterAppend(&result->bw, &header, ALPHA_HEADER_LEN); - ok = ok && VP8BitWriterAppend(&result->bw, output, output_size); - - if (method != ALPHA_NO_COMPRESSION) { - VP8LBitWriterWipeOut(&tmp_bw); - } - ok = ok && !result->bw.error_; - result->score = VP8BitWriterSize(&result->bw); - return ok; -} - -// ----------------------------------------------------------------------------- - -static int GetNumColors(const uint8_t* data, int width, int height, - int stride) { - int j; - int colors = 0; - uint8_t color[256] = { 0 }; - - for (j = 0; j < height; ++j) { - int i; - const uint8_t* const p = data + j * stride; - for (i = 0; i < width; ++i) { - color[p[i]] = 1; - } - } - for (j = 0; j < 256; ++j) { - if (color[j] > 0) ++colors; - } - return colors; -} - -#define FILTER_TRY_NONE (1 << WEBP_FILTER_NONE) -#define FILTER_TRY_ALL ((1 << WEBP_FILTER_LAST) - 1) - -// Given the input 'filter' option, return an OR'd bit-set of filters to try. -static uint32_t GetFilterMap(const uint8_t* alpha, int width, int height, - int filter, int effort_level) { - uint32_t bit_map = 0U; - if (filter == WEBP_FILTER_FAST) { - // Quick estimate of the best candidate. - int try_filter_none = (effort_level > 3); - const int kMinColorsForFilterNone = 16; - const int kMaxColorsForFilterNone = 192; - const int num_colors = GetNumColors(alpha, width, height, width); - // For low number of colors, NONE yields better compression. - filter = (num_colors <= kMinColorsForFilterNone) - ? WEBP_FILTER_NONE - : WebPEstimateBestFilter(alpha, width, height, width); - bit_map |= 1 << filter; - // For large number of colors, try FILTER_NONE in addition to the best - // filter as well. - if (try_filter_none || num_colors > kMaxColorsForFilterNone) { - bit_map |= FILTER_TRY_NONE; - } - } else if (filter == WEBP_FILTER_NONE) { - bit_map = FILTER_TRY_NONE; - } else { // WEBP_FILTER_BEST -> try all - bit_map = FILTER_TRY_ALL; - } - return bit_map; -} - -static void InitFilterTrial(FilterTrial* const score) { - score->score = (size_t)~0U; - VP8BitWriterInit(&score->bw, 0); -} - -static int ApplyFiltersAndEncode(const uint8_t* alpha, int width, int height, - size_t data_size, int method, int filter, - int reduce_levels, int effort_level, - uint8_t** const output, - size_t* const output_size, - WebPAuxStats* const stats) { - int ok = 1; - FilterTrial best; - uint32_t try_map = - GetFilterMap(alpha, width, height, filter, effort_level); - InitFilterTrial(&best); - - if (try_map != FILTER_TRY_NONE) { - uint8_t* filtered_alpha = (uint8_t*)WebPSafeMalloc(1ULL, data_size); - if (filtered_alpha == NULL) return 0; - - for (filter = WEBP_FILTER_NONE; ok && try_map; ++filter, try_map >>= 1) { - if (try_map & 1) { - FilterTrial trial; - ok = EncodeAlphaInternal(alpha, width, height, method, filter, - reduce_levels, effort_level, filtered_alpha, - &trial); - if (ok && trial.score < best.score) { - VP8BitWriterWipeOut(&best.bw); - best = trial; - } else { - VP8BitWriterWipeOut(&trial.bw); - } - } - } - WebPSafeFree(filtered_alpha); - } else { - ok = EncodeAlphaInternal(alpha, width, height, method, WEBP_FILTER_NONE, - reduce_levels, effort_level, NULL, &best); - } - if (ok) { -#if !defined(WEBP_DISABLE_STATS) - if (stats != NULL) { - stats->lossless_features = best.stats.lossless_features; - stats->histogram_bits = best.stats.histogram_bits; - stats->transform_bits = best.stats.transform_bits; - stats->cache_bits = best.stats.cache_bits; - stats->palette_size = best.stats.palette_size; - stats->lossless_size = best.stats.lossless_size; - stats->lossless_hdr_size = best.stats.lossless_hdr_size; - stats->lossless_data_size = best.stats.lossless_data_size; - } -#else - (void)stats; -#endif - *output_size = VP8BitWriterSize(&best.bw); - *output = VP8BitWriterBuf(&best.bw); - } else { - VP8BitWriterWipeOut(&best.bw); - } - return ok; -} - -static int EncodeAlpha(VP8Encoder* const enc, - int quality, int method, int filter, - int effort_level, - uint8_t** const output, size_t* const output_size) { - const WebPPicture* const pic = enc->pic_; - const int width = pic->width; - const int height = pic->height; - - uint8_t* quant_alpha = NULL; - const size_t data_size = width * height; - uint64_t sse = 0; - int ok = 1; - const int reduce_levels = (quality < 100); - - // quick sanity checks - assert((uint64_t)data_size == (uint64_t)width * height); // as per spec - assert(enc != NULL && pic != NULL && pic->a != NULL); - assert(output != NULL && output_size != NULL); - assert(width > 0 && height > 0); - assert(pic->a_stride >= width); - assert(filter >= WEBP_FILTER_NONE && filter <= WEBP_FILTER_FAST); - - if (quality < 0 || quality > 100) { - return 0; - } - - if (method < ALPHA_NO_COMPRESSION || method > ALPHA_LOSSLESS_COMPRESSION) { - return 0; - } - - if (method == ALPHA_NO_COMPRESSION) { - // Don't filter, as filtering will make no impact on compressed size. - filter = WEBP_FILTER_NONE; - } - - quant_alpha = (uint8_t*)WebPSafeMalloc(1ULL, data_size); - if (quant_alpha == NULL) { - return 0; - } - - // Extract alpha data (width x height) from raw_data (stride x height). - WebPCopyPlane(pic->a, pic->a_stride, quant_alpha, width, width, height); - - if (reduce_levels) { // No Quantization required for 'quality = 100'. - // 16 alpha levels gives quite a low MSE w.r.t original alpha plane hence - // mapped to moderate quality 70. Hence Quality:[0, 70] -> Levels:[2, 16] - // and Quality:]70, 100] -> Levels:]16, 256]. - const int alpha_levels = (quality <= 70) ? (2 + quality / 5) - : (16 + (quality - 70) * 8); - ok = QuantizeLevels(quant_alpha, width, height, alpha_levels, &sse); - } - - if (ok) { - VP8FiltersInit(); - ok = ApplyFiltersAndEncode(quant_alpha, width, height, data_size, method, - filter, reduce_levels, effort_level, output, - output_size, pic->stats); -#if !defined(WEBP_DISABLE_STATS) - if (pic->stats != NULL) { // need stats? - pic->stats->coded_size += (int)(*output_size); - enc->sse_[3] = sse; - } -#endif - } - - WebPSafeFree(quant_alpha); - return ok; -} - -//------------------------------------------------------------------------------ -// Main calls - -static int CompressAlphaJob(void* arg1, void* dummy) { - VP8Encoder* const enc = (VP8Encoder*)arg1; - const WebPConfig* config = enc->config_; - uint8_t* alpha_data = NULL; - size_t alpha_size = 0; - const int effort_level = config->method; // maps to [0..6] - const WEBP_FILTER_TYPE filter = - (config->alpha_filtering == 0) ? WEBP_FILTER_NONE : - (config->alpha_filtering == 1) ? WEBP_FILTER_FAST : - WEBP_FILTER_BEST; - if (!EncodeAlpha(enc, config->alpha_quality, config->alpha_compression, - filter, effort_level, &alpha_data, &alpha_size)) { - return 0; - } - if (alpha_size != (uint32_t)alpha_size) { // Sanity check. - WebPSafeFree(alpha_data); - return 0; - } - enc->alpha_data_size_ = (uint32_t)alpha_size; - enc->alpha_data_ = alpha_data; - (void)dummy; - return 1; -} - -void VP8EncInitAlpha(VP8Encoder* const enc) { - WebPInitAlphaProcessing(); - enc->has_alpha_ = WebPPictureHasTransparency(enc->pic_); - enc->alpha_data_ = NULL; - enc->alpha_data_size_ = 0; - if (enc->thread_level_ > 0) { - WebPWorker* const worker = &enc->alpha_worker_; - WebPGetWorkerInterface()->Init(worker); - worker->data1 = enc; - worker->data2 = NULL; - worker->hook = CompressAlphaJob; - } -} - -int VP8EncStartAlpha(VP8Encoder* const enc) { - if (enc->has_alpha_) { - if (enc->thread_level_ > 0) { - WebPWorker* const worker = &enc->alpha_worker_; - // Makes sure worker is good to go. - if (!WebPGetWorkerInterface()->Reset(worker)) { - return 0; - } - WebPGetWorkerInterface()->Launch(worker); - return 1; - } else { - return CompressAlphaJob(enc, NULL); // just do the job right away - } - } - return 1; -} - -int VP8EncFinishAlpha(VP8Encoder* const enc) { - if (enc->has_alpha_) { - if (enc->thread_level_ > 0) { - WebPWorker* const worker = &enc->alpha_worker_; - if (!WebPGetWorkerInterface()->Sync(worker)) return 0; // error - } - } - return WebPReportProgress(enc->pic_, enc->percent_ + 20, &enc->percent_); -} - -int VP8EncDeleteAlpha(VP8Encoder* const enc) { - int ok = 1; - if (enc->thread_level_ > 0) { - WebPWorker* const worker = &enc->alpha_worker_; - // finish anything left in flight - ok = WebPGetWorkerInterface()->Sync(worker); - // still need to end the worker, even if !ok - WebPGetWorkerInterface()->End(worker); - } - WebPSafeFree(enc->alpha_data_); - enc->alpha_data_ = NULL; - enc->alpha_data_size_ = 0; - enc->has_alpha_ = 0; - return ok; -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/analysis_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/analysis_enc.c deleted file mode 100644 index 0b8ef00..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/analysis_enc.c +++ /dev/null @@ -1,535 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Macroblock analysis -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include -#include - -#include "src/enc/vp8i_enc.h" -#include "src/enc/cost_enc.h" -#include "src/utils/utils.h" - -#define MAX_ITERS_K_MEANS 6 - -//------------------------------------------------------------------------------ -// Smooth the segment map by replacing isolated block by the majority of its -// neighbours. - -static void SmoothSegmentMap(VP8Encoder* const enc) { - int n, x, y; - const int w = enc->mb_w_; - const int h = enc->mb_h_; - const int majority_cnt_3_x_3_grid = 5; - uint8_t* const tmp = (uint8_t*)WebPSafeMalloc(w * h, sizeof(*tmp)); - assert((uint64_t)(w * h) == (uint64_t)w * h); // no overflow, as per spec - - if (tmp == NULL) return; - for (y = 1; y < h - 1; ++y) { - for (x = 1; x < w - 1; ++x) { - int cnt[NUM_MB_SEGMENTS] = { 0 }; - const VP8MBInfo* const mb = &enc->mb_info_[x + w * y]; - int majority_seg = mb->segment_; - // Check the 8 neighbouring segment values. - cnt[mb[-w - 1].segment_]++; // top-left - cnt[mb[-w + 0].segment_]++; // top - cnt[mb[-w + 1].segment_]++; // top-right - cnt[mb[ - 1].segment_]++; // left - cnt[mb[ + 1].segment_]++; // right - cnt[mb[ w - 1].segment_]++; // bottom-left - cnt[mb[ w + 0].segment_]++; // bottom - cnt[mb[ w + 1].segment_]++; // bottom-right - for (n = 0; n < NUM_MB_SEGMENTS; ++n) { - if (cnt[n] >= majority_cnt_3_x_3_grid) { - majority_seg = n; - break; - } - } - tmp[x + y * w] = majority_seg; - } - } - for (y = 1; y < h - 1; ++y) { - for (x = 1; x < w - 1; ++x) { - VP8MBInfo* const mb = &enc->mb_info_[x + w * y]; - mb->segment_ = tmp[x + y * w]; - } - } - WebPSafeFree(tmp); -} - -//------------------------------------------------------------------------------ -// set segment susceptibility alpha_ / beta_ - -static WEBP_INLINE int clip(int v, int m, int M) { - return (v < m) ? m : (v > M) ? M : v; -} - -static void SetSegmentAlphas(VP8Encoder* const enc, - const int centers[NUM_MB_SEGMENTS], - int mid) { - const int nb = enc->segment_hdr_.num_segments_; - int min = centers[0], max = centers[0]; - int n; - - if (nb > 1) { - for (n = 0; n < nb; ++n) { - if (min > centers[n]) min = centers[n]; - if (max < centers[n]) max = centers[n]; - } - } - if (max == min) max = min + 1; - assert(mid <= max && mid >= min); - for (n = 0; n < nb; ++n) { - const int alpha = 255 * (centers[n] - mid) / (max - min); - const int beta = 255 * (centers[n] - min) / (max - min); - enc->dqm_[n].alpha_ = clip(alpha, -127, 127); - enc->dqm_[n].beta_ = clip(beta, 0, 255); - } -} - -//------------------------------------------------------------------------------ -// Compute susceptibility based on DCT-coeff histograms: -// the higher, the "easier" the macroblock is to compress. - -#define MAX_ALPHA 255 // 8b of precision for susceptibilities. -#define ALPHA_SCALE (2 * MAX_ALPHA) // scaling factor for alpha. -#define DEFAULT_ALPHA (-1) -#define IS_BETTER_ALPHA(alpha, best_alpha) ((alpha) > (best_alpha)) - -static int FinalAlphaValue(int alpha) { - alpha = MAX_ALPHA - alpha; - return clip(alpha, 0, MAX_ALPHA); -} - -static int GetAlpha(const VP8Histogram* const histo) { - // 'alpha' will later be clipped to [0..MAX_ALPHA] range, clamping outer - // values which happen to be mostly noise. This leaves the maximum precision - // for handling the useful small values which contribute most. - const int max_value = histo->max_value; - const int last_non_zero = histo->last_non_zero; - const int alpha = - (max_value > 1) ? ALPHA_SCALE * last_non_zero / max_value : 0; - return alpha; -} - -static void InitHistogram(VP8Histogram* const histo) { - histo->max_value = 0; - histo->last_non_zero = 1; -} - -static void MergeHistograms(const VP8Histogram* const in, - VP8Histogram* const out) { - if (in->max_value > out->max_value) { - out->max_value = in->max_value; - } - if (in->last_non_zero > out->last_non_zero) { - out->last_non_zero = in->last_non_zero; - } -} - -//------------------------------------------------------------------------------ -// Simplified k-Means, to assign Nb segments based on alpha-histogram - -static void AssignSegments(VP8Encoder* const enc, - const int alphas[MAX_ALPHA + 1]) { - // 'num_segments_' is previously validated and <= NUM_MB_SEGMENTS, but an - // explicit check is needed to avoid spurious warning about 'n + 1' exceeding - // array bounds of 'centers' with some compilers (noticed with gcc-4.9). - const int nb = (enc->segment_hdr_.num_segments_ < NUM_MB_SEGMENTS) ? - enc->segment_hdr_.num_segments_ : NUM_MB_SEGMENTS; - int centers[NUM_MB_SEGMENTS]; - int weighted_average = 0; - int map[MAX_ALPHA + 1]; - int a, n, k; - int min_a = 0, max_a = MAX_ALPHA, range_a; - // 'int' type is ok for histo, and won't overflow - int accum[NUM_MB_SEGMENTS], dist_accum[NUM_MB_SEGMENTS]; - - assert(nb >= 1); - assert(nb <= NUM_MB_SEGMENTS); - - // bracket the input - for (n = 0; n <= MAX_ALPHA && alphas[n] == 0; ++n) {} - min_a = n; - for (n = MAX_ALPHA; n > min_a && alphas[n] == 0; --n) {} - max_a = n; - range_a = max_a - min_a; - - // Spread initial centers evenly - for (k = 0, n = 1; k < nb; ++k, n += 2) { - assert(n < 2 * nb); - centers[k] = min_a + (n * range_a) / (2 * nb); - } - - for (k = 0; k < MAX_ITERS_K_MEANS; ++k) { // few iters are enough - int total_weight; - int displaced; - // Reset stats - for (n = 0; n < nb; ++n) { - accum[n] = 0; - dist_accum[n] = 0; - } - // Assign nearest center for each 'a' - n = 0; // track the nearest center for current 'a' - for (a = min_a; a <= max_a; ++a) { - if (alphas[a]) { - while (n + 1 < nb && abs(a - centers[n + 1]) < abs(a - centers[n])) { - n++; - } - map[a] = n; - // accumulate contribution into best centroid - dist_accum[n] += a * alphas[a]; - accum[n] += alphas[a]; - } - } - // All point are classified. Move the centroids to the - // center of their respective cloud. - displaced = 0; - weighted_average = 0; - total_weight = 0; - for (n = 0; n < nb; ++n) { - if (accum[n]) { - const int new_center = (dist_accum[n] + accum[n] / 2) / accum[n]; - displaced += abs(centers[n] - new_center); - centers[n] = new_center; - weighted_average += new_center * accum[n]; - total_weight += accum[n]; - } - } - weighted_average = (weighted_average + total_weight / 2) / total_weight; - if (displaced < 5) break; // no need to keep on looping... - } - - // Map each original value to the closest centroid - for (n = 0; n < enc->mb_w_ * enc->mb_h_; ++n) { - VP8MBInfo* const mb = &enc->mb_info_[n]; - const int alpha = mb->alpha_; - mb->segment_ = map[alpha]; - mb->alpha_ = centers[map[alpha]]; // for the record. - } - - if (nb > 1) { - const int smooth = (enc->config_->preprocessing & 1); - if (smooth) SmoothSegmentMap(enc); - } - - SetSegmentAlphas(enc, centers, weighted_average); // pick some alphas. -} - -//------------------------------------------------------------------------------ -// Macroblock analysis: collect histogram for each mode, deduce the maximal -// susceptibility and set best modes for this macroblock. -// Segment assignment is done later. - -// Number of modes to inspect for alpha_ evaluation. We don't need to test all -// the possible modes during the analysis phase: we risk falling into a local -// optimum, or be subject to boundary effect -#define MAX_INTRA16_MODE 2 -#define MAX_INTRA4_MODE 2 -#define MAX_UV_MODE 2 - -static int MBAnalyzeBestIntra16Mode(VP8EncIterator* const it) { - const int max_mode = MAX_INTRA16_MODE; - int mode; - int best_alpha = DEFAULT_ALPHA; - int best_mode = 0; - - VP8MakeLuma16Preds(it); - for (mode = 0; mode < max_mode; ++mode) { - VP8Histogram histo; - int alpha; - - InitHistogram(&histo); - VP8CollectHistogram(it->yuv_in_ + Y_OFF_ENC, - it->yuv_p_ + VP8I16ModeOffsets[mode], - 0, 16, &histo); - alpha = GetAlpha(&histo); - if (IS_BETTER_ALPHA(alpha, best_alpha)) { - best_alpha = alpha; - best_mode = mode; - } - } - VP8SetIntra16Mode(it, best_mode); - return best_alpha; -} - -static int FastMBAnalyze(VP8EncIterator* const it) { - // Empirical cut-off value, should be around 16 (~=block size). We use the - // [8-17] range and favor intra4 at high quality, intra16 for low quality. - const int q = (int)it->enc_->config_->quality; - const uint32_t kThreshold = 8 + (17 - 8) * q / 100; - int k; - uint32_t dc[16], m, m2; - for (k = 0; k < 16; k += 4) { - VP8Mean16x4(it->yuv_in_ + Y_OFF_ENC + k * BPS, &dc[k]); - } - for (m = 0, m2 = 0, k = 0; k < 16; ++k) { - m += dc[k]; - m2 += dc[k] * dc[k]; - } - if (kThreshold * m2 < m * m) { - VP8SetIntra16Mode(it, 0); // DC16 - } else { - const uint8_t modes[16] = { 0 }; // DC4 - VP8SetIntra4Mode(it, modes); - } - return 0; -} - -static int MBAnalyzeBestIntra4Mode(VP8EncIterator* const it, - int best_alpha) { - uint8_t modes[16]; - const int max_mode = MAX_INTRA4_MODE; - int i4_alpha; - VP8Histogram total_histo; - int cur_histo = 0; - InitHistogram(&total_histo); - - VP8IteratorStartI4(it); - do { - int mode; - int best_mode_alpha = DEFAULT_ALPHA; - VP8Histogram histos[2]; - const uint8_t* const src = it->yuv_in_ + Y_OFF_ENC + VP8Scan[it->i4_]; - - VP8MakeIntra4Preds(it); - for (mode = 0; mode < max_mode; ++mode) { - int alpha; - - InitHistogram(&histos[cur_histo]); - VP8CollectHistogram(src, it->yuv_p_ + VP8I4ModeOffsets[mode], - 0, 1, &histos[cur_histo]); - alpha = GetAlpha(&histos[cur_histo]); - if (IS_BETTER_ALPHA(alpha, best_mode_alpha)) { - best_mode_alpha = alpha; - modes[it->i4_] = mode; - cur_histo ^= 1; // keep track of best histo so far. - } - } - // accumulate best histogram - MergeHistograms(&histos[cur_histo ^ 1], &total_histo); - // Note: we reuse the original samples for predictors - } while (VP8IteratorRotateI4(it, it->yuv_in_ + Y_OFF_ENC)); - - i4_alpha = GetAlpha(&total_histo); - if (IS_BETTER_ALPHA(i4_alpha, best_alpha)) { - VP8SetIntra4Mode(it, modes); - best_alpha = i4_alpha; - } - return best_alpha; -} - -static int MBAnalyzeBestUVMode(VP8EncIterator* const it) { - int best_alpha = DEFAULT_ALPHA; - int smallest_alpha = 0; - int best_mode = 0; - const int max_mode = MAX_UV_MODE; - int mode; - - VP8MakeChroma8Preds(it); - for (mode = 0; mode < max_mode; ++mode) { - VP8Histogram histo; - int alpha; - InitHistogram(&histo); - VP8CollectHistogram(it->yuv_in_ + U_OFF_ENC, - it->yuv_p_ + VP8UVModeOffsets[mode], - 16, 16 + 4 + 4, &histo); - alpha = GetAlpha(&histo); - if (IS_BETTER_ALPHA(alpha, best_alpha)) { - best_alpha = alpha; - } - // The best prediction mode tends to be the one with the smallest alpha. - if (mode == 0 || alpha < smallest_alpha) { - smallest_alpha = alpha; - best_mode = mode; - } - } - VP8SetIntraUVMode(it, best_mode); - return best_alpha; -} - -static void MBAnalyze(VP8EncIterator* const it, - int alphas[MAX_ALPHA + 1], - int* const alpha, int* const uv_alpha) { - const VP8Encoder* const enc = it->enc_; - int best_alpha, best_uv_alpha; - - VP8SetIntra16Mode(it, 0); // default: Intra16, DC_PRED - VP8SetSkip(it, 0); // not skipped - VP8SetSegment(it, 0); // default segment, spec-wise. - - if (enc->method_ <= 1) { - best_alpha = FastMBAnalyze(it); - } else { - best_alpha = MBAnalyzeBestIntra16Mode(it); - if (enc->method_ >= 5) { - // We go and make a fast decision for intra4/intra16. - // It's usually not a good and definitive pick, but helps seeding the - // stats about level bit-cost. - // TODO(skal): improve criterion. - best_alpha = MBAnalyzeBestIntra4Mode(it, best_alpha); - } - } - best_uv_alpha = MBAnalyzeBestUVMode(it); - - // Final susceptibility mix - best_alpha = (3 * best_alpha + best_uv_alpha + 2) >> 2; - best_alpha = FinalAlphaValue(best_alpha); - alphas[best_alpha]++; - it->mb_->alpha_ = best_alpha; // for later remapping. - - // Accumulate for later complexity analysis. - *alpha += best_alpha; // mixed susceptibility (not just luma) - *uv_alpha += best_uv_alpha; -} - -static void DefaultMBInfo(VP8MBInfo* const mb) { - mb->type_ = 1; // I16x16 - mb->uv_mode_ = 0; - mb->skip_ = 0; // not skipped - mb->segment_ = 0; // default segment - mb->alpha_ = 0; -} - -//------------------------------------------------------------------------------ -// Main analysis loop: -// Collect all susceptibilities for each macroblock and record their -// distribution in alphas[]. Segments is assigned a-posteriori, based on -// this histogram. -// We also pick an intra16 prediction mode, which shouldn't be considered -// final except for fast-encode settings. We can also pick some intra4 modes -// and decide intra4/intra16, but that's usually almost always a bad choice at -// this stage. - -static void ResetAllMBInfo(VP8Encoder* const enc) { - int n; - for (n = 0; n < enc->mb_w_ * enc->mb_h_; ++n) { - DefaultMBInfo(&enc->mb_info_[n]); - } - // Default susceptibilities. - enc->dqm_[0].alpha_ = 0; - enc->dqm_[0].beta_ = 0; - // Note: we can't compute this alpha_ / uv_alpha_ -> set to default value. - enc->alpha_ = 0; - enc->uv_alpha_ = 0; - WebPReportProgress(enc->pic_, enc->percent_ + 20, &enc->percent_); -} - -// struct used to collect job result -typedef struct { - WebPWorker worker; - int alphas[MAX_ALPHA + 1]; - int alpha, uv_alpha; - VP8EncIterator it; - int delta_progress; -} SegmentJob; - -// main work call -static int DoSegmentsJob(void* arg1, void* arg2) { - SegmentJob* const job = (SegmentJob*)arg1; - VP8EncIterator* const it = (VP8EncIterator*)arg2; - int ok = 1; - if (!VP8IteratorIsDone(it)) { - uint8_t tmp[32 + WEBP_ALIGN_CST]; - uint8_t* const scratch = (uint8_t*)WEBP_ALIGN(tmp); - do { - // Let's pretend we have perfect lossless reconstruction. - VP8IteratorImport(it, scratch); - MBAnalyze(it, job->alphas, &job->alpha, &job->uv_alpha); - ok = VP8IteratorProgress(it, job->delta_progress); - } while (ok && VP8IteratorNext(it)); - } - return ok; -} - -static void MergeJobs(const SegmentJob* const src, SegmentJob* const dst) { - int i; - for (i = 0; i <= MAX_ALPHA; ++i) dst->alphas[i] += src->alphas[i]; - dst->alpha += src->alpha; - dst->uv_alpha += src->uv_alpha; -} - -// initialize the job struct with some TODOs -static void InitSegmentJob(VP8Encoder* const enc, SegmentJob* const job, - int start_row, int end_row) { - WebPGetWorkerInterface()->Init(&job->worker); - job->worker.data1 = job; - job->worker.data2 = &job->it; - job->worker.hook = DoSegmentsJob; - VP8IteratorInit(enc, &job->it); - VP8IteratorSetRow(&job->it, start_row); - VP8IteratorSetCountDown(&job->it, (end_row - start_row) * enc->mb_w_); - memset(job->alphas, 0, sizeof(job->alphas)); - job->alpha = 0; - job->uv_alpha = 0; - // only one of both jobs can record the progress, since we don't - // expect the user's hook to be multi-thread safe - job->delta_progress = (start_row == 0) ? 20 : 0; -} - -// main entry point -int VP8EncAnalyze(VP8Encoder* const enc) { - int ok = 1; - const int do_segments = - enc->config_->emulate_jpeg_size || // We need the complexity evaluation. - (enc->segment_hdr_.num_segments_ > 1) || - (enc->method_ <= 1); // for method 0 - 1, we need preds_[] to be filled. - if (do_segments) { - const int last_row = enc->mb_h_; - // We give a little more than a half work to the main thread. - const int split_row = (9 * last_row + 15) >> 4; - const int total_mb = last_row * enc->mb_w_; -#ifdef WEBP_USE_THREAD - const int kMinSplitRow = 2; // minimal rows needed for mt to be worth it - const int do_mt = (enc->thread_level_ > 0) && (split_row >= kMinSplitRow); -#else - const int do_mt = 0; -#endif - const WebPWorkerInterface* const worker_interface = - WebPGetWorkerInterface(); - SegmentJob main_job; - if (do_mt) { - SegmentJob side_job; - // Note the use of '&' instead of '&&' because we must call the functions - // no matter what. - InitSegmentJob(enc, &main_job, 0, split_row); - InitSegmentJob(enc, &side_job, split_row, last_row); - // we don't need to call Reset() on main_job.worker, since we're calling - // WebPWorkerExecute() on it - ok &= worker_interface->Reset(&side_job.worker); - // launch the two jobs in parallel - if (ok) { - worker_interface->Launch(&side_job.worker); - worker_interface->Execute(&main_job.worker); - ok &= worker_interface->Sync(&side_job.worker); - ok &= worker_interface->Sync(&main_job.worker); - } - worker_interface->End(&side_job.worker); - if (ok) MergeJobs(&side_job, &main_job); // merge results together - } else { - // Even for single-thread case, we use the generic Worker tools. - InitSegmentJob(enc, &main_job, 0, last_row); - worker_interface->Execute(&main_job.worker); - ok &= worker_interface->Sync(&main_job.worker); - } - worker_interface->End(&main_job.worker); - if (ok) { - enc->alpha_ = main_job.alpha / total_mb; - enc->uv_alpha_ = main_job.uv_alpha / total_mb; - AssignSegments(enc, main_job.alphas); - } - } else { // Use only one default segment. - ResetAllMBInfo(enc); - } - return ok; -} - diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/backward_references_cost_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/backward_references_cost_enc.c deleted file mode 100644 index 77ed955..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/backward_references_cost_enc.c +++ /dev/null @@ -1,790 +0,0 @@ -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Improves a given set of backward references by analyzing its bit cost. -// The algorithm is similar to the Zopfli compression algorithm but tailored to -// images. -// -// Author: Vincent Rabaud (vrabaud@google.com) -// - -#include - -#include "src/enc/backward_references_enc.h" -#include "src/enc/histogram_enc.h" -#include "src/dsp/lossless_common.h" -#include "src/utils/color_cache_utils.h" -#include "src/utils/utils.h" - -#define VALUES_IN_BYTE 256 - -extern void VP8LClearBackwardRefs(VP8LBackwardRefs* const refs); -extern int VP8LDistanceToPlaneCode(int xsize, int dist); -extern void VP8LBackwardRefsCursorAdd(VP8LBackwardRefs* const refs, - const PixOrCopy v); - -typedef struct { - double alpha_[VALUES_IN_BYTE]; - double red_[VALUES_IN_BYTE]; - double blue_[VALUES_IN_BYTE]; - double distance_[NUM_DISTANCE_CODES]; - double* literal_; -} CostModel; - -static void ConvertPopulationCountTableToBitEstimates( - int num_symbols, const uint32_t population_counts[], double output[]) { - uint32_t sum = 0; - int nonzeros = 0; - int i; - for (i = 0; i < num_symbols; ++i) { - sum += population_counts[i]; - if (population_counts[i] > 0) { - ++nonzeros; - } - } - if (nonzeros <= 1) { - memset(output, 0, num_symbols * sizeof(*output)); - } else { - const double logsum = VP8LFastLog2(sum); - for (i = 0; i < num_symbols; ++i) { - output[i] = logsum - VP8LFastLog2(population_counts[i]); - } - } -} - -static int CostModelBuild(CostModel* const m, int xsize, int cache_bits, - const VP8LBackwardRefs* const refs) { - int ok = 0; - VP8LRefsCursor c = VP8LRefsCursorInit(refs); - VP8LHistogram* const histo = VP8LAllocateHistogram(cache_bits); - if (histo == NULL) goto Error; - - // The following code is similar to VP8LHistogramCreate but converts the - // distance to plane code. - VP8LHistogramInit(histo, cache_bits); - while (VP8LRefsCursorOk(&c)) { - VP8LHistogramAddSinglePixOrCopy(histo, c.cur_pos, VP8LDistanceToPlaneCode, - xsize); - VP8LRefsCursorNext(&c); - } - - ConvertPopulationCountTableToBitEstimates( - VP8LHistogramNumCodes(histo->palette_code_bits_), - histo->literal_, m->literal_); - ConvertPopulationCountTableToBitEstimates( - VALUES_IN_BYTE, histo->red_, m->red_); - ConvertPopulationCountTableToBitEstimates( - VALUES_IN_BYTE, histo->blue_, m->blue_); - ConvertPopulationCountTableToBitEstimates( - VALUES_IN_BYTE, histo->alpha_, m->alpha_); - ConvertPopulationCountTableToBitEstimates( - NUM_DISTANCE_CODES, histo->distance_, m->distance_); - ok = 1; - - Error: - VP8LFreeHistogram(histo); - return ok; -} - -static WEBP_INLINE double GetLiteralCost(const CostModel* const m, uint32_t v) { - return m->alpha_[v >> 24] + - m->red_[(v >> 16) & 0xff] + - m->literal_[(v >> 8) & 0xff] + - m->blue_[v & 0xff]; -} - -static WEBP_INLINE double GetCacheCost(const CostModel* const m, uint32_t idx) { - const int literal_idx = VALUES_IN_BYTE + NUM_LENGTH_CODES + idx; - return m->literal_[literal_idx]; -} - -static WEBP_INLINE double GetLengthCost(const CostModel* const m, - uint32_t length) { - int code, extra_bits; - VP8LPrefixEncodeBits(length, &code, &extra_bits); - return m->literal_[VALUES_IN_BYTE + code] + extra_bits; -} - -static WEBP_INLINE double GetDistanceCost(const CostModel* const m, - uint32_t distance) { - int code, extra_bits; - VP8LPrefixEncodeBits(distance, &code, &extra_bits); - return m->distance_[code] + extra_bits; -} - -static WEBP_INLINE void AddSingleLiteralWithCostModel( - const uint32_t* const argb, VP8LColorCache* const hashers, - const CostModel* const cost_model, int idx, int use_color_cache, - float prev_cost, float* const cost, uint16_t* const dist_array) { - double cost_val = prev_cost; - const uint32_t color = argb[idx]; - const int ix = use_color_cache ? VP8LColorCacheContains(hashers, color) : -1; - if (ix >= 0) { - // use_color_cache is true and hashers contains color - const double mul0 = 0.68; - cost_val += GetCacheCost(cost_model, ix) * mul0; - } else { - const double mul1 = 0.82; - if (use_color_cache) VP8LColorCacheInsert(hashers, color); - cost_val += GetLiteralCost(cost_model, color) * mul1; - } - if (cost[idx] > cost_val) { - cost[idx] = (float)cost_val; - dist_array[idx] = 1; // only one is inserted. - } -} - -// ----------------------------------------------------------------------------- -// CostManager and interval handling - -// Empirical value to avoid high memory consumption but good for performance. -#define COST_CACHE_INTERVAL_SIZE_MAX 500 - -// To perform backward reference every pixel at index index_ is considered and -// the cost for the MAX_LENGTH following pixels computed. Those following pixels -// at index index_ + k (k from 0 to MAX_LENGTH) have a cost of: -// cost_ = distance cost at index + GetLengthCost(cost_model, k) -// and the minimum value is kept. GetLengthCost(cost_model, k) is cached in an -// array of size MAX_LENGTH. -// Instead of performing MAX_LENGTH comparisons per pixel, we keep track of the -// minimal values using intervals of constant cost. -// An interval is defined by the index_ of the pixel that generated it and -// is only useful in a range of indices from start_ to end_ (exclusive), i.e. -// it contains the minimum value for pixels between start_ and end_. -// Intervals are stored in a linked list and ordered by start_. When a new -// interval has a better value, old intervals are split or removed. There are -// therefore no overlapping intervals. -typedef struct CostInterval CostInterval; -struct CostInterval { - float cost_; - int start_; - int end_; - int index_; - CostInterval* previous_; - CostInterval* next_; -}; - -// The GetLengthCost(cost_model, k) are cached in a CostCacheInterval. -typedef struct { - double cost_; - int start_; - int end_; // Exclusive. -} CostCacheInterval; - -// This structure is in charge of managing intervals and costs. -// It caches the different CostCacheInterval, caches the different -// GetLengthCost(cost_model, k) in cost_cache_ and the CostInterval's (whose -// count_ is limited by COST_CACHE_INTERVAL_SIZE_MAX). -#define COST_MANAGER_MAX_FREE_LIST 10 -typedef struct { - CostInterval* head_; - int count_; // The number of stored intervals. - CostCacheInterval* cache_intervals_; - size_t cache_intervals_size_; - double cost_cache_[MAX_LENGTH]; // Contains the GetLengthCost(cost_model, k). - float* costs_; - uint16_t* dist_array_; - // Most of the time, we only need few intervals -> use a free-list, to avoid - // fragmentation with small allocs in most common cases. - CostInterval intervals_[COST_MANAGER_MAX_FREE_LIST]; - CostInterval* free_intervals_; - // These are regularly malloc'd remains. This list can't grow larger than than - // size COST_CACHE_INTERVAL_SIZE_MAX - COST_MANAGER_MAX_FREE_LIST, note. - CostInterval* recycled_intervals_; -} CostManager; - -static void CostIntervalAddToFreeList(CostManager* const manager, - CostInterval* const interval) { - interval->next_ = manager->free_intervals_; - manager->free_intervals_ = interval; -} - -static int CostIntervalIsInFreeList(const CostManager* const manager, - const CostInterval* const interval) { - return (interval >= &manager->intervals_[0] && - interval <= &manager->intervals_[COST_MANAGER_MAX_FREE_LIST - 1]); -} - -static void CostManagerInitFreeList(CostManager* const manager) { - int i; - manager->free_intervals_ = NULL; - for (i = 0; i < COST_MANAGER_MAX_FREE_LIST; ++i) { - CostIntervalAddToFreeList(manager, &manager->intervals_[i]); - } -} - -static void DeleteIntervalList(CostManager* const manager, - const CostInterval* interval) { - while (interval != NULL) { - const CostInterval* const next = interval->next_; - if (!CostIntervalIsInFreeList(manager, interval)) { - WebPSafeFree((void*)interval); - } // else: do nothing - interval = next; - } -} - -static void CostManagerClear(CostManager* const manager) { - if (manager == NULL) return; - - WebPSafeFree(manager->costs_); - WebPSafeFree(manager->cache_intervals_); - - // Clear the interval lists. - DeleteIntervalList(manager, manager->head_); - manager->head_ = NULL; - DeleteIntervalList(manager, manager->recycled_intervals_); - manager->recycled_intervals_ = NULL; - - // Reset pointers, count_ and cache_intervals_size_. - memset(manager, 0, sizeof(*manager)); - CostManagerInitFreeList(manager); -} - -static int CostManagerInit(CostManager* const manager, - uint16_t* const dist_array, int pix_count, - const CostModel* const cost_model) { - int i; - const int cost_cache_size = (pix_count > MAX_LENGTH) ? MAX_LENGTH : pix_count; - - manager->costs_ = NULL; - manager->cache_intervals_ = NULL; - manager->head_ = NULL; - manager->recycled_intervals_ = NULL; - manager->count_ = 0; - manager->dist_array_ = dist_array; - CostManagerInitFreeList(manager); - - // Fill in the cost_cache_. - manager->cache_intervals_size_ = 1; - manager->cost_cache_[0] = GetLengthCost(cost_model, 0); - for (i = 1; i < cost_cache_size; ++i) { - manager->cost_cache_[i] = GetLengthCost(cost_model, i); - // Get the number of bound intervals. - if (manager->cost_cache_[i] != manager->cost_cache_[i - 1]) { - ++manager->cache_intervals_size_; - } - } - - // With the current cost model, we usually have below 20 intervals. - // The worst case scenario with a cost model would be if every length has a - // different cost, hence MAX_LENGTH but that is impossible with the current - // implementation that spirals around a pixel. - assert(manager->cache_intervals_size_ <= MAX_LENGTH); - manager->cache_intervals_ = (CostCacheInterval*)WebPSafeMalloc( - manager->cache_intervals_size_, sizeof(*manager->cache_intervals_)); - if (manager->cache_intervals_ == NULL) { - CostManagerClear(manager); - return 0; - } - - // Fill in the cache_intervals_. - { - CostCacheInterval* cur = manager->cache_intervals_; - - // Consecutive values in cost_cache_ are compared and if a big enough - // difference is found, a new interval is created and bounded. - cur->start_ = 0; - cur->end_ = 1; - cur->cost_ = manager->cost_cache_[0]; - for (i = 1; i < cost_cache_size; ++i) { - const double cost_val = manager->cost_cache_[i]; - if (cost_val != cur->cost_) { - ++cur; - // Initialize an interval. - cur->start_ = i; - cur->cost_ = cost_val; - } - cur->end_ = i + 1; - } - } - - manager->costs_ = (float*)WebPSafeMalloc(pix_count, sizeof(*manager->costs_)); - if (manager->costs_ == NULL) { - CostManagerClear(manager); - return 0; - } - // Set the initial costs_ high for every pixel as we will keep the minimum. - for (i = 0; i < pix_count; ++i) manager->costs_[i] = 1e38f; - - return 1; -} - -// Given the cost and the position that define an interval, update the cost at -// pixel 'i' if it is smaller than the previously computed value. -static WEBP_INLINE void UpdateCost(CostManager* const manager, int i, - int position, float cost) { - const int k = i - position; - assert(k >= 0 && k < MAX_LENGTH); - - if (manager->costs_[i] > cost) { - manager->costs_[i] = cost; - manager->dist_array_[i] = k + 1; - } -} - -// Given the cost and the position that define an interval, update the cost for -// all the pixels between 'start' and 'end' excluded. -static WEBP_INLINE void UpdateCostPerInterval(CostManager* const manager, - int start, int end, int position, - float cost) { - int i; - for (i = start; i < end; ++i) UpdateCost(manager, i, position, cost); -} - -// Given two intervals, make 'prev' be the previous one of 'next' in 'manager'. -static WEBP_INLINE void ConnectIntervals(CostManager* const manager, - CostInterval* const prev, - CostInterval* const next) { - if (prev != NULL) { - prev->next_ = next; - } else { - manager->head_ = next; - } - - if (next != NULL) next->previous_ = prev; -} - -// Pop an interval in the manager. -static WEBP_INLINE void PopInterval(CostManager* const manager, - CostInterval* const interval) { - if (interval == NULL) return; - - ConnectIntervals(manager, interval->previous_, interval->next_); - if (CostIntervalIsInFreeList(manager, interval)) { - CostIntervalAddToFreeList(manager, interval); - } else { // recycle regularly malloc'd intervals too - interval->next_ = manager->recycled_intervals_; - manager->recycled_intervals_ = interval; - } - --manager->count_; - assert(manager->count_ >= 0); -} - -// Update the cost at index i by going over all the stored intervals that -// overlap with i. -// If 'do_clean_intervals' is set to something different than 0, intervals that -// end before 'i' will be popped. -static WEBP_INLINE void UpdateCostAtIndex(CostManager* const manager, int i, - int do_clean_intervals) { - CostInterval* current = manager->head_; - - while (current != NULL && current->start_ <= i) { - CostInterval* const next = current->next_; - if (current->end_ <= i) { - if (do_clean_intervals) { - // We have an outdated interval, remove it. - PopInterval(manager, current); - } - } else { - UpdateCost(manager, i, current->index_, current->cost_); - } - current = next; - } -} - -// Given a current orphan interval and its previous interval, before -// it was orphaned (which can be NULL), set it at the right place in the list -// of intervals using the start_ ordering and the previous interval as a hint. -static WEBP_INLINE void PositionOrphanInterval(CostManager* const manager, - CostInterval* const current, - CostInterval* previous) { - assert(current != NULL); - - if (previous == NULL) previous = manager->head_; - while (previous != NULL && current->start_ < previous->start_) { - previous = previous->previous_; - } - while (previous != NULL && previous->next_ != NULL && - previous->next_->start_ < current->start_) { - previous = previous->next_; - } - - if (previous != NULL) { - ConnectIntervals(manager, current, previous->next_); - } else { - ConnectIntervals(manager, current, manager->head_); - } - ConnectIntervals(manager, previous, current); -} - -// Insert an interval in the list contained in the manager by starting at -// interval_in as a hint. The intervals are sorted by start_ value. -static WEBP_INLINE void InsertInterval(CostManager* const manager, - CostInterval* const interval_in, - float cost, int position, int start, - int end) { - CostInterval* interval_new; - - if (start >= end) return; - if (manager->count_ >= COST_CACHE_INTERVAL_SIZE_MAX) { - // Serialize the interval if we cannot store it. - UpdateCostPerInterval(manager, start, end, position, cost); - return; - } - if (manager->free_intervals_ != NULL) { - interval_new = manager->free_intervals_; - manager->free_intervals_ = interval_new->next_; - } else if (manager->recycled_intervals_ != NULL) { - interval_new = manager->recycled_intervals_; - manager->recycled_intervals_ = interval_new->next_; - } else { // malloc for good - interval_new = (CostInterval*)WebPSafeMalloc(1, sizeof(*interval_new)); - if (interval_new == NULL) { - // Write down the interval if we cannot create it. - UpdateCostPerInterval(manager, start, end, position, cost); - return; - } - } - - interval_new->cost_ = cost; - interval_new->index_ = position; - interval_new->start_ = start; - interval_new->end_ = end; - PositionOrphanInterval(manager, interval_new, interval_in); - - ++manager->count_; -} - -// Given a new cost interval defined by its start at position, its length value -// and distance_cost, add its contributions to the previous intervals and costs. -// If handling the interval or one of its subintervals becomes to heavy, its -// contribution is added to the costs right away. -static WEBP_INLINE void PushInterval(CostManager* const manager, - double distance_cost, int position, - int len) { - size_t i; - CostInterval* interval = manager->head_; - CostInterval* interval_next; - const CostCacheInterval* const cost_cache_intervals = - manager->cache_intervals_; - // If the interval is small enough, no need to deal with the heavy - // interval logic, just serialize it right away. This constant is empirical. - const int kSkipDistance = 10; - - if (len < kSkipDistance) { - int j; - for (j = position; j < position + len; ++j) { - const int k = j - position; - float cost_tmp; - assert(k >= 0 && k < MAX_LENGTH); - cost_tmp = (float)(distance_cost + manager->cost_cache_[k]); - - if (manager->costs_[j] > cost_tmp) { - manager->costs_[j] = cost_tmp; - manager->dist_array_[j] = k + 1; - } - } - return; - } - - for (i = 0; i < manager->cache_intervals_size_ && - cost_cache_intervals[i].start_ < len; - ++i) { - // Define the intersection of the ith interval with the new one. - int start = position + cost_cache_intervals[i].start_; - const int end = position + (cost_cache_intervals[i].end_ > len - ? len - : cost_cache_intervals[i].end_); - const float cost = (float)(distance_cost + cost_cache_intervals[i].cost_); - - for (; interval != NULL && interval->start_ < end; - interval = interval_next) { - interval_next = interval->next_; - - // Make sure we have some overlap - if (start >= interval->end_) continue; - - if (cost >= interval->cost_) { - // When intervals are represented, the lower, the better. - // [**********************************************************[ - // start end - // [----------------------------------[ - // interval->start_ interval->end_ - // If we are worse than what we already have, add whatever we have so - // far up to interval. - const int start_new = interval->end_; - InsertInterval(manager, interval, cost, position, start, - interval->start_); - start = start_new; - if (start >= end) break; - continue; - } - - if (start <= interval->start_) { - if (interval->end_ <= end) { - // [----------------------------------[ - // interval->start_ interval->end_ - // [**************************************************************[ - // start end - // We can safely remove the old interval as it is fully included. - PopInterval(manager, interval); - } else { - // [------------------------------------[ - // interval->start_ interval->end_ - // [*****************************[ - // start end - interval->start_ = end; - break; - } - } else { - if (end < interval->end_) { - // [--------------------------------------------------------------[ - // interval->start_ interval->end_ - // [*****************************[ - // start end - // We have to split the old interval as it fully contains the new one. - const int end_original = interval->end_; - interval->end_ = start; - InsertInterval(manager, interval, interval->cost_, interval->index_, - end, end_original); - interval = interval->next_; - break; - } else { - // [------------------------------------[ - // interval->start_ interval->end_ - // [*****************************[ - // start end - interval->end_ = start; - } - } - } - // Insert the remaining interval from start to end. - InsertInterval(manager, interval, cost, position, start, end); - } -} - -static int BackwardReferencesHashChainDistanceOnly( - int xsize, int ysize, const uint32_t* const argb, int cache_bits, - const VP8LHashChain* const hash_chain, const VP8LBackwardRefs* const refs, - uint16_t* const dist_array) { - int i; - int ok = 0; - int cc_init = 0; - const int pix_count = xsize * ysize; - const int use_color_cache = (cache_bits > 0); - const size_t literal_array_size = - sizeof(double) * (NUM_LITERAL_CODES + NUM_LENGTH_CODES + - ((cache_bits > 0) ? (1 << cache_bits) : 0)); - const size_t cost_model_size = sizeof(CostModel) + literal_array_size; - CostModel* const cost_model = - (CostModel*)WebPSafeCalloc(1ULL, cost_model_size); - VP8LColorCache hashers; - CostManager* cost_manager = - (CostManager*)WebPSafeMalloc(1ULL, sizeof(*cost_manager)); - int offset_prev = -1, len_prev = -1; - double offset_cost = -1; - int first_offset_is_constant = -1; // initialized with 'impossible' value - int reach = 0; - - if (cost_model == NULL || cost_manager == NULL) goto Error; - - cost_model->literal_ = (double*)(cost_model + 1); - if (use_color_cache) { - cc_init = VP8LColorCacheInit(&hashers, cache_bits); - if (!cc_init) goto Error; - } - - if (!CostModelBuild(cost_model, xsize, cache_bits, refs)) { - goto Error; - } - - if (!CostManagerInit(cost_manager, dist_array, pix_count, cost_model)) { - goto Error; - } - - // We loop one pixel at a time, but store all currently best points to - // non-processed locations from this point. - dist_array[0] = 0; - // Add first pixel as literal. - AddSingleLiteralWithCostModel(argb, &hashers, cost_model, 0, use_color_cache, - 0.f, cost_manager->costs_, dist_array); - - for (i = 1; i < pix_count; ++i) { - const float prev_cost = cost_manager->costs_[i - 1]; - int offset, len; - VP8LHashChainFindCopy(hash_chain, i, &offset, &len); - - // Try adding the pixel as a literal. - AddSingleLiteralWithCostModel(argb, &hashers, cost_model, i, - use_color_cache, prev_cost, - cost_manager->costs_, dist_array); - - // If we are dealing with a non-literal. - if (len >= 2) { - if (offset != offset_prev) { - const int code = VP8LDistanceToPlaneCode(xsize, offset); - offset_cost = GetDistanceCost(cost_model, code); - first_offset_is_constant = 1; - PushInterval(cost_manager, prev_cost + offset_cost, i, len); - } else { - assert(offset_cost >= 0); - assert(len_prev >= 0); - assert(first_offset_is_constant == 0 || first_offset_is_constant == 1); - // Instead of considering all contributions from a pixel i by calling: - // PushInterval(cost_manager, prev_cost + offset_cost, i, len); - // we optimize these contributions in case offset_cost stays the same - // for consecutive pixels. This describes a set of pixels similar to a - // previous set (e.g. constant color regions). - if (first_offset_is_constant) { - reach = i - 1 + len_prev - 1; - first_offset_is_constant = 0; - } - - if (i + len - 1 > reach) { - // We can only be go further with the same offset if the previous - // length was maxed, hence len_prev == len == MAX_LENGTH. - // TODO(vrabaud), bump i to the end right away (insert cache and - // update cost). - // TODO(vrabaud), check if one of the points in between does not have - // a lower cost. - // Already consider the pixel at "reach" to add intervals that are - // better than whatever we add. - int offset_j, len_j = 0; - int j; - assert(len == MAX_LENGTH || len == pix_count - i); - // Figure out the last consecutive pixel within [i, reach + 1] with - // the same offset. - for (j = i; j <= reach; ++j) { - VP8LHashChainFindCopy(hash_chain, j + 1, &offset_j, &len_j); - if (offset_j != offset) { - VP8LHashChainFindCopy(hash_chain, j, &offset_j, &len_j); - break; - } - } - // Update the cost at j - 1 and j. - UpdateCostAtIndex(cost_manager, j - 1, 0); - UpdateCostAtIndex(cost_manager, j, 0); - - PushInterval(cost_manager, cost_manager->costs_[j - 1] + offset_cost, - j, len_j); - reach = j + len_j - 1; - } - } - } - - UpdateCostAtIndex(cost_manager, i, 1); - offset_prev = offset; - len_prev = len; - } - - ok = !refs->error_; -Error: - if (cc_init) VP8LColorCacheClear(&hashers); - CostManagerClear(cost_manager); - WebPSafeFree(cost_model); - WebPSafeFree(cost_manager); - return ok; -} - -// We pack the path at the end of *dist_array and return -// a pointer to this part of the array. Example: -// dist_array = [1x2xx3x2] => packed [1x2x1232], chosen_path = [1232] -static void TraceBackwards(uint16_t* const dist_array, - int dist_array_size, - uint16_t** const chosen_path, - int* const chosen_path_size) { - uint16_t* path = dist_array + dist_array_size; - uint16_t* cur = dist_array + dist_array_size - 1; - while (cur >= dist_array) { - const int k = *cur; - --path; - *path = k; - cur -= k; - } - *chosen_path = path; - *chosen_path_size = (int)(dist_array + dist_array_size - path); -} - -static int BackwardReferencesHashChainFollowChosenPath( - const uint32_t* const argb, int cache_bits, - const uint16_t* const chosen_path, int chosen_path_size, - const VP8LHashChain* const hash_chain, VP8LBackwardRefs* const refs) { - const int use_color_cache = (cache_bits > 0); - int ix; - int i = 0; - int ok = 0; - int cc_init = 0; - VP8LColorCache hashers; - - if (use_color_cache) { - cc_init = VP8LColorCacheInit(&hashers, cache_bits); - if (!cc_init) goto Error; - } - - VP8LClearBackwardRefs(refs); - for (ix = 0; ix < chosen_path_size; ++ix) { - const int len = chosen_path[ix]; - if (len != 1) { - int k; - const int offset = VP8LHashChainFindOffset(hash_chain, i); - VP8LBackwardRefsCursorAdd(refs, PixOrCopyCreateCopy(offset, len)); - if (use_color_cache) { - for (k = 0; k < len; ++k) { - VP8LColorCacheInsert(&hashers, argb[i + k]); - } - } - i += len; - } else { - PixOrCopy v; - const int idx = - use_color_cache ? VP8LColorCacheContains(&hashers, argb[i]) : -1; - if (idx >= 0) { - // use_color_cache is true and hashers contains argb[i] - // push pixel as a color cache index - v = PixOrCopyCreateCacheIdx(idx); - } else { - if (use_color_cache) VP8LColorCacheInsert(&hashers, argb[i]); - v = PixOrCopyCreateLiteral(argb[i]); - } - VP8LBackwardRefsCursorAdd(refs, v); - ++i; - } - } - ok = !refs->error_; - Error: - if (cc_init) VP8LColorCacheClear(&hashers); - return ok; -} - -// Returns 1 on success. -extern int VP8LBackwardReferencesTraceBackwards( - int xsize, int ysize, const uint32_t* const argb, int cache_bits, - const VP8LHashChain* const hash_chain, - const VP8LBackwardRefs* const refs_src, VP8LBackwardRefs* const refs_dst); -int VP8LBackwardReferencesTraceBackwards(int xsize, int ysize, - const uint32_t* const argb, - int cache_bits, - const VP8LHashChain* const hash_chain, - const VP8LBackwardRefs* const refs_src, - VP8LBackwardRefs* const refs_dst) { - int ok = 0; - const int dist_array_size = xsize * ysize; - uint16_t* chosen_path = NULL; - int chosen_path_size = 0; - uint16_t* dist_array = - (uint16_t*)WebPSafeMalloc(dist_array_size, sizeof(*dist_array)); - - if (dist_array == NULL) goto Error; - - if (!BackwardReferencesHashChainDistanceOnly( - xsize, ysize, argb, cache_bits, hash_chain, refs_src, dist_array)) { - goto Error; - } - TraceBackwards(dist_array, dist_array_size, &chosen_path, &chosen_path_size); - if (!BackwardReferencesHashChainFollowChosenPath( - argb, cache_bits, chosen_path, chosen_path_size, hash_chain, - refs_dst)) { - goto Error; - } - ok = 1; - Error: - WebPSafeFree(dist_array); - return ok; -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/backward_references_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/backward_references_enc.c deleted file mode 100644 index b899286..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/backward_references_enc.c +++ /dev/null @@ -1,943 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Author: Jyrki Alakuijala (jyrki@google.com) -// - -#include -#include - -#include "src/enc/backward_references_enc.h" -#include "src/enc/histogram_enc.h" -#include "src/dsp/lossless.h" -#include "src/dsp/lossless_common.h" -#include "src/dsp/dsp.h" -#include "src/utils/color_cache_utils.h" -#include "src/utils/utils.h" - -#define MIN_BLOCK_SIZE 256 // minimum block size for backward references - -#define MAX_ENTROPY (1e30f) - -// 1M window (4M bytes) minus 120 special codes for short distances. -#define WINDOW_SIZE ((1 << WINDOW_SIZE_BITS) - 120) - -// Minimum number of pixels for which it is cheaper to encode a -// distance + length instead of each pixel as a literal. -#define MIN_LENGTH 4 - -// ----------------------------------------------------------------------------- - -static const uint8_t plane_to_code_lut[128] = { - 96, 73, 55, 39, 23, 13, 5, 1, 255, 255, 255, 255, 255, 255, 255, 255, - 101, 78, 58, 42, 26, 16, 8, 2, 0, 3, 9, 17, 27, 43, 59, 79, - 102, 86, 62, 46, 32, 20, 10, 6, 4, 7, 11, 21, 33, 47, 63, 87, - 105, 90, 70, 52, 37, 28, 18, 14, 12, 15, 19, 29, 38, 53, 71, 91, - 110, 99, 82, 66, 48, 35, 30, 24, 22, 25, 31, 36, 49, 67, 83, 100, - 115, 108, 94, 76, 64, 50, 44, 40, 34, 41, 45, 51, 65, 77, 95, 109, - 118, 113, 103, 92, 80, 68, 60, 56, 54, 57, 61, 69, 81, 93, 104, 114, - 119, 116, 111, 106, 97, 88, 84, 74, 72, 75, 85, 89, 98, 107, 112, 117 -}; - -extern int VP8LDistanceToPlaneCode(int xsize, int dist); -int VP8LDistanceToPlaneCode(int xsize, int dist) { - const int yoffset = dist / xsize; - const int xoffset = dist - yoffset * xsize; - if (xoffset <= 8 && yoffset < 8) { - return plane_to_code_lut[yoffset * 16 + 8 - xoffset] + 1; - } else if (xoffset > xsize - 8 && yoffset < 7) { - return plane_to_code_lut[(yoffset + 1) * 16 + 8 + (xsize - xoffset)] + 1; - } - return dist + 120; -} - -// Returns the exact index where array1 and array2 are different. For an index -// inferior or equal to best_len_match, the return value just has to be strictly -// inferior to best_len_match. The current behavior is to return 0 if this index -// is best_len_match, and the index itself otherwise. -// If no two elements are the same, it returns max_limit. -static WEBP_INLINE int FindMatchLength(const uint32_t* const array1, - const uint32_t* const array2, - int best_len_match, int max_limit) { - // Before 'expensive' linear match, check if the two arrays match at the - // current best length index. - if (array1[best_len_match] != array2[best_len_match]) return 0; - - return VP8LVectorMismatch(array1, array2, max_limit); -} - -// ----------------------------------------------------------------------------- -// VP8LBackwardRefs - -struct PixOrCopyBlock { - PixOrCopyBlock* next_; // next block (or NULL) - PixOrCopy* start_; // data start - int size_; // currently used size -}; - -extern void VP8LClearBackwardRefs(VP8LBackwardRefs* const refs); -void VP8LClearBackwardRefs(VP8LBackwardRefs* const refs) { - assert(refs != NULL); - if (refs->tail_ != NULL) { - *refs->tail_ = refs->free_blocks_; // recycle all blocks at once - } - refs->free_blocks_ = refs->refs_; - refs->tail_ = &refs->refs_; - refs->last_block_ = NULL; - refs->refs_ = NULL; -} - -void VP8LBackwardRefsClear(VP8LBackwardRefs* const refs) { - assert(refs != NULL); - VP8LClearBackwardRefs(refs); - while (refs->free_blocks_ != NULL) { - PixOrCopyBlock* const next = refs->free_blocks_->next_; - WebPSafeFree(refs->free_blocks_); - refs->free_blocks_ = next; - } -} - -void VP8LBackwardRefsInit(VP8LBackwardRefs* const refs, int block_size) { - assert(refs != NULL); - memset(refs, 0, sizeof(*refs)); - refs->tail_ = &refs->refs_; - refs->block_size_ = - (block_size < MIN_BLOCK_SIZE) ? MIN_BLOCK_SIZE : block_size; -} - -VP8LRefsCursor VP8LRefsCursorInit(const VP8LBackwardRefs* const refs) { - VP8LRefsCursor c; - c.cur_block_ = refs->refs_; - if (refs->refs_ != NULL) { - c.cur_pos = c.cur_block_->start_; - c.last_pos_ = c.cur_pos + c.cur_block_->size_; - } else { - c.cur_pos = NULL; - c.last_pos_ = NULL; - } - return c; -} - -void VP8LRefsCursorNextBlock(VP8LRefsCursor* const c) { - PixOrCopyBlock* const b = c->cur_block_->next_; - c->cur_pos = (b == NULL) ? NULL : b->start_; - c->last_pos_ = (b == NULL) ? NULL : b->start_ + b->size_; - c->cur_block_ = b; -} - -// Create a new block, either from the free list or allocated -static PixOrCopyBlock* BackwardRefsNewBlock(VP8LBackwardRefs* const refs) { - PixOrCopyBlock* b = refs->free_blocks_; - if (b == NULL) { // allocate new memory chunk - const size_t total_size = - sizeof(*b) + refs->block_size_ * sizeof(*b->start_); - b = (PixOrCopyBlock*)WebPSafeMalloc(1ULL, total_size); - if (b == NULL) { - refs->error_ |= 1; - return NULL; - } - b->start_ = (PixOrCopy*)((uint8_t*)b + sizeof(*b)); // not always aligned - } else { // recycle from free-list - refs->free_blocks_ = b->next_; - } - *refs->tail_ = b; - refs->tail_ = &b->next_; - refs->last_block_ = b; - b->next_ = NULL; - b->size_ = 0; - return b; -} - -extern void VP8LBackwardRefsCursorAdd(VP8LBackwardRefs* const refs, - const PixOrCopy v); -void VP8LBackwardRefsCursorAdd(VP8LBackwardRefs* const refs, - const PixOrCopy v) { - PixOrCopyBlock* b = refs->last_block_; - if (b == NULL || b->size_ == refs->block_size_) { - b = BackwardRefsNewBlock(refs); - if (b == NULL) return; // refs->error_ is set - } - b->start_[b->size_++] = v; -} - -// ----------------------------------------------------------------------------- -// Hash chains - -int VP8LHashChainInit(VP8LHashChain* const p, int size) { - assert(p->size_ == 0); - assert(p->offset_length_ == NULL); - assert(size > 0); - p->offset_length_ = - (uint32_t*)WebPSafeMalloc(size, sizeof(*p->offset_length_)); - if (p->offset_length_ == NULL) return 0; - p->size_ = size; - - return 1; -} - -void VP8LHashChainClear(VP8LHashChain* const p) { - assert(p != NULL); - WebPSafeFree(p->offset_length_); - - p->size_ = 0; - p->offset_length_ = NULL; -} - -// ----------------------------------------------------------------------------- - -#define HASH_MULTIPLIER_HI (0xc6a4a793ULL) -#define HASH_MULTIPLIER_LO (0x5bd1e996ULL) - -static WEBP_INLINE uint32_t GetPixPairHash64(const uint32_t* const argb) { - uint32_t key; - key = (argb[1] * HASH_MULTIPLIER_HI) & 0xffffffffu; - key += (argb[0] * HASH_MULTIPLIER_LO) & 0xffffffffu; - key = key >> (32 - HASH_BITS); - return key; -} - -// Returns the maximum number of hash chain lookups to do for a -// given compression quality. Return value in range [8, 86]. -static int GetMaxItersForQuality(int quality) { - return 8 + (quality * quality) / 128; -} - -static int GetWindowSizeForHashChain(int quality, int xsize) { - const int max_window_size = (quality > 75) ? WINDOW_SIZE - : (quality > 50) ? (xsize << 8) - : (quality > 25) ? (xsize << 6) - : (xsize << 4); - assert(xsize > 0); - return (max_window_size > WINDOW_SIZE) ? WINDOW_SIZE : max_window_size; -} - -static WEBP_INLINE int MaxFindCopyLength(int len) { - return (len < MAX_LENGTH) ? len : MAX_LENGTH; -} - -int VP8LHashChainFill(VP8LHashChain* const p, int quality, - const uint32_t* const argb, int xsize, int ysize, - int low_effort) { - const int size = xsize * ysize; - const int iter_max = GetMaxItersForQuality(quality); - const uint32_t window_size = GetWindowSizeForHashChain(quality, xsize); - int pos; - int argb_comp; - uint32_t base_position; - int32_t* hash_to_first_index; - // Temporarily use the p->offset_length_ as a hash chain. - int32_t* chain = (int32_t*)p->offset_length_; - assert(size > 0); - assert(p->size_ != 0); - assert(p->offset_length_ != NULL); - - if (size <= 2) { - p->offset_length_[0] = p->offset_length_[size - 1] = 0; - return 1; - } - - hash_to_first_index = - (int32_t*)WebPSafeMalloc(HASH_SIZE, sizeof(*hash_to_first_index)); - if (hash_to_first_index == NULL) return 0; - - // Set the int32_t array to -1. - memset(hash_to_first_index, 0xff, HASH_SIZE * sizeof(*hash_to_first_index)); - // Fill the chain linking pixels with the same hash. - argb_comp = (argb[0] == argb[1]); - for (pos = 0; pos < size - 2;) { - uint32_t hash_code; - const int argb_comp_next = (argb[pos + 1] == argb[pos + 2]); - if (argb_comp && argb_comp_next) { - // Consecutive pixels with the same color will share the same hash. - // We therefore use a different hash: the color and its repetition - // length. - uint32_t tmp[2]; - uint32_t len = 1; - tmp[0] = argb[pos]; - // Figure out how far the pixels are the same. - // The last pixel has a different 64 bit hash, as its next pixel does - // not have the same color, so we just need to get to the last pixel equal - // to its follower. - while (pos + (int)len + 2 < size && argb[pos + len + 2] == argb[pos]) { - ++len; - } - if (len > MAX_LENGTH) { - // Skip the pixels that match for distance=1 and length>MAX_LENGTH - // because they are linked to their predecessor and we automatically - // check that in the main for loop below. Skipping means setting no - // predecessor in the chain, hence -1. - memset(chain + pos, 0xff, (len - MAX_LENGTH) * sizeof(*chain)); - pos += len - MAX_LENGTH; - len = MAX_LENGTH; - } - // Process the rest of the hash chain. - while (len) { - tmp[1] = len--; - hash_code = GetPixPairHash64(tmp); - chain[pos] = hash_to_first_index[hash_code]; - hash_to_first_index[hash_code] = pos++; - } - argb_comp = 0; - } else { - // Just move one pixel forward. - hash_code = GetPixPairHash64(argb + pos); - chain[pos] = hash_to_first_index[hash_code]; - hash_to_first_index[hash_code] = pos++; - argb_comp = argb_comp_next; - } - } - // Process the penultimate pixel. - chain[pos] = hash_to_first_index[GetPixPairHash64(argb + pos)]; - - WebPSafeFree(hash_to_first_index); - - // Find the best match interval at each pixel, defined by an offset to the - // pixel and a length. The right-most pixel cannot match anything to the right - // (hence a best length of 0) and the left-most pixel nothing to the left - // (hence an offset of 0). - assert(size > 2); - p->offset_length_[0] = p->offset_length_[size - 1] = 0; - for (base_position = size - 2; base_position > 0;) { - const int max_len = MaxFindCopyLength(size - 1 - base_position); - const uint32_t* const argb_start = argb + base_position; - int iter = iter_max; - int best_length = 0; - uint32_t best_distance = 0; - uint32_t best_argb; - const int min_pos = - (base_position > window_size) ? base_position - window_size : 0; - const int length_max = (max_len < 256) ? max_len : 256; - uint32_t max_base_position; - - pos = chain[base_position]; - if (!low_effort) { - int curr_length; - // Heuristic: use the comparison with the above line as an initialization. - if (base_position >= (uint32_t)xsize) { - curr_length = FindMatchLength(argb_start - xsize, argb_start, - best_length, max_len); - if (curr_length > best_length) { - best_length = curr_length; - best_distance = xsize; - } - --iter; - } - // Heuristic: compare to the previous pixel. - curr_length = - FindMatchLength(argb_start - 1, argb_start, best_length, max_len); - if (curr_length > best_length) { - best_length = curr_length; - best_distance = 1; - } - --iter; - // Skip the for loop if we already have the maximum. - if (best_length == MAX_LENGTH) pos = min_pos - 1; - } - best_argb = argb_start[best_length]; - - for (; pos >= min_pos && --iter; pos = chain[pos]) { - int curr_length; - assert(base_position > (uint32_t)pos); - - if (argb[pos + best_length] != best_argb) continue; - - curr_length = VP8LVectorMismatch(argb + pos, argb_start, max_len); - if (best_length < curr_length) { - best_length = curr_length; - best_distance = base_position - pos; - best_argb = argb_start[best_length]; - // Stop if we have reached a good enough length. - if (best_length >= length_max) break; - } - } - // We have the best match but in case the two intervals continue matching - // to the left, we have the best matches for the left-extended pixels. - max_base_position = base_position; - while (1) { - assert(best_length <= MAX_LENGTH); - assert(best_distance <= WINDOW_SIZE); - p->offset_length_[base_position] = - (best_distance << MAX_LENGTH_BITS) | (uint32_t)best_length; - --base_position; - // Stop if we don't have a match or if we are out of bounds. - if (best_distance == 0 || base_position == 0) break; - // Stop if we cannot extend the matching intervals to the left. - if (base_position < best_distance || - argb[base_position - best_distance] != argb[base_position]) { - break; - } - // Stop if we are matching at its limit because there could be a closer - // matching interval with the same maximum length. Then again, if the - // matching interval is as close as possible (best_distance == 1), we will - // never find anything better so let's continue. - if (best_length == MAX_LENGTH && best_distance != 1 && - base_position + MAX_LENGTH < max_base_position) { - break; - } - if (best_length < MAX_LENGTH) { - ++best_length; - max_base_position = base_position; - } - } - } - return 1; -} - -static WEBP_INLINE void AddSingleLiteral(uint32_t pixel, int use_color_cache, - VP8LColorCache* const hashers, - VP8LBackwardRefs* const refs) { - PixOrCopy v; - if (use_color_cache) { - const uint32_t key = VP8LColorCacheGetIndex(hashers, pixel); - if (VP8LColorCacheLookup(hashers, key) == pixel) { - v = PixOrCopyCreateCacheIdx(key); - } else { - v = PixOrCopyCreateLiteral(pixel); - VP8LColorCacheSet(hashers, key, pixel); - } - } else { - v = PixOrCopyCreateLiteral(pixel); - } - VP8LBackwardRefsCursorAdd(refs, v); -} - -static int BackwardReferencesRle(int xsize, int ysize, - const uint32_t* const argb, - int cache_bits, VP8LBackwardRefs* const refs) { - const int pix_count = xsize * ysize; - int i, k; - const int use_color_cache = (cache_bits > 0); - VP8LColorCache hashers; - - if (use_color_cache && !VP8LColorCacheInit(&hashers, cache_bits)) { - return 0; - } - VP8LClearBackwardRefs(refs); - // Add first pixel as literal. - AddSingleLiteral(argb[0], use_color_cache, &hashers, refs); - i = 1; - while (i < pix_count) { - const int max_len = MaxFindCopyLength(pix_count - i); - const int rle_len = FindMatchLength(argb + i, argb + i - 1, 0, max_len); - const int prev_row_len = (i < xsize) ? 0 : - FindMatchLength(argb + i, argb + i - xsize, 0, max_len); - if (rle_len >= prev_row_len && rle_len >= MIN_LENGTH) { - VP8LBackwardRefsCursorAdd(refs, PixOrCopyCreateCopy(1, rle_len)); - // We don't need to update the color cache here since it is always the - // same pixel being copied, and that does not change the color cache - // state. - i += rle_len; - } else if (prev_row_len >= MIN_LENGTH) { - VP8LBackwardRefsCursorAdd(refs, PixOrCopyCreateCopy(xsize, prev_row_len)); - if (use_color_cache) { - for (k = 0; k < prev_row_len; ++k) { - VP8LColorCacheInsert(&hashers, argb[i + k]); - } - } - i += prev_row_len; - } else { - AddSingleLiteral(argb[i], use_color_cache, &hashers, refs); - i++; - } - } - if (use_color_cache) VP8LColorCacheClear(&hashers); - return !refs->error_; -} - -static int BackwardReferencesLz77(int xsize, int ysize, - const uint32_t* const argb, int cache_bits, - const VP8LHashChain* const hash_chain, - VP8LBackwardRefs* const refs) { - int i; - int i_last_check = -1; - int ok = 0; - int cc_init = 0; - const int use_color_cache = (cache_bits > 0); - const int pix_count = xsize * ysize; - VP8LColorCache hashers; - - if (use_color_cache) { - cc_init = VP8LColorCacheInit(&hashers, cache_bits); - if (!cc_init) goto Error; - } - VP8LClearBackwardRefs(refs); - for (i = 0; i < pix_count;) { - // Alternative#1: Code the pixels starting at 'i' using backward reference. - int offset = 0; - int len = 0; - int j; - VP8LHashChainFindCopy(hash_chain, i, &offset, &len); - if (len >= MIN_LENGTH) { - const int len_ini = len; - int max_reach = 0; - const int j_max = - (i + len_ini >= pix_count) ? pix_count - 1 : i + len_ini; - // Only start from what we have not checked already. - i_last_check = (i > i_last_check) ? i : i_last_check; - // We know the best match for the current pixel but we try to find the - // best matches for the current pixel AND the next one combined. - // The naive method would use the intervals: - // [i,i+len) + [i+len, length of best match at i+len) - // while we check if we can use: - // [i,j) (where j<=i+len) + [j, length of best match at j) - for (j = i_last_check + 1; j <= j_max; ++j) { - const int len_j = VP8LHashChainFindLength(hash_chain, j); - const int reach = - j + (len_j >= MIN_LENGTH ? len_j : 1); // 1 for single literal. - if (reach > max_reach) { - len = j - i; - max_reach = reach; - if (max_reach >= pix_count) break; - } - } - } else { - len = 1; - } - // Go with literal or backward reference. - assert(len > 0); - if (len == 1) { - AddSingleLiteral(argb[i], use_color_cache, &hashers, refs); - } else { - VP8LBackwardRefsCursorAdd(refs, PixOrCopyCreateCopy(offset, len)); - if (use_color_cache) { - for (j = i; j < i + len; ++j) VP8LColorCacheInsert(&hashers, argb[j]); - } - } - i += len; - } - - ok = !refs->error_; - Error: - if (cc_init) VP8LColorCacheClear(&hashers); - return ok; -} - -// Compute an LZ77 by forcing matches to happen within a given distance cost. -// We therefore limit the algorithm to the lowest 32 values in the PlaneCode -// definition. -#define WINDOW_OFFSETS_SIZE_MAX 32 -static int BackwardReferencesLz77Box(int xsize, int ysize, - const uint32_t* const argb, int cache_bits, - const VP8LHashChain* const hash_chain_best, - VP8LHashChain* hash_chain, - VP8LBackwardRefs* const refs) { - int i; - const int pix_count = xsize * ysize; - uint16_t* counts; - int window_offsets[WINDOW_OFFSETS_SIZE_MAX] = {0}; - int window_offsets_new[WINDOW_OFFSETS_SIZE_MAX] = {0}; - int window_offsets_size = 0; - int window_offsets_new_size = 0; - uint16_t* const counts_ini = - (uint16_t*)WebPSafeMalloc(xsize * ysize, sizeof(*counts_ini)); - int best_offset_prev = -1, best_length_prev = -1; - if (counts_ini == NULL) return 0; - - // counts[i] counts how many times a pixel is repeated starting at position i. - i = pix_count - 2; - counts = counts_ini + i; - counts[1] = 1; - for (; i >= 0; --i, --counts) { - if (argb[i] == argb[i + 1]) { - // Max out the counts to MAX_LENGTH. - counts[0] = counts[1] + (counts[1] != MAX_LENGTH); - } else { - counts[0] = 1; - } - } - - // Figure out the window offsets around a pixel. They are stored in a - // spiraling order around the pixel as defined by VP8LDistanceToPlaneCode. - { - int x, y; - for (y = 0; y <= 6; ++y) { - for (x = -6; x <= 6; ++x) { - const int offset = y * xsize + x; - int plane_code; - // Ignore offsets that bring us after the pixel. - if (offset <= 0) continue; - plane_code = VP8LDistanceToPlaneCode(xsize, offset) - 1; - if (plane_code >= WINDOW_OFFSETS_SIZE_MAX) continue; - window_offsets[plane_code] = offset; - } - } - // For narrow images, not all plane codes are reached, so remove those. - for (i = 0; i < WINDOW_OFFSETS_SIZE_MAX; ++i) { - if (window_offsets[i] == 0) continue; - window_offsets[window_offsets_size++] = window_offsets[i]; - } - // Given a pixel P, find the offsets that reach pixels unreachable from P-1 - // with any of the offsets in window_offsets[]. - for (i = 0; i < window_offsets_size; ++i) { - int j; - int is_reachable = 0; - for (j = 0; j < window_offsets_size && !is_reachable; ++j) { - is_reachable |= (window_offsets[i] == window_offsets[j] + 1); - } - if (!is_reachable) { - window_offsets_new[window_offsets_new_size] = window_offsets[i]; - ++window_offsets_new_size; - } - } - } - - hash_chain->offset_length_[0] = 0; - for (i = 1; i < pix_count; ++i) { - int ind; - int best_length = VP8LHashChainFindLength(hash_chain_best, i); - int best_offset; - int do_compute = 1; - - if (best_length >= MAX_LENGTH) { - // Do not recompute the best match if we already have a maximal one in the - // window. - best_offset = VP8LHashChainFindOffset(hash_chain_best, i); - for (ind = 0; ind < window_offsets_size; ++ind) { - if (best_offset == window_offsets[ind]) { - do_compute = 0; - break; - } - } - } - if (do_compute) { - // Figure out if we should use the offset/length from the previous pixel - // as an initial guess and therefore only inspect the offsets in - // window_offsets_new[]. - const int use_prev = - (best_length_prev > 1) && (best_length_prev < MAX_LENGTH); - const int num_ind = - use_prev ? window_offsets_new_size : window_offsets_size; - best_length = use_prev ? best_length_prev - 1 : 0; - best_offset = use_prev ? best_offset_prev : 0; - // Find the longest match in a window around the pixel. - for (ind = 0; ind < num_ind; ++ind) { - int curr_length = 0; - int j = i; - int j_offset = - use_prev ? i - window_offsets_new[ind] : i - window_offsets[ind]; - if (j_offset < 0 || argb[j_offset] != argb[i]) continue; - // The longest match is the sum of how many times each pixel is - // repeated. - do { - const int counts_j_offset = counts_ini[j_offset]; - const int counts_j = counts_ini[j]; - if (counts_j_offset != counts_j) { - curr_length += - (counts_j_offset < counts_j) ? counts_j_offset : counts_j; - break; - } - // The same color is repeated counts_pos times at j_offset and j. - curr_length += counts_j_offset; - j_offset += counts_j_offset; - j += counts_j_offset; - } while (curr_length <= MAX_LENGTH && j < pix_count && - argb[j_offset] == argb[j]); - if (best_length < curr_length) { - best_offset = - use_prev ? window_offsets_new[ind] : window_offsets[ind]; - if (curr_length >= MAX_LENGTH) { - best_length = MAX_LENGTH; - break; - } else { - best_length = curr_length; - } - } - } - } - - assert(i + best_length <= pix_count); - assert(best_length <= MAX_LENGTH); - if (best_length <= MIN_LENGTH) { - hash_chain->offset_length_[i] = 0; - best_offset_prev = 0; - best_length_prev = 0; - } else { - hash_chain->offset_length_[i] = - (best_offset << MAX_LENGTH_BITS) | (uint32_t)best_length; - best_offset_prev = best_offset; - best_length_prev = best_length; - } - } - hash_chain->offset_length_[0] = 0; - WebPSafeFree(counts_ini); - - return BackwardReferencesLz77(xsize, ysize, argb, cache_bits, hash_chain, - refs); -} - -// ----------------------------------------------------------------------------- - -static void BackwardReferences2DLocality(int xsize, - const VP8LBackwardRefs* const refs) { - VP8LRefsCursor c = VP8LRefsCursorInit(refs); - while (VP8LRefsCursorOk(&c)) { - if (PixOrCopyIsCopy(c.cur_pos)) { - const int dist = c.cur_pos->argb_or_distance; - const int transformed_dist = VP8LDistanceToPlaneCode(xsize, dist); - c.cur_pos->argb_or_distance = transformed_dist; - } - VP8LRefsCursorNext(&c); - } -} - -// Evaluate optimal cache bits for the local color cache. -// The input *best_cache_bits sets the maximum cache bits to use (passing 0 -// implies disabling the local color cache). The local color cache is also -// disabled for the lower (<= 25) quality. -// Returns 0 in case of memory error. -static int CalculateBestCacheSize(const uint32_t* argb, int quality, - const VP8LBackwardRefs* const refs, - int* const best_cache_bits) { - int i; - const int cache_bits_max = (quality <= 25) ? 0 : *best_cache_bits; - double entropy_min = MAX_ENTROPY; - int cc_init[MAX_COLOR_CACHE_BITS + 1] = { 0 }; - VP8LColorCache hashers[MAX_COLOR_CACHE_BITS + 1]; - VP8LRefsCursor c = VP8LRefsCursorInit(refs); - VP8LHistogram* histos[MAX_COLOR_CACHE_BITS + 1] = { NULL }; - int ok = 0; - - assert(cache_bits_max >= 0 && cache_bits_max <= MAX_COLOR_CACHE_BITS); - - if (cache_bits_max == 0) { - *best_cache_bits = 0; - // Local color cache is disabled. - return 1; - } - - // Allocate data. - for (i = 0; i <= cache_bits_max; ++i) { - histos[i] = VP8LAllocateHistogram(i); - if (histos[i] == NULL) goto Error; - if (i == 0) continue; - cc_init[i] = VP8LColorCacheInit(&hashers[i], i); - if (!cc_init[i]) goto Error; - } - - // Find the cache_bits giving the lowest entropy. The search is done in a - // brute-force way as the function (entropy w.r.t cache_bits) can be - // anything in practice. - while (VP8LRefsCursorOk(&c)) { - const PixOrCopy* const v = c.cur_pos; - if (PixOrCopyIsLiteral(v)) { - const uint32_t pix = *argb++; - const uint32_t a = (pix >> 24) & 0xff; - const uint32_t r = (pix >> 16) & 0xff; - const uint32_t g = (pix >> 8) & 0xff; - const uint32_t b = (pix >> 0) & 0xff; - // The keys of the caches can be derived from the longest one. - int key = VP8LHashPix(pix, 32 - cache_bits_max); - // Do not use the color cache for cache_bits = 0. - ++histos[0]->blue_[b]; - ++histos[0]->literal_[g]; - ++histos[0]->red_[r]; - ++histos[0]->alpha_[a]; - // Deal with cache_bits > 0. - for (i = cache_bits_max; i >= 1; --i, key >>= 1) { - if (VP8LColorCacheLookup(&hashers[i], key) == pix) { - ++histos[i]->literal_[NUM_LITERAL_CODES + NUM_LENGTH_CODES + key]; - } else { - VP8LColorCacheSet(&hashers[i], key, pix); - ++histos[i]->blue_[b]; - ++histos[i]->literal_[g]; - ++histos[i]->red_[r]; - ++histos[i]->alpha_[a]; - } - } - } else { - // We should compute the contribution of the (distance,length) - // histograms but those are the same independently from the cache size. - // As those constant contributions are in the end added to the other - // histogram contributions, we can safely ignore them. - int len = PixOrCopyLength(v); - uint32_t argb_prev = *argb ^ 0xffffffffu; - // Update the color caches. - do { - if (*argb != argb_prev) { - // Efficiency: insert only if the color changes. - int key = VP8LHashPix(*argb, 32 - cache_bits_max); - for (i = cache_bits_max; i >= 1; --i, key >>= 1) { - hashers[i].colors_[key] = *argb; - } - argb_prev = *argb; - } - argb++; - } while (--len != 0); - } - VP8LRefsCursorNext(&c); - } - - for (i = 0; i <= cache_bits_max; ++i) { - const double entropy = VP8LHistogramEstimateBits(histos[i]); - if (i == 0 || entropy < entropy_min) { - entropy_min = entropy; - *best_cache_bits = i; - } - } - ok = 1; -Error: - for (i = 0; i <= cache_bits_max; ++i) { - if (cc_init[i]) VP8LColorCacheClear(&hashers[i]); - VP8LFreeHistogram(histos[i]); - } - return ok; -} - -// Update (in-place) backward references for specified cache_bits. -static int BackwardRefsWithLocalCache(const uint32_t* const argb, - int cache_bits, - VP8LBackwardRefs* const refs) { - int pixel_index = 0; - VP8LColorCache hashers; - VP8LRefsCursor c = VP8LRefsCursorInit(refs); - if (!VP8LColorCacheInit(&hashers, cache_bits)) return 0; - - while (VP8LRefsCursorOk(&c)) { - PixOrCopy* const v = c.cur_pos; - if (PixOrCopyIsLiteral(v)) { - const uint32_t argb_literal = v->argb_or_distance; - const int ix = VP8LColorCacheContains(&hashers, argb_literal); - if (ix >= 0) { - // hashers contains argb_literal - *v = PixOrCopyCreateCacheIdx(ix); - } else { - VP8LColorCacheInsert(&hashers, argb_literal); - } - ++pixel_index; - } else { - // refs was created without local cache, so it can not have cache indexes. - int k; - assert(PixOrCopyIsCopy(v)); - for (k = 0; k < v->len; ++k) { - VP8LColorCacheInsert(&hashers, argb[pixel_index++]); - } - } - VP8LRefsCursorNext(&c); - } - VP8LColorCacheClear(&hashers); - return 1; -} - -static VP8LBackwardRefs* GetBackwardReferencesLowEffort( - int width, int height, const uint32_t* const argb, - int* const cache_bits, const VP8LHashChain* const hash_chain, - VP8LBackwardRefs* const refs_lz77) { - *cache_bits = 0; - if (!BackwardReferencesLz77(width, height, argb, 0, hash_chain, refs_lz77)) { - return NULL; - } - BackwardReferences2DLocality(width, refs_lz77); - return refs_lz77; -} - -extern int VP8LBackwardReferencesTraceBackwards( - int xsize, int ysize, const uint32_t* const argb, int cache_bits, - const VP8LHashChain* const hash_chain, - const VP8LBackwardRefs* const refs_src, VP8LBackwardRefs* const refs_dst); -static VP8LBackwardRefs* GetBackwardReferences( - int width, int height, const uint32_t* const argb, int quality, - int lz77_types_to_try, int* const cache_bits, - const VP8LHashChain* const hash_chain, VP8LBackwardRefs* best, - VP8LBackwardRefs* worst) { - const int cache_bits_initial = *cache_bits; - double bit_cost_best = -1; - VP8LHistogram* histo = NULL; - int lz77_type, lz77_type_best = 0; - VP8LHashChain hash_chain_box; - memset(&hash_chain_box, 0, sizeof(hash_chain_box)); - - histo = VP8LAllocateHistogram(MAX_COLOR_CACHE_BITS); - if (histo == NULL) goto Error; - - for (lz77_type = 1; lz77_types_to_try; - lz77_types_to_try &= ~lz77_type, lz77_type <<= 1) { - int res = 0; - double bit_cost; - int cache_bits_tmp = cache_bits_initial; - if ((lz77_types_to_try & lz77_type) == 0) continue; - switch (lz77_type) { - case kLZ77RLE: - res = BackwardReferencesRle(width, height, argb, 0, worst); - break; - case kLZ77Standard: - // Compute LZ77 with no cache (0 bits), as the ideal LZ77 with a color - // cache is not that different in practice. - res = BackwardReferencesLz77(width, height, argb, 0, hash_chain, worst); - break; - case kLZ77Box: - if (!VP8LHashChainInit(&hash_chain_box, width * height)) goto Error; - res = BackwardReferencesLz77Box(width, height, argb, 0, hash_chain, - &hash_chain_box, worst); - break; - default: - assert(0); - } - if (!res) goto Error; - - // Next, try with a color cache and update the references. - if (!CalculateBestCacheSize(argb, quality, worst, &cache_bits_tmp)) { - goto Error; - } - if (cache_bits_tmp > 0) { - if (!BackwardRefsWithLocalCache(argb, cache_bits_tmp, worst)) { - goto Error; - } - } - - // Keep the best backward references. - VP8LHistogramCreate(histo, worst, cache_bits_tmp); - bit_cost = VP8LHistogramEstimateBits(histo); - if (lz77_type_best == 0 || bit_cost < bit_cost_best) { - VP8LBackwardRefs* const tmp = worst; - worst = best; - best = tmp; - bit_cost_best = bit_cost; - *cache_bits = cache_bits_tmp; - lz77_type_best = lz77_type; - } - } - assert(lz77_type_best > 0); - - // Improve on simple LZ77 but only for high quality (TraceBackwards is - // costly). - if ((lz77_type_best == kLZ77Standard || lz77_type_best == kLZ77Box) && - quality >= 25) { - const VP8LHashChain* const hash_chain_tmp = - (lz77_type_best == kLZ77Standard) ? hash_chain : &hash_chain_box; - if (VP8LBackwardReferencesTraceBackwards(width, height, argb, *cache_bits, - hash_chain_tmp, best, worst)) { - double bit_cost_trace; - VP8LHistogramCreate(histo, worst, *cache_bits); - bit_cost_trace = VP8LHistogramEstimateBits(histo); - if (bit_cost_trace < bit_cost_best) best = worst; - } - } - - BackwardReferences2DLocality(width, best); - -Error: - VP8LHashChainClear(&hash_chain_box); - VP8LFreeHistogram(histo); - return best; -} - -VP8LBackwardRefs* VP8LGetBackwardReferences( - int width, int height, const uint32_t* const argb, int quality, - int low_effort, int lz77_types_to_try, int* const cache_bits, - const VP8LHashChain* const hash_chain, VP8LBackwardRefs* const refs_tmp1, - VP8LBackwardRefs* const refs_tmp2) { - if (low_effort) { - return GetBackwardReferencesLowEffort(width, height, argb, cache_bits, - hash_chain, refs_tmp1); - } else { - return GetBackwardReferences(width, height, argb, quality, - lz77_types_to_try, cache_bits, hash_chain, - refs_tmp1, refs_tmp2); - } -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/backward_references_enc.h b/Dependencies/FreeImage/Source/LibWebP/src/enc/backward_references_enc.h deleted file mode 100644 index a6d141e..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/backward_references_enc.h +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Author: Jyrki Alakuijala (jyrki@google.com) -// - -#ifndef WEBP_ENC_BACKWARD_REFERENCES_ENC_H_ -#define WEBP_ENC_BACKWARD_REFERENCES_ENC_H_ - -#include -#include -#include "src/webp/types.h" -#include "src/webp/format_constants.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// The maximum allowed limit is 11. -#define MAX_COLOR_CACHE_BITS 10 - -// ----------------------------------------------------------------------------- -// PixOrCopy - -enum Mode { - kLiteral, - kCacheIdx, - kCopy, - kNone -}; - -typedef struct { - // mode as uint8_t to make the memory layout to be exactly 8 bytes. - uint8_t mode; - uint16_t len; - uint32_t argb_or_distance; -} PixOrCopy; - -static WEBP_INLINE PixOrCopy PixOrCopyCreateCopy(uint32_t distance, - uint16_t len) { - PixOrCopy retval; - retval.mode = kCopy; - retval.argb_or_distance = distance; - retval.len = len; - return retval; -} - -static WEBP_INLINE PixOrCopy PixOrCopyCreateCacheIdx(int idx) { - PixOrCopy retval; - assert(idx >= 0); - assert(idx < (1 << MAX_COLOR_CACHE_BITS)); - retval.mode = kCacheIdx; - retval.argb_or_distance = idx; - retval.len = 1; - return retval; -} - -static WEBP_INLINE PixOrCopy PixOrCopyCreateLiteral(uint32_t argb) { - PixOrCopy retval; - retval.mode = kLiteral; - retval.argb_or_distance = argb; - retval.len = 1; - return retval; -} - -static WEBP_INLINE int PixOrCopyIsLiteral(const PixOrCopy* const p) { - return (p->mode == kLiteral); -} - -static WEBP_INLINE int PixOrCopyIsCacheIdx(const PixOrCopy* const p) { - return (p->mode == kCacheIdx); -} - -static WEBP_INLINE int PixOrCopyIsCopy(const PixOrCopy* const p) { - return (p->mode == kCopy); -} - -static WEBP_INLINE uint32_t PixOrCopyLiteral(const PixOrCopy* const p, - int component) { - assert(p->mode == kLiteral); - return (p->argb_or_distance >> (component * 8)) & 0xff; -} - -static WEBP_INLINE uint32_t PixOrCopyLength(const PixOrCopy* const p) { - return p->len; -} - -static WEBP_INLINE uint32_t PixOrCopyCacheIdx(const PixOrCopy* const p) { - assert(p->mode == kCacheIdx); - assert(p->argb_or_distance < (1U << MAX_COLOR_CACHE_BITS)); - return p->argb_or_distance; -} - -static WEBP_INLINE uint32_t PixOrCopyDistance(const PixOrCopy* const p) { - assert(p->mode == kCopy); - return p->argb_or_distance; -} - -// ----------------------------------------------------------------------------- -// VP8LHashChain - -#define HASH_BITS 18 -#define HASH_SIZE (1 << HASH_BITS) - -// If you change this, you need MAX_LENGTH_BITS + WINDOW_SIZE_BITS <= 32 as it -// is used in VP8LHashChain. -#define MAX_LENGTH_BITS 12 -#define WINDOW_SIZE_BITS 20 -// We want the max value to be attainable and stored in MAX_LENGTH_BITS bits. -#define MAX_LENGTH ((1 << MAX_LENGTH_BITS) - 1) -#if MAX_LENGTH_BITS + WINDOW_SIZE_BITS > 32 -#error "MAX_LENGTH_BITS + WINDOW_SIZE_BITS > 32" -#endif - -typedef struct VP8LHashChain VP8LHashChain; -struct VP8LHashChain { - // The 20 most significant bits contain the offset at which the best match - // is found. These 20 bits are the limit defined by GetWindowSizeForHashChain - // (through WINDOW_SIZE = 1<<20). - // The lower 12 bits contain the length of the match. The 12 bit limit is - // defined in MaxFindCopyLength with MAX_LENGTH=4096. - uint32_t* offset_length_; - // This is the maximum size of the hash_chain that can be constructed. - // Typically this is the pixel count (width x height) for a given image. - int size_; -}; - -// Must be called first, to set size. -int VP8LHashChainInit(VP8LHashChain* const p, int size); -// Pre-compute the best matches for argb. -int VP8LHashChainFill(VP8LHashChain* const p, int quality, - const uint32_t* const argb, int xsize, int ysize, - int low_effort); -void VP8LHashChainClear(VP8LHashChain* const p); // release memory - -static WEBP_INLINE int VP8LHashChainFindOffset(const VP8LHashChain* const p, - const int base_position) { - return p->offset_length_[base_position] >> MAX_LENGTH_BITS; -} - -static WEBP_INLINE int VP8LHashChainFindLength(const VP8LHashChain* const p, - const int base_position) { - return p->offset_length_[base_position] & ((1U << MAX_LENGTH_BITS) - 1); -} - -static WEBP_INLINE void VP8LHashChainFindCopy(const VP8LHashChain* const p, - int base_position, - int* const offset_ptr, - int* const length_ptr) { - *offset_ptr = VP8LHashChainFindOffset(p, base_position); - *length_ptr = VP8LHashChainFindLength(p, base_position); -} - -// ----------------------------------------------------------------------------- -// VP8LBackwardRefs (block-based backward-references storage) - -// maximum number of reference blocks the image will be segmented into -#define MAX_REFS_BLOCK_PER_IMAGE 16 - -typedef struct PixOrCopyBlock PixOrCopyBlock; // forward declaration -typedef struct VP8LBackwardRefs VP8LBackwardRefs; - -// Container for blocks chain -struct VP8LBackwardRefs { - int block_size_; // common block-size - int error_; // set to true if some memory error occurred - PixOrCopyBlock* refs_; // list of currently used blocks - PixOrCopyBlock** tail_; // for list recycling - PixOrCopyBlock* free_blocks_; // free-list - PixOrCopyBlock* last_block_; // used for adding new refs (internal) -}; - -// Initialize the object. 'block_size' is the common block size to store -// references (typically, width * height / MAX_REFS_BLOCK_PER_IMAGE). -void VP8LBackwardRefsInit(VP8LBackwardRefs* const refs, int block_size); -// Release memory for backward references. -void VP8LBackwardRefsClear(VP8LBackwardRefs* const refs); - -// Cursor for iterating on references content -typedef struct { - // public: - PixOrCopy* cur_pos; // current position - // private: - PixOrCopyBlock* cur_block_; // current block in the refs list - const PixOrCopy* last_pos_; // sentinel for switching to next block -} VP8LRefsCursor; - -// Returns a cursor positioned at the beginning of the references list. -VP8LRefsCursor VP8LRefsCursorInit(const VP8LBackwardRefs* const refs); -// Returns true if cursor is pointing at a valid position. -static WEBP_INLINE int VP8LRefsCursorOk(const VP8LRefsCursor* const c) { - return (c->cur_pos != NULL); -} -// Move to next block of references. Internal, not to be called directly. -void VP8LRefsCursorNextBlock(VP8LRefsCursor* const c); -// Move to next position, or NULL. Should not be called if !VP8LRefsCursorOk(). -static WEBP_INLINE void VP8LRefsCursorNext(VP8LRefsCursor* const c) { - assert(c != NULL); - assert(VP8LRefsCursorOk(c)); - if (++c->cur_pos == c->last_pos_) VP8LRefsCursorNextBlock(c); -} - -// ----------------------------------------------------------------------------- -// Main entry points - -enum VP8LLZ77Type { - kLZ77Standard = 1, - kLZ77RLE = 2, - kLZ77Box = 4 -}; - -// Evaluates best possible backward references for specified quality. -// The input cache_bits to 'VP8LGetBackwardReferences' sets the maximum cache -// bits to use (passing 0 implies disabling the local color cache). -// The optimal cache bits is evaluated and set for the *cache_bits parameter. -// The return value is the pointer to the best of the two backward refs viz, -// refs[0] or refs[1]. -VP8LBackwardRefs* VP8LGetBackwardReferences( - int width, int height, const uint32_t* const argb, int quality, - int low_effort, int lz77_types_to_try, int* const cache_bits, - const VP8LHashChain* const hash_chain, VP8LBackwardRefs* const refs_tmp1, - VP8LBackwardRefs* const refs_tmp2); - -#ifdef __cplusplus -} -#endif - -#endif // WEBP_ENC_BACKWARD_REFERENCES_ENC_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/config_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/config_enc.c deleted file mode 100644 index 51d5f66..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/config_enc.c +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Coding tools configuration -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifdef HAVE_CONFIG_H -#include "src/webp/config.h" -#endif - -#include "src/webp/encode.h" - -//------------------------------------------------------------------------------ -// WebPConfig -//------------------------------------------------------------------------------ - -int WebPConfigInitInternal(WebPConfig* config, - WebPPreset preset, float quality, int version) { - if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_ENCODER_ABI_VERSION)) { - return 0; // caller/system version mismatch! - } - if (config == NULL) return 0; - - config->quality = quality; - config->target_size = 0; - config->target_PSNR = 0.; - config->method = 4; - config->sns_strength = 50; - config->filter_strength = 60; // mid-filtering - config->filter_sharpness = 0; - config->filter_type = 1; // default: strong (so U/V is filtered too) - config->partitions = 0; - config->segments = 4; - config->pass = 1; - config->show_compressed = 0; - config->preprocessing = 0; - config->autofilter = 0; - config->partition_limit = 0; - config->alpha_compression = 1; - config->alpha_filtering = 1; - config->alpha_quality = 100; - config->lossless = 0; - config->exact = 0; - config->image_hint = WEBP_HINT_DEFAULT; - config->emulate_jpeg_size = 0; - config->thread_level = 0; - config->low_memory = 0; - config->near_lossless = 100; - config->use_delta_palette = 0; - config->use_sharp_yuv = 0; - - // TODO(skal): tune. - switch (preset) { - case WEBP_PRESET_PICTURE: - config->sns_strength = 80; - config->filter_sharpness = 4; - config->filter_strength = 35; - config->preprocessing &= ~2; // no dithering - break; - case WEBP_PRESET_PHOTO: - config->sns_strength = 80; - config->filter_sharpness = 3; - config->filter_strength = 30; - config->preprocessing |= 2; - break; - case WEBP_PRESET_DRAWING: - config->sns_strength = 25; - config->filter_sharpness = 6; - config->filter_strength = 10; - break; - case WEBP_PRESET_ICON: - config->sns_strength = 0; - config->filter_strength = 0; // disable filtering to retain sharpness - config->preprocessing &= ~2; // no dithering - break; - case WEBP_PRESET_TEXT: - config->sns_strength = 0; - config->filter_strength = 0; // disable filtering to retain sharpness - config->preprocessing &= ~2; // no dithering - config->segments = 2; - break; - case WEBP_PRESET_DEFAULT: - default: - break; - } - return WebPValidateConfig(config); -} - -int WebPValidateConfig(const WebPConfig* config) { - if (config == NULL) return 0; - if (config->quality < 0 || config->quality > 100) return 0; - if (config->target_size < 0) return 0; - if (config->target_PSNR < 0) return 0; - if (config->method < 0 || config->method > 6) return 0; - if (config->segments < 1 || config->segments > 4) return 0; - if (config->sns_strength < 0 || config->sns_strength > 100) return 0; - if (config->filter_strength < 0 || config->filter_strength > 100) return 0; - if (config->filter_sharpness < 0 || config->filter_sharpness > 7) return 0; - if (config->filter_type < 0 || config->filter_type > 1) return 0; - if (config->autofilter < 0 || config->autofilter > 1) return 0; - if (config->pass < 1 || config->pass > 10) return 0; - if (config->show_compressed < 0 || config->show_compressed > 1) return 0; - if (config->preprocessing < 0 || config->preprocessing > 7) return 0; - if (config->partitions < 0 || config->partitions > 3) return 0; - if (config->partition_limit < 0 || config->partition_limit > 100) return 0; - if (config->alpha_compression < 0) return 0; - if (config->alpha_filtering < 0) return 0; - if (config->alpha_quality < 0 || config->alpha_quality > 100) return 0; - if (config->lossless < 0 || config->lossless > 1) return 0; - if (config->near_lossless < 0 || config->near_lossless > 100) return 0; - if (config->image_hint >= WEBP_HINT_LAST) return 0; - if (config->emulate_jpeg_size < 0 || config->emulate_jpeg_size > 1) return 0; - if (config->thread_level < 0 || config->thread_level > 1) return 0; - if (config->low_memory < 0 || config->low_memory > 1) return 0; - if (config->exact < 0 || config->exact > 1) return 0; - if (config->use_delta_palette < 0 || config->use_delta_palette > 1) { - return 0; - } - if (config->use_sharp_yuv < 0 || config->use_sharp_yuv > 1) return 0; - - return 1; -} - -//------------------------------------------------------------------------------ - -#define MAX_LEVEL 9 - -// Mapping between -z level and -m / -q parameter settings. -static const struct { - uint8_t method_; - uint8_t quality_; -} kLosslessPresets[MAX_LEVEL + 1] = { - { 0, 0 }, { 1, 20 }, { 2, 25 }, { 3, 30 }, { 3, 50 }, - { 4, 50 }, { 4, 75 }, { 4, 90 }, { 5, 90 }, { 6, 100 } -}; - -int WebPConfigLosslessPreset(WebPConfig* config, int level) { - if (config == NULL || level < 0 || level > MAX_LEVEL) return 0; - config->lossless = 1; - config->method = kLosslessPresets[level].method_; - config->quality = kLosslessPresets[level].quality_; - return 1; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/cost_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/cost_enc.c deleted file mode 100644 index 9aecad7..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/cost_enc.c +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Cost tables for level and modes -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/enc/cost_enc.h" - -//------------------------------------------------------------------------------ -// Level cost tables - -// For each given level, the following table gives the pattern of contexts to -// use for coding it (in [][0]) as well as the bit value to use for each -// context (in [][1]). -const uint16_t VP8LevelCodes[MAX_VARIABLE_LEVEL][2] = { - {0x001, 0x000}, {0x007, 0x001}, {0x00f, 0x005}, - {0x00f, 0x00d}, {0x033, 0x003}, {0x033, 0x003}, {0x033, 0x023}, - {0x033, 0x023}, {0x033, 0x023}, {0x033, 0x023}, {0x0d3, 0x013}, - {0x0d3, 0x013}, {0x0d3, 0x013}, {0x0d3, 0x013}, {0x0d3, 0x013}, - {0x0d3, 0x013}, {0x0d3, 0x013}, {0x0d3, 0x013}, {0x0d3, 0x093}, - {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093}, - {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093}, - {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093}, - {0x0d3, 0x093}, {0x0d3, 0x093}, {0x0d3, 0x093}, {0x153, 0x053}, - {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, - {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, - {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, - {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, - {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, - {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, - {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, - {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x053}, {0x153, 0x153} -}; - -static int VariableLevelCost(int level, const uint8_t probas[NUM_PROBAS]) { - int pattern = VP8LevelCodes[level - 1][0]; - int bits = VP8LevelCodes[level - 1][1]; - int cost = 0; - int i; - for (i = 2; pattern; ++i) { - if (pattern & 1) { - cost += VP8BitCost(bits & 1, probas[i]); - } - bits >>= 1; - pattern >>= 1; - } - return cost; -} - -//------------------------------------------------------------------------------ -// Pre-calc level costs once for all - -void VP8CalculateLevelCosts(VP8EncProba* const proba) { - int ctype, band, ctx; - - if (!proba->dirty_) return; // nothing to do. - - for (ctype = 0; ctype < NUM_TYPES; ++ctype) { - int n; - for (band = 0; band < NUM_BANDS; ++band) { - for (ctx = 0; ctx < NUM_CTX; ++ctx) { - const uint8_t* const p = proba->coeffs_[ctype][band][ctx]; - uint16_t* const table = proba->level_cost_[ctype][band][ctx]; - const int cost0 = (ctx > 0) ? VP8BitCost(1, p[0]) : 0; - const int cost_base = VP8BitCost(1, p[1]) + cost0; - int v; - table[0] = VP8BitCost(0, p[1]) + cost0; - for (v = 1; v <= MAX_VARIABLE_LEVEL; ++v) { - table[v] = cost_base + VariableLevelCost(v, p); - } - // Starting at level 67 and up, the variable part of the cost is - // actually constant. - } - } - for (n = 0; n < 16; ++n) { // replicate bands. We don't need to sentinel. - for (ctx = 0; ctx < NUM_CTX; ++ctx) { - proba->remapped_costs_[ctype][n][ctx] = - proba->level_cost_[ctype][VP8EncBands[n]][ctx]; - } - } - } - proba->dirty_ = 0; -} - -//------------------------------------------------------------------------------ -// Mode cost tables. - -// These are the fixed probabilities (in the coding trees) turned into bit-cost -// by calling VP8BitCost(). -const uint16_t VP8FixedCostsUV[4] = { 302, 984, 439, 642 }; -// note: these values include the fixed VP8BitCost(1, 145) mode selection cost. -const uint16_t VP8FixedCostsI16[4] = { 663, 919, 872, 919 }; -const uint16_t VP8FixedCostsI4[NUM_BMODES][NUM_BMODES][NUM_BMODES] = { - { { 40, 1151, 1723, 1874, 2103, 2019, 1628, 1777, 2226, 2137 }, - { 192, 469, 1296, 1308, 1849, 1794, 1781, 1703, 1713, 1522 }, - { 142, 910, 762, 1684, 1849, 1576, 1460, 1305, 1801, 1657 }, - { 559, 641, 1370, 421, 1182, 1569, 1612, 1725, 863, 1007 }, - { 299, 1059, 1256, 1108, 636, 1068, 1581, 1883, 869, 1142 }, - { 277, 1111, 707, 1362, 1089, 672, 1603, 1541, 1545, 1291 }, - { 214, 781, 1609, 1303, 1632, 2229, 726, 1560, 1713, 918 }, - { 152, 1037, 1046, 1759, 1983, 2174, 1358, 742, 1740, 1390 }, - { 512, 1046, 1420, 753, 752, 1297, 1486, 1613, 460, 1207 }, - { 424, 827, 1362, 719, 1462, 1202, 1199, 1476, 1199, 538 } }, - { { 240, 402, 1134, 1491, 1659, 1505, 1517, 1555, 1979, 2099 }, - { 467, 242, 960, 1232, 1714, 1620, 1834, 1570, 1676, 1391 }, - { 500, 455, 463, 1507, 1699, 1282, 1564, 982, 2114, 2114 }, - { 672, 643, 1372, 331, 1589, 1667, 1453, 1938, 996, 876 }, - { 458, 783, 1037, 911, 738, 968, 1165, 1518, 859, 1033 }, - { 504, 815, 504, 1139, 1219, 719, 1506, 1085, 1268, 1268 }, - { 333, 630, 1445, 1239, 1883, 3672, 799, 1548, 1865, 598 }, - { 399, 644, 746, 1342, 1856, 1350, 1493, 613, 1855, 1015 }, - { 622, 749, 1205, 608, 1066, 1408, 1290, 1406, 546, 971 }, - { 500, 753, 1041, 668, 1230, 1617, 1297, 1425, 1383, 523 } }, - { { 394, 553, 523, 1502, 1536, 981, 1608, 1142, 1666, 2181 }, - { 655, 430, 375, 1411, 1861, 1220, 1677, 1135, 1978, 1553 }, - { 690, 640, 245, 1954, 2070, 1194, 1528, 982, 1972, 2232 }, - { 559, 834, 741, 867, 1131, 980, 1225, 852, 1092, 784 }, - { 690, 875, 516, 959, 673, 894, 1056, 1190, 1528, 1126 }, - { 740, 951, 384, 1277, 1177, 492, 1579, 1155, 1846, 1513 }, - { 323, 775, 1062, 1776, 3062, 1274, 813, 1188, 1372, 655 }, - { 488, 971, 484, 1767, 1515, 1775, 1115, 503, 1539, 1461 }, - { 740, 1006, 998, 709, 851, 1230, 1337, 788, 741, 721 }, - { 522, 1073, 573, 1045, 1346, 887, 1046, 1146, 1203, 697 } }, - { { 105, 864, 1442, 1009, 1934, 1840, 1519, 1920, 1673, 1579 }, - { 534, 305, 1193, 683, 1388, 2164, 1802, 1894, 1264, 1170 }, - { 305, 518, 877, 1108, 1426, 3215, 1425, 1064, 1320, 1242 }, - { 683, 732, 1927, 257, 1493, 2048, 1858, 1552, 1055, 947 }, - { 394, 814, 1024, 660, 959, 1556, 1282, 1289, 893, 1047 }, - { 528, 615, 996, 940, 1201, 635, 1094, 2515, 803, 1358 }, - { 347, 614, 1609, 1187, 3133, 1345, 1007, 1339, 1017, 667 }, - { 218, 740, 878, 1605, 3650, 3650, 1345, 758, 1357, 1617 }, - { 672, 750, 1541, 558, 1257, 1599, 1870, 2135, 402, 1087 }, - { 592, 684, 1161, 430, 1092, 1497, 1475, 1489, 1095, 822 } }, - { { 228, 1056, 1059, 1368, 752, 982, 1512, 1518, 987, 1782 }, - { 494, 514, 818, 942, 965, 892, 1610, 1356, 1048, 1363 }, - { 512, 648, 591, 1042, 761, 991, 1196, 1454, 1309, 1463 }, - { 683, 749, 1043, 676, 841, 1396, 1133, 1138, 654, 939 }, - { 622, 1101, 1126, 994, 361, 1077, 1203, 1318, 877, 1219 }, - { 631, 1068, 857, 1650, 651, 477, 1650, 1419, 828, 1170 }, - { 555, 727, 1068, 1335, 3127, 1339, 820, 1331, 1077, 429 }, - { 504, 879, 624, 1398, 889, 889, 1392, 808, 891, 1406 }, - { 683, 1602, 1289, 977, 578, 983, 1280, 1708, 406, 1122 }, - { 399, 865, 1433, 1070, 1072, 764, 968, 1477, 1223, 678 } }, - { { 333, 760, 935, 1638, 1010, 529, 1646, 1410, 1472, 2219 }, - { 512, 494, 750, 1160, 1215, 610, 1870, 1868, 1628, 1169 }, - { 572, 646, 492, 1934, 1208, 603, 1580, 1099, 1398, 1995 }, - { 786, 789, 942, 581, 1018, 951, 1599, 1207, 731, 768 }, - { 690, 1015, 672, 1078, 582, 504, 1693, 1438, 1108, 2897 }, - { 768, 1267, 571, 2005, 1243, 244, 2881, 1380, 1786, 1453 }, - { 452, 899, 1293, 903, 1311, 3100, 465, 1311, 1319, 813 }, - { 394, 927, 942, 1103, 1358, 1104, 946, 593, 1363, 1109 }, - { 559, 1005, 1007, 1016, 658, 1173, 1021, 1164, 623, 1028 }, - { 564, 796, 632, 1005, 1014, 863, 2316, 1268, 938, 764 } }, - { { 266, 606, 1098, 1228, 1497, 1243, 948, 1030, 1734, 1461 }, - { 366, 585, 901, 1060, 1407, 1247, 876, 1134, 1620, 1054 }, - { 452, 565, 542, 1729, 1479, 1479, 1016, 886, 2938, 1150 }, - { 555, 1088, 1533, 950, 1354, 895, 834, 1019, 1021, 496 }, - { 704, 815, 1193, 971, 973, 640, 1217, 2214, 832, 578 }, - { 672, 1245, 579, 871, 875, 774, 872, 1273, 1027, 949 }, - { 296, 1134, 2050, 1784, 1636, 3425, 442, 1550, 2076, 722 }, - { 342, 982, 1259, 1846, 1848, 1848, 622, 568, 1847, 1052 }, - { 555, 1064, 1304, 828, 746, 1343, 1075, 1329, 1078, 494 }, - { 288, 1167, 1285, 1174, 1639, 1639, 833, 2254, 1304, 509 } }, - { { 342, 719, 767, 1866, 1757, 1270, 1246, 550, 1746, 2151 }, - { 483, 653, 694, 1509, 1459, 1410, 1218, 507, 1914, 1266 }, - { 488, 757, 447, 2979, 1813, 1268, 1654, 539, 1849, 2109 }, - { 522, 1097, 1085, 851, 1365, 1111, 851, 901, 961, 605 }, - { 709, 716, 841, 728, 736, 945, 941, 862, 2845, 1057 }, - { 512, 1323, 500, 1336, 1083, 681, 1342, 717, 1604, 1350 }, - { 452, 1155, 1372, 1900, 1501, 3290, 311, 944, 1919, 922 }, - { 403, 1520, 977, 2132, 1733, 3522, 1076, 276, 3335, 1547 }, - { 559, 1374, 1101, 615, 673, 2462, 974, 795, 984, 984 }, - { 547, 1122, 1062, 812, 1410, 951, 1140, 622, 1268, 651 } }, - { { 165, 982, 1235, 938, 1334, 1366, 1659, 1578, 964, 1612 }, - { 592, 422, 925, 847, 1139, 1112, 1387, 2036, 861, 1041 }, - { 403, 837, 732, 770, 941, 1658, 1250, 809, 1407, 1407 }, - { 896, 874, 1071, 381, 1568, 1722, 1437, 2192, 480, 1035 }, - { 640, 1098, 1012, 1032, 684, 1382, 1581, 2106, 416, 865 }, - { 559, 1005, 819, 914, 710, 770, 1418, 920, 838, 1435 }, - { 415, 1258, 1245, 870, 1278, 3067, 770, 1021, 1287, 522 }, - { 406, 990, 601, 1009, 1265, 1265, 1267, 759, 1017, 1277 }, - { 968, 1182, 1329, 788, 1032, 1292, 1705, 1714, 203, 1403 }, - { 732, 877, 1279, 471, 901, 1161, 1545, 1294, 755, 755 } }, - { { 111, 931, 1378, 1185, 1933, 1648, 1148, 1714, 1873, 1307 }, - { 406, 414, 1030, 1023, 1910, 1404, 1313, 1647, 1509, 793 }, - { 342, 640, 575, 1088, 1241, 1349, 1161, 1350, 1756, 1502 }, - { 559, 766, 1185, 357, 1682, 1428, 1329, 1897, 1219, 802 }, - { 473, 909, 1164, 771, 719, 2508, 1427, 1432, 722, 782 }, - { 342, 892, 785, 1145, 1150, 794, 1296, 1550, 973, 1057 }, - { 208, 1036, 1326, 1343, 1606, 3395, 815, 1455, 1618, 712 }, - { 228, 928, 890, 1046, 3499, 1711, 994, 829, 1720, 1318 }, - { 768, 724, 1058, 636, 991, 1075, 1319, 1324, 616, 825 }, - { 305, 1167, 1358, 899, 1587, 1587, 987, 1988, 1332, 501 } } -}; - -//------------------------------------------------------------------------------ -// helper functions for residuals struct VP8Residual. - -void VP8InitResidual(int first, int coeff_type, - VP8Encoder* const enc, VP8Residual* const res) { - res->coeff_type = coeff_type; - res->prob = enc->proba_.coeffs_[coeff_type]; - res->stats = enc->proba_.stats_[coeff_type]; - res->costs = enc->proba_.remapped_costs_[coeff_type]; - res->first = first; -} - -//------------------------------------------------------------------------------ -// Mode costs - -int VP8GetCostLuma4(VP8EncIterator* const it, const int16_t levels[16]) { - const int x = (it->i4_ & 3), y = (it->i4_ >> 2); - VP8Residual res; - VP8Encoder* const enc = it->enc_; - int R = 0; - int ctx; - - VP8InitResidual(0, 3, enc, &res); - ctx = it->top_nz_[x] + it->left_nz_[y]; - VP8SetResidualCoeffs(levels, &res); - R += VP8GetResidualCost(ctx, &res); - return R; -} - -int VP8GetCostLuma16(VP8EncIterator* const it, const VP8ModeScore* const rd) { - VP8Residual res; - VP8Encoder* const enc = it->enc_; - int x, y; - int R = 0; - - VP8IteratorNzToBytes(it); // re-import the non-zero context - - // DC - VP8InitResidual(0, 1, enc, &res); - VP8SetResidualCoeffs(rd->y_dc_levels, &res); - R += VP8GetResidualCost(it->top_nz_[8] + it->left_nz_[8], &res); - - // AC - VP8InitResidual(1, 0, enc, &res); - for (y = 0; y < 4; ++y) { - for (x = 0; x < 4; ++x) { - const int ctx = it->top_nz_[x] + it->left_nz_[y]; - VP8SetResidualCoeffs(rd->y_ac_levels[x + y * 4], &res); - R += VP8GetResidualCost(ctx, &res); - it->top_nz_[x] = it->left_nz_[y] = (res.last >= 0); - } - } - return R; -} - -int VP8GetCostUV(VP8EncIterator* const it, const VP8ModeScore* const rd) { - VP8Residual res; - VP8Encoder* const enc = it->enc_; - int ch, x, y; - int R = 0; - - VP8IteratorNzToBytes(it); // re-import the non-zero context - - VP8InitResidual(0, 2, enc, &res); - for (ch = 0; ch <= 2; ch += 2) { - for (y = 0; y < 2; ++y) { - for (x = 0; x < 2; ++x) { - const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y]; - VP8SetResidualCoeffs(rd->uv_levels[ch * 2 + x + y * 2], &res); - R += VP8GetResidualCost(ctx, &res); - it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] = (res.last >= 0); - } - } - } - return R; -} - - -//------------------------------------------------------------------------------ -// Recording of token probabilities. - -// We keep the table-free variant around for reference, in case. -#define USE_LEVEL_CODE_TABLE - -// Simulate block coding, but only record statistics. -// Note: no need to record the fixed probas. -int VP8RecordCoeffs(int ctx, const VP8Residual* const res) { - int n = res->first; - // should be stats[VP8EncBands[n]], but it's equivalent for n=0 or 1 - proba_t* s = res->stats[n][ctx]; - if (res->last < 0) { - VP8RecordStats(0, s + 0); - return 0; - } - while (n <= res->last) { - int v; - VP8RecordStats(1, s + 0); // order of record doesn't matter - while ((v = res->coeffs[n++]) == 0) { - VP8RecordStats(0, s + 1); - s = res->stats[VP8EncBands[n]][0]; - } - VP8RecordStats(1, s + 1); - if (!VP8RecordStats(2u < (unsigned int)(v + 1), s + 2)) { // v = -1 or 1 - s = res->stats[VP8EncBands[n]][1]; - } else { - v = abs(v); -#if !defined(USE_LEVEL_CODE_TABLE) - if (!VP8RecordStats(v > 4, s + 3)) { - if (VP8RecordStats(v != 2, s + 4)) - VP8RecordStats(v == 4, s + 5); - } else if (!VP8RecordStats(v > 10, s + 6)) { - VP8RecordStats(v > 6, s + 7); - } else if (!VP8RecordStats((v >= 3 + (8 << 2)), s + 8)) { - VP8RecordStats((v >= 3 + (8 << 1)), s + 9); - } else { - VP8RecordStats((v >= 3 + (8 << 3)), s + 10); - } -#else - if (v > MAX_VARIABLE_LEVEL) { - v = MAX_VARIABLE_LEVEL; - } - - { - const int bits = VP8LevelCodes[v - 1][1]; - int pattern = VP8LevelCodes[v - 1][0]; - int i; - for (i = 0; (pattern >>= 1) != 0; ++i) { - const int mask = 2 << i; - if (pattern & 1) VP8RecordStats(!!(bits & mask), s + 3 + i); - } - } -#endif - s = res->stats[VP8EncBands[n]][2]; - } - } - if (n < 16) VP8RecordStats(0, s + 0); - return 1; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/cost_enc.h b/Dependencies/FreeImage/Source/LibWebP/src/enc/cost_enc.h deleted file mode 100644 index c052b52..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/cost_enc.h +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Cost tables for level and modes. -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_ENC_COST_ENC_H_ -#define WEBP_ENC_COST_ENC_H_ - -#include -#include -#include "src/enc/vp8i_enc.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// On-the-fly info about the current set of residuals. Handy to avoid -// passing zillions of params. -typedef struct VP8Residual VP8Residual; -struct VP8Residual { - int first; - int last; - const int16_t* coeffs; - - int coeff_type; - ProbaArray* prob; - StatsArray* stats; - CostArrayPtr costs; -}; - -void VP8InitResidual(int first, int coeff_type, - VP8Encoder* const enc, VP8Residual* const res); - -int VP8RecordCoeffs(int ctx, const VP8Residual* const res); - -// Record proba context used. -static WEBP_INLINE int VP8RecordStats(int bit, proba_t* const stats) { - proba_t p = *stats; - // An overflow is inbound. Note we handle this at 0xfffe0000u instead of - // 0xffff0000u to make sure p + 1u does not overflow. - if (p >= 0xfffe0000u) { - p = ((p + 1u) >> 1) & 0x7fff7fffu; // -> divide the stats by 2. - } - // record bit count (lower 16 bits) and increment total count (upper 16 bits). - p += 0x00010000u + bit; - *stats = p; - return bit; -} - -// Cost of coding one event with probability 'proba'. -static WEBP_INLINE int VP8BitCost(int bit, uint8_t proba) { - return !bit ? VP8EntropyCost[proba] : VP8EntropyCost[255 - proba]; -} - -// Level cost calculations -extern const uint16_t VP8LevelCodes[MAX_VARIABLE_LEVEL][2]; -void VP8CalculateLevelCosts(VP8EncProba* const proba); -static WEBP_INLINE int VP8LevelCost(const uint16_t* const table, int level) { - return VP8LevelFixedCosts[level] - + table[(level > MAX_VARIABLE_LEVEL) ? MAX_VARIABLE_LEVEL : level]; -} - -// Mode costs -extern const uint16_t VP8FixedCostsUV[4]; -extern const uint16_t VP8FixedCostsI16[4]; -extern const uint16_t VP8FixedCostsI4[NUM_BMODES][NUM_BMODES][NUM_BMODES]; - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_ENC_COST_ENC_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/filter_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/filter_enc.c deleted file mode 100644 index 7ed841d..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/filter_enc.c +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Selecting filter level -// -// Author: somnath@google.com (Somnath Banerjee) - -#include -#include "src/enc/vp8i_enc.h" -#include "src/dsp/dsp.h" - -// This table gives, for a given sharpness, the filtering strength to be -// used (at least) in order to filter a given edge step delta. -// This is constructed by brute force inspection: for all delta, we iterate -// over all possible filtering strength / thresh until needs_filter() returns -// true. -#define MAX_DELTA_SIZE 64 -static const uint8_t kLevelsFromDelta[8][MAX_DELTA_SIZE] = { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 }, - { 0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 17, 18, - 20, 21, 23, 24, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, - 44, 45, 47, 48, 50, 51, 53, 54, 56, 57, 59, 60, 62, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 }, - { 0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 19, - 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 43, - 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 }, - { 0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 15, 16, 18, 19, - 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, - 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 }, - { 0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 15, 17, 18, 20, - 21, 23, 24, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, 44, - 45, 47, 48, 50, 51, 53, 54, 56, 57, 59, 60, 62, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 }, - { 0, 1, 2, 4, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, - 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 43, 44, - 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 }, - { 0, 1, 2, 4, 5, 7, 8, 9, 11, 12, 13, 15, 16, 18, 19, 21, - 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, 45, - 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 }, - { 0, 1, 2, 4, 5, 7, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, - 23, 24, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, 44, 45, - 47, 48, 50, 51, 53, 54, 56, 57, 59, 60, 62, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 } -}; - -int VP8FilterStrengthFromDelta(int sharpness, int delta) { - const int pos = (delta < MAX_DELTA_SIZE) ? delta : MAX_DELTA_SIZE - 1; - assert(sharpness >= 0 && sharpness <= 7); - return kLevelsFromDelta[sharpness][pos]; -} - -//------------------------------------------------------------------------------ -// Paragraph 15.4: compute the inner-edge filtering strength - -#if !defined(WEBP_REDUCE_SIZE) - -static int GetILevel(int sharpness, int level) { - if (sharpness > 0) { - if (sharpness > 4) { - level >>= 2; - } else { - level >>= 1; - } - if (level > 9 - sharpness) { - level = 9 - sharpness; - } - } - if (level < 1) level = 1; - return level; -} - -static void DoFilter(const VP8EncIterator* const it, int level) { - const VP8Encoder* const enc = it->enc_; - const int ilevel = GetILevel(enc->config_->filter_sharpness, level); - const int limit = 2 * level + ilevel; - - uint8_t* const y_dst = it->yuv_out2_ + Y_OFF_ENC; - uint8_t* const u_dst = it->yuv_out2_ + U_OFF_ENC; - uint8_t* const v_dst = it->yuv_out2_ + V_OFF_ENC; - - // copy current block to yuv_out2_ - memcpy(y_dst, it->yuv_out_, YUV_SIZE_ENC * sizeof(uint8_t)); - - if (enc->filter_hdr_.simple_ == 1) { // simple - VP8SimpleHFilter16i(y_dst, BPS, limit); - VP8SimpleVFilter16i(y_dst, BPS, limit); - } else { // complex - const int hev_thresh = (level >= 40) ? 2 : (level >= 15) ? 1 : 0; - VP8HFilter16i(y_dst, BPS, limit, ilevel, hev_thresh); - VP8HFilter8i(u_dst, v_dst, BPS, limit, ilevel, hev_thresh); - VP8VFilter16i(y_dst, BPS, limit, ilevel, hev_thresh); - VP8VFilter8i(u_dst, v_dst, BPS, limit, ilevel, hev_thresh); - } -} - -//------------------------------------------------------------------------------ -// SSIM metric for one macroblock - -static double GetMBSSIM(const uint8_t* yuv1, const uint8_t* yuv2) { - int x, y; - double sum = 0.; - - // compute SSIM in a 10 x 10 window - for (y = VP8_SSIM_KERNEL; y < 16 - VP8_SSIM_KERNEL; y++) { - for (x = VP8_SSIM_KERNEL; x < 16 - VP8_SSIM_KERNEL; x++) { - sum += VP8SSIMGetClipped(yuv1 + Y_OFF_ENC, BPS, yuv2 + Y_OFF_ENC, BPS, - x, y, 16, 16); - } - } - for (x = 1; x < 7; x++) { - for (y = 1; y < 7; y++) { - sum += VP8SSIMGetClipped(yuv1 + U_OFF_ENC, BPS, yuv2 + U_OFF_ENC, BPS, - x, y, 8, 8); - sum += VP8SSIMGetClipped(yuv1 + V_OFF_ENC, BPS, yuv2 + V_OFF_ENC, BPS, - x, y, 8, 8); - } - } - return sum; -} - -#endif // !defined(WEBP_REDUCE_SIZE) - -//------------------------------------------------------------------------------ -// Exposed APIs: Encoder should call the following 3 functions to adjust -// loop filter strength - -void VP8InitFilter(VP8EncIterator* const it) { -#if !defined(WEBP_REDUCE_SIZE) - if (it->lf_stats_ != NULL) { - int s, i; - for (s = 0; s < NUM_MB_SEGMENTS; s++) { - for (i = 0; i < MAX_LF_LEVELS; i++) { - (*it->lf_stats_)[s][i] = 0; - } - } - VP8SSIMDspInit(); - } -#else - (void)it; -#endif -} - -void VP8StoreFilterStats(VP8EncIterator* const it) { -#if !defined(WEBP_REDUCE_SIZE) - int d; - VP8Encoder* const enc = it->enc_; - const int s = it->mb_->segment_; - const int level0 = enc->dqm_[s].fstrength_; - - // explore +/-quant range of values around level0 - const int delta_min = -enc->dqm_[s].quant_; - const int delta_max = enc->dqm_[s].quant_; - const int step_size = (delta_max - delta_min >= 4) ? 4 : 1; - - if (it->lf_stats_ == NULL) return; - - // NOTE: Currently we are applying filter only across the sublock edges - // There are two reasons for that. - // 1. Applying filter on macro block edges will change the pixels in - // the left and top macro blocks. That will be hard to restore - // 2. Macro Blocks on the bottom and right are not yet compressed. So we - // cannot apply filter on the right and bottom macro block edges. - if (it->mb_->type_ == 1 && it->mb_->skip_) return; - - // Always try filter level zero - (*it->lf_stats_)[s][0] += GetMBSSIM(it->yuv_in_, it->yuv_out_); - - for (d = delta_min; d <= delta_max; d += step_size) { - const int level = level0 + d; - if (level <= 0 || level >= MAX_LF_LEVELS) { - continue; - } - DoFilter(it, level); - (*it->lf_stats_)[s][level] += GetMBSSIM(it->yuv_in_, it->yuv_out2_); - } -#else // defined(WEBP_REDUCE_SIZE) - (void)it; -#endif // !defined(WEBP_REDUCE_SIZE) -} - -void VP8AdjustFilterStrength(VP8EncIterator* const it) { - VP8Encoder* const enc = it->enc_; -#if !defined(WEBP_REDUCE_SIZE) - if (it->lf_stats_ != NULL) { - int s; - for (s = 0; s < NUM_MB_SEGMENTS; s++) { - int i, best_level = 0; - // Improvement over filter level 0 should be at least 1e-5 (relatively) - double best_v = 1.00001 * (*it->lf_stats_)[s][0]; - for (i = 1; i < MAX_LF_LEVELS; i++) { - const double v = (*it->lf_stats_)[s][i]; - if (v > best_v) { - best_v = v; - best_level = i; - } - } - enc->dqm_[s].fstrength_ = best_level; - } - return; - } -#endif // !defined(WEBP_REDUCE_SIZE) - if (enc->config_->filter_strength > 0) { - int max_level = 0; - int s; - for (s = 0; s < NUM_MB_SEGMENTS; s++) { - VP8SegmentInfo* const dqm = &enc->dqm_[s]; - // this '>> 3' accounts for some inverse WHT scaling - const int delta = (dqm->max_edge_ * dqm->y2_.q_[1]) >> 3; - const int level = - VP8FilterStrengthFromDelta(enc->filter_hdr_.sharpness_, delta); - if (level > dqm->fstrength_) { - dqm->fstrength_ = level; - } - if (max_level < dqm->fstrength_) { - max_level = dqm->fstrength_; - } - } - enc->filter_hdr_.level_ = max_level; - } -} - -// ----------------------------------------------------------------------------- diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/frame_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/frame_enc.c deleted file mode 100644 index 960ab66..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/frame_enc.c +++ /dev/null @@ -1,890 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// frame coding and analysis -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include - -#include "src/enc/cost_enc.h" -#include "src/enc/vp8i_enc.h" -#include "src/dsp/dsp.h" -#include "src/webp/format_constants.h" // RIFF constants - -#define SEGMENT_VISU 0 -#define DEBUG_SEARCH 0 // useful to track search convergence - -//------------------------------------------------------------------------------ -// multi-pass convergence - -#define HEADER_SIZE_ESTIMATE (RIFF_HEADER_SIZE + CHUNK_HEADER_SIZE + \ - VP8_FRAME_HEADER_SIZE) -#define DQ_LIMIT 0.4 // convergence is considered reached if dq < DQ_LIMIT -// we allow 2k of extra head-room in PARTITION0 limit. -#define PARTITION0_SIZE_LIMIT ((VP8_MAX_PARTITION0_SIZE - 2048ULL) << 11) - -typedef struct { // struct for organizing convergence in either size or PSNR - int is_first; - float dq; - float q, last_q; - double value, last_value; // PSNR or size - double target; - int do_size_search; -} PassStats; - -static int InitPassStats(const VP8Encoder* const enc, PassStats* const s) { - const uint64_t target_size = (uint64_t)enc->config_->target_size; - const int do_size_search = (target_size != 0); - const float target_PSNR = enc->config_->target_PSNR; - - s->is_first = 1; - s->dq = 10.f; - s->q = s->last_q = enc->config_->quality; - s->target = do_size_search ? (double)target_size - : (target_PSNR > 0.) ? target_PSNR - : 40.; // default, just in case - s->value = s->last_value = 0.; - s->do_size_search = do_size_search; - return do_size_search; -} - -static float Clamp(float v, float min, float max) { - return (v < min) ? min : (v > max) ? max : v; -} - -static float ComputeNextQ(PassStats* const s) { - float dq; - if (s->is_first) { - dq = (s->value > s->target) ? -s->dq : s->dq; - s->is_first = 0; - } else if (s->value != s->last_value) { - const double slope = (s->target - s->value) / (s->last_value - s->value); - dq = (float)(slope * (s->last_q - s->q)); - } else { - dq = 0.; // we're done?! - } - // Limit variable to avoid large swings. - s->dq = Clamp(dq, -30.f, 30.f); - s->last_q = s->q; - s->last_value = s->value; - s->q = Clamp(s->q + s->dq, 0.f, 100.f); - return s->q; -} - -//------------------------------------------------------------------------------ -// Tables for level coding - -const uint8_t VP8Cat3[] = { 173, 148, 140 }; -const uint8_t VP8Cat4[] = { 176, 155, 140, 135 }; -const uint8_t VP8Cat5[] = { 180, 157, 141, 134, 130 }; -const uint8_t VP8Cat6[] = - { 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129 }; - -//------------------------------------------------------------------------------ -// Reset the statistics about: number of skips, token proba, level cost,... - -static void ResetStats(VP8Encoder* const enc) { - VP8EncProba* const proba = &enc->proba_; - VP8CalculateLevelCosts(proba); - proba->nb_skip_ = 0; -} - -//------------------------------------------------------------------------------ -// Skip decision probability - -#define SKIP_PROBA_THRESHOLD 250 // value below which using skip_proba is OK. - -static int CalcSkipProba(uint64_t nb, uint64_t total) { - return (int)(total ? (total - nb) * 255 / total : 255); -} - -// Returns the bit-cost for coding the skip probability. -static int FinalizeSkipProba(VP8Encoder* const enc) { - VP8EncProba* const proba = &enc->proba_; - const int nb_mbs = enc->mb_w_ * enc->mb_h_; - const int nb_events = proba->nb_skip_; - int size; - proba->skip_proba_ = CalcSkipProba(nb_events, nb_mbs); - proba->use_skip_proba_ = (proba->skip_proba_ < SKIP_PROBA_THRESHOLD); - size = 256; // 'use_skip_proba' bit - if (proba->use_skip_proba_) { - size += nb_events * VP8BitCost(1, proba->skip_proba_) - + (nb_mbs - nb_events) * VP8BitCost(0, proba->skip_proba_); - size += 8 * 256; // cost of signaling the skip_proba_ itself. - } - return size; -} - -// Collect statistics and deduce probabilities for next coding pass. -// Return the total bit-cost for coding the probability updates. -static int CalcTokenProba(int nb, int total) { - assert(nb <= total); - return nb ? (255 - nb * 255 / total) : 255; -} - -// Cost of coding 'nb' 1's and 'total-nb' 0's using 'proba' probability. -static int BranchCost(int nb, int total, int proba) { - return nb * VP8BitCost(1, proba) + (total - nb) * VP8BitCost(0, proba); -} - -static void ResetTokenStats(VP8Encoder* const enc) { - VP8EncProba* const proba = &enc->proba_; - memset(proba->stats_, 0, sizeof(proba->stats_)); -} - -static int FinalizeTokenProbas(VP8EncProba* const proba) { - int has_changed = 0; - int size = 0; - int t, b, c, p; - for (t = 0; t < NUM_TYPES; ++t) { - for (b = 0; b < NUM_BANDS; ++b) { - for (c = 0; c < NUM_CTX; ++c) { - for (p = 0; p < NUM_PROBAS; ++p) { - const proba_t stats = proba->stats_[t][b][c][p]; - const int nb = (stats >> 0) & 0xffff; - const int total = (stats >> 16) & 0xffff; - const int update_proba = VP8CoeffsUpdateProba[t][b][c][p]; - const int old_p = VP8CoeffsProba0[t][b][c][p]; - const int new_p = CalcTokenProba(nb, total); - const int old_cost = BranchCost(nb, total, old_p) - + VP8BitCost(0, update_proba); - const int new_cost = BranchCost(nb, total, new_p) - + VP8BitCost(1, update_proba) - + 8 * 256; - const int use_new_p = (old_cost > new_cost); - size += VP8BitCost(use_new_p, update_proba); - if (use_new_p) { // only use proba that seem meaningful enough. - proba->coeffs_[t][b][c][p] = new_p; - has_changed |= (new_p != old_p); - size += 8 * 256; - } else { - proba->coeffs_[t][b][c][p] = old_p; - } - } - } - } - } - proba->dirty_ = has_changed; - return size; -} - -//------------------------------------------------------------------------------ -// Finalize Segment probability based on the coding tree - -static int GetProba(int a, int b) { - const int total = a + b; - return (total == 0) ? 255 // that's the default probability. - : (255 * a + total / 2) / total; // rounded proba -} - -static void ResetSegments(VP8Encoder* const enc) { - int n; - for (n = 0; n < enc->mb_w_ * enc->mb_h_; ++n) { - enc->mb_info_[n].segment_ = 0; - } -} - -static void SetSegmentProbas(VP8Encoder* const enc) { - int p[NUM_MB_SEGMENTS] = { 0 }; - int n; - - for (n = 0; n < enc->mb_w_ * enc->mb_h_; ++n) { - const VP8MBInfo* const mb = &enc->mb_info_[n]; - ++p[mb->segment_]; - } -#if !defined(WEBP_DISABLE_STATS) - if (enc->pic_->stats != NULL) { - for (n = 0; n < NUM_MB_SEGMENTS; ++n) { - enc->pic_->stats->segment_size[n] = p[n]; - } - } -#endif - if (enc->segment_hdr_.num_segments_ > 1) { - uint8_t* const probas = enc->proba_.segments_; - probas[0] = GetProba(p[0] + p[1], p[2] + p[3]); - probas[1] = GetProba(p[0], p[1]); - probas[2] = GetProba(p[2], p[3]); - - enc->segment_hdr_.update_map_ = - (probas[0] != 255) || (probas[1] != 255) || (probas[2] != 255); - if (!enc->segment_hdr_.update_map_) ResetSegments(enc); - enc->segment_hdr_.size_ = - p[0] * (VP8BitCost(0, probas[0]) + VP8BitCost(0, probas[1])) + - p[1] * (VP8BitCost(0, probas[0]) + VP8BitCost(1, probas[1])) + - p[2] * (VP8BitCost(1, probas[0]) + VP8BitCost(0, probas[2])) + - p[3] * (VP8BitCost(1, probas[0]) + VP8BitCost(1, probas[2])); - } else { - enc->segment_hdr_.update_map_ = 0; - enc->segment_hdr_.size_ = 0; - } -} - -//------------------------------------------------------------------------------ -// Coefficient coding - -static int PutCoeffs(VP8BitWriter* const bw, int ctx, const VP8Residual* res) { - int n = res->first; - // should be prob[VP8EncBands[n]], but it's equivalent for n=0 or 1 - const uint8_t* p = res->prob[n][ctx]; - if (!VP8PutBit(bw, res->last >= 0, p[0])) { - return 0; - } - - while (n < 16) { - const int c = res->coeffs[n++]; - const int sign = c < 0; - int v = sign ? -c : c; - if (!VP8PutBit(bw, v != 0, p[1])) { - p = res->prob[VP8EncBands[n]][0]; - continue; - } - if (!VP8PutBit(bw, v > 1, p[2])) { - p = res->prob[VP8EncBands[n]][1]; - } else { - if (!VP8PutBit(bw, v > 4, p[3])) { - if (VP8PutBit(bw, v != 2, p[4])) { - VP8PutBit(bw, v == 4, p[5]); - } - } else if (!VP8PutBit(bw, v > 10, p[6])) { - if (!VP8PutBit(bw, v > 6, p[7])) { - VP8PutBit(bw, v == 6, 159); - } else { - VP8PutBit(bw, v >= 9, 165); - VP8PutBit(bw, !(v & 1), 145); - } - } else { - int mask; - const uint8_t* tab; - if (v < 3 + (8 << 1)) { // VP8Cat3 (3b) - VP8PutBit(bw, 0, p[8]); - VP8PutBit(bw, 0, p[9]); - v -= 3 + (8 << 0); - mask = 1 << 2; - tab = VP8Cat3; - } else if (v < 3 + (8 << 2)) { // VP8Cat4 (4b) - VP8PutBit(bw, 0, p[8]); - VP8PutBit(bw, 1, p[9]); - v -= 3 + (8 << 1); - mask = 1 << 3; - tab = VP8Cat4; - } else if (v < 3 + (8 << 3)) { // VP8Cat5 (5b) - VP8PutBit(bw, 1, p[8]); - VP8PutBit(bw, 0, p[10]); - v -= 3 + (8 << 2); - mask = 1 << 4; - tab = VP8Cat5; - } else { // VP8Cat6 (11b) - VP8PutBit(bw, 1, p[8]); - VP8PutBit(bw, 1, p[10]); - v -= 3 + (8 << 3); - mask = 1 << 10; - tab = VP8Cat6; - } - while (mask) { - VP8PutBit(bw, !!(v & mask), *tab++); - mask >>= 1; - } - } - p = res->prob[VP8EncBands[n]][2]; - } - VP8PutBitUniform(bw, sign); - if (n == 16 || !VP8PutBit(bw, n <= res->last, p[0])) { - return 1; // EOB - } - } - return 1; -} - -static void CodeResiduals(VP8BitWriter* const bw, VP8EncIterator* const it, - const VP8ModeScore* const rd) { - int x, y, ch; - VP8Residual res; - uint64_t pos1, pos2, pos3; - const int i16 = (it->mb_->type_ == 1); - const int segment = it->mb_->segment_; - VP8Encoder* const enc = it->enc_; - - VP8IteratorNzToBytes(it); - - pos1 = VP8BitWriterPos(bw); - if (i16) { - VP8InitResidual(0, 1, enc, &res); - VP8SetResidualCoeffs(rd->y_dc_levels, &res); - it->top_nz_[8] = it->left_nz_[8] = - PutCoeffs(bw, it->top_nz_[8] + it->left_nz_[8], &res); - VP8InitResidual(1, 0, enc, &res); - } else { - VP8InitResidual(0, 3, enc, &res); - } - - // luma-AC - for (y = 0; y < 4; ++y) { - for (x = 0; x < 4; ++x) { - const int ctx = it->top_nz_[x] + it->left_nz_[y]; - VP8SetResidualCoeffs(rd->y_ac_levels[x + y * 4], &res); - it->top_nz_[x] = it->left_nz_[y] = PutCoeffs(bw, ctx, &res); - } - } - pos2 = VP8BitWriterPos(bw); - - // U/V - VP8InitResidual(0, 2, enc, &res); - for (ch = 0; ch <= 2; ch += 2) { - for (y = 0; y < 2; ++y) { - for (x = 0; x < 2; ++x) { - const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y]; - VP8SetResidualCoeffs(rd->uv_levels[ch * 2 + x + y * 2], &res); - it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] = - PutCoeffs(bw, ctx, &res); - } - } - } - pos3 = VP8BitWriterPos(bw); - it->luma_bits_ = pos2 - pos1; - it->uv_bits_ = pos3 - pos2; - it->bit_count_[segment][i16] += it->luma_bits_; - it->bit_count_[segment][2] += it->uv_bits_; - VP8IteratorBytesToNz(it); -} - -// Same as CodeResiduals, but doesn't actually write anything. -// Instead, it just records the event distribution. -static void RecordResiduals(VP8EncIterator* const it, - const VP8ModeScore* const rd) { - int x, y, ch; - VP8Residual res; - VP8Encoder* const enc = it->enc_; - - VP8IteratorNzToBytes(it); - - if (it->mb_->type_ == 1) { // i16x16 - VP8InitResidual(0, 1, enc, &res); - VP8SetResidualCoeffs(rd->y_dc_levels, &res); - it->top_nz_[8] = it->left_nz_[8] = - VP8RecordCoeffs(it->top_nz_[8] + it->left_nz_[8], &res); - VP8InitResidual(1, 0, enc, &res); - } else { - VP8InitResidual(0, 3, enc, &res); - } - - // luma-AC - for (y = 0; y < 4; ++y) { - for (x = 0; x < 4; ++x) { - const int ctx = it->top_nz_[x] + it->left_nz_[y]; - VP8SetResidualCoeffs(rd->y_ac_levels[x + y * 4], &res); - it->top_nz_[x] = it->left_nz_[y] = VP8RecordCoeffs(ctx, &res); - } - } - - // U/V - VP8InitResidual(0, 2, enc, &res); - for (ch = 0; ch <= 2; ch += 2) { - for (y = 0; y < 2; ++y) { - for (x = 0; x < 2; ++x) { - const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y]; - VP8SetResidualCoeffs(rd->uv_levels[ch * 2 + x + y * 2], &res); - it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] = - VP8RecordCoeffs(ctx, &res); - } - } - } - - VP8IteratorBytesToNz(it); -} - -//------------------------------------------------------------------------------ -// Token buffer - -#if !defined(DISABLE_TOKEN_BUFFER) - -static int RecordTokens(VP8EncIterator* const it, const VP8ModeScore* const rd, - VP8TBuffer* const tokens) { - int x, y, ch; - VP8Residual res; - VP8Encoder* const enc = it->enc_; - - VP8IteratorNzToBytes(it); - if (it->mb_->type_ == 1) { // i16x16 - const int ctx = it->top_nz_[8] + it->left_nz_[8]; - VP8InitResidual(0, 1, enc, &res); - VP8SetResidualCoeffs(rd->y_dc_levels, &res); - it->top_nz_[8] = it->left_nz_[8] = - VP8RecordCoeffTokens(ctx, &res, tokens); - VP8InitResidual(1, 0, enc, &res); - } else { - VP8InitResidual(0, 3, enc, &res); - } - - // luma-AC - for (y = 0; y < 4; ++y) { - for (x = 0; x < 4; ++x) { - const int ctx = it->top_nz_[x] + it->left_nz_[y]; - VP8SetResidualCoeffs(rd->y_ac_levels[x + y * 4], &res); - it->top_nz_[x] = it->left_nz_[y] = - VP8RecordCoeffTokens(ctx, &res, tokens); - } - } - - // U/V - VP8InitResidual(0, 2, enc, &res); - for (ch = 0; ch <= 2; ch += 2) { - for (y = 0; y < 2; ++y) { - for (x = 0; x < 2; ++x) { - const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y]; - VP8SetResidualCoeffs(rd->uv_levels[ch * 2 + x + y * 2], &res); - it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] = - VP8RecordCoeffTokens(ctx, &res, tokens); - } - } - } - VP8IteratorBytesToNz(it); - return !tokens->error_; -} - -#endif // !DISABLE_TOKEN_BUFFER - -//------------------------------------------------------------------------------ -// ExtraInfo map / Debug function - -#if !defined(WEBP_DISABLE_STATS) - -#if SEGMENT_VISU -static void SetBlock(uint8_t* p, int value, int size) { - int y; - for (y = 0; y < size; ++y) { - memset(p, value, size); - p += BPS; - } -} -#endif - -static void ResetSSE(VP8Encoder* const enc) { - enc->sse_[0] = 0; - enc->sse_[1] = 0; - enc->sse_[2] = 0; - // Note: enc->sse_[3] is managed by alpha.c - enc->sse_count_ = 0; -} - -static void StoreSSE(const VP8EncIterator* const it) { - VP8Encoder* const enc = it->enc_; - const uint8_t* const in = it->yuv_in_; - const uint8_t* const out = it->yuv_out_; - // Note: not totally accurate at boundary. And doesn't include in-loop filter. - enc->sse_[0] += VP8SSE16x16(in + Y_OFF_ENC, out + Y_OFF_ENC); - enc->sse_[1] += VP8SSE8x8(in + U_OFF_ENC, out + U_OFF_ENC); - enc->sse_[2] += VP8SSE8x8(in + V_OFF_ENC, out + V_OFF_ENC); - enc->sse_count_ += 16 * 16; -} - -static void StoreSideInfo(const VP8EncIterator* const it) { - VP8Encoder* const enc = it->enc_; - const VP8MBInfo* const mb = it->mb_; - WebPPicture* const pic = enc->pic_; - - if (pic->stats != NULL) { - StoreSSE(it); - enc->block_count_[0] += (mb->type_ == 0); - enc->block_count_[1] += (mb->type_ == 1); - enc->block_count_[2] += (mb->skip_ != 0); - } - - if (pic->extra_info != NULL) { - uint8_t* const info = &pic->extra_info[it->x_ + it->y_ * enc->mb_w_]; - switch (pic->extra_info_type) { - case 1: *info = mb->type_; break; - case 2: *info = mb->segment_; break; - case 3: *info = enc->dqm_[mb->segment_].quant_; break; - case 4: *info = (mb->type_ == 1) ? it->preds_[0] : 0xff; break; - case 5: *info = mb->uv_mode_; break; - case 6: { - const int b = (int)((it->luma_bits_ + it->uv_bits_ + 7) >> 3); - *info = (b > 255) ? 255 : b; break; - } - case 7: *info = mb->alpha_; break; - default: *info = 0; break; - } - } -#if SEGMENT_VISU // visualize segments and prediction modes - SetBlock(it->yuv_out_ + Y_OFF_ENC, mb->segment_ * 64, 16); - SetBlock(it->yuv_out_ + U_OFF_ENC, it->preds_[0] * 64, 8); - SetBlock(it->yuv_out_ + V_OFF_ENC, mb->uv_mode_ * 64, 8); -#endif -} - -static void ResetSideInfo(const VP8EncIterator* const it) { - VP8Encoder* const enc = it->enc_; - WebPPicture* const pic = enc->pic_; - if (pic->stats != NULL) { - memset(enc->block_count_, 0, sizeof(enc->block_count_)); - } - ResetSSE(enc); -} -#else // defined(WEBP_DISABLE_STATS) -static void ResetSSE(VP8Encoder* const enc) { - (void)enc; -} -static void StoreSideInfo(const VP8EncIterator* const it) { - VP8Encoder* const enc = it->enc_; - WebPPicture* const pic = enc->pic_; - if (pic->extra_info != NULL) { - if (it->x_ == 0 && it->y_ == 0) { // only do it once, at start - memset(pic->extra_info, 0, - enc->mb_w_ * enc->mb_h_ * sizeof(*pic->extra_info)); - } - } -} - -static void ResetSideInfo(const VP8EncIterator* const it) { - (void)it; -} -#endif // !defined(WEBP_DISABLE_STATS) - -static double GetPSNR(uint64_t mse, uint64_t size) { - return (mse > 0 && size > 0) ? 10. * log10(255. * 255. * size / mse) : 99; -} - -//------------------------------------------------------------------------------ -// StatLoop(): only collect statistics (number of skips, token usage, ...). -// This is used for deciding optimal probabilities. It also modifies the -// quantizer value if some target (size, PSNR) was specified. - -static void SetLoopParams(VP8Encoder* const enc, float q) { - // Make sure the quality parameter is inside valid bounds - q = Clamp(q, 0.f, 100.f); - - VP8SetSegmentParams(enc, q); // setup segment quantizations and filters - SetSegmentProbas(enc); // compute segment probabilities - - ResetStats(enc); - ResetSSE(enc); -} - -static uint64_t OneStatPass(VP8Encoder* const enc, VP8RDLevel rd_opt, - int nb_mbs, int percent_delta, - PassStats* const s) { - VP8EncIterator it; - uint64_t size = 0; - uint64_t size_p0 = 0; - uint64_t distortion = 0; - const uint64_t pixel_count = nb_mbs * 384; - - VP8IteratorInit(enc, &it); - SetLoopParams(enc, s->q); - do { - VP8ModeScore info; - VP8IteratorImport(&it, NULL); - if (VP8Decimate(&it, &info, rd_opt)) { - // Just record the number of skips and act like skip_proba is not used. - ++enc->proba_.nb_skip_; - } - RecordResiduals(&it, &info); - size += info.R + info.H; - size_p0 += info.H; - distortion += info.D; - if (percent_delta && !VP8IteratorProgress(&it, percent_delta)) { - return 0; - } - VP8IteratorSaveBoundary(&it); - } while (VP8IteratorNext(&it) && --nb_mbs > 0); - - size_p0 += enc->segment_hdr_.size_; - if (s->do_size_search) { - size += FinalizeSkipProba(enc); - size += FinalizeTokenProbas(&enc->proba_); - size = ((size + size_p0 + 1024) >> 11) + HEADER_SIZE_ESTIMATE; - s->value = (double)size; - } else { - s->value = GetPSNR(distortion, pixel_count); - } - return size_p0; -} - -static int StatLoop(VP8Encoder* const enc) { - const int method = enc->method_; - const int do_search = enc->do_search_; - const int fast_probe = ((method == 0 || method == 3) && !do_search); - int num_pass_left = enc->config_->pass; - const int task_percent = 20; - const int percent_per_pass = - (task_percent + num_pass_left / 2) / num_pass_left; - const int final_percent = enc->percent_ + task_percent; - const VP8RDLevel rd_opt = - (method >= 3 || do_search) ? RD_OPT_BASIC : RD_OPT_NONE; - int nb_mbs = enc->mb_w_ * enc->mb_h_; - PassStats stats; - - InitPassStats(enc, &stats); - ResetTokenStats(enc); - - // Fast mode: quick analysis pass over few mbs. Better than nothing. - if (fast_probe) { - if (method == 3) { // we need more stats for method 3 to be reliable. - nb_mbs = (nb_mbs > 200) ? nb_mbs >> 1 : 100; - } else { - nb_mbs = (nb_mbs > 200) ? nb_mbs >> 2 : 50; - } - } - - while (num_pass_left-- > 0) { - const int is_last_pass = (fabs(stats.dq) <= DQ_LIMIT) || - (num_pass_left == 0) || - (enc->max_i4_header_bits_ == 0); - const uint64_t size_p0 = - OneStatPass(enc, rd_opt, nb_mbs, percent_per_pass, &stats); - if (size_p0 == 0) return 0; -#if (DEBUG_SEARCH > 0) - printf("#%d value:%.1lf -> %.1lf q:%.2f -> %.2f\n", - num_pass_left, stats.last_value, stats.value, stats.last_q, stats.q); -#endif - if (enc->max_i4_header_bits_ > 0 && size_p0 > PARTITION0_SIZE_LIMIT) { - ++num_pass_left; - enc->max_i4_header_bits_ >>= 1; // strengthen header bit limitation... - continue; // ...and start over - } - if (is_last_pass) { - break; - } - // If no target size: just do several pass without changing 'q' - if (do_search) { - ComputeNextQ(&stats); - if (fabs(stats.dq) <= DQ_LIMIT) break; - } - } - if (!do_search || !stats.do_size_search) { - // Need to finalize probas now, since it wasn't done during the search. - FinalizeSkipProba(enc); - FinalizeTokenProbas(&enc->proba_); - } - VP8CalculateLevelCosts(&enc->proba_); // finalize costs - return WebPReportProgress(enc->pic_, final_percent, &enc->percent_); -} - -//------------------------------------------------------------------------------ -// Main loops -// - -static const uint8_t kAverageBytesPerMB[8] = { 50, 24, 16, 9, 7, 5, 3, 2 }; - -static int PreLoopInitialize(VP8Encoder* const enc) { - int p; - int ok = 1; - const int average_bytes_per_MB = kAverageBytesPerMB[enc->base_quant_ >> 4]; - const int bytes_per_parts = - enc->mb_w_ * enc->mb_h_ * average_bytes_per_MB / enc->num_parts_; - // Initialize the bit-writers - for (p = 0; ok && p < enc->num_parts_; ++p) { - ok = VP8BitWriterInit(enc->parts_ + p, bytes_per_parts); - } - if (!ok) { - VP8EncFreeBitWriters(enc); // malloc error occurred - WebPEncodingSetError(enc->pic_, VP8_ENC_ERROR_OUT_OF_MEMORY); - } - return ok; -} - -static int PostLoopFinalize(VP8EncIterator* const it, int ok) { - VP8Encoder* const enc = it->enc_; - if (ok) { // Finalize the partitions, check for extra errors. - int p; - for (p = 0; p < enc->num_parts_; ++p) { - VP8BitWriterFinish(enc->parts_ + p); - ok &= !enc->parts_[p].error_; - } - } - - if (ok) { // All good. Finish up. -#if !defined(WEBP_DISABLE_STATS) - if (enc->pic_->stats != NULL) { // finalize byte counters... - int i, s; - for (i = 0; i <= 2; ++i) { - for (s = 0; s < NUM_MB_SEGMENTS; ++s) { - enc->residual_bytes_[i][s] = (int)((it->bit_count_[s][i] + 7) >> 3); - } - } - } -#endif - VP8AdjustFilterStrength(it); // ...and store filter stats. - } else { - // Something bad happened -> need to do some memory cleanup. - VP8EncFreeBitWriters(enc); - } - return ok; -} - -//------------------------------------------------------------------------------ -// VP8EncLoop(): does the final bitstream coding. - -static void ResetAfterSkip(VP8EncIterator* const it) { - if (it->mb_->type_ == 1) { - *it->nz_ = 0; // reset all predictors - it->left_nz_[8] = 0; - } else { - *it->nz_ &= (1 << 24); // preserve the dc_nz bit - } -} - -int VP8EncLoop(VP8Encoder* const enc) { - VP8EncIterator it; - int ok = PreLoopInitialize(enc); - if (!ok) return 0; - - StatLoop(enc); // stats-collection loop - - VP8IteratorInit(enc, &it); - VP8InitFilter(&it); - do { - VP8ModeScore info; - const int dont_use_skip = !enc->proba_.use_skip_proba_; - const VP8RDLevel rd_opt = enc->rd_opt_level_; - - VP8IteratorImport(&it, NULL); - // Warning! order is important: first call VP8Decimate() and - // *then* decide how to code the skip decision if there's one. - if (!VP8Decimate(&it, &info, rd_opt) || dont_use_skip) { - CodeResiduals(it.bw_, &it, &info); - } else { // reset predictors after a skip - ResetAfterSkip(&it); - } - StoreSideInfo(&it); - VP8StoreFilterStats(&it); - VP8IteratorExport(&it); - ok = VP8IteratorProgress(&it, 20); - VP8IteratorSaveBoundary(&it); - } while (ok && VP8IteratorNext(&it)); - - return PostLoopFinalize(&it, ok); -} - -//------------------------------------------------------------------------------ -// Single pass using Token Buffer. - -#if !defined(DISABLE_TOKEN_BUFFER) - -#define MIN_COUNT 96 // minimum number of macroblocks before updating stats - -int VP8EncTokenLoop(VP8Encoder* const enc) { - // Roughly refresh the proba eight times per pass - int max_count = (enc->mb_w_ * enc->mb_h_) >> 3; - int num_pass_left = enc->config_->pass; - const int do_search = enc->do_search_; - VP8EncIterator it; - VP8EncProba* const proba = &enc->proba_; - const VP8RDLevel rd_opt = enc->rd_opt_level_; - const uint64_t pixel_count = enc->mb_w_ * enc->mb_h_ * 384; - PassStats stats; - int ok; - - InitPassStats(enc, &stats); - ok = PreLoopInitialize(enc); - if (!ok) return 0; - - if (max_count < MIN_COUNT) max_count = MIN_COUNT; - - assert(enc->num_parts_ == 1); - assert(enc->use_tokens_); - assert(proba->use_skip_proba_ == 0); - assert(rd_opt >= RD_OPT_BASIC); // otherwise, token-buffer won't be useful - assert(num_pass_left > 0); - - while (ok && num_pass_left-- > 0) { - const int is_last_pass = (fabs(stats.dq) <= DQ_LIMIT) || - (num_pass_left == 0) || - (enc->max_i4_header_bits_ == 0); - uint64_t size_p0 = 0; - uint64_t distortion = 0; - int cnt = max_count; - VP8IteratorInit(enc, &it); - SetLoopParams(enc, stats.q); - if (is_last_pass) { - ResetTokenStats(enc); - VP8InitFilter(&it); // don't collect stats until last pass (too costly) - } - VP8TBufferClear(&enc->tokens_); - do { - VP8ModeScore info; - VP8IteratorImport(&it, NULL); - if (--cnt < 0) { - FinalizeTokenProbas(proba); - VP8CalculateLevelCosts(proba); // refresh cost tables for rd-opt - cnt = max_count; - } - VP8Decimate(&it, &info, rd_opt); - ok = RecordTokens(&it, &info, &enc->tokens_); - if (!ok) { - WebPEncodingSetError(enc->pic_, VP8_ENC_ERROR_OUT_OF_MEMORY); - break; - } - size_p0 += info.H; - distortion += info.D; - if (is_last_pass) { - StoreSideInfo(&it); - VP8StoreFilterStats(&it); - VP8IteratorExport(&it); - ok = VP8IteratorProgress(&it, 20); - } - VP8IteratorSaveBoundary(&it); - } while (ok && VP8IteratorNext(&it)); - if (!ok) break; - - size_p0 += enc->segment_hdr_.size_; - if (stats.do_size_search) { - uint64_t size = FinalizeTokenProbas(&enc->proba_); - size += VP8EstimateTokenSize(&enc->tokens_, - (const uint8_t*)proba->coeffs_); - size = (size + size_p0 + 1024) >> 11; // -> size in bytes - size += HEADER_SIZE_ESTIMATE; - stats.value = (double)size; - } else { // compute and store PSNR - stats.value = GetPSNR(distortion, pixel_count); - } - -#if (DEBUG_SEARCH > 0) - printf("#%2d metric:%.1lf -> %.1lf last_q=%.2lf q=%.2lf dq=%.2lf\n", - num_pass_left, stats.last_value, stats.value, - stats.last_q, stats.q, stats.dq); -#endif - if (enc->max_i4_header_bits_ > 0 && size_p0 > PARTITION0_SIZE_LIMIT) { - ++num_pass_left; - enc->max_i4_header_bits_ >>= 1; // strengthen header bit limitation... - if (is_last_pass) { - ResetSideInfo(&it); - } - continue; // ...and start over - } - if (is_last_pass) { - break; // done - } - if (do_search) { - ComputeNextQ(&stats); // Adjust q - } - } - if (ok) { - if (!stats.do_size_search) { - FinalizeTokenProbas(&enc->proba_); - } - ok = VP8EmitTokens(&enc->tokens_, enc->parts_ + 0, - (const uint8_t*)proba->coeffs_, 1); - } - ok = ok && WebPReportProgress(enc->pic_, enc->percent_ + 20, &enc->percent_); - return PostLoopFinalize(&it, ok); -} - -#else - -int VP8EncTokenLoop(VP8Encoder* const enc) { - (void)enc; - return 0; // we shouldn't be here. -} - -#endif // DISABLE_TOKEN_BUFFER - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/histogram_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/histogram_enc.c deleted file mode 100644 index 2ae975e..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/histogram_enc.c +++ /dev/null @@ -1,1038 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Author: Jyrki Alakuijala (jyrki@google.com) -// -#ifdef HAVE_CONFIG_H -#include "src/webp/config.h" -#endif - -#include - -#include "src/enc/backward_references_enc.h" -#include "src/enc/histogram_enc.h" -#include "src/dsp/lossless.h" -#include "src/dsp/lossless_common.h" -#include "src/utils/utils.h" - -#define MAX_COST 1.e38 - -// Number of partitions for the three dominant (literal, red and blue) symbol -// costs. -#define NUM_PARTITIONS 4 -// The size of the bin-hash corresponding to the three dominant costs. -#define BIN_SIZE (NUM_PARTITIONS * NUM_PARTITIONS * NUM_PARTITIONS) -// Maximum number of histograms allowed in greedy combining algorithm. -#define MAX_HISTO_GREEDY 100 - -static void HistogramClear(VP8LHistogram* const p) { - uint32_t* const literal = p->literal_; - const int cache_bits = p->palette_code_bits_; - const int histo_size = VP8LGetHistogramSize(cache_bits); - memset(p, 0, histo_size); - p->palette_code_bits_ = cache_bits; - p->literal_ = literal; -} - -// Swap two histogram pointers. -static void HistogramSwap(VP8LHistogram** const A, VP8LHistogram** const B) { - VP8LHistogram* const tmp = *A; - *A = *B; - *B = tmp; -} - -static void HistogramCopy(const VP8LHistogram* const src, - VP8LHistogram* const dst) { - uint32_t* const dst_literal = dst->literal_; - const int dst_cache_bits = dst->palette_code_bits_; - const int histo_size = VP8LGetHistogramSize(dst_cache_bits); - assert(src->palette_code_bits_ == dst_cache_bits); - memcpy(dst, src, histo_size); - dst->literal_ = dst_literal; -} - -int VP8LGetHistogramSize(int cache_bits) { - const int literal_size = VP8LHistogramNumCodes(cache_bits); - const size_t total_size = sizeof(VP8LHistogram) + sizeof(int) * literal_size; - assert(total_size <= (size_t)0x7fffffff); - return (int)total_size; -} - -void VP8LFreeHistogram(VP8LHistogram* const histo) { - WebPSafeFree(histo); -} - -void VP8LFreeHistogramSet(VP8LHistogramSet* const histo) { - WebPSafeFree(histo); -} - -void VP8LHistogramStoreRefs(const VP8LBackwardRefs* const refs, - VP8LHistogram* const histo) { - VP8LRefsCursor c = VP8LRefsCursorInit(refs); - while (VP8LRefsCursorOk(&c)) { - VP8LHistogramAddSinglePixOrCopy(histo, c.cur_pos, NULL, 0); - VP8LRefsCursorNext(&c); - } -} - -void VP8LHistogramCreate(VP8LHistogram* const p, - const VP8LBackwardRefs* const refs, - int palette_code_bits) { - if (palette_code_bits >= 0) { - p->palette_code_bits_ = palette_code_bits; - } - HistogramClear(p); - VP8LHistogramStoreRefs(refs, p); -} - -void VP8LHistogramInit(VP8LHistogram* const p, int palette_code_bits) { - p->palette_code_bits_ = palette_code_bits; - HistogramClear(p); -} - -VP8LHistogram* VP8LAllocateHistogram(int cache_bits) { - VP8LHistogram* histo = NULL; - const int total_size = VP8LGetHistogramSize(cache_bits); - uint8_t* const memory = (uint8_t*)WebPSafeMalloc(total_size, sizeof(*memory)); - if (memory == NULL) return NULL; - histo = (VP8LHistogram*)memory; - // literal_ won't necessary be aligned. - histo->literal_ = (uint32_t*)(memory + sizeof(VP8LHistogram)); - VP8LHistogramInit(histo, cache_bits); - return histo; -} - -VP8LHistogramSet* VP8LAllocateHistogramSet(int size, int cache_bits) { - int i; - VP8LHistogramSet* set; - const int histo_size = VP8LGetHistogramSize(cache_bits); - const size_t total_size = - sizeof(*set) + size * (sizeof(*set->histograms) + - histo_size + WEBP_ALIGN_CST); - uint8_t* memory = (uint8_t*)WebPSafeMalloc(total_size, sizeof(*memory)); - if (memory == NULL) return NULL; - - set = (VP8LHistogramSet*)memory; - memory += sizeof(*set); - set->histograms = (VP8LHistogram**)memory; - memory += size * sizeof(*set->histograms); - set->max_size = size; - set->size = size; - for (i = 0; i < size; ++i) { - memory = (uint8_t*)WEBP_ALIGN(memory); - set->histograms[i] = (VP8LHistogram*)memory; - // literal_ won't necessary be aligned. - set->histograms[i]->literal_ = (uint32_t*)(memory + sizeof(VP8LHistogram)); - VP8LHistogramInit(set->histograms[i], cache_bits); - memory += histo_size; - } - return set; -} - -// ----------------------------------------------------------------------------- - -void VP8LHistogramAddSinglePixOrCopy(VP8LHistogram* const histo, - const PixOrCopy* const v, - int (*const distance_modifier)(int, int), - int distance_modifier_arg0) { - if (PixOrCopyIsLiteral(v)) { - ++histo->alpha_[PixOrCopyLiteral(v, 3)]; - ++histo->red_[PixOrCopyLiteral(v, 2)]; - ++histo->literal_[PixOrCopyLiteral(v, 1)]; - ++histo->blue_[PixOrCopyLiteral(v, 0)]; - } else if (PixOrCopyIsCacheIdx(v)) { - const int literal_ix = - NUM_LITERAL_CODES + NUM_LENGTH_CODES + PixOrCopyCacheIdx(v); - ++histo->literal_[literal_ix]; - } else { - int code, extra_bits; - VP8LPrefixEncodeBits(PixOrCopyLength(v), &code, &extra_bits); - ++histo->literal_[NUM_LITERAL_CODES + code]; - if (distance_modifier == NULL) { - VP8LPrefixEncodeBits(PixOrCopyDistance(v), &code, &extra_bits); - } else { - VP8LPrefixEncodeBits( - distance_modifier(distance_modifier_arg0, PixOrCopyDistance(v)), - &code, &extra_bits); - } - ++histo->distance_[code]; - } -} - -// ----------------------------------------------------------------------------- -// Entropy-related functions. - -static WEBP_INLINE double BitsEntropyRefine(const VP8LBitEntropy* entropy) { - double mix; - if (entropy->nonzeros < 5) { - if (entropy->nonzeros <= 1) { - return 0; - } - // Two symbols, they will be 0 and 1 in a Huffman code. - // Let's mix in a bit of entropy to favor good clustering when - // distributions of these are combined. - if (entropy->nonzeros == 2) { - return 0.99 * entropy->sum + 0.01 * entropy->entropy; - } - // No matter what the entropy says, we cannot be better than min_limit - // with Huffman coding. I am mixing a bit of entropy into the - // min_limit since it produces much better (~0.5 %) compression results - // perhaps because of better entropy clustering. - if (entropy->nonzeros == 3) { - mix = 0.95; - } else { - mix = 0.7; // nonzeros == 4. - } - } else { - mix = 0.627; - } - - { - double min_limit = 2 * entropy->sum - entropy->max_val; - min_limit = mix * min_limit + (1.0 - mix) * entropy->entropy; - return (entropy->entropy < min_limit) ? min_limit : entropy->entropy; - } -} - -double VP8LBitsEntropy(const uint32_t* const array, int n) { - VP8LBitEntropy entropy; - VP8LBitsEntropyUnrefined(array, n, &entropy); - - return BitsEntropyRefine(&entropy); -} - -static double InitialHuffmanCost(void) { - // Small bias because Huffman code length is typically not stored in - // full length. - static const int kHuffmanCodeOfHuffmanCodeSize = CODE_LENGTH_CODES * 3; - static const double kSmallBias = 9.1; - return kHuffmanCodeOfHuffmanCodeSize - kSmallBias; -} - -// Finalize the Huffman cost based on streak numbers and length type (<3 or >=3) -static double FinalHuffmanCost(const VP8LStreaks* const stats) { - // The constants in this function are experimental and got rounded from - // their original values in 1/8 when switched to 1/1024. - double retval = InitialHuffmanCost(); - // Second coefficient: Many zeros in the histogram are covered efficiently - // by a run-length encode. Originally 2/8. - retval += stats->counts[0] * 1.5625 + 0.234375 * stats->streaks[0][1]; - // Second coefficient: Constant values are encoded less efficiently, but still - // RLE'ed. Originally 6/8. - retval += stats->counts[1] * 2.578125 + 0.703125 * stats->streaks[1][1]; - // 0s are usually encoded more efficiently than non-0s. - // Originally 15/8. - retval += 1.796875 * stats->streaks[0][0]; - // Originally 26/8. - retval += 3.28125 * stats->streaks[1][0]; - return retval; -} - -// Get the symbol entropy for the distribution 'population'. -// Set 'trivial_sym', if there's only one symbol present in the distribution. -static double PopulationCost(const uint32_t* const population, int length, - uint32_t* const trivial_sym) { - VP8LBitEntropy bit_entropy; - VP8LStreaks stats; - VP8LGetEntropyUnrefined(population, length, &bit_entropy, &stats); - if (trivial_sym != NULL) { - *trivial_sym = (bit_entropy.nonzeros == 1) ? bit_entropy.nonzero_code - : VP8L_NON_TRIVIAL_SYM; - } - - return BitsEntropyRefine(&bit_entropy) + FinalHuffmanCost(&stats); -} - -// trivial_at_end is 1 if the two histograms only have one element that is -// non-zero: both the zero-th one, or both the last one. -static WEBP_INLINE double GetCombinedEntropy(const uint32_t* const X, - const uint32_t* const Y, - int length, int trivial_at_end) { - VP8LStreaks stats; - if (trivial_at_end) { - // This configuration is due to palettization that transforms an indexed - // pixel into 0xff000000 | (pixel << 8) in VP8LBundleColorMap. - // BitsEntropyRefine is 0 for histograms with only one non-zero value. - // Only FinalHuffmanCost needs to be evaluated. - memset(&stats, 0, sizeof(stats)); - // Deal with the non-zero value at index 0 or length-1. - stats.streaks[1][0] += 1; - // Deal with the following/previous zero streak. - stats.counts[0] += 1; - stats.streaks[0][1] += length - 1; - return FinalHuffmanCost(&stats); - } else { - VP8LBitEntropy bit_entropy; - VP8LGetCombinedEntropyUnrefined(X, Y, length, &bit_entropy, &stats); - - return BitsEntropyRefine(&bit_entropy) + FinalHuffmanCost(&stats); - } -} - -// Estimates the Entropy + Huffman + other block overhead size cost. -double VP8LHistogramEstimateBits(const VP8LHistogram* const p) { - return - PopulationCost( - p->literal_, VP8LHistogramNumCodes(p->palette_code_bits_), NULL) - + PopulationCost(p->red_, NUM_LITERAL_CODES, NULL) - + PopulationCost(p->blue_, NUM_LITERAL_CODES, NULL) - + PopulationCost(p->alpha_, NUM_LITERAL_CODES, NULL) - + PopulationCost(p->distance_, NUM_DISTANCE_CODES, NULL) - + VP8LExtraCost(p->literal_ + NUM_LITERAL_CODES, NUM_LENGTH_CODES) - + VP8LExtraCost(p->distance_, NUM_DISTANCE_CODES); -} - -// ----------------------------------------------------------------------------- -// Various histogram combine/cost-eval functions - -static int GetCombinedHistogramEntropy(const VP8LHistogram* const a, - const VP8LHistogram* const b, - double cost_threshold, - double* cost) { - const int palette_code_bits = a->palette_code_bits_; - int trivial_at_end = 0; - assert(a->palette_code_bits_ == b->palette_code_bits_); - *cost += GetCombinedEntropy(a->literal_, b->literal_, - VP8LHistogramNumCodes(palette_code_bits), 0); - *cost += VP8LExtraCostCombined(a->literal_ + NUM_LITERAL_CODES, - b->literal_ + NUM_LITERAL_CODES, - NUM_LENGTH_CODES); - if (*cost > cost_threshold) return 0; - - if (a->trivial_symbol_ != VP8L_NON_TRIVIAL_SYM && - a->trivial_symbol_ == b->trivial_symbol_) { - // A, R and B are all 0 or 0xff. - const uint32_t color_a = (a->trivial_symbol_ >> 24) & 0xff; - const uint32_t color_r = (a->trivial_symbol_ >> 16) & 0xff; - const uint32_t color_b = (a->trivial_symbol_ >> 0) & 0xff; - if ((color_a == 0 || color_a == 0xff) && - (color_r == 0 || color_r == 0xff) && - (color_b == 0 || color_b == 0xff)) { - trivial_at_end = 1; - } - } - - *cost += - GetCombinedEntropy(a->red_, b->red_, NUM_LITERAL_CODES, trivial_at_end); - if (*cost > cost_threshold) return 0; - - *cost += - GetCombinedEntropy(a->blue_, b->blue_, NUM_LITERAL_CODES, trivial_at_end); - if (*cost > cost_threshold) return 0; - - *cost += GetCombinedEntropy(a->alpha_, b->alpha_, NUM_LITERAL_CODES, - trivial_at_end); - if (*cost > cost_threshold) return 0; - - *cost += - GetCombinedEntropy(a->distance_, b->distance_, NUM_DISTANCE_CODES, 0); - *cost += - VP8LExtraCostCombined(a->distance_, b->distance_, NUM_DISTANCE_CODES); - if (*cost > cost_threshold) return 0; - - return 1; -} - -static WEBP_INLINE void HistogramAdd(const VP8LHistogram* const a, - const VP8LHistogram* const b, - VP8LHistogram* const out) { - VP8LHistogramAdd(a, b, out); - out->trivial_symbol_ = (a->trivial_symbol_ == b->trivial_symbol_) - ? a->trivial_symbol_ - : VP8L_NON_TRIVIAL_SYM; -} - -// Performs out = a + b, computing the cost C(a+b) - C(a) - C(b) while comparing -// to the threshold value 'cost_threshold'. The score returned is -// Score = C(a+b) - C(a) - C(b), where C(a) + C(b) is known and fixed. -// Since the previous score passed is 'cost_threshold', we only need to compare -// the partial cost against 'cost_threshold + C(a) + C(b)' to possibly bail-out -// early. -static double HistogramAddEval(const VP8LHistogram* const a, - const VP8LHistogram* const b, - VP8LHistogram* const out, - double cost_threshold) { - double cost = 0; - const double sum_cost = a->bit_cost_ + b->bit_cost_; - cost_threshold += sum_cost; - - if (GetCombinedHistogramEntropy(a, b, cost_threshold, &cost)) { - HistogramAdd(a, b, out); - out->bit_cost_ = cost; - out->palette_code_bits_ = a->palette_code_bits_; - } - - return cost - sum_cost; -} - -// Same as HistogramAddEval(), except that the resulting histogram -// is not stored. Only the cost C(a+b) - C(a) is evaluated. We omit -// the term C(b) which is constant over all the evaluations. -static double HistogramAddThresh(const VP8LHistogram* const a, - const VP8LHistogram* const b, - double cost_threshold) { - double cost = -a->bit_cost_; - GetCombinedHistogramEntropy(a, b, cost_threshold, &cost); - return cost; -} - -// ----------------------------------------------------------------------------- - -// The structure to keep track of cost range for the three dominant entropy -// symbols. -// TODO(skal): Evaluate if float can be used here instead of double for -// representing the entropy costs. -typedef struct { - double literal_max_; - double literal_min_; - double red_max_; - double red_min_; - double blue_max_; - double blue_min_; -} DominantCostRange; - -static void DominantCostRangeInit(DominantCostRange* const c) { - c->literal_max_ = 0.; - c->literal_min_ = MAX_COST; - c->red_max_ = 0.; - c->red_min_ = MAX_COST; - c->blue_max_ = 0.; - c->blue_min_ = MAX_COST; -} - -static void UpdateDominantCostRange( - const VP8LHistogram* const h, DominantCostRange* const c) { - if (c->literal_max_ < h->literal_cost_) c->literal_max_ = h->literal_cost_; - if (c->literal_min_ > h->literal_cost_) c->literal_min_ = h->literal_cost_; - if (c->red_max_ < h->red_cost_) c->red_max_ = h->red_cost_; - if (c->red_min_ > h->red_cost_) c->red_min_ = h->red_cost_; - if (c->blue_max_ < h->blue_cost_) c->blue_max_ = h->blue_cost_; - if (c->blue_min_ > h->blue_cost_) c->blue_min_ = h->blue_cost_; -} - -static void UpdateHistogramCost(VP8LHistogram* const h) { - uint32_t alpha_sym, red_sym, blue_sym; - const double alpha_cost = - PopulationCost(h->alpha_, NUM_LITERAL_CODES, &alpha_sym); - const double distance_cost = - PopulationCost(h->distance_, NUM_DISTANCE_CODES, NULL) + - VP8LExtraCost(h->distance_, NUM_DISTANCE_CODES); - const int num_codes = VP8LHistogramNumCodes(h->palette_code_bits_); - h->literal_cost_ = PopulationCost(h->literal_, num_codes, NULL) + - VP8LExtraCost(h->literal_ + NUM_LITERAL_CODES, - NUM_LENGTH_CODES); - h->red_cost_ = PopulationCost(h->red_, NUM_LITERAL_CODES, &red_sym); - h->blue_cost_ = PopulationCost(h->blue_, NUM_LITERAL_CODES, &blue_sym); - h->bit_cost_ = h->literal_cost_ + h->red_cost_ + h->blue_cost_ + - alpha_cost + distance_cost; - if ((alpha_sym | red_sym | blue_sym) == VP8L_NON_TRIVIAL_SYM) { - h->trivial_symbol_ = VP8L_NON_TRIVIAL_SYM; - } else { - h->trivial_symbol_ = - ((uint32_t)alpha_sym << 24) | (red_sym << 16) | (blue_sym << 0); - } -} - -static int GetBinIdForEntropy(double min, double max, double val) { - const double range = max - min; - if (range > 0.) { - const double delta = val - min; - return (int)((NUM_PARTITIONS - 1e-6) * delta / range); - } else { - return 0; - } -} - -static int GetHistoBinIndex(const VP8LHistogram* const h, - const DominantCostRange* const c, int low_effort) { - int bin_id = GetBinIdForEntropy(c->literal_min_, c->literal_max_, - h->literal_cost_); - assert(bin_id < NUM_PARTITIONS); - if (!low_effort) { - bin_id = bin_id * NUM_PARTITIONS - + GetBinIdForEntropy(c->red_min_, c->red_max_, h->red_cost_); - bin_id = bin_id * NUM_PARTITIONS - + GetBinIdForEntropy(c->blue_min_, c->blue_max_, h->blue_cost_); - assert(bin_id < BIN_SIZE); - } - return bin_id; -} - -// Construct the histograms from backward references. -static void HistogramBuild( - int xsize, int histo_bits, const VP8LBackwardRefs* const backward_refs, - VP8LHistogramSet* const image_histo) { - int x = 0, y = 0; - const int histo_xsize = VP8LSubSampleSize(xsize, histo_bits); - VP8LHistogram** const histograms = image_histo->histograms; - VP8LRefsCursor c = VP8LRefsCursorInit(backward_refs); - assert(histo_bits > 0); - while (VP8LRefsCursorOk(&c)) { - const PixOrCopy* const v = c.cur_pos; - const int ix = (y >> histo_bits) * histo_xsize + (x >> histo_bits); - VP8LHistogramAddSinglePixOrCopy(histograms[ix], v, NULL, 0); - x += PixOrCopyLength(v); - while (x >= xsize) { - x -= xsize; - ++y; - } - VP8LRefsCursorNext(&c); - } -} - -// Copies the histograms and computes its bit_cost. -static void HistogramCopyAndAnalyze( - VP8LHistogramSet* const orig_histo, VP8LHistogramSet* const image_histo) { - int i; - const int histo_size = orig_histo->size; - VP8LHistogram** const orig_histograms = orig_histo->histograms; - VP8LHistogram** const histograms = image_histo->histograms; - for (i = 0; i < histo_size; ++i) { - VP8LHistogram* const histo = orig_histograms[i]; - UpdateHistogramCost(histo); - // Copy histograms from orig_histo[] to image_histo[]. - HistogramCopy(histo, histograms[i]); - } -} - -// Partition histograms to different entropy bins for three dominant (literal, -// red and blue) symbol costs and compute the histogram aggregate bit_cost. -static void HistogramAnalyzeEntropyBin(VP8LHistogramSet* const image_histo, - uint16_t* const bin_map, - int low_effort) { - int i; - VP8LHistogram** const histograms = image_histo->histograms; - const int histo_size = image_histo->size; - DominantCostRange cost_range; - DominantCostRangeInit(&cost_range); - - // Analyze the dominant (literal, red and blue) entropy costs. - for (i = 0; i < histo_size; ++i) { - UpdateDominantCostRange(histograms[i], &cost_range); - } - - // bin-hash histograms on three of the dominant (literal, red and blue) - // symbol costs and store the resulting bin_id for each histogram. - for (i = 0; i < histo_size; ++i) { - bin_map[i] = GetHistoBinIndex(histograms[i], &cost_range, low_effort); - } -} - -// Compact image_histo[] by merging some histograms with same bin_id together if -// it's advantageous. -static void HistogramCombineEntropyBin(VP8LHistogramSet* const image_histo, - VP8LHistogram* cur_combo, - const uint16_t* const bin_map, - int bin_map_size, int num_bins, - double combine_cost_factor, - int low_effort) { - VP8LHistogram** const histograms = image_histo->histograms; - int idx; - // Work in-place: processed histograms are put at the beginning of - // image_histo[]. At the end, we just have to truncate the array. - int size = 0; - struct { - int16_t first; // position of the histogram that accumulates all - // histograms with the same bin_id - uint16_t num_combine_failures; // number of combine failures per bin_id - } bin_info[BIN_SIZE]; - - assert(num_bins <= BIN_SIZE); - for (idx = 0; idx < num_bins; ++idx) { - bin_info[idx].first = -1; - bin_info[idx].num_combine_failures = 0; - } - - for (idx = 0; idx < bin_map_size; ++idx) { - const int bin_id = bin_map[idx]; - const int first = bin_info[bin_id].first; - assert(size <= idx); - if (first == -1) { - // just move histogram #idx to its final position - histograms[size] = histograms[idx]; - bin_info[bin_id].first = size++; - } else if (low_effort) { - HistogramAdd(histograms[idx], histograms[first], histograms[first]); - } else { - // try to merge #idx into #first (both share the same bin_id) - const double bit_cost = histograms[idx]->bit_cost_; - const double bit_cost_thresh = -bit_cost * combine_cost_factor; - const double curr_cost_diff = - HistogramAddEval(histograms[first], histograms[idx], - cur_combo, bit_cost_thresh); - if (curr_cost_diff < bit_cost_thresh) { - // Try to merge two histograms only if the combo is a trivial one or - // the two candidate histograms are already non-trivial. - // For some images, 'try_combine' turns out to be false for a lot of - // histogram pairs. In that case, we fallback to combining - // histograms as usual to avoid increasing the header size. - const int try_combine = - (cur_combo->trivial_symbol_ != VP8L_NON_TRIVIAL_SYM) || - ((histograms[idx]->trivial_symbol_ == VP8L_NON_TRIVIAL_SYM) && - (histograms[first]->trivial_symbol_ == VP8L_NON_TRIVIAL_SYM)); - const int max_combine_failures = 32; - if (try_combine || - bin_info[bin_id].num_combine_failures >= max_combine_failures) { - // move the (better) merged histogram to its final slot - HistogramSwap(&cur_combo, &histograms[first]); - } else { - histograms[size++] = histograms[idx]; - ++bin_info[bin_id].num_combine_failures; - } - } else { - histograms[size++] = histograms[idx]; - } - } - } - image_histo->size = size; - if (low_effort) { - // for low_effort case, update the final cost when everything is merged - for (idx = 0; idx < size; ++idx) { - UpdateHistogramCost(histograms[idx]); - } - } -} - -// Implement a Lehmer random number generator with a multiplicative constant of -// 48271 and a modulo constant of 2^31 - 1. -static uint32_t MyRand(uint32_t* const seed) { - *seed = (uint32_t)(((uint64_t)(*seed) * 48271u) % 2147483647u); - assert(*seed > 0); - return *seed; -} - -// ----------------------------------------------------------------------------- -// Histogram pairs priority queue - -// Pair of histograms. Negative idx1 value means that pair is out-of-date. -typedef struct { - int idx1; - int idx2; - double cost_diff; - double cost_combo; -} HistogramPair; - -typedef struct { - HistogramPair* queue; - int size; - int max_size; -} HistoQueue; - -static int HistoQueueInit(HistoQueue* const histo_queue, const int max_index) { - histo_queue->size = 0; - // max_index^2 for the queue size is safe. If you look at - // HistogramCombineGreedy, and imagine that UpdateQueueFront always pushes - // data to the queue, you insert at most: - // - max_index*(max_index-1)/2 (the first two for loops) - // - max_index - 1 in the last for loop at the first iteration of the while - // loop, max_index - 2 at the second iteration ... therefore - // max_index*(max_index-1)/2 overall too - histo_queue->max_size = max_index * max_index; - // We allocate max_size + 1 because the last element at index "size" is - // used as temporary data (and it could be up to max_size). - histo_queue->queue = (HistogramPair*)WebPSafeMalloc( - histo_queue->max_size + 1, sizeof(*histo_queue->queue)); - return histo_queue->queue != NULL; -} - -static void HistoQueueClear(HistoQueue* const histo_queue) { - assert(histo_queue != NULL); - WebPSafeFree(histo_queue->queue); - histo_queue->size = 0; - histo_queue->max_size = 0; -} - -// Pop a specific pair in the queue by replacing it with the last one -// and shrinking the queue. -static void HistoQueuePopPair(HistoQueue* const histo_queue, - HistogramPair* const pair) { - assert(pair >= histo_queue->queue && - pair < (histo_queue->queue + histo_queue->size)); - assert(histo_queue->size > 0); - *pair = histo_queue->queue[histo_queue->size - 1]; - --histo_queue->size; -} - -// Check whether a pair in the queue should be updated as head or not. -static void HistoQueueUpdateHead(HistoQueue* const histo_queue, - HistogramPair* const pair) { - assert(pair->cost_diff < 0.); - assert(pair >= histo_queue->queue && - pair < (histo_queue->queue + histo_queue->size)); - assert(histo_queue->size > 0); - if (pair->cost_diff < histo_queue->queue[0].cost_diff) { - // Replace the best pair. - const HistogramPair tmp = histo_queue->queue[0]; - histo_queue->queue[0] = *pair; - *pair = tmp; - } -} - -// Create a pair from indices "idx1" and "idx2" provided its cost -// is inferior to "threshold", a negative entropy. -// It returns the cost of the pair, or 0. if it superior to threshold. -static double HistoQueuePush(HistoQueue* const histo_queue, - VP8LHistogram** const histograms, int idx1, - int idx2, double threshold) { - const VP8LHistogram* h1; - const VP8LHistogram* h2; - HistogramPair pair; - double sum_cost; - - assert(threshold <= 0.); - if (idx1 > idx2) { - const int tmp = idx2; - idx2 = idx1; - idx1 = tmp; - } - pair.idx1 = idx1; - pair.idx2 = idx2; - h1 = histograms[idx1]; - h2 = histograms[idx2]; - sum_cost = h1->bit_cost_ + h2->bit_cost_; - pair.cost_combo = 0.; - GetCombinedHistogramEntropy(h1, h2, sum_cost + threshold, &pair.cost_combo); - pair.cost_diff = pair.cost_combo - sum_cost; - - // Do not even consider the pair if it does not improve the entropy. - if (pair.cost_diff >= threshold) return 0.; - - // We cannot add more elements than the capacity. - assert(histo_queue->size < histo_queue->max_size); - histo_queue->queue[histo_queue->size++] = pair; - HistoQueueUpdateHead(histo_queue, &histo_queue->queue[histo_queue->size - 1]); - - return pair.cost_diff; -} - -// ----------------------------------------------------------------------------- - -// Combines histograms by continuously choosing the one with the highest cost -// reduction. -static int HistogramCombineGreedy(VP8LHistogramSet* const image_histo) { - int ok = 0; - int image_histo_size = image_histo->size; - int i, j; - VP8LHistogram** const histograms = image_histo->histograms; - // Indexes of remaining histograms. - int* const clusters = - (int*)WebPSafeMalloc(image_histo_size, sizeof(*clusters)); - // Priority queue of histogram pairs. - HistoQueue histo_queue; - - if (!HistoQueueInit(&histo_queue, image_histo_size) || clusters == NULL) { - goto End; - } - - for (i = 0; i < image_histo_size; ++i) { - // Initialize clusters indexes. - clusters[i] = i; - for (j = i + 1; j < image_histo_size; ++j) { - // Initialize positions array. - HistoQueuePush(&histo_queue, histograms, i, j, 0.); - } - } - - while (image_histo_size > 1 && histo_queue.size > 0) { - const int idx1 = histo_queue.queue[0].idx1; - const int idx2 = histo_queue.queue[0].idx2; - HistogramAdd(histograms[idx2], histograms[idx1], histograms[idx1]); - histograms[idx1]->bit_cost_ = histo_queue.queue[0].cost_combo; - // Remove merged histogram. - for (i = 0; i + 1 < image_histo_size; ++i) { - if (clusters[i] >= idx2) { - clusters[i] = clusters[i + 1]; - } - } - --image_histo_size; - - // Remove pairs intersecting the just combined best pair. - for (i = 0; i < histo_queue.size;) { - HistogramPair* const p = histo_queue.queue + i; - if (p->idx1 == idx1 || p->idx2 == idx1 || - p->idx1 == idx2 || p->idx2 == idx2) { - HistoQueuePopPair(&histo_queue, p); - } else { - HistoQueueUpdateHead(&histo_queue, p); - ++i; - } - } - - // Push new pairs formed with combined histogram to the queue. - for (i = 0; i < image_histo_size; ++i) { - if (clusters[i] != idx1) { - HistoQueuePush(&histo_queue, histograms, idx1, clusters[i], 0.); - } - } - } - // Move remaining histograms to the beginning of the array. - for (i = 0; i < image_histo_size; ++i) { - if (i != clusters[i]) { // swap the two histograms - HistogramSwap(&histograms[i], &histograms[clusters[i]]); - } - } - - image_histo->size = image_histo_size; - ok = 1; - - End: - WebPSafeFree(clusters); - HistoQueueClear(&histo_queue); - return ok; -} - -// Perform histogram aggregation using a stochastic approach. -// 'do_greedy' is set to 1 if a greedy approach needs to be performed -// afterwards, 0 otherwise. -static int HistogramCombineStochastic(VP8LHistogramSet* const image_histo, - int min_cluster_size, - int* const do_greedy) { - int iter; - uint32_t seed = 1; - int tries_with_no_success = 0; - int image_histo_size = image_histo->size; - const int outer_iters = image_histo_size; - const int num_tries_no_success = outer_iters / 2; - VP8LHistogram** const histograms = image_histo->histograms; - // Priority queue of histogram pairs. Its size of "kCostHeapSizeSqrt"^2 - // impacts the quality of the compression and the speed: the smaller the - // faster but the worse for the compression. - HistoQueue histo_queue; - const int kHistoQueueSizeSqrt = 3; - int ok = 0; - - if (!HistoQueueInit(&histo_queue, kHistoQueueSizeSqrt)) { - goto End; - } - // Collapse similar histograms in 'image_histo'. - ++min_cluster_size; - for (iter = 0; iter < outer_iters && image_histo_size >= min_cluster_size && - ++tries_with_no_success < num_tries_no_success; - ++iter) { - double best_cost = - (histo_queue.size == 0) ? 0. : histo_queue.queue[0].cost_diff; - int best_idx1 = -1, best_idx2 = 1; - int j; - const uint32_t rand_range = (image_histo_size - 1) * image_histo_size; - // image_histo_size / 2 was chosen empirically. Less means faster but worse - // compression. - const int num_tries = image_histo_size / 2; - - for (j = 0; j < num_tries; ++j) { - double curr_cost; - // Choose two different histograms at random and try to combine them. - const uint32_t tmp = MyRand(&seed) % rand_range; - const uint32_t idx1 = tmp / (image_histo_size - 1); - uint32_t idx2 = tmp % (image_histo_size - 1); - if (idx2 >= idx1) ++idx2; - - // Calculate cost reduction on combination. - curr_cost = - HistoQueuePush(&histo_queue, histograms, idx1, idx2, best_cost); - if (curr_cost < 0) { // found a better pair? - best_cost = curr_cost; - // Empty the queue if we reached full capacity. - if (histo_queue.size == histo_queue.max_size) break; - } - } - if (histo_queue.size == 0) continue; - - // Merge the two best histograms. - best_idx1 = histo_queue.queue[0].idx1; - best_idx2 = histo_queue.queue[0].idx2; - assert(best_idx1 < best_idx2); - HistogramAddEval(histograms[best_idx1], histograms[best_idx2], - histograms[best_idx1], 0); - // Swap the best_idx2 histogram with the last one (which is now unused). - --image_histo_size; - if (best_idx2 != image_histo_size) { - HistogramSwap(&histograms[image_histo_size], &histograms[best_idx2]); - } - histograms[image_histo_size] = NULL; - // Parse the queue and update each pair that deals with best_idx1, - // best_idx2 or image_histo_size. - for (j = 0; j < histo_queue.size;) { - HistogramPair* const p = histo_queue.queue + j; - const int is_idx1_best = p->idx1 == best_idx1 || p->idx1 == best_idx2; - const int is_idx2_best = p->idx2 == best_idx1 || p->idx2 == best_idx2; - int do_eval = 0; - // The front pair could have been duplicated by a random pick so - // check for it all the time nevertheless. - if (is_idx1_best && is_idx2_best) { - HistoQueuePopPair(&histo_queue, p); - continue; - } - // Any pair containing one of the two best indices should only refer to - // best_idx1. Its cost should also be updated. - if (is_idx1_best) { - p->idx1 = best_idx1; - do_eval = 1; - } else if (is_idx2_best) { - p->idx2 = best_idx1; - do_eval = 1; - } - if (p->idx2 == image_histo_size) { - // No need to re-evaluate here as it does not involve a pair - // containing best_idx1 or best_idx2. - p->idx2 = best_idx2; - } - assert(p->idx2 < image_histo_size); - // Make sure the index order is respected. - if (p->idx1 > p->idx2) { - const int tmp = p->idx2; - p->idx2 = p->idx1; - p->idx1 = tmp; - } - if (do_eval) { - // Re-evaluate the cost of an updated pair. - GetCombinedHistogramEntropy(histograms[p->idx1], histograms[p->idx2], 0, - &p->cost_diff); - if (p->cost_diff >= 0.) { - HistoQueuePopPair(&histo_queue, p); - continue; - } - } - HistoQueueUpdateHead(&histo_queue, p); - ++j; - } - - tries_with_no_success = 0; - } - image_histo->size = image_histo_size; - *do_greedy = (image_histo->size <= min_cluster_size); - ok = 1; - -End: - HistoQueueClear(&histo_queue); - return ok; -} - -// ----------------------------------------------------------------------------- -// Histogram refinement - -// Find the best 'out' histogram for each of the 'in' histograms. -// Note: we assume that out[]->bit_cost_ is already up-to-date. -static void HistogramRemap(const VP8LHistogramSet* const in, - const VP8LHistogramSet* const out, - uint16_t* const symbols) { - int i; - VP8LHistogram** const in_histo = in->histograms; - VP8LHistogram** const out_histo = out->histograms; - const int in_size = in->size; - const int out_size = out->size; - if (out_size > 1) { - for (i = 0; i < in_size; ++i) { - int best_out = 0; - double best_bits = MAX_COST; - int k; - for (k = 0; k < out_size; ++k) { - const double cur_bits = - HistogramAddThresh(out_histo[k], in_histo[i], best_bits); - if (k == 0 || cur_bits < best_bits) { - best_bits = cur_bits; - best_out = k; - } - } - symbols[i] = best_out; - } - } else { - assert(out_size == 1); - for (i = 0; i < in_size; ++i) { - symbols[i] = 0; - } - } - - // Recompute each out based on raw and symbols. - for (i = 0; i < out_size; ++i) { - HistogramClear(out_histo[i]); - } - - for (i = 0; i < in_size; ++i) { - const int idx = symbols[i]; - HistogramAdd(in_histo[i], out_histo[idx], out_histo[idx]); - } -} - -static double GetCombineCostFactor(int histo_size, int quality) { - double combine_cost_factor = 0.16; - if (quality < 90) { - if (histo_size > 256) combine_cost_factor /= 2.; - if (histo_size > 512) combine_cost_factor /= 2.; - if (histo_size > 1024) combine_cost_factor /= 2.; - if (quality <= 50) combine_cost_factor /= 2.; - } - return combine_cost_factor; -} - -int VP8LGetHistoImageSymbols(int xsize, int ysize, - const VP8LBackwardRefs* const refs, - int quality, int low_effort, - int histo_bits, int cache_bits, - VP8LHistogramSet* const image_histo, - VP8LHistogram* const tmp_histo, - uint16_t* const histogram_symbols) { - int ok = 0; - const int histo_xsize = histo_bits ? VP8LSubSampleSize(xsize, histo_bits) : 1; - const int histo_ysize = histo_bits ? VP8LSubSampleSize(ysize, histo_bits) : 1; - const int image_histo_raw_size = histo_xsize * histo_ysize; - VP8LHistogramSet* const orig_histo = - VP8LAllocateHistogramSet(image_histo_raw_size, cache_bits); - // Don't attempt linear bin-partition heuristic for - // histograms of small sizes (as bin_map will be very sparse) and - // maximum quality q==100 (to preserve the compression gains at that level). - const int entropy_combine_num_bins = low_effort ? NUM_PARTITIONS : BIN_SIZE; - const int entropy_combine = - (orig_histo->size > entropy_combine_num_bins * 2) && (quality < 100); - - if (orig_histo == NULL) goto Error; - - // Construct the histograms from backward references. - HistogramBuild(xsize, histo_bits, refs, orig_histo); - // Copies the histograms and computes its bit_cost. - HistogramCopyAndAnalyze(orig_histo, image_histo); - - if (entropy_combine) { - const int bin_map_size = orig_histo->size; - // Reuse histogram_symbols storage. By definition, it's guaranteed to be ok. - uint16_t* const bin_map = histogram_symbols; - const double combine_cost_factor = - GetCombineCostFactor(image_histo_raw_size, quality); - - HistogramAnalyzeEntropyBin(orig_histo, bin_map, low_effort); - // Collapse histograms with similar entropy. - HistogramCombineEntropyBin(image_histo, tmp_histo, bin_map, bin_map_size, - entropy_combine_num_bins, combine_cost_factor, - low_effort); - } - - // Don't combine the histograms using stochastic and greedy heuristics for - // low-effort compression mode. - if (!low_effort || !entropy_combine) { - const float x = quality / 100.f; - // cubic ramp between 1 and MAX_HISTO_GREEDY: - const int threshold_size = (int)(1 + (x * x * x) * (MAX_HISTO_GREEDY - 1)); - int do_greedy; - if (!HistogramCombineStochastic(image_histo, threshold_size, &do_greedy)) { - goto Error; - } - if (do_greedy && !HistogramCombineGreedy(image_histo)) { - goto Error; - } - } - - // TODO(vrabaud): Optimize HistogramRemap for low-effort compression mode. - // Find the optimal map from original histograms to the final ones. - HistogramRemap(orig_histo, image_histo, histogram_symbols); - - ok = 1; - - Error: - VP8LFreeHistogramSet(orig_histo); - return ok; -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/histogram_enc.h b/Dependencies/FreeImage/Source/LibWebP/src/enc/histogram_enc.h deleted file mode 100644 index ddcc31b..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/histogram_enc.h +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Author: Jyrki Alakuijala (jyrki@google.com) -// -// Models the histograms of literal and distance codes. - -#ifndef WEBP_ENC_HISTOGRAM_ENC_H_ -#define WEBP_ENC_HISTOGRAM_ENC_H_ - -#include - -#include "src/enc/backward_references_enc.h" -#include "src/webp/format_constants.h" -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Not a trivial literal symbol. -#define VP8L_NON_TRIVIAL_SYM (0xffffffff) - -// A simple container for histograms of data. -typedef struct { - // literal_ contains green literal, palette-code and - // copy-length-prefix histogram - uint32_t* literal_; // Pointer to the allocated buffer for literal. - uint32_t red_[NUM_LITERAL_CODES]; - uint32_t blue_[NUM_LITERAL_CODES]; - uint32_t alpha_[NUM_LITERAL_CODES]; - // Backward reference prefix-code histogram. - uint32_t distance_[NUM_DISTANCE_CODES]; - int palette_code_bits_; - uint32_t trivial_symbol_; // True, if histograms for Red, Blue & Alpha - // literal symbols are single valued. - double bit_cost_; // cached value of bit cost. - double literal_cost_; // Cached values of dominant entropy costs: - double red_cost_; // literal, red & blue. - double blue_cost_; -} VP8LHistogram; - -// Collection of histograms with fixed capacity, allocated as one -// big memory chunk. Can be destroyed by calling WebPSafeFree(). -typedef struct { - int size; // number of slots currently in use - int max_size; // maximum capacity - VP8LHistogram** histograms; -} VP8LHistogramSet; - -// Create the histogram. -// -// The input data is the PixOrCopy data, which models the literals, stop -// codes and backward references (both distances and lengths). Also: if -// palette_code_bits is >= 0, initialize the histogram with this value. -void VP8LHistogramCreate(VP8LHistogram* const p, - const VP8LBackwardRefs* const refs, - int palette_code_bits); - -// Return the size of the histogram for a given palette_code_bits. -int VP8LGetHistogramSize(int palette_code_bits); - -// Set the palette_code_bits and reset the stats. -void VP8LHistogramInit(VP8LHistogram* const p, int palette_code_bits); - -// Collect all the references into a histogram (without reset) -void VP8LHistogramStoreRefs(const VP8LBackwardRefs* const refs, - VP8LHistogram* const histo); - -// Free the memory allocated for the histogram. -void VP8LFreeHistogram(VP8LHistogram* const histo); - -// Free the memory allocated for the histogram set. -void VP8LFreeHistogramSet(VP8LHistogramSet* const histo); - -// Allocate an array of pointer to histograms, allocated and initialized -// using 'cache_bits'. Return NULL in case of memory error. -VP8LHistogramSet* VP8LAllocateHistogramSet(int size, int cache_bits); - -// Allocate and initialize histogram object with specified 'cache_bits'. -// Returns NULL in case of memory error. -// Special case of VP8LAllocateHistogramSet, with size equals 1. -VP8LHistogram* VP8LAllocateHistogram(int cache_bits); - -// Accumulate a token 'v' into a histogram. -void VP8LHistogramAddSinglePixOrCopy(VP8LHistogram* const histo, - const PixOrCopy* const v, - int (*const distance_modifier)(int, int), - int distance_modifier_arg0); - -static WEBP_INLINE int VP8LHistogramNumCodes(int palette_code_bits) { - return NUM_LITERAL_CODES + NUM_LENGTH_CODES + - ((palette_code_bits > 0) ? (1 << palette_code_bits) : 0); -} - -// Builds the histogram image. -int VP8LGetHistoImageSymbols(int xsize, int ysize, - const VP8LBackwardRefs* const refs, - int quality, int low_effort, - int histogram_bits, int cache_bits, - VP8LHistogramSet* const image_in, - VP8LHistogram* const tmp_histo, - uint16_t* const histogram_symbols); - -// Returns the entropy for the symbols in the input array. -double VP8LBitsEntropy(const uint32_t* const array, int n); - -// Estimate how many bits the combined entropy of literals and distance -// approximately maps to. -double VP8LHistogramEstimateBits(const VP8LHistogram* const p); - -#ifdef __cplusplus -} -#endif - -#endif // WEBP_ENC_HISTOGRAM_ENC_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/iterator_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/iterator_enc.c deleted file mode 100644 index f4615ee..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/iterator_enc.c +++ /dev/null @@ -1,459 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// VP8Iterator: block iterator -// -// Author: Skal (pascal.massimino@gmail.com) - -#include - -#include "src/enc/vp8i_enc.h" - -//------------------------------------------------------------------------------ -// VP8Iterator -//------------------------------------------------------------------------------ - -static void InitLeft(VP8EncIterator* const it) { - it->y_left_[-1] = it->u_left_[-1] = it->v_left_[-1] = - (it->y_ > 0) ? 129 : 127; - memset(it->y_left_, 129, 16); - memset(it->u_left_, 129, 8); - memset(it->v_left_, 129, 8); - it->left_nz_[8] = 0; - if (it->top_derr_ != NULL) { - memset(&it->left_derr_, 0, sizeof(it->left_derr_)); - } -} - -static void InitTop(VP8EncIterator* const it) { - const VP8Encoder* const enc = it->enc_; - const size_t top_size = enc->mb_w_ * 16; - memset(enc->y_top_, 127, 2 * top_size); - memset(enc->nz_, 0, enc->mb_w_ * sizeof(*enc->nz_)); - if (enc->top_derr_ != NULL) { - memset(enc->top_derr_, 0, enc->mb_w_ * sizeof(*enc->top_derr_)); - } -} - -void VP8IteratorSetRow(VP8EncIterator* const it, int y) { - VP8Encoder* const enc = it->enc_; - it->x_ = 0; - it->y_ = y; - it->bw_ = &enc->parts_[y & (enc->num_parts_ - 1)]; - it->preds_ = enc->preds_ + y * 4 * enc->preds_w_; - it->nz_ = enc->nz_; - it->mb_ = enc->mb_info_ + y * enc->mb_w_; - it->y_top_ = enc->y_top_; - it->uv_top_ = enc->uv_top_; - InitLeft(it); -} - -void VP8IteratorReset(VP8EncIterator* const it) { - VP8Encoder* const enc = it->enc_; - VP8IteratorSetRow(it, 0); - VP8IteratorSetCountDown(it, enc->mb_w_ * enc->mb_h_); // default - InitTop(it); - memset(it->bit_count_, 0, sizeof(it->bit_count_)); - it->do_trellis_ = 0; -} - -void VP8IteratorSetCountDown(VP8EncIterator* const it, int count_down) { - it->count_down_ = it->count_down0_ = count_down; -} - -int VP8IteratorIsDone(const VP8EncIterator* const it) { - return (it->count_down_ <= 0); -} - -void VP8IteratorInit(VP8Encoder* const enc, VP8EncIterator* const it) { - it->enc_ = enc; - it->yuv_in_ = (uint8_t*)WEBP_ALIGN(it->yuv_mem_); - it->yuv_out_ = it->yuv_in_ + YUV_SIZE_ENC; - it->yuv_out2_ = it->yuv_out_ + YUV_SIZE_ENC; - it->yuv_p_ = it->yuv_out2_ + YUV_SIZE_ENC; - it->lf_stats_ = enc->lf_stats_; - it->percent0_ = enc->percent_; - it->y_left_ = (uint8_t*)WEBP_ALIGN(it->yuv_left_mem_ + 1); - it->u_left_ = it->y_left_ + 16 + 16; - it->v_left_ = it->u_left_ + 16; - it->top_derr_ = enc->top_derr_; - VP8IteratorReset(it); -} - -int VP8IteratorProgress(const VP8EncIterator* const it, int delta) { - VP8Encoder* const enc = it->enc_; - if (delta && enc->pic_->progress_hook != NULL) { - const int done = it->count_down0_ - it->count_down_; - const int percent = (it->count_down0_ <= 0) - ? it->percent0_ - : it->percent0_ + delta * done / it->count_down0_; - return WebPReportProgress(enc->pic_, percent, &enc->percent_); - } - return 1; -} - -//------------------------------------------------------------------------------ -// Import the source samples into the cache. Takes care of replicating -// boundary pixels if necessary. - -static WEBP_INLINE int MinSize(int a, int b) { return (a < b) ? a : b; } - -static void ImportBlock(const uint8_t* src, int src_stride, - uint8_t* dst, int w, int h, int size) { - int i; - for (i = 0; i < h; ++i) { - memcpy(dst, src, w); - if (w < size) { - memset(dst + w, dst[w - 1], size - w); - } - dst += BPS; - src += src_stride; - } - for (i = h; i < size; ++i) { - memcpy(dst, dst - BPS, size); - dst += BPS; - } -} - -static void ImportLine(const uint8_t* src, int src_stride, - uint8_t* dst, int len, int total_len) { - int i; - for (i = 0; i < len; ++i, src += src_stride) dst[i] = *src; - for (; i < total_len; ++i) dst[i] = dst[len - 1]; -} - -void VP8IteratorImport(VP8EncIterator* const it, uint8_t* tmp_32) { - const VP8Encoder* const enc = it->enc_; - const int x = it->x_, y = it->y_; - const WebPPicture* const pic = enc->pic_; - const uint8_t* const ysrc = pic->y + (y * pic->y_stride + x) * 16; - const uint8_t* const usrc = pic->u + (y * pic->uv_stride + x) * 8; - const uint8_t* const vsrc = pic->v + (y * pic->uv_stride + x) * 8; - const int w = MinSize(pic->width - x * 16, 16); - const int h = MinSize(pic->height - y * 16, 16); - const int uv_w = (w + 1) >> 1; - const int uv_h = (h + 1) >> 1; - - ImportBlock(ysrc, pic->y_stride, it->yuv_in_ + Y_OFF_ENC, w, h, 16); - ImportBlock(usrc, pic->uv_stride, it->yuv_in_ + U_OFF_ENC, uv_w, uv_h, 8); - ImportBlock(vsrc, pic->uv_stride, it->yuv_in_ + V_OFF_ENC, uv_w, uv_h, 8); - - if (tmp_32 == NULL) return; - - // Import source (uncompressed) samples into boundary. - if (x == 0) { - InitLeft(it); - } else { - if (y == 0) { - it->y_left_[-1] = it->u_left_[-1] = it->v_left_[-1] = 127; - } else { - it->y_left_[-1] = ysrc[- 1 - pic->y_stride]; - it->u_left_[-1] = usrc[- 1 - pic->uv_stride]; - it->v_left_[-1] = vsrc[- 1 - pic->uv_stride]; - } - ImportLine(ysrc - 1, pic->y_stride, it->y_left_, h, 16); - ImportLine(usrc - 1, pic->uv_stride, it->u_left_, uv_h, 8); - ImportLine(vsrc - 1, pic->uv_stride, it->v_left_, uv_h, 8); - } - - it->y_top_ = tmp_32 + 0; - it->uv_top_ = tmp_32 + 16; - if (y == 0) { - memset(tmp_32, 127, 32 * sizeof(*tmp_32)); - } else { - ImportLine(ysrc - pic->y_stride, 1, tmp_32, w, 16); - ImportLine(usrc - pic->uv_stride, 1, tmp_32 + 16, uv_w, 8); - ImportLine(vsrc - pic->uv_stride, 1, tmp_32 + 16 + 8, uv_w, 8); - } -} - -//------------------------------------------------------------------------------ -// Copy back the compressed samples into user space if requested. - -static void ExportBlock(const uint8_t* src, uint8_t* dst, int dst_stride, - int w, int h) { - while (h-- > 0) { - memcpy(dst, src, w); - dst += dst_stride; - src += BPS; - } -} - -void VP8IteratorExport(const VP8EncIterator* const it) { - const VP8Encoder* const enc = it->enc_; - if (enc->config_->show_compressed) { - const int x = it->x_, y = it->y_; - const uint8_t* const ysrc = it->yuv_out_ + Y_OFF_ENC; - const uint8_t* const usrc = it->yuv_out_ + U_OFF_ENC; - const uint8_t* const vsrc = it->yuv_out_ + V_OFF_ENC; - const WebPPicture* const pic = enc->pic_; - uint8_t* const ydst = pic->y + (y * pic->y_stride + x) * 16; - uint8_t* const udst = pic->u + (y * pic->uv_stride + x) * 8; - uint8_t* const vdst = pic->v + (y * pic->uv_stride + x) * 8; - int w = (pic->width - x * 16); - int h = (pic->height - y * 16); - - if (w > 16) w = 16; - if (h > 16) h = 16; - - // Luma plane - ExportBlock(ysrc, ydst, pic->y_stride, w, h); - - { // U/V planes - const int uv_w = (w + 1) >> 1; - const int uv_h = (h + 1) >> 1; - ExportBlock(usrc, udst, pic->uv_stride, uv_w, uv_h); - ExportBlock(vsrc, vdst, pic->uv_stride, uv_w, uv_h); - } - } -} - -//------------------------------------------------------------------------------ -// Non-zero contexts setup/teardown - -// Nz bits: -// 0 1 2 3 Y -// 4 5 6 7 -// 8 9 10 11 -// 12 13 14 15 -// 16 17 U -// 18 19 -// 20 21 V -// 22 23 -// 24 DC-intra16 - -// Convert packed context to byte array -#define BIT(nz, n) (!!((nz) & (1 << (n)))) - -void VP8IteratorNzToBytes(VP8EncIterator* const it) { - const int tnz = it->nz_[0], lnz = it->nz_[-1]; - int* const top_nz = it->top_nz_; - int* const left_nz = it->left_nz_; - - // Top-Y - top_nz[0] = BIT(tnz, 12); - top_nz[1] = BIT(tnz, 13); - top_nz[2] = BIT(tnz, 14); - top_nz[3] = BIT(tnz, 15); - // Top-U - top_nz[4] = BIT(tnz, 18); - top_nz[5] = BIT(tnz, 19); - // Top-V - top_nz[6] = BIT(tnz, 22); - top_nz[7] = BIT(tnz, 23); - // DC - top_nz[8] = BIT(tnz, 24); - - // left-Y - left_nz[0] = BIT(lnz, 3); - left_nz[1] = BIT(lnz, 7); - left_nz[2] = BIT(lnz, 11); - left_nz[3] = BIT(lnz, 15); - // left-U - left_nz[4] = BIT(lnz, 17); - left_nz[5] = BIT(lnz, 19); - // left-V - left_nz[6] = BIT(lnz, 21); - left_nz[7] = BIT(lnz, 23); - // left-DC is special, iterated separately -} - -void VP8IteratorBytesToNz(VP8EncIterator* const it) { - uint32_t nz = 0; - const int* const top_nz = it->top_nz_; - const int* const left_nz = it->left_nz_; - // top - nz |= (top_nz[0] << 12) | (top_nz[1] << 13); - nz |= (top_nz[2] << 14) | (top_nz[3] << 15); - nz |= (top_nz[4] << 18) | (top_nz[5] << 19); - nz |= (top_nz[6] << 22) | (top_nz[7] << 23); - nz |= (top_nz[8] << 24); // we propagate the _top_ bit, esp. for intra4 - // left - nz |= (left_nz[0] << 3) | (left_nz[1] << 7); - nz |= (left_nz[2] << 11); - nz |= (left_nz[4] << 17) | (left_nz[6] << 21); - - *it->nz_ = nz; -} - -#undef BIT - -//------------------------------------------------------------------------------ -// Advance to the next position, doing the bookkeeping. - -void VP8IteratorSaveBoundary(VP8EncIterator* const it) { - VP8Encoder* const enc = it->enc_; - const int x = it->x_, y = it->y_; - const uint8_t* const ysrc = it->yuv_out_ + Y_OFF_ENC; - const uint8_t* const uvsrc = it->yuv_out_ + U_OFF_ENC; - if (x < enc->mb_w_ - 1) { // left - int i; - for (i = 0; i < 16; ++i) { - it->y_left_[i] = ysrc[15 + i * BPS]; - } - for (i = 0; i < 8; ++i) { - it->u_left_[i] = uvsrc[7 + i * BPS]; - it->v_left_[i] = uvsrc[15 + i * BPS]; - } - // top-left (before 'top'!) - it->y_left_[-1] = it->y_top_[15]; - it->u_left_[-1] = it->uv_top_[0 + 7]; - it->v_left_[-1] = it->uv_top_[8 + 7]; - } - if (y < enc->mb_h_ - 1) { // top - memcpy(it->y_top_, ysrc + 15 * BPS, 16); - memcpy(it->uv_top_, uvsrc + 7 * BPS, 8 + 8); - } -} - -int VP8IteratorNext(VP8EncIterator* const it) { - if (++it->x_ == it->enc_->mb_w_) { - VP8IteratorSetRow(it, ++it->y_); - } else { - it->preds_ += 4; - it->mb_ += 1; - it->nz_ += 1; - it->y_top_ += 16; - it->uv_top_ += 16; - } - return (0 < --it->count_down_); -} - -//------------------------------------------------------------------------------ -// Helper function to set mode properties - -void VP8SetIntra16Mode(const VP8EncIterator* const it, int mode) { - uint8_t* preds = it->preds_; - int y; - for (y = 0; y < 4; ++y) { - memset(preds, mode, 4); - preds += it->enc_->preds_w_; - } - it->mb_->type_ = 1; -} - -void VP8SetIntra4Mode(const VP8EncIterator* const it, const uint8_t* modes) { - uint8_t* preds = it->preds_; - int y; - for (y = 4; y > 0; --y) { - memcpy(preds, modes, 4 * sizeof(*modes)); - preds += it->enc_->preds_w_; - modes += 4; - } - it->mb_->type_ = 0; -} - -void VP8SetIntraUVMode(const VP8EncIterator* const it, int mode) { - it->mb_->uv_mode_ = mode; -} - -void VP8SetSkip(const VP8EncIterator* const it, int skip) { - it->mb_->skip_ = skip; -} - -void VP8SetSegment(const VP8EncIterator* const it, int segment) { - it->mb_->segment_ = segment; -} - -//------------------------------------------------------------------------------ -// Intra4x4 sub-blocks iteration -// -// We store and update the boundary samples into an array of 37 pixels. They -// are updated as we iterate and reconstructs each intra4x4 blocks in turn. -// The position of the samples has the following snake pattern: -// -// 16|17 18 19 20|21 22 23 24|25 26 27 28|29 30 31 32|33 34 35 36 <- Top-right -// --+-----------+-----------+-----------+-----------+ -// 15| 19| 23| 27| 31| -// 14| 18| 22| 26| 30| -// 13| 17| 21| 25| 29| -// 12|13 14 15 16|17 18 19 20|21 22 23 24|25 26 27 28| -// --+-----------+-----------+-----------+-----------+ -// 11| 15| 19| 23| 27| -// 10| 14| 18| 22| 26| -// 9| 13| 17| 21| 25| -// 8| 9 10 11 12|13 14 15 16|17 18 19 20|21 22 23 24| -// --+-----------+-----------+-----------+-----------+ -// 7| 11| 15| 19| 23| -// 6| 10| 14| 18| 22| -// 5| 9| 13| 17| 21| -// 4| 5 6 7 8| 9 10 11 12|13 14 15 16|17 18 19 20| -// --+-----------+-----------+-----------+-----------+ -// 3| 7| 11| 15| 19| -// 2| 6| 10| 14| 18| -// 1| 5| 9| 13| 17| -// 0| 1 2 3 4| 5 6 7 8| 9 10 11 12|13 14 15 16| -// --+-----------+-----------+-----------+-----------+ - -// Array to record the position of the top sample to pass to the prediction -// functions in dsp.c. -static const uint8_t VP8TopLeftI4[16] = { - 17, 21, 25, 29, - 13, 17, 21, 25, - 9, 13, 17, 21, - 5, 9, 13, 17 -}; - -void VP8IteratorStartI4(VP8EncIterator* const it) { - const VP8Encoder* const enc = it->enc_; - int i; - - it->i4_ = 0; // first 4x4 sub-block - it->i4_top_ = it->i4_boundary_ + VP8TopLeftI4[0]; - - // Import the boundary samples - for (i = 0; i < 17; ++i) { // left - it->i4_boundary_[i] = it->y_left_[15 - i]; - } - for (i = 0; i < 16; ++i) { // top - it->i4_boundary_[17 + i] = it->y_top_[i]; - } - // top-right samples have a special case on the far right of the picture - if (it->x_ < enc->mb_w_ - 1) { - for (i = 16; i < 16 + 4; ++i) { - it->i4_boundary_[17 + i] = it->y_top_[i]; - } - } else { // else, replicate the last valid pixel four times - for (i = 16; i < 16 + 4; ++i) { - it->i4_boundary_[17 + i] = it->i4_boundary_[17 + 15]; - } - } - VP8IteratorNzToBytes(it); // import the non-zero context -} - -int VP8IteratorRotateI4(VP8EncIterator* const it, - const uint8_t* const yuv_out) { - const uint8_t* const blk = yuv_out + VP8Scan[it->i4_]; - uint8_t* const top = it->i4_top_; - int i; - - // Update the cache with 7 fresh samples - for (i = 0; i <= 3; ++i) { - top[-4 + i] = blk[i + 3 * BPS]; // store future top samples - } - if ((it->i4_ & 3) != 3) { // if not on the right sub-blocks #3, #7, #11, #15 - for (i = 0; i <= 2; ++i) { // store future left samples - top[i] = blk[3 + (2 - i) * BPS]; - } - } else { // else replicate top-right samples, as says the specs. - for (i = 0; i <= 3; ++i) { - top[i] = top[i + 4]; - } - } - // move pointers to next sub-block - ++it->i4_; - if (it->i4_ == 16) { // we're done - return 0; - } - - it->i4_top_ = it->i4_boundary_ + VP8TopLeftI4[it->i4_]; - return 1; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/near_lossless_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/near_lossless_enc.c deleted file mode 100644 index df23c25..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/near_lossless_enc.c +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Near-lossless image preprocessing adjusts pixel values to help -// compressibility with a guarantee of maximum deviation between original and -// resulting pixel values. -// -// Author: Jyrki Alakuijala (jyrki@google.com) -// Converted to C by Aleksander Kramarz (akramarz@google.com) - -#include -#include - -#include "src/dsp/lossless_common.h" -#include "src/utils/utils.h" -#include "src/enc/vp8li_enc.h" - -#if (WEBP_NEAR_LOSSLESS == 1) - -#define MIN_DIM_FOR_NEAR_LOSSLESS 64 -#define MAX_LIMIT_BITS 5 - -// Quantizes the value up or down to a multiple of 1<> 1) + ((a >> bits) & 1); - assert(bits > 0); - if (biased > 0xff) return 0xff; - return biased & ~mask; -} - -// Applies FindClosestDiscretized to all channels of pixel. -static uint32_t ClosestDiscretizedArgb(uint32_t a, int bits) { - return - (FindClosestDiscretized(a >> 24, bits) << 24) | - (FindClosestDiscretized((a >> 16) & 0xff, bits) << 16) | - (FindClosestDiscretized((a >> 8) & 0xff, bits) << 8) | - (FindClosestDiscretized(a & 0xff, bits)); -} - -// Checks if distance between corresponding channel values of pixels a and b -// is within the given limit. -static int IsNear(uint32_t a, uint32_t b, int limit) { - int k; - for (k = 0; k < 4; ++k) { - const int delta = - (int)((a >> (k * 8)) & 0xff) - (int)((b >> (k * 8)) & 0xff); - if (delta >= limit || delta <= -limit) { - return 0; - } - } - return 1; -} - -static int IsSmooth(const uint32_t* const prev_row, - const uint32_t* const curr_row, - const uint32_t* const next_row, - int ix, int limit) { - // Check that all pixels in 4-connected neighborhood are smooth. - return (IsNear(curr_row[ix], curr_row[ix - 1], limit) && - IsNear(curr_row[ix], curr_row[ix + 1], limit) && - IsNear(curr_row[ix], prev_row[ix], limit) && - IsNear(curr_row[ix], next_row[ix], limit)); -} - -// Adjusts pixel values of image with given maximum error. -static void NearLossless(int xsize, int ysize, const uint32_t* argb_src, - int stride, int limit_bits, uint32_t* copy_buffer, - uint32_t* argb_dst) { - int x, y; - const int limit = 1 << limit_bits; - uint32_t* prev_row = copy_buffer; - uint32_t* curr_row = prev_row + xsize; - uint32_t* next_row = curr_row + xsize; - memcpy(curr_row, argb_src, xsize * sizeof(argb_src[0])); - memcpy(next_row, argb_src + stride, xsize * sizeof(argb_src[0])); - - for (y = 0; y < ysize; ++y, argb_src += stride, argb_dst += xsize) { - if (y == 0 || y == ysize - 1) { - memcpy(argb_dst, argb_src, xsize * sizeof(argb_src[0])); - } else { - memcpy(next_row, argb_src + stride, xsize * sizeof(argb_src[0])); - argb_dst[0] = argb_src[0]; - argb_dst[xsize - 1] = argb_src[xsize - 1]; - for (x = 1; x < xsize - 1; ++x) { - if (IsSmooth(prev_row, curr_row, next_row, x, limit)) { - argb_dst[x] = curr_row[x]; - } else { - argb_dst[x] = ClosestDiscretizedArgb(curr_row[x], limit_bits); - } - } - } - { - // Three-way swap. - uint32_t* const temp = prev_row; - prev_row = curr_row; - curr_row = next_row; - next_row = temp; - } - } -} - -int VP8ApplyNearLossless(const WebPPicture* const picture, int quality, - uint32_t* const argb_dst) { - int i; - const int xsize = picture->width; - const int ysize = picture->height; - const int stride = picture->argb_stride; - uint32_t* const copy_buffer = - (uint32_t*)WebPSafeMalloc(xsize * 3, sizeof(*copy_buffer)); - const int limit_bits = VP8LNearLosslessBits(quality); - assert(argb_dst != NULL); - assert(limit_bits > 0); - assert(limit_bits <= MAX_LIMIT_BITS); - if (copy_buffer == NULL) { - return 0; - } - // For small icon images, don't attempt to apply near-lossless compression. - if ((xsize < MIN_DIM_FOR_NEAR_LOSSLESS && - ysize < MIN_DIM_FOR_NEAR_LOSSLESS) || - ysize < 3) { - for (i = 0; i < ysize; ++i) { - memcpy(argb_dst + i * xsize, picture->argb + i * picture->argb_stride, - xsize * sizeof(*argb_dst)); - } - WebPSafeFree(copy_buffer); - return 1; - } - - NearLossless(xsize, ysize, picture->argb, stride, limit_bits, copy_buffer, - argb_dst); - for (i = limit_bits - 1; i != 0; --i) { - NearLossless(xsize, ysize, argb_dst, xsize, i, copy_buffer, argb_dst); - } - WebPSafeFree(copy_buffer); - return 1; -} -#else // (WEBP_NEAR_LOSSLESS == 1) - -// Define a stub to suppress compiler warnings. -extern void VP8LNearLosslessStub(void); -void VP8LNearLosslessStub(void) {} - -#endif // (WEBP_NEAR_LOSSLESS == 1) diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_csp_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_csp_enc.c deleted file mode 100644 index e202350..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_csp_enc.c +++ /dev/null @@ -1,1206 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// WebPPicture utils for colorspace conversion -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include -#include - -#include "src/enc/vp8i_enc.h" -#include "src/utils/random_utils.h" -#include "src/utils/utils.h" -#include "src/dsp/dsp.h" -#include "src/dsp/lossless.h" -#include "src/dsp/yuv.h" - -// Uncomment to disable gamma-compression during RGB->U/V averaging -#define USE_GAMMA_COMPRESSION - -// If defined, use table to compute x / alpha. -#define USE_INVERSE_ALPHA_TABLE - -#ifdef WORDS_BIGENDIAN -#define ALPHA_OFFSET 0 // uint32_t 0xff000000 is 0xff,00,00,00 in memory -#else -#define ALPHA_OFFSET 3 // uint32_t 0xff000000 is 0x00,00,00,ff in memory -#endif - -//------------------------------------------------------------------------------ -// Detection of non-trivial transparency - -// Returns true if alpha[] has non-0xff values. -static int CheckNonOpaque(const uint8_t* alpha, int width, int height, - int x_step, int y_step) { - if (alpha == NULL) return 0; - WebPInitAlphaProcessing(); - if (x_step == 1) { - for (; height-- > 0; alpha += y_step) { - if (WebPHasAlpha8b(alpha, width)) return 1; - } - } else { - for (; height-- > 0; alpha += y_step) { - if (WebPHasAlpha32b(alpha, width)) return 1; - } - } - return 0; -} - -// Checking for the presence of non-opaque alpha. -int WebPPictureHasTransparency(const WebPPicture* picture) { - if (picture == NULL) return 0; - if (!picture->use_argb) { - return CheckNonOpaque(picture->a, picture->width, picture->height, - 1, picture->a_stride); - } else { - const int alpha_offset = ALPHA_OFFSET; - return CheckNonOpaque((const uint8_t*)picture->argb + alpha_offset, - picture->width, picture->height, - 4, picture->argb_stride * sizeof(*picture->argb)); - } - return 0; -} - -//------------------------------------------------------------------------------ -// Code for gamma correction - -#if defined(USE_GAMMA_COMPRESSION) - -// gamma-compensates loss of resolution during chroma subsampling -#define kGamma 0.80 // for now we use a different gamma value than kGammaF -#define kGammaFix 12 // fixed-point precision for linear values -#define kGammaScale ((1 << kGammaFix) - 1) -#define kGammaTabFix 7 // fixed-point fractional bits precision -#define kGammaTabScale (1 << kGammaTabFix) -#define kGammaTabRounder (kGammaTabScale >> 1) -#define kGammaTabSize (1 << (kGammaFix - kGammaTabFix)) - -static int kLinearToGammaTab[kGammaTabSize + 1]; -static uint16_t kGammaToLinearTab[256]; -static volatile int kGammaTablesOk = 0; - -static WEBP_TSAN_IGNORE_FUNCTION void InitGammaTables(void) { - if (!kGammaTablesOk) { - int v; - const double scale = (double)(1 << kGammaTabFix) / kGammaScale; - const double norm = 1. / 255.; - for (v = 0; v <= 255; ++v) { - kGammaToLinearTab[v] = - (uint16_t)(pow(norm * v, kGamma) * kGammaScale + .5); - } - for (v = 0; v <= kGammaTabSize; ++v) { - kLinearToGammaTab[v] = (int)(255. * pow(scale * v, 1. / kGamma) + .5); - } - kGammaTablesOk = 1; - } -} - -static WEBP_INLINE uint32_t GammaToLinear(uint8_t v) { - return kGammaToLinearTab[v]; -} - -static WEBP_INLINE int Interpolate(int v) { - const int tab_pos = v >> (kGammaTabFix + 2); // integer part - const int x = v & ((kGammaTabScale << 2) - 1); // fractional part - const int v0 = kLinearToGammaTab[tab_pos]; - const int v1 = kLinearToGammaTab[tab_pos + 1]; - const int y = v1 * x + v0 * ((kGammaTabScale << 2) - x); // interpolate - assert(tab_pos + 1 < kGammaTabSize + 1); - return y; -} - -// Convert a linear value 'v' to YUV_FIX+2 fixed-point precision -// U/V value, suitable for RGBToU/V calls. -static WEBP_INLINE int LinearToGamma(uint32_t base_value, int shift) { - const int y = Interpolate(base_value << shift); // final uplifted value - return (y + kGammaTabRounder) >> kGammaTabFix; // descale -} - -#else - -static void InitGammaTables(void) {} -static WEBP_INLINE uint32_t GammaToLinear(uint8_t v) { return v; } -static WEBP_INLINE int LinearToGamma(uint32_t base_value, int shift) { - return (int)(base_value << shift); -} - -#endif // USE_GAMMA_COMPRESSION - -//------------------------------------------------------------------------------ -// RGB -> YUV conversion - -static int RGBToY(int r, int g, int b, VP8Random* const rg) { - return (rg == NULL) ? VP8RGBToY(r, g, b, YUV_HALF) - : VP8RGBToY(r, g, b, VP8RandomBits(rg, YUV_FIX)); -} - -static int RGBToU(int r, int g, int b, VP8Random* const rg) { - return (rg == NULL) ? VP8RGBToU(r, g, b, YUV_HALF << 2) - : VP8RGBToU(r, g, b, VP8RandomBits(rg, YUV_FIX + 2)); -} - -static int RGBToV(int r, int g, int b, VP8Random* const rg) { - return (rg == NULL) ? VP8RGBToV(r, g, b, YUV_HALF << 2) - : VP8RGBToV(r, g, b, VP8RandomBits(rg, YUV_FIX + 2)); -} - -//------------------------------------------------------------------------------ -// Sharp RGB->YUV conversion - -static const int kNumIterations = 4; -static const int kMinDimensionIterativeConversion = 4; - -// We could use SFIX=0 and only uint8_t for fixed_y_t, but it produces some -// banding sometimes. Better use extra precision. -#define SFIX 2 // fixed-point precision of RGB and Y/W -typedef int16_t fixed_t; // signed type with extra SFIX precision for UV -typedef uint16_t fixed_y_t; // unsigned type with extra SFIX precision for W - -#define SHALF (1 << SFIX >> 1) -#define MAX_Y_T ((256 << SFIX) - 1) -#define SROUNDER (1 << (YUV_FIX + SFIX - 1)) - -#if defined(USE_GAMMA_COMPRESSION) - -// We use tables of different size and precision for the Rec709 / BT2020 -// transfer function. -#define kGammaF (1./0.45) -static uint32_t kLinearToGammaTabS[kGammaTabSize + 2]; -#define GAMMA_TO_LINEAR_BITS 14 -static uint32_t kGammaToLinearTabS[MAX_Y_T + 1]; // size scales with Y_FIX -static volatile int kGammaTablesSOk = 0; - -static WEBP_TSAN_IGNORE_FUNCTION void InitGammaTablesS(void) { - assert(2 * GAMMA_TO_LINEAR_BITS < 32); // we use uint32_t intermediate values - if (!kGammaTablesSOk) { - int v; - const double norm = 1. / MAX_Y_T; - const double scale = 1. / kGammaTabSize; - const double a = 0.09929682680944; - const double thresh = 0.018053968510807; - const double final_scale = 1 << GAMMA_TO_LINEAR_BITS; - for (v = 0; v <= MAX_Y_T; ++v) { - const double g = norm * v; - double value; - if (g <= thresh * 4.5) { - value = g / 4.5; - } else { - const double a_rec = 1. / (1. + a); - value = pow(a_rec * (g + a), kGammaF); - } - kGammaToLinearTabS[v] = (uint32_t)(value * final_scale + .5); - } - for (v = 0; v <= kGammaTabSize; ++v) { - const double g = scale * v; - double value; - if (g <= thresh) { - value = 4.5 * g; - } else { - value = (1. + a) * pow(g, 1. / kGammaF) - a; - } - // we already incorporate the 1/2 rounding constant here - kLinearToGammaTabS[v] = - (uint32_t)(MAX_Y_T * value) + (1 << GAMMA_TO_LINEAR_BITS >> 1); - } - // to prevent small rounding errors to cause read-overflow: - kLinearToGammaTabS[kGammaTabSize + 1] = kLinearToGammaTabS[kGammaTabSize]; - kGammaTablesSOk = 1; - } -} - -// return value has a fixed-point precision of GAMMA_TO_LINEAR_BITS -static WEBP_INLINE uint32_t GammaToLinearS(int v) { - return kGammaToLinearTabS[v]; -} - -static WEBP_INLINE uint32_t LinearToGammaS(uint32_t value) { - // 'value' is in GAMMA_TO_LINEAR_BITS fractional precision - const uint32_t v = value * kGammaTabSize; - const uint32_t tab_pos = v >> GAMMA_TO_LINEAR_BITS; - // fractional part, in GAMMA_TO_LINEAR_BITS fixed-point precision - const uint32_t x = v - (tab_pos << GAMMA_TO_LINEAR_BITS); // fractional part - // v0 / v1 are in GAMMA_TO_LINEAR_BITS fixed-point precision (range [0..1]) - const uint32_t v0 = kLinearToGammaTabS[tab_pos + 0]; - const uint32_t v1 = kLinearToGammaTabS[tab_pos + 1]; - // Final interpolation. Note that rounding is already included. - const uint32_t v2 = (v1 - v0) * x; // note: v1 >= v0. - const uint32_t result = v0 + (v2 >> GAMMA_TO_LINEAR_BITS); - return result; -} - -#else - -static void InitGammaTablesS(void) {} -static WEBP_INLINE uint32_t GammaToLinearS(int v) { - return (v << GAMMA_TO_LINEAR_BITS) / MAX_Y_T; -} -static WEBP_INLINE uint32_t LinearToGammaS(uint32_t value) { - return (MAX_Y_T * value) >> GAMMA_TO_LINEAR_BITS; -} - -#endif // USE_GAMMA_COMPRESSION - -//------------------------------------------------------------------------------ - -static uint8_t clip_8b(fixed_t v) { - return (!(v & ~0xff)) ? (uint8_t)v : (v < 0) ? 0u : 255u; -} - -static fixed_y_t clip_y(int y) { - return (!(y & ~MAX_Y_T)) ? (fixed_y_t)y : (y < 0) ? 0 : MAX_Y_T; -} - -//------------------------------------------------------------------------------ - -static int RGBToGray(int r, int g, int b) { - const int luma = 13933 * r + 46871 * g + 4732 * b + YUV_HALF; - return (luma >> YUV_FIX); -} - -static uint32_t ScaleDown(int a, int b, int c, int d) { - const uint32_t A = GammaToLinearS(a); - const uint32_t B = GammaToLinearS(b); - const uint32_t C = GammaToLinearS(c); - const uint32_t D = GammaToLinearS(d); - return LinearToGammaS((A + B + C + D + 2) >> 2); -} - -static WEBP_INLINE void UpdateW(const fixed_y_t* src, fixed_y_t* dst, int w) { - int i; - for (i = 0; i < w; ++i) { - const uint32_t R = GammaToLinearS(src[0 * w + i]); - const uint32_t G = GammaToLinearS(src[1 * w + i]); - const uint32_t B = GammaToLinearS(src[2 * w + i]); - const uint32_t Y = RGBToGray(R, G, B); - dst[i] = (fixed_y_t)LinearToGammaS(Y); - } -} - -static void UpdateChroma(const fixed_y_t* src1, const fixed_y_t* src2, - fixed_t* dst, int uv_w) { - int i; - for (i = 0; i < uv_w; ++i) { - const int r = ScaleDown(src1[0 * uv_w + 0], src1[0 * uv_w + 1], - src2[0 * uv_w + 0], src2[0 * uv_w + 1]); - const int g = ScaleDown(src1[2 * uv_w + 0], src1[2 * uv_w + 1], - src2[2 * uv_w + 0], src2[2 * uv_w + 1]); - const int b = ScaleDown(src1[4 * uv_w + 0], src1[4 * uv_w + 1], - src2[4 * uv_w + 0], src2[4 * uv_w + 1]); - const int W = RGBToGray(r, g, b); - dst[0 * uv_w] = (fixed_t)(r - W); - dst[1 * uv_w] = (fixed_t)(g - W); - dst[2 * uv_w] = (fixed_t)(b - W); - dst += 1; - src1 += 2; - src2 += 2; - } -} - -static void StoreGray(const fixed_y_t* rgb, fixed_y_t* y, int w) { - int i; - for (i = 0; i < w; ++i) { - y[i] = RGBToGray(rgb[0 * w + i], rgb[1 * w + i], rgb[2 * w + i]); - } -} - -//------------------------------------------------------------------------------ - -static WEBP_INLINE fixed_y_t Filter2(int A, int B, int W0) { - const int v0 = (A * 3 + B + 2) >> 2; - return clip_y(v0 + W0); -} - -//------------------------------------------------------------------------------ - -static WEBP_INLINE fixed_y_t UpLift(uint8_t a) { // 8bit -> SFIX - return ((fixed_y_t)a << SFIX) | SHALF; -} - -static void ImportOneRow(const uint8_t* const r_ptr, - const uint8_t* const g_ptr, - const uint8_t* const b_ptr, - int step, - int pic_width, - fixed_y_t* const dst) { - int i; - const int w = (pic_width + 1) & ~1; - for (i = 0; i < pic_width; ++i) { - const int off = i * step; - dst[i + 0 * w] = UpLift(r_ptr[off]); - dst[i + 1 * w] = UpLift(g_ptr[off]); - dst[i + 2 * w] = UpLift(b_ptr[off]); - } - if (pic_width & 1) { // replicate rightmost pixel - dst[pic_width + 0 * w] = dst[pic_width + 0 * w - 1]; - dst[pic_width + 1 * w] = dst[pic_width + 1 * w - 1]; - dst[pic_width + 2 * w] = dst[pic_width + 2 * w - 1]; - } -} - -static void InterpolateTwoRows(const fixed_y_t* const best_y, - const fixed_t* prev_uv, - const fixed_t* cur_uv, - const fixed_t* next_uv, - int w, - fixed_y_t* out1, - fixed_y_t* out2) { - const int uv_w = w >> 1; - const int len = (w - 1) >> 1; // length to filter - int k = 3; - while (k-- > 0) { // process each R/G/B segments in turn - // special boundary case for i==0 - out1[0] = Filter2(cur_uv[0], prev_uv[0], best_y[0]); - out2[0] = Filter2(cur_uv[0], next_uv[0], best_y[w]); - - WebPSharpYUVFilterRow(cur_uv, prev_uv, len, best_y + 0 + 1, out1 + 1); - WebPSharpYUVFilterRow(cur_uv, next_uv, len, best_y + w + 1, out2 + 1); - - // special boundary case for i == w - 1 when w is even - if (!(w & 1)) { - out1[w - 1] = Filter2(cur_uv[uv_w - 1], prev_uv[uv_w - 1], - best_y[w - 1 + 0]); - out2[w - 1] = Filter2(cur_uv[uv_w - 1], next_uv[uv_w - 1], - best_y[w - 1 + w]); - } - out1 += w; - out2 += w; - prev_uv += uv_w; - cur_uv += uv_w; - next_uv += uv_w; - } -} - -static WEBP_INLINE uint8_t ConvertRGBToY(int r, int g, int b) { - const int luma = 16839 * r + 33059 * g + 6420 * b + SROUNDER; - return clip_8b(16 + (luma >> (YUV_FIX + SFIX))); -} - -static WEBP_INLINE uint8_t ConvertRGBToU(int r, int g, int b) { - const int u = -9719 * r - 19081 * g + 28800 * b + SROUNDER; - return clip_8b(128 + (u >> (YUV_FIX + SFIX))); -} - -static WEBP_INLINE uint8_t ConvertRGBToV(int r, int g, int b) { - const int v = +28800 * r - 24116 * g - 4684 * b + SROUNDER; - return clip_8b(128 + (v >> (YUV_FIX + SFIX))); -} - -static int ConvertWRGBToYUV(const fixed_y_t* best_y, const fixed_t* best_uv, - WebPPicture* const picture) { - int i, j; - uint8_t* dst_y = picture->y; - uint8_t* dst_u = picture->u; - uint8_t* dst_v = picture->v; - const fixed_t* const best_uv_base = best_uv; - const int w = (picture->width + 1) & ~1; - const int h = (picture->height + 1) & ~1; - const int uv_w = w >> 1; - const int uv_h = h >> 1; - for (best_uv = best_uv_base, j = 0; j < picture->height; ++j) { - for (i = 0; i < picture->width; ++i) { - const int off = (i >> 1); - const int W = best_y[i]; - const int r = best_uv[off + 0 * uv_w] + W; - const int g = best_uv[off + 1 * uv_w] + W; - const int b = best_uv[off + 2 * uv_w] + W; - dst_y[i] = ConvertRGBToY(r, g, b); - } - best_y += w; - best_uv += (j & 1) * 3 * uv_w; - dst_y += picture->y_stride; - } - for (best_uv = best_uv_base, j = 0; j < uv_h; ++j) { - for (i = 0; i < uv_w; ++i) { - const int off = i; - const int r = best_uv[off + 0 * uv_w]; - const int g = best_uv[off + 1 * uv_w]; - const int b = best_uv[off + 2 * uv_w]; - dst_u[i] = ConvertRGBToU(r, g, b); - dst_v[i] = ConvertRGBToV(r, g, b); - } - best_uv += 3 * uv_w; - dst_u += picture->uv_stride; - dst_v += picture->uv_stride; - } - return 1; -} - -//------------------------------------------------------------------------------ -// Main function - -#define SAFE_ALLOC(W, H, T) ((T*)WebPSafeMalloc((W) * (H), sizeof(T))) - -static int PreprocessARGB(const uint8_t* r_ptr, - const uint8_t* g_ptr, - const uint8_t* b_ptr, - int step, int rgb_stride, - WebPPicture* const picture) { - // we expand the right/bottom border if needed - const int w = (picture->width + 1) & ~1; - const int h = (picture->height + 1) & ~1; - const int uv_w = w >> 1; - const int uv_h = h >> 1; - uint64_t prev_diff_y_sum = ~0; - int j, iter; - - // TODO(skal): allocate one big memory chunk. But for now, it's easier - // for valgrind debugging to have several chunks. - fixed_y_t* const tmp_buffer = SAFE_ALLOC(w * 3, 2, fixed_y_t); // scratch - fixed_y_t* const best_y_base = SAFE_ALLOC(w, h, fixed_y_t); - fixed_y_t* const target_y_base = SAFE_ALLOC(w, h, fixed_y_t); - fixed_y_t* const best_rgb_y = SAFE_ALLOC(w, 2, fixed_y_t); - fixed_t* const best_uv_base = SAFE_ALLOC(uv_w * 3, uv_h, fixed_t); - fixed_t* const target_uv_base = SAFE_ALLOC(uv_w * 3, uv_h, fixed_t); - fixed_t* const best_rgb_uv = SAFE_ALLOC(uv_w * 3, 1, fixed_t); - fixed_y_t* best_y = best_y_base; - fixed_y_t* target_y = target_y_base; - fixed_t* best_uv = best_uv_base; - fixed_t* target_uv = target_uv_base; - const uint64_t diff_y_threshold = (uint64_t)(3.0 * w * h); - int ok; - - if (best_y_base == NULL || best_uv_base == NULL || - target_y_base == NULL || target_uv_base == NULL || - best_rgb_y == NULL || best_rgb_uv == NULL || - tmp_buffer == NULL) { - ok = WebPEncodingSetError(picture, VP8_ENC_ERROR_OUT_OF_MEMORY); - goto End; - } - assert(picture->width >= kMinDimensionIterativeConversion); - assert(picture->height >= kMinDimensionIterativeConversion); - - WebPInitConvertARGBToYUV(); - - // Import RGB samples to W/RGB representation. - for (j = 0; j < picture->height; j += 2) { - const int is_last_row = (j == picture->height - 1); - fixed_y_t* const src1 = tmp_buffer + 0 * w; - fixed_y_t* const src2 = tmp_buffer + 3 * w; - - // prepare two rows of input - ImportOneRow(r_ptr, g_ptr, b_ptr, step, picture->width, src1); - if (!is_last_row) { - ImportOneRow(r_ptr + rgb_stride, g_ptr + rgb_stride, b_ptr + rgb_stride, - step, picture->width, src2); - } else { - memcpy(src2, src1, 3 * w * sizeof(*src2)); - } - StoreGray(src1, best_y + 0, w); - StoreGray(src2, best_y + w, w); - - UpdateW(src1, target_y, w); - UpdateW(src2, target_y + w, w); - UpdateChroma(src1, src2, target_uv, uv_w); - memcpy(best_uv, target_uv, 3 * uv_w * sizeof(*best_uv)); - best_y += 2 * w; - best_uv += 3 * uv_w; - target_y += 2 * w; - target_uv += 3 * uv_w; - r_ptr += 2 * rgb_stride; - g_ptr += 2 * rgb_stride; - b_ptr += 2 * rgb_stride; - } - - // Iterate and resolve clipping conflicts. - for (iter = 0; iter < kNumIterations; ++iter) { - const fixed_t* cur_uv = best_uv_base; - const fixed_t* prev_uv = best_uv_base; - uint64_t diff_y_sum = 0; - - best_y = best_y_base; - best_uv = best_uv_base; - target_y = target_y_base; - target_uv = target_uv_base; - for (j = 0; j < h; j += 2) { - fixed_y_t* const src1 = tmp_buffer + 0 * w; - fixed_y_t* const src2 = tmp_buffer + 3 * w; - { - const fixed_t* const next_uv = cur_uv + ((j < h - 2) ? 3 * uv_w : 0); - InterpolateTwoRows(best_y, prev_uv, cur_uv, next_uv, w, src1, src2); - prev_uv = cur_uv; - cur_uv = next_uv; - } - - UpdateW(src1, best_rgb_y + 0 * w, w); - UpdateW(src2, best_rgb_y + 1 * w, w); - UpdateChroma(src1, src2, best_rgb_uv, uv_w); - - // update two rows of Y and one row of RGB - diff_y_sum += WebPSharpYUVUpdateY(target_y, best_rgb_y, best_y, 2 * w); - WebPSharpYUVUpdateRGB(target_uv, best_rgb_uv, best_uv, 3 * uv_w); - - best_y += 2 * w; - best_uv += 3 * uv_w; - target_y += 2 * w; - target_uv += 3 * uv_w; - } - // test exit condition - if (iter > 0) { - if (diff_y_sum < diff_y_threshold) break; - if (diff_y_sum > prev_diff_y_sum) break; - } - prev_diff_y_sum = diff_y_sum; - } - // final reconstruction - ok = ConvertWRGBToYUV(best_y_base, best_uv_base, picture); - - End: - WebPSafeFree(best_y_base); - WebPSafeFree(best_uv_base); - WebPSafeFree(target_y_base); - WebPSafeFree(target_uv_base); - WebPSafeFree(best_rgb_y); - WebPSafeFree(best_rgb_uv); - WebPSafeFree(tmp_buffer); - return ok; -} -#undef SAFE_ALLOC - -//------------------------------------------------------------------------------ -// "Fast" regular RGB->YUV - -#define SUM4(ptr, step) LinearToGamma( \ - GammaToLinear((ptr)[0]) + \ - GammaToLinear((ptr)[(step)]) + \ - GammaToLinear((ptr)[rgb_stride]) + \ - GammaToLinear((ptr)[rgb_stride + (step)]), 0) \ - -#define SUM2(ptr) \ - LinearToGamma(GammaToLinear((ptr)[0]) + GammaToLinear((ptr)[rgb_stride]), 1) - -#define SUM2ALPHA(ptr) ((ptr)[0] + (ptr)[rgb_stride]) -#define SUM4ALPHA(ptr) (SUM2ALPHA(ptr) + SUM2ALPHA((ptr) + 4)) - -#if defined(USE_INVERSE_ALPHA_TABLE) - -static const int kAlphaFix = 19; -// Following table is (1 << kAlphaFix) / a. The (v * kInvAlpha[a]) >> kAlphaFix -// formula is then equal to v / a in most (99.6%) cases. Note that this table -// and constant are adjusted very tightly to fit 32b arithmetic. -// In particular, they use the fact that the operands for 'v / a' are actually -// derived as v = (a0.p0 + a1.p1 + a2.p2 + a3.p3) and a = a0 + a1 + a2 + a3 -// with ai in [0..255] and pi in [0..1<> (kAlphaFix - 2)) - -#else - -#define DIVIDE_BY_ALPHA(sum, a) (4 * (sum) / (a)) - -#endif // USE_INVERSE_ALPHA_TABLE - -static WEBP_INLINE int LinearToGammaWeighted(const uint8_t* src, - const uint8_t* a_ptr, - uint32_t total_a, int step, - int rgb_stride) { - const uint32_t sum = - a_ptr[0] * GammaToLinear(src[0]) + - a_ptr[step] * GammaToLinear(src[step]) + - a_ptr[rgb_stride] * GammaToLinear(src[rgb_stride]) + - a_ptr[rgb_stride + step] * GammaToLinear(src[rgb_stride + step]); - assert(total_a > 0 && total_a <= 4 * 0xff); -#if defined(USE_INVERSE_ALPHA_TABLE) - assert((uint64_t)sum * kInvAlpha[total_a] < ((uint64_t)1 << 32)); -#endif - return LinearToGamma(DIVIDE_BY_ALPHA(sum, total_a), 0); -} - -static WEBP_INLINE void ConvertRowToY(const uint8_t* const r_ptr, - const uint8_t* const g_ptr, - const uint8_t* const b_ptr, - int step, - uint8_t* const dst_y, - int width, - VP8Random* const rg) { - int i, j; - for (i = 0, j = 0; i < width; i += 1, j += step) { - dst_y[i] = RGBToY(r_ptr[j], g_ptr[j], b_ptr[j], rg); - } -} - -static WEBP_INLINE void AccumulateRGBA(const uint8_t* const r_ptr, - const uint8_t* const g_ptr, - const uint8_t* const b_ptr, - const uint8_t* const a_ptr, - int rgb_stride, - uint16_t* dst, int width) { - int i, j; - // we loop over 2x2 blocks and produce one R/G/B/A value for each. - for (i = 0, j = 0; i < (width >> 1); i += 1, j += 2 * 4, dst += 4) { - const uint32_t a = SUM4ALPHA(a_ptr + j); - int r, g, b; - if (a == 4 * 0xff || a == 0) { - r = SUM4(r_ptr + j, 4); - g = SUM4(g_ptr + j, 4); - b = SUM4(b_ptr + j, 4); - } else { - r = LinearToGammaWeighted(r_ptr + j, a_ptr + j, a, 4, rgb_stride); - g = LinearToGammaWeighted(g_ptr + j, a_ptr + j, a, 4, rgb_stride); - b = LinearToGammaWeighted(b_ptr + j, a_ptr + j, a, 4, rgb_stride); - } - dst[0] = r; - dst[1] = g; - dst[2] = b; - dst[3] = a; - } - if (width & 1) { - const uint32_t a = 2u * SUM2ALPHA(a_ptr + j); - int r, g, b; - if (a == 4 * 0xff || a == 0) { - r = SUM2(r_ptr + j); - g = SUM2(g_ptr + j); - b = SUM2(b_ptr + j); - } else { - r = LinearToGammaWeighted(r_ptr + j, a_ptr + j, a, 0, rgb_stride); - g = LinearToGammaWeighted(g_ptr + j, a_ptr + j, a, 0, rgb_stride); - b = LinearToGammaWeighted(b_ptr + j, a_ptr + j, a, 0, rgb_stride); - } - dst[0] = r; - dst[1] = g; - dst[2] = b; - dst[3] = a; - } -} - -static WEBP_INLINE void AccumulateRGB(const uint8_t* const r_ptr, - const uint8_t* const g_ptr, - const uint8_t* const b_ptr, - int step, int rgb_stride, - uint16_t* dst, int width) { - int i, j; - for (i = 0, j = 0; i < (width >> 1); i += 1, j += 2 * step, dst += 4) { - dst[0] = SUM4(r_ptr + j, step); - dst[1] = SUM4(g_ptr + j, step); - dst[2] = SUM4(b_ptr + j, step); - } - if (width & 1) { - dst[0] = SUM2(r_ptr + j); - dst[1] = SUM2(g_ptr + j); - dst[2] = SUM2(b_ptr + j); - } -} - -static WEBP_INLINE void ConvertRowsToUV(const uint16_t* rgb, - uint8_t* const dst_u, - uint8_t* const dst_v, - int width, - VP8Random* const rg) { - int i; - for (i = 0; i < width; i += 1, rgb += 4) { - const int r = rgb[0], g = rgb[1], b = rgb[2]; - dst_u[i] = RGBToU(r, g, b, rg); - dst_v[i] = RGBToV(r, g, b, rg); - } -} - -static int ImportYUVAFromRGBA(const uint8_t* r_ptr, - const uint8_t* g_ptr, - const uint8_t* b_ptr, - const uint8_t* a_ptr, - int step, // bytes per pixel - int rgb_stride, // bytes per scanline - float dithering, - int use_iterative_conversion, - WebPPicture* const picture) { - int y; - const int width = picture->width; - const int height = picture->height; - const int has_alpha = CheckNonOpaque(a_ptr, width, height, step, rgb_stride); - const int is_rgb = (r_ptr < b_ptr); // otherwise it's bgr - - picture->colorspace = has_alpha ? WEBP_YUV420A : WEBP_YUV420; - picture->use_argb = 0; - - // disable smart conversion if source is too small (overkill). - if (width < kMinDimensionIterativeConversion || - height < kMinDimensionIterativeConversion) { - use_iterative_conversion = 0; - } - - if (!WebPPictureAllocYUVA(picture, width, height)) { - return 0; - } - if (has_alpha) { - assert(step == 4); -#if defined(USE_GAMMA_COMPRESSION) && defined(USE_INVERSE_ALPHA_TABLE) - assert(kAlphaFix + kGammaFix <= 31); -#endif - } - - if (use_iterative_conversion) { - InitGammaTablesS(); - if (!PreprocessARGB(r_ptr, g_ptr, b_ptr, step, rgb_stride, picture)) { - return 0; - } - if (has_alpha) { - WebPExtractAlpha(a_ptr, rgb_stride, width, height, - picture->a, picture->a_stride); - } - } else { - const int uv_width = (width + 1) >> 1; - int use_dsp = (step == 3); // use special function in this case - // temporary storage for accumulated R/G/B values during conversion to U/V - uint16_t* const tmp_rgb = - (uint16_t*)WebPSafeMalloc(4 * uv_width, sizeof(*tmp_rgb)); - uint8_t* dst_y = picture->y; - uint8_t* dst_u = picture->u; - uint8_t* dst_v = picture->v; - uint8_t* dst_a = picture->a; - - VP8Random base_rg; - VP8Random* rg = NULL; - if (dithering > 0.) { - VP8InitRandom(&base_rg, dithering); - rg = &base_rg; - use_dsp = 0; // can't use dsp in this case - } - WebPInitConvertARGBToYUV(); - InitGammaTables(); - - if (tmp_rgb == NULL) return 0; // malloc error - - // Downsample Y/U/V planes, two rows at a time - for (y = 0; y < (height >> 1); ++y) { - int rows_have_alpha = has_alpha; - if (use_dsp) { - if (is_rgb) { - WebPConvertRGB24ToY(r_ptr, dst_y, width); - WebPConvertRGB24ToY(r_ptr + rgb_stride, - dst_y + picture->y_stride, width); - } else { - WebPConvertBGR24ToY(b_ptr, dst_y, width); - WebPConvertBGR24ToY(b_ptr + rgb_stride, - dst_y + picture->y_stride, width); - } - } else { - ConvertRowToY(r_ptr, g_ptr, b_ptr, step, dst_y, width, rg); - ConvertRowToY(r_ptr + rgb_stride, - g_ptr + rgb_stride, - b_ptr + rgb_stride, step, - dst_y + picture->y_stride, width, rg); - } - dst_y += 2 * picture->y_stride; - if (has_alpha) { - rows_have_alpha &= !WebPExtractAlpha(a_ptr, rgb_stride, width, 2, - dst_a, picture->a_stride); - dst_a += 2 * picture->a_stride; - } - // Collect averaged R/G/B(/A) - if (!rows_have_alpha) { - AccumulateRGB(r_ptr, g_ptr, b_ptr, step, rgb_stride, tmp_rgb, width); - } else { - AccumulateRGBA(r_ptr, g_ptr, b_ptr, a_ptr, rgb_stride, tmp_rgb, width); - } - // Convert to U/V - if (rg == NULL) { - WebPConvertRGBA32ToUV(tmp_rgb, dst_u, dst_v, uv_width); - } else { - ConvertRowsToUV(tmp_rgb, dst_u, dst_v, uv_width, rg); - } - dst_u += picture->uv_stride; - dst_v += picture->uv_stride; - r_ptr += 2 * rgb_stride; - b_ptr += 2 * rgb_stride; - g_ptr += 2 * rgb_stride; - if (has_alpha) a_ptr += 2 * rgb_stride; - } - if (height & 1) { // extra last row - int row_has_alpha = has_alpha; - if (use_dsp) { - if (r_ptr < b_ptr) { - WebPConvertRGB24ToY(r_ptr, dst_y, width); - } else { - WebPConvertBGR24ToY(b_ptr, dst_y, width); - } - } else { - ConvertRowToY(r_ptr, g_ptr, b_ptr, step, dst_y, width, rg); - } - if (row_has_alpha) { - row_has_alpha &= !WebPExtractAlpha(a_ptr, 0, width, 1, dst_a, 0); - } - // Collect averaged R/G/B(/A) - if (!row_has_alpha) { - // Collect averaged R/G/B - AccumulateRGB(r_ptr, g_ptr, b_ptr, step, /* rgb_stride = */ 0, - tmp_rgb, width); - } else { - AccumulateRGBA(r_ptr, g_ptr, b_ptr, a_ptr, /* rgb_stride = */ 0, - tmp_rgb, width); - } - if (rg == NULL) { - WebPConvertRGBA32ToUV(tmp_rgb, dst_u, dst_v, uv_width); - } else { - ConvertRowsToUV(tmp_rgb, dst_u, dst_v, uv_width, rg); - } - } - WebPSafeFree(tmp_rgb); - } - return 1; -} - -#undef SUM4 -#undef SUM2 -#undef SUM4ALPHA -#undef SUM2ALPHA - -//------------------------------------------------------------------------------ -// call for ARGB->YUVA conversion - -static int PictureARGBToYUVA(WebPPicture* picture, WebPEncCSP colorspace, - float dithering, int use_iterative_conversion) { - if (picture == NULL) return 0; - if (picture->argb == NULL) { - return WebPEncodingSetError(picture, VP8_ENC_ERROR_NULL_PARAMETER); - } else if ((colorspace & WEBP_CSP_UV_MASK) != WEBP_YUV420) { - return WebPEncodingSetError(picture, VP8_ENC_ERROR_INVALID_CONFIGURATION); - } else { - const uint8_t* const argb = (const uint8_t*)picture->argb; - const uint8_t* const a = argb + (0 ^ ALPHA_OFFSET); - const uint8_t* const r = argb + (1 ^ ALPHA_OFFSET); - const uint8_t* const g = argb + (2 ^ ALPHA_OFFSET); - const uint8_t* const b = argb + (3 ^ ALPHA_OFFSET); - - picture->colorspace = WEBP_YUV420; - return ImportYUVAFromRGBA(r, g, b, a, 4, 4 * picture->argb_stride, - dithering, use_iterative_conversion, picture); - } -} - -int WebPPictureARGBToYUVADithered(WebPPicture* picture, WebPEncCSP colorspace, - float dithering) { - return PictureARGBToYUVA(picture, colorspace, dithering, 0); -} - -int WebPPictureARGBToYUVA(WebPPicture* picture, WebPEncCSP colorspace) { - return PictureARGBToYUVA(picture, colorspace, 0.f, 0); -} - -int WebPPictureSharpARGBToYUVA(WebPPicture* picture) { - return PictureARGBToYUVA(picture, WEBP_YUV420, 0.f, 1); -} -// for backward compatibility -int WebPPictureSmartARGBToYUVA(WebPPicture* picture) { - return WebPPictureSharpARGBToYUVA(picture); -} - -//------------------------------------------------------------------------------ -// call for YUVA -> ARGB conversion - -int WebPPictureYUVAToARGB(WebPPicture* picture) { - if (picture == NULL) return 0; - if (picture->y == NULL || picture->u == NULL || picture->v == NULL) { - return WebPEncodingSetError(picture, VP8_ENC_ERROR_NULL_PARAMETER); - } - if ((picture->colorspace & WEBP_CSP_ALPHA_BIT) && picture->a == NULL) { - return WebPEncodingSetError(picture, VP8_ENC_ERROR_NULL_PARAMETER); - } - if ((picture->colorspace & WEBP_CSP_UV_MASK) != WEBP_YUV420) { - return WebPEncodingSetError(picture, VP8_ENC_ERROR_INVALID_CONFIGURATION); - } - // Allocate a new argb buffer (discarding the previous one). - if (!WebPPictureAllocARGB(picture, picture->width, picture->height)) return 0; - picture->use_argb = 1; - - // Convert - { - int y; - const int width = picture->width; - const int height = picture->height; - const int argb_stride = 4 * picture->argb_stride; - uint8_t* dst = (uint8_t*)picture->argb; - const uint8_t *cur_u = picture->u, *cur_v = picture->v, *cur_y = picture->y; - WebPUpsampleLinePairFunc upsample = - WebPGetLinePairConverter(ALPHA_OFFSET > 0); - - // First row, with replicated top samples. - upsample(cur_y, NULL, cur_u, cur_v, cur_u, cur_v, dst, NULL, width); - cur_y += picture->y_stride; - dst += argb_stride; - // Center rows. - for (y = 1; y + 1 < height; y += 2) { - const uint8_t* const top_u = cur_u; - const uint8_t* const top_v = cur_v; - cur_u += picture->uv_stride; - cur_v += picture->uv_stride; - upsample(cur_y, cur_y + picture->y_stride, top_u, top_v, cur_u, cur_v, - dst, dst + argb_stride, width); - cur_y += 2 * picture->y_stride; - dst += 2 * argb_stride; - } - // Last row (if needed), with replicated bottom samples. - if (height > 1 && !(height & 1)) { - upsample(cur_y, NULL, cur_u, cur_v, cur_u, cur_v, dst, NULL, width); - } - // Insert alpha values if needed, in replacement for the default 0xff ones. - if (picture->colorspace & WEBP_CSP_ALPHA_BIT) { - for (y = 0; y < height; ++y) { - uint32_t* const argb_dst = picture->argb + y * picture->argb_stride; - const uint8_t* const src = picture->a + y * picture->a_stride; - int x; - for (x = 0; x < width; ++x) { - argb_dst[x] = (argb_dst[x] & 0x00ffffffu) | ((uint32_t)src[x] << 24); - } - } - } - } - return 1; -} - -//------------------------------------------------------------------------------ -// automatic import / conversion - -static int Import(WebPPicture* const picture, - const uint8_t* rgb, int rgb_stride, - int step, int swap_rb, int import_alpha) { - int y; - // swap_rb -> b,g,r,a , !swap_rb -> r,g,b,a - const uint8_t* r_ptr = rgb + (swap_rb ? 2 : 0); - const uint8_t* g_ptr = rgb + 1; - const uint8_t* b_ptr = rgb + (swap_rb ? 0 : 2); - const int width = picture->width; - const int height = picture->height; - - if (!picture->use_argb) { - const uint8_t* a_ptr = import_alpha ? rgb + 3 : NULL; - return ImportYUVAFromRGBA(r_ptr, g_ptr, b_ptr, a_ptr, step, rgb_stride, - 0.f /* no dithering */, 0, picture); - } - if (!WebPPictureAlloc(picture)) return 0; - - VP8LDspInit(); - WebPInitAlphaProcessing(); - - if (import_alpha) { - // dst[] byte order is {a,r,g,b} for big-endian, {b,g,r,a} for little endian - uint32_t* dst = picture->argb; - const int do_copy = (ALPHA_OFFSET == 3) && swap_rb; - assert(step == 4); - if (do_copy) { - for (y = 0; y < height; ++y) { - memcpy(dst, rgb, width * 4); - rgb += rgb_stride; - dst += picture->argb_stride; - } - } else { - for (y = 0; y < height; ++y) { -#ifdef WORDS_BIGENDIAN - // BGRA or RGBA input order. - const uint8_t* a_ptr = rgb + 3; - WebPPackARGB(a_ptr, r_ptr, g_ptr, b_ptr, width, dst); - r_ptr += rgb_stride; - g_ptr += rgb_stride; - b_ptr += rgb_stride; -#else - // RGBA input order. Need to swap R and B. - VP8LConvertBGRAToRGBA((const uint32_t*)rgb, width, (uint8_t*)dst); -#endif - rgb += rgb_stride; - dst += picture->argb_stride; - } - } - } else { - uint32_t* dst = picture->argb; - assert(step >= 3); - for (y = 0; y < height; ++y) { - WebPPackRGB(r_ptr, g_ptr, b_ptr, width, step, dst); - r_ptr += rgb_stride; - g_ptr += rgb_stride; - b_ptr += rgb_stride; - dst += picture->argb_stride; - } - } - return 1; -} - -// Public API - -#if !defined(WEBP_REDUCE_CSP) - -int WebPPictureImportBGR(WebPPicture* picture, - const uint8_t* rgb, int rgb_stride) { - return (picture != NULL && rgb != NULL) - ? Import(picture, rgb, rgb_stride, 3, 1, 0) - : 0; -} - -int WebPPictureImportBGRA(WebPPicture* picture, - const uint8_t* rgba, int rgba_stride) { - return (picture != NULL && rgba != NULL) - ? Import(picture, rgba, rgba_stride, 4, 1, 1) - : 0; -} - - -int WebPPictureImportBGRX(WebPPicture* picture, - const uint8_t* rgba, int rgba_stride) { - return (picture != NULL && rgba != NULL) - ? Import(picture, rgba, rgba_stride, 4, 1, 0) - : 0; -} - -#endif // WEBP_REDUCE_CSP - -int WebPPictureImportRGB(WebPPicture* picture, - const uint8_t* rgb, int rgb_stride) { - return (picture != NULL && rgb != NULL) - ? Import(picture, rgb, rgb_stride, 3, 0, 0) - : 0; -} - -int WebPPictureImportRGBA(WebPPicture* picture, - const uint8_t* rgba, int rgba_stride) { - return (picture != NULL && rgba != NULL) - ? Import(picture, rgba, rgba_stride, 4, 0, 1) - : 0; -} - -int WebPPictureImportRGBX(WebPPicture* picture, - const uint8_t* rgba, int rgba_stride) { - return (picture != NULL && rgba != NULL) - ? Import(picture, rgba, rgba_stride, 4, 0, 0) - : 0; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_enc.c deleted file mode 100644 index 4e6092c..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_enc.c +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// WebPPicture class basis -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include - -#include "src/enc/vp8i_enc.h" -#include "src/dsp/dsp.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ -// WebPPicture -//------------------------------------------------------------------------------ - -static int DummyWriter(const uint8_t* data, size_t data_size, - const WebPPicture* const picture) { - // The following are to prevent 'unused variable' error message. - (void)data; - (void)data_size; - (void)picture; - return 1; -} - -int WebPPictureInitInternal(WebPPicture* picture, int version) { - if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_ENCODER_ABI_VERSION)) { - return 0; // caller/system version mismatch! - } - if (picture != NULL) { - memset(picture, 0, sizeof(*picture)); - picture->writer = DummyWriter; - WebPEncodingSetError(picture, VP8_ENC_OK); - } - return 1; -} - -//------------------------------------------------------------------------------ - -static void WebPPictureResetBufferARGB(WebPPicture* const picture) { - picture->memory_argb_ = NULL; - picture->argb = NULL; - picture->argb_stride = 0; -} - -static void WebPPictureResetBufferYUVA(WebPPicture* const picture) { - picture->memory_ = NULL; - picture->y = picture->u = picture->v = picture->a = NULL; - picture->y_stride = picture->uv_stride = 0; - picture->a_stride = 0; -} - -void WebPPictureResetBuffers(WebPPicture* const picture) { - WebPPictureResetBufferARGB(picture); - WebPPictureResetBufferYUVA(picture); -} - -int WebPPictureAllocARGB(WebPPicture* const picture, int width, int height) { - void* memory; - const uint64_t argb_size = (uint64_t)width * height; - - assert(picture != NULL); - - WebPSafeFree(picture->memory_argb_); - WebPPictureResetBufferARGB(picture); - - if (width <= 0 || height <= 0) { - return WebPEncodingSetError(picture, VP8_ENC_ERROR_BAD_DIMENSION); - } - // allocate a new buffer. - memory = WebPSafeMalloc(argb_size + WEBP_ALIGN_CST, sizeof(*picture->argb)); - if (memory == NULL) { - return WebPEncodingSetError(picture, VP8_ENC_ERROR_OUT_OF_MEMORY); - } - picture->memory_argb_ = memory; - picture->argb = (uint32_t*)WEBP_ALIGN(memory); - picture->argb_stride = width; - return 1; -} - -int WebPPictureAllocYUVA(WebPPicture* const picture, int width, int height) { - const WebPEncCSP uv_csp = - (WebPEncCSP)((int)picture->colorspace & WEBP_CSP_UV_MASK); - const int has_alpha = (int)picture->colorspace & WEBP_CSP_ALPHA_BIT; - const int y_stride = width; - const int uv_width = (int)(((int64_t)width + 1) >> 1); - const int uv_height = (int)(((int64_t)height + 1) >> 1); - const int uv_stride = uv_width; - int a_width, a_stride; - uint64_t y_size, uv_size, a_size, total_size; - uint8_t* mem; - - assert(picture != NULL); - - WebPSafeFree(picture->memory_); - WebPPictureResetBufferYUVA(picture); - - if (uv_csp != WEBP_YUV420) { - return WebPEncodingSetError(picture, VP8_ENC_ERROR_INVALID_CONFIGURATION); - } - - // alpha - a_width = has_alpha ? width : 0; - a_stride = a_width; - y_size = (uint64_t)y_stride * height; - uv_size = (uint64_t)uv_stride * uv_height; - a_size = (uint64_t)a_stride * height; - - total_size = y_size + a_size + 2 * uv_size; - - // Security and validation checks - if (width <= 0 || height <= 0 || // luma/alpha param error - uv_width <= 0 || uv_height <= 0) { // u/v param error - return WebPEncodingSetError(picture, VP8_ENC_ERROR_BAD_DIMENSION); - } - // allocate a new buffer. - mem = (uint8_t*)WebPSafeMalloc(total_size, sizeof(*mem)); - if (mem == NULL) { - return WebPEncodingSetError(picture, VP8_ENC_ERROR_OUT_OF_MEMORY); - } - - // From now on, we're in the clear, we can no longer fail... - picture->memory_ = (void*)mem; - picture->y_stride = y_stride; - picture->uv_stride = uv_stride; - picture->a_stride = a_stride; - - // TODO(skal): we could align the y/u/v planes and adjust stride. - picture->y = mem; - mem += y_size; - - picture->u = mem; - mem += uv_size; - picture->v = mem; - mem += uv_size; - - if (a_size > 0) { - picture->a = mem; - mem += a_size; - } - (void)mem; // makes the static analyzer happy - return 1; -} - -int WebPPictureAlloc(WebPPicture* picture) { - if (picture != NULL) { - const int width = picture->width; - const int height = picture->height; - - WebPPictureFree(picture); // erase previous buffer - - if (!picture->use_argb) { - return WebPPictureAllocYUVA(picture, width, height); - } else { - return WebPPictureAllocARGB(picture, width, height); - } - } - return 1; -} - -void WebPPictureFree(WebPPicture* picture) { - if (picture != NULL) { - WebPSafeFree(picture->memory_); - WebPSafeFree(picture->memory_argb_); - WebPPictureResetBuffers(picture); - } -} - -//------------------------------------------------------------------------------ -// WebPMemoryWriter: Write-to-memory - -void WebPMemoryWriterInit(WebPMemoryWriter* writer) { - writer->mem = NULL; - writer->size = 0; - writer->max_size = 0; -} - -int WebPMemoryWrite(const uint8_t* data, size_t data_size, - const WebPPicture* picture) { - WebPMemoryWriter* const w = (WebPMemoryWriter*)picture->custom_ptr; - uint64_t next_size; - if (w == NULL) { - return 1; - } - next_size = (uint64_t)w->size + data_size; - if (next_size > w->max_size) { - uint8_t* new_mem; - uint64_t next_max_size = 2ULL * w->max_size; - if (next_max_size < next_size) next_max_size = next_size; - if (next_max_size < 8192ULL) next_max_size = 8192ULL; - new_mem = (uint8_t*)WebPSafeMalloc(next_max_size, 1); - if (new_mem == NULL) { - return 0; - } - if (w->size > 0) { - memcpy(new_mem, w->mem, w->size); - } - WebPSafeFree(w->mem); - w->mem = new_mem; - // down-cast is ok, thanks to WebPSafeMalloc - w->max_size = (size_t)next_max_size; - } - if (data_size > 0) { - memcpy(w->mem + w->size, data, data_size); - w->size += data_size; - } - return 1; -} - -void WebPMemoryWriterClear(WebPMemoryWriter* writer) { - if (writer != NULL) { - WebPSafeFree(writer->mem); - writer->mem = NULL; - writer->size = 0; - writer->max_size = 0; - } -} - -//------------------------------------------------------------------------------ -// Simplest high-level calls: - -typedef int (*Importer)(WebPPicture* const, const uint8_t* const, int); - -static size_t Encode(const uint8_t* rgba, int width, int height, int stride, - Importer import, float quality_factor, int lossless, - uint8_t** output) { - WebPPicture pic; - WebPConfig config; - WebPMemoryWriter wrt; - int ok; - - if (output == NULL) return 0; - - if (!WebPConfigPreset(&config, WEBP_PRESET_DEFAULT, quality_factor) || - !WebPPictureInit(&pic)) { - return 0; // shouldn't happen, except if system installation is broken - } - - config.lossless = !!lossless; - pic.use_argb = !!lossless; - pic.width = width; - pic.height = height; - pic.writer = WebPMemoryWrite; - pic.custom_ptr = &wrt; - WebPMemoryWriterInit(&wrt); - - ok = import(&pic, rgba, stride) && WebPEncode(&config, &pic); - WebPPictureFree(&pic); - if (!ok) { - WebPMemoryWriterClear(&wrt); - *output = NULL; - return 0; - } - *output = wrt.mem; - return wrt.size; -} - -#define ENCODE_FUNC(NAME, IMPORTER) \ -size_t NAME(const uint8_t* in, int w, int h, int bps, float q, \ - uint8_t** out) { \ - return Encode(in, w, h, bps, IMPORTER, q, 0, out); \ -} - -ENCODE_FUNC(WebPEncodeRGB, WebPPictureImportRGB) -ENCODE_FUNC(WebPEncodeRGBA, WebPPictureImportRGBA) -#if !defined(WEBP_REDUCE_CSP) -ENCODE_FUNC(WebPEncodeBGR, WebPPictureImportBGR) -ENCODE_FUNC(WebPEncodeBGRA, WebPPictureImportBGRA) -#endif // WEBP_REDUCE_CSP - -#undef ENCODE_FUNC - -#define LOSSLESS_DEFAULT_QUALITY 70. -#define LOSSLESS_ENCODE_FUNC(NAME, IMPORTER) \ -size_t NAME(const uint8_t* in, int w, int h, int bps, uint8_t** out) { \ - return Encode(in, w, h, bps, IMPORTER, LOSSLESS_DEFAULT_QUALITY, 1, out); \ -} - -LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessRGB, WebPPictureImportRGB) -LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessRGBA, WebPPictureImportRGBA) -#if !defined(WEBP_REDUCE_CSP) -LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessBGR, WebPPictureImportBGR) -LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessBGRA, WebPPictureImportBGRA) -#endif // WEBP_REDUCE_CSP - -#undef LOSSLESS_ENCODE_FUNC - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_psnr_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_psnr_enc.c deleted file mode 100644 index 7d44224..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_psnr_enc.c +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// WebPPicture tools for measuring distortion -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/webp/encode.h" - -#if !(defined(WEBP_DISABLE_STATS) || defined(WEBP_REDUCE_SIZE)) - -#include -#include - -#include "src/dsp/dsp.h" -#include "src/enc/vp8i_enc.h" -#include "src/utils/utils.h" - -typedef double (*AccumulateFunc)(const uint8_t* src, int src_stride, - const uint8_t* ref, int ref_stride, - int w, int h); - -//------------------------------------------------------------------------------ -// local-min distortion -// -// For every pixel in the *reference* picture, we search for the local best -// match in the compressed image. This is not a symmetrical measure. - -#define RADIUS 2 // search radius. Shouldn't be too large. - -static double AccumulateLSIM(const uint8_t* src, int src_stride, - const uint8_t* ref, int ref_stride, - int w, int h) { - int x, y; - double total_sse = 0.; - for (y = 0; y < h; ++y) { - const int y_0 = (y - RADIUS < 0) ? 0 : y - RADIUS; - const int y_1 = (y + RADIUS + 1 >= h) ? h : y + RADIUS + 1; - for (x = 0; x < w; ++x) { - const int x_0 = (x - RADIUS < 0) ? 0 : x - RADIUS; - const int x_1 = (x + RADIUS + 1 >= w) ? w : x + RADIUS + 1; - double best_sse = 255. * 255.; - const double value = (double)ref[y * ref_stride + x]; - int i, j; - for (j = y_0; j < y_1; ++j) { - const uint8_t* const s = src + j * src_stride; - for (i = x_0; i < x_1; ++i) { - const double diff = s[i] - value; - const double sse = diff * diff; - if (sse < best_sse) best_sse = sse; - } - } - total_sse += best_sse; - } - } - return total_sse; -} -#undef RADIUS - -static double AccumulateSSE(const uint8_t* src, int src_stride, - const uint8_t* ref, int ref_stride, - int w, int h) { - int y; - double total_sse = 0.; - for (y = 0; y < h; ++y) { - total_sse += VP8AccumulateSSE(src, ref, w); - src += src_stride; - ref += ref_stride; - } - return total_sse; -} - -//------------------------------------------------------------------------------ - -static double AccumulateSSIM(const uint8_t* src, int src_stride, - const uint8_t* ref, int ref_stride, - int w, int h) { - const int w0 = (w < VP8_SSIM_KERNEL) ? w : VP8_SSIM_KERNEL; - const int w1 = w - VP8_SSIM_KERNEL - 1; - const int h0 = (h < VP8_SSIM_KERNEL) ? h : VP8_SSIM_KERNEL; - const int h1 = h - VP8_SSIM_KERNEL - 1; - int x, y; - double sum = 0.; - for (y = 0; y < h0; ++y) { - for (x = 0; x < w; ++x) { - sum += VP8SSIMGetClipped(src, src_stride, ref, ref_stride, x, y, w, h); - } - } - for (; y < h1; ++y) { - for (x = 0; x < w0; ++x) { - sum += VP8SSIMGetClipped(src, src_stride, ref, ref_stride, x, y, w, h); - } - for (; x < w1; ++x) { - const int off1 = x - VP8_SSIM_KERNEL + (y - VP8_SSIM_KERNEL) * src_stride; - const int off2 = x - VP8_SSIM_KERNEL + (y - VP8_SSIM_KERNEL) * ref_stride; - sum += VP8SSIMGet(src + off1, src_stride, ref + off2, ref_stride); - } - for (; x < w; ++x) { - sum += VP8SSIMGetClipped(src, src_stride, ref, ref_stride, x, y, w, h); - } - } - for (; y < h; ++y) { - for (x = 0; x < w; ++x) { - sum += VP8SSIMGetClipped(src, src_stride, ref, ref_stride, x, y, w, h); - } - } - return sum; -} - -//------------------------------------------------------------------------------ -// Distortion - -// Max value returned in case of exact similarity. -static const double kMinDistortion_dB = 99.; - -static double GetPSNR(double v, double size) { - return (v > 0. && size > 0.) ? -4.3429448 * log(v / (size * 255 * 255.)) - : kMinDistortion_dB; -} - -static double GetLogSSIM(double v, double size) { - v = (size > 0.) ? v / size : 1.; - return (v < 1.) ? -10.0 * log10(1. - v) : kMinDistortion_dB; -} - -int WebPPlaneDistortion(const uint8_t* src, size_t src_stride, - const uint8_t* ref, size_t ref_stride, - int width, int height, size_t x_step, - int type, float* distortion, float* result) { - uint8_t* allocated = NULL; - const AccumulateFunc metric = (type == 0) ? AccumulateSSE : - (type == 1) ? AccumulateSSIM : - AccumulateLSIM; - if (src == NULL || ref == NULL || - src_stride < x_step * width || ref_stride < x_step * width || - result == NULL || distortion == NULL) { - return 0; - } - - VP8SSIMDspInit(); - if (x_step != 1) { // extract a packed plane if needed - int x, y; - uint8_t* tmp1; - uint8_t* tmp2; - allocated = - (uint8_t*)WebPSafeMalloc(2ULL * width * height, sizeof(*allocated)); - if (allocated == NULL) return 0; - tmp1 = allocated; - tmp2 = tmp1 + (size_t)width * height; - for (y = 0; y < height; ++y) { - for (x = 0; x < width; ++x) { - tmp1[x + y * width] = src[x * x_step + y * src_stride]; - tmp2[x + y * width] = ref[x * x_step + y * ref_stride]; - } - } - src = tmp1; - ref = tmp2; - } - *distortion = (float)metric(src, width, ref, width, width, height); - WebPSafeFree(allocated); - - *result = (type == 1) ? (float)GetLogSSIM(*distortion, (double)width * height) - : (float)GetPSNR(*distortion, (double)width * height); - return 1; -} - -#ifdef WORDS_BIGENDIAN -#define BLUE_OFFSET 3 // uint32_t 0x000000ff is 0x00,00,00,ff in memory -#else -#define BLUE_OFFSET 0 // uint32_t 0x000000ff is 0xff,00,00,00 in memory -#endif - -int WebPPictureDistortion(const WebPPicture* src, const WebPPicture* ref, - int type, float results[5]) { - int w, h, c; - int ok = 0; - WebPPicture p0, p1; - double total_size = 0., total_distortion = 0.; - if (src == NULL || ref == NULL || - src->width != ref->width || src->height != ref->height || - results == NULL) { - return 0; - } - - VP8SSIMDspInit(); - if (!WebPPictureInit(&p0) || !WebPPictureInit(&p1)) return 0; - w = src->width; - h = src->height; - if (!WebPPictureView(src, 0, 0, w, h, &p0)) goto Error; - if (!WebPPictureView(ref, 0, 0, w, h, &p1)) goto Error; - - // We always measure distortion in ARGB space. - if (p0.use_argb == 0 && !WebPPictureYUVAToARGB(&p0)) goto Error; - if (p1.use_argb == 0 && !WebPPictureYUVAToARGB(&p1)) goto Error; - for (c = 0; c < 4; ++c) { - float distortion; - const size_t stride0 = 4 * (size_t)p0.argb_stride; - const size_t stride1 = 4 * (size_t)p1.argb_stride; - // results are reported as BGRA - const int offset = c ^ BLUE_OFFSET; - if (!WebPPlaneDistortion((const uint8_t*)p0.argb + offset, stride0, - (const uint8_t*)p1.argb + offset, stride1, - w, h, 4, type, &distortion, results + c)) { - goto Error; - } - total_distortion += distortion; - total_size += w * h; - } - - results[4] = (type == 1) ? (float)GetLogSSIM(total_distortion, total_size) - : (float)GetPSNR(total_distortion, total_size); - ok = 1; - - Error: - WebPPictureFree(&p0); - WebPPictureFree(&p1); - return ok; -} - -#undef BLUE_OFFSET - -#else // defined(WEBP_DISABLE_STATS) -int WebPPlaneDistortion(const uint8_t* src, size_t src_stride, - const uint8_t* ref, size_t ref_stride, - int width, int height, size_t x_step, - int type, float* distortion, float* result) { - (void)src; - (void)src_stride; - (void)ref; - (void)ref_stride; - (void)width; - (void)height; - (void)x_step; - (void)type; - if (distortion == NULL || result == NULL) return 0; - *distortion = 0.f; - *result = 0.f; - return 1; -} - -int WebPPictureDistortion(const WebPPicture* src, const WebPPicture* ref, - int type, float results[5]) { - int i; - (void)src; - (void)ref; - (void)type; - if (results == NULL) return 0; - for (i = 0; i < 5; ++i) results[i] = 0.f; - return 1; -} - -#endif // !defined(WEBP_DISABLE_STATS) diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_rescale_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_rescale_enc.c deleted file mode 100644 index c0b553f..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_rescale_enc.c +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// WebPPicture tools: copy, crop, rescaling and view. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/webp/encode.h" - -#if !defined(WEBP_REDUCE_SIZE) - -#include -#include - -#include "src/enc/vp8i_enc.h" -#include "src/utils/rescaler_utils.h" -#include "src/utils/utils.h" - -#define HALVE(x) (((x) + 1) >> 1) - -// Grab the 'specs' (writer, *opaque, width, height...) from 'src' and copy them -// into 'dst'. Mark 'dst' as not owning any memory. -static void PictureGrabSpecs(const WebPPicture* const src, - WebPPicture* const dst) { - assert(src != NULL && dst != NULL); - *dst = *src; - WebPPictureResetBuffers(dst); -} - -//------------------------------------------------------------------------------ - -// Adjust top-left corner to chroma sample position. -static void SnapTopLeftPosition(const WebPPicture* const pic, - int* const left, int* const top) { - if (!pic->use_argb) { - *left &= ~1; - *top &= ~1; - } -} - -// Adjust top-left corner and verify that the sub-rectangle is valid. -static int AdjustAndCheckRectangle(const WebPPicture* const pic, - int* const left, int* const top, - int width, int height) { - SnapTopLeftPosition(pic, left, top); - if ((*left) < 0 || (*top) < 0) return 0; - if (width <= 0 || height <= 0) return 0; - if ((*left) + width > pic->width) return 0; - if ((*top) + height > pic->height) return 0; - return 1; -} - -int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) { - if (src == NULL || dst == NULL) return 0; - if (src == dst) return 1; - - PictureGrabSpecs(src, dst); - if (!WebPPictureAlloc(dst)) return 0; - - if (!src->use_argb) { - WebPCopyPlane(src->y, src->y_stride, - dst->y, dst->y_stride, dst->width, dst->height); - WebPCopyPlane(src->u, src->uv_stride, dst->u, dst->uv_stride, - HALVE(dst->width), HALVE(dst->height)); - WebPCopyPlane(src->v, src->uv_stride, dst->v, dst->uv_stride, - HALVE(dst->width), HALVE(dst->height)); - if (dst->a != NULL) { - WebPCopyPlane(src->a, src->a_stride, - dst->a, dst->a_stride, dst->width, dst->height); - } - } else { - WebPCopyPlane((const uint8_t*)src->argb, 4 * src->argb_stride, - (uint8_t*)dst->argb, 4 * dst->argb_stride, - 4 * dst->width, dst->height); - } - return 1; -} - -int WebPPictureIsView(const WebPPicture* picture) { - if (picture == NULL) return 0; - if (picture->use_argb) { - return (picture->memory_argb_ == NULL); - } - return (picture->memory_ == NULL); -} - -int WebPPictureView(const WebPPicture* src, - int left, int top, int width, int height, - WebPPicture* dst) { - if (src == NULL || dst == NULL) return 0; - - // verify rectangle position. - if (!AdjustAndCheckRectangle(src, &left, &top, width, height)) return 0; - - if (src != dst) { // beware of aliasing! We don't want to leak 'memory_'. - PictureGrabSpecs(src, dst); - } - dst->width = width; - dst->height = height; - if (!src->use_argb) { - dst->y = src->y + top * src->y_stride + left; - dst->u = src->u + (top >> 1) * src->uv_stride + (left >> 1); - dst->v = src->v + (top >> 1) * src->uv_stride + (left >> 1); - dst->y_stride = src->y_stride; - dst->uv_stride = src->uv_stride; - if (src->a != NULL) { - dst->a = src->a + top * src->a_stride + left; - dst->a_stride = src->a_stride; - } - } else { - dst->argb = src->argb + top * src->argb_stride + left; - dst->argb_stride = src->argb_stride; - } - return 1; -} - -//------------------------------------------------------------------------------ -// Picture cropping - -int WebPPictureCrop(WebPPicture* pic, - int left, int top, int width, int height) { - WebPPicture tmp; - - if (pic == NULL) return 0; - if (!AdjustAndCheckRectangle(pic, &left, &top, width, height)) return 0; - - PictureGrabSpecs(pic, &tmp); - tmp.width = width; - tmp.height = height; - if (!WebPPictureAlloc(&tmp)) return 0; - - if (!pic->use_argb) { - const int y_offset = top * pic->y_stride + left; - const int uv_offset = (top / 2) * pic->uv_stride + left / 2; - WebPCopyPlane(pic->y + y_offset, pic->y_stride, - tmp.y, tmp.y_stride, width, height); - WebPCopyPlane(pic->u + uv_offset, pic->uv_stride, - tmp.u, tmp.uv_stride, HALVE(width), HALVE(height)); - WebPCopyPlane(pic->v + uv_offset, pic->uv_stride, - tmp.v, tmp.uv_stride, HALVE(width), HALVE(height)); - - if (tmp.a != NULL) { - const int a_offset = top * pic->a_stride + left; - WebPCopyPlane(pic->a + a_offset, pic->a_stride, - tmp.a, tmp.a_stride, width, height); - } - } else { - const uint8_t* const src = - (const uint8_t*)(pic->argb + top * pic->argb_stride + left); - WebPCopyPlane(src, pic->argb_stride * 4, (uint8_t*)tmp.argb, - tmp.argb_stride * 4, width * 4, height); - } - WebPPictureFree(pic); - *pic = tmp; - return 1; -} - -//------------------------------------------------------------------------------ -// Simple picture rescaler - -static void RescalePlane(const uint8_t* src, - int src_width, int src_height, int src_stride, - uint8_t* dst, - int dst_width, int dst_height, int dst_stride, - rescaler_t* const work, - int num_channels) { - WebPRescaler rescaler; - int y = 0; - WebPRescalerInit(&rescaler, src_width, src_height, - dst, dst_width, dst_height, dst_stride, - num_channels, work); - while (y < src_height) { - y += WebPRescalerImport(&rescaler, src_height - y, - src + y * src_stride, src_stride); - WebPRescalerExport(&rescaler); - } -} - -static void AlphaMultiplyARGB(WebPPicture* const pic, int inverse) { - assert(pic->argb != NULL); - WebPMultARGBRows((uint8_t*)pic->argb, pic->argb_stride * sizeof(*pic->argb), - pic->width, pic->height, inverse); -} - -static void AlphaMultiplyY(WebPPicture* const pic, int inverse) { - if (pic->a != NULL) { - WebPMultRows(pic->y, pic->y_stride, pic->a, pic->a_stride, - pic->width, pic->height, inverse); - } -} - -int WebPPictureRescale(WebPPicture* pic, int width, int height) { - WebPPicture tmp; - int prev_width, prev_height; - rescaler_t* work; - - if (pic == NULL) return 0; - prev_width = pic->width; - prev_height = pic->height; - if (!WebPRescalerGetScaledDimensions( - prev_width, prev_height, &width, &height)) { - return 0; - } - - PictureGrabSpecs(pic, &tmp); - tmp.width = width; - tmp.height = height; - if (!WebPPictureAlloc(&tmp)) return 0; - - if (!pic->use_argb) { - work = (rescaler_t*)WebPSafeMalloc(2ULL * width, sizeof(*work)); - if (work == NULL) { - WebPPictureFree(&tmp); - return 0; - } - // If present, we need to rescale alpha first (for AlphaMultiplyY). - if (pic->a != NULL) { - WebPInitAlphaProcessing(); - RescalePlane(pic->a, prev_width, prev_height, pic->a_stride, - tmp.a, width, height, tmp.a_stride, work, 1); - } - - // We take transparency into account on the luma plane only. That's not - // totally exact blending, but still is a good approximation. - AlphaMultiplyY(pic, 0); - RescalePlane(pic->y, prev_width, prev_height, pic->y_stride, - tmp.y, width, height, tmp.y_stride, work, 1); - AlphaMultiplyY(&tmp, 1); - - RescalePlane(pic->u, - HALVE(prev_width), HALVE(prev_height), pic->uv_stride, - tmp.u, - HALVE(width), HALVE(height), tmp.uv_stride, work, 1); - RescalePlane(pic->v, - HALVE(prev_width), HALVE(prev_height), pic->uv_stride, - tmp.v, - HALVE(width), HALVE(height), tmp.uv_stride, work, 1); - } else { - work = (rescaler_t*)WebPSafeMalloc(2ULL * width * 4, sizeof(*work)); - if (work == NULL) { - WebPPictureFree(&tmp); - return 0; - } - // In order to correctly interpolate colors, we need to apply the alpha - // weighting first (black-matting), scale the RGB values, and remove - // the premultiplication afterward (while preserving the alpha channel). - WebPInitAlphaProcessing(); - AlphaMultiplyARGB(pic, 0); - RescalePlane((const uint8_t*)pic->argb, prev_width, prev_height, - pic->argb_stride * 4, - (uint8_t*)tmp.argb, width, height, - tmp.argb_stride * 4, - work, 4); - AlphaMultiplyARGB(&tmp, 1); - } - WebPPictureFree(pic); - WebPSafeFree(work); - *pic = tmp; - return 1; -} - -#else // defined(WEBP_REDUCE_SIZE) - -int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) { - (void)src; - (void)dst; - return 0; -} - -int WebPPictureIsView(const WebPPicture* picture) { - (void)picture; - return 0; -} - -int WebPPictureView(const WebPPicture* src, - int left, int top, int width, int height, - WebPPicture* dst) { - (void)src; - (void)left; - (void)top; - (void)width; - (void)height; - (void)dst; - return 0; -} - -int WebPPictureCrop(WebPPicture* pic, - int left, int top, int width, int height) { - (void)pic; - (void)left; - (void)top; - (void)width; - (void)height; - return 0; -} - -int WebPPictureRescale(WebPPicture* pic, int width, int height) { - (void)pic; - (void)width; - (void)height; - return 0; -} -#endif // !defined(WEBP_REDUCE_SIZE) diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_tools_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_tools_enc.c deleted file mode 100644 index c3719af..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/picture_tools_enc.c +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// WebPPicture tools: alpha handling, etc. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include - -#include "src/enc/vp8i_enc.h" -#include "src/dsp/yuv.h" - -static WEBP_INLINE uint32_t MakeARGB32(int r, int g, int b) { - return (0xff000000u | (r << 16) | (g << 8) | b); -} - -//------------------------------------------------------------------------------ -// Helper: clean up fully transparent area to help compressibility. - -#define SIZE 8 -#define SIZE2 (SIZE / 2) -static int IsTransparentARGBArea(const uint32_t* ptr, int stride, int size) { - int y, x; - for (y = 0; y < size; ++y) { - for (x = 0; x < size; ++x) { - if (ptr[x] & 0xff000000u) { - return 0; - } - } - ptr += stride; - } - return 1; -} - -static void Flatten(uint8_t* ptr, int v, int stride, int size) { - int y; - for (y = 0; y < size; ++y) { - memset(ptr, v, size); - ptr += stride; - } -} - -static void FlattenARGB(uint32_t* ptr, uint32_t v, int stride, int size) { - int x, y; - for (y = 0; y < size; ++y) { - for (x = 0; x < size; ++x) ptr[x] = v; - ptr += stride; - } -} - -// Smoothen the luma components of transparent pixels. Return true if the whole -// block is transparent. -static int SmoothenBlock(const uint8_t* a_ptr, int a_stride, uint8_t* y_ptr, - int y_stride, int width, int height) { - int sum = 0, count = 0; - int x, y; - const uint8_t* alpha_ptr = a_ptr; - uint8_t* luma_ptr = y_ptr; - for (y = 0; y < height; ++y) { - for (x = 0; x < width; ++x) { - if (alpha_ptr[x] != 0) { - ++count; - sum += luma_ptr[x]; - } - } - alpha_ptr += a_stride; - luma_ptr += y_stride; - } - if (count > 0 && count < width * height) { - const uint8_t avg_u8 = (uint8_t)(sum / count); - alpha_ptr = a_ptr; - luma_ptr = y_ptr; - for (y = 0; y < height; ++y) { - for (x = 0; x < width; ++x) { - if (alpha_ptr[x] == 0) luma_ptr[x] = avg_u8; - } - alpha_ptr += a_stride; - luma_ptr += y_stride; - } - } - return (count == 0); -} - -void WebPCleanupTransparentArea(WebPPicture* pic) { - int x, y, w, h; - if (pic == NULL) return; - w = pic->width / SIZE; - h = pic->height / SIZE; - - // note: we ignore the left-overs on right/bottom, except for SmoothenBlock(). - if (pic->use_argb) { - uint32_t argb_value = 0; - for (y = 0; y < h; ++y) { - int need_reset = 1; - for (x = 0; x < w; ++x) { - const int off = (y * pic->argb_stride + x) * SIZE; - if (IsTransparentARGBArea(pic->argb + off, pic->argb_stride, SIZE)) { - if (need_reset) { - argb_value = pic->argb[off]; - need_reset = 0; - } - FlattenARGB(pic->argb + off, argb_value, pic->argb_stride, SIZE); - } else { - need_reset = 1; - } - } - } - } else { - const int width = pic->width; - const int height = pic->height; - const int y_stride = pic->y_stride; - const int uv_stride = pic->uv_stride; - const int a_stride = pic->a_stride; - uint8_t* y_ptr = pic->y; - uint8_t* u_ptr = pic->u; - uint8_t* v_ptr = pic->v; - const uint8_t* a_ptr = pic->a; - int values[3] = { 0 }; - if (a_ptr == NULL || y_ptr == NULL || u_ptr == NULL || v_ptr == NULL) { - return; - } - for (y = 0; y + SIZE <= height; y += SIZE) { - int need_reset = 1; - for (x = 0; x + SIZE <= width; x += SIZE) { - if (SmoothenBlock(a_ptr + x, a_stride, y_ptr + x, y_stride, - SIZE, SIZE)) { - if (need_reset) { - values[0] = y_ptr[x]; - values[1] = u_ptr[x >> 1]; - values[2] = v_ptr[x >> 1]; - need_reset = 0; - } - Flatten(y_ptr + x, values[0], y_stride, SIZE); - Flatten(u_ptr + (x >> 1), values[1], uv_stride, SIZE2); - Flatten(v_ptr + (x >> 1), values[2], uv_stride, SIZE2); - } else { - need_reset = 1; - } - } - if (x < width) { - SmoothenBlock(a_ptr + x, a_stride, y_ptr + x, y_stride, - width - x, SIZE); - } - a_ptr += SIZE * a_stride; - y_ptr += SIZE * y_stride; - u_ptr += SIZE2 * uv_stride; - v_ptr += SIZE2 * uv_stride; - } - if (y < height) { - const int sub_height = height - y; - for (x = 0; x + SIZE <= width; x += SIZE) { - SmoothenBlock(a_ptr + x, a_stride, y_ptr + x, y_stride, - SIZE, sub_height); - } - if (x < width) { - SmoothenBlock(a_ptr + x, a_stride, y_ptr + x, y_stride, - width - x, sub_height); - } - } - } -} - -#undef SIZE -#undef SIZE2 - -void WebPCleanupTransparentAreaLossless(WebPPicture* const pic) { - int x, y, w, h; - uint32_t* argb; - assert(pic != NULL && pic->use_argb); - w = pic->width; - h = pic->height; - argb = pic->argb; - - for (y = 0; y < h; ++y) { - for (x = 0; x < w; ++x) { - if ((argb[x] & 0xff000000) == 0) { - argb[x] = 0x00000000; - } - } - argb += pic->argb_stride; - } -} - -//------------------------------------------------------------------------------ -// Blend color and remove transparency info - -#define BLEND(V0, V1, ALPHA) \ - ((((V0) * (255 - (ALPHA)) + (V1) * (ALPHA)) * 0x101 + 256) >> 16) -#define BLEND_10BIT(V0, V1, ALPHA) \ - ((((V0) * (1020 - (ALPHA)) + (V1) * (ALPHA)) * 0x101 + 1024) >> 18) - -void WebPBlendAlpha(WebPPicture* pic, uint32_t background_rgb) { - const int red = (background_rgb >> 16) & 0xff; - const int green = (background_rgb >> 8) & 0xff; - const int blue = (background_rgb >> 0) & 0xff; - int x, y; - if (pic == NULL) return; - if (!pic->use_argb) { - const int uv_width = (pic->width >> 1); // omit last pixel during u/v loop - const int Y0 = VP8RGBToY(red, green, blue, YUV_HALF); - // VP8RGBToU/V expects the u/v values summed over four pixels - const int U0 = VP8RGBToU(4 * red, 4 * green, 4 * blue, 4 * YUV_HALF); - const int V0 = VP8RGBToV(4 * red, 4 * green, 4 * blue, 4 * YUV_HALF); - const int has_alpha = pic->colorspace & WEBP_CSP_ALPHA_BIT; - if (!has_alpha || pic->a == NULL) return; // nothing to do - for (y = 0; y < pic->height; ++y) { - // Luma blending - uint8_t* const y_ptr = pic->y + y * pic->y_stride; - uint8_t* const a_ptr = pic->a + y * pic->a_stride; - for (x = 0; x < pic->width; ++x) { - const int alpha = a_ptr[x]; - if (alpha < 0xff) { - y_ptr[x] = BLEND(Y0, y_ptr[x], a_ptr[x]); - } - } - // Chroma blending every even line - if ((y & 1) == 0) { - uint8_t* const u = pic->u + (y >> 1) * pic->uv_stride; - uint8_t* const v = pic->v + (y >> 1) * pic->uv_stride; - uint8_t* const a_ptr2 = - (y + 1 == pic->height) ? a_ptr : a_ptr + pic->a_stride; - for (x = 0; x < uv_width; ++x) { - // Average four alpha values into a single blending weight. - // TODO(skal): might lead to visible contouring. Can we do better? - const int alpha = - a_ptr[2 * x + 0] + a_ptr[2 * x + 1] + - a_ptr2[2 * x + 0] + a_ptr2[2 * x + 1]; - u[x] = BLEND_10BIT(U0, u[x], alpha); - v[x] = BLEND_10BIT(V0, v[x], alpha); - } - if (pic->width & 1) { // rightmost pixel - const int alpha = 2 * (a_ptr[2 * x + 0] + a_ptr2[2 * x + 0]); - u[x] = BLEND_10BIT(U0, u[x], alpha); - v[x] = BLEND_10BIT(V0, v[x], alpha); - } - } - memset(a_ptr, 0xff, pic->width); - } - } else { - uint32_t* argb = pic->argb; - const uint32_t background = MakeARGB32(red, green, blue); - for (y = 0; y < pic->height; ++y) { - for (x = 0; x < pic->width; ++x) { - const int alpha = (argb[x] >> 24) & 0xff; - if (alpha != 0xff) { - if (alpha > 0) { - int r = (argb[x] >> 16) & 0xff; - int g = (argb[x] >> 8) & 0xff; - int b = (argb[x] >> 0) & 0xff; - r = BLEND(red, r, alpha); - g = BLEND(green, g, alpha); - b = BLEND(blue, b, alpha); - argb[x] = MakeARGB32(r, g, b); - } else { - argb[x] = background; - } - } - } - argb += pic->argb_stride; - } - } -} - -#undef BLEND -#undef BLEND_10BIT - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/predictor_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/predictor_enc.c deleted file mode 100644 index 8044a5d..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/predictor_enc.c +++ /dev/null @@ -1,770 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Image transform methods for lossless encoder. -// -// Authors: Vikas Arora (vikaas.arora@gmail.com) -// Jyrki Alakuijala (jyrki@google.com) -// Urvang Joshi (urvang@google.com) -// Vincent Rabaud (vrabaud@google.com) - -#include "src/dsp/lossless.h" -#include "src/dsp/lossless_common.h" -#include "src/enc/vp8li_enc.h" - -#define MAX_DIFF_COST (1e30f) - -static const float kSpatialPredictorBias = 15.f; -static const int kPredLowEffort = 11; -static const uint32_t kMaskAlpha = 0xff000000; - -// Mostly used to reduce code size + readability -static WEBP_INLINE int GetMin(int a, int b) { return (a > b) ? b : a; } - -//------------------------------------------------------------------------------ -// Methods to calculate Entropy (Shannon). - -static float PredictionCostSpatial(const int counts[256], int weight_0, - double exp_val) { - const int significant_symbols = 256 >> 4; - const double exp_decay_factor = 0.6; - double bits = weight_0 * counts[0]; - int i; - for (i = 1; i < significant_symbols; ++i) { - bits += exp_val * (counts[i] + counts[256 - i]); - exp_val *= exp_decay_factor; - } - return (float)(-0.1 * bits); -} - -static float PredictionCostSpatialHistogram(const int accumulated[4][256], - const int tile[4][256]) { - int i; - double retval = 0; - for (i = 0; i < 4; ++i) { - const double kExpValue = 0.94; - retval += PredictionCostSpatial(tile[i], 1, kExpValue); - retval += VP8LCombinedShannonEntropy(tile[i], accumulated[i]); - } - return (float)retval; -} - -static WEBP_INLINE void UpdateHisto(int histo_argb[4][256], uint32_t argb) { - ++histo_argb[0][argb >> 24]; - ++histo_argb[1][(argb >> 16) & 0xff]; - ++histo_argb[2][(argb >> 8) & 0xff]; - ++histo_argb[3][argb & 0xff]; -} - -//------------------------------------------------------------------------------ -// Spatial transform functions. - -static WEBP_INLINE void PredictBatch(int mode, int x_start, int y, - int num_pixels, const uint32_t* current, - const uint32_t* upper, uint32_t* out) { - if (x_start == 0) { - if (y == 0) { - // ARGB_BLACK. - VP8LPredictorsSub[0](current, NULL, 1, out); - } else { - // Top one. - VP8LPredictorsSub[2](current, upper, 1, out); - } - ++x_start; - ++out; - --num_pixels; - } - if (y == 0) { - // Left one. - VP8LPredictorsSub[1](current + x_start, NULL, num_pixels, out); - } else { - VP8LPredictorsSub[mode](current + x_start, upper + x_start, num_pixels, - out); - } -} - -#if (WEBP_NEAR_LOSSLESS == 1) -static WEBP_INLINE int GetMax(int a, int b) { return (a < b) ? b : a; } - -static int MaxDiffBetweenPixels(uint32_t p1, uint32_t p2) { - const int diff_a = abs((int)(p1 >> 24) - (int)(p2 >> 24)); - const int diff_r = abs((int)((p1 >> 16) & 0xff) - (int)((p2 >> 16) & 0xff)); - const int diff_g = abs((int)((p1 >> 8) & 0xff) - (int)((p2 >> 8) & 0xff)); - const int diff_b = abs((int)(p1 & 0xff) - (int)(p2 & 0xff)); - return GetMax(GetMax(diff_a, diff_r), GetMax(diff_g, diff_b)); -} - -static int MaxDiffAroundPixel(uint32_t current, uint32_t up, uint32_t down, - uint32_t left, uint32_t right) { - const int diff_up = MaxDiffBetweenPixels(current, up); - const int diff_down = MaxDiffBetweenPixels(current, down); - const int diff_left = MaxDiffBetweenPixels(current, left); - const int diff_right = MaxDiffBetweenPixels(current, right); - return GetMax(GetMax(diff_up, diff_down), GetMax(diff_left, diff_right)); -} - -static uint32_t AddGreenToBlueAndRed(uint32_t argb) { - const uint32_t green = (argb >> 8) & 0xff; - uint32_t red_blue = argb & 0x00ff00ffu; - red_blue += (green << 16) | green; - red_blue &= 0x00ff00ffu; - return (argb & 0xff00ff00u) | red_blue; -} - -static void MaxDiffsForRow(int width, int stride, const uint32_t* const argb, - uint8_t* const max_diffs, int used_subtract_green) { - uint32_t current, up, down, left, right; - int x; - if (width <= 2) return; - current = argb[0]; - right = argb[1]; - if (used_subtract_green) { - current = AddGreenToBlueAndRed(current); - right = AddGreenToBlueAndRed(right); - } - // max_diffs[0] and max_diffs[width - 1] are never used. - for (x = 1; x < width - 1; ++x) { - up = argb[-stride + x]; - down = argb[stride + x]; - left = current; - current = right; - right = argb[x + 1]; - if (used_subtract_green) { - up = AddGreenToBlueAndRed(up); - down = AddGreenToBlueAndRed(down); - right = AddGreenToBlueAndRed(right); - } - max_diffs[x] = MaxDiffAroundPixel(current, up, down, left, right); - } -} - -// Quantize the difference between the actual component value and its prediction -// to a multiple of quantization, working modulo 256, taking care not to cross -// a boundary (inclusive upper limit). -static uint8_t NearLosslessComponent(uint8_t value, uint8_t predict, - uint8_t boundary, int quantization) { - const int residual = (value - predict) & 0xff; - const int boundary_residual = (boundary - predict) & 0xff; - const int lower = residual & ~(quantization - 1); - const int upper = lower + quantization; - // Resolve ties towards a value closer to the prediction (i.e. towards lower - // if value comes after prediction and towards upper otherwise). - const int bias = ((boundary - value) & 0xff) < boundary_residual; - if (residual - lower < upper - residual + bias) { - // lower is closer to residual than upper. - if (residual > boundary_residual && lower <= boundary_residual) { - // Halve quantization step to avoid crossing boundary. This midpoint is - // on the same side of boundary as residual because midpoint >= residual - // (since lower is closer than upper) and residual is above the boundary. - return lower + (quantization >> 1); - } - return lower; - } else { - // upper is closer to residual than lower. - if (residual <= boundary_residual && upper > boundary_residual) { - // Halve quantization step to avoid crossing boundary. This midpoint is - // on the same side of boundary as residual because midpoint <= residual - // (since upper is closer than lower) and residual is below the boundary. - return lower + (quantization >> 1); - } - return upper & 0xff; - } -} - -// Quantize every component of the difference between the actual pixel value and -// its prediction to a multiple of a quantization (a power of 2, not larger than -// max_quantization which is a power of 2, smaller than max_diff). Take care if -// value and predict have undergone subtract green, which means that red and -// blue are represented as offsets from green. -#define NEAR_LOSSLESS_DIFF(a, b) (uint8_t)((((int)(a) - (int)(b))) & 0xff) -static uint32_t NearLossless(uint32_t value, uint32_t predict, - int max_quantization, int max_diff, - int used_subtract_green) { - int quantization; - uint8_t new_green = 0; - uint8_t green_diff = 0; - uint8_t a, r, g, b; - if (max_diff <= 2) { - return VP8LSubPixels(value, predict); - } - quantization = max_quantization; - while (quantization >= max_diff) { - quantization >>= 1; - } - if ((value >> 24) == 0 || (value >> 24) == 0xff) { - // Preserve transparency of fully transparent or fully opaque pixels. - a = NEAR_LOSSLESS_DIFF(value >> 24, predict >> 24); - } else { - a = NearLosslessComponent(value >> 24, predict >> 24, 0xff, quantization); - } - g = NearLosslessComponent((value >> 8) & 0xff, (predict >> 8) & 0xff, 0xff, - quantization); - if (used_subtract_green) { - // The green offset will be added to red and blue components during decoding - // to obtain the actual red and blue values. - new_green = ((predict >> 8) + g) & 0xff; - // The amount by which green has been adjusted during quantization. It is - // subtracted from red and blue for compensation, to avoid accumulating two - // quantization errors in them. - green_diff = NEAR_LOSSLESS_DIFF(new_green, value >> 8); - } - r = NearLosslessComponent(NEAR_LOSSLESS_DIFF(value >> 16, green_diff), - (predict >> 16) & 0xff, 0xff - new_green, - quantization); - b = NearLosslessComponent(NEAR_LOSSLESS_DIFF(value, green_diff), - predict & 0xff, 0xff - new_green, quantization); - return ((uint32_t)a << 24) | ((uint32_t)r << 16) | ((uint32_t)g << 8) | b; -} -#undef NEAR_LOSSLESS_DIFF -#endif // (WEBP_NEAR_LOSSLESS == 1) - -// Stores the difference between the pixel and its prediction in "out". -// In case of a lossy encoding, updates the source image to avoid propagating -// the deviation further to pixels which depend on the current pixel for their -// predictions. -static WEBP_INLINE void GetResidual( - int width, int height, uint32_t* const upper_row, - uint32_t* const current_row, const uint8_t* const max_diffs, int mode, - int x_start, int x_end, int y, int max_quantization, int exact, - int used_subtract_green, uint32_t* const out) { - if (exact) { - PredictBatch(mode, x_start, y, x_end - x_start, current_row, upper_row, - out); - } else { - const VP8LPredictorFunc pred_func = VP8LPredictors[mode]; - int x; - for (x = x_start; x < x_end; ++x) { - uint32_t predict; - uint32_t residual; - if (y == 0) { - predict = (x == 0) ? ARGB_BLACK : current_row[x - 1]; // Left. - } else if (x == 0) { - predict = upper_row[x]; // Top. - } else { - predict = pred_func(current_row[x - 1], upper_row + x); - } -#if (WEBP_NEAR_LOSSLESS == 1) - if (max_quantization == 1 || mode == 0 || y == 0 || y == height - 1 || - x == 0 || x == width - 1) { - residual = VP8LSubPixels(current_row[x], predict); - } else { - residual = NearLossless(current_row[x], predict, max_quantization, - max_diffs[x], used_subtract_green); - // Update the source image. - current_row[x] = VP8LAddPixels(predict, residual); - // x is never 0 here so we do not need to update upper_row like below. - } -#else - (void)max_diffs; - (void)height; - (void)max_quantization; - (void)used_subtract_green; - residual = VP8LSubPixels(current_row[x], predict); -#endif - if ((current_row[x] & kMaskAlpha) == 0) { - // If alpha is 0, cleanup RGB. We can choose the RGB values of the - // residual for best compression. The prediction of alpha itself can be - // non-zero and must be kept though. We choose RGB of the residual to be - // 0. - residual &= kMaskAlpha; - // Update the source image. - current_row[x] = predict & ~kMaskAlpha; - // The prediction for the rightmost pixel in a row uses the leftmost - // pixel - // in that row as its top-right context pixel. Hence if we change the - // leftmost pixel of current_row, the corresponding change must be - // applied - // to upper_row as well where top-right context is being read from. - if (x == 0 && y != 0) upper_row[width] = current_row[0]; - } - out[x - x_start] = residual; - } - } -} - -// Returns best predictor and updates the accumulated histogram. -// If max_quantization > 1, assumes that near lossless processing will be -// applied, quantizing residuals to multiples of quantization levels up to -// max_quantization (the actual quantization level depends on smoothness near -// the given pixel). -static int GetBestPredictorForTile(int width, int height, - int tile_x, int tile_y, int bits, - int accumulated[4][256], - uint32_t* const argb_scratch, - const uint32_t* const argb, - int max_quantization, - int exact, int used_subtract_green, - const uint32_t* const modes) { - const int kNumPredModes = 14; - const int start_x = tile_x << bits; - const int start_y = tile_y << bits; - const int tile_size = 1 << bits; - const int max_y = GetMin(tile_size, height - start_y); - const int max_x = GetMin(tile_size, width - start_x); - // Whether there exist columns just outside the tile. - const int have_left = (start_x > 0); - // Position and size of the strip covering the tile and adjacent columns if - // they exist. - const int context_start_x = start_x - have_left; -#if (WEBP_NEAR_LOSSLESS == 1) - const int context_width = max_x + have_left + (max_x < width - start_x); -#endif - const int tiles_per_row = VP8LSubSampleSize(width, bits); - // Prediction modes of the left and above neighbor tiles. - const int left_mode = (tile_x > 0) ? - (modes[tile_y * tiles_per_row + tile_x - 1] >> 8) & 0xff : 0xff; - const int above_mode = (tile_y > 0) ? - (modes[(tile_y - 1) * tiles_per_row + tile_x] >> 8) & 0xff : 0xff; - // The width of upper_row and current_row is one pixel larger than image width - // to allow the top right pixel to point to the leftmost pixel of the next row - // when at the right edge. - uint32_t* upper_row = argb_scratch; - uint32_t* current_row = upper_row + width + 1; - uint8_t* const max_diffs = (uint8_t*)(current_row + width + 1); - float best_diff = MAX_DIFF_COST; - int best_mode = 0; - int mode; - int histo_stack_1[4][256]; - int histo_stack_2[4][256]; - // Need pointers to be able to swap arrays. - int (*histo_argb)[256] = histo_stack_1; - int (*best_histo)[256] = histo_stack_2; - int i, j; - uint32_t residuals[1 << MAX_TRANSFORM_BITS]; - assert(bits <= MAX_TRANSFORM_BITS); - assert(max_x <= (1 << MAX_TRANSFORM_BITS)); - - for (mode = 0; mode < kNumPredModes; ++mode) { - float cur_diff; - int relative_y; - memset(histo_argb, 0, sizeof(histo_stack_1)); - if (start_y > 0) { - // Read the row above the tile which will become the first upper_row. - // Include a pixel to the left if it exists; include a pixel to the right - // in all cases (wrapping to the leftmost pixel of the next row if it does - // not exist). - memcpy(current_row + context_start_x, - argb + (start_y - 1) * width + context_start_x, - sizeof(*argb) * (max_x + have_left + 1)); - } - for (relative_y = 0; relative_y < max_y; ++relative_y) { - const int y = start_y + relative_y; - int relative_x; - uint32_t* tmp = upper_row; - upper_row = current_row; - current_row = tmp; - // Read current_row. Include a pixel to the left if it exists; include a - // pixel to the right in all cases except at the bottom right corner of - // the image (wrapping to the leftmost pixel of the next row if it does - // not exist in the current row). - memcpy(current_row + context_start_x, - argb + y * width + context_start_x, - sizeof(*argb) * (max_x + have_left + (y + 1 < height))); -#if (WEBP_NEAR_LOSSLESS == 1) - if (max_quantization > 1 && y >= 1 && y + 1 < height) { - MaxDiffsForRow(context_width, width, argb + y * width + context_start_x, - max_diffs + context_start_x, used_subtract_green); - } -#endif - - GetResidual(width, height, upper_row, current_row, max_diffs, mode, - start_x, start_x + max_x, y, max_quantization, exact, - used_subtract_green, residuals); - for (relative_x = 0; relative_x < max_x; ++relative_x) { - UpdateHisto(histo_argb, residuals[relative_x]); - } - } - cur_diff = PredictionCostSpatialHistogram( - (const int (*)[256])accumulated, (const int (*)[256])histo_argb); - // Favor keeping the areas locally similar. - if (mode == left_mode) cur_diff -= kSpatialPredictorBias; - if (mode == above_mode) cur_diff -= kSpatialPredictorBias; - - if (cur_diff < best_diff) { - int (*tmp)[256] = histo_argb; - histo_argb = best_histo; - best_histo = tmp; - best_diff = cur_diff; - best_mode = mode; - } - } - - for (i = 0; i < 4; i++) { - for (j = 0; j < 256; j++) { - accumulated[i][j] += best_histo[i][j]; - } - } - - return best_mode; -} - -// Converts pixels of the image to residuals with respect to predictions. -// If max_quantization > 1, applies near lossless processing, quantizing -// residuals to multiples of quantization levels up to max_quantization -// (the actual quantization level depends on smoothness near the given pixel). -static void CopyImageWithPrediction(int width, int height, - int bits, uint32_t* const modes, - uint32_t* const argb_scratch, - uint32_t* const argb, - int low_effort, int max_quantization, - int exact, int used_subtract_green) { - const int tiles_per_row = VP8LSubSampleSize(width, bits); - // The width of upper_row and current_row is one pixel larger than image width - // to allow the top right pixel to point to the leftmost pixel of the next row - // when at the right edge. - uint32_t* upper_row = argb_scratch; - uint32_t* current_row = upper_row + width + 1; - uint8_t* current_max_diffs = (uint8_t*)(current_row + width + 1); -#if (WEBP_NEAR_LOSSLESS == 1) - uint8_t* lower_max_diffs = current_max_diffs + width; -#endif - int y; - - for (y = 0; y < height; ++y) { - int x; - uint32_t* const tmp32 = upper_row; - upper_row = current_row; - current_row = tmp32; - memcpy(current_row, argb + y * width, - sizeof(*argb) * (width + (y + 1 < height))); - - if (low_effort) { - PredictBatch(kPredLowEffort, 0, y, width, current_row, upper_row, - argb + y * width); - } else { -#if (WEBP_NEAR_LOSSLESS == 1) - if (max_quantization > 1) { - // Compute max_diffs for the lower row now, because that needs the - // contents of argb for the current row, which we will overwrite with - // residuals before proceeding with the next row. - uint8_t* const tmp8 = current_max_diffs; - current_max_diffs = lower_max_diffs; - lower_max_diffs = tmp8; - if (y + 2 < height) { - MaxDiffsForRow(width, width, argb + (y + 1) * width, lower_max_diffs, - used_subtract_green); - } - } -#endif - for (x = 0; x < width;) { - const int mode = - (modes[(y >> bits) * tiles_per_row + (x >> bits)] >> 8) & 0xff; - int x_end = x + (1 << bits); - if (x_end > width) x_end = width; - GetResidual(width, height, upper_row, current_row, current_max_diffs, - mode, x, x_end, y, max_quantization, exact, - used_subtract_green, argb + y * width + x); - x = x_end; - } - } - } -} - -// Finds the best predictor for each tile, and converts the image to residuals -// with respect to predictions. If near_lossless_quality < 100, applies -// near lossless processing, shaving off more bits of residuals for lower -// qualities. -void VP8LResidualImage(int width, int height, int bits, int low_effort, - uint32_t* const argb, uint32_t* const argb_scratch, - uint32_t* const image, int near_lossless_quality, - int exact, int used_subtract_green) { - const int tiles_per_row = VP8LSubSampleSize(width, bits); - const int tiles_per_col = VP8LSubSampleSize(height, bits); - int tile_y; - int histo[4][256]; - const int max_quantization = 1 << VP8LNearLosslessBits(near_lossless_quality); - if (low_effort) { - int i; - for (i = 0; i < tiles_per_row * tiles_per_col; ++i) { - image[i] = ARGB_BLACK | (kPredLowEffort << 8); - } - } else { - memset(histo, 0, sizeof(histo)); - for (tile_y = 0; tile_y < tiles_per_col; ++tile_y) { - int tile_x; - for (tile_x = 0; tile_x < tiles_per_row; ++tile_x) { - const int pred = GetBestPredictorForTile(width, height, tile_x, tile_y, - bits, histo, argb_scratch, argb, max_quantization, exact, - used_subtract_green, image); - image[tile_y * tiles_per_row + tile_x] = ARGB_BLACK | (pred << 8); - } - } - } - - CopyImageWithPrediction(width, height, bits, image, argb_scratch, argb, - low_effort, max_quantization, exact, - used_subtract_green); -} - -//------------------------------------------------------------------------------ -// Color transform functions. - -static WEBP_INLINE void MultipliersClear(VP8LMultipliers* const m) { - m->green_to_red_ = 0; - m->green_to_blue_ = 0; - m->red_to_blue_ = 0; -} - -static WEBP_INLINE void ColorCodeToMultipliers(uint32_t color_code, - VP8LMultipliers* const m) { - m->green_to_red_ = (color_code >> 0) & 0xff; - m->green_to_blue_ = (color_code >> 8) & 0xff; - m->red_to_blue_ = (color_code >> 16) & 0xff; -} - -static WEBP_INLINE uint32_t MultipliersToColorCode( - const VP8LMultipliers* const m) { - return 0xff000000u | - ((uint32_t)(m->red_to_blue_) << 16) | - ((uint32_t)(m->green_to_blue_) << 8) | - m->green_to_red_; -} - -static float PredictionCostCrossColor(const int accumulated[256], - const int counts[256]) { - // Favor low entropy, locally and globally. - // Favor small absolute values for PredictionCostSpatial - static const double kExpValue = 2.4; - return VP8LCombinedShannonEntropy(counts, accumulated) + - PredictionCostSpatial(counts, 3, kExpValue); -} - -static float GetPredictionCostCrossColorRed( - const uint32_t* argb, int stride, int tile_width, int tile_height, - VP8LMultipliers prev_x, VP8LMultipliers prev_y, int green_to_red, - const int accumulated_red_histo[256]) { - int histo[256] = { 0 }; - float cur_diff; - - VP8LCollectColorRedTransforms(argb, stride, tile_width, tile_height, - green_to_red, histo); - - cur_diff = PredictionCostCrossColor(accumulated_red_histo, histo); - if ((uint8_t)green_to_red == prev_x.green_to_red_) { - cur_diff -= 3; // favor keeping the areas locally similar - } - if ((uint8_t)green_to_red == prev_y.green_to_red_) { - cur_diff -= 3; // favor keeping the areas locally similar - } - if (green_to_red == 0) { - cur_diff -= 3; - } - return cur_diff; -} - -static void GetBestGreenToRed( - const uint32_t* argb, int stride, int tile_width, int tile_height, - VP8LMultipliers prev_x, VP8LMultipliers prev_y, int quality, - const int accumulated_red_histo[256], VP8LMultipliers* const best_tx) { - const int kMaxIters = 4 + ((7 * quality) >> 8); // in range [4..6] - int green_to_red_best = 0; - int iter, offset; - float best_diff = GetPredictionCostCrossColorRed( - argb, stride, tile_width, tile_height, prev_x, prev_y, - green_to_red_best, accumulated_red_histo); - for (iter = 0; iter < kMaxIters; ++iter) { - // ColorTransformDelta is a 3.5 bit fixed point, so 32 is equal to - // one in color computation. Having initial delta here as 1 is sufficient - // to explore the range of (-2, 2). - const int delta = 32 >> iter; - // Try a negative and a positive delta from the best known value. - for (offset = -delta; offset <= delta; offset += 2 * delta) { - const int green_to_red_cur = offset + green_to_red_best; - const float cur_diff = GetPredictionCostCrossColorRed( - argb, stride, tile_width, tile_height, prev_x, prev_y, - green_to_red_cur, accumulated_red_histo); - if (cur_diff < best_diff) { - best_diff = cur_diff; - green_to_red_best = green_to_red_cur; - } - } - } - best_tx->green_to_red_ = green_to_red_best; -} - -static float GetPredictionCostCrossColorBlue( - const uint32_t* argb, int stride, int tile_width, int tile_height, - VP8LMultipliers prev_x, VP8LMultipliers prev_y, - int green_to_blue, int red_to_blue, const int accumulated_blue_histo[256]) { - int histo[256] = { 0 }; - float cur_diff; - - VP8LCollectColorBlueTransforms(argb, stride, tile_width, tile_height, - green_to_blue, red_to_blue, histo); - - cur_diff = PredictionCostCrossColor(accumulated_blue_histo, histo); - if ((uint8_t)green_to_blue == prev_x.green_to_blue_) { - cur_diff -= 3; // favor keeping the areas locally similar - } - if ((uint8_t)green_to_blue == prev_y.green_to_blue_) { - cur_diff -= 3; // favor keeping the areas locally similar - } - if ((uint8_t)red_to_blue == prev_x.red_to_blue_) { - cur_diff -= 3; // favor keeping the areas locally similar - } - if ((uint8_t)red_to_blue == prev_y.red_to_blue_) { - cur_diff -= 3; // favor keeping the areas locally similar - } - if (green_to_blue == 0) { - cur_diff -= 3; - } - if (red_to_blue == 0) { - cur_diff -= 3; - } - return cur_diff; -} - -#define kGreenRedToBlueNumAxis 8 -#define kGreenRedToBlueMaxIters 7 -static void GetBestGreenRedToBlue( - const uint32_t* argb, int stride, int tile_width, int tile_height, - VP8LMultipliers prev_x, VP8LMultipliers prev_y, int quality, - const int accumulated_blue_histo[256], - VP8LMultipliers* const best_tx) { - const int8_t offset[kGreenRedToBlueNumAxis][2] = - {{0, -1}, {0, 1}, {-1, 0}, {1, 0}, {-1, -1}, {-1, 1}, {1, -1}, {1, 1}}; - const int8_t delta_lut[kGreenRedToBlueMaxIters] = { 16, 16, 8, 4, 2, 2, 2 }; - const int iters = - (quality < 25) ? 1 : (quality > 50) ? kGreenRedToBlueMaxIters : 4; - int green_to_blue_best = 0; - int red_to_blue_best = 0; - int iter; - // Initial value at origin: - float best_diff = GetPredictionCostCrossColorBlue( - argb, stride, tile_width, tile_height, prev_x, prev_y, - green_to_blue_best, red_to_blue_best, accumulated_blue_histo); - for (iter = 0; iter < iters; ++iter) { - const int delta = delta_lut[iter]; - int axis; - for (axis = 0; axis < kGreenRedToBlueNumAxis; ++axis) { - const int green_to_blue_cur = - offset[axis][0] * delta + green_to_blue_best; - const int red_to_blue_cur = offset[axis][1] * delta + red_to_blue_best; - const float cur_diff = GetPredictionCostCrossColorBlue( - argb, stride, tile_width, tile_height, prev_x, prev_y, - green_to_blue_cur, red_to_blue_cur, accumulated_blue_histo); - if (cur_diff < best_diff) { - best_diff = cur_diff; - green_to_blue_best = green_to_blue_cur; - red_to_blue_best = red_to_blue_cur; - } - if (quality < 25 && iter == 4) { - // Only axis aligned diffs for lower quality. - break; // next iter. - } - } - if (delta == 2 && green_to_blue_best == 0 && red_to_blue_best == 0) { - // Further iterations would not help. - break; // out of iter-loop. - } - } - best_tx->green_to_blue_ = green_to_blue_best; - best_tx->red_to_blue_ = red_to_blue_best; -} -#undef kGreenRedToBlueMaxIters -#undef kGreenRedToBlueNumAxis - -static VP8LMultipliers GetBestColorTransformForTile( - int tile_x, int tile_y, int bits, - VP8LMultipliers prev_x, - VP8LMultipliers prev_y, - int quality, int xsize, int ysize, - const int accumulated_red_histo[256], - const int accumulated_blue_histo[256], - const uint32_t* const argb) { - const int max_tile_size = 1 << bits; - const int tile_y_offset = tile_y * max_tile_size; - const int tile_x_offset = tile_x * max_tile_size; - const int all_x_max = GetMin(tile_x_offset + max_tile_size, xsize); - const int all_y_max = GetMin(tile_y_offset + max_tile_size, ysize); - const int tile_width = all_x_max - tile_x_offset; - const int tile_height = all_y_max - tile_y_offset; - const uint32_t* const tile_argb = argb + tile_y_offset * xsize - + tile_x_offset; - VP8LMultipliers best_tx; - MultipliersClear(&best_tx); - - GetBestGreenToRed(tile_argb, xsize, tile_width, tile_height, - prev_x, prev_y, quality, accumulated_red_histo, &best_tx); - GetBestGreenRedToBlue(tile_argb, xsize, tile_width, tile_height, - prev_x, prev_y, quality, accumulated_blue_histo, - &best_tx); - return best_tx; -} - -static void CopyTileWithColorTransform(int xsize, int ysize, - int tile_x, int tile_y, - int max_tile_size, - VP8LMultipliers color_transform, - uint32_t* argb) { - const int xscan = GetMin(max_tile_size, xsize - tile_x); - int yscan = GetMin(max_tile_size, ysize - tile_y); - argb += tile_y * xsize + tile_x; - while (yscan-- > 0) { - VP8LTransformColor(&color_transform, argb, xscan); - argb += xsize; - } -} - -void VP8LColorSpaceTransform(int width, int height, int bits, int quality, - uint32_t* const argb, uint32_t* image) { - const int max_tile_size = 1 << bits; - const int tile_xsize = VP8LSubSampleSize(width, bits); - const int tile_ysize = VP8LSubSampleSize(height, bits); - int accumulated_red_histo[256] = { 0 }; - int accumulated_blue_histo[256] = { 0 }; - int tile_x, tile_y; - VP8LMultipliers prev_x, prev_y; - MultipliersClear(&prev_y); - MultipliersClear(&prev_x); - for (tile_y = 0; tile_y < tile_ysize; ++tile_y) { - for (tile_x = 0; tile_x < tile_xsize; ++tile_x) { - int y; - const int tile_x_offset = tile_x * max_tile_size; - const int tile_y_offset = tile_y * max_tile_size; - const int all_x_max = GetMin(tile_x_offset + max_tile_size, width); - const int all_y_max = GetMin(tile_y_offset + max_tile_size, height); - const int offset = tile_y * tile_xsize + tile_x; - if (tile_y != 0) { - ColorCodeToMultipliers(image[offset - tile_xsize], &prev_y); - } - prev_x = GetBestColorTransformForTile(tile_x, tile_y, bits, - prev_x, prev_y, - quality, width, height, - accumulated_red_histo, - accumulated_blue_histo, - argb); - image[offset] = MultipliersToColorCode(&prev_x); - CopyTileWithColorTransform(width, height, tile_x_offset, tile_y_offset, - max_tile_size, prev_x, argb); - - // Gather accumulated histogram data. - for (y = tile_y_offset; y < all_y_max; ++y) { - int ix = y * width + tile_x_offset; - const int ix_end = ix + all_x_max - tile_x_offset; - for (; ix < ix_end; ++ix) { - const uint32_t pix = argb[ix]; - if (ix >= 2 && - pix == argb[ix - 2] && - pix == argb[ix - 1]) { - continue; // repeated pixels are handled by backward references - } - if (ix >= width + 2 && - argb[ix - 2] == argb[ix - width - 2] && - argb[ix - 1] == argb[ix - width - 1] && - pix == argb[ix - width]) { - continue; // repeated pixels are handled by backward references - } - ++accumulated_red_histo[(pix >> 16) & 0xff]; - ++accumulated_blue_histo[(pix >> 0) & 0xff]; - } - } - } - } -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/quant_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/quant_enc.c deleted file mode 100644 index 36d03d0..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/quant_enc.c +++ /dev/null @@ -1,1370 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Quantization -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include -#include // for abs() - -#include "src/enc/vp8i_enc.h" -#include "src/enc/cost_enc.h" - -#define DO_TRELLIS_I4 1 -#define DO_TRELLIS_I16 1 // not a huge gain, but ok at low bitrate. -#define DO_TRELLIS_UV 0 // disable trellis for UV. Risky. Not worth. -#define USE_TDISTO 1 - -#define MID_ALPHA 64 // neutral value for susceptibility -#define MIN_ALPHA 30 // lowest usable value for susceptibility -#define MAX_ALPHA 100 // higher meaningful value for susceptibility - -#define SNS_TO_DQ 0.9 // Scaling constant between the sns value and the QP - // power-law modulation. Must be strictly less than 1. - -// number of non-zero coeffs below which we consider the block very flat -// (and apply a penalty to complex predictions) -#define FLATNESS_LIMIT_I16 10 // I16 mode -#define FLATNESS_LIMIT_I4 3 // I4 mode -#define FLATNESS_LIMIT_UV 2 // UV mode -#define FLATNESS_PENALTY 140 // roughly ~1bit per block - -#define MULT_8B(a, b) (((a) * (b) + 128) >> 8) - -#define RD_DISTO_MULT 256 // distortion multiplier (equivalent of lambda) - -// #define DEBUG_BLOCK - -//------------------------------------------------------------------------------ - -#if defined(DEBUG_BLOCK) - -#include -#include - -static void PrintBlockInfo(const VP8EncIterator* const it, - const VP8ModeScore* const rd) { - int i, j; - const int is_i16 = (it->mb_->type_ == 1); - const uint8_t* const y_in = it->yuv_in_ + Y_OFF_ENC; - const uint8_t* const y_out = it->yuv_out_ + Y_OFF_ENC; - const uint8_t* const uv_in = it->yuv_in_ + U_OFF_ENC; - const uint8_t* const uv_out = it->yuv_out_ + U_OFF_ENC; - printf("SOURCE / OUTPUT / ABS DELTA\n"); - for (j = 0; j < 16; ++j) { - for (i = 0; i < 16; ++i) printf("%3d ", y_in[i + j * BPS]); - printf(" "); - for (i = 0; i < 16; ++i) printf("%3d ", y_out[i + j * BPS]); - printf(" "); - for (i = 0; i < 16; ++i) { - printf("%1d ", abs(y_in[i + j * BPS] - y_out[i + j * BPS])); - } - printf("\n"); - } - printf("\n"); // newline before the U/V block - for (j = 0; j < 8; ++j) { - for (i = 0; i < 8; ++i) printf("%3d ", uv_in[i + j * BPS]); - printf(" "); - for (i = 8; i < 16; ++i) printf("%3d ", uv_in[i + j * BPS]); - printf(" "); - for (i = 0; i < 8; ++i) printf("%3d ", uv_out[i + j * BPS]); - printf(" "); - for (i = 8; i < 16; ++i) printf("%3d ", uv_out[i + j * BPS]); - printf(" "); - for (i = 0; i < 8; ++i) { - printf("%1d ", abs(uv_out[i + j * BPS] - uv_in[i + j * BPS])); - } - printf(" "); - for (i = 8; i < 16; ++i) { - printf("%1d ", abs(uv_out[i + j * BPS] - uv_in[i + j * BPS])); - } - printf("\n"); - } - printf("\nD:%d SD:%d R:%d H:%d nz:0x%x score:%d\n", - (int)rd->D, (int)rd->SD, (int)rd->R, (int)rd->H, (int)rd->nz, - (int)rd->score); - if (is_i16) { - printf("Mode: %d\n", rd->mode_i16); - printf("y_dc_levels:"); - for (i = 0; i < 16; ++i) printf("%3d ", rd->y_dc_levels[i]); - printf("\n"); - } else { - printf("Modes[16]: "); - for (i = 0; i < 16; ++i) printf("%d ", rd->modes_i4[i]); - printf("\n"); - } - printf("y_ac_levels:\n"); - for (j = 0; j < 16; ++j) { - for (i = is_i16 ? 1 : 0; i < 16; ++i) { - printf("%4d ", rd->y_ac_levels[j][i]); - } - printf("\n"); - } - printf("\n"); - printf("uv_levels (mode=%d):\n", rd->mode_uv); - for (j = 0; j < 8; ++j) { - for (i = 0; i < 16; ++i) { - printf("%4d ", rd->uv_levels[j][i]); - } - printf("\n"); - } -} - -#endif // DEBUG_BLOCK - -//------------------------------------------------------------------------------ - -static WEBP_INLINE int clip(int v, int m, int M) { - return v < m ? m : v > M ? M : v; -} - -static const uint8_t kZigzag[16] = { - 0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15 -}; - -static const uint8_t kDcTable[128] = { - 4, 5, 6, 7, 8, 9, 10, 10, - 11, 12, 13, 14, 15, 16, 17, 17, - 18, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 25, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, - 37, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, - 91, 93, 95, 96, 98, 100, 101, 102, - 104, 106, 108, 110, 112, 114, 116, 118, - 122, 124, 126, 128, 130, 132, 134, 136, - 138, 140, 143, 145, 148, 151, 154, 157 -}; - -static const uint16_t kAcTable[128] = { - 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 60, - 62, 64, 66, 68, 70, 72, 74, 76, - 78, 80, 82, 84, 86, 88, 90, 92, - 94, 96, 98, 100, 102, 104, 106, 108, - 110, 112, 114, 116, 119, 122, 125, 128, - 131, 134, 137, 140, 143, 146, 149, 152, - 155, 158, 161, 164, 167, 170, 173, 177, - 181, 185, 189, 193, 197, 201, 205, 209, - 213, 217, 221, 225, 229, 234, 239, 245, - 249, 254, 259, 264, 269, 274, 279, 284 -}; - -static const uint16_t kAcTable2[128] = { - 8, 8, 9, 10, 12, 13, 15, 17, - 18, 20, 21, 23, 24, 26, 27, 29, - 31, 32, 34, 35, 37, 38, 40, 41, - 43, 44, 46, 48, 49, 51, 52, 54, - 55, 57, 58, 60, 62, 63, 65, 66, - 68, 69, 71, 72, 74, 75, 77, 79, - 80, 82, 83, 85, 86, 88, 89, 93, - 96, 99, 102, 105, 108, 111, 114, 117, - 120, 124, 127, 130, 133, 136, 139, 142, - 145, 148, 151, 155, 158, 161, 164, 167, - 170, 173, 176, 179, 184, 189, 193, 198, - 203, 207, 212, 217, 221, 226, 230, 235, - 240, 244, 249, 254, 258, 263, 268, 274, - 280, 286, 292, 299, 305, 311, 317, 323, - 330, 336, 342, 348, 354, 362, 370, 379, - 385, 393, 401, 409, 416, 424, 432, 440 -}; - -static const uint8_t kBiasMatrices[3][2] = { // [luma-ac,luma-dc,chroma][dc,ac] - { 96, 110 }, { 96, 108 }, { 110, 115 } -}; - -// Sharpening by (slightly) raising the hi-frequency coeffs. -// Hack-ish but helpful for mid-bitrate range. Use with care. -#define SHARPEN_BITS 11 // number of descaling bits for sharpening bias -static const uint8_t kFreqSharpening[16] = { - 0, 30, 60, 90, - 30, 60, 90, 90, - 60, 90, 90, 90, - 90, 90, 90, 90 -}; - -//------------------------------------------------------------------------------ -// Initialize quantization parameters in VP8Matrix - -// Returns the average quantizer -static int ExpandMatrix(VP8Matrix* const m, int type) { - int i, sum; - for (i = 0; i < 2; ++i) { - const int is_ac_coeff = (i > 0); - const int bias = kBiasMatrices[type][is_ac_coeff]; - m->iq_[i] = (1 << QFIX) / m->q_[i]; - m->bias_[i] = BIAS(bias); - // zthresh_ is the exact value such that QUANTDIV(coeff, iQ, B) is: - // * zero if coeff <= zthresh - // * non-zero if coeff > zthresh - m->zthresh_[i] = ((1 << QFIX) - 1 - m->bias_[i]) / m->iq_[i]; - } - for (i = 2; i < 16; ++i) { - m->q_[i] = m->q_[1]; - m->iq_[i] = m->iq_[1]; - m->bias_[i] = m->bias_[1]; - m->zthresh_[i] = m->zthresh_[1]; - } - for (sum = 0, i = 0; i < 16; ++i) { - if (type == 0) { // we only use sharpening for AC luma coeffs - m->sharpen_[i] = (kFreqSharpening[i] * m->q_[i]) >> SHARPEN_BITS; - } else { - m->sharpen_[i] = 0; - } - sum += m->q_[i]; - } - return (sum + 8) >> 4; -} - -static void CheckLambdaValue(int* const v) { if (*v < 1) *v = 1; } - -static void SetupMatrices(VP8Encoder* enc) { - int i; - const int tlambda_scale = - (enc->method_ >= 4) ? enc->config_->sns_strength - : 0; - const int num_segments = enc->segment_hdr_.num_segments_; - for (i = 0; i < num_segments; ++i) { - VP8SegmentInfo* const m = &enc->dqm_[i]; - const int q = m->quant_; - int q_i4, q_i16, q_uv; - m->y1_.q_[0] = kDcTable[clip(q + enc->dq_y1_dc_, 0, 127)]; - m->y1_.q_[1] = kAcTable[clip(q, 0, 127)]; - - m->y2_.q_[0] = kDcTable[ clip(q + enc->dq_y2_dc_, 0, 127)] * 2; - m->y2_.q_[1] = kAcTable2[clip(q + enc->dq_y2_ac_, 0, 127)]; - - m->uv_.q_[0] = kDcTable[clip(q + enc->dq_uv_dc_, 0, 117)]; - m->uv_.q_[1] = kAcTable[clip(q + enc->dq_uv_ac_, 0, 127)]; - - q_i4 = ExpandMatrix(&m->y1_, 0); - q_i16 = ExpandMatrix(&m->y2_, 1); - q_uv = ExpandMatrix(&m->uv_, 2); - - m->lambda_i4_ = (3 * q_i4 * q_i4) >> 7; - m->lambda_i16_ = (3 * q_i16 * q_i16); - m->lambda_uv_ = (3 * q_uv * q_uv) >> 6; - m->lambda_mode_ = (1 * q_i4 * q_i4) >> 7; - m->lambda_trellis_i4_ = (7 * q_i4 * q_i4) >> 3; - m->lambda_trellis_i16_ = (q_i16 * q_i16) >> 2; - m->lambda_trellis_uv_ = (q_uv * q_uv) << 1; - m->tlambda_ = (tlambda_scale * q_i4) >> 5; - - // none of these constants should be < 1 - CheckLambdaValue(&m->lambda_i4_); - CheckLambdaValue(&m->lambda_i16_); - CheckLambdaValue(&m->lambda_uv_); - CheckLambdaValue(&m->lambda_mode_); - CheckLambdaValue(&m->lambda_trellis_i4_); - CheckLambdaValue(&m->lambda_trellis_i16_); - CheckLambdaValue(&m->lambda_trellis_uv_); - CheckLambdaValue(&m->tlambda_); - - m->min_disto_ = 20 * m->y1_.q_[0]; // quantization-aware min disto - m->max_edge_ = 0; - - m->i4_penalty_ = 1000 * q_i4 * q_i4; - } -} - -//------------------------------------------------------------------------------ -// Initialize filtering parameters - -// Very small filter-strength values have close to no visual effect. So we can -// save a little decoding-CPU by turning filtering off for these. -#define FSTRENGTH_CUTOFF 2 - -static void SetupFilterStrength(VP8Encoder* const enc) { - int i; - // level0 is in [0..500]. Using '-f 50' as filter_strength is mid-filtering. - const int level0 = 5 * enc->config_->filter_strength; - for (i = 0; i < NUM_MB_SEGMENTS; ++i) { - VP8SegmentInfo* const m = &enc->dqm_[i]; - // We focus on the quantization of AC coeffs. - const int qstep = kAcTable[clip(m->quant_, 0, 127)] >> 2; - const int base_strength = - VP8FilterStrengthFromDelta(enc->filter_hdr_.sharpness_, qstep); - // Segments with lower complexity ('beta') will be less filtered. - const int f = base_strength * level0 / (256 + m->beta_); - m->fstrength_ = (f < FSTRENGTH_CUTOFF) ? 0 : (f > 63) ? 63 : f; - } - // We record the initial strength (mainly for the case of 1-segment only). - enc->filter_hdr_.level_ = enc->dqm_[0].fstrength_; - enc->filter_hdr_.simple_ = (enc->config_->filter_type == 0); - enc->filter_hdr_.sharpness_ = enc->config_->filter_sharpness; -} - -//------------------------------------------------------------------------------ - -// Note: if you change the values below, remember that the max range -// allowed by the syntax for DQ_UV is [-16,16]. -#define MAX_DQ_UV (6) -#define MIN_DQ_UV (-4) - -// We want to emulate jpeg-like behaviour where the expected "good" quality -// is around q=75. Internally, our "good" middle is around c=50. So we -// map accordingly using linear piece-wise function -static double QualityToCompression(double c) { - const double linear_c = (c < 0.75) ? c * (2. / 3.) : 2. * c - 1.; - // The file size roughly scales as pow(quantizer, 3.). Actually, the - // exponent is somewhere between 2.8 and 3.2, but we're mostly interested - // in the mid-quant range. So we scale the compressibility inversely to - // this power-law: quant ~= compression ^ 1/3. This law holds well for - // low quant. Finer modeling for high-quant would make use of kAcTable[] - // more explicitly. - const double v = pow(linear_c, 1 / 3.); - return v; -} - -static double QualityToJPEGCompression(double c, double alpha) { - // We map the complexity 'alpha' and quality setting 'c' to a compression - // exponent empirically matched to the compression curve of libjpeg6b. - // On average, the WebP output size will be roughly similar to that of a - // JPEG file compressed with same quality factor. - const double amin = 0.30; - const double amax = 0.85; - const double exp_min = 0.4; - const double exp_max = 0.9; - const double slope = (exp_min - exp_max) / (amax - amin); - // Linearly interpolate 'expn' from exp_min to exp_max - // in the [amin, amax] range. - const double expn = (alpha > amax) ? exp_min - : (alpha < amin) ? exp_max - : exp_max + slope * (alpha - amin); - const double v = pow(c, expn); - return v; -} - -static int SegmentsAreEquivalent(const VP8SegmentInfo* const S1, - const VP8SegmentInfo* const S2) { - return (S1->quant_ == S2->quant_) && (S1->fstrength_ == S2->fstrength_); -} - -static void SimplifySegments(VP8Encoder* const enc) { - int map[NUM_MB_SEGMENTS] = { 0, 1, 2, 3 }; - // 'num_segments_' is previously validated and <= NUM_MB_SEGMENTS, but an - // explicit check is needed to avoid a spurious warning about 'i' exceeding - // array bounds of 'dqm_' with some compilers (noticed with gcc-4.9). - const int num_segments = (enc->segment_hdr_.num_segments_ < NUM_MB_SEGMENTS) - ? enc->segment_hdr_.num_segments_ - : NUM_MB_SEGMENTS; - int num_final_segments = 1; - int s1, s2; - for (s1 = 1; s1 < num_segments; ++s1) { // find similar segments - const VP8SegmentInfo* const S1 = &enc->dqm_[s1]; - int found = 0; - // check if we already have similar segment - for (s2 = 0; s2 < num_final_segments; ++s2) { - const VP8SegmentInfo* const S2 = &enc->dqm_[s2]; - if (SegmentsAreEquivalent(S1, S2)) { - found = 1; - break; - } - } - map[s1] = s2; - if (!found) { - if (num_final_segments != s1) { - enc->dqm_[num_final_segments] = enc->dqm_[s1]; - } - ++num_final_segments; - } - } - if (num_final_segments < num_segments) { // Remap - int i = enc->mb_w_ * enc->mb_h_; - while (i-- > 0) enc->mb_info_[i].segment_ = map[enc->mb_info_[i].segment_]; - enc->segment_hdr_.num_segments_ = num_final_segments; - // Replicate the trailing segment infos (it's mostly cosmetics) - for (i = num_final_segments; i < num_segments; ++i) { - enc->dqm_[i] = enc->dqm_[num_final_segments - 1]; - } - } -} - -void VP8SetSegmentParams(VP8Encoder* const enc, float quality) { - int i; - int dq_uv_ac, dq_uv_dc; - const int num_segments = enc->segment_hdr_.num_segments_; - const double amp = SNS_TO_DQ * enc->config_->sns_strength / 100. / 128.; - const double Q = quality / 100.; - const double c_base = enc->config_->emulate_jpeg_size ? - QualityToJPEGCompression(Q, enc->alpha_ / 255.) : - QualityToCompression(Q); - for (i = 0; i < num_segments; ++i) { - // We modulate the base coefficient to accommodate for the quantization - // susceptibility and allow denser segments to be quantized more. - const double expn = 1. - amp * enc->dqm_[i].alpha_; - const double c = pow(c_base, expn); - const int q = (int)(127. * (1. - c)); - assert(expn > 0.); - enc->dqm_[i].quant_ = clip(q, 0, 127); - } - - // purely indicative in the bitstream (except for the 1-segment case) - enc->base_quant_ = enc->dqm_[0].quant_; - - // fill-in values for the unused segments (required by the syntax) - for (i = num_segments; i < NUM_MB_SEGMENTS; ++i) { - enc->dqm_[i].quant_ = enc->base_quant_; - } - - // uv_alpha_ is normally spread around ~60. The useful range is - // typically ~30 (quite bad) to ~100 (ok to decimate UV more). - // We map it to the safe maximal range of MAX/MIN_DQ_UV for dq_uv. - dq_uv_ac = (enc->uv_alpha_ - MID_ALPHA) * (MAX_DQ_UV - MIN_DQ_UV) - / (MAX_ALPHA - MIN_ALPHA); - // we rescale by the user-defined strength of adaptation - dq_uv_ac = dq_uv_ac * enc->config_->sns_strength / 100; - // and make it safe. - dq_uv_ac = clip(dq_uv_ac, MIN_DQ_UV, MAX_DQ_UV); - // We also boost the dc-uv-quant a little, based on sns-strength, since - // U/V channels are quite more reactive to high quants (flat DC-blocks - // tend to appear, and are unpleasant). - dq_uv_dc = -4 * enc->config_->sns_strength / 100; - dq_uv_dc = clip(dq_uv_dc, -15, 15); // 4bit-signed max allowed - - enc->dq_y1_dc_ = 0; // TODO(skal): dq-lum - enc->dq_y2_dc_ = 0; - enc->dq_y2_ac_ = 0; - enc->dq_uv_dc_ = dq_uv_dc; - enc->dq_uv_ac_ = dq_uv_ac; - - SetupFilterStrength(enc); // initialize segments' filtering, eventually - - if (num_segments > 1) SimplifySegments(enc); - - SetupMatrices(enc); // finalize quantization matrices -} - -//------------------------------------------------------------------------------ -// Form the predictions in cache - -// Must be ordered using {DC_PRED, TM_PRED, V_PRED, H_PRED} as index -const uint16_t VP8I16ModeOffsets[4] = { I16DC16, I16TM16, I16VE16, I16HE16 }; -const uint16_t VP8UVModeOffsets[4] = { C8DC8, C8TM8, C8VE8, C8HE8 }; - -// Must be indexed using {B_DC_PRED -> B_HU_PRED} as index -const uint16_t VP8I4ModeOffsets[NUM_BMODES] = { - I4DC4, I4TM4, I4VE4, I4HE4, I4RD4, I4VR4, I4LD4, I4VL4, I4HD4, I4HU4 -}; - -void VP8MakeLuma16Preds(const VP8EncIterator* const it) { - const uint8_t* const left = it->x_ ? it->y_left_ : NULL; - const uint8_t* const top = it->y_ ? it->y_top_ : NULL; - VP8EncPredLuma16(it->yuv_p_, left, top); -} - -void VP8MakeChroma8Preds(const VP8EncIterator* const it) { - const uint8_t* const left = it->x_ ? it->u_left_ : NULL; - const uint8_t* const top = it->y_ ? it->uv_top_ : NULL; - VP8EncPredChroma8(it->yuv_p_, left, top); -} - -void VP8MakeIntra4Preds(const VP8EncIterator* const it) { - VP8EncPredLuma4(it->yuv_p_, it->i4_top_); -} - -//------------------------------------------------------------------------------ -// Quantize - -// Layout: -// +----+----+ -// |YYYY|UUVV| 0 -// |YYYY|UUVV| 4 -// |YYYY|....| 8 -// |YYYY|....| 12 -// +----+----+ - -const uint16_t VP8Scan[16] = { // Luma - 0 + 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS, - 0 + 4 * BPS, 4 + 4 * BPS, 8 + 4 * BPS, 12 + 4 * BPS, - 0 + 8 * BPS, 4 + 8 * BPS, 8 + 8 * BPS, 12 + 8 * BPS, - 0 + 12 * BPS, 4 + 12 * BPS, 8 + 12 * BPS, 12 + 12 * BPS, -}; - -static const uint16_t VP8ScanUV[4 + 4] = { - 0 + 0 * BPS, 4 + 0 * BPS, 0 + 4 * BPS, 4 + 4 * BPS, // U - 8 + 0 * BPS, 12 + 0 * BPS, 8 + 4 * BPS, 12 + 4 * BPS // V -}; - -//------------------------------------------------------------------------------ -// Distortion measurement - -static const uint16_t kWeightY[16] = { - 38, 32, 20, 9, 32, 28, 17, 7, 20, 17, 10, 4, 9, 7, 4, 2 -}; - -static const uint16_t kWeightTrellis[16] = { -#if USE_TDISTO == 0 - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 -#else - 30, 27, 19, 11, - 27, 24, 17, 10, - 19, 17, 12, 8, - 11, 10, 8, 6 -#endif -}; - -// Init/Copy the common fields in score. -static void InitScore(VP8ModeScore* const rd) { - rd->D = 0; - rd->SD = 0; - rd->R = 0; - rd->H = 0; - rd->nz = 0; - rd->score = MAX_COST; -} - -static void CopyScore(VP8ModeScore* const dst, const VP8ModeScore* const src) { - dst->D = src->D; - dst->SD = src->SD; - dst->R = src->R; - dst->H = src->H; - dst->nz = src->nz; // note that nz is not accumulated, but just copied. - dst->score = src->score; -} - -static void AddScore(VP8ModeScore* const dst, const VP8ModeScore* const src) { - dst->D += src->D; - dst->SD += src->SD; - dst->R += src->R; - dst->H += src->H; - dst->nz |= src->nz; // here, new nz bits are accumulated. - dst->score += src->score; -} - -//------------------------------------------------------------------------------ -// Performs trellis-optimized quantization. - -// Trellis node -typedef struct { - int8_t prev; // best previous node - int8_t sign; // sign of coeff_i - int16_t level; // level -} Node; - -// Score state -typedef struct { - score_t score; // partial RD score - const uint16_t* costs; // shortcut to cost tables -} ScoreState; - -// If a coefficient was quantized to a value Q (using a neutral bias), -// we test all alternate possibilities between [Q-MIN_DELTA, Q+MAX_DELTA] -// We don't test negative values though. -#define MIN_DELTA 0 // how much lower level to try -#define MAX_DELTA 1 // how much higher -#define NUM_NODES (MIN_DELTA + 1 + MAX_DELTA) -#define NODE(n, l) (nodes[(n)][(l) + MIN_DELTA]) -#define SCORE_STATE(n, l) (score_states[n][(l) + MIN_DELTA]) - -static WEBP_INLINE void SetRDScore(int lambda, VP8ModeScore* const rd) { - rd->score = (rd->R + rd->H) * lambda + RD_DISTO_MULT * (rd->D + rd->SD); -} - -static WEBP_INLINE score_t RDScoreTrellis(int lambda, score_t rate, - score_t distortion) { - return rate * lambda + RD_DISTO_MULT * distortion; -} - -static int TrellisQuantizeBlock(const VP8Encoder* const enc, - int16_t in[16], int16_t out[16], - int ctx0, int coeff_type, - const VP8Matrix* const mtx, - int lambda) { - const ProbaArray* const probas = enc->proba_.coeffs_[coeff_type]; - CostArrayPtr const costs = - (CostArrayPtr)enc->proba_.remapped_costs_[coeff_type]; - const int first = (coeff_type == 0) ? 1 : 0; - Node nodes[16][NUM_NODES]; - ScoreState score_states[2][NUM_NODES]; - ScoreState* ss_cur = &SCORE_STATE(0, MIN_DELTA); - ScoreState* ss_prev = &SCORE_STATE(1, MIN_DELTA); - int best_path[3] = {-1, -1, -1}; // store best-last/best-level/best-previous - score_t best_score; - int n, m, p, last; - - { - score_t cost; - const int thresh = mtx->q_[1] * mtx->q_[1] / 4; - const int last_proba = probas[VP8EncBands[first]][ctx0][0]; - - // compute the position of the last interesting coefficient - last = first - 1; - for (n = 15; n >= first; --n) { - const int j = kZigzag[n]; - const int err = in[j] * in[j]; - if (err > thresh) { - last = n; - break; - } - } - // we don't need to go inspect up to n = 16 coeffs. We can just go up - // to last + 1 (inclusive) without losing much. - if (last < 15) ++last; - - // compute 'skip' score. This is the max score one can do. - cost = VP8BitCost(0, last_proba); - best_score = RDScoreTrellis(lambda, cost, 0); - - // initialize source node. - for (m = -MIN_DELTA; m <= MAX_DELTA; ++m) { - const score_t rate = (ctx0 == 0) ? VP8BitCost(1, last_proba) : 0; - ss_cur[m].score = RDScoreTrellis(lambda, rate, 0); - ss_cur[m].costs = costs[first][ctx0]; - } - } - - // traverse trellis. - for (n = first; n <= last; ++n) { - const int j = kZigzag[n]; - const uint32_t Q = mtx->q_[j]; - const uint32_t iQ = mtx->iq_[j]; - const uint32_t B = BIAS(0x00); // neutral bias - // note: it's important to take sign of the _original_ coeff, - // so we don't have to consider level < 0 afterward. - const int sign = (in[j] < 0); - const uint32_t coeff0 = (sign ? -in[j] : in[j]) + mtx->sharpen_[j]; - int level0 = QUANTDIV(coeff0, iQ, B); - int thresh_level = QUANTDIV(coeff0, iQ, BIAS(0x80)); - if (thresh_level > MAX_LEVEL) thresh_level = MAX_LEVEL; - if (level0 > MAX_LEVEL) level0 = MAX_LEVEL; - - { // Swap current and previous score states - ScoreState* const tmp = ss_cur; - ss_cur = ss_prev; - ss_prev = tmp; - } - - // test all alternate level values around level0. - for (m = -MIN_DELTA; m <= MAX_DELTA; ++m) { - Node* const cur = &NODE(n, m); - int level = level0 + m; - const int ctx = (level > 2) ? 2 : level; - const int band = VP8EncBands[n + 1]; - score_t base_score; - score_t best_cur_score = MAX_COST; - int best_prev = 0; // default, in case - - ss_cur[m].score = MAX_COST; - ss_cur[m].costs = costs[n + 1][ctx]; - if (level < 0 || level > thresh_level) { - // Node is dead. - continue; - } - - { - // Compute delta_error = how much coding this level will - // subtract to max_error as distortion. - // Here, distortion = sum of (|coeff_i| - level_i * Q_i)^2 - const int new_error = coeff0 - level * Q; - const int delta_error = - kWeightTrellis[j] * (new_error * new_error - coeff0 * coeff0); - base_score = RDScoreTrellis(lambda, 0, delta_error); - } - - // Inspect all possible non-dead predecessors. Retain only the best one. - for (p = -MIN_DELTA; p <= MAX_DELTA; ++p) { - // Dead nodes (with ss_prev[p].score >= MAX_COST) are automatically - // eliminated since their score can't be better than the current best. - const score_t cost = VP8LevelCost(ss_prev[p].costs, level); - // Examine node assuming it's a non-terminal one. - const score_t score = - base_score + ss_prev[p].score + RDScoreTrellis(lambda, cost, 0); - if (score < best_cur_score) { - best_cur_score = score; - best_prev = p; - } - } - // Store best finding in current node. - cur->sign = sign; - cur->level = level; - cur->prev = best_prev; - ss_cur[m].score = best_cur_score; - - // Now, record best terminal node (and thus best entry in the graph). - if (level != 0) { - const score_t last_pos_cost = - (n < 15) ? VP8BitCost(0, probas[band][ctx][0]) : 0; - const score_t last_pos_score = RDScoreTrellis(lambda, last_pos_cost, 0); - const score_t score = best_cur_score + last_pos_score; - if (score < best_score) { - best_score = score; - best_path[0] = n; // best eob position - best_path[1] = m; // best node index - best_path[2] = best_prev; // best predecessor - } - } - } - } - - // Fresh start - memset(in + first, 0, (16 - first) * sizeof(*in)); - memset(out + first, 0, (16 - first) * sizeof(*out)); - if (best_path[0] == -1) { - return 0; // skip! - } - - { - // Unwind the best path. - // Note: best-prev on terminal node is not necessarily equal to the - // best_prev for non-terminal. So we patch best_path[2] in. - int nz = 0; - int best_node = best_path[1]; - n = best_path[0]; - NODE(n, best_node).prev = best_path[2]; // force best-prev for terminal - - for (; n >= first; --n) { - const Node* const node = &NODE(n, best_node); - const int j = kZigzag[n]; - out[n] = node->sign ? -node->level : node->level; - nz |= node->level; - in[j] = out[n] * mtx->q_[j]; - best_node = node->prev; - } - return (nz != 0); - } -} - -#undef NODE - -//------------------------------------------------------------------------------ -// Performs: difference, transform, quantize, back-transform, add -// all at once. Output is the reconstructed block in *yuv_out, and the -// quantized levels in *levels. - -static int ReconstructIntra16(VP8EncIterator* const it, - VP8ModeScore* const rd, - uint8_t* const yuv_out, - int mode) { - const VP8Encoder* const enc = it->enc_; - const uint8_t* const ref = it->yuv_p_ + VP8I16ModeOffsets[mode]; - const uint8_t* const src = it->yuv_in_ + Y_OFF_ENC; - const VP8SegmentInfo* const dqm = &enc->dqm_[it->mb_->segment_]; - int nz = 0; - int n; - int16_t tmp[16][16], dc_tmp[16]; - - for (n = 0; n < 16; n += 2) { - VP8FTransform2(src + VP8Scan[n], ref + VP8Scan[n], tmp[n]); - } - VP8FTransformWHT(tmp[0], dc_tmp); - nz |= VP8EncQuantizeBlockWHT(dc_tmp, rd->y_dc_levels, &dqm->y2_) << 24; - - if (DO_TRELLIS_I16 && it->do_trellis_) { - int x, y; - VP8IteratorNzToBytes(it); - for (y = 0, n = 0; y < 4; ++y) { - for (x = 0; x < 4; ++x, ++n) { - const int ctx = it->top_nz_[x] + it->left_nz_[y]; - const int non_zero = - TrellisQuantizeBlock(enc, tmp[n], rd->y_ac_levels[n], ctx, 0, - &dqm->y1_, dqm->lambda_trellis_i16_); - it->top_nz_[x] = it->left_nz_[y] = non_zero; - rd->y_ac_levels[n][0] = 0; - nz |= non_zero << n; - } - } - } else { - for (n = 0; n < 16; n += 2) { - // Zero-out the first coeff, so that: a) nz is correct below, and - // b) finding 'last' non-zero coeffs in SetResidualCoeffs() is simplified. - tmp[n][0] = tmp[n + 1][0] = 0; - nz |= VP8EncQuantize2Blocks(tmp[n], rd->y_ac_levels[n], &dqm->y1_) << n; - assert(rd->y_ac_levels[n + 0][0] == 0); - assert(rd->y_ac_levels[n + 1][0] == 0); - } - } - - // Transform back - VP8TransformWHT(dc_tmp, tmp[0]); - for (n = 0; n < 16; n += 2) { - VP8ITransform(ref + VP8Scan[n], tmp[n], yuv_out + VP8Scan[n], 1); - } - - return nz; -} - -static int ReconstructIntra4(VP8EncIterator* const it, - int16_t levels[16], - const uint8_t* const src, - uint8_t* const yuv_out, - int mode) { - const VP8Encoder* const enc = it->enc_; - const uint8_t* const ref = it->yuv_p_ + VP8I4ModeOffsets[mode]; - const VP8SegmentInfo* const dqm = &enc->dqm_[it->mb_->segment_]; - int nz = 0; - int16_t tmp[16]; - - VP8FTransform(src, ref, tmp); - if (DO_TRELLIS_I4 && it->do_trellis_) { - const int x = it->i4_ & 3, y = it->i4_ >> 2; - const int ctx = it->top_nz_[x] + it->left_nz_[y]; - nz = TrellisQuantizeBlock(enc, tmp, levels, ctx, 3, &dqm->y1_, - dqm->lambda_trellis_i4_); - } else { - nz = VP8EncQuantizeBlock(tmp, levels, &dqm->y1_); - } - VP8ITransform(ref, tmp, yuv_out, 0); - return nz; -} - -//------------------------------------------------------------------------------ -// DC-error diffusion - -// Diffusion weights. We under-correct a bit (15/16th of the error is actually -// diffused) to avoid 'rainbow' chessboard pattern of blocks at q~=0. -#define C1 7 // fraction of error sent to the 4x4 block below -#define C2 8 // fraction of error sent to the 4x4 block on the right -#define DSHIFT 4 -#define DSCALE 1 // storage descaling, needed to make the error fit int8_t - -// Quantize as usual, but also compute and return the quantization error. -// Error is already divided by DSHIFT. -static int QuantizeSingle(int16_t* const v, const VP8Matrix* const mtx) { - int V = *v; - const int sign = (V < 0); - if (sign) V = -V; - if (V > (int)mtx->zthresh_[0]) { - const int qV = QUANTDIV(V, mtx->iq_[0], mtx->bias_[0]) * mtx->q_[0]; - const int err = (V - qV); - *v = sign ? -qV : qV; - return (sign ? -err : err) >> DSCALE; - } - *v = 0; - return (sign ? -V : V) >> DSCALE; -} - -static void CorrectDCValues(const VP8EncIterator* const it, - const VP8Matrix* const mtx, - int16_t tmp[][16], VP8ModeScore* const rd) { - // | top[0] | top[1] - // --------+--------+--------- - // left[0] | tmp[0] tmp[1] <-> err0 err1 - // left[1] | tmp[2] tmp[3] err2 err3 - // - // Final errors {err1,err2,err3} are preserved and later restored - // as top[]/left[] on the next block. - int ch; - for (ch = 0; ch <= 1; ++ch) { - const int8_t* const top = it->top_derr_[it->x_][ch]; - const int8_t* const left = it->left_derr_[ch]; - int16_t (* const c)[16] = &tmp[ch * 4]; - int err0, err1, err2, err3; - c[0][0] += (C1 * top[0] + C2 * left[0]) >> (DSHIFT - DSCALE); - err0 = QuantizeSingle(&c[0][0], mtx); - c[1][0] += (C1 * top[1] + C2 * err0) >> (DSHIFT - DSCALE); - err1 = QuantizeSingle(&c[1][0], mtx); - c[2][0] += (C1 * err0 + C2 * left[1]) >> (DSHIFT - DSCALE); - err2 = QuantizeSingle(&c[2][0], mtx); - c[3][0] += (C1 * err1 + C2 * err2) >> (DSHIFT - DSCALE); - err3 = QuantizeSingle(&c[3][0], mtx); - // error 'err' is bounded by mtx->q_[0] which is 132 at max. Hence - // err >> DSCALE will fit in an int8_t type if DSCALE>=1. - assert(abs(err1) <= 127 && abs(err2) <= 127 && abs(err3) <= 127); - rd->derr[ch][0] = (int8_t)err1; - rd->derr[ch][1] = (int8_t)err2; - rd->derr[ch][2] = (int8_t)err3; - } -} - -static void StoreDiffusionErrors(VP8EncIterator* const it, - const VP8ModeScore* const rd) { - int ch; - for (ch = 0; ch <= 1; ++ch) { - int8_t* const top = it->top_derr_[it->x_][ch]; - int8_t* const left = it->left_derr_[ch]; - left[0] = rd->derr[ch][0]; // restore err1 - left[1] = 3 * rd->derr[ch][2] >> 2; // ... 3/4th of err3 - top[0] = rd->derr[ch][1]; // ... err2 - top[1] = rd->derr[ch][2] - left[1]; // ... 1/4th of err3. - } -} - -#undef C1 -#undef C2 -#undef DSHIFT -#undef DSCALE - -//------------------------------------------------------------------------------ - -static int ReconstructUV(VP8EncIterator* const it, VP8ModeScore* const rd, - uint8_t* const yuv_out, int mode) { - const VP8Encoder* const enc = it->enc_; - const uint8_t* const ref = it->yuv_p_ + VP8UVModeOffsets[mode]; - const uint8_t* const src = it->yuv_in_ + U_OFF_ENC; - const VP8SegmentInfo* const dqm = &enc->dqm_[it->mb_->segment_]; - int nz = 0; - int n; - int16_t tmp[8][16]; - - for (n = 0; n < 8; n += 2) { - VP8FTransform2(src + VP8ScanUV[n], ref + VP8ScanUV[n], tmp[n]); - } - if (it->top_derr_ != NULL) CorrectDCValues(it, &dqm->uv_, tmp, rd); - - if (DO_TRELLIS_UV && it->do_trellis_) { - int ch, x, y; - for (ch = 0, n = 0; ch <= 2; ch += 2) { - for (y = 0; y < 2; ++y) { - for (x = 0; x < 2; ++x, ++n) { - const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y]; - const int non_zero = - TrellisQuantizeBlock(enc, tmp[n], rd->uv_levels[n], ctx, 2, - &dqm->uv_, dqm->lambda_trellis_uv_); - it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] = non_zero; - nz |= non_zero << n; - } - } - } - } else { - for (n = 0; n < 8; n += 2) { - nz |= VP8EncQuantize2Blocks(tmp[n], rd->uv_levels[n], &dqm->uv_) << n; - } - } - - for (n = 0; n < 8; n += 2) { - VP8ITransform(ref + VP8ScanUV[n], tmp[n], yuv_out + VP8ScanUV[n], 1); - } - return (nz << 16); -} - -//------------------------------------------------------------------------------ -// RD-opt decision. Reconstruct each modes, evalue distortion and bit-cost. -// Pick the mode is lower RD-cost = Rate + lambda * Distortion. - -static void StoreMaxDelta(VP8SegmentInfo* const dqm, const int16_t DCs[16]) { - // We look at the first three AC coefficients to determine what is the average - // delta between each sub-4x4 block. - const int v0 = abs(DCs[1]); - const int v1 = abs(DCs[2]); - const int v2 = abs(DCs[4]); - int max_v = (v1 > v0) ? v1 : v0; - max_v = (v2 > max_v) ? v2 : max_v; - if (max_v > dqm->max_edge_) dqm->max_edge_ = max_v; -} - -static void SwapModeScore(VP8ModeScore** a, VP8ModeScore** b) { - VP8ModeScore* const tmp = *a; - *a = *b; - *b = tmp; -} - -static void SwapPtr(uint8_t** a, uint8_t** b) { - uint8_t* const tmp = *a; - *a = *b; - *b = tmp; -} - -static void SwapOut(VP8EncIterator* const it) { - SwapPtr(&it->yuv_out_, &it->yuv_out2_); -} - -static score_t IsFlat(const int16_t* levels, int num_blocks, score_t thresh) { - score_t score = 0; - while (num_blocks-- > 0) { // TODO(skal): refine positional scoring? - int i; - for (i = 1; i < 16; ++i) { // omit DC, we're only interested in AC - score += (levels[i] != 0); - if (score > thresh) return 0; - } - levels += 16; - } - return 1; -} - -static void PickBestIntra16(VP8EncIterator* const it, VP8ModeScore* rd) { - const int kNumBlocks = 16; - VP8SegmentInfo* const dqm = &it->enc_->dqm_[it->mb_->segment_]; - const int lambda = dqm->lambda_i16_; - const int tlambda = dqm->tlambda_; - const uint8_t* const src = it->yuv_in_ + Y_OFF_ENC; - VP8ModeScore rd_tmp; - VP8ModeScore* rd_cur = &rd_tmp; - VP8ModeScore* rd_best = rd; - int mode; - - rd->mode_i16 = -1; - for (mode = 0; mode < NUM_PRED_MODES; ++mode) { - uint8_t* const tmp_dst = it->yuv_out2_ + Y_OFF_ENC; // scratch buffer - rd_cur->mode_i16 = mode; - - // Reconstruct - rd_cur->nz = ReconstructIntra16(it, rd_cur, tmp_dst, mode); - - // Measure RD-score - rd_cur->D = VP8SSE16x16(src, tmp_dst); - rd_cur->SD = - tlambda ? MULT_8B(tlambda, VP8TDisto16x16(src, tmp_dst, kWeightY)) : 0; - rd_cur->H = VP8FixedCostsI16[mode]; - rd_cur->R = VP8GetCostLuma16(it, rd_cur); - if (mode > 0 && - IsFlat(rd_cur->y_ac_levels[0], kNumBlocks, FLATNESS_LIMIT_I16)) { - // penalty to avoid flat area to be mispredicted by complex mode - rd_cur->R += FLATNESS_PENALTY * kNumBlocks; - } - - // Since we always examine Intra16 first, we can overwrite *rd directly. - SetRDScore(lambda, rd_cur); - if (mode == 0 || rd_cur->score < rd_best->score) { - SwapModeScore(&rd_cur, &rd_best); - SwapOut(it); - } - } - if (rd_best != rd) { - memcpy(rd, rd_best, sizeof(*rd)); - } - SetRDScore(dqm->lambda_mode_, rd); // finalize score for mode decision. - VP8SetIntra16Mode(it, rd->mode_i16); - - // we have a blocky macroblock (only DCs are non-zero) with fairly high - // distortion, record max delta so we can later adjust the minimal filtering - // strength needed to smooth these blocks out. - if ((rd->nz & 0x100ffff) == 0x1000000 && rd->D > dqm->min_disto_) { - StoreMaxDelta(dqm, rd->y_dc_levels); - } -} - -//------------------------------------------------------------------------------ - -// return the cost array corresponding to the surrounding prediction modes. -static const uint16_t* GetCostModeI4(VP8EncIterator* const it, - const uint8_t modes[16]) { - const int preds_w = it->enc_->preds_w_; - const int x = (it->i4_ & 3), y = it->i4_ >> 2; - const int left = (x == 0) ? it->preds_[y * preds_w - 1] : modes[it->i4_ - 1]; - const int top = (y == 0) ? it->preds_[-preds_w + x] : modes[it->i4_ - 4]; - return VP8FixedCostsI4[top][left]; -} - -static int PickBestIntra4(VP8EncIterator* const it, VP8ModeScore* const rd) { - const VP8Encoder* const enc = it->enc_; - const VP8SegmentInfo* const dqm = &enc->dqm_[it->mb_->segment_]; - const int lambda = dqm->lambda_i4_; - const int tlambda = dqm->tlambda_; - const uint8_t* const src0 = it->yuv_in_ + Y_OFF_ENC; - uint8_t* const best_blocks = it->yuv_out2_ + Y_OFF_ENC; - int total_header_bits = 0; - VP8ModeScore rd_best; - - if (enc->max_i4_header_bits_ == 0) { - return 0; - } - - InitScore(&rd_best); - rd_best.H = 211; // '211' is the value of VP8BitCost(0, 145) - SetRDScore(dqm->lambda_mode_, &rd_best); - VP8IteratorStartI4(it); - do { - const int kNumBlocks = 1; - VP8ModeScore rd_i4; - int mode; - int best_mode = -1; - const uint8_t* const src = src0 + VP8Scan[it->i4_]; - const uint16_t* const mode_costs = GetCostModeI4(it, rd->modes_i4); - uint8_t* best_block = best_blocks + VP8Scan[it->i4_]; - uint8_t* tmp_dst = it->yuv_p_ + I4TMP; // scratch buffer. - - InitScore(&rd_i4); - VP8MakeIntra4Preds(it); - for (mode = 0; mode < NUM_BMODES; ++mode) { - VP8ModeScore rd_tmp; - int16_t tmp_levels[16]; - - // Reconstruct - rd_tmp.nz = - ReconstructIntra4(it, tmp_levels, src, tmp_dst, mode) << it->i4_; - - // Compute RD-score - rd_tmp.D = VP8SSE4x4(src, tmp_dst); - rd_tmp.SD = - tlambda ? MULT_8B(tlambda, VP8TDisto4x4(src, tmp_dst, kWeightY)) - : 0; - rd_tmp.H = mode_costs[mode]; - - // Add flatness penalty - if (mode > 0 && IsFlat(tmp_levels, kNumBlocks, FLATNESS_LIMIT_I4)) { - rd_tmp.R = FLATNESS_PENALTY * kNumBlocks; - } else { - rd_tmp.R = 0; - } - - // early-out check - SetRDScore(lambda, &rd_tmp); - if (best_mode >= 0 && rd_tmp.score >= rd_i4.score) continue; - - // finish computing score - rd_tmp.R += VP8GetCostLuma4(it, tmp_levels); - SetRDScore(lambda, &rd_tmp); - - if (best_mode < 0 || rd_tmp.score < rd_i4.score) { - CopyScore(&rd_i4, &rd_tmp); - best_mode = mode; - SwapPtr(&tmp_dst, &best_block); - memcpy(rd_best.y_ac_levels[it->i4_], tmp_levels, - sizeof(rd_best.y_ac_levels[it->i4_])); - } - } - SetRDScore(dqm->lambda_mode_, &rd_i4); - AddScore(&rd_best, &rd_i4); - if (rd_best.score >= rd->score) { - return 0; - } - total_header_bits += (int)rd_i4.H; // <- equal to mode_costs[best_mode]; - if (total_header_bits > enc->max_i4_header_bits_) { - return 0; - } - // Copy selected samples if not in the right place already. - if (best_block != best_blocks + VP8Scan[it->i4_]) { - VP8Copy4x4(best_block, best_blocks + VP8Scan[it->i4_]); - } - rd->modes_i4[it->i4_] = best_mode; - it->top_nz_[it->i4_ & 3] = it->left_nz_[it->i4_ >> 2] = (rd_i4.nz ? 1 : 0); - } while (VP8IteratorRotateI4(it, best_blocks)); - - // finalize state - CopyScore(rd, &rd_best); - VP8SetIntra4Mode(it, rd->modes_i4); - SwapOut(it); - memcpy(rd->y_ac_levels, rd_best.y_ac_levels, sizeof(rd->y_ac_levels)); - return 1; // select intra4x4 over intra16x16 -} - -//------------------------------------------------------------------------------ - -static void PickBestUV(VP8EncIterator* const it, VP8ModeScore* const rd) { - const int kNumBlocks = 8; - const VP8SegmentInfo* const dqm = &it->enc_->dqm_[it->mb_->segment_]; - const int lambda = dqm->lambda_uv_; - const uint8_t* const src = it->yuv_in_ + U_OFF_ENC; - uint8_t* tmp_dst = it->yuv_out2_ + U_OFF_ENC; // scratch buffer - uint8_t* dst0 = it->yuv_out_ + U_OFF_ENC; - uint8_t* dst = dst0; - VP8ModeScore rd_best; - int mode; - - rd->mode_uv = -1; - InitScore(&rd_best); - for (mode = 0; mode < NUM_PRED_MODES; ++mode) { - VP8ModeScore rd_uv; - - // Reconstruct - rd_uv.nz = ReconstructUV(it, &rd_uv, tmp_dst, mode); - - // Compute RD-score - rd_uv.D = VP8SSE16x8(src, tmp_dst); - rd_uv.SD = 0; // not calling TDisto here: it tends to flatten areas. - rd_uv.H = VP8FixedCostsUV[mode]; - rd_uv.R = VP8GetCostUV(it, &rd_uv); - if (mode > 0 && IsFlat(rd_uv.uv_levels[0], kNumBlocks, FLATNESS_LIMIT_UV)) { - rd_uv.R += FLATNESS_PENALTY * kNumBlocks; - } - - SetRDScore(lambda, &rd_uv); - if (mode == 0 || rd_uv.score < rd_best.score) { - CopyScore(&rd_best, &rd_uv); - rd->mode_uv = mode; - memcpy(rd->uv_levels, rd_uv.uv_levels, sizeof(rd->uv_levels)); - if (it->top_derr_ != NULL) { - memcpy(rd->derr, rd_uv.derr, sizeof(rd_uv.derr)); - } - SwapPtr(&dst, &tmp_dst); - } - } - VP8SetIntraUVMode(it, rd->mode_uv); - AddScore(rd, &rd_best); - if (dst != dst0) { // copy 16x8 block if needed - VP8Copy16x8(dst, dst0); - } - if (it->top_derr_ != NULL) { // store diffusion errors for next block - StoreDiffusionErrors(it, rd); - } -} - -//------------------------------------------------------------------------------ -// Final reconstruction and quantization. - -static void SimpleQuantize(VP8EncIterator* const it, VP8ModeScore* const rd) { - const VP8Encoder* const enc = it->enc_; - const int is_i16 = (it->mb_->type_ == 1); - int nz = 0; - - if (is_i16) { - nz = ReconstructIntra16(it, rd, it->yuv_out_ + Y_OFF_ENC, it->preds_[0]); - } else { - VP8IteratorStartI4(it); - do { - const int mode = - it->preds_[(it->i4_ & 3) + (it->i4_ >> 2) * enc->preds_w_]; - const uint8_t* const src = it->yuv_in_ + Y_OFF_ENC + VP8Scan[it->i4_]; - uint8_t* const dst = it->yuv_out_ + Y_OFF_ENC + VP8Scan[it->i4_]; - VP8MakeIntra4Preds(it); - nz |= ReconstructIntra4(it, rd->y_ac_levels[it->i4_], - src, dst, mode) << it->i4_; - } while (VP8IteratorRotateI4(it, it->yuv_out_ + Y_OFF_ENC)); - } - - nz |= ReconstructUV(it, rd, it->yuv_out_ + U_OFF_ENC, it->mb_->uv_mode_); - rd->nz = nz; -} - -// Refine intra16/intra4 sub-modes based on distortion only (not rate). -static void RefineUsingDistortion(VP8EncIterator* const it, - int try_both_modes, int refine_uv_mode, - VP8ModeScore* const rd) { - score_t best_score = MAX_COST; - int nz = 0; - int mode; - int is_i16 = try_both_modes || (it->mb_->type_ == 1); - - const VP8SegmentInfo* const dqm = &it->enc_->dqm_[it->mb_->segment_]; - // Some empiric constants, of approximate order of magnitude. - const int lambda_d_i16 = 106; - const int lambda_d_i4 = 11; - const int lambda_d_uv = 120; - score_t score_i4 = dqm->i4_penalty_; - score_t i4_bit_sum = 0; - const score_t bit_limit = try_both_modes ? it->enc_->mb_header_limit_ - : MAX_COST; // no early-out allowed - - if (is_i16) { // First, evaluate Intra16 distortion - int best_mode = -1; - const uint8_t* const src = it->yuv_in_ + Y_OFF_ENC; - for (mode = 0; mode < NUM_PRED_MODES; ++mode) { - const uint8_t* const ref = it->yuv_p_ + VP8I16ModeOffsets[mode]; - const score_t score = (score_t)VP8SSE16x16(src, ref) * RD_DISTO_MULT - + VP8FixedCostsI16[mode] * lambda_d_i16; - if (mode > 0 && VP8FixedCostsI16[mode] > bit_limit) { - continue; - } - if (score < best_score) { - best_mode = mode; - best_score = score; - } - } - VP8SetIntra16Mode(it, best_mode); - // we'll reconstruct later, if i16 mode actually gets selected - } - - // Next, evaluate Intra4 - if (try_both_modes || !is_i16) { - // We don't evaluate the rate here, but just account for it through a - // constant penalty (i4 mode usually needs more bits compared to i16). - is_i16 = 0; - VP8IteratorStartI4(it); - do { - int best_i4_mode = -1; - score_t best_i4_score = MAX_COST; - const uint8_t* const src = it->yuv_in_ + Y_OFF_ENC + VP8Scan[it->i4_]; - const uint16_t* const mode_costs = GetCostModeI4(it, rd->modes_i4); - - VP8MakeIntra4Preds(it); - for (mode = 0; mode < NUM_BMODES; ++mode) { - const uint8_t* const ref = it->yuv_p_ + VP8I4ModeOffsets[mode]; - const score_t score = VP8SSE4x4(src, ref) * RD_DISTO_MULT - + mode_costs[mode] * lambda_d_i4; - if (score < best_i4_score) { - best_i4_mode = mode; - best_i4_score = score; - } - } - i4_bit_sum += mode_costs[best_i4_mode]; - rd->modes_i4[it->i4_] = best_i4_mode; - score_i4 += best_i4_score; - if (score_i4 >= best_score || i4_bit_sum > bit_limit) { - // Intra4 won't be better than Intra16. Bail out and pick Intra16. - is_i16 = 1; - break; - } else { // reconstruct partial block inside yuv_out2_ buffer - uint8_t* const tmp_dst = it->yuv_out2_ + Y_OFF_ENC + VP8Scan[it->i4_]; - nz |= ReconstructIntra4(it, rd->y_ac_levels[it->i4_], - src, tmp_dst, best_i4_mode) << it->i4_; - } - } while (VP8IteratorRotateI4(it, it->yuv_out2_ + Y_OFF_ENC)); - } - - // Final reconstruction, depending on which mode is selected. - if (!is_i16) { - VP8SetIntra4Mode(it, rd->modes_i4); - SwapOut(it); - best_score = score_i4; - } else { - nz = ReconstructIntra16(it, rd, it->yuv_out_ + Y_OFF_ENC, it->preds_[0]); - } - - // ... and UV! - if (refine_uv_mode) { - int best_mode = -1; - score_t best_uv_score = MAX_COST; - const uint8_t* const src = it->yuv_in_ + U_OFF_ENC; - for (mode = 0; mode < NUM_PRED_MODES; ++mode) { - const uint8_t* const ref = it->yuv_p_ + VP8UVModeOffsets[mode]; - const score_t score = VP8SSE16x8(src, ref) * RD_DISTO_MULT - + VP8FixedCostsUV[mode] * lambda_d_uv; - if (score < best_uv_score) { - best_mode = mode; - best_uv_score = score; - } - } - VP8SetIntraUVMode(it, best_mode); - } - nz |= ReconstructUV(it, rd, it->yuv_out_ + U_OFF_ENC, it->mb_->uv_mode_); - - rd->nz = nz; - rd->score = best_score; -} - -//------------------------------------------------------------------------------ -// Entry point - -int VP8Decimate(VP8EncIterator* const it, VP8ModeScore* const rd, - VP8RDLevel rd_opt) { - int is_skipped; - const int method = it->enc_->method_; - - InitScore(rd); - - // We can perform predictions for Luma16x16 and Chroma8x8 already. - // Luma4x4 predictions needs to be done as-we-go. - VP8MakeLuma16Preds(it); - VP8MakeChroma8Preds(it); - - if (rd_opt > RD_OPT_NONE) { - it->do_trellis_ = (rd_opt >= RD_OPT_TRELLIS_ALL); - PickBestIntra16(it, rd); - if (method >= 2) { - PickBestIntra4(it, rd); - } - PickBestUV(it, rd); - if (rd_opt == RD_OPT_TRELLIS) { // finish off with trellis-optim now - it->do_trellis_ = 1; - SimpleQuantize(it, rd); - } - } else { - // At this point we have heuristically decided intra16 / intra4. - // For method >= 2, pick the best intra4/intra16 based on SSE (~tad slower). - // For method <= 1, we don't re-examine the decision but just go ahead with - // quantization/reconstruction. - RefineUsingDistortion(it, (method >= 2), (method >= 1), rd); - } - is_skipped = (rd->nz == 0); - VP8SetSkip(it, is_skipped); - return is_skipped; -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/syntax_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/syntax_enc.c deleted file mode 100644 index df3a809..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/syntax_enc.c +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Header syntax writing -// -// Author: Skal (pascal.massimino@gmail.com) - -#include - -#include "src/utils/utils.h" -#include "src/webp/format_constants.h" // RIFF constants -#include "src/webp/mux_types.h" // ALPHA_FLAG -#include "src/enc/vp8i_enc.h" - -//------------------------------------------------------------------------------ -// Helper functions - -static int IsVP8XNeeded(const VP8Encoder* const enc) { - return !!enc->has_alpha_; // Currently the only case when VP8X is needed. - // This could change in the future. -} - -static int PutPaddingByte(const WebPPicture* const pic) { - const uint8_t pad_byte[1] = { 0 }; - return !!pic->writer(pad_byte, 1, pic); -} - -//------------------------------------------------------------------------------ -// Writers for header's various pieces (in order of appearance) - -static WebPEncodingError PutRIFFHeader(const VP8Encoder* const enc, - size_t riff_size) { - const WebPPicture* const pic = enc->pic_; - uint8_t riff[RIFF_HEADER_SIZE] = { - 'R', 'I', 'F', 'F', 0, 0, 0, 0, 'W', 'E', 'B', 'P' - }; - assert(riff_size == (uint32_t)riff_size); - PutLE32(riff + TAG_SIZE, (uint32_t)riff_size); - if (!pic->writer(riff, sizeof(riff), pic)) { - return VP8_ENC_ERROR_BAD_WRITE; - } - return VP8_ENC_OK; -} - -static WebPEncodingError PutVP8XHeader(const VP8Encoder* const enc) { - const WebPPicture* const pic = enc->pic_; - uint8_t vp8x[CHUNK_HEADER_SIZE + VP8X_CHUNK_SIZE] = { - 'V', 'P', '8', 'X' - }; - uint32_t flags = 0; - - assert(IsVP8XNeeded(enc)); - assert(pic->width >= 1 && pic->height >= 1); - assert(pic->width <= MAX_CANVAS_SIZE && pic->height <= MAX_CANVAS_SIZE); - - if (enc->has_alpha_) { - flags |= ALPHA_FLAG; - } - - PutLE32(vp8x + TAG_SIZE, VP8X_CHUNK_SIZE); - PutLE32(vp8x + CHUNK_HEADER_SIZE, flags); - PutLE24(vp8x + CHUNK_HEADER_SIZE + 4, pic->width - 1); - PutLE24(vp8x + CHUNK_HEADER_SIZE + 7, pic->height - 1); - if (!pic->writer(vp8x, sizeof(vp8x), pic)) { - return VP8_ENC_ERROR_BAD_WRITE; - } - return VP8_ENC_OK; -} - -static WebPEncodingError PutAlphaChunk(const VP8Encoder* const enc) { - const WebPPicture* const pic = enc->pic_; - uint8_t alpha_chunk_hdr[CHUNK_HEADER_SIZE] = { - 'A', 'L', 'P', 'H' - }; - - assert(enc->has_alpha_); - - // Alpha chunk header. - PutLE32(alpha_chunk_hdr + TAG_SIZE, enc->alpha_data_size_); - if (!pic->writer(alpha_chunk_hdr, sizeof(alpha_chunk_hdr), pic)) { - return VP8_ENC_ERROR_BAD_WRITE; - } - - // Alpha chunk data. - if (!pic->writer(enc->alpha_data_, enc->alpha_data_size_, pic)) { - return VP8_ENC_ERROR_BAD_WRITE; - } - - // Padding. - if ((enc->alpha_data_size_ & 1) && !PutPaddingByte(pic)) { - return VP8_ENC_ERROR_BAD_WRITE; - } - return VP8_ENC_OK; -} - -static WebPEncodingError PutVP8Header(const WebPPicture* const pic, - size_t vp8_size) { - uint8_t vp8_chunk_hdr[CHUNK_HEADER_SIZE] = { - 'V', 'P', '8', ' ' - }; - assert(vp8_size == (uint32_t)vp8_size); - PutLE32(vp8_chunk_hdr + TAG_SIZE, (uint32_t)vp8_size); - if (!pic->writer(vp8_chunk_hdr, sizeof(vp8_chunk_hdr), pic)) { - return VP8_ENC_ERROR_BAD_WRITE; - } - return VP8_ENC_OK; -} - -static WebPEncodingError PutVP8FrameHeader(const WebPPicture* const pic, - int profile, size_t size0) { - uint8_t vp8_frm_hdr[VP8_FRAME_HEADER_SIZE]; - uint32_t bits; - - if (size0 >= VP8_MAX_PARTITION0_SIZE) { // partition #0 is too big to fit - return VP8_ENC_ERROR_PARTITION0_OVERFLOW; - } - - // Paragraph 9.1. - bits = 0 // keyframe (1b) - | (profile << 1) // profile (3b) - | (1 << 4) // visible (1b) - | ((uint32_t)size0 << 5); // partition length (19b) - vp8_frm_hdr[0] = (bits >> 0) & 0xff; - vp8_frm_hdr[1] = (bits >> 8) & 0xff; - vp8_frm_hdr[2] = (bits >> 16) & 0xff; - // signature - vp8_frm_hdr[3] = (VP8_SIGNATURE >> 16) & 0xff; - vp8_frm_hdr[4] = (VP8_SIGNATURE >> 8) & 0xff; - vp8_frm_hdr[5] = (VP8_SIGNATURE >> 0) & 0xff; - // dimensions - vp8_frm_hdr[6] = pic->width & 0xff; - vp8_frm_hdr[7] = pic->width >> 8; - vp8_frm_hdr[8] = pic->height & 0xff; - vp8_frm_hdr[9] = pic->height >> 8; - - if (!pic->writer(vp8_frm_hdr, sizeof(vp8_frm_hdr), pic)) { - return VP8_ENC_ERROR_BAD_WRITE; - } - return VP8_ENC_OK; -} - -// WebP Headers. -static int PutWebPHeaders(const VP8Encoder* const enc, size_t size0, - size_t vp8_size, size_t riff_size) { - WebPPicture* const pic = enc->pic_; - WebPEncodingError err = VP8_ENC_OK; - - // RIFF header. - err = PutRIFFHeader(enc, riff_size); - if (err != VP8_ENC_OK) goto Error; - - // VP8X. - if (IsVP8XNeeded(enc)) { - err = PutVP8XHeader(enc); - if (err != VP8_ENC_OK) goto Error; - } - - // Alpha. - if (enc->has_alpha_) { - err = PutAlphaChunk(enc); - if (err != VP8_ENC_OK) goto Error; - } - - // VP8 header. - err = PutVP8Header(pic, vp8_size); - if (err != VP8_ENC_OK) goto Error; - - // VP8 frame header. - err = PutVP8FrameHeader(pic, enc->profile_, size0); - if (err != VP8_ENC_OK) goto Error; - - // All OK. - return 1; - - // Error. - Error: - return WebPEncodingSetError(pic, err); -} - -// Segmentation header -static void PutSegmentHeader(VP8BitWriter* const bw, - const VP8Encoder* const enc) { - const VP8EncSegmentHeader* const hdr = &enc->segment_hdr_; - const VP8EncProba* const proba = &enc->proba_; - if (VP8PutBitUniform(bw, (hdr->num_segments_ > 1))) { - // We always 'update' the quant and filter strength values - const int update_data = 1; - int s; - VP8PutBitUniform(bw, hdr->update_map_); - if (VP8PutBitUniform(bw, update_data)) { - // we always use absolute values, not relative ones - VP8PutBitUniform(bw, 1); // (segment_feature_mode = 1. Paragraph 9.3.) - for (s = 0; s < NUM_MB_SEGMENTS; ++s) { - VP8PutSignedBits(bw, enc->dqm_[s].quant_, 7); - } - for (s = 0; s < NUM_MB_SEGMENTS; ++s) { - VP8PutSignedBits(bw, enc->dqm_[s].fstrength_, 6); - } - } - if (hdr->update_map_) { - for (s = 0; s < 3; ++s) { - if (VP8PutBitUniform(bw, (proba->segments_[s] != 255u))) { - VP8PutBits(bw, proba->segments_[s], 8); - } - } - } - } -} - -// Filtering parameters header -static void PutFilterHeader(VP8BitWriter* const bw, - const VP8EncFilterHeader* const hdr) { - const int use_lf_delta = (hdr->i4x4_lf_delta_ != 0); - VP8PutBitUniform(bw, hdr->simple_); - VP8PutBits(bw, hdr->level_, 6); - VP8PutBits(bw, hdr->sharpness_, 3); - if (VP8PutBitUniform(bw, use_lf_delta)) { - // '0' is the default value for i4x4_lf_delta_ at frame #0. - const int need_update = (hdr->i4x4_lf_delta_ != 0); - if (VP8PutBitUniform(bw, need_update)) { - // we don't use ref_lf_delta => emit four 0 bits - VP8PutBits(bw, 0, 4); - // we use mode_lf_delta for i4x4 - VP8PutSignedBits(bw, hdr->i4x4_lf_delta_, 6); - VP8PutBits(bw, 0, 3); // all others unused - } - } -} - -// Nominal quantization parameters -static void PutQuant(VP8BitWriter* const bw, - const VP8Encoder* const enc) { - VP8PutBits(bw, enc->base_quant_, 7); - VP8PutSignedBits(bw, enc->dq_y1_dc_, 4); - VP8PutSignedBits(bw, enc->dq_y2_dc_, 4); - VP8PutSignedBits(bw, enc->dq_y2_ac_, 4); - VP8PutSignedBits(bw, enc->dq_uv_dc_, 4); - VP8PutSignedBits(bw, enc->dq_uv_ac_, 4); -} - -// Partition sizes -static int EmitPartitionsSize(const VP8Encoder* const enc, - WebPPicture* const pic) { - uint8_t buf[3 * (MAX_NUM_PARTITIONS - 1)]; - int p; - for (p = 0; p < enc->num_parts_ - 1; ++p) { - const size_t part_size = VP8BitWriterSize(enc->parts_ + p); - if (part_size >= VP8_MAX_PARTITION_SIZE) { - return WebPEncodingSetError(pic, VP8_ENC_ERROR_PARTITION_OVERFLOW); - } - buf[3 * p + 0] = (part_size >> 0) & 0xff; - buf[3 * p + 1] = (part_size >> 8) & 0xff; - buf[3 * p + 2] = (part_size >> 16) & 0xff; - } - return p ? pic->writer(buf, 3 * p, pic) : 1; -} - -//------------------------------------------------------------------------------ - -static int GeneratePartition0(VP8Encoder* const enc) { - VP8BitWriter* const bw = &enc->bw_; - const int mb_size = enc->mb_w_ * enc->mb_h_; - uint64_t pos1, pos2, pos3; - - pos1 = VP8BitWriterPos(bw); - if (!VP8BitWriterInit(bw, mb_size * 7 / 8)) { // ~7 bits per macroblock - return WebPEncodingSetError(enc->pic_, VP8_ENC_ERROR_OUT_OF_MEMORY); - } - VP8PutBitUniform(bw, 0); // colorspace - VP8PutBitUniform(bw, 0); // clamp type - - PutSegmentHeader(bw, enc); - PutFilterHeader(bw, &enc->filter_hdr_); - VP8PutBits(bw, enc->num_parts_ == 8 ? 3 : - enc->num_parts_ == 4 ? 2 : - enc->num_parts_ == 2 ? 1 : 0, 2); - PutQuant(bw, enc); - VP8PutBitUniform(bw, 0); // no proba update - VP8WriteProbas(bw, &enc->proba_); - pos2 = VP8BitWriterPos(bw); - VP8CodeIntraModes(enc); - VP8BitWriterFinish(bw); - - pos3 = VP8BitWriterPos(bw); - -#if !defined(WEBP_DISABLE_STATS) - if (enc->pic_->stats) { - enc->pic_->stats->header_bytes[0] = (int)((pos2 - pos1 + 7) >> 3); - enc->pic_->stats->header_bytes[1] = (int)((pos3 - pos2 + 7) >> 3); - enc->pic_->stats->alpha_data_size = (int)enc->alpha_data_size_; - } -#else - (void)pos1; - (void)pos2; - (void)pos3; -#endif - if (bw->error_) { - return WebPEncodingSetError(enc->pic_, VP8_ENC_ERROR_OUT_OF_MEMORY); - } - return 1; -} - -void VP8EncFreeBitWriters(VP8Encoder* const enc) { - int p; - VP8BitWriterWipeOut(&enc->bw_); - for (p = 0; p < enc->num_parts_; ++p) { - VP8BitWriterWipeOut(enc->parts_ + p); - } -} - -int VP8EncWrite(VP8Encoder* const enc) { - WebPPicture* const pic = enc->pic_; - VP8BitWriter* const bw = &enc->bw_; - const int task_percent = 19; - const int percent_per_part = task_percent / enc->num_parts_; - const int final_percent = enc->percent_ + task_percent; - int ok = 0; - size_t vp8_size, pad, riff_size; - int p; - - // Partition #0 with header and partition sizes - ok = GeneratePartition0(enc); - if (!ok) return 0; - - // Compute VP8 size - vp8_size = VP8_FRAME_HEADER_SIZE + - VP8BitWriterSize(bw) + - 3 * (enc->num_parts_ - 1); - for (p = 0; p < enc->num_parts_; ++p) { - vp8_size += VP8BitWriterSize(enc->parts_ + p); - } - pad = vp8_size & 1; - vp8_size += pad; - - // Compute RIFF size - // At the minimum it is: "WEBPVP8 nnnn" + VP8 data size. - riff_size = TAG_SIZE + CHUNK_HEADER_SIZE + vp8_size; - if (IsVP8XNeeded(enc)) { // Add size for: VP8X header + data. - riff_size += CHUNK_HEADER_SIZE + VP8X_CHUNK_SIZE; - } - if (enc->has_alpha_) { // Add size for: ALPH header + data. - const uint32_t padded_alpha_size = enc->alpha_data_size_ + - (enc->alpha_data_size_ & 1); - riff_size += CHUNK_HEADER_SIZE + padded_alpha_size; - } - // Sanity check. - if (riff_size > 0xfffffffeU) { - return WebPEncodingSetError(pic, VP8_ENC_ERROR_FILE_TOO_BIG); - } - - // Emit headers and partition #0 - { - const uint8_t* const part0 = VP8BitWriterBuf(bw); - const size_t size0 = VP8BitWriterSize(bw); - ok = ok && PutWebPHeaders(enc, size0, vp8_size, riff_size) - && pic->writer(part0, size0, pic) - && EmitPartitionsSize(enc, pic); - VP8BitWriterWipeOut(bw); // will free the internal buffer. - } - - // Token partitions - for (p = 0; p < enc->num_parts_; ++p) { - const uint8_t* const buf = VP8BitWriterBuf(enc->parts_ + p); - const size_t size = VP8BitWriterSize(enc->parts_ + p); - if (size) ok = ok && pic->writer(buf, size, pic); - VP8BitWriterWipeOut(enc->parts_ + p); // will free the internal buffer. - ok = ok && WebPReportProgress(pic, enc->percent_ + percent_per_part, - &enc->percent_); - } - - // Padding byte - if (ok && pad) { - ok = PutPaddingByte(pic); - } - - enc->coded_size_ = (int)(CHUNK_HEADER_SIZE + riff_size); - ok = ok && WebPReportProgress(pic, final_percent, &enc->percent_); - return ok; -} - -//------------------------------------------------------------------------------ - diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/token_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/token_enc.c deleted file mode 100644 index 376c45f..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/token_enc.c +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Paginated token buffer -// -// A 'token' is a bit value associated with a probability, either fixed -// or a later-to-be-determined after statistics have been collected. -// For dynamic probability, we just record the slot id (idx) for the probability -// value in the final probability array (uint8_t* probas in VP8EmitTokens). -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include -#include - -#include "src/enc/cost_enc.h" -#include "src/enc/vp8i_enc.h" -#include "src/utils/utils.h" - -#if !defined(DISABLE_TOKEN_BUFFER) - -// we use pages to reduce the number of memcpy() -#define MIN_PAGE_SIZE 8192 // minimum number of token per page -#define FIXED_PROBA_BIT (1u << 14) - -typedef uint16_t token_t; // bit #15: bit value - // bit #14: flags for constant proba or idx - // bits #0..13: slot or constant proba -struct VP8Tokens { - VP8Tokens* next_; // pointer to next page -}; -// Token data is located in memory just after the next_ field. -// This macro is used to return their address and hide the trick. -#define TOKEN_DATA(p) ((const token_t*)&(p)[1]) - -//------------------------------------------------------------------------------ - -void VP8TBufferInit(VP8TBuffer* const b, int page_size) { - b->tokens_ = NULL; - b->pages_ = NULL; - b->last_page_ = &b->pages_; - b->left_ = 0; - b->page_size_ = (page_size < MIN_PAGE_SIZE) ? MIN_PAGE_SIZE : page_size; - b->error_ = 0; -} - -void VP8TBufferClear(VP8TBuffer* const b) { - if (b != NULL) { - VP8Tokens* p = b->pages_; - while (p != NULL) { - VP8Tokens* const next = p->next_; - WebPSafeFree(p); - p = next; - } - VP8TBufferInit(b, b->page_size_); - } -} - -static int TBufferNewPage(VP8TBuffer* const b) { - VP8Tokens* page = NULL; - if (!b->error_) { - const size_t size = sizeof(*page) + b->page_size_ * sizeof(token_t); - page = (VP8Tokens*)WebPSafeMalloc(1ULL, size); - } - if (page == NULL) { - b->error_ = 1; - return 0; - } - page->next_ = NULL; - - *b->last_page_ = page; - b->last_page_ = &page->next_; - b->left_ = b->page_size_; - b->tokens_ = (token_t*)TOKEN_DATA(page); - return 1; -} - -//------------------------------------------------------------------------------ - -#define TOKEN_ID(t, b, ctx) \ - (NUM_PROBAS * ((ctx) + NUM_CTX * ((b) + NUM_BANDS * (t)))) - -static WEBP_INLINE uint32_t AddToken(VP8TBuffer* const b, uint32_t bit, - uint32_t proba_idx, - proba_t* const stats) { - assert(proba_idx < FIXED_PROBA_BIT); - assert(bit <= 1); - if (b->left_ > 0 || TBufferNewPage(b)) { - const int slot = --b->left_; - b->tokens_[slot] = (bit << 15) | proba_idx; - } - VP8RecordStats(bit, stats); - return bit; -} - -static WEBP_INLINE void AddConstantToken(VP8TBuffer* const b, - uint32_t bit, uint32_t proba) { - assert(proba < 256); - assert(bit <= 1); - if (b->left_ > 0 || TBufferNewPage(b)) { - const int slot = --b->left_; - b->tokens_[slot] = (bit << 15) | FIXED_PROBA_BIT | proba; - } -} - -int VP8RecordCoeffTokens(int ctx, const struct VP8Residual* const res, - VP8TBuffer* const tokens) { - const int16_t* const coeffs = res->coeffs; - const int coeff_type = res->coeff_type; - const int last = res->last; - int n = res->first; - uint32_t base_id = TOKEN_ID(coeff_type, n, ctx); - // should be stats[VP8EncBands[n]], but it's equivalent for n=0 or 1 - proba_t* s = res->stats[n][ctx]; - if (!AddToken(tokens, last >= 0, base_id + 0, s + 0)) { - return 0; - } - - while (n < 16) { - const int c = coeffs[n++]; - const int sign = c < 0; - const uint32_t v = sign ? -c : c; - if (!AddToken(tokens, v != 0, base_id + 1, s + 1)) { - base_id = TOKEN_ID(coeff_type, VP8EncBands[n], 0); // ctx=0 - s = res->stats[VP8EncBands[n]][0]; - continue; - } - if (!AddToken(tokens, v > 1, base_id + 2, s + 2)) { - base_id = TOKEN_ID(coeff_type, VP8EncBands[n], 1); // ctx=1 - s = res->stats[VP8EncBands[n]][1]; - } else { - if (!AddToken(tokens, v > 4, base_id + 3, s + 3)) { - if (AddToken(tokens, v != 2, base_id + 4, s + 4)) { - AddToken(tokens, v == 4, base_id + 5, s + 5); - } - } else if (!AddToken(tokens, v > 10, base_id + 6, s + 6)) { - if (!AddToken(tokens, v > 6, base_id + 7, s + 7)) { - AddConstantToken(tokens, v == 6, 159); - } else { - AddConstantToken(tokens, v >= 9, 165); - AddConstantToken(tokens, !(v & 1), 145); - } - } else { - int mask; - const uint8_t* tab; - uint32_t residue = v - 3; - if (residue < (8 << 1)) { // VP8Cat3 (3b) - AddToken(tokens, 0, base_id + 8, s + 8); - AddToken(tokens, 0, base_id + 9, s + 9); - residue -= (8 << 0); - mask = 1 << 2; - tab = VP8Cat3; - } else if (residue < (8 << 2)) { // VP8Cat4 (4b) - AddToken(tokens, 0, base_id + 8, s + 8); - AddToken(tokens, 1, base_id + 9, s + 9); - residue -= (8 << 1); - mask = 1 << 3; - tab = VP8Cat4; - } else if (residue < (8 << 3)) { // VP8Cat5 (5b) - AddToken(tokens, 1, base_id + 8, s + 8); - AddToken(tokens, 0, base_id + 10, s + 9); - residue -= (8 << 2); - mask = 1 << 4; - tab = VP8Cat5; - } else { // VP8Cat6 (11b) - AddToken(tokens, 1, base_id + 8, s + 8); - AddToken(tokens, 1, base_id + 10, s + 9); - residue -= (8 << 3); - mask = 1 << 10; - tab = VP8Cat6; - } - while (mask) { - AddConstantToken(tokens, !!(residue & mask), *tab++); - mask >>= 1; - } - } - base_id = TOKEN_ID(coeff_type, VP8EncBands[n], 2); // ctx=2 - s = res->stats[VP8EncBands[n]][2]; - } - AddConstantToken(tokens, sign, 128); - if (n == 16 || !AddToken(tokens, n <= last, base_id + 0, s + 0)) { - return 1; // EOB - } - } - return 1; -} - -#undef TOKEN_ID - -//------------------------------------------------------------------------------ -// Final coding pass, with known probabilities - -int VP8EmitTokens(VP8TBuffer* const b, VP8BitWriter* const bw, - const uint8_t* const probas, int final_pass) { - const VP8Tokens* p = b->pages_; - assert(!b->error_); - while (p != NULL) { - const VP8Tokens* const next = p->next_; - const int N = (next == NULL) ? b->left_ : 0; - int n = b->page_size_; - const token_t* const tokens = TOKEN_DATA(p); - while (n-- > N) { - const token_t token = tokens[n]; - const int bit = (token >> 15) & 1; - if (token & FIXED_PROBA_BIT) { - VP8PutBit(bw, bit, token & 0xffu); // constant proba - } else { - VP8PutBit(bw, bit, probas[token & 0x3fffu]); - } - } - if (final_pass) WebPSafeFree((void*)p); - p = next; - } - if (final_pass) b->pages_ = NULL; - return 1; -} - -// Size estimation -size_t VP8EstimateTokenSize(VP8TBuffer* const b, const uint8_t* const probas) { - size_t size = 0; - const VP8Tokens* p = b->pages_; - assert(!b->error_); - while (p != NULL) { - const VP8Tokens* const next = p->next_; - const int N = (next == NULL) ? b->left_ : 0; - int n = b->page_size_; - const token_t* const tokens = TOKEN_DATA(p); - while (n-- > N) { - const token_t token = tokens[n]; - const int bit = token & (1 << 15); - if (token & FIXED_PROBA_BIT) { - size += VP8BitCost(bit, token & 0xffu); - } else { - size += VP8BitCost(bit, probas[token & 0x3fffu]); - } - } - p = next; - } - return size; -} - -//------------------------------------------------------------------------------ - -#else // DISABLE_TOKEN_BUFFER - -void VP8TBufferInit(VP8TBuffer* const b, int page_size) { - (void)b; - (void)page_size; -} -void VP8TBufferClear(VP8TBuffer* const b) { - (void)b; -} - -#endif // !DISABLE_TOKEN_BUFFER - diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/tree_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/tree_enc.c deleted file mode 100644 index 5a2d301..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/tree_enc.c +++ /dev/null @@ -1,504 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Coding of token probabilities, intra modes and segments. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/enc/vp8i_enc.h" - -//------------------------------------------------------------------------------ -// Default probabilities - -// Paragraph 13.5 -const uint8_t - VP8CoeffsProba0[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS] = { - { { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } - }, - { { 253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128 }, - { 189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128 }, - { 106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128 } - }, - { { 1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128 }, - { 181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128 }, - { 78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128 }, - }, - { { 1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128 }, - { 184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128 }, - { 77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128 }, - }, - { { 1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128 }, - { 170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128 }, - { 37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128 } - }, - { { 1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128 }, - { 207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128 }, - { 102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128 } - }, - { { 1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128 }, - { 177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128 }, - { 80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128 } - }, - { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } - } - }, - { { { 198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62 }, - { 131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1 }, - { 68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128 } - }, - { { 1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128 }, - { 184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128 }, - { 81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128 } - }, - { { 1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128 }, - { 99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128 }, - { 23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128 } - }, - { { 1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128 }, - { 109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128 }, - { 44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128 } - }, - { { 1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128 }, - { 94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128 }, - { 22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128 } - }, - { { 1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128 }, - { 124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128 }, - { 35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128 } - }, - { { 1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128 }, - { 121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128 }, - { 45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128 } - }, - { { 1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128 }, - { 203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128 } - } - }, - { { { 253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128 }, - { 175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128 }, - { 73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128 } - }, - { { 1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128 }, - { 239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128 }, - { 155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128 } - }, - { { 1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128 }, - { 201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128 }, - { 69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128 } - }, - { { 1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128 }, - { 141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128 } - }, - { { 1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128 }, - { 149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 } - }, - { { 1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128 } - }, - { { 1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128 } - }, - { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } - } - }, - { { { 202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255 }, - { 126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128 }, - { 61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128 } - }, - { { 1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128 }, - { 166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128 }, - { 39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128 } - }, - { { 1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128 }, - { 124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128 }, - { 24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128 } - }, - { { 1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128 }, - { 149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128 }, - { 28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128 } - }, - { { 1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128 }, - { 123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128 }, - { 20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128 } - }, - { { 1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128 }, - { 168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128 }, - { 47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128 } - }, - { { 1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128 }, - { 141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128 }, - { 42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128 } - }, - { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 } - } - } -}; - -void VP8DefaultProbas(VP8Encoder* const enc) { - VP8EncProba* const probas = &enc->proba_; - probas->use_skip_proba_ = 0; - memset(probas->segments_, 255u, sizeof(probas->segments_)); - memcpy(probas->coeffs_, VP8CoeffsProba0, sizeof(VP8CoeffsProba0)); - // Note: we could hard-code the level_costs_ corresponding to VP8CoeffsProba0, - // but that's ~11k of static data. Better call VP8CalculateLevelCosts() later. - probas->dirty_ = 1; -} - -// Paragraph 11.5. 900bytes. -static const uint8_t kBModesProba[NUM_BMODES][NUM_BMODES][NUM_BMODES - 1] = { - { { 231, 120, 48, 89, 115, 113, 120, 152, 112 }, - { 152, 179, 64, 126, 170, 118, 46, 70, 95 }, - { 175, 69, 143, 80, 85, 82, 72, 155, 103 }, - { 56, 58, 10, 171, 218, 189, 17, 13, 152 }, - { 114, 26, 17, 163, 44, 195, 21, 10, 173 }, - { 121, 24, 80, 195, 26, 62, 44, 64, 85 }, - { 144, 71, 10, 38, 171, 213, 144, 34, 26 }, - { 170, 46, 55, 19, 136, 160, 33, 206, 71 }, - { 63, 20, 8, 114, 114, 208, 12, 9, 226 }, - { 81, 40, 11, 96, 182, 84, 29, 16, 36 } }, - { { 134, 183, 89, 137, 98, 101, 106, 165, 148 }, - { 72, 187, 100, 130, 157, 111, 32, 75, 80 }, - { 66, 102, 167, 99, 74, 62, 40, 234, 128 }, - { 41, 53, 9, 178, 241, 141, 26, 8, 107 }, - { 74, 43, 26, 146, 73, 166, 49, 23, 157 }, - { 65, 38, 105, 160, 51, 52, 31, 115, 128 }, - { 104, 79, 12, 27, 217, 255, 87, 17, 7 }, - { 87, 68, 71, 44, 114, 51, 15, 186, 23 }, - { 47, 41, 14, 110, 182, 183, 21, 17, 194 }, - { 66, 45, 25, 102, 197, 189, 23, 18, 22 } }, - { { 88, 88, 147, 150, 42, 46, 45, 196, 205 }, - { 43, 97, 183, 117, 85, 38, 35, 179, 61 }, - { 39, 53, 200, 87, 26, 21, 43, 232, 171 }, - { 56, 34, 51, 104, 114, 102, 29, 93, 77 }, - { 39, 28, 85, 171, 58, 165, 90, 98, 64 }, - { 34, 22, 116, 206, 23, 34, 43, 166, 73 }, - { 107, 54, 32, 26, 51, 1, 81, 43, 31 }, - { 68, 25, 106, 22, 64, 171, 36, 225, 114 }, - { 34, 19, 21, 102, 132, 188, 16, 76, 124 }, - { 62, 18, 78, 95, 85, 57, 50, 48, 51 } }, - { { 193, 101, 35, 159, 215, 111, 89, 46, 111 }, - { 60, 148, 31, 172, 219, 228, 21, 18, 111 }, - { 112, 113, 77, 85, 179, 255, 38, 120, 114 }, - { 40, 42, 1, 196, 245, 209, 10, 25, 109 }, - { 88, 43, 29, 140, 166, 213, 37, 43, 154 }, - { 61, 63, 30, 155, 67, 45, 68, 1, 209 }, - { 100, 80, 8, 43, 154, 1, 51, 26, 71 }, - { 142, 78, 78, 16, 255, 128, 34, 197, 171 }, - { 41, 40, 5, 102, 211, 183, 4, 1, 221 }, - { 51, 50, 17, 168, 209, 192, 23, 25, 82 } }, - { { 138, 31, 36, 171, 27, 166, 38, 44, 229 }, - { 67, 87, 58, 169, 82, 115, 26, 59, 179 }, - { 63, 59, 90, 180, 59, 166, 93, 73, 154 }, - { 40, 40, 21, 116, 143, 209, 34, 39, 175 }, - { 47, 15, 16, 183, 34, 223, 49, 45, 183 }, - { 46, 17, 33, 183, 6, 98, 15, 32, 183 }, - { 57, 46, 22, 24, 128, 1, 54, 17, 37 }, - { 65, 32, 73, 115, 28, 128, 23, 128, 205 }, - { 40, 3, 9, 115, 51, 192, 18, 6, 223 }, - { 87, 37, 9, 115, 59, 77, 64, 21, 47 } }, - { { 104, 55, 44, 218, 9, 54, 53, 130, 226 }, - { 64, 90, 70, 205, 40, 41, 23, 26, 57 }, - { 54, 57, 112, 184, 5, 41, 38, 166, 213 }, - { 30, 34, 26, 133, 152, 116, 10, 32, 134 }, - { 39, 19, 53, 221, 26, 114, 32, 73, 255 }, - { 31, 9, 65, 234, 2, 15, 1, 118, 73 }, - { 75, 32, 12, 51, 192, 255, 160, 43, 51 }, - { 88, 31, 35, 67, 102, 85, 55, 186, 85 }, - { 56, 21, 23, 111, 59, 205, 45, 37, 192 }, - { 55, 38, 70, 124, 73, 102, 1, 34, 98 } }, - { { 125, 98, 42, 88, 104, 85, 117, 175, 82 }, - { 95, 84, 53, 89, 128, 100, 113, 101, 45 }, - { 75, 79, 123, 47, 51, 128, 81, 171, 1 }, - { 57, 17, 5, 71, 102, 57, 53, 41, 49 }, - { 38, 33, 13, 121, 57, 73, 26, 1, 85 }, - { 41, 10, 67, 138, 77, 110, 90, 47, 114 }, - { 115, 21, 2, 10, 102, 255, 166, 23, 6 }, - { 101, 29, 16, 10, 85, 128, 101, 196, 26 }, - { 57, 18, 10, 102, 102, 213, 34, 20, 43 }, - { 117, 20, 15, 36, 163, 128, 68, 1, 26 } }, - { { 102, 61, 71, 37, 34, 53, 31, 243, 192 }, - { 69, 60, 71, 38, 73, 119, 28, 222, 37 }, - { 68, 45, 128, 34, 1, 47, 11, 245, 171 }, - { 62, 17, 19, 70, 146, 85, 55, 62, 70 }, - { 37, 43, 37, 154, 100, 163, 85, 160, 1 }, - { 63, 9, 92, 136, 28, 64, 32, 201, 85 }, - { 75, 15, 9, 9, 64, 255, 184, 119, 16 }, - { 86, 6, 28, 5, 64, 255, 25, 248, 1 }, - { 56, 8, 17, 132, 137, 255, 55, 116, 128 }, - { 58, 15, 20, 82, 135, 57, 26, 121, 40 } }, - { { 164, 50, 31, 137, 154, 133, 25, 35, 218 }, - { 51, 103, 44, 131, 131, 123, 31, 6, 158 }, - { 86, 40, 64, 135, 148, 224, 45, 183, 128 }, - { 22, 26, 17, 131, 240, 154, 14, 1, 209 }, - { 45, 16, 21, 91, 64, 222, 7, 1, 197 }, - { 56, 21, 39, 155, 60, 138, 23, 102, 213 }, - { 83, 12, 13, 54, 192, 255, 68, 47, 28 }, - { 85, 26, 85, 85, 128, 128, 32, 146, 171 }, - { 18, 11, 7, 63, 144, 171, 4, 4, 246 }, - { 35, 27, 10, 146, 174, 171, 12, 26, 128 } }, - { { 190, 80, 35, 99, 180, 80, 126, 54, 45 }, - { 85, 126, 47, 87, 176, 51, 41, 20, 32 }, - { 101, 75, 128, 139, 118, 146, 116, 128, 85 }, - { 56, 41, 15, 176, 236, 85, 37, 9, 62 }, - { 71, 30, 17, 119, 118, 255, 17, 18, 138 }, - { 101, 38, 60, 138, 55, 70, 43, 26, 142 }, - { 146, 36, 19, 30, 171, 255, 97, 27, 20 }, - { 138, 45, 61, 62, 219, 1, 81, 188, 64 }, - { 32, 41, 20, 117, 151, 142, 20, 21, 163 }, - { 112, 19, 12, 61, 195, 128, 48, 4, 24 } } -}; - -static int PutI4Mode(VP8BitWriter* const bw, int mode, - const uint8_t* const prob) { - if (VP8PutBit(bw, mode != B_DC_PRED, prob[0])) { - if (VP8PutBit(bw, mode != B_TM_PRED, prob[1])) { - if (VP8PutBit(bw, mode != B_VE_PRED, prob[2])) { - if (!VP8PutBit(bw, mode >= B_LD_PRED, prob[3])) { - if (VP8PutBit(bw, mode != B_HE_PRED, prob[4])) { - VP8PutBit(bw, mode != B_RD_PRED, prob[5]); - } - } else { - if (VP8PutBit(bw, mode != B_LD_PRED, prob[6])) { - if (VP8PutBit(bw, mode != B_VL_PRED, prob[7])) { - VP8PutBit(bw, mode != B_HD_PRED, prob[8]); - } - } - } - } - } - } - return mode; -} - -static void PutI16Mode(VP8BitWriter* const bw, int mode) { - if (VP8PutBit(bw, (mode == TM_PRED || mode == H_PRED), 156)) { - VP8PutBit(bw, mode == TM_PRED, 128); // TM or HE - } else { - VP8PutBit(bw, mode == V_PRED, 163); // VE or DC - } -} - -static void PutUVMode(VP8BitWriter* const bw, int uv_mode) { - if (VP8PutBit(bw, uv_mode != DC_PRED, 142)) { - if (VP8PutBit(bw, uv_mode != V_PRED, 114)) { - VP8PutBit(bw, uv_mode != H_PRED, 183); // else: TM_PRED - } - } -} - -static void PutSegment(VP8BitWriter* const bw, int s, const uint8_t* p) { - if (VP8PutBit(bw, s >= 2, p[0])) p += 1; - VP8PutBit(bw, s & 1, p[1]); -} - -void VP8CodeIntraModes(VP8Encoder* const enc) { - VP8BitWriter* const bw = &enc->bw_; - VP8EncIterator it; - VP8IteratorInit(enc, &it); - do { - const VP8MBInfo* const mb = it.mb_; - const uint8_t* preds = it.preds_; - if (enc->segment_hdr_.update_map_) { - PutSegment(bw, mb->segment_, enc->proba_.segments_); - } - if (enc->proba_.use_skip_proba_) { - VP8PutBit(bw, mb->skip_, enc->proba_.skip_proba_); - } - if (VP8PutBit(bw, (mb->type_ != 0), 145)) { // i16x16 - PutI16Mode(bw, preds[0]); - } else { - const int preds_w = enc->preds_w_; - const uint8_t* top_pred = preds - preds_w; - int x, y; - for (y = 0; y < 4; ++y) { - int left = preds[-1]; - for (x = 0; x < 4; ++x) { - const uint8_t* const probas = kBModesProba[top_pred[x]][left]; - left = PutI4Mode(bw, preds[x], probas); - } - top_pred = preds; - preds += preds_w; - } - } - PutUVMode(bw, mb->uv_mode_); - } while (VP8IteratorNext(&it)); -} - -//------------------------------------------------------------------------------ -// Paragraph 13 - -const uint8_t - VP8CoeffsUpdateProba[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS] = { - { { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255 }, - { 250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - } - }, - { { { 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255 }, - { 234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255 } - }, - { { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - } - }, - { { { 186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255 } - }, - { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - } - }, - { { { 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255 }, - { 248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - }, - { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } - } - } -}; - -void VP8WriteProbas(VP8BitWriter* const bw, const VP8EncProba* const probas) { - int t, b, c, p; - for (t = 0; t < NUM_TYPES; ++t) { - for (b = 0; b < NUM_BANDS; ++b) { - for (c = 0; c < NUM_CTX; ++c) { - for (p = 0; p < NUM_PROBAS; ++p) { - const uint8_t p0 = probas->coeffs_[t][b][c][p]; - const int update = (p0 != VP8CoeffsProba0[t][b][c][p]); - if (VP8PutBit(bw, update, VP8CoeffsUpdateProba[t][b][c][p])) { - VP8PutBits(bw, p0, 8); - } - } - } - } - } - if (VP8PutBitUniform(bw, probas->use_skip_proba_)) { - VP8PutBits(bw, probas->skip_proba_, 8); - } -} - diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/vp8i_enc.h b/Dependencies/FreeImage/Source/LibWebP/src/enc/vp8i_enc.h deleted file mode 100644 index 811493d..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/vp8i_enc.h +++ /dev/null @@ -1,518 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// WebP encoder: internal header. -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_ENC_VP8I_ENC_H_ -#define WEBP_ENC_VP8I_ENC_H_ - -#include // for memcpy() -#include "src/dec/common_dec.h" -#include "src/dsp/dsp.h" -#include "src/utils/bit_writer_utils.h" -#include "src/utils/thread_utils.h" -#include "src/utils/utils.h" -#include "src/webp/encode.h" - -#ifdef __cplusplus -extern "C" { -#endif - -//------------------------------------------------------------------------------ -// Various defines and enums - -// version numbers -#define ENC_MAJ_VERSION 1 -#define ENC_MIN_VERSION 0 -#define ENC_REV_VERSION 0 - -enum { MAX_LF_LEVELS = 64, // Maximum loop filter level - MAX_VARIABLE_LEVEL = 67, // last (inclusive) level with variable cost - MAX_LEVEL = 2047 // max level (note: max codable is 2047 + 67) - }; - -typedef enum { // Rate-distortion optimization levels - RD_OPT_NONE = 0, // no rd-opt - RD_OPT_BASIC = 1, // basic scoring (no trellis) - RD_OPT_TRELLIS = 2, // perform trellis-quant on the final decision only - RD_OPT_TRELLIS_ALL = 3 // trellis-quant for every scoring (much slower) -} VP8RDLevel; - -// YUV-cache parameters. Cache is 32-bytes wide (= one cacheline). -// The original or reconstructed samples can be accessed using VP8Scan[]. -// The predicted blocks can be accessed using offsets to yuv_p_ and -// the arrays VP8*ModeOffsets[]. -// * YUV Samples area (yuv_in_/yuv_out_/yuv_out2_) -// (see VP8Scan[] for accessing the blocks, along with -// Y_OFF_ENC/U_OFF_ENC/V_OFF_ENC): -// +----+----+ -// Y_OFF_ENC |YYYY|UUVV| -// U_OFF_ENC |YYYY|UUVV| -// V_OFF_ENC |YYYY|....| <- 25% wasted U/V area -// |YYYY|....| -// +----+----+ -// * Prediction area ('yuv_p_', size = PRED_SIZE_ENC) -// Intra16 predictions (16x16 block each, two per row): -// |I16DC16|I16TM16| -// |I16VE16|I16HE16| -// Chroma U/V predictions (16x8 block each, two per row): -// |C8DC8|C8TM8| -// |C8VE8|C8HE8| -// Intra 4x4 predictions (4x4 block each) -// |I4DC4 I4TM4 I4VE4 I4HE4|I4RD4 I4VR4 I4LD4 I4VL4| -// |I4HD4 I4HU4 I4TMP .....|.......................| <- ~31% wasted -#define YUV_SIZE_ENC (BPS * 16) -#define PRED_SIZE_ENC (32 * BPS + 16 * BPS + 8 * BPS) // I16+Chroma+I4 preds -#define Y_OFF_ENC (0) -#define U_OFF_ENC (16) -#define V_OFF_ENC (16 + 8) - -extern const uint16_t VP8Scan[16]; -extern const uint16_t VP8UVModeOffsets[4]; -extern const uint16_t VP8I16ModeOffsets[4]; -extern const uint16_t VP8I4ModeOffsets[NUM_BMODES]; - -// Layout of prediction blocks -// intra 16x16 -#define I16DC16 (0 * 16 * BPS) -#define I16TM16 (I16DC16 + 16) -#define I16VE16 (1 * 16 * BPS) -#define I16HE16 (I16VE16 + 16) -// chroma 8x8, two U/V blocks side by side (hence: 16x8 each) -#define C8DC8 (2 * 16 * BPS) -#define C8TM8 (C8DC8 + 1 * 16) -#define C8VE8 (2 * 16 * BPS + 8 * BPS) -#define C8HE8 (C8VE8 + 1 * 16) -// intra 4x4 -#define I4DC4 (3 * 16 * BPS + 0) -#define I4TM4 (I4DC4 + 4) -#define I4VE4 (I4DC4 + 8) -#define I4HE4 (I4DC4 + 12) -#define I4RD4 (I4DC4 + 16) -#define I4VR4 (I4DC4 + 20) -#define I4LD4 (I4DC4 + 24) -#define I4VL4 (I4DC4 + 28) -#define I4HD4 (3 * 16 * BPS + 4 * BPS) -#define I4HU4 (I4HD4 + 4) -#define I4TMP (I4HD4 + 8) - -typedef int64_t score_t; // type used for scores, rate, distortion -// Note that MAX_COST is not the maximum allowed by sizeof(score_t), -// in order to allow overflowing computations. -#define MAX_COST ((score_t)0x7fffffffffffffLL) - -#define QFIX 17 -#define BIAS(b) ((b) << (QFIX - 8)) -// Fun fact: this is the _only_ line where we're actually being lossy and -// discarding bits. -static WEBP_INLINE int QUANTDIV(uint32_t n, uint32_t iQ, uint32_t B) { - return (int)((n * iQ + B) >> QFIX); -} - -// Uncomment the following to remove token-buffer code: -// #define DISABLE_TOKEN_BUFFER - -// quality below which error-diffusion is enabled -#define ERROR_DIFFUSION_QUALITY 98 - -//------------------------------------------------------------------------------ -// Headers - -typedef uint32_t proba_t; // 16b + 16b -typedef uint8_t ProbaArray[NUM_CTX][NUM_PROBAS]; -typedef proba_t StatsArray[NUM_CTX][NUM_PROBAS]; -typedef uint16_t CostArray[NUM_CTX][MAX_VARIABLE_LEVEL + 1]; -typedef const uint16_t* (*CostArrayPtr)[NUM_CTX]; // for easy casting -typedef const uint16_t* CostArrayMap[16][NUM_CTX]; -typedef double LFStats[NUM_MB_SEGMENTS][MAX_LF_LEVELS]; // filter stats - -typedef struct VP8Encoder VP8Encoder; - -// segment features -typedef struct { - int num_segments_; // Actual number of segments. 1 segment only = unused. - int update_map_; // whether to update the segment map or not. - // must be 0 if there's only 1 segment. - int size_; // bit-cost for transmitting the segment map -} VP8EncSegmentHeader; - -// Struct collecting all frame-persistent probabilities. -typedef struct { - uint8_t segments_[3]; // probabilities for segment tree - uint8_t skip_proba_; // final probability of being skipped. - ProbaArray coeffs_[NUM_TYPES][NUM_BANDS]; // 1056 bytes - StatsArray stats_[NUM_TYPES][NUM_BANDS]; // 4224 bytes - CostArray level_cost_[NUM_TYPES][NUM_BANDS]; // 13056 bytes - CostArrayMap remapped_costs_[NUM_TYPES]; // 1536 bytes - int dirty_; // if true, need to call VP8CalculateLevelCosts() - int use_skip_proba_; // Note: we always use skip_proba for now. - int nb_skip_; // number of skipped blocks -} VP8EncProba; - -// Filter parameters. Not actually used in the code (we don't perform -// the in-loop filtering), but filled from user's config -typedef struct { - int simple_; // filtering type: 0=complex, 1=simple - int level_; // base filter level [0..63] - int sharpness_; // [0..7] - int i4x4_lf_delta_; // delta filter level for i4x4 relative to i16x16 -} VP8EncFilterHeader; - -//------------------------------------------------------------------------------ -// Informations about the macroblocks. - -typedef struct { - // block type - unsigned int type_:2; // 0=i4x4, 1=i16x16 - unsigned int uv_mode_:2; - unsigned int skip_:1; - unsigned int segment_:2; - uint8_t alpha_; // quantization-susceptibility -} VP8MBInfo; - -typedef struct VP8Matrix { - uint16_t q_[16]; // quantizer steps - uint16_t iq_[16]; // reciprocals, fixed point. - uint32_t bias_[16]; // rounding bias - uint32_t zthresh_[16]; // value below which a coefficient is zeroed - uint16_t sharpen_[16]; // frequency boosters for slight sharpening -} VP8Matrix; - -typedef struct { - VP8Matrix y1_, y2_, uv_; // quantization matrices - int alpha_; // quant-susceptibility, range [-127,127]. Zero is neutral. - // Lower values indicate a lower risk of blurriness. - int beta_; // filter-susceptibility, range [0,255]. - int quant_; // final segment quantizer. - int fstrength_; // final in-loop filtering strength - int max_edge_; // max edge delta (for filtering strength) - int min_disto_; // minimum distortion required to trigger filtering record - // reactivities - int lambda_i16_, lambda_i4_, lambda_uv_; - int lambda_mode_, lambda_trellis_, tlambda_; - int lambda_trellis_i16_, lambda_trellis_i4_, lambda_trellis_uv_; - - // lambda values for distortion-based evaluation - score_t i4_penalty_; // penalty for using Intra4 -} VP8SegmentInfo; - -typedef int8_t DError[2 /* u/v */][2 /* top or left */]; - -// Handy transient struct to accumulate score and info during RD-optimization -// and mode evaluation. -typedef struct { - score_t D, SD; // Distortion, spectral distortion - score_t H, R, score; // header bits, rate, score. - int16_t y_dc_levels[16]; // Quantized levels for luma-DC, luma-AC, chroma. - int16_t y_ac_levels[16][16]; - int16_t uv_levels[4 + 4][16]; - int mode_i16; // mode number for intra16 prediction - uint8_t modes_i4[16]; // mode numbers for intra4 predictions - int mode_uv; // mode number of chroma prediction - uint32_t nz; // non-zero blocks - int8_t derr[2][3]; // DC diffusion errors for U/V for blocks #1/2/3 -} VP8ModeScore; - -// Iterator structure to iterate through macroblocks, pointing to the -// right neighbouring data (samples, predictions, contexts, ...) -typedef struct { - int x_, y_; // current macroblock - uint8_t* yuv_in_; // input samples - uint8_t* yuv_out_; // output samples - uint8_t* yuv_out2_; // secondary buffer swapped with yuv_out_. - uint8_t* yuv_p_; // scratch buffer for prediction - VP8Encoder* enc_; // back-pointer - VP8MBInfo* mb_; // current macroblock - VP8BitWriter* bw_; // current bit-writer - uint8_t* preds_; // intra mode predictors (4x4 blocks) - uint32_t* nz_; // non-zero pattern - uint8_t i4_boundary_[37]; // 32+5 boundary samples needed by intra4x4 - uint8_t* i4_top_; // pointer to the current top boundary sample - int i4_; // current intra4x4 mode being tested - int top_nz_[9]; // top-non-zero context. - int left_nz_[9]; // left-non-zero. left_nz[8] is independent. - uint64_t bit_count_[4][3]; // bit counters for coded levels. - uint64_t luma_bits_; // macroblock bit-cost for luma - uint64_t uv_bits_; // macroblock bit-cost for chroma - LFStats* lf_stats_; // filter stats (borrowed from enc_) - int do_trellis_; // if true, perform extra level optimisation - int count_down_; // number of mb still to be processed - int count_down0_; // starting counter value (for progress) - int percent0_; // saved initial progress percent - - DError left_derr_; // left error diffusion (u/v) - DError *top_derr_; // top diffusion error - NULL if disabled - - uint8_t* y_left_; // left luma samples (addressable from index -1 to 15). - uint8_t* u_left_; // left u samples (addressable from index -1 to 7) - uint8_t* v_left_; // left v samples (addressable from index -1 to 7) - - uint8_t* y_top_; // top luma samples at position 'x_' - uint8_t* uv_top_; // top u/v samples at position 'x_', packed as 16 bytes - - // memory for storing y/u/v_left_ - uint8_t yuv_left_mem_[17 + 16 + 16 + 8 + WEBP_ALIGN_CST]; - // memory for yuv_* - uint8_t yuv_mem_[3 * YUV_SIZE_ENC + PRED_SIZE_ENC + WEBP_ALIGN_CST]; -} VP8EncIterator; - - // in iterator.c -// must be called first -void VP8IteratorInit(VP8Encoder* const enc, VP8EncIterator* const it); -// restart a scan -void VP8IteratorReset(VP8EncIterator* const it); -// reset iterator position to row 'y' -void VP8IteratorSetRow(VP8EncIterator* const it, int y); -// set count down (=number of iterations to go) -void VP8IteratorSetCountDown(VP8EncIterator* const it, int count_down); -// return true if iteration is finished -int VP8IteratorIsDone(const VP8EncIterator* const it); -// Import uncompressed samples from source. -// If tmp_32 is not NULL, import boundary samples too. -// tmp_32 is a 32-bytes scratch buffer that must be aligned in memory. -void VP8IteratorImport(VP8EncIterator* const it, uint8_t* tmp_32); -// export decimated samples -void VP8IteratorExport(const VP8EncIterator* const it); -// go to next macroblock. Returns false if not finished. -int VP8IteratorNext(VP8EncIterator* const it); -// save the yuv_out_ boundary values to top_/left_ arrays for next iterations. -void VP8IteratorSaveBoundary(VP8EncIterator* const it); -// Report progression based on macroblock rows. Return 0 for user-abort request. -int VP8IteratorProgress(const VP8EncIterator* const it, - int final_delta_percent); -// Intra4x4 iterations -void VP8IteratorStartI4(VP8EncIterator* const it); -// returns true if not done. -int VP8IteratorRotateI4(VP8EncIterator* const it, - const uint8_t* const yuv_out); - -// Non-zero context setup/teardown -void VP8IteratorNzToBytes(VP8EncIterator* const it); -void VP8IteratorBytesToNz(VP8EncIterator* const it); - -// Helper functions to set mode properties -void VP8SetIntra16Mode(const VP8EncIterator* const it, int mode); -void VP8SetIntra4Mode(const VP8EncIterator* const it, const uint8_t* modes); -void VP8SetIntraUVMode(const VP8EncIterator* const it, int mode); -void VP8SetSkip(const VP8EncIterator* const it, int skip); -void VP8SetSegment(const VP8EncIterator* const it, int segment); - -//------------------------------------------------------------------------------ -// Paginated token buffer - -typedef struct VP8Tokens VP8Tokens; // struct details in token.c - -typedef struct { -#if !defined(DISABLE_TOKEN_BUFFER) - VP8Tokens* pages_; // first page - VP8Tokens** last_page_; // last page - uint16_t* tokens_; // set to (*last_page_)->tokens_ - int left_; // how many free tokens left before the page is full - int page_size_; // number of tokens per page -#endif - int error_; // true in case of malloc error -} VP8TBuffer; - -// initialize an empty buffer -void VP8TBufferInit(VP8TBuffer* const b, int page_size); -void VP8TBufferClear(VP8TBuffer* const b); // de-allocate pages memory - -#if !defined(DISABLE_TOKEN_BUFFER) - -// Finalizes bitstream when probabilities are known. -// Deletes the allocated token memory if final_pass is true. -int VP8EmitTokens(VP8TBuffer* const b, VP8BitWriter* const bw, - const uint8_t* const probas, int final_pass); - -// record the coding of coefficients without knowing the probabilities yet -int VP8RecordCoeffTokens(int ctx, const struct VP8Residual* const res, - VP8TBuffer* const tokens); - -// Estimate the final coded size given a set of 'probas'. -size_t VP8EstimateTokenSize(VP8TBuffer* const b, const uint8_t* const probas); - -#endif // !DISABLE_TOKEN_BUFFER - -//------------------------------------------------------------------------------ -// VP8Encoder - -struct VP8Encoder { - const WebPConfig* config_; // user configuration and parameters - WebPPicture* pic_; // input / output picture - - // headers - VP8EncFilterHeader filter_hdr_; // filtering information - VP8EncSegmentHeader segment_hdr_; // segment information - - int profile_; // VP8's profile, deduced from Config. - - // dimension, in macroblock units. - int mb_w_, mb_h_; - int preds_w_; // stride of the *preds_ prediction plane (=4*mb_w + 1) - - // number of partitions (1, 2, 4 or 8 = MAX_NUM_PARTITIONS) - int num_parts_; - - // per-partition boolean decoders. - VP8BitWriter bw_; // part0 - VP8BitWriter parts_[MAX_NUM_PARTITIONS]; // token partitions - VP8TBuffer tokens_; // token buffer - - int percent_; // for progress - - // transparency blob - int has_alpha_; - uint8_t* alpha_data_; // non-NULL if transparency is present - uint32_t alpha_data_size_; - WebPWorker alpha_worker_; - - // quantization info (one set of DC/AC dequant factor per segment) - VP8SegmentInfo dqm_[NUM_MB_SEGMENTS]; - int base_quant_; // nominal quantizer value. Only used - // for relative coding of segments' quant. - int alpha_; // global susceptibility (<=> complexity) - int uv_alpha_; // U/V quantization susceptibility - // global offset of quantizers, shared by all segments - int dq_y1_dc_; - int dq_y2_dc_, dq_y2_ac_; - int dq_uv_dc_, dq_uv_ac_; - - // probabilities and statistics - VP8EncProba proba_; - uint64_t sse_[4]; // sum of Y/U/V/A squared errors for all macroblocks - uint64_t sse_count_; // pixel count for the sse_[] stats - int coded_size_; - int residual_bytes_[3][4]; - int block_count_[3]; - - // quality/speed settings - int method_; // 0=fastest, 6=best/slowest. - VP8RDLevel rd_opt_level_; // Deduced from method_. - int max_i4_header_bits_; // partition #0 safeness factor - int mb_header_limit_; // rough limit for header bits per MB - int thread_level_; // derived from config->thread_level - int do_search_; // derived from config->target_XXX - int use_tokens_; // if true, use token buffer - - // Memory - VP8MBInfo* mb_info_; // contextual macroblock infos (mb_w_ + 1) - uint8_t* preds_; // predictions modes: (4*mb_w+1) * (4*mb_h+1) - uint32_t* nz_; // non-zero bit context: mb_w+1 - uint8_t* y_top_; // top luma samples. - uint8_t* uv_top_; // top u/v samples. - // U and V are packed into 16 bytes (8 U + 8 V) - LFStats* lf_stats_; // autofilter stats (if NULL, autofilter is off) - DError* top_derr_; // diffusion error (NULL if disabled) -}; - -//------------------------------------------------------------------------------ -// internal functions. Not public. - - // in tree.c -extern const uint8_t VP8CoeffsProba0[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS]; -extern const uint8_t - VP8CoeffsUpdateProba[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS]; -// Reset the token probabilities to their initial (default) values -void VP8DefaultProbas(VP8Encoder* const enc); -// Write the token probabilities -void VP8WriteProbas(VP8BitWriter* const bw, const VP8EncProba* const probas); -// Writes the partition #0 modes (that is: all intra modes) -void VP8CodeIntraModes(VP8Encoder* const enc); - - // in syntax.c -// Generates the final bitstream by coding the partition0 and headers, -// and appending an assembly of all the pre-coded token partitions. -// Return true if everything is ok. -int VP8EncWrite(VP8Encoder* const enc); -// Release memory allocated for bit-writing in VP8EncLoop & seq. -void VP8EncFreeBitWriters(VP8Encoder* const enc); - - // in frame.c -extern const uint8_t VP8Cat3[]; -extern const uint8_t VP8Cat4[]; -extern const uint8_t VP8Cat5[]; -extern const uint8_t VP8Cat6[]; - -// Form all the four Intra16x16 predictions in the yuv_p_ cache -void VP8MakeLuma16Preds(const VP8EncIterator* const it); -// Form all the four Chroma8x8 predictions in the yuv_p_ cache -void VP8MakeChroma8Preds(const VP8EncIterator* const it); -// Form all the ten Intra4x4 predictions in the yuv_p_ cache -// for the 4x4 block it->i4_ -void VP8MakeIntra4Preds(const VP8EncIterator* const it); -// Rate calculation -int VP8GetCostLuma16(VP8EncIterator* const it, const VP8ModeScore* const rd); -int VP8GetCostLuma4(VP8EncIterator* const it, const int16_t levels[16]); -int VP8GetCostUV(VP8EncIterator* const it, const VP8ModeScore* const rd); -// Main coding calls -int VP8EncLoop(VP8Encoder* const enc); -int VP8EncTokenLoop(VP8Encoder* const enc); - - // in webpenc.c -// Assign an error code to a picture. Return false for convenience. -int WebPEncodingSetError(const WebPPicture* const pic, WebPEncodingError error); -int WebPReportProgress(const WebPPicture* const pic, - int percent, int* const percent_store); - - // in analysis.c -// Main analysis loop. Decides the segmentations and complexity. -// Assigns a first guess for Intra16 and uvmode_ prediction modes. -int VP8EncAnalyze(VP8Encoder* const enc); - - // in quant.c -// Sets up segment's quantization values, base_quant_ and filter strengths. -void VP8SetSegmentParams(VP8Encoder* const enc, float quality); -// Pick best modes and fills the levels. Returns true if skipped. -int VP8Decimate(VP8EncIterator* const it, VP8ModeScore* const rd, - VP8RDLevel rd_opt); - - // in alpha.c -void VP8EncInitAlpha(VP8Encoder* const enc); // initialize alpha compression -int VP8EncStartAlpha(VP8Encoder* const enc); // start alpha coding process -int VP8EncFinishAlpha(VP8Encoder* const enc); // finalize compressed data -int VP8EncDeleteAlpha(VP8Encoder* const enc); // delete compressed data - -// autofilter -void VP8InitFilter(VP8EncIterator* const it); -void VP8StoreFilterStats(VP8EncIterator* const it); -void VP8AdjustFilterStrength(VP8EncIterator* const it); - -// returns the approximate filtering strength needed to smooth a edge -// step of 'delta', given a sharpness parameter 'sharpness'. -int VP8FilterStrengthFromDelta(int sharpness, int delta); - - // misc utils for picture_*.c: - -// Remove reference to the ARGB/YUVA buffer (doesn't free anything). -void WebPPictureResetBuffers(WebPPicture* const picture); - -// Allocates ARGB buffer of given dimension (previous one is always free'd). -// Preserves the YUV(A) buffer. Returns false in case of error (invalid param, -// out-of-memory). -int WebPPictureAllocARGB(WebPPicture* const picture, int width, int height); - -// Allocates YUVA buffer of given dimension (previous one is always free'd). -// Uses picture->csp to determine whether an alpha buffer is needed. -// Preserves the ARGB buffer. -// Returns false in case of error (invalid param, out-of-memory). -int WebPPictureAllocYUVA(WebPPicture* const picture, int width, int height); - -// Clean-up the RGB samples under fully transparent area, to help lossless -// compressibility (no guarantee, though). Assumes that pic->use_argb is true. -void WebPCleanupTransparentAreaLossless(WebPPicture* const pic); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_ENC_VP8I_ENC_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/vp8l_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/vp8l_enc.c deleted file mode 100644 index 9fae744..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/vp8l_enc.c +++ /dev/null @@ -1,1909 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// main entry for the lossless encoder. -// -// Author: Vikas Arora (vikaas.arora@gmail.com) -// - -#include -#include - -#include "src/enc/backward_references_enc.h" -#include "src/enc/histogram_enc.h" -#include "src/enc/vp8i_enc.h" -#include "src/enc/vp8li_enc.h" -#include "src/dsp/lossless.h" -#include "src/dsp/lossless_common.h" -#include "src/utils/bit_writer_utils.h" -#include "src/utils/huffman_encode_utils.h" -#include "src/utils/utils.h" -#include "src/webp/format_constants.h" - -// Maximum number of histogram images (sub-blocks). -#define MAX_HUFF_IMAGE_SIZE 2600 - -// Palette reordering for smaller sum of deltas (and for smaller storage). - -static int PaletteCompareColorsForQsort(const void* p1, const void* p2) { - const uint32_t a = WebPMemToUint32((uint8_t*)p1); - const uint32_t b = WebPMemToUint32((uint8_t*)p2); - assert(a != b); - return (a < b) ? -1 : 1; -} - -static WEBP_INLINE uint32_t PaletteComponentDistance(uint32_t v) { - return (v <= 128) ? v : (256 - v); -} - -// Computes a value that is related to the entropy created by the -// palette entry diff. -// -// Note that the last & 0xff is a no-operation in the next statement, but -// removed by most compilers and is here only for regularity of the code. -static WEBP_INLINE uint32_t PaletteColorDistance(uint32_t col1, uint32_t col2) { - const uint32_t diff = VP8LSubPixels(col1, col2); - const int kMoreWeightForRGBThanForAlpha = 9; - uint32_t score; - score = PaletteComponentDistance((diff >> 0) & 0xff); - score += PaletteComponentDistance((diff >> 8) & 0xff); - score += PaletteComponentDistance((diff >> 16) & 0xff); - score *= kMoreWeightForRGBThanForAlpha; - score += PaletteComponentDistance((diff >> 24) & 0xff); - return score; -} - -static WEBP_INLINE void SwapColor(uint32_t* const col1, uint32_t* const col2) { - const uint32_t tmp = *col1; - *col1 = *col2; - *col2 = tmp; -} - -static void GreedyMinimizeDeltas(uint32_t palette[], int num_colors) { - // Find greedily always the closest color of the predicted color to minimize - // deltas in the palette. This reduces storage needs since the - // palette is stored with delta encoding. - uint32_t predict = 0x00000000; - int i, k; - for (i = 0; i < num_colors; ++i) { - int best_ix = i; - uint32_t best_score = ~0U; - for (k = i; k < num_colors; ++k) { - const uint32_t cur_score = PaletteColorDistance(palette[k], predict); - if (best_score > cur_score) { - best_score = cur_score; - best_ix = k; - } - } - SwapColor(&palette[best_ix], &palette[i]); - predict = palette[i]; - } -} - -// The palette has been sorted by alpha. This function checks if the other -// components of the palette have a monotonic development with regards to -// position in the palette. If all have monotonic development, there is -// no benefit to re-organize them greedily. A monotonic development -// would be spotted in green-only situations (like lossy alpha) or gray-scale -// images. -static int PaletteHasNonMonotonousDeltas(uint32_t palette[], int num_colors) { - uint32_t predict = 0x000000; - int i; - uint8_t sign_found = 0x00; - for (i = 0; i < num_colors; ++i) { - const uint32_t diff = VP8LSubPixels(palette[i], predict); - const uint8_t rd = (diff >> 16) & 0xff; - const uint8_t gd = (diff >> 8) & 0xff; - const uint8_t bd = (diff >> 0) & 0xff; - if (rd != 0x00) { - sign_found |= (rd < 0x80) ? 1 : 2; - } - if (gd != 0x00) { - sign_found |= (gd < 0x80) ? 8 : 16; - } - if (bd != 0x00) { - sign_found |= (bd < 0x80) ? 64 : 128; - } - predict = palette[i]; - } - return (sign_found & (sign_found << 1)) != 0; // two consequent signs. -} - -// ----------------------------------------------------------------------------- -// Palette - -// If number of colors in the image is less than or equal to MAX_PALETTE_SIZE, -// creates a palette and returns true, else returns false. -static int AnalyzeAndCreatePalette(const WebPPicture* const pic, - int low_effort, - uint32_t palette[MAX_PALETTE_SIZE], - int* const palette_size) { - const int num_colors = WebPGetColorPalette(pic, palette); - if (num_colors > MAX_PALETTE_SIZE) { - *palette_size = 0; - return 0; - } - *palette_size = num_colors; - qsort(palette, num_colors, sizeof(*palette), PaletteCompareColorsForQsort); - if (!low_effort && PaletteHasNonMonotonousDeltas(palette, num_colors)) { - GreedyMinimizeDeltas(palette, num_colors); - } - return 1; -} - -// These five modes are evaluated and their respective entropy is computed. -typedef enum { - kDirect = 0, - kSpatial = 1, - kSubGreen = 2, - kSpatialSubGreen = 3, - kPalette = 4, - kNumEntropyIx = 5 -} EntropyIx; - -typedef enum { - kHistoAlpha = 0, - kHistoAlphaPred, - kHistoGreen, - kHistoGreenPred, - kHistoRed, - kHistoRedPred, - kHistoBlue, - kHistoBluePred, - kHistoRedSubGreen, - kHistoRedPredSubGreen, - kHistoBlueSubGreen, - kHistoBluePredSubGreen, - kHistoPalette, - kHistoTotal // Must be last. -} HistoIx; - -static void AddSingleSubGreen(int p, uint32_t* const r, uint32_t* const b) { - const int green = p >> 8; // The upper bits are masked away later. - ++r[((p >> 16) - green) & 0xff]; - ++b[((p >> 0) - green) & 0xff]; -} - -static void AddSingle(uint32_t p, - uint32_t* const a, uint32_t* const r, - uint32_t* const g, uint32_t* const b) { - ++a[(p >> 24) & 0xff]; - ++r[(p >> 16) & 0xff]; - ++g[(p >> 8) & 0xff]; - ++b[(p >> 0) & 0xff]; -} - -static WEBP_INLINE uint32_t HashPix(uint32_t pix) { - // Note that masking with 0xffffffffu is for preventing an - // 'unsigned int overflow' warning. Doesn't impact the compiled code. - return ((((uint64_t)pix + (pix >> 19)) * 0x39c5fba7ull) & 0xffffffffu) >> 24; -} - -static int AnalyzeEntropy(const uint32_t* argb, - int width, int height, int argb_stride, - int use_palette, - int palette_size, int transform_bits, - EntropyIx* const min_entropy_ix, - int* const red_and_blue_always_zero) { - // Allocate histogram set with cache_bits = 0. - uint32_t* histo; - - if (use_palette && palette_size <= 16) { - // In the case of small palettes, we pack 2, 4 or 8 pixels together. In - // practice, small palettes are better than any other transform. - *min_entropy_ix = kPalette; - *red_and_blue_always_zero = 1; - return 1; - } - histo = (uint32_t*)WebPSafeCalloc(kHistoTotal, sizeof(*histo) * 256); - if (histo != NULL) { - int i, x, y; - const uint32_t* prev_row = NULL; - const uint32_t* curr_row = argb; - uint32_t pix_prev = argb[0]; // Skip the first pixel. - for (y = 0; y < height; ++y) { - for (x = 0; x < width; ++x) { - const uint32_t pix = curr_row[x]; - const uint32_t pix_diff = VP8LSubPixels(pix, pix_prev); - pix_prev = pix; - if ((pix_diff == 0) || (prev_row != NULL && pix == prev_row[x])) { - continue; - } - AddSingle(pix, - &histo[kHistoAlpha * 256], - &histo[kHistoRed * 256], - &histo[kHistoGreen * 256], - &histo[kHistoBlue * 256]); - AddSingle(pix_diff, - &histo[kHistoAlphaPred * 256], - &histo[kHistoRedPred * 256], - &histo[kHistoGreenPred * 256], - &histo[kHistoBluePred * 256]); - AddSingleSubGreen(pix, - &histo[kHistoRedSubGreen * 256], - &histo[kHistoBlueSubGreen * 256]); - AddSingleSubGreen(pix_diff, - &histo[kHistoRedPredSubGreen * 256], - &histo[kHistoBluePredSubGreen * 256]); - { - // Approximate the palette by the entropy of the multiplicative hash. - const uint32_t hash = HashPix(pix); - ++histo[kHistoPalette * 256 + hash]; - } - } - prev_row = curr_row; - curr_row += argb_stride; - } - { - double entropy_comp[kHistoTotal]; - double entropy[kNumEntropyIx]; - int k; - int last_mode_to_analyze = use_palette ? kPalette : kSpatialSubGreen; - int j; - // Let's add one zero to the predicted histograms. The zeros are removed - // too efficiently by the pix_diff == 0 comparison, at least one of the - // zeros is likely to exist. - ++histo[kHistoRedPredSubGreen * 256]; - ++histo[kHistoBluePredSubGreen * 256]; - ++histo[kHistoRedPred * 256]; - ++histo[kHistoGreenPred * 256]; - ++histo[kHistoBluePred * 256]; - ++histo[kHistoAlphaPred * 256]; - - for (j = 0; j < kHistoTotal; ++j) { - entropy_comp[j] = VP8LBitsEntropy(&histo[j * 256], 256); - } - entropy[kDirect] = entropy_comp[kHistoAlpha] + - entropy_comp[kHistoRed] + - entropy_comp[kHistoGreen] + - entropy_comp[kHistoBlue]; - entropy[kSpatial] = entropy_comp[kHistoAlphaPred] + - entropy_comp[kHistoRedPred] + - entropy_comp[kHistoGreenPred] + - entropy_comp[kHistoBluePred]; - entropy[kSubGreen] = entropy_comp[kHistoAlpha] + - entropy_comp[kHistoRedSubGreen] + - entropy_comp[kHistoGreen] + - entropy_comp[kHistoBlueSubGreen]; - entropy[kSpatialSubGreen] = entropy_comp[kHistoAlphaPred] + - entropy_comp[kHistoRedPredSubGreen] + - entropy_comp[kHistoGreenPred] + - entropy_comp[kHistoBluePredSubGreen]; - entropy[kPalette] = entropy_comp[kHistoPalette]; - - // When including transforms, there is an overhead in bits from - // storing them. This overhead is small but matters for small images. - // For spatial, there are 14 transformations. - entropy[kSpatial] += VP8LSubSampleSize(width, transform_bits) * - VP8LSubSampleSize(height, transform_bits) * - VP8LFastLog2(14); - // For color transforms: 24 as only 3 channels are considered in a - // ColorTransformElement. - entropy[kSpatialSubGreen] += VP8LSubSampleSize(width, transform_bits) * - VP8LSubSampleSize(height, transform_bits) * - VP8LFastLog2(24); - // For palettes, add the cost of storing the palette. - // We empirically estimate the cost of a compressed entry as 8 bits. - // The palette is differential-coded when compressed hence a much - // lower cost than sizeof(uint32_t)*8. - entropy[kPalette] += palette_size * 8; - - *min_entropy_ix = kDirect; - for (k = kDirect + 1; k <= last_mode_to_analyze; ++k) { - if (entropy[*min_entropy_ix] > entropy[k]) { - *min_entropy_ix = (EntropyIx)k; - } - } - assert((int)*min_entropy_ix <= last_mode_to_analyze); - *red_and_blue_always_zero = 1; - // Let's check if the histogram of the chosen entropy mode has - // non-zero red and blue values. If all are zero, we can later skip - // the cross color optimization. - { - static const uint8_t kHistoPairs[5][2] = { - { kHistoRed, kHistoBlue }, - { kHistoRedPred, kHistoBluePred }, - { kHistoRedSubGreen, kHistoBlueSubGreen }, - { kHistoRedPredSubGreen, kHistoBluePredSubGreen }, - { kHistoRed, kHistoBlue } - }; - const uint32_t* const red_histo = - &histo[256 * kHistoPairs[*min_entropy_ix][0]]; - const uint32_t* const blue_histo = - &histo[256 * kHistoPairs[*min_entropy_ix][1]]; - for (i = 1; i < 256; ++i) { - if ((red_histo[i] | blue_histo[i]) != 0) { - *red_and_blue_always_zero = 0; - break; - } - } - } - } - WebPSafeFree(histo); - return 1; - } else { - return 0; - } -} - -static int GetHistoBits(int method, int use_palette, int width, int height) { - // Make tile size a function of encoding method (Range: 0 to 6). - int histo_bits = (use_palette ? 9 : 7) - method; - while (1) { - const int huff_image_size = VP8LSubSampleSize(width, histo_bits) * - VP8LSubSampleSize(height, histo_bits); - if (huff_image_size <= MAX_HUFF_IMAGE_SIZE) break; - ++histo_bits; - } - return (histo_bits < MIN_HUFFMAN_BITS) ? MIN_HUFFMAN_BITS : - (histo_bits > MAX_HUFFMAN_BITS) ? MAX_HUFFMAN_BITS : histo_bits; -} - -static int GetTransformBits(int method, int histo_bits) { - const int max_transform_bits = (method < 4) ? 6 : (method > 4) ? 4 : 5; - const int res = - (histo_bits > max_transform_bits) ? max_transform_bits : histo_bits; - assert(res <= MAX_TRANSFORM_BITS); - return res; -} - -// Set of parameters to be used in each iteration of the cruncher. -#define CRUNCH_CONFIGS_LZ77_MAX 2 -typedef struct { - int entropy_idx_; - int lz77s_types_to_try_[CRUNCH_CONFIGS_LZ77_MAX]; - int lz77s_types_to_try_size_; -} CrunchConfig; - -#define CRUNCH_CONFIGS_MAX kNumEntropyIx - -static int EncoderAnalyze(VP8LEncoder* const enc, - CrunchConfig crunch_configs[CRUNCH_CONFIGS_MAX], - int* const crunch_configs_size, - int* const red_and_blue_always_zero) { - const WebPPicture* const pic = enc->pic_; - const int width = pic->width; - const int height = pic->height; - const WebPConfig* const config = enc->config_; - const int method = config->method; - const int low_effort = (config->method == 0); - int i; - int use_palette; - int n_lz77s; - assert(pic != NULL && pic->argb != NULL); - - use_palette = - AnalyzeAndCreatePalette(pic, low_effort, - enc->palette_, &enc->palette_size_); - - // Empirical bit sizes. - enc->histo_bits_ = GetHistoBits(method, use_palette, - pic->width, pic->height); - enc->transform_bits_ = GetTransformBits(method, enc->histo_bits_); - - if (low_effort) { - // AnalyzeEntropy is somewhat slow. - crunch_configs[0].entropy_idx_ = use_palette ? kPalette : kSpatialSubGreen; - n_lz77s = 1; - *crunch_configs_size = 1; - } else { - EntropyIx min_entropy_ix; - // Try out multiple LZ77 on images with few colors. - n_lz77s = (enc->palette_size_ > 0 && enc->palette_size_ <= 16) ? 2 : 1; - if (!AnalyzeEntropy(pic->argb, width, height, pic->argb_stride, use_palette, - enc->palette_size_, enc->transform_bits_, - &min_entropy_ix, red_and_blue_always_zero)) { - return 0; - } - if (method == 6 && config->quality == 100) { - // Go brute force on all transforms. - *crunch_configs_size = 0; - for (i = 0; i < kNumEntropyIx; ++i) { - if (i != kPalette || use_palette) { - assert(*crunch_configs_size < CRUNCH_CONFIGS_MAX); - crunch_configs[(*crunch_configs_size)++].entropy_idx_ = i; - } - } - } else { - // Only choose the guessed best transform. - *crunch_configs_size = 1; - crunch_configs[0].entropy_idx_ = min_entropy_ix; - } - } - // Fill in the different LZ77s. - assert(n_lz77s <= CRUNCH_CONFIGS_LZ77_MAX); - for (i = 0; i < *crunch_configs_size; ++i) { - int j; - for (j = 0; j < n_lz77s; ++j) { - crunch_configs[i].lz77s_types_to_try_[j] = - (j == 0) ? kLZ77Standard | kLZ77RLE : kLZ77Box; - } - crunch_configs[i].lz77s_types_to_try_size_ = n_lz77s; - } - return 1; -} - -static int EncoderInit(VP8LEncoder* const enc) { - const WebPPicture* const pic = enc->pic_; - const int width = pic->width; - const int height = pic->height; - const int pix_cnt = width * height; - // we round the block size up, so we're guaranteed to have - // at most MAX_REFS_BLOCK_PER_IMAGE blocks used: - const int refs_block_size = (pix_cnt - 1) / MAX_REFS_BLOCK_PER_IMAGE + 1; - int i; - if (!VP8LHashChainInit(&enc->hash_chain_, pix_cnt)) return 0; - - for (i = 0; i < 3; ++i) VP8LBackwardRefsInit(&enc->refs_[i], refs_block_size); - - return 1; -} - -// Returns false in case of memory error. -static int GetHuffBitLengthsAndCodes( - const VP8LHistogramSet* const histogram_image, - HuffmanTreeCode* const huffman_codes) { - int i, k; - int ok = 0; - uint64_t total_length_size = 0; - uint8_t* mem_buf = NULL; - const int histogram_image_size = histogram_image->size; - int max_num_symbols = 0; - uint8_t* buf_rle = NULL; - HuffmanTree* huff_tree = NULL; - - // Iterate over all histograms and get the aggregate number of codes used. - for (i = 0; i < histogram_image_size; ++i) { - const VP8LHistogram* const histo = histogram_image->histograms[i]; - HuffmanTreeCode* const codes = &huffman_codes[5 * i]; - for (k = 0; k < 5; ++k) { - const int num_symbols = - (k == 0) ? VP8LHistogramNumCodes(histo->palette_code_bits_) : - (k == 4) ? NUM_DISTANCE_CODES : 256; - codes[k].num_symbols = num_symbols; - total_length_size += num_symbols; - } - } - - // Allocate and Set Huffman codes. - { - uint16_t* codes; - uint8_t* lengths; - mem_buf = (uint8_t*)WebPSafeCalloc(total_length_size, - sizeof(*lengths) + sizeof(*codes)); - if (mem_buf == NULL) goto End; - - codes = (uint16_t*)mem_buf; - lengths = (uint8_t*)&codes[total_length_size]; - for (i = 0; i < 5 * histogram_image_size; ++i) { - const int bit_length = huffman_codes[i].num_symbols; - huffman_codes[i].codes = codes; - huffman_codes[i].code_lengths = lengths; - codes += bit_length; - lengths += bit_length; - if (max_num_symbols < bit_length) { - max_num_symbols = bit_length; - } - } - } - - buf_rle = (uint8_t*)WebPSafeMalloc(1ULL, max_num_symbols); - huff_tree = (HuffmanTree*)WebPSafeMalloc(3ULL * max_num_symbols, - sizeof(*huff_tree)); - if (buf_rle == NULL || huff_tree == NULL) goto End; - - // Create Huffman trees. - for (i = 0; i < histogram_image_size; ++i) { - HuffmanTreeCode* const codes = &huffman_codes[5 * i]; - VP8LHistogram* const histo = histogram_image->histograms[i]; - VP8LCreateHuffmanTree(histo->literal_, 15, buf_rle, huff_tree, codes + 0); - VP8LCreateHuffmanTree(histo->red_, 15, buf_rle, huff_tree, codes + 1); - VP8LCreateHuffmanTree(histo->blue_, 15, buf_rle, huff_tree, codes + 2); - VP8LCreateHuffmanTree(histo->alpha_, 15, buf_rle, huff_tree, codes + 3); - VP8LCreateHuffmanTree(histo->distance_, 15, buf_rle, huff_tree, codes + 4); - } - ok = 1; - End: - WebPSafeFree(huff_tree); - WebPSafeFree(buf_rle); - if (!ok) { - WebPSafeFree(mem_buf); - memset(huffman_codes, 0, 5 * histogram_image_size * sizeof(*huffman_codes)); - } - return ok; -} - -static void StoreHuffmanTreeOfHuffmanTreeToBitMask( - VP8LBitWriter* const bw, const uint8_t* code_length_bitdepth) { - // RFC 1951 will calm you down if you are worried about this funny sequence. - // This sequence is tuned from that, but more weighted for lower symbol count, - // and more spiking histograms. - static const uint8_t kStorageOrder[CODE_LENGTH_CODES] = { - 17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 - }; - int i; - // Throw away trailing zeros: - int codes_to_store = CODE_LENGTH_CODES; - for (; codes_to_store > 4; --codes_to_store) { - if (code_length_bitdepth[kStorageOrder[codes_to_store - 1]] != 0) { - break; - } - } - VP8LPutBits(bw, codes_to_store - 4, 4); - for (i = 0; i < codes_to_store; ++i) { - VP8LPutBits(bw, code_length_bitdepth[kStorageOrder[i]], 3); - } -} - -static void ClearHuffmanTreeIfOnlyOneSymbol( - HuffmanTreeCode* const huffman_code) { - int k; - int count = 0; - for (k = 0; k < huffman_code->num_symbols; ++k) { - if (huffman_code->code_lengths[k] != 0) { - ++count; - if (count > 1) return; - } - } - for (k = 0; k < huffman_code->num_symbols; ++k) { - huffman_code->code_lengths[k] = 0; - huffman_code->codes[k] = 0; - } -} - -static void StoreHuffmanTreeToBitMask( - VP8LBitWriter* const bw, - const HuffmanTreeToken* const tokens, const int num_tokens, - const HuffmanTreeCode* const huffman_code) { - int i; - for (i = 0; i < num_tokens; ++i) { - const int ix = tokens[i].code; - const int extra_bits = tokens[i].extra_bits; - VP8LPutBits(bw, huffman_code->codes[ix], huffman_code->code_lengths[ix]); - switch (ix) { - case 16: - VP8LPutBits(bw, extra_bits, 2); - break; - case 17: - VP8LPutBits(bw, extra_bits, 3); - break; - case 18: - VP8LPutBits(bw, extra_bits, 7); - break; - } - } -} - -// 'huff_tree' and 'tokens' are pre-alloacted buffers. -static void StoreFullHuffmanCode(VP8LBitWriter* const bw, - HuffmanTree* const huff_tree, - HuffmanTreeToken* const tokens, - const HuffmanTreeCode* const tree) { - uint8_t code_length_bitdepth[CODE_LENGTH_CODES] = { 0 }; - uint16_t code_length_bitdepth_symbols[CODE_LENGTH_CODES] = { 0 }; - const int max_tokens = tree->num_symbols; - int num_tokens; - HuffmanTreeCode huffman_code; - huffman_code.num_symbols = CODE_LENGTH_CODES; - huffman_code.code_lengths = code_length_bitdepth; - huffman_code.codes = code_length_bitdepth_symbols; - - VP8LPutBits(bw, 0, 1); - num_tokens = VP8LCreateCompressedHuffmanTree(tree, tokens, max_tokens); - { - uint32_t histogram[CODE_LENGTH_CODES] = { 0 }; - uint8_t buf_rle[CODE_LENGTH_CODES] = { 0 }; - int i; - for (i = 0; i < num_tokens; ++i) { - ++histogram[tokens[i].code]; - } - - VP8LCreateHuffmanTree(histogram, 7, buf_rle, huff_tree, &huffman_code); - } - - StoreHuffmanTreeOfHuffmanTreeToBitMask(bw, code_length_bitdepth); - ClearHuffmanTreeIfOnlyOneSymbol(&huffman_code); - { - int trailing_zero_bits = 0; - int trimmed_length = num_tokens; - int write_trimmed_length; - int length; - int i = num_tokens; - while (i-- > 0) { - const int ix = tokens[i].code; - if (ix == 0 || ix == 17 || ix == 18) { - --trimmed_length; // discount trailing zeros - trailing_zero_bits += code_length_bitdepth[ix]; - if (ix == 17) { - trailing_zero_bits += 3; - } else if (ix == 18) { - trailing_zero_bits += 7; - } - } else { - break; - } - } - write_trimmed_length = (trimmed_length > 1 && trailing_zero_bits > 12); - length = write_trimmed_length ? trimmed_length : num_tokens; - VP8LPutBits(bw, write_trimmed_length, 1); - if (write_trimmed_length) { - if (trimmed_length == 2) { - VP8LPutBits(bw, 0, 3 + 2); // nbitpairs=1, trimmed_length=2 - } else { - const int nbits = BitsLog2Floor(trimmed_length - 2); - const int nbitpairs = nbits / 2 + 1; - assert(trimmed_length > 2); - assert(nbitpairs - 1 < 8); - VP8LPutBits(bw, nbitpairs - 1, 3); - VP8LPutBits(bw, trimmed_length - 2, nbitpairs * 2); - } - } - StoreHuffmanTreeToBitMask(bw, tokens, length, &huffman_code); - } -} - -// 'huff_tree' and 'tokens' are pre-alloacted buffers. -static void StoreHuffmanCode(VP8LBitWriter* const bw, - HuffmanTree* const huff_tree, - HuffmanTreeToken* const tokens, - const HuffmanTreeCode* const huffman_code) { - int i; - int count = 0; - int symbols[2] = { 0, 0 }; - const int kMaxBits = 8; - const int kMaxSymbol = 1 << kMaxBits; - - // Check whether it's a small tree. - for (i = 0; i < huffman_code->num_symbols && count < 3; ++i) { - if (huffman_code->code_lengths[i] != 0) { - if (count < 2) symbols[count] = i; - ++count; - } - } - - if (count == 0) { // emit minimal tree for empty cases - // bits: small tree marker: 1, count-1: 0, large 8-bit code: 0, code: 0 - VP8LPutBits(bw, 0x01, 4); - } else if (count <= 2 && symbols[0] < kMaxSymbol && symbols[1] < kMaxSymbol) { - VP8LPutBits(bw, 1, 1); // Small tree marker to encode 1 or 2 symbols. - VP8LPutBits(bw, count - 1, 1); - if (symbols[0] <= 1) { - VP8LPutBits(bw, 0, 1); // Code bit for small (1 bit) symbol value. - VP8LPutBits(bw, symbols[0], 1); - } else { - VP8LPutBits(bw, 1, 1); - VP8LPutBits(bw, symbols[0], 8); - } - if (count == 2) { - VP8LPutBits(bw, symbols[1], 8); - } - } else { - StoreFullHuffmanCode(bw, huff_tree, tokens, huffman_code); - } -} - -static WEBP_INLINE void WriteHuffmanCode(VP8LBitWriter* const bw, - const HuffmanTreeCode* const code, - int code_index) { - const int depth = code->code_lengths[code_index]; - const int symbol = code->codes[code_index]; - VP8LPutBits(bw, symbol, depth); -} - -static WEBP_INLINE void WriteHuffmanCodeWithExtraBits( - VP8LBitWriter* const bw, - const HuffmanTreeCode* const code, - int code_index, - int bits, - int n_bits) { - const int depth = code->code_lengths[code_index]; - const int symbol = code->codes[code_index]; - VP8LPutBits(bw, (bits << depth) | symbol, depth + n_bits); -} - -static WebPEncodingError StoreImageToBitMask( - VP8LBitWriter* const bw, int width, int histo_bits, - const VP8LBackwardRefs* const refs, - const uint16_t* histogram_symbols, - const HuffmanTreeCode* const huffman_codes) { - const int histo_xsize = histo_bits ? VP8LSubSampleSize(width, histo_bits) : 1; - const int tile_mask = (histo_bits == 0) ? 0 : -(1 << histo_bits); - // x and y trace the position in the image. - int x = 0; - int y = 0; - int tile_x = x & tile_mask; - int tile_y = y & tile_mask; - int histogram_ix = histogram_symbols[0]; - const HuffmanTreeCode* codes = huffman_codes + 5 * histogram_ix; - VP8LRefsCursor c = VP8LRefsCursorInit(refs); - while (VP8LRefsCursorOk(&c)) { - const PixOrCopy* const v = c.cur_pos; - if ((tile_x != (x & tile_mask)) || (tile_y != (y & tile_mask))) { - tile_x = x & tile_mask; - tile_y = y & tile_mask; - histogram_ix = histogram_symbols[(y >> histo_bits) * histo_xsize + - (x >> histo_bits)]; - codes = huffman_codes + 5 * histogram_ix; - } - if (PixOrCopyIsLiteral(v)) { - static const uint8_t order[] = { 1, 2, 0, 3 }; - int k; - for (k = 0; k < 4; ++k) { - const int code = PixOrCopyLiteral(v, order[k]); - WriteHuffmanCode(bw, codes + k, code); - } - } else if (PixOrCopyIsCacheIdx(v)) { - const int code = PixOrCopyCacheIdx(v); - const int literal_ix = 256 + NUM_LENGTH_CODES + code; - WriteHuffmanCode(bw, codes, literal_ix); - } else { - int bits, n_bits; - int code; - - const int distance = PixOrCopyDistance(v); - VP8LPrefixEncode(v->len, &code, &n_bits, &bits); - WriteHuffmanCodeWithExtraBits(bw, codes, 256 + code, bits, n_bits); - - // Don't write the distance with the extra bits code since - // the distance can be up to 18 bits of extra bits, and the prefix - // 15 bits, totaling to 33, and our PutBits only supports up to 32 bits. - VP8LPrefixEncode(distance, &code, &n_bits, &bits); - WriteHuffmanCode(bw, codes + 4, code); - VP8LPutBits(bw, bits, n_bits); - } - x += PixOrCopyLength(v); - while (x >= width) { - x -= width; - ++y; - } - VP8LRefsCursorNext(&c); - } - return bw->error_ ? VP8_ENC_ERROR_OUT_OF_MEMORY : VP8_ENC_OK; -} - -// Special case of EncodeImageInternal() for cache-bits=0, histo_bits=31 -static WebPEncodingError EncodeImageNoHuffman(VP8LBitWriter* const bw, - const uint32_t* const argb, - VP8LHashChain* const hash_chain, - VP8LBackwardRefs* const refs_tmp1, - VP8LBackwardRefs* const refs_tmp2, - int width, int height, - int quality, int low_effort) { - int i; - int max_tokens = 0; - WebPEncodingError err = VP8_ENC_OK; - VP8LBackwardRefs* refs; - HuffmanTreeToken* tokens = NULL; - HuffmanTreeCode huffman_codes[5] = { { 0, NULL, NULL } }; - const uint16_t histogram_symbols[1] = { 0 }; // only one tree, one symbol - int cache_bits = 0; - VP8LHistogramSet* histogram_image = NULL; - HuffmanTree* const huff_tree = (HuffmanTree*)WebPSafeMalloc( - 3ULL * CODE_LENGTH_CODES, sizeof(*huff_tree)); - if (huff_tree == NULL) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - - // Calculate backward references from ARGB image. - if (!VP8LHashChainFill(hash_chain, quality, argb, width, height, - low_effort)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - refs = VP8LGetBackwardReferences(width, height, argb, quality, 0, - kLZ77Standard | kLZ77RLE, &cache_bits, - hash_chain, refs_tmp1, refs_tmp2); - if (refs == NULL) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - histogram_image = VP8LAllocateHistogramSet(1, cache_bits); - if (histogram_image == NULL) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - - // Build histogram image and symbols from backward references. - VP8LHistogramStoreRefs(refs, histogram_image->histograms[0]); - - // Create Huffman bit lengths and codes for each histogram image. - assert(histogram_image->size == 1); - if (!GetHuffBitLengthsAndCodes(histogram_image, huffman_codes)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - - // No color cache, no Huffman image. - VP8LPutBits(bw, 0, 1); - - // Find maximum number of symbols for the huffman tree-set. - for (i = 0; i < 5; ++i) { - HuffmanTreeCode* const codes = &huffman_codes[i]; - if (max_tokens < codes->num_symbols) { - max_tokens = codes->num_symbols; - } - } - - tokens = (HuffmanTreeToken*)WebPSafeMalloc(max_tokens, sizeof(*tokens)); - if (tokens == NULL) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - - // Store Huffman codes. - for (i = 0; i < 5; ++i) { - HuffmanTreeCode* const codes = &huffman_codes[i]; - StoreHuffmanCode(bw, huff_tree, tokens, codes); - ClearHuffmanTreeIfOnlyOneSymbol(codes); - } - - // Store actual literals. - err = StoreImageToBitMask(bw, width, 0, refs, histogram_symbols, - huffman_codes); - - Error: - WebPSafeFree(tokens); - WebPSafeFree(huff_tree); - VP8LFreeHistogramSet(histogram_image); - WebPSafeFree(huffman_codes[0].codes); - return err; -} - -static WebPEncodingError EncodeImageInternal( - VP8LBitWriter* const bw, const uint32_t* const argb, - VP8LHashChain* const hash_chain, VP8LBackwardRefs refs_array[3], int width, - int height, int quality, int low_effort, int use_cache, - const CrunchConfig* const config, int* cache_bits, int histogram_bits, - size_t init_byte_position, int* const hdr_size, int* const data_size) { - WebPEncodingError err = VP8_ENC_OK; - const uint32_t histogram_image_xysize = - VP8LSubSampleSize(width, histogram_bits) * - VP8LSubSampleSize(height, histogram_bits); - VP8LHistogramSet* histogram_image = NULL; - VP8LHistogram* tmp_histo = NULL; - int histogram_image_size = 0; - size_t bit_array_size = 0; - HuffmanTree* const huff_tree = (HuffmanTree*)WebPSafeMalloc( - 3ULL * CODE_LENGTH_CODES, sizeof(*huff_tree)); - HuffmanTreeToken* tokens = NULL; - HuffmanTreeCode* huffman_codes = NULL; - VP8LBackwardRefs* refs_best; - VP8LBackwardRefs* refs_tmp; - uint16_t* const histogram_symbols = - (uint16_t*)WebPSafeMalloc(histogram_image_xysize, - sizeof(*histogram_symbols)); - int lz77s_idx; - VP8LBitWriter bw_init = *bw, bw_best; - int hdr_size_tmp; - assert(histogram_bits >= MIN_HUFFMAN_BITS); - assert(histogram_bits <= MAX_HUFFMAN_BITS); - assert(hdr_size != NULL); - assert(data_size != NULL); - - if (histogram_symbols == NULL) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - - if (use_cache) { - // If the value is different from zero, it has been set during the - // palette analysis. - if (*cache_bits == 0) *cache_bits = MAX_COLOR_CACHE_BITS; - } else { - *cache_bits = 0; - } - // 'best_refs' is the reference to the best backward refs and points to one - // of refs_array[0] or refs_array[1]. - // Calculate backward references from ARGB image. - if (huff_tree == NULL || - !VP8LHashChainFill(hash_chain, quality, argb, width, height, - low_effort) || - !VP8LBitWriterInit(&bw_best, 0) || - (config->lz77s_types_to_try_size_ > 1 && - !VP8LBitWriterClone(bw, &bw_best))) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - for (lz77s_idx = 0; lz77s_idx < config->lz77s_types_to_try_size_; - ++lz77s_idx) { - refs_best = VP8LGetBackwardReferences( - width, height, argb, quality, low_effort, - config->lz77s_types_to_try_[lz77s_idx], cache_bits, hash_chain, - &refs_array[0], &refs_array[1]); - if (refs_best == NULL) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - // Keep the best references aside and use the other element from the first - // two as a temporary for later usage. - refs_tmp = &refs_array[refs_best == &refs_array[0] ? 1 : 0]; - - histogram_image = - VP8LAllocateHistogramSet(histogram_image_xysize, *cache_bits); - tmp_histo = VP8LAllocateHistogram(*cache_bits); - if (histogram_image == NULL || tmp_histo == NULL) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - - // Build histogram image and symbols from backward references. - if (!VP8LGetHistoImageSymbols(width, height, refs_best, quality, low_effort, - histogram_bits, *cache_bits, histogram_image, - tmp_histo, histogram_symbols)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - // Create Huffman bit lengths and codes for each histogram image. - histogram_image_size = histogram_image->size; - bit_array_size = 5 * histogram_image_size; - huffman_codes = (HuffmanTreeCode*)WebPSafeCalloc(bit_array_size, - sizeof(*huffman_codes)); - // Note: some histogram_image entries may point to tmp_histos[], so the - // latter need to outlive the following call to GetHuffBitLengthsAndCodes(). - if (huffman_codes == NULL || - !GetHuffBitLengthsAndCodes(histogram_image, huffman_codes)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - // Free combined histograms. - VP8LFreeHistogramSet(histogram_image); - histogram_image = NULL; - - // Free scratch histograms. - VP8LFreeHistogram(tmp_histo); - tmp_histo = NULL; - - // Color Cache parameters. - if (*cache_bits > 0) { - VP8LPutBits(bw, 1, 1); - VP8LPutBits(bw, *cache_bits, 4); - } else { - VP8LPutBits(bw, 0, 1); - } - - // Huffman image + meta huffman. - { - const int write_histogram_image = (histogram_image_size > 1); - VP8LPutBits(bw, write_histogram_image, 1); - if (write_histogram_image) { - uint32_t* const histogram_argb = - (uint32_t*)WebPSafeMalloc(histogram_image_xysize, - sizeof(*histogram_argb)); - int max_index = 0; - uint32_t i; - if (histogram_argb == NULL) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - for (i = 0; i < histogram_image_xysize; ++i) { - const int symbol_index = histogram_symbols[i] & 0xffff; - histogram_argb[i] = (symbol_index << 8); - if (symbol_index >= max_index) { - max_index = symbol_index + 1; - } - } - histogram_image_size = max_index; - - VP8LPutBits(bw, histogram_bits - 2, 3); - err = EncodeImageNoHuffman( - bw, histogram_argb, hash_chain, refs_tmp, &refs_array[2], - VP8LSubSampleSize(width, histogram_bits), - VP8LSubSampleSize(height, histogram_bits), quality, low_effort); - WebPSafeFree(histogram_argb); - if (err != VP8_ENC_OK) goto Error; - } - } - - // Store Huffman codes. - { - int i; - int max_tokens = 0; - // Find maximum number of symbols for the huffman tree-set. - for (i = 0; i < 5 * histogram_image_size; ++i) { - HuffmanTreeCode* const codes = &huffman_codes[i]; - if (max_tokens < codes->num_symbols) { - max_tokens = codes->num_symbols; - } - } - tokens = (HuffmanTreeToken*)WebPSafeMalloc(max_tokens, sizeof(*tokens)); - if (tokens == NULL) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - for (i = 0; i < 5 * histogram_image_size; ++i) { - HuffmanTreeCode* const codes = &huffman_codes[i]; - StoreHuffmanCode(bw, huff_tree, tokens, codes); - ClearHuffmanTreeIfOnlyOneSymbol(codes); - } - } - // Store actual literals. - hdr_size_tmp = (int)(VP8LBitWriterNumBytes(bw) - init_byte_position); - err = StoreImageToBitMask(bw, width, histogram_bits, refs_best, - histogram_symbols, huffman_codes); - // Keep track of the smallest image so far. - if (lz77s_idx == 0 || - VP8LBitWriterNumBytes(bw) < VP8LBitWriterNumBytes(&bw_best)) { - *hdr_size = hdr_size_tmp; - *data_size = - (int)(VP8LBitWriterNumBytes(bw) - init_byte_position - *hdr_size); - VP8LBitWriterSwap(bw, &bw_best); - } - // Reset the bit writer for the following iteration if any. - if (config->lz77s_types_to_try_size_ > 1) VP8LBitWriterReset(&bw_init, bw); - WebPSafeFree(tokens); - tokens = NULL; - if (huffman_codes != NULL) { - WebPSafeFree(huffman_codes->codes); - WebPSafeFree(huffman_codes); - huffman_codes = NULL; - } - } - VP8LBitWriterSwap(bw, &bw_best); - - Error: - WebPSafeFree(tokens); - WebPSafeFree(huff_tree); - VP8LFreeHistogramSet(histogram_image); - VP8LFreeHistogram(tmp_histo); - if (huffman_codes != NULL) { - WebPSafeFree(huffman_codes->codes); - WebPSafeFree(huffman_codes); - } - WebPSafeFree(histogram_symbols); - VP8LBitWriterWipeOut(&bw_best); - return err; -} - -// ----------------------------------------------------------------------------- -// Transforms - -static void ApplySubtractGreen(VP8LEncoder* const enc, int width, int height, - VP8LBitWriter* const bw) { - VP8LPutBits(bw, TRANSFORM_PRESENT, 1); - VP8LPutBits(bw, SUBTRACT_GREEN, 2); - VP8LSubtractGreenFromBlueAndRed(enc->argb_, width * height); -} - -static WebPEncodingError ApplyPredictFilter(const VP8LEncoder* const enc, - int width, int height, - int quality, int low_effort, - int used_subtract_green, - VP8LBitWriter* const bw) { - const int pred_bits = enc->transform_bits_; - const int transform_width = VP8LSubSampleSize(width, pred_bits); - const int transform_height = VP8LSubSampleSize(height, pred_bits); - // we disable near-lossless quantization if palette is used. - const int near_lossless_strength = enc->use_palette_ ? 100 - : enc->config_->near_lossless; - - VP8LResidualImage(width, height, pred_bits, low_effort, enc->argb_, - enc->argb_scratch_, enc->transform_data_, - near_lossless_strength, enc->config_->exact, - used_subtract_green); - VP8LPutBits(bw, TRANSFORM_PRESENT, 1); - VP8LPutBits(bw, PREDICTOR_TRANSFORM, 2); - assert(pred_bits >= 2); - VP8LPutBits(bw, pred_bits - 2, 3); - return EncodeImageNoHuffman( - bw, enc->transform_data_, (VP8LHashChain*)&enc->hash_chain_, - (VP8LBackwardRefs*)&enc->refs_[0], // cast const away - (VP8LBackwardRefs*)&enc->refs_[1], transform_width, transform_height, - quality, low_effort); -} - -static WebPEncodingError ApplyCrossColorFilter(const VP8LEncoder* const enc, - int width, int height, - int quality, int low_effort, - VP8LBitWriter* const bw) { - const int ccolor_transform_bits = enc->transform_bits_; - const int transform_width = VP8LSubSampleSize(width, ccolor_transform_bits); - const int transform_height = VP8LSubSampleSize(height, ccolor_transform_bits); - - VP8LColorSpaceTransform(width, height, ccolor_transform_bits, quality, - enc->argb_, enc->transform_data_); - VP8LPutBits(bw, TRANSFORM_PRESENT, 1); - VP8LPutBits(bw, CROSS_COLOR_TRANSFORM, 2); - assert(ccolor_transform_bits >= 2); - VP8LPutBits(bw, ccolor_transform_bits - 2, 3); - return EncodeImageNoHuffman( - bw, enc->transform_data_, (VP8LHashChain*)&enc->hash_chain_, - (VP8LBackwardRefs*)&enc->refs_[0], // cast const away - (VP8LBackwardRefs*)&enc->refs_[1], transform_width, transform_height, - quality, low_effort); -} - -// ----------------------------------------------------------------------------- - -static WebPEncodingError WriteRiffHeader(const WebPPicture* const pic, - size_t riff_size, size_t vp8l_size) { - uint8_t riff[RIFF_HEADER_SIZE + CHUNK_HEADER_SIZE + VP8L_SIGNATURE_SIZE] = { - 'R', 'I', 'F', 'F', 0, 0, 0, 0, 'W', 'E', 'B', 'P', - 'V', 'P', '8', 'L', 0, 0, 0, 0, VP8L_MAGIC_BYTE, - }; - PutLE32(riff + TAG_SIZE, (uint32_t)riff_size); - PutLE32(riff + RIFF_HEADER_SIZE + TAG_SIZE, (uint32_t)vp8l_size); - if (!pic->writer(riff, sizeof(riff), pic)) { - return VP8_ENC_ERROR_BAD_WRITE; - } - return VP8_ENC_OK; -} - -static int WriteImageSize(const WebPPicture* const pic, - VP8LBitWriter* const bw) { - const int width = pic->width - 1; - const int height = pic->height - 1; - assert(width < WEBP_MAX_DIMENSION && height < WEBP_MAX_DIMENSION); - - VP8LPutBits(bw, width, VP8L_IMAGE_SIZE_BITS); - VP8LPutBits(bw, height, VP8L_IMAGE_SIZE_BITS); - return !bw->error_; -} - -static int WriteRealAlphaAndVersion(VP8LBitWriter* const bw, int has_alpha) { - VP8LPutBits(bw, has_alpha, 1); - VP8LPutBits(bw, VP8L_VERSION, VP8L_VERSION_BITS); - return !bw->error_; -} - -static WebPEncodingError WriteImage(const WebPPicture* const pic, - VP8LBitWriter* const bw, - size_t* const coded_size) { - WebPEncodingError err = VP8_ENC_OK; - const uint8_t* const webpll_data = VP8LBitWriterFinish(bw); - const size_t webpll_size = VP8LBitWriterNumBytes(bw); - const size_t vp8l_size = VP8L_SIGNATURE_SIZE + webpll_size; - const size_t pad = vp8l_size & 1; - const size_t riff_size = TAG_SIZE + CHUNK_HEADER_SIZE + vp8l_size + pad; - - err = WriteRiffHeader(pic, riff_size, vp8l_size); - if (err != VP8_ENC_OK) goto Error; - - if (!pic->writer(webpll_data, webpll_size, pic)) { - err = VP8_ENC_ERROR_BAD_WRITE; - goto Error; - } - - if (pad) { - const uint8_t pad_byte[1] = { 0 }; - if (!pic->writer(pad_byte, 1, pic)) { - err = VP8_ENC_ERROR_BAD_WRITE; - goto Error; - } - } - *coded_size = CHUNK_HEADER_SIZE + riff_size; - return VP8_ENC_OK; - - Error: - return err; -} - -// ----------------------------------------------------------------------------- - -static void ClearTransformBuffer(VP8LEncoder* const enc) { - WebPSafeFree(enc->transform_mem_); - enc->transform_mem_ = NULL; - enc->transform_mem_size_ = 0; -} - -// Allocates the memory for argb (W x H) buffer, 2 rows of context for -// prediction and transform data. -// Flags influencing the memory allocated: -// enc->transform_bits_ -// enc->use_predict_, enc->use_cross_color_ -static WebPEncodingError AllocateTransformBuffer(VP8LEncoder* const enc, - int width, int height) { - WebPEncodingError err = VP8_ENC_OK; - const uint64_t image_size = width * height; - // VP8LResidualImage needs room for 2 scanlines of uint32 pixels with an extra - // pixel in each, plus 2 regular scanlines of bytes. - // TODO(skal): Clean up by using arithmetic in bytes instead of words. - const uint64_t argb_scratch_size = - enc->use_predict_ - ? (width + 1) * 2 + - (width * 2 + sizeof(uint32_t) - 1) / sizeof(uint32_t) - : 0; - const uint64_t transform_data_size = - (enc->use_predict_ || enc->use_cross_color_) - ? VP8LSubSampleSize(width, enc->transform_bits_) * - VP8LSubSampleSize(height, enc->transform_bits_) - : 0; - const uint64_t max_alignment_in_words = - (WEBP_ALIGN_CST + sizeof(uint32_t) - 1) / sizeof(uint32_t); - const uint64_t mem_size = - image_size + max_alignment_in_words + - argb_scratch_size + max_alignment_in_words + - transform_data_size; - uint32_t* mem = enc->transform_mem_; - if (mem == NULL || mem_size > enc->transform_mem_size_) { - ClearTransformBuffer(enc); - mem = (uint32_t*)WebPSafeMalloc(mem_size, sizeof(*mem)); - if (mem == NULL) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - enc->transform_mem_ = mem; - enc->transform_mem_size_ = (size_t)mem_size; - enc->argb_content_ = kEncoderNone; - } - enc->argb_ = mem; - mem = (uint32_t*)WEBP_ALIGN(mem + image_size); - enc->argb_scratch_ = mem; - mem = (uint32_t*)WEBP_ALIGN(mem + argb_scratch_size); - enc->transform_data_ = mem; - - enc->current_width_ = width; - Error: - return err; -} - -static WebPEncodingError MakeInputImageCopy(VP8LEncoder* const enc) { - WebPEncodingError err = VP8_ENC_OK; - const WebPPicture* const picture = enc->pic_; - const int width = picture->width; - const int height = picture->height; - int y; - err = AllocateTransformBuffer(enc, width, height); - if (err != VP8_ENC_OK) return err; - if (enc->argb_content_ == kEncoderARGB) return VP8_ENC_OK; - for (y = 0; y < height; ++y) { - memcpy(enc->argb_ + y * width, - picture->argb + y * picture->argb_stride, - width * sizeof(*enc->argb_)); - } - enc->argb_content_ = kEncoderARGB; - assert(enc->current_width_ == width); - return VP8_ENC_OK; -} - -// ----------------------------------------------------------------------------- - -static WEBP_INLINE int SearchColorNoIdx(const uint32_t sorted[], uint32_t color, - int hi) { - int low = 0; - if (sorted[low] == color) return low; // loop invariant: sorted[low] != color - while (1) { - const int mid = (low + hi) >> 1; - if (sorted[mid] == color) { - return mid; - } else if (sorted[mid] < color) { - low = mid; - } else { - hi = mid; - } - } -} - -#define APPLY_PALETTE_GREEDY_MAX 4 - -static WEBP_INLINE uint32_t SearchColorGreedy(const uint32_t palette[], - int palette_size, - uint32_t color) { - (void)palette_size; - assert(palette_size < APPLY_PALETTE_GREEDY_MAX); - assert(3 == APPLY_PALETTE_GREEDY_MAX - 1); - if (color == palette[0]) return 0; - if (color == palette[1]) return 1; - if (color == palette[2]) return 2; - return 3; -} - -static WEBP_INLINE uint32_t ApplyPaletteHash0(uint32_t color) { - // Focus on the green color. - return (color >> 8) & 0xff; -} - -#define PALETTE_INV_SIZE_BITS 11 -#define PALETTE_INV_SIZE (1 << PALETTE_INV_SIZE_BITS) - -static WEBP_INLINE uint32_t ApplyPaletteHash1(uint32_t color) { - // Forget about alpha. - return ((uint32_t)((color & 0x00ffffffu) * 4222244071ull)) >> - (32 - PALETTE_INV_SIZE_BITS); -} - -static WEBP_INLINE uint32_t ApplyPaletteHash2(uint32_t color) { - // Forget about alpha. - return ((uint32_t)((color & 0x00ffffffu) * ((1ull << 31) - 1))) >> - (32 - PALETTE_INV_SIZE_BITS); -} - -// Sort palette in increasing order and prepare an inverse mapping array. -static void PrepareMapToPalette(const uint32_t palette[], int num_colors, - uint32_t sorted[], uint32_t idx_map[]) { - int i; - memcpy(sorted, palette, num_colors * sizeof(*sorted)); - qsort(sorted, num_colors, sizeof(*sorted), PaletteCompareColorsForQsort); - for (i = 0; i < num_colors; ++i) { - idx_map[SearchColorNoIdx(sorted, palette[i], num_colors)] = i; - } -} - -// Use 1 pixel cache for ARGB pixels. -#define APPLY_PALETTE_FOR(COLOR_INDEX) do { \ - uint32_t prev_pix = palette[0]; \ - uint32_t prev_idx = 0; \ - for (y = 0; y < height; ++y) { \ - for (x = 0; x < width; ++x) { \ - const uint32_t pix = src[x]; \ - if (pix != prev_pix) { \ - prev_idx = COLOR_INDEX; \ - prev_pix = pix; \ - } \ - tmp_row[x] = prev_idx; \ - } \ - VP8LBundleColorMap(tmp_row, width, xbits, dst); \ - src += src_stride; \ - dst += dst_stride; \ - } \ -} while (0) - -// Remap argb values in src[] to packed palettes entries in dst[] -// using 'row' as a temporary buffer of size 'width'. -// We assume that all src[] values have a corresponding entry in the palette. -// Note: src[] can be the same as dst[] -static WebPEncodingError ApplyPalette(const uint32_t* src, uint32_t src_stride, - uint32_t* dst, uint32_t dst_stride, - const uint32_t* palette, int palette_size, - int width, int height, int xbits) { - // TODO(skal): this tmp buffer is not needed if VP8LBundleColorMap() can be - // made to work in-place. - uint8_t* const tmp_row = (uint8_t*)WebPSafeMalloc(width, sizeof(*tmp_row)); - int x, y; - - if (tmp_row == NULL) return VP8_ENC_ERROR_OUT_OF_MEMORY; - - if (palette_size < APPLY_PALETTE_GREEDY_MAX) { - APPLY_PALETTE_FOR(SearchColorGreedy(palette, palette_size, pix)); - } else { - int i, j; - uint16_t buffer[PALETTE_INV_SIZE]; - uint32_t (*const hash_functions[])(uint32_t) = { - ApplyPaletteHash0, ApplyPaletteHash1, ApplyPaletteHash2 - }; - - // Try to find a perfect hash function able to go from a color to an index - // within 1 << PALETTE_INV_SIZE_BITS in order to build a hash map to go - // from color to index in palette. - for (i = 0; i < 3; ++i) { - int use_LUT = 1; - // Set each element in buffer to max uint16_t. - memset(buffer, 0xff, sizeof(buffer)); - for (j = 0; j < palette_size; ++j) { - const uint32_t ind = hash_functions[i](palette[j]); - if (buffer[ind] != 0xffffu) { - use_LUT = 0; - break; - } else { - buffer[ind] = j; - } - } - if (use_LUT) break; - } - - if (i == 0) { - APPLY_PALETTE_FOR(buffer[ApplyPaletteHash0(pix)]); - } else if (i == 1) { - APPLY_PALETTE_FOR(buffer[ApplyPaletteHash1(pix)]); - } else if (i == 2) { - APPLY_PALETTE_FOR(buffer[ApplyPaletteHash2(pix)]); - } else { - uint32_t idx_map[MAX_PALETTE_SIZE]; - uint32_t palette_sorted[MAX_PALETTE_SIZE]; - PrepareMapToPalette(palette, palette_size, palette_sorted, idx_map); - APPLY_PALETTE_FOR( - idx_map[SearchColorNoIdx(palette_sorted, pix, palette_size)]); - } - } - WebPSafeFree(tmp_row); - return VP8_ENC_OK; -} -#undef APPLY_PALETTE_FOR -#undef PALETTE_INV_SIZE_BITS -#undef PALETTE_INV_SIZE -#undef APPLY_PALETTE_GREEDY_MAX - -// Note: Expects "enc->palette_" to be set properly. -static WebPEncodingError MapImageFromPalette(VP8LEncoder* const enc, - int in_place) { - WebPEncodingError err = VP8_ENC_OK; - const WebPPicture* const pic = enc->pic_; - const int width = pic->width; - const int height = pic->height; - const uint32_t* const palette = enc->palette_; - const uint32_t* src = in_place ? enc->argb_ : pic->argb; - const int src_stride = in_place ? enc->current_width_ : pic->argb_stride; - const int palette_size = enc->palette_size_; - int xbits; - - // Replace each input pixel by corresponding palette index. - // This is done line by line. - if (palette_size <= 4) { - xbits = (palette_size <= 2) ? 3 : 2; - } else { - xbits = (palette_size <= 16) ? 1 : 0; - } - - err = AllocateTransformBuffer(enc, VP8LSubSampleSize(width, xbits), height); - if (err != VP8_ENC_OK) return err; - - err = ApplyPalette(src, src_stride, - enc->argb_, enc->current_width_, - palette, palette_size, width, height, xbits); - enc->argb_content_ = kEncoderPalette; - return err; -} - -// Save palette_[] to bitstream. -static WebPEncodingError EncodePalette(VP8LBitWriter* const bw, int low_effort, - VP8LEncoder* const enc) { - int i; - uint32_t tmp_palette[MAX_PALETTE_SIZE]; - const int palette_size = enc->palette_size_; - const uint32_t* const palette = enc->palette_; - VP8LPutBits(bw, TRANSFORM_PRESENT, 1); - VP8LPutBits(bw, COLOR_INDEXING_TRANSFORM, 2); - assert(palette_size >= 1 && palette_size <= MAX_PALETTE_SIZE); - VP8LPutBits(bw, palette_size - 1, 8); - for (i = palette_size - 1; i >= 1; --i) { - tmp_palette[i] = VP8LSubPixels(palette[i], palette[i - 1]); - } - tmp_palette[0] = palette[0]; - return EncodeImageNoHuffman(bw, tmp_palette, &enc->hash_chain_, - &enc->refs_[0], &enc->refs_[1], palette_size, 1, - 20 /* quality */, low_effort); -} - -// ----------------------------------------------------------------------------- -// VP8LEncoder - -static VP8LEncoder* VP8LEncoderNew(const WebPConfig* const config, - const WebPPicture* const picture) { - VP8LEncoder* const enc = (VP8LEncoder*)WebPSafeCalloc(1ULL, sizeof(*enc)); - if (enc == NULL) { - WebPEncodingSetError(picture, VP8_ENC_ERROR_OUT_OF_MEMORY); - return NULL; - } - enc->config_ = config; - enc->pic_ = picture; - enc->argb_content_ = kEncoderNone; - - VP8LEncDspInit(); - - return enc; -} - -static void VP8LEncoderDelete(VP8LEncoder* enc) { - if (enc != NULL) { - int i; - VP8LHashChainClear(&enc->hash_chain_); - for (i = 0; i < 3; ++i) VP8LBackwardRefsClear(&enc->refs_[i]); - ClearTransformBuffer(enc); - WebPSafeFree(enc); - } -} - -// ----------------------------------------------------------------------------- -// Main call - -typedef struct { - const WebPConfig* config_; - const WebPPicture* picture_; - VP8LBitWriter* bw_; - VP8LEncoder* enc_; - int use_cache_; - CrunchConfig crunch_configs_[CRUNCH_CONFIGS_MAX]; - int num_crunch_configs_; - int red_and_blue_always_zero_; - WebPEncodingError err_; - WebPAuxStats* stats_; -} StreamEncodeContext; - -static int EncodeStreamHook(void* input, void* data2) { - StreamEncodeContext* const params = (StreamEncodeContext*)input; - const WebPConfig* const config = params->config_; - const WebPPicture* const picture = params->picture_; - VP8LBitWriter* const bw = params->bw_; - VP8LEncoder* const enc = params->enc_; - const int use_cache = params->use_cache_; - const CrunchConfig* const crunch_configs = params->crunch_configs_; - const int num_crunch_configs = params->num_crunch_configs_; - const int red_and_blue_always_zero = params->red_and_blue_always_zero_; -#if !defined(WEBP_DISABLE_STATS) - WebPAuxStats* const stats = params->stats_; -#endif - WebPEncodingError err = VP8_ENC_OK; - const int quality = (int)config->quality; - const int low_effort = (config->method == 0); -#if (WEBP_NEAR_LOSSLESS == 1) - const int width = picture->width; -#endif - const int height = picture->height; - const size_t byte_position = VP8LBitWriterNumBytes(bw); -#if (WEBP_NEAR_LOSSLESS == 1) - int use_near_lossless = 0; -#endif - int hdr_size = 0; - int data_size = 0; - int use_delta_palette = 0; - int idx; - size_t best_size = 0; - VP8LBitWriter bw_init = *bw, bw_best; - (void)data2; - - if (!VP8LBitWriterInit(&bw_best, 0) || - (num_crunch_configs > 1 && !VP8LBitWriterClone(bw, &bw_best))) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - - for (idx = 0; idx < num_crunch_configs; ++idx) { - const int entropy_idx = crunch_configs[idx].entropy_idx_; - enc->use_palette_ = (entropy_idx == kPalette); - enc->use_subtract_green_ = - (entropy_idx == kSubGreen) || (entropy_idx == kSpatialSubGreen); - enc->use_predict_ = - (entropy_idx == kSpatial) || (entropy_idx == kSpatialSubGreen); - if (low_effort) { - enc->use_cross_color_ = 0; - } else { - enc->use_cross_color_ = red_and_blue_always_zero ? 0 : enc->use_predict_; - } - // Reset any parameter in the encoder that is set in the previous iteration. - enc->cache_bits_ = 0; - VP8LBackwardRefsClear(&enc->refs_[0]); - VP8LBackwardRefsClear(&enc->refs_[1]); - -#if (WEBP_NEAR_LOSSLESS == 1) - // Apply near-lossless preprocessing. - use_near_lossless = (config->near_lossless < 100) && !enc->use_palette_ && - !enc->use_predict_; - if (use_near_lossless) { - err = AllocateTransformBuffer(enc, width, height); - if (err != VP8_ENC_OK) goto Error; - if ((enc->argb_content_ != kEncoderNearLossless) && - !VP8ApplyNearLossless(picture, config->near_lossless, enc->argb_)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - enc->argb_content_ = kEncoderNearLossless; - } else { - enc->argb_content_ = kEncoderNone; - } -#else - enc->argb_content_ = kEncoderNone; -#endif - - // Encode palette - if (enc->use_palette_) { - err = EncodePalette(bw, low_effort, enc); - if (err != VP8_ENC_OK) goto Error; - err = MapImageFromPalette(enc, use_delta_palette); - if (err != VP8_ENC_OK) goto Error; - // If using a color cache, do not have it bigger than the number of - // colors. - if (use_cache && enc->palette_size_ < (1 << MAX_COLOR_CACHE_BITS)) { - enc->cache_bits_ = BitsLog2Floor(enc->palette_size_) + 1; - } - } - if (!use_delta_palette) { - // In case image is not packed. - if (enc->argb_content_ != kEncoderNearLossless && - enc->argb_content_ != kEncoderPalette) { - err = MakeInputImageCopy(enc); - if (err != VP8_ENC_OK) goto Error; - } - - // ----------------------------------------------------------------------- - // Apply transforms and write transform data. - - if (enc->use_subtract_green_) { - ApplySubtractGreen(enc, enc->current_width_, height, bw); - } - - if (enc->use_predict_) { - err = ApplyPredictFilter(enc, enc->current_width_, height, quality, - low_effort, enc->use_subtract_green_, bw); - if (err != VP8_ENC_OK) goto Error; - } - - if (enc->use_cross_color_) { - err = ApplyCrossColorFilter(enc, enc->current_width_, height, quality, - low_effort, bw); - if (err != VP8_ENC_OK) goto Error; - } - } - - VP8LPutBits(bw, !TRANSFORM_PRESENT, 1); // No more transforms. - - // ------------------------------------------------------------------------- - // Encode and write the transformed image. - err = EncodeImageInternal(bw, enc->argb_, &enc->hash_chain_, enc->refs_, - enc->current_width_, height, quality, low_effort, - use_cache, &crunch_configs[idx], - &enc->cache_bits_, enc->histo_bits_, - byte_position, &hdr_size, &data_size); - if (err != VP8_ENC_OK) goto Error; - - // If we are better than what we already have. - if (idx == 0 || VP8LBitWriterNumBytes(bw) < best_size) { - best_size = VP8LBitWriterNumBytes(bw); - // Store the BitWriter. - VP8LBitWriterSwap(bw, &bw_best); -#if !defined(WEBP_DISABLE_STATS) - // Update the stats. - if (stats != NULL) { - stats->lossless_features = 0; - if (enc->use_predict_) stats->lossless_features |= 1; - if (enc->use_cross_color_) stats->lossless_features |= 2; - if (enc->use_subtract_green_) stats->lossless_features |= 4; - if (enc->use_palette_) stats->lossless_features |= 8; - stats->histogram_bits = enc->histo_bits_; - stats->transform_bits = enc->transform_bits_; - stats->cache_bits = enc->cache_bits_; - stats->palette_size = enc->palette_size_; - stats->lossless_size = (int)(best_size - byte_position); - stats->lossless_hdr_size = hdr_size; - stats->lossless_data_size = data_size; - } -#endif - } - // Reset the bit writer for the following iteration if any. - if (num_crunch_configs > 1) VP8LBitWriterReset(&bw_init, bw); - } - VP8LBitWriterSwap(&bw_best, bw); - -Error: - VP8LBitWriterWipeOut(&bw_best); - params->err_ = err; - // The hook should return false in case of error. - return (err == VP8_ENC_OK); -} - -WebPEncodingError VP8LEncodeStream(const WebPConfig* const config, - const WebPPicture* const picture, - VP8LBitWriter* const bw_main, - int use_cache) { - WebPEncodingError err = VP8_ENC_OK; - VP8LEncoder* const enc_main = VP8LEncoderNew(config, picture); - VP8LEncoder* enc_side = NULL; - CrunchConfig crunch_configs[CRUNCH_CONFIGS_MAX]; - int num_crunch_configs_main, num_crunch_configs_side = 0; - int idx; - int red_and_blue_always_zero = 0; - WebPWorker worker_main, worker_side; - StreamEncodeContext params_main, params_side; - // The main thread uses picture->stats, the side thread uses stats_side. - WebPAuxStats stats_side; - VP8LBitWriter bw_side; - const WebPWorkerInterface* const worker_interface = WebPGetWorkerInterface(); - int ok_main; - - // Analyze image (entropy, num_palettes etc) - if (enc_main == NULL || - !EncoderAnalyze(enc_main, crunch_configs, &num_crunch_configs_main, - &red_and_blue_always_zero) || - !EncoderInit(enc_main) || !VP8LBitWriterInit(&bw_side, 0)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - - // Split the configs between the main and side threads (if any). - if (config->thread_level > 0) { - num_crunch_configs_side = num_crunch_configs_main / 2; - for (idx = 0; idx < num_crunch_configs_side; ++idx) { - params_side.crunch_configs_[idx] = - crunch_configs[num_crunch_configs_main - num_crunch_configs_side + - idx]; - } - params_side.num_crunch_configs_ = num_crunch_configs_side; - } - num_crunch_configs_main -= num_crunch_configs_side; - for (idx = 0; idx < num_crunch_configs_main; ++idx) { - params_main.crunch_configs_[idx] = crunch_configs[idx]; - } - params_main.num_crunch_configs_ = num_crunch_configs_main; - - // Fill in the parameters for the thread workers. - { - const int params_size = (num_crunch_configs_side > 0) ? 2 : 1; - for (idx = 0; idx < params_size; ++idx) { - // Create the parameters for each worker. - WebPWorker* const worker = (idx == 0) ? &worker_main : &worker_side; - StreamEncodeContext* const param = - (idx == 0) ? ¶ms_main : ¶ms_side; - param->config_ = config; - param->picture_ = picture; - param->use_cache_ = use_cache; - param->red_and_blue_always_zero_ = red_and_blue_always_zero; - if (idx == 0) { - param->stats_ = picture->stats; - param->bw_ = bw_main; - param->enc_ = enc_main; - } else { - param->stats_ = (picture->stats == NULL) ? NULL : &stats_side; - // Create a side bit writer. - if (!VP8LBitWriterClone(bw_main, &bw_side)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - param->bw_ = &bw_side; - // Create a side encoder. - enc_side = VP8LEncoderNew(config, picture); - if (enc_side == NULL || !EncoderInit(enc_side)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - // Copy the values that were computed for the main encoder. - enc_side->histo_bits_ = enc_main->histo_bits_; - enc_side->transform_bits_ = enc_main->transform_bits_; - enc_side->palette_size_ = enc_main->palette_size_; - memcpy(enc_side->palette_, enc_main->palette_, - sizeof(enc_main->palette_)); - param->enc_ = enc_side; - } - // Create the workers. - worker_interface->Init(worker); - worker->data1 = param; - worker->data2 = NULL; - worker->hook = EncodeStreamHook; - } - } - - // Start the second thread if needed. - if (num_crunch_configs_side != 0) { - if (!worker_interface->Reset(&worker_side)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } -#if !defined(WEBP_DISABLE_STATS) - // This line is here and not in the param initialization above to remove a - // Clang static analyzer warning. - if (picture->stats != NULL) { - memcpy(&stats_side, picture->stats, sizeof(stats_side)); - } -#endif - // This line is only useful to remove a Clang static analyzer warning. - params_side.err_ = VP8_ENC_OK; - worker_interface->Launch(&worker_side); - } - // Execute the main thread. - worker_interface->Execute(&worker_main); - ok_main = worker_interface->Sync(&worker_main); - worker_interface->End(&worker_main); - if (num_crunch_configs_side != 0) { - // Wait for the second thread. - const int ok_side = worker_interface->Sync(&worker_side); - worker_interface->End(&worker_side); - if (!ok_main || !ok_side) { - err = ok_main ? params_side.err_ : params_main.err_; - goto Error; - } - if (VP8LBitWriterNumBytes(&bw_side) < VP8LBitWriterNumBytes(bw_main)) { - VP8LBitWriterSwap(bw_main, &bw_side); -#if !defined(WEBP_DISABLE_STATS) - if (picture->stats != NULL) { - memcpy(picture->stats, &stats_side, sizeof(*picture->stats)); - } -#endif - } - } else { - if (!ok_main) { - err = params_main.err_; - goto Error; - } - } - -Error: - VP8LBitWriterWipeOut(&bw_side); - VP8LEncoderDelete(enc_main); - VP8LEncoderDelete(enc_side); - return err; -} - -#undef CRUNCH_CONFIGS_MAX -#undef CRUNCH_CONFIGS_LZ77_MAX - -int VP8LEncodeImage(const WebPConfig* const config, - const WebPPicture* const picture) { - int width, height; - int has_alpha; - size_t coded_size; - int percent = 0; - int initial_size; - WebPEncodingError err = VP8_ENC_OK; - VP8LBitWriter bw; - - if (picture == NULL) return 0; - - if (config == NULL || picture->argb == NULL) { - err = VP8_ENC_ERROR_NULL_PARAMETER; - WebPEncodingSetError(picture, err); - return 0; - } - - width = picture->width; - height = picture->height; - // Initialize BitWriter with size corresponding to 16 bpp to photo images and - // 8 bpp for graphical images. - initial_size = (config->image_hint == WEBP_HINT_GRAPH) ? - width * height : width * height * 2; - if (!VP8LBitWriterInit(&bw, initial_size)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - - if (!WebPReportProgress(picture, 1, &percent)) { - UserAbort: - err = VP8_ENC_ERROR_USER_ABORT; - goto Error; - } - // Reset stats (for pure lossless coding) - if (picture->stats != NULL) { - WebPAuxStats* const stats = picture->stats; - memset(stats, 0, sizeof(*stats)); - stats->PSNR[0] = 99.f; - stats->PSNR[1] = 99.f; - stats->PSNR[2] = 99.f; - stats->PSNR[3] = 99.f; - stats->PSNR[4] = 99.f; - } - - // Write image size. - if (!WriteImageSize(picture, &bw)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - - has_alpha = WebPPictureHasTransparency(picture); - // Write the non-trivial Alpha flag and lossless version. - if (!WriteRealAlphaAndVersion(&bw, has_alpha)) { - err = VP8_ENC_ERROR_OUT_OF_MEMORY; - goto Error; - } - - if (!WebPReportProgress(picture, 5, &percent)) goto UserAbort; - - // Encode main image stream. - err = VP8LEncodeStream(config, picture, &bw, 1 /*use_cache*/); - if (err != VP8_ENC_OK) goto Error; - - if (!WebPReportProgress(picture, 90, &percent)) goto UserAbort; - - // Finish the RIFF chunk. - err = WriteImage(picture, &bw, &coded_size); - if (err != VP8_ENC_OK) goto Error; - - if (!WebPReportProgress(picture, 100, &percent)) goto UserAbort; - -#if !defined(WEBP_DISABLE_STATS) - // Save size. - if (picture->stats != NULL) { - picture->stats->coded_size += (int)coded_size; - picture->stats->lossless_size = (int)coded_size; - } -#endif - - if (picture->extra_info != NULL) { - const int mb_w = (width + 15) >> 4; - const int mb_h = (height + 15) >> 4; - memset(picture->extra_info, 0, mb_w * mb_h * sizeof(*picture->extra_info)); - } - - Error: - if (bw.error_) err = VP8_ENC_ERROR_OUT_OF_MEMORY; - VP8LBitWriterWipeOut(&bw); - if (err != VP8_ENC_OK) { - WebPEncodingSetError(picture, err); - return 0; - } - return 1; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/vp8li_enc.h b/Dependencies/FreeImage/Source/LibWebP/src/enc/vp8li_enc.h deleted file mode 100644 index 67d690a..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/vp8li_enc.h +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Lossless encoder: internal header. -// -// Author: Vikas Arora (vikaas.arora@gmail.com) - -#ifndef WEBP_ENC_VP8LI_ENC_H_ -#define WEBP_ENC_VP8LI_ENC_H_ - -#ifdef HAVE_CONFIG_H -#include "src/webp/config.h" -#endif -// Either WEBP_NEAR_LOSSLESS is defined as 0 in config.h when compiling to -// disable near-lossless, or it is enabled by default. -#ifndef WEBP_NEAR_LOSSLESS -#define WEBP_NEAR_LOSSLESS 1 -#endif - -#include "src/enc/backward_references_enc.h" -#include "src/enc/histogram_enc.h" -#include "src/utils/bit_writer_utils.h" -#include "src/webp/encode.h" -#include "src/webp/format_constants.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// maximum value of transform_bits_ in VP8LEncoder. -#define MAX_TRANSFORM_BITS 6 - -typedef enum { - kEncoderNone = 0, - kEncoderARGB, - kEncoderNearLossless, - kEncoderPalette -} VP8LEncoderARGBContent; - -typedef struct { - const WebPConfig* config_; // user configuration and parameters - const WebPPicture* pic_; // input picture. - - uint32_t* argb_; // Transformed argb image data. - VP8LEncoderARGBContent argb_content_; // Content type of the argb buffer. - uint32_t* argb_scratch_; // Scratch memory for argb rows - // (used for prediction). - uint32_t* transform_data_; // Scratch memory for transform data. - uint32_t* transform_mem_; // Currently allocated memory. - size_t transform_mem_size_; // Currently allocated memory size. - - int current_width_; // Corresponds to packed image width. - - // Encoding parameters derived from quality parameter. - int histo_bits_; - int transform_bits_; // <= MAX_TRANSFORM_BITS. - int cache_bits_; // If equal to 0, don't use color cache. - - // Encoding parameters derived from image characteristics. - int use_cross_color_; - int use_subtract_green_; - int use_predict_; - int use_palette_; - int palette_size_; - uint32_t palette_[MAX_PALETTE_SIZE]; - - // Some 'scratch' (potentially large) objects. - struct VP8LBackwardRefs refs_[3]; // Backward Refs array for temporaries. - VP8LHashChain hash_chain_; // HashChain data for constructing - // backward references. -} VP8LEncoder; - -//------------------------------------------------------------------------------ -// internal functions. Not public. - -// Encodes the picture. -// Returns 0 if config or picture is NULL or picture doesn't have valid argb -// input. -int VP8LEncodeImage(const WebPConfig* const config, - const WebPPicture* const picture); - -// Encodes the main image stream using the supplied bit writer. -// If 'use_cache' is false, disables the use of color cache. -WebPEncodingError VP8LEncodeStream(const WebPConfig* const config, - const WebPPicture* const picture, - VP8LBitWriter* const bw, int use_cache); - -#if (WEBP_NEAR_LOSSLESS == 1) -// in near_lossless.c -// Near lossless preprocessing in RGB color-space. -int VP8ApplyNearLossless(const WebPPicture* const picture, int quality, - uint32_t* const argb_dst); -#endif - -//------------------------------------------------------------------------------ -// Image transforms in predictor.c. - -void VP8LResidualImage(int width, int height, int bits, int low_effort, - uint32_t* const argb, uint32_t* const argb_scratch, - uint32_t* const image, int near_lossless, int exact, - int used_subtract_green); - -void VP8LColorSpaceTransform(int width, int height, int bits, int quality, - uint32_t* const argb, uint32_t* image); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_ENC_VP8LI_ENC_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/enc/webp_enc.c b/Dependencies/FreeImage/Source/LibWebP/src/enc/webp_enc.c deleted file mode 100644 index 9b87d31..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/enc/webp_enc.c +++ /dev/null @@ -1,410 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// WebP encoder: main entry point -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include -#include -#include - -#include "src/enc/cost_enc.h" -#include "src/enc/vp8i_enc.h" -#include "src/enc/vp8li_enc.h" -#include "src/utils/utils.h" - -// #define PRINT_MEMORY_INFO - -#ifdef PRINT_MEMORY_INFO -#include -#endif - -//------------------------------------------------------------------------------ - -int WebPGetEncoderVersion(void) { - return (ENC_MAJ_VERSION << 16) | (ENC_MIN_VERSION << 8) | ENC_REV_VERSION; -} - -//------------------------------------------------------------------------------ -// VP8Encoder -//------------------------------------------------------------------------------ - -static void ResetSegmentHeader(VP8Encoder* const enc) { - VP8EncSegmentHeader* const hdr = &enc->segment_hdr_; - hdr->num_segments_ = enc->config_->segments; - hdr->update_map_ = (hdr->num_segments_ > 1); - hdr->size_ = 0; -} - -static void ResetFilterHeader(VP8Encoder* const enc) { - VP8EncFilterHeader* const hdr = &enc->filter_hdr_; - hdr->simple_ = 1; - hdr->level_ = 0; - hdr->sharpness_ = 0; - hdr->i4x4_lf_delta_ = 0; -} - -static void ResetBoundaryPredictions(VP8Encoder* const enc) { - // init boundary values once for all - // Note: actually, initializing the preds_[] is only needed for intra4. - int i; - uint8_t* const top = enc->preds_ - enc->preds_w_; - uint8_t* const left = enc->preds_ - 1; - for (i = -1; i < 4 * enc->mb_w_; ++i) { - top[i] = B_DC_PRED; - } - for (i = 0; i < 4 * enc->mb_h_; ++i) { - left[i * enc->preds_w_] = B_DC_PRED; - } - enc->nz_[-1] = 0; // constant -} - -// Mapping from config->method_ to coding tools used. -//-------------------+---+---+---+---+---+---+---+ -// Method | 0 | 1 | 2 | 3 |(4)| 5 | 6 | -//-------------------+---+---+---+---+---+---+---+ -// fast probe | x | | | x | | | | -//-------------------+---+---+---+---+---+---+---+ -// dynamic proba | ~ | x | x | x | x | x | x | -//-------------------+---+---+---+---+---+---+---+ -// fast mode analysis|[x]|[x]| | | x | x | x | -//-------------------+---+---+---+---+---+---+---+ -// basic rd-opt | | | | x | x | x | x | -//-------------------+---+---+---+---+---+---+---+ -// disto-refine i4/16| x | x | x | | | | | -//-------------------+---+---+---+---+---+---+---+ -// disto-refine uv | | x | x | | | | | -//-------------------+---+---+---+---+---+---+---+ -// rd-opt i4/16 | | | ~ | x | x | x | x | -//-------------------+---+---+---+---+---+---+---+ -// token buffer (opt)| | | | x | x | x | x | -//-------------------+---+---+---+---+---+---+---+ -// Trellis | | | | | | x |Ful| -//-------------------+---+---+---+---+---+---+---+ -// full-SNS | | | | | x | x | x | -//-------------------+---+---+---+---+---+---+---+ - -static void MapConfigToTools(VP8Encoder* const enc) { - const WebPConfig* const config = enc->config_; - const int method = config->method; - const int limit = 100 - config->partition_limit; - enc->method_ = method; - enc->rd_opt_level_ = (method >= 6) ? RD_OPT_TRELLIS_ALL - : (method >= 5) ? RD_OPT_TRELLIS - : (method >= 3) ? RD_OPT_BASIC - : RD_OPT_NONE; - enc->max_i4_header_bits_ = - 256 * 16 * 16 * // upper bound: up to 16bit per 4x4 block - (limit * limit) / (100 * 100); // ... modulated with a quadratic curve. - - // partition0 = 512k max. - enc->mb_header_limit_ = - (score_t)256 * 510 * 8 * 1024 / (enc->mb_w_ * enc->mb_h_); - - enc->thread_level_ = config->thread_level; - - enc->do_search_ = (config->target_size > 0 || config->target_PSNR > 0); - if (!config->low_memory) { -#if !defined(DISABLE_TOKEN_BUFFER) - enc->use_tokens_ = (enc->rd_opt_level_ >= RD_OPT_BASIC); // need rd stats -#endif - if (enc->use_tokens_) { - enc->num_parts_ = 1; // doesn't work with multi-partition - } - } -} - -// Memory scaling with dimensions: -// memory (bytes) ~= 2.25 * w + 0.0625 * w * h -// -// Typical memory footprint (614x440 picture) -// encoder: 22111 -// info: 4368 -// preds: 17741 -// top samples: 1263 -// non-zero: 175 -// lf-stats: 0 -// total: 45658 -// Transient object sizes: -// VP8EncIterator: 3360 -// VP8ModeScore: 872 -// VP8SegmentInfo: 732 -// VP8EncProba: 18352 -// LFStats: 2048 -// Picture size (yuv): 419328 - -static VP8Encoder* InitVP8Encoder(const WebPConfig* const config, - WebPPicture* const picture) { - VP8Encoder* enc; - const int use_filter = - (config->filter_strength > 0) || (config->autofilter > 0); - const int mb_w = (picture->width + 15) >> 4; - const int mb_h = (picture->height + 15) >> 4; - const int preds_w = 4 * mb_w + 1; - const int preds_h = 4 * mb_h + 1; - const size_t preds_size = preds_w * preds_h * sizeof(*enc->preds_); - const int top_stride = mb_w * 16; - const size_t nz_size = (mb_w + 1) * sizeof(*enc->nz_) + WEBP_ALIGN_CST; - const size_t info_size = mb_w * mb_h * sizeof(*enc->mb_info_); - const size_t samples_size = - 2 * top_stride * sizeof(*enc->y_top_) // top-luma/u/v - + WEBP_ALIGN_CST; // align all - const size_t lf_stats_size = - config->autofilter ? sizeof(*enc->lf_stats_) + WEBP_ALIGN_CST : 0; - const size_t top_derr_size = - (config->quality <= ERROR_DIFFUSION_QUALITY || config->pass > 1) ? - mb_w * sizeof(*enc->top_derr_) : 0; - uint8_t* mem; - const uint64_t size = (uint64_t)sizeof(*enc) // main struct - + WEBP_ALIGN_CST // cache alignment - + info_size // modes info - + preds_size // prediction modes - + samples_size // top/left samples - + top_derr_size // top diffusion error - + nz_size // coeff context bits - + lf_stats_size; // autofilter stats - -#ifdef PRINT_MEMORY_INFO - printf("===================================\n"); - printf("Memory used:\n" - " encoder: %ld\n" - " info: %ld\n" - " preds: %ld\n" - " top samples: %ld\n" - " top diffusion: %ld\n" - " non-zero: %ld\n" - " lf-stats: %ld\n" - " total: %ld\n", - sizeof(*enc) + WEBP_ALIGN_CST, info_size, - preds_size, samples_size, top_derr_size, nz_size, lf_stats_size, size); - printf("Transient object sizes:\n" - " VP8EncIterator: %ld\n" - " VP8ModeScore: %ld\n" - " VP8SegmentInfo: %ld\n" - " VP8EncProba: %ld\n" - " LFStats: %ld\n", - sizeof(VP8EncIterator), sizeof(VP8ModeScore), - sizeof(VP8SegmentInfo), sizeof(VP8EncProba), - sizeof(LFStats)); - printf("Picture size (yuv): %ld\n", - mb_w * mb_h * 384 * sizeof(uint8_t)); - printf("===================================\n"); -#endif - mem = (uint8_t*)WebPSafeMalloc(size, sizeof(*mem)); - if (mem == NULL) { - WebPEncodingSetError(picture, VP8_ENC_ERROR_OUT_OF_MEMORY); - return NULL; - } - enc = (VP8Encoder*)mem; - mem = (uint8_t*)WEBP_ALIGN(mem + sizeof(*enc)); - memset(enc, 0, sizeof(*enc)); - enc->num_parts_ = 1 << config->partitions; - enc->mb_w_ = mb_w; - enc->mb_h_ = mb_h; - enc->preds_w_ = preds_w; - enc->mb_info_ = (VP8MBInfo*)mem; - mem += info_size; - enc->preds_ = mem + 1 + enc->preds_w_; - mem += preds_size; - enc->nz_ = 1 + (uint32_t*)WEBP_ALIGN(mem); - mem += nz_size; - enc->lf_stats_ = lf_stats_size ? (LFStats*)WEBP_ALIGN(mem) : NULL; - mem += lf_stats_size; - - // top samples (all 16-aligned) - mem = (uint8_t*)WEBP_ALIGN(mem); - enc->y_top_ = mem; - enc->uv_top_ = enc->y_top_ + top_stride; - mem += 2 * top_stride; - enc->top_derr_ = top_derr_size ? (DError*)mem : NULL; - mem += top_derr_size; - assert(mem <= (uint8_t*)enc + size); - - enc->config_ = config; - enc->profile_ = use_filter ? ((config->filter_type == 1) ? 0 : 1) : 2; - enc->pic_ = picture; - enc->percent_ = 0; - - MapConfigToTools(enc); - VP8EncDspInit(); - VP8DefaultProbas(enc); - ResetSegmentHeader(enc); - ResetFilterHeader(enc); - ResetBoundaryPredictions(enc); - VP8EncDspCostInit(); - VP8EncInitAlpha(enc); - - // lower quality means smaller output -> we modulate a little the page - // size based on quality. This is just a crude 1rst-order prediction. - { - const float scale = 1.f + config->quality * 5.f / 100.f; // in [1,6] - VP8TBufferInit(&enc->tokens_, (int)(mb_w * mb_h * 4 * scale)); - } - return enc; -} - -static int DeleteVP8Encoder(VP8Encoder* enc) { - int ok = 1; - if (enc != NULL) { - ok = VP8EncDeleteAlpha(enc); - VP8TBufferClear(&enc->tokens_); - WebPSafeFree(enc); - } - return ok; -} - -//------------------------------------------------------------------------------ - -#if !defined(WEBP_DISABLE_STATS) -static double GetPSNR(uint64_t err, uint64_t size) { - return (err > 0 && size > 0) ? 10. * log10(255. * 255. * size / err) : 99.; -} - -static void FinalizePSNR(const VP8Encoder* const enc) { - WebPAuxStats* stats = enc->pic_->stats; - const uint64_t size = enc->sse_count_; - const uint64_t* const sse = enc->sse_; - stats->PSNR[0] = (float)GetPSNR(sse[0], size); - stats->PSNR[1] = (float)GetPSNR(sse[1], size / 4); - stats->PSNR[2] = (float)GetPSNR(sse[2], size / 4); - stats->PSNR[3] = (float)GetPSNR(sse[0] + sse[1] + sse[2], size * 3 / 2); - stats->PSNR[4] = (float)GetPSNR(sse[3], size); -} -#endif // !defined(WEBP_DISABLE_STATS) - -static void StoreStats(VP8Encoder* const enc) { -#if !defined(WEBP_DISABLE_STATS) - WebPAuxStats* const stats = enc->pic_->stats; - if (stats != NULL) { - int i, s; - for (i = 0; i < NUM_MB_SEGMENTS; ++i) { - stats->segment_level[i] = enc->dqm_[i].fstrength_; - stats->segment_quant[i] = enc->dqm_[i].quant_; - for (s = 0; s <= 2; ++s) { - stats->residual_bytes[s][i] = enc->residual_bytes_[s][i]; - } - } - FinalizePSNR(enc); - stats->coded_size = enc->coded_size_; - for (i = 0; i < 3; ++i) { - stats->block_count[i] = enc->block_count_[i]; - } - } -#else // defined(WEBP_DISABLE_STATS) - WebPReportProgress(enc->pic_, 100, &enc->percent_); // done! -#endif // !defined(WEBP_DISABLE_STATS) -} - -int WebPEncodingSetError(const WebPPicture* const pic, - WebPEncodingError error) { - assert((int)error < VP8_ENC_ERROR_LAST); - assert((int)error >= VP8_ENC_OK); - ((WebPPicture*)pic)->error_code = error; - return 0; -} - -int WebPReportProgress(const WebPPicture* const pic, - int percent, int* const percent_store) { - if (percent_store != NULL && percent != *percent_store) { - *percent_store = percent; - if (pic->progress_hook && !pic->progress_hook(percent, pic)) { - // user abort requested - WebPEncodingSetError(pic, VP8_ENC_ERROR_USER_ABORT); - return 0; - } - } - return 1; // ok -} -//------------------------------------------------------------------------------ - -int WebPEncode(const WebPConfig* config, WebPPicture* pic) { - int ok = 0; - if (pic == NULL) return 0; - - WebPEncodingSetError(pic, VP8_ENC_OK); // all ok so far - if (config == NULL) { // bad params - return WebPEncodingSetError(pic, VP8_ENC_ERROR_NULL_PARAMETER); - } - if (!WebPValidateConfig(config)) { - return WebPEncodingSetError(pic, VP8_ENC_ERROR_INVALID_CONFIGURATION); - } - if (pic->width <= 0 || pic->height <= 0) { - return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION); - } - if (pic->width > WEBP_MAX_DIMENSION || pic->height > WEBP_MAX_DIMENSION) { - return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION); - } - - if (pic->stats != NULL) memset(pic->stats, 0, sizeof(*pic->stats)); - - if (!config->lossless) { - VP8Encoder* enc = NULL; - - if (pic->use_argb || pic->y == NULL || pic->u == NULL || pic->v == NULL) { - // Make sure we have YUVA samples. - if (config->use_sharp_yuv || (config->preprocessing & 4)) { - if (!WebPPictureSharpARGBToYUVA(pic)) { - return 0; - } - } else { - float dithering = 0.f; - if (config->preprocessing & 2) { - const float x = config->quality / 100.f; - const float x2 = x * x; - // slowly decreasing from max dithering at low quality (q->0) - // to 0.5 dithering amplitude at high quality (q->100) - dithering = 1.0f + (0.5f - 1.0f) * x2 * x2; - } - if (!WebPPictureARGBToYUVADithered(pic, WEBP_YUV420, dithering)) { - return 0; - } - } - } - - if (!config->exact) { - WebPCleanupTransparentArea(pic); - } - - enc = InitVP8Encoder(config, pic); - if (enc == NULL) return 0; // pic->error is already set. - // Note: each of the tasks below account for 20% in the progress report. - ok = VP8EncAnalyze(enc); - - // Analysis is done, proceed to actual coding. - ok = ok && VP8EncStartAlpha(enc); // possibly done in parallel - if (!enc->use_tokens_) { - ok = ok && VP8EncLoop(enc); - } else { - ok = ok && VP8EncTokenLoop(enc); - } - ok = ok && VP8EncFinishAlpha(enc); - - ok = ok && VP8EncWrite(enc); - StoreStats(enc); - if (!ok) { - VP8EncFreeBitWriters(enc); - } - ok &= DeleteVP8Encoder(enc); // must always be called, even if !ok - } else { - // Make sure we have ARGB samples. - if (pic->argb == NULL && !WebPPictureYUVAToARGB(pic)) { - return 0; - } - - if (!config->exact) { - WebPCleanupTransparentAreaLossless(pic); - } - - ok = VP8LEncodeImage(config, pic); // Sets pic->error in case of problem. - } - - return ok; -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/mux/anim_encode.c b/Dependencies/FreeImage/Source/LibWebP/src/mux/anim_encode.c deleted file mode 100644 index 1abddf3..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/mux/anim_encode.c +++ /dev/null @@ -1,1581 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// AnimEncoder implementation. -// - -#include -#include -#include // for pow() -#include -#include // for abs() - -#include "src/mux/animi.h" -#include "src/utils/utils.h" -#include "src/webp/decode.h" -#include "src/webp/encode.h" -#include "src/webp/format_constants.h" -#include "src/webp/mux.h" - -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define snprintf _snprintf -#endif - -#define ERROR_STR_MAX_LENGTH 100 - -//------------------------------------------------------------------------------ -// Internal structs. - -// Stores frame rectangle dimensions. -typedef struct { - int x_offset_, y_offset_, width_, height_; -} FrameRectangle; - -// Used to store two candidates of encoded data for an animation frame. One of -// the two will be chosen later. -typedef struct { - WebPMuxFrameInfo sub_frame_; // Encoded frame rectangle. - WebPMuxFrameInfo key_frame_; // Encoded frame if it is a key-frame. - int is_key_frame_; // True if 'key_frame' has been chosen. -} EncodedFrame; - -struct WebPAnimEncoder { - const int canvas_width_; // Canvas width. - const int canvas_height_; // Canvas height. - const WebPAnimEncoderOptions options_; // Global encoding options. - - FrameRectangle prev_rect_; // Previous WebP frame rectangle. - WebPConfig last_config_; // Cached in case a re-encode is needed. - WebPConfig last_config_reversed_; // If 'last_config_' uses lossless, then - // this config uses lossy and vice versa; - // only valid if 'options_.allow_mixed' - // is true. - - WebPPicture* curr_canvas_; // Only pointer; we don't own memory. - - // Canvas buffers. - WebPPicture curr_canvas_copy_; // Possibly modified current canvas. - int curr_canvas_copy_modified_; // True if pixels in 'curr_canvas_copy_' - // differ from those in 'curr_canvas_'. - - WebPPicture prev_canvas_; // Previous canvas. - WebPPicture prev_canvas_disposed_; // Previous canvas disposed to background. - - // Encoded data. - EncodedFrame* encoded_frames_; // Array of encoded frames. - size_t size_; // Number of allocated frames. - size_t start_; // Frame start index. - size_t count_; // Number of valid frames. - size_t flush_count_; // If >0, 'flush_count' frames starting from - // 'start' are ready to be added to mux. - - // key-frame related. - int64_t best_delta_; // min(canvas size - frame size) over the frames. - // Can be negative in certain cases due to - // transparent pixels in a frame. - int keyframe_; // Index of selected key-frame relative to 'start_'. - int count_since_key_frame_; // Frames seen since the last key-frame. - - int first_timestamp_; // Timestamp of the first frame. - int prev_timestamp_; // Timestamp of the last added frame. - int prev_candidate_undecided_; // True if it's not yet decided if previous - // frame would be a sub-frame or a key-frame. - - // Misc. - int is_first_frame_; // True if first frame is yet to be added/being added. - int got_null_frame_; // True if WebPAnimEncoderAdd() has already been called - // with a NULL frame. - - size_t in_frame_count_; // Number of input frames processed so far. - size_t out_frame_count_; // Number of frames added to mux so far. This may be - // different from 'in_frame_count_' due to merging. - - WebPMux* mux_; // Muxer to assemble the WebP bitstream. - char error_str_[ERROR_STR_MAX_LENGTH]; // Error string. Empty if no error. -}; - -// ----------------------------------------------------------------------------- -// Life of WebPAnimEncoder object. - -#define DELTA_INFINITY (1ULL << 32) -#define KEYFRAME_NONE (-1) - -// Reset the counters in the WebPAnimEncoder. -static void ResetCounters(WebPAnimEncoder* const enc) { - enc->start_ = 0; - enc->count_ = 0; - enc->flush_count_ = 0; - enc->best_delta_ = DELTA_INFINITY; - enc->keyframe_ = KEYFRAME_NONE; -} - -static void DisableKeyframes(WebPAnimEncoderOptions* const enc_options) { - enc_options->kmax = INT_MAX; - enc_options->kmin = enc_options->kmax - 1; -} - -#define MAX_CACHED_FRAMES 30 - -static void SanitizeEncoderOptions(WebPAnimEncoderOptions* const enc_options) { - int print_warning = enc_options->verbose; - - if (enc_options->minimize_size) { - DisableKeyframes(enc_options); - } - - if (enc_options->kmax == 1) { // All frames will be key-frames. - enc_options->kmin = 0; - enc_options->kmax = 0; - return; - } else if (enc_options->kmax <= 0) { - DisableKeyframes(enc_options); - print_warning = 0; - } - - if (enc_options->kmin >= enc_options->kmax) { - enc_options->kmin = enc_options->kmax - 1; - if (print_warning) { - fprintf(stderr, "WARNING: Setting kmin = %d, so that kmin < kmax.\n", - enc_options->kmin); - } - } else { - const int kmin_limit = enc_options->kmax / 2 + 1; - if (enc_options->kmin < kmin_limit && kmin_limit < enc_options->kmax) { - // This ensures that enc.keyframe + kmin >= kmax is always true. So, we - // can flush all the frames in the 'count_since_key_frame == kmax' case. - enc_options->kmin = kmin_limit; - if (print_warning) { - fprintf(stderr, - "WARNING: Setting kmin = %d, so that kmin >= kmax / 2 + 1.\n", - enc_options->kmin); - } - } - } - // Limit the max number of frames that are allocated. - if (enc_options->kmax - enc_options->kmin > MAX_CACHED_FRAMES) { - enc_options->kmin = enc_options->kmax - MAX_CACHED_FRAMES; - if (print_warning) { - fprintf(stderr, - "WARNING: Setting kmin = %d, so that kmax - kmin <= %d.\n", - enc_options->kmin, MAX_CACHED_FRAMES); - } - } - assert(enc_options->kmin < enc_options->kmax); -} - -#undef MAX_CACHED_FRAMES - -static void DefaultEncoderOptions(WebPAnimEncoderOptions* const enc_options) { - enc_options->anim_params.loop_count = 0; - enc_options->anim_params.bgcolor = 0xffffffff; // White. - enc_options->minimize_size = 0; - DisableKeyframes(enc_options); - enc_options->allow_mixed = 0; - enc_options->verbose = 0; -} - -int WebPAnimEncoderOptionsInitInternal(WebPAnimEncoderOptions* enc_options, - int abi_version) { - if (enc_options == NULL || - WEBP_ABI_IS_INCOMPATIBLE(abi_version, WEBP_MUX_ABI_VERSION)) { - return 0; - } - DefaultEncoderOptions(enc_options); - return 1; -} - -// This starting value is more fit to WebPCleanupTransparentAreaLossless(). -#define TRANSPARENT_COLOR 0x00000000 - -static void ClearRectangle(WebPPicture* const picture, - int left, int top, int width, int height) { - int j; - for (j = top; j < top + height; ++j) { - uint32_t* const dst = picture->argb + j * picture->argb_stride; - int i; - for (i = left; i < left + width; ++i) { - dst[i] = TRANSPARENT_COLOR; - } - } -} - -static void WebPUtilClearPic(WebPPicture* const picture, - const FrameRectangle* const rect) { - if (rect != NULL) { - ClearRectangle(picture, rect->x_offset_, rect->y_offset_, - rect->width_, rect->height_); - } else { - ClearRectangle(picture, 0, 0, picture->width, picture->height); - } -} - -static void MarkNoError(WebPAnimEncoder* const enc) { - enc->error_str_[0] = '\0'; // Empty string. -} - -static void MarkError(WebPAnimEncoder* const enc, const char* str) { - if (snprintf(enc->error_str_, ERROR_STR_MAX_LENGTH, "%s.", str) < 0) { - assert(0); // FIX ME! - } -} - -static void MarkError2(WebPAnimEncoder* const enc, - const char* str, int error_code) { - if (snprintf(enc->error_str_, ERROR_STR_MAX_LENGTH, "%s: %d.", str, - error_code) < 0) { - assert(0); // FIX ME! - } -} - -WebPAnimEncoder* WebPAnimEncoderNewInternal( - int width, int height, const WebPAnimEncoderOptions* enc_options, - int abi_version) { - WebPAnimEncoder* enc; - - if (WEBP_ABI_IS_INCOMPATIBLE(abi_version, WEBP_MUX_ABI_VERSION)) { - return NULL; - } - if (width <= 0 || height <= 0 || - (width * (uint64_t)height) >= MAX_IMAGE_AREA) { - return NULL; - } - - enc = (WebPAnimEncoder*)WebPSafeCalloc(1, sizeof(*enc)); - if (enc == NULL) return NULL; - // sanity inits, so we can call WebPAnimEncoderDelete(): - enc->encoded_frames_ = NULL; - enc->mux_ = NULL; - MarkNoError(enc); - - // Dimensions and options. - *(int*)&enc->canvas_width_ = width; - *(int*)&enc->canvas_height_ = height; - if (enc_options != NULL) { - *(WebPAnimEncoderOptions*)&enc->options_ = *enc_options; - SanitizeEncoderOptions((WebPAnimEncoderOptions*)&enc->options_); - } else { - DefaultEncoderOptions((WebPAnimEncoderOptions*)&enc->options_); - } - - // Canvas buffers. - if (!WebPPictureInit(&enc->curr_canvas_copy_) || - !WebPPictureInit(&enc->prev_canvas_) || - !WebPPictureInit(&enc->prev_canvas_disposed_)) { - goto Err; - } - enc->curr_canvas_copy_.width = width; - enc->curr_canvas_copy_.height = height; - enc->curr_canvas_copy_.use_argb = 1; - if (!WebPPictureAlloc(&enc->curr_canvas_copy_) || - !WebPPictureCopy(&enc->curr_canvas_copy_, &enc->prev_canvas_) || - !WebPPictureCopy(&enc->curr_canvas_copy_, &enc->prev_canvas_disposed_)) { - goto Err; - } - WebPUtilClearPic(&enc->prev_canvas_, NULL); - enc->curr_canvas_copy_modified_ = 1; - - // Encoded frames. - ResetCounters(enc); - // Note: one extra storage is for the previous frame. - enc->size_ = enc->options_.kmax - enc->options_.kmin + 1; - // We need space for at least 2 frames. But when kmin, kmax are both zero, - // enc->size_ will be 1. So we handle that special case below. - if (enc->size_ < 2) enc->size_ = 2; - enc->encoded_frames_ = - (EncodedFrame*)WebPSafeCalloc(enc->size_, sizeof(*enc->encoded_frames_)); - if (enc->encoded_frames_ == NULL) goto Err; - - enc->mux_ = WebPMuxNew(); - if (enc->mux_ == NULL) goto Err; - - enc->count_since_key_frame_ = 0; - enc->first_timestamp_ = 0; - enc->prev_timestamp_ = 0; - enc->prev_candidate_undecided_ = 0; - enc->is_first_frame_ = 1; - enc->got_null_frame_ = 0; - - return enc; // All OK. - - Err: - WebPAnimEncoderDelete(enc); - return NULL; -} - -// Release the data contained by 'encoded_frame'. -static void FrameRelease(EncodedFrame* const encoded_frame) { - if (encoded_frame != NULL) { - WebPDataClear(&encoded_frame->sub_frame_.bitstream); - WebPDataClear(&encoded_frame->key_frame_.bitstream); - memset(encoded_frame, 0, sizeof(*encoded_frame)); - } -} - -void WebPAnimEncoderDelete(WebPAnimEncoder* enc) { - if (enc != NULL) { - WebPPictureFree(&enc->curr_canvas_copy_); - WebPPictureFree(&enc->prev_canvas_); - WebPPictureFree(&enc->prev_canvas_disposed_); - if (enc->encoded_frames_ != NULL) { - size_t i; - for (i = 0; i < enc->size_; ++i) { - FrameRelease(&enc->encoded_frames_[i]); - } - WebPSafeFree(enc->encoded_frames_); - } - WebPMuxDelete(enc->mux_); - WebPSafeFree(enc); - } -} - -// ----------------------------------------------------------------------------- -// Frame addition. - -// Returns cached frame at the given 'position'. -static EncodedFrame* GetFrame(const WebPAnimEncoder* const enc, - size_t position) { - assert(enc->start_ + position < enc->size_); - return &enc->encoded_frames_[enc->start_ + position]; -} - -typedef int (*ComparePixelsFunc)(const uint32_t*, int, const uint32_t*, int, - int, int); - -// Returns true if 'length' number of pixels in 'src' and 'dst' are equal, -// assuming the given step sizes between pixels. -// 'max_allowed_diff' is unused and only there to allow function pointer use. -static WEBP_INLINE int ComparePixelsLossless(const uint32_t* src, int src_step, - const uint32_t* dst, int dst_step, - int length, int max_allowed_diff) { - (void)max_allowed_diff; - assert(length > 0); - while (length-- > 0) { - if (*src != *dst) { - return 0; - } - src += src_step; - dst += dst_step; - } - return 1; -} - -// Helper to check if each channel in 'src' and 'dst' is at most off by -// 'max_allowed_diff'. -static WEBP_INLINE int PixelsAreSimilar(uint32_t src, uint32_t dst, - int max_allowed_diff) { - const int src_a = (src >> 24) & 0xff; - const int src_r = (src >> 16) & 0xff; - const int src_g = (src >> 8) & 0xff; - const int src_b = (src >> 0) & 0xff; - const int dst_a = (dst >> 24) & 0xff; - const int dst_r = (dst >> 16) & 0xff; - const int dst_g = (dst >> 8) & 0xff; - const int dst_b = (dst >> 0) & 0xff; - - return (src_a == dst_a) && - (abs(src_r - dst_r) * dst_a <= (max_allowed_diff * 255)) && - (abs(src_g - dst_g) * dst_a <= (max_allowed_diff * 255)) && - (abs(src_b - dst_b) * dst_a <= (max_allowed_diff * 255)); -} - -// Returns true if 'length' number of pixels in 'src' and 'dst' are within an -// error bound, assuming the given step sizes between pixels. -static WEBP_INLINE int ComparePixelsLossy(const uint32_t* src, int src_step, - const uint32_t* dst, int dst_step, - int length, int max_allowed_diff) { - assert(length > 0); - while (length-- > 0) { - if (!PixelsAreSimilar(*src, *dst, max_allowed_diff)) { - return 0; - } - src += src_step; - dst += dst_step; - } - return 1; -} - -static int IsEmptyRect(const FrameRectangle* const rect) { - return (rect->width_ == 0) || (rect->height_ == 0); -} - -static int QualityToMaxDiff(float quality) { - const double val = pow(quality / 100., 0.5); - const double max_diff = 31 * (1 - val) + 1 * val; - return (int)(max_diff + 0.5); -} - -// Assumes that an initial valid guess of change rectangle 'rect' is passed. -static void MinimizeChangeRectangle(const WebPPicture* const src, - const WebPPicture* const dst, - FrameRectangle* const rect, - int is_lossless, float quality) { - int i, j; - const ComparePixelsFunc compare_pixels = - is_lossless ? ComparePixelsLossless : ComparePixelsLossy; - const int max_allowed_diff_lossy = QualityToMaxDiff(quality); - const int max_allowed_diff = is_lossless ? 0 : max_allowed_diff_lossy; - - // Sanity checks. - assert(src->width == dst->width && src->height == dst->height); - assert(rect->x_offset_ + rect->width_ <= dst->width); - assert(rect->y_offset_ + rect->height_ <= dst->height); - - // Left boundary. - for (i = rect->x_offset_; i < rect->x_offset_ + rect->width_; ++i) { - const uint32_t* const src_argb = - &src->argb[rect->y_offset_ * src->argb_stride + i]; - const uint32_t* const dst_argb = - &dst->argb[rect->y_offset_ * dst->argb_stride + i]; - if (compare_pixels(src_argb, src->argb_stride, dst_argb, dst->argb_stride, - rect->height_, max_allowed_diff)) { - --rect->width_; // Redundant column. - ++rect->x_offset_; - } else { - break; - } - } - if (rect->width_ == 0) goto NoChange; - - // Right boundary. - for (i = rect->x_offset_ + rect->width_ - 1; i >= rect->x_offset_; --i) { - const uint32_t* const src_argb = - &src->argb[rect->y_offset_ * src->argb_stride + i]; - const uint32_t* const dst_argb = - &dst->argb[rect->y_offset_ * dst->argb_stride + i]; - if (compare_pixels(src_argb, src->argb_stride, dst_argb, dst->argb_stride, - rect->height_, max_allowed_diff)) { - --rect->width_; // Redundant column. - } else { - break; - } - } - if (rect->width_ == 0) goto NoChange; - - // Top boundary. - for (j = rect->y_offset_; j < rect->y_offset_ + rect->height_; ++j) { - const uint32_t* const src_argb = - &src->argb[j * src->argb_stride + rect->x_offset_]; - const uint32_t* const dst_argb = - &dst->argb[j * dst->argb_stride + rect->x_offset_]; - if (compare_pixels(src_argb, 1, dst_argb, 1, rect->width_, - max_allowed_diff)) { - --rect->height_; // Redundant row. - ++rect->y_offset_; - } else { - break; - } - } - if (rect->height_ == 0) goto NoChange; - - // Bottom boundary. - for (j = rect->y_offset_ + rect->height_ - 1; j >= rect->y_offset_; --j) { - const uint32_t* const src_argb = - &src->argb[j * src->argb_stride + rect->x_offset_]; - const uint32_t* const dst_argb = - &dst->argb[j * dst->argb_stride + rect->x_offset_]; - if (compare_pixels(src_argb, 1, dst_argb, 1, rect->width_, - max_allowed_diff)) { - --rect->height_; // Redundant row. - } else { - break; - } - } - if (rect->height_ == 0) goto NoChange; - - if (IsEmptyRect(rect)) { - NoChange: - rect->x_offset_ = 0; - rect->y_offset_ = 0; - rect->width_ = 0; - rect->height_ = 0; - } -} - -// Snap rectangle to even offsets (and adjust dimensions if needed). -static WEBP_INLINE void SnapToEvenOffsets(FrameRectangle* const rect) { - rect->width_ += (rect->x_offset_ & 1); - rect->height_ += (rect->y_offset_ & 1); - rect->x_offset_ &= ~1; - rect->y_offset_ &= ~1; -} - -typedef struct { - int should_try_; // Should try this set of parameters. - int empty_rect_allowed_; // Frame with empty rectangle can be skipped. - FrameRectangle rect_ll_; // Frame rectangle for lossless compression. - WebPPicture sub_frame_ll_; // Sub-frame pic for lossless compression. - FrameRectangle rect_lossy_; // Frame rectangle for lossy compression. - // Could be smaller than rect_ll_ as pixels - // with small diffs can be ignored. - WebPPicture sub_frame_lossy_; // Sub-frame pic for lossless compression. -} SubFrameParams; - -static int SubFrameParamsInit(SubFrameParams* const params, - int should_try, int empty_rect_allowed) { - params->should_try_ = should_try; - params->empty_rect_allowed_ = empty_rect_allowed; - if (!WebPPictureInit(¶ms->sub_frame_ll_) || - !WebPPictureInit(¶ms->sub_frame_lossy_)) { - return 0; - } - return 1; -} - -static void SubFrameParamsFree(SubFrameParams* const params) { - WebPPictureFree(¶ms->sub_frame_ll_); - WebPPictureFree(¶ms->sub_frame_lossy_); -} - -// Given previous and current canvas, picks the optimal rectangle for the -// current frame based on 'is_lossless' and other parameters. Assumes that the -// initial guess 'rect' is valid. -static int GetSubRect(const WebPPicture* const prev_canvas, - const WebPPicture* const curr_canvas, int is_key_frame, - int is_first_frame, int empty_rect_allowed, - int is_lossless, float quality, - FrameRectangle* const rect, - WebPPicture* const sub_frame) { - if (!is_key_frame || is_first_frame) { // Optimize frame rectangle. - // Note: This behaves as expected for first frame, as 'prev_canvas' is - // initialized to a fully transparent canvas in the beginning. - MinimizeChangeRectangle(prev_canvas, curr_canvas, rect, - is_lossless, quality); - } - - if (IsEmptyRect(rect)) { - if (empty_rect_allowed) { // No need to get 'sub_frame'. - return 1; - } else { // Force a 1x1 rectangle. - rect->width_ = 1; - rect->height_ = 1; - assert(rect->x_offset_ == 0); - assert(rect->y_offset_ == 0); - } - } - - SnapToEvenOffsets(rect); - return WebPPictureView(curr_canvas, rect->x_offset_, rect->y_offset_, - rect->width_, rect->height_, sub_frame); -} - -// Picks optimal frame rectangle for both lossless and lossy compression. The -// initial guess for frame rectangles will be the full canvas. -static int GetSubRects(const WebPPicture* const prev_canvas, - const WebPPicture* const curr_canvas, int is_key_frame, - int is_first_frame, float quality, - SubFrameParams* const params) { - // Lossless frame rectangle. - params->rect_ll_.x_offset_ = 0; - params->rect_ll_.y_offset_ = 0; - params->rect_ll_.width_ = curr_canvas->width; - params->rect_ll_.height_ = curr_canvas->height; - if (!GetSubRect(prev_canvas, curr_canvas, is_key_frame, is_first_frame, - params->empty_rect_allowed_, 1, quality, - ¶ms->rect_ll_, ¶ms->sub_frame_ll_)) { - return 0; - } - // Lossy frame rectangle. - params->rect_lossy_ = params->rect_ll_; // seed with lossless rect. - return GetSubRect(prev_canvas, curr_canvas, is_key_frame, is_first_frame, - params->empty_rect_allowed_, 0, quality, - ¶ms->rect_lossy_, ¶ms->sub_frame_lossy_); -} - -static WEBP_INLINE int clip(int v, int min_v, int max_v) { - return (v < min_v) ? min_v : (v > max_v) ? max_v : v; -} - -int WebPAnimEncoderRefineRect( - const WebPPicture* const prev_canvas, const WebPPicture* const curr_canvas, - int is_lossless, float quality, int* const x_offset, int* const y_offset, - int* const width, int* const height) { - FrameRectangle rect; - const int right = clip(*x_offset + *width, 0, curr_canvas->width); - const int left = clip(*x_offset, 0, curr_canvas->width - 1); - const int bottom = clip(*y_offset + *height, 0, curr_canvas->height); - const int top = clip(*y_offset, 0, curr_canvas->height - 1); - if (prev_canvas == NULL || curr_canvas == NULL || - prev_canvas->width != curr_canvas->width || - prev_canvas->height != curr_canvas->height || - !prev_canvas->use_argb || !curr_canvas->use_argb) { - return 0; - } - rect.x_offset_ = left; - rect.y_offset_ = top; - rect.width_ = clip(right - left, 0, curr_canvas->width - rect.x_offset_); - rect.height_ = clip(bottom - top, 0, curr_canvas->height - rect.y_offset_); - MinimizeChangeRectangle(prev_canvas, curr_canvas, &rect, is_lossless, - quality); - SnapToEvenOffsets(&rect); - *x_offset = rect.x_offset_; - *y_offset = rect.y_offset_; - *width = rect.width_; - *height = rect.height_; - return 1; -} - -static void DisposeFrameRectangle(int dispose_method, - const FrameRectangle* const rect, - WebPPicture* const curr_canvas) { - assert(rect != NULL); - if (dispose_method == WEBP_MUX_DISPOSE_BACKGROUND) { - WebPUtilClearPic(curr_canvas, rect); - } -} - -static uint32_t RectArea(const FrameRectangle* const rect) { - return (uint32_t)rect->width_ * rect->height_; -} - -static int IsLosslessBlendingPossible(const WebPPicture* const src, - const WebPPicture* const dst, - const FrameRectangle* const rect) { - int i, j; - assert(src->width == dst->width && src->height == dst->height); - assert(rect->x_offset_ + rect->width_ <= dst->width); - assert(rect->y_offset_ + rect->height_ <= dst->height); - for (j = rect->y_offset_; j < rect->y_offset_ + rect->height_; ++j) { - for (i = rect->x_offset_; i < rect->x_offset_ + rect->width_; ++i) { - const uint32_t src_pixel = src->argb[j * src->argb_stride + i]; - const uint32_t dst_pixel = dst->argb[j * dst->argb_stride + i]; - const uint32_t dst_alpha = dst_pixel >> 24; - if (dst_alpha != 0xff && src_pixel != dst_pixel) { - // In this case, if we use blending, we can't attain the desired - // 'dst_pixel' value for this pixel. So, blending is not possible. - return 0; - } - } - } - return 1; -} - -static int IsLossyBlendingPossible(const WebPPicture* const src, - const WebPPicture* const dst, - const FrameRectangle* const rect, - float quality) { - const int max_allowed_diff_lossy = QualityToMaxDiff(quality); - int i, j; - assert(src->width == dst->width && src->height == dst->height); - assert(rect->x_offset_ + rect->width_ <= dst->width); - assert(rect->y_offset_ + rect->height_ <= dst->height); - for (j = rect->y_offset_; j < rect->y_offset_ + rect->height_; ++j) { - for (i = rect->x_offset_; i < rect->x_offset_ + rect->width_; ++i) { - const uint32_t src_pixel = src->argb[j * src->argb_stride + i]; - const uint32_t dst_pixel = dst->argb[j * dst->argb_stride + i]; - const uint32_t dst_alpha = dst_pixel >> 24; - if (dst_alpha != 0xff && - !PixelsAreSimilar(src_pixel, dst_pixel, max_allowed_diff_lossy)) { - // In this case, if we use blending, we can't attain the desired - // 'dst_pixel' value for this pixel. So, blending is not possible. - return 0; - } - } - } - return 1; -} - -// For pixels in 'rect', replace those pixels in 'dst' that are same as 'src' by -// transparent pixels. -// Returns true if at least one pixel gets modified. -static int IncreaseTransparency(const WebPPicture* const src, - const FrameRectangle* const rect, - WebPPicture* const dst) { - int i, j; - int modified = 0; - assert(src != NULL && dst != NULL && rect != NULL); - assert(src->width == dst->width && src->height == dst->height); - for (j = rect->y_offset_; j < rect->y_offset_ + rect->height_; ++j) { - const uint32_t* const psrc = src->argb + j * src->argb_stride; - uint32_t* const pdst = dst->argb + j * dst->argb_stride; - for (i = rect->x_offset_; i < rect->x_offset_ + rect->width_; ++i) { - if (psrc[i] == pdst[i] && pdst[i] != TRANSPARENT_COLOR) { - pdst[i] = TRANSPARENT_COLOR; - modified = 1; - } - } - } - return modified; -} - -#undef TRANSPARENT_COLOR - -// Replace similar blocks of pixels by a 'see-through' transparent block -// with uniform average color. -// Assumes lossy compression is being used. -// Returns true if at least one pixel gets modified. -static int FlattenSimilarBlocks(const WebPPicture* const src, - const FrameRectangle* const rect, - WebPPicture* const dst, float quality) { - const int max_allowed_diff_lossy = QualityToMaxDiff(quality); - int i, j; - int modified = 0; - const int block_size = 8; - const int y_start = (rect->y_offset_ + block_size) & ~(block_size - 1); - const int y_end = (rect->y_offset_ + rect->height_) & ~(block_size - 1); - const int x_start = (rect->x_offset_ + block_size) & ~(block_size - 1); - const int x_end = (rect->x_offset_ + rect->width_) & ~(block_size - 1); - assert(src != NULL && dst != NULL && rect != NULL); - assert(src->width == dst->width && src->height == dst->height); - assert((block_size & (block_size - 1)) == 0); // must be a power of 2 - // Iterate over each block and count similar pixels. - for (j = y_start; j < y_end; j += block_size) { - for (i = x_start; i < x_end; i += block_size) { - int cnt = 0; - int avg_r = 0, avg_g = 0, avg_b = 0; - int x, y; - const uint32_t* const psrc = src->argb + j * src->argb_stride + i; - uint32_t* const pdst = dst->argb + j * dst->argb_stride + i; - for (y = 0; y < block_size; ++y) { - for (x = 0; x < block_size; ++x) { - const uint32_t src_pixel = psrc[x + y * src->argb_stride]; - const int alpha = src_pixel >> 24; - if (alpha == 0xff && - PixelsAreSimilar(src_pixel, pdst[x + y * dst->argb_stride], - max_allowed_diff_lossy)) { - ++cnt; - avg_r += (src_pixel >> 16) & 0xff; - avg_g += (src_pixel >> 8) & 0xff; - avg_b += (src_pixel >> 0) & 0xff; - } - } - } - // If we have a fully similar block, we replace it with an - // average transparent block. This compresses better in lossy mode. - if (cnt == block_size * block_size) { - const uint32_t color = (0x00 << 24) | - ((avg_r / cnt) << 16) | - ((avg_g / cnt) << 8) | - ((avg_b / cnt) << 0); - for (y = 0; y < block_size; ++y) { - for (x = 0; x < block_size; ++x) { - pdst[x + y * dst->argb_stride] = color; - } - } - modified = 1; - } - } - } - return modified; -} - -static int EncodeFrame(const WebPConfig* const config, WebPPicture* const pic, - WebPMemoryWriter* const memory) { - pic->use_argb = 1; - pic->writer = WebPMemoryWrite; - pic->custom_ptr = memory; - if (!WebPEncode(config, pic)) { - return 0; - } - return 1; -} - -// Struct representing a candidate encoded frame including its metadata. -typedef struct { - WebPMemoryWriter mem_; - WebPMuxFrameInfo info_; - FrameRectangle rect_; - int evaluate_; // True if this candidate should be evaluated. -} Candidate; - -// Generates a candidate encoded frame given a picture and metadata. -static WebPEncodingError EncodeCandidate(WebPPicture* const sub_frame, - const FrameRectangle* const rect, - const WebPConfig* const encoder_config, - int use_blending, - Candidate* const candidate) { - WebPConfig config = *encoder_config; - WebPEncodingError error_code = VP8_ENC_OK; - assert(candidate != NULL); - memset(candidate, 0, sizeof(*candidate)); - - // Set frame rect and info. - candidate->rect_ = *rect; - candidate->info_.id = WEBP_CHUNK_ANMF; - candidate->info_.x_offset = rect->x_offset_; - candidate->info_.y_offset = rect->y_offset_; - candidate->info_.dispose_method = WEBP_MUX_DISPOSE_NONE; // Set later. - candidate->info_.blend_method = - use_blending ? WEBP_MUX_BLEND : WEBP_MUX_NO_BLEND; - candidate->info_.duration = 0; // Set in next call to WebPAnimEncoderAdd(). - - // Encode picture. - WebPMemoryWriterInit(&candidate->mem_); - - if (!config.lossless && use_blending) { - // Disable filtering to avoid blockiness in reconstructed frames at the - // time of decoding. - config.autofilter = 0; - config.filter_strength = 0; - } - if (!EncodeFrame(&config, sub_frame, &candidate->mem_)) { - error_code = sub_frame->error_code; - goto Err; - } - - candidate->evaluate_ = 1; - return error_code; - - Err: - WebPMemoryWriterClear(&candidate->mem_); - return error_code; -} - -static void CopyCurrentCanvas(WebPAnimEncoder* const enc) { - if (enc->curr_canvas_copy_modified_) { - WebPCopyPixels(enc->curr_canvas_, &enc->curr_canvas_copy_); - enc->curr_canvas_copy_.progress_hook = enc->curr_canvas_->progress_hook; - enc->curr_canvas_copy_.user_data = enc->curr_canvas_->user_data; - enc->curr_canvas_copy_modified_ = 0; - } -} - -enum { - LL_DISP_NONE = 0, - LL_DISP_BG, - LOSSY_DISP_NONE, - LOSSY_DISP_BG, - CANDIDATE_COUNT -}; - -#define MIN_COLORS_LOSSY 31 // Don't try lossy below this threshold. -#define MAX_COLORS_LOSSLESS 194 // Don't try lossless above this threshold. - -// Generates candidates for a given dispose method given pre-filled sub-frame -// 'params'. -static WebPEncodingError GenerateCandidates( - WebPAnimEncoder* const enc, Candidate candidates[CANDIDATE_COUNT], - WebPMuxAnimDispose dispose_method, int is_lossless, int is_key_frame, - SubFrameParams* const params, - const WebPConfig* const config_ll, const WebPConfig* const config_lossy) { - WebPEncodingError error_code = VP8_ENC_OK; - const int is_dispose_none = (dispose_method == WEBP_MUX_DISPOSE_NONE); - Candidate* const candidate_ll = - is_dispose_none ? &candidates[LL_DISP_NONE] : &candidates[LL_DISP_BG]; - Candidate* const candidate_lossy = is_dispose_none - ? &candidates[LOSSY_DISP_NONE] - : &candidates[LOSSY_DISP_BG]; - WebPPicture* const curr_canvas = &enc->curr_canvas_copy_; - const WebPPicture* const prev_canvas = - is_dispose_none ? &enc->prev_canvas_ : &enc->prev_canvas_disposed_; - int use_blending_ll, use_blending_lossy; - int evaluate_ll, evaluate_lossy; - - CopyCurrentCanvas(enc); - use_blending_ll = - !is_key_frame && - IsLosslessBlendingPossible(prev_canvas, curr_canvas, ¶ms->rect_ll_); - use_blending_lossy = - !is_key_frame && - IsLossyBlendingPossible(prev_canvas, curr_canvas, ¶ms->rect_lossy_, - config_lossy->quality); - - // Pick candidates to be tried. - if (!enc->options_.allow_mixed) { - evaluate_ll = is_lossless; - evaluate_lossy = !is_lossless; - } else if (enc->options_.minimize_size) { - evaluate_ll = 1; - evaluate_lossy = 1; - } else { // Use a heuristic for trying lossless and/or lossy compression. - const int num_colors = WebPGetColorPalette(¶ms->sub_frame_ll_, NULL); - evaluate_ll = (num_colors < MAX_COLORS_LOSSLESS); - evaluate_lossy = (num_colors >= MIN_COLORS_LOSSY); - } - - // Generate candidates. - if (evaluate_ll) { - CopyCurrentCanvas(enc); - if (use_blending_ll) { - enc->curr_canvas_copy_modified_ = - IncreaseTransparency(prev_canvas, ¶ms->rect_ll_, curr_canvas); - } - error_code = EncodeCandidate(¶ms->sub_frame_ll_, ¶ms->rect_ll_, - config_ll, use_blending_ll, candidate_ll); - if (error_code != VP8_ENC_OK) return error_code; - } - if (evaluate_lossy) { - CopyCurrentCanvas(enc); - if (use_blending_lossy) { - enc->curr_canvas_copy_modified_ = - FlattenSimilarBlocks(prev_canvas, ¶ms->rect_lossy_, curr_canvas, - config_lossy->quality); - } - error_code = - EncodeCandidate(¶ms->sub_frame_lossy_, ¶ms->rect_lossy_, - config_lossy, use_blending_lossy, candidate_lossy); - if (error_code != VP8_ENC_OK) return error_code; - enc->curr_canvas_copy_modified_ = 1; - } - return error_code; -} - -#undef MIN_COLORS_LOSSY -#undef MAX_COLORS_LOSSLESS - -static void GetEncodedData(const WebPMemoryWriter* const memory, - WebPData* const encoded_data) { - encoded_data->bytes = memory->mem; - encoded_data->size = memory->size; -} - -// Sets dispose method of the previous frame to be 'dispose_method'. -static void SetPreviousDisposeMethod(WebPAnimEncoder* const enc, - WebPMuxAnimDispose dispose_method) { - const size_t position = enc->count_ - 2; - EncodedFrame* const prev_enc_frame = GetFrame(enc, position); - assert(enc->count_ >= 2); // As current and previous frames are in enc. - - if (enc->prev_candidate_undecided_) { - assert(dispose_method == WEBP_MUX_DISPOSE_NONE); - prev_enc_frame->sub_frame_.dispose_method = dispose_method; - prev_enc_frame->key_frame_.dispose_method = dispose_method; - } else { - WebPMuxFrameInfo* const prev_info = prev_enc_frame->is_key_frame_ - ? &prev_enc_frame->key_frame_ - : &prev_enc_frame->sub_frame_; - prev_info->dispose_method = dispose_method; - } -} - -static int IncreasePreviousDuration(WebPAnimEncoder* const enc, int duration) { - const size_t position = enc->count_ - 1; - EncodedFrame* const prev_enc_frame = GetFrame(enc, position); - int new_duration; - - assert(enc->count_ >= 1); - assert(prev_enc_frame->sub_frame_.duration == - prev_enc_frame->key_frame_.duration); - assert(prev_enc_frame->sub_frame_.duration == - (prev_enc_frame->sub_frame_.duration & (MAX_DURATION - 1))); - assert(duration == (duration & (MAX_DURATION - 1))); - - new_duration = prev_enc_frame->sub_frame_.duration + duration; - if (new_duration >= MAX_DURATION) { // Special case. - // Separate out previous frame from earlier merged frames to avoid overflow. - // We add a 1x1 transparent frame for the previous frame, with blending on. - const FrameRectangle rect = { 0, 0, 1, 1 }; - const uint8_t lossless_1x1_bytes[] = { - 0x52, 0x49, 0x46, 0x46, 0x14, 0x00, 0x00, 0x00, 0x57, 0x45, 0x42, 0x50, - 0x56, 0x50, 0x38, 0x4c, 0x08, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, - 0x10, 0x88, 0x88, 0x08 - }; - const WebPData lossless_1x1 = { - lossless_1x1_bytes, sizeof(lossless_1x1_bytes) - }; - const uint8_t lossy_1x1_bytes[] = { - 0x52, 0x49, 0x46, 0x46, 0x40, 0x00, 0x00, 0x00, 0x57, 0x45, 0x42, 0x50, - 0x56, 0x50, 0x38, 0x58, 0x0a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x4c, 0x50, 0x48, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x56, 0x50, 0x38, 0x20, 0x18, 0x00, 0x00, 0x00, - 0x30, 0x01, 0x00, 0x9d, 0x01, 0x2a, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, - 0x34, 0x25, 0xa4, 0x00, 0x03, 0x70, 0x00, 0xfe, 0xfb, 0xfd, 0x50, 0x00 - }; - const WebPData lossy_1x1 = { lossy_1x1_bytes, sizeof(lossy_1x1_bytes) }; - const int can_use_lossless = - (enc->last_config_.lossless || enc->options_.allow_mixed); - EncodedFrame* const curr_enc_frame = GetFrame(enc, enc->count_); - curr_enc_frame->is_key_frame_ = 0; - curr_enc_frame->sub_frame_.id = WEBP_CHUNK_ANMF; - curr_enc_frame->sub_frame_.x_offset = 0; - curr_enc_frame->sub_frame_.y_offset = 0; - curr_enc_frame->sub_frame_.dispose_method = WEBP_MUX_DISPOSE_NONE; - curr_enc_frame->sub_frame_.blend_method = WEBP_MUX_BLEND; - curr_enc_frame->sub_frame_.duration = duration; - if (!WebPDataCopy(can_use_lossless ? &lossless_1x1 : &lossy_1x1, - &curr_enc_frame->sub_frame_.bitstream)) { - return 0; - } - ++enc->count_; - ++enc->count_since_key_frame_; - enc->flush_count_ = enc->count_ - 1; - enc->prev_candidate_undecided_ = 0; - enc->prev_rect_ = rect; - } else { // Regular case. - // Increase duration of the previous frame by 'duration'. - prev_enc_frame->sub_frame_.duration = new_duration; - prev_enc_frame->key_frame_.duration = new_duration; - } - return 1; -} - -// Pick the candidate encoded frame with smallest size and release other -// candidates. -// TODO(later): Perhaps a rough SSIM/PSNR produced by the encoder should -// also be a criteria, in addition to sizes. -static void PickBestCandidate(WebPAnimEncoder* const enc, - Candidate* const candidates, int is_key_frame, - EncodedFrame* const encoded_frame) { - int i; - int best_idx = -1; - size_t best_size = ~0; - for (i = 0; i < CANDIDATE_COUNT; ++i) { - if (candidates[i].evaluate_) { - const size_t candidate_size = candidates[i].mem_.size; - if (candidate_size < best_size) { - best_idx = i; - best_size = candidate_size; - } - } - } - assert(best_idx != -1); - for (i = 0; i < CANDIDATE_COUNT; ++i) { - if (candidates[i].evaluate_) { - if (i == best_idx) { - WebPMuxFrameInfo* const dst = is_key_frame - ? &encoded_frame->key_frame_ - : &encoded_frame->sub_frame_; - *dst = candidates[i].info_; - GetEncodedData(&candidates[i].mem_, &dst->bitstream); - if (!is_key_frame) { - // Note: Previous dispose method only matters for non-keyframes. - // Also, we don't want to modify previous dispose method that was - // selected when a non key-frame was assumed. - const WebPMuxAnimDispose prev_dispose_method = - (best_idx == LL_DISP_NONE || best_idx == LOSSY_DISP_NONE) - ? WEBP_MUX_DISPOSE_NONE - : WEBP_MUX_DISPOSE_BACKGROUND; - SetPreviousDisposeMethod(enc, prev_dispose_method); - } - enc->prev_rect_ = candidates[i].rect_; // save for next frame. - } else { - WebPMemoryWriterClear(&candidates[i].mem_); - candidates[i].evaluate_ = 0; - } - } - } -} - -// Depending on the configuration, tries different compressions -// (lossy/lossless), dispose methods, blending methods etc to encode the current -// frame and outputs the best one in 'encoded_frame'. -// 'frame_skipped' will be set to true if this frame should actually be skipped. -static WebPEncodingError SetFrame(WebPAnimEncoder* const enc, - const WebPConfig* const config, - int is_key_frame, - EncodedFrame* const encoded_frame, - int* const frame_skipped) { - int i; - WebPEncodingError error_code = VP8_ENC_OK; - const WebPPicture* const curr_canvas = &enc->curr_canvas_copy_; - const WebPPicture* const prev_canvas = &enc->prev_canvas_; - Candidate candidates[CANDIDATE_COUNT]; - const int is_lossless = config->lossless; - const int consider_lossless = is_lossless || enc->options_.allow_mixed; - const int consider_lossy = !is_lossless || enc->options_.allow_mixed; - const int is_first_frame = enc->is_first_frame_; - - // First frame cannot be skipped as there is no 'previous frame' to merge it - // to. So, empty rectangle is not allowed for the first frame. - const int empty_rect_allowed_none = !is_first_frame; - - // Even if there is exact pixel match between 'disposed previous canvas' and - // 'current canvas', we can't skip current frame, as there may not be exact - // pixel match between 'previous canvas' and 'current canvas'. So, we don't - // allow empty rectangle in this case. - const int empty_rect_allowed_bg = 0; - - // If current frame is a key-frame, dispose method of previous frame doesn't - // matter, so we don't try dispose to background. - // Also, if key-frame insertion is on, and previous frame could be picked as - // either a sub-frame or a key-frame, then we can't be sure about what frame - // rectangle would be disposed. In that case too, we don't try dispose to - // background. - const int dispose_bg_possible = - !is_key_frame && !enc->prev_candidate_undecided_; - - SubFrameParams dispose_none_params; - SubFrameParams dispose_bg_params; - - WebPConfig config_ll = *config; - WebPConfig config_lossy = *config; - config_ll.lossless = 1; - config_lossy.lossless = 0; - enc->last_config_ = *config; - enc->last_config_reversed_ = config->lossless ? config_lossy : config_ll; - *frame_skipped = 0; - - if (!SubFrameParamsInit(&dispose_none_params, 1, empty_rect_allowed_none) || - !SubFrameParamsInit(&dispose_bg_params, 0, empty_rect_allowed_bg)) { - return VP8_ENC_ERROR_INVALID_CONFIGURATION; - } - - memset(candidates, 0, sizeof(candidates)); - - // Change-rectangle assuming previous frame was DISPOSE_NONE. - if (!GetSubRects(prev_canvas, curr_canvas, is_key_frame, is_first_frame, - config_lossy.quality, &dispose_none_params)) { - error_code = VP8_ENC_ERROR_INVALID_CONFIGURATION; - goto Err; - } - - if ((consider_lossless && IsEmptyRect(&dispose_none_params.rect_ll_)) || - (consider_lossy && IsEmptyRect(&dispose_none_params.rect_lossy_))) { - // Don't encode the frame at all. Instead, the duration of the previous - // frame will be increased later. - assert(empty_rect_allowed_none); - *frame_skipped = 1; - goto End; - } - - if (dispose_bg_possible) { - // Change-rectangle assuming previous frame was DISPOSE_BACKGROUND. - WebPPicture* const prev_canvas_disposed = &enc->prev_canvas_disposed_; - WebPCopyPixels(prev_canvas, prev_canvas_disposed); - DisposeFrameRectangle(WEBP_MUX_DISPOSE_BACKGROUND, &enc->prev_rect_, - prev_canvas_disposed); - - if (!GetSubRects(prev_canvas_disposed, curr_canvas, is_key_frame, - is_first_frame, config_lossy.quality, - &dispose_bg_params)) { - error_code = VP8_ENC_ERROR_INVALID_CONFIGURATION; - goto Err; - } - assert(!IsEmptyRect(&dispose_bg_params.rect_ll_)); - assert(!IsEmptyRect(&dispose_bg_params.rect_lossy_)); - - if (enc->options_.minimize_size) { // Try both dispose methods. - dispose_bg_params.should_try_ = 1; - dispose_none_params.should_try_ = 1; - } else if ((is_lossless && - RectArea(&dispose_bg_params.rect_ll_) < - RectArea(&dispose_none_params.rect_ll_)) || - (!is_lossless && - RectArea(&dispose_bg_params.rect_lossy_) < - RectArea(&dispose_none_params.rect_lossy_))) { - dispose_bg_params.should_try_ = 1; // Pick DISPOSE_BACKGROUND. - dispose_none_params.should_try_ = 0; - } - } - - if (dispose_none_params.should_try_) { - error_code = GenerateCandidates( - enc, candidates, WEBP_MUX_DISPOSE_NONE, is_lossless, is_key_frame, - &dispose_none_params, &config_ll, &config_lossy); - if (error_code != VP8_ENC_OK) goto Err; - } - - if (dispose_bg_params.should_try_) { - assert(!enc->is_first_frame_); - assert(dispose_bg_possible); - error_code = GenerateCandidates( - enc, candidates, WEBP_MUX_DISPOSE_BACKGROUND, is_lossless, is_key_frame, - &dispose_bg_params, &config_ll, &config_lossy); - if (error_code != VP8_ENC_OK) goto Err; - } - - PickBestCandidate(enc, candidates, is_key_frame, encoded_frame); - - goto End; - - Err: - for (i = 0; i < CANDIDATE_COUNT; ++i) { - if (candidates[i].evaluate_) { - WebPMemoryWriterClear(&candidates[i].mem_); - } - } - - End: - SubFrameParamsFree(&dispose_none_params); - SubFrameParamsFree(&dispose_bg_params); - return error_code; -} - -// Calculate the penalty incurred if we encode given frame as a key frame -// instead of a sub-frame. -static int64_t KeyFramePenalty(const EncodedFrame* const encoded_frame) { - return ((int64_t)encoded_frame->key_frame_.bitstream.size - - encoded_frame->sub_frame_.bitstream.size); -} - -static int CacheFrame(WebPAnimEncoder* const enc, - const WebPConfig* const config) { - int ok = 0; - int frame_skipped = 0; - WebPEncodingError error_code = VP8_ENC_OK; - const size_t position = enc->count_; - EncodedFrame* const encoded_frame = GetFrame(enc, position); - - ++enc->count_; - - if (enc->is_first_frame_) { // Add this as a key-frame. - error_code = SetFrame(enc, config, 1, encoded_frame, &frame_skipped); - if (error_code != VP8_ENC_OK) goto End; - assert(frame_skipped == 0); // First frame can't be skipped, even if empty. - assert(position == 0 && enc->count_ == 1); - encoded_frame->is_key_frame_ = 1; - enc->flush_count_ = 0; - enc->count_since_key_frame_ = 0; - enc->prev_candidate_undecided_ = 0; - } else { - ++enc->count_since_key_frame_; - if (enc->count_since_key_frame_ <= enc->options_.kmin) { - // Add this as a frame rectangle. - error_code = SetFrame(enc, config, 0, encoded_frame, &frame_skipped); - if (error_code != VP8_ENC_OK) goto End; - if (frame_skipped) goto Skip; - encoded_frame->is_key_frame_ = 0; - enc->flush_count_ = enc->count_ - 1; - enc->prev_candidate_undecided_ = 0; - } else { - int64_t curr_delta; - FrameRectangle prev_rect_key, prev_rect_sub; - - // Add this as a frame rectangle to enc. - error_code = SetFrame(enc, config, 0, encoded_frame, &frame_skipped); - if (error_code != VP8_ENC_OK) goto End; - if (frame_skipped) goto Skip; - prev_rect_sub = enc->prev_rect_; - - - // Add this as a key-frame to enc, too. - error_code = SetFrame(enc, config, 1, encoded_frame, &frame_skipped); - if (error_code != VP8_ENC_OK) goto End; - assert(frame_skipped == 0); // Key-frame cannot be an empty rectangle. - prev_rect_key = enc->prev_rect_; - - // Analyze size difference of the two variants. - curr_delta = KeyFramePenalty(encoded_frame); - if (curr_delta <= enc->best_delta_) { // Pick this as the key-frame. - if (enc->keyframe_ != KEYFRAME_NONE) { - EncodedFrame* const old_keyframe = GetFrame(enc, enc->keyframe_); - assert(old_keyframe->is_key_frame_); - old_keyframe->is_key_frame_ = 0; - } - encoded_frame->is_key_frame_ = 1; - enc->prev_candidate_undecided_ = 1; - enc->keyframe_ = (int)position; - enc->best_delta_ = curr_delta; - enc->flush_count_ = enc->count_ - 1; // We can flush previous frames. - } else { - encoded_frame->is_key_frame_ = 0; - enc->prev_candidate_undecided_ = 0; - } - // Note: We need '>=' below because when kmin and kmax are both zero, - // count_since_key_frame will always be > kmax. - if (enc->count_since_key_frame_ >= enc->options_.kmax) { - enc->flush_count_ = enc->count_ - 1; - enc->count_since_key_frame_ = 0; - enc->keyframe_ = KEYFRAME_NONE; - enc->best_delta_ = DELTA_INFINITY; - } - if (!enc->prev_candidate_undecided_) { - enc->prev_rect_ = - encoded_frame->is_key_frame_ ? prev_rect_key : prev_rect_sub; - } - } - } - - // Update previous to previous and previous canvases for next call. - WebPCopyPixels(enc->curr_canvas_, &enc->prev_canvas_); - enc->is_first_frame_ = 0; - - Skip: - ok = 1; - ++enc->in_frame_count_; - - End: - if (!ok || frame_skipped) { - FrameRelease(encoded_frame); - // We reset some counters, as the frame addition failed/was skipped. - --enc->count_; - if (!enc->is_first_frame_) --enc->count_since_key_frame_; - if (!ok) { - MarkError2(enc, "ERROR adding frame. WebPEncodingError", error_code); - } - } - enc->curr_canvas_->error_code = error_code; // report error_code - assert(ok || error_code != VP8_ENC_OK); - return ok; -} - -static int FlushFrames(WebPAnimEncoder* const enc) { - while (enc->flush_count_ > 0) { - WebPMuxError err; - EncodedFrame* const curr = GetFrame(enc, 0); - const WebPMuxFrameInfo* const info = - curr->is_key_frame_ ? &curr->key_frame_ : &curr->sub_frame_; - assert(enc->mux_ != NULL); - err = WebPMuxPushFrame(enc->mux_, info, 1); - if (err != WEBP_MUX_OK) { - MarkError2(enc, "ERROR adding frame. WebPMuxError", err); - return 0; - } - if (enc->options_.verbose) { - fprintf(stderr, "INFO: Added frame. offset:%d,%d dispose:%d blend:%d\n", - info->x_offset, info->y_offset, info->dispose_method, - info->blend_method); - } - ++enc->out_frame_count_; - FrameRelease(curr); - ++enc->start_; - --enc->flush_count_; - --enc->count_; - if (enc->keyframe_ != KEYFRAME_NONE) --enc->keyframe_; - } - - if (enc->count_ == 1 && enc->start_ != 0) { - // Move enc->start to index 0. - const int enc_start_tmp = (int)enc->start_; - EncodedFrame temp = enc->encoded_frames_[0]; - enc->encoded_frames_[0] = enc->encoded_frames_[enc_start_tmp]; - enc->encoded_frames_[enc_start_tmp] = temp; - FrameRelease(&enc->encoded_frames_[enc_start_tmp]); - enc->start_ = 0; - } - return 1; -} - -#undef DELTA_INFINITY -#undef KEYFRAME_NONE - -int WebPAnimEncoderAdd(WebPAnimEncoder* enc, WebPPicture* frame, int timestamp, - const WebPConfig* encoder_config) { - WebPConfig config; - int ok; - - if (enc == NULL) { - return 0; - } - MarkNoError(enc); - - if (!enc->is_first_frame_) { - // Make sure timestamps are non-decreasing (integer wrap-around is OK). - const uint32_t prev_frame_duration = - (uint32_t)timestamp - enc->prev_timestamp_; - if (prev_frame_duration >= MAX_DURATION) { - if (frame != NULL) { - frame->error_code = VP8_ENC_ERROR_INVALID_CONFIGURATION; - } - MarkError(enc, "ERROR adding frame: timestamps must be non-decreasing"); - return 0; - } - if (!IncreasePreviousDuration(enc, (int)prev_frame_duration)) { - return 0; - } - } else { - enc->first_timestamp_ = timestamp; - } - - if (frame == NULL) { // Special: last call. - enc->got_null_frame_ = 1; - enc->prev_timestamp_ = timestamp; - return 1; - } - - if (frame->width != enc->canvas_width_ || - frame->height != enc->canvas_height_) { - frame->error_code = VP8_ENC_ERROR_INVALID_CONFIGURATION; - MarkError(enc, "ERROR adding frame: Invalid frame dimensions"); - return 0; - } - - if (!frame->use_argb) { // Convert frame from YUV(A) to ARGB. - if (enc->options_.verbose) { - fprintf(stderr, "WARNING: Converting frame from YUV(A) to ARGB format; " - "this incurs a small loss.\n"); - } - if (!WebPPictureYUVAToARGB(frame)) { - MarkError(enc, "ERROR converting frame from YUV(A) to ARGB"); - return 0; - } - } - - if (encoder_config != NULL) { - if (!WebPValidateConfig(encoder_config)) { - MarkError(enc, "ERROR adding frame: Invalid WebPConfig"); - return 0; - } - config = *encoder_config; - } else { - WebPConfigInit(&config); - config.lossless = 1; - } - assert(enc->curr_canvas_ == NULL); - enc->curr_canvas_ = frame; // Store reference. - assert(enc->curr_canvas_copy_modified_ == 1); - CopyCurrentCanvas(enc); - - ok = CacheFrame(enc, &config) && FlushFrames(enc); - - enc->curr_canvas_ = NULL; - enc->curr_canvas_copy_modified_ = 1; - if (ok) { - enc->prev_timestamp_ = timestamp; - } - return ok; -} - -// ----------------------------------------------------------------------------- -// Bitstream assembly. - -static int DecodeFrameOntoCanvas(const WebPMuxFrameInfo* const frame, - WebPPicture* const canvas) { - const WebPData* const image = &frame->bitstream; - WebPPicture sub_image; - WebPDecoderConfig config; - WebPInitDecoderConfig(&config); - WebPUtilClearPic(canvas, NULL); - if (WebPGetFeatures(image->bytes, image->size, &config.input) != - VP8_STATUS_OK) { - return 0; - } - if (!WebPPictureView(canvas, frame->x_offset, frame->y_offset, - config.input.width, config.input.height, &sub_image)) { - return 0; - } - config.output.is_external_memory = 1; - config.output.colorspace = MODE_BGRA; - config.output.u.RGBA.rgba = (uint8_t*)sub_image.argb; - config.output.u.RGBA.stride = sub_image.argb_stride * 4; - config.output.u.RGBA.size = config.output.u.RGBA.stride * sub_image.height; - - if (WebPDecode(image->bytes, image->size, &config) != VP8_STATUS_OK) { - return 0; - } - return 1; -} - -static int FrameToFullCanvas(WebPAnimEncoder* const enc, - const WebPMuxFrameInfo* const frame, - WebPData* const full_image) { - WebPPicture* const canvas_buf = &enc->curr_canvas_copy_; - WebPMemoryWriter mem1, mem2; - WebPMemoryWriterInit(&mem1); - WebPMemoryWriterInit(&mem2); - - if (!DecodeFrameOntoCanvas(frame, canvas_buf)) goto Err; - if (!EncodeFrame(&enc->last_config_, canvas_buf, &mem1)) goto Err; - GetEncodedData(&mem1, full_image); - - if (enc->options_.allow_mixed) { - if (!EncodeFrame(&enc->last_config_reversed_, canvas_buf, &mem2)) goto Err; - if (mem2.size < mem1.size) { - GetEncodedData(&mem2, full_image); - WebPMemoryWriterClear(&mem1); - } else { - WebPMemoryWriterClear(&mem2); - } - } - return 1; - - Err: - WebPMemoryWriterClear(&mem1); - WebPMemoryWriterClear(&mem2); - return 0; -} - -// Convert a single-frame animation to a non-animated image if appropriate. -// TODO(urvang): Can we pick one of the two heuristically (based on frame -// rectangle and/or presence of alpha)? -static WebPMuxError OptimizeSingleFrame(WebPAnimEncoder* const enc, - WebPData* const webp_data) { - WebPMuxError err = WEBP_MUX_OK; - int canvas_width, canvas_height; - WebPMuxFrameInfo frame; - WebPData full_image; - WebPData webp_data2; - WebPMux* const mux = WebPMuxCreate(webp_data, 0); - if (mux == NULL) return WEBP_MUX_BAD_DATA; - assert(enc->out_frame_count_ == 1); - WebPDataInit(&frame.bitstream); - WebPDataInit(&full_image); - WebPDataInit(&webp_data2); - - err = WebPMuxGetFrame(mux, 1, &frame); - if (err != WEBP_MUX_OK) goto End; - if (frame.id != WEBP_CHUNK_ANMF) goto End; // Non-animation: nothing to do. - err = WebPMuxGetCanvasSize(mux, &canvas_width, &canvas_height); - if (err != WEBP_MUX_OK) goto End; - if (!FrameToFullCanvas(enc, &frame, &full_image)) { - err = WEBP_MUX_BAD_DATA; - goto End; - } - err = WebPMuxSetImage(mux, &full_image, 1); - if (err != WEBP_MUX_OK) goto End; - err = WebPMuxAssemble(mux, &webp_data2); - if (err != WEBP_MUX_OK) goto End; - - if (webp_data2.size < webp_data->size) { // Pick 'webp_data2' if smaller. - WebPDataClear(webp_data); - *webp_data = webp_data2; - WebPDataInit(&webp_data2); - } - - End: - WebPDataClear(&frame.bitstream); - WebPDataClear(&full_image); - WebPMuxDelete(mux); - WebPDataClear(&webp_data2); - return err; -} - -int WebPAnimEncoderAssemble(WebPAnimEncoder* enc, WebPData* webp_data) { - WebPMux* mux; - WebPMuxError err; - - if (enc == NULL) { - return 0; - } - MarkNoError(enc); - - if (webp_data == NULL) { - MarkError(enc, "ERROR assembling: NULL input"); - return 0; - } - - if (enc->in_frame_count_ == 0) { - MarkError(enc, "ERROR: No frames to assemble"); - return 0; - } - - if (!enc->got_null_frame_ && enc->in_frame_count_ > 1 && enc->count_ > 0) { - // set duration of the last frame to be avg of durations of previous frames. - const double delta_time = - (uint32_t)enc->prev_timestamp_ - enc->first_timestamp_; - const int average_duration = (int)(delta_time / (enc->in_frame_count_ - 1)); - if (!IncreasePreviousDuration(enc, average_duration)) { - return 0; - } - } - - // Flush any remaining frames. - enc->flush_count_ = enc->count_; - if (!FlushFrames(enc)) { - return 0; - } - - // Set definitive canvas size. - mux = enc->mux_; - err = WebPMuxSetCanvasSize(mux, enc->canvas_width_, enc->canvas_height_); - if (err != WEBP_MUX_OK) goto Err; - - err = WebPMuxSetAnimationParams(mux, &enc->options_.anim_params); - if (err != WEBP_MUX_OK) goto Err; - - // Assemble into a WebP bitstream. - err = WebPMuxAssemble(mux, webp_data); - if (err != WEBP_MUX_OK) goto Err; - - if (enc->out_frame_count_ == 1) { - err = OptimizeSingleFrame(enc, webp_data); - if (err != WEBP_MUX_OK) goto Err; - } - return 1; - - Err: - MarkError2(enc, "ERROR assembling WebP", err); - return 0; -} - -const char* WebPAnimEncoderGetError(WebPAnimEncoder* enc) { - if (enc == NULL) return NULL; - return enc->error_str_; -} - -// ----------------------------------------------------------------------------- diff --git a/Dependencies/FreeImage/Source/LibWebP/src/mux/animi.h b/Dependencies/FreeImage/Source/LibWebP/src/mux/animi.h deleted file mode 100644 index 8db49b5..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/mux/animi.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Internal header for animation related functions. -// -// Author: Hui Su (huisu@google.com) - -#ifndef WEBP_MUX_ANIMI_H_ -#define WEBP_MUX_ANIMI_H_ - -#include "src/webp/mux.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Picks the optimal rectangle between two pictures, starting with initial -// values of offsets and dimensions that are passed in. The initial -// values will be clipped, if necessary, to make sure the rectangle is -// within the canvas. "use_argb" must be true for both pictures. -// Parameters: -// prev_canvas, curr_canvas - (in) two input pictures to compare. -// is_lossless, quality - (in) encoding settings. -// x_offset, y_offset, width, height - (in/out) rectangle between the two -// input pictures. -// Returns true on success. -int WebPAnimEncoderRefineRect( - const struct WebPPicture* const prev_canvas, - const struct WebPPicture* const curr_canvas, - int is_lossless, float quality, int* const x_offset, int* const y_offset, - int* const width, int* const height); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_MUX_ANIMI_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/mux/muxedit.c b/Dependencies/FreeImage/Source/LibWebP/src/mux/muxedit.c deleted file mode 100644 index 855868b..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/mux/muxedit.c +++ /dev/null @@ -1,657 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Set and delete APIs for mux. -// -// Authors: Urvang (urvang@google.com) -// Vikas (vikasa@google.com) - -#include -#include "src/mux/muxi.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ -// Life of a mux object. - -static void MuxInit(WebPMux* const mux) { - assert(mux != NULL); - memset(mux, 0, sizeof(*mux)); - mux->canvas_width_ = 0; // just to be explicit - mux->canvas_height_ = 0; -} - -WebPMux* WebPNewInternal(int version) { - if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_MUX_ABI_VERSION)) { - return NULL; - } else { - WebPMux* const mux = (WebPMux*)WebPSafeMalloc(1ULL, sizeof(WebPMux)); - if (mux != NULL) MuxInit(mux); - return mux; - } -} - -// Delete all images in 'wpi_list'. -static void DeleteAllImages(WebPMuxImage** const wpi_list) { - while (*wpi_list != NULL) { - *wpi_list = MuxImageDelete(*wpi_list); - } -} - -static void MuxRelease(WebPMux* const mux) { - assert(mux != NULL); - DeleteAllImages(&mux->images_); - ChunkListDelete(&mux->vp8x_); - ChunkListDelete(&mux->iccp_); - ChunkListDelete(&mux->anim_); - ChunkListDelete(&mux->exif_); - ChunkListDelete(&mux->xmp_); - ChunkListDelete(&mux->unknown_); -} - -void WebPMuxDelete(WebPMux* mux) { - if (mux != NULL) { - MuxRelease(mux); - WebPSafeFree(mux); - } -} - -//------------------------------------------------------------------------------ -// Helper method(s). - -// Handy MACRO, makes MuxSet() very symmetric to MuxGet(). -#define SWITCH_ID_LIST(INDEX, LIST) \ - if (idx == (INDEX)) { \ - err = ChunkAssignData(&chunk, data, copy_data, tag); \ - if (err == WEBP_MUX_OK) { \ - err = ChunkSetHead(&chunk, (LIST)); \ - } \ - return err; \ - } - -static WebPMuxError MuxSet(WebPMux* const mux, uint32_t tag, - const WebPData* const data, int copy_data) { - WebPChunk chunk; - WebPMuxError err = WEBP_MUX_NOT_FOUND; - const CHUNK_INDEX idx = ChunkGetIndexFromTag(tag); - assert(mux != NULL); - assert(!IsWPI(kChunks[idx].id)); - - ChunkInit(&chunk); - SWITCH_ID_LIST(IDX_VP8X, &mux->vp8x_); - SWITCH_ID_LIST(IDX_ICCP, &mux->iccp_); - SWITCH_ID_LIST(IDX_ANIM, &mux->anim_); - SWITCH_ID_LIST(IDX_EXIF, &mux->exif_); - SWITCH_ID_LIST(IDX_XMP, &mux->xmp_); - SWITCH_ID_LIST(IDX_UNKNOWN, &mux->unknown_); - return err; -} -#undef SWITCH_ID_LIST - -// Create data for frame given image data, offsets and duration. -static WebPMuxError CreateFrameData( - int width, int height, const WebPMuxFrameInfo* const info, - WebPData* const frame) { - uint8_t* frame_bytes; - const size_t frame_size = kChunks[IDX_ANMF].size; - - assert(width > 0 && height > 0 && info->duration >= 0); - assert(info->dispose_method == (info->dispose_method & 1)); - // Note: assertion on upper bounds is done in PutLE24(). - - frame_bytes = (uint8_t*)WebPSafeMalloc(1ULL, frame_size); - if (frame_bytes == NULL) return WEBP_MUX_MEMORY_ERROR; - - PutLE24(frame_bytes + 0, info->x_offset / 2); - PutLE24(frame_bytes + 3, info->y_offset / 2); - - PutLE24(frame_bytes + 6, width - 1); - PutLE24(frame_bytes + 9, height - 1); - PutLE24(frame_bytes + 12, info->duration); - frame_bytes[15] = - (info->blend_method == WEBP_MUX_NO_BLEND ? 2 : 0) | - (info->dispose_method == WEBP_MUX_DISPOSE_BACKGROUND ? 1 : 0); - - frame->bytes = frame_bytes; - frame->size = frame_size; - return WEBP_MUX_OK; -} - -// Outputs image data given a bitstream. The bitstream can either be a -// single-image WebP file or raw VP8/VP8L data. -// Also outputs 'is_lossless' to be true if the given bitstream is lossless. -static WebPMuxError GetImageData(const WebPData* const bitstream, - WebPData* const image, WebPData* const alpha, - int* const is_lossless) { - WebPDataInit(alpha); // Default: no alpha. - if (bitstream->size < TAG_SIZE || - memcmp(bitstream->bytes, "RIFF", TAG_SIZE)) { - // It is NOT webp file data. Return input data as is. - *image = *bitstream; - } else { - // It is webp file data. Extract image data from it. - const WebPMuxImage* wpi; - WebPMux* const mux = WebPMuxCreate(bitstream, 0); - if (mux == NULL) return WEBP_MUX_BAD_DATA; - wpi = mux->images_; - assert(wpi != NULL && wpi->img_ != NULL); - *image = wpi->img_->data_; - if (wpi->alpha_ != NULL) { - *alpha = wpi->alpha_->data_; - } - WebPMuxDelete(mux); - } - *is_lossless = VP8LCheckSignature(image->bytes, image->size); - return WEBP_MUX_OK; -} - -static WebPMuxError DeleteChunks(WebPChunk** chunk_list, uint32_t tag) { - WebPMuxError err = WEBP_MUX_NOT_FOUND; - assert(chunk_list); - while (*chunk_list) { - WebPChunk* const chunk = *chunk_list; - if (chunk->tag_ == tag) { - *chunk_list = ChunkDelete(chunk); - err = WEBP_MUX_OK; - } else { - chunk_list = &chunk->next_; - } - } - return err; -} - -static WebPMuxError MuxDeleteAllNamedData(WebPMux* const mux, uint32_t tag) { - const WebPChunkId id = ChunkGetIdFromTag(tag); - assert(mux != NULL); - if (IsWPI(id)) return WEBP_MUX_INVALID_ARGUMENT; - return DeleteChunks(MuxGetChunkListFromId(mux, id), tag); -} - -//------------------------------------------------------------------------------ -// Set API(s). - -WebPMuxError WebPMuxSetChunk(WebPMux* mux, const char fourcc[4], - const WebPData* chunk_data, int copy_data) { - uint32_t tag; - WebPMuxError err; - if (mux == NULL || fourcc == NULL || chunk_data == NULL || - chunk_data->bytes == NULL || chunk_data->size > MAX_CHUNK_PAYLOAD) { - return WEBP_MUX_INVALID_ARGUMENT; - } - tag = ChunkGetTagFromFourCC(fourcc); - - // Delete existing chunk(s) with the same 'fourcc'. - err = MuxDeleteAllNamedData(mux, tag); - if (err != WEBP_MUX_OK && err != WEBP_MUX_NOT_FOUND) return err; - - // Add the given chunk. - return MuxSet(mux, tag, chunk_data, copy_data); -} - -// Creates a chunk from given 'data' and sets it as 1st chunk in 'chunk_list'. -static WebPMuxError AddDataToChunkList( - const WebPData* const data, int copy_data, uint32_t tag, - WebPChunk** chunk_list) { - WebPChunk chunk; - WebPMuxError err; - ChunkInit(&chunk); - err = ChunkAssignData(&chunk, data, copy_data, tag); - if (err != WEBP_MUX_OK) goto Err; - err = ChunkSetHead(&chunk, chunk_list); - if (err != WEBP_MUX_OK) goto Err; - return WEBP_MUX_OK; - Err: - ChunkRelease(&chunk); - return err; -} - -// Extracts image & alpha data from the given bitstream and then sets wpi.alpha_ -// and wpi.img_ appropriately. -static WebPMuxError SetAlphaAndImageChunks( - const WebPData* const bitstream, int copy_data, WebPMuxImage* const wpi) { - int is_lossless = 0; - WebPData image, alpha; - WebPMuxError err = GetImageData(bitstream, &image, &alpha, &is_lossless); - const int image_tag = - is_lossless ? kChunks[IDX_VP8L].tag : kChunks[IDX_VP8].tag; - if (err != WEBP_MUX_OK) return err; - if (alpha.bytes != NULL) { - err = AddDataToChunkList(&alpha, copy_data, kChunks[IDX_ALPHA].tag, - &wpi->alpha_); - if (err != WEBP_MUX_OK) return err; - } - err = AddDataToChunkList(&image, copy_data, image_tag, &wpi->img_); - if (err != WEBP_MUX_OK) return err; - return MuxImageFinalize(wpi) ? WEBP_MUX_OK : WEBP_MUX_INVALID_ARGUMENT; -} - -WebPMuxError WebPMuxSetImage(WebPMux* mux, const WebPData* bitstream, - int copy_data) { - WebPMuxImage wpi; - WebPMuxError err; - - // Sanity checks. - if (mux == NULL || bitstream == NULL || bitstream->bytes == NULL || - bitstream->size > MAX_CHUNK_PAYLOAD) { - return WEBP_MUX_INVALID_ARGUMENT; - } - - if (mux->images_ != NULL) { - // Only one 'simple image' can be added in mux. So, remove present images. - DeleteAllImages(&mux->images_); - } - - MuxImageInit(&wpi); - err = SetAlphaAndImageChunks(bitstream, copy_data, &wpi); - if (err != WEBP_MUX_OK) goto Err; - - // Add this WebPMuxImage to mux. - err = MuxImagePush(&wpi, &mux->images_); - if (err != WEBP_MUX_OK) goto Err; - - // All is well. - return WEBP_MUX_OK; - - Err: // Something bad happened. - MuxImageRelease(&wpi); - return err; -} - -WebPMuxError WebPMuxPushFrame(WebPMux* mux, const WebPMuxFrameInfo* info, - int copy_data) { - WebPMuxImage wpi; - WebPMuxError err; - - // Sanity checks. - if (mux == NULL || info == NULL) return WEBP_MUX_INVALID_ARGUMENT; - - if (info->id != WEBP_CHUNK_ANMF) return WEBP_MUX_INVALID_ARGUMENT; - - if (info->bitstream.bytes == NULL || - info->bitstream.size > MAX_CHUNK_PAYLOAD) { - return WEBP_MUX_INVALID_ARGUMENT; - } - - if (mux->images_ != NULL) { - const WebPMuxImage* const image = mux->images_; - const uint32_t image_id = (image->header_ != NULL) ? - ChunkGetIdFromTag(image->header_->tag_) : WEBP_CHUNK_IMAGE; - if (image_id != info->id) { - return WEBP_MUX_INVALID_ARGUMENT; // Conflicting frame types. - } - } - - MuxImageInit(&wpi); - err = SetAlphaAndImageChunks(&info->bitstream, copy_data, &wpi); - if (err != WEBP_MUX_OK) goto Err; - assert(wpi.img_ != NULL); // As SetAlphaAndImageChunks() was successful. - - { - WebPData frame; - const uint32_t tag = kChunks[IDX_ANMF].tag; - WebPMuxFrameInfo tmp = *info; - tmp.x_offset &= ~1; // Snap offsets to even. - tmp.y_offset &= ~1; - if (tmp.x_offset < 0 || tmp.x_offset >= MAX_POSITION_OFFSET || - tmp.y_offset < 0 || tmp.y_offset >= MAX_POSITION_OFFSET || - (tmp.duration < 0 || tmp.duration >= MAX_DURATION) || - tmp.dispose_method != (tmp.dispose_method & 1)) { - err = WEBP_MUX_INVALID_ARGUMENT; - goto Err; - } - err = CreateFrameData(wpi.width_, wpi.height_, &tmp, &frame); - if (err != WEBP_MUX_OK) goto Err; - // Add frame chunk (with copy_data = 1). - err = AddDataToChunkList(&frame, 1, tag, &wpi.header_); - WebPDataClear(&frame); // frame owned by wpi.header_ now. - if (err != WEBP_MUX_OK) goto Err; - } - - // Add this WebPMuxImage to mux. - err = MuxImagePush(&wpi, &mux->images_); - if (err != WEBP_MUX_OK) goto Err; - - // All is well. - return WEBP_MUX_OK; - - Err: // Something bad happened. - MuxImageRelease(&wpi); - return err; -} - -WebPMuxError WebPMuxSetAnimationParams(WebPMux* mux, - const WebPMuxAnimParams* params) { - WebPMuxError err; - uint8_t data[ANIM_CHUNK_SIZE]; - const WebPData anim = { data, ANIM_CHUNK_SIZE }; - - if (mux == NULL || params == NULL) return WEBP_MUX_INVALID_ARGUMENT; - if (params->loop_count < 0 || params->loop_count >= MAX_LOOP_COUNT) { - return WEBP_MUX_INVALID_ARGUMENT; - } - - // Delete any existing ANIM chunk(s). - err = MuxDeleteAllNamedData(mux, kChunks[IDX_ANIM].tag); - if (err != WEBP_MUX_OK && err != WEBP_MUX_NOT_FOUND) return err; - - // Set the animation parameters. - PutLE32(data, params->bgcolor); - PutLE16(data + 4, params->loop_count); - return MuxSet(mux, kChunks[IDX_ANIM].tag, &anim, 1); -} - -WebPMuxError WebPMuxSetCanvasSize(WebPMux* mux, - int width, int height) { - WebPMuxError err; - if (mux == NULL) { - return WEBP_MUX_INVALID_ARGUMENT; - } - if (width < 0 || height < 0 || - width > MAX_CANVAS_SIZE || height > MAX_CANVAS_SIZE) { - return WEBP_MUX_INVALID_ARGUMENT; - } - if (width * (uint64_t)height >= MAX_IMAGE_AREA) { - return WEBP_MUX_INVALID_ARGUMENT; - } - if ((width * height) == 0 && (width | height) != 0) { - // one of width / height is zero, but not both -> invalid! - return WEBP_MUX_INVALID_ARGUMENT; - } - // If we already assembled a VP8X chunk, invalidate it. - err = MuxDeleteAllNamedData(mux, kChunks[IDX_VP8X].tag); - if (err != WEBP_MUX_OK && err != WEBP_MUX_NOT_FOUND) return err; - - mux->canvas_width_ = width; - mux->canvas_height_ = height; - return WEBP_MUX_OK; -} - -//------------------------------------------------------------------------------ -// Delete API(s). - -WebPMuxError WebPMuxDeleteChunk(WebPMux* mux, const char fourcc[4]) { - if (mux == NULL || fourcc == NULL) return WEBP_MUX_INVALID_ARGUMENT; - return MuxDeleteAllNamedData(mux, ChunkGetTagFromFourCC(fourcc)); -} - -WebPMuxError WebPMuxDeleteFrame(WebPMux* mux, uint32_t nth) { - if (mux == NULL) return WEBP_MUX_INVALID_ARGUMENT; - return MuxImageDeleteNth(&mux->images_, nth); -} - -//------------------------------------------------------------------------------ -// Assembly of the WebP RIFF file. - -static WebPMuxError GetFrameInfo( - const WebPChunk* const frame_chunk, - int* const x_offset, int* const y_offset, int* const duration) { - const WebPData* const data = &frame_chunk->data_; - const size_t expected_data_size = ANMF_CHUNK_SIZE; - assert(frame_chunk->tag_ == kChunks[IDX_ANMF].tag); - assert(frame_chunk != NULL); - if (data->size != expected_data_size) return WEBP_MUX_INVALID_ARGUMENT; - - *x_offset = 2 * GetLE24(data->bytes + 0); - *y_offset = 2 * GetLE24(data->bytes + 3); - *duration = GetLE24(data->bytes + 12); - return WEBP_MUX_OK; -} - -static WebPMuxError GetImageInfo(const WebPMuxImage* const wpi, - int* const x_offset, int* const y_offset, - int* const duration, - int* const width, int* const height) { - const WebPChunk* const frame_chunk = wpi->header_; - WebPMuxError err; - assert(wpi != NULL); - assert(frame_chunk != NULL); - - // Get offsets and duration from ANMF chunk. - err = GetFrameInfo(frame_chunk, x_offset, y_offset, duration); - if (err != WEBP_MUX_OK) return err; - - // Get width and height from VP8/VP8L chunk. - if (width != NULL) *width = wpi->width_; - if (height != NULL) *height = wpi->height_; - return WEBP_MUX_OK; -} - -// Returns the tightest dimension for the canvas considering the image list. -static WebPMuxError GetAdjustedCanvasSize(const WebPMux* const mux, - int* const width, int* const height) { - WebPMuxImage* wpi = NULL; - assert(mux != NULL); - assert(width != NULL && height != NULL); - - wpi = mux->images_; - assert(wpi != NULL); - assert(wpi->img_ != NULL); - - if (wpi->next_ != NULL) { - int max_x = 0, max_y = 0; - // if we have a chain of wpi's, header_ is necessarily set - assert(wpi->header_ != NULL); - // Aggregate the bounding box for animation frames. - for (; wpi != NULL; wpi = wpi->next_) { - int x_offset = 0, y_offset = 0, duration = 0, w = 0, h = 0; - const WebPMuxError err = GetImageInfo(wpi, &x_offset, &y_offset, - &duration, &w, &h); - const int max_x_pos = x_offset + w; - const int max_y_pos = y_offset + h; - if (err != WEBP_MUX_OK) return err; - assert(x_offset < MAX_POSITION_OFFSET); - assert(y_offset < MAX_POSITION_OFFSET); - - if (max_x_pos > max_x) max_x = max_x_pos; - if (max_y_pos > max_y) max_y = max_y_pos; - } - *width = max_x; - *height = max_y; - } else { - // For a single image, canvas dimensions are same as image dimensions. - *width = wpi->width_; - *height = wpi->height_; - } - return WEBP_MUX_OK; -} - -// VP8X format: -// Total Size : 10, -// Flags : 4 bytes, -// Width : 3 bytes, -// Height : 3 bytes. -static WebPMuxError CreateVP8XChunk(WebPMux* const mux) { - WebPMuxError err = WEBP_MUX_OK; - uint32_t flags = 0; - int width = 0; - int height = 0; - uint8_t data[VP8X_CHUNK_SIZE]; - const WebPData vp8x = { data, VP8X_CHUNK_SIZE }; - const WebPMuxImage* images = NULL; - - assert(mux != NULL); - images = mux->images_; // First image. - if (images == NULL || images->img_ == NULL || - images->img_->data_.bytes == NULL) { - return WEBP_MUX_INVALID_ARGUMENT; - } - - // If VP8X chunk(s) is(are) already present, remove them (and later add new - // VP8X chunk with updated flags). - err = MuxDeleteAllNamedData(mux, kChunks[IDX_VP8X].tag); - if (err != WEBP_MUX_OK && err != WEBP_MUX_NOT_FOUND) return err; - - // Set flags. - if (mux->iccp_ != NULL && mux->iccp_->data_.bytes != NULL) { - flags |= ICCP_FLAG; - } - if (mux->exif_ != NULL && mux->exif_->data_.bytes != NULL) { - flags |= EXIF_FLAG; - } - if (mux->xmp_ != NULL && mux->xmp_->data_.bytes != NULL) { - flags |= XMP_FLAG; - } - if (images->header_ != NULL) { - if (images->header_->tag_ == kChunks[IDX_ANMF].tag) { - // This is an image with animation. - flags |= ANIMATION_FLAG; - } - } - if (MuxImageCount(images, WEBP_CHUNK_ALPHA) > 0) { - flags |= ALPHA_FLAG; // Some images have an alpha channel. - } - - err = GetAdjustedCanvasSize(mux, &width, &height); - if (err != WEBP_MUX_OK) return err; - - if (width <= 0 || height <= 0) { - return WEBP_MUX_INVALID_ARGUMENT; - } - if (width > MAX_CANVAS_SIZE || height > MAX_CANVAS_SIZE) { - return WEBP_MUX_INVALID_ARGUMENT; - } - - if (mux->canvas_width_ != 0 || mux->canvas_height_ != 0) { - if (width > mux->canvas_width_ || height > mux->canvas_height_) { - return WEBP_MUX_INVALID_ARGUMENT; - } - width = mux->canvas_width_; - height = mux->canvas_height_; - } - - if (flags == 0 && mux->unknown_ == NULL) { - // For simple file format, VP8X chunk should not be added. - return WEBP_MUX_OK; - } - - if (MuxHasAlpha(images)) { - // This means some frames explicitly/implicitly contain alpha. - // Note: This 'flags' update must NOT be done for a lossless image - // without a VP8X chunk! - flags |= ALPHA_FLAG; - } - - PutLE32(data + 0, flags); // VP8X chunk flags. - PutLE24(data + 4, width - 1); // canvas width. - PutLE24(data + 7, height - 1); // canvas height. - - return MuxSet(mux, kChunks[IDX_VP8X].tag, &vp8x, 1); -} - -// Cleans up 'mux' by removing any unnecessary chunks. -static WebPMuxError MuxCleanup(WebPMux* const mux) { - int num_frames; - int num_anim_chunks; - - // If we have an image with a single frame, and its rectangle - // covers the whole canvas, convert it to a non-animated image - // (to avoid writing ANMF chunk unnecessarily). - WebPMuxError err = WebPMuxNumChunks(mux, kChunks[IDX_ANMF].id, &num_frames); - if (err != WEBP_MUX_OK) return err; - if (num_frames == 1) { - WebPMuxImage* frame = NULL; - err = MuxImageGetNth((const WebPMuxImage**)&mux->images_, 1, &frame); - assert(err == WEBP_MUX_OK); // We know that one frame does exist. - assert(frame != NULL); - if (frame->header_ != NULL && - ((mux->canvas_width_ == 0 && mux->canvas_height_ == 0) || - (frame->width_ == mux->canvas_width_ && - frame->height_ == mux->canvas_height_))) { - assert(frame->header_->tag_ == kChunks[IDX_ANMF].tag); - ChunkDelete(frame->header_); // Removes ANMF chunk. - frame->header_ = NULL; - num_frames = 0; - } - } - // Remove ANIM chunk if this is a non-animated image. - err = WebPMuxNumChunks(mux, kChunks[IDX_ANIM].id, &num_anim_chunks); - if (err != WEBP_MUX_OK) return err; - if (num_anim_chunks >= 1 && num_frames == 0) { - err = MuxDeleteAllNamedData(mux, kChunks[IDX_ANIM].tag); - if (err != WEBP_MUX_OK) return err; - } - return WEBP_MUX_OK; -} - -// Total size of a list of images. -static size_t ImageListDiskSize(const WebPMuxImage* wpi_list) { - size_t size = 0; - while (wpi_list != NULL) { - size += MuxImageDiskSize(wpi_list); - wpi_list = wpi_list->next_; - } - return size; -} - -// Write out the given list of images into 'dst'. -static uint8_t* ImageListEmit(const WebPMuxImage* wpi_list, uint8_t* dst) { - while (wpi_list != NULL) { - dst = MuxImageEmit(wpi_list, dst); - wpi_list = wpi_list->next_; - } - return dst; -} - -WebPMuxError WebPMuxAssemble(WebPMux* mux, WebPData* assembled_data) { - size_t size = 0; - uint8_t* data = NULL; - uint8_t* dst = NULL; - WebPMuxError err; - - if (assembled_data == NULL) { - return WEBP_MUX_INVALID_ARGUMENT; - } - // Clean up returned data, in case something goes wrong. - memset(assembled_data, 0, sizeof(*assembled_data)); - - if (mux == NULL) { - return WEBP_MUX_INVALID_ARGUMENT; - } - - // Finalize mux. - err = MuxCleanup(mux); - if (err != WEBP_MUX_OK) return err; - err = CreateVP8XChunk(mux); - if (err != WEBP_MUX_OK) return err; - - // Allocate data. - size = ChunkListDiskSize(mux->vp8x_) + ChunkListDiskSize(mux->iccp_) - + ChunkListDiskSize(mux->anim_) + ImageListDiskSize(mux->images_) - + ChunkListDiskSize(mux->exif_) + ChunkListDiskSize(mux->xmp_) - + ChunkListDiskSize(mux->unknown_) + RIFF_HEADER_SIZE; - - data = (uint8_t*)WebPSafeMalloc(1ULL, size); - if (data == NULL) return WEBP_MUX_MEMORY_ERROR; - - // Emit header & chunks. - dst = MuxEmitRiffHeader(data, size); - dst = ChunkListEmit(mux->vp8x_, dst); - dst = ChunkListEmit(mux->iccp_, dst); - dst = ChunkListEmit(mux->anim_, dst); - dst = ImageListEmit(mux->images_, dst); - dst = ChunkListEmit(mux->exif_, dst); - dst = ChunkListEmit(mux->xmp_, dst); - dst = ChunkListEmit(mux->unknown_, dst); - assert(dst == data + size); - - // Validate mux. - err = MuxValidate(mux); - if (err != WEBP_MUX_OK) { - WebPSafeFree(data); - data = NULL; - size = 0; - } - - // Finalize data. - assembled_data->bytes = data; - assembled_data->size = size; - - return err; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/mux/muxi.h b/Dependencies/FreeImage/Source/LibWebP/src/mux/muxi.h deleted file mode 100644 index e8c63fa..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/mux/muxi.h +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Internal header for mux library. -// -// Author: Urvang (urvang@google.com) - -#ifndef WEBP_MUX_MUXI_H_ -#define WEBP_MUX_MUXI_H_ - -#include -#include -#include "src/dec/vp8i_dec.h" -#include "src/dec/vp8li_dec.h" -#include "src/webp/mux.h" - -#ifdef __cplusplus -extern "C" { -#endif - -//------------------------------------------------------------------------------ -// Defines and constants. - -#define MUX_MAJ_VERSION 1 -#define MUX_MIN_VERSION 0 -#define MUX_REV_VERSION 0 - -// Chunk object. -typedef struct WebPChunk WebPChunk; -struct WebPChunk { - uint32_t tag_; - int owner_; // True if *data_ memory is owned internally. - // VP8X, ANIM, and other internally created chunks - // like ANMF are always owned. - WebPData data_; - WebPChunk* next_; -}; - -// MuxImage object. Store a full WebP image (including ANMF chunk, ALPH -// chunk and VP8/VP8L chunk), -typedef struct WebPMuxImage WebPMuxImage; -struct WebPMuxImage { - WebPChunk* header_; // Corresponds to WEBP_CHUNK_ANMF. - WebPChunk* alpha_; // Corresponds to WEBP_CHUNK_ALPHA. - WebPChunk* img_; // Corresponds to WEBP_CHUNK_IMAGE. - WebPChunk* unknown_; // Corresponds to WEBP_CHUNK_UNKNOWN. - int width_; - int height_; - int has_alpha_; // Through ALPH chunk or as part of VP8L. - int is_partial_; // True if only some of the chunks are filled. - WebPMuxImage* next_; -}; - -// Main mux object. Stores data chunks. -struct WebPMux { - WebPMuxImage* images_; - WebPChunk* iccp_; - WebPChunk* exif_; - WebPChunk* xmp_; - WebPChunk* anim_; - WebPChunk* vp8x_; - - WebPChunk* unknown_; - int canvas_width_; - int canvas_height_; -}; - -// CHUNK_INDEX enum: used for indexing within 'kChunks' (defined below) only. -// Note: the reason for having two enums ('WebPChunkId' and 'CHUNK_INDEX') is to -// allow two different chunks to have the same id (e.g. WebPChunkId -// 'WEBP_CHUNK_IMAGE' can correspond to CHUNK_INDEX 'IDX_VP8' or 'IDX_VP8L'). -typedef enum { - IDX_VP8X = 0, - IDX_ICCP, - IDX_ANIM, - IDX_ANMF, - IDX_ALPHA, - IDX_VP8, - IDX_VP8L, - IDX_EXIF, - IDX_XMP, - IDX_UNKNOWN, - - IDX_NIL, - IDX_LAST_CHUNK -} CHUNK_INDEX; - -#define NIL_TAG 0x00000000u // To signal void chunk. - -typedef struct { - uint32_t tag; - WebPChunkId id; - uint32_t size; -} ChunkInfo; - -extern const ChunkInfo kChunks[IDX_LAST_CHUNK]; - -//------------------------------------------------------------------------------ -// Chunk object management. - -// Initialize. -void ChunkInit(WebPChunk* const chunk); - -// Get chunk index from chunk tag. Returns IDX_UNKNOWN if not found. -CHUNK_INDEX ChunkGetIndexFromTag(uint32_t tag); - -// Get chunk id from chunk tag. Returns WEBP_CHUNK_UNKNOWN if not found. -WebPChunkId ChunkGetIdFromTag(uint32_t tag); - -// Convert a fourcc string to a tag. -uint32_t ChunkGetTagFromFourCC(const char fourcc[4]); - -// Get chunk index from fourcc. Returns IDX_UNKNOWN if given fourcc is unknown. -CHUNK_INDEX ChunkGetIndexFromFourCC(const char fourcc[4]); - -// Search for nth chunk with given 'tag' in the chunk list. -// nth = 0 means "last of the list". -WebPChunk* ChunkSearchList(WebPChunk* first, uint32_t nth, uint32_t tag); - -// Fill the chunk with the given data. -WebPMuxError ChunkAssignData(WebPChunk* chunk, const WebPData* const data, - int copy_data, uint32_t tag); - -// Sets 'chunk' as the only element in 'chunk_list' if it is empty. -// On success ownership is transferred from 'chunk' to the 'chunk_list'. -WebPMuxError ChunkSetHead(WebPChunk* const chunk, WebPChunk** const chunk_list); -// Sets 'chunk' at last position in the 'chunk_list'. -// On success ownership is transferred from 'chunk' to the 'chunk_list'. -// *chunk_list also points towards the last valid element of the initial -// *chunk_list. -WebPMuxError ChunkAppend(WebPChunk* const chunk, WebPChunk*** const chunk_list); - -// Releases chunk and returns chunk->next_. -WebPChunk* ChunkRelease(WebPChunk* const chunk); - -// Deletes given chunk & returns chunk->next_. -WebPChunk* ChunkDelete(WebPChunk* const chunk); - -// Deletes all chunks in the given chunk list. -void ChunkListDelete(WebPChunk** const chunk_list); - -// Returns size of the chunk including chunk header and padding byte (if any). -static WEBP_INLINE size_t SizeWithPadding(size_t chunk_size) { - assert(chunk_size <= MAX_CHUNK_PAYLOAD); - return CHUNK_HEADER_SIZE + ((chunk_size + 1) & ~1U); -} - -// Size of a chunk including header and padding. -static WEBP_INLINE size_t ChunkDiskSize(const WebPChunk* chunk) { - const size_t data_size = chunk->data_.size; - return SizeWithPadding(data_size); -} - -// Total size of a list of chunks. -size_t ChunkListDiskSize(const WebPChunk* chunk_list); - -// Write out the given list of chunks into 'dst'. -uint8_t* ChunkListEmit(const WebPChunk* chunk_list, uint8_t* dst); - -//------------------------------------------------------------------------------ -// MuxImage object management. - -// Initialize. -void MuxImageInit(WebPMuxImage* const wpi); - -// Releases image 'wpi' and returns wpi->next. -WebPMuxImage* MuxImageRelease(WebPMuxImage* const wpi); - -// Delete image 'wpi' and return the next image in the list or NULL. -// 'wpi' can be NULL. -WebPMuxImage* MuxImageDelete(WebPMuxImage* const wpi); - -// Count number of images matching the given tag id in the 'wpi_list'. -// If id == WEBP_CHUNK_NIL, all images will be matched. -int MuxImageCount(const WebPMuxImage* wpi_list, WebPChunkId id); - -// Update width/height/has_alpha info from chunks within wpi. -// Also remove ALPH chunk if not needed. -int MuxImageFinalize(WebPMuxImage* const wpi); - -// Check if given ID corresponds to an image related chunk. -static WEBP_INLINE int IsWPI(WebPChunkId id) { - switch (id) { - case WEBP_CHUNK_ANMF: - case WEBP_CHUNK_ALPHA: - case WEBP_CHUNK_IMAGE: return 1; - default: return 0; - } -} - -// Pushes 'wpi' at the end of 'wpi_list'. -WebPMuxError MuxImagePush(const WebPMuxImage* wpi, WebPMuxImage** wpi_list); - -// Delete nth image in the image list. -WebPMuxError MuxImageDeleteNth(WebPMuxImage** wpi_list, uint32_t nth); - -// Get nth image in the image list. -WebPMuxError MuxImageGetNth(const WebPMuxImage** wpi_list, uint32_t nth, - WebPMuxImage** wpi); - -// Total size of the given image. -size_t MuxImageDiskSize(const WebPMuxImage* const wpi); - -// Write out the given image into 'dst'. -uint8_t* MuxImageEmit(const WebPMuxImage* const wpi, uint8_t* dst); - -//------------------------------------------------------------------------------ -// Helper methods for mux. - -// Checks if the given image list contains at least one image with alpha. -int MuxHasAlpha(const WebPMuxImage* images); - -// Write out RIFF header into 'data', given total data size 'size'. -uint8_t* MuxEmitRiffHeader(uint8_t* const data, size_t size); - -// Returns the list where chunk with given ID is to be inserted in mux. -WebPChunk** MuxGetChunkListFromId(const WebPMux* mux, WebPChunkId id); - -// Validates the given mux object. -WebPMuxError MuxValidate(const WebPMux* const mux); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_MUX_MUXI_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/mux/muxinternal.c b/Dependencies/FreeImage/Source/LibWebP/src/mux/muxinternal.c deleted file mode 100644 index 7ffc432..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/mux/muxinternal.c +++ /dev/null @@ -1,548 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Internal objects and utils for mux. -// -// Authors: Urvang (urvang@google.com) -// Vikas (vikasa@google.com) - -#include -#include "src/mux/muxi.h" -#include "src/utils/utils.h" - -#define UNDEFINED_CHUNK_SIZE ((uint32_t)(-1)) - -const ChunkInfo kChunks[] = { - { MKFOURCC('V', 'P', '8', 'X'), WEBP_CHUNK_VP8X, VP8X_CHUNK_SIZE }, - { MKFOURCC('I', 'C', 'C', 'P'), WEBP_CHUNK_ICCP, UNDEFINED_CHUNK_SIZE }, - { MKFOURCC('A', 'N', 'I', 'M'), WEBP_CHUNK_ANIM, ANIM_CHUNK_SIZE }, - { MKFOURCC('A', 'N', 'M', 'F'), WEBP_CHUNK_ANMF, ANMF_CHUNK_SIZE }, - { MKFOURCC('A', 'L', 'P', 'H'), WEBP_CHUNK_ALPHA, UNDEFINED_CHUNK_SIZE }, - { MKFOURCC('V', 'P', '8', ' '), WEBP_CHUNK_IMAGE, UNDEFINED_CHUNK_SIZE }, - { MKFOURCC('V', 'P', '8', 'L'), WEBP_CHUNK_IMAGE, UNDEFINED_CHUNK_SIZE }, - { MKFOURCC('E', 'X', 'I', 'F'), WEBP_CHUNK_EXIF, UNDEFINED_CHUNK_SIZE }, - { MKFOURCC('X', 'M', 'P', ' '), WEBP_CHUNK_XMP, UNDEFINED_CHUNK_SIZE }, - { NIL_TAG, WEBP_CHUNK_UNKNOWN, UNDEFINED_CHUNK_SIZE }, - - { NIL_TAG, WEBP_CHUNK_NIL, UNDEFINED_CHUNK_SIZE } -}; - -//------------------------------------------------------------------------------ - -int WebPGetMuxVersion(void) { - return (MUX_MAJ_VERSION << 16) | (MUX_MIN_VERSION << 8) | MUX_REV_VERSION; -} - -//------------------------------------------------------------------------------ -// Life of a chunk object. - -void ChunkInit(WebPChunk* const chunk) { - assert(chunk); - memset(chunk, 0, sizeof(*chunk)); - chunk->tag_ = NIL_TAG; -} - -WebPChunk* ChunkRelease(WebPChunk* const chunk) { - WebPChunk* next; - if (chunk == NULL) return NULL; - if (chunk->owner_) { - WebPDataClear(&chunk->data_); - } - next = chunk->next_; - ChunkInit(chunk); - return next; -} - -//------------------------------------------------------------------------------ -// Chunk misc methods. - -CHUNK_INDEX ChunkGetIndexFromTag(uint32_t tag) { - int i; - for (i = 0; kChunks[i].tag != NIL_TAG; ++i) { - if (tag == kChunks[i].tag) return (CHUNK_INDEX)i; - } - return IDX_UNKNOWN; -} - -WebPChunkId ChunkGetIdFromTag(uint32_t tag) { - int i; - for (i = 0; kChunks[i].tag != NIL_TAG; ++i) { - if (tag == kChunks[i].tag) return kChunks[i].id; - } - return WEBP_CHUNK_UNKNOWN; -} - -uint32_t ChunkGetTagFromFourCC(const char fourcc[4]) { - return MKFOURCC(fourcc[0], fourcc[1], fourcc[2], fourcc[3]); -} - -CHUNK_INDEX ChunkGetIndexFromFourCC(const char fourcc[4]) { - const uint32_t tag = ChunkGetTagFromFourCC(fourcc); - return ChunkGetIndexFromTag(tag); -} - -//------------------------------------------------------------------------------ -// Chunk search methods. - -// Returns next chunk in the chunk list with the given tag. -static WebPChunk* ChunkSearchNextInList(WebPChunk* chunk, uint32_t tag) { - while (chunk != NULL && chunk->tag_ != tag) { - chunk = chunk->next_; - } - return chunk; -} - -WebPChunk* ChunkSearchList(WebPChunk* first, uint32_t nth, uint32_t tag) { - uint32_t iter = nth; - first = ChunkSearchNextInList(first, tag); - if (first == NULL) return NULL; - - while (--iter != 0) { - WebPChunk* next_chunk = ChunkSearchNextInList(first->next_, tag); - if (next_chunk == NULL) break; - first = next_chunk; - } - return ((nth > 0) && (iter > 0)) ? NULL : first; -} - -//------------------------------------------------------------------------------ -// Chunk writer methods. - -WebPMuxError ChunkAssignData(WebPChunk* chunk, const WebPData* const data, - int copy_data, uint32_t tag) { - // For internally allocated chunks, always copy data & make it owner of data. - if (tag == kChunks[IDX_VP8X].tag || tag == kChunks[IDX_ANIM].tag) { - copy_data = 1; - } - - ChunkRelease(chunk); - - if (data != NULL) { - if (copy_data) { // Copy data. - if (!WebPDataCopy(data, &chunk->data_)) return WEBP_MUX_MEMORY_ERROR; - chunk->owner_ = 1; // Chunk is owner of data. - } else { // Don't copy data. - chunk->data_ = *data; - } - } - chunk->tag_ = tag; - return WEBP_MUX_OK; -} - -WebPMuxError ChunkSetHead(WebPChunk* const chunk, - WebPChunk** const chunk_list) { - WebPChunk* new_chunk; - - assert(chunk_list != NULL); - if (*chunk_list != NULL) { - return WEBP_MUX_NOT_FOUND; - } - - new_chunk = (WebPChunk*)WebPSafeMalloc(1ULL, sizeof(*new_chunk)); - if (new_chunk == NULL) return WEBP_MUX_MEMORY_ERROR; - *new_chunk = *chunk; - chunk->owner_ = 0; - new_chunk->next_ = NULL; - *chunk_list = new_chunk; - return WEBP_MUX_OK; -} - -WebPMuxError ChunkAppend(WebPChunk* const chunk, - WebPChunk*** const chunk_list) { - assert(chunk_list != NULL && *chunk_list != NULL); - - if (**chunk_list == NULL) { - ChunkSetHead(chunk, *chunk_list); - } else { - WebPChunk* last_chunk = **chunk_list; - while (last_chunk->next_ != NULL) last_chunk = last_chunk->next_; - ChunkSetHead(chunk, &last_chunk->next_); - *chunk_list = &last_chunk->next_; - } - return WEBP_MUX_OK; -} - -//------------------------------------------------------------------------------ -// Chunk deletion method(s). - -WebPChunk* ChunkDelete(WebPChunk* const chunk) { - WebPChunk* const next = ChunkRelease(chunk); - WebPSafeFree(chunk); - return next; -} - -void ChunkListDelete(WebPChunk** const chunk_list) { - while (*chunk_list != NULL) { - *chunk_list = ChunkDelete(*chunk_list); - } -} - -//------------------------------------------------------------------------------ -// Chunk serialization methods. - -static uint8_t* ChunkEmit(const WebPChunk* const chunk, uint8_t* dst) { - const size_t chunk_size = chunk->data_.size; - assert(chunk); - assert(chunk->tag_ != NIL_TAG); - PutLE32(dst + 0, chunk->tag_); - PutLE32(dst + TAG_SIZE, (uint32_t)chunk_size); - assert(chunk_size == (uint32_t)chunk_size); - memcpy(dst + CHUNK_HEADER_SIZE, chunk->data_.bytes, chunk_size); - if (chunk_size & 1) - dst[CHUNK_HEADER_SIZE + chunk_size] = 0; // Add padding. - return dst + ChunkDiskSize(chunk); -} - -uint8_t* ChunkListEmit(const WebPChunk* chunk_list, uint8_t* dst) { - while (chunk_list != NULL) { - dst = ChunkEmit(chunk_list, dst); - chunk_list = chunk_list->next_; - } - return dst; -} - -size_t ChunkListDiskSize(const WebPChunk* chunk_list) { - size_t size = 0; - while (chunk_list != NULL) { - size += ChunkDiskSize(chunk_list); - chunk_list = chunk_list->next_; - } - return size; -} - -//------------------------------------------------------------------------------ -// Life of a MuxImage object. - -void MuxImageInit(WebPMuxImage* const wpi) { - assert(wpi); - memset(wpi, 0, sizeof(*wpi)); -} - -WebPMuxImage* MuxImageRelease(WebPMuxImage* const wpi) { - WebPMuxImage* next; - if (wpi == NULL) return NULL; - // There should be at most one chunk of header_, alpha_, img_ but we call - // ChunkListDelete to be safe - ChunkListDelete(&wpi->header_); - ChunkListDelete(&wpi->alpha_); - ChunkListDelete(&wpi->img_); - ChunkListDelete(&wpi->unknown_); - - next = wpi->next_; - MuxImageInit(wpi); - return next; -} - -//------------------------------------------------------------------------------ -// MuxImage search methods. - -// Get a reference to appropriate chunk list within an image given chunk tag. -static WebPChunk** GetChunkListFromId(const WebPMuxImage* const wpi, - WebPChunkId id) { - assert(wpi != NULL); - switch (id) { - case WEBP_CHUNK_ANMF: return (WebPChunk**)&wpi->header_; - case WEBP_CHUNK_ALPHA: return (WebPChunk**)&wpi->alpha_; - case WEBP_CHUNK_IMAGE: return (WebPChunk**)&wpi->img_; - default: return NULL; - } -} - -int MuxImageCount(const WebPMuxImage* wpi_list, WebPChunkId id) { - int count = 0; - const WebPMuxImage* current; - for (current = wpi_list; current != NULL; current = current->next_) { - if (id == WEBP_CHUNK_NIL) { - ++count; // Special case: count all images. - } else { - const WebPChunk* const wpi_chunk = *GetChunkListFromId(current, id); - if (wpi_chunk != NULL) { - const WebPChunkId wpi_chunk_id = ChunkGetIdFromTag(wpi_chunk->tag_); - if (wpi_chunk_id == id) ++count; // Count images with a matching 'id'. - } - } - } - return count; -} - -// Outputs a pointer to 'prev_wpi->next_', -// where 'prev_wpi' is the pointer to the image at position (nth - 1). -// Returns true if nth image was found. -static int SearchImageToGetOrDelete(WebPMuxImage** wpi_list, uint32_t nth, - WebPMuxImage*** const location) { - uint32_t count = 0; - assert(wpi_list); - *location = wpi_list; - - if (nth == 0) { - nth = MuxImageCount(*wpi_list, WEBP_CHUNK_NIL); - if (nth == 0) return 0; // Not found. - } - - while (*wpi_list != NULL) { - WebPMuxImage* const cur_wpi = *wpi_list; - ++count; - if (count == nth) return 1; // Found. - wpi_list = &cur_wpi->next_; - *location = wpi_list; - } - return 0; // Not found. -} - -//------------------------------------------------------------------------------ -// MuxImage writer methods. - -WebPMuxError MuxImagePush(const WebPMuxImage* wpi, WebPMuxImage** wpi_list) { - WebPMuxImage* new_wpi; - - while (*wpi_list != NULL) { - WebPMuxImage* const cur_wpi = *wpi_list; - if (cur_wpi->next_ == NULL) break; - wpi_list = &cur_wpi->next_; - } - - new_wpi = (WebPMuxImage*)WebPSafeMalloc(1ULL, sizeof(*new_wpi)); - if (new_wpi == NULL) return WEBP_MUX_MEMORY_ERROR; - *new_wpi = *wpi; - new_wpi->next_ = NULL; - - if (*wpi_list != NULL) { - (*wpi_list)->next_ = new_wpi; - } else { - *wpi_list = new_wpi; - } - return WEBP_MUX_OK; -} - -//------------------------------------------------------------------------------ -// MuxImage deletion methods. - -WebPMuxImage* MuxImageDelete(WebPMuxImage* const wpi) { - // Delete the components of wpi. If wpi is NULL this is a noop. - WebPMuxImage* const next = MuxImageRelease(wpi); - WebPSafeFree(wpi); - return next; -} - -WebPMuxError MuxImageDeleteNth(WebPMuxImage** wpi_list, uint32_t nth) { - assert(wpi_list); - if (!SearchImageToGetOrDelete(wpi_list, nth, &wpi_list)) { - return WEBP_MUX_NOT_FOUND; - } - *wpi_list = MuxImageDelete(*wpi_list); - return WEBP_MUX_OK; -} - -//------------------------------------------------------------------------------ -// MuxImage reader methods. - -WebPMuxError MuxImageGetNth(const WebPMuxImage** wpi_list, uint32_t nth, - WebPMuxImage** wpi) { - assert(wpi_list); - assert(wpi); - if (!SearchImageToGetOrDelete((WebPMuxImage**)wpi_list, nth, - (WebPMuxImage***)&wpi_list)) { - return WEBP_MUX_NOT_FOUND; - } - *wpi = (WebPMuxImage*)*wpi_list; - return WEBP_MUX_OK; -} - -//------------------------------------------------------------------------------ -// MuxImage serialization methods. - -// Size of an image. -size_t MuxImageDiskSize(const WebPMuxImage* const wpi) { - size_t size = 0; - if (wpi->header_ != NULL) size += ChunkDiskSize(wpi->header_); - if (wpi->alpha_ != NULL) size += ChunkDiskSize(wpi->alpha_); - if (wpi->img_ != NULL) size += ChunkDiskSize(wpi->img_); - if (wpi->unknown_ != NULL) size += ChunkListDiskSize(wpi->unknown_); - return size; -} - -// Special case as ANMF chunk encapsulates other image chunks. -static uint8_t* ChunkEmitSpecial(const WebPChunk* const header, - size_t total_size, uint8_t* dst) { - const size_t header_size = header->data_.size; - const size_t offset_to_next = total_size - CHUNK_HEADER_SIZE; - assert(header->tag_ == kChunks[IDX_ANMF].tag); - PutLE32(dst + 0, header->tag_); - PutLE32(dst + TAG_SIZE, (uint32_t)offset_to_next); - assert(header_size == (uint32_t)header_size); - memcpy(dst + CHUNK_HEADER_SIZE, header->data_.bytes, header_size); - if (header_size & 1) { - dst[CHUNK_HEADER_SIZE + header_size] = 0; // Add padding. - } - return dst + ChunkDiskSize(header); -} - -uint8_t* MuxImageEmit(const WebPMuxImage* const wpi, uint8_t* dst) { - // Ordering of chunks to be emitted is strictly as follows: - // 1. ANMF chunk (if present). - // 2. ALPH chunk (if present). - // 3. VP8/VP8L chunk. - assert(wpi); - if (wpi->header_ != NULL) { - dst = ChunkEmitSpecial(wpi->header_, MuxImageDiskSize(wpi), dst); - } - if (wpi->alpha_ != NULL) dst = ChunkEmit(wpi->alpha_, dst); - if (wpi->img_ != NULL) dst = ChunkEmit(wpi->img_, dst); - if (wpi->unknown_ != NULL) dst = ChunkListEmit(wpi->unknown_, dst); - return dst; -} - -//------------------------------------------------------------------------------ -// Helper methods for mux. - -int MuxHasAlpha(const WebPMuxImage* images) { - while (images != NULL) { - if (images->has_alpha_) return 1; - images = images->next_; - } - return 0; -} - -uint8_t* MuxEmitRiffHeader(uint8_t* const data, size_t size) { - PutLE32(data + 0, MKFOURCC('R', 'I', 'F', 'F')); - PutLE32(data + TAG_SIZE, (uint32_t)size - CHUNK_HEADER_SIZE); - assert(size == (uint32_t)size); - PutLE32(data + TAG_SIZE + CHUNK_SIZE_BYTES, MKFOURCC('W', 'E', 'B', 'P')); - return data + RIFF_HEADER_SIZE; -} - -WebPChunk** MuxGetChunkListFromId(const WebPMux* mux, WebPChunkId id) { - assert(mux != NULL); - switch (id) { - case WEBP_CHUNK_VP8X: return (WebPChunk**)&mux->vp8x_; - case WEBP_CHUNK_ICCP: return (WebPChunk**)&mux->iccp_; - case WEBP_CHUNK_ANIM: return (WebPChunk**)&mux->anim_; - case WEBP_CHUNK_EXIF: return (WebPChunk**)&mux->exif_; - case WEBP_CHUNK_XMP: return (WebPChunk**)&mux->xmp_; - default: return (WebPChunk**)&mux->unknown_; - } -} - -static int IsNotCompatible(int feature, int num_items) { - return (feature != 0) != (num_items > 0); -} - -#define NO_FLAG ((WebPFeatureFlags)0) - -// Test basic constraints: -// retrieval, maximum number of chunks by index (use -1 to skip) -// and feature incompatibility (use NO_FLAG to skip). -// On success returns WEBP_MUX_OK and stores the chunk count in *num. -static WebPMuxError ValidateChunk(const WebPMux* const mux, CHUNK_INDEX idx, - WebPFeatureFlags feature, - uint32_t vp8x_flags, - int max, int* num) { - const WebPMuxError err = - WebPMuxNumChunks(mux, kChunks[idx].id, num); - if (err != WEBP_MUX_OK) return err; - if (max > -1 && *num > max) return WEBP_MUX_INVALID_ARGUMENT; - if (feature != NO_FLAG && IsNotCompatible(vp8x_flags & feature, *num)) { - return WEBP_MUX_INVALID_ARGUMENT; - } - return WEBP_MUX_OK; -} - -WebPMuxError MuxValidate(const WebPMux* const mux) { - int num_iccp; - int num_exif; - int num_xmp; - int num_anim; - int num_frames; - int num_vp8x; - int num_images; - int num_alpha; - uint32_t flags; - WebPMuxError err; - - // Verify mux is not NULL. - if (mux == NULL) return WEBP_MUX_INVALID_ARGUMENT; - - // Verify mux has at least one image. - if (mux->images_ == NULL) return WEBP_MUX_INVALID_ARGUMENT; - - err = WebPMuxGetFeatures(mux, &flags); - if (err != WEBP_MUX_OK) return err; - - // At most one color profile chunk. - err = ValidateChunk(mux, IDX_ICCP, ICCP_FLAG, flags, 1, &num_iccp); - if (err != WEBP_MUX_OK) return err; - - // At most one EXIF metadata. - err = ValidateChunk(mux, IDX_EXIF, EXIF_FLAG, flags, 1, &num_exif); - if (err != WEBP_MUX_OK) return err; - - // At most one XMP metadata. - err = ValidateChunk(mux, IDX_XMP, XMP_FLAG, flags, 1, &num_xmp); - if (err != WEBP_MUX_OK) return err; - - // Animation: ANIMATION_FLAG, ANIM chunk and ANMF chunk(s) are consistent. - // At most one ANIM chunk. - err = ValidateChunk(mux, IDX_ANIM, NO_FLAG, flags, 1, &num_anim); - if (err != WEBP_MUX_OK) return err; - err = ValidateChunk(mux, IDX_ANMF, NO_FLAG, flags, -1, &num_frames); - if (err != WEBP_MUX_OK) return err; - - { - const int has_animation = !!(flags & ANIMATION_FLAG); - if (has_animation && (num_anim == 0 || num_frames == 0)) { - return WEBP_MUX_INVALID_ARGUMENT; - } - if (!has_animation && (num_anim == 1 || num_frames > 0)) { - return WEBP_MUX_INVALID_ARGUMENT; - } - if (!has_animation) { - const WebPMuxImage* images = mux->images_; - // There can be only one image. - if (images == NULL || images->next_ != NULL) { - return WEBP_MUX_INVALID_ARGUMENT; - } - // Size must match. - if (mux->canvas_width_ > 0) { - if (images->width_ != mux->canvas_width_ || - images->height_ != mux->canvas_height_) { - return WEBP_MUX_INVALID_ARGUMENT; - } - } - } - } - - // Verify either VP8X chunk is present OR there is only one elem in - // mux->images_. - err = ValidateChunk(mux, IDX_VP8X, NO_FLAG, flags, 1, &num_vp8x); - if (err != WEBP_MUX_OK) return err; - err = ValidateChunk(mux, IDX_VP8, NO_FLAG, flags, -1, &num_images); - if (err != WEBP_MUX_OK) return err; - if (num_vp8x == 0 && num_images != 1) return WEBP_MUX_INVALID_ARGUMENT; - - // ALPHA_FLAG & alpha chunk(s) are consistent. - // Note: ALPHA_FLAG can be set when there is actually no Alpha data present. - if (MuxHasAlpha(mux->images_)) { - if (num_vp8x > 0) { - // VP8X chunk is present, so it should contain ALPHA_FLAG. - if (!(flags & ALPHA_FLAG)) return WEBP_MUX_INVALID_ARGUMENT; - } else { - // VP8X chunk is not present, so ALPH chunks should NOT be present either. - err = WebPMuxNumChunks(mux, WEBP_CHUNK_ALPHA, &num_alpha); - if (err != WEBP_MUX_OK) return err; - if (num_alpha > 0) return WEBP_MUX_INVALID_ARGUMENT; - } - } - - return WEBP_MUX_OK; -} - -#undef NO_FLAG - -//------------------------------------------------------------------------------ - diff --git a/Dependencies/FreeImage/Source/LibWebP/src/mux/muxread.c b/Dependencies/FreeImage/Source/LibWebP/src/mux/muxread.c deleted file mode 100644 index 153c1de..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/mux/muxread.c +++ /dev/null @@ -1,558 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Read APIs for mux. -// -// Authors: Urvang (urvang@google.com) -// Vikas (vikasa@google.com) - -#include -#include "src/mux/muxi.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ -// Helper method(s). - -// Handy MACRO. -#define SWITCH_ID_LIST(INDEX, LIST) \ - if (idx == (INDEX)) { \ - const WebPChunk* const chunk = ChunkSearchList((LIST), nth, \ - kChunks[(INDEX)].tag); \ - if (chunk) { \ - *data = chunk->data_; \ - return WEBP_MUX_OK; \ - } else { \ - return WEBP_MUX_NOT_FOUND; \ - } \ - } - -static WebPMuxError MuxGet(const WebPMux* const mux, CHUNK_INDEX idx, - uint32_t nth, WebPData* const data) { - assert(mux != NULL); - assert(!IsWPI(kChunks[idx].id)); - WebPDataInit(data); - - SWITCH_ID_LIST(IDX_VP8X, mux->vp8x_); - SWITCH_ID_LIST(IDX_ICCP, mux->iccp_); - SWITCH_ID_LIST(IDX_ANIM, mux->anim_); - SWITCH_ID_LIST(IDX_EXIF, mux->exif_); - SWITCH_ID_LIST(IDX_XMP, mux->xmp_); - assert(idx != IDX_UNKNOWN); - return WEBP_MUX_NOT_FOUND; -} -#undef SWITCH_ID_LIST - -// Fill the chunk with the given data (includes chunk header bytes), after some -// verifications. -static WebPMuxError ChunkVerifyAndAssign(WebPChunk* chunk, - const uint8_t* data, size_t data_size, - size_t riff_size, int copy_data) { - uint32_t chunk_size; - WebPData chunk_data; - - // Sanity checks. - if (data_size < CHUNK_HEADER_SIZE) return WEBP_MUX_NOT_ENOUGH_DATA; - chunk_size = GetLE32(data + TAG_SIZE); - if (chunk_size > MAX_CHUNK_PAYLOAD) return WEBP_MUX_BAD_DATA; - - { - const size_t chunk_disk_size = SizeWithPadding(chunk_size); - if (chunk_disk_size > riff_size) return WEBP_MUX_BAD_DATA; - if (chunk_disk_size > data_size) return WEBP_MUX_NOT_ENOUGH_DATA; - } - - // Data assignment. - chunk_data.bytes = data + CHUNK_HEADER_SIZE; - chunk_data.size = chunk_size; - return ChunkAssignData(chunk, &chunk_data, copy_data, GetLE32(data + 0)); -} - -int MuxImageFinalize(WebPMuxImage* const wpi) { - const WebPChunk* const img = wpi->img_; - const WebPData* const image = &img->data_; - const int is_lossless = (img->tag_ == kChunks[IDX_VP8L].tag); - int w, h; - int vp8l_has_alpha = 0; - const int ok = is_lossless ? - VP8LGetInfo(image->bytes, image->size, &w, &h, &vp8l_has_alpha) : - VP8GetInfo(image->bytes, image->size, image->size, &w, &h); - assert(img != NULL); - if (ok) { - // Ignore ALPH chunk accompanying VP8L. - if (is_lossless && (wpi->alpha_ != NULL)) { - ChunkDelete(wpi->alpha_); - wpi->alpha_ = NULL; - } - wpi->width_ = w; - wpi->height_ = h; - wpi->has_alpha_ = vp8l_has_alpha || (wpi->alpha_ != NULL); - } - return ok; -} - -static int MuxImageParse(const WebPChunk* const chunk, int copy_data, - WebPMuxImage* const wpi) { - const uint8_t* bytes = chunk->data_.bytes; - size_t size = chunk->data_.size; - const uint8_t* const last = bytes + size; - WebPChunk subchunk; - size_t subchunk_size; - WebPChunk** unknown_chunk_list = &wpi->unknown_; - ChunkInit(&subchunk); - - assert(chunk->tag_ == kChunks[IDX_ANMF].tag); - assert(!wpi->is_partial_); - - // ANMF. - { - const size_t hdr_size = ANMF_CHUNK_SIZE; - const WebPData temp = { bytes, hdr_size }; - // Each of ANMF chunk contain a header at the beginning. So, its size should - // be at least 'hdr_size'. - if (size < hdr_size) goto Fail; - ChunkAssignData(&subchunk, &temp, copy_data, chunk->tag_); - } - ChunkSetHead(&subchunk, &wpi->header_); - wpi->is_partial_ = 1; // Waiting for ALPH and/or VP8/VP8L chunks. - - // Rest of the chunks. - subchunk_size = ChunkDiskSize(&subchunk) - CHUNK_HEADER_SIZE; - bytes += subchunk_size; - size -= subchunk_size; - - while (bytes != last) { - ChunkInit(&subchunk); - if (ChunkVerifyAndAssign(&subchunk, bytes, size, size, - copy_data) != WEBP_MUX_OK) { - goto Fail; - } - switch (ChunkGetIdFromTag(subchunk.tag_)) { - case WEBP_CHUNK_ALPHA: - if (wpi->alpha_ != NULL) goto Fail; // Consecutive ALPH chunks. - if (ChunkSetHead(&subchunk, &wpi->alpha_) != WEBP_MUX_OK) goto Fail; - wpi->is_partial_ = 1; // Waiting for a VP8 chunk. - break; - case WEBP_CHUNK_IMAGE: - if (wpi->img_ != NULL) goto Fail; // Only 1 image chunk allowed. - if (ChunkSetHead(&subchunk, &wpi->img_) != WEBP_MUX_OK) goto Fail; - if (!MuxImageFinalize(wpi)) goto Fail; - wpi->is_partial_ = 0; // wpi is completely filled. - break; - case WEBP_CHUNK_UNKNOWN: - if (wpi->is_partial_) { - goto Fail; // Encountered an unknown chunk - // before some image chunks. - } - if (ChunkAppend(&subchunk, &unknown_chunk_list) != WEBP_MUX_OK) { - goto Fail; - } - break; - default: - goto Fail; - break; - } - subchunk_size = ChunkDiskSize(&subchunk); - bytes += subchunk_size; - size -= subchunk_size; - } - if (wpi->is_partial_) goto Fail; - return 1; - - Fail: - ChunkRelease(&subchunk); - return 0; -} - -//------------------------------------------------------------------------------ -// Create a mux object from WebP-RIFF data. - -WebPMux* WebPMuxCreateInternal(const WebPData* bitstream, int copy_data, - int version) { - size_t riff_size; - uint32_t tag; - const uint8_t* end; - WebPMux* mux = NULL; - WebPMuxImage* wpi = NULL; - const uint8_t* data; - size_t size; - WebPChunk chunk; - // Stores the end of the chunk lists so that it is faster to append data to - // their ends. - WebPChunk** chunk_list_ends[WEBP_CHUNK_NIL + 1] = { NULL }; - ChunkInit(&chunk); - - // Sanity checks. - if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_MUX_ABI_VERSION)) { - return NULL; // version mismatch - } - if (bitstream == NULL) return NULL; - - data = bitstream->bytes; - size = bitstream->size; - - if (data == NULL) return NULL; - if (size < RIFF_HEADER_SIZE + CHUNK_HEADER_SIZE) return NULL; - if (GetLE32(data + 0) != MKFOURCC('R', 'I', 'F', 'F') || - GetLE32(data + CHUNK_HEADER_SIZE) != MKFOURCC('W', 'E', 'B', 'P')) { - return NULL; - } - - mux = WebPMuxNew(); - if (mux == NULL) return NULL; - - tag = GetLE32(data + RIFF_HEADER_SIZE); - if (tag != kChunks[IDX_VP8].tag && - tag != kChunks[IDX_VP8L].tag && - tag != kChunks[IDX_VP8X].tag) { - goto Err; // First chunk should be VP8, VP8L or VP8X. - } - - riff_size = GetLE32(data + TAG_SIZE); - if (riff_size > MAX_CHUNK_PAYLOAD) goto Err; - - // Note this padding is historical and differs from demux.c which does not - // pad the file size. - riff_size = SizeWithPadding(riff_size); - if (riff_size < CHUNK_HEADER_SIZE) goto Err; - if (riff_size > size) goto Err; - // There's no point in reading past the end of the RIFF chunk. - if (size > riff_size + CHUNK_HEADER_SIZE) { - size = riff_size + CHUNK_HEADER_SIZE; - } - - end = data + size; - data += RIFF_HEADER_SIZE; - size -= RIFF_HEADER_SIZE; - - wpi = (WebPMuxImage*)WebPSafeMalloc(1ULL, sizeof(*wpi)); - if (wpi == NULL) goto Err; - MuxImageInit(wpi); - - // Loop over chunks. - while (data != end) { - size_t data_size; - WebPChunkId id; - if (ChunkVerifyAndAssign(&chunk, data, size, riff_size, - copy_data) != WEBP_MUX_OK) { - goto Err; - } - data_size = ChunkDiskSize(&chunk); - id = ChunkGetIdFromTag(chunk.tag_); - switch (id) { - case WEBP_CHUNK_ALPHA: - if (wpi->alpha_ != NULL) goto Err; // Consecutive ALPH chunks. - if (ChunkSetHead(&chunk, &wpi->alpha_) != WEBP_MUX_OK) goto Err; - wpi->is_partial_ = 1; // Waiting for a VP8 chunk. - break; - case WEBP_CHUNK_IMAGE: - if (ChunkSetHead(&chunk, &wpi->img_) != WEBP_MUX_OK) goto Err; - if (!MuxImageFinalize(wpi)) goto Err; - wpi->is_partial_ = 0; // wpi is completely filled. - PushImage: - // Add this to mux->images_ list. - if (MuxImagePush(wpi, &mux->images_) != WEBP_MUX_OK) goto Err; - MuxImageInit(wpi); // Reset for reading next image. - break; - case WEBP_CHUNK_ANMF: - if (wpi->is_partial_) goto Err; // Previous wpi is still incomplete. - if (!MuxImageParse(&chunk, copy_data, wpi)) goto Err; - ChunkRelease(&chunk); - goto PushImage; - break; - default: // A non-image chunk. - if (wpi->is_partial_) goto Err; // Encountered a non-image chunk before - // getting all chunks of an image. - if (chunk_list_ends[id] == NULL) { - chunk_list_ends[id] = - MuxGetChunkListFromId(mux, id); // List to add this chunk. - } - if (ChunkAppend(&chunk, &chunk_list_ends[id]) != WEBP_MUX_OK) goto Err; - if (id == WEBP_CHUNK_VP8X) { // grab global specs - if (data_size < CHUNK_HEADER_SIZE + VP8X_CHUNK_SIZE) goto Err; - mux->canvas_width_ = GetLE24(data + 12) + 1; - mux->canvas_height_ = GetLE24(data + 15) + 1; - } - break; - } - data += data_size; - size -= data_size; - ChunkInit(&chunk); - } - - // Incomplete image. - if (wpi->is_partial_) goto Err; - - // Validate mux if complete. - if (MuxValidate(mux) != WEBP_MUX_OK) goto Err; - - MuxImageDelete(wpi); - return mux; // All OK; - - Err: // Something bad happened. - ChunkRelease(&chunk); - MuxImageDelete(wpi); - WebPMuxDelete(mux); - return NULL; -} - -//------------------------------------------------------------------------------ -// Get API(s). - -// Validates that the given mux has a single image. -static WebPMuxError ValidateForSingleImage(const WebPMux* const mux) { - const int num_images = MuxImageCount(mux->images_, WEBP_CHUNK_IMAGE); - const int num_frames = MuxImageCount(mux->images_, WEBP_CHUNK_ANMF); - - if (num_images == 0) { - // No images in mux. - return WEBP_MUX_NOT_FOUND; - } else if (num_images == 1 && num_frames == 0) { - // Valid case (single image). - return WEBP_MUX_OK; - } else { - // Frame case OR an invalid mux. - return WEBP_MUX_INVALID_ARGUMENT; - } -} - -// Get the canvas width, height and flags after validating that VP8X/VP8/VP8L -// chunk and canvas size are valid. -static WebPMuxError MuxGetCanvasInfo(const WebPMux* const mux, - int* width, int* height, uint32_t* flags) { - int w, h; - uint32_t f = 0; - WebPData data; - assert(mux != NULL); - - // Check if VP8X chunk is present. - if (MuxGet(mux, IDX_VP8X, 1, &data) == WEBP_MUX_OK) { - if (data.size < VP8X_CHUNK_SIZE) return WEBP_MUX_BAD_DATA; - f = GetLE32(data.bytes + 0); - w = GetLE24(data.bytes + 4) + 1; - h = GetLE24(data.bytes + 7) + 1; - } else { - const WebPMuxImage* const wpi = mux->images_; - // Grab user-forced canvas size as default. - w = mux->canvas_width_; - h = mux->canvas_height_; - if (w == 0 && h == 0 && ValidateForSingleImage(mux) == WEBP_MUX_OK) { - // single image and not forced canvas size => use dimension of first frame - assert(wpi != NULL); - w = wpi->width_; - h = wpi->height_; - } - if (wpi != NULL) { - if (wpi->has_alpha_) f |= ALPHA_FLAG; - } - } - if (w * (uint64_t)h >= MAX_IMAGE_AREA) return WEBP_MUX_BAD_DATA; - - if (width != NULL) *width = w; - if (height != NULL) *height = h; - if (flags != NULL) *flags = f; - return WEBP_MUX_OK; -} - -WebPMuxError WebPMuxGetCanvasSize(const WebPMux* mux, int* width, int* height) { - if (mux == NULL || width == NULL || height == NULL) { - return WEBP_MUX_INVALID_ARGUMENT; - } - return MuxGetCanvasInfo(mux, width, height, NULL); -} - -WebPMuxError WebPMuxGetFeatures(const WebPMux* mux, uint32_t* flags) { - if (mux == NULL || flags == NULL) return WEBP_MUX_INVALID_ARGUMENT; - return MuxGetCanvasInfo(mux, NULL, NULL, flags); -} - -static uint8_t* EmitVP8XChunk(uint8_t* const dst, int width, - int height, uint32_t flags) { - const size_t vp8x_size = CHUNK_HEADER_SIZE + VP8X_CHUNK_SIZE; - assert(width >= 1 && height >= 1); - assert(width <= MAX_CANVAS_SIZE && height <= MAX_CANVAS_SIZE); - assert(width * (uint64_t)height < MAX_IMAGE_AREA); - PutLE32(dst, MKFOURCC('V', 'P', '8', 'X')); - PutLE32(dst + TAG_SIZE, VP8X_CHUNK_SIZE); - PutLE32(dst + CHUNK_HEADER_SIZE, flags); - PutLE24(dst + CHUNK_HEADER_SIZE + 4, width - 1); - PutLE24(dst + CHUNK_HEADER_SIZE + 7, height - 1); - return dst + vp8x_size; -} - -// Assemble a single image WebP bitstream from 'wpi'. -static WebPMuxError SynthesizeBitstream(const WebPMuxImage* const wpi, - WebPData* const bitstream) { - uint8_t* dst; - - // Allocate data. - const int need_vp8x = (wpi->alpha_ != NULL); - const size_t vp8x_size = need_vp8x ? CHUNK_HEADER_SIZE + VP8X_CHUNK_SIZE : 0; - const size_t alpha_size = need_vp8x ? ChunkDiskSize(wpi->alpha_) : 0; - // Note: No need to output ANMF chunk for a single image. - const size_t size = RIFF_HEADER_SIZE + vp8x_size + alpha_size + - ChunkDiskSize(wpi->img_); - uint8_t* const data = (uint8_t*)WebPSafeMalloc(1ULL, size); - if (data == NULL) return WEBP_MUX_MEMORY_ERROR; - - // There should be at most one alpha_ chunk and exactly one img_ chunk. - assert(wpi->alpha_ == NULL || wpi->alpha_->next_ == NULL); - assert(wpi->img_ != NULL && wpi->img_->next_ == NULL); - - // Main RIFF header. - dst = MuxEmitRiffHeader(data, size); - - if (need_vp8x) { - dst = EmitVP8XChunk(dst, wpi->width_, wpi->height_, ALPHA_FLAG); // VP8X. - dst = ChunkListEmit(wpi->alpha_, dst); // ALPH. - } - - // Bitstream. - dst = ChunkListEmit(wpi->img_, dst); - assert(dst == data + size); - - // Output. - bitstream->bytes = data; - bitstream->size = size; - return WEBP_MUX_OK; -} - -WebPMuxError WebPMuxGetChunk(const WebPMux* mux, const char fourcc[4], - WebPData* chunk_data) { - CHUNK_INDEX idx; - if (mux == NULL || fourcc == NULL || chunk_data == NULL) { - return WEBP_MUX_INVALID_ARGUMENT; - } - idx = ChunkGetIndexFromFourCC(fourcc); - if (IsWPI(kChunks[idx].id)) { // An image chunk. - return WEBP_MUX_INVALID_ARGUMENT; - } else if (idx != IDX_UNKNOWN) { // A known chunk type. - return MuxGet(mux, idx, 1, chunk_data); - } else { // An unknown chunk type. - const WebPChunk* const chunk = - ChunkSearchList(mux->unknown_, 1, ChunkGetTagFromFourCC(fourcc)); - if (chunk == NULL) return WEBP_MUX_NOT_FOUND; - *chunk_data = chunk->data_; - return WEBP_MUX_OK; - } -} - -static WebPMuxError MuxGetImageInternal(const WebPMuxImage* const wpi, - WebPMuxFrameInfo* const info) { - // Set some defaults for unrelated fields. - info->x_offset = 0; - info->y_offset = 0; - info->duration = 1; - info->dispose_method = WEBP_MUX_DISPOSE_NONE; - info->blend_method = WEBP_MUX_BLEND; - // Extract data for related fields. - info->id = ChunkGetIdFromTag(wpi->img_->tag_); - return SynthesizeBitstream(wpi, &info->bitstream); -} - -static WebPMuxError MuxGetFrameInternal(const WebPMuxImage* const wpi, - WebPMuxFrameInfo* const frame) { - const int is_frame = (wpi->header_->tag_ == kChunks[IDX_ANMF].tag); - const WebPData* frame_data; - if (!is_frame) return WEBP_MUX_INVALID_ARGUMENT; - assert(wpi->header_ != NULL); // Already checked by WebPMuxGetFrame(). - // Get frame chunk. - frame_data = &wpi->header_->data_; - if (frame_data->size < kChunks[IDX_ANMF].size) return WEBP_MUX_BAD_DATA; - // Extract info. - frame->x_offset = 2 * GetLE24(frame_data->bytes + 0); - frame->y_offset = 2 * GetLE24(frame_data->bytes + 3); - { - const uint8_t bits = frame_data->bytes[15]; - frame->duration = GetLE24(frame_data->bytes + 12); - frame->dispose_method = - (bits & 1) ? WEBP_MUX_DISPOSE_BACKGROUND : WEBP_MUX_DISPOSE_NONE; - frame->blend_method = (bits & 2) ? WEBP_MUX_NO_BLEND : WEBP_MUX_BLEND; - } - frame->id = ChunkGetIdFromTag(wpi->header_->tag_); - return SynthesizeBitstream(wpi, &frame->bitstream); -} - -WebPMuxError WebPMuxGetFrame( - const WebPMux* mux, uint32_t nth, WebPMuxFrameInfo* frame) { - WebPMuxError err; - WebPMuxImage* wpi; - - // Sanity checks. - if (mux == NULL || frame == NULL) { - return WEBP_MUX_INVALID_ARGUMENT; - } - - // Get the nth WebPMuxImage. - err = MuxImageGetNth((const WebPMuxImage**)&mux->images_, nth, &wpi); - if (err != WEBP_MUX_OK) return err; - - // Get frame info. - if (wpi->header_ == NULL) { - return MuxGetImageInternal(wpi, frame); - } else { - return MuxGetFrameInternal(wpi, frame); - } -} - -WebPMuxError WebPMuxGetAnimationParams(const WebPMux* mux, - WebPMuxAnimParams* params) { - WebPData anim; - WebPMuxError err; - - if (mux == NULL || params == NULL) return WEBP_MUX_INVALID_ARGUMENT; - - err = MuxGet(mux, IDX_ANIM, 1, &anim); - if (err != WEBP_MUX_OK) return err; - if (anim.size < kChunks[WEBP_CHUNK_ANIM].size) return WEBP_MUX_BAD_DATA; - params->bgcolor = GetLE32(anim.bytes); - params->loop_count = GetLE16(anim.bytes + 4); - - return WEBP_MUX_OK; -} - -// Get chunk index from chunk id. Returns IDX_NIL if not found. -static CHUNK_INDEX ChunkGetIndexFromId(WebPChunkId id) { - int i; - for (i = 0; kChunks[i].id != WEBP_CHUNK_NIL; ++i) { - if (id == kChunks[i].id) return (CHUNK_INDEX)i; - } - return IDX_NIL; -} - -// Count number of chunks matching 'tag' in the 'chunk_list'. -// If tag == NIL_TAG, any tag will be matched. -static int CountChunks(const WebPChunk* const chunk_list, uint32_t tag) { - int count = 0; - const WebPChunk* current; - for (current = chunk_list; current != NULL; current = current->next_) { - if (tag == NIL_TAG || current->tag_ == tag) { - count++; // Count chunks whose tags match. - } - } - return count; -} - -WebPMuxError WebPMuxNumChunks(const WebPMux* mux, - WebPChunkId id, int* num_elements) { - if (mux == NULL || num_elements == NULL) { - return WEBP_MUX_INVALID_ARGUMENT; - } - - if (IsWPI(id)) { - *num_elements = MuxImageCount(mux->images_, id); - } else { - WebPChunk* const* chunk_list = MuxGetChunkListFromId(mux, id); - const CHUNK_INDEX idx = ChunkGetIndexFromId(id); - *num_elements = CountChunks(*chunk_list, kChunks[idx].tag); - } - - return WEBP_MUX_OK; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_reader_inl_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_reader_inl_utils.h deleted file mode 100644 index 58127a7..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_reader_inl_utils.h +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Specific inlined methods for boolean decoder [VP8GetBit() ...] -// This file should be included by the .c sources that actually need to call -// these methods. -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_UTILS_BIT_READER_INL_UTILS_H_ -#define WEBP_UTILS_BIT_READER_INL_UTILS_H_ - -#ifdef HAVE_CONFIG_H -#include "src/webp/config.h" -#endif - -#include // for memcpy - -#include "src/dsp/dsp.h" -#include "src/utils/bit_reader_utils.h" -#include "src/utils/endian_inl_utils.h" -#include "src/utils/utils.h" - -#ifdef __cplusplus -extern "C" { -#endif - -//------------------------------------------------------------------------------ -// Derived type lbit_t = natural type for memory I/O - -#if (BITS > 32) -typedef uint64_t lbit_t; -#elif (BITS > 16) -typedef uint32_t lbit_t; -#elif (BITS > 8) -typedef uint16_t lbit_t; -#else -typedef uint8_t lbit_t; -#endif - -extern const uint8_t kVP8Log2Range[128]; -extern const uint8_t kVP8NewRange[128]; - -// special case for the tail byte-reading -void VP8LoadFinalBytes(VP8BitReader* const br); - -//------------------------------------------------------------------------------ -// Inlined critical functions - -// makes sure br->value_ has at least BITS bits worth of data -static WEBP_UBSAN_IGNORE_UNDEF WEBP_INLINE -void VP8LoadNewBytes(VP8BitReader* const br) { - assert(br != NULL && br->buf_ != NULL); - // Read 'BITS' bits at a time if possible. - if (br->buf_ < br->buf_max_) { - // convert memory type to register type (with some zero'ing!) - bit_t bits; -#if defined(WEBP_USE_MIPS32) - // This is needed because of un-aligned read. - lbit_t in_bits; - lbit_t* p_buf_ = (lbit_t*)br->buf_; - __asm__ volatile( - ".set push \n\t" - ".set at \n\t" - ".set macro \n\t" - "ulw %[in_bits], 0(%[p_buf_]) \n\t" - ".set pop \n\t" - : [in_bits]"=r"(in_bits) - : [p_buf_]"r"(p_buf_) - : "memory", "at" - ); -#else - lbit_t in_bits; - memcpy(&in_bits, br->buf_, sizeof(in_bits)); -#endif - br->buf_ += BITS >> 3; -#if !defined(WORDS_BIGENDIAN) -#if (BITS > 32) - bits = BSwap64(in_bits); - bits >>= 64 - BITS; -#elif (BITS >= 24) - bits = BSwap32(in_bits); - bits >>= (32 - BITS); -#elif (BITS == 16) - bits = BSwap16(in_bits); -#else // BITS == 8 - bits = (bit_t)in_bits; -#endif // BITS > 32 -#else // WORDS_BIGENDIAN - bits = (bit_t)in_bits; - if (BITS != 8 * sizeof(bit_t)) bits >>= (8 * sizeof(bit_t) - BITS); -#endif - br->value_ = bits | (br->value_ << BITS); - br->bits_ += BITS; - } else { - VP8LoadFinalBytes(br); // no need to be inlined - } -} - -// Read a bit with proba 'prob'. Speed-critical function! -static WEBP_INLINE int VP8GetBit(VP8BitReader* const br, int prob) { - // Don't move this declaration! It makes a big speed difference to store - // 'range' *before* calling VP8LoadNewBytes(), even if this function doesn't - // alter br->range_ value. - range_t range = br->range_; - if (br->bits_ < 0) { - VP8LoadNewBytes(br); - } - { - const int pos = br->bits_; - const range_t split = (range * prob) >> 8; - const range_t value = (range_t)(br->value_ >> pos); - const int bit = (value > split); - if (bit) { - range -= split; - br->value_ -= (bit_t)(split + 1) << pos; - } else { - range = split + 1; - } - { - const int shift = 7 ^ BitsLog2Floor(range); - range <<= shift; - br->bits_ -= shift; - } - br->range_ = range - 1; - return bit; - } -} - -// simplified version of VP8GetBit() for prob=0x80 (note shift is always 1 here) -static WEBP_UBSAN_IGNORE_UNSIGNED_OVERFLOW WEBP_INLINE -int VP8GetSigned(VP8BitReader* const br, int v) { - if (br->bits_ < 0) { - VP8LoadNewBytes(br); - } - { - const int pos = br->bits_; - const range_t split = br->range_ >> 1; - const range_t value = (range_t)(br->value_ >> pos); - const int32_t mask = (int32_t)(split - value) >> 31; // -1 or 0 - br->bits_ -= 1; - br->range_ += mask; - br->range_ |= 1; - br->value_ -= (bit_t)((split + 1) & mask) << pos; - return (v ^ mask) - mask; - } -} - -static WEBP_INLINE int VP8GetBitAlt(VP8BitReader* const br, int prob) { - // Don't move this declaration! It makes a big speed difference to store - // 'range' *before* calling VP8LoadNewBytes(), even if this function doesn't - // alter br->range_ value. - range_t range = br->range_; - if (br->bits_ < 0) { - VP8LoadNewBytes(br); - } - { - const int pos = br->bits_; - const range_t split = (range * prob) >> 8; - const range_t value = (range_t)(br->value_ >> pos); - int bit; // Don't use 'const int bit = (value > split);", it's slower. - if (value > split) { - range -= split + 1; - br->value_ -= (bit_t)(split + 1) << pos; - bit = 1; - } else { - range = split; - bit = 0; - } - if (range <= (range_t)0x7e) { - const int shift = kVP8Log2Range[range]; - range = kVP8NewRange[range]; - br->bits_ -= shift; - } - br->range_ = range; - return bit; - } -} - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // WEBP_UTILS_BIT_READER_INL_UTILS_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_reader_utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_reader_utils.c deleted file mode 100644 index f4f7533..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_reader_utils.c +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Boolean decoder non-inlined methods -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifdef HAVE_CONFIG_H -#include "src/webp/config.h" -#endif - -#include "src/utils/bit_reader_inl_utils.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ -// VP8BitReader - -void VP8BitReaderSetBuffer(VP8BitReader* const br, - const uint8_t* const start, - size_t size) { - br->buf_ = start; - br->buf_end_ = start + size; - br->buf_max_ = - (size >= sizeof(lbit_t)) ? start + size - sizeof(lbit_t) + 1 - : start; -} - -void VP8InitBitReader(VP8BitReader* const br, - const uint8_t* const start, size_t size) { - assert(br != NULL); - assert(start != NULL); - assert(size < (1u << 31)); // limit ensured by format and upstream checks - br->range_ = 255 - 1; - br->value_ = 0; - br->bits_ = -8; // to load the very first 8bits - br->eof_ = 0; - VP8BitReaderSetBuffer(br, start, size); - VP8LoadNewBytes(br); -} - -void VP8RemapBitReader(VP8BitReader* const br, ptrdiff_t offset) { - if (br->buf_ != NULL) { - br->buf_ += offset; - br->buf_end_ += offset; - br->buf_max_ += offset; - } -} - -const uint8_t kVP8Log2Range[128] = { - 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0 -}; - -// range = ((range - 1) << kVP8Log2Range[range]) + 1 -const uint8_t kVP8NewRange[128] = { - 127, 127, 191, 127, 159, 191, 223, 127, - 143, 159, 175, 191, 207, 223, 239, 127, - 135, 143, 151, 159, 167, 175, 183, 191, - 199, 207, 215, 223, 231, 239, 247, 127, - 131, 135, 139, 143, 147, 151, 155, 159, - 163, 167, 171, 175, 179, 183, 187, 191, - 195, 199, 203, 207, 211, 215, 219, 223, - 227, 231, 235, 239, 243, 247, 251, 127, - 129, 131, 133, 135, 137, 139, 141, 143, - 145, 147, 149, 151, 153, 155, 157, 159, - 161, 163, 165, 167, 169, 171, 173, 175, - 177, 179, 181, 183, 185, 187, 189, 191, - 193, 195, 197, 199, 201, 203, 205, 207, - 209, 211, 213, 215, 217, 219, 221, 223, - 225, 227, 229, 231, 233, 235, 237, 239, - 241, 243, 245, 247, 249, 251, 253, 127 -}; - -void VP8LoadFinalBytes(VP8BitReader* const br) { - assert(br != NULL && br->buf_ != NULL); - // Only read 8bits at a time - if (br->buf_ < br->buf_end_) { - br->bits_ += 8; - br->value_ = (bit_t)(*br->buf_++) | (br->value_ << 8); - } else if (!br->eof_) { - br->value_ <<= 8; - br->bits_ += 8; - br->eof_ = 1; - } else { - br->bits_ = 0; // This is to avoid undefined behaviour with shifts. - } -} - -//------------------------------------------------------------------------------ -// Higher-level calls - -uint32_t VP8GetValue(VP8BitReader* const br, int bits) { - uint32_t v = 0; - while (bits-- > 0) { - v |= VP8GetBit(br, 0x80) << bits; - } - return v; -} - -int32_t VP8GetSignedValue(VP8BitReader* const br, int bits) { - const int value = VP8GetValue(br, bits); - return VP8Get(br) ? -value : value; -} - -//------------------------------------------------------------------------------ -// VP8LBitReader - -#define VP8L_LOG8_WBITS 4 // Number of bytes needed to store VP8L_WBITS bits. - -#if defined(__arm__) || defined(_M_ARM) || defined(__aarch64__) || \ - defined(__i386__) || defined(_M_IX86) || \ - defined(__x86_64__) || defined(_M_X64) -#define VP8L_USE_FAST_LOAD -#endif - -static const uint32_t kBitMask[VP8L_MAX_NUM_BIT_READ + 1] = { - 0, - 0x000001, 0x000003, 0x000007, 0x00000f, - 0x00001f, 0x00003f, 0x00007f, 0x0000ff, - 0x0001ff, 0x0003ff, 0x0007ff, 0x000fff, - 0x001fff, 0x003fff, 0x007fff, 0x00ffff, - 0x01ffff, 0x03ffff, 0x07ffff, 0x0fffff, - 0x1fffff, 0x3fffff, 0x7fffff, 0xffffff -}; - -void VP8LInitBitReader(VP8LBitReader* const br, const uint8_t* const start, - size_t length) { - size_t i; - vp8l_val_t value = 0; - assert(br != NULL); - assert(start != NULL); - assert(length < 0xfffffff8u); // can't happen with a RIFF chunk. - - br->len_ = length; - br->val_ = 0; - br->bit_pos_ = 0; - br->eos_ = 0; - - if (length > sizeof(br->val_)) { - length = sizeof(br->val_); - } - for (i = 0; i < length; ++i) { - value |= (vp8l_val_t)start[i] << (8 * i); - } - br->val_ = value; - br->pos_ = length; - br->buf_ = start; -} - -void VP8LBitReaderSetBuffer(VP8LBitReader* const br, - const uint8_t* const buf, size_t len) { - assert(br != NULL); - assert(buf != NULL); - assert(len < 0xfffffff8u); // can't happen with a RIFF chunk. - br->buf_ = buf; - br->len_ = len; - // pos_ > len_ should be considered a param error. - br->eos_ = (br->pos_ > br->len_) || VP8LIsEndOfStream(br); -} - -static void VP8LSetEndOfStream(VP8LBitReader* const br) { - br->eos_ = 1; - br->bit_pos_ = 0; // To avoid undefined behaviour with shifts. -} - -// If not at EOS, reload up to VP8L_LBITS byte-by-byte -static void ShiftBytes(VP8LBitReader* const br) { - while (br->bit_pos_ >= 8 && br->pos_ < br->len_) { - br->val_ >>= 8; - br->val_ |= ((vp8l_val_t)br->buf_[br->pos_]) << (VP8L_LBITS - 8); - ++br->pos_; - br->bit_pos_ -= 8; - } - if (VP8LIsEndOfStream(br)) { - VP8LSetEndOfStream(br); - } -} - -void VP8LDoFillBitWindow(VP8LBitReader* const br) { - assert(br->bit_pos_ >= VP8L_WBITS); -#if defined(VP8L_USE_FAST_LOAD) - if (br->pos_ + sizeof(br->val_) < br->len_) { - br->val_ >>= VP8L_WBITS; - br->bit_pos_ -= VP8L_WBITS; - br->val_ |= (vp8l_val_t)HToLE32(WebPMemToUint32(br->buf_ + br->pos_)) << - (VP8L_LBITS - VP8L_WBITS); - br->pos_ += VP8L_LOG8_WBITS; - return; - } -#endif - ShiftBytes(br); // Slow path. -} - -uint32_t VP8LReadBits(VP8LBitReader* const br, int n_bits) { - assert(n_bits >= 0); - // Flag an error if end_of_stream or n_bits is more than allowed limit. - if (!br->eos_ && n_bits <= VP8L_MAX_NUM_BIT_READ) { - const uint32_t val = VP8LPrefetchBits(br) & kBitMask[n_bits]; - const int new_bits = br->bit_pos_ + n_bits; - br->bit_pos_ = new_bits; - ShiftBytes(br); - return val; - } else { - VP8LSetEndOfStream(br); - return 0; - } -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_reader_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_reader_utils.h deleted file mode 100644 index fb96d9f..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_reader_utils.h +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Boolean decoder -// -// Author: Skal (pascal.massimino@gmail.com) -// Vikas Arora (vikaas.arora@gmail.com) - -#ifndef WEBP_UTILS_BIT_READER_UTILS_H_ -#define WEBP_UTILS_BIT_READER_UTILS_H_ - -#include -#ifdef _MSC_VER -#include // _byteswap_ulong -#endif -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// The Boolean decoder needs to maintain infinite precision on the value_ field. -// However, since range_ is only 8bit, we only need an active window of 8 bits -// for value_. Left bits (MSB) gets zeroed and shifted away when value_ falls -// below 128, range_ is updated, and fresh bits read from the bitstream are -// brought in as LSB. To avoid reading the fresh bits one by one (slow), we -// cache BITS of them ahead. The total of (BITS + 8) bits must fit into a -// natural register (with type bit_t). To fetch BITS bits from bitstream we -// use a type lbit_t. -// -// BITS can be any multiple of 8 from 8 to 56 (inclusive). -// Pick values that fit natural register size. - -#if defined(__i386__) || defined(_M_IX86) // x86 32bit -#define BITS 24 -#elif defined(__x86_64__) || defined(_M_X64) // x86 64bit -#define BITS 56 -#elif defined(__arm__) || defined(_M_ARM) // ARM -#define BITS 24 -#elif defined(__aarch64__) // ARM 64bit -#define BITS 56 -#elif defined(__mips__) // MIPS -#define BITS 24 -#else // reasonable default -#define BITS 24 -#endif - -//------------------------------------------------------------------------------ -// Derived types and constants: -// bit_t = natural register type for storing 'value_' (which is BITS+8 bits) -// range_t = register for 'range_' (which is 8bits only) - -#if (BITS > 24) -typedef uint64_t bit_t; -#else -typedef uint32_t bit_t; -#endif - -typedef uint32_t range_t; - -//------------------------------------------------------------------------------ -// Bitreader - -typedef struct VP8BitReader VP8BitReader; -struct VP8BitReader { - // boolean decoder (keep the field ordering as is!) - bit_t value_; // current value - range_t range_; // current range minus 1. In [127, 254] interval. - int bits_; // number of valid bits left - // read buffer - const uint8_t* buf_; // next byte to be read - const uint8_t* buf_end_; // end of read buffer - const uint8_t* buf_max_; // max packed-read position on buffer - int eof_; // true if input is exhausted -}; - -// Initialize the bit reader and the boolean decoder. -void VP8InitBitReader(VP8BitReader* const br, - const uint8_t* const start, size_t size); -// Sets the working read buffer. -void VP8BitReaderSetBuffer(VP8BitReader* const br, - const uint8_t* const start, size_t size); - -// Update internal pointers to displace the byte buffer by the -// relative offset 'offset'. -void VP8RemapBitReader(VP8BitReader* const br, ptrdiff_t offset); - -// return the next value made of 'num_bits' bits -uint32_t VP8GetValue(VP8BitReader* const br, int num_bits); -static WEBP_INLINE uint32_t VP8Get(VP8BitReader* const br) { - return VP8GetValue(br, 1); -} - -// return the next value with sign-extension. -int32_t VP8GetSignedValue(VP8BitReader* const br, int num_bits); - -// bit_reader_inl.h will implement the following methods: -// static WEBP_INLINE int VP8GetBit(VP8BitReader* const br, int prob) -// static WEBP_INLINE int VP8GetSigned(VP8BitReader* const br, int v) -// and should be included by the .c files that actually need them. -// This is to avoid recompiling the whole library whenever this file is touched, -// and also allowing platform-specific ad-hoc hacks. - -// ----------------------------------------------------------------------------- -// Bitreader for lossless format - -// maximum number of bits (inclusive) the bit-reader can handle: -#define VP8L_MAX_NUM_BIT_READ 24 - -#define VP8L_LBITS 64 // Number of bits prefetched (= bit-size of vp8l_val_t). -#define VP8L_WBITS 32 // Minimum number of bytes ready after VP8LFillBitWindow. - -typedef uint64_t vp8l_val_t; // right now, this bit-reader can only use 64bit. - -typedef struct { - vp8l_val_t val_; // pre-fetched bits - const uint8_t* buf_; // input byte buffer - size_t len_; // buffer length - size_t pos_; // byte position in buf_ - int bit_pos_; // current bit-reading position in val_ - int eos_; // true if a bit was read past the end of buffer -} VP8LBitReader; - -void VP8LInitBitReader(VP8LBitReader* const br, - const uint8_t* const start, - size_t length); - -// Sets a new data buffer. -void VP8LBitReaderSetBuffer(VP8LBitReader* const br, - const uint8_t* const buffer, size_t length); - -// Reads the specified number of bits from read buffer. -// Flags an error in case end_of_stream or n_bits is more than the allowed limit -// of VP8L_MAX_NUM_BIT_READ (inclusive). -// Flags eos_ if this read attempt is going to cross the read buffer. -uint32_t VP8LReadBits(VP8LBitReader* const br, int n_bits); - -// Return the prefetched bits, so they can be looked up. -static WEBP_INLINE uint32_t VP8LPrefetchBits(VP8LBitReader* const br) { - return (uint32_t)(br->val_ >> (br->bit_pos_ & (VP8L_LBITS - 1))); -} - -// Returns true if there was an attempt at reading bit past the end of -// the buffer. Doesn't set br->eos_ flag. -static WEBP_INLINE int VP8LIsEndOfStream(const VP8LBitReader* const br) { - assert(br->pos_ <= br->len_); - return br->eos_ || ((br->pos_ == br->len_) && (br->bit_pos_ > VP8L_LBITS)); -} - -// For jumping over a number of bits in the bit stream when accessed with -// VP8LPrefetchBits and VP8LFillBitWindow. -// This function does *not* set br->eos_, since it's speed-critical. -// Use with extreme care! -static WEBP_INLINE void VP8LSetBitPos(VP8LBitReader* const br, int val) { - br->bit_pos_ = val; -} - -// Advances the read buffer by 4 bytes to make room for reading next 32 bits. -// Speed critical, but infrequent part of the code can be non-inlined. -extern void VP8LDoFillBitWindow(VP8LBitReader* const br); -static WEBP_INLINE void VP8LFillBitWindow(VP8LBitReader* const br) { - if (br->bit_pos_ >= VP8L_WBITS) VP8LDoFillBitWindow(br); -} - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_UTILS_BIT_READER_UTILS_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_writer_utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_writer_utils.c deleted file mode 100644 index 711e6ba..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_writer_utils.c +++ /dev/null @@ -1,346 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Bit writing and boolean coder -// -// Author: Skal (pascal.massimino@gmail.com) -// Vikas Arora (vikaas.arora@gmail.com) - -#include -#include // for memcpy() -#include - -#include "src/utils/bit_writer_utils.h" -#include "src/utils/endian_inl_utils.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ -// VP8BitWriter - -static int BitWriterResize(VP8BitWriter* const bw, size_t extra_size) { - uint8_t* new_buf; - size_t new_size; - const uint64_t needed_size_64b = (uint64_t)bw->pos_ + extra_size; - const size_t needed_size = (size_t)needed_size_64b; - if (needed_size_64b != needed_size) { - bw->error_ = 1; - return 0; - } - if (needed_size <= bw->max_pos_) return 1; - // If the following line wraps over 32bit, the test just after will catch it. - new_size = 2 * bw->max_pos_; - if (new_size < needed_size) new_size = needed_size; - if (new_size < 1024) new_size = 1024; - new_buf = (uint8_t*)WebPSafeMalloc(1ULL, new_size); - if (new_buf == NULL) { - bw->error_ = 1; - return 0; - } - if (bw->pos_ > 0) { - assert(bw->buf_ != NULL); - memcpy(new_buf, bw->buf_, bw->pos_); - } - WebPSafeFree(bw->buf_); - bw->buf_ = new_buf; - bw->max_pos_ = new_size; - return 1; -} - -static void Flush(VP8BitWriter* const bw) { - const int s = 8 + bw->nb_bits_; - const int32_t bits = bw->value_ >> s; - assert(bw->nb_bits_ >= 0); - bw->value_ -= bits << s; - bw->nb_bits_ -= 8; - if ((bits & 0xff) != 0xff) { - size_t pos = bw->pos_; - if (!BitWriterResize(bw, bw->run_ + 1)) { - return; - } - if (bits & 0x100) { // overflow -> propagate carry over pending 0xff's - if (pos > 0) bw->buf_[pos - 1]++; - } - if (bw->run_ > 0) { - const int value = (bits & 0x100) ? 0x00 : 0xff; - for (; bw->run_ > 0; --bw->run_) bw->buf_[pos++] = value; - } - bw->buf_[pos++] = bits; - bw->pos_ = pos; - } else { - bw->run_++; // delay writing of bytes 0xff, pending eventual carry. - } -} - -//------------------------------------------------------------------------------ -// renormalization - -static const uint8_t kNorm[128] = { // renorm_sizes[i] = 8 - log2(i) - 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0 -}; - -// range = ((range + 1) << kVP8Log2Range[range]) - 1 -static const uint8_t kNewRange[128] = { - 127, 127, 191, 127, 159, 191, 223, 127, 143, 159, 175, 191, 207, 223, 239, - 127, 135, 143, 151, 159, 167, 175, 183, 191, 199, 207, 215, 223, 231, 239, - 247, 127, 131, 135, 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, - 183, 187, 191, 195, 199, 203, 207, 211, 215, 219, 223, 227, 231, 235, 239, - 243, 247, 251, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, - 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, - 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, - 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239, - 241, 243, 245, 247, 249, 251, 253, 127 -}; - -int VP8PutBit(VP8BitWriter* const bw, int bit, int prob) { - const int split = (bw->range_ * prob) >> 8; - if (bit) { - bw->value_ += split + 1; - bw->range_ -= split + 1; - } else { - bw->range_ = split; - } - if (bw->range_ < 127) { // emit 'shift' bits out and renormalize - const int shift = kNorm[bw->range_]; - bw->range_ = kNewRange[bw->range_]; - bw->value_ <<= shift; - bw->nb_bits_ += shift; - if (bw->nb_bits_ > 0) Flush(bw); - } - return bit; -} - -int VP8PutBitUniform(VP8BitWriter* const bw, int bit) { - const int split = bw->range_ >> 1; - if (bit) { - bw->value_ += split + 1; - bw->range_ -= split + 1; - } else { - bw->range_ = split; - } - if (bw->range_ < 127) { - bw->range_ = kNewRange[bw->range_]; - bw->value_ <<= 1; - bw->nb_bits_ += 1; - if (bw->nb_bits_ > 0) Flush(bw); - } - return bit; -} - -void VP8PutBits(VP8BitWriter* const bw, uint32_t value, int nb_bits) { - uint32_t mask; - assert(nb_bits > 0 && nb_bits < 32); - for (mask = 1u << (nb_bits - 1); mask; mask >>= 1) { - VP8PutBitUniform(bw, value & mask); - } -} - -void VP8PutSignedBits(VP8BitWriter* const bw, int value, int nb_bits) { - if (!VP8PutBitUniform(bw, value != 0)) return; - if (value < 0) { - VP8PutBits(bw, ((-value) << 1) | 1, nb_bits + 1); - } else { - VP8PutBits(bw, value << 1, nb_bits + 1); - } -} - -//------------------------------------------------------------------------------ - -int VP8BitWriterInit(VP8BitWriter* const bw, size_t expected_size) { - bw->range_ = 255 - 1; - bw->value_ = 0; - bw->run_ = 0; - bw->nb_bits_ = -8; - bw->pos_ = 0; - bw->max_pos_ = 0; - bw->error_ = 0; - bw->buf_ = NULL; - return (expected_size > 0) ? BitWriterResize(bw, expected_size) : 1; -} - -uint8_t* VP8BitWriterFinish(VP8BitWriter* const bw) { - VP8PutBits(bw, 0, 9 - bw->nb_bits_); - bw->nb_bits_ = 0; // pad with zeroes - Flush(bw); - return bw->buf_; -} - -int VP8BitWriterAppend(VP8BitWriter* const bw, - const uint8_t* data, size_t size) { - assert(data != NULL); - if (bw->nb_bits_ != -8) return 0; // Flush() must have been called - if (!BitWriterResize(bw, size)) return 0; - memcpy(bw->buf_ + bw->pos_, data, size); - bw->pos_ += size; - return 1; -} - -void VP8BitWriterWipeOut(VP8BitWriter* const bw) { - if (bw != NULL) { - WebPSafeFree(bw->buf_); - memset(bw, 0, sizeof(*bw)); - } -} - -//------------------------------------------------------------------------------ -// VP8LBitWriter - -// This is the minimum amount of size the memory buffer is guaranteed to grow -// when extra space is needed. -#define MIN_EXTRA_SIZE (32768ULL) - -// Returns 1 on success. -static int VP8LBitWriterResize(VP8LBitWriter* const bw, size_t extra_size) { - uint8_t* allocated_buf; - size_t allocated_size; - const size_t max_bytes = bw->end_ - bw->buf_; - const size_t current_size = bw->cur_ - bw->buf_; - const uint64_t size_required_64b = (uint64_t)current_size + extra_size; - const size_t size_required = (size_t)size_required_64b; - if (size_required != size_required_64b) { - bw->error_ = 1; - return 0; - } - if (max_bytes > 0 && size_required <= max_bytes) return 1; - allocated_size = (3 * max_bytes) >> 1; - if (allocated_size < size_required) allocated_size = size_required; - // make allocated size multiple of 1k - allocated_size = (((allocated_size >> 10) + 1) << 10); - allocated_buf = (uint8_t*)WebPSafeMalloc(1ULL, allocated_size); - if (allocated_buf == NULL) { - bw->error_ = 1; - return 0; - } - if (current_size > 0) { - memcpy(allocated_buf, bw->buf_, current_size); - } - WebPSafeFree(bw->buf_); - bw->buf_ = allocated_buf; - bw->cur_ = bw->buf_ + current_size; - bw->end_ = bw->buf_ + allocated_size; - return 1; -} - -int VP8LBitWriterInit(VP8LBitWriter* const bw, size_t expected_size) { - memset(bw, 0, sizeof(*bw)); - return VP8LBitWriterResize(bw, expected_size); -} - -int VP8LBitWriterClone(const VP8LBitWriter* const src, - VP8LBitWriter* const dst) { - const size_t current_size = src->cur_ - src->buf_; - assert(src->cur_ >= src->buf_ && src->cur_ <= src->end_); - if (!VP8LBitWriterResize(dst, current_size)) return 0; - memcpy(dst->buf_, src->buf_, current_size); - dst->bits_ = src->bits_; - dst->used_ = src->used_; - dst->error_ = src->error_; - return 1; -} - -void VP8LBitWriterWipeOut(VP8LBitWriter* const bw) { - if (bw != NULL) { - WebPSafeFree(bw->buf_); - memset(bw, 0, sizeof(*bw)); - } -} - -void VP8LBitWriterReset(const VP8LBitWriter* const bw_init, - VP8LBitWriter* const bw) { - bw->bits_ = bw_init->bits_; - bw->used_ = bw_init->used_; - bw->cur_ = bw->buf_ + (bw_init->cur_ - bw_init->buf_); - assert(bw->cur_ <= bw->end_); - bw->error_ = bw_init->error_; -} - -void VP8LBitWriterSwap(VP8LBitWriter* const src, VP8LBitWriter* const dst) { - const VP8LBitWriter tmp = *src; - *src = *dst; - *dst = tmp; -} - -void VP8LPutBitsFlushBits(VP8LBitWriter* const bw) { - // If needed, make some room by flushing some bits out. - if (bw->cur_ + VP8L_WRITER_BYTES > bw->end_) { - const uint64_t extra_size = (bw->end_ - bw->buf_) + MIN_EXTRA_SIZE; - if (extra_size != (size_t)extra_size || - !VP8LBitWriterResize(bw, (size_t)extra_size)) { - bw->cur_ = bw->buf_; - bw->error_ = 1; - return; - } - } - *(vp8l_wtype_t*)bw->cur_ = (vp8l_wtype_t)WSWAP((vp8l_wtype_t)bw->bits_); - bw->cur_ += VP8L_WRITER_BYTES; - bw->bits_ >>= VP8L_WRITER_BITS; - bw->used_ -= VP8L_WRITER_BITS; -} - -void VP8LPutBitsInternal(VP8LBitWriter* const bw, uint32_t bits, int n_bits) { - assert(n_bits <= 32); - // That's the max we can handle: - assert(sizeof(vp8l_wtype_t) == 2); - if (n_bits > 0) { - vp8l_atype_t lbits = bw->bits_; - int used = bw->used_; - // Special case of overflow handling for 32bit accumulator (2-steps flush). -#if VP8L_WRITER_BITS == 16 - if (used + n_bits >= VP8L_WRITER_MAX_BITS) { - // Fill up all the VP8L_WRITER_MAX_BITS so it can be flushed out below. - const int shift = VP8L_WRITER_MAX_BITS - used; - lbits |= (vp8l_atype_t)bits << used; - used = VP8L_WRITER_MAX_BITS; - n_bits -= shift; - bits >>= shift; - assert(n_bits <= VP8L_WRITER_MAX_BITS); - } -#endif - // If needed, make some room by flushing some bits out. - while (used >= VP8L_WRITER_BITS) { - if (bw->cur_ + VP8L_WRITER_BYTES > bw->end_) { - const uint64_t extra_size = (bw->end_ - bw->buf_) + MIN_EXTRA_SIZE; - if (extra_size != (size_t)extra_size || - !VP8LBitWriterResize(bw, (size_t)extra_size)) { - bw->cur_ = bw->buf_; - bw->error_ = 1; - return; - } - } - *(vp8l_wtype_t*)bw->cur_ = (vp8l_wtype_t)WSWAP((vp8l_wtype_t)lbits); - bw->cur_ += VP8L_WRITER_BYTES; - lbits >>= VP8L_WRITER_BITS; - used -= VP8L_WRITER_BITS; - } - bw->bits_ = lbits | ((vp8l_atype_t)bits << used); - bw->used_ = used + n_bits; - } -} - -uint8_t* VP8LBitWriterFinish(VP8LBitWriter* const bw) { - // flush leftover bits - if (VP8LBitWriterResize(bw, (bw->used_ + 7) >> 3)) { - while (bw->used_ > 0) { - *bw->cur_++ = (uint8_t)bw->bits_; - bw->bits_ >>= 8; - bw->used_ -= 8; - } - bw->used_ = 0; - } - return bw->buf_; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_writer_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_writer_utils.h deleted file mode 100644 index 8f73adf..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/bit_writer_utils.h +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Bit writing and boolean coder -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_UTILS_BIT_WRITER_UTILS_H_ -#define WEBP_UTILS_BIT_WRITER_UTILS_H_ - -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -//------------------------------------------------------------------------------ -// Bit-writing - -typedef struct VP8BitWriter VP8BitWriter; -struct VP8BitWriter { - int32_t range_; // range-1 - int32_t value_; - int run_; // number of outstanding bits - int nb_bits_; // number of pending bits - uint8_t* buf_; // internal buffer. Re-allocated regularly. Not owned. - size_t pos_; - size_t max_pos_; - int error_; // true in case of error -}; - -// Initialize the object. Allocates some initial memory based on expected_size. -int VP8BitWriterInit(VP8BitWriter* const bw, size_t expected_size); -// Finalize the bitstream coding. Returns a pointer to the internal buffer. -uint8_t* VP8BitWriterFinish(VP8BitWriter* const bw); -// Release any pending memory and zeroes the object. Not a mandatory call. -// Only useful in case of error, when the internal buffer hasn't been grabbed! -void VP8BitWriterWipeOut(VP8BitWriter* const bw); - -int VP8PutBit(VP8BitWriter* const bw, int bit, int prob); -int VP8PutBitUniform(VP8BitWriter* const bw, int bit); -void VP8PutBits(VP8BitWriter* const bw, uint32_t value, int nb_bits); -void VP8PutSignedBits(VP8BitWriter* const bw, int value, int nb_bits); - -// Appends some bytes to the internal buffer. Data is copied. -int VP8BitWriterAppend(VP8BitWriter* const bw, - const uint8_t* data, size_t size); - -// return approximate write position (in bits) -static WEBP_INLINE uint64_t VP8BitWriterPos(const VP8BitWriter* const bw) { - const uint64_t nb_bits = 8 + bw->nb_bits_; // bw->nb_bits_ is <= 0, note - return (bw->pos_ + bw->run_) * 8 + nb_bits; -} - -// Returns a pointer to the internal buffer. -static WEBP_INLINE uint8_t* VP8BitWriterBuf(const VP8BitWriter* const bw) { - return bw->buf_; -} -// Returns the size of the internal buffer. -static WEBP_INLINE size_t VP8BitWriterSize(const VP8BitWriter* const bw) { - return bw->pos_; -} - -//------------------------------------------------------------------------------ -// VP8LBitWriter - -#if defined(__x86_64__) || defined(_M_X64) // 64bit -typedef uint64_t vp8l_atype_t; // accumulator type -typedef uint32_t vp8l_wtype_t; // writing type -#define WSWAP HToLE32 -#define VP8L_WRITER_BYTES 4 // sizeof(vp8l_wtype_t) -#define VP8L_WRITER_BITS 32 // 8 * sizeof(vp8l_wtype_t) -#define VP8L_WRITER_MAX_BITS 64 // 8 * sizeof(vp8l_atype_t) -#else -typedef uint32_t vp8l_atype_t; -typedef uint16_t vp8l_wtype_t; -#define WSWAP HToLE16 -#define VP8L_WRITER_BYTES 2 -#define VP8L_WRITER_BITS 16 -#define VP8L_WRITER_MAX_BITS 32 -#endif - -typedef struct { - vp8l_atype_t bits_; // bit accumulator - int used_; // number of bits used in accumulator - uint8_t* buf_; // start of buffer - uint8_t* cur_; // current write position - uint8_t* end_; // end of buffer - - // After all bits are written (VP8LBitWriterFinish()), the caller must observe - // the state of error_. A value of 1 indicates that a memory allocation - // failure has happened during bit writing. A value of 0 indicates successful - // writing of bits. - int error_; -} VP8LBitWriter; - -static WEBP_INLINE size_t VP8LBitWriterNumBytes(const VP8LBitWriter* const bw) { - return (bw->cur_ - bw->buf_) + ((bw->used_ + 7) >> 3); -} - -// Returns false in case of memory allocation error. -int VP8LBitWriterInit(VP8LBitWriter* const bw, size_t expected_size); -// Returns false in case of memory allocation error. -int VP8LBitWriterClone(const VP8LBitWriter* const src, - VP8LBitWriter* const dst); -// Finalize the bitstream coding. Returns a pointer to the internal buffer. -uint8_t* VP8LBitWriterFinish(VP8LBitWriter* const bw); -// Release any pending memory and zeroes the object. -void VP8LBitWriterWipeOut(VP8LBitWriter* const bw); -// Resets the cursor of the BitWriter bw to when it was like in bw_init. -void VP8LBitWriterReset(const VP8LBitWriter* const bw_init, - VP8LBitWriter* const bw); -// Swaps the memory held by two BitWriters. -void VP8LBitWriterSwap(VP8LBitWriter* const src, VP8LBitWriter* const dst); - -// Internal function for VP8LPutBits flushing 32 bits from the written state. -void VP8LPutBitsFlushBits(VP8LBitWriter* const bw); - -// PutBits internal function used in the 16 bit vp8l_wtype_t case. -void VP8LPutBitsInternal(VP8LBitWriter* const bw, uint32_t bits, int n_bits); - -// This function writes bits into bytes in increasing addresses (little endian), -// and within a byte least-significant-bit first. -// This function can write up to 32 bits in one go, but VP8LBitReader can only -// read 24 bits max (VP8L_MAX_NUM_BIT_READ). -// VP8LBitWriter's error_ flag is set in case of memory allocation error. -static WEBP_INLINE void VP8LPutBits(VP8LBitWriter* const bw, - uint32_t bits, int n_bits) { - if (sizeof(vp8l_wtype_t) == 4) { - if (n_bits > 0) { - if (bw->used_ >= 32) { - VP8LPutBitsFlushBits(bw); - } - bw->bits_ |= (vp8l_atype_t)bits << bw->used_; - bw->used_ += n_bits; - } - } else { - VP8LPutBitsInternal(bw, bits, n_bits); - } -} - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_UTILS_BIT_WRITER_UTILS_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/color_cache_utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/color_cache_utils.c deleted file mode 100644 index 0010d68..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/color_cache_utils.c +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Color Cache for WebP Lossless -// -// Author: Jyrki Alakuijala (jyrki@google.com) - -#include -#include -#include -#include "src/utils/color_cache_utils.h" -#include "src/utils/utils.h" - -//------------------------------------------------------------------------------ -// VP8LColorCache. - -int VP8LColorCacheInit(VP8LColorCache* const cc, int hash_bits) { - const int hash_size = 1 << hash_bits; - assert(cc != NULL); - assert(hash_bits > 0); - cc->colors_ = (uint32_t*)WebPSafeCalloc((uint64_t)hash_size, - sizeof(*cc->colors_)); - if (cc->colors_ == NULL) return 0; - cc->hash_shift_ = 32 - hash_bits; - cc->hash_bits_ = hash_bits; - return 1; -} - -void VP8LColorCacheClear(VP8LColorCache* const cc) { - if (cc != NULL) { - WebPSafeFree(cc->colors_); - cc->colors_ = NULL; - } -} - -void VP8LColorCacheCopy(const VP8LColorCache* const src, - VP8LColorCache* const dst) { - assert(src != NULL); - assert(dst != NULL); - assert(src->hash_bits_ == dst->hash_bits_); - memcpy(dst->colors_, src->colors_, - ((size_t)1u << dst->hash_bits_) * sizeof(*dst->colors_)); -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/color_cache_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/color_cache_utils.h deleted file mode 100644 index 67e2d36..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/color_cache_utils.h +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Color Cache for WebP Lossless -// -// Authors: Jyrki Alakuijala (jyrki@google.com) -// Urvang Joshi (urvang@google.com) - -#ifndef WEBP_UTILS_COLOR_CACHE_UTILS_H_ -#define WEBP_UTILS_COLOR_CACHE_UTILS_H_ - -#include - -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Main color cache struct. -typedef struct { - uint32_t *colors_; // color entries - int hash_shift_; // Hash shift: 32 - hash_bits_. - int hash_bits_; -} VP8LColorCache; - -static const uint64_t kHashMul = 0x1e35a7bdull; - -static WEBP_INLINE int VP8LHashPix(uint32_t argb, int shift) { - return (int)(((argb * kHashMul) & 0xffffffffu) >> shift); -} - -static WEBP_INLINE uint32_t VP8LColorCacheLookup( - const VP8LColorCache* const cc, uint32_t key) { - assert((key >> cc->hash_bits_) == 0u); - return cc->colors_[key]; -} - -static WEBP_INLINE void VP8LColorCacheSet(const VP8LColorCache* const cc, - uint32_t key, uint32_t argb) { - assert((key >> cc->hash_bits_) == 0u); - cc->colors_[key] = argb; -} - -static WEBP_INLINE void VP8LColorCacheInsert(const VP8LColorCache* const cc, - uint32_t argb) { - const int key = VP8LHashPix(argb, cc->hash_shift_); - cc->colors_[key] = argb; -} - -static WEBP_INLINE int VP8LColorCacheGetIndex(const VP8LColorCache* const cc, - uint32_t argb) { - return VP8LHashPix(argb, cc->hash_shift_); -} - -// Return the key if cc contains argb, and -1 otherwise. -static WEBP_INLINE int VP8LColorCacheContains(const VP8LColorCache* const cc, - uint32_t argb) { - const int key = VP8LHashPix(argb, cc->hash_shift_); - return (cc->colors_[key] == argb) ? key : -1; -} - -//------------------------------------------------------------------------------ - -// Initializes the color cache with 'hash_bits' bits for the keys. -// Returns false in case of memory error. -int VP8LColorCacheInit(VP8LColorCache* const color_cache, int hash_bits); - -void VP8LColorCacheCopy(const VP8LColorCache* const src, - VP8LColorCache* const dst); - -// Delete the memory associated to color cache. -void VP8LColorCacheClear(VP8LColorCache* const color_cache); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} -#endif - -#endif // WEBP_UTILS_COLOR_CACHE_UTILS_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/endian_inl_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/endian_inl_utils.h deleted file mode 100644 index 29775f9..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/endian_inl_utils.h +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Endian related functions. - -#ifndef WEBP_UTILS_ENDIAN_INL_UTILS_H_ -#define WEBP_UTILS_ENDIAN_INL_UTILS_H_ - -#ifdef HAVE_CONFIG_H -#include "src/webp/config.h" -#endif - -#include "src/dsp/dsp.h" -#include "src/webp/types.h" - -#if defined(WORDS_BIGENDIAN) -#define HToLE32 BSwap32 -#define HToLE16 BSwap16 -#else -#define HToLE32(x) (x) -#define HToLE16(x) (x) -#endif - -#if !defined(HAVE_CONFIG_H) -#if LOCAL_GCC_PREREQ(4,8) || __has_builtin(__builtin_bswap16) -#define HAVE_BUILTIN_BSWAP16 -#endif -#if LOCAL_GCC_PREREQ(4,3) || __has_builtin(__builtin_bswap32) -#define HAVE_BUILTIN_BSWAP32 -#endif -#if LOCAL_GCC_PREREQ(4,3) || __has_builtin(__builtin_bswap64) -#define HAVE_BUILTIN_BSWAP64 -#endif -#endif // !HAVE_CONFIG_H - -static WEBP_INLINE uint16_t BSwap16(uint16_t x) { -#if defined(HAVE_BUILTIN_BSWAP16) - return __builtin_bswap16(x); -#elif defined(_MSC_VER) - return _byteswap_ushort(x); -#else - // gcc will recognize a 'rorw $8, ...' here: - return (x >> 8) | ((x & 0xff) << 8); -#endif // HAVE_BUILTIN_BSWAP16 -} - -static WEBP_INLINE uint32_t BSwap32(uint32_t x) { -#if defined(WEBP_USE_MIPS32_R2) - uint32_t ret; - __asm__ volatile ( - "wsbh %[ret], %[x] \n\t" - "rotr %[ret], %[ret], 16 \n\t" - : [ret]"=r"(ret) - : [x]"r"(x) - ); - return ret; -#elif defined(HAVE_BUILTIN_BSWAP32) - return __builtin_bswap32(x); -#elif defined(__i386__) || defined(__x86_64__) - uint32_t swapped_bytes; - __asm__ volatile("bswap %0" : "=r"(swapped_bytes) : "0"(x)); - return swapped_bytes; -#elif defined(_MSC_VER) - return (uint32_t)_byteswap_ulong(x); -#else - return (x >> 24) | ((x >> 8) & 0xff00) | ((x << 8) & 0xff0000) | (x << 24); -#endif // HAVE_BUILTIN_BSWAP32 -} - -static WEBP_INLINE uint64_t BSwap64(uint64_t x) { -#if defined(HAVE_BUILTIN_BSWAP64) - return __builtin_bswap64(x); -#elif defined(__x86_64__) - uint64_t swapped_bytes; - __asm__ volatile("bswapq %0" : "=r"(swapped_bytes) : "0"(x)); - return swapped_bytes; -#elif defined(_MSC_VER) - return (uint64_t)_byteswap_uint64(x); -#else // generic code for swapping 64-bit values (suggested by bdb@) - x = ((x & 0xffffffff00000000ull) >> 32) | ((x & 0x00000000ffffffffull) << 32); - x = ((x & 0xffff0000ffff0000ull) >> 16) | ((x & 0x0000ffff0000ffffull) << 16); - x = ((x & 0xff00ff00ff00ff00ull) >> 8) | ((x & 0x00ff00ff00ff00ffull) << 8); - return x; -#endif // HAVE_BUILTIN_BSWAP64 -} - -#endif // WEBP_UTILS_ENDIAN_INL_UTILS_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/filters_utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/filters_utils.c deleted file mode 100644 index e2f65b1..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/filters_utils.c +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// filter estimation -// -// Author: Urvang (urvang@google.com) - -#include "src/utils/filters_utils.h" -#include -#include - -// ----------------------------------------------------------------------------- -// Quick estimate of a potentially interesting filter mode to try. - -#define SMAX 16 -#define SDIFF(a, b) (abs((a) - (b)) >> 4) // Scoring diff, in [0..SMAX) - -static WEBP_INLINE int GradientPredictor(uint8_t a, uint8_t b, uint8_t c) { - const int g = a + b - c; - return ((g & ~0xff) == 0) ? g : (g < 0) ? 0 : 255; // clip to 8bit -} - -WEBP_FILTER_TYPE WebPEstimateBestFilter(const uint8_t* data, - int width, int height, int stride) { - int i, j; - int bins[WEBP_FILTER_LAST][SMAX]; - memset(bins, 0, sizeof(bins)); - - // We only sample every other pixels. That's enough. - for (j = 2; j < height - 1; j += 2) { - const uint8_t* const p = data + j * stride; - int mean = p[0]; - for (i = 2; i < width - 1; i += 2) { - const int diff0 = SDIFF(p[i], mean); - const int diff1 = SDIFF(p[i], p[i - 1]); - const int diff2 = SDIFF(p[i], p[i - width]); - const int grad_pred = - GradientPredictor(p[i - 1], p[i - width], p[i - width - 1]); - const int diff3 = SDIFF(p[i], grad_pred); - bins[WEBP_FILTER_NONE][diff0] = 1; - bins[WEBP_FILTER_HORIZONTAL][diff1] = 1; - bins[WEBP_FILTER_VERTICAL][diff2] = 1; - bins[WEBP_FILTER_GRADIENT][diff3] = 1; - mean = (3 * mean + p[i] + 2) >> 2; - } - } - { - int filter; - WEBP_FILTER_TYPE best_filter = WEBP_FILTER_NONE; - int best_score = 0x7fffffff; - for (filter = WEBP_FILTER_NONE; filter < WEBP_FILTER_LAST; ++filter) { - int score = 0; - for (i = 0; i < SMAX; ++i) { - if (bins[filter][i] > 0) { - score += i; - } - } - if (score < best_score) { - best_score = score; - best_filter = (WEBP_FILTER_TYPE)filter; - } - } - return best_filter; - } -} - -#undef SMAX -#undef SDIFF - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/filters_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/filters_utils.h deleted file mode 100644 index c15afb9..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/filters_utils.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Spatial prediction using various filters -// -// Author: Urvang (urvang@google.com) - -#ifndef WEBP_UTILS_FILTERS_UTILS_H_ -#define WEBP_UTILS_FILTERS_UTILS_H_ - -#include "src/webp/types.h" -#include "src/dsp/dsp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Fast estimate of a potentially good filter. -WEBP_FILTER_TYPE WebPEstimateBestFilter(const uint8_t* data, - int width, int height, int stride); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_UTILS_FILTERS_UTILS_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_encode_utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_encode_utils.c deleted file mode 100644 index db4b495..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_encode_utils.c +++ /dev/null @@ -1,417 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Author: Jyrki Alakuijala (jyrki@google.com) -// -// Entropy encoding (Huffman) for webp lossless. - -#include -#include -#include -#include "src/utils/huffman_encode_utils.h" -#include "src/utils/utils.h" -#include "src/webp/format_constants.h" - -// ----------------------------------------------------------------------------- -// Util function to optimize the symbol map for RLE coding - -// Heuristics for selecting the stride ranges to collapse. -static int ValuesShouldBeCollapsedToStrideAverage(int a, int b) { - return abs(a - b) < 4; -} - -// Change the population counts in a way that the consequent -// Huffman tree compression, especially its RLE-part, give smaller output. -static void OptimizeHuffmanForRle(int length, uint8_t* const good_for_rle, - uint32_t* const counts) { - // 1) Let's make the Huffman code more compatible with rle encoding. - int i; - for (; length >= 0; --length) { - if (length == 0) { - return; // All zeros. - } - if (counts[length - 1] != 0) { - // Now counts[0..length - 1] does not have trailing zeros. - break; - } - } - // 2) Let's mark all population counts that already can be encoded - // with an rle code. - { - // Let's not spoil any of the existing good rle codes. - // Mark any seq of 0's that is longer as 5 as a good_for_rle. - // Mark any seq of non-0's that is longer as 7 as a good_for_rle. - uint32_t symbol = counts[0]; - int stride = 0; - for (i = 0; i < length + 1; ++i) { - if (i == length || counts[i] != symbol) { - if ((symbol == 0 && stride >= 5) || - (symbol != 0 && stride >= 7)) { - int k; - for (k = 0; k < stride; ++k) { - good_for_rle[i - k - 1] = 1; - } - } - stride = 1; - if (i != length) { - symbol = counts[i]; - } - } else { - ++stride; - } - } - } - // 3) Let's replace those population counts that lead to more rle codes. - { - uint32_t stride = 0; - uint32_t limit = counts[0]; - uint32_t sum = 0; - for (i = 0; i < length + 1; ++i) { - if (i == length || good_for_rle[i] || - (i != 0 && good_for_rle[i - 1]) || - !ValuesShouldBeCollapsedToStrideAverage(counts[i], limit)) { - if (stride >= 4 || (stride >= 3 && sum == 0)) { - uint32_t k; - // The stride must end, collapse what we have, if we have enough (4). - uint32_t count = (sum + stride / 2) / stride; - if (count < 1) { - count = 1; - } - if (sum == 0) { - // Don't make an all zeros stride to be upgraded to ones. - count = 0; - } - for (k = 0; k < stride; ++k) { - // We don't want to change value at counts[i], - // that is already belonging to the next stride. Thus - 1. - counts[i - k - 1] = count; - } - } - stride = 0; - sum = 0; - if (i < length - 3) { - // All interesting strides have a count of at least 4, - // at least when non-zeros. - limit = (counts[i] + counts[i + 1] + - counts[i + 2] + counts[i + 3] + 2) / 4; - } else if (i < length) { - limit = counts[i]; - } else { - limit = 0; - } - } - ++stride; - if (i != length) { - sum += counts[i]; - if (stride >= 4) { - limit = (sum + stride / 2) / stride; - } - } - } - } -} - -// A comparer function for two Huffman trees: sorts first by 'total count' -// (more comes first), and then by 'value' (more comes first). -static int CompareHuffmanTrees(const void* ptr1, const void* ptr2) { - const HuffmanTree* const t1 = (const HuffmanTree*)ptr1; - const HuffmanTree* const t2 = (const HuffmanTree*)ptr2; - if (t1->total_count_ > t2->total_count_) { - return -1; - } else if (t1->total_count_ < t2->total_count_) { - return 1; - } else { - assert(t1->value_ != t2->value_); - return (t1->value_ < t2->value_) ? -1 : 1; - } -} - -static void SetBitDepths(const HuffmanTree* const tree, - const HuffmanTree* const pool, - uint8_t* const bit_depths, int level) { - if (tree->pool_index_left_ >= 0) { - SetBitDepths(&pool[tree->pool_index_left_], pool, bit_depths, level + 1); - SetBitDepths(&pool[tree->pool_index_right_], pool, bit_depths, level + 1); - } else { - bit_depths[tree->value_] = level; - } -} - -// Create an optimal Huffman tree. -// -// (data,length): population counts. -// tree_limit: maximum bit depth (inclusive) of the codes. -// bit_depths[]: how many bits are used for the symbol. -// -// Returns 0 when an error has occurred. -// -// The catch here is that the tree cannot be arbitrarily deep -// -// count_limit is the value that is to be faked as the minimum value -// and this minimum value is raised until the tree matches the -// maximum length requirement. -// -// This algorithm is not of excellent performance for very long data blocks, -// especially when population counts are longer than 2**tree_limit, but -// we are not planning to use this with extremely long blocks. -// -// See http://en.wikipedia.org/wiki/Huffman_coding -static void GenerateOptimalTree(const uint32_t* const histogram, - int histogram_size, - HuffmanTree* tree, int tree_depth_limit, - uint8_t* const bit_depths) { - uint32_t count_min; - HuffmanTree* tree_pool; - int tree_size_orig = 0; - int i; - - for (i = 0; i < histogram_size; ++i) { - if (histogram[i] != 0) { - ++tree_size_orig; - } - } - - if (tree_size_orig == 0) { // pretty optimal already! - return; - } - - tree_pool = tree + tree_size_orig; - - // For block sizes with less than 64k symbols we never need to do a - // second iteration of this loop. - // If we actually start running inside this loop a lot, we would perhaps - // be better off with the Katajainen algorithm. - assert(tree_size_orig <= (1 << (tree_depth_limit - 1))); - for (count_min = 1; ; count_min *= 2) { - int tree_size = tree_size_orig; - // We need to pack the Huffman tree in tree_depth_limit bits. - // So, we try by faking histogram entries to be at least 'count_min'. - int idx = 0; - int j; - for (j = 0; j < histogram_size; ++j) { - if (histogram[j] != 0) { - const uint32_t count = - (histogram[j] < count_min) ? count_min : histogram[j]; - tree[idx].total_count_ = count; - tree[idx].value_ = j; - tree[idx].pool_index_left_ = -1; - tree[idx].pool_index_right_ = -1; - ++idx; - } - } - - // Build the Huffman tree. - qsort(tree, tree_size, sizeof(*tree), CompareHuffmanTrees); - - if (tree_size > 1) { // Normal case. - int tree_pool_size = 0; - while (tree_size > 1) { // Finish when we have only one root. - uint32_t count; - tree_pool[tree_pool_size++] = tree[tree_size - 1]; - tree_pool[tree_pool_size++] = tree[tree_size - 2]; - count = tree_pool[tree_pool_size - 1].total_count_ + - tree_pool[tree_pool_size - 2].total_count_; - tree_size -= 2; - { - // Search for the insertion point. - int k; - for (k = 0; k < tree_size; ++k) { - if (tree[k].total_count_ <= count) { - break; - } - } - memmove(tree + (k + 1), tree + k, (tree_size - k) * sizeof(*tree)); - tree[k].total_count_ = count; - tree[k].value_ = -1; - - tree[k].pool_index_left_ = tree_pool_size - 1; - tree[k].pool_index_right_ = tree_pool_size - 2; - tree_size = tree_size + 1; - } - } - SetBitDepths(&tree[0], tree_pool, bit_depths, 0); - } else if (tree_size == 1) { // Trivial case: only one element. - bit_depths[tree[0].value_] = 1; - } - - { - // Test if this Huffman tree satisfies our 'tree_depth_limit' criteria. - int max_depth = bit_depths[0]; - for (j = 1; j < histogram_size; ++j) { - if (max_depth < bit_depths[j]) { - max_depth = bit_depths[j]; - } - } - if (max_depth <= tree_depth_limit) { - break; - } - } - } -} - -// ----------------------------------------------------------------------------- -// Coding of the Huffman tree values - -static HuffmanTreeToken* CodeRepeatedValues(int repetitions, - HuffmanTreeToken* tokens, - int value, int prev_value) { - assert(value <= MAX_ALLOWED_CODE_LENGTH); - if (value != prev_value) { - tokens->code = value; - tokens->extra_bits = 0; - ++tokens; - --repetitions; - } - while (repetitions >= 1) { - if (repetitions < 3) { - int i; - for (i = 0; i < repetitions; ++i) { - tokens->code = value; - tokens->extra_bits = 0; - ++tokens; - } - break; - } else if (repetitions < 7) { - tokens->code = 16; - tokens->extra_bits = repetitions - 3; - ++tokens; - break; - } else { - tokens->code = 16; - tokens->extra_bits = 3; - ++tokens; - repetitions -= 6; - } - } - return tokens; -} - -static HuffmanTreeToken* CodeRepeatedZeros(int repetitions, - HuffmanTreeToken* tokens) { - while (repetitions >= 1) { - if (repetitions < 3) { - int i; - for (i = 0; i < repetitions; ++i) { - tokens->code = 0; // 0-value - tokens->extra_bits = 0; - ++tokens; - } - break; - } else if (repetitions < 11) { - tokens->code = 17; - tokens->extra_bits = repetitions - 3; - ++tokens; - break; - } else if (repetitions < 139) { - tokens->code = 18; - tokens->extra_bits = repetitions - 11; - ++tokens; - break; - } else { - tokens->code = 18; - tokens->extra_bits = 0x7f; // 138 repeated 0s - ++tokens; - repetitions -= 138; - } - } - return tokens; -} - -int VP8LCreateCompressedHuffmanTree(const HuffmanTreeCode* const tree, - HuffmanTreeToken* tokens, int max_tokens) { - HuffmanTreeToken* const starting_token = tokens; - HuffmanTreeToken* const ending_token = tokens + max_tokens; - const int depth_size = tree->num_symbols; - int prev_value = 8; // 8 is the initial value for rle. - int i = 0; - assert(tokens != NULL); - while (i < depth_size) { - const int value = tree->code_lengths[i]; - int k = i + 1; - int runs; - while (k < depth_size && tree->code_lengths[k] == value) ++k; - runs = k - i; - if (value == 0) { - tokens = CodeRepeatedZeros(runs, tokens); - } else { - tokens = CodeRepeatedValues(runs, tokens, value, prev_value); - prev_value = value; - } - i += runs; - assert(tokens <= ending_token); - } - (void)ending_token; // suppress 'unused variable' warning - return (int)(tokens - starting_token); -} - -// ----------------------------------------------------------------------------- - -// Pre-reversed 4-bit values. -static const uint8_t kReversedBits[16] = { - 0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe, - 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf -}; - -static uint32_t ReverseBits(int num_bits, uint32_t bits) { - uint32_t retval = 0; - int i = 0; - while (i < num_bits) { - i += 4; - retval |= kReversedBits[bits & 0xf] << (MAX_ALLOWED_CODE_LENGTH + 1 - i); - bits >>= 4; - } - retval >>= (MAX_ALLOWED_CODE_LENGTH + 1 - num_bits); - return retval; -} - -// Get the actual bit values for a tree of bit depths. -static void ConvertBitDepthsToSymbols(HuffmanTreeCode* const tree) { - // 0 bit-depth means that the symbol does not exist. - int i; - int len; - uint32_t next_code[MAX_ALLOWED_CODE_LENGTH + 1]; - int depth_count[MAX_ALLOWED_CODE_LENGTH + 1] = { 0 }; - - assert(tree != NULL); - len = tree->num_symbols; - for (i = 0; i < len; ++i) { - const int code_length = tree->code_lengths[i]; - assert(code_length <= MAX_ALLOWED_CODE_LENGTH); - ++depth_count[code_length]; - } - depth_count[0] = 0; // ignore unused symbol - next_code[0] = 0; - { - uint32_t code = 0; - for (i = 1; i <= MAX_ALLOWED_CODE_LENGTH; ++i) { - code = (code + depth_count[i - 1]) << 1; - next_code[i] = code; - } - } - for (i = 0; i < len; ++i) { - const int code_length = tree->code_lengths[i]; - tree->codes[i] = ReverseBits(code_length, next_code[code_length]++); - } -} - -// ----------------------------------------------------------------------------- -// Main entry point - -void VP8LCreateHuffmanTree(uint32_t* const histogram, int tree_depth_limit, - uint8_t* const buf_rle, - HuffmanTree* const huff_tree, - HuffmanTreeCode* const huff_code) { - const int num_symbols = huff_code->num_symbols; - memset(buf_rle, 0, num_symbols * sizeof(*buf_rle)); - OptimizeHuffmanForRle(num_symbols, buf_rle, histogram); - GenerateOptimalTree(histogram, num_symbols, huff_tree, tree_depth_limit, - huff_code->code_lengths); - // Create the actual bit codes for the bit lengths. - ConvertBitDepthsToSymbols(huff_code); -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_encode_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_encode_utils.h deleted file mode 100644 index c5934c2..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_encode_utils.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Author: Jyrki Alakuijala (jyrki@google.com) -// -// Entropy encoding (Huffman) for webp lossless - -#ifndef WEBP_UTILS_HUFFMAN_ENCODE_UTILS_H_ -#define WEBP_UTILS_HUFFMAN_ENCODE_UTILS_H_ - -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Struct for holding the tree header in coded form. -typedef struct { - uint8_t code; // value (0..15) or escape code (16,17,18) - uint8_t extra_bits; // extra bits for escape codes -} HuffmanTreeToken; - -// Struct to represent the tree codes (depth and bits array). -typedef struct { - int num_symbols; // Number of symbols. - uint8_t* code_lengths; // Code lengths of the symbols. - uint16_t* codes; // Symbol Codes. -} HuffmanTreeCode; - -// Struct to represent the Huffman tree. -typedef struct { - uint32_t total_count_; // Symbol frequency. - int value_; // Symbol value. - int pool_index_left_; // Index for the left sub-tree. - int pool_index_right_; // Index for the right sub-tree. -} HuffmanTree; - -// Turn the Huffman tree into a token sequence. -// Returns the number of tokens used. -int VP8LCreateCompressedHuffmanTree(const HuffmanTreeCode* const tree, - HuffmanTreeToken* tokens, int max_tokens); - -// Create an optimized tree, and tokenize it. -// 'buf_rle' and 'huff_tree' are pre-allocated and the 'tree' is the constructed -// huffman code tree. -void VP8LCreateHuffmanTree(uint32_t* const histogram, int tree_depth_limit, - uint8_t* const buf_rle, HuffmanTree* const huff_tree, - HuffmanTreeCode* const tree); - -#ifdef __cplusplus -} -#endif - -#endif // WEBP_UTILS_HUFFMAN_ENCODE_UTILS_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_utils.c deleted file mode 100644 index a8ab7d8..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_utils.c +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Utilities for building and looking up Huffman trees. -// -// Author: Urvang Joshi (urvang@google.com) - -#include -#include -#include -#include "src/utils/huffman_utils.h" -#include "src/utils/utils.h" -#include "src/webp/format_constants.h" - -// Huffman data read via DecodeImageStream is represented in two (red and green) -// bytes. -#define MAX_HTREE_GROUPS 0x10000 - -HTreeGroup* VP8LHtreeGroupsNew(int num_htree_groups) { - HTreeGroup* const htree_groups = - (HTreeGroup*)WebPSafeMalloc(num_htree_groups, sizeof(*htree_groups)); - if (htree_groups == NULL) { - return NULL; - } - assert(num_htree_groups <= MAX_HTREE_GROUPS); - return htree_groups; -} - -void VP8LHtreeGroupsFree(HTreeGroup* const htree_groups) { - if (htree_groups != NULL) { - WebPSafeFree(htree_groups); - } -} - -// Returns reverse(reverse(key, len) + 1, len), where reverse(key, len) is the -// bit-wise reversal of the len least significant bits of key. -static WEBP_INLINE uint32_t GetNextKey(uint32_t key, int len) { - uint32_t step = 1 << (len - 1); - while (key & step) { - step >>= 1; - } - return step ? (key & (step - 1)) + step : key; -} - -// Stores code in table[0], table[step], table[2*step], ..., table[end]. -// Assumes that end is an integer multiple of step. -static WEBP_INLINE void ReplicateValue(HuffmanCode* table, - int step, int end, - HuffmanCode code) { - assert(end % step == 0); - do { - end -= step; - table[end] = code; - } while (end > 0); -} - -// Returns the table width of the next 2nd level table. count is the histogram -// of bit lengths for the remaining symbols, len is the code length of the next -// processed symbol -static WEBP_INLINE int NextTableBitSize(const int* const count, - int len, int root_bits) { - int left = 1 << (len - root_bits); - while (len < MAX_ALLOWED_CODE_LENGTH) { - left -= count[len]; - if (left <= 0) break; - ++len; - left <<= 1; - } - return len - root_bits; -} - -// sorted[code_lengths_size] is a pre-allocated array for sorting symbols -// by code length. -static int BuildHuffmanTable(HuffmanCode* const root_table, int root_bits, - const int code_lengths[], int code_lengths_size, - uint16_t sorted[]) { - HuffmanCode* table = root_table; // next available space in table - int total_size = 1 << root_bits; // total size root table + 2nd level table - int len; // current code length - int symbol; // symbol index in original or sorted table - // number of codes of each length: - int count[MAX_ALLOWED_CODE_LENGTH + 1] = { 0 }; - // offsets in sorted table for each length: - int offset[MAX_ALLOWED_CODE_LENGTH + 1]; - - assert(code_lengths_size != 0); - assert(code_lengths != NULL); - assert(root_table != NULL); - assert(root_bits > 0); - - // Build histogram of code lengths. - for (symbol = 0; symbol < code_lengths_size; ++symbol) { - if (code_lengths[symbol] > MAX_ALLOWED_CODE_LENGTH) { - return 0; - } - ++count[code_lengths[symbol]]; - } - - // Error, all code lengths are zeros. - if (count[0] == code_lengths_size) { - return 0; - } - - // Generate offsets into sorted symbol table by code length. - offset[1] = 0; - for (len = 1; len < MAX_ALLOWED_CODE_LENGTH; ++len) { - if (count[len] > (1 << len)) { - return 0; - } - offset[len + 1] = offset[len] + count[len]; - } - - // Sort symbols by length, by symbol order within each length. - for (symbol = 0; symbol < code_lengths_size; ++symbol) { - const int symbol_code_length = code_lengths[symbol]; - if (code_lengths[symbol] > 0) { - sorted[offset[symbol_code_length]++] = symbol; - } - } - - // Special case code with only one value. - if (offset[MAX_ALLOWED_CODE_LENGTH] == 1) { - HuffmanCode code; - code.bits = 0; - code.value = (uint16_t)sorted[0]; - ReplicateValue(table, 1, total_size, code); - return total_size; - } - - { - int step; // step size to replicate values in current table - uint32_t low = -1; // low bits for current root entry - uint32_t mask = total_size - 1; // mask for low bits - uint32_t key = 0; // reversed prefix code - int num_nodes = 1; // number of Huffman tree nodes - int num_open = 1; // number of open branches in current tree level - int table_bits = root_bits; // key length of current table - int table_size = 1 << table_bits; // size of current table - symbol = 0; - // Fill in root table. - for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) { - num_open <<= 1; - num_nodes += num_open; - num_open -= count[len]; - if (num_open < 0) { - return 0; - } - for (; count[len] > 0; --count[len]) { - HuffmanCode code; - code.bits = (uint8_t)len; - code.value = (uint16_t)sorted[symbol++]; - ReplicateValue(&table[key], step, table_size, code); - key = GetNextKey(key, len); - } - } - - // Fill in 2nd level tables and add pointers to root table. - for (len = root_bits + 1, step = 2; len <= MAX_ALLOWED_CODE_LENGTH; - ++len, step <<= 1) { - num_open <<= 1; - num_nodes += num_open; - num_open -= count[len]; - if (num_open < 0) { - return 0; - } - for (; count[len] > 0; --count[len]) { - HuffmanCode code; - if ((key & mask) != low) { - table += table_size; - table_bits = NextTableBitSize(count, len, root_bits); - table_size = 1 << table_bits; - total_size += table_size; - low = key & mask; - root_table[low].bits = (uint8_t)(table_bits + root_bits); - root_table[low].value = (uint16_t)((table - root_table) - low); - } - code.bits = (uint8_t)(len - root_bits); - code.value = (uint16_t)sorted[symbol++]; - ReplicateValue(&table[key >> root_bits], step, table_size, code); - key = GetNextKey(key, len); - } - } - - // Check if tree is full. - if (num_nodes != 2 * offset[MAX_ALLOWED_CODE_LENGTH] - 1) { - return 0; - } - } - - return total_size; -} - -// Maximum code_lengths_size is 2328 (reached for 11-bit color_cache_bits). -// More commonly, the value is around ~280. -#define MAX_CODE_LENGTHS_SIZE \ - ((1 << MAX_CACHE_BITS) + NUM_LITERAL_CODES + NUM_LENGTH_CODES) -// Cut-off value for switching between heap and stack allocation. -#define SORTED_SIZE_CUTOFF 512 -int VP8LBuildHuffmanTable(HuffmanCode* const root_table, int root_bits, - const int code_lengths[], int code_lengths_size) { - int total_size; - assert(code_lengths_size <= MAX_CODE_LENGTHS_SIZE); - if (code_lengths_size <= SORTED_SIZE_CUTOFF) { - // use local stack-allocated array. - uint16_t sorted[SORTED_SIZE_CUTOFF]; - total_size = BuildHuffmanTable(root_table, root_bits, - code_lengths, code_lengths_size, sorted); - } else { // rare case. Use heap allocation. - uint16_t* const sorted = - (uint16_t*)WebPSafeMalloc(code_lengths_size, sizeof(*sorted)); - if (sorted == NULL) return 0; - total_size = BuildHuffmanTable(root_table, root_bits, - code_lengths, code_lengths_size, sorted); - WebPSafeFree(sorted); - } - return total_size; -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_utils.h deleted file mode 100644 index cfe0b30..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/huffman_utils.h +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Utilities for building and looking up Huffman trees. -// -// Author: Urvang Joshi (urvang@google.com) - -#ifndef WEBP_UTILS_HUFFMAN_UTILS_H_ -#define WEBP_UTILS_HUFFMAN_UTILS_H_ - -#include -#include "src/webp/format_constants.h" -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define HUFFMAN_TABLE_BITS 8 -#define HUFFMAN_TABLE_MASK ((1 << HUFFMAN_TABLE_BITS) - 1) - -#define LENGTHS_TABLE_BITS 7 -#define LENGTHS_TABLE_MASK ((1 << LENGTHS_TABLE_BITS) - 1) - - -// Huffman lookup table entry -typedef struct { - uint8_t bits; // number of bits used for this symbol - uint16_t value; // symbol value or table offset -} HuffmanCode; - -// long version for holding 32b values -typedef struct { - int bits; // number of bits used for this symbol, - // or an impossible value if not a literal code. - uint32_t value; // 32b packed ARGB value if literal, - // or non-literal symbol otherwise -} HuffmanCode32; - -#define HUFFMAN_PACKED_BITS 6 -#define HUFFMAN_PACKED_TABLE_SIZE (1u << HUFFMAN_PACKED_BITS) - -// Huffman table group. -// Includes special handling for the following cases: -// - is_trivial_literal: one common literal base for RED/BLUE/ALPHA (not GREEN) -// - is_trivial_code: only 1 code (no bit is read from bitstream) -// - use_packed_table: few enough literal symbols, so all the bit codes -// can fit into a small look-up table packed_table[] -// The common literal base, if applicable, is stored in 'literal_arb'. -typedef struct HTreeGroup HTreeGroup; -struct HTreeGroup { - HuffmanCode* htrees[HUFFMAN_CODES_PER_META_CODE]; - int is_trivial_literal; // True, if huffman trees for Red, Blue & Alpha - // Symbols are trivial (have a single code). - uint32_t literal_arb; // If is_trivial_literal is true, this is the - // ARGB value of the pixel, with Green channel - // being set to zero. - int is_trivial_code; // true if is_trivial_literal with only one code - int use_packed_table; // use packed table below for short literal code - // table mapping input bits to a packed values, or escape case to literal code - HuffmanCode32 packed_table[HUFFMAN_PACKED_TABLE_SIZE]; -}; - -// Creates the instance of HTreeGroup with specified number of tree-groups. -HTreeGroup* VP8LHtreeGroupsNew(int num_htree_groups); - -// Releases the memory allocated for HTreeGroup. -void VP8LHtreeGroupsFree(HTreeGroup* const htree_groups); - -// Builds Huffman lookup table assuming code lengths are in symbol order. -// The 'code_lengths' is pre-allocated temporary memory buffer used for creating -// the huffman table. -// Returns built table size or 0 in case of error (invalid tree or -// memory error). -int VP8LBuildHuffmanTable(HuffmanCode* const root_table, int root_bits, - const int code_lengths[], int code_lengths_size); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // WEBP_UTILS_HUFFMAN_UTILS_H_ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_dec_utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_dec_utils.c deleted file mode 100644 index 72ab586..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_dec_utils.c +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright 2013 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Implement gradient smoothing: we replace a current alpha value by its -// surrounding average if it's close enough (that is: the change will be less -// than the minimum distance between two quantized level). -// We use sliding window for computing the 2d moving average. -// -// Author: Skal (pascal.massimino@gmail.com) - -#include "src/utils/quant_levels_dec_utils.h" - -#include // for memset - -#include "src/utils/utils.h" - -// #define USE_DITHERING // uncomment to enable ordered dithering (not vital) - -#define FIX 16 // fix-point precision for averaging -#define LFIX 2 // extra precision for look-up table -#define LUT_SIZE ((1 << (8 + LFIX)) - 1) // look-up table size - -#if defined(USE_DITHERING) - -#define DFIX 4 // extra precision for ordered dithering -#define DSIZE 4 // dithering size (must be a power of two) -// cf. http://en.wikipedia.org/wiki/Ordered_dithering -static const uint8_t kOrderedDither[DSIZE][DSIZE] = { - { 0, 8, 2, 10 }, // coefficients are in DFIX fixed-point precision - { 12, 4, 14, 6 }, - { 3, 11, 1, 9 }, - { 15, 7, 13, 5 } -}; - -#else -#define DFIX 0 -#endif - -typedef struct { - int width_, height_; // dimension - int stride_; // stride in bytes - int row_; // current input row being processed - uint8_t* src_; // input pointer - uint8_t* dst_; // output pointer - - int radius_; // filter radius (=delay) - int scale_; // normalization factor, in FIX bits precision - - void* mem_; // all memory - - // various scratch buffers - uint16_t* start_; - uint16_t* cur_; - uint16_t* end_; - uint16_t* top_; - uint16_t* average_; - - // input levels distribution - int num_levels_; // number of quantized levels - int min_, max_; // min and max level values - int min_level_dist_; // smallest distance between two consecutive levels - - int16_t* correction_; // size = 1 + 2*LUT_SIZE -> ~4k memory -} SmoothParams; - -//------------------------------------------------------------------------------ - -#define CLIP_8b_MASK (int)(~0U << (8 + DFIX)) -static WEBP_INLINE uint8_t clip_8b(int v) { - return (!(v & CLIP_8b_MASK)) ? (uint8_t)(v >> DFIX) : (v < 0) ? 0u : 255u; -} -#undef CLIP_8b_MASK - -// vertical accumulation -static void VFilter(SmoothParams* const p) { - const uint8_t* src = p->src_; - const int w = p->width_; - uint16_t* const cur = p->cur_; - const uint16_t* const top = p->top_; - uint16_t* const out = p->end_; - uint16_t sum = 0; // all arithmetic is modulo 16bit - int x; - - for (x = 0; x < w; ++x) { - uint16_t new_value; - sum += src[x]; - new_value = top[x] + sum; - out[x] = new_value - cur[x]; // vertical sum of 'r' pixels. - cur[x] = new_value; - } - // move input pointers one row down - p->top_ = p->cur_; - p->cur_ += w; - if (p->cur_ == p->end_) p->cur_ = p->start_; // roll-over - // We replicate edges, as it's somewhat easier as a boundary condition. - // That's why we don't update the 'src' pointer on top/bottom area: - if (p->row_ >= 0 && p->row_ < p->height_ - 1) { - p->src_ += p->stride_; - } -} - -// horizontal accumulation. We use mirror replication of missing pixels, as it's -// a little easier to implement (surprisingly). -static void HFilter(SmoothParams* const p) { - const uint16_t* const in = p->end_; - uint16_t* const out = p->average_; - const uint32_t scale = p->scale_; - const int w = p->width_; - const int r = p->radius_; - - int x; - for (x = 0; x <= r; ++x) { // left mirroring - const uint16_t delta = in[x + r - 1] + in[r - x]; - out[x] = (delta * scale) >> FIX; - } - for (; x < w - r; ++x) { // bulk middle run - const uint16_t delta = in[x + r] - in[x - r - 1]; - out[x] = (delta * scale) >> FIX; - } - for (; x < w; ++x) { // right mirroring - const uint16_t delta = - 2 * in[w - 1] - in[2 * w - 2 - r - x] - in[x - r - 1]; - out[x] = (delta * scale) >> FIX; - } -} - -// emit one filtered output row -static void ApplyFilter(SmoothParams* const p) { - const uint16_t* const average = p->average_; - const int w = p->width_; - const int16_t* const correction = p->correction_; -#if defined(USE_DITHERING) - const uint8_t* const dither = kOrderedDither[p->row_ % DSIZE]; -#endif - uint8_t* const dst = p->dst_; - int x; - for (x = 0; x < w; ++x) { - const int v = dst[x]; - if (v < p->max_ && v > p->min_) { - const int c = (v << DFIX) + correction[average[x] - (v << LFIX)]; -#if defined(USE_DITHERING) - dst[x] = clip_8b(c + dither[x % DSIZE]); -#else - dst[x] = clip_8b(c); -#endif - } - } - p->dst_ += p->stride_; // advance output pointer -} - -//------------------------------------------------------------------------------ -// Initialize correction table - -static void InitCorrectionLUT(int16_t* const lut, int min_dist) { - // The correction curve is: - // f(x) = x for x <= threshold2 - // f(x) = 0 for x >= threshold1 - // and a linear interpolation for range x=[threshold2, threshold1] - // (along with f(-x) = -f(x) symmetry). - // Note that: threshold2 = 3/4 * threshold1 - const int threshold1 = min_dist << LFIX; - const int threshold2 = (3 * threshold1) >> 2; - const int max_threshold = threshold2 << DFIX; - const int delta = threshold1 - threshold2; - int i; - for (i = 1; i <= LUT_SIZE; ++i) { - int c = (i <= threshold2) ? (i << DFIX) - : (i < threshold1) ? max_threshold * (threshold1 - i) / delta - : 0; - c >>= LFIX; - lut[+i] = +c; - lut[-i] = -c; - } - lut[0] = 0; -} - -static void CountLevels(SmoothParams* const p) { - int i, j, last_level; - uint8_t used_levels[256] = { 0 }; - const uint8_t* data = p->src_; - p->min_ = 255; - p->max_ = 0; - for (j = 0; j < p->height_; ++j) { - for (i = 0; i < p->width_; ++i) { - const int v = data[i]; - if (v < p->min_) p->min_ = v; - if (v > p->max_) p->max_ = v; - used_levels[v] = 1; - } - data += p->stride_; - } - // Compute the mininum distance between two non-zero levels. - p->min_level_dist_ = p->max_ - p->min_; - last_level = -1; - for (i = 0; i < 256; ++i) { - if (used_levels[i]) { - ++p->num_levels_; - if (last_level >= 0) { - const int level_dist = i - last_level; - if (level_dist < p->min_level_dist_) { - p->min_level_dist_ = level_dist; - } - } - last_level = i; - } - } -} - -// Initialize all params. -static int InitParams(uint8_t* const data, int width, int height, int stride, - int radius, SmoothParams* const p) { - const int R = 2 * radius + 1; // total size of the kernel - - const size_t size_scratch_m = (R + 1) * width * sizeof(*p->start_); - const size_t size_m = width * sizeof(*p->average_); - const size_t size_lut = (1 + 2 * LUT_SIZE) * sizeof(*p->correction_); - const size_t total_size = size_scratch_m + size_m + size_lut; - uint8_t* mem = (uint8_t*)WebPSafeMalloc(1U, total_size); - - if (mem == NULL) return 0; - p->mem_ = (void*)mem; - - p->start_ = (uint16_t*)mem; - p->cur_ = p->start_; - p->end_ = p->start_ + R * width; - p->top_ = p->end_ - width; - memset(p->top_, 0, width * sizeof(*p->top_)); - mem += size_scratch_m; - - p->average_ = (uint16_t*)mem; - mem += size_m; - - p->width_ = width; - p->height_ = height; - p->stride_ = stride; - p->src_ = data; - p->dst_ = data; - p->radius_ = radius; - p->scale_ = (1 << (FIX + LFIX)) / (R * R); // normalization constant - p->row_ = -radius; - - // analyze the input distribution so we can best-fit the threshold - CountLevels(p); - - // correction table - p->correction_ = ((int16_t*)mem) + LUT_SIZE; - InitCorrectionLUT(p->correction_, p->min_level_dist_); - - return 1; -} - -static void CleanupParams(SmoothParams* const p) { - WebPSafeFree(p->mem_); -} - -int WebPDequantizeLevels(uint8_t* const data, int width, int height, int stride, - int strength) { - int radius = 4 * strength / 100; - - if (strength < 0 || strength > 100) return 0; - if (data == NULL || width <= 0 || height <= 0) return 0; // bad params - - // limit the filter size to not exceed the image dimensions - if (2 * radius + 1 > width) radius = (width - 1) >> 1; - if (2 * radius + 1 > height) radius = (height - 1) >> 1; - - if (radius > 0) { - SmoothParams p; - memset(&p, 0, sizeof(p)); - if (!InitParams(data, width, height, stride, radius, &p)) return 0; - if (p.num_levels_ > 2) { - for (; p.row_ < p.height_; ++p.row_) { - VFilter(&p); // accumulate average of input - // Need to wait few rows in order to prime the filter, - // before emitting some output. - if (p.row_ >= p.radius_) { - HFilter(&p); - ApplyFilter(&p); - } - } - } - CleanupParams(&p); - } - return 1; -} diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_dec_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_dec_utils.h deleted file mode 100644 index 03b5dad..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_dec_utils.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2013 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Alpha plane de-quantization utility -// -// Author: Vikas Arora (vikasa@google.com) - -#ifndef WEBP_UTILS_QUANT_LEVELS_DEC_UTILS_H_ -#define WEBP_UTILS_QUANT_LEVELS_DEC_UTILS_H_ - -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Apply post-processing to input 'data' of size 'width'x'height' assuming that -// the source was quantized to a reduced number of levels. 'stride' is in bytes. -// Strength is in [0..100] and controls the amount of dithering applied. -// Returns false in case of error (data is NULL, invalid parameters, -// malloc failure, ...). -int WebPDequantizeLevels(uint8_t* const data, int width, int height, int stride, - int strength); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_UTILS_QUANT_LEVELS_DEC_UTILS_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_utils.c deleted file mode 100644 index b3e02ce..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_utils.c +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Quantize levels for specified number of quantization-levels ([2, 256]). -// Min and max values are preserved (usual 0 and 255 for alpha plane). -// -// Author: Skal (pascal.massimino@gmail.com) - -#include - -#include "src/utils/quant_levels_utils.h" - -#define NUM_SYMBOLS 256 - -#define MAX_ITER 6 // Maximum number of convergence steps. -#define ERROR_THRESHOLD 1e-4 // MSE stopping criterion. - -// ----------------------------------------------------------------------------- -// Quantize levels. - -int QuantizeLevels(uint8_t* const data, int width, int height, - int num_levels, uint64_t* const sse) { - int freq[NUM_SYMBOLS] = { 0 }; - int q_level[NUM_SYMBOLS] = { 0 }; - double inv_q_level[NUM_SYMBOLS] = { 0 }; - int min_s = 255, max_s = 0; - const size_t data_size = height * width; - int i, num_levels_in, iter; - double last_err = 1.e38, err = 0.; - const double err_threshold = ERROR_THRESHOLD * data_size; - - if (data == NULL) { - return 0; - } - - if (width <= 0 || height <= 0) { - return 0; - } - - if (num_levels < 2 || num_levels > 256) { - return 0; - } - - { - size_t n; - num_levels_in = 0; - for (n = 0; n < data_size; ++n) { - num_levels_in += (freq[data[n]] == 0); - if (min_s > data[n]) min_s = data[n]; - if (max_s < data[n]) max_s = data[n]; - ++freq[data[n]]; - } - } - - if (num_levels_in <= num_levels) goto End; // nothing to do! - - // Start with uniformly spread centroids. - for (i = 0; i < num_levels; ++i) { - inv_q_level[i] = min_s + (double)(max_s - min_s) * i / (num_levels - 1); - } - - // Fixed values. Won't be changed. - q_level[min_s] = 0; - q_level[max_s] = num_levels - 1; - assert(inv_q_level[0] == min_s); - assert(inv_q_level[num_levels - 1] == max_s); - - // k-Means iterations. - for (iter = 0; iter < MAX_ITER; ++iter) { - double q_sum[NUM_SYMBOLS] = { 0 }; - double q_count[NUM_SYMBOLS] = { 0 }; - int s, slot = 0; - - // Assign classes to representatives. - for (s = min_s; s <= max_s; ++s) { - // Keep track of the nearest neighbour 'slot' - while (slot < num_levels - 1 && - 2 * s > inv_q_level[slot] + inv_q_level[slot + 1]) { - ++slot; - } - if (freq[s] > 0) { - q_sum[slot] += s * freq[s]; - q_count[slot] += freq[s]; - } - q_level[s] = slot; - } - - // Assign new representatives to classes. - if (num_levels > 2) { - for (slot = 1; slot < num_levels - 1; ++slot) { - const double count = q_count[slot]; - if (count > 0.) { - inv_q_level[slot] = q_sum[slot] / count; - } - } - } - - // Compute convergence error. - err = 0.; - for (s = min_s; s <= max_s; ++s) { - const double error = s - inv_q_level[q_level[s]]; - err += freq[s] * error * error; - } - - // Check for convergence: we stop as soon as the error is no - // longer improving. - if (last_err - err < err_threshold) break; - last_err = err; - } - - // Remap the alpha plane to quantized values. - { - // double->int rounding operation can be costly, so we do it - // once for all before remapping. We also perform the data[] -> slot - // mapping, while at it (avoid one indirection in the final loop). - uint8_t map[NUM_SYMBOLS]; - int s; - size_t n; - for (s = min_s; s <= max_s; ++s) { - const int slot = q_level[s]; - map[s] = (uint8_t)(inv_q_level[slot] + .5); - } - // Final pass. - for (n = 0; n < data_size; ++n) { - data[n] = map[data[n]]; - } - } - End: - // Store sum of squared error if needed. - if (sse != NULL) *sse = (uint64_t)err; - - return 1; -} - diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_utils.h deleted file mode 100644 index 4e401b4..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/quant_levels_utils.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Alpha plane quantization utility -// -// Author: Vikas Arora (vikasa@google.com) - -#ifndef WEBP_UTILS_QUANT_LEVELS_UTILS_H_ -#define WEBP_UTILS_QUANT_LEVELS_UTILS_H_ - -#include - -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Replace the input 'data' of size 'width'x'height' with 'num-levels' -// quantized values. If not NULL, 'sse' will contain the sum of squared error. -// Valid range for 'num_levels' is [2, 256]. -// Returns false in case of error (data is NULL, or parameters are invalid). -int QuantizeLevels(uint8_t* const data, int width, int height, int num_levels, - uint64_t* const sse); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_UTILS_QUANT_LEVELS_UTILS_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/random_utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/random_utils.c deleted file mode 100644 index b0b9943..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/random_utils.c +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2013 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Pseudo-random utilities -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include "src/utils/random_utils.h" - -//------------------------------------------------------------------------------ - -// 31b-range values -static const uint32_t kRandomTable[VP8_RANDOM_TABLE_SIZE] = { - 0x0de15230, 0x03b31886, 0x775faccb, 0x1c88626a, 0x68385c55, 0x14b3b828, - 0x4a85fef8, 0x49ddb84b, 0x64fcf397, 0x5c550289, 0x4a290000, 0x0d7ec1da, - 0x5940b7ab, 0x5492577d, 0x4e19ca72, 0x38d38c69, 0x0c01ee65, 0x32a1755f, - 0x5437f652, 0x5abb2c32, 0x0faa57b1, 0x73f533e7, 0x685feeda, 0x7563cce2, - 0x6e990e83, 0x4730a7ed, 0x4fc0d9c6, 0x496b153c, 0x4f1403fa, 0x541afb0c, - 0x73990b32, 0x26d7cb1c, 0x6fcc3706, 0x2cbb77d8, 0x75762f2a, 0x6425ccdd, - 0x24b35461, 0x0a7d8715, 0x220414a8, 0x141ebf67, 0x56b41583, 0x73e502e3, - 0x44cab16f, 0x28264d42, 0x73baaefb, 0x0a50ebed, 0x1d6ab6fb, 0x0d3ad40b, - 0x35db3b68, 0x2b081e83, 0x77ce6b95, 0x5181e5f0, 0x78853bbc, 0x009f9494, - 0x27e5ed3c -}; - -void VP8InitRandom(VP8Random* const rg, float dithering) { - memcpy(rg->tab_, kRandomTable, sizeof(rg->tab_)); - rg->index1_ = 0; - rg->index2_ = 31; - rg->amp_ = (dithering < 0.0) ? 0 - : (dithering > 1.0) ? (1 << VP8_RANDOM_DITHER_FIX) - : (uint32_t)((1 << VP8_RANDOM_DITHER_FIX) * dithering); -} - -//------------------------------------------------------------------------------ - diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/random_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/random_utils.h deleted file mode 100644 index 0d63aeb..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/random_utils.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2013 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Pseudo-random utilities -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_UTILS_RANDOM_UTILS_H_ -#define WEBP_UTILS_RANDOM_UTILS_H_ - -#include -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define VP8_RANDOM_DITHER_FIX 8 // fixed-point precision for dithering -#define VP8_RANDOM_TABLE_SIZE 55 - -typedef struct { - int index1_, index2_; - uint32_t tab_[VP8_RANDOM_TABLE_SIZE]; - int amp_; -} VP8Random; - -// Initializes random generator with an amplitude 'dithering' in range [0..1]. -void VP8InitRandom(VP8Random* const rg, float dithering); - -// Returns a centered pseudo-random number with 'num_bits' amplitude. -// (uses D.Knuth's Difference-based random generator). -// 'amp' is in VP8_RANDOM_DITHER_FIX fixed-point precision. -static WEBP_INLINE int VP8RandomBits2(VP8Random* const rg, int num_bits, - int amp) { - int diff; - assert(num_bits + VP8_RANDOM_DITHER_FIX <= 31); - diff = rg->tab_[rg->index1_] - rg->tab_[rg->index2_]; - if (diff < 0) diff += (1u << 31); - rg->tab_[rg->index1_] = diff; - if (++rg->index1_ == VP8_RANDOM_TABLE_SIZE) rg->index1_ = 0; - if (++rg->index2_ == VP8_RANDOM_TABLE_SIZE) rg->index2_ = 0; - // sign-extend, 0-center - diff = (int)((uint32_t)diff << 1) >> (32 - num_bits); - diff = (diff * amp) >> VP8_RANDOM_DITHER_FIX; // restrict range - diff += 1 << (num_bits - 1); // shift back to 0.5-center - return diff; -} - -static WEBP_INLINE int VP8RandomBits(VP8Random* const rg, int num_bits) { - return VP8RandomBits2(rg, num_bits, rg->amp_); -} - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_UTILS_RANDOM_UTILS_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/rescaler_utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/rescaler_utils.c deleted file mode 100644 index 4bb19e4..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/rescaler_utils.c +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Rescaling functions -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include -#include -#include "src/dsp/dsp.h" -#include "src/utils/rescaler_utils.h" - -//------------------------------------------------------------------------------ - -void WebPRescalerInit(WebPRescaler* const wrk, int src_width, int src_height, - uint8_t* const dst, - int dst_width, int dst_height, int dst_stride, - int num_channels, rescaler_t* const work) { - const int x_add = src_width, x_sub = dst_width; - const int y_add = src_height, y_sub = dst_height; - wrk->x_expand = (src_width < dst_width); - wrk->y_expand = (src_height < dst_height); - wrk->src_width = src_width; - wrk->src_height = src_height; - wrk->dst_width = dst_width; - wrk->dst_height = dst_height; - wrk->src_y = 0; - wrk->dst_y = 0; - wrk->dst = dst; - wrk->dst_stride = dst_stride; - wrk->num_channels = num_channels; - - // for 'x_expand', we use bilinear interpolation - wrk->x_add = wrk->x_expand ? (x_sub - 1) : x_add; - wrk->x_sub = wrk->x_expand ? (x_add - 1) : x_sub; - if (!wrk->x_expand) { // fx_scale is not used otherwise - wrk->fx_scale = WEBP_RESCALER_FRAC(1, wrk->x_sub); - } - // vertical scaling parameters - wrk->y_add = wrk->y_expand ? y_add - 1 : y_add; - wrk->y_sub = wrk->y_expand ? y_sub - 1 : y_sub; - wrk->y_accum = wrk->y_expand ? wrk->y_sub : wrk->y_add; - if (!wrk->y_expand) { - // This is WEBP_RESCALER_FRAC(dst_height, x_add * y_add) without the cast. - // Its value is <= WEBP_RESCALER_ONE, because dst_height <= wrk->y_add, and - // wrk->x_add >= 1; - const uint64_t ratio = - (uint64_t)dst_height * WEBP_RESCALER_ONE / (wrk->x_add * wrk->y_add); - if (ratio != (uint32_t)ratio) { - // When ratio == WEBP_RESCALER_ONE, we can't represent the ratio with the - // current fixed-point precision. This happens when src_height == - // wrk->y_add (which == src_height), and wrk->x_add == 1. - // => We special-case fxy_scale = 0, in WebPRescalerExportRow(). - wrk->fxy_scale = 0; - } else { - wrk->fxy_scale = (uint32_t)ratio; - } - wrk->fy_scale = WEBP_RESCALER_FRAC(1, wrk->y_sub); - } else { - wrk->fy_scale = WEBP_RESCALER_FRAC(1, wrk->x_add); - // wrk->fxy_scale is unused here. - } - wrk->irow = work; - wrk->frow = work + num_channels * dst_width; - memset(work, 0, 2 * dst_width * num_channels * sizeof(*work)); - - WebPRescalerDspInit(); -} - -int WebPRescalerGetScaledDimensions(int src_width, int src_height, - int* const scaled_width, - int* const scaled_height) { - assert(scaled_width != NULL); - assert(scaled_height != NULL); - { - int width = *scaled_width; - int height = *scaled_height; - - // if width is unspecified, scale original proportionally to height ratio. - if (width == 0) { - width = - (int)(((uint64_t)src_width * height + src_height / 2) / src_height); - } - // if height is unspecified, scale original proportionally to width ratio. - if (height == 0) { - height = - (int)(((uint64_t)src_height * width + src_width / 2) / src_width); - } - // Check if the overall dimensions still make sense. - if (width <= 0 || height <= 0) { - return 0; - } - - *scaled_width = width; - *scaled_height = height; - return 1; - } -} - -//------------------------------------------------------------------------------ -// all-in-one calls - -int WebPRescaleNeededLines(const WebPRescaler* const wrk, int max_num_lines) { - const int num_lines = (wrk->y_accum + wrk->y_sub - 1) / wrk->y_sub; - return (num_lines > max_num_lines) ? max_num_lines : num_lines; -} - -int WebPRescalerImport(WebPRescaler* const wrk, int num_lines, - const uint8_t* src, int src_stride) { - int total_imported = 0; - while (total_imported < num_lines && !WebPRescalerHasPendingOutput(wrk)) { - if (wrk->y_expand) { - rescaler_t* const tmp = wrk->irow; - wrk->irow = wrk->frow; - wrk->frow = tmp; - } - WebPRescalerImportRow(wrk, src); - if (!wrk->y_expand) { // Accumulate the contribution of the new row. - int x; - for (x = 0; x < wrk->num_channels * wrk->dst_width; ++x) { - wrk->irow[x] += wrk->frow[x]; - } - } - ++wrk->src_y; - src += src_stride; - ++total_imported; - wrk->y_accum -= wrk->y_sub; - } - return total_imported; -} - -int WebPRescalerExport(WebPRescaler* const rescaler) { - int total_exported = 0; - while (WebPRescalerHasPendingOutput(rescaler)) { - WebPRescalerExportRow(rescaler); - ++total_exported; - } - return total_exported; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/rescaler_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/rescaler_utils.h deleted file mode 100644 index 223fd94..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/rescaler_utils.h +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Rescaling functions -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_UTILS_RESCALER_UTILS_H_ -#define WEBP_UTILS_RESCALER_UTILS_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "src/webp/types.h" - -#define WEBP_RESCALER_RFIX 32 // fixed-point precision for multiplies -#define WEBP_RESCALER_ONE (1ull << WEBP_RESCALER_RFIX) -#define WEBP_RESCALER_FRAC(x, y) \ - ((uint32_t)(((uint64_t)(x) << WEBP_RESCALER_RFIX) / (y))) - -// Structure used for on-the-fly rescaling -typedef uint32_t rescaler_t; // type for side-buffer -typedef struct WebPRescaler WebPRescaler; -struct WebPRescaler { - int x_expand; // true if we're expanding in the x direction - int y_expand; // true if we're expanding in the y direction - int num_channels; // bytes to jump between pixels - uint32_t fx_scale; // fixed-point scaling factors - uint32_t fy_scale; // '' - uint32_t fxy_scale; // '' - int y_accum; // vertical accumulator - int y_add, y_sub; // vertical increments - int x_add, x_sub; // horizontal increments - int src_width, src_height; // source dimensions - int dst_width, dst_height; // destination dimensions - int src_y, dst_y; // row counters for input and output - uint8_t* dst; - int dst_stride; - rescaler_t* irow, *frow; // work buffer -}; - -// Initialize a rescaler given scratch area 'work' and dimensions of src & dst. -void WebPRescalerInit(WebPRescaler* const rescaler, - int src_width, int src_height, - uint8_t* const dst, - int dst_width, int dst_height, int dst_stride, - int num_channels, - rescaler_t* const work); - -// If either 'scaled_width' or 'scaled_height' (but not both) is 0 the value -// will be calculated preserving the aspect ratio, otherwise the values are -// left unmodified. Returns true on success, false if either value is 0 after -// performing the scaling calculation. -int WebPRescalerGetScaledDimensions(int src_width, int src_height, - int* const scaled_width, - int* const scaled_height); - -// Returns the number of input lines needed next to produce one output line, -// considering that the maximum available input lines are 'max_num_lines'. -int WebPRescaleNeededLines(const WebPRescaler* const rescaler, - int max_num_lines); - -// Import multiple rows over all channels, until at least one row is ready to -// be exported. Returns the actual number of lines that were imported. -int WebPRescalerImport(WebPRescaler* const rescaler, int num_rows, - const uint8_t* src, int src_stride); - -// Export as many rows as possible. Return the numbers of rows written. -int WebPRescalerExport(WebPRescaler* const rescaler); - -// Return true if input is finished -static WEBP_INLINE -int WebPRescalerInputDone(const WebPRescaler* const rescaler) { - return (rescaler->src_y >= rescaler->src_height); -} -// Return true if output is finished -static WEBP_INLINE -int WebPRescalerOutputDone(const WebPRescaler* const rescaler) { - return (rescaler->dst_y >= rescaler->dst_height); -} - -// Return true if there are pending output rows ready. -static WEBP_INLINE -int WebPRescalerHasPendingOutput(const WebPRescaler* const rescaler) { - return !WebPRescalerOutputDone(rescaler) && (rescaler->y_accum <= 0); -} - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_UTILS_RESCALER_UTILS_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/thread_utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/thread_utils.c deleted file mode 100644 index 30e2515..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/thread_utils.c +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Multi-threaded worker -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include // for memset() -#include "src/utils/thread_utils.h" -#include "src/utils/utils.h" - -#ifdef WEBP_USE_THREAD - -#if defined(_WIN32) - -#include -typedef HANDLE pthread_t; -typedef CRITICAL_SECTION pthread_mutex_t; - -#if _WIN32_WINNT >= 0x0600 // Windows Vista / Server 2008 or greater -#define USE_WINDOWS_CONDITION_VARIABLE -typedef CONDITION_VARIABLE pthread_cond_t; -#else -typedef struct { - HANDLE waiting_sem_; - HANDLE received_sem_; - HANDLE signal_event_; -} pthread_cond_t; -#endif // _WIN32_WINNT >= 0x600 - -#ifndef WINAPI_FAMILY_PARTITION -#define WINAPI_PARTITION_DESKTOP 1 -#define WINAPI_FAMILY_PARTITION(x) x -#endif - -#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -#define USE_CREATE_THREAD -#endif - -#else // !_WIN32 - -#include - -#endif // _WIN32 - -typedef struct { - pthread_mutex_t mutex_; - pthread_cond_t condition_; - pthread_t thread_; -} WebPWorkerImpl; - -#if defined(_WIN32) - -//------------------------------------------------------------------------------ -// simplistic pthread emulation layer - -#include - -// _beginthreadex requires __stdcall -#define THREADFN unsigned int __stdcall -#define THREAD_RETURN(val) (unsigned int)((DWORD_PTR)val) - -#if _WIN32_WINNT >= 0x0501 // Windows XP or greater -#define WaitForSingleObject(obj, timeout) \ - WaitForSingleObjectEx(obj, timeout, FALSE /*bAlertable*/) -#endif - -static int pthread_create(pthread_t* const thread, const void* attr, - unsigned int (__stdcall *start)(void*), void* arg) { - (void)attr; -#ifdef USE_CREATE_THREAD - *thread = CreateThread(NULL, /* lpThreadAttributes */ - 0, /* dwStackSize */ - start, - arg, - 0, /* dwStackSize */ - NULL); /* lpThreadId */ -#else - *thread = (pthread_t)_beginthreadex(NULL, /* void *security */ - 0, /* unsigned stack_size */ - start, - arg, - 0, /* unsigned initflag */ - NULL); /* unsigned *thrdaddr */ -#endif - if (*thread == NULL) return 1; - SetThreadPriority(*thread, THREAD_PRIORITY_ABOVE_NORMAL); - return 0; -} - -static int pthread_join(pthread_t thread, void** value_ptr) { - (void)value_ptr; - return (WaitForSingleObject(thread, INFINITE) != WAIT_OBJECT_0 || - CloseHandle(thread) == 0); -} - -// Mutex -static int pthread_mutex_init(pthread_mutex_t* const mutex, void* mutexattr) { - (void)mutexattr; -#if _WIN32_WINNT >= 0x0600 // Windows Vista / Server 2008 or greater - InitializeCriticalSectionEx(mutex, 0 /*dwSpinCount*/, 0 /*Flags*/); -#else - InitializeCriticalSection(mutex); -#endif - return 0; -} - -static int pthread_mutex_lock(pthread_mutex_t* const mutex) { - EnterCriticalSection(mutex); - return 0; -} - -static int pthread_mutex_unlock(pthread_mutex_t* const mutex) { - LeaveCriticalSection(mutex); - return 0; -} - -static int pthread_mutex_destroy(pthread_mutex_t* const mutex) { - DeleteCriticalSection(mutex); - return 0; -} - -// Condition -static int pthread_cond_destroy(pthread_cond_t* const condition) { - int ok = 1; -#ifdef USE_WINDOWS_CONDITION_VARIABLE - (void)condition; -#else - ok &= (CloseHandle(condition->waiting_sem_) != 0); - ok &= (CloseHandle(condition->received_sem_) != 0); - ok &= (CloseHandle(condition->signal_event_) != 0); -#endif - return !ok; -} - -static int pthread_cond_init(pthread_cond_t* const condition, void* cond_attr) { - (void)cond_attr; -#ifdef USE_WINDOWS_CONDITION_VARIABLE - InitializeConditionVariable(condition); -#else - condition->waiting_sem_ = CreateSemaphore(NULL, 0, 1, NULL); - condition->received_sem_ = CreateSemaphore(NULL, 0, 1, NULL); - condition->signal_event_ = CreateEvent(NULL, FALSE, FALSE, NULL); - if (condition->waiting_sem_ == NULL || - condition->received_sem_ == NULL || - condition->signal_event_ == NULL) { - pthread_cond_destroy(condition); - return 1; - } -#endif - return 0; -} - -static int pthread_cond_signal(pthread_cond_t* const condition) { - int ok = 1; -#ifdef USE_WINDOWS_CONDITION_VARIABLE - WakeConditionVariable(condition); -#else - if (WaitForSingleObject(condition->waiting_sem_, 0) == WAIT_OBJECT_0) { - // a thread is waiting in pthread_cond_wait: allow it to be notified - ok = SetEvent(condition->signal_event_); - // wait until the event is consumed so the signaler cannot consume - // the event via its own pthread_cond_wait. - ok &= (WaitForSingleObject(condition->received_sem_, INFINITE) != - WAIT_OBJECT_0); - } -#endif - return !ok; -} - -static int pthread_cond_wait(pthread_cond_t* const condition, - pthread_mutex_t* const mutex) { - int ok; -#ifdef USE_WINDOWS_CONDITION_VARIABLE - ok = SleepConditionVariableCS(condition, mutex, INFINITE); -#else - // note that there is a consumer available so the signal isn't dropped in - // pthread_cond_signal - if (!ReleaseSemaphore(condition->waiting_sem_, 1, NULL)) return 1; - // now unlock the mutex so pthread_cond_signal may be issued - pthread_mutex_unlock(mutex); - ok = (WaitForSingleObject(condition->signal_event_, INFINITE) == - WAIT_OBJECT_0); - ok &= ReleaseSemaphore(condition->received_sem_, 1, NULL); - pthread_mutex_lock(mutex); -#endif - return !ok; -} - -#else // !_WIN32 -# define THREADFN void* -# define THREAD_RETURN(val) val -#endif // _WIN32 - -//------------------------------------------------------------------------------ - -static THREADFN ThreadLoop(void* ptr) { - WebPWorker* const worker = (WebPWorker*)ptr; - WebPWorkerImpl* const impl = (WebPWorkerImpl*)worker->impl_; - int done = 0; - while (!done) { - pthread_mutex_lock(&impl->mutex_); - while (worker->status_ == OK) { // wait in idling mode - pthread_cond_wait(&impl->condition_, &impl->mutex_); - } - if (worker->status_ == WORK) { - WebPGetWorkerInterface()->Execute(worker); - worker->status_ = OK; - } else if (worker->status_ == NOT_OK) { // finish the worker - done = 1; - } - // signal to the main thread that we're done (for Sync()) - pthread_cond_signal(&impl->condition_); - pthread_mutex_unlock(&impl->mutex_); - } - return THREAD_RETURN(NULL); // Thread is finished -} - -// main thread state control -static void ChangeState(WebPWorker* const worker, WebPWorkerStatus new_status) { - // No-op when attempting to change state on a thread that didn't come up. - // Checking status_ without acquiring the lock first would result in a data - // race. - WebPWorkerImpl* const impl = (WebPWorkerImpl*)worker->impl_; - if (impl == NULL) return; - - pthread_mutex_lock(&impl->mutex_); - if (worker->status_ >= OK) { - // wait for the worker to finish - while (worker->status_ != OK) { - pthread_cond_wait(&impl->condition_, &impl->mutex_); - } - // assign new status and release the working thread if needed - if (new_status != OK) { - worker->status_ = new_status; - pthread_cond_signal(&impl->condition_); - } - } - pthread_mutex_unlock(&impl->mutex_); -} - -#endif // WEBP_USE_THREAD - -//------------------------------------------------------------------------------ - -static void Init(WebPWorker* const worker) { - memset(worker, 0, sizeof(*worker)); - worker->status_ = NOT_OK; -} - -static int Sync(WebPWorker* const worker) { -#ifdef WEBP_USE_THREAD - ChangeState(worker, OK); -#endif - assert(worker->status_ <= OK); - return !worker->had_error; -} - -static int Reset(WebPWorker* const worker) { - int ok = 1; - worker->had_error = 0; - if (worker->status_ < OK) { -#ifdef WEBP_USE_THREAD - WebPWorkerImpl* const impl = - (WebPWorkerImpl*)WebPSafeCalloc(1, sizeof(WebPWorkerImpl)); - worker->impl_ = (void*)impl; - if (worker->impl_ == NULL) { - return 0; - } - if (pthread_mutex_init(&impl->mutex_, NULL)) { - goto Error; - } - if (pthread_cond_init(&impl->condition_, NULL)) { - pthread_mutex_destroy(&impl->mutex_); - goto Error; - } - pthread_mutex_lock(&impl->mutex_); - ok = !pthread_create(&impl->thread_, NULL, ThreadLoop, worker); - if (ok) worker->status_ = OK; - pthread_mutex_unlock(&impl->mutex_); - if (!ok) { - pthread_mutex_destroy(&impl->mutex_); - pthread_cond_destroy(&impl->condition_); - Error: - WebPSafeFree(impl); - worker->impl_ = NULL; - return 0; - } -#else - worker->status_ = OK; -#endif - } else if (worker->status_ > OK) { - ok = Sync(worker); - } - assert(!ok || (worker->status_ == OK)); - return ok; -} - -static void Execute(WebPWorker* const worker) { - if (worker->hook != NULL) { - worker->had_error |= !worker->hook(worker->data1, worker->data2); - } -} - -static void Launch(WebPWorker* const worker) { -#ifdef WEBP_USE_THREAD - ChangeState(worker, WORK); -#else - Execute(worker); -#endif -} - -static void End(WebPWorker* const worker) { -#ifdef WEBP_USE_THREAD - if (worker->impl_ != NULL) { - WebPWorkerImpl* const impl = (WebPWorkerImpl*)worker->impl_; - ChangeState(worker, NOT_OK); - pthread_join(impl->thread_, NULL); - pthread_mutex_destroy(&impl->mutex_); - pthread_cond_destroy(&impl->condition_); - WebPSafeFree(impl); - worker->impl_ = NULL; - } -#else - worker->status_ = NOT_OK; - assert(worker->impl_ == NULL); -#endif - assert(worker->status_ == NOT_OK); -} - -//------------------------------------------------------------------------------ - -static WebPWorkerInterface g_worker_interface = { - Init, Reset, Sync, Launch, Execute, End -}; - -int WebPSetWorkerInterface(const WebPWorkerInterface* const winterface) { - if (winterface == NULL || - winterface->Init == NULL || winterface->Reset == NULL || - winterface->Sync == NULL || winterface->Launch == NULL || - winterface->Execute == NULL || winterface->End == NULL) { - return 0; - } - g_worker_interface = *winterface; - return 1; -} - -const WebPWorkerInterface* WebPGetWorkerInterface(void) { - return &g_worker_interface; -} - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/thread_utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/thread_utils.h deleted file mode 100644 index 5d8ccd0..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/thread_utils.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Multi-threaded worker -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_UTILS_THREAD_UTILS_H_ -#define WEBP_UTILS_THREAD_UTILS_H_ - -#ifdef HAVE_CONFIG_H -#include "src/webp/config.h" -#endif - -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// State of the worker thread object -typedef enum { - NOT_OK = 0, // object is unusable - OK, // ready to work - WORK // busy finishing the current task -} WebPWorkerStatus; - -// Function to be called by the worker thread. Takes two opaque pointers as -// arguments (data1 and data2), and should return false in case of error. -typedef int (*WebPWorkerHook)(void*, void*); - -// Synchronization object used to launch job in the worker thread -typedef struct { - void* impl_; // platform-dependent implementation worker details - WebPWorkerStatus status_; - WebPWorkerHook hook; // hook to call - void* data1; // first argument passed to 'hook' - void* data2; // second argument passed to 'hook' - int had_error; // return value of the last call to 'hook' -} WebPWorker; - -// The interface for all thread-worker related functions. All these functions -// must be implemented. -typedef struct { - // Must be called first, before any other method. - void (*Init)(WebPWorker* const worker); - // Must be called to initialize the object and spawn the thread. Re-entrant. - // Will potentially launch the thread. Returns false in case of error. - int (*Reset)(WebPWorker* const worker); - // Makes sure the previous work is finished. Returns true if worker->had_error - // was not set and no error condition was triggered by the working thread. - int (*Sync)(WebPWorker* const worker); - // Triggers the thread to call hook() with data1 and data2 arguments. These - // hook/data1/data2 values can be changed at any time before calling this - // function, but not be changed afterward until the next call to Sync(). - void (*Launch)(WebPWorker* const worker); - // This function is similar to Launch() except that it calls the - // hook directly instead of using a thread. Convenient to bypass the thread - // mechanism while still using the WebPWorker structs. Sync() must - // still be called afterward (for error reporting). - void (*Execute)(WebPWorker* const worker); - // Kill the thread and terminate the object. To use the object again, one - // must call Reset() again. - void (*End)(WebPWorker* const worker); -} WebPWorkerInterface; - -// Install a new set of threading functions, overriding the defaults. This -// should be done before any workers are started, i.e., before any encoding or -// decoding takes place. The contents of the interface struct are copied, it -// is safe to free the corresponding memory after this call. This function is -// not thread-safe. Return false in case of invalid pointer or methods. -WEBP_EXTERN int WebPSetWorkerInterface( - const WebPWorkerInterface* const winterface); - -// Retrieve the currently set thread worker interface. -WEBP_EXTERN const WebPWorkerInterface* WebPGetWorkerInterface(void); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_UTILS_THREAD_UTILS_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/utils.c b/Dependencies/FreeImage/Source/LibWebP/src/utils/utils.c deleted file mode 100644 index c3d5b4d..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/utils.c +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Misc. common utility functions -// -// Author: Skal (pascal.massimino@gmail.com) - -#include -#include // for memcpy() -#include "src/webp/decode.h" -#include "src/webp/encode.h" -#include "src/webp/format_constants.h" // for MAX_PALETTE_SIZE -#include "src/utils/color_cache_utils.h" -#include "src/utils/utils.h" - -// If PRINT_MEM_INFO is defined, extra info (like total memory used, number of -// alloc/free etc) is printed. For debugging/tuning purpose only (it's slow, -// and not multi-thread safe!). -// An interesting alternative is valgrind's 'massif' tool: -// http://valgrind.org/docs/manual/ms-manual.html -// Here is an example command line: -/* valgrind --tool=massif --massif-out-file=massif.out \ - --stacks=yes --alloc-fn=WebPSafeMalloc --alloc-fn=WebPSafeCalloc - ms_print massif.out -*/ -// In addition: -// * if PRINT_MEM_TRAFFIC is defined, all the details of the malloc/free cycles -// are printed. -// * if MALLOC_FAIL_AT is defined, the global environment variable -// $MALLOC_FAIL_AT is used to simulate a memory error when calloc or malloc -// is called for the nth time. Example usage: -// export MALLOC_FAIL_AT=50 && ./examples/cwebp input.png -// * if MALLOC_LIMIT is defined, the global environment variable $MALLOC_LIMIT -// sets the maximum amount of memory (in bytes) made available to libwebp. -// This can be used to emulate environment with very limited memory. -// Example: export MALLOC_LIMIT=64000000 && ./examples/dwebp picture.webp - -// #define PRINT_MEM_INFO -// #define PRINT_MEM_TRAFFIC -// #define MALLOC_FAIL_AT -// #define MALLOC_LIMIT - -//------------------------------------------------------------------------------ -// Checked memory allocation - -#if defined(PRINT_MEM_INFO) - -#include - -static int num_malloc_calls = 0; -static int num_calloc_calls = 0; -static int num_free_calls = 0; -static int countdown_to_fail = 0; // 0 = off - -typedef struct MemBlock MemBlock; -struct MemBlock { - void* ptr_; - size_t size_; - MemBlock* next_; -}; - -static MemBlock* all_blocks = NULL; -static size_t total_mem = 0; -static size_t total_mem_allocated = 0; -static size_t high_water_mark = 0; -static size_t mem_limit = 0; - -static int exit_registered = 0; - -static void PrintMemInfo(void) { - fprintf(stderr, "\nMEMORY INFO:\n"); - fprintf(stderr, "num calls to: malloc = %4d\n", num_malloc_calls); - fprintf(stderr, " calloc = %4d\n", num_calloc_calls); - fprintf(stderr, " free = %4d\n", num_free_calls); - fprintf(stderr, "total_mem: %u\n", (uint32_t)total_mem); - fprintf(stderr, "total_mem allocated: %u\n", (uint32_t)total_mem_allocated); - fprintf(stderr, "high-water mark: %u\n", (uint32_t)high_water_mark); - while (all_blocks != NULL) { - MemBlock* b = all_blocks; - all_blocks = b->next_; - free(b); - } -} - -static void Increment(int* const v) { - if (!exit_registered) { -#if defined(MALLOC_FAIL_AT) - { - const char* const malloc_fail_at_str = getenv("MALLOC_FAIL_AT"); - if (malloc_fail_at_str != NULL) { - countdown_to_fail = atoi(malloc_fail_at_str); - } - } -#endif -#if defined(MALLOC_LIMIT) - { - const char* const malloc_limit_str = getenv("MALLOC_LIMIT"); - if (malloc_limit_str != NULL) { - mem_limit = atoi(malloc_limit_str); - } - } -#endif - (void)countdown_to_fail; - (void)mem_limit; - atexit(PrintMemInfo); - exit_registered = 1; - } - ++*v; -} - -static void AddMem(void* ptr, size_t size) { - if (ptr != NULL) { - MemBlock* const b = (MemBlock*)malloc(sizeof(*b)); - if (b == NULL) abort(); - b->next_ = all_blocks; - all_blocks = b; - b->ptr_ = ptr; - b->size_ = size; - total_mem += size; - total_mem_allocated += size; -#if defined(PRINT_MEM_TRAFFIC) -#if defined(MALLOC_FAIL_AT) - fprintf(stderr, "fail-count: %5d [mem=%u]\n", - num_malloc_calls + num_calloc_calls, (uint32_t)total_mem); -#else - fprintf(stderr, "Mem: %u (+%u)\n", (uint32_t)total_mem, (uint32_t)size); -#endif -#endif - if (total_mem > high_water_mark) high_water_mark = total_mem; - } -} - -static void SubMem(void* ptr) { - if (ptr != NULL) { - MemBlock** b = &all_blocks; - // Inefficient search, but that's just for debugging. - while (*b != NULL && (*b)->ptr_ != ptr) b = &(*b)->next_; - if (*b == NULL) { - fprintf(stderr, "Invalid pointer free! (%p)\n", ptr); - abort(); - } - { - MemBlock* const block = *b; - *b = block->next_; - total_mem -= block->size_; -#if defined(PRINT_MEM_TRAFFIC) - fprintf(stderr, "Mem: %u (-%u)\n", - (uint32_t)total_mem, (uint32_t)block->size_); -#endif - free(block); - } - } -} - -#else -#define Increment(v) do {} while (0) -#define AddMem(p, s) do {} while (0) -#define SubMem(p) do {} while (0) -#endif - -// Returns 0 in case of overflow of nmemb * size. -static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { - const uint64_t total_size = nmemb * size; - if (nmemb == 0) return 1; - if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0; - if (total_size != (size_t)total_size) return 0; -#if defined(PRINT_MEM_INFO) && defined(MALLOC_FAIL_AT) - if (countdown_to_fail > 0 && --countdown_to_fail == 0) { - return 0; // fake fail! - } -#endif -#if defined(MALLOC_LIMIT) - if (mem_limit > 0) { - const uint64_t new_total_mem = (uint64_t)total_mem + total_size; - if (new_total_mem != (size_t)new_total_mem || - new_total_mem > mem_limit) { - return 0; // fake fail! - } - } -#endif - - return 1; -} - -void* WebPSafeMalloc(uint64_t nmemb, size_t size) { - void* ptr; - Increment(&num_malloc_calls); - if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; - assert(nmemb * size > 0); - ptr = malloc((size_t)(nmemb * size)); - AddMem(ptr, (size_t)(nmemb * size)); - return ptr; -} - -void* WebPSafeCalloc(uint64_t nmemb, size_t size) { - void* ptr; - Increment(&num_calloc_calls); - if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; - assert(nmemb * size > 0); - ptr = calloc((size_t)nmemb, size); - AddMem(ptr, (size_t)(nmemb * size)); - return ptr; -} - -void WebPSafeFree(void* const ptr) { - if (ptr != NULL) { - Increment(&num_free_calls); - SubMem(ptr); - } - free(ptr); -} - -// Public API function. -void WebPFree(void* ptr) { - free(ptr); -} - -//------------------------------------------------------------------------------ - -void WebPCopyPlane(const uint8_t* src, int src_stride, - uint8_t* dst, int dst_stride, int width, int height) { - assert(src != NULL && dst != NULL); - assert(src_stride >= width && dst_stride >= width); - while (height-- > 0) { - memcpy(dst, src, width); - src += src_stride; - dst += dst_stride; - } -} - -void WebPCopyPixels(const WebPPicture* const src, WebPPicture* const dst) { - assert(src != NULL && dst != NULL); - assert(src->width == dst->width && src->height == dst->height); - assert(src->use_argb && dst->use_argb); - WebPCopyPlane((uint8_t*)src->argb, 4 * src->argb_stride, (uint8_t*)dst->argb, - 4 * dst->argb_stride, 4 * src->width, src->height); -} - -//------------------------------------------------------------------------------ - -#define COLOR_HASH_SIZE (MAX_PALETTE_SIZE * 4) -#define COLOR_HASH_RIGHT_SHIFT 22 // 32 - log2(COLOR_HASH_SIZE). - -int WebPGetColorPalette(const WebPPicture* const pic, uint32_t* const palette) { - int i; - int x, y; - int num_colors = 0; - uint8_t in_use[COLOR_HASH_SIZE] = { 0 }; - uint32_t colors[COLOR_HASH_SIZE]; - const uint32_t* argb = pic->argb; - const int width = pic->width; - const int height = pic->height; - uint32_t last_pix = ~argb[0]; // so we're sure that last_pix != argb[0] - assert(pic != NULL); - assert(pic->use_argb); - - for (y = 0; y < height; ++y) { - for (x = 0; x < width; ++x) { - int key; - if (argb[x] == last_pix) { - continue; - } - last_pix = argb[x]; - key = VP8LHashPix(last_pix, COLOR_HASH_RIGHT_SHIFT); - while (1) { - if (!in_use[key]) { - colors[key] = last_pix; - in_use[key] = 1; - ++num_colors; - if (num_colors > MAX_PALETTE_SIZE) { - return MAX_PALETTE_SIZE + 1; // Exact count not needed. - } - break; - } else if (colors[key] == last_pix) { - break; // The color is already there. - } else { - // Some other color sits here, so do linear conflict resolution. - ++key; - key &= (COLOR_HASH_SIZE - 1); // Key mask. - } - } - } - argb += pic->argb_stride; - } - - if (palette != NULL) { // Fill the colors into palette. - num_colors = 0; - for (i = 0; i < COLOR_HASH_SIZE; ++i) { - if (in_use[i]) { - palette[num_colors] = colors[i]; - ++num_colors; - } - } - } - return num_colors; -} - -#undef COLOR_HASH_SIZE -#undef COLOR_HASH_RIGHT_SHIFT - -//------------------------------------------------------------------------------ - -#if defined(WEBP_NEED_LOG_TABLE_8BIT) -const uint8_t WebPLogTable8bit[256] = { // 31 ^ clz(i) - 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 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, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 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, 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, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 -}; -#endif - -//------------------------------------------------------------------------------ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/utils/utils.h b/Dependencies/FreeImage/Source/LibWebP/src/utils/utils.h deleted file mode 100644 index 813d25c..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/utils/utils.h +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Misc. common utility functions -// -// Authors: Skal (pascal.massimino@gmail.com) -// Urvang (urvang@google.com) - -#ifndef WEBP_UTILS_UTILS_H_ -#define WEBP_UTILS_UTILS_H_ - -#ifdef HAVE_CONFIG_H -#include "src/webp/config.h" -#endif - -#include -#include - -#include "src/dsp/dsp.h" -#include "src/webp/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -//------------------------------------------------------------------------------ -// Memory allocation - -// This is the maximum memory amount that libwebp will ever try to allocate. -#ifndef WEBP_MAX_ALLOCABLE_MEMORY -#if SIZE_MAX > (1ULL << 34) -#define WEBP_MAX_ALLOCABLE_MEMORY (1ULL << 34) -#else -// For 32-bit targets keep this below INT_MAX to avoid valgrind warnings. -#define WEBP_MAX_ALLOCABLE_MEMORY ((1ULL << 31) - (1 << 16)) -#endif -#endif // WEBP_MAX_ALLOCABLE_MEMORY - -// size-checking safe malloc/calloc: verify that the requested size is not too -// large, or return NULL. You don't need to call these for constructs like -// malloc(sizeof(foo)), but only if there's picture-dependent size involved -// somewhere (like: malloc(num_pixels * sizeof(*something))). That's why this -// safe malloc() borrows the signature from calloc(), pointing at the dangerous -// underlying multiply involved. -WEBP_EXTERN void* WebPSafeMalloc(uint64_t nmemb, size_t size); -// Note that WebPSafeCalloc() expects the second argument type to be 'size_t' -// in order to favor the "calloc(num_foo, sizeof(foo))" pattern. -WEBP_EXTERN void* WebPSafeCalloc(uint64_t nmemb, size_t size); - -// Companion deallocation function to the above allocations. -WEBP_EXTERN void WebPSafeFree(void* const ptr); - -//------------------------------------------------------------------------------ -// Alignment - -#define WEBP_ALIGN_CST 31 -#define WEBP_ALIGN(PTR) (((uintptr_t)(PTR) + WEBP_ALIGN_CST) & ~WEBP_ALIGN_CST) - -#include -// memcpy() is the safe way of moving potentially unaligned 32b memory. -static WEBP_INLINE uint32_t WebPMemToUint32(const uint8_t* const ptr) { - uint32_t A; - memcpy(&A, ptr, sizeof(A)); - return A; -} -static WEBP_INLINE void WebPUint32ToMem(uint8_t* const ptr, uint32_t val) { - memcpy(ptr, &val, sizeof(val)); -} - -//------------------------------------------------------------------------------ -// Reading/writing data. - -// Read 16, 24 or 32 bits stored in little-endian order. -static WEBP_INLINE int GetLE16(const uint8_t* const data) { - return (int)(data[0] << 0) | (data[1] << 8); -} - -static WEBP_INLINE int GetLE24(const uint8_t* const data) { - return GetLE16(data) | (data[2] << 16); -} - -static WEBP_INLINE uint32_t GetLE32(const uint8_t* const data) { - return GetLE16(data) | ((uint32_t)GetLE16(data + 2) << 16); -} - -// Store 16, 24 or 32 bits in little-endian order. -static WEBP_INLINE void PutLE16(uint8_t* const data, int val) { - assert(val < (1 << 16)); - data[0] = (val >> 0); - data[1] = (val >> 8); -} - -static WEBP_INLINE void PutLE24(uint8_t* const data, int val) { - assert(val < (1 << 24)); - PutLE16(data, val & 0xffff); - data[2] = (val >> 16); -} - -static WEBP_INLINE void PutLE32(uint8_t* const data, uint32_t val) { - PutLE16(data, (int)(val & 0xffff)); - PutLE16(data + 2, (int)(val >> 16)); -} - -// Returns 31 ^ clz(n) = log2(n). This is the default C-implementation, either -// based on table or not. Can be used as fallback if clz() is not available. -#define WEBP_NEED_LOG_TABLE_8BIT -extern const uint8_t WebPLogTable8bit[256]; -static WEBP_INLINE int WebPLog2FloorC(uint32_t n) { - int log_value = 0; - while (n >= 256) { - log_value += 8; - n >>= 8; - } - return log_value + WebPLogTable8bit[n]; -} - -// Returns (int)floor(log2(n)). n must be > 0. -// use GNU builtins where available. -#if defined(__GNUC__) && \ - ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4) -static WEBP_INLINE int BitsLog2Floor(uint32_t n) { - return 31 ^ __builtin_clz(n); -} -#elif defined(_MSC_VER) && _MSC_VER > 1310 && \ - (defined(_M_X64) || defined(_M_IX86)) -#include -#pragma intrinsic(_BitScanReverse) - -static WEBP_INLINE int BitsLog2Floor(uint32_t n) { - unsigned long first_set_bit; - _BitScanReverse(&first_set_bit, n); - return first_set_bit; -} -#else // default: use the C-version. -static WEBP_INLINE int BitsLog2Floor(uint32_t n) { return WebPLog2FloorC(n); } -#endif - -//------------------------------------------------------------------------------ -// Pixel copying. - -struct WebPPicture; - -// Copy width x height pixels from 'src' to 'dst' honoring the strides. -WEBP_EXTERN void WebPCopyPlane(const uint8_t* src, int src_stride, - uint8_t* dst, int dst_stride, - int width, int height); - -// Copy ARGB pixels from 'src' to 'dst' honoring strides. 'src' and 'dst' are -// assumed to be already allocated and using ARGB data. -WEBP_EXTERN void WebPCopyPixels(const struct WebPPicture* const src, - struct WebPPicture* const dst); - -//------------------------------------------------------------------------------ -// Unique colors. - -// Returns count of unique colors in 'pic', assuming pic->use_argb is true. -// If the unique color count is more than MAX_PALETTE_SIZE, returns -// MAX_PALETTE_SIZE+1. -// If 'palette' is not NULL and number of unique colors is less than or equal to -// MAX_PALETTE_SIZE, also outputs the actual unique colors into 'palette'. -// Note: 'palette' is assumed to be an array already allocated with at least -// MAX_PALETTE_SIZE elements. -WEBP_EXTERN int WebPGetColorPalette(const struct WebPPicture* const pic, - uint32_t* const palette); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_UTILS_UTILS_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/webp/decode.h b/Dependencies/FreeImage/Source/LibWebP/src/webp/decode.h deleted file mode 100644 index 6636410..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/webp/decode.h +++ /dev/null @@ -1,494 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Main decoding functions for WebP images. -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_WEBP_DECODE_H_ -#define WEBP_WEBP_DECODE_H_ - -#include "./types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define WEBP_DECODER_ABI_VERSION 0x0208 // MAJOR(8b) + MINOR(8b) - -// Note: forward declaring enumerations is not allowed in (strict) C and C++, -// the types are left here for reference. -// typedef enum VP8StatusCode VP8StatusCode; -// typedef enum WEBP_CSP_MODE WEBP_CSP_MODE; -typedef struct WebPRGBABuffer WebPRGBABuffer; -typedef struct WebPYUVABuffer WebPYUVABuffer; -typedef struct WebPDecBuffer WebPDecBuffer; -typedef struct WebPIDecoder WebPIDecoder; -typedef struct WebPBitstreamFeatures WebPBitstreamFeatures; -typedef struct WebPDecoderOptions WebPDecoderOptions; -typedef struct WebPDecoderConfig WebPDecoderConfig; - -// Return the decoder's version number, packed in hexadecimal using 8bits for -// each of major/minor/revision. E.g: v2.5.7 is 0x020507. -WEBP_EXTERN int WebPGetDecoderVersion(void); - -// Retrieve basic header information: width, height. -// This function will also validate the header, returning true on success, -// false otherwise. '*width' and '*height' are only valid on successful return. -// Pointers 'width' and 'height' can be passed NULL if deemed irrelevant. -WEBP_EXTERN int WebPGetInfo(const uint8_t* data, size_t data_size, - int* width, int* height); - -// Decodes WebP images pointed to by 'data' and returns RGBA samples, along -// with the dimensions in *width and *height. The ordering of samples in -// memory is R, G, B, A, R, G, B, A... in scan order (endian-independent). -// The returned pointer should be deleted calling WebPFree(). -// Returns NULL in case of error. -WEBP_EXTERN uint8_t* WebPDecodeRGBA(const uint8_t* data, size_t data_size, - int* width, int* height); - -// Same as WebPDecodeRGBA, but returning A, R, G, B, A, R, G, B... ordered data. -WEBP_EXTERN uint8_t* WebPDecodeARGB(const uint8_t* data, size_t data_size, - int* width, int* height); - -// Same as WebPDecodeRGBA, but returning B, G, R, A, B, G, R, A... ordered data. -WEBP_EXTERN uint8_t* WebPDecodeBGRA(const uint8_t* data, size_t data_size, - int* width, int* height); - -// Same as WebPDecodeRGBA, but returning R, G, B, R, G, B... ordered data. -// If the bitstream contains transparency, it is ignored. -WEBP_EXTERN uint8_t* WebPDecodeRGB(const uint8_t* data, size_t data_size, - int* width, int* height); - -// Same as WebPDecodeRGB, but returning B, G, R, B, G, R... ordered data. -WEBP_EXTERN uint8_t* WebPDecodeBGR(const uint8_t* data, size_t data_size, - int* width, int* height); - - -// Decode WebP images pointed to by 'data' to Y'UV format(*). The pointer -// returned is the Y samples buffer. Upon return, *u and *v will point to -// the U and V chroma data. These U and V buffers need NOT be passed to -// WebPFree(), unlike the returned Y luma one. The dimension of the U and V -// planes are both (*width + 1) / 2 and (*height + 1)/ 2. -// Upon return, the Y buffer has a stride returned as '*stride', while U and V -// have a common stride returned as '*uv_stride'. -// Return NULL in case of error. -// (*) Also named Y'CbCr. See: http://en.wikipedia.org/wiki/YCbCr -WEBP_EXTERN uint8_t* WebPDecodeYUV(const uint8_t* data, size_t data_size, - int* width, int* height, - uint8_t** u, uint8_t** v, - int* stride, int* uv_stride); - -// Releases memory returned by the WebPDecode*() functions above. -WEBP_EXTERN void WebPFree(void* ptr); - -// These five functions are variants of the above ones, that decode the image -// directly into a pre-allocated buffer 'output_buffer'. The maximum storage -// available in this buffer is indicated by 'output_buffer_size'. If this -// storage is not sufficient (or an error occurred), NULL is returned. -// Otherwise, output_buffer is returned, for convenience. -// The parameter 'output_stride' specifies the distance (in bytes) -// between scanlines. Hence, output_buffer_size is expected to be at least -// output_stride x picture-height. -WEBP_EXTERN uint8_t* WebPDecodeRGBAInto( - const uint8_t* data, size_t data_size, - uint8_t* output_buffer, size_t output_buffer_size, int output_stride); -WEBP_EXTERN uint8_t* WebPDecodeARGBInto( - const uint8_t* data, size_t data_size, - uint8_t* output_buffer, size_t output_buffer_size, int output_stride); -WEBP_EXTERN uint8_t* WebPDecodeBGRAInto( - const uint8_t* data, size_t data_size, - uint8_t* output_buffer, size_t output_buffer_size, int output_stride); - -// RGB and BGR variants. Here too the transparency information, if present, -// will be dropped and ignored. -WEBP_EXTERN uint8_t* WebPDecodeRGBInto( - const uint8_t* data, size_t data_size, - uint8_t* output_buffer, size_t output_buffer_size, int output_stride); -WEBP_EXTERN uint8_t* WebPDecodeBGRInto( - const uint8_t* data, size_t data_size, - uint8_t* output_buffer, size_t output_buffer_size, int output_stride); - -// WebPDecodeYUVInto() is a variant of WebPDecodeYUV() that operates directly -// into pre-allocated luma/chroma plane buffers. This function requires the -// strides to be passed: one for the luma plane and one for each of the -// chroma ones. The size of each plane buffer is passed as 'luma_size', -// 'u_size' and 'v_size' respectively. -// Pointer to the luma plane ('*luma') is returned or NULL if an error occurred -// during decoding (or because some buffers were found to be too small). -WEBP_EXTERN uint8_t* WebPDecodeYUVInto( - const uint8_t* data, size_t data_size, - uint8_t* luma, size_t luma_size, int luma_stride, - uint8_t* u, size_t u_size, int u_stride, - uint8_t* v, size_t v_size, int v_stride); - -//------------------------------------------------------------------------------ -// Output colorspaces and buffer - -// Colorspaces -// Note: the naming describes the byte-ordering of packed samples in memory. -// For instance, MODE_BGRA relates to samples ordered as B,G,R,A,B,G,R,A,... -// Non-capital names (e.g.:MODE_Argb) relates to pre-multiplied RGB channels. -// RGBA-4444 and RGB-565 colorspaces are represented by following byte-order: -// RGBA-4444: [r3 r2 r1 r0 g3 g2 g1 g0], [b3 b2 b1 b0 a3 a2 a1 a0], ... -// RGB-565: [r4 r3 r2 r1 r0 g5 g4 g3], [g2 g1 g0 b4 b3 b2 b1 b0], ... -// In the case WEBP_SWAP_16BITS_CSP is defined, the bytes are swapped for -// these two modes: -// RGBA-4444: [b3 b2 b1 b0 a3 a2 a1 a0], [r3 r2 r1 r0 g3 g2 g1 g0], ... -// RGB-565: [g2 g1 g0 b4 b3 b2 b1 b0], [r4 r3 r2 r1 r0 g5 g4 g3], ... - -typedef enum WEBP_CSP_MODE { - MODE_RGB = 0, MODE_RGBA = 1, - MODE_BGR = 2, MODE_BGRA = 3, - MODE_ARGB = 4, MODE_RGBA_4444 = 5, - MODE_RGB_565 = 6, - // RGB-premultiplied transparent modes (alpha value is preserved) - MODE_rgbA = 7, - MODE_bgrA = 8, - MODE_Argb = 9, - MODE_rgbA_4444 = 10, - // YUV modes must come after RGB ones. - MODE_YUV = 11, MODE_YUVA = 12, // yuv 4:2:0 - MODE_LAST = 13 -} WEBP_CSP_MODE; - -// Some useful macros: -static WEBP_INLINE int WebPIsPremultipliedMode(WEBP_CSP_MODE mode) { - return (mode == MODE_rgbA || mode == MODE_bgrA || mode == MODE_Argb || - mode == MODE_rgbA_4444); -} - -static WEBP_INLINE int WebPIsAlphaMode(WEBP_CSP_MODE mode) { - return (mode == MODE_RGBA || mode == MODE_BGRA || mode == MODE_ARGB || - mode == MODE_RGBA_4444 || mode == MODE_YUVA || - WebPIsPremultipliedMode(mode)); -} - -static WEBP_INLINE int WebPIsRGBMode(WEBP_CSP_MODE mode) { - return (mode < MODE_YUV); -} - -//------------------------------------------------------------------------------ -// WebPDecBuffer: Generic structure for describing the output sample buffer. - -struct WebPRGBABuffer { // view as RGBA - uint8_t* rgba; // pointer to RGBA samples - int stride; // stride in bytes from one scanline to the next. - size_t size; // total size of the *rgba buffer. -}; - -struct WebPYUVABuffer { // view as YUVA - uint8_t* y, *u, *v, *a; // pointer to luma, chroma U/V, alpha samples - int y_stride; // luma stride - int u_stride, v_stride; // chroma strides - int a_stride; // alpha stride - size_t y_size; // luma plane size - size_t u_size, v_size; // chroma planes size - size_t a_size; // alpha-plane size -}; - -// Output buffer -struct WebPDecBuffer { - WEBP_CSP_MODE colorspace; // Colorspace. - int width, height; // Dimensions. - int is_external_memory; // If non-zero, 'internal_memory' pointer is not - // used. If value is '2' or more, the external - // memory is considered 'slow' and multiple - // read/write will be avoided. - union { - WebPRGBABuffer RGBA; - WebPYUVABuffer YUVA; - } u; // Nameless union of buffer parameters. - uint32_t pad[4]; // padding for later use - - uint8_t* private_memory; // Internally allocated memory (only when - // is_external_memory is 0). Should not be used - // externally, but accessed via the buffer union. -}; - -// Internal, version-checked, entry point -WEBP_EXTERN int WebPInitDecBufferInternal(WebPDecBuffer*, int); - -// Initialize the structure as empty. Must be called before any other use. -// Returns false in case of version mismatch -static WEBP_INLINE int WebPInitDecBuffer(WebPDecBuffer* buffer) { - return WebPInitDecBufferInternal(buffer, WEBP_DECODER_ABI_VERSION); -} - -// Free any memory associated with the buffer. Must always be called last. -// Note: doesn't free the 'buffer' structure itself. -WEBP_EXTERN void WebPFreeDecBuffer(WebPDecBuffer* buffer); - -//------------------------------------------------------------------------------ -// Enumeration of the status codes - -typedef enum VP8StatusCode { - VP8_STATUS_OK = 0, - VP8_STATUS_OUT_OF_MEMORY, - VP8_STATUS_INVALID_PARAM, - VP8_STATUS_BITSTREAM_ERROR, - VP8_STATUS_UNSUPPORTED_FEATURE, - VP8_STATUS_SUSPENDED, - VP8_STATUS_USER_ABORT, - VP8_STATUS_NOT_ENOUGH_DATA -} VP8StatusCode; - -//------------------------------------------------------------------------------ -// Incremental decoding -// -// This API allows streamlined decoding of partial data. -// Picture can be incrementally decoded as data become available thanks to the -// WebPIDecoder object. This object can be left in a SUSPENDED state if the -// picture is only partially decoded, pending additional input. -// Code example: -// -// WebPInitDecBuffer(&output_buffer); -// output_buffer.colorspace = mode; -// ... -// WebPIDecoder* idec = WebPINewDecoder(&output_buffer); -// while (additional_data_is_available) { -// // ... (get additional data in some new_data[] buffer) -// status = WebPIAppend(idec, new_data, new_data_size); -// if (status != VP8_STATUS_OK && status != VP8_STATUS_SUSPENDED) { -// break; // an error occurred. -// } -// -// // The above call decodes the current available buffer. -// // Part of the image can now be refreshed by calling -// // WebPIDecGetRGB()/WebPIDecGetYUVA() etc. -// } -// WebPIDelete(idec); - -// Creates a new incremental decoder with the supplied buffer parameter. -// This output_buffer can be passed NULL, in which case a default output buffer -// is used (with MODE_RGB). Otherwise, an internal reference to 'output_buffer' -// is kept, which means that the lifespan of 'output_buffer' must be larger than -// that of the returned WebPIDecoder object. -// The supplied 'output_buffer' content MUST NOT be changed between calls to -// WebPIAppend() or WebPIUpdate() unless 'output_buffer.is_external_memory' is -// not set to 0. In such a case, it is allowed to modify the pointers, size and -// stride of output_buffer.u.RGBA or output_buffer.u.YUVA, provided they remain -// within valid bounds. -// All other fields of WebPDecBuffer MUST remain constant between calls. -// Returns NULL if the allocation failed. -WEBP_EXTERN WebPIDecoder* WebPINewDecoder(WebPDecBuffer* output_buffer); - -// This function allocates and initializes an incremental-decoder object, which -// will output the RGB/A samples specified by 'csp' into a preallocated -// buffer 'output_buffer'. The size of this buffer is at least -// 'output_buffer_size' and the stride (distance in bytes between two scanlines) -// is specified by 'output_stride'. -// Additionally, output_buffer can be passed NULL in which case the output -// buffer will be allocated automatically when the decoding starts. The -// colorspace 'csp' is taken into account for allocating this buffer. All other -// parameters are ignored. -// Returns NULL if the allocation failed, or if some parameters are invalid. -WEBP_EXTERN WebPIDecoder* WebPINewRGB( - WEBP_CSP_MODE csp, - uint8_t* output_buffer, size_t output_buffer_size, int output_stride); - -// This function allocates and initializes an incremental-decoder object, which -// will output the raw luma/chroma samples into a preallocated planes if -// supplied. The luma plane is specified by its pointer 'luma', its size -// 'luma_size' and its stride 'luma_stride'. Similarly, the chroma-u plane -// is specified by the 'u', 'u_size' and 'u_stride' parameters, and the chroma-v -// plane by 'v' and 'v_size'. And same for the alpha-plane. The 'a' pointer -// can be pass NULL in case one is not interested in the transparency plane. -// Conversely, 'luma' can be passed NULL if no preallocated planes are supplied. -// In this case, the output buffer will be automatically allocated (using -// MODE_YUVA) when decoding starts. All parameters are then ignored. -// Returns NULL if the allocation failed or if a parameter is invalid. -WEBP_EXTERN WebPIDecoder* WebPINewYUVA( - uint8_t* luma, size_t luma_size, int luma_stride, - uint8_t* u, size_t u_size, int u_stride, - uint8_t* v, size_t v_size, int v_stride, - uint8_t* a, size_t a_size, int a_stride); - -// Deprecated version of the above, without the alpha plane. -// Kept for backward compatibility. -WEBP_EXTERN WebPIDecoder* WebPINewYUV( - uint8_t* luma, size_t luma_size, int luma_stride, - uint8_t* u, size_t u_size, int u_stride, - uint8_t* v, size_t v_size, int v_stride); - -// Deletes the WebPIDecoder object and associated memory. Must always be called -// if WebPINewDecoder, WebPINewRGB or WebPINewYUV succeeded. -WEBP_EXTERN void WebPIDelete(WebPIDecoder* idec); - -// Copies and decodes the next available data. Returns VP8_STATUS_OK when -// the image is successfully decoded. Returns VP8_STATUS_SUSPENDED when more -// data is expected. Returns error in other cases. -WEBP_EXTERN VP8StatusCode WebPIAppend( - WebPIDecoder* idec, const uint8_t* data, size_t data_size); - -// A variant of the above function to be used when data buffer contains -// partial data from the beginning. In this case data buffer is not copied -// to the internal memory. -// Note that the value of the 'data' pointer can change between calls to -// WebPIUpdate, for instance when the data buffer is resized to fit larger data. -WEBP_EXTERN VP8StatusCode WebPIUpdate( - WebPIDecoder* idec, const uint8_t* data, size_t data_size); - -// Returns the RGB/A image decoded so far. Returns NULL if output params -// are not initialized yet. The RGB/A output type corresponds to the colorspace -// specified during call to WebPINewDecoder() or WebPINewRGB(). -// *last_y is the index of last decoded row in raster scan order. Some pointers -// (*last_y, *width etc.) can be NULL if corresponding information is not -// needed. The values in these pointers are only valid on successful (non-NULL) -// return. -WEBP_EXTERN uint8_t* WebPIDecGetRGB( - const WebPIDecoder* idec, int* last_y, - int* width, int* height, int* stride); - -// Same as above function to get a YUVA image. Returns pointer to the luma -// plane or NULL in case of error. If there is no alpha information -// the alpha pointer '*a' will be returned NULL. -WEBP_EXTERN uint8_t* WebPIDecGetYUVA( - const WebPIDecoder* idec, int* last_y, - uint8_t** u, uint8_t** v, uint8_t** a, - int* width, int* height, int* stride, int* uv_stride, int* a_stride); - -// Deprecated alpha-less version of WebPIDecGetYUVA(): it will ignore the -// alpha information (if present). Kept for backward compatibility. -static WEBP_INLINE uint8_t* WebPIDecGetYUV( - const WebPIDecoder* idec, int* last_y, uint8_t** u, uint8_t** v, - int* width, int* height, int* stride, int* uv_stride) { - return WebPIDecGetYUVA(idec, last_y, u, v, NULL, width, height, - stride, uv_stride, NULL); -} - -// Generic call to retrieve information about the displayable area. -// If non NULL, the left/right/width/height pointers are filled with the visible -// rectangular area so far. -// Returns NULL in case the incremental decoder object is in an invalid state. -// Otherwise returns the pointer to the internal representation. This structure -// is read-only, tied to WebPIDecoder's lifespan and should not be modified. -WEBP_EXTERN const WebPDecBuffer* WebPIDecodedArea( - const WebPIDecoder* idec, int* left, int* top, int* width, int* height); - -//------------------------------------------------------------------------------ -// Advanced decoding parametrization -// -// Code sample for using the advanced decoding API -/* - // A) Init a configuration object - WebPDecoderConfig config; - CHECK(WebPInitDecoderConfig(&config)); - - // B) optional: retrieve the bitstream's features. - CHECK(WebPGetFeatures(data, data_size, &config.input) == VP8_STATUS_OK); - - // C) Adjust 'config', if needed - config.no_fancy_upsampling = 1; - config.output.colorspace = MODE_BGRA; - // etc. - - // Note that you can also make config.output point to an externally - // supplied memory buffer, provided it's big enough to store the decoded - // picture. Otherwise, config.output will just be used to allocate memory - // and store the decoded picture. - - // D) Decode! - CHECK(WebPDecode(data, data_size, &config) == VP8_STATUS_OK); - - // E) Decoded image is now in config.output (and config.output.u.RGBA) - - // F) Reclaim memory allocated in config's object. It's safe to call - // this function even if the memory is external and wasn't allocated - // by WebPDecode(). - WebPFreeDecBuffer(&config.output); -*/ - -// Features gathered from the bitstream -struct WebPBitstreamFeatures { - int width; // Width in pixels, as read from the bitstream. - int height; // Height in pixels, as read from the bitstream. - int has_alpha; // True if the bitstream contains an alpha channel. - int has_animation; // True if the bitstream is an animation. - int format; // 0 = undefined (/mixed), 1 = lossy, 2 = lossless - - uint32_t pad[5]; // padding for later use -}; - -// Internal, version-checked, entry point -WEBP_EXTERN VP8StatusCode WebPGetFeaturesInternal( - const uint8_t*, size_t, WebPBitstreamFeatures*, int); - -// Retrieve features from the bitstream. The *features structure is filled -// with information gathered from the bitstream. -// Returns VP8_STATUS_OK when the features are successfully retrieved. Returns -// VP8_STATUS_NOT_ENOUGH_DATA when more data is needed to retrieve the -// features from headers. Returns error in other cases. -static WEBP_INLINE VP8StatusCode WebPGetFeatures( - const uint8_t* data, size_t data_size, - WebPBitstreamFeatures* features) { - return WebPGetFeaturesInternal(data, data_size, features, - WEBP_DECODER_ABI_VERSION); -} - -// Decoding options -struct WebPDecoderOptions { - int bypass_filtering; // if true, skip the in-loop filtering - int no_fancy_upsampling; // if true, use faster pointwise upsampler - int use_cropping; // if true, cropping is applied _first_ - int crop_left, crop_top; // top-left position for cropping. - // Will be snapped to even values. - int crop_width, crop_height; // dimension of the cropping area - int use_scaling; // if true, scaling is applied _afterward_ - int scaled_width, scaled_height; // final resolution - int use_threads; // if true, use multi-threaded decoding - int dithering_strength; // dithering strength (0=Off, 100=full) - int flip; // flip output vertically - int alpha_dithering_strength; // alpha dithering strength in [0..100] - - uint32_t pad[5]; // padding for later use -}; - -// Main object storing the configuration for advanced decoding. -struct WebPDecoderConfig { - WebPBitstreamFeatures input; // Immutable bitstream features (optional) - WebPDecBuffer output; // Output buffer (can point to external mem) - WebPDecoderOptions options; // Decoding options -}; - -// Internal, version-checked, entry point -WEBP_EXTERN int WebPInitDecoderConfigInternal(WebPDecoderConfig*, int); - -// Initialize the configuration as empty. This function must always be -// called first, unless WebPGetFeatures() is to be called. -// Returns false in case of mismatched version. -static WEBP_INLINE int WebPInitDecoderConfig(WebPDecoderConfig* config) { - return WebPInitDecoderConfigInternal(config, WEBP_DECODER_ABI_VERSION); -} - -// Instantiate a new incremental decoder object with the requested -// configuration. The bitstream can be passed using 'data' and 'data_size' -// parameter, in which case the features will be parsed and stored into -// config->input. Otherwise, 'data' can be NULL and no parsing will occur. -// Note that 'config' can be NULL too, in which case a default configuration -// is used. If 'config' is not NULL, it must outlive the WebPIDecoder object -// as some references to its fields will be used. No internal copy of 'config' -// is made. -// The return WebPIDecoder object must always be deleted calling WebPIDelete(). -// Returns NULL in case of error (and config->status will then reflect -// the error condition, if available). -WEBP_EXTERN WebPIDecoder* WebPIDecode(const uint8_t* data, size_t data_size, - WebPDecoderConfig* config); - -// Non-incremental version. This version decodes the full data at once, taking -// 'config' into account. Returns decoding status (which should be VP8_STATUS_OK -// if the decoding was successful). Note that 'config' cannot be NULL. -WEBP_EXTERN VP8StatusCode WebPDecode(const uint8_t* data, size_t data_size, - WebPDecoderConfig* config); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_WEBP_DECODE_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/webp/demux.h b/Dependencies/FreeImage/Source/LibWebP/src/webp/demux.h deleted file mode 100644 index 2f1580d..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/webp/demux.h +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Demux API. -// Enables extraction of image and extended format data from WebP files. - -// Code Example: Demuxing WebP data to extract all the frames, ICC profile -// and EXIF/XMP metadata. -/* - WebPDemuxer* demux = WebPDemux(&webp_data); - - uint32_t width = WebPDemuxGetI(demux, WEBP_FF_CANVAS_WIDTH); - uint32_t height = WebPDemuxGetI(demux, WEBP_FF_CANVAS_HEIGHT); - // ... (Get information about the features present in the WebP file). - uint32_t flags = WebPDemuxGetI(demux, WEBP_FF_FORMAT_FLAGS); - - // ... (Iterate over all frames). - WebPIterator iter; - if (WebPDemuxGetFrame(demux, 1, &iter)) { - do { - // ... (Consume 'iter'; e.g. Decode 'iter.fragment' with WebPDecode(), - // ... and get other frame properties like width, height, offsets etc. - // ... see 'struct WebPIterator' below for more info). - } while (WebPDemuxNextFrame(&iter)); - WebPDemuxReleaseIterator(&iter); - } - - // ... (Extract metadata). - WebPChunkIterator chunk_iter; - if (flags & ICCP_FLAG) WebPDemuxGetChunk(demux, "ICCP", 1, &chunk_iter); - // ... (Consume the ICC profile in 'chunk_iter.chunk'). - WebPDemuxReleaseChunkIterator(&chunk_iter); - if (flags & EXIF_FLAG) WebPDemuxGetChunk(demux, "EXIF", 1, &chunk_iter); - // ... (Consume the EXIF metadata in 'chunk_iter.chunk'). - WebPDemuxReleaseChunkIterator(&chunk_iter); - if (flags & XMP_FLAG) WebPDemuxGetChunk(demux, "XMP ", 1, &chunk_iter); - // ... (Consume the XMP metadata in 'chunk_iter.chunk'). - WebPDemuxReleaseChunkIterator(&chunk_iter); - WebPDemuxDelete(demux); -*/ - -#ifndef WEBP_WEBP_DEMUX_H_ -#define WEBP_WEBP_DEMUX_H_ - -#include "./decode.h" // for WEBP_CSP_MODE -#include "./mux_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define WEBP_DEMUX_ABI_VERSION 0x0107 // MAJOR(8b) + MINOR(8b) - -// Note: forward declaring enumerations is not allowed in (strict) C and C++, -// the types are left here for reference. -// typedef enum WebPDemuxState WebPDemuxState; -// typedef enum WebPFormatFeature WebPFormatFeature; -typedef struct WebPDemuxer WebPDemuxer; -typedef struct WebPIterator WebPIterator; -typedef struct WebPChunkIterator WebPChunkIterator; -typedef struct WebPAnimInfo WebPAnimInfo; -typedef struct WebPAnimDecoderOptions WebPAnimDecoderOptions; - -//------------------------------------------------------------------------------ - -// Returns the version number of the demux library, packed in hexadecimal using -// 8bits for each of major/minor/revision. E.g: v2.5.7 is 0x020507. -WEBP_EXTERN int WebPGetDemuxVersion(void); - -//------------------------------------------------------------------------------ -// Life of a Demux object - -typedef enum WebPDemuxState { - WEBP_DEMUX_PARSE_ERROR = -1, // An error occurred while parsing. - WEBP_DEMUX_PARSING_HEADER = 0, // Not enough data to parse full header. - WEBP_DEMUX_PARSED_HEADER = 1, // Header parsing complete, - // data may be available. - WEBP_DEMUX_DONE = 2 // Entire file has been parsed. -} WebPDemuxState; - -// Internal, version-checked, entry point -WEBP_EXTERN WebPDemuxer* WebPDemuxInternal( - const WebPData*, int, WebPDemuxState*, int); - -// Parses the full WebP file given by 'data'. For single images the WebP file -// header alone or the file header and the chunk header may be absent. -// Returns a WebPDemuxer object on successful parse, NULL otherwise. -static WEBP_INLINE WebPDemuxer* WebPDemux(const WebPData* data) { - return WebPDemuxInternal(data, 0, NULL, WEBP_DEMUX_ABI_VERSION); -} - -// Parses the possibly incomplete WebP file given by 'data'. -// If 'state' is non-NULL it will be set to indicate the status of the demuxer. -// Returns NULL in case of error or if there isn't enough data to start parsing; -// and a WebPDemuxer object on successful parse. -// Note that WebPDemuxer keeps internal pointers to 'data' memory segment. -// If this data is volatile, the demuxer object should be deleted (by calling -// WebPDemuxDelete()) and WebPDemuxPartial() called again on the new data. -// This is usually an inexpensive operation. -static WEBP_INLINE WebPDemuxer* WebPDemuxPartial( - const WebPData* data, WebPDemuxState* state) { - return WebPDemuxInternal(data, 1, state, WEBP_DEMUX_ABI_VERSION); -} - -// Frees memory associated with 'dmux'. -WEBP_EXTERN void WebPDemuxDelete(WebPDemuxer* dmux); - -//------------------------------------------------------------------------------ -// Data/information extraction. - -typedef enum WebPFormatFeature { - WEBP_FF_FORMAT_FLAGS, // bit-wise combination of WebPFeatureFlags - // corresponding to the 'VP8X' chunk (if present). - WEBP_FF_CANVAS_WIDTH, - WEBP_FF_CANVAS_HEIGHT, - WEBP_FF_LOOP_COUNT, // only relevant for animated file - WEBP_FF_BACKGROUND_COLOR, // idem. - WEBP_FF_FRAME_COUNT // Number of frames present in the demux object. - // In case of a partial demux, this is the number - // of frames seen so far, with the last frame - // possibly being partial. -} WebPFormatFeature; - -// Get the 'feature' value from the 'dmux'. -// NOTE: values are only valid if WebPDemux() was used or WebPDemuxPartial() -// returned a state > WEBP_DEMUX_PARSING_HEADER. -// If 'feature' is WEBP_FF_FORMAT_FLAGS, the returned value is a bit-wise -// combination of WebPFeatureFlags values. -// If 'feature' is WEBP_FF_LOOP_COUNT, WEBP_FF_BACKGROUND_COLOR, the returned -// value is only meaningful if the bitstream is animated. -WEBP_EXTERN uint32_t WebPDemuxGetI( - const WebPDemuxer* dmux, WebPFormatFeature feature); - -//------------------------------------------------------------------------------ -// Frame iteration. - -struct WebPIterator { - int frame_num; - int num_frames; // equivalent to WEBP_FF_FRAME_COUNT. - int x_offset, y_offset; // offset relative to the canvas. - int width, height; // dimensions of this frame. - int duration; // display duration in milliseconds. - WebPMuxAnimDispose dispose_method; // dispose method for the frame. - int complete; // true if 'fragment' contains a full frame. partial images - // may still be decoded with the WebP incremental decoder. - WebPData fragment; // The frame given by 'frame_num'. Note for historical - // reasons this is called a fragment. - int has_alpha; // True if the frame contains transparency. - WebPMuxAnimBlend blend_method; // Blend operation for the frame. - - uint32_t pad[2]; // padding for later use. - void* private_; // for internal use only. -}; - -// Retrieves frame 'frame_number' from 'dmux'. -// 'iter->fragment' points to the frame on return from this function. -// Setting 'frame_number' equal to 0 will return the last frame of the image. -// Returns false if 'dmux' is NULL or frame 'frame_number' is not present. -// Call WebPDemuxReleaseIterator() when use of the iterator is complete. -// NOTE: 'dmux' must persist for the lifetime of 'iter'. -WEBP_EXTERN int WebPDemuxGetFrame( - const WebPDemuxer* dmux, int frame_number, WebPIterator* iter); - -// Sets 'iter->fragment' to point to the next ('iter->frame_num' + 1) or -// previous ('iter->frame_num' - 1) frame. These functions do not loop. -// Returns true on success, false otherwise. -WEBP_EXTERN int WebPDemuxNextFrame(WebPIterator* iter); -WEBP_EXTERN int WebPDemuxPrevFrame(WebPIterator* iter); - -// Releases any memory associated with 'iter'. -// Must be called before any subsequent calls to WebPDemuxGetChunk() on the same -// iter. Also, must be called before destroying the associated WebPDemuxer with -// WebPDemuxDelete(). -WEBP_EXTERN void WebPDemuxReleaseIterator(WebPIterator* iter); - -//------------------------------------------------------------------------------ -// Chunk iteration. - -struct WebPChunkIterator { - // The current and total number of chunks with the fourcc given to - // WebPDemuxGetChunk(). - int chunk_num; - int num_chunks; - WebPData chunk; // The payload of the chunk. - - uint32_t pad[6]; // padding for later use - void* private_; -}; - -// Retrieves the 'chunk_number' instance of the chunk with id 'fourcc' from -// 'dmux'. -// 'fourcc' is a character array containing the fourcc of the chunk to return, -// e.g., "ICCP", "XMP ", "EXIF", etc. -// Setting 'chunk_number' equal to 0 will return the last chunk in a set. -// Returns true if the chunk is found, false otherwise. Image related chunk -// payloads are accessed through WebPDemuxGetFrame() and related functions. -// Call WebPDemuxReleaseChunkIterator() when use of the iterator is complete. -// NOTE: 'dmux' must persist for the lifetime of the iterator. -WEBP_EXTERN int WebPDemuxGetChunk(const WebPDemuxer* dmux, - const char fourcc[4], int chunk_number, - WebPChunkIterator* iter); - -// Sets 'iter->chunk' to point to the next ('iter->chunk_num' + 1) or previous -// ('iter->chunk_num' - 1) chunk. These functions do not loop. -// Returns true on success, false otherwise. -WEBP_EXTERN int WebPDemuxNextChunk(WebPChunkIterator* iter); -WEBP_EXTERN int WebPDemuxPrevChunk(WebPChunkIterator* iter); - -// Releases any memory associated with 'iter'. -// Must be called before destroying the associated WebPDemuxer with -// WebPDemuxDelete(). -WEBP_EXTERN void WebPDemuxReleaseChunkIterator(WebPChunkIterator* iter); - -//------------------------------------------------------------------------------ -// WebPAnimDecoder API -// -// This API allows decoding (possibly) animated WebP images. -// -// Code Example: -/* - WebPAnimDecoderOptions dec_options; - WebPAnimDecoderOptionsInit(&dec_options); - // Tune 'dec_options' as needed. - WebPAnimDecoder* dec = WebPAnimDecoderNew(webp_data, &dec_options); - WebPAnimInfo anim_info; - WebPAnimDecoderGetInfo(dec, &anim_info); - for (uint32_t i = 0; i < anim_info.loop_count; ++i) { - while (WebPAnimDecoderHasMoreFrames(dec)) { - uint8_t* buf; - int timestamp; - WebPAnimDecoderGetNext(dec, &buf, ×tamp); - // ... (Render 'buf' based on 'timestamp'). - // ... (Do NOT free 'buf', as it is owned by 'dec'). - } - WebPAnimDecoderReset(dec); - } - const WebPDemuxer* demuxer = WebPAnimDecoderGetDemuxer(dec); - // ... (Do something using 'demuxer'; e.g. get EXIF/XMP/ICC data). - WebPAnimDecoderDelete(dec); -*/ - -typedef struct WebPAnimDecoder WebPAnimDecoder; // Main opaque object. - -// Global options. -struct WebPAnimDecoderOptions { - // Output colorspace. Only the following modes are supported: - // MODE_RGBA, MODE_BGRA, MODE_rgbA and MODE_bgrA. - WEBP_CSP_MODE color_mode; - int use_threads; // If true, use multi-threaded decoding. - uint32_t padding[7]; // Padding for later use. -}; - -// Internal, version-checked, entry point. -WEBP_EXTERN int WebPAnimDecoderOptionsInitInternal( - WebPAnimDecoderOptions*, int); - -// Should always be called, to initialize a fresh WebPAnimDecoderOptions -// structure before modification. Returns false in case of version mismatch. -// WebPAnimDecoderOptionsInit() must have succeeded before using the -// 'dec_options' object. -static WEBP_INLINE int WebPAnimDecoderOptionsInit( - WebPAnimDecoderOptions* dec_options) { - return WebPAnimDecoderOptionsInitInternal(dec_options, - WEBP_DEMUX_ABI_VERSION); -} - -// Internal, version-checked, entry point. -WEBP_EXTERN WebPAnimDecoder* WebPAnimDecoderNewInternal( - const WebPData*, const WebPAnimDecoderOptions*, int); - -// Creates and initializes a WebPAnimDecoder object. -// Parameters: -// webp_data - (in) WebP bitstream. This should remain unchanged during the -// lifetime of the output WebPAnimDecoder object. -// dec_options - (in) decoding options. Can be passed NULL to choose -// reasonable defaults (in particular, color mode MODE_RGBA -// will be picked). -// Returns: -// A pointer to the newly created WebPAnimDecoder object, or NULL in case of -// parsing error, invalid option or memory error. -static WEBP_INLINE WebPAnimDecoder* WebPAnimDecoderNew( - const WebPData* webp_data, const WebPAnimDecoderOptions* dec_options) { - return WebPAnimDecoderNewInternal(webp_data, dec_options, - WEBP_DEMUX_ABI_VERSION); -} - -// Global information about the animation.. -struct WebPAnimInfo { - uint32_t canvas_width; - uint32_t canvas_height; - uint32_t loop_count; - uint32_t bgcolor; - uint32_t frame_count; - uint32_t pad[4]; // padding for later use -}; - -// Get global information about the animation. -// Parameters: -// dec - (in) decoder instance to get information from. -// info - (out) global information fetched from the animation. -// Returns: -// True on success. -WEBP_EXTERN int WebPAnimDecoderGetInfo(const WebPAnimDecoder* dec, - WebPAnimInfo* info); - -// Fetch the next frame from 'dec' based on options supplied to -// WebPAnimDecoderNew(). This will be a fully reconstructed canvas of size -// 'canvas_width * 4 * canvas_height', and not just the frame sub-rectangle. The -// returned buffer 'buf' is valid only until the next call to -// WebPAnimDecoderGetNext(), WebPAnimDecoderReset() or WebPAnimDecoderDelete(). -// Parameters: -// dec - (in/out) decoder instance from which the next frame is to be fetched. -// buf - (out) decoded frame. -// timestamp - (out) timestamp of the frame in milliseconds. -// Returns: -// False if any of the arguments are NULL, or if there is a parsing or -// decoding error, or if there are no more frames. Otherwise, returns true. -WEBP_EXTERN int WebPAnimDecoderGetNext(WebPAnimDecoder* dec, - uint8_t** buf, int* timestamp); - -// Check if there are more frames left to decode. -// Parameters: -// dec - (in) decoder instance to be checked. -// Returns: -// True if 'dec' is not NULL and some frames are yet to be decoded. -// Otherwise, returns false. -WEBP_EXTERN int WebPAnimDecoderHasMoreFrames(const WebPAnimDecoder* dec); - -// Resets the WebPAnimDecoder object, so that next call to -// WebPAnimDecoderGetNext() will restart decoding from 1st frame. This would be -// helpful when all frames need to be decoded multiple times (e.g. -// info.loop_count times) without destroying and recreating the 'dec' object. -// Parameters: -// dec - (in/out) decoder instance to be reset -WEBP_EXTERN void WebPAnimDecoderReset(WebPAnimDecoder* dec); - -// Grab the internal demuxer object. -// Getting the demuxer object can be useful if one wants to use operations only -// available through demuxer; e.g. to get XMP/EXIF/ICC metadata. The returned -// demuxer object is owned by 'dec' and is valid only until the next call to -// WebPAnimDecoderDelete(). -// -// Parameters: -// dec - (in) decoder instance from which the demuxer object is to be fetched. -WEBP_EXTERN const WebPDemuxer* WebPAnimDecoderGetDemuxer( - const WebPAnimDecoder* dec); - -// Deletes the WebPAnimDecoder object. -// Parameters: -// dec - (in/out) decoder instance to be deleted -WEBP_EXTERN void WebPAnimDecoderDelete(WebPAnimDecoder* dec); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_WEBP_DEMUX_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/webp/encode.h b/Dependencies/FreeImage/Source/LibWebP/src/webp/encode.h deleted file mode 100644 index 7cd0f44..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/webp/encode.h +++ /dev/null @@ -1,545 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// WebP encoder: main interface -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_WEBP_ENCODE_H_ -#define WEBP_WEBP_ENCODE_H_ - -#include "./types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define WEBP_ENCODER_ABI_VERSION 0x020e // MAJOR(8b) + MINOR(8b) - -// Note: forward declaring enumerations is not allowed in (strict) C and C++, -// the types are left here for reference. -// typedef enum WebPImageHint WebPImageHint; -// typedef enum WebPEncCSP WebPEncCSP; -// typedef enum WebPPreset WebPPreset; -// typedef enum WebPEncodingError WebPEncodingError; -typedef struct WebPConfig WebPConfig; -typedef struct WebPPicture WebPPicture; // main structure for I/O -typedef struct WebPAuxStats WebPAuxStats; -typedef struct WebPMemoryWriter WebPMemoryWriter; - -// Return the encoder's version number, packed in hexadecimal using 8bits for -// each of major/minor/revision. E.g: v2.5.7 is 0x020507. -WEBP_EXTERN int WebPGetEncoderVersion(void); - -//------------------------------------------------------------------------------ -// One-stop-shop call! No questions asked: - -// Returns the size of the compressed data (pointed to by *output), or 0 if -// an error occurred. The compressed data must be released by the caller -// using the call 'WebPFree(*output)'. -// These functions compress using the lossy format, and the quality_factor -// can go from 0 (smaller output, lower quality) to 100 (best quality, -// larger output). -WEBP_EXTERN size_t WebPEncodeRGB(const uint8_t* rgb, - int width, int height, int stride, - float quality_factor, uint8_t** output); -WEBP_EXTERN size_t WebPEncodeBGR(const uint8_t* bgr, - int width, int height, int stride, - float quality_factor, uint8_t** output); -WEBP_EXTERN size_t WebPEncodeRGBA(const uint8_t* rgba, - int width, int height, int stride, - float quality_factor, uint8_t** output); -WEBP_EXTERN size_t WebPEncodeBGRA(const uint8_t* bgra, - int width, int height, int stride, - float quality_factor, uint8_t** output); - -// These functions are the equivalent of the above, but compressing in a -// lossless manner. Files are usually larger than lossy format, but will -// not suffer any compression loss. -WEBP_EXTERN size_t WebPEncodeLosslessRGB(const uint8_t* rgb, - int width, int height, int stride, - uint8_t** output); -WEBP_EXTERN size_t WebPEncodeLosslessBGR(const uint8_t* bgr, - int width, int height, int stride, - uint8_t** output); -WEBP_EXTERN size_t WebPEncodeLosslessRGBA(const uint8_t* rgba, - int width, int height, int stride, - uint8_t** output); -WEBP_EXTERN size_t WebPEncodeLosslessBGRA(const uint8_t* bgra, - int width, int height, int stride, - uint8_t** output); - -// Releases memory returned by the WebPEncode*() functions above. -WEBP_EXTERN void WebPFree(void* ptr); - -//------------------------------------------------------------------------------ -// Coding parameters - -// Image characteristics hint for the underlying encoder. -typedef enum WebPImageHint { - WEBP_HINT_DEFAULT = 0, // default preset. - WEBP_HINT_PICTURE, // digital picture, like portrait, inner shot - WEBP_HINT_PHOTO, // outdoor photograph, with natural lighting - WEBP_HINT_GRAPH, // Discrete tone image (graph, map-tile etc). - WEBP_HINT_LAST -} WebPImageHint; - -// Compression parameters. -struct WebPConfig { - int lossless; // Lossless encoding (0=lossy(default), 1=lossless). - float quality; // between 0 and 100. For lossy, 0 gives the smallest - // size and 100 the largest. For lossless, this - // parameter is the amount of effort put into the - // compression: 0 is the fastest but gives larger - // files compared to the slowest, but best, 100. - int method; // quality/speed trade-off (0=fast, 6=slower-better) - - WebPImageHint image_hint; // Hint for image type (lossless only for now). - - int target_size; // if non-zero, set the desired target size in bytes. - // Takes precedence over the 'compression' parameter. - float target_PSNR; // if non-zero, specifies the minimal distortion to - // try to achieve. Takes precedence over target_size. - int segments; // maximum number of segments to use, in [1..4] - int sns_strength; // Spatial Noise Shaping. 0=off, 100=maximum. - int filter_strength; // range: [0 = off .. 100 = strongest] - int filter_sharpness; // range: [0 = off .. 7 = least sharp] - int filter_type; // filtering type: 0 = simple, 1 = strong (only used - // if filter_strength > 0 or autofilter > 0) - int autofilter; // Auto adjust filter's strength [0 = off, 1 = on] - int alpha_compression; // Algorithm for encoding the alpha plane (0 = none, - // 1 = compressed with WebP lossless). Default is 1. - int alpha_filtering; // Predictive filtering method for alpha plane. - // 0: none, 1: fast, 2: best. Default if 1. - int alpha_quality; // Between 0 (smallest size) and 100 (lossless). - // Default is 100. - int pass; // number of entropy-analysis passes (in [1..10]). - - int show_compressed; // if true, export the compressed picture back. - // In-loop filtering is not applied. - int preprocessing; // preprocessing filter: - // 0=none, 1=segment-smooth, 2=pseudo-random dithering - int partitions; // log2(number of token partitions) in [0..3]. Default - // is set to 0 for easier progressive decoding. - int partition_limit; // quality degradation allowed to fit the 512k limit - // on prediction modes coding (0: no degradation, - // 100: maximum possible degradation). - int emulate_jpeg_size; // If true, compression parameters will be remapped - // to better match the expected output size from - // JPEG compression. Generally, the output size will - // be similar but the degradation will be lower. - int thread_level; // If non-zero, try and use multi-threaded encoding. - int low_memory; // If set, reduce memory usage (but increase CPU use). - - int near_lossless; // Near lossless encoding [0 = max loss .. 100 = off - // (default)]. - int exact; // if non-zero, preserve the exact RGB values under - // transparent area. Otherwise, discard this invisible - // RGB information for better compression. The default - // value is 0. - - int use_delta_palette; // reserved for future lossless feature - int use_sharp_yuv; // if needed, use sharp (and slow) RGB->YUV conversion - - uint32_t pad[2]; // padding for later use -}; - -// Enumerate some predefined settings for WebPConfig, depending on the type -// of source picture. These presets are used when calling WebPConfigPreset(). -typedef enum WebPPreset { - WEBP_PRESET_DEFAULT = 0, // default preset. - WEBP_PRESET_PICTURE, // digital picture, like portrait, inner shot - WEBP_PRESET_PHOTO, // outdoor photograph, with natural lighting - WEBP_PRESET_DRAWING, // hand or line drawing, with high-contrast details - WEBP_PRESET_ICON, // small-sized colorful images - WEBP_PRESET_TEXT // text-like -} WebPPreset; - -// Internal, version-checked, entry point -WEBP_EXTERN int WebPConfigInitInternal(WebPConfig*, WebPPreset, float, int); - -// Should always be called, to initialize a fresh WebPConfig structure before -// modification. Returns false in case of version mismatch. WebPConfigInit() -// must have succeeded before using the 'config' object. -// Note that the default values are lossless=0 and quality=75. -static WEBP_INLINE int WebPConfigInit(WebPConfig* config) { - return WebPConfigInitInternal(config, WEBP_PRESET_DEFAULT, 75.f, - WEBP_ENCODER_ABI_VERSION); -} - -// This function will initialize the configuration according to a predefined -// set of parameters (referred to by 'preset') and a given quality factor. -// This function can be called as a replacement to WebPConfigInit(). Will -// return false in case of error. -static WEBP_INLINE int WebPConfigPreset(WebPConfig* config, - WebPPreset preset, float quality) { - return WebPConfigInitInternal(config, preset, quality, - WEBP_ENCODER_ABI_VERSION); -} - -// Activate the lossless compression mode with the desired efficiency level -// between 0 (fastest, lowest compression) and 9 (slower, best compression). -// A good default level is '6', providing a fair tradeoff between compression -// speed and final compressed size. -// This function will overwrite several fields from config: 'method', 'quality' -// and 'lossless'. Returns false in case of parameter error. -WEBP_EXTERN int WebPConfigLosslessPreset(WebPConfig* config, int level); - -// Returns true if 'config' is non-NULL and all configuration parameters are -// within their valid ranges. -WEBP_EXTERN int WebPValidateConfig(const WebPConfig* config); - -//------------------------------------------------------------------------------ -// Input / Output -// Structure for storing auxiliary statistics. - -struct WebPAuxStats { - int coded_size; // final size - - float PSNR[5]; // peak-signal-to-noise ratio for Y/U/V/All/Alpha - int block_count[3]; // number of intra4/intra16/skipped macroblocks - int header_bytes[2]; // approximate number of bytes spent for header - // and mode-partition #0 - int residual_bytes[3][4]; // approximate number of bytes spent for - // DC/AC/uv coefficients for each (0..3) segments. - int segment_size[4]; // number of macroblocks in each segments - int segment_quant[4]; // quantizer values for each segments - int segment_level[4]; // filtering strength for each segments [0..63] - - int alpha_data_size; // size of the transparency data - int layer_data_size; // size of the enhancement layer data - - // lossless encoder statistics - uint32_t lossless_features; // bit0:predictor bit1:cross-color transform - // bit2:subtract-green bit3:color indexing - int histogram_bits; // number of precision bits of histogram - int transform_bits; // precision bits for transform - int cache_bits; // number of bits for color cache lookup - int palette_size; // number of color in palette, if used - int lossless_size; // final lossless size - int lossless_hdr_size; // lossless header (transform, huffman etc) size - int lossless_data_size; // lossless image data size - - uint32_t pad[2]; // padding for later use -}; - -// Signature for output function. Should return true if writing was successful. -// data/data_size is the segment of data to write, and 'picture' is for -// reference (and so one can make use of picture->custom_ptr). -typedef int (*WebPWriterFunction)(const uint8_t* data, size_t data_size, - const WebPPicture* picture); - -// WebPMemoryWrite: a special WebPWriterFunction that writes to memory using -// the following WebPMemoryWriter object (to be set as a custom_ptr). -struct WebPMemoryWriter { - uint8_t* mem; // final buffer (of size 'max_size', larger than 'size'). - size_t size; // final size - size_t max_size; // total capacity - uint32_t pad[1]; // padding for later use -}; - -// The following must be called first before any use. -WEBP_EXTERN void WebPMemoryWriterInit(WebPMemoryWriter* writer); - -// The following must be called to deallocate writer->mem memory. The 'writer' -// object itself is not deallocated. -WEBP_EXTERN void WebPMemoryWriterClear(WebPMemoryWriter* writer); -// The custom writer to be used with WebPMemoryWriter as custom_ptr. Upon -// completion, writer.mem and writer.size will hold the coded data. -// writer.mem must be freed by calling WebPMemoryWriterClear. -WEBP_EXTERN int WebPMemoryWrite(const uint8_t* data, size_t data_size, - const WebPPicture* picture); - -// Progress hook, called from time to time to report progress. It can return -// false to request an abort of the encoding process, or true otherwise if -// everything is OK. -typedef int (*WebPProgressHook)(int percent, const WebPPicture* picture); - -// Color spaces. -typedef enum WebPEncCSP { - // chroma sampling - WEBP_YUV420 = 0, // 4:2:0 - WEBP_YUV420A = 4, // alpha channel variant - WEBP_CSP_UV_MASK = 3, // bit-mask to get the UV sampling factors - WEBP_CSP_ALPHA_BIT = 4 // bit that is set if alpha is present -} WebPEncCSP; - -// Encoding error conditions. -typedef enum WebPEncodingError { - VP8_ENC_OK = 0, - VP8_ENC_ERROR_OUT_OF_MEMORY, // memory error allocating objects - VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY, // memory error while flushing bits - VP8_ENC_ERROR_NULL_PARAMETER, // a pointer parameter is NULL - VP8_ENC_ERROR_INVALID_CONFIGURATION, // configuration is invalid - VP8_ENC_ERROR_BAD_DIMENSION, // picture has invalid width/height - VP8_ENC_ERROR_PARTITION0_OVERFLOW, // partition is bigger than 512k - VP8_ENC_ERROR_PARTITION_OVERFLOW, // partition is bigger than 16M - VP8_ENC_ERROR_BAD_WRITE, // error while flushing bytes - VP8_ENC_ERROR_FILE_TOO_BIG, // file is bigger than 4G - VP8_ENC_ERROR_USER_ABORT, // abort request by user - VP8_ENC_ERROR_LAST // list terminator. always last. -} WebPEncodingError; - -// maximum width/height allowed (inclusive), in pixels -#define WEBP_MAX_DIMENSION 16383 - -// Main exchange structure (input samples, output bytes, statistics) -struct WebPPicture { - // INPUT - ////////////// - // Main flag for encoder selecting between ARGB or YUV input. - // It is recommended to use ARGB input (*argb, argb_stride) for lossless - // compression, and YUV input (*y, *u, *v, etc.) for lossy compression - // since these are the respective native colorspace for these formats. - int use_argb; - - // YUV input (mostly used for input to lossy compression) - WebPEncCSP colorspace; // colorspace: should be YUV420 for now (=Y'CbCr). - int width, height; // dimensions (less or equal to WEBP_MAX_DIMENSION) - uint8_t *y, *u, *v; // pointers to luma/chroma planes. - int y_stride, uv_stride; // luma/chroma strides. - uint8_t* a; // pointer to the alpha plane - int a_stride; // stride of the alpha plane - uint32_t pad1[2]; // padding for later use - - // ARGB input (mostly used for input to lossless compression) - uint32_t* argb; // Pointer to argb (32 bit) plane. - int argb_stride; // This is stride in pixels units, not bytes. - uint32_t pad2[3]; // padding for later use - - // OUTPUT - /////////////// - // Byte-emission hook, to store compressed bytes as they are ready. - WebPWriterFunction writer; // can be NULL - void* custom_ptr; // can be used by the writer. - - // map for extra information (only for lossy compression mode) - int extra_info_type; // 1: intra type, 2: segment, 3: quant - // 4: intra-16 prediction mode, - // 5: chroma prediction mode, - // 6: bit cost, 7: distortion - uint8_t* extra_info; // if not NULL, points to an array of size - // ((width + 15) / 16) * ((height + 15) / 16) that - // will be filled with a macroblock map, depending - // on extra_info_type. - - // STATS AND REPORTS - /////////////////////////// - // Pointer to side statistics (updated only if not NULL) - WebPAuxStats* stats; - - // Error code for the latest error encountered during encoding - WebPEncodingError error_code; - - // If not NULL, report progress during encoding. - WebPProgressHook progress_hook; - - void* user_data; // this field is free to be set to any value and - // used during callbacks (like progress-report e.g.). - - uint32_t pad3[3]; // padding for later use - - // Unused for now - uint8_t *pad4, *pad5; - uint32_t pad6[8]; // padding for later use - - // PRIVATE FIELDS - //////////////////// - void* memory_; // row chunk of memory for yuva planes - void* memory_argb_; // and for argb too. - void* pad7[2]; // padding for later use -}; - -// Internal, version-checked, entry point -WEBP_EXTERN int WebPPictureInitInternal(WebPPicture*, int); - -// Should always be called, to initialize the structure. Returns false in case -// of version mismatch. WebPPictureInit() must have succeeded before using the -// 'picture' object. -// Note that, by default, use_argb is false and colorspace is WEBP_YUV420. -static WEBP_INLINE int WebPPictureInit(WebPPicture* picture) { - return WebPPictureInitInternal(picture, WEBP_ENCODER_ABI_VERSION); -} - -//------------------------------------------------------------------------------ -// WebPPicture utils - -// Convenience allocation / deallocation based on picture->width/height: -// Allocate y/u/v buffers as per colorspace/width/height specification. -// Note! This function will free the previous buffer if needed. -// Returns false in case of memory error. -WEBP_EXTERN int WebPPictureAlloc(WebPPicture* picture); - -// Release the memory allocated by WebPPictureAlloc() or WebPPictureImport*(). -// Note that this function does _not_ free the memory used by the 'picture' -// object itself. -// Besides memory (which is reclaimed) all other fields of 'picture' are -// preserved. -WEBP_EXTERN void WebPPictureFree(WebPPicture* picture); - -// Copy the pixels of *src into *dst, using WebPPictureAlloc. Upon return, *dst -// will fully own the copied pixels (this is not a view). The 'dst' picture need -// not be initialized as its content is overwritten. -// Returns false in case of memory allocation error. -WEBP_EXTERN int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst); - -// Compute the single distortion for packed planes of samples. -// 'src' will be compared to 'ref', and the raw distortion stored into -// '*distortion'. The refined metric (log(MSE), log(1 - ssim),...' will be -// stored in '*result'. -// 'x_step' is the horizontal stride (in bytes) between samples. -// 'src/ref_stride' is the byte distance between rows. -// Returns false in case of error (bad parameter, memory allocation error, ...). -WEBP_EXTERN int WebPPlaneDistortion(const uint8_t* src, size_t src_stride, - const uint8_t* ref, size_t ref_stride, - int width, int height, - size_t x_step, - int type, // 0 = PSNR, 1 = SSIM, 2 = LSIM - float* distortion, float* result); - -// Compute PSNR, SSIM or LSIM distortion metric between two pictures. Results -// are in dB, stored in result[] in the B/G/R/A/All order. The distortion is -// always performed using ARGB samples. Hence if the input is YUV(A), the -// picture will be internally converted to ARGB (just for the measurement). -// Warning: this function is rather CPU-intensive. -WEBP_EXTERN int WebPPictureDistortion( - const WebPPicture* src, const WebPPicture* ref, - int metric_type, // 0 = PSNR, 1 = SSIM, 2 = LSIM - float result[5]); - -// self-crops a picture to the rectangle defined by top/left/width/height. -// Returns false in case of memory allocation error, or if the rectangle is -// outside of the source picture. -// The rectangle for the view is defined by the top-left corner pixel -// coordinates (left, top) as well as its width and height. This rectangle -// must be fully be comprised inside the 'src' source picture. If the source -// picture uses the YUV420 colorspace, the top and left coordinates will be -// snapped to even values. -WEBP_EXTERN int WebPPictureCrop(WebPPicture* picture, - int left, int top, int width, int height); - -// Extracts a view from 'src' picture into 'dst'. The rectangle for the view -// is defined by the top-left corner pixel coordinates (left, top) as well -// as its width and height. This rectangle must be fully be comprised inside -// the 'src' source picture. If the source picture uses the YUV420 colorspace, -// the top and left coordinates will be snapped to even values. -// Picture 'src' must out-live 'dst' picture. Self-extraction of view is allowed -// ('src' equal to 'dst') as a mean of fast-cropping (but note that doing so, -// the original dimension will be lost). Picture 'dst' need not be initialized -// with WebPPictureInit() if it is different from 'src', since its content will -// be overwritten. -// Returns false in case of memory allocation error or invalid parameters. -WEBP_EXTERN int WebPPictureView(const WebPPicture* src, - int left, int top, int width, int height, - WebPPicture* dst); - -// Returns true if the 'picture' is actually a view and therefore does -// not own the memory for pixels. -WEBP_EXTERN int WebPPictureIsView(const WebPPicture* picture); - -// Rescale a picture to new dimension width x height. -// If either 'width' or 'height' (but not both) is 0 the corresponding -// dimension will be calculated preserving the aspect ratio. -// No gamma correction is applied. -// Returns false in case of error (invalid parameter or insufficient memory). -WEBP_EXTERN int WebPPictureRescale(WebPPicture* pic, int width, int height); - -// Colorspace conversion function to import RGB samples. -// Previous buffer will be free'd, if any. -// *rgb buffer should have a size of at least height * rgb_stride. -// Returns false in case of memory error. -WEBP_EXTERN int WebPPictureImportRGB( - WebPPicture* picture, const uint8_t* rgb, int rgb_stride); -// Same, but for RGBA buffer. -WEBP_EXTERN int WebPPictureImportRGBA( - WebPPicture* picture, const uint8_t* rgba, int rgba_stride); -// Same, but for RGBA buffer. Imports the RGB direct from the 32-bit format -// input buffer ignoring the alpha channel. Avoids needing to copy the data -// to a temporary 24-bit RGB buffer to import the RGB only. -WEBP_EXTERN int WebPPictureImportRGBX( - WebPPicture* picture, const uint8_t* rgbx, int rgbx_stride); - -// Variants of the above, but taking BGR(A|X) input. -WEBP_EXTERN int WebPPictureImportBGR( - WebPPicture* picture, const uint8_t* bgr, int bgr_stride); -WEBP_EXTERN int WebPPictureImportBGRA( - WebPPicture* picture, const uint8_t* bgra, int bgra_stride); -WEBP_EXTERN int WebPPictureImportBGRX( - WebPPicture* picture, const uint8_t* bgrx, int bgrx_stride); - -// Converts picture->argb data to the YUV420A format. The 'colorspace' -// parameter is deprecated and should be equal to WEBP_YUV420. -// Upon return, picture->use_argb is set to false. The presence of real -// non-opaque transparent values is detected, and 'colorspace' will be -// adjusted accordingly. Note that this method is lossy. -// Returns false in case of error. -WEBP_EXTERN int WebPPictureARGBToYUVA(WebPPicture* picture, - WebPEncCSP /*colorspace = WEBP_YUV420*/); - -// Same as WebPPictureARGBToYUVA(), but the conversion is done using -// pseudo-random dithering with a strength 'dithering' between -// 0.0 (no dithering) and 1.0 (maximum dithering). This is useful -// for photographic picture. -WEBP_EXTERN int WebPPictureARGBToYUVADithered( - WebPPicture* picture, WebPEncCSP colorspace, float dithering); - -// Performs 'sharp' RGBA->YUVA420 downsampling and colorspace conversion. -// Downsampling is handled with extra care in case of color clipping. This -// method is roughly 2x slower than WebPPictureARGBToYUVA() but produces better -// and sharper YUV representation. -// Returns false in case of error. -WEBP_EXTERN int WebPPictureSharpARGBToYUVA(WebPPicture* picture); -// kept for backward compatibility: -WEBP_EXTERN int WebPPictureSmartARGBToYUVA(WebPPicture* picture); - -// Converts picture->yuv to picture->argb and sets picture->use_argb to true. -// The input format must be YUV_420 or YUV_420A. The conversion from YUV420 to -// ARGB incurs a small loss too. -// Note that the use of this colorspace is discouraged if one has access to the -// raw ARGB samples, since using YUV420 is comparatively lossy. -// Returns false in case of error. -WEBP_EXTERN int WebPPictureYUVAToARGB(WebPPicture* picture); - -// Helper function: given a width x height plane of RGBA or YUV(A) samples -// clean-up or smoothen the YUV or RGB samples under fully transparent area, -// to help compressibility (no guarantee, though). -WEBP_EXTERN void WebPCleanupTransparentArea(WebPPicture* picture); - -// Scan the picture 'picture' for the presence of non fully opaque alpha values. -// Returns true in such case. Otherwise returns false (indicating that the -// alpha plane can be ignored altogether e.g.). -WEBP_EXTERN int WebPPictureHasTransparency(const WebPPicture* picture); - -// Remove the transparency information (if present) by blending the color with -// the background color 'background_rgb' (specified as 24bit RGB triplet). -// After this call, all alpha values are reset to 0xff. -WEBP_EXTERN void WebPBlendAlpha(WebPPicture* pic, uint32_t background_rgb); - -//------------------------------------------------------------------------------ -// Main call - -// Main encoding call, after config and picture have been initialized. -// 'picture' must be less than 16384x16384 in dimension (cf WEBP_MAX_DIMENSION), -// and the 'config' object must be a valid one. -// Returns false in case of error, true otherwise. -// In case of error, picture->error_code is updated accordingly. -// 'picture' can hold the source samples in both YUV(A) or ARGB input, depending -// on the value of 'picture->use_argb'. It is highly recommended to use -// the former for lossy encoding, and the latter for lossless encoding -// (when config.lossless is true). Automatic conversion from one format to -// another is provided but they both incur some loss. -WEBP_EXTERN int WebPEncode(const WebPConfig* config, WebPPicture* picture); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_WEBP_ENCODE_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/webp/format_constants.h b/Dependencies/FreeImage/Source/LibWebP/src/webp/format_constants.h deleted file mode 100644 index 9173bc7..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/webp/format_constants.h +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Internal header for constants related to WebP file format. -// -// Author: Urvang (urvang@google.com) - -#ifndef WEBP_WEBP_FORMAT_CONSTANTS_H_ -#define WEBP_WEBP_FORMAT_CONSTANTS_H_ - -// Create fourcc of the chunk from the chunk tag characters. -#define MKFOURCC(a, b, c, d) ((a) | (b) << 8 | (c) << 16 | (uint32_t)(d) << 24) - -// VP8 related constants. -#define VP8_SIGNATURE 0x9d012a // Signature in VP8 data. -#define VP8_MAX_PARTITION0_SIZE (1 << 19) // max size of mode partition -#define VP8_MAX_PARTITION_SIZE (1 << 24) // max size for token partition -#define VP8_FRAME_HEADER_SIZE 10 // Size of the frame header within VP8 data. - -// VP8L related constants. -#define VP8L_SIGNATURE_SIZE 1 // VP8L signature size. -#define VP8L_MAGIC_BYTE 0x2f // VP8L signature byte. -#define VP8L_IMAGE_SIZE_BITS 14 // Number of bits used to store - // width and height. -#define VP8L_VERSION_BITS 3 // 3 bits reserved for version. -#define VP8L_VERSION 0 // version 0 -#define VP8L_FRAME_HEADER_SIZE 5 // Size of the VP8L frame header. - -#define MAX_PALETTE_SIZE 256 -#define MAX_CACHE_BITS 11 -#define HUFFMAN_CODES_PER_META_CODE 5 -#define ARGB_BLACK 0xff000000 - -#define DEFAULT_CODE_LENGTH 8 -#define MAX_ALLOWED_CODE_LENGTH 15 - -#define NUM_LITERAL_CODES 256 -#define NUM_LENGTH_CODES 24 -#define NUM_DISTANCE_CODES 40 -#define CODE_LENGTH_CODES 19 - -#define MIN_HUFFMAN_BITS 2 // min number of Huffman bits -#define MAX_HUFFMAN_BITS 9 // max number of Huffman bits - -#define TRANSFORM_PRESENT 1 // The bit to be written when next data - // to be read is a transform. -#define NUM_TRANSFORMS 4 // Maximum number of allowed transform - // in a bitstream. -typedef enum { - PREDICTOR_TRANSFORM = 0, - CROSS_COLOR_TRANSFORM = 1, - SUBTRACT_GREEN = 2, - COLOR_INDEXING_TRANSFORM = 3 -} VP8LImageTransformType; - -// Alpha related constants. -#define ALPHA_HEADER_LEN 1 -#define ALPHA_NO_COMPRESSION 0 -#define ALPHA_LOSSLESS_COMPRESSION 1 -#define ALPHA_PREPROCESSED_LEVELS 1 - -// Mux related constants. -#define TAG_SIZE 4 // Size of a chunk tag (e.g. "VP8L"). -#define CHUNK_SIZE_BYTES 4 // Size needed to store chunk's size. -#define CHUNK_HEADER_SIZE 8 // Size of a chunk header. -#define RIFF_HEADER_SIZE 12 // Size of the RIFF header ("RIFFnnnnWEBP"). -#define ANMF_CHUNK_SIZE 16 // Size of an ANMF chunk. -#define ANIM_CHUNK_SIZE 6 // Size of an ANIM chunk. -#define VP8X_CHUNK_SIZE 10 // Size of a VP8X chunk. - -#define MAX_CANVAS_SIZE (1 << 24) // 24-bit max for VP8X width/height. -#define MAX_IMAGE_AREA (1ULL << 32) // 32-bit max for width x height. -#define MAX_LOOP_COUNT (1 << 16) // maximum value for loop-count -#define MAX_DURATION (1 << 24) // maximum duration -#define MAX_POSITION_OFFSET (1 << 24) // maximum frame x/y offset - -// Maximum chunk payload is such that adding the header and padding won't -// overflow a uint32_t. -#define MAX_CHUNK_PAYLOAD (~0U - CHUNK_HEADER_SIZE - 1) - -#endif /* WEBP_WEBP_FORMAT_CONSTANTS_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/webp/mux.h b/Dependencies/FreeImage/Source/LibWebP/src/webp/mux.h deleted file mode 100644 index 89826bf..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/webp/mux.h +++ /dev/null @@ -1,530 +0,0 @@ -// Copyright 2011 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// RIFF container manipulation and encoding for WebP images. -// -// Authors: Urvang (urvang@google.com) -// Vikas (vikasa@google.com) - -#ifndef WEBP_WEBP_MUX_H_ -#define WEBP_WEBP_MUX_H_ - -#include "./mux_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define WEBP_MUX_ABI_VERSION 0x0108 // MAJOR(8b) + MINOR(8b) - -//------------------------------------------------------------------------------ -// Mux API -// -// This API allows manipulation of WebP container images containing features -// like color profile, metadata, animation. -// -// Code Example#1: Create a WebPMux object with image data, color profile and -// XMP metadata. -/* - int copy_data = 0; - WebPMux* mux = WebPMuxNew(); - // ... (Prepare image data). - WebPMuxSetImage(mux, &image, copy_data); - // ... (Prepare ICCP color profile data). - WebPMuxSetChunk(mux, "ICCP", &icc_profile, copy_data); - // ... (Prepare XMP metadata). - WebPMuxSetChunk(mux, "XMP ", &xmp, copy_data); - // Get data from mux in WebP RIFF format. - WebPMuxAssemble(mux, &output_data); - WebPMuxDelete(mux); - // ... (Consume output_data; e.g. write output_data.bytes to file). - WebPDataClear(&output_data); -*/ - -// Code Example#2: Get image and color profile data from a WebP file. -/* - int copy_data = 0; - // ... (Read data from file). - WebPMux* mux = WebPMuxCreate(&data, copy_data); - WebPMuxGetFrame(mux, 1, &image); - // ... (Consume image; e.g. call WebPDecode() to decode the data). - WebPMuxGetChunk(mux, "ICCP", &icc_profile); - // ... (Consume icc_data). - WebPMuxDelete(mux); - free(data); -*/ - -// Note: forward declaring enumerations is not allowed in (strict) C and C++, -// the types are left here for reference. -// typedef enum WebPMuxError WebPMuxError; -// typedef enum WebPChunkId WebPChunkId; -typedef struct WebPMux WebPMux; // main opaque object. -typedef struct WebPMuxFrameInfo WebPMuxFrameInfo; -typedef struct WebPMuxAnimParams WebPMuxAnimParams; -typedef struct WebPAnimEncoderOptions WebPAnimEncoderOptions; - -// Error codes -typedef enum WebPMuxError { - WEBP_MUX_OK = 1, - WEBP_MUX_NOT_FOUND = 0, - WEBP_MUX_INVALID_ARGUMENT = -1, - WEBP_MUX_BAD_DATA = -2, - WEBP_MUX_MEMORY_ERROR = -3, - WEBP_MUX_NOT_ENOUGH_DATA = -4 -} WebPMuxError; - -// IDs for different types of chunks. -typedef enum WebPChunkId { - WEBP_CHUNK_VP8X, // VP8X - WEBP_CHUNK_ICCP, // ICCP - WEBP_CHUNK_ANIM, // ANIM - WEBP_CHUNK_ANMF, // ANMF - WEBP_CHUNK_DEPRECATED, // (deprecated from FRGM) - WEBP_CHUNK_ALPHA, // ALPH - WEBP_CHUNK_IMAGE, // VP8/VP8L - WEBP_CHUNK_EXIF, // EXIF - WEBP_CHUNK_XMP, // XMP - WEBP_CHUNK_UNKNOWN, // Other chunks. - WEBP_CHUNK_NIL -} WebPChunkId; - -//------------------------------------------------------------------------------ - -// Returns the version number of the mux library, packed in hexadecimal using -// 8bits for each of major/minor/revision. E.g: v2.5.7 is 0x020507. -WEBP_EXTERN int WebPGetMuxVersion(void); - -//------------------------------------------------------------------------------ -// Life of a Mux object - -// Internal, version-checked, entry point -WEBP_EXTERN WebPMux* WebPNewInternal(int); - -// Creates an empty mux object. -// Returns: -// A pointer to the newly created empty mux object. -// Or NULL in case of memory error. -static WEBP_INLINE WebPMux* WebPMuxNew(void) { - return WebPNewInternal(WEBP_MUX_ABI_VERSION); -} - -// Deletes the mux object. -// Parameters: -// mux - (in/out) object to be deleted -WEBP_EXTERN void WebPMuxDelete(WebPMux* mux); - -//------------------------------------------------------------------------------ -// Mux creation. - -// Internal, version-checked, entry point -WEBP_EXTERN WebPMux* WebPMuxCreateInternal(const WebPData*, int, int); - -// Creates a mux object from raw data given in WebP RIFF format. -// Parameters: -// bitstream - (in) the bitstream data in WebP RIFF format -// copy_data - (in) value 1 indicates given data WILL be copied to the mux -// object and value 0 indicates data will NOT be copied. -// Returns: -// A pointer to the mux object created from given data - on success. -// NULL - In case of invalid data or memory error. -static WEBP_INLINE WebPMux* WebPMuxCreate(const WebPData* bitstream, - int copy_data) { - return WebPMuxCreateInternal(bitstream, copy_data, WEBP_MUX_ABI_VERSION); -} - -//------------------------------------------------------------------------------ -// Non-image chunks. - -// Note: Only non-image related chunks should be managed through chunk APIs. -// (Image related chunks are: "ANMF", "VP8 ", "VP8L" and "ALPH"). -// To add, get and delete images, use WebPMuxSetImage(), WebPMuxPushFrame(), -// WebPMuxGetFrame() and WebPMuxDeleteFrame(). - -// Adds a chunk with id 'fourcc' and data 'chunk_data' in the mux object. -// Any existing chunk(s) with the same id will be removed. -// Parameters: -// mux - (in/out) object to which the chunk is to be added -// fourcc - (in) a character array containing the fourcc of the given chunk; -// e.g., "ICCP", "XMP ", "EXIF" etc. -// chunk_data - (in) the chunk data to be added -// copy_data - (in) value 1 indicates given data WILL be copied to the mux -// object and value 0 indicates data will NOT be copied. -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux, fourcc or chunk_data is NULL -// or if fourcc corresponds to an image chunk. -// WEBP_MUX_MEMORY_ERROR - on memory allocation error. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxSetChunk( - WebPMux* mux, const char fourcc[4], const WebPData* chunk_data, - int copy_data); - -// Gets a reference to the data of the chunk with id 'fourcc' in the mux object. -// The caller should NOT free the returned data. -// Parameters: -// mux - (in) object from which the chunk data is to be fetched -// fourcc - (in) a character array containing the fourcc of the chunk; -// e.g., "ICCP", "XMP ", "EXIF" etc. -// chunk_data - (out) returned chunk data -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux, fourcc or chunk_data is NULL -// or if fourcc corresponds to an image chunk. -// WEBP_MUX_NOT_FOUND - If mux does not contain a chunk with the given id. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxGetChunk( - const WebPMux* mux, const char fourcc[4], WebPData* chunk_data); - -// Deletes the chunk with the given 'fourcc' from the mux object. -// Parameters: -// mux - (in/out) object from which the chunk is to be deleted -// fourcc - (in) a character array containing the fourcc of the chunk; -// e.g., "ICCP", "XMP ", "EXIF" etc. -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux or fourcc is NULL -// or if fourcc corresponds to an image chunk. -// WEBP_MUX_NOT_FOUND - If mux does not contain a chunk with the given fourcc. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxDeleteChunk( - WebPMux* mux, const char fourcc[4]); - -//------------------------------------------------------------------------------ -// Images. - -// Encapsulates data about a single frame. -struct WebPMuxFrameInfo { - WebPData bitstream; // image data: can be a raw VP8/VP8L bitstream - // or a single-image WebP file. - int x_offset; // x-offset of the frame. - int y_offset; // y-offset of the frame. - int duration; // duration of the frame (in milliseconds). - - WebPChunkId id; // frame type: should be one of WEBP_CHUNK_ANMF - // or WEBP_CHUNK_IMAGE - WebPMuxAnimDispose dispose_method; // Disposal method for the frame. - WebPMuxAnimBlend blend_method; // Blend operation for the frame. - uint32_t pad[1]; // padding for later use -}; - -// Sets the (non-animated) image in the mux object. -// Note: Any existing images (including frames) will be removed. -// Parameters: -// mux - (in/out) object in which the image is to be set -// bitstream - (in) can be a raw VP8/VP8L bitstream or a single-image -// WebP file (non-animated) -// copy_data - (in) value 1 indicates given data WILL be copied to the mux -// object and value 0 indicates data will NOT be copied. -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL or bitstream is NULL. -// WEBP_MUX_MEMORY_ERROR - on memory allocation error. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxSetImage( - WebPMux* mux, const WebPData* bitstream, int copy_data); - -// Adds a frame at the end of the mux object. -// Notes: (1) frame.id should be WEBP_CHUNK_ANMF -// (2) For setting a non-animated image, use WebPMuxSetImage() instead. -// (3) Type of frame being pushed must be same as the frames in mux. -// (4) As WebP only supports even offsets, any odd offset will be snapped -// to an even location using: offset &= ~1 -// Parameters: -// mux - (in/out) object to which the frame is to be added -// frame - (in) frame data. -// copy_data - (in) value 1 indicates given data WILL be copied to the mux -// object and value 0 indicates data will NOT be copied. -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux or frame is NULL -// or if content of 'frame' is invalid. -// WEBP_MUX_MEMORY_ERROR - on memory allocation error. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxPushFrame( - WebPMux* mux, const WebPMuxFrameInfo* frame, int copy_data); - -// Gets the nth frame from the mux object. -// The content of 'frame->bitstream' is allocated using malloc(), and NOT -// owned by the 'mux' object. It MUST be deallocated by the caller by calling -// WebPDataClear(). -// nth=0 has a special meaning - last position. -// Parameters: -// mux - (in) object from which the info is to be fetched -// nth - (in) index of the frame in the mux object -// frame - (out) data of the returned frame -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux or frame is NULL. -// WEBP_MUX_NOT_FOUND - if there are less than nth frames in the mux object. -// WEBP_MUX_BAD_DATA - if nth frame chunk in mux is invalid. -// WEBP_MUX_MEMORY_ERROR - on memory allocation error. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxGetFrame( - const WebPMux* mux, uint32_t nth, WebPMuxFrameInfo* frame); - -// Deletes a frame from the mux object. -// nth=0 has a special meaning - last position. -// Parameters: -// mux - (in/out) object from which a frame is to be deleted -// nth - (in) The position from which the frame is to be deleted -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL. -// WEBP_MUX_NOT_FOUND - If there are less than nth frames in the mux object -// before deletion. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxDeleteFrame(WebPMux* mux, uint32_t nth); - -//------------------------------------------------------------------------------ -// Animation. - -// Animation parameters. -struct WebPMuxAnimParams { - uint32_t bgcolor; // Background color of the canvas stored (in MSB order) as: - // Bits 00 to 07: Alpha. - // Bits 08 to 15: Red. - // Bits 16 to 23: Green. - // Bits 24 to 31: Blue. - int loop_count; // Number of times to repeat the animation [0 = infinite]. -}; - -// Sets the animation parameters in the mux object. Any existing ANIM chunks -// will be removed. -// Parameters: -// mux - (in/out) object in which ANIM chunk is to be set/added -// params - (in) animation parameters. -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux or params is NULL. -// WEBP_MUX_MEMORY_ERROR - on memory allocation error. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxSetAnimationParams( - WebPMux* mux, const WebPMuxAnimParams* params); - -// Gets the animation parameters from the mux object. -// Parameters: -// mux - (in) object from which the animation parameters to be fetched -// params - (out) animation parameters extracted from the ANIM chunk -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux or params is NULL. -// WEBP_MUX_NOT_FOUND - if ANIM chunk is not present in mux object. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxGetAnimationParams( - const WebPMux* mux, WebPMuxAnimParams* params); - -//------------------------------------------------------------------------------ -// Misc Utilities. - -// Sets the canvas size for the mux object. The width and height can be -// specified explicitly or left as zero (0, 0). -// * When width and height are specified explicitly, then this frame bound is -// enforced during subsequent calls to WebPMuxAssemble() and an error is -// reported if any animated frame does not completely fit within the canvas. -// * When unspecified (0, 0), the constructed canvas will get the frame bounds -// from the bounding-box over all frames after calling WebPMuxAssemble(). -// Parameters: -// mux - (in) object to which the canvas size is to be set -// width - (in) canvas width -// height - (in) canvas height -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL; or -// width or height are invalid or out of bounds -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxSetCanvasSize(WebPMux* mux, - int width, int height); - -// Gets the canvas size from the mux object. -// Note: This method assumes that the VP8X chunk, if present, is up-to-date. -// That is, the mux object hasn't been modified since the last call to -// WebPMuxAssemble() or WebPMuxCreate(). -// Parameters: -// mux - (in) object from which the canvas size is to be fetched -// width - (out) canvas width -// height - (out) canvas height -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux, width or height is NULL. -// WEBP_MUX_BAD_DATA - if VP8X/VP8/VP8L chunk or canvas size is invalid. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxGetCanvasSize(const WebPMux* mux, - int* width, int* height); - -// Gets the feature flags from the mux object. -// Note: This method assumes that the VP8X chunk, if present, is up-to-date. -// That is, the mux object hasn't been modified since the last call to -// WebPMuxAssemble() or WebPMuxCreate(). -// Parameters: -// mux - (in) object from which the features are to be fetched -// flags - (out) the flags specifying which features are present in the -// mux object. This will be an OR of various flag values. -// Enum 'WebPFeatureFlags' can be used to test individual flag values. -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux or flags is NULL. -// WEBP_MUX_BAD_DATA - if VP8X/VP8/VP8L chunk or canvas size is invalid. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxGetFeatures(const WebPMux* mux, - uint32_t* flags); - -// Gets number of chunks with the given 'id' in the mux object. -// Parameters: -// mux - (in) object from which the info is to be fetched -// id - (in) chunk id specifying the type of chunk -// num_elements - (out) number of chunks with the given chunk id -// Returns: -// WEBP_MUX_INVALID_ARGUMENT - if mux, or num_elements is NULL. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxNumChunks(const WebPMux* mux, - WebPChunkId id, int* num_elements); - -// Assembles all chunks in WebP RIFF format and returns in 'assembled_data'. -// This function also validates the mux object. -// Note: The content of 'assembled_data' will be ignored and overwritten. -// Also, the content of 'assembled_data' is allocated using malloc(), and NOT -// owned by the 'mux' object. It MUST be deallocated by the caller by calling -// WebPDataClear(). It's always safe to call WebPDataClear() upon return, -// even in case of error. -// Parameters: -// mux - (in/out) object whose chunks are to be assembled -// assembled_data - (out) assembled WebP data -// Returns: -// WEBP_MUX_BAD_DATA - if mux object is invalid. -// WEBP_MUX_INVALID_ARGUMENT - if mux or assembled_data is NULL. -// WEBP_MUX_MEMORY_ERROR - on memory allocation error. -// WEBP_MUX_OK - on success. -WEBP_EXTERN WebPMuxError WebPMuxAssemble(WebPMux* mux, - WebPData* assembled_data); - -//------------------------------------------------------------------------------ -// WebPAnimEncoder API -// -// This API allows encoding (possibly) animated WebP images. -// -// Code Example: -/* - WebPAnimEncoderOptions enc_options; - WebPAnimEncoderOptionsInit(&enc_options); - // Tune 'enc_options' as needed. - WebPAnimEncoder* enc = WebPAnimEncoderNew(width, height, &enc_options); - while() { - WebPConfig config; - WebPConfigInit(&config); - // Tune 'config' as needed. - WebPAnimEncoderAdd(enc, frame, timestamp_ms, &config); - } - WebPAnimEncoderAdd(enc, NULL, timestamp_ms, NULL); - WebPAnimEncoderAssemble(enc, webp_data); - WebPAnimEncoderDelete(enc); - // Write the 'webp_data' to a file, or re-mux it further. -*/ - -typedef struct WebPAnimEncoder WebPAnimEncoder; // Main opaque object. - -// Forward declarations. Defined in encode.h. -struct WebPPicture; -struct WebPConfig; - -// Global options. -struct WebPAnimEncoderOptions { - WebPMuxAnimParams anim_params; // Animation parameters. - int minimize_size; // If true, minimize the output size (slow). Implicitly - // disables key-frame insertion. - int kmin; - int kmax; // Minimum and maximum distance between consecutive key - // frames in the output. The library may insert some key - // frames as needed to satisfy this criteria. - // Note that these conditions should hold: kmax > kmin - // and kmin >= kmax / 2 + 1. Also, if kmax <= 0, then - // key-frame insertion is disabled; and if kmax == 1, - // then all frames will be key-frames (kmin value does - // not matter for these special cases). - int allow_mixed; // If true, use mixed compression mode; may choose - // either lossy and lossless for each frame. - int verbose; // If true, print info and warning messages to stderr. - - uint32_t padding[4]; // Padding for later use. -}; - -// Internal, version-checked, entry point. -WEBP_EXTERN int WebPAnimEncoderOptionsInitInternal( - WebPAnimEncoderOptions*, int); - -// Should always be called, to initialize a fresh WebPAnimEncoderOptions -// structure before modification. Returns false in case of version mismatch. -// WebPAnimEncoderOptionsInit() must have succeeded before using the -// 'enc_options' object. -static WEBP_INLINE int WebPAnimEncoderOptionsInit( - WebPAnimEncoderOptions* enc_options) { - return WebPAnimEncoderOptionsInitInternal(enc_options, WEBP_MUX_ABI_VERSION); -} - -// Internal, version-checked, entry point. -WEBP_EXTERN WebPAnimEncoder* WebPAnimEncoderNewInternal( - int, int, const WebPAnimEncoderOptions*, int); - -// Creates and initializes a WebPAnimEncoder object. -// Parameters: -// width/height - (in) canvas width and height of the animation. -// enc_options - (in) encoding options; can be passed NULL to pick -// reasonable defaults. -// Returns: -// A pointer to the newly created WebPAnimEncoder object. -// Or NULL in case of memory error. -static WEBP_INLINE WebPAnimEncoder* WebPAnimEncoderNew( - int width, int height, const WebPAnimEncoderOptions* enc_options) { - return WebPAnimEncoderNewInternal(width, height, enc_options, - WEBP_MUX_ABI_VERSION); -} - -// Optimize the given frame for WebP, encode it and add it to the -// WebPAnimEncoder object. -// The last call to 'WebPAnimEncoderAdd' should be with frame = NULL, which -// indicates that no more frames are to be added. This call is also used to -// determine the duration of the last frame. -// Parameters: -// enc - (in/out) object to which the frame is to be added. -// frame - (in/out) frame data in ARGB or YUV(A) format. If it is in YUV(A) -// format, it will be converted to ARGB, which incurs a small loss. -// timestamp_ms - (in) timestamp of this frame in milliseconds. -// Duration of a frame would be calculated as -// "timestamp of next frame - timestamp of this frame". -// Hence, timestamps should be in non-decreasing order. -// config - (in) encoding options; can be passed NULL to pick -// reasonable defaults. -// Returns: -// On error, returns false and frame->error_code is set appropriately. -// Otherwise, returns true. -WEBP_EXTERN int WebPAnimEncoderAdd( - WebPAnimEncoder* enc, struct WebPPicture* frame, int timestamp_ms, - const struct WebPConfig* config); - -// Assemble all frames added so far into a WebP bitstream. -// This call should be preceded by a call to 'WebPAnimEncoderAdd' with -// frame = NULL; if not, the duration of the last frame will be internally -// estimated. -// Parameters: -// enc - (in/out) object from which the frames are to be assembled. -// webp_data - (out) generated WebP bitstream. -// Returns: -// True on success. -WEBP_EXTERN int WebPAnimEncoderAssemble(WebPAnimEncoder* enc, - WebPData* webp_data); - -// Get error string corresponding to the most recent call using 'enc'. The -// returned string is owned by 'enc' and is valid only until the next call to -// WebPAnimEncoderAdd() or WebPAnimEncoderAssemble() or WebPAnimEncoderDelete(). -// Parameters: -// enc - (in/out) object from which the error string is to be fetched. -// Returns: -// NULL if 'enc' is NULL. Otherwise, returns the error string if the last call -// to 'enc' had an error, or an empty string if the last call was a success. -WEBP_EXTERN const char* WebPAnimEncoderGetError(WebPAnimEncoder* enc); - -// Deletes the WebPAnimEncoder object. -// Parameters: -// enc - (in/out) object to be deleted -WEBP_EXTERN void WebPAnimEncoderDelete(WebPAnimEncoder* enc); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_WEBP_MUX_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/webp/mux_types.h b/Dependencies/FreeImage/Source/LibWebP/src/webp/mux_types.h deleted file mode 100644 index 380efb8..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/webp/mux_types.h +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2012 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Data-types common to the mux and demux libraries. -// -// Author: Urvang (urvang@google.com) - -#ifndef WEBP_WEBP_MUX_TYPES_H_ -#define WEBP_WEBP_MUX_TYPES_H_ - -#include // free() -#include // memset() -#include "./types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Note: forward declaring enumerations is not allowed in (strict) C and C++, -// the types are left here for reference. -// typedef enum WebPFeatureFlags WebPFeatureFlags; -// typedef enum WebPMuxAnimDispose WebPMuxAnimDispose; -// typedef enum WebPMuxAnimBlend WebPMuxAnimBlend; -typedef struct WebPData WebPData; - -// VP8X Feature Flags. -typedef enum WebPFeatureFlags { - ANIMATION_FLAG = 0x00000002, - XMP_FLAG = 0x00000004, - EXIF_FLAG = 0x00000008, - ALPHA_FLAG = 0x00000010, - ICCP_FLAG = 0x00000020, - - ALL_VALID_FLAGS = 0x0000003e -} WebPFeatureFlags; - -// Dispose method (animation only). Indicates how the area used by the current -// frame is to be treated before rendering the next frame on the canvas. -typedef enum WebPMuxAnimDispose { - WEBP_MUX_DISPOSE_NONE, // Do not dispose. - WEBP_MUX_DISPOSE_BACKGROUND // Dispose to background color. -} WebPMuxAnimDispose; - -// Blend operation (animation only). Indicates how transparent pixels of the -// current frame are blended with those of the previous canvas. -typedef enum WebPMuxAnimBlend { - WEBP_MUX_BLEND, // Blend. - WEBP_MUX_NO_BLEND // Do not blend. -} WebPMuxAnimBlend; - -// Data type used to describe 'raw' data, e.g., chunk data -// (ICC profile, metadata) and WebP compressed image data. -struct WebPData { - const uint8_t* bytes; - size_t size; -}; - -// Initializes the contents of the 'webp_data' object with default values. -static WEBP_INLINE void WebPDataInit(WebPData* webp_data) { - if (webp_data != NULL) { - memset(webp_data, 0, sizeof(*webp_data)); - } -} - -// Clears the contents of the 'webp_data' object by calling free(). Does not -// deallocate the object itself. -static WEBP_INLINE void WebPDataClear(WebPData* webp_data) { - if (webp_data != NULL) { - free((void*)webp_data->bytes); - WebPDataInit(webp_data); - } -} - -// Allocates necessary storage for 'dst' and copies the contents of 'src'. -// Returns true on success. -static WEBP_INLINE int WebPDataCopy(const WebPData* src, WebPData* dst) { - if (src == NULL || dst == NULL) return 0; - WebPDataInit(dst); - if (src->bytes != NULL && src->size != 0) { - dst->bytes = (uint8_t*)malloc(src->size); - if (dst->bytes == NULL) return 0; - memcpy((void*)dst->bytes, src->bytes, src->size); - dst->size = src->size; - } - return 1; -} - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_WEBP_MUX_TYPES_H_ */ diff --git a/Dependencies/FreeImage/Source/LibWebP/src/webp/types.h b/Dependencies/FreeImage/Source/LibWebP/src/webp/types.h deleted file mode 100644 index 9f48512..0000000 --- a/Dependencies/FreeImage/Source/LibWebP/src/webp/types.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// -// Common types -// -// Author: Skal (pascal.massimino@gmail.com) - -#ifndef WEBP_WEBP_TYPES_H_ -#define WEBP_WEBP_TYPES_H_ - -#include // for size_t - -#ifndef _MSC_VER -#include -#if defined(__cplusplus) || !defined(__STRICT_ANSI__) || \ - (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) -#define WEBP_INLINE inline -#else -#define WEBP_INLINE -#endif -#else -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed short int16_t; -typedef unsigned short uint16_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef unsigned long long int uint64_t; -typedef long long int int64_t; -#define WEBP_INLINE __forceinline -#endif /* _MSC_VER */ - -#ifndef WEBP_EXTERN -// This explicitly marks library functions and allows for changing the -// signature for e.g., Windows DLL builds. -# if defined(__GNUC__) && __GNUC__ >= 4 -# define WEBP_EXTERN extern __attribute__ ((visibility ("default"))) -# else -# define WEBP_EXTERN extern -# endif /* __GNUC__ >= 4 */ -#endif /* WEBP_EXTERN */ - -// Macro to check ABI compatibility (same major revision number) -#define WEBP_ABI_IS_INCOMPATIBLE(a, b) (((a) >> 8) != ((b) >> 8)) - -#endif /* WEBP_WEBP_TYPES_H_ */ diff --git a/Dependencies/FreeImage/Source/MapIntrospector.h b/Dependencies/FreeImage/Source/MapIntrospector.h deleted file mode 100644 index 4c10c2c..0000000 --- a/Dependencies/FreeImage/Source/MapIntrospector.h +++ /dev/null @@ -1,213 +0,0 @@ -// ========================================================== -// STL MapIntrospector class -// -// Design and implementation by -// - Carsten Klein (cklein05@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifndef FREEIMAGE_MAPINTROSPECTOR_H_ -#define FREEIMAGE_MAPINTROSPECTOR_H_ - -// we need at least one C++ header included, -// that defines the C++ Standard Library's version macro, -// that is used below to identify the library. -#include - -/** -Class MapIntrospector - STL std::map Introspector - -The MapIntrospector is a helper class used to calculate or estimate part -of the internal memory footprint of a std::map, that is the memory used -by N entries, where N is provided as an argument. This class is used by -function FreeImage_GetMemorySize, which aims to get the total memory -usage for a FreeImage bitmap. - -The type argument _Maptype must take the type of the std::map to be -introspected. - -This class accounts for 'internal' memory per entry only, that is, the -size returned does neither include the actual size of the std::map class -itself, nor does it include the size of referenced keys and values (also -the actual bytes required for std::string type keys or values are not -counted). For example, the total memory usage should be something like: - -typedef std::map DBLMAP -DBLMAP MyMap; - -int total_size = sizeof(DBLMAP) + MapIntrospector::GetNodesMemorySize(MyMap.size()) -for (DBLMAP::iterator i = MyMap->begin(); i != MyMap->end(); i++) { - std::string key = i->first; - total_size += key.capacity(); -} - -So, basically, this class' task is to get the (constant) number of bytes -per entry, which is multiplied by N (parameter node_count) and returned -in method GetNodesMemorySize. Since this heavily depends on the actually -used C++ Standard Library, this class must be implemented specifically -for each C++ Standard Library. - -At current, there is an implementation available for these C++ Standard -Libraries: - -- Microsoft C++ Standard Library -- GNU Standard C++ Library v3, libstdc++-v3 -- LLVM "libc++" C++ Standard Library (untested) -- Unknown C++ Standard Library - -Volunteers for testing as well as for providing support for other/new -libraries are welcome. - -The 'Unknown C++ Standard Library' case is used if no other known C++ -Standard Library was detected. It uses a typical _Node structure to -declare an estimated memory consumption for a node. -*/ - -#if defined(_CPPLIB_VER) // Microsoft C++ Standard Library -/** - The Microsoft C++ Standard Library uses the protected structure _Node - of class std::_Tree_nod to represent a node. This class is used by - std::_Tree, the base class of std::map. So, since std::map is derived - from std::_Tree (and _Node is protected), we can get access to this - structure by deriving from std::map. - - Additionally, the Microsoft C++ Standard Library uses a separately - allocated end node for its balanced red-black tree so, actually, there - are size() + 1 nodes present in memory. - - With all that in place, the total memory for all nodes in std::map - is simply (node_count + 1) * sizeof(_Node). -*/ -template -class MapIntrospector: private _Maptype { -public: - static size_t GetNodesMemorySize(size_t node_count) { - return (node_count + 1) * sizeof(_Node); - } -}; - -#elif defined(__GLIBCXX__) // GNU Standard C++ Library v3, libstdc++-v3 -/** - The GNU Standard C++ Library v3 uses structure std::_Rb_tree_node<_Val>, - which is publicly declared in the standard namespace. Its value type - _Val is actually the map's value_type std::map::value_type. - - So, the total memory for all nodes in std::map is simply - node_count * sizeof(std::_Rb_tree_node<_Val>), _Val being the map's - value_type. -*/ -template -class MapIntrospector { -private: - typedef typename _Maptype::value_type _Val; - -public: - static size_t GetNodesMemorySize(size_t node_count) { - return node_count * sizeof(std::_Rb_tree_node<_Val>); - } -}; - -#elif defined(_LIBCPP_VERSION) // "libc++" C++ Standard Library (LLVM) -/* - The "libc++" C++ Standard Library uses structure - std::__tree_node<_Val, void*> for regular nodes and one instance of - structure std::__tree_end_node for end nodes, which both are - publicly declared in the standard namespace. Its value type _Val is - actually the map's value_type std::map::value_type. - - So, the total memory for all nodes in std::map is simply - node_count * sizeof(std::__tree_node<_Val, void*>) - + sizeof(std::__tree_end_node). - - REMARK: this implementation is not yet tested! -*/ -template -class MapIntrospector { -private: - typedef typename _Maptype::value_type _Val; - -public: - static size_t GetNodesMemorySize(size_t node_count) { - return node_count * sizeof(std::__tree_node<_Val, void*>) + sizeof(std::__tree_end_node); - } -}; - -//#elif defined(_ADD_YOUR_CPP_STD_LIBRARY_HERE_) - -#else // Unknown C++ Standard Library -/** - If we do not know the actual C++ Standard Library and so, have no - access to any internal types, we can just make some assumptions about - the implementation and memory usage. - - However, all implementations will probably be based on a balanced - red-black tree, will also store the map's value_type in each node and - need some extra information like the node's color. For a binary tree, - at least two pointers, one for left and one for right are required. - Since it is handy, many implementations also have a parent pointer. - - We let the compiler calculate the size of the above mentioned items by - using a fake structure. By using a real structure (in contrast to just - adding numbers/bytes) we'll get correct pointer sizes as well as any - padding applied for free. -*/ -template -class MapIntrospector { -private: - /* Define some handy typedefs to build up the structure. */ - - /** - Each node will likely store the value_type of the mapping, - that is a std::pair<_Key, _Value>. - */ - typedef typename _Maptype::value_type _Val; - - /** - We will need some pointers, since std::map is likely implemented - as a balanced red-black tree. - */ - typedef void* _Ptr; - - /** - Space for some extra information (like the node's color). - An int should be sufficient. - */ - typedef int _Ext; - - /* The memory required for each node will likely look like this - structure. We will just multiply sizeof(_Node) by the number - of nodes to get the total memory of all nodes. By using the - size of the structure, we will also take care of the compiler's - default padding. - */ - typedef struct { - _Ptr _parent_node; - _Ptr _left_node; - _Ptr _right_node; - _Val _value; - _Ext _extra_info; - } _Node; - -public: - static size_t GetNodesMemorySize(size_t node_count) { - return node_count * sizeof(_Node); - } -}; - -#endif // Standard C++ Library - -#endif // FREEIMAGE_MAPINTROSPECTOR_H_ - diff --git a/Dependencies/FreeImage/Source/Metadata/Exif.cpp b/Dependencies/FreeImage/Source/Metadata/Exif.cpp deleted file mode 100644 index 62af18c..0000000 --- a/Dependencies/FreeImage/Source/Metadata/Exif.cpp +++ /dev/null @@ -1,1357 +0,0 @@ -// ========================================================== -// Metadata functions implementation -// Exif metadata model -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// - Garrick Meeker (garrickmeeker@users.sourceforge.net) -// -// Based on the following implementations: -// - metadata-extractor : http://www.drewnoakes.com/code/exif/ -// - jhead : http://www.sentex.net/~mwandel/jhead/ -// - ImageMagick : http://www.imagemagick.org/ -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include "FreeImage.h" -#include "Utilities.h" -#include "FreeImageTag.h" - -// ========================================================== -// Exif JPEG routines -// ========================================================== - -#define EXIF_NUM_FORMATS 12 - -#define TAG_EXIF_OFFSET 0x8769 // Exif IFD Pointer -#define TAG_GPS_OFFSET 0x8825 // GPS Info IFD Pointer -#define TAG_INTEROP_OFFSET 0xA005 // Interoperability IFD Pointer -#define TAG_MAKER_NOTE 0x927C // Maker note - -// CANON cameras have some funny bespoke fields that need further processing... -#define TAG_CANON_CAMERA_STATE_0x01 0x0001 // tags under tag 0x001 (CameraSettings) -#define TAG_CANON_CAMERA_STATE_0x02 0x0002 // tags under tag 0x002 (FocalLength) -#define TAG_CANON_CAMERA_STATE_0x04 0x0004 // tags under tag 0x004 (ShotInfo) -#define TAG_CANON_CAMERA_STATE_0x12 0x0012 // tags under tag 0x012 (AFInfo) -#define TAG_CANON_CAMERA_STATE_0xA0 0x00A0 // tags under tag 0x0A0 (ProcessingInfo) -#define TAG_CANON_CAMERA_STATE_0xE0 0x00E0 // tags under tag 0x0E0 (SensorInfo) - - -// ===================================================================== -// Reimplementation of strnicmp (it is not supported on some systems) -// ===================================================================== - -/** -Compare characters of two strings without regard to case. -@param s1 Null-terminated string to compare. -@param s2 Null-terminated string to compare. -@param len Number of characters to compare -@return Returns 0 if s1 substring identical to s2 substring -*/ -static int -FreeImage_strnicmp(const char *s1, const char *s2, size_t len) { - unsigned char c1, c2; - - if(!s1 || !s2) return -1; - - c1 = 0; c2 = 0; - if(len) { - do { - c1 = *s1; c2 = *s2; - s1++; s2++; - if (!c1) - break; - if (!c2) - break; - if (c1 == c2) - continue; - c1 = (BYTE)tolower(c1); - c2 = (BYTE)tolower(c2); - if (c1 != c2) - break; - } while (--len); - } - return (int)c1 - (int)c2; -} - - -// ---------------------------------------------------------- -// Little Endian / Big Endian io routines -// ---------------------------------------------------------- - -static short -ReadInt16(BOOL msb_order, const void *buffer) { - short value; - - if(msb_order) { - value = (short)((((BYTE*) buffer)[0] << 8) | ((BYTE*) buffer)[1]); - return value; - } - value = (short)((((BYTE*) buffer)[1] << 8) | ((BYTE*) buffer)[0]); - return value; -} - -static LONG -ReadInt32(BOOL msb_order, const void *buffer) { - LONG value; - - if(msb_order) { - value = (LONG)((((BYTE*) buffer)[0] << 24) | (((BYTE*) buffer)[1] << 16) | (((BYTE*) buffer)[2] << 8) | (((BYTE*) buffer)[3])); - return value; - } - value = (LONG)((((BYTE*) buffer)[3] << 24) | (((BYTE*) buffer)[2] << 16) | (((BYTE*) buffer)[1] << 8 ) | (((BYTE*) buffer)[0])); - return value; -} - -static WORD -ReadUint16(BOOL msb_order, const void *buffer) { - WORD value; - - if(msb_order) { - value = (WORD) ((((BYTE*) buffer)[0] << 8) | ((BYTE*) buffer)[1]); - return value; - } - value = (WORD) ((((BYTE*) buffer)[1] << 8) | ((BYTE*) buffer)[0]); - return value; -} - -static DWORD -ReadUint32(BOOL msb_order, const void *buffer) { - return ((DWORD) ReadInt32(msb_order, buffer) & 0xFFFFFFFF); -} - -// ---------------------------------------------------------- -// Exif JPEG markers routines -// ---------------------------------------------------------- - -/** -Process a IFD offset -Returns the offset and the metadata model for this tag -*/ -static void -processIFDOffset(FITAG *tag, const char *pval, BOOL msb_order, DWORD *subdirOffset, TagLib::MDMODEL *md_model) { - // get the IFD offset - *subdirOffset = ReadUint32(msb_order, pval); - - // select a tag info table - switch(FreeImage_GetTagID(tag)) { - case TAG_EXIF_OFFSET: - *md_model = TagLib::EXIF_EXIF; - break; - case TAG_GPS_OFFSET: - *md_model = TagLib::EXIF_GPS; - break; - case TAG_INTEROP_OFFSET: - *md_model = TagLib::EXIF_INTEROP; - break; - } -} - -/** -Process a maker note IFD offset -Returns the offset and the metadata model for this tag -*/ -static void -processMakerNote(FIBITMAP *dib, const char *pval, BOOL msb_order, DWORD *subdirOffset, TagLib::MDMODEL *md_model) { - FITAG *tagMake = NULL; - - *subdirOffset = 0; - *md_model = TagLib::UNKNOWN; - - // Determine the camera model and makernote format - // WARNING: note that Maker may be NULL sometimes so check its value before using it - // (NULL pointer checking is done by FreeImage_strnicmp) - FreeImage_GetMetadata(FIMD_EXIF_MAIN, dib, "Make", &tagMake); - const char *Maker = (char*)FreeImage_GetTagValue(tagMake); - - if((memcmp("OLYMP\x00\x01", pval, 7) == 0) || (memcmp("OLYMP\x00\x02", pval, 7) == 0) || (memcmp("EPSON", pval, 5) == 0) || (memcmp("AGFA", pval, 4) == 0)) { - // Olympus Type 1 Makernote - // Epson and Agfa use Olympus maker note standard, - // see: http://www.ozhiker.com/electronics/pjmt/jpeg_info/ - *md_model = TagLib::EXIF_MAKERNOTE_OLYMPUSTYPE1; - *subdirOffset = 8; - } - else if(memcmp("OLYMPUS\x00\x49\x49\x03\x00", pval, 12) == 0) { - // Olympus Type 2 Makernote - // !!! NOT YET SUPPORTED !!! - *subdirOffset = 0; - *md_model = TagLib::UNKNOWN; - } - else if(memcmp("Nikon", pval, 5) == 0) { - /* There are two scenarios here: - * Type 1: - * :0000: 4E 69 6B 6F 6E 00 01 00-05 00 02 00 02 00 06 00 Nikon........... - * :0010: 00 00 EC 02 00 00 03 00-03 00 01 00 00 00 06 00 ................ - * Type 3: - * :0000: 4E 69 6B 6F 6E 00 02 00-00 00 4D 4D 00 2A 00 00 Nikon....MM.*... - * :0010: 00 08 00 1E 00 01 00 07-00 00 00 04 30 32 30 30 ............0200 - */ - if (pval[6] == 1) { - // Nikon type 1 Makernote - *md_model = TagLib::EXIF_MAKERNOTE_NIKONTYPE1; - *subdirOffset = 8; - } else if (pval[6] == 2) { - // Nikon type 3 Makernote - *md_model = TagLib::EXIF_MAKERNOTE_NIKONTYPE3; - *subdirOffset = 18; - } else { - // Unsupported makernote data ignored - *subdirOffset = 0; - *md_model = TagLib::UNKNOWN; - } - } else if(Maker && (FreeImage_strnicmp("NIKON", Maker, 5) == 0)) { - // Nikon type 2 Makernote - *md_model = TagLib::EXIF_MAKERNOTE_NIKONTYPE2; - *subdirOffset = 0; - } else if(Maker && (FreeImage_strnicmp("Canon", Maker, 5) == 0)) { - // Canon Makernote - *md_model = TagLib::EXIF_MAKERNOTE_CANON; - *subdirOffset = 0; - } else if(Maker && (FreeImage_strnicmp("Casio", Maker, 5) == 0)) { - // Casio Makernote - if(memcmp("QVC\x00\x00\x00", pval, 6) == 0) { - // Casio Type 2 Makernote - *md_model = TagLib::EXIF_MAKERNOTE_CASIOTYPE2; - *subdirOffset = 6; - } else { - // Casio Type 1 Makernote - *md_model = TagLib::EXIF_MAKERNOTE_CASIOTYPE1; - *subdirOffset = 0; - } - } else if ((memcmp("FUJIFILM", pval, 8) == 0) || (Maker && (FreeImage_strnicmp("Fujifilm", Maker, 8) == 0))) { - // Fujifile Makernote - // Fujifilm's Makernote always use little-endian order altough the Exif section maybe in little-endian order or in big-endian order. - // If msb_order == TRUE, the Makernote won't be read: - // the value of ifdStart will be 0x0c000000 instead of 0x0000000c and the MakerNote section will be discarded later - // in jpeg_read_exif_dir because the IFD is too high - *md_model = TagLib::EXIF_MAKERNOTE_FUJIFILM; - DWORD ifdStart = ReadUint32(msb_order, pval + 8); - *subdirOffset = ifdStart; - } - else if(memcmp("KYOCERA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x00\x00\x00", pval, 22) == 0) { - *md_model = TagLib::EXIF_MAKERNOTE_KYOCERA; - *subdirOffset = 22; - } - else if(Maker && (FreeImage_strnicmp("Minolta", Maker, 7) == 0)) { - // Minolta maker note - *md_model = TagLib::EXIF_MAKERNOTE_MINOLTA; - *subdirOffset = 0; - } - else if(memcmp("Panasonic\x00\x00\x00", pval, 12) == 0) { - // Panasonic maker note - *md_model = TagLib::EXIF_MAKERNOTE_PANASONIC; - *subdirOffset = 12; - } - else if(Maker && (FreeImage_strnicmp("LEICA", Maker, 5) == 0)) { - // Leica maker note - if(memcmp("LEICA\x00\x00\x00", pval, 8) == 0) { - // not yet supported makernote data ignored - *subdirOffset = 0; - *md_model = TagLib::UNKNOWN; - } - } - else if(Maker && ((FreeImage_strnicmp("Pentax", Maker, 6) == 0) || (FreeImage_strnicmp("Asahi", Maker, 5) == 0))) { - // Pentax maker note - if(memcmp("AOC\x00", pval, 4) == 0) { - // Type 2 Pentax Makernote - *md_model = TagLib::EXIF_MAKERNOTE_PENTAX; - *subdirOffset = 6; - } else { - // Type 1 Pentax Makernote - *md_model = TagLib::EXIF_MAKERNOTE_ASAHI; - *subdirOffset = 0; - } - } - else if((memcmp("SONY CAM\x20\x00\x00\x00", pval, 12) == 0) || (memcmp("SONY DSC\x20\x00\x00\x00", pval, 12) == 0)) { - *md_model = TagLib::EXIF_MAKERNOTE_SONY; - *subdirOffset = 12; - } - else if((memcmp("SIGMA\x00\x00\x00", pval, 8) == 0) || (memcmp("FOVEON\x00\x00", pval, 8) == 0)) { - FITAG *tagModel = NULL; - FreeImage_GetMetadata(FIMD_EXIF_MAIN, dib, "Model", &tagModel); - const char *Model = (char*)FreeImage_GetTagValue(tagModel); - if(Model && (memcmp("SIGMA SD1\x00", Model, 10) == 0)) { - // Sigma SD1 maker note - *subdirOffset = 10; - *md_model = TagLib::EXIF_MAKERNOTE_SIGMA_SD1; - } else { - // Sigma / Foveon makernote - *subdirOffset = 10; - *md_model = TagLib::EXIF_MAKERNOTE_SIGMA_FOVEON; - } - } -} - -/** -Process a Canon maker note tag. -A single Canon tag may contain many other tags within. -*/ -static BOOL -processCanonMakerNoteTag(FIBITMAP *dib, FITAG *tag) { - char defaultKey[16]; - DWORD startIndex = 0; - TagLib& s = TagLib::instance(); - - WORD tag_id = FreeImage_GetTagID(tag); - - int subTagTypeBase = 0; - - switch(tag_id) { - case TAG_CANON_CAMERA_STATE_0x01: - subTagTypeBase = 0xC100; - startIndex = 1; - break; - case TAG_CANON_CAMERA_STATE_0x02: - subTagTypeBase = 0xC200; - startIndex = 0; - break; - case TAG_CANON_CAMERA_STATE_0x04: - subTagTypeBase = 0xC400; - startIndex = 1; - break; - case TAG_CANON_CAMERA_STATE_0x12: - subTagTypeBase = 0x1200; - startIndex = 0; - break; - case TAG_CANON_CAMERA_STATE_0xA0: - subTagTypeBase = 0xCA00; - startIndex = 1; - break; - case TAG_CANON_CAMERA_STATE_0xE0: - subTagTypeBase = 0xCE00; - startIndex = 1; - break; - - default: - { - // process as a normal tag - - // get the tag key and description - const char *key = s.getTagFieldName(TagLib::EXIF_MAKERNOTE_CANON, tag_id, defaultKey); - FreeImage_SetTagKey(tag, key); - const char *description = s.getTagDescription(TagLib::EXIF_MAKERNOTE_CANON, tag_id); - FreeImage_SetTagDescription(tag, description); - - // store the tag - if(key) { - FreeImage_SetMetadata(FIMD_EXIF_MAKERNOTE, dib, key, tag); - } - - return TRUE; - } - break; - - } - - WORD *pvalue = (WORD*)FreeImage_GetTagValue(tag); - - // create a tag - FITAG *canonTag = FreeImage_CreateTag(); - if(!canonTag) return FALSE; - - // we intentionally skip the first array member (if needed) - for (DWORD i = startIndex; i < FreeImage_GetTagCount(tag); i++) { - - tag_id = (WORD)(subTagTypeBase + i); - - FreeImage_SetTagID(canonTag, tag_id); - FreeImage_SetTagType(canonTag, FIDT_SHORT); - FreeImage_SetTagCount(canonTag, 1); - FreeImage_SetTagLength(canonTag, 2); - FreeImage_SetTagValue(canonTag, &pvalue[i]); - - // get the tag key and description - const char *key = s.getTagFieldName(TagLib::EXIF_MAKERNOTE_CANON, tag_id, defaultKey); - FreeImage_SetTagKey(canonTag, key); - const char *description = s.getTagDescription(TagLib::EXIF_MAKERNOTE_CANON, tag_id); - FreeImage_SetTagDescription(canonTag, description); - - // store the tag - if(key) { - FreeImage_SetMetadata(FIMD_EXIF_MAKERNOTE, dib, key, canonTag); - } - } - - // delete the tag - FreeImage_DeleteTag(canonTag); - - return TRUE; -} - -/** -Process a standard Exif tag -*/ -static void -processExifTag(FIBITMAP *dib, FITAG *tag, char *pval, BOOL msb_order, TagLib::MDMODEL md_model) { - char defaultKey[16]; - int n; - DWORD i; - - // allocate a buffer to store the tag value - BYTE *exif_value = (BYTE*)malloc(FreeImage_GetTagLength(tag) * sizeof(BYTE)); - if(NULL == exif_value) { - // out of memory ... - return; - } - memset(exif_value, 0, FreeImage_GetTagLength(tag) * sizeof(BYTE)); - - // get the tag value - switch(FreeImage_GetTagType(tag)) { - - case FIDT_SHORT: - { - WORD *value = (WORD*)&exif_value[0]; - for(i = 0; i < FreeImage_GetTagCount(tag); i++) { - value[i] = ReadUint16(msb_order, pval + i * sizeof(WORD)); - } - FreeImage_SetTagValue(tag, value); - break; - } - case FIDT_SSHORT: - { - short *value = (short*)&exif_value[0]; - for(i = 0; i < FreeImage_GetTagCount(tag); i++) { - value[i] = ReadInt16(msb_order, pval + i * sizeof(short)); - } - FreeImage_SetTagValue(tag, value); - break; - } - case FIDT_LONG: - { - DWORD *value = (DWORD*)&exif_value[0]; - for(i = 0; i < FreeImage_GetTagCount(tag); i++) { - value[i] = ReadUint32(msb_order, pval + i * sizeof(DWORD)); - } - FreeImage_SetTagValue(tag, value); - break; - } - case FIDT_SLONG: - { - LONG *value = (LONG*)&exif_value[0]; - for(i = 0; i < FreeImage_GetTagCount(tag); i++) { - value[i] = ReadInt32(msb_order, pval + i * sizeof(LONG)); - } - FreeImage_SetTagValue(tag, value); - break; - } - case FIDT_RATIONAL: - { - n = sizeof(DWORD); - - DWORD *value = (DWORD*)&exif_value[0]; - for(i = 0; i < 2 * FreeImage_GetTagCount(tag); i++) { - // read a sequence of (numerator, denominator) - value[i] = ReadUint32(msb_order, n*i + (char*)pval); - } - FreeImage_SetTagValue(tag, value); - break; - } - case FIDT_SRATIONAL: - { - n = sizeof(LONG); - - LONG *value = (LONG*)&exif_value[0]; - for(i = 0; i < 2 * FreeImage_GetTagCount(tag); i++) { - // read a sequence of (numerator, denominator) - value[i] = ReadInt32(msb_order, n*i + (char*)pval); - } - FreeImage_SetTagValue(tag, value); - break; - } - case FIDT_BYTE: - case FIDT_ASCII: - case FIDT_SBYTE: - case FIDT_UNDEFINED: - case FIDT_FLOAT: - case FIDT_DOUBLE: - default: - FreeImage_SetTagValue(tag, pval); - break; - } - - if(md_model == TagLib::EXIF_MAKERNOTE_CANON) { - // A single Canon tag can have multiple values within - processCanonMakerNoteTag(dib, tag); - } - else { - TagLib& s = TagLib::instance(); - - WORD tag_id = FreeImage_GetTagID(tag); - - // get the tag key and description - const char *key = s.getTagFieldName(md_model, tag_id, defaultKey); - FreeImage_SetTagKey(tag, key); - const char *description = s.getTagDescription(md_model, tag_id); - FreeImage_SetTagDescription(tag, description); - - // store the tag - if(key) { - FreeImage_SetMetadata(s.getFreeImageModel(md_model), dib, key, tag); - } - } - - - // free the temporary buffer - free(exif_value); - -} - -/** -Process Exif directory - -@param dib Input FIBITMAP -@param tiffp Pointer to the TIFF header -@param dwOffsetIfd0 Offset to the 0th IFD (first IFD) -@param dwLength Length of the Exif file -@param dwProfileOffset File offset to be used when reading 'offset/value' tags -@param msb_order Endianness order of the Exif file (TRUE if big-endian, FALSE if little-endian) -@param starting_md_model Metadata model of the IFD (should be TagLib::EXIF_MAIN for a jpeg) -@return Returns TRUE if sucessful, returns FALSE otherwise -*/ -static BOOL -jpeg_read_exif_dir(FIBITMAP *dib, const BYTE *tiffp, DWORD dwOffsetIfd0, DWORD dwLength, DWORD dwProfileOffset, BOOL msb_order, TagLib::MDMODEL starting_md_model) { - WORD de, nde; - - std::stack destack; // directory entries stack - std::stack ifdstack; // IFD stack - std::stack modelstack; // metadata model stack - - // Keep a list of already visited IFD to avoid stack overflows - // when recursive/cyclic directory structures exist. - // This kind of recursive Exif file was encountered with Kodak images coming from - // KODAK PROFESSIONAL DCS Photo Desk JPEG Export v3.2 W - std::map visitedIFD; - - /* - "An Image File Directory (IFD) consists of a 2-byte count of the number of directory - entries (i.e. the number of fields), followed by a sequence of 12-byte field - entries, followed by a 4-byte offset of the next IFD (or 0 if none)." - The "next IFD" (1st IFD) is the thumbnail. - */ - #define DIR_ENTRY_ADDR(_start, _entry) (_start + 2 + (12 * _entry)) - - // set the metadata model to Exif - - TagLib::MDMODEL md_model = starting_md_model; - - // set the pointer to the first IFD (0th IFD) and follow it were it leads. - - const BYTE *ifd0th = (BYTE*)tiffp + (size_t)dwOffsetIfd0; - - const BYTE *ifdp = ifd0th; - - de = 0; - - do { - // if there is anything on the stack then pop it off - if(!destack.empty()) { - ifdp = ifdstack.top(); ifdstack.pop(); - de = destack.top(); destack.pop(); - md_model = modelstack.top(); modelstack.pop(); - } - - // remember that we've visited this directory and entry so that we don't visit it again later - DWORD visited = (DWORD)( (((size_t)ifdp & 0xFFFF) << 16) | (size_t)de ); - if(visitedIFD.find(visited) != visitedIFD.end()) { - continue; - } else { - visitedIFD[visited] = 1; // processed - } - - // determine how many entries there are in the current IFD - nde = ReadUint16(msb_order, ifdp); - if (((size_t)(ifdp - tiffp) + 12 * nde) > (size_t)dwLength) { - // suspicious IFD offset, ignore - continue; - } - - for(; de < nde; de++) { - char *pde = NULL; // pointer to the directory entry - char *pval = NULL; // pointer to the tag value - - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(!tag) return FALSE; - - // point to the directory entry - pde = (char*) DIR_ENTRY_ADDR(ifdp, de); - - // get the tag ID - WORD tag_id = ReadUint16(msb_order, pde); - FreeImage_SetTagID(tag, tag_id); - - // get the tag type - WORD tag_type = (WORD)ReadUint16(msb_order, pde + 2); - if((tag_type - 1) >= EXIF_NUM_FORMATS) { - // a problem occured : delete the tag (not free'd after) - FreeImage_DeleteTag(tag); - // break out of the for loop - break; - } - FreeImage_SetTagType(tag, (FREE_IMAGE_MDTYPE)tag_type); - - // get number of components - DWORD tag_count = ReadUint32(msb_order, pde + 4); - FreeImage_SetTagCount(tag, tag_count); - - // check that tag length (size of the tag value in bytes) will fit in a DWORD - unsigned tag_data_width = FreeImage_TagDataWidth(FreeImage_GetTagType(tag)); - if (tag_data_width != 0 && FreeImage_GetTagCount(tag) > ~(DWORD)0 / tag_data_width) { - FreeImage_DeleteTag(tag); - // jump to next entry - continue; - } - FreeImage_SetTagLength(tag, FreeImage_GetTagCount(tag) * tag_data_width); - - if(FreeImage_GetTagLength(tag) <= 4) { - // 4 bytes or less and value is in the dir entry itself - pval = pde + 8; - } else { - // if its bigger than 4 bytes, the directory entry contains an offset - DWORD offset_value = ReadUint32(msb_order, pde + 8); - // the offset can be relative to tiffp or to an external reference (see JPEG-XR) - if(dwProfileOffset) { - offset_value -= dwProfileOffset; - } - // first check if offset exceeds buffer, at this stage FreeImage_GetTagLength may return invalid data - if(offset_value > dwLength) { - // a problem occured : delete the tag (not free'd after) - FreeImage_DeleteTag(tag); - // jump to next entry - continue; - } - // now check that length does not exceed the buffer size - if(FreeImage_GetTagLength(tag) > dwLength - offset_value){ - // a problem occured : delete the tag (not free'd after) - FreeImage_DeleteTag(tag); - // jump to next entry - continue; - } - pval = (char*)(tiffp + offset_value); - } - - // check for a IFD offset - BOOL isIFDOffset = FALSE; - switch(FreeImage_GetTagID(tag)) { - case TAG_EXIF_OFFSET: - case TAG_GPS_OFFSET: - case TAG_INTEROP_OFFSET: - case TAG_MAKER_NOTE: - isIFDOffset = TRUE; - break; - } - if(isIFDOffset) { - DWORD sub_offset = 0; - TagLib::MDMODEL next_mdmodel = md_model; - const BYTE *next_ifd = ifdp; - - // get offset and metadata model - if (FreeImage_GetTagID(tag) == TAG_MAKER_NOTE) { - processMakerNote(dib, pval, msb_order, &sub_offset, &next_mdmodel); - next_ifd = (BYTE*)pval + sub_offset; - } else { - processIFDOffset(tag, pval, msb_order, &sub_offset, &next_mdmodel); - next_ifd = (BYTE*)tiffp + sub_offset; - } - - if((sub_offset < dwLength) && (next_mdmodel != TagLib::UNKNOWN)) { - // push our current directory state onto the stack - ifdstack.push(ifdp); - // jump to the next entry - de++; - destack.push(de); - - // push our current metadata model - modelstack.push(md_model); - - // push new state onto of stack to cause a jump - ifdstack.push(next_ifd); - destack.push(0); - - // select a new metadata model - modelstack.push(next_mdmodel); - - // delete the tag as it won't be stored nor deleted in the for() loop - FreeImage_DeleteTag(tag); - - break; // break out of the for loop - } - else { - // unsupported camera model, canon maker tag or something unknown - // process as a standard tag - processExifTag(dib, tag, pval, msb_order, md_model); - } - - } else { - // process as a standard tag - processExifTag(dib, tag, pval, msb_order, md_model); - } - - // delete the tag - FreeImage_DeleteTag(tag); - - } // for(nde) - - // additional thumbnail data is skipped - - } while (!destack.empty()); - - // - // --- handle thumbnail data --- - // - - const WORD entriesCount0th = ReadUint16(msb_order, ifd0th); - - DWORD next_offset = ReadUint32(msb_order, DIR_ENTRY_ADDR(ifd0th, entriesCount0th)); - if((next_offset == 0) || (next_offset >= dwLength)) { - return TRUE; //< no thumbnail - } - - const BYTE* const ifd1st = (BYTE*)tiffp + next_offset; - const WORD entriesCount1st = ReadUint16(msb_order, ifd1st); - - unsigned thCompression = 0; - unsigned thOffset = 0; - unsigned thSize = 0; - - for(int e = 0; e < entriesCount1st; e++) { - - // point to the directory entry - const BYTE* base = DIR_ENTRY_ADDR(ifd1st, e); - - // check for buffer overflow - const size_t remaining = (size_t)base + 12 - (size_t)tiffp; - if(remaining >= dwLength) { - // bad IFD1 directory, ignore it - return FALSE; - } - - // get the tag ID - WORD tag = ReadUint16(msb_order, base); - // get the tag type - /*WORD type = */ReadUint16(msb_order, base + sizeof(WORD)); - // get number of components - /*DWORD count = */ReadUint32(msb_order, base + sizeof(WORD) + sizeof(WORD)); - // get the tag value - DWORD offset = ReadUint32(msb_order, base + sizeof(WORD) + sizeof(WORD) + sizeof(DWORD)); - - switch(tag) { - case TAG_COMPRESSION: - // Tiff Compression Tag (should be COMPRESSION_OJPEG (6), but is not always respected) - thCompression = offset; - break; - case TAG_JPEG_INTERCHANGE_FORMAT: - // Tiff JPEGInterchangeFormat Tag - thOffset = offset; - break; - case TAG_JPEG_INTERCHANGE_FORMAT_LENGTH: - // Tiff JPEGInterchangeFormatLength Tag - thSize = offset; - break; - // ### X and Y Resolution ignored, orientation ignored - case TAG_X_RESOLUTION: // XResolution - case TAG_Y_RESOLUTION: // YResolution - case TAG_RESOLUTION_UNIT: // ResolutionUnit - case TAG_ORIENTATION: // Orientation - break; - default: - break; - } - } - - if(/*thCompression != 6 ||*/ thOffset == 0 || thSize == 0) { - return TRUE; - } - - if(thOffset + thSize > dwLength) { - return TRUE; - } - - // load the thumbnail - - const BYTE *thLocation = tiffp + thOffset; - - FIMEMORY* hmem = FreeImage_OpenMemory(const_cast(thLocation), thSize); - FIBITMAP* thumbnail = FreeImage_LoadFromMemory(FIF_JPEG, hmem); - FreeImage_CloseMemory(hmem); - - // store the thumbnail - FreeImage_SetThumbnail(dib, thumbnail); - // then delete it - FreeImage_Unload(thumbnail); - - return TRUE; -} - -// -------------------------------------------------------------------------- - -/** -Read and decode JPEG_APP1 marker (Exif profile) -@param dib Input FIBITMAP -@param data Pointer to the APP1 marker -@param length APP1 marker length -@return Returns TRUE if successful, FALSE otherwise -*/ -BOOL -jpeg_read_exif_profile(FIBITMAP *dib, const BYTE *data, unsigned length) { - // marker identifying string for Exif = "Exif\0\0" - BYTE exif_signature[6] = { 0x45, 0x78, 0x69, 0x66, 0x00, 0x00 }; - BYTE lsb_first[4] = { 0x49, 0x49, 0x2A, 0x00 }; // Classic TIFF signature - little-endian order - BYTE msb_first[4] = { 0x4D, 0x4D, 0x00, 0x2A }; // Classic TIFF signature - big-endian order - - // profile size is up to 32-bit - DWORD dwProfileLength = (DWORD)length; - BYTE *pbProfile = (BYTE*)data; - - // verify the identifying string - if(memcmp(exif_signature, pbProfile, sizeof(exif_signature)) == 0) { - // This is an Exif profile - // should contain a TIFF header with up to 2 IFDs (IFD stands for 'Image File Directory') - // 0th IFD : the image attributes, 1st IFD : may be used for thumbnail - - pbProfile += sizeof(exif_signature); - dwProfileLength -= sizeof(exif_signature); - - // read the TIFF header (8 bytes) - - // check the endianess order - - BOOL bBigEndian = TRUE; - - if(memcmp(pbProfile, lsb_first, sizeof(lsb_first)) == 0) { - // Exif section is in little-endian order - bBigEndian = FALSE; - } else { - if(memcmp(pbProfile, msb_first, sizeof(msb_first)) == 0) { - // Exif section is in big-endian order - bBigEndian = TRUE; - } else { - // Invalid Exif alignment marker - return FALSE; - } - } - - // this is the offset to the first IFD (Image File Directory) - DWORD dwFirstOffset = ReadUint32(bBigEndian, pbProfile + 4); - if (dwFirstOffset > dwProfileLength) { - // bad Exif data - return FALSE; - } - - /* - Note: as FreeImage 3.14.0, this test is no longer needed for images with similar suspicious offset - => tested with Pentax Optio 230, FujiFilm SP-2500 and Canon EOS 300D - if (dwFirstOffset < 8 || dwFirstOffset > 16) { - // This is usually set to 8 - // but PENTAX Optio 230 has it set differently, and uses it as offset. - FreeImage_OutputMessageProc(FIF_JPEG, "Exif: Suspicious offset of first IFD value"); - return FALSE; - } - */ - - // process Exif directories, starting with Exif-TIFF IFD - return jpeg_read_exif_dir(dib, pbProfile, dwFirstOffset, dwProfileLength, 0, bBigEndian, TagLib::EXIF_MAIN); - } - - return FALSE; -} - -// ========================================================== -// Exif JPEG helper routines -// ========================================================== - -/** -Read JPEG_APP1 marker (Exif profile) -@param dib Input FIBITMAP -@param dataptr Pointer to the APP1 marker -@param datalen APP1 marker length -@return Returns TRUE if successful, FALSE otherwise -*/ -BOOL -jpeg_read_exif_profile_raw(FIBITMAP *dib, const BYTE *profile, unsigned length) { - // marker identifying string for Exif = "Exif\0\0" - BYTE exif_signature[6] = { 0x45, 0x78, 0x69, 0x66, 0x00, 0x00 }; - - // verify the identifying string - if(memcmp(exif_signature, profile, sizeof(exif_signature)) != 0) { - // not an Exif profile - return FALSE; - } - - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(tag) { - FreeImage_SetTagKey(tag, g_TagLib_ExifRawFieldName); - FreeImage_SetTagLength(tag, (DWORD)length); - FreeImage_SetTagCount(tag, (DWORD)length); - FreeImage_SetTagType(tag, FIDT_BYTE); - FreeImage_SetTagValue(tag, profile); - - // store the tag - FreeImage_SetMetadata(FIMD_EXIF_RAW, dib, FreeImage_GetTagKey(tag), tag); - - // destroy the tag - FreeImage_DeleteTag(tag); - - return TRUE; - } - - return FALSE; -} - -// ========================================================== -// Exif JPEG-XR helper routines -// ========================================================== - -/** -Read and decode JPEG-XR Exif IFD -@param dib Input FIBITMAP -@param profile Pointer to the Exif marker -@param length Exif marker length -@param file_offset Reference offset in the original file of each tag value whose length is > 4 -@return Returns TRUE if successful, FALSE otherwise -*/ -BOOL -jpegxr_read_exif_profile(FIBITMAP *dib, const BYTE *profile, unsigned length, unsigned file_offset) { - // assume Little Endian order - BOOL bBigEndian = FALSE; - - // process Exif specific IFD - return jpeg_read_exif_dir(dib, profile, 0, length, file_offset, bBigEndian, TagLib::EXIF_EXIF); -} - -/** -Read and decode JPEG-XR Exif-GPS IFD -@param dib Input FIBITMAP -@param profile Pointer to the Exif-GPS profile -@param length Exif-GPS profile length -@param file_offset Reference offset in the original file of each tag value whose length is > 4 -@return Returns TRUE if successful, FALSE otherwise -*/ -BOOL -jpegxr_read_exif_gps_profile(FIBITMAP *dib, const BYTE *profile, unsigned length, unsigned file_offset) { - // assume Little Endian order - BOOL bBigEndian = FALSE; - - // process Exif GPS IFD - return jpeg_read_exif_dir(dib, profile, 0, length, file_offset, bBigEndian, TagLib::EXIF_GPS); -} - -// ========================================================== -// Exif common helper routines -// ========================================================== - -/** -Rotate a dib according to Exif info -@param dib Input / Output dib to rotate -@see PluginJPEG.cpp -*/ -void -RotateExif(FIBITMAP **dib) { - // check for Exif rotation - if(FreeImage_GetMetadataCount(FIMD_EXIF_MAIN, *dib)) { - FIBITMAP *rotated = NULL; - // process Exif rotation - FITAG *tag = NULL; - FreeImage_GetMetadata(FIMD_EXIF_MAIN, *dib, "Orientation", &tag); - if((tag != NULL) && (FreeImage_GetTagID(tag) == TAG_ORIENTATION)) { - const WORD orientation = *((WORD *)FreeImage_GetTagValue(tag)); - switch (orientation) { - case 1: // "top, left side" => 0 - break; - case 2: // "top, right side" => flip left-right - FreeImage_FlipHorizontal(*dib); - break; - case 3: // "bottom, right side" => -180 - rotated = FreeImage_Rotate(*dib, 180); - FreeImage_Unload(*dib); - *dib = rotated; - break; - case 4: // "bottom, left side" => flip up-down - FreeImage_FlipVertical(*dib); - break; - case 5: // "left side, top" => +90 + flip up-down - rotated = FreeImage_Rotate(*dib, 90); - FreeImage_Unload(*dib); - *dib = rotated; - FreeImage_FlipVertical(*dib); - break; - case 6: // "right side, top" => -90 - rotated = FreeImage_Rotate(*dib, -90); - FreeImage_Unload(*dib); - *dib = rotated; - break; - case 7: // "right side, bottom" => -90 + flip up-down - rotated = FreeImage_Rotate(*dib, -90); - FreeImage_Unload(*dib); - *dib = rotated; - FreeImage_FlipVertical(*dib); - break; - case 8: // "left side, bottom" => +90 - rotated = FreeImage_Rotate(*dib, 90); - FreeImage_Unload(*dib); - *dib = rotated; - break; - default: - break; - } - } - } -} - -// ========================================================== -// Exif TIFF JPEG-XR helper routines -// ========================================================== - -class PredicateTagIDCompare { -public: - bool operator()(FITAG *a, FITAG *b) { - WORD tag_id_a = FreeImage_GetTagID(a); - WORD tag_id_b = FreeImage_GetTagID(b); - return (tag_id_a < tag_id_b); - } -}; - -/** -Write a metadata model as a TIF IFD to a FIMEMORY handle. -The entries in the TIF IFD are sorted in ascending order by tag id. -The last entry is written as 0 (4 bytes) which means no more IFD to follow. -Supported metadata models are -
    -
  • FIMD_EXIF_MAIN -
  • FIMD_EXIF_EXIF -
  • FIMD_EXIF_GPS -
  • FIMD_EXIF_INTEROP -
-The end of the buffer is filled with 4 bytes equal to 0 (end of IFD offset) - -@param dib Input FIBITMAP -@param md_model Metadata model to write -@param hmem Memory handle -@return Returns TRUE if successful, FALSE otherwise -@see tiff_get_ifd_profile -*/ -static BOOL -tiff_write_ifd(FIBITMAP *dib, FREE_IMAGE_MDMODEL md_model, FIMEMORY *hmem) { - FITAG *tag = NULL; - FIMETADATA *mdhandle = NULL; - std::vector vTagList; - TagLib::MDMODEL internal_md_model; - - DWORD ifd_offset = 0; // WORD-aligned IFD value offset - - const BYTE empty_byte = 0; - - // start of the file - const long start_of_file = FreeImage_TellMemory(hmem); - - // get the metadata count - unsigned metadata_count = FreeImage_GetMetadataCount(md_model, dib); - if(metadata_count == 0) { - return FALSE; - } - - TagLib& s = TagLib::instance(); - - // check for supported metadata models - switch(md_model) { - case FIMD_EXIF_MAIN: - internal_md_model = TagLib::EXIF_MAIN; - break; - case FIMD_EXIF_EXIF: - internal_md_model = TagLib::EXIF_EXIF; - break; - case FIMD_EXIF_GPS: - internal_md_model = TagLib::EXIF_GPS; - break; - case FIMD_EXIF_INTEROP: - internal_md_model = TagLib::EXIF_INTEROP; - break; - default: - return FALSE; - } - - try { - // 1) according to the TIFF specifications, - // the entries in a TIF IFD must be sorted in ascending order by tag id - - // store the tags into a vector - vTagList.reserve(metadata_count); - mdhandle = FreeImage_FindFirstMetadata(md_model, dib, &tag); - if(mdhandle) { - // parse the tags and store them inside vTagList - do { - // rewrite the tag id using FreeImage internal database - // (in case the tag id is wrong or missing) - const char *key = FreeImage_GetTagKey(tag); - int tag_id = s.getTagID(internal_md_model, key); - if(tag_id != -1) { - // this is a known tag, set the tag ID - FreeImage_SetTagID(tag, (WORD)tag_id); - // record the tag - vTagList.push_back(tag); - } - // else ignore this tag - } while(FreeImage_FindNextMetadata(mdhandle, &tag)); - - FreeImage_FindCloseMetadata(mdhandle); - - // sort the vector by tag id - std::sort(vTagList.begin(), vTagList.end(), PredicateTagIDCompare()); - - // update the metadata_count - metadata_count = (unsigned)vTagList.size(); - - } else { - throw(1); - } - - // 2) prepare the place for each IFD entries. - - /* - An Image File Directory (IFD) consists of a 2-byte count of the number of directory entries (i.e., the number of fields), - followed by a sequence of 12-byte field entries, - followed by a 4-byte offset of the next IFD (or 0 if none). Do not forget to write the 4 bytes of 0 after the last IFD. - */ - - { - // prepare place for 2 bytes for number of entries + 12 bytes for each entry - unsigned ifd_size = 2 + 12 * metadata_count; - FreeImage_WriteMemory(&empty_byte, 1, ifd_size, hmem); - // record the offset used to write values > 4-bytes - ifd_offset = FreeImage_TellMemory(hmem); - // rewind - FreeImage_SeekMemory(hmem, start_of_file, SEEK_SET); - } - - // 3) write each IFD entry in tag id ascending order - - // number of directory entries - WORD nde = (WORD)metadata_count; - FreeImage_WriteMemory(&nde, 1, 2, hmem); - - // for each entry ... - for(unsigned i = 0; i < metadata_count; i++) { - FITAG *tag = vTagList[i]; - // tag id - WORD tag_id = FreeImage_GetTagID(tag); - FreeImage_WriteMemory(&tag_id, 1, 2, hmem); - // tag type (compliant with TIFF specification) - WORD tag_type = (WORD)FreeImage_GetTagType(tag); - FreeImage_WriteMemory(&tag_type, 1, 2, hmem); - // tag count - DWORD tag_count = FreeImage_GetTagCount(tag); - FreeImage_WriteMemory(&tag_count, 1, 4, hmem); - // tag value or offset (results are in BYTE's units) - unsigned tag_length = FreeImage_GetTagLength(tag); - if(tag_length <= 4) { - // 4 bytes or less, write the value (left justified) - const BYTE *tag_value = (BYTE*)FreeImage_GetTagValue(tag); - FreeImage_WriteMemory(tag_value, 1, tag_length, hmem); - for(unsigned k = tag_length; k < 4; k++) { - FreeImage_WriteMemory(&empty_byte, 1, 1, hmem); - } - } else { - // write an offset - FreeImage_WriteMemory(&ifd_offset, 1, 4, hmem); - // write the value - long current_position = FreeImage_TellMemory(hmem); - FreeImage_SeekMemory(hmem, ifd_offset, SEEK_SET); - FreeImage_WriteMemory(FreeImage_GetTagValue(tag), 1, tag_length, hmem); - if(tag_length & 1) { - // align to the next WORD boundary - FreeImage_WriteMemory(&empty_byte, 1, 1, hmem); - } - // next offset to use - ifd_offset = FreeImage_TellMemory(hmem); - // rewind - FreeImage_SeekMemory(hmem, current_position, SEEK_SET); - } - } - - // end-of-IFD or next IFD (0 == none) - FreeImage_SeekMemory(hmem, ifd_offset, SEEK_SET); - FreeImage_WriteMemory(&empty_byte, 1, 4, hmem); - - return TRUE; - } - catch(int) { - return FALSE; - } -} - -/** -Write a metadata model as a TIF IFD, returns the IFD as a buffer. -The buffer is allocated by the function and must be freed by the caller, using 'free'. -@param dib Input FIBITMAP -@param md_model Metadata model to write -@param ppbProfile Returned buffer -@param uProfileLength Returned buffer size -@return Returns TRUE if successful, FALSE otherwise -@see tiff_write_ifd -*/ -BOOL -tiff_get_ifd_profile(FIBITMAP *dib, FREE_IMAGE_MDMODEL md_model, BYTE **ppbProfile, unsigned *uProfileLength) { - FIMEMORY *hmem = NULL; - - try { - // open a memory stream - hmem = FreeImage_OpenMemory(NULL, 0); - if(!hmem) { - throw(1); - } - - // write the metadata model as a TIF IFD - BOOL bResult = tiff_write_ifd(dib, md_model, hmem); - - if(bResult) { - BYTE *data = NULL; - DWORD size_in_bytes = 0; - - // get a pointer to the stream buffer - FreeImage_AcquireMemory(hmem, &data, &size_in_bytes); - - // (re-)allocate output buffer - BYTE *pbProfile = *ppbProfile; - pbProfile = (BYTE*)realloc(pbProfile, size_in_bytes); - if(!pbProfile) { - throw(1); - } else { - // copy IFD - memcpy(pbProfile, data, size_in_bytes); - *ppbProfile = pbProfile; - *uProfileLength = size_in_bytes; - } - } - - // free the memory stream - FreeImage_CloseMemory(hmem); - - return bResult; - - } catch(int) { - FreeImage_CloseMemory(hmem); - return FALSE; - } -} - -// ---------------------------------------------------------- -// Exif PSD routines -// ---------------------------------------------------------- - -/** -Read and decode PSD image resource (Exif profile) -@param dib Input FIBITMAP -@param data Pointer to the resource data -@param length Resource length -@return Returns TRUE if successful, FALSE otherwise -*/ -BOOL -psd_read_exif_profile(FIBITMAP *dib, const BYTE *data, unsigned int length) { - BYTE lsb_first[4] = { 0x49, 0x49, 0x2A, 0x00 }; // Classic TIFF signature - little-endian order - BYTE msb_first[4] = { 0x4D, 0x4D, 0x00, 0x2A }; // Classic TIFF signature - big-endian order - - // profile size is up to 32-bit - DWORD dwProfileLength = (DWORD)length; - BYTE *pbProfile = (BYTE*)data; - - // This is an Exif profile - // should contain a TIFF header with up to 2 IFDs (IFD stands for 'Image File Directory') - // 0th IFD : the image attributes, 1st IFD : may be used for thumbnail - - // read the TIFF header (8 bytes) - - // check the endianess order - - BOOL bBigEndian = TRUE; - - if(memcmp(pbProfile, lsb_first, sizeof(lsb_first)) == 0) { - // Exif section is in little-endian order - bBigEndian = FALSE; - } else { - if(memcmp(pbProfile, msb_first, sizeof(msb_first)) == 0) { - // Exif section is in big-endian order - bBigEndian = TRUE; - } else { - // Invalid Exif alignment marker - return FALSE; - } - } - - // this is the offset to the first IFD (Image File Directory) - DWORD dwFirstOffset = ReadUint32(bBigEndian, pbProfile + 4); - if (dwFirstOffset > dwProfileLength) { - // bad Exif data - return FALSE; - } - - // process Exif directories, starting with Exif-TIFF IFD - return jpeg_read_exif_dir(dib, pbProfile, dwFirstOffset, dwProfileLength, 0, bBigEndian, TagLib::EXIF_MAIN); -} - -/** -Read PSD image resource (Exif profile) -@param dib Input FIBITMAP -@param dataptr Pointer to the resource data -@param datalen Resource length -@return Returns TRUE if successful, FALSE otherwise -*/ -BOOL -psd_read_exif_profile_raw(FIBITMAP *dib, const BYTE *profile, unsigned length) { - // marker identifying string for Exif = "Exif\0\0" - // used by JPEG not PSD - BYTE exif_signature[6] = { 0x45, 0x78, 0x69, 0x66, 0x00, 0x00 }; - - if(NULL == profile || length == 0) { - return FALSE; - } - - DWORD dwProfileLength = (DWORD)length + sizeof(exif_signature); - BYTE *pbProfile = (BYTE*)malloc(dwProfileLength); - if(NULL == pbProfile) { - // out of memory ... - return FALSE; - } - memcpy(pbProfile, exif_signature, sizeof(exif_signature)); - memcpy(pbProfile + sizeof(exif_signature), profile, length); - - // create a tag - FITAG *tag = FreeImage_CreateTag(); - BOOL bSuccess = FALSE; - if(tag) { - FreeImage_SetTagKey(tag, g_TagLib_ExifRawFieldName); - FreeImage_SetTagLength(tag, dwProfileLength); - FreeImage_SetTagCount(tag, dwProfileLength); - FreeImage_SetTagType(tag, FIDT_BYTE); - FreeImage_SetTagValue(tag, pbProfile); - - // store the tag - FreeImage_SetMetadata(FIMD_EXIF_RAW, dib, FreeImage_GetTagKey(tag), tag); - - // destroy the tag - FreeImage_DeleteTag(tag); - - bSuccess = TRUE; - } - free(pbProfile); - - return bSuccess; -} diff --git a/Dependencies/FreeImage/Source/Metadata/FIRational.cpp b/Dependencies/FreeImage/Source/Metadata/FIRational.cpp deleted file mode 100644 index d383c8d..0000000 --- a/Dependencies/FreeImage/Source/Metadata/FIRational.cpp +++ /dev/null @@ -1,176 +0,0 @@ -// ========================================================== -// Helper class for rational numbers -// -// Design and implementation by -// - Herv Drolon -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#include "FreeImage.h" -#include "Utilities.h" -#include "FIRational.h" - -/// Initialize and normalize a rational number -void FIRational::initialize(LONG n, LONG d) { - if(d) { - _numerator = n; - _denominator = d; - // normalize rational - normalize(); - } else { - _numerator = 0; - _denominator = 0; - } -} - -/// Default constructor -FIRational::FIRational() { - _numerator = 0; - _denominator = 0; -} - -/// Constructor with longs -FIRational::FIRational(LONG n, LONG d) { - initialize(n, d); -} - -/// Constructor with FITAG -FIRational::FIRational(const FITAG *tag) { - switch(FreeImage_GetTagType((FITAG*)tag)) { - case FIDT_RATIONAL: // 64-bit unsigned fraction - { - DWORD *pvalue = (DWORD*)FreeImage_GetTagValue((FITAG*)tag); - initialize((LONG)pvalue[0], (LONG)pvalue[1]); - break; - } - - case FIDT_SRATIONAL: // 64-bit signed fraction - { - LONG *pvalue = (LONG*)FreeImage_GetTagValue((FITAG*)tag); - initialize((LONG)pvalue[0], (LONG)pvalue[1]); - break; - } - } -} - -FIRational::FIRational(float value) { - if (value == (float)((LONG)value)) { - _numerator = (LONG)value; - _denominator = 1L; - } else { - int k, count; - LONG n[4]; - - float x = fabs(value); - int sign = (value > 0) ? 1 : -1; - - // make a continued-fraction expansion of x - count = -1; - for(k = 0; k < 4; k++) { - n[k] = (LONG)floor(x); - count++; - x -= (float)n[k]; - if(x == 0) break; - x = 1 / x; - } - // compute the rational - _numerator = 1; - _denominator = n[count]; - - for(int i = count - 1; i >= 0; i--) { - if(n[i] == 0) break; - LONG _num = (n[i] * _numerator + _denominator); - LONG _den = _numerator; - _numerator = _num; - _denominator = _den; - } - _numerator *= sign; - } -} - -/// Copy constructor -FIRational::FIRational (const FIRational& r) { - initialize(r._numerator, r._denominator); -} - -/// Destructor -FIRational::~FIRational() { -} - -/// Assignement operator -FIRational& FIRational::operator=(FIRational& r) { - if(this != &r) { - initialize(r._numerator, r._denominator); - } - return *this; -} - -/// Get the numerator -LONG FIRational::getNumerator() { - return _numerator; -} - -/// Get the denominator -LONG FIRational::getDenominator() { - return _denominator; -} - -/// Calculate GCD -LONG FIRational::gcd(LONG a, LONG b) { - LONG temp; - while (b) { // While non-zero value - temp = b; // Save current value - b = a % b; // Assign remainder of division - a = temp; // Copy old value - } - return a; // Return GCD of numbers -} - -/// Normalize numerator / denominator -void FIRational::normalize() { - if (_numerator != 1 && _denominator != 1) { // Is there something to do? - // Calculate GCD - LONG common = gcd(_numerator, _denominator); - if (common != 1) { // If GCD is not one - _numerator /= common; // Calculate new numerator - _denominator /= common; // Calculate new denominator - } - } - if(_denominator < 0) { // If sign is in denominator - _numerator *= -1; // Multiply num and den by -1 - _denominator *= -1; // To keep sign in numerator - } -} - -/// Checks if this rational number is an Integer, either positive or negative -BOOL FIRational::isInteger() { - if(_denominator == 1 || (_denominator != 0 && (_numerator % _denominator == 0)) || (_denominator == 0 && _numerator == 0)) - return TRUE; - return FALSE; -} - -/// Convert as "numerator/denominator" -std::string FIRational::toString() { - std::ostringstream s; - if(isInteger()) { - s << intValue(); - } else { - s << _numerator << "/" << _denominator; - } - return s.str(); -} - - diff --git a/Dependencies/FreeImage/Source/Metadata/FIRational.h b/Dependencies/FreeImage/Source/Metadata/FIRational.h deleted file mode 100644 index 7cc6f34..0000000 --- a/Dependencies/FreeImage/Source/Metadata/FIRational.h +++ /dev/null @@ -1,108 +0,0 @@ -// ========================================================== -// Helper class for rational numbers -// -// Design and implementation by -// - Herv Drolon -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifndef FREEIMAGE_FIRATIONAL_H -#define FREEIMAGE_FIRATIONAL_H - -/** -Helper class to deal with rational numbers. -NB: LONG data type is assumed to be a signed 32-bit number. -*/ -class FIRational { -private: - /// numerator - LONG _numerator; - /// denominator - LONG _denominator; - -public: - /// Default constructor - FIRational(); - - /// Constructor with longs - FIRational(LONG n, LONG d = 1); - - /// Constructor with FITAG - FIRational(const FITAG *tag); - - /// Constructor with a float - FIRational(float value); - - /// Copy constructor - FIRational (const FIRational& r); - - /// Destructor - ~FIRational(); - - /// Assignement operator - FIRational& operator=(FIRational& r); - - /// Get the numerator - LONG getNumerator(); - - /// Get the denominator - LONG getDenominator(); - - /// Converts rational value by truncating towards zero - LONG truncate() { - // Return truncated rational - return _denominator ? (LONG) (_numerator / _denominator) : 0; - } - - /**@name Implicit conversions */ - //@{ - short shortValue() { - return (short)truncate(); - } - int intValue() { - return (int)truncate(); - } - LONG longValue() { - return (LONG)truncate(); - } - float floatValue() { - return _denominator ? ((float)_numerator)/((float)_denominator) : 0; - } - double doubleValue() { - return _denominator ? ((double)_numerator)/((double)_denominator) : 0; - } - //@} - - /// Checks if this rational number is an integer, either positive or negative - BOOL isInteger(); - - /// Convert as "numerator/denominator" - std::string toString(); - -private: - /// Initialize and normalize a rational number - void initialize(LONG n, LONG d); - - /// Calculate GCD - LONG gcd(LONG a, LONG b); - - /// Normalize numerator / denominator - void normalize(); - -}; - -#endif // FREEIMAGE_FIRATIONAL_H - diff --git a/Dependencies/FreeImage/Source/Metadata/FreeImageTag.cpp b/Dependencies/FreeImage/Source/Metadata/FreeImageTag.cpp deleted file mode 100644 index cc12a5d..0000000 --- a/Dependencies/FreeImage/Source/Metadata/FreeImageTag.cpp +++ /dev/null @@ -1,353 +0,0 @@ -// ========================================================== -// Tag manipulation functions -// -// Design and implementation by -// - Herv Drolon -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include "FreeImage.h" -#include "Utilities.h" -#include "FreeImageTag.h" - -// -------------------------------------------------------------------------- -// FITAG header definition -// -------------------------------------------------------------------------- - -FI_STRUCT (FITAGHEADER) { - char *key; // tag field name - char *description; // tag description - WORD id; // tag ID - WORD type; // tag data type (see FREE_IMAGE_MDTYPE) - DWORD count; // number of components (in 'tag data types' units) - DWORD length; // value length in bytes - void *value; // tag value -}; - -// -------------------------------------------------------------------------- -// FITAG creation / destruction -// -------------------------------------------------------------------------- - -FITAG * DLL_CALLCONV -FreeImage_CreateTag() { - FITAG *tag = (FITAG *)malloc(sizeof(FITAG)); - - if (tag != NULL) { - unsigned tag_size = sizeof(FITAGHEADER); - tag->data = (BYTE *)malloc(tag_size * sizeof(BYTE)); - if (tag->data != NULL) { - memset(tag->data, 0, tag_size); - return tag; - } - free(tag); - } - - return NULL; -} - -void DLL_CALLCONV -FreeImage_DeleteTag(FITAG *tag) { - if (NULL != tag) { - if (NULL != tag->data) { - FITAGHEADER *tag_header = (FITAGHEADER *)tag->data; - // delete tag members - free(tag_header->key); - free(tag_header->description); - free(tag_header->value); - // delete the tag - free(tag->data); - } - // and the wrapper - free(tag); - } -} - -FITAG * DLL_CALLCONV -FreeImage_CloneTag(FITAG *tag) { - if(!tag) return NULL; - - // allocate a new tag - FITAG *clone = FreeImage_CreateTag(); - if(!clone) return NULL; - - try { - // copy the tag - FITAGHEADER *src_tag = (FITAGHEADER *)tag->data; - FITAGHEADER *dst_tag = (FITAGHEADER *)clone->data; - - // tag ID - dst_tag->id = src_tag->id; - // tag key - if(src_tag->key) { - dst_tag->key = (char*)malloc((strlen(src_tag->key) + 1) * sizeof(char)); - if(!dst_tag->key) { - throw FI_MSG_ERROR_MEMORY; - } - strcpy(dst_tag->key, src_tag->key); - } - // tag description - if(src_tag->description) { - dst_tag->description = (char*)malloc((strlen(src_tag->description) + 1) * sizeof(char)); - if(!dst_tag->description) { - throw FI_MSG_ERROR_MEMORY; - } - strcpy(dst_tag->description, src_tag->description); - } - // tag data type - dst_tag->type = src_tag->type; - // tag count - dst_tag->count = src_tag->count; - // tag length - dst_tag->length = src_tag->length; - // tag value - switch(dst_tag->type) { - case FIDT_ASCII: - dst_tag->value = (BYTE*)malloc((src_tag->length + 1) * sizeof(BYTE)); - if(!dst_tag->value) { - throw FI_MSG_ERROR_MEMORY; - } - memcpy(dst_tag->value, src_tag->value, src_tag->length); - ((BYTE*)dst_tag->value)[src_tag->length] = 0; - break; - default: - dst_tag->value = (BYTE*)malloc(src_tag->length * sizeof(BYTE)); - if(!dst_tag->value) { - throw FI_MSG_ERROR_MEMORY; - } - memcpy(dst_tag->value, src_tag->value, src_tag->length); - break; - } - - return clone; - - } catch(const char *message) { - FreeImage_DeleteTag(clone); - FreeImage_OutputMessageProc(FIF_UNKNOWN, message); - return NULL; - } -} - -// -------------------------------------------------------------------------- -// FITAG getters / setters -// -------------------------------------------------------------------------- - -const char * DLL_CALLCONV -FreeImage_GetTagKey(FITAG *tag) { - return tag ? ((FITAGHEADER *)tag->data)->key : 0; -} - -const char * DLL_CALLCONV -FreeImage_GetTagDescription(FITAG *tag) { - return tag ? ((FITAGHEADER *)tag->data)->description : 0; -} - -WORD DLL_CALLCONV -FreeImage_GetTagID(FITAG *tag) { - return tag ? ((FITAGHEADER *)tag->data)->id : 0; -} - -FREE_IMAGE_MDTYPE DLL_CALLCONV -FreeImage_GetTagType(FITAG *tag) { - return tag ? (FREE_IMAGE_MDTYPE)(((FITAGHEADER *)tag->data)->type) : FIDT_NOTYPE; -} - -DWORD DLL_CALLCONV -FreeImage_GetTagCount(FITAG *tag) { - return tag ? ((FITAGHEADER *)tag->data)->count : 0; -} - -DWORD DLL_CALLCONV -FreeImage_GetTagLength(FITAG *tag) { - return tag ? ((FITAGHEADER *)tag->data)->length : 0; -} - -const void *DLL_CALLCONV -FreeImage_GetTagValue(FITAG *tag) { - return tag ? ((FITAGHEADER *)tag->data)->value : 0; -} - -BOOL DLL_CALLCONV -FreeImage_SetTagKey(FITAG *tag, const char *key) { - if(tag && key) { - FITAGHEADER *tag_header = (FITAGHEADER *)tag->data; - if(tag_header->key) free(tag_header->key); - tag_header->key = (char*)malloc(strlen(key) + 1); - strcpy(tag_header->key, key); - return TRUE; - } - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_SetTagDescription(FITAG *tag, const char *description) { - if(tag && description) { - FITAGHEADER *tag_header = (FITAGHEADER *)tag->data; - if(tag_header->description) free(tag_header->description); - tag_header->description = (char*)malloc(strlen(description) + 1); - strcpy(tag_header->description, description); - return TRUE; - } - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_SetTagID(FITAG *tag, WORD id) { - if(tag) { - FITAGHEADER *tag_header = (FITAGHEADER *)tag->data; - tag_header->id = id; - return TRUE; - } - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_SetTagType(FITAG *tag, FREE_IMAGE_MDTYPE type) { - if(tag) { - FITAGHEADER *tag_header = (FITAGHEADER *)tag->data; - tag_header->type = (WORD)type; - return TRUE; - } - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_SetTagCount(FITAG *tag, DWORD count) { - if(tag) { - FITAGHEADER *tag_header = (FITAGHEADER *)tag->data; - tag_header->count = count; - return TRUE; - } - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_SetTagLength(FITAG *tag, DWORD length) { - if(tag) { - FITAGHEADER *tag_header = (FITAGHEADER *)tag->data; - tag_header->length = length; - return TRUE; - } - return FALSE; -} - -BOOL DLL_CALLCONV -FreeImage_SetTagValue(FITAG *tag, const void *value) { - if(tag && value) { - FITAGHEADER *tag_header = (FITAGHEADER *)tag->data; - // first, check the tag - if(tag_header->count * FreeImage_TagDataWidth((FREE_IMAGE_MDTYPE)tag_header->type) != tag_header->length) { - // invalid data count ? - return FALSE; - } - - if(tag_header->value) { - free(tag_header->value); - } - - switch(tag_header->type) { - case FIDT_ASCII: - { - tag_header->value = (char*)malloc((tag_header->length + 1) * sizeof(char)); - if(!tag_header->value) { - return FALSE; - } - char *src_data = (char*)value; - char *dst_data = (char*)tag_header->value; - for(DWORD i = 0; i < tag_header->length; i++) { - dst_data[i] = src_data[i]; - } - dst_data[tag_header->length] = '\0'; - } - break; - - default: - tag_header->value = malloc(tag_header->length * sizeof(BYTE)); - if(!tag_header->value) { - return FALSE; - } - memcpy(tag_header->value, value, tag_header->length); - break; - } - return TRUE; - } - return FALSE; -} - - -// -------------------------------------------------------------------------- -// FITAG internal helper functions -// -------------------------------------------------------------------------- - -unsigned -FreeImage_TagDataWidth(FREE_IMAGE_MDTYPE type) { - static const unsigned format_bytes[] = { - 0, // FIDT_NOTYPE = 0, // placeholder - 1, // FIDT_BYTE = 1, // 8-bit unsigned integer - 1, // FIDT_ASCII = 2, // 8-bit bytes w/ last byte null - 2, // FIDT_SHORT = 3, // 16-bit unsigned integer - 4, // FIDT_LONG = 4, // 32-bit unsigned integer - 8, // FIDT_RATIONAL = 5, // 64-bit unsigned fraction - 1, // FIDT_SBYTE = 6, // 8-bit signed integer - 1, // FIDT_UNDEFINED= 7, // 8-bit untyped data - 2, // FIDT_SSHORT = 8, // 16-bit signed integer - 4, // FIDT_SLONG = 9, // 32-bit signed integer - 8, // FIDT_SRATIONAL= 10, // 64-bit signed fraction - 4, // FIDT_FLOAT = 11, // 32-bit IEEE floating point - 8, // FIDT_DOUBLE = 12, // 64-bit IEEE floating point - 4, // FIDT_IFD = 13, // 32-bit unsigned integer (offset) - 4, // FIDT_PALETTE = 14 // 32-bit RGBQUAD - 0, // placeholder (15) - 8, // FIDT_LONG8 = 16, // 64-bit unsigned integer - 8, // FIDT_SLONG8 = 17, // 64-bit signed integer - 8 // FIDT_IFD8 = 18 // 64-bit unsigned integer (offset) - }; - - return (type < (sizeof(format_bytes)/sizeof(format_bytes[0]))) ? - format_bytes[type] : 0; -} - -size_t -FreeImage_GetTagMemorySize(FITAG *tag) { - size_t size = 0; - if (tag) { - FITAGHEADER *tag_header = (FITAGHEADER *)tag->data; - size += sizeof(FITAG); - size += sizeof(FITAGHEADER); - if (tag_header->key) { - size += strlen(tag_header->key) + 1; - } - if (tag_header->description) { - size += strlen(tag_header->description) + 1; - } - if (tag_header->value) { - switch (tag_header->type) { - case FIDT_ASCII: - // for ASCII strings, the value of the count part of an ASCII tag entry includes the NULL. - // however, FreeImage adds another '\0' to be sure that this last character is present. - size += tag_header->length + 1; - break; - default: - size += tag_header->length; - break; - } - } - } - return size; -} diff --git a/Dependencies/FreeImage/Source/Metadata/FreeImageTag.h b/Dependencies/FreeImage/Source/Metadata/FreeImageTag.h deleted file mode 100644 index ea28d6a..0000000 --- a/Dependencies/FreeImage/Source/Metadata/FreeImageTag.h +++ /dev/null @@ -1,506 +0,0 @@ -// ========================================================== -// Tag manipulation functions -// -// Design and implementation by -// - Herv Drolon -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifndef FREEIMAGE_TAG_H -#define FREEIMAGE_TAG_H - -// ========================================================== -// Exif JPEG tags -// ========================================================== - -// ---------------------------------------------------------- -// TIFF Rev. 6.0 Attribute Information Used in Exif -// ---------------------------------------------------------- - -// Tags relating to image data structure - -#define TAG_IMAGE_WIDTH 0x0100 -#define TAG_IMAGE_HEIGHT 0x0101 -#define TAG_BITS_PER_SAMPLE 0x0102 -#define TAG_COMPRESSION 0x0103 -#define TAG_PHOTOMETRIC_INTERPRETATION 0x0106 -#define TAG_ORIENTATION 0x0112 -#define TAG_SAMPLES_PER_PIXEL 0x0115 -#define TAG_PLANAR_CONFIGURATION 0x011C -#define TAG_YCBCR_SUBSAMPLING 0x0212 -#define TAG_YCBCR_POSITIONING 0x0213 -#define TAG_X_RESOLUTION 0x011A -#define TAG_Y_RESOLUTION 0x011B -#define TAG_RESOLUTION_UNIT 0x0128 - -// LibTIF compression modes - -#define TAG_COMPRESSION_NONE 1 /* dump mode */ -#define TAG_COMPRESSION_CCITTRLE 2 /* CCITT modified Huffman RLE */ -#define TAG_COMPRESSION_CCITTFAX3 3 /* CCITT Group 3 fax encoding */ -#define TAG_COMPRESSION_CCITT_T4 3 /* CCITT T.4 (TIFF 6 name) */ -#define TAG_COMPRESSION_CCITTFAX4 4 /* CCITT Group 4 fax encoding */ -#define TAG_COMPRESSION_CCITT_T6 4 /* CCITT T.6 (TIFF 6 name) */ -#define TAG_COMPRESSION_LZW 5 /* Lempel-Ziv & Welch */ -#define TAG_COMPRESSION_OJPEG 6 /* !6.0 JPEG */ -#define TAG_COMPRESSION_JPEG 7 /* %JPEG DCT compression */ -#define TAG_COMPRESSION_NEXT 32766 /* NeXT 2-bit RLE */ -#define TAG_COMPRESSION_CCITTRLEW 32771 /* #1 w/ word alignment */ -#define TAG_COMPRESSION_PACKBITS 32773 /* Macintosh RLE */ -#define TAG_COMPRESSION_THUNDERSCAN 32809 /* ThunderScan RLE */ -/* codes 32895-32898 are reserved for ANSI IT8 TIFF/IT */ -#define TAG_COMPRESSION_DCS 32947 /* Kodak DCS encoding */ -#define TAG_COMPRESSION_JBIG 34661 /* ISO JBIG */ -#define TAG_COMPRESSION_SGILOG 34676 /* SGI Log Luminance RLE */ -#define TAG_COMPRESSION_SGILOG24 34677 /* SGI Log 24-bit packed */ -#define TAG_COMPRESSION_JP2000 34712 /* Leadtools JPEG2000 */ -#define TAG_COMPRESSION_LZMA 34925 /* LZMA2 */ - -// Tags relating to recording offset - -#define TAG_STRIP_OFFSETS 0x0111 -#define TAG_ROWS_PER_STRIP 0x0116 -#define TAG_STRIP_BYTE_COUNTS 0x0117 -#define TAG_JPEG_INTERCHANGE_FORMAT 0x0201 -#define TAG_JPEG_INTERCHANGE_FORMAT_LENGTH 0x0202 - -// Tags relating to image data characteristics - -#define TAG_TRANSFER_FUNCTION 0x012D -#define TAG_WHITE_POINT 0x013E -#define TAG_PRIMARY_CHROMATICITIES 0x013F -#define TAG_YCBCR_COEFFICIENTS 0x0211 -#define TAG_REFERENCE_BLACK_WHITE 0x0214 - -// Other tags - -#define TAG_DATETIME 0x0132 -#define TAG_IMAGE_DESCRIPTION 0x010E -#define TAG_MAKE 0x010F -#define TAG_MODEL 0x0110 -#define TAG_SOFTWARE 0x0131 -#define TAG_ARTIST 0x013B -#define TAG_COPYRIGHT 0x8298 - -// ---------------------------------------------------------- -// Exif IFD Attribute Information -// ---------------------------------------------------------- - -// Tags relating to version - -#define TAG_EXIF_VERSION 0x9000 -#define TAG_FLASHPIX_VERSION 0xA000 - -// Tag relating to image data characteristics - -#define TAG_COLOR_SPACE 0xA001 - -// Tags relating to image configuration - -#define TAG_COMPONENTS_CONFIGURATION 0x9101 -#define TAG_COMPRESSED_BITS_PER_PIXEL 0x9102 -#define TAG_PIXEL_X_DIMENSION 0xA002 -#define TAG_PIXEL_Y_DIMENSION 0xA003 - -// Tags relating to user information - -#define TAG_MARKER_NOTE 0x927C -#define TAG_USER_COMMENT 0x9286 - -// Tag relating to related file information - -#define TAG_RELATED_SOUND_FILE 0xA004 - -// Tags relating to date and time - -#define TAG_DATETIME_ORIGINAL 0x9003 -#define TAG_DATETIME_DIGITIZED 0x9004 -#define TAG_SUBSECOND_TIME 0x9290 -#define TAG_SUBSECOND_TIME_ORIGINAL 0x9291 -#define TAG_SUBSECOND_TIME_DIGITIZED 0x9292 - -// Tags relating to picture-taking conditions - -#define TAG_EXPOSURE_TIME 0x829A -#define TAG_FNUMBER 0x829D -#define TAG_EXPOSURE_PROGRAM 0x8822 -#define TAG_SPECTRAL_SENSITIVITY 0x8824 -#define TAG_ISO_SPEED_RATINGS 0x8827 -#define TAG_OECF 0x8828 -#define TAG_SHUTTER_SPEED_VALUE 0x9201 -#define TAG_APERTURE_VALUE 0x9202 -#define TAG_BRIGHTNESS_VALUE 0x9203 -#define TAG_EXPOSURE_BIAS_VALUE 0x9204 -#define TAG_MAX_APERTURE_VALUE 0x9205 -#define TAG_SUBJECT_DISTANCE 0x9206 -#define TAG_METERING_MODE 0x9207 -#define TAG_LIGHT_SOURCE 0x9208 -#define TAG_FLASH 0x9209 -#define TAG_FOCAL_LENGTH 0x920A -#define TAG_SUBJECT_AREA 0x9214 -#define TAG_FLASH_ENERGY 0xA20B -#define TAG_SPATIAL_FREQ_RESPONSE 0xA20C -#define TAG_FOCAL_PLANE_X_RES 0xA20E -#define TAG_FOCAL_PLANE_Y_RES 0xA20F -#define TAG_FOCAL_PLANE_UNIT 0xA210 -#define TAG_SUBJECT_LOCATION 0xA214 -#define TAG_EXPOSURE_INDEX 0xA215 -#define TAG_SENSING_METHOD 0xA217 -#define TAG_FILE_SOURCE 0xA300 -#define TAG_SCENE_TYPE 0xA301 -#define TAG_CFA_PATTERN 0xA302 -#define TAG_CUSTOM_RENDERED 0xA401 -#define TAG_EXPOSURE_MODE 0xA402 -#define TAG_WHITE_BALANCE 0xA403 -#define TAG_DIGITAL_ZOOM_RATIO 0xA404 -#define TAG_FOCAL_LENGTH_IN_35MM_FILM 0xA405 -#define TAG_SCENE_CAPTURE_TYPE 0xA406 -#define TAG_GAIN_CONTROL 0xA407 -#define TAG_CONTRAST 0xA408 -#define TAG_SATURATION 0xA409 -#define TAG_SHARPNESS 0xA40A -#define TAG_DEVICE_SETTING_DESCRIPTION 0xA40B -#define TAG_SUBJECT_DISTANCE_RANGE 0xA40C - -// Other tags - -#define TAG_IMAGE_UNIQUE_ID 0xA420 - -// ---------------------------------------------------------- -// GPS Attribute Information -// ---------------------------------------------------------- - -#define TAG_GPS_VERSION_ID 0x0000 -#define TAG_GPS_LATITUDE_REF 0x0001 -#define TAG_GPS_LATITUDE 0x0002 -#define TAG_GPS_LONGITUDE_REF 0x0003 -#define TAG_GPS_LONGITUDE 0x0004 -#define TAG_GPS_ALTITUDE_REF 0x0005 -#define TAG_GPS_ALTITUDE 0x0006 -#define TAG_GPS_TIME_STAMP 0x0007 -#define TAG_GPS_SATELLITES 0x0008 -#define TAG_GPS_STATUS 0x0009 -#define TAG_GPS_MEASURE_MODE 0x000A -#define TAG_GPS_DOP 0x000B -#define TAG_GPS_SPEED_REF 0x000C -#define TAG_GPS_SPEED 0x000D -#define TAG_GPS_TRACK_REF 0x000E -#define TAG_GPS_TRACK 0x000F -#define TAG_GPS_IMG_DIRECTION_REF 0x0010 -#define TAG_GPS_IMG_DIRECTION 0x0011 -#define TAG_GPS_MAP_DATUM 0x0012 -#define TAG_GPS_DEST_LATITUDE_REF 0x0013 -#define TAG_GPS_DEST_LATITUDE 0x0014 -#define TAG_GPS_DEST_LONGITUDE_REF 0x0015 -#define TAG_GPS_DEST_LONGITUDE 0x0016 -#define TAG_GPS_DEST_BEARING_REF 0x0017 -#define TAG_GPS_DEST_BEARING 0x0018 -#define TAG_GPS_DEST_DISTANCE_REF 0x0019 -#define TAG_GPS_DEST_DISTANCE 0x001A -#define TAG_GPS_PROCESSING_METHOD 0x001B -#define TAG_GPS_AREA_INFORMATION 0x001C -#define TAG_GPS_DATE_STAMP 0x001D -#define TAG_GPS_DIFFERENTIAL 0x001E - -// ========================================================== -// IPTC/NAA tags -// ========================================================== - -#define TAG_RECORD_VERSION 0x0200 -#define TAG_CAPTION 0x0278 -#define TAG_WRITER 0x027A -#define TAG_HEADLINE 0x0269 -#define TAG_SPECIAL_INSTRUCTIONS 0x0228 -#define TAG_BY_LINE 0x0250 -#define TAG_BY_LINE_TITLE 0x0255 -#define TAG_CREDIT 0x026E -#define TAG_SOURCE 0x0273 -#define TAG_OBJECT_NAME 0x0205 -#define TAG_DATE_CREATED 0x0237 -#define TAG_CITY 0x025A -#define TAG_PROVINCE_OR_STATE 0x025F -#define TAG_COUNTRY_OR_PRIMARY_LOCATION 0x0265 -#define TAG_ORIGINAL_TRANSMISSION_REFERENCE 0x0267 -#define TAG_CATEGORY 0x020F -#define TAG_SUPPLEMENTAL_CATEGORIES 0x0214 -#define TAG_URGENCY 0x020A -#define TAG_KEYWORDS 0x0219 -#define TAG_COPYRIGHT_NOTICE 0x0274 -#define TAG_RELEASE_DATE 0x021E -#define TAG_RELEASE_TIME 0x0223 -#define TAG_TIME_CREATED 0x023C -#define TAG_ORIGINATING_PROGRAM 0x0241 - -// ========================================================== -// GeoTIFF tags -// ========================================================== - -// tags 33550 is a private tag registered to SoftDesk, Inc -#define TIFFTAG_GEOPIXELSCALE 33550 -// tags 33920-33921 are private tags registered to Intergraph, Inc -#define TIFFTAG_INTERGRAPH_MATRIX 33920 -#define TIFFTAG_GEOTIEPOINTS 33922 -// tags 34263-34264 are private tags registered to NASA-JPL Carto Group -#define TIFFTAG_JPL_CARTO_IFD 34263 -#define TIFFTAG_GEOTRANSMATRIX 34264 /* New Matrix Tag replaces 33920 */ -// tags 34735-3438 are private tags registered to SPOT Image, Inc -#define TIFFTAG_GEOKEYDIRECTORY 34735 -#define TIFFTAG_GEODOUBLEPARAMS 34736 -#define TIFFTAG_GEOASCIIPARAMS 34737 - -// ========================================================== -// FreeImage Animation tags -// ========================================================== - -#define ANIMTAG_LOGICALWIDTH 0x0001 -#define ANIMTAG_LOGICALHEIGHT 0x0002 -#define ANIMTAG_GLOBALPALETTE 0x0003 -#define ANIMTAG_LOOP 0x0004 -#define ANIMTAG_FRAMELEFT 0x1001 -#define ANIMTAG_FRAMETOP 0x1002 -#define ANIMTAG_NOLOCALPALETTE 0x1003 -#define ANIMTAG_INTERLACED 0x1004 -#define ANIMTAG_FRAMETIME 0x1005 -#define ANIMTAG_DISPOSALMETHOD 0x1006 - -// -------------------------------------------------------------------------- -// Helper functions to deal with the FITAG structure -// -------------------------------------------------------------------------- - -/** -Describes the tag format descriptor -Given a FREE_IMAGE_MDTYPE, calculate the size of this type in bytes unit -@param type Tag data type -@return Returns the size of the data type, in bytes -@see FREE_IMAGE_MDTYPE -*/ -unsigned FreeImage_TagDataWidth(FREE_IMAGE_MDTYPE type); - -/** -Calculate the memory size required by a tag, including the size of the structure -@param tag The tag to examine -@return Retuns the memory size used by a tag -*/ -size_t FreeImage_GetTagMemorySize(FITAG *tag); - -// -------------------------------------------------------------------------- - -/** - Structure to hold a tag information -*/ -typedef struct tagTagInfo { - WORD tag; // Tag ID (required) - char *fieldname; // Field name (required) - char *description; // Field description (may be NULL) -} TagInfo; - - -/** -Class to hold tag information (based on Meyers Singleton).
- -Sample usage :
- -TagLib& s = TagLib::instance(); -TagInfo *tag_info = s.getTagInfo(EXIF_MAIN, 0x0100); - - -Note on multi-threaded applications : - -The singleton pattern must be carefully constructed in multi-threaded applications. -If two threads are to execute the creation method at the same time when a singleton -does not yet exist, they both must check for an instance of the singleton and then -only one should create the new one. -The classic solution to this problem is to use mutual exclusion on the class that -indicates that the object is being instantiated. -The FreeImage solution is to instantiate the singleton before any other thread is launched, -i.e. inside the FreeImage_Initialise function (see Plugin.cpp). -*/ - -class TagLib { -public: - - /** - internal tag info tables registered in TagLib - */ - enum MDMODEL { - UNKNOWN, - EXIF_MAIN, - EXIF_EXIF, - EXIF_GPS, - EXIF_INTEROP, - EXIF_MAKERNOTE_CANON, - EXIF_MAKERNOTE_CASIOTYPE1, - EXIF_MAKERNOTE_CASIOTYPE2, - EXIF_MAKERNOTE_FUJIFILM, - EXIF_MAKERNOTE_KYOCERA, - EXIF_MAKERNOTE_MINOLTA, - EXIF_MAKERNOTE_NIKONTYPE1, - EXIF_MAKERNOTE_NIKONTYPE2, - EXIF_MAKERNOTE_NIKONTYPE3, - EXIF_MAKERNOTE_OLYMPUSTYPE1, - EXIF_MAKERNOTE_PANASONIC, - EXIF_MAKERNOTE_ASAHI, - EXIF_MAKERNOTE_PENTAX, - EXIF_MAKERNOTE_SONY, - EXIF_MAKERNOTE_SIGMA_SD1, - EXIF_MAKERNOTE_SIGMA_FOVEON, - IPTC, - GEOTIFF, - ANIMATION - }; - -private: - - typedef std::map TAGINFO; - typedef std::map TABLEMAP; - - /// store hash tables for all known tag info tables - TABLEMAP _table_map; - -private: - /** - Constructor (private)
- This is where the tag info tables are initialized. - @see addMetadataModel - */ - TagLib(); - - /// Assignement operator (disabled) - void operator=(TagLib&); - - /// Copy constructor (disabled) - TagLib(const TagLib&); - - /** - Used in the constructor to initialize the tag tables - @param md_model Internal metadata model - @param tag_table Tag info table - @return Returns TRUE if successful, returns FALSE otherwise - */ - BOOL addMetadataModel(MDMODEL md_model, TagInfo *tag_table); - -public: - /// Destructor - ~TagLib(); - - /** - @return Returns a reference to the TagLib instance - */ - static TagLib& instance(); - - /** - Given a tag ID, returns its TagInfo descriptor - @param md_model Internal metadata model - @param tagID tag ID - @return Returns the TagInfo descriptor if successful, returns NULL otherwise - */ - const TagInfo* getTagInfo(MDMODEL md_model, WORD tagID); - - /** - Given a tag ID, returns its tag field name. - When the tag is unknown and defaultKey is not NULL, a string such as "Tag 0x1234" is returned. - This string is contained in the provided defaultKey buffer (assumed to be an array of at least 16 chars). - @param md_model Internal metadata model - @param tagID tag ID - @param defaultKey Assumed to be an array of 16 chars. If not NULL, build a key for unknown tags - @return Returns the tag field name if successful, returns an 'unknown tag' string contained in defaultKey otherwise - */ - const char* getTagFieldName(MDMODEL md_model, WORD tagID, char *defaultKey); - - /** - Given a tag ID, returns its description. - When the tag has no description, a NULL value is returned. - @param md_model Internal metadata model - @param tagID tag ID - @return Returns the tag description if successful, returns NULL otherwise - */ - const char* getTagDescription(MDMODEL md_model, WORD tagID); - - /** - Given a tag field name, returns its tag ID. - When the tag doesn't exists, a value '-1' is returned. - @param md_model Internal metadata model - @param key tag field name - @return Returns the tag ID if successful, returns -1 otherwise - */ - int getTagID(MDMODEL md_model, const char *key); - - /** - Perform a conversion between internal metadata models and FreeImage public metadata models - @param md_model Internal metadata model - */ - FREE_IMAGE_MDMODEL getFreeImageModel(MDMODEL model); - -}; - -// -------------------------------------------------------------------------- -// Constant strings -// -------------------------------------------------------------------------- - -/// Name of the XMP field -static const char *g_TagLib_XMPFieldName = "XMLPacket"; - -/// Name of the Exif raw field -static const char *g_TagLib_ExifRawFieldName = "ExifRaw"; - -// -------------------------------------------------------------------------- -// Metadata routines -// -------------------------------------------------------------------------- - -#if defined(__cplusplus) -extern "C" { -#endif - -// JPEG / JPEG-XR Exif profile (see Exif.cpp) -// -------------------------------------------------------------------------- -BOOL jpeg_read_exif_profile(FIBITMAP *dib, const BYTE *dataptr, unsigned datalen); -BOOL jpeg_read_exif_profile_raw(FIBITMAP *dib, const BYTE *profile, unsigned length); -BOOL jpegxr_read_exif_profile(FIBITMAP *dib, const BYTE *profile, unsigned length, unsigned file_offset); -BOOL jpegxr_read_exif_gps_profile(FIBITMAP *dib, const BYTE *profile, unsigned length, unsigned file_offset); - -BOOL tiff_get_ifd_profile(FIBITMAP *dib, FREE_IMAGE_MDMODEL md_model, BYTE **ppbProfile, unsigned *uProfileLength); - - -// PSD Exif profile (see Exif.cpp) -// -------------------------------------------------------------------------- -BOOL psd_read_exif_profile(FIBITMAP *dib, const BYTE *dataptr, unsigned datalen); -BOOL psd_read_exif_profile_raw(FIBITMAP *dib, const BYTE *dataptr, unsigned datalen); - - -// JPEG / PSD / TIFF IPTC profile (see IPTC.cpp) -// -------------------------------------------------------------------------- -BOOL read_iptc_profile(FIBITMAP *dib, const BYTE *dataptr, unsigned int datalen); -BOOL write_iptc_profile(FIBITMAP *dib, BYTE **profile, unsigned *profile_size); - -#if defined(__cplusplus) -} -#endif - - -#endif // FREEIMAGE_TAG_H - - diff --git a/Dependencies/FreeImage/Source/Metadata/IPTC.cpp b/Dependencies/FreeImage/Source/Metadata/IPTC.cpp deleted file mode 100644 index bde718c..0000000 --- a/Dependencies/FreeImage/Source/Metadata/IPTC.cpp +++ /dev/null @@ -1,342 +0,0 @@ -// ========================================================== -// Metadata functions implementation -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include "FreeImage.h" -#include "Utilities.h" -#include "FreeImageTag.h" - -// ---------------------------------------------------------- -// IPTC JPEG / TIFF markers routines -// ---------------------------------------------------------- - -static const char* IPTC_DELIMITER = ";"; // keywords/supplemental category delimiter -/** - Read and decode IPTC binary data -*/ -BOOL -read_iptc_profile(FIBITMAP *dib, const BYTE *dataptr, unsigned int datalen) { - char defaultKey[16]; - size_t length = datalen; - BYTE *profile = (BYTE*)dataptr; - - const char *JPEG_AdobeCM_Tag = "Adobe_CM"; - - std::string Keywords; - std::string SupplementalCategory; - - WORD tag_id; - - if(!dataptr || (datalen == 0)) { - return FALSE; - } - - if(datalen > 8) { - if(memcmp(JPEG_AdobeCM_Tag, dataptr, 8) == 0) { - // the "Adobe_CM" APP13 segment presumably contains color management information, - // but the meaning of the data is currently unknown. - // If anyone has an idea about what this means, please let me know. - return FALSE; - } - } - - - // create a tag - - FITAG *tag = FreeImage_CreateTag(); - - TagLib& tag_lib = TagLib::instance(); - - // find start of the BIM portion of the binary data - size_t offset = 0; - while(offset < length - 1) { - if((profile[offset] == 0x1C) && (profile[offset+1] == 0x02)) - break; - offset++; - } - - // for each tag - while (offset < length) { - - // identifies start of a tag - if (profile[offset] != 0x1c) { - break; - } - // we need at least five bytes left to read a tag - if ((offset + 5) >= length) { - break; - } - - offset++; - - int directoryType = profile[offset++]; - int tagType = profile[offset++];; - int tagByteCount = ((profile[offset] & 0xFF) << 8) | (profile[offset + 1] & 0xFF); - offset += 2; - - if ((offset + tagByteCount) > length) { - // data for tag extends beyond end of iptc segment - break; - } - - if(tagByteCount == 0) { - // go to next tag - continue; - } - - // process the tag - - tag_id = (WORD)(tagType | (directoryType << 8)); - - FreeImage_SetTagID(tag, tag_id); - FreeImage_SetTagLength(tag, tagByteCount); - - // allocate a buffer to store the tag value - BYTE *iptc_value = (BYTE*)malloc((tagByteCount + 1) * sizeof(BYTE)); - memset(iptc_value, 0, (tagByteCount + 1) * sizeof(BYTE)); - - // get the tag value - - switch (tag_id) { - case TAG_RECORD_VERSION: - { - // short - FreeImage_SetTagType(tag, FIDT_SSHORT); - FreeImage_SetTagCount(tag, 1); - short *pvalue = (short*)&iptc_value[0]; - *pvalue = (short)((profile[offset] << 8) | profile[offset + 1]); - FreeImage_SetTagValue(tag, pvalue); - break; - } - - case TAG_RELEASE_DATE: - case TAG_DATE_CREATED: - // Date object - case TAG_RELEASE_TIME: - case TAG_TIME_CREATED: - // time - default: - { - // string - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagCount(tag, tagByteCount); - for(int i = 0; i < tagByteCount; i++) { - iptc_value[i] = profile[offset + i]; - } - iptc_value[tagByteCount] = '\0'; - FreeImage_SetTagValue(tag, (char*)&iptc_value[0]); - break; - } - } - - if(tag_id == TAG_SUPPLEMENTAL_CATEGORIES) { - // concatenate the categories - if(SupplementalCategory.length() == 0) { - SupplementalCategory.append((char*)iptc_value); - } else { - SupplementalCategory.append(IPTC_DELIMITER); - SupplementalCategory.append((char*)iptc_value); - } - } - else if(tag_id == TAG_KEYWORDS) { - // concatenate the keywords - if(Keywords.length() == 0) { - Keywords.append((char*)iptc_value); - } else { - Keywords.append(IPTC_DELIMITER); - Keywords.append((char*)iptc_value); - } - } - else { - // get the tag key and description - const char *key = tag_lib.getTagFieldName(TagLib::IPTC, tag_id, defaultKey); - FreeImage_SetTagKey(tag, key); - const char *description = tag_lib.getTagDescription(TagLib::IPTC, tag_id); - FreeImage_SetTagDescription(tag, description); - - // store the tag - if(key) { - FreeImage_SetMetadata(FIMD_IPTC, dib, key, tag); - } - } - - free(iptc_value); - - // next tag - offset += tagByteCount; - - } - - // store the 'keywords' tag - if(Keywords.length()) { - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagID(tag, TAG_KEYWORDS); - FreeImage_SetTagKey(tag, tag_lib.getTagFieldName(TagLib::IPTC, TAG_KEYWORDS, defaultKey)); - FreeImage_SetTagDescription(tag, tag_lib.getTagDescription(TagLib::IPTC, TAG_KEYWORDS)); - FreeImage_SetTagLength(tag, (DWORD)Keywords.length()); - FreeImage_SetTagCount(tag, (DWORD)Keywords.length()); - FreeImage_SetTagValue(tag, (char*)Keywords.c_str()); - FreeImage_SetMetadata(FIMD_IPTC, dib, FreeImage_GetTagKey(tag), tag); - } - - // store the 'supplemental category' tag - if(SupplementalCategory.length()) { - FreeImage_SetTagType(tag, FIDT_ASCII); - FreeImage_SetTagID(tag, TAG_SUPPLEMENTAL_CATEGORIES); - FreeImage_SetTagKey(tag, tag_lib.getTagFieldName(TagLib::IPTC, TAG_SUPPLEMENTAL_CATEGORIES, defaultKey)); - FreeImage_SetTagDescription(tag, tag_lib.getTagDescription(TagLib::IPTC, TAG_SUPPLEMENTAL_CATEGORIES)); - FreeImage_SetTagLength(tag, (DWORD)SupplementalCategory.length()); - FreeImage_SetTagCount(tag, (DWORD)SupplementalCategory.length()); - FreeImage_SetTagValue(tag, (char*)SupplementalCategory.c_str()); - FreeImage_SetMetadata(FIMD_IPTC, dib, FreeImage_GetTagKey(tag), tag); - } - - // delete the tag - - FreeImage_DeleteTag(tag); - - return TRUE; -} - -// -------------------------------------------------------------------------- - -static BYTE* -append_iptc_tag(BYTE *profile, unsigned *profile_size, WORD id, DWORD length, const void *value) { - BYTE *buffer = NULL; - - // calculate the new buffer size - size_t buffer_size = (5 + *profile_size + length) * sizeof(BYTE); - buffer = (BYTE*)malloc(buffer_size); - if(!buffer) - return NULL; - - // add the header - buffer[0] = 0x1C; - buffer[1] = 0x02; - // add the tag type - buffer[2] = (BYTE)(id & 0x00FF); - // add the tag length - buffer[3] = (BYTE)(length >> 8); - buffer[4] = (BYTE)(length & 0xFF); - // add the tag value - memcpy(buffer + 5, (BYTE*)value, length); - // append the previous profile - if(NULL == profile) { - *profile_size = (5 + length); - } - else { - memcpy(buffer + 5 + length, profile, *profile_size); - *profile_size += (5 + length); - free(profile); - } - - return buffer; -} - -/** -Encode IPTC metadata into a binary buffer. -The buffer is allocated by the function and must be freed by the caller. -*/ -BOOL -write_iptc_profile(FIBITMAP *dib, BYTE **profile, unsigned *profile_size) { - FITAG *tag = NULL; - FIMETADATA *mdhandle = NULL; - - BYTE *buffer = NULL; - unsigned buffer_size = 0; - - // parse all IPTC tags and rebuild a IPTC profile - mdhandle = FreeImage_FindFirstMetadata(FIMD_IPTC, dib, &tag); - - if(mdhandle) { - do { - WORD tag_id = FreeImage_GetTagID(tag); - - // append the tag to the profile - - switch(tag_id) { - case TAG_RECORD_VERSION: - // ignore (already handled) - break; - - case TAG_SUPPLEMENTAL_CATEGORIES: - case TAG_KEYWORDS: - if(FreeImage_GetTagType(tag) == FIDT_ASCII) { - std::string value = (const char*)FreeImage_GetTagValue(tag); - - // split the tag value - std::vector output; - std::string delimiter = IPTC_DELIMITER; - - size_t offset = 0; - size_t delimiterIndex = 0; - - delimiterIndex = value.find(delimiter, offset); - while (delimiterIndex != std::string::npos) { - output.push_back(value.substr(offset, delimiterIndex - offset)); - offset += delimiterIndex - offset + delimiter.length(); - delimiterIndex = value.find(delimiter, offset); - } - output.push_back(value.substr(offset)); - - // add as many tags as there are comma separated strings - for(int i = 0; i < (int)output.size(); i++) { - std::string& tag_value = output[i]; - buffer = append_iptc_tag(buffer, &buffer_size, tag_id, (DWORD)tag_value.length(), tag_value.c_str()); - } - - } - break; - - case TAG_URGENCY: - if(FreeImage_GetTagType(tag) == FIDT_ASCII) { - DWORD length = 1; // keep the first octet only - buffer = append_iptc_tag(buffer, &buffer_size, tag_id, length, FreeImage_GetTagValue(tag)); - } - break; - - default: - if(FreeImage_GetTagType(tag) == FIDT_ASCII) { - DWORD length = FreeImage_GetTagLength(tag); - buffer = append_iptc_tag(buffer, &buffer_size, tag_id, length, FreeImage_GetTagValue(tag)); - } - break; - } - - } while(FreeImage_FindNextMetadata(mdhandle, &tag)); - - FreeImage_FindCloseMetadata(mdhandle); - - // add the DirectoryVersion tag - const short version = 0x0200; - buffer = append_iptc_tag(buffer, &buffer_size, TAG_RECORD_VERSION, sizeof(version), &version); - - *profile = buffer; - *profile_size = buffer_size; - - return TRUE; - } - - return FALSE; -} diff --git a/Dependencies/FreeImage/Source/Metadata/TagConversion.cpp b/Dependencies/FreeImage/Source/Metadata/TagConversion.cpp deleted file mode 100644 index bbba444..0000000 --- a/Dependencies/FreeImage/Source/Metadata/TagConversion.cpp +++ /dev/null @@ -1,1094 +0,0 @@ -// ========================================================== -// Tag to string conversion functions -// -// Design and implementation by -// - Herv Drolon -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include "FreeImage.h" -#include "Utilities.h" -#include "FreeImageTag.h" -#include "FIRational.h" - -#define MAX_TEXT_EXTENT 512 - -/** -Convert a tag to a C string -*/ -static const char* -ConvertAnyTag(FITAG *tag) { - char format[MAX_TEXT_EXTENT]; - static std::string buffer; - DWORD i; - - if(!tag) - return NULL; - - buffer.erase(); - - // convert the tag value to a string buffer - - FREE_IMAGE_MDTYPE tag_type = FreeImage_GetTagType(tag); - DWORD tag_count = FreeImage_GetTagCount(tag); - - switch(tag_type) { - case FIDT_BYTE: // N x 8-bit unsigned integer - { - BYTE *pvalue = (BYTE*)FreeImage_GetTagValue(tag); - - sprintf(format, "%ld", (LONG) pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, " %ld", (LONG) pvalue[i]); - buffer += format; - } - break; - } - case FIDT_SHORT: // N x 16-bit unsigned integer - { - unsigned short *pvalue = (unsigned short *)FreeImage_GetTagValue(tag); - - sprintf(format, "%hu", pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, " %hu", pvalue[i]); - buffer += format; - } - break; - } - case FIDT_LONG: // N x 32-bit unsigned integer - { - DWORD *pvalue = (DWORD *)FreeImage_GetTagValue(tag); - - sprintf(format, "%lu", pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, " %lu", pvalue[i]); - buffer += format; - } - break; - } - case FIDT_RATIONAL: // N x 64-bit unsigned fraction - { - DWORD *pvalue = (DWORD*)FreeImage_GetTagValue(tag); - - sprintf(format, "%ld/%ld", pvalue[0], pvalue[1]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, " %ld/%ld", pvalue[2*i], pvalue[2*i+1]); - buffer += format; - } - break; - } - case FIDT_SBYTE: // N x 8-bit signed integer - { - char *pvalue = (char*)FreeImage_GetTagValue(tag); - - sprintf(format, "%ld", (LONG) pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, " %ld", (LONG) pvalue[i]); - buffer += format; - } - break; - } - case FIDT_SSHORT: // N x 16-bit signed integer - { - short *pvalue = (short *)FreeImage_GetTagValue(tag); - - sprintf(format, "%hd", pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, " %hd", pvalue[i]); - buffer += format; - } - break; - } - case FIDT_SLONG: // N x 32-bit signed integer - { - LONG *pvalue = (LONG *)FreeImage_GetTagValue(tag); - - sprintf(format, "%ld", pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, " %ld", pvalue[i]); - buffer += format; - } - break; - } - case FIDT_SRATIONAL:// N x 64-bit signed fraction - { - LONG *pvalue = (LONG*)FreeImage_GetTagValue(tag); - - sprintf(format, "%ld/%ld", pvalue[0], pvalue[1]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, " %ld/%ld", pvalue[2*i], pvalue[2*i+1]); - buffer += format; - } - break; - } - case FIDT_FLOAT: // N x 32-bit IEEE floating point - { - float *pvalue = (float *)FreeImage_GetTagValue(tag); - - sprintf(format, "%f", (double) pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, "%f", (double) pvalue[i]); - buffer += format; - } - break; - } - case FIDT_DOUBLE: // N x 64-bit IEEE floating point - { - double *pvalue = (double *)FreeImage_GetTagValue(tag); - - sprintf(format, "%f", pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, "%f", pvalue[i]); - buffer += format; - } - break; - } - case FIDT_IFD: // N x 32-bit unsigned integer (offset) - { - DWORD *pvalue = (DWORD *)FreeImage_GetTagValue(tag); - - sprintf(format, "%X", pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, " %X", pvalue[i]); - buffer += format; - } - break; - } - case FIDT_PALETTE: // N x 32-bit RGBQUAD - { - RGBQUAD *pvalue = (RGBQUAD *)FreeImage_GetTagValue(tag); - - sprintf(format, "(%d,%d,%d,%d)", pvalue[0].rgbRed, pvalue[0].rgbGreen, pvalue[0].rgbBlue, pvalue[0].rgbReserved); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, " (%d,%d,%d,%d)", pvalue[i].rgbRed, pvalue[i].rgbGreen, pvalue[i].rgbBlue, pvalue[i].rgbReserved); - buffer += format; - } - break; - } - - case FIDT_LONG8: // N x 64-bit unsigned integer - { - UINT64 *pvalue = (UINT64 *)FreeImage_GetTagValue(tag); - - sprintf(format, "%lld", pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, "%lld", pvalue[i]); - buffer += format; - } - break; - } - - case FIDT_IFD8: // N x 64-bit unsigned integer (offset) - { - UINT64 *pvalue = (UINT64 *)FreeImage_GetTagValue(tag); - - sprintf(format, "%llX", pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, "%llX", pvalue[i]); - buffer += format; - } - break; - } - - case FIDT_SLONG8: // N x 64-bit signed integer - { - INT64 *pvalue = (INT64 *)FreeImage_GetTagValue(tag); - - sprintf(format, "%lld", pvalue[0]); - buffer += format; - for(i = 1; i < tag_count; i++) { - sprintf(format, "%lld", pvalue[i]); - buffer += format; - } - break; - } - - case FIDT_ASCII: // 8-bit bytes w/ last byte null - case FIDT_UNDEFINED:// 8-bit untyped data - default: - { - int max_size = MIN((int)FreeImage_GetTagLength(tag), (int)MAX_TEXT_EXTENT); - if(max_size == MAX_TEXT_EXTENT) - max_size--; - memcpy(format, (char*)FreeImage_GetTagValue(tag), max_size); - format[max_size] = '\0'; - buffer += format; - break; - } - } - - return buffer.c_str(); -} - -/** -Convert a Exif tag to a C string -*/ -static const char* -ConvertExifTag(FITAG *tag) { - char format[MAX_TEXT_EXTENT]; - static std::string buffer; - - if(!tag) - return NULL; - - buffer.erase(); - - // convert the tag value to a string buffer - - switch(FreeImage_GetTagID(tag)) { - case TAG_ORIENTATION: - { - unsigned short orientation = *((unsigned short *)FreeImage_GetTagValue(tag)); - switch (orientation) { - case 1: - return "top, left side"; - case 2: - return "top, right side"; - case 3: - return "bottom, right side"; - case 4: - return "bottom, left side"; - case 5: - return "left side, top"; - case 6: - return "right side, top"; - case 7: - return "right side, bottom"; - case 8: - return "left side, bottom"; - default: - break; - } - } - break; - - case TAG_REFERENCE_BLACK_WHITE: - { - DWORD *pvalue = (DWORD*)FreeImage_GetTagValue(tag); - if(FreeImage_GetTagLength(tag) == 48) { - // reference black point value and reference white point value (ReferenceBlackWhite) - int blackR = 0, whiteR = 0, blackG = 0, whiteG = 0, blackB = 0, whiteB = 0; - if(pvalue[1]) - blackR = (int)(pvalue[0] / pvalue[1]); - if(pvalue[3]) - whiteR = (int)(pvalue[2] / pvalue[3]); - if(pvalue[5]) - blackG = (int)(pvalue[4] / pvalue[5]); - if(pvalue[7]) - whiteG = (int)(pvalue[6] / pvalue[7]); - if(pvalue[9]) - blackB = (int)(pvalue[8] / pvalue[9]); - if(pvalue[11]) - whiteB = (int)(pvalue[10] / pvalue[11]); - - sprintf(format, "[%d,%d,%d] [%d,%d,%d]", blackR, blackG, blackB, whiteR, whiteG, whiteB); - buffer += format; - return buffer.c_str(); - } - - } - break; - - case TAG_COLOR_SPACE: - { - unsigned short colorSpace = *((unsigned short *)FreeImage_GetTagValue(tag)); - if (colorSpace == 1) { - return "sRGB"; - } else if (colorSpace == 65535) { - return "Undefined"; - } else { - return "Unknown"; - } - } - break; - - case TAG_COMPONENTS_CONFIGURATION: - { - const char *componentStrings[7] = {"", "Y", "Cb", "Cr", "R", "G", "B"}; - BYTE *pvalue = (BYTE*)FreeImage_GetTagValue(tag); - for(DWORD i = 0; i < MIN((DWORD)4, FreeImage_GetTagCount(tag)); i++) { - int j = pvalue[i]; - if(j > 0 && j < 7) - buffer += componentStrings[j]; - } - return buffer.c_str(); - } - break; - - case TAG_COMPRESSED_BITS_PER_PIXEL: - { - FIRational r(tag); - buffer = r.toString(); - if(buffer == "1") - buffer += " bit/pixel"; - else - buffer += " bits/pixel"; - return buffer.c_str(); - } - break; - - case TAG_X_RESOLUTION: - case TAG_Y_RESOLUTION: - case TAG_FOCAL_PLANE_X_RES: - case TAG_FOCAL_PLANE_Y_RES: - case TAG_BRIGHTNESS_VALUE: - case TAG_EXPOSURE_BIAS_VALUE: - { - FIRational r(tag); - buffer = r.toString(); - return buffer.c_str(); - } - break; - - case TAG_RESOLUTION_UNIT: - case TAG_FOCAL_PLANE_UNIT: - { - unsigned short resolutionUnit = *((unsigned short *)FreeImage_GetTagValue(tag)); - switch (resolutionUnit) { - case 1: - return "(No unit)"; - case 2: - return "inches"; - case 3: - return "cm"; - default: - break; - } - } - break; - - case TAG_YCBCR_POSITIONING: - { - unsigned short yCbCrPosition = *((unsigned short *)FreeImage_GetTagValue(tag)); - switch (yCbCrPosition) { - case 1: - return "Center of pixel array"; - case 2: - return "Datum point"; - default: - break; - } - } - break; - - case TAG_EXPOSURE_TIME: - { - FIRational r(tag); - buffer = r.toString(); - buffer += " sec"; - return buffer.c_str(); - } - break; - - case TAG_SHUTTER_SPEED_VALUE: - { - FIRational r(tag); - LONG apexValue = r.longValue(); - LONG apexPower = 1 << apexValue; - sprintf(format, "1/%d sec", (int)apexPower); - buffer += format; - return buffer.c_str(); - } - break; - - case TAG_APERTURE_VALUE: - case TAG_MAX_APERTURE_VALUE: - { - FIRational r(tag); - double apertureApex = r.doubleValue(); - double rootTwo = sqrt((double)2); - double fStop = pow(rootTwo, apertureApex); - sprintf(format, "F%.1f", fStop); - buffer += format; - return buffer.c_str(); - } - break; - - case TAG_FNUMBER: - { - FIRational r(tag); - double fnumber = r.doubleValue(); - sprintf(format, "F%.1f", fnumber); - buffer += format; - return buffer.c_str(); - } - break; - - case TAG_FOCAL_LENGTH: - { - FIRational r(tag); - double focalLength = r.doubleValue(); - sprintf(format, "%.1f mm", focalLength); - buffer += format; - return buffer.c_str(); - } - break; - - case TAG_FOCAL_LENGTH_IN_35MM_FILM: - { - unsigned short focalLength = *((unsigned short *)FreeImage_GetTagValue(tag)); - sprintf(format, "%hu mm", focalLength); - buffer += format; - return buffer.c_str(); - } - break; - - case TAG_FLASH: - { - unsigned short flash = *((unsigned short *)FreeImage_GetTagValue(tag)); - switch(flash) { - case 0x0000: - return "Flash did not fire"; - case 0x0001: - return "Flash fired"; - case 0x0005: - return "Strobe return light not detected"; - case 0x0007: - return "Strobe return light detected"; - case 0x0009: - return "Flash fired, compulsory flash mode"; - case 0x000D: - return "Flash fired, compulsory flash mode, return light not detected"; - case 0x000F: - return "Flash fired, compulsory flash mode, return light detected"; - case 0x0010: - return "Flash did not fire, compulsory flash mode"; - case 0x0018: - return "Flash did not fire, auto mode"; - case 0x0019: - return "Flash fired, auto mode"; - case 0x001D: - return "Flash fired, auto mode, return light not detected"; - case 0x001F: - return "Flash fired, auto mode, return light detected"; - case 0x0020: - return "No flash function"; - case 0x0041: - return "Flash fired, red-eye reduction mode"; - case 0x0045: - return "Flash fired, red-eye reduction mode, return light not detected"; - case 0x0047: - return "Flash fired, red-eye reduction mode, return light detected"; - case 0x0049: - return "Flash fired, compulsory flash mode, red-eye reduction mode"; - case 0x004D: - return "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected"; - case 0x004F: - return "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected"; - case 0x0059: - return "Flash fired, auto mode, red-eye reduction mode"; - case 0x005D: - return "Flash fired, auto mode, return light not detected, red-eye reduction mode"; - case 0x005F: - return "Flash fired, auto mode, return light detected, red-eye reduction mode"; - default: - sprintf(format, "Unknown (%d)", flash); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_SCENE_TYPE: - { - BYTE sceneType = *((BYTE*)FreeImage_GetTagValue(tag)); - if (sceneType == 1) { - return "Directly photographed image"; - } else { - sprintf(format, "Unknown (%d)", sceneType); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_SUBJECT_DISTANCE: - { - FIRational r(tag); - if(r.getNumerator() == 0xFFFFFFFF) { - return "Infinity"; - } else if(r.getNumerator() == 0) { - return "Distance unknown"; - } else { - double distance = r.doubleValue(); - sprintf(format, "%.3f meters", distance); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_METERING_MODE: - { - unsigned short meteringMode = *((unsigned short *)FreeImage_GetTagValue(tag)); - switch (meteringMode) { - case 0: - return "Unknown"; - case 1: - return "Average"; - case 2: - return "Center weighted average"; - case 3: - return "Spot"; - case 4: - return "Multi-spot"; - case 5: - return "Multi-segment"; - case 6: - return "Partial"; - case 255: - return "(Other)"; - default: - return ""; - } - } - break; - - case TAG_LIGHT_SOURCE: - { - unsigned short lightSource = *((unsigned short *)FreeImage_GetTagValue(tag)); - switch (lightSource) { - case 0: - return "Unknown"; - case 1: - return "Daylight"; - case 2: - return "Fluorescent"; - case 3: - return "Tungsten (incandescent light)"; - case 4: - return "Flash"; - case 9: - return "Fine weather"; - case 10: - return "Cloudy weather"; - case 11: - return "Shade"; - case 12: - return "Daylight fluorescent (D 5700 - 7100K)"; - case 13: - return "Day white fluorescent (N 4600 - 5400K)"; - case 14: - return "Cool white fluorescent (W 3900 - 4500K)"; - case 15: - return "White fluorescent (WW 3200 - 3700K)"; - case 17: - return "Standard light A"; - case 18: - return "Standard light B"; - case 19: - return "Standard light C"; - case 20: - return "D55"; - case 21: - return "D65"; - case 22: - return "D75"; - case 23: - return "D50"; - case 24: - return "ISO studio tungsten"; - case 255: - return "(Other)"; - default: - return ""; - } - } - break; - - case TAG_SENSING_METHOD: - { - unsigned short sensingMethod = *((unsigned short *)FreeImage_GetTagValue(tag)); - - switch (sensingMethod) { - case 1: - return "(Not defined)"; - case 2: - return "One-chip color area sensor"; - case 3: - return "Two-chip color area sensor"; - case 4: - return "Three-chip color area sensor"; - case 5: - return "Color sequential area sensor"; - case 7: - return "Trilinear sensor"; - case 8: - return "Color sequential linear sensor"; - default: - return ""; - } - } - break; - - case TAG_FILE_SOURCE: - { - BYTE fileSource = *((BYTE*)FreeImage_GetTagValue(tag)); - if (fileSource == 3) { - return "Digital Still Camera (DSC)"; - } else { - sprintf(format, "Unknown (%d)", fileSource); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_EXPOSURE_PROGRAM: - { - unsigned short exposureProgram = *((unsigned short *)FreeImage_GetTagValue(tag)); - - switch (exposureProgram) { - case 1: - return "Manual control"; - case 2: - return "Program normal"; - case 3: - return "Aperture priority"; - case 4: - return "Shutter priority"; - case 5: - return "Program creative (slow program)"; - case 6: - return "Program action (high-speed program)"; - case 7: - return "Portrait mode"; - case 8: - return "Landscape mode"; - default: - sprintf(format, "Unknown program (%d)", exposureProgram); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_CUSTOM_RENDERED: - { - unsigned short customRendered = *((unsigned short *)FreeImage_GetTagValue(tag)); - - switch (customRendered) { - case 0: - return "Normal process"; - case 1: - return "Custom process"; - default: - sprintf(format, "Unknown rendering (%d)", customRendered); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_EXPOSURE_MODE: - { - unsigned short exposureMode = *((unsigned short *)FreeImage_GetTagValue(tag)); - - switch (exposureMode) { - case 0: - return "Auto exposure"; - case 1: - return "Manual exposure"; - case 2: - return "Auto bracket"; - default: - sprintf(format, "Unknown mode (%d)", exposureMode); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_WHITE_BALANCE: - { - unsigned short whiteBalance = *((unsigned short *)FreeImage_GetTagValue(tag)); - - switch (whiteBalance) { - case 0: - return "Auto white balance"; - case 1: - return "Manual white balance"; - default: - sprintf(format, "Unknown (%d)", whiteBalance); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_SCENE_CAPTURE_TYPE: - { - unsigned short sceneType = *((unsigned short *)FreeImage_GetTagValue(tag)); - - switch (sceneType) { - case 0: - return "Standard"; - case 1: - return "Landscape"; - case 2: - return "Portrait"; - case 3: - return "Night scene"; - default: - sprintf(format, "Unknown (%d)", sceneType); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_GAIN_CONTROL: - { - unsigned short gainControl = *((unsigned short *)FreeImage_GetTagValue(tag)); - - switch (gainControl) { - case 0: - return "None"; - case 1: - return "Low gain up"; - case 2: - return "High gain up"; - case 3: - return "Low gain down"; - case 4: - return "High gain down"; - default: - sprintf(format, "Unknown (%d)", gainControl); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_CONTRAST: - { - unsigned short contrast = *((unsigned short *)FreeImage_GetTagValue(tag)); - - switch (contrast) { - case 0: - return "Normal"; - case 1: - return "Soft"; - case 2: - return "Hard"; - default: - sprintf(format, "Unknown (%d)", contrast); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_SATURATION: - { - unsigned short saturation = *((unsigned short *)FreeImage_GetTagValue(tag)); - - switch (saturation) { - case 0: - return "Normal"; - case 1: - return "Low saturation"; - case 2: - return "High saturation"; - default: - sprintf(format, "Unknown (%d)", saturation); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_SHARPNESS: - { - unsigned short sharpness = *((unsigned short *)FreeImage_GetTagValue(tag)); - - switch (sharpness) { - case 0: - return "Normal"; - case 1: - return "Soft"; - case 2: - return "Hard"; - default: - sprintf(format, "Unknown (%d)", sharpness); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_SUBJECT_DISTANCE_RANGE: - { - unsigned short distanceRange = *((unsigned short *)FreeImage_GetTagValue(tag)); - - switch (distanceRange) { - case 0: - return "unknown"; - case 1: - return "Macro"; - case 2: - return "Close view"; - case 3: - return "Distant view"; - default: - sprintf(format, "Unknown (%d)", distanceRange); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_ISO_SPEED_RATINGS: - { - unsigned short isoEquiv = *((unsigned short *)FreeImage_GetTagValue(tag)); - if (isoEquiv < 50) { - isoEquiv *= 200; - } - sprintf(format, "%d", isoEquiv); - buffer += format; - return buffer.c_str(); - } - break; - - case TAG_USER_COMMENT: - { - // first 8 bytes are used to define an ID code - // we assume this is an ASCII string - const BYTE *userComment = (BYTE*)FreeImage_GetTagValue(tag); - for(DWORD i = 8; i < FreeImage_GetTagLength(tag); i++) { - buffer += userComment[i]; - } - buffer += '\0'; - return buffer.c_str(); - } - break; - - case TAG_COMPRESSION: - { - WORD compression = *((WORD*)FreeImage_GetTagValue(tag)); - switch(compression) { - case TAG_COMPRESSION_NONE: - sprintf(format, "dump mode (%d)", compression); - break; - case TAG_COMPRESSION_CCITTRLE: - sprintf(format, "CCITT modified Huffman RLE (%d)", compression); - break; - case TAG_COMPRESSION_CCITTFAX3: - sprintf(format, "CCITT Group 3 fax encoding (%d)", compression); - break; - /* - case TAG_COMPRESSION_CCITT_T4: - sprintf(format, "CCITT T.4 (TIFF 6 name) (%d)", compression); - break; - */ - case TAG_COMPRESSION_CCITTFAX4: - sprintf(format, "CCITT Group 4 fax encoding (%d)", compression); - break; - /* - case TAG_COMPRESSION_CCITT_T6: - sprintf(format, "CCITT T.6 (TIFF 6 name) (%d)", compression); - break; - */ - case TAG_COMPRESSION_LZW: - sprintf(format, "LZW (%d)", compression); - break; - case TAG_COMPRESSION_OJPEG: - sprintf(format, "!6.0 JPEG (%d)", compression); - break; - case TAG_COMPRESSION_JPEG: - sprintf(format, "JPEG (%d)", compression); - break; - case TAG_COMPRESSION_NEXT: - sprintf(format, "NeXT 2-bit RLE (%d)", compression); - break; - case TAG_COMPRESSION_CCITTRLEW: - sprintf(format, "CCITTRLEW (%d)", compression); - break; - case TAG_COMPRESSION_PACKBITS: - sprintf(format, "PackBits Macintosh RLE (%d)", compression); - break; - case TAG_COMPRESSION_THUNDERSCAN: - sprintf(format, "ThunderScan RLE (%d)", compression); - break; - case TAG_COMPRESSION_PIXARFILM: - sprintf(format, "Pixar companded 10bit LZW (%d)", compression); - break; - case TAG_COMPRESSION_PIXARLOG: - sprintf(format, "Pixar companded 11bit ZIP (%d)", compression); - break; - case TAG_COMPRESSION_DEFLATE: - sprintf(format, "Deflate compression (%d)", compression); - break; - case TAG_COMPRESSION_ADOBE_DEFLATE: - sprintf(format, "Adobe Deflate compression (%d)", compression); - break; - case TAG_COMPRESSION_DCS: - sprintf(format, "Kodak DCS encoding (%d)", compression); - break; - case TAG_COMPRESSION_JBIG: - sprintf(format, "ISO JBIG (%d)", compression); - break; - case TAG_COMPRESSION_SGILOG: - sprintf(format, "SGI Log Luminance RLE (%d)", compression); - break; - case TAG_COMPRESSION_SGILOG24: - sprintf(format, "SGI Log 24-bit packed (%d)", compression); - break; - case TAG_COMPRESSION_JP2000: - sprintf(format, "Leadtools JPEG2000 (%d)", compression); - break; - case TAG_COMPRESSION_LZMA: - sprintf(format, "LZMA2 (%d)", compression); - break; - default: - sprintf(format, "Unknown type (%d)", compression); - break; - } - - buffer += format; - return buffer.c_str(); - } - break; - } - - return ConvertAnyTag(tag); -} - -/** -Convert a Exif GPS tag to a C string -*/ -static const char* -ConvertExifGPSTag(FITAG *tag) { - char format[MAX_TEXT_EXTENT]; - static std::string buffer; - - if(!tag) - return NULL; - - buffer.erase(); - - // convert the tag value to a string buffer - - switch(FreeImage_GetTagID(tag)) { - case TAG_GPS_LATITUDE: - case TAG_GPS_LONGITUDE: - case TAG_GPS_TIME_STAMP: - { - DWORD *pvalue = (DWORD*)FreeImage_GetTagValue(tag); - if(FreeImage_GetTagLength(tag) == 24) { - // dd:mm:ss or hh:mm:ss - int dd = 0, mm = 0; - double ss = 0; - - // convert to seconds - if(pvalue[1]) - ss += ((double)pvalue[0] / (double)pvalue[1]) * 3600; - if(pvalue[3]) - ss += ((double)pvalue[2] / (double)pvalue[3]) * 60; - if(pvalue[5]) - ss += ((double)pvalue[4] / (double)pvalue[5]); - - // convert to dd:mm:ss.ss - dd = (int)(ss / 3600); - mm = (int)(ss / 60) - dd * 60; - ss = ss - dd * 3600 - mm * 60; - - sprintf(format, "%d:%d:%.2f", dd, mm, ss); - buffer += format; - return buffer.c_str(); - } - } - break; - - case TAG_GPS_VERSION_ID: - case TAG_GPS_LATITUDE_REF: - case TAG_GPS_LONGITUDE_REF: - case TAG_GPS_ALTITUDE_REF: - case TAG_GPS_ALTITUDE: - case TAG_GPS_SATELLITES: - case TAG_GPS_STATUS: - case TAG_GPS_MEASURE_MODE: - case TAG_GPS_DOP: - case TAG_GPS_SPEED_REF: - case TAG_GPS_SPEED: - case TAG_GPS_TRACK_REF: - case TAG_GPS_TRACK: - case TAG_GPS_IMG_DIRECTION_REF: - case TAG_GPS_IMG_DIRECTION: - case TAG_GPS_MAP_DATUM: - case TAG_GPS_DEST_LATITUDE_REF: - case TAG_GPS_DEST_LATITUDE: - case TAG_GPS_DEST_LONGITUDE_REF: - case TAG_GPS_DEST_LONGITUDE: - case TAG_GPS_DEST_BEARING_REF: - case TAG_GPS_DEST_BEARING: - case TAG_GPS_DEST_DISTANCE_REF: - case TAG_GPS_DEST_DISTANCE: - case TAG_GPS_PROCESSING_METHOD: - case TAG_GPS_AREA_INFORMATION: - case TAG_GPS_DATE_STAMP: - case TAG_GPS_DIFFERENTIAL: - break; - } - - return ConvertAnyTag(tag); -} - -// ========================================================== -// Tag to string conversion function -// - -const char* DLL_CALLCONV -FreeImage_TagToString(FREE_IMAGE_MDMODEL model, FITAG *tag, char *Make) { - switch(model) { - case FIMD_EXIF_MAIN: - case FIMD_EXIF_EXIF: - return ConvertExifTag(tag); - - case FIMD_EXIF_GPS: - return ConvertExifGPSTag(tag); - - case FIMD_EXIF_MAKERNOTE: - // We should use the Make string to select an appropriate conversion function - // TO DO ... - break; - - case FIMD_EXIF_INTEROP: - default: - break; - } - - return ConvertAnyTag(tag); -} - diff --git a/Dependencies/FreeImage/Source/Metadata/TagLib.cpp b/Dependencies/FreeImage/Source/Metadata/TagLib.cpp deleted file mode 100644 index 6dcdf0e..0000000 --- a/Dependencies/FreeImage/Source/Metadata/TagLib.cpp +++ /dev/null @@ -1,1618 +0,0 @@ -// ========================================================== -// Tag library -// -// Design and implementation by -// - Herv Drolon -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -// ========================================================== -// Implementation notes : -// ---------------------- -// The tag info tables declared in this file should probably -// be loaded from an XML file. -// This would allow internationalization features and also -// more extensibility. -// Maybe in a future release ? -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include "FreeImage.h" -#include "Utilities.h" -#include "FreeImageTag.h" - -/** - HOW-TO : add a new TagInfo table - -------------------------------------------------------------------------- - 1) add a table identifier in the TagLib class definition (see enum MDMODEL) - 2) declare the tag table as static and use a 0/NULL value as last entry - 3) initialize the table in TagLib::TagLib - 4) provide a conversion in TagLib::getFreeImageModel -*/ - -// -------------------------------------------------------------------------- -// EXIF standard tags definition -// -------------------------------------------------------------------------- - -static TagInfo - exif_exif_tag_table[] = - { - { 0x0100, (char *) "ImageWidth", (char *) "Image width"}, - { 0x0101, (char *) "ImageLength", (char *) "Image height"}, - { 0x0102, (char *) "BitsPerSample", (char *) "Number of bits per component"}, - { 0x0103, (char *) "Compression", (char *) "Compression scheme"}, - { 0x0106, (char *) "PhotometricInterpretation", (char *) "Pixel composition"}, - { 0x010A, (char *) "FillOrder", (char*) NULL}, - { 0x010D, (char *) "DocumentName", (char *) NULL}, - { 0x010E, (char *) "ImageDescription", (char *) "Image title"}, - { 0x010F, (char *) "Make", (char *) "Image input equipment manufacturer"}, - { 0x0110, (char *) "Model", (char *) "Image input equipment model"}, - { 0x0111, (char *) "StripOffsets", (char *) "Image data location"}, - { 0x0112, (char *) "Orientation", (char *) "Orientation of image"}, - { 0x0115, (char *) "SamplesPerPixel", (char *) "Number of components"}, - { 0x0116, (char *) "RowsPerStrip", (char *) "Number of rows per strip"}, - { 0x0117, (char *) "StripByteCounts", (char *) "Bytes per compressed strip"}, - { 0x011A, (char *) "XResolution", (char *) "Image resolution in width direction"}, - { 0x011B, (char *) "YResolution", (char *) "Image resolution in height direction"}, - { 0x011C, (char *) "PlanarConfiguration", (char *) "Image data arrangement"}, - { 0x011D, (char *) "PageName", (char *) "Name of the page"}, - { 0x011E, (char *) "XPosition", (char *) "X position of the image"}, - { 0x011F, (char *) "YPosition", (char *) "Y position of the image"}, - { 0x0128, (char *) "ResolutionUnit", (char *) "Unit of X and Y resolution"}, - { 0x0129, (char *) "PageNumber", (char *) "Page number"}, - { 0x012D, (char *) "TransferFunction", (char *) "Transfer function"}, - { 0x0131, (char *) "Software", (char *) "Software used"}, - { 0x0132, (char *) "DateTime", (char *) "File change date and time"}, - { 0x013B, (char *) "Artist", (char *) "Person who created the image"}, - { 0x013C, (char *) "HostComputer", (char *) "Host computer used to generate the image"}, - { 0x013E, (char *) "WhitePoint", (char *) "White point chromaticity"}, - { 0x013F, (char *) "PrimaryChromaticities", (char *) "Chromaticities of primaries"}, - { 0x0156, (char *) "TransferRange", (char *) NULL}, - { 0x0200, (char *) "JPEGProc", (char *) NULL}, - { 0x0201, (char *) "JPEGInterchangeFormat", (char *) "Offset to JPEG SOI"}, - { 0x0202, (char *) "JPEGInterchangeFormatLength", (char *) "Bytes of JPEG data"}, - { 0x0211, (char *) "YCbCrCoefficients", (char *) "Color space transformation matrix coefficients"}, - { 0x0212, (char *) "YCbCrSubSampling", (char *) "Subsampling ratio of Y to C"}, - { 0x0213, (char *) "YCbCrPositioning", (char *) "Y and C positioning"}, - { 0x0214, (char *) "ReferenceBlackWhite", (char *) "Pair of black and white reference values"}, - { 0x828D, (char *) "CFARepeatPatternDim", (char *) NULL}, - { 0x828E, (char *) "CFAPattern", (char *) NULL}, - { 0x828F, (char *) "BatteryLevel", (char *) NULL}, - { 0x8298, (char *) "Copyright", (char *) "Copyright holder"}, - { 0x829A, (char *) "ExposureTime", (char *) "Exposure time"}, - { 0x829D, (char *) "FNumber", (char *) "F number"}, - { 0x83BB, (char *) "IPTC/NAA", (char *) NULL}, - { 0x8773, (char *) "InterColorProfile", (char *) "ICC profile data"}, - { 0x8822, (char *) "ExposureProgram", (char *) "Exposure program"}, - { 0x8824, (char *) "SpectralSensitivity", (char *) "Spectral sensitivity"}, - { 0x8825, (char *) "GPSInfo", (char *) NULL}, - { 0x8827, (char *) "ISOSpeedRatings", (char *) "ISO speed rating"}, - { 0x8828, (char *) "OECF", (char *) "Optoelectric conversion factor"}, - { 0x9000, (char *) "ExifVersion", (char *) "Exif version"}, - { 0x9003, (char *) "DateTimeOriginal", (char *) "Date and time of original data generation"}, - { 0x9004, (char *) "DateTimeDigitized", (char *) "Date and time of digital data generation"}, - { 0x9101, (char *) "ComponentsConfiguration", (char *) "Meaning of each component"}, - { 0x9102, (char *) "CompressedBitsPerPixel", (char *) "Image compression mode"}, - { 0x9201, (char *) "ShutterSpeedValue", (char *) "Shutter speed"}, - { 0x9202, (char *) "ApertureValue", (char *) "Aperture"}, - { 0x9203, (char *) "BrightnessValue", (char *) "Brightness"}, - { 0x9204, (char *) "ExposureBiasValue", (char *) "Exposure bias"}, - { 0x9205, (char *) "MaxApertureValue", (char *) "Maximum lens aperture"}, - { 0x9206, (char *) "SubjectDistance", (char *) "Subject distance"}, - { 0x9207, (char *) "MeteringMode", (char *) "Metering mode"}, - { 0x9208, (char *) "LightSource", (char *) "Light source"}, - { 0x9209, (char *) "Flash", (char *) "Flash"}, - { 0x920A, (char *) "FocalLength", (char *) "Lens focal length"}, - { 0x9214, (char *) "SubjectArea", (char *) "Subject area"}, - { 0x927C, (char *) "MakerNote", (char *) "Manufacturer notes"}, - { 0x9286, (char *) "UserComment", (char *) "User comments"}, - { 0x9290, (char *) "SubSecTime", (char *) "DateTime subseconds"}, - { 0x9291, (char *) "SubSecTimeOriginal", (char *) "DateTimeOriginal subseconds"}, - { 0x9292, (char *) "SubSecTimeDigitized", (char *) "DateTimeDigitized subseconds"}, - { 0xA000, (char *) "FlashPixVersion", (char *) "Supported Flashpix version"}, - { 0xA001, (char *) "ColorSpace", (char *) "Color space information"}, - { 0xA002, (char *) "PixelXDimension", (char *) "Valid image width"}, - { 0xA003, (char *) "PixelYDimension", (char *) "Valid image height"}, - { 0xA004, (char *) "RelatedSoundFile", (char *) "Related audio file"}, - { 0xA005, (char *) "InteroperabilityOffset", (char *) NULL}, - { 0xA20B, (char *) "FlashEnergy", (char *) "Flash energy"}, - { 0xA20C, (char *) "SpatialFrequencyResponse", (char *) "Spatial frequency response"}, - { 0xA20E, (char *) "FocalPlaneXResolution", (char *) "Focal plane X resolution"}, - { 0xA20F, (char *) "FocalPlaneYResolution", (char *) "Focal plane Y resolution"}, - { 0xA210, (char *) "FocalPlaneResolutionUnit", (char *) "Focal plane resolution unit"}, - { 0xA214, (char *) "SubjectLocation", (char *) "Subject location"}, - { 0xA215, (char *) "ExposureIndex", (char *) "Exposure index"}, - { 0xA217, (char *) "SensingMethod", (char *) "Sensing method"}, - { 0xA300, (char *) "FileSrc", (char *) "File source"}, - { 0xA301, (char *) "SceneType", (char *) "Scene type"}, - { 0xA302, (char *) "CFAPattern", (char *) "CFA pattern"}, - { 0xA401, (char *) "CustomRendered", (char *) "Custom image processing"}, - { 0xA402, (char *) "ExposureMode", (char *) "Exposure mode"}, - { 0xA403, (char *) "WhiteBalance", (char *) "White balance"}, - { 0xA404, (char *) "DigitalZoomRatio", (char *) "Digital zoom ratio"}, - { 0xA405, (char *) "FocalLengthIn35mmFilm", (char *) "Focal length in 35 mm film"}, - { 0xA406, (char *) "SceneCaptureType", (char *) "Scene capture type"}, - { 0xA407, (char *) "GainControl", (char *) "Gain control"}, - { 0xA408, (char *) "Contrast", (char *) "Contrast"}, - { 0xA409, (char *) "Saturation", (char *) "Saturation"}, - { 0xA40A, (char *) "Sharpness", (char *) "Sharpness"}, - { 0xA40B, (char *) "DeviceSettingDescription", (char *) "Device settings description"}, - { 0xA40C, (char *) "SubjectDistanceRange", (char *) "Subject distance range"}, - { 0xA420, (char *) "ImageUniqueID", (char *) "Unique image ID"}, - { 0xA430, (char *) "CameraOwnerName", (char *) "Camera owner name"}, - { 0xA431, (char *) "BodySerialNumber", (char *) "Body serial number"}, - { 0xA432, (char *) "LensSpecification", (char *) "Lens specification"}, - { 0xA433, (char *) "LensMake", (char *) "Lens make"}, - { 0xA434, (char *) "LensModel", (char *) "Lens model"}, - { 0xA435, (char *) "LensSerialNumber", (char *) "Lens serial number"}, - - // These tags are not part of the Exiv v2.3 specifications but are often loaded by applications as Exif data - { 0x4746, (char *) "Rating", (char *) "Rating tag used by Windows"}, - { 0x4749, (char *) "RatingPercent", (char *) "Rating tag used by Windows, value in percent"}, - { 0x9C9B, (char *) "XPTitle", (char *) "Title tag used by Windows, encoded in UCS2"}, - { 0x9C9C, (char *) "XPComment", (char *) "Comment tag used by Windows, encoded in UCS2"}, - { 0x9C9D, (char *) "XPAuthor", (char *) "Author tag used by Windows, encoded in UCS2"}, - { 0x9C9E, (char *) "XPKeywords", (char *) "Keywords tag used by Windows, encoded in UCS2"}, - { 0x9C9F, (char *) "XPSubject", (char *) "Subject tag used by Windows, encoded in UCS2"}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -// -------------------------------------------------------------------------- -// EXIF GPS tags definition -// -------------------------------------------------------------------------- - -static TagInfo - exif_gps_tag_table[] = - { - { 0x0000, (char *) "GPSVersionID", (char *) "GPS tag version"}, - { 0x0001, (char *) "GPSLatitudeRef", (char *) "North or South Latitude"}, - { 0x0002, (char *) "GPSLatitude", (char *) "Latitude"}, - { 0x0003, (char *) "GPSLongitudeRef", (char *) "East or West Longitude"}, - { 0x0004, (char *) "GPSLongitude", (char *) "Longitude"}, - { 0x0005, (char *) "GPSAltitudeRef", (char *) "Altitude reference"}, - { 0x0006, (char *) "GPSAltitude", (char *) "Altitude"}, - { 0x0007, (char *) "GPSTimeStamp", (char *) "GPS time (atomic clock)"}, - { 0x0008, (char *) "GPSSatellites", (char *) "GPS satellites used for measurement"}, - { 0x0009, (char *) "GPSStatus", (char *) "GPS receiver status"}, - { 0x000A, (char *) "GPSMeasureMode", (char *) "GPS measurement mode"}, - { 0x000B, (char *) "GPSDOP", (char *) "Measurement precision"}, - { 0x000C, (char *) "GPSSpeedRef", (char *) "Speed unit"}, - { 0x000D, (char *) "GPSSpeed", (char *) "Speed of GPS receiver"}, - { 0x000E, (char *) "GPSTrackRef", (char *) "Reference for direction of movement"}, - { 0x000F, (char *) "GPSTrack", (char *) "Direction of movement"}, - { 0x0010, (char *) "GPSImgDirectionRef", (char *) "Reference for direction of image"}, - { 0x0011, (char *) "GPSImgDirection", (char *) "Direction of image"}, - { 0x0012, (char *) "GPSMapDatum", (char *) "Geodetic survey data used"}, - { 0x0013, (char *) "GPSDestLatitudeRef", (char *) "Reference for latitude of destination"}, - { 0x0014, (char *) "GPSDestLatitude", (char *) "Latitude of destination"}, - { 0x0015, (char *) "GPSDestLongitudeRef", (char *) "Reference for longitude of destination"}, - { 0x0016, (char *) "GPSDestLongitude", (char *) "Longitude of destination"}, - { 0x0017, (char *) "GPSDestBearingRef", (char *) "Reference for bearing of destination"}, - { 0x0018, (char *) "GPSDestBearing", (char *) "Bearing of destination"}, - { 0x0019, (char *) "GPSDestDistanceRef", (char *) "Reference for distance to destination"}, - { 0x001A, (char *) "GPSDestDistance", (char *) "Distance to destination"}, - { 0x001B, (char *) "GPSProcessingMethod", (char *) "Name of GPS processing method"}, - { 0x001C, (char *) "GPSAreaInformation", (char *) "Name of GPS area"}, - { 0x001D, (char *) "GPSDateStamp", (char *) "GPS date"}, - { 0x001E, (char *) "GPSDifferential", (char *) "GPS differential correction"}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -// -------------------------------------------------------------------------- -// EXIF interoperability tags definition -// -------------------------------------------------------------------------- - -static TagInfo - exif_interop_tag_table[] = - { - { 0x0001, (char *) "InteroperabilityIndex", (char *) "Interoperability Identification"}, - { 0x0002, (char *) "InteroperabilityVersion", (char *) "Interoperability version"}, - { 0x1000, (char *) "RelatedImageFileFormat", (char *) "File format of image file"}, - { 0x1001, (char *) "RelatedImageWidth", (char *) "Image width"}, - { 0x1002, (char *) "RelatedImageLength", (char *) "Image height"}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -// -------------------------------------------------------------------------- -// EXIF maker note tags definition -// -------------------------------------------------------------------------- - -/** -Canon maker note -*/ -static TagInfo - exif_canon_tag_table[] = - { - { 0x0001, (char *) "CanonCameraSettings", (char *) "Canon CameraSettings Tags"}, - { 0x0002, (char *) "CanonFocalLength", (char *) "Canon FocalLength Tags"}, - { 0x0003, (char *) "CanonFlashInfo?", (char *) NULL}, - { 0x0004, (char *) "CanonShotInfo", (char *) "Canon ShotInfo Tags"}, - { 0x0005, (char *) "CanonPanorama", (char *) "Canon Panorama Tags"}, - { 0x0006, (char *) "CanonImageType", (char *) NULL}, - { 0x0007, (char *) "CanonFirmwareVersion", (char *) NULL}, - { 0x0008, (char *) "FileNumber", (char *) NULL}, - { 0x0009, (char *) "OwnerName", (char *) NULL}, - { 0x000A, (char *) "UnknownD30", (char *) "Canon UnknownD30 Tags"}, - { 0x000C, (char *) "SerialNumber", (char *) NULL}, - { 0x000D, (char *) "CanonCameraInfo", (char *) "Canon CameraInfo Tags"}, - { 0x000E, (char *) "CanonFileLength", (char *) NULL}, - { 0x000F, (char *) "CanonCustomFunctions", (char *) "Custom Functions"}, - { 0x0010, (char *) "CanonModelID", (char *) NULL}, - { 0x0012, (char *) "CanonAFInfo", (char *) "Canon AFInfo Tags"}, - { 0x0013, (char *) "ThumbnailImageValidArea", (char *) NULL}, - { 0x0015, (char *) "SerialNumberFormat", (char *) NULL}, - { 0x001A, (char *) "SuperMacro", (char *) NULL}, - { 0x001C, (char *) "DateStampMode", (char *) NULL}, - { 0x001D, (char *) "MyColors", (char *) NULL}, - { 0x001E, (char *) "FirmwareRevision", (char *) NULL}, - { 0x0023, (char *) "Categories", (char *) NULL}, - { 0x0024, (char *) "FaceDetect1", (char *) NULL}, - { 0x0025, (char *) "FaceDetect2", (char *) NULL}, - { 0x0026, (char *) "CanonAFInfo2", (char *) "Canon AFInfo2 Tags"}, - { 0x0028, (char *) "ImageUniqueID", (char *) NULL}, - { 0x0081, (char *) "RawDataOffset", (char *) NULL}, - { 0x0083, (char *) "OriginalDecisionDataOffset", (char *) NULL}, - { 0x0090, (char *) "CustomFunctions1D", (char *) "CanonCustom Functions1D Tags"}, - { 0x0091, (char *) "PersonalFunctions", (char *) "CanonCustom PersonalFuncs Tags"}, - { 0x0092, (char *) "PersonalFunctionValues", (char *) "CanonCustom PersonalFuncValues Tags"}, - { 0x0093, (char *) "CanonFileInfo", (char *) "Canon FileInfo Tags"}, - { 0x0094, (char *) "AFPointsInFocus1D", (char *) NULL}, - { 0x0095, (char *) "LensModel", (char *) NULL}, - { 0x0096, (char *) "SerialInfo", (char *) NULL}, - { 0x0097, (char *) "DustRemovalData", (char *) NULL}, - { 0x0098, (char *) "CropInfo", (char *) NULL}, - { 0x0099, (char *) "CustomFunctions2", (char *) NULL}, - { 0x009A, (char *) "AspectInfo", (char *) NULL}, - { 0x00A0, (char *) "ProcessingInfo", (char *) NULL}, - { 0x00A1, (char *) "ToneCurveTable", (char *) NULL}, - { 0x00A2, (char *) "SharpnessTable", (char *) NULL}, - { 0x00A3, (char *) "SharpnessFreqTable", (char *) NULL}, - { 0x00A4, (char *) "WhiteBalanceTable", (char *) NULL}, - { 0x00A9, (char *) "ColorBalance", (char *) NULL}, - { 0x00AA, (char *) "MeasuredColor", (char *) NULL}, - { 0x00AE, (char *) "ColorTemperature", (char *) NULL}, - { 0x00B0, (char *) "CanonFlags", (char *) NULL}, - { 0x00B1, (char *) "ModifiedInfo", (char *) NULL}, - { 0x00B2, (char *) "ToneCurveMatching", (char *) NULL}, - { 0x00B3, (char *) "WhiteBalanceMatching", (char *) NULL}, - { 0x00B4, (char *) "ColorSpace", (char *) NULL}, - { 0x00B6, (char *) "PreviewImageInfo", (char *) NULL}, - { 0x00D0, (char *) "VRDOffset", (char *) "Offset of VRD 'recipe data' if it exists"}, - { 0x00E0, (char *) "SensorInfo", (char *) NULL}, - { 0x4001, (char *) "ColorData", (char *) "Canon ColorData Tags"}, - { 0x4002, (char *) "CRWParam?", (char *) NULL}, - { 0x4003, (char *) "ColorInfo", (char *) NULL}, - { 0x4005, (char *) "Flavor?", (char *) NULL}, - { 0x4008, (char *) "BlackLevel?", (char *) NULL}, - { 0x4010, (char *) "CustomPictureStyleFileName", (char *) NULL}, - { 0x4013, (char *) "AFMicroAdj", (char *) NULL}, - { 0x4015, (char *) "VignettingCorr", (char *) NULL}, - { 0x4016, (char *) "VignettingCorr2", (char *) NULL}, - { 0x4018, (char *) "LightingOpt", (char *) NULL}, - { 0x4019, (char *) "LensInfo", (char *) NULL}, - { 0x4020, (char *) "AmbienceInfo", (char *) NULL}, - { 0x4024, (char *) "FilterInfo", (char *) NULL}, - - // These 'sub'-tag values have been created for consistency -- they don't exist within the exif segment - - // Fields under tag 0x0001 (we add 0xC100 to make unique tag id) - { 0xC100 + 1, (char *) "CameraSettings:MacroMode", (char *) NULL}, - { 0xC100 + 2, (char *) "CameraSettings:SelfTimer", (char *) NULL}, - { 0xC100 + 3, (char *) "CameraSettings:Quality", (char *) NULL}, - { 0xC100 + 4, (char *) "CameraSettings:CanonFlashMode", (char *) NULL}, - { 0xC100 + 5, (char *) "CameraSettings:ContinuousDrive", (char *) NULL}, - { 0xC100 + 6, (char *) "CameraSettings:0x0006", (char *) NULL}, - { 0xC100 + 7, (char *) "CameraSettings:FocusMode", (char *) NULL}, - { 0xC100 + 8, (char *) "CameraSettings:0x0008", (char *) NULL}, - { 0xC100 + 9, (char *) "CameraSettings:RecordMode", (char *) NULL}, - { 0xC100 + 10, (char *) "CameraSettings:CanonImageSize", (char *) NULL}, - { 0xC100 + 11, (char *) "CameraSettings:EasyMode", (char *) NULL}, - { 0xC100 + 12, (char *) "CameraSettings:DigitalZoom", (char *) NULL}, - { 0xC100 + 13, (char *) "CameraSettings:Contrast", (char *) NULL}, - { 0xC100 + 14, (char *) "CameraSettings:Saturation", (char *) NULL}, - { 0xC100 + 15, (char *) "CameraSettings:Sharpness", (char *) NULL}, - { 0xC100 + 16, (char *) "CameraSettings:CameraISO", (char *) NULL}, - { 0xC100 + 17, (char *) "CameraSettings:MeteringMode", (char *) NULL}, - { 0xC100 + 18, (char *) "CameraSettings:FocusRange", (char *) NULL}, - { 0xC100 + 19, (char *) "CameraSettings:AFPoint", (char *) NULL}, - { 0xC100 + 20, (char *) "CameraSettings:CanonExposureMode", (char *) NULL}, - { 0xC100 + 21, (char *) "CameraSettings:0x0015", (char *) NULL}, - { 0xC100 + 22, (char *) "CameraSettings:LensType", (char *) NULL}, - { 0xC100 + 23, (char *) "CameraSettings:LongFocal", (char *) NULL}, - { 0xC100 + 24, (char *) "CameraSettings:ShortFocal", (char *) NULL}, - { 0xC100 + 25, (char *) "CameraSettings:FocalUnits", (char *) "Focal Units per mm"}, - { 0xC100 + 26, (char *) "CameraSettings:MaxAperture", (char *) NULL}, - { 0xC100 + 27, (char *) "CameraSettings:MinAperture", (char *) NULL}, - { 0xC100 + 28, (char *) "CameraSettings:FlashActivity", (char *) NULL}, - { 0xC100 + 29, (char *) "CameraSettings:FlashBits", (char *) NULL}, - { 0xC100 + 30, (char *) "CameraSettings:0x001E", (char *) NULL}, - { 0xC100 + 31, (char *) "CameraSettings:0x001F", (char *) NULL}, - { 0xC100 + 32, (char *) "CameraSettings:FocusContinuous", (char *) NULL}, - { 0xC100 + 33, (char *) "CameraSettings:AESetting", (char *) NULL}, - { 0xC100 + 34, (char *) "CameraSettings:ImageStabilization", (char *) NULL}, - { 0xC100 + 35, (char *) "CameraSettings:DisplayAperture", (char *) NULL}, - { 0xC100 + 36, (char *) "CameraSettings:ZoomSourceWidth", (char *) NULL}, - { 0xC100 + 37, (char *) "CameraSettings:ZoomTargetWidth", (char *) NULL}, - { 0xC100 + 38, (char *) "CameraSettings:0x0026", (char *) NULL}, - { 0xC100 + 39, (char *) "CameraSettings:SpotMeteringMode", (char *) NULL}, - { 0xC100 + 40, (char *) "CameraSettings:PhotoEffect", (char *) NULL}, - { 0xC100 + 41, (char *) "CameraSettings:ManualFlashOutput", (char *) NULL}, - { 0xC100 + 42, (char *) "CameraSettings:ColorTone", (char *) NULL}, - { 0xC100 + 43, (char *) "CameraSettings:0x002B", (char *) NULL}, - { 0xC100 + 44, (char *) "CameraSettings:0x002C", (char *) NULL}, - { 0xC100 + 45, (char *) "CameraSettings:0x002D", (char *) NULL}, - { 0xC100 + 46, (char *) "CameraSettings:SRAWQuality", (char *) NULL}, - { 0xC100 + 47, (char *) "CameraSettings:0x002F", (char *) NULL}, - { 0xC100 + 48, (char *) "CameraSettings:0x0030", (char *) NULL}, - - // Fields under tag 0x0002 (we add 0xC200 to make unique tag id) - { 0xC200 + 0, (char *) "FocalLength:FocalType", (char *) NULL}, - { 0xC200 + 1, (char *) "FocalLength:FocalLength", (char *) NULL}, - { 0xC200 + 2, (char *) "FocalLength:FocalPlaneXSize", (char *) NULL}, - { 0xC200 + 3, (char *) "FocalLength:FocalPlaneYSize", (char *) NULL}, - - // Fields under tag 0x0004 (we add 0xC400 to make unique tag id) - { 0xC400 + 1, (char *) "ShotInfo:AutoISO", (char *) NULL}, - { 0xC400 + 2, (char *) "ShotInfo:BaseISO", (char *) NULL}, - { 0xC400 + 3, (char *) "ShotInfo:MeasuredEV", (char *) NULL}, - { 0xC400 + 4, (char *) "ShotInfo:TargetAperture", (char *) NULL}, - { 0xC400 + 5, (char *) "ShotInfo:TargetExposureTime", (char *) NULL}, - { 0xC400 + 6, (char *) "ShotInfo:ExposureCompensation", (char *) NULL}, - { 0xC400 + 7, (char *) "ShotInfo:WhiteBalance", (char *) NULL}, - { 0xC400 + 8, (char *) "ShotInfo:SlowShutter", (char *) NULL}, - { 0xC400 + 9, (char *) "ShotInfo:SequenceNumber", (char *) NULL}, - { 0xC400 + 10, (char *) "ShotInfo:OpticalZoomCode", (char *) NULL}, - { 0xC400 + 11, (char *) "ShotInfo:0x000B", (char *) NULL}, - { 0xC400 + 12, (char *) "ShotInfo:CameraTemperature", (char *) NULL}, - { 0xC400 + 13, (char *) "ShotInfo:FlashGuideNumber", (char *) NULL}, - { 0xC400 + 14, (char *) "ShotInfo:AFPointsInFocus", (char *) NULL}, - { 0xC400 + 15, (char *) "ShotInfo:FlashExposureComp", (char *) NULL}, - { 0xC400 + 16, (char *) "ShotInfo:AutoExposureBracketing", (char *) NULL}, - { 0xC400 + 17, (char *) "ShotInfo:AEBBracketValue", (char *) NULL}, - { 0xC400 + 18, (char *) "ShotInfo:ControlMode", (char *) NULL}, - { 0xC400 + 19, (char *) "ShotInfo:FocusDistanceUpper", (char *) NULL}, - { 0xC400 + 20, (char *) "ShotInfo:FocusDistanceLower", (char *) NULL}, - { 0xC400 + 21, (char *) "ShotInfo:FNumber", (char *) NULL}, - { 0xC400 + 22, (char *) "ShotInfo:ExposureTime", (char *) NULL}, - { 0xC400 + 23, (char *) "ShotInfo:MeasuredEV2", (char *) NULL}, - { 0xC400 + 24, (char *) "ShotInfo:BulbDuration", (char *) NULL}, - { 0xC400 + 25, (char *) "ShotInfo:0x0019", (char *) NULL}, - { 0xC400 + 26, (char *) "ShotInfo:CameraType", (char *) NULL}, - { 0xC400 + 27, (char *) "ShotInfo:AutoRotate", (char *) NULL}, - { 0xC400 + 28, (char *) "ShotInfo:NDFilter", (char *) NULL}, - { 0xC400 + 29, (char *) "ShotInfo:SelfTimer2", (char *) NULL}, - { 0xC400 + 30, (char *) "ShotInfo:0x001E", (char *) NULL}, - { 0xC400 + 31, (char *) "ShotInfo:0x001F", (char *) NULL}, - { 0xC400 + 32, (char *) "ShotInfo:0x0020", (char *) NULL}, - { 0xC400 + 33, (char *) "ShotInfo:FlashOutput", (char *) NULL}, - - // Fields under tag 0x0012 (we add 0x1200 to make unique tag id) - { 0x1200 + 0, (char *) "AFInfo:NumAFPoints", (char *) NULL}, - { 0x1200 + 1, (char *) "AFInfo:ValidAFPoints", (char *) NULL}, - { 0x1200 + 2, (char *) "AFInfo:CanonImageWidth", (char *) NULL}, - { 0x1200 + 3, (char *) "AFInfo:CanonImageHeight", (char *) NULL}, - { 0x1200 + 4, (char *) "AFInfo:AFImageWidth", (char *) NULL}, - { 0x1200 + 5, (char *) "AFInfo:AFImageHeight", (char *) NULL}, - { 0x1200 + 6, (char *) "AFInfo:AFAreaWidth", (char *) NULL}, - { 0x1200 + 7, (char *) "AFInfo:AFAreaHeight", (char *) NULL}, - { 0x1200 + 8, (char *) "AFInfo:AFAreaXPositions", (char *) NULL}, - { 0x1200 + 9, (char *) "AFInfo:AFAreaYPositions", (char *) NULL}, - { 0x1200 + 10, (char *) "AFInfo:AFPointsInFocus", (char *) NULL}, - { 0x1200 + 11, (char *) "AFInfo:PrimaryAFPoint?", (char *) NULL}, - { 0x1200 + 12, (char *) "AFInfo:PrimaryAFPoint", (char *) NULL}, - { 0x1200 + 13, (char *) "AFInfo:0x000D", (char *) NULL}, - { 0x1200 + 14, (char *) "AFInfo:0x000E", (char *) NULL}, - { 0x1200 + 15, (char *) "AFInfo:0x000F", (char *) NULL}, - { 0x1200 + 16, (char *) "AFInfo:0x0010", (char *) NULL}, - { 0x1200 + 17, (char *) "AFInfo:0x0011", (char *) NULL}, - { 0x1200 + 18, (char *) "AFInfo:0x0012", (char *) NULL}, - { 0x1200 + 19, (char *) "AFInfo:0x0013", (char *) NULL}, - { 0x1200 + 20, (char *) "AFInfo:0x0014", (char *) NULL}, - { 0x1200 + 21, (char *) "AFInfo:0x0015", (char *) NULL}, - { 0x1200 + 22, (char *) "AFInfo:0x0016", (char *) NULL}, - { 0x1200 + 23, (char *) "AFInfo:0x0017", (char *) NULL}, - { 0x1200 + 24, (char *) "AFInfo:0x0018", (char *) NULL}, - { 0x1200 + 25, (char *) "AFInfo:0x0019", (char *) NULL}, - { 0x1200 + 26, (char *) "AFInfo:0x001A", (char *) NULL}, - { 0x1200 + 27, (char *) "AFInfo:0x001B", (char *) NULL}, - - // Fields under tag 0x00A0 (we add 0xCA00 to make unique tag id) - { 0xCA00 + 1, (char *) "ProcessingInfo:ToneCurve", (char *) NULL}, - { 0xCA00 + 2, (char *) "ProcessingInfo:Sharpness", (char *) NULL}, - { 0xCA00 + 3, (char *) "ProcessingInfo:SharpnessFrequency", (char *) NULL}, - { 0xCA00 + 4, (char *) "ProcessingInfo:SensorRedLevel", (char *) NULL}, - { 0xCA00 + 5, (char *) "ProcessingInfo:SensorBlueLevel", (char *) NULL}, - { 0xCA00 + 6, (char *) "ProcessingInfo:WhiteBalanceRed", (char *) NULL}, - { 0xCA00 + 7, (char *) "ProcessingInfo:WhiteBalanceBlue", (char *) NULL}, - { 0xCA00 + 8, (char *) "ProcessingInfo:WhiteBalance", (char *) NULL}, - { 0xCA00 + 9, (char *) "ProcessingInfo:ColorTemperature", (char *) NULL}, - { 0xCA00 + 10, (char *) "ProcessingInfo:PictureStyle", (char *) NULL}, - { 0xCA00 + 11, (char *) "ProcessingInfo:DigitalGain", (char *) NULL}, - { 0xCA00 + 12, (char *) "ProcessingInfo:WBShiftAB", (char *) NULL}, - { 0xCA00 + 13, (char *) "ProcessingInfo:WBShiftGM", (char *) NULL}, - - // Fields under tag 0x00E0 (we add 0xCE00 to make unique tag id) - { 0xCE00 + 1, (char *) "SensorInfo:SensorWidth", (char *) NULL}, - { 0xCE00 + 2, (char *) "SensorInfo:SensorHeight", (char *) NULL}, - { 0xCE00 + 3, (char *) "SensorInfo:0x0003", (char *) NULL}, - { 0xCE00 + 4, (char *) "SensorInfo:0x0004", (char *) NULL}, - { 0xCE00 + 5, (char *) "SensorInfo:SensorLeftBorder", (char *) NULL}, - { 0xCE00 + 6, (char *) "SensorInfo:SensorTopBorder", (char *) NULL}, - { 0xCE00 + 7, (char *) "SensorInfo:SensorRightBorder", (char *) NULL}, - { 0xCE00 + 8, (char *) "SensorInfo:SensorBottomBorder", (char *) NULL}, - { 0xCE00 + 9, (char *) "SensorInfo:BlackMaskLeftBorder", (char *) NULL}, - { 0xCE00 + 10, (char *) "SensorInfo:BlackMaskTopBorder", (char *) NULL}, - { 0xCE00 + 11, (char *) "SensorInfo:BlackMaskRightBorder", (char *) NULL}, - { 0xCE00 + 12, (char *) "SensorInfo:BlackMaskBottomBorder", (char *) NULL}, - { 0xCE00 + 13, (char *) "SensorInfo:0x000D", (char *) NULL}, - { 0xCE00 + 14, (char *) "SensorInfo:0x000E", (char *) NULL}, - { 0xCE00 + 15, (char *) "SensorInfo:0x000F", (char *) NULL}, - { 0xCE00 + 16, (char *) "SensorInfo:0x0010", (char *) NULL}, - - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Casio type 1 maker note -*/ -static TagInfo - exif_casio_type1_tag_table[] = - { - { 0x0001, (char *) "RecordingMode", (char *) NULL}, - { 0x0002, (char *) "Quality", (char *) NULL}, - { 0x0003, (char *) "FocusMode", (char *) NULL}, - { 0x0004, (char *) "FlashMode", (char *) NULL}, - { 0x0005, (char *) "FlashIntensity", (char *) NULL}, - { 0x0006, (char *) "ObjectDistance", (char *) NULL}, - { 0x0007, (char *) "WhiteBalance", (char *) NULL}, - { 0x000A, (char *) "DigitalZoom", (char *) NULL}, - { 0x000B, (char *) "Sharpness", (char *) NULL}, - { 0x000C, (char *) "Contrast", (char *) NULL}, - { 0x000D, (char *) "Saturation", (char *) NULL}, - { 0x0014, (char *) "ISO", (char *) NULL}, - { 0x0015, (char *) "FirmwareDate", (char *) NULL}, - { 0x0016, (char *) "Enhancement", (char *) NULL}, - { 0x0017, (char *) "ColorFilter", (char *) NULL}, - { 0x0018, (char *) "AFPoint", (char *) NULL}, - { 0x0019, (char *) "FlashIntensity", (char *) NULL}, - { 0x0E00, (char *) "PrintIM", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Casio type 2 maker note -*/ -static TagInfo - exif_casio_type2_tag_table[] = - { - { 0x0002, (char *) "PreviewImageSize", (char *) NULL}, - { 0x0003, (char *) "PreviewImageLength", (char *) NULL}, - { 0x0004, (char *) "PreviewImageStart", (char *) NULL}, - { 0x0008, (char *) "QualityMode", (char *) NULL}, - { 0x0009, (char *) "CasioImageSize", (char *) NULL}, - { 0x000D, (char *) "FocusMode", (char *) NULL}, - { 0x0014, (char *) "ISO", (char *) NULL}, - { 0x0019, (char *) "WhiteBalance", (char *) NULL}, - { 0x001D, (char *) "FocalLength", (char *) NULL}, - { 0x001F, (char *) "Saturation", (char *) NULL}, - { 0x0020, (char *) "Contrast", (char *) NULL}, - { 0x0021, (char *) "Sharpness", (char *) NULL}, - { 0x0E00, (char *) "PrintIM", (char *) NULL}, - { 0x2000, (char *) "PreviewImage", (char *) NULL}, - { 0x2001, (char *) "FirmwareDate", (char *) NULL}, - { 0x2011, (char *) "WhiteBalanceBias", (char *) NULL}, - { 0x2012, (char *) "WhiteBalance", (char *) NULL}, - { 0x2021, (char *) "AFPointPosition", (char *) NULL}, - { 0x2022, (char *) "ObjectDistance", (char *) NULL}, - { 0x2034, (char *) "FlashDistance", (char *) NULL}, - { 0x2076, (char *) "SpecialEffectMode", (char *) NULL}, - { 0x3000, (char *) "RecordMode", (char *) NULL}, - { 0x3001, (char *) "ReleaseMode", (char *) NULL}, - { 0x3002, (char *) "Quality", (char *) NULL}, - { 0x3003, (char *) "FocusMode", (char *) NULL}, - { 0x3006, (char *) "HometownCity", (char *) NULL}, - { 0x3007, (char *) "BestShotMode", (char *) NULL}, - { 0x3008, (char *) "AutoISO", (char *) NULL}, - { 0x3009, (char *) "AFMode", (char *) NULL}, - { 0x3011, (char *) "Sharpness", (char *) NULL}, - { 0x3012, (char *) "Contrast", (char *) NULL}, - { 0x3013, (char *) "Saturation", (char *) NULL}, - { 0x3014, (char *) "ISO", (char *) NULL}, - { 0x3015, (char *) "ColorMode", (char *) NULL}, - { 0x3016, (char *) "Enhancement", (char *) NULL}, - { 0x3017, (char *) "ColorFilter", (char *) NULL}, - { 0x301B, (char *) "ArtMode", (char *) NULL}, - { 0x301C, (char *) "SequenceNumber", (char *) NULL}, - { 0x301D, (char *) "BracketSequence", (char *) NULL}, - { 0x3020, (char *) "ImageStabilization", (char *) NULL}, - { 0x302A, (char *) "LightingMode", (char *) NULL}, - { 0x302B, (char *) "PortraitRefiner", (char *) NULL}, - { 0x3030, (char *) "SpecialEffectLevel", (char *) NULL}, - { 0x3031, (char *) "SpecialEffectSetting", (char *) NULL}, - { 0x3103, (char *) "DriveMode", (char *) NULL}, - { 0x4001, (char *) "CaptureFrameRate", (char *) NULL}, - { 0x4003, (char *) "VideoQuality", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -FujiFilm maker note -*/ -static TagInfo - exif_fujifilm_tag_table[] = - { - { 0x0000, (char *) "Version", (char *) NULL}, - { 0x0010, (char *) "InternalSerialNumber", (char *) NULL}, - { 0x1000, (char *) "Quality", (char *) NULL}, - { 0x1001, (char *) "Sharpness", (char *) NULL}, - { 0x1002, (char *) "WhiteBalance", (char *) NULL}, - { 0x1003, (char *) "Saturation", (char *) NULL}, - { 0x1004, (char *) "Contrast", (char *) NULL}, - { 0x1005, (char *) "ColorTemperature", (char *) NULL}, - { 0x100A, (char *) "WhiteBalanceFineTune", (char *) NULL}, - { 0x100B, (char *) "NoiseReduction", (char *) NULL}, - { 0x1010, (char *) "FujiFlashMode", (char *) NULL}, - { 0x1011, (char *) "FlashExposureComp", (char *) NULL}, - { 0x1020, (char *) "Macro", (char *) NULL}, - { 0x1021, (char *) "FocusMode", (char *) NULL}, - { 0x1023, (char *) "FocusPixel", (char *) NULL}, - { 0x1030, (char *) "SlowSync", (char *) NULL}, - { 0x1031, (char *) "PictureMode", (char *) NULL}, - { 0x1033, (char *) "EXRAuto", (char *) NULL}, - { 0x1034, (char *) "EXRMode", (char *) NULL}, - { 0x1100, (char *) "AutoBracketting", (char *) NULL}, - { 0x1101, (char *) "SequenceNumber", (char *) NULL}, - { 0x1210, (char *) "ColorMode", (char *) NULL}, - { 0x1300, (char *) "BlurWarning", (char *) NULL}, - { 0x1301, (char *) "FocusWarning", (char *) NULL}, - { 0x1302, (char *) "ExposureWarning", (char *) NULL}, - { 0x1400, (char *) "DynamicRange", (char *) NULL}, - { 0x1401, (char *) "FilmMode", (char *) NULL}, - { 0x1402, (char *) "DynamicRangeSetting", (char *) NULL}, - { 0x1403, (char *) "DevelopmentDynamicRange", (char *) NULL}, - { 0x1404, (char *) "MinFocalLength", (char *) NULL}, - { 0x1405, (char *) "MaxFocalLength", (char *) NULL}, - { 0x1406, (char *) "MaxApertureAtMinFocal", (char *) NULL}, - { 0x1407, (char *) "MaxApertureAtMaxFocal", (char *) NULL}, - { 0x4100, (char *) "FacesDetected", (char *) NULL}, - { 0x4103, (char *) "FacePositions", (char *) NULL}, - { 0x8000, (char *) "FileSource", (char *) NULL}, - { 0x8002, (char *) "OrderNumber", (char *) NULL}, - { 0x8003, (char *) "FrameNumber", (char *) NULL}, - { 0xB211, (char *) "Parallax", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Kyocera maker note -*/ -static TagInfo - exif_kyocera_tag_table[] = - { - { 0x0001, (char *) "ThumbnailImage", (char *) NULL}, - { 0x0E00, (char *) "PrintIM", (char *) "Print Image Matching Info"}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Olympus Type 1 / Epson / Agfa maker note -*/ -static TagInfo - exif_olympus_type1_tag_table[] = - { - { 0x0000, (char *) "MakerNoteVersion", (char *) NULL}, - { 0x0001, (char *) "MinoltaCameraSettingsOld", (char *) NULL}, - { 0x0003, (char *) "MinoltaCameraSettings", (char *) NULL}, - { 0x0040, (char *) "CompressedImageSize", (char *) NULL}, - { 0x0081, (char *) "PreviewImageData", (char *) NULL}, - { 0x0088, (char *) "PreviewImageStart", (char *) NULL}, - { 0x0089, (char *) "PreviewImageLength", (char *) NULL}, - { 0x0100, (char *) "ThumbnailImage", (char *) NULL}, - { 0x0104, (char *) "BodyFirmwareVersion", (char *) NULL}, - { 0x0200, (char *) "SpecialMode", (char *) NULL}, - { 0x0201, (char *) "Quality", (char *) NULL}, - { 0x0202, (char *) "Macro", (char *) NULL}, - { 0x0203, (char *) "BWMode", (char *) NULL}, - { 0x0204, (char *) "DigitalZoom", (char *) NULL}, - { 0x0205, (char *) "FocalPlaneDiagonal", (char *) NULL}, - { 0x0206, (char *) "LensDistortionParams", (char *) NULL}, - { 0x0207, (char *) "CameraType", (char *) NULL}, - { 0x0208, (char *) "TextInfo", (char *) "Olympus TextInfo Tags"}, - { 0x0209, (char *) "CameraID", (char *) NULL}, - { 0x020B, (char *) "EpsonImageWidth", (char *) NULL}, - { 0x020C, (char *) "EpsonImageHeight", (char *) NULL}, - { 0x020D, (char *) "EpsonSoftware", (char *) NULL}, - { 0x0280, (char *) "PreviewImage", (char *) NULL}, - { 0x0300, (char *) "PreCaptureFrames", (char *) NULL}, - { 0x0301, (char *) "WhiteBoard", (char *) NULL}, - { 0x0302, (char *) "OneTouchWB", (char *) NULL}, - { 0x0303, (char *) "WhiteBalanceBracket", (char *) NULL}, - { 0x0304, (char *) "WhiteBalanceBias", (char *) NULL}, - { 0x0403, (char *) "SceneMode", (char *) NULL}, - { 0x0404, (char *) "SerialNumber", (char *) NULL}, - { 0x0405, (char *) "Firmware", (char *) NULL}, - { 0x0E00, (char *) "PrintIM", (char *) "PrintIM Tags"}, - { 0x0F00, (char *) "DataDump", (char *) NULL}, - { 0x0F01, (char *) "DataDump2", (char *) NULL}, - { 0x1000, (char *) "ShutterSpeedValue", (char *) NULL}, - { 0x1001, (char *) "ISOValue", (char *) NULL}, - { 0x1002, (char *) "ApertureValue", (char *) NULL}, - { 0x1003, (char *) "BrightnessValue", (char *) NULL}, - { 0x1004, (char *) "FlashMode", (char *) NULL}, - { 0x1005, (char *) "FlashDevice", (char *) NULL}, - { 0x1006, (char *) "ExposureCompensation", (char *) NULL}, - { 0x1007, (char *) "SensorTemperature", (char *) NULL}, - { 0x1008, (char *) "LensTemperature", (char *) NULL}, - { 0x1009, (char *) "LightCondition", (char *) NULL}, - { 0x100A, (char *) "FocusRange", (char *) NULL}, - { 0x100B, (char *) "FocusMode", (char *) NULL}, - { 0x100C, (char *) "ManualFocusDistance", (char *) NULL}, - { 0x100D, (char *) "ZoomStepCount", (char *) NULL}, - { 0x100E, (char *) "FocusStepCount", (char *) NULL}, - { 0x100F, (char *) "Sharpness", (char *) NULL}, - { 0x1010, (char *) "FlashChargeLevel", (char *) NULL}, - { 0x1011, (char *) "ColorMatrix", (char *) NULL}, - { 0x1012, (char *) "BlackLevel", (char *) NULL}, - { 0x1015, (char *) "WBMode", (char *) NULL}, - { 0x1017, (char *) "RedBalance", (char *) NULL}, - { 0x1018, (char *) "BlueBalance", (char *) NULL}, - { 0x1019, (char *) "ColorMatrixNumber", (char *) NULL}, - { 0x101A, (char *) "SerialNumber", (char *) NULL}, - { 0x1023, (char *) "FlashExposureComp", (char *) NULL}, - { 0x1024, (char *) "InternalFlashTable", (char *) NULL}, - { 0x1025, (char *) "ExternalFlashGValue", (char *) NULL}, - { 0x1026, (char *) "ExternalFlashBounce", (char *) NULL}, - { 0x1027, (char *) "ExternalFlashZoom", (char *) NULL}, - { 0x1028, (char *) "ExternalFlashMode", (char *) NULL}, - { 0x1029, (char *) "Contrast", (char *) NULL}, - { 0x102A, (char *) "SharpnessFactor", (char *) NULL}, - { 0x102B, (char *) "ColorControl", (char *) NULL}, - { 0x102C, (char *) "ValidBits", (char *) NULL}, - { 0x102D, (char *) "CoringFilter", (char *) NULL}, - { 0x102E, (char *) "OlympusImageWidth", (char *) NULL}, - { 0x102F, (char *) "OlympusImageHeight", (char *) NULL}, - { 0x1030, (char *) "SceneDetect", (char *) NULL}, - { 0x1031, (char *) "SceneArea?", (char *) NULL}, - { 0x1033, (char *) "SceneDetectData?", (char *) NULL}, - { 0x1034, (char *) "CompressionRatio", (char *) NULL}, - { 0x1035, (char *) "PreviewImageValid", (char *) NULL}, - { 0x1036, (char *) "PreviewImageStart", (char *) NULL}, - { 0x1037, (char *) "PreviewImageLength", (char *) NULL}, - { 0x1038, (char *) "AFResult", (char *) NULL}, - { 0x1039, (char *) "CCDScanMode", (char *) NULL}, - { 0x103A, (char *) "NoiseReduction", (char *) NULL}, - { 0x103B, (char *) "InfinityLensStep", (char *) NULL}, - { 0x103C, (char *) "NearLensStep", (char *) NULL}, - { 0x103D, (char *) "LightValueCenter", (char *) NULL}, - { 0x103E, (char *) "LightValuePeriphery", (char *) NULL}, - { 0x2010, (char *) "Equipment", (char *) "Olympus Equipment Tags"}, - { 0x2020, (char *) "CameraSettings", (char *) "Olympus CameraSettings Tags"}, - { 0x2030, (char *) "RawDevelopment", (char *) "Olympus RawDevelopment Tags"}, - { 0x2040, (char *) "ImageProcessing", (char *) "Olympus ImageProcessing Tags"}, - { 0x2050, (char *) "FocusInfo", (char *) "Olympus FocusInfo Tags"}, - { 0x2100, (char *) "Olympus2100", (char *) "Olympus FE Tags"}, - { 0x2200, (char *) "Olympus2200", (char *) "Olympus FE Tags"}, - { 0x2300, (char *) "Olympus2300", (char *) "Olympus FE Tags"}, - { 0x2400, (char *) "Olympus2400", (char *) "Olympus FE Tags"}, - { 0x2500, (char *) "Olympus2500", (char *) "Olympus FE Tags"}, - { 0x2600, (char *) "Olympus2600", (char *) "Olympus FE Tags"}, - { 0x2700, (char *) "Olympus2700", (char *) "Olympus FE Tags"}, - { 0x2800, (char *) "Olympus2800", (char *) "Olympus FE Tags"}, - { 0x2900, (char *) "Olympus2900", (char *) "Olympus FE Tags"}, - { 0x3000, (char *) "RawInfo", (char *) "Olympus RawInfo Tags"}, - { 0x4000, (char *) "MainInfo", (char *) "Olympus MainInfo Tags"}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Minolta maker note -*/ -static TagInfo - exif_minolta_tag_table[] = - { - { 0x0000, (char *) "MakerNoteVersion", (char *) NULL}, - { 0x0001, (char *) "MinoltaCameraSettingsOld", (char *) NULL}, - { 0x0003, (char *) "MinoltaCameraSettings", (char *) NULL}, - { 0x0004, (char *) "MinoltaCameraSettings7D", (char *) NULL}, - { 0x0018, (char *) "ImageStabilization", (char *) NULL}, - { 0x0040, (char *) "CompressedImageSize", (char *) NULL}, - { 0x0081, (char *) "PreviewImage", (char *) NULL}, - { 0x0088, (char *) "PreviewImageStart", (char *) NULL}, - { 0x0089, (char *) "PreviewImageLength", (char *) NULL}, - { 0x0100, (char *) "SceneMode", (char *) NULL}, - { 0x0101, (char *) "ColorMode", (char *) NULL}, - { 0x0102, (char *) "MinoltaQuality", (char *) NULL}, - { 0x0103, (char *) "MinoltaImageSize", (char *) NULL}, - { 0x0104, (char *) "FlashExposureComp", (char *) NULL}, - { 0x0105, (char *) "Teleconverter", (char *) NULL}, - { 0x0107, (char *) "ImageStabilization", (char *) NULL}, - { 0x0109, (char *) "RawAndJpgRecording", (char *) NULL}, - { 0x010A, (char *) "ZoneMatching", (char *) NULL}, - { 0x010B, (char *) "ColorTemperature", (char *) NULL}, - { 0x010C, (char *) "LensType", (char *) NULL}, - { 0x0111, (char *) "ColorCompensationFilter", (char *) NULL}, - { 0x0112, (char *) "WhiteBalanceFineTune", (char *) NULL}, - { 0x0113, (char *) "ImageStabilization", (char *) NULL}, - { 0x0114, (char *) "MinoltaCameraSettings5D", (char *) NULL}, - { 0x0115, (char *) "WhiteBalance", (char *) NULL}, - { 0x0E00, (char *) "PrintIM", (char *) NULL}, - { 0x0F00, (char *) "MinoltaCameraSettings2", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -There are 3 formats of Nikon's MakerNote. MakerNote of E700/E800/E900/E900S/E910/E950 -starts from ASCII string "Nikon". Data format is the same as IFD, but it starts from -offset 0x08. This is the same as Olympus except start string. -*/ - -/** -TYPE 1 is for E-Series cameras prior to (not including) E990 -*/ -static TagInfo - exif_nikon_type1_tag_table[] = - { - { 0x0002, (char *) "FamilyID", (char *) NULL}, - { 0x0003, (char *) "Quality", (char *) NULL}, - { 0x0004, (char *) "ColorMode", (char *) NULL}, - { 0x0005, (char *) "ImageAdjustment", (char *) NULL}, - { 0x0006, (char *) "CCDSensitivity", (char *) NULL}, - { 0x0007, (char *) "WhiteBalance", (char *) NULL}, - { 0x0008, (char *) "Focus", (char *) NULL}, - { 0x000A, (char *) "DigitalZoom", (char *) NULL}, - { 0x000B, (char *) "FisheyeConverter", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Nikon type 2 maker note -*/ -static TagInfo - exif_nikon_type2_tag_table[] = - { - { 0x0001, (char *) "MakerNoteVersion", (char *) NULL}, - { 0x0002, (char *) "ISO", (char *) NULL}, - { 0x0003, (char *) "ColorMode", (char *) NULL}, - { 0x0004, (char *) "Quality", (char *) NULL}, - { 0x0005, (char *) "WhiteBalance", (char *) NULL}, - { 0x0006, (char *) "Sharpness", (char *) NULL}, - { 0x0007, (char *) "FocusMode", (char *) NULL}, - { 0x0008, (char *) "FlashSetting", (char *) NULL}, - { 0x0009, (char *) "FlashType", (char *) NULL}, - { 0x000B, (char *) "WhiteBalanceFineTune", (char *) NULL}, - { 0x000F, (char *) "ISOSelection", (char *) NULL}, - { 0x0010, (char *) "DataDump", (char *) NULL}, - { 0x0080, (char *) "ImageAdjustment", (char *) NULL}, - { 0x0082, (char *) "AuxiliaryLens", (char *) NULL}, - { 0x0085, (char *) "ManualFocusDistance", (char *) NULL}, - { 0x0086, (char *) "DigitalZoom", (char *) NULL}, - { 0x0088, (char *) "AFInfo", (char *) NULL}, - { 0x0089, (char *) "ShootingMode", (char *) NULL}, - { 0x008D, (char *) "ColorMode", (char *) NULL}, - { 0x008F, (char *) "SceneMode", (char *) NULL}, - { 0x0092, (char *) "HueAdjustment", (char *) NULL}, - { 0x0094, (char *) "Saturation", (char *) NULL}, - { 0x0095, (char *) "NoiseReduction", (char *) NULL}, - { 0x0E00, (char *) "PrintIM", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -The type-3 directory is for D-Series cameras such as the D1 and D100. -see http://www.timelesswanderings.net/equipment/D100/NEF.html -*/ -static TagInfo - exif_nikon_type3_tag_table[] = - { - { 0x0001, (char *) "MakerNoteVersion", (char *) NULL}, - { 0x0002, (char *) "ISO", (char *) NULL}, - { 0x0003, (char *) "ColorMode", (char *) NULL}, - { 0x0004, (char *) "Quality", (char *) NULL}, - { 0x0005, (char *) "WhiteBalance", (char *) NULL}, - { 0x0006, (char *) "Sharpness", (char *) NULL}, - { 0x0007, (char *) "FocusMode", (char *) NULL}, - { 0x0008, (char *) "FlashSetting", (char *) NULL}, - { 0x0009, (char *) "FlashType", (char *) NULL}, - { 0x000B, (char *) "WhiteBalanceFineTune", (char *) NULL}, - { 0x000C, (char *) "WB_RBLevels", (char *) NULL}, - { 0x000D, (char *) "ProgramShift", (char *) NULL}, - { 0x000E, (char *) "ExposureDifference", (char *) NULL}, - { 0x000F, (char *) "ISOSelection", (char *) NULL}, - { 0x0010, (char *) "DataDump", (char *) NULL}, - { 0x0011, (char *) "PreviewIFD", (char *) NULL}, - { 0x0012, (char *) "FlashExposureComp", (char *) NULL}, - { 0x0013, (char *) "ISOSetting", (char *) NULL}, - { 0x0014, (char *) "ColorBalanceA", (char *) NULL}, - { 0x0016, (char *) "ImageBoundary", (char *) NULL}, - { 0x0017, (char *) "FlashExposureComp", (char *) NULL}, - { 0x0018, (char *) "FlashExposureBracketValue", (char *) NULL}, - { 0x0019, (char *) "ExposureBracketValue", (char *) NULL}, - { 0x001A, (char *) "ImageProcessing", (char *) NULL}, - { 0x001B, (char *) "CropHiSpeed", (char *) NULL}, - { 0x001C, (char *) "ExposureTuning", (char *) NULL}, - { 0x001D, (char *) "SerialNumber", (char *) NULL}, - { 0x001E, (char *) "ColorSpace", (char *) NULL}, - { 0x001F, (char *) "VRInfo", (char *) NULL}, - { 0x0020, (char *) "ImageAuthentication", (char *) NULL}, - { 0x0022, (char *) "ActiveD-Lighting", (char *) NULL}, - { 0x0023, (char *) "PictureControl", (char *) NULL}, - { 0x0024, (char *) "WorldTime", (char *) NULL}, - { 0x0025, (char *) "ISOInfo", (char *) NULL}, - { 0x002A, (char *) "VignetteControl", (char *) NULL}, - { 0x002B, (char *) "DistortInfo", (char *) NULL}, - { 0x0080, (char *) "ImageAdjustment", (char *) NULL}, - { 0x0081, (char *) "ToneComp", (char *) NULL}, - { 0x0082, (char *) "AuxiliaryLens", (char *) NULL}, - { 0x0083, (char *) "LensType", (char *) NULL}, - { 0x0084, (char *) "Lens", (char *) NULL}, - { 0x0085, (char *) "ManualFocusDistance", (char *) NULL}, - { 0x0086, (char *) "DigitalZoom", (char *) NULL}, - { 0x0087, (char *) "FlashMode", (char *) NULL}, - { 0x0088, (char *) "AFInfo", (char *) NULL}, - { 0x0089, (char *) "ShootingMode", (char *) NULL}, - { 0x008B, (char *) "LensFStops", (char *) NULL}, - { 0x008C, (char *) "ContrastCurve", (char *) NULL}, - { 0x008D, (char *) "ColorHue", (char *) NULL}, - { 0x008F, (char *) "SceneMode", (char *) NULL}, - { 0x0090, (char *) "LightSource", (char *) NULL}, - { 0x0091, (char *) "ShotInfo", (char *) NULL}, - { 0x0092, (char *) "HueAdjustment", (char *) NULL}, - { 0x0093, (char *) "NEFCompression", (char *) NULL}, - { 0x0094, (char *) "Saturation", (char *) NULL}, - { 0x0095, (char *) "NoiseReduction", (char *) NULL}, - { 0x0096, (char *) "LinearizationTable", (char *) NULL}, - { 0x0097, (char *) "ColorBalance", (char *) NULL}, - { 0x0098, (char *) "LensData", (char *) NULL}, - { 0x0099, (char *) "RawImageCenter", (char *) NULL}, - { 0x009A, (char *) "SensorPixelSize", (char *) NULL}, - { 0x009C, (char *) "SceneAssist", (char *) NULL}, - { 0x009E, (char *) "RetouchHistory", (char *) NULL}, - { 0x00A0, (char *) "SerialNumber", (char *) NULL}, - { 0x00A2, (char *) "ImageDataSize", (char *) NULL}, - { 0x00A5, (char *) "ImageCount", (char *) NULL}, - { 0x00A6, (char *) "DeletedImageCount", (char *) NULL}, - { 0x00A7, (char *) "ShutterCount", (char *) NULL}, - { 0x00A8, (char *) "FlashInfo", (char *) NULL}, - { 0x00A9, (char *) "ImageOptimization", (char *) NULL}, - { 0x00AA, (char *) "Saturation", (char *) NULL}, - { 0x00AB, (char *) "VariProgram", (char *) NULL}, - { 0x00AC, (char *) "ImageStabilization", (char *) NULL}, - { 0x00AD, (char *) "AFResponse", (char *) NULL}, - { 0x00B0, (char *) "MultiExposure", (char *) NULL}, - { 0x00B1, (char *) "HighISONoiseReduction", (char *) NULL}, - { 0x00B3, (char *) "ToningEffect", (char *) NULL}, - { 0x00B6, (char *) "PowerUpTime", (char *) NULL}, - { 0x00B7, (char *) "AFInfo2", (char *) NULL}, - { 0x00B8, (char *) "FileInfo", (char *) NULL}, - { 0x00B9, (char *) "AFTune", (char *) NULL}, - { 0x00BD, (char *) "PictureControl", (char *) NULL}, - { 0x0E00, (char *) "PrintIM", (char *) NULL}, - { 0x0E01, (char *) "NikonCaptureData", (char *) NULL}, - { 0x0E09, (char *) "NikonCaptureVersion", (char *) NULL}, - { 0x0E0E, (char *) "NikonCaptureOffsets", (char *) NULL}, - { 0x0E10, (char *) "NikonScanIFD", (char *) NULL}, - { 0x0E1D, (char *) "NikonICCProfile", (char *) NULL}, - { 0x0E1E, (char *) "NikonCaptureOutput", (char *) NULL}, - { 0x0E22, (char *) "NEFBitDepth", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Panasonic / Leica maker note -*/ -static TagInfo - exif_panasonic_tag_table[] = - { - { 0x0001, (char *) "ImageQuality", (char *) NULL}, - { 0x0002, (char *) "FirmwareVersion", (char *) NULL}, - { 0x0003, (char *) "WhiteBalance", (char *) NULL}, - { 0x0007, (char *) "FocusMode", (char *) NULL}, - { 0x000F, (char *) "AFAreaMode", (char *) NULL}, - { 0x001A, (char *) "ImageStabilization", (char *) NULL}, - { 0x001C, (char *) "MacroMode", (char *) NULL}, - { 0x001F, (char *) "ShootingMode", (char *) NULL}, - { 0x0020, (char *) "Audio", (char *) NULL}, - { 0x0021, (char *) "DataDump", (char *) NULL}, - { 0x0022, (char *) "EasyMode", (char *) NULL}, - { 0x0023, (char *) "WhiteBalanceBias", (char *) NULL}, - { 0x0024, (char *) "FlashBias", (char *) NULL}, - { 0x0025, (char *) "InternalSerialNumber", (char *) NULL}, - { 0x0026, (char *) "PanasonicExifVersion", (char *) NULL}, - { 0x0028, (char *) "ColorEffect", (char *) NULL}, - { 0x0029, (char *) "TimeSincePowerOn", (char *) NULL}, - { 0x002A, (char *) "BurstMode", (char *) NULL}, - { 0x002B, (char *) "SequenceNumber", (char *) NULL}, - { 0x002C, (char *) "ContrastMode", (char *) NULL}, - { 0x002D, (char *) "NoiseReduction", (char *) NULL}, - { 0x002E, (char *) "SelfTimer", (char *) NULL}, - { 0x0030, (char *) "Rotation", (char *) NULL}, - { 0x0031, (char *) "AFAssistLamp", (char *) NULL}, - { 0x0032, (char *) "ColorMode", (char *) NULL}, - { 0x0033, (char *) "BabyAge_0x0033", (char *) NULL}, - { 0x0034, (char *) "OpticalZoomMode", (char *) NULL}, - { 0x0035, (char *) "ConversionLens", (char *) NULL}, - { 0x0036, (char *) "TravelDay", (char *) NULL}, - { 0x0039, (char *) "Contrast", (char *) NULL}, - { 0x003A, (char *) "WorldTimeLocation", (char *) NULL}, - { 0x003B, (char *) "TextStamp_0x003B", (char *) NULL}, - { 0x003C, (char *) "ProgramISO", (char *) NULL}, - { 0x003D, (char *) "AdvancedSceneMode", (char *) NULL}, - { 0x003E, (char *) "TextStamp_0x003E", (char *) NULL}, - { 0x003F, (char *) "FacesDetected", (char *) NULL}, - { 0x0040, (char *) "Saturation", (char *) NULL}, - { 0x0041, (char *) "Sharpness", (char *) NULL}, - { 0x0042, (char *) "FilmMode", (char *) NULL}, - { 0x0046, (char *) "WBAdjustAB", (char *) NULL}, - { 0x0047, (char *) "WBAdjustGM", (char *) NULL}, - { 0x004B, (char *) "PanasonicImageWidth", (char *) NULL}, - { 0x004C, (char *) "PanasonicImageHeight", (char *) NULL}, - { 0x004D, (char *) "AFPointPosition", (char *) NULL}, - { 0x004E, (char *) "FaceDetInfo", (char *) "Panasonic FaceDetInfo Tags"}, - { 0x0051, (char *) "LensType", (char *) NULL}, - { 0x0052, (char *) "LensSerialNumber", (char *) NULL}, - { 0x0053, (char *) "AccessoryType", (char *) NULL}, - { 0x0059, (char *) "Transform", (char *) NULL}, - { 0x005D, (char *) "IntelligentExposure", (char *) NULL}, - { 0x0061, (char *) "FaceRecInfo", (char *) "Panasonic FaceRecInfo Tags"}, - { 0x0062, (char *) "FlashWarning", (char *) NULL}, - { 0x0063, (char *) "RecognizedFaceFlags?", (char *) NULL}, - { 0x0065, (char *) "Title", (char *) NULL}, - { 0x0066, (char *) "BabyName", (char *) NULL}, - { 0x0067, (char *) "Location", (char *) NULL}, - { 0x0069, (char *) "Country", (char *) NULL}, - { 0x006B, (char *) "State", (char *) NULL}, - { 0x006D, (char *) "City", (char *) NULL}, - { 0x006F, (char *) "Landmark", (char *) NULL}, - { 0x0070, (char *) "IntelligentResolution", (char *) NULL}, - { 0x0079, (char *) "IntelligentD-Range", (char *) NULL}, - { 0x0E00, (char *) "PrintIM", (char *) NULL}, - { 0x8000, (char *) "MakerNoteVersion", (char *) NULL}, - { 0x8001, (char *) "SceneMode", (char *) NULL}, - { 0x8004, (char *) "WBRedLevel", (char *) NULL}, - { 0x8005, (char *) "WBGreenLevel", (char *) NULL}, - { 0x8006, (char *) "WBBlueLevel", (char *) NULL}, - { 0x8007, (char *) "FlashFired", (char *) NULL}, - { 0x8008, (char *) "TextStamp_0x8008", (char *) NULL}, - { 0x8009, (char *) "TextStamp_0x8009", (char *) NULL}, - { 0x8010, (char *) "BabyAge_0x8010", (char *) NULL}, - { 0x8012, (char *) "Transform", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Pentax (Asahi) maker note type 1 -*/ -static TagInfo - exif_asahi_tag_table[] = - { - { 0x0001, (char *) "Capture Mode", (char *) NULL}, - { 0x0002, (char *) "Quality Level", (char *) NULL}, - { 0x0003, (char *) "Focus Mode", (char *) NULL}, - { 0x0004, (char *) "Flash Mode", (char *) NULL}, - { 0x0007, (char *) "White Balance", (char *) NULL}, - { 0x000A, (char *) "Digital Zoom", (char *) NULL}, - { 0x000B, (char *) "Sharpness", (char *) NULL}, - { 0x000C, (char *) "Contrast", (char *) NULL}, - { 0x000D, (char *) "Saturation", (char *) NULL}, - { 0x0014, (char *) "ISO Speed", (char *) NULL}, - { 0x0017, (char *) "Color", (char *) NULL}, - { 0x0E00, (char *) "PrintIM", (char *) NULL}, - { 0x1000, (char *) "Time Zone", (char *) NULL}, - { 0x1001, (char *) "Daylight Savings", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Pentax maker note type 2 -*/ -static TagInfo - exif_pentax_tag_table[] = - { - { 0x0000, (char *) "PentaxVersion", (char *) NULL}, - { 0x0001, (char *) "PentaxMode", (char *) NULL}, - { 0x0002, (char *) "PreviewImageSize", (char *) NULL}, - { 0x0003, (char *) "PreviewImageLength", (char *) NULL}, - { 0x0004, (char *) "PreviewImageStart", (char *) NULL}, - { 0x0005, (char *) "PentaxModelID", (char *) "Pentax PentaxModelID Values"}, - { 0x0006, (char *) "Date", (char *) NULL}, - { 0x0007, (char *) "Time", (char *) NULL}, - { 0x0008, (char *) "Quality", (char *) NULL}, - { 0x0009, (char *) "PentaxImageSize", (char *) NULL}, - { 0x000B, (char *) "PictureMode", (char *) NULL}, - { 0x000C, (char *) "FlashMode", (char *) NULL}, - { 0x000D, (char *) "FocusMode", (char *) NULL}, - { 0x000E, (char *) "AFPointSelected", (char *) NULL}, - { 0x000F, (char *) "AFPointsInFocus", (char *) NULL}, - { 0x0010, (char *) "FocusPosition", (char *) NULL}, - { 0x0012, (char *) "ExposureTime", (char *) NULL}, - { 0x0013, (char *) "FNumber", (char *) NULL}, - { 0x0014, (char *) "ISO", (char *) NULL}, - { 0x0015, (char *) "LightReading", (char *) NULL}, - { 0x0016, (char *) "ExposureCompensation", (char *) NULL}, - { 0x0017, (char *) "MeteringMode", (char *) NULL}, - { 0x0018, (char *) "AutoBracketing", (char *) NULL}, - { 0x0019, (char *) "WhiteBalance", (char *) NULL}, - { 0x001A, (char *) "WhiteBalanceMode", (char *) NULL}, - { 0x001B, (char *) "BlueBalance", (char *) NULL}, - { 0x001C, (char *) "RedBalance", (char *) NULL}, - { 0x001D, (char *) "FocalLength", (char *) NULL}, - { 0x001E, (char *) "DigitalZoom", (char *) NULL}, - { 0x001F, (char *) "Saturation", (char *) NULL}, - { 0x0020, (char *) "Contrast", (char *) NULL}, - { 0x0021, (char *) "Sharpness", (char *) NULL}, - { 0x0022, (char *) "WorldTimeLocation", (char *) NULL}, - { 0x0023, (char *) "HometownCity", (char *) "Pentax City Values"}, - { 0x0024, (char *) "DestinationCity", (char *) "Pentax City Values"}, - { 0x0025, (char *) "HometownDST", (char *) NULL}, - { 0x0026, (char *) "DestinationDST", (char *) NULL}, - { 0x0027, (char *) "DSPFirmwareVersion", (char *) NULL}, - { 0x0028, (char *) "CPUFirmwareVersion", (char *) NULL}, - { 0x0029, (char *) "FrameNumber", (char *) NULL}, - { 0x002D, (char *) "EffectiveLV", (char *) NULL}, - { 0x0032, (char *) "ImageProcessing", (char *) NULL}, - { 0x0033, (char *) "PictureMode", (char *) NULL}, - { 0x0034, (char *) "DriveMode", (char *) NULL}, - { 0x0035, (char *) "SensorSize", (char *) NULL}, - { 0x0037, (char *) "ColorSpace", (char *) NULL}, - { 0x0039, (char *) "RawImageSize", (char *) NULL}, - { 0x003C, (char *) "AFPointsInFocus", (char *) NULL}, - { 0x003E, (char *) "PreviewImageBorders", (char *) NULL}, - { 0x003F, (char *) "LensType", (char *) "Pentax LensType Values"}, - { 0x0040, (char *) "SensitivityAdjust", (char *) NULL}, - { 0x0041, (char *) "ImageProcessingCount", (char *) NULL}, - { 0x0047, (char *) "CameraTemperature", (char *) NULL}, - { 0x0048, (char *) "AELock", (char *) NULL}, - { 0x0049, (char *) "NoiseReduction", (char *) NULL}, - { 0x004D, (char *) "FlashExposureComp", (char *) NULL}, - { 0x004F, (char *) "ImageTone", (char *) NULL}, - { 0x0050, (char *) "ColorTemperature", (char *) NULL}, - { 0x005C, (char *) "ShakeReductionInfo", (char *) "Pentax SRInfo Tags"}, - { 0x005D, (char *) "ShutterCount", (char *) NULL}, - { 0x0060, (char *) "FaceInfo", (char *) "Pentax FaceInfo Tags"}, - { 0x0067, (char *) "Hue", (char *) NULL}, - { 0x0068, (char *) "AWBInfo", (char *) "Pentax AWBInfo Tags"}, - { 0x0069, (char *) "DynamicRangeExpansion", (char *) NULL}, - { 0x006B, (char *) "TimeInfo", (char *) "Pentax TimeInfo Tags"}, - { 0x006C, (char *) "HighLowKeyAdj", (char *) NULL}, - { 0x006D, (char *) "ContrastHighlight", (char *) NULL}, - { 0x006E, (char *) "ContrastShadow", (char *) NULL}, - { 0x006F, (char *) "ContrastHighlightShadowAdj", (char *) NULL}, - { 0x0070, (char *) "FineSharpness", (char *) NULL}, - { 0x0071, (char *) "HighISONoiseReduction", (char *) NULL}, - { 0x0072, (char *) "AFAdjustment", (char *) NULL}, - { 0x0073, (char *) "MonochromeFilterEffect", (char *) NULL}, - { 0x0074, (char *) "MonochromeToning", (char *) NULL}, - { 0x0076, (char *) "FaceDetect", (char *) NULL}, - { 0x0077, (char *) "FaceDetectFrameSize", (char *) NULL}, - { 0x0079, (char *) "ShadowCompensation", (char *) NULL}, - { 0x007A, (char *) "ISOAutoParameters", (char *) NULL}, - { 0x007B, (char *) "CrossProcess", (char *) NULL}, - { 0x007D, (char *) "LensCorr", (char *) "Pentax LensCorr Tags"}, - { 0x007F, (char *) "BleachBypassToning", (char *) NULL}, - { 0x0200, (char *) "BlackPoint", (char *) NULL}, - { 0x0201, (char *) "WhitePoint", (char *) NULL}, - { 0x0203, (char *) "ColorMatrixA", (char *) NULL}, - { 0x0204, (char *) "ColorMatrixB", (char *) NULL}, - { 0x0205, (char *) "CameraSettings", (char *) "Pentax CameraSettings Tags"}, - { 0x0206, (char *) "AEInfo", (char *) "Pentax AEInfo Tags"}, - { 0x0207, (char *) "LensInfo", (char *) "Pentax LensInfo Tags"}, - { 0x0208, (char *) "FlashInfo", (char *) "Pentax FlashInfo Tags"}, - { 0x0209, (char *) "AEMeteringSegments", (char *) NULL}, - { 0x020A, (char *) "FlashMeteringSegments", (char *) NULL}, - { 0x020B, (char *) "SlaveFlashMeteringSegments", (char *) NULL}, - { 0x020D, (char *) "WB_RGGBLevelsDaylight", (char *) NULL}, - { 0x020E, (char *) "WB_RGGBLevelsShade", (char *) NULL}, - { 0x020F, (char *) "WB_RGGBLevelsCloudy", (char *) NULL}, - { 0x0210, (char *) "WB_RGGBLevelsTungsten", (char *) NULL}, - { 0x0211, (char *) "WB_RGGBLevelsFluorescentD", (char *) NULL}, - { 0x0212, (char *) "WB_RGGBLevelsFluorescentN", (char *) NULL}, - { 0x0213, (char *) "WB_RGGBLevelsFluorescentW", (char *) NULL}, - { 0x0214, (char *) "WB_RGGBLevelsFlash", (char *) NULL}, - { 0x0215, (char *) "CameraInfo", (char *) "Pentax CameraInfo Tags"}, - { 0x0216, (char *) "BatteryInfo", (char *) "Pentax BatteryInfo Tags"}, - { 0x021B, (char *) "SaturationInfo", (char *) NULL}, - { 0x021F, (char *) "AFInfo", (char *) "Pentax AFInfo Tags"}, - { 0x0222, (char *) "ColorInfo", (char *) "Pentax ColorInfo Tags"}, - { 0x0224, (char *) "EVStepInfo", (char *) "Pentax EVStepInfo Tags"}, - { 0x0226, (char *) "ShotInfo", (char *) "Pentax ShotInfo Tags"}, - { 0x0227, (char *) "FacePos", (char *) "Pentax FacePos Tags"}, - { 0x0228, (char *) "FaceSize", (char *) "Pentax FaceSize Tags"}, - { 0x0229, (char *) "SerialNumber", (char *) NULL}, - { 0x022A, (char *) "FilterInfo", (char *) "Pentax FilterInfo Tags"}, - { 0x022B, (char *) "LevelInfo", (char *) "Pentax LevelInfo Tags"}, - { 0x022E, (char *) "Artist", (char *) NULL}, - { 0x022F, (char *) "Copyright", (char *) NULL}, - { 0x0230, (char *) "FirmwareVersion", (char *) NULL}, - { 0x0231, (char *) "ContrastDetectAFArea", (char *) NULL}, - { 0x0235, (char *) "CrossProcessParams", (char *) NULL}, - { 0x03FE, (char *) "DataDump", (char *) NULL}, - { 0x0402, (char *) "ToneCurve", (char *) NULL}, - { 0x0403, (char *) "ToneCurves", (char *) NULL}, - { 0x0E00, (char *) "PrintIM", (char *) NULL}, - { 0x1000, (char *) "HometownCityCode", (char *) NULL}, - { 0x1001, (char *) "DestinationCityCode", (char *) NULL}, - { 0x2000, (char *) "PreviewImageData", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Sony maker note -*/ -static TagInfo - exif_sony_tag_table[] = - { - { 0x0102, (char *) "Quality", (char *) NULL}, - { 0x0104, (char *) "FlashExposureComp", (char *) NULL}, - { 0x0105, (char *) "Teleconverter", (char *) NULL}, - { 0x0112, (char *) "WhiteBalanceFineTune", (char *) NULL}, - { 0x0114, (char *) "CameraSettings", (char *) NULL}, - { 0x0115, (char *) "WhiteBalance", (char *) NULL}, - { 0x0E00, (char *) "PrintIM", (char *) NULL}, - { 0x1000, (char *) "MultiBurstMode", (char *) NULL}, - { 0x1001, (char *) "MultiBurstImageWidth", (char *) NULL}, - { 0x1002, (char *) "MultiBurstImageHeight", (char *) NULL}, - { 0x1003, (char *) "Panorama", (char *) NULL}, - { 0x2001, (char *) "PreviewImage", (char *) NULL}, - { 0x2004, (char *) "Contrast", (char *) NULL}, - { 0x2005, (char *) "Saturation", (char *) NULL}, - { 0x2006, (char *) "Sharpness", (char *) NULL}, - { 0x2007, (char *) "Brightness", (char *) NULL}, - { 0x2008, (char *) "LongExposureNoiseReduction", (char *) NULL}, - { 0x2009, (char *) "HighISONoiseReduction", (char *) NULL}, - { 0x200A, (char *) "HDR", (char *) NULL}, - { 0x200B, (char *) "MultiFrameNoiseReduction", (char *) NULL}, - { 0x3000, (char *) "ShotInfo", (char *) NULL}, - { 0xB000, (char *) "FileFormat", (char *) NULL}, - { 0xB001, (char *) "SonyModelID", (char *) NULL}, - { 0xB020, (char *) "ColorReproduction", (char *) NULL}, - { 0xB021, (char *) "ColorTemperature", (char *) NULL}, - { 0xB022, (char *) "ColorCompensationFilter", (char *) NULL}, - { 0xB023, (char *) "SceneMode", (char *) NULL}, - { 0xB024, (char *) "ZoneMatching", (char *) NULL}, - { 0xB025, (char *) "DynamicRangeOptimizer", (char *) NULL}, - { 0xB026, (char *) "ImageStabilization", (char *) NULL}, - { 0xB027, (char *) "LensType", (char *) NULL}, - { 0xB028, (char *) "MinoltaMakerNote", (char *) NULL}, - { 0xB029, (char *) "ColorMode", (char *) NULL}, - { 0xB02B, (char *) "FullImageSize", (char *) NULL}, - { 0xB02C, (char *) "PreviewImageSize", (char *) NULL}, - { 0xB040, (char *) "Macro", (char *) NULL}, - { 0xB041, (char *) "ExposureMode", (char *) NULL}, - { 0xB042, (char *) "FocusMode", (char *) NULL}, - { 0xB043, (char *) "AFMode", (char *) NULL}, - { 0xB044, (char *) "AFIlluminator", (char *) NULL}, - { 0xB047, (char *) "Quality2", (char *) NULL}, - { 0xB048, (char *) "FlashLevel", (char *) NULL}, - { 0xB049, (char *) "ReleaseMode", (char *) NULL}, - { 0xB04A, (char *) "SequenceNumber", (char *) NULL}, - { 0xB04B, (char *) "Anti-Blur", (char *) NULL}, - { 0xB04E, (char *) "LongExposureNoiseReduction", (char *) NULL}, - { 0xB04F, (char *) "DynamicRangeOptimizer", (char *) NULL}, - { 0xB052, (char *) "IntelligentAuto", (char *) NULL}, - { 0xB054, (char *) "WhiteBalance2", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Sigma SD1 maker note -*/ -static TagInfo - exif_sigma_sd1_tag_table[] = - { - { 0x0002, (char *) "SerialNumber", (char *) NULL}, - { 0x0003, (char *) "DriveMode", (char *) NULL}, - { 0x0004, (char *) "ResolutionMode", (char *) NULL}, - { 0x0005, (char *) "AFMode", (char *) NULL}, - { 0x0006, (char *) "FocusSetting", (char *) NULL}, - { 0x0007, (char *) "WhiteBalance", (char *) NULL}, - { 0x0008, (char *) "ExposureMode", (char *) NULL}, - { 0x0009, (char *) "MeteringMode", (char *) NULL}, - { 0x000A, (char *) "LensFocalRange", (char *) NULL}, - { 0x000B, (char *) "ColorSpace", (char *) NULL}, - { 0x000C, (char *) "ExposureCompensation", (char *) NULL}, - { 0x000D, (char *) "Contrast", (char *) NULL}, - { 0x000E, (char *) "Shadow", (char *) NULL}, - { 0x000F, (char *) "Highlight", (char *) NULL}, - { 0x0010, (char *) "Saturation", (char *) NULL}, - { 0x0011, (char *) "Sharpness", (char *) NULL}, - { 0x0012, (char *) "X3FillLight", (char *) NULL}, - { 0x0014, (char *) "ColorAdjustment", (char *) NULL}, - { 0x0015, (char *) "AdjustmentMode", (char *) NULL}, - { 0x0016, (char *) "Quality", (char *) NULL}, - { 0x0017, (char *) "Firmware", (char *) NULL}, - { 0x0018, (char *) "Software", (char *) NULL}, - { 0x0019, (char *) "AutoBracket", (char *) NULL}, - { 0x001A, (char *) "ChrominanceNoiseReduction", (char *) NULL}, - { 0x001B, (char *) "LuminanceNoiseReduction", (char *) NULL}, - { 0x001C, (char *) "PreviewImageStart", (char *) NULL}, - { 0x001D, (char *) "PreviewImageLength", (char *) NULL}, - { 0x001F, (char *) "MakerNoteVersion", (char *) NULL}, - { 0x0026, (char *) "FileFormat", (char *) NULL}, - { 0x002C, (char *) "ColorMode", (char *) NULL}, - { 0x0030, (char *) "Calibration", (char *) NULL}, - { 0x0048, (char *) "LensApertureRange", (char *) NULL}, - { 0x0049, (char *) "FNumber", (char *) NULL}, - { 0x004A, (char *) "ExposureTime", (char *) NULL}, - { 0x004B, (char *) "ExposureTime2", (char *) NULL}, - { 0x004D, (char *) "ExposureCompensation_SD1", (char *) NULL}, - { 0x0055, (char *) "SensorTemperature", (char *) NULL}, - { 0x0056, (char *) "FlashExposureComp", (char *) NULL}, - { 0x0057, (char *) "Firmware_SD1", (char *) NULL}, - { 0x0058, (char *) "WhiteBalance", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -/** -Sigma / Foveon maker note (others than SD1 models) -NB: many tags are not consistent between different models -*/ -static TagInfo - exif_sigma_foveon_tag_table[] = - { - { 0x0002, (char *) "SerialNumber", (char *) NULL}, - { 0x0003, (char *) "DriveMode", (char *) NULL}, - { 0x0004, (char *) "ResolutionMode", (char *) NULL}, - { 0x0005, (char *) "AFMode", (char *) NULL}, - { 0x0006, (char *) "FocusSetting", (char *) NULL}, - { 0x0007, (char *) "WhiteBalance", (char *) NULL}, - { 0x0008, (char *) "ExposureMode", (char *) NULL}, - { 0x0009, (char *) "MeteringMode", (char *) NULL}, - { 0x000A, (char *) "LensFocalRange", (char *) NULL}, - { 0x000B, (char *) "ColorSpace", (char *) NULL}, - { 0x000C, (char *) "ExposureCompensation", (char *) NULL}, - { 0x000D, (char *) "Contrast", (char *) NULL}, - { 0x000E, (char *) "Shadow", (char *) NULL}, - { 0x000F, (char *) "Highlight", (char *) NULL}, - { 0x0010, (char *) "Saturation", (char *) NULL}, - { 0x0011, (char *) "Sharpness", (char *) NULL}, - { 0x0012, (char *) "X3FillLight", (char *) NULL}, - { 0x0014, (char *) "ColorAdjustment", (char *) NULL}, - { 0x0015, (char *) "AdjustmentMode", (char *) NULL}, - { 0x0016, (char *) "Quality", (char *) NULL}, - { 0x0017, (char *) "Firmware", (char *) NULL}, - { 0x0018, (char *) "Software", (char *) NULL}, - { 0x0019, (char *) "AutoBracket", (char *) NULL}, - { 0x001A, (char *) "PreviewImageStart", (char *) NULL}, - { 0x001B, (char *) "PreviewImageLength", (char *) NULL}, - { 0x001C, (char *) "PreviewImageSize", (char *) NULL}, - { 0x001D, (char *) "MakerNoteVersion", (char *) NULL}, - { 0x001F, (char *) "AFPoint", (char *) NULL}, - { 0x0022, (char *) "FileFormat", (char *) NULL}, - { 0x0024, (char *) "Calibration", (char *) NULL}, - { 0x002C, (char *) "ColorMode", (char *) NULL}, - { 0x0030, (char *) "LensApertureRange", (char *) NULL}, - { 0x0031, (char *) "FNumber", (char *) NULL}, - { 0x0032, (char *) "ExposureTime", (char *) NULL}, - { 0x0033, (char *) "ExposureTime2", (char *) NULL}, - { 0x0034, (char *) "BurstShot", (char *) NULL}, - { 0x0035, (char *) "ExposureCompensation", (char *) NULL}, - { 0x0039, (char *) "SensorTemperature", (char *) NULL}, - { 0x003A, (char *) "FlashExposureComp", (char *) NULL}, - { 0x003B, (char *) "Firmware", (char *) NULL}, - { 0x003C, (char *) "WhiteBalance", (char *) NULL}, - { 0x003D, (char *) "PictureMode", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -// -------------------------------------------------------------------------- -// IPTC tags definition -// -------------------------------------------------------------------------- - -static TagInfo - iptc_tag_table[] = - { - // IPTC-NAA IIM version 4 - { 0x0200 + 0, (char *) "ApplicationRecordVersion", (char *) "Application Record Version"}, - { 0x0200 + 3, (char *) "ObjectTypeReference", (char *) "Object Type Reference"}, - { 0x0200 + 4, (char *) "ObjectAttributeReference", (char *) "Object Attribute Reference"}, - { 0x0200 + 5, (char *) "ObjectName", (char *) "Title"}, - { 0x0200 + 7, (char *) "EditStatus", (char *) "Edit Status"}, - { 0x0200 + 8, (char *) "EditorialUpdate", (char *) "Editorial Update"}, - { 0x0200 + 10, (char *) "Urgency", (char *) "Urgency"}, - { 0x0200 + 12, (char *) "SubjectReference", (char *) "Subject Reference"}, - { 0x0200 + 15, (char *) "Category", (char *) "Category"}, - { 0x0200 + 20, (char *) "SupplementalCategories", (char *) "Supplemental Categories"}, - { 0x0200 + 22, (char *) "FixtureIdentifier", (char *) "Fixture Identifier"}, - { 0x0200 + 25, (char *) "Keywords", (char *) "Keywords"}, - { 0x0200 + 26, (char *) "ContentLocationCode", (char *) "Content Location Code"}, - { 0x0200 + 27, (char *) "ContentLocationName", (char *) "Content Location Name"}, - { 0x0200 + 30, (char *) "ReleaseDate", (char *) "Release Date"}, - { 0x0200 + 35, (char *) "ReleaseTime", (char *) "Release Time"}, - { 0x0200 + 37, (char *) "ExpirationDate", (char *) "Expiration Date"}, - { 0x0200 + 38, (char *) "ExpirationTime", (char *) "Expiration Time"}, - { 0x0200 + 40, (char *) "SpecialInstructions", (char *) "Instructions"}, - { 0x0200 + 42, (char *) "ActionAdvised", (char *) "Action Advised"}, - { 0x0200 + 45, (char *) "ReferenceService", (char *) "Reference Service"}, - { 0x0200 + 47, (char *) "ReferenceDate", (char *) "Reference Date"}, - { 0x0200 + 50, (char *) "ReferenceNumber", (char *) "Reference Number"}, - { 0x0200 + 55, (char *) "DateCreated", (char *) "Date Created"}, - { 0x0200 + 60, (char *) "TimeCreated", (char *) "Time Created"}, - { 0x0200 + 62, (char *) "DigitalCreationDate", (char *) "Digital Creation Date"}, - { 0x0200 + 63, (char *) "DigitalCreationTime", (char *) "Digital Creation Time"}, - { 0x0200 + 65, (char *) "OriginatingProgram", (char *) "Originating Program"}, - { 0x0200 + 70, (char *) "ProgramVersion", (char *) "Program Version"}, - { 0x0200 + 75, (char *) "ObjectCycle", (char *) "Object Cycle"}, - { 0x0200 + 80, (char *) "By-line", (char *) "Author"}, - { 0x0200 + 85, (char *) "By-lineTitle", (char *) "Author's Position"}, - { 0x0200 + 90, (char *) "City", (char *) "City"}, - { 0x0200 + 92, (char *) "SubLocation", (char *) "Sub-Location"}, - { 0x0200 + 95, (char *) "Province-State", (char *) "State/Province"}, - { 0x0200 + 100, (char *) "Country-PrimaryLocationCode", (char *) "Country Code"}, - { 0x0200 + 101, (char *) "Country-PrimaryLocationName", (char *) "Country Name"}, - { 0x0200 + 103, (char *) "OriginalTransmissionReference", (char *) "Transmission Reference"}, - { 0x0200 + 105, (char *) "Headline", (char *) "Headline"}, - { 0x0200 + 110, (char *) "Credit", (char *) "Credit"}, - { 0x0200 + 115, (char *) "Source", (char *) "Source"}, - { 0x0200 + 116, (char *) "CopyrightNotice", (char *) "Copyright Notice"}, - { 0x0200 + 118, (char *) "Contact", (char *) "Contact"}, - { 0x0200 + 120, (char *) "Caption-Abstract", (char *) "Caption"}, - { 0x0200 + 122, (char *) "Writer-Editor", (char *) "Caption Writer"}, - { 0x0200 + 125, (char *) "RasterizedCaption", (char *) "Rasterized Caption"}, - { 0x0200 + 130, (char *) "ImageType", (char *) "Image Type"}, - { 0x0200 + 131, (char *) "ImageOrientation", (char *) "Image Orientation"}, - { 0x0200 + 135, (char *) "LanguageIdentifier", (char *) "Language Identifier"}, - { 0x0200 + 150, (char *) "AudioType", (char *) "Audio Type"}, - { 0x0200 + 151, (char *) "AudioSamplingRate", (char *) "Audio Sampling Rate"}, - { 0x0200 + 152, (char *) "AudioSamplingResolution", (char *) "Audio Sampling Resolution"}, - { 0x0200 + 153, (char *) "AudioDuration", (char *) "Audio Duration"}, - { 0x0200 + 154, (char *) "AudioOutcue", (char *) "Audio Outcue"}, - // Metadata seen in other softwares (see also http://owl.phy.queensu.ca/~phil/exiftool/TagNames/IPTC.html#ApplicationRecord) - { 0x0200 + 184, (char *) "JobID", (char *) "Job ID"}, - { 0x0200 + 185, (char *) "MasterDocumentID", (char *) "Master Document ID"}, - { 0x0200 + 186, (char *) "ShortDocumentID", (char *) "Short Document ID"}, - { 0x0200 + 187, (char *) "UniqueDocumentID", (char *) "Unique Document ID"}, - { 0x0200 + 188, (char *) "OwnerID", (char *) "Owner ID"}, - // IPTC-NAA IIM version 4 - { 0x0200 + 200, (char *) "ObjectPreviewFileFormat", (char *) "Object Preview File Format"}, - { 0x0200 + 201, (char *) "ObjectPreviewFileVersion", (char *) "Object Preview File Version"}, - { 0x0200 + 202, (char *) "ObjectPreviewData", (char *) "Audio Outcue"}, - // Metadata seen in other softwares (see also http://owl.phy.queensu.ca/~phil/exiftool/TagNames/IPTC.html#ApplicationRecord) - { 0x0200 + 221, (char *) "Prefs", (char *) "PhotoMechanic preferences"}, - { 0x0200 + 225, (char *) "ClassifyState", (char *) "Classify State"}, - { 0x0200 + 228, (char *) "SimilarityIndex", (char *) "Similarity Index"}, - { 0x0200 + 230, (char *) "DocumentNotes", (char *) "Document Notes"}, - { 0x0200 + 231, (char *) "DocumentHistory", (char *) "Document History"}, - { 0x0200 + 232, (char *) "ExifCameraInfo", (char *) "Exif Camera Info"}, - - { 0x0000, (char *) NULL, (char *) NULL} - }; - -// -------------------------------------------------------------------------- -// GeoTIFF tags definition -// -------------------------------------------------------------------------- - -static TagInfo - geotiff_tag_table[] = - { - { 0x830E, (char *) "GeoPixelScale", (char *) NULL}, - { 0x8480, (char *) "Intergraph TransformationMatrix", (char *) NULL}, - { 0x8482, (char *) "GeoTiePoints", (char *) NULL}, - { 0x85D7, (char *) "JPL Carto IFD offset", (char *) NULL}, - { 0x85D8, (char *) "GeoTransformationMatrix", (char *) NULL}, - { 0x87AF, (char *) "GeoKeyDirectory", (char *) NULL}, - { 0x87B0, (char *) "GeoDoubleParams", (char *) NULL}, - { 0x87B1, (char *) "GeoASCIIParams", (char *) NULL}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -// -------------------------------------------------------------------------- -// Animation tags definition -// -------------------------------------------------------------------------- - -static TagInfo - animation_tag_table[] = - { - { 0x0001, (char *) "LogicalWidth", (char *) "Logical width"}, - { 0x0002, (char *) "LogicalHeight", (char *) "Logical height"}, - { 0x0003, (char *) "GlobalPalette", (char *) "Global Palette"}, - { 0x0004, (char *) "Loop", (char *) "loop"}, - { 0x1001, (char *) "FrameLeft", (char *) "Frame left"}, - { 0x1002, (char *) "FrameTop", (char *) "Frame top"}, - { 0x1003, (char *) "NoLocalPalette", (char *) "No Local Palette"}, - { 0x1004, (char *) "Interlaced", (char *) "Interlaced"}, - { 0x1005, (char *) "FrameTime", (char *) "Frame display time"}, - { 0x1006, (char *) "DisposalMethod", (char *) "Frame disposal method"}, - { 0x0000, (char *) NULL, (char *) NULL} - }; - -// -------------------------------------------------------------------------- -// TagLib class definition -// -------------------------------------------------------------------------- - - -/** -This is where the tag info tables are initialized -*/ -TagLib::TagLib() { - // initialize all known metadata models - // ==================================== - - // Exif - addMetadataModel(TagLib::EXIF_MAIN, exif_exif_tag_table); - addMetadataModel(TagLib::EXIF_EXIF, exif_exif_tag_table); - addMetadataModel(TagLib::EXIF_GPS, exif_gps_tag_table); - addMetadataModel(TagLib::EXIF_INTEROP, exif_interop_tag_table); - - // Exif maker note - addMetadataModel(TagLib::EXIF_MAKERNOTE_CANON, exif_canon_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_CASIOTYPE1, exif_casio_type1_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_CASIOTYPE2, exif_casio_type2_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_FUJIFILM, exif_fujifilm_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_KYOCERA, exif_kyocera_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_MINOLTA, exif_minolta_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_NIKONTYPE1, exif_nikon_type1_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_NIKONTYPE2, exif_nikon_type2_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_NIKONTYPE3, exif_nikon_type3_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_OLYMPUSTYPE1, exif_olympus_type1_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_PANASONIC, exif_panasonic_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_ASAHI, exif_asahi_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_PENTAX, exif_pentax_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_SONY, exif_sony_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_SIGMA_SD1, exif_sigma_sd1_tag_table); - addMetadataModel(TagLib::EXIF_MAKERNOTE_SIGMA_FOVEON, exif_sigma_foveon_tag_table); - - // IPTC/NAA - addMetadataModel(TagLib::IPTC, iptc_tag_table); - - // GeoTIFF - addMetadataModel(TagLib::GEOTIFF, geotiff_tag_table); - - // Animation - addMetadataModel(TagLib::ANIMATION, animation_tag_table); -} - -BOOL TagLib::addMetadataModel(MDMODEL md_model, TagInfo *tag_table) { - // check that the model doesn't already exist - if((_table_map.find(md_model) == _table_map.end()) && (tag_table != NULL)) { - - // add the tag description table - TAGINFO *info_map = new(std::nothrow) TAGINFO(); - if(!info_map) return FALSE; - - for(int i = 0; ; i++) { - if((tag_table[i].tag == 0) && (tag_table[i].fieldname == NULL)) - break; - (*info_map)[tag_table[i].tag] = &tag_table[i]; - } - - // add the metadata model - _table_map[md_model] = info_map; - - return TRUE; - } - - return FALSE; -} - -TagLib::~TagLib() { - // delete metadata models - for(TABLEMAP::iterator i = _table_map.begin(); i != _table_map.end(); i++) { - TAGINFO *info_map = (*i).second; - delete info_map; - } -} - - -TagLib& -TagLib::instance() { - static TagLib s; - return s; -} - -const TagInfo* -TagLib::getTagInfo(MDMODEL md_model, WORD tagID) { - - if(_table_map.find(md_model) != _table_map.end()) { - - TAGINFO *info_map = (TAGINFO*)_table_map[md_model]; - if(info_map->find(tagID) != info_map->end()) { - return (*info_map)[tagID]; - } - } - return NULL; -} - -const char* -TagLib::getTagFieldName(MDMODEL md_model, WORD tagID, char *defaultKey) { - - const TagInfo *info = getTagInfo(md_model, tagID); - if(NULL == info) { - if(defaultKey != NULL) { - sprintf(defaultKey, "Tag 0x%04X", tagID); - return &defaultKey[0]; - } else { - return NULL; - } - } - - return info->fieldname; -} - -const char* -TagLib::getTagDescription(MDMODEL md_model, WORD tagID) { - - const TagInfo *info = getTagInfo(md_model, tagID); - if(info) { - return info->description; - } - - return NULL; -} - -int TagLib::getTagID(MDMODEL md_model, const char *key) { - - if(_table_map.find(md_model) != _table_map.end()) { - - TAGINFO *info_map = (TAGINFO*)_table_map[md_model]; - for(TAGINFO::iterator i = info_map->begin(); i != info_map->end(); i++) { - const TagInfo *info = (*i).second; - if(info && (strcmp(info->fieldname, key) == 0)) { - return (int)info->tag; - } - } - } - return -1; -} - -FREE_IMAGE_MDMODEL -TagLib::getFreeImageModel(MDMODEL model) { - switch(model) { - case EXIF_MAIN: - return FIMD_EXIF_MAIN; - - case EXIF_EXIF: - return FIMD_EXIF_EXIF; - - case EXIF_GPS: - return FIMD_EXIF_GPS; - - case EXIF_INTEROP: - return FIMD_EXIF_INTEROP; - - case EXIF_MAKERNOTE_CANON: - case EXIF_MAKERNOTE_CASIOTYPE1: - case EXIF_MAKERNOTE_CASIOTYPE2: - case EXIF_MAKERNOTE_FUJIFILM: - case EXIF_MAKERNOTE_KYOCERA: - case EXIF_MAKERNOTE_MINOLTA: - case EXIF_MAKERNOTE_NIKONTYPE1: - case EXIF_MAKERNOTE_NIKONTYPE2: - case EXIF_MAKERNOTE_NIKONTYPE3: - case EXIF_MAKERNOTE_OLYMPUSTYPE1: - case EXIF_MAKERNOTE_PANASONIC: - case EXIF_MAKERNOTE_ASAHI: - case EXIF_MAKERNOTE_PENTAX: - case EXIF_MAKERNOTE_SONY: - case EXIF_MAKERNOTE_SIGMA_SD1: - case EXIF_MAKERNOTE_SIGMA_FOVEON: - return FIMD_EXIF_MAKERNOTE; - - case IPTC: - return FIMD_IPTC; - - case GEOTIFF: - return FIMD_GEOTIFF; - - case ANIMATION: - return FIMD_ANIMATION; - } - - return FIMD_NODATA; -} - diff --git a/Dependencies/FreeImage/Source/Metadata/XTIFF.cpp b/Dependencies/FreeImage/Source/Metadata/XTIFF.cpp deleted file mode 100644 index d5be902..0000000 --- a/Dependencies/FreeImage/Source/Metadata/XTIFF.cpp +++ /dev/null @@ -1,766 +0,0 @@ -// ========================================================== -// Metadata functions implementation -// Extended TIFF Directory GEO Tag Support -// -// Design and implementation by -// - Hervé Drolon (drolon@infonie.fr) -// - Thorsten Radde (support@IdealSoftware.com) -// - Berend Engelbrecht (softwarecave@users.sourceforge.net) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// Based on the LibTIFF xtiffio sample and on LibGeoTIFF -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#include "../LibTIFF4/tiffiop.h" - -#include "FreeImage.h" -#include "Utilities.h" -#include "FreeImageTag.h" -#include "FIRational.h" - -// ---------------------------------------------------------- -// Extended TIFF Directory GEO Tag Support -// ---------------------------------------------------------- - -/** - Tiff info structure. - Entry format: - { TAGNUMBER, ReadCount, WriteCount, DataType, FIELDNUM, OkToChange, PassDirCountOnSet, AsciiName } - - For ReadCount, WriteCount, -1 = unknown. -*/ -static const TIFFFieldInfo xtiffFieldInfo[] = { - { TIFFTAG_GEOPIXELSCALE, -1, -1, TIFF_DOUBLE, FIELD_CUSTOM, TRUE, TRUE, (char*)"GeoPixelScale" }, - { TIFFTAG_INTERGRAPH_MATRIX, -1, -1, TIFF_DOUBLE, FIELD_CUSTOM, TRUE, TRUE, (char*)"Intergraph TransformationMatrix" }, - { TIFFTAG_GEOTRANSMATRIX, -1, -1, TIFF_DOUBLE, FIELD_CUSTOM, TRUE, TRUE, (char*)"GeoTransformationMatrix" }, - { TIFFTAG_GEOTIEPOINTS, -1, -1, TIFF_DOUBLE, FIELD_CUSTOM, TRUE, TRUE, (char*)"GeoTiePoints" }, - { TIFFTAG_GEOKEYDIRECTORY,-1,-1, TIFF_SHORT, FIELD_CUSTOM, TRUE, TRUE, (char*)"GeoKeyDirectory" }, - { TIFFTAG_GEODOUBLEPARAMS, -1, -1, TIFF_DOUBLE, FIELD_CUSTOM, TRUE, TRUE, (char*)"GeoDoubleParams" }, - { TIFFTAG_GEOASCIIPARAMS, -1, -1, TIFF_ASCII, FIELD_CUSTOM, TRUE, FALSE, (char*) "GeoASCIIParams" }, - { TIFFTAG_JPL_CARTO_IFD, 1, 1, TIFF_LONG, FIELD_CUSTOM, TRUE, TRUE, (char*)"JPL Carto IFD offset" } /** Don't use this! **/ -}; - -static void -_XTIFFLocalDefaultDirectory(TIFF *tif) { - int tag_size = sizeof(xtiffFieldInfo) / sizeof(xtiffFieldInfo[0]); - // Install the extended Tag field info - TIFFMergeFieldInfo(tif, xtiffFieldInfo, tag_size); -} - -static TIFFExtendProc _ParentExtender; - -/** -This is the callback procedure, and is -called by the DefaultDirectory method -every time a new TIFF directory is opened. -*/ -static void -_XTIFFDefaultDirectory(TIFF *tif) { - // set up our own defaults - _XTIFFLocalDefaultDirectory(tif); - - /* - Since an XTIFF client module may have overridden - the default directory method, we call it now to - allow it to set up the rest of its own methods. - */ - if (_ParentExtender) { - (*_ParentExtender)(tif); - } -} - -/** -XTIFF Initializer -- sets up the callback procedure for the TIFF module. -@see PluginTIFF::InitTIFF -*/ -void -XTIFFInitialize(void) { - static int first_time = 1; - - if (! first_time) { - return; /* Been there. Done that. */ - } - first_time = 0; - - // Grab the inherited method and install - _ParentExtender = TIFFSetTagExtender(_XTIFFDefaultDirectory); -} - -// ---------------------------------------------------------- -// GeoTIFF tag reading / writing -// ---------------------------------------------------------- - -BOOL -tiff_read_geotiff_profile(TIFF *tif, FIBITMAP *dib) { - char defaultKey[16]; - - // first check for a mandatory tag - { - short tag_count = 0; - void* data = NULL; - - if(!TIFFGetField(tif, TIFFTAG_GEOKEYDIRECTORY, &tag_count, &data)) { - // no GeoTIFF tag here - return TRUE; - } - } - - // next, read GeoTIFF tags - - const size_t tag_size = sizeof(xtiffFieldInfo) / sizeof(xtiffFieldInfo[0]); - - TagLib& tag_lib = TagLib::instance(); - - for(size_t i = 0; i < tag_size; i++) { - - const TIFFFieldInfo *fieldInfo = &xtiffFieldInfo[i]; - - if(fieldInfo->field_type == TIFF_ASCII) { - char *params = NULL; - - if(TIFFGetField(tif, fieldInfo->field_tag, ¶ms)) { - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(!tag) { - return FALSE; - } - - WORD tag_id = (WORD)fieldInfo->field_tag; - - FreeImage_SetTagType(tag, (FREE_IMAGE_MDTYPE)fieldInfo->field_type); - FreeImage_SetTagID(tag, tag_id); - FreeImage_SetTagKey(tag, tag_lib.getTagFieldName(TagLib::GEOTIFF, tag_id, defaultKey)); - FreeImage_SetTagDescription(tag, tag_lib.getTagDescription(TagLib::GEOTIFF, tag_id)); - FreeImage_SetTagLength(tag, (DWORD)strlen(params) + 1); - FreeImage_SetTagCount(tag, FreeImage_GetTagLength(tag)); - FreeImage_SetTagValue(tag, params); - FreeImage_SetMetadata(FIMD_GEOTIFF, dib, FreeImage_GetTagKey(tag), tag); - - // delete the tag - FreeImage_DeleteTag(tag); - } - } else { - short tag_count = 0; - void* data = NULL; - - if(TIFFGetField(tif, fieldInfo->field_tag, &tag_count, &data)) { - // create a tag - FITAG *tag = FreeImage_CreateTag(); - if(!tag) { - return FALSE; - } - - WORD tag_id = (WORD)fieldInfo->field_tag; - FREE_IMAGE_MDTYPE tag_type = (FREE_IMAGE_MDTYPE)fieldInfo->field_type; - - FreeImage_SetTagType(tag, tag_type); - FreeImage_SetTagID(tag, tag_id); - FreeImage_SetTagKey(tag, tag_lib.getTagFieldName(TagLib::GEOTIFF, tag_id, defaultKey)); - FreeImage_SetTagDescription(tag, tag_lib.getTagDescription(TagLib::GEOTIFF, tag_id)); - FreeImage_SetTagLength(tag, FreeImage_TagDataWidth(tag_type) * tag_count); - FreeImage_SetTagCount(tag, tag_count); - FreeImage_SetTagValue(tag, data); - FreeImage_SetMetadata(FIMD_GEOTIFF, dib, FreeImage_GetTagKey(tag), tag); - - // delete the tag - FreeImage_DeleteTag(tag); - } - } - } // for(tag_size) - - return TRUE; -} - -BOOL -tiff_write_geotiff_profile(TIFF *tif, FIBITMAP *dib) { - char defaultKey[16]; - - if(FreeImage_GetMetadataCount(FIMD_GEOTIFF, dib) == 0) { - // no GeoTIFF tag here - return TRUE; - } - - const size_t tag_size = sizeof(xtiffFieldInfo) / sizeof(xtiffFieldInfo[0]); - - TagLib& tag_lib = TagLib::instance(); - - for(size_t i = 0; i < tag_size; i++) { - const TIFFFieldInfo *fieldInfo = &xtiffFieldInfo[i]; - - FITAG *tag = NULL; - const char *key = tag_lib.getTagFieldName(TagLib::GEOTIFF, (WORD)fieldInfo->field_tag, defaultKey); - - if(FreeImage_GetMetadata(FIMD_GEOTIFF, dib, key, &tag)) { - if(FreeImage_GetTagType(tag) == FIDT_ASCII) { - TIFFSetField(tif, fieldInfo->field_tag, FreeImage_GetTagValue(tag)); - } else { - TIFFSetField(tif, fieldInfo->field_tag, FreeImage_GetTagCount(tag), FreeImage_GetTagValue(tag)); - } - } - } - - return TRUE; -} - -// ---------------------------------------------------------- -// TIFF EXIF tag reading & writing -// ---------------------------------------------------------- - -/** -Read a single Exif tag - -@param tif TIFF handle -@param tag_id TIFF Tag ID -@param dib Image being read -@param md_model Metadata model where to store the tag -@return Returns TRUE if successful, returns FALSE otherwise -*/ -static BOOL -tiff_read_exif_tag(TIFF *tif, uint32 tag_id, FIBITMAP *dib, TagLib::MDMODEL md_model) { - uint32 value_count = 0; - int mem_alloc = 0; - void *raw_data = NULL; - - if(tag_id == TIFFTAG_EXIFIFD) { - // Exif IFD offset - skip this tag - // md_model should be EXIF_MAIN, the Exif IFD is processed later using the EXIF_EXIF metadata model - return TRUE; - } - if((tag_id == TIFFTAG_GPSIFD) && (md_model == TagLib::EXIF_MAIN)) { - // Exif GPS IFD offset - skip this tag - // should be processed in another way ... - return TRUE; - } - - TagLib& tagLib = TagLib::instance(); - - // get the tag key - use NULL to avoid reading GeoTIFF tags - const char *key = tagLib.getTagFieldName(md_model, (WORD)tag_id, NULL); - if(key == NULL) { - return TRUE; - } - - const TIFFField *fip = TIFFFieldWithTag(tif, tag_id); - if(fip == NULL) { - return TRUE; - } - - if(TIFFFieldPassCount(fip)) { - // a count value is required for 'TIFFGetField' - - if (TIFFFieldReadCount(fip) != TIFF_VARIABLE2) { - // a count is required, it will be of type uint16 - uint16 value_count16 = 0; - if(TIFFGetField(tif, tag_id, &value_count16, &raw_data) != 1) { - // stop, ignore error - return TRUE; - } - value_count = value_count16; - } else { - // a count is required, it will be of type uint32 - uint32 value_count32 = 0; - if(TIFFGetField(tif, tag_id, &value_count32, &raw_data) != 1) { - // stop, ignore error - return TRUE; - } - value_count = value_count32; - } - - } else { - // determine count - - if (TIFFFieldReadCount(fip) == TIFF_VARIABLE || TIFFFieldReadCount(fip) == TIFF_VARIABLE2) { - value_count = 1; - } else if (TIFFFieldReadCount(fip) == TIFF_SPP) { - uint16 spp; - TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &spp); - value_count = spp; - } else { - value_count = TIFFFieldReadCount(fip); - } - - // access fields as pointers to data - // (### determining this is NOT robust... and hardly can be. It is implemented looking the _TIFFVGetField code) - - if(TIFFFieldTag(fip) == TIFFTAG_TRANSFERFUNCTION) { - // reading this tag cause a bug probably located somewhere inside libtiff - return TRUE; - } - - if ((TIFFFieldDataType(fip) == TIFF_ASCII - || TIFFFieldReadCount(fip) == TIFF_VARIABLE - || TIFFFieldReadCount(fip) == TIFF_VARIABLE2 - || TIFFFieldReadCount(fip) == TIFF_SPP - || value_count > 1) - - && TIFFFieldTag(fip) != TIFFTAG_PAGENUMBER - && TIFFFieldTag(fip) != TIFFTAG_HALFTONEHINTS - && TIFFFieldTag(fip) != TIFFTAG_YCBCRSUBSAMPLING - && TIFFFieldTag(fip) != TIFFTAG_DOTRANGE - - && TIFFFieldTag(fip) != TIFFTAG_BITSPERSAMPLE //<- these two are tricky - - && TIFFFieldTag(fip) != TIFFTAG_COMPRESSION //<- they are defined as TIFF_VARIABLE but in reality return a single value - ) { - if(TIFFGetField(tif, tag_id, &raw_data) != 1) { - // stop, ignore error - return TRUE; - } - } else { - int value_size = 0; - - // access fields as values - - // Note: - // For TIFF_RATIONAL values, TIFFDataWidth() returns 8, but LibTIFF use internaly 4-byte float to represent rationals. - { - TIFFDataType tag_type = TIFFFieldDataType(fip); - switch(tag_type) { - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - value_size = 4; - break; - default: - value_size = TIFFDataWidth(tag_type); - break; - } - } - - raw_data = _TIFFmalloc(value_size * value_count); - mem_alloc = 1; - int ok = FALSE; - - // ### if value_count > 1, tag is PAGENUMBER or HALFTONEHINTS or YCBCRSUBSAMPLING or DOTRANGE, - // all off which are value_count == 2 (see tif_dirinfo.c) - switch(value_count) - { - case 1: - ok = TIFFGetField(tif, tag_id, raw_data); - break; - case 2: - ok = TIFFGetField(tif, tag_id, raw_data, (BYTE*)(raw_data) + value_size*1); - break; -/* # we might need more in the future: - case 3: - ok = TIFFGetField(tif, tag_id, raw_data, (BYTE*)(raw_data) + value_size*1, (BYTE*)(raw_data) + value_size*2); - break; -*/ - default: - FreeImage_OutputMessageProc(FIF_TIFF, "Unimplemented variable number of parameters for Tiff Tag %s", TIFFFieldName(fip)); - break; - } - if(ok != 1) { - _TIFFfree(raw_data); - return TRUE; - } - } - } - - // build FreeImage tag from Tiff Tag data we collected - - FITAG *fitag = FreeImage_CreateTag(); - if(!fitag) { - if(mem_alloc) { - _TIFFfree(raw_data); - } - return FALSE; - } - - FreeImage_SetTagID(fitag, (WORD)tag_id); - FreeImage_SetTagKey(fitag, key); - - switch(TIFFFieldDataType(fip)) { - case TIFF_BYTE: - FreeImage_SetTagType(fitag, FIDT_BYTE); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_UNDEFINED: - FreeImage_SetTagType(fitag, FIDT_UNDEFINED); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_SBYTE: - FreeImage_SetTagType(fitag, FIDT_SBYTE); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_SHORT: - FreeImage_SetTagType(fitag, FIDT_SHORT); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_SSHORT: - FreeImage_SetTagType(fitag, FIDT_SSHORT); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_LONG: - FreeImage_SetTagType(fitag, FIDT_LONG); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_IFD: - FreeImage_SetTagType(fitag, FIDT_IFD); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_SLONG: - FreeImage_SetTagType(fitag, FIDT_SLONG); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_RATIONAL: { - // LibTIFF converts rational to floats : reconvert floats to rationals - DWORD *rvalue = (DWORD*)malloc(2 * value_count * sizeof(DWORD)); - for(uint32 i = 0; i < value_count; i++) { - float *fv = (float*)raw_data; - FIRational rational(fv[i]); - rvalue[2*i] = rational.getNumerator(); - rvalue[2*i+1] = rational.getDenominator(); - } - FreeImage_SetTagType(fitag, FIDT_RATIONAL); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, rvalue); - free(rvalue); - } - break; - - case TIFF_SRATIONAL: { - // LibTIFF converts rational to floats : reconvert floats to rationals - LONG *rvalue = (LONG*)malloc(2 * value_count * sizeof(LONG)); - for(uint32 i = 0; i < value_count; i++) { - float *fv = (float*)raw_data; - FIRational rational(fv[i]); - rvalue[2*i] = rational.getNumerator(); - rvalue[2*i+1] = rational.getDenominator(); - } - FreeImage_SetTagType(fitag, FIDT_RATIONAL); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, rvalue); - free(rvalue); - } - break; - - case TIFF_FLOAT: - FreeImage_SetTagType(fitag, FIDT_FLOAT); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_DOUBLE: - FreeImage_SetTagType(fitag, FIDT_DOUBLE); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_LONG8: // BigTIFF 64-bit unsigned integer - FreeImage_SetTagType(fitag, FIDT_LONG8); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_IFD8: // BigTIFF 64-bit unsigned integer (offset) - FreeImage_SetTagType(fitag, FIDT_IFD8); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_SLONG8: // BigTIFF 64-bit signed integer - FreeImage_SetTagType(fitag, FIDT_SLONG8); - FreeImage_SetTagLength(fitag, TIFFDataWidth( TIFFFieldDataType(fip) ) * value_count); - FreeImage_SetTagCount(fitag, value_count); - FreeImage_SetTagValue(fitag, raw_data); - break; - - case TIFF_ASCII: - default: { - size_t length = 0; - if(!mem_alloc && (TIFFFieldDataType(fip) == TIFF_ASCII) && (TIFFFieldReadCount(fip) == TIFF_VARIABLE)) { - // when metadata tag is of type ASCII and it's value is of variable size (TIFF_VARIABLE), - // tiff_read_exif_tag function gives length of 1 so all strings are truncated ... - // ... try to avoid this by using an explicit calculation for 'length' - length = strlen((char*)raw_data) + 1; - } - else { - // remember that raw_data = _TIFFmalloc(value_size * value_count); - const int value_size = TIFFDataWidth( TIFFFieldDataType(fip) ); - length = value_size * value_count; - } - FreeImage_SetTagType(fitag, FIDT_ASCII); - FreeImage_SetTagLength(fitag, (DWORD)length); - FreeImage_SetTagCount(fitag, (DWORD)length); - FreeImage_SetTagValue(fitag, raw_data); - } - break; - } - - const char *description = tagLib.getTagDescription(md_model, (WORD)tag_id); - if(description) { - FreeImage_SetTagDescription(fitag, description); - } - // store the tag - FreeImage_SetMetadata(tagLib.getFreeImageModel(md_model), dib, FreeImage_GetTagKey(fitag), fitag); - - // destroy the tag - FreeImage_DeleteTag(fitag); - - if(mem_alloc) { - _TIFFfree(raw_data); - } - return TRUE; -} - -/** -Read all known exif tags - -@param tif TIFF handle -@param md_model Metadata model where to store the tags -@param dib Image being read -@return Returns TRUE if successful, returns FALSE otherwise -*/ -BOOL -tiff_read_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { - - TagLib& tagLib = TagLib::instance(); - - const int count = TIFFGetTagListCount(tif); - for(int i = 0; i < count; i++) { - uint32 tag_id = TIFFGetTagListEntry(tif, i); - // read the tag - if (!tiff_read_exif_tag(tif, tag_id, dib, md_model)) - return FALSE; - } - - // we want to know values of standard tags too!! - - // loop over all Core Directory Tags - // ### uses private data, but there is no other way - if(md_model == TagLib::EXIF_MAIN) { - const TIFFDirectory *td = &tif->tif_dir; - - uint32 lastTag = 0; //<- used to prevent reading some tags twice (as stored in tif_fieldinfo) - - for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { - const TIFFField *fld = tif->tif_fields[fi]; - - const uint32 tag_id = TIFFFieldTag(fld); - - if(tag_id == lastTag) { - continue; - } - - // test if tag value is set - // (lifted directly from LibTiff _TIFFWriteDirectory) - - if( fld->field_bit == FIELD_CUSTOM ) { - int is_set = FALSE; - - for(int ci = 0; ci < td->td_customValueCount; ci++ ) { - is_set |= (td->td_customValues[ci].info == fld); - } - - if( !is_set ) { - continue; - } - - } else if(!TIFFFieldSet(tif, fld->field_bit)) { - continue; - } - - // process *all* other tags (some will be ignored) - - tiff_read_exif_tag(tif, tag_id, dib, md_model); - - lastTag = tag_id; - } - - } - - return TRUE; -} - - -/** -Skip tags that are already handled by the LibTIFF writing process -*/ -static BOOL -skip_write_field(TIFF* tif, uint32 tag) { - switch (tag) { - case TIFFTAG_SUBFILETYPE: - case TIFFTAG_OSUBFILETYPE: - case TIFFTAG_IMAGEWIDTH: - case TIFFTAG_IMAGELENGTH: - case TIFFTAG_BITSPERSAMPLE: - case TIFFTAG_COMPRESSION: - case TIFFTAG_PHOTOMETRIC: - case TIFFTAG_THRESHHOLDING: - case TIFFTAG_CELLWIDTH: - case TIFFTAG_CELLLENGTH: - case TIFFTAG_FILLORDER: - case TIFFTAG_STRIPOFFSETS: - case TIFFTAG_ORIENTATION: - case TIFFTAG_SAMPLESPERPIXEL: - case TIFFTAG_ROWSPERSTRIP: - case TIFFTAG_STRIPBYTECOUNTS: - case TIFFTAG_MINSAMPLEVALUE: - case TIFFTAG_MAXSAMPLEVALUE: - case TIFFTAG_XRESOLUTION: - case TIFFTAG_YRESOLUTION: - case TIFFTAG_PLANARCONFIG: - case TIFFTAG_FREEOFFSETS: - case TIFFTAG_FREEBYTECOUNTS: - case TIFFTAG_GRAYRESPONSEUNIT: - case TIFFTAG_GRAYRESPONSECURVE: - case TIFFTAG_GROUP3OPTIONS: - case TIFFTAG_GROUP4OPTIONS: - case TIFFTAG_RESOLUTIONUNIT: - case TIFFTAG_PAGENUMBER: - case TIFFTAG_COLORRESPONSEUNIT: - case TIFFTAG_PREDICTOR: - case TIFFTAG_COLORMAP: - case TIFFTAG_HALFTONEHINTS: - case TIFFTAG_TILEWIDTH: - case TIFFTAG_TILELENGTH: - case TIFFTAG_TILEOFFSETS: - case TIFFTAG_TILEBYTECOUNTS: - case TIFFTAG_EXTRASAMPLES: - case TIFFTAG_SAMPLEFORMAT: - case TIFFTAG_SMINSAMPLEVALUE: - case TIFFTAG_SMAXSAMPLEVALUE: - // skip always, values have been set in SaveOneTIFF() - return TRUE; - break; - - case TIFFTAG_RICHTIFFIPTC: - // skip always, IPTC metadata model is set in tiff_write_iptc_profile() - return TRUE; - break; - - case TIFFTAG_YCBCRCOEFFICIENTS: - case TIFFTAG_REFERENCEBLACKWHITE: - case TIFFTAG_YCBCRSUBSAMPLING: - // skip as they cannot be filled yet - return TRUE; - break; - - case TIFFTAG_PAGENAME: - { - char *value = NULL; - TIFFGetField(tif, TIFFTAG_PAGENAME, &value); - // only skip if no value has been set - if(value == NULL) { - return FALSE; - } else { - return TRUE; - } - } - default: - return FALSE; - break; - } -} - -/** -Write all known exif tags - -@param tif TIFF handle -@param md_model Metadata model from where to load the tags -@param dib Image being written -@return Returns TRUE if successful, returns FALSE otherwise -*/ -BOOL -tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { - char defaultKey[16]; - - // only EXIF_MAIN so far - if(md_model != TagLib::EXIF_MAIN) { - return FALSE; - } - - if(FreeImage_GetMetadataCount(FIMD_EXIF_MAIN, dib) == 0) { - return FALSE; - } - - TagLib& tag_lib = TagLib::instance(); - - for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { - const TIFFField *fld = tif->tif_fields[fi]; - - const uint32 tag_id = TIFFFieldTag(fld); - - if(skip_write_field(tif, tag_id)) { - // skip tags that are already handled by the LibTIFF writing process - continue; - } - - FITAG *tag = NULL; - // get the tag key - const char *key = tag_lib.getTagFieldName(TagLib::EXIF_MAIN, (WORD)tag_id, defaultKey); - - if(FreeImage_GetMetadata(FIMD_EXIF_MAIN, dib, key, &tag)) { - FREE_IMAGE_MDTYPE tag_type = FreeImage_GetTagType(tag); - TIFFDataType tif_tag_type = TIFFFieldDataType(fld); - - // check for identical formats - - // (enum value are the sames between FREE_IMAGE_MDTYPE and TIFFDataType types) - if((int)tif_tag_type != (int)tag_type) { - // skip tag or _TIFFmemcpy will fail - continue; - } - // type of storage may differ (e.g. rationnal array vs float array type) - if((unsigned)_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) { - // skip tag or _TIFFmemcpy will fail - continue; - } - - if(tag_type == FIDT_ASCII) { - TIFFSetField(tif, tag_id, FreeImage_GetTagValue(tag)); - } else { - TIFFSetField(tif, tag_id, FreeImage_GetTagCount(tag), FreeImage_GetTagValue(tag)); - } - } - } - - return TRUE; -} diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/AUTHORS b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/AUTHORS deleted file mode 100644 index 51c1f9c..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/AUTHORS +++ /dev/null @@ -1,21 +0,0 @@ -Developers: ------------ - -Florian Kainz -Rod Bogart -Drew Hess -Bill Anderson -Wojciech Jarosz - -Contributors: -------------- - -Rito Trevino -Josh Pines -Christian Rouet - -Win32 build system: -------------------- - -Nick Porcino -Kimball Thurston diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/COPYING b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/COPYING deleted file mode 100644 index 6372750..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/COPYING +++ /dev/null @@ -1,34 +0,0 @@ -Copyright (c) 2006, Industrial Light & Magic, a division of Lucasfilm -Entertainment Company Ltd. Portions contributed and copyright held by -others as indicated. 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 Industrial Light & Magic nor the names of - any other contributors to this software may be used to endorse or - promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/ChangeLog b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/ChangeLog deleted file mode 100644 index 2e79c0f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/ChangeLog +++ /dev/null @@ -1,136 +0,0 @@ -Version 2.x.x - * Bumped version to track OpenEXR - (Piotr Stanczyk) - -Version 2.0.1 - * Bumped version to track OpenEXR - (Piotr Stanczyk) - -Version 2.0.0 - * Bumped version to track OpenEXR - (Piotr Stanczyk) - * Numerous minor fixes, missing includes etc - -Version 1.1.0.beta.1 - * Added new module PyIlmBase : python bindings for IlmBase - (Nick Rasmussen) - * Added git specific files - (Piotr Stanczyk) - * Minor fixes for newer gcc versions and OS X. - (misc) - * Preparation for OpenEXR v2 release { remove message for final release } - (Piotr Stanczyk) - * Updated the so verison to 10 - (Piotr Stanczyk) - * Initial use of the CMake build system - (Nicholas Yue) - -Version 1.0.3 - * Added support for enabling/disabling large stack optimisations, used in - halfFunction.h. - (Piotr Stanczyk) - * Added ImathNoise.(h/cpp) files. Initializes Perlin noise to match the - Renderman implmenetation. - (Pixar Contribution) - * Fixed a number of missing includes to comply with stricter - enforcement by gnu compilers. - (Piotr Stanczyk) - * Depracated compiler flag: -Wno-long-double since it is no longer - supported under OS X. - (Piotr Stanczyk) - * A minor API change to Imath::Frustum has been made: the functions - 'near' and 'far' have been renamed to 'nearPlane' and 'farPlane' due - to conflicts with certain windows headers. The former alternate - accessor names for these values on windows ('hither' and 'yon') - remain, though should be considered deprecated. - (David Lenihan) - * Added SVD, eigenvalue solver, and procrustes fit calculations - to ImathMatrixAlgo. - (Chris Twigg, Ji Hun Yu) - * Added Imath::FrustumTest for frustum visibility testing. - (Eric Johnston) - * Fixed a stack corruption in the matrix minorOf functions. - (Nick Rasmussen) - * Visual studio 2008 project files have been added to the vc/vc9 - directory, and several minor visual studio compile fixes have - been applied. - (Nick Rasmussen) - * Updated the so verison to 7. - (Piotr Stanczyk) - * Depracated the MacCode_Warrior and Shake submodules. - (Piotr Stanczyk) - -Version 1.0.2 - * Added support for targetting builds on 64bit Windows and minimising - number of compiler warnings on Windows. Thanks to Ger Hobbelt for his - contributions to CreateDLL. - (Ji Hun Yu) - * Removed a spurious restrict qualifier in the matrix manipulation code - that was causing the 64-bit MS compiler to generate code in release - mode that caused incorrect results. - (Ji Hun Yu) - * Added patches for improving universal binaries on OS X. Thanks to - Paul Schneider for the contribution - (Piotr Stanczyk) - * Imath::Box optimization: remove loops from methods by partially - specializing the class, for boxes of two and three dimensions. - (Piotr Stanczyk) - * Added explicit copy constructors to Imath::Matrix33 and - ImathMatrix44 to make conversions between float and double - matrices more convenient. - (Florian Kainz) - * Added slerpShortestArc() and euclideanInnerProduct() functions - to Imath::Quat. - (Nick Porcino) - * Added 4D vector class template Imath::Vec4. - (Nick Porcino) - * Copy constructors and assignment operators for Matrix33 - and Matrix44 are up to 25% faster. Added matrix constructors - that do not initialize the matrix (this is faster in cases where - the initial value of the matrix is immediately overwritten anyway). - (Nick Porcino) - * Rewrote function closestPointOnBox(point,box). Shortened - the code, improved numerical accuracy, fixed a bug where - closestPointOnBox(box.center(),box) would return the center - of the +Z side of the box, even if the +/-X or +/-Y sides - were closer. - (Florian Kainz) - * Rewrote function findEntryAndExitPoints() in ImathBoxAlgo.h. - Results are now consistent with those from intersect(), also - in ImathBoxAlgo.h. - (Florian Kainz) - * Made Vec2::length() and Vec3::length() more accurate for - vectors whose length is less than sqrt(limits::smallest()); - (Florian Kainz) - * Made Quat::angle() more accurate for small angles. - (Don Hatch) - -Version 1.0.1: - * Removed Windows .suo files from distribution. - (Eric Wimmer) - -Version 1.0.0: - * Bumped DSO version number to 6.0 - (Florian Kainz) - * Rounding during float-to-half conversion now implements - "round to nearest even" mode: if the original float value - is exactly in the middle between the two closest half values - then rounding chooses the half value whose least significant - bit is zero. - (Florian Kainz) - * Installation Tuning: - - Corrected version number on dso's (libtool) - now 5.0 - - Separated ILMBASE_LDFLAGS and ILMBASE_LIBS so that test programs - in configure scripts of packages dependent on IlmBase can link - with static libraries properly - - eliminated some warning messages during install - (Andrew Kunz) - -Version 0.9.0: - * Initial release of this code as a separate library. - Previously the libraries contained were part of - version 1.4.0 of OpenEXR - * New build scripts for Linux/Unix - (Andrew Kunz) - * New Windows project files and build scripts - (Kimball Thurston) diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/INSTALL b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/INSTALL deleted file mode 100644 index 85ddb18..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/INSTALL +++ /dev/null @@ -1,2 +0,0 @@ -See the README file for instructions on how to build IlmBase from -source. diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/LICENSE b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/LICENSE deleted file mode 100644 index 6372750..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/LICENSE +++ /dev/null @@ -1,34 +0,0 @@ -Copyright (c) 2006, Industrial Light & Magic, a division of Lucasfilm -Entertainment Company Ltd. Portions contributed and copyright held by -others as indicated. 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 Industrial Light & Magic nor the names of - any other contributors to this software may be used to endorse or - promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/NEWS b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/NEWS deleted file mode 100644 index 0f49920..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/NEWS +++ /dev/null @@ -1,3 +0,0 @@ -Version 0.9.0: - - Initial release - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README deleted file mode 100644 index 1477e67..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README +++ /dev/null @@ -1,70 +0,0 @@ -ABOUT THE ILMBASE LIBRARIES ----------------------------- - -Half is a class that encapsulates our 16-bit floating-point format. - -IlmThread is a thread abstraction library for use with OpenEXR -and other software packages. It currently supports pthreads and -Windows threads. - -Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices, quaternions -and other useful 2D and 3D math functions. - -Iex is an exception-handling library. - -If you have questions about using the IlmBase libraries, you may want -to join our developer mailing list. See http://www.openexr.com for -details. - - -LICENSE -------- - -The IlmBase source code distribution is free software. See the file -named COPYING (included in this distribution) for details. - - -BUILDING ILMBASE ----------------- - -To build IlmBase on GNU/Linux or other UNIX-like systems, do this: - -./configure -make -make install - -unless you obtained IlmBase directly from git, in which case you -should first read README.git - - -Please type : - -./configure --help - -for a list of options in relation to building IlmBase libraries. In -particular, peruse README.namespaces for information regarding the -use of namespaces in IlmBase and OpenEXR. - - -See README.OSX for details on building IlmBase in MacOS X. - -Do `make check` to run the IlmBase confidence tests. They should all -pass; if you find a test that does not pass on your system, please let -us know. - -Other UNIX variants haven't been tested, but should be easy to build. -Let us know if you're having problems porting IlmBase to a particular -platform. - -All include files needed to use the IlmBase libraries are installed in the -OpenEXR subdirectory of the install prefix, e.g. /usr/local/include/OpenEXR. - - -USING ILMBASE IN YOUR APPLICATIONS ----------------------------------- - -On systems with support for pkg-config, use `pkg-config --cflags -IlmBase` for the C++ flags required to compile against IlmBase -headers; and `pkg-config --libs IlmBase` for the linker flags required -to link against IlmBase libraries. - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.CVS b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.CVS deleted file mode 100644 index c69064d..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.CVS +++ /dev/null @@ -1,16 +0,0 @@ -If you're using IlmBase from CVS, you should run the bootstrap script -to create the auto* files. It's a good idea to run this whenever you -update IlmBase from CVS. - -Then run './configure' and make. - -Note that the configure.ac file requires a fairly new version of -automake. If you get this error message: - -running aclocal ... -aclocal: configure.ac: 142: macro `AM_CFLAGS' not found in library -aclocal: configure.ac: 143: macro `AM_CXXFLAGS' not found in library -failed! - -you should upgrade your automake to version 1.6 or better. - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.OSX b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.OSX deleted file mode 100644 index e559166..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.OSX +++ /dev/null @@ -1,101 +0,0 @@ -IlmBase on MacOS X ------------------- - -Building IlmBase on MacOS X is just like building it on GNU/Linux. -Follow the instructions in the README file under BUILDLING ILMBASE, -but see below re: shared libraries. - - -Missing gnu automake tools on Mac OS X 10.8+ ------------------- -Later versions of OS X ,10.8+, do not, by default have all the necessary -tools for building. In particular, Autoconf and Automake may be missing. - -The following commands will download and install the necessary components: - -cd ~/myDevLoc -curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.64.tar.gz -tar xzf autoconf-2.64.tar.gz -cd autoconf-2.64 -./configure --prefix=~/myDevLoc/autotools-bin -make; make install - -cd ~/myDevLoc -curl -OL http://ftpmirror.gnu.org/automake/automake-1.12.tar.gz -tar xzf automake-1.12.tar.gz -cd automake-1.12 -./configure --prefix=~/myDevLoc/autotools-bin -make; make install - -cd ~/myDevLoc -curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.tar.gz -tar xzf libtool-2.4.tar.gz -cd libtool-2.4 -./configure --prefix=~/myDevLoc/autotools-bin -make; make install - - -You may want to export the installation path for your convenience. -Finally, make sure that you have installed the command line tools for XCode. - - -Universal Builds on Mac OS X ------------------- -OS X supports multiple architectures. By default, IlmBase will be built -for the system doing the building. For example, if you build IlmBase on -an Intel system, the libraries will be built for Intel. - -You can specify building for a different architecture, or multiple architectures, -by passing the "--enable-osx-arch" flag to configure. Building for multiple -architectures requires that "--disable-dependency-tracking" be passed as well. - -For example, to build for Intel and PowerPC: - -./configure --enable-osx-arch="i386 ppc" --disable-dependency-tracking. - -To build "4-way universal" for 32-bit and 64-bit Intel and PowerPC: - -./configure --enable-osx-arch="i386 ppc x86_64 ppc64" --disable-dependency-tracking. - -For more information on universal builds, see: - -http://developer.apple.com/documentation/Porting/Conceptual/PortingUNIX/compiling/chapter_4_section_3.html - -Earlier releases of IlmBase included an "--enable-osx-universal-binaries" -switch, which specifies a two-way universal build: Intel and PowerPC, 32-bit only. -This is still available, but deprecated in favor of the more flexible -"--enable-osx-arch" and "--enable-osx-sdk" switches. - - -Choosing an SDK on Mac OS X ------------------- -OS X allows you to specify one of several SDKs, or sysroots. This allows you to -target systems other than the system that your build machine runs. - -For example, if you are building on Mac OS X 10.4, but you need access to features -that were introduced in Mac OS X 10.5, you can build against the Mac OS X 10.5 -versions of system libraries and headers. - -You can choose to build IlmBase with a specific SDK using the "--enable-osx-sdk" -switch. For example: - -./configure --enable-osx-sdk=MacOSX10.5.sdk - -If you are building on Mac OS X 10.4 and want to build universal, you will need to -specify the universal version of the 10.4 SDK: MacOSX10.4u.sdk. Otherwise, you probably -don't need to specify an SDK. - -For more information on sysroots, see: - -http://developer.apple.com/documentation/DeveloperTools/gcc-4.2.1/gcc/Directory-Options.html - - -Shared libraries ----------------- - -IlmBase requires the "flat namespace" option when built as a shared -library. You may have problems trying to use IlmBase shared libraries -with applications that expect OS X's two-level namespace. We have not -tested the shared libs extensively, though they appear to work with -exrdisplay and exrheader, but use them at your own risk. We will -support two-level namespace shared libs in a future release. diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.git b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.git deleted file mode 100644 index d963e72..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.git +++ /dev/null @@ -1,16 +0,0 @@ -If you're using IlmBase from github, you should run the bootstrap script -to create the auto* files. It's a good idea to run this whenever you -update IlmBase from github. - -Then run './configure' and make. - -Note that the configure.ac file requires a fairly new version of -automake. If you get this error message: - -running aclocal ... -aclocal: configure.ac: 142: macro `AM_CFLAGS' not found in library -aclocal: configure.ac: 143: macro `AM_CXXFLAGS' not found in library -failed! - -you should upgrade your automake to version 1.6 or better. - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.namespacing b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.namespacing deleted file mode 100644 index ffae65f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.namespacing +++ /dev/null @@ -1,83 +0,0 @@ ------------------------------------------------- - On the use of namespace in IlmBase and OpenEXR ------------------------------------------------- - -v2.0 of the code base introduces user configurable namespaces for -component libraries. This addition introduces the ability to deal with -multiple versions of these libraries loaded at runtime. -An example case: - Application is built with OpenEXR v1.7, but the required plugin - requires functionality from OpenEXR v2.0. - - By injecting the version number into the (mangled) symbols, via - the namespacing mechanism, and changing the soname, via the build - system, the developer can link his plugin against the v2.0 library - At run time the dynamic linker can load both the 1.7 and 2.0 - versions of the library since the library soname are different and - the symbols are different. - - -When building IlmBase or OpenEXR the following configure script options -are available: - --enable-namespaceversioning -and - --enable-customusernamespace - - - --- Internal Library Namespace -The option, --enable-namespaceversioning, controls the namespace that -is used in the library. Without an argument (see below) the library -will be built with a suffix made up of the major and minor versions. -For example, for version 2.0.0, the internal library namespaces will be -Imath_2_0, Iex_2_0, IlmThread_2_0 etc - -For additional flexibility and control, this option can take an additional -argument in which case the internal library namespace will be suffixed -accordingly. -For example: - ./configure --enable-namespaceversioning=ILM -will result in the namespaces of the type Imath_ILM, Iex_ILM etc. - -This can be useful for completely isolating your local build. - -Code using the library should continue to use the namespace Imath, or for -greater portability IMATH_NAMESPACE, to refer to objects in libImath. -In particular, the explicit use of the internal namespace is discouraged. -This ensures that code will continue to compile with customised or future -versions of the library, which may have a different internal namespace. - -Similarily, for other namespaces in the libraries: Iex, IlmThread and IlmImf. - -Note that this scheme allows existing code to compile without modifications, -since the 'old' namespaces Imath, Iex, IlmThread and IlmImf continue to be -available, albeit in a slightly different form. -This is achieved via the following, in the Imath case: - namespace IMATH_INTERNAL_NAMESPACE {} - namespace IMATH_NAMESPACE - { - using namespace IMATH_INTERNAL_NAMESPACE; - } -This is included in all header files in the Imath library and similar ones -are present for the libraries Iex, IlmThread and IlmImf. - -The only exception to this is where user code has forward declarations of -objects in the Imf namespace, as these will forward declare symbols in an -incorrect namespace -These forward declarations should be removed, and replaced with - #include , -which forward-declares all types correctly. - - - --- Public/User Library Namespace -The option, --enable-customusernamespace, can override the namespace into -which we will 'export' the internal namespace. This takes an argument -that sets the name of the custom user namespace. -In the example above, IMATH_NAMESPACE could be resolved into something other -than Imath, say Imath_MySpecialNamespace. - -In nearly all cases, this will not be used as per the above discussion -regarding code compatibility. -Its presence is to provide a mechanism for not prohibiting the case when -the application must pass objects from two different versions of the library. diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.win32 b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.win32 deleted file mode 100644 index eec6627..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/ilmbase/README.win32 +++ /dev/null @@ -1,196 +0,0 @@ -IlmBase is one of five software packages that were designed to work -together: IlmBase, OpenEXR, OpenEXR_Viewers, CTL and OpenEXR_CTL. -You may want to build Imath by itself, or together with one or more -of the other packages. - -What follows are instructions for building all five packages. -If you want to build only IlmBase, stop after step 1. - -A couple of notes before getting started: - -- This is not the only way to do this. This document describes a path -that doesn't involve installing libraries into default system paths, -but rather, creates a standalone universe. -- Some of these steps may be a bit redundant, and will be optimized in -the future. -- The Debug versions of the libraries and tools are not required if -you are not going to be doing any debugging, and can be optionally -built. - -The source will build under both Visual Studio versions 7 and 8, and -there are separate directories for the corresponding build files. The -tag is used in this document to describe the appropriate folder -in the path that corresponds to your the version of Visual Studio. - -The Visual Studio project files assume, and help build out, a directory -called "Deploy". In the end, this directory will contain the objects -that might then be moved away from the source for general running of the -compiled programs. The directory structure at the end of compiling all -the related tools looks like this: - -Deploy - include - lib - Debug - Release - bin - Debug - Release -openexr-cvs (name as desired) - IlmBase - OpenEXR - OpenEXR_Viewers -ctl-cvs (name as desired) - CTL - OpenEXR_CTL -fltk - FL - GL - lib -nvidia - include - GL - glh - lib - -If OpenEXR_Viewers is not being compiled, then fltk and nvidia will -not be needed, but that will be covered later. - -Step 1. Compile IlmBase - - a. Point Visual Studio at the .sln file in vc\\IlmBase in the - IlmBase subdirectory - - b. Select the Release configuration and hit Build Solution. This - will create the Deploy directory, and copy the relevant parts to it. - - c. If the debug versions are desired, select the Debug configuration - and hit Build Solution. This will add the Debug directories to Deploy. - -Step 2. Compile OpenEXR support - - a. Retrieve the zlib binaries. The project files are set up to link - against the dll version of zlib, but can easily be changed to link - against a static version, or a self-built version if desired. - - 1. Go to http://www.zlib.net and download the precompiled DLL - version of zlib (as of writing, zlib123-dll.zip) - - 2. If you don't wish to put the files into your MS visual studio - directories and install the dll into windows\system32: - - a. Put a copy of zlib1.dll into Deploy\bin\Release and - Deploy\bin\Debug - - b. Copy the header files into Deploy\include - - c. Copy zdll.lib and zdll.exp into Deploy\lib\Release and - Deploy\lib\Debug - - b. Open the Visual Studio project in OpenEXR\vc\\OpenEXR. - - c. Select the Release configuration and build. The IlmImfTest - program runs a confidence test of your build to make sure - it is able to work, and may take some time to complete. - - d. Optionally select the Debug configuration and build. - -Step 3. Compile CTL support - - a. Open the Visual Studio project in CTL\vc\\CTL. - - b. Select the Release configuration and build. The IlmCtlTest - program runs a confidence test of your build to make sure it is - able to work, and may take some time to complete. - - c. Optionally select the Debug configuration and build. - -Step 4. Compile OpenEXR_CTL support - - a. Open the Visual Studio project in OpenEXR_CTL\vc\\OpenEXR_CTL. - - b. Select the Release configuration and build. - - c. Optionally select the Debug configuration and build. - -Step 5. Compile OpenEXR_Viewers - - a. Open the appropriate Visual Studio project in - OpenEXR_Viewers\vc\\OpenEXR_Viewers depending on whether or not - you want CTL support. - - b. exrdisplay requires fltk to work. - - 1. Go to http://www.fltk.org and download fltk 1.1.7 - - 2. Open its project files and compile using the instructions they - provide. - - 3. Create the fltk directory at the top level of your directory - structure as presented above and copy the FL, GL, and lib folders - into the fltk directory - - 4. exrdisplay links fltk statically, so no dll is needed. - - c. playexr requires the nvidia cg library as well as glut and glew. - - 1. Setup the cg toolkit - - a. Go to http://developer.nvidia.com, the developer section and - download the cg toolkit, version 1.5, and install it. The path - where you choose to install Cg is referred to by the - tag in the steps below. - - b. During the installation, if the integrate with visual studio - option is selected, the header files will be automatically found. - Otherwise, copy the directory \Cg\include\Cg - to Deploy\include\Cg - - b. Copy the cg.dll and cgGL.dll from the \Cg\bin - into Deploy\bin\Release and Deploy\bin\Debug, or otherwise make - them available (put them in system32, add to path, etc.) - - c. Copy the cg.lib and cgGL.lib from \Cg\lib - into Deploy\lib\Release and Deploy\lib\Debug - - 2. Make glut available. This can be done via several mechanisms. - See step 4 below. - - 3. Make glew available. This can be done via several mechanisms. - http://glew.sourceforge.net is the master site for this - library. See step 4 below. - - 4. nVidia makes both glut and glew available in their SDK package, - which is a fairly large download, but provides a wealth of other - information on programming for the GPU, and is generally a useful - package, so that is the path chosen for this set up. - - a. Go to http://developer.nvidia.com and download version 10 of the - SDK and install it. It will prompt you to install the Cg toolkit, - but this is not necessary as it was handled in step 1. The path - where you choose to install the SDK is referred to by the - tag in the steps below. - - b. Make an nvidia folder at the top level, with an include and - lib folder inside it. Inside the lib folder, make Debug and - Release folders. - - c. Copy the \external\include\GL directory into - nvidia\include the GL and glh folders into nvidia\include. - - d. Copy the glew headers in \common\GLEW\include\GL - into nvidia\include\GL. - - e. Copy \common\GLEW\lib\glew32.lib and - \external\lib\glut32.lib into Deploy\bin\Release. - - f. Copy bin\glut32.dll and bin\glew32.dll into Deploy\bin\Release. - - d. Build the Release configuration of the OpenEXR_Viewers. - - e. Build the Debug configuration if desired. - -At this point, the Deploy folder should be fully built out and ready -to be used. Both exrdisplay and playexr are meant to be launched from -the command line, as they originated as unix commands, so open a command -prompt, cd to the Deploy\bin\Release folder and enjoy. diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/AUTHORS b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/AUTHORS deleted file mode 100644 index e16202d..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/AUTHORS +++ /dev/null @@ -1,47 +0,0 @@ -Developers: ------------ - -Florian Kainz -Rod Bogart -Drew Hess -Paul Schneider -Bill Anderson -Wojciech Jarosz -Andrew Kunz -Piotr Stanczyk -Peter Hillman - -Contributors: -------------- - -Simon Green -Rito Trevino -Josh Pines -Christian Rouet -Rodrigo Damazio -Greg Ward -Joseph Goldstone -Loren Carpenter, Pixar Animation Studios -Nicholas Yue -Yunfeng Bai (ILM) -Pascal Jette (Autodesk) -Karl Rasche, DreamWorks Animation - -Win32 build system: -------------------- - -Nick Porcino -Kimball Thurston - -Win32 port contributors: ------------------------- - -Dustin Graves -Jukka Liimatta -Baumann Konstantin -Daniel Koch -E. Scott Larsen -stephan mantler -Andreas Kahler -Frank Jargstorff -Lutz Latta diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/COPYING b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/COPYING deleted file mode 100644 index 6372750..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/COPYING +++ /dev/null @@ -1,34 +0,0 @@ -Copyright (c) 2006, Industrial Light & Magic, a division of Lucasfilm -Entertainment Company Ltd. Portions contributed and copyright held by -others as indicated. 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 Industrial Light & Magic nor the names of - any other contributors to this software may be used to endorse or - promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/ChangeLog b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/ChangeLog deleted file mode 100644 index 32a2cae..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/ChangeLog +++ /dev/null @@ -1,704 +0,0 @@ -Version 2.0.1 - * Temporarily turning off optimisation code path - (Piotr Stanczyk) - * Added additional tests for future optimisation refactoring - (Piotr Stanczyk / Peter Hillman) - * Fixes for StringVectors - (Peter Hillman) - * Additional checks for type mismatches - (Peter Hillman) - * Fix for Composite Deep Scanline - (Brendan Bolles) - -Version 2.0.0 - * Updated Documentation - (Peter Hillman) - * Updated Namespacing mechanism - (Piotr Stanczyk) - * Fixes for succd & predd - (Peter Hillman) - * Fixes for FPE control registers - (Piotr Stanczyk) - * Additional checks and tests on DeepImages, scanlines and tiles - (Peter Hillman) - * Folded in Autodesk read optimisations for RGB(A) files - (Pascal Jette, Peter Hillman) - * Updated the bootstrap scripts to use libtoolize if glibtoolize isn't available on darwin. - (Nick Rasmussen) - * Numerous minor fixes, missing includes etc - -Version 2.0.0.beta.1: -* Please read the separate file for v2 additions and changes. - * Added git specific files - (Piotr Stanczyk) - * Updated the so verison to 20 - (Piotr Stanczyk) - * Initial use of the CMake build system - (Nicholas Yue) - -Version 1.7.1: - * Updated the .so verison to 7. - (Piotr Stanczyk) - -Version 1.7.0: - * Added support for targetting builds on 64bit Windows and minimising - number of compiler warnings on Windows. Thanks to Ger Hobbelt for his - contributions to CreateDLL. - (Ji Hun Yu) - * Added new atttribute types: - M33dAttribute 3x3 double-precision matrix - M44dAttribute 4x4 double-precision matrix - V2d 2D double-precision vector - V3d 3D double-precision vector - (Florian Kainz) - * Bug fix: crash when reading a damaged image file (found - by Apple). An exception thrown inside the PIZ Huffman - decoder bypasses initialization of an array of pointers. - The uninitialized pointers are later passed to operator - delete. - (Florian Kainz) - * Bug fix: crash when reading a damaged image file (found by - Apple). Computing the size of input certain buffers may - overflow and wrap around to a small number, later causing - writes beyond the end of the buffer. - (Florian Kainz) - * In the "Technical Introduction" document, added - Premultiplied vs. Un-Premulitiplied Color section: - states explicitly that pixels with zero alpha and non-zero - RGB are allowed, points out that preserving such a pixel can - be a problem in application programs with un-premultiplied - internal image representations. - (Florian Kainz) - * exrenvmap improvements: - - New command line flags set the type of the input image to - latitude-longitude map or cube-face map, overriding the - envmap attribute in the input file header. - - Cube-face maps can now be assembled from or split into six - square sub-images. - - Converting a cube-face map into a new cube-face map with - the same face size copies the image instead of resampling - it. This avoids blurring when a cube-face map is assembled - from or split into sub-images. - (Florian Kainz) - * Updated standard chromaticities in ImfAcesFile.cpp to match - final ACES (Academy Color Encoding Specification) document. - (Florian Kainz) - * Added worldToCamera and worldToNDC matrices to - ImfStandardAttributes.h (Florian Kainz) - * Increased the maximum length of attribute and channel names - from 31 to 255 characters. For files that do contain names - longer than 31 characters, a new LONG_NAMES_FLAG in the fil - version number is set. This flag causes older versions of - the IlmImf library (1.6.1 and earlier) to reject files with - long names. Without the flag, older library versions would - mis-interpret files with long names as broken. - (Florian Kainz) - * Reading luminance/chroma-encoded files via the RGBA - interface is faster: buffer padding avoids cache thrashing - for certain image sizes, redundant calls to saturation() - have been eliminated. - (Mike Wall) - * Added "hemispherical blur" option to exrenvmap. - (Florian Kainz) - * Added experimental version of I/O classes for ACES file - format (restricted OpenEXR format with special primaries - and white point); added exr2aces file converter. - (Florian Kainz) - * Added new constructors to classes Imf::RgbaInputFile and - Imf::TiledRgbaInputFile. The new constructors have a - layerName parameter, which allows the caller to specify - which layer of a multi-layer or multi-view image will - be read. - (Florian Kainz) - * A number of member functions in classes Imf::Header, - Imf::ChannelList and Imf::FrameBuffer have parameters - of type "const char *". Added equivalent functions that - take "const std::string &" parameters. - (Florian Kainz) - * Added library support for Weta Digital multi-view images: - StringVector attribute type, multiView standard attribute - of type StringVector, utility functions related to grouping - channels into separate views. - (Peter Hillman, Florian Kainz) - -Version 1.6.1: - * Removed Windows .suo files from distribution. - (Eric Wimmer) - * Bug fix: crashes, memory leaks and file descriptor leaks - when reading damaged image files (some reported by Apple, - others found by running IlmImfFuzzTest). - (Florian Kainz) - * Added new IlmImfFuzzTest program to test how resilient the - IlmImf library is with respect broken input files: the program - first damages OpenEXR files by partially overwriting them with - random data; then it tries to read the damaged files. If all - goes well, the program doesn't crash. - (Florian Kainz) - -Version 1.6.0: - * Bumped DSO version number to 6.0 - (Florian Kainz) - * Added new standard attributes related to color rendering with - CTL (Color Transformation Language): renderingTransform, - lookModTransform and adoptedNeutral. - (Florian Kainz) - * Bug fix: for pixels with luminance near HALF_MIN, conversion - from RGB to luminance/chroma produces NaNs and infinities - (Florian Kainz) - * Bug fix: excessive desaturation of small details with certain - colors after repeatedly loading and saving luminance/chroma - encoded images with B44 compression. - (Florian Kainz) - * Added B44A compression, a minor variation of B44: in most cases, - the compression ratio is 2.28:1, the same as with B44, but in - uniform image areas where all pixels have the same value, the - compression ratio increases to 10.66:1. Uniform areas occur, for - example, in an image's alpha channel, which typically contains - large patches that are solid black or white, or in computer- - generated images with a black background. - (Florian Kainz) - * Added flag to configure.ac to enable or disable use of large - auto arrays in the IlmImf library. Default is "enable" for - Linux, "disable" for everything else. - (Darby Johnston, Florian Kainz) - * corrected version number on dso's (libtool) - now 5.0 - * Separated ILMBASE_LDFLAGS and ILMBASE_LIBS so that test programs - can link with static libraries properly - * eliminated some warning messages during install - (Andrew Kunz) - -Version 1.5.0: - * reorganized packaging of OpenEXR libraries to facilitate - integration with CTL. Now this library depends on the library - IlmBase. Some functionality has been moved into OpenEXR_Viewers, - which depends on two other libraries, CTL and OpenEXR_CTL. - Note: previously there were separate releases of - OpenEXR-related plugins for Renderman, Shake and Photoshop. - OpenEXR is supported natively by Rendermand and Photoshop, so - these plugins will not be supported for this or future - versions of OpenEXR. - (Andrew Kunz) - * New build scripts for Linux/Unix - (Andrew Kunz) - * New Windows project files and build scripts - (Kimball Thurston) - * float-to-half conversion now preserves the sign of float zeroes - and of floats that are so small that they become half zeroes. - (Florian Kainz) - * Bug fix: Imath::Frustum::planes() returns incorrect planes - if the frustum is orthogonal. - (Philip Hubbard) - * added new framesPerSecond optional standard attribute - (Florian Kainz) - * Imath cleanup: - - Rewrote function Imath::Quat::setRotation() to make it - numerically more accurate, added confidence tests - - Rewrote function Imath::Quat::slerp() using Don Hatch's - method, which is numerically more accurate, added confidence - tests. - - Rewrote functions Imath::closestPoints(), Imath::intersect(), - added confidence tests. - - Removed broken function Imath::nearestPointOnTriangle(). - - Rewrote Imath::drand48(), Imath::lrand48(), etc. to make - them functionally identical with the Unix/Linux versions - of drand48(), lrand48() and friends. - - Replaced redundant definitions of Int64 in Imath and IlmImf - with a single definition in ImathInt64.h. - (Florian Kainz) - * exrdisplay: if the file's and the display's RGB chromaticities - differ, the pixels RGB values are transformed from the file's - to the display's RGB space. - (Florian Kainz) - * Added new lossy B44 compression method. HALF channels are - compressed with a fixed ratio of 2.28:1. UINT and FLOAT - channels are stored verbatim, without compression. - (Florian Kainz) - -Version 1.4.0a: - * Fixed the ReleaseDLL targets for Visual Studio 2003. - (Barnaby Robson) - -Version 1.4.0: - * Production release. - * Bug Fix: calling setFrameBuffer() for every scan line - while reading a tiled file through the scan line API - returns bad pixel data. (Paul Schneider, Florian Kainz) - -Version 1.3.1: - * Fixed the ReleaseDLL targets for Visual Studio 2005. - (Nick Porcino, Drew Hess) - * Fixes/enhancements for createDLL. - (Nick Porcino) - -Version 1.3.0: - * Removed openexr.spec file, it's out of date and broken to - boot. - (Drew Hess) - * Support for Visual Studio 2005. - (Drew Hess, Nick Porcino) - * When compiling against OpenEXR headers on Windows, you - no longer need to define any HAVE_* or PLATFORM_* - macros in your projects. If you are using any OpenEXR - DLLs, however, you must define OPENEXR_DLL in your - project's preprocessor directives. - (Drew Hess) - * Many fixes to the Windows VC7 build system. - (Drew Hess, Nick Porcino) - * Support for building universal binaries on OS X 10.4. - (Drew Hess, Paul Schneider) - * Minor configure.ac fix to accomodate OS X's automake. - (Drew Hess) - * Removed CPU-specific optimizations from configure.ac, - autoconf's guess at the CPU type isn't very useful, - anyway. Closes #13429. - (Drew Hess) - * Fixed quoting for tests in configure.ac. Closes #13428. - (Drew Hess) - * Use host specification instead of target in configure.ac. - Closes #13427. - (Drew Hess) - * Fix use of AC_ARG_ENABLE in configure.ac. Closes - #13426. - (Drew Hess) - * Removed workaround for OS X istream::read bug. - (Drew Hess) - * Added pthread support to OpenEXR pkg-config file. - (Drew Hess) - * Added -no-undefined to LDFLAGS and required libs to LIBADD - for library projects with other library dependencies, per - Rex Dieter's patch. - (Drew Hess) - * HAVE_* macros are now defined in the OpenEXRConfig.h header - file instead of via compiler flags. There are a handful of - public headers which rely on the value of these macros, - and projects including these headers have previously needed - to define the same macros and values as used by OpenEXR's - 'configure', which is bad form. Now 'configure' writes these - values to the OpenEXRConfig.h header file, which is included - by any OpenEXR source files that need these macros. This - method of specifying HAVE_* macros guarantees that projects - will get the proper settings without needing to add compile- - time flags to accomodate OpenEXR. Note that this isn't - implemented properly for Windows yet. - (Drew Hess) - * Platform cleanups: - - No more support for IRIX or OSF1. - - No more explicit support for SunOS, because we have no way to - verify that it's working. I suspect that newish versions of - SunOS will just work out of the box, but let me know if not. - - No more PLATFORM_* macros (vestiges of the ILM internal build - system). PLATFORM_DARWIN_PPC is replaced by HAVE_DARWIN. - PLATFORM_REDHAT_IA32 (which was only used in IlmImfTest) is - replaced by HAVE_LINUX_PROCFS. - - OS X 10.4, which is the minimum version we're going to support - with this version, appears to have support for nrand48 and friends, - so no need to use the Imath-supplied version of them anymore. - (Drew Hess) - * No more PLATFORM_WINDOWS or PLATFORM_WIN32, replace with - proper standard Windows macros. (Drew Hess) - * Remove support for gcc 2.95, no longer supported. (Drew Hess) - * Eliminate HAVE_IOS_BASE macro, OpenEXR now requires support for - ios_base. (Drew Hess) - * Eliminate HAVE_STL_LIMITS macro, OpenEXR now requires the ISO C++ - header. (Drew Hess) - * Use double quote-style include dirctives for OpenEXR - includes. (Drew Hess) - * Added a document that gives an overview of the on-disk - layout of OpenEXR files (Florian Kainz) - * Added sections on layers and on memory-mapped file input - to the documentation. (Florian Kainz) - * Bug fix: reading an incomplete file causes a deadlock while - waiting on a semaphore. (Florian Kainz) - * Updated documentation (ReadingAndWritingImageFiles.sxw) and - sample code (IlmImfExamples): - Added a section about multi-threading, updated section on - thread-safety, changed documentation and sample code to use - readTiles()/writeTiles() instead of readTile()/writeTile() - where possible, mentioned that environment maps contain - redundant pixels, updated section on testing if a file is - an OpenEXR file. - (Florian Kainz) - * Multi-threading bug fixes (exceptions could be thrown - multiple times, some operations were not thread safe), - updated some comments, added comments, more multithreaded - testing. - (Florian Kainz) - * Added multi-threading support: multiple threads - cooperate to read or write a single OpenEXR file. - (Wojciech Jarosz) - * Added operator== and operator!= to Imath::Frustum. - (Andre Mazzone) - * Bug fix: Reading a PIZ-compressed file with an invalid - Huffman code table caused crashes by indexing off the - end of an array. - (Florian Kainz) - -Version 1.2.2: - * Updated README to remove option for building with Visual C++ 6.0. - (Drew Hess) - * Some older versions of gcc don't support a full iomanip - implemenation; check for this during configuration. - (Drew Hess) - * Install PDF versions of documentation, remove old/out-of-date - HTML documentation. (Florian Kainz) - * Removed vc/vc6 directory; Visual C++ 6.0 is no longer - supported. (Drew Hess) - * Updated README.win32 with details of new build system. - (Florian Kainz, Drew Hess) - * New build system for Windows / Visual C++ 7 builds both - static libraries and DLLs. - (Nick Porcino) - * Removed Imath::TMatrix and related classes, which are not - used anywhere in OpenEXR. - (Florian Kainz) - * Added minimal support for "image layers" to class Imf::ChannelList - (Florian Kainz) - * Added new isComplete() method to InputFile, TiledInputFile - etc., that checks if a file is complete or if any pixels - are missing (for example, because writing the file was - aborted prematurely). - (Florian Kainz) - * Exposed staticInitialize() function in ImfHeader.h in order - to allow thread-safe library initialization in multithreaded - programs. - (Florian Kainz) - * Added a new "time code" attribute - (Florian Kainz) - * exrmaketiled: when a MIPMAP_LEVELS or RIPMAP_LEVELS image - is produced, low-pass filtering takes samples outside the - image's data window. This requires extrapolating the image. - The user can now specify how the image is extrapolated - horizontally and vertically (image is surrounded by black / - outermost row of pixels repeats / entire image repeats / - entire image repeats, every other copy is a mirror image). - exrdisplay: added option to swap the top and botton half, - and the left and right half of an image, so that the image's - four corners end up in the center. This is useful for checking - the seams of wrap-around texture map images. - IlmImf library: Added new "wrapmodes" standard attribute - to indicate the extrapolation mode for MIPMAP_LEVELS and - RIPMAP_LEVELS images. - (Florian Kainz) - * Added a new "key code" attribute to identify motion picture - film frames. - (Florian Kainz) - * Removed #include from ImfAttribute.h, ImfHeader.h - and ImfXdr.h so that including header files such as - ImfInputFile.h no longer defines ASSERT and THROW macros, - which may conflict with similar macros defined by - application programs. - (Florian Kainz) - * Converted HTML documentation to OpenOffice format to - make maintaining the documents easier: - api.html -> ReadingAndWritingImageFiles.sxw - details.html -> TechnicalIntroduction.sxw - (Florian Kainz) - -Version 1.2.1: - * exrenvmap and exrmaketiled use slightly less memory - (Florian Kainz) - * Added functions to IlmImf for quickly testing if a file - is an OpenEXR file, and whether the file is scan-line - based or tiled. (Florian Kainz) - * Added preview image examples to IlmImfExamples. Added - description of preview images and environment maps to - docs/api.html (Florian Kainz) - * Bug fix: PXR24 compression did not work properly for channels - with ySampling != 1. - (Florian Kainz) - * Made template become template for - the transform(ObjectS, ObjectT) methods. This was done to allow - for differing templated objects to be passed in e.g. say a - Box> and a Matrix44, where S=float and T=double. - (Jeff Yost, Arkell Rasiah) - * New method Matrix44::setTheMatrix(). Used for assigning a - M44f to a M44d. (Jeff Yost, Arkell Rasiah) - * Added convenience Color typedefs for half versions of Color3 - and Color4. Note the Makefile.am for both Imath and ImathTest - have been updated with -I and/or -L pathing to Half. - (Max Chen, Arkell Rasiah) - * Methods equalWithAbsError() and equalWithRelError() are now - declared as const. (Colette Mullenhoff, Arkell Rasiah) - * Fixes for gcc34. Mainly typename/template/using/this syntax - correctness changes. (Nick Ramussen, Arkell Rasiah) - * Added Custom low-level file I/O examples to IlmImfExamples - and to the docs/api.html document. (Florian Kainz) - * Eliminated most warnings messages when OpenEXR is compiled - with Visual C++. The OpenEXR code uses lots of (intentional - and unintended) implicit type conversions. By default, Visual - C++ warns about almost all of them. Most implicit conversions - have been removed from the .h files, so that including them - should not generate warnings even at warning level 3. Most - .cpp files are now compiled with warning level 1. - (Florian Kainz) - -Version 1.2.0: - * Production-ready release. - * Disable long double warnings on OS X. (Drew Hess) - * Add new source files to VC7 IlmImfDll target. (Drew Hess) - * Iex: change the way that APPEND_EXC and REPLACE_EXC modify - their what() string to work around an issue with Visual C++ - 7.1. (Florian Kainz, Nick Porcino) - * Bumped OpenEXR version to 1.2 and .so versions to 2.0.0 in - preparation for the release. (Drew Hess) - * Imath: fixed ImathTMatrix.h to work with gcc 3.4. (Drew Hess) - * Another quoting fix in openexr.m4. (Drew Hess) - * Quoting fix in acinclude.m4 for automake 1.8. (Brad Hards) - * Imath: put inline at beginning of declaration in ImathMatrix.h - to fix a warning. (Ken McGaugh) - * Imath: made Vec equalWith*Error () methods const. - * Cleaned up compile-time Win32 support. (Florian Kainz) - * Bug fix: Reading a particular broken PIZ-compressed file - caused crashes by indexing off the end of an array. - (Florian Kainz) - -Version 1.1.1: - * Half: operator= and variants now return by reference rather - than by value. This brings half into conformance with - built-in types. (Drew Hess) - * Half: remove copy constructor, let compiler supply its - own. This improves performance up to 25% on some - expressions using half. (Drew Hess) - * configure: don't try to be fancy with CXXFLAGS, just use - what the user supplies or let configure choose a sensible - default if CXXFLAGS is not defined. - * IlmImf: fixed a bug in reading scanline files on big-endian - architectures. (Drew Hess) - * exrmaketiled: Added an option to select compression type. - (Florian Kainz) - * exrenvmap: Added an option to select compression type. - (Florian Kainz) - * exrdisplay: Added some new command-line options. (Florian Kainz) - * IlmImf: Added Pixar's new "slightly lossy" image compression - method. The new method, named PXR24, preserves HALF and - UINT data without loss, but FLOAT pixels are converted to - a 24-bit representation. PXR24 appears to compress - FLOAT depth buffers very well without losing much accuracy. - (Loren Carpenter, Florian Kainz) - * Changed top-level LICENSE file to allow for other copyright - holders for individual files. - * IlmImf: TILED FILE FORMAT CHANGE. TiledOutputFile was - incorrectly interleaving channels and scanlines before - passing pixel data to a compressor. The lossless compressors - still work, but lossy compressors do not. Fix the bug by - interleaving channels and scanlines in tiled files in the - same way as ScanLineOutputFile does. Programs compiled with - the new version of IlmImf cannot read tiled images produced - with version 1.1.0. (Florian Kainz) - * IlmImf: ImfXdr.h fix for 64-bit architectures. (Florian Kainz) - * IlmImf: OpenEXR now supports YCA (luminance/chroma/alpha) - images with subsampled chroma channels. When an image - is written with the RGBA convenience interface, selecting - WRITE_YCA instead of WRITE_RGBA causes the library to - convert the pixels to YCA format. If WRITE_Y is selected, - only luminance is stored in the file (for black and white - images). When an image file is read with the RGBA convenience - interface, YCA data are automatically converted back to RGBA. - (Florian Kainz) - * IlmImf: speed up reading tiled files as scan lines. - (Florian Kainz) - * Half: Fixed subtle bug in Half where signaling float NaNs - were being converted to inf in half. (Florian Kainz) - * gcc 3.3 compiler warning cleanups. (various) - * Imath: ImathEuler.h fixes for gcc 3.4. (Garrick Meeker) - -Version 1.1.0: - * Added new targets to Visual C++ .NET 2003 project - for exrmaketiled, exrenvmap, exrmakepreview, and exrstdattr. - (Drew Hess) - * A few assorted Win32 fixes for Imath. (Drew Hess) - * GNU autoconf builds now produce versioned libraries. - This release is 1:0:0. (Drew Hess) - * Fixes for Visual C++ .NET 2003. (Paul Schneider) - * Updated Visual C++ zlib project file to zlib 1.2.1. - (Drew Hess) - * exrdisplay: Fixed fragment shader version. (Drew Hess) - * *Test: Fixed some compiler issues. (Drew Hess) - * Imath: Handle "restrict" keyword properly. (Drew Hess) - * IlmImfExamples: Updated to latest versions of example - source code, includes tiling and multi-res images. - (Florian Kainz) - * exrmakepreview: A new utility to create preview images. - (Florian Kainz) - * exrenvmap: A new utility to create OpenEXR environment - maps. (Florian Kainz) - * exrstdattr: A new utility to modify standard - attributes. (Florian Kainz) - * Updated exrheader to print level rounding mode and - preview image size. (Florian Kainz) - * Updated exrmaketiled to use level rounding mode. - (Florian Kainz) - * IlmImf: Changed the orientation of lat-long envmaps to - match typical panoramic camera setups. (Florian Kainz) - * IlmImf: Fixed a bug where partially-completed files with - DECREASING_Y could not be read. (Florian Kainz) - * IlmImf: Added support for selectable rounding mode (up/down) - when generating multiresolution files. (Florian Kainz) - * exrdisplay: Support for tiled images, mip/ripmaps, preview - images, and display windows. (Florian Kainz, Drew Hess) - * exrmaketiled: A new utility which generates tiled - versions of OpenEXR images. (Florian Kainz) - * IlmImf: Changed Imf::VERSION to Imf::EXR_VERSION to - work around problems with autoconf VERSION macro - conflict. (Drew Hess) - * exrheader: Support for tiles, mipmaps, environment - maps. (Florian Kainz) - * IlmImf: Environment map support. (Florian Kainz) - * IlmImf: Abstracted stream I/O support. (Florian Kainz) - * IlmImf: Support for tiled and mip/ripmapped files; - requires new file format. (Wojciech Jarosz, Florian Kainz) - * Imath: TMatrix*, generic 2D matricies and algorithms. - (Francesco Callari) - * Imath: major quaternions cleanup. (Cary Phillips) - * Imath: added GLBegin, GLPushAttrib, GLPushMatrix objects - for automatic cleanup on exceptions. (Cary Phillips) - * Imath: removed implicit scalar->vector promotions and vector - comparisons. (Nick Rasmussen) - -Version 1.0.7: - * Fixed a typo in one of the IlmImfTest tests. (Paul Schneider) - * Fixed a bug in exrdisplay that causes the image to display - as all black if there's a NaN or infinity in an OpenEXR - image. (Florian Kainz) - * Updated exrheader per recent changes to IlmImf library. - (Florian Kainz) - * Changed an errant float to a T in ImathFrame.h nextFrame(). - (Cary Phillips) - * Support for new "optional standard" attributes - (chromaticities, luminance, comments, etc.). - (Florian Kainz, Greg Ward, Joseph Goldstone) - * Fixed a buffer overrun in ImfOpaqueAttribute. (Paul Schneider) - * Added new function, isImfMagic (). (Florian Kainz) - -Version 1.0.6: - * Added README.win32 to disted files. - * Fixed OpenEXR.pc.in pkg-config file, OpenEXR now works - with pkg-config. - * Random fixes to readme files for new release. - * Fixed openexr.m4, now looks in /usr by default. - * Added Visual Studio .NET 2003 "solution." - * Fixes for Visual Studio .NET 2003 w/ Microsoft C++ compiler. - (Various) - * Random Imath fixes and enhancements. Note that - extractSHRT now takes an additional optional - argument, see ImathMatrixAlgo.h for details. (Various) - * Added Wojciech Jarosz to AUTHORS file. - * Added test cases for uncompressed case, preview images, - frame buffer type conversion. (Wojciech Jarosz, - Florian Kainz) - * Fix a bug in IlmImf where uncompressed data doesn't get - read/written correctly. (Wojciech Jarosz) - * Added support for preview images and preview image - attributes (thumbnail images) in IlmImf. (Florian Kainz) - * Added support for automatic frame buffer type conversion - in IlmImf. (Florian Kainz) - * Cleaned up some compile-time checks. - * Added HalfTest unit tests. - * [exrdisplay] Download half framebuffer to texture memory - instead of converting to float first. Requires latest - Nvidia drivers. - -Version 1.0.5: - * Fixed IlmImf.dll to use static runtime libs (Andreas). - * Added exrheader project to Visual Studio 6.0 workspace. - * Added some example code showing how to use the IlmImf library. - (Florian) - * Use DLL runtime libs for Win32 libraries rather than static - runtime libs. - * Add an exrdisplay_fragshader project to the Visual Studio 6.0 - workspace to enable fragment shaders in Win32. - * Add an IlmImfDll project to the Visual Studio 6.0 workspace. - * In Win32, export the ImfCRgbaFile C interface via a DLL so - that Visual C++ 6.0 users can link against an Intel-compiled - IlmImf. (Andreas Kahler) - * Use auto_ptr in ImfAutoArray on Win32, it doesn't like large - automatic stacks. - * Performance improvements in PIZ decoding, between - 20 and 60% speedup on Athlon and Pentium 4 systems. - (Florian) - * Updated the README with various information, made - some cosmetic changes for readability. - * Added fragment shader support to exrdisplay. - * Bumped the version to 1.0.5 in prep for release. - * Updated README and README.OSX to talk about CodeWarrior - project files. - * Incorporated Rodrigo Damazio's patch for an openexr.m4 - macro file and an openexr.spec file for building RPMs. - * Small change in ImfAttribute.h to make IlmImf compile with gcc 2.95. - * Updated ImfDoubleAttribute.h for Codewarrior on MacOS. - * Added exrheader utility. - * Update to AUTHORS file. - * Added a README.win32 file. - * Added project files for Visual Studio 6.0. - * Initial Win32 port. Requires Visual Studio 6.0 and Intel C++ - compiler version 7.0. - * Added new intersectT method in ImathSphere.h - * Fixed some bugs in ImathQuat.h - * Proper use of fltk-config to get platform-specific FLTK - compile- and link-time flags. - * exrdisplay uses Imath::Math::pow instead of powf now. - powf is not availble on all platforms. - * Roll OS X "hack" into the source until Apple fixes their - istream implementation. - -Version 1.0.4: - * OpenEXR is now covered by a modified BSD license. See LICENSE - for the new terms. - -Version 1.0.3: - - * OpenEXR is now in sf.net CVS. - * Imf::Xdr namespace cleanups. - * Some IlmImfTest cleanups for OS X. - * Use .cpp extension in exrdisplay sources. - * Iex cleanups. - * Make IlmImf compile with Metrowerks Codewarrior. - * Change large automatic stacks in ImfHuf.C to auto_ptrs allocated - off the heap. MacOS X default stack size isn't large enough. - * std::ios fix for MacOS X in ImfInputFile.C. - * Added new FP predecessor/successor functions to Imath, added - tests to ImathTest - * Fixed a bug in Imath::extractSHRT for 3x3 matricies when - exactly one of the original scaling factors is negative, updated - ImathTest to check this case. - * Install include files when 'make install' is run. - * exrdisplay requires fltk 1.1+ now in an effort to support - a MacOS X display program (fltk 1.1 runs on OS X), though this - is untested. - * renamed configure.in to configure.ac - * Removed some tests from IexTest that are no longer used. - * Removed ImfHalfXdr.h, it's not used anymore. - * Revamped the autoconf system, added some compile-time - optimizations, a pkgconfig target, and some maintainer-specific - stuff. - -Version 1.0.2: - - * More OS X fixes in Imath, IlmImf and IlmImfTest. - * Imath updates. - * Fixed a rotation bug in Imath - -Version 1.0.1: - - * Used autoconf 2.53 and automake 1.6 to generate build environment. - * Makefile.am cleanups. - * OS X fixes. - * removed images directory (now distributed separately). - -Version 1.0: - - * first official release. - * added some high-level documentation, removed the old OpenEXR.html - documentation. - * fixed a few nagging build problems. - * bumped IMV_VERSION_NUMBER to 2 - -Version 0.9: - - * added exrdisplay viewer application. - * cleanup _data in Imf::InputFile and Imf::OutputFile constructors. - * removed old ILM copyright notices. - -Version 0.8: - - * Initial release. diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/INSTALL b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/INSTALL deleted file mode 100644 index 06d1f09..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/INSTALL +++ /dev/null @@ -1,2 +0,0 @@ -See the README file for instructions on how to build OpenEXR from -source. diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/LICENSE b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/LICENSE deleted file mode 100644 index 6372750..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/LICENSE +++ /dev/null @@ -1,34 +0,0 @@ -Copyright (c) 2006, Industrial Light & Magic, a division of Lucasfilm -Entertainment Company Ltd. Portions contributed and copyright held by -others as indicated. 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 Industrial Light & Magic nor the names of - any other contributors to this software may be used to endorse or - promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/NEWS b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/NEWS deleted file mode 100644 index e8dde6c..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/NEWS +++ /dev/null @@ -1,184 +0,0 @@ -Version 1.5.0: - - Separated some of the code into other libraries - IlmBase and - OpenEXR_Viewers - for easier integration with CTL. - -Version 1.4.0a: - - Fix for Visual Studio .NET 2003 ReleaseDLL builds. - -Version 1.4.0: - - Production release. - - Bug fix for setFrameBuffer() on a tiled file. - -Version 1.3.1: - - Fixed the ReleaseDLL targets on Visual Studio 2005. - -Version 1.3.0: - - The 1.3.x series is a developer-only release for testing - OpenEXR's new multithreaded I/O support. - - Multithread support for reading and writing an OpenEXR - file. - - Support for Intel-based OS X systems. - - Support for Visual Studio 2005. - - When compiling against OpenEXR headers, there's no longer any - need to define any PLATFORM_* or HAVE_* macros; OpenEXR now - supplies an OpenEXRConfig.h header file which is included by - the OpenEXR headers that need these special macros. However, - on Windows platforms, when using OpenEXR DLLs, you must still - define the OPENEXR_DLL preprocessor directive in your project. - - New documentation for multithread support, plus some - updates and additions. - - Bug fixes releated to better handling of incomplete/damaged - files. - - Numerous bug fixes and cleanups to the autoconf-based - build system. - - Removed support for the following configurations that were - previously supported. Some of these configurations may happen - to continue to function, but we can't help you if they don't, - largely because we don't have any way to test OpenEXR on these - configurations. - - IRIX - - OSF1 - - SunOS - - OS X versions prior to 10.3. - - gcc on any platform prior to version 3.3 - -Version 1.2.2: - - New build system for Windows; support for DLLs. - - Imath: Removed TMatrix classes; these classes are still - under development and are too difficult to keep in sync - with OpenEXR CVS. - - IlmImf: support for image layers in ChannelList. - - IlmImf: added isComplete() method to file classes to check - whether a file is complete. - - IlmImf: exposed staticInitialize() in ImfHeader.h in - order to allow thread-safe library initialization in - multithreaded applications. - - IlmImf: New "time code" standard attribute. - - exrdisplay: support for displaying wrap-around texture map - images. - - exrmaketiled: can now specify wrap mode. - - IlmImf: New "wrapmodes" standard attribute to indicate - extrapolation mode for mipmaps and ripmaps. - - IlmImf: New "key code" standard attribute to identify motion - picture film frames. - -Version 1.2.1: - - reduced memory footprint of exrenvmap and exrmaketiled - utilities. - - IlmImf: new helper functions to determine whether a - file is an OpenEXR file, and whether it's scanline- or - tile-based. - - IlmImf: bug fix for PXR24 compression with ySampling != 1. - - Imath: a few new enhancements - - Better support for gcc 3.4. - - Warning cleanups in Visual C++. - -Version 1.2: - - Production-ready release. - - Support for gcc 3.4. - - Supports gcc 2.95 again. - - IlmImf: bug fix for handling broken OpenEXR files without - crashing. - -Version 1.1.1: - - Added Pixar's new "slightly lossy" image compression method - for FLOAT channels, called PXR24. HALF and UINT channels - are compressed without loss. - - Changed top-level LICENSE file to allow for other copyright - holders for individual files. - - Reading tiled files with the scanline interface is faster. - - OpenEXR now supports YCA (luminance/chroma/alpha) images with - subsampled chroma channels. - - IlmImf: various bug fixes. - - The half class is now faster in some expressions. - - New tiled file format. The new format is incompatible with - the format used by 1.1.0. - -Version 1.1.0: - - IlmImfExamples: Updated to include examples of how to use - the tiling and mip/ripmapping interfaces. - - exrmakepreview: A new utility for embedding preview images - in OpenEXR files. - - exrenvmap: A new utility for creating OpenEXR environment maps. - - exrstdattr: A new utility for manipulating standard attributes. - - exrdisplay: Support for tiled, mip/ripmapped images, display - windows, and preview images. - - exrmaketiled: A new utility which generates tiled versions - of OpenEXR images. - - exrheader: Support for tiles, mipmaps, environment maps. - - IlmImf: Support for environment maps. - - IlmImf: Support for abstracted stream I/O. You can - wrap the IStream and OStream classes around your API - of choice (FILE *, fd, even an HTTP 1.1 stream) as long - as it supports seeking. - - IlmImf: Support for tiled and mip/ripmapped files. This - requires a new file format. Scanline files generated by - the 1.1.0 version of the library can be read by older - versions, but tiled files can only be read by 1.1.0 or - greater. - - Imath: added TMatrix*, generic 2D matricies and algorithms. - - Imath: various updates and bug fixes. - -Version 1.0.7: - - Support for "optional standard" attributes: - Primary and white point chromaticities. - Absolute luminance. - Content owner - Comments - Image acquisition time and place - Focus distance - Lens aperture - Film sensitivity - If you want to use these new attributes in your application, see - ImfStandardAttributes.h for documentation on what they are and how - to use them. - - Bug fix in OpaqueAttributes. - -Version 1.0.6: - - Support for embedded preview images (thumbnails). - - Automatic frame buffer type conversion. - - Support for Visual Studio .NET 2003 w/ Microsoft's C++ compiler. - - Minor bug fixes. - -Version 1.0.5: - - PIZ decoding should be 20-60% faster on Athlon and Pentium 4 - systems. - - exrdisplay supports hardware rendering with vp30 profile fragment - shaders. - - Support for Win32 with Visual Studio 6.0 and Intel C++ compiler - version 7.0. - - Support for gcc 2.95. - - New exrheader utility. - - exrdisplay works on Win32 and OS X now. - - Minor bug fixes. - -Version 1.0.4: - - Released under the new modified BSD license. - -Version 1.0.3: - - Even more OS X fixes. - - Support for Metrowerks Codewarrior compiler. Enables OpenEXR code - to be used in a MacOS Photoshop plugin, if someone wants to write - one. ;) - - Fixed a bug in Imath, added some new confidence tests to ImathTest. - - Other minor fixes. - - Install include files. - - exrdisplay requires fltk 1.1+ now. - -Version 1.0.2: - - More OS X fixes. - - Fixed a rotation bug in Imath. - -Version 1.0.1: - - OS X fixes. - - Removed the example images; these are now distributed separately. - -Version 1.0: - - official release. - -Version 0.9: - - another limited release. - - included exrdisplay viewer and sample EXR images. - -Version 0.8: - - initial limited release. diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/PATENTS b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/PATENTS deleted file mode 100644 index ce9fb28..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/PATENTS +++ /dev/null @@ -1,23 +0,0 @@ -Additional IP Rights Grant (Patents) "DreamWorks Lossy Compression" means the -copyrightable works distributed by DreamWorks Animation as part of the OpenEXR -Project. Within the OpenEXR project, DreamWorks Animation hereby grants to you -a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable -(except as stated in this section) patent license to make, have made, use, -import, sell products which incorporate this IP as part of the OpenEXR -standard, transfer, and otherwise run, modify and propagate the contents of -this implementation of DreamWorks Lossy Compression within the OpenEXR standard, -where such license applies only to those patent claims, both currently owned by -DreamWorks Animation and acquired in the future, licensable by DreamWorks -Animation that are necessarily infringed by this implementation of DreamWorks -Lossy Compression. This grant does not include use of DreamWorks Lossy -Compression outside of the OpenEXR standard. This grant does not include claims -that would be infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or order -or agree to the institution of patent litigation against any entity (including -a cross-claim or counterclaim in a lawsuit) alleging that this implementation -of DreamWorks Lossy Compression or any code incorporated within this -implementation of DreamWorks Lossy Compression constitutes direct or -contributory patent infringement, or inducement of patent infringement, then -any patent rights granted to you under this License for this implementation -of DreamWorks Lossy Compression shall terminate as of the date such litigation -is filed. diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README deleted file mode 100644 index 7038b1c..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README +++ /dev/null @@ -1,77 +0,0 @@ -ABOUT THE OPENEXR LIBRARIES ----------------------------- - -IlmImf is our "EXR" file format for storing 16-bit FP images. Libraries in -this package depend on the IlmBase library. - -See the IlmImfExamples directory for some code that demonstrates how -to use the IlmImf library to read and write OpenEXR files. The doc -directory contains some high-level documentation and history about the -OpenEXR format. - -If you have questions about using the OpenEXR libraries, you may want -to join our developer mailing list. See http://www.openexr.com for -details. - - -LICENSE -------- - -The OpenEXR source code distribution is free software. See the file -named COPYING (included in this distribution) for details. - - -BUILDING OPENEXR ----------------- - -Building OpenEXR requires the IlmBase and the zlib library. - -You can obtain the source code for zlib from: - - http://www.zlib.net - -If you're building OpenEXR on a Windows platform, see README.win32 for -instructions on how to build OpenEXR. The remainder of this file -applies only to GNU/Linux or other UNIX-like systems. - -After installing the required libraries, to build OpenEXR on -GNU/Linux or other UNIX-like systems, do this: - -./configure -make -make install - -unless you obtained IlmBase directly from git, in which case you -should first read README.git - - -Please type : - -./configure --help - -for a list of options in relation to building IlmBase libraries. In -particular, peruse README.namespaces for information regarding the -use of namespaces in IlmBase and OpenEXR. - -See README.OSX for details on building OpenEXR in MacOS X. - -Do `make check` to run the OpenEXR confidence tests. They should all -pass; if you find a test that does not pass on your system, please let -us know. - -Other UNIX variants haven't been tested, but should be easy to build. -Let us know if you're having problems porting OpenEXR to a particular -platform. - -All include files needed to use the OpenEXR libraries are installed in the -OpenEXR subdirectory of the install prefix, e.g. /usr/local/include/OpenEXR. - - -USING OPENEXR IN YOUR APPLICATIONS ----------------------------------- - -On systems with support for pkg-config, use `pkg-config --cflags -OpenEXR` for the C++ flags required to compile against OpenEXR -headers; and `pkg-config --libs OpenEXR` for the linker flags required -to link against OpenEXR libraries. - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.CVS b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.CVS deleted file mode 100644 index 90a4fa3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.CVS +++ /dev/null @@ -1,16 +0,0 @@ -If you're using OpenEXR from CVS, you should run the bootstrap script -to create the auto* files. It's a good idea to run this whenever you -update OpenEXR from CVS. - -Then run './configure' and make. - -Note that the configure.ac file requires a fairly new version of -automake. If you get this error message: - -running aclocal ... -aclocal: configure.ac: 142: macro `AM_CFLAGS' not found in library -aclocal: configure.ac: 143: macro `AM_CXXFLAGS' not found in library -failed! - -you should upgrade your automake to version 1.6 or better. - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.OSX b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.OSX deleted file mode 100644 index 646646d..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.OSX +++ /dev/null @@ -1,57 +0,0 @@ -OpenEXR on MacOS X ------------------- - -Building OpenEXR on MacOS X is just like building it on GNU/Linux. -Follow the instructions in the README file under BUILDLING OPENEXR, -but see below re: shared libraries. - -Missing gnu automake tools on Mac OS X 10.8+ ------------------- -Later versions of OS X ,10.8+, do not, by default have all the necessary -tools for building. In particular, Autoconf and Automake may be missing. - -The following commands will download and install the necessary components: - -cd ~/myDevLoc -curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.64.tar.gz -tar xzf autoconf-2.64.tar.gz -cd autoconf-2.64 -./configure --prefix=~/myDevLoc/autotools-bin -make; make install - -cd ~/myDevLoc -curl -OL http://ftpmirror.gnu.org/automake/automake-1.12.tar.gz -tar xzf automake-1.12.tar.gz -cd automake-1.12 -./configure --prefix=~/myDevLoc/autotools-bin -make; make install - -cd ~/myDevLoc -curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.tar.gz -tar xzf libtool-2.4.tar.gz -cd libtool-2.4 -./configure --prefix=~/myDevLoc/autotools-bin -make; make install - - -You may want to export the installation path for your convenience. -Finally, make sure that you have installed the command line tools for XCode. - - -Universal Builds on Mac OS X ------------------- - -On OS X 10.4, you can build universal binaries by passing -'--enable-osx-universal-binaries --disable-dependency-tracking' to the -configure script. The default is *not* to build universal binaries. - - -Shared libraries ----------------- - -OpenEXR requires the "flat namespace" option when built as a shared -library. You may have problems trying to use OpenEXR shared libraries -with applications that expect OS X's two-level namespace. We have not -tested the shared libs extensively, though they appear to work with -exrdisplay and exrheader, but use them at your own risk. We will -support two-level namespace shared libs in a future release. diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.git b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.git deleted file mode 100644 index d963e72..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.git +++ /dev/null @@ -1,16 +0,0 @@ -If you're using IlmBase from github, you should run the bootstrap script -to create the auto* files. It's a good idea to run this whenever you -update IlmBase from github. - -Then run './configure' and make. - -Note that the configure.ac file requires a fairly new version of -automake. If you get this error message: - -running aclocal ... -aclocal: configure.ac: 142: macro `AM_CFLAGS' not found in library -aclocal: configure.ac: 143: macro `AM_CXXFLAGS' not found in library -failed! - -you should upgrade your automake to version 1.6 or better. - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.namespacing b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.namespacing deleted file mode 100644 index ffae65f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.namespacing +++ /dev/null @@ -1,83 +0,0 @@ ------------------------------------------------- - On the use of namespace in IlmBase and OpenEXR ------------------------------------------------- - -v2.0 of the code base introduces user configurable namespaces for -component libraries. This addition introduces the ability to deal with -multiple versions of these libraries loaded at runtime. -An example case: - Application is built with OpenEXR v1.7, but the required plugin - requires functionality from OpenEXR v2.0. - - By injecting the version number into the (mangled) symbols, via - the namespacing mechanism, and changing the soname, via the build - system, the developer can link his plugin against the v2.0 library - At run time the dynamic linker can load both the 1.7 and 2.0 - versions of the library since the library soname are different and - the symbols are different. - - -When building IlmBase or OpenEXR the following configure script options -are available: - --enable-namespaceversioning -and - --enable-customusernamespace - - - --- Internal Library Namespace -The option, --enable-namespaceversioning, controls the namespace that -is used in the library. Without an argument (see below) the library -will be built with a suffix made up of the major and minor versions. -For example, for version 2.0.0, the internal library namespaces will be -Imath_2_0, Iex_2_0, IlmThread_2_0 etc - -For additional flexibility and control, this option can take an additional -argument in which case the internal library namespace will be suffixed -accordingly. -For example: - ./configure --enable-namespaceversioning=ILM -will result in the namespaces of the type Imath_ILM, Iex_ILM etc. - -This can be useful for completely isolating your local build. - -Code using the library should continue to use the namespace Imath, or for -greater portability IMATH_NAMESPACE, to refer to objects in libImath. -In particular, the explicit use of the internal namespace is discouraged. -This ensures that code will continue to compile with customised or future -versions of the library, which may have a different internal namespace. - -Similarily, for other namespaces in the libraries: Iex, IlmThread and IlmImf. - -Note that this scheme allows existing code to compile without modifications, -since the 'old' namespaces Imath, Iex, IlmThread and IlmImf continue to be -available, albeit in a slightly different form. -This is achieved via the following, in the Imath case: - namespace IMATH_INTERNAL_NAMESPACE {} - namespace IMATH_NAMESPACE - { - using namespace IMATH_INTERNAL_NAMESPACE; - } -This is included in all header files in the Imath library and similar ones -are present for the libraries Iex, IlmThread and IlmImf. - -The only exception to this is where user code has forward declarations of -objects in the Imf namespace, as these will forward declare symbols in an -incorrect namespace -These forward declarations should be removed, and replaced with - #include , -which forward-declares all types correctly. - - - --- Public/User Library Namespace -The option, --enable-customusernamespace, can override the namespace into -which we will 'export' the internal namespace. This takes an argument -that sets the name of the custom user namespace. -In the example above, IMATH_NAMESPACE could be resolved into something other -than Imath, say Imath_MySpecialNamespace. - -In nearly all cases, this will not be used as per the above discussion -regarding code compatibility. -Its presence is to provide a mechanism for not prohibiting the case when -the application must pass objects from two different versions of the library. diff --git a/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.win32 b/Dependencies/FreeImage/Source/OpenEXR/Copyrights/openexr/README.win32 deleted file mode 100644 index e69de29..0000000 diff --git a/Dependencies/FreeImage/Source/OpenEXR/Half/eLut.cpp b/Dependencies/FreeImage/Source/OpenEXR/Half/eLut.cpp deleted file mode 100644 index ce64b50..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Half/eLut.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#include -#include - -using namespace std; - -//----------------------------------------------------- -// Compute a lookup table for float-to-half conversion. -// -// When indexed with the combined sign and exponent of -// a float, the table either returns the combined sign -// and exponent of the corresponding half, or zero if -// the corresponding half may not be normalized (zero, -// denormalized, overflow). -//----------------------------------------------------- - -void -initELut (unsigned short eLut[]) -{ - for (int i = 0; i < 0x100; i++) - { - int e = (i & 0x0ff) - (127 - 15); - - if (e <= 0 || e >= 30) - { - // - // Special case - // - - eLut[i] = 0; - eLut[i | 0x100] = 0; - } - else - { - // - // Common case - normalized half, no exponent overflow possible - // - - eLut[i] = (e << 10); - eLut[i | 0x100] = ((e << 10) | 0x8000); - } - } -} - - -//------------------------------------------------------------ -// Main - prints the sign-and-exponent conversion lookup table -//------------------------------------------------------------ - -int -main () -{ - const int tableSize = 1 << 9; - unsigned short eLut[tableSize]; - initELut (eLut); - - cout << "//\n" - "// This is an automatically generated file.\n" - "// Do not edit.\n" - "//\n\n"; - - cout << "{\n "; - - for (int i = 0; i < tableSize; i++) - { - cout << setw (5) << eLut[i] << ", "; - - if (i % 8 == 7) - { - cout << "\n"; - - if (i < tableSize - 1) - cout << " "; - } - } - - cout << "};\n"; - return 0; -} diff --git a/Dependencies/FreeImage/Source/OpenEXR/Half/eLut.h b/Dependencies/FreeImage/Source/OpenEXR/Half/eLut.h deleted file mode 100644 index f028cdb..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Half/eLut.h +++ /dev/null @@ -1,71 +0,0 @@ -// -// This is an automatically generated file. -// Do not edit. -// - -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1024, 2048, 3072, 4096, 5120, 6144, 7168, - 8192, 9216, 10240, 11264, 12288, 13312, 14336, 15360, - 16384, 17408, 18432, 19456, 20480, 21504, 22528, 23552, - 24576, 25600, 26624, 27648, 28672, 29696, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 33792, 34816, 35840, 36864, 37888, 38912, 39936, - 40960, 41984, 43008, 44032, 45056, 46080, 47104, 48128, - 49152, 50176, 51200, 52224, 53248, 54272, 55296, 56320, - 57344, 58368, 59392, 60416, 61440, 62464, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; diff --git a/Dependencies/FreeImage/Source/OpenEXR/Half/half.cpp b/Dependencies/FreeImage/Source/OpenEXR/Half/half.cpp deleted file mode 100644 index 609aaa1..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Half/half.cpp +++ /dev/null @@ -1,310 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -// Primary authors: -// Florian Kainz -// Rod Bogart - - -//--------------------------------------------------------------------------- -// -// class half -- -// implementation of non-inline members -// -//--------------------------------------------------------------------------- - -#include -#include "half.h" - -using namespace std; - -//------------------------------------------------------------- -// Lookup tables for half-to-float and float-to-half conversion -//------------------------------------------------------------- - -HALF_EXPORT const half::uif half::_toFloat[1 << 16] = - #include "toFloat.h" -HALF_EXPORT const unsigned short half::_eLut[1 << 9] = - #include "eLut.h" - -//----------------------------------------------- -// Overflow handler for float-to-half conversion; -// generates a hardware floating-point overflow, -// which may be trapped by the operating system. -//----------------------------------------------- - -HALF_EXPORT float -half::overflow () -{ - volatile float f = 1e10; - - for (int i = 0; i < 10; i++) - f *= f; // this will overflow before - // the forloop terminates - return f; -} - - -//----------------------------------------------------- -// Float-to-half conversion -- general case, including -// zeroes, denormalized numbers and exponent overflows. -//----------------------------------------------------- - -HALF_EXPORT short -half::convert (int i) -{ - // - // Our floating point number, f, is represented by the bit - // pattern in integer i. Disassemble that bit pattern into - // the sign, s, the exponent, e, and the significand, m. - // Shift s into the position where it will go in in the - // resulting half number. - // Adjust e, accounting for the different exponent bias - // of float and half (127 versus 15). - // - - register int s = (i >> 16) & 0x00008000; - register int e = ((i >> 23) & 0x000000ff) - (127 - 15); - register int m = i & 0x007fffff; - - // - // Now reassemble s, e and m into a half: - // - - if (e <= 0) - { - if (e < -10) - { - // - // E is less than -10. The absolute value of f is - // less than HALF_MIN (f may be a small normalized - // float, a denormalized float or a zero). - // - // We convert f to a half zero with the same sign as f. - // - - return s; - } - - // - // E is between -10 and 0. F is a normalized float - // whose magnitude is less than HALF_NRM_MIN. - // - // We convert f to a denormalized half. - // - - // - // Add an explicit leading 1 to the significand. - // - - m = m | 0x00800000; - - // - // Round to m to the nearest (10+e)-bit value (with e between - // -10 and 0); in case of a tie, round to the nearest even value. - // - // Rounding may cause the significand to overflow and make - // our number normalized. Because of the way a half's bits - // are laid out, we don't have to treat this case separately; - // the code below will handle it correctly. - // - - int t = 14 - e; - int a = (1 << (t - 1)) - 1; - int b = (m >> t) & 1; - - m = (m + a + b) >> t; - - // - // Assemble the half from s, e (zero) and m. - // - - return s | m; - } - else if (e == 0xff - (127 - 15)) - { - if (m == 0) - { - // - // F is an infinity; convert f to a half - // infinity with the same sign as f. - // - - return s | 0x7c00; - } - else - { - // - // F is a NAN; we produce a half NAN that preserves - // the sign bit and the 10 leftmost bits of the - // significand of f, with one exception: If the 10 - // leftmost bits are all zero, the NAN would turn - // into an infinity, so we have to set at least one - // bit in the significand. - // - - m >>= 13; - return s | 0x7c00 | m | (m == 0); - } - } - else - { - // - // E is greater than zero. F is a normalized float. - // We try to convert f to a normalized half. - // - - // - // Round to m to the nearest 10-bit value. In case of - // a tie, round to the nearest even value. - // - - m = m + 0x00000fff + ((m >> 13) & 1); - - if (m & 0x00800000) - { - m = 0; // overflow in significand, - e += 1; // adjust exponent - } - - // - // Handle exponent overflow - // - - if (e > 30) - { - overflow (); // Cause a hardware floating point overflow; - return s | 0x7c00; // if this returns, the half becomes an - } // infinity with the same sign as f. - - // - // Assemble the half from s, e and m. - // - - return s | (e << 10) | (m >> 13); - } -} - - -//--------------------- -// Stream I/O operators -//--------------------- - -HALF_EXPORT ostream & -operator << (ostream &os, half h) -{ - os << float (h); - return os; -} - - -HALF_EXPORT istream & -operator >> (istream &is, half &h) -{ - float f; - is >> f; - h = half (f); - return is; -} - - -//--------------------------------------- -// Functions to print the bit-layout of -// floats and halfs, mostly for debugging -//--------------------------------------- - -HALF_EXPORT void -printBits (ostream &os, half h) -{ - unsigned short b = h.bits(); - - for (int i = 15; i >= 0; i--) - { - os << (((b >> i) & 1)? '1': '0'); - - if (i == 15 || i == 10) - os << ' '; - } -} - - -HALF_EXPORT void -printBits (ostream &os, float f) -{ - half::uif x; - x.f = f; - - for (int i = 31; i >= 0; i--) - { - os << (((x.i >> i) & 1)? '1': '0'); - - if (i == 31 || i == 23) - os << ' '; - } -} - - -HALF_EXPORT void -printBits (char c[19], half h) -{ - unsigned short b = h.bits(); - - for (int i = 15, j = 0; i >= 0; i--, j++) - { - c[j] = (((b >> i) & 1)? '1': '0'); - - if (i == 15 || i == 10) - c[++j] = ' '; - } - - c[18] = 0; -} - - -HALF_EXPORT void -printBits (char c[35], float f) -{ - half::uif x; - x.f = f; - - for (int i = 31, j = 0; i >= 0; i--, j++) - { - c[j] = (((x.i >> i) & 1)? '1': '0'); - - if (i == 31 || i == 23) - c[++j] = ' '; - } - - c[34] = 0; -} diff --git a/Dependencies/FreeImage/Source/OpenEXR/Half/half.h b/Dependencies/FreeImage/Source/OpenEXR/Half/half.h deleted file mode 100644 index f78e4f6..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Half/half.h +++ /dev/null @@ -1,757 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -// Primary authors: -// Florian Kainz -// Rod Bogart - -//--------------------------------------------------------------------------- -// -// half -- a 16-bit floating point number class: -// -// Type half can represent positive and negative numbers whose -// magnitude is between roughly 6.1e-5 and 6.5e+4 with a relative -// error of 9.8e-4; numbers smaller than 6.1e-5 can be represented -// with an absolute error of 6.0e-8. All integers from -2048 to -// +2048 can be represented exactly. -// -// Type half behaves (almost) like the built-in C++ floating point -// types. In arithmetic expressions, half, float and double can be -// mixed freely. Here are a few examples: -// -// half a (3.5); -// float b (a + sqrt (a)); -// a += b; -// b += a; -// b = a + 7; -// -// Conversions from half to float are lossless; all half numbers -// are exactly representable as floats. -// -// Conversions from float to half may not preserve a float's value -// exactly. If a float is not representable as a half, then the -// float value is rounded to the nearest representable half. If a -// float value is exactly in the middle between the two closest -// representable half values, then the float value is rounded to -// the closest half whose least significant bit is zero. -// -// Overflows during float-to-half conversions cause arithmetic -// exceptions. An overflow occurs when the float value to be -// converted is too large to be represented as a half, or if the -// float value is an infinity or a NAN. -// -// The implementation of type half makes the following assumptions -// about the implementation of the built-in C++ types: -// -// float is an IEEE 754 single-precision number -// sizeof (float) == 4 -// sizeof (unsigned int) == sizeof (float) -// alignof (unsigned int) == alignof (float) -// sizeof (unsigned short) == 2 -// -//--------------------------------------------------------------------------- - -#ifndef _HALF_H_ -#define _HALF_H_ - -#include "halfExport.h" // for definition of HALF_EXPORT -#include - -class half -{ - public: - - //------------- - // Constructors - //------------- - - half (); // no initialization - half (float f); - - - //-------------------- - // Conversion to float - //-------------------- - - operator float () const; - - - //------------ - // Unary minus - //------------ - - half operator - () const; - - - //----------- - // Assignment - //----------- - - half & operator = (half h); - half & operator = (float f); - - half & operator += (half h); - half & operator += (float f); - - half & operator -= (half h); - half & operator -= (float f); - - half & operator *= (half h); - half & operator *= (float f); - - half & operator /= (half h); - half & operator /= (float f); - - - //--------------------------------------------------------- - // Round to n-bit precision (n should be between 0 and 10). - // After rounding, the significand's 10-n least significant - // bits will be zero. - //--------------------------------------------------------- - - half round (unsigned int n) const; - - - //-------------------------------------------------------------------- - // Classification: - // - // h.isFinite() returns true if h is a normalized number, - // a denormalized number or zero - // - // h.isNormalized() returns true if h is a normalized number - // - // h.isDenormalized() returns true if h is a denormalized number - // - // h.isZero() returns true if h is zero - // - // h.isNan() returns true if h is a NAN - // - // h.isInfinity() returns true if h is a positive - // or a negative infinity - // - // h.isNegative() returns true if the sign bit of h - // is set (negative) - //-------------------------------------------------------------------- - - bool isFinite () const; - bool isNormalized () const; - bool isDenormalized () const; - bool isZero () const; - bool isNan () const; - bool isInfinity () const; - bool isNegative () const; - - - //-------------------------------------------- - // Special values - // - // posInf() returns +infinity - // - // negInf() returns -infinity - // - // qNan() returns a NAN with the bit - // pattern 0111111111111111 - // - // sNan() returns a NAN with the bit - // pattern 0111110111111111 - //-------------------------------------------- - - static half posInf (); - static half negInf (); - static half qNan (); - static half sNan (); - - - //-------------------------------------- - // Access to the internal representation - //-------------------------------------- - - HALF_EXPORT unsigned short bits () const; - HALF_EXPORT void setBits (unsigned short bits); - - - public: - - union uif - { - unsigned int i; - float f; - }; - - private: - - HALF_EXPORT static short convert (int i); - HALF_EXPORT static float overflow (); - - unsigned short _h; - - HALF_EXPORT static const uif _toFloat[1 << 16]; - HALF_EXPORT static const unsigned short _eLut[1 << 9]; -}; - - - -//----------- -// Stream I/O -//----------- - -HALF_EXPORT std::ostream & operator << (std::ostream &os, half h); -HALF_EXPORT std::istream & operator >> (std::istream &is, half &h); - - -//---------- -// Debugging -//---------- - -HALF_EXPORT void printBits (std::ostream &os, half h); -HALF_EXPORT void printBits (std::ostream &os, float f); -HALF_EXPORT void printBits (char c[19], half h); -HALF_EXPORT void printBits (char c[35], float f); - - -//------------------------------------------------------------------------- -// Limits -// -// Visual C++ will complain if HALF_MIN, HALF_NRM_MIN etc. are not float -// constants, but at least one other compiler (gcc 2.96) produces incorrect -// results if they are. -//------------------------------------------------------------------------- - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER - - #define HALF_MIN 5.96046448e-08f // Smallest positive half - - #define HALF_NRM_MIN 6.10351562e-05f // Smallest positive normalized half - - #define HALF_MAX 65504.0f // Largest positive half - - #define HALF_EPSILON 0.00097656f // Smallest positive e for which - // half (1.0 + e) != half (1.0) -#else - - #define HALF_MIN 5.96046448e-08 // Smallest positive half - - #define HALF_NRM_MIN 6.10351562e-05 // Smallest positive normalized half - - #define HALF_MAX 65504.0 // Largest positive half - - #define HALF_EPSILON 0.00097656 // Smallest positive e for which - // half (1.0 + e) != half (1.0) -#endif - - -#define HALF_MANT_DIG 11 // Number of digits in mantissa - // (significand + hidden leading 1) - -#define HALF_DIG 2 // Number of base 10 digits that - // can be represented without change - -#define HALF_RADIX 2 // Base of the exponent - -#define HALF_MIN_EXP -13 // Minimum negative integer such that - // HALF_RADIX raised to the power of - // one less than that integer is a - // normalized half - -#define HALF_MAX_EXP 16 // Maximum positive integer such that - // HALF_RADIX raised to the power of - // one less than that integer is a - // normalized half - -#define HALF_MIN_10_EXP -4 // Minimum positive integer such - // that 10 raised to that power is - // a normalized half - -#define HALF_MAX_10_EXP 4 // Maximum positive integer such - // that 10 raised to that power is - // a normalized half - - -//--------------------------------------------------------------------------- -// -// Implementation -- -// -// Representation of a float: -// -// We assume that a float, f, is an IEEE 754 single-precision -// floating point number, whose bits are arranged as follows: -// -// 31 (msb) -// | -// | 30 23 -// | | | -// | | | 22 0 (lsb) -// | | | | | -// X XXXXXXXX XXXXXXXXXXXXXXXXXXXXXXX -// -// s e m -// -// S is the sign-bit, e is the exponent and m is the significand. -// -// If e is between 1 and 254, f is a normalized number: -// -// s e-127 -// f = (-1) * 2 * 1.m -// -// If e is 0, and m is not zero, f is a denormalized number: -// -// s -126 -// f = (-1) * 2 * 0.m -// -// If e and m are both zero, f is zero: -// -// f = 0.0 -// -// If e is 255, f is an "infinity" or "not a number" (NAN), -// depending on whether m is zero or not. -// -// Examples: -// -// 0 00000000 00000000000000000000000 = 0.0 -// 0 01111110 00000000000000000000000 = 0.5 -// 0 01111111 00000000000000000000000 = 1.0 -// 0 10000000 00000000000000000000000 = 2.0 -// 0 10000000 10000000000000000000000 = 3.0 -// 1 10000101 11110000010000000000000 = -124.0625 -// 0 11111111 00000000000000000000000 = +infinity -// 1 11111111 00000000000000000000000 = -infinity -// 0 11111111 10000000000000000000000 = NAN -// 1 11111111 11111111111111111111111 = NAN -// -// Representation of a half: -// -// Here is the bit-layout for a half number, h: -// -// 15 (msb) -// | -// | 14 10 -// | | | -// | | | 9 0 (lsb) -// | | | | | -// X XXXXX XXXXXXXXXX -// -// s e m -// -// S is the sign-bit, e is the exponent and m is the significand. -// -// If e is between 1 and 30, h is a normalized number: -// -// s e-15 -// h = (-1) * 2 * 1.m -// -// If e is 0, and m is not zero, h is a denormalized number: -// -// S -14 -// h = (-1) * 2 * 0.m -// -// If e and m are both zero, h is zero: -// -// h = 0.0 -// -// If e is 31, h is an "infinity" or "not a number" (NAN), -// depending on whether m is zero or not. -// -// Examples: -// -// 0 00000 0000000000 = 0.0 -// 0 01110 0000000000 = 0.5 -// 0 01111 0000000000 = 1.0 -// 0 10000 0000000000 = 2.0 -// 0 10000 1000000000 = 3.0 -// 1 10101 1111000001 = -124.0625 -// 0 11111 0000000000 = +infinity -// 1 11111 0000000000 = -infinity -// 0 11111 1000000000 = NAN -// 1 11111 1111111111 = NAN -// -// Conversion: -// -// Converting from a float to a half requires some non-trivial bit -// manipulations. In some cases, this makes conversion relatively -// slow, but the most common case is accelerated via table lookups. -// -// Converting back from a half to a float is easier because we don't -// have to do any rounding. In addition, there are only 65536 -// different half numbers; we can convert each of those numbers once -// and store the results in a table. Later, all conversions can be -// done using only simple table lookups. -// -//--------------------------------------------------------------------------- - - -//-------------------- -// Simple constructors -//-------------------- - -inline -half::half () -{ - // no initialization -} - - -//---------------------------- -// Half-from-float constructor -//---------------------------- - -inline -half::half (float f) -{ - uif x; - - x.f = f; - - if (f == 0) - { - // - // Common special case - zero. - // Preserve the zero's sign bit. - // - - _h = (x.i >> 16); - } - else - { - // - // We extract the combined sign and exponent, e, from our - // floating-point number, f. Then we convert e to the sign - // and exponent of the half number via a table lookup. - // - // For the most common case, where a normalized half is produced, - // the table lookup returns a non-zero value; in this case, all - // we have to do is round f's significand to 10 bits and combine - // the result with e. - // - // For all other cases (overflow, zeroes, denormalized numbers - // resulting from underflow, infinities and NANs), the table - // lookup returns zero, and we call a longer, non-inline function - // to do the float-to-half conversion. - // - - register int e = (x.i >> 23) & 0x000001ff; - - e = _eLut[e]; - - if (e) - { - // - // Simple case - round the significand, m, to 10 - // bits and combine it with the sign and exponent. - // - - register int m = x.i & 0x007fffff; - _h = e + ((m + 0x00000fff + ((m >> 13) & 1)) >> 13); - } - else - { - // - // Difficult case - call a function. - // - - _h = convert (x.i); - } - } -} - - -//------------------------------------------ -// Half-to-float conversion via table lookup -//------------------------------------------ - -inline -half::operator float () const -{ - return _toFloat[_h].f; -} - - -//------------------------- -// Round to n-bit precision -//------------------------- - -inline half -half::round (unsigned int n) const -{ - // - // Parameter check. - // - - if (n >= 10) - return *this; - - // - // Disassemble h into the sign, s, - // and the combined exponent and significand, e. - // - - unsigned short s = _h & 0x8000; - unsigned short e = _h & 0x7fff; - - // - // Round the exponent and significand to the nearest value - // where ones occur only in the (10-n) most significant bits. - // Note that the exponent adjusts automatically if rounding - // up causes the significand to overflow. - // - - e >>= 9 - n; - e += e & 1; - e <<= 9 - n; - - // - // Check for exponent overflow. - // - - if (e >= 0x7c00) - { - // - // Overflow occurred -- truncate instead of rounding. - // - - e = _h; - e >>= 10 - n; - e <<= 10 - n; - } - - // - // Put the original sign bit back. - // - - half h; - h._h = s | e; - - return h; -} - - -//----------------------- -// Other inline functions -//----------------------- - -inline half -half::operator - () const -{ - half h; - h._h = _h ^ 0x8000; - return h; -} - - -inline half & -half::operator = (half h) -{ - _h = h._h; - return *this; -} - - -inline half & -half::operator = (float f) -{ - *this = half (f); - return *this; -} - - -inline half & -half::operator += (half h) -{ - *this = half (float (*this) + float (h)); - return *this; -} - - -inline half & -half::operator += (float f) -{ - *this = half (float (*this) + f); - return *this; -} - - -inline half & -half::operator -= (half h) -{ - *this = half (float (*this) - float (h)); - return *this; -} - - -inline half & -half::operator -= (float f) -{ - *this = half (float (*this) - f); - return *this; -} - - -inline half & -half::operator *= (half h) -{ - *this = half (float (*this) * float (h)); - return *this; -} - - -inline half & -half::operator *= (float f) -{ - *this = half (float (*this) * f); - return *this; -} - - -inline half & -half::operator /= (half h) -{ - *this = half (float (*this) / float (h)); - return *this; -} - - -inline half & -half::operator /= (float f) -{ - *this = half (float (*this) / f); - return *this; -} - - -inline bool -half::isFinite () const -{ - unsigned short e = (_h >> 10) & 0x001f; - return e < 31; -} - - -inline bool -half::isNormalized () const -{ - unsigned short e = (_h >> 10) & 0x001f; - return e > 0 && e < 31; -} - - -inline bool -half::isDenormalized () const -{ - unsigned short e = (_h >> 10) & 0x001f; - unsigned short m = _h & 0x3ff; - return e == 0 && m != 0; -} - - -inline bool -half::isZero () const -{ - return (_h & 0x7fff) == 0; -} - - -inline bool -half::isNan () const -{ - unsigned short e = (_h >> 10) & 0x001f; - unsigned short m = _h & 0x3ff; - return e == 31 && m != 0; -} - - -inline bool -half::isInfinity () const -{ - unsigned short e = (_h >> 10) & 0x001f; - unsigned short m = _h & 0x3ff; - return e == 31 && m == 0; -} - - -inline bool -half::isNegative () const -{ - return (_h & 0x8000) != 0; -} - - -inline half -half::posInf () -{ - half h; - h._h = 0x7c00; - return h; -} - - -inline half -half::negInf () -{ - half h; - h._h = 0xfc00; - return h; -} - - -inline half -half::qNan () -{ - half h; - h._h = 0x7fff; - return h; -} - - -inline half -half::sNan () -{ - half h; - h._h = 0x7dff; - return h; -} - - -inline unsigned short -half::bits () const -{ - return _h; -} - - -inline void -half::setBits (unsigned short bits) -{ - _h = bits; -} - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/Half/halfExport.h b/Dependencies/FreeImage/Source/OpenEXR/Half/halfExport.h deleted file mode 100644 index 3a0c86a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Half/halfExport.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef HALFEXPORT_H -#define HALFEXPORT_H - -// -// Copyright (c) 2008 Lucasfilm Entertainment Company Ltd. -// All rights reserved. Used under authorization. -// This material contains the confidential and proprietary -// information of Lucasfilm Entertainment Company and -// may not be copied in whole or in part without the express -// written permission of Lucasfilm Entertainment Company. -// This copyright notice does not imply publication. -// - -#if defined(OPENEXR_DLL) - #if defined(HALF_EXPORTS) - #define HALF_EXPORT __declspec(dllexport) - #else - #define HALF_EXPORT __declspec(dllimport) - #endif - #define HALF_EXPORT_CONST -#else - #define HALF_EXPORT - #define HALF_EXPORT_CONST const -#endif - -#endif // #ifndef HALFEXPORT_H - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Half/halfFunction.h b/Dependencies/FreeImage/Source/OpenEXR/Half/halfFunction.h deleted file mode 100644 index 98c1d17..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Half/halfFunction.h +++ /dev/null @@ -1,179 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -// Primary authors: -// Florian Kainz -// Rod Bogart - - -//--------------------------------------------------------------------------- -// -// halfFunction -- a class for fast evaluation -// of half --> T functions -// -// The constructor for a halfFunction object, -// -// halfFunction (function, -// domainMin, domainMax, -// defaultValue, -// posInfValue, negInfValue, -// nanValue); -// -// evaluates the function for all finite half values in the interval -// [domainMin, domainMax], and stores the results in a lookup table. -// For finite half values that are not in [domainMin, domainMax], the -// constructor stores defaultValue in the table. For positive infinity, -// negative infinity and NANs, posInfValue, negInfValue and nanValue -// are stored in the table. -// -// The tabulated function can then be evaluated quickly for arbitrary -// half values by calling the the halfFunction object's operator() -// method. -// -// Example: -// -// #include -// #include -// -// halfFunction hsin (sin); -// -// halfFunction hsqrt (sqrt, // function -// 0, HALF_MAX, // domain -// half::qNan(), // sqrt(x) for x < 0 -// half::posInf(), // sqrt(+inf) -// half::qNan(), // sqrt(-inf) -// half::qNan()); // sqrt(nan) -// -// half x = hsin (1); -// half y = hsqrt (3.5); -// -//--------------------------------------------------------------------------- - -#ifndef _HALF_FUNCTION_H_ -#define _HALF_FUNCTION_H_ - -#include "half.h" - -#include "IlmBaseConfig.h" -#ifndef ILMBASE_HAVE_LARGE_STACK -#include // need this for memset -#else -#endif - -#include - - -template -class halfFunction -{ - public: - - //------------ - // Constructor - //------------ - - template - halfFunction (Function f, - half domainMin = -HALF_MAX, - half domainMax = HALF_MAX, - T defaultValue = 0, - T posInfValue = 0, - T negInfValue = 0, - T nanValue = 0); - -#ifndef ILMBASE_HAVE_LARGE_STACK - ~halfFunction () { delete [] _lut; } -#endif - - //----------- - // Evaluation - //----------- - - T operator () (half x) const; - - private: - -#ifdef ILMBASE_HAVE_LARGE_STACK - T _lut[1 << 16]; -#else - T * _lut; -#endif -}; - - -//--------------- -// Implementation -//--------------- - -template -template -halfFunction::halfFunction (Function f, - half domainMin, - half domainMax, - T defaultValue, - T posInfValue, - T negInfValue, - T nanValue) -{ -#ifndef ILMBASE_HAVE_LARGE_STACK - _lut = new T[1<<16]; - memset (_lut, 0 , (1<<16) * sizeof(T)); -#endif - - for (int i = 0; i < (1 << 16); i++) - { - half x; - x.setBits (i); - - if (x.isNan()) - _lut[i] = nanValue; - else if (x.isInfinity()) - _lut[i] = x.isNegative()? negInfValue: posInfValue; - else if (x < domainMin || x > domainMax) - _lut[i] = defaultValue; - else - _lut[i] = f (x); - } -} - - -template -inline T -halfFunction::operator () (half x) const -{ - return _lut[x.bits()]; -} - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/Half/halfLimits.h b/Dependencies/FreeImage/Source/OpenEXR/Half/halfLimits.h deleted file mode 100644 index 404f589..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Half/halfLimits.h +++ /dev/null @@ -1,102 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -// Primary authors: -// Florian Kainz -// Rod Bogart - - -#ifndef INCLUDED_HALF_LIMITS_H -#define INCLUDED_HALF_LIMITS_H - - -//------------------------------------------------------------------------ -// -// C++ standard library-style numeric_limits for class half -// -//------------------------------------------------------------------------ - -#include -#include "half.h" - -namespace std { - -template <> -class numeric_limits -{ - public: - - static const bool is_specialized = true; - - static half min () throw () {return HALF_NRM_MIN;} - static half max () throw () {return HALF_MAX;} - - static const int digits = HALF_MANT_DIG; - static const int digits10 = HALF_DIG; - static const bool is_signed = true; - static const bool is_integer = false; - static const bool is_exact = false; - static const int radix = HALF_RADIX; - static half epsilon () throw () {return HALF_EPSILON;} - static half round_error () throw () {return HALF_EPSILON / 2;} - - static const int min_exponent = HALF_MIN_EXP; - static const int min_exponent10 = HALF_MIN_10_EXP; - static const int max_exponent = HALF_MAX_EXP; - static const int max_exponent10 = HALF_MAX_10_EXP; - - static const bool has_infinity = true; - static const bool has_quiet_NaN = true; - static const bool has_signaling_NaN = true; - static const float_denorm_style has_denorm = denorm_present; - static const bool has_denorm_loss = false; - static half infinity () throw () {return half::posInf();} - static half quiet_NaN () throw () {return half::qNan();} - static half signaling_NaN () throw () {return half::sNan();} - static half denorm_min () throw () {return HALF_MIN;} - - static const bool is_iec559 = false; - static const bool is_bounded = false; - static const bool is_modulo = false; - - static const bool traps = true; - static const bool tinyness_before = false; - static const float_round_style round_style = round_to_nearest; -}; - - -} // namespace std - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/Half/toFloat.cpp b/Dependencies/FreeImage/Source/OpenEXR/Half/toFloat.cpp deleted file mode 100644 index 001bc51..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Half/toFloat.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - - -//--------------------------------------------------------------------------- -// -// toFloat -// -// A program to generate the lookup table for half-to-float -// conversion needed by class half. -// The program loops over all 65536 possible half numbers, -// converts each of them to a float, and prints the result. -// -//--------------------------------------------------------------------------- - - -#include -#include - -using namespace std; - -//--------------------------------------------------- -// Interpret an unsigned short bit pattern as a half, -// and convert that half to the corresponding float's -// bit pattern. -//--------------------------------------------------- - -unsigned int -halfToFloat (unsigned short y) -{ - - int s = (y >> 15) & 0x00000001; - int e = (y >> 10) & 0x0000001f; - int m = y & 0x000003ff; - - if (e == 0) - { - if (m == 0) - { - // - // Plus or minus zero - // - - return s << 31; - } - else - { - // - // Denormalized number -- renormalize it - // - - while (!(m & 0x00000400)) - { - m <<= 1; - e -= 1; - } - - e += 1; - m &= ~0x00000400; - } - } - else if (e == 31) - { - if (m == 0) - { - // - // Positive or negative infinity - // - - return (s << 31) | 0x7f800000; - } - else - { - // - // Nan -- preserve sign and significand bits - // - - return (s << 31) | 0x7f800000 | (m << 13); - } - } - - // - // Normalized number - // - - e = e + (127 - 15); - m = m << 13; - - // - // Assemble s, e and m. - // - - return (s << 31) | (e << 23) | m; -} - - -//--------------------------------------------- -// Main - prints the half-to-float lookup table -//--------------------------------------------- - -int -main () -{ - cout.precision (9); - cout.setf (ios_base::hex, ios_base::basefield); - - cout << "//\n" - "// This is an automatically generated file.\n" - "// Do not edit.\n" - "//\n\n"; - - cout << "{\n "; - - const int iMax = (1 << 16); - - for (int i = 0; i < iMax; i++) - { - cout << "{0x" << setfill ('0') << setw (8) << halfToFloat (i) << "}, "; - - if (i % 4 == 3) - { - cout << "\n"; - - if (i < iMax - 1) - cout << " "; - } - } - - cout << "};\n"; - return 0; -} diff --git a/Dependencies/FreeImage/Source/OpenEXR/Half/toFloat.h b/Dependencies/FreeImage/Source/OpenEXR/Half/toFloat.h deleted file mode 100644 index 37c9556..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Half/toFloat.h +++ /dev/null @@ -1,16391 +0,0 @@ -// -// This is an automatically generated file. -// Do not edit. -// - -{ - {0x00000000}, {0x33800000}, {0x34000000}, {0x34400000}, - {0x34800000}, {0x34a00000}, {0x34c00000}, {0x34e00000}, - {0x35000000}, {0x35100000}, {0x35200000}, {0x35300000}, - {0x35400000}, {0x35500000}, {0x35600000}, {0x35700000}, - {0x35800000}, {0x35880000}, {0x35900000}, {0x35980000}, - {0x35a00000}, {0x35a80000}, {0x35b00000}, {0x35b80000}, - {0x35c00000}, {0x35c80000}, {0x35d00000}, {0x35d80000}, - {0x35e00000}, {0x35e80000}, {0x35f00000}, {0x35f80000}, - {0x36000000}, {0x36040000}, {0x36080000}, {0x360c0000}, - {0x36100000}, {0x36140000}, {0x36180000}, {0x361c0000}, - {0x36200000}, {0x36240000}, {0x36280000}, {0x362c0000}, - {0x36300000}, {0x36340000}, {0x36380000}, {0x363c0000}, - {0x36400000}, {0x36440000}, {0x36480000}, {0x364c0000}, - {0x36500000}, {0x36540000}, {0x36580000}, {0x365c0000}, - {0x36600000}, {0x36640000}, {0x36680000}, {0x366c0000}, - {0x36700000}, {0x36740000}, {0x36780000}, {0x367c0000}, - {0x36800000}, {0x36820000}, {0x36840000}, {0x36860000}, - {0x36880000}, {0x368a0000}, {0x368c0000}, {0x368e0000}, - {0x36900000}, {0x36920000}, {0x36940000}, {0x36960000}, - {0x36980000}, {0x369a0000}, {0x369c0000}, {0x369e0000}, - {0x36a00000}, {0x36a20000}, {0x36a40000}, {0x36a60000}, - {0x36a80000}, {0x36aa0000}, {0x36ac0000}, {0x36ae0000}, - {0x36b00000}, {0x36b20000}, {0x36b40000}, {0x36b60000}, - {0x36b80000}, {0x36ba0000}, {0x36bc0000}, {0x36be0000}, - {0x36c00000}, {0x36c20000}, {0x36c40000}, {0x36c60000}, - {0x36c80000}, {0x36ca0000}, {0x36cc0000}, {0x36ce0000}, - {0x36d00000}, {0x36d20000}, {0x36d40000}, {0x36d60000}, - {0x36d80000}, {0x36da0000}, {0x36dc0000}, {0x36de0000}, - {0x36e00000}, {0x36e20000}, {0x36e40000}, {0x36e60000}, - {0x36e80000}, {0x36ea0000}, {0x36ec0000}, {0x36ee0000}, - {0x36f00000}, {0x36f20000}, {0x36f40000}, {0x36f60000}, - {0x36f80000}, {0x36fa0000}, {0x36fc0000}, {0x36fe0000}, - {0x37000000}, {0x37010000}, {0x37020000}, {0x37030000}, - {0x37040000}, {0x37050000}, {0x37060000}, {0x37070000}, - {0x37080000}, {0x37090000}, {0x370a0000}, {0x370b0000}, - {0x370c0000}, {0x370d0000}, {0x370e0000}, {0x370f0000}, - {0x37100000}, {0x37110000}, {0x37120000}, {0x37130000}, - {0x37140000}, {0x37150000}, {0x37160000}, {0x37170000}, - {0x37180000}, {0x37190000}, {0x371a0000}, {0x371b0000}, - {0x371c0000}, {0x371d0000}, {0x371e0000}, {0x371f0000}, - {0x37200000}, {0x37210000}, {0x37220000}, {0x37230000}, - {0x37240000}, {0x37250000}, {0x37260000}, {0x37270000}, - {0x37280000}, {0x37290000}, {0x372a0000}, {0x372b0000}, - {0x372c0000}, {0x372d0000}, {0x372e0000}, {0x372f0000}, - {0x37300000}, {0x37310000}, {0x37320000}, {0x37330000}, - {0x37340000}, {0x37350000}, {0x37360000}, {0x37370000}, - {0x37380000}, {0x37390000}, {0x373a0000}, {0x373b0000}, - {0x373c0000}, {0x373d0000}, {0x373e0000}, {0x373f0000}, - {0x37400000}, {0x37410000}, {0x37420000}, {0x37430000}, - {0x37440000}, {0x37450000}, {0x37460000}, {0x37470000}, - {0x37480000}, {0x37490000}, {0x374a0000}, {0x374b0000}, - {0x374c0000}, {0x374d0000}, {0x374e0000}, {0x374f0000}, - {0x37500000}, {0x37510000}, {0x37520000}, {0x37530000}, - {0x37540000}, {0x37550000}, {0x37560000}, {0x37570000}, - {0x37580000}, {0x37590000}, {0x375a0000}, {0x375b0000}, - {0x375c0000}, {0x375d0000}, {0x375e0000}, {0x375f0000}, - {0x37600000}, {0x37610000}, {0x37620000}, {0x37630000}, - {0x37640000}, {0x37650000}, {0x37660000}, {0x37670000}, - {0x37680000}, {0x37690000}, {0x376a0000}, {0x376b0000}, - {0x376c0000}, {0x376d0000}, {0x376e0000}, {0x376f0000}, - {0x37700000}, {0x37710000}, {0x37720000}, {0x37730000}, - {0x37740000}, {0x37750000}, {0x37760000}, {0x37770000}, - {0x37780000}, {0x37790000}, {0x377a0000}, {0x377b0000}, - {0x377c0000}, {0x377d0000}, {0x377e0000}, {0x377f0000}, - {0x37800000}, {0x37808000}, {0x37810000}, {0x37818000}, - {0x37820000}, {0x37828000}, {0x37830000}, {0x37838000}, - {0x37840000}, {0x37848000}, {0x37850000}, {0x37858000}, - {0x37860000}, {0x37868000}, {0x37870000}, {0x37878000}, - {0x37880000}, {0x37888000}, {0x37890000}, {0x37898000}, - {0x378a0000}, {0x378a8000}, {0x378b0000}, {0x378b8000}, - {0x378c0000}, {0x378c8000}, {0x378d0000}, {0x378d8000}, - {0x378e0000}, {0x378e8000}, {0x378f0000}, {0x378f8000}, - {0x37900000}, {0x37908000}, {0x37910000}, {0x37918000}, - {0x37920000}, {0x37928000}, {0x37930000}, {0x37938000}, - {0x37940000}, {0x37948000}, {0x37950000}, {0x37958000}, - {0x37960000}, {0x37968000}, {0x37970000}, {0x37978000}, - {0x37980000}, {0x37988000}, {0x37990000}, {0x37998000}, - {0x379a0000}, {0x379a8000}, {0x379b0000}, {0x379b8000}, - {0x379c0000}, {0x379c8000}, {0x379d0000}, {0x379d8000}, - {0x379e0000}, {0x379e8000}, {0x379f0000}, {0x379f8000}, - {0x37a00000}, {0x37a08000}, {0x37a10000}, {0x37a18000}, - {0x37a20000}, {0x37a28000}, {0x37a30000}, {0x37a38000}, - {0x37a40000}, {0x37a48000}, {0x37a50000}, {0x37a58000}, - {0x37a60000}, {0x37a68000}, {0x37a70000}, {0x37a78000}, - {0x37a80000}, {0x37a88000}, {0x37a90000}, {0x37a98000}, - {0x37aa0000}, {0x37aa8000}, {0x37ab0000}, {0x37ab8000}, - {0x37ac0000}, {0x37ac8000}, {0x37ad0000}, {0x37ad8000}, - {0x37ae0000}, {0x37ae8000}, {0x37af0000}, {0x37af8000}, - {0x37b00000}, {0x37b08000}, {0x37b10000}, {0x37b18000}, - {0x37b20000}, {0x37b28000}, {0x37b30000}, {0x37b38000}, - {0x37b40000}, {0x37b48000}, {0x37b50000}, {0x37b58000}, - {0x37b60000}, {0x37b68000}, {0x37b70000}, {0x37b78000}, - {0x37b80000}, {0x37b88000}, {0x37b90000}, {0x37b98000}, - {0x37ba0000}, {0x37ba8000}, {0x37bb0000}, {0x37bb8000}, - {0x37bc0000}, {0x37bc8000}, {0x37bd0000}, {0x37bd8000}, - {0x37be0000}, {0x37be8000}, {0x37bf0000}, {0x37bf8000}, - {0x37c00000}, {0x37c08000}, {0x37c10000}, {0x37c18000}, - {0x37c20000}, {0x37c28000}, {0x37c30000}, {0x37c38000}, - {0x37c40000}, {0x37c48000}, {0x37c50000}, {0x37c58000}, - {0x37c60000}, {0x37c68000}, {0x37c70000}, {0x37c78000}, - {0x37c80000}, {0x37c88000}, {0x37c90000}, {0x37c98000}, - {0x37ca0000}, {0x37ca8000}, {0x37cb0000}, {0x37cb8000}, - {0x37cc0000}, {0x37cc8000}, {0x37cd0000}, {0x37cd8000}, - {0x37ce0000}, {0x37ce8000}, {0x37cf0000}, {0x37cf8000}, - {0x37d00000}, {0x37d08000}, {0x37d10000}, {0x37d18000}, - {0x37d20000}, {0x37d28000}, {0x37d30000}, {0x37d38000}, - {0x37d40000}, {0x37d48000}, {0x37d50000}, {0x37d58000}, - {0x37d60000}, {0x37d68000}, {0x37d70000}, {0x37d78000}, - {0x37d80000}, {0x37d88000}, {0x37d90000}, {0x37d98000}, - {0x37da0000}, {0x37da8000}, {0x37db0000}, {0x37db8000}, - {0x37dc0000}, {0x37dc8000}, {0x37dd0000}, {0x37dd8000}, - {0x37de0000}, {0x37de8000}, {0x37df0000}, {0x37df8000}, - {0x37e00000}, {0x37e08000}, {0x37e10000}, {0x37e18000}, - {0x37e20000}, {0x37e28000}, {0x37e30000}, {0x37e38000}, - {0x37e40000}, {0x37e48000}, {0x37e50000}, {0x37e58000}, - {0x37e60000}, {0x37e68000}, {0x37e70000}, {0x37e78000}, - {0x37e80000}, {0x37e88000}, {0x37e90000}, {0x37e98000}, - {0x37ea0000}, {0x37ea8000}, {0x37eb0000}, {0x37eb8000}, - {0x37ec0000}, {0x37ec8000}, {0x37ed0000}, {0x37ed8000}, - {0x37ee0000}, {0x37ee8000}, {0x37ef0000}, {0x37ef8000}, - {0x37f00000}, {0x37f08000}, {0x37f10000}, {0x37f18000}, - {0x37f20000}, {0x37f28000}, {0x37f30000}, {0x37f38000}, - {0x37f40000}, {0x37f48000}, {0x37f50000}, {0x37f58000}, - {0x37f60000}, {0x37f68000}, {0x37f70000}, {0x37f78000}, - {0x37f80000}, {0x37f88000}, {0x37f90000}, {0x37f98000}, - {0x37fa0000}, {0x37fa8000}, {0x37fb0000}, {0x37fb8000}, - {0x37fc0000}, {0x37fc8000}, {0x37fd0000}, {0x37fd8000}, - {0x37fe0000}, {0x37fe8000}, {0x37ff0000}, {0x37ff8000}, - {0x38000000}, {0x38004000}, {0x38008000}, {0x3800c000}, - {0x38010000}, {0x38014000}, {0x38018000}, {0x3801c000}, - {0x38020000}, {0x38024000}, {0x38028000}, {0x3802c000}, - {0x38030000}, {0x38034000}, {0x38038000}, {0x3803c000}, - {0x38040000}, {0x38044000}, {0x38048000}, {0x3804c000}, - {0x38050000}, {0x38054000}, {0x38058000}, {0x3805c000}, - {0x38060000}, {0x38064000}, {0x38068000}, {0x3806c000}, - {0x38070000}, {0x38074000}, {0x38078000}, {0x3807c000}, - {0x38080000}, {0x38084000}, {0x38088000}, {0x3808c000}, - {0x38090000}, {0x38094000}, {0x38098000}, {0x3809c000}, - {0x380a0000}, {0x380a4000}, {0x380a8000}, {0x380ac000}, - {0x380b0000}, {0x380b4000}, {0x380b8000}, {0x380bc000}, - {0x380c0000}, {0x380c4000}, {0x380c8000}, {0x380cc000}, - {0x380d0000}, {0x380d4000}, {0x380d8000}, {0x380dc000}, - {0x380e0000}, {0x380e4000}, {0x380e8000}, {0x380ec000}, - {0x380f0000}, {0x380f4000}, {0x380f8000}, {0x380fc000}, - {0x38100000}, {0x38104000}, {0x38108000}, {0x3810c000}, - {0x38110000}, {0x38114000}, {0x38118000}, {0x3811c000}, - {0x38120000}, {0x38124000}, {0x38128000}, {0x3812c000}, - {0x38130000}, {0x38134000}, {0x38138000}, {0x3813c000}, - {0x38140000}, {0x38144000}, {0x38148000}, {0x3814c000}, - {0x38150000}, {0x38154000}, {0x38158000}, {0x3815c000}, - {0x38160000}, {0x38164000}, {0x38168000}, {0x3816c000}, - {0x38170000}, {0x38174000}, {0x38178000}, {0x3817c000}, - {0x38180000}, {0x38184000}, {0x38188000}, {0x3818c000}, - {0x38190000}, {0x38194000}, {0x38198000}, {0x3819c000}, - {0x381a0000}, {0x381a4000}, {0x381a8000}, {0x381ac000}, - {0x381b0000}, {0x381b4000}, {0x381b8000}, {0x381bc000}, - {0x381c0000}, {0x381c4000}, {0x381c8000}, {0x381cc000}, - {0x381d0000}, {0x381d4000}, {0x381d8000}, {0x381dc000}, - {0x381e0000}, {0x381e4000}, {0x381e8000}, {0x381ec000}, - {0x381f0000}, {0x381f4000}, {0x381f8000}, {0x381fc000}, - {0x38200000}, {0x38204000}, {0x38208000}, {0x3820c000}, - {0x38210000}, {0x38214000}, {0x38218000}, {0x3821c000}, - {0x38220000}, {0x38224000}, {0x38228000}, {0x3822c000}, - {0x38230000}, {0x38234000}, {0x38238000}, {0x3823c000}, - {0x38240000}, {0x38244000}, {0x38248000}, {0x3824c000}, - {0x38250000}, {0x38254000}, {0x38258000}, {0x3825c000}, - {0x38260000}, {0x38264000}, {0x38268000}, {0x3826c000}, - {0x38270000}, {0x38274000}, {0x38278000}, {0x3827c000}, - {0x38280000}, {0x38284000}, {0x38288000}, {0x3828c000}, - {0x38290000}, {0x38294000}, {0x38298000}, {0x3829c000}, - {0x382a0000}, {0x382a4000}, {0x382a8000}, {0x382ac000}, - {0x382b0000}, {0x382b4000}, {0x382b8000}, {0x382bc000}, - {0x382c0000}, {0x382c4000}, {0x382c8000}, {0x382cc000}, - {0x382d0000}, {0x382d4000}, {0x382d8000}, {0x382dc000}, - {0x382e0000}, {0x382e4000}, {0x382e8000}, {0x382ec000}, - {0x382f0000}, {0x382f4000}, {0x382f8000}, {0x382fc000}, - {0x38300000}, {0x38304000}, {0x38308000}, {0x3830c000}, - {0x38310000}, {0x38314000}, {0x38318000}, {0x3831c000}, - {0x38320000}, {0x38324000}, {0x38328000}, {0x3832c000}, - {0x38330000}, {0x38334000}, {0x38338000}, {0x3833c000}, - {0x38340000}, {0x38344000}, {0x38348000}, {0x3834c000}, - {0x38350000}, {0x38354000}, {0x38358000}, {0x3835c000}, - {0x38360000}, {0x38364000}, {0x38368000}, {0x3836c000}, - {0x38370000}, {0x38374000}, {0x38378000}, {0x3837c000}, - {0x38380000}, {0x38384000}, {0x38388000}, {0x3838c000}, - {0x38390000}, {0x38394000}, {0x38398000}, {0x3839c000}, - {0x383a0000}, {0x383a4000}, {0x383a8000}, {0x383ac000}, - {0x383b0000}, {0x383b4000}, {0x383b8000}, {0x383bc000}, - {0x383c0000}, {0x383c4000}, {0x383c8000}, {0x383cc000}, - {0x383d0000}, {0x383d4000}, {0x383d8000}, {0x383dc000}, - {0x383e0000}, {0x383e4000}, {0x383e8000}, {0x383ec000}, - {0x383f0000}, {0x383f4000}, {0x383f8000}, {0x383fc000}, - {0x38400000}, {0x38404000}, {0x38408000}, {0x3840c000}, - {0x38410000}, {0x38414000}, {0x38418000}, {0x3841c000}, - {0x38420000}, {0x38424000}, {0x38428000}, {0x3842c000}, - {0x38430000}, {0x38434000}, {0x38438000}, {0x3843c000}, - {0x38440000}, {0x38444000}, {0x38448000}, {0x3844c000}, - {0x38450000}, {0x38454000}, {0x38458000}, {0x3845c000}, - {0x38460000}, {0x38464000}, {0x38468000}, {0x3846c000}, - {0x38470000}, {0x38474000}, {0x38478000}, {0x3847c000}, - {0x38480000}, {0x38484000}, {0x38488000}, {0x3848c000}, - {0x38490000}, {0x38494000}, {0x38498000}, {0x3849c000}, - {0x384a0000}, {0x384a4000}, {0x384a8000}, {0x384ac000}, - {0x384b0000}, {0x384b4000}, {0x384b8000}, {0x384bc000}, - {0x384c0000}, {0x384c4000}, {0x384c8000}, {0x384cc000}, - {0x384d0000}, {0x384d4000}, {0x384d8000}, {0x384dc000}, - {0x384e0000}, {0x384e4000}, {0x384e8000}, {0x384ec000}, - {0x384f0000}, {0x384f4000}, {0x384f8000}, {0x384fc000}, - {0x38500000}, {0x38504000}, {0x38508000}, {0x3850c000}, - {0x38510000}, {0x38514000}, {0x38518000}, {0x3851c000}, - {0x38520000}, {0x38524000}, {0x38528000}, {0x3852c000}, - {0x38530000}, {0x38534000}, {0x38538000}, {0x3853c000}, - {0x38540000}, {0x38544000}, {0x38548000}, {0x3854c000}, - {0x38550000}, {0x38554000}, {0x38558000}, {0x3855c000}, - {0x38560000}, {0x38564000}, {0x38568000}, {0x3856c000}, - {0x38570000}, {0x38574000}, {0x38578000}, {0x3857c000}, - {0x38580000}, {0x38584000}, {0x38588000}, {0x3858c000}, - {0x38590000}, {0x38594000}, {0x38598000}, {0x3859c000}, - {0x385a0000}, {0x385a4000}, {0x385a8000}, {0x385ac000}, - {0x385b0000}, {0x385b4000}, {0x385b8000}, {0x385bc000}, - {0x385c0000}, {0x385c4000}, {0x385c8000}, {0x385cc000}, - {0x385d0000}, {0x385d4000}, {0x385d8000}, {0x385dc000}, - {0x385e0000}, {0x385e4000}, {0x385e8000}, {0x385ec000}, - {0x385f0000}, {0x385f4000}, {0x385f8000}, {0x385fc000}, - {0x38600000}, {0x38604000}, {0x38608000}, {0x3860c000}, - {0x38610000}, {0x38614000}, {0x38618000}, {0x3861c000}, - {0x38620000}, {0x38624000}, {0x38628000}, {0x3862c000}, - {0x38630000}, {0x38634000}, {0x38638000}, {0x3863c000}, - {0x38640000}, {0x38644000}, {0x38648000}, {0x3864c000}, - {0x38650000}, {0x38654000}, {0x38658000}, {0x3865c000}, - {0x38660000}, {0x38664000}, {0x38668000}, {0x3866c000}, - {0x38670000}, {0x38674000}, {0x38678000}, {0x3867c000}, - {0x38680000}, {0x38684000}, {0x38688000}, {0x3868c000}, - {0x38690000}, {0x38694000}, {0x38698000}, {0x3869c000}, - {0x386a0000}, {0x386a4000}, {0x386a8000}, {0x386ac000}, - {0x386b0000}, {0x386b4000}, {0x386b8000}, {0x386bc000}, - {0x386c0000}, {0x386c4000}, {0x386c8000}, {0x386cc000}, - {0x386d0000}, {0x386d4000}, {0x386d8000}, {0x386dc000}, - {0x386e0000}, {0x386e4000}, {0x386e8000}, {0x386ec000}, - {0x386f0000}, {0x386f4000}, {0x386f8000}, {0x386fc000}, - {0x38700000}, {0x38704000}, {0x38708000}, {0x3870c000}, - {0x38710000}, {0x38714000}, {0x38718000}, {0x3871c000}, - {0x38720000}, {0x38724000}, {0x38728000}, {0x3872c000}, - {0x38730000}, {0x38734000}, {0x38738000}, {0x3873c000}, - {0x38740000}, {0x38744000}, {0x38748000}, {0x3874c000}, - {0x38750000}, {0x38754000}, {0x38758000}, {0x3875c000}, - {0x38760000}, {0x38764000}, {0x38768000}, {0x3876c000}, - {0x38770000}, {0x38774000}, {0x38778000}, {0x3877c000}, - {0x38780000}, {0x38784000}, {0x38788000}, {0x3878c000}, - {0x38790000}, {0x38794000}, {0x38798000}, {0x3879c000}, - {0x387a0000}, {0x387a4000}, {0x387a8000}, {0x387ac000}, - {0x387b0000}, {0x387b4000}, {0x387b8000}, {0x387bc000}, - {0x387c0000}, {0x387c4000}, {0x387c8000}, {0x387cc000}, - {0x387d0000}, {0x387d4000}, {0x387d8000}, {0x387dc000}, - {0x387e0000}, {0x387e4000}, {0x387e8000}, {0x387ec000}, - {0x387f0000}, {0x387f4000}, {0x387f8000}, {0x387fc000}, - {0x38800000}, {0x38802000}, {0x38804000}, {0x38806000}, - {0x38808000}, {0x3880a000}, {0x3880c000}, {0x3880e000}, - {0x38810000}, {0x38812000}, {0x38814000}, {0x38816000}, - {0x38818000}, {0x3881a000}, {0x3881c000}, {0x3881e000}, - {0x38820000}, {0x38822000}, {0x38824000}, {0x38826000}, - {0x38828000}, {0x3882a000}, {0x3882c000}, {0x3882e000}, - {0x38830000}, {0x38832000}, {0x38834000}, {0x38836000}, - {0x38838000}, {0x3883a000}, {0x3883c000}, {0x3883e000}, - {0x38840000}, {0x38842000}, {0x38844000}, {0x38846000}, - {0x38848000}, {0x3884a000}, {0x3884c000}, {0x3884e000}, - {0x38850000}, {0x38852000}, {0x38854000}, {0x38856000}, - {0x38858000}, {0x3885a000}, {0x3885c000}, {0x3885e000}, - {0x38860000}, {0x38862000}, {0x38864000}, {0x38866000}, - {0x38868000}, {0x3886a000}, {0x3886c000}, {0x3886e000}, - {0x38870000}, {0x38872000}, {0x38874000}, {0x38876000}, - {0x38878000}, {0x3887a000}, {0x3887c000}, {0x3887e000}, - {0x38880000}, {0x38882000}, {0x38884000}, {0x38886000}, - {0x38888000}, {0x3888a000}, {0x3888c000}, {0x3888e000}, - {0x38890000}, {0x38892000}, {0x38894000}, {0x38896000}, - {0x38898000}, {0x3889a000}, {0x3889c000}, {0x3889e000}, - {0x388a0000}, {0x388a2000}, {0x388a4000}, {0x388a6000}, - {0x388a8000}, {0x388aa000}, {0x388ac000}, {0x388ae000}, - {0x388b0000}, {0x388b2000}, {0x388b4000}, {0x388b6000}, - {0x388b8000}, {0x388ba000}, {0x388bc000}, {0x388be000}, - {0x388c0000}, {0x388c2000}, {0x388c4000}, {0x388c6000}, - {0x388c8000}, {0x388ca000}, {0x388cc000}, {0x388ce000}, - {0x388d0000}, {0x388d2000}, {0x388d4000}, {0x388d6000}, - {0x388d8000}, {0x388da000}, {0x388dc000}, {0x388de000}, - {0x388e0000}, {0x388e2000}, {0x388e4000}, {0x388e6000}, - {0x388e8000}, {0x388ea000}, {0x388ec000}, {0x388ee000}, - {0x388f0000}, {0x388f2000}, {0x388f4000}, {0x388f6000}, - {0x388f8000}, {0x388fa000}, {0x388fc000}, {0x388fe000}, - {0x38900000}, {0x38902000}, {0x38904000}, {0x38906000}, - {0x38908000}, {0x3890a000}, {0x3890c000}, {0x3890e000}, - {0x38910000}, {0x38912000}, {0x38914000}, {0x38916000}, - {0x38918000}, {0x3891a000}, {0x3891c000}, {0x3891e000}, - {0x38920000}, {0x38922000}, {0x38924000}, {0x38926000}, - {0x38928000}, {0x3892a000}, {0x3892c000}, {0x3892e000}, - {0x38930000}, {0x38932000}, {0x38934000}, {0x38936000}, - {0x38938000}, {0x3893a000}, {0x3893c000}, {0x3893e000}, - {0x38940000}, {0x38942000}, {0x38944000}, {0x38946000}, - {0x38948000}, {0x3894a000}, {0x3894c000}, {0x3894e000}, - {0x38950000}, {0x38952000}, {0x38954000}, {0x38956000}, - {0x38958000}, {0x3895a000}, {0x3895c000}, {0x3895e000}, - {0x38960000}, {0x38962000}, {0x38964000}, {0x38966000}, - {0x38968000}, {0x3896a000}, {0x3896c000}, {0x3896e000}, - {0x38970000}, {0x38972000}, {0x38974000}, {0x38976000}, - {0x38978000}, {0x3897a000}, {0x3897c000}, {0x3897e000}, - {0x38980000}, {0x38982000}, {0x38984000}, {0x38986000}, - {0x38988000}, {0x3898a000}, {0x3898c000}, {0x3898e000}, - {0x38990000}, {0x38992000}, {0x38994000}, {0x38996000}, - {0x38998000}, {0x3899a000}, {0x3899c000}, {0x3899e000}, - {0x389a0000}, {0x389a2000}, {0x389a4000}, {0x389a6000}, - {0x389a8000}, {0x389aa000}, {0x389ac000}, {0x389ae000}, - {0x389b0000}, {0x389b2000}, {0x389b4000}, {0x389b6000}, - {0x389b8000}, {0x389ba000}, {0x389bc000}, {0x389be000}, - {0x389c0000}, {0x389c2000}, {0x389c4000}, {0x389c6000}, - {0x389c8000}, {0x389ca000}, {0x389cc000}, {0x389ce000}, - {0x389d0000}, {0x389d2000}, {0x389d4000}, {0x389d6000}, - {0x389d8000}, {0x389da000}, {0x389dc000}, {0x389de000}, - {0x389e0000}, {0x389e2000}, {0x389e4000}, {0x389e6000}, - {0x389e8000}, {0x389ea000}, {0x389ec000}, {0x389ee000}, - {0x389f0000}, {0x389f2000}, {0x389f4000}, {0x389f6000}, - {0x389f8000}, {0x389fa000}, {0x389fc000}, {0x389fe000}, - {0x38a00000}, {0x38a02000}, {0x38a04000}, {0x38a06000}, - {0x38a08000}, {0x38a0a000}, {0x38a0c000}, {0x38a0e000}, - {0x38a10000}, {0x38a12000}, {0x38a14000}, {0x38a16000}, - {0x38a18000}, {0x38a1a000}, {0x38a1c000}, {0x38a1e000}, - {0x38a20000}, {0x38a22000}, {0x38a24000}, {0x38a26000}, - {0x38a28000}, {0x38a2a000}, {0x38a2c000}, {0x38a2e000}, - {0x38a30000}, {0x38a32000}, {0x38a34000}, {0x38a36000}, - {0x38a38000}, {0x38a3a000}, {0x38a3c000}, {0x38a3e000}, - {0x38a40000}, {0x38a42000}, {0x38a44000}, {0x38a46000}, - {0x38a48000}, {0x38a4a000}, {0x38a4c000}, {0x38a4e000}, - {0x38a50000}, {0x38a52000}, {0x38a54000}, {0x38a56000}, - {0x38a58000}, {0x38a5a000}, {0x38a5c000}, {0x38a5e000}, - {0x38a60000}, {0x38a62000}, {0x38a64000}, {0x38a66000}, - {0x38a68000}, {0x38a6a000}, {0x38a6c000}, {0x38a6e000}, - {0x38a70000}, {0x38a72000}, {0x38a74000}, {0x38a76000}, - {0x38a78000}, {0x38a7a000}, {0x38a7c000}, {0x38a7e000}, - {0x38a80000}, {0x38a82000}, {0x38a84000}, {0x38a86000}, - {0x38a88000}, {0x38a8a000}, {0x38a8c000}, {0x38a8e000}, - {0x38a90000}, {0x38a92000}, {0x38a94000}, {0x38a96000}, - {0x38a98000}, {0x38a9a000}, {0x38a9c000}, {0x38a9e000}, - {0x38aa0000}, {0x38aa2000}, {0x38aa4000}, {0x38aa6000}, - {0x38aa8000}, {0x38aaa000}, {0x38aac000}, {0x38aae000}, - {0x38ab0000}, {0x38ab2000}, {0x38ab4000}, {0x38ab6000}, - {0x38ab8000}, {0x38aba000}, {0x38abc000}, {0x38abe000}, - {0x38ac0000}, {0x38ac2000}, {0x38ac4000}, {0x38ac6000}, - {0x38ac8000}, {0x38aca000}, {0x38acc000}, {0x38ace000}, - {0x38ad0000}, {0x38ad2000}, {0x38ad4000}, {0x38ad6000}, - {0x38ad8000}, {0x38ada000}, {0x38adc000}, {0x38ade000}, - {0x38ae0000}, {0x38ae2000}, {0x38ae4000}, {0x38ae6000}, - {0x38ae8000}, {0x38aea000}, {0x38aec000}, {0x38aee000}, - {0x38af0000}, {0x38af2000}, {0x38af4000}, {0x38af6000}, - {0x38af8000}, {0x38afa000}, {0x38afc000}, {0x38afe000}, - {0x38b00000}, {0x38b02000}, {0x38b04000}, {0x38b06000}, - {0x38b08000}, {0x38b0a000}, {0x38b0c000}, {0x38b0e000}, - {0x38b10000}, {0x38b12000}, {0x38b14000}, {0x38b16000}, - {0x38b18000}, {0x38b1a000}, {0x38b1c000}, {0x38b1e000}, - {0x38b20000}, {0x38b22000}, {0x38b24000}, {0x38b26000}, - {0x38b28000}, {0x38b2a000}, {0x38b2c000}, {0x38b2e000}, - {0x38b30000}, {0x38b32000}, {0x38b34000}, {0x38b36000}, - {0x38b38000}, {0x38b3a000}, {0x38b3c000}, {0x38b3e000}, - {0x38b40000}, {0x38b42000}, {0x38b44000}, {0x38b46000}, - {0x38b48000}, {0x38b4a000}, {0x38b4c000}, {0x38b4e000}, - {0x38b50000}, {0x38b52000}, {0x38b54000}, {0x38b56000}, - {0x38b58000}, {0x38b5a000}, {0x38b5c000}, {0x38b5e000}, - {0x38b60000}, {0x38b62000}, {0x38b64000}, {0x38b66000}, - {0x38b68000}, {0x38b6a000}, {0x38b6c000}, {0x38b6e000}, - {0x38b70000}, {0x38b72000}, {0x38b74000}, {0x38b76000}, - {0x38b78000}, {0x38b7a000}, {0x38b7c000}, {0x38b7e000}, - {0x38b80000}, {0x38b82000}, {0x38b84000}, {0x38b86000}, - {0x38b88000}, {0x38b8a000}, {0x38b8c000}, {0x38b8e000}, - {0x38b90000}, {0x38b92000}, {0x38b94000}, {0x38b96000}, - {0x38b98000}, {0x38b9a000}, {0x38b9c000}, {0x38b9e000}, - {0x38ba0000}, {0x38ba2000}, {0x38ba4000}, {0x38ba6000}, - {0x38ba8000}, {0x38baa000}, {0x38bac000}, {0x38bae000}, - {0x38bb0000}, {0x38bb2000}, {0x38bb4000}, {0x38bb6000}, - {0x38bb8000}, {0x38bba000}, {0x38bbc000}, {0x38bbe000}, - {0x38bc0000}, {0x38bc2000}, {0x38bc4000}, {0x38bc6000}, - {0x38bc8000}, {0x38bca000}, {0x38bcc000}, {0x38bce000}, - {0x38bd0000}, {0x38bd2000}, {0x38bd4000}, {0x38bd6000}, - {0x38bd8000}, {0x38bda000}, {0x38bdc000}, {0x38bde000}, - {0x38be0000}, {0x38be2000}, {0x38be4000}, {0x38be6000}, - {0x38be8000}, {0x38bea000}, {0x38bec000}, {0x38bee000}, - {0x38bf0000}, {0x38bf2000}, {0x38bf4000}, {0x38bf6000}, - {0x38bf8000}, {0x38bfa000}, {0x38bfc000}, {0x38bfe000}, - {0x38c00000}, {0x38c02000}, {0x38c04000}, {0x38c06000}, - {0x38c08000}, {0x38c0a000}, {0x38c0c000}, {0x38c0e000}, - {0x38c10000}, {0x38c12000}, {0x38c14000}, {0x38c16000}, - {0x38c18000}, {0x38c1a000}, {0x38c1c000}, {0x38c1e000}, - {0x38c20000}, {0x38c22000}, {0x38c24000}, {0x38c26000}, - {0x38c28000}, {0x38c2a000}, {0x38c2c000}, {0x38c2e000}, - {0x38c30000}, {0x38c32000}, {0x38c34000}, {0x38c36000}, - {0x38c38000}, {0x38c3a000}, {0x38c3c000}, {0x38c3e000}, - {0x38c40000}, {0x38c42000}, {0x38c44000}, {0x38c46000}, - {0x38c48000}, {0x38c4a000}, {0x38c4c000}, {0x38c4e000}, - {0x38c50000}, {0x38c52000}, {0x38c54000}, {0x38c56000}, - {0x38c58000}, {0x38c5a000}, {0x38c5c000}, {0x38c5e000}, - {0x38c60000}, {0x38c62000}, {0x38c64000}, {0x38c66000}, - {0x38c68000}, {0x38c6a000}, {0x38c6c000}, {0x38c6e000}, - {0x38c70000}, {0x38c72000}, {0x38c74000}, {0x38c76000}, - {0x38c78000}, {0x38c7a000}, {0x38c7c000}, {0x38c7e000}, - {0x38c80000}, {0x38c82000}, {0x38c84000}, {0x38c86000}, - {0x38c88000}, {0x38c8a000}, {0x38c8c000}, {0x38c8e000}, - {0x38c90000}, {0x38c92000}, {0x38c94000}, {0x38c96000}, - {0x38c98000}, {0x38c9a000}, {0x38c9c000}, {0x38c9e000}, - {0x38ca0000}, {0x38ca2000}, {0x38ca4000}, {0x38ca6000}, - {0x38ca8000}, {0x38caa000}, {0x38cac000}, {0x38cae000}, - {0x38cb0000}, {0x38cb2000}, {0x38cb4000}, {0x38cb6000}, - {0x38cb8000}, {0x38cba000}, {0x38cbc000}, {0x38cbe000}, - {0x38cc0000}, {0x38cc2000}, {0x38cc4000}, {0x38cc6000}, - {0x38cc8000}, {0x38cca000}, {0x38ccc000}, {0x38cce000}, - {0x38cd0000}, {0x38cd2000}, {0x38cd4000}, {0x38cd6000}, - {0x38cd8000}, {0x38cda000}, {0x38cdc000}, {0x38cde000}, - {0x38ce0000}, {0x38ce2000}, {0x38ce4000}, {0x38ce6000}, - {0x38ce8000}, {0x38cea000}, {0x38cec000}, {0x38cee000}, - {0x38cf0000}, {0x38cf2000}, {0x38cf4000}, {0x38cf6000}, - {0x38cf8000}, {0x38cfa000}, {0x38cfc000}, {0x38cfe000}, - {0x38d00000}, {0x38d02000}, {0x38d04000}, {0x38d06000}, - {0x38d08000}, {0x38d0a000}, {0x38d0c000}, {0x38d0e000}, - {0x38d10000}, {0x38d12000}, {0x38d14000}, {0x38d16000}, - {0x38d18000}, {0x38d1a000}, {0x38d1c000}, {0x38d1e000}, - {0x38d20000}, {0x38d22000}, {0x38d24000}, {0x38d26000}, - {0x38d28000}, {0x38d2a000}, {0x38d2c000}, {0x38d2e000}, - {0x38d30000}, {0x38d32000}, {0x38d34000}, {0x38d36000}, - {0x38d38000}, {0x38d3a000}, {0x38d3c000}, {0x38d3e000}, - {0x38d40000}, {0x38d42000}, {0x38d44000}, {0x38d46000}, - {0x38d48000}, {0x38d4a000}, {0x38d4c000}, {0x38d4e000}, - {0x38d50000}, {0x38d52000}, {0x38d54000}, {0x38d56000}, - {0x38d58000}, {0x38d5a000}, {0x38d5c000}, {0x38d5e000}, - {0x38d60000}, {0x38d62000}, {0x38d64000}, {0x38d66000}, - {0x38d68000}, {0x38d6a000}, {0x38d6c000}, {0x38d6e000}, - {0x38d70000}, {0x38d72000}, {0x38d74000}, {0x38d76000}, - {0x38d78000}, {0x38d7a000}, {0x38d7c000}, {0x38d7e000}, - {0x38d80000}, {0x38d82000}, {0x38d84000}, {0x38d86000}, - {0x38d88000}, {0x38d8a000}, {0x38d8c000}, {0x38d8e000}, - {0x38d90000}, {0x38d92000}, {0x38d94000}, {0x38d96000}, - {0x38d98000}, {0x38d9a000}, {0x38d9c000}, {0x38d9e000}, - {0x38da0000}, {0x38da2000}, {0x38da4000}, {0x38da6000}, - {0x38da8000}, {0x38daa000}, {0x38dac000}, {0x38dae000}, - {0x38db0000}, {0x38db2000}, {0x38db4000}, {0x38db6000}, - {0x38db8000}, {0x38dba000}, {0x38dbc000}, {0x38dbe000}, - {0x38dc0000}, {0x38dc2000}, {0x38dc4000}, {0x38dc6000}, - {0x38dc8000}, {0x38dca000}, {0x38dcc000}, {0x38dce000}, - {0x38dd0000}, {0x38dd2000}, {0x38dd4000}, {0x38dd6000}, - {0x38dd8000}, {0x38dda000}, {0x38ddc000}, {0x38dde000}, - {0x38de0000}, {0x38de2000}, {0x38de4000}, {0x38de6000}, - {0x38de8000}, {0x38dea000}, {0x38dec000}, {0x38dee000}, - {0x38df0000}, {0x38df2000}, {0x38df4000}, {0x38df6000}, - {0x38df8000}, {0x38dfa000}, {0x38dfc000}, {0x38dfe000}, - {0x38e00000}, {0x38e02000}, {0x38e04000}, {0x38e06000}, - {0x38e08000}, {0x38e0a000}, {0x38e0c000}, {0x38e0e000}, - {0x38e10000}, {0x38e12000}, {0x38e14000}, {0x38e16000}, - {0x38e18000}, {0x38e1a000}, {0x38e1c000}, {0x38e1e000}, - {0x38e20000}, {0x38e22000}, {0x38e24000}, {0x38e26000}, - {0x38e28000}, {0x38e2a000}, {0x38e2c000}, {0x38e2e000}, - {0x38e30000}, {0x38e32000}, {0x38e34000}, {0x38e36000}, - {0x38e38000}, {0x38e3a000}, {0x38e3c000}, {0x38e3e000}, - {0x38e40000}, {0x38e42000}, {0x38e44000}, {0x38e46000}, - {0x38e48000}, {0x38e4a000}, {0x38e4c000}, {0x38e4e000}, - {0x38e50000}, {0x38e52000}, {0x38e54000}, {0x38e56000}, - {0x38e58000}, {0x38e5a000}, {0x38e5c000}, {0x38e5e000}, - {0x38e60000}, {0x38e62000}, {0x38e64000}, {0x38e66000}, - {0x38e68000}, {0x38e6a000}, {0x38e6c000}, {0x38e6e000}, - {0x38e70000}, {0x38e72000}, {0x38e74000}, {0x38e76000}, - {0x38e78000}, {0x38e7a000}, {0x38e7c000}, {0x38e7e000}, - {0x38e80000}, {0x38e82000}, {0x38e84000}, {0x38e86000}, - {0x38e88000}, {0x38e8a000}, {0x38e8c000}, {0x38e8e000}, - {0x38e90000}, {0x38e92000}, {0x38e94000}, {0x38e96000}, - {0x38e98000}, {0x38e9a000}, {0x38e9c000}, {0x38e9e000}, - {0x38ea0000}, {0x38ea2000}, {0x38ea4000}, {0x38ea6000}, - {0x38ea8000}, {0x38eaa000}, {0x38eac000}, {0x38eae000}, - {0x38eb0000}, {0x38eb2000}, {0x38eb4000}, {0x38eb6000}, - {0x38eb8000}, {0x38eba000}, {0x38ebc000}, {0x38ebe000}, - {0x38ec0000}, {0x38ec2000}, {0x38ec4000}, {0x38ec6000}, - {0x38ec8000}, {0x38eca000}, {0x38ecc000}, {0x38ece000}, - {0x38ed0000}, {0x38ed2000}, {0x38ed4000}, {0x38ed6000}, - {0x38ed8000}, {0x38eda000}, {0x38edc000}, {0x38ede000}, - {0x38ee0000}, {0x38ee2000}, {0x38ee4000}, {0x38ee6000}, - {0x38ee8000}, {0x38eea000}, {0x38eec000}, {0x38eee000}, - {0x38ef0000}, {0x38ef2000}, {0x38ef4000}, {0x38ef6000}, - {0x38ef8000}, {0x38efa000}, {0x38efc000}, {0x38efe000}, - {0x38f00000}, {0x38f02000}, {0x38f04000}, {0x38f06000}, - {0x38f08000}, {0x38f0a000}, {0x38f0c000}, {0x38f0e000}, - {0x38f10000}, {0x38f12000}, {0x38f14000}, {0x38f16000}, - {0x38f18000}, {0x38f1a000}, {0x38f1c000}, {0x38f1e000}, - {0x38f20000}, {0x38f22000}, {0x38f24000}, {0x38f26000}, - {0x38f28000}, {0x38f2a000}, {0x38f2c000}, {0x38f2e000}, - {0x38f30000}, {0x38f32000}, {0x38f34000}, {0x38f36000}, - {0x38f38000}, {0x38f3a000}, {0x38f3c000}, {0x38f3e000}, - {0x38f40000}, {0x38f42000}, {0x38f44000}, {0x38f46000}, - {0x38f48000}, {0x38f4a000}, {0x38f4c000}, {0x38f4e000}, - {0x38f50000}, {0x38f52000}, {0x38f54000}, {0x38f56000}, - {0x38f58000}, {0x38f5a000}, {0x38f5c000}, {0x38f5e000}, - {0x38f60000}, {0x38f62000}, {0x38f64000}, {0x38f66000}, - {0x38f68000}, {0x38f6a000}, {0x38f6c000}, {0x38f6e000}, - {0x38f70000}, {0x38f72000}, {0x38f74000}, {0x38f76000}, - {0x38f78000}, {0x38f7a000}, {0x38f7c000}, {0x38f7e000}, - {0x38f80000}, {0x38f82000}, {0x38f84000}, {0x38f86000}, - {0x38f88000}, {0x38f8a000}, {0x38f8c000}, {0x38f8e000}, - {0x38f90000}, {0x38f92000}, {0x38f94000}, {0x38f96000}, - {0x38f98000}, {0x38f9a000}, {0x38f9c000}, {0x38f9e000}, - {0x38fa0000}, {0x38fa2000}, {0x38fa4000}, {0x38fa6000}, - {0x38fa8000}, {0x38faa000}, {0x38fac000}, {0x38fae000}, - {0x38fb0000}, {0x38fb2000}, {0x38fb4000}, {0x38fb6000}, - {0x38fb8000}, {0x38fba000}, {0x38fbc000}, {0x38fbe000}, - {0x38fc0000}, {0x38fc2000}, {0x38fc4000}, {0x38fc6000}, - {0x38fc8000}, {0x38fca000}, {0x38fcc000}, {0x38fce000}, - {0x38fd0000}, {0x38fd2000}, {0x38fd4000}, {0x38fd6000}, - {0x38fd8000}, {0x38fda000}, {0x38fdc000}, {0x38fde000}, - {0x38fe0000}, {0x38fe2000}, {0x38fe4000}, {0x38fe6000}, - {0x38fe8000}, {0x38fea000}, {0x38fec000}, {0x38fee000}, - {0x38ff0000}, {0x38ff2000}, {0x38ff4000}, {0x38ff6000}, - {0x38ff8000}, {0x38ffa000}, {0x38ffc000}, {0x38ffe000}, - {0x39000000}, {0x39002000}, {0x39004000}, {0x39006000}, - {0x39008000}, {0x3900a000}, {0x3900c000}, {0x3900e000}, - {0x39010000}, {0x39012000}, {0x39014000}, {0x39016000}, - {0x39018000}, {0x3901a000}, {0x3901c000}, {0x3901e000}, - {0x39020000}, {0x39022000}, {0x39024000}, {0x39026000}, - {0x39028000}, {0x3902a000}, {0x3902c000}, {0x3902e000}, - {0x39030000}, {0x39032000}, {0x39034000}, {0x39036000}, - {0x39038000}, {0x3903a000}, {0x3903c000}, {0x3903e000}, - {0x39040000}, {0x39042000}, {0x39044000}, {0x39046000}, - {0x39048000}, {0x3904a000}, {0x3904c000}, {0x3904e000}, - {0x39050000}, {0x39052000}, {0x39054000}, {0x39056000}, - {0x39058000}, {0x3905a000}, {0x3905c000}, {0x3905e000}, - {0x39060000}, {0x39062000}, {0x39064000}, {0x39066000}, - {0x39068000}, {0x3906a000}, {0x3906c000}, {0x3906e000}, - {0x39070000}, {0x39072000}, {0x39074000}, {0x39076000}, - {0x39078000}, {0x3907a000}, {0x3907c000}, {0x3907e000}, - {0x39080000}, {0x39082000}, {0x39084000}, {0x39086000}, - {0x39088000}, {0x3908a000}, {0x3908c000}, {0x3908e000}, - {0x39090000}, {0x39092000}, {0x39094000}, {0x39096000}, - {0x39098000}, {0x3909a000}, {0x3909c000}, {0x3909e000}, - {0x390a0000}, {0x390a2000}, {0x390a4000}, {0x390a6000}, - {0x390a8000}, {0x390aa000}, {0x390ac000}, {0x390ae000}, - {0x390b0000}, {0x390b2000}, {0x390b4000}, {0x390b6000}, - {0x390b8000}, {0x390ba000}, {0x390bc000}, {0x390be000}, - {0x390c0000}, {0x390c2000}, {0x390c4000}, {0x390c6000}, - {0x390c8000}, {0x390ca000}, {0x390cc000}, {0x390ce000}, - {0x390d0000}, {0x390d2000}, {0x390d4000}, {0x390d6000}, - {0x390d8000}, {0x390da000}, {0x390dc000}, {0x390de000}, - {0x390e0000}, {0x390e2000}, {0x390e4000}, {0x390e6000}, - {0x390e8000}, {0x390ea000}, {0x390ec000}, {0x390ee000}, - {0x390f0000}, {0x390f2000}, {0x390f4000}, {0x390f6000}, - {0x390f8000}, {0x390fa000}, {0x390fc000}, {0x390fe000}, - {0x39100000}, {0x39102000}, {0x39104000}, {0x39106000}, - {0x39108000}, {0x3910a000}, {0x3910c000}, {0x3910e000}, - {0x39110000}, {0x39112000}, {0x39114000}, {0x39116000}, - {0x39118000}, {0x3911a000}, {0x3911c000}, {0x3911e000}, - {0x39120000}, {0x39122000}, {0x39124000}, {0x39126000}, - {0x39128000}, {0x3912a000}, {0x3912c000}, {0x3912e000}, - {0x39130000}, {0x39132000}, {0x39134000}, {0x39136000}, - {0x39138000}, {0x3913a000}, {0x3913c000}, {0x3913e000}, - {0x39140000}, {0x39142000}, {0x39144000}, {0x39146000}, - {0x39148000}, {0x3914a000}, {0x3914c000}, {0x3914e000}, - {0x39150000}, {0x39152000}, {0x39154000}, {0x39156000}, - {0x39158000}, {0x3915a000}, {0x3915c000}, {0x3915e000}, - {0x39160000}, {0x39162000}, {0x39164000}, {0x39166000}, - {0x39168000}, {0x3916a000}, {0x3916c000}, {0x3916e000}, - {0x39170000}, {0x39172000}, {0x39174000}, {0x39176000}, - {0x39178000}, {0x3917a000}, {0x3917c000}, {0x3917e000}, - {0x39180000}, {0x39182000}, {0x39184000}, {0x39186000}, - {0x39188000}, {0x3918a000}, {0x3918c000}, {0x3918e000}, - {0x39190000}, {0x39192000}, {0x39194000}, {0x39196000}, - {0x39198000}, {0x3919a000}, {0x3919c000}, {0x3919e000}, - {0x391a0000}, {0x391a2000}, {0x391a4000}, {0x391a6000}, - {0x391a8000}, {0x391aa000}, {0x391ac000}, {0x391ae000}, - {0x391b0000}, {0x391b2000}, {0x391b4000}, {0x391b6000}, - {0x391b8000}, {0x391ba000}, {0x391bc000}, {0x391be000}, - {0x391c0000}, {0x391c2000}, {0x391c4000}, {0x391c6000}, - {0x391c8000}, {0x391ca000}, {0x391cc000}, {0x391ce000}, - {0x391d0000}, {0x391d2000}, {0x391d4000}, {0x391d6000}, - {0x391d8000}, {0x391da000}, {0x391dc000}, {0x391de000}, - {0x391e0000}, {0x391e2000}, {0x391e4000}, {0x391e6000}, - {0x391e8000}, {0x391ea000}, {0x391ec000}, {0x391ee000}, - {0x391f0000}, {0x391f2000}, {0x391f4000}, {0x391f6000}, - {0x391f8000}, {0x391fa000}, {0x391fc000}, {0x391fe000}, - {0x39200000}, {0x39202000}, {0x39204000}, {0x39206000}, - {0x39208000}, {0x3920a000}, {0x3920c000}, {0x3920e000}, - {0x39210000}, {0x39212000}, {0x39214000}, {0x39216000}, - {0x39218000}, {0x3921a000}, {0x3921c000}, {0x3921e000}, - {0x39220000}, {0x39222000}, {0x39224000}, {0x39226000}, - {0x39228000}, {0x3922a000}, {0x3922c000}, {0x3922e000}, - {0x39230000}, {0x39232000}, {0x39234000}, {0x39236000}, - {0x39238000}, {0x3923a000}, {0x3923c000}, {0x3923e000}, - {0x39240000}, {0x39242000}, {0x39244000}, {0x39246000}, - {0x39248000}, {0x3924a000}, {0x3924c000}, {0x3924e000}, - {0x39250000}, {0x39252000}, {0x39254000}, {0x39256000}, - {0x39258000}, {0x3925a000}, {0x3925c000}, {0x3925e000}, - {0x39260000}, {0x39262000}, {0x39264000}, {0x39266000}, - {0x39268000}, {0x3926a000}, {0x3926c000}, {0x3926e000}, - {0x39270000}, {0x39272000}, {0x39274000}, {0x39276000}, - {0x39278000}, {0x3927a000}, {0x3927c000}, {0x3927e000}, - {0x39280000}, {0x39282000}, {0x39284000}, {0x39286000}, - {0x39288000}, {0x3928a000}, {0x3928c000}, {0x3928e000}, - {0x39290000}, {0x39292000}, {0x39294000}, {0x39296000}, - {0x39298000}, {0x3929a000}, {0x3929c000}, {0x3929e000}, - {0x392a0000}, {0x392a2000}, {0x392a4000}, {0x392a6000}, - {0x392a8000}, {0x392aa000}, {0x392ac000}, {0x392ae000}, - {0x392b0000}, {0x392b2000}, {0x392b4000}, {0x392b6000}, - {0x392b8000}, {0x392ba000}, {0x392bc000}, {0x392be000}, - {0x392c0000}, {0x392c2000}, {0x392c4000}, {0x392c6000}, - {0x392c8000}, {0x392ca000}, {0x392cc000}, {0x392ce000}, - {0x392d0000}, {0x392d2000}, {0x392d4000}, {0x392d6000}, - {0x392d8000}, {0x392da000}, {0x392dc000}, {0x392de000}, - {0x392e0000}, {0x392e2000}, {0x392e4000}, {0x392e6000}, - {0x392e8000}, {0x392ea000}, {0x392ec000}, {0x392ee000}, - {0x392f0000}, {0x392f2000}, {0x392f4000}, {0x392f6000}, - {0x392f8000}, {0x392fa000}, {0x392fc000}, {0x392fe000}, - {0x39300000}, {0x39302000}, {0x39304000}, {0x39306000}, - {0x39308000}, {0x3930a000}, {0x3930c000}, {0x3930e000}, - {0x39310000}, {0x39312000}, {0x39314000}, {0x39316000}, - {0x39318000}, {0x3931a000}, {0x3931c000}, {0x3931e000}, - {0x39320000}, {0x39322000}, {0x39324000}, {0x39326000}, - {0x39328000}, {0x3932a000}, {0x3932c000}, {0x3932e000}, - {0x39330000}, {0x39332000}, {0x39334000}, {0x39336000}, - {0x39338000}, {0x3933a000}, {0x3933c000}, {0x3933e000}, - {0x39340000}, {0x39342000}, {0x39344000}, {0x39346000}, - {0x39348000}, {0x3934a000}, {0x3934c000}, {0x3934e000}, - {0x39350000}, {0x39352000}, {0x39354000}, {0x39356000}, - {0x39358000}, {0x3935a000}, {0x3935c000}, {0x3935e000}, - {0x39360000}, {0x39362000}, {0x39364000}, {0x39366000}, - {0x39368000}, {0x3936a000}, {0x3936c000}, {0x3936e000}, - {0x39370000}, {0x39372000}, {0x39374000}, {0x39376000}, - {0x39378000}, {0x3937a000}, {0x3937c000}, {0x3937e000}, - {0x39380000}, {0x39382000}, {0x39384000}, {0x39386000}, - {0x39388000}, {0x3938a000}, {0x3938c000}, {0x3938e000}, - {0x39390000}, {0x39392000}, {0x39394000}, {0x39396000}, - {0x39398000}, {0x3939a000}, {0x3939c000}, {0x3939e000}, - {0x393a0000}, {0x393a2000}, {0x393a4000}, {0x393a6000}, - {0x393a8000}, {0x393aa000}, {0x393ac000}, {0x393ae000}, - {0x393b0000}, {0x393b2000}, {0x393b4000}, {0x393b6000}, - {0x393b8000}, {0x393ba000}, {0x393bc000}, {0x393be000}, - {0x393c0000}, {0x393c2000}, {0x393c4000}, {0x393c6000}, - {0x393c8000}, {0x393ca000}, {0x393cc000}, {0x393ce000}, - {0x393d0000}, {0x393d2000}, {0x393d4000}, {0x393d6000}, - {0x393d8000}, {0x393da000}, {0x393dc000}, {0x393de000}, - {0x393e0000}, {0x393e2000}, {0x393e4000}, {0x393e6000}, - {0x393e8000}, {0x393ea000}, {0x393ec000}, {0x393ee000}, - {0x393f0000}, {0x393f2000}, {0x393f4000}, {0x393f6000}, - {0x393f8000}, {0x393fa000}, {0x393fc000}, {0x393fe000}, - {0x39400000}, {0x39402000}, {0x39404000}, {0x39406000}, - {0x39408000}, {0x3940a000}, {0x3940c000}, {0x3940e000}, - {0x39410000}, {0x39412000}, {0x39414000}, {0x39416000}, - {0x39418000}, {0x3941a000}, {0x3941c000}, {0x3941e000}, - {0x39420000}, {0x39422000}, {0x39424000}, {0x39426000}, - {0x39428000}, {0x3942a000}, {0x3942c000}, {0x3942e000}, - {0x39430000}, {0x39432000}, {0x39434000}, {0x39436000}, - {0x39438000}, {0x3943a000}, {0x3943c000}, {0x3943e000}, - {0x39440000}, {0x39442000}, {0x39444000}, {0x39446000}, - {0x39448000}, {0x3944a000}, {0x3944c000}, {0x3944e000}, - {0x39450000}, {0x39452000}, {0x39454000}, {0x39456000}, - {0x39458000}, {0x3945a000}, {0x3945c000}, {0x3945e000}, - {0x39460000}, {0x39462000}, {0x39464000}, {0x39466000}, - {0x39468000}, {0x3946a000}, {0x3946c000}, {0x3946e000}, - {0x39470000}, {0x39472000}, {0x39474000}, {0x39476000}, - {0x39478000}, {0x3947a000}, {0x3947c000}, {0x3947e000}, - {0x39480000}, {0x39482000}, {0x39484000}, {0x39486000}, - {0x39488000}, {0x3948a000}, {0x3948c000}, {0x3948e000}, - {0x39490000}, {0x39492000}, {0x39494000}, {0x39496000}, - {0x39498000}, {0x3949a000}, {0x3949c000}, {0x3949e000}, - {0x394a0000}, {0x394a2000}, {0x394a4000}, {0x394a6000}, - {0x394a8000}, {0x394aa000}, {0x394ac000}, {0x394ae000}, - {0x394b0000}, {0x394b2000}, {0x394b4000}, {0x394b6000}, - {0x394b8000}, {0x394ba000}, {0x394bc000}, {0x394be000}, - {0x394c0000}, {0x394c2000}, {0x394c4000}, {0x394c6000}, - {0x394c8000}, {0x394ca000}, {0x394cc000}, {0x394ce000}, - {0x394d0000}, {0x394d2000}, {0x394d4000}, {0x394d6000}, - {0x394d8000}, {0x394da000}, {0x394dc000}, {0x394de000}, - {0x394e0000}, {0x394e2000}, {0x394e4000}, {0x394e6000}, - {0x394e8000}, {0x394ea000}, {0x394ec000}, {0x394ee000}, - {0x394f0000}, {0x394f2000}, {0x394f4000}, {0x394f6000}, - {0x394f8000}, {0x394fa000}, {0x394fc000}, {0x394fe000}, - {0x39500000}, {0x39502000}, {0x39504000}, {0x39506000}, - {0x39508000}, {0x3950a000}, {0x3950c000}, {0x3950e000}, - {0x39510000}, {0x39512000}, {0x39514000}, {0x39516000}, - {0x39518000}, {0x3951a000}, {0x3951c000}, {0x3951e000}, - {0x39520000}, {0x39522000}, {0x39524000}, {0x39526000}, - {0x39528000}, {0x3952a000}, {0x3952c000}, {0x3952e000}, - {0x39530000}, {0x39532000}, {0x39534000}, {0x39536000}, - {0x39538000}, {0x3953a000}, {0x3953c000}, {0x3953e000}, - {0x39540000}, {0x39542000}, {0x39544000}, {0x39546000}, - {0x39548000}, {0x3954a000}, {0x3954c000}, {0x3954e000}, - {0x39550000}, {0x39552000}, {0x39554000}, {0x39556000}, - {0x39558000}, {0x3955a000}, {0x3955c000}, {0x3955e000}, - {0x39560000}, {0x39562000}, {0x39564000}, {0x39566000}, - {0x39568000}, {0x3956a000}, {0x3956c000}, {0x3956e000}, - {0x39570000}, {0x39572000}, {0x39574000}, {0x39576000}, - {0x39578000}, {0x3957a000}, {0x3957c000}, {0x3957e000}, - {0x39580000}, {0x39582000}, {0x39584000}, {0x39586000}, - {0x39588000}, {0x3958a000}, {0x3958c000}, {0x3958e000}, - {0x39590000}, {0x39592000}, {0x39594000}, {0x39596000}, - {0x39598000}, {0x3959a000}, {0x3959c000}, {0x3959e000}, - {0x395a0000}, {0x395a2000}, {0x395a4000}, {0x395a6000}, - {0x395a8000}, {0x395aa000}, {0x395ac000}, {0x395ae000}, - {0x395b0000}, {0x395b2000}, {0x395b4000}, {0x395b6000}, - {0x395b8000}, {0x395ba000}, {0x395bc000}, {0x395be000}, - {0x395c0000}, {0x395c2000}, {0x395c4000}, {0x395c6000}, - {0x395c8000}, {0x395ca000}, {0x395cc000}, {0x395ce000}, - {0x395d0000}, {0x395d2000}, {0x395d4000}, {0x395d6000}, - {0x395d8000}, {0x395da000}, {0x395dc000}, {0x395de000}, - {0x395e0000}, {0x395e2000}, {0x395e4000}, {0x395e6000}, - {0x395e8000}, {0x395ea000}, {0x395ec000}, {0x395ee000}, - {0x395f0000}, {0x395f2000}, {0x395f4000}, {0x395f6000}, - {0x395f8000}, {0x395fa000}, {0x395fc000}, {0x395fe000}, - {0x39600000}, {0x39602000}, {0x39604000}, {0x39606000}, - {0x39608000}, {0x3960a000}, {0x3960c000}, {0x3960e000}, - {0x39610000}, {0x39612000}, {0x39614000}, {0x39616000}, - {0x39618000}, {0x3961a000}, {0x3961c000}, {0x3961e000}, - {0x39620000}, {0x39622000}, {0x39624000}, {0x39626000}, - {0x39628000}, {0x3962a000}, {0x3962c000}, {0x3962e000}, - {0x39630000}, {0x39632000}, {0x39634000}, {0x39636000}, - {0x39638000}, {0x3963a000}, {0x3963c000}, {0x3963e000}, - {0x39640000}, {0x39642000}, {0x39644000}, {0x39646000}, - {0x39648000}, {0x3964a000}, {0x3964c000}, {0x3964e000}, - {0x39650000}, {0x39652000}, {0x39654000}, {0x39656000}, - {0x39658000}, {0x3965a000}, {0x3965c000}, {0x3965e000}, - {0x39660000}, {0x39662000}, {0x39664000}, {0x39666000}, - {0x39668000}, {0x3966a000}, {0x3966c000}, {0x3966e000}, - {0x39670000}, {0x39672000}, {0x39674000}, {0x39676000}, - {0x39678000}, {0x3967a000}, {0x3967c000}, {0x3967e000}, - {0x39680000}, {0x39682000}, {0x39684000}, {0x39686000}, - {0x39688000}, {0x3968a000}, {0x3968c000}, {0x3968e000}, - {0x39690000}, {0x39692000}, {0x39694000}, {0x39696000}, - {0x39698000}, {0x3969a000}, {0x3969c000}, {0x3969e000}, - {0x396a0000}, {0x396a2000}, {0x396a4000}, {0x396a6000}, - {0x396a8000}, {0x396aa000}, {0x396ac000}, {0x396ae000}, - {0x396b0000}, {0x396b2000}, {0x396b4000}, {0x396b6000}, - {0x396b8000}, {0x396ba000}, {0x396bc000}, {0x396be000}, - {0x396c0000}, {0x396c2000}, {0x396c4000}, {0x396c6000}, - {0x396c8000}, {0x396ca000}, {0x396cc000}, {0x396ce000}, - {0x396d0000}, {0x396d2000}, {0x396d4000}, {0x396d6000}, - {0x396d8000}, {0x396da000}, {0x396dc000}, {0x396de000}, - {0x396e0000}, {0x396e2000}, {0x396e4000}, {0x396e6000}, - {0x396e8000}, {0x396ea000}, {0x396ec000}, {0x396ee000}, - {0x396f0000}, {0x396f2000}, {0x396f4000}, {0x396f6000}, - {0x396f8000}, {0x396fa000}, {0x396fc000}, {0x396fe000}, - {0x39700000}, {0x39702000}, {0x39704000}, {0x39706000}, - {0x39708000}, {0x3970a000}, {0x3970c000}, {0x3970e000}, - {0x39710000}, {0x39712000}, {0x39714000}, {0x39716000}, - {0x39718000}, {0x3971a000}, {0x3971c000}, {0x3971e000}, - {0x39720000}, {0x39722000}, {0x39724000}, {0x39726000}, - {0x39728000}, {0x3972a000}, {0x3972c000}, {0x3972e000}, - {0x39730000}, {0x39732000}, {0x39734000}, {0x39736000}, - {0x39738000}, {0x3973a000}, {0x3973c000}, {0x3973e000}, - {0x39740000}, {0x39742000}, {0x39744000}, {0x39746000}, - {0x39748000}, {0x3974a000}, {0x3974c000}, {0x3974e000}, - {0x39750000}, {0x39752000}, {0x39754000}, {0x39756000}, - {0x39758000}, {0x3975a000}, {0x3975c000}, {0x3975e000}, - {0x39760000}, {0x39762000}, {0x39764000}, {0x39766000}, - {0x39768000}, {0x3976a000}, {0x3976c000}, {0x3976e000}, - {0x39770000}, {0x39772000}, {0x39774000}, {0x39776000}, - {0x39778000}, {0x3977a000}, {0x3977c000}, {0x3977e000}, - {0x39780000}, {0x39782000}, {0x39784000}, {0x39786000}, - {0x39788000}, {0x3978a000}, {0x3978c000}, {0x3978e000}, - {0x39790000}, {0x39792000}, {0x39794000}, {0x39796000}, - {0x39798000}, {0x3979a000}, {0x3979c000}, {0x3979e000}, - {0x397a0000}, {0x397a2000}, {0x397a4000}, {0x397a6000}, - {0x397a8000}, {0x397aa000}, {0x397ac000}, {0x397ae000}, - {0x397b0000}, {0x397b2000}, {0x397b4000}, {0x397b6000}, - {0x397b8000}, {0x397ba000}, {0x397bc000}, {0x397be000}, - {0x397c0000}, {0x397c2000}, {0x397c4000}, {0x397c6000}, - {0x397c8000}, {0x397ca000}, {0x397cc000}, {0x397ce000}, - {0x397d0000}, {0x397d2000}, {0x397d4000}, {0x397d6000}, - {0x397d8000}, {0x397da000}, {0x397dc000}, {0x397de000}, - {0x397e0000}, {0x397e2000}, {0x397e4000}, {0x397e6000}, - {0x397e8000}, {0x397ea000}, {0x397ec000}, {0x397ee000}, - {0x397f0000}, {0x397f2000}, {0x397f4000}, {0x397f6000}, - {0x397f8000}, {0x397fa000}, {0x397fc000}, {0x397fe000}, - {0x39800000}, {0x39802000}, {0x39804000}, {0x39806000}, - {0x39808000}, {0x3980a000}, {0x3980c000}, {0x3980e000}, - {0x39810000}, {0x39812000}, {0x39814000}, {0x39816000}, - {0x39818000}, {0x3981a000}, {0x3981c000}, {0x3981e000}, - {0x39820000}, {0x39822000}, {0x39824000}, {0x39826000}, - {0x39828000}, {0x3982a000}, {0x3982c000}, {0x3982e000}, - {0x39830000}, {0x39832000}, {0x39834000}, {0x39836000}, - {0x39838000}, {0x3983a000}, {0x3983c000}, {0x3983e000}, - {0x39840000}, {0x39842000}, {0x39844000}, {0x39846000}, - {0x39848000}, {0x3984a000}, {0x3984c000}, {0x3984e000}, - {0x39850000}, {0x39852000}, {0x39854000}, {0x39856000}, - {0x39858000}, {0x3985a000}, {0x3985c000}, {0x3985e000}, - {0x39860000}, {0x39862000}, {0x39864000}, {0x39866000}, - {0x39868000}, {0x3986a000}, {0x3986c000}, {0x3986e000}, - {0x39870000}, {0x39872000}, {0x39874000}, {0x39876000}, - {0x39878000}, {0x3987a000}, {0x3987c000}, {0x3987e000}, - {0x39880000}, {0x39882000}, {0x39884000}, {0x39886000}, - {0x39888000}, {0x3988a000}, {0x3988c000}, {0x3988e000}, - {0x39890000}, {0x39892000}, {0x39894000}, {0x39896000}, - {0x39898000}, {0x3989a000}, {0x3989c000}, {0x3989e000}, - {0x398a0000}, {0x398a2000}, {0x398a4000}, {0x398a6000}, - {0x398a8000}, {0x398aa000}, {0x398ac000}, {0x398ae000}, - {0x398b0000}, {0x398b2000}, {0x398b4000}, {0x398b6000}, - {0x398b8000}, {0x398ba000}, {0x398bc000}, {0x398be000}, - {0x398c0000}, {0x398c2000}, {0x398c4000}, {0x398c6000}, - {0x398c8000}, {0x398ca000}, {0x398cc000}, {0x398ce000}, - {0x398d0000}, {0x398d2000}, {0x398d4000}, {0x398d6000}, - {0x398d8000}, {0x398da000}, {0x398dc000}, {0x398de000}, - {0x398e0000}, {0x398e2000}, {0x398e4000}, {0x398e6000}, - {0x398e8000}, {0x398ea000}, {0x398ec000}, {0x398ee000}, - {0x398f0000}, {0x398f2000}, {0x398f4000}, {0x398f6000}, - {0x398f8000}, {0x398fa000}, {0x398fc000}, {0x398fe000}, - {0x39900000}, {0x39902000}, {0x39904000}, {0x39906000}, - {0x39908000}, {0x3990a000}, {0x3990c000}, {0x3990e000}, - {0x39910000}, {0x39912000}, {0x39914000}, {0x39916000}, - {0x39918000}, {0x3991a000}, {0x3991c000}, {0x3991e000}, - {0x39920000}, {0x39922000}, {0x39924000}, {0x39926000}, - {0x39928000}, {0x3992a000}, {0x3992c000}, {0x3992e000}, - {0x39930000}, {0x39932000}, {0x39934000}, {0x39936000}, - {0x39938000}, {0x3993a000}, {0x3993c000}, {0x3993e000}, - {0x39940000}, {0x39942000}, {0x39944000}, {0x39946000}, - {0x39948000}, {0x3994a000}, {0x3994c000}, {0x3994e000}, - {0x39950000}, {0x39952000}, {0x39954000}, {0x39956000}, - {0x39958000}, {0x3995a000}, {0x3995c000}, {0x3995e000}, - {0x39960000}, {0x39962000}, {0x39964000}, {0x39966000}, - {0x39968000}, {0x3996a000}, {0x3996c000}, {0x3996e000}, - {0x39970000}, {0x39972000}, {0x39974000}, {0x39976000}, - {0x39978000}, {0x3997a000}, {0x3997c000}, {0x3997e000}, - {0x39980000}, {0x39982000}, {0x39984000}, {0x39986000}, - {0x39988000}, {0x3998a000}, {0x3998c000}, {0x3998e000}, - {0x39990000}, {0x39992000}, {0x39994000}, {0x39996000}, - {0x39998000}, {0x3999a000}, {0x3999c000}, {0x3999e000}, - {0x399a0000}, {0x399a2000}, {0x399a4000}, {0x399a6000}, - {0x399a8000}, {0x399aa000}, {0x399ac000}, {0x399ae000}, - {0x399b0000}, {0x399b2000}, {0x399b4000}, {0x399b6000}, - {0x399b8000}, {0x399ba000}, {0x399bc000}, {0x399be000}, - {0x399c0000}, {0x399c2000}, {0x399c4000}, {0x399c6000}, - {0x399c8000}, {0x399ca000}, {0x399cc000}, {0x399ce000}, - {0x399d0000}, {0x399d2000}, {0x399d4000}, {0x399d6000}, - {0x399d8000}, {0x399da000}, {0x399dc000}, {0x399de000}, - {0x399e0000}, {0x399e2000}, {0x399e4000}, {0x399e6000}, - {0x399e8000}, {0x399ea000}, {0x399ec000}, {0x399ee000}, - {0x399f0000}, {0x399f2000}, {0x399f4000}, {0x399f6000}, - {0x399f8000}, {0x399fa000}, {0x399fc000}, {0x399fe000}, - {0x39a00000}, {0x39a02000}, {0x39a04000}, {0x39a06000}, - {0x39a08000}, {0x39a0a000}, {0x39a0c000}, {0x39a0e000}, - {0x39a10000}, {0x39a12000}, {0x39a14000}, {0x39a16000}, - {0x39a18000}, {0x39a1a000}, {0x39a1c000}, {0x39a1e000}, - {0x39a20000}, {0x39a22000}, {0x39a24000}, {0x39a26000}, - {0x39a28000}, {0x39a2a000}, {0x39a2c000}, {0x39a2e000}, - {0x39a30000}, {0x39a32000}, {0x39a34000}, {0x39a36000}, - {0x39a38000}, {0x39a3a000}, {0x39a3c000}, {0x39a3e000}, - {0x39a40000}, {0x39a42000}, {0x39a44000}, {0x39a46000}, - {0x39a48000}, {0x39a4a000}, {0x39a4c000}, {0x39a4e000}, - {0x39a50000}, {0x39a52000}, {0x39a54000}, {0x39a56000}, - {0x39a58000}, {0x39a5a000}, {0x39a5c000}, {0x39a5e000}, - {0x39a60000}, {0x39a62000}, {0x39a64000}, {0x39a66000}, - {0x39a68000}, {0x39a6a000}, {0x39a6c000}, {0x39a6e000}, - {0x39a70000}, {0x39a72000}, {0x39a74000}, {0x39a76000}, - {0x39a78000}, {0x39a7a000}, {0x39a7c000}, {0x39a7e000}, - {0x39a80000}, {0x39a82000}, {0x39a84000}, {0x39a86000}, - {0x39a88000}, {0x39a8a000}, {0x39a8c000}, {0x39a8e000}, - {0x39a90000}, {0x39a92000}, {0x39a94000}, {0x39a96000}, - {0x39a98000}, {0x39a9a000}, {0x39a9c000}, {0x39a9e000}, - {0x39aa0000}, {0x39aa2000}, {0x39aa4000}, {0x39aa6000}, - {0x39aa8000}, {0x39aaa000}, {0x39aac000}, {0x39aae000}, - {0x39ab0000}, {0x39ab2000}, {0x39ab4000}, {0x39ab6000}, - {0x39ab8000}, {0x39aba000}, {0x39abc000}, {0x39abe000}, - {0x39ac0000}, {0x39ac2000}, {0x39ac4000}, {0x39ac6000}, - {0x39ac8000}, {0x39aca000}, {0x39acc000}, {0x39ace000}, - {0x39ad0000}, {0x39ad2000}, {0x39ad4000}, {0x39ad6000}, - {0x39ad8000}, {0x39ada000}, {0x39adc000}, {0x39ade000}, - {0x39ae0000}, {0x39ae2000}, {0x39ae4000}, {0x39ae6000}, - {0x39ae8000}, {0x39aea000}, {0x39aec000}, {0x39aee000}, - {0x39af0000}, {0x39af2000}, {0x39af4000}, {0x39af6000}, - {0x39af8000}, {0x39afa000}, {0x39afc000}, {0x39afe000}, - {0x39b00000}, {0x39b02000}, {0x39b04000}, {0x39b06000}, - {0x39b08000}, {0x39b0a000}, {0x39b0c000}, {0x39b0e000}, - {0x39b10000}, {0x39b12000}, {0x39b14000}, {0x39b16000}, - {0x39b18000}, {0x39b1a000}, {0x39b1c000}, {0x39b1e000}, - {0x39b20000}, {0x39b22000}, {0x39b24000}, {0x39b26000}, - {0x39b28000}, {0x39b2a000}, {0x39b2c000}, {0x39b2e000}, - {0x39b30000}, {0x39b32000}, {0x39b34000}, {0x39b36000}, - {0x39b38000}, {0x39b3a000}, {0x39b3c000}, {0x39b3e000}, - {0x39b40000}, {0x39b42000}, {0x39b44000}, {0x39b46000}, - {0x39b48000}, {0x39b4a000}, {0x39b4c000}, {0x39b4e000}, - {0x39b50000}, {0x39b52000}, {0x39b54000}, {0x39b56000}, - {0x39b58000}, {0x39b5a000}, {0x39b5c000}, {0x39b5e000}, - {0x39b60000}, {0x39b62000}, {0x39b64000}, {0x39b66000}, - {0x39b68000}, {0x39b6a000}, {0x39b6c000}, {0x39b6e000}, - {0x39b70000}, {0x39b72000}, {0x39b74000}, {0x39b76000}, - {0x39b78000}, {0x39b7a000}, {0x39b7c000}, {0x39b7e000}, - {0x39b80000}, {0x39b82000}, {0x39b84000}, {0x39b86000}, - {0x39b88000}, {0x39b8a000}, {0x39b8c000}, {0x39b8e000}, - {0x39b90000}, {0x39b92000}, {0x39b94000}, {0x39b96000}, - {0x39b98000}, {0x39b9a000}, {0x39b9c000}, {0x39b9e000}, - {0x39ba0000}, {0x39ba2000}, {0x39ba4000}, {0x39ba6000}, - {0x39ba8000}, {0x39baa000}, {0x39bac000}, {0x39bae000}, - {0x39bb0000}, {0x39bb2000}, {0x39bb4000}, {0x39bb6000}, - {0x39bb8000}, {0x39bba000}, {0x39bbc000}, {0x39bbe000}, - {0x39bc0000}, {0x39bc2000}, {0x39bc4000}, {0x39bc6000}, - {0x39bc8000}, {0x39bca000}, {0x39bcc000}, {0x39bce000}, - {0x39bd0000}, {0x39bd2000}, {0x39bd4000}, {0x39bd6000}, - {0x39bd8000}, {0x39bda000}, {0x39bdc000}, {0x39bde000}, - {0x39be0000}, {0x39be2000}, {0x39be4000}, {0x39be6000}, - {0x39be8000}, {0x39bea000}, {0x39bec000}, {0x39bee000}, - {0x39bf0000}, {0x39bf2000}, {0x39bf4000}, {0x39bf6000}, - {0x39bf8000}, {0x39bfa000}, {0x39bfc000}, {0x39bfe000}, - {0x39c00000}, {0x39c02000}, {0x39c04000}, {0x39c06000}, - {0x39c08000}, {0x39c0a000}, {0x39c0c000}, {0x39c0e000}, - {0x39c10000}, {0x39c12000}, {0x39c14000}, {0x39c16000}, - {0x39c18000}, {0x39c1a000}, {0x39c1c000}, {0x39c1e000}, - {0x39c20000}, {0x39c22000}, {0x39c24000}, {0x39c26000}, - {0x39c28000}, {0x39c2a000}, {0x39c2c000}, {0x39c2e000}, - {0x39c30000}, {0x39c32000}, {0x39c34000}, {0x39c36000}, - {0x39c38000}, {0x39c3a000}, {0x39c3c000}, {0x39c3e000}, - {0x39c40000}, {0x39c42000}, {0x39c44000}, {0x39c46000}, - {0x39c48000}, {0x39c4a000}, {0x39c4c000}, {0x39c4e000}, - {0x39c50000}, {0x39c52000}, {0x39c54000}, {0x39c56000}, - {0x39c58000}, {0x39c5a000}, {0x39c5c000}, {0x39c5e000}, - {0x39c60000}, {0x39c62000}, {0x39c64000}, {0x39c66000}, - {0x39c68000}, {0x39c6a000}, {0x39c6c000}, {0x39c6e000}, - {0x39c70000}, {0x39c72000}, {0x39c74000}, {0x39c76000}, - {0x39c78000}, {0x39c7a000}, {0x39c7c000}, {0x39c7e000}, - {0x39c80000}, {0x39c82000}, {0x39c84000}, {0x39c86000}, - {0x39c88000}, {0x39c8a000}, {0x39c8c000}, {0x39c8e000}, - {0x39c90000}, {0x39c92000}, {0x39c94000}, {0x39c96000}, - {0x39c98000}, {0x39c9a000}, {0x39c9c000}, {0x39c9e000}, - {0x39ca0000}, {0x39ca2000}, {0x39ca4000}, {0x39ca6000}, - {0x39ca8000}, {0x39caa000}, {0x39cac000}, {0x39cae000}, - {0x39cb0000}, {0x39cb2000}, {0x39cb4000}, {0x39cb6000}, - {0x39cb8000}, {0x39cba000}, {0x39cbc000}, {0x39cbe000}, - {0x39cc0000}, {0x39cc2000}, {0x39cc4000}, {0x39cc6000}, - {0x39cc8000}, {0x39cca000}, {0x39ccc000}, {0x39cce000}, - {0x39cd0000}, {0x39cd2000}, {0x39cd4000}, {0x39cd6000}, - {0x39cd8000}, {0x39cda000}, {0x39cdc000}, {0x39cde000}, - {0x39ce0000}, {0x39ce2000}, {0x39ce4000}, {0x39ce6000}, - {0x39ce8000}, {0x39cea000}, {0x39cec000}, {0x39cee000}, - {0x39cf0000}, {0x39cf2000}, {0x39cf4000}, {0x39cf6000}, - {0x39cf8000}, {0x39cfa000}, {0x39cfc000}, {0x39cfe000}, - {0x39d00000}, {0x39d02000}, {0x39d04000}, {0x39d06000}, - {0x39d08000}, {0x39d0a000}, {0x39d0c000}, {0x39d0e000}, - {0x39d10000}, {0x39d12000}, {0x39d14000}, {0x39d16000}, - {0x39d18000}, {0x39d1a000}, {0x39d1c000}, {0x39d1e000}, - {0x39d20000}, {0x39d22000}, {0x39d24000}, {0x39d26000}, - {0x39d28000}, {0x39d2a000}, {0x39d2c000}, {0x39d2e000}, - {0x39d30000}, {0x39d32000}, {0x39d34000}, {0x39d36000}, - {0x39d38000}, {0x39d3a000}, {0x39d3c000}, {0x39d3e000}, - {0x39d40000}, {0x39d42000}, {0x39d44000}, {0x39d46000}, - {0x39d48000}, {0x39d4a000}, {0x39d4c000}, {0x39d4e000}, - {0x39d50000}, {0x39d52000}, {0x39d54000}, {0x39d56000}, - {0x39d58000}, {0x39d5a000}, {0x39d5c000}, {0x39d5e000}, - {0x39d60000}, {0x39d62000}, {0x39d64000}, {0x39d66000}, - {0x39d68000}, {0x39d6a000}, {0x39d6c000}, {0x39d6e000}, - {0x39d70000}, {0x39d72000}, {0x39d74000}, {0x39d76000}, - {0x39d78000}, {0x39d7a000}, {0x39d7c000}, {0x39d7e000}, - {0x39d80000}, {0x39d82000}, {0x39d84000}, {0x39d86000}, - {0x39d88000}, {0x39d8a000}, {0x39d8c000}, {0x39d8e000}, - {0x39d90000}, {0x39d92000}, {0x39d94000}, {0x39d96000}, - {0x39d98000}, {0x39d9a000}, {0x39d9c000}, {0x39d9e000}, - {0x39da0000}, {0x39da2000}, {0x39da4000}, {0x39da6000}, - {0x39da8000}, {0x39daa000}, {0x39dac000}, {0x39dae000}, - {0x39db0000}, {0x39db2000}, {0x39db4000}, {0x39db6000}, - {0x39db8000}, {0x39dba000}, {0x39dbc000}, {0x39dbe000}, - {0x39dc0000}, {0x39dc2000}, {0x39dc4000}, {0x39dc6000}, - {0x39dc8000}, {0x39dca000}, {0x39dcc000}, {0x39dce000}, - {0x39dd0000}, {0x39dd2000}, {0x39dd4000}, {0x39dd6000}, - {0x39dd8000}, {0x39dda000}, {0x39ddc000}, {0x39dde000}, - {0x39de0000}, {0x39de2000}, {0x39de4000}, {0x39de6000}, - {0x39de8000}, {0x39dea000}, {0x39dec000}, {0x39dee000}, - {0x39df0000}, {0x39df2000}, {0x39df4000}, {0x39df6000}, - {0x39df8000}, {0x39dfa000}, {0x39dfc000}, {0x39dfe000}, - {0x39e00000}, {0x39e02000}, {0x39e04000}, {0x39e06000}, - {0x39e08000}, {0x39e0a000}, {0x39e0c000}, {0x39e0e000}, - {0x39e10000}, {0x39e12000}, {0x39e14000}, {0x39e16000}, - {0x39e18000}, {0x39e1a000}, {0x39e1c000}, {0x39e1e000}, - {0x39e20000}, {0x39e22000}, {0x39e24000}, {0x39e26000}, - {0x39e28000}, {0x39e2a000}, {0x39e2c000}, {0x39e2e000}, - {0x39e30000}, {0x39e32000}, {0x39e34000}, {0x39e36000}, - {0x39e38000}, {0x39e3a000}, {0x39e3c000}, {0x39e3e000}, - {0x39e40000}, {0x39e42000}, {0x39e44000}, {0x39e46000}, - {0x39e48000}, {0x39e4a000}, {0x39e4c000}, {0x39e4e000}, - {0x39e50000}, {0x39e52000}, {0x39e54000}, {0x39e56000}, - {0x39e58000}, {0x39e5a000}, {0x39e5c000}, {0x39e5e000}, - {0x39e60000}, {0x39e62000}, {0x39e64000}, {0x39e66000}, - {0x39e68000}, {0x39e6a000}, {0x39e6c000}, {0x39e6e000}, - {0x39e70000}, {0x39e72000}, {0x39e74000}, {0x39e76000}, - {0x39e78000}, {0x39e7a000}, {0x39e7c000}, {0x39e7e000}, - {0x39e80000}, {0x39e82000}, {0x39e84000}, {0x39e86000}, - {0x39e88000}, {0x39e8a000}, {0x39e8c000}, {0x39e8e000}, - {0x39e90000}, {0x39e92000}, {0x39e94000}, {0x39e96000}, - {0x39e98000}, {0x39e9a000}, {0x39e9c000}, {0x39e9e000}, - {0x39ea0000}, {0x39ea2000}, {0x39ea4000}, {0x39ea6000}, - {0x39ea8000}, {0x39eaa000}, {0x39eac000}, {0x39eae000}, - {0x39eb0000}, {0x39eb2000}, {0x39eb4000}, {0x39eb6000}, - {0x39eb8000}, {0x39eba000}, {0x39ebc000}, {0x39ebe000}, - {0x39ec0000}, {0x39ec2000}, {0x39ec4000}, {0x39ec6000}, - {0x39ec8000}, {0x39eca000}, {0x39ecc000}, {0x39ece000}, - {0x39ed0000}, {0x39ed2000}, {0x39ed4000}, {0x39ed6000}, - {0x39ed8000}, {0x39eda000}, {0x39edc000}, {0x39ede000}, - {0x39ee0000}, {0x39ee2000}, {0x39ee4000}, {0x39ee6000}, - {0x39ee8000}, {0x39eea000}, {0x39eec000}, {0x39eee000}, - {0x39ef0000}, {0x39ef2000}, {0x39ef4000}, {0x39ef6000}, - {0x39ef8000}, {0x39efa000}, {0x39efc000}, {0x39efe000}, - {0x39f00000}, {0x39f02000}, {0x39f04000}, {0x39f06000}, - {0x39f08000}, {0x39f0a000}, {0x39f0c000}, {0x39f0e000}, - {0x39f10000}, {0x39f12000}, {0x39f14000}, {0x39f16000}, - {0x39f18000}, {0x39f1a000}, {0x39f1c000}, {0x39f1e000}, - {0x39f20000}, {0x39f22000}, {0x39f24000}, {0x39f26000}, - {0x39f28000}, {0x39f2a000}, {0x39f2c000}, {0x39f2e000}, - {0x39f30000}, {0x39f32000}, {0x39f34000}, {0x39f36000}, - {0x39f38000}, {0x39f3a000}, {0x39f3c000}, {0x39f3e000}, - {0x39f40000}, {0x39f42000}, {0x39f44000}, {0x39f46000}, - {0x39f48000}, {0x39f4a000}, {0x39f4c000}, {0x39f4e000}, - {0x39f50000}, {0x39f52000}, {0x39f54000}, {0x39f56000}, - {0x39f58000}, {0x39f5a000}, {0x39f5c000}, {0x39f5e000}, - {0x39f60000}, {0x39f62000}, {0x39f64000}, {0x39f66000}, - {0x39f68000}, {0x39f6a000}, {0x39f6c000}, {0x39f6e000}, - {0x39f70000}, {0x39f72000}, {0x39f74000}, {0x39f76000}, - {0x39f78000}, {0x39f7a000}, {0x39f7c000}, {0x39f7e000}, - {0x39f80000}, {0x39f82000}, {0x39f84000}, {0x39f86000}, - {0x39f88000}, {0x39f8a000}, {0x39f8c000}, {0x39f8e000}, - {0x39f90000}, {0x39f92000}, {0x39f94000}, {0x39f96000}, - {0x39f98000}, {0x39f9a000}, {0x39f9c000}, {0x39f9e000}, - {0x39fa0000}, {0x39fa2000}, {0x39fa4000}, {0x39fa6000}, - {0x39fa8000}, {0x39faa000}, {0x39fac000}, {0x39fae000}, - {0x39fb0000}, {0x39fb2000}, {0x39fb4000}, {0x39fb6000}, - {0x39fb8000}, {0x39fba000}, {0x39fbc000}, {0x39fbe000}, - {0x39fc0000}, {0x39fc2000}, {0x39fc4000}, {0x39fc6000}, - {0x39fc8000}, {0x39fca000}, {0x39fcc000}, {0x39fce000}, - {0x39fd0000}, {0x39fd2000}, {0x39fd4000}, {0x39fd6000}, - {0x39fd8000}, {0x39fda000}, {0x39fdc000}, {0x39fde000}, - {0x39fe0000}, {0x39fe2000}, {0x39fe4000}, {0x39fe6000}, - {0x39fe8000}, {0x39fea000}, {0x39fec000}, {0x39fee000}, - {0x39ff0000}, {0x39ff2000}, {0x39ff4000}, {0x39ff6000}, - {0x39ff8000}, {0x39ffa000}, {0x39ffc000}, {0x39ffe000}, - {0x3a000000}, {0x3a002000}, {0x3a004000}, {0x3a006000}, - {0x3a008000}, {0x3a00a000}, {0x3a00c000}, {0x3a00e000}, - {0x3a010000}, {0x3a012000}, {0x3a014000}, {0x3a016000}, - {0x3a018000}, {0x3a01a000}, {0x3a01c000}, {0x3a01e000}, - {0x3a020000}, {0x3a022000}, {0x3a024000}, {0x3a026000}, - {0x3a028000}, {0x3a02a000}, {0x3a02c000}, {0x3a02e000}, - {0x3a030000}, {0x3a032000}, {0x3a034000}, {0x3a036000}, - {0x3a038000}, {0x3a03a000}, {0x3a03c000}, {0x3a03e000}, - {0x3a040000}, {0x3a042000}, {0x3a044000}, {0x3a046000}, - {0x3a048000}, {0x3a04a000}, {0x3a04c000}, {0x3a04e000}, - {0x3a050000}, {0x3a052000}, {0x3a054000}, {0x3a056000}, - {0x3a058000}, {0x3a05a000}, {0x3a05c000}, {0x3a05e000}, - {0x3a060000}, {0x3a062000}, {0x3a064000}, {0x3a066000}, - {0x3a068000}, {0x3a06a000}, {0x3a06c000}, {0x3a06e000}, - {0x3a070000}, {0x3a072000}, {0x3a074000}, {0x3a076000}, - {0x3a078000}, {0x3a07a000}, {0x3a07c000}, {0x3a07e000}, - {0x3a080000}, {0x3a082000}, {0x3a084000}, {0x3a086000}, - {0x3a088000}, {0x3a08a000}, {0x3a08c000}, {0x3a08e000}, - {0x3a090000}, {0x3a092000}, {0x3a094000}, {0x3a096000}, - {0x3a098000}, {0x3a09a000}, {0x3a09c000}, {0x3a09e000}, - {0x3a0a0000}, {0x3a0a2000}, {0x3a0a4000}, {0x3a0a6000}, - {0x3a0a8000}, {0x3a0aa000}, {0x3a0ac000}, {0x3a0ae000}, - {0x3a0b0000}, {0x3a0b2000}, {0x3a0b4000}, {0x3a0b6000}, - {0x3a0b8000}, {0x3a0ba000}, {0x3a0bc000}, {0x3a0be000}, - {0x3a0c0000}, {0x3a0c2000}, {0x3a0c4000}, {0x3a0c6000}, - {0x3a0c8000}, {0x3a0ca000}, {0x3a0cc000}, {0x3a0ce000}, - {0x3a0d0000}, {0x3a0d2000}, {0x3a0d4000}, {0x3a0d6000}, - {0x3a0d8000}, {0x3a0da000}, {0x3a0dc000}, {0x3a0de000}, - {0x3a0e0000}, {0x3a0e2000}, {0x3a0e4000}, {0x3a0e6000}, - {0x3a0e8000}, {0x3a0ea000}, {0x3a0ec000}, {0x3a0ee000}, - {0x3a0f0000}, {0x3a0f2000}, {0x3a0f4000}, {0x3a0f6000}, - {0x3a0f8000}, {0x3a0fa000}, {0x3a0fc000}, {0x3a0fe000}, - {0x3a100000}, {0x3a102000}, {0x3a104000}, {0x3a106000}, - {0x3a108000}, {0x3a10a000}, {0x3a10c000}, {0x3a10e000}, - {0x3a110000}, {0x3a112000}, {0x3a114000}, {0x3a116000}, - {0x3a118000}, {0x3a11a000}, {0x3a11c000}, {0x3a11e000}, - {0x3a120000}, {0x3a122000}, {0x3a124000}, {0x3a126000}, - {0x3a128000}, {0x3a12a000}, {0x3a12c000}, {0x3a12e000}, - {0x3a130000}, {0x3a132000}, {0x3a134000}, {0x3a136000}, - {0x3a138000}, {0x3a13a000}, {0x3a13c000}, {0x3a13e000}, - {0x3a140000}, {0x3a142000}, {0x3a144000}, {0x3a146000}, - {0x3a148000}, {0x3a14a000}, {0x3a14c000}, {0x3a14e000}, - {0x3a150000}, {0x3a152000}, {0x3a154000}, {0x3a156000}, - {0x3a158000}, {0x3a15a000}, {0x3a15c000}, {0x3a15e000}, - {0x3a160000}, {0x3a162000}, {0x3a164000}, {0x3a166000}, - {0x3a168000}, {0x3a16a000}, {0x3a16c000}, {0x3a16e000}, - {0x3a170000}, {0x3a172000}, {0x3a174000}, {0x3a176000}, - {0x3a178000}, {0x3a17a000}, {0x3a17c000}, {0x3a17e000}, - {0x3a180000}, {0x3a182000}, {0x3a184000}, {0x3a186000}, - {0x3a188000}, {0x3a18a000}, {0x3a18c000}, {0x3a18e000}, - {0x3a190000}, {0x3a192000}, {0x3a194000}, {0x3a196000}, - {0x3a198000}, {0x3a19a000}, {0x3a19c000}, {0x3a19e000}, - {0x3a1a0000}, {0x3a1a2000}, {0x3a1a4000}, {0x3a1a6000}, - {0x3a1a8000}, {0x3a1aa000}, {0x3a1ac000}, {0x3a1ae000}, - {0x3a1b0000}, {0x3a1b2000}, {0x3a1b4000}, {0x3a1b6000}, - {0x3a1b8000}, {0x3a1ba000}, {0x3a1bc000}, {0x3a1be000}, - {0x3a1c0000}, {0x3a1c2000}, {0x3a1c4000}, {0x3a1c6000}, - {0x3a1c8000}, {0x3a1ca000}, {0x3a1cc000}, {0x3a1ce000}, - {0x3a1d0000}, {0x3a1d2000}, {0x3a1d4000}, {0x3a1d6000}, - {0x3a1d8000}, {0x3a1da000}, {0x3a1dc000}, {0x3a1de000}, - {0x3a1e0000}, {0x3a1e2000}, {0x3a1e4000}, {0x3a1e6000}, - {0x3a1e8000}, {0x3a1ea000}, {0x3a1ec000}, {0x3a1ee000}, - {0x3a1f0000}, {0x3a1f2000}, {0x3a1f4000}, {0x3a1f6000}, - {0x3a1f8000}, {0x3a1fa000}, {0x3a1fc000}, {0x3a1fe000}, - {0x3a200000}, {0x3a202000}, {0x3a204000}, {0x3a206000}, - {0x3a208000}, {0x3a20a000}, {0x3a20c000}, {0x3a20e000}, - {0x3a210000}, {0x3a212000}, {0x3a214000}, {0x3a216000}, - {0x3a218000}, {0x3a21a000}, {0x3a21c000}, {0x3a21e000}, - {0x3a220000}, {0x3a222000}, {0x3a224000}, {0x3a226000}, - {0x3a228000}, {0x3a22a000}, {0x3a22c000}, {0x3a22e000}, - {0x3a230000}, {0x3a232000}, {0x3a234000}, {0x3a236000}, - {0x3a238000}, {0x3a23a000}, {0x3a23c000}, {0x3a23e000}, - {0x3a240000}, {0x3a242000}, {0x3a244000}, {0x3a246000}, - {0x3a248000}, {0x3a24a000}, {0x3a24c000}, {0x3a24e000}, - {0x3a250000}, {0x3a252000}, {0x3a254000}, {0x3a256000}, - {0x3a258000}, {0x3a25a000}, {0x3a25c000}, {0x3a25e000}, - {0x3a260000}, {0x3a262000}, {0x3a264000}, {0x3a266000}, - {0x3a268000}, {0x3a26a000}, {0x3a26c000}, {0x3a26e000}, - {0x3a270000}, {0x3a272000}, {0x3a274000}, {0x3a276000}, - {0x3a278000}, {0x3a27a000}, {0x3a27c000}, {0x3a27e000}, - {0x3a280000}, {0x3a282000}, {0x3a284000}, {0x3a286000}, - {0x3a288000}, {0x3a28a000}, {0x3a28c000}, {0x3a28e000}, - {0x3a290000}, {0x3a292000}, {0x3a294000}, {0x3a296000}, - {0x3a298000}, {0x3a29a000}, {0x3a29c000}, {0x3a29e000}, - {0x3a2a0000}, {0x3a2a2000}, {0x3a2a4000}, {0x3a2a6000}, - {0x3a2a8000}, {0x3a2aa000}, {0x3a2ac000}, {0x3a2ae000}, - {0x3a2b0000}, {0x3a2b2000}, {0x3a2b4000}, {0x3a2b6000}, - {0x3a2b8000}, {0x3a2ba000}, {0x3a2bc000}, {0x3a2be000}, - {0x3a2c0000}, {0x3a2c2000}, {0x3a2c4000}, {0x3a2c6000}, - {0x3a2c8000}, {0x3a2ca000}, {0x3a2cc000}, {0x3a2ce000}, - {0x3a2d0000}, {0x3a2d2000}, {0x3a2d4000}, {0x3a2d6000}, - {0x3a2d8000}, {0x3a2da000}, {0x3a2dc000}, {0x3a2de000}, - {0x3a2e0000}, {0x3a2e2000}, {0x3a2e4000}, {0x3a2e6000}, - {0x3a2e8000}, {0x3a2ea000}, {0x3a2ec000}, {0x3a2ee000}, - {0x3a2f0000}, {0x3a2f2000}, {0x3a2f4000}, {0x3a2f6000}, - {0x3a2f8000}, {0x3a2fa000}, {0x3a2fc000}, {0x3a2fe000}, - {0x3a300000}, {0x3a302000}, {0x3a304000}, {0x3a306000}, - {0x3a308000}, {0x3a30a000}, {0x3a30c000}, {0x3a30e000}, - {0x3a310000}, {0x3a312000}, {0x3a314000}, {0x3a316000}, - {0x3a318000}, {0x3a31a000}, {0x3a31c000}, {0x3a31e000}, - {0x3a320000}, {0x3a322000}, {0x3a324000}, {0x3a326000}, - {0x3a328000}, {0x3a32a000}, {0x3a32c000}, {0x3a32e000}, - {0x3a330000}, {0x3a332000}, {0x3a334000}, {0x3a336000}, - {0x3a338000}, {0x3a33a000}, {0x3a33c000}, {0x3a33e000}, - {0x3a340000}, {0x3a342000}, {0x3a344000}, {0x3a346000}, - {0x3a348000}, {0x3a34a000}, {0x3a34c000}, {0x3a34e000}, - {0x3a350000}, {0x3a352000}, {0x3a354000}, {0x3a356000}, - {0x3a358000}, {0x3a35a000}, {0x3a35c000}, {0x3a35e000}, - {0x3a360000}, {0x3a362000}, {0x3a364000}, {0x3a366000}, - {0x3a368000}, {0x3a36a000}, {0x3a36c000}, {0x3a36e000}, - {0x3a370000}, {0x3a372000}, {0x3a374000}, {0x3a376000}, - {0x3a378000}, {0x3a37a000}, {0x3a37c000}, {0x3a37e000}, - {0x3a380000}, {0x3a382000}, {0x3a384000}, {0x3a386000}, - {0x3a388000}, {0x3a38a000}, {0x3a38c000}, {0x3a38e000}, - {0x3a390000}, {0x3a392000}, {0x3a394000}, {0x3a396000}, - {0x3a398000}, {0x3a39a000}, {0x3a39c000}, {0x3a39e000}, - {0x3a3a0000}, {0x3a3a2000}, {0x3a3a4000}, {0x3a3a6000}, - {0x3a3a8000}, {0x3a3aa000}, {0x3a3ac000}, {0x3a3ae000}, - {0x3a3b0000}, {0x3a3b2000}, {0x3a3b4000}, {0x3a3b6000}, - {0x3a3b8000}, {0x3a3ba000}, {0x3a3bc000}, {0x3a3be000}, - {0x3a3c0000}, {0x3a3c2000}, {0x3a3c4000}, {0x3a3c6000}, - {0x3a3c8000}, {0x3a3ca000}, {0x3a3cc000}, {0x3a3ce000}, - {0x3a3d0000}, {0x3a3d2000}, {0x3a3d4000}, {0x3a3d6000}, - {0x3a3d8000}, {0x3a3da000}, {0x3a3dc000}, {0x3a3de000}, - {0x3a3e0000}, {0x3a3e2000}, {0x3a3e4000}, {0x3a3e6000}, - {0x3a3e8000}, {0x3a3ea000}, {0x3a3ec000}, {0x3a3ee000}, - {0x3a3f0000}, {0x3a3f2000}, {0x3a3f4000}, {0x3a3f6000}, - {0x3a3f8000}, {0x3a3fa000}, {0x3a3fc000}, {0x3a3fe000}, - {0x3a400000}, {0x3a402000}, {0x3a404000}, {0x3a406000}, - {0x3a408000}, {0x3a40a000}, {0x3a40c000}, {0x3a40e000}, - {0x3a410000}, {0x3a412000}, {0x3a414000}, {0x3a416000}, - {0x3a418000}, {0x3a41a000}, {0x3a41c000}, {0x3a41e000}, - {0x3a420000}, {0x3a422000}, {0x3a424000}, {0x3a426000}, - {0x3a428000}, {0x3a42a000}, {0x3a42c000}, {0x3a42e000}, - {0x3a430000}, {0x3a432000}, {0x3a434000}, {0x3a436000}, - {0x3a438000}, {0x3a43a000}, {0x3a43c000}, {0x3a43e000}, - {0x3a440000}, {0x3a442000}, {0x3a444000}, {0x3a446000}, - {0x3a448000}, {0x3a44a000}, {0x3a44c000}, {0x3a44e000}, - {0x3a450000}, {0x3a452000}, {0x3a454000}, {0x3a456000}, - {0x3a458000}, {0x3a45a000}, {0x3a45c000}, {0x3a45e000}, - {0x3a460000}, {0x3a462000}, {0x3a464000}, {0x3a466000}, - {0x3a468000}, {0x3a46a000}, {0x3a46c000}, {0x3a46e000}, - {0x3a470000}, {0x3a472000}, {0x3a474000}, {0x3a476000}, - {0x3a478000}, {0x3a47a000}, {0x3a47c000}, {0x3a47e000}, - {0x3a480000}, {0x3a482000}, {0x3a484000}, {0x3a486000}, - {0x3a488000}, {0x3a48a000}, {0x3a48c000}, {0x3a48e000}, - {0x3a490000}, {0x3a492000}, {0x3a494000}, {0x3a496000}, - {0x3a498000}, {0x3a49a000}, {0x3a49c000}, {0x3a49e000}, - {0x3a4a0000}, {0x3a4a2000}, {0x3a4a4000}, {0x3a4a6000}, - {0x3a4a8000}, {0x3a4aa000}, {0x3a4ac000}, {0x3a4ae000}, - {0x3a4b0000}, {0x3a4b2000}, {0x3a4b4000}, {0x3a4b6000}, - {0x3a4b8000}, {0x3a4ba000}, {0x3a4bc000}, {0x3a4be000}, - {0x3a4c0000}, {0x3a4c2000}, {0x3a4c4000}, {0x3a4c6000}, - {0x3a4c8000}, {0x3a4ca000}, {0x3a4cc000}, {0x3a4ce000}, - {0x3a4d0000}, {0x3a4d2000}, {0x3a4d4000}, {0x3a4d6000}, - {0x3a4d8000}, {0x3a4da000}, {0x3a4dc000}, {0x3a4de000}, - {0x3a4e0000}, {0x3a4e2000}, {0x3a4e4000}, {0x3a4e6000}, - {0x3a4e8000}, {0x3a4ea000}, {0x3a4ec000}, {0x3a4ee000}, - {0x3a4f0000}, {0x3a4f2000}, {0x3a4f4000}, {0x3a4f6000}, - {0x3a4f8000}, {0x3a4fa000}, {0x3a4fc000}, {0x3a4fe000}, - {0x3a500000}, {0x3a502000}, {0x3a504000}, {0x3a506000}, - {0x3a508000}, {0x3a50a000}, {0x3a50c000}, {0x3a50e000}, - {0x3a510000}, {0x3a512000}, {0x3a514000}, {0x3a516000}, - {0x3a518000}, {0x3a51a000}, {0x3a51c000}, {0x3a51e000}, - {0x3a520000}, {0x3a522000}, {0x3a524000}, {0x3a526000}, - {0x3a528000}, {0x3a52a000}, {0x3a52c000}, {0x3a52e000}, - {0x3a530000}, {0x3a532000}, {0x3a534000}, {0x3a536000}, - {0x3a538000}, {0x3a53a000}, {0x3a53c000}, {0x3a53e000}, - {0x3a540000}, {0x3a542000}, {0x3a544000}, {0x3a546000}, - {0x3a548000}, {0x3a54a000}, {0x3a54c000}, {0x3a54e000}, - {0x3a550000}, {0x3a552000}, {0x3a554000}, {0x3a556000}, - {0x3a558000}, {0x3a55a000}, {0x3a55c000}, {0x3a55e000}, - {0x3a560000}, {0x3a562000}, {0x3a564000}, {0x3a566000}, - {0x3a568000}, {0x3a56a000}, {0x3a56c000}, {0x3a56e000}, - {0x3a570000}, {0x3a572000}, {0x3a574000}, {0x3a576000}, - {0x3a578000}, {0x3a57a000}, {0x3a57c000}, {0x3a57e000}, - {0x3a580000}, {0x3a582000}, {0x3a584000}, {0x3a586000}, - {0x3a588000}, {0x3a58a000}, {0x3a58c000}, {0x3a58e000}, - {0x3a590000}, {0x3a592000}, {0x3a594000}, {0x3a596000}, - {0x3a598000}, {0x3a59a000}, {0x3a59c000}, {0x3a59e000}, - {0x3a5a0000}, {0x3a5a2000}, {0x3a5a4000}, {0x3a5a6000}, - {0x3a5a8000}, {0x3a5aa000}, {0x3a5ac000}, {0x3a5ae000}, - {0x3a5b0000}, {0x3a5b2000}, {0x3a5b4000}, {0x3a5b6000}, - {0x3a5b8000}, {0x3a5ba000}, {0x3a5bc000}, {0x3a5be000}, - {0x3a5c0000}, {0x3a5c2000}, {0x3a5c4000}, {0x3a5c6000}, - {0x3a5c8000}, {0x3a5ca000}, {0x3a5cc000}, {0x3a5ce000}, - {0x3a5d0000}, {0x3a5d2000}, {0x3a5d4000}, {0x3a5d6000}, - {0x3a5d8000}, {0x3a5da000}, {0x3a5dc000}, {0x3a5de000}, - {0x3a5e0000}, {0x3a5e2000}, {0x3a5e4000}, {0x3a5e6000}, - {0x3a5e8000}, {0x3a5ea000}, {0x3a5ec000}, {0x3a5ee000}, - {0x3a5f0000}, {0x3a5f2000}, {0x3a5f4000}, {0x3a5f6000}, - {0x3a5f8000}, {0x3a5fa000}, {0x3a5fc000}, {0x3a5fe000}, - {0x3a600000}, {0x3a602000}, {0x3a604000}, {0x3a606000}, - {0x3a608000}, {0x3a60a000}, {0x3a60c000}, {0x3a60e000}, - {0x3a610000}, {0x3a612000}, {0x3a614000}, {0x3a616000}, - {0x3a618000}, {0x3a61a000}, {0x3a61c000}, {0x3a61e000}, - {0x3a620000}, {0x3a622000}, {0x3a624000}, {0x3a626000}, - {0x3a628000}, {0x3a62a000}, {0x3a62c000}, {0x3a62e000}, - {0x3a630000}, {0x3a632000}, {0x3a634000}, {0x3a636000}, - {0x3a638000}, {0x3a63a000}, {0x3a63c000}, {0x3a63e000}, - {0x3a640000}, {0x3a642000}, {0x3a644000}, {0x3a646000}, - {0x3a648000}, {0x3a64a000}, {0x3a64c000}, {0x3a64e000}, - {0x3a650000}, {0x3a652000}, {0x3a654000}, {0x3a656000}, - {0x3a658000}, {0x3a65a000}, {0x3a65c000}, {0x3a65e000}, - {0x3a660000}, {0x3a662000}, {0x3a664000}, {0x3a666000}, - {0x3a668000}, {0x3a66a000}, {0x3a66c000}, {0x3a66e000}, - {0x3a670000}, {0x3a672000}, {0x3a674000}, {0x3a676000}, - {0x3a678000}, {0x3a67a000}, {0x3a67c000}, {0x3a67e000}, - {0x3a680000}, {0x3a682000}, {0x3a684000}, {0x3a686000}, - {0x3a688000}, {0x3a68a000}, {0x3a68c000}, {0x3a68e000}, - {0x3a690000}, {0x3a692000}, {0x3a694000}, {0x3a696000}, - {0x3a698000}, {0x3a69a000}, {0x3a69c000}, {0x3a69e000}, - {0x3a6a0000}, {0x3a6a2000}, {0x3a6a4000}, {0x3a6a6000}, - {0x3a6a8000}, {0x3a6aa000}, {0x3a6ac000}, {0x3a6ae000}, - {0x3a6b0000}, {0x3a6b2000}, {0x3a6b4000}, {0x3a6b6000}, - {0x3a6b8000}, {0x3a6ba000}, {0x3a6bc000}, {0x3a6be000}, - {0x3a6c0000}, {0x3a6c2000}, {0x3a6c4000}, {0x3a6c6000}, - {0x3a6c8000}, {0x3a6ca000}, {0x3a6cc000}, {0x3a6ce000}, - {0x3a6d0000}, {0x3a6d2000}, {0x3a6d4000}, {0x3a6d6000}, - {0x3a6d8000}, {0x3a6da000}, {0x3a6dc000}, {0x3a6de000}, - {0x3a6e0000}, {0x3a6e2000}, {0x3a6e4000}, {0x3a6e6000}, - {0x3a6e8000}, {0x3a6ea000}, {0x3a6ec000}, {0x3a6ee000}, - {0x3a6f0000}, {0x3a6f2000}, {0x3a6f4000}, {0x3a6f6000}, - {0x3a6f8000}, {0x3a6fa000}, {0x3a6fc000}, {0x3a6fe000}, - {0x3a700000}, {0x3a702000}, {0x3a704000}, {0x3a706000}, - {0x3a708000}, {0x3a70a000}, {0x3a70c000}, {0x3a70e000}, - {0x3a710000}, {0x3a712000}, {0x3a714000}, {0x3a716000}, - {0x3a718000}, {0x3a71a000}, {0x3a71c000}, {0x3a71e000}, - {0x3a720000}, {0x3a722000}, {0x3a724000}, {0x3a726000}, - {0x3a728000}, {0x3a72a000}, {0x3a72c000}, {0x3a72e000}, - {0x3a730000}, {0x3a732000}, {0x3a734000}, {0x3a736000}, - {0x3a738000}, {0x3a73a000}, {0x3a73c000}, {0x3a73e000}, - {0x3a740000}, {0x3a742000}, {0x3a744000}, {0x3a746000}, - {0x3a748000}, {0x3a74a000}, {0x3a74c000}, {0x3a74e000}, - {0x3a750000}, {0x3a752000}, {0x3a754000}, {0x3a756000}, - {0x3a758000}, {0x3a75a000}, {0x3a75c000}, {0x3a75e000}, - {0x3a760000}, {0x3a762000}, {0x3a764000}, {0x3a766000}, - {0x3a768000}, {0x3a76a000}, {0x3a76c000}, {0x3a76e000}, - {0x3a770000}, {0x3a772000}, {0x3a774000}, {0x3a776000}, - {0x3a778000}, {0x3a77a000}, {0x3a77c000}, {0x3a77e000}, - {0x3a780000}, {0x3a782000}, {0x3a784000}, {0x3a786000}, - {0x3a788000}, {0x3a78a000}, {0x3a78c000}, {0x3a78e000}, - {0x3a790000}, {0x3a792000}, {0x3a794000}, {0x3a796000}, - {0x3a798000}, {0x3a79a000}, {0x3a79c000}, {0x3a79e000}, - {0x3a7a0000}, {0x3a7a2000}, {0x3a7a4000}, {0x3a7a6000}, - {0x3a7a8000}, {0x3a7aa000}, {0x3a7ac000}, {0x3a7ae000}, - {0x3a7b0000}, {0x3a7b2000}, {0x3a7b4000}, {0x3a7b6000}, - {0x3a7b8000}, {0x3a7ba000}, {0x3a7bc000}, {0x3a7be000}, - {0x3a7c0000}, {0x3a7c2000}, {0x3a7c4000}, {0x3a7c6000}, - {0x3a7c8000}, {0x3a7ca000}, {0x3a7cc000}, {0x3a7ce000}, - {0x3a7d0000}, {0x3a7d2000}, {0x3a7d4000}, {0x3a7d6000}, - {0x3a7d8000}, {0x3a7da000}, {0x3a7dc000}, {0x3a7de000}, - {0x3a7e0000}, {0x3a7e2000}, {0x3a7e4000}, {0x3a7e6000}, - {0x3a7e8000}, {0x3a7ea000}, {0x3a7ec000}, {0x3a7ee000}, - {0x3a7f0000}, {0x3a7f2000}, {0x3a7f4000}, {0x3a7f6000}, - {0x3a7f8000}, {0x3a7fa000}, {0x3a7fc000}, {0x3a7fe000}, - {0x3a800000}, {0x3a802000}, {0x3a804000}, {0x3a806000}, - {0x3a808000}, {0x3a80a000}, {0x3a80c000}, {0x3a80e000}, - {0x3a810000}, {0x3a812000}, {0x3a814000}, {0x3a816000}, - {0x3a818000}, {0x3a81a000}, {0x3a81c000}, {0x3a81e000}, - {0x3a820000}, {0x3a822000}, {0x3a824000}, {0x3a826000}, - {0x3a828000}, {0x3a82a000}, {0x3a82c000}, {0x3a82e000}, - {0x3a830000}, {0x3a832000}, {0x3a834000}, {0x3a836000}, - {0x3a838000}, {0x3a83a000}, {0x3a83c000}, {0x3a83e000}, - {0x3a840000}, {0x3a842000}, {0x3a844000}, {0x3a846000}, - {0x3a848000}, {0x3a84a000}, {0x3a84c000}, {0x3a84e000}, - {0x3a850000}, {0x3a852000}, {0x3a854000}, {0x3a856000}, - {0x3a858000}, {0x3a85a000}, {0x3a85c000}, {0x3a85e000}, - {0x3a860000}, {0x3a862000}, {0x3a864000}, {0x3a866000}, - {0x3a868000}, {0x3a86a000}, {0x3a86c000}, {0x3a86e000}, - {0x3a870000}, {0x3a872000}, {0x3a874000}, {0x3a876000}, - {0x3a878000}, {0x3a87a000}, {0x3a87c000}, {0x3a87e000}, - {0x3a880000}, {0x3a882000}, {0x3a884000}, {0x3a886000}, - {0x3a888000}, {0x3a88a000}, {0x3a88c000}, {0x3a88e000}, - {0x3a890000}, {0x3a892000}, {0x3a894000}, {0x3a896000}, - {0x3a898000}, {0x3a89a000}, {0x3a89c000}, {0x3a89e000}, - {0x3a8a0000}, {0x3a8a2000}, {0x3a8a4000}, {0x3a8a6000}, - {0x3a8a8000}, {0x3a8aa000}, {0x3a8ac000}, {0x3a8ae000}, - {0x3a8b0000}, {0x3a8b2000}, {0x3a8b4000}, {0x3a8b6000}, - {0x3a8b8000}, {0x3a8ba000}, {0x3a8bc000}, {0x3a8be000}, - {0x3a8c0000}, {0x3a8c2000}, {0x3a8c4000}, {0x3a8c6000}, - {0x3a8c8000}, {0x3a8ca000}, {0x3a8cc000}, {0x3a8ce000}, - {0x3a8d0000}, {0x3a8d2000}, {0x3a8d4000}, {0x3a8d6000}, - {0x3a8d8000}, {0x3a8da000}, {0x3a8dc000}, {0x3a8de000}, - {0x3a8e0000}, {0x3a8e2000}, {0x3a8e4000}, {0x3a8e6000}, - {0x3a8e8000}, {0x3a8ea000}, {0x3a8ec000}, {0x3a8ee000}, - {0x3a8f0000}, {0x3a8f2000}, {0x3a8f4000}, {0x3a8f6000}, - {0x3a8f8000}, {0x3a8fa000}, {0x3a8fc000}, {0x3a8fe000}, - {0x3a900000}, {0x3a902000}, {0x3a904000}, {0x3a906000}, - {0x3a908000}, {0x3a90a000}, {0x3a90c000}, {0x3a90e000}, - {0x3a910000}, {0x3a912000}, {0x3a914000}, {0x3a916000}, - {0x3a918000}, {0x3a91a000}, {0x3a91c000}, {0x3a91e000}, - {0x3a920000}, {0x3a922000}, {0x3a924000}, {0x3a926000}, - {0x3a928000}, {0x3a92a000}, {0x3a92c000}, {0x3a92e000}, - {0x3a930000}, {0x3a932000}, {0x3a934000}, {0x3a936000}, - {0x3a938000}, {0x3a93a000}, {0x3a93c000}, {0x3a93e000}, - {0x3a940000}, {0x3a942000}, {0x3a944000}, {0x3a946000}, - {0x3a948000}, {0x3a94a000}, {0x3a94c000}, {0x3a94e000}, - {0x3a950000}, {0x3a952000}, {0x3a954000}, {0x3a956000}, - {0x3a958000}, {0x3a95a000}, {0x3a95c000}, {0x3a95e000}, - {0x3a960000}, {0x3a962000}, {0x3a964000}, {0x3a966000}, - {0x3a968000}, {0x3a96a000}, {0x3a96c000}, {0x3a96e000}, - {0x3a970000}, {0x3a972000}, {0x3a974000}, {0x3a976000}, - {0x3a978000}, {0x3a97a000}, {0x3a97c000}, {0x3a97e000}, - {0x3a980000}, {0x3a982000}, {0x3a984000}, {0x3a986000}, - {0x3a988000}, {0x3a98a000}, {0x3a98c000}, {0x3a98e000}, - {0x3a990000}, {0x3a992000}, {0x3a994000}, {0x3a996000}, - {0x3a998000}, {0x3a99a000}, {0x3a99c000}, {0x3a99e000}, - {0x3a9a0000}, {0x3a9a2000}, {0x3a9a4000}, {0x3a9a6000}, - {0x3a9a8000}, {0x3a9aa000}, {0x3a9ac000}, {0x3a9ae000}, - {0x3a9b0000}, {0x3a9b2000}, {0x3a9b4000}, {0x3a9b6000}, - {0x3a9b8000}, {0x3a9ba000}, {0x3a9bc000}, {0x3a9be000}, - {0x3a9c0000}, {0x3a9c2000}, {0x3a9c4000}, {0x3a9c6000}, - {0x3a9c8000}, {0x3a9ca000}, {0x3a9cc000}, {0x3a9ce000}, - {0x3a9d0000}, {0x3a9d2000}, {0x3a9d4000}, {0x3a9d6000}, - {0x3a9d8000}, {0x3a9da000}, {0x3a9dc000}, {0x3a9de000}, - {0x3a9e0000}, {0x3a9e2000}, {0x3a9e4000}, {0x3a9e6000}, - {0x3a9e8000}, {0x3a9ea000}, {0x3a9ec000}, {0x3a9ee000}, - {0x3a9f0000}, {0x3a9f2000}, {0x3a9f4000}, {0x3a9f6000}, - {0x3a9f8000}, {0x3a9fa000}, {0x3a9fc000}, {0x3a9fe000}, - {0x3aa00000}, {0x3aa02000}, {0x3aa04000}, {0x3aa06000}, - {0x3aa08000}, {0x3aa0a000}, {0x3aa0c000}, {0x3aa0e000}, - {0x3aa10000}, {0x3aa12000}, {0x3aa14000}, {0x3aa16000}, - {0x3aa18000}, {0x3aa1a000}, {0x3aa1c000}, {0x3aa1e000}, - {0x3aa20000}, {0x3aa22000}, {0x3aa24000}, {0x3aa26000}, - {0x3aa28000}, {0x3aa2a000}, {0x3aa2c000}, {0x3aa2e000}, - {0x3aa30000}, {0x3aa32000}, {0x3aa34000}, {0x3aa36000}, - {0x3aa38000}, {0x3aa3a000}, {0x3aa3c000}, {0x3aa3e000}, - {0x3aa40000}, {0x3aa42000}, {0x3aa44000}, {0x3aa46000}, - {0x3aa48000}, {0x3aa4a000}, {0x3aa4c000}, {0x3aa4e000}, - {0x3aa50000}, {0x3aa52000}, {0x3aa54000}, {0x3aa56000}, - {0x3aa58000}, {0x3aa5a000}, {0x3aa5c000}, {0x3aa5e000}, - {0x3aa60000}, {0x3aa62000}, {0x3aa64000}, {0x3aa66000}, - {0x3aa68000}, {0x3aa6a000}, {0x3aa6c000}, {0x3aa6e000}, - {0x3aa70000}, {0x3aa72000}, {0x3aa74000}, {0x3aa76000}, - {0x3aa78000}, {0x3aa7a000}, {0x3aa7c000}, {0x3aa7e000}, - {0x3aa80000}, {0x3aa82000}, {0x3aa84000}, {0x3aa86000}, - {0x3aa88000}, {0x3aa8a000}, {0x3aa8c000}, {0x3aa8e000}, - {0x3aa90000}, {0x3aa92000}, {0x3aa94000}, {0x3aa96000}, - {0x3aa98000}, {0x3aa9a000}, {0x3aa9c000}, {0x3aa9e000}, - {0x3aaa0000}, {0x3aaa2000}, {0x3aaa4000}, {0x3aaa6000}, - {0x3aaa8000}, {0x3aaaa000}, {0x3aaac000}, {0x3aaae000}, - {0x3aab0000}, {0x3aab2000}, {0x3aab4000}, {0x3aab6000}, - {0x3aab8000}, {0x3aaba000}, {0x3aabc000}, {0x3aabe000}, - {0x3aac0000}, {0x3aac2000}, {0x3aac4000}, {0x3aac6000}, - {0x3aac8000}, {0x3aaca000}, {0x3aacc000}, {0x3aace000}, - {0x3aad0000}, {0x3aad2000}, {0x3aad4000}, {0x3aad6000}, - {0x3aad8000}, {0x3aada000}, {0x3aadc000}, {0x3aade000}, - {0x3aae0000}, {0x3aae2000}, {0x3aae4000}, {0x3aae6000}, - {0x3aae8000}, {0x3aaea000}, {0x3aaec000}, {0x3aaee000}, - {0x3aaf0000}, {0x3aaf2000}, {0x3aaf4000}, {0x3aaf6000}, - {0x3aaf8000}, {0x3aafa000}, {0x3aafc000}, {0x3aafe000}, - {0x3ab00000}, {0x3ab02000}, {0x3ab04000}, {0x3ab06000}, - {0x3ab08000}, {0x3ab0a000}, {0x3ab0c000}, {0x3ab0e000}, - {0x3ab10000}, {0x3ab12000}, {0x3ab14000}, {0x3ab16000}, - {0x3ab18000}, {0x3ab1a000}, {0x3ab1c000}, {0x3ab1e000}, - {0x3ab20000}, {0x3ab22000}, {0x3ab24000}, {0x3ab26000}, - {0x3ab28000}, {0x3ab2a000}, {0x3ab2c000}, {0x3ab2e000}, - {0x3ab30000}, {0x3ab32000}, {0x3ab34000}, {0x3ab36000}, - {0x3ab38000}, {0x3ab3a000}, {0x3ab3c000}, {0x3ab3e000}, - {0x3ab40000}, {0x3ab42000}, {0x3ab44000}, {0x3ab46000}, - {0x3ab48000}, {0x3ab4a000}, {0x3ab4c000}, {0x3ab4e000}, - {0x3ab50000}, {0x3ab52000}, {0x3ab54000}, {0x3ab56000}, - {0x3ab58000}, {0x3ab5a000}, {0x3ab5c000}, {0x3ab5e000}, - {0x3ab60000}, {0x3ab62000}, {0x3ab64000}, {0x3ab66000}, - {0x3ab68000}, {0x3ab6a000}, {0x3ab6c000}, {0x3ab6e000}, - {0x3ab70000}, {0x3ab72000}, {0x3ab74000}, {0x3ab76000}, - {0x3ab78000}, {0x3ab7a000}, {0x3ab7c000}, {0x3ab7e000}, - {0x3ab80000}, {0x3ab82000}, {0x3ab84000}, {0x3ab86000}, - {0x3ab88000}, {0x3ab8a000}, {0x3ab8c000}, {0x3ab8e000}, - {0x3ab90000}, {0x3ab92000}, {0x3ab94000}, {0x3ab96000}, - {0x3ab98000}, {0x3ab9a000}, {0x3ab9c000}, {0x3ab9e000}, - {0x3aba0000}, {0x3aba2000}, {0x3aba4000}, {0x3aba6000}, - {0x3aba8000}, {0x3abaa000}, {0x3abac000}, {0x3abae000}, - {0x3abb0000}, {0x3abb2000}, {0x3abb4000}, {0x3abb6000}, - {0x3abb8000}, {0x3abba000}, {0x3abbc000}, {0x3abbe000}, - {0x3abc0000}, {0x3abc2000}, {0x3abc4000}, {0x3abc6000}, - {0x3abc8000}, {0x3abca000}, {0x3abcc000}, {0x3abce000}, - {0x3abd0000}, {0x3abd2000}, {0x3abd4000}, {0x3abd6000}, - {0x3abd8000}, {0x3abda000}, {0x3abdc000}, {0x3abde000}, - {0x3abe0000}, {0x3abe2000}, {0x3abe4000}, {0x3abe6000}, - {0x3abe8000}, {0x3abea000}, {0x3abec000}, {0x3abee000}, - {0x3abf0000}, {0x3abf2000}, {0x3abf4000}, {0x3abf6000}, - {0x3abf8000}, {0x3abfa000}, {0x3abfc000}, {0x3abfe000}, - {0x3ac00000}, {0x3ac02000}, {0x3ac04000}, {0x3ac06000}, - {0x3ac08000}, {0x3ac0a000}, {0x3ac0c000}, {0x3ac0e000}, - {0x3ac10000}, {0x3ac12000}, {0x3ac14000}, {0x3ac16000}, - {0x3ac18000}, {0x3ac1a000}, {0x3ac1c000}, {0x3ac1e000}, - {0x3ac20000}, {0x3ac22000}, {0x3ac24000}, {0x3ac26000}, - {0x3ac28000}, {0x3ac2a000}, {0x3ac2c000}, {0x3ac2e000}, - {0x3ac30000}, {0x3ac32000}, {0x3ac34000}, {0x3ac36000}, - {0x3ac38000}, {0x3ac3a000}, {0x3ac3c000}, {0x3ac3e000}, - {0x3ac40000}, {0x3ac42000}, {0x3ac44000}, {0x3ac46000}, - {0x3ac48000}, {0x3ac4a000}, {0x3ac4c000}, {0x3ac4e000}, - {0x3ac50000}, {0x3ac52000}, {0x3ac54000}, {0x3ac56000}, - {0x3ac58000}, {0x3ac5a000}, {0x3ac5c000}, {0x3ac5e000}, - {0x3ac60000}, {0x3ac62000}, {0x3ac64000}, {0x3ac66000}, - {0x3ac68000}, {0x3ac6a000}, {0x3ac6c000}, {0x3ac6e000}, - {0x3ac70000}, {0x3ac72000}, {0x3ac74000}, {0x3ac76000}, - {0x3ac78000}, {0x3ac7a000}, {0x3ac7c000}, {0x3ac7e000}, - {0x3ac80000}, {0x3ac82000}, {0x3ac84000}, {0x3ac86000}, - {0x3ac88000}, {0x3ac8a000}, {0x3ac8c000}, {0x3ac8e000}, - {0x3ac90000}, {0x3ac92000}, {0x3ac94000}, {0x3ac96000}, - {0x3ac98000}, {0x3ac9a000}, {0x3ac9c000}, {0x3ac9e000}, - {0x3aca0000}, {0x3aca2000}, {0x3aca4000}, {0x3aca6000}, - {0x3aca8000}, {0x3acaa000}, {0x3acac000}, {0x3acae000}, - {0x3acb0000}, {0x3acb2000}, {0x3acb4000}, {0x3acb6000}, - {0x3acb8000}, {0x3acba000}, {0x3acbc000}, {0x3acbe000}, - {0x3acc0000}, {0x3acc2000}, {0x3acc4000}, {0x3acc6000}, - {0x3acc8000}, {0x3acca000}, {0x3accc000}, {0x3acce000}, - {0x3acd0000}, {0x3acd2000}, {0x3acd4000}, {0x3acd6000}, - {0x3acd8000}, {0x3acda000}, {0x3acdc000}, {0x3acde000}, - {0x3ace0000}, {0x3ace2000}, {0x3ace4000}, {0x3ace6000}, - {0x3ace8000}, {0x3acea000}, {0x3acec000}, {0x3acee000}, - {0x3acf0000}, {0x3acf2000}, {0x3acf4000}, {0x3acf6000}, - {0x3acf8000}, {0x3acfa000}, {0x3acfc000}, {0x3acfe000}, - {0x3ad00000}, {0x3ad02000}, {0x3ad04000}, {0x3ad06000}, - {0x3ad08000}, {0x3ad0a000}, {0x3ad0c000}, {0x3ad0e000}, - {0x3ad10000}, {0x3ad12000}, {0x3ad14000}, {0x3ad16000}, - {0x3ad18000}, {0x3ad1a000}, {0x3ad1c000}, {0x3ad1e000}, - {0x3ad20000}, {0x3ad22000}, {0x3ad24000}, {0x3ad26000}, - {0x3ad28000}, {0x3ad2a000}, {0x3ad2c000}, {0x3ad2e000}, - {0x3ad30000}, {0x3ad32000}, {0x3ad34000}, {0x3ad36000}, - {0x3ad38000}, {0x3ad3a000}, {0x3ad3c000}, {0x3ad3e000}, - {0x3ad40000}, {0x3ad42000}, {0x3ad44000}, {0x3ad46000}, - {0x3ad48000}, {0x3ad4a000}, {0x3ad4c000}, {0x3ad4e000}, - {0x3ad50000}, {0x3ad52000}, {0x3ad54000}, {0x3ad56000}, - {0x3ad58000}, {0x3ad5a000}, {0x3ad5c000}, {0x3ad5e000}, - {0x3ad60000}, {0x3ad62000}, {0x3ad64000}, {0x3ad66000}, - {0x3ad68000}, {0x3ad6a000}, {0x3ad6c000}, {0x3ad6e000}, - {0x3ad70000}, {0x3ad72000}, {0x3ad74000}, {0x3ad76000}, - {0x3ad78000}, {0x3ad7a000}, {0x3ad7c000}, {0x3ad7e000}, - {0x3ad80000}, {0x3ad82000}, {0x3ad84000}, {0x3ad86000}, - {0x3ad88000}, {0x3ad8a000}, {0x3ad8c000}, {0x3ad8e000}, - {0x3ad90000}, {0x3ad92000}, {0x3ad94000}, {0x3ad96000}, - {0x3ad98000}, {0x3ad9a000}, {0x3ad9c000}, {0x3ad9e000}, - {0x3ada0000}, {0x3ada2000}, {0x3ada4000}, {0x3ada6000}, - {0x3ada8000}, {0x3adaa000}, {0x3adac000}, {0x3adae000}, - {0x3adb0000}, {0x3adb2000}, {0x3adb4000}, {0x3adb6000}, - {0x3adb8000}, {0x3adba000}, {0x3adbc000}, {0x3adbe000}, - {0x3adc0000}, {0x3adc2000}, {0x3adc4000}, {0x3adc6000}, - {0x3adc8000}, {0x3adca000}, {0x3adcc000}, {0x3adce000}, - {0x3add0000}, {0x3add2000}, {0x3add4000}, {0x3add6000}, - {0x3add8000}, {0x3adda000}, {0x3addc000}, {0x3adde000}, - {0x3ade0000}, {0x3ade2000}, {0x3ade4000}, {0x3ade6000}, - {0x3ade8000}, {0x3adea000}, {0x3adec000}, {0x3adee000}, - {0x3adf0000}, {0x3adf2000}, {0x3adf4000}, {0x3adf6000}, - {0x3adf8000}, {0x3adfa000}, {0x3adfc000}, {0x3adfe000}, - {0x3ae00000}, {0x3ae02000}, {0x3ae04000}, {0x3ae06000}, - {0x3ae08000}, {0x3ae0a000}, {0x3ae0c000}, {0x3ae0e000}, - {0x3ae10000}, {0x3ae12000}, {0x3ae14000}, {0x3ae16000}, - {0x3ae18000}, {0x3ae1a000}, {0x3ae1c000}, {0x3ae1e000}, - {0x3ae20000}, {0x3ae22000}, {0x3ae24000}, {0x3ae26000}, - {0x3ae28000}, {0x3ae2a000}, {0x3ae2c000}, {0x3ae2e000}, - {0x3ae30000}, {0x3ae32000}, {0x3ae34000}, {0x3ae36000}, - {0x3ae38000}, {0x3ae3a000}, {0x3ae3c000}, {0x3ae3e000}, - {0x3ae40000}, {0x3ae42000}, {0x3ae44000}, {0x3ae46000}, - {0x3ae48000}, {0x3ae4a000}, {0x3ae4c000}, {0x3ae4e000}, - {0x3ae50000}, {0x3ae52000}, {0x3ae54000}, {0x3ae56000}, - {0x3ae58000}, {0x3ae5a000}, {0x3ae5c000}, {0x3ae5e000}, - {0x3ae60000}, {0x3ae62000}, {0x3ae64000}, {0x3ae66000}, - {0x3ae68000}, {0x3ae6a000}, {0x3ae6c000}, {0x3ae6e000}, - {0x3ae70000}, {0x3ae72000}, {0x3ae74000}, {0x3ae76000}, - {0x3ae78000}, {0x3ae7a000}, {0x3ae7c000}, {0x3ae7e000}, - {0x3ae80000}, {0x3ae82000}, {0x3ae84000}, {0x3ae86000}, - {0x3ae88000}, {0x3ae8a000}, {0x3ae8c000}, {0x3ae8e000}, - {0x3ae90000}, {0x3ae92000}, {0x3ae94000}, {0x3ae96000}, - {0x3ae98000}, {0x3ae9a000}, {0x3ae9c000}, {0x3ae9e000}, - {0x3aea0000}, {0x3aea2000}, {0x3aea4000}, {0x3aea6000}, - {0x3aea8000}, {0x3aeaa000}, {0x3aeac000}, {0x3aeae000}, - {0x3aeb0000}, {0x3aeb2000}, {0x3aeb4000}, {0x3aeb6000}, - {0x3aeb8000}, {0x3aeba000}, {0x3aebc000}, {0x3aebe000}, - {0x3aec0000}, {0x3aec2000}, {0x3aec4000}, {0x3aec6000}, - {0x3aec8000}, {0x3aeca000}, {0x3aecc000}, {0x3aece000}, - {0x3aed0000}, {0x3aed2000}, {0x3aed4000}, {0x3aed6000}, - {0x3aed8000}, {0x3aeda000}, {0x3aedc000}, {0x3aede000}, - {0x3aee0000}, {0x3aee2000}, {0x3aee4000}, {0x3aee6000}, - {0x3aee8000}, {0x3aeea000}, {0x3aeec000}, {0x3aeee000}, - {0x3aef0000}, {0x3aef2000}, {0x3aef4000}, {0x3aef6000}, - {0x3aef8000}, {0x3aefa000}, {0x3aefc000}, {0x3aefe000}, - {0x3af00000}, {0x3af02000}, {0x3af04000}, {0x3af06000}, - {0x3af08000}, {0x3af0a000}, {0x3af0c000}, {0x3af0e000}, - {0x3af10000}, {0x3af12000}, {0x3af14000}, {0x3af16000}, - {0x3af18000}, {0x3af1a000}, {0x3af1c000}, {0x3af1e000}, - {0x3af20000}, {0x3af22000}, {0x3af24000}, {0x3af26000}, - {0x3af28000}, {0x3af2a000}, {0x3af2c000}, {0x3af2e000}, - {0x3af30000}, {0x3af32000}, {0x3af34000}, {0x3af36000}, - {0x3af38000}, {0x3af3a000}, {0x3af3c000}, {0x3af3e000}, - {0x3af40000}, {0x3af42000}, {0x3af44000}, {0x3af46000}, - {0x3af48000}, {0x3af4a000}, {0x3af4c000}, {0x3af4e000}, - {0x3af50000}, {0x3af52000}, {0x3af54000}, {0x3af56000}, - {0x3af58000}, {0x3af5a000}, {0x3af5c000}, {0x3af5e000}, - {0x3af60000}, {0x3af62000}, {0x3af64000}, {0x3af66000}, - {0x3af68000}, {0x3af6a000}, {0x3af6c000}, {0x3af6e000}, - {0x3af70000}, {0x3af72000}, {0x3af74000}, {0x3af76000}, - {0x3af78000}, {0x3af7a000}, {0x3af7c000}, {0x3af7e000}, - {0x3af80000}, {0x3af82000}, {0x3af84000}, {0x3af86000}, - {0x3af88000}, {0x3af8a000}, {0x3af8c000}, {0x3af8e000}, - {0x3af90000}, {0x3af92000}, {0x3af94000}, {0x3af96000}, - {0x3af98000}, {0x3af9a000}, {0x3af9c000}, {0x3af9e000}, - {0x3afa0000}, {0x3afa2000}, {0x3afa4000}, {0x3afa6000}, - {0x3afa8000}, {0x3afaa000}, {0x3afac000}, {0x3afae000}, - {0x3afb0000}, {0x3afb2000}, {0x3afb4000}, {0x3afb6000}, - {0x3afb8000}, {0x3afba000}, {0x3afbc000}, {0x3afbe000}, - {0x3afc0000}, {0x3afc2000}, {0x3afc4000}, {0x3afc6000}, - {0x3afc8000}, {0x3afca000}, {0x3afcc000}, {0x3afce000}, - {0x3afd0000}, {0x3afd2000}, {0x3afd4000}, {0x3afd6000}, - {0x3afd8000}, {0x3afda000}, {0x3afdc000}, {0x3afde000}, - {0x3afe0000}, {0x3afe2000}, {0x3afe4000}, {0x3afe6000}, - {0x3afe8000}, {0x3afea000}, {0x3afec000}, {0x3afee000}, - {0x3aff0000}, {0x3aff2000}, {0x3aff4000}, {0x3aff6000}, - {0x3aff8000}, {0x3affa000}, {0x3affc000}, {0x3affe000}, - {0x3b000000}, {0x3b002000}, {0x3b004000}, {0x3b006000}, - {0x3b008000}, {0x3b00a000}, {0x3b00c000}, {0x3b00e000}, - {0x3b010000}, {0x3b012000}, {0x3b014000}, {0x3b016000}, - {0x3b018000}, {0x3b01a000}, {0x3b01c000}, {0x3b01e000}, - {0x3b020000}, {0x3b022000}, {0x3b024000}, {0x3b026000}, - {0x3b028000}, {0x3b02a000}, {0x3b02c000}, {0x3b02e000}, - {0x3b030000}, {0x3b032000}, {0x3b034000}, {0x3b036000}, - {0x3b038000}, {0x3b03a000}, {0x3b03c000}, {0x3b03e000}, - {0x3b040000}, {0x3b042000}, {0x3b044000}, {0x3b046000}, - {0x3b048000}, {0x3b04a000}, {0x3b04c000}, {0x3b04e000}, - {0x3b050000}, {0x3b052000}, {0x3b054000}, {0x3b056000}, - {0x3b058000}, {0x3b05a000}, {0x3b05c000}, {0x3b05e000}, - {0x3b060000}, {0x3b062000}, {0x3b064000}, {0x3b066000}, - {0x3b068000}, {0x3b06a000}, {0x3b06c000}, {0x3b06e000}, - {0x3b070000}, {0x3b072000}, {0x3b074000}, {0x3b076000}, - {0x3b078000}, {0x3b07a000}, {0x3b07c000}, {0x3b07e000}, - {0x3b080000}, {0x3b082000}, {0x3b084000}, {0x3b086000}, - {0x3b088000}, {0x3b08a000}, {0x3b08c000}, {0x3b08e000}, - {0x3b090000}, {0x3b092000}, {0x3b094000}, {0x3b096000}, - {0x3b098000}, {0x3b09a000}, {0x3b09c000}, {0x3b09e000}, - {0x3b0a0000}, {0x3b0a2000}, {0x3b0a4000}, {0x3b0a6000}, - {0x3b0a8000}, {0x3b0aa000}, {0x3b0ac000}, {0x3b0ae000}, - {0x3b0b0000}, {0x3b0b2000}, {0x3b0b4000}, {0x3b0b6000}, - {0x3b0b8000}, {0x3b0ba000}, {0x3b0bc000}, {0x3b0be000}, - {0x3b0c0000}, {0x3b0c2000}, {0x3b0c4000}, {0x3b0c6000}, - {0x3b0c8000}, {0x3b0ca000}, {0x3b0cc000}, {0x3b0ce000}, - {0x3b0d0000}, {0x3b0d2000}, {0x3b0d4000}, {0x3b0d6000}, - {0x3b0d8000}, {0x3b0da000}, {0x3b0dc000}, {0x3b0de000}, - {0x3b0e0000}, {0x3b0e2000}, {0x3b0e4000}, {0x3b0e6000}, - {0x3b0e8000}, {0x3b0ea000}, {0x3b0ec000}, {0x3b0ee000}, - {0x3b0f0000}, {0x3b0f2000}, {0x3b0f4000}, {0x3b0f6000}, - {0x3b0f8000}, {0x3b0fa000}, {0x3b0fc000}, {0x3b0fe000}, - {0x3b100000}, {0x3b102000}, {0x3b104000}, {0x3b106000}, - {0x3b108000}, {0x3b10a000}, {0x3b10c000}, {0x3b10e000}, - {0x3b110000}, {0x3b112000}, {0x3b114000}, {0x3b116000}, - {0x3b118000}, {0x3b11a000}, {0x3b11c000}, {0x3b11e000}, - {0x3b120000}, {0x3b122000}, {0x3b124000}, {0x3b126000}, - {0x3b128000}, {0x3b12a000}, {0x3b12c000}, {0x3b12e000}, - {0x3b130000}, {0x3b132000}, {0x3b134000}, {0x3b136000}, - {0x3b138000}, {0x3b13a000}, {0x3b13c000}, {0x3b13e000}, - {0x3b140000}, {0x3b142000}, {0x3b144000}, {0x3b146000}, - {0x3b148000}, {0x3b14a000}, {0x3b14c000}, {0x3b14e000}, - {0x3b150000}, {0x3b152000}, {0x3b154000}, {0x3b156000}, - {0x3b158000}, {0x3b15a000}, {0x3b15c000}, {0x3b15e000}, - {0x3b160000}, {0x3b162000}, {0x3b164000}, {0x3b166000}, - {0x3b168000}, {0x3b16a000}, {0x3b16c000}, {0x3b16e000}, - {0x3b170000}, {0x3b172000}, {0x3b174000}, {0x3b176000}, - {0x3b178000}, {0x3b17a000}, {0x3b17c000}, {0x3b17e000}, - {0x3b180000}, {0x3b182000}, {0x3b184000}, {0x3b186000}, - {0x3b188000}, {0x3b18a000}, {0x3b18c000}, {0x3b18e000}, - {0x3b190000}, {0x3b192000}, {0x3b194000}, {0x3b196000}, - {0x3b198000}, {0x3b19a000}, {0x3b19c000}, {0x3b19e000}, - {0x3b1a0000}, {0x3b1a2000}, {0x3b1a4000}, {0x3b1a6000}, - {0x3b1a8000}, {0x3b1aa000}, {0x3b1ac000}, {0x3b1ae000}, - {0x3b1b0000}, {0x3b1b2000}, {0x3b1b4000}, {0x3b1b6000}, - {0x3b1b8000}, {0x3b1ba000}, {0x3b1bc000}, {0x3b1be000}, - {0x3b1c0000}, {0x3b1c2000}, {0x3b1c4000}, {0x3b1c6000}, - {0x3b1c8000}, {0x3b1ca000}, {0x3b1cc000}, {0x3b1ce000}, - {0x3b1d0000}, {0x3b1d2000}, {0x3b1d4000}, {0x3b1d6000}, - {0x3b1d8000}, {0x3b1da000}, {0x3b1dc000}, {0x3b1de000}, - {0x3b1e0000}, {0x3b1e2000}, {0x3b1e4000}, {0x3b1e6000}, - {0x3b1e8000}, {0x3b1ea000}, {0x3b1ec000}, {0x3b1ee000}, - {0x3b1f0000}, {0x3b1f2000}, {0x3b1f4000}, {0x3b1f6000}, - {0x3b1f8000}, {0x3b1fa000}, {0x3b1fc000}, {0x3b1fe000}, - {0x3b200000}, {0x3b202000}, {0x3b204000}, {0x3b206000}, - {0x3b208000}, {0x3b20a000}, {0x3b20c000}, {0x3b20e000}, - {0x3b210000}, {0x3b212000}, {0x3b214000}, {0x3b216000}, - {0x3b218000}, {0x3b21a000}, {0x3b21c000}, {0x3b21e000}, - {0x3b220000}, {0x3b222000}, {0x3b224000}, {0x3b226000}, - {0x3b228000}, {0x3b22a000}, {0x3b22c000}, {0x3b22e000}, - {0x3b230000}, {0x3b232000}, {0x3b234000}, {0x3b236000}, - {0x3b238000}, {0x3b23a000}, {0x3b23c000}, {0x3b23e000}, - {0x3b240000}, {0x3b242000}, {0x3b244000}, {0x3b246000}, - {0x3b248000}, {0x3b24a000}, {0x3b24c000}, {0x3b24e000}, - {0x3b250000}, {0x3b252000}, {0x3b254000}, {0x3b256000}, - {0x3b258000}, {0x3b25a000}, {0x3b25c000}, {0x3b25e000}, - {0x3b260000}, {0x3b262000}, {0x3b264000}, {0x3b266000}, - {0x3b268000}, {0x3b26a000}, {0x3b26c000}, {0x3b26e000}, - {0x3b270000}, {0x3b272000}, {0x3b274000}, {0x3b276000}, - {0x3b278000}, {0x3b27a000}, {0x3b27c000}, {0x3b27e000}, - {0x3b280000}, {0x3b282000}, {0x3b284000}, {0x3b286000}, - {0x3b288000}, {0x3b28a000}, {0x3b28c000}, {0x3b28e000}, - {0x3b290000}, {0x3b292000}, {0x3b294000}, {0x3b296000}, - {0x3b298000}, {0x3b29a000}, {0x3b29c000}, {0x3b29e000}, - {0x3b2a0000}, {0x3b2a2000}, {0x3b2a4000}, {0x3b2a6000}, - {0x3b2a8000}, {0x3b2aa000}, {0x3b2ac000}, {0x3b2ae000}, - {0x3b2b0000}, {0x3b2b2000}, {0x3b2b4000}, {0x3b2b6000}, - {0x3b2b8000}, {0x3b2ba000}, {0x3b2bc000}, {0x3b2be000}, - {0x3b2c0000}, {0x3b2c2000}, {0x3b2c4000}, {0x3b2c6000}, - {0x3b2c8000}, {0x3b2ca000}, {0x3b2cc000}, {0x3b2ce000}, - {0x3b2d0000}, {0x3b2d2000}, {0x3b2d4000}, {0x3b2d6000}, - {0x3b2d8000}, {0x3b2da000}, {0x3b2dc000}, {0x3b2de000}, - {0x3b2e0000}, {0x3b2e2000}, {0x3b2e4000}, {0x3b2e6000}, - {0x3b2e8000}, {0x3b2ea000}, {0x3b2ec000}, {0x3b2ee000}, - {0x3b2f0000}, {0x3b2f2000}, {0x3b2f4000}, {0x3b2f6000}, - {0x3b2f8000}, {0x3b2fa000}, {0x3b2fc000}, {0x3b2fe000}, - {0x3b300000}, {0x3b302000}, {0x3b304000}, {0x3b306000}, - {0x3b308000}, {0x3b30a000}, {0x3b30c000}, {0x3b30e000}, - {0x3b310000}, {0x3b312000}, {0x3b314000}, {0x3b316000}, - {0x3b318000}, {0x3b31a000}, {0x3b31c000}, {0x3b31e000}, - {0x3b320000}, {0x3b322000}, {0x3b324000}, {0x3b326000}, - {0x3b328000}, {0x3b32a000}, {0x3b32c000}, {0x3b32e000}, - {0x3b330000}, {0x3b332000}, {0x3b334000}, {0x3b336000}, - {0x3b338000}, {0x3b33a000}, {0x3b33c000}, {0x3b33e000}, - {0x3b340000}, {0x3b342000}, {0x3b344000}, {0x3b346000}, - {0x3b348000}, {0x3b34a000}, {0x3b34c000}, {0x3b34e000}, - {0x3b350000}, {0x3b352000}, {0x3b354000}, {0x3b356000}, - {0x3b358000}, {0x3b35a000}, {0x3b35c000}, {0x3b35e000}, - {0x3b360000}, {0x3b362000}, {0x3b364000}, {0x3b366000}, - {0x3b368000}, {0x3b36a000}, {0x3b36c000}, {0x3b36e000}, - {0x3b370000}, {0x3b372000}, {0x3b374000}, {0x3b376000}, - {0x3b378000}, {0x3b37a000}, {0x3b37c000}, {0x3b37e000}, - {0x3b380000}, {0x3b382000}, {0x3b384000}, {0x3b386000}, - {0x3b388000}, {0x3b38a000}, {0x3b38c000}, {0x3b38e000}, - {0x3b390000}, {0x3b392000}, {0x3b394000}, {0x3b396000}, - {0x3b398000}, {0x3b39a000}, {0x3b39c000}, {0x3b39e000}, - {0x3b3a0000}, {0x3b3a2000}, {0x3b3a4000}, {0x3b3a6000}, - {0x3b3a8000}, {0x3b3aa000}, {0x3b3ac000}, {0x3b3ae000}, - {0x3b3b0000}, {0x3b3b2000}, {0x3b3b4000}, {0x3b3b6000}, - {0x3b3b8000}, {0x3b3ba000}, {0x3b3bc000}, {0x3b3be000}, - {0x3b3c0000}, {0x3b3c2000}, {0x3b3c4000}, {0x3b3c6000}, - {0x3b3c8000}, {0x3b3ca000}, {0x3b3cc000}, {0x3b3ce000}, - {0x3b3d0000}, {0x3b3d2000}, {0x3b3d4000}, {0x3b3d6000}, - {0x3b3d8000}, {0x3b3da000}, {0x3b3dc000}, {0x3b3de000}, - {0x3b3e0000}, {0x3b3e2000}, {0x3b3e4000}, {0x3b3e6000}, - {0x3b3e8000}, {0x3b3ea000}, {0x3b3ec000}, {0x3b3ee000}, - {0x3b3f0000}, {0x3b3f2000}, {0x3b3f4000}, {0x3b3f6000}, - {0x3b3f8000}, {0x3b3fa000}, {0x3b3fc000}, {0x3b3fe000}, - {0x3b400000}, {0x3b402000}, {0x3b404000}, {0x3b406000}, - {0x3b408000}, {0x3b40a000}, {0x3b40c000}, {0x3b40e000}, - {0x3b410000}, {0x3b412000}, {0x3b414000}, {0x3b416000}, - {0x3b418000}, {0x3b41a000}, {0x3b41c000}, {0x3b41e000}, - {0x3b420000}, {0x3b422000}, {0x3b424000}, {0x3b426000}, - {0x3b428000}, {0x3b42a000}, {0x3b42c000}, {0x3b42e000}, - {0x3b430000}, {0x3b432000}, {0x3b434000}, {0x3b436000}, - {0x3b438000}, {0x3b43a000}, {0x3b43c000}, {0x3b43e000}, - {0x3b440000}, {0x3b442000}, {0x3b444000}, {0x3b446000}, - {0x3b448000}, {0x3b44a000}, {0x3b44c000}, {0x3b44e000}, - {0x3b450000}, {0x3b452000}, {0x3b454000}, {0x3b456000}, - {0x3b458000}, {0x3b45a000}, {0x3b45c000}, {0x3b45e000}, - {0x3b460000}, {0x3b462000}, {0x3b464000}, {0x3b466000}, - {0x3b468000}, {0x3b46a000}, {0x3b46c000}, {0x3b46e000}, - {0x3b470000}, {0x3b472000}, {0x3b474000}, {0x3b476000}, - {0x3b478000}, {0x3b47a000}, {0x3b47c000}, {0x3b47e000}, - {0x3b480000}, {0x3b482000}, {0x3b484000}, {0x3b486000}, - {0x3b488000}, {0x3b48a000}, {0x3b48c000}, {0x3b48e000}, - {0x3b490000}, {0x3b492000}, {0x3b494000}, {0x3b496000}, - {0x3b498000}, {0x3b49a000}, {0x3b49c000}, {0x3b49e000}, - {0x3b4a0000}, {0x3b4a2000}, {0x3b4a4000}, {0x3b4a6000}, - {0x3b4a8000}, {0x3b4aa000}, {0x3b4ac000}, {0x3b4ae000}, - {0x3b4b0000}, {0x3b4b2000}, {0x3b4b4000}, {0x3b4b6000}, - {0x3b4b8000}, {0x3b4ba000}, {0x3b4bc000}, {0x3b4be000}, - {0x3b4c0000}, {0x3b4c2000}, {0x3b4c4000}, {0x3b4c6000}, - {0x3b4c8000}, {0x3b4ca000}, {0x3b4cc000}, {0x3b4ce000}, - {0x3b4d0000}, {0x3b4d2000}, {0x3b4d4000}, {0x3b4d6000}, - {0x3b4d8000}, {0x3b4da000}, {0x3b4dc000}, {0x3b4de000}, - {0x3b4e0000}, {0x3b4e2000}, {0x3b4e4000}, {0x3b4e6000}, - {0x3b4e8000}, {0x3b4ea000}, {0x3b4ec000}, {0x3b4ee000}, - {0x3b4f0000}, {0x3b4f2000}, {0x3b4f4000}, {0x3b4f6000}, - {0x3b4f8000}, {0x3b4fa000}, {0x3b4fc000}, {0x3b4fe000}, - {0x3b500000}, {0x3b502000}, {0x3b504000}, {0x3b506000}, - {0x3b508000}, {0x3b50a000}, {0x3b50c000}, {0x3b50e000}, - {0x3b510000}, {0x3b512000}, {0x3b514000}, {0x3b516000}, - {0x3b518000}, {0x3b51a000}, {0x3b51c000}, {0x3b51e000}, - {0x3b520000}, {0x3b522000}, {0x3b524000}, {0x3b526000}, - {0x3b528000}, {0x3b52a000}, {0x3b52c000}, {0x3b52e000}, - {0x3b530000}, {0x3b532000}, {0x3b534000}, {0x3b536000}, - {0x3b538000}, {0x3b53a000}, {0x3b53c000}, {0x3b53e000}, - {0x3b540000}, {0x3b542000}, {0x3b544000}, {0x3b546000}, - {0x3b548000}, {0x3b54a000}, {0x3b54c000}, {0x3b54e000}, - {0x3b550000}, {0x3b552000}, {0x3b554000}, {0x3b556000}, - {0x3b558000}, {0x3b55a000}, {0x3b55c000}, {0x3b55e000}, - {0x3b560000}, {0x3b562000}, {0x3b564000}, {0x3b566000}, - {0x3b568000}, {0x3b56a000}, {0x3b56c000}, {0x3b56e000}, - {0x3b570000}, {0x3b572000}, {0x3b574000}, {0x3b576000}, - {0x3b578000}, {0x3b57a000}, {0x3b57c000}, {0x3b57e000}, - {0x3b580000}, {0x3b582000}, {0x3b584000}, {0x3b586000}, - {0x3b588000}, {0x3b58a000}, {0x3b58c000}, {0x3b58e000}, - {0x3b590000}, {0x3b592000}, {0x3b594000}, {0x3b596000}, - {0x3b598000}, {0x3b59a000}, {0x3b59c000}, {0x3b59e000}, - {0x3b5a0000}, {0x3b5a2000}, {0x3b5a4000}, {0x3b5a6000}, - {0x3b5a8000}, {0x3b5aa000}, {0x3b5ac000}, {0x3b5ae000}, - {0x3b5b0000}, {0x3b5b2000}, {0x3b5b4000}, {0x3b5b6000}, - {0x3b5b8000}, {0x3b5ba000}, {0x3b5bc000}, {0x3b5be000}, - {0x3b5c0000}, {0x3b5c2000}, {0x3b5c4000}, {0x3b5c6000}, - {0x3b5c8000}, {0x3b5ca000}, {0x3b5cc000}, {0x3b5ce000}, - {0x3b5d0000}, {0x3b5d2000}, {0x3b5d4000}, {0x3b5d6000}, - {0x3b5d8000}, {0x3b5da000}, {0x3b5dc000}, {0x3b5de000}, - {0x3b5e0000}, {0x3b5e2000}, {0x3b5e4000}, {0x3b5e6000}, - {0x3b5e8000}, {0x3b5ea000}, {0x3b5ec000}, {0x3b5ee000}, - {0x3b5f0000}, {0x3b5f2000}, {0x3b5f4000}, {0x3b5f6000}, - {0x3b5f8000}, {0x3b5fa000}, {0x3b5fc000}, {0x3b5fe000}, - {0x3b600000}, {0x3b602000}, {0x3b604000}, {0x3b606000}, - {0x3b608000}, {0x3b60a000}, {0x3b60c000}, {0x3b60e000}, - {0x3b610000}, {0x3b612000}, {0x3b614000}, {0x3b616000}, - {0x3b618000}, {0x3b61a000}, {0x3b61c000}, {0x3b61e000}, - {0x3b620000}, {0x3b622000}, {0x3b624000}, {0x3b626000}, - {0x3b628000}, {0x3b62a000}, {0x3b62c000}, {0x3b62e000}, - {0x3b630000}, {0x3b632000}, {0x3b634000}, {0x3b636000}, - {0x3b638000}, {0x3b63a000}, {0x3b63c000}, {0x3b63e000}, - {0x3b640000}, {0x3b642000}, {0x3b644000}, {0x3b646000}, - {0x3b648000}, {0x3b64a000}, {0x3b64c000}, {0x3b64e000}, - {0x3b650000}, {0x3b652000}, {0x3b654000}, {0x3b656000}, - {0x3b658000}, {0x3b65a000}, {0x3b65c000}, {0x3b65e000}, - {0x3b660000}, {0x3b662000}, {0x3b664000}, {0x3b666000}, - {0x3b668000}, {0x3b66a000}, {0x3b66c000}, {0x3b66e000}, - {0x3b670000}, {0x3b672000}, {0x3b674000}, {0x3b676000}, - {0x3b678000}, {0x3b67a000}, {0x3b67c000}, {0x3b67e000}, - {0x3b680000}, {0x3b682000}, {0x3b684000}, {0x3b686000}, - {0x3b688000}, {0x3b68a000}, {0x3b68c000}, {0x3b68e000}, - {0x3b690000}, {0x3b692000}, {0x3b694000}, {0x3b696000}, - {0x3b698000}, {0x3b69a000}, {0x3b69c000}, {0x3b69e000}, - {0x3b6a0000}, {0x3b6a2000}, {0x3b6a4000}, {0x3b6a6000}, - {0x3b6a8000}, {0x3b6aa000}, {0x3b6ac000}, {0x3b6ae000}, - {0x3b6b0000}, {0x3b6b2000}, {0x3b6b4000}, {0x3b6b6000}, - {0x3b6b8000}, {0x3b6ba000}, {0x3b6bc000}, {0x3b6be000}, - {0x3b6c0000}, {0x3b6c2000}, {0x3b6c4000}, {0x3b6c6000}, - {0x3b6c8000}, {0x3b6ca000}, {0x3b6cc000}, {0x3b6ce000}, - {0x3b6d0000}, {0x3b6d2000}, {0x3b6d4000}, {0x3b6d6000}, - {0x3b6d8000}, {0x3b6da000}, {0x3b6dc000}, {0x3b6de000}, - {0x3b6e0000}, {0x3b6e2000}, {0x3b6e4000}, {0x3b6e6000}, - {0x3b6e8000}, {0x3b6ea000}, {0x3b6ec000}, {0x3b6ee000}, - {0x3b6f0000}, {0x3b6f2000}, {0x3b6f4000}, {0x3b6f6000}, - {0x3b6f8000}, {0x3b6fa000}, {0x3b6fc000}, {0x3b6fe000}, - {0x3b700000}, {0x3b702000}, {0x3b704000}, {0x3b706000}, - {0x3b708000}, {0x3b70a000}, {0x3b70c000}, {0x3b70e000}, - {0x3b710000}, {0x3b712000}, {0x3b714000}, {0x3b716000}, - {0x3b718000}, {0x3b71a000}, {0x3b71c000}, {0x3b71e000}, - {0x3b720000}, {0x3b722000}, {0x3b724000}, {0x3b726000}, - {0x3b728000}, {0x3b72a000}, {0x3b72c000}, {0x3b72e000}, - {0x3b730000}, {0x3b732000}, {0x3b734000}, {0x3b736000}, - {0x3b738000}, {0x3b73a000}, {0x3b73c000}, {0x3b73e000}, - {0x3b740000}, {0x3b742000}, {0x3b744000}, {0x3b746000}, - {0x3b748000}, {0x3b74a000}, {0x3b74c000}, {0x3b74e000}, - {0x3b750000}, {0x3b752000}, {0x3b754000}, {0x3b756000}, - {0x3b758000}, {0x3b75a000}, {0x3b75c000}, {0x3b75e000}, - {0x3b760000}, {0x3b762000}, {0x3b764000}, {0x3b766000}, - {0x3b768000}, {0x3b76a000}, {0x3b76c000}, {0x3b76e000}, - {0x3b770000}, {0x3b772000}, {0x3b774000}, {0x3b776000}, - {0x3b778000}, {0x3b77a000}, {0x3b77c000}, {0x3b77e000}, - {0x3b780000}, {0x3b782000}, {0x3b784000}, {0x3b786000}, - {0x3b788000}, {0x3b78a000}, {0x3b78c000}, {0x3b78e000}, - {0x3b790000}, {0x3b792000}, {0x3b794000}, {0x3b796000}, - {0x3b798000}, {0x3b79a000}, {0x3b79c000}, {0x3b79e000}, - {0x3b7a0000}, {0x3b7a2000}, {0x3b7a4000}, {0x3b7a6000}, - {0x3b7a8000}, {0x3b7aa000}, {0x3b7ac000}, {0x3b7ae000}, - {0x3b7b0000}, {0x3b7b2000}, {0x3b7b4000}, {0x3b7b6000}, - {0x3b7b8000}, {0x3b7ba000}, {0x3b7bc000}, {0x3b7be000}, - {0x3b7c0000}, {0x3b7c2000}, {0x3b7c4000}, {0x3b7c6000}, - {0x3b7c8000}, {0x3b7ca000}, {0x3b7cc000}, {0x3b7ce000}, - {0x3b7d0000}, {0x3b7d2000}, {0x3b7d4000}, {0x3b7d6000}, - {0x3b7d8000}, {0x3b7da000}, {0x3b7dc000}, {0x3b7de000}, - {0x3b7e0000}, {0x3b7e2000}, {0x3b7e4000}, {0x3b7e6000}, - {0x3b7e8000}, {0x3b7ea000}, {0x3b7ec000}, {0x3b7ee000}, - {0x3b7f0000}, {0x3b7f2000}, {0x3b7f4000}, {0x3b7f6000}, - {0x3b7f8000}, {0x3b7fa000}, {0x3b7fc000}, {0x3b7fe000}, - {0x3b800000}, {0x3b802000}, {0x3b804000}, {0x3b806000}, - {0x3b808000}, {0x3b80a000}, {0x3b80c000}, {0x3b80e000}, - {0x3b810000}, {0x3b812000}, {0x3b814000}, {0x3b816000}, - {0x3b818000}, {0x3b81a000}, {0x3b81c000}, {0x3b81e000}, - {0x3b820000}, {0x3b822000}, {0x3b824000}, {0x3b826000}, - {0x3b828000}, {0x3b82a000}, {0x3b82c000}, {0x3b82e000}, - {0x3b830000}, {0x3b832000}, {0x3b834000}, {0x3b836000}, - {0x3b838000}, {0x3b83a000}, {0x3b83c000}, {0x3b83e000}, - {0x3b840000}, {0x3b842000}, {0x3b844000}, {0x3b846000}, - {0x3b848000}, {0x3b84a000}, {0x3b84c000}, {0x3b84e000}, - {0x3b850000}, {0x3b852000}, {0x3b854000}, {0x3b856000}, - {0x3b858000}, {0x3b85a000}, {0x3b85c000}, {0x3b85e000}, - {0x3b860000}, {0x3b862000}, {0x3b864000}, {0x3b866000}, - {0x3b868000}, {0x3b86a000}, {0x3b86c000}, {0x3b86e000}, - {0x3b870000}, {0x3b872000}, {0x3b874000}, {0x3b876000}, - {0x3b878000}, {0x3b87a000}, {0x3b87c000}, {0x3b87e000}, - {0x3b880000}, {0x3b882000}, {0x3b884000}, {0x3b886000}, - {0x3b888000}, {0x3b88a000}, {0x3b88c000}, {0x3b88e000}, - {0x3b890000}, {0x3b892000}, {0x3b894000}, {0x3b896000}, - {0x3b898000}, {0x3b89a000}, {0x3b89c000}, {0x3b89e000}, - {0x3b8a0000}, {0x3b8a2000}, {0x3b8a4000}, {0x3b8a6000}, - {0x3b8a8000}, {0x3b8aa000}, {0x3b8ac000}, {0x3b8ae000}, - {0x3b8b0000}, {0x3b8b2000}, {0x3b8b4000}, {0x3b8b6000}, - {0x3b8b8000}, {0x3b8ba000}, {0x3b8bc000}, {0x3b8be000}, - {0x3b8c0000}, {0x3b8c2000}, {0x3b8c4000}, {0x3b8c6000}, - {0x3b8c8000}, {0x3b8ca000}, {0x3b8cc000}, {0x3b8ce000}, - {0x3b8d0000}, {0x3b8d2000}, {0x3b8d4000}, {0x3b8d6000}, - {0x3b8d8000}, {0x3b8da000}, {0x3b8dc000}, {0x3b8de000}, - {0x3b8e0000}, {0x3b8e2000}, {0x3b8e4000}, {0x3b8e6000}, - {0x3b8e8000}, {0x3b8ea000}, {0x3b8ec000}, {0x3b8ee000}, - {0x3b8f0000}, {0x3b8f2000}, {0x3b8f4000}, {0x3b8f6000}, - {0x3b8f8000}, {0x3b8fa000}, {0x3b8fc000}, {0x3b8fe000}, - {0x3b900000}, {0x3b902000}, {0x3b904000}, {0x3b906000}, - {0x3b908000}, {0x3b90a000}, {0x3b90c000}, {0x3b90e000}, - {0x3b910000}, {0x3b912000}, {0x3b914000}, {0x3b916000}, - {0x3b918000}, {0x3b91a000}, {0x3b91c000}, {0x3b91e000}, - {0x3b920000}, {0x3b922000}, {0x3b924000}, {0x3b926000}, - {0x3b928000}, {0x3b92a000}, {0x3b92c000}, {0x3b92e000}, - {0x3b930000}, {0x3b932000}, {0x3b934000}, {0x3b936000}, - {0x3b938000}, {0x3b93a000}, {0x3b93c000}, {0x3b93e000}, - {0x3b940000}, {0x3b942000}, {0x3b944000}, {0x3b946000}, - {0x3b948000}, {0x3b94a000}, {0x3b94c000}, {0x3b94e000}, - {0x3b950000}, {0x3b952000}, {0x3b954000}, {0x3b956000}, - {0x3b958000}, {0x3b95a000}, {0x3b95c000}, {0x3b95e000}, - {0x3b960000}, {0x3b962000}, {0x3b964000}, {0x3b966000}, - {0x3b968000}, {0x3b96a000}, {0x3b96c000}, {0x3b96e000}, - {0x3b970000}, {0x3b972000}, {0x3b974000}, {0x3b976000}, - {0x3b978000}, {0x3b97a000}, {0x3b97c000}, {0x3b97e000}, - {0x3b980000}, {0x3b982000}, {0x3b984000}, {0x3b986000}, - {0x3b988000}, {0x3b98a000}, {0x3b98c000}, {0x3b98e000}, - {0x3b990000}, {0x3b992000}, {0x3b994000}, {0x3b996000}, - {0x3b998000}, {0x3b99a000}, {0x3b99c000}, {0x3b99e000}, - {0x3b9a0000}, {0x3b9a2000}, {0x3b9a4000}, {0x3b9a6000}, - {0x3b9a8000}, {0x3b9aa000}, {0x3b9ac000}, {0x3b9ae000}, - {0x3b9b0000}, {0x3b9b2000}, {0x3b9b4000}, {0x3b9b6000}, - {0x3b9b8000}, {0x3b9ba000}, {0x3b9bc000}, {0x3b9be000}, - {0x3b9c0000}, {0x3b9c2000}, {0x3b9c4000}, {0x3b9c6000}, - {0x3b9c8000}, {0x3b9ca000}, {0x3b9cc000}, {0x3b9ce000}, - {0x3b9d0000}, {0x3b9d2000}, {0x3b9d4000}, {0x3b9d6000}, - {0x3b9d8000}, {0x3b9da000}, {0x3b9dc000}, {0x3b9de000}, - {0x3b9e0000}, {0x3b9e2000}, {0x3b9e4000}, {0x3b9e6000}, - {0x3b9e8000}, {0x3b9ea000}, {0x3b9ec000}, {0x3b9ee000}, - {0x3b9f0000}, {0x3b9f2000}, {0x3b9f4000}, {0x3b9f6000}, - {0x3b9f8000}, {0x3b9fa000}, {0x3b9fc000}, {0x3b9fe000}, - {0x3ba00000}, {0x3ba02000}, {0x3ba04000}, {0x3ba06000}, - {0x3ba08000}, {0x3ba0a000}, {0x3ba0c000}, {0x3ba0e000}, - {0x3ba10000}, {0x3ba12000}, {0x3ba14000}, {0x3ba16000}, - {0x3ba18000}, {0x3ba1a000}, {0x3ba1c000}, {0x3ba1e000}, - {0x3ba20000}, {0x3ba22000}, {0x3ba24000}, {0x3ba26000}, - {0x3ba28000}, {0x3ba2a000}, {0x3ba2c000}, {0x3ba2e000}, - {0x3ba30000}, {0x3ba32000}, {0x3ba34000}, {0x3ba36000}, - {0x3ba38000}, {0x3ba3a000}, {0x3ba3c000}, {0x3ba3e000}, - {0x3ba40000}, {0x3ba42000}, {0x3ba44000}, {0x3ba46000}, - {0x3ba48000}, {0x3ba4a000}, {0x3ba4c000}, {0x3ba4e000}, - {0x3ba50000}, {0x3ba52000}, {0x3ba54000}, {0x3ba56000}, - {0x3ba58000}, {0x3ba5a000}, {0x3ba5c000}, {0x3ba5e000}, - {0x3ba60000}, {0x3ba62000}, {0x3ba64000}, {0x3ba66000}, - {0x3ba68000}, {0x3ba6a000}, {0x3ba6c000}, {0x3ba6e000}, - {0x3ba70000}, {0x3ba72000}, {0x3ba74000}, {0x3ba76000}, - {0x3ba78000}, {0x3ba7a000}, {0x3ba7c000}, {0x3ba7e000}, - {0x3ba80000}, {0x3ba82000}, {0x3ba84000}, {0x3ba86000}, - {0x3ba88000}, {0x3ba8a000}, {0x3ba8c000}, {0x3ba8e000}, - {0x3ba90000}, {0x3ba92000}, {0x3ba94000}, {0x3ba96000}, - {0x3ba98000}, {0x3ba9a000}, {0x3ba9c000}, {0x3ba9e000}, - {0x3baa0000}, {0x3baa2000}, {0x3baa4000}, {0x3baa6000}, - {0x3baa8000}, {0x3baaa000}, {0x3baac000}, {0x3baae000}, - {0x3bab0000}, {0x3bab2000}, {0x3bab4000}, {0x3bab6000}, - {0x3bab8000}, {0x3baba000}, {0x3babc000}, {0x3babe000}, - {0x3bac0000}, {0x3bac2000}, {0x3bac4000}, {0x3bac6000}, - {0x3bac8000}, {0x3baca000}, {0x3bacc000}, {0x3bace000}, - {0x3bad0000}, {0x3bad2000}, {0x3bad4000}, {0x3bad6000}, - {0x3bad8000}, {0x3bada000}, {0x3badc000}, {0x3bade000}, - {0x3bae0000}, {0x3bae2000}, {0x3bae4000}, {0x3bae6000}, - {0x3bae8000}, {0x3baea000}, {0x3baec000}, {0x3baee000}, - {0x3baf0000}, {0x3baf2000}, {0x3baf4000}, {0x3baf6000}, - {0x3baf8000}, {0x3bafa000}, {0x3bafc000}, {0x3bafe000}, - {0x3bb00000}, {0x3bb02000}, {0x3bb04000}, {0x3bb06000}, - {0x3bb08000}, {0x3bb0a000}, {0x3bb0c000}, {0x3bb0e000}, - {0x3bb10000}, {0x3bb12000}, {0x3bb14000}, {0x3bb16000}, - {0x3bb18000}, {0x3bb1a000}, {0x3bb1c000}, {0x3bb1e000}, - {0x3bb20000}, {0x3bb22000}, {0x3bb24000}, {0x3bb26000}, - {0x3bb28000}, {0x3bb2a000}, {0x3bb2c000}, {0x3bb2e000}, - {0x3bb30000}, {0x3bb32000}, {0x3bb34000}, {0x3bb36000}, - {0x3bb38000}, {0x3bb3a000}, {0x3bb3c000}, {0x3bb3e000}, - {0x3bb40000}, {0x3bb42000}, {0x3bb44000}, {0x3bb46000}, - {0x3bb48000}, {0x3bb4a000}, {0x3bb4c000}, {0x3bb4e000}, - {0x3bb50000}, {0x3bb52000}, {0x3bb54000}, {0x3bb56000}, - {0x3bb58000}, {0x3bb5a000}, {0x3bb5c000}, {0x3bb5e000}, - {0x3bb60000}, {0x3bb62000}, {0x3bb64000}, {0x3bb66000}, - {0x3bb68000}, {0x3bb6a000}, {0x3bb6c000}, {0x3bb6e000}, - {0x3bb70000}, {0x3bb72000}, {0x3bb74000}, {0x3bb76000}, - {0x3bb78000}, {0x3bb7a000}, {0x3bb7c000}, {0x3bb7e000}, - {0x3bb80000}, {0x3bb82000}, {0x3bb84000}, {0x3bb86000}, - {0x3bb88000}, {0x3bb8a000}, {0x3bb8c000}, {0x3bb8e000}, - {0x3bb90000}, {0x3bb92000}, {0x3bb94000}, {0x3bb96000}, - {0x3bb98000}, {0x3bb9a000}, {0x3bb9c000}, {0x3bb9e000}, - {0x3bba0000}, {0x3bba2000}, {0x3bba4000}, {0x3bba6000}, - {0x3bba8000}, {0x3bbaa000}, {0x3bbac000}, {0x3bbae000}, - {0x3bbb0000}, {0x3bbb2000}, {0x3bbb4000}, {0x3bbb6000}, - {0x3bbb8000}, {0x3bbba000}, {0x3bbbc000}, {0x3bbbe000}, - {0x3bbc0000}, {0x3bbc2000}, {0x3bbc4000}, {0x3bbc6000}, - {0x3bbc8000}, {0x3bbca000}, {0x3bbcc000}, {0x3bbce000}, - {0x3bbd0000}, {0x3bbd2000}, {0x3bbd4000}, {0x3bbd6000}, - {0x3bbd8000}, {0x3bbda000}, {0x3bbdc000}, {0x3bbde000}, - {0x3bbe0000}, {0x3bbe2000}, {0x3bbe4000}, {0x3bbe6000}, - {0x3bbe8000}, {0x3bbea000}, {0x3bbec000}, {0x3bbee000}, - {0x3bbf0000}, {0x3bbf2000}, {0x3bbf4000}, {0x3bbf6000}, - {0x3bbf8000}, {0x3bbfa000}, {0x3bbfc000}, {0x3bbfe000}, - {0x3bc00000}, {0x3bc02000}, {0x3bc04000}, {0x3bc06000}, - {0x3bc08000}, {0x3bc0a000}, {0x3bc0c000}, {0x3bc0e000}, - {0x3bc10000}, {0x3bc12000}, {0x3bc14000}, {0x3bc16000}, - {0x3bc18000}, {0x3bc1a000}, {0x3bc1c000}, {0x3bc1e000}, - {0x3bc20000}, {0x3bc22000}, {0x3bc24000}, {0x3bc26000}, - {0x3bc28000}, {0x3bc2a000}, {0x3bc2c000}, {0x3bc2e000}, - {0x3bc30000}, {0x3bc32000}, {0x3bc34000}, {0x3bc36000}, - {0x3bc38000}, {0x3bc3a000}, {0x3bc3c000}, {0x3bc3e000}, - {0x3bc40000}, {0x3bc42000}, {0x3bc44000}, {0x3bc46000}, - {0x3bc48000}, {0x3bc4a000}, {0x3bc4c000}, {0x3bc4e000}, - {0x3bc50000}, {0x3bc52000}, {0x3bc54000}, {0x3bc56000}, - {0x3bc58000}, {0x3bc5a000}, {0x3bc5c000}, {0x3bc5e000}, - {0x3bc60000}, {0x3bc62000}, {0x3bc64000}, {0x3bc66000}, - {0x3bc68000}, {0x3bc6a000}, {0x3bc6c000}, {0x3bc6e000}, - {0x3bc70000}, {0x3bc72000}, {0x3bc74000}, {0x3bc76000}, - {0x3bc78000}, {0x3bc7a000}, {0x3bc7c000}, {0x3bc7e000}, - {0x3bc80000}, {0x3bc82000}, {0x3bc84000}, {0x3bc86000}, - {0x3bc88000}, {0x3bc8a000}, {0x3bc8c000}, {0x3bc8e000}, - {0x3bc90000}, {0x3bc92000}, {0x3bc94000}, {0x3bc96000}, - {0x3bc98000}, {0x3bc9a000}, {0x3bc9c000}, {0x3bc9e000}, - {0x3bca0000}, {0x3bca2000}, {0x3bca4000}, {0x3bca6000}, - {0x3bca8000}, {0x3bcaa000}, {0x3bcac000}, {0x3bcae000}, - {0x3bcb0000}, {0x3bcb2000}, {0x3bcb4000}, {0x3bcb6000}, - {0x3bcb8000}, {0x3bcba000}, {0x3bcbc000}, {0x3bcbe000}, - {0x3bcc0000}, {0x3bcc2000}, {0x3bcc4000}, {0x3bcc6000}, - {0x3bcc8000}, {0x3bcca000}, {0x3bccc000}, {0x3bcce000}, - {0x3bcd0000}, {0x3bcd2000}, {0x3bcd4000}, {0x3bcd6000}, - {0x3bcd8000}, {0x3bcda000}, {0x3bcdc000}, {0x3bcde000}, - {0x3bce0000}, {0x3bce2000}, {0x3bce4000}, {0x3bce6000}, - {0x3bce8000}, {0x3bcea000}, {0x3bcec000}, {0x3bcee000}, - {0x3bcf0000}, {0x3bcf2000}, {0x3bcf4000}, {0x3bcf6000}, - {0x3bcf8000}, {0x3bcfa000}, {0x3bcfc000}, {0x3bcfe000}, - {0x3bd00000}, {0x3bd02000}, {0x3bd04000}, {0x3bd06000}, - {0x3bd08000}, {0x3bd0a000}, {0x3bd0c000}, {0x3bd0e000}, - {0x3bd10000}, {0x3bd12000}, {0x3bd14000}, {0x3bd16000}, - {0x3bd18000}, {0x3bd1a000}, {0x3bd1c000}, {0x3bd1e000}, - {0x3bd20000}, {0x3bd22000}, {0x3bd24000}, {0x3bd26000}, - {0x3bd28000}, {0x3bd2a000}, {0x3bd2c000}, {0x3bd2e000}, - {0x3bd30000}, {0x3bd32000}, {0x3bd34000}, {0x3bd36000}, - {0x3bd38000}, {0x3bd3a000}, {0x3bd3c000}, {0x3bd3e000}, - {0x3bd40000}, {0x3bd42000}, {0x3bd44000}, {0x3bd46000}, - {0x3bd48000}, {0x3bd4a000}, {0x3bd4c000}, {0x3bd4e000}, - {0x3bd50000}, {0x3bd52000}, {0x3bd54000}, {0x3bd56000}, - {0x3bd58000}, {0x3bd5a000}, {0x3bd5c000}, {0x3bd5e000}, - {0x3bd60000}, {0x3bd62000}, {0x3bd64000}, {0x3bd66000}, - {0x3bd68000}, {0x3bd6a000}, {0x3bd6c000}, {0x3bd6e000}, - {0x3bd70000}, {0x3bd72000}, {0x3bd74000}, {0x3bd76000}, - {0x3bd78000}, {0x3bd7a000}, {0x3bd7c000}, {0x3bd7e000}, - {0x3bd80000}, {0x3bd82000}, {0x3bd84000}, {0x3bd86000}, - {0x3bd88000}, {0x3bd8a000}, {0x3bd8c000}, {0x3bd8e000}, - {0x3bd90000}, {0x3bd92000}, {0x3bd94000}, {0x3bd96000}, - {0x3bd98000}, {0x3bd9a000}, {0x3bd9c000}, {0x3bd9e000}, - {0x3bda0000}, {0x3bda2000}, {0x3bda4000}, {0x3bda6000}, - {0x3bda8000}, {0x3bdaa000}, {0x3bdac000}, {0x3bdae000}, - {0x3bdb0000}, {0x3bdb2000}, {0x3bdb4000}, {0x3bdb6000}, - {0x3bdb8000}, {0x3bdba000}, {0x3bdbc000}, {0x3bdbe000}, - {0x3bdc0000}, {0x3bdc2000}, {0x3bdc4000}, {0x3bdc6000}, - {0x3bdc8000}, {0x3bdca000}, {0x3bdcc000}, {0x3bdce000}, - {0x3bdd0000}, {0x3bdd2000}, {0x3bdd4000}, {0x3bdd6000}, - {0x3bdd8000}, {0x3bdda000}, {0x3bddc000}, {0x3bdde000}, - {0x3bde0000}, {0x3bde2000}, {0x3bde4000}, {0x3bde6000}, - {0x3bde8000}, {0x3bdea000}, {0x3bdec000}, {0x3bdee000}, - {0x3bdf0000}, {0x3bdf2000}, {0x3bdf4000}, {0x3bdf6000}, - {0x3bdf8000}, {0x3bdfa000}, {0x3bdfc000}, {0x3bdfe000}, - {0x3be00000}, {0x3be02000}, {0x3be04000}, {0x3be06000}, - {0x3be08000}, {0x3be0a000}, {0x3be0c000}, {0x3be0e000}, - {0x3be10000}, {0x3be12000}, {0x3be14000}, {0x3be16000}, - {0x3be18000}, {0x3be1a000}, {0x3be1c000}, {0x3be1e000}, - {0x3be20000}, {0x3be22000}, {0x3be24000}, {0x3be26000}, - {0x3be28000}, {0x3be2a000}, {0x3be2c000}, {0x3be2e000}, - {0x3be30000}, {0x3be32000}, {0x3be34000}, {0x3be36000}, - {0x3be38000}, {0x3be3a000}, {0x3be3c000}, {0x3be3e000}, - {0x3be40000}, {0x3be42000}, {0x3be44000}, {0x3be46000}, - {0x3be48000}, {0x3be4a000}, {0x3be4c000}, {0x3be4e000}, - {0x3be50000}, {0x3be52000}, {0x3be54000}, {0x3be56000}, - {0x3be58000}, {0x3be5a000}, {0x3be5c000}, {0x3be5e000}, - {0x3be60000}, {0x3be62000}, {0x3be64000}, {0x3be66000}, - {0x3be68000}, {0x3be6a000}, {0x3be6c000}, {0x3be6e000}, - {0x3be70000}, {0x3be72000}, {0x3be74000}, {0x3be76000}, - {0x3be78000}, {0x3be7a000}, {0x3be7c000}, {0x3be7e000}, - {0x3be80000}, {0x3be82000}, {0x3be84000}, {0x3be86000}, - {0x3be88000}, {0x3be8a000}, {0x3be8c000}, {0x3be8e000}, - {0x3be90000}, {0x3be92000}, {0x3be94000}, {0x3be96000}, - {0x3be98000}, {0x3be9a000}, {0x3be9c000}, {0x3be9e000}, - {0x3bea0000}, {0x3bea2000}, {0x3bea4000}, {0x3bea6000}, - {0x3bea8000}, {0x3beaa000}, {0x3beac000}, {0x3beae000}, - {0x3beb0000}, {0x3beb2000}, {0x3beb4000}, {0x3beb6000}, - {0x3beb8000}, {0x3beba000}, {0x3bebc000}, {0x3bebe000}, - {0x3bec0000}, {0x3bec2000}, {0x3bec4000}, {0x3bec6000}, - {0x3bec8000}, {0x3beca000}, {0x3becc000}, {0x3bece000}, - {0x3bed0000}, {0x3bed2000}, {0x3bed4000}, {0x3bed6000}, - {0x3bed8000}, {0x3beda000}, {0x3bedc000}, {0x3bede000}, - {0x3bee0000}, {0x3bee2000}, {0x3bee4000}, {0x3bee6000}, - {0x3bee8000}, {0x3beea000}, {0x3beec000}, {0x3beee000}, - {0x3bef0000}, {0x3bef2000}, {0x3bef4000}, {0x3bef6000}, - {0x3bef8000}, {0x3befa000}, {0x3befc000}, {0x3befe000}, - {0x3bf00000}, {0x3bf02000}, {0x3bf04000}, {0x3bf06000}, - {0x3bf08000}, {0x3bf0a000}, {0x3bf0c000}, {0x3bf0e000}, - {0x3bf10000}, {0x3bf12000}, {0x3bf14000}, {0x3bf16000}, - {0x3bf18000}, {0x3bf1a000}, {0x3bf1c000}, {0x3bf1e000}, - {0x3bf20000}, {0x3bf22000}, {0x3bf24000}, {0x3bf26000}, - {0x3bf28000}, {0x3bf2a000}, {0x3bf2c000}, {0x3bf2e000}, - {0x3bf30000}, {0x3bf32000}, {0x3bf34000}, {0x3bf36000}, - {0x3bf38000}, {0x3bf3a000}, {0x3bf3c000}, {0x3bf3e000}, - {0x3bf40000}, {0x3bf42000}, {0x3bf44000}, {0x3bf46000}, - {0x3bf48000}, {0x3bf4a000}, {0x3bf4c000}, {0x3bf4e000}, - {0x3bf50000}, {0x3bf52000}, {0x3bf54000}, {0x3bf56000}, - {0x3bf58000}, {0x3bf5a000}, {0x3bf5c000}, {0x3bf5e000}, - {0x3bf60000}, {0x3bf62000}, {0x3bf64000}, {0x3bf66000}, - {0x3bf68000}, {0x3bf6a000}, {0x3bf6c000}, {0x3bf6e000}, - {0x3bf70000}, {0x3bf72000}, {0x3bf74000}, {0x3bf76000}, - {0x3bf78000}, {0x3bf7a000}, {0x3bf7c000}, {0x3bf7e000}, - {0x3bf80000}, {0x3bf82000}, {0x3bf84000}, {0x3bf86000}, - {0x3bf88000}, {0x3bf8a000}, {0x3bf8c000}, {0x3bf8e000}, - {0x3bf90000}, {0x3bf92000}, {0x3bf94000}, {0x3bf96000}, - {0x3bf98000}, {0x3bf9a000}, {0x3bf9c000}, {0x3bf9e000}, - {0x3bfa0000}, {0x3bfa2000}, {0x3bfa4000}, {0x3bfa6000}, - {0x3bfa8000}, {0x3bfaa000}, {0x3bfac000}, {0x3bfae000}, - {0x3bfb0000}, {0x3bfb2000}, {0x3bfb4000}, {0x3bfb6000}, - {0x3bfb8000}, {0x3bfba000}, {0x3bfbc000}, {0x3bfbe000}, - {0x3bfc0000}, {0x3bfc2000}, {0x3bfc4000}, {0x3bfc6000}, - {0x3bfc8000}, {0x3bfca000}, {0x3bfcc000}, {0x3bfce000}, - {0x3bfd0000}, {0x3bfd2000}, {0x3bfd4000}, {0x3bfd6000}, - {0x3bfd8000}, {0x3bfda000}, {0x3bfdc000}, {0x3bfde000}, - {0x3bfe0000}, {0x3bfe2000}, {0x3bfe4000}, {0x3bfe6000}, - {0x3bfe8000}, {0x3bfea000}, {0x3bfec000}, {0x3bfee000}, - {0x3bff0000}, {0x3bff2000}, {0x3bff4000}, {0x3bff6000}, - {0x3bff8000}, {0x3bffa000}, {0x3bffc000}, {0x3bffe000}, - {0x3c000000}, {0x3c002000}, {0x3c004000}, {0x3c006000}, - {0x3c008000}, {0x3c00a000}, {0x3c00c000}, {0x3c00e000}, - {0x3c010000}, {0x3c012000}, {0x3c014000}, {0x3c016000}, - {0x3c018000}, {0x3c01a000}, {0x3c01c000}, {0x3c01e000}, - {0x3c020000}, {0x3c022000}, {0x3c024000}, {0x3c026000}, - {0x3c028000}, {0x3c02a000}, {0x3c02c000}, {0x3c02e000}, - {0x3c030000}, {0x3c032000}, {0x3c034000}, {0x3c036000}, - {0x3c038000}, {0x3c03a000}, {0x3c03c000}, {0x3c03e000}, - {0x3c040000}, {0x3c042000}, {0x3c044000}, {0x3c046000}, - {0x3c048000}, {0x3c04a000}, {0x3c04c000}, {0x3c04e000}, - {0x3c050000}, {0x3c052000}, {0x3c054000}, {0x3c056000}, - {0x3c058000}, {0x3c05a000}, {0x3c05c000}, {0x3c05e000}, - {0x3c060000}, {0x3c062000}, {0x3c064000}, {0x3c066000}, - {0x3c068000}, {0x3c06a000}, {0x3c06c000}, {0x3c06e000}, - {0x3c070000}, {0x3c072000}, {0x3c074000}, {0x3c076000}, - {0x3c078000}, {0x3c07a000}, {0x3c07c000}, {0x3c07e000}, - {0x3c080000}, {0x3c082000}, {0x3c084000}, {0x3c086000}, - {0x3c088000}, {0x3c08a000}, {0x3c08c000}, {0x3c08e000}, - {0x3c090000}, {0x3c092000}, {0x3c094000}, {0x3c096000}, - {0x3c098000}, {0x3c09a000}, {0x3c09c000}, {0x3c09e000}, - {0x3c0a0000}, {0x3c0a2000}, {0x3c0a4000}, {0x3c0a6000}, - {0x3c0a8000}, {0x3c0aa000}, {0x3c0ac000}, {0x3c0ae000}, - {0x3c0b0000}, {0x3c0b2000}, {0x3c0b4000}, {0x3c0b6000}, - {0x3c0b8000}, {0x3c0ba000}, {0x3c0bc000}, {0x3c0be000}, - {0x3c0c0000}, {0x3c0c2000}, {0x3c0c4000}, {0x3c0c6000}, - {0x3c0c8000}, {0x3c0ca000}, {0x3c0cc000}, {0x3c0ce000}, - {0x3c0d0000}, {0x3c0d2000}, {0x3c0d4000}, {0x3c0d6000}, - {0x3c0d8000}, {0x3c0da000}, {0x3c0dc000}, {0x3c0de000}, - {0x3c0e0000}, {0x3c0e2000}, {0x3c0e4000}, {0x3c0e6000}, - {0x3c0e8000}, {0x3c0ea000}, {0x3c0ec000}, {0x3c0ee000}, - {0x3c0f0000}, {0x3c0f2000}, {0x3c0f4000}, {0x3c0f6000}, - {0x3c0f8000}, {0x3c0fa000}, {0x3c0fc000}, {0x3c0fe000}, - {0x3c100000}, {0x3c102000}, {0x3c104000}, {0x3c106000}, - {0x3c108000}, {0x3c10a000}, {0x3c10c000}, {0x3c10e000}, - {0x3c110000}, {0x3c112000}, {0x3c114000}, {0x3c116000}, - {0x3c118000}, {0x3c11a000}, {0x3c11c000}, {0x3c11e000}, - {0x3c120000}, {0x3c122000}, {0x3c124000}, {0x3c126000}, - {0x3c128000}, {0x3c12a000}, {0x3c12c000}, {0x3c12e000}, - {0x3c130000}, {0x3c132000}, {0x3c134000}, {0x3c136000}, - {0x3c138000}, {0x3c13a000}, {0x3c13c000}, {0x3c13e000}, - {0x3c140000}, {0x3c142000}, {0x3c144000}, {0x3c146000}, - {0x3c148000}, {0x3c14a000}, {0x3c14c000}, {0x3c14e000}, - {0x3c150000}, {0x3c152000}, {0x3c154000}, {0x3c156000}, - {0x3c158000}, {0x3c15a000}, {0x3c15c000}, {0x3c15e000}, - {0x3c160000}, {0x3c162000}, {0x3c164000}, {0x3c166000}, - {0x3c168000}, {0x3c16a000}, {0x3c16c000}, {0x3c16e000}, - {0x3c170000}, {0x3c172000}, {0x3c174000}, {0x3c176000}, - {0x3c178000}, {0x3c17a000}, {0x3c17c000}, {0x3c17e000}, - {0x3c180000}, {0x3c182000}, {0x3c184000}, {0x3c186000}, - {0x3c188000}, {0x3c18a000}, {0x3c18c000}, {0x3c18e000}, - {0x3c190000}, {0x3c192000}, {0x3c194000}, {0x3c196000}, - {0x3c198000}, {0x3c19a000}, {0x3c19c000}, {0x3c19e000}, - {0x3c1a0000}, {0x3c1a2000}, {0x3c1a4000}, {0x3c1a6000}, - {0x3c1a8000}, {0x3c1aa000}, {0x3c1ac000}, {0x3c1ae000}, - {0x3c1b0000}, {0x3c1b2000}, {0x3c1b4000}, {0x3c1b6000}, - {0x3c1b8000}, {0x3c1ba000}, {0x3c1bc000}, {0x3c1be000}, - {0x3c1c0000}, {0x3c1c2000}, {0x3c1c4000}, {0x3c1c6000}, - {0x3c1c8000}, {0x3c1ca000}, {0x3c1cc000}, {0x3c1ce000}, - {0x3c1d0000}, {0x3c1d2000}, {0x3c1d4000}, {0x3c1d6000}, - {0x3c1d8000}, {0x3c1da000}, {0x3c1dc000}, {0x3c1de000}, - {0x3c1e0000}, {0x3c1e2000}, {0x3c1e4000}, {0x3c1e6000}, - {0x3c1e8000}, {0x3c1ea000}, {0x3c1ec000}, {0x3c1ee000}, - {0x3c1f0000}, {0x3c1f2000}, {0x3c1f4000}, {0x3c1f6000}, - {0x3c1f8000}, {0x3c1fa000}, {0x3c1fc000}, {0x3c1fe000}, - {0x3c200000}, {0x3c202000}, {0x3c204000}, {0x3c206000}, - {0x3c208000}, {0x3c20a000}, {0x3c20c000}, {0x3c20e000}, - {0x3c210000}, {0x3c212000}, {0x3c214000}, {0x3c216000}, - {0x3c218000}, {0x3c21a000}, {0x3c21c000}, {0x3c21e000}, - {0x3c220000}, {0x3c222000}, {0x3c224000}, {0x3c226000}, - {0x3c228000}, {0x3c22a000}, {0x3c22c000}, {0x3c22e000}, - {0x3c230000}, {0x3c232000}, {0x3c234000}, {0x3c236000}, - {0x3c238000}, {0x3c23a000}, {0x3c23c000}, {0x3c23e000}, - {0x3c240000}, {0x3c242000}, {0x3c244000}, {0x3c246000}, - {0x3c248000}, {0x3c24a000}, {0x3c24c000}, {0x3c24e000}, - {0x3c250000}, {0x3c252000}, {0x3c254000}, {0x3c256000}, - {0x3c258000}, {0x3c25a000}, {0x3c25c000}, {0x3c25e000}, - {0x3c260000}, {0x3c262000}, {0x3c264000}, {0x3c266000}, - {0x3c268000}, {0x3c26a000}, {0x3c26c000}, {0x3c26e000}, - {0x3c270000}, {0x3c272000}, {0x3c274000}, {0x3c276000}, - {0x3c278000}, {0x3c27a000}, {0x3c27c000}, {0x3c27e000}, - {0x3c280000}, {0x3c282000}, {0x3c284000}, {0x3c286000}, - {0x3c288000}, {0x3c28a000}, {0x3c28c000}, {0x3c28e000}, - {0x3c290000}, {0x3c292000}, {0x3c294000}, {0x3c296000}, - {0x3c298000}, {0x3c29a000}, {0x3c29c000}, {0x3c29e000}, - {0x3c2a0000}, {0x3c2a2000}, {0x3c2a4000}, {0x3c2a6000}, - {0x3c2a8000}, {0x3c2aa000}, {0x3c2ac000}, {0x3c2ae000}, - {0x3c2b0000}, {0x3c2b2000}, {0x3c2b4000}, {0x3c2b6000}, - {0x3c2b8000}, {0x3c2ba000}, {0x3c2bc000}, {0x3c2be000}, - {0x3c2c0000}, {0x3c2c2000}, {0x3c2c4000}, {0x3c2c6000}, - {0x3c2c8000}, {0x3c2ca000}, {0x3c2cc000}, {0x3c2ce000}, - {0x3c2d0000}, {0x3c2d2000}, {0x3c2d4000}, {0x3c2d6000}, - {0x3c2d8000}, {0x3c2da000}, {0x3c2dc000}, {0x3c2de000}, - {0x3c2e0000}, {0x3c2e2000}, {0x3c2e4000}, {0x3c2e6000}, - {0x3c2e8000}, {0x3c2ea000}, {0x3c2ec000}, {0x3c2ee000}, - {0x3c2f0000}, {0x3c2f2000}, {0x3c2f4000}, {0x3c2f6000}, - {0x3c2f8000}, {0x3c2fa000}, {0x3c2fc000}, {0x3c2fe000}, - {0x3c300000}, {0x3c302000}, {0x3c304000}, {0x3c306000}, - {0x3c308000}, {0x3c30a000}, {0x3c30c000}, {0x3c30e000}, - {0x3c310000}, {0x3c312000}, {0x3c314000}, {0x3c316000}, - {0x3c318000}, {0x3c31a000}, {0x3c31c000}, {0x3c31e000}, - {0x3c320000}, {0x3c322000}, {0x3c324000}, {0x3c326000}, - {0x3c328000}, {0x3c32a000}, {0x3c32c000}, {0x3c32e000}, - {0x3c330000}, {0x3c332000}, {0x3c334000}, {0x3c336000}, - {0x3c338000}, {0x3c33a000}, {0x3c33c000}, {0x3c33e000}, - {0x3c340000}, {0x3c342000}, {0x3c344000}, {0x3c346000}, - {0x3c348000}, {0x3c34a000}, {0x3c34c000}, {0x3c34e000}, - {0x3c350000}, {0x3c352000}, {0x3c354000}, {0x3c356000}, - {0x3c358000}, {0x3c35a000}, {0x3c35c000}, {0x3c35e000}, - {0x3c360000}, {0x3c362000}, {0x3c364000}, {0x3c366000}, - {0x3c368000}, {0x3c36a000}, {0x3c36c000}, {0x3c36e000}, - {0x3c370000}, {0x3c372000}, {0x3c374000}, {0x3c376000}, - {0x3c378000}, {0x3c37a000}, {0x3c37c000}, {0x3c37e000}, - {0x3c380000}, {0x3c382000}, {0x3c384000}, {0x3c386000}, - {0x3c388000}, {0x3c38a000}, {0x3c38c000}, {0x3c38e000}, - {0x3c390000}, {0x3c392000}, {0x3c394000}, {0x3c396000}, - {0x3c398000}, {0x3c39a000}, {0x3c39c000}, {0x3c39e000}, - {0x3c3a0000}, {0x3c3a2000}, {0x3c3a4000}, {0x3c3a6000}, - {0x3c3a8000}, {0x3c3aa000}, {0x3c3ac000}, {0x3c3ae000}, - {0x3c3b0000}, {0x3c3b2000}, {0x3c3b4000}, {0x3c3b6000}, - {0x3c3b8000}, {0x3c3ba000}, {0x3c3bc000}, {0x3c3be000}, - {0x3c3c0000}, {0x3c3c2000}, {0x3c3c4000}, {0x3c3c6000}, - {0x3c3c8000}, {0x3c3ca000}, {0x3c3cc000}, {0x3c3ce000}, - {0x3c3d0000}, {0x3c3d2000}, {0x3c3d4000}, {0x3c3d6000}, - {0x3c3d8000}, {0x3c3da000}, {0x3c3dc000}, {0x3c3de000}, - {0x3c3e0000}, {0x3c3e2000}, {0x3c3e4000}, {0x3c3e6000}, - {0x3c3e8000}, {0x3c3ea000}, {0x3c3ec000}, {0x3c3ee000}, - {0x3c3f0000}, {0x3c3f2000}, {0x3c3f4000}, {0x3c3f6000}, - {0x3c3f8000}, {0x3c3fa000}, {0x3c3fc000}, {0x3c3fe000}, - {0x3c400000}, {0x3c402000}, {0x3c404000}, {0x3c406000}, - {0x3c408000}, {0x3c40a000}, {0x3c40c000}, {0x3c40e000}, - {0x3c410000}, {0x3c412000}, {0x3c414000}, {0x3c416000}, - {0x3c418000}, {0x3c41a000}, {0x3c41c000}, {0x3c41e000}, - {0x3c420000}, {0x3c422000}, {0x3c424000}, {0x3c426000}, - {0x3c428000}, {0x3c42a000}, {0x3c42c000}, {0x3c42e000}, - {0x3c430000}, {0x3c432000}, {0x3c434000}, {0x3c436000}, - {0x3c438000}, {0x3c43a000}, {0x3c43c000}, {0x3c43e000}, - {0x3c440000}, {0x3c442000}, {0x3c444000}, {0x3c446000}, - {0x3c448000}, {0x3c44a000}, {0x3c44c000}, {0x3c44e000}, - {0x3c450000}, {0x3c452000}, {0x3c454000}, {0x3c456000}, - {0x3c458000}, {0x3c45a000}, {0x3c45c000}, {0x3c45e000}, - {0x3c460000}, {0x3c462000}, {0x3c464000}, {0x3c466000}, - {0x3c468000}, {0x3c46a000}, {0x3c46c000}, {0x3c46e000}, - {0x3c470000}, {0x3c472000}, {0x3c474000}, {0x3c476000}, - {0x3c478000}, {0x3c47a000}, {0x3c47c000}, {0x3c47e000}, - {0x3c480000}, {0x3c482000}, {0x3c484000}, {0x3c486000}, - {0x3c488000}, {0x3c48a000}, {0x3c48c000}, {0x3c48e000}, - {0x3c490000}, {0x3c492000}, {0x3c494000}, {0x3c496000}, - {0x3c498000}, {0x3c49a000}, {0x3c49c000}, {0x3c49e000}, - {0x3c4a0000}, {0x3c4a2000}, {0x3c4a4000}, {0x3c4a6000}, - {0x3c4a8000}, {0x3c4aa000}, {0x3c4ac000}, {0x3c4ae000}, - {0x3c4b0000}, {0x3c4b2000}, {0x3c4b4000}, {0x3c4b6000}, - {0x3c4b8000}, {0x3c4ba000}, {0x3c4bc000}, {0x3c4be000}, - {0x3c4c0000}, {0x3c4c2000}, {0x3c4c4000}, {0x3c4c6000}, - {0x3c4c8000}, {0x3c4ca000}, {0x3c4cc000}, {0x3c4ce000}, - {0x3c4d0000}, {0x3c4d2000}, {0x3c4d4000}, {0x3c4d6000}, - {0x3c4d8000}, {0x3c4da000}, {0x3c4dc000}, {0x3c4de000}, - {0x3c4e0000}, {0x3c4e2000}, {0x3c4e4000}, {0x3c4e6000}, - {0x3c4e8000}, {0x3c4ea000}, {0x3c4ec000}, {0x3c4ee000}, - {0x3c4f0000}, {0x3c4f2000}, {0x3c4f4000}, {0x3c4f6000}, - {0x3c4f8000}, {0x3c4fa000}, {0x3c4fc000}, {0x3c4fe000}, - {0x3c500000}, {0x3c502000}, {0x3c504000}, {0x3c506000}, - {0x3c508000}, {0x3c50a000}, {0x3c50c000}, {0x3c50e000}, - {0x3c510000}, {0x3c512000}, {0x3c514000}, {0x3c516000}, - {0x3c518000}, {0x3c51a000}, {0x3c51c000}, {0x3c51e000}, - {0x3c520000}, {0x3c522000}, {0x3c524000}, {0x3c526000}, - {0x3c528000}, {0x3c52a000}, {0x3c52c000}, {0x3c52e000}, - {0x3c530000}, {0x3c532000}, {0x3c534000}, {0x3c536000}, - {0x3c538000}, {0x3c53a000}, {0x3c53c000}, {0x3c53e000}, - {0x3c540000}, {0x3c542000}, {0x3c544000}, {0x3c546000}, - {0x3c548000}, {0x3c54a000}, {0x3c54c000}, {0x3c54e000}, - {0x3c550000}, {0x3c552000}, {0x3c554000}, {0x3c556000}, - {0x3c558000}, {0x3c55a000}, {0x3c55c000}, {0x3c55e000}, - {0x3c560000}, {0x3c562000}, {0x3c564000}, {0x3c566000}, - {0x3c568000}, {0x3c56a000}, {0x3c56c000}, {0x3c56e000}, - {0x3c570000}, {0x3c572000}, {0x3c574000}, {0x3c576000}, - {0x3c578000}, {0x3c57a000}, {0x3c57c000}, {0x3c57e000}, - {0x3c580000}, {0x3c582000}, {0x3c584000}, {0x3c586000}, - {0x3c588000}, {0x3c58a000}, {0x3c58c000}, {0x3c58e000}, - {0x3c590000}, {0x3c592000}, {0x3c594000}, {0x3c596000}, - {0x3c598000}, {0x3c59a000}, {0x3c59c000}, {0x3c59e000}, - {0x3c5a0000}, {0x3c5a2000}, {0x3c5a4000}, {0x3c5a6000}, - {0x3c5a8000}, {0x3c5aa000}, {0x3c5ac000}, {0x3c5ae000}, - {0x3c5b0000}, {0x3c5b2000}, {0x3c5b4000}, {0x3c5b6000}, - {0x3c5b8000}, {0x3c5ba000}, {0x3c5bc000}, {0x3c5be000}, - {0x3c5c0000}, {0x3c5c2000}, {0x3c5c4000}, {0x3c5c6000}, - {0x3c5c8000}, {0x3c5ca000}, {0x3c5cc000}, {0x3c5ce000}, - {0x3c5d0000}, {0x3c5d2000}, {0x3c5d4000}, {0x3c5d6000}, - {0x3c5d8000}, {0x3c5da000}, {0x3c5dc000}, {0x3c5de000}, - {0x3c5e0000}, {0x3c5e2000}, {0x3c5e4000}, {0x3c5e6000}, - {0x3c5e8000}, {0x3c5ea000}, {0x3c5ec000}, {0x3c5ee000}, - {0x3c5f0000}, {0x3c5f2000}, {0x3c5f4000}, {0x3c5f6000}, - {0x3c5f8000}, {0x3c5fa000}, {0x3c5fc000}, {0x3c5fe000}, - {0x3c600000}, {0x3c602000}, {0x3c604000}, {0x3c606000}, - {0x3c608000}, {0x3c60a000}, {0x3c60c000}, {0x3c60e000}, - {0x3c610000}, {0x3c612000}, {0x3c614000}, {0x3c616000}, - {0x3c618000}, {0x3c61a000}, {0x3c61c000}, {0x3c61e000}, - {0x3c620000}, {0x3c622000}, {0x3c624000}, {0x3c626000}, - {0x3c628000}, {0x3c62a000}, {0x3c62c000}, {0x3c62e000}, - {0x3c630000}, {0x3c632000}, {0x3c634000}, {0x3c636000}, - {0x3c638000}, {0x3c63a000}, {0x3c63c000}, {0x3c63e000}, - {0x3c640000}, {0x3c642000}, {0x3c644000}, {0x3c646000}, - {0x3c648000}, {0x3c64a000}, {0x3c64c000}, {0x3c64e000}, - {0x3c650000}, {0x3c652000}, {0x3c654000}, {0x3c656000}, - {0x3c658000}, {0x3c65a000}, {0x3c65c000}, {0x3c65e000}, - {0x3c660000}, {0x3c662000}, {0x3c664000}, {0x3c666000}, - {0x3c668000}, {0x3c66a000}, {0x3c66c000}, {0x3c66e000}, - {0x3c670000}, {0x3c672000}, {0x3c674000}, {0x3c676000}, - {0x3c678000}, {0x3c67a000}, {0x3c67c000}, {0x3c67e000}, - {0x3c680000}, {0x3c682000}, {0x3c684000}, {0x3c686000}, - {0x3c688000}, {0x3c68a000}, {0x3c68c000}, {0x3c68e000}, - {0x3c690000}, {0x3c692000}, {0x3c694000}, {0x3c696000}, - {0x3c698000}, {0x3c69a000}, {0x3c69c000}, {0x3c69e000}, - {0x3c6a0000}, {0x3c6a2000}, {0x3c6a4000}, {0x3c6a6000}, - {0x3c6a8000}, {0x3c6aa000}, {0x3c6ac000}, {0x3c6ae000}, - {0x3c6b0000}, {0x3c6b2000}, {0x3c6b4000}, {0x3c6b6000}, - {0x3c6b8000}, {0x3c6ba000}, {0x3c6bc000}, {0x3c6be000}, - {0x3c6c0000}, {0x3c6c2000}, {0x3c6c4000}, {0x3c6c6000}, - {0x3c6c8000}, {0x3c6ca000}, {0x3c6cc000}, {0x3c6ce000}, - {0x3c6d0000}, {0x3c6d2000}, {0x3c6d4000}, {0x3c6d6000}, - {0x3c6d8000}, {0x3c6da000}, {0x3c6dc000}, {0x3c6de000}, - {0x3c6e0000}, {0x3c6e2000}, {0x3c6e4000}, {0x3c6e6000}, - {0x3c6e8000}, {0x3c6ea000}, {0x3c6ec000}, {0x3c6ee000}, - {0x3c6f0000}, {0x3c6f2000}, {0x3c6f4000}, {0x3c6f6000}, - {0x3c6f8000}, {0x3c6fa000}, {0x3c6fc000}, {0x3c6fe000}, - {0x3c700000}, {0x3c702000}, {0x3c704000}, {0x3c706000}, - {0x3c708000}, {0x3c70a000}, {0x3c70c000}, {0x3c70e000}, - {0x3c710000}, {0x3c712000}, {0x3c714000}, {0x3c716000}, - {0x3c718000}, {0x3c71a000}, {0x3c71c000}, {0x3c71e000}, - {0x3c720000}, {0x3c722000}, {0x3c724000}, {0x3c726000}, - {0x3c728000}, {0x3c72a000}, {0x3c72c000}, {0x3c72e000}, - {0x3c730000}, {0x3c732000}, {0x3c734000}, {0x3c736000}, - {0x3c738000}, {0x3c73a000}, {0x3c73c000}, {0x3c73e000}, - {0x3c740000}, {0x3c742000}, {0x3c744000}, {0x3c746000}, - {0x3c748000}, {0x3c74a000}, {0x3c74c000}, {0x3c74e000}, - {0x3c750000}, {0x3c752000}, {0x3c754000}, {0x3c756000}, - {0x3c758000}, {0x3c75a000}, {0x3c75c000}, {0x3c75e000}, - {0x3c760000}, {0x3c762000}, {0x3c764000}, {0x3c766000}, - {0x3c768000}, {0x3c76a000}, {0x3c76c000}, {0x3c76e000}, - {0x3c770000}, {0x3c772000}, {0x3c774000}, {0x3c776000}, - {0x3c778000}, {0x3c77a000}, {0x3c77c000}, {0x3c77e000}, - {0x3c780000}, {0x3c782000}, {0x3c784000}, {0x3c786000}, - {0x3c788000}, {0x3c78a000}, {0x3c78c000}, {0x3c78e000}, - {0x3c790000}, {0x3c792000}, {0x3c794000}, {0x3c796000}, - {0x3c798000}, {0x3c79a000}, {0x3c79c000}, {0x3c79e000}, - {0x3c7a0000}, {0x3c7a2000}, {0x3c7a4000}, {0x3c7a6000}, - {0x3c7a8000}, {0x3c7aa000}, {0x3c7ac000}, {0x3c7ae000}, - {0x3c7b0000}, {0x3c7b2000}, {0x3c7b4000}, {0x3c7b6000}, - {0x3c7b8000}, {0x3c7ba000}, {0x3c7bc000}, {0x3c7be000}, - {0x3c7c0000}, {0x3c7c2000}, {0x3c7c4000}, {0x3c7c6000}, - {0x3c7c8000}, {0x3c7ca000}, {0x3c7cc000}, {0x3c7ce000}, - {0x3c7d0000}, {0x3c7d2000}, {0x3c7d4000}, {0x3c7d6000}, - {0x3c7d8000}, {0x3c7da000}, {0x3c7dc000}, {0x3c7de000}, - {0x3c7e0000}, {0x3c7e2000}, {0x3c7e4000}, {0x3c7e6000}, - {0x3c7e8000}, {0x3c7ea000}, {0x3c7ec000}, {0x3c7ee000}, - {0x3c7f0000}, {0x3c7f2000}, {0x3c7f4000}, {0x3c7f6000}, - {0x3c7f8000}, {0x3c7fa000}, {0x3c7fc000}, {0x3c7fe000}, - {0x3c800000}, {0x3c802000}, {0x3c804000}, {0x3c806000}, - {0x3c808000}, {0x3c80a000}, {0x3c80c000}, {0x3c80e000}, - {0x3c810000}, {0x3c812000}, {0x3c814000}, {0x3c816000}, - {0x3c818000}, {0x3c81a000}, {0x3c81c000}, {0x3c81e000}, - {0x3c820000}, {0x3c822000}, {0x3c824000}, {0x3c826000}, - {0x3c828000}, {0x3c82a000}, {0x3c82c000}, {0x3c82e000}, - {0x3c830000}, {0x3c832000}, {0x3c834000}, {0x3c836000}, - {0x3c838000}, {0x3c83a000}, {0x3c83c000}, {0x3c83e000}, - {0x3c840000}, {0x3c842000}, {0x3c844000}, {0x3c846000}, - {0x3c848000}, {0x3c84a000}, {0x3c84c000}, {0x3c84e000}, - {0x3c850000}, {0x3c852000}, {0x3c854000}, {0x3c856000}, - {0x3c858000}, {0x3c85a000}, {0x3c85c000}, {0x3c85e000}, - {0x3c860000}, {0x3c862000}, {0x3c864000}, {0x3c866000}, - {0x3c868000}, {0x3c86a000}, {0x3c86c000}, {0x3c86e000}, - {0x3c870000}, {0x3c872000}, {0x3c874000}, {0x3c876000}, - {0x3c878000}, {0x3c87a000}, {0x3c87c000}, {0x3c87e000}, - {0x3c880000}, {0x3c882000}, {0x3c884000}, {0x3c886000}, - {0x3c888000}, {0x3c88a000}, {0x3c88c000}, {0x3c88e000}, - {0x3c890000}, {0x3c892000}, {0x3c894000}, {0x3c896000}, - {0x3c898000}, {0x3c89a000}, {0x3c89c000}, {0x3c89e000}, - {0x3c8a0000}, {0x3c8a2000}, {0x3c8a4000}, {0x3c8a6000}, - {0x3c8a8000}, {0x3c8aa000}, {0x3c8ac000}, {0x3c8ae000}, - {0x3c8b0000}, {0x3c8b2000}, {0x3c8b4000}, {0x3c8b6000}, - {0x3c8b8000}, {0x3c8ba000}, {0x3c8bc000}, {0x3c8be000}, - {0x3c8c0000}, {0x3c8c2000}, {0x3c8c4000}, {0x3c8c6000}, - {0x3c8c8000}, {0x3c8ca000}, {0x3c8cc000}, {0x3c8ce000}, - {0x3c8d0000}, {0x3c8d2000}, {0x3c8d4000}, {0x3c8d6000}, - {0x3c8d8000}, {0x3c8da000}, {0x3c8dc000}, {0x3c8de000}, - {0x3c8e0000}, {0x3c8e2000}, {0x3c8e4000}, {0x3c8e6000}, - {0x3c8e8000}, {0x3c8ea000}, {0x3c8ec000}, {0x3c8ee000}, - {0x3c8f0000}, {0x3c8f2000}, {0x3c8f4000}, {0x3c8f6000}, - {0x3c8f8000}, {0x3c8fa000}, {0x3c8fc000}, {0x3c8fe000}, - {0x3c900000}, {0x3c902000}, {0x3c904000}, {0x3c906000}, - {0x3c908000}, {0x3c90a000}, {0x3c90c000}, {0x3c90e000}, - {0x3c910000}, {0x3c912000}, {0x3c914000}, {0x3c916000}, - {0x3c918000}, {0x3c91a000}, {0x3c91c000}, {0x3c91e000}, - {0x3c920000}, {0x3c922000}, {0x3c924000}, {0x3c926000}, - {0x3c928000}, {0x3c92a000}, {0x3c92c000}, {0x3c92e000}, - {0x3c930000}, {0x3c932000}, {0x3c934000}, {0x3c936000}, - {0x3c938000}, {0x3c93a000}, {0x3c93c000}, {0x3c93e000}, - {0x3c940000}, {0x3c942000}, {0x3c944000}, {0x3c946000}, - {0x3c948000}, {0x3c94a000}, {0x3c94c000}, {0x3c94e000}, - {0x3c950000}, {0x3c952000}, {0x3c954000}, {0x3c956000}, - {0x3c958000}, {0x3c95a000}, {0x3c95c000}, {0x3c95e000}, - {0x3c960000}, {0x3c962000}, {0x3c964000}, {0x3c966000}, - {0x3c968000}, {0x3c96a000}, {0x3c96c000}, {0x3c96e000}, - {0x3c970000}, {0x3c972000}, {0x3c974000}, {0x3c976000}, - {0x3c978000}, {0x3c97a000}, {0x3c97c000}, {0x3c97e000}, - {0x3c980000}, {0x3c982000}, {0x3c984000}, {0x3c986000}, - {0x3c988000}, {0x3c98a000}, {0x3c98c000}, {0x3c98e000}, - {0x3c990000}, {0x3c992000}, {0x3c994000}, {0x3c996000}, - {0x3c998000}, {0x3c99a000}, {0x3c99c000}, {0x3c99e000}, - {0x3c9a0000}, {0x3c9a2000}, {0x3c9a4000}, {0x3c9a6000}, - {0x3c9a8000}, {0x3c9aa000}, {0x3c9ac000}, {0x3c9ae000}, - {0x3c9b0000}, {0x3c9b2000}, {0x3c9b4000}, {0x3c9b6000}, - {0x3c9b8000}, {0x3c9ba000}, {0x3c9bc000}, {0x3c9be000}, - {0x3c9c0000}, {0x3c9c2000}, {0x3c9c4000}, {0x3c9c6000}, - {0x3c9c8000}, {0x3c9ca000}, {0x3c9cc000}, {0x3c9ce000}, - {0x3c9d0000}, {0x3c9d2000}, {0x3c9d4000}, {0x3c9d6000}, - {0x3c9d8000}, {0x3c9da000}, {0x3c9dc000}, {0x3c9de000}, - {0x3c9e0000}, {0x3c9e2000}, {0x3c9e4000}, {0x3c9e6000}, - {0x3c9e8000}, {0x3c9ea000}, {0x3c9ec000}, {0x3c9ee000}, - {0x3c9f0000}, {0x3c9f2000}, {0x3c9f4000}, {0x3c9f6000}, - {0x3c9f8000}, {0x3c9fa000}, {0x3c9fc000}, {0x3c9fe000}, - {0x3ca00000}, {0x3ca02000}, {0x3ca04000}, {0x3ca06000}, - {0x3ca08000}, {0x3ca0a000}, {0x3ca0c000}, {0x3ca0e000}, - {0x3ca10000}, {0x3ca12000}, {0x3ca14000}, {0x3ca16000}, - {0x3ca18000}, {0x3ca1a000}, {0x3ca1c000}, {0x3ca1e000}, - {0x3ca20000}, {0x3ca22000}, {0x3ca24000}, {0x3ca26000}, - {0x3ca28000}, {0x3ca2a000}, {0x3ca2c000}, {0x3ca2e000}, - {0x3ca30000}, {0x3ca32000}, {0x3ca34000}, {0x3ca36000}, - {0x3ca38000}, {0x3ca3a000}, {0x3ca3c000}, {0x3ca3e000}, - {0x3ca40000}, {0x3ca42000}, {0x3ca44000}, {0x3ca46000}, - {0x3ca48000}, {0x3ca4a000}, {0x3ca4c000}, {0x3ca4e000}, - {0x3ca50000}, {0x3ca52000}, {0x3ca54000}, {0x3ca56000}, - {0x3ca58000}, {0x3ca5a000}, {0x3ca5c000}, {0x3ca5e000}, - {0x3ca60000}, {0x3ca62000}, {0x3ca64000}, {0x3ca66000}, - {0x3ca68000}, {0x3ca6a000}, {0x3ca6c000}, {0x3ca6e000}, - {0x3ca70000}, {0x3ca72000}, {0x3ca74000}, {0x3ca76000}, - {0x3ca78000}, {0x3ca7a000}, {0x3ca7c000}, {0x3ca7e000}, - {0x3ca80000}, {0x3ca82000}, {0x3ca84000}, {0x3ca86000}, - {0x3ca88000}, {0x3ca8a000}, {0x3ca8c000}, {0x3ca8e000}, - {0x3ca90000}, {0x3ca92000}, {0x3ca94000}, {0x3ca96000}, - {0x3ca98000}, {0x3ca9a000}, {0x3ca9c000}, {0x3ca9e000}, - {0x3caa0000}, {0x3caa2000}, {0x3caa4000}, {0x3caa6000}, - {0x3caa8000}, {0x3caaa000}, {0x3caac000}, {0x3caae000}, - {0x3cab0000}, {0x3cab2000}, {0x3cab4000}, {0x3cab6000}, - {0x3cab8000}, {0x3caba000}, {0x3cabc000}, {0x3cabe000}, - {0x3cac0000}, {0x3cac2000}, {0x3cac4000}, {0x3cac6000}, - {0x3cac8000}, {0x3caca000}, {0x3cacc000}, {0x3cace000}, - {0x3cad0000}, {0x3cad2000}, {0x3cad4000}, {0x3cad6000}, - {0x3cad8000}, {0x3cada000}, {0x3cadc000}, {0x3cade000}, - {0x3cae0000}, {0x3cae2000}, {0x3cae4000}, {0x3cae6000}, - {0x3cae8000}, {0x3caea000}, {0x3caec000}, {0x3caee000}, - {0x3caf0000}, {0x3caf2000}, {0x3caf4000}, {0x3caf6000}, - {0x3caf8000}, {0x3cafa000}, {0x3cafc000}, {0x3cafe000}, - {0x3cb00000}, {0x3cb02000}, {0x3cb04000}, {0x3cb06000}, - {0x3cb08000}, {0x3cb0a000}, {0x3cb0c000}, {0x3cb0e000}, - {0x3cb10000}, {0x3cb12000}, {0x3cb14000}, {0x3cb16000}, - {0x3cb18000}, {0x3cb1a000}, {0x3cb1c000}, {0x3cb1e000}, - {0x3cb20000}, {0x3cb22000}, {0x3cb24000}, {0x3cb26000}, - {0x3cb28000}, {0x3cb2a000}, {0x3cb2c000}, {0x3cb2e000}, - {0x3cb30000}, {0x3cb32000}, {0x3cb34000}, {0x3cb36000}, - {0x3cb38000}, {0x3cb3a000}, {0x3cb3c000}, {0x3cb3e000}, - {0x3cb40000}, {0x3cb42000}, {0x3cb44000}, {0x3cb46000}, - {0x3cb48000}, {0x3cb4a000}, {0x3cb4c000}, {0x3cb4e000}, - {0x3cb50000}, {0x3cb52000}, {0x3cb54000}, {0x3cb56000}, - {0x3cb58000}, {0x3cb5a000}, {0x3cb5c000}, {0x3cb5e000}, - {0x3cb60000}, {0x3cb62000}, {0x3cb64000}, {0x3cb66000}, - {0x3cb68000}, {0x3cb6a000}, {0x3cb6c000}, {0x3cb6e000}, - {0x3cb70000}, {0x3cb72000}, {0x3cb74000}, {0x3cb76000}, - {0x3cb78000}, {0x3cb7a000}, {0x3cb7c000}, {0x3cb7e000}, - {0x3cb80000}, {0x3cb82000}, {0x3cb84000}, {0x3cb86000}, - {0x3cb88000}, {0x3cb8a000}, {0x3cb8c000}, {0x3cb8e000}, - {0x3cb90000}, {0x3cb92000}, {0x3cb94000}, {0x3cb96000}, - {0x3cb98000}, {0x3cb9a000}, {0x3cb9c000}, {0x3cb9e000}, - {0x3cba0000}, {0x3cba2000}, {0x3cba4000}, {0x3cba6000}, - {0x3cba8000}, {0x3cbaa000}, {0x3cbac000}, {0x3cbae000}, - {0x3cbb0000}, {0x3cbb2000}, {0x3cbb4000}, {0x3cbb6000}, - {0x3cbb8000}, {0x3cbba000}, {0x3cbbc000}, {0x3cbbe000}, - {0x3cbc0000}, {0x3cbc2000}, {0x3cbc4000}, {0x3cbc6000}, - {0x3cbc8000}, {0x3cbca000}, {0x3cbcc000}, {0x3cbce000}, - {0x3cbd0000}, {0x3cbd2000}, {0x3cbd4000}, {0x3cbd6000}, - {0x3cbd8000}, {0x3cbda000}, {0x3cbdc000}, {0x3cbde000}, - {0x3cbe0000}, {0x3cbe2000}, {0x3cbe4000}, {0x3cbe6000}, - {0x3cbe8000}, {0x3cbea000}, {0x3cbec000}, {0x3cbee000}, - {0x3cbf0000}, {0x3cbf2000}, {0x3cbf4000}, {0x3cbf6000}, - {0x3cbf8000}, {0x3cbfa000}, {0x3cbfc000}, {0x3cbfe000}, - {0x3cc00000}, {0x3cc02000}, {0x3cc04000}, {0x3cc06000}, - {0x3cc08000}, {0x3cc0a000}, {0x3cc0c000}, {0x3cc0e000}, - {0x3cc10000}, {0x3cc12000}, {0x3cc14000}, {0x3cc16000}, - {0x3cc18000}, {0x3cc1a000}, {0x3cc1c000}, {0x3cc1e000}, - {0x3cc20000}, {0x3cc22000}, {0x3cc24000}, {0x3cc26000}, - {0x3cc28000}, {0x3cc2a000}, {0x3cc2c000}, {0x3cc2e000}, - {0x3cc30000}, {0x3cc32000}, {0x3cc34000}, {0x3cc36000}, - {0x3cc38000}, {0x3cc3a000}, {0x3cc3c000}, {0x3cc3e000}, - {0x3cc40000}, {0x3cc42000}, {0x3cc44000}, {0x3cc46000}, - {0x3cc48000}, {0x3cc4a000}, {0x3cc4c000}, {0x3cc4e000}, - {0x3cc50000}, {0x3cc52000}, {0x3cc54000}, {0x3cc56000}, - {0x3cc58000}, {0x3cc5a000}, {0x3cc5c000}, {0x3cc5e000}, - {0x3cc60000}, {0x3cc62000}, {0x3cc64000}, {0x3cc66000}, - {0x3cc68000}, {0x3cc6a000}, {0x3cc6c000}, {0x3cc6e000}, - {0x3cc70000}, {0x3cc72000}, {0x3cc74000}, {0x3cc76000}, - {0x3cc78000}, {0x3cc7a000}, {0x3cc7c000}, {0x3cc7e000}, - {0x3cc80000}, {0x3cc82000}, {0x3cc84000}, {0x3cc86000}, - {0x3cc88000}, {0x3cc8a000}, {0x3cc8c000}, {0x3cc8e000}, - {0x3cc90000}, {0x3cc92000}, {0x3cc94000}, {0x3cc96000}, - {0x3cc98000}, {0x3cc9a000}, {0x3cc9c000}, {0x3cc9e000}, - {0x3cca0000}, {0x3cca2000}, {0x3cca4000}, {0x3cca6000}, - {0x3cca8000}, {0x3ccaa000}, {0x3ccac000}, {0x3ccae000}, - {0x3ccb0000}, {0x3ccb2000}, {0x3ccb4000}, {0x3ccb6000}, - {0x3ccb8000}, {0x3ccba000}, {0x3ccbc000}, {0x3ccbe000}, - {0x3ccc0000}, {0x3ccc2000}, {0x3ccc4000}, {0x3ccc6000}, - {0x3ccc8000}, {0x3ccca000}, {0x3cccc000}, {0x3ccce000}, - {0x3ccd0000}, {0x3ccd2000}, {0x3ccd4000}, {0x3ccd6000}, - {0x3ccd8000}, {0x3ccda000}, {0x3ccdc000}, {0x3ccde000}, - {0x3cce0000}, {0x3cce2000}, {0x3cce4000}, {0x3cce6000}, - {0x3cce8000}, {0x3ccea000}, {0x3ccec000}, {0x3ccee000}, - {0x3ccf0000}, {0x3ccf2000}, {0x3ccf4000}, {0x3ccf6000}, - {0x3ccf8000}, {0x3ccfa000}, {0x3ccfc000}, {0x3ccfe000}, - {0x3cd00000}, {0x3cd02000}, {0x3cd04000}, {0x3cd06000}, - {0x3cd08000}, {0x3cd0a000}, {0x3cd0c000}, {0x3cd0e000}, - {0x3cd10000}, {0x3cd12000}, {0x3cd14000}, {0x3cd16000}, - {0x3cd18000}, {0x3cd1a000}, {0x3cd1c000}, {0x3cd1e000}, - {0x3cd20000}, {0x3cd22000}, {0x3cd24000}, {0x3cd26000}, - {0x3cd28000}, {0x3cd2a000}, {0x3cd2c000}, {0x3cd2e000}, - {0x3cd30000}, {0x3cd32000}, {0x3cd34000}, {0x3cd36000}, - {0x3cd38000}, {0x3cd3a000}, {0x3cd3c000}, {0x3cd3e000}, - {0x3cd40000}, {0x3cd42000}, {0x3cd44000}, {0x3cd46000}, - {0x3cd48000}, {0x3cd4a000}, {0x3cd4c000}, {0x3cd4e000}, - {0x3cd50000}, {0x3cd52000}, {0x3cd54000}, {0x3cd56000}, - {0x3cd58000}, {0x3cd5a000}, {0x3cd5c000}, {0x3cd5e000}, - {0x3cd60000}, {0x3cd62000}, {0x3cd64000}, {0x3cd66000}, - {0x3cd68000}, {0x3cd6a000}, {0x3cd6c000}, {0x3cd6e000}, - {0x3cd70000}, {0x3cd72000}, {0x3cd74000}, {0x3cd76000}, - {0x3cd78000}, {0x3cd7a000}, {0x3cd7c000}, {0x3cd7e000}, - {0x3cd80000}, {0x3cd82000}, {0x3cd84000}, {0x3cd86000}, - {0x3cd88000}, {0x3cd8a000}, {0x3cd8c000}, {0x3cd8e000}, - {0x3cd90000}, {0x3cd92000}, {0x3cd94000}, {0x3cd96000}, - {0x3cd98000}, {0x3cd9a000}, {0x3cd9c000}, {0x3cd9e000}, - {0x3cda0000}, {0x3cda2000}, {0x3cda4000}, {0x3cda6000}, - {0x3cda8000}, {0x3cdaa000}, {0x3cdac000}, {0x3cdae000}, - {0x3cdb0000}, {0x3cdb2000}, {0x3cdb4000}, {0x3cdb6000}, - {0x3cdb8000}, {0x3cdba000}, {0x3cdbc000}, {0x3cdbe000}, - {0x3cdc0000}, {0x3cdc2000}, {0x3cdc4000}, {0x3cdc6000}, - {0x3cdc8000}, {0x3cdca000}, {0x3cdcc000}, {0x3cdce000}, - {0x3cdd0000}, {0x3cdd2000}, {0x3cdd4000}, {0x3cdd6000}, - {0x3cdd8000}, {0x3cdda000}, {0x3cddc000}, {0x3cdde000}, - {0x3cde0000}, {0x3cde2000}, {0x3cde4000}, {0x3cde6000}, - {0x3cde8000}, {0x3cdea000}, {0x3cdec000}, {0x3cdee000}, - {0x3cdf0000}, {0x3cdf2000}, {0x3cdf4000}, {0x3cdf6000}, - {0x3cdf8000}, {0x3cdfa000}, {0x3cdfc000}, {0x3cdfe000}, - {0x3ce00000}, {0x3ce02000}, {0x3ce04000}, {0x3ce06000}, - {0x3ce08000}, {0x3ce0a000}, {0x3ce0c000}, {0x3ce0e000}, - {0x3ce10000}, {0x3ce12000}, {0x3ce14000}, {0x3ce16000}, - {0x3ce18000}, {0x3ce1a000}, {0x3ce1c000}, {0x3ce1e000}, - {0x3ce20000}, {0x3ce22000}, {0x3ce24000}, {0x3ce26000}, - {0x3ce28000}, {0x3ce2a000}, {0x3ce2c000}, {0x3ce2e000}, - {0x3ce30000}, {0x3ce32000}, {0x3ce34000}, {0x3ce36000}, - {0x3ce38000}, {0x3ce3a000}, {0x3ce3c000}, {0x3ce3e000}, - {0x3ce40000}, {0x3ce42000}, {0x3ce44000}, {0x3ce46000}, - {0x3ce48000}, {0x3ce4a000}, {0x3ce4c000}, {0x3ce4e000}, - {0x3ce50000}, {0x3ce52000}, {0x3ce54000}, {0x3ce56000}, - {0x3ce58000}, {0x3ce5a000}, {0x3ce5c000}, {0x3ce5e000}, - {0x3ce60000}, {0x3ce62000}, {0x3ce64000}, {0x3ce66000}, - {0x3ce68000}, {0x3ce6a000}, {0x3ce6c000}, {0x3ce6e000}, - {0x3ce70000}, {0x3ce72000}, {0x3ce74000}, {0x3ce76000}, - {0x3ce78000}, {0x3ce7a000}, {0x3ce7c000}, {0x3ce7e000}, - {0x3ce80000}, {0x3ce82000}, {0x3ce84000}, {0x3ce86000}, - {0x3ce88000}, {0x3ce8a000}, {0x3ce8c000}, {0x3ce8e000}, - {0x3ce90000}, {0x3ce92000}, {0x3ce94000}, {0x3ce96000}, - {0x3ce98000}, {0x3ce9a000}, {0x3ce9c000}, {0x3ce9e000}, - {0x3cea0000}, {0x3cea2000}, {0x3cea4000}, {0x3cea6000}, - {0x3cea8000}, {0x3ceaa000}, {0x3ceac000}, {0x3ceae000}, - {0x3ceb0000}, {0x3ceb2000}, {0x3ceb4000}, {0x3ceb6000}, - {0x3ceb8000}, {0x3ceba000}, {0x3cebc000}, {0x3cebe000}, - {0x3cec0000}, {0x3cec2000}, {0x3cec4000}, {0x3cec6000}, - {0x3cec8000}, {0x3ceca000}, {0x3cecc000}, {0x3cece000}, - {0x3ced0000}, {0x3ced2000}, {0x3ced4000}, {0x3ced6000}, - {0x3ced8000}, {0x3ceda000}, {0x3cedc000}, {0x3cede000}, - {0x3cee0000}, {0x3cee2000}, {0x3cee4000}, {0x3cee6000}, - {0x3cee8000}, {0x3ceea000}, {0x3ceec000}, {0x3ceee000}, - {0x3cef0000}, {0x3cef2000}, {0x3cef4000}, {0x3cef6000}, - {0x3cef8000}, {0x3cefa000}, {0x3cefc000}, {0x3cefe000}, - {0x3cf00000}, {0x3cf02000}, {0x3cf04000}, {0x3cf06000}, - {0x3cf08000}, {0x3cf0a000}, {0x3cf0c000}, {0x3cf0e000}, - {0x3cf10000}, {0x3cf12000}, {0x3cf14000}, {0x3cf16000}, - {0x3cf18000}, {0x3cf1a000}, {0x3cf1c000}, {0x3cf1e000}, - {0x3cf20000}, {0x3cf22000}, {0x3cf24000}, {0x3cf26000}, - {0x3cf28000}, {0x3cf2a000}, {0x3cf2c000}, {0x3cf2e000}, - {0x3cf30000}, {0x3cf32000}, {0x3cf34000}, {0x3cf36000}, - {0x3cf38000}, {0x3cf3a000}, {0x3cf3c000}, {0x3cf3e000}, - {0x3cf40000}, {0x3cf42000}, {0x3cf44000}, {0x3cf46000}, - {0x3cf48000}, {0x3cf4a000}, {0x3cf4c000}, {0x3cf4e000}, - {0x3cf50000}, {0x3cf52000}, {0x3cf54000}, {0x3cf56000}, - {0x3cf58000}, {0x3cf5a000}, {0x3cf5c000}, {0x3cf5e000}, - {0x3cf60000}, {0x3cf62000}, {0x3cf64000}, {0x3cf66000}, - {0x3cf68000}, {0x3cf6a000}, {0x3cf6c000}, {0x3cf6e000}, - {0x3cf70000}, {0x3cf72000}, {0x3cf74000}, {0x3cf76000}, - {0x3cf78000}, {0x3cf7a000}, {0x3cf7c000}, {0x3cf7e000}, - {0x3cf80000}, {0x3cf82000}, {0x3cf84000}, {0x3cf86000}, - {0x3cf88000}, {0x3cf8a000}, {0x3cf8c000}, {0x3cf8e000}, - {0x3cf90000}, {0x3cf92000}, {0x3cf94000}, {0x3cf96000}, - {0x3cf98000}, {0x3cf9a000}, {0x3cf9c000}, {0x3cf9e000}, - {0x3cfa0000}, {0x3cfa2000}, {0x3cfa4000}, {0x3cfa6000}, - {0x3cfa8000}, {0x3cfaa000}, {0x3cfac000}, {0x3cfae000}, - {0x3cfb0000}, {0x3cfb2000}, {0x3cfb4000}, {0x3cfb6000}, - {0x3cfb8000}, {0x3cfba000}, {0x3cfbc000}, {0x3cfbe000}, - {0x3cfc0000}, {0x3cfc2000}, {0x3cfc4000}, {0x3cfc6000}, - {0x3cfc8000}, {0x3cfca000}, {0x3cfcc000}, {0x3cfce000}, - {0x3cfd0000}, {0x3cfd2000}, {0x3cfd4000}, {0x3cfd6000}, - {0x3cfd8000}, {0x3cfda000}, {0x3cfdc000}, {0x3cfde000}, - {0x3cfe0000}, {0x3cfe2000}, {0x3cfe4000}, {0x3cfe6000}, - {0x3cfe8000}, {0x3cfea000}, {0x3cfec000}, {0x3cfee000}, - {0x3cff0000}, {0x3cff2000}, {0x3cff4000}, {0x3cff6000}, - {0x3cff8000}, {0x3cffa000}, {0x3cffc000}, {0x3cffe000}, - {0x3d000000}, {0x3d002000}, {0x3d004000}, {0x3d006000}, - {0x3d008000}, {0x3d00a000}, {0x3d00c000}, {0x3d00e000}, - {0x3d010000}, {0x3d012000}, {0x3d014000}, {0x3d016000}, - {0x3d018000}, {0x3d01a000}, {0x3d01c000}, {0x3d01e000}, - {0x3d020000}, {0x3d022000}, {0x3d024000}, {0x3d026000}, - {0x3d028000}, {0x3d02a000}, {0x3d02c000}, {0x3d02e000}, - {0x3d030000}, {0x3d032000}, {0x3d034000}, {0x3d036000}, - {0x3d038000}, {0x3d03a000}, {0x3d03c000}, {0x3d03e000}, - {0x3d040000}, {0x3d042000}, {0x3d044000}, {0x3d046000}, - {0x3d048000}, {0x3d04a000}, {0x3d04c000}, {0x3d04e000}, - {0x3d050000}, {0x3d052000}, {0x3d054000}, {0x3d056000}, - {0x3d058000}, {0x3d05a000}, {0x3d05c000}, {0x3d05e000}, - {0x3d060000}, {0x3d062000}, {0x3d064000}, {0x3d066000}, - {0x3d068000}, {0x3d06a000}, {0x3d06c000}, {0x3d06e000}, - {0x3d070000}, {0x3d072000}, {0x3d074000}, {0x3d076000}, - {0x3d078000}, {0x3d07a000}, {0x3d07c000}, {0x3d07e000}, - {0x3d080000}, {0x3d082000}, {0x3d084000}, {0x3d086000}, - {0x3d088000}, {0x3d08a000}, {0x3d08c000}, {0x3d08e000}, - {0x3d090000}, {0x3d092000}, {0x3d094000}, {0x3d096000}, - {0x3d098000}, {0x3d09a000}, {0x3d09c000}, {0x3d09e000}, - {0x3d0a0000}, {0x3d0a2000}, {0x3d0a4000}, {0x3d0a6000}, - {0x3d0a8000}, {0x3d0aa000}, {0x3d0ac000}, {0x3d0ae000}, - {0x3d0b0000}, {0x3d0b2000}, {0x3d0b4000}, {0x3d0b6000}, - {0x3d0b8000}, {0x3d0ba000}, {0x3d0bc000}, {0x3d0be000}, - {0x3d0c0000}, {0x3d0c2000}, {0x3d0c4000}, {0x3d0c6000}, - {0x3d0c8000}, {0x3d0ca000}, {0x3d0cc000}, {0x3d0ce000}, - {0x3d0d0000}, {0x3d0d2000}, {0x3d0d4000}, {0x3d0d6000}, - {0x3d0d8000}, {0x3d0da000}, {0x3d0dc000}, {0x3d0de000}, - {0x3d0e0000}, {0x3d0e2000}, {0x3d0e4000}, {0x3d0e6000}, - {0x3d0e8000}, {0x3d0ea000}, {0x3d0ec000}, {0x3d0ee000}, - {0x3d0f0000}, {0x3d0f2000}, {0x3d0f4000}, {0x3d0f6000}, - {0x3d0f8000}, {0x3d0fa000}, {0x3d0fc000}, {0x3d0fe000}, - {0x3d100000}, {0x3d102000}, {0x3d104000}, {0x3d106000}, - {0x3d108000}, {0x3d10a000}, {0x3d10c000}, {0x3d10e000}, - {0x3d110000}, {0x3d112000}, {0x3d114000}, {0x3d116000}, - {0x3d118000}, {0x3d11a000}, {0x3d11c000}, {0x3d11e000}, - {0x3d120000}, {0x3d122000}, {0x3d124000}, {0x3d126000}, - {0x3d128000}, {0x3d12a000}, {0x3d12c000}, {0x3d12e000}, - {0x3d130000}, {0x3d132000}, {0x3d134000}, {0x3d136000}, - {0x3d138000}, {0x3d13a000}, {0x3d13c000}, {0x3d13e000}, - {0x3d140000}, {0x3d142000}, {0x3d144000}, {0x3d146000}, - {0x3d148000}, {0x3d14a000}, {0x3d14c000}, {0x3d14e000}, - {0x3d150000}, {0x3d152000}, {0x3d154000}, {0x3d156000}, - {0x3d158000}, {0x3d15a000}, {0x3d15c000}, {0x3d15e000}, - {0x3d160000}, {0x3d162000}, {0x3d164000}, {0x3d166000}, - {0x3d168000}, {0x3d16a000}, {0x3d16c000}, {0x3d16e000}, - {0x3d170000}, {0x3d172000}, {0x3d174000}, {0x3d176000}, - {0x3d178000}, {0x3d17a000}, {0x3d17c000}, {0x3d17e000}, - {0x3d180000}, {0x3d182000}, {0x3d184000}, {0x3d186000}, - {0x3d188000}, {0x3d18a000}, {0x3d18c000}, {0x3d18e000}, - {0x3d190000}, {0x3d192000}, {0x3d194000}, {0x3d196000}, - {0x3d198000}, {0x3d19a000}, {0x3d19c000}, {0x3d19e000}, - {0x3d1a0000}, {0x3d1a2000}, {0x3d1a4000}, {0x3d1a6000}, - {0x3d1a8000}, {0x3d1aa000}, {0x3d1ac000}, {0x3d1ae000}, - {0x3d1b0000}, {0x3d1b2000}, {0x3d1b4000}, {0x3d1b6000}, - {0x3d1b8000}, {0x3d1ba000}, {0x3d1bc000}, {0x3d1be000}, - {0x3d1c0000}, {0x3d1c2000}, {0x3d1c4000}, {0x3d1c6000}, - {0x3d1c8000}, {0x3d1ca000}, {0x3d1cc000}, {0x3d1ce000}, - {0x3d1d0000}, {0x3d1d2000}, {0x3d1d4000}, {0x3d1d6000}, - {0x3d1d8000}, {0x3d1da000}, {0x3d1dc000}, {0x3d1de000}, - {0x3d1e0000}, {0x3d1e2000}, {0x3d1e4000}, {0x3d1e6000}, - {0x3d1e8000}, {0x3d1ea000}, {0x3d1ec000}, {0x3d1ee000}, - {0x3d1f0000}, {0x3d1f2000}, {0x3d1f4000}, {0x3d1f6000}, - {0x3d1f8000}, {0x3d1fa000}, {0x3d1fc000}, {0x3d1fe000}, - {0x3d200000}, {0x3d202000}, {0x3d204000}, {0x3d206000}, - {0x3d208000}, {0x3d20a000}, {0x3d20c000}, {0x3d20e000}, - {0x3d210000}, {0x3d212000}, {0x3d214000}, {0x3d216000}, - {0x3d218000}, {0x3d21a000}, {0x3d21c000}, {0x3d21e000}, - {0x3d220000}, {0x3d222000}, {0x3d224000}, {0x3d226000}, - {0x3d228000}, {0x3d22a000}, {0x3d22c000}, {0x3d22e000}, - {0x3d230000}, {0x3d232000}, {0x3d234000}, {0x3d236000}, - {0x3d238000}, {0x3d23a000}, {0x3d23c000}, {0x3d23e000}, - {0x3d240000}, {0x3d242000}, {0x3d244000}, {0x3d246000}, - {0x3d248000}, {0x3d24a000}, {0x3d24c000}, {0x3d24e000}, - {0x3d250000}, {0x3d252000}, {0x3d254000}, {0x3d256000}, - {0x3d258000}, {0x3d25a000}, {0x3d25c000}, {0x3d25e000}, - {0x3d260000}, {0x3d262000}, {0x3d264000}, {0x3d266000}, - {0x3d268000}, {0x3d26a000}, {0x3d26c000}, {0x3d26e000}, - {0x3d270000}, {0x3d272000}, {0x3d274000}, {0x3d276000}, - {0x3d278000}, {0x3d27a000}, {0x3d27c000}, {0x3d27e000}, - {0x3d280000}, {0x3d282000}, {0x3d284000}, {0x3d286000}, - {0x3d288000}, {0x3d28a000}, {0x3d28c000}, {0x3d28e000}, - {0x3d290000}, {0x3d292000}, {0x3d294000}, {0x3d296000}, - {0x3d298000}, {0x3d29a000}, {0x3d29c000}, {0x3d29e000}, - {0x3d2a0000}, {0x3d2a2000}, {0x3d2a4000}, {0x3d2a6000}, - {0x3d2a8000}, {0x3d2aa000}, {0x3d2ac000}, {0x3d2ae000}, - {0x3d2b0000}, {0x3d2b2000}, {0x3d2b4000}, {0x3d2b6000}, - {0x3d2b8000}, {0x3d2ba000}, {0x3d2bc000}, {0x3d2be000}, - {0x3d2c0000}, {0x3d2c2000}, {0x3d2c4000}, {0x3d2c6000}, - {0x3d2c8000}, {0x3d2ca000}, {0x3d2cc000}, {0x3d2ce000}, - {0x3d2d0000}, {0x3d2d2000}, {0x3d2d4000}, {0x3d2d6000}, - {0x3d2d8000}, {0x3d2da000}, {0x3d2dc000}, {0x3d2de000}, - {0x3d2e0000}, {0x3d2e2000}, {0x3d2e4000}, {0x3d2e6000}, - {0x3d2e8000}, {0x3d2ea000}, {0x3d2ec000}, {0x3d2ee000}, - {0x3d2f0000}, {0x3d2f2000}, {0x3d2f4000}, {0x3d2f6000}, - {0x3d2f8000}, {0x3d2fa000}, {0x3d2fc000}, {0x3d2fe000}, - {0x3d300000}, {0x3d302000}, {0x3d304000}, {0x3d306000}, - {0x3d308000}, {0x3d30a000}, {0x3d30c000}, {0x3d30e000}, - {0x3d310000}, {0x3d312000}, {0x3d314000}, {0x3d316000}, - {0x3d318000}, {0x3d31a000}, {0x3d31c000}, {0x3d31e000}, - {0x3d320000}, {0x3d322000}, {0x3d324000}, {0x3d326000}, - {0x3d328000}, {0x3d32a000}, {0x3d32c000}, {0x3d32e000}, - {0x3d330000}, {0x3d332000}, {0x3d334000}, {0x3d336000}, - {0x3d338000}, {0x3d33a000}, {0x3d33c000}, {0x3d33e000}, - {0x3d340000}, {0x3d342000}, {0x3d344000}, {0x3d346000}, - {0x3d348000}, {0x3d34a000}, {0x3d34c000}, {0x3d34e000}, - {0x3d350000}, {0x3d352000}, {0x3d354000}, {0x3d356000}, - {0x3d358000}, {0x3d35a000}, {0x3d35c000}, {0x3d35e000}, - {0x3d360000}, {0x3d362000}, {0x3d364000}, {0x3d366000}, - {0x3d368000}, {0x3d36a000}, {0x3d36c000}, {0x3d36e000}, - {0x3d370000}, {0x3d372000}, {0x3d374000}, {0x3d376000}, - {0x3d378000}, {0x3d37a000}, {0x3d37c000}, {0x3d37e000}, - {0x3d380000}, {0x3d382000}, {0x3d384000}, {0x3d386000}, - {0x3d388000}, {0x3d38a000}, {0x3d38c000}, {0x3d38e000}, - {0x3d390000}, {0x3d392000}, {0x3d394000}, {0x3d396000}, - {0x3d398000}, {0x3d39a000}, {0x3d39c000}, {0x3d39e000}, - {0x3d3a0000}, {0x3d3a2000}, {0x3d3a4000}, {0x3d3a6000}, - {0x3d3a8000}, {0x3d3aa000}, {0x3d3ac000}, {0x3d3ae000}, - {0x3d3b0000}, {0x3d3b2000}, {0x3d3b4000}, {0x3d3b6000}, - {0x3d3b8000}, {0x3d3ba000}, {0x3d3bc000}, {0x3d3be000}, - {0x3d3c0000}, {0x3d3c2000}, {0x3d3c4000}, {0x3d3c6000}, - {0x3d3c8000}, {0x3d3ca000}, {0x3d3cc000}, {0x3d3ce000}, - {0x3d3d0000}, {0x3d3d2000}, {0x3d3d4000}, {0x3d3d6000}, - {0x3d3d8000}, {0x3d3da000}, {0x3d3dc000}, {0x3d3de000}, - {0x3d3e0000}, {0x3d3e2000}, {0x3d3e4000}, {0x3d3e6000}, - {0x3d3e8000}, {0x3d3ea000}, {0x3d3ec000}, {0x3d3ee000}, - {0x3d3f0000}, {0x3d3f2000}, {0x3d3f4000}, {0x3d3f6000}, - {0x3d3f8000}, {0x3d3fa000}, {0x3d3fc000}, {0x3d3fe000}, - {0x3d400000}, {0x3d402000}, {0x3d404000}, {0x3d406000}, - {0x3d408000}, {0x3d40a000}, {0x3d40c000}, {0x3d40e000}, - {0x3d410000}, {0x3d412000}, {0x3d414000}, {0x3d416000}, - {0x3d418000}, {0x3d41a000}, {0x3d41c000}, {0x3d41e000}, - {0x3d420000}, {0x3d422000}, {0x3d424000}, {0x3d426000}, - {0x3d428000}, {0x3d42a000}, {0x3d42c000}, {0x3d42e000}, - {0x3d430000}, {0x3d432000}, {0x3d434000}, {0x3d436000}, - {0x3d438000}, {0x3d43a000}, {0x3d43c000}, {0x3d43e000}, - {0x3d440000}, {0x3d442000}, {0x3d444000}, {0x3d446000}, - {0x3d448000}, {0x3d44a000}, {0x3d44c000}, {0x3d44e000}, - {0x3d450000}, {0x3d452000}, {0x3d454000}, {0x3d456000}, - {0x3d458000}, {0x3d45a000}, {0x3d45c000}, {0x3d45e000}, - {0x3d460000}, {0x3d462000}, {0x3d464000}, {0x3d466000}, - {0x3d468000}, {0x3d46a000}, {0x3d46c000}, {0x3d46e000}, - {0x3d470000}, {0x3d472000}, {0x3d474000}, {0x3d476000}, - {0x3d478000}, {0x3d47a000}, {0x3d47c000}, {0x3d47e000}, - {0x3d480000}, {0x3d482000}, {0x3d484000}, {0x3d486000}, - {0x3d488000}, {0x3d48a000}, {0x3d48c000}, {0x3d48e000}, - {0x3d490000}, {0x3d492000}, {0x3d494000}, {0x3d496000}, - {0x3d498000}, {0x3d49a000}, {0x3d49c000}, {0x3d49e000}, - {0x3d4a0000}, {0x3d4a2000}, {0x3d4a4000}, {0x3d4a6000}, - {0x3d4a8000}, {0x3d4aa000}, {0x3d4ac000}, {0x3d4ae000}, - {0x3d4b0000}, {0x3d4b2000}, {0x3d4b4000}, {0x3d4b6000}, - {0x3d4b8000}, {0x3d4ba000}, {0x3d4bc000}, {0x3d4be000}, - {0x3d4c0000}, {0x3d4c2000}, {0x3d4c4000}, {0x3d4c6000}, - {0x3d4c8000}, {0x3d4ca000}, {0x3d4cc000}, {0x3d4ce000}, - {0x3d4d0000}, {0x3d4d2000}, {0x3d4d4000}, {0x3d4d6000}, - {0x3d4d8000}, {0x3d4da000}, {0x3d4dc000}, {0x3d4de000}, - {0x3d4e0000}, {0x3d4e2000}, {0x3d4e4000}, {0x3d4e6000}, - {0x3d4e8000}, {0x3d4ea000}, {0x3d4ec000}, {0x3d4ee000}, - {0x3d4f0000}, {0x3d4f2000}, {0x3d4f4000}, {0x3d4f6000}, - {0x3d4f8000}, {0x3d4fa000}, {0x3d4fc000}, {0x3d4fe000}, - {0x3d500000}, {0x3d502000}, {0x3d504000}, {0x3d506000}, - {0x3d508000}, {0x3d50a000}, {0x3d50c000}, {0x3d50e000}, - {0x3d510000}, {0x3d512000}, {0x3d514000}, {0x3d516000}, - {0x3d518000}, {0x3d51a000}, {0x3d51c000}, {0x3d51e000}, - {0x3d520000}, {0x3d522000}, {0x3d524000}, {0x3d526000}, - {0x3d528000}, {0x3d52a000}, {0x3d52c000}, {0x3d52e000}, - {0x3d530000}, {0x3d532000}, {0x3d534000}, {0x3d536000}, - {0x3d538000}, {0x3d53a000}, {0x3d53c000}, {0x3d53e000}, - {0x3d540000}, {0x3d542000}, {0x3d544000}, {0x3d546000}, - {0x3d548000}, {0x3d54a000}, {0x3d54c000}, {0x3d54e000}, - {0x3d550000}, {0x3d552000}, {0x3d554000}, {0x3d556000}, - {0x3d558000}, {0x3d55a000}, {0x3d55c000}, {0x3d55e000}, - {0x3d560000}, {0x3d562000}, {0x3d564000}, {0x3d566000}, - {0x3d568000}, {0x3d56a000}, {0x3d56c000}, {0x3d56e000}, - {0x3d570000}, {0x3d572000}, {0x3d574000}, {0x3d576000}, - {0x3d578000}, {0x3d57a000}, {0x3d57c000}, {0x3d57e000}, - {0x3d580000}, {0x3d582000}, {0x3d584000}, {0x3d586000}, - {0x3d588000}, {0x3d58a000}, {0x3d58c000}, {0x3d58e000}, - {0x3d590000}, {0x3d592000}, {0x3d594000}, {0x3d596000}, - {0x3d598000}, {0x3d59a000}, {0x3d59c000}, {0x3d59e000}, - {0x3d5a0000}, {0x3d5a2000}, {0x3d5a4000}, {0x3d5a6000}, - {0x3d5a8000}, {0x3d5aa000}, {0x3d5ac000}, {0x3d5ae000}, - {0x3d5b0000}, {0x3d5b2000}, {0x3d5b4000}, {0x3d5b6000}, - {0x3d5b8000}, {0x3d5ba000}, {0x3d5bc000}, {0x3d5be000}, - {0x3d5c0000}, {0x3d5c2000}, {0x3d5c4000}, {0x3d5c6000}, - {0x3d5c8000}, {0x3d5ca000}, {0x3d5cc000}, {0x3d5ce000}, - {0x3d5d0000}, {0x3d5d2000}, {0x3d5d4000}, {0x3d5d6000}, - {0x3d5d8000}, {0x3d5da000}, {0x3d5dc000}, {0x3d5de000}, - {0x3d5e0000}, {0x3d5e2000}, {0x3d5e4000}, {0x3d5e6000}, - {0x3d5e8000}, {0x3d5ea000}, {0x3d5ec000}, {0x3d5ee000}, - {0x3d5f0000}, {0x3d5f2000}, {0x3d5f4000}, {0x3d5f6000}, - {0x3d5f8000}, {0x3d5fa000}, {0x3d5fc000}, {0x3d5fe000}, - {0x3d600000}, {0x3d602000}, {0x3d604000}, {0x3d606000}, - {0x3d608000}, {0x3d60a000}, {0x3d60c000}, {0x3d60e000}, - {0x3d610000}, {0x3d612000}, {0x3d614000}, {0x3d616000}, - {0x3d618000}, {0x3d61a000}, {0x3d61c000}, {0x3d61e000}, - {0x3d620000}, {0x3d622000}, {0x3d624000}, {0x3d626000}, - {0x3d628000}, {0x3d62a000}, {0x3d62c000}, {0x3d62e000}, - {0x3d630000}, {0x3d632000}, {0x3d634000}, {0x3d636000}, - {0x3d638000}, {0x3d63a000}, {0x3d63c000}, {0x3d63e000}, - {0x3d640000}, {0x3d642000}, {0x3d644000}, {0x3d646000}, - {0x3d648000}, {0x3d64a000}, {0x3d64c000}, {0x3d64e000}, - {0x3d650000}, {0x3d652000}, {0x3d654000}, {0x3d656000}, - {0x3d658000}, {0x3d65a000}, {0x3d65c000}, {0x3d65e000}, - {0x3d660000}, {0x3d662000}, {0x3d664000}, {0x3d666000}, - {0x3d668000}, {0x3d66a000}, {0x3d66c000}, {0x3d66e000}, - {0x3d670000}, {0x3d672000}, {0x3d674000}, {0x3d676000}, - {0x3d678000}, {0x3d67a000}, {0x3d67c000}, {0x3d67e000}, - {0x3d680000}, {0x3d682000}, {0x3d684000}, {0x3d686000}, - {0x3d688000}, {0x3d68a000}, {0x3d68c000}, {0x3d68e000}, - {0x3d690000}, {0x3d692000}, {0x3d694000}, {0x3d696000}, - {0x3d698000}, {0x3d69a000}, {0x3d69c000}, {0x3d69e000}, - {0x3d6a0000}, {0x3d6a2000}, {0x3d6a4000}, {0x3d6a6000}, - {0x3d6a8000}, {0x3d6aa000}, {0x3d6ac000}, {0x3d6ae000}, - {0x3d6b0000}, {0x3d6b2000}, {0x3d6b4000}, {0x3d6b6000}, - {0x3d6b8000}, {0x3d6ba000}, {0x3d6bc000}, {0x3d6be000}, - {0x3d6c0000}, {0x3d6c2000}, {0x3d6c4000}, {0x3d6c6000}, - {0x3d6c8000}, {0x3d6ca000}, {0x3d6cc000}, {0x3d6ce000}, - {0x3d6d0000}, {0x3d6d2000}, {0x3d6d4000}, {0x3d6d6000}, - {0x3d6d8000}, {0x3d6da000}, {0x3d6dc000}, {0x3d6de000}, - {0x3d6e0000}, {0x3d6e2000}, {0x3d6e4000}, {0x3d6e6000}, - {0x3d6e8000}, {0x3d6ea000}, {0x3d6ec000}, {0x3d6ee000}, - {0x3d6f0000}, {0x3d6f2000}, {0x3d6f4000}, {0x3d6f6000}, - {0x3d6f8000}, {0x3d6fa000}, {0x3d6fc000}, {0x3d6fe000}, - {0x3d700000}, {0x3d702000}, {0x3d704000}, {0x3d706000}, - {0x3d708000}, {0x3d70a000}, {0x3d70c000}, {0x3d70e000}, - {0x3d710000}, {0x3d712000}, {0x3d714000}, {0x3d716000}, - {0x3d718000}, {0x3d71a000}, {0x3d71c000}, {0x3d71e000}, - {0x3d720000}, {0x3d722000}, {0x3d724000}, {0x3d726000}, - {0x3d728000}, {0x3d72a000}, {0x3d72c000}, {0x3d72e000}, - {0x3d730000}, {0x3d732000}, {0x3d734000}, {0x3d736000}, - {0x3d738000}, {0x3d73a000}, {0x3d73c000}, {0x3d73e000}, - {0x3d740000}, {0x3d742000}, {0x3d744000}, {0x3d746000}, - {0x3d748000}, {0x3d74a000}, {0x3d74c000}, {0x3d74e000}, - {0x3d750000}, {0x3d752000}, {0x3d754000}, {0x3d756000}, - {0x3d758000}, {0x3d75a000}, {0x3d75c000}, {0x3d75e000}, - {0x3d760000}, {0x3d762000}, {0x3d764000}, {0x3d766000}, - {0x3d768000}, {0x3d76a000}, {0x3d76c000}, {0x3d76e000}, - {0x3d770000}, {0x3d772000}, {0x3d774000}, {0x3d776000}, - {0x3d778000}, {0x3d77a000}, {0x3d77c000}, {0x3d77e000}, - {0x3d780000}, {0x3d782000}, {0x3d784000}, {0x3d786000}, - {0x3d788000}, {0x3d78a000}, {0x3d78c000}, {0x3d78e000}, - {0x3d790000}, {0x3d792000}, {0x3d794000}, {0x3d796000}, - {0x3d798000}, {0x3d79a000}, {0x3d79c000}, {0x3d79e000}, - {0x3d7a0000}, {0x3d7a2000}, {0x3d7a4000}, {0x3d7a6000}, - {0x3d7a8000}, {0x3d7aa000}, {0x3d7ac000}, {0x3d7ae000}, - {0x3d7b0000}, {0x3d7b2000}, {0x3d7b4000}, {0x3d7b6000}, - {0x3d7b8000}, {0x3d7ba000}, {0x3d7bc000}, {0x3d7be000}, - {0x3d7c0000}, {0x3d7c2000}, {0x3d7c4000}, {0x3d7c6000}, - {0x3d7c8000}, {0x3d7ca000}, {0x3d7cc000}, {0x3d7ce000}, - {0x3d7d0000}, {0x3d7d2000}, {0x3d7d4000}, {0x3d7d6000}, - {0x3d7d8000}, {0x3d7da000}, {0x3d7dc000}, {0x3d7de000}, - {0x3d7e0000}, {0x3d7e2000}, {0x3d7e4000}, {0x3d7e6000}, - {0x3d7e8000}, {0x3d7ea000}, {0x3d7ec000}, {0x3d7ee000}, - {0x3d7f0000}, {0x3d7f2000}, {0x3d7f4000}, {0x3d7f6000}, - {0x3d7f8000}, {0x3d7fa000}, {0x3d7fc000}, {0x3d7fe000}, - {0x3d800000}, {0x3d802000}, {0x3d804000}, {0x3d806000}, - {0x3d808000}, {0x3d80a000}, {0x3d80c000}, {0x3d80e000}, - {0x3d810000}, {0x3d812000}, {0x3d814000}, {0x3d816000}, - {0x3d818000}, {0x3d81a000}, {0x3d81c000}, {0x3d81e000}, - {0x3d820000}, {0x3d822000}, {0x3d824000}, {0x3d826000}, - {0x3d828000}, {0x3d82a000}, {0x3d82c000}, {0x3d82e000}, - {0x3d830000}, {0x3d832000}, {0x3d834000}, {0x3d836000}, - {0x3d838000}, {0x3d83a000}, {0x3d83c000}, {0x3d83e000}, - {0x3d840000}, {0x3d842000}, {0x3d844000}, {0x3d846000}, - {0x3d848000}, {0x3d84a000}, {0x3d84c000}, {0x3d84e000}, - {0x3d850000}, {0x3d852000}, {0x3d854000}, {0x3d856000}, - {0x3d858000}, {0x3d85a000}, {0x3d85c000}, {0x3d85e000}, - {0x3d860000}, {0x3d862000}, {0x3d864000}, {0x3d866000}, - {0x3d868000}, {0x3d86a000}, {0x3d86c000}, {0x3d86e000}, - {0x3d870000}, {0x3d872000}, {0x3d874000}, {0x3d876000}, - {0x3d878000}, {0x3d87a000}, {0x3d87c000}, {0x3d87e000}, - {0x3d880000}, {0x3d882000}, {0x3d884000}, {0x3d886000}, - {0x3d888000}, {0x3d88a000}, {0x3d88c000}, {0x3d88e000}, - {0x3d890000}, {0x3d892000}, {0x3d894000}, {0x3d896000}, - {0x3d898000}, {0x3d89a000}, {0x3d89c000}, {0x3d89e000}, - {0x3d8a0000}, {0x3d8a2000}, {0x3d8a4000}, {0x3d8a6000}, - {0x3d8a8000}, {0x3d8aa000}, {0x3d8ac000}, {0x3d8ae000}, - {0x3d8b0000}, {0x3d8b2000}, {0x3d8b4000}, {0x3d8b6000}, - {0x3d8b8000}, {0x3d8ba000}, {0x3d8bc000}, {0x3d8be000}, - {0x3d8c0000}, {0x3d8c2000}, {0x3d8c4000}, {0x3d8c6000}, - {0x3d8c8000}, {0x3d8ca000}, {0x3d8cc000}, {0x3d8ce000}, - {0x3d8d0000}, {0x3d8d2000}, {0x3d8d4000}, {0x3d8d6000}, - {0x3d8d8000}, {0x3d8da000}, {0x3d8dc000}, {0x3d8de000}, - {0x3d8e0000}, {0x3d8e2000}, {0x3d8e4000}, {0x3d8e6000}, - {0x3d8e8000}, {0x3d8ea000}, {0x3d8ec000}, {0x3d8ee000}, - {0x3d8f0000}, {0x3d8f2000}, {0x3d8f4000}, {0x3d8f6000}, - {0x3d8f8000}, {0x3d8fa000}, {0x3d8fc000}, {0x3d8fe000}, - {0x3d900000}, {0x3d902000}, {0x3d904000}, {0x3d906000}, - {0x3d908000}, {0x3d90a000}, {0x3d90c000}, {0x3d90e000}, - {0x3d910000}, {0x3d912000}, {0x3d914000}, {0x3d916000}, - {0x3d918000}, {0x3d91a000}, {0x3d91c000}, {0x3d91e000}, - {0x3d920000}, {0x3d922000}, {0x3d924000}, {0x3d926000}, - {0x3d928000}, {0x3d92a000}, {0x3d92c000}, {0x3d92e000}, - {0x3d930000}, {0x3d932000}, {0x3d934000}, {0x3d936000}, - {0x3d938000}, {0x3d93a000}, {0x3d93c000}, {0x3d93e000}, - {0x3d940000}, {0x3d942000}, {0x3d944000}, {0x3d946000}, - {0x3d948000}, {0x3d94a000}, {0x3d94c000}, {0x3d94e000}, - {0x3d950000}, {0x3d952000}, {0x3d954000}, {0x3d956000}, - {0x3d958000}, {0x3d95a000}, {0x3d95c000}, {0x3d95e000}, - {0x3d960000}, {0x3d962000}, {0x3d964000}, {0x3d966000}, - {0x3d968000}, {0x3d96a000}, {0x3d96c000}, {0x3d96e000}, - {0x3d970000}, {0x3d972000}, {0x3d974000}, {0x3d976000}, - {0x3d978000}, {0x3d97a000}, {0x3d97c000}, {0x3d97e000}, - {0x3d980000}, {0x3d982000}, {0x3d984000}, {0x3d986000}, - {0x3d988000}, {0x3d98a000}, {0x3d98c000}, {0x3d98e000}, - {0x3d990000}, {0x3d992000}, {0x3d994000}, {0x3d996000}, - {0x3d998000}, {0x3d99a000}, {0x3d99c000}, {0x3d99e000}, - {0x3d9a0000}, {0x3d9a2000}, {0x3d9a4000}, {0x3d9a6000}, - {0x3d9a8000}, {0x3d9aa000}, {0x3d9ac000}, {0x3d9ae000}, - {0x3d9b0000}, {0x3d9b2000}, {0x3d9b4000}, {0x3d9b6000}, - {0x3d9b8000}, {0x3d9ba000}, {0x3d9bc000}, {0x3d9be000}, - {0x3d9c0000}, {0x3d9c2000}, {0x3d9c4000}, {0x3d9c6000}, - {0x3d9c8000}, {0x3d9ca000}, {0x3d9cc000}, {0x3d9ce000}, - {0x3d9d0000}, {0x3d9d2000}, {0x3d9d4000}, {0x3d9d6000}, - {0x3d9d8000}, {0x3d9da000}, {0x3d9dc000}, {0x3d9de000}, - {0x3d9e0000}, {0x3d9e2000}, {0x3d9e4000}, {0x3d9e6000}, - {0x3d9e8000}, {0x3d9ea000}, {0x3d9ec000}, {0x3d9ee000}, - {0x3d9f0000}, {0x3d9f2000}, {0x3d9f4000}, {0x3d9f6000}, - {0x3d9f8000}, {0x3d9fa000}, {0x3d9fc000}, {0x3d9fe000}, - {0x3da00000}, {0x3da02000}, {0x3da04000}, {0x3da06000}, - {0x3da08000}, {0x3da0a000}, {0x3da0c000}, {0x3da0e000}, - {0x3da10000}, {0x3da12000}, {0x3da14000}, {0x3da16000}, - {0x3da18000}, {0x3da1a000}, {0x3da1c000}, {0x3da1e000}, - {0x3da20000}, {0x3da22000}, {0x3da24000}, {0x3da26000}, - {0x3da28000}, {0x3da2a000}, {0x3da2c000}, {0x3da2e000}, - {0x3da30000}, {0x3da32000}, {0x3da34000}, {0x3da36000}, - {0x3da38000}, {0x3da3a000}, {0x3da3c000}, {0x3da3e000}, - {0x3da40000}, {0x3da42000}, {0x3da44000}, {0x3da46000}, - {0x3da48000}, {0x3da4a000}, {0x3da4c000}, {0x3da4e000}, - {0x3da50000}, {0x3da52000}, {0x3da54000}, {0x3da56000}, - {0x3da58000}, {0x3da5a000}, {0x3da5c000}, {0x3da5e000}, - {0x3da60000}, {0x3da62000}, {0x3da64000}, {0x3da66000}, - {0x3da68000}, {0x3da6a000}, {0x3da6c000}, {0x3da6e000}, - {0x3da70000}, {0x3da72000}, {0x3da74000}, {0x3da76000}, - {0x3da78000}, {0x3da7a000}, {0x3da7c000}, {0x3da7e000}, - {0x3da80000}, {0x3da82000}, {0x3da84000}, {0x3da86000}, - {0x3da88000}, {0x3da8a000}, {0x3da8c000}, {0x3da8e000}, - {0x3da90000}, {0x3da92000}, {0x3da94000}, {0x3da96000}, - {0x3da98000}, {0x3da9a000}, {0x3da9c000}, {0x3da9e000}, - {0x3daa0000}, {0x3daa2000}, {0x3daa4000}, {0x3daa6000}, - {0x3daa8000}, {0x3daaa000}, {0x3daac000}, {0x3daae000}, - {0x3dab0000}, {0x3dab2000}, {0x3dab4000}, {0x3dab6000}, - {0x3dab8000}, {0x3daba000}, {0x3dabc000}, {0x3dabe000}, - {0x3dac0000}, {0x3dac2000}, {0x3dac4000}, {0x3dac6000}, - {0x3dac8000}, {0x3daca000}, {0x3dacc000}, {0x3dace000}, - {0x3dad0000}, {0x3dad2000}, {0x3dad4000}, {0x3dad6000}, - {0x3dad8000}, {0x3dada000}, {0x3dadc000}, {0x3dade000}, - {0x3dae0000}, {0x3dae2000}, {0x3dae4000}, {0x3dae6000}, - {0x3dae8000}, {0x3daea000}, {0x3daec000}, {0x3daee000}, - {0x3daf0000}, {0x3daf2000}, {0x3daf4000}, {0x3daf6000}, - {0x3daf8000}, {0x3dafa000}, {0x3dafc000}, {0x3dafe000}, - {0x3db00000}, {0x3db02000}, {0x3db04000}, {0x3db06000}, - {0x3db08000}, {0x3db0a000}, {0x3db0c000}, {0x3db0e000}, - {0x3db10000}, {0x3db12000}, {0x3db14000}, {0x3db16000}, - {0x3db18000}, {0x3db1a000}, {0x3db1c000}, {0x3db1e000}, - {0x3db20000}, {0x3db22000}, {0x3db24000}, {0x3db26000}, - {0x3db28000}, {0x3db2a000}, {0x3db2c000}, {0x3db2e000}, - {0x3db30000}, {0x3db32000}, {0x3db34000}, {0x3db36000}, - {0x3db38000}, {0x3db3a000}, {0x3db3c000}, {0x3db3e000}, - {0x3db40000}, {0x3db42000}, {0x3db44000}, {0x3db46000}, - {0x3db48000}, {0x3db4a000}, {0x3db4c000}, {0x3db4e000}, - {0x3db50000}, {0x3db52000}, {0x3db54000}, {0x3db56000}, - {0x3db58000}, {0x3db5a000}, {0x3db5c000}, {0x3db5e000}, - {0x3db60000}, {0x3db62000}, {0x3db64000}, {0x3db66000}, - {0x3db68000}, {0x3db6a000}, {0x3db6c000}, {0x3db6e000}, - {0x3db70000}, {0x3db72000}, {0x3db74000}, {0x3db76000}, - {0x3db78000}, {0x3db7a000}, {0x3db7c000}, {0x3db7e000}, - {0x3db80000}, {0x3db82000}, {0x3db84000}, {0x3db86000}, - {0x3db88000}, {0x3db8a000}, {0x3db8c000}, {0x3db8e000}, - {0x3db90000}, {0x3db92000}, {0x3db94000}, {0x3db96000}, - {0x3db98000}, {0x3db9a000}, {0x3db9c000}, {0x3db9e000}, - {0x3dba0000}, {0x3dba2000}, {0x3dba4000}, {0x3dba6000}, - {0x3dba8000}, {0x3dbaa000}, {0x3dbac000}, {0x3dbae000}, - {0x3dbb0000}, {0x3dbb2000}, {0x3dbb4000}, {0x3dbb6000}, - {0x3dbb8000}, {0x3dbba000}, {0x3dbbc000}, {0x3dbbe000}, - {0x3dbc0000}, {0x3dbc2000}, {0x3dbc4000}, {0x3dbc6000}, - {0x3dbc8000}, {0x3dbca000}, {0x3dbcc000}, {0x3dbce000}, - {0x3dbd0000}, {0x3dbd2000}, {0x3dbd4000}, {0x3dbd6000}, - {0x3dbd8000}, {0x3dbda000}, {0x3dbdc000}, {0x3dbde000}, - {0x3dbe0000}, {0x3dbe2000}, {0x3dbe4000}, {0x3dbe6000}, - {0x3dbe8000}, {0x3dbea000}, {0x3dbec000}, {0x3dbee000}, - {0x3dbf0000}, {0x3dbf2000}, {0x3dbf4000}, {0x3dbf6000}, - {0x3dbf8000}, {0x3dbfa000}, {0x3dbfc000}, {0x3dbfe000}, - {0x3dc00000}, {0x3dc02000}, {0x3dc04000}, {0x3dc06000}, - {0x3dc08000}, {0x3dc0a000}, {0x3dc0c000}, {0x3dc0e000}, - {0x3dc10000}, {0x3dc12000}, {0x3dc14000}, {0x3dc16000}, - {0x3dc18000}, {0x3dc1a000}, {0x3dc1c000}, {0x3dc1e000}, - {0x3dc20000}, {0x3dc22000}, {0x3dc24000}, {0x3dc26000}, - {0x3dc28000}, {0x3dc2a000}, {0x3dc2c000}, {0x3dc2e000}, - {0x3dc30000}, {0x3dc32000}, {0x3dc34000}, {0x3dc36000}, - {0x3dc38000}, {0x3dc3a000}, {0x3dc3c000}, {0x3dc3e000}, - {0x3dc40000}, {0x3dc42000}, {0x3dc44000}, {0x3dc46000}, - {0x3dc48000}, {0x3dc4a000}, {0x3dc4c000}, {0x3dc4e000}, - {0x3dc50000}, {0x3dc52000}, {0x3dc54000}, {0x3dc56000}, - {0x3dc58000}, {0x3dc5a000}, {0x3dc5c000}, {0x3dc5e000}, - {0x3dc60000}, {0x3dc62000}, {0x3dc64000}, {0x3dc66000}, - {0x3dc68000}, {0x3dc6a000}, {0x3dc6c000}, {0x3dc6e000}, - {0x3dc70000}, {0x3dc72000}, {0x3dc74000}, {0x3dc76000}, - {0x3dc78000}, {0x3dc7a000}, {0x3dc7c000}, {0x3dc7e000}, - {0x3dc80000}, {0x3dc82000}, {0x3dc84000}, {0x3dc86000}, - {0x3dc88000}, {0x3dc8a000}, {0x3dc8c000}, {0x3dc8e000}, - {0x3dc90000}, {0x3dc92000}, {0x3dc94000}, {0x3dc96000}, - {0x3dc98000}, {0x3dc9a000}, {0x3dc9c000}, {0x3dc9e000}, - {0x3dca0000}, {0x3dca2000}, {0x3dca4000}, {0x3dca6000}, - {0x3dca8000}, {0x3dcaa000}, {0x3dcac000}, {0x3dcae000}, - {0x3dcb0000}, {0x3dcb2000}, {0x3dcb4000}, {0x3dcb6000}, - {0x3dcb8000}, {0x3dcba000}, {0x3dcbc000}, {0x3dcbe000}, - {0x3dcc0000}, {0x3dcc2000}, {0x3dcc4000}, {0x3dcc6000}, - {0x3dcc8000}, {0x3dcca000}, {0x3dccc000}, {0x3dcce000}, - {0x3dcd0000}, {0x3dcd2000}, {0x3dcd4000}, {0x3dcd6000}, - {0x3dcd8000}, {0x3dcda000}, {0x3dcdc000}, {0x3dcde000}, - {0x3dce0000}, {0x3dce2000}, {0x3dce4000}, {0x3dce6000}, - {0x3dce8000}, {0x3dcea000}, {0x3dcec000}, {0x3dcee000}, - {0x3dcf0000}, {0x3dcf2000}, {0x3dcf4000}, {0x3dcf6000}, - {0x3dcf8000}, {0x3dcfa000}, {0x3dcfc000}, {0x3dcfe000}, - {0x3dd00000}, {0x3dd02000}, {0x3dd04000}, {0x3dd06000}, - {0x3dd08000}, {0x3dd0a000}, {0x3dd0c000}, {0x3dd0e000}, - {0x3dd10000}, {0x3dd12000}, {0x3dd14000}, {0x3dd16000}, - {0x3dd18000}, {0x3dd1a000}, {0x3dd1c000}, {0x3dd1e000}, - {0x3dd20000}, {0x3dd22000}, {0x3dd24000}, {0x3dd26000}, - {0x3dd28000}, {0x3dd2a000}, {0x3dd2c000}, {0x3dd2e000}, - {0x3dd30000}, {0x3dd32000}, {0x3dd34000}, {0x3dd36000}, - {0x3dd38000}, {0x3dd3a000}, {0x3dd3c000}, {0x3dd3e000}, - {0x3dd40000}, {0x3dd42000}, {0x3dd44000}, {0x3dd46000}, - {0x3dd48000}, {0x3dd4a000}, {0x3dd4c000}, {0x3dd4e000}, - {0x3dd50000}, {0x3dd52000}, {0x3dd54000}, {0x3dd56000}, - {0x3dd58000}, {0x3dd5a000}, {0x3dd5c000}, {0x3dd5e000}, - {0x3dd60000}, {0x3dd62000}, {0x3dd64000}, {0x3dd66000}, - {0x3dd68000}, {0x3dd6a000}, {0x3dd6c000}, {0x3dd6e000}, - {0x3dd70000}, {0x3dd72000}, {0x3dd74000}, {0x3dd76000}, - {0x3dd78000}, {0x3dd7a000}, {0x3dd7c000}, {0x3dd7e000}, - {0x3dd80000}, {0x3dd82000}, {0x3dd84000}, {0x3dd86000}, - {0x3dd88000}, {0x3dd8a000}, {0x3dd8c000}, {0x3dd8e000}, - {0x3dd90000}, {0x3dd92000}, {0x3dd94000}, {0x3dd96000}, - {0x3dd98000}, {0x3dd9a000}, {0x3dd9c000}, {0x3dd9e000}, - {0x3dda0000}, {0x3dda2000}, {0x3dda4000}, {0x3dda6000}, - {0x3dda8000}, {0x3ddaa000}, {0x3ddac000}, {0x3ddae000}, - {0x3ddb0000}, {0x3ddb2000}, {0x3ddb4000}, {0x3ddb6000}, - {0x3ddb8000}, {0x3ddba000}, {0x3ddbc000}, {0x3ddbe000}, - {0x3ddc0000}, {0x3ddc2000}, {0x3ddc4000}, {0x3ddc6000}, - {0x3ddc8000}, {0x3ddca000}, {0x3ddcc000}, {0x3ddce000}, - {0x3ddd0000}, {0x3ddd2000}, {0x3ddd4000}, {0x3ddd6000}, - {0x3ddd8000}, {0x3ddda000}, {0x3dddc000}, {0x3ddde000}, - {0x3dde0000}, {0x3dde2000}, {0x3dde4000}, {0x3dde6000}, - {0x3dde8000}, {0x3ddea000}, {0x3ddec000}, {0x3ddee000}, - {0x3ddf0000}, {0x3ddf2000}, {0x3ddf4000}, {0x3ddf6000}, - {0x3ddf8000}, {0x3ddfa000}, {0x3ddfc000}, {0x3ddfe000}, - {0x3de00000}, {0x3de02000}, {0x3de04000}, {0x3de06000}, - {0x3de08000}, {0x3de0a000}, {0x3de0c000}, {0x3de0e000}, - {0x3de10000}, {0x3de12000}, {0x3de14000}, {0x3de16000}, - {0x3de18000}, {0x3de1a000}, {0x3de1c000}, {0x3de1e000}, - {0x3de20000}, {0x3de22000}, {0x3de24000}, {0x3de26000}, - {0x3de28000}, {0x3de2a000}, {0x3de2c000}, {0x3de2e000}, - {0x3de30000}, {0x3de32000}, {0x3de34000}, {0x3de36000}, - {0x3de38000}, {0x3de3a000}, {0x3de3c000}, {0x3de3e000}, - {0x3de40000}, {0x3de42000}, {0x3de44000}, {0x3de46000}, - {0x3de48000}, {0x3de4a000}, {0x3de4c000}, {0x3de4e000}, - {0x3de50000}, {0x3de52000}, {0x3de54000}, {0x3de56000}, - {0x3de58000}, {0x3de5a000}, {0x3de5c000}, {0x3de5e000}, - {0x3de60000}, {0x3de62000}, {0x3de64000}, {0x3de66000}, - {0x3de68000}, {0x3de6a000}, {0x3de6c000}, {0x3de6e000}, - {0x3de70000}, {0x3de72000}, {0x3de74000}, {0x3de76000}, - {0x3de78000}, {0x3de7a000}, {0x3de7c000}, {0x3de7e000}, - {0x3de80000}, {0x3de82000}, {0x3de84000}, {0x3de86000}, - {0x3de88000}, {0x3de8a000}, {0x3de8c000}, {0x3de8e000}, - {0x3de90000}, {0x3de92000}, {0x3de94000}, {0x3de96000}, - {0x3de98000}, {0x3de9a000}, {0x3de9c000}, {0x3de9e000}, - {0x3dea0000}, {0x3dea2000}, {0x3dea4000}, {0x3dea6000}, - {0x3dea8000}, {0x3deaa000}, {0x3deac000}, {0x3deae000}, - {0x3deb0000}, {0x3deb2000}, {0x3deb4000}, {0x3deb6000}, - {0x3deb8000}, {0x3deba000}, {0x3debc000}, {0x3debe000}, - {0x3dec0000}, {0x3dec2000}, {0x3dec4000}, {0x3dec6000}, - {0x3dec8000}, {0x3deca000}, {0x3decc000}, {0x3dece000}, - {0x3ded0000}, {0x3ded2000}, {0x3ded4000}, {0x3ded6000}, - {0x3ded8000}, {0x3deda000}, {0x3dedc000}, {0x3dede000}, - {0x3dee0000}, {0x3dee2000}, {0x3dee4000}, {0x3dee6000}, - {0x3dee8000}, {0x3deea000}, {0x3deec000}, {0x3deee000}, - {0x3def0000}, {0x3def2000}, {0x3def4000}, {0x3def6000}, - {0x3def8000}, {0x3defa000}, {0x3defc000}, {0x3defe000}, - {0x3df00000}, {0x3df02000}, {0x3df04000}, {0x3df06000}, - {0x3df08000}, {0x3df0a000}, {0x3df0c000}, {0x3df0e000}, - {0x3df10000}, {0x3df12000}, {0x3df14000}, {0x3df16000}, - {0x3df18000}, {0x3df1a000}, {0x3df1c000}, {0x3df1e000}, - {0x3df20000}, {0x3df22000}, {0x3df24000}, {0x3df26000}, - {0x3df28000}, {0x3df2a000}, {0x3df2c000}, {0x3df2e000}, - {0x3df30000}, {0x3df32000}, {0x3df34000}, {0x3df36000}, - {0x3df38000}, {0x3df3a000}, {0x3df3c000}, {0x3df3e000}, - {0x3df40000}, {0x3df42000}, {0x3df44000}, {0x3df46000}, - {0x3df48000}, {0x3df4a000}, {0x3df4c000}, {0x3df4e000}, - {0x3df50000}, {0x3df52000}, {0x3df54000}, {0x3df56000}, - {0x3df58000}, {0x3df5a000}, {0x3df5c000}, {0x3df5e000}, - {0x3df60000}, {0x3df62000}, {0x3df64000}, {0x3df66000}, - {0x3df68000}, {0x3df6a000}, {0x3df6c000}, {0x3df6e000}, - {0x3df70000}, {0x3df72000}, {0x3df74000}, {0x3df76000}, - {0x3df78000}, {0x3df7a000}, {0x3df7c000}, {0x3df7e000}, - {0x3df80000}, {0x3df82000}, {0x3df84000}, {0x3df86000}, - {0x3df88000}, {0x3df8a000}, {0x3df8c000}, {0x3df8e000}, - {0x3df90000}, {0x3df92000}, {0x3df94000}, {0x3df96000}, - {0x3df98000}, {0x3df9a000}, {0x3df9c000}, {0x3df9e000}, - {0x3dfa0000}, {0x3dfa2000}, {0x3dfa4000}, {0x3dfa6000}, - {0x3dfa8000}, {0x3dfaa000}, {0x3dfac000}, {0x3dfae000}, - {0x3dfb0000}, {0x3dfb2000}, {0x3dfb4000}, {0x3dfb6000}, - {0x3dfb8000}, {0x3dfba000}, {0x3dfbc000}, {0x3dfbe000}, - {0x3dfc0000}, {0x3dfc2000}, {0x3dfc4000}, {0x3dfc6000}, - {0x3dfc8000}, {0x3dfca000}, {0x3dfcc000}, {0x3dfce000}, - {0x3dfd0000}, {0x3dfd2000}, {0x3dfd4000}, {0x3dfd6000}, - {0x3dfd8000}, {0x3dfda000}, {0x3dfdc000}, {0x3dfde000}, - {0x3dfe0000}, {0x3dfe2000}, {0x3dfe4000}, {0x3dfe6000}, - {0x3dfe8000}, {0x3dfea000}, {0x3dfec000}, {0x3dfee000}, - {0x3dff0000}, {0x3dff2000}, {0x3dff4000}, {0x3dff6000}, - {0x3dff8000}, {0x3dffa000}, {0x3dffc000}, {0x3dffe000}, - {0x3e000000}, {0x3e002000}, {0x3e004000}, {0x3e006000}, - {0x3e008000}, {0x3e00a000}, {0x3e00c000}, {0x3e00e000}, - {0x3e010000}, {0x3e012000}, {0x3e014000}, {0x3e016000}, - {0x3e018000}, {0x3e01a000}, {0x3e01c000}, {0x3e01e000}, - {0x3e020000}, {0x3e022000}, {0x3e024000}, {0x3e026000}, - {0x3e028000}, {0x3e02a000}, {0x3e02c000}, {0x3e02e000}, - {0x3e030000}, {0x3e032000}, {0x3e034000}, {0x3e036000}, - {0x3e038000}, {0x3e03a000}, {0x3e03c000}, {0x3e03e000}, - {0x3e040000}, {0x3e042000}, {0x3e044000}, {0x3e046000}, - {0x3e048000}, {0x3e04a000}, {0x3e04c000}, {0x3e04e000}, - {0x3e050000}, {0x3e052000}, {0x3e054000}, {0x3e056000}, - {0x3e058000}, {0x3e05a000}, {0x3e05c000}, {0x3e05e000}, - {0x3e060000}, {0x3e062000}, {0x3e064000}, {0x3e066000}, - {0x3e068000}, {0x3e06a000}, {0x3e06c000}, {0x3e06e000}, - {0x3e070000}, {0x3e072000}, {0x3e074000}, {0x3e076000}, - {0x3e078000}, {0x3e07a000}, {0x3e07c000}, {0x3e07e000}, - {0x3e080000}, {0x3e082000}, {0x3e084000}, {0x3e086000}, - {0x3e088000}, {0x3e08a000}, {0x3e08c000}, {0x3e08e000}, - {0x3e090000}, {0x3e092000}, {0x3e094000}, {0x3e096000}, - {0x3e098000}, {0x3e09a000}, {0x3e09c000}, {0x3e09e000}, - {0x3e0a0000}, {0x3e0a2000}, {0x3e0a4000}, {0x3e0a6000}, - {0x3e0a8000}, {0x3e0aa000}, {0x3e0ac000}, {0x3e0ae000}, - {0x3e0b0000}, {0x3e0b2000}, {0x3e0b4000}, {0x3e0b6000}, - {0x3e0b8000}, {0x3e0ba000}, {0x3e0bc000}, {0x3e0be000}, - {0x3e0c0000}, {0x3e0c2000}, {0x3e0c4000}, {0x3e0c6000}, - {0x3e0c8000}, {0x3e0ca000}, {0x3e0cc000}, {0x3e0ce000}, - {0x3e0d0000}, {0x3e0d2000}, {0x3e0d4000}, {0x3e0d6000}, - {0x3e0d8000}, {0x3e0da000}, {0x3e0dc000}, {0x3e0de000}, - {0x3e0e0000}, {0x3e0e2000}, {0x3e0e4000}, {0x3e0e6000}, - {0x3e0e8000}, {0x3e0ea000}, {0x3e0ec000}, {0x3e0ee000}, - {0x3e0f0000}, {0x3e0f2000}, {0x3e0f4000}, {0x3e0f6000}, - {0x3e0f8000}, {0x3e0fa000}, {0x3e0fc000}, {0x3e0fe000}, - {0x3e100000}, {0x3e102000}, {0x3e104000}, {0x3e106000}, - {0x3e108000}, {0x3e10a000}, {0x3e10c000}, {0x3e10e000}, - {0x3e110000}, {0x3e112000}, {0x3e114000}, {0x3e116000}, - {0x3e118000}, {0x3e11a000}, {0x3e11c000}, {0x3e11e000}, - {0x3e120000}, {0x3e122000}, {0x3e124000}, {0x3e126000}, - {0x3e128000}, {0x3e12a000}, {0x3e12c000}, {0x3e12e000}, - {0x3e130000}, {0x3e132000}, {0x3e134000}, {0x3e136000}, - {0x3e138000}, {0x3e13a000}, {0x3e13c000}, {0x3e13e000}, - {0x3e140000}, {0x3e142000}, {0x3e144000}, {0x3e146000}, - {0x3e148000}, {0x3e14a000}, {0x3e14c000}, {0x3e14e000}, - {0x3e150000}, {0x3e152000}, {0x3e154000}, {0x3e156000}, - {0x3e158000}, {0x3e15a000}, {0x3e15c000}, {0x3e15e000}, - {0x3e160000}, {0x3e162000}, {0x3e164000}, {0x3e166000}, - {0x3e168000}, {0x3e16a000}, {0x3e16c000}, {0x3e16e000}, - {0x3e170000}, {0x3e172000}, {0x3e174000}, {0x3e176000}, - {0x3e178000}, {0x3e17a000}, {0x3e17c000}, {0x3e17e000}, - {0x3e180000}, {0x3e182000}, {0x3e184000}, {0x3e186000}, - {0x3e188000}, {0x3e18a000}, {0x3e18c000}, {0x3e18e000}, - {0x3e190000}, {0x3e192000}, {0x3e194000}, {0x3e196000}, - {0x3e198000}, {0x3e19a000}, {0x3e19c000}, {0x3e19e000}, - {0x3e1a0000}, {0x3e1a2000}, {0x3e1a4000}, {0x3e1a6000}, - {0x3e1a8000}, {0x3e1aa000}, {0x3e1ac000}, {0x3e1ae000}, - {0x3e1b0000}, {0x3e1b2000}, {0x3e1b4000}, {0x3e1b6000}, - {0x3e1b8000}, {0x3e1ba000}, {0x3e1bc000}, {0x3e1be000}, - {0x3e1c0000}, {0x3e1c2000}, {0x3e1c4000}, {0x3e1c6000}, - {0x3e1c8000}, {0x3e1ca000}, {0x3e1cc000}, {0x3e1ce000}, - {0x3e1d0000}, {0x3e1d2000}, {0x3e1d4000}, {0x3e1d6000}, - {0x3e1d8000}, {0x3e1da000}, {0x3e1dc000}, {0x3e1de000}, - {0x3e1e0000}, {0x3e1e2000}, {0x3e1e4000}, {0x3e1e6000}, - {0x3e1e8000}, {0x3e1ea000}, {0x3e1ec000}, {0x3e1ee000}, - {0x3e1f0000}, {0x3e1f2000}, {0x3e1f4000}, {0x3e1f6000}, - {0x3e1f8000}, {0x3e1fa000}, {0x3e1fc000}, {0x3e1fe000}, - {0x3e200000}, {0x3e202000}, {0x3e204000}, {0x3e206000}, - {0x3e208000}, {0x3e20a000}, {0x3e20c000}, {0x3e20e000}, - {0x3e210000}, {0x3e212000}, {0x3e214000}, {0x3e216000}, - {0x3e218000}, {0x3e21a000}, {0x3e21c000}, {0x3e21e000}, - {0x3e220000}, {0x3e222000}, {0x3e224000}, {0x3e226000}, - {0x3e228000}, {0x3e22a000}, {0x3e22c000}, {0x3e22e000}, - {0x3e230000}, {0x3e232000}, {0x3e234000}, {0x3e236000}, - {0x3e238000}, {0x3e23a000}, {0x3e23c000}, {0x3e23e000}, - {0x3e240000}, {0x3e242000}, {0x3e244000}, {0x3e246000}, - {0x3e248000}, {0x3e24a000}, {0x3e24c000}, {0x3e24e000}, - {0x3e250000}, {0x3e252000}, {0x3e254000}, {0x3e256000}, - {0x3e258000}, {0x3e25a000}, {0x3e25c000}, {0x3e25e000}, - {0x3e260000}, {0x3e262000}, {0x3e264000}, {0x3e266000}, - {0x3e268000}, {0x3e26a000}, {0x3e26c000}, {0x3e26e000}, - {0x3e270000}, {0x3e272000}, {0x3e274000}, {0x3e276000}, - {0x3e278000}, {0x3e27a000}, {0x3e27c000}, {0x3e27e000}, - {0x3e280000}, {0x3e282000}, {0x3e284000}, {0x3e286000}, - {0x3e288000}, {0x3e28a000}, {0x3e28c000}, {0x3e28e000}, - {0x3e290000}, {0x3e292000}, {0x3e294000}, {0x3e296000}, - {0x3e298000}, {0x3e29a000}, {0x3e29c000}, {0x3e29e000}, - {0x3e2a0000}, {0x3e2a2000}, {0x3e2a4000}, {0x3e2a6000}, - {0x3e2a8000}, {0x3e2aa000}, {0x3e2ac000}, {0x3e2ae000}, - {0x3e2b0000}, {0x3e2b2000}, {0x3e2b4000}, {0x3e2b6000}, - {0x3e2b8000}, {0x3e2ba000}, {0x3e2bc000}, {0x3e2be000}, - {0x3e2c0000}, {0x3e2c2000}, {0x3e2c4000}, {0x3e2c6000}, - {0x3e2c8000}, {0x3e2ca000}, {0x3e2cc000}, {0x3e2ce000}, - {0x3e2d0000}, {0x3e2d2000}, {0x3e2d4000}, {0x3e2d6000}, - {0x3e2d8000}, {0x3e2da000}, {0x3e2dc000}, {0x3e2de000}, - {0x3e2e0000}, {0x3e2e2000}, {0x3e2e4000}, {0x3e2e6000}, - {0x3e2e8000}, {0x3e2ea000}, {0x3e2ec000}, {0x3e2ee000}, - {0x3e2f0000}, {0x3e2f2000}, {0x3e2f4000}, {0x3e2f6000}, - {0x3e2f8000}, {0x3e2fa000}, {0x3e2fc000}, {0x3e2fe000}, - {0x3e300000}, {0x3e302000}, {0x3e304000}, {0x3e306000}, - {0x3e308000}, {0x3e30a000}, {0x3e30c000}, {0x3e30e000}, - {0x3e310000}, {0x3e312000}, {0x3e314000}, {0x3e316000}, - {0x3e318000}, {0x3e31a000}, {0x3e31c000}, {0x3e31e000}, - {0x3e320000}, {0x3e322000}, {0x3e324000}, {0x3e326000}, - {0x3e328000}, {0x3e32a000}, {0x3e32c000}, {0x3e32e000}, - {0x3e330000}, {0x3e332000}, {0x3e334000}, {0x3e336000}, - {0x3e338000}, {0x3e33a000}, {0x3e33c000}, {0x3e33e000}, - {0x3e340000}, {0x3e342000}, {0x3e344000}, {0x3e346000}, - {0x3e348000}, {0x3e34a000}, {0x3e34c000}, {0x3e34e000}, - {0x3e350000}, {0x3e352000}, {0x3e354000}, {0x3e356000}, - {0x3e358000}, {0x3e35a000}, {0x3e35c000}, {0x3e35e000}, - {0x3e360000}, {0x3e362000}, {0x3e364000}, {0x3e366000}, - {0x3e368000}, {0x3e36a000}, {0x3e36c000}, {0x3e36e000}, - {0x3e370000}, {0x3e372000}, {0x3e374000}, {0x3e376000}, - {0x3e378000}, {0x3e37a000}, {0x3e37c000}, {0x3e37e000}, - {0x3e380000}, {0x3e382000}, {0x3e384000}, {0x3e386000}, - {0x3e388000}, {0x3e38a000}, {0x3e38c000}, {0x3e38e000}, - {0x3e390000}, {0x3e392000}, {0x3e394000}, {0x3e396000}, - {0x3e398000}, {0x3e39a000}, {0x3e39c000}, {0x3e39e000}, - {0x3e3a0000}, {0x3e3a2000}, {0x3e3a4000}, {0x3e3a6000}, - {0x3e3a8000}, {0x3e3aa000}, {0x3e3ac000}, {0x3e3ae000}, - {0x3e3b0000}, {0x3e3b2000}, {0x3e3b4000}, {0x3e3b6000}, - {0x3e3b8000}, {0x3e3ba000}, {0x3e3bc000}, {0x3e3be000}, - {0x3e3c0000}, {0x3e3c2000}, {0x3e3c4000}, {0x3e3c6000}, - {0x3e3c8000}, {0x3e3ca000}, {0x3e3cc000}, {0x3e3ce000}, - {0x3e3d0000}, {0x3e3d2000}, {0x3e3d4000}, {0x3e3d6000}, - {0x3e3d8000}, {0x3e3da000}, {0x3e3dc000}, {0x3e3de000}, - {0x3e3e0000}, {0x3e3e2000}, {0x3e3e4000}, {0x3e3e6000}, - {0x3e3e8000}, {0x3e3ea000}, {0x3e3ec000}, {0x3e3ee000}, - {0x3e3f0000}, {0x3e3f2000}, {0x3e3f4000}, {0x3e3f6000}, - {0x3e3f8000}, {0x3e3fa000}, {0x3e3fc000}, {0x3e3fe000}, - {0x3e400000}, {0x3e402000}, {0x3e404000}, {0x3e406000}, - {0x3e408000}, {0x3e40a000}, {0x3e40c000}, {0x3e40e000}, - {0x3e410000}, {0x3e412000}, {0x3e414000}, {0x3e416000}, - {0x3e418000}, {0x3e41a000}, {0x3e41c000}, {0x3e41e000}, - {0x3e420000}, {0x3e422000}, {0x3e424000}, {0x3e426000}, - {0x3e428000}, {0x3e42a000}, {0x3e42c000}, {0x3e42e000}, - {0x3e430000}, {0x3e432000}, {0x3e434000}, {0x3e436000}, - {0x3e438000}, {0x3e43a000}, {0x3e43c000}, {0x3e43e000}, - {0x3e440000}, {0x3e442000}, {0x3e444000}, {0x3e446000}, - {0x3e448000}, {0x3e44a000}, {0x3e44c000}, {0x3e44e000}, - {0x3e450000}, {0x3e452000}, {0x3e454000}, {0x3e456000}, - {0x3e458000}, {0x3e45a000}, {0x3e45c000}, {0x3e45e000}, - {0x3e460000}, {0x3e462000}, {0x3e464000}, {0x3e466000}, - {0x3e468000}, {0x3e46a000}, {0x3e46c000}, {0x3e46e000}, - {0x3e470000}, {0x3e472000}, {0x3e474000}, {0x3e476000}, - {0x3e478000}, {0x3e47a000}, {0x3e47c000}, {0x3e47e000}, - {0x3e480000}, {0x3e482000}, {0x3e484000}, {0x3e486000}, - {0x3e488000}, {0x3e48a000}, {0x3e48c000}, {0x3e48e000}, - {0x3e490000}, {0x3e492000}, {0x3e494000}, {0x3e496000}, - {0x3e498000}, {0x3e49a000}, {0x3e49c000}, {0x3e49e000}, - {0x3e4a0000}, {0x3e4a2000}, {0x3e4a4000}, {0x3e4a6000}, - {0x3e4a8000}, {0x3e4aa000}, {0x3e4ac000}, {0x3e4ae000}, - {0x3e4b0000}, {0x3e4b2000}, {0x3e4b4000}, {0x3e4b6000}, - {0x3e4b8000}, {0x3e4ba000}, {0x3e4bc000}, {0x3e4be000}, - {0x3e4c0000}, {0x3e4c2000}, {0x3e4c4000}, {0x3e4c6000}, - {0x3e4c8000}, {0x3e4ca000}, {0x3e4cc000}, {0x3e4ce000}, - {0x3e4d0000}, {0x3e4d2000}, {0x3e4d4000}, {0x3e4d6000}, - {0x3e4d8000}, {0x3e4da000}, {0x3e4dc000}, {0x3e4de000}, - {0x3e4e0000}, {0x3e4e2000}, {0x3e4e4000}, {0x3e4e6000}, - {0x3e4e8000}, {0x3e4ea000}, {0x3e4ec000}, {0x3e4ee000}, - {0x3e4f0000}, {0x3e4f2000}, {0x3e4f4000}, {0x3e4f6000}, - {0x3e4f8000}, {0x3e4fa000}, {0x3e4fc000}, {0x3e4fe000}, - {0x3e500000}, {0x3e502000}, {0x3e504000}, {0x3e506000}, - {0x3e508000}, {0x3e50a000}, {0x3e50c000}, {0x3e50e000}, - {0x3e510000}, {0x3e512000}, {0x3e514000}, {0x3e516000}, - {0x3e518000}, {0x3e51a000}, {0x3e51c000}, {0x3e51e000}, - {0x3e520000}, {0x3e522000}, {0x3e524000}, {0x3e526000}, - {0x3e528000}, {0x3e52a000}, {0x3e52c000}, {0x3e52e000}, - {0x3e530000}, {0x3e532000}, {0x3e534000}, {0x3e536000}, - {0x3e538000}, {0x3e53a000}, {0x3e53c000}, {0x3e53e000}, - {0x3e540000}, {0x3e542000}, {0x3e544000}, {0x3e546000}, - {0x3e548000}, {0x3e54a000}, {0x3e54c000}, {0x3e54e000}, - {0x3e550000}, {0x3e552000}, {0x3e554000}, {0x3e556000}, - {0x3e558000}, {0x3e55a000}, {0x3e55c000}, {0x3e55e000}, - {0x3e560000}, {0x3e562000}, {0x3e564000}, {0x3e566000}, - {0x3e568000}, {0x3e56a000}, {0x3e56c000}, {0x3e56e000}, - {0x3e570000}, {0x3e572000}, {0x3e574000}, {0x3e576000}, - {0x3e578000}, {0x3e57a000}, {0x3e57c000}, {0x3e57e000}, - {0x3e580000}, {0x3e582000}, {0x3e584000}, {0x3e586000}, - {0x3e588000}, {0x3e58a000}, {0x3e58c000}, {0x3e58e000}, - {0x3e590000}, {0x3e592000}, {0x3e594000}, {0x3e596000}, - {0x3e598000}, {0x3e59a000}, {0x3e59c000}, {0x3e59e000}, - {0x3e5a0000}, {0x3e5a2000}, {0x3e5a4000}, {0x3e5a6000}, - {0x3e5a8000}, {0x3e5aa000}, {0x3e5ac000}, {0x3e5ae000}, - {0x3e5b0000}, {0x3e5b2000}, {0x3e5b4000}, {0x3e5b6000}, - {0x3e5b8000}, {0x3e5ba000}, {0x3e5bc000}, {0x3e5be000}, - {0x3e5c0000}, {0x3e5c2000}, {0x3e5c4000}, {0x3e5c6000}, - {0x3e5c8000}, {0x3e5ca000}, {0x3e5cc000}, {0x3e5ce000}, - {0x3e5d0000}, {0x3e5d2000}, {0x3e5d4000}, {0x3e5d6000}, - {0x3e5d8000}, {0x3e5da000}, {0x3e5dc000}, {0x3e5de000}, - {0x3e5e0000}, {0x3e5e2000}, {0x3e5e4000}, {0x3e5e6000}, - {0x3e5e8000}, {0x3e5ea000}, {0x3e5ec000}, {0x3e5ee000}, - {0x3e5f0000}, {0x3e5f2000}, {0x3e5f4000}, {0x3e5f6000}, - {0x3e5f8000}, {0x3e5fa000}, {0x3e5fc000}, {0x3e5fe000}, - {0x3e600000}, {0x3e602000}, {0x3e604000}, {0x3e606000}, - {0x3e608000}, {0x3e60a000}, {0x3e60c000}, {0x3e60e000}, - {0x3e610000}, {0x3e612000}, {0x3e614000}, {0x3e616000}, - {0x3e618000}, {0x3e61a000}, {0x3e61c000}, {0x3e61e000}, - {0x3e620000}, {0x3e622000}, {0x3e624000}, {0x3e626000}, - {0x3e628000}, {0x3e62a000}, {0x3e62c000}, {0x3e62e000}, - {0x3e630000}, {0x3e632000}, {0x3e634000}, {0x3e636000}, - {0x3e638000}, {0x3e63a000}, {0x3e63c000}, {0x3e63e000}, - {0x3e640000}, {0x3e642000}, {0x3e644000}, {0x3e646000}, - {0x3e648000}, {0x3e64a000}, {0x3e64c000}, {0x3e64e000}, - {0x3e650000}, {0x3e652000}, {0x3e654000}, {0x3e656000}, - {0x3e658000}, {0x3e65a000}, {0x3e65c000}, {0x3e65e000}, - {0x3e660000}, {0x3e662000}, {0x3e664000}, {0x3e666000}, - {0x3e668000}, {0x3e66a000}, {0x3e66c000}, {0x3e66e000}, - {0x3e670000}, {0x3e672000}, {0x3e674000}, {0x3e676000}, - {0x3e678000}, {0x3e67a000}, {0x3e67c000}, {0x3e67e000}, - {0x3e680000}, {0x3e682000}, {0x3e684000}, {0x3e686000}, - {0x3e688000}, {0x3e68a000}, {0x3e68c000}, {0x3e68e000}, - {0x3e690000}, {0x3e692000}, {0x3e694000}, {0x3e696000}, - {0x3e698000}, {0x3e69a000}, {0x3e69c000}, {0x3e69e000}, - {0x3e6a0000}, {0x3e6a2000}, {0x3e6a4000}, {0x3e6a6000}, - {0x3e6a8000}, {0x3e6aa000}, {0x3e6ac000}, {0x3e6ae000}, - {0x3e6b0000}, {0x3e6b2000}, {0x3e6b4000}, {0x3e6b6000}, - {0x3e6b8000}, {0x3e6ba000}, {0x3e6bc000}, {0x3e6be000}, - {0x3e6c0000}, {0x3e6c2000}, {0x3e6c4000}, {0x3e6c6000}, - {0x3e6c8000}, {0x3e6ca000}, {0x3e6cc000}, {0x3e6ce000}, - {0x3e6d0000}, {0x3e6d2000}, {0x3e6d4000}, {0x3e6d6000}, - {0x3e6d8000}, {0x3e6da000}, {0x3e6dc000}, {0x3e6de000}, - {0x3e6e0000}, {0x3e6e2000}, {0x3e6e4000}, {0x3e6e6000}, - {0x3e6e8000}, {0x3e6ea000}, {0x3e6ec000}, {0x3e6ee000}, - {0x3e6f0000}, {0x3e6f2000}, {0x3e6f4000}, {0x3e6f6000}, - {0x3e6f8000}, {0x3e6fa000}, {0x3e6fc000}, {0x3e6fe000}, - {0x3e700000}, {0x3e702000}, {0x3e704000}, {0x3e706000}, - {0x3e708000}, {0x3e70a000}, {0x3e70c000}, {0x3e70e000}, - {0x3e710000}, {0x3e712000}, {0x3e714000}, {0x3e716000}, - {0x3e718000}, {0x3e71a000}, {0x3e71c000}, {0x3e71e000}, - {0x3e720000}, {0x3e722000}, {0x3e724000}, {0x3e726000}, - {0x3e728000}, {0x3e72a000}, {0x3e72c000}, {0x3e72e000}, - {0x3e730000}, {0x3e732000}, {0x3e734000}, {0x3e736000}, - {0x3e738000}, {0x3e73a000}, {0x3e73c000}, {0x3e73e000}, - {0x3e740000}, {0x3e742000}, {0x3e744000}, {0x3e746000}, - {0x3e748000}, {0x3e74a000}, {0x3e74c000}, {0x3e74e000}, - {0x3e750000}, {0x3e752000}, {0x3e754000}, {0x3e756000}, - {0x3e758000}, {0x3e75a000}, {0x3e75c000}, {0x3e75e000}, - {0x3e760000}, {0x3e762000}, {0x3e764000}, {0x3e766000}, - {0x3e768000}, {0x3e76a000}, {0x3e76c000}, {0x3e76e000}, - {0x3e770000}, {0x3e772000}, {0x3e774000}, {0x3e776000}, - {0x3e778000}, {0x3e77a000}, {0x3e77c000}, {0x3e77e000}, - {0x3e780000}, {0x3e782000}, {0x3e784000}, {0x3e786000}, - {0x3e788000}, {0x3e78a000}, {0x3e78c000}, {0x3e78e000}, - {0x3e790000}, {0x3e792000}, {0x3e794000}, {0x3e796000}, - {0x3e798000}, {0x3e79a000}, {0x3e79c000}, {0x3e79e000}, - {0x3e7a0000}, {0x3e7a2000}, {0x3e7a4000}, {0x3e7a6000}, - {0x3e7a8000}, {0x3e7aa000}, {0x3e7ac000}, {0x3e7ae000}, - {0x3e7b0000}, {0x3e7b2000}, {0x3e7b4000}, {0x3e7b6000}, - {0x3e7b8000}, {0x3e7ba000}, {0x3e7bc000}, {0x3e7be000}, - {0x3e7c0000}, {0x3e7c2000}, {0x3e7c4000}, {0x3e7c6000}, - {0x3e7c8000}, {0x3e7ca000}, {0x3e7cc000}, {0x3e7ce000}, - {0x3e7d0000}, {0x3e7d2000}, {0x3e7d4000}, {0x3e7d6000}, - {0x3e7d8000}, {0x3e7da000}, {0x3e7dc000}, {0x3e7de000}, - {0x3e7e0000}, {0x3e7e2000}, {0x3e7e4000}, {0x3e7e6000}, - {0x3e7e8000}, {0x3e7ea000}, {0x3e7ec000}, {0x3e7ee000}, - {0x3e7f0000}, {0x3e7f2000}, {0x3e7f4000}, {0x3e7f6000}, - {0x3e7f8000}, {0x3e7fa000}, {0x3e7fc000}, {0x3e7fe000}, - {0x3e800000}, {0x3e802000}, {0x3e804000}, {0x3e806000}, - {0x3e808000}, {0x3e80a000}, {0x3e80c000}, {0x3e80e000}, - {0x3e810000}, {0x3e812000}, {0x3e814000}, {0x3e816000}, - {0x3e818000}, {0x3e81a000}, {0x3e81c000}, {0x3e81e000}, - {0x3e820000}, {0x3e822000}, {0x3e824000}, {0x3e826000}, - {0x3e828000}, {0x3e82a000}, {0x3e82c000}, {0x3e82e000}, - {0x3e830000}, {0x3e832000}, {0x3e834000}, {0x3e836000}, - {0x3e838000}, {0x3e83a000}, {0x3e83c000}, {0x3e83e000}, - {0x3e840000}, {0x3e842000}, {0x3e844000}, {0x3e846000}, - {0x3e848000}, {0x3e84a000}, {0x3e84c000}, {0x3e84e000}, - {0x3e850000}, {0x3e852000}, {0x3e854000}, {0x3e856000}, - {0x3e858000}, {0x3e85a000}, {0x3e85c000}, {0x3e85e000}, - {0x3e860000}, {0x3e862000}, {0x3e864000}, {0x3e866000}, - {0x3e868000}, {0x3e86a000}, {0x3e86c000}, {0x3e86e000}, - {0x3e870000}, {0x3e872000}, {0x3e874000}, {0x3e876000}, - {0x3e878000}, {0x3e87a000}, {0x3e87c000}, {0x3e87e000}, - {0x3e880000}, {0x3e882000}, {0x3e884000}, {0x3e886000}, - {0x3e888000}, {0x3e88a000}, {0x3e88c000}, {0x3e88e000}, - {0x3e890000}, {0x3e892000}, {0x3e894000}, {0x3e896000}, - {0x3e898000}, {0x3e89a000}, {0x3e89c000}, {0x3e89e000}, - {0x3e8a0000}, {0x3e8a2000}, {0x3e8a4000}, {0x3e8a6000}, - {0x3e8a8000}, {0x3e8aa000}, {0x3e8ac000}, {0x3e8ae000}, - {0x3e8b0000}, {0x3e8b2000}, {0x3e8b4000}, {0x3e8b6000}, - {0x3e8b8000}, {0x3e8ba000}, {0x3e8bc000}, {0x3e8be000}, - {0x3e8c0000}, {0x3e8c2000}, {0x3e8c4000}, {0x3e8c6000}, - {0x3e8c8000}, {0x3e8ca000}, {0x3e8cc000}, {0x3e8ce000}, - {0x3e8d0000}, {0x3e8d2000}, {0x3e8d4000}, {0x3e8d6000}, - {0x3e8d8000}, {0x3e8da000}, {0x3e8dc000}, {0x3e8de000}, - {0x3e8e0000}, {0x3e8e2000}, {0x3e8e4000}, {0x3e8e6000}, - {0x3e8e8000}, {0x3e8ea000}, {0x3e8ec000}, {0x3e8ee000}, - {0x3e8f0000}, {0x3e8f2000}, {0x3e8f4000}, {0x3e8f6000}, - {0x3e8f8000}, {0x3e8fa000}, {0x3e8fc000}, {0x3e8fe000}, - {0x3e900000}, {0x3e902000}, {0x3e904000}, {0x3e906000}, - {0x3e908000}, {0x3e90a000}, {0x3e90c000}, {0x3e90e000}, - {0x3e910000}, {0x3e912000}, {0x3e914000}, {0x3e916000}, - {0x3e918000}, {0x3e91a000}, {0x3e91c000}, {0x3e91e000}, - {0x3e920000}, {0x3e922000}, {0x3e924000}, {0x3e926000}, - {0x3e928000}, {0x3e92a000}, {0x3e92c000}, {0x3e92e000}, - {0x3e930000}, {0x3e932000}, {0x3e934000}, {0x3e936000}, - {0x3e938000}, {0x3e93a000}, {0x3e93c000}, {0x3e93e000}, - {0x3e940000}, {0x3e942000}, {0x3e944000}, {0x3e946000}, - {0x3e948000}, {0x3e94a000}, {0x3e94c000}, {0x3e94e000}, - {0x3e950000}, {0x3e952000}, {0x3e954000}, {0x3e956000}, - {0x3e958000}, {0x3e95a000}, {0x3e95c000}, {0x3e95e000}, - {0x3e960000}, {0x3e962000}, {0x3e964000}, {0x3e966000}, - {0x3e968000}, {0x3e96a000}, {0x3e96c000}, {0x3e96e000}, - {0x3e970000}, {0x3e972000}, {0x3e974000}, {0x3e976000}, - {0x3e978000}, {0x3e97a000}, {0x3e97c000}, {0x3e97e000}, - {0x3e980000}, {0x3e982000}, {0x3e984000}, {0x3e986000}, - {0x3e988000}, {0x3e98a000}, {0x3e98c000}, {0x3e98e000}, - {0x3e990000}, {0x3e992000}, {0x3e994000}, {0x3e996000}, - {0x3e998000}, {0x3e99a000}, {0x3e99c000}, {0x3e99e000}, - {0x3e9a0000}, {0x3e9a2000}, {0x3e9a4000}, {0x3e9a6000}, - {0x3e9a8000}, {0x3e9aa000}, {0x3e9ac000}, {0x3e9ae000}, - {0x3e9b0000}, {0x3e9b2000}, {0x3e9b4000}, {0x3e9b6000}, - {0x3e9b8000}, {0x3e9ba000}, {0x3e9bc000}, {0x3e9be000}, - {0x3e9c0000}, {0x3e9c2000}, {0x3e9c4000}, {0x3e9c6000}, - {0x3e9c8000}, {0x3e9ca000}, {0x3e9cc000}, {0x3e9ce000}, - {0x3e9d0000}, {0x3e9d2000}, {0x3e9d4000}, {0x3e9d6000}, - {0x3e9d8000}, {0x3e9da000}, {0x3e9dc000}, {0x3e9de000}, - {0x3e9e0000}, {0x3e9e2000}, {0x3e9e4000}, {0x3e9e6000}, - {0x3e9e8000}, {0x3e9ea000}, {0x3e9ec000}, {0x3e9ee000}, - {0x3e9f0000}, {0x3e9f2000}, {0x3e9f4000}, {0x3e9f6000}, - {0x3e9f8000}, {0x3e9fa000}, {0x3e9fc000}, {0x3e9fe000}, - {0x3ea00000}, {0x3ea02000}, {0x3ea04000}, {0x3ea06000}, - {0x3ea08000}, {0x3ea0a000}, {0x3ea0c000}, {0x3ea0e000}, - {0x3ea10000}, {0x3ea12000}, {0x3ea14000}, {0x3ea16000}, - {0x3ea18000}, {0x3ea1a000}, {0x3ea1c000}, {0x3ea1e000}, - {0x3ea20000}, {0x3ea22000}, {0x3ea24000}, {0x3ea26000}, - {0x3ea28000}, {0x3ea2a000}, {0x3ea2c000}, {0x3ea2e000}, - {0x3ea30000}, {0x3ea32000}, {0x3ea34000}, {0x3ea36000}, - {0x3ea38000}, {0x3ea3a000}, {0x3ea3c000}, {0x3ea3e000}, - {0x3ea40000}, {0x3ea42000}, {0x3ea44000}, {0x3ea46000}, - {0x3ea48000}, {0x3ea4a000}, {0x3ea4c000}, {0x3ea4e000}, - {0x3ea50000}, {0x3ea52000}, {0x3ea54000}, {0x3ea56000}, - {0x3ea58000}, {0x3ea5a000}, {0x3ea5c000}, {0x3ea5e000}, - {0x3ea60000}, {0x3ea62000}, {0x3ea64000}, {0x3ea66000}, - {0x3ea68000}, {0x3ea6a000}, {0x3ea6c000}, {0x3ea6e000}, - {0x3ea70000}, {0x3ea72000}, {0x3ea74000}, {0x3ea76000}, - {0x3ea78000}, {0x3ea7a000}, {0x3ea7c000}, {0x3ea7e000}, - {0x3ea80000}, {0x3ea82000}, {0x3ea84000}, {0x3ea86000}, - {0x3ea88000}, {0x3ea8a000}, {0x3ea8c000}, {0x3ea8e000}, - {0x3ea90000}, {0x3ea92000}, {0x3ea94000}, {0x3ea96000}, - {0x3ea98000}, {0x3ea9a000}, {0x3ea9c000}, {0x3ea9e000}, - {0x3eaa0000}, {0x3eaa2000}, {0x3eaa4000}, {0x3eaa6000}, - {0x3eaa8000}, {0x3eaaa000}, {0x3eaac000}, {0x3eaae000}, - {0x3eab0000}, {0x3eab2000}, {0x3eab4000}, {0x3eab6000}, - {0x3eab8000}, {0x3eaba000}, {0x3eabc000}, {0x3eabe000}, - {0x3eac0000}, {0x3eac2000}, {0x3eac4000}, {0x3eac6000}, - {0x3eac8000}, {0x3eaca000}, {0x3eacc000}, {0x3eace000}, - {0x3ead0000}, {0x3ead2000}, {0x3ead4000}, {0x3ead6000}, - {0x3ead8000}, {0x3eada000}, {0x3eadc000}, {0x3eade000}, - {0x3eae0000}, {0x3eae2000}, {0x3eae4000}, {0x3eae6000}, - {0x3eae8000}, {0x3eaea000}, {0x3eaec000}, {0x3eaee000}, - {0x3eaf0000}, {0x3eaf2000}, {0x3eaf4000}, {0x3eaf6000}, - {0x3eaf8000}, {0x3eafa000}, {0x3eafc000}, {0x3eafe000}, - {0x3eb00000}, {0x3eb02000}, {0x3eb04000}, {0x3eb06000}, - {0x3eb08000}, {0x3eb0a000}, {0x3eb0c000}, {0x3eb0e000}, - {0x3eb10000}, {0x3eb12000}, {0x3eb14000}, {0x3eb16000}, - {0x3eb18000}, {0x3eb1a000}, {0x3eb1c000}, {0x3eb1e000}, - {0x3eb20000}, {0x3eb22000}, {0x3eb24000}, {0x3eb26000}, - {0x3eb28000}, {0x3eb2a000}, {0x3eb2c000}, {0x3eb2e000}, - {0x3eb30000}, {0x3eb32000}, {0x3eb34000}, {0x3eb36000}, - {0x3eb38000}, {0x3eb3a000}, {0x3eb3c000}, {0x3eb3e000}, - {0x3eb40000}, {0x3eb42000}, {0x3eb44000}, {0x3eb46000}, - {0x3eb48000}, {0x3eb4a000}, {0x3eb4c000}, {0x3eb4e000}, - {0x3eb50000}, {0x3eb52000}, {0x3eb54000}, {0x3eb56000}, - {0x3eb58000}, {0x3eb5a000}, {0x3eb5c000}, {0x3eb5e000}, - {0x3eb60000}, {0x3eb62000}, {0x3eb64000}, {0x3eb66000}, - {0x3eb68000}, {0x3eb6a000}, {0x3eb6c000}, {0x3eb6e000}, - {0x3eb70000}, {0x3eb72000}, {0x3eb74000}, {0x3eb76000}, - {0x3eb78000}, {0x3eb7a000}, {0x3eb7c000}, {0x3eb7e000}, - {0x3eb80000}, {0x3eb82000}, {0x3eb84000}, {0x3eb86000}, - {0x3eb88000}, {0x3eb8a000}, {0x3eb8c000}, {0x3eb8e000}, - {0x3eb90000}, {0x3eb92000}, {0x3eb94000}, {0x3eb96000}, - {0x3eb98000}, {0x3eb9a000}, {0x3eb9c000}, {0x3eb9e000}, - {0x3eba0000}, {0x3eba2000}, {0x3eba4000}, {0x3eba6000}, - {0x3eba8000}, {0x3ebaa000}, {0x3ebac000}, {0x3ebae000}, - {0x3ebb0000}, {0x3ebb2000}, {0x3ebb4000}, {0x3ebb6000}, - {0x3ebb8000}, {0x3ebba000}, {0x3ebbc000}, {0x3ebbe000}, - {0x3ebc0000}, {0x3ebc2000}, {0x3ebc4000}, {0x3ebc6000}, - {0x3ebc8000}, {0x3ebca000}, {0x3ebcc000}, {0x3ebce000}, - {0x3ebd0000}, {0x3ebd2000}, {0x3ebd4000}, {0x3ebd6000}, - {0x3ebd8000}, {0x3ebda000}, {0x3ebdc000}, {0x3ebde000}, - {0x3ebe0000}, {0x3ebe2000}, {0x3ebe4000}, {0x3ebe6000}, - {0x3ebe8000}, {0x3ebea000}, {0x3ebec000}, {0x3ebee000}, - {0x3ebf0000}, {0x3ebf2000}, {0x3ebf4000}, {0x3ebf6000}, - {0x3ebf8000}, {0x3ebfa000}, {0x3ebfc000}, {0x3ebfe000}, - {0x3ec00000}, {0x3ec02000}, {0x3ec04000}, {0x3ec06000}, - {0x3ec08000}, {0x3ec0a000}, {0x3ec0c000}, {0x3ec0e000}, - {0x3ec10000}, {0x3ec12000}, {0x3ec14000}, {0x3ec16000}, - {0x3ec18000}, {0x3ec1a000}, {0x3ec1c000}, {0x3ec1e000}, - {0x3ec20000}, {0x3ec22000}, {0x3ec24000}, {0x3ec26000}, - {0x3ec28000}, {0x3ec2a000}, {0x3ec2c000}, {0x3ec2e000}, - {0x3ec30000}, {0x3ec32000}, {0x3ec34000}, {0x3ec36000}, - {0x3ec38000}, {0x3ec3a000}, {0x3ec3c000}, {0x3ec3e000}, - {0x3ec40000}, {0x3ec42000}, {0x3ec44000}, {0x3ec46000}, - {0x3ec48000}, {0x3ec4a000}, {0x3ec4c000}, {0x3ec4e000}, - {0x3ec50000}, {0x3ec52000}, {0x3ec54000}, {0x3ec56000}, - {0x3ec58000}, {0x3ec5a000}, {0x3ec5c000}, {0x3ec5e000}, - {0x3ec60000}, {0x3ec62000}, {0x3ec64000}, {0x3ec66000}, - {0x3ec68000}, {0x3ec6a000}, {0x3ec6c000}, {0x3ec6e000}, - {0x3ec70000}, {0x3ec72000}, {0x3ec74000}, {0x3ec76000}, - {0x3ec78000}, {0x3ec7a000}, {0x3ec7c000}, {0x3ec7e000}, - {0x3ec80000}, {0x3ec82000}, {0x3ec84000}, {0x3ec86000}, - {0x3ec88000}, {0x3ec8a000}, {0x3ec8c000}, {0x3ec8e000}, - {0x3ec90000}, {0x3ec92000}, {0x3ec94000}, {0x3ec96000}, - {0x3ec98000}, {0x3ec9a000}, {0x3ec9c000}, {0x3ec9e000}, - {0x3eca0000}, {0x3eca2000}, {0x3eca4000}, {0x3eca6000}, - {0x3eca8000}, {0x3ecaa000}, {0x3ecac000}, {0x3ecae000}, - {0x3ecb0000}, {0x3ecb2000}, {0x3ecb4000}, {0x3ecb6000}, - {0x3ecb8000}, {0x3ecba000}, {0x3ecbc000}, {0x3ecbe000}, - {0x3ecc0000}, {0x3ecc2000}, {0x3ecc4000}, {0x3ecc6000}, - {0x3ecc8000}, {0x3ecca000}, {0x3eccc000}, {0x3ecce000}, - {0x3ecd0000}, {0x3ecd2000}, {0x3ecd4000}, {0x3ecd6000}, - {0x3ecd8000}, {0x3ecda000}, {0x3ecdc000}, {0x3ecde000}, - {0x3ece0000}, {0x3ece2000}, {0x3ece4000}, {0x3ece6000}, - {0x3ece8000}, {0x3ecea000}, {0x3ecec000}, {0x3ecee000}, - {0x3ecf0000}, {0x3ecf2000}, {0x3ecf4000}, {0x3ecf6000}, - {0x3ecf8000}, {0x3ecfa000}, {0x3ecfc000}, {0x3ecfe000}, - {0x3ed00000}, {0x3ed02000}, {0x3ed04000}, {0x3ed06000}, - {0x3ed08000}, {0x3ed0a000}, {0x3ed0c000}, {0x3ed0e000}, - {0x3ed10000}, {0x3ed12000}, {0x3ed14000}, {0x3ed16000}, - {0x3ed18000}, {0x3ed1a000}, {0x3ed1c000}, {0x3ed1e000}, - {0x3ed20000}, {0x3ed22000}, {0x3ed24000}, {0x3ed26000}, - {0x3ed28000}, {0x3ed2a000}, {0x3ed2c000}, {0x3ed2e000}, - {0x3ed30000}, {0x3ed32000}, {0x3ed34000}, {0x3ed36000}, - {0x3ed38000}, {0x3ed3a000}, {0x3ed3c000}, {0x3ed3e000}, - {0x3ed40000}, {0x3ed42000}, {0x3ed44000}, {0x3ed46000}, - {0x3ed48000}, {0x3ed4a000}, {0x3ed4c000}, {0x3ed4e000}, - {0x3ed50000}, {0x3ed52000}, {0x3ed54000}, {0x3ed56000}, - {0x3ed58000}, {0x3ed5a000}, {0x3ed5c000}, {0x3ed5e000}, - {0x3ed60000}, {0x3ed62000}, {0x3ed64000}, {0x3ed66000}, - {0x3ed68000}, {0x3ed6a000}, {0x3ed6c000}, {0x3ed6e000}, - {0x3ed70000}, {0x3ed72000}, {0x3ed74000}, {0x3ed76000}, - {0x3ed78000}, {0x3ed7a000}, {0x3ed7c000}, {0x3ed7e000}, - {0x3ed80000}, {0x3ed82000}, {0x3ed84000}, {0x3ed86000}, - {0x3ed88000}, {0x3ed8a000}, {0x3ed8c000}, {0x3ed8e000}, - {0x3ed90000}, {0x3ed92000}, {0x3ed94000}, {0x3ed96000}, - {0x3ed98000}, {0x3ed9a000}, {0x3ed9c000}, {0x3ed9e000}, - {0x3eda0000}, {0x3eda2000}, {0x3eda4000}, {0x3eda6000}, - {0x3eda8000}, {0x3edaa000}, {0x3edac000}, {0x3edae000}, - {0x3edb0000}, {0x3edb2000}, {0x3edb4000}, {0x3edb6000}, - {0x3edb8000}, {0x3edba000}, {0x3edbc000}, {0x3edbe000}, - {0x3edc0000}, {0x3edc2000}, {0x3edc4000}, {0x3edc6000}, - {0x3edc8000}, {0x3edca000}, {0x3edcc000}, {0x3edce000}, - {0x3edd0000}, {0x3edd2000}, {0x3edd4000}, {0x3edd6000}, - {0x3edd8000}, {0x3edda000}, {0x3eddc000}, {0x3edde000}, - {0x3ede0000}, {0x3ede2000}, {0x3ede4000}, {0x3ede6000}, - {0x3ede8000}, {0x3edea000}, {0x3edec000}, {0x3edee000}, - {0x3edf0000}, {0x3edf2000}, {0x3edf4000}, {0x3edf6000}, - {0x3edf8000}, {0x3edfa000}, {0x3edfc000}, {0x3edfe000}, - {0x3ee00000}, {0x3ee02000}, {0x3ee04000}, {0x3ee06000}, - {0x3ee08000}, {0x3ee0a000}, {0x3ee0c000}, {0x3ee0e000}, - {0x3ee10000}, {0x3ee12000}, {0x3ee14000}, {0x3ee16000}, - {0x3ee18000}, {0x3ee1a000}, {0x3ee1c000}, {0x3ee1e000}, - {0x3ee20000}, {0x3ee22000}, {0x3ee24000}, {0x3ee26000}, - {0x3ee28000}, {0x3ee2a000}, {0x3ee2c000}, {0x3ee2e000}, - {0x3ee30000}, {0x3ee32000}, {0x3ee34000}, {0x3ee36000}, - {0x3ee38000}, {0x3ee3a000}, {0x3ee3c000}, {0x3ee3e000}, - {0x3ee40000}, {0x3ee42000}, {0x3ee44000}, {0x3ee46000}, - {0x3ee48000}, {0x3ee4a000}, {0x3ee4c000}, {0x3ee4e000}, - {0x3ee50000}, {0x3ee52000}, {0x3ee54000}, {0x3ee56000}, - {0x3ee58000}, {0x3ee5a000}, {0x3ee5c000}, {0x3ee5e000}, - {0x3ee60000}, {0x3ee62000}, {0x3ee64000}, {0x3ee66000}, - {0x3ee68000}, {0x3ee6a000}, {0x3ee6c000}, {0x3ee6e000}, - {0x3ee70000}, {0x3ee72000}, {0x3ee74000}, {0x3ee76000}, - {0x3ee78000}, {0x3ee7a000}, {0x3ee7c000}, {0x3ee7e000}, - {0x3ee80000}, {0x3ee82000}, {0x3ee84000}, {0x3ee86000}, - {0x3ee88000}, {0x3ee8a000}, {0x3ee8c000}, {0x3ee8e000}, - {0x3ee90000}, {0x3ee92000}, {0x3ee94000}, {0x3ee96000}, - {0x3ee98000}, {0x3ee9a000}, {0x3ee9c000}, {0x3ee9e000}, - {0x3eea0000}, {0x3eea2000}, {0x3eea4000}, {0x3eea6000}, - {0x3eea8000}, {0x3eeaa000}, {0x3eeac000}, {0x3eeae000}, - {0x3eeb0000}, {0x3eeb2000}, {0x3eeb4000}, {0x3eeb6000}, - {0x3eeb8000}, {0x3eeba000}, {0x3eebc000}, {0x3eebe000}, - {0x3eec0000}, {0x3eec2000}, {0x3eec4000}, {0x3eec6000}, - {0x3eec8000}, {0x3eeca000}, {0x3eecc000}, {0x3eece000}, - {0x3eed0000}, {0x3eed2000}, {0x3eed4000}, {0x3eed6000}, - {0x3eed8000}, {0x3eeda000}, {0x3eedc000}, {0x3eede000}, - {0x3eee0000}, {0x3eee2000}, {0x3eee4000}, {0x3eee6000}, - {0x3eee8000}, {0x3eeea000}, {0x3eeec000}, {0x3eeee000}, - {0x3eef0000}, {0x3eef2000}, {0x3eef4000}, {0x3eef6000}, - {0x3eef8000}, {0x3eefa000}, {0x3eefc000}, {0x3eefe000}, - {0x3ef00000}, {0x3ef02000}, {0x3ef04000}, {0x3ef06000}, - {0x3ef08000}, {0x3ef0a000}, {0x3ef0c000}, {0x3ef0e000}, - {0x3ef10000}, {0x3ef12000}, {0x3ef14000}, {0x3ef16000}, - {0x3ef18000}, {0x3ef1a000}, {0x3ef1c000}, {0x3ef1e000}, - {0x3ef20000}, {0x3ef22000}, {0x3ef24000}, {0x3ef26000}, - {0x3ef28000}, {0x3ef2a000}, {0x3ef2c000}, {0x3ef2e000}, - {0x3ef30000}, {0x3ef32000}, {0x3ef34000}, {0x3ef36000}, - {0x3ef38000}, {0x3ef3a000}, {0x3ef3c000}, {0x3ef3e000}, - {0x3ef40000}, {0x3ef42000}, {0x3ef44000}, {0x3ef46000}, - {0x3ef48000}, {0x3ef4a000}, {0x3ef4c000}, {0x3ef4e000}, - {0x3ef50000}, {0x3ef52000}, {0x3ef54000}, {0x3ef56000}, - {0x3ef58000}, {0x3ef5a000}, {0x3ef5c000}, {0x3ef5e000}, - {0x3ef60000}, {0x3ef62000}, {0x3ef64000}, {0x3ef66000}, - {0x3ef68000}, {0x3ef6a000}, {0x3ef6c000}, {0x3ef6e000}, - {0x3ef70000}, {0x3ef72000}, {0x3ef74000}, {0x3ef76000}, - {0x3ef78000}, {0x3ef7a000}, {0x3ef7c000}, {0x3ef7e000}, - {0x3ef80000}, {0x3ef82000}, {0x3ef84000}, {0x3ef86000}, - {0x3ef88000}, {0x3ef8a000}, {0x3ef8c000}, {0x3ef8e000}, - {0x3ef90000}, {0x3ef92000}, {0x3ef94000}, {0x3ef96000}, - {0x3ef98000}, {0x3ef9a000}, {0x3ef9c000}, {0x3ef9e000}, - {0x3efa0000}, {0x3efa2000}, {0x3efa4000}, {0x3efa6000}, - {0x3efa8000}, {0x3efaa000}, {0x3efac000}, {0x3efae000}, - {0x3efb0000}, {0x3efb2000}, {0x3efb4000}, {0x3efb6000}, - {0x3efb8000}, {0x3efba000}, {0x3efbc000}, {0x3efbe000}, - {0x3efc0000}, {0x3efc2000}, {0x3efc4000}, {0x3efc6000}, - {0x3efc8000}, {0x3efca000}, {0x3efcc000}, {0x3efce000}, - {0x3efd0000}, {0x3efd2000}, {0x3efd4000}, {0x3efd6000}, - {0x3efd8000}, {0x3efda000}, {0x3efdc000}, {0x3efde000}, - {0x3efe0000}, {0x3efe2000}, {0x3efe4000}, {0x3efe6000}, - {0x3efe8000}, {0x3efea000}, {0x3efec000}, {0x3efee000}, - {0x3eff0000}, {0x3eff2000}, {0x3eff4000}, {0x3eff6000}, - {0x3eff8000}, {0x3effa000}, {0x3effc000}, {0x3effe000}, - {0x3f000000}, {0x3f002000}, {0x3f004000}, {0x3f006000}, - {0x3f008000}, {0x3f00a000}, {0x3f00c000}, {0x3f00e000}, - {0x3f010000}, {0x3f012000}, {0x3f014000}, {0x3f016000}, - {0x3f018000}, {0x3f01a000}, {0x3f01c000}, {0x3f01e000}, - {0x3f020000}, {0x3f022000}, {0x3f024000}, {0x3f026000}, - {0x3f028000}, {0x3f02a000}, {0x3f02c000}, {0x3f02e000}, - {0x3f030000}, {0x3f032000}, {0x3f034000}, {0x3f036000}, - {0x3f038000}, {0x3f03a000}, {0x3f03c000}, {0x3f03e000}, - {0x3f040000}, {0x3f042000}, {0x3f044000}, {0x3f046000}, - {0x3f048000}, {0x3f04a000}, {0x3f04c000}, {0x3f04e000}, - {0x3f050000}, {0x3f052000}, {0x3f054000}, {0x3f056000}, - {0x3f058000}, {0x3f05a000}, {0x3f05c000}, {0x3f05e000}, - {0x3f060000}, {0x3f062000}, {0x3f064000}, {0x3f066000}, - {0x3f068000}, {0x3f06a000}, {0x3f06c000}, {0x3f06e000}, - {0x3f070000}, {0x3f072000}, {0x3f074000}, {0x3f076000}, - {0x3f078000}, {0x3f07a000}, {0x3f07c000}, {0x3f07e000}, - {0x3f080000}, {0x3f082000}, {0x3f084000}, {0x3f086000}, - {0x3f088000}, {0x3f08a000}, {0x3f08c000}, {0x3f08e000}, - {0x3f090000}, {0x3f092000}, {0x3f094000}, {0x3f096000}, - {0x3f098000}, {0x3f09a000}, {0x3f09c000}, {0x3f09e000}, - {0x3f0a0000}, {0x3f0a2000}, {0x3f0a4000}, {0x3f0a6000}, - {0x3f0a8000}, {0x3f0aa000}, {0x3f0ac000}, {0x3f0ae000}, - {0x3f0b0000}, {0x3f0b2000}, {0x3f0b4000}, {0x3f0b6000}, - {0x3f0b8000}, {0x3f0ba000}, {0x3f0bc000}, {0x3f0be000}, - {0x3f0c0000}, {0x3f0c2000}, {0x3f0c4000}, {0x3f0c6000}, - {0x3f0c8000}, {0x3f0ca000}, {0x3f0cc000}, {0x3f0ce000}, - {0x3f0d0000}, {0x3f0d2000}, {0x3f0d4000}, {0x3f0d6000}, - {0x3f0d8000}, {0x3f0da000}, {0x3f0dc000}, {0x3f0de000}, - {0x3f0e0000}, {0x3f0e2000}, {0x3f0e4000}, {0x3f0e6000}, - {0x3f0e8000}, {0x3f0ea000}, {0x3f0ec000}, {0x3f0ee000}, - {0x3f0f0000}, {0x3f0f2000}, {0x3f0f4000}, {0x3f0f6000}, - {0x3f0f8000}, {0x3f0fa000}, {0x3f0fc000}, {0x3f0fe000}, - {0x3f100000}, {0x3f102000}, {0x3f104000}, {0x3f106000}, - {0x3f108000}, {0x3f10a000}, {0x3f10c000}, {0x3f10e000}, - {0x3f110000}, {0x3f112000}, {0x3f114000}, {0x3f116000}, - {0x3f118000}, {0x3f11a000}, {0x3f11c000}, {0x3f11e000}, - {0x3f120000}, {0x3f122000}, {0x3f124000}, {0x3f126000}, - {0x3f128000}, {0x3f12a000}, {0x3f12c000}, {0x3f12e000}, - {0x3f130000}, {0x3f132000}, {0x3f134000}, {0x3f136000}, - {0x3f138000}, {0x3f13a000}, {0x3f13c000}, {0x3f13e000}, - {0x3f140000}, {0x3f142000}, {0x3f144000}, {0x3f146000}, - {0x3f148000}, {0x3f14a000}, {0x3f14c000}, {0x3f14e000}, - {0x3f150000}, {0x3f152000}, {0x3f154000}, {0x3f156000}, - {0x3f158000}, {0x3f15a000}, {0x3f15c000}, {0x3f15e000}, - {0x3f160000}, {0x3f162000}, {0x3f164000}, {0x3f166000}, - {0x3f168000}, {0x3f16a000}, {0x3f16c000}, {0x3f16e000}, - {0x3f170000}, {0x3f172000}, {0x3f174000}, {0x3f176000}, - {0x3f178000}, {0x3f17a000}, {0x3f17c000}, {0x3f17e000}, - {0x3f180000}, {0x3f182000}, {0x3f184000}, {0x3f186000}, - {0x3f188000}, {0x3f18a000}, {0x3f18c000}, {0x3f18e000}, - {0x3f190000}, {0x3f192000}, {0x3f194000}, {0x3f196000}, - {0x3f198000}, {0x3f19a000}, {0x3f19c000}, {0x3f19e000}, - {0x3f1a0000}, {0x3f1a2000}, {0x3f1a4000}, {0x3f1a6000}, - {0x3f1a8000}, {0x3f1aa000}, {0x3f1ac000}, {0x3f1ae000}, - {0x3f1b0000}, {0x3f1b2000}, {0x3f1b4000}, {0x3f1b6000}, - {0x3f1b8000}, {0x3f1ba000}, {0x3f1bc000}, {0x3f1be000}, - {0x3f1c0000}, {0x3f1c2000}, {0x3f1c4000}, {0x3f1c6000}, - {0x3f1c8000}, {0x3f1ca000}, {0x3f1cc000}, {0x3f1ce000}, - {0x3f1d0000}, {0x3f1d2000}, {0x3f1d4000}, {0x3f1d6000}, - {0x3f1d8000}, {0x3f1da000}, {0x3f1dc000}, {0x3f1de000}, - {0x3f1e0000}, {0x3f1e2000}, {0x3f1e4000}, {0x3f1e6000}, - {0x3f1e8000}, {0x3f1ea000}, {0x3f1ec000}, {0x3f1ee000}, - {0x3f1f0000}, {0x3f1f2000}, {0x3f1f4000}, {0x3f1f6000}, - {0x3f1f8000}, {0x3f1fa000}, {0x3f1fc000}, {0x3f1fe000}, - {0x3f200000}, {0x3f202000}, {0x3f204000}, {0x3f206000}, - {0x3f208000}, {0x3f20a000}, {0x3f20c000}, {0x3f20e000}, - {0x3f210000}, {0x3f212000}, {0x3f214000}, {0x3f216000}, - {0x3f218000}, {0x3f21a000}, {0x3f21c000}, {0x3f21e000}, - {0x3f220000}, {0x3f222000}, {0x3f224000}, {0x3f226000}, - {0x3f228000}, {0x3f22a000}, {0x3f22c000}, {0x3f22e000}, - {0x3f230000}, {0x3f232000}, {0x3f234000}, {0x3f236000}, - {0x3f238000}, {0x3f23a000}, {0x3f23c000}, {0x3f23e000}, - {0x3f240000}, {0x3f242000}, {0x3f244000}, {0x3f246000}, - {0x3f248000}, {0x3f24a000}, {0x3f24c000}, {0x3f24e000}, - {0x3f250000}, {0x3f252000}, {0x3f254000}, {0x3f256000}, - {0x3f258000}, {0x3f25a000}, {0x3f25c000}, {0x3f25e000}, - {0x3f260000}, {0x3f262000}, {0x3f264000}, {0x3f266000}, - {0x3f268000}, {0x3f26a000}, {0x3f26c000}, {0x3f26e000}, - {0x3f270000}, {0x3f272000}, {0x3f274000}, {0x3f276000}, - {0x3f278000}, {0x3f27a000}, {0x3f27c000}, {0x3f27e000}, - {0x3f280000}, {0x3f282000}, {0x3f284000}, {0x3f286000}, - {0x3f288000}, {0x3f28a000}, {0x3f28c000}, {0x3f28e000}, - {0x3f290000}, {0x3f292000}, {0x3f294000}, {0x3f296000}, - {0x3f298000}, {0x3f29a000}, {0x3f29c000}, {0x3f29e000}, - {0x3f2a0000}, {0x3f2a2000}, {0x3f2a4000}, {0x3f2a6000}, - {0x3f2a8000}, {0x3f2aa000}, {0x3f2ac000}, {0x3f2ae000}, - {0x3f2b0000}, {0x3f2b2000}, {0x3f2b4000}, {0x3f2b6000}, - {0x3f2b8000}, {0x3f2ba000}, {0x3f2bc000}, {0x3f2be000}, - {0x3f2c0000}, {0x3f2c2000}, {0x3f2c4000}, {0x3f2c6000}, - {0x3f2c8000}, {0x3f2ca000}, {0x3f2cc000}, {0x3f2ce000}, - {0x3f2d0000}, {0x3f2d2000}, {0x3f2d4000}, {0x3f2d6000}, - {0x3f2d8000}, {0x3f2da000}, {0x3f2dc000}, {0x3f2de000}, - {0x3f2e0000}, {0x3f2e2000}, {0x3f2e4000}, {0x3f2e6000}, - {0x3f2e8000}, {0x3f2ea000}, {0x3f2ec000}, {0x3f2ee000}, - {0x3f2f0000}, {0x3f2f2000}, {0x3f2f4000}, {0x3f2f6000}, - {0x3f2f8000}, {0x3f2fa000}, {0x3f2fc000}, {0x3f2fe000}, - {0x3f300000}, {0x3f302000}, {0x3f304000}, {0x3f306000}, - {0x3f308000}, {0x3f30a000}, {0x3f30c000}, {0x3f30e000}, - {0x3f310000}, {0x3f312000}, {0x3f314000}, {0x3f316000}, - {0x3f318000}, {0x3f31a000}, {0x3f31c000}, {0x3f31e000}, - {0x3f320000}, {0x3f322000}, {0x3f324000}, {0x3f326000}, - {0x3f328000}, {0x3f32a000}, {0x3f32c000}, {0x3f32e000}, - {0x3f330000}, {0x3f332000}, {0x3f334000}, {0x3f336000}, - {0x3f338000}, {0x3f33a000}, {0x3f33c000}, {0x3f33e000}, - {0x3f340000}, {0x3f342000}, {0x3f344000}, {0x3f346000}, - {0x3f348000}, {0x3f34a000}, {0x3f34c000}, {0x3f34e000}, - {0x3f350000}, {0x3f352000}, {0x3f354000}, {0x3f356000}, - {0x3f358000}, {0x3f35a000}, {0x3f35c000}, {0x3f35e000}, - {0x3f360000}, {0x3f362000}, {0x3f364000}, {0x3f366000}, - {0x3f368000}, {0x3f36a000}, {0x3f36c000}, {0x3f36e000}, - {0x3f370000}, {0x3f372000}, {0x3f374000}, {0x3f376000}, - {0x3f378000}, {0x3f37a000}, {0x3f37c000}, {0x3f37e000}, - {0x3f380000}, {0x3f382000}, {0x3f384000}, {0x3f386000}, - {0x3f388000}, {0x3f38a000}, {0x3f38c000}, {0x3f38e000}, - {0x3f390000}, {0x3f392000}, {0x3f394000}, {0x3f396000}, - {0x3f398000}, {0x3f39a000}, {0x3f39c000}, {0x3f39e000}, - {0x3f3a0000}, {0x3f3a2000}, {0x3f3a4000}, {0x3f3a6000}, - {0x3f3a8000}, {0x3f3aa000}, {0x3f3ac000}, {0x3f3ae000}, - {0x3f3b0000}, {0x3f3b2000}, {0x3f3b4000}, {0x3f3b6000}, - {0x3f3b8000}, {0x3f3ba000}, {0x3f3bc000}, {0x3f3be000}, - {0x3f3c0000}, {0x3f3c2000}, {0x3f3c4000}, {0x3f3c6000}, - {0x3f3c8000}, {0x3f3ca000}, {0x3f3cc000}, {0x3f3ce000}, - {0x3f3d0000}, {0x3f3d2000}, {0x3f3d4000}, {0x3f3d6000}, - {0x3f3d8000}, {0x3f3da000}, {0x3f3dc000}, {0x3f3de000}, - {0x3f3e0000}, {0x3f3e2000}, {0x3f3e4000}, {0x3f3e6000}, - {0x3f3e8000}, {0x3f3ea000}, {0x3f3ec000}, {0x3f3ee000}, - {0x3f3f0000}, {0x3f3f2000}, {0x3f3f4000}, {0x3f3f6000}, - {0x3f3f8000}, {0x3f3fa000}, {0x3f3fc000}, {0x3f3fe000}, - {0x3f400000}, {0x3f402000}, {0x3f404000}, {0x3f406000}, - {0x3f408000}, {0x3f40a000}, {0x3f40c000}, {0x3f40e000}, - {0x3f410000}, {0x3f412000}, {0x3f414000}, {0x3f416000}, - {0x3f418000}, {0x3f41a000}, {0x3f41c000}, {0x3f41e000}, - {0x3f420000}, {0x3f422000}, {0x3f424000}, {0x3f426000}, - {0x3f428000}, {0x3f42a000}, {0x3f42c000}, {0x3f42e000}, - {0x3f430000}, {0x3f432000}, {0x3f434000}, {0x3f436000}, - {0x3f438000}, {0x3f43a000}, {0x3f43c000}, {0x3f43e000}, - {0x3f440000}, {0x3f442000}, {0x3f444000}, {0x3f446000}, - {0x3f448000}, {0x3f44a000}, {0x3f44c000}, {0x3f44e000}, - {0x3f450000}, {0x3f452000}, {0x3f454000}, {0x3f456000}, - {0x3f458000}, {0x3f45a000}, {0x3f45c000}, {0x3f45e000}, - {0x3f460000}, {0x3f462000}, {0x3f464000}, {0x3f466000}, - {0x3f468000}, {0x3f46a000}, {0x3f46c000}, {0x3f46e000}, - {0x3f470000}, {0x3f472000}, {0x3f474000}, {0x3f476000}, - {0x3f478000}, {0x3f47a000}, {0x3f47c000}, {0x3f47e000}, - {0x3f480000}, {0x3f482000}, {0x3f484000}, {0x3f486000}, - {0x3f488000}, {0x3f48a000}, {0x3f48c000}, {0x3f48e000}, - {0x3f490000}, {0x3f492000}, {0x3f494000}, {0x3f496000}, - {0x3f498000}, {0x3f49a000}, {0x3f49c000}, {0x3f49e000}, - {0x3f4a0000}, {0x3f4a2000}, {0x3f4a4000}, {0x3f4a6000}, - {0x3f4a8000}, {0x3f4aa000}, {0x3f4ac000}, {0x3f4ae000}, - {0x3f4b0000}, {0x3f4b2000}, {0x3f4b4000}, {0x3f4b6000}, - {0x3f4b8000}, {0x3f4ba000}, {0x3f4bc000}, {0x3f4be000}, - {0x3f4c0000}, {0x3f4c2000}, {0x3f4c4000}, {0x3f4c6000}, - {0x3f4c8000}, {0x3f4ca000}, {0x3f4cc000}, {0x3f4ce000}, - {0x3f4d0000}, {0x3f4d2000}, {0x3f4d4000}, {0x3f4d6000}, - {0x3f4d8000}, {0x3f4da000}, {0x3f4dc000}, {0x3f4de000}, - {0x3f4e0000}, {0x3f4e2000}, {0x3f4e4000}, {0x3f4e6000}, - {0x3f4e8000}, {0x3f4ea000}, {0x3f4ec000}, {0x3f4ee000}, - {0x3f4f0000}, {0x3f4f2000}, {0x3f4f4000}, {0x3f4f6000}, - {0x3f4f8000}, {0x3f4fa000}, {0x3f4fc000}, {0x3f4fe000}, - {0x3f500000}, {0x3f502000}, {0x3f504000}, {0x3f506000}, - {0x3f508000}, {0x3f50a000}, {0x3f50c000}, {0x3f50e000}, - {0x3f510000}, {0x3f512000}, {0x3f514000}, {0x3f516000}, - {0x3f518000}, {0x3f51a000}, {0x3f51c000}, {0x3f51e000}, - {0x3f520000}, {0x3f522000}, {0x3f524000}, {0x3f526000}, - {0x3f528000}, {0x3f52a000}, {0x3f52c000}, {0x3f52e000}, - {0x3f530000}, {0x3f532000}, {0x3f534000}, {0x3f536000}, - {0x3f538000}, {0x3f53a000}, {0x3f53c000}, {0x3f53e000}, - {0x3f540000}, {0x3f542000}, {0x3f544000}, {0x3f546000}, - {0x3f548000}, {0x3f54a000}, {0x3f54c000}, {0x3f54e000}, - {0x3f550000}, {0x3f552000}, {0x3f554000}, {0x3f556000}, - {0x3f558000}, {0x3f55a000}, {0x3f55c000}, {0x3f55e000}, - {0x3f560000}, {0x3f562000}, {0x3f564000}, {0x3f566000}, - {0x3f568000}, {0x3f56a000}, {0x3f56c000}, {0x3f56e000}, - {0x3f570000}, {0x3f572000}, {0x3f574000}, {0x3f576000}, - {0x3f578000}, {0x3f57a000}, {0x3f57c000}, {0x3f57e000}, - {0x3f580000}, {0x3f582000}, {0x3f584000}, {0x3f586000}, - {0x3f588000}, {0x3f58a000}, {0x3f58c000}, {0x3f58e000}, - {0x3f590000}, {0x3f592000}, {0x3f594000}, {0x3f596000}, - {0x3f598000}, {0x3f59a000}, {0x3f59c000}, {0x3f59e000}, - {0x3f5a0000}, {0x3f5a2000}, {0x3f5a4000}, {0x3f5a6000}, - {0x3f5a8000}, {0x3f5aa000}, {0x3f5ac000}, {0x3f5ae000}, - {0x3f5b0000}, {0x3f5b2000}, {0x3f5b4000}, {0x3f5b6000}, - {0x3f5b8000}, {0x3f5ba000}, {0x3f5bc000}, {0x3f5be000}, - {0x3f5c0000}, {0x3f5c2000}, {0x3f5c4000}, {0x3f5c6000}, - {0x3f5c8000}, {0x3f5ca000}, {0x3f5cc000}, {0x3f5ce000}, - {0x3f5d0000}, {0x3f5d2000}, {0x3f5d4000}, {0x3f5d6000}, - {0x3f5d8000}, {0x3f5da000}, {0x3f5dc000}, {0x3f5de000}, - {0x3f5e0000}, {0x3f5e2000}, {0x3f5e4000}, {0x3f5e6000}, - {0x3f5e8000}, {0x3f5ea000}, {0x3f5ec000}, {0x3f5ee000}, - {0x3f5f0000}, {0x3f5f2000}, {0x3f5f4000}, {0x3f5f6000}, - {0x3f5f8000}, {0x3f5fa000}, {0x3f5fc000}, {0x3f5fe000}, - {0x3f600000}, {0x3f602000}, {0x3f604000}, {0x3f606000}, - {0x3f608000}, {0x3f60a000}, {0x3f60c000}, {0x3f60e000}, - {0x3f610000}, {0x3f612000}, {0x3f614000}, {0x3f616000}, - {0x3f618000}, {0x3f61a000}, {0x3f61c000}, {0x3f61e000}, - {0x3f620000}, {0x3f622000}, {0x3f624000}, {0x3f626000}, - {0x3f628000}, {0x3f62a000}, {0x3f62c000}, {0x3f62e000}, - {0x3f630000}, {0x3f632000}, {0x3f634000}, {0x3f636000}, - {0x3f638000}, {0x3f63a000}, {0x3f63c000}, {0x3f63e000}, - {0x3f640000}, {0x3f642000}, {0x3f644000}, {0x3f646000}, - {0x3f648000}, {0x3f64a000}, {0x3f64c000}, {0x3f64e000}, - {0x3f650000}, {0x3f652000}, {0x3f654000}, {0x3f656000}, - {0x3f658000}, {0x3f65a000}, {0x3f65c000}, {0x3f65e000}, - {0x3f660000}, {0x3f662000}, {0x3f664000}, {0x3f666000}, - {0x3f668000}, {0x3f66a000}, {0x3f66c000}, {0x3f66e000}, - {0x3f670000}, {0x3f672000}, {0x3f674000}, {0x3f676000}, - {0x3f678000}, {0x3f67a000}, {0x3f67c000}, {0x3f67e000}, - {0x3f680000}, {0x3f682000}, {0x3f684000}, {0x3f686000}, - {0x3f688000}, {0x3f68a000}, {0x3f68c000}, {0x3f68e000}, - {0x3f690000}, {0x3f692000}, {0x3f694000}, {0x3f696000}, - {0x3f698000}, {0x3f69a000}, {0x3f69c000}, {0x3f69e000}, - {0x3f6a0000}, {0x3f6a2000}, {0x3f6a4000}, {0x3f6a6000}, - {0x3f6a8000}, {0x3f6aa000}, {0x3f6ac000}, {0x3f6ae000}, - {0x3f6b0000}, {0x3f6b2000}, {0x3f6b4000}, {0x3f6b6000}, - {0x3f6b8000}, {0x3f6ba000}, {0x3f6bc000}, {0x3f6be000}, - {0x3f6c0000}, {0x3f6c2000}, {0x3f6c4000}, {0x3f6c6000}, - {0x3f6c8000}, {0x3f6ca000}, {0x3f6cc000}, {0x3f6ce000}, - {0x3f6d0000}, {0x3f6d2000}, {0x3f6d4000}, {0x3f6d6000}, - {0x3f6d8000}, {0x3f6da000}, {0x3f6dc000}, {0x3f6de000}, - {0x3f6e0000}, {0x3f6e2000}, {0x3f6e4000}, {0x3f6e6000}, - {0x3f6e8000}, {0x3f6ea000}, {0x3f6ec000}, {0x3f6ee000}, - {0x3f6f0000}, {0x3f6f2000}, {0x3f6f4000}, {0x3f6f6000}, - {0x3f6f8000}, {0x3f6fa000}, {0x3f6fc000}, {0x3f6fe000}, - {0x3f700000}, {0x3f702000}, {0x3f704000}, {0x3f706000}, - {0x3f708000}, {0x3f70a000}, {0x3f70c000}, {0x3f70e000}, - {0x3f710000}, {0x3f712000}, {0x3f714000}, {0x3f716000}, - {0x3f718000}, {0x3f71a000}, {0x3f71c000}, {0x3f71e000}, - {0x3f720000}, {0x3f722000}, {0x3f724000}, {0x3f726000}, - {0x3f728000}, {0x3f72a000}, {0x3f72c000}, {0x3f72e000}, - {0x3f730000}, {0x3f732000}, {0x3f734000}, {0x3f736000}, - {0x3f738000}, {0x3f73a000}, {0x3f73c000}, {0x3f73e000}, - {0x3f740000}, {0x3f742000}, {0x3f744000}, {0x3f746000}, - {0x3f748000}, {0x3f74a000}, {0x3f74c000}, {0x3f74e000}, - {0x3f750000}, {0x3f752000}, {0x3f754000}, {0x3f756000}, - {0x3f758000}, {0x3f75a000}, {0x3f75c000}, {0x3f75e000}, - {0x3f760000}, {0x3f762000}, {0x3f764000}, {0x3f766000}, - {0x3f768000}, {0x3f76a000}, {0x3f76c000}, {0x3f76e000}, - {0x3f770000}, {0x3f772000}, {0x3f774000}, {0x3f776000}, - {0x3f778000}, {0x3f77a000}, {0x3f77c000}, {0x3f77e000}, - {0x3f780000}, {0x3f782000}, {0x3f784000}, {0x3f786000}, - {0x3f788000}, {0x3f78a000}, {0x3f78c000}, {0x3f78e000}, - {0x3f790000}, {0x3f792000}, {0x3f794000}, {0x3f796000}, - {0x3f798000}, {0x3f79a000}, {0x3f79c000}, {0x3f79e000}, - {0x3f7a0000}, {0x3f7a2000}, {0x3f7a4000}, {0x3f7a6000}, - {0x3f7a8000}, {0x3f7aa000}, {0x3f7ac000}, {0x3f7ae000}, - {0x3f7b0000}, {0x3f7b2000}, {0x3f7b4000}, {0x3f7b6000}, - {0x3f7b8000}, {0x3f7ba000}, {0x3f7bc000}, {0x3f7be000}, - {0x3f7c0000}, {0x3f7c2000}, {0x3f7c4000}, {0x3f7c6000}, - {0x3f7c8000}, {0x3f7ca000}, {0x3f7cc000}, {0x3f7ce000}, - {0x3f7d0000}, {0x3f7d2000}, {0x3f7d4000}, {0x3f7d6000}, - {0x3f7d8000}, {0x3f7da000}, {0x3f7dc000}, {0x3f7de000}, - {0x3f7e0000}, {0x3f7e2000}, {0x3f7e4000}, {0x3f7e6000}, - {0x3f7e8000}, {0x3f7ea000}, {0x3f7ec000}, {0x3f7ee000}, - {0x3f7f0000}, {0x3f7f2000}, {0x3f7f4000}, {0x3f7f6000}, - {0x3f7f8000}, {0x3f7fa000}, {0x3f7fc000}, {0x3f7fe000}, - {0x3f800000}, {0x3f802000}, {0x3f804000}, {0x3f806000}, - {0x3f808000}, {0x3f80a000}, {0x3f80c000}, {0x3f80e000}, - {0x3f810000}, {0x3f812000}, {0x3f814000}, {0x3f816000}, - {0x3f818000}, {0x3f81a000}, {0x3f81c000}, {0x3f81e000}, - {0x3f820000}, {0x3f822000}, {0x3f824000}, {0x3f826000}, - {0x3f828000}, {0x3f82a000}, {0x3f82c000}, {0x3f82e000}, - {0x3f830000}, {0x3f832000}, {0x3f834000}, {0x3f836000}, - {0x3f838000}, {0x3f83a000}, {0x3f83c000}, {0x3f83e000}, - {0x3f840000}, {0x3f842000}, {0x3f844000}, {0x3f846000}, - {0x3f848000}, {0x3f84a000}, {0x3f84c000}, {0x3f84e000}, - {0x3f850000}, {0x3f852000}, {0x3f854000}, {0x3f856000}, - {0x3f858000}, {0x3f85a000}, {0x3f85c000}, {0x3f85e000}, - {0x3f860000}, {0x3f862000}, {0x3f864000}, {0x3f866000}, - {0x3f868000}, {0x3f86a000}, {0x3f86c000}, {0x3f86e000}, - {0x3f870000}, {0x3f872000}, {0x3f874000}, {0x3f876000}, - {0x3f878000}, {0x3f87a000}, {0x3f87c000}, {0x3f87e000}, - {0x3f880000}, {0x3f882000}, {0x3f884000}, {0x3f886000}, - {0x3f888000}, {0x3f88a000}, {0x3f88c000}, {0x3f88e000}, - {0x3f890000}, {0x3f892000}, {0x3f894000}, {0x3f896000}, - {0x3f898000}, {0x3f89a000}, {0x3f89c000}, {0x3f89e000}, - {0x3f8a0000}, {0x3f8a2000}, {0x3f8a4000}, {0x3f8a6000}, - {0x3f8a8000}, {0x3f8aa000}, {0x3f8ac000}, {0x3f8ae000}, - {0x3f8b0000}, {0x3f8b2000}, {0x3f8b4000}, {0x3f8b6000}, - {0x3f8b8000}, {0x3f8ba000}, {0x3f8bc000}, {0x3f8be000}, - {0x3f8c0000}, {0x3f8c2000}, {0x3f8c4000}, {0x3f8c6000}, - {0x3f8c8000}, {0x3f8ca000}, {0x3f8cc000}, {0x3f8ce000}, - {0x3f8d0000}, {0x3f8d2000}, {0x3f8d4000}, {0x3f8d6000}, - {0x3f8d8000}, {0x3f8da000}, {0x3f8dc000}, {0x3f8de000}, - {0x3f8e0000}, {0x3f8e2000}, {0x3f8e4000}, {0x3f8e6000}, - {0x3f8e8000}, {0x3f8ea000}, {0x3f8ec000}, {0x3f8ee000}, - {0x3f8f0000}, {0x3f8f2000}, {0x3f8f4000}, {0x3f8f6000}, - {0x3f8f8000}, {0x3f8fa000}, {0x3f8fc000}, {0x3f8fe000}, - {0x3f900000}, {0x3f902000}, {0x3f904000}, {0x3f906000}, - {0x3f908000}, {0x3f90a000}, {0x3f90c000}, {0x3f90e000}, - {0x3f910000}, {0x3f912000}, {0x3f914000}, {0x3f916000}, - {0x3f918000}, {0x3f91a000}, {0x3f91c000}, {0x3f91e000}, - {0x3f920000}, {0x3f922000}, {0x3f924000}, {0x3f926000}, - {0x3f928000}, {0x3f92a000}, {0x3f92c000}, {0x3f92e000}, - {0x3f930000}, {0x3f932000}, {0x3f934000}, {0x3f936000}, - {0x3f938000}, {0x3f93a000}, {0x3f93c000}, {0x3f93e000}, - {0x3f940000}, {0x3f942000}, {0x3f944000}, {0x3f946000}, - {0x3f948000}, {0x3f94a000}, {0x3f94c000}, {0x3f94e000}, - {0x3f950000}, {0x3f952000}, {0x3f954000}, {0x3f956000}, - {0x3f958000}, {0x3f95a000}, {0x3f95c000}, {0x3f95e000}, - {0x3f960000}, {0x3f962000}, {0x3f964000}, {0x3f966000}, - {0x3f968000}, {0x3f96a000}, {0x3f96c000}, {0x3f96e000}, - {0x3f970000}, {0x3f972000}, {0x3f974000}, {0x3f976000}, - {0x3f978000}, {0x3f97a000}, {0x3f97c000}, {0x3f97e000}, - {0x3f980000}, {0x3f982000}, {0x3f984000}, {0x3f986000}, - {0x3f988000}, {0x3f98a000}, {0x3f98c000}, {0x3f98e000}, - {0x3f990000}, {0x3f992000}, {0x3f994000}, {0x3f996000}, - {0x3f998000}, {0x3f99a000}, {0x3f99c000}, {0x3f99e000}, - {0x3f9a0000}, {0x3f9a2000}, {0x3f9a4000}, {0x3f9a6000}, - {0x3f9a8000}, {0x3f9aa000}, {0x3f9ac000}, {0x3f9ae000}, - {0x3f9b0000}, {0x3f9b2000}, {0x3f9b4000}, {0x3f9b6000}, - {0x3f9b8000}, {0x3f9ba000}, {0x3f9bc000}, {0x3f9be000}, - {0x3f9c0000}, {0x3f9c2000}, {0x3f9c4000}, {0x3f9c6000}, - {0x3f9c8000}, {0x3f9ca000}, {0x3f9cc000}, {0x3f9ce000}, - {0x3f9d0000}, {0x3f9d2000}, {0x3f9d4000}, {0x3f9d6000}, - {0x3f9d8000}, {0x3f9da000}, {0x3f9dc000}, {0x3f9de000}, - {0x3f9e0000}, {0x3f9e2000}, {0x3f9e4000}, {0x3f9e6000}, - {0x3f9e8000}, {0x3f9ea000}, {0x3f9ec000}, {0x3f9ee000}, - {0x3f9f0000}, {0x3f9f2000}, {0x3f9f4000}, {0x3f9f6000}, - {0x3f9f8000}, {0x3f9fa000}, {0x3f9fc000}, {0x3f9fe000}, - {0x3fa00000}, {0x3fa02000}, {0x3fa04000}, {0x3fa06000}, - {0x3fa08000}, {0x3fa0a000}, {0x3fa0c000}, {0x3fa0e000}, - {0x3fa10000}, {0x3fa12000}, {0x3fa14000}, {0x3fa16000}, - {0x3fa18000}, {0x3fa1a000}, {0x3fa1c000}, {0x3fa1e000}, - {0x3fa20000}, {0x3fa22000}, {0x3fa24000}, {0x3fa26000}, - {0x3fa28000}, {0x3fa2a000}, {0x3fa2c000}, {0x3fa2e000}, - {0x3fa30000}, {0x3fa32000}, {0x3fa34000}, {0x3fa36000}, - {0x3fa38000}, {0x3fa3a000}, {0x3fa3c000}, {0x3fa3e000}, - {0x3fa40000}, {0x3fa42000}, {0x3fa44000}, {0x3fa46000}, - {0x3fa48000}, {0x3fa4a000}, {0x3fa4c000}, {0x3fa4e000}, - {0x3fa50000}, {0x3fa52000}, {0x3fa54000}, {0x3fa56000}, - {0x3fa58000}, {0x3fa5a000}, {0x3fa5c000}, {0x3fa5e000}, - {0x3fa60000}, {0x3fa62000}, {0x3fa64000}, {0x3fa66000}, - {0x3fa68000}, {0x3fa6a000}, {0x3fa6c000}, {0x3fa6e000}, - {0x3fa70000}, {0x3fa72000}, {0x3fa74000}, {0x3fa76000}, - {0x3fa78000}, {0x3fa7a000}, {0x3fa7c000}, {0x3fa7e000}, - {0x3fa80000}, {0x3fa82000}, {0x3fa84000}, {0x3fa86000}, - {0x3fa88000}, {0x3fa8a000}, {0x3fa8c000}, {0x3fa8e000}, - {0x3fa90000}, {0x3fa92000}, {0x3fa94000}, {0x3fa96000}, - {0x3fa98000}, {0x3fa9a000}, {0x3fa9c000}, {0x3fa9e000}, - {0x3faa0000}, {0x3faa2000}, {0x3faa4000}, {0x3faa6000}, - {0x3faa8000}, {0x3faaa000}, {0x3faac000}, {0x3faae000}, - {0x3fab0000}, {0x3fab2000}, {0x3fab4000}, {0x3fab6000}, - {0x3fab8000}, {0x3faba000}, {0x3fabc000}, {0x3fabe000}, - {0x3fac0000}, {0x3fac2000}, {0x3fac4000}, {0x3fac6000}, - {0x3fac8000}, {0x3faca000}, {0x3facc000}, {0x3face000}, - {0x3fad0000}, {0x3fad2000}, {0x3fad4000}, {0x3fad6000}, - {0x3fad8000}, {0x3fada000}, {0x3fadc000}, {0x3fade000}, - {0x3fae0000}, {0x3fae2000}, {0x3fae4000}, {0x3fae6000}, - {0x3fae8000}, {0x3faea000}, {0x3faec000}, {0x3faee000}, - {0x3faf0000}, {0x3faf2000}, {0x3faf4000}, {0x3faf6000}, - {0x3faf8000}, {0x3fafa000}, {0x3fafc000}, {0x3fafe000}, - {0x3fb00000}, {0x3fb02000}, {0x3fb04000}, {0x3fb06000}, - {0x3fb08000}, {0x3fb0a000}, {0x3fb0c000}, {0x3fb0e000}, - {0x3fb10000}, {0x3fb12000}, {0x3fb14000}, {0x3fb16000}, - {0x3fb18000}, {0x3fb1a000}, {0x3fb1c000}, {0x3fb1e000}, - {0x3fb20000}, {0x3fb22000}, {0x3fb24000}, {0x3fb26000}, - {0x3fb28000}, {0x3fb2a000}, {0x3fb2c000}, {0x3fb2e000}, - {0x3fb30000}, {0x3fb32000}, {0x3fb34000}, {0x3fb36000}, - {0x3fb38000}, {0x3fb3a000}, {0x3fb3c000}, {0x3fb3e000}, - {0x3fb40000}, {0x3fb42000}, {0x3fb44000}, {0x3fb46000}, - {0x3fb48000}, {0x3fb4a000}, {0x3fb4c000}, {0x3fb4e000}, - {0x3fb50000}, {0x3fb52000}, {0x3fb54000}, {0x3fb56000}, - {0x3fb58000}, {0x3fb5a000}, {0x3fb5c000}, {0x3fb5e000}, - {0x3fb60000}, {0x3fb62000}, {0x3fb64000}, {0x3fb66000}, - {0x3fb68000}, {0x3fb6a000}, {0x3fb6c000}, {0x3fb6e000}, - {0x3fb70000}, {0x3fb72000}, {0x3fb74000}, {0x3fb76000}, - {0x3fb78000}, {0x3fb7a000}, {0x3fb7c000}, {0x3fb7e000}, - {0x3fb80000}, {0x3fb82000}, {0x3fb84000}, {0x3fb86000}, - {0x3fb88000}, {0x3fb8a000}, {0x3fb8c000}, {0x3fb8e000}, - {0x3fb90000}, {0x3fb92000}, {0x3fb94000}, {0x3fb96000}, - {0x3fb98000}, {0x3fb9a000}, {0x3fb9c000}, {0x3fb9e000}, - {0x3fba0000}, {0x3fba2000}, {0x3fba4000}, {0x3fba6000}, - {0x3fba8000}, {0x3fbaa000}, {0x3fbac000}, {0x3fbae000}, - {0x3fbb0000}, {0x3fbb2000}, {0x3fbb4000}, {0x3fbb6000}, - {0x3fbb8000}, {0x3fbba000}, {0x3fbbc000}, {0x3fbbe000}, - {0x3fbc0000}, {0x3fbc2000}, {0x3fbc4000}, {0x3fbc6000}, - {0x3fbc8000}, {0x3fbca000}, {0x3fbcc000}, {0x3fbce000}, - {0x3fbd0000}, {0x3fbd2000}, {0x3fbd4000}, {0x3fbd6000}, - {0x3fbd8000}, {0x3fbda000}, {0x3fbdc000}, {0x3fbde000}, - {0x3fbe0000}, {0x3fbe2000}, {0x3fbe4000}, {0x3fbe6000}, - {0x3fbe8000}, {0x3fbea000}, {0x3fbec000}, {0x3fbee000}, - {0x3fbf0000}, {0x3fbf2000}, {0x3fbf4000}, {0x3fbf6000}, - {0x3fbf8000}, {0x3fbfa000}, {0x3fbfc000}, {0x3fbfe000}, - {0x3fc00000}, {0x3fc02000}, {0x3fc04000}, {0x3fc06000}, - {0x3fc08000}, {0x3fc0a000}, {0x3fc0c000}, {0x3fc0e000}, - {0x3fc10000}, {0x3fc12000}, {0x3fc14000}, {0x3fc16000}, - {0x3fc18000}, {0x3fc1a000}, {0x3fc1c000}, {0x3fc1e000}, - {0x3fc20000}, {0x3fc22000}, {0x3fc24000}, {0x3fc26000}, - {0x3fc28000}, {0x3fc2a000}, {0x3fc2c000}, {0x3fc2e000}, - {0x3fc30000}, {0x3fc32000}, {0x3fc34000}, {0x3fc36000}, - {0x3fc38000}, {0x3fc3a000}, {0x3fc3c000}, {0x3fc3e000}, - {0x3fc40000}, {0x3fc42000}, {0x3fc44000}, {0x3fc46000}, - {0x3fc48000}, {0x3fc4a000}, {0x3fc4c000}, {0x3fc4e000}, - {0x3fc50000}, {0x3fc52000}, {0x3fc54000}, {0x3fc56000}, - {0x3fc58000}, {0x3fc5a000}, {0x3fc5c000}, {0x3fc5e000}, - {0x3fc60000}, {0x3fc62000}, {0x3fc64000}, {0x3fc66000}, - {0x3fc68000}, {0x3fc6a000}, {0x3fc6c000}, {0x3fc6e000}, - {0x3fc70000}, {0x3fc72000}, {0x3fc74000}, {0x3fc76000}, - {0x3fc78000}, {0x3fc7a000}, {0x3fc7c000}, {0x3fc7e000}, - {0x3fc80000}, {0x3fc82000}, {0x3fc84000}, {0x3fc86000}, - {0x3fc88000}, {0x3fc8a000}, {0x3fc8c000}, {0x3fc8e000}, - {0x3fc90000}, {0x3fc92000}, {0x3fc94000}, {0x3fc96000}, - {0x3fc98000}, {0x3fc9a000}, {0x3fc9c000}, {0x3fc9e000}, - {0x3fca0000}, {0x3fca2000}, {0x3fca4000}, {0x3fca6000}, - {0x3fca8000}, {0x3fcaa000}, {0x3fcac000}, {0x3fcae000}, - {0x3fcb0000}, {0x3fcb2000}, {0x3fcb4000}, {0x3fcb6000}, - {0x3fcb8000}, {0x3fcba000}, {0x3fcbc000}, {0x3fcbe000}, - {0x3fcc0000}, {0x3fcc2000}, {0x3fcc4000}, {0x3fcc6000}, - {0x3fcc8000}, {0x3fcca000}, {0x3fccc000}, {0x3fcce000}, - {0x3fcd0000}, {0x3fcd2000}, {0x3fcd4000}, {0x3fcd6000}, - {0x3fcd8000}, {0x3fcda000}, {0x3fcdc000}, {0x3fcde000}, - {0x3fce0000}, {0x3fce2000}, {0x3fce4000}, {0x3fce6000}, - {0x3fce8000}, {0x3fcea000}, {0x3fcec000}, {0x3fcee000}, - {0x3fcf0000}, {0x3fcf2000}, {0x3fcf4000}, {0x3fcf6000}, - {0x3fcf8000}, {0x3fcfa000}, {0x3fcfc000}, {0x3fcfe000}, - {0x3fd00000}, {0x3fd02000}, {0x3fd04000}, {0x3fd06000}, - {0x3fd08000}, {0x3fd0a000}, {0x3fd0c000}, {0x3fd0e000}, - {0x3fd10000}, {0x3fd12000}, {0x3fd14000}, {0x3fd16000}, - {0x3fd18000}, {0x3fd1a000}, {0x3fd1c000}, {0x3fd1e000}, - {0x3fd20000}, {0x3fd22000}, {0x3fd24000}, {0x3fd26000}, - {0x3fd28000}, {0x3fd2a000}, {0x3fd2c000}, {0x3fd2e000}, - {0x3fd30000}, {0x3fd32000}, {0x3fd34000}, {0x3fd36000}, - {0x3fd38000}, {0x3fd3a000}, {0x3fd3c000}, {0x3fd3e000}, - {0x3fd40000}, {0x3fd42000}, {0x3fd44000}, {0x3fd46000}, - {0x3fd48000}, {0x3fd4a000}, {0x3fd4c000}, {0x3fd4e000}, - {0x3fd50000}, {0x3fd52000}, {0x3fd54000}, {0x3fd56000}, - {0x3fd58000}, {0x3fd5a000}, {0x3fd5c000}, {0x3fd5e000}, - {0x3fd60000}, {0x3fd62000}, {0x3fd64000}, {0x3fd66000}, - {0x3fd68000}, {0x3fd6a000}, {0x3fd6c000}, {0x3fd6e000}, - {0x3fd70000}, {0x3fd72000}, {0x3fd74000}, {0x3fd76000}, - {0x3fd78000}, {0x3fd7a000}, {0x3fd7c000}, {0x3fd7e000}, - {0x3fd80000}, {0x3fd82000}, {0x3fd84000}, {0x3fd86000}, - {0x3fd88000}, {0x3fd8a000}, {0x3fd8c000}, {0x3fd8e000}, - {0x3fd90000}, {0x3fd92000}, {0x3fd94000}, {0x3fd96000}, - {0x3fd98000}, {0x3fd9a000}, {0x3fd9c000}, {0x3fd9e000}, - {0x3fda0000}, {0x3fda2000}, {0x3fda4000}, {0x3fda6000}, - {0x3fda8000}, {0x3fdaa000}, {0x3fdac000}, {0x3fdae000}, - {0x3fdb0000}, {0x3fdb2000}, {0x3fdb4000}, {0x3fdb6000}, - {0x3fdb8000}, {0x3fdba000}, {0x3fdbc000}, {0x3fdbe000}, - {0x3fdc0000}, {0x3fdc2000}, {0x3fdc4000}, {0x3fdc6000}, - {0x3fdc8000}, {0x3fdca000}, {0x3fdcc000}, {0x3fdce000}, - {0x3fdd0000}, {0x3fdd2000}, {0x3fdd4000}, {0x3fdd6000}, - {0x3fdd8000}, {0x3fdda000}, {0x3fddc000}, {0x3fdde000}, - {0x3fde0000}, {0x3fde2000}, {0x3fde4000}, {0x3fde6000}, - {0x3fde8000}, {0x3fdea000}, {0x3fdec000}, {0x3fdee000}, - {0x3fdf0000}, {0x3fdf2000}, {0x3fdf4000}, {0x3fdf6000}, - {0x3fdf8000}, {0x3fdfa000}, {0x3fdfc000}, {0x3fdfe000}, - {0x3fe00000}, {0x3fe02000}, {0x3fe04000}, {0x3fe06000}, - {0x3fe08000}, {0x3fe0a000}, {0x3fe0c000}, {0x3fe0e000}, - {0x3fe10000}, {0x3fe12000}, {0x3fe14000}, {0x3fe16000}, - {0x3fe18000}, {0x3fe1a000}, {0x3fe1c000}, {0x3fe1e000}, - {0x3fe20000}, {0x3fe22000}, {0x3fe24000}, {0x3fe26000}, - {0x3fe28000}, {0x3fe2a000}, {0x3fe2c000}, {0x3fe2e000}, - {0x3fe30000}, {0x3fe32000}, {0x3fe34000}, {0x3fe36000}, - {0x3fe38000}, {0x3fe3a000}, {0x3fe3c000}, {0x3fe3e000}, - {0x3fe40000}, {0x3fe42000}, {0x3fe44000}, {0x3fe46000}, - {0x3fe48000}, {0x3fe4a000}, {0x3fe4c000}, {0x3fe4e000}, - {0x3fe50000}, {0x3fe52000}, {0x3fe54000}, {0x3fe56000}, - {0x3fe58000}, {0x3fe5a000}, {0x3fe5c000}, {0x3fe5e000}, - {0x3fe60000}, {0x3fe62000}, {0x3fe64000}, {0x3fe66000}, - {0x3fe68000}, {0x3fe6a000}, {0x3fe6c000}, {0x3fe6e000}, - {0x3fe70000}, {0x3fe72000}, {0x3fe74000}, {0x3fe76000}, - {0x3fe78000}, {0x3fe7a000}, {0x3fe7c000}, {0x3fe7e000}, - {0x3fe80000}, {0x3fe82000}, {0x3fe84000}, {0x3fe86000}, - {0x3fe88000}, {0x3fe8a000}, {0x3fe8c000}, {0x3fe8e000}, - {0x3fe90000}, {0x3fe92000}, {0x3fe94000}, {0x3fe96000}, - {0x3fe98000}, {0x3fe9a000}, {0x3fe9c000}, {0x3fe9e000}, - {0x3fea0000}, {0x3fea2000}, {0x3fea4000}, {0x3fea6000}, - {0x3fea8000}, {0x3feaa000}, {0x3feac000}, {0x3feae000}, - {0x3feb0000}, {0x3feb2000}, {0x3feb4000}, {0x3feb6000}, - {0x3feb8000}, {0x3feba000}, {0x3febc000}, {0x3febe000}, - {0x3fec0000}, {0x3fec2000}, {0x3fec4000}, {0x3fec6000}, - {0x3fec8000}, {0x3feca000}, {0x3fecc000}, {0x3fece000}, - {0x3fed0000}, {0x3fed2000}, {0x3fed4000}, {0x3fed6000}, - {0x3fed8000}, {0x3feda000}, {0x3fedc000}, {0x3fede000}, - {0x3fee0000}, {0x3fee2000}, {0x3fee4000}, {0x3fee6000}, - {0x3fee8000}, {0x3feea000}, {0x3feec000}, {0x3feee000}, - {0x3fef0000}, {0x3fef2000}, {0x3fef4000}, {0x3fef6000}, - {0x3fef8000}, {0x3fefa000}, {0x3fefc000}, {0x3fefe000}, - {0x3ff00000}, {0x3ff02000}, {0x3ff04000}, {0x3ff06000}, - {0x3ff08000}, {0x3ff0a000}, {0x3ff0c000}, {0x3ff0e000}, - {0x3ff10000}, {0x3ff12000}, {0x3ff14000}, {0x3ff16000}, - {0x3ff18000}, {0x3ff1a000}, {0x3ff1c000}, {0x3ff1e000}, - {0x3ff20000}, {0x3ff22000}, {0x3ff24000}, {0x3ff26000}, - {0x3ff28000}, {0x3ff2a000}, {0x3ff2c000}, {0x3ff2e000}, - {0x3ff30000}, {0x3ff32000}, {0x3ff34000}, {0x3ff36000}, - {0x3ff38000}, {0x3ff3a000}, {0x3ff3c000}, {0x3ff3e000}, - {0x3ff40000}, {0x3ff42000}, {0x3ff44000}, {0x3ff46000}, - {0x3ff48000}, {0x3ff4a000}, {0x3ff4c000}, {0x3ff4e000}, - {0x3ff50000}, {0x3ff52000}, {0x3ff54000}, {0x3ff56000}, - {0x3ff58000}, {0x3ff5a000}, {0x3ff5c000}, {0x3ff5e000}, - {0x3ff60000}, {0x3ff62000}, {0x3ff64000}, {0x3ff66000}, - {0x3ff68000}, {0x3ff6a000}, {0x3ff6c000}, {0x3ff6e000}, - {0x3ff70000}, {0x3ff72000}, {0x3ff74000}, {0x3ff76000}, - {0x3ff78000}, {0x3ff7a000}, {0x3ff7c000}, {0x3ff7e000}, - {0x3ff80000}, {0x3ff82000}, {0x3ff84000}, {0x3ff86000}, - {0x3ff88000}, {0x3ff8a000}, {0x3ff8c000}, {0x3ff8e000}, - {0x3ff90000}, {0x3ff92000}, {0x3ff94000}, {0x3ff96000}, - {0x3ff98000}, {0x3ff9a000}, {0x3ff9c000}, {0x3ff9e000}, - {0x3ffa0000}, {0x3ffa2000}, {0x3ffa4000}, {0x3ffa6000}, - {0x3ffa8000}, {0x3ffaa000}, {0x3ffac000}, {0x3ffae000}, - {0x3ffb0000}, {0x3ffb2000}, {0x3ffb4000}, {0x3ffb6000}, - {0x3ffb8000}, {0x3ffba000}, {0x3ffbc000}, {0x3ffbe000}, - {0x3ffc0000}, {0x3ffc2000}, {0x3ffc4000}, {0x3ffc6000}, - {0x3ffc8000}, {0x3ffca000}, {0x3ffcc000}, {0x3ffce000}, - {0x3ffd0000}, {0x3ffd2000}, {0x3ffd4000}, {0x3ffd6000}, - {0x3ffd8000}, {0x3ffda000}, {0x3ffdc000}, {0x3ffde000}, - {0x3ffe0000}, {0x3ffe2000}, {0x3ffe4000}, {0x3ffe6000}, - {0x3ffe8000}, {0x3ffea000}, {0x3ffec000}, {0x3ffee000}, - {0x3fff0000}, {0x3fff2000}, {0x3fff4000}, {0x3fff6000}, - {0x3fff8000}, {0x3fffa000}, {0x3fffc000}, {0x3fffe000}, - {0x40000000}, {0x40002000}, {0x40004000}, {0x40006000}, - {0x40008000}, {0x4000a000}, {0x4000c000}, {0x4000e000}, - {0x40010000}, {0x40012000}, {0x40014000}, {0x40016000}, - {0x40018000}, {0x4001a000}, {0x4001c000}, {0x4001e000}, - {0x40020000}, {0x40022000}, {0x40024000}, {0x40026000}, - {0x40028000}, {0x4002a000}, {0x4002c000}, {0x4002e000}, - {0x40030000}, {0x40032000}, {0x40034000}, {0x40036000}, - {0x40038000}, {0x4003a000}, {0x4003c000}, {0x4003e000}, - {0x40040000}, {0x40042000}, {0x40044000}, {0x40046000}, - {0x40048000}, {0x4004a000}, {0x4004c000}, {0x4004e000}, - {0x40050000}, {0x40052000}, {0x40054000}, {0x40056000}, - {0x40058000}, {0x4005a000}, {0x4005c000}, {0x4005e000}, - {0x40060000}, {0x40062000}, {0x40064000}, {0x40066000}, - {0x40068000}, {0x4006a000}, {0x4006c000}, {0x4006e000}, - {0x40070000}, {0x40072000}, {0x40074000}, {0x40076000}, - {0x40078000}, {0x4007a000}, {0x4007c000}, {0x4007e000}, - {0x40080000}, {0x40082000}, {0x40084000}, {0x40086000}, - {0x40088000}, {0x4008a000}, {0x4008c000}, {0x4008e000}, - {0x40090000}, {0x40092000}, {0x40094000}, {0x40096000}, - {0x40098000}, {0x4009a000}, {0x4009c000}, {0x4009e000}, - {0x400a0000}, {0x400a2000}, {0x400a4000}, {0x400a6000}, - {0x400a8000}, {0x400aa000}, {0x400ac000}, {0x400ae000}, - {0x400b0000}, {0x400b2000}, {0x400b4000}, {0x400b6000}, - {0x400b8000}, {0x400ba000}, {0x400bc000}, {0x400be000}, - {0x400c0000}, {0x400c2000}, {0x400c4000}, {0x400c6000}, - {0x400c8000}, {0x400ca000}, {0x400cc000}, {0x400ce000}, - {0x400d0000}, {0x400d2000}, {0x400d4000}, {0x400d6000}, - {0x400d8000}, {0x400da000}, {0x400dc000}, {0x400de000}, - {0x400e0000}, {0x400e2000}, {0x400e4000}, {0x400e6000}, - {0x400e8000}, {0x400ea000}, {0x400ec000}, {0x400ee000}, - {0x400f0000}, {0x400f2000}, {0x400f4000}, {0x400f6000}, - {0x400f8000}, {0x400fa000}, {0x400fc000}, {0x400fe000}, - {0x40100000}, {0x40102000}, {0x40104000}, {0x40106000}, - {0x40108000}, {0x4010a000}, {0x4010c000}, {0x4010e000}, - {0x40110000}, {0x40112000}, {0x40114000}, {0x40116000}, - {0x40118000}, {0x4011a000}, {0x4011c000}, {0x4011e000}, - {0x40120000}, {0x40122000}, {0x40124000}, {0x40126000}, - {0x40128000}, {0x4012a000}, {0x4012c000}, {0x4012e000}, - {0x40130000}, {0x40132000}, {0x40134000}, {0x40136000}, - {0x40138000}, {0x4013a000}, {0x4013c000}, {0x4013e000}, - {0x40140000}, {0x40142000}, {0x40144000}, {0x40146000}, - {0x40148000}, {0x4014a000}, {0x4014c000}, {0x4014e000}, - {0x40150000}, {0x40152000}, {0x40154000}, {0x40156000}, - {0x40158000}, {0x4015a000}, {0x4015c000}, {0x4015e000}, - {0x40160000}, {0x40162000}, {0x40164000}, {0x40166000}, - {0x40168000}, {0x4016a000}, {0x4016c000}, {0x4016e000}, - {0x40170000}, {0x40172000}, {0x40174000}, {0x40176000}, - {0x40178000}, {0x4017a000}, {0x4017c000}, {0x4017e000}, - {0x40180000}, {0x40182000}, {0x40184000}, {0x40186000}, - {0x40188000}, {0x4018a000}, {0x4018c000}, {0x4018e000}, - {0x40190000}, {0x40192000}, {0x40194000}, {0x40196000}, - {0x40198000}, {0x4019a000}, {0x4019c000}, {0x4019e000}, - {0x401a0000}, {0x401a2000}, {0x401a4000}, {0x401a6000}, - {0x401a8000}, {0x401aa000}, {0x401ac000}, {0x401ae000}, - {0x401b0000}, {0x401b2000}, {0x401b4000}, {0x401b6000}, - {0x401b8000}, {0x401ba000}, {0x401bc000}, {0x401be000}, - {0x401c0000}, {0x401c2000}, {0x401c4000}, {0x401c6000}, - {0x401c8000}, {0x401ca000}, {0x401cc000}, {0x401ce000}, - {0x401d0000}, {0x401d2000}, {0x401d4000}, {0x401d6000}, - {0x401d8000}, {0x401da000}, {0x401dc000}, {0x401de000}, - {0x401e0000}, {0x401e2000}, {0x401e4000}, {0x401e6000}, - {0x401e8000}, {0x401ea000}, {0x401ec000}, {0x401ee000}, - {0x401f0000}, {0x401f2000}, {0x401f4000}, {0x401f6000}, - {0x401f8000}, {0x401fa000}, {0x401fc000}, {0x401fe000}, - {0x40200000}, {0x40202000}, {0x40204000}, {0x40206000}, - {0x40208000}, {0x4020a000}, {0x4020c000}, {0x4020e000}, - {0x40210000}, {0x40212000}, {0x40214000}, {0x40216000}, - {0x40218000}, {0x4021a000}, {0x4021c000}, {0x4021e000}, - {0x40220000}, {0x40222000}, {0x40224000}, {0x40226000}, - {0x40228000}, {0x4022a000}, {0x4022c000}, {0x4022e000}, - {0x40230000}, {0x40232000}, {0x40234000}, {0x40236000}, - {0x40238000}, {0x4023a000}, {0x4023c000}, {0x4023e000}, - {0x40240000}, {0x40242000}, {0x40244000}, {0x40246000}, - {0x40248000}, {0x4024a000}, {0x4024c000}, {0x4024e000}, - {0x40250000}, {0x40252000}, {0x40254000}, {0x40256000}, - {0x40258000}, {0x4025a000}, {0x4025c000}, {0x4025e000}, - {0x40260000}, {0x40262000}, {0x40264000}, {0x40266000}, - {0x40268000}, {0x4026a000}, {0x4026c000}, {0x4026e000}, - {0x40270000}, {0x40272000}, {0x40274000}, {0x40276000}, - {0x40278000}, {0x4027a000}, {0x4027c000}, {0x4027e000}, - {0x40280000}, {0x40282000}, {0x40284000}, {0x40286000}, - {0x40288000}, {0x4028a000}, {0x4028c000}, {0x4028e000}, - {0x40290000}, {0x40292000}, {0x40294000}, {0x40296000}, - {0x40298000}, {0x4029a000}, {0x4029c000}, {0x4029e000}, - {0x402a0000}, {0x402a2000}, {0x402a4000}, {0x402a6000}, - {0x402a8000}, {0x402aa000}, {0x402ac000}, {0x402ae000}, - {0x402b0000}, {0x402b2000}, {0x402b4000}, {0x402b6000}, - {0x402b8000}, {0x402ba000}, {0x402bc000}, {0x402be000}, - {0x402c0000}, {0x402c2000}, {0x402c4000}, {0x402c6000}, - {0x402c8000}, {0x402ca000}, {0x402cc000}, {0x402ce000}, - {0x402d0000}, {0x402d2000}, {0x402d4000}, {0x402d6000}, - {0x402d8000}, {0x402da000}, {0x402dc000}, {0x402de000}, - {0x402e0000}, {0x402e2000}, {0x402e4000}, {0x402e6000}, - {0x402e8000}, {0x402ea000}, {0x402ec000}, {0x402ee000}, - {0x402f0000}, {0x402f2000}, {0x402f4000}, {0x402f6000}, - {0x402f8000}, {0x402fa000}, {0x402fc000}, {0x402fe000}, - {0x40300000}, {0x40302000}, {0x40304000}, {0x40306000}, - {0x40308000}, {0x4030a000}, {0x4030c000}, {0x4030e000}, - {0x40310000}, {0x40312000}, {0x40314000}, {0x40316000}, - {0x40318000}, {0x4031a000}, {0x4031c000}, {0x4031e000}, - {0x40320000}, {0x40322000}, {0x40324000}, {0x40326000}, - {0x40328000}, {0x4032a000}, {0x4032c000}, {0x4032e000}, - {0x40330000}, {0x40332000}, {0x40334000}, {0x40336000}, - {0x40338000}, {0x4033a000}, {0x4033c000}, {0x4033e000}, - {0x40340000}, {0x40342000}, {0x40344000}, {0x40346000}, - {0x40348000}, {0x4034a000}, {0x4034c000}, {0x4034e000}, - {0x40350000}, {0x40352000}, {0x40354000}, {0x40356000}, - {0x40358000}, {0x4035a000}, {0x4035c000}, {0x4035e000}, - {0x40360000}, {0x40362000}, {0x40364000}, {0x40366000}, - {0x40368000}, {0x4036a000}, {0x4036c000}, {0x4036e000}, - {0x40370000}, {0x40372000}, {0x40374000}, {0x40376000}, - {0x40378000}, {0x4037a000}, {0x4037c000}, {0x4037e000}, - {0x40380000}, {0x40382000}, {0x40384000}, {0x40386000}, - {0x40388000}, {0x4038a000}, {0x4038c000}, {0x4038e000}, - {0x40390000}, {0x40392000}, {0x40394000}, {0x40396000}, - {0x40398000}, {0x4039a000}, {0x4039c000}, {0x4039e000}, - {0x403a0000}, {0x403a2000}, {0x403a4000}, {0x403a6000}, - {0x403a8000}, {0x403aa000}, {0x403ac000}, {0x403ae000}, - {0x403b0000}, {0x403b2000}, {0x403b4000}, {0x403b6000}, - {0x403b8000}, {0x403ba000}, {0x403bc000}, {0x403be000}, - {0x403c0000}, {0x403c2000}, {0x403c4000}, {0x403c6000}, - {0x403c8000}, {0x403ca000}, {0x403cc000}, {0x403ce000}, - {0x403d0000}, {0x403d2000}, {0x403d4000}, {0x403d6000}, - {0x403d8000}, {0x403da000}, {0x403dc000}, {0x403de000}, - {0x403e0000}, {0x403e2000}, {0x403e4000}, {0x403e6000}, - {0x403e8000}, {0x403ea000}, {0x403ec000}, {0x403ee000}, - {0x403f0000}, {0x403f2000}, {0x403f4000}, {0x403f6000}, - {0x403f8000}, {0x403fa000}, {0x403fc000}, {0x403fe000}, - {0x40400000}, {0x40402000}, {0x40404000}, {0x40406000}, - {0x40408000}, {0x4040a000}, {0x4040c000}, {0x4040e000}, - {0x40410000}, {0x40412000}, {0x40414000}, {0x40416000}, - {0x40418000}, {0x4041a000}, {0x4041c000}, {0x4041e000}, - {0x40420000}, {0x40422000}, {0x40424000}, {0x40426000}, - {0x40428000}, {0x4042a000}, {0x4042c000}, {0x4042e000}, - {0x40430000}, {0x40432000}, {0x40434000}, {0x40436000}, - {0x40438000}, {0x4043a000}, {0x4043c000}, {0x4043e000}, - {0x40440000}, {0x40442000}, {0x40444000}, {0x40446000}, - {0x40448000}, {0x4044a000}, {0x4044c000}, {0x4044e000}, - {0x40450000}, {0x40452000}, {0x40454000}, {0x40456000}, - {0x40458000}, {0x4045a000}, {0x4045c000}, {0x4045e000}, - {0x40460000}, {0x40462000}, {0x40464000}, {0x40466000}, - {0x40468000}, {0x4046a000}, {0x4046c000}, {0x4046e000}, - {0x40470000}, {0x40472000}, {0x40474000}, {0x40476000}, - {0x40478000}, {0x4047a000}, {0x4047c000}, {0x4047e000}, - {0x40480000}, {0x40482000}, {0x40484000}, {0x40486000}, - {0x40488000}, {0x4048a000}, {0x4048c000}, {0x4048e000}, - {0x40490000}, {0x40492000}, {0x40494000}, {0x40496000}, - {0x40498000}, {0x4049a000}, {0x4049c000}, {0x4049e000}, - {0x404a0000}, {0x404a2000}, {0x404a4000}, {0x404a6000}, - {0x404a8000}, {0x404aa000}, {0x404ac000}, {0x404ae000}, - {0x404b0000}, {0x404b2000}, {0x404b4000}, {0x404b6000}, - {0x404b8000}, {0x404ba000}, {0x404bc000}, {0x404be000}, - {0x404c0000}, {0x404c2000}, {0x404c4000}, {0x404c6000}, - {0x404c8000}, {0x404ca000}, {0x404cc000}, {0x404ce000}, - {0x404d0000}, {0x404d2000}, {0x404d4000}, {0x404d6000}, - {0x404d8000}, {0x404da000}, {0x404dc000}, {0x404de000}, - {0x404e0000}, {0x404e2000}, {0x404e4000}, {0x404e6000}, - {0x404e8000}, {0x404ea000}, {0x404ec000}, {0x404ee000}, - {0x404f0000}, {0x404f2000}, {0x404f4000}, {0x404f6000}, - {0x404f8000}, {0x404fa000}, {0x404fc000}, {0x404fe000}, - {0x40500000}, {0x40502000}, {0x40504000}, {0x40506000}, - {0x40508000}, {0x4050a000}, {0x4050c000}, {0x4050e000}, - {0x40510000}, {0x40512000}, {0x40514000}, {0x40516000}, - {0x40518000}, {0x4051a000}, {0x4051c000}, {0x4051e000}, - {0x40520000}, {0x40522000}, {0x40524000}, {0x40526000}, - {0x40528000}, {0x4052a000}, {0x4052c000}, {0x4052e000}, - {0x40530000}, {0x40532000}, {0x40534000}, {0x40536000}, - {0x40538000}, {0x4053a000}, {0x4053c000}, {0x4053e000}, - {0x40540000}, {0x40542000}, {0x40544000}, {0x40546000}, - {0x40548000}, {0x4054a000}, {0x4054c000}, {0x4054e000}, - {0x40550000}, {0x40552000}, {0x40554000}, {0x40556000}, - {0x40558000}, {0x4055a000}, {0x4055c000}, {0x4055e000}, - {0x40560000}, {0x40562000}, {0x40564000}, {0x40566000}, - {0x40568000}, {0x4056a000}, {0x4056c000}, {0x4056e000}, - {0x40570000}, {0x40572000}, {0x40574000}, {0x40576000}, - {0x40578000}, {0x4057a000}, {0x4057c000}, {0x4057e000}, - {0x40580000}, {0x40582000}, {0x40584000}, {0x40586000}, - {0x40588000}, {0x4058a000}, {0x4058c000}, {0x4058e000}, - {0x40590000}, {0x40592000}, {0x40594000}, {0x40596000}, - {0x40598000}, {0x4059a000}, {0x4059c000}, {0x4059e000}, - {0x405a0000}, {0x405a2000}, {0x405a4000}, {0x405a6000}, - {0x405a8000}, {0x405aa000}, {0x405ac000}, {0x405ae000}, - {0x405b0000}, {0x405b2000}, {0x405b4000}, {0x405b6000}, - {0x405b8000}, {0x405ba000}, {0x405bc000}, {0x405be000}, - {0x405c0000}, {0x405c2000}, {0x405c4000}, {0x405c6000}, - {0x405c8000}, {0x405ca000}, {0x405cc000}, {0x405ce000}, - {0x405d0000}, {0x405d2000}, {0x405d4000}, {0x405d6000}, - {0x405d8000}, {0x405da000}, {0x405dc000}, {0x405de000}, - {0x405e0000}, {0x405e2000}, {0x405e4000}, {0x405e6000}, - {0x405e8000}, {0x405ea000}, {0x405ec000}, {0x405ee000}, - {0x405f0000}, {0x405f2000}, {0x405f4000}, {0x405f6000}, - {0x405f8000}, {0x405fa000}, {0x405fc000}, {0x405fe000}, - {0x40600000}, {0x40602000}, {0x40604000}, {0x40606000}, - {0x40608000}, {0x4060a000}, {0x4060c000}, {0x4060e000}, - {0x40610000}, {0x40612000}, {0x40614000}, {0x40616000}, - {0x40618000}, {0x4061a000}, {0x4061c000}, {0x4061e000}, - {0x40620000}, {0x40622000}, {0x40624000}, {0x40626000}, - {0x40628000}, {0x4062a000}, {0x4062c000}, {0x4062e000}, - {0x40630000}, {0x40632000}, {0x40634000}, {0x40636000}, - {0x40638000}, {0x4063a000}, {0x4063c000}, {0x4063e000}, - {0x40640000}, {0x40642000}, {0x40644000}, {0x40646000}, - {0x40648000}, {0x4064a000}, {0x4064c000}, {0x4064e000}, - {0x40650000}, {0x40652000}, {0x40654000}, {0x40656000}, - {0x40658000}, {0x4065a000}, {0x4065c000}, {0x4065e000}, - {0x40660000}, {0x40662000}, {0x40664000}, {0x40666000}, - {0x40668000}, {0x4066a000}, {0x4066c000}, {0x4066e000}, - {0x40670000}, {0x40672000}, {0x40674000}, {0x40676000}, - {0x40678000}, {0x4067a000}, {0x4067c000}, {0x4067e000}, - {0x40680000}, {0x40682000}, {0x40684000}, {0x40686000}, - {0x40688000}, {0x4068a000}, {0x4068c000}, {0x4068e000}, - {0x40690000}, {0x40692000}, {0x40694000}, {0x40696000}, - {0x40698000}, {0x4069a000}, {0x4069c000}, {0x4069e000}, - {0x406a0000}, {0x406a2000}, {0x406a4000}, {0x406a6000}, - {0x406a8000}, {0x406aa000}, {0x406ac000}, {0x406ae000}, - {0x406b0000}, {0x406b2000}, {0x406b4000}, {0x406b6000}, - {0x406b8000}, {0x406ba000}, {0x406bc000}, {0x406be000}, - {0x406c0000}, {0x406c2000}, {0x406c4000}, {0x406c6000}, - {0x406c8000}, {0x406ca000}, {0x406cc000}, {0x406ce000}, - {0x406d0000}, {0x406d2000}, {0x406d4000}, {0x406d6000}, - {0x406d8000}, {0x406da000}, {0x406dc000}, {0x406de000}, - {0x406e0000}, {0x406e2000}, {0x406e4000}, {0x406e6000}, - {0x406e8000}, {0x406ea000}, {0x406ec000}, {0x406ee000}, - {0x406f0000}, {0x406f2000}, {0x406f4000}, {0x406f6000}, - {0x406f8000}, {0x406fa000}, {0x406fc000}, {0x406fe000}, - {0x40700000}, {0x40702000}, {0x40704000}, {0x40706000}, - {0x40708000}, {0x4070a000}, {0x4070c000}, {0x4070e000}, - {0x40710000}, {0x40712000}, {0x40714000}, {0x40716000}, - {0x40718000}, {0x4071a000}, {0x4071c000}, {0x4071e000}, - {0x40720000}, {0x40722000}, {0x40724000}, {0x40726000}, - {0x40728000}, {0x4072a000}, {0x4072c000}, {0x4072e000}, - {0x40730000}, {0x40732000}, {0x40734000}, {0x40736000}, - {0x40738000}, {0x4073a000}, {0x4073c000}, {0x4073e000}, - {0x40740000}, {0x40742000}, {0x40744000}, {0x40746000}, - {0x40748000}, {0x4074a000}, {0x4074c000}, {0x4074e000}, - {0x40750000}, {0x40752000}, {0x40754000}, {0x40756000}, - {0x40758000}, {0x4075a000}, {0x4075c000}, {0x4075e000}, - {0x40760000}, {0x40762000}, {0x40764000}, {0x40766000}, - {0x40768000}, {0x4076a000}, {0x4076c000}, {0x4076e000}, - {0x40770000}, {0x40772000}, {0x40774000}, {0x40776000}, - {0x40778000}, {0x4077a000}, {0x4077c000}, {0x4077e000}, - {0x40780000}, {0x40782000}, {0x40784000}, {0x40786000}, - {0x40788000}, {0x4078a000}, {0x4078c000}, {0x4078e000}, - {0x40790000}, {0x40792000}, {0x40794000}, {0x40796000}, - {0x40798000}, {0x4079a000}, {0x4079c000}, {0x4079e000}, - {0x407a0000}, {0x407a2000}, {0x407a4000}, {0x407a6000}, - {0x407a8000}, {0x407aa000}, {0x407ac000}, {0x407ae000}, - {0x407b0000}, {0x407b2000}, {0x407b4000}, {0x407b6000}, - {0x407b8000}, {0x407ba000}, {0x407bc000}, {0x407be000}, - {0x407c0000}, {0x407c2000}, {0x407c4000}, {0x407c6000}, - {0x407c8000}, {0x407ca000}, {0x407cc000}, {0x407ce000}, - {0x407d0000}, {0x407d2000}, {0x407d4000}, {0x407d6000}, - {0x407d8000}, {0x407da000}, {0x407dc000}, {0x407de000}, - {0x407e0000}, {0x407e2000}, {0x407e4000}, {0x407e6000}, - {0x407e8000}, {0x407ea000}, {0x407ec000}, {0x407ee000}, - {0x407f0000}, {0x407f2000}, {0x407f4000}, {0x407f6000}, - {0x407f8000}, {0x407fa000}, {0x407fc000}, {0x407fe000}, - {0x40800000}, {0x40802000}, {0x40804000}, {0x40806000}, - {0x40808000}, {0x4080a000}, {0x4080c000}, {0x4080e000}, - {0x40810000}, {0x40812000}, {0x40814000}, {0x40816000}, - {0x40818000}, {0x4081a000}, {0x4081c000}, {0x4081e000}, - {0x40820000}, {0x40822000}, {0x40824000}, {0x40826000}, - {0x40828000}, {0x4082a000}, {0x4082c000}, {0x4082e000}, - {0x40830000}, {0x40832000}, {0x40834000}, {0x40836000}, - {0x40838000}, {0x4083a000}, {0x4083c000}, {0x4083e000}, - {0x40840000}, {0x40842000}, {0x40844000}, {0x40846000}, - {0x40848000}, {0x4084a000}, {0x4084c000}, {0x4084e000}, - {0x40850000}, {0x40852000}, {0x40854000}, {0x40856000}, - {0x40858000}, {0x4085a000}, {0x4085c000}, {0x4085e000}, - {0x40860000}, {0x40862000}, {0x40864000}, {0x40866000}, - {0x40868000}, {0x4086a000}, {0x4086c000}, {0x4086e000}, - {0x40870000}, {0x40872000}, {0x40874000}, {0x40876000}, - {0x40878000}, {0x4087a000}, {0x4087c000}, {0x4087e000}, - {0x40880000}, {0x40882000}, {0x40884000}, {0x40886000}, - {0x40888000}, {0x4088a000}, {0x4088c000}, {0x4088e000}, - {0x40890000}, {0x40892000}, {0x40894000}, {0x40896000}, - {0x40898000}, {0x4089a000}, {0x4089c000}, {0x4089e000}, - {0x408a0000}, {0x408a2000}, {0x408a4000}, {0x408a6000}, - {0x408a8000}, {0x408aa000}, {0x408ac000}, {0x408ae000}, - {0x408b0000}, {0x408b2000}, {0x408b4000}, {0x408b6000}, - {0x408b8000}, {0x408ba000}, {0x408bc000}, {0x408be000}, - {0x408c0000}, {0x408c2000}, {0x408c4000}, {0x408c6000}, - {0x408c8000}, {0x408ca000}, {0x408cc000}, {0x408ce000}, - {0x408d0000}, {0x408d2000}, {0x408d4000}, {0x408d6000}, - {0x408d8000}, {0x408da000}, {0x408dc000}, {0x408de000}, - {0x408e0000}, {0x408e2000}, {0x408e4000}, {0x408e6000}, - {0x408e8000}, {0x408ea000}, {0x408ec000}, {0x408ee000}, - {0x408f0000}, {0x408f2000}, {0x408f4000}, {0x408f6000}, - {0x408f8000}, {0x408fa000}, {0x408fc000}, {0x408fe000}, - {0x40900000}, {0x40902000}, {0x40904000}, {0x40906000}, - {0x40908000}, {0x4090a000}, {0x4090c000}, {0x4090e000}, - {0x40910000}, {0x40912000}, {0x40914000}, {0x40916000}, - {0x40918000}, {0x4091a000}, {0x4091c000}, {0x4091e000}, - {0x40920000}, {0x40922000}, {0x40924000}, {0x40926000}, - {0x40928000}, {0x4092a000}, {0x4092c000}, {0x4092e000}, - {0x40930000}, {0x40932000}, {0x40934000}, {0x40936000}, - {0x40938000}, {0x4093a000}, {0x4093c000}, {0x4093e000}, - {0x40940000}, {0x40942000}, {0x40944000}, {0x40946000}, - {0x40948000}, {0x4094a000}, {0x4094c000}, {0x4094e000}, - {0x40950000}, {0x40952000}, {0x40954000}, {0x40956000}, - {0x40958000}, {0x4095a000}, {0x4095c000}, {0x4095e000}, - {0x40960000}, {0x40962000}, {0x40964000}, {0x40966000}, - {0x40968000}, {0x4096a000}, {0x4096c000}, {0x4096e000}, - {0x40970000}, {0x40972000}, {0x40974000}, {0x40976000}, - {0x40978000}, {0x4097a000}, {0x4097c000}, {0x4097e000}, - {0x40980000}, {0x40982000}, {0x40984000}, {0x40986000}, - {0x40988000}, {0x4098a000}, {0x4098c000}, {0x4098e000}, - {0x40990000}, {0x40992000}, {0x40994000}, {0x40996000}, - {0x40998000}, {0x4099a000}, {0x4099c000}, {0x4099e000}, - {0x409a0000}, {0x409a2000}, {0x409a4000}, {0x409a6000}, - {0x409a8000}, {0x409aa000}, {0x409ac000}, {0x409ae000}, - {0x409b0000}, {0x409b2000}, {0x409b4000}, {0x409b6000}, - {0x409b8000}, {0x409ba000}, {0x409bc000}, {0x409be000}, - {0x409c0000}, {0x409c2000}, {0x409c4000}, {0x409c6000}, - {0x409c8000}, {0x409ca000}, {0x409cc000}, {0x409ce000}, - {0x409d0000}, {0x409d2000}, {0x409d4000}, {0x409d6000}, - {0x409d8000}, {0x409da000}, {0x409dc000}, {0x409de000}, - {0x409e0000}, {0x409e2000}, {0x409e4000}, {0x409e6000}, - {0x409e8000}, {0x409ea000}, {0x409ec000}, {0x409ee000}, - {0x409f0000}, {0x409f2000}, {0x409f4000}, {0x409f6000}, - {0x409f8000}, {0x409fa000}, {0x409fc000}, {0x409fe000}, - {0x40a00000}, {0x40a02000}, {0x40a04000}, {0x40a06000}, - {0x40a08000}, {0x40a0a000}, {0x40a0c000}, {0x40a0e000}, - {0x40a10000}, {0x40a12000}, {0x40a14000}, {0x40a16000}, - {0x40a18000}, {0x40a1a000}, {0x40a1c000}, {0x40a1e000}, - {0x40a20000}, {0x40a22000}, {0x40a24000}, {0x40a26000}, - {0x40a28000}, {0x40a2a000}, {0x40a2c000}, {0x40a2e000}, - {0x40a30000}, {0x40a32000}, {0x40a34000}, {0x40a36000}, - {0x40a38000}, {0x40a3a000}, {0x40a3c000}, {0x40a3e000}, - {0x40a40000}, {0x40a42000}, {0x40a44000}, {0x40a46000}, - {0x40a48000}, {0x40a4a000}, {0x40a4c000}, {0x40a4e000}, - {0x40a50000}, {0x40a52000}, {0x40a54000}, {0x40a56000}, - {0x40a58000}, {0x40a5a000}, {0x40a5c000}, {0x40a5e000}, - {0x40a60000}, {0x40a62000}, {0x40a64000}, {0x40a66000}, - {0x40a68000}, {0x40a6a000}, {0x40a6c000}, {0x40a6e000}, - {0x40a70000}, {0x40a72000}, {0x40a74000}, {0x40a76000}, - {0x40a78000}, {0x40a7a000}, {0x40a7c000}, {0x40a7e000}, - {0x40a80000}, {0x40a82000}, {0x40a84000}, {0x40a86000}, - {0x40a88000}, {0x40a8a000}, {0x40a8c000}, {0x40a8e000}, - {0x40a90000}, {0x40a92000}, {0x40a94000}, {0x40a96000}, - {0x40a98000}, {0x40a9a000}, {0x40a9c000}, {0x40a9e000}, - {0x40aa0000}, {0x40aa2000}, {0x40aa4000}, {0x40aa6000}, - {0x40aa8000}, {0x40aaa000}, {0x40aac000}, {0x40aae000}, - {0x40ab0000}, {0x40ab2000}, {0x40ab4000}, {0x40ab6000}, - {0x40ab8000}, {0x40aba000}, {0x40abc000}, {0x40abe000}, - {0x40ac0000}, {0x40ac2000}, {0x40ac4000}, {0x40ac6000}, - {0x40ac8000}, {0x40aca000}, {0x40acc000}, {0x40ace000}, - {0x40ad0000}, {0x40ad2000}, {0x40ad4000}, {0x40ad6000}, - {0x40ad8000}, {0x40ada000}, {0x40adc000}, {0x40ade000}, - {0x40ae0000}, {0x40ae2000}, {0x40ae4000}, {0x40ae6000}, - {0x40ae8000}, {0x40aea000}, {0x40aec000}, {0x40aee000}, - {0x40af0000}, {0x40af2000}, {0x40af4000}, {0x40af6000}, - {0x40af8000}, {0x40afa000}, {0x40afc000}, {0x40afe000}, - {0x40b00000}, {0x40b02000}, {0x40b04000}, {0x40b06000}, - {0x40b08000}, {0x40b0a000}, {0x40b0c000}, {0x40b0e000}, - {0x40b10000}, {0x40b12000}, {0x40b14000}, {0x40b16000}, - {0x40b18000}, {0x40b1a000}, {0x40b1c000}, {0x40b1e000}, - {0x40b20000}, {0x40b22000}, {0x40b24000}, {0x40b26000}, - {0x40b28000}, {0x40b2a000}, {0x40b2c000}, {0x40b2e000}, - {0x40b30000}, {0x40b32000}, {0x40b34000}, {0x40b36000}, - {0x40b38000}, {0x40b3a000}, {0x40b3c000}, {0x40b3e000}, - {0x40b40000}, {0x40b42000}, {0x40b44000}, {0x40b46000}, - {0x40b48000}, {0x40b4a000}, {0x40b4c000}, {0x40b4e000}, - {0x40b50000}, {0x40b52000}, {0x40b54000}, {0x40b56000}, - {0x40b58000}, {0x40b5a000}, {0x40b5c000}, {0x40b5e000}, - {0x40b60000}, {0x40b62000}, {0x40b64000}, {0x40b66000}, - {0x40b68000}, {0x40b6a000}, {0x40b6c000}, {0x40b6e000}, - {0x40b70000}, {0x40b72000}, {0x40b74000}, {0x40b76000}, - {0x40b78000}, {0x40b7a000}, {0x40b7c000}, {0x40b7e000}, - {0x40b80000}, {0x40b82000}, {0x40b84000}, {0x40b86000}, - {0x40b88000}, {0x40b8a000}, {0x40b8c000}, {0x40b8e000}, - {0x40b90000}, {0x40b92000}, {0x40b94000}, {0x40b96000}, - {0x40b98000}, {0x40b9a000}, {0x40b9c000}, {0x40b9e000}, - {0x40ba0000}, {0x40ba2000}, {0x40ba4000}, {0x40ba6000}, - {0x40ba8000}, {0x40baa000}, {0x40bac000}, {0x40bae000}, - {0x40bb0000}, {0x40bb2000}, {0x40bb4000}, {0x40bb6000}, - {0x40bb8000}, {0x40bba000}, {0x40bbc000}, {0x40bbe000}, - {0x40bc0000}, {0x40bc2000}, {0x40bc4000}, {0x40bc6000}, - {0x40bc8000}, {0x40bca000}, {0x40bcc000}, {0x40bce000}, - {0x40bd0000}, {0x40bd2000}, {0x40bd4000}, {0x40bd6000}, - {0x40bd8000}, {0x40bda000}, {0x40bdc000}, {0x40bde000}, - {0x40be0000}, {0x40be2000}, {0x40be4000}, {0x40be6000}, - {0x40be8000}, {0x40bea000}, {0x40bec000}, {0x40bee000}, - {0x40bf0000}, {0x40bf2000}, {0x40bf4000}, {0x40bf6000}, - {0x40bf8000}, {0x40bfa000}, {0x40bfc000}, {0x40bfe000}, - {0x40c00000}, {0x40c02000}, {0x40c04000}, {0x40c06000}, - {0x40c08000}, {0x40c0a000}, {0x40c0c000}, {0x40c0e000}, - {0x40c10000}, {0x40c12000}, {0x40c14000}, {0x40c16000}, - {0x40c18000}, {0x40c1a000}, {0x40c1c000}, {0x40c1e000}, - {0x40c20000}, {0x40c22000}, {0x40c24000}, {0x40c26000}, - {0x40c28000}, {0x40c2a000}, {0x40c2c000}, {0x40c2e000}, - {0x40c30000}, {0x40c32000}, {0x40c34000}, {0x40c36000}, - {0x40c38000}, {0x40c3a000}, {0x40c3c000}, {0x40c3e000}, - {0x40c40000}, {0x40c42000}, {0x40c44000}, {0x40c46000}, - {0x40c48000}, {0x40c4a000}, {0x40c4c000}, {0x40c4e000}, - {0x40c50000}, {0x40c52000}, {0x40c54000}, {0x40c56000}, - {0x40c58000}, {0x40c5a000}, {0x40c5c000}, {0x40c5e000}, - {0x40c60000}, {0x40c62000}, {0x40c64000}, {0x40c66000}, - {0x40c68000}, {0x40c6a000}, {0x40c6c000}, {0x40c6e000}, - {0x40c70000}, {0x40c72000}, {0x40c74000}, {0x40c76000}, - {0x40c78000}, {0x40c7a000}, {0x40c7c000}, {0x40c7e000}, - {0x40c80000}, {0x40c82000}, {0x40c84000}, {0x40c86000}, - {0x40c88000}, {0x40c8a000}, {0x40c8c000}, {0x40c8e000}, - {0x40c90000}, {0x40c92000}, {0x40c94000}, {0x40c96000}, - {0x40c98000}, {0x40c9a000}, {0x40c9c000}, {0x40c9e000}, - {0x40ca0000}, {0x40ca2000}, {0x40ca4000}, {0x40ca6000}, - {0x40ca8000}, {0x40caa000}, {0x40cac000}, {0x40cae000}, - {0x40cb0000}, {0x40cb2000}, {0x40cb4000}, {0x40cb6000}, - {0x40cb8000}, {0x40cba000}, {0x40cbc000}, {0x40cbe000}, - {0x40cc0000}, {0x40cc2000}, {0x40cc4000}, {0x40cc6000}, - {0x40cc8000}, {0x40cca000}, {0x40ccc000}, {0x40cce000}, - {0x40cd0000}, {0x40cd2000}, {0x40cd4000}, {0x40cd6000}, - {0x40cd8000}, {0x40cda000}, {0x40cdc000}, {0x40cde000}, - {0x40ce0000}, {0x40ce2000}, {0x40ce4000}, {0x40ce6000}, - {0x40ce8000}, {0x40cea000}, {0x40cec000}, {0x40cee000}, - {0x40cf0000}, {0x40cf2000}, {0x40cf4000}, {0x40cf6000}, - {0x40cf8000}, {0x40cfa000}, {0x40cfc000}, {0x40cfe000}, - {0x40d00000}, {0x40d02000}, {0x40d04000}, {0x40d06000}, - {0x40d08000}, {0x40d0a000}, {0x40d0c000}, {0x40d0e000}, - {0x40d10000}, {0x40d12000}, {0x40d14000}, {0x40d16000}, - {0x40d18000}, {0x40d1a000}, {0x40d1c000}, {0x40d1e000}, - {0x40d20000}, {0x40d22000}, {0x40d24000}, {0x40d26000}, - {0x40d28000}, {0x40d2a000}, {0x40d2c000}, {0x40d2e000}, - {0x40d30000}, {0x40d32000}, {0x40d34000}, {0x40d36000}, - {0x40d38000}, {0x40d3a000}, {0x40d3c000}, {0x40d3e000}, - {0x40d40000}, {0x40d42000}, {0x40d44000}, {0x40d46000}, - {0x40d48000}, {0x40d4a000}, {0x40d4c000}, {0x40d4e000}, - {0x40d50000}, {0x40d52000}, {0x40d54000}, {0x40d56000}, - {0x40d58000}, {0x40d5a000}, {0x40d5c000}, {0x40d5e000}, - {0x40d60000}, {0x40d62000}, {0x40d64000}, {0x40d66000}, - {0x40d68000}, {0x40d6a000}, {0x40d6c000}, {0x40d6e000}, - {0x40d70000}, {0x40d72000}, {0x40d74000}, {0x40d76000}, - {0x40d78000}, {0x40d7a000}, {0x40d7c000}, {0x40d7e000}, - {0x40d80000}, {0x40d82000}, {0x40d84000}, {0x40d86000}, - {0x40d88000}, {0x40d8a000}, {0x40d8c000}, {0x40d8e000}, - {0x40d90000}, {0x40d92000}, {0x40d94000}, {0x40d96000}, - {0x40d98000}, {0x40d9a000}, {0x40d9c000}, {0x40d9e000}, - {0x40da0000}, {0x40da2000}, {0x40da4000}, {0x40da6000}, - {0x40da8000}, {0x40daa000}, {0x40dac000}, {0x40dae000}, - {0x40db0000}, {0x40db2000}, {0x40db4000}, {0x40db6000}, - {0x40db8000}, {0x40dba000}, {0x40dbc000}, {0x40dbe000}, - {0x40dc0000}, {0x40dc2000}, {0x40dc4000}, {0x40dc6000}, - {0x40dc8000}, {0x40dca000}, {0x40dcc000}, {0x40dce000}, - {0x40dd0000}, {0x40dd2000}, {0x40dd4000}, {0x40dd6000}, - {0x40dd8000}, {0x40dda000}, {0x40ddc000}, {0x40dde000}, - {0x40de0000}, {0x40de2000}, {0x40de4000}, {0x40de6000}, - {0x40de8000}, {0x40dea000}, {0x40dec000}, {0x40dee000}, - {0x40df0000}, {0x40df2000}, {0x40df4000}, {0x40df6000}, - {0x40df8000}, {0x40dfa000}, {0x40dfc000}, {0x40dfe000}, - {0x40e00000}, {0x40e02000}, {0x40e04000}, {0x40e06000}, - {0x40e08000}, {0x40e0a000}, {0x40e0c000}, {0x40e0e000}, - {0x40e10000}, {0x40e12000}, {0x40e14000}, {0x40e16000}, - {0x40e18000}, {0x40e1a000}, {0x40e1c000}, {0x40e1e000}, - {0x40e20000}, {0x40e22000}, {0x40e24000}, {0x40e26000}, - {0x40e28000}, {0x40e2a000}, {0x40e2c000}, {0x40e2e000}, - {0x40e30000}, {0x40e32000}, {0x40e34000}, {0x40e36000}, - {0x40e38000}, {0x40e3a000}, {0x40e3c000}, {0x40e3e000}, - {0x40e40000}, {0x40e42000}, {0x40e44000}, {0x40e46000}, - {0x40e48000}, {0x40e4a000}, {0x40e4c000}, {0x40e4e000}, - {0x40e50000}, {0x40e52000}, {0x40e54000}, {0x40e56000}, - {0x40e58000}, {0x40e5a000}, {0x40e5c000}, {0x40e5e000}, - {0x40e60000}, {0x40e62000}, {0x40e64000}, {0x40e66000}, - {0x40e68000}, {0x40e6a000}, {0x40e6c000}, {0x40e6e000}, - {0x40e70000}, {0x40e72000}, {0x40e74000}, {0x40e76000}, - {0x40e78000}, {0x40e7a000}, {0x40e7c000}, {0x40e7e000}, - {0x40e80000}, {0x40e82000}, {0x40e84000}, {0x40e86000}, - {0x40e88000}, {0x40e8a000}, {0x40e8c000}, {0x40e8e000}, - {0x40e90000}, {0x40e92000}, {0x40e94000}, {0x40e96000}, - {0x40e98000}, {0x40e9a000}, {0x40e9c000}, {0x40e9e000}, - {0x40ea0000}, {0x40ea2000}, {0x40ea4000}, {0x40ea6000}, - {0x40ea8000}, {0x40eaa000}, {0x40eac000}, {0x40eae000}, - {0x40eb0000}, {0x40eb2000}, {0x40eb4000}, {0x40eb6000}, - {0x40eb8000}, {0x40eba000}, {0x40ebc000}, {0x40ebe000}, - {0x40ec0000}, {0x40ec2000}, {0x40ec4000}, {0x40ec6000}, - {0x40ec8000}, {0x40eca000}, {0x40ecc000}, {0x40ece000}, - {0x40ed0000}, {0x40ed2000}, {0x40ed4000}, {0x40ed6000}, - {0x40ed8000}, {0x40eda000}, {0x40edc000}, {0x40ede000}, - {0x40ee0000}, {0x40ee2000}, {0x40ee4000}, {0x40ee6000}, - {0x40ee8000}, {0x40eea000}, {0x40eec000}, {0x40eee000}, - {0x40ef0000}, {0x40ef2000}, {0x40ef4000}, {0x40ef6000}, - {0x40ef8000}, {0x40efa000}, {0x40efc000}, {0x40efe000}, - {0x40f00000}, {0x40f02000}, {0x40f04000}, {0x40f06000}, - {0x40f08000}, {0x40f0a000}, {0x40f0c000}, {0x40f0e000}, - {0x40f10000}, {0x40f12000}, {0x40f14000}, {0x40f16000}, - {0x40f18000}, {0x40f1a000}, {0x40f1c000}, {0x40f1e000}, - {0x40f20000}, {0x40f22000}, {0x40f24000}, {0x40f26000}, - {0x40f28000}, {0x40f2a000}, {0x40f2c000}, {0x40f2e000}, - {0x40f30000}, {0x40f32000}, {0x40f34000}, {0x40f36000}, - {0x40f38000}, {0x40f3a000}, {0x40f3c000}, {0x40f3e000}, - {0x40f40000}, {0x40f42000}, {0x40f44000}, {0x40f46000}, - {0x40f48000}, {0x40f4a000}, {0x40f4c000}, {0x40f4e000}, - {0x40f50000}, {0x40f52000}, {0x40f54000}, {0x40f56000}, - {0x40f58000}, {0x40f5a000}, {0x40f5c000}, {0x40f5e000}, - {0x40f60000}, {0x40f62000}, {0x40f64000}, {0x40f66000}, - {0x40f68000}, {0x40f6a000}, {0x40f6c000}, {0x40f6e000}, - {0x40f70000}, {0x40f72000}, {0x40f74000}, {0x40f76000}, - {0x40f78000}, {0x40f7a000}, {0x40f7c000}, {0x40f7e000}, - {0x40f80000}, {0x40f82000}, {0x40f84000}, {0x40f86000}, - {0x40f88000}, {0x40f8a000}, {0x40f8c000}, {0x40f8e000}, - {0x40f90000}, {0x40f92000}, {0x40f94000}, {0x40f96000}, - {0x40f98000}, {0x40f9a000}, {0x40f9c000}, {0x40f9e000}, - {0x40fa0000}, {0x40fa2000}, {0x40fa4000}, {0x40fa6000}, - {0x40fa8000}, {0x40faa000}, {0x40fac000}, {0x40fae000}, - {0x40fb0000}, {0x40fb2000}, {0x40fb4000}, {0x40fb6000}, - {0x40fb8000}, {0x40fba000}, {0x40fbc000}, {0x40fbe000}, - {0x40fc0000}, {0x40fc2000}, {0x40fc4000}, {0x40fc6000}, - {0x40fc8000}, {0x40fca000}, {0x40fcc000}, {0x40fce000}, - {0x40fd0000}, {0x40fd2000}, {0x40fd4000}, {0x40fd6000}, - {0x40fd8000}, {0x40fda000}, {0x40fdc000}, {0x40fde000}, - {0x40fe0000}, {0x40fe2000}, {0x40fe4000}, {0x40fe6000}, - {0x40fe8000}, {0x40fea000}, {0x40fec000}, {0x40fee000}, - {0x40ff0000}, {0x40ff2000}, {0x40ff4000}, {0x40ff6000}, - {0x40ff8000}, {0x40ffa000}, {0x40ffc000}, {0x40ffe000}, - {0x41000000}, {0x41002000}, {0x41004000}, {0x41006000}, - {0x41008000}, {0x4100a000}, {0x4100c000}, {0x4100e000}, - {0x41010000}, {0x41012000}, {0x41014000}, {0x41016000}, - {0x41018000}, {0x4101a000}, {0x4101c000}, {0x4101e000}, - {0x41020000}, {0x41022000}, {0x41024000}, {0x41026000}, - {0x41028000}, {0x4102a000}, {0x4102c000}, {0x4102e000}, - {0x41030000}, {0x41032000}, {0x41034000}, {0x41036000}, - {0x41038000}, {0x4103a000}, {0x4103c000}, {0x4103e000}, - {0x41040000}, {0x41042000}, {0x41044000}, {0x41046000}, - {0x41048000}, {0x4104a000}, {0x4104c000}, {0x4104e000}, - {0x41050000}, {0x41052000}, {0x41054000}, {0x41056000}, - {0x41058000}, {0x4105a000}, {0x4105c000}, {0x4105e000}, - {0x41060000}, {0x41062000}, {0x41064000}, {0x41066000}, - {0x41068000}, {0x4106a000}, {0x4106c000}, {0x4106e000}, - {0x41070000}, {0x41072000}, {0x41074000}, {0x41076000}, - {0x41078000}, {0x4107a000}, {0x4107c000}, {0x4107e000}, - {0x41080000}, {0x41082000}, {0x41084000}, {0x41086000}, - {0x41088000}, {0x4108a000}, {0x4108c000}, {0x4108e000}, - {0x41090000}, {0x41092000}, {0x41094000}, {0x41096000}, - {0x41098000}, {0x4109a000}, {0x4109c000}, {0x4109e000}, - {0x410a0000}, {0x410a2000}, {0x410a4000}, {0x410a6000}, - {0x410a8000}, {0x410aa000}, {0x410ac000}, {0x410ae000}, - {0x410b0000}, {0x410b2000}, {0x410b4000}, {0x410b6000}, - {0x410b8000}, {0x410ba000}, {0x410bc000}, {0x410be000}, - {0x410c0000}, {0x410c2000}, {0x410c4000}, {0x410c6000}, - {0x410c8000}, {0x410ca000}, {0x410cc000}, {0x410ce000}, - {0x410d0000}, {0x410d2000}, {0x410d4000}, {0x410d6000}, - {0x410d8000}, {0x410da000}, {0x410dc000}, {0x410de000}, - {0x410e0000}, {0x410e2000}, {0x410e4000}, {0x410e6000}, - {0x410e8000}, {0x410ea000}, {0x410ec000}, {0x410ee000}, - {0x410f0000}, {0x410f2000}, {0x410f4000}, {0x410f6000}, - {0x410f8000}, {0x410fa000}, {0x410fc000}, {0x410fe000}, - {0x41100000}, {0x41102000}, {0x41104000}, {0x41106000}, - {0x41108000}, {0x4110a000}, {0x4110c000}, {0x4110e000}, - {0x41110000}, {0x41112000}, {0x41114000}, {0x41116000}, - {0x41118000}, {0x4111a000}, {0x4111c000}, {0x4111e000}, - {0x41120000}, {0x41122000}, {0x41124000}, {0x41126000}, - {0x41128000}, {0x4112a000}, {0x4112c000}, {0x4112e000}, - {0x41130000}, {0x41132000}, {0x41134000}, {0x41136000}, - {0x41138000}, {0x4113a000}, {0x4113c000}, {0x4113e000}, - {0x41140000}, {0x41142000}, {0x41144000}, {0x41146000}, - {0x41148000}, {0x4114a000}, {0x4114c000}, {0x4114e000}, - {0x41150000}, {0x41152000}, {0x41154000}, {0x41156000}, - {0x41158000}, {0x4115a000}, {0x4115c000}, {0x4115e000}, - {0x41160000}, {0x41162000}, {0x41164000}, {0x41166000}, - {0x41168000}, {0x4116a000}, {0x4116c000}, {0x4116e000}, - {0x41170000}, {0x41172000}, {0x41174000}, {0x41176000}, - {0x41178000}, {0x4117a000}, {0x4117c000}, {0x4117e000}, - {0x41180000}, {0x41182000}, {0x41184000}, {0x41186000}, - {0x41188000}, {0x4118a000}, {0x4118c000}, {0x4118e000}, - {0x41190000}, {0x41192000}, {0x41194000}, {0x41196000}, - {0x41198000}, {0x4119a000}, {0x4119c000}, {0x4119e000}, - {0x411a0000}, {0x411a2000}, {0x411a4000}, {0x411a6000}, - {0x411a8000}, {0x411aa000}, {0x411ac000}, {0x411ae000}, - {0x411b0000}, {0x411b2000}, {0x411b4000}, {0x411b6000}, - {0x411b8000}, {0x411ba000}, {0x411bc000}, {0x411be000}, - {0x411c0000}, {0x411c2000}, {0x411c4000}, {0x411c6000}, - {0x411c8000}, {0x411ca000}, {0x411cc000}, {0x411ce000}, - {0x411d0000}, {0x411d2000}, {0x411d4000}, {0x411d6000}, - {0x411d8000}, {0x411da000}, {0x411dc000}, {0x411de000}, - {0x411e0000}, {0x411e2000}, {0x411e4000}, {0x411e6000}, - {0x411e8000}, {0x411ea000}, {0x411ec000}, {0x411ee000}, - {0x411f0000}, {0x411f2000}, {0x411f4000}, {0x411f6000}, - {0x411f8000}, {0x411fa000}, {0x411fc000}, {0x411fe000}, - {0x41200000}, {0x41202000}, {0x41204000}, {0x41206000}, - {0x41208000}, {0x4120a000}, {0x4120c000}, {0x4120e000}, - {0x41210000}, {0x41212000}, {0x41214000}, {0x41216000}, - {0x41218000}, {0x4121a000}, {0x4121c000}, {0x4121e000}, - {0x41220000}, {0x41222000}, {0x41224000}, {0x41226000}, - {0x41228000}, {0x4122a000}, {0x4122c000}, {0x4122e000}, - {0x41230000}, {0x41232000}, {0x41234000}, {0x41236000}, - {0x41238000}, {0x4123a000}, {0x4123c000}, {0x4123e000}, - {0x41240000}, {0x41242000}, {0x41244000}, {0x41246000}, - {0x41248000}, {0x4124a000}, {0x4124c000}, {0x4124e000}, - {0x41250000}, {0x41252000}, {0x41254000}, {0x41256000}, - {0x41258000}, {0x4125a000}, {0x4125c000}, {0x4125e000}, - {0x41260000}, {0x41262000}, {0x41264000}, {0x41266000}, - {0x41268000}, {0x4126a000}, {0x4126c000}, {0x4126e000}, - {0x41270000}, {0x41272000}, {0x41274000}, {0x41276000}, - {0x41278000}, {0x4127a000}, {0x4127c000}, {0x4127e000}, - {0x41280000}, {0x41282000}, {0x41284000}, {0x41286000}, - {0x41288000}, {0x4128a000}, {0x4128c000}, {0x4128e000}, - {0x41290000}, {0x41292000}, {0x41294000}, {0x41296000}, - {0x41298000}, {0x4129a000}, {0x4129c000}, {0x4129e000}, - {0x412a0000}, {0x412a2000}, {0x412a4000}, {0x412a6000}, - {0x412a8000}, {0x412aa000}, {0x412ac000}, {0x412ae000}, - {0x412b0000}, {0x412b2000}, {0x412b4000}, {0x412b6000}, - {0x412b8000}, {0x412ba000}, {0x412bc000}, {0x412be000}, - {0x412c0000}, {0x412c2000}, {0x412c4000}, {0x412c6000}, - {0x412c8000}, {0x412ca000}, {0x412cc000}, {0x412ce000}, - {0x412d0000}, {0x412d2000}, {0x412d4000}, {0x412d6000}, - {0x412d8000}, {0x412da000}, {0x412dc000}, {0x412de000}, - {0x412e0000}, {0x412e2000}, {0x412e4000}, {0x412e6000}, - {0x412e8000}, {0x412ea000}, {0x412ec000}, {0x412ee000}, - {0x412f0000}, {0x412f2000}, {0x412f4000}, {0x412f6000}, - {0x412f8000}, {0x412fa000}, {0x412fc000}, {0x412fe000}, - {0x41300000}, {0x41302000}, {0x41304000}, {0x41306000}, - {0x41308000}, {0x4130a000}, {0x4130c000}, {0x4130e000}, - {0x41310000}, {0x41312000}, {0x41314000}, {0x41316000}, - {0x41318000}, {0x4131a000}, {0x4131c000}, {0x4131e000}, - {0x41320000}, {0x41322000}, {0x41324000}, {0x41326000}, - {0x41328000}, {0x4132a000}, {0x4132c000}, {0x4132e000}, - {0x41330000}, {0x41332000}, {0x41334000}, {0x41336000}, - {0x41338000}, {0x4133a000}, {0x4133c000}, {0x4133e000}, - {0x41340000}, {0x41342000}, {0x41344000}, {0x41346000}, - {0x41348000}, {0x4134a000}, {0x4134c000}, {0x4134e000}, - {0x41350000}, {0x41352000}, {0x41354000}, {0x41356000}, - {0x41358000}, {0x4135a000}, {0x4135c000}, {0x4135e000}, - {0x41360000}, {0x41362000}, {0x41364000}, {0x41366000}, - {0x41368000}, {0x4136a000}, {0x4136c000}, {0x4136e000}, - {0x41370000}, {0x41372000}, {0x41374000}, {0x41376000}, - {0x41378000}, {0x4137a000}, {0x4137c000}, {0x4137e000}, - {0x41380000}, {0x41382000}, {0x41384000}, {0x41386000}, - {0x41388000}, {0x4138a000}, {0x4138c000}, {0x4138e000}, - {0x41390000}, {0x41392000}, {0x41394000}, {0x41396000}, - {0x41398000}, {0x4139a000}, {0x4139c000}, {0x4139e000}, - {0x413a0000}, {0x413a2000}, {0x413a4000}, {0x413a6000}, - {0x413a8000}, {0x413aa000}, {0x413ac000}, {0x413ae000}, - {0x413b0000}, {0x413b2000}, {0x413b4000}, {0x413b6000}, - {0x413b8000}, {0x413ba000}, {0x413bc000}, {0x413be000}, - {0x413c0000}, {0x413c2000}, {0x413c4000}, {0x413c6000}, - {0x413c8000}, {0x413ca000}, {0x413cc000}, {0x413ce000}, - {0x413d0000}, {0x413d2000}, {0x413d4000}, {0x413d6000}, - {0x413d8000}, {0x413da000}, {0x413dc000}, {0x413de000}, - {0x413e0000}, {0x413e2000}, {0x413e4000}, {0x413e6000}, - {0x413e8000}, {0x413ea000}, {0x413ec000}, {0x413ee000}, - {0x413f0000}, {0x413f2000}, {0x413f4000}, {0x413f6000}, - {0x413f8000}, {0x413fa000}, {0x413fc000}, {0x413fe000}, - {0x41400000}, {0x41402000}, {0x41404000}, {0x41406000}, - {0x41408000}, {0x4140a000}, {0x4140c000}, {0x4140e000}, - {0x41410000}, {0x41412000}, {0x41414000}, {0x41416000}, - {0x41418000}, {0x4141a000}, {0x4141c000}, {0x4141e000}, - {0x41420000}, {0x41422000}, {0x41424000}, {0x41426000}, - {0x41428000}, {0x4142a000}, {0x4142c000}, {0x4142e000}, - {0x41430000}, {0x41432000}, {0x41434000}, {0x41436000}, - {0x41438000}, {0x4143a000}, {0x4143c000}, {0x4143e000}, - {0x41440000}, {0x41442000}, {0x41444000}, {0x41446000}, - {0x41448000}, {0x4144a000}, {0x4144c000}, {0x4144e000}, - {0x41450000}, {0x41452000}, {0x41454000}, {0x41456000}, - {0x41458000}, {0x4145a000}, {0x4145c000}, {0x4145e000}, - {0x41460000}, {0x41462000}, {0x41464000}, {0x41466000}, - {0x41468000}, {0x4146a000}, {0x4146c000}, {0x4146e000}, - {0x41470000}, {0x41472000}, {0x41474000}, {0x41476000}, - {0x41478000}, {0x4147a000}, {0x4147c000}, {0x4147e000}, - {0x41480000}, {0x41482000}, {0x41484000}, {0x41486000}, - {0x41488000}, {0x4148a000}, {0x4148c000}, {0x4148e000}, - {0x41490000}, {0x41492000}, {0x41494000}, {0x41496000}, - {0x41498000}, {0x4149a000}, {0x4149c000}, {0x4149e000}, - {0x414a0000}, {0x414a2000}, {0x414a4000}, {0x414a6000}, - {0x414a8000}, {0x414aa000}, {0x414ac000}, {0x414ae000}, - {0x414b0000}, {0x414b2000}, {0x414b4000}, {0x414b6000}, - {0x414b8000}, {0x414ba000}, {0x414bc000}, {0x414be000}, - {0x414c0000}, {0x414c2000}, {0x414c4000}, {0x414c6000}, - {0x414c8000}, {0x414ca000}, {0x414cc000}, {0x414ce000}, - {0x414d0000}, {0x414d2000}, {0x414d4000}, {0x414d6000}, - {0x414d8000}, {0x414da000}, {0x414dc000}, {0x414de000}, - {0x414e0000}, {0x414e2000}, {0x414e4000}, {0x414e6000}, - {0x414e8000}, {0x414ea000}, {0x414ec000}, {0x414ee000}, - {0x414f0000}, {0x414f2000}, {0x414f4000}, {0x414f6000}, - {0x414f8000}, {0x414fa000}, {0x414fc000}, {0x414fe000}, - {0x41500000}, {0x41502000}, {0x41504000}, {0x41506000}, - {0x41508000}, {0x4150a000}, {0x4150c000}, {0x4150e000}, - {0x41510000}, {0x41512000}, {0x41514000}, {0x41516000}, - {0x41518000}, {0x4151a000}, {0x4151c000}, {0x4151e000}, - {0x41520000}, {0x41522000}, {0x41524000}, {0x41526000}, - {0x41528000}, {0x4152a000}, {0x4152c000}, {0x4152e000}, - {0x41530000}, {0x41532000}, {0x41534000}, {0x41536000}, - {0x41538000}, {0x4153a000}, {0x4153c000}, {0x4153e000}, - {0x41540000}, {0x41542000}, {0x41544000}, {0x41546000}, - {0x41548000}, {0x4154a000}, {0x4154c000}, {0x4154e000}, - {0x41550000}, {0x41552000}, {0x41554000}, {0x41556000}, - {0x41558000}, {0x4155a000}, {0x4155c000}, {0x4155e000}, - {0x41560000}, {0x41562000}, {0x41564000}, {0x41566000}, - {0x41568000}, {0x4156a000}, {0x4156c000}, {0x4156e000}, - {0x41570000}, {0x41572000}, {0x41574000}, {0x41576000}, - {0x41578000}, {0x4157a000}, {0x4157c000}, {0x4157e000}, - {0x41580000}, {0x41582000}, {0x41584000}, {0x41586000}, - {0x41588000}, {0x4158a000}, {0x4158c000}, {0x4158e000}, - {0x41590000}, {0x41592000}, {0x41594000}, {0x41596000}, - {0x41598000}, {0x4159a000}, {0x4159c000}, {0x4159e000}, - {0x415a0000}, {0x415a2000}, {0x415a4000}, {0x415a6000}, - {0x415a8000}, {0x415aa000}, {0x415ac000}, {0x415ae000}, - {0x415b0000}, {0x415b2000}, {0x415b4000}, {0x415b6000}, - {0x415b8000}, {0x415ba000}, {0x415bc000}, {0x415be000}, - {0x415c0000}, {0x415c2000}, {0x415c4000}, {0x415c6000}, - {0x415c8000}, {0x415ca000}, {0x415cc000}, {0x415ce000}, - {0x415d0000}, {0x415d2000}, {0x415d4000}, {0x415d6000}, - {0x415d8000}, {0x415da000}, {0x415dc000}, {0x415de000}, - {0x415e0000}, {0x415e2000}, {0x415e4000}, {0x415e6000}, - {0x415e8000}, {0x415ea000}, {0x415ec000}, {0x415ee000}, - {0x415f0000}, {0x415f2000}, {0x415f4000}, {0x415f6000}, - {0x415f8000}, {0x415fa000}, {0x415fc000}, {0x415fe000}, - {0x41600000}, {0x41602000}, {0x41604000}, {0x41606000}, - {0x41608000}, {0x4160a000}, {0x4160c000}, {0x4160e000}, - {0x41610000}, {0x41612000}, {0x41614000}, {0x41616000}, - {0x41618000}, {0x4161a000}, {0x4161c000}, {0x4161e000}, - {0x41620000}, {0x41622000}, {0x41624000}, {0x41626000}, - {0x41628000}, {0x4162a000}, {0x4162c000}, {0x4162e000}, - {0x41630000}, {0x41632000}, {0x41634000}, {0x41636000}, - {0x41638000}, {0x4163a000}, {0x4163c000}, {0x4163e000}, - {0x41640000}, {0x41642000}, {0x41644000}, {0x41646000}, - {0x41648000}, {0x4164a000}, {0x4164c000}, {0x4164e000}, - {0x41650000}, {0x41652000}, {0x41654000}, {0x41656000}, - {0x41658000}, {0x4165a000}, {0x4165c000}, {0x4165e000}, - {0x41660000}, {0x41662000}, {0x41664000}, {0x41666000}, - {0x41668000}, {0x4166a000}, {0x4166c000}, {0x4166e000}, - {0x41670000}, {0x41672000}, {0x41674000}, {0x41676000}, - {0x41678000}, {0x4167a000}, {0x4167c000}, {0x4167e000}, - {0x41680000}, {0x41682000}, {0x41684000}, {0x41686000}, - {0x41688000}, {0x4168a000}, {0x4168c000}, {0x4168e000}, - {0x41690000}, {0x41692000}, {0x41694000}, {0x41696000}, - {0x41698000}, {0x4169a000}, {0x4169c000}, {0x4169e000}, - {0x416a0000}, {0x416a2000}, {0x416a4000}, {0x416a6000}, - {0x416a8000}, {0x416aa000}, {0x416ac000}, {0x416ae000}, - {0x416b0000}, {0x416b2000}, {0x416b4000}, {0x416b6000}, - {0x416b8000}, {0x416ba000}, {0x416bc000}, {0x416be000}, - {0x416c0000}, {0x416c2000}, {0x416c4000}, {0x416c6000}, - {0x416c8000}, {0x416ca000}, {0x416cc000}, {0x416ce000}, - {0x416d0000}, {0x416d2000}, {0x416d4000}, {0x416d6000}, - {0x416d8000}, {0x416da000}, {0x416dc000}, {0x416de000}, - {0x416e0000}, {0x416e2000}, {0x416e4000}, {0x416e6000}, - {0x416e8000}, {0x416ea000}, {0x416ec000}, {0x416ee000}, - {0x416f0000}, {0x416f2000}, {0x416f4000}, {0x416f6000}, - {0x416f8000}, {0x416fa000}, {0x416fc000}, {0x416fe000}, - {0x41700000}, {0x41702000}, {0x41704000}, {0x41706000}, - {0x41708000}, {0x4170a000}, {0x4170c000}, {0x4170e000}, - {0x41710000}, {0x41712000}, {0x41714000}, {0x41716000}, - {0x41718000}, {0x4171a000}, {0x4171c000}, {0x4171e000}, - {0x41720000}, {0x41722000}, {0x41724000}, {0x41726000}, - {0x41728000}, {0x4172a000}, {0x4172c000}, {0x4172e000}, - {0x41730000}, {0x41732000}, {0x41734000}, {0x41736000}, - {0x41738000}, {0x4173a000}, {0x4173c000}, {0x4173e000}, - {0x41740000}, {0x41742000}, {0x41744000}, {0x41746000}, - {0x41748000}, {0x4174a000}, {0x4174c000}, {0x4174e000}, - {0x41750000}, {0x41752000}, {0x41754000}, {0x41756000}, - {0x41758000}, {0x4175a000}, {0x4175c000}, {0x4175e000}, - {0x41760000}, {0x41762000}, {0x41764000}, {0x41766000}, - {0x41768000}, {0x4176a000}, {0x4176c000}, {0x4176e000}, - {0x41770000}, {0x41772000}, {0x41774000}, {0x41776000}, - {0x41778000}, {0x4177a000}, {0x4177c000}, {0x4177e000}, - {0x41780000}, {0x41782000}, {0x41784000}, {0x41786000}, - {0x41788000}, {0x4178a000}, {0x4178c000}, {0x4178e000}, - {0x41790000}, {0x41792000}, {0x41794000}, {0x41796000}, - {0x41798000}, {0x4179a000}, {0x4179c000}, {0x4179e000}, - {0x417a0000}, {0x417a2000}, {0x417a4000}, {0x417a6000}, - {0x417a8000}, {0x417aa000}, {0x417ac000}, {0x417ae000}, - {0x417b0000}, {0x417b2000}, {0x417b4000}, {0x417b6000}, - {0x417b8000}, {0x417ba000}, {0x417bc000}, {0x417be000}, - {0x417c0000}, {0x417c2000}, {0x417c4000}, {0x417c6000}, - {0x417c8000}, {0x417ca000}, {0x417cc000}, {0x417ce000}, - {0x417d0000}, {0x417d2000}, {0x417d4000}, {0x417d6000}, - {0x417d8000}, {0x417da000}, {0x417dc000}, {0x417de000}, - {0x417e0000}, {0x417e2000}, {0x417e4000}, {0x417e6000}, - {0x417e8000}, {0x417ea000}, {0x417ec000}, {0x417ee000}, - {0x417f0000}, {0x417f2000}, {0x417f4000}, {0x417f6000}, - {0x417f8000}, {0x417fa000}, {0x417fc000}, {0x417fe000}, - {0x41800000}, {0x41802000}, {0x41804000}, {0x41806000}, - {0x41808000}, {0x4180a000}, {0x4180c000}, {0x4180e000}, - {0x41810000}, {0x41812000}, {0x41814000}, {0x41816000}, - {0x41818000}, {0x4181a000}, {0x4181c000}, {0x4181e000}, - {0x41820000}, {0x41822000}, {0x41824000}, {0x41826000}, - {0x41828000}, {0x4182a000}, {0x4182c000}, {0x4182e000}, - {0x41830000}, {0x41832000}, {0x41834000}, {0x41836000}, - {0x41838000}, {0x4183a000}, {0x4183c000}, {0x4183e000}, - {0x41840000}, {0x41842000}, {0x41844000}, {0x41846000}, - {0x41848000}, {0x4184a000}, {0x4184c000}, {0x4184e000}, - {0x41850000}, {0x41852000}, {0x41854000}, {0x41856000}, - {0x41858000}, {0x4185a000}, {0x4185c000}, {0x4185e000}, - {0x41860000}, {0x41862000}, {0x41864000}, {0x41866000}, - {0x41868000}, {0x4186a000}, {0x4186c000}, {0x4186e000}, - {0x41870000}, {0x41872000}, {0x41874000}, {0x41876000}, - {0x41878000}, {0x4187a000}, {0x4187c000}, {0x4187e000}, - {0x41880000}, {0x41882000}, {0x41884000}, {0x41886000}, - {0x41888000}, {0x4188a000}, {0x4188c000}, {0x4188e000}, - {0x41890000}, {0x41892000}, {0x41894000}, {0x41896000}, - {0x41898000}, {0x4189a000}, {0x4189c000}, {0x4189e000}, - {0x418a0000}, {0x418a2000}, {0x418a4000}, {0x418a6000}, - {0x418a8000}, {0x418aa000}, {0x418ac000}, {0x418ae000}, - {0x418b0000}, {0x418b2000}, {0x418b4000}, {0x418b6000}, - {0x418b8000}, {0x418ba000}, {0x418bc000}, {0x418be000}, - {0x418c0000}, {0x418c2000}, {0x418c4000}, {0x418c6000}, - {0x418c8000}, {0x418ca000}, {0x418cc000}, {0x418ce000}, - {0x418d0000}, {0x418d2000}, {0x418d4000}, {0x418d6000}, - {0x418d8000}, {0x418da000}, {0x418dc000}, {0x418de000}, - {0x418e0000}, {0x418e2000}, {0x418e4000}, {0x418e6000}, - {0x418e8000}, {0x418ea000}, {0x418ec000}, {0x418ee000}, - {0x418f0000}, {0x418f2000}, {0x418f4000}, {0x418f6000}, - {0x418f8000}, {0x418fa000}, {0x418fc000}, {0x418fe000}, - {0x41900000}, {0x41902000}, {0x41904000}, {0x41906000}, - {0x41908000}, {0x4190a000}, {0x4190c000}, {0x4190e000}, - {0x41910000}, {0x41912000}, {0x41914000}, {0x41916000}, - {0x41918000}, {0x4191a000}, {0x4191c000}, {0x4191e000}, - {0x41920000}, {0x41922000}, {0x41924000}, {0x41926000}, - {0x41928000}, {0x4192a000}, {0x4192c000}, {0x4192e000}, - {0x41930000}, {0x41932000}, {0x41934000}, {0x41936000}, - {0x41938000}, {0x4193a000}, {0x4193c000}, {0x4193e000}, - {0x41940000}, {0x41942000}, {0x41944000}, {0x41946000}, - {0x41948000}, {0x4194a000}, {0x4194c000}, {0x4194e000}, - {0x41950000}, {0x41952000}, {0x41954000}, {0x41956000}, - {0x41958000}, {0x4195a000}, {0x4195c000}, {0x4195e000}, - {0x41960000}, {0x41962000}, {0x41964000}, {0x41966000}, - {0x41968000}, {0x4196a000}, {0x4196c000}, {0x4196e000}, - {0x41970000}, {0x41972000}, {0x41974000}, {0x41976000}, - {0x41978000}, {0x4197a000}, {0x4197c000}, {0x4197e000}, - {0x41980000}, {0x41982000}, {0x41984000}, {0x41986000}, - {0x41988000}, {0x4198a000}, {0x4198c000}, {0x4198e000}, - {0x41990000}, {0x41992000}, {0x41994000}, {0x41996000}, - {0x41998000}, {0x4199a000}, {0x4199c000}, {0x4199e000}, - {0x419a0000}, {0x419a2000}, {0x419a4000}, {0x419a6000}, - {0x419a8000}, {0x419aa000}, {0x419ac000}, {0x419ae000}, - {0x419b0000}, {0x419b2000}, {0x419b4000}, {0x419b6000}, - {0x419b8000}, {0x419ba000}, {0x419bc000}, {0x419be000}, - {0x419c0000}, {0x419c2000}, {0x419c4000}, {0x419c6000}, - {0x419c8000}, {0x419ca000}, {0x419cc000}, {0x419ce000}, - {0x419d0000}, {0x419d2000}, {0x419d4000}, {0x419d6000}, - {0x419d8000}, {0x419da000}, {0x419dc000}, {0x419de000}, - {0x419e0000}, {0x419e2000}, {0x419e4000}, {0x419e6000}, - {0x419e8000}, {0x419ea000}, {0x419ec000}, {0x419ee000}, - {0x419f0000}, {0x419f2000}, {0x419f4000}, {0x419f6000}, - {0x419f8000}, {0x419fa000}, {0x419fc000}, {0x419fe000}, - {0x41a00000}, {0x41a02000}, {0x41a04000}, {0x41a06000}, - {0x41a08000}, {0x41a0a000}, {0x41a0c000}, {0x41a0e000}, - {0x41a10000}, {0x41a12000}, {0x41a14000}, {0x41a16000}, - {0x41a18000}, {0x41a1a000}, {0x41a1c000}, {0x41a1e000}, - {0x41a20000}, {0x41a22000}, {0x41a24000}, {0x41a26000}, - {0x41a28000}, {0x41a2a000}, {0x41a2c000}, {0x41a2e000}, - {0x41a30000}, {0x41a32000}, {0x41a34000}, {0x41a36000}, - {0x41a38000}, {0x41a3a000}, {0x41a3c000}, {0x41a3e000}, - {0x41a40000}, {0x41a42000}, {0x41a44000}, {0x41a46000}, - {0x41a48000}, {0x41a4a000}, {0x41a4c000}, {0x41a4e000}, - {0x41a50000}, {0x41a52000}, {0x41a54000}, {0x41a56000}, - {0x41a58000}, {0x41a5a000}, {0x41a5c000}, {0x41a5e000}, - {0x41a60000}, {0x41a62000}, {0x41a64000}, {0x41a66000}, - {0x41a68000}, {0x41a6a000}, {0x41a6c000}, {0x41a6e000}, - {0x41a70000}, {0x41a72000}, {0x41a74000}, {0x41a76000}, - {0x41a78000}, {0x41a7a000}, {0x41a7c000}, {0x41a7e000}, - {0x41a80000}, {0x41a82000}, {0x41a84000}, {0x41a86000}, - {0x41a88000}, {0x41a8a000}, {0x41a8c000}, {0x41a8e000}, - {0x41a90000}, {0x41a92000}, {0x41a94000}, {0x41a96000}, - {0x41a98000}, {0x41a9a000}, {0x41a9c000}, {0x41a9e000}, - {0x41aa0000}, {0x41aa2000}, {0x41aa4000}, {0x41aa6000}, - {0x41aa8000}, {0x41aaa000}, {0x41aac000}, {0x41aae000}, - {0x41ab0000}, {0x41ab2000}, {0x41ab4000}, {0x41ab6000}, - {0x41ab8000}, {0x41aba000}, {0x41abc000}, {0x41abe000}, - {0x41ac0000}, {0x41ac2000}, {0x41ac4000}, {0x41ac6000}, - {0x41ac8000}, {0x41aca000}, {0x41acc000}, {0x41ace000}, - {0x41ad0000}, {0x41ad2000}, {0x41ad4000}, {0x41ad6000}, - {0x41ad8000}, {0x41ada000}, {0x41adc000}, {0x41ade000}, - {0x41ae0000}, {0x41ae2000}, {0x41ae4000}, {0x41ae6000}, - {0x41ae8000}, {0x41aea000}, {0x41aec000}, {0x41aee000}, - {0x41af0000}, {0x41af2000}, {0x41af4000}, {0x41af6000}, - {0x41af8000}, {0x41afa000}, {0x41afc000}, {0x41afe000}, - {0x41b00000}, {0x41b02000}, {0x41b04000}, {0x41b06000}, - {0x41b08000}, {0x41b0a000}, {0x41b0c000}, {0x41b0e000}, - {0x41b10000}, {0x41b12000}, {0x41b14000}, {0x41b16000}, - {0x41b18000}, {0x41b1a000}, {0x41b1c000}, {0x41b1e000}, - {0x41b20000}, {0x41b22000}, {0x41b24000}, {0x41b26000}, - {0x41b28000}, {0x41b2a000}, {0x41b2c000}, {0x41b2e000}, - {0x41b30000}, {0x41b32000}, {0x41b34000}, {0x41b36000}, - {0x41b38000}, {0x41b3a000}, {0x41b3c000}, {0x41b3e000}, - {0x41b40000}, {0x41b42000}, {0x41b44000}, {0x41b46000}, - {0x41b48000}, {0x41b4a000}, {0x41b4c000}, {0x41b4e000}, - {0x41b50000}, {0x41b52000}, {0x41b54000}, {0x41b56000}, - {0x41b58000}, {0x41b5a000}, {0x41b5c000}, {0x41b5e000}, - {0x41b60000}, {0x41b62000}, {0x41b64000}, {0x41b66000}, - {0x41b68000}, {0x41b6a000}, {0x41b6c000}, {0x41b6e000}, - {0x41b70000}, {0x41b72000}, {0x41b74000}, {0x41b76000}, - {0x41b78000}, {0x41b7a000}, {0x41b7c000}, {0x41b7e000}, - {0x41b80000}, {0x41b82000}, {0x41b84000}, {0x41b86000}, - {0x41b88000}, {0x41b8a000}, {0x41b8c000}, {0x41b8e000}, - {0x41b90000}, {0x41b92000}, {0x41b94000}, {0x41b96000}, - {0x41b98000}, {0x41b9a000}, {0x41b9c000}, {0x41b9e000}, - {0x41ba0000}, {0x41ba2000}, {0x41ba4000}, {0x41ba6000}, - {0x41ba8000}, {0x41baa000}, {0x41bac000}, {0x41bae000}, - {0x41bb0000}, {0x41bb2000}, {0x41bb4000}, {0x41bb6000}, - {0x41bb8000}, {0x41bba000}, {0x41bbc000}, {0x41bbe000}, - {0x41bc0000}, {0x41bc2000}, {0x41bc4000}, {0x41bc6000}, - {0x41bc8000}, {0x41bca000}, {0x41bcc000}, {0x41bce000}, - {0x41bd0000}, {0x41bd2000}, {0x41bd4000}, {0x41bd6000}, - {0x41bd8000}, {0x41bda000}, {0x41bdc000}, {0x41bde000}, - {0x41be0000}, {0x41be2000}, {0x41be4000}, {0x41be6000}, - {0x41be8000}, {0x41bea000}, {0x41bec000}, {0x41bee000}, - {0x41bf0000}, {0x41bf2000}, {0x41bf4000}, {0x41bf6000}, - {0x41bf8000}, {0x41bfa000}, {0x41bfc000}, {0x41bfe000}, - {0x41c00000}, {0x41c02000}, {0x41c04000}, {0x41c06000}, - {0x41c08000}, {0x41c0a000}, {0x41c0c000}, {0x41c0e000}, - {0x41c10000}, {0x41c12000}, {0x41c14000}, {0x41c16000}, - {0x41c18000}, {0x41c1a000}, {0x41c1c000}, {0x41c1e000}, - {0x41c20000}, {0x41c22000}, {0x41c24000}, {0x41c26000}, - {0x41c28000}, {0x41c2a000}, {0x41c2c000}, {0x41c2e000}, - {0x41c30000}, {0x41c32000}, {0x41c34000}, {0x41c36000}, - {0x41c38000}, {0x41c3a000}, {0x41c3c000}, {0x41c3e000}, - {0x41c40000}, {0x41c42000}, {0x41c44000}, {0x41c46000}, - {0x41c48000}, {0x41c4a000}, {0x41c4c000}, {0x41c4e000}, - {0x41c50000}, {0x41c52000}, {0x41c54000}, {0x41c56000}, - {0x41c58000}, {0x41c5a000}, {0x41c5c000}, {0x41c5e000}, - {0x41c60000}, {0x41c62000}, {0x41c64000}, {0x41c66000}, - {0x41c68000}, {0x41c6a000}, {0x41c6c000}, {0x41c6e000}, - {0x41c70000}, {0x41c72000}, {0x41c74000}, {0x41c76000}, - {0x41c78000}, {0x41c7a000}, {0x41c7c000}, {0x41c7e000}, - {0x41c80000}, {0x41c82000}, {0x41c84000}, {0x41c86000}, - {0x41c88000}, {0x41c8a000}, {0x41c8c000}, {0x41c8e000}, - {0x41c90000}, {0x41c92000}, {0x41c94000}, {0x41c96000}, - {0x41c98000}, {0x41c9a000}, {0x41c9c000}, {0x41c9e000}, - {0x41ca0000}, {0x41ca2000}, {0x41ca4000}, {0x41ca6000}, - {0x41ca8000}, {0x41caa000}, {0x41cac000}, {0x41cae000}, - {0x41cb0000}, {0x41cb2000}, {0x41cb4000}, {0x41cb6000}, - {0x41cb8000}, {0x41cba000}, {0x41cbc000}, {0x41cbe000}, - {0x41cc0000}, {0x41cc2000}, {0x41cc4000}, {0x41cc6000}, - {0x41cc8000}, {0x41cca000}, {0x41ccc000}, {0x41cce000}, - {0x41cd0000}, {0x41cd2000}, {0x41cd4000}, {0x41cd6000}, - {0x41cd8000}, {0x41cda000}, {0x41cdc000}, {0x41cde000}, - {0x41ce0000}, {0x41ce2000}, {0x41ce4000}, {0x41ce6000}, - {0x41ce8000}, {0x41cea000}, {0x41cec000}, {0x41cee000}, - {0x41cf0000}, {0x41cf2000}, {0x41cf4000}, {0x41cf6000}, - {0x41cf8000}, {0x41cfa000}, {0x41cfc000}, {0x41cfe000}, - {0x41d00000}, {0x41d02000}, {0x41d04000}, {0x41d06000}, - {0x41d08000}, {0x41d0a000}, {0x41d0c000}, {0x41d0e000}, - {0x41d10000}, {0x41d12000}, {0x41d14000}, {0x41d16000}, - {0x41d18000}, {0x41d1a000}, {0x41d1c000}, {0x41d1e000}, - {0x41d20000}, {0x41d22000}, {0x41d24000}, {0x41d26000}, - {0x41d28000}, {0x41d2a000}, {0x41d2c000}, {0x41d2e000}, - {0x41d30000}, {0x41d32000}, {0x41d34000}, {0x41d36000}, - {0x41d38000}, {0x41d3a000}, {0x41d3c000}, {0x41d3e000}, - {0x41d40000}, {0x41d42000}, {0x41d44000}, {0x41d46000}, - {0x41d48000}, {0x41d4a000}, {0x41d4c000}, {0x41d4e000}, - {0x41d50000}, {0x41d52000}, {0x41d54000}, {0x41d56000}, - {0x41d58000}, {0x41d5a000}, {0x41d5c000}, {0x41d5e000}, - {0x41d60000}, {0x41d62000}, {0x41d64000}, {0x41d66000}, - {0x41d68000}, {0x41d6a000}, {0x41d6c000}, {0x41d6e000}, - {0x41d70000}, {0x41d72000}, {0x41d74000}, {0x41d76000}, - {0x41d78000}, {0x41d7a000}, {0x41d7c000}, {0x41d7e000}, - {0x41d80000}, {0x41d82000}, {0x41d84000}, {0x41d86000}, - {0x41d88000}, {0x41d8a000}, {0x41d8c000}, {0x41d8e000}, - {0x41d90000}, {0x41d92000}, {0x41d94000}, {0x41d96000}, - {0x41d98000}, {0x41d9a000}, {0x41d9c000}, {0x41d9e000}, - {0x41da0000}, {0x41da2000}, {0x41da4000}, {0x41da6000}, - {0x41da8000}, {0x41daa000}, {0x41dac000}, {0x41dae000}, - {0x41db0000}, {0x41db2000}, {0x41db4000}, {0x41db6000}, - {0x41db8000}, {0x41dba000}, {0x41dbc000}, {0x41dbe000}, - {0x41dc0000}, {0x41dc2000}, {0x41dc4000}, {0x41dc6000}, - {0x41dc8000}, {0x41dca000}, {0x41dcc000}, {0x41dce000}, - {0x41dd0000}, {0x41dd2000}, {0x41dd4000}, {0x41dd6000}, - {0x41dd8000}, {0x41dda000}, {0x41ddc000}, {0x41dde000}, - {0x41de0000}, {0x41de2000}, {0x41de4000}, {0x41de6000}, - {0x41de8000}, {0x41dea000}, {0x41dec000}, {0x41dee000}, - {0x41df0000}, {0x41df2000}, {0x41df4000}, {0x41df6000}, - {0x41df8000}, {0x41dfa000}, {0x41dfc000}, {0x41dfe000}, - {0x41e00000}, {0x41e02000}, {0x41e04000}, {0x41e06000}, - {0x41e08000}, {0x41e0a000}, {0x41e0c000}, {0x41e0e000}, - {0x41e10000}, {0x41e12000}, {0x41e14000}, {0x41e16000}, - {0x41e18000}, {0x41e1a000}, {0x41e1c000}, {0x41e1e000}, - {0x41e20000}, {0x41e22000}, {0x41e24000}, {0x41e26000}, - {0x41e28000}, {0x41e2a000}, {0x41e2c000}, {0x41e2e000}, - {0x41e30000}, {0x41e32000}, {0x41e34000}, {0x41e36000}, - {0x41e38000}, {0x41e3a000}, {0x41e3c000}, {0x41e3e000}, - {0x41e40000}, {0x41e42000}, {0x41e44000}, {0x41e46000}, - {0x41e48000}, {0x41e4a000}, {0x41e4c000}, {0x41e4e000}, - {0x41e50000}, {0x41e52000}, {0x41e54000}, {0x41e56000}, - {0x41e58000}, {0x41e5a000}, {0x41e5c000}, {0x41e5e000}, - {0x41e60000}, {0x41e62000}, {0x41e64000}, {0x41e66000}, - {0x41e68000}, {0x41e6a000}, {0x41e6c000}, {0x41e6e000}, - {0x41e70000}, {0x41e72000}, {0x41e74000}, {0x41e76000}, - {0x41e78000}, {0x41e7a000}, {0x41e7c000}, {0x41e7e000}, - {0x41e80000}, {0x41e82000}, {0x41e84000}, {0x41e86000}, - {0x41e88000}, {0x41e8a000}, {0x41e8c000}, {0x41e8e000}, - {0x41e90000}, {0x41e92000}, {0x41e94000}, {0x41e96000}, - {0x41e98000}, {0x41e9a000}, {0x41e9c000}, {0x41e9e000}, - {0x41ea0000}, {0x41ea2000}, {0x41ea4000}, {0x41ea6000}, - {0x41ea8000}, {0x41eaa000}, {0x41eac000}, {0x41eae000}, - {0x41eb0000}, {0x41eb2000}, {0x41eb4000}, {0x41eb6000}, - {0x41eb8000}, {0x41eba000}, {0x41ebc000}, {0x41ebe000}, - {0x41ec0000}, {0x41ec2000}, {0x41ec4000}, {0x41ec6000}, - {0x41ec8000}, {0x41eca000}, {0x41ecc000}, {0x41ece000}, - {0x41ed0000}, {0x41ed2000}, {0x41ed4000}, {0x41ed6000}, - {0x41ed8000}, {0x41eda000}, {0x41edc000}, {0x41ede000}, - {0x41ee0000}, {0x41ee2000}, {0x41ee4000}, {0x41ee6000}, - {0x41ee8000}, {0x41eea000}, {0x41eec000}, {0x41eee000}, - {0x41ef0000}, {0x41ef2000}, {0x41ef4000}, {0x41ef6000}, - {0x41ef8000}, {0x41efa000}, {0x41efc000}, {0x41efe000}, - {0x41f00000}, {0x41f02000}, {0x41f04000}, {0x41f06000}, - {0x41f08000}, {0x41f0a000}, {0x41f0c000}, {0x41f0e000}, - {0x41f10000}, {0x41f12000}, {0x41f14000}, {0x41f16000}, - {0x41f18000}, {0x41f1a000}, {0x41f1c000}, {0x41f1e000}, - {0x41f20000}, {0x41f22000}, {0x41f24000}, {0x41f26000}, - {0x41f28000}, {0x41f2a000}, {0x41f2c000}, {0x41f2e000}, - {0x41f30000}, {0x41f32000}, {0x41f34000}, {0x41f36000}, - {0x41f38000}, {0x41f3a000}, {0x41f3c000}, {0x41f3e000}, - {0x41f40000}, {0x41f42000}, {0x41f44000}, {0x41f46000}, - {0x41f48000}, {0x41f4a000}, {0x41f4c000}, {0x41f4e000}, - {0x41f50000}, {0x41f52000}, {0x41f54000}, {0x41f56000}, - {0x41f58000}, {0x41f5a000}, {0x41f5c000}, {0x41f5e000}, - {0x41f60000}, {0x41f62000}, {0x41f64000}, {0x41f66000}, - {0x41f68000}, {0x41f6a000}, {0x41f6c000}, {0x41f6e000}, - {0x41f70000}, {0x41f72000}, {0x41f74000}, {0x41f76000}, - {0x41f78000}, {0x41f7a000}, {0x41f7c000}, {0x41f7e000}, - {0x41f80000}, {0x41f82000}, {0x41f84000}, {0x41f86000}, - {0x41f88000}, {0x41f8a000}, {0x41f8c000}, {0x41f8e000}, - {0x41f90000}, {0x41f92000}, {0x41f94000}, {0x41f96000}, - {0x41f98000}, {0x41f9a000}, {0x41f9c000}, {0x41f9e000}, - {0x41fa0000}, {0x41fa2000}, {0x41fa4000}, {0x41fa6000}, - {0x41fa8000}, {0x41faa000}, {0x41fac000}, {0x41fae000}, - {0x41fb0000}, {0x41fb2000}, {0x41fb4000}, {0x41fb6000}, - {0x41fb8000}, {0x41fba000}, {0x41fbc000}, {0x41fbe000}, - {0x41fc0000}, {0x41fc2000}, {0x41fc4000}, {0x41fc6000}, - {0x41fc8000}, {0x41fca000}, {0x41fcc000}, {0x41fce000}, - {0x41fd0000}, {0x41fd2000}, {0x41fd4000}, {0x41fd6000}, - {0x41fd8000}, {0x41fda000}, {0x41fdc000}, {0x41fde000}, - {0x41fe0000}, {0x41fe2000}, {0x41fe4000}, {0x41fe6000}, - {0x41fe8000}, {0x41fea000}, {0x41fec000}, {0x41fee000}, - {0x41ff0000}, {0x41ff2000}, {0x41ff4000}, {0x41ff6000}, - {0x41ff8000}, {0x41ffa000}, {0x41ffc000}, {0x41ffe000}, - {0x42000000}, {0x42002000}, {0x42004000}, {0x42006000}, - {0x42008000}, {0x4200a000}, {0x4200c000}, {0x4200e000}, - {0x42010000}, {0x42012000}, {0x42014000}, {0x42016000}, - {0x42018000}, {0x4201a000}, {0x4201c000}, {0x4201e000}, - {0x42020000}, {0x42022000}, {0x42024000}, {0x42026000}, - {0x42028000}, {0x4202a000}, {0x4202c000}, {0x4202e000}, - {0x42030000}, {0x42032000}, {0x42034000}, {0x42036000}, - {0x42038000}, {0x4203a000}, {0x4203c000}, {0x4203e000}, - {0x42040000}, {0x42042000}, {0x42044000}, {0x42046000}, - {0x42048000}, {0x4204a000}, {0x4204c000}, {0x4204e000}, - {0x42050000}, {0x42052000}, {0x42054000}, {0x42056000}, - {0x42058000}, {0x4205a000}, {0x4205c000}, {0x4205e000}, - {0x42060000}, {0x42062000}, {0x42064000}, {0x42066000}, - {0x42068000}, {0x4206a000}, {0x4206c000}, {0x4206e000}, - {0x42070000}, {0x42072000}, {0x42074000}, {0x42076000}, - {0x42078000}, {0x4207a000}, {0x4207c000}, {0x4207e000}, - {0x42080000}, {0x42082000}, {0x42084000}, {0x42086000}, - {0x42088000}, {0x4208a000}, {0x4208c000}, {0x4208e000}, - {0x42090000}, {0x42092000}, {0x42094000}, {0x42096000}, - {0x42098000}, {0x4209a000}, {0x4209c000}, {0x4209e000}, - {0x420a0000}, {0x420a2000}, {0x420a4000}, {0x420a6000}, - {0x420a8000}, {0x420aa000}, {0x420ac000}, {0x420ae000}, - {0x420b0000}, {0x420b2000}, {0x420b4000}, {0x420b6000}, - {0x420b8000}, {0x420ba000}, {0x420bc000}, {0x420be000}, - {0x420c0000}, {0x420c2000}, {0x420c4000}, {0x420c6000}, - {0x420c8000}, {0x420ca000}, {0x420cc000}, {0x420ce000}, - {0x420d0000}, {0x420d2000}, {0x420d4000}, {0x420d6000}, - {0x420d8000}, {0x420da000}, {0x420dc000}, {0x420de000}, - {0x420e0000}, {0x420e2000}, {0x420e4000}, {0x420e6000}, - {0x420e8000}, {0x420ea000}, {0x420ec000}, {0x420ee000}, - {0x420f0000}, {0x420f2000}, {0x420f4000}, {0x420f6000}, - {0x420f8000}, {0x420fa000}, {0x420fc000}, {0x420fe000}, - {0x42100000}, {0x42102000}, {0x42104000}, {0x42106000}, - {0x42108000}, {0x4210a000}, {0x4210c000}, {0x4210e000}, - {0x42110000}, {0x42112000}, {0x42114000}, {0x42116000}, - {0x42118000}, {0x4211a000}, {0x4211c000}, {0x4211e000}, - {0x42120000}, {0x42122000}, {0x42124000}, {0x42126000}, - {0x42128000}, {0x4212a000}, {0x4212c000}, {0x4212e000}, - {0x42130000}, {0x42132000}, {0x42134000}, {0x42136000}, - {0x42138000}, {0x4213a000}, {0x4213c000}, {0x4213e000}, - {0x42140000}, {0x42142000}, {0x42144000}, {0x42146000}, - {0x42148000}, {0x4214a000}, {0x4214c000}, {0x4214e000}, - {0x42150000}, {0x42152000}, {0x42154000}, {0x42156000}, - {0x42158000}, {0x4215a000}, {0x4215c000}, {0x4215e000}, - {0x42160000}, {0x42162000}, {0x42164000}, {0x42166000}, - {0x42168000}, {0x4216a000}, {0x4216c000}, {0x4216e000}, - {0x42170000}, {0x42172000}, {0x42174000}, {0x42176000}, - {0x42178000}, {0x4217a000}, {0x4217c000}, {0x4217e000}, - {0x42180000}, {0x42182000}, {0x42184000}, {0x42186000}, - {0x42188000}, {0x4218a000}, {0x4218c000}, {0x4218e000}, - {0x42190000}, {0x42192000}, {0x42194000}, {0x42196000}, - {0x42198000}, {0x4219a000}, {0x4219c000}, {0x4219e000}, - {0x421a0000}, {0x421a2000}, {0x421a4000}, {0x421a6000}, - {0x421a8000}, {0x421aa000}, {0x421ac000}, {0x421ae000}, - {0x421b0000}, {0x421b2000}, {0x421b4000}, {0x421b6000}, - {0x421b8000}, {0x421ba000}, {0x421bc000}, {0x421be000}, - {0x421c0000}, {0x421c2000}, {0x421c4000}, {0x421c6000}, - {0x421c8000}, {0x421ca000}, {0x421cc000}, {0x421ce000}, - {0x421d0000}, {0x421d2000}, {0x421d4000}, {0x421d6000}, - {0x421d8000}, {0x421da000}, {0x421dc000}, {0x421de000}, - {0x421e0000}, {0x421e2000}, {0x421e4000}, {0x421e6000}, - {0x421e8000}, {0x421ea000}, {0x421ec000}, {0x421ee000}, - {0x421f0000}, {0x421f2000}, {0x421f4000}, {0x421f6000}, - {0x421f8000}, {0x421fa000}, {0x421fc000}, {0x421fe000}, - {0x42200000}, {0x42202000}, {0x42204000}, {0x42206000}, - {0x42208000}, {0x4220a000}, {0x4220c000}, {0x4220e000}, - {0x42210000}, {0x42212000}, {0x42214000}, {0x42216000}, - {0x42218000}, {0x4221a000}, {0x4221c000}, {0x4221e000}, - {0x42220000}, {0x42222000}, {0x42224000}, {0x42226000}, - {0x42228000}, {0x4222a000}, {0x4222c000}, {0x4222e000}, - {0x42230000}, {0x42232000}, {0x42234000}, {0x42236000}, - {0x42238000}, {0x4223a000}, {0x4223c000}, {0x4223e000}, - {0x42240000}, {0x42242000}, {0x42244000}, {0x42246000}, - {0x42248000}, {0x4224a000}, {0x4224c000}, {0x4224e000}, - {0x42250000}, {0x42252000}, {0x42254000}, {0x42256000}, - {0x42258000}, {0x4225a000}, {0x4225c000}, {0x4225e000}, - {0x42260000}, {0x42262000}, {0x42264000}, {0x42266000}, - {0x42268000}, {0x4226a000}, {0x4226c000}, {0x4226e000}, - {0x42270000}, {0x42272000}, {0x42274000}, {0x42276000}, - {0x42278000}, {0x4227a000}, {0x4227c000}, {0x4227e000}, - {0x42280000}, {0x42282000}, {0x42284000}, {0x42286000}, - {0x42288000}, {0x4228a000}, {0x4228c000}, {0x4228e000}, - {0x42290000}, {0x42292000}, {0x42294000}, {0x42296000}, - {0x42298000}, {0x4229a000}, {0x4229c000}, {0x4229e000}, - {0x422a0000}, {0x422a2000}, {0x422a4000}, {0x422a6000}, - {0x422a8000}, {0x422aa000}, {0x422ac000}, {0x422ae000}, - {0x422b0000}, {0x422b2000}, {0x422b4000}, {0x422b6000}, - {0x422b8000}, {0x422ba000}, {0x422bc000}, {0x422be000}, - {0x422c0000}, {0x422c2000}, {0x422c4000}, {0x422c6000}, - {0x422c8000}, {0x422ca000}, {0x422cc000}, {0x422ce000}, - {0x422d0000}, {0x422d2000}, {0x422d4000}, {0x422d6000}, - {0x422d8000}, {0x422da000}, {0x422dc000}, {0x422de000}, - {0x422e0000}, {0x422e2000}, {0x422e4000}, {0x422e6000}, - {0x422e8000}, {0x422ea000}, {0x422ec000}, {0x422ee000}, - {0x422f0000}, {0x422f2000}, {0x422f4000}, {0x422f6000}, - {0x422f8000}, {0x422fa000}, {0x422fc000}, {0x422fe000}, - {0x42300000}, {0x42302000}, {0x42304000}, {0x42306000}, - {0x42308000}, {0x4230a000}, {0x4230c000}, {0x4230e000}, - {0x42310000}, {0x42312000}, {0x42314000}, {0x42316000}, - {0x42318000}, {0x4231a000}, {0x4231c000}, {0x4231e000}, - {0x42320000}, {0x42322000}, {0x42324000}, {0x42326000}, - {0x42328000}, {0x4232a000}, {0x4232c000}, {0x4232e000}, - {0x42330000}, {0x42332000}, {0x42334000}, {0x42336000}, - {0x42338000}, {0x4233a000}, {0x4233c000}, {0x4233e000}, - {0x42340000}, {0x42342000}, {0x42344000}, {0x42346000}, - {0x42348000}, {0x4234a000}, {0x4234c000}, {0x4234e000}, - {0x42350000}, {0x42352000}, {0x42354000}, {0x42356000}, - {0x42358000}, {0x4235a000}, {0x4235c000}, {0x4235e000}, - {0x42360000}, {0x42362000}, {0x42364000}, {0x42366000}, - {0x42368000}, {0x4236a000}, {0x4236c000}, {0x4236e000}, - {0x42370000}, {0x42372000}, {0x42374000}, {0x42376000}, - {0x42378000}, {0x4237a000}, {0x4237c000}, {0x4237e000}, - {0x42380000}, {0x42382000}, {0x42384000}, {0x42386000}, - {0x42388000}, {0x4238a000}, {0x4238c000}, {0x4238e000}, - {0x42390000}, {0x42392000}, {0x42394000}, {0x42396000}, - {0x42398000}, {0x4239a000}, {0x4239c000}, {0x4239e000}, - {0x423a0000}, {0x423a2000}, {0x423a4000}, {0x423a6000}, - {0x423a8000}, {0x423aa000}, {0x423ac000}, {0x423ae000}, - {0x423b0000}, {0x423b2000}, {0x423b4000}, {0x423b6000}, - {0x423b8000}, {0x423ba000}, {0x423bc000}, {0x423be000}, - {0x423c0000}, {0x423c2000}, {0x423c4000}, {0x423c6000}, - {0x423c8000}, {0x423ca000}, {0x423cc000}, {0x423ce000}, - {0x423d0000}, {0x423d2000}, {0x423d4000}, {0x423d6000}, - {0x423d8000}, {0x423da000}, {0x423dc000}, {0x423de000}, - {0x423e0000}, {0x423e2000}, {0x423e4000}, {0x423e6000}, - {0x423e8000}, {0x423ea000}, {0x423ec000}, {0x423ee000}, - {0x423f0000}, {0x423f2000}, {0x423f4000}, {0x423f6000}, - {0x423f8000}, {0x423fa000}, {0x423fc000}, {0x423fe000}, - {0x42400000}, {0x42402000}, {0x42404000}, {0x42406000}, - {0x42408000}, {0x4240a000}, {0x4240c000}, {0x4240e000}, - {0x42410000}, {0x42412000}, {0x42414000}, {0x42416000}, - {0x42418000}, {0x4241a000}, {0x4241c000}, {0x4241e000}, - {0x42420000}, {0x42422000}, {0x42424000}, {0x42426000}, - {0x42428000}, {0x4242a000}, {0x4242c000}, {0x4242e000}, - {0x42430000}, {0x42432000}, {0x42434000}, {0x42436000}, - {0x42438000}, {0x4243a000}, {0x4243c000}, {0x4243e000}, - {0x42440000}, {0x42442000}, {0x42444000}, {0x42446000}, - {0x42448000}, {0x4244a000}, {0x4244c000}, {0x4244e000}, - {0x42450000}, {0x42452000}, {0x42454000}, {0x42456000}, - {0x42458000}, {0x4245a000}, {0x4245c000}, {0x4245e000}, - {0x42460000}, {0x42462000}, {0x42464000}, {0x42466000}, - {0x42468000}, {0x4246a000}, {0x4246c000}, {0x4246e000}, - {0x42470000}, {0x42472000}, {0x42474000}, {0x42476000}, - {0x42478000}, {0x4247a000}, {0x4247c000}, {0x4247e000}, - {0x42480000}, {0x42482000}, {0x42484000}, {0x42486000}, - {0x42488000}, {0x4248a000}, {0x4248c000}, {0x4248e000}, - {0x42490000}, {0x42492000}, {0x42494000}, {0x42496000}, - {0x42498000}, {0x4249a000}, {0x4249c000}, {0x4249e000}, - {0x424a0000}, {0x424a2000}, {0x424a4000}, {0x424a6000}, - {0x424a8000}, {0x424aa000}, {0x424ac000}, {0x424ae000}, - {0x424b0000}, {0x424b2000}, {0x424b4000}, {0x424b6000}, - {0x424b8000}, {0x424ba000}, {0x424bc000}, {0x424be000}, - {0x424c0000}, {0x424c2000}, {0x424c4000}, {0x424c6000}, - {0x424c8000}, {0x424ca000}, {0x424cc000}, {0x424ce000}, - {0x424d0000}, {0x424d2000}, {0x424d4000}, {0x424d6000}, - {0x424d8000}, {0x424da000}, {0x424dc000}, {0x424de000}, - {0x424e0000}, {0x424e2000}, {0x424e4000}, {0x424e6000}, - {0x424e8000}, {0x424ea000}, {0x424ec000}, {0x424ee000}, - {0x424f0000}, {0x424f2000}, {0x424f4000}, {0x424f6000}, - {0x424f8000}, {0x424fa000}, {0x424fc000}, {0x424fe000}, - {0x42500000}, {0x42502000}, {0x42504000}, {0x42506000}, - {0x42508000}, {0x4250a000}, {0x4250c000}, {0x4250e000}, - {0x42510000}, {0x42512000}, {0x42514000}, {0x42516000}, - {0x42518000}, {0x4251a000}, {0x4251c000}, {0x4251e000}, - {0x42520000}, {0x42522000}, {0x42524000}, {0x42526000}, - {0x42528000}, {0x4252a000}, {0x4252c000}, {0x4252e000}, - {0x42530000}, {0x42532000}, {0x42534000}, {0x42536000}, - {0x42538000}, {0x4253a000}, {0x4253c000}, {0x4253e000}, - {0x42540000}, {0x42542000}, {0x42544000}, {0x42546000}, - {0x42548000}, {0x4254a000}, {0x4254c000}, {0x4254e000}, - {0x42550000}, {0x42552000}, {0x42554000}, {0x42556000}, - {0x42558000}, {0x4255a000}, {0x4255c000}, {0x4255e000}, - {0x42560000}, {0x42562000}, {0x42564000}, {0x42566000}, - {0x42568000}, {0x4256a000}, {0x4256c000}, {0x4256e000}, - {0x42570000}, {0x42572000}, {0x42574000}, {0x42576000}, - {0x42578000}, {0x4257a000}, {0x4257c000}, {0x4257e000}, - {0x42580000}, {0x42582000}, {0x42584000}, {0x42586000}, - {0x42588000}, {0x4258a000}, {0x4258c000}, {0x4258e000}, - {0x42590000}, {0x42592000}, {0x42594000}, {0x42596000}, - {0x42598000}, {0x4259a000}, {0x4259c000}, {0x4259e000}, - {0x425a0000}, {0x425a2000}, {0x425a4000}, {0x425a6000}, - {0x425a8000}, {0x425aa000}, {0x425ac000}, {0x425ae000}, - {0x425b0000}, {0x425b2000}, {0x425b4000}, {0x425b6000}, - {0x425b8000}, {0x425ba000}, {0x425bc000}, {0x425be000}, - {0x425c0000}, {0x425c2000}, {0x425c4000}, {0x425c6000}, - {0x425c8000}, {0x425ca000}, {0x425cc000}, {0x425ce000}, - {0x425d0000}, {0x425d2000}, {0x425d4000}, {0x425d6000}, - {0x425d8000}, {0x425da000}, {0x425dc000}, {0x425de000}, - {0x425e0000}, {0x425e2000}, {0x425e4000}, {0x425e6000}, - {0x425e8000}, {0x425ea000}, {0x425ec000}, {0x425ee000}, - {0x425f0000}, {0x425f2000}, {0x425f4000}, {0x425f6000}, - {0x425f8000}, {0x425fa000}, {0x425fc000}, {0x425fe000}, - {0x42600000}, {0x42602000}, {0x42604000}, {0x42606000}, - {0x42608000}, {0x4260a000}, {0x4260c000}, {0x4260e000}, - {0x42610000}, {0x42612000}, {0x42614000}, {0x42616000}, - {0x42618000}, {0x4261a000}, {0x4261c000}, {0x4261e000}, - {0x42620000}, {0x42622000}, {0x42624000}, {0x42626000}, - {0x42628000}, {0x4262a000}, {0x4262c000}, {0x4262e000}, - {0x42630000}, {0x42632000}, {0x42634000}, {0x42636000}, - {0x42638000}, {0x4263a000}, {0x4263c000}, {0x4263e000}, - {0x42640000}, {0x42642000}, {0x42644000}, {0x42646000}, - {0x42648000}, {0x4264a000}, {0x4264c000}, {0x4264e000}, - {0x42650000}, {0x42652000}, {0x42654000}, {0x42656000}, - {0x42658000}, {0x4265a000}, {0x4265c000}, {0x4265e000}, - {0x42660000}, {0x42662000}, {0x42664000}, {0x42666000}, - {0x42668000}, {0x4266a000}, {0x4266c000}, {0x4266e000}, - {0x42670000}, {0x42672000}, {0x42674000}, {0x42676000}, - {0x42678000}, {0x4267a000}, {0x4267c000}, {0x4267e000}, - {0x42680000}, {0x42682000}, {0x42684000}, {0x42686000}, - {0x42688000}, {0x4268a000}, {0x4268c000}, {0x4268e000}, - {0x42690000}, {0x42692000}, {0x42694000}, {0x42696000}, - {0x42698000}, {0x4269a000}, {0x4269c000}, {0x4269e000}, - {0x426a0000}, {0x426a2000}, {0x426a4000}, {0x426a6000}, - {0x426a8000}, {0x426aa000}, {0x426ac000}, {0x426ae000}, - {0x426b0000}, {0x426b2000}, {0x426b4000}, {0x426b6000}, - {0x426b8000}, {0x426ba000}, {0x426bc000}, {0x426be000}, - {0x426c0000}, {0x426c2000}, {0x426c4000}, {0x426c6000}, - {0x426c8000}, {0x426ca000}, {0x426cc000}, {0x426ce000}, - {0x426d0000}, {0x426d2000}, {0x426d4000}, {0x426d6000}, - {0x426d8000}, {0x426da000}, {0x426dc000}, {0x426de000}, - {0x426e0000}, {0x426e2000}, {0x426e4000}, {0x426e6000}, - {0x426e8000}, {0x426ea000}, {0x426ec000}, {0x426ee000}, - {0x426f0000}, {0x426f2000}, {0x426f4000}, {0x426f6000}, - {0x426f8000}, {0x426fa000}, {0x426fc000}, {0x426fe000}, - {0x42700000}, {0x42702000}, {0x42704000}, {0x42706000}, - {0x42708000}, {0x4270a000}, {0x4270c000}, {0x4270e000}, - {0x42710000}, {0x42712000}, {0x42714000}, {0x42716000}, - {0x42718000}, {0x4271a000}, {0x4271c000}, {0x4271e000}, - {0x42720000}, {0x42722000}, {0x42724000}, {0x42726000}, - {0x42728000}, {0x4272a000}, {0x4272c000}, {0x4272e000}, - {0x42730000}, {0x42732000}, {0x42734000}, {0x42736000}, - {0x42738000}, {0x4273a000}, {0x4273c000}, {0x4273e000}, - {0x42740000}, {0x42742000}, {0x42744000}, {0x42746000}, - {0x42748000}, {0x4274a000}, {0x4274c000}, {0x4274e000}, - {0x42750000}, {0x42752000}, {0x42754000}, {0x42756000}, - {0x42758000}, {0x4275a000}, {0x4275c000}, {0x4275e000}, - {0x42760000}, {0x42762000}, {0x42764000}, {0x42766000}, - {0x42768000}, {0x4276a000}, {0x4276c000}, {0x4276e000}, - {0x42770000}, {0x42772000}, {0x42774000}, {0x42776000}, - {0x42778000}, {0x4277a000}, {0x4277c000}, {0x4277e000}, - {0x42780000}, {0x42782000}, {0x42784000}, {0x42786000}, - {0x42788000}, {0x4278a000}, {0x4278c000}, {0x4278e000}, - {0x42790000}, {0x42792000}, {0x42794000}, {0x42796000}, - {0x42798000}, {0x4279a000}, {0x4279c000}, {0x4279e000}, - {0x427a0000}, {0x427a2000}, {0x427a4000}, {0x427a6000}, - {0x427a8000}, {0x427aa000}, {0x427ac000}, {0x427ae000}, - {0x427b0000}, {0x427b2000}, {0x427b4000}, {0x427b6000}, - {0x427b8000}, {0x427ba000}, {0x427bc000}, {0x427be000}, - {0x427c0000}, {0x427c2000}, {0x427c4000}, {0x427c6000}, - {0x427c8000}, {0x427ca000}, {0x427cc000}, {0x427ce000}, - {0x427d0000}, {0x427d2000}, {0x427d4000}, {0x427d6000}, - {0x427d8000}, {0x427da000}, {0x427dc000}, {0x427de000}, - {0x427e0000}, {0x427e2000}, {0x427e4000}, {0x427e6000}, - {0x427e8000}, {0x427ea000}, {0x427ec000}, {0x427ee000}, - {0x427f0000}, {0x427f2000}, {0x427f4000}, {0x427f6000}, - {0x427f8000}, {0x427fa000}, {0x427fc000}, {0x427fe000}, - {0x42800000}, {0x42802000}, {0x42804000}, {0x42806000}, - {0x42808000}, {0x4280a000}, {0x4280c000}, {0x4280e000}, - {0x42810000}, {0x42812000}, {0x42814000}, {0x42816000}, - {0x42818000}, {0x4281a000}, {0x4281c000}, {0x4281e000}, - {0x42820000}, {0x42822000}, {0x42824000}, {0x42826000}, - {0x42828000}, {0x4282a000}, {0x4282c000}, {0x4282e000}, - {0x42830000}, {0x42832000}, {0x42834000}, {0x42836000}, - {0x42838000}, {0x4283a000}, {0x4283c000}, {0x4283e000}, - {0x42840000}, {0x42842000}, {0x42844000}, {0x42846000}, - {0x42848000}, {0x4284a000}, {0x4284c000}, {0x4284e000}, - {0x42850000}, {0x42852000}, {0x42854000}, {0x42856000}, - {0x42858000}, {0x4285a000}, {0x4285c000}, {0x4285e000}, - {0x42860000}, {0x42862000}, {0x42864000}, {0x42866000}, - {0x42868000}, {0x4286a000}, {0x4286c000}, {0x4286e000}, - {0x42870000}, {0x42872000}, {0x42874000}, {0x42876000}, - {0x42878000}, {0x4287a000}, {0x4287c000}, {0x4287e000}, - {0x42880000}, {0x42882000}, {0x42884000}, {0x42886000}, - {0x42888000}, {0x4288a000}, {0x4288c000}, {0x4288e000}, - {0x42890000}, {0x42892000}, {0x42894000}, {0x42896000}, - {0x42898000}, {0x4289a000}, {0x4289c000}, {0x4289e000}, - {0x428a0000}, {0x428a2000}, {0x428a4000}, {0x428a6000}, - {0x428a8000}, {0x428aa000}, {0x428ac000}, {0x428ae000}, - {0x428b0000}, {0x428b2000}, {0x428b4000}, {0x428b6000}, - {0x428b8000}, {0x428ba000}, {0x428bc000}, {0x428be000}, - {0x428c0000}, {0x428c2000}, {0x428c4000}, {0x428c6000}, - {0x428c8000}, {0x428ca000}, {0x428cc000}, {0x428ce000}, - {0x428d0000}, {0x428d2000}, {0x428d4000}, {0x428d6000}, - {0x428d8000}, {0x428da000}, {0x428dc000}, {0x428de000}, - {0x428e0000}, {0x428e2000}, {0x428e4000}, {0x428e6000}, - {0x428e8000}, {0x428ea000}, {0x428ec000}, {0x428ee000}, - {0x428f0000}, {0x428f2000}, {0x428f4000}, {0x428f6000}, - {0x428f8000}, {0x428fa000}, {0x428fc000}, {0x428fe000}, - {0x42900000}, {0x42902000}, {0x42904000}, {0x42906000}, - {0x42908000}, {0x4290a000}, {0x4290c000}, {0x4290e000}, - {0x42910000}, {0x42912000}, {0x42914000}, {0x42916000}, - {0x42918000}, {0x4291a000}, {0x4291c000}, {0x4291e000}, - {0x42920000}, {0x42922000}, {0x42924000}, {0x42926000}, - {0x42928000}, {0x4292a000}, {0x4292c000}, {0x4292e000}, - {0x42930000}, {0x42932000}, {0x42934000}, {0x42936000}, - {0x42938000}, {0x4293a000}, {0x4293c000}, {0x4293e000}, - {0x42940000}, {0x42942000}, {0x42944000}, {0x42946000}, - {0x42948000}, {0x4294a000}, {0x4294c000}, {0x4294e000}, - {0x42950000}, {0x42952000}, {0x42954000}, {0x42956000}, - {0x42958000}, {0x4295a000}, {0x4295c000}, {0x4295e000}, - {0x42960000}, {0x42962000}, {0x42964000}, {0x42966000}, - {0x42968000}, {0x4296a000}, {0x4296c000}, {0x4296e000}, - {0x42970000}, {0x42972000}, {0x42974000}, {0x42976000}, - {0x42978000}, {0x4297a000}, {0x4297c000}, {0x4297e000}, - {0x42980000}, {0x42982000}, {0x42984000}, {0x42986000}, - {0x42988000}, {0x4298a000}, {0x4298c000}, {0x4298e000}, - {0x42990000}, {0x42992000}, {0x42994000}, {0x42996000}, - {0x42998000}, {0x4299a000}, {0x4299c000}, {0x4299e000}, - {0x429a0000}, {0x429a2000}, {0x429a4000}, {0x429a6000}, - {0x429a8000}, {0x429aa000}, {0x429ac000}, {0x429ae000}, - {0x429b0000}, {0x429b2000}, {0x429b4000}, {0x429b6000}, - {0x429b8000}, {0x429ba000}, {0x429bc000}, {0x429be000}, - {0x429c0000}, {0x429c2000}, {0x429c4000}, {0x429c6000}, - {0x429c8000}, {0x429ca000}, {0x429cc000}, {0x429ce000}, - {0x429d0000}, {0x429d2000}, {0x429d4000}, {0x429d6000}, - {0x429d8000}, {0x429da000}, {0x429dc000}, {0x429de000}, - {0x429e0000}, {0x429e2000}, {0x429e4000}, {0x429e6000}, - {0x429e8000}, {0x429ea000}, {0x429ec000}, {0x429ee000}, - {0x429f0000}, {0x429f2000}, {0x429f4000}, {0x429f6000}, - {0x429f8000}, {0x429fa000}, {0x429fc000}, {0x429fe000}, - {0x42a00000}, {0x42a02000}, {0x42a04000}, {0x42a06000}, - {0x42a08000}, {0x42a0a000}, {0x42a0c000}, {0x42a0e000}, - {0x42a10000}, {0x42a12000}, {0x42a14000}, {0x42a16000}, - {0x42a18000}, {0x42a1a000}, {0x42a1c000}, {0x42a1e000}, - {0x42a20000}, {0x42a22000}, {0x42a24000}, {0x42a26000}, - {0x42a28000}, {0x42a2a000}, {0x42a2c000}, {0x42a2e000}, - {0x42a30000}, {0x42a32000}, {0x42a34000}, {0x42a36000}, - {0x42a38000}, {0x42a3a000}, {0x42a3c000}, {0x42a3e000}, - {0x42a40000}, {0x42a42000}, {0x42a44000}, {0x42a46000}, - {0x42a48000}, {0x42a4a000}, {0x42a4c000}, {0x42a4e000}, - {0x42a50000}, {0x42a52000}, {0x42a54000}, {0x42a56000}, - {0x42a58000}, {0x42a5a000}, {0x42a5c000}, {0x42a5e000}, - {0x42a60000}, {0x42a62000}, {0x42a64000}, {0x42a66000}, - {0x42a68000}, {0x42a6a000}, {0x42a6c000}, {0x42a6e000}, - {0x42a70000}, {0x42a72000}, {0x42a74000}, {0x42a76000}, - {0x42a78000}, {0x42a7a000}, {0x42a7c000}, {0x42a7e000}, - {0x42a80000}, {0x42a82000}, {0x42a84000}, {0x42a86000}, - {0x42a88000}, {0x42a8a000}, {0x42a8c000}, {0x42a8e000}, - {0x42a90000}, {0x42a92000}, {0x42a94000}, {0x42a96000}, - {0x42a98000}, {0x42a9a000}, {0x42a9c000}, {0x42a9e000}, - {0x42aa0000}, {0x42aa2000}, {0x42aa4000}, {0x42aa6000}, - {0x42aa8000}, {0x42aaa000}, {0x42aac000}, {0x42aae000}, - {0x42ab0000}, {0x42ab2000}, {0x42ab4000}, {0x42ab6000}, - {0x42ab8000}, {0x42aba000}, {0x42abc000}, {0x42abe000}, - {0x42ac0000}, {0x42ac2000}, {0x42ac4000}, {0x42ac6000}, - {0x42ac8000}, {0x42aca000}, {0x42acc000}, {0x42ace000}, - {0x42ad0000}, {0x42ad2000}, {0x42ad4000}, {0x42ad6000}, - {0x42ad8000}, {0x42ada000}, {0x42adc000}, {0x42ade000}, - {0x42ae0000}, {0x42ae2000}, {0x42ae4000}, {0x42ae6000}, - {0x42ae8000}, {0x42aea000}, {0x42aec000}, {0x42aee000}, - {0x42af0000}, {0x42af2000}, {0x42af4000}, {0x42af6000}, - {0x42af8000}, {0x42afa000}, {0x42afc000}, {0x42afe000}, - {0x42b00000}, {0x42b02000}, {0x42b04000}, {0x42b06000}, - {0x42b08000}, {0x42b0a000}, {0x42b0c000}, {0x42b0e000}, - {0x42b10000}, {0x42b12000}, {0x42b14000}, {0x42b16000}, - {0x42b18000}, {0x42b1a000}, {0x42b1c000}, {0x42b1e000}, - {0x42b20000}, {0x42b22000}, {0x42b24000}, {0x42b26000}, - {0x42b28000}, {0x42b2a000}, {0x42b2c000}, {0x42b2e000}, - {0x42b30000}, {0x42b32000}, {0x42b34000}, {0x42b36000}, - {0x42b38000}, {0x42b3a000}, {0x42b3c000}, {0x42b3e000}, - {0x42b40000}, {0x42b42000}, {0x42b44000}, {0x42b46000}, - {0x42b48000}, {0x42b4a000}, {0x42b4c000}, {0x42b4e000}, - {0x42b50000}, {0x42b52000}, {0x42b54000}, {0x42b56000}, - {0x42b58000}, {0x42b5a000}, {0x42b5c000}, {0x42b5e000}, - {0x42b60000}, {0x42b62000}, {0x42b64000}, {0x42b66000}, - {0x42b68000}, {0x42b6a000}, {0x42b6c000}, {0x42b6e000}, - {0x42b70000}, {0x42b72000}, {0x42b74000}, {0x42b76000}, - {0x42b78000}, {0x42b7a000}, {0x42b7c000}, {0x42b7e000}, - {0x42b80000}, {0x42b82000}, {0x42b84000}, {0x42b86000}, - {0x42b88000}, {0x42b8a000}, {0x42b8c000}, {0x42b8e000}, - {0x42b90000}, {0x42b92000}, {0x42b94000}, {0x42b96000}, - {0x42b98000}, {0x42b9a000}, {0x42b9c000}, {0x42b9e000}, - {0x42ba0000}, {0x42ba2000}, {0x42ba4000}, {0x42ba6000}, - {0x42ba8000}, {0x42baa000}, {0x42bac000}, {0x42bae000}, - {0x42bb0000}, {0x42bb2000}, {0x42bb4000}, {0x42bb6000}, - {0x42bb8000}, {0x42bba000}, {0x42bbc000}, {0x42bbe000}, - {0x42bc0000}, {0x42bc2000}, {0x42bc4000}, {0x42bc6000}, - {0x42bc8000}, {0x42bca000}, {0x42bcc000}, {0x42bce000}, - {0x42bd0000}, {0x42bd2000}, {0x42bd4000}, {0x42bd6000}, - {0x42bd8000}, {0x42bda000}, {0x42bdc000}, {0x42bde000}, - {0x42be0000}, {0x42be2000}, {0x42be4000}, {0x42be6000}, - {0x42be8000}, {0x42bea000}, {0x42bec000}, {0x42bee000}, - {0x42bf0000}, {0x42bf2000}, {0x42bf4000}, {0x42bf6000}, - {0x42bf8000}, {0x42bfa000}, {0x42bfc000}, {0x42bfe000}, - {0x42c00000}, {0x42c02000}, {0x42c04000}, {0x42c06000}, - {0x42c08000}, {0x42c0a000}, {0x42c0c000}, {0x42c0e000}, - {0x42c10000}, {0x42c12000}, {0x42c14000}, {0x42c16000}, - {0x42c18000}, {0x42c1a000}, {0x42c1c000}, {0x42c1e000}, - {0x42c20000}, {0x42c22000}, {0x42c24000}, {0x42c26000}, - {0x42c28000}, {0x42c2a000}, {0x42c2c000}, {0x42c2e000}, - {0x42c30000}, {0x42c32000}, {0x42c34000}, {0x42c36000}, - {0x42c38000}, {0x42c3a000}, {0x42c3c000}, {0x42c3e000}, - {0x42c40000}, {0x42c42000}, {0x42c44000}, {0x42c46000}, - {0x42c48000}, {0x42c4a000}, {0x42c4c000}, {0x42c4e000}, - {0x42c50000}, {0x42c52000}, {0x42c54000}, {0x42c56000}, - {0x42c58000}, {0x42c5a000}, {0x42c5c000}, {0x42c5e000}, - {0x42c60000}, {0x42c62000}, {0x42c64000}, {0x42c66000}, - {0x42c68000}, {0x42c6a000}, {0x42c6c000}, {0x42c6e000}, - {0x42c70000}, {0x42c72000}, {0x42c74000}, {0x42c76000}, - {0x42c78000}, {0x42c7a000}, {0x42c7c000}, {0x42c7e000}, - {0x42c80000}, {0x42c82000}, {0x42c84000}, {0x42c86000}, - {0x42c88000}, {0x42c8a000}, {0x42c8c000}, {0x42c8e000}, - {0x42c90000}, {0x42c92000}, {0x42c94000}, {0x42c96000}, - {0x42c98000}, {0x42c9a000}, {0x42c9c000}, {0x42c9e000}, - {0x42ca0000}, {0x42ca2000}, {0x42ca4000}, {0x42ca6000}, - {0x42ca8000}, {0x42caa000}, {0x42cac000}, {0x42cae000}, - {0x42cb0000}, {0x42cb2000}, {0x42cb4000}, {0x42cb6000}, - {0x42cb8000}, {0x42cba000}, {0x42cbc000}, {0x42cbe000}, - {0x42cc0000}, {0x42cc2000}, {0x42cc4000}, {0x42cc6000}, - {0x42cc8000}, {0x42cca000}, {0x42ccc000}, {0x42cce000}, - {0x42cd0000}, {0x42cd2000}, {0x42cd4000}, {0x42cd6000}, - {0x42cd8000}, {0x42cda000}, {0x42cdc000}, {0x42cde000}, - {0x42ce0000}, {0x42ce2000}, {0x42ce4000}, {0x42ce6000}, - {0x42ce8000}, {0x42cea000}, {0x42cec000}, {0x42cee000}, - {0x42cf0000}, {0x42cf2000}, {0x42cf4000}, {0x42cf6000}, - {0x42cf8000}, {0x42cfa000}, {0x42cfc000}, {0x42cfe000}, - {0x42d00000}, {0x42d02000}, {0x42d04000}, {0x42d06000}, - {0x42d08000}, {0x42d0a000}, {0x42d0c000}, {0x42d0e000}, - {0x42d10000}, {0x42d12000}, {0x42d14000}, {0x42d16000}, - {0x42d18000}, {0x42d1a000}, {0x42d1c000}, {0x42d1e000}, - {0x42d20000}, {0x42d22000}, {0x42d24000}, {0x42d26000}, - {0x42d28000}, {0x42d2a000}, {0x42d2c000}, {0x42d2e000}, - {0x42d30000}, {0x42d32000}, {0x42d34000}, {0x42d36000}, - {0x42d38000}, {0x42d3a000}, {0x42d3c000}, {0x42d3e000}, - {0x42d40000}, {0x42d42000}, {0x42d44000}, {0x42d46000}, - {0x42d48000}, {0x42d4a000}, {0x42d4c000}, {0x42d4e000}, - {0x42d50000}, {0x42d52000}, {0x42d54000}, {0x42d56000}, - {0x42d58000}, {0x42d5a000}, {0x42d5c000}, {0x42d5e000}, - {0x42d60000}, {0x42d62000}, {0x42d64000}, {0x42d66000}, - {0x42d68000}, {0x42d6a000}, {0x42d6c000}, {0x42d6e000}, - {0x42d70000}, {0x42d72000}, {0x42d74000}, {0x42d76000}, - {0x42d78000}, {0x42d7a000}, {0x42d7c000}, {0x42d7e000}, - {0x42d80000}, {0x42d82000}, {0x42d84000}, {0x42d86000}, - {0x42d88000}, {0x42d8a000}, {0x42d8c000}, {0x42d8e000}, - {0x42d90000}, {0x42d92000}, {0x42d94000}, {0x42d96000}, - {0x42d98000}, {0x42d9a000}, {0x42d9c000}, {0x42d9e000}, - {0x42da0000}, {0x42da2000}, {0x42da4000}, {0x42da6000}, - {0x42da8000}, {0x42daa000}, {0x42dac000}, {0x42dae000}, - {0x42db0000}, {0x42db2000}, {0x42db4000}, {0x42db6000}, - {0x42db8000}, {0x42dba000}, {0x42dbc000}, {0x42dbe000}, - {0x42dc0000}, {0x42dc2000}, {0x42dc4000}, {0x42dc6000}, - {0x42dc8000}, {0x42dca000}, {0x42dcc000}, {0x42dce000}, - {0x42dd0000}, {0x42dd2000}, {0x42dd4000}, {0x42dd6000}, - {0x42dd8000}, {0x42dda000}, {0x42ddc000}, {0x42dde000}, - {0x42de0000}, {0x42de2000}, {0x42de4000}, {0x42de6000}, - {0x42de8000}, {0x42dea000}, {0x42dec000}, {0x42dee000}, - {0x42df0000}, {0x42df2000}, {0x42df4000}, {0x42df6000}, - {0x42df8000}, {0x42dfa000}, {0x42dfc000}, {0x42dfe000}, - {0x42e00000}, {0x42e02000}, {0x42e04000}, {0x42e06000}, - {0x42e08000}, {0x42e0a000}, {0x42e0c000}, {0x42e0e000}, - {0x42e10000}, {0x42e12000}, {0x42e14000}, {0x42e16000}, - {0x42e18000}, {0x42e1a000}, {0x42e1c000}, {0x42e1e000}, - {0x42e20000}, {0x42e22000}, {0x42e24000}, {0x42e26000}, - {0x42e28000}, {0x42e2a000}, {0x42e2c000}, {0x42e2e000}, - {0x42e30000}, {0x42e32000}, {0x42e34000}, {0x42e36000}, - {0x42e38000}, {0x42e3a000}, {0x42e3c000}, {0x42e3e000}, - {0x42e40000}, {0x42e42000}, {0x42e44000}, {0x42e46000}, - {0x42e48000}, {0x42e4a000}, {0x42e4c000}, {0x42e4e000}, - {0x42e50000}, {0x42e52000}, {0x42e54000}, {0x42e56000}, - {0x42e58000}, {0x42e5a000}, {0x42e5c000}, {0x42e5e000}, - {0x42e60000}, {0x42e62000}, {0x42e64000}, {0x42e66000}, - {0x42e68000}, {0x42e6a000}, {0x42e6c000}, {0x42e6e000}, - {0x42e70000}, {0x42e72000}, {0x42e74000}, {0x42e76000}, - {0x42e78000}, {0x42e7a000}, {0x42e7c000}, {0x42e7e000}, - {0x42e80000}, {0x42e82000}, {0x42e84000}, {0x42e86000}, - {0x42e88000}, {0x42e8a000}, {0x42e8c000}, {0x42e8e000}, - {0x42e90000}, {0x42e92000}, {0x42e94000}, {0x42e96000}, - {0x42e98000}, {0x42e9a000}, {0x42e9c000}, {0x42e9e000}, - {0x42ea0000}, {0x42ea2000}, {0x42ea4000}, {0x42ea6000}, - {0x42ea8000}, {0x42eaa000}, {0x42eac000}, {0x42eae000}, - {0x42eb0000}, {0x42eb2000}, {0x42eb4000}, {0x42eb6000}, - {0x42eb8000}, {0x42eba000}, {0x42ebc000}, {0x42ebe000}, - {0x42ec0000}, {0x42ec2000}, {0x42ec4000}, {0x42ec6000}, - {0x42ec8000}, {0x42eca000}, {0x42ecc000}, {0x42ece000}, - {0x42ed0000}, {0x42ed2000}, {0x42ed4000}, {0x42ed6000}, - {0x42ed8000}, {0x42eda000}, {0x42edc000}, {0x42ede000}, - {0x42ee0000}, {0x42ee2000}, {0x42ee4000}, {0x42ee6000}, - {0x42ee8000}, {0x42eea000}, {0x42eec000}, {0x42eee000}, - {0x42ef0000}, {0x42ef2000}, {0x42ef4000}, {0x42ef6000}, - {0x42ef8000}, {0x42efa000}, {0x42efc000}, {0x42efe000}, - {0x42f00000}, {0x42f02000}, {0x42f04000}, {0x42f06000}, - {0x42f08000}, {0x42f0a000}, {0x42f0c000}, {0x42f0e000}, - {0x42f10000}, {0x42f12000}, {0x42f14000}, {0x42f16000}, - {0x42f18000}, {0x42f1a000}, {0x42f1c000}, {0x42f1e000}, - {0x42f20000}, {0x42f22000}, {0x42f24000}, {0x42f26000}, - {0x42f28000}, {0x42f2a000}, {0x42f2c000}, {0x42f2e000}, - {0x42f30000}, {0x42f32000}, {0x42f34000}, {0x42f36000}, - {0x42f38000}, {0x42f3a000}, {0x42f3c000}, {0x42f3e000}, - {0x42f40000}, {0x42f42000}, {0x42f44000}, {0x42f46000}, - {0x42f48000}, {0x42f4a000}, {0x42f4c000}, {0x42f4e000}, - {0x42f50000}, {0x42f52000}, {0x42f54000}, {0x42f56000}, - {0x42f58000}, {0x42f5a000}, {0x42f5c000}, {0x42f5e000}, - {0x42f60000}, {0x42f62000}, {0x42f64000}, {0x42f66000}, - {0x42f68000}, {0x42f6a000}, {0x42f6c000}, {0x42f6e000}, - {0x42f70000}, {0x42f72000}, {0x42f74000}, {0x42f76000}, - {0x42f78000}, {0x42f7a000}, {0x42f7c000}, {0x42f7e000}, - {0x42f80000}, {0x42f82000}, {0x42f84000}, {0x42f86000}, - {0x42f88000}, {0x42f8a000}, {0x42f8c000}, {0x42f8e000}, - {0x42f90000}, {0x42f92000}, {0x42f94000}, {0x42f96000}, - {0x42f98000}, {0x42f9a000}, {0x42f9c000}, {0x42f9e000}, - {0x42fa0000}, {0x42fa2000}, {0x42fa4000}, {0x42fa6000}, - {0x42fa8000}, {0x42faa000}, {0x42fac000}, {0x42fae000}, - {0x42fb0000}, {0x42fb2000}, {0x42fb4000}, {0x42fb6000}, - {0x42fb8000}, {0x42fba000}, {0x42fbc000}, {0x42fbe000}, - {0x42fc0000}, {0x42fc2000}, {0x42fc4000}, {0x42fc6000}, - {0x42fc8000}, {0x42fca000}, {0x42fcc000}, {0x42fce000}, - {0x42fd0000}, {0x42fd2000}, {0x42fd4000}, {0x42fd6000}, - {0x42fd8000}, {0x42fda000}, {0x42fdc000}, {0x42fde000}, - {0x42fe0000}, {0x42fe2000}, {0x42fe4000}, {0x42fe6000}, - {0x42fe8000}, {0x42fea000}, {0x42fec000}, {0x42fee000}, - {0x42ff0000}, {0x42ff2000}, {0x42ff4000}, {0x42ff6000}, - {0x42ff8000}, {0x42ffa000}, {0x42ffc000}, {0x42ffe000}, - {0x43000000}, {0x43002000}, {0x43004000}, {0x43006000}, - {0x43008000}, {0x4300a000}, {0x4300c000}, {0x4300e000}, - {0x43010000}, {0x43012000}, {0x43014000}, {0x43016000}, - {0x43018000}, {0x4301a000}, {0x4301c000}, {0x4301e000}, - {0x43020000}, {0x43022000}, {0x43024000}, {0x43026000}, - {0x43028000}, {0x4302a000}, {0x4302c000}, {0x4302e000}, - {0x43030000}, {0x43032000}, {0x43034000}, {0x43036000}, - {0x43038000}, {0x4303a000}, {0x4303c000}, {0x4303e000}, - {0x43040000}, {0x43042000}, {0x43044000}, {0x43046000}, - {0x43048000}, {0x4304a000}, {0x4304c000}, {0x4304e000}, - {0x43050000}, {0x43052000}, {0x43054000}, {0x43056000}, - {0x43058000}, {0x4305a000}, {0x4305c000}, {0x4305e000}, - {0x43060000}, {0x43062000}, {0x43064000}, {0x43066000}, - {0x43068000}, {0x4306a000}, {0x4306c000}, {0x4306e000}, - {0x43070000}, {0x43072000}, {0x43074000}, {0x43076000}, - {0x43078000}, {0x4307a000}, {0x4307c000}, {0x4307e000}, - {0x43080000}, {0x43082000}, {0x43084000}, {0x43086000}, - {0x43088000}, {0x4308a000}, {0x4308c000}, {0x4308e000}, - {0x43090000}, {0x43092000}, {0x43094000}, {0x43096000}, - {0x43098000}, {0x4309a000}, {0x4309c000}, {0x4309e000}, - {0x430a0000}, {0x430a2000}, {0x430a4000}, {0x430a6000}, - {0x430a8000}, {0x430aa000}, {0x430ac000}, {0x430ae000}, - {0x430b0000}, {0x430b2000}, {0x430b4000}, {0x430b6000}, - {0x430b8000}, {0x430ba000}, {0x430bc000}, {0x430be000}, - {0x430c0000}, {0x430c2000}, {0x430c4000}, {0x430c6000}, - {0x430c8000}, {0x430ca000}, {0x430cc000}, {0x430ce000}, - {0x430d0000}, {0x430d2000}, {0x430d4000}, {0x430d6000}, - {0x430d8000}, {0x430da000}, {0x430dc000}, {0x430de000}, - {0x430e0000}, {0x430e2000}, {0x430e4000}, {0x430e6000}, - {0x430e8000}, {0x430ea000}, {0x430ec000}, {0x430ee000}, - {0x430f0000}, {0x430f2000}, {0x430f4000}, {0x430f6000}, - {0x430f8000}, {0x430fa000}, {0x430fc000}, {0x430fe000}, - {0x43100000}, {0x43102000}, {0x43104000}, {0x43106000}, - {0x43108000}, {0x4310a000}, {0x4310c000}, {0x4310e000}, - {0x43110000}, {0x43112000}, {0x43114000}, {0x43116000}, - {0x43118000}, {0x4311a000}, {0x4311c000}, {0x4311e000}, - {0x43120000}, {0x43122000}, {0x43124000}, {0x43126000}, - {0x43128000}, {0x4312a000}, {0x4312c000}, {0x4312e000}, - {0x43130000}, {0x43132000}, {0x43134000}, {0x43136000}, - {0x43138000}, {0x4313a000}, {0x4313c000}, {0x4313e000}, - {0x43140000}, {0x43142000}, {0x43144000}, {0x43146000}, - {0x43148000}, {0x4314a000}, {0x4314c000}, {0x4314e000}, - {0x43150000}, {0x43152000}, {0x43154000}, {0x43156000}, - {0x43158000}, {0x4315a000}, {0x4315c000}, {0x4315e000}, - {0x43160000}, {0x43162000}, {0x43164000}, {0x43166000}, - {0x43168000}, {0x4316a000}, {0x4316c000}, {0x4316e000}, - {0x43170000}, {0x43172000}, {0x43174000}, {0x43176000}, - {0x43178000}, {0x4317a000}, {0x4317c000}, {0x4317e000}, - {0x43180000}, {0x43182000}, {0x43184000}, {0x43186000}, - {0x43188000}, {0x4318a000}, {0x4318c000}, {0x4318e000}, - {0x43190000}, {0x43192000}, {0x43194000}, {0x43196000}, - {0x43198000}, {0x4319a000}, {0x4319c000}, {0x4319e000}, - {0x431a0000}, {0x431a2000}, {0x431a4000}, {0x431a6000}, - {0x431a8000}, {0x431aa000}, {0x431ac000}, {0x431ae000}, - {0x431b0000}, {0x431b2000}, {0x431b4000}, {0x431b6000}, - {0x431b8000}, {0x431ba000}, {0x431bc000}, {0x431be000}, - {0x431c0000}, {0x431c2000}, {0x431c4000}, {0x431c6000}, - {0x431c8000}, {0x431ca000}, {0x431cc000}, {0x431ce000}, - {0x431d0000}, {0x431d2000}, {0x431d4000}, {0x431d6000}, - {0x431d8000}, {0x431da000}, {0x431dc000}, {0x431de000}, - {0x431e0000}, {0x431e2000}, {0x431e4000}, {0x431e6000}, - {0x431e8000}, {0x431ea000}, {0x431ec000}, {0x431ee000}, - {0x431f0000}, {0x431f2000}, {0x431f4000}, {0x431f6000}, - {0x431f8000}, {0x431fa000}, {0x431fc000}, {0x431fe000}, - {0x43200000}, {0x43202000}, {0x43204000}, {0x43206000}, - {0x43208000}, {0x4320a000}, {0x4320c000}, {0x4320e000}, - {0x43210000}, {0x43212000}, {0x43214000}, {0x43216000}, - {0x43218000}, {0x4321a000}, {0x4321c000}, {0x4321e000}, - {0x43220000}, {0x43222000}, {0x43224000}, {0x43226000}, - {0x43228000}, {0x4322a000}, {0x4322c000}, {0x4322e000}, - {0x43230000}, {0x43232000}, {0x43234000}, {0x43236000}, - {0x43238000}, {0x4323a000}, {0x4323c000}, {0x4323e000}, - {0x43240000}, {0x43242000}, {0x43244000}, {0x43246000}, - {0x43248000}, {0x4324a000}, {0x4324c000}, {0x4324e000}, - {0x43250000}, {0x43252000}, {0x43254000}, {0x43256000}, - {0x43258000}, {0x4325a000}, {0x4325c000}, {0x4325e000}, - {0x43260000}, {0x43262000}, {0x43264000}, {0x43266000}, - {0x43268000}, {0x4326a000}, {0x4326c000}, {0x4326e000}, - {0x43270000}, {0x43272000}, {0x43274000}, {0x43276000}, - {0x43278000}, {0x4327a000}, {0x4327c000}, {0x4327e000}, - {0x43280000}, {0x43282000}, {0x43284000}, {0x43286000}, - {0x43288000}, {0x4328a000}, {0x4328c000}, {0x4328e000}, - {0x43290000}, {0x43292000}, {0x43294000}, {0x43296000}, - {0x43298000}, {0x4329a000}, {0x4329c000}, {0x4329e000}, - {0x432a0000}, {0x432a2000}, {0x432a4000}, {0x432a6000}, - {0x432a8000}, {0x432aa000}, {0x432ac000}, {0x432ae000}, - {0x432b0000}, {0x432b2000}, {0x432b4000}, {0x432b6000}, - {0x432b8000}, {0x432ba000}, {0x432bc000}, {0x432be000}, - {0x432c0000}, {0x432c2000}, {0x432c4000}, {0x432c6000}, - {0x432c8000}, {0x432ca000}, {0x432cc000}, {0x432ce000}, - {0x432d0000}, {0x432d2000}, {0x432d4000}, {0x432d6000}, - {0x432d8000}, {0x432da000}, {0x432dc000}, {0x432de000}, - {0x432e0000}, {0x432e2000}, {0x432e4000}, {0x432e6000}, - {0x432e8000}, {0x432ea000}, {0x432ec000}, {0x432ee000}, - {0x432f0000}, {0x432f2000}, {0x432f4000}, {0x432f6000}, - {0x432f8000}, {0x432fa000}, {0x432fc000}, {0x432fe000}, - {0x43300000}, {0x43302000}, {0x43304000}, {0x43306000}, - {0x43308000}, {0x4330a000}, {0x4330c000}, {0x4330e000}, - {0x43310000}, {0x43312000}, {0x43314000}, {0x43316000}, - {0x43318000}, {0x4331a000}, {0x4331c000}, {0x4331e000}, - {0x43320000}, {0x43322000}, {0x43324000}, {0x43326000}, - {0x43328000}, {0x4332a000}, {0x4332c000}, {0x4332e000}, - {0x43330000}, {0x43332000}, {0x43334000}, {0x43336000}, - {0x43338000}, {0x4333a000}, {0x4333c000}, {0x4333e000}, - {0x43340000}, {0x43342000}, {0x43344000}, {0x43346000}, - {0x43348000}, {0x4334a000}, {0x4334c000}, {0x4334e000}, - {0x43350000}, {0x43352000}, {0x43354000}, {0x43356000}, - {0x43358000}, {0x4335a000}, {0x4335c000}, {0x4335e000}, - {0x43360000}, {0x43362000}, {0x43364000}, {0x43366000}, - {0x43368000}, {0x4336a000}, {0x4336c000}, {0x4336e000}, - {0x43370000}, {0x43372000}, {0x43374000}, {0x43376000}, - {0x43378000}, {0x4337a000}, {0x4337c000}, {0x4337e000}, - {0x43380000}, {0x43382000}, {0x43384000}, {0x43386000}, - {0x43388000}, {0x4338a000}, {0x4338c000}, {0x4338e000}, - {0x43390000}, {0x43392000}, {0x43394000}, {0x43396000}, - {0x43398000}, {0x4339a000}, {0x4339c000}, {0x4339e000}, - {0x433a0000}, {0x433a2000}, {0x433a4000}, {0x433a6000}, - {0x433a8000}, {0x433aa000}, {0x433ac000}, {0x433ae000}, - {0x433b0000}, {0x433b2000}, {0x433b4000}, {0x433b6000}, - {0x433b8000}, {0x433ba000}, {0x433bc000}, {0x433be000}, - {0x433c0000}, {0x433c2000}, {0x433c4000}, {0x433c6000}, - {0x433c8000}, {0x433ca000}, {0x433cc000}, {0x433ce000}, - {0x433d0000}, {0x433d2000}, {0x433d4000}, {0x433d6000}, - {0x433d8000}, {0x433da000}, {0x433dc000}, {0x433de000}, - {0x433e0000}, {0x433e2000}, {0x433e4000}, {0x433e6000}, - {0x433e8000}, {0x433ea000}, {0x433ec000}, {0x433ee000}, - {0x433f0000}, {0x433f2000}, {0x433f4000}, {0x433f6000}, - {0x433f8000}, {0x433fa000}, {0x433fc000}, {0x433fe000}, - {0x43400000}, {0x43402000}, {0x43404000}, {0x43406000}, - {0x43408000}, {0x4340a000}, {0x4340c000}, {0x4340e000}, - {0x43410000}, {0x43412000}, {0x43414000}, {0x43416000}, - {0x43418000}, {0x4341a000}, {0x4341c000}, {0x4341e000}, - {0x43420000}, {0x43422000}, {0x43424000}, {0x43426000}, - {0x43428000}, {0x4342a000}, {0x4342c000}, {0x4342e000}, - {0x43430000}, {0x43432000}, {0x43434000}, {0x43436000}, - {0x43438000}, {0x4343a000}, {0x4343c000}, {0x4343e000}, - {0x43440000}, {0x43442000}, {0x43444000}, {0x43446000}, - {0x43448000}, {0x4344a000}, {0x4344c000}, {0x4344e000}, - {0x43450000}, {0x43452000}, {0x43454000}, {0x43456000}, - {0x43458000}, {0x4345a000}, {0x4345c000}, {0x4345e000}, - {0x43460000}, {0x43462000}, {0x43464000}, {0x43466000}, - {0x43468000}, {0x4346a000}, {0x4346c000}, {0x4346e000}, - {0x43470000}, {0x43472000}, {0x43474000}, {0x43476000}, - {0x43478000}, {0x4347a000}, {0x4347c000}, {0x4347e000}, - {0x43480000}, {0x43482000}, {0x43484000}, {0x43486000}, - {0x43488000}, {0x4348a000}, {0x4348c000}, {0x4348e000}, - {0x43490000}, {0x43492000}, {0x43494000}, {0x43496000}, - {0x43498000}, {0x4349a000}, {0x4349c000}, {0x4349e000}, - {0x434a0000}, {0x434a2000}, {0x434a4000}, {0x434a6000}, - {0x434a8000}, {0x434aa000}, {0x434ac000}, {0x434ae000}, - {0x434b0000}, {0x434b2000}, {0x434b4000}, {0x434b6000}, - {0x434b8000}, {0x434ba000}, {0x434bc000}, {0x434be000}, - {0x434c0000}, {0x434c2000}, {0x434c4000}, {0x434c6000}, - {0x434c8000}, {0x434ca000}, {0x434cc000}, {0x434ce000}, - {0x434d0000}, {0x434d2000}, {0x434d4000}, {0x434d6000}, - {0x434d8000}, {0x434da000}, {0x434dc000}, {0x434de000}, - {0x434e0000}, {0x434e2000}, {0x434e4000}, {0x434e6000}, - {0x434e8000}, {0x434ea000}, {0x434ec000}, {0x434ee000}, - {0x434f0000}, {0x434f2000}, {0x434f4000}, {0x434f6000}, - {0x434f8000}, {0x434fa000}, {0x434fc000}, {0x434fe000}, - {0x43500000}, {0x43502000}, {0x43504000}, {0x43506000}, - {0x43508000}, {0x4350a000}, {0x4350c000}, {0x4350e000}, - {0x43510000}, {0x43512000}, {0x43514000}, {0x43516000}, - {0x43518000}, {0x4351a000}, {0x4351c000}, {0x4351e000}, - {0x43520000}, {0x43522000}, {0x43524000}, {0x43526000}, - {0x43528000}, {0x4352a000}, {0x4352c000}, {0x4352e000}, - {0x43530000}, {0x43532000}, {0x43534000}, {0x43536000}, - {0x43538000}, {0x4353a000}, {0x4353c000}, {0x4353e000}, - {0x43540000}, {0x43542000}, {0x43544000}, {0x43546000}, - {0x43548000}, {0x4354a000}, {0x4354c000}, {0x4354e000}, - {0x43550000}, {0x43552000}, {0x43554000}, {0x43556000}, - {0x43558000}, {0x4355a000}, {0x4355c000}, {0x4355e000}, - {0x43560000}, {0x43562000}, {0x43564000}, {0x43566000}, - {0x43568000}, {0x4356a000}, {0x4356c000}, {0x4356e000}, - {0x43570000}, {0x43572000}, {0x43574000}, {0x43576000}, - {0x43578000}, {0x4357a000}, {0x4357c000}, {0x4357e000}, - {0x43580000}, {0x43582000}, {0x43584000}, {0x43586000}, - {0x43588000}, {0x4358a000}, {0x4358c000}, {0x4358e000}, - {0x43590000}, {0x43592000}, {0x43594000}, {0x43596000}, - {0x43598000}, {0x4359a000}, {0x4359c000}, {0x4359e000}, - {0x435a0000}, {0x435a2000}, {0x435a4000}, {0x435a6000}, - {0x435a8000}, {0x435aa000}, {0x435ac000}, {0x435ae000}, - {0x435b0000}, {0x435b2000}, {0x435b4000}, {0x435b6000}, - {0x435b8000}, {0x435ba000}, {0x435bc000}, {0x435be000}, - {0x435c0000}, {0x435c2000}, {0x435c4000}, {0x435c6000}, - {0x435c8000}, {0x435ca000}, {0x435cc000}, {0x435ce000}, - {0x435d0000}, {0x435d2000}, {0x435d4000}, {0x435d6000}, - {0x435d8000}, {0x435da000}, {0x435dc000}, {0x435de000}, - {0x435e0000}, {0x435e2000}, {0x435e4000}, {0x435e6000}, - {0x435e8000}, {0x435ea000}, {0x435ec000}, {0x435ee000}, - {0x435f0000}, {0x435f2000}, {0x435f4000}, {0x435f6000}, - {0x435f8000}, {0x435fa000}, {0x435fc000}, {0x435fe000}, - {0x43600000}, {0x43602000}, {0x43604000}, {0x43606000}, - {0x43608000}, {0x4360a000}, {0x4360c000}, {0x4360e000}, - {0x43610000}, {0x43612000}, {0x43614000}, {0x43616000}, - {0x43618000}, {0x4361a000}, {0x4361c000}, {0x4361e000}, - {0x43620000}, {0x43622000}, {0x43624000}, {0x43626000}, - {0x43628000}, {0x4362a000}, {0x4362c000}, {0x4362e000}, - {0x43630000}, {0x43632000}, {0x43634000}, {0x43636000}, - {0x43638000}, {0x4363a000}, {0x4363c000}, {0x4363e000}, - {0x43640000}, {0x43642000}, {0x43644000}, {0x43646000}, - {0x43648000}, {0x4364a000}, {0x4364c000}, {0x4364e000}, - {0x43650000}, {0x43652000}, {0x43654000}, {0x43656000}, - {0x43658000}, {0x4365a000}, {0x4365c000}, {0x4365e000}, - {0x43660000}, {0x43662000}, {0x43664000}, {0x43666000}, - {0x43668000}, {0x4366a000}, {0x4366c000}, {0x4366e000}, - {0x43670000}, {0x43672000}, {0x43674000}, {0x43676000}, - {0x43678000}, {0x4367a000}, {0x4367c000}, {0x4367e000}, - {0x43680000}, {0x43682000}, {0x43684000}, {0x43686000}, - {0x43688000}, {0x4368a000}, {0x4368c000}, {0x4368e000}, - {0x43690000}, {0x43692000}, {0x43694000}, {0x43696000}, - {0x43698000}, {0x4369a000}, {0x4369c000}, {0x4369e000}, - {0x436a0000}, {0x436a2000}, {0x436a4000}, {0x436a6000}, - {0x436a8000}, {0x436aa000}, {0x436ac000}, {0x436ae000}, - {0x436b0000}, {0x436b2000}, {0x436b4000}, {0x436b6000}, - {0x436b8000}, {0x436ba000}, {0x436bc000}, {0x436be000}, - {0x436c0000}, {0x436c2000}, {0x436c4000}, {0x436c6000}, - {0x436c8000}, {0x436ca000}, {0x436cc000}, {0x436ce000}, - {0x436d0000}, {0x436d2000}, {0x436d4000}, {0x436d6000}, - {0x436d8000}, {0x436da000}, {0x436dc000}, {0x436de000}, - {0x436e0000}, {0x436e2000}, {0x436e4000}, {0x436e6000}, - {0x436e8000}, {0x436ea000}, {0x436ec000}, {0x436ee000}, - {0x436f0000}, {0x436f2000}, {0x436f4000}, {0x436f6000}, - {0x436f8000}, {0x436fa000}, {0x436fc000}, {0x436fe000}, - {0x43700000}, {0x43702000}, {0x43704000}, {0x43706000}, - {0x43708000}, {0x4370a000}, {0x4370c000}, {0x4370e000}, - {0x43710000}, {0x43712000}, {0x43714000}, {0x43716000}, - {0x43718000}, {0x4371a000}, {0x4371c000}, {0x4371e000}, - {0x43720000}, {0x43722000}, {0x43724000}, {0x43726000}, - {0x43728000}, {0x4372a000}, {0x4372c000}, {0x4372e000}, - {0x43730000}, {0x43732000}, {0x43734000}, {0x43736000}, - {0x43738000}, {0x4373a000}, {0x4373c000}, {0x4373e000}, - {0x43740000}, {0x43742000}, {0x43744000}, {0x43746000}, - {0x43748000}, {0x4374a000}, {0x4374c000}, {0x4374e000}, - {0x43750000}, {0x43752000}, {0x43754000}, {0x43756000}, - {0x43758000}, {0x4375a000}, {0x4375c000}, {0x4375e000}, - {0x43760000}, {0x43762000}, {0x43764000}, {0x43766000}, - {0x43768000}, {0x4376a000}, {0x4376c000}, {0x4376e000}, - {0x43770000}, {0x43772000}, {0x43774000}, {0x43776000}, - {0x43778000}, {0x4377a000}, {0x4377c000}, {0x4377e000}, - {0x43780000}, {0x43782000}, {0x43784000}, {0x43786000}, - {0x43788000}, {0x4378a000}, {0x4378c000}, {0x4378e000}, - {0x43790000}, {0x43792000}, {0x43794000}, {0x43796000}, - {0x43798000}, {0x4379a000}, {0x4379c000}, {0x4379e000}, - {0x437a0000}, {0x437a2000}, {0x437a4000}, {0x437a6000}, - {0x437a8000}, {0x437aa000}, {0x437ac000}, {0x437ae000}, - {0x437b0000}, {0x437b2000}, {0x437b4000}, {0x437b6000}, - {0x437b8000}, {0x437ba000}, {0x437bc000}, {0x437be000}, - {0x437c0000}, {0x437c2000}, {0x437c4000}, {0x437c6000}, - {0x437c8000}, {0x437ca000}, {0x437cc000}, {0x437ce000}, - {0x437d0000}, {0x437d2000}, {0x437d4000}, {0x437d6000}, - {0x437d8000}, {0x437da000}, {0x437dc000}, {0x437de000}, - {0x437e0000}, {0x437e2000}, {0x437e4000}, {0x437e6000}, - {0x437e8000}, {0x437ea000}, {0x437ec000}, {0x437ee000}, - {0x437f0000}, {0x437f2000}, {0x437f4000}, {0x437f6000}, - {0x437f8000}, {0x437fa000}, {0x437fc000}, {0x437fe000}, - {0x43800000}, {0x43802000}, {0x43804000}, {0x43806000}, - {0x43808000}, {0x4380a000}, {0x4380c000}, {0x4380e000}, - {0x43810000}, {0x43812000}, {0x43814000}, {0x43816000}, - {0x43818000}, {0x4381a000}, {0x4381c000}, {0x4381e000}, - {0x43820000}, {0x43822000}, {0x43824000}, {0x43826000}, - {0x43828000}, {0x4382a000}, {0x4382c000}, {0x4382e000}, - {0x43830000}, {0x43832000}, {0x43834000}, {0x43836000}, - {0x43838000}, {0x4383a000}, {0x4383c000}, {0x4383e000}, - {0x43840000}, {0x43842000}, {0x43844000}, {0x43846000}, - {0x43848000}, {0x4384a000}, {0x4384c000}, {0x4384e000}, - {0x43850000}, {0x43852000}, {0x43854000}, {0x43856000}, - {0x43858000}, {0x4385a000}, {0x4385c000}, {0x4385e000}, - {0x43860000}, {0x43862000}, {0x43864000}, {0x43866000}, - {0x43868000}, {0x4386a000}, {0x4386c000}, {0x4386e000}, - {0x43870000}, {0x43872000}, {0x43874000}, {0x43876000}, - {0x43878000}, {0x4387a000}, {0x4387c000}, {0x4387e000}, - {0x43880000}, {0x43882000}, {0x43884000}, {0x43886000}, - {0x43888000}, {0x4388a000}, {0x4388c000}, {0x4388e000}, - {0x43890000}, {0x43892000}, {0x43894000}, {0x43896000}, - {0x43898000}, {0x4389a000}, {0x4389c000}, {0x4389e000}, - {0x438a0000}, {0x438a2000}, {0x438a4000}, {0x438a6000}, - {0x438a8000}, {0x438aa000}, {0x438ac000}, {0x438ae000}, - {0x438b0000}, {0x438b2000}, {0x438b4000}, {0x438b6000}, - {0x438b8000}, {0x438ba000}, {0x438bc000}, {0x438be000}, - {0x438c0000}, {0x438c2000}, {0x438c4000}, {0x438c6000}, - {0x438c8000}, {0x438ca000}, {0x438cc000}, {0x438ce000}, - {0x438d0000}, {0x438d2000}, {0x438d4000}, {0x438d6000}, - {0x438d8000}, {0x438da000}, {0x438dc000}, {0x438de000}, - {0x438e0000}, {0x438e2000}, {0x438e4000}, {0x438e6000}, - {0x438e8000}, {0x438ea000}, {0x438ec000}, {0x438ee000}, - {0x438f0000}, {0x438f2000}, {0x438f4000}, {0x438f6000}, - {0x438f8000}, {0x438fa000}, {0x438fc000}, {0x438fe000}, - {0x43900000}, {0x43902000}, {0x43904000}, {0x43906000}, - {0x43908000}, {0x4390a000}, {0x4390c000}, {0x4390e000}, - {0x43910000}, {0x43912000}, {0x43914000}, {0x43916000}, - {0x43918000}, {0x4391a000}, {0x4391c000}, {0x4391e000}, - {0x43920000}, {0x43922000}, {0x43924000}, {0x43926000}, - {0x43928000}, {0x4392a000}, {0x4392c000}, {0x4392e000}, - {0x43930000}, {0x43932000}, {0x43934000}, {0x43936000}, - {0x43938000}, {0x4393a000}, {0x4393c000}, {0x4393e000}, - {0x43940000}, {0x43942000}, {0x43944000}, {0x43946000}, - {0x43948000}, {0x4394a000}, {0x4394c000}, {0x4394e000}, - {0x43950000}, {0x43952000}, {0x43954000}, {0x43956000}, - {0x43958000}, {0x4395a000}, {0x4395c000}, {0x4395e000}, - {0x43960000}, {0x43962000}, {0x43964000}, {0x43966000}, - {0x43968000}, {0x4396a000}, {0x4396c000}, {0x4396e000}, - {0x43970000}, {0x43972000}, {0x43974000}, {0x43976000}, - {0x43978000}, {0x4397a000}, {0x4397c000}, {0x4397e000}, - {0x43980000}, {0x43982000}, {0x43984000}, {0x43986000}, - {0x43988000}, {0x4398a000}, {0x4398c000}, {0x4398e000}, - {0x43990000}, {0x43992000}, {0x43994000}, {0x43996000}, - {0x43998000}, {0x4399a000}, {0x4399c000}, {0x4399e000}, - {0x439a0000}, {0x439a2000}, {0x439a4000}, {0x439a6000}, - {0x439a8000}, {0x439aa000}, {0x439ac000}, {0x439ae000}, - {0x439b0000}, {0x439b2000}, {0x439b4000}, {0x439b6000}, - {0x439b8000}, {0x439ba000}, {0x439bc000}, {0x439be000}, - {0x439c0000}, {0x439c2000}, {0x439c4000}, {0x439c6000}, - {0x439c8000}, {0x439ca000}, {0x439cc000}, {0x439ce000}, - {0x439d0000}, {0x439d2000}, {0x439d4000}, {0x439d6000}, - {0x439d8000}, {0x439da000}, {0x439dc000}, {0x439de000}, - {0x439e0000}, {0x439e2000}, {0x439e4000}, {0x439e6000}, - {0x439e8000}, {0x439ea000}, {0x439ec000}, {0x439ee000}, - {0x439f0000}, {0x439f2000}, {0x439f4000}, {0x439f6000}, - {0x439f8000}, {0x439fa000}, {0x439fc000}, {0x439fe000}, - {0x43a00000}, {0x43a02000}, {0x43a04000}, {0x43a06000}, - {0x43a08000}, {0x43a0a000}, {0x43a0c000}, {0x43a0e000}, - {0x43a10000}, {0x43a12000}, {0x43a14000}, {0x43a16000}, - {0x43a18000}, {0x43a1a000}, {0x43a1c000}, {0x43a1e000}, - {0x43a20000}, {0x43a22000}, {0x43a24000}, {0x43a26000}, - {0x43a28000}, {0x43a2a000}, {0x43a2c000}, {0x43a2e000}, - {0x43a30000}, {0x43a32000}, {0x43a34000}, {0x43a36000}, - {0x43a38000}, {0x43a3a000}, {0x43a3c000}, {0x43a3e000}, - {0x43a40000}, {0x43a42000}, {0x43a44000}, {0x43a46000}, - {0x43a48000}, {0x43a4a000}, {0x43a4c000}, {0x43a4e000}, - {0x43a50000}, {0x43a52000}, {0x43a54000}, {0x43a56000}, - {0x43a58000}, {0x43a5a000}, {0x43a5c000}, {0x43a5e000}, - {0x43a60000}, {0x43a62000}, {0x43a64000}, {0x43a66000}, - {0x43a68000}, {0x43a6a000}, {0x43a6c000}, {0x43a6e000}, - {0x43a70000}, {0x43a72000}, {0x43a74000}, {0x43a76000}, - {0x43a78000}, {0x43a7a000}, {0x43a7c000}, {0x43a7e000}, - {0x43a80000}, {0x43a82000}, {0x43a84000}, {0x43a86000}, - {0x43a88000}, {0x43a8a000}, {0x43a8c000}, {0x43a8e000}, - {0x43a90000}, {0x43a92000}, {0x43a94000}, {0x43a96000}, - {0x43a98000}, {0x43a9a000}, {0x43a9c000}, {0x43a9e000}, - {0x43aa0000}, {0x43aa2000}, {0x43aa4000}, {0x43aa6000}, - {0x43aa8000}, {0x43aaa000}, {0x43aac000}, {0x43aae000}, - {0x43ab0000}, {0x43ab2000}, {0x43ab4000}, {0x43ab6000}, - {0x43ab8000}, {0x43aba000}, {0x43abc000}, {0x43abe000}, - {0x43ac0000}, {0x43ac2000}, {0x43ac4000}, {0x43ac6000}, - {0x43ac8000}, {0x43aca000}, {0x43acc000}, {0x43ace000}, - {0x43ad0000}, {0x43ad2000}, {0x43ad4000}, {0x43ad6000}, - {0x43ad8000}, {0x43ada000}, {0x43adc000}, {0x43ade000}, - {0x43ae0000}, {0x43ae2000}, {0x43ae4000}, {0x43ae6000}, - {0x43ae8000}, {0x43aea000}, {0x43aec000}, {0x43aee000}, - {0x43af0000}, {0x43af2000}, {0x43af4000}, {0x43af6000}, - {0x43af8000}, {0x43afa000}, {0x43afc000}, {0x43afe000}, - {0x43b00000}, {0x43b02000}, {0x43b04000}, {0x43b06000}, - {0x43b08000}, {0x43b0a000}, {0x43b0c000}, {0x43b0e000}, - {0x43b10000}, {0x43b12000}, {0x43b14000}, {0x43b16000}, - {0x43b18000}, {0x43b1a000}, {0x43b1c000}, {0x43b1e000}, - {0x43b20000}, {0x43b22000}, {0x43b24000}, {0x43b26000}, - {0x43b28000}, {0x43b2a000}, {0x43b2c000}, {0x43b2e000}, - {0x43b30000}, {0x43b32000}, {0x43b34000}, {0x43b36000}, - {0x43b38000}, {0x43b3a000}, {0x43b3c000}, {0x43b3e000}, - {0x43b40000}, {0x43b42000}, {0x43b44000}, {0x43b46000}, - {0x43b48000}, {0x43b4a000}, {0x43b4c000}, {0x43b4e000}, - {0x43b50000}, {0x43b52000}, {0x43b54000}, {0x43b56000}, - {0x43b58000}, {0x43b5a000}, {0x43b5c000}, {0x43b5e000}, - {0x43b60000}, {0x43b62000}, {0x43b64000}, {0x43b66000}, - {0x43b68000}, {0x43b6a000}, {0x43b6c000}, {0x43b6e000}, - {0x43b70000}, {0x43b72000}, {0x43b74000}, {0x43b76000}, - {0x43b78000}, {0x43b7a000}, {0x43b7c000}, {0x43b7e000}, - {0x43b80000}, {0x43b82000}, {0x43b84000}, {0x43b86000}, - {0x43b88000}, {0x43b8a000}, {0x43b8c000}, {0x43b8e000}, - {0x43b90000}, {0x43b92000}, {0x43b94000}, {0x43b96000}, - {0x43b98000}, {0x43b9a000}, {0x43b9c000}, {0x43b9e000}, - {0x43ba0000}, {0x43ba2000}, {0x43ba4000}, {0x43ba6000}, - {0x43ba8000}, {0x43baa000}, {0x43bac000}, {0x43bae000}, - {0x43bb0000}, {0x43bb2000}, {0x43bb4000}, {0x43bb6000}, - {0x43bb8000}, {0x43bba000}, {0x43bbc000}, {0x43bbe000}, - {0x43bc0000}, {0x43bc2000}, {0x43bc4000}, {0x43bc6000}, - {0x43bc8000}, {0x43bca000}, {0x43bcc000}, {0x43bce000}, - {0x43bd0000}, {0x43bd2000}, {0x43bd4000}, {0x43bd6000}, - {0x43bd8000}, {0x43bda000}, {0x43bdc000}, {0x43bde000}, - {0x43be0000}, {0x43be2000}, {0x43be4000}, {0x43be6000}, - {0x43be8000}, {0x43bea000}, {0x43bec000}, {0x43bee000}, - {0x43bf0000}, {0x43bf2000}, {0x43bf4000}, {0x43bf6000}, - {0x43bf8000}, {0x43bfa000}, {0x43bfc000}, {0x43bfe000}, - {0x43c00000}, {0x43c02000}, {0x43c04000}, {0x43c06000}, - {0x43c08000}, {0x43c0a000}, {0x43c0c000}, {0x43c0e000}, - {0x43c10000}, {0x43c12000}, {0x43c14000}, {0x43c16000}, - {0x43c18000}, {0x43c1a000}, {0x43c1c000}, {0x43c1e000}, - {0x43c20000}, {0x43c22000}, {0x43c24000}, {0x43c26000}, - {0x43c28000}, {0x43c2a000}, {0x43c2c000}, {0x43c2e000}, - {0x43c30000}, {0x43c32000}, {0x43c34000}, {0x43c36000}, - {0x43c38000}, {0x43c3a000}, {0x43c3c000}, {0x43c3e000}, - {0x43c40000}, {0x43c42000}, {0x43c44000}, {0x43c46000}, - {0x43c48000}, {0x43c4a000}, {0x43c4c000}, {0x43c4e000}, - {0x43c50000}, {0x43c52000}, {0x43c54000}, {0x43c56000}, - {0x43c58000}, {0x43c5a000}, {0x43c5c000}, {0x43c5e000}, - {0x43c60000}, {0x43c62000}, {0x43c64000}, {0x43c66000}, - {0x43c68000}, {0x43c6a000}, {0x43c6c000}, {0x43c6e000}, - {0x43c70000}, {0x43c72000}, {0x43c74000}, {0x43c76000}, - {0x43c78000}, {0x43c7a000}, {0x43c7c000}, {0x43c7e000}, - {0x43c80000}, {0x43c82000}, {0x43c84000}, {0x43c86000}, - {0x43c88000}, {0x43c8a000}, {0x43c8c000}, {0x43c8e000}, - {0x43c90000}, {0x43c92000}, {0x43c94000}, {0x43c96000}, - {0x43c98000}, {0x43c9a000}, {0x43c9c000}, {0x43c9e000}, - {0x43ca0000}, {0x43ca2000}, {0x43ca4000}, {0x43ca6000}, - {0x43ca8000}, {0x43caa000}, {0x43cac000}, {0x43cae000}, - {0x43cb0000}, {0x43cb2000}, {0x43cb4000}, {0x43cb6000}, - {0x43cb8000}, {0x43cba000}, {0x43cbc000}, {0x43cbe000}, - {0x43cc0000}, {0x43cc2000}, {0x43cc4000}, {0x43cc6000}, - {0x43cc8000}, {0x43cca000}, {0x43ccc000}, {0x43cce000}, - {0x43cd0000}, {0x43cd2000}, {0x43cd4000}, {0x43cd6000}, - {0x43cd8000}, {0x43cda000}, {0x43cdc000}, {0x43cde000}, - {0x43ce0000}, {0x43ce2000}, {0x43ce4000}, {0x43ce6000}, - {0x43ce8000}, {0x43cea000}, {0x43cec000}, {0x43cee000}, - {0x43cf0000}, {0x43cf2000}, {0x43cf4000}, {0x43cf6000}, - {0x43cf8000}, {0x43cfa000}, {0x43cfc000}, {0x43cfe000}, - {0x43d00000}, {0x43d02000}, {0x43d04000}, {0x43d06000}, - {0x43d08000}, {0x43d0a000}, {0x43d0c000}, {0x43d0e000}, - {0x43d10000}, {0x43d12000}, {0x43d14000}, {0x43d16000}, - {0x43d18000}, {0x43d1a000}, {0x43d1c000}, {0x43d1e000}, - {0x43d20000}, {0x43d22000}, {0x43d24000}, {0x43d26000}, - {0x43d28000}, {0x43d2a000}, {0x43d2c000}, {0x43d2e000}, - {0x43d30000}, {0x43d32000}, {0x43d34000}, {0x43d36000}, - {0x43d38000}, {0x43d3a000}, {0x43d3c000}, {0x43d3e000}, - {0x43d40000}, {0x43d42000}, {0x43d44000}, {0x43d46000}, - {0x43d48000}, {0x43d4a000}, {0x43d4c000}, {0x43d4e000}, - {0x43d50000}, {0x43d52000}, {0x43d54000}, {0x43d56000}, - {0x43d58000}, {0x43d5a000}, {0x43d5c000}, {0x43d5e000}, - {0x43d60000}, {0x43d62000}, {0x43d64000}, {0x43d66000}, - {0x43d68000}, {0x43d6a000}, {0x43d6c000}, {0x43d6e000}, - {0x43d70000}, {0x43d72000}, {0x43d74000}, {0x43d76000}, - {0x43d78000}, {0x43d7a000}, {0x43d7c000}, {0x43d7e000}, - {0x43d80000}, {0x43d82000}, {0x43d84000}, {0x43d86000}, - {0x43d88000}, {0x43d8a000}, {0x43d8c000}, {0x43d8e000}, - {0x43d90000}, {0x43d92000}, {0x43d94000}, {0x43d96000}, - {0x43d98000}, {0x43d9a000}, {0x43d9c000}, {0x43d9e000}, - {0x43da0000}, {0x43da2000}, {0x43da4000}, {0x43da6000}, - {0x43da8000}, {0x43daa000}, {0x43dac000}, {0x43dae000}, - {0x43db0000}, {0x43db2000}, {0x43db4000}, {0x43db6000}, - {0x43db8000}, {0x43dba000}, {0x43dbc000}, {0x43dbe000}, - {0x43dc0000}, {0x43dc2000}, {0x43dc4000}, {0x43dc6000}, - {0x43dc8000}, {0x43dca000}, {0x43dcc000}, {0x43dce000}, - {0x43dd0000}, {0x43dd2000}, {0x43dd4000}, {0x43dd6000}, - {0x43dd8000}, {0x43dda000}, {0x43ddc000}, {0x43dde000}, - {0x43de0000}, {0x43de2000}, {0x43de4000}, {0x43de6000}, - {0x43de8000}, {0x43dea000}, {0x43dec000}, {0x43dee000}, - {0x43df0000}, {0x43df2000}, {0x43df4000}, {0x43df6000}, - {0x43df8000}, {0x43dfa000}, {0x43dfc000}, {0x43dfe000}, - {0x43e00000}, {0x43e02000}, {0x43e04000}, {0x43e06000}, - {0x43e08000}, {0x43e0a000}, {0x43e0c000}, {0x43e0e000}, - {0x43e10000}, {0x43e12000}, {0x43e14000}, {0x43e16000}, - {0x43e18000}, {0x43e1a000}, {0x43e1c000}, {0x43e1e000}, - {0x43e20000}, {0x43e22000}, {0x43e24000}, {0x43e26000}, - {0x43e28000}, {0x43e2a000}, {0x43e2c000}, {0x43e2e000}, - {0x43e30000}, {0x43e32000}, {0x43e34000}, {0x43e36000}, - {0x43e38000}, {0x43e3a000}, {0x43e3c000}, {0x43e3e000}, - {0x43e40000}, {0x43e42000}, {0x43e44000}, {0x43e46000}, - {0x43e48000}, {0x43e4a000}, {0x43e4c000}, {0x43e4e000}, - {0x43e50000}, {0x43e52000}, {0x43e54000}, {0x43e56000}, - {0x43e58000}, {0x43e5a000}, {0x43e5c000}, {0x43e5e000}, - {0x43e60000}, {0x43e62000}, {0x43e64000}, {0x43e66000}, - {0x43e68000}, {0x43e6a000}, {0x43e6c000}, {0x43e6e000}, - {0x43e70000}, {0x43e72000}, {0x43e74000}, {0x43e76000}, - {0x43e78000}, {0x43e7a000}, {0x43e7c000}, {0x43e7e000}, - {0x43e80000}, {0x43e82000}, {0x43e84000}, {0x43e86000}, - {0x43e88000}, {0x43e8a000}, {0x43e8c000}, {0x43e8e000}, - {0x43e90000}, {0x43e92000}, {0x43e94000}, {0x43e96000}, - {0x43e98000}, {0x43e9a000}, {0x43e9c000}, {0x43e9e000}, - {0x43ea0000}, {0x43ea2000}, {0x43ea4000}, {0x43ea6000}, - {0x43ea8000}, {0x43eaa000}, {0x43eac000}, {0x43eae000}, - {0x43eb0000}, {0x43eb2000}, {0x43eb4000}, {0x43eb6000}, - {0x43eb8000}, {0x43eba000}, {0x43ebc000}, {0x43ebe000}, - {0x43ec0000}, {0x43ec2000}, {0x43ec4000}, {0x43ec6000}, - {0x43ec8000}, {0x43eca000}, {0x43ecc000}, {0x43ece000}, - {0x43ed0000}, {0x43ed2000}, {0x43ed4000}, {0x43ed6000}, - {0x43ed8000}, {0x43eda000}, {0x43edc000}, {0x43ede000}, - {0x43ee0000}, {0x43ee2000}, {0x43ee4000}, {0x43ee6000}, - {0x43ee8000}, {0x43eea000}, {0x43eec000}, {0x43eee000}, - {0x43ef0000}, {0x43ef2000}, {0x43ef4000}, {0x43ef6000}, - {0x43ef8000}, {0x43efa000}, {0x43efc000}, {0x43efe000}, - {0x43f00000}, {0x43f02000}, {0x43f04000}, {0x43f06000}, - {0x43f08000}, {0x43f0a000}, {0x43f0c000}, {0x43f0e000}, - {0x43f10000}, {0x43f12000}, {0x43f14000}, {0x43f16000}, - {0x43f18000}, {0x43f1a000}, {0x43f1c000}, {0x43f1e000}, - {0x43f20000}, {0x43f22000}, {0x43f24000}, {0x43f26000}, - {0x43f28000}, {0x43f2a000}, {0x43f2c000}, {0x43f2e000}, - {0x43f30000}, {0x43f32000}, {0x43f34000}, {0x43f36000}, - {0x43f38000}, {0x43f3a000}, {0x43f3c000}, {0x43f3e000}, - {0x43f40000}, {0x43f42000}, {0x43f44000}, {0x43f46000}, - {0x43f48000}, {0x43f4a000}, {0x43f4c000}, {0x43f4e000}, - {0x43f50000}, {0x43f52000}, {0x43f54000}, {0x43f56000}, - {0x43f58000}, {0x43f5a000}, {0x43f5c000}, {0x43f5e000}, - {0x43f60000}, {0x43f62000}, {0x43f64000}, {0x43f66000}, - {0x43f68000}, {0x43f6a000}, {0x43f6c000}, {0x43f6e000}, - {0x43f70000}, {0x43f72000}, {0x43f74000}, {0x43f76000}, - {0x43f78000}, {0x43f7a000}, {0x43f7c000}, {0x43f7e000}, - {0x43f80000}, {0x43f82000}, {0x43f84000}, {0x43f86000}, - {0x43f88000}, {0x43f8a000}, {0x43f8c000}, {0x43f8e000}, - {0x43f90000}, {0x43f92000}, {0x43f94000}, {0x43f96000}, - {0x43f98000}, {0x43f9a000}, {0x43f9c000}, {0x43f9e000}, - {0x43fa0000}, {0x43fa2000}, {0x43fa4000}, {0x43fa6000}, - {0x43fa8000}, {0x43faa000}, {0x43fac000}, {0x43fae000}, - {0x43fb0000}, {0x43fb2000}, {0x43fb4000}, {0x43fb6000}, - {0x43fb8000}, {0x43fba000}, {0x43fbc000}, {0x43fbe000}, - {0x43fc0000}, {0x43fc2000}, {0x43fc4000}, {0x43fc6000}, - {0x43fc8000}, {0x43fca000}, {0x43fcc000}, {0x43fce000}, - {0x43fd0000}, {0x43fd2000}, {0x43fd4000}, {0x43fd6000}, - {0x43fd8000}, {0x43fda000}, {0x43fdc000}, {0x43fde000}, - {0x43fe0000}, {0x43fe2000}, {0x43fe4000}, {0x43fe6000}, - {0x43fe8000}, {0x43fea000}, {0x43fec000}, {0x43fee000}, - {0x43ff0000}, {0x43ff2000}, {0x43ff4000}, {0x43ff6000}, - {0x43ff8000}, {0x43ffa000}, {0x43ffc000}, {0x43ffe000}, - {0x44000000}, {0x44002000}, {0x44004000}, {0x44006000}, - {0x44008000}, {0x4400a000}, {0x4400c000}, {0x4400e000}, - {0x44010000}, {0x44012000}, {0x44014000}, {0x44016000}, - {0x44018000}, {0x4401a000}, {0x4401c000}, {0x4401e000}, - {0x44020000}, {0x44022000}, {0x44024000}, {0x44026000}, - {0x44028000}, {0x4402a000}, {0x4402c000}, {0x4402e000}, - {0x44030000}, {0x44032000}, {0x44034000}, {0x44036000}, - {0x44038000}, {0x4403a000}, {0x4403c000}, {0x4403e000}, - {0x44040000}, {0x44042000}, {0x44044000}, {0x44046000}, - {0x44048000}, {0x4404a000}, {0x4404c000}, {0x4404e000}, - {0x44050000}, {0x44052000}, {0x44054000}, {0x44056000}, - {0x44058000}, {0x4405a000}, {0x4405c000}, {0x4405e000}, - {0x44060000}, {0x44062000}, {0x44064000}, {0x44066000}, - {0x44068000}, {0x4406a000}, {0x4406c000}, {0x4406e000}, - {0x44070000}, {0x44072000}, {0x44074000}, {0x44076000}, - {0x44078000}, {0x4407a000}, {0x4407c000}, {0x4407e000}, - {0x44080000}, {0x44082000}, {0x44084000}, {0x44086000}, - {0x44088000}, {0x4408a000}, {0x4408c000}, {0x4408e000}, - {0x44090000}, {0x44092000}, {0x44094000}, {0x44096000}, - {0x44098000}, {0x4409a000}, {0x4409c000}, {0x4409e000}, - {0x440a0000}, {0x440a2000}, {0x440a4000}, {0x440a6000}, - {0x440a8000}, {0x440aa000}, {0x440ac000}, {0x440ae000}, - {0x440b0000}, {0x440b2000}, {0x440b4000}, {0x440b6000}, - {0x440b8000}, {0x440ba000}, {0x440bc000}, {0x440be000}, - {0x440c0000}, {0x440c2000}, {0x440c4000}, {0x440c6000}, - {0x440c8000}, {0x440ca000}, {0x440cc000}, {0x440ce000}, - {0x440d0000}, {0x440d2000}, {0x440d4000}, {0x440d6000}, - {0x440d8000}, {0x440da000}, {0x440dc000}, {0x440de000}, - {0x440e0000}, {0x440e2000}, {0x440e4000}, {0x440e6000}, - {0x440e8000}, {0x440ea000}, {0x440ec000}, {0x440ee000}, - {0x440f0000}, {0x440f2000}, {0x440f4000}, {0x440f6000}, - {0x440f8000}, {0x440fa000}, {0x440fc000}, {0x440fe000}, - {0x44100000}, {0x44102000}, {0x44104000}, {0x44106000}, - {0x44108000}, {0x4410a000}, {0x4410c000}, {0x4410e000}, - {0x44110000}, {0x44112000}, {0x44114000}, {0x44116000}, - {0x44118000}, {0x4411a000}, {0x4411c000}, {0x4411e000}, - {0x44120000}, {0x44122000}, {0x44124000}, {0x44126000}, - {0x44128000}, {0x4412a000}, {0x4412c000}, {0x4412e000}, - {0x44130000}, {0x44132000}, {0x44134000}, {0x44136000}, - {0x44138000}, {0x4413a000}, {0x4413c000}, {0x4413e000}, - {0x44140000}, {0x44142000}, {0x44144000}, {0x44146000}, - {0x44148000}, {0x4414a000}, {0x4414c000}, {0x4414e000}, - {0x44150000}, {0x44152000}, {0x44154000}, {0x44156000}, - {0x44158000}, {0x4415a000}, {0x4415c000}, {0x4415e000}, - {0x44160000}, {0x44162000}, {0x44164000}, {0x44166000}, - {0x44168000}, {0x4416a000}, {0x4416c000}, {0x4416e000}, - {0x44170000}, {0x44172000}, {0x44174000}, {0x44176000}, - {0x44178000}, {0x4417a000}, {0x4417c000}, {0x4417e000}, - {0x44180000}, {0x44182000}, {0x44184000}, {0x44186000}, - {0x44188000}, {0x4418a000}, {0x4418c000}, {0x4418e000}, - {0x44190000}, {0x44192000}, {0x44194000}, {0x44196000}, - {0x44198000}, {0x4419a000}, {0x4419c000}, {0x4419e000}, - {0x441a0000}, {0x441a2000}, {0x441a4000}, {0x441a6000}, - {0x441a8000}, {0x441aa000}, {0x441ac000}, {0x441ae000}, - {0x441b0000}, {0x441b2000}, {0x441b4000}, {0x441b6000}, - {0x441b8000}, {0x441ba000}, {0x441bc000}, {0x441be000}, - {0x441c0000}, {0x441c2000}, {0x441c4000}, {0x441c6000}, - {0x441c8000}, {0x441ca000}, {0x441cc000}, {0x441ce000}, - {0x441d0000}, {0x441d2000}, {0x441d4000}, {0x441d6000}, - {0x441d8000}, {0x441da000}, {0x441dc000}, {0x441de000}, - {0x441e0000}, {0x441e2000}, {0x441e4000}, {0x441e6000}, - {0x441e8000}, {0x441ea000}, {0x441ec000}, {0x441ee000}, - {0x441f0000}, {0x441f2000}, {0x441f4000}, {0x441f6000}, - {0x441f8000}, {0x441fa000}, {0x441fc000}, {0x441fe000}, - {0x44200000}, {0x44202000}, {0x44204000}, {0x44206000}, - {0x44208000}, {0x4420a000}, {0x4420c000}, {0x4420e000}, - {0x44210000}, {0x44212000}, {0x44214000}, {0x44216000}, - {0x44218000}, {0x4421a000}, {0x4421c000}, {0x4421e000}, - {0x44220000}, {0x44222000}, {0x44224000}, {0x44226000}, - {0x44228000}, {0x4422a000}, {0x4422c000}, {0x4422e000}, - {0x44230000}, {0x44232000}, {0x44234000}, {0x44236000}, - {0x44238000}, {0x4423a000}, {0x4423c000}, {0x4423e000}, - {0x44240000}, {0x44242000}, {0x44244000}, {0x44246000}, - {0x44248000}, {0x4424a000}, {0x4424c000}, {0x4424e000}, - {0x44250000}, {0x44252000}, {0x44254000}, {0x44256000}, - {0x44258000}, {0x4425a000}, {0x4425c000}, {0x4425e000}, - {0x44260000}, {0x44262000}, {0x44264000}, {0x44266000}, - {0x44268000}, {0x4426a000}, {0x4426c000}, {0x4426e000}, - {0x44270000}, {0x44272000}, {0x44274000}, {0x44276000}, - {0x44278000}, {0x4427a000}, {0x4427c000}, {0x4427e000}, - {0x44280000}, {0x44282000}, {0x44284000}, {0x44286000}, - {0x44288000}, {0x4428a000}, {0x4428c000}, {0x4428e000}, - {0x44290000}, {0x44292000}, {0x44294000}, {0x44296000}, - {0x44298000}, {0x4429a000}, {0x4429c000}, {0x4429e000}, - {0x442a0000}, {0x442a2000}, {0x442a4000}, {0x442a6000}, - {0x442a8000}, {0x442aa000}, {0x442ac000}, {0x442ae000}, - {0x442b0000}, {0x442b2000}, {0x442b4000}, {0x442b6000}, - {0x442b8000}, {0x442ba000}, {0x442bc000}, {0x442be000}, - {0x442c0000}, {0x442c2000}, {0x442c4000}, {0x442c6000}, - {0x442c8000}, {0x442ca000}, {0x442cc000}, {0x442ce000}, - {0x442d0000}, {0x442d2000}, {0x442d4000}, {0x442d6000}, - {0x442d8000}, {0x442da000}, {0x442dc000}, {0x442de000}, - {0x442e0000}, {0x442e2000}, {0x442e4000}, {0x442e6000}, - {0x442e8000}, {0x442ea000}, {0x442ec000}, {0x442ee000}, - {0x442f0000}, {0x442f2000}, {0x442f4000}, {0x442f6000}, - {0x442f8000}, {0x442fa000}, {0x442fc000}, {0x442fe000}, - {0x44300000}, {0x44302000}, {0x44304000}, {0x44306000}, - {0x44308000}, {0x4430a000}, {0x4430c000}, {0x4430e000}, - {0x44310000}, {0x44312000}, {0x44314000}, {0x44316000}, - {0x44318000}, {0x4431a000}, {0x4431c000}, {0x4431e000}, - {0x44320000}, {0x44322000}, {0x44324000}, {0x44326000}, - {0x44328000}, {0x4432a000}, {0x4432c000}, {0x4432e000}, - {0x44330000}, {0x44332000}, {0x44334000}, {0x44336000}, - {0x44338000}, {0x4433a000}, {0x4433c000}, {0x4433e000}, - {0x44340000}, {0x44342000}, {0x44344000}, {0x44346000}, - {0x44348000}, {0x4434a000}, {0x4434c000}, {0x4434e000}, - {0x44350000}, {0x44352000}, {0x44354000}, {0x44356000}, - {0x44358000}, {0x4435a000}, {0x4435c000}, {0x4435e000}, - {0x44360000}, {0x44362000}, {0x44364000}, {0x44366000}, - {0x44368000}, {0x4436a000}, {0x4436c000}, {0x4436e000}, - {0x44370000}, {0x44372000}, {0x44374000}, {0x44376000}, - {0x44378000}, {0x4437a000}, {0x4437c000}, {0x4437e000}, - {0x44380000}, {0x44382000}, {0x44384000}, {0x44386000}, - {0x44388000}, {0x4438a000}, {0x4438c000}, {0x4438e000}, - {0x44390000}, {0x44392000}, {0x44394000}, {0x44396000}, - {0x44398000}, {0x4439a000}, {0x4439c000}, {0x4439e000}, - {0x443a0000}, {0x443a2000}, {0x443a4000}, {0x443a6000}, - {0x443a8000}, {0x443aa000}, {0x443ac000}, {0x443ae000}, - {0x443b0000}, {0x443b2000}, {0x443b4000}, {0x443b6000}, - {0x443b8000}, {0x443ba000}, {0x443bc000}, {0x443be000}, - {0x443c0000}, {0x443c2000}, {0x443c4000}, {0x443c6000}, - {0x443c8000}, {0x443ca000}, {0x443cc000}, {0x443ce000}, - {0x443d0000}, {0x443d2000}, {0x443d4000}, {0x443d6000}, - {0x443d8000}, {0x443da000}, {0x443dc000}, {0x443de000}, - {0x443e0000}, {0x443e2000}, {0x443e4000}, {0x443e6000}, - {0x443e8000}, {0x443ea000}, {0x443ec000}, {0x443ee000}, - {0x443f0000}, {0x443f2000}, {0x443f4000}, {0x443f6000}, - {0x443f8000}, {0x443fa000}, {0x443fc000}, {0x443fe000}, - {0x44400000}, {0x44402000}, {0x44404000}, {0x44406000}, - {0x44408000}, {0x4440a000}, {0x4440c000}, {0x4440e000}, - {0x44410000}, {0x44412000}, {0x44414000}, {0x44416000}, - {0x44418000}, {0x4441a000}, {0x4441c000}, {0x4441e000}, - {0x44420000}, {0x44422000}, {0x44424000}, {0x44426000}, - {0x44428000}, {0x4442a000}, {0x4442c000}, {0x4442e000}, - {0x44430000}, {0x44432000}, {0x44434000}, {0x44436000}, - {0x44438000}, {0x4443a000}, {0x4443c000}, {0x4443e000}, - {0x44440000}, {0x44442000}, {0x44444000}, {0x44446000}, - {0x44448000}, {0x4444a000}, {0x4444c000}, {0x4444e000}, - {0x44450000}, {0x44452000}, {0x44454000}, {0x44456000}, - {0x44458000}, {0x4445a000}, {0x4445c000}, {0x4445e000}, - {0x44460000}, {0x44462000}, {0x44464000}, {0x44466000}, - {0x44468000}, {0x4446a000}, {0x4446c000}, {0x4446e000}, - {0x44470000}, {0x44472000}, {0x44474000}, {0x44476000}, - {0x44478000}, {0x4447a000}, {0x4447c000}, {0x4447e000}, - {0x44480000}, {0x44482000}, {0x44484000}, {0x44486000}, - {0x44488000}, {0x4448a000}, {0x4448c000}, {0x4448e000}, - {0x44490000}, {0x44492000}, {0x44494000}, {0x44496000}, - {0x44498000}, {0x4449a000}, {0x4449c000}, {0x4449e000}, - {0x444a0000}, {0x444a2000}, {0x444a4000}, {0x444a6000}, - {0x444a8000}, {0x444aa000}, {0x444ac000}, {0x444ae000}, - {0x444b0000}, {0x444b2000}, {0x444b4000}, {0x444b6000}, - {0x444b8000}, {0x444ba000}, {0x444bc000}, {0x444be000}, - {0x444c0000}, {0x444c2000}, {0x444c4000}, {0x444c6000}, - {0x444c8000}, {0x444ca000}, {0x444cc000}, {0x444ce000}, - {0x444d0000}, {0x444d2000}, {0x444d4000}, {0x444d6000}, - {0x444d8000}, {0x444da000}, {0x444dc000}, {0x444de000}, - {0x444e0000}, {0x444e2000}, {0x444e4000}, {0x444e6000}, - {0x444e8000}, {0x444ea000}, {0x444ec000}, {0x444ee000}, - {0x444f0000}, {0x444f2000}, {0x444f4000}, {0x444f6000}, - {0x444f8000}, {0x444fa000}, {0x444fc000}, {0x444fe000}, - {0x44500000}, {0x44502000}, {0x44504000}, {0x44506000}, - {0x44508000}, {0x4450a000}, {0x4450c000}, {0x4450e000}, - {0x44510000}, {0x44512000}, {0x44514000}, {0x44516000}, - {0x44518000}, {0x4451a000}, {0x4451c000}, {0x4451e000}, - {0x44520000}, {0x44522000}, {0x44524000}, {0x44526000}, - {0x44528000}, {0x4452a000}, {0x4452c000}, {0x4452e000}, - {0x44530000}, {0x44532000}, {0x44534000}, {0x44536000}, - {0x44538000}, {0x4453a000}, {0x4453c000}, {0x4453e000}, - {0x44540000}, {0x44542000}, {0x44544000}, {0x44546000}, - {0x44548000}, {0x4454a000}, {0x4454c000}, {0x4454e000}, - {0x44550000}, {0x44552000}, {0x44554000}, {0x44556000}, - {0x44558000}, {0x4455a000}, {0x4455c000}, {0x4455e000}, - {0x44560000}, {0x44562000}, {0x44564000}, {0x44566000}, - {0x44568000}, {0x4456a000}, {0x4456c000}, {0x4456e000}, - {0x44570000}, {0x44572000}, {0x44574000}, {0x44576000}, - {0x44578000}, {0x4457a000}, {0x4457c000}, {0x4457e000}, - {0x44580000}, {0x44582000}, {0x44584000}, {0x44586000}, - {0x44588000}, {0x4458a000}, {0x4458c000}, {0x4458e000}, - {0x44590000}, {0x44592000}, {0x44594000}, {0x44596000}, - {0x44598000}, {0x4459a000}, {0x4459c000}, {0x4459e000}, - {0x445a0000}, {0x445a2000}, {0x445a4000}, {0x445a6000}, - {0x445a8000}, {0x445aa000}, {0x445ac000}, {0x445ae000}, - {0x445b0000}, {0x445b2000}, {0x445b4000}, {0x445b6000}, - {0x445b8000}, {0x445ba000}, {0x445bc000}, {0x445be000}, - {0x445c0000}, {0x445c2000}, {0x445c4000}, {0x445c6000}, - {0x445c8000}, {0x445ca000}, {0x445cc000}, {0x445ce000}, - {0x445d0000}, {0x445d2000}, {0x445d4000}, {0x445d6000}, - {0x445d8000}, {0x445da000}, {0x445dc000}, {0x445de000}, - {0x445e0000}, {0x445e2000}, {0x445e4000}, {0x445e6000}, - {0x445e8000}, {0x445ea000}, {0x445ec000}, {0x445ee000}, - {0x445f0000}, {0x445f2000}, {0x445f4000}, {0x445f6000}, - {0x445f8000}, {0x445fa000}, {0x445fc000}, {0x445fe000}, - {0x44600000}, {0x44602000}, {0x44604000}, {0x44606000}, - {0x44608000}, {0x4460a000}, {0x4460c000}, {0x4460e000}, - {0x44610000}, {0x44612000}, {0x44614000}, {0x44616000}, - {0x44618000}, {0x4461a000}, {0x4461c000}, {0x4461e000}, - {0x44620000}, {0x44622000}, {0x44624000}, {0x44626000}, - {0x44628000}, {0x4462a000}, {0x4462c000}, {0x4462e000}, - {0x44630000}, {0x44632000}, {0x44634000}, {0x44636000}, - {0x44638000}, {0x4463a000}, {0x4463c000}, {0x4463e000}, - {0x44640000}, {0x44642000}, {0x44644000}, {0x44646000}, - {0x44648000}, {0x4464a000}, {0x4464c000}, {0x4464e000}, - {0x44650000}, {0x44652000}, {0x44654000}, {0x44656000}, - {0x44658000}, {0x4465a000}, {0x4465c000}, {0x4465e000}, - {0x44660000}, {0x44662000}, {0x44664000}, {0x44666000}, - {0x44668000}, {0x4466a000}, {0x4466c000}, {0x4466e000}, - {0x44670000}, {0x44672000}, {0x44674000}, {0x44676000}, - {0x44678000}, {0x4467a000}, {0x4467c000}, {0x4467e000}, - {0x44680000}, {0x44682000}, {0x44684000}, {0x44686000}, - {0x44688000}, {0x4468a000}, {0x4468c000}, {0x4468e000}, - {0x44690000}, {0x44692000}, {0x44694000}, {0x44696000}, - {0x44698000}, {0x4469a000}, {0x4469c000}, {0x4469e000}, - {0x446a0000}, {0x446a2000}, {0x446a4000}, {0x446a6000}, - {0x446a8000}, {0x446aa000}, {0x446ac000}, {0x446ae000}, - {0x446b0000}, {0x446b2000}, {0x446b4000}, {0x446b6000}, - {0x446b8000}, {0x446ba000}, {0x446bc000}, {0x446be000}, - {0x446c0000}, {0x446c2000}, {0x446c4000}, {0x446c6000}, - {0x446c8000}, {0x446ca000}, {0x446cc000}, {0x446ce000}, - {0x446d0000}, {0x446d2000}, {0x446d4000}, {0x446d6000}, - {0x446d8000}, {0x446da000}, {0x446dc000}, {0x446de000}, - {0x446e0000}, {0x446e2000}, {0x446e4000}, {0x446e6000}, - {0x446e8000}, {0x446ea000}, {0x446ec000}, {0x446ee000}, - {0x446f0000}, {0x446f2000}, {0x446f4000}, {0x446f6000}, - {0x446f8000}, {0x446fa000}, {0x446fc000}, {0x446fe000}, - {0x44700000}, {0x44702000}, {0x44704000}, {0x44706000}, - {0x44708000}, {0x4470a000}, {0x4470c000}, {0x4470e000}, - {0x44710000}, {0x44712000}, {0x44714000}, {0x44716000}, - {0x44718000}, {0x4471a000}, {0x4471c000}, {0x4471e000}, - {0x44720000}, {0x44722000}, {0x44724000}, {0x44726000}, - {0x44728000}, {0x4472a000}, {0x4472c000}, {0x4472e000}, - {0x44730000}, {0x44732000}, {0x44734000}, {0x44736000}, - {0x44738000}, {0x4473a000}, {0x4473c000}, {0x4473e000}, - {0x44740000}, {0x44742000}, {0x44744000}, {0x44746000}, - {0x44748000}, {0x4474a000}, {0x4474c000}, {0x4474e000}, - {0x44750000}, {0x44752000}, {0x44754000}, {0x44756000}, - {0x44758000}, {0x4475a000}, {0x4475c000}, {0x4475e000}, - {0x44760000}, {0x44762000}, {0x44764000}, {0x44766000}, - {0x44768000}, {0x4476a000}, {0x4476c000}, {0x4476e000}, - {0x44770000}, {0x44772000}, {0x44774000}, {0x44776000}, - {0x44778000}, {0x4477a000}, {0x4477c000}, {0x4477e000}, - {0x44780000}, {0x44782000}, {0x44784000}, {0x44786000}, - {0x44788000}, {0x4478a000}, {0x4478c000}, {0x4478e000}, - {0x44790000}, {0x44792000}, {0x44794000}, {0x44796000}, - {0x44798000}, {0x4479a000}, {0x4479c000}, {0x4479e000}, - {0x447a0000}, {0x447a2000}, {0x447a4000}, {0x447a6000}, - {0x447a8000}, {0x447aa000}, {0x447ac000}, {0x447ae000}, - {0x447b0000}, {0x447b2000}, {0x447b4000}, {0x447b6000}, - {0x447b8000}, {0x447ba000}, {0x447bc000}, {0x447be000}, - {0x447c0000}, {0x447c2000}, {0x447c4000}, {0x447c6000}, - {0x447c8000}, {0x447ca000}, {0x447cc000}, {0x447ce000}, - {0x447d0000}, {0x447d2000}, {0x447d4000}, {0x447d6000}, - {0x447d8000}, {0x447da000}, {0x447dc000}, {0x447de000}, - {0x447e0000}, {0x447e2000}, {0x447e4000}, {0x447e6000}, - {0x447e8000}, {0x447ea000}, {0x447ec000}, {0x447ee000}, - {0x447f0000}, {0x447f2000}, {0x447f4000}, {0x447f6000}, - {0x447f8000}, {0x447fa000}, {0x447fc000}, {0x447fe000}, - {0x44800000}, {0x44802000}, {0x44804000}, {0x44806000}, - {0x44808000}, {0x4480a000}, {0x4480c000}, {0x4480e000}, - {0x44810000}, {0x44812000}, {0x44814000}, {0x44816000}, - {0x44818000}, {0x4481a000}, {0x4481c000}, {0x4481e000}, - {0x44820000}, {0x44822000}, {0x44824000}, {0x44826000}, - {0x44828000}, {0x4482a000}, {0x4482c000}, {0x4482e000}, - {0x44830000}, {0x44832000}, {0x44834000}, {0x44836000}, - {0x44838000}, {0x4483a000}, {0x4483c000}, {0x4483e000}, - {0x44840000}, {0x44842000}, {0x44844000}, {0x44846000}, - {0x44848000}, {0x4484a000}, {0x4484c000}, {0x4484e000}, - {0x44850000}, {0x44852000}, {0x44854000}, {0x44856000}, - {0x44858000}, {0x4485a000}, {0x4485c000}, {0x4485e000}, - {0x44860000}, {0x44862000}, {0x44864000}, {0x44866000}, - {0x44868000}, {0x4486a000}, {0x4486c000}, {0x4486e000}, - {0x44870000}, {0x44872000}, {0x44874000}, {0x44876000}, - {0x44878000}, {0x4487a000}, {0x4487c000}, {0x4487e000}, - {0x44880000}, {0x44882000}, {0x44884000}, {0x44886000}, - {0x44888000}, {0x4488a000}, {0x4488c000}, {0x4488e000}, - {0x44890000}, {0x44892000}, {0x44894000}, {0x44896000}, - {0x44898000}, {0x4489a000}, {0x4489c000}, {0x4489e000}, - {0x448a0000}, {0x448a2000}, {0x448a4000}, {0x448a6000}, - {0x448a8000}, {0x448aa000}, {0x448ac000}, {0x448ae000}, - {0x448b0000}, {0x448b2000}, {0x448b4000}, {0x448b6000}, - {0x448b8000}, {0x448ba000}, {0x448bc000}, {0x448be000}, - {0x448c0000}, {0x448c2000}, {0x448c4000}, {0x448c6000}, - {0x448c8000}, {0x448ca000}, {0x448cc000}, {0x448ce000}, - {0x448d0000}, {0x448d2000}, {0x448d4000}, {0x448d6000}, - {0x448d8000}, {0x448da000}, {0x448dc000}, {0x448de000}, - {0x448e0000}, {0x448e2000}, {0x448e4000}, {0x448e6000}, - {0x448e8000}, {0x448ea000}, {0x448ec000}, {0x448ee000}, - {0x448f0000}, {0x448f2000}, {0x448f4000}, {0x448f6000}, - {0x448f8000}, {0x448fa000}, {0x448fc000}, {0x448fe000}, - {0x44900000}, {0x44902000}, {0x44904000}, {0x44906000}, - {0x44908000}, {0x4490a000}, {0x4490c000}, {0x4490e000}, - {0x44910000}, {0x44912000}, {0x44914000}, {0x44916000}, - {0x44918000}, {0x4491a000}, {0x4491c000}, {0x4491e000}, - {0x44920000}, {0x44922000}, {0x44924000}, {0x44926000}, - {0x44928000}, {0x4492a000}, {0x4492c000}, {0x4492e000}, - {0x44930000}, {0x44932000}, {0x44934000}, {0x44936000}, - {0x44938000}, {0x4493a000}, {0x4493c000}, {0x4493e000}, - {0x44940000}, {0x44942000}, {0x44944000}, {0x44946000}, - {0x44948000}, {0x4494a000}, {0x4494c000}, {0x4494e000}, - {0x44950000}, {0x44952000}, {0x44954000}, {0x44956000}, - {0x44958000}, {0x4495a000}, {0x4495c000}, {0x4495e000}, - {0x44960000}, {0x44962000}, {0x44964000}, {0x44966000}, - {0x44968000}, {0x4496a000}, {0x4496c000}, {0x4496e000}, - {0x44970000}, {0x44972000}, {0x44974000}, {0x44976000}, - {0x44978000}, {0x4497a000}, {0x4497c000}, {0x4497e000}, - {0x44980000}, {0x44982000}, {0x44984000}, {0x44986000}, - {0x44988000}, {0x4498a000}, {0x4498c000}, {0x4498e000}, - {0x44990000}, {0x44992000}, {0x44994000}, {0x44996000}, - {0x44998000}, {0x4499a000}, {0x4499c000}, {0x4499e000}, - {0x449a0000}, {0x449a2000}, {0x449a4000}, {0x449a6000}, - {0x449a8000}, {0x449aa000}, {0x449ac000}, {0x449ae000}, - {0x449b0000}, {0x449b2000}, {0x449b4000}, {0x449b6000}, - {0x449b8000}, {0x449ba000}, {0x449bc000}, {0x449be000}, - {0x449c0000}, {0x449c2000}, {0x449c4000}, {0x449c6000}, - {0x449c8000}, {0x449ca000}, {0x449cc000}, {0x449ce000}, - {0x449d0000}, {0x449d2000}, {0x449d4000}, {0x449d6000}, - {0x449d8000}, {0x449da000}, {0x449dc000}, {0x449de000}, - {0x449e0000}, {0x449e2000}, {0x449e4000}, {0x449e6000}, - {0x449e8000}, {0x449ea000}, {0x449ec000}, {0x449ee000}, - {0x449f0000}, {0x449f2000}, {0x449f4000}, {0x449f6000}, - {0x449f8000}, {0x449fa000}, {0x449fc000}, {0x449fe000}, - {0x44a00000}, {0x44a02000}, {0x44a04000}, {0x44a06000}, - {0x44a08000}, {0x44a0a000}, {0x44a0c000}, {0x44a0e000}, - {0x44a10000}, {0x44a12000}, {0x44a14000}, {0x44a16000}, - {0x44a18000}, {0x44a1a000}, {0x44a1c000}, {0x44a1e000}, - {0x44a20000}, {0x44a22000}, {0x44a24000}, {0x44a26000}, - {0x44a28000}, {0x44a2a000}, {0x44a2c000}, {0x44a2e000}, - {0x44a30000}, {0x44a32000}, {0x44a34000}, {0x44a36000}, - {0x44a38000}, {0x44a3a000}, {0x44a3c000}, {0x44a3e000}, - {0x44a40000}, {0x44a42000}, {0x44a44000}, {0x44a46000}, - {0x44a48000}, {0x44a4a000}, {0x44a4c000}, {0x44a4e000}, - {0x44a50000}, {0x44a52000}, {0x44a54000}, {0x44a56000}, - {0x44a58000}, {0x44a5a000}, {0x44a5c000}, {0x44a5e000}, - {0x44a60000}, {0x44a62000}, {0x44a64000}, {0x44a66000}, - {0x44a68000}, {0x44a6a000}, {0x44a6c000}, {0x44a6e000}, - {0x44a70000}, {0x44a72000}, {0x44a74000}, {0x44a76000}, - {0x44a78000}, {0x44a7a000}, {0x44a7c000}, {0x44a7e000}, - {0x44a80000}, {0x44a82000}, {0x44a84000}, {0x44a86000}, - {0x44a88000}, {0x44a8a000}, {0x44a8c000}, {0x44a8e000}, - {0x44a90000}, {0x44a92000}, {0x44a94000}, {0x44a96000}, - {0x44a98000}, {0x44a9a000}, {0x44a9c000}, {0x44a9e000}, - {0x44aa0000}, {0x44aa2000}, {0x44aa4000}, {0x44aa6000}, - {0x44aa8000}, {0x44aaa000}, {0x44aac000}, {0x44aae000}, - {0x44ab0000}, {0x44ab2000}, {0x44ab4000}, {0x44ab6000}, - {0x44ab8000}, {0x44aba000}, {0x44abc000}, {0x44abe000}, - {0x44ac0000}, {0x44ac2000}, {0x44ac4000}, {0x44ac6000}, - {0x44ac8000}, {0x44aca000}, {0x44acc000}, {0x44ace000}, - {0x44ad0000}, {0x44ad2000}, {0x44ad4000}, {0x44ad6000}, - {0x44ad8000}, {0x44ada000}, {0x44adc000}, {0x44ade000}, - {0x44ae0000}, {0x44ae2000}, {0x44ae4000}, {0x44ae6000}, - {0x44ae8000}, {0x44aea000}, {0x44aec000}, {0x44aee000}, - {0x44af0000}, {0x44af2000}, {0x44af4000}, {0x44af6000}, - {0x44af8000}, {0x44afa000}, {0x44afc000}, {0x44afe000}, - {0x44b00000}, {0x44b02000}, {0x44b04000}, {0x44b06000}, - {0x44b08000}, {0x44b0a000}, {0x44b0c000}, {0x44b0e000}, - {0x44b10000}, {0x44b12000}, {0x44b14000}, {0x44b16000}, - {0x44b18000}, {0x44b1a000}, {0x44b1c000}, {0x44b1e000}, - {0x44b20000}, {0x44b22000}, {0x44b24000}, {0x44b26000}, - {0x44b28000}, {0x44b2a000}, {0x44b2c000}, {0x44b2e000}, - {0x44b30000}, {0x44b32000}, {0x44b34000}, {0x44b36000}, - {0x44b38000}, {0x44b3a000}, {0x44b3c000}, {0x44b3e000}, - {0x44b40000}, {0x44b42000}, {0x44b44000}, {0x44b46000}, - {0x44b48000}, {0x44b4a000}, {0x44b4c000}, {0x44b4e000}, - {0x44b50000}, {0x44b52000}, {0x44b54000}, {0x44b56000}, - {0x44b58000}, {0x44b5a000}, {0x44b5c000}, {0x44b5e000}, - {0x44b60000}, {0x44b62000}, {0x44b64000}, {0x44b66000}, - {0x44b68000}, {0x44b6a000}, {0x44b6c000}, {0x44b6e000}, - {0x44b70000}, {0x44b72000}, {0x44b74000}, {0x44b76000}, - {0x44b78000}, {0x44b7a000}, {0x44b7c000}, {0x44b7e000}, - {0x44b80000}, {0x44b82000}, {0x44b84000}, {0x44b86000}, - {0x44b88000}, {0x44b8a000}, {0x44b8c000}, {0x44b8e000}, - {0x44b90000}, {0x44b92000}, {0x44b94000}, {0x44b96000}, - {0x44b98000}, {0x44b9a000}, {0x44b9c000}, {0x44b9e000}, - {0x44ba0000}, {0x44ba2000}, {0x44ba4000}, {0x44ba6000}, - {0x44ba8000}, {0x44baa000}, {0x44bac000}, {0x44bae000}, - {0x44bb0000}, {0x44bb2000}, {0x44bb4000}, {0x44bb6000}, - {0x44bb8000}, {0x44bba000}, {0x44bbc000}, {0x44bbe000}, - {0x44bc0000}, {0x44bc2000}, {0x44bc4000}, {0x44bc6000}, - {0x44bc8000}, {0x44bca000}, {0x44bcc000}, {0x44bce000}, - {0x44bd0000}, {0x44bd2000}, {0x44bd4000}, {0x44bd6000}, - {0x44bd8000}, {0x44bda000}, {0x44bdc000}, {0x44bde000}, - {0x44be0000}, {0x44be2000}, {0x44be4000}, {0x44be6000}, - {0x44be8000}, {0x44bea000}, {0x44bec000}, {0x44bee000}, - {0x44bf0000}, {0x44bf2000}, {0x44bf4000}, {0x44bf6000}, - {0x44bf8000}, {0x44bfa000}, {0x44bfc000}, {0x44bfe000}, - {0x44c00000}, {0x44c02000}, {0x44c04000}, {0x44c06000}, - {0x44c08000}, {0x44c0a000}, {0x44c0c000}, {0x44c0e000}, - {0x44c10000}, {0x44c12000}, {0x44c14000}, {0x44c16000}, - {0x44c18000}, {0x44c1a000}, {0x44c1c000}, {0x44c1e000}, - {0x44c20000}, {0x44c22000}, {0x44c24000}, {0x44c26000}, - {0x44c28000}, {0x44c2a000}, {0x44c2c000}, {0x44c2e000}, - {0x44c30000}, {0x44c32000}, {0x44c34000}, {0x44c36000}, - {0x44c38000}, {0x44c3a000}, {0x44c3c000}, {0x44c3e000}, - {0x44c40000}, {0x44c42000}, {0x44c44000}, {0x44c46000}, - {0x44c48000}, {0x44c4a000}, {0x44c4c000}, {0x44c4e000}, - {0x44c50000}, {0x44c52000}, {0x44c54000}, {0x44c56000}, - {0x44c58000}, {0x44c5a000}, {0x44c5c000}, {0x44c5e000}, - {0x44c60000}, {0x44c62000}, {0x44c64000}, {0x44c66000}, - {0x44c68000}, {0x44c6a000}, {0x44c6c000}, {0x44c6e000}, - {0x44c70000}, {0x44c72000}, {0x44c74000}, {0x44c76000}, - {0x44c78000}, {0x44c7a000}, {0x44c7c000}, {0x44c7e000}, - {0x44c80000}, {0x44c82000}, {0x44c84000}, {0x44c86000}, - {0x44c88000}, {0x44c8a000}, {0x44c8c000}, {0x44c8e000}, - {0x44c90000}, {0x44c92000}, {0x44c94000}, {0x44c96000}, - {0x44c98000}, {0x44c9a000}, {0x44c9c000}, {0x44c9e000}, - {0x44ca0000}, {0x44ca2000}, {0x44ca4000}, {0x44ca6000}, - {0x44ca8000}, {0x44caa000}, {0x44cac000}, {0x44cae000}, - {0x44cb0000}, {0x44cb2000}, {0x44cb4000}, {0x44cb6000}, - {0x44cb8000}, {0x44cba000}, {0x44cbc000}, {0x44cbe000}, - {0x44cc0000}, {0x44cc2000}, {0x44cc4000}, {0x44cc6000}, - {0x44cc8000}, {0x44cca000}, {0x44ccc000}, {0x44cce000}, - {0x44cd0000}, {0x44cd2000}, {0x44cd4000}, {0x44cd6000}, - {0x44cd8000}, {0x44cda000}, {0x44cdc000}, {0x44cde000}, - {0x44ce0000}, {0x44ce2000}, {0x44ce4000}, {0x44ce6000}, - {0x44ce8000}, {0x44cea000}, {0x44cec000}, {0x44cee000}, - {0x44cf0000}, {0x44cf2000}, {0x44cf4000}, {0x44cf6000}, - {0x44cf8000}, {0x44cfa000}, {0x44cfc000}, {0x44cfe000}, - {0x44d00000}, {0x44d02000}, {0x44d04000}, {0x44d06000}, - {0x44d08000}, {0x44d0a000}, {0x44d0c000}, {0x44d0e000}, - {0x44d10000}, {0x44d12000}, {0x44d14000}, {0x44d16000}, - {0x44d18000}, {0x44d1a000}, {0x44d1c000}, {0x44d1e000}, - {0x44d20000}, {0x44d22000}, {0x44d24000}, {0x44d26000}, - {0x44d28000}, {0x44d2a000}, {0x44d2c000}, {0x44d2e000}, - {0x44d30000}, {0x44d32000}, {0x44d34000}, {0x44d36000}, - {0x44d38000}, {0x44d3a000}, {0x44d3c000}, {0x44d3e000}, - {0x44d40000}, {0x44d42000}, {0x44d44000}, {0x44d46000}, - {0x44d48000}, {0x44d4a000}, {0x44d4c000}, {0x44d4e000}, - {0x44d50000}, {0x44d52000}, {0x44d54000}, {0x44d56000}, - {0x44d58000}, {0x44d5a000}, {0x44d5c000}, {0x44d5e000}, - {0x44d60000}, {0x44d62000}, {0x44d64000}, {0x44d66000}, - {0x44d68000}, {0x44d6a000}, {0x44d6c000}, {0x44d6e000}, - {0x44d70000}, {0x44d72000}, {0x44d74000}, {0x44d76000}, - {0x44d78000}, {0x44d7a000}, {0x44d7c000}, {0x44d7e000}, - {0x44d80000}, {0x44d82000}, {0x44d84000}, {0x44d86000}, - {0x44d88000}, {0x44d8a000}, {0x44d8c000}, {0x44d8e000}, - {0x44d90000}, {0x44d92000}, {0x44d94000}, {0x44d96000}, - {0x44d98000}, {0x44d9a000}, {0x44d9c000}, {0x44d9e000}, - {0x44da0000}, {0x44da2000}, {0x44da4000}, {0x44da6000}, - {0x44da8000}, {0x44daa000}, {0x44dac000}, {0x44dae000}, - {0x44db0000}, {0x44db2000}, {0x44db4000}, {0x44db6000}, - {0x44db8000}, {0x44dba000}, {0x44dbc000}, {0x44dbe000}, - {0x44dc0000}, {0x44dc2000}, {0x44dc4000}, {0x44dc6000}, - {0x44dc8000}, {0x44dca000}, {0x44dcc000}, {0x44dce000}, - {0x44dd0000}, {0x44dd2000}, {0x44dd4000}, {0x44dd6000}, - {0x44dd8000}, {0x44dda000}, {0x44ddc000}, {0x44dde000}, - {0x44de0000}, {0x44de2000}, {0x44de4000}, {0x44de6000}, - {0x44de8000}, {0x44dea000}, {0x44dec000}, {0x44dee000}, - {0x44df0000}, {0x44df2000}, {0x44df4000}, {0x44df6000}, - {0x44df8000}, {0x44dfa000}, {0x44dfc000}, {0x44dfe000}, - {0x44e00000}, {0x44e02000}, {0x44e04000}, {0x44e06000}, - {0x44e08000}, {0x44e0a000}, {0x44e0c000}, {0x44e0e000}, - {0x44e10000}, {0x44e12000}, {0x44e14000}, {0x44e16000}, - {0x44e18000}, {0x44e1a000}, {0x44e1c000}, {0x44e1e000}, - {0x44e20000}, {0x44e22000}, {0x44e24000}, {0x44e26000}, - {0x44e28000}, {0x44e2a000}, {0x44e2c000}, {0x44e2e000}, - {0x44e30000}, {0x44e32000}, {0x44e34000}, {0x44e36000}, - {0x44e38000}, {0x44e3a000}, {0x44e3c000}, {0x44e3e000}, - {0x44e40000}, {0x44e42000}, {0x44e44000}, {0x44e46000}, - {0x44e48000}, {0x44e4a000}, {0x44e4c000}, {0x44e4e000}, - {0x44e50000}, {0x44e52000}, {0x44e54000}, {0x44e56000}, - {0x44e58000}, {0x44e5a000}, {0x44e5c000}, {0x44e5e000}, - {0x44e60000}, {0x44e62000}, {0x44e64000}, {0x44e66000}, - {0x44e68000}, {0x44e6a000}, {0x44e6c000}, {0x44e6e000}, - {0x44e70000}, {0x44e72000}, {0x44e74000}, {0x44e76000}, - {0x44e78000}, {0x44e7a000}, {0x44e7c000}, {0x44e7e000}, - {0x44e80000}, {0x44e82000}, {0x44e84000}, {0x44e86000}, - {0x44e88000}, {0x44e8a000}, {0x44e8c000}, {0x44e8e000}, - {0x44e90000}, {0x44e92000}, {0x44e94000}, {0x44e96000}, - {0x44e98000}, {0x44e9a000}, {0x44e9c000}, {0x44e9e000}, - {0x44ea0000}, {0x44ea2000}, {0x44ea4000}, {0x44ea6000}, - {0x44ea8000}, {0x44eaa000}, {0x44eac000}, {0x44eae000}, - {0x44eb0000}, {0x44eb2000}, {0x44eb4000}, {0x44eb6000}, - {0x44eb8000}, {0x44eba000}, {0x44ebc000}, {0x44ebe000}, - {0x44ec0000}, {0x44ec2000}, {0x44ec4000}, {0x44ec6000}, - {0x44ec8000}, {0x44eca000}, {0x44ecc000}, {0x44ece000}, - {0x44ed0000}, {0x44ed2000}, {0x44ed4000}, {0x44ed6000}, - {0x44ed8000}, {0x44eda000}, {0x44edc000}, {0x44ede000}, - {0x44ee0000}, {0x44ee2000}, {0x44ee4000}, {0x44ee6000}, - {0x44ee8000}, {0x44eea000}, {0x44eec000}, {0x44eee000}, - {0x44ef0000}, {0x44ef2000}, {0x44ef4000}, {0x44ef6000}, - {0x44ef8000}, {0x44efa000}, {0x44efc000}, {0x44efe000}, - {0x44f00000}, {0x44f02000}, {0x44f04000}, {0x44f06000}, - {0x44f08000}, {0x44f0a000}, {0x44f0c000}, {0x44f0e000}, - {0x44f10000}, {0x44f12000}, {0x44f14000}, {0x44f16000}, - {0x44f18000}, {0x44f1a000}, {0x44f1c000}, {0x44f1e000}, - {0x44f20000}, {0x44f22000}, {0x44f24000}, {0x44f26000}, - {0x44f28000}, {0x44f2a000}, {0x44f2c000}, {0x44f2e000}, - {0x44f30000}, {0x44f32000}, {0x44f34000}, {0x44f36000}, - {0x44f38000}, {0x44f3a000}, {0x44f3c000}, {0x44f3e000}, - {0x44f40000}, {0x44f42000}, {0x44f44000}, {0x44f46000}, - {0x44f48000}, {0x44f4a000}, {0x44f4c000}, {0x44f4e000}, - {0x44f50000}, {0x44f52000}, {0x44f54000}, {0x44f56000}, - {0x44f58000}, {0x44f5a000}, {0x44f5c000}, {0x44f5e000}, - {0x44f60000}, {0x44f62000}, {0x44f64000}, {0x44f66000}, - {0x44f68000}, {0x44f6a000}, {0x44f6c000}, {0x44f6e000}, - {0x44f70000}, {0x44f72000}, {0x44f74000}, {0x44f76000}, - {0x44f78000}, {0x44f7a000}, {0x44f7c000}, {0x44f7e000}, - {0x44f80000}, {0x44f82000}, {0x44f84000}, {0x44f86000}, - {0x44f88000}, {0x44f8a000}, {0x44f8c000}, {0x44f8e000}, - {0x44f90000}, {0x44f92000}, {0x44f94000}, {0x44f96000}, - {0x44f98000}, {0x44f9a000}, {0x44f9c000}, {0x44f9e000}, - {0x44fa0000}, {0x44fa2000}, {0x44fa4000}, {0x44fa6000}, - {0x44fa8000}, {0x44faa000}, {0x44fac000}, {0x44fae000}, - {0x44fb0000}, {0x44fb2000}, {0x44fb4000}, {0x44fb6000}, - {0x44fb8000}, {0x44fba000}, {0x44fbc000}, {0x44fbe000}, - {0x44fc0000}, {0x44fc2000}, {0x44fc4000}, {0x44fc6000}, - {0x44fc8000}, {0x44fca000}, {0x44fcc000}, {0x44fce000}, - {0x44fd0000}, {0x44fd2000}, {0x44fd4000}, {0x44fd6000}, - {0x44fd8000}, {0x44fda000}, {0x44fdc000}, {0x44fde000}, - {0x44fe0000}, {0x44fe2000}, {0x44fe4000}, {0x44fe6000}, - {0x44fe8000}, {0x44fea000}, {0x44fec000}, {0x44fee000}, - {0x44ff0000}, {0x44ff2000}, {0x44ff4000}, {0x44ff6000}, - {0x44ff8000}, {0x44ffa000}, {0x44ffc000}, {0x44ffe000}, - {0x45000000}, {0x45002000}, {0x45004000}, {0x45006000}, - {0x45008000}, {0x4500a000}, {0x4500c000}, {0x4500e000}, - {0x45010000}, {0x45012000}, {0x45014000}, {0x45016000}, - {0x45018000}, {0x4501a000}, {0x4501c000}, {0x4501e000}, - {0x45020000}, {0x45022000}, {0x45024000}, {0x45026000}, - {0x45028000}, {0x4502a000}, {0x4502c000}, {0x4502e000}, - {0x45030000}, {0x45032000}, {0x45034000}, {0x45036000}, - {0x45038000}, {0x4503a000}, {0x4503c000}, {0x4503e000}, - {0x45040000}, {0x45042000}, {0x45044000}, {0x45046000}, - {0x45048000}, {0x4504a000}, {0x4504c000}, {0x4504e000}, - {0x45050000}, {0x45052000}, {0x45054000}, {0x45056000}, - {0x45058000}, {0x4505a000}, {0x4505c000}, {0x4505e000}, - {0x45060000}, {0x45062000}, {0x45064000}, {0x45066000}, - {0x45068000}, {0x4506a000}, {0x4506c000}, {0x4506e000}, - {0x45070000}, {0x45072000}, {0x45074000}, {0x45076000}, - {0x45078000}, {0x4507a000}, {0x4507c000}, {0x4507e000}, - {0x45080000}, {0x45082000}, {0x45084000}, {0x45086000}, - {0x45088000}, {0x4508a000}, {0x4508c000}, {0x4508e000}, - {0x45090000}, {0x45092000}, {0x45094000}, {0x45096000}, - {0x45098000}, {0x4509a000}, {0x4509c000}, {0x4509e000}, - {0x450a0000}, {0x450a2000}, {0x450a4000}, {0x450a6000}, - {0x450a8000}, {0x450aa000}, {0x450ac000}, {0x450ae000}, - {0x450b0000}, {0x450b2000}, {0x450b4000}, {0x450b6000}, - {0x450b8000}, {0x450ba000}, {0x450bc000}, {0x450be000}, - {0x450c0000}, {0x450c2000}, {0x450c4000}, {0x450c6000}, - {0x450c8000}, {0x450ca000}, {0x450cc000}, {0x450ce000}, - {0x450d0000}, {0x450d2000}, {0x450d4000}, {0x450d6000}, - {0x450d8000}, {0x450da000}, {0x450dc000}, {0x450de000}, - {0x450e0000}, {0x450e2000}, {0x450e4000}, {0x450e6000}, - {0x450e8000}, {0x450ea000}, {0x450ec000}, {0x450ee000}, - {0x450f0000}, {0x450f2000}, {0x450f4000}, {0x450f6000}, - {0x450f8000}, {0x450fa000}, {0x450fc000}, {0x450fe000}, - {0x45100000}, {0x45102000}, {0x45104000}, {0x45106000}, - {0x45108000}, {0x4510a000}, {0x4510c000}, {0x4510e000}, - {0x45110000}, {0x45112000}, {0x45114000}, {0x45116000}, - {0x45118000}, {0x4511a000}, {0x4511c000}, {0x4511e000}, - {0x45120000}, {0x45122000}, {0x45124000}, {0x45126000}, - {0x45128000}, {0x4512a000}, {0x4512c000}, {0x4512e000}, - {0x45130000}, {0x45132000}, {0x45134000}, {0x45136000}, - {0x45138000}, {0x4513a000}, {0x4513c000}, {0x4513e000}, - {0x45140000}, {0x45142000}, {0x45144000}, {0x45146000}, - {0x45148000}, {0x4514a000}, {0x4514c000}, {0x4514e000}, - {0x45150000}, {0x45152000}, {0x45154000}, {0x45156000}, - {0x45158000}, {0x4515a000}, {0x4515c000}, {0x4515e000}, - {0x45160000}, {0x45162000}, {0x45164000}, {0x45166000}, - {0x45168000}, {0x4516a000}, {0x4516c000}, {0x4516e000}, - {0x45170000}, {0x45172000}, {0x45174000}, {0x45176000}, - {0x45178000}, {0x4517a000}, {0x4517c000}, {0x4517e000}, - {0x45180000}, {0x45182000}, {0x45184000}, {0x45186000}, - {0x45188000}, {0x4518a000}, {0x4518c000}, {0x4518e000}, - {0x45190000}, {0x45192000}, {0x45194000}, {0x45196000}, - {0x45198000}, {0x4519a000}, {0x4519c000}, {0x4519e000}, - {0x451a0000}, {0x451a2000}, {0x451a4000}, {0x451a6000}, - {0x451a8000}, {0x451aa000}, {0x451ac000}, {0x451ae000}, - {0x451b0000}, {0x451b2000}, {0x451b4000}, {0x451b6000}, - {0x451b8000}, {0x451ba000}, {0x451bc000}, {0x451be000}, - {0x451c0000}, {0x451c2000}, {0x451c4000}, {0x451c6000}, - {0x451c8000}, {0x451ca000}, {0x451cc000}, {0x451ce000}, - {0x451d0000}, {0x451d2000}, {0x451d4000}, {0x451d6000}, - {0x451d8000}, {0x451da000}, {0x451dc000}, {0x451de000}, - {0x451e0000}, {0x451e2000}, {0x451e4000}, {0x451e6000}, - {0x451e8000}, {0x451ea000}, {0x451ec000}, {0x451ee000}, - {0x451f0000}, {0x451f2000}, {0x451f4000}, {0x451f6000}, - {0x451f8000}, {0x451fa000}, {0x451fc000}, {0x451fe000}, - {0x45200000}, {0x45202000}, {0x45204000}, {0x45206000}, - {0x45208000}, {0x4520a000}, {0x4520c000}, {0x4520e000}, - {0x45210000}, {0x45212000}, {0x45214000}, {0x45216000}, - {0x45218000}, {0x4521a000}, {0x4521c000}, {0x4521e000}, - {0x45220000}, {0x45222000}, {0x45224000}, {0x45226000}, - {0x45228000}, {0x4522a000}, {0x4522c000}, {0x4522e000}, - {0x45230000}, {0x45232000}, {0x45234000}, {0x45236000}, - {0x45238000}, {0x4523a000}, {0x4523c000}, {0x4523e000}, - {0x45240000}, {0x45242000}, {0x45244000}, {0x45246000}, - {0x45248000}, {0x4524a000}, {0x4524c000}, {0x4524e000}, - {0x45250000}, {0x45252000}, {0x45254000}, {0x45256000}, - {0x45258000}, {0x4525a000}, {0x4525c000}, {0x4525e000}, - {0x45260000}, {0x45262000}, {0x45264000}, {0x45266000}, - {0x45268000}, {0x4526a000}, {0x4526c000}, {0x4526e000}, - {0x45270000}, {0x45272000}, {0x45274000}, {0x45276000}, - {0x45278000}, {0x4527a000}, {0x4527c000}, {0x4527e000}, - {0x45280000}, {0x45282000}, {0x45284000}, {0x45286000}, - {0x45288000}, {0x4528a000}, {0x4528c000}, {0x4528e000}, - {0x45290000}, {0x45292000}, {0x45294000}, {0x45296000}, - {0x45298000}, {0x4529a000}, {0x4529c000}, {0x4529e000}, - {0x452a0000}, {0x452a2000}, {0x452a4000}, {0x452a6000}, - {0x452a8000}, {0x452aa000}, {0x452ac000}, {0x452ae000}, - {0x452b0000}, {0x452b2000}, {0x452b4000}, {0x452b6000}, - {0x452b8000}, {0x452ba000}, {0x452bc000}, {0x452be000}, - {0x452c0000}, {0x452c2000}, {0x452c4000}, {0x452c6000}, - {0x452c8000}, {0x452ca000}, {0x452cc000}, {0x452ce000}, - {0x452d0000}, {0x452d2000}, {0x452d4000}, {0x452d6000}, - {0x452d8000}, {0x452da000}, {0x452dc000}, {0x452de000}, - {0x452e0000}, {0x452e2000}, {0x452e4000}, {0x452e6000}, - {0x452e8000}, {0x452ea000}, {0x452ec000}, {0x452ee000}, - {0x452f0000}, {0x452f2000}, {0x452f4000}, {0x452f6000}, - {0x452f8000}, {0x452fa000}, {0x452fc000}, {0x452fe000}, - {0x45300000}, {0x45302000}, {0x45304000}, {0x45306000}, - {0x45308000}, {0x4530a000}, {0x4530c000}, {0x4530e000}, - {0x45310000}, {0x45312000}, {0x45314000}, {0x45316000}, - {0x45318000}, {0x4531a000}, {0x4531c000}, {0x4531e000}, - {0x45320000}, {0x45322000}, {0x45324000}, {0x45326000}, - {0x45328000}, {0x4532a000}, {0x4532c000}, {0x4532e000}, - {0x45330000}, {0x45332000}, {0x45334000}, {0x45336000}, - {0x45338000}, {0x4533a000}, {0x4533c000}, {0x4533e000}, - {0x45340000}, {0x45342000}, {0x45344000}, {0x45346000}, - {0x45348000}, {0x4534a000}, {0x4534c000}, {0x4534e000}, - {0x45350000}, {0x45352000}, {0x45354000}, {0x45356000}, - {0x45358000}, {0x4535a000}, {0x4535c000}, {0x4535e000}, - {0x45360000}, {0x45362000}, {0x45364000}, {0x45366000}, - {0x45368000}, {0x4536a000}, {0x4536c000}, {0x4536e000}, - {0x45370000}, {0x45372000}, {0x45374000}, {0x45376000}, - {0x45378000}, {0x4537a000}, {0x4537c000}, {0x4537e000}, - {0x45380000}, {0x45382000}, {0x45384000}, {0x45386000}, - {0x45388000}, {0x4538a000}, {0x4538c000}, {0x4538e000}, - {0x45390000}, {0x45392000}, {0x45394000}, {0x45396000}, - {0x45398000}, {0x4539a000}, {0x4539c000}, {0x4539e000}, - {0x453a0000}, {0x453a2000}, {0x453a4000}, {0x453a6000}, - {0x453a8000}, {0x453aa000}, {0x453ac000}, {0x453ae000}, - {0x453b0000}, {0x453b2000}, {0x453b4000}, {0x453b6000}, - {0x453b8000}, {0x453ba000}, {0x453bc000}, {0x453be000}, - {0x453c0000}, {0x453c2000}, {0x453c4000}, {0x453c6000}, - {0x453c8000}, {0x453ca000}, {0x453cc000}, {0x453ce000}, - {0x453d0000}, {0x453d2000}, {0x453d4000}, {0x453d6000}, - {0x453d8000}, {0x453da000}, {0x453dc000}, {0x453de000}, - {0x453e0000}, {0x453e2000}, {0x453e4000}, {0x453e6000}, - {0x453e8000}, {0x453ea000}, {0x453ec000}, {0x453ee000}, - {0x453f0000}, {0x453f2000}, {0x453f4000}, {0x453f6000}, - {0x453f8000}, {0x453fa000}, {0x453fc000}, {0x453fe000}, - {0x45400000}, {0x45402000}, {0x45404000}, {0x45406000}, - {0x45408000}, {0x4540a000}, {0x4540c000}, {0x4540e000}, - {0x45410000}, {0x45412000}, {0x45414000}, {0x45416000}, - {0x45418000}, {0x4541a000}, {0x4541c000}, {0x4541e000}, - {0x45420000}, {0x45422000}, {0x45424000}, {0x45426000}, - {0x45428000}, {0x4542a000}, {0x4542c000}, {0x4542e000}, - {0x45430000}, {0x45432000}, {0x45434000}, {0x45436000}, - {0x45438000}, {0x4543a000}, {0x4543c000}, {0x4543e000}, - {0x45440000}, {0x45442000}, {0x45444000}, {0x45446000}, - {0x45448000}, {0x4544a000}, {0x4544c000}, {0x4544e000}, - {0x45450000}, {0x45452000}, {0x45454000}, {0x45456000}, - {0x45458000}, {0x4545a000}, {0x4545c000}, {0x4545e000}, - {0x45460000}, {0x45462000}, {0x45464000}, {0x45466000}, - {0x45468000}, {0x4546a000}, {0x4546c000}, {0x4546e000}, - {0x45470000}, {0x45472000}, {0x45474000}, {0x45476000}, - {0x45478000}, {0x4547a000}, {0x4547c000}, {0x4547e000}, - {0x45480000}, {0x45482000}, {0x45484000}, {0x45486000}, - {0x45488000}, {0x4548a000}, {0x4548c000}, {0x4548e000}, - {0x45490000}, {0x45492000}, {0x45494000}, {0x45496000}, - {0x45498000}, {0x4549a000}, {0x4549c000}, {0x4549e000}, - {0x454a0000}, {0x454a2000}, {0x454a4000}, {0x454a6000}, - {0x454a8000}, {0x454aa000}, {0x454ac000}, {0x454ae000}, - {0x454b0000}, {0x454b2000}, {0x454b4000}, {0x454b6000}, - {0x454b8000}, {0x454ba000}, {0x454bc000}, {0x454be000}, - {0x454c0000}, {0x454c2000}, {0x454c4000}, {0x454c6000}, - {0x454c8000}, {0x454ca000}, {0x454cc000}, {0x454ce000}, - {0x454d0000}, {0x454d2000}, {0x454d4000}, {0x454d6000}, - {0x454d8000}, {0x454da000}, {0x454dc000}, {0x454de000}, - {0x454e0000}, {0x454e2000}, {0x454e4000}, {0x454e6000}, - {0x454e8000}, {0x454ea000}, {0x454ec000}, {0x454ee000}, - {0x454f0000}, {0x454f2000}, {0x454f4000}, {0x454f6000}, - {0x454f8000}, {0x454fa000}, {0x454fc000}, {0x454fe000}, - {0x45500000}, {0x45502000}, {0x45504000}, {0x45506000}, - {0x45508000}, {0x4550a000}, {0x4550c000}, {0x4550e000}, - {0x45510000}, {0x45512000}, {0x45514000}, {0x45516000}, - {0x45518000}, {0x4551a000}, {0x4551c000}, {0x4551e000}, - {0x45520000}, {0x45522000}, {0x45524000}, {0x45526000}, - {0x45528000}, {0x4552a000}, {0x4552c000}, {0x4552e000}, - {0x45530000}, {0x45532000}, {0x45534000}, {0x45536000}, - {0x45538000}, {0x4553a000}, {0x4553c000}, {0x4553e000}, - {0x45540000}, {0x45542000}, {0x45544000}, {0x45546000}, - {0x45548000}, {0x4554a000}, {0x4554c000}, {0x4554e000}, - {0x45550000}, {0x45552000}, {0x45554000}, {0x45556000}, - {0x45558000}, {0x4555a000}, {0x4555c000}, {0x4555e000}, - {0x45560000}, {0x45562000}, {0x45564000}, {0x45566000}, - {0x45568000}, {0x4556a000}, {0x4556c000}, {0x4556e000}, - {0x45570000}, {0x45572000}, {0x45574000}, {0x45576000}, - {0x45578000}, {0x4557a000}, {0x4557c000}, {0x4557e000}, - {0x45580000}, {0x45582000}, {0x45584000}, {0x45586000}, - {0x45588000}, {0x4558a000}, {0x4558c000}, {0x4558e000}, - {0x45590000}, {0x45592000}, {0x45594000}, {0x45596000}, - {0x45598000}, {0x4559a000}, {0x4559c000}, {0x4559e000}, - {0x455a0000}, {0x455a2000}, {0x455a4000}, {0x455a6000}, - {0x455a8000}, {0x455aa000}, {0x455ac000}, {0x455ae000}, - {0x455b0000}, {0x455b2000}, {0x455b4000}, {0x455b6000}, - {0x455b8000}, {0x455ba000}, {0x455bc000}, {0x455be000}, - {0x455c0000}, {0x455c2000}, {0x455c4000}, {0x455c6000}, - {0x455c8000}, {0x455ca000}, {0x455cc000}, {0x455ce000}, - {0x455d0000}, {0x455d2000}, {0x455d4000}, {0x455d6000}, - {0x455d8000}, {0x455da000}, {0x455dc000}, {0x455de000}, - {0x455e0000}, {0x455e2000}, {0x455e4000}, {0x455e6000}, - {0x455e8000}, {0x455ea000}, {0x455ec000}, {0x455ee000}, - {0x455f0000}, {0x455f2000}, {0x455f4000}, {0x455f6000}, - {0x455f8000}, {0x455fa000}, {0x455fc000}, {0x455fe000}, - {0x45600000}, {0x45602000}, {0x45604000}, {0x45606000}, - {0x45608000}, {0x4560a000}, {0x4560c000}, {0x4560e000}, - {0x45610000}, {0x45612000}, {0x45614000}, {0x45616000}, - {0x45618000}, {0x4561a000}, {0x4561c000}, {0x4561e000}, - {0x45620000}, {0x45622000}, {0x45624000}, {0x45626000}, - {0x45628000}, {0x4562a000}, {0x4562c000}, {0x4562e000}, - {0x45630000}, {0x45632000}, {0x45634000}, {0x45636000}, - {0x45638000}, {0x4563a000}, {0x4563c000}, {0x4563e000}, - {0x45640000}, {0x45642000}, {0x45644000}, {0x45646000}, - {0x45648000}, {0x4564a000}, {0x4564c000}, {0x4564e000}, - {0x45650000}, {0x45652000}, {0x45654000}, {0x45656000}, - {0x45658000}, {0x4565a000}, {0x4565c000}, {0x4565e000}, - {0x45660000}, {0x45662000}, {0x45664000}, {0x45666000}, - {0x45668000}, {0x4566a000}, {0x4566c000}, {0x4566e000}, - {0x45670000}, {0x45672000}, {0x45674000}, {0x45676000}, - {0x45678000}, {0x4567a000}, {0x4567c000}, {0x4567e000}, - {0x45680000}, {0x45682000}, {0x45684000}, {0x45686000}, - {0x45688000}, {0x4568a000}, {0x4568c000}, {0x4568e000}, - {0x45690000}, {0x45692000}, {0x45694000}, {0x45696000}, - {0x45698000}, {0x4569a000}, {0x4569c000}, {0x4569e000}, - {0x456a0000}, {0x456a2000}, {0x456a4000}, {0x456a6000}, - {0x456a8000}, {0x456aa000}, {0x456ac000}, {0x456ae000}, - {0x456b0000}, {0x456b2000}, {0x456b4000}, {0x456b6000}, - {0x456b8000}, {0x456ba000}, {0x456bc000}, {0x456be000}, - {0x456c0000}, {0x456c2000}, {0x456c4000}, {0x456c6000}, - {0x456c8000}, {0x456ca000}, {0x456cc000}, {0x456ce000}, - {0x456d0000}, {0x456d2000}, {0x456d4000}, {0x456d6000}, - {0x456d8000}, {0x456da000}, {0x456dc000}, {0x456de000}, - {0x456e0000}, {0x456e2000}, {0x456e4000}, {0x456e6000}, - {0x456e8000}, {0x456ea000}, {0x456ec000}, {0x456ee000}, - {0x456f0000}, {0x456f2000}, {0x456f4000}, {0x456f6000}, - {0x456f8000}, {0x456fa000}, {0x456fc000}, {0x456fe000}, - {0x45700000}, {0x45702000}, {0x45704000}, {0x45706000}, - {0x45708000}, {0x4570a000}, {0x4570c000}, {0x4570e000}, - {0x45710000}, {0x45712000}, {0x45714000}, {0x45716000}, - {0x45718000}, {0x4571a000}, {0x4571c000}, {0x4571e000}, - {0x45720000}, {0x45722000}, {0x45724000}, {0x45726000}, - {0x45728000}, {0x4572a000}, {0x4572c000}, {0x4572e000}, - {0x45730000}, {0x45732000}, {0x45734000}, {0x45736000}, - {0x45738000}, {0x4573a000}, {0x4573c000}, {0x4573e000}, - {0x45740000}, {0x45742000}, {0x45744000}, {0x45746000}, - {0x45748000}, {0x4574a000}, {0x4574c000}, {0x4574e000}, - {0x45750000}, {0x45752000}, {0x45754000}, {0x45756000}, - {0x45758000}, {0x4575a000}, {0x4575c000}, {0x4575e000}, - {0x45760000}, {0x45762000}, {0x45764000}, {0x45766000}, - {0x45768000}, {0x4576a000}, {0x4576c000}, {0x4576e000}, - {0x45770000}, {0x45772000}, {0x45774000}, {0x45776000}, - {0x45778000}, {0x4577a000}, {0x4577c000}, {0x4577e000}, - {0x45780000}, {0x45782000}, {0x45784000}, {0x45786000}, - {0x45788000}, {0x4578a000}, {0x4578c000}, {0x4578e000}, - {0x45790000}, {0x45792000}, {0x45794000}, {0x45796000}, - {0x45798000}, {0x4579a000}, {0x4579c000}, {0x4579e000}, - {0x457a0000}, {0x457a2000}, {0x457a4000}, {0x457a6000}, - {0x457a8000}, {0x457aa000}, {0x457ac000}, {0x457ae000}, - {0x457b0000}, {0x457b2000}, {0x457b4000}, {0x457b6000}, - {0x457b8000}, {0x457ba000}, {0x457bc000}, {0x457be000}, - {0x457c0000}, {0x457c2000}, {0x457c4000}, {0x457c6000}, - {0x457c8000}, {0x457ca000}, {0x457cc000}, {0x457ce000}, - {0x457d0000}, {0x457d2000}, {0x457d4000}, {0x457d6000}, - {0x457d8000}, {0x457da000}, {0x457dc000}, {0x457de000}, - {0x457e0000}, {0x457e2000}, {0x457e4000}, {0x457e6000}, - {0x457e8000}, {0x457ea000}, {0x457ec000}, {0x457ee000}, - {0x457f0000}, {0x457f2000}, {0x457f4000}, {0x457f6000}, - {0x457f8000}, {0x457fa000}, {0x457fc000}, {0x457fe000}, - {0x45800000}, {0x45802000}, {0x45804000}, {0x45806000}, - {0x45808000}, {0x4580a000}, {0x4580c000}, {0x4580e000}, - {0x45810000}, {0x45812000}, {0x45814000}, {0x45816000}, - {0x45818000}, {0x4581a000}, {0x4581c000}, {0x4581e000}, - {0x45820000}, {0x45822000}, {0x45824000}, {0x45826000}, - {0x45828000}, {0x4582a000}, {0x4582c000}, {0x4582e000}, - {0x45830000}, {0x45832000}, {0x45834000}, {0x45836000}, - {0x45838000}, {0x4583a000}, {0x4583c000}, {0x4583e000}, - {0x45840000}, {0x45842000}, {0x45844000}, {0x45846000}, - {0x45848000}, {0x4584a000}, {0x4584c000}, {0x4584e000}, - {0x45850000}, {0x45852000}, {0x45854000}, {0x45856000}, - {0x45858000}, {0x4585a000}, {0x4585c000}, {0x4585e000}, - {0x45860000}, {0x45862000}, {0x45864000}, {0x45866000}, - {0x45868000}, {0x4586a000}, {0x4586c000}, {0x4586e000}, - {0x45870000}, {0x45872000}, {0x45874000}, {0x45876000}, - {0x45878000}, {0x4587a000}, {0x4587c000}, {0x4587e000}, - {0x45880000}, {0x45882000}, {0x45884000}, {0x45886000}, - {0x45888000}, {0x4588a000}, {0x4588c000}, {0x4588e000}, - {0x45890000}, {0x45892000}, {0x45894000}, {0x45896000}, - {0x45898000}, {0x4589a000}, {0x4589c000}, {0x4589e000}, - {0x458a0000}, {0x458a2000}, {0x458a4000}, {0x458a6000}, - {0x458a8000}, {0x458aa000}, {0x458ac000}, {0x458ae000}, - {0x458b0000}, {0x458b2000}, {0x458b4000}, {0x458b6000}, - {0x458b8000}, {0x458ba000}, {0x458bc000}, {0x458be000}, - {0x458c0000}, {0x458c2000}, {0x458c4000}, {0x458c6000}, - {0x458c8000}, {0x458ca000}, {0x458cc000}, {0x458ce000}, - {0x458d0000}, {0x458d2000}, {0x458d4000}, {0x458d6000}, - {0x458d8000}, {0x458da000}, {0x458dc000}, {0x458de000}, - {0x458e0000}, {0x458e2000}, {0x458e4000}, {0x458e6000}, - {0x458e8000}, {0x458ea000}, {0x458ec000}, {0x458ee000}, - {0x458f0000}, {0x458f2000}, {0x458f4000}, {0x458f6000}, - {0x458f8000}, {0x458fa000}, {0x458fc000}, {0x458fe000}, - {0x45900000}, {0x45902000}, {0x45904000}, {0x45906000}, - {0x45908000}, {0x4590a000}, {0x4590c000}, {0x4590e000}, - {0x45910000}, {0x45912000}, {0x45914000}, {0x45916000}, - {0x45918000}, {0x4591a000}, {0x4591c000}, {0x4591e000}, - {0x45920000}, {0x45922000}, {0x45924000}, {0x45926000}, - {0x45928000}, {0x4592a000}, {0x4592c000}, {0x4592e000}, - {0x45930000}, {0x45932000}, {0x45934000}, {0x45936000}, - {0x45938000}, {0x4593a000}, {0x4593c000}, {0x4593e000}, - {0x45940000}, {0x45942000}, {0x45944000}, {0x45946000}, - {0x45948000}, {0x4594a000}, {0x4594c000}, {0x4594e000}, - {0x45950000}, {0x45952000}, {0x45954000}, {0x45956000}, - {0x45958000}, {0x4595a000}, {0x4595c000}, {0x4595e000}, - {0x45960000}, {0x45962000}, {0x45964000}, {0x45966000}, - {0x45968000}, {0x4596a000}, {0x4596c000}, {0x4596e000}, - {0x45970000}, {0x45972000}, {0x45974000}, {0x45976000}, - {0x45978000}, {0x4597a000}, {0x4597c000}, {0x4597e000}, - {0x45980000}, {0x45982000}, {0x45984000}, {0x45986000}, - {0x45988000}, {0x4598a000}, {0x4598c000}, {0x4598e000}, - {0x45990000}, {0x45992000}, {0x45994000}, {0x45996000}, - {0x45998000}, {0x4599a000}, {0x4599c000}, {0x4599e000}, - {0x459a0000}, {0x459a2000}, {0x459a4000}, {0x459a6000}, - {0x459a8000}, {0x459aa000}, {0x459ac000}, {0x459ae000}, - {0x459b0000}, {0x459b2000}, {0x459b4000}, {0x459b6000}, - {0x459b8000}, {0x459ba000}, {0x459bc000}, {0x459be000}, - {0x459c0000}, {0x459c2000}, {0x459c4000}, {0x459c6000}, - {0x459c8000}, {0x459ca000}, {0x459cc000}, {0x459ce000}, - {0x459d0000}, {0x459d2000}, {0x459d4000}, {0x459d6000}, - {0x459d8000}, {0x459da000}, {0x459dc000}, {0x459de000}, - {0x459e0000}, {0x459e2000}, {0x459e4000}, {0x459e6000}, - {0x459e8000}, {0x459ea000}, {0x459ec000}, {0x459ee000}, - {0x459f0000}, {0x459f2000}, {0x459f4000}, {0x459f6000}, - {0x459f8000}, {0x459fa000}, {0x459fc000}, {0x459fe000}, - {0x45a00000}, {0x45a02000}, {0x45a04000}, {0x45a06000}, - {0x45a08000}, {0x45a0a000}, {0x45a0c000}, {0x45a0e000}, - {0x45a10000}, {0x45a12000}, {0x45a14000}, {0x45a16000}, - {0x45a18000}, {0x45a1a000}, {0x45a1c000}, {0x45a1e000}, - {0x45a20000}, {0x45a22000}, {0x45a24000}, {0x45a26000}, - {0x45a28000}, {0x45a2a000}, {0x45a2c000}, {0x45a2e000}, - {0x45a30000}, {0x45a32000}, {0x45a34000}, {0x45a36000}, - {0x45a38000}, {0x45a3a000}, {0x45a3c000}, {0x45a3e000}, - {0x45a40000}, {0x45a42000}, {0x45a44000}, {0x45a46000}, - {0x45a48000}, {0x45a4a000}, {0x45a4c000}, {0x45a4e000}, - {0x45a50000}, {0x45a52000}, {0x45a54000}, {0x45a56000}, - {0x45a58000}, {0x45a5a000}, {0x45a5c000}, {0x45a5e000}, - {0x45a60000}, {0x45a62000}, {0x45a64000}, {0x45a66000}, - {0x45a68000}, {0x45a6a000}, {0x45a6c000}, {0x45a6e000}, - {0x45a70000}, {0x45a72000}, {0x45a74000}, {0x45a76000}, - {0x45a78000}, {0x45a7a000}, {0x45a7c000}, {0x45a7e000}, - {0x45a80000}, {0x45a82000}, {0x45a84000}, {0x45a86000}, - {0x45a88000}, {0x45a8a000}, {0x45a8c000}, {0x45a8e000}, - {0x45a90000}, {0x45a92000}, {0x45a94000}, {0x45a96000}, - {0x45a98000}, {0x45a9a000}, {0x45a9c000}, {0x45a9e000}, - {0x45aa0000}, {0x45aa2000}, {0x45aa4000}, {0x45aa6000}, - {0x45aa8000}, {0x45aaa000}, {0x45aac000}, {0x45aae000}, - {0x45ab0000}, {0x45ab2000}, {0x45ab4000}, {0x45ab6000}, - {0x45ab8000}, {0x45aba000}, {0x45abc000}, {0x45abe000}, - {0x45ac0000}, {0x45ac2000}, {0x45ac4000}, {0x45ac6000}, - {0x45ac8000}, {0x45aca000}, {0x45acc000}, {0x45ace000}, - {0x45ad0000}, {0x45ad2000}, {0x45ad4000}, {0x45ad6000}, - {0x45ad8000}, {0x45ada000}, {0x45adc000}, {0x45ade000}, - {0x45ae0000}, {0x45ae2000}, {0x45ae4000}, {0x45ae6000}, - {0x45ae8000}, {0x45aea000}, {0x45aec000}, {0x45aee000}, - {0x45af0000}, {0x45af2000}, {0x45af4000}, {0x45af6000}, - {0x45af8000}, {0x45afa000}, {0x45afc000}, {0x45afe000}, - {0x45b00000}, {0x45b02000}, {0x45b04000}, {0x45b06000}, - {0x45b08000}, {0x45b0a000}, {0x45b0c000}, {0x45b0e000}, - {0x45b10000}, {0x45b12000}, {0x45b14000}, {0x45b16000}, - {0x45b18000}, {0x45b1a000}, {0x45b1c000}, {0x45b1e000}, - {0x45b20000}, {0x45b22000}, {0x45b24000}, {0x45b26000}, - {0x45b28000}, {0x45b2a000}, {0x45b2c000}, {0x45b2e000}, - {0x45b30000}, {0x45b32000}, {0x45b34000}, {0x45b36000}, - {0x45b38000}, {0x45b3a000}, {0x45b3c000}, {0x45b3e000}, - {0x45b40000}, {0x45b42000}, {0x45b44000}, {0x45b46000}, - {0x45b48000}, {0x45b4a000}, {0x45b4c000}, {0x45b4e000}, - {0x45b50000}, {0x45b52000}, {0x45b54000}, {0x45b56000}, - {0x45b58000}, {0x45b5a000}, {0x45b5c000}, {0x45b5e000}, - {0x45b60000}, {0x45b62000}, {0x45b64000}, {0x45b66000}, - {0x45b68000}, {0x45b6a000}, {0x45b6c000}, {0x45b6e000}, - {0x45b70000}, {0x45b72000}, {0x45b74000}, {0x45b76000}, - {0x45b78000}, {0x45b7a000}, {0x45b7c000}, {0x45b7e000}, - {0x45b80000}, {0x45b82000}, {0x45b84000}, {0x45b86000}, - {0x45b88000}, {0x45b8a000}, {0x45b8c000}, {0x45b8e000}, - {0x45b90000}, {0x45b92000}, {0x45b94000}, {0x45b96000}, - {0x45b98000}, {0x45b9a000}, {0x45b9c000}, {0x45b9e000}, - {0x45ba0000}, {0x45ba2000}, {0x45ba4000}, {0x45ba6000}, - {0x45ba8000}, {0x45baa000}, {0x45bac000}, {0x45bae000}, - {0x45bb0000}, {0x45bb2000}, {0x45bb4000}, {0x45bb6000}, - {0x45bb8000}, {0x45bba000}, {0x45bbc000}, {0x45bbe000}, - {0x45bc0000}, {0x45bc2000}, {0x45bc4000}, {0x45bc6000}, - {0x45bc8000}, {0x45bca000}, {0x45bcc000}, {0x45bce000}, - {0x45bd0000}, {0x45bd2000}, {0x45bd4000}, {0x45bd6000}, - {0x45bd8000}, {0x45bda000}, {0x45bdc000}, {0x45bde000}, - {0x45be0000}, {0x45be2000}, {0x45be4000}, {0x45be6000}, - {0x45be8000}, {0x45bea000}, {0x45bec000}, {0x45bee000}, - {0x45bf0000}, {0x45bf2000}, {0x45bf4000}, {0x45bf6000}, - {0x45bf8000}, {0x45bfa000}, {0x45bfc000}, {0x45bfe000}, - {0x45c00000}, {0x45c02000}, {0x45c04000}, {0x45c06000}, - {0x45c08000}, {0x45c0a000}, {0x45c0c000}, {0x45c0e000}, - {0x45c10000}, {0x45c12000}, {0x45c14000}, {0x45c16000}, - {0x45c18000}, {0x45c1a000}, {0x45c1c000}, {0x45c1e000}, - {0x45c20000}, {0x45c22000}, {0x45c24000}, {0x45c26000}, - {0x45c28000}, {0x45c2a000}, {0x45c2c000}, {0x45c2e000}, - {0x45c30000}, {0x45c32000}, {0x45c34000}, {0x45c36000}, - {0x45c38000}, {0x45c3a000}, {0x45c3c000}, {0x45c3e000}, - {0x45c40000}, {0x45c42000}, {0x45c44000}, {0x45c46000}, - {0x45c48000}, {0x45c4a000}, {0x45c4c000}, {0x45c4e000}, - {0x45c50000}, {0x45c52000}, {0x45c54000}, {0x45c56000}, - {0x45c58000}, {0x45c5a000}, {0x45c5c000}, {0x45c5e000}, - {0x45c60000}, {0x45c62000}, {0x45c64000}, {0x45c66000}, - {0x45c68000}, {0x45c6a000}, {0x45c6c000}, {0x45c6e000}, - {0x45c70000}, {0x45c72000}, {0x45c74000}, {0x45c76000}, - {0x45c78000}, {0x45c7a000}, {0x45c7c000}, {0x45c7e000}, - {0x45c80000}, {0x45c82000}, {0x45c84000}, {0x45c86000}, - {0x45c88000}, {0x45c8a000}, {0x45c8c000}, {0x45c8e000}, - {0x45c90000}, {0x45c92000}, {0x45c94000}, {0x45c96000}, - {0x45c98000}, {0x45c9a000}, {0x45c9c000}, {0x45c9e000}, - {0x45ca0000}, {0x45ca2000}, {0x45ca4000}, {0x45ca6000}, - {0x45ca8000}, {0x45caa000}, {0x45cac000}, {0x45cae000}, - {0x45cb0000}, {0x45cb2000}, {0x45cb4000}, {0x45cb6000}, - {0x45cb8000}, {0x45cba000}, {0x45cbc000}, {0x45cbe000}, - {0x45cc0000}, {0x45cc2000}, {0x45cc4000}, {0x45cc6000}, - {0x45cc8000}, {0x45cca000}, {0x45ccc000}, {0x45cce000}, - {0x45cd0000}, {0x45cd2000}, {0x45cd4000}, {0x45cd6000}, - {0x45cd8000}, {0x45cda000}, {0x45cdc000}, {0x45cde000}, - {0x45ce0000}, {0x45ce2000}, {0x45ce4000}, {0x45ce6000}, - {0x45ce8000}, {0x45cea000}, {0x45cec000}, {0x45cee000}, - {0x45cf0000}, {0x45cf2000}, {0x45cf4000}, {0x45cf6000}, - {0x45cf8000}, {0x45cfa000}, {0x45cfc000}, {0x45cfe000}, - {0x45d00000}, {0x45d02000}, {0x45d04000}, {0x45d06000}, - {0x45d08000}, {0x45d0a000}, {0x45d0c000}, {0x45d0e000}, - {0x45d10000}, {0x45d12000}, {0x45d14000}, {0x45d16000}, - {0x45d18000}, {0x45d1a000}, {0x45d1c000}, {0x45d1e000}, - {0x45d20000}, {0x45d22000}, {0x45d24000}, {0x45d26000}, - {0x45d28000}, {0x45d2a000}, {0x45d2c000}, {0x45d2e000}, - {0x45d30000}, {0x45d32000}, {0x45d34000}, {0x45d36000}, - {0x45d38000}, {0x45d3a000}, {0x45d3c000}, {0x45d3e000}, - {0x45d40000}, {0x45d42000}, {0x45d44000}, {0x45d46000}, - {0x45d48000}, {0x45d4a000}, {0x45d4c000}, {0x45d4e000}, - {0x45d50000}, {0x45d52000}, {0x45d54000}, {0x45d56000}, - {0x45d58000}, {0x45d5a000}, {0x45d5c000}, {0x45d5e000}, - {0x45d60000}, {0x45d62000}, {0x45d64000}, {0x45d66000}, - {0x45d68000}, {0x45d6a000}, {0x45d6c000}, {0x45d6e000}, - {0x45d70000}, {0x45d72000}, {0x45d74000}, {0x45d76000}, - {0x45d78000}, {0x45d7a000}, {0x45d7c000}, {0x45d7e000}, - {0x45d80000}, {0x45d82000}, {0x45d84000}, {0x45d86000}, - {0x45d88000}, {0x45d8a000}, {0x45d8c000}, {0x45d8e000}, - {0x45d90000}, {0x45d92000}, {0x45d94000}, {0x45d96000}, - {0x45d98000}, {0x45d9a000}, {0x45d9c000}, {0x45d9e000}, - {0x45da0000}, {0x45da2000}, {0x45da4000}, {0x45da6000}, - {0x45da8000}, {0x45daa000}, {0x45dac000}, {0x45dae000}, - {0x45db0000}, {0x45db2000}, {0x45db4000}, {0x45db6000}, - {0x45db8000}, {0x45dba000}, {0x45dbc000}, {0x45dbe000}, - {0x45dc0000}, {0x45dc2000}, {0x45dc4000}, {0x45dc6000}, - {0x45dc8000}, {0x45dca000}, {0x45dcc000}, {0x45dce000}, - {0x45dd0000}, {0x45dd2000}, {0x45dd4000}, {0x45dd6000}, - {0x45dd8000}, {0x45dda000}, {0x45ddc000}, {0x45dde000}, - {0x45de0000}, {0x45de2000}, {0x45de4000}, {0x45de6000}, - {0x45de8000}, {0x45dea000}, {0x45dec000}, {0x45dee000}, - {0x45df0000}, {0x45df2000}, {0x45df4000}, {0x45df6000}, - {0x45df8000}, {0x45dfa000}, {0x45dfc000}, {0x45dfe000}, - {0x45e00000}, {0x45e02000}, {0x45e04000}, {0x45e06000}, - {0x45e08000}, {0x45e0a000}, {0x45e0c000}, {0x45e0e000}, - {0x45e10000}, {0x45e12000}, {0x45e14000}, {0x45e16000}, - {0x45e18000}, {0x45e1a000}, {0x45e1c000}, {0x45e1e000}, - {0x45e20000}, {0x45e22000}, {0x45e24000}, {0x45e26000}, - {0x45e28000}, {0x45e2a000}, {0x45e2c000}, {0x45e2e000}, - {0x45e30000}, {0x45e32000}, {0x45e34000}, {0x45e36000}, - {0x45e38000}, {0x45e3a000}, {0x45e3c000}, {0x45e3e000}, - {0x45e40000}, {0x45e42000}, {0x45e44000}, {0x45e46000}, - {0x45e48000}, {0x45e4a000}, {0x45e4c000}, {0x45e4e000}, - {0x45e50000}, {0x45e52000}, {0x45e54000}, {0x45e56000}, - {0x45e58000}, {0x45e5a000}, {0x45e5c000}, {0x45e5e000}, - {0x45e60000}, {0x45e62000}, {0x45e64000}, {0x45e66000}, - {0x45e68000}, {0x45e6a000}, {0x45e6c000}, {0x45e6e000}, - {0x45e70000}, {0x45e72000}, {0x45e74000}, {0x45e76000}, - {0x45e78000}, {0x45e7a000}, {0x45e7c000}, {0x45e7e000}, - {0x45e80000}, {0x45e82000}, {0x45e84000}, {0x45e86000}, - {0x45e88000}, {0x45e8a000}, {0x45e8c000}, {0x45e8e000}, - {0x45e90000}, {0x45e92000}, {0x45e94000}, {0x45e96000}, - {0x45e98000}, {0x45e9a000}, {0x45e9c000}, {0x45e9e000}, - {0x45ea0000}, {0x45ea2000}, {0x45ea4000}, {0x45ea6000}, - {0x45ea8000}, {0x45eaa000}, {0x45eac000}, {0x45eae000}, - {0x45eb0000}, {0x45eb2000}, {0x45eb4000}, {0x45eb6000}, - {0x45eb8000}, {0x45eba000}, {0x45ebc000}, {0x45ebe000}, - {0x45ec0000}, {0x45ec2000}, {0x45ec4000}, {0x45ec6000}, - {0x45ec8000}, {0x45eca000}, {0x45ecc000}, {0x45ece000}, - {0x45ed0000}, {0x45ed2000}, {0x45ed4000}, {0x45ed6000}, - {0x45ed8000}, {0x45eda000}, {0x45edc000}, {0x45ede000}, - {0x45ee0000}, {0x45ee2000}, {0x45ee4000}, {0x45ee6000}, - {0x45ee8000}, {0x45eea000}, {0x45eec000}, {0x45eee000}, - {0x45ef0000}, {0x45ef2000}, {0x45ef4000}, {0x45ef6000}, - {0x45ef8000}, {0x45efa000}, {0x45efc000}, {0x45efe000}, - {0x45f00000}, {0x45f02000}, {0x45f04000}, {0x45f06000}, - {0x45f08000}, {0x45f0a000}, {0x45f0c000}, {0x45f0e000}, - {0x45f10000}, {0x45f12000}, {0x45f14000}, {0x45f16000}, - {0x45f18000}, {0x45f1a000}, {0x45f1c000}, {0x45f1e000}, - {0x45f20000}, {0x45f22000}, {0x45f24000}, {0x45f26000}, - {0x45f28000}, {0x45f2a000}, {0x45f2c000}, {0x45f2e000}, - {0x45f30000}, {0x45f32000}, {0x45f34000}, {0x45f36000}, - {0x45f38000}, {0x45f3a000}, {0x45f3c000}, {0x45f3e000}, - {0x45f40000}, {0x45f42000}, {0x45f44000}, {0x45f46000}, - {0x45f48000}, {0x45f4a000}, {0x45f4c000}, {0x45f4e000}, - {0x45f50000}, {0x45f52000}, {0x45f54000}, {0x45f56000}, - {0x45f58000}, {0x45f5a000}, {0x45f5c000}, {0x45f5e000}, - {0x45f60000}, {0x45f62000}, {0x45f64000}, {0x45f66000}, - {0x45f68000}, {0x45f6a000}, {0x45f6c000}, {0x45f6e000}, - {0x45f70000}, {0x45f72000}, {0x45f74000}, {0x45f76000}, - {0x45f78000}, {0x45f7a000}, {0x45f7c000}, {0x45f7e000}, - {0x45f80000}, {0x45f82000}, {0x45f84000}, {0x45f86000}, - {0x45f88000}, {0x45f8a000}, {0x45f8c000}, {0x45f8e000}, - {0x45f90000}, {0x45f92000}, {0x45f94000}, {0x45f96000}, - {0x45f98000}, {0x45f9a000}, {0x45f9c000}, {0x45f9e000}, - {0x45fa0000}, {0x45fa2000}, {0x45fa4000}, {0x45fa6000}, - {0x45fa8000}, {0x45faa000}, {0x45fac000}, {0x45fae000}, - {0x45fb0000}, {0x45fb2000}, {0x45fb4000}, {0x45fb6000}, - {0x45fb8000}, {0x45fba000}, {0x45fbc000}, {0x45fbe000}, - {0x45fc0000}, {0x45fc2000}, {0x45fc4000}, {0x45fc6000}, - {0x45fc8000}, {0x45fca000}, {0x45fcc000}, {0x45fce000}, - {0x45fd0000}, {0x45fd2000}, {0x45fd4000}, {0x45fd6000}, - {0x45fd8000}, {0x45fda000}, {0x45fdc000}, {0x45fde000}, - {0x45fe0000}, {0x45fe2000}, {0x45fe4000}, {0x45fe6000}, - {0x45fe8000}, {0x45fea000}, {0x45fec000}, {0x45fee000}, - {0x45ff0000}, {0x45ff2000}, {0x45ff4000}, {0x45ff6000}, - {0x45ff8000}, {0x45ffa000}, {0x45ffc000}, {0x45ffe000}, - {0x46000000}, {0x46002000}, {0x46004000}, {0x46006000}, - {0x46008000}, {0x4600a000}, {0x4600c000}, {0x4600e000}, - {0x46010000}, {0x46012000}, {0x46014000}, {0x46016000}, - {0x46018000}, {0x4601a000}, {0x4601c000}, {0x4601e000}, - {0x46020000}, {0x46022000}, {0x46024000}, {0x46026000}, - {0x46028000}, {0x4602a000}, {0x4602c000}, {0x4602e000}, - {0x46030000}, {0x46032000}, {0x46034000}, {0x46036000}, - {0x46038000}, {0x4603a000}, {0x4603c000}, {0x4603e000}, - {0x46040000}, {0x46042000}, {0x46044000}, {0x46046000}, - {0x46048000}, {0x4604a000}, {0x4604c000}, {0x4604e000}, - {0x46050000}, {0x46052000}, {0x46054000}, {0x46056000}, - {0x46058000}, {0x4605a000}, {0x4605c000}, {0x4605e000}, - {0x46060000}, {0x46062000}, {0x46064000}, {0x46066000}, - {0x46068000}, {0x4606a000}, {0x4606c000}, {0x4606e000}, - {0x46070000}, {0x46072000}, {0x46074000}, {0x46076000}, - {0x46078000}, {0x4607a000}, {0x4607c000}, {0x4607e000}, - {0x46080000}, {0x46082000}, {0x46084000}, {0x46086000}, - {0x46088000}, {0x4608a000}, {0x4608c000}, {0x4608e000}, - {0x46090000}, {0x46092000}, {0x46094000}, {0x46096000}, - {0x46098000}, {0x4609a000}, {0x4609c000}, {0x4609e000}, - {0x460a0000}, {0x460a2000}, {0x460a4000}, {0x460a6000}, - {0x460a8000}, {0x460aa000}, {0x460ac000}, {0x460ae000}, - {0x460b0000}, {0x460b2000}, {0x460b4000}, {0x460b6000}, - {0x460b8000}, {0x460ba000}, {0x460bc000}, {0x460be000}, - {0x460c0000}, {0x460c2000}, {0x460c4000}, {0x460c6000}, - {0x460c8000}, {0x460ca000}, {0x460cc000}, {0x460ce000}, - {0x460d0000}, {0x460d2000}, {0x460d4000}, {0x460d6000}, - {0x460d8000}, {0x460da000}, {0x460dc000}, {0x460de000}, - {0x460e0000}, {0x460e2000}, {0x460e4000}, {0x460e6000}, - {0x460e8000}, {0x460ea000}, {0x460ec000}, {0x460ee000}, - {0x460f0000}, {0x460f2000}, {0x460f4000}, {0x460f6000}, - {0x460f8000}, {0x460fa000}, {0x460fc000}, {0x460fe000}, - {0x46100000}, {0x46102000}, {0x46104000}, {0x46106000}, - {0x46108000}, {0x4610a000}, {0x4610c000}, {0x4610e000}, - {0x46110000}, {0x46112000}, {0x46114000}, {0x46116000}, - {0x46118000}, {0x4611a000}, {0x4611c000}, {0x4611e000}, - {0x46120000}, {0x46122000}, {0x46124000}, {0x46126000}, - {0x46128000}, {0x4612a000}, {0x4612c000}, {0x4612e000}, - {0x46130000}, {0x46132000}, {0x46134000}, {0x46136000}, - {0x46138000}, {0x4613a000}, {0x4613c000}, {0x4613e000}, - {0x46140000}, {0x46142000}, {0x46144000}, {0x46146000}, - {0x46148000}, {0x4614a000}, {0x4614c000}, {0x4614e000}, - {0x46150000}, {0x46152000}, {0x46154000}, {0x46156000}, - {0x46158000}, {0x4615a000}, {0x4615c000}, {0x4615e000}, - {0x46160000}, {0x46162000}, {0x46164000}, {0x46166000}, - {0x46168000}, {0x4616a000}, {0x4616c000}, {0x4616e000}, - {0x46170000}, {0x46172000}, {0x46174000}, {0x46176000}, - {0x46178000}, {0x4617a000}, {0x4617c000}, {0x4617e000}, - {0x46180000}, {0x46182000}, {0x46184000}, {0x46186000}, - {0x46188000}, {0x4618a000}, {0x4618c000}, {0x4618e000}, - {0x46190000}, {0x46192000}, {0x46194000}, {0x46196000}, - {0x46198000}, {0x4619a000}, {0x4619c000}, {0x4619e000}, - {0x461a0000}, {0x461a2000}, {0x461a4000}, {0x461a6000}, - {0x461a8000}, {0x461aa000}, {0x461ac000}, {0x461ae000}, - {0x461b0000}, {0x461b2000}, {0x461b4000}, {0x461b6000}, - {0x461b8000}, {0x461ba000}, {0x461bc000}, {0x461be000}, - {0x461c0000}, {0x461c2000}, {0x461c4000}, {0x461c6000}, - {0x461c8000}, {0x461ca000}, {0x461cc000}, {0x461ce000}, - {0x461d0000}, {0x461d2000}, {0x461d4000}, {0x461d6000}, - {0x461d8000}, {0x461da000}, {0x461dc000}, {0x461de000}, - {0x461e0000}, {0x461e2000}, {0x461e4000}, {0x461e6000}, - {0x461e8000}, {0x461ea000}, {0x461ec000}, {0x461ee000}, - {0x461f0000}, {0x461f2000}, {0x461f4000}, {0x461f6000}, - {0x461f8000}, {0x461fa000}, {0x461fc000}, {0x461fe000}, - {0x46200000}, {0x46202000}, {0x46204000}, {0x46206000}, - {0x46208000}, {0x4620a000}, {0x4620c000}, {0x4620e000}, - {0x46210000}, {0x46212000}, {0x46214000}, {0x46216000}, - {0x46218000}, {0x4621a000}, {0x4621c000}, {0x4621e000}, - {0x46220000}, {0x46222000}, {0x46224000}, {0x46226000}, - {0x46228000}, {0x4622a000}, {0x4622c000}, {0x4622e000}, - {0x46230000}, {0x46232000}, {0x46234000}, {0x46236000}, - {0x46238000}, {0x4623a000}, {0x4623c000}, {0x4623e000}, - {0x46240000}, {0x46242000}, {0x46244000}, {0x46246000}, - {0x46248000}, {0x4624a000}, {0x4624c000}, {0x4624e000}, - {0x46250000}, {0x46252000}, {0x46254000}, {0x46256000}, - {0x46258000}, {0x4625a000}, {0x4625c000}, {0x4625e000}, - {0x46260000}, {0x46262000}, {0x46264000}, {0x46266000}, - {0x46268000}, {0x4626a000}, {0x4626c000}, {0x4626e000}, - {0x46270000}, {0x46272000}, {0x46274000}, {0x46276000}, - {0x46278000}, {0x4627a000}, {0x4627c000}, {0x4627e000}, - {0x46280000}, {0x46282000}, {0x46284000}, {0x46286000}, - {0x46288000}, {0x4628a000}, {0x4628c000}, {0x4628e000}, - {0x46290000}, {0x46292000}, {0x46294000}, {0x46296000}, - {0x46298000}, {0x4629a000}, {0x4629c000}, {0x4629e000}, - {0x462a0000}, {0x462a2000}, {0x462a4000}, {0x462a6000}, - {0x462a8000}, {0x462aa000}, {0x462ac000}, {0x462ae000}, - {0x462b0000}, {0x462b2000}, {0x462b4000}, {0x462b6000}, - {0x462b8000}, {0x462ba000}, {0x462bc000}, {0x462be000}, - {0x462c0000}, {0x462c2000}, {0x462c4000}, {0x462c6000}, - {0x462c8000}, {0x462ca000}, {0x462cc000}, {0x462ce000}, - {0x462d0000}, {0x462d2000}, {0x462d4000}, {0x462d6000}, - {0x462d8000}, {0x462da000}, {0x462dc000}, {0x462de000}, - {0x462e0000}, {0x462e2000}, {0x462e4000}, {0x462e6000}, - {0x462e8000}, {0x462ea000}, {0x462ec000}, {0x462ee000}, - {0x462f0000}, {0x462f2000}, {0x462f4000}, {0x462f6000}, - {0x462f8000}, {0x462fa000}, {0x462fc000}, {0x462fe000}, - {0x46300000}, {0x46302000}, {0x46304000}, {0x46306000}, - {0x46308000}, {0x4630a000}, {0x4630c000}, {0x4630e000}, - {0x46310000}, {0x46312000}, {0x46314000}, {0x46316000}, - {0x46318000}, {0x4631a000}, {0x4631c000}, {0x4631e000}, - {0x46320000}, {0x46322000}, {0x46324000}, {0x46326000}, - {0x46328000}, {0x4632a000}, {0x4632c000}, {0x4632e000}, - {0x46330000}, {0x46332000}, {0x46334000}, {0x46336000}, - {0x46338000}, {0x4633a000}, {0x4633c000}, {0x4633e000}, - {0x46340000}, {0x46342000}, {0x46344000}, {0x46346000}, - {0x46348000}, {0x4634a000}, {0x4634c000}, {0x4634e000}, - {0x46350000}, {0x46352000}, {0x46354000}, {0x46356000}, - {0x46358000}, {0x4635a000}, {0x4635c000}, {0x4635e000}, - {0x46360000}, {0x46362000}, {0x46364000}, {0x46366000}, - {0x46368000}, {0x4636a000}, {0x4636c000}, {0x4636e000}, - {0x46370000}, {0x46372000}, {0x46374000}, {0x46376000}, - {0x46378000}, {0x4637a000}, {0x4637c000}, {0x4637e000}, - {0x46380000}, {0x46382000}, {0x46384000}, {0x46386000}, - {0x46388000}, {0x4638a000}, {0x4638c000}, {0x4638e000}, - {0x46390000}, {0x46392000}, {0x46394000}, {0x46396000}, - {0x46398000}, {0x4639a000}, {0x4639c000}, {0x4639e000}, - {0x463a0000}, {0x463a2000}, {0x463a4000}, {0x463a6000}, - {0x463a8000}, {0x463aa000}, {0x463ac000}, {0x463ae000}, - {0x463b0000}, {0x463b2000}, {0x463b4000}, {0x463b6000}, - {0x463b8000}, {0x463ba000}, {0x463bc000}, {0x463be000}, - {0x463c0000}, {0x463c2000}, {0x463c4000}, {0x463c6000}, - {0x463c8000}, {0x463ca000}, {0x463cc000}, {0x463ce000}, - {0x463d0000}, {0x463d2000}, {0x463d4000}, {0x463d6000}, - {0x463d8000}, {0x463da000}, {0x463dc000}, {0x463de000}, - {0x463e0000}, {0x463e2000}, {0x463e4000}, {0x463e6000}, - {0x463e8000}, {0x463ea000}, {0x463ec000}, {0x463ee000}, - {0x463f0000}, {0x463f2000}, {0x463f4000}, {0x463f6000}, - {0x463f8000}, {0x463fa000}, {0x463fc000}, {0x463fe000}, - {0x46400000}, {0x46402000}, {0x46404000}, {0x46406000}, - {0x46408000}, {0x4640a000}, {0x4640c000}, {0x4640e000}, - {0x46410000}, {0x46412000}, {0x46414000}, {0x46416000}, - {0x46418000}, {0x4641a000}, {0x4641c000}, {0x4641e000}, - {0x46420000}, {0x46422000}, {0x46424000}, {0x46426000}, - {0x46428000}, {0x4642a000}, {0x4642c000}, {0x4642e000}, - {0x46430000}, {0x46432000}, {0x46434000}, {0x46436000}, - {0x46438000}, {0x4643a000}, {0x4643c000}, {0x4643e000}, - {0x46440000}, {0x46442000}, {0x46444000}, {0x46446000}, - {0x46448000}, {0x4644a000}, {0x4644c000}, {0x4644e000}, - {0x46450000}, {0x46452000}, {0x46454000}, {0x46456000}, - {0x46458000}, {0x4645a000}, {0x4645c000}, {0x4645e000}, - {0x46460000}, {0x46462000}, {0x46464000}, {0x46466000}, - {0x46468000}, {0x4646a000}, {0x4646c000}, {0x4646e000}, - {0x46470000}, {0x46472000}, {0x46474000}, {0x46476000}, - {0x46478000}, {0x4647a000}, {0x4647c000}, {0x4647e000}, - {0x46480000}, {0x46482000}, {0x46484000}, {0x46486000}, - {0x46488000}, {0x4648a000}, {0x4648c000}, {0x4648e000}, - {0x46490000}, {0x46492000}, {0x46494000}, {0x46496000}, - {0x46498000}, {0x4649a000}, {0x4649c000}, {0x4649e000}, - {0x464a0000}, {0x464a2000}, {0x464a4000}, {0x464a6000}, - {0x464a8000}, {0x464aa000}, {0x464ac000}, {0x464ae000}, - {0x464b0000}, {0x464b2000}, {0x464b4000}, {0x464b6000}, - {0x464b8000}, {0x464ba000}, {0x464bc000}, {0x464be000}, - {0x464c0000}, {0x464c2000}, {0x464c4000}, {0x464c6000}, - {0x464c8000}, {0x464ca000}, {0x464cc000}, {0x464ce000}, - {0x464d0000}, {0x464d2000}, {0x464d4000}, {0x464d6000}, - {0x464d8000}, {0x464da000}, {0x464dc000}, {0x464de000}, - {0x464e0000}, {0x464e2000}, {0x464e4000}, {0x464e6000}, - {0x464e8000}, {0x464ea000}, {0x464ec000}, {0x464ee000}, - {0x464f0000}, {0x464f2000}, {0x464f4000}, {0x464f6000}, - {0x464f8000}, {0x464fa000}, {0x464fc000}, {0x464fe000}, - {0x46500000}, {0x46502000}, {0x46504000}, {0x46506000}, - {0x46508000}, {0x4650a000}, {0x4650c000}, {0x4650e000}, - {0x46510000}, {0x46512000}, {0x46514000}, {0x46516000}, - {0x46518000}, {0x4651a000}, {0x4651c000}, {0x4651e000}, - {0x46520000}, {0x46522000}, {0x46524000}, {0x46526000}, - {0x46528000}, {0x4652a000}, {0x4652c000}, {0x4652e000}, - {0x46530000}, {0x46532000}, {0x46534000}, {0x46536000}, - {0x46538000}, {0x4653a000}, {0x4653c000}, {0x4653e000}, - {0x46540000}, {0x46542000}, {0x46544000}, {0x46546000}, - {0x46548000}, {0x4654a000}, {0x4654c000}, {0x4654e000}, - {0x46550000}, {0x46552000}, {0x46554000}, {0x46556000}, - {0x46558000}, {0x4655a000}, {0x4655c000}, {0x4655e000}, - {0x46560000}, {0x46562000}, {0x46564000}, {0x46566000}, - {0x46568000}, {0x4656a000}, {0x4656c000}, {0x4656e000}, - {0x46570000}, {0x46572000}, {0x46574000}, {0x46576000}, - {0x46578000}, {0x4657a000}, {0x4657c000}, {0x4657e000}, - {0x46580000}, {0x46582000}, {0x46584000}, {0x46586000}, - {0x46588000}, {0x4658a000}, {0x4658c000}, {0x4658e000}, - {0x46590000}, {0x46592000}, {0x46594000}, {0x46596000}, - {0x46598000}, {0x4659a000}, {0x4659c000}, {0x4659e000}, - {0x465a0000}, {0x465a2000}, {0x465a4000}, {0x465a6000}, - {0x465a8000}, {0x465aa000}, {0x465ac000}, {0x465ae000}, - {0x465b0000}, {0x465b2000}, {0x465b4000}, {0x465b6000}, - {0x465b8000}, {0x465ba000}, {0x465bc000}, {0x465be000}, - {0x465c0000}, {0x465c2000}, {0x465c4000}, {0x465c6000}, - {0x465c8000}, {0x465ca000}, {0x465cc000}, {0x465ce000}, - {0x465d0000}, {0x465d2000}, {0x465d4000}, {0x465d6000}, - {0x465d8000}, {0x465da000}, {0x465dc000}, {0x465de000}, - {0x465e0000}, {0x465e2000}, {0x465e4000}, {0x465e6000}, - {0x465e8000}, {0x465ea000}, {0x465ec000}, {0x465ee000}, - {0x465f0000}, {0x465f2000}, {0x465f4000}, {0x465f6000}, - {0x465f8000}, {0x465fa000}, {0x465fc000}, {0x465fe000}, - {0x46600000}, {0x46602000}, {0x46604000}, {0x46606000}, - {0x46608000}, {0x4660a000}, {0x4660c000}, {0x4660e000}, - {0x46610000}, {0x46612000}, {0x46614000}, {0x46616000}, - {0x46618000}, {0x4661a000}, {0x4661c000}, {0x4661e000}, - {0x46620000}, {0x46622000}, {0x46624000}, {0x46626000}, - {0x46628000}, {0x4662a000}, {0x4662c000}, {0x4662e000}, - {0x46630000}, {0x46632000}, {0x46634000}, {0x46636000}, - {0x46638000}, {0x4663a000}, {0x4663c000}, {0x4663e000}, - {0x46640000}, {0x46642000}, {0x46644000}, {0x46646000}, - {0x46648000}, {0x4664a000}, {0x4664c000}, {0x4664e000}, - {0x46650000}, {0x46652000}, {0x46654000}, {0x46656000}, - {0x46658000}, {0x4665a000}, {0x4665c000}, {0x4665e000}, - {0x46660000}, {0x46662000}, {0x46664000}, {0x46666000}, - {0x46668000}, {0x4666a000}, {0x4666c000}, {0x4666e000}, - {0x46670000}, {0x46672000}, {0x46674000}, {0x46676000}, - {0x46678000}, {0x4667a000}, {0x4667c000}, {0x4667e000}, - {0x46680000}, {0x46682000}, {0x46684000}, {0x46686000}, - {0x46688000}, {0x4668a000}, {0x4668c000}, {0x4668e000}, - {0x46690000}, {0x46692000}, {0x46694000}, {0x46696000}, - {0x46698000}, {0x4669a000}, {0x4669c000}, {0x4669e000}, - {0x466a0000}, {0x466a2000}, {0x466a4000}, {0x466a6000}, - {0x466a8000}, {0x466aa000}, {0x466ac000}, {0x466ae000}, - {0x466b0000}, {0x466b2000}, {0x466b4000}, {0x466b6000}, - {0x466b8000}, {0x466ba000}, {0x466bc000}, {0x466be000}, - {0x466c0000}, {0x466c2000}, {0x466c4000}, {0x466c6000}, - {0x466c8000}, {0x466ca000}, {0x466cc000}, {0x466ce000}, - {0x466d0000}, {0x466d2000}, {0x466d4000}, {0x466d6000}, - {0x466d8000}, {0x466da000}, {0x466dc000}, {0x466de000}, - {0x466e0000}, {0x466e2000}, {0x466e4000}, {0x466e6000}, - {0x466e8000}, {0x466ea000}, {0x466ec000}, {0x466ee000}, - {0x466f0000}, {0x466f2000}, {0x466f4000}, {0x466f6000}, - {0x466f8000}, {0x466fa000}, {0x466fc000}, {0x466fe000}, - {0x46700000}, {0x46702000}, {0x46704000}, {0x46706000}, - {0x46708000}, {0x4670a000}, {0x4670c000}, {0x4670e000}, - {0x46710000}, {0x46712000}, {0x46714000}, {0x46716000}, - {0x46718000}, {0x4671a000}, {0x4671c000}, {0x4671e000}, - {0x46720000}, {0x46722000}, {0x46724000}, {0x46726000}, - {0x46728000}, {0x4672a000}, {0x4672c000}, {0x4672e000}, - {0x46730000}, {0x46732000}, {0x46734000}, {0x46736000}, - {0x46738000}, {0x4673a000}, {0x4673c000}, {0x4673e000}, - {0x46740000}, {0x46742000}, {0x46744000}, {0x46746000}, - {0x46748000}, {0x4674a000}, {0x4674c000}, {0x4674e000}, - {0x46750000}, {0x46752000}, {0x46754000}, {0x46756000}, - {0x46758000}, {0x4675a000}, {0x4675c000}, {0x4675e000}, - {0x46760000}, {0x46762000}, {0x46764000}, {0x46766000}, - {0x46768000}, {0x4676a000}, {0x4676c000}, {0x4676e000}, - {0x46770000}, {0x46772000}, {0x46774000}, {0x46776000}, - {0x46778000}, {0x4677a000}, {0x4677c000}, {0x4677e000}, - {0x46780000}, {0x46782000}, {0x46784000}, {0x46786000}, - {0x46788000}, {0x4678a000}, {0x4678c000}, {0x4678e000}, - {0x46790000}, {0x46792000}, {0x46794000}, {0x46796000}, - {0x46798000}, {0x4679a000}, {0x4679c000}, {0x4679e000}, - {0x467a0000}, {0x467a2000}, {0x467a4000}, {0x467a6000}, - {0x467a8000}, {0x467aa000}, {0x467ac000}, {0x467ae000}, - {0x467b0000}, {0x467b2000}, {0x467b4000}, {0x467b6000}, - {0x467b8000}, {0x467ba000}, {0x467bc000}, {0x467be000}, - {0x467c0000}, {0x467c2000}, {0x467c4000}, {0x467c6000}, - {0x467c8000}, {0x467ca000}, {0x467cc000}, {0x467ce000}, - {0x467d0000}, {0x467d2000}, {0x467d4000}, {0x467d6000}, - {0x467d8000}, {0x467da000}, {0x467dc000}, {0x467de000}, - {0x467e0000}, {0x467e2000}, {0x467e4000}, {0x467e6000}, - {0x467e8000}, {0x467ea000}, {0x467ec000}, {0x467ee000}, - {0x467f0000}, {0x467f2000}, {0x467f4000}, {0x467f6000}, - {0x467f8000}, {0x467fa000}, {0x467fc000}, {0x467fe000}, - {0x46800000}, {0x46802000}, {0x46804000}, {0x46806000}, - {0x46808000}, {0x4680a000}, {0x4680c000}, {0x4680e000}, - {0x46810000}, {0x46812000}, {0x46814000}, {0x46816000}, - {0x46818000}, {0x4681a000}, {0x4681c000}, {0x4681e000}, - {0x46820000}, {0x46822000}, {0x46824000}, {0x46826000}, - {0x46828000}, {0x4682a000}, {0x4682c000}, {0x4682e000}, - {0x46830000}, {0x46832000}, {0x46834000}, {0x46836000}, - {0x46838000}, {0x4683a000}, {0x4683c000}, {0x4683e000}, - {0x46840000}, {0x46842000}, {0x46844000}, {0x46846000}, - {0x46848000}, {0x4684a000}, {0x4684c000}, {0x4684e000}, - {0x46850000}, {0x46852000}, {0x46854000}, {0x46856000}, - {0x46858000}, {0x4685a000}, {0x4685c000}, {0x4685e000}, - {0x46860000}, {0x46862000}, {0x46864000}, {0x46866000}, - {0x46868000}, {0x4686a000}, {0x4686c000}, {0x4686e000}, - {0x46870000}, {0x46872000}, {0x46874000}, {0x46876000}, - {0x46878000}, {0x4687a000}, {0x4687c000}, {0x4687e000}, - {0x46880000}, {0x46882000}, {0x46884000}, {0x46886000}, - {0x46888000}, {0x4688a000}, {0x4688c000}, {0x4688e000}, - {0x46890000}, {0x46892000}, {0x46894000}, {0x46896000}, - {0x46898000}, {0x4689a000}, {0x4689c000}, {0x4689e000}, - {0x468a0000}, {0x468a2000}, {0x468a4000}, {0x468a6000}, - {0x468a8000}, {0x468aa000}, {0x468ac000}, {0x468ae000}, - {0x468b0000}, {0x468b2000}, {0x468b4000}, {0x468b6000}, - {0x468b8000}, {0x468ba000}, {0x468bc000}, {0x468be000}, - {0x468c0000}, {0x468c2000}, {0x468c4000}, {0x468c6000}, - {0x468c8000}, {0x468ca000}, {0x468cc000}, {0x468ce000}, - {0x468d0000}, {0x468d2000}, {0x468d4000}, {0x468d6000}, - {0x468d8000}, {0x468da000}, {0x468dc000}, {0x468de000}, - {0x468e0000}, {0x468e2000}, {0x468e4000}, {0x468e6000}, - {0x468e8000}, {0x468ea000}, {0x468ec000}, {0x468ee000}, - {0x468f0000}, {0x468f2000}, {0x468f4000}, {0x468f6000}, - {0x468f8000}, {0x468fa000}, {0x468fc000}, {0x468fe000}, - {0x46900000}, {0x46902000}, {0x46904000}, {0x46906000}, - {0x46908000}, {0x4690a000}, {0x4690c000}, {0x4690e000}, - {0x46910000}, {0x46912000}, {0x46914000}, {0x46916000}, - {0x46918000}, {0x4691a000}, {0x4691c000}, {0x4691e000}, - {0x46920000}, {0x46922000}, {0x46924000}, {0x46926000}, - {0x46928000}, {0x4692a000}, {0x4692c000}, {0x4692e000}, - {0x46930000}, {0x46932000}, {0x46934000}, {0x46936000}, - {0x46938000}, {0x4693a000}, {0x4693c000}, {0x4693e000}, - {0x46940000}, {0x46942000}, {0x46944000}, {0x46946000}, - {0x46948000}, {0x4694a000}, {0x4694c000}, {0x4694e000}, - {0x46950000}, {0x46952000}, {0x46954000}, {0x46956000}, - {0x46958000}, {0x4695a000}, {0x4695c000}, {0x4695e000}, - {0x46960000}, {0x46962000}, {0x46964000}, {0x46966000}, - {0x46968000}, {0x4696a000}, {0x4696c000}, {0x4696e000}, - {0x46970000}, {0x46972000}, {0x46974000}, {0x46976000}, - {0x46978000}, {0x4697a000}, {0x4697c000}, {0x4697e000}, - {0x46980000}, {0x46982000}, {0x46984000}, {0x46986000}, - {0x46988000}, {0x4698a000}, {0x4698c000}, {0x4698e000}, - {0x46990000}, {0x46992000}, {0x46994000}, {0x46996000}, - {0x46998000}, {0x4699a000}, {0x4699c000}, {0x4699e000}, - {0x469a0000}, {0x469a2000}, {0x469a4000}, {0x469a6000}, - {0x469a8000}, {0x469aa000}, {0x469ac000}, {0x469ae000}, - {0x469b0000}, {0x469b2000}, {0x469b4000}, {0x469b6000}, - {0x469b8000}, {0x469ba000}, {0x469bc000}, {0x469be000}, - {0x469c0000}, {0x469c2000}, {0x469c4000}, {0x469c6000}, - {0x469c8000}, {0x469ca000}, {0x469cc000}, {0x469ce000}, - {0x469d0000}, {0x469d2000}, {0x469d4000}, {0x469d6000}, - {0x469d8000}, {0x469da000}, {0x469dc000}, {0x469de000}, - {0x469e0000}, {0x469e2000}, {0x469e4000}, {0x469e6000}, - {0x469e8000}, {0x469ea000}, {0x469ec000}, {0x469ee000}, - {0x469f0000}, {0x469f2000}, {0x469f4000}, {0x469f6000}, - {0x469f8000}, {0x469fa000}, {0x469fc000}, {0x469fe000}, - {0x46a00000}, {0x46a02000}, {0x46a04000}, {0x46a06000}, - {0x46a08000}, {0x46a0a000}, {0x46a0c000}, {0x46a0e000}, - {0x46a10000}, {0x46a12000}, {0x46a14000}, {0x46a16000}, - {0x46a18000}, {0x46a1a000}, {0x46a1c000}, {0x46a1e000}, - {0x46a20000}, {0x46a22000}, {0x46a24000}, {0x46a26000}, - {0x46a28000}, {0x46a2a000}, {0x46a2c000}, {0x46a2e000}, - {0x46a30000}, {0x46a32000}, {0x46a34000}, {0x46a36000}, - {0x46a38000}, {0x46a3a000}, {0x46a3c000}, {0x46a3e000}, - {0x46a40000}, {0x46a42000}, {0x46a44000}, {0x46a46000}, - {0x46a48000}, {0x46a4a000}, {0x46a4c000}, {0x46a4e000}, - {0x46a50000}, {0x46a52000}, {0x46a54000}, {0x46a56000}, - {0x46a58000}, {0x46a5a000}, {0x46a5c000}, {0x46a5e000}, - {0x46a60000}, {0x46a62000}, {0x46a64000}, {0x46a66000}, - {0x46a68000}, {0x46a6a000}, {0x46a6c000}, {0x46a6e000}, - {0x46a70000}, {0x46a72000}, {0x46a74000}, {0x46a76000}, - {0x46a78000}, {0x46a7a000}, {0x46a7c000}, {0x46a7e000}, - {0x46a80000}, {0x46a82000}, {0x46a84000}, {0x46a86000}, - {0x46a88000}, {0x46a8a000}, {0x46a8c000}, {0x46a8e000}, - {0x46a90000}, {0x46a92000}, {0x46a94000}, {0x46a96000}, - {0x46a98000}, {0x46a9a000}, {0x46a9c000}, {0x46a9e000}, - {0x46aa0000}, {0x46aa2000}, {0x46aa4000}, {0x46aa6000}, - {0x46aa8000}, {0x46aaa000}, {0x46aac000}, {0x46aae000}, - {0x46ab0000}, {0x46ab2000}, {0x46ab4000}, {0x46ab6000}, - {0x46ab8000}, {0x46aba000}, {0x46abc000}, {0x46abe000}, - {0x46ac0000}, {0x46ac2000}, {0x46ac4000}, {0x46ac6000}, - {0x46ac8000}, {0x46aca000}, {0x46acc000}, {0x46ace000}, - {0x46ad0000}, {0x46ad2000}, {0x46ad4000}, {0x46ad6000}, - {0x46ad8000}, {0x46ada000}, {0x46adc000}, {0x46ade000}, - {0x46ae0000}, {0x46ae2000}, {0x46ae4000}, {0x46ae6000}, - {0x46ae8000}, {0x46aea000}, {0x46aec000}, {0x46aee000}, - {0x46af0000}, {0x46af2000}, {0x46af4000}, {0x46af6000}, - {0x46af8000}, {0x46afa000}, {0x46afc000}, {0x46afe000}, - {0x46b00000}, {0x46b02000}, {0x46b04000}, {0x46b06000}, - {0x46b08000}, {0x46b0a000}, {0x46b0c000}, {0x46b0e000}, - {0x46b10000}, {0x46b12000}, {0x46b14000}, {0x46b16000}, - {0x46b18000}, {0x46b1a000}, {0x46b1c000}, {0x46b1e000}, - {0x46b20000}, {0x46b22000}, {0x46b24000}, {0x46b26000}, - {0x46b28000}, {0x46b2a000}, {0x46b2c000}, {0x46b2e000}, - {0x46b30000}, {0x46b32000}, {0x46b34000}, {0x46b36000}, - {0x46b38000}, {0x46b3a000}, {0x46b3c000}, {0x46b3e000}, - {0x46b40000}, {0x46b42000}, {0x46b44000}, {0x46b46000}, - {0x46b48000}, {0x46b4a000}, {0x46b4c000}, {0x46b4e000}, - {0x46b50000}, {0x46b52000}, {0x46b54000}, {0x46b56000}, - {0x46b58000}, {0x46b5a000}, {0x46b5c000}, {0x46b5e000}, - {0x46b60000}, {0x46b62000}, {0x46b64000}, {0x46b66000}, - {0x46b68000}, {0x46b6a000}, {0x46b6c000}, {0x46b6e000}, - {0x46b70000}, {0x46b72000}, {0x46b74000}, {0x46b76000}, - {0x46b78000}, {0x46b7a000}, {0x46b7c000}, {0x46b7e000}, - {0x46b80000}, {0x46b82000}, {0x46b84000}, {0x46b86000}, - {0x46b88000}, {0x46b8a000}, {0x46b8c000}, {0x46b8e000}, - {0x46b90000}, {0x46b92000}, {0x46b94000}, {0x46b96000}, - {0x46b98000}, {0x46b9a000}, {0x46b9c000}, {0x46b9e000}, - {0x46ba0000}, {0x46ba2000}, {0x46ba4000}, {0x46ba6000}, - {0x46ba8000}, {0x46baa000}, {0x46bac000}, {0x46bae000}, - {0x46bb0000}, {0x46bb2000}, {0x46bb4000}, {0x46bb6000}, - {0x46bb8000}, {0x46bba000}, {0x46bbc000}, {0x46bbe000}, - {0x46bc0000}, {0x46bc2000}, {0x46bc4000}, {0x46bc6000}, - {0x46bc8000}, {0x46bca000}, {0x46bcc000}, {0x46bce000}, - {0x46bd0000}, {0x46bd2000}, {0x46bd4000}, {0x46bd6000}, - {0x46bd8000}, {0x46bda000}, {0x46bdc000}, {0x46bde000}, - {0x46be0000}, {0x46be2000}, {0x46be4000}, {0x46be6000}, - {0x46be8000}, {0x46bea000}, {0x46bec000}, {0x46bee000}, - {0x46bf0000}, {0x46bf2000}, {0x46bf4000}, {0x46bf6000}, - {0x46bf8000}, {0x46bfa000}, {0x46bfc000}, {0x46bfe000}, - {0x46c00000}, {0x46c02000}, {0x46c04000}, {0x46c06000}, - {0x46c08000}, {0x46c0a000}, {0x46c0c000}, {0x46c0e000}, - {0x46c10000}, {0x46c12000}, {0x46c14000}, {0x46c16000}, - {0x46c18000}, {0x46c1a000}, {0x46c1c000}, {0x46c1e000}, - {0x46c20000}, {0x46c22000}, {0x46c24000}, {0x46c26000}, - {0x46c28000}, {0x46c2a000}, {0x46c2c000}, {0x46c2e000}, - {0x46c30000}, {0x46c32000}, {0x46c34000}, {0x46c36000}, - {0x46c38000}, {0x46c3a000}, {0x46c3c000}, {0x46c3e000}, - {0x46c40000}, {0x46c42000}, {0x46c44000}, {0x46c46000}, - {0x46c48000}, {0x46c4a000}, {0x46c4c000}, {0x46c4e000}, - {0x46c50000}, {0x46c52000}, {0x46c54000}, {0x46c56000}, - {0x46c58000}, {0x46c5a000}, {0x46c5c000}, {0x46c5e000}, - {0x46c60000}, {0x46c62000}, {0x46c64000}, {0x46c66000}, - {0x46c68000}, {0x46c6a000}, {0x46c6c000}, {0x46c6e000}, - {0x46c70000}, {0x46c72000}, {0x46c74000}, {0x46c76000}, - {0x46c78000}, {0x46c7a000}, {0x46c7c000}, {0x46c7e000}, - {0x46c80000}, {0x46c82000}, {0x46c84000}, {0x46c86000}, - {0x46c88000}, {0x46c8a000}, {0x46c8c000}, {0x46c8e000}, - {0x46c90000}, {0x46c92000}, {0x46c94000}, {0x46c96000}, - {0x46c98000}, {0x46c9a000}, {0x46c9c000}, {0x46c9e000}, - {0x46ca0000}, {0x46ca2000}, {0x46ca4000}, {0x46ca6000}, - {0x46ca8000}, {0x46caa000}, {0x46cac000}, {0x46cae000}, - {0x46cb0000}, {0x46cb2000}, {0x46cb4000}, {0x46cb6000}, - {0x46cb8000}, {0x46cba000}, {0x46cbc000}, {0x46cbe000}, - {0x46cc0000}, {0x46cc2000}, {0x46cc4000}, {0x46cc6000}, - {0x46cc8000}, {0x46cca000}, {0x46ccc000}, {0x46cce000}, - {0x46cd0000}, {0x46cd2000}, {0x46cd4000}, {0x46cd6000}, - {0x46cd8000}, {0x46cda000}, {0x46cdc000}, {0x46cde000}, - {0x46ce0000}, {0x46ce2000}, {0x46ce4000}, {0x46ce6000}, - {0x46ce8000}, {0x46cea000}, {0x46cec000}, {0x46cee000}, - {0x46cf0000}, {0x46cf2000}, {0x46cf4000}, {0x46cf6000}, - {0x46cf8000}, {0x46cfa000}, {0x46cfc000}, {0x46cfe000}, - {0x46d00000}, {0x46d02000}, {0x46d04000}, {0x46d06000}, - {0x46d08000}, {0x46d0a000}, {0x46d0c000}, {0x46d0e000}, - {0x46d10000}, {0x46d12000}, {0x46d14000}, {0x46d16000}, - {0x46d18000}, {0x46d1a000}, {0x46d1c000}, {0x46d1e000}, - {0x46d20000}, {0x46d22000}, {0x46d24000}, {0x46d26000}, - {0x46d28000}, {0x46d2a000}, {0x46d2c000}, {0x46d2e000}, - {0x46d30000}, {0x46d32000}, {0x46d34000}, {0x46d36000}, - {0x46d38000}, {0x46d3a000}, {0x46d3c000}, {0x46d3e000}, - {0x46d40000}, {0x46d42000}, {0x46d44000}, {0x46d46000}, - {0x46d48000}, {0x46d4a000}, {0x46d4c000}, {0x46d4e000}, - {0x46d50000}, {0x46d52000}, {0x46d54000}, {0x46d56000}, - {0x46d58000}, {0x46d5a000}, {0x46d5c000}, {0x46d5e000}, - {0x46d60000}, {0x46d62000}, {0x46d64000}, {0x46d66000}, - {0x46d68000}, {0x46d6a000}, {0x46d6c000}, {0x46d6e000}, - {0x46d70000}, {0x46d72000}, {0x46d74000}, {0x46d76000}, - {0x46d78000}, {0x46d7a000}, {0x46d7c000}, {0x46d7e000}, - {0x46d80000}, {0x46d82000}, {0x46d84000}, {0x46d86000}, - {0x46d88000}, {0x46d8a000}, {0x46d8c000}, {0x46d8e000}, - {0x46d90000}, {0x46d92000}, {0x46d94000}, {0x46d96000}, - {0x46d98000}, {0x46d9a000}, {0x46d9c000}, {0x46d9e000}, - {0x46da0000}, {0x46da2000}, {0x46da4000}, {0x46da6000}, - {0x46da8000}, {0x46daa000}, {0x46dac000}, {0x46dae000}, - {0x46db0000}, {0x46db2000}, {0x46db4000}, {0x46db6000}, - {0x46db8000}, {0x46dba000}, {0x46dbc000}, {0x46dbe000}, - {0x46dc0000}, {0x46dc2000}, {0x46dc4000}, {0x46dc6000}, - {0x46dc8000}, {0x46dca000}, {0x46dcc000}, {0x46dce000}, - {0x46dd0000}, {0x46dd2000}, {0x46dd4000}, {0x46dd6000}, - {0x46dd8000}, {0x46dda000}, {0x46ddc000}, {0x46dde000}, - {0x46de0000}, {0x46de2000}, {0x46de4000}, {0x46de6000}, - {0x46de8000}, {0x46dea000}, {0x46dec000}, {0x46dee000}, - {0x46df0000}, {0x46df2000}, {0x46df4000}, {0x46df6000}, - {0x46df8000}, {0x46dfa000}, {0x46dfc000}, {0x46dfe000}, - {0x46e00000}, {0x46e02000}, {0x46e04000}, {0x46e06000}, - {0x46e08000}, {0x46e0a000}, {0x46e0c000}, {0x46e0e000}, - {0x46e10000}, {0x46e12000}, {0x46e14000}, {0x46e16000}, - {0x46e18000}, {0x46e1a000}, {0x46e1c000}, {0x46e1e000}, - {0x46e20000}, {0x46e22000}, {0x46e24000}, {0x46e26000}, - {0x46e28000}, {0x46e2a000}, {0x46e2c000}, {0x46e2e000}, - {0x46e30000}, {0x46e32000}, {0x46e34000}, {0x46e36000}, - {0x46e38000}, {0x46e3a000}, {0x46e3c000}, {0x46e3e000}, - {0x46e40000}, {0x46e42000}, {0x46e44000}, {0x46e46000}, - {0x46e48000}, {0x46e4a000}, {0x46e4c000}, {0x46e4e000}, - {0x46e50000}, {0x46e52000}, {0x46e54000}, {0x46e56000}, - {0x46e58000}, {0x46e5a000}, {0x46e5c000}, {0x46e5e000}, - {0x46e60000}, {0x46e62000}, {0x46e64000}, {0x46e66000}, - {0x46e68000}, {0x46e6a000}, {0x46e6c000}, {0x46e6e000}, - {0x46e70000}, {0x46e72000}, {0x46e74000}, {0x46e76000}, - {0x46e78000}, {0x46e7a000}, {0x46e7c000}, {0x46e7e000}, - {0x46e80000}, {0x46e82000}, {0x46e84000}, {0x46e86000}, - {0x46e88000}, {0x46e8a000}, {0x46e8c000}, {0x46e8e000}, - {0x46e90000}, {0x46e92000}, {0x46e94000}, {0x46e96000}, - {0x46e98000}, {0x46e9a000}, {0x46e9c000}, {0x46e9e000}, - {0x46ea0000}, {0x46ea2000}, {0x46ea4000}, {0x46ea6000}, - {0x46ea8000}, {0x46eaa000}, {0x46eac000}, {0x46eae000}, - {0x46eb0000}, {0x46eb2000}, {0x46eb4000}, {0x46eb6000}, - {0x46eb8000}, {0x46eba000}, {0x46ebc000}, {0x46ebe000}, - {0x46ec0000}, {0x46ec2000}, {0x46ec4000}, {0x46ec6000}, - {0x46ec8000}, {0x46eca000}, {0x46ecc000}, {0x46ece000}, - {0x46ed0000}, {0x46ed2000}, {0x46ed4000}, {0x46ed6000}, - {0x46ed8000}, {0x46eda000}, {0x46edc000}, {0x46ede000}, - {0x46ee0000}, {0x46ee2000}, {0x46ee4000}, {0x46ee6000}, - {0x46ee8000}, {0x46eea000}, {0x46eec000}, {0x46eee000}, - {0x46ef0000}, {0x46ef2000}, {0x46ef4000}, {0x46ef6000}, - {0x46ef8000}, {0x46efa000}, {0x46efc000}, {0x46efe000}, - {0x46f00000}, {0x46f02000}, {0x46f04000}, {0x46f06000}, - {0x46f08000}, {0x46f0a000}, {0x46f0c000}, {0x46f0e000}, - {0x46f10000}, {0x46f12000}, {0x46f14000}, {0x46f16000}, - {0x46f18000}, {0x46f1a000}, {0x46f1c000}, {0x46f1e000}, - {0x46f20000}, {0x46f22000}, {0x46f24000}, {0x46f26000}, - {0x46f28000}, {0x46f2a000}, {0x46f2c000}, {0x46f2e000}, - {0x46f30000}, {0x46f32000}, {0x46f34000}, {0x46f36000}, - {0x46f38000}, {0x46f3a000}, {0x46f3c000}, {0x46f3e000}, - {0x46f40000}, {0x46f42000}, {0x46f44000}, {0x46f46000}, - {0x46f48000}, {0x46f4a000}, {0x46f4c000}, {0x46f4e000}, - {0x46f50000}, {0x46f52000}, {0x46f54000}, {0x46f56000}, - {0x46f58000}, {0x46f5a000}, {0x46f5c000}, {0x46f5e000}, - {0x46f60000}, {0x46f62000}, {0x46f64000}, {0x46f66000}, - {0x46f68000}, {0x46f6a000}, {0x46f6c000}, {0x46f6e000}, - {0x46f70000}, {0x46f72000}, {0x46f74000}, {0x46f76000}, - {0x46f78000}, {0x46f7a000}, {0x46f7c000}, {0x46f7e000}, - {0x46f80000}, {0x46f82000}, {0x46f84000}, {0x46f86000}, - {0x46f88000}, {0x46f8a000}, {0x46f8c000}, {0x46f8e000}, - {0x46f90000}, {0x46f92000}, {0x46f94000}, {0x46f96000}, - {0x46f98000}, {0x46f9a000}, {0x46f9c000}, {0x46f9e000}, - {0x46fa0000}, {0x46fa2000}, {0x46fa4000}, {0x46fa6000}, - {0x46fa8000}, {0x46faa000}, {0x46fac000}, {0x46fae000}, - {0x46fb0000}, {0x46fb2000}, {0x46fb4000}, {0x46fb6000}, - {0x46fb8000}, {0x46fba000}, {0x46fbc000}, {0x46fbe000}, - {0x46fc0000}, {0x46fc2000}, {0x46fc4000}, {0x46fc6000}, - {0x46fc8000}, {0x46fca000}, {0x46fcc000}, {0x46fce000}, - {0x46fd0000}, {0x46fd2000}, {0x46fd4000}, {0x46fd6000}, - {0x46fd8000}, {0x46fda000}, {0x46fdc000}, {0x46fde000}, - {0x46fe0000}, {0x46fe2000}, {0x46fe4000}, {0x46fe6000}, - {0x46fe8000}, {0x46fea000}, {0x46fec000}, {0x46fee000}, - {0x46ff0000}, {0x46ff2000}, {0x46ff4000}, {0x46ff6000}, - {0x46ff8000}, {0x46ffa000}, {0x46ffc000}, {0x46ffe000}, - {0x47000000}, {0x47002000}, {0x47004000}, {0x47006000}, - {0x47008000}, {0x4700a000}, {0x4700c000}, {0x4700e000}, - {0x47010000}, {0x47012000}, {0x47014000}, {0x47016000}, - {0x47018000}, {0x4701a000}, {0x4701c000}, {0x4701e000}, - {0x47020000}, {0x47022000}, {0x47024000}, {0x47026000}, - {0x47028000}, {0x4702a000}, {0x4702c000}, {0x4702e000}, - {0x47030000}, {0x47032000}, {0x47034000}, {0x47036000}, - {0x47038000}, {0x4703a000}, {0x4703c000}, {0x4703e000}, - {0x47040000}, {0x47042000}, {0x47044000}, {0x47046000}, - {0x47048000}, {0x4704a000}, {0x4704c000}, {0x4704e000}, - {0x47050000}, {0x47052000}, {0x47054000}, {0x47056000}, - {0x47058000}, {0x4705a000}, {0x4705c000}, {0x4705e000}, - {0x47060000}, {0x47062000}, {0x47064000}, {0x47066000}, - {0x47068000}, {0x4706a000}, {0x4706c000}, {0x4706e000}, - {0x47070000}, {0x47072000}, {0x47074000}, {0x47076000}, - {0x47078000}, {0x4707a000}, {0x4707c000}, {0x4707e000}, - {0x47080000}, {0x47082000}, {0x47084000}, {0x47086000}, - {0x47088000}, {0x4708a000}, {0x4708c000}, {0x4708e000}, - {0x47090000}, {0x47092000}, {0x47094000}, {0x47096000}, - {0x47098000}, {0x4709a000}, {0x4709c000}, {0x4709e000}, - {0x470a0000}, {0x470a2000}, {0x470a4000}, {0x470a6000}, - {0x470a8000}, {0x470aa000}, {0x470ac000}, {0x470ae000}, - {0x470b0000}, {0x470b2000}, {0x470b4000}, {0x470b6000}, - {0x470b8000}, {0x470ba000}, {0x470bc000}, {0x470be000}, - {0x470c0000}, {0x470c2000}, {0x470c4000}, {0x470c6000}, - {0x470c8000}, {0x470ca000}, {0x470cc000}, {0x470ce000}, - {0x470d0000}, {0x470d2000}, {0x470d4000}, {0x470d6000}, - {0x470d8000}, {0x470da000}, {0x470dc000}, {0x470de000}, - {0x470e0000}, {0x470e2000}, {0x470e4000}, {0x470e6000}, - {0x470e8000}, {0x470ea000}, {0x470ec000}, {0x470ee000}, - {0x470f0000}, {0x470f2000}, {0x470f4000}, {0x470f6000}, - {0x470f8000}, {0x470fa000}, {0x470fc000}, {0x470fe000}, - {0x47100000}, {0x47102000}, {0x47104000}, {0x47106000}, - {0x47108000}, {0x4710a000}, {0x4710c000}, {0x4710e000}, - {0x47110000}, {0x47112000}, {0x47114000}, {0x47116000}, - {0x47118000}, {0x4711a000}, {0x4711c000}, {0x4711e000}, - {0x47120000}, {0x47122000}, {0x47124000}, {0x47126000}, - {0x47128000}, {0x4712a000}, {0x4712c000}, {0x4712e000}, - {0x47130000}, {0x47132000}, {0x47134000}, {0x47136000}, - {0x47138000}, {0x4713a000}, {0x4713c000}, {0x4713e000}, - {0x47140000}, {0x47142000}, {0x47144000}, {0x47146000}, - {0x47148000}, {0x4714a000}, {0x4714c000}, {0x4714e000}, - {0x47150000}, {0x47152000}, {0x47154000}, {0x47156000}, - {0x47158000}, {0x4715a000}, {0x4715c000}, {0x4715e000}, - {0x47160000}, {0x47162000}, {0x47164000}, {0x47166000}, - {0x47168000}, {0x4716a000}, {0x4716c000}, {0x4716e000}, - {0x47170000}, {0x47172000}, {0x47174000}, {0x47176000}, - {0x47178000}, {0x4717a000}, {0x4717c000}, {0x4717e000}, - {0x47180000}, {0x47182000}, {0x47184000}, {0x47186000}, - {0x47188000}, {0x4718a000}, {0x4718c000}, {0x4718e000}, - {0x47190000}, {0x47192000}, {0x47194000}, {0x47196000}, - {0x47198000}, {0x4719a000}, {0x4719c000}, {0x4719e000}, - {0x471a0000}, {0x471a2000}, {0x471a4000}, {0x471a6000}, - {0x471a8000}, {0x471aa000}, {0x471ac000}, {0x471ae000}, - {0x471b0000}, {0x471b2000}, {0x471b4000}, {0x471b6000}, - {0x471b8000}, {0x471ba000}, {0x471bc000}, {0x471be000}, - {0x471c0000}, {0x471c2000}, {0x471c4000}, {0x471c6000}, - {0x471c8000}, {0x471ca000}, {0x471cc000}, {0x471ce000}, - {0x471d0000}, {0x471d2000}, {0x471d4000}, {0x471d6000}, - {0x471d8000}, {0x471da000}, {0x471dc000}, {0x471de000}, - {0x471e0000}, {0x471e2000}, {0x471e4000}, {0x471e6000}, - {0x471e8000}, {0x471ea000}, {0x471ec000}, {0x471ee000}, - {0x471f0000}, {0x471f2000}, {0x471f4000}, {0x471f6000}, - {0x471f8000}, {0x471fa000}, {0x471fc000}, {0x471fe000}, - {0x47200000}, {0x47202000}, {0x47204000}, {0x47206000}, - {0x47208000}, {0x4720a000}, {0x4720c000}, {0x4720e000}, - {0x47210000}, {0x47212000}, {0x47214000}, {0x47216000}, - {0x47218000}, {0x4721a000}, {0x4721c000}, {0x4721e000}, - {0x47220000}, {0x47222000}, {0x47224000}, {0x47226000}, - {0x47228000}, {0x4722a000}, {0x4722c000}, {0x4722e000}, - {0x47230000}, {0x47232000}, {0x47234000}, {0x47236000}, - {0x47238000}, {0x4723a000}, {0x4723c000}, {0x4723e000}, - {0x47240000}, {0x47242000}, {0x47244000}, {0x47246000}, - {0x47248000}, {0x4724a000}, {0x4724c000}, {0x4724e000}, - {0x47250000}, {0x47252000}, {0x47254000}, {0x47256000}, - {0x47258000}, {0x4725a000}, {0x4725c000}, {0x4725e000}, - {0x47260000}, {0x47262000}, {0x47264000}, {0x47266000}, - {0x47268000}, {0x4726a000}, {0x4726c000}, {0x4726e000}, - {0x47270000}, {0x47272000}, {0x47274000}, {0x47276000}, - {0x47278000}, {0x4727a000}, {0x4727c000}, {0x4727e000}, - {0x47280000}, {0x47282000}, {0x47284000}, {0x47286000}, - {0x47288000}, {0x4728a000}, {0x4728c000}, {0x4728e000}, - {0x47290000}, {0x47292000}, {0x47294000}, {0x47296000}, - {0x47298000}, {0x4729a000}, {0x4729c000}, {0x4729e000}, - {0x472a0000}, {0x472a2000}, {0x472a4000}, {0x472a6000}, - {0x472a8000}, {0x472aa000}, {0x472ac000}, {0x472ae000}, - {0x472b0000}, {0x472b2000}, {0x472b4000}, {0x472b6000}, - {0x472b8000}, {0x472ba000}, {0x472bc000}, {0x472be000}, - {0x472c0000}, {0x472c2000}, {0x472c4000}, {0x472c6000}, - {0x472c8000}, {0x472ca000}, {0x472cc000}, {0x472ce000}, - {0x472d0000}, {0x472d2000}, {0x472d4000}, {0x472d6000}, - {0x472d8000}, {0x472da000}, {0x472dc000}, {0x472de000}, - {0x472e0000}, {0x472e2000}, {0x472e4000}, {0x472e6000}, - {0x472e8000}, {0x472ea000}, {0x472ec000}, {0x472ee000}, - {0x472f0000}, {0x472f2000}, {0x472f4000}, {0x472f6000}, - {0x472f8000}, {0x472fa000}, {0x472fc000}, {0x472fe000}, - {0x47300000}, {0x47302000}, {0x47304000}, {0x47306000}, - {0x47308000}, {0x4730a000}, {0x4730c000}, {0x4730e000}, - {0x47310000}, {0x47312000}, {0x47314000}, {0x47316000}, - {0x47318000}, {0x4731a000}, {0x4731c000}, {0x4731e000}, - {0x47320000}, {0x47322000}, {0x47324000}, {0x47326000}, - {0x47328000}, {0x4732a000}, {0x4732c000}, {0x4732e000}, - {0x47330000}, {0x47332000}, {0x47334000}, {0x47336000}, - {0x47338000}, {0x4733a000}, {0x4733c000}, {0x4733e000}, - {0x47340000}, {0x47342000}, {0x47344000}, {0x47346000}, - {0x47348000}, {0x4734a000}, {0x4734c000}, {0x4734e000}, - {0x47350000}, {0x47352000}, {0x47354000}, {0x47356000}, - {0x47358000}, {0x4735a000}, {0x4735c000}, {0x4735e000}, - {0x47360000}, {0x47362000}, {0x47364000}, {0x47366000}, - {0x47368000}, {0x4736a000}, {0x4736c000}, {0x4736e000}, - {0x47370000}, {0x47372000}, {0x47374000}, {0x47376000}, - {0x47378000}, {0x4737a000}, {0x4737c000}, {0x4737e000}, - {0x47380000}, {0x47382000}, {0x47384000}, {0x47386000}, - {0x47388000}, {0x4738a000}, {0x4738c000}, {0x4738e000}, - {0x47390000}, {0x47392000}, {0x47394000}, {0x47396000}, - {0x47398000}, {0x4739a000}, {0x4739c000}, {0x4739e000}, - {0x473a0000}, {0x473a2000}, {0x473a4000}, {0x473a6000}, - {0x473a8000}, {0x473aa000}, {0x473ac000}, {0x473ae000}, - {0x473b0000}, {0x473b2000}, {0x473b4000}, {0x473b6000}, - {0x473b8000}, {0x473ba000}, {0x473bc000}, {0x473be000}, - {0x473c0000}, {0x473c2000}, {0x473c4000}, {0x473c6000}, - {0x473c8000}, {0x473ca000}, {0x473cc000}, {0x473ce000}, - {0x473d0000}, {0x473d2000}, {0x473d4000}, {0x473d6000}, - {0x473d8000}, {0x473da000}, {0x473dc000}, {0x473de000}, - {0x473e0000}, {0x473e2000}, {0x473e4000}, {0x473e6000}, - {0x473e8000}, {0x473ea000}, {0x473ec000}, {0x473ee000}, - {0x473f0000}, {0x473f2000}, {0x473f4000}, {0x473f6000}, - {0x473f8000}, {0x473fa000}, {0x473fc000}, {0x473fe000}, - {0x47400000}, {0x47402000}, {0x47404000}, {0x47406000}, - {0x47408000}, {0x4740a000}, {0x4740c000}, {0x4740e000}, - {0x47410000}, {0x47412000}, {0x47414000}, {0x47416000}, - {0x47418000}, {0x4741a000}, {0x4741c000}, {0x4741e000}, - {0x47420000}, {0x47422000}, {0x47424000}, {0x47426000}, - {0x47428000}, {0x4742a000}, {0x4742c000}, {0x4742e000}, - {0x47430000}, {0x47432000}, {0x47434000}, {0x47436000}, - {0x47438000}, {0x4743a000}, {0x4743c000}, {0x4743e000}, - {0x47440000}, {0x47442000}, {0x47444000}, {0x47446000}, - {0x47448000}, {0x4744a000}, {0x4744c000}, {0x4744e000}, - {0x47450000}, {0x47452000}, {0x47454000}, {0x47456000}, - {0x47458000}, {0x4745a000}, {0x4745c000}, {0x4745e000}, - {0x47460000}, {0x47462000}, {0x47464000}, {0x47466000}, - {0x47468000}, {0x4746a000}, {0x4746c000}, {0x4746e000}, - {0x47470000}, {0x47472000}, {0x47474000}, {0x47476000}, - {0x47478000}, {0x4747a000}, {0x4747c000}, {0x4747e000}, - {0x47480000}, {0x47482000}, {0x47484000}, {0x47486000}, - {0x47488000}, {0x4748a000}, {0x4748c000}, {0x4748e000}, - {0x47490000}, {0x47492000}, {0x47494000}, {0x47496000}, - {0x47498000}, {0x4749a000}, {0x4749c000}, {0x4749e000}, - {0x474a0000}, {0x474a2000}, {0x474a4000}, {0x474a6000}, - {0x474a8000}, {0x474aa000}, {0x474ac000}, {0x474ae000}, - {0x474b0000}, {0x474b2000}, {0x474b4000}, {0x474b6000}, - {0x474b8000}, {0x474ba000}, {0x474bc000}, {0x474be000}, - {0x474c0000}, {0x474c2000}, {0x474c4000}, {0x474c6000}, - {0x474c8000}, {0x474ca000}, {0x474cc000}, {0x474ce000}, - {0x474d0000}, {0x474d2000}, {0x474d4000}, {0x474d6000}, - {0x474d8000}, {0x474da000}, {0x474dc000}, {0x474de000}, - {0x474e0000}, {0x474e2000}, {0x474e4000}, {0x474e6000}, - {0x474e8000}, {0x474ea000}, {0x474ec000}, {0x474ee000}, - {0x474f0000}, {0x474f2000}, {0x474f4000}, {0x474f6000}, - {0x474f8000}, {0x474fa000}, {0x474fc000}, {0x474fe000}, - {0x47500000}, {0x47502000}, {0x47504000}, {0x47506000}, - {0x47508000}, {0x4750a000}, {0x4750c000}, {0x4750e000}, - {0x47510000}, {0x47512000}, {0x47514000}, {0x47516000}, - {0x47518000}, {0x4751a000}, {0x4751c000}, {0x4751e000}, - {0x47520000}, {0x47522000}, {0x47524000}, {0x47526000}, - {0x47528000}, {0x4752a000}, {0x4752c000}, {0x4752e000}, - {0x47530000}, {0x47532000}, {0x47534000}, {0x47536000}, - {0x47538000}, {0x4753a000}, {0x4753c000}, {0x4753e000}, - {0x47540000}, {0x47542000}, {0x47544000}, {0x47546000}, - {0x47548000}, {0x4754a000}, {0x4754c000}, {0x4754e000}, - {0x47550000}, {0x47552000}, {0x47554000}, {0x47556000}, - {0x47558000}, {0x4755a000}, {0x4755c000}, {0x4755e000}, - {0x47560000}, {0x47562000}, {0x47564000}, {0x47566000}, - {0x47568000}, {0x4756a000}, {0x4756c000}, {0x4756e000}, - {0x47570000}, {0x47572000}, {0x47574000}, {0x47576000}, - {0x47578000}, {0x4757a000}, {0x4757c000}, {0x4757e000}, - {0x47580000}, {0x47582000}, {0x47584000}, {0x47586000}, - {0x47588000}, {0x4758a000}, {0x4758c000}, {0x4758e000}, - {0x47590000}, {0x47592000}, {0x47594000}, {0x47596000}, - {0x47598000}, {0x4759a000}, {0x4759c000}, {0x4759e000}, - {0x475a0000}, {0x475a2000}, {0x475a4000}, {0x475a6000}, - {0x475a8000}, {0x475aa000}, {0x475ac000}, {0x475ae000}, - {0x475b0000}, {0x475b2000}, {0x475b4000}, {0x475b6000}, - {0x475b8000}, {0x475ba000}, {0x475bc000}, {0x475be000}, - {0x475c0000}, {0x475c2000}, {0x475c4000}, {0x475c6000}, - {0x475c8000}, {0x475ca000}, {0x475cc000}, {0x475ce000}, - {0x475d0000}, {0x475d2000}, {0x475d4000}, {0x475d6000}, - {0x475d8000}, {0x475da000}, {0x475dc000}, {0x475de000}, - {0x475e0000}, {0x475e2000}, {0x475e4000}, {0x475e6000}, - {0x475e8000}, {0x475ea000}, {0x475ec000}, {0x475ee000}, - {0x475f0000}, {0x475f2000}, {0x475f4000}, {0x475f6000}, - {0x475f8000}, {0x475fa000}, {0x475fc000}, {0x475fe000}, - {0x47600000}, {0x47602000}, {0x47604000}, {0x47606000}, - {0x47608000}, {0x4760a000}, {0x4760c000}, {0x4760e000}, - {0x47610000}, {0x47612000}, {0x47614000}, {0x47616000}, - {0x47618000}, {0x4761a000}, {0x4761c000}, {0x4761e000}, - {0x47620000}, {0x47622000}, {0x47624000}, {0x47626000}, - {0x47628000}, {0x4762a000}, {0x4762c000}, {0x4762e000}, - {0x47630000}, {0x47632000}, {0x47634000}, {0x47636000}, - {0x47638000}, {0x4763a000}, {0x4763c000}, {0x4763e000}, - {0x47640000}, {0x47642000}, {0x47644000}, {0x47646000}, - {0x47648000}, {0x4764a000}, {0x4764c000}, {0x4764e000}, - {0x47650000}, {0x47652000}, {0x47654000}, {0x47656000}, - {0x47658000}, {0x4765a000}, {0x4765c000}, {0x4765e000}, - {0x47660000}, {0x47662000}, {0x47664000}, {0x47666000}, - {0x47668000}, {0x4766a000}, {0x4766c000}, {0x4766e000}, - {0x47670000}, {0x47672000}, {0x47674000}, {0x47676000}, - {0x47678000}, {0x4767a000}, {0x4767c000}, {0x4767e000}, - {0x47680000}, {0x47682000}, {0x47684000}, {0x47686000}, - {0x47688000}, {0x4768a000}, {0x4768c000}, {0x4768e000}, - {0x47690000}, {0x47692000}, {0x47694000}, {0x47696000}, - {0x47698000}, {0x4769a000}, {0x4769c000}, {0x4769e000}, - {0x476a0000}, {0x476a2000}, {0x476a4000}, {0x476a6000}, - {0x476a8000}, {0x476aa000}, {0x476ac000}, {0x476ae000}, - {0x476b0000}, {0x476b2000}, {0x476b4000}, {0x476b6000}, - {0x476b8000}, {0x476ba000}, {0x476bc000}, {0x476be000}, - {0x476c0000}, {0x476c2000}, {0x476c4000}, {0x476c6000}, - {0x476c8000}, {0x476ca000}, {0x476cc000}, {0x476ce000}, - {0x476d0000}, {0x476d2000}, {0x476d4000}, {0x476d6000}, - {0x476d8000}, {0x476da000}, {0x476dc000}, {0x476de000}, - {0x476e0000}, {0x476e2000}, {0x476e4000}, {0x476e6000}, - {0x476e8000}, {0x476ea000}, {0x476ec000}, {0x476ee000}, - {0x476f0000}, {0x476f2000}, {0x476f4000}, {0x476f6000}, - {0x476f8000}, {0x476fa000}, {0x476fc000}, {0x476fe000}, - {0x47700000}, {0x47702000}, {0x47704000}, {0x47706000}, - {0x47708000}, {0x4770a000}, {0x4770c000}, {0x4770e000}, - {0x47710000}, {0x47712000}, {0x47714000}, {0x47716000}, - {0x47718000}, {0x4771a000}, {0x4771c000}, {0x4771e000}, - {0x47720000}, {0x47722000}, {0x47724000}, {0x47726000}, - {0x47728000}, {0x4772a000}, {0x4772c000}, {0x4772e000}, - {0x47730000}, {0x47732000}, {0x47734000}, {0x47736000}, - {0x47738000}, {0x4773a000}, {0x4773c000}, {0x4773e000}, - {0x47740000}, {0x47742000}, {0x47744000}, {0x47746000}, - {0x47748000}, {0x4774a000}, {0x4774c000}, {0x4774e000}, - {0x47750000}, {0x47752000}, {0x47754000}, {0x47756000}, - {0x47758000}, {0x4775a000}, {0x4775c000}, {0x4775e000}, - {0x47760000}, {0x47762000}, {0x47764000}, {0x47766000}, - {0x47768000}, {0x4776a000}, {0x4776c000}, {0x4776e000}, - {0x47770000}, {0x47772000}, {0x47774000}, {0x47776000}, - {0x47778000}, {0x4777a000}, {0x4777c000}, {0x4777e000}, - {0x47780000}, {0x47782000}, {0x47784000}, {0x47786000}, - {0x47788000}, {0x4778a000}, {0x4778c000}, {0x4778e000}, - {0x47790000}, {0x47792000}, {0x47794000}, {0x47796000}, - {0x47798000}, {0x4779a000}, {0x4779c000}, {0x4779e000}, - {0x477a0000}, {0x477a2000}, {0x477a4000}, {0x477a6000}, - {0x477a8000}, {0x477aa000}, {0x477ac000}, {0x477ae000}, - {0x477b0000}, {0x477b2000}, {0x477b4000}, {0x477b6000}, - {0x477b8000}, {0x477ba000}, {0x477bc000}, {0x477be000}, - {0x477c0000}, {0x477c2000}, {0x477c4000}, {0x477c6000}, - {0x477c8000}, {0x477ca000}, {0x477cc000}, {0x477ce000}, - {0x477d0000}, {0x477d2000}, {0x477d4000}, {0x477d6000}, - {0x477d8000}, {0x477da000}, {0x477dc000}, {0x477de000}, - {0x477e0000}, {0x477e2000}, {0x477e4000}, {0x477e6000}, - {0x477e8000}, {0x477ea000}, {0x477ec000}, {0x477ee000}, - {0x477f0000}, {0x477f2000}, {0x477f4000}, {0x477f6000}, - {0x477f8000}, {0x477fa000}, {0x477fc000}, {0x477fe000}, - {0x7f800000}, {0x7f802000}, {0x7f804000}, {0x7f806000}, - {0x7f808000}, {0x7f80a000}, {0x7f80c000}, {0x7f80e000}, - {0x7f810000}, {0x7f812000}, {0x7f814000}, {0x7f816000}, - {0x7f818000}, {0x7f81a000}, {0x7f81c000}, {0x7f81e000}, - {0x7f820000}, {0x7f822000}, {0x7f824000}, {0x7f826000}, - {0x7f828000}, {0x7f82a000}, {0x7f82c000}, {0x7f82e000}, - {0x7f830000}, {0x7f832000}, {0x7f834000}, {0x7f836000}, - {0x7f838000}, {0x7f83a000}, {0x7f83c000}, {0x7f83e000}, - {0x7f840000}, {0x7f842000}, {0x7f844000}, {0x7f846000}, - {0x7f848000}, {0x7f84a000}, {0x7f84c000}, {0x7f84e000}, - {0x7f850000}, {0x7f852000}, {0x7f854000}, {0x7f856000}, - {0x7f858000}, {0x7f85a000}, {0x7f85c000}, {0x7f85e000}, - {0x7f860000}, {0x7f862000}, {0x7f864000}, {0x7f866000}, - {0x7f868000}, {0x7f86a000}, {0x7f86c000}, {0x7f86e000}, - {0x7f870000}, {0x7f872000}, {0x7f874000}, {0x7f876000}, - {0x7f878000}, {0x7f87a000}, {0x7f87c000}, {0x7f87e000}, - {0x7f880000}, {0x7f882000}, {0x7f884000}, {0x7f886000}, - {0x7f888000}, {0x7f88a000}, {0x7f88c000}, {0x7f88e000}, - {0x7f890000}, {0x7f892000}, {0x7f894000}, {0x7f896000}, - {0x7f898000}, {0x7f89a000}, {0x7f89c000}, {0x7f89e000}, - {0x7f8a0000}, {0x7f8a2000}, {0x7f8a4000}, {0x7f8a6000}, - {0x7f8a8000}, {0x7f8aa000}, {0x7f8ac000}, {0x7f8ae000}, - {0x7f8b0000}, {0x7f8b2000}, {0x7f8b4000}, {0x7f8b6000}, - {0x7f8b8000}, {0x7f8ba000}, {0x7f8bc000}, {0x7f8be000}, - {0x7f8c0000}, {0x7f8c2000}, {0x7f8c4000}, {0x7f8c6000}, - {0x7f8c8000}, {0x7f8ca000}, {0x7f8cc000}, {0x7f8ce000}, - {0x7f8d0000}, {0x7f8d2000}, {0x7f8d4000}, {0x7f8d6000}, - {0x7f8d8000}, {0x7f8da000}, {0x7f8dc000}, {0x7f8de000}, - {0x7f8e0000}, {0x7f8e2000}, {0x7f8e4000}, {0x7f8e6000}, - {0x7f8e8000}, {0x7f8ea000}, {0x7f8ec000}, {0x7f8ee000}, - {0x7f8f0000}, {0x7f8f2000}, {0x7f8f4000}, {0x7f8f6000}, - {0x7f8f8000}, {0x7f8fa000}, {0x7f8fc000}, {0x7f8fe000}, - {0x7f900000}, {0x7f902000}, {0x7f904000}, {0x7f906000}, - {0x7f908000}, {0x7f90a000}, {0x7f90c000}, {0x7f90e000}, - {0x7f910000}, {0x7f912000}, {0x7f914000}, {0x7f916000}, - {0x7f918000}, {0x7f91a000}, {0x7f91c000}, {0x7f91e000}, - {0x7f920000}, {0x7f922000}, {0x7f924000}, {0x7f926000}, - {0x7f928000}, {0x7f92a000}, {0x7f92c000}, {0x7f92e000}, - {0x7f930000}, {0x7f932000}, {0x7f934000}, {0x7f936000}, - {0x7f938000}, {0x7f93a000}, {0x7f93c000}, {0x7f93e000}, - {0x7f940000}, {0x7f942000}, {0x7f944000}, {0x7f946000}, - {0x7f948000}, {0x7f94a000}, {0x7f94c000}, {0x7f94e000}, - {0x7f950000}, {0x7f952000}, {0x7f954000}, {0x7f956000}, - {0x7f958000}, {0x7f95a000}, {0x7f95c000}, {0x7f95e000}, - {0x7f960000}, {0x7f962000}, {0x7f964000}, {0x7f966000}, - {0x7f968000}, {0x7f96a000}, {0x7f96c000}, {0x7f96e000}, - {0x7f970000}, {0x7f972000}, {0x7f974000}, {0x7f976000}, - {0x7f978000}, {0x7f97a000}, {0x7f97c000}, {0x7f97e000}, - {0x7f980000}, {0x7f982000}, {0x7f984000}, {0x7f986000}, - {0x7f988000}, {0x7f98a000}, {0x7f98c000}, {0x7f98e000}, - {0x7f990000}, {0x7f992000}, {0x7f994000}, {0x7f996000}, - {0x7f998000}, {0x7f99a000}, {0x7f99c000}, {0x7f99e000}, - {0x7f9a0000}, {0x7f9a2000}, {0x7f9a4000}, {0x7f9a6000}, - {0x7f9a8000}, {0x7f9aa000}, {0x7f9ac000}, {0x7f9ae000}, - {0x7f9b0000}, {0x7f9b2000}, {0x7f9b4000}, {0x7f9b6000}, - {0x7f9b8000}, {0x7f9ba000}, {0x7f9bc000}, {0x7f9be000}, - {0x7f9c0000}, {0x7f9c2000}, {0x7f9c4000}, {0x7f9c6000}, - {0x7f9c8000}, {0x7f9ca000}, {0x7f9cc000}, {0x7f9ce000}, - {0x7f9d0000}, {0x7f9d2000}, {0x7f9d4000}, {0x7f9d6000}, - {0x7f9d8000}, {0x7f9da000}, {0x7f9dc000}, {0x7f9de000}, - {0x7f9e0000}, {0x7f9e2000}, {0x7f9e4000}, {0x7f9e6000}, - {0x7f9e8000}, {0x7f9ea000}, {0x7f9ec000}, {0x7f9ee000}, - {0x7f9f0000}, {0x7f9f2000}, {0x7f9f4000}, {0x7f9f6000}, - {0x7f9f8000}, {0x7f9fa000}, {0x7f9fc000}, {0x7f9fe000}, - {0x7fa00000}, {0x7fa02000}, {0x7fa04000}, {0x7fa06000}, - {0x7fa08000}, {0x7fa0a000}, {0x7fa0c000}, {0x7fa0e000}, - {0x7fa10000}, {0x7fa12000}, {0x7fa14000}, {0x7fa16000}, - {0x7fa18000}, {0x7fa1a000}, {0x7fa1c000}, {0x7fa1e000}, - {0x7fa20000}, {0x7fa22000}, {0x7fa24000}, {0x7fa26000}, - {0x7fa28000}, {0x7fa2a000}, {0x7fa2c000}, {0x7fa2e000}, - {0x7fa30000}, {0x7fa32000}, {0x7fa34000}, {0x7fa36000}, - {0x7fa38000}, {0x7fa3a000}, {0x7fa3c000}, {0x7fa3e000}, - {0x7fa40000}, {0x7fa42000}, {0x7fa44000}, {0x7fa46000}, - {0x7fa48000}, {0x7fa4a000}, {0x7fa4c000}, {0x7fa4e000}, - {0x7fa50000}, {0x7fa52000}, {0x7fa54000}, {0x7fa56000}, - {0x7fa58000}, {0x7fa5a000}, {0x7fa5c000}, {0x7fa5e000}, - {0x7fa60000}, {0x7fa62000}, {0x7fa64000}, {0x7fa66000}, - {0x7fa68000}, {0x7fa6a000}, {0x7fa6c000}, {0x7fa6e000}, - {0x7fa70000}, {0x7fa72000}, {0x7fa74000}, {0x7fa76000}, - {0x7fa78000}, {0x7fa7a000}, {0x7fa7c000}, {0x7fa7e000}, - {0x7fa80000}, {0x7fa82000}, {0x7fa84000}, {0x7fa86000}, - {0x7fa88000}, {0x7fa8a000}, {0x7fa8c000}, {0x7fa8e000}, - {0x7fa90000}, {0x7fa92000}, {0x7fa94000}, {0x7fa96000}, - {0x7fa98000}, {0x7fa9a000}, {0x7fa9c000}, {0x7fa9e000}, - {0x7faa0000}, {0x7faa2000}, {0x7faa4000}, {0x7faa6000}, - {0x7faa8000}, {0x7faaa000}, {0x7faac000}, {0x7faae000}, - {0x7fab0000}, {0x7fab2000}, {0x7fab4000}, {0x7fab6000}, - {0x7fab8000}, {0x7faba000}, {0x7fabc000}, {0x7fabe000}, - {0x7fac0000}, {0x7fac2000}, {0x7fac4000}, {0x7fac6000}, - {0x7fac8000}, {0x7faca000}, {0x7facc000}, {0x7face000}, - {0x7fad0000}, {0x7fad2000}, {0x7fad4000}, {0x7fad6000}, - {0x7fad8000}, {0x7fada000}, {0x7fadc000}, {0x7fade000}, - {0x7fae0000}, {0x7fae2000}, {0x7fae4000}, {0x7fae6000}, - {0x7fae8000}, {0x7faea000}, {0x7faec000}, {0x7faee000}, - {0x7faf0000}, {0x7faf2000}, {0x7faf4000}, {0x7faf6000}, - {0x7faf8000}, {0x7fafa000}, {0x7fafc000}, {0x7fafe000}, - {0x7fb00000}, {0x7fb02000}, {0x7fb04000}, {0x7fb06000}, - {0x7fb08000}, {0x7fb0a000}, {0x7fb0c000}, {0x7fb0e000}, - {0x7fb10000}, {0x7fb12000}, {0x7fb14000}, {0x7fb16000}, - {0x7fb18000}, {0x7fb1a000}, {0x7fb1c000}, {0x7fb1e000}, - {0x7fb20000}, {0x7fb22000}, {0x7fb24000}, {0x7fb26000}, - {0x7fb28000}, {0x7fb2a000}, {0x7fb2c000}, {0x7fb2e000}, - {0x7fb30000}, {0x7fb32000}, {0x7fb34000}, {0x7fb36000}, - {0x7fb38000}, {0x7fb3a000}, {0x7fb3c000}, {0x7fb3e000}, - {0x7fb40000}, {0x7fb42000}, {0x7fb44000}, {0x7fb46000}, - {0x7fb48000}, {0x7fb4a000}, {0x7fb4c000}, {0x7fb4e000}, - {0x7fb50000}, {0x7fb52000}, {0x7fb54000}, {0x7fb56000}, - {0x7fb58000}, {0x7fb5a000}, {0x7fb5c000}, {0x7fb5e000}, - {0x7fb60000}, {0x7fb62000}, {0x7fb64000}, {0x7fb66000}, - {0x7fb68000}, {0x7fb6a000}, {0x7fb6c000}, {0x7fb6e000}, - {0x7fb70000}, {0x7fb72000}, {0x7fb74000}, {0x7fb76000}, - {0x7fb78000}, {0x7fb7a000}, {0x7fb7c000}, {0x7fb7e000}, - {0x7fb80000}, {0x7fb82000}, {0x7fb84000}, {0x7fb86000}, - {0x7fb88000}, {0x7fb8a000}, {0x7fb8c000}, {0x7fb8e000}, - {0x7fb90000}, {0x7fb92000}, {0x7fb94000}, {0x7fb96000}, - {0x7fb98000}, {0x7fb9a000}, {0x7fb9c000}, {0x7fb9e000}, - {0x7fba0000}, {0x7fba2000}, {0x7fba4000}, {0x7fba6000}, - {0x7fba8000}, {0x7fbaa000}, {0x7fbac000}, {0x7fbae000}, - {0x7fbb0000}, {0x7fbb2000}, {0x7fbb4000}, {0x7fbb6000}, - {0x7fbb8000}, {0x7fbba000}, {0x7fbbc000}, {0x7fbbe000}, - {0x7fbc0000}, {0x7fbc2000}, {0x7fbc4000}, {0x7fbc6000}, - {0x7fbc8000}, {0x7fbca000}, {0x7fbcc000}, {0x7fbce000}, - {0x7fbd0000}, {0x7fbd2000}, {0x7fbd4000}, {0x7fbd6000}, - {0x7fbd8000}, {0x7fbda000}, {0x7fbdc000}, {0x7fbde000}, - {0x7fbe0000}, {0x7fbe2000}, {0x7fbe4000}, {0x7fbe6000}, - {0x7fbe8000}, {0x7fbea000}, {0x7fbec000}, {0x7fbee000}, - {0x7fbf0000}, {0x7fbf2000}, {0x7fbf4000}, {0x7fbf6000}, - {0x7fbf8000}, {0x7fbfa000}, {0x7fbfc000}, {0x7fbfe000}, - {0x7fc00000}, {0x7fc02000}, {0x7fc04000}, {0x7fc06000}, - {0x7fc08000}, {0x7fc0a000}, {0x7fc0c000}, {0x7fc0e000}, - {0x7fc10000}, {0x7fc12000}, {0x7fc14000}, {0x7fc16000}, - {0x7fc18000}, {0x7fc1a000}, {0x7fc1c000}, {0x7fc1e000}, - {0x7fc20000}, {0x7fc22000}, {0x7fc24000}, {0x7fc26000}, - {0x7fc28000}, {0x7fc2a000}, {0x7fc2c000}, {0x7fc2e000}, - {0x7fc30000}, {0x7fc32000}, {0x7fc34000}, {0x7fc36000}, - {0x7fc38000}, {0x7fc3a000}, {0x7fc3c000}, {0x7fc3e000}, - {0x7fc40000}, {0x7fc42000}, {0x7fc44000}, {0x7fc46000}, - {0x7fc48000}, {0x7fc4a000}, {0x7fc4c000}, {0x7fc4e000}, - {0x7fc50000}, {0x7fc52000}, {0x7fc54000}, {0x7fc56000}, - {0x7fc58000}, {0x7fc5a000}, {0x7fc5c000}, {0x7fc5e000}, - {0x7fc60000}, {0x7fc62000}, {0x7fc64000}, {0x7fc66000}, - {0x7fc68000}, {0x7fc6a000}, {0x7fc6c000}, {0x7fc6e000}, - {0x7fc70000}, {0x7fc72000}, {0x7fc74000}, {0x7fc76000}, - {0x7fc78000}, {0x7fc7a000}, {0x7fc7c000}, {0x7fc7e000}, - {0x7fc80000}, {0x7fc82000}, {0x7fc84000}, {0x7fc86000}, - {0x7fc88000}, {0x7fc8a000}, {0x7fc8c000}, {0x7fc8e000}, - {0x7fc90000}, {0x7fc92000}, {0x7fc94000}, {0x7fc96000}, - {0x7fc98000}, {0x7fc9a000}, {0x7fc9c000}, {0x7fc9e000}, - {0x7fca0000}, {0x7fca2000}, {0x7fca4000}, {0x7fca6000}, - {0x7fca8000}, {0x7fcaa000}, {0x7fcac000}, {0x7fcae000}, - {0x7fcb0000}, {0x7fcb2000}, {0x7fcb4000}, {0x7fcb6000}, - {0x7fcb8000}, {0x7fcba000}, {0x7fcbc000}, {0x7fcbe000}, - {0x7fcc0000}, {0x7fcc2000}, {0x7fcc4000}, {0x7fcc6000}, - {0x7fcc8000}, {0x7fcca000}, {0x7fccc000}, {0x7fcce000}, - {0x7fcd0000}, {0x7fcd2000}, {0x7fcd4000}, {0x7fcd6000}, - {0x7fcd8000}, {0x7fcda000}, {0x7fcdc000}, {0x7fcde000}, - {0x7fce0000}, {0x7fce2000}, {0x7fce4000}, {0x7fce6000}, - {0x7fce8000}, {0x7fcea000}, {0x7fcec000}, {0x7fcee000}, - {0x7fcf0000}, {0x7fcf2000}, {0x7fcf4000}, {0x7fcf6000}, - {0x7fcf8000}, {0x7fcfa000}, {0x7fcfc000}, {0x7fcfe000}, - {0x7fd00000}, {0x7fd02000}, {0x7fd04000}, {0x7fd06000}, - {0x7fd08000}, {0x7fd0a000}, {0x7fd0c000}, {0x7fd0e000}, - {0x7fd10000}, {0x7fd12000}, {0x7fd14000}, {0x7fd16000}, - {0x7fd18000}, {0x7fd1a000}, {0x7fd1c000}, {0x7fd1e000}, - {0x7fd20000}, {0x7fd22000}, {0x7fd24000}, {0x7fd26000}, - {0x7fd28000}, {0x7fd2a000}, {0x7fd2c000}, {0x7fd2e000}, - {0x7fd30000}, {0x7fd32000}, {0x7fd34000}, {0x7fd36000}, - {0x7fd38000}, {0x7fd3a000}, {0x7fd3c000}, {0x7fd3e000}, - {0x7fd40000}, {0x7fd42000}, {0x7fd44000}, {0x7fd46000}, - {0x7fd48000}, {0x7fd4a000}, {0x7fd4c000}, {0x7fd4e000}, - {0x7fd50000}, {0x7fd52000}, {0x7fd54000}, {0x7fd56000}, - {0x7fd58000}, {0x7fd5a000}, {0x7fd5c000}, {0x7fd5e000}, - {0x7fd60000}, {0x7fd62000}, {0x7fd64000}, {0x7fd66000}, - {0x7fd68000}, {0x7fd6a000}, {0x7fd6c000}, {0x7fd6e000}, - {0x7fd70000}, {0x7fd72000}, {0x7fd74000}, {0x7fd76000}, - {0x7fd78000}, {0x7fd7a000}, {0x7fd7c000}, {0x7fd7e000}, - {0x7fd80000}, {0x7fd82000}, {0x7fd84000}, {0x7fd86000}, - {0x7fd88000}, {0x7fd8a000}, {0x7fd8c000}, {0x7fd8e000}, - {0x7fd90000}, {0x7fd92000}, {0x7fd94000}, {0x7fd96000}, - {0x7fd98000}, {0x7fd9a000}, {0x7fd9c000}, {0x7fd9e000}, - {0x7fda0000}, {0x7fda2000}, {0x7fda4000}, {0x7fda6000}, - {0x7fda8000}, {0x7fdaa000}, {0x7fdac000}, {0x7fdae000}, - {0x7fdb0000}, {0x7fdb2000}, {0x7fdb4000}, {0x7fdb6000}, - {0x7fdb8000}, {0x7fdba000}, {0x7fdbc000}, {0x7fdbe000}, - {0x7fdc0000}, {0x7fdc2000}, {0x7fdc4000}, {0x7fdc6000}, - {0x7fdc8000}, {0x7fdca000}, {0x7fdcc000}, {0x7fdce000}, - {0x7fdd0000}, {0x7fdd2000}, {0x7fdd4000}, {0x7fdd6000}, - {0x7fdd8000}, {0x7fdda000}, {0x7fddc000}, {0x7fdde000}, - {0x7fde0000}, {0x7fde2000}, {0x7fde4000}, {0x7fde6000}, - {0x7fde8000}, {0x7fdea000}, {0x7fdec000}, {0x7fdee000}, - {0x7fdf0000}, {0x7fdf2000}, {0x7fdf4000}, {0x7fdf6000}, - {0x7fdf8000}, {0x7fdfa000}, {0x7fdfc000}, {0x7fdfe000}, - {0x7fe00000}, {0x7fe02000}, {0x7fe04000}, {0x7fe06000}, - {0x7fe08000}, {0x7fe0a000}, {0x7fe0c000}, {0x7fe0e000}, - {0x7fe10000}, {0x7fe12000}, {0x7fe14000}, {0x7fe16000}, - {0x7fe18000}, {0x7fe1a000}, {0x7fe1c000}, {0x7fe1e000}, - {0x7fe20000}, {0x7fe22000}, {0x7fe24000}, {0x7fe26000}, - {0x7fe28000}, {0x7fe2a000}, {0x7fe2c000}, {0x7fe2e000}, - {0x7fe30000}, {0x7fe32000}, {0x7fe34000}, {0x7fe36000}, - {0x7fe38000}, {0x7fe3a000}, {0x7fe3c000}, {0x7fe3e000}, - {0x7fe40000}, {0x7fe42000}, {0x7fe44000}, {0x7fe46000}, - {0x7fe48000}, {0x7fe4a000}, {0x7fe4c000}, {0x7fe4e000}, - {0x7fe50000}, {0x7fe52000}, {0x7fe54000}, {0x7fe56000}, - {0x7fe58000}, {0x7fe5a000}, {0x7fe5c000}, {0x7fe5e000}, - {0x7fe60000}, {0x7fe62000}, {0x7fe64000}, {0x7fe66000}, - {0x7fe68000}, {0x7fe6a000}, {0x7fe6c000}, {0x7fe6e000}, - {0x7fe70000}, {0x7fe72000}, {0x7fe74000}, {0x7fe76000}, - {0x7fe78000}, {0x7fe7a000}, {0x7fe7c000}, {0x7fe7e000}, - {0x7fe80000}, {0x7fe82000}, {0x7fe84000}, {0x7fe86000}, - {0x7fe88000}, {0x7fe8a000}, {0x7fe8c000}, {0x7fe8e000}, - {0x7fe90000}, {0x7fe92000}, {0x7fe94000}, {0x7fe96000}, - {0x7fe98000}, {0x7fe9a000}, {0x7fe9c000}, {0x7fe9e000}, - {0x7fea0000}, {0x7fea2000}, {0x7fea4000}, {0x7fea6000}, - {0x7fea8000}, {0x7feaa000}, {0x7feac000}, {0x7feae000}, - {0x7feb0000}, {0x7feb2000}, {0x7feb4000}, {0x7feb6000}, - {0x7feb8000}, {0x7feba000}, {0x7febc000}, {0x7febe000}, - {0x7fec0000}, {0x7fec2000}, {0x7fec4000}, {0x7fec6000}, - {0x7fec8000}, {0x7feca000}, {0x7fecc000}, {0x7fece000}, - {0x7fed0000}, {0x7fed2000}, {0x7fed4000}, {0x7fed6000}, - {0x7fed8000}, {0x7feda000}, {0x7fedc000}, {0x7fede000}, - {0x7fee0000}, {0x7fee2000}, {0x7fee4000}, {0x7fee6000}, - {0x7fee8000}, {0x7feea000}, {0x7feec000}, {0x7feee000}, - {0x7fef0000}, {0x7fef2000}, {0x7fef4000}, {0x7fef6000}, - {0x7fef8000}, {0x7fefa000}, {0x7fefc000}, {0x7fefe000}, - {0x7ff00000}, {0x7ff02000}, {0x7ff04000}, {0x7ff06000}, - {0x7ff08000}, {0x7ff0a000}, {0x7ff0c000}, {0x7ff0e000}, - {0x7ff10000}, {0x7ff12000}, {0x7ff14000}, {0x7ff16000}, - {0x7ff18000}, {0x7ff1a000}, {0x7ff1c000}, {0x7ff1e000}, - {0x7ff20000}, {0x7ff22000}, {0x7ff24000}, {0x7ff26000}, - {0x7ff28000}, {0x7ff2a000}, {0x7ff2c000}, {0x7ff2e000}, - {0x7ff30000}, {0x7ff32000}, {0x7ff34000}, {0x7ff36000}, - {0x7ff38000}, {0x7ff3a000}, {0x7ff3c000}, {0x7ff3e000}, - {0x7ff40000}, {0x7ff42000}, {0x7ff44000}, {0x7ff46000}, - {0x7ff48000}, {0x7ff4a000}, {0x7ff4c000}, {0x7ff4e000}, - {0x7ff50000}, {0x7ff52000}, {0x7ff54000}, {0x7ff56000}, - {0x7ff58000}, {0x7ff5a000}, {0x7ff5c000}, {0x7ff5e000}, - {0x7ff60000}, {0x7ff62000}, {0x7ff64000}, {0x7ff66000}, - {0x7ff68000}, {0x7ff6a000}, {0x7ff6c000}, {0x7ff6e000}, - {0x7ff70000}, {0x7ff72000}, {0x7ff74000}, {0x7ff76000}, - {0x7ff78000}, {0x7ff7a000}, {0x7ff7c000}, {0x7ff7e000}, - {0x7ff80000}, {0x7ff82000}, {0x7ff84000}, {0x7ff86000}, - {0x7ff88000}, {0x7ff8a000}, {0x7ff8c000}, {0x7ff8e000}, - {0x7ff90000}, {0x7ff92000}, {0x7ff94000}, {0x7ff96000}, - {0x7ff98000}, {0x7ff9a000}, {0x7ff9c000}, {0x7ff9e000}, - {0x7ffa0000}, {0x7ffa2000}, {0x7ffa4000}, {0x7ffa6000}, - {0x7ffa8000}, {0x7ffaa000}, {0x7ffac000}, {0x7ffae000}, - {0x7ffb0000}, {0x7ffb2000}, {0x7ffb4000}, {0x7ffb6000}, - {0x7ffb8000}, {0x7ffba000}, {0x7ffbc000}, {0x7ffbe000}, - {0x7ffc0000}, {0x7ffc2000}, {0x7ffc4000}, {0x7ffc6000}, - {0x7ffc8000}, {0x7ffca000}, {0x7ffcc000}, {0x7ffce000}, - {0x7ffd0000}, {0x7ffd2000}, {0x7ffd4000}, {0x7ffd6000}, - {0x7ffd8000}, {0x7ffda000}, {0x7ffdc000}, {0x7ffde000}, - {0x7ffe0000}, {0x7ffe2000}, {0x7ffe4000}, {0x7ffe6000}, - {0x7ffe8000}, {0x7ffea000}, {0x7ffec000}, {0x7ffee000}, - {0x7fff0000}, {0x7fff2000}, {0x7fff4000}, {0x7fff6000}, - {0x7fff8000}, {0x7fffa000}, {0x7fffc000}, {0x7fffe000}, - {0x80000000}, {0xb3800000}, {0xb4000000}, {0xb4400000}, - {0xb4800000}, {0xb4a00000}, {0xb4c00000}, {0xb4e00000}, - {0xb5000000}, {0xb5100000}, {0xb5200000}, {0xb5300000}, - {0xb5400000}, {0xb5500000}, {0xb5600000}, {0xb5700000}, - {0xb5800000}, {0xb5880000}, {0xb5900000}, {0xb5980000}, - {0xb5a00000}, {0xb5a80000}, {0xb5b00000}, {0xb5b80000}, - {0xb5c00000}, {0xb5c80000}, {0xb5d00000}, {0xb5d80000}, - {0xb5e00000}, {0xb5e80000}, {0xb5f00000}, {0xb5f80000}, - {0xb6000000}, {0xb6040000}, {0xb6080000}, {0xb60c0000}, - {0xb6100000}, {0xb6140000}, {0xb6180000}, {0xb61c0000}, - {0xb6200000}, {0xb6240000}, {0xb6280000}, {0xb62c0000}, - {0xb6300000}, {0xb6340000}, {0xb6380000}, {0xb63c0000}, - {0xb6400000}, {0xb6440000}, {0xb6480000}, {0xb64c0000}, - {0xb6500000}, {0xb6540000}, {0xb6580000}, {0xb65c0000}, - {0xb6600000}, {0xb6640000}, {0xb6680000}, {0xb66c0000}, - {0xb6700000}, {0xb6740000}, {0xb6780000}, {0xb67c0000}, - {0xb6800000}, {0xb6820000}, {0xb6840000}, {0xb6860000}, - {0xb6880000}, {0xb68a0000}, {0xb68c0000}, {0xb68e0000}, - {0xb6900000}, {0xb6920000}, {0xb6940000}, {0xb6960000}, - {0xb6980000}, {0xb69a0000}, {0xb69c0000}, {0xb69e0000}, - {0xb6a00000}, {0xb6a20000}, {0xb6a40000}, {0xb6a60000}, - {0xb6a80000}, {0xb6aa0000}, {0xb6ac0000}, {0xb6ae0000}, - {0xb6b00000}, {0xb6b20000}, {0xb6b40000}, {0xb6b60000}, - {0xb6b80000}, {0xb6ba0000}, {0xb6bc0000}, {0xb6be0000}, - {0xb6c00000}, {0xb6c20000}, {0xb6c40000}, {0xb6c60000}, - {0xb6c80000}, {0xb6ca0000}, {0xb6cc0000}, {0xb6ce0000}, - {0xb6d00000}, {0xb6d20000}, {0xb6d40000}, {0xb6d60000}, - {0xb6d80000}, {0xb6da0000}, {0xb6dc0000}, {0xb6de0000}, - {0xb6e00000}, {0xb6e20000}, {0xb6e40000}, {0xb6e60000}, - {0xb6e80000}, {0xb6ea0000}, {0xb6ec0000}, {0xb6ee0000}, - {0xb6f00000}, {0xb6f20000}, {0xb6f40000}, {0xb6f60000}, - {0xb6f80000}, {0xb6fa0000}, {0xb6fc0000}, {0xb6fe0000}, - {0xb7000000}, {0xb7010000}, {0xb7020000}, {0xb7030000}, - {0xb7040000}, {0xb7050000}, {0xb7060000}, {0xb7070000}, - {0xb7080000}, {0xb7090000}, {0xb70a0000}, {0xb70b0000}, - {0xb70c0000}, {0xb70d0000}, {0xb70e0000}, {0xb70f0000}, - {0xb7100000}, {0xb7110000}, {0xb7120000}, {0xb7130000}, - {0xb7140000}, {0xb7150000}, {0xb7160000}, {0xb7170000}, - {0xb7180000}, {0xb7190000}, {0xb71a0000}, {0xb71b0000}, - {0xb71c0000}, {0xb71d0000}, {0xb71e0000}, {0xb71f0000}, - {0xb7200000}, {0xb7210000}, {0xb7220000}, {0xb7230000}, - {0xb7240000}, {0xb7250000}, {0xb7260000}, {0xb7270000}, - {0xb7280000}, {0xb7290000}, {0xb72a0000}, {0xb72b0000}, - {0xb72c0000}, {0xb72d0000}, {0xb72e0000}, {0xb72f0000}, - {0xb7300000}, {0xb7310000}, {0xb7320000}, {0xb7330000}, - {0xb7340000}, {0xb7350000}, {0xb7360000}, {0xb7370000}, - {0xb7380000}, {0xb7390000}, {0xb73a0000}, {0xb73b0000}, - {0xb73c0000}, {0xb73d0000}, {0xb73e0000}, {0xb73f0000}, - {0xb7400000}, {0xb7410000}, {0xb7420000}, {0xb7430000}, - {0xb7440000}, {0xb7450000}, {0xb7460000}, {0xb7470000}, - {0xb7480000}, {0xb7490000}, {0xb74a0000}, {0xb74b0000}, - {0xb74c0000}, {0xb74d0000}, {0xb74e0000}, {0xb74f0000}, - {0xb7500000}, {0xb7510000}, {0xb7520000}, {0xb7530000}, - {0xb7540000}, {0xb7550000}, {0xb7560000}, {0xb7570000}, - {0xb7580000}, {0xb7590000}, {0xb75a0000}, {0xb75b0000}, - {0xb75c0000}, {0xb75d0000}, {0xb75e0000}, {0xb75f0000}, - {0xb7600000}, {0xb7610000}, {0xb7620000}, {0xb7630000}, - {0xb7640000}, {0xb7650000}, {0xb7660000}, {0xb7670000}, - {0xb7680000}, {0xb7690000}, {0xb76a0000}, {0xb76b0000}, - {0xb76c0000}, {0xb76d0000}, {0xb76e0000}, {0xb76f0000}, - {0xb7700000}, {0xb7710000}, {0xb7720000}, {0xb7730000}, - {0xb7740000}, {0xb7750000}, {0xb7760000}, {0xb7770000}, - {0xb7780000}, {0xb7790000}, {0xb77a0000}, {0xb77b0000}, - {0xb77c0000}, {0xb77d0000}, {0xb77e0000}, {0xb77f0000}, - {0xb7800000}, {0xb7808000}, {0xb7810000}, {0xb7818000}, - {0xb7820000}, {0xb7828000}, {0xb7830000}, {0xb7838000}, - {0xb7840000}, {0xb7848000}, {0xb7850000}, {0xb7858000}, - {0xb7860000}, {0xb7868000}, {0xb7870000}, {0xb7878000}, - {0xb7880000}, {0xb7888000}, {0xb7890000}, {0xb7898000}, - {0xb78a0000}, {0xb78a8000}, {0xb78b0000}, {0xb78b8000}, - {0xb78c0000}, {0xb78c8000}, {0xb78d0000}, {0xb78d8000}, - {0xb78e0000}, {0xb78e8000}, {0xb78f0000}, {0xb78f8000}, - {0xb7900000}, {0xb7908000}, {0xb7910000}, {0xb7918000}, - {0xb7920000}, {0xb7928000}, {0xb7930000}, {0xb7938000}, - {0xb7940000}, {0xb7948000}, {0xb7950000}, {0xb7958000}, - {0xb7960000}, {0xb7968000}, {0xb7970000}, {0xb7978000}, - {0xb7980000}, {0xb7988000}, {0xb7990000}, {0xb7998000}, - {0xb79a0000}, {0xb79a8000}, {0xb79b0000}, {0xb79b8000}, - {0xb79c0000}, {0xb79c8000}, {0xb79d0000}, {0xb79d8000}, - {0xb79e0000}, {0xb79e8000}, {0xb79f0000}, {0xb79f8000}, - {0xb7a00000}, {0xb7a08000}, {0xb7a10000}, {0xb7a18000}, - {0xb7a20000}, {0xb7a28000}, {0xb7a30000}, {0xb7a38000}, - {0xb7a40000}, {0xb7a48000}, {0xb7a50000}, {0xb7a58000}, - {0xb7a60000}, {0xb7a68000}, {0xb7a70000}, {0xb7a78000}, - {0xb7a80000}, {0xb7a88000}, {0xb7a90000}, {0xb7a98000}, - {0xb7aa0000}, {0xb7aa8000}, {0xb7ab0000}, {0xb7ab8000}, - {0xb7ac0000}, {0xb7ac8000}, {0xb7ad0000}, {0xb7ad8000}, - {0xb7ae0000}, {0xb7ae8000}, {0xb7af0000}, {0xb7af8000}, - {0xb7b00000}, {0xb7b08000}, {0xb7b10000}, {0xb7b18000}, - {0xb7b20000}, {0xb7b28000}, {0xb7b30000}, {0xb7b38000}, - {0xb7b40000}, {0xb7b48000}, {0xb7b50000}, {0xb7b58000}, - {0xb7b60000}, {0xb7b68000}, {0xb7b70000}, {0xb7b78000}, - {0xb7b80000}, {0xb7b88000}, {0xb7b90000}, {0xb7b98000}, - {0xb7ba0000}, {0xb7ba8000}, {0xb7bb0000}, {0xb7bb8000}, - {0xb7bc0000}, {0xb7bc8000}, {0xb7bd0000}, {0xb7bd8000}, - {0xb7be0000}, {0xb7be8000}, {0xb7bf0000}, {0xb7bf8000}, - {0xb7c00000}, {0xb7c08000}, {0xb7c10000}, {0xb7c18000}, - {0xb7c20000}, {0xb7c28000}, {0xb7c30000}, {0xb7c38000}, - {0xb7c40000}, {0xb7c48000}, {0xb7c50000}, {0xb7c58000}, - {0xb7c60000}, {0xb7c68000}, {0xb7c70000}, {0xb7c78000}, - {0xb7c80000}, {0xb7c88000}, {0xb7c90000}, {0xb7c98000}, - {0xb7ca0000}, {0xb7ca8000}, {0xb7cb0000}, {0xb7cb8000}, - {0xb7cc0000}, {0xb7cc8000}, {0xb7cd0000}, {0xb7cd8000}, - {0xb7ce0000}, {0xb7ce8000}, {0xb7cf0000}, {0xb7cf8000}, - {0xb7d00000}, {0xb7d08000}, {0xb7d10000}, {0xb7d18000}, - {0xb7d20000}, {0xb7d28000}, {0xb7d30000}, {0xb7d38000}, - {0xb7d40000}, {0xb7d48000}, {0xb7d50000}, {0xb7d58000}, - {0xb7d60000}, {0xb7d68000}, {0xb7d70000}, {0xb7d78000}, - {0xb7d80000}, {0xb7d88000}, {0xb7d90000}, {0xb7d98000}, - {0xb7da0000}, {0xb7da8000}, {0xb7db0000}, {0xb7db8000}, - {0xb7dc0000}, {0xb7dc8000}, {0xb7dd0000}, {0xb7dd8000}, - {0xb7de0000}, {0xb7de8000}, {0xb7df0000}, {0xb7df8000}, - {0xb7e00000}, {0xb7e08000}, {0xb7e10000}, {0xb7e18000}, - {0xb7e20000}, {0xb7e28000}, {0xb7e30000}, {0xb7e38000}, - {0xb7e40000}, {0xb7e48000}, {0xb7e50000}, {0xb7e58000}, - {0xb7e60000}, {0xb7e68000}, {0xb7e70000}, {0xb7e78000}, - {0xb7e80000}, {0xb7e88000}, {0xb7e90000}, {0xb7e98000}, - {0xb7ea0000}, {0xb7ea8000}, {0xb7eb0000}, {0xb7eb8000}, - {0xb7ec0000}, {0xb7ec8000}, {0xb7ed0000}, {0xb7ed8000}, - {0xb7ee0000}, {0xb7ee8000}, {0xb7ef0000}, {0xb7ef8000}, - {0xb7f00000}, {0xb7f08000}, {0xb7f10000}, {0xb7f18000}, - {0xb7f20000}, {0xb7f28000}, {0xb7f30000}, {0xb7f38000}, - {0xb7f40000}, {0xb7f48000}, {0xb7f50000}, {0xb7f58000}, - {0xb7f60000}, {0xb7f68000}, {0xb7f70000}, {0xb7f78000}, - {0xb7f80000}, {0xb7f88000}, {0xb7f90000}, {0xb7f98000}, - {0xb7fa0000}, {0xb7fa8000}, {0xb7fb0000}, {0xb7fb8000}, - {0xb7fc0000}, {0xb7fc8000}, {0xb7fd0000}, {0xb7fd8000}, - {0xb7fe0000}, {0xb7fe8000}, {0xb7ff0000}, {0xb7ff8000}, - {0xb8000000}, {0xb8004000}, {0xb8008000}, {0xb800c000}, - {0xb8010000}, {0xb8014000}, {0xb8018000}, {0xb801c000}, - {0xb8020000}, {0xb8024000}, {0xb8028000}, {0xb802c000}, - {0xb8030000}, {0xb8034000}, {0xb8038000}, {0xb803c000}, - {0xb8040000}, {0xb8044000}, {0xb8048000}, {0xb804c000}, - {0xb8050000}, {0xb8054000}, {0xb8058000}, {0xb805c000}, - {0xb8060000}, {0xb8064000}, {0xb8068000}, {0xb806c000}, - {0xb8070000}, {0xb8074000}, {0xb8078000}, {0xb807c000}, - {0xb8080000}, {0xb8084000}, {0xb8088000}, {0xb808c000}, - {0xb8090000}, {0xb8094000}, {0xb8098000}, {0xb809c000}, - {0xb80a0000}, {0xb80a4000}, {0xb80a8000}, {0xb80ac000}, - {0xb80b0000}, {0xb80b4000}, {0xb80b8000}, {0xb80bc000}, - {0xb80c0000}, {0xb80c4000}, {0xb80c8000}, {0xb80cc000}, - {0xb80d0000}, {0xb80d4000}, {0xb80d8000}, {0xb80dc000}, - {0xb80e0000}, {0xb80e4000}, {0xb80e8000}, {0xb80ec000}, - {0xb80f0000}, {0xb80f4000}, {0xb80f8000}, {0xb80fc000}, - {0xb8100000}, {0xb8104000}, {0xb8108000}, {0xb810c000}, - {0xb8110000}, {0xb8114000}, {0xb8118000}, {0xb811c000}, - {0xb8120000}, {0xb8124000}, {0xb8128000}, {0xb812c000}, - {0xb8130000}, {0xb8134000}, {0xb8138000}, {0xb813c000}, - {0xb8140000}, {0xb8144000}, {0xb8148000}, {0xb814c000}, - {0xb8150000}, {0xb8154000}, {0xb8158000}, {0xb815c000}, - {0xb8160000}, {0xb8164000}, {0xb8168000}, {0xb816c000}, - {0xb8170000}, {0xb8174000}, {0xb8178000}, {0xb817c000}, - {0xb8180000}, {0xb8184000}, {0xb8188000}, {0xb818c000}, - {0xb8190000}, {0xb8194000}, {0xb8198000}, {0xb819c000}, - {0xb81a0000}, {0xb81a4000}, {0xb81a8000}, {0xb81ac000}, - {0xb81b0000}, {0xb81b4000}, {0xb81b8000}, {0xb81bc000}, - {0xb81c0000}, {0xb81c4000}, {0xb81c8000}, {0xb81cc000}, - {0xb81d0000}, {0xb81d4000}, {0xb81d8000}, {0xb81dc000}, - {0xb81e0000}, {0xb81e4000}, {0xb81e8000}, {0xb81ec000}, - {0xb81f0000}, {0xb81f4000}, {0xb81f8000}, {0xb81fc000}, - {0xb8200000}, {0xb8204000}, {0xb8208000}, {0xb820c000}, - {0xb8210000}, {0xb8214000}, {0xb8218000}, {0xb821c000}, - {0xb8220000}, {0xb8224000}, {0xb8228000}, {0xb822c000}, - {0xb8230000}, {0xb8234000}, {0xb8238000}, {0xb823c000}, - {0xb8240000}, {0xb8244000}, {0xb8248000}, {0xb824c000}, - {0xb8250000}, {0xb8254000}, {0xb8258000}, {0xb825c000}, - {0xb8260000}, {0xb8264000}, {0xb8268000}, {0xb826c000}, - {0xb8270000}, {0xb8274000}, {0xb8278000}, {0xb827c000}, - {0xb8280000}, {0xb8284000}, {0xb8288000}, {0xb828c000}, - {0xb8290000}, {0xb8294000}, {0xb8298000}, {0xb829c000}, - {0xb82a0000}, {0xb82a4000}, {0xb82a8000}, {0xb82ac000}, - {0xb82b0000}, {0xb82b4000}, {0xb82b8000}, {0xb82bc000}, - {0xb82c0000}, {0xb82c4000}, {0xb82c8000}, {0xb82cc000}, - {0xb82d0000}, {0xb82d4000}, {0xb82d8000}, {0xb82dc000}, - {0xb82e0000}, {0xb82e4000}, {0xb82e8000}, {0xb82ec000}, - {0xb82f0000}, {0xb82f4000}, {0xb82f8000}, {0xb82fc000}, - {0xb8300000}, {0xb8304000}, {0xb8308000}, {0xb830c000}, - {0xb8310000}, {0xb8314000}, {0xb8318000}, {0xb831c000}, - {0xb8320000}, {0xb8324000}, {0xb8328000}, {0xb832c000}, - {0xb8330000}, {0xb8334000}, {0xb8338000}, {0xb833c000}, - {0xb8340000}, {0xb8344000}, {0xb8348000}, {0xb834c000}, - {0xb8350000}, {0xb8354000}, {0xb8358000}, {0xb835c000}, - {0xb8360000}, {0xb8364000}, {0xb8368000}, {0xb836c000}, - {0xb8370000}, {0xb8374000}, {0xb8378000}, {0xb837c000}, - {0xb8380000}, {0xb8384000}, {0xb8388000}, {0xb838c000}, - {0xb8390000}, {0xb8394000}, {0xb8398000}, {0xb839c000}, - {0xb83a0000}, {0xb83a4000}, {0xb83a8000}, {0xb83ac000}, - {0xb83b0000}, {0xb83b4000}, {0xb83b8000}, {0xb83bc000}, - {0xb83c0000}, {0xb83c4000}, {0xb83c8000}, {0xb83cc000}, - {0xb83d0000}, {0xb83d4000}, {0xb83d8000}, {0xb83dc000}, - {0xb83e0000}, {0xb83e4000}, {0xb83e8000}, {0xb83ec000}, - {0xb83f0000}, {0xb83f4000}, {0xb83f8000}, {0xb83fc000}, - {0xb8400000}, {0xb8404000}, {0xb8408000}, {0xb840c000}, - {0xb8410000}, {0xb8414000}, {0xb8418000}, {0xb841c000}, - {0xb8420000}, {0xb8424000}, {0xb8428000}, {0xb842c000}, - {0xb8430000}, {0xb8434000}, {0xb8438000}, {0xb843c000}, - {0xb8440000}, {0xb8444000}, {0xb8448000}, {0xb844c000}, - {0xb8450000}, {0xb8454000}, {0xb8458000}, {0xb845c000}, - {0xb8460000}, {0xb8464000}, {0xb8468000}, {0xb846c000}, - {0xb8470000}, {0xb8474000}, {0xb8478000}, {0xb847c000}, - {0xb8480000}, {0xb8484000}, {0xb8488000}, {0xb848c000}, - {0xb8490000}, {0xb8494000}, {0xb8498000}, {0xb849c000}, - {0xb84a0000}, {0xb84a4000}, {0xb84a8000}, {0xb84ac000}, - {0xb84b0000}, {0xb84b4000}, {0xb84b8000}, {0xb84bc000}, - {0xb84c0000}, {0xb84c4000}, {0xb84c8000}, {0xb84cc000}, - {0xb84d0000}, {0xb84d4000}, {0xb84d8000}, {0xb84dc000}, - {0xb84e0000}, {0xb84e4000}, {0xb84e8000}, {0xb84ec000}, - {0xb84f0000}, {0xb84f4000}, {0xb84f8000}, {0xb84fc000}, - {0xb8500000}, {0xb8504000}, {0xb8508000}, {0xb850c000}, - {0xb8510000}, {0xb8514000}, {0xb8518000}, {0xb851c000}, - {0xb8520000}, {0xb8524000}, {0xb8528000}, {0xb852c000}, - {0xb8530000}, {0xb8534000}, {0xb8538000}, {0xb853c000}, - {0xb8540000}, {0xb8544000}, {0xb8548000}, {0xb854c000}, - {0xb8550000}, {0xb8554000}, {0xb8558000}, {0xb855c000}, - {0xb8560000}, {0xb8564000}, {0xb8568000}, {0xb856c000}, - {0xb8570000}, {0xb8574000}, {0xb8578000}, {0xb857c000}, - {0xb8580000}, {0xb8584000}, {0xb8588000}, {0xb858c000}, - {0xb8590000}, {0xb8594000}, {0xb8598000}, {0xb859c000}, - {0xb85a0000}, {0xb85a4000}, {0xb85a8000}, {0xb85ac000}, - {0xb85b0000}, {0xb85b4000}, {0xb85b8000}, {0xb85bc000}, - {0xb85c0000}, {0xb85c4000}, {0xb85c8000}, {0xb85cc000}, - {0xb85d0000}, {0xb85d4000}, {0xb85d8000}, {0xb85dc000}, - {0xb85e0000}, {0xb85e4000}, {0xb85e8000}, {0xb85ec000}, - {0xb85f0000}, {0xb85f4000}, {0xb85f8000}, {0xb85fc000}, - {0xb8600000}, {0xb8604000}, {0xb8608000}, {0xb860c000}, - {0xb8610000}, {0xb8614000}, {0xb8618000}, {0xb861c000}, - {0xb8620000}, {0xb8624000}, {0xb8628000}, {0xb862c000}, - {0xb8630000}, {0xb8634000}, {0xb8638000}, {0xb863c000}, - {0xb8640000}, {0xb8644000}, {0xb8648000}, {0xb864c000}, - {0xb8650000}, {0xb8654000}, {0xb8658000}, {0xb865c000}, - {0xb8660000}, {0xb8664000}, {0xb8668000}, {0xb866c000}, - {0xb8670000}, {0xb8674000}, {0xb8678000}, {0xb867c000}, - {0xb8680000}, {0xb8684000}, {0xb8688000}, {0xb868c000}, - {0xb8690000}, {0xb8694000}, {0xb8698000}, {0xb869c000}, - {0xb86a0000}, {0xb86a4000}, {0xb86a8000}, {0xb86ac000}, - {0xb86b0000}, {0xb86b4000}, {0xb86b8000}, {0xb86bc000}, - {0xb86c0000}, {0xb86c4000}, {0xb86c8000}, {0xb86cc000}, - {0xb86d0000}, {0xb86d4000}, {0xb86d8000}, {0xb86dc000}, - {0xb86e0000}, {0xb86e4000}, {0xb86e8000}, {0xb86ec000}, - {0xb86f0000}, {0xb86f4000}, {0xb86f8000}, {0xb86fc000}, - {0xb8700000}, {0xb8704000}, {0xb8708000}, {0xb870c000}, - {0xb8710000}, {0xb8714000}, {0xb8718000}, {0xb871c000}, - {0xb8720000}, {0xb8724000}, {0xb8728000}, {0xb872c000}, - {0xb8730000}, {0xb8734000}, {0xb8738000}, {0xb873c000}, - {0xb8740000}, {0xb8744000}, {0xb8748000}, {0xb874c000}, - {0xb8750000}, {0xb8754000}, {0xb8758000}, {0xb875c000}, - {0xb8760000}, {0xb8764000}, {0xb8768000}, {0xb876c000}, - {0xb8770000}, {0xb8774000}, {0xb8778000}, {0xb877c000}, - {0xb8780000}, {0xb8784000}, {0xb8788000}, {0xb878c000}, - {0xb8790000}, {0xb8794000}, {0xb8798000}, {0xb879c000}, - {0xb87a0000}, {0xb87a4000}, {0xb87a8000}, {0xb87ac000}, - {0xb87b0000}, {0xb87b4000}, {0xb87b8000}, {0xb87bc000}, - {0xb87c0000}, {0xb87c4000}, {0xb87c8000}, {0xb87cc000}, - {0xb87d0000}, {0xb87d4000}, {0xb87d8000}, {0xb87dc000}, - {0xb87e0000}, {0xb87e4000}, {0xb87e8000}, {0xb87ec000}, - {0xb87f0000}, {0xb87f4000}, {0xb87f8000}, {0xb87fc000}, - {0xb8800000}, {0xb8802000}, {0xb8804000}, {0xb8806000}, - {0xb8808000}, {0xb880a000}, {0xb880c000}, {0xb880e000}, - {0xb8810000}, {0xb8812000}, {0xb8814000}, {0xb8816000}, - {0xb8818000}, {0xb881a000}, {0xb881c000}, {0xb881e000}, - {0xb8820000}, {0xb8822000}, {0xb8824000}, {0xb8826000}, - {0xb8828000}, {0xb882a000}, {0xb882c000}, {0xb882e000}, - {0xb8830000}, {0xb8832000}, {0xb8834000}, {0xb8836000}, - {0xb8838000}, {0xb883a000}, {0xb883c000}, {0xb883e000}, - {0xb8840000}, {0xb8842000}, {0xb8844000}, {0xb8846000}, - {0xb8848000}, {0xb884a000}, {0xb884c000}, {0xb884e000}, - {0xb8850000}, {0xb8852000}, {0xb8854000}, {0xb8856000}, - {0xb8858000}, {0xb885a000}, {0xb885c000}, {0xb885e000}, - {0xb8860000}, {0xb8862000}, {0xb8864000}, {0xb8866000}, - {0xb8868000}, {0xb886a000}, {0xb886c000}, {0xb886e000}, - {0xb8870000}, {0xb8872000}, {0xb8874000}, {0xb8876000}, - {0xb8878000}, {0xb887a000}, {0xb887c000}, {0xb887e000}, - {0xb8880000}, {0xb8882000}, {0xb8884000}, {0xb8886000}, - {0xb8888000}, {0xb888a000}, {0xb888c000}, {0xb888e000}, - {0xb8890000}, {0xb8892000}, {0xb8894000}, {0xb8896000}, - {0xb8898000}, {0xb889a000}, {0xb889c000}, {0xb889e000}, - {0xb88a0000}, {0xb88a2000}, {0xb88a4000}, {0xb88a6000}, - {0xb88a8000}, {0xb88aa000}, {0xb88ac000}, {0xb88ae000}, - {0xb88b0000}, {0xb88b2000}, {0xb88b4000}, {0xb88b6000}, - {0xb88b8000}, {0xb88ba000}, {0xb88bc000}, {0xb88be000}, - {0xb88c0000}, {0xb88c2000}, {0xb88c4000}, {0xb88c6000}, - {0xb88c8000}, {0xb88ca000}, {0xb88cc000}, {0xb88ce000}, - {0xb88d0000}, {0xb88d2000}, {0xb88d4000}, {0xb88d6000}, - {0xb88d8000}, {0xb88da000}, {0xb88dc000}, {0xb88de000}, - {0xb88e0000}, {0xb88e2000}, {0xb88e4000}, {0xb88e6000}, - {0xb88e8000}, {0xb88ea000}, {0xb88ec000}, {0xb88ee000}, - {0xb88f0000}, {0xb88f2000}, {0xb88f4000}, {0xb88f6000}, - {0xb88f8000}, {0xb88fa000}, {0xb88fc000}, {0xb88fe000}, - {0xb8900000}, {0xb8902000}, {0xb8904000}, {0xb8906000}, - {0xb8908000}, {0xb890a000}, {0xb890c000}, {0xb890e000}, - {0xb8910000}, {0xb8912000}, {0xb8914000}, {0xb8916000}, - {0xb8918000}, {0xb891a000}, {0xb891c000}, {0xb891e000}, - {0xb8920000}, {0xb8922000}, {0xb8924000}, {0xb8926000}, - {0xb8928000}, {0xb892a000}, {0xb892c000}, {0xb892e000}, - {0xb8930000}, {0xb8932000}, {0xb8934000}, {0xb8936000}, - {0xb8938000}, {0xb893a000}, {0xb893c000}, {0xb893e000}, - {0xb8940000}, {0xb8942000}, {0xb8944000}, {0xb8946000}, - {0xb8948000}, {0xb894a000}, {0xb894c000}, {0xb894e000}, - {0xb8950000}, {0xb8952000}, {0xb8954000}, {0xb8956000}, - {0xb8958000}, {0xb895a000}, {0xb895c000}, {0xb895e000}, - {0xb8960000}, {0xb8962000}, {0xb8964000}, {0xb8966000}, - {0xb8968000}, {0xb896a000}, {0xb896c000}, {0xb896e000}, - {0xb8970000}, {0xb8972000}, {0xb8974000}, {0xb8976000}, - {0xb8978000}, {0xb897a000}, {0xb897c000}, {0xb897e000}, - {0xb8980000}, {0xb8982000}, {0xb8984000}, {0xb8986000}, - {0xb8988000}, {0xb898a000}, {0xb898c000}, {0xb898e000}, - {0xb8990000}, {0xb8992000}, {0xb8994000}, {0xb8996000}, - {0xb8998000}, {0xb899a000}, {0xb899c000}, {0xb899e000}, - {0xb89a0000}, {0xb89a2000}, {0xb89a4000}, {0xb89a6000}, - {0xb89a8000}, {0xb89aa000}, {0xb89ac000}, {0xb89ae000}, - {0xb89b0000}, {0xb89b2000}, {0xb89b4000}, {0xb89b6000}, - {0xb89b8000}, {0xb89ba000}, {0xb89bc000}, {0xb89be000}, - {0xb89c0000}, {0xb89c2000}, {0xb89c4000}, {0xb89c6000}, - {0xb89c8000}, {0xb89ca000}, {0xb89cc000}, {0xb89ce000}, - {0xb89d0000}, {0xb89d2000}, {0xb89d4000}, {0xb89d6000}, - {0xb89d8000}, {0xb89da000}, {0xb89dc000}, {0xb89de000}, - {0xb89e0000}, {0xb89e2000}, {0xb89e4000}, {0xb89e6000}, - {0xb89e8000}, {0xb89ea000}, {0xb89ec000}, {0xb89ee000}, - {0xb89f0000}, {0xb89f2000}, {0xb89f4000}, {0xb89f6000}, - {0xb89f8000}, {0xb89fa000}, {0xb89fc000}, {0xb89fe000}, - {0xb8a00000}, {0xb8a02000}, {0xb8a04000}, {0xb8a06000}, - {0xb8a08000}, {0xb8a0a000}, {0xb8a0c000}, {0xb8a0e000}, - {0xb8a10000}, {0xb8a12000}, {0xb8a14000}, {0xb8a16000}, - {0xb8a18000}, {0xb8a1a000}, {0xb8a1c000}, {0xb8a1e000}, - {0xb8a20000}, {0xb8a22000}, {0xb8a24000}, {0xb8a26000}, - {0xb8a28000}, {0xb8a2a000}, {0xb8a2c000}, {0xb8a2e000}, - {0xb8a30000}, {0xb8a32000}, {0xb8a34000}, {0xb8a36000}, - {0xb8a38000}, {0xb8a3a000}, {0xb8a3c000}, {0xb8a3e000}, - {0xb8a40000}, {0xb8a42000}, {0xb8a44000}, {0xb8a46000}, - {0xb8a48000}, {0xb8a4a000}, {0xb8a4c000}, {0xb8a4e000}, - {0xb8a50000}, {0xb8a52000}, {0xb8a54000}, {0xb8a56000}, - {0xb8a58000}, {0xb8a5a000}, {0xb8a5c000}, {0xb8a5e000}, - {0xb8a60000}, {0xb8a62000}, {0xb8a64000}, {0xb8a66000}, - {0xb8a68000}, {0xb8a6a000}, {0xb8a6c000}, {0xb8a6e000}, - {0xb8a70000}, {0xb8a72000}, {0xb8a74000}, {0xb8a76000}, - {0xb8a78000}, {0xb8a7a000}, {0xb8a7c000}, {0xb8a7e000}, - {0xb8a80000}, {0xb8a82000}, {0xb8a84000}, {0xb8a86000}, - {0xb8a88000}, {0xb8a8a000}, {0xb8a8c000}, {0xb8a8e000}, - {0xb8a90000}, {0xb8a92000}, {0xb8a94000}, {0xb8a96000}, - {0xb8a98000}, {0xb8a9a000}, {0xb8a9c000}, {0xb8a9e000}, - {0xb8aa0000}, {0xb8aa2000}, {0xb8aa4000}, {0xb8aa6000}, - {0xb8aa8000}, {0xb8aaa000}, {0xb8aac000}, {0xb8aae000}, - {0xb8ab0000}, {0xb8ab2000}, {0xb8ab4000}, {0xb8ab6000}, - {0xb8ab8000}, {0xb8aba000}, {0xb8abc000}, {0xb8abe000}, - {0xb8ac0000}, {0xb8ac2000}, {0xb8ac4000}, {0xb8ac6000}, - {0xb8ac8000}, {0xb8aca000}, {0xb8acc000}, {0xb8ace000}, - {0xb8ad0000}, {0xb8ad2000}, {0xb8ad4000}, {0xb8ad6000}, - {0xb8ad8000}, {0xb8ada000}, {0xb8adc000}, {0xb8ade000}, - {0xb8ae0000}, {0xb8ae2000}, {0xb8ae4000}, {0xb8ae6000}, - {0xb8ae8000}, {0xb8aea000}, {0xb8aec000}, {0xb8aee000}, - {0xb8af0000}, {0xb8af2000}, {0xb8af4000}, {0xb8af6000}, - {0xb8af8000}, {0xb8afa000}, {0xb8afc000}, {0xb8afe000}, - {0xb8b00000}, {0xb8b02000}, {0xb8b04000}, {0xb8b06000}, - {0xb8b08000}, {0xb8b0a000}, {0xb8b0c000}, {0xb8b0e000}, - {0xb8b10000}, {0xb8b12000}, {0xb8b14000}, {0xb8b16000}, - {0xb8b18000}, {0xb8b1a000}, {0xb8b1c000}, {0xb8b1e000}, - {0xb8b20000}, {0xb8b22000}, {0xb8b24000}, {0xb8b26000}, - {0xb8b28000}, {0xb8b2a000}, {0xb8b2c000}, {0xb8b2e000}, - {0xb8b30000}, {0xb8b32000}, {0xb8b34000}, {0xb8b36000}, - {0xb8b38000}, {0xb8b3a000}, {0xb8b3c000}, {0xb8b3e000}, - {0xb8b40000}, {0xb8b42000}, {0xb8b44000}, {0xb8b46000}, - {0xb8b48000}, {0xb8b4a000}, {0xb8b4c000}, {0xb8b4e000}, - {0xb8b50000}, {0xb8b52000}, {0xb8b54000}, {0xb8b56000}, - {0xb8b58000}, {0xb8b5a000}, {0xb8b5c000}, {0xb8b5e000}, - {0xb8b60000}, {0xb8b62000}, {0xb8b64000}, {0xb8b66000}, - {0xb8b68000}, {0xb8b6a000}, {0xb8b6c000}, {0xb8b6e000}, - {0xb8b70000}, {0xb8b72000}, {0xb8b74000}, {0xb8b76000}, - {0xb8b78000}, {0xb8b7a000}, {0xb8b7c000}, {0xb8b7e000}, - {0xb8b80000}, {0xb8b82000}, {0xb8b84000}, {0xb8b86000}, - {0xb8b88000}, {0xb8b8a000}, {0xb8b8c000}, {0xb8b8e000}, - {0xb8b90000}, {0xb8b92000}, {0xb8b94000}, {0xb8b96000}, - {0xb8b98000}, {0xb8b9a000}, {0xb8b9c000}, {0xb8b9e000}, - {0xb8ba0000}, {0xb8ba2000}, {0xb8ba4000}, {0xb8ba6000}, - {0xb8ba8000}, {0xb8baa000}, {0xb8bac000}, {0xb8bae000}, - {0xb8bb0000}, {0xb8bb2000}, {0xb8bb4000}, {0xb8bb6000}, - {0xb8bb8000}, {0xb8bba000}, {0xb8bbc000}, {0xb8bbe000}, - {0xb8bc0000}, {0xb8bc2000}, {0xb8bc4000}, {0xb8bc6000}, - {0xb8bc8000}, {0xb8bca000}, {0xb8bcc000}, {0xb8bce000}, - {0xb8bd0000}, {0xb8bd2000}, {0xb8bd4000}, {0xb8bd6000}, - {0xb8bd8000}, {0xb8bda000}, {0xb8bdc000}, {0xb8bde000}, - {0xb8be0000}, {0xb8be2000}, {0xb8be4000}, {0xb8be6000}, - {0xb8be8000}, {0xb8bea000}, {0xb8bec000}, {0xb8bee000}, - {0xb8bf0000}, {0xb8bf2000}, {0xb8bf4000}, {0xb8bf6000}, - {0xb8bf8000}, {0xb8bfa000}, {0xb8bfc000}, {0xb8bfe000}, - {0xb8c00000}, {0xb8c02000}, {0xb8c04000}, {0xb8c06000}, - {0xb8c08000}, {0xb8c0a000}, {0xb8c0c000}, {0xb8c0e000}, - {0xb8c10000}, {0xb8c12000}, {0xb8c14000}, {0xb8c16000}, - {0xb8c18000}, {0xb8c1a000}, {0xb8c1c000}, {0xb8c1e000}, - {0xb8c20000}, {0xb8c22000}, {0xb8c24000}, {0xb8c26000}, - {0xb8c28000}, {0xb8c2a000}, {0xb8c2c000}, {0xb8c2e000}, - {0xb8c30000}, {0xb8c32000}, {0xb8c34000}, {0xb8c36000}, - {0xb8c38000}, {0xb8c3a000}, {0xb8c3c000}, {0xb8c3e000}, - {0xb8c40000}, {0xb8c42000}, {0xb8c44000}, {0xb8c46000}, - {0xb8c48000}, {0xb8c4a000}, {0xb8c4c000}, {0xb8c4e000}, - {0xb8c50000}, {0xb8c52000}, {0xb8c54000}, {0xb8c56000}, - {0xb8c58000}, {0xb8c5a000}, {0xb8c5c000}, {0xb8c5e000}, - {0xb8c60000}, {0xb8c62000}, {0xb8c64000}, {0xb8c66000}, - {0xb8c68000}, {0xb8c6a000}, {0xb8c6c000}, {0xb8c6e000}, - {0xb8c70000}, {0xb8c72000}, {0xb8c74000}, {0xb8c76000}, - {0xb8c78000}, {0xb8c7a000}, {0xb8c7c000}, {0xb8c7e000}, - {0xb8c80000}, {0xb8c82000}, {0xb8c84000}, {0xb8c86000}, - {0xb8c88000}, {0xb8c8a000}, {0xb8c8c000}, {0xb8c8e000}, - {0xb8c90000}, {0xb8c92000}, {0xb8c94000}, {0xb8c96000}, - {0xb8c98000}, {0xb8c9a000}, {0xb8c9c000}, {0xb8c9e000}, - {0xb8ca0000}, {0xb8ca2000}, {0xb8ca4000}, {0xb8ca6000}, - {0xb8ca8000}, {0xb8caa000}, {0xb8cac000}, {0xb8cae000}, - {0xb8cb0000}, {0xb8cb2000}, {0xb8cb4000}, {0xb8cb6000}, - {0xb8cb8000}, {0xb8cba000}, {0xb8cbc000}, {0xb8cbe000}, - {0xb8cc0000}, {0xb8cc2000}, {0xb8cc4000}, {0xb8cc6000}, - {0xb8cc8000}, {0xb8cca000}, {0xb8ccc000}, {0xb8cce000}, - {0xb8cd0000}, {0xb8cd2000}, {0xb8cd4000}, {0xb8cd6000}, - {0xb8cd8000}, {0xb8cda000}, {0xb8cdc000}, {0xb8cde000}, - {0xb8ce0000}, {0xb8ce2000}, {0xb8ce4000}, {0xb8ce6000}, - {0xb8ce8000}, {0xb8cea000}, {0xb8cec000}, {0xb8cee000}, - {0xb8cf0000}, {0xb8cf2000}, {0xb8cf4000}, {0xb8cf6000}, - {0xb8cf8000}, {0xb8cfa000}, {0xb8cfc000}, {0xb8cfe000}, - {0xb8d00000}, {0xb8d02000}, {0xb8d04000}, {0xb8d06000}, - {0xb8d08000}, {0xb8d0a000}, {0xb8d0c000}, {0xb8d0e000}, - {0xb8d10000}, {0xb8d12000}, {0xb8d14000}, {0xb8d16000}, - {0xb8d18000}, {0xb8d1a000}, {0xb8d1c000}, {0xb8d1e000}, - {0xb8d20000}, {0xb8d22000}, {0xb8d24000}, {0xb8d26000}, - {0xb8d28000}, {0xb8d2a000}, {0xb8d2c000}, {0xb8d2e000}, - {0xb8d30000}, {0xb8d32000}, {0xb8d34000}, {0xb8d36000}, - {0xb8d38000}, {0xb8d3a000}, {0xb8d3c000}, {0xb8d3e000}, - {0xb8d40000}, {0xb8d42000}, {0xb8d44000}, {0xb8d46000}, - {0xb8d48000}, {0xb8d4a000}, {0xb8d4c000}, {0xb8d4e000}, - {0xb8d50000}, {0xb8d52000}, {0xb8d54000}, {0xb8d56000}, - {0xb8d58000}, {0xb8d5a000}, {0xb8d5c000}, {0xb8d5e000}, - {0xb8d60000}, {0xb8d62000}, {0xb8d64000}, {0xb8d66000}, - {0xb8d68000}, {0xb8d6a000}, {0xb8d6c000}, {0xb8d6e000}, - {0xb8d70000}, {0xb8d72000}, {0xb8d74000}, {0xb8d76000}, - {0xb8d78000}, {0xb8d7a000}, {0xb8d7c000}, {0xb8d7e000}, - {0xb8d80000}, {0xb8d82000}, {0xb8d84000}, {0xb8d86000}, - {0xb8d88000}, {0xb8d8a000}, {0xb8d8c000}, {0xb8d8e000}, - {0xb8d90000}, {0xb8d92000}, {0xb8d94000}, {0xb8d96000}, - {0xb8d98000}, {0xb8d9a000}, {0xb8d9c000}, {0xb8d9e000}, - {0xb8da0000}, {0xb8da2000}, {0xb8da4000}, {0xb8da6000}, - {0xb8da8000}, {0xb8daa000}, {0xb8dac000}, {0xb8dae000}, - {0xb8db0000}, {0xb8db2000}, {0xb8db4000}, {0xb8db6000}, - {0xb8db8000}, {0xb8dba000}, {0xb8dbc000}, {0xb8dbe000}, - {0xb8dc0000}, {0xb8dc2000}, {0xb8dc4000}, {0xb8dc6000}, - {0xb8dc8000}, {0xb8dca000}, {0xb8dcc000}, {0xb8dce000}, - {0xb8dd0000}, {0xb8dd2000}, {0xb8dd4000}, {0xb8dd6000}, - {0xb8dd8000}, {0xb8dda000}, {0xb8ddc000}, {0xb8dde000}, - {0xb8de0000}, {0xb8de2000}, {0xb8de4000}, {0xb8de6000}, - {0xb8de8000}, {0xb8dea000}, {0xb8dec000}, {0xb8dee000}, - {0xb8df0000}, {0xb8df2000}, {0xb8df4000}, {0xb8df6000}, - {0xb8df8000}, {0xb8dfa000}, {0xb8dfc000}, {0xb8dfe000}, - {0xb8e00000}, {0xb8e02000}, {0xb8e04000}, {0xb8e06000}, - {0xb8e08000}, {0xb8e0a000}, {0xb8e0c000}, {0xb8e0e000}, - {0xb8e10000}, {0xb8e12000}, {0xb8e14000}, {0xb8e16000}, - {0xb8e18000}, {0xb8e1a000}, {0xb8e1c000}, {0xb8e1e000}, - {0xb8e20000}, {0xb8e22000}, {0xb8e24000}, {0xb8e26000}, - {0xb8e28000}, {0xb8e2a000}, {0xb8e2c000}, {0xb8e2e000}, - {0xb8e30000}, {0xb8e32000}, {0xb8e34000}, {0xb8e36000}, - {0xb8e38000}, {0xb8e3a000}, {0xb8e3c000}, {0xb8e3e000}, - {0xb8e40000}, {0xb8e42000}, {0xb8e44000}, {0xb8e46000}, - {0xb8e48000}, {0xb8e4a000}, {0xb8e4c000}, {0xb8e4e000}, - {0xb8e50000}, {0xb8e52000}, {0xb8e54000}, {0xb8e56000}, - {0xb8e58000}, {0xb8e5a000}, {0xb8e5c000}, {0xb8e5e000}, - {0xb8e60000}, {0xb8e62000}, {0xb8e64000}, {0xb8e66000}, - {0xb8e68000}, {0xb8e6a000}, {0xb8e6c000}, {0xb8e6e000}, - {0xb8e70000}, {0xb8e72000}, {0xb8e74000}, {0xb8e76000}, - {0xb8e78000}, {0xb8e7a000}, {0xb8e7c000}, {0xb8e7e000}, - {0xb8e80000}, {0xb8e82000}, {0xb8e84000}, {0xb8e86000}, - {0xb8e88000}, {0xb8e8a000}, {0xb8e8c000}, {0xb8e8e000}, - {0xb8e90000}, {0xb8e92000}, {0xb8e94000}, {0xb8e96000}, - {0xb8e98000}, {0xb8e9a000}, {0xb8e9c000}, {0xb8e9e000}, - {0xb8ea0000}, {0xb8ea2000}, {0xb8ea4000}, {0xb8ea6000}, - {0xb8ea8000}, {0xb8eaa000}, {0xb8eac000}, {0xb8eae000}, - {0xb8eb0000}, {0xb8eb2000}, {0xb8eb4000}, {0xb8eb6000}, - {0xb8eb8000}, {0xb8eba000}, {0xb8ebc000}, {0xb8ebe000}, - {0xb8ec0000}, {0xb8ec2000}, {0xb8ec4000}, {0xb8ec6000}, - {0xb8ec8000}, {0xb8eca000}, {0xb8ecc000}, {0xb8ece000}, - {0xb8ed0000}, {0xb8ed2000}, {0xb8ed4000}, {0xb8ed6000}, - {0xb8ed8000}, {0xb8eda000}, {0xb8edc000}, {0xb8ede000}, - {0xb8ee0000}, {0xb8ee2000}, {0xb8ee4000}, {0xb8ee6000}, - {0xb8ee8000}, {0xb8eea000}, {0xb8eec000}, {0xb8eee000}, - {0xb8ef0000}, {0xb8ef2000}, {0xb8ef4000}, {0xb8ef6000}, - {0xb8ef8000}, {0xb8efa000}, {0xb8efc000}, {0xb8efe000}, - {0xb8f00000}, {0xb8f02000}, {0xb8f04000}, {0xb8f06000}, - {0xb8f08000}, {0xb8f0a000}, {0xb8f0c000}, {0xb8f0e000}, - {0xb8f10000}, {0xb8f12000}, {0xb8f14000}, {0xb8f16000}, - {0xb8f18000}, {0xb8f1a000}, {0xb8f1c000}, {0xb8f1e000}, - {0xb8f20000}, {0xb8f22000}, {0xb8f24000}, {0xb8f26000}, - {0xb8f28000}, {0xb8f2a000}, {0xb8f2c000}, {0xb8f2e000}, - {0xb8f30000}, {0xb8f32000}, {0xb8f34000}, {0xb8f36000}, - {0xb8f38000}, {0xb8f3a000}, {0xb8f3c000}, {0xb8f3e000}, - {0xb8f40000}, {0xb8f42000}, {0xb8f44000}, {0xb8f46000}, - {0xb8f48000}, {0xb8f4a000}, {0xb8f4c000}, {0xb8f4e000}, - {0xb8f50000}, {0xb8f52000}, {0xb8f54000}, {0xb8f56000}, - {0xb8f58000}, {0xb8f5a000}, {0xb8f5c000}, {0xb8f5e000}, - {0xb8f60000}, {0xb8f62000}, {0xb8f64000}, {0xb8f66000}, - {0xb8f68000}, {0xb8f6a000}, {0xb8f6c000}, {0xb8f6e000}, - {0xb8f70000}, {0xb8f72000}, {0xb8f74000}, {0xb8f76000}, - {0xb8f78000}, {0xb8f7a000}, {0xb8f7c000}, {0xb8f7e000}, - {0xb8f80000}, {0xb8f82000}, {0xb8f84000}, {0xb8f86000}, - {0xb8f88000}, {0xb8f8a000}, {0xb8f8c000}, {0xb8f8e000}, - {0xb8f90000}, {0xb8f92000}, {0xb8f94000}, {0xb8f96000}, - {0xb8f98000}, {0xb8f9a000}, {0xb8f9c000}, {0xb8f9e000}, - {0xb8fa0000}, {0xb8fa2000}, {0xb8fa4000}, {0xb8fa6000}, - {0xb8fa8000}, {0xb8faa000}, {0xb8fac000}, {0xb8fae000}, - {0xb8fb0000}, {0xb8fb2000}, {0xb8fb4000}, {0xb8fb6000}, - {0xb8fb8000}, {0xb8fba000}, {0xb8fbc000}, {0xb8fbe000}, - {0xb8fc0000}, {0xb8fc2000}, {0xb8fc4000}, {0xb8fc6000}, - {0xb8fc8000}, {0xb8fca000}, {0xb8fcc000}, {0xb8fce000}, - {0xb8fd0000}, {0xb8fd2000}, {0xb8fd4000}, {0xb8fd6000}, - {0xb8fd8000}, {0xb8fda000}, {0xb8fdc000}, {0xb8fde000}, - {0xb8fe0000}, {0xb8fe2000}, {0xb8fe4000}, {0xb8fe6000}, - {0xb8fe8000}, {0xb8fea000}, {0xb8fec000}, {0xb8fee000}, - {0xb8ff0000}, {0xb8ff2000}, {0xb8ff4000}, {0xb8ff6000}, - {0xb8ff8000}, {0xb8ffa000}, {0xb8ffc000}, {0xb8ffe000}, - {0xb9000000}, {0xb9002000}, {0xb9004000}, {0xb9006000}, - {0xb9008000}, {0xb900a000}, {0xb900c000}, {0xb900e000}, - {0xb9010000}, {0xb9012000}, {0xb9014000}, {0xb9016000}, - {0xb9018000}, {0xb901a000}, {0xb901c000}, {0xb901e000}, - {0xb9020000}, {0xb9022000}, {0xb9024000}, {0xb9026000}, - {0xb9028000}, {0xb902a000}, {0xb902c000}, {0xb902e000}, - {0xb9030000}, {0xb9032000}, {0xb9034000}, {0xb9036000}, - {0xb9038000}, {0xb903a000}, {0xb903c000}, {0xb903e000}, - {0xb9040000}, {0xb9042000}, {0xb9044000}, {0xb9046000}, - {0xb9048000}, {0xb904a000}, {0xb904c000}, {0xb904e000}, - {0xb9050000}, {0xb9052000}, {0xb9054000}, {0xb9056000}, - {0xb9058000}, {0xb905a000}, {0xb905c000}, {0xb905e000}, - {0xb9060000}, {0xb9062000}, {0xb9064000}, {0xb9066000}, - {0xb9068000}, {0xb906a000}, {0xb906c000}, {0xb906e000}, - {0xb9070000}, {0xb9072000}, {0xb9074000}, {0xb9076000}, - {0xb9078000}, {0xb907a000}, {0xb907c000}, {0xb907e000}, - {0xb9080000}, {0xb9082000}, {0xb9084000}, {0xb9086000}, - {0xb9088000}, {0xb908a000}, {0xb908c000}, {0xb908e000}, - {0xb9090000}, {0xb9092000}, {0xb9094000}, {0xb9096000}, - {0xb9098000}, {0xb909a000}, {0xb909c000}, {0xb909e000}, - {0xb90a0000}, {0xb90a2000}, {0xb90a4000}, {0xb90a6000}, - {0xb90a8000}, {0xb90aa000}, {0xb90ac000}, {0xb90ae000}, - {0xb90b0000}, {0xb90b2000}, {0xb90b4000}, {0xb90b6000}, - {0xb90b8000}, {0xb90ba000}, {0xb90bc000}, {0xb90be000}, - {0xb90c0000}, {0xb90c2000}, {0xb90c4000}, {0xb90c6000}, - {0xb90c8000}, {0xb90ca000}, {0xb90cc000}, {0xb90ce000}, - {0xb90d0000}, {0xb90d2000}, {0xb90d4000}, {0xb90d6000}, - {0xb90d8000}, {0xb90da000}, {0xb90dc000}, {0xb90de000}, - {0xb90e0000}, {0xb90e2000}, {0xb90e4000}, {0xb90e6000}, - {0xb90e8000}, {0xb90ea000}, {0xb90ec000}, {0xb90ee000}, - {0xb90f0000}, {0xb90f2000}, {0xb90f4000}, {0xb90f6000}, - {0xb90f8000}, {0xb90fa000}, {0xb90fc000}, {0xb90fe000}, - {0xb9100000}, {0xb9102000}, {0xb9104000}, {0xb9106000}, - {0xb9108000}, {0xb910a000}, {0xb910c000}, {0xb910e000}, - {0xb9110000}, {0xb9112000}, {0xb9114000}, {0xb9116000}, - {0xb9118000}, {0xb911a000}, {0xb911c000}, {0xb911e000}, - {0xb9120000}, {0xb9122000}, {0xb9124000}, {0xb9126000}, - {0xb9128000}, {0xb912a000}, {0xb912c000}, {0xb912e000}, - {0xb9130000}, {0xb9132000}, {0xb9134000}, {0xb9136000}, - {0xb9138000}, {0xb913a000}, {0xb913c000}, {0xb913e000}, - {0xb9140000}, {0xb9142000}, {0xb9144000}, {0xb9146000}, - {0xb9148000}, {0xb914a000}, {0xb914c000}, {0xb914e000}, - {0xb9150000}, {0xb9152000}, {0xb9154000}, {0xb9156000}, - {0xb9158000}, {0xb915a000}, {0xb915c000}, {0xb915e000}, - {0xb9160000}, {0xb9162000}, {0xb9164000}, {0xb9166000}, - {0xb9168000}, {0xb916a000}, {0xb916c000}, {0xb916e000}, - {0xb9170000}, {0xb9172000}, {0xb9174000}, {0xb9176000}, - {0xb9178000}, {0xb917a000}, {0xb917c000}, {0xb917e000}, - {0xb9180000}, {0xb9182000}, {0xb9184000}, {0xb9186000}, - {0xb9188000}, {0xb918a000}, {0xb918c000}, {0xb918e000}, - {0xb9190000}, {0xb9192000}, {0xb9194000}, {0xb9196000}, - {0xb9198000}, {0xb919a000}, {0xb919c000}, {0xb919e000}, - {0xb91a0000}, {0xb91a2000}, {0xb91a4000}, {0xb91a6000}, - {0xb91a8000}, {0xb91aa000}, {0xb91ac000}, {0xb91ae000}, - {0xb91b0000}, {0xb91b2000}, {0xb91b4000}, {0xb91b6000}, - {0xb91b8000}, {0xb91ba000}, {0xb91bc000}, {0xb91be000}, - {0xb91c0000}, {0xb91c2000}, {0xb91c4000}, {0xb91c6000}, - {0xb91c8000}, {0xb91ca000}, {0xb91cc000}, {0xb91ce000}, - {0xb91d0000}, {0xb91d2000}, {0xb91d4000}, {0xb91d6000}, - {0xb91d8000}, {0xb91da000}, {0xb91dc000}, {0xb91de000}, - {0xb91e0000}, {0xb91e2000}, {0xb91e4000}, {0xb91e6000}, - {0xb91e8000}, {0xb91ea000}, {0xb91ec000}, {0xb91ee000}, - {0xb91f0000}, {0xb91f2000}, {0xb91f4000}, {0xb91f6000}, - {0xb91f8000}, {0xb91fa000}, {0xb91fc000}, {0xb91fe000}, - {0xb9200000}, {0xb9202000}, {0xb9204000}, {0xb9206000}, - {0xb9208000}, {0xb920a000}, {0xb920c000}, {0xb920e000}, - {0xb9210000}, {0xb9212000}, {0xb9214000}, {0xb9216000}, - {0xb9218000}, {0xb921a000}, {0xb921c000}, {0xb921e000}, - {0xb9220000}, {0xb9222000}, {0xb9224000}, {0xb9226000}, - {0xb9228000}, {0xb922a000}, {0xb922c000}, {0xb922e000}, - {0xb9230000}, {0xb9232000}, {0xb9234000}, {0xb9236000}, - {0xb9238000}, {0xb923a000}, {0xb923c000}, {0xb923e000}, - {0xb9240000}, {0xb9242000}, {0xb9244000}, {0xb9246000}, - {0xb9248000}, {0xb924a000}, {0xb924c000}, {0xb924e000}, - {0xb9250000}, {0xb9252000}, {0xb9254000}, {0xb9256000}, - {0xb9258000}, {0xb925a000}, {0xb925c000}, {0xb925e000}, - {0xb9260000}, {0xb9262000}, {0xb9264000}, {0xb9266000}, - {0xb9268000}, {0xb926a000}, {0xb926c000}, {0xb926e000}, - {0xb9270000}, {0xb9272000}, {0xb9274000}, {0xb9276000}, - {0xb9278000}, {0xb927a000}, {0xb927c000}, {0xb927e000}, - {0xb9280000}, {0xb9282000}, {0xb9284000}, {0xb9286000}, - {0xb9288000}, {0xb928a000}, {0xb928c000}, {0xb928e000}, - {0xb9290000}, {0xb9292000}, {0xb9294000}, {0xb9296000}, - {0xb9298000}, {0xb929a000}, {0xb929c000}, {0xb929e000}, - {0xb92a0000}, {0xb92a2000}, {0xb92a4000}, {0xb92a6000}, - {0xb92a8000}, {0xb92aa000}, {0xb92ac000}, {0xb92ae000}, - {0xb92b0000}, {0xb92b2000}, {0xb92b4000}, {0xb92b6000}, - {0xb92b8000}, {0xb92ba000}, {0xb92bc000}, {0xb92be000}, - {0xb92c0000}, {0xb92c2000}, {0xb92c4000}, {0xb92c6000}, - {0xb92c8000}, {0xb92ca000}, {0xb92cc000}, {0xb92ce000}, - {0xb92d0000}, {0xb92d2000}, {0xb92d4000}, {0xb92d6000}, - {0xb92d8000}, {0xb92da000}, {0xb92dc000}, {0xb92de000}, - {0xb92e0000}, {0xb92e2000}, {0xb92e4000}, {0xb92e6000}, - {0xb92e8000}, {0xb92ea000}, {0xb92ec000}, {0xb92ee000}, - {0xb92f0000}, {0xb92f2000}, {0xb92f4000}, {0xb92f6000}, - {0xb92f8000}, {0xb92fa000}, {0xb92fc000}, {0xb92fe000}, - {0xb9300000}, {0xb9302000}, {0xb9304000}, {0xb9306000}, - {0xb9308000}, {0xb930a000}, {0xb930c000}, {0xb930e000}, - {0xb9310000}, {0xb9312000}, {0xb9314000}, {0xb9316000}, - {0xb9318000}, {0xb931a000}, {0xb931c000}, {0xb931e000}, - {0xb9320000}, {0xb9322000}, {0xb9324000}, {0xb9326000}, - {0xb9328000}, {0xb932a000}, {0xb932c000}, {0xb932e000}, - {0xb9330000}, {0xb9332000}, {0xb9334000}, {0xb9336000}, - {0xb9338000}, {0xb933a000}, {0xb933c000}, {0xb933e000}, - {0xb9340000}, {0xb9342000}, {0xb9344000}, {0xb9346000}, - {0xb9348000}, {0xb934a000}, {0xb934c000}, {0xb934e000}, - {0xb9350000}, {0xb9352000}, {0xb9354000}, {0xb9356000}, - {0xb9358000}, {0xb935a000}, {0xb935c000}, {0xb935e000}, - {0xb9360000}, {0xb9362000}, {0xb9364000}, {0xb9366000}, - {0xb9368000}, {0xb936a000}, {0xb936c000}, {0xb936e000}, - {0xb9370000}, {0xb9372000}, {0xb9374000}, {0xb9376000}, - {0xb9378000}, {0xb937a000}, {0xb937c000}, {0xb937e000}, - {0xb9380000}, {0xb9382000}, {0xb9384000}, {0xb9386000}, - {0xb9388000}, {0xb938a000}, {0xb938c000}, {0xb938e000}, - {0xb9390000}, {0xb9392000}, {0xb9394000}, {0xb9396000}, - {0xb9398000}, {0xb939a000}, {0xb939c000}, {0xb939e000}, - {0xb93a0000}, {0xb93a2000}, {0xb93a4000}, {0xb93a6000}, - {0xb93a8000}, {0xb93aa000}, {0xb93ac000}, {0xb93ae000}, - {0xb93b0000}, {0xb93b2000}, {0xb93b4000}, {0xb93b6000}, - {0xb93b8000}, {0xb93ba000}, {0xb93bc000}, {0xb93be000}, - {0xb93c0000}, {0xb93c2000}, {0xb93c4000}, {0xb93c6000}, - {0xb93c8000}, {0xb93ca000}, {0xb93cc000}, {0xb93ce000}, - {0xb93d0000}, {0xb93d2000}, {0xb93d4000}, {0xb93d6000}, - {0xb93d8000}, {0xb93da000}, {0xb93dc000}, {0xb93de000}, - {0xb93e0000}, {0xb93e2000}, {0xb93e4000}, {0xb93e6000}, - {0xb93e8000}, {0xb93ea000}, {0xb93ec000}, {0xb93ee000}, - {0xb93f0000}, {0xb93f2000}, {0xb93f4000}, {0xb93f6000}, - {0xb93f8000}, {0xb93fa000}, {0xb93fc000}, {0xb93fe000}, - {0xb9400000}, {0xb9402000}, {0xb9404000}, {0xb9406000}, - {0xb9408000}, {0xb940a000}, {0xb940c000}, {0xb940e000}, - {0xb9410000}, {0xb9412000}, {0xb9414000}, {0xb9416000}, - {0xb9418000}, {0xb941a000}, {0xb941c000}, {0xb941e000}, - {0xb9420000}, {0xb9422000}, {0xb9424000}, {0xb9426000}, - {0xb9428000}, {0xb942a000}, {0xb942c000}, {0xb942e000}, - {0xb9430000}, {0xb9432000}, {0xb9434000}, {0xb9436000}, - {0xb9438000}, {0xb943a000}, {0xb943c000}, {0xb943e000}, - {0xb9440000}, {0xb9442000}, {0xb9444000}, {0xb9446000}, - {0xb9448000}, {0xb944a000}, {0xb944c000}, {0xb944e000}, - {0xb9450000}, {0xb9452000}, {0xb9454000}, {0xb9456000}, - {0xb9458000}, {0xb945a000}, {0xb945c000}, {0xb945e000}, - {0xb9460000}, {0xb9462000}, {0xb9464000}, {0xb9466000}, - {0xb9468000}, {0xb946a000}, {0xb946c000}, {0xb946e000}, - {0xb9470000}, {0xb9472000}, {0xb9474000}, {0xb9476000}, - {0xb9478000}, {0xb947a000}, {0xb947c000}, {0xb947e000}, - {0xb9480000}, {0xb9482000}, {0xb9484000}, {0xb9486000}, - {0xb9488000}, {0xb948a000}, {0xb948c000}, {0xb948e000}, - {0xb9490000}, {0xb9492000}, {0xb9494000}, {0xb9496000}, - {0xb9498000}, {0xb949a000}, {0xb949c000}, {0xb949e000}, - {0xb94a0000}, {0xb94a2000}, {0xb94a4000}, {0xb94a6000}, - {0xb94a8000}, {0xb94aa000}, {0xb94ac000}, {0xb94ae000}, - {0xb94b0000}, {0xb94b2000}, {0xb94b4000}, {0xb94b6000}, - {0xb94b8000}, {0xb94ba000}, {0xb94bc000}, {0xb94be000}, - {0xb94c0000}, {0xb94c2000}, {0xb94c4000}, {0xb94c6000}, - {0xb94c8000}, {0xb94ca000}, {0xb94cc000}, {0xb94ce000}, - {0xb94d0000}, {0xb94d2000}, {0xb94d4000}, {0xb94d6000}, - {0xb94d8000}, {0xb94da000}, {0xb94dc000}, {0xb94de000}, - {0xb94e0000}, {0xb94e2000}, {0xb94e4000}, {0xb94e6000}, - {0xb94e8000}, {0xb94ea000}, {0xb94ec000}, {0xb94ee000}, - {0xb94f0000}, {0xb94f2000}, {0xb94f4000}, {0xb94f6000}, - {0xb94f8000}, {0xb94fa000}, {0xb94fc000}, {0xb94fe000}, - {0xb9500000}, {0xb9502000}, {0xb9504000}, {0xb9506000}, - {0xb9508000}, {0xb950a000}, {0xb950c000}, {0xb950e000}, - {0xb9510000}, {0xb9512000}, {0xb9514000}, {0xb9516000}, - {0xb9518000}, {0xb951a000}, {0xb951c000}, {0xb951e000}, - {0xb9520000}, {0xb9522000}, {0xb9524000}, {0xb9526000}, - {0xb9528000}, {0xb952a000}, {0xb952c000}, {0xb952e000}, - {0xb9530000}, {0xb9532000}, {0xb9534000}, {0xb9536000}, - {0xb9538000}, {0xb953a000}, {0xb953c000}, {0xb953e000}, - {0xb9540000}, {0xb9542000}, {0xb9544000}, {0xb9546000}, - {0xb9548000}, {0xb954a000}, {0xb954c000}, {0xb954e000}, - {0xb9550000}, {0xb9552000}, {0xb9554000}, {0xb9556000}, - {0xb9558000}, {0xb955a000}, {0xb955c000}, {0xb955e000}, - {0xb9560000}, {0xb9562000}, {0xb9564000}, {0xb9566000}, - {0xb9568000}, {0xb956a000}, {0xb956c000}, {0xb956e000}, - {0xb9570000}, {0xb9572000}, {0xb9574000}, {0xb9576000}, - {0xb9578000}, {0xb957a000}, {0xb957c000}, {0xb957e000}, - {0xb9580000}, {0xb9582000}, {0xb9584000}, {0xb9586000}, - {0xb9588000}, {0xb958a000}, {0xb958c000}, {0xb958e000}, - {0xb9590000}, {0xb9592000}, {0xb9594000}, {0xb9596000}, - {0xb9598000}, {0xb959a000}, {0xb959c000}, {0xb959e000}, - {0xb95a0000}, {0xb95a2000}, {0xb95a4000}, {0xb95a6000}, - {0xb95a8000}, {0xb95aa000}, {0xb95ac000}, {0xb95ae000}, - {0xb95b0000}, {0xb95b2000}, {0xb95b4000}, {0xb95b6000}, - {0xb95b8000}, {0xb95ba000}, {0xb95bc000}, {0xb95be000}, - {0xb95c0000}, {0xb95c2000}, {0xb95c4000}, {0xb95c6000}, - {0xb95c8000}, {0xb95ca000}, {0xb95cc000}, {0xb95ce000}, - {0xb95d0000}, {0xb95d2000}, {0xb95d4000}, {0xb95d6000}, - {0xb95d8000}, {0xb95da000}, {0xb95dc000}, {0xb95de000}, - {0xb95e0000}, {0xb95e2000}, {0xb95e4000}, {0xb95e6000}, - {0xb95e8000}, {0xb95ea000}, {0xb95ec000}, {0xb95ee000}, - {0xb95f0000}, {0xb95f2000}, {0xb95f4000}, {0xb95f6000}, - {0xb95f8000}, {0xb95fa000}, {0xb95fc000}, {0xb95fe000}, - {0xb9600000}, {0xb9602000}, {0xb9604000}, {0xb9606000}, - {0xb9608000}, {0xb960a000}, {0xb960c000}, {0xb960e000}, - {0xb9610000}, {0xb9612000}, {0xb9614000}, {0xb9616000}, - {0xb9618000}, {0xb961a000}, {0xb961c000}, {0xb961e000}, - {0xb9620000}, {0xb9622000}, {0xb9624000}, {0xb9626000}, - {0xb9628000}, {0xb962a000}, {0xb962c000}, {0xb962e000}, - {0xb9630000}, {0xb9632000}, {0xb9634000}, {0xb9636000}, - {0xb9638000}, {0xb963a000}, {0xb963c000}, {0xb963e000}, - {0xb9640000}, {0xb9642000}, {0xb9644000}, {0xb9646000}, - {0xb9648000}, {0xb964a000}, {0xb964c000}, {0xb964e000}, - {0xb9650000}, {0xb9652000}, {0xb9654000}, {0xb9656000}, - {0xb9658000}, {0xb965a000}, {0xb965c000}, {0xb965e000}, - {0xb9660000}, {0xb9662000}, {0xb9664000}, {0xb9666000}, - {0xb9668000}, {0xb966a000}, {0xb966c000}, {0xb966e000}, - {0xb9670000}, {0xb9672000}, {0xb9674000}, {0xb9676000}, - {0xb9678000}, {0xb967a000}, {0xb967c000}, {0xb967e000}, - {0xb9680000}, {0xb9682000}, {0xb9684000}, {0xb9686000}, - {0xb9688000}, {0xb968a000}, {0xb968c000}, {0xb968e000}, - {0xb9690000}, {0xb9692000}, {0xb9694000}, {0xb9696000}, - {0xb9698000}, {0xb969a000}, {0xb969c000}, {0xb969e000}, - {0xb96a0000}, {0xb96a2000}, {0xb96a4000}, {0xb96a6000}, - {0xb96a8000}, {0xb96aa000}, {0xb96ac000}, {0xb96ae000}, - {0xb96b0000}, {0xb96b2000}, {0xb96b4000}, {0xb96b6000}, - {0xb96b8000}, {0xb96ba000}, {0xb96bc000}, {0xb96be000}, - {0xb96c0000}, {0xb96c2000}, {0xb96c4000}, {0xb96c6000}, - {0xb96c8000}, {0xb96ca000}, {0xb96cc000}, {0xb96ce000}, - {0xb96d0000}, {0xb96d2000}, {0xb96d4000}, {0xb96d6000}, - {0xb96d8000}, {0xb96da000}, {0xb96dc000}, {0xb96de000}, - {0xb96e0000}, {0xb96e2000}, {0xb96e4000}, {0xb96e6000}, - {0xb96e8000}, {0xb96ea000}, {0xb96ec000}, {0xb96ee000}, - {0xb96f0000}, {0xb96f2000}, {0xb96f4000}, {0xb96f6000}, - {0xb96f8000}, {0xb96fa000}, {0xb96fc000}, {0xb96fe000}, - {0xb9700000}, {0xb9702000}, {0xb9704000}, {0xb9706000}, - {0xb9708000}, {0xb970a000}, {0xb970c000}, {0xb970e000}, - {0xb9710000}, {0xb9712000}, {0xb9714000}, {0xb9716000}, - {0xb9718000}, {0xb971a000}, {0xb971c000}, {0xb971e000}, - {0xb9720000}, {0xb9722000}, {0xb9724000}, {0xb9726000}, - {0xb9728000}, {0xb972a000}, {0xb972c000}, {0xb972e000}, - {0xb9730000}, {0xb9732000}, {0xb9734000}, {0xb9736000}, - {0xb9738000}, {0xb973a000}, {0xb973c000}, {0xb973e000}, - {0xb9740000}, {0xb9742000}, {0xb9744000}, {0xb9746000}, - {0xb9748000}, {0xb974a000}, {0xb974c000}, {0xb974e000}, - {0xb9750000}, {0xb9752000}, {0xb9754000}, {0xb9756000}, - {0xb9758000}, {0xb975a000}, {0xb975c000}, {0xb975e000}, - {0xb9760000}, {0xb9762000}, {0xb9764000}, {0xb9766000}, - {0xb9768000}, {0xb976a000}, {0xb976c000}, {0xb976e000}, - {0xb9770000}, {0xb9772000}, {0xb9774000}, {0xb9776000}, - {0xb9778000}, {0xb977a000}, {0xb977c000}, {0xb977e000}, - {0xb9780000}, {0xb9782000}, {0xb9784000}, {0xb9786000}, - {0xb9788000}, {0xb978a000}, {0xb978c000}, {0xb978e000}, - {0xb9790000}, {0xb9792000}, {0xb9794000}, {0xb9796000}, - {0xb9798000}, {0xb979a000}, {0xb979c000}, {0xb979e000}, - {0xb97a0000}, {0xb97a2000}, {0xb97a4000}, {0xb97a6000}, - {0xb97a8000}, {0xb97aa000}, {0xb97ac000}, {0xb97ae000}, - {0xb97b0000}, {0xb97b2000}, {0xb97b4000}, {0xb97b6000}, - {0xb97b8000}, {0xb97ba000}, {0xb97bc000}, {0xb97be000}, - {0xb97c0000}, {0xb97c2000}, {0xb97c4000}, {0xb97c6000}, - {0xb97c8000}, {0xb97ca000}, {0xb97cc000}, {0xb97ce000}, - {0xb97d0000}, {0xb97d2000}, {0xb97d4000}, {0xb97d6000}, - {0xb97d8000}, {0xb97da000}, {0xb97dc000}, {0xb97de000}, - {0xb97e0000}, {0xb97e2000}, {0xb97e4000}, {0xb97e6000}, - {0xb97e8000}, {0xb97ea000}, {0xb97ec000}, {0xb97ee000}, - {0xb97f0000}, {0xb97f2000}, {0xb97f4000}, {0xb97f6000}, - {0xb97f8000}, {0xb97fa000}, {0xb97fc000}, {0xb97fe000}, - {0xb9800000}, {0xb9802000}, {0xb9804000}, {0xb9806000}, - {0xb9808000}, {0xb980a000}, {0xb980c000}, {0xb980e000}, - {0xb9810000}, {0xb9812000}, {0xb9814000}, {0xb9816000}, - {0xb9818000}, {0xb981a000}, {0xb981c000}, {0xb981e000}, - {0xb9820000}, {0xb9822000}, {0xb9824000}, {0xb9826000}, - {0xb9828000}, {0xb982a000}, {0xb982c000}, {0xb982e000}, - {0xb9830000}, {0xb9832000}, {0xb9834000}, {0xb9836000}, - {0xb9838000}, {0xb983a000}, {0xb983c000}, {0xb983e000}, - {0xb9840000}, {0xb9842000}, {0xb9844000}, {0xb9846000}, - {0xb9848000}, {0xb984a000}, {0xb984c000}, {0xb984e000}, - {0xb9850000}, {0xb9852000}, {0xb9854000}, {0xb9856000}, - {0xb9858000}, {0xb985a000}, {0xb985c000}, {0xb985e000}, - {0xb9860000}, {0xb9862000}, {0xb9864000}, {0xb9866000}, - {0xb9868000}, {0xb986a000}, {0xb986c000}, {0xb986e000}, - {0xb9870000}, {0xb9872000}, {0xb9874000}, {0xb9876000}, - {0xb9878000}, {0xb987a000}, {0xb987c000}, {0xb987e000}, - {0xb9880000}, {0xb9882000}, {0xb9884000}, {0xb9886000}, - {0xb9888000}, {0xb988a000}, {0xb988c000}, {0xb988e000}, - {0xb9890000}, {0xb9892000}, {0xb9894000}, {0xb9896000}, - {0xb9898000}, {0xb989a000}, {0xb989c000}, {0xb989e000}, - {0xb98a0000}, {0xb98a2000}, {0xb98a4000}, {0xb98a6000}, - {0xb98a8000}, {0xb98aa000}, {0xb98ac000}, {0xb98ae000}, - {0xb98b0000}, {0xb98b2000}, {0xb98b4000}, {0xb98b6000}, - {0xb98b8000}, {0xb98ba000}, {0xb98bc000}, {0xb98be000}, - {0xb98c0000}, {0xb98c2000}, {0xb98c4000}, {0xb98c6000}, - {0xb98c8000}, {0xb98ca000}, {0xb98cc000}, {0xb98ce000}, - {0xb98d0000}, {0xb98d2000}, {0xb98d4000}, {0xb98d6000}, - {0xb98d8000}, {0xb98da000}, {0xb98dc000}, {0xb98de000}, - {0xb98e0000}, {0xb98e2000}, {0xb98e4000}, {0xb98e6000}, - {0xb98e8000}, {0xb98ea000}, {0xb98ec000}, {0xb98ee000}, - {0xb98f0000}, {0xb98f2000}, {0xb98f4000}, {0xb98f6000}, - {0xb98f8000}, {0xb98fa000}, {0xb98fc000}, {0xb98fe000}, - {0xb9900000}, {0xb9902000}, {0xb9904000}, {0xb9906000}, - {0xb9908000}, {0xb990a000}, {0xb990c000}, {0xb990e000}, - {0xb9910000}, {0xb9912000}, {0xb9914000}, {0xb9916000}, - {0xb9918000}, {0xb991a000}, {0xb991c000}, {0xb991e000}, - {0xb9920000}, {0xb9922000}, {0xb9924000}, {0xb9926000}, - {0xb9928000}, {0xb992a000}, {0xb992c000}, {0xb992e000}, - {0xb9930000}, {0xb9932000}, {0xb9934000}, {0xb9936000}, - {0xb9938000}, {0xb993a000}, {0xb993c000}, {0xb993e000}, - {0xb9940000}, {0xb9942000}, {0xb9944000}, {0xb9946000}, - {0xb9948000}, {0xb994a000}, {0xb994c000}, {0xb994e000}, - {0xb9950000}, {0xb9952000}, {0xb9954000}, {0xb9956000}, - {0xb9958000}, {0xb995a000}, {0xb995c000}, {0xb995e000}, - {0xb9960000}, {0xb9962000}, {0xb9964000}, {0xb9966000}, - {0xb9968000}, {0xb996a000}, {0xb996c000}, {0xb996e000}, - {0xb9970000}, {0xb9972000}, {0xb9974000}, {0xb9976000}, - {0xb9978000}, {0xb997a000}, {0xb997c000}, {0xb997e000}, - {0xb9980000}, {0xb9982000}, {0xb9984000}, {0xb9986000}, - {0xb9988000}, {0xb998a000}, {0xb998c000}, {0xb998e000}, - {0xb9990000}, {0xb9992000}, {0xb9994000}, {0xb9996000}, - {0xb9998000}, {0xb999a000}, {0xb999c000}, {0xb999e000}, - {0xb99a0000}, {0xb99a2000}, {0xb99a4000}, {0xb99a6000}, - {0xb99a8000}, {0xb99aa000}, {0xb99ac000}, {0xb99ae000}, - {0xb99b0000}, {0xb99b2000}, {0xb99b4000}, {0xb99b6000}, - {0xb99b8000}, {0xb99ba000}, {0xb99bc000}, {0xb99be000}, - {0xb99c0000}, {0xb99c2000}, {0xb99c4000}, {0xb99c6000}, - {0xb99c8000}, {0xb99ca000}, {0xb99cc000}, {0xb99ce000}, - {0xb99d0000}, {0xb99d2000}, {0xb99d4000}, {0xb99d6000}, - {0xb99d8000}, {0xb99da000}, {0xb99dc000}, {0xb99de000}, - {0xb99e0000}, {0xb99e2000}, {0xb99e4000}, {0xb99e6000}, - {0xb99e8000}, {0xb99ea000}, {0xb99ec000}, {0xb99ee000}, - {0xb99f0000}, {0xb99f2000}, {0xb99f4000}, {0xb99f6000}, - {0xb99f8000}, {0xb99fa000}, {0xb99fc000}, {0xb99fe000}, - {0xb9a00000}, {0xb9a02000}, {0xb9a04000}, {0xb9a06000}, - {0xb9a08000}, {0xb9a0a000}, {0xb9a0c000}, {0xb9a0e000}, - {0xb9a10000}, {0xb9a12000}, {0xb9a14000}, {0xb9a16000}, - {0xb9a18000}, {0xb9a1a000}, {0xb9a1c000}, {0xb9a1e000}, - {0xb9a20000}, {0xb9a22000}, {0xb9a24000}, {0xb9a26000}, - {0xb9a28000}, {0xb9a2a000}, {0xb9a2c000}, {0xb9a2e000}, - {0xb9a30000}, {0xb9a32000}, {0xb9a34000}, {0xb9a36000}, - {0xb9a38000}, {0xb9a3a000}, {0xb9a3c000}, {0xb9a3e000}, - {0xb9a40000}, {0xb9a42000}, {0xb9a44000}, {0xb9a46000}, - {0xb9a48000}, {0xb9a4a000}, {0xb9a4c000}, {0xb9a4e000}, - {0xb9a50000}, {0xb9a52000}, {0xb9a54000}, {0xb9a56000}, - {0xb9a58000}, {0xb9a5a000}, {0xb9a5c000}, {0xb9a5e000}, - {0xb9a60000}, {0xb9a62000}, {0xb9a64000}, {0xb9a66000}, - {0xb9a68000}, {0xb9a6a000}, {0xb9a6c000}, {0xb9a6e000}, - {0xb9a70000}, {0xb9a72000}, {0xb9a74000}, {0xb9a76000}, - {0xb9a78000}, {0xb9a7a000}, {0xb9a7c000}, {0xb9a7e000}, - {0xb9a80000}, {0xb9a82000}, {0xb9a84000}, {0xb9a86000}, - {0xb9a88000}, {0xb9a8a000}, {0xb9a8c000}, {0xb9a8e000}, - {0xb9a90000}, {0xb9a92000}, {0xb9a94000}, {0xb9a96000}, - {0xb9a98000}, {0xb9a9a000}, {0xb9a9c000}, {0xb9a9e000}, - {0xb9aa0000}, {0xb9aa2000}, {0xb9aa4000}, {0xb9aa6000}, - {0xb9aa8000}, {0xb9aaa000}, {0xb9aac000}, {0xb9aae000}, - {0xb9ab0000}, {0xb9ab2000}, {0xb9ab4000}, {0xb9ab6000}, - {0xb9ab8000}, {0xb9aba000}, {0xb9abc000}, {0xb9abe000}, - {0xb9ac0000}, {0xb9ac2000}, {0xb9ac4000}, {0xb9ac6000}, - {0xb9ac8000}, {0xb9aca000}, {0xb9acc000}, {0xb9ace000}, - {0xb9ad0000}, {0xb9ad2000}, {0xb9ad4000}, {0xb9ad6000}, - {0xb9ad8000}, {0xb9ada000}, {0xb9adc000}, {0xb9ade000}, - {0xb9ae0000}, {0xb9ae2000}, {0xb9ae4000}, {0xb9ae6000}, - {0xb9ae8000}, {0xb9aea000}, {0xb9aec000}, {0xb9aee000}, - {0xb9af0000}, {0xb9af2000}, {0xb9af4000}, {0xb9af6000}, - {0xb9af8000}, {0xb9afa000}, {0xb9afc000}, {0xb9afe000}, - {0xb9b00000}, {0xb9b02000}, {0xb9b04000}, {0xb9b06000}, - {0xb9b08000}, {0xb9b0a000}, {0xb9b0c000}, {0xb9b0e000}, - {0xb9b10000}, {0xb9b12000}, {0xb9b14000}, {0xb9b16000}, - {0xb9b18000}, {0xb9b1a000}, {0xb9b1c000}, {0xb9b1e000}, - {0xb9b20000}, {0xb9b22000}, {0xb9b24000}, {0xb9b26000}, - {0xb9b28000}, {0xb9b2a000}, {0xb9b2c000}, {0xb9b2e000}, - {0xb9b30000}, {0xb9b32000}, {0xb9b34000}, {0xb9b36000}, - {0xb9b38000}, {0xb9b3a000}, {0xb9b3c000}, {0xb9b3e000}, - {0xb9b40000}, {0xb9b42000}, {0xb9b44000}, {0xb9b46000}, - {0xb9b48000}, {0xb9b4a000}, {0xb9b4c000}, {0xb9b4e000}, - {0xb9b50000}, {0xb9b52000}, {0xb9b54000}, {0xb9b56000}, - {0xb9b58000}, {0xb9b5a000}, {0xb9b5c000}, {0xb9b5e000}, - {0xb9b60000}, {0xb9b62000}, {0xb9b64000}, {0xb9b66000}, - {0xb9b68000}, {0xb9b6a000}, {0xb9b6c000}, {0xb9b6e000}, - {0xb9b70000}, {0xb9b72000}, {0xb9b74000}, {0xb9b76000}, - {0xb9b78000}, {0xb9b7a000}, {0xb9b7c000}, {0xb9b7e000}, - {0xb9b80000}, {0xb9b82000}, {0xb9b84000}, {0xb9b86000}, - {0xb9b88000}, {0xb9b8a000}, {0xb9b8c000}, {0xb9b8e000}, - {0xb9b90000}, {0xb9b92000}, {0xb9b94000}, {0xb9b96000}, - {0xb9b98000}, {0xb9b9a000}, {0xb9b9c000}, {0xb9b9e000}, - {0xb9ba0000}, {0xb9ba2000}, {0xb9ba4000}, {0xb9ba6000}, - {0xb9ba8000}, {0xb9baa000}, {0xb9bac000}, {0xb9bae000}, - {0xb9bb0000}, {0xb9bb2000}, {0xb9bb4000}, {0xb9bb6000}, - {0xb9bb8000}, {0xb9bba000}, {0xb9bbc000}, {0xb9bbe000}, - {0xb9bc0000}, {0xb9bc2000}, {0xb9bc4000}, {0xb9bc6000}, - {0xb9bc8000}, {0xb9bca000}, {0xb9bcc000}, {0xb9bce000}, - {0xb9bd0000}, {0xb9bd2000}, {0xb9bd4000}, {0xb9bd6000}, - {0xb9bd8000}, {0xb9bda000}, {0xb9bdc000}, {0xb9bde000}, - {0xb9be0000}, {0xb9be2000}, {0xb9be4000}, {0xb9be6000}, - {0xb9be8000}, {0xb9bea000}, {0xb9bec000}, {0xb9bee000}, - {0xb9bf0000}, {0xb9bf2000}, {0xb9bf4000}, {0xb9bf6000}, - {0xb9bf8000}, {0xb9bfa000}, {0xb9bfc000}, {0xb9bfe000}, - {0xb9c00000}, {0xb9c02000}, {0xb9c04000}, {0xb9c06000}, - {0xb9c08000}, {0xb9c0a000}, {0xb9c0c000}, {0xb9c0e000}, - {0xb9c10000}, {0xb9c12000}, {0xb9c14000}, {0xb9c16000}, - {0xb9c18000}, {0xb9c1a000}, {0xb9c1c000}, {0xb9c1e000}, - {0xb9c20000}, {0xb9c22000}, {0xb9c24000}, {0xb9c26000}, - {0xb9c28000}, {0xb9c2a000}, {0xb9c2c000}, {0xb9c2e000}, - {0xb9c30000}, {0xb9c32000}, {0xb9c34000}, {0xb9c36000}, - {0xb9c38000}, {0xb9c3a000}, {0xb9c3c000}, {0xb9c3e000}, - {0xb9c40000}, {0xb9c42000}, {0xb9c44000}, {0xb9c46000}, - {0xb9c48000}, {0xb9c4a000}, {0xb9c4c000}, {0xb9c4e000}, - {0xb9c50000}, {0xb9c52000}, {0xb9c54000}, {0xb9c56000}, - {0xb9c58000}, {0xb9c5a000}, {0xb9c5c000}, {0xb9c5e000}, - {0xb9c60000}, {0xb9c62000}, {0xb9c64000}, {0xb9c66000}, - {0xb9c68000}, {0xb9c6a000}, {0xb9c6c000}, {0xb9c6e000}, - {0xb9c70000}, {0xb9c72000}, {0xb9c74000}, {0xb9c76000}, - {0xb9c78000}, {0xb9c7a000}, {0xb9c7c000}, {0xb9c7e000}, - {0xb9c80000}, {0xb9c82000}, {0xb9c84000}, {0xb9c86000}, - {0xb9c88000}, {0xb9c8a000}, {0xb9c8c000}, {0xb9c8e000}, - {0xb9c90000}, {0xb9c92000}, {0xb9c94000}, {0xb9c96000}, - {0xb9c98000}, {0xb9c9a000}, {0xb9c9c000}, {0xb9c9e000}, - {0xb9ca0000}, {0xb9ca2000}, {0xb9ca4000}, {0xb9ca6000}, - {0xb9ca8000}, {0xb9caa000}, {0xb9cac000}, {0xb9cae000}, - {0xb9cb0000}, {0xb9cb2000}, {0xb9cb4000}, {0xb9cb6000}, - {0xb9cb8000}, {0xb9cba000}, {0xb9cbc000}, {0xb9cbe000}, - {0xb9cc0000}, {0xb9cc2000}, {0xb9cc4000}, {0xb9cc6000}, - {0xb9cc8000}, {0xb9cca000}, {0xb9ccc000}, {0xb9cce000}, - {0xb9cd0000}, {0xb9cd2000}, {0xb9cd4000}, {0xb9cd6000}, - {0xb9cd8000}, {0xb9cda000}, {0xb9cdc000}, {0xb9cde000}, - {0xb9ce0000}, {0xb9ce2000}, {0xb9ce4000}, {0xb9ce6000}, - {0xb9ce8000}, {0xb9cea000}, {0xb9cec000}, {0xb9cee000}, - {0xb9cf0000}, {0xb9cf2000}, {0xb9cf4000}, {0xb9cf6000}, - {0xb9cf8000}, {0xb9cfa000}, {0xb9cfc000}, {0xb9cfe000}, - {0xb9d00000}, {0xb9d02000}, {0xb9d04000}, {0xb9d06000}, - {0xb9d08000}, {0xb9d0a000}, {0xb9d0c000}, {0xb9d0e000}, - {0xb9d10000}, {0xb9d12000}, {0xb9d14000}, {0xb9d16000}, - {0xb9d18000}, {0xb9d1a000}, {0xb9d1c000}, {0xb9d1e000}, - {0xb9d20000}, {0xb9d22000}, {0xb9d24000}, {0xb9d26000}, - {0xb9d28000}, {0xb9d2a000}, {0xb9d2c000}, {0xb9d2e000}, - {0xb9d30000}, {0xb9d32000}, {0xb9d34000}, {0xb9d36000}, - {0xb9d38000}, {0xb9d3a000}, {0xb9d3c000}, {0xb9d3e000}, - {0xb9d40000}, {0xb9d42000}, {0xb9d44000}, {0xb9d46000}, - {0xb9d48000}, {0xb9d4a000}, {0xb9d4c000}, {0xb9d4e000}, - {0xb9d50000}, {0xb9d52000}, {0xb9d54000}, {0xb9d56000}, - {0xb9d58000}, {0xb9d5a000}, {0xb9d5c000}, {0xb9d5e000}, - {0xb9d60000}, {0xb9d62000}, {0xb9d64000}, {0xb9d66000}, - {0xb9d68000}, {0xb9d6a000}, {0xb9d6c000}, {0xb9d6e000}, - {0xb9d70000}, {0xb9d72000}, {0xb9d74000}, {0xb9d76000}, - {0xb9d78000}, {0xb9d7a000}, {0xb9d7c000}, {0xb9d7e000}, - {0xb9d80000}, {0xb9d82000}, {0xb9d84000}, {0xb9d86000}, - {0xb9d88000}, {0xb9d8a000}, {0xb9d8c000}, {0xb9d8e000}, - {0xb9d90000}, {0xb9d92000}, {0xb9d94000}, {0xb9d96000}, - {0xb9d98000}, {0xb9d9a000}, {0xb9d9c000}, {0xb9d9e000}, - {0xb9da0000}, {0xb9da2000}, {0xb9da4000}, {0xb9da6000}, - {0xb9da8000}, {0xb9daa000}, {0xb9dac000}, {0xb9dae000}, - {0xb9db0000}, {0xb9db2000}, {0xb9db4000}, {0xb9db6000}, - {0xb9db8000}, {0xb9dba000}, {0xb9dbc000}, {0xb9dbe000}, - {0xb9dc0000}, {0xb9dc2000}, {0xb9dc4000}, {0xb9dc6000}, - {0xb9dc8000}, {0xb9dca000}, {0xb9dcc000}, {0xb9dce000}, - {0xb9dd0000}, {0xb9dd2000}, {0xb9dd4000}, {0xb9dd6000}, - {0xb9dd8000}, {0xb9dda000}, {0xb9ddc000}, {0xb9dde000}, - {0xb9de0000}, {0xb9de2000}, {0xb9de4000}, {0xb9de6000}, - {0xb9de8000}, {0xb9dea000}, {0xb9dec000}, {0xb9dee000}, - {0xb9df0000}, {0xb9df2000}, {0xb9df4000}, {0xb9df6000}, - {0xb9df8000}, {0xb9dfa000}, {0xb9dfc000}, {0xb9dfe000}, - {0xb9e00000}, {0xb9e02000}, {0xb9e04000}, {0xb9e06000}, - {0xb9e08000}, {0xb9e0a000}, {0xb9e0c000}, {0xb9e0e000}, - {0xb9e10000}, {0xb9e12000}, {0xb9e14000}, {0xb9e16000}, - {0xb9e18000}, {0xb9e1a000}, {0xb9e1c000}, {0xb9e1e000}, - {0xb9e20000}, {0xb9e22000}, {0xb9e24000}, {0xb9e26000}, - {0xb9e28000}, {0xb9e2a000}, {0xb9e2c000}, {0xb9e2e000}, - {0xb9e30000}, {0xb9e32000}, {0xb9e34000}, {0xb9e36000}, - {0xb9e38000}, {0xb9e3a000}, {0xb9e3c000}, {0xb9e3e000}, - {0xb9e40000}, {0xb9e42000}, {0xb9e44000}, {0xb9e46000}, - {0xb9e48000}, {0xb9e4a000}, {0xb9e4c000}, {0xb9e4e000}, - {0xb9e50000}, {0xb9e52000}, {0xb9e54000}, {0xb9e56000}, - {0xb9e58000}, {0xb9e5a000}, {0xb9e5c000}, {0xb9e5e000}, - {0xb9e60000}, {0xb9e62000}, {0xb9e64000}, {0xb9e66000}, - {0xb9e68000}, {0xb9e6a000}, {0xb9e6c000}, {0xb9e6e000}, - {0xb9e70000}, {0xb9e72000}, {0xb9e74000}, {0xb9e76000}, - {0xb9e78000}, {0xb9e7a000}, {0xb9e7c000}, {0xb9e7e000}, - {0xb9e80000}, {0xb9e82000}, {0xb9e84000}, {0xb9e86000}, - {0xb9e88000}, {0xb9e8a000}, {0xb9e8c000}, {0xb9e8e000}, - {0xb9e90000}, {0xb9e92000}, {0xb9e94000}, {0xb9e96000}, - {0xb9e98000}, {0xb9e9a000}, {0xb9e9c000}, {0xb9e9e000}, - {0xb9ea0000}, {0xb9ea2000}, {0xb9ea4000}, {0xb9ea6000}, - {0xb9ea8000}, {0xb9eaa000}, {0xb9eac000}, {0xb9eae000}, - {0xb9eb0000}, {0xb9eb2000}, {0xb9eb4000}, {0xb9eb6000}, - {0xb9eb8000}, {0xb9eba000}, {0xb9ebc000}, {0xb9ebe000}, - {0xb9ec0000}, {0xb9ec2000}, {0xb9ec4000}, {0xb9ec6000}, - {0xb9ec8000}, {0xb9eca000}, {0xb9ecc000}, {0xb9ece000}, - {0xb9ed0000}, {0xb9ed2000}, {0xb9ed4000}, {0xb9ed6000}, - {0xb9ed8000}, {0xb9eda000}, {0xb9edc000}, {0xb9ede000}, - {0xb9ee0000}, {0xb9ee2000}, {0xb9ee4000}, {0xb9ee6000}, - {0xb9ee8000}, {0xb9eea000}, {0xb9eec000}, {0xb9eee000}, - {0xb9ef0000}, {0xb9ef2000}, {0xb9ef4000}, {0xb9ef6000}, - {0xb9ef8000}, {0xb9efa000}, {0xb9efc000}, {0xb9efe000}, - {0xb9f00000}, {0xb9f02000}, {0xb9f04000}, {0xb9f06000}, - {0xb9f08000}, {0xb9f0a000}, {0xb9f0c000}, {0xb9f0e000}, - {0xb9f10000}, {0xb9f12000}, {0xb9f14000}, {0xb9f16000}, - {0xb9f18000}, {0xb9f1a000}, {0xb9f1c000}, {0xb9f1e000}, - {0xb9f20000}, {0xb9f22000}, {0xb9f24000}, {0xb9f26000}, - {0xb9f28000}, {0xb9f2a000}, {0xb9f2c000}, {0xb9f2e000}, - {0xb9f30000}, {0xb9f32000}, {0xb9f34000}, {0xb9f36000}, - {0xb9f38000}, {0xb9f3a000}, {0xb9f3c000}, {0xb9f3e000}, - {0xb9f40000}, {0xb9f42000}, {0xb9f44000}, {0xb9f46000}, - {0xb9f48000}, {0xb9f4a000}, {0xb9f4c000}, {0xb9f4e000}, - {0xb9f50000}, {0xb9f52000}, {0xb9f54000}, {0xb9f56000}, - {0xb9f58000}, {0xb9f5a000}, {0xb9f5c000}, {0xb9f5e000}, - {0xb9f60000}, {0xb9f62000}, {0xb9f64000}, {0xb9f66000}, - {0xb9f68000}, {0xb9f6a000}, {0xb9f6c000}, {0xb9f6e000}, - {0xb9f70000}, {0xb9f72000}, {0xb9f74000}, {0xb9f76000}, - {0xb9f78000}, {0xb9f7a000}, {0xb9f7c000}, {0xb9f7e000}, - {0xb9f80000}, {0xb9f82000}, {0xb9f84000}, {0xb9f86000}, - {0xb9f88000}, {0xb9f8a000}, {0xb9f8c000}, {0xb9f8e000}, - {0xb9f90000}, {0xb9f92000}, {0xb9f94000}, {0xb9f96000}, - {0xb9f98000}, {0xb9f9a000}, {0xb9f9c000}, {0xb9f9e000}, - {0xb9fa0000}, {0xb9fa2000}, {0xb9fa4000}, {0xb9fa6000}, - {0xb9fa8000}, {0xb9faa000}, {0xb9fac000}, {0xb9fae000}, - {0xb9fb0000}, {0xb9fb2000}, {0xb9fb4000}, {0xb9fb6000}, - {0xb9fb8000}, {0xb9fba000}, {0xb9fbc000}, {0xb9fbe000}, - {0xb9fc0000}, {0xb9fc2000}, {0xb9fc4000}, {0xb9fc6000}, - {0xb9fc8000}, {0xb9fca000}, {0xb9fcc000}, {0xb9fce000}, - {0xb9fd0000}, {0xb9fd2000}, {0xb9fd4000}, {0xb9fd6000}, - {0xb9fd8000}, {0xb9fda000}, {0xb9fdc000}, {0xb9fde000}, - {0xb9fe0000}, {0xb9fe2000}, {0xb9fe4000}, {0xb9fe6000}, - {0xb9fe8000}, {0xb9fea000}, {0xb9fec000}, {0xb9fee000}, - {0xb9ff0000}, {0xb9ff2000}, {0xb9ff4000}, {0xb9ff6000}, - {0xb9ff8000}, {0xb9ffa000}, {0xb9ffc000}, {0xb9ffe000}, - {0xba000000}, {0xba002000}, {0xba004000}, {0xba006000}, - {0xba008000}, {0xba00a000}, {0xba00c000}, {0xba00e000}, - {0xba010000}, {0xba012000}, {0xba014000}, {0xba016000}, - {0xba018000}, {0xba01a000}, {0xba01c000}, {0xba01e000}, - {0xba020000}, {0xba022000}, {0xba024000}, {0xba026000}, - {0xba028000}, {0xba02a000}, {0xba02c000}, {0xba02e000}, - {0xba030000}, {0xba032000}, {0xba034000}, {0xba036000}, - {0xba038000}, {0xba03a000}, {0xba03c000}, {0xba03e000}, - {0xba040000}, {0xba042000}, {0xba044000}, {0xba046000}, - {0xba048000}, {0xba04a000}, {0xba04c000}, {0xba04e000}, - {0xba050000}, {0xba052000}, {0xba054000}, {0xba056000}, - {0xba058000}, {0xba05a000}, {0xba05c000}, {0xba05e000}, - {0xba060000}, {0xba062000}, {0xba064000}, {0xba066000}, - {0xba068000}, {0xba06a000}, {0xba06c000}, {0xba06e000}, - {0xba070000}, {0xba072000}, {0xba074000}, {0xba076000}, - {0xba078000}, {0xba07a000}, {0xba07c000}, {0xba07e000}, - {0xba080000}, {0xba082000}, {0xba084000}, {0xba086000}, - {0xba088000}, {0xba08a000}, {0xba08c000}, {0xba08e000}, - {0xba090000}, {0xba092000}, {0xba094000}, {0xba096000}, - {0xba098000}, {0xba09a000}, {0xba09c000}, {0xba09e000}, - {0xba0a0000}, {0xba0a2000}, {0xba0a4000}, {0xba0a6000}, - {0xba0a8000}, {0xba0aa000}, {0xba0ac000}, {0xba0ae000}, - {0xba0b0000}, {0xba0b2000}, {0xba0b4000}, {0xba0b6000}, - {0xba0b8000}, {0xba0ba000}, {0xba0bc000}, {0xba0be000}, - {0xba0c0000}, {0xba0c2000}, {0xba0c4000}, {0xba0c6000}, - {0xba0c8000}, {0xba0ca000}, {0xba0cc000}, {0xba0ce000}, - {0xba0d0000}, {0xba0d2000}, {0xba0d4000}, {0xba0d6000}, - {0xba0d8000}, {0xba0da000}, {0xba0dc000}, {0xba0de000}, - {0xba0e0000}, {0xba0e2000}, {0xba0e4000}, {0xba0e6000}, - {0xba0e8000}, {0xba0ea000}, {0xba0ec000}, {0xba0ee000}, - {0xba0f0000}, {0xba0f2000}, {0xba0f4000}, {0xba0f6000}, - {0xba0f8000}, {0xba0fa000}, {0xba0fc000}, {0xba0fe000}, - {0xba100000}, {0xba102000}, {0xba104000}, {0xba106000}, - {0xba108000}, {0xba10a000}, {0xba10c000}, {0xba10e000}, - {0xba110000}, {0xba112000}, {0xba114000}, {0xba116000}, - {0xba118000}, {0xba11a000}, {0xba11c000}, {0xba11e000}, - {0xba120000}, {0xba122000}, {0xba124000}, {0xba126000}, - {0xba128000}, {0xba12a000}, {0xba12c000}, {0xba12e000}, - {0xba130000}, {0xba132000}, {0xba134000}, {0xba136000}, - {0xba138000}, {0xba13a000}, {0xba13c000}, {0xba13e000}, - {0xba140000}, {0xba142000}, {0xba144000}, {0xba146000}, - {0xba148000}, {0xba14a000}, {0xba14c000}, {0xba14e000}, - {0xba150000}, {0xba152000}, {0xba154000}, {0xba156000}, - {0xba158000}, {0xba15a000}, {0xba15c000}, {0xba15e000}, - {0xba160000}, {0xba162000}, {0xba164000}, {0xba166000}, - {0xba168000}, {0xba16a000}, {0xba16c000}, {0xba16e000}, - {0xba170000}, {0xba172000}, {0xba174000}, {0xba176000}, - {0xba178000}, {0xba17a000}, {0xba17c000}, {0xba17e000}, - {0xba180000}, {0xba182000}, {0xba184000}, {0xba186000}, - {0xba188000}, {0xba18a000}, {0xba18c000}, {0xba18e000}, - {0xba190000}, {0xba192000}, {0xba194000}, {0xba196000}, - {0xba198000}, {0xba19a000}, {0xba19c000}, {0xba19e000}, - {0xba1a0000}, {0xba1a2000}, {0xba1a4000}, {0xba1a6000}, - {0xba1a8000}, {0xba1aa000}, {0xba1ac000}, {0xba1ae000}, - {0xba1b0000}, {0xba1b2000}, {0xba1b4000}, {0xba1b6000}, - {0xba1b8000}, {0xba1ba000}, {0xba1bc000}, {0xba1be000}, - {0xba1c0000}, {0xba1c2000}, {0xba1c4000}, {0xba1c6000}, - {0xba1c8000}, {0xba1ca000}, {0xba1cc000}, {0xba1ce000}, - {0xba1d0000}, {0xba1d2000}, {0xba1d4000}, {0xba1d6000}, - {0xba1d8000}, {0xba1da000}, {0xba1dc000}, {0xba1de000}, - {0xba1e0000}, {0xba1e2000}, {0xba1e4000}, {0xba1e6000}, - {0xba1e8000}, {0xba1ea000}, {0xba1ec000}, {0xba1ee000}, - {0xba1f0000}, {0xba1f2000}, {0xba1f4000}, {0xba1f6000}, - {0xba1f8000}, {0xba1fa000}, {0xba1fc000}, {0xba1fe000}, - {0xba200000}, {0xba202000}, {0xba204000}, {0xba206000}, - {0xba208000}, {0xba20a000}, {0xba20c000}, {0xba20e000}, - {0xba210000}, {0xba212000}, {0xba214000}, {0xba216000}, - {0xba218000}, {0xba21a000}, {0xba21c000}, {0xba21e000}, - {0xba220000}, {0xba222000}, {0xba224000}, {0xba226000}, - {0xba228000}, {0xba22a000}, {0xba22c000}, {0xba22e000}, - {0xba230000}, {0xba232000}, {0xba234000}, {0xba236000}, - {0xba238000}, {0xba23a000}, {0xba23c000}, {0xba23e000}, - {0xba240000}, {0xba242000}, {0xba244000}, {0xba246000}, - {0xba248000}, {0xba24a000}, {0xba24c000}, {0xba24e000}, - {0xba250000}, {0xba252000}, {0xba254000}, {0xba256000}, - {0xba258000}, {0xba25a000}, {0xba25c000}, {0xba25e000}, - {0xba260000}, {0xba262000}, {0xba264000}, {0xba266000}, - {0xba268000}, {0xba26a000}, {0xba26c000}, {0xba26e000}, - {0xba270000}, {0xba272000}, {0xba274000}, {0xba276000}, - {0xba278000}, {0xba27a000}, {0xba27c000}, {0xba27e000}, - {0xba280000}, {0xba282000}, {0xba284000}, {0xba286000}, - {0xba288000}, {0xba28a000}, {0xba28c000}, {0xba28e000}, - {0xba290000}, {0xba292000}, {0xba294000}, {0xba296000}, - {0xba298000}, {0xba29a000}, {0xba29c000}, {0xba29e000}, - {0xba2a0000}, {0xba2a2000}, {0xba2a4000}, {0xba2a6000}, - {0xba2a8000}, {0xba2aa000}, {0xba2ac000}, {0xba2ae000}, - {0xba2b0000}, {0xba2b2000}, {0xba2b4000}, {0xba2b6000}, - {0xba2b8000}, {0xba2ba000}, {0xba2bc000}, {0xba2be000}, - {0xba2c0000}, {0xba2c2000}, {0xba2c4000}, {0xba2c6000}, - {0xba2c8000}, {0xba2ca000}, {0xba2cc000}, {0xba2ce000}, - {0xba2d0000}, {0xba2d2000}, {0xba2d4000}, {0xba2d6000}, - {0xba2d8000}, {0xba2da000}, {0xba2dc000}, {0xba2de000}, - {0xba2e0000}, {0xba2e2000}, {0xba2e4000}, {0xba2e6000}, - {0xba2e8000}, {0xba2ea000}, {0xba2ec000}, {0xba2ee000}, - {0xba2f0000}, {0xba2f2000}, {0xba2f4000}, {0xba2f6000}, - {0xba2f8000}, {0xba2fa000}, {0xba2fc000}, {0xba2fe000}, - {0xba300000}, {0xba302000}, {0xba304000}, {0xba306000}, - {0xba308000}, {0xba30a000}, {0xba30c000}, {0xba30e000}, - {0xba310000}, {0xba312000}, {0xba314000}, {0xba316000}, - {0xba318000}, {0xba31a000}, {0xba31c000}, {0xba31e000}, - {0xba320000}, {0xba322000}, {0xba324000}, {0xba326000}, - {0xba328000}, {0xba32a000}, {0xba32c000}, {0xba32e000}, - {0xba330000}, {0xba332000}, {0xba334000}, {0xba336000}, - {0xba338000}, {0xba33a000}, {0xba33c000}, {0xba33e000}, - {0xba340000}, {0xba342000}, {0xba344000}, {0xba346000}, - {0xba348000}, {0xba34a000}, {0xba34c000}, {0xba34e000}, - {0xba350000}, {0xba352000}, {0xba354000}, {0xba356000}, - {0xba358000}, {0xba35a000}, {0xba35c000}, {0xba35e000}, - {0xba360000}, {0xba362000}, {0xba364000}, {0xba366000}, - {0xba368000}, {0xba36a000}, {0xba36c000}, {0xba36e000}, - {0xba370000}, {0xba372000}, {0xba374000}, {0xba376000}, - {0xba378000}, {0xba37a000}, {0xba37c000}, {0xba37e000}, - {0xba380000}, {0xba382000}, {0xba384000}, {0xba386000}, - {0xba388000}, {0xba38a000}, {0xba38c000}, {0xba38e000}, - {0xba390000}, {0xba392000}, {0xba394000}, {0xba396000}, - {0xba398000}, {0xba39a000}, {0xba39c000}, {0xba39e000}, - {0xba3a0000}, {0xba3a2000}, {0xba3a4000}, {0xba3a6000}, - {0xba3a8000}, {0xba3aa000}, {0xba3ac000}, {0xba3ae000}, - {0xba3b0000}, {0xba3b2000}, {0xba3b4000}, {0xba3b6000}, - {0xba3b8000}, {0xba3ba000}, {0xba3bc000}, {0xba3be000}, - {0xba3c0000}, {0xba3c2000}, {0xba3c4000}, {0xba3c6000}, - {0xba3c8000}, {0xba3ca000}, {0xba3cc000}, {0xba3ce000}, - {0xba3d0000}, {0xba3d2000}, {0xba3d4000}, {0xba3d6000}, - {0xba3d8000}, {0xba3da000}, {0xba3dc000}, {0xba3de000}, - {0xba3e0000}, {0xba3e2000}, {0xba3e4000}, {0xba3e6000}, - {0xba3e8000}, {0xba3ea000}, {0xba3ec000}, {0xba3ee000}, - {0xba3f0000}, {0xba3f2000}, {0xba3f4000}, {0xba3f6000}, - {0xba3f8000}, {0xba3fa000}, {0xba3fc000}, {0xba3fe000}, - {0xba400000}, {0xba402000}, {0xba404000}, {0xba406000}, - {0xba408000}, {0xba40a000}, {0xba40c000}, {0xba40e000}, - {0xba410000}, {0xba412000}, {0xba414000}, {0xba416000}, - {0xba418000}, {0xba41a000}, {0xba41c000}, {0xba41e000}, - {0xba420000}, {0xba422000}, {0xba424000}, {0xba426000}, - {0xba428000}, {0xba42a000}, {0xba42c000}, {0xba42e000}, - {0xba430000}, {0xba432000}, {0xba434000}, {0xba436000}, - {0xba438000}, {0xba43a000}, {0xba43c000}, {0xba43e000}, - {0xba440000}, {0xba442000}, {0xba444000}, {0xba446000}, - {0xba448000}, {0xba44a000}, {0xba44c000}, {0xba44e000}, - {0xba450000}, {0xba452000}, {0xba454000}, {0xba456000}, - {0xba458000}, {0xba45a000}, {0xba45c000}, {0xba45e000}, - {0xba460000}, {0xba462000}, {0xba464000}, {0xba466000}, - {0xba468000}, {0xba46a000}, {0xba46c000}, {0xba46e000}, - {0xba470000}, {0xba472000}, {0xba474000}, {0xba476000}, - {0xba478000}, {0xba47a000}, {0xba47c000}, {0xba47e000}, - {0xba480000}, {0xba482000}, {0xba484000}, {0xba486000}, - {0xba488000}, {0xba48a000}, {0xba48c000}, {0xba48e000}, - {0xba490000}, {0xba492000}, {0xba494000}, {0xba496000}, - {0xba498000}, {0xba49a000}, {0xba49c000}, {0xba49e000}, - {0xba4a0000}, {0xba4a2000}, {0xba4a4000}, {0xba4a6000}, - {0xba4a8000}, {0xba4aa000}, {0xba4ac000}, {0xba4ae000}, - {0xba4b0000}, {0xba4b2000}, {0xba4b4000}, {0xba4b6000}, - {0xba4b8000}, {0xba4ba000}, {0xba4bc000}, {0xba4be000}, - {0xba4c0000}, {0xba4c2000}, {0xba4c4000}, {0xba4c6000}, - {0xba4c8000}, {0xba4ca000}, {0xba4cc000}, {0xba4ce000}, - {0xba4d0000}, {0xba4d2000}, {0xba4d4000}, {0xba4d6000}, - {0xba4d8000}, {0xba4da000}, {0xba4dc000}, {0xba4de000}, - {0xba4e0000}, {0xba4e2000}, {0xba4e4000}, {0xba4e6000}, - {0xba4e8000}, {0xba4ea000}, {0xba4ec000}, {0xba4ee000}, - {0xba4f0000}, {0xba4f2000}, {0xba4f4000}, {0xba4f6000}, - {0xba4f8000}, {0xba4fa000}, {0xba4fc000}, {0xba4fe000}, - {0xba500000}, {0xba502000}, {0xba504000}, {0xba506000}, - {0xba508000}, {0xba50a000}, {0xba50c000}, {0xba50e000}, - {0xba510000}, {0xba512000}, {0xba514000}, {0xba516000}, - {0xba518000}, {0xba51a000}, {0xba51c000}, {0xba51e000}, - {0xba520000}, {0xba522000}, {0xba524000}, {0xba526000}, - {0xba528000}, {0xba52a000}, {0xba52c000}, {0xba52e000}, - {0xba530000}, {0xba532000}, {0xba534000}, {0xba536000}, - {0xba538000}, {0xba53a000}, {0xba53c000}, {0xba53e000}, - {0xba540000}, {0xba542000}, {0xba544000}, {0xba546000}, - {0xba548000}, {0xba54a000}, {0xba54c000}, {0xba54e000}, - {0xba550000}, {0xba552000}, {0xba554000}, {0xba556000}, - {0xba558000}, {0xba55a000}, {0xba55c000}, {0xba55e000}, - {0xba560000}, {0xba562000}, {0xba564000}, {0xba566000}, - {0xba568000}, {0xba56a000}, {0xba56c000}, {0xba56e000}, - {0xba570000}, {0xba572000}, {0xba574000}, {0xba576000}, - {0xba578000}, {0xba57a000}, {0xba57c000}, {0xba57e000}, - {0xba580000}, {0xba582000}, {0xba584000}, {0xba586000}, - {0xba588000}, {0xba58a000}, {0xba58c000}, {0xba58e000}, - {0xba590000}, {0xba592000}, {0xba594000}, {0xba596000}, - {0xba598000}, {0xba59a000}, {0xba59c000}, {0xba59e000}, - {0xba5a0000}, {0xba5a2000}, {0xba5a4000}, {0xba5a6000}, - {0xba5a8000}, {0xba5aa000}, {0xba5ac000}, {0xba5ae000}, - {0xba5b0000}, {0xba5b2000}, {0xba5b4000}, {0xba5b6000}, - {0xba5b8000}, {0xba5ba000}, {0xba5bc000}, {0xba5be000}, - {0xba5c0000}, {0xba5c2000}, {0xba5c4000}, {0xba5c6000}, - {0xba5c8000}, {0xba5ca000}, {0xba5cc000}, {0xba5ce000}, - {0xba5d0000}, {0xba5d2000}, {0xba5d4000}, {0xba5d6000}, - {0xba5d8000}, {0xba5da000}, {0xba5dc000}, {0xba5de000}, - {0xba5e0000}, {0xba5e2000}, {0xba5e4000}, {0xba5e6000}, - {0xba5e8000}, {0xba5ea000}, {0xba5ec000}, {0xba5ee000}, - {0xba5f0000}, {0xba5f2000}, {0xba5f4000}, {0xba5f6000}, - {0xba5f8000}, {0xba5fa000}, {0xba5fc000}, {0xba5fe000}, - {0xba600000}, {0xba602000}, {0xba604000}, {0xba606000}, - {0xba608000}, {0xba60a000}, {0xba60c000}, {0xba60e000}, - {0xba610000}, {0xba612000}, {0xba614000}, {0xba616000}, - {0xba618000}, {0xba61a000}, {0xba61c000}, {0xba61e000}, - {0xba620000}, {0xba622000}, {0xba624000}, {0xba626000}, - {0xba628000}, {0xba62a000}, {0xba62c000}, {0xba62e000}, - {0xba630000}, {0xba632000}, {0xba634000}, {0xba636000}, - {0xba638000}, {0xba63a000}, {0xba63c000}, {0xba63e000}, - {0xba640000}, {0xba642000}, {0xba644000}, {0xba646000}, - {0xba648000}, {0xba64a000}, {0xba64c000}, {0xba64e000}, - {0xba650000}, {0xba652000}, {0xba654000}, {0xba656000}, - {0xba658000}, {0xba65a000}, {0xba65c000}, {0xba65e000}, - {0xba660000}, {0xba662000}, {0xba664000}, {0xba666000}, - {0xba668000}, {0xba66a000}, {0xba66c000}, {0xba66e000}, - {0xba670000}, {0xba672000}, {0xba674000}, {0xba676000}, - {0xba678000}, {0xba67a000}, {0xba67c000}, {0xba67e000}, - {0xba680000}, {0xba682000}, {0xba684000}, {0xba686000}, - {0xba688000}, {0xba68a000}, {0xba68c000}, {0xba68e000}, - {0xba690000}, {0xba692000}, {0xba694000}, {0xba696000}, - {0xba698000}, {0xba69a000}, {0xba69c000}, {0xba69e000}, - {0xba6a0000}, {0xba6a2000}, {0xba6a4000}, {0xba6a6000}, - {0xba6a8000}, {0xba6aa000}, {0xba6ac000}, {0xba6ae000}, - {0xba6b0000}, {0xba6b2000}, {0xba6b4000}, {0xba6b6000}, - {0xba6b8000}, {0xba6ba000}, {0xba6bc000}, {0xba6be000}, - {0xba6c0000}, {0xba6c2000}, {0xba6c4000}, {0xba6c6000}, - {0xba6c8000}, {0xba6ca000}, {0xba6cc000}, {0xba6ce000}, - {0xba6d0000}, {0xba6d2000}, {0xba6d4000}, {0xba6d6000}, - {0xba6d8000}, {0xba6da000}, {0xba6dc000}, {0xba6de000}, - {0xba6e0000}, {0xba6e2000}, {0xba6e4000}, {0xba6e6000}, - {0xba6e8000}, {0xba6ea000}, {0xba6ec000}, {0xba6ee000}, - {0xba6f0000}, {0xba6f2000}, {0xba6f4000}, {0xba6f6000}, - {0xba6f8000}, {0xba6fa000}, {0xba6fc000}, {0xba6fe000}, - {0xba700000}, {0xba702000}, {0xba704000}, {0xba706000}, - {0xba708000}, {0xba70a000}, {0xba70c000}, {0xba70e000}, - {0xba710000}, {0xba712000}, {0xba714000}, {0xba716000}, - {0xba718000}, {0xba71a000}, {0xba71c000}, {0xba71e000}, - {0xba720000}, {0xba722000}, {0xba724000}, {0xba726000}, - {0xba728000}, {0xba72a000}, {0xba72c000}, {0xba72e000}, - {0xba730000}, {0xba732000}, {0xba734000}, {0xba736000}, - {0xba738000}, {0xba73a000}, {0xba73c000}, {0xba73e000}, - {0xba740000}, {0xba742000}, {0xba744000}, {0xba746000}, - {0xba748000}, {0xba74a000}, {0xba74c000}, {0xba74e000}, - {0xba750000}, {0xba752000}, {0xba754000}, {0xba756000}, - {0xba758000}, {0xba75a000}, {0xba75c000}, {0xba75e000}, - {0xba760000}, {0xba762000}, {0xba764000}, {0xba766000}, - {0xba768000}, {0xba76a000}, {0xba76c000}, {0xba76e000}, - {0xba770000}, {0xba772000}, {0xba774000}, {0xba776000}, - {0xba778000}, {0xba77a000}, {0xba77c000}, {0xba77e000}, - {0xba780000}, {0xba782000}, {0xba784000}, {0xba786000}, - {0xba788000}, {0xba78a000}, {0xba78c000}, {0xba78e000}, - {0xba790000}, {0xba792000}, {0xba794000}, {0xba796000}, - {0xba798000}, {0xba79a000}, {0xba79c000}, {0xba79e000}, - {0xba7a0000}, {0xba7a2000}, {0xba7a4000}, {0xba7a6000}, - {0xba7a8000}, {0xba7aa000}, {0xba7ac000}, {0xba7ae000}, - {0xba7b0000}, {0xba7b2000}, {0xba7b4000}, {0xba7b6000}, - {0xba7b8000}, {0xba7ba000}, {0xba7bc000}, {0xba7be000}, - {0xba7c0000}, {0xba7c2000}, {0xba7c4000}, {0xba7c6000}, - {0xba7c8000}, {0xba7ca000}, {0xba7cc000}, {0xba7ce000}, - {0xba7d0000}, {0xba7d2000}, {0xba7d4000}, {0xba7d6000}, - {0xba7d8000}, {0xba7da000}, {0xba7dc000}, {0xba7de000}, - {0xba7e0000}, {0xba7e2000}, {0xba7e4000}, {0xba7e6000}, - {0xba7e8000}, {0xba7ea000}, {0xba7ec000}, {0xba7ee000}, - {0xba7f0000}, {0xba7f2000}, {0xba7f4000}, {0xba7f6000}, - {0xba7f8000}, {0xba7fa000}, {0xba7fc000}, {0xba7fe000}, - {0xba800000}, {0xba802000}, {0xba804000}, {0xba806000}, - {0xba808000}, {0xba80a000}, {0xba80c000}, {0xba80e000}, - {0xba810000}, {0xba812000}, {0xba814000}, {0xba816000}, - {0xba818000}, {0xba81a000}, {0xba81c000}, {0xba81e000}, - {0xba820000}, {0xba822000}, {0xba824000}, {0xba826000}, - {0xba828000}, {0xba82a000}, {0xba82c000}, {0xba82e000}, - {0xba830000}, {0xba832000}, {0xba834000}, {0xba836000}, - {0xba838000}, {0xba83a000}, {0xba83c000}, {0xba83e000}, - {0xba840000}, {0xba842000}, {0xba844000}, {0xba846000}, - {0xba848000}, {0xba84a000}, {0xba84c000}, {0xba84e000}, - {0xba850000}, {0xba852000}, {0xba854000}, {0xba856000}, - {0xba858000}, {0xba85a000}, {0xba85c000}, {0xba85e000}, - {0xba860000}, {0xba862000}, {0xba864000}, {0xba866000}, - {0xba868000}, {0xba86a000}, {0xba86c000}, {0xba86e000}, - {0xba870000}, {0xba872000}, {0xba874000}, {0xba876000}, - {0xba878000}, {0xba87a000}, {0xba87c000}, {0xba87e000}, - {0xba880000}, {0xba882000}, {0xba884000}, {0xba886000}, - {0xba888000}, {0xba88a000}, {0xba88c000}, {0xba88e000}, - {0xba890000}, {0xba892000}, {0xba894000}, {0xba896000}, - {0xba898000}, {0xba89a000}, {0xba89c000}, {0xba89e000}, - {0xba8a0000}, {0xba8a2000}, {0xba8a4000}, {0xba8a6000}, - {0xba8a8000}, {0xba8aa000}, {0xba8ac000}, {0xba8ae000}, - {0xba8b0000}, {0xba8b2000}, {0xba8b4000}, {0xba8b6000}, - {0xba8b8000}, {0xba8ba000}, {0xba8bc000}, {0xba8be000}, - {0xba8c0000}, {0xba8c2000}, {0xba8c4000}, {0xba8c6000}, - {0xba8c8000}, {0xba8ca000}, {0xba8cc000}, {0xba8ce000}, - {0xba8d0000}, {0xba8d2000}, {0xba8d4000}, {0xba8d6000}, - {0xba8d8000}, {0xba8da000}, {0xba8dc000}, {0xba8de000}, - {0xba8e0000}, {0xba8e2000}, {0xba8e4000}, {0xba8e6000}, - {0xba8e8000}, {0xba8ea000}, {0xba8ec000}, {0xba8ee000}, - {0xba8f0000}, {0xba8f2000}, {0xba8f4000}, {0xba8f6000}, - {0xba8f8000}, {0xba8fa000}, {0xba8fc000}, {0xba8fe000}, - {0xba900000}, {0xba902000}, {0xba904000}, {0xba906000}, - {0xba908000}, {0xba90a000}, {0xba90c000}, {0xba90e000}, - {0xba910000}, {0xba912000}, {0xba914000}, {0xba916000}, - {0xba918000}, {0xba91a000}, {0xba91c000}, {0xba91e000}, - {0xba920000}, {0xba922000}, {0xba924000}, {0xba926000}, - {0xba928000}, {0xba92a000}, {0xba92c000}, {0xba92e000}, - {0xba930000}, {0xba932000}, {0xba934000}, {0xba936000}, - {0xba938000}, {0xba93a000}, {0xba93c000}, {0xba93e000}, - {0xba940000}, {0xba942000}, {0xba944000}, {0xba946000}, - {0xba948000}, {0xba94a000}, {0xba94c000}, {0xba94e000}, - {0xba950000}, {0xba952000}, {0xba954000}, {0xba956000}, - {0xba958000}, {0xba95a000}, {0xba95c000}, {0xba95e000}, - {0xba960000}, {0xba962000}, {0xba964000}, {0xba966000}, - {0xba968000}, {0xba96a000}, {0xba96c000}, {0xba96e000}, - {0xba970000}, {0xba972000}, {0xba974000}, {0xba976000}, - {0xba978000}, {0xba97a000}, {0xba97c000}, {0xba97e000}, - {0xba980000}, {0xba982000}, {0xba984000}, {0xba986000}, - {0xba988000}, {0xba98a000}, {0xba98c000}, {0xba98e000}, - {0xba990000}, {0xba992000}, {0xba994000}, {0xba996000}, - {0xba998000}, {0xba99a000}, {0xba99c000}, {0xba99e000}, - {0xba9a0000}, {0xba9a2000}, {0xba9a4000}, {0xba9a6000}, - {0xba9a8000}, {0xba9aa000}, {0xba9ac000}, {0xba9ae000}, - {0xba9b0000}, {0xba9b2000}, {0xba9b4000}, {0xba9b6000}, - {0xba9b8000}, {0xba9ba000}, {0xba9bc000}, {0xba9be000}, - {0xba9c0000}, {0xba9c2000}, {0xba9c4000}, {0xba9c6000}, - {0xba9c8000}, {0xba9ca000}, {0xba9cc000}, {0xba9ce000}, - {0xba9d0000}, {0xba9d2000}, {0xba9d4000}, {0xba9d6000}, - {0xba9d8000}, {0xba9da000}, {0xba9dc000}, {0xba9de000}, - {0xba9e0000}, {0xba9e2000}, {0xba9e4000}, {0xba9e6000}, - {0xba9e8000}, {0xba9ea000}, {0xba9ec000}, {0xba9ee000}, - {0xba9f0000}, {0xba9f2000}, {0xba9f4000}, {0xba9f6000}, - {0xba9f8000}, {0xba9fa000}, {0xba9fc000}, {0xba9fe000}, - {0xbaa00000}, {0xbaa02000}, {0xbaa04000}, {0xbaa06000}, - {0xbaa08000}, {0xbaa0a000}, {0xbaa0c000}, {0xbaa0e000}, - {0xbaa10000}, {0xbaa12000}, {0xbaa14000}, {0xbaa16000}, - {0xbaa18000}, {0xbaa1a000}, {0xbaa1c000}, {0xbaa1e000}, - {0xbaa20000}, {0xbaa22000}, {0xbaa24000}, {0xbaa26000}, - {0xbaa28000}, {0xbaa2a000}, {0xbaa2c000}, {0xbaa2e000}, - {0xbaa30000}, {0xbaa32000}, {0xbaa34000}, {0xbaa36000}, - {0xbaa38000}, {0xbaa3a000}, {0xbaa3c000}, {0xbaa3e000}, - {0xbaa40000}, {0xbaa42000}, {0xbaa44000}, {0xbaa46000}, - {0xbaa48000}, {0xbaa4a000}, {0xbaa4c000}, {0xbaa4e000}, - {0xbaa50000}, {0xbaa52000}, {0xbaa54000}, {0xbaa56000}, - {0xbaa58000}, {0xbaa5a000}, {0xbaa5c000}, {0xbaa5e000}, - {0xbaa60000}, {0xbaa62000}, {0xbaa64000}, {0xbaa66000}, - {0xbaa68000}, {0xbaa6a000}, {0xbaa6c000}, {0xbaa6e000}, - {0xbaa70000}, {0xbaa72000}, {0xbaa74000}, {0xbaa76000}, - {0xbaa78000}, {0xbaa7a000}, {0xbaa7c000}, {0xbaa7e000}, - {0xbaa80000}, {0xbaa82000}, {0xbaa84000}, {0xbaa86000}, - {0xbaa88000}, {0xbaa8a000}, {0xbaa8c000}, {0xbaa8e000}, - {0xbaa90000}, {0xbaa92000}, {0xbaa94000}, {0xbaa96000}, - {0xbaa98000}, {0xbaa9a000}, {0xbaa9c000}, {0xbaa9e000}, - {0xbaaa0000}, {0xbaaa2000}, {0xbaaa4000}, {0xbaaa6000}, - {0xbaaa8000}, {0xbaaaa000}, {0xbaaac000}, {0xbaaae000}, - {0xbaab0000}, {0xbaab2000}, {0xbaab4000}, {0xbaab6000}, - {0xbaab8000}, {0xbaaba000}, {0xbaabc000}, {0xbaabe000}, - {0xbaac0000}, {0xbaac2000}, {0xbaac4000}, {0xbaac6000}, - {0xbaac8000}, {0xbaaca000}, {0xbaacc000}, {0xbaace000}, - {0xbaad0000}, {0xbaad2000}, {0xbaad4000}, {0xbaad6000}, - {0xbaad8000}, {0xbaada000}, {0xbaadc000}, {0xbaade000}, - {0xbaae0000}, {0xbaae2000}, {0xbaae4000}, {0xbaae6000}, - {0xbaae8000}, {0xbaaea000}, {0xbaaec000}, {0xbaaee000}, - {0xbaaf0000}, {0xbaaf2000}, {0xbaaf4000}, {0xbaaf6000}, - {0xbaaf8000}, {0xbaafa000}, {0xbaafc000}, {0xbaafe000}, - {0xbab00000}, {0xbab02000}, {0xbab04000}, {0xbab06000}, - {0xbab08000}, {0xbab0a000}, {0xbab0c000}, {0xbab0e000}, - {0xbab10000}, {0xbab12000}, {0xbab14000}, {0xbab16000}, - {0xbab18000}, {0xbab1a000}, {0xbab1c000}, {0xbab1e000}, - {0xbab20000}, {0xbab22000}, {0xbab24000}, {0xbab26000}, - {0xbab28000}, {0xbab2a000}, {0xbab2c000}, {0xbab2e000}, - {0xbab30000}, {0xbab32000}, {0xbab34000}, {0xbab36000}, - {0xbab38000}, {0xbab3a000}, {0xbab3c000}, {0xbab3e000}, - {0xbab40000}, {0xbab42000}, {0xbab44000}, {0xbab46000}, - {0xbab48000}, {0xbab4a000}, {0xbab4c000}, {0xbab4e000}, - {0xbab50000}, {0xbab52000}, {0xbab54000}, {0xbab56000}, - {0xbab58000}, {0xbab5a000}, {0xbab5c000}, {0xbab5e000}, - {0xbab60000}, {0xbab62000}, {0xbab64000}, {0xbab66000}, - {0xbab68000}, {0xbab6a000}, {0xbab6c000}, {0xbab6e000}, - {0xbab70000}, {0xbab72000}, {0xbab74000}, {0xbab76000}, - {0xbab78000}, {0xbab7a000}, {0xbab7c000}, {0xbab7e000}, - {0xbab80000}, {0xbab82000}, {0xbab84000}, {0xbab86000}, - {0xbab88000}, {0xbab8a000}, {0xbab8c000}, {0xbab8e000}, - {0xbab90000}, {0xbab92000}, {0xbab94000}, {0xbab96000}, - {0xbab98000}, {0xbab9a000}, {0xbab9c000}, {0xbab9e000}, - {0xbaba0000}, {0xbaba2000}, {0xbaba4000}, {0xbaba6000}, - {0xbaba8000}, {0xbabaa000}, {0xbabac000}, {0xbabae000}, - {0xbabb0000}, {0xbabb2000}, {0xbabb4000}, {0xbabb6000}, - {0xbabb8000}, {0xbabba000}, {0xbabbc000}, {0xbabbe000}, - {0xbabc0000}, {0xbabc2000}, {0xbabc4000}, {0xbabc6000}, - {0xbabc8000}, {0xbabca000}, {0xbabcc000}, {0xbabce000}, - {0xbabd0000}, {0xbabd2000}, {0xbabd4000}, {0xbabd6000}, - {0xbabd8000}, {0xbabda000}, {0xbabdc000}, {0xbabde000}, - {0xbabe0000}, {0xbabe2000}, {0xbabe4000}, {0xbabe6000}, - {0xbabe8000}, {0xbabea000}, {0xbabec000}, {0xbabee000}, - {0xbabf0000}, {0xbabf2000}, {0xbabf4000}, {0xbabf6000}, - {0xbabf8000}, {0xbabfa000}, {0xbabfc000}, {0xbabfe000}, - {0xbac00000}, {0xbac02000}, {0xbac04000}, {0xbac06000}, - {0xbac08000}, {0xbac0a000}, {0xbac0c000}, {0xbac0e000}, - {0xbac10000}, {0xbac12000}, {0xbac14000}, {0xbac16000}, - {0xbac18000}, {0xbac1a000}, {0xbac1c000}, {0xbac1e000}, - {0xbac20000}, {0xbac22000}, {0xbac24000}, {0xbac26000}, - {0xbac28000}, {0xbac2a000}, {0xbac2c000}, {0xbac2e000}, - {0xbac30000}, {0xbac32000}, {0xbac34000}, {0xbac36000}, - {0xbac38000}, {0xbac3a000}, {0xbac3c000}, {0xbac3e000}, - {0xbac40000}, {0xbac42000}, {0xbac44000}, {0xbac46000}, - {0xbac48000}, {0xbac4a000}, {0xbac4c000}, {0xbac4e000}, - {0xbac50000}, {0xbac52000}, {0xbac54000}, {0xbac56000}, - {0xbac58000}, {0xbac5a000}, {0xbac5c000}, {0xbac5e000}, - {0xbac60000}, {0xbac62000}, {0xbac64000}, {0xbac66000}, - {0xbac68000}, {0xbac6a000}, {0xbac6c000}, {0xbac6e000}, - {0xbac70000}, {0xbac72000}, {0xbac74000}, {0xbac76000}, - {0xbac78000}, {0xbac7a000}, {0xbac7c000}, {0xbac7e000}, - {0xbac80000}, {0xbac82000}, {0xbac84000}, {0xbac86000}, - {0xbac88000}, {0xbac8a000}, {0xbac8c000}, {0xbac8e000}, - {0xbac90000}, {0xbac92000}, {0xbac94000}, {0xbac96000}, - {0xbac98000}, {0xbac9a000}, {0xbac9c000}, {0xbac9e000}, - {0xbaca0000}, {0xbaca2000}, {0xbaca4000}, {0xbaca6000}, - {0xbaca8000}, {0xbacaa000}, {0xbacac000}, {0xbacae000}, - {0xbacb0000}, {0xbacb2000}, {0xbacb4000}, {0xbacb6000}, - {0xbacb8000}, {0xbacba000}, {0xbacbc000}, {0xbacbe000}, - {0xbacc0000}, {0xbacc2000}, {0xbacc4000}, {0xbacc6000}, - {0xbacc8000}, {0xbacca000}, {0xbaccc000}, {0xbacce000}, - {0xbacd0000}, {0xbacd2000}, {0xbacd4000}, {0xbacd6000}, - {0xbacd8000}, {0xbacda000}, {0xbacdc000}, {0xbacde000}, - {0xbace0000}, {0xbace2000}, {0xbace4000}, {0xbace6000}, - {0xbace8000}, {0xbacea000}, {0xbacec000}, {0xbacee000}, - {0xbacf0000}, {0xbacf2000}, {0xbacf4000}, {0xbacf6000}, - {0xbacf8000}, {0xbacfa000}, {0xbacfc000}, {0xbacfe000}, - {0xbad00000}, {0xbad02000}, {0xbad04000}, {0xbad06000}, - {0xbad08000}, {0xbad0a000}, {0xbad0c000}, {0xbad0e000}, - {0xbad10000}, {0xbad12000}, {0xbad14000}, {0xbad16000}, - {0xbad18000}, {0xbad1a000}, {0xbad1c000}, {0xbad1e000}, - {0xbad20000}, {0xbad22000}, {0xbad24000}, {0xbad26000}, - {0xbad28000}, {0xbad2a000}, {0xbad2c000}, {0xbad2e000}, - {0xbad30000}, {0xbad32000}, {0xbad34000}, {0xbad36000}, - {0xbad38000}, {0xbad3a000}, {0xbad3c000}, {0xbad3e000}, - {0xbad40000}, {0xbad42000}, {0xbad44000}, {0xbad46000}, - {0xbad48000}, {0xbad4a000}, {0xbad4c000}, {0xbad4e000}, - {0xbad50000}, {0xbad52000}, {0xbad54000}, {0xbad56000}, - {0xbad58000}, {0xbad5a000}, {0xbad5c000}, {0xbad5e000}, - {0xbad60000}, {0xbad62000}, {0xbad64000}, {0xbad66000}, - {0xbad68000}, {0xbad6a000}, {0xbad6c000}, {0xbad6e000}, - {0xbad70000}, {0xbad72000}, {0xbad74000}, {0xbad76000}, - {0xbad78000}, {0xbad7a000}, {0xbad7c000}, {0xbad7e000}, - {0xbad80000}, {0xbad82000}, {0xbad84000}, {0xbad86000}, - {0xbad88000}, {0xbad8a000}, {0xbad8c000}, {0xbad8e000}, - {0xbad90000}, {0xbad92000}, {0xbad94000}, {0xbad96000}, - {0xbad98000}, {0xbad9a000}, {0xbad9c000}, {0xbad9e000}, - {0xbada0000}, {0xbada2000}, {0xbada4000}, {0xbada6000}, - {0xbada8000}, {0xbadaa000}, {0xbadac000}, {0xbadae000}, - {0xbadb0000}, {0xbadb2000}, {0xbadb4000}, {0xbadb6000}, - {0xbadb8000}, {0xbadba000}, {0xbadbc000}, {0xbadbe000}, - {0xbadc0000}, {0xbadc2000}, {0xbadc4000}, {0xbadc6000}, - {0xbadc8000}, {0xbadca000}, {0xbadcc000}, {0xbadce000}, - {0xbadd0000}, {0xbadd2000}, {0xbadd4000}, {0xbadd6000}, - {0xbadd8000}, {0xbadda000}, {0xbaddc000}, {0xbadde000}, - {0xbade0000}, {0xbade2000}, {0xbade4000}, {0xbade6000}, - {0xbade8000}, {0xbadea000}, {0xbadec000}, {0xbadee000}, - {0xbadf0000}, {0xbadf2000}, {0xbadf4000}, {0xbadf6000}, - {0xbadf8000}, {0xbadfa000}, {0xbadfc000}, {0xbadfe000}, - {0xbae00000}, {0xbae02000}, {0xbae04000}, {0xbae06000}, - {0xbae08000}, {0xbae0a000}, {0xbae0c000}, {0xbae0e000}, - {0xbae10000}, {0xbae12000}, {0xbae14000}, {0xbae16000}, - {0xbae18000}, {0xbae1a000}, {0xbae1c000}, {0xbae1e000}, - {0xbae20000}, {0xbae22000}, {0xbae24000}, {0xbae26000}, - {0xbae28000}, {0xbae2a000}, {0xbae2c000}, {0xbae2e000}, - {0xbae30000}, {0xbae32000}, {0xbae34000}, {0xbae36000}, - {0xbae38000}, {0xbae3a000}, {0xbae3c000}, {0xbae3e000}, - {0xbae40000}, {0xbae42000}, {0xbae44000}, {0xbae46000}, - {0xbae48000}, {0xbae4a000}, {0xbae4c000}, {0xbae4e000}, - {0xbae50000}, {0xbae52000}, {0xbae54000}, {0xbae56000}, - {0xbae58000}, {0xbae5a000}, {0xbae5c000}, {0xbae5e000}, - {0xbae60000}, {0xbae62000}, {0xbae64000}, {0xbae66000}, - {0xbae68000}, {0xbae6a000}, {0xbae6c000}, {0xbae6e000}, - {0xbae70000}, {0xbae72000}, {0xbae74000}, {0xbae76000}, - {0xbae78000}, {0xbae7a000}, {0xbae7c000}, {0xbae7e000}, - {0xbae80000}, {0xbae82000}, {0xbae84000}, {0xbae86000}, - {0xbae88000}, {0xbae8a000}, {0xbae8c000}, {0xbae8e000}, - {0xbae90000}, {0xbae92000}, {0xbae94000}, {0xbae96000}, - {0xbae98000}, {0xbae9a000}, {0xbae9c000}, {0xbae9e000}, - {0xbaea0000}, {0xbaea2000}, {0xbaea4000}, {0xbaea6000}, - {0xbaea8000}, {0xbaeaa000}, {0xbaeac000}, {0xbaeae000}, - {0xbaeb0000}, {0xbaeb2000}, {0xbaeb4000}, {0xbaeb6000}, - {0xbaeb8000}, {0xbaeba000}, {0xbaebc000}, {0xbaebe000}, - {0xbaec0000}, {0xbaec2000}, {0xbaec4000}, {0xbaec6000}, - {0xbaec8000}, {0xbaeca000}, {0xbaecc000}, {0xbaece000}, - {0xbaed0000}, {0xbaed2000}, {0xbaed4000}, {0xbaed6000}, - {0xbaed8000}, {0xbaeda000}, {0xbaedc000}, {0xbaede000}, - {0xbaee0000}, {0xbaee2000}, {0xbaee4000}, {0xbaee6000}, - {0xbaee8000}, {0xbaeea000}, {0xbaeec000}, {0xbaeee000}, - {0xbaef0000}, {0xbaef2000}, {0xbaef4000}, {0xbaef6000}, - {0xbaef8000}, {0xbaefa000}, {0xbaefc000}, {0xbaefe000}, - {0xbaf00000}, {0xbaf02000}, {0xbaf04000}, {0xbaf06000}, - {0xbaf08000}, {0xbaf0a000}, {0xbaf0c000}, {0xbaf0e000}, - {0xbaf10000}, {0xbaf12000}, {0xbaf14000}, {0xbaf16000}, - {0xbaf18000}, {0xbaf1a000}, {0xbaf1c000}, {0xbaf1e000}, - {0xbaf20000}, {0xbaf22000}, {0xbaf24000}, {0xbaf26000}, - {0xbaf28000}, {0xbaf2a000}, {0xbaf2c000}, {0xbaf2e000}, - {0xbaf30000}, {0xbaf32000}, {0xbaf34000}, {0xbaf36000}, - {0xbaf38000}, {0xbaf3a000}, {0xbaf3c000}, {0xbaf3e000}, - {0xbaf40000}, {0xbaf42000}, {0xbaf44000}, {0xbaf46000}, - {0xbaf48000}, {0xbaf4a000}, {0xbaf4c000}, {0xbaf4e000}, - {0xbaf50000}, {0xbaf52000}, {0xbaf54000}, {0xbaf56000}, - {0xbaf58000}, {0xbaf5a000}, {0xbaf5c000}, {0xbaf5e000}, - {0xbaf60000}, {0xbaf62000}, {0xbaf64000}, {0xbaf66000}, - {0xbaf68000}, {0xbaf6a000}, {0xbaf6c000}, {0xbaf6e000}, - {0xbaf70000}, {0xbaf72000}, {0xbaf74000}, {0xbaf76000}, - {0xbaf78000}, {0xbaf7a000}, {0xbaf7c000}, {0xbaf7e000}, - {0xbaf80000}, {0xbaf82000}, {0xbaf84000}, {0xbaf86000}, - {0xbaf88000}, {0xbaf8a000}, {0xbaf8c000}, {0xbaf8e000}, - {0xbaf90000}, {0xbaf92000}, {0xbaf94000}, {0xbaf96000}, - {0xbaf98000}, {0xbaf9a000}, {0xbaf9c000}, {0xbaf9e000}, - {0xbafa0000}, {0xbafa2000}, {0xbafa4000}, {0xbafa6000}, - {0xbafa8000}, {0xbafaa000}, {0xbafac000}, {0xbafae000}, - {0xbafb0000}, {0xbafb2000}, {0xbafb4000}, {0xbafb6000}, - {0xbafb8000}, {0xbafba000}, {0xbafbc000}, {0xbafbe000}, - {0xbafc0000}, {0xbafc2000}, {0xbafc4000}, {0xbafc6000}, - {0xbafc8000}, {0xbafca000}, {0xbafcc000}, {0xbafce000}, - {0xbafd0000}, {0xbafd2000}, {0xbafd4000}, {0xbafd6000}, - {0xbafd8000}, {0xbafda000}, {0xbafdc000}, {0xbafde000}, - {0xbafe0000}, {0xbafe2000}, {0xbafe4000}, {0xbafe6000}, - {0xbafe8000}, {0xbafea000}, {0xbafec000}, {0xbafee000}, - {0xbaff0000}, {0xbaff2000}, {0xbaff4000}, {0xbaff6000}, - {0xbaff8000}, {0xbaffa000}, {0xbaffc000}, {0xbaffe000}, - {0xbb000000}, {0xbb002000}, {0xbb004000}, {0xbb006000}, - {0xbb008000}, {0xbb00a000}, {0xbb00c000}, {0xbb00e000}, - {0xbb010000}, {0xbb012000}, {0xbb014000}, {0xbb016000}, - {0xbb018000}, {0xbb01a000}, {0xbb01c000}, {0xbb01e000}, - {0xbb020000}, {0xbb022000}, {0xbb024000}, {0xbb026000}, - {0xbb028000}, {0xbb02a000}, {0xbb02c000}, {0xbb02e000}, - {0xbb030000}, {0xbb032000}, {0xbb034000}, {0xbb036000}, - {0xbb038000}, {0xbb03a000}, {0xbb03c000}, {0xbb03e000}, - {0xbb040000}, {0xbb042000}, {0xbb044000}, {0xbb046000}, - {0xbb048000}, {0xbb04a000}, {0xbb04c000}, {0xbb04e000}, - {0xbb050000}, {0xbb052000}, {0xbb054000}, {0xbb056000}, - {0xbb058000}, {0xbb05a000}, {0xbb05c000}, {0xbb05e000}, - {0xbb060000}, {0xbb062000}, {0xbb064000}, {0xbb066000}, - {0xbb068000}, {0xbb06a000}, {0xbb06c000}, {0xbb06e000}, - {0xbb070000}, {0xbb072000}, {0xbb074000}, {0xbb076000}, - {0xbb078000}, {0xbb07a000}, {0xbb07c000}, {0xbb07e000}, - {0xbb080000}, {0xbb082000}, {0xbb084000}, {0xbb086000}, - {0xbb088000}, {0xbb08a000}, {0xbb08c000}, {0xbb08e000}, - {0xbb090000}, {0xbb092000}, {0xbb094000}, {0xbb096000}, - {0xbb098000}, {0xbb09a000}, {0xbb09c000}, {0xbb09e000}, - {0xbb0a0000}, {0xbb0a2000}, {0xbb0a4000}, {0xbb0a6000}, - {0xbb0a8000}, {0xbb0aa000}, {0xbb0ac000}, {0xbb0ae000}, - {0xbb0b0000}, {0xbb0b2000}, {0xbb0b4000}, {0xbb0b6000}, - {0xbb0b8000}, {0xbb0ba000}, {0xbb0bc000}, {0xbb0be000}, - {0xbb0c0000}, {0xbb0c2000}, {0xbb0c4000}, {0xbb0c6000}, - {0xbb0c8000}, {0xbb0ca000}, {0xbb0cc000}, {0xbb0ce000}, - {0xbb0d0000}, {0xbb0d2000}, {0xbb0d4000}, {0xbb0d6000}, - {0xbb0d8000}, {0xbb0da000}, {0xbb0dc000}, {0xbb0de000}, - {0xbb0e0000}, {0xbb0e2000}, {0xbb0e4000}, {0xbb0e6000}, - {0xbb0e8000}, {0xbb0ea000}, {0xbb0ec000}, {0xbb0ee000}, - {0xbb0f0000}, {0xbb0f2000}, {0xbb0f4000}, {0xbb0f6000}, - {0xbb0f8000}, {0xbb0fa000}, {0xbb0fc000}, {0xbb0fe000}, - {0xbb100000}, {0xbb102000}, {0xbb104000}, {0xbb106000}, - {0xbb108000}, {0xbb10a000}, {0xbb10c000}, {0xbb10e000}, - {0xbb110000}, {0xbb112000}, {0xbb114000}, {0xbb116000}, - {0xbb118000}, {0xbb11a000}, {0xbb11c000}, {0xbb11e000}, - {0xbb120000}, {0xbb122000}, {0xbb124000}, {0xbb126000}, - {0xbb128000}, {0xbb12a000}, {0xbb12c000}, {0xbb12e000}, - {0xbb130000}, {0xbb132000}, {0xbb134000}, {0xbb136000}, - {0xbb138000}, {0xbb13a000}, {0xbb13c000}, {0xbb13e000}, - {0xbb140000}, {0xbb142000}, {0xbb144000}, {0xbb146000}, - {0xbb148000}, {0xbb14a000}, {0xbb14c000}, {0xbb14e000}, - {0xbb150000}, {0xbb152000}, {0xbb154000}, {0xbb156000}, - {0xbb158000}, {0xbb15a000}, {0xbb15c000}, {0xbb15e000}, - {0xbb160000}, {0xbb162000}, {0xbb164000}, {0xbb166000}, - {0xbb168000}, {0xbb16a000}, {0xbb16c000}, {0xbb16e000}, - {0xbb170000}, {0xbb172000}, {0xbb174000}, {0xbb176000}, - {0xbb178000}, {0xbb17a000}, {0xbb17c000}, {0xbb17e000}, - {0xbb180000}, {0xbb182000}, {0xbb184000}, {0xbb186000}, - {0xbb188000}, {0xbb18a000}, {0xbb18c000}, {0xbb18e000}, - {0xbb190000}, {0xbb192000}, {0xbb194000}, {0xbb196000}, - {0xbb198000}, {0xbb19a000}, {0xbb19c000}, {0xbb19e000}, - {0xbb1a0000}, {0xbb1a2000}, {0xbb1a4000}, {0xbb1a6000}, - {0xbb1a8000}, {0xbb1aa000}, {0xbb1ac000}, {0xbb1ae000}, - {0xbb1b0000}, {0xbb1b2000}, {0xbb1b4000}, {0xbb1b6000}, - {0xbb1b8000}, {0xbb1ba000}, {0xbb1bc000}, {0xbb1be000}, - {0xbb1c0000}, {0xbb1c2000}, {0xbb1c4000}, {0xbb1c6000}, - {0xbb1c8000}, {0xbb1ca000}, {0xbb1cc000}, {0xbb1ce000}, - {0xbb1d0000}, {0xbb1d2000}, {0xbb1d4000}, {0xbb1d6000}, - {0xbb1d8000}, {0xbb1da000}, {0xbb1dc000}, {0xbb1de000}, - {0xbb1e0000}, {0xbb1e2000}, {0xbb1e4000}, {0xbb1e6000}, - {0xbb1e8000}, {0xbb1ea000}, {0xbb1ec000}, {0xbb1ee000}, - {0xbb1f0000}, {0xbb1f2000}, {0xbb1f4000}, {0xbb1f6000}, - {0xbb1f8000}, {0xbb1fa000}, {0xbb1fc000}, {0xbb1fe000}, - {0xbb200000}, {0xbb202000}, {0xbb204000}, {0xbb206000}, - {0xbb208000}, {0xbb20a000}, {0xbb20c000}, {0xbb20e000}, - {0xbb210000}, {0xbb212000}, {0xbb214000}, {0xbb216000}, - {0xbb218000}, {0xbb21a000}, {0xbb21c000}, {0xbb21e000}, - {0xbb220000}, {0xbb222000}, {0xbb224000}, {0xbb226000}, - {0xbb228000}, {0xbb22a000}, {0xbb22c000}, {0xbb22e000}, - {0xbb230000}, {0xbb232000}, {0xbb234000}, {0xbb236000}, - {0xbb238000}, {0xbb23a000}, {0xbb23c000}, {0xbb23e000}, - {0xbb240000}, {0xbb242000}, {0xbb244000}, {0xbb246000}, - {0xbb248000}, {0xbb24a000}, {0xbb24c000}, {0xbb24e000}, - {0xbb250000}, {0xbb252000}, {0xbb254000}, {0xbb256000}, - {0xbb258000}, {0xbb25a000}, {0xbb25c000}, {0xbb25e000}, - {0xbb260000}, {0xbb262000}, {0xbb264000}, {0xbb266000}, - {0xbb268000}, {0xbb26a000}, {0xbb26c000}, {0xbb26e000}, - {0xbb270000}, {0xbb272000}, {0xbb274000}, {0xbb276000}, - {0xbb278000}, {0xbb27a000}, {0xbb27c000}, {0xbb27e000}, - {0xbb280000}, {0xbb282000}, {0xbb284000}, {0xbb286000}, - {0xbb288000}, {0xbb28a000}, {0xbb28c000}, {0xbb28e000}, - {0xbb290000}, {0xbb292000}, {0xbb294000}, {0xbb296000}, - {0xbb298000}, {0xbb29a000}, {0xbb29c000}, {0xbb29e000}, - {0xbb2a0000}, {0xbb2a2000}, {0xbb2a4000}, {0xbb2a6000}, - {0xbb2a8000}, {0xbb2aa000}, {0xbb2ac000}, {0xbb2ae000}, - {0xbb2b0000}, {0xbb2b2000}, {0xbb2b4000}, {0xbb2b6000}, - {0xbb2b8000}, {0xbb2ba000}, {0xbb2bc000}, {0xbb2be000}, - {0xbb2c0000}, {0xbb2c2000}, {0xbb2c4000}, {0xbb2c6000}, - {0xbb2c8000}, {0xbb2ca000}, {0xbb2cc000}, {0xbb2ce000}, - {0xbb2d0000}, {0xbb2d2000}, {0xbb2d4000}, {0xbb2d6000}, - {0xbb2d8000}, {0xbb2da000}, {0xbb2dc000}, {0xbb2de000}, - {0xbb2e0000}, {0xbb2e2000}, {0xbb2e4000}, {0xbb2e6000}, - {0xbb2e8000}, {0xbb2ea000}, {0xbb2ec000}, {0xbb2ee000}, - {0xbb2f0000}, {0xbb2f2000}, {0xbb2f4000}, {0xbb2f6000}, - {0xbb2f8000}, {0xbb2fa000}, {0xbb2fc000}, {0xbb2fe000}, - {0xbb300000}, {0xbb302000}, {0xbb304000}, {0xbb306000}, - {0xbb308000}, {0xbb30a000}, {0xbb30c000}, {0xbb30e000}, - {0xbb310000}, {0xbb312000}, {0xbb314000}, {0xbb316000}, - {0xbb318000}, {0xbb31a000}, {0xbb31c000}, {0xbb31e000}, - {0xbb320000}, {0xbb322000}, {0xbb324000}, {0xbb326000}, - {0xbb328000}, {0xbb32a000}, {0xbb32c000}, {0xbb32e000}, - {0xbb330000}, {0xbb332000}, {0xbb334000}, {0xbb336000}, - {0xbb338000}, {0xbb33a000}, {0xbb33c000}, {0xbb33e000}, - {0xbb340000}, {0xbb342000}, {0xbb344000}, {0xbb346000}, - {0xbb348000}, {0xbb34a000}, {0xbb34c000}, {0xbb34e000}, - {0xbb350000}, {0xbb352000}, {0xbb354000}, {0xbb356000}, - {0xbb358000}, {0xbb35a000}, {0xbb35c000}, {0xbb35e000}, - {0xbb360000}, {0xbb362000}, {0xbb364000}, {0xbb366000}, - {0xbb368000}, {0xbb36a000}, {0xbb36c000}, {0xbb36e000}, - {0xbb370000}, {0xbb372000}, {0xbb374000}, {0xbb376000}, - {0xbb378000}, {0xbb37a000}, {0xbb37c000}, {0xbb37e000}, - {0xbb380000}, {0xbb382000}, {0xbb384000}, {0xbb386000}, - {0xbb388000}, {0xbb38a000}, {0xbb38c000}, {0xbb38e000}, - {0xbb390000}, {0xbb392000}, {0xbb394000}, {0xbb396000}, - {0xbb398000}, {0xbb39a000}, {0xbb39c000}, {0xbb39e000}, - {0xbb3a0000}, {0xbb3a2000}, {0xbb3a4000}, {0xbb3a6000}, - {0xbb3a8000}, {0xbb3aa000}, {0xbb3ac000}, {0xbb3ae000}, - {0xbb3b0000}, {0xbb3b2000}, {0xbb3b4000}, {0xbb3b6000}, - {0xbb3b8000}, {0xbb3ba000}, {0xbb3bc000}, {0xbb3be000}, - {0xbb3c0000}, {0xbb3c2000}, {0xbb3c4000}, {0xbb3c6000}, - {0xbb3c8000}, {0xbb3ca000}, {0xbb3cc000}, {0xbb3ce000}, - {0xbb3d0000}, {0xbb3d2000}, {0xbb3d4000}, {0xbb3d6000}, - {0xbb3d8000}, {0xbb3da000}, {0xbb3dc000}, {0xbb3de000}, - {0xbb3e0000}, {0xbb3e2000}, {0xbb3e4000}, {0xbb3e6000}, - {0xbb3e8000}, {0xbb3ea000}, {0xbb3ec000}, {0xbb3ee000}, - {0xbb3f0000}, {0xbb3f2000}, {0xbb3f4000}, {0xbb3f6000}, - {0xbb3f8000}, {0xbb3fa000}, {0xbb3fc000}, {0xbb3fe000}, - {0xbb400000}, {0xbb402000}, {0xbb404000}, {0xbb406000}, - {0xbb408000}, {0xbb40a000}, {0xbb40c000}, {0xbb40e000}, - {0xbb410000}, {0xbb412000}, {0xbb414000}, {0xbb416000}, - {0xbb418000}, {0xbb41a000}, {0xbb41c000}, {0xbb41e000}, - {0xbb420000}, {0xbb422000}, {0xbb424000}, {0xbb426000}, - {0xbb428000}, {0xbb42a000}, {0xbb42c000}, {0xbb42e000}, - {0xbb430000}, {0xbb432000}, {0xbb434000}, {0xbb436000}, - {0xbb438000}, {0xbb43a000}, {0xbb43c000}, {0xbb43e000}, - {0xbb440000}, {0xbb442000}, {0xbb444000}, {0xbb446000}, - {0xbb448000}, {0xbb44a000}, {0xbb44c000}, {0xbb44e000}, - {0xbb450000}, {0xbb452000}, {0xbb454000}, {0xbb456000}, - {0xbb458000}, {0xbb45a000}, {0xbb45c000}, {0xbb45e000}, - {0xbb460000}, {0xbb462000}, {0xbb464000}, {0xbb466000}, - {0xbb468000}, {0xbb46a000}, {0xbb46c000}, {0xbb46e000}, - {0xbb470000}, {0xbb472000}, {0xbb474000}, {0xbb476000}, - {0xbb478000}, {0xbb47a000}, {0xbb47c000}, {0xbb47e000}, - {0xbb480000}, {0xbb482000}, {0xbb484000}, {0xbb486000}, - {0xbb488000}, {0xbb48a000}, {0xbb48c000}, {0xbb48e000}, - {0xbb490000}, {0xbb492000}, {0xbb494000}, {0xbb496000}, - {0xbb498000}, {0xbb49a000}, {0xbb49c000}, {0xbb49e000}, - {0xbb4a0000}, {0xbb4a2000}, {0xbb4a4000}, {0xbb4a6000}, - {0xbb4a8000}, {0xbb4aa000}, {0xbb4ac000}, {0xbb4ae000}, - {0xbb4b0000}, {0xbb4b2000}, {0xbb4b4000}, {0xbb4b6000}, - {0xbb4b8000}, {0xbb4ba000}, {0xbb4bc000}, {0xbb4be000}, - {0xbb4c0000}, {0xbb4c2000}, {0xbb4c4000}, {0xbb4c6000}, - {0xbb4c8000}, {0xbb4ca000}, {0xbb4cc000}, {0xbb4ce000}, - {0xbb4d0000}, {0xbb4d2000}, {0xbb4d4000}, {0xbb4d6000}, - {0xbb4d8000}, {0xbb4da000}, {0xbb4dc000}, {0xbb4de000}, - {0xbb4e0000}, {0xbb4e2000}, {0xbb4e4000}, {0xbb4e6000}, - {0xbb4e8000}, {0xbb4ea000}, {0xbb4ec000}, {0xbb4ee000}, - {0xbb4f0000}, {0xbb4f2000}, {0xbb4f4000}, {0xbb4f6000}, - {0xbb4f8000}, {0xbb4fa000}, {0xbb4fc000}, {0xbb4fe000}, - {0xbb500000}, {0xbb502000}, {0xbb504000}, {0xbb506000}, - {0xbb508000}, {0xbb50a000}, {0xbb50c000}, {0xbb50e000}, - {0xbb510000}, {0xbb512000}, {0xbb514000}, {0xbb516000}, - {0xbb518000}, {0xbb51a000}, {0xbb51c000}, {0xbb51e000}, - {0xbb520000}, {0xbb522000}, {0xbb524000}, {0xbb526000}, - {0xbb528000}, {0xbb52a000}, {0xbb52c000}, {0xbb52e000}, - {0xbb530000}, {0xbb532000}, {0xbb534000}, {0xbb536000}, - {0xbb538000}, {0xbb53a000}, {0xbb53c000}, {0xbb53e000}, - {0xbb540000}, {0xbb542000}, {0xbb544000}, {0xbb546000}, - {0xbb548000}, {0xbb54a000}, {0xbb54c000}, {0xbb54e000}, - {0xbb550000}, {0xbb552000}, {0xbb554000}, {0xbb556000}, - {0xbb558000}, {0xbb55a000}, {0xbb55c000}, {0xbb55e000}, - {0xbb560000}, {0xbb562000}, {0xbb564000}, {0xbb566000}, - {0xbb568000}, {0xbb56a000}, {0xbb56c000}, {0xbb56e000}, - {0xbb570000}, {0xbb572000}, {0xbb574000}, {0xbb576000}, - {0xbb578000}, {0xbb57a000}, {0xbb57c000}, {0xbb57e000}, - {0xbb580000}, {0xbb582000}, {0xbb584000}, {0xbb586000}, - {0xbb588000}, {0xbb58a000}, {0xbb58c000}, {0xbb58e000}, - {0xbb590000}, {0xbb592000}, {0xbb594000}, {0xbb596000}, - {0xbb598000}, {0xbb59a000}, {0xbb59c000}, {0xbb59e000}, - {0xbb5a0000}, {0xbb5a2000}, {0xbb5a4000}, {0xbb5a6000}, - {0xbb5a8000}, {0xbb5aa000}, {0xbb5ac000}, {0xbb5ae000}, - {0xbb5b0000}, {0xbb5b2000}, {0xbb5b4000}, {0xbb5b6000}, - {0xbb5b8000}, {0xbb5ba000}, {0xbb5bc000}, {0xbb5be000}, - {0xbb5c0000}, {0xbb5c2000}, {0xbb5c4000}, {0xbb5c6000}, - {0xbb5c8000}, {0xbb5ca000}, {0xbb5cc000}, {0xbb5ce000}, - {0xbb5d0000}, {0xbb5d2000}, {0xbb5d4000}, {0xbb5d6000}, - {0xbb5d8000}, {0xbb5da000}, {0xbb5dc000}, {0xbb5de000}, - {0xbb5e0000}, {0xbb5e2000}, {0xbb5e4000}, {0xbb5e6000}, - {0xbb5e8000}, {0xbb5ea000}, {0xbb5ec000}, {0xbb5ee000}, - {0xbb5f0000}, {0xbb5f2000}, {0xbb5f4000}, {0xbb5f6000}, - {0xbb5f8000}, {0xbb5fa000}, {0xbb5fc000}, {0xbb5fe000}, - {0xbb600000}, {0xbb602000}, {0xbb604000}, {0xbb606000}, - {0xbb608000}, {0xbb60a000}, {0xbb60c000}, {0xbb60e000}, - {0xbb610000}, {0xbb612000}, {0xbb614000}, {0xbb616000}, - {0xbb618000}, {0xbb61a000}, {0xbb61c000}, {0xbb61e000}, - {0xbb620000}, {0xbb622000}, {0xbb624000}, {0xbb626000}, - {0xbb628000}, {0xbb62a000}, {0xbb62c000}, {0xbb62e000}, - {0xbb630000}, {0xbb632000}, {0xbb634000}, {0xbb636000}, - {0xbb638000}, {0xbb63a000}, {0xbb63c000}, {0xbb63e000}, - {0xbb640000}, {0xbb642000}, {0xbb644000}, {0xbb646000}, - {0xbb648000}, {0xbb64a000}, {0xbb64c000}, {0xbb64e000}, - {0xbb650000}, {0xbb652000}, {0xbb654000}, {0xbb656000}, - {0xbb658000}, {0xbb65a000}, {0xbb65c000}, {0xbb65e000}, - {0xbb660000}, {0xbb662000}, {0xbb664000}, {0xbb666000}, - {0xbb668000}, {0xbb66a000}, {0xbb66c000}, {0xbb66e000}, - {0xbb670000}, {0xbb672000}, {0xbb674000}, {0xbb676000}, - {0xbb678000}, {0xbb67a000}, {0xbb67c000}, {0xbb67e000}, - {0xbb680000}, {0xbb682000}, {0xbb684000}, {0xbb686000}, - {0xbb688000}, {0xbb68a000}, {0xbb68c000}, {0xbb68e000}, - {0xbb690000}, {0xbb692000}, {0xbb694000}, {0xbb696000}, - {0xbb698000}, {0xbb69a000}, {0xbb69c000}, {0xbb69e000}, - {0xbb6a0000}, {0xbb6a2000}, {0xbb6a4000}, {0xbb6a6000}, - {0xbb6a8000}, {0xbb6aa000}, {0xbb6ac000}, {0xbb6ae000}, - {0xbb6b0000}, {0xbb6b2000}, {0xbb6b4000}, {0xbb6b6000}, - {0xbb6b8000}, {0xbb6ba000}, {0xbb6bc000}, {0xbb6be000}, - {0xbb6c0000}, {0xbb6c2000}, {0xbb6c4000}, {0xbb6c6000}, - {0xbb6c8000}, {0xbb6ca000}, {0xbb6cc000}, {0xbb6ce000}, - {0xbb6d0000}, {0xbb6d2000}, {0xbb6d4000}, {0xbb6d6000}, - {0xbb6d8000}, {0xbb6da000}, {0xbb6dc000}, {0xbb6de000}, - {0xbb6e0000}, {0xbb6e2000}, {0xbb6e4000}, {0xbb6e6000}, - {0xbb6e8000}, {0xbb6ea000}, {0xbb6ec000}, {0xbb6ee000}, - {0xbb6f0000}, {0xbb6f2000}, {0xbb6f4000}, {0xbb6f6000}, - {0xbb6f8000}, {0xbb6fa000}, {0xbb6fc000}, {0xbb6fe000}, - {0xbb700000}, {0xbb702000}, {0xbb704000}, {0xbb706000}, - {0xbb708000}, {0xbb70a000}, {0xbb70c000}, {0xbb70e000}, - {0xbb710000}, {0xbb712000}, {0xbb714000}, {0xbb716000}, - {0xbb718000}, {0xbb71a000}, {0xbb71c000}, {0xbb71e000}, - {0xbb720000}, {0xbb722000}, {0xbb724000}, {0xbb726000}, - {0xbb728000}, {0xbb72a000}, {0xbb72c000}, {0xbb72e000}, - {0xbb730000}, {0xbb732000}, {0xbb734000}, {0xbb736000}, - {0xbb738000}, {0xbb73a000}, {0xbb73c000}, {0xbb73e000}, - {0xbb740000}, {0xbb742000}, {0xbb744000}, {0xbb746000}, - {0xbb748000}, {0xbb74a000}, {0xbb74c000}, {0xbb74e000}, - {0xbb750000}, {0xbb752000}, {0xbb754000}, {0xbb756000}, - {0xbb758000}, {0xbb75a000}, {0xbb75c000}, {0xbb75e000}, - {0xbb760000}, {0xbb762000}, {0xbb764000}, {0xbb766000}, - {0xbb768000}, {0xbb76a000}, {0xbb76c000}, {0xbb76e000}, - {0xbb770000}, {0xbb772000}, {0xbb774000}, {0xbb776000}, - {0xbb778000}, {0xbb77a000}, {0xbb77c000}, {0xbb77e000}, - {0xbb780000}, {0xbb782000}, {0xbb784000}, {0xbb786000}, - {0xbb788000}, {0xbb78a000}, {0xbb78c000}, {0xbb78e000}, - {0xbb790000}, {0xbb792000}, {0xbb794000}, {0xbb796000}, - {0xbb798000}, {0xbb79a000}, {0xbb79c000}, {0xbb79e000}, - {0xbb7a0000}, {0xbb7a2000}, {0xbb7a4000}, {0xbb7a6000}, - {0xbb7a8000}, {0xbb7aa000}, {0xbb7ac000}, {0xbb7ae000}, - {0xbb7b0000}, {0xbb7b2000}, {0xbb7b4000}, {0xbb7b6000}, - {0xbb7b8000}, {0xbb7ba000}, {0xbb7bc000}, {0xbb7be000}, - {0xbb7c0000}, {0xbb7c2000}, {0xbb7c4000}, {0xbb7c6000}, - {0xbb7c8000}, {0xbb7ca000}, {0xbb7cc000}, {0xbb7ce000}, - {0xbb7d0000}, {0xbb7d2000}, {0xbb7d4000}, {0xbb7d6000}, - {0xbb7d8000}, {0xbb7da000}, {0xbb7dc000}, {0xbb7de000}, - {0xbb7e0000}, {0xbb7e2000}, {0xbb7e4000}, {0xbb7e6000}, - {0xbb7e8000}, {0xbb7ea000}, {0xbb7ec000}, {0xbb7ee000}, - {0xbb7f0000}, {0xbb7f2000}, {0xbb7f4000}, {0xbb7f6000}, - {0xbb7f8000}, {0xbb7fa000}, {0xbb7fc000}, {0xbb7fe000}, - {0xbb800000}, {0xbb802000}, {0xbb804000}, {0xbb806000}, - {0xbb808000}, {0xbb80a000}, {0xbb80c000}, {0xbb80e000}, - {0xbb810000}, {0xbb812000}, {0xbb814000}, {0xbb816000}, - {0xbb818000}, {0xbb81a000}, {0xbb81c000}, {0xbb81e000}, - {0xbb820000}, {0xbb822000}, {0xbb824000}, {0xbb826000}, - {0xbb828000}, {0xbb82a000}, {0xbb82c000}, {0xbb82e000}, - {0xbb830000}, {0xbb832000}, {0xbb834000}, {0xbb836000}, - {0xbb838000}, {0xbb83a000}, {0xbb83c000}, {0xbb83e000}, - {0xbb840000}, {0xbb842000}, {0xbb844000}, {0xbb846000}, - {0xbb848000}, {0xbb84a000}, {0xbb84c000}, {0xbb84e000}, - {0xbb850000}, {0xbb852000}, {0xbb854000}, {0xbb856000}, - {0xbb858000}, {0xbb85a000}, {0xbb85c000}, {0xbb85e000}, - {0xbb860000}, {0xbb862000}, {0xbb864000}, {0xbb866000}, - {0xbb868000}, {0xbb86a000}, {0xbb86c000}, {0xbb86e000}, - {0xbb870000}, {0xbb872000}, {0xbb874000}, {0xbb876000}, - {0xbb878000}, {0xbb87a000}, {0xbb87c000}, {0xbb87e000}, - {0xbb880000}, {0xbb882000}, {0xbb884000}, {0xbb886000}, - {0xbb888000}, {0xbb88a000}, {0xbb88c000}, {0xbb88e000}, - {0xbb890000}, {0xbb892000}, {0xbb894000}, {0xbb896000}, - {0xbb898000}, {0xbb89a000}, {0xbb89c000}, {0xbb89e000}, - {0xbb8a0000}, {0xbb8a2000}, {0xbb8a4000}, {0xbb8a6000}, - {0xbb8a8000}, {0xbb8aa000}, {0xbb8ac000}, {0xbb8ae000}, - {0xbb8b0000}, {0xbb8b2000}, {0xbb8b4000}, {0xbb8b6000}, - {0xbb8b8000}, {0xbb8ba000}, {0xbb8bc000}, {0xbb8be000}, - {0xbb8c0000}, {0xbb8c2000}, {0xbb8c4000}, {0xbb8c6000}, - {0xbb8c8000}, {0xbb8ca000}, {0xbb8cc000}, {0xbb8ce000}, - {0xbb8d0000}, {0xbb8d2000}, {0xbb8d4000}, {0xbb8d6000}, - {0xbb8d8000}, {0xbb8da000}, {0xbb8dc000}, {0xbb8de000}, - {0xbb8e0000}, {0xbb8e2000}, {0xbb8e4000}, {0xbb8e6000}, - {0xbb8e8000}, {0xbb8ea000}, {0xbb8ec000}, {0xbb8ee000}, - {0xbb8f0000}, {0xbb8f2000}, {0xbb8f4000}, {0xbb8f6000}, - {0xbb8f8000}, {0xbb8fa000}, {0xbb8fc000}, {0xbb8fe000}, - {0xbb900000}, {0xbb902000}, {0xbb904000}, {0xbb906000}, - {0xbb908000}, {0xbb90a000}, {0xbb90c000}, {0xbb90e000}, - {0xbb910000}, {0xbb912000}, {0xbb914000}, {0xbb916000}, - {0xbb918000}, {0xbb91a000}, {0xbb91c000}, {0xbb91e000}, - {0xbb920000}, {0xbb922000}, {0xbb924000}, {0xbb926000}, - {0xbb928000}, {0xbb92a000}, {0xbb92c000}, {0xbb92e000}, - {0xbb930000}, {0xbb932000}, {0xbb934000}, {0xbb936000}, - {0xbb938000}, {0xbb93a000}, {0xbb93c000}, {0xbb93e000}, - {0xbb940000}, {0xbb942000}, {0xbb944000}, {0xbb946000}, - {0xbb948000}, {0xbb94a000}, {0xbb94c000}, {0xbb94e000}, - {0xbb950000}, {0xbb952000}, {0xbb954000}, {0xbb956000}, - {0xbb958000}, {0xbb95a000}, {0xbb95c000}, {0xbb95e000}, - {0xbb960000}, {0xbb962000}, {0xbb964000}, {0xbb966000}, - {0xbb968000}, {0xbb96a000}, {0xbb96c000}, {0xbb96e000}, - {0xbb970000}, {0xbb972000}, {0xbb974000}, {0xbb976000}, - {0xbb978000}, {0xbb97a000}, {0xbb97c000}, {0xbb97e000}, - {0xbb980000}, {0xbb982000}, {0xbb984000}, {0xbb986000}, - {0xbb988000}, {0xbb98a000}, {0xbb98c000}, {0xbb98e000}, - {0xbb990000}, {0xbb992000}, {0xbb994000}, {0xbb996000}, - {0xbb998000}, {0xbb99a000}, {0xbb99c000}, {0xbb99e000}, - {0xbb9a0000}, {0xbb9a2000}, {0xbb9a4000}, {0xbb9a6000}, - {0xbb9a8000}, {0xbb9aa000}, {0xbb9ac000}, {0xbb9ae000}, - {0xbb9b0000}, {0xbb9b2000}, {0xbb9b4000}, {0xbb9b6000}, - {0xbb9b8000}, {0xbb9ba000}, {0xbb9bc000}, {0xbb9be000}, - {0xbb9c0000}, {0xbb9c2000}, {0xbb9c4000}, {0xbb9c6000}, - {0xbb9c8000}, {0xbb9ca000}, {0xbb9cc000}, {0xbb9ce000}, - {0xbb9d0000}, {0xbb9d2000}, {0xbb9d4000}, {0xbb9d6000}, - {0xbb9d8000}, {0xbb9da000}, {0xbb9dc000}, {0xbb9de000}, - {0xbb9e0000}, {0xbb9e2000}, {0xbb9e4000}, {0xbb9e6000}, - {0xbb9e8000}, {0xbb9ea000}, {0xbb9ec000}, {0xbb9ee000}, - {0xbb9f0000}, {0xbb9f2000}, {0xbb9f4000}, {0xbb9f6000}, - {0xbb9f8000}, {0xbb9fa000}, {0xbb9fc000}, {0xbb9fe000}, - {0xbba00000}, {0xbba02000}, {0xbba04000}, {0xbba06000}, - {0xbba08000}, {0xbba0a000}, {0xbba0c000}, {0xbba0e000}, - {0xbba10000}, {0xbba12000}, {0xbba14000}, {0xbba16000}, - {0xbba18000}, {0xbba1a000}, {0xbba1c000}, {0xbba1e000}, - {0xbba20000}, {0xbba22000}, {0xbba24000}, {0xbba26000}, - {0xbba28000}, {0xbba2a000}, {0xbba2c000}, {0xbba2e000}, - {0xbba30000}, {0xbba32000}, {0xbba34000}, {0xbba36000}, - {0xbba38000}, {0xbba3a000}, {0xbba3c000}, {0xbba3e000}, - {0xbba40000}, {0xbba42000}, {0xbba44000}, {0xbba46000}, - {0xbba48000}, {0xbba4a000}, {0xbba4c000}, {0xbba4e000}, - {0xbba50000}, {0xbba52000}, {0xbba54000}, {0xbba56000}, - {0xbba58000}, {0xbba5a000}, {0xbba5c000}, {0xbba5e000}, - {0xbba60000}, {0xbba62000}, {0xbba64000}, {0xbba66000}, - {0xbba68000}, {0xbba6a000}, {0xbba6c000}, {0xbba6e000}, - {0xbba70000}, {0xbba72000}, {0xbba74000}, {0xbba76000}, - {0xbba78000}, {0xbba7a000}, {0xbba7c000}, {0xbba7e000}, - {0xbba80000}, {0xbba82000}, {0xbba84000}, {0xbba86000}, - {0xbba88000}, {0xbba8a000}, {0xbba8c000}, {0xbba8e000}, - {0xbba90000}, {0xbba92000}, {0xbba94000}, {0xbba96000}, - {0xbba98000}, {0xbba9a000}, {0xbba9c000}, {0xbba9e000}, - {0xbbaa0000}, {0xbbaa2000}, {0xbbaa4000}, {0xbbaa6000}, - {0xbbaa8000}, {0xbbaaa000}, {0xbbaac000}, {0xbbaae000}, - {0xbbab0000}, {0xbbab2000}, {0xbbab4000}, {0xbbab6000}, - {0xbbab8000}, {0xbbaba000}, {0xbbabc000}, {0xbbabe000}, - {0xbbac0000}, {0xbbac2000}, {0xbbac4000}, {0xbbac6000}, - {0xbbac8000}, {0xbbaca000}, {0xbbacc000}, {0xbbace000}, - {0xbbad0000}, {0xbbad2000}, {0xbbad4000}, {0xbbad6000}, - {0xbbad8000}, {0xbbada000}, {0xbbadc000}, {0xbbade000}, - {0xbbae0000}, {0xbbae2000}, {0xbbae4000}, {0xbbae6000}, - {0xbbae8000}, {0xbbaea000}, {0xbbaec000}, {0xbbaee000}, - {0xbbaf0000}, {0xbbaf2000}, {0xbbaf4000}, {0xbbaf6000}, - {0xbbaf8000}, {0xbbafa000}, {0xbbafc000}, {0xbbafe000}, - {0xbbb00000}, {0xbbb02000}, {0xbbb04000}, {0xbbb06000}, - {0xbbb08000}, {0xbbb0a000}, {0xbbb0c000}, {0xbbb0e000}, - {0xbbb10000}, {0xbbb12000}, {0xbbb14000}, {0xbbb16000}, - {0xbbb18000}, {0xbbb1a000}, {0xbbb1c000}, {0xbbb1e000}, - {0xbbb20000}, {0xbbb22000}, {0xbbb24000}, {0xbbb26000}, - {0xbbb28000}, {0xbbb2a000}, {0xbbb2c000}, {0xbbb2e000}, - {0xbbb30000}, {0xbbb32000}, {0xbbb34000}, {0xbbb36000}, - {0xbbb38000}, {0xbbb3a000}, {0xbbb3c000}, {0xbbb3e000}, - {0xbbb40000}, {0xbbb42000}, {0xbbb44000}, {0xbbb46000}, - {0xbbb48000}, {0xbbb4a000}, {0xbbb4c000}, {0xbbb4e000}, - {0xbbb50000}, {0xbbb52000}, {0xbbb54000}, {0xbbb56000}, - {0xbbb58000}, {0xbbb5a000}, {0xbbb5c000}, {0xbbb5e000}, - {0xbbb60000}, {0xbbb62000}, {0xbbb64000}, {0xbbb66000}, - {0xbbb68000}, {0xbbb6a000}, {0xbbb6c000}, {0xbbb6e000}, - {0xbbb70000}, {0xbbb72000}, {0xbbb74000}, {0xbbb76000}, - {0xbbb78000}, {0xbbb7a000}, {0xbbb7c000}, {0xbbb7e000}, - {0xbbb80000}, {0xbbb82000}, {0xbbb84000}, {0xbbb86000}, - {0xbbb88000}, {0xbbb8a000}, {0xbbb8c000}, {0xbbb8e000}, - {0xbbb90000}, {0xbbb92000}, {0xbbb94000}, {0xbbb96000}, - {0xbbb98000}, {0xbbb9a000}, {0xbbb9c000}, {0xbbb9e000}, - {0xbbba0000}, {0xbbba2000}, {0xbbba4000}, {0xbbba6000}, - {0xbbba8000}, {0xbbbaa000}, {0xbbbac000}, {0xbbbae000}, - {0xbbbb0000}, {0xbbbb2000}, {0xbbbb4000}, {0xbbbb6000}, - {0xbbbb8000}, {0xbbbba000}, {0xbbbbc000}, {0xbbbbe000}, - {0xbbbc0000}, {0xbbbc2000}, {0xbbbc4000}, {0xbbbc6000}, - {0xbbbc8000}, {0xbbbca000}, {0xbbbcc000}, {0xbbbce000}, - {0xbbbd0000}, {0xbbbd2000}, {0xbbbd4000}, {0xbbbd6000}, - {0xbbbd8000}, {0xbbbda000}, {0xbbbdc000}, {0xbbbde000}, - {0xbbbe0000}, {0xbbbe2000}, {0xbbbe4000}, {0xbbbe6000}, - {0xbbbe8000}, {0xbbbea000}, {0xbbbec000}, {0xbbbee000}, - {0xbbbf0000}, {0xbbbf2000}, {0xbbbf4000}, {0xbbbf6000}, - {0xbbbf8000}, {0xbbbfa000}, {0xbbbfc000}, {0xbbbfe000}, - {0xbbc00000}, {0xbbc02000}, {0xbbc04000}, {0xbbc06000}, - {0xbbc08000}, {0xbbc0a000}, {0xbbc0c000}, {0xbbc0e000}, - {0xbbc10000}, {0xbbc12000}, {0xbbc14000}, {0xbbc16000}, - {0xbbc18000}, {0xbbc1a000}, {0xbbc1c000}, {0xbbc1e000}, - {0xbbc20000}, {0xbbc22000}, {0xbbc24000}, {0xbbc26000}, - {0xbbc28000}, {0xbbc2a000}, {0xbbc2c000}, {0xbbc2e000}, - {0xbbc30000}, {0xbbc32000}, {0xbbc34000}, {0xbbc36000}, - {0xbbc38000}, {0xbbc3a000}, {0xbbc3c000}, {0xbbc3e000}, - {0xbbc40000}, {0xbbc42000}, {0xbbc44000}, {0xbbc46000}, - {0xbbc48000}, {0xbbc4a000}, {0xbbc4c000}, {0xbbc4e000}, - {0xbbc50000}, {0xbbc52000}, {0xbbc54000}, {0xbbc56000}, - {0xbbc58000}, {0xbbc5a000}, {0xbbc5c000}, {0xbbc5e000}, - {0xbbc60000}, {0xbbc62000}, {0xbbc64000}, {0xbbc66000}, - {0xbbc68000}, {0xbbc6a000}, {0xbbc6c000}, {0xbbc6e000}, - {0xbbc70000}, {0xbbc72000}, {0xbbc74000}, {0xbbc76000}, - {0xbbc78000}, {0xbbc7a000}, {0xbbc7c000}, {0xbbc7e000}, - {0xbbc80000}, {0xbbc82000}, {0xbbc84000}, {0xbbc86000}, - {0xbbc88000}, {0xbbc8a000}, {0xbbc8c000}, {0xbbc8e000}, - {0xbbc90000}, {0xbbc92000}, {0xbbc94000}, {0xbbc96000}, - {0xbbc98000}, {0xbbc9a000}, {0xbbc9c000}, {0xbbc9e000}, - {0xbbca0000}, {0xbbca2000}, {0xbbca4000}, {0xbbca6000}, - {0xbbca8000}, {0xbbcaa000}, {0xbbcac000}, {0xbbcae000}, - {0xbbcb0000}, {0xbbcb2000}, {0xbbcb4000}, {0xbbcb6000}, - {0xbbcb8000}, {0xbbcba000}, {0xbbcbc000}, {0xbbcbe000}, - {0xbbcc0000}, {0xbbcc2000}, {0xbbcc4000}, {0xbbcc6000}, - {0xbbcc8000}, {0xbbcca000}, {0xbbccc000}, {0xbbcce000}, - {0xbbcd0000}, {0xbbcd2000}, {0xbbcd4000}, {0xbbcd6000}, - {0xbbcd8000}, {0xbbcda000}, {0xbbcdc000}, {0xbbcde000}, - {0xbbce0000}, {0xbbce2000}, {0xbbce4000}, {0xbbce6000}, - {0xbbce8000}, {0xbbcea000}, {0xbbcec000}, {0xbbcee000}, - {0xbbcf0000}, {0xbbcf2000}, {0xbbcf4000}, {0xbbcf6000}, - {0xbbcf8000}, {0xbbcfa000}, {0xbbcfc000}, {0xbbcfe000}, - {0xbbd00000}, {0xbbd02000}, {0xbbd04000}, {0xbbd06000}, - {0xbbd08000}, {0xbbd0a000}, {0xbbd0c000}, {0xbbd0e000}, - {0xbbd10000}, {0xbbd12000}, {0xbbd14000}, {0xbbd16000}, - {0xbbd18000}, {0xbbd1a000}, {0xbbd1c000}, {0xbbd1e000}, - {0xbbd20000}, {0xbbd22000}, {0xbbd24000}, {0xbbd26000}, - {0xbbd28000}, {0xbbd2a000}, {0xbbd2c000}, {0xbbd2e000}, - {0xbbd30000}, {0xbbd32000}, {0xbbd34000}, {0xbbd36000}, - {0xbbd38000}, {0xbbd3a000}, {0xbbd3c000}, {0xbbd3e000}, - {0xbbd40000}, {0xbbd42000}, {0xbbd44000}, {0xbbd46000}, - {0xbbd48000}, {0xbbd4a000}, {0xbbd4c000}, {0xbbd4e000}, - {0xbbd50000}, {0xbbd52000}, {0xbbd54000}, {0xbbd56000}, - {0xbbd58000}, {0xbbd5a000}, {0xbbd5c000}, {0xbbd5e000}, - {0xbbd60000}, {0xbbd62000}, {0xbbd64000}, {0xbbd66000}, - {0xbbd68000}, {0xbbd6a000}, {0xbbd6c000}, {0xbbd6e000}, - {0xbbd70000}, {0xbbd72000}, {0xbbd74000}, {0xbbd76000}, - {0xbbd78000}, {0xbbd7a000}, {0xbbd7c000}, {0xbbd7e000}, - {0xbbd80000}, {0xbbd82000}, {0xbbd84000}, {0xbbd86000}, - {0xbbd88000}, {0xbbd8a000}, {0xbbd8c000}, {0xbbd8e000}, - {0xbbd90000}, {0xbbd92000}, {0xbbd94000}, {0xbbd96000}, - {0xbbd98000}, {0xbbd9a000}, {0xbbd9c000}, {0xbbd9e000}, - {0xbbda0000}, {0xbbda2000}, {0xbbda4000}, {0xbbda6000}, - {0xbbda8000}, {0xbbdaa000}, {0xbbdac000}, {0xbbdae000}, - {0xbbdb0000}, {0xbbdb2000}, {0xbbdb4000}, {0xbbdb6000}, - {0xbbdb8000}, {0xbbdba000}, {0xbbdbc000}, {0xbbdbe000}, - {0xbbdc0000}, {0xbbdc2000}, {0xbbdc4000}, {0xbbdc6000}, - {0xbbdc8000}, {0xbbdca000}, {0xbbdcc000}, {0xbbdce000}, - {0xbbdd0000}, {0xbbdd2000}, {0xbbdd4000}, {0xbbdd6000}, - {0xbbdd8000}, {0xbbdda000}, {0xbbddc000}, {0xbbdde000}, - {0xbbde0000}, {0xbbde2000}, {0xbbde4000}, {0xbbde6000}, - {0xbbde8000}, {0xbbdea000}, {0xbbdec000}, {0xbbdee000}, - {0xbbdf0000}, {0xbbdf2000}, {0xbbdf4000}, {0xbbdf6000}, - {0xbbdf8000}, {0xbbdfa000}, {0xbbdfc000}, {0xbbdfe000}, - {0xbbe00000}, {0xbbe02000}, {0xbbe04000}, {0xbbe06000}, - {0xbbe08000}, {0xbbe0a000}, {0xbbe0c000}, {0xbbe0e000}, - {0xbbe10000}, {0xbbe12000}, {0xbbe14000}, {0xbbe16000}, - {0xbbe18000}, {0xbbe1a000}, {0xbbe1c000}, {0xbbe1e000}, - {0xbbe20000}, {0xbbe22000}, {0xbbe24000}, {0xbbe26000}, - {0xbbe28000}, {0xbbe2a000}, {0xbbe2c000}, {0xbbe2e000}, - {0xbbe30000}, {0xbbe32000}, {0xbbe34000}, {0xbbe36000}, - {0xbbe38000}, {0xbbe3a000}, {0xbbe3c000}, {0xbbe3e000}, - {0xbbe40000}, {0xbbe42000}, {0xbbe44000}, {0xbbe46000}, - {0xbbe48000}, {0xbbe4a000}, {0xbbe4c000}, {0xbbe4e000}, - {0xbbe50000}, {0xbbe52000}, {0xbbe54000}, {0xbbe56000}, - {0xbbe58000}, {0xbbe5a000}, {0xbbe5c000}, {0xbbe5e000}, - {0xbbe60000}, {0xbbe62000}, {0xbbe64000}, {0xbbe66000}, - {0xbbe68000}, {0xbbe6a000}, {0xbbe6c000}, {0xbbe6e000}, - {0xbbe70000}, {0xbbe72000}, {0xbbe74000}, {0xbbe76000}, - {0xbbe78000}, {0xbbe7a000}, {0xbbe7c000}, {0xbbe7e000}, - {0xbbe80000}, {0xbbe82000}, {0xbbe84000}, {0xbbe86000}, - {0xbbe88000}, {0xbbe8a000}, {0xbbe8c000}, {0xbbe8e000}, - {0xbbe90000}, {0xbbe92000}, {0xbbe94000}, {0xbbe96000}, - {0xbbe98000}, {0xbbe9a000}, {0xbbe9c000}, {0xbbe9e000}, - {0xbbea0000}, {0xbbea2000}, {0xbbea4000}, {0xbbea6000}, - {0xbbea8000}, {0xbbeaa000}, {0xbbeac000}, {0xbbeae000}, - {0xbbeb0000}, {0xbbeb2000}, {0xbbeb4000}, {0xbbeb6000}, - {0xbbeb8000}, {0xbbeba000}, {0xbbebc000}, {0xbbebe000}, - {0xbbec0000}, {0xbbec2000}, {0xbbec4000}, {0xbbec6000}, - {0xbbec8000}, {0xbbeca000}, {0xbbecc000}, {0xbbece000}, - {0xbbed0000}, {0xbbed2000}, {0xbbed4000}, {0xbbed6000}, - {0xbbed8000}, {0xbbeda000}, {0xbbedc000}, {0xbbede000}, - {0xbbee0000}, {0xbbee2000}, {0xbbee4000}, {0xbbee6000}, - {0xbbee8000}, {0xbbeea000}, {0xbbeec000}, {0xbbeee000}, - {0xbbef0000}, {0xbbef2000}, {0xbbef4000}, {0xbbef6000}, - {0xbbef8000}, {0xbbefa000}, {0xbbefc000}, {0xbbefe000}, - {0xbbf00000}, {0xbbf02000}, {0xbbf04000}, {0xbbf06000}, - {0xbbf08000}, {0xbbf0a000}, {0xbbf0c000}, {0xbbf0e000}, - {0xbbf10000}, {0xbbf12000}, {0xbbf14000}, {0xbbf16000}, - {0xbbf18000}, {0xbbf1a000}, {0xbbf1c000}, {0xbbf1e000}, - {0xbbf20000}, {0xbbf22000}, {0xbbf24000}, {0xbbf26000}, - {0xbbf28000}, {0xbbf2a000}, {0xbbf2c000}, {0xbbf2e000}, - {0xbbf30000}, {0xbbf32000}, {0xbbf34000}, {0xbbf36000}, - {0xbbf38000}, {0xbbf3a000}, {0xbbf3c000}, {0xbbf3e000}, - {0xbbf40000}, {0xbbf42000}, {0xbbf44000}, {0xbbf46000}, - {0xbbf48000}, {0xbbf4a000}, {0xbbf4c000}, {0xbbf4e000}, - {0xbbf50000}, {0xbbf52000}, {0xbbf54000}, {0xbbf56000}, - {0xbbf58000}, {0xbbf5a000}, {0xbbf5c000}, {0xbbf5e000}, - {0xbbf60000}, {0xbbf62000}, {0xbbf64000}, {0xbbf66000}, - {0xbbf68000}, {0xbbf6a000}, {0xbbf6c000}, {0xbbf6e000}, - {0xbbf70000}, {0xbbf72000}, {0xbbf74000}, {0xbbf76000}, - {0xbbf78000}, {0xbbf7a000}, {0xbbf7c000}, {0xbbf7e000}, - {0xbbf80000}, {0xbbf82000}, {0xbbf84000}, {0xbbf86000}, - {0xbbf88000}, {0xbbf8a000}, {0xbbf8c000}, {0xbbf8e000}, - {0xbbf90000}, {0xbbf92000}, {0xbbf94000}, {0xbbf96000}, - {0xbbf98000}, {0xbbf9a000}, {0xbbf9c000}, {0xbbf9e000}, - {0xbbfa0000}, {0xbbfa2000}, {0xbbfa4000}, {0xbbfa6000}, - {0xbbfa8000}, {0xbbfaa000}, {0xbbfac000}, {0xbbfae000}, - {0xbbfb0000}, {0xbbfb2000}, {0xbbfb4000}, {0xbbfb6000}, - {0xbbfb8000}, {0xbbfba000}, {0xbbfbc000}, {0xbbfbe000}, - {0xbbfc0000}, {0xbbfc2000}, {0xbbfc4000}, {0xbbfc6000}, - {0xbbfc8000}, {0xbbfca000}, {0xbbfcc000}, {0xbbfce000}, - {0xbbfd0000}, {0xbbfd2000}, {0xbbfd4000}, {0xbbfd6000}, - {0xbbfd8000}, {0xbbfda000}, {0xbbfdc000}, {0xbbfde000}, - {0xbbfe0000}, {0xbbfe2000}, {0xbbfe4000}, {0xbbfe6000}, - {0xbbfe8000}, {0xbbfea000}, {0xbbfec000}, {0xbbfee000}, - {0xbbff0000}, {0xbbff2000}, {0xbbff4000}, {0xbbff6000}, - {0xbbff8000}, {0xbbffa000}, {0xbbffc000}, {0xbbffe000}, - {0xbc000000}, {0xbc002000}, {0xbc004000}, {0xbc006000}, - {0xbc008000}, {0xbc00a000}, {0xbc00c000}, {0xbc00e000}, - {0xbc010000}, {0xbc012000}, {0xbc014000}, {0xbc016000}, - {0xbc018000}, {0xbc01a000}, {0xbc01c000}, {0xbc01e000}, - {0xbc020000}, {0xbc022000}, {0xbc024000}, {0xbc026000}, - {0xbc028000}, {0xbc02a000}, {0xbc02c000}, {0xbc02e000}, - {0xbc030000}, {0xbc032000}, {0xbc034000}, {0xbc036000}, - {0xbc038000}, {0xbc03a000}, {0xbc03c000}, {0xbc03e000}, - {0xbc040000}, {0xbc042000}, {0xbc044000}, {0xbc046000}, - {0xbc048000}, {0xbc04a000}, {0xbc04c000}, {0xbc04e000}, - {0xbc050000}, {0xbc052000}, {0xbc054000}, {0xbc056000}, - {0xbc058000}, {0xbc05a000}, {0xbc05c000}, {0xbc05e000}, - {0xbc060000}, {0xbc062000}, {0xbc064000}, {0xbc066000}, - {0xbc068000}, {0xbc06a000}, {0xbc06c000}, {0xbc06e000}, - {0xbc070000}, {0xbc072000}, {0xbc074000}, {0xbc076000}, - {0xbc078000}, {0xbc07a000}, {0xbc07c000}, {0xbc07e000}, - {0xbc080000}, {0xbc082000}, {0xbc084000}, {0xbc086000}, - {0xbc088000}, {0xbc08a000}, {0xbc08c000}, {0xbc08e000}, - {0xbc090000}, {0xbc092000}, {0xbc094000}, {0xbc096000}, - {0xbc098000}, {0xbc09a000}, {0xbc09c000}, {0xbc09e000}, - {0xbc0a0000}, {0xbc0a2000}, {0xbc0a4000}, {0xbc0a6000}, - {0xbc0a8000}, {0xbc0aa000}, {0xbc0ac000}, {0xbc0ae000}, - {0xbc0b0000}, {0xbc0b2000}, {0xbc0b4000}, {0xbc0b6000}, - {0xbc0b8000}, {0xbc0ba000}, {0xbc0bc000}, {0xbc0be000}, - {0xbc0c0000}, {0xbc0c2000}, {0xbc0c4000}, {0xbc0c6000}, - {0xbc0c8000}, {0xbc0ca000}, {0xbc0cc000}, {0xbc0ce000}, - {0xbc0d0000}, {0xbc0d2000}, {0xbc0d4000}, {0xbc0d6000}, - {0xbc0d8000}, {0xbc0da000}, {0xbc0dc000}, {0xbc0de000}, - {0xbc0e0000}, {0xbc0e2000}, {0xbc0e4000}, {0xbc0e6000}, - {0xbc0e8000}, {0xbc0ea000}, {0xbc0ec000}, {0xbc0ee000}, - {0xbc0f0000}, {0xbc0f2000}, {0xbc0f4000}, {0xbc0f6000}, - {0xbc0f8000}, {0xbc0fa000}, {0xbc0fc000}, {0xbc0fe000}, - {0xbc100000}, {0xbc102000}, {0xbc104000}, {0xbc106000}, - {0xbc108000}, {0xbc10a000}, {0xbc10c000}, {0xbc10e000}, - {0xbc110000}, {0xbc112000}, {0xbc114000}, {0xbc116000}, - {0xbc118000}, {0xbc11a000}, {0xbc11c000}, {0xbc11e000}, - {0xbc120000}, {0xbc122000}, {0xbc124000}, {0xbc126000}, - {0xbc128000}, {0xbc12a000}, {0xbc12c000}, {0xbc12e000}, - {0xbc130000}, {0xbc132000}, {0xbc134000}, {0xbc136000}, - {0xbc138000}, {0xbc13a000}, {0xbc13c000}, {0xbc13e000}, - {0xbc140000}, {0xbc142000}, {0xbc144000}, {0xbc146000}, - {0xbc148000}, {0xbc14a000}, {0xbc14c000}, {0xbc14e000}, - {0xbc150000}, {0xbc152000}, {0xbc154000}, {0xbc156000}, - {0xbc158000}, {0xbc15a000}, {0xbc15c000}, {0xbc15e000}, - {0xbc160000}, {0xbc162000}, {0xbc164000}, {0xbc166000}, - {0xbc168000}, {0xbc16a000}, {0xbc16c000}, {0xbc16e000}, - {0xbc170000}, {0xbc172000}, {0xbc174000}, {0xbc176000}, - {0xbc178000}, {0xbc17a000}, {0xbc17c000}, {0xbc17e000}, - {0xbc180000}, {0xbc182000}, {0xbc184000}, {0xbc186000}, - {0xbc188000}, {0xbc18a000}, {0xbc18c000}, {0xbc18e000}, - {0xbc190000}, {0xbc192000}, {0xbc194000}, {0xbc196000}, - {0xbc198000}, {0xbc19a000}, {0xbc19c000}, {0xbc19e000}, - {0xbc1a0000}, {0xbc1a2000}, {0xbc1a4000}, {0xbc1a6000}, - {0xbc1a8000}, {0xbc1aa000}, {0xbc1ac000}, {0xbc1ae000}, - {0xbc1b0000}, {0xbc1b2000}, {0xbc1b4000}, {0xbc1b6000}, - {0xbc1b8000}, {0xbc1ba000}, {0xbc1bc000}, {0xbc1be000}, - {0xbc1c0000}, {0xbc1c2000}, {0xbc1c4000}, {0xbc1c6000}, - {0xbc1c8000}, {0xbc1ca000}, {0xbc1cc000}, {0xbc1ce000}, - {0xbc1d0000}, {0xbc1d2000}, {0xbc1d4000}, {0xbc1d6000}, - {0xbc1d8000}, {0xbc1da000}, {0xbc1dc000}, {0xbc1de000}, - {0xbc1e0000}, {0xbc1e2000}, {0xbc1e4000}, {0xbc1e6000}, - {0xbc1e8000}, {0xbc1ea000}, {0xbc1ec000}, {0xbc1ee000}, - {0xbc1f0000}, {0xbc1f2000}, {0xbc1f4000}, {0xbc1f6000}, - {0xbc1f8000}, {0xbc1fa000}, {0xbc1fc000}, {0xbc1fe000}, - {0xbc200000}, {0xbc202000}, {0xbc204000}, {0xbc206000}, - {0xbc208000}, {0xbc20a000}, {0xbc20c000}, {0xbc20e000}, - {0xbc210000}, {0xbc212000}, {0xbc214000}, {0xbc216000}, - {0xbc218000}, {0xbc21a000}, {0xbc21c000}, {0xbc21e000}, - {0xbc220000}, {0xbc222000}, {0xbc224000}, {0xbc226000}, - {0xbc228000}, {0xbc22a000}, {0xbc22c000}, {0xbc22e000}, - {0xbc230000}, {0xbc232000}, {0xbc234000}, {0xbc236000}, - {0xbc238000}, {0xbc23a000}, {0xbc23c000}, {0xbc23e000}, - {0xbc240000}, {0xbc242000}, {0xbc244000}, {0xbc246000}, - {0xbc248000}, {0xbc24a000}, {0xbc24c000}, {0xbc24e000}, - {0xbc250000}, {0xbc252000}, {0xbc254000}, {0xbc256000}, - {0xbc258000}, {0xbc25a000}, {0xbc25c000}, {0xbc25e000}, - {0xbc260000}, {0xbc262000}, {0xbc264000}, {0xbc266000}, - {0xbc268000}, {0xbc26a000}, {0xbc26c000}, {0xbc26e000}, - {0xbc270000}, {0xbc272000}, {0xbc274000}, {0xbc276000}, - {0xbc278000}, {0xbc27a000}, {0xbc27c000}, {0xbc27e000}, - {0xbc280000}, {0xbc282000}, {0xbc284000}, {0xbc286000}, - {0xbc288000}, {0xbc28a000}, {0xbc28c000}, {0xbc28e000}, - {0xbc290000}, {0xbc292000}, {0xbc294000}, {0xbc296000}, - {0xbc298000}, {0xbc29a000}, {0xbc29c000}, {0xbc29e000}, - {0xbc2a0000}, {0xbc2a2000}, {0xbc2a4000}, {0xbc2a6000}, - {0xbc2a8000}, {0xbc2aa000}, {0xbc2ac000}, {0xbc2ae000}, - {0xbc2b0000}, {0xbc2b2000}, {0xbc2b4000}, {0xbc2b6000}, - {0xbc2b8000}, {0xbc2ba000}, {0xbc2bc000}, {0xbc2be000}, - {0xbc2c0000}, {0xbc2c2000}, {0xbc2c4000}, {0xbc2c6000}, - {0xbc2c8000}, {0xbc2ca000}, {0xbc2cc000}, {0xbc2ce000}, - {0xbc2d0000}, {0xbc2d2000}, {0xbc2d4000}, {0xbc2d6000}, - {0xbc2d8000}, {0xbc2da000}, {0xbc2dc000}, {0xbc2de000}, - {0xbc2e0000}, {0xbc2e2000}, {0xbc2e4000}, {0xbc2e6000}, - {0xbc2e8000}, {0xbc2ea000}, {0xbc2ec000}, {0xbc2ee000}, - {0xbc2f0000}, {0xbc2f2000}, {0xbc2f4000}, {0xbc2f6000}, - {0xbc2f8000}, {0xbc2fa000}, {0xbc2fc000}, {0xbc2fe000}, - {0xbc300000}, {0xbc302000}, {0xbc304000}, {0xbc306000}, - {0xbc308000}, {0xbc30a000}, {0xbc30c000}, {0xbc30e000}, - {0xbc310000}, {0xbc312000}, {0xbc314000}, {0xbc316000}, - {0xbc318000}, {0xbc31a000}, {0xbc31c000}, {0xbc31e000}, - {0xbc320000}, {0xbc322000}, {0xbc324000}, {0xbc326000}, - {0xbc328000}, {0xbc32a000}, {0xbc32c000}, {0xbc32e000}, - {0xbc330000}, {0xbc332000}, {0xbc334000}, {0xbc336000}, - {0xbc338000}, {0xbc33a000}, {0xbc33c000}, {0xbc33e000}, - {0xbc340000}, {0xbc342000}, {0xbc344000}, {0xbc346000}, - {0xbc348000}, {0xbc34a000}, {0xbc34c000}, {0xbc34e000}, - {0xbc350000}, {0xbc352000}, {0xbc354000}, {0xbc356000}, - {0xbc358000}, {0xbc35a000}, {0xbc35c000}, {0xbc35e000}, - {0xbc360000}, {0xbc362000}, {0xbc364000}, {0xbc366000}, - {0xbc368000}, {0xbc36a000}, {0xbc36c000}, {0xbc36e000}, - {0xbc370000}, {0xbc372000}, {0xbc374000}, {0xbc376000}, - {0xbc378000}, {0xbc37a000}, {0xbc37c000}, {0xbc37e000}, - {0xbc380000}, {0xbc382000}, {0xbc384000}, {0xbc386000}, - {0xbc388000}, {0xbc38a000}, {0xbc38c000}, {0xbc38e000}, - {0xbc390000}, {0xbc392000}, {0xbc394000}, {0xbc396000}, - {0xbc398000}, {0xbc39a000}, {0xbc39c000}, {0xbc39e000}, - {0xbc3a0000}, {0xbc3a2000}, {0xbc3a4000}, {0xbc3a6000}, - {0xbc3a8000}, {0xbc3aa000}, {0xbc3ac000}, {0xbc3ae000}, - {0xbc3b0000}, {0xbc3b2000}, {0xbc3b4000}, {0xbc3b6000}, - {0xbc3b8000}, {0xbc3ba000}, {0xbc3bc000}, {0xbc3be000}, - {0xbc3c0000}, {0xbc3c2000}, {0xbc3c4000}, {0xbc3c6000}, - {0xbc3c8000}, {0xbc3ca000}, {0xbc3cc000}, {0xbc3ce000}, - {0xbc3d0000}, {0xbc3d2000}, {0xbc3d4000}, {0xbc3d6000}, - {0xbc3d8000}, {0xbc3da000}, {0xbc3dc000}, {0xbc3de000}, - {0xbc3e0000}, {0xbc3e2000}, {0xbc3e4000}, {0xbc3e6000}, - {0xbc3e8000}, {0xbc3ea000}, {0xbc3ec000}, {0xbc3ee000}, - {0xbc3f0000}, {0xbc3f2000}, {0xbc3f4000}, {0xbc3f6000}, - {0xbc3f8000}, {0xbc3fa000}, {0xbc3fc000}, {0xbc3fe000}, - {0xbc400000}, {0xbc402000}, {0xbc404000}, {0xbc406000}, - {0xbc408000}, {0xbc40a000}, {0xbc40c000}, {0xbc40e000}, - {0xbc410000}, {0xbc412000}, {0xbc414000}, {0xbc416000}, - {0xbc418000}, {0xbc41a000}, {0xbc41c000}, {0xbc41e000}, - {0xbc420000}, {0xbc422000}, {0xbc424000}, {0xbc426000}, - {0xbc428000}, {0xbc42a000}, {0xbc42c000}, {0xbc42e000}, - {0xbc430000}, {0xbc432000}, {0xbc434000}, {0xbc436000}, - {0xbc438000}, {0xbc43a000}, {0xbc43c000}, {0xbc43e000}, - {0xbc440000}, {0xbc442000}, {0xbc444000}, {0xbc446000}, - {0xbc448000}, {0xbc44a000}, {0xbc44c000}, {0xbc44e000}, - {0xbc450000}, {0xbc452000}, {0xbc454000}, {0xbc456000}, - {0xbc458000}, {0xbc45a000}, {0xbc45c000}, {0xbc45e000}, - {0xbc460000}, {0xbc462000}, {0xbc464000}, {0xbc466000}, - {0xbc468000}, {0xbc46a000}, {0xbc46c000}, {0xbc46e000}, - {0xbc470000}, {0xbc472000}, {0xbc474000}, {0xbc476000}, - {0xbc478000}, {0xbc47a000}, {0xbc47c000}, {0xbc47e000}, - {0xbc480000}, {0xbc482000}, {0xbc484000}, {0xbc486000}, - {0xbc488000}, {0xbc48a000}, {0xbc48c000}, {0xbc48e000}, - {0xbc490000}, {0xbc492000}, {0xbc494000}, {0xbc496000}, - {0xbc498000}, {0xbc49a000}, {0xbc49c000}, {0xbc49e000}, - {0xbc4a0000}, {0xbc4a2000}, {0xbc4a4000}, {0xbc4a6000}, - {0xbc4a8000}, {0xbc4aa000}, {0xbc4ac000}, {0xbc4ae000}, - {0xbc4b0000}, {0xbc4b2000}, {0xbc4b4000}, {0xbc4b6000}, - {0xbc4b8000}, {0xbc4ba000}, {0xbc4bc000}, {0xbc4be000}, - {0xbc4c0000}, {0xbc4c2000}, {0xbc4c4000}, {0xbc4c6000}, - {0xbc4c8000}, {0xbc4ca000}, {0xbc4cc000}, {0xbc4ce000}, - {0xbc4d0000}, {0xbc4d2000}, {0xbc4d4000}, {0xbc4d6000}, - {0xbc4d8000}, {0xbc4da000}, {0xbc4dc000}, {0xbc4de000}, - {0xbc4e0000}, {0xbc4e2000}, {0xbc4e4000}, {0xbc4e6000}, - {0xbc4e8000}, {0xbc4ea000}, {0xbc4ec000}, {0xbc4ee000}, - {0xbc4f0000}, {0xbc4f2000}, {0xbc4f4000}, {0xbc4f6000}, - {0xbc4f8000}, {0xbc4fa000}, {0xbc4fc000}, {0xbc4fe000}, - {0xbc500000}, {0xbc502000}, {0xbc504000}, {0xbc506000}, - {0xbc508000}, {0xbc50a000}, {0xbc50c000}, {0xbc50e000}, - {0xbc510000}, {0xbc512000}, {0xbc514000}, {0xbc516000}, - {0xbc518000}, {0xbc51a000}, {0xbc51c000}, {0xbc51e000}, - {0xbc520000}, {0xbc522000}, {0xbc524000}, {0xbc526000}, - {0xbc528000}, {0xbc52a000}, {0xbc52c000}, {0xbc52e000}, - {0xbc530000}, {0xbc532000}, {0xbc534000}, {0xbc536000}, - {0xbc538000}, {0xbc53a000}, {0xbc53c000}, {0xbc53e000}, - {0xbc540000}, {0xbc542000}, {0xbc544000}, {0xbc546000}, - {0xbc548000}, {0xbc54a000}, {0xbc54c000}, {0xbc54e000}, - {0xbc550000}, {0xbc552000}, {0xbc554000}, {0xbc556000}, - {0xbc558000}, {0xbc55a000}, {0xbc55c000}, {0xbc55e000}, - {0xbc560000}, {0xbc562000}, {0xbc564000}, {0xbc566000}, - {0xbc568000}, {0xbc56a000}, {0xbc56c000}, {0xbc56e000}, - {0xbc570000}, {0xbc572000}, {0xbc574000}, {0xbc576000}, - {0xbc578000}, {0xbc57a000}, {0xbc57c000}, {0xbc57e000}, - {0xbc580000}, {0xbc582000}, {0xbc584000}, {0xbc586000}, - {0xbc588000}, {0xbc58a000}, {0xbc58c000}, {0xbc58e000}, - {0xbc590000}, {0xbc592000}, {0xbc594000}, {0xbc596000}, - {0xbc598000}, {0xbc59a000}, {0xbc59c000}, {0xbc59e000}, - {0xbc5a0000}, {0xbc5a2000}, {0xbc5a4000}, {0xbc5a6000}, - {0xbc5a8000}, {0xbc5aa000}, {0xbc5ac000}, {0xbc5ae000}, - {0xbc5b0000}, {0xbc5b2000}, {0xbc5b4000}, {0xbc5b6000}, - {0xbc5b8000}, {0xbc5ba000}, {0xbc5bc000}, {0xbc5be000}, - {0xbc5c0000}, {0xbc5c2000}, {0xbc5c4000}, {0xbc5c6000}, - {0xbc5c8000}, {0xbc5ca000}, {0xbc5cc000}, {0xbc5ce000}, - {0xbc5d0000}, {0xbc5d2000}, {0xbc5d4000}, {0xbc5d6000}, - {0xbc5d8000}, {0xbc5da000}, {0xbc5dc000}, {0xbc5de000}, - {0xbc5e0000}, {0xbc5e2000}, {0xbc5e4000}, {0xbc5e6000}, - {0xbc5e8000}, {0xbc5ea000}, {0xbc5ec000}, {0xbc5ee000}, - {0xbc5f0000}, {0xbc5f2000}, {0xbc5f4000}, {0xbc5f6000}, - {0xbc5f8000}, {0xbc5fa000}, {0xbc5fc000}, {0xbc5fe000}, - {0xbc600000}, {0xbc602000}, {0xbc604000}, {0xbc606000}, - {0xbc608000}, {0xbc60a000}, {0xbc60c000}, {0xbc60e000}, - {0xbc610000}, {0xbc612000}, {0xbc614000}, {0xbc616000}, - {0xbc618000}, {0xbc61a000}, {0xbc61c000}, {0xbc61e000}, - {0xbc620000}, {0xbc622000}, {0xbc624000}, {0xbc626000}, - {0xbc628000}, {0xbc62a000}, {0xbc62c000}, {0xbc62e000}, - {0xbc630000}, {0xbc632000}, {0xbc634000}, {0xbc636000}, - {0xbc638000}, {0xbc63a000}, {0xbc63c000}, {0xbc63e000}, - {0xbc640000}, {0xbc642000}, {0xbc644000}, {0xbc646000}, - {0xbc648000}, {0xbc64a000}, {0xbc64c000}, {0xbc64e000}, - {0xbc650000}, {0xbc652000}, {0xbc654000}, {0xbc656000}, - {0xbc658000}, {0xbc65a000}, {0xbc65c000}, {0xbc65e000}, - {0xbc660000}, {0xbc662000}, {0xbc664000}, {0xbc666000}, - {0xbc668000}, {0xbc66a000}, {0xbc66c000}, {0xbc66e000}, - {0xbc670000}, {0xbc672000}, {0xbc674000}, {0xbc676000}, - {0xbc678000}, {0xbc67a000}, {0xbc67c000}, {0xbc67e000}, - {0xbc680000}, {0xbc682000}, {0xbc684000}, {0xbc686000}, - {0xbc688000}, {0xbc68a000}, {0xbc68c000}, {0xbc68e000}, - {0xbc690000}, {0xbc692000}, {0xbc694000}, {0xbc696000}, - {0xbc698000}, {0xbc69a000}, {0xbc69c000}, {0xbc69e000}, - {0xbc6a0000}, {0xbc6a2000}, {0xbc6a4000}, {0xbc6a6000}, - {0xbc6a8000}, {0xbc6aa000}, {0xbc6ac000}, {0xbc6ae000}, - {0xbc6b0000}, {0xbc6b2000}, {0xbc6b4000}, {0xbc6b6000}, - {0xbc6b8000}, {0xbc6ba000}, {0xbc6bc000}, {0xbc6be000}, - {0xbc6c0000}, {0xbc6c2000}, {0xbc6c4000}, {0xbc6c6000}, - {0xbc6c8000}, {0xbc6ca000}, {0xbc6cc000}, {0xbc6ce000}, - {0xbc6d0000}, {0xbc6d2000}, {0xbc6d4000}, {0xbc6d6000}, - {0xbc6d8000}, {0xbc6da000}, {0xbc6dc000}, {0xbc6de000}, - {0xbc6e0000}, {0xbc6e2000}, {0xbc6e4000}, {0xbc6e6000}, - {0xbc6e8000}, {0xbc6ea000}, {0xbc6ec000}, {0xbc6ee000}, - {0xbc6f0000}, {0xbc6f2000}, {0xbc6f4000}, {0xbc6f6000}, - {0xbc6f8000}, {0xbc6fa000}, {0xbc6fc000}, {0xbc6fe000}, - {0xbc700000}, {0xbc702000}, {0xbc704000}, {0xbc706000}, - {0xbc708000}, {0xbc70a000}, {0xbc70c000}, {0xbc70e000}, - {0xbc710000}, {0xbc712000}, {0xbc714000}, {0xbc716000}, - {0xbc718000}, {0xbc71a000}, {0xbc71c000}, {0xbc71e000}, - {0xbc720000}, {0xbc722000}, {0xbc724000}, {0xbc726000}, - {0xbc728000}, {0xbc72a000}, {0xbc72c000}, {0xbc72e000}, - {0xbc730000}, {0xbc732000}, {0xbc734000}, {0xbc736000}, - {0xbc738000}, {0xbc73a000}, {0xbc73c000}, {0xbc73e000}, - {0xbc740000}, {0xbc742000}, {0xbc744000}, {0xbc746000}, - {0xbc748000}, {0xbc74a000}, {0xbc74c000}, {0xbc74e000}, - {0xbc750000}, {0xbc752000}, {0xbc754000}, {0xbc756000}, - {0xbc758000}, {0xbc75a000}, {0xbc75c000}, {0xbc75e000}, - {0xbc760000}, {0xbc762000}, {0xbc764000}, {0xbc766000}, - {0xbc768000}, {0xbc76a000}, {0xbc76c000}, {0xbc76e000}, - {0xbc770000}, {0xbc772000}, {0xbc774000}, {0xbc776000}, - {0xbc778000}, {0xbc77a000}, {0xbc77c000}, {0xbc77e000}, - {0xbc780000}, {0xbc782000}, {0xbc784000}, {0xbc786000}, - {0xbc788000}, {0xbc78a000}, {0xbc78c000}, {0xbc78e000}, - {0xbc790000}, {0xbc792000}, {0xbc794000}, {0xbc796000}, - {0xbc798000}, {0xbc79a000}, {0xbc79c000}, {0xbc79e000}, - {0xbc7a0000}, {0xbc7a2000}, {0xbc7a4000}, {0xbc7a6000}, - {0xbc7a8000}, {0xbc7aa000}, {0xbc7ac000}, {0xbc7ae000}, - {0xbc7b0000}, {0xbc7b2000}, {0xbc7b4000}, {0xbc7b6000}, - {0xbc7b8000}, {0xbc7ba000}, {0xbc7bc000}, {0xbc7be000}, - {0xbc7c0000}, {0xbc7c2000}, {0xbc7c4000}, {0xbc7c6000}, - {0xbc7c8000}, {0xbc7ca000}, {0xbc7cc000}, {0xbc7ce000}, - {0xbc7d0000}, {0xbc7d2000}, {0xbc7d4000}, {0xbc7d6000}, - {0xbc7d8000}, {0xbc7da000}, {0xbc7dc000}, {0xbc7de000}, - {0xbc7e0000}, {0xbc7e2000}, {0xbc7e4000}, {0xbc7e6000}, - {0xbc7e8000}, {0xbc7ea000}, {0xbc7ec000}, {0xbc7ee000}, - {0xbc7f0000}, {0xbc7f2000}, {0xbc7f4000}, {0xbc7f6000}, - {0xbc7f8000}, {0xbc7fa000}, {0xbc7fc000}, {0xbc7fe000}, - {0xbc800000}, {0xbc802000}, {0xbc804000}, {0xbc806000}, - {0xbc808000}, {0xbc80a000}, {0xbc80c000}, {0xbc80e000}, - {0xbc810000}, {0xbc812000}, {0xbc814000}, {0xbc816000}, - {0xbc818000}, {0xbc81a000}, {0xbc81c000}, {0xbc81e000}, - {0xbc820000}, {0xbc822000}, {0xbc824000}, {0xbc826000}, - {0xbc828000}, {0xbc82a000}, {0xbc82c000}, {0xbc82e000}, - {0xbc830000}, {0xbc832000}, {0xbc834000}, {0xbc836000}, - {0xbc838000}, {0xbc83a000}, {0xbc83c000}, {0xbc83e000}, - {0xbc840000}, {0xbc842000}, {0xbc844000}, {0xbc846000}, - {0xbc848000}, {0xbc84a000}, {0xbc84c000}, {0xbc84e000}, - {0xbc850000}, {0xbc852000}, {0xbc854000}, {0xbc856000}, - {0xbc858000}, {0xbc85a000}, {0xbc85c000}, {0xbc85e000}, - {0xbc860000}, {0xbc862000}, {0xbc864000}, {0xbc866000}, - {0xbc868000}, {0xbc86a000}, {0xbc86c000}, {0xbc86e000}, - {0xbc870000}, {0xbc872000}, {0xbc874000}, {0xbc876000}, - {0xbc878000}, {0xbc87a000}, {0xbc87c000}, {0xbc87e000}, - {0xbc880000}, {0xbc882000}, {0xbc884000}, {0xbc886000}, - {0xbc888000}, {0xbc88a000}, {0xbc88c000}, {0xbc88e000}, - {0xbc890000}, {0xbc892000}, {0xbc894000}, {0xbc896000}, - {0xbc898000}, {0xbc89a000}, {0xbc89c000}, {0xbc89e000}, - {0xbc8a0000}, {0xbc8a2000}, {0xbc8a4000}, {0xbc8a6000}, - {0xbc8a8000}, {0xbc8aa000}, {0xbc8ac000}, {0xbc8ae000}, - {0xbc8b0000}, {0xbc8b2000}, {0xbc8b4000}, {0xbc8b6000}, - {0xbc8b8000}, {0xbc8ba000}, {0xbc8bc000}, {0xbc8be000}, - {0xbc8c0000}, {0xbc8c2000}, {0xbc8c4000}, {0xbc8c6000}, - {0xbc8c8000}, {0xbc8ca000}, {0xbc8cc000}, {0xbc8ce000}, - {0xbc8d0000}, {0xbc8d2000}, {0xbc8d4000}, {0xbc8d6000}, - {0xbc8d8000}, {0xbc8da000}, {0xbc8dc000}, {0xbc8de000}, - {0xbc8e0000}, {0xbc8e2000}, {0xbc8e4000}, {0xbc8e6000}, - {0xbc8e8000}, {0xbc8ea000}, {0xbc8ec000}, {0xbc8ee000}, - {0xbc8f0000}, {0xbc8f2000}, {0xbc8f4000}, {0xbc8f6000}, - {0xbc8f8000}, {0xbc8fa000}, {0xbc8fc000}, {0xbc8fe000}, - {0xbc900000}, {0xbc902000}, {0xbc904000}, {0xbc906000}, - {0xbc908000}, {0xbc90a000}, {0xbc90c000}, {0xbc90e000}, - {0xbc910000}, {0xbc912000}, {0xbc914000}, {0xbc916000}, - {0xbc918000}, {0xbc91a000}, {0xbc91c000}, {0xbc91e000}, - {0xbc920000}, {0xbc922000}, {0xbc924000}, {0xbc926000}, - {0xbc928000}, {0xbc92a000}, {0xbc92c000}, {0xbc92e000}, - {0xbc930000}, {0xbc932000}, {0xbc934000}, {0xbc936000}, - {0xbc938000}, {0xbc93a000}, {0xbc93c000}, {0xbc93e000}, - {0xbc940000}, {0xbc942000}, {0xbc944000}, {0xbc946000}, - {0xbc948000}, {0xbc94a000}, {0xbc94c000}, {0xbc94e000}, - {0xbc950000}, {0xbc952000}, {0xbc954000}, {0xbc956000}, - {0xbc958000}, {0xbc95a000}, {0xbc95c000}, {0xbc95e000}, - {0xbc960000}, {0xbc962000}, {0xbc964000}, {0xbc966000}, - {0xbc968000}, {0xbc96a000}, {0xbc96c000}, {0xbc96e000}, - {0xbc970000}, {0xbc972000}, {0xbc974000}, {0xbc976000}, - {0xbc978000}, {0xbc97a000}, {0xbc97c000}, {0xbc97e000}, - {0xbc980000}, {0xbc982000}, {0xbc984000}, {0xbc986000}, - {0xbc988000}, {0xbc98a000}, {0xbc98c000}, {0xbc98e000}, - {0xbc990000}, {0xbc992000}, {0xbc994000}, {0xbc996000}, - {0xbc998000}, {0xbc99a000}, {0xbc99c000}, {0xbc99e000}, - {0xbc9a0000}, {0xbc9a2000}, {0xbc9a4000}, {0xbc9a6000}, - {0xbc9a8000}, {0xbc9aa000}, {0xbc9ac000}, {0xbc9ae000}, - {0xbc9b0000}, {0xbc9b2000}, {0xbc9b4000}, {0xbc9b6000}, - {0xbc9b8000}, {0xbc9ba000}, {0xbc9bc000}, {0xbc9be000}, - {0xbc9c0000}, {0xbc9c2000}, {0xbc9c4000}, {0xbc9c6000}, - {0xbc9c8000}, {0xbc9ca000}, {0xbc9cc000}, {0xbc9ce000}, - {0xbc9d0000}, {0xbc9d2000}, {0xbc9d4000}, {0xbc9d6000}, - {0xbc9d8000}, {0xbc9da000}, {0xbc9dc000}, {0xbc9de000}, - {0xbc9e0000}, {0xbc9e2000}, {0xbc9e4000}, {0xbc9e6000}, - {0xbc9e8000}, {0xbc9ea000}, {0xbc9ec000}, {0xbc9ee000}, - {0xbc9f0000}, {0xbc9f2000}, {0xbc9f4000}, {0xbc9f6000}, - {0xbc9f8000}, {0xbc9fa000}, {0xbc9fc000}, {0xbc9fe000}, - {0xbca00000}, {0xbca02000}, {0xbca04000}, {0xbca06000}, - {0xbca08000}, {0xbca0a000}, {0xbca0c000}, {0xbca0e000}, - {0xbca10000}, {0xbca12000}, {0xbca14000}, {0xbca16000}, - {0xbca18000}, {0xbca1a000}, {0xbca1c000}, {0xbca1e000}, - {0xbca20000}, {0xbca22000}, {0xbca24000}, {0xbca26000}, - {0xbca28000}, {0xbca2a000}, {0xbca2c000}, {0xbca2e000}, - {0xbca30000}, {0xbca32000}, {0xbca34000}, {0xbca36000}, - {0xbca38000}, {0xbca3a000}, {0xbca3c000}, {0xbca3e000}, - {0xbca40000}, {0xbca42000}, {0xbca44000}, {0xbca46000}, - {0xbca48000}, {0xbca4a000}, {0xbca4c000}, {0xbca4e000}, - {0xbca50000}, {0xbca52000}, {0xbca54000}, {0xbca56000}, - {0xbca58000}, {0xbca5a000}, {0xbca5c000}, {0xbca5e000}, - {0xbca60000}, {0xbca62000}, {0xbca64000}, {0xbca66000}, - {0xbca68000}, {0xbca6a000}, {0xbca6c000}, {0xbca6e000}, - {0xbca70000}, {0xbca72000}, {0xbca74000}, {0xbca76000}, - {0xbca78000}, {0xbca7a000}, {0xbca7c000}, {0xbca7e000}, - {0xbca80000}, {0xbca82000}, {0xbca84000}, {0xbca86000}, - {0xbca88000}, {0xbca8a000}, {0xbca8c000}, {0xbca8e000}, - {0xbca90000}, {0xbca92000}, {0xbca94000}, {0xbca96000}, - {0xbca98000}, {0xbca9a000}, {0xbca9c000}, {0xbca9e000}, - {0xbcaa0000}, {0xbcaa2000}, {0xbcaa4000}, {0xbcaa6000}, - {0xbcaa8000}, {0xbcaaa000}, {0xbcaac000}, {0xbcaae000}, - {0xbcab0000}, {0xbcab2000}, {0xbcab4000}, {0xbcab6000}, - {0xbcab8000}, {0xbcaba000}, {0xbcabc000}, {0xbcabe000}, - {0xbcac0000}, {0xbcac2000}, {0xbcac4000}, {0xbcac6000}, - {0xbcac8000}, {0xbcaca000}, {0xbcacc000}, {0xbcace000}, - {0xbcad0000}, {0xbcad2000}, {0xbcad4000}, {0xbcad6000}, - {0xbcad8000}, {0xbcada000}, {0xbcadc000}, {0xbcade000}, - {0xbcae0000}, {0xbcae2000}, {0xbcae4000}, {0xbcae6000}, - {0xbcae8000}, {0xbcaea000}, {0xbcaec000}, {0xbcaee000}, - {0xbcaf0000}, {0xbcaf2000}, {0xbcaf4000}, {0xbcaf6000}, - {0xbcaf8000}, {0xbcafa000}, {0xbcafc000}, {0xbcafe000}, - {0xbcb00000}, {0xbcb02000}, {0xbcb04000}, {0xbcb06000}, - {0xbcb08000}, {0xbcb0a000}, {0xbcb0c000}, {0xbcb0e000}, - {0xbcb10000}, {0xbcb12000}, {0xbcb14000}, {0xbcb16000}, - {0xbcb18000}, {0xbcb1a000}, {0xbcb1c000}, {0xbcb1e000}, - {0xbcb20000}, {0xbcb22000}, {0xbcb24000}, {0xbcb26000}, - {0xbcb28000}, {0xbcb2a000}, {0xbcb2c000}, {0xbcb2e000}, - {0xbcb30000}, {0xbcb32000}, {0xbcb34000}, {0xbcb36000}, - {0xbcb38000}, {0xbcb3a000}, {0xbcb3c000}, {0xbcb3e000}, - {0xbcb40000}, {0xbcb42000}, {0xbcb44000}, {0xbcb46000}, - {0xbcb48000}, {0xbcb4a000}, {0xbcb4c000}, {0xbcb4e000}, - {0xbcb50000}, {0xbcb52000}, {0xbcb54000}, {0xbcb56000}, - {0xbcb58000}, {0xbcb5a000}, {0xbcb5c000}, {0xbcb5e000}, - {0xbcb60000}, {0xbcb62000}, {0xbcb64000}, {0xbcb66000}, - {0xbcb68000}, {0xbcb6a000}, {0xbcb6c000}, {0xbcb6e000}, - {0xbcb70000}, {0xbcb72000}, {0xbcb74000}, {0xbcb76000}, - {0xbcb78000}, {0xbcb7a000}, {0xbcb7c000}, {0xbcb7e000}, - {0xbcb80000}, {0xbcb82000}, {0xbcb84000}, {0xbcb86000}, - {0xbcb88000}, {0xbcb8a000}, {0xbcb8c000}, {0xbcb8e000}, - {0xbcb90000}, {0xbcb92000}, {0xbcb94000}, {0xbcb96000}, - {0xbcb98000}, {0xbcb9a000}, {0xbcb9c000}, {0xbcb9e000}, - {0xbcba0000}, {0xbcba2000}, {0xbcba4000}, {0xbcba6000}, - {0xbcba8000}, {0xbcbaa000}, {0xbcbac000}, {0xbcbae000}, - {0xbcbb0000}, {0xbcbb2000}, {0xbcbb4000}, {0xbcbb6000}, - {0xbcbb8000}, {0xbcbba000}, {0xbcbbc000}, {0xbcbbe000}, - {0xbcbc0000}, {0xbcbc2000}, {0xbcbc4000}, {0xbcbc6000}, - {0xbcbc8000}, {0xbcbca000}, {0xbcbcc000}, {0xbcbce000}, - {0xbcbd0000}, {0xbcbd2000}, {0xbcbd4000}, {0xbcbd6000}, - {0xbcbd8000}, {0xbcbda000}, {0xbcbdc000}, {0xbcbde000}, - {0xbcbe0000}, {0xbcbe2000}, {0xbcbe4000}, {0xbcbe6000}, - {0xbcbe8000}, {0xbcbea000}, {0xbcbec000}, {0xbcbee000}, - {0xbcbf0000}, {0xbcbf2000}, {0xbcbf4000}, {0xbcbf6000}, - {0xbcbf8000}, {0xbcbfa000}, {0xbcbfc000}, {0xbcbfe000}, - {0xbcc00000}, {0xbcc02000}, {0xbcc04000}, {0xbcc06000}, - {0xbcc08000}, {0xbcc0a000}, {0xbcc0c000}, {0xbcc0e000}, - {0xbcc10000}, {0xbcc12000}, {0xbcc14000}, {0xbcc16000}, - {0xbcc18000}, {0xbcc1a000}, {0xbcc1c000}, {0xbcc1e000}, - {0xbcc20000}, {0xbcc22000}, {0xbcc24000}, {0xbcc26000}, - {0xbcc28000}, {0xbcc2a000}, {0xbcc2c000}, {0xbcc2e000}, - {0xbcc30000}, {0xbcc32000}, {0xbcc34000}, {0xbcc36000}, - {0xbcc38000}, {0xbcc3a000}, {0xbcc3c000}, {0xbcc3e000}, - {0xbcc40000}, {0xbcc42000}, {0xbcc44000}, {0xbcc46000}, - {0xbcc48000}, {0xbcc4a000}, {0xbcc4c000}, {0xbcc4e000}, - {0xbcc50000}, {0xbcc52000}, {0xbcc54000}, {0xbcc56000}, - {0xbcc58000}, {0xbcc5a000}, {0xbcc5c000}, {0xbcc5e000}, - {0xbcc60000}, {0xbcc62000}, {0xbcc64000}, {0xbcc66000}, - {0xbcc68000}, {0xbcc6a000}, {0xbcc6c000}, {0xbcc6e000}, - {0xbcc70000}, {0xbcc72000}, {0xbcc74000}, {0xbcc76000}, - {0xbcc78000}, {0xbcc7a000}, {0xbcc7c000}, {0xbcc7e000}, - {0xbcc80000}, {0xbcc82000}, {0xbcc84000}, {0xbcc86000}, - {0xbcc88000}, {0xbcc8a000}, {0xbcc8c000}, {0xbcc8e000}, - {0xbcc90000}, {0xbcc92000}, {0xbcc94000}, {0xbcc96000}, - {0xbcc98000}, {0xbcc9a000}, {0xbcc9c000}, {0xbcc9e000}, - {0xbcca0000}, {0xbcca2000}, {0xbcca4000}, {0xbcca6000}, - {0xbcca8000}, {0xbccaa000}, {0xbccac000}, {0xbccae000}, - {0xbccb0000}, {0xbccb2000}, {0xbccb4000}, {0xbccb6000}, - {0xbccb8000}, {0xbccba000}, {0xbccbc000}, {0xbccbe000}, - {0xbccc0000}, {0xbccc2000}, {0xbccc4000}, {0xbccc6000}, - {0xbccc8000}, {0xbccca000}, {0xbcccc000}, {0xbccce000}, - {0xbccd0000}, {0xbccd2000}, {0xbccd4000}, {0xbccd6000}, - {0xbccd8000}, {0xbccda000}, {0xbccdc000}, {0xbccde000}, - {0xbcce0000}, {0xbcce2000}, {0xbcce4000}, {0xbcce6000}, - {0xbcce8000}, {0xbccea000}, {0xbccec000}, {0xbccee000}, - {0xbccf0000}, {0xbccf2000}, {0xbccf4000}, {0xbccf6000}, - {0xbccf8000}, {0xbccfa000}, {0xbccfc000}, {0xbccfe000}, - {0xbcd00000}, {0xbcd02000}, {0xbcd04000}, {0xbcd06000}, - {0xbcd08000}, {0xbcd0a000}, {0xbcd0c000}, {0xbcd0e000}, - {0xbcd10000}, {0xbcd12000}, {0xbcd14000}, {0xbcd16000}, - {0xbcd18000}, {0xbcd1a000}, {0xbcd1c000}, {0xbcd1e000}, - {0xbcd20000}, {0xbcd22000}, {0xbcd24000}, {0xbcd26000}, - {0xbcd28000}, {0xbcd2a000}, {0xbcd2c000}, {0xbcd2e000}, - {0xbcd30000}, {0xbcd32000}, {0xbcd34000}, {0xbcd36000}, - {0xbcd38000}, {0xbcd3a000}, {0xbcd3c000}, {0xbcd3e000}, - {0xbcd40000}, {0xbcd42000}, {0xbcd44000}, {0xbcd46000}, - {0xbcd48000}, {0xbcd4a000}, {0xbcd4c000}, {0xbcd4e000}, - {0xbcd50000}, {0xbcd52000}, {0xbcd54000}, {0xbcd56000}, - {0xbcd58000}, {0xbcd5a000}, {0xbcd5c000}, {0xbcd5e000}, - {0xbcd60000}, {0xbcd62000}, {0xbcd64000}, {0xbcd66000}, - {0xbcd68000}, {0xbcd6a000}, {0xbcd6c000}, {0xbcd6e000}, - {0xbcd70000}, {0xbcd72000}, {0xbcd74000}, {0xbcd76000}, - {0xbcd78000}, {0xbcd7a000}, {0xbcd7c000}, {0xbcd7e000}, - {0xbcd80000}, {0xbcd82000}, {0xbcd84000}, {0xbcd86000}, - {0xbcd88000}, {0xbcd8a000}, {0xbcd8c000}, {0xbcd8e000}, - {0xbcd90000}, {0xbcd92000}, {0xbcd94000}, {0xbcd96000}, - {0xbcd98000}, {0xbcd9a000}, {0xbcd9c000}, {0xbcd9e000}, - {0xbcda0000}, {0xbcda2000}, {0xbcda4000}, {0xbcda6000}, - {0xbcda8000}, {0xbcdaa000}, {0xbcdac000}, {0xbcdae000}, - {0xbcdb0000}, {0xbcdb2000}, {0xbcdb4000}, {0xbcdb6000}, - {0xbcdb8000}, {0xbcdba000}, {0xbcdbc000}, {0xbcdbe000}, - {0xbcdc0000}, {0xbcdc2000}, {0xbcdc4000}, {0xbcdc6000}, - {0xbcdc8000}, {0xbcdca000}, {0xbcdcc000}, {0xbcdce000}, - {0xbcdd0000}, {0xbcdd2000}, {0xbcdd4000}, {0xbcdd6000}, - {0xbcdd8000}, {0xbcdda000}, {0xbcddc000}, {0xbcdde000}, - {0xbcde0000}, {0xbcde2000}, {0xbcde4000}, {0xbcde6000}, - {0xbcde8000}, {0xbcdea000}, {0xbcdec000}, {0xbcdee000}, - {0xbcdf0000}, {0xbcdf2000}, {0xbcdf4000}, {0xbcdf6000}, - {0xbcdf8000}, {0xbcdfa000}, {0xbcdfc000}, {0xbcdfe000}, - {0xbce00000}, {0xbce02000}, {0xbce04000}, {0xbce06000}, - {0xbce08000}, {0xbce0a000}, {0xbce0c000}, {0xbce0e000}, - {0xbce10000}, {0xbce12000}, {0xbce14000}, {0xbce16000}, - {0xbce18000}, {0xbce1a000}, {0xbce1c000}, {0xbce1e000}, - {0xbce20000}, {0xbce22000}, {0xbce24000}, {0xbce26000}, - {0xbce28000}, {0xbce2a000}, {0xbce2c000}, {0xbce2e000}, - {0xbce30000}, {0xbce32000}, {0xbce34000}, {0xbce36000}, - {0xbce38000}, {0xbce3a000}, {0xbce3c000}, {0xbce3e000}, - {0xbce40000}, {0xbce42000}, {0xbce44000}, {0xbce46000}, - {0xbce48000}, {0xbce4a000}, {0xbce4c000}, {0xbce4e000}, - {0xbce50000}, {0xbce52000}, {0xbce54000}, {0xbce56000}, - {0xbce58000}, {0xbce5a000}, {0xbce5c000}, {0xbce5e000}, - {0xbce60000}, {0xbce62000}, {0xbce64000}, {0xbce66000}, - {0xbce68000}, {0xbce6a000}, {0xbce6c000}, {0xbce6e000}, - {0xbce70000}, {0xbce72000}, {0xbce74000}, {0xbce76000}, - {0xbce78000}, {0xbce7a000}, {0xbce7c000}, {0xbce7e000}, - {0xbce80000}, {0xbce82000}, {0xbce84000}, {0xbce86000}, - {0xbce88000}, {0xbce8a000}, {0xbce8c000}, {0xbce8e000}, - {0xbce90000}, {0xbce92000}, {0xbce94000}, {0xbce96000}, - {0xbce98000}, {0xbce9a000}, {0xbce9c000}, {0xbce9e000}, - {0xbcea0000}, {0xbcea2000}, {0xbcea4000}, {0xbcea6000}, - {0xbcea8000}, {0xbceaa000}, {0xbceac000}, {0xbceae000}, - {0xbceb0000}, {0xbceb2000}, {0xbceb4000}, {0xbceb6000}, - {0xbceb8000}, {0xbceba000}, {0xbcebc000}, {0xbcebe000}, - {0xbcec0000}, {0xbcec2000}, {0xbcec4000}, {0xbcec6000}, - {0xbcec8000}, {0xbceca000}, {0xbcecc000}, {0xbcece000}, - {0xbced0000}, {0xbced2000}, {0xbced4000}, {0xbced6000}, - {0xbced8000}, {0xbceda000}, {0xbcedc000}, {0xbcede000}, - {0xbcee0000}, {0xbcee2000}, {0xbcee4000}, {0xbcee6000}, - {0xbcee8000}, {0xbceea000}, {0xbceec000}, {0xbceee000}, - {0xbcef0000}, {0xbcef2000}, {0xbcef4000}, {0xbcef6000}, - {0xbcef8000}, {0xbcefa000}, {0xbcefc000}, {0xbcefe000}, - {0xbcf00000}, {0xbcf02000}, {0xbcf04000}, {0xbcf06000}, - {0xbcf08000}, {0xbcf0a000}, {0xbcf0c000}, {0xbcf0e000}, - {0xbcf10000}, {0xbcf12000}, {0xbcf14000}, {0xbcf16000}, - {0xbcf18000}, {0xbcf1a000}, {0xbcf1c000}, {0xbcf1e000}, - {0xbcf20000}, {0xbcf22000}, {0xbcf24000}, {0xbcf26000}, - {0xbcf28000}, {0xbcf2a000}, {0xbcf2c000}, {0xbcf2e000}, - {0xbcf30000}, {0xbcf32000}, {0xbcf34000}, {0xbcf36000}, - {0xbcf38000}, {0xbcf3a000}, {0xbcf3c000}, {0xbcf3e000}, - {0xbcf40000}, {0xbcf42000}, {0xbcf44000}, {0xbcf46000}, - {0xbcf48000}, {0xbcf4a000}, {0xbcf4c000}, {0xbcf4e000}, - {0xbcf50000}, {0xbcf52000}, {0xbcf54000}, {0xbcf56000}, - {0xbcf58000}, {0xbcf5a000}, {0xbcf5c000}, {0xbcf5e000}, - {0xbcf60000}, {0xbcf62000}, {0xbcf64000}, {0xbcf66000}, - {0xbcf68000}, {0xbcf6a000}, {0xbcf6c000}, {0xbcf6e000}, - {0xbcf70000}, {0xbcf72000}, {0xbcf74000}, {0xbcf76000}, - {0xbcf78000}, {0xbcf7a000}, {0xbcf7c000}, {0xbcf7e000}, - {0xbcf80000}, {0xbcf82000}, {0xbcf84000}, {0xbcf86000}, - {0xbcf88000}, {0xbcf8a000}, {0xbcf8c000}, {0xbcf8e000}, - {0xbcf90000}, {0xbcf92000}, {0xbcf94000}, {0xbcf96000}, - {0xbcf98000}, {0xbcf9a000}, {0xbcf9c000}, {0xbcf9e000}, - {0xbcfa0000}, {0xbcfa2000}, {0xbcfa4000}, {0xbcfa6000}, - {0xbcfa8000}, {0xbcfaa000}, {0xbcfac000}, {0xbcfae000}, - {0xbcfb0000}, {0xbcfb2000}, {0xbcfb4000}, {0xbcfb6000}, - {0xbcfb8000}, {0xbcfba000}, {0xbcfbc000}, {0xbcfbe000}, - {0xbcfc0000}, {0xbcfc2000}, {0xbcfc4000}, {0xbcfc6000}, - {0xbcfc8000}, {0xbcfca000}, {0xbcfcc000}, {0xbcfce000}, - {0xbcfd0000}, {0xbcfd2000}, {0xbcfd4000}, {0xbcfd6000}, - {0xbcfd8000}, {0xbcfda000}, {0xbcfdc000}, {0xbcfde000}, - {0xbcfe0000}, {0xbcfe2000}, {0xbcfe4000}, {0xbcfe6000}, - {0xbcfe8000}, {0xbcfea000}, {0xbcfec000}, {0xbcfee000}, - {0xbcff0000}, {0xbcff2000}, {0xbcff4000}, {0xbcff6000}, - {0xbcff8000}, {0xbcffa000}, {0xbcffc000}, {0xbcffe000}, - {0xbd000000}, {0xbd002000}, {0xbd004000}, {0xbd006000}, - {0xbd008000}, {0xbd00a000}, {0xbd00c000}, {0xbd00e000}, - {0xbd010000}, {0xbd012000}, {0xbd014000}, {0xbd016000}, - {0xbd018000}, {0xbd01a000}, {0xbd01c000}, {0xbd01e000}, - {0xbd020000}, {0xbd022000}, {0xbd024000}, {0xbd026000}, - {0xbd028000}, {0xbd02a000}, {0xbd02c000}, {0xbd02e000}, - {0xbd030000}, {0xbd032000}, {0xbd034000}, {0xbd036000}, - {0xbd038000}, {0xbd03a000}, {0xbd03c000}, {0xbd03e000}, - {0xbd040000}, {0xbd042000}, {0xbd044000}, {0xbd046000}, - {0xbd048000}, {0xbd04a000}, {0xbd04c000}, {0xbd04e000}, - {0xbd050000}, {0xbd052000}, {0xbd054000}, {0xbd056000}, - {0xbd058000}, {0xbd05a000}, {0xbd05c000}, {0xbd05e000}, - {0xbd060000}, {0xbd062000}, {0xbd064000}, {0xbd066000}, - {0xbd068000}, {0xbd06a000}, {0xbd06c000}, {0xbd06e000}, - {0xbd070000}, {0xbd072000}, {0xbd074000}, {0xbd076000}, - {0xbd078000}, {0xbd07a000}, {0xbd07c000}, {0xbd07e000}, - {0xbd080000}, {0xbd082000}, {0xbd084000}, {0xbd086000}, - {0xbd088000}, {0xbd08a000}, {0xbd08c000}, {0xbd08e000}, - {0xbd090000}, {0xbd092000}, {0xbd094000}, {0xbd096000}, - {0xbd098000}, {0xbd09a000}, {0xbd09c000}, {0xbd09e000}, - {0xbd0a0000}, {0xbd0a2000}, {0xbd0a4000}, {0xbd0a6000}, - {0xbd0a8000}, {0xbd0aa000}, {0xbd0ac000}, {0xbd0ae000}, - {0xbd0b0000}, {0xbd0b2000}, {0xbd0b4000}, {0xbd0b6000}, - {0xbd0b8000}, {0xbd0ba000}, {0xbd0bc000}, {0xbd0be000}, - {0xbd0c0000}, {0xbd0c2000}, {0xbd0c4000}, {0xbd0c6000}, - {0xbd0c8000}, {0xbd0ca000}, {0xbd0cc000}, {0xbd0ce000}, - {0xbd0d0000}, {0xbd0d2000}, {0xbd0d4000}, {0xbd0d6000}, - {0xbd0d8000}, {0xbd0da000}, {0xbd0dc000}, {0xbd0de000}, - {0xbd0e0000}, {0xbd0e2000}, {0xbd0e4000}, {0xbd0e6000}, - {0xbd0e8000}, {0xbd0ea000}, {0xbd0ec000}, {0xbd0ee000}, - {0xbd0f0000}, {0xbd0f2000}, {0xbd0f4000}, {0xbd0f6000}, - {0xbd0f8000}, {0xbd0fa000}, {0xbd0fc000}, {0xbd0fe000}, - {0xbd100000}, {0xbd102000}, {0xbd104000}, {0xbd106000}, - {0xbd108000}, {0xbd10a000}, {0xbd10c000}, {0xbd10e000}, - {0xbd110000}, {0xbd112000}, {0xbd114000}, {0xbd116000}, - {0xbd118000}, {0xbd11a000}, {0xbd11c000}, {0xbd11e000}, - {0xbd120000}, {0xbd122000}, {0xbd124000}, {0xbd126000}, - {0xbd128000}, {0xbd12a000}, {0xbd12c000}, {0xbd12e000}, - {0xbd130000}, {0xbd132000}, {0xbd134000}, {0xbd136000}, - {0xbd138000}, {0xbd13a000}, {0xbd13c000}, {0xbd13e000}, - {0xbd140000}, {0xbd142000}, {0xbd144000}, {0xbd146000}, - {0xbd148000}, {0xbd14a000}, {0xbd14c000}, {0xbd14e000}, - {0xbd150000}, {0xbd152000}, {0xbd154000}, {0xbd156000}, - {0xbd158000}, {0xbd15a000}, {0xbd15c000}, {0xbd15e000}, - {0xbd160000}, {0xbd162000}, {0xbd164000}, {0xbd166000}, - {0xbd168000}, {0xbd16a000}, {0xbd16c000}, {0xbd16e000}, - {0xbd170000}, {0xbd172000}, {0xbd174000}, {0xbd176000}, - {0xbd178000}, {0xbd17a000}, {0xbd17c000}, {0xbd17e000}, - {0xbd180000}, {0xbd182000}, {0xbd184000}, {0xbd186000}, - {0xbd188000}, {0xbd18a000}, {0xbd18c000}, {0xbd18e000}, - {0xbd190000}, {0xbd192000}, {0xbd194000}, {0xbd196000}, - {0xbd198000}, {0xbd19a000}, {0xbd19c000}, {0xbd19e000}, - {0xbd1a0000}, {0xbd1a2000}, {0xbd1a4000}, {0xbd1a6000}, - {0xbd1a8000}, {0xbd1aa000}, {0xbd1ac000}, {0xbd1ae000}, - {0xbd1b0000}, {0xbd1b2000}, {0xbd1b4000}, {0xbd1b6000}, - {0xbd1b8000}, {0xbd1ba000}, {0xbd1bc000}, {0xbd1be000}, - {0xbd1c0000}, {0xbd1c2000}, {0xbd1c4000}, {0xbd1c6000}, - {0xbd1c8000}, {0xbd1ca000}, {0xbd1cc000}, {0xbd1ce000}, - {0xbd1d0000}, {0xbd1d2000}, {0xbd1d4000}, {0xbd1d6000}, - {0xbd1d8000}, {0xbd1da000}, {0xbd1dc000}, {0xbd1de000}, - {0xbd1e0000}, {0xbd1e2000}, {0xbd1e4000}, {0xbd1e6000}, - {0xbd1e8000}, {0xbd1ea000}, {0xbd1ec000}, {0xbd1ee000}, - {0xbd1f0000}, {0xbd1f2000}, {0xbd1f4000}, {0xbd1f6000}, - {0xbd1f8000}, {0xbd1fa000}, {0xbd1fc000}, {0xbd1fe000}, - {0xbd200000}, {0xbd202000}, {0xbd204000}, {0xbd206000}, - {0xbd208000}, {0xbd20a000}, {0xbd20c000}, {0xbd20e000}, - {0xbd210000}, {0xbd212000}, {0xbd214000}, {0xbd216000}, - {0xbd218000}, {0xbd21a000}, {0xbd21c000}, {0xbd21e000}, - {0xbd220000}, {0xbd222000}, {0xbd224000}, {0xbd226000}, - {0xbd228000}, {0xbd22a000}, {0xbd22c000}, {0xbd22e000}, - {0xbd230000}, {0xbd232000}, {0xbd234000}, {0xbd236000}, - {0xbd238000}, {0xbd23a000}, {0xbd23c000}, {0xbd23e000}, - {0xbd240000}, {0xbd242000}, {0xbd244000}, {0xbd246000}, - {0xbd248000}, {0xbd24a000}, {0xbd24c000}, {0xbd24e000}, - {0xbd250000}, {0xbd252000}, {0xbd254000}, {0xbd256000}, - {0xbd258000}, {0xbd25a000}, {0xbd25c000}, {0xbd25e000}, - {0xbd260000}, {0xbd262000}, {0xbd264000}, {0xbd266000}, - {0xbd268000}, {0xbd26a000}, {0xbd26c000}, {0xbd26e000}, - {0xbd270000}, {0xbd272000}, {0xbd274000}, {0xbd276000}, - {0xbd278000}, {0xbd27a000}, {0xbd27c000}, {0xbd27e000}, - {0xbd280000}, {0xbd282000}, {0xbd284000}, {0xbd286000}, - {0xbd288000}, {0xbd28a000}, {0xbd28c000}, {0xbd28e000}, - {0xbd290000}, {0xbd292000}, {0xbd294000}, {0xbd296000}, - {0xbd298000}, {0xbd29a000}, {0xbd29c000}, {0xbd29e000}, - {0xbd2a0000}, {0xbd2a2000}, {0xbd2a4000}, {0xbd2a6000}, - {0xbd2a8000}, {0xbd2aa000}, {0xbd2ac000}, {0xbd2ae000}, - {0xbd2b0000}, {0xbd2b2000}, {0xbd2b4000}, {0xbd2b6000}, - {0xbd2b8000}, {0xbd2ba000}, {0xbd2bc000}, {0xbd2be000}, - {0xbd2c0000}, {0xbd2c2000}, {0xbd2c4000}, {0xbd2c6000}, - {0xbd2c8000}, {0xbd2ca000}, {0xbd2cc000}, {0xbd2ce000}, - {0xbd2d0000}, {0xbd2d2000}, {0xbd2d4000}, {0xbd2d6000}, - {0xbd2d8000}, {0xbd2da000}, {0xbd2dc000}, {0xbd2de000}, - {0xbd2e0000}, {0xbd2e2000}, {0xbd2e4000}, {0xbd2e6000}, - {0xbd2e8000}, {0xbd2ea000}, {0xbd2ec000}, {0xbd2ee000}, - {0xbd2f0000}, {0xbd2f2000}, {0xbd2f4000}, {0xbd2f6000}, - {0xbd2f8000}, {0xbd2fa000}, {0xbd2fc000}, {0xbd2fe000}, - {0xbd300000}, {0xbd302000}, {0xbd304000}, {0xbd306000}, - {0xbd308000}, {0xbd30a000}, {0xbd30c000}, {0xbd30e000}, - {0xbd310000}, {0xbd312000}, {0xbd314000}, {0xbd316000}, - {0xbd318000}, {0xbd31a000}, {0xbd31c000}, {0xbd31e000}, - {0xbd320000}, {0xbd322000}, {0xbd324000}, {0xbd326000}, - {0xbd328000}, {0xbd32a000}, {0xbd32c000}, {0xbd32e000}, - {0xbd330000}, {0xbd332000}, {0xbd334000}, {0xbd336000}, - {0xbd338000}, {0xbd33a000}, {0xbd33c000}, {0xbd33e000}, - {0xbd340000}, {0xbd342000}, {0xbd344000}, {0xbd346000}, - {0xbd348000}, {0xbd34a000}, {0xbd34c000}, {0xbd34e000}, - {0xbd350000}, {0xbd352000}, {0xbd354000}, {0xbd356000}, - {0xbd358000}, {0xbd35a000}, {0xbd35c000}, {0xbd35e000}, - {0xbd360000}, {0xbd362000}, {0xbd364000}, {0xbd366000}, - {0xbd368000}, {0xbd36a000}, {0xbd36c000}, {0xbd36e000}, - {0xbd370000}, {0xbd372000}, {0xbd374000}, {0xbd376000}, - {0xbd378000}, {0xbd37a000}, {0xbd37c000}, {0xbd37e000}, - {0xbd380000}, {0xbd382000}, {0xbd384000}, {0xbd386000}, - {0xbd388000}, {0xbd38a000}, {0xbd38c000}, {0xbd38e000}, - {0xbd390000}, {0xbd392000}, {0xbd394000}, {0xbd396000}, - {0xbd398000}, {0xbd39a000}, {0xbd39c000}, {0xbd39e000}, - {0xbd3a0000}, {0xbd3a2000}, {0xbd3a4000}, {0xbd3a6000}, - {0xbd3a8000}, {0xbd3aa000}, {0xbd3ac000}, {0xbd3ae000}, - {0xbd3b0000}, {0xbd3b2000}, {0xbd3b4000}, {0xbd3b6000}, - {0xbd3b8000}, {0xbd3ba000}, {0xbd3bc000}, {0xbd3be000}, - {0xbd3c0000}, {0xbd3c2000}, {0xbd3c4000}, {0xbd3c6000}, - {0xbd3c8000}, {0xbd3ca000}, {0xbd3cc000}, {0xbd3ce000}, - {0xbd3d0000}, {0xbd3d2000}, {0xbd3d4000}, {0xbd3d6000}, - {0xbd3d8000}, {0xbd3da000}, {0xbd3dc000}, {0xbd3de000}, - {0xbd3e0000}, {0xbd3e2000}, {0xbd3e4000}, {0xbd3e6000}, - {0xbd3e8000}, {0xbd3ea000}, {0xbd3ec000}, {0xbd3ee000}, - {0xbd3f0000}, {0xbd3f2000}, {0xbd3f4000}, {0xbd3f6000}, - {0xbd3f8000}, {0xbd3fa000}, {0xbd3fc000}, {0xbd3fe000}, - {0xbd400000}, {0xbd402000}, {0xbd404000}, {0xbd406000}, - {0xbd408000}, {0xbd40a000}, {0xbd40c000}, {0xbd40e000}, - {0xbd410000}, {0xbd412000}, {0xbd414000}, {0xbd416000}, - {0xbd418000}, {0xbd41a000}, {0xbd41c000}, {0xbd41e000}, - {0xbd420000}, {0xbd422000}, {0xbd424000}, {0xbd426000}, - {0xbd428000}, {0xbd42a000}, {0xbd42c000}, {0xbd42e000}, - {0xbd430000}, {0xbd432000}, {0xbd434000}, {0xbd436000}, - {0xbd438000}, {0xbd43a000}, {0xbd43c000}, {0xbd43e000}, - {0xbd440000}, {0xbd442000}, {0xbd444000}, {0xbd446000}, - {0xbd448000}, {0xbd44a000}, {0xbd44c000}, {0xbd44e000}, - {0xbd450000}, {0xbd452000}, {0xbd454000}, {0xbd456000}, - {0xbd458000}, {0xbd45a000}, {0xbd45c000}, {0xbd45e000}, - {0xbd460000}, {0xbd462000}, {0xbd464000}, {0xbd466000}, - {0xbd468000}, {0xbd46a000}, {0xbd46c000}, {0xbd46e000}, - {0xbd470000}, {0xbd472000}, {0xbd474000}, {0xbd476000}, - {0xbd478000}, {0xbd47a000}, {0xbd47c000}, {0xbd47e000}, - {0xbd480000}, {0xbd482000}, {0xbd484000}, {0xbd486000}, - {0xbd488000}, {0xbd48a000}, {0xbd48c000}, {0xbd48e000}, - {0xbd490000}, {0xbd492000}, {0xbd494000}, {0xbd496000}, - {0xbd498000}, {0xbd49a000}, {0xbd49c000}, {0xbd49e000}, - {0xbd4a0000}, {0xbd4a2000}, {0xbd4a4000}, {0xbd4a6000}, - {0xbd4a8000}, {0xbd4aa000}, {0xbd4ac000}, {0xbd4ae000}, - {0xbd4b0000}, {0xbd4b2000}, {0xbd4b4000}, {0xbd4b6000}, - {0xbd4b8000}, {0xbd4ba000}, {0xbd4bc000}, {0xbd4be000}, - {0xbd4c0000}, {0xbd4c2000}, {0xbd4c4000}, {0xbd4c6000}, - {0xbd4c8000}, {0xbd4ca000}, {0xbd4cc000}, {0xbd4ce000}, - {0xbd4d0000}, {0xbd4d2000}, {0xbd4d4000}, {0xbd4d6000}, - {0xbd4d8000}, {0xbd4da000}, {0xbd4dc000}, {0xbd4de000}, - {0xbd4e0000}, {0xbd4e2000}, {0xbd4e4000}, {0xbd4e6000}, - {0xbd4e8000}, {0xbd4ea000}, {0xbd4ec000}, {0xbd4ee000}, - {0xbd4f0000}, {0xbd4f2000}, {0xbd4f4000}, {0xbd4f6000}, - {0xbd4f8000}, {0xbd4fa000}, {0xbd4fc000}, {0xbd4fe000}, - {0xbd500000}, {0xbd502000}, {0xbd504000}, {0xbd506000}, - {0xbd508000}, {0xbd50a000}, {0xbd50c000}, {0xbd50e000}, - {0xbd510000}, {0xbd512000}, {0xbd514000}, {0xbd516000}, - {0xbd518000}, {0xbd51a000}, {0xbd51c000}, {0xbd51e000}, - {0xbd520000}, {0xbd522000}, {0xbd524000}, {0xbd526000}, - {0xbd528000}, {0xbd52a000}, {0xbd52c000}, {0xbd52e000}, - {0xbd530000}, {0xbd532000}, {0xbd534000}, {0xbd536000}, - {0xbd538000}, {0xbd53a000}, {0xbd53c000}, {0xbd53e000}, - {0xbd540000}, {0xbd542000}, {0xbd544000}, {0xbd546000}, - {0xbd548000}, {0xbd54a000}, {0xbd54c000}, {0xbd54e000}, - {0xbd550000}, {0xbd552000}, {0xbd554000}, {0xbd556000}, - {0xbd558000}, {0xbd55a000}, {0xbd55c000}, {0xbd55e000}, - {0xbd560000}, {0xbd562000}, {0xbd564000}, {0xbd566000}, - {0xbd568000}, {0xbd56a000}, {0xbd56c000}, {0xbd56e000}, - {0xbd570000}, {0xbd572000}, {0xbd574000}, {0xbd576000}, - {0xbd578000}, {0xbd57a000}, {0xbd57c000}, {0xbd57e000}, - {0xbd580000}, {0xbd582000}, {0xbd584000}, {0xbd586000}, - {0xbd588000}, {0xbd58a000}, {0xbd58c000}, {0xbd58e000}, - {0xbd590000}, {0xbd592000}, {0xbd594000}, {0xbd596000}, - {0xbd598000}, {0xbd59a000}, {0xbd59c000}, {0xbd59e000}, - {0xbd5a0000}, {0xbd5a2000}, {0xbd5a4000}, {0xbd5a6000}, - {0xbd5a8000}, {0xbd5aa000}, {0xbd5ac000}, {0xbd5ae000}, - {0xbd5b0000}, {0xbd5b2000}, {0xbd5b4000}, {0xbd5b6000}, - {0xbd5b8000}, {0xbd5ba000}, {0xbd5bc000}, {0xbd5be000}, - {0xbd5c0000}, {0xbd5c2000}, {0xbd5c4000}, {0xbd5c6000}, - {0xbd5c8000}, {0xbd5ca000}, {0xbd5cc000}, {0xbd5ce000}, - {0xbd5d0000}, {0xbd5d2000}, {0xbd5d4000}, {0xbd5d6000}, - {0xbd5d8000}, {0xbd5da000}, {0xbd5dc000}, {0xbd5de000}, - {0xbd5e0000}, {0xbd5e2000}, {0xbd5e4000}, {0xbd5e6000}, - {0xbd5e8000}, {0xbd5ea000}, {0xbd5ec000}, {0xbd5ee000}, - {0xbd5f0000}, {0xbd5f2000}, {0xbd5f4000}, {0xbd5f6000}, - {0xbd5f8000}, {0xbd5fa000}, {0xbd5fc000}, {0xbd5fe000}, - {0xbd600000}, {0xbd602000}, {0xbd604000}, {0xbd606000}, - {0xbd608000}, {0xbd60a000}, {0xbd60c000}, {0xbd60e000}, - {0xbd610000}, {0xbd612000}, {0xbd614000}, {0xbd616000}, - {0xbd618000}, {0xbd61a000}, {0xbd61c000}, {0xbd61e000}, - {0xbd620000}, {0xbd622000}, {0xbd624000}, {0xbd626000}, - {0xbd628000}, {0xbd62a000}, {0xbd62c000}, {0xbd62e000}, - {0xbd630000}, {0xbd632000}, {0xbd634000}, {0xbd636000}, - {0xbd638000}, {0xbd63a000}, {0xbd63c000}, {0xbd63e000}, - {0xbd640000}, {0xbd642000}, {0xbd644000}, {0xbd646000}, - {0xbd648000}, {0xbd64a000}, {0xbd64c000}, {0xbd64e000}, - {0xbd650000}, {0xbd652000}, {0xbd654000}, {0xbd656000}, - {0xbd658000}, {0xbd65a000}, {0xbd65c000}, {0xbd65e000}, - {0xbd660000}, {0xbd662000}, {0xbd664000}, {0xbd666000}, - {0xbd668000}, {0xbd66a000}, {0xbd66c000}, {0xbd66e000}, - {0xbd670000}, {0xbd672000}, {0xbd674000}, {0xbd676000}, - {0xbd678000}, {0xbd67a000}, {0xbd67c000}, {0xbd67e000}, - {0xbd680000}, {0xbd682000}, {0xbd684000}, {0xbd686000}, - {0xbd688000}, {0xbd68a000}, {0xbd68c000}, {0xbd68e000}, - {0xbd690000}, {0xbd692000}, {0xbd694000}, {0xbd696000}, - {0xbd698000}, {0xbd69a000}, {0xbd69c000}, {0xbd69e000}, - {0xbd6a0000}, {0xbd6a2000}, {0xbd6a4000}, {0xbd6a6000}, - {0xbd6a8000}, {0xbd6aa000}, {0xbd6ac000}, {0xbd6ae000}, - {0xbd6b0000}, {0xbd6b2000}, {0xbd6b4000}, {0xbd6b6000}, - {0xbd6b8000}, {0xbd6ba000}, {0xbd6bc000}, {0xbd6be000}, - {0xbd6c0000}, {0xbd6c2000}, {0xbd6c4000}, {0xbd6c6000}, - {0xbd6c8000}, {0xbd6ca000}, {0xbd6cc000}, {0xbd6ce000}, - {0xbd6d0000}, {0xbd6d2000}, {0xbd6d4000}, {0xbd6d6000}, - {0xbd6d8000}, {0xbd6da000}, {0xbd6dc000}, {0xbd6de000}, - {0xbd6e0000}, {0xbd6e2000}, {0xbd6e4000}, {0xbd6e6000}, - {0xbd6e8000}, {0xbd6ea000}, {0xbd6ec000}, {0xbd6ee000}, - {0xbd6f0000}, {0xbd6f2000}, {0xbd6f4000}, {0xbd6f6000}, - {0xbd6f8000}, {0xbd6fa000}, {0xbd6fc000}, {0xbd6fe000}, - {0xbd700000}, {0xbd702000}, {0xbd704000}, {0xbd706000}, - {0xbd708000}, {0xbd70a000}, {0xbd70c000}, {0xbd70e000}, - {0xbd710000}, {0xbd712000}, {0xbd714000}, {0xbd716000}, - {0xbd718000}, {0xbd71a000}, {0xbd71c000}, {0xbd71e000}, - {0xbd720000}, {0xbd722000}, {0xbd724000}, {0xbd726000}, - {0xbd728000}, {0xbd72a000}, {0xbd72c000}, {0xbd72e000}, - {0xbd730000}, {0xbd732000}, {0xbd734000}, {0xbd736000}, - {0xbd738000}, {0xbd73a000}, {0xbd73c000}, {0xbd73e000}, - {0xbd740000}, {0xbd742000}, {0xbd744000}, {0xbd746000}, - {0xbd748000}, {0xbd74a000}, {0xbd74c000}, {0xbd74e000}, - {0xbd750000}, {0xbd752000}, {0xbd754000}, {0xbd756000}, - {0xbd758000}, {0xbd75a000}, {0xbd75c000}, {0xbd75e000}, - {0xbd760000}, {0xbd762000}, {0xbd764000}, {0xbd766000}, - {0xbd768000}, {0xbd76a000}, {0xbd76c000}, {0xbd76e000}, - {0xbd770000}, {0xbd772000}, {0xbd774000}, {0xbd776000}, - {0xbd778000}, {0xbd77a000}, {0xbd77c000}, {0xbd77e000}, - {0xbd780000}, {0xbd782000}, {0xbd784000}, {0xbd786000}, - {0xbd788000}, {0xbd78a000}, {0xbd78c000}, {0xbd78e000}, - {0xbd790000}, {0xbd792000}, {0xbd794000}, {0xbd796000}, - {0xbd798000}, {0xbd79a000}, {0xbd79c000}, {0xbd79e000}, - {0xbd7a0000}, {0xbd7a2000}, {0xbd7a4000}, {0xbd7a6000}, - {0xbd7a8000}, {0xbd7aa000}, {0xbd7ac000}, {0xbd7ae000}, - {0xbd7b0000}, {0xbd7b2000}, {0xbd7b4000}, {0xbd7b6000}, - {0xbd7b8000}, {0xbd7ba000}, {0xbd7bc000}, {0xbd7be000}, - {0xbd7c0000}, {0xbd7c2000}, {0xbd7c4000}, {0xbd7c6000}, - {0xbd7c8000}, {0xbd7ca000}, {0xbd7cc000}, {0xbd7ce000}, - {0xbd7d0000}, {0xbd7d2000}, {0xbd7d4000}, {0xbd7d6000}, - {0xbd7d8000}, {0xbd7da000}, {0xbd7dc000}, {0xbd7de000}, - {0xbd7e0000}, {0xbd7e2000}, {0xbd7e4000}, {0xbd7e6000}, - {0xbd7e8000}, {0xbd7ea000}, {0xbd7ec000}, {0xbd7ee000}, - {0xbd7f0000}, {0xbd7f2000}, {0xbd7f4000}, {0xbd7f6000}, - {0xbd7f8000}, {0xbd7fa000}, {0xbd7fc000}, {0xbd7fe000}, - {0xbd800000}, {0xbd802000}, {0xbd804000}, {0xbd806000}, - {0xbd808000}, {0xbd80a000}, {0xbd80c000}, {0xbd80e000}, - {0xbd810000}, {0xbd812000}, {0xbd814000}, {0xbd816000}, - {0xbd818000}, {0xbd81a000}, {0xbd81c000}, {0xbd81e000}, - {0xbd820000}, {0xbd822000}, {0xbd824000}, {0xbd826000}, - {0xbd828000}, {0xbd82a000}, {0xbd82c000}, {0xbd82e000}, - {0xbd830000}, {0xbd832000}, {0xbd834000}, {0xbd836000}, - {0xbd838000}, {0xbd83a000}, {0xbd83c000}, {0xbd83e000}, - {0xbd840000}, {0xbd842000}, {0xbd844000}, {0xbd846000}, - {0xbd848000}, {0xbd84a000}, {0xbd84c000}, {0xbd84e000}, - {0xbd850000}, {0xbd852000}, {0xbd854000}, {0xbd856000}, - {0xbd858000}, {0xbd85a000}, {0xbd85c000}, {0xbd85e000}, - {0xbd860000}, {0xbd862000}, {0xbd864000}, {0xbd866000}, - {0xbd868000}, {0xbd86a000}, {0xbd86c000}, {0xbd86e000}, - {0xbd870000}, {0xbd872000}, {0xbd874000}, {0xbd876000}, - {0xbd878000}, {0xbd87a000}, {0xbd87c000}, {0xbd87e000}, - {0xbd880000}, {0xbd882000}, {0xbd884000}, {0xbd886000}, - {0xbd888000}, {0xbd88a000}, {0xbd88c000}, {0xbd88e000}, - {0xbd890000}, {0xbd892000}, {0xbd894000}, {0xbd896000}, - {0xbd898000}, {0xbd89a000}, {0xbd89c000}, {0xbd89e000}, - {0xbd8a0000}, {0xbd8a2000}, {0xbd8a4000}, {0xbd8a6000}, - {0xbd8a8000}, {0xbd8aa000}, {0xbd8ac000}, {0xbd8ae000}, - {0xbd8b0000}, {0xbd8b2000}, {0xbd8b4000}, {0xbd8b6000}, - {0xbd8b8000}, {0xbd8ba000}, {0xbd8bc000}, {0xbd8be000}, - {0xbd8c0000}, {0xbd8c2000}, {0xbd8c4000}, {0xbd8c6000}, - {0xbd8c8000}, {0xbd8ca000}, {0xbd8cc000}, {0xbd8ce000}, - {0xbd8d0000}, {0xbd8d2000}, {0xbd8d4000}, {0xbd8d6000}, - {0xbd8d8000}, {0xbd8da000}, {0xbd8dc000}, {0xbd8de000}, - {0xbd8e0000}, {0xbd8e2000}, {0xbd8e4000}, {0xbd8e6000}, - {0xbd8e8000}, {0xbd8ea000}, {0xbd8ec000}, {0xbd8ee000}, - {0xbd8f0000}, {0xbd8f2000}, {0xbd8f4000}, {0xbd8f6000}, - {0xbd8f8000}, {0xbd8fa000}, {0xbd8fc000}, {0xbd8fe000}, - {0xbd900000}, {0xbd902000}, {0xbd904000}, {0xbd906000}, - {0xbd908000}, {0xbd90a000}, {0xbd90c000}, {0xbd90e000}, - {0xbd910000}, {0xbd912000}, {0xbd914000}, {0xbd916000}, - {0xbd918000}, {0xbd91a000}, {0xbd91c000}, {0xbd91e000}, - {0xbd920000}, {0xbd922000}, {0xbd924000}, {0xbd926000}, - {0xbd928000}, {0xbd92a000}, {0xbd92c000}, {0xbd92e000}, - {0xbd930000}, {0xbd932000}, {0xbd934000}, {0xbd936000}, - {0xbd938000}, {0xbd93a000}, {0xbd93c000}, {0xbd93e000}, - {0xbd940000}, {0xbd942000}, {0xbd944000}, {0xbd946000}, - {0xbd948000}, {0xbd94a000}, {0xbd94c000}, {0xbd94e000}, - {0xbd950000}, {0xbd952000}, {0xbd954000}, {0xbd956000}, - {0xbd958000}, {0xbd95a000}, {0xbd95c000}, {0xbd95e000}, - {0xbd960000}, {0xbd962000}, {0xbd964000}, {0xbd966000}, - {0xbd968000}, {0xbd96a000}, {0xbd96c000}, {0xbd96e000}, - {0xbd970000}, {0xbd972000}, {0xbd974000}, {0xbd976000}, - {0xbd978000}, {0xbd97a000}, {0xbd97c000}, {0xbd97e000}, - {0xbd980000}, {0xbd982000}, {0xbd984000}, {0xbd986000}, - {0xbd988000}, {0xbd98a000}, {0xbd98c000}, {0xbd98e000}, - {0xbd990000}, {0xbd992000}, {0xbd994000}, {0xbd996000}, - {0xbd998000}, {0xbd99a000}, {0xbd99c000}, {0xbd99e000}, - {0xbd9a0000}, {0xbd9a2000}, {0xbd9a4000}, {0xbd9a6000}, - {0xbd9a8000}, {0xbd9aa000}, {0xbd9ac000}, {0xbd9ae000}, - {0xbd9b0000}, {0xbd9b2000}, {0xbd9b4000}, {0xbd9b6000}, - {0xbd9b8000}, {0xbd9ba000}, {0xbd9bc000}, {0xbd9be000}, - {0xbd9c0000}, {0xbd9c2000}, {0xbd9c4000}, {0xbd9c6000}, - {0xbd9c8000}, {0xbd9ca000}, {0xbd9cc000}, {0xbd9ce000}, - {0xbd9d0000}, {0xbd9d2000}, {0xbd9d4000}, {0xbd9d6000}, - {0xbd9d8000}, {0xbd9da000}, {0xbd9dc000}, {0xbd9de000}, - {0xbd9e0000}, {0xbd9e2000}, {0xbd9e4000}, {0xbd9e6000}, - {0xbd9e8000}, {0xbd9ea000}, {0xbd9ec000}, {0xbd9ee000}, - {0xbd9f0000}, {0xbd9f2000}, {0xbd9f4000}, {0xbd9f6000}, - {0xbd9f8000}, {0xbd9fa000}, {0xbd9fc000}, {0xbd9fe000}, - {0xbda00000}, {0xbda02000}, {0xbda04000}, {0xbda06000}, - {0xbda08000}, {0xbda0a000}, {0xbda0c000}, {0xbda0e000}, - {0xbda10000}, {0xbda12000}, {0xbda14000}, {0xbda16000}, - {0xbda18000}, {0xbda1a000}, {0xbda1c000}, {0xbda1e000}, - {0xbda20000}, {0xbda22000}, {0xbda24000}, {0xbda26000}, - {0xbda28000}, {0xbda2a000}, {0xbda2c000}, {0xbda2e000}, - {0xbda30000}, {0xbda32000}, {0xbda34000}, {0xbda36000}, - {0xbda38000}, {0xbda3a000}, {0xbda3c000}, {0xbda3e000}, - {0xbda40000}, {0xbda42000}, {0xbda44000}, {0xbda46000}, - {0xbda48000}, {0xbda4a000}, {0xbda4c000}, {0xbda4e000}, - {0xbda50000}, {0xbda52000}, {0xbda54000}, {0xbda56000}, - {0xbda58000}, {0xbda5a000}, {0xbda5c000}, {0xbda5e000}, - {0xbda60000}, {0xbda62000}, {0xbda64000}, {0xbda66000}, - {0xbda68000}, {0xbda6a000}, {0xbda6c000}, {0xbda6e000}, - {0xbda70000}, {0xbda72000}, {0xbda74000}, {0xbda76000}, - {0xbda78000}, {0xbda7a000}, {0xbda7c000}, {0xbda7e000}, - {0xbda80000}, {0xbda82000}, {0xbda84000}, {0xbda86000}, - {0xbda88000}, {0xbda8a000}, {0xbda8c000}, {0xbda8e000}, - {0xbda90000}, {0xbda92000}, {0xbda94000}, {0xbda96000}, - {0xbda98000}, {0xbda9a000}, {0xbda9c000}, {0xbda9e000}, - {0xbdaa0000}, {0xbdaa2000}, {0xbdaa4000}, {0xbdaa6000}, - {0xbdaa8000}, {0xbdaaa000}, {0xbdaac000}, {0xbdaae000}, - {0xbdab0000}, {0xbdab2000}, {0xbdab4000}, {0xbdab6000}, - {0xbdab8000}, {0xbdaba000}, {0xbdabc000}, {0xbdabe000}, - {0xbdac0000}, {0xbdac2000}, {0xbdac4000}, {0xbdac6000}, - {0xbdac8000}, {0xbdaca000}, {0xbdacc000}, {0xbdace000}, - {0xbdad0000}, {0xbdad2000}, {0xbdad4000}, {0xbdad6000}, - {0xbdad8000}, {0xbdada000}, {0xbdadc000}, {0xbdade000}, - {0xbdae0000}, {0xbdae2000}, {0xbdae4000}, {0xbdae6000}, - {0xbdae8000}, {0xbdaea000}, {0xbdaec000}, {0xbdaee000}, - {0xbdaf0000}, {0xbdaf2000}, {0xbdaf4000}, {0xbdaf6000}, - {0xbdaf8000}, {0xbdafa000}, {0xbdafc000}, {0xbdafe000}, - {0xbdb00000}, {0xbdb02000}, {0xbdb04000}, {0xbdb06000}, - {0xbdb08000}, {0xbdb0a000}, {0xbdb0c000}, {0xbdb0e000}, - {0xbdb10000}, {0xbdb12000}, {0xbdb14000}, {0xbdb16000}, - {0xbdb18000}, {0xbdb1a000}, {0xbdb1c000}, {0xbdb1e000}, - {0xbdb20000}, {0xbdb22000}, {0xbdb24000}, {0xbdb26000}, - {0xbdb28000}, {0xbdb2a000}, {0xbdb2c000}, {0xbdb2e000}, - {0xbdb30000}, {0xbdb32000}, {0xbdb34000}, {0xbdb36000}, - {0xbdb38000}, {0xbdb3a000}, {0xbdb3c000}, {0xbdb3e000}, - {0xbdb40000}, {0xbdb42000}, {0xbdb44000}, {0xbdb46000}, - {0xbdb48000}, {0xbdb4a000}, {0xbdb4c000}, {0xbdb4e000}, - {0xbdb50000}, {0xbdb52000}, {0xbdb54000}, {0xbdb56000}, - {0xbdb58000}, {0xbdb5a000}, {0xbdb5c000}, {0xbdb5e000}, - {0xbdb60000}, {0xbdb62000}, {0xbdb64000}, {0xbdb66000}, - {0xbdb68000}, {0xbdb6a000}, {0xbdb6c000}, {0xbdb6e000}, - {0xbdb70000}, {0xbdb72000}, {0xbdb74000}, {0xbdb76000}, - {0xbdb78000}, {0xbdb7a000}, {0xbdb7c000}, {0xbdb7e000}, - {0xbdb80000}, {0xbdb82000}, {0xbdb84000}, {0xbdb86000}, - {0xbdb88000}, {0xbdb8a000}, {0xbdb8c000}, {0xbdb8e000}, - {0xbdb90000}, {0xbdb92000}, {0xbdb94000}, {0xbdb96000}, - {0xbdb98000}, {0xbdb9a000}, {0xbdb9c000}, {0xbdb9e000}, - {0xbdba0000}, {0xbdba2000}, {0xbdba4000}, {0xbdba6000}, - {0xbdba8000}, {0xbdbaa000}, {0xbdbac000}, {0xbdbae000}, - {0xbdbb0000}, {0xbdbb2000}, {0xbdbb4000}, {0xbdbb6000}, - {0xbdbb8000}, {0xbdbba000}, {0xbdbbc000}, {0xbdbbe000}, - {0xbdbc0000}, {0xbdbc2000}, {0xbdbc4000}, {0xbdbc6000}, - {0xbdbc8000}, {0xbdbca000}, {0xbdbcc000}, {0xbdbce000}, - {0xbdbd0000}, {0xbdbd2000}, {0xbdbd4000}, {0xbdbd6000}, - {0xbdbd8000}, {0xbdbda000}, {0xbdbdc000}, {0xbdbde000}, - {0xbdbe0000}, {0xbdbe2000}, {0xbdbe4000}, {0xbdbe6000}, - {0xbdbe8000}, {0xbdbea000}, {0xbdbec000}, {0xbdbee000}, - {0xbdbf0000}, {0xbdbf2000}, {0xbdbf4000}, {0xbdbf6000}, - {0xbdbf8000}, {0xbdbfa000}, {0xbdbfc000}, {0xbdbfe000}, - {0xbdc00000}, {0xbdc02000}, {0xbdc04000}, {0xbdc06000}, - {0xbdc08000}, {0xbdc0a000}, {0xbdc0c000}, {0xbdc0e000}, - {0xbdc10000}, {0xbdc12000}, {0xbdc14000}, {0xbdc16000}, - {0xbdc18000}, {0xbdc1a000}, {0xbdc1c000}, {0xbdc1e000}, - {0xbdc20000}, {0xbdc22000}, {0xbdc24000}, {0xbdc26000}, - {0xbdc28000}, {0xbdc2a000}, {0xbdc2c000}, {0xbdc2e000}, - {0xbdc30000}, {0xbdc32000}, {0xbdc34000}, {0xbdc36000}, - {0xbdc38000}, {0xbdc3a000}, {0xbdc3c000}, {0xbdc3e000}, - {0xbdc40000}, {0xbdc42000}, {0xbdc44000}, {0xbdc46000}, - {0xbdc48000}, {0xbdc4a000}, {0xbdc4c000}, {0xbdc4e000}, - {0xbdc50000}, {0xbdc52000}, {0xbdc54000}, {0xbdc56000}, - {0xbdc58000}, {0xbdc5a000}, {0xbdc5c000}, {0xbdc5e000}, - {0xbdc60000}, {0xbdc62000}, {0xbdc64000}, {0xbdc66000}, - {0xbdc68000}, {0xbdc6a000}, {0xbdc6c000}, {0xbdc6e000}, - {0xbdc70000}, {0xbdc72000}, {0xbdc74000}, {0xbdc76000}, - {0xbdc78000}, {0xbdc7a000}, {0xbdc7c000}, {0xbdc7e000}, - {0xbdc80000}, {0xbdc82000}, {0xbdc84000}, {0xbdc86000}, - {0xbdc88000}, {0xbdc8a000}, {0xbdc8c000}, {0xbdc8e000}, - {0xbdc90000}, {0xbdc92000}, {0xbdc94000}, {0xbdc96000}, - {0xbdc98000}, {0xbdc9a000}, {0xbdc9c000}, {0xbdc9e000}, - {0xbdca0000}, {0xbdca2000}, {0xbdca4000}, {0xbdca6000}, - {0xbdca8000}, {0xbdcaa000}, {0xbdcac000}, {0xbdcae000}, - {0xbdcb0000}, {0xbdcb2000}, {0xbdcb4000}, {0xbdcb6000}, - {0xbdcb8000}, {0xbdcba000}, {0xbdcbc000}, {0xbdcbe000}, - {0xbdcc0000}, {0xbdcc2000}, {0xbdcc4000}, {0xbdcc6000}, - {0xbdcc8000}, {0xbdcca000}, {0xbdccc000}, {0xbdcce000}, - {0xbdcd0000}, {0xbdcd2000}, {0xbdcd4000}, {0xbdcd6000}, - {0xbdcd8000}, {0xbdcda000}, {0xbdcdc000}, {0xbdcde000}, - {0xbdce0000}, {0xbdce2000}, {0xbdce4000}, {0xbdce6000}, - {0xbdce8000}, {0xbdcea000}, {0xbdcec000}, {0xbdcee000}, - {0xbdcf0000}, {0xbdcf2000}, {0xbdcf4000}, {0xbdcf6000}, - {0xbdcf8000}, {0xbdcfa000}, {0xbdcfc000}, {0xbdcfe000}, - {0xbdd00000}, {0xbdd02000}, {0xbdd04000}, {0xbdd06000}, - {0xbdd08000}, {0xbdd0a000}, {0xbdd0c000}, {0xbdd0e000}, - {0xbdd10000}, {0xbdd12000}, {0xbdd14000}, {0xbdd16000}, - {0xbdd18000}, {0xbdd1a000}, {0xbdd1c000}, {0xbdd1e000}, - {0xbdd20000}, {0xbdd22000}, {0xbdd24000}, {0xbdd26000}, - {0xbdd28000}, {0xbdd2a000}, {0xbdd2c000}, {0xbdd2e000}, - {0xbdd30000}, {0xbdd32000}, {0xbdd34000}, {0xbdd36000}, - {0xbdd38000}, {0xbdd3a000}, {0xbdd3c000}, {0xbdd3e000}, - {0xbdd40000}, {0xbdd42000}, {0xbdd44000}, {0xbdd46000}, - {0xbdd48000}, {0xbdd4a000}, {0xbdd4c000}, {0xbdd4e000}, - {0xbdd50000}, {0xbdd52000}, {0xbdd54000}, {0xbdd56000}, - {0xbdd58000}, {0xbdd5a000}, {0xbdd5c000}, {0xbdd5e000}, - {0xbdd60000}, {0xbdd62000}, {0xbdd64000}, {0xbdd66000}, - {0xbdd68000}, {0xbdd6a000}, {0xbdd6c000}, {0xbdd6e000}, - {0xbdd70000}, {0xbdd72000}, {0xbdd74000}, {0xbdd76000}, - {0xbdd78000}, {0xbdd7a000}, {0xbdd7c000}, {0xbdd7e000}, - {0xbdd80000}, {0xbdd82000}, {0xbdd84000}, {0xbdd86000}, - {0xbdd88000}, {0xbdd8a000}, {0xbdd8c000}, {0xbdd8e000}, - {0xbdd90000}, {0xbdd92000}, {0xbdd94000}, {0xbdd96000}, - {0xbdd98000}, {0xbdd9a000}, {0xbdd9c000}, {0xbdd9e000}, - {0xbdda0000}, {0xbdda2000}, {0xbdda4000}, {0xbdda6000}, - {0xbdda8000}, {0xbddaa000}, {0xbddac000}, {0xbddae000}, - {0xbddb0000}, {0xbddb2000}, {0xbddb4000}, {0xbddb6000}, - {0xbddb8000}, {0xbddba000}, {0xbddbc000}, {0xbddbe000}, - {0xbddc0000}, {0xbddc2000}, {0xbddc4000}, {0xbddc6000}, - {0xbddc8000}, {0xbddca000}, {0xbddcc000}, {0xbddce000}, - {0xbddd0000}, {0xbddd2000}, {0xbddd4000}, {0xbddd6000}, - {0xbddd8000}, {0xbddda000}, {0xbdddc000}, {0xbddde000}, - {0xbdde0000}, {0xbdde2000}, {0xbdde4000}, {0xbdde6000}, - {0xbdde8000}, {0xbddea000}, {0xbddec000}, {0xbddee000}, - {0xbddf0000}, {0xbddf2000}, {0xbddf4000}, {0xbddf6000}, - {0xbddf8000}, {0xbddfa000}, {0xbddfc000}, {0xbddfe000}, - {0xbde00000}, {0xbde02000}, {0xbde04000}, {0xbde06000}, - {0xbde08000}, {0xbde0a000}, {0xbde0c000}, {0xbde0e000}, - {0xbde10000}, {0xbde12000}, {0xbde14000}, {0xbde16000}, - {0xbde18000}, {0xbde1a000}, {0xbde1c000}, {0xbde1e000}, - {0xbde20000}, {0xbde22000}, {0xbde24000}, {0xbde26000}, - {0xbde28000}, {0xbde2a000}, {0xbde2c000}, {0xbde2e000}, - {0xbde30000}, {0xbde32000}, {0xbde34000}, {0xbde36000}, - {0xbde38000}, {0xbde3a000}, {0xbde3c000}, {0xbde3e000}, - {0xbde40000}, {0xbde42000}, {0xbde44000}, {0xbde46000}, - {0xbde48000}, {0xbde4a000}, {0xbde4c000}, {0xbde4e000}, - {0xbde50000}, {0xbde52000}, {0xbde54000}, {0xbde56000}, - {0xbde58000}, {0xbde5a000}, {0xbde5c000}, {0xbde5e000}, - {0xbde60000}, {0xbde62000}, {0xbde64000}, {0xbde66000}, - {0xbde68000}, {0xbde6a000}, {0xbde6c000}, {0xbde6e000}, - {0xbde70000}, {0xbde72000}, {0xbde74000}, {0xbde76000}, - {0xbde78000}, {0xbde7a000}, {0xbde7c000}, {0xbde7e000}, - {0xbde80000}, {0xbde82000}, {0xbde84000}, {0xbde86000}, - {0xbde88000}, {0xbde8a000}, {0xbde8c000}, {0xbde8e000}, - {0xbde90000}, {0xbde92000}, {0xbde94000}, {0xbde96000}, - {0xbde98000}, {0xbde9a000}, {0xbde9c000}, {0xbde9e000}, - {0xbdea0000}, {0xbdea2000}, {0xbdea4000}, {0xbdea6000}, - {0xbdea8000}, {0xbdeaa000}, {0xbdeac000}, {0xbdeae000}, - {0xbdeb0000}, {0xbdeb2000}, {0xbdeb4000}, {0xbdeb6000}, - {0xbdeb8000}, {0xbdeba000}, {0xbdebc000}, {0xbdebe000}, - {0xbdec0000}, {0xbdec2000}, {0xbdec4000}, {0xbdec6000}, - {0xbdec8000}, {0xbdeca000}, {0xbdecc000}, {0xbdece000}, - {0xbded0000}, {0xbded2000}, {0xbded4000}, {0xbded6000}, - {0xbded8000}, {0xbdeda000}, {0xbdedc000}, {0xbdede000}, - {0xbdee0000}, {0xbdee2000}, {0xbdee4000}, {0xbdee6000}, - {0xbdee8000}, {0xbdeea000}, {0xbdeec000}, {0xbdeee000}, - {0xbdef0000}, {0xbdef2000}, {0xbdef4000}, {0xbdef6000}, - {0xbdef8000}, {0xbdefa000}, {0xbdefc000}, {0xbdefe000}, - {0xbdf00000}, {0xbdf02000}, {0xbdf04000}, {0xbdf06000}, - {0xbdf08000}, {0xbdf0a000}, {0xbdf0c000}, {0xbdf0e000}, - {0xbdf10000}, {0xbdf12000}, {0xbdf14000}, {0xbdf16000}, - {0xbdf18000}, {0xbdf1a000}, {0xbdf1c000}, {0xbdf1e000}, - {0xbdf20000}, {0xbdf22000}, {0xbdf24000}, {0xbdf26000}, - {0xbdf28000}, {0xbdf2a000}, {0xbdf2c000}, {0xbdf2e000}, - {0xbdf30000}, {0xbdf32000}, {0xbdf34000}, {0xbdf36000}, - {0xbdf38000}, {0xbdf3a000}, {0xbdf3c000}, {0xbdf3e000}, - {0xbdf40000}, {0xbdf42000}, {0xbdf44000}, {0xbdf46000}, - {0xbdf48000}, {0xbdf4a000}, {0xbdf4c000}, {0xbdf4e000}, - {0xbdf50000}, {0xbdf52000}, {0xbdf54000}, {0xbdf56000}, - {0xbdf58000}, {0xbdf5a000}, {0xbdf5c000}, {0xbdf5e000}, - {0xbdf60000}, {0xbdf62000}, {0xbdf64000}, {0xbdf66000}, - {0xbdf68000}, {0xbdf6a000}, {0xbdf6c000}, {0xbdf6e000}, - {0xbdf70000}, {0xbdf72000}, {0xbdf74000}, {0xbdf76000}, - {0xbdf78000}, {0xbdf7a000}, {0xbdf7c000}, {0xbdf7e000}, - {0xbdf80000}, {0xbdf82000}, {0xbdf84000}, {0xbdf86000}, - {0xbdf88000}, {0xbdf8a000}, {0xbdf8c000}, {0xbdf8e000}, - {0xbdf90000}, {0xbdf92000}, {0xbdf94000}, {0xbdf96000}, - {0xbdf98000}, {0xbdf9a000}, {0xbdf9c000}, {0xbdf9e000}, - {0xbdfa0000}, {0xbdfa2000}, {0xbdfa4000}, {0xbdfa6000}, - {0xbdfa8000}, {0xbdfaa000}, {0xbdfac000}, {0xbdfae000}, - {0xbdfb0000}, {0xbdfb2000}, {0xbdfb4000}, {0xbdfb6000}, - {0xbdfb8000}, {0xbdfba000}, {0xbdfbc000}, {0xbdfbe000}, - {0xbdfc0000}, {0xbdfc2000}, {0xbdfc4000}, {0xbdfc6000}, - {0xbdfc8000}, {0xbdfca000}, {0xbdfcc000}, {0xbdfce000}, - {0xbdfd0000}, {0xbdfd2000}, {0xbdfd4000}, {0xbdfd6000}, - {0xbdfd8000}, {0xbdfda000}, {0xbdfdc000}, {0xbdfde000}, - {0xbdfe0000}, {0xbdfe2000}, {0xbdfe4000}, {0xbdfe6000}, - {0xbdfe8000}, {0xbdfea000}, {0xbdfec000}, {0xbdfee000}, - {0xbdff0000}, {0xbdff2000}, {0xbdff4000}, {0xbdff6000}, - {0xbdff8000}, {0xbdffa000}, {0xbdffc000}, {0xbdffe000}, - {0xbe000000}, {0xbe002000}, {0xbe004000}, {0xbe006000}, - {0xbe008000}, {0xbe00a000}, {0xbe00c000}, {0xbe00e000}, - {0xbe010000}, {0xbe012000}, {0xbe014000}, {0xbe016000}, - {0xbe018000}, {0xbe01a000}, {0xbe01c000}, {0xbe01e000}, - {0xbe020000}, {0xbe022000}, {0xbe024000}, {0xbe026000}, - {0xbe028000}, {0xbe02a000}, {0xbe02c000}, {0xbe02e000}, - {0xbe030000}, {0xbe032000}, {0xbe034000}, {0xbe036000}, - {0xbe038000}, {0xbe03a000}, {0xbe03c000}, {0xbe03e000}, - {0xbe040000}, {0xbe042000}, {0xbe044000}, {0xbe046000}, - {0xbe048000}, {0xbe04a000}, {0xbe04c000}, {0xbe04e000}, - {0xbe050000}, {0xbe052000}, {0xbe054000}, {0xbe056000}, - {0xbe058000}, {0xbe05a000}, {0xbe05c000}, {0xbe05e000}, - {0xbe060000}, {0xbe062000}, {0xbe064000}, {0xbe066000}, - {0xbe068000}, {0xbe06a000}, {0xbe06c000}, {0xbe06e000}, - {0xbe070000}, {0xbe072000}, {0xbe074000}, {0xbe076000}, - {0xbe078000}, {0xbe07a000}, {0xbe07c000}, {0xbe07e000}, - {0xbe080000}, {0xbe082000}, {0xbe084000}, {0xbe086000}, - {0xbe088000}, {0xbe08a000}, {0xbe08c000}, {0xbe08e000}, - {0xbe090000}, {0xbe092000}, {0xbe094000}, {0xbe096000}, - {0xbe098000}, {0xbe09a000}, {0xbe09c000}, {0xbe09e000}, - {0xbe0a0000}, {0xbe0a2000}, {0xbe0a4000}, {0xbe0a6000}, - {0xbe0a8000}, {0xbe0aa000}, {0xbe0ac000}, {0xbe0ae000}, - {0xbe0b0000}, {0xbe0b2000}, {0xbe0b4000}, {0xbe0b6000}, - {0xbe0b8000}, {0xbe0ba000}, {0xbe0bc000}, {0xbe0be000}, - {0xbe0c0000}, {0xbe0c2000}, {0xbe0c4000}, {0xbe0c6000}, - {0xbe0c8000}, {0xbe0ca000}, {0xbe0cc000}, {0xbe0ce000}, - {0xbe0d0000}, {0xbe0d2000}, {0xbe0d4000}, {0xbe0d6000}, - {0xbe0d8000}, {0xbe0da000}, {0xbe0dc000}, {0xbe0de000}, - {0xbe0e0000}, {0xbe0e2000}, {0xbe0e4000}, {0xbe0e6000}, - {0xbe0e8000}, {0xbe0ea000}, {0xbe0ec000}, {0xbe0ee000}, - {0xbe0f0000}, {0xbe0f2000}, {0xbe0f4000}, {0xbe0f6000}, - {0xbe0f8000}, {0xbe0fa000}, {0xbe0fc000}, {0xbe0fe000}, - {0xbe100000}, {0xbe102000}, {0xbe104000}, {0xbe106000}, - {0xbe108000}, {0xbe10a000}, {0xbe10c000}, {0xbe10e000}, - {0xbe110000}, {0xbe112000}, {0xbe114000}, {0xbe116000}, - {0xbe118000}, {0xbe11a000}, {0xbe11c000}, {0xbe11e000}, - {0xbe120000}, {0xbe122000}, {0xbe124000}, {0xbe126000}, - {0xbe128000}, {0xbe12a000}, {0xbe12c000}, {0xbe12e000}, - {0xbe130000}, {0xbe132000}, {0xbe134000}, {0xbe136000}, - {0xbe138000}, {0xbe13a000}, {0xbe13c000}, {0xbe13e000}, - {0xbe140000}, {0xbe142000}, {0xbe144000}, {0xbe146000}, - {0xbe148000}, {0xbe14a000}, {0xbe14c000}, {0xbe14e000}, - {0xbe150000}, {0xbe152000}, {0xbe154000}, {0xbe156000}, - {0xbe158000}, {0xbe15a000}, {0xbe15c000}, {0xbe15e000}, - {0xbe160000}, {0xbe162000}, {0xbe164000}, {0xbe166000}, - {0xbe168000}, {0xbe16a000}, {0xbe16c000}, {0xbe16e000}, - {0xbe170000}, {0xbe172000}, {0xbe174000}, {0xbe176000}, - {0xbe178000}, {0xbe17a000}, {0xbe17c000}, {0xbe17e000}, - {0xbe180000}, {0xbe182000}, {0xbe184000}, {0xbe186000}, - {0xbe188000}, {0xbe18a000}, {0xbe18c000}, {0xbe18e000}, - {0xbe190000}, {0xbe192000}, {0xbe194000}, {0xbe196000}, - {0xbe198000}, {0xbe19a000}, {0xbe19c000}, {0xbe19e000}, - {0xbe1a0000}, {0xbe1a2000}, {0xbe1a4000}, {0xbe1a6000}, - {0xbe1a8000}, {0xbe1aa000}, {0xbe1ac000}, {0xbe1ae000}, - {0xbe1b0000}, {0xbe1b2000}, {0xbe1b4000}, {0xbe1b6000}, - {0xbe1b8000}, {0xbe1ba000}, {0xbe1bc000}, {0xbe1be000}, - {0xbe1c0000}, {0xbe1c2000}, {0xbe1c4000}, {0xbe1c6000}, - {0xbe1c8000}, {0xbe1ca000}, {0xbe1cc000}, {0xbe1ce000}, - {0xbe1d0000}, {0xbe1d2000}, {0xbe1d4000}, {0xbe1d6000}, - {0xbe1d8000}, {0xbe1da000}, {0xbe1dc000}, {0xbe1de000}, - {0xbe1e0000}, {0xbe1e2000}, {0xbe1e4000}, {0xbe1e6000}, - {0xbe1e8000}, {0xbe1ea000}, {0xbe1ec000}, {0xbe1ee000}, - {0xbe1f0000}, {0xbe1f2000}, {0xbe1f4000}, {0xbe1f6000}, - {0xbe1f8000}, {0xbe1fa000}, {0xbe1fc000}, {0xbe1fe000}, - {0xbe200000}, {0xbe202000}, {0xbe204000}, {0xbe206000}, - {0xbe208000}, {0xbe20a000}, {0xbe20c000}, {0xbe20e000}, - {0xbe210000}, {0xbe212000}, {0xbe214000}, {0xbe216000}, - {0xbe218000}, {0xbe21a000}, {0xbe21c000}, {0xbe21e000}, - {0xbe220000}, {0xbe222000}, {0xbe224000}, {0xbe226000}, - {0xbe228000}, {0xbe22a000}, {0xbe22c000}, {0xbe22e000}, - {0xbe230000}, {0xbe232000}, {0xbe234000}, {0xbe236000}, - {0xbe238000}, {0xbe23a000}, {0xbe23c000}, {0xbe23e000}, - {0xbe240000}, {0xbe242000}, {0xbe244000}, {0xbe246000}, - {0xbe248000}, {0xbe24a000}, {0xbe24c000}, {0xbe24e000}, - {0xbe250000}, {0xbe252000}, {0xbe254000}, {0xbe256000}, - {0xbe258000}, {0xbe25a000}, {0xbe25c000}, {0xbe25e000}, - {0xbe260000}, {0xbe262000}, {0xbe264000}, {0xbe266000}, - {0xbe268000}, {0xbe26a000}, {0xbe26c000}, {0xbe26e000}, - {0xbe270000}, {0xbe272000}, {0xbe274000}, {0xbe276000}, - {0xbe278000}, {0xbe27a000}, {0xbe27c000}, {0xbe27e000}, - {0xbe280000}, {0xbe282000}, {0xbe284000}, {0xbe286000}, - {0xbe288000}, {0xbe28a000}, {0xbe28c000}, {0xbe28e000}, - {0xbe290000}, {0xbe292000}, {0xbe294000}, {0xbe296000}, - {0xbe298000}, {0xbe29a000}, {0xbe29c000}, {0xbe29e000}, - {0xbe2a0000}, {0xbe2a2000}, {0xbe2a4000}, {0xbe2a6000}, - {0xbe2a8000}, {0xbe2aa000}, {0xbe2ac000}, {0xbe2ae000}, - {0xbe2b0000}, {0xbe2b2000}, {0xbe2b4000}, {0xbe2b6000}, - {0xbe2b8000}, {0xbe2ba000}, {0xbe2bc000}, {0xbe2be000}, - {0xbe2c0000}, {0xbe2c2000}, {0xbe2c4000}, {0xbe2c6000}, - {0xbe2c8000}, {0xbe2ca000}, {0xbe2cc000}, {0xbe2ce000}, - {0xbe2d0000}, {0xbe2d2000}, {0xbe2d4000}, {0xbe2d6000}, - {0xbe2d8000}, {0xbe2da000}, {0xbe2dc000}, {0xbe2de000}, - {0xbe2e0000}, {0xbe2e2000}, {0xbe2e4000}, {0xbe2e6000}, - {0xbe2e8000}, {0xbe2ea000}, {0xbe2ec000}, {0xbe2ee000}, - {0xbe2f0000}, {0xbe2f2000}, {0xbe2f4000}, {0xbe2f6000}, - {0xbe2f8000}, {0xbe2fa000}, {0xbe2fc000}, {0xbe2fe000}, - {0xbe300000}, {0xbe302000}, {0xbe304000}, {0xbe306000}, - {0xbe308000}, {0xbe30a000}, {0xbe30c000}, {0xbe30e000}, - {0xbe310000}, {0xbe312000}, {0xbe314000}, {0xbe316000}, - {0xbe318000}, {0xbe31a000}, {0xbe31c000}, {0xbe31e000}, - {0xbe320000}, {0xbe322000}, {0xbe324000}, {0xbe326000}, - {0xbe328000}, {0xbe32a000}, {0xbe32c000}, {0xbe32e000}, - {0xbe330000}, {0xbe332000}, {0xbe334000}, {0xbe336000}, - {0xbe338000}, {0xbe33a000}, {0xbe33c000}, {0xbe33e000}, - {0xbe340000}, {0xbe342000}, {0xbe344000}, {0xbe346000}, - {0xbe348000}, {0xbe34a000}, {0xbe34c000}, {0xbe34e000}, - {0xbe350000}, {0xbe352000}, {0xbe354000}, {0xbe356000}, - {0xbe358000}, {0xbe35a000}, {0xbe35c000}, {0xbe35e000}, - {0xbe360000}, {0xbe362000}, {0xbe364000}, {0xbe366000}, - {0xbe368000}, {0xbe36a000}, {0xbe36c000}, {0xbe36e000}, - {0xbe370000}, {0xbe372000}, {0xbe374000}, {0xbe376000}, - {0xbe378000}, {0xbe37a000}, {0xbe37c000}, {0xbe37e000}, - {0xbe380000}, {0xbe382000}, {0xbe384000}, {0xbe386000}, - {0xbe388000}, {0xbe38a000}, {0xbe38c000}, {0xbe38e000}, - {0xbe390000}, {0xbe392000}, {0xbe394000}, {0xbe396000}, - {0xbe398000}, {0xbe39a000}, {0xbe39c000}, {0xbe39e000}, - {0xbe3a0000}, {0xbe3a2000}, {0xbe3a4000}, {0xbe3a6000}, - {0xbe3a8000}, {0xbe3aa000}, {0xbe3ac000}, {0xbe3ae000}, - {0xbe3b0000}, {0xbe3b2000}, {0xbe3b4000}, {0xbe3b6000}, - {0xbe3b8000}, {0xbe3ba000}, {0xbe3bc000}, {0xbe3be000}, - {0xbe3c0000}, {0xbe3c2000}, {0xbe3c4000}, {0xbe3c6000}, - {0xbe3c8000}, {0xbe3ca000}, {0xbe3cc000}, {0xbe3ce000}, - {0xbe3d0000}, {0xbe3d2000}, {0xbe3d4000}, {0xbe3d6000}, - {0xbe3d8000}, {0xbe3da000}, {0xbe3dc000}, {0xbe3de000}, - {0xbe3e0000}, {0xbe3e2000}, {0xbe3e4000}, {0xbe3e6000}, - {0xbe3e8000}, {0xbe3ea000}, {0xbe3ec000}, {0xbe3ee000}, - {0xbe3f0000}, {0xbe3f2000}, {0xbe3f4000}, {0xbe3f6000}, - {0xbe3f8000}, {0xbe3fa000}, {0xbe3fc000}, {0xbe3fe000}, - {0xbe400000}, {0xbe402000}, {0xbe404000}, {0xbe406000}, - {0xbe408000}, {0xbe40a000}, {0xbe40c000}, {0xbe40e000}, - {0xbe410000}, {0xbe412000}, {0xbe414000}, {0xbe416000}, - {0xbe418000}, {0xbe41a000}, {0xbe41c000}, {0xbe41e000}, - {0xbe420000}, {0xbe422000}, {0xbe424000}, {0xbe426000}, - {0xbe428000}, {0xbe42a000}, {0xbe42c000}, {0xbe42e000}, - {0xbe430000}, {0xbe432000}, {0xbe434000}, {0xbe436000}, - {0xbe438000}, {0xbe43a000}, {0xbe43c000}, {0xbe43e000}, - {0xbe440000}, {0xbe442000}, {0xbe444000}, {0xbe446000}, - {0xbe448000}, {0xbe44a000}, {0xbe44c000}, {0xbe44e000}, - {0xbe450000}, {0xbe452000}, {0xbe454000}, {0xbe456000}, - {0xbe458000}, {0xbe45a000}, {0xbe45c000}, {0xbe45e000}, - {0xbe460000}, {0xbe462000}, {0xbe464000}, {0xbe466000}, - {0xbe468000}, {0xbe46a000}, {0xbe46c000}, {0xbe46e000}, - {0xbe470000}, {0xbe472000}, {0xbe474000}, {0xbe476000}, - {0xbe478000}, {0xbe47a000}, {0xbe47c000}, {0xbe47e000}, - {0xbe480000}, {0xbe482000}, {0xbe484000}, {0xbe486000}, - {0xbe488000}, {0xbe48a000}, {0xbe48c000}, {0xbe48e000}, - {0xbe490000}, {0xbe492000}, {0xbe494000}, {0xbe496000}, - {0xbe498000}, {0xbe49a000}, {0xbe49c000}, {0xbe49e000}, - {0xbe4a0000}, {0xbe4a2000}, {0xbe4a4000}, {0xbe4a6000}, - {0xbe4a8000}, {0xbe4aa000}, {0xbe4ac000}, {0xbe4ae000}, - {0xbe4b0000}, {0xbe4b2000}, {0xbe4b4000}, {0xbe4b6000}, - {0xbe4b8000}, {0xbe4ba000}, {0xbe4bc000}, {0xbe4be000}, - {0xbe4c0000}, {0xbe4c2000}, {0xbe4c4000}, {0xbe4c6000}, - {0xbe4c8000}, {0xbe4ca000}, {0xbe4cc000}, {0xbe4ce000}, - {0xbe4d0000}, {0xbe4d2000}, {0xbe4d4000}, {0xbe4d6000}, - {0xbe4d8000}, {0xbe4da000}, {0xbe4dc000}, {0xbe4de000}, - {0xbe4e0000}, {0xbe4e2000}, {0xbe4e4000}, {0xbe4e6000}, - {0xbe4e8000}, {0xbe4ea000}, {0xbe4ec000}, {0xbe4ee000}, - {0xbe4f0000}, {0xbe4f2000}, {0xbe4f4000}, {0xbe4f6000}, - {0xbe4f8000}, {0xbe4fa000}, {0xbe4fc000}, {0xbe4fe000}, - {0xbe500000}, {0xbe502000}, {0xbe504000}, {0xbe506000}, - {0xbe508000}, {0xbe50a000}, {0xbe50c000}, {0xbe50e000}, - {0xbe510000}, {0xbe512000}, {0xbe514000}, {0xbe516000}, - {0xbe518000}, {0xbe51a000}, {0xbe51c000}, {0xbe51e000}, - {0xbe520000}, {0xbe522000}, {0xbe524000}, {0xbe526000}, - {0xbe528000}, {0xbe52a000}, {0xbe52c000}, {0xbe52e000}, - {0xbe530000}, {0xbe532000}, {0xbe534000}, {0xbe536000}, - {0xbe538000}, {0xbe53a000}, {0xbe53c000}, {0xbe53e000}, - {0xbe540000}, {0xbe542000}, {0xbe544000}, {0xbe546000}, - {0xbe548000}, {0xbe54a000}, {0xbe54c000}, {0xbe54e000}, - {0xbe550000}, {0xbe552000}, {0xbe554000}, {0xbe556000}, - {0xbe558000}, {0xbe55a000}, {0xbe55c000}, {0xbe55e000}, - {0xbe560000}, {0xbe562000}, {0xbe564000}, {0xbe566000}, - {0xbe568000}, {0xbe56a000}, {0xbe56c000}, {0xbe56e000}, - {0xbe570000}, {0xbe572000}, {0xbe574000}, {0xbe576000}, - {0xbe578000}, {0xbe57a000}, {0xbe57c000}, {0xbe57e000}, - {0xbe580000}, {0xbe582000}, {0xbe584000}, {0xbe586000}, - {0xbe588000}, {0xbe58a000}, {0xbe58c000}, {0xbe58e000}, - {0xbe590000}, {0xbe592000}, {0xbe594000}, {0xbe596000}, - {0xbe598000}, {0xbe59a000}, {0xbe59c000}, {0xbe59e000}, - {0xbe5a0000}, {0xbe5a2000}, {0xbe5a4000}, {0xbe5a6000}, - {0xbe5a8000}, {0xbe5aa000}, {0xbe5ac000}, {0xbe5ae000}, - {0xbe5b0000}, {0xbe5b2000}, {0xbe5b4000}, {0xbe5b6000}, - {0xbe5b8000}, {0xbe5ba000}, {0xbe5bc000}, {0xbe5be000}, - {0xbe5c0000}, {0xbe5c2000}, {0xbe5c4000}, {0xbe5c6000}, - {0xbe5c8000}, {0xbe5ca000}, {0xbe5cc000}, {0xbe5ce000}, - {0xbe5d0000}, {0xbe5d2000}, {0xbe5d4000}, {0xbe5d6000}, - {0xbe5d8000}, {0xbe5da000}, {0xbe5dc000}, {0xbe5de000}, - {0xbe5e0000}, {0xbe5e2000}, {0xbe5e4000}, {0xbe5e6000}, - {0xbe5e8000}, {0xbe5ea000}, {0xbe5ec000}, {0xbe5ee000}, - {0xbe5f0000}, {0xbe5f2000}, {0xbe5f4000}, {0xbe5f6000}, - {0xbe5f8000}, {0xbe5fa000}, {0xbe5fc000}, {0xbe5fe000}, - {0xbe600000}, {0xbe602000}, {0xbe604000}, {0xbe606000}, - {0xbe608000}, {0xbe60a000}, {0xbe60c000}, {0xbe60e000}, - {0xbe610000}, {0xbe612000}, {0xbe614000}, {0xbe616000}, - {0xbe618000}, {0xbe61a000}, {0xbe61c000}, {0xbe61e000}, - {0xbe620000}, {0xbe622000}, {0xbe624000}, {0xbe626000}, - {0xbe628000}, {0xbe62a000}, {0xbe62c000}, {0xbe62e000}, - {0xbe630000}, {0xbe632000}, {0xbe634000}, {0xbe636000}, - {0xbe638000}, {0xbe63a000}, {0xbe63c000}, {0xbe63e000}, - {0xbe640000}, {0xbe642000}, {0xbe644000}, {0xbe646000}, - {0xbe648000}, {0xbe64a000}, {0xbe64c000}, {0xbe64e000}, - {0xbe650000}, {0xbe652000}, {0xbe654000}, {0xbe656000}, - {0xbe658000}, {0xbe65a000}, {0xbe65c000}, {0xbe65e000}, - {0xbe660000}, {0xbe662000}, {0xbe664000}, {0xbe666000}, - {0xbe668000}, {0xbe66a000}, {0xbe66c000}, {0xbe66e000}, - {0xbe670000}, {0xbe672000}, {0xbe674000}, {0xbe676000}, - {0xbe678000}, {0xbe67a000}, {0xbe67c000}, {0xbe67e000}, - {0xbe680000}, {0xbe682000}, {0xbe684000}, {0xbe686000}, - {0xbe688000}, {0xbe68a000}, {0xbe68c000}, {0xbe68e000}, - {0xbe690000}, {0xbe692000}, {0xbe694000}, {0xbe696000}, - {0xbe698000}, {0xbe69a000}, {0xbe69c000}, {0xbe69e000}, - {0xbe6a0000}, {0xbe6a2000}, {0xbe6a4000}, {0xbe6a6000}, - {0xbe6a8000}, {0xbe6aa000}, {0xbe6ac000}, {0xbe6ae000}, - {0xbe6b0000}, {0xbe6b2000}, {0xbe6b4000}, {0xbe6b6000}, - {0xbe6b8000}, {0xbe6ba000}, {0xbe6bc000}, {0xbe6be000}, - {0xbe6c0000}, {0xbe6c2000}, {0xbe6c4000}, {0xbe6c6000}, - {0xbe6c8000}, {0xbe6ca000}, {0xbe6cc000}, {0xbe6ce000}, - {0xbe6d0000}, {0xbe6d2000}, {0xbe6d4000}, {0xbe6d6000}, - {0xbe6d8000}, {0xbe6da000}, {0xbe6dc000}, {0xbe6de000}, - {0xbe6e0000}, {0xbe6e2000}, {0xbe6e4000}, {0xbe6e6000}, - {0xbe6e8000}, {0xbe6ea000}, {0xbe6ec000}, {0xbe6ee000}, - {0xbe6f0000}, {0xbe6f2000}, {0xbe6f4000}, {0xbe6f6000}, - {0xbe6f8000}, {0xbe6fa000}, {0xbe6fc000}, {0xbe6fe000}, - {0xbe700000}, {0xbe702000}, {0xbe704000}, {0xbe706000}, - {0xbe708000}, {0xbe70a000}, {0xbe70c000}, {0xbe70e000}, - {0xbe710000}, {0xbe712000}, {0xbe714000}, {0xbe716000}, - {0xbe718000}, {0xbe71a000}, {0xbe71c000}, {0xbe71e000}, - {0xbe720000}, {0xbe722000}, {0xbe724000}, {0xbe726000}, - {0xbe728000}, {0xbe72a000}, {0xbe72c000}, {0xbe72e000}, - {0xbe730000}, {0xbe732000}, {0xbe734000}, {0xbe736000}, - {0xbe738000}, {0xbe73a000}, {0xbe73c000}, {0xbe73e000}, - {0xbe740000}, {0xbe742000}, {0xbe744000}, {0xbe746000}, - {0xbe748000}, {0xbe74a000}, {0xbe74c000}, {0xbe74e000}, - {0xbe750000}, {0xbe752000}, {0xbe754000}, {0xbe756000}, - {0xbe758000}, {0xbe75a000}, {0xbe75c000}, {0xbe75e000}, - {0xbe760000}, {0xbe762000}, {0xbe764000}, {0xbe766000}, - {0xbe768000}, {0xbe76a000}, {0xbe76c000}, {0xbe76e000}, - {0xbe770000}, {0xbe772000}, {0xbe774000}, {0xbe776000}, - {0xbe778000}, {0xbe77a000}, {0xbe77c000}, {0xbe77e000}, - {0xbe780000}, {0xbe782000}, {0xbe784000}, {0xbe786000}, - {0xbe788000}, {0xbe78a000}, {0xbe78c000}, {0xbe78e000}, - {0xbe790000}, {0xbe792000}, {0xbe794000}, {0xbe796000}, - {0xbe798000}, {0xbe79a000}, {0xbe79c000}, {0xbe79e000}, - {0xbe7a0000}, {0xbe7a2000}, {0xbe7a4000}, {0xbe7a6000}, - {0xbe7a8000}, {0xbe7aa000}, {0xbe7ac000}, {0xbe7ae000}, - {0xbe7b0000}, {0xbe7b2000}, {0xbe7b4000}, {0xbe7b6000}, - {0xbe7b8000}, {0xbe7ba000}, {0xbe7bc000}, {0xbe7be000}, - {0xbe7c0000}, {0xbe7c2000}, {0xbe7c4000}, {0xbe7c6000}, - {0xbe7c8000}, {0xbe7ca000}, {0xbe7cc000}, {0xbe7ce000}, - {0xbe7d0000}, {0xbe7d2000}, {0xbe7d4000}, {0xbe7d6000}, - {0xbe7d8000}, {0xbe7da000}, {0xbe7dc000}, {0xbe7de000}, - {0xbe7e0000}, {0xbe7e2000}, {0xbe7e4000}, {0xbe7e6000}, - {0xbe7e8000}, {0xbe7ea000}, {0xbe7ec000}, {0xbe7ee000}, - {0xbe7f0000}, {0xbe7f2000}, {0xbe7f4000}, {0xbe7f6000}, - {0xbe7f8000}, {0xbe7fa000}, {0xbe7fc000}, {0xbe7fe000}, - {0xbe800000}, {0xbe802000}, {0xbe804000}, {0xbe806000}, - {0xbe808000}, {0xbe80a000}, {0xbe80c000}, {0xbe80e000}, - {0xbe810000}, {0xbe812000}, {0xbe814000}, {0xbe816000}, - {0xbe818000}, {0xbe81a000}, {0xbe81c000}, {0xbe81e000}, - {0xbe820000}, {0xbe822000}, {0xbe824000}, {0xbe826000}, - {0xbe828000}, {0xbe82a000}, {0xbe82c000}, {0xbe82e000}, - {0xbe830000}, {0xbe832000}, {0xbe834000}, {0xbe836000}, - {0xbe838000}, {0xbe83a000}, {0xbe83c000}, {0xbe83e000}, - {0xbe840000}, {0xbe842000}, {0xbe844000}, {0xbe846000}, - {0xbe848000}, {0xbe84a000}, {0xbe84c000}, {0xbe84e000}, - {0xbe850000}, {0xbe852000}, {0xbe854000}, {0xbe856000}, - {0xbe858000}, {0xbe85a000}, {0xbe85c000}, {0xbe85e000}, - {0xbe860000}, {0xbe862000}, {0xbe864000}, {0xbe866000}, - {0xbe868000}, {0xbe86a000}, {0xbe86c000}, {0xbe86e000}, - {0xbe870000}, {0xbe872000}, {0xbe874000}, {0xbe876000}, - {0xbe878000}, {0xbe87a000}, {0xbe87c000}, {0xbe87e000}, - {0xbe880000}, {0xbe882000}, {0xbe884000}, {0xbe886000}, - {0xbe888000}, {0xbe88a000}, {0xbe88c000}, {0xbe88e000}, - {0xbe890000}, {0xbe892000}, {0xbe894000}, {0xbe896000}, - {0xbe898000}, {0xbe89a000}, {0xbe89c000}, {0xbe89e000}, - {0xbe8a0000}, {0xbe8a2000}, {0xbe8a4000}, {0xbe8a6000}, - {0xbe8a8000}, {0xbe8aa000}, {0xbe8ac000}, {0xbe8ae000}, - {0xbe8b0000}, {0xbe8b2000}, {0xbe8b4000}, {0xbe8b6000}, - {0xbe8b8000}, {0xbe8ba000}, {0xbe8bc000}, {0xbe8be000}, - {0xbe8c0000}, {0xbe8c2000}, {0xbe8c4000}, {0xbe8c6000}, - {0xbe8c8000}, {0xbe8ca000}, {0xbe8cc000}, {0xbe8ce000}, - {0xbe8d0000}, {0xbe8d2000}, {0xbe8d4000}, {0xbe8d6000}, - {0xbe8d8000}, {0xbe8da000}, {0xbe8dc000}, {0xbe8de000}, - {0xbe8e0000}, {0xbe8e2000}, {0xbe8e4000}, {0xbe8e6000}, - {0xbe8e8000}, {0xbe8ea000}, {0xbe8ec000}, {0xbe8ee000}, - {0xbe8f0000}, {0xbe8f2000}, {0xbe8f4000}, {0xbe8f6000}, - {0xbe8f8000}, {0xbe8fa000}, {0xbe8fc000}, {0xbe8fe000}, - {0xbe900000}, {0xbe902000}, {0xbe904000}, {0xbe906000}, - {0xbe908000}, {0xbe90a000}, {0xbe90c000}, {0xbe90e000}, - {0xbe910000}, {0xbe912000}, {0xbe914000}, {0xbe916000}, - {0xbe918000}, {0xbe91a000}, {0xbe91c000}, {0xbe91e000}, - {0xbe920000}, {0xbe922000}, {0xbe924000}, {0xbe926000}, - {0xbe928000}, {0xbe92a000}, {0xbe92c000}, {0xbe92e000}, - {0xbe930000}, {0xbe932000}, {0xbe934000}, {0xbe936000}, - {0xbe938000}, {0xbe93a000}, {0xbe93c000}, {0xbe93e000}, - {0xbe940000}, {0xbe942000}, {0xbe944000}, {0xbe946000}, - {0xbe948000}, {0xbe94a000}, {0xbe94c000}, {0xbe94e000}, - {0xbe950000}, {0xbe952000}, {0xbe954000}, {0xbe956000}, - {0xbe958000}, {0xbe95a000}, {0xbe95c000}, {0xbe95e000}, - {0xbe960000}, {0xbe962000}, {0xbe964000}, {0xbe966000}, - {0xbe968000}, {0xbe96a000}, {0xbe96c000}, {0xbe96e000}, - {0xbe970000}, {0xbe972000}, {0xbe974000}, {0xbe976000}, - {0xbe978000}, {0xbe97a000}, {0xbe97c000}, {0xbe97e000}, - {0xbe980000}, {0xbe982000}, {0xbe984000}, {0xbe986000}, - {0xbe988000}, {0xbe98a000}, {0xbe98c000}, {0xbe98e000}, - {0xbe990000}, {0xbe992000}, {0xbe994000}, {0xbe996000}, - {0xbe998000}, {0xbe99a000}, {0xbe99c000}, {0xbe99e000}, - {0xbe9a0000}, {0xbe9a2000}, {0xbe9a4000}, {0xbe9a6000}, - {0xbe9a8000}, {0xbe9aa000}, {0xbe9ac000}, {0xbe9ae000}, - {0xbe9b0000}, {0xbe9b2000}, {0xbe9b4000}, {0xbe9b6000}, - {0xbe9b8000}, {0xbe9ba000}, {0xbe9bc000}, {0xbe9be000}, - {0xbe9c0000}, {0xbe9c2000}, {0xbe9c4000}, {0xbe9c6000}, - {0xbe9c8000}, {0xbe9ca000}, {0xbe9cc000}, {0xbe9ce000}, - {0xbe9d0000}, {0xbe9d2000}, {0xbe9d4000}, {0xbe9d6000}, - {0xbe9d8000}, {0xbe9da000}, {0xbe9dc000}, {0xbe9de000}, - {0xbe9e0000}, {0xbe9e2000}, {0xbe9e4000}, {0xbe9e6000}, - {0xbe9e8000}, {0xbe9ea000}, {0xbe9ec000}, {0xbe9ee000}, - {0xbe9f0000}, {0xbe9f2000}, {0xbe9f4000}, {0xbe9f6000}, - {0xbe9f8000}, {0xbe9fa000}, {0xbe9fc000}, {0xbe9fe000}, - {0xbea00000}, {0xbea02000}, {0xbea04000}, {0xbea06000}, - {0xbea08000}, {0xbea0a000}, {0xbea0c000}, {0xbea0e000}, - {0xbea10000}, {0xbea12000}, {0xbea14000}, {0xbea16000}, - {0xbea18000}, {0xbea1a000}, {0xbea1c000}, {0xbea1e000}, - {0xbea20000}, {0xbea22000}, {0xbea24000}, {0xbea26000}, - {0xbea28000}, {0xbea2a000}, {0xbea2c000}, {0xbea2e000}, - {0xbea30000}, {0xbea32000}, {0xbea34000}, {0xbea36000}, - {0xbea38000}, {0xbea3a000}, {0xbea3c000}, {0xbea3e000}, - {0xbea40000}, {0xbea42000}, {0xbea44000}, {0xbea46000}, - {0xbea48000}, {0xbea4a000}, {0xbea4c000}, {0xbea4e000}, - {0xbea50000}, {0xbea52000}, {0xbea54000}, {0xbea56000}, - {0xbea58000}, {0xbea5a000}, {0xbea5c000}, {0xbea5e000}, - {0xbea60000}, {0xbea62000}, {0xbea64000}, {0xbea66000}, - {0xbea68000}, {0xbea6a000}, {0xbea6c000}, {0xbea6e000}, - {0xbea70000}, {0xbea72000}, {0xbea74000}, {0xbea76000}, - {0xbea78000}, {0xbea7a000}, {0xbea7c000}, {0xbea7e000}, - {0xbea80000}, {0xbea82000}, {0xbea84000}, {0xbea86000}, - {0xbea88000}, {0xbea8a000}, {0xbea8c000}, {0xbea8e000}, - {0xbea90000}, {0xbea92000}, {0xbea94000}, {0xbea96000}, - {0xbea98000}, {0xbea9a000}, {0xbea9c000}, {0xbea9e000}, - {0xbeaa0000}, {0xbeaa2000}, {0xbeaa4000}, {0xbeaa6000}, - {0xbeaa8000}, {0xbeaaa000}, {0xbeaac000}, {0xbeaae000}, - {0xbeab0000}, {0xbeab2000}, {0xbeab4000}, {0xbeab6000}, - {0xbeab8000}, {0xbeaba000}, {0xbeabc000}, {0xbeabe000}, - {0xbeac0000}, {0xbeac2000}, {0xbeac4000}, {0xbeac6000}, - {0xbeac8000}, {0xbeaca000}, {0xbeacc000}, {0xbeace000}, - {0xbead0000}, {0xbead2000}, {0xbead4000}, {0xbead6000}, - {0xbead8000}, {0xbeada000}, {0xbeadc000}, {0xbeade000}, - {0xbeae0000}, {0xbeae2000}, {0xbeae4000}, {0xbeae6000}, - {0xbeae8000}, {0xbeaea000}, {0xbeaec000}, {0xbeaee000}, - {0xbeaf0000}, {0xbeaf2000}, {0xbeaf4000}, {0xbeaf6000}, - {0xbeaf8000}, {0xbeafa000}, {0xbeafc000}, {0xbeafe000}, - {0xbeb00000}, {0xbeb02000}, {0xbeb04000}, {0xbeb06000}, - {0xbeb08000}, {0xbeb0a000}, {0xbeb0c000}, {0xbeb0e000}, - {0xbeb10000}, {0xbeb12000}, {0xbeb14000}, {0xbeb16000}, - {0xbeb18000}, {0xbeb1a000}, {0xbeb1c000}, {0xbeb1e000}, - {0xbeb20000}, {0xbeb22000}, {0xbeb24000}, {0xbeb26000}, - {0xbeb28000}, {0xbeb2a000}, {0xbeb2c000}, {0xbeb2e000}, - {0xbeb30000}, {0xbeb32000}, {0xbeb34000}, {0xbeb36000}, - {0xbeb38000}, {0xbeb3a000}, {0xbeb3c000}, {0xbeb3e000}, - {0xbeb40000}, {0xbeb42000}, {0xbeb44000}, {0xbeb46000}, - {0xbeb48000}, {0xbeb4a000}, {0xbeb4c000}, {0xbeb4e000}, - {0xbeb50000}, {0xbeb52000}, {0xbeb54000}, {0xbeb56000}, - {0xbeb58000}, {0xbeb5a000}, {0xbeb5c000}, {0xbeb5e000}, - {0xbeb60000}, {0xbeb62000}, {0xbeb64000}, {0xbeb66000}, - {0xbeb68000}, {0xbeb6a000}, {0xbeb6c000}, {0xbeb6e000}, - {0xbeb70000}, {0xbeb72000}, {0xbeb74000}, {0xbeb76000}, - {0xbeb78000}, {0xbeb7a000}, {0xbeb7c000}, {0xbeb7e000}, - {0xbeb80000}, {0xbeb82000}, {0xbeb84000}, {0xbeb86000}, - {0xbeb88000}, {0xbeb8a000}, {0xbeb8c000}, {0xbeb8e000}, - {0xbeb90000}, {0xbeb92000}, {0xbeb94000}, {0xbeb96000}, - {0xbeb98000}, {0xbeb9a000}, {0xbeb9c000}, {0xbeb9e000}, - {0xbeba0000}, {0xbeba2000}, {0xbeba4000}, {0xbeba6000}, - {0xbeba8000}, {0xbebaa000}, {0xbebac000}, {0xbebae000}, - {0xbebb0000}, {0xbebb2000}, {0xbebb4000}, {0xbebb6000}, - {0xbebb8000}, {0xbebba000}, {0xbebbc000}, {0xbebbe000}, - {0xbebc0000}, {0xbebc2000}, {0xbebc4000}, {0xbebc6000}, - {0xbebc8000}, {0xbebca000}, {0xbebcc000}, {0xbebce000}, - {0xbebd0000}, {0xbebd2000}, {0xbebd4000}, {0xbebd6000}, - {0xbebd8000}, {0xbebda000}, {0xbebdc000}, {0xbebde000}, - {0xbebe0000}, {0xbebe2000}, {0xbebe4000}, {0xbebe6000}, - {0xbebe8000}, {0xbebea000}, {0xbebec000}, {0xbebee000}, - {0xbebf0000}, {0xbebf2000}, {0xbebf4000}, {0xbebf6000}, - {0xbebf8000}, {0xbebfa000}, {0xbebfc000}, {0xbebfe000}, - {0xbec00000}, {0xbec02000}, {0xbec04000}, {0xbec06000}, - {0xbec08000}, {0xbec0a000}, {0xbec0c000}, {0xbec0e000}, - {0xbec10000}, {0xbec12000}, {0xbec14000}, {0xbec16000}, - {0xbec18000}, {0xbec1a000}, {0xbec1c000}, {0xbec1e000}, - {0xbec20000}, {0xbec22000}, {0xbec24000}, {0xbec26000}, - {0xbec28000}, {0xbec2a000}, {0xbec2c000}, {0xbec2e000}, - {0xbec30000}, {0xbec32000}, {0xbec34000}, {0xbec36000}, - {0xbec38000}, {0xbec3a000}, {0xbec3c000}, {0xbec3e000}, - {0xbec40000}, {0xbec42000}, {0xbec44000}, {0xbec46000}, - {0xbec48000}, {0xbec4a000}, {0xbec4c000}, {0xbec4e000}, - {0xbec50000}, {0xbec52000}, {0xbec54000}, {0xbec56000}, - {0xbec58000}, {0xbec5a000}, {0xbec5c000}, {0xbec5e000}, - {0xbec60000}, {0xbec62000}, {0xbec64000}, {0xbec66000}, - {0xbec68000}, {0xbec6a000}, {0xbec6c000}, {0xbec6e000}, - {0xbec70000}, {0xbec72000}, {0xbec74000}, {0xbec76000}, - {0xbec78000}, {0xbec7a000}, {0xbec7c000}, {0xbec7e000}, - {0xbec80000}, {0xbec82000}, {0xbec84000}, {0xbec86000}, - {0xbec88000}, {0xbec8a000}, {0xbec8c000}, {0xbec8e000}, - {0xbec90000}, {0xbec92000}, {0xbec94000}, {0xbec96000}, - {0xbec98000}, {0xbec9a000}, {0xbec9c000}, {0xbec9e000}, - {0xbeca0000}, {0xbeca2000}, {0xbeca4000}, {0xbeca6000}, - {0xbeca8000}, {0xbecaa000}, {0xbecac000}, {0xbecae000}, - {0xbecb0000}, {0xbecb2000}, {0xbecb4000}, {0xbecb6000}, - {0xbecb8000}, {0xbecba000}, {0xbecbc000}, {0xbecbe000}, - {0xbecc0000}, {0xbecc2000}, {0xbecc4000}, {0xbecc6000}, - {0xbecc8000}, {0xbecca000}, {0xbeccc000}, {0xbecce000}, - {0xbecd0000}, {0xbecd2000}, {0xbecd4000}, {0xbecd6000}, - {0xbecd8000}, {0xbecda000}, {0xbecdc000}, {0xbecde000}, - {0xbece0000}, {0xbece2000}, {0xbece4000}, {0xbece6000}, - {0xbece8000}, {0xbecea000}, {0xbecec000}, {0xbecee000}, - {0xbecf0000}, {0xbecf2000}, {0xbecf4000}, {0xbecf6000}, - {0xbecf8000}, {0xbecfa000}, {0xbecfc000}, {0xbecfe000}, - {0xbed00000}, {0xbed02000}, {0xbed04000}, {0xbed06000}, - {0xbed08000}, {0xbed0a000}, {0xbed0c000}, {0xbed0e000}, - {0xbed10000}, {0xbed12000}, {0xbed14000}, {0xbed16000}, - {0xbed18000}, {0xbed1a000}, {0xbed1c000}, {0xbed1e000}, - {0xbed20000}, {0xbed22000}, {0xbed24000}, {0xbed26000}, - {0xbed28000}, {0xbed2a000}, {0xbed2c000}, {0xbed2e000}, - {0xbed30000}, {0xbed32000}, {0xbed34000}, {0xbed36000}, - {0xbed38000}, {0xbed3a000}, {0xbed3c000}, {0xbed3e000}, - {0xbed40000}, {0xbed42000}, {0xbed44000}, {0xbed46000}, - {0xbed48000}, {0xbed4a000}, {0xbed4c000}, {0xbed4e000}, - {0xbed50000}, {0xbed52000}, {0xbed54000}, {0xbed56000}, - {0xbed58000}, {0xbed5a000}, {0xbed5c000}, {0xbed5e000}, - {0xbed60000}, {0xbed62000}, {0xbed64000}, {0xbed66000}, - {0xbed68000}, {0xbed6a000}, {0xbed6c000}, {0xbed6e000}, - {0xbed70000}, {0xbed72000}, {0xbed74000}, {0xbed76000}, - {0xbed78000}, {0xbed7a000}, {0xbed7c000}, {0xbed7e000}, - {0xbed80000}, {0xbed82000}, {0xbed84000}, {0xbed86000}, - {0xbed88000}, {0xbed8a000}, {0xbed8c000}, {0xbed8e000}, - {0xbed90000}, {0xbed92000}, {0xbed94000}, {0xbed96000}, - {0xbed98000}, {0xbed9a000}, {0xbed9c000}, {0xbed9e000}, - {0xbeda0000}, {0xbeda2000}, {0xbeda4000}, {0xbeda6000}, - {0xbeda8000}, {0xbedaa000}, {0xbedac000}, {0xbedae000}, - {0xbedb0000}, {0xbedb2000}, {0xbedb4000}, {0xbedb6000}, - {0xbedb8000}, {0xbedba000}, {0xbedbc000}, {0xbedbe000}, - {0xbedc0000}, {0xbedc2000}, {0xbedc4000}, {0xbedc6000}, - {0xbedc8000}, {0xbedca000}, {0xbedcc000}, {0xbedce000}, - {0xbedd0000}, {0xbedd2000}, {0xbedd4000}, {0xbedd6000}, - {0xbedd8000}, {0xbedda000}, {0xbeddc000}, {0xbedde000}, - {0xbede0000}, {0xbede2000}, {0xbede4000}, {0xbede6000}, - {0xbede8000}, {0xbedea000}, {0xbedec000}, {0xbedee000}, - {0xbedf0000}, {0xbedf2000}, {0xbedf4000}, {0xbedf6000}, - {0xbedf8000}, {0xbedfa000}, {0xbedfc000}, {0xbedfe000}, - {0xbee00000}, {0xbee02000}, {0xbee04000}, {0xbee06000}, - {0xbee08000}, {0xbee0a000}, {0xbee0c000}, {0xbee0e000}, - {0xbee10000}, {0xbee12000}, {0xbee14000}, {0xbee16000}, - {0xbee18000}, {0xbee1a000}, {0xbee1c000}, {0xbee1e000}, - {0xbee20000}, {0xbee22000}, {0xbee24000}, {0xbee26000}, - {0xbee28000}, {0xbee2a000}, {0xbee2c000}, {0xbee2e000}, - {0xbee30000}, {0xbee32000}, {0xbee34000}, {0xbee36000}, - {0xbee38000}, {0xbee3a000}, {0xbee3c000}, {0xbee3e000}, - {0xbee40000}, {0xbee42000}, {0xbee44000}, {0xbee46000}, - {0xbee48000}, {0xbee4a000}, {0xbee4c000}, {0xbee4e000}, - {0xbee50000}, {0xbee52000}, {0xbee54000}, {0xbee56000}, - {0xbee58000}, {0xbee5a000}, {0xbee5c000}, {0xbee5e000}, - {0xbee60000}, {0xbee62000}, {0xbee64000}, {0xbee66000}, - {0xbee68000}, {0xbee6a000}, {0xbee6c000}, {0xbee6e000}, - {0xbee70000}, {0xbee72000}, {0xbee74000}, {0xbee76000}, - {0xbee78000}, {0xbee7a000}, {0xbee7c000}, {0xbee7e000}, - {0xbee80000}, {0xbee82000}, {0xbee84000}, {0xbee86000}, - {0xbee88000}, {0xbee8a000}, {0xbee8c000}, {0xbee8e000}, - {0xbee90000}, {0xbee92000}, {0xbee94000}, {0xbee96000}, - {0xbee98000}, {0xbee9a000}, {0xbee9c000}, {0xbee9e000}, - {0xbeea0000}, {0xbeea2000}, {0xbeea4000}, {0xbeea6000}, - {0xbeea8000}, {0xbeeaa000}, {0xbeeac000}, {0xbeeae000}, - {0xbeeb0000}, {0xbeeb2000}, {0xbeeb4000}, {0xbeeb6000}, - {0xbeeb8000}, {0xbeeba000}, {0xbeebc000}, {0xbeebe000}, - {0xbeec0000}, {0xbeec2000}, {0xbeec4000}, {0xbeec6000}, - {0xbeec8000}, {0xbeeca000}, {0xbeecc000}, {0xbeece000}, - {0xbeed0000}, {0xbeed2000}, {0xbeed4000}, {0xbeed6000}, - {0xbeed8000}, {0xbeeda000}, {0xbeedc000}, {0xbeede000}, - {0xbeee0000}, {0xbeee2000}, {0xbeee4000}, {0xbeee6000}, - {0xbeee8000}, {0xbeeea000}, {0xbeeec000}, {0xbeeee000}, - {0xbeef0000}, {0xbeef2000}, {0xbeef4000}, {0xbeef6000}, - {0xbeef8000}, {0xbeefa000}, {0xbeefc000}, {0xbeefe000}, - {0xbef00000}, {0xbef02000}, {0xbef04000}, {0xbef06000}, - {0xbef08000}, {0xbef0a000}, {0xbef0c000}, {0xbef0e000}, - {0xbef10000}, {0xbef12000}, {0xbef14000}, {0xbef16000}, - {0xbef18000}, {0xbef1a000}, {0xbef1c000}, {0xbef1e000}, - {0xbef20000}, {0xbef22000}, {0xbef24000}, {0xbef26000}, - {0xbef28000}, {0xbef2a000}, {0xbef2c000}, {0xbef2e000}, - {0xbef30000}, {0xbef32000}, {0xbef34000}, {0xbef36000}, - {0xbef38000}, {0xbef3a000}, {0xbef3c000}, {0xbef3e000}, - {0xbef40000}, {0xbef42000}, {0xbef44000}, {0xbef46000}, - {0xbef48000}, {0xbef4a000}, {0xbef4c000}, {0xbef4e000}, - {0xbef50000}, {0xbef52000}, {0xbef54000}, {0xbef56000}, - {0xbef58000}, {0xbef5a000}, {0xbef5c000}, {0xbef5e000}, - {0xbef60000}, {0xbef62000}, {0xbef64000}, {0xbef66000}, - {0xbef68000}, {0xbef6a000}, {0xbef6c000}, {0xbef6e000}, - {0xbef70000}, {0xbef72000}, {0xbef74000}, {0xbef76000}, - {0xbef78000}, {0xbef7a000}, {0xbef7c000}, {0xbef7e000}, - {0xbef80000}, {0xbef82000}, {0xbef84000}, {0xbef86000}, - {0xbef88000}, {0xbef8a000}, {0xbef8c000}, {0xbef8e000}, - {0xbef90000}, {0xbef92000}, {0xbef94000}, {0xbef96000}, - {0xbef98000}, {0xbef9a000}, {0xbef9c000}, {0xbef9e000}, - {0xbefa0000}, {0xbefa2000}, {0xbefa4000}, {0xbefa6000}, - {0xbefa8000}, {0xbefaa000}, {0xbefac000}, {0xbefae000}, - {0xbefb0000}, {0xbefb2000}, {0xbefb4000}, {0xbefb6000}, - {0xbefb8000}, {0xbefba000}, {0xbefbc000}, {0xbefbe000}, - {0xbefc0000}, {0xbefc2000}, {0xbefc4000}, {0xbefc6000}, - {0xbefc8000}, {0xbefca000}, {0xbefcc000}, {0xbefce000}, - {0xbefd0000}, {0xbefd2000}, {0xbefd4000}, {0xbefd6000}, - {0xbefd8000}, {0xbefda000}, {0xbefdc000}, {0xbefde000}, - {0xbefe0000}, {0xbefe2000}, {0xbefe4000}, {0xbefe6000}, - {0xbefe8000}, {0xbefea000}, {0xbefec000}, {0xbefee000}, - {0xbeff0000}, {0xbeff2000}, {0xbeff4000}, {0xbeff6000}, - {0xbeff8000}, {0xbeffa000}, {0xbeffc000}, {0xbeffe000}, - {0xbf000000}, {0xbf002000}, {0xbf004000}, {0xbf006000}, - {0xbf008000}, {0xbf00a000}, {0xbf00c000}, {0xbf00e000}, - {0xbf010000}, {0xbf012000}, {0xbf014000}, {0xbf016000}, - {0xbf018000}, {0xbf01a000}, {0xbf01c000}, {0xbf01e000}, - {0xbf020000}, {0xbf022000}, {0xbf024000}, {0xbf026000}, - {0xbf028000}, {0xbf02a000}, {0xbf02c000}, {0xbf02e000}, - {0xbf030000}, {0xbf032000}, {0xbf034000}, {0xbf036000}, - {0xbf038000}, {0xbf03a000}, {0xbf03c000}, {0xbf03e000}, - {0xbf040000}, {0xbf042000}, {0xbf044000}, {0xbf046000}, - {0xbf048000}, {0xbf04a000}, {0xbf04c000}, {0xbf04e000}, - {0xbf050000}, {0xbf052000}, {0xbf054000}, {0xbf056000}, - {0xbf058000}, {0xbf05a000}, {0xbf05c000}, {0xbf05e000}, - {0xbf060000}, {0xbf062000}, {0xbf064000}, {0xbf066000}, - {0xbf068000}, {0xbf06a000}, {0xbf06c000}, {0xbf06e000}, - {0xbf070000}, {0xbf072000}, {0xbf074000}, {0xbf076000}, - {0xbf078000}, {0xbf07a000}, {0xbf07c000}, {0xbf07e000}, - {0xbf080000}, {0xbf082000}, {0xbf084000}, {0xbf086000}, - {0xbf088000}, {0xbf08a000}, {0xbf08c000}, {0xbf08e000}, - {0xbf090000}, {0xbf092000}, {0xbf094000}, {0xbf096000}, - {0xbf098000}, {0xbf09a000}, {0xbf09c000}, {0xbf09e000}, - {0xbf0a0000}, {0xbf0a2000}, {0xbf0a4000}, {0xbf0a6000}, - {0xbf0a8000}, {0xbf0aa000}, {0xbf0ac000}, {0xbf0ae000}, - {0xbf0b0000}, {0xbf0b2000}, {0xbf0b4000}, {0xbf0b6000}, - {0xbf0b8000}, {0xbf0ba000}, {0xbf0bc000}, {0xbf0be000}, - {0xbf0c0000}, {0xbf0c2000}, {0xbf0c4000}, {0xbf0c6000}, - {0xbf0c8000}, {0xbf0ca000}, {0xbf0cc000}, {0xbf0ce000}, - {0xbf0d0000}, {0xbf0d2000}, {0xbf0d4000}, {0xbf0d6000}, - {0xbf0d8000}, {0xbf0da000}, {0xbf0dc000}, {0xbf0de000}, - {0xbf0e0000}, {0xbf0e2000}, {0xbf0e4000}, {0xbf0e6000}, - {0xbf0e8000}, {0xbf0ea000}, {0xbf0ec000}, {0xbf0ee000}, - {0xbf0f0000}, {0xbf0f2000}, {0xbf0f4000}, {0xbf0f6000}, - {0xbf0f8000}, {0xbf0fa000}, {0xbf0fc000}, {0xbf0fe000}, - {0xbf100000}, {0xbf102000}, {0xbf104000}, {0xbf106000}, - {0xbf108000}, {0xbf10a000}, {0xbf10c000}, {0xbf10e000}, - {0xbf110000}, {0xbf112000}, {0xbf114000}, {0xbf116000}, - {0xbf118000}, {0xbf11a000}, {0xbf11c000}, {0xbf11e000}, - {0xbf120000}, {0xbf122000}, {0xbf124000}, {0xbf126000}, - {0xbf128000}, {0xbf12a000}, {0xbf12c000}, {0xbf12e000}, - {0xbf130000}, {0xbf132000}, {0xbf134000}, {0xbf136000}, - {0xbf138000}, {0xbf13a000}, {0xbf13c000}, {0xbf13e000}, - {0xbf140000}, {0xbf142000}, {0xbf144000}, {0xbf146000}, - {0xbf148000}, {0xbf14a000}, {0xbf14c000}, {0xbf14e000}, - {0xbf150000}, {0xbf152000}, {0xbf154000}, {0xbf156000}, - {0xbf158000}, {0xbf15a000}, {0xbf15c000}, {0xbf15e000}, - {0xbf160000}, {0xbf162000}, {0xbf164000}, {0xbf166000}, - {0xbf168000}, {0xbf16a000}, {0xbf16c000}, {0xbf16e000}, - {0xbf170000}, {0xbf172000}, {0xbf174000}, {0xbf176000}, - {0xbf178000}, {0xbf17a000}, {0xbf17c000}, {0xbf17e000}, - {0xbf180000}, {0xbf182000}, {0xbf184000}, {0xbf186000}, - {0xbf188000}, {0xbf18a000}, {0xbf18c000}, {0xbf18e000}, - {0xbf190000}, {0xbf192000}, {0xbf194000}, {0xbf196000}, - {0xbf198000}, {0xbf19a000}, {0xbf19c000}, {0xbf19e000}, - {0xbf1a0000}, {0xbf1a2000}, {0xbf1a4000}, {0xbf1a6000}, - {0xbf1a8000}, {0xbf1aa000}, {0xbf1ac000}, {0xbf1ae000}, - {0xbf1b0000}, {0xbf1b2000}, {0xbf1b4000}, {0xbf1b6000}, - {0xbf1b8000}, {0xbf1ba000}, {0xbf1bc000}, {0xbf1be000}, - {0xbf1c0000}, {0xbf1c2000}, {0xbf1c4000}, {0xbf1c6000}, - {0xbf1c8000}, {0xbf1ca000}, {0xbf1cc000}, {0xbf1ce000}, - {0xbf1d0000}, {0xbf1d2000}, {0xbf1d4000}, {0xbf1d6000}, - {0xbf1d8000}, {0xbf1da000}, {0xbf1dc000}, {0xbf1de000}, - {0xbf1e0000}, {0xbf1e2000}, {0xbf1e4000}, {0xbf1e6000}, - {0xbf1e8000}, {0xbf1ea000}, {0xbf1ec000}, {0xbf1ee000}, - {0xbf1f0000}, {0xbf1f2000}, {0xbf1f4000}, {0xbf1f6000}, - {0xbf1f8000}, {0xbf1fa000}, {0xbf1fc000}, {0xbf1fe000}, - {0xbf200000}, {0xbf202000}, {0xbf204000}, {0xbf206000}, - {0xbf208000}, {0xbf20a000}, {0xbf20c000}, {0xbf20e000}, - {0xbf210000}, {0xbf212000}, {0xbf214000}, {0xbf216000}, - {0xbf218000}, {0xbf21a000}, {0xbf21c000}, {0xbf21e000}, - {0xbf220000}, {0xbf222000}, {0xbf224000}, {0xbf226000}, - {0xbf228000}, {0xbf22a000}, {0xbf22c000}, {0xbf22e000}, - {0xbf230000}, {0xbf232000}, {0xbf234000}, {0xbf236000}, - {0xbf238000}, {0xbf23a000}, {0xbf23c000}, {0xbf23e000}, - {0xbf240000}, {0xbf242000}, {0xbf244000}, {0xbf246000}, - {0xbf248000}, {0xbf24a000}, {0xbf24c000}, {0xbf24e000}, - {0xbf250000}, {0xbf252000}, {0xbf254000}, {0xbf256000}, - {0xbf258000}, {0xbf25a000}, {0xbf25c000}, {0xbf25e000}, - {0xbf260000}, {0xbf262000}, {0xbf264000}, {0xbf266000}, - {0xbf268000}, {0xbf26a000}, {0xbf26c000}, {0xbf26e000}, - {0xbf270000}, {0xbf272000}, {0xbf274000}, {0xbf276000}, - {0xbf278000}, {0xbf27a000}, {0xbf27c000}, {0xbf27e000}, - {0xbf280000}, {0xbf282000}, {0xbf284000}, {0xbf286000}, - {0xbf288000}, {0xbf28a000}, {0xbf28c000}, {0xbf28e000}, - {0xbf290000}, {0xbf292000}, {0xbf294000}, {0xbf296000}, - {0xbf298000}, {0xbf29a000}, {0xbf29c000}, {0xbf29e000}, - {0xbf2a0000}, {0xbf2a2000}, {0xbf2a4000}, {0xbf2a6000}, - {0xbf2a8000}, {0xbf2aa000}, {0xbf2ac000}, {0xbf2ae000}, - {0xbf2b0000}, {0xbf2b2000}, {0xbf2b4000}, {0xbf2b6000}, - {0xbf2b8000}, {0xbf2ba000}, {0xbf2bc000}, {0xbf2be000}, - {0xbf2c0000}, {0xbf2c2000}, {0xbf2c4000}, {0xbf2c6000}, - {0xbf2c8000}, {0xbf2ca000}, {0xbf2cc000}, {0xbf2ce000}, - {0xbf2d0000}, {0xbf2d2000}, {0xbf2d4000}, {0xbf2d6000}, - {0xbf2d8000}, {0xbf2da000}, {0xbf2dc000}, {0xbf2de000}, - {0xbf2e0000}, {0xbf2e2000}, {0xbf2e4000}, {0xbf2e6000}, - {0xbf2e8000}, {0xbf2ea000}, {0xbf2ec000}, {0xbf2ee000}, - {0xbf2f0000}, {0xbf2f2000}, {0xbf2f4000}, {0xbf2f6000}, - {0xbf2f8000}, {0xbf2fa000}, {0xbf2fc000}, {0xbf2fe000}, - {0xbf300000}, {0xbf302000}, {0xbf304000}, {0xbf306000}, - {0xbf308000}, {0xbf30a000}, {0xbf30c000}, {0xbf30e000}, - {0xbf310000}, {0xbf312000}, {0xbf314000}, {0xbf316000}, - {0xbf318000}, {0xbf31a000}, {0xbf31c000}, {0xbf31e000}, - {0xbf320000}, {0xbf322000}, {0xbf324000}, {0xbf326000}, - {0xbf328000}, {0xbf32a000}, {0xbf32c000}, {0xbf32e000}, - {0xbf330000}, {0xbf332000}, {0xbf334000}, {0xbf336000}, - {0xbf338000}, {0xbf33a000}, {0xbf33c000}, {0xbf33e000}, - {0xbf340000}, {0xbf342000}, {0xbf344000}, {0xbf346000}, - {0xbf348000}, {0xbf34a000}, {0xbf34c000}, {0xbf34e000}, - {0xbf350000}, {0xbf352000}, {0xbf354000}, {0xbf356000}, - {0xbf358000}, {0xbf35a000}, {0xbf35c000}, {0xbf35e000}, - {0xbf360000}, {0xbf362000}, {0xbf364000}, {0xbf366000}, - {0xbf368000}, {0xbf36a000}, {0xbf36c000}, {0xbf36e000}, - {0xbf370000}, {0xbf372000}, {0xbf374000}, {0xbf376000}, - {0xbf378000}, {0xbf37a000}, {0xbf37c000}, {0xbf37e000}, - {0xbf380000}, {0xbf382000}, {0xbf384000}, {0xbf386000}, - {0xbf388000}, {0xbf38a000}, {0xbf38c000}, {0xbf38e000}, - {0xbf390000}, {0xbf392000}, {0xbf394000}, {0xbf396000}, - {0xbf398000}, {0xbf39a000}, {0xbf39c000}, {0xbf39e000}, - {0xbf3a0000}, {0xbf3a2000}, {0xbf3a4000}, {0xbf3a6000}, - {0xbf3a8000}, {0xbf3aa000}, {0xbf3ac000}, {0xbf3ae000}, - {0xbf3b0000}, {0xbf3b2000}, {0xbf3b4000}, {0xbf3b6000}, - {0xbf3b8000}, {0xbf3ba000}, {0xbf3bc000}, {0xbf3be000}, - {0xbf3c0000}, {0xbf3c2000}, {0xbf3c4000}, {0xbf3c6000}, - {0xbf3c8000}, {0xbf3ca000}, {0xbf3cc000}, {0xbf3ce000}, - {0xbf3d0000}, {0xbf3d2000}, {0xbf3d4000}, {0xbf3d6000}, - {0xbf3d8000}, {0xbf3da000}, {0xbf3dc000}, {0xbf3de000}, - {0xbf3e0000}, {0xbf3e2000}, {0xbf3e4000}, {0xbf3e6000}, - {0xbf3e8000}, {0xbf3ea000}, {0xbf3ec000}, {0xbf3ee000}, - {0xbf3f0000}, {0xbf3f2000}, {0xbf3f4000}, {0xbf3f6000}, - {0xbf3f8000}, {0xbf3fa000}, {0xbf3fc000}, {0xbf3fe000}, - {0xbf400000}, {0xbf402000}, {0xbf404000}, {0xbf406000}, - {0xbf408000}, {0xbf40a000}, {0xbf40c000}, {0xbf40e000}, - {0xbf410000}, {0xbf412000}, {0xbf414000}, {0xbf416000}, - {0xbf418000}, {0xbf41a000}, {0xbf41c000}, {0xbf41e000}, - {0xbf420000}, {0xbf422000}, {0xbf424000}, {0xbf426000}, - {0xbf428000}, {0xbf42a000}, {0xbf42c000}, {0xbf42e000}, - {0xbf430000}, {0xbf432000}, {0xbf434000}, {0xbf436000}, - {0xbf438000}, {0xbf43a000}, {0xbf43c000}, {0xbf43e000}, - {0xbf440000}, {0xbf442000}, {0xbf444000}, {0xbf446000}, - {0xbf448000}, {0xbf44a000}, {0xbf44c000}, {0xbf44e000}, - {0xbf450000}, {0xbf452000}, {0xbf454000}, {0xbf456000}, - {0xbf458000}, {0xbf45a000}, {0xbf45c000}, {0xbf45e000}, - {0xbf460000}, {0xbf462000}, {0xbf464000}, {0xbf466000}, - {0xbf468000}, {0xbf46a000}, {0xbf46c000}, {0xbf46e000}, - {0xbf470000}, {0xbf472000}, {0xbf474000}, {0xbf476000}, - {0xbf478000}, {0xbf47a000}, {0xbf47c000}, {0xbf47e000}, - {0xbf480000}, {0xbf482000}, {0xbf484000}, {0xbf486000}, - {0xbf488000}, {0xbf48a000}, {0xbf48c000}, {0xbf48e000}, - {0xbf490000}, {0xbf492000}, {0xbf494000}, {0xbf496000}, - {0xbf498000}, {0xbf49a000}, {0xbf49c000}, {0xbf49e000}, - {0xbf4a0000}, {0xbf4a2000}, {0xbf4a4000}, {0xbf4a6000}, - {0xbf4a8000}, {0xbf4aa000}, {0xbf4ac000}, {0xbf4ae000}, - {0xbf4b0000}, {0xbf4b2000}, {0xbf4b4000}, {0xbf4b6000}, - {0xbf4b8000}, {0xbf4ba000}, {0xbf4bc000}, {0xbf4be000}, - {0xbf4c0000}, {0xbf4c2000}, {0xbf4c4000}, {0xbf4c6000}, - {0xbf4c8000}, {0xbf4ca000}, {0xbf4cc000}, {0xbf4ce000}, - {0xbf4d0000}, {0xbf4d2000}, {0xbf4d4000}, {0xbf4d6000}, - {0xbf4d8000}, {0xbf4da000}, {0xbf4dc000}, {0xbf4de000}, - {0xbf4e0000}, {0xbf4e2000}, {0xbf4e4000}, {0xbf4e6000}, - {0xbf4e8000}, {0xbf4ea000}, {0xbf4ec000}, {0xbf4ee000}, - {0xbf4f0000}, {0xbf4f2000}, {0xbf4f4000}, {0xbf4f6000}, - {0xbf4f8000}, {0xbf4fa000}, {0xbf4fc000}, {0xbf4fe000}, - {0xbf500000}, {0xbf502000}, {0xbf504000}, {0xbf506000}, - {0xbf508000}, {0xbf50a000}, {0xbf50c000}, {0xbf50e000}, - {0xbf510000}, {0xbf512000}, {0xbf514000}, {0xbf516000}, - {0xbf518000}, {0xbf51a000}, {0xbf51c000}, {0xbf51e000}, - {0xbf520000}, {0xbf522000}, {0xbf524000}, {0xbf526000}, - {0xbf528000}, {0xbf52a000}, {0xbf52c000}, {0xbf52e000}, - {0xbf530000}, {0xbf532000}, {0xbf534000}, {0xbf536000}, - {0xbf538000}, {0xbf53a000}, {0xbf53c000}, {0xbf53e000}, - {0xbf540000}, {0xbf542000}, {0xbf544000}, {0xbf546000}, - {0xbf548000}, {0xbf54a000}, {0xbf54c000}, {0xbf54e000}, - {0xbf550000}, {0xbf552000}, {0xbf554000}, {0xbf556000}, - {0xbf558000}, {0xbf55a000}, {0xbf55c000}, {0xbf55e000}, - {0xbf560000}, {0xbf562000}, {0xbf564000}, {0xbf566000}, - {0xbf568000}, {0xbf56a000}, {0xbf56c000}, {0xbf56e000}, - {0xbf570000}, {0xbf572000}, {0xbf574000}, {0xbf576000}, - {0xbf578000}, {0xbf57a000}, {0xbf57c000}, {0xbf57e000}, - {0xbf580000}, {0xbf582000}, {0xbf584000}, {0xbf586000}, - {0xbf588000}, {0xbf58a000}, {0xbf58c000}, {0xbf58e000}, - {0xbf590000}, {0xbf592000}, {0xbf594000}, {0xbf596000}, - {0xbf598000}, {0xbf59a000}, {0xbf59c000}, {0xbf59e000}, - {0xbf5a0000}, {0xbf5a2000}, {0xbf5a4000}, {0xbf5a6000}, - {0xbf5a8000}, {0xbf5aa000}, {0xbf5ac000}, {0xbf5ae000}, - {0xbf5b0000}, {0xbf5b2000}, {0xbf5b4000}, {0xbf5b6000}, - {0xbf5b8000}, {0xbf5ba000}, {0xbf5bc000}, {0xbf5be000}, - {0xbf5c0000}, {0xbf5c2000}, {0xbf5c4000}, {0xbf5c6000}, - {0xbf5c8000}, {0xbf5ca000}, {0xbf5cc000}, {0xbf5ce000}, - {0xbf5d0000}, {0xbf5d2000}, {0xbf5d4000}, {0xbf5d6000}, - {0xbf5d8000}, {0xbf5da000}, {0xbf5dc000}, {0xbf5de000}, - {0xbf5e0000}, {0xbf5e2000}, {0xbf5e4000}, {0xbf5e6000}, - {0xbf5e8000}, {0xbf5ea000}, {0xbf5ec000}, {0xbf5ee000}, - {0xbf5f0000}, {0xbf5f2000}, {0xbf5f4000}, {0xbf5f6000}, - {0xbf5f8000}, {0xbf5fa000}, {0xbf5fc000}, {0xbf5fe000}, - {0xbf600000}, {0xbf602000}, {0xbf604000}, {0xbf606000}, - {0xbf608000}, {0xbf60a000}, {0xbf60c000}, {0xbf60e000}, - {0xbf610000}, {0xbf612000}, {0xbf614000}, {0xbf616000}, - {0xbf618000}, {0xbf61a000}, {0xbf61c000}, {0xbf61e000}, - {0xbf620000}, {0xbf622000}, {0xbf624000}, {0xbf626000}, - {0xbf628000}, {0xbf62a000}, {0xbf62c000}, {0xbf62e000}, - {0xbf630000}, {0xbf632000}, {0xbf634000}, {0xbf636000}, - {0xbf638000}, {0xbf63a000}, {0xbf63c000}, {0xbf63e000}, - {0xbf640000}, {0xbf642000}, {0xbf644000}, {0xbf646000}, - {0xbf648000}, {0xbf64a000}, {0xbf64c000}, {0xbf64e000}, - {0xbf650000}, {0xbf652000}, {0xbf654000}, {0xbf656000}, - {0xbf658000}, {0xbf65a000}, {0xbf65c000}, {0xbf65e000}, - {0xbf660000}, {0xbf662000}, {0xbf664000}, {0xbf666000}, - {0xbf668000}, {0xbf66a000}, {0xbf66c000}, {0xbf66e000}, - {0xbf670000}, {0xbf672000}, {0xbf674000}, {0xbf676000}, - {0xbf678000}, {0xbf67a000}, {0xbf67c000}, {0xbf67e000}, - {0xbf680000}, {0xbf682000}, {0xbf684000}, {0xbf686000}, - {0xbf688000}, {0xbf68a000}, {0xbf68c000}, {0xbf68e000}, - {0xbf690000}, {0xbf692000}, {0xbf694000}, {0xbf696000}, - {0xbf698000}, {0xbf69a000}, {0xbf69c000}, {0xbf69e000}, - {0xbf6a0000}, {0xbf6a2000}, {0xbf6a4000}, {0xbf6a6000}, - {0xbf6a8000}, {0xbf6aa000}, {0xbf6ac000}, {0xbf6ae000}, - {0xbf6b0000}, {0xbf6b2000}, {0xbf6b4000}, {0xbf6b6000}, - {0xbf6b8000}, {0xbf6ba000}, {0xbf6bc000}, {0xbf6be000}, - {0xbf6c0000}, {0xbf6c2000}, {0xbf6c4000}, {0xbf6c6000}, - {0xbf6c8000}, {0xbf6ca000}, {0xbf6cc000}, {0xbf6ce000}, - {0xbf6d0000}, {0xbf6d2000}, {0xbf6d4000}, {0xbf6d6000}, - {0xbf6d8000}, {0xbf6da000}, {0xbf6dc000}, {0xbf6de000}, - {0xbf6e0000}, {0xbf6e2000}, {0xbf6e4000}, {0xbf6e6000}, - {0xbf6e8000}, {0xbf6ea000}, {0xbf6ec000}, {0xbf6ee000}, - {0xbf6f0000}, {0xbf6f2000}, {0xbf6f4000}, {0xbf6f6000}, - {0xbf6f8000}, {0xbf6fa000}, {0xbf6fc000}, {0xbf6fe000}, - {0xbf700000}, {0xbf702000}, {0xbf704000}, {0xbf706000}, - {0xbf708000}, {0xbf70a000}, {0xbf70c000}, {0xbf70e000}, - {0xbf710000}, {0xbf712000}, {0xbf714000}, {0xbf716000}, - {0xbf718000}, {0xbf71a000}, {0xbf71c000}, {0xbf71e000}, - {0xbf720000}, {0xbf722000}, {0xbf724000}, {0xbf726000}, - {0xbf728000}, {0xbf72a000}, {0xbf72c000}, {0xbf72e000}, - {0xbf730000}, {0xbf732000}, {0xbf734000}, {0xbf736000}, - {0xbf738000}, {0xbf73a000}, {0xbf73c000}, {0xbf73e000}, - {0xbf740000}, {0xbf742000}, {0xbf744000}, {0xbf746000}, - {0xbf748000}, {0xbf74a000}, {0xbf74c000}, {0xbf74e000}, - {0xbf750000}, {0xbf752000}, {0xbf754000}, {0xbf756000}, - {0xbf758000}, {0xbf75a000}, {0xbf75c000}, {0xbf75e000}, - {0xbf760000}, {0xbf762000}, {0xbf764000}, {0xbf766000}, - {0xbf768000}, {0xbf76a000}, {0xbf76c000}, {0xbf76e000}, - {0xbf770000}, {0xbf772000}, {0xbf774000}, {0xbf776000}, - {0xbf778000}, {0xbf77a000}, {0xbf77c000}, {0xbf77e000}, - {0xbf780000}, {0xbf782000}, {0xbf784000}, {0xbf786000}, - {0xbf788000}, {0xbf78a000}, {0xbf78c000}, {0xbf78e000}, - {0xbf790000}, {0xbf792000}, {0xbf794000}, {0xbf796000}, - {0xbf798000}, {0xbf79a000}, {0xbf79c000}, {0xbf79e000}, - {0xbf7a0000}, {0xbf7a2000}, {0xbf7a4000}, {0xbf7a6000}, - {0xbf7a8000}, {0xbf7aa000}, {0xbf7ac000}, {0xbf7ae000}, - {0xbf7b0000}, {0xbf7b2000}, {0xbf7b4000}, {0xbf7b6000}, - {0xbf7b8000}, {0xbf7ba000}, {0xbf7bc000}, {0xbf7be000}, - {0xbf7c0000}, {0xbf7c2000}, {0xbf7c4000}, {0xbf7c6000}, - {0xbf7c8000}, {0xbf7ca000}, {0xbf7cc000}, {0xbf7ce000}, - {0xbf7d0000}, {0xbf7d2000}, {0xbf7d4000}, {0xbf7d6000}, - {0xbf7d8000}, {0xbf7da000}, {0xbf7dc000}, {0xbf7de000}, - {0xbf7e0000}, {0xbf7e2000}, {0xbf7e4000}, {0xbf7e6000}, - {0xbf7e8000}, {0xbf7ea000}, {0xbf7ec000}, {0xbf7ee000}, - {0xbf7f0000}, {0xbf7f2000}, {0xbf7f4000}, {0xbf7f6000}, - {0xbf7f8000}, {0xbf7fa000}, {0xbf7fc000}, {0xbf7fe000}, - {0xbf800000}, {0xbf802000}, {0xbf804000}, {0xbf806000}, - {0xbf808000}, {0xbf80a000}, {0xbf80c000}, {0xbf80e000}, - {0xbf810000}, {0xbf812000}, {0xbf814000}, {0xbf816000}, - {0xbf818000}, {0xbf81a000}, {0xbf81c000}, {0xbf81e000}, - {0xbf820000}, {0xbf822000}, {0xbf824000}, {0xbf826000}, - {0xbf828000}, {0xbf82a000}, {0xbf82c000}, {0xbf82e000}, - {0xbf830000}, {0xbf832000}, {0xbf834000}, {0xbf836000}, - {0xbf838000}, {0xbf83a000}, {0xbf83c000}, {0xbf83e000}, - {0xbf840000}, {0xbf842000}, {0xbf844000}, {0xbf846000}, - {0xbf848000}, {0xbf84a000}, {0xbf84c000}, {0xbf84e000}, - {0xbf850000}, {0xbf852000}, {0xbf854000}, {0xbf856000}, - {0xbf858000}, {0xbf85a000}, {0xbf85c000}, {0xbf85e000}, - {0xbf860000}, {0xbf862000}, {0xbf864000}, {0xbf866000}, - {0xbf868000}, {0xbf86a000}, {0xbf86c000}, {0xbf86e000}, - {0xbf870000}, {0xbf872000}, {0xbf874000}, {0xbf876000}, - {0xbf878000}, {0xbf87a000}, {0xbf87c000}, {0xbf87e000}, - {0xbf880000}, {0xbf882000}, {0xbf884000}, {0xbf886000}, - {0xbf888000}, {0xbf88a000}, {0xbf88c000}, {0xbf88e000}, - {0xbf890000}, {0xbf892000}, {0xbf894000}, {0xbf896000}, - {0xbf898000}, {0xbf89a000}, {0xbf89c000}, {0xbf89e000}, - {0xbf8a0000}, {0xbf8a2000}, {0xbf8a4000}, {0xbf8a6000}, - {0xbf8a8000}, {0xbf8aa000}, {0xbf8ac000}, {0xbf8ae000}, - {0xbf8b0000}, {0xbf8b2000}, {0xbf8b4000}, {0xbf8b6000}, - {0xbf8b8000}, {0xbf8ba000}, {0xbf8bc000}, {0xbf8be000}, - {0xbf8c0000}, {0xbf8c2000}, {0xbf8c4000}, {0xbf8c6000}, - {0xbf8c8000}, {0xbf8ca000}, {0xbf8cc000}, {0xbf8ce000}, - {0xbf8d0000}, {0xbf8d2000}, {0xbf8d4000}, {0xbf8d6000}, - {0xbf8d8000}, {0xbf8da000}, {0xbf8dc000}, {0xbf8de000}, - {0xbf8e0000}, {0xbf8e2000}, {0xbf8e4000}, {0xbf8e6000}, - {0xbf8e8000}, {0xbf8ea000}, {0xbf8ec000}, {0xbf8ee000}, - {0xbf8f0000}, {0xbf8f2000}, {0xbf8f4000}, {0xbf8f6000}, - {0xbf8f8000}, {0xbf8fa000}, {0xbf8fc000}, {0xbf8fe000}, - {0xbf900000}, {0xbf902000}, {0xbf904000}, {0xbf906000}, - {0xbf908000}, {0xbf90a000}, {0xbf90c000}, {0xbf90e000}, - {0xbf910000}, {0xbf912000}, {0xbf914000}, {0xbf916000}, - {0xbf918000}, {0xbf91a000}, {0xbf91c000}, {0xbf91e000}, - {0xbf920000}, {0xbf922000}, {0xbf924000}, {0xbf926000}, - {0xbf928000}, {0xbf92a000}, {0xbf92c000}, {0xbf92e000}, - {0xbf930000}, {0xbf932000}, {0xbf934000}, {0xbf936000}, - {0xbf938000}, {0xbf93a000}, {0xbf93c000}, {0xbf93e000}, - {0xbf940000}, {0xbf942000}, {0xbf944000}, {0xbf946000}, - {0xbf948000}, {0xbf94a000}, {0xbf94c000}, {0xbf94e000}, - {0xbf950000}, {0xbf952000}, {0xbf954000}, {0xbf956000}, - {0xbf958000}, {0xbf95a000}, {0xbf95c000}, {0xbf95e000}, - {0xbf960000}, {0xbf962000}, {0xbf964000}, {0xbf966000}, - {0xbf968000}, {0xbf96a000}, {0xbf96c000}, {0xbf96e000}, - {0xbf970000}, {0xbf972000}, {0xbf974000}, {0xbf976000}, - {0xbf978000}, {0xbf97a000}, {0xbf97c000}, {0xbf97e000}, - {0xbf980000}, {0xbf982000}, {0xbf984000}, {0xbf986000}, - {0xbf988000}, {0xbf98a000}, {0xbf98c000}, {0xbf98e000}, - {0xbf990000}, {0xbf992000}, {0xbf994000}, {0xbf996000}, - {0xbf998000}, {0xbf99a000}, {0xbf99c000}, {0xbf99e000}, - {0xbf9a0000}, {0xbf9a2000}, {0xbf9a4000}, {0xbf9a6000}, - {0xbf9a8000}, {0xbf9aa000}, {0xbf9ac000}, {0xbf9ae000}, - {0xbf9b0000}, {0xbf9b2000}, {0xbf9b4000}, {0xbf9b6000}, - {0xbf9b8000}, {0xbf9ba000}, {0xbf9bc000}, {0xbf9be000}, - {0xbf9c0000}, {0xbf9c2000}, {0xbf9c4000}, {0xbf9c6000}, - {0xbf9c8000}, {0xbf9ca000}, {0xbf9cc000}, {0xbf9ce000}, - {0xbf9d0000}, {0xbf9d2000}, {0xbf9d4000}, {0xbf9d6000}, - {0xbf9d8000}, {0xbf9da000}, {0xbf9dc000}, {0xbf9de000}, - {0xbf9e0000}, {0xbf9e2000}, {0xbf9e4000}, {0xbf9e6000}, - {0xbf9e8000}, {0xbf9ea000}, {0xbf9ec000}, {0xbf9ee000}, - {0xbf9f0000}, {0xbf9f2000}, {0xbf9f4000}, {0xbf9f6000}, - {0xbf9f8000}, {0xbf9fa000}, {0xbf9fc000}, {0xbf9fe000}, - {0xbfa00000}, {0xbfa02000}, {0xbfa04000}, {0xbfa06000}, - {0xbfa08000}, {0xbfa0a000}, {0xbfa0c000}, {0xbfa0e000}, - {0xbfa10000}, {0xbfa12000}, {0xbfa14000}, {0xbfa16000}, - {0xbfa18000}, {0xbfa1a000}, {0xbfa1c000}, {0xbfa1e000}, - {0xbfa20000}, {0xbfa22000}, {0xbfa24000}, {0xbfa26000}, - {0xbfa28000}, {0xbfa2a000}, {0xbfa2c000}, {0xbfa2e000}, - {0xbfa30000}, {0xbfa32000}, {0xbfa34000}, {0xbfa36000}, - {0xbfa38000}, {0xbfa3a000}, {0xbfa3c000}, {0xbfa3e000}, - {0xbfa40000}, {0xbfa42000}, {0xbfa44000}, {0xbfa46000}, - {0xbfa48000}, {0xbfa4a000}, {0xbfa4c000}, {0xbfa4e000}, - {0xbfa50000}, {0xbfa52000}, {0xbfa54000}, {0xbfa56000}, - {0xbfa58000}, {0xbfa5a000}, {0xbfa5c000}, {0xbfa5e000}, - {0xbfa60000}, {0xbfa62000}, {0xbfa64000}, {0xbfa66000}, - {0xbfa68000}, {0xbfa6a000}, {0xbfa6c000}, {0xbfa6e000}, - {0xbfa70000}, {0xbfa72000}, {0xbfa74000}, {0xbfa76000}, - {0xbfa78000}, {0xbfa7a000}, {0xbfa7c000}, {0xbfa7e000}, - {0xbfa80000}, {0xbfa82000}, {0xbfa84000}, {0xbfa86000}, - {0xbfa88000}, {0xbfa8a000}, {0xbfa8c000}, {0xbfa8e000}, - {0xbfa90000}, {0xbfa92000}, {0xbfa94000}, {0xbfa96000}, - {0xbfa98000}, {0xbfa9a000}, {0xbfa9c000}, {0xbfa9e000}, - {0xbfaa0000}, {0xbfaa2000}, {0xbfaa4000}, {0xbfaa6000}, - {0xbfaa8000}, {0xbfaaa000}, {0xbfaac000}, {0xbfaae000}, - {0xbfab0000}, {0xbfab2000}, {0xbfab4000}, {0xbfab6000}, - {0xbfab8000}, {0xbfaba000}, {0xbfabc000}, {0xbfabe000}, - {0xbfac0000}, {0xbfac2000}, {0xbfac4000}, {0xbfac6000}, - {0xbfac8000}, {0xbfaca000}, {0xbfacc000}, {0xbface000}, - {0xbfad0000}, {0xbfad2000}, {0xbfad4000}, {0xbfad6000}, - {0xbfad8000}, {0xbfada000}, {0xbfadc000}, {0xbfade000}, - {0xbfae0000}, {0xbfae2000}, {0xbfae4000}, {0xbfae6000}, - {0xbfae8000}, {0xbfaea000}, {0xbfaec000}, {0xbfaee000}, - {0xbfaf0000}, {0xbfaf2000}, {0xbfaf4000}, {0xbfaf6000}, - {0xbfaf8000}, {0xbfafa000}, {0xbfafc000}, {0xbfafe000}, - {0xbfb00000}, {0xbfb02000}, {0xbfb04000}, {0xbfb06000}, - {0xbfb08000}, {0xbfb0a000}, {0xbfb0c000}, {0xbfb0e000}, - {0xbfb10000}, {0xbfb12000}, {0xbfb14000}, {0xbfb16000}, - {0xbfb18000}, {0xbfb1a000}, {0xbfb1c000}, {0xbfb1e000}, - {0xbfb20000}, {0xbfb22000}, {0xbfb24000}, {0xbfb26000}, - {0xbfb28000}, {0xbfb2a000}, {0xbfb2c000}, {0xbfb2e000}, - {0xbfb30000}, {0xbfb32000}, {0xbfb34000}, {0xbfb36000}, - {0xbfb38000}, {0xbfb3a000}, {0xbfb3c000}, {0xbfb3e000}, - {0xbfb40000}, {0xbfb42000}, {0xbfb44000}, {0xbfb46000}, - {0xbfb48000}, {0xbfb4a000}, {0xbfb4c000}, {0xbfb4e000}, - {0xbfb50000}, {0xbfb52000}, {0xbfb54000}, {0xbfb56000}, - {0xbfb58000}, {0xbfb5a000}, {0xbfb5c000}, {0xbfb5e000}, - {0xbfb60000}, {0xbfb62000}, {0xbfb64000}, {0xbfb66000}, - {0xbfb68000}, {0xbfb6a000}, {0xbfb6c000}, {0xbfb6e000}, - {0xbfb70000}, {0xbfb72000}, {0xbfb74000}, {0xbfb76000}, - {0xbfb78000}, {0xbfb7a000}, {0xbfb7c000}, {0xbfb7e000}, - {0xbfb80000}, {0xbfb82000}, {0xbfb84000}, {0xbfb86000}, - {0xbfb88000}, {0xbfb8a000}, {0xbfb8c000}, {0xbfb8e000}, - {0xbfb90000}, {0xbfb92000}, {0xbfb94000}, {0xbfb96000}, - {0xbfb98000}, {0xbfb9a000}, {0xbfb9c000}, {0xbfb9e000}, - {0xbfba0000}, {0xbfba2000}, {0xbfba4000}, {0xbfba6000}, - {0xbfba8000}, {0xbfbaa000}, {0xbfbac000}, {0xbfbae000}, - {0xbfbb0000}, {0xbfbb2000}, {0xbfbb4000}, {0xbfbb6000}, - {0xbfbb8000}, {0xbfbba000}, {0xbfbbc000}, {0xbfbbe000}, - {0xbfbc0000}, {0xbfbc2000}, {0xbfbc4000}, {0xbfbc6000}, - {0xbfbc8000}, {0xbfbca000}, {0xbfbcc000}, {0xbfbce000}, - {0xbfbd0000}, {0xbfbd2000}, {0xbfbd4000}, {0xbfbd6000}, - {0xbfbd8000}, {0xbfbda000}, {0xbfbdc000}, {0xbfbde000}, - {0xbfbe0000}, {0xbfbe2000}, {0xbfbe4000}, {0xbfbe6000}, - {0xbfbe8000}, {0xbfbea000}, {0xbfbec000}, {0xbfbee000}, - {0xbfbf0000}, {0xbfbf2000}, {0xbfbf4000}, {0xbfbf6000}, - {0xbfbf8000}, {0xbfbfa000}, {0xbfbfc000}, {0xbfbfe000}, - {0xbfc00000}, {0xbfc02000}, {0xbfc04000}, {0xbfc06000}, - {0xbfc08000}, {0xbfc0a000}, {0xbfc0c000}, {0xbfc0e000}, - {0xbfc10000}, {0xbfc12000}, {0xbfc14000}, {0xbfc16000}, - {0xbfc18000}, {0xbfc1a000}, {0xbfc1c000}, {0xbfc1e000}, - {0xbfc20000}, {0xbfc22000}, {0xbfc24000}, {0xbfc26000}, - {0xbfc28000}, {0xbfc2a000}, {0xbfc2c000}, {0xbfc2e000}, - {0xbfc30000}, {0xbfc32000}, {0xbfc34000}, {0xbfc36000}, - {0xbfc38000}, {0xbfc3a000}, {0xbfc3c000}, {0xbfc3e000}, - {0xbfc40000}, {0xbfc42000}, {0xbfc44000}, {0xbfc46000}, - {0xbfc48000}, {0xbfc4a000}, {0xbfc4c000}, {0xbfc4e000}, - {0xbfc50000}, {0xbfc52000}, {0xbfc54000}, {0xbfc56000}, - {0xbfc58000}, {0xbfc5a000}, {0xbfc5c000}, {0xbfc5e000}, - {0xbfc60000}, {0xbfc62000}, {0xbfc64000}, {0xbfc66000}, - {0xbfc68000}, {0xbfc6a000}, {0xbfc6c000}, {0xbfc6e000}, - {0xbfc70000}, {0xbfc72000}, {0xbfc74000}, {0xbfc76000}, - {0xbfc78000}, {0xbfc7a000}, {0xbfc7c000}, {0xbfc7e000}, - {0xbfc80000}, {0xbfc82000}, {0xbfc84000}, {0xbfc86000}, - {0xbfc88000}, {0xbfc8a000}, {0xbfc8c000}, {0xbfc8e000}, - {0xbfc90000}, {0xbfc92000}, {0xbfc94000}, {0xbfc96000}, - {0xbfc98000}, {0xbfc9a000}, {0xbfc9c000}, {0xbfc9e000}, - {0xbfca0000}, {0xbfca2000}, {0xbfca4000}, {0xbfca6000}, - {0xbfca8000}, {0xbfcaa000}, {0xbfcac000}, {0xbfcae000}, - {0xbfcb0000}, {0xbfcb2000}, {0xbfcb4000}, {0xbfcb6000}, - {0xbfcb8000}, {0xbfcba000}, {0xbfcbc000}, {0xbfcbe000}, - {0xbfcc0000}, {0xbfcc2000}, {0xbfcc4000}, {0xbfcc6000}, - {0xbfcc8000}, {0xbfcca000}, {0xbfccc000}, {0xbfcce000}, - {0xbfcd0000}, {0xbfcd2000}, {0xbfcd4000}, {0xbfcd6000}, - {0xbfcd8000}, {0xbfcda000}, {0xbfcdc000}, {0xbfcde000}, - {0xbfce0000}, {0xbfce2000}, {0xbfce4000}, {0xbfce6000}, - {0xbfce8000}, {0xbfcea000}, {0xbfcec000}, {0xbfcee000}, - {0xbfcf0000}, {0xbfcf2000}, {0xbfcf4000}, {0xbfcf6000}, - {0xbfcf8000}, {0xbfcfa000}, {0xbfcfc000}, {0xbfcfe000}, - {0xbfd00000}, {0xbfd02000}, {0xbfd04000}, {0xbfd06000}, - {0xbfd08000}, {0xbfd0a000}, {0xbfd0c000}, {0xbfd0e000}, - {0xbfd10000}, {0xbfd12000}, {0xbfd14000}, {0xbfd16000}, - {0xbfd18000}, {0xbfd1a000}, {0xbfd1c000}, {0xbfd1e000}, - {0xbfd20000}, {0xbfd22000}, {0xbfd24000}, {0xbfd26000}, - {0xbfd28000}, {0xbfd2a000}, {0xbfd2c000}, {0xbfd2e000}, - {0xbfd30000}, {0xbfd32000}, {0xbfd34000}, {0xbfd36000}, - {0xbfd38000}, {0xbfd3a000}, {0xbfd3c000}, {0xbfd3e000}, - {0xbfd40000}, {0xbfd42000}, {0xbfd44000}, {0xbfd46000}, - {0xbfd48000}, {0xbfd4a000}, {0xbfd4c000}, {0xbfd4e000}, - {0xbfd50000}, {0xbfd52000}, {0xbfd54000}, {0xbfd56000}, - {0xbfd58000}, {0xbfd5a000}, {0xbfd5c000}, {0xbfd5e000}, - {0xbfd60000}, {0xbfd62000}, {0xbfd64000}, {0xbfd66000}, - {0xbfd68000}, {0xbfd6a000}, {0xbfd6c000}, {0xbfd6e000}, - {0xbfd70000}, {0xbfd72000}, {0xbfd74000}, {0xbfd76000}, - {0xbfd78000}, {0xbfd7a000}, {0xbfd7c000}, {0xbfd7e000}, - {0xbfd80000}, {0xbfd82000}, {0xbfd84000}, {0xbfd86000}, - {0xbfd88000}, {0xbfd8a000}, {0xbfd8c000}, {0xbfd8e000}, - {0xbfd90000}, {0xbfd92000}, {0xbfd94000}, {0xbfd96000}, - {0xbfd98000}, {0xbfd9a000}, {0xbfd9c000}, {0xbfd9e000}, - {0xbfda0000}, {0xbfda2000}, {0xbfda4000}, {0xbfda6000}, - {0xbfda8000}, {0xbfdaa000}, {0xbfdac000}, {0xbfdae000}, - {0xbfdb0000}, {0xbfdb2000}, {0xbfdb4000}, {0xbfdb6000}, - {0xbfdb8000}, {0xbfdba000}, {0xbfdbc000}, {0xbfdbe000}, - {0xbfdc0000}, {0xbfdc2000}, {0xbfdc4000}, {0xbfdc6000}, - {0xbfdc8000}, {0xbfdca000}, {0xbfdcc000}, {0xbfdce000}, - {0xbfdd0000}, {0xbfdd2000}, {0xbfdd4000}, {0xbfdd6000}, - {0xbfdd8000}, {0xbfdda000}, {0xbfddc000}, {0xbfdde000}, - {0xbfde0000}, {0xbfde2000}, {0xbfde4000}, {0xbfde6000}, - {0xbfde8000}, {0xbfdea000}, {0xbfdec000}, {0xbfdee000}, - {0xbfdf0000}, {0xbfdf2000}, {0xbfdf4000}, {0xbfdf6000}, - {0xbfdf8000}, {0xbfdfa000}, {0xbfdfc000}, {0xbfdfe000}, - {0xbfe00000}, {0xbfe02000}, {0xbfe04000}, {0xbfe06000}, - {0xbfe08000}, {0xbfe0a000}, {0xbfe0c000}, {0xbfe0e000}, - {0xbfe10000}, {0xbfe12000}, {0xbfe14000}, {0xbfe16000}, - {0xbfe18000}, {0xbfe1a000}, {0xbfe1c000}, {0xbfe1e000}, - {0xbfe20000}, {0xbfe22000}, {0xbfe24000}, {0xbfe26000}, - {0xbfe28000}, {0xbfe2a000}, {0xbfe2c000}, {0xbfe2e000}, - {0xbfe30000}, {0xbfe32000}, {0xbfe34000}, {0xbfe36000}, - {0xbfe38000}, {0xbfe3a000}, {0xbfe3c000}, {0xbfe3e000}, - {0xbfe40000}, {0xbfe42000}, {0xbfe44000}, {0xbfe46000}, - {0xbfe48000}, {0xbfe4a000}, {0xbfe4c000}, {0xbfe4e000}, - {0xbfe50000}, {0xbfe52000}, {0xbfe54000}, {0xbfe56000}, - {0xbfe58000}, {0xbfe5a000}, {0xbfe5c000}, {0xbfe5e000}, - {0xbfe60000}, {0xbfe62000}, {0xbfe64000}, {0xbfe66000}, - {0xbfe68000}, {0xbfe6a000}, {0xbfe6c000}, {0xbfe6e000}, - {0xbfe70000}, {0xbfe72000}, {0xbfe74000}, {0xbfe76000}, - {0xbfe78000}, {0xbfe7a000}, {0xbfe7c000}, {0xbfe7e000}, - {0xbfe80000}, {0xbfe82000}, {0xbfe84000}, {0xbfe86000}, - {0xbfe88000}, {0xbfe8a000}, {0xbfe8c000}, {0xbfe8e000}, - {0xbfe90000}, {0xbfe92000}, {0xbfe94000}, {0xbfe96000}, - {0xbfe98000}, {0xbfe9a000}, {0xbfe9c000}, {0xbfe9e000}, - {0xbfea0000}, {0xbfea2000}, {0xbfea4000}, {0xbfea6000}, - {0xbfea8000}, {0xbfeaa000}, {0xbfeac000}, {0xbfeae000}, - {0xbfeb0000}, {0xbfeb2000}, {0xbfeb4000}, {0xbfeb6000}, - {0xbfeb8000}, {0xbfeba000}, {0xbfebc000}, {0xbfebe000}, - {0xbfec0000}, {0xbfec2000}, {0xbfec4000}, {0xbfec6000}, - {0xbfec8000}, {0xbfeca000}, {0xbfecc000}, {0xbfece000}, - {0xbfed0000}, {0xbfed2000}, {0xbfed4000}, {0xbfed6000}, - {0xbfed8000}, {0xbfeda000}, {0xbfedc000}, {0xbfede000}, - {0xbfee0000}, {0xbfee2000}, {0xbfee4000}, {0xbfee6000}, - {0xbfee8000}, {0xbfeea000}, {0xbfeec000}, {0xbfeee000}, - {0xbfef0000}, {0xbfef2000}, {0xbfef4000}, {0xbfef6000}, - {0xbfef8000}, {0xbfefa000}, {0xbfefc000}, {0xbfefe000}, - {0xbff00000}, {0xbff02000}, {0xbff04000}, {0xbff06000}, - {0xbff08000}, {0xbff0a000}, {0xbff0c000}, {0xbff0e000}, - {0xbff10000}, {0xbff12000}, {0xbff14000}, {0xbff16000}, - {0xbff18000}, {0xbff1a000}, {0xbff1c000}, {0xbff1e000}, - {0xbff20000}, {0xbff22000}, {0xbff24000}, {0xbff26000}, - {0xbff28000}, {0xbff2a000}, {0xbff2c000}, {0xbff2e000}, - {0xbff30000}, {0xbff32000}, {0xbff34000}, {0xbff36000}, - {0xbff38000}, {0xbff3a000}, {0xbff3c000}, {0xbff3e000}, - {0xbff40000}, {0xbff42000}, {0xbff44000}, {0xbff46000}, - {0xbff48000}, {0xbff4a000}, {0xbff4c000}, {0xbff4e000}, - {0xbff50000}, {0xbff52000}, {0xbff54000}, {0xbff56000}, - {0xbff58000}, {0xbff5a000}, {0xbff5c000}, {0xbff5e000}, - {0xbff60000}, {0xbff62000}, {0xbff64000}, {0xbff66000}, - {0xbff68000}, {0xbff6a000}, {0xbff6c000}, {0xbff6e000}, - {0xbff70000}, {0xbff72000}, {0xbff74000}, {0xbff76000}, - {0xbff78000}, {0xbff7a000}, {0xbff7c000}, {0xbff7e000}, - {0xbff80000}, {0xbff82000}, {0xbff84000}, {0xbff86000}, - {0xbff88000}, {0xbff8a000}, {0xbff8c000}, {0xbff8e000}, - {0xbff90000}, {0xbff92000}, {0xbff94000}, {0xbff96000}, - {0xbff98000}, {0xbff9a000}, {0xbff9c000}, {0xbff9e000}, - {0xbffa0000}, {0xbffa2000}, {0xbffa4000}, {0xbffa6000}, - {0xbffa8000}, {0xbffaa000}, {0xbffac000}, {0xbffae000}, - {0xbffb0000}, {0xbffb2000}, {0xbffb4000}, {0xbffb6000}, - {0xbffb8000}, {0xbffba000}, {0xbffbc000}, {0xbffbe000}, - {0xbffc0000}, {0xbffc2000}, {0xbffc4000}, {0xbffc6000}, - {0xbffc8000}, {0xbffca000}, {0xbffcc000}, {0xbffce000}, - {0xbffd0000}, {0xbffd2000}, {0xbffd4000}, {0xbffd6000}, - {0xbffd8000}, {0xbffda000}, {0xbffdc000}, {0xbffde000}, - {0xbffe0000}, {0xbffe2000}, {0xbffe4000}, {0xbffe6000}, - {0xbffe8000}, {0xbffea000}, {0xbffec000}, {0xbffee000}, - {0xbfff0000}, {0xbfff2000}, {0xbfff4000}, {0xbfff6000}, - {0xbfff8000}, {0xbfffa000}, {0xbfffc000}, {0xbfffe000}, - {0xc0000000}, {0xc0002000}, {0xc0004000}, {0xc0006000}, - {0xc0008000}, {0xc000a000}, {0xc000c000}, {0xc000e000}, - {0xc0010000}, {0xc0012000}, {0xc0014000}, {0xc0016000}, - {0xc0018000}, {0xc001a000}, {0xc001c000}, {0xc001e000}, - {0xc0020000}, {0xc0022000}, {0xc0024000}, {0xc0026000}, - {0xc0028000}, {0xc002a000}, {0xc002c000}, {0xc002e000}, - {0xc0030000}, {0xc0032000}, {0xc0034000}, {0xc0036000}, - {0xc0038000}, {0xc003a000}, {0xc003c000}, {0xc003e000}, - {0xc0040000}, {0xc0042000}, {0xc0044000}, {0xc0046000}, - {0xc0048000}, {0xc004a000}, {0xc004c000}, {0xc004e000}, - {0xc0050000}, {0xc0052000}, {0xc0054000}, {0xc0056000}, - {0xc0058000}, {0xc005a000}, {0xc005c000}, {0xc005e000}, - {0xc0060000}, {0xc0062000}, {0xc0064000}, {0xc0066000}, - {0xc0068000}, {0xc006a000}, {0xc006c000}, {0xc006e000}, - {0xc0070000}, {0xc0072000}, {0xc0074000}, {0xc0076000}, - {0xc0078000}, {0xc007a000}, {0xc007c000}, {0xc007e000}, - {0xc0080000}, {0xc0082000}, {0xc0084000}, {0xc0086000}, - {0xc0088000}, {0xc008a000}, {0xc008c000}, {0xc008e000}, - {0xc0090000}, {0xc0092000}, {0xc0094000}, {0xc0096000}, - {0xc0098000}, {0xc009a000}, {0xc009c000}, {0xc009e000}, - {0xc00a0000}, {0xc00a2000}, {0xc00a4000}, {0xc00a6000}, - {0xc00a8000}, {0xc00aa000}, {0xc00ac000}, {0xc00ae000}, - {0xc00b0000}, {0xc00b2000}, {0xc00b4000}, {0xc00b6000}, - {0xc00b8000}, {0xc00ba000}, {0xc00bc000}, {0xc00be000}, - {0xc00c0000}, {0xc00c2000}, {0xc00c4000}, {0xc00c6000}, - {0xc00c8000}, {0xc00ca000}, {0xc00cc000}, {0xc00ce000}, - {0xc00d0000}, {0xc00d2000}, {0xc00d4000}, {0xc00d6000}, - {0xc00d8000}, {0xc00da000}, {0xc00dc000}, {0xc00de000}, - {0xc00e0000}, {0xc00e2000}, {0xc00e4000}, {0xc00e6000}, - {0xc00e8000}, {0xc00ea000}, {0xc00ec000}, {0xc00ee000}, - {0xc00f0000}, {0xc00f2000}, {0xc00f4000}, {0xc00f6000}, - {0xc00f8000}, {0xc00fa000}, {0xc00fc000}, {0xc00fe000}, - {0xc0100000}, {0xc0102000}, {0xc0104000}, {0xc0106000}, - {0xc0108000}, {0xc010a000}, {0xc010c000}, {0xc010e000}, - {0xc0110000}, {0xc0112000}, {0xc0114000}, {0xc0116000}, - {0xc0118000}, {0xc011a000}, {0xc011c000}, {0xc011e000}, - {0xc0120000}, {0xc0122000}, {0xc0124000}, {0xc0126000}, - {0xc0128000}, {0xc012a000}, {0xc012c000}, {0xc012e000}, - {0xc0130000}, {0xc0132000}, {0xc0134000}, {0xc0136000}, - {0xc0138000}, {0xc013a000}, {0xc013c000}, {0xc013e000}, - {0xc0140000}, {0xc0142000}, {0xc0144000}, {0xc0146000}, - {0xc0148000}, {0xc014a000}, {0xc014c000}, {0xc014e000}, - {0xc0150000}, {0xc0152000}, {0xc0154000}, {0xc0156000}, - {0xc0158000}, {0xc015a000}, {0xc015c000}, {0xc015e000}, - {0xc0160000}, {0xc0162000}, {0xc0164000}, {0xc0166000}, - {0xc0168000}, {0xc016a000}, {0xc016c000}, {0xc016e000}, - {0xc0170000}, {0xc0172000}, {0xc0174000}, {0xc0176000}, - {0xc0178000}, {0xc017a000}, {0xc017c000}, {0xc017e000}, - {0xc0180000}, {0xc0182000}, {0xc0184000}, {0xc0186000}, - {0xc0188000}, {0xc018a000}, {0xc018c000}, {0xc018e000}, - {0xc0190000}, {0xc0192000}, {0xc0194000}, {0xc0196000}, - {0xc0198000}, {0xc019a000}, {0xc019c000}, {0xc019e000}, - {0xc01a0000}, {0xc01a2000}, {0xc01a4000}, {0xc01a6000}, - {0xc01a8000}, {0xc01aa000}, {0xc01ac000}, {0xc01ae000}, - {0xc01b0000}, {0xc01b2000}, {0xc01b4000}, {0xc01b6000}, - {0xc01b8000}, {0xc01ba000}, {0xc01bc000}, {0xc01be000}, - {0xc01c0000}, {0xc01c2000}, {0xc01c4000}, {0xc01c6000}, - {0xc01c8000}, {0xc01ca000}, {0xc01cc000}, {0xc01ce000}, - {0xc01d0000}, {0xc01d2000}, {0xc01d4000}, {0xc01d6000}, - {0xc01d8000}, {0xc01da000}, {0xc01dc000}, {0xc01de000}, - {0xc01e0000}, {0xc01e2000}, {0xc01e4000}, {0xc01e6000}, - {0xc01e8000}, {0xc01ea000}, {0xc01ec000}, {0xc01ee000}, - {0xc01f0000}, {0xc01f2000}, {0xc01f4000}, {0xc01f6000}, - {0xc01f8000}, {0xc01fa000}, {0xc01fc000}, {0xc01fe000}, - {0xc0200000}, {0xc0202000}, {0xc0204000}, {0xc0206000}, - {0xc0208000}, {0xc020a000}, {0xc020c000}, {0xc020e000}, - {0xc0210000}, {0xc0212000}, {0xc0214000}, {0xc0216000}, - {0xc0218000}, {0xc021a000}, {0xc021c000}, {0xc021e000}, - {0xc0220000}, {0xc0222000}, {0xc0224000}, {0xc0226000}, - {0xc0228000}, {0xc022a000}, {0xc022c000}, {0xc022e000}, - {0xc0230000}, {0xc0232000}, {0xc0234000}, {0xc0236000}, - {0xc0238000}, {0xc023a000}, {0xc023c000}, {0xc023e000}, - {0xc0240000}, {0xc0242000}, {0xc0244000}, {0xc0246000}, - {0xc0248000}, {0xc024a000}, {0xc024c000}, {0xc024e000}, - {0xc0250000}, {0xc0252000}, {0xc0254000}, {0xc0256000}, - {0xc0258000}, {0xc025a000}, {0xc025c000}, {0xc025e000}, - {0xc0260000}, {0xc0262000}, {0xc0264000}, {0xc0266000}, - {0xc0268000}, {0xc026a000}, {0xc026c000}, {0xc026e000}, - {0xc0270000}, {0xc0272000}, {0xc0274000}, {0xc0276000}, - {0xc0278000}, {0xc027a000}, {0xc027c000}, {0xc027e000}, - {0xc0280000}, {0xc0282000}, {0xc0284000}, {0xc0286000}, - {0xc0288000}, {0xc028a000}, {0xc028c000}, {0xc028e000}, - {0xc0290000}, {0xc0292000}, {0xc0294000}, {0xc0296000}, - {0xc0298000}, {0xc029a000}, {0xc029c000}, {0xc029e000}, - {0xc02a0000}, {0xc02a2000}, {0xc02a4000}, {0xc02a6000}, - {0xc02a8000}, {0xc02aa000}, {0xc02ac000}, {0xc02ae000}, - {0xc02b0000}, {0xc02b2000}, {0xc02b4000}, {0xc02b6000}, - {0xc02b8000}, {0xc02ba000}, {0xc02bc000}, {0xc02be000}, - {0xc02c0000}, {0xc02c2000}, {0xc02c4000}, {0xc02c6000}, - {0xc02c8000}, {0xc02ca000}, {0xc02cc000}, {0xc02ce000}, - {0xc02d0000}, {0xc02d2000}, {0xc02d4000}, {0xc02d6000}, - {0xc02d8000}, {0xc02da000}, {0xc02dc000}, {0xc02de000}, - {0xc02e0000}, {0xc02e2000}, {0xc02e4000}, {0xc02e6000}, - {0xc02e8000}, {0xc02ea000}, {0xc02ec000}, {0xc02ee000}, - {0xc02f0000}, {0xc02f2000}, {0xc02f4000}, {0xc02f6000}, - {0xc02f8000}, {0xc02fa000}, {0xc02fc000}, {0xc02fe000}, - {0xc0300000}, {0xc0302000}, {0xc0304000}, {0xc0306000}, - {0xc0308000}, {0xc030a000}, {0xc030c000}, {0xc030e000}, - {0xc0310000}, {0xc0312000}, {0xc0314000}, {0xc0316000}, - {0xc0318000}, {0xc031a000}, {0xc031c000}, {0xc031e000}, - {0xc0320000}, {0xc0322000}, {0xc0324000}, {0xc0326000}, - {0xc0328000}, {0xc032a000}, {0xc032c000}, {0xc032e000}, - {0xc0330000}, {0xc0332000}, {0xc0334000}, {0xc0336000}, - {0xc0338000}, {0xc033a000}, {0xc033c000}, {0xc033e000}, - {0xc0340000}, {0xc0342000}, {0xc0344000}, {0xc0346000}, - {0xc0348000}, {0xc034a000}, {0xc034c000}, {0xc034e000}, - {0xc0350000}, {0xc0352000}, {0xc0354000}, {0xc0356000}, - {0xc0358000}, {0xc035a000}, {0xc035c000}, {0xc035e000}, - {0xc0360000}, {0xc0362000}, {0xc0364000}, {0xc0366000}, - {0xc0368000}, {0xc036a000}, {0xc036c000}, {0xc036e000}, - {0xc0370000}, {0xc0372000}, {0xc0374000}, {0xc0376000}, - {0xc0378000}, {0xc037a000}, {0xc037c000}, {0xc037e000}, - {0xc0380000}, {0xc0382000}, {0xc0384000}, {0xc0386000}, - {0xc0388000}, {0xc038a000}, {0xc038c000}, {0xc038e000}, - {0xc0390000}, {0xc0392000}, {0xc0394000}, {0xc0396000}, - {0xc0398000}, {0xc039a000}, {0xc039c000}, {0xc039e000}, - {0xc03a0000}, {0xc03a2000}, {0xc03a4000}, {0xc03a6000}, - {0xc03a8000}, {0xc03aa000}, {0xc03ac000}, {0xc03ae000}, - {0xc03b0000}, {0xc03b2000}, {0xc03b4000}, {0xc03b6000}, - {0xc03b8000}, {0xc03ba000}, {0xc03bc000}, {0xc03be000}, - {0xc03c0000}, {0xc03c2000}, {0xc03c4000}, {0xc03c6000}, - {0xc03c8000}, {0xc03ca000}, {0xc03cc000}, {0xc03ce000}, - {0xc03d0000}, {0xc03d2000}, {0xc03d4000}, {0xc03d6000}, - {0xc03d8000}, {0xc03da000}, {0xc03dc000}, {0xc03de000}, - {0xc03e0000}, {0xc03e2000}, {0xc03e4000}, {0xc03e6000}, - {0xc03e8000}, {0xc03ea000}, {0xc03ec000}, {0xc03ee000}, - {0xc03f0000}, {0xc03f2000}, {0xc03f4000}, {0xc03f6000}, - {0xc03f8000}, {0xc03fa000}, {0xc03fc000}, {0xc03fe000}, - {0xc0400000}, {0xc0402000}, {0xc0404000}, {0xc0406000}, - {0xc0408000}, {0xc040a000}, {0xc040c000}, {0xc040e000}, - {0xc0410000}, {0xc0412000}, {0xc0414000}, {0xc0416000}, - {0xc0418000}, {0xc041a000}, {0xc041c000}, {0xc041e000}, - {0xc0420000}, {0xc0422000}, {0xc0424000}, {0xc0426000}, - {0xc0428000}, {0xc042a000}, {0xc042c000}, {0xc042e000}, - {0xc0430000}, {0xc0432000}, {0xc0434000}, {0xc0436000}, - {0xc0438000}, {0xc043a000}, {0xc043c000}, {0xc043e000}, - {0xc0440000}, {0xc0442000}, {0xc0444000}, {0xc0446000}, - {0xc0448000}, {0xc044a000}, {0xc044c000}, {0xc044e000}, - {0xc0450000}, {0xc0452000}, {0xc0454000}, {0xc0456000}, - {0xc0458000}, {0xc045a000}, {0xc045c000}, {0xc045e000}, - {0xc0460000}, {0xc0462000}, {0xc0464000}, {0xc0466000}, - {0xc0468000}, {0xc046a000}, {0xc046c000}, {0xc046e000}, - {0xc0470000}, {0xc0472000}, {0xc0474000}, {0xc0476000}, - {0xc0478000}, {0xc047a000}, {0xc047c000}, {0xc047e000}, - {0xc0480000}, {0xc0482000}, {0xc0484000}, {0xc0486000}, - {0xc0488000}, {0xc048a000}, {0xc048c000}, {0xc048e000}, - {0xc0490000}, {0xc0492000}, {0xc0494000}, {0xc0496000}, - {0xc0498000}, {0xc049a000}, {0xc049c000}, {0xc049e000}, - {0xc04a0000}, {0xc04a2000}, {0xc04a4000}, {0xc04a6000}, - {0xc04a8000}, {0xc04aa000}, {0xc04ac000}, {0xc04ae000}, - {0xc04b0000}, {0xc04b2000}, {0xc04b4000}, {0xc04b6000}, - {0xc04b8000}, {0xc04ba000}, {0xc04bc000}, {0xc04be000}, - {0xc04c0000}, {0xc04c2000}, {0xc04c4000}, {0xc04c6000}, - {0xc04c8000}, {0xc04ca000}, {0xc04cc000}, {0xc04ce000}, - {0xc04d0000}, {0xc04d2000}, {0xc04d4000}, {0xc04d6000}, - {0xc04d8000}, {0xc04da000}, {0xc04dc000}, {0xc04de000}, - {0xc04e0000}, {0xc04e2000}, {0xc04e4000}, {0xc04e6000}, - {0xc04e8000}, {0xc04ea000}, {0xc04ec000}, {0xc04ee000}, - {0xc04f0000}, {0xc04f2000}, {0xc04f4000}, {0xc04f6000}, - {0xc04f8000}, {0xc04fa000}, {0xc04fc000}, {0xc04fe000}, - {0xc0500000}, {0xc0502000}, {0xc0504000}, {0xc0506000}, - {0xc0508000}, {0xc050a000}, {0xc050c000}, {0xc050e000}, - {0xc0510000}, {0xc0512000}, {0xc0514000}, {0xc0516000}, - {0xc0518000}, {0xc051a000}, {0xc051c000}, {0xc051e000}, - {0xc0520000}, {0xc0522000}, {0xc0524000}, {0xc0526000}, - {0xc0528000}, {0xc052a000}, {0xc052c000}, {0xc052e000}, - {0xc0530000}, {0xc0532000}, {0xc0534000}, {0xc0536000}, - {0xc0538000}, {0xc053a000}, {0xc053c000}, {0xc053e000}, - {0xc0540000}, {0xc0542000}, {0xc0544000}, {0xc0546000}, - {0xc0548000}, {0xc054a000}, {0xc054c000}, {0xc054e000}, - {0xc0550000}, {0xc0552000}, {0xc0554000}, {0xc0556000}, - {0xc0558000}, {0xc055a000}, {0xc055c000}, {0xc055e000}, - {0xc0560000}, {0xc0562000}, {0xc0564000}, {0xc0566000}, - {0xc0568000}, {0xc056a000}, {0xc056c000}, {0xc056e000}, - {0xc0570000}, {0xc0572000}, {0xc0574000}, {0xc0576000}, - {0xc0578000}, {0xc057a000}, {0xc057c000}, {0xc057e000}, - {0xc0580000}, {0xc0582000}, {0xc0584000}, {0xc0586000}, - {0xc0588000}, {0xc058a000}, {0xc058c000}, {0xc058e000}, - {0xc0590000}, {0xc0592000}, {0xc0594000}, {0xc0596000}, - {0xc0598000}, {0xc059a000}, {0xc059c000}, {0xc059e000}, - {0xc05a0000}, {0xc05a2000}, {0xc05a4000}, {0xc05a6000}, - {0xc05a8000}, {0xc05aa000}, {0xc05ac000}, {0xc05ae000}, - {0xc05b0000}, {0xc05b2000}, {0xc05b4000}, {0xc05b6000}, - {0xc05b8000}, {0xc05ba000}, {0xc05bc000}, {0xc05be000}, - {0xc05c0000}, {0xc05c2000}, {0xc05c4000}, {0xc05c6000}, - {0xc05c8000}, {0xc05ca000}, {0xc05cc000}, {0xc05ce000}, - {0xc05d0000}, {0xc05d2000}, {0xc05d4000}, {0xc05d6000}, - {0xc05d8000}, {0xc05da000}, {0xc05dc000}, {0xc05de000}, - {0xc05e0000}, {0xc05e2000}, {0xc05e4000}, {0xc05e6000}, - {0xc05e8000}, {0xc05ea000}, {0xc05ec000}, {0xc05ee000}, - {0xc05f0000}, {0xc05f2000}, {0xc05f4000}, {0xc05f6000}, - {0xc05f8000}, {0xc05fa000}, {0xc05fc000}, {0xc05fe000}, - {0xc0600000}, {0xc0602000}, {0xc0604000}, {0xc0606000}, - {0xc0608000}, {0xc060a000}, {0xc060c000}, {0xc060e000}, - {0xc0610000}, {0xc0612000}, {0xc0614000}, {0xc0616000}, - {0xc0618000}, {0xc061a000}, {0xc061c000}, {0xc061e000}, - {0xc0620000}, {0xc0622000}, {0xc0624000}, {0xc0626000}, - {0xc0628000}, {0xc062a000}, {0xc062c000}, {0xc062e000}, - {0xc0630000}, {0xc0632000}, {0xc0634000}, {0xc0636000}, - {0xc0638000}, {0xc063a000}, {0xc063c000}, {0xc063e000}, - {0xc0640000}, {0xc0642000}, {0xc0644000}, {0xc0646000}, - {0xc0648000}, {0xc064a000}, {0xc064c000}, {0xc064e000}, - {0xc0650000}, {0xc0652000}, {0xc0654000}, {0xc0656000}, - {0xc0658000}, {0xc065a000}, {0xc065c000}, {0xc065e000}, - {0xc0660000}, {0xc0662000}, {0xc0664000}, {0xc0666000}, - {0xc0668000}, {0xc066a000}, {0xc066c000}, {0xc066e000}, - {0xc0670000}, {0xc0672000}, {0xc0674000}, {0xc0676000}, - {0xc0678000}, {0xc067a000}, {0xc067c000}, {0xc067e000}, - {0xc0680000}, {0xc0682000}, {0xc0684000}, {0xc0686000}, - {0xc0688000}, {0xc068a000}, {0xc068c000}, {0xc068e000}, - {0xc0690000}, {0xc0692000}, {0xc0694000}, {0xc0696000}, - {0xc0698000}, {0xc069a000}, {0xc069c000}, {0xc069e000}, - {0xc06a0000}, {0xc06a2000}, {0xc06a4000}, {0xc06a6000}, - {0xc06a8000}, {0xc06aa000}, {0xc06ac000}, {0xc06ae000}, - {0xc06b0000}, {0xc06b2000}, {0xc06b4000}, {0xc06b6000}, - {0xc06b8000}, {0xc06ba000}, {0xc06bc000}, {0xc06be000}, - {0xc06c0000}, {0xc06c2000}, {0xc06c4000}, {0xc06c6000}, - {0xc06c8000}, {0xc06ca000}, {0xc06cc000}, {0xc06ce000}, - {0xc06d0000}, {0xc06d2000}, {0xc06d4000}, {0xc06d6000}, - {0xc06d8000}, {0xc06da000}, {0xc06dc000}, {0xc06de000}, - {0xc06e0000}, {0xc06e2000}, {0xc06e4000}, {0xc06e6000}, - {0xc06e8000}, {0xc06ea000}, {0xc06ec000}, {0xc06ee000}, - {0xc06f0000}, {0xc06f2000}, {0xc06f4000}, {0xc06f6000}, - {0xc06f8000}, {0xc06fa000}, {0xc06fc000}, {0xc06fe000}, - {0xc0700000}, {0xc0702000}, {0xc0704000}, {0xc0706000}, - {0xc0708000}, {0xc070a000}, {0xc070c000}, {0xc070e000}, - {0xc0710000}, {0xc0712000}, {0xc0714000}, {0xc0716000}, - {0xc0718000}, {0xc071a000}, {0xc071c000}, {0xc071e000}, - {0xc0720000}, {0xc0722000}, {0xc0724000}, {0xc0726000}, - {0xc0728000}, {0xc072a000}, {0xc072c000}, {0xc072e000}, - {0xc0730000}, {0xc0732000}, {0xc0734000}, {0xc0736000}, - {0xc0738000}, {0xc073a000}, {0xc073c000}, {0xc073e000}, - {0xc0740000}, {0xc0742000}, {0xc0744000}, {0xc0746000}, - {0xc0748000}, {0xc074a000}, {0xc074c000}, {0xc074e000}, - {0xc0750000}, {0xc0752000}, {0xc0754000}, {0xc0756000}, - {0xc0758000}, {0xc075a000}, {0xc075c000}, {0xc075e000}, - {0xc0760000}, {0xc0762000}, {0xc0764000}, {0xc0766000}, - {0xc0768000}, {0xc076a000}, {0xc076c000}, {0xc076e000}, - {0xc0770000}, {0xc0772000}, {0xc0774000}, {0xc0776000}, - {0xc0778000}, {0xc077a000}, {0xc077c000}, {0xc077e000}, - {0xc0780000}, {0xc0782000}, {0xc0784000}, {0xc0786000}, - {0xc0788000}, {0xc078a000}, {0xc078c000}, {0xc078e000}, - {0xc0790000}, {0xc0792000}, {0xc0794000}, {0xc0796000}, - {0xc0798000}, {0xc079a000}, {0xc079c000}, {0xc079e000}, - {0xc07a0000}, {0xc07a2000}, {0xc07a4000}, {0xc07a6000}, - {0xc07a8000}, {0xc07aa000}, {0xc07ac000}, {0xc07ae000}, - {0xc07b0000}, {0xc07b2000}, {0xc07b4000}, {0xc07b6000}, - {0xc07b8000}, {0xc07ba000}, {0xc07bc000}, {0xc07be000}, - {0xc07c0000}, {0xc07c2000}, {0xc07c4000}, {0xc07c6000}, - {0xc07c8000}, {0xc07ca000}, {0xc07cc000}, {0xc07ce000}, - {0xc07d0000}, {0xc07d2000}, {0xc07d4000}, {0xc07d6000}, - {0xc07d8000}, {0xc07da000}, {0xc07dc000}, {0xc07de000}, - {0xc07e0000}, {0xc07e2000}, {0xc07e4000}, {0xc07e6000}, - {0xc07e8000}, {0xc07ea000}, {0xc07ec000}, {0xc07ee000}, - {0xc07f0000}, {0xc07f2000}, {0xc07f4000}, {0xc07f6000}, - {0xc07f8000}, {0xc07fa000}, {0xc07fc000}, {0xc07fe000}, - {0xc0800000}, {0xc0802000}, {0xc0804000}, {0xc0806000}, - {0xc0808000}, {0xc080a000}, {0xc080c000}, {0xc080e000}, - {0xc0810000}, {0xc0812000}, {0xc0814000}, {0xc0816000}, - {0xc0818000}, {0xc081a000}, {0xc081c000}, {0xc081e000}, - {0xc0820000}, {0xc0822000}, {0xc0824000}, {0xc0826000}, - {0xc0828000}, {0xc082a000}, {0xc082c000}, {0xc082e000}, - {0xc0830000}, {0xc0832000}, {0xc0834000}, {0xc0836000}, - {0xc0838000}, {0xc083a000}, {0xc083c000}, {0xc083e000}, - {0xc0840000}, {0xc0842000}, {0xc0844000}, {0xc0846000}, - {0xc0848000}, {0xc084a000}, {0xc084c000}, {0xc084e000}, - {0xc0850000}, {0xc0852000}, {0xc0854000}, {0xc0856000}, - {0xc0858000}, {0xc085a000}, {0xc085c000}, {0xc085e000}, - {0xc0860000}, {0xc0862000}, {0xc0864000}, {0xc0866000}, - {0xc0868000}, {0xc086a000}, {0xc086c000}, {0xc086e000}, - {0xc0870000}, {0xc0872000}, {0xc0874000}, {0xc0876000}, - {0xc0878000}, {0xc087a000}, {0xc087c000}, {0xc087e000}, - {0xc0880000}, {0xc0882000}, {0xc0884000}, {0xc0886000}, - {0xc0888000}, {0xc088a000}, {0xc088c000}, {0xc088e000}, - {0xc0890000}, {0xc0892000}, {0xc0894000}, {0xc0896000}, - {0xc0898000}, {0xc089a000}, {0xc089c000}, {0xc089e000}, - {0xc08a0000}, {0xc08a2000}, {0xc08a4000}, {0xc08a6000}, - {0xc08a8000}, {0xc08aa000}, {0xc08ac000}, {0xc08ae000}, - {0xc08b0000}, {0xc08b2000}, {0xc08b4000}, {0xc08b6000}, - {0xc08b8000}, {0xc08ba000}, {0xc08bc000}, {0xc08be000}, - {0xc08c0000}, {0xc08c2000}, {0xc08c4000}, {0xc08c6000}, - {0xc08c8000}, {0xc08ca000}, {0xc08cc000}, {0xc08ce000}, - {0xc08d0000}, {0xc08d2000}, {0xc08d4000}, {0xc08d6000}, - {0xc08d8000}, {0xc08da000}, {0xc08dc000}, {0xc08de000}, - {0xc08e0000}, {0xc08e2000}, {0xc08e4000}, {0xc08e6000}, - {0xc08e8000}, {0xc08ea000}, {0xc08ec000}, {0xc08ee000}, - {0xc08f0000}, {0xc08f2000}, {0xc08f4000}, {0xc08f6000}, - {0xc08f8000}, {0xc08fa000}, {0xc08fc000}, {0xc08fe000}, - {0xc0900000}, {0xc0902000}, {0xc0904000}, {0xc0906000}, - {0xc0908000}, {0xc090a000}, {0xc090c000}, {0xc090e000}, - {0xc0910000}, {0xc0912000}, {0xc0914000}, {0xc0916000}, - {0xc0918000}, {0xc091a000}, {0xc091c000}, {0xc091e000}, - {0xc0920000}, {0xc0922000}, {0xc0924000}, {0xc0926000}, - {0xc0928000}, {0xc092a000}, {0xc092c000}, {0xc092e000}, - {0xc0930000}, {0xc0932000}, {0xc0934000}, {0xc0936000}, - {0xc0938000}, {0xc093a000}, {0xc093c000}, {0xc093e000}, - {0xc0940000}, {0xc0942000}, {0xc0944000}, {0xc0946000}, - {0xc0948000}, {0xc094a000}, {0xc094c000}, {0xc094e000}, - {0xc0950000}, {0xc0952000}, {0xc0954000}, {0xc0956000}, - {0xc0958000}, {0xc095a000}, {0xc095c000}, {0xc095e000}, - {0xc0960000}, {0xc0962000}, {0xc0964000}, {0xc0966000}, - {0xc0968000}, {0xc096a000}, {0xc096c000}, {0xc096e000}, - {0xc0970000}, {0xc0972000}, {0xc0974000}, {0xc0976000}, - {0xc0978000}, {0xc097a000}, {0xc097c000}, {0xc097e000}, - {0xc0980000}, {0xc0982000}, {0xc0984000}, {0xc0986000}, - {0xc0988000}, {0xc098a000}, {0xc098c000}, {0xc098e000}, - {0xc0990000}, {0xc0992000}, {0xc0994000}, {0xc0996000}, - {0xc0998000}, {0xc099a000}, {0xc099c000}, {0xc099e000}, - {0xc09a0000}, {0xc09a2000}, {0xc09a4000}, {0xc09a6000}, - {0xc09a8000}, {0xc09aa000}, {0xc09ac000}, {0xc09ae000}, - {0xc09b0000}, {0xc09b2000}, {0xc09b4000}, {0xc09b6000}, - {0xc09b8000}, {0xc09ba000}, {0xc09bc000}, {0xc09be000}, - {0xc09c0000}, {0xc09c2000}, {0xc09c4000}, {0xc09c6000}, - {0xc09c8000}, {0xc09ca000}, {0xc09cc000}, {0xc09ce000}, - {0xc09d0000}, {0xc09d2000}, {0xc09d4000}, {0xc09d6000}, - {0xc09d8000}, {0xc09da000}, {0xc09dc000}, {0xc09de000}, - {0xc09e0000}, {0xc09e2000}, {0xc09e4000}, {0xc09e6000}, - {0xc09e8000}, {0xc09ea000}, {0xc09ec000}, {0xc09ee000}, - {0xc09f0000}, {0xc09f2000}, {0xc09f4000}, {0xc09f6000}, - {0xc09f8000}, {0xc09fa000}, {0xc09fc000}, {0xc09fe000}, - {0xc0a00000}, {0xc0a02000}, {0xc0a04000}, {0xc0a06000}, - {0xc0a08000}, {0xc0a0a000}, {0xc0a0c000}, {0xc0a0e000}, - {0xc0a10000}, {0xc0a12000}, {0xc0a14000}, {0xc0a16000}, - {0xc0a18000}, {0xc0a1a000}, {0xc0a1c000}, {0xc0a1e000}, - {0xc0a20000}, {0xc0a22000}, {0xc0a24000}, {0xc0a26000}, - {0xc0a28000}, {0xc0a2a000}, {0xc0a2c000}, {0xc0a2e000}, - {0xc0a30000}, {0xc0a32000}, {0xc0a34000}, {0xc0a36000}, - {0xc0a38000}, {0xc0a3a000}, {0xc0a3c000}, {0xc0a3e000}, - {0xc0a40000}, {0xc0a42000}, {0xc0a44000}, {0xc0a46000}, - {0xc0a48000}, {0xc0a4a000}, {0xc0a4c000}, {0xc0a4e000}, - {0xc0a50000}, {0xc0a52000}, {0xc0a54000}, {0xc0a56000}, - {0xc0a58000}, {0xc0a5a000}, {0xc0a5c000}, {0xc0a5e000}, - {0xc0a60000}, {0xc0a62000}, {0xc0a64000}, {0xc0a66000}, - {0xc0a68000}, {0xc0a6a000}, {0xc0a6c000}, {0xc0a6e000}, - {0xc0a70000}, {0xc0a72000}, {0xc0a74000}, {0xc0a76000}, - {0xc0a78000}, {0xc0a7a000}, {0xc0a7c000}, {0xc0a7e000}, - {0xc0a80000}, {0xc0a82000}, {0xc0a84000}, {0xc0a86000}, - {0xc0a88000}, {0xc0a8a000}, {0xc0a8c000}, {0xc0a8e000}, - {0xc0a90000}, {0xc0a92000}, {0xc0a94000}, {0xc0a96000}, - {0xc0a98000}, {0xc0a9a000}, {0xc0a9c000}, {0xc0a9e000}, - {0xc0aa0000}, {0xc0aa2000}, {0xc0aa4000}, {0xc0aa6000}, - {0xc0aa8000}, {0xc0aaa000}, {0xc0aac000}, {0xc0aae000}, - {0xc0ab0000}, {0xc0ab2000}, {0xc0ab4000}, {0xc0ab6000}, - {0xc0ab8000}, {0xc0aba000}, {0xc0abc000}, {0xc0abe000}, - {0xc0ac0000}, {0xc0ac2000}, {0xc0ac4000}, {0xc0ac6000}, - {0xc0ac8000}, {0xc0aca000}, {0xc0acc000}, {0xc0ace000}, - {0xc0ad0000}, {0xc0ad2000}, {0xc0ad4000}, {0xc0ad6000}, - {0xc0ad8000}, {0xc0ada000}, {0xc0adc000}, {0xc0ade000}, - {0xc0ae0000}, {0xc0ae2000}, {0xc0ae4000}, {0xc0ae6000}, - {0xc0ae8000}, {0xc0aea000}, {0xc0aec000}, {0xc0aee000}, - {0xc0af0000}, {0xc0af2000}, {0xc0af4000}, {0xc0af6000}, - {0xc0af8000}, {0xc0afa000}, {0xc0afc000}, {0xc0afe000}, - {0xc0b00000}, {0xc0b02000}, {0xc0b04000}, {0xc0b06000}, - {0xc0b08000}, {0xc0b0a000}, {0xc0b0c000}, {0xc0b0e000}, - {0xc0b10000}, {0xc0b12000}, {0xc0b14000}, {0xc0b16000}, - {0xc0b18000}, {0xc0b1a000}, {0xc0b1c000}, {0xc0b1e000}, - {0xc0b20000}, {0xc0b22000}, {0xc0b24000}, {0xc0b26000}, - {0xc0b28000}, {0xc0b2a000}, {0xc0b2c000}, {0xc0b2e000}, - {0xc0b30000}, {0xc0b32000}, {0xc0b34000}, {0xc0b36000}, - {0xc0b38000}, {0xc0b3a000}, {0xc0b3c000}, {0xc0b3e000}, - {0xc0b40000}, {0xc0b42000}, {0xc0b44000}, {0xc0b46000}, - {0xc0b48000}, {0xc0b4a000}, {0xc0b4c000}, {0xc0b4e000}, - {0xc0b50000}, {0xc0b52000}, {0xc0b54000}, {0xc0b56000}, - {0xc0b58000}, {0xc0b5a000}, {0xc0b5c000}, {0xc0b5e000}, - {0xc0b60000}, {0xc0b62000}, {0xc0b64000}, {0xc0b66000}, - {0xc0b68000}, {0xc0b6a000}, {0xc0b6c000}, {0xc0b6e000}, - {0xc0b70000}, {0xc0b72000}, {0xc0b74000}, {0xc0b76000}, - {0xc0b78000}, {0xc0b7a000}, {0xc0b7c000}, {0xc0b7e000}, - {0xc0b80000}, {0xc0b82000}, {0xc0b84000}, {0xc0b86000}, - {0xc0b88000}, {0xc0b8a000}, {0xc0b8c000}, {0xc0b8e000}, - {0xc0b90000}, {0xc0b92000}, {0xc0b94000}, {0xc0b96000}, - {0xc0b98000}, {0xc0b9a000}, {0xc0b9c000}, {0xc0b9e000}, - {0xc0ba0000}, {0xc0ba2000}, {0xc0ba4000}, {0xc0ba6000}, - {0xc0ba8000}, {0xc0baa000}, {0xc0bac000}, {0xc0bae000}, - {0xc0bb0000}, {0xc0bb2000}, {0xc0bb4000}, {0xc0bb6000}, - {0xc0bb8000}, {0xc0bba000}, {0xc0bbc000}, {0xc0bbe000}, - {0xc0bc0000}, {0xc0bc2000}, {0xc0bc4000}, {0xc0bc6000}, - {0xc0bc8000}, {0xc0bca000}, {0xc0bcc000}, {0xc0bce000}, - {0xc0bd0000}, {0xc0bd2000}, {0xc0bd4000}, {0xc0bd6000}, - {0xc0bd8000}, {0xc0bda000}, {0xc0bdc000}, {0xc0bde000}, - {0xc0be0000}, {0xc0be2000}, {0xc0be4000}, {0xc0be6000}, - {0xc0be8000}, {0xc0bea000}, {0xc0bec000}, {0xc0bee000}, - {0xc0bf0000}, {0xc0bf2000}, {0xc0bf4000}, {0xc0bf6000}, - {0xc0bf8000}, {0xc0bfa000}, {0xc0bfc000}, {0xc0bfe000}, - {0xc0c00000}, {0xc0c02000}, {0xc0c04000}, {0xc0c06000}, - {0xc0c08000}, {0xc0c0a000}, {0xc0c0c000}, {0xc0c0e000}, - {0xc0c10000}, {0xc0c12000}, {0xc0c14000}, {0xc0c16000}, - {0xc0c18000}, {0xc0c1a000}, {0xc0c1c000}, {0xc0c1e000}, - {0xc0c20000}, {0xc0c22000}, {0xc0c24000}, {0xc0c26000}, - {0xc0c28000}, {0xc0c2a000}, {0xc0c2c000}, {0xc0c2e000}, - {0xc0c30000}, {0xc0c32000}, {0xc0c34000}, {0xc0c36000}, - {0xc0c38000}, {0xc0c3a000}, {0xc0c3c000}, {0xc0c3e000}, - {0xc0c40000}, {0xc0c42000}, {0xc0c44000}, {0xc0c46000}, - {0xc0c48000}, {0xc0c4a000}, {0xc0c4c000}, {0xc0c4e000}, - {0xc0c50000}, {0xc0c52000}, {0xc0c54000}, {0xc0c56000}, - {0xc0c58000}, {0xc0c5a000}, {0xc0c5c000}, {0xc0c5e000}, - {0xc0c60000}, {0xc0c62000}, {0xc0c64000}, {0xc0c66000}, - {0xc0c68000}, {0xc0c6a000}, {0xc0c6c000}, {0xc0c6e000}, - {0xc0c70000}, {0xc0c72000}, {0xc0c74000}, {0xc0c76000}, - {0xc0c78000}, {0xc0c7a000}, {0xc0c7c000}, {0xc0c7e000}, - {0xc0c80000}, {0xc0c82000}, {0xc0c84000}, {0xc0c86000}, - {0xc0c88000}, {0xc0c8a000}, {0xc0c8c000}, {0xc0c8e000}, - {0xc0c90000}, {0xc0c92000}, {0xc0c94000}, {0xc0c96000}, - {0xc0c98000}, {0xc0c9a000}, {0xc0c9c000}, {0xc0c9e000}, - {0xc0ca0000}, {0xc0ca2000}, {0xc0ca4000}, {0xc0ca6000}, - {0xc0ca8000}, {0xc0caa000}, {0xc0cac000}, {0xc0cae000}, - {0xc0cb0000}, {0xc0cb2000}, {0xc0cb4000}, {0xc0cb6000}, - {0xc0cb8000}, {0xc0cba000}, {0xc0cbc000}, {0xc0cbe000}, - {0xc0cc0000}, {0xc0cc2000}, {0xc0cc4000}, {0xc0cc6000}, - {0xc0cc8000}, {0xc0cca000}, {0xc0ccc000}, {0xc0cce000}, - {0xc0cd0000}, {0xc0cd2000}, {0xc0cd4000}, {0xc0cd6000}, - {0xc0cd8000}, {0xc0cda000}, {0xc0cdc000}, {0xc0cde000}, - {0xc0ce0000}, {0xc0ce2000}, {0xc0ce4000}, {0xc0ce6000}, - {0xc0ce8000}, {0xc0cea000}, {0xc0cec000}, {0xc0cee000}, - {0xc0cf0000}, {0xc0cf2000}, {0xc0cf4000}, {0xc0cf6000}, - {0xc0cf8000}, {0xc0cfa000}, {0xc0cfc000}, {0xc0cfe000}, - {0xc0d00000}, {0xc0d02000}, {0xc0d04000}, {0xc0d06000}, - {0xc0d08000}, {0xc0d0a000}, {0xc0d0c000}, {0xc0d0e000}, - {0xc0d10000}, {0xc0d12000}, {0xc0d14000}, {0xc0d16000}, - {0xc0d18000}, {0xc0d1a000}, {0xc0d1c000}, {0xc0d1e000}, - {0xc0d20000}, {0xc0d22000}, {0xc0d24000}, {0xc0d26000}, - {0xc0d28000}, {0xc0d2a000}, {0xc0d2c000}, {0xc0d2e000}, - {0xc0d30000}, {0xc0d32000}, {0xc0d34000}, {0xc0d36000}, - {0xc0d38000}, {0xc0d3a000}, {0xc0d3c000}, {0xc0d3e000}, - {0xc0d40000}, {0xc0d42000}, {0xc0d44000}, {0xc0d46000}, - {0xc0d48000}, {0xc0d4a000}, {0xc0d4c000}, {0xc0d4e000}, - {0xc0d50000}, {0xc0d52000}, {0xc0d54000}, {0xc0d56000}, - {0xc0d58000}, {0xc0d5a000}, {0xc0d5c000}, {0xc0d5e000}, - {0xc0d60000}, {0xc0d62000}, {0xc0d64000}, {0xc0d66000}, - {0xc0d68000}, {0xc0d6a000}, {0xc0d6c000}, {0xc0d6e000}, - {0xc0d70000}, {0xc0d72000}, {0xc0d74000}, {0xc0d76000}, - {0xc0d78000}, {0xc0d7a000}, {0xc0d7c000}, {0xc0d7e000}, - {0xc0d80000}, {0xc0d82000}, {0xc0d84000}, {0xc0d86000}, - {0xc0d88000}, {0xc0d8a000}, {0xc0d8c000}, {0xc0d8e000}, - {0xc0d90000}, {0xc0d92000}, {0xc0d94000}, {0xc0d96000}, - {0xc0d98000}, {0xc0d9a000}, {0xc0d9c000}, {0xc0d9e000}, - {0xc0da0000}, {0xc0da2000}, {0xc0da4000}, {0xc0da6000}, - {0xc0da8000}, {0xc0daa000}, {0xc0dac000}, {0xc0dae000}, - {0xc0db0000}, {0xc0db2000}, {0xc0db4000}, {0xc0db6000}, - {0xc0db8000}, {0xc0dba000}, {0xc0dbc000}, {0xc0dbe000}, - {0xc0dc0000}, {0xc0dc2000}, {0xc0dc4000}, {0xc0dc6000}, - {0xc0dc8000}, {0xc0dca000}, {0xc0dcc000}, {0xc0dce000}, - {0xc0dd0000}, {0xc0dd2000}, {0xc0dd4000}, {0xc0dd6000}, - {0xc0dd8000}, {0xc0dda000}, {0xc0ddc000}, {0xc0dde000}, - {0xc0de0000}, {0xc0de2000}, {0xc0de4000}, {0xc0de6000}, - {0xc0de8000}, {0xc0dea000}, {0xc0dec000}, {0xc0dee000}, - {0xc0df0000}, {0xc0df2000}, {0xc0df4000}, {0xc0df6000}, - {0xc0df8000}, {0xc0dfa000}, {0xc0dfc000}, {0xc0dfe000}, - {0xc0e00000}, {0xc0e02000}, {0xc0e04000}, {0xc0e06000}, - {0xc0e08000}, {0xc0e0a000}, {0xc0e0c000}, {0xc0e0e000}, - {0xc0e10000}, {0xc0e12000}, {0xc0e14000}, {0xc0e16000}, - {0xc0e18000}, {0xc0e1a000}, {0xc0e1c000}, {0xc0e1e000}, - {0xc0e20000}, {0xc0e22000}, {0xc0e24000}, {0xc0e26000}, - {0xc0e28000}, {0xc0e2a000}, {0xc0e2c000}, {0xc0e2e000}, - {0xc0e30000}, {0xc0e32000}, {0xc0e34000}, {0xc0e36000}, - {0xc0e38000}, {0xc0e3a000}, {0xc0e3c000}, {0xc0e3e000}, - {0xc0e40000}, {0xc0e42000}, {0xc0e44000}, {0xc0e46000}, - {0xc0e48000}, {0xc0e4a000}, {0xc0e4c000}, {0xc0e4e000}, - {0xc0e50000}, {0xc0e52000}, {0xc0e54000}, {0xc0e56000}, - {0xc0e58000}, {0xc0e5a000}, {0xc0e5c000}, {0xc0e5e000}, - {0xc0e60000}, {0xc0e62000}, {0xc0e64000}, {0xc0e66000}, - {0xc0e68000}, {0xc0e6a000}, {0xc0e6c000}, {0xc0e6e000}, - {0xc0e70000}, {0xc0e72000}, {0xc0e74000}, {0xc0e76000}, - {0xc0e78000}, {0xc0e7a000}, {0xc0e7c000}, {0xc0e7e000}, - {0xc0e80000}, {0xc0e82000}, {0xc0e84000}, {0xc0e86000}, - {0xc0e88000}, {0xc0e8a000}, {0xc0e8c000}, {0xc0e8e000}, - {0xc0e90000}, {0xc0e92000}, {0xc0e94000}, {0xc0e96000}, - {0xc0e98000}, {0xc0e9a000}, {0xc0e9c000}, {0xc0e9e000}, - {0xc0ea0000}, {0xc0ea2000}, {0xc0ea4000}, {0xc0ea6000}, - {0xc0ea8000}, {0xc0eaa000}, {0xc0eac000}, {0xc0eae000}, - {0xc0eb0000}, {0xc0eb2000}, {0xc0eb4000}, {0xc0eb6000}, - {0xc0eb8000}, {0xc0eba000}, {0xc0ebc000}, {0xc0ebe000}, - {0xc0ec0000}, {0xc0ec2000}, {0xc0ec4000}, {0xc0ec6000}, - {0xc0ec8000}, {0xc0eca000}, {0xc0ecc000}, {0xc0ece000}, - {0xc0ed0000}, {0xc0ed2000}, {0xc0ed4000}, {0xc0ed6000}, - {0xc0ed8000}, {0xc0eda000}, {0xc0edc000}, {0xc0ede000}, - {0xc0ee0000}, {0xc0ee2000}, {0xc0ee4000}, {0xc0ee6000}, - {0xc0ee8000}, {0xc0eea000}, {0xc0eec000}, {0xc0eee000}, - {0xc0ef0000}, {0xc0ef2000}, {0xc0ef4000}, {0xc0ef6000}, - {0xc0ef8000}, {0xc0efa000}, {0xc0efc000}, {0xc0efe000}, - {0xc0f00000}, {0xc0f02000}, {0xc0f04000}, {0xc0f06000}, - {0xc0f08000}, {0xc0f0a000}, {0xc0f0c000}, {0xc0f0e000}, - {0xc0f10000}, {0xc0f12000}, {0xc0f14000}, {0xc0f16000}, - {0xc0f18000}, {0xc0f1a000}, {0xc0f1c000}, {0xc0f1e000}, - {0xc0f20000}, {0xc0f22000}, {0xc0f24000}, {0xc0f26000}, - {0xc0f28000}, {0xc0f2a000}, {0xc0f2c000}, {0xc0f2e000}, - {0xc0f30000}, {0xc0f32000}, {0xc0f34000}, {0xc0f36000}, - {0xc0f38000}, {0xc0f3a000}, {0xc0f3c000}, {0xc0f3e000}, - {0xc0f40000}, {0xc0f42000}, {0xc0f44000}, {0xc0f46000}, - {0xc0f48000}, {0xc0f4a000}, {0xc0f4c000}, {0xc0f4e000}, - {0xc0f50000}, {0xc0f52000}, {0xc0f54000}, {0xc0f56000}, - {0xc0f58000}, {0xc0f5a000}, {0xc0f5c000}, {0xc0f5e000}, - {0xc0f60000}, {0xc0f62000}, {0xc0f64000}, {0xc0f66000}, - {0xc0f68000}, {0xc0f6a000}, {0xc0f6c000}, {0xc0f6e000}, - {0xc0f70000}, {0xc0f72000}, {0xc0f74000}, {0xc0f76000}, - {0xc0f78000}, {0xc0f7a000}, {0xc0f7c000}, {0xc0f7e000}, - {0xc0f80000}, {0xc0f82000}, {0xc0f84000}, {0xc0f86000}, - {0xc0f88000}, {0xc0f8a000}, {0xc0f8c000}, {0xc0f8e000}, - {0xc0f90000}, {0xc0f92000}, {0xc0f94000}, {0xc0f96000}, - {0xc0f98000}, {0xc0f9a000}, {0xc0f9c000}, {0xc0f9e000}, - {0xc0fa0000}, {0xc0fa2000}, {0xc0fa4000}, {0xc0fa6000}, - {0xc0fa8000}, {0xc0faa000}, {0xc0fac000}, {0xc0fae000}, - {0xc0fb0000}, {0xc0fb2000}, {0xc0fb4000}, {0xc0fb6000}, - {0xc0fb8000}, {0xc0fba000}, {0xc0fbc000}, {0xc0fbe000}, - {0xc0fc0000}, {0xc0fc2000}, {0xc0fc4000}, {0xc0fc6000}, - {0xc0fc8000}, {0xc0fca000}, {0xc0fcc000}, {0xc0fce000}, - {0xc0fd0000}, {0xc0fd2000}, {0xc0fd4000}, {0xc0fd6000}, - {0xc0fd8000}, {0xc0fda000}, {0xc0fdc000}, {0xc0fde000}, - {0xc0fe0000}, {0xc0fe2000}, {0xc0fe4000}, {0xc0fe6000}, - {0xc0fe8000}, {0xc0fea000}, {0xc0fec000}, {0xc0fee000}, - {0xc0ff0000}, {0xc0ff2000}, {0xc0ff4000}, {0xc0ff6000}, - {0xc0ff8000}, {0xc0ffa000}, {0xc0ffc000}, {0xc0ffe000}, - {0xc1000000}, {0xc1002000}, {0xc1004000}, {0xc1006000}, - {0xc1008000}, {0xc100a000}, {0xc100c000}, {0xc100e000}, - {0xc1010000}, {0xc1012000}, {0xc1014000}, {0xc1016000}, - {0xc1018000}, {0xc101a000}, {0xc101c000}, {0xc101e000}, - {0xc1020000}, {0xc1022000}, {0xc1024000}, {0xc1026000}, - {0xc1028000}, {0xc102a000}, {0xc102c000}, {0xc102e000}, - {0xc1030000}, {0xc1032000}, {0xc1034000}, {0xc1036000}, - {0xc1038000}, {0xc103a000}, {0xc103c000}, {0xc103e000}, - {0xc1040000}, {0xc1042000}, {0xc1044000}, {0xc1046000}, - {0xc1048000}, {0xc104a000}, {0xc104c000}, {0xc104e000}, - {0xc1050000}, {0xc1052000}, {0xc1054000}, {0xc1056000}, - {0xc1058000}, {0xc105a000}, {0xc105c000}, {0xc105e000}, - {0xc1060000}, {0xc1062000}, {0xc1064000}, {0xc1066000}, - {0xc1068000}, {0xc106a000}, {0xc106c000}, {0xc106e000}, - {0xc1070000}, {0xc1072000}, {0xc1074000}, {0xc1076000}, - {0xc1078000}, {0xc107a000}, {0xc107c000}, {0xc107e000}, - {0xc1080000}, {0xc1082000}, {0xc1084000}, {0xc1086000}, - {0xc1088000}, {0xc108a000}, {0xc108c000}, {0xc108e000}, - {0xc1090000}, {0xc1092000}, {0xc1094000}, {0xc1096000}, - {0xc1098000}, {0xc109a000}, {0xc109c000}, {0xc109e000}, - {0xc10a0000}, {0xc10a2000}, {0xc10a4000}, {0xc10a6000}, - {0xc10a8000}, {0xc10aa000}, {0xc10ac000}, {0xc10ae000}, - {0xc10b0000}, {0xc10b2000}, {0xc10b4000}, {0xc10b6000}, - {0xc10b8000}, {0xc10ba000}, {0xc10bc000}, {0xc10be000}, - {0xc10c0000}, {0xc10c2000}, {0xc10c4000}, {0xc10c6000}, - {0xc10c8000}, {0xc10ca000}, {0xc10cc000}, {0xc10ce000}, - {0xc10d0000}, {0xc10d2000}, {0xc10d4000}, {0xc10d6000}, - {0xc10d8000}, {0xc10da000}, {0xc10dc000}, {0xc10de000}, - {0xc10e0000}, {0xc10e2000}, {0xc10e4000}, {0xc10e6000}, - {0xc10e8000}, {0xc10ea000}, {0xc10ec000}, {0xc10ee000}, - {0xc10f0000}, {0xc10f2000}, {0xc10f4000}, {0xc10f6000}, - {0xc10f8000}, {0xc10fa000}, {0xc10fc000}, {0xc10fe000}, - {0xc1100000}, {0xc1102000}, {0xc1104000}, {0xc1106000}, - {0xc1108000}, {0xc110a000}, {0xc110c000}, {0xc110e000}, - {0xc1110000}, {0xc1112000}, {0xc1114000}, {0xc1116000}, - {0xc1118000}, {0xc111a000}, {0xc111c000}, {0xc111e000}, - {0xc1120000}, {0xc1122000}, {0xc1124000}, {0xc1126000}, - {0xc1128000}, {0xc112a000}, {0xc112c000}, {0xc112e000}, - {0xc1130000}, {0xc1132000}, {0xc1134000}, {0xc1136000}, - {0xc1138000}, {0xc113a000}, {0xc113c000}, {0xc113e000}, - {0xc1140000}, {0xc1142000}, {0xc1144000}, {0xc1146000}, - {0xc1148000}, {0xc114a000}, {0xc114c000}, {0xc114e000}, - {0xc1150000}, {0xc1152000}, {0xc1154000}, {0xc1156000}, - {0xc1158000}, {0xc115a000}, {0xc115c000}, {0xc115e000}, - {0xc1160000}, {0xc1162000}, {0xc1164000}, {0xc1166000}, - {0xc1168000}, {0xc116a000}, {0xc116c000}, {0xc116e000}, - {0xc1170000}, {0xc1172000}, {0xc1174000}, {0xc1176000}, - {0xc1178000}, {0xc117a000}, {0xc117c000}, {0xc117e000}, - {0xc1180000}, {0xc1182000}, {0xc1184000}, {0xc1186000}, - {0xc1188000}, {0xc118a000}, {0xc118c000}, {0xc118e000}, - {0xc1190000}, {0xc1192000}, {0xc1194000}, {0xc1196000}, - {0xc1198000}, {0xc119a000}, {0xc119c000}, {0xc119e000}, - {0xc11a0000}, {0xc11a2000}, {0xc11a4000}, {0xc11a6000}, - {0xc11a8000}, {0xc11aa000}, {0xc11ac000}, {0xc11ae000}, - {0xc11b0000}, {0xc11b2000}, {0xc11b4000}, {0xc11b6000}, - {0xc11b8000}, {0xc11ba000}, {0xc11bc000}, {0xc11be000}, - {0xc11c0000}, {0xc11c2000}, {0xc11c4000}, {0xc11c6000}, - {0xc11c8000}, {0xc11ca000}, {0xc11cc000}, {0xc11ce000}, - {0xc11d0000}, {0xc11d2000}, {0xc11d4000}, {0xc11d6000}, - {0xc11d8000}, {0xc11da000}, {0xc11dc000}, {0xc11de000}, - {0xc11e0000}, {0xc11e2000}, {0xc11e4000}, {0xc11e6000}, - {0xc11e8000}, {0xc11ea000}, {0xc11ec000}, {0xc11ee000}, - {0xc11f0000}, {0xc11f2000}, {0xc11f4000}, {0xc11f6000}, - {0xc11f8000}, {0xc11fa000}, {0xc11fc000}, {0xc11fe000}, - {0xc1200000}, {0xc1202000}, {0xc1204000}, {0xc1206000}, - {0xc1208000}, {0xc120a000}, {0xc120c000}, {0xc120e000}, - {0xc1210000}, {0xc1212000}, {0xc1214000}, {0xc1216000}, - {0xc1218000}, {0xc121a000}, {0xc121c000}, {0xc121e000}, - {0xc1220000}, {0xc1222000}, {0xc1224000}, {0xc1226000}, - {0xc1228000}, {0xc122a000}, {0xc122c000}, {0xc122e000}, - {0xc1230000}, {0xc1232000}, {0xc1234000}, {0xc1236000}, - {0xc1238000}, {0xc123a000}, {0xc123c000}, {0xc123e000}, - {0xc1240000}, {0xc1242000}, {0xc1244000}, {0xc1246000}, - {0xc1248000}, {0xc124a000}, {0xc124c000}, {0xc124e000}, - {0xc1250000}, {0xc1252000}, {0xc1254000}, {0xc1256000}, - {0xc1258000}, {0xc125a000}, {0xc125c000}, {0xc125e000}, - {0xc1260000}, {0xc1262000}, {0xc1264000}, {0xc1266000}, - {0xc1268000}, {0xc126a000}, {0xc126c000}, {0xc126e000}, - {0xc1270000}, {0xc1272000}, {0xc1274000}, {0xc1276000}, - {0xc1278000}, {0xc127a000}, {0xc127c000}, {0xc127e000}, - {0xc1280000}, {0xc1282000}, {0xc1284000}, {0xc1286000}, - {0xc1288000}, {0xc128a000}, {0xc128c000}, {0xc128e000}, - {0xc1290000}, {0xc1292000}, {0xc1294000}, {0xc1296000}, - {0xc1298000}, {0xc129a000}, {0xc129c000}, {0xc129e000}, - {0xc12a0000}, {0xc12a2000}, {0xc12a4000}, {0xc12a6000}, - {0xc12a8000}, {0xc12aa000}, {0xc12ac000}, {0xc12ae000}, - {0xc12b0000}, {0xc12b2000}, {0xc12b4000}, {0xc12b6000}, - {0xc12b8000}, {0xc12ba000}, {0xc12bc000}, {0xc12be000}, - {0xc12c0000}, {0xc12c2000}, {0xc12c4000}, {0xc12c6000}, - {0xc12c8000}, {0xc12ca000}, {0xc12cc000}, {0xc12ce000}, - {0xc12d0000}, {0xc12d2000}, {0xc12d4000}, {0xc12d6000}, - {0xc12d8000}, {0xc12da000}, {0xc12dc000}, {0xc12de000}, - {0xc12e0000}, {0xc12e2000}, {0xc12e4000}, {0xc12e6000}, - {0xc12e8000}, {0xc12ea000}, {0xc12ec000}, {0xc12ee000}, - {0xc12f0000}, {0xc12f2000}, {0xc12f4000}, {0xc12f6000}, - {0xc12f8000}, {0xc12fa000}, {0xc12fc000}, {0xc12fe000}, - {0xc1300000}, {0xc1302000}, {0xc1304000}, {0xc1306000}, - {0xc1308000}, {0xc130a000}, {0xc130c000}, {0xc130e000}, - {0xc1310000}, {0xc1312000}, {0xc1314000}, {0xc1316000}, - {0xc1318000}, {0xc131a000}, {0xc131c000}, {0xc131e000}, - {0xc1320000}, {0xc1322000}, {0xc1324000}, {0xc1326000}, - {0xc1328000}, {0xc132a000}, {0xc132c000}, {0xc132e000}, - {0xc1330000}, {0xc1332000}, {0xc1334000}, {0xc1336000}, - {0xc1338000}, {0xc133a000}, {0xc133c000}, {0xc133e000}, - {0xc1340000}, {0xc1342000}, {0xc1344000}, {0xc1346000}, - {0xc1348000}, {0xc134a000}, {0xc134c000}, {0xc134e000}, - {0xc1350000}, {0xc1352000}, {0xc1354000}, {0xc1356000}, - {0xc1358000}, {0xc135a000}, {0xc135c000}, {0xc135e000}, - {0xc1360000}, {0xc1362000}, {0xc1364000}, {0xc1366000}, - {0xc1368000}, {0xc136a000}, {0xc136c000}, {0xc136e000}, - {0xc1370000}, {0xc1372000}, {0xc1374000}, {0xc1376000}, - {0xc1378000}, {0xc137a000}, {0xc137c000}, {0xc137e000}, - {0xc1380000}, {0xc1382000}, {0xc1384000}, {0xc1386000}, - {0xc1388000}, {0xc138a000}, {0xc138c000}, {0xc138e000}, - {0xc1390000}, {0xc1392000}, {0xc1394000}, {0xc1396000}, - {0xc1398000}, {0xc139a000}, {0xc139c000}, {0xc139e000}, - {0xc13a0000}, {0xc13a2000}, {0xc13a4000}, {0xc13a6000}, - {0xc13a8000}, {0xc13aa000}, {0xc13ac000}, {0xc13ae000}, - {0xc13b0000}, {0xc13b2000}, {0xc13b4000}, {0xc13b6000}, - {0xc13b8000}, {0xc13ba000}, {0xc13bc000}, {0xc13be000}, - {0xc13c0000}, {0xc13c2000}, {0xc13c4000}, {0xc13c6000}, - {0xc13c8000}, {0xc13ca000}, {0xc13cc000}, {0xc13ce000}, - {0xc13d0000}, {0xc13d2000}, {0xc13d4000}, {0xc13d6000}, - {0xc13d8000}, {0xc13da000}, {0xc13dc000}, {0xc13de000}, - {0xc13e0000}, {0xc13e2000}, {0xc13e4000}, {0xc13e6000}, - {0xc13e8000}, {0xc13ea000}, {0xc13ec000}, {0xc13ee000}, - {0xc13f0000}, {0xc13f2000}, {0xc13f4000}, {0xc13f6000}, - {0xc13f8000}, {0xc13fa000}, {0xc13fc000}, {0xc13fe000}, - {0xc1400000}, {0xc1402000}, {0xc1404000}, {0xc1406000}, - {0xc1408000}, {0xc140a000}, {0xc140c000}, {0xc140e000}, - {0xc1410000}, {0xc1412000}, {0xc1414000}, {0xc1416000}, - {0xc1418000}, {0xc141a000}, {0xc141c000}, {0xc141e000}, - {0xc1420000}, {0xc1422000}, {0xc1424000}, {0xc1426000}, - {0xc1428000}, {0xc142a000}, {0xc142c000}, {0xc142e000}, - {0xc1430000}, {0xc1432000}, {0xc1434000}, {0xc1436000}, - {0xc1438000}, {0xc143a000}, {0xc143c000}, {0xc143e000}, - {0xc1440000}, {0xc1442000}, {0xc1444000}, {0xc1446000}, - {0xc1448000}, {0xc144a000}, {0xc144c000}, {0xc144e000}, - {0xc1450000}, {0xc1452000}, {0xc1454000}, {0xc1456000}, - {0xc1458000}, {0xc145a000}, {0xc145c000}, {0xc145e000}, - {0xc1460000}, {0xc1462000}, {0xc1464000}, {0xc1466000}, - {0xc1468000}, {0xc146a000}, {0xc146c000}, {0xc146e000}, - {0xc1470000}, {0xc1472000}, {0xc1474000}, {0xc1476000}, - {0xc1478000}, {0xc147a000}, {0xc147c000}, {0xc147e000}, - {0xc1480000}, {0xc1482000}, {0xc1484000}, {0xc1486000}, - {0xc1488000}, {0xc148a000}, {0xc148c000}, {0xc148e000}, - {0xc1490000}, {0xc1492000}, {0xc1494000}, {0xc1496000}, - {0xc1498000}, {0xc149a000}, {0xc149c000}, {0xc149e000}, - {0xc14a0000}, {0xc14a2000}, {0xc14a4000}, {0xc14a6000}, - {0xc14a8000}, {0xc14aa000}, {0xc14ac000}, {0xc14ae000}, - {0xc14b0000}, {0xc14b2000}, {0xc14b4000}, {0xc14b6000}, - {0xc14b8000}, {0xc14ba000}, {0xc14bc000}, {0xc14be000}, - {0xc14c0000}, {0xc14c2000}, {0xc14c4000}, {0xc14c6000}, - {0xc14c8000}, {0xc14ca000}, {0xc14cc000}, {0xc14ce000}, - {0xc14d0000}, {0xc14d2000}, {0xc14d4000}, {0xc14d6000}, - {0xc14d8000}, {0xc14da000}, {0xc14dc000}, {0xc14de000}, - {0xc14e0000}, {0xc14e2000}, {0xc14e4000}, {0xc14e6000}, - {0xc14e8000}, {0xc14ea000}, {0xc14ec000}, {0xc14ee000}, - {0xc14f0000}, {0xc14f2000}, {0xc14f4000}, {0xc14f6000}, - {0xc14f8000}, {0xc14fa000}, {0xc14fc000}, {0xc14fe000}, - {0xc1500000}, {0xc1502000}, {0xc1504000}, {0xc1506000}, - {0xc1508000}, {0xc150a000}, {0xc150c000}, {0xc150e000}, - {0xc1510000}, {0xc1512000}, {0xc1514000}, {0xc1516000}, - {0xc1518000}, {0xc151a000}, {0xc151c000}, {0xc151e000}, - {0xc1520000}, {0xc1522000}, {0xc1524000}, {0xc1526000}, - {0xc1528000}, {0xc152a000}, {0xc152c000}, {0xc152e000}, - {0xc1530000}, {0xc1532000}, {0xc1534000}, {0xc1536000}, - {0xc1538000}, {0xc153a000}, {0xc153c000}, {0xc153e000}, - {0xc1540000}, {0xc1542000}, {0xc1544000}, {0xc1546000}, - {0xc1548000}, {0xc154a000}, {0xc154c000}, {0xc154e000}, - {0xc1550000}, {0xc1552000}, {0xc1554000}, {0xc1556000}, - {0xc1558000}, {0xc155a000}, {0xc155c000}, {0xc155e000}, - {0xc1560000}, {0xc1562000}, {0xc1564000}, {0xc1566000}, - {0xc1568000}, {0xc156a000}, {0xc156c000}, {0xc156e000}, - {0xc1570000}, {0xc1572000}, {0xc1574000}, {0xc1576000}, - {0xc1578000}, {0xc157a000}, {0xc157c000}, {0xc157e000}, - {0xc1580000}, {0xc1582000}, {0xc1584000}, {0xc1586000}, - {0xc1588000}, {0xc158a000}, {0xc158c000}, {0xc158e000}, - {0xc1590000}, {0xc1592000}, {0xc1594000}, {0xc1596000}, - {0xc1598000}, {0xc159a000}, {0xc159c000}, {0xc159e000}, - {0xc15a0000}, {0xc15a2000}, {0xc15a4000}, {0xc15a6000}, - {0xc15a8000}, {0xc15aa000}, {0xc15ac000}, {0xc15ae000}, - {0xc15b0000}, {0xc15b2000}, {0xc15b4000}, {0xc15b6000}, - {0xc15b8000}, {0xc15ba000}, {0xc15bc000}, {0xc15be000}, - {0xc15c0000}, {0xc15c2000}, {0xc15c4000}, {0xc15c6000}, - {0xc15c8000}, {0xc15ca000}, {0xc15cc000}, {0xc15ce000}, - {0xc15d0000}, {0xc15d2000}, {0xc15d4000}, {0xc15d6000}, - {0xc15d8000}, {0xc15da000}, {0xc15dc000}, {0xc15de000}, - {0xc15e0000}, {0xc15e2000}, {0xc15e4000}, {0xc15e6000}, - {0xc15e8000}, {0xc15ea000}, {0xc15ec000}, {0xc15ee000}, - {0xc15f0000}, {0xc15f2000}, {0xc15f4000}, {0xc15f6000}, - {0xc15f8000}, {0xc15fa000}, {0xc15fc000}, {0xc15fe000}, - {0xc1600000}, {0xc1602000}, {0xc1604000}, {0xc1606000}, - {0xc1608000}, {0xc160a000}, {0xc160c000}, {0xc160e000}, - {0xc1610000}, {0xc1612000}, {0xc1614000}, {0xc1616000}, - {0xc1618000}, {0xc161a000}, {0xc161c000}, {0xc161e000}, - {0xc1620000}, {0xc1622000}, {0xc1624000}, {0xc1626000}, - {0xc1628000}, {0xc162a000}, {0xc162c000}, {0xc162e000}, - {0xc1630000}, {0xc1632000}, {0xc1634000}, {0xc1636000}, - {0xc1638000}, {0xc163a000}, {0xc163c000}, {0xc163e000}, - {0xc1640000}, {0xc1642000}, {0xc1644000}, {0xc1646000}, - {0xc1648000}, {0xc164a000}, {0xc164c000}, {0xc164e000}, - {0xc1650000}, {0xc1652000}, {0xc1654000}, {0xc1656000}, - {0xc1658000}, {0xc165a000}, {0xc165c000}, {0xc165e000}, - {0xc1660000}, {0xc1662000}, {0xc1664000}, {0xc1666000}, - {0xc1668000}, {0xc166a000}, {0xc166c000}, {0xc166e000}, - {0xc1670000}, {0xc1672000}, {0xc1674000}, {0xc1676000}, - {0xc1678000}, {0xc167a000}, {0xc167c000}, {0xc167e000}, - {0xc1680000}, {0xc1682000}, {0xc1684000}, {0xc1686000}, - {0xc1688000}, {0xc168a000}, {0xc168c000}, {0xc168e000}, - {0xc1690000}, {0xc1692000}, {0xc1694000}, {0xc1696000}, - {0xc1698000}, {0xc169a000}, {0xc169c000}, {0xc169e000}, - {0xc16a0000}, {0xc16a2000}, {0xc16a4000}, {0xc16a6000}, - {0xc16a8000}, {0xc16aa000}, {0xc16ac000}, {0xc16ae000}, - {0xc16b0000}, {0xc16b2000}, {0xc16b4000}, {0xc16b6000}, - {0xc16b8000}, {0xc16ba000}, {0xc16bc000}, {0xc16be000}, - {0xc16c0000}, {0xc16c2000}, {0xc16c4000}, {0xc16c6000}, - {0xc16c8000}, {0xc16ca000}, {0xc16cc000}, {0xc16ce000}, - {0xc16d0000}, {0xc16d2000}, {0xc16d4000}, {0xc16d6000}, - {0xc16d8000}, {0xc16da000}, {0xc16dc000}, {0xc16de000}, - {0xc16e0000}, {0xc16e2000}, {0xc16e4000}, {0xc16e6000}, - {0xc16e8000}, {0xc16ea000}, {0xc16ec000}, {0xc16ee000}, - {0xc16f0000}, {0xc16f2000}, {0xc16f4000}, {0xc16f6000}, - {0xc16f8000}, {0xc16fa000}, {0xc16fc000}, {0xc16fe000}, - {0xc1700000}, {0xc1702000}, {0xc1704000}, {0xc1706000}, - {0xc1708000}, {0xc170a000}, {0xc170c000}, {0xc170e000}, - {0xc1710000}, {0xc1712000}, {0xc1714000}, {0xc1716000}, - {0xc1718000}, {0xc171a000}, {0xc171c000}, {0xc171e000}, - {0xc1720000}, {0xc1722000}, {0xc1724000}, {0xc1726000}, - {0xc1728000}, {0xc172a000}, {0xc172c000}, {0xc172e000}, - {0xc1730000}, {0xc1732000}, {0xc1734000}, {0xc1736000}, - {0xc1738000}, {0xc173a000}, {0xc173c000}, {0xc173e000}, - {0xc1740000}, {0xc1742000}, {0xc1744000}, {0xc1746000}, - {0xc1748000}, {0xc174a000}, {0xc174c000}, {0xc174e000}, - {0xc1750000}, {0xc1752000}, {0xc1754000}, {0xc1756000}, - {0xc1758000}, {0xc175a000}, {0xc175c000}, {0xc175e000}, - {0xc1760000}, {0xc1762000}, {0xc1764000}, {0xc1766000}, - {0xc1768000}, {0xc176a000}, {0xc176c000}, {0xc176e000}, - {0xc1770000}, {0xc1772000}, {0xc1774000}, {0xc1776000}, - {0xc1778000}, {0xc177a000}, {0xc177c000}, {0xc177e000}, - {0xc1780000}, {0xc1782000}, {0xc1784000}, {0xc1786000}, - {0xc1788000}, {0xc178a000}, {0xc178c000}, {0xc178e000}, - {0xc1790000}, {0xc1792000}, {0xc1794000}, {0xc1796000}, - {0xc1798000}, {0xc179a000}, {0xc179c000}, {0xc179e000}, - {0xc17a0000}, {0xc17a2000}, {0xc17a4000}, {0xc17a6000}, - {0xc17a8000}, {0xc17aa000}, {0xc17ac000}, {0xc17ae000}, - {0xc17b0000}, {0xc17b2000}, {0xc17b4000}, {0xc17b6000}, - {0xc17b8000}, {0xc17ba000}, {0xc17bc000}, {0xc17be000}, - {0xc17c0000}, {0xc17c2000}, {0xc17c4000}, {0xc17c6000}, - {0xc17c8000}, {0xc17ca000}, {0xc17cc000}, {0xc17ce000}, - {0xc17d0000}, {0xc17d2000}, {0xc17d4000}, {0xc17d6000}, - {0xc17d8000}, {0xc17da000}, {0xc17dc000}, {0xc17de000}, - {0xc17e0000}, {0xc17e2000}, {0xc17e4000}, {0xc17e6000}, - {0xc17e8000}, {0xc17ea000}, {0xc17ec000}, {0xc17ee000}, - {0xc17f0000}, {0xc17f2000}, {0xc17f4000}, {0xc17f6000}, - {0xc17f8000}, {0xc17fa000}, {0xc17fc000}, {0xc17fe000}, - {0xc1800000}, {0xc1802000}, {0xc1804000}, {0xc1806000}, - {0xc1808000}, {0xc180a000}, {0xc180c000}, {0xc180e000}, - {0xc1810000}, {0xc1812000}, {0xc1814000}, {0xc1816000}, - {0xc1818000}, {0xc181a000}, {0xc181c000}, {0xc181e000}, - {0xc1820000}, {0xc1822000}, {0xc1824000}, {0xc1826000}, - {0xc1828000}, {0xc182a000}, {0xc182c000}, {0xc182e000}, - {0xc1830000}, {0xc1832000}, {0xc1834000}, {0xc1836000}, - {0xc1838000}, {0xc183a000}, {0xc183c000}, {0xc183e000}, - {0xc1840000}, {0xc1842000}, {0xc1844000}, {0xc1846000}, - {0xc1848000}, {0xc184a000}, {0xc184c000}, {0xc184e000}, - {0xc1850000}, {0xc1852000}, {0xc1854000}, {0xc1856000}, - {0xc1858000}, {0xc185a000}, {0xc185c000}, {0xc185e000}, - {0xc1860000}, {0xc1862000}, {0xc1864000}, {0xc1866000}, - {0xc1868000}, {0xc186a000}, {0xc186c000}, {0xc186e000}, - {0xc1870000}, {0xc1872000}, {0xc1874000}, {0xc1876000}, - {0xc1878000}, {0xc187a000}, {0xc187c000}, {0xc187e000}, - {0xc1880000}, {0xc1882000}, {0xc1884000}, {0xc1886000}, - {0xc1888000}, {0xc188a000}, {0xc188c000}, {0xc188e000}, - {0xc1890000}, {0xc1892000}, {0xc1894000}, {0xc1896000}, - {0xc1898000}, {0xc189a000}, {0xc189c000}, {0xc189e000}, - {0xc18a0000}, {0xc18a2000}, {0xc18a4000}, {0xc18a6000}, - {0xc18a8000}, {0xc18aa000}, {0xc18ac000}, {0xc18ae000}, - {0xc18b0000}, {0xc18b2000}, {0xc18b4000}, {0xc18b6000}, - {0xc18b8000}, {0xc18ba000}, {0xc18bc000}, {0xc18be000}, - {0xc18c0000}, {0xc18c2000}, {0xc18c4000}, {0xc18c6000}, - {0xc18c8000}, {0xc18ca000}, {0xc18cc000}, {0xc18ce000}, - {0xc18d0000}, {0xc18d2000}, {0xc18d4000}, {0xc18d6000}, - {0xc18d8000}, {0xc18da000}, {0xc18dc000}, {0xc18de000}, - {0xc18e0000}, {0xc18e2000}, {0xc18e4000}, {0xc18e6000}, - {0xc18e8000}, {0xc18ea000}, {0xc18ec000}, {0xc18ee000}, - {0xc18f0000}, {0xc18f2000}, {0xc18f4000}, {0xc18f6000}, - {0xc18f8000}, {0xc18fa000}, {0xc18fc000}, {0xc18fe000}, - {0xc1900000}, {0xc1902000}, {0xc1904000}, {0xc1906000}, - {0xc1908000}, {0xc190a000}, {0xc190c000}, {0xc190e000}, - {0xc1910000}, {0xc1912000}, {0xc1914000}, {0xc1916000}, - {0xc1918000}, {0xc191a000}, {0xc191c000}, {0xc191e000}, - {0xc1920000}, {0xc1922000}, {0xc1924000}, {0xc1926000}, - {0xc1928000}, {0xc192a000}, {0xc192c000}, {0xc192e000}, - {0xc1930000}, {0xc1932000}, {0xc1934000}, {0xc1936000}, - {0xc1938000}, {0xc193a000}, {0xc193c000}, {0xc193e000}, - {0xc1940000}, {0xc1942000}, {0xc1944000}, {0xc1946000}, - {0xc1948000}, {0xc194a000}, {0xc194c000}, {0xc194e000}, - {0xc1950000}, {0xc1952000}, {0xc1954000}, {0xc1956000}, - {0xc1958000}, {0xc195a000}, {0xc195c000}, {0xc195e000}, - {0xc1960000}, {0xc1962000}, {0xc1964000}, {0xc1966000}, - {0xc1968000}, {0xc196a000}, {0xc196c000}, {0xc196e000}, - {0xc1970000}, {0xc1972000}, {0xc1974000}, {0xc1976000}, - {0xc1978000}, {0xc197a000}, {0xc197c000}, {0xc197e000}, - {0xc1980000}, {0xc1982000}, {0xc1984000}, {0xc1986000}, - {0xc1988000}, {0xc198a000}, {0xc198c000}, {0xc198e000}, - {0xc1990000}, {0xc1992000}, {0xc1994000}, {0xc1996000}, - {0xc1998000}, {0xc199a000}, {0xc199c000}, {0xc199e000}, - {0xc19a0000}, {0xc19a2000}, {0xc19a4000}, {0xc19a6000}, - {0xc19a8000}, {0xc19aa000}, {0xc19ac000}, {0xc19ae000}, - {0xc19b0000}, {0xc19b2000}, {0xc19b4000}, {0xc19b6000}, - {0xc19b8000}, {0xc19ba000}, {0xc19bc000}, {0xc19be000}, - {0xc19c0000}, {0xc19c2000}, {0xc19c4000}, {0xc19c6000}, - {0xc19c8000}, {0xc19ca000}, {0xc19cc000}, {0xc19ce000}, - {0xc19d0000}, {0xc19d2000}, {0xc19d4000}, {0xc19d6000}, - {0xc19d8000}, {0xc19da000}, {0xc19dc000}, {0xc19de000}, - {0xc19e0000}, {0xc19e2000}, {0xc19e4000}, {0xc19e6000}, - {0xc19e8000}, {0xc19ea000}, {0xc19ec000}, {0xc19ee000}, - {0xc19f0000}, {0xc19f2000}, {0xc19f4000}, {0xc19f6000}, - {0xc19f8000}, {0xc19fa000}, {0xc19fc000}, {0xc19fe000}, - {0xc1a00000}, {0xc1a02000}, {0xc1a04000}, {0xc1a06000}, - {0xc1a08000}, {0xc1a0a000}, {0xc1a0c000}, {0xc1a0e000}, - {0xc1a10000}, {0xc1a12000}, {0xc1a14000}, {0xc1a16000}, - {0xc1a18000}, {0xc1a1a000}, {0xc1a1c000}, {0xc1a1e000}, - {0xc1a20000}, {0xc1a22000}, {0xc1a24000}, {0xc1a26000}, - {0xc1a28000}, {0xc1a2a000}, {0xc1a2c000}, {0xc1a2e000}, - {0xc1a30000}, {0xc1a32000}, {0xc1a34000}, {0xc1a36000}, - {0xc1a38000}, {0xc1a3a000}, {0xc1a3c000}, {0xc1a3e000}, - {0xc1a40000}, {0xc1a42000}, {0xc1a44000}, {0xc1a46000}, - {0xc1a48000}, {0xc1a4a000}, {0xc1a4c000}, {0xc1a4e000}, - {0xc1a50000}, {0xc1a52000}, {0xc1a54000}, {0xc1a56000}, - {0xc1a58000}, {0xc1a5a000}, {0xc1a5c000}, {0xc1a5e000}, - {0xc1a60000}, {0xc1a62000}, {0xc1a64000}, {0xc1a66000}, - {0xc1a68000}, {0xc1a6a000}, {0xc1a6c000}, {0xc1a6e000}, - {0xc1a70000}, {0xc1a72000}, {0xc1a74000}, {0xc1a76000}, - {0xc1a78000}, {0xc1a7a000}, {0xc1a7c000}, {0xc1a7e000}, - {0xc1a80000}, {0xc1a82000}, {0xc1a84000}, {0xc1a86000}, - {0xc1a88000}, {0xc1a8a000}, {0xc1a8c000}, {0xc1a8e000}, - {0xc1a90000}, {0xc1a92000}, {0xc1a94000}, {0xc1a96000}, - {0xc1a98000}, {0xc1a9a000}, {0xc1a9c000}, {0xc1a9e000}, - {0xc1aa0000}, {0xc1aa2000}, {0xc1aa4000}, {0xc1aa6000}, - {0xc1aa8000}, {0xc1aaa000}, {0xc1aac000}, {0xc1aae000}, - {0xc1ab0000}, {0xc1ab2000}, {0xc1ab4000}, {0xc1ab6000}, - {0xc1ab8000}, {0xc1aba000}, {0xc1abc000}, {0xc1abe000}, - {0xc1ac0000}, {0xc1ac2000}, {0xc1ac4000}, {0xc1ac6000}, - {0xc1ac8000}, {0xc1aca000}, {0xc1acc000}, {0xc1ace000}, - {0xc1ad0000}, {0xc1ad2000}, {0xc1ad4000}, {0xc1ad6000}, - {0xc1ad8000}, {0xc1ada000}, {0xc1adc000}, {0xc1ade000}, - {0xc1ae0000}, {0xc1ae2000}, {0xc1ae4000}, {0xc1ae6000}, - {0xc1ae8000}, {0xc1aea000}, {0xc1aec000}, {0xc1aee000}, - {0xc1af0000}, {0xc1af2000}, {0xc1af4000}, {0xc1af6000}, - {0xc1af8000}, {0xc1afa000}, {0xc1afc000}, {0xc1afe000}, - {0xc1b00000}, {0xc1b02000}, {0xc1b04000}, {0xc1b06000}, - {0xc1b08000}, {0xc1b0a000}, {0xc1b0c000}, {0xc1b0e000}, - {0xc1b10000}, {0xc1b12000}, {0xc1b14000}, {0xc1b16000}, - {0xc1b18000}, {0xc1b1a000}, {0xc1b1c000}, {0xc1b1e000}, - {0xc1b20000}, {0xc1b22000}, {0xc1b24000}, {0xc1b26000}, - {0xc1b28000}, {0xc1b2a000}, {0xc1b2c000}, {0xc1b2e000}, - {0xc1b30000}, {0xc1b32000}, {0xc1b34000}, {0xc1b36000}, - {0xc1b38000}, {0xc1b3a000}, {0xc1b3c000}, {0xc1b3e000}, - {0xc1b40000}, {0xc1b42000}, {0xc1b44000}, {0xc1b46000}, - {0xc1b48000}, {0xc1b4a000}, {0xc1b4c000}, {0xc1b4e000}, - {0xc1b50000}, {0xc1b52000}, {0xc1b54000}, {0xc1b56000}, - {0xc1b58000}, {0xc1b5a000}, {0xc1b5c000}, {0xc1b5e000}, - {0xc1b60000}, {0xc1b62000}, {0xc1b64000}, {0xc1b66000}, - {0xc1b68000}, {0xc1b6a000}, {0xc1b6c000}, {0xc1b6e000}, - {0xc1b70000}, {0xc1b72000}, {0xc1b74000}, {0xc1b76000}, - {0xc1b78000}, {0xc1b7a000}, {0xc1b7c000}, {0xc1b7e000}, - {0xc1b80000}, {0xc1b82000}, {0xc1b84000}, {0xc1b86000}, - {0xc1b88000}, {0xc1b8a000}, {0xc1b8c000}, {0xc1b8e000}, - {0xc1b90000}, {0xc1b92000}, {0xc1b94000}, {0xc1b96000}, - {0xc1b98000}, {0xc1b9a000}, {0xc1b9c000}, {0xc1b9e000}, - {0xc1ba0000}, {0xc1ba2000}, {0xc1ba4000}, {0xc1ba6000}, - {0xc1ba8000}, {0xc1baa000}, {0xc1bac000}, {0xc1bae000}, - {0xc1bb0000}, {0xc1bb2000}, {0xc1bb4000}, {0xc1bb6000}, - {0xc1bb8000}, {0xc1bba000}, {0xc1bbc000}, {0xc1bbe000}, - {0xc1bc0000}, {0xc1bc2000}, {0xc1bc4000}, {0xc1bc6000}, - {0xc1bc8000}, {0xc1bca000}, {0xc1bcc000}, {0xc1bce000}, - {0xc1bd0000}, {0xc1bd2000}, {0xc1bd4000}, {0xc1bd6000}, - {0xc1bd8000}, {0xc1bda000}, {0xc1bdc000}, {0xc1bde000}, - {0xc1be0000}, {0xc1be2000}, {0xc1be4000}, {0xc1be6000}, - {0xc1be8000}, {0xc1bea000}, {0xc1bec000}, {0xc1bee000}, - {0xc1bf0000}, {0xc1bf2000}, {0xc1bf4000}, {0xc1bf6000}, - {0xc1bf8000}, {0xc1bfa000}, {0xc1bfc000}, {0xc1bfe000}, - {0xc1c00000}, {0xc1c02000}, {0xc1c04000}, {0xc1c06000}, - {0xc1c08000}, {0xc1c0a000}, {0xc1c0c000}, {0xc1c0e000}, - {0xc1c10000}, {0xc1c12000}, {0xc1c14000}, {0xc1c16000}, - {0xc1c18000}, {0xc1c1a000}, {0xc1c1c000}, {0xc1c1e000}, - {0xc1c20000}, {0xc1c22000}, {0xc1c24000}, {0xc1c26000}, - {0xc1c28000}, {0xc1c2a000}, {0xc1c2c000}, {0xc1c2e000}, - {0xc1c30000}, {0xc1c32000}, {0xc1c34000}, {0xc1c36000}, - {0xc1c38000}, {0xc1c3a000}, {0xc1c3c000}, {0xc1c3e000}, - {0xc1c40000}, {0xc1c42000}, {0xc1c44000}, {0xc1c46000}, - {0xc1c48000}, {0xc1c4a000}, {0xc1c4c000}, {0xc1c4e000}, - {0xc1c50000}, {0xc1c52000}, {0xc1c54000}, {0xc1c56000}, - {0xc1c58000}, {0xc1c5a000}, {0xc1c5c000}, {0xc1c5e000}, - {0xc1c60000}, {0xc1c62000}, {0xc1c64000}, {0xc1c66000}, - {0xc1c68000}, {0xc1c6a000}, {0xc1c6c000}, {0xc1c6e000}, - {0xc1c70000}, {0xc1c72000}, {0xc1c74000}, {0xc1c76000}, - {0xc1c78000}, {0xc1c7a000}, {0xc1c7c000}, {0xc1c7e000}, - {0xc1c80000}, {0xc1c82000}, {0xc1c84000}, {0xc1c86000}, - {0xc1c88000}, {0xc1c8a000}, {0xc1c8c000}, {0xc1c8e000}, - {0xc1c90000}, {0xc1c92000}, {0xc1c94000}, {0xc1c96000}, - {0xc1c98000}, {0xc1c9a000}, {0xc1c9c000}, {0xc1c9e000}, - {0xc1ca0000}, {0xc1ca2000}, {0xc1ca4000}, {0xc1ca6000}, - {0xc1ca8000}, {0xc1caa000}, {0xc1cac000}, {0xc1cae000}, - {0xc1cb0000}, {0xc1cb2000}, {0xc1cb4000}, {0xc1cb6000}, - {0xc1cb8000}, {0xc1cba000}, {0xc1cbc000}, {0xc1cbe000}, - {0xc1cc0000}, {0xc1cc2000}, {0xc1cc4000}, {0xc1cc6000}, - {0xc1cc8000}, {0xc1cca000}, {0xc1ccc000}, {0xc1cce000}, - {0xc1cd0000}, {0xc1cd2000}, {0xc1cd4000}, {0xc1cd6000}, - {0xc1cd8000}, {0xc1cda000}, {0xc1cdc000}, {0xc1cde000}, - {0xc1ce0000}, {0xc1ce2000}, {0xc1ce4000}, {0xc1ce6000}, - {0xc1ce8000}, {0xc1cea000}, {0xc1cec000}, {0xc1cee000}, - {0xc1cf0000}, {0xc1cf2000}, {0xc1cf4000}, {0xc1cf6000}, - {0xc1cf8000}, {0xc1cfa000}, {0xc1cfc000}, {0xc1cfe000}, - {0xc1d00000}, {0xc1d02000}, {0xc1d04000}, {0xc1d06000}, - {0xc1d08000}, {0xc1d0a000}, {0xc1d0c000}, {0xc1d0e000}, - {0xc1d10000}, {0xc1d12000}, {0xc1d14000}, {0xc1d16000}, - {0xc1d18000}, {0xc1d1a000}, {0xc1d1c000}, {0xc1d1e000}, - {0xc1d20000}, {0xc1d22000}, {0xc1d24000}, {0xc1d26000}, - {0xc1d28000}, {0xc1d2a000}, {0xc1d2c000}, {0xc1d2e000}, - {0xc1d30000}, {0xc1d32000}, {0xc1d34000}, {0xc1d36000}, - {0xc1d38000}, {0xc1d3a000}, {0xc1d3c000}, {0xc1d3e000}, - {0xc1d40000}, {0xc1d42000}, {0xc1d44000}, {0xc1d46000}, - {0xc1d48000}, {0xc1d4a000}, {0xc1d4c000}, {0xc1d4e000}, - {0xc1d50000}, {0xc1d52000}, {0xc1d54000}, {0xc1d56000}, - {0xc1d58000}, {0xc1d5a000}, {0xc1d5c000}, {0xc1d5e000}, - {0xc1d60000}, {0xc1d62000}, {0xc1d64000}, {0xc1d66000}, - {0xc1d68000}, {0xc1d6a000}, {0xc1d6c000}, {0xc1d6e000}, - {0xc1d70000}, {0xc1d72000}, {0xc1d74000}, {0xc1d76000}, - {0xc1d78000}, {0xc1d7a000}, {0xc1d7c000}, {0xc1d7e000}, - {0xc1d80000}, {0xc1d82000}, {0xc1d84000}, {0xc1d86000}, - {0xc1d88000}, {0xc1d8a000}, {0xc1d8c000}, {0xc1d8e000}, - {0xc1d90000}, {0xc1d92000}, {0xc1d94000}, {0xc1d96000}, - {0xc1d98000}, {0xc1d9a000}, {0xc1d9c000}, {0xc1d9e000}, - {0xc1da0000}, {0xc1da2000}, {0xc1da4000}, {0xc1da6000}, - {0xc1da8000}, {0xc1daa000}, {0xc1dac000}, {0xc1dae000}, - {0xc1db0000}, {0xc1db2000}, {0xc1db4000}, {0xc1db6000}, - {0xc1db8000}, {0xc1dba000}, {0xc1dbc000}, {0xc1dbe000}, - {0xc1dc0000}, {0xc1dc2000}, {0xc1dc4000}, {0xc1dc6000}, - {0xc1dc8000}, {0xc1dca000}, {0xc1dcc000}, {0xc1dce000}, - {0xc1dd0000}, {0xc1dd2000}, {0xc1dd4000}, {0xc1dd6000}, - {0xc1dd8000}, {0xc1dda000}, {0xc1ddc000}, {0xc1dde000}, - {0xc1de0000}, {0xc1de2000}, {0xc1de4000}, {0xc1de6000}, - {0xc1de8000}, {0xc1dea000}, {0xc1dec000}, {0xc1dee000}, - {0xc1df0000}, {0xc1df2000}, {0xc1df4000}, {0xc1df6000}, - {0xc1df8000}, {0xc1dfa000}, {0xc1dfc000}, {0xc1dfe000}, - {0xc1e00000}, {0xc1e02000}, {0xc1e04000}, {0xc1e06000}, - {0xc1e08000}, {0xc1e0a000}, {0xc1e0c000}, {0xc1e0e000}, - {0xc1e10000}, {0xc1e12000}, {0xc1e14000}, {0xc1e16000}, - {0xc1e18000}, {0xc1e1a000}, {0xc1e1c000}, {0xc1e1e000}, - {0xc1e20000}, {0xc1e22000}, {0xc1e24000}, {0xc1e26000}, - {0xc1e28000}, {0xc1e2a000}, {0xc1e2c000}, {0xc1e2e000}, - {0xc1e30000}, {0xc1e32000}, {0xc1e34000}, {0xc1e36000}, - {0xc1e38000}, {0xc1e3a000}, {0xc1e3c000}, {0xc1e3e000}, - {0xc1e40000}, {0xc1e42000}, {0xc1e44000}, {0xc1e46000}, - {0xc1e48000}, {0xc1e4a000}, {0xc1e4c000}, {0xc1e4e000}, - {0xc1e50000}, {0xc1e52000}, {0xc1e54000}, {0xc1e56000}, - {0xc1e58000}, {0xc1e5a000}, {0xc1e5c000}, {0xc1e5e000}, - {0xc1e60000}, {0xc1e62000}, {0xc1e64000}, {0xc1e66000}, - {0xc1e68000}, {0xc1e6a000}, {0xc1e6c000}, {0xc1e6e000}, - {0xc1e70000}, {0xc1e72000}, {0xc1e74000}, {0xc1e76000}, - {0xc1e78000}, {0xc1e7a000}, {0xc1e7c000}, {0xc1e7e000}, - {0xc1e80000}, {0xc1e82000}, {0xc1e84000}, {0xc1e86000}, - {0xc1e88000}, {0xc1e8a000}, {0xc1e8c000}, {0xc1e8e000}, - {0xc1e90000}, {0xc1e92000}, {0xc1e94000}, {0xc1e96000}, - {0xc1e98000}, {0xc1e9a000}, {0xc1e9c000}, {0xc1e9e000}, - {0xc1ea0000}, {0xc1ea2000}, {0xc1ea4000}, {0xc1ea6000}, - {0xc1ea8000}, {0xc1eaa000}, {0xc1eac000}, {0xc1eae000}, - {0xc1eb0000}, {0xc1eb2000}, {0xc1eb4000}, {0xc1eb6000}, - {0xc1eb8000}, {0xc1eba000}, {0xc1ebc000}, {0xc1ebe000}, - {0xc1ec0000}, {0xc1ec2000}, {0xc1ec4000}, {0xc1ec6000}, - {0xc1ec8000}, {0xc1eca000}, {0xc1ecc000}, {0xc1ece000}, - {0xc1ed0000}, {0xc1ed2000}, {0xc1ed4000}, {0xc1ed6000}, - {0xc1ed8000}, {0xc1eda000}, {0xc1edc000}, {0xc1ede000}, - {0xc1ee0000}, {0xc1ee2000}, {0xc1ee4000}, {0xc1ee6000}, - {0xc1ee8000}, {0xc1eea000}, {0xc1eec000}, {0xc1eee000}, - {0xc1ef0000}, {0xc1ef2000}, {0xc1ef4000}, {0xc1ef6000}, - {0xc1ef8000}, {0xc1efa000}, {0xc1efc000}, {0xc1efe000}, - {0xc1f00000}, {0xc1f02000}, {0xc1f04000}, {0xc1f06000}, - {0xc1f08000}, {0xc1f0a000}, {0xc1f0c000}, {0xc1f0e000}, - {0xc1f10000}, {0xc1f12000}, {0xc1f14000}, {0xc1f16000}, - {0xc1f18000}, {0xc1f1a000}, {0xc1f1c000}, {0xc1f1e000}, - {0xc1f20000}, {0xc1f22000}, {0xc1f24000}, {0xc1f26000}, - {0xc1f28000}, {0xc1f2a000}, {0xc1f2c000}, {0xc1f2e000}, - {0xc1f30000}, {0xc1f32000}, {0xc1f34000}, {0xc1f36000}, - {0xc1f38000}, {0xc1f3a000}, {0xc1f3c000}, {0xc1f3e000}, - {0xc1f40000}, {0xc1f42000}, {0xc1f44000}, {0xc1f46000}, - {0xc1f48000}, {0xc1f4a000}, {0xc1f4c000}, {0xc1f4e000}, - {0xc1f50000}, {0xc1f52000}, {0xc1f54000}, {0xc1f56000}, - {0xc1f58000}, {0xc1f5a000}, {0xc1f5c000}, {0xc1f5e000}, - {0xc1f60000}, {0xc1f62000}, {0xc1f64000}, {0xc1f66000}, - {0xc1f68000}, {0xc1f6a000}, {0xc1f6c000}, {0xc1f6e000}, - {0xc1f70000}, {0xc1f72000}, {0xc1f74000}, {0xc1f76000}, - {0xc1f78000}, {0xc1f7a000}, {0xc1f7c000}, {0xc1f7e000}, - {0xc1f80000}, {0xc1f82000}, {0xc1f84000}, {0xc1f86000}, - {0xc1f88000}, {0xc1f8a000}, {0xc1f8c000}, {0xc1f8e000}, - {0xc1f90000}, {0xc1f92000}, {0xc1f94000}, {0xc1f96000}, - {0xc1f98000}, {0xc1f9a000}, {0xc1f9c000}, {0xc1f9e000}, - {0xc1fa0000}, {0xc1fa2000}, {0xc1fa4000}, {0xc1fa6000}, - {0xc1fa8000}, {0xc1faa000}, {0xc1fac000}, {0xc1fae000}, - {0xc1fb0000}, {0xc1fb2000}, {0xc1fb4000}, {0xc1fb6000}, - {0xc1fb8000}, {0xc1fba000}, {0xc1fbc000}, {0xc1fbe000}, - {0xc1fc0000}, {0xc1fc2000}, {0xc1fc4000}, {0xc1fc6000}, - {0xc1fc8000}, {0xc1fca000}, {0xc1fcc000}, {0xc1fce000}, - {0xc1fd0000}, {0xc1fd2000}, {0xc1fd4000}, {0xc1fd6000}, - {0xc1fd8000}, {0xc1fda000}, {0xc1fdc000}, {0xc1fde000}, - {0xc1fe0000}, {0xc1fe2000}, {0xc1fe4000}, {0xc1fe6000}, - {0xc1fe8000}, {0xc1fea000}, {0xc1fec000}, {0xc1fee000}, - {0xc1ff0000}, {0xc1ff2000}, {0xc1ff4000}, {0xc1ff6000}, - {0xc1ff8000}, {0xc1ffa000}, {0xc1ffc000}, {0xc1ffe000}, - {0xc2000000}, {0xc2002000}, {0xc2004000}, {0xc2006000}, - {0xc2008000}, {0xc200a000}, {0xc200c000}, {0xc200e000}, - {0xc2010000}, {0xc2012000}, {0xc2014000}, {0xc2016000}, - {0xc2018000}, {0xc201a000}, {0xc201c000}, {0xc201e000}, - {0xc2020000}, {0xc2022000}, {0xc2024000}, {0xc2026000}, - {0xc2028000}, {0xc202a000}, {0xc202c000}, {0xc202e000}, - {0xc2030000}, {0xc2032000}, {0xc2034000}, {0xc2036000}, - {0xc2038000}, {0xc203a000}, {0xc203c000}, {0xc203e000}, - {0xc2040000}, {0xc2042000}, {0xc2044000}, {0xc2046000}, - {0xc2048000}, {0xc204a000}, {0xc204c000}, {0xc204e000}, - {0xc2050000}, {0xc2052000}, {0xc2054000}, {0xc2056000}, - {0xc2058000}, {0xc205a000}, {0xc205c000}, {0xc205e000}, - {0xc2060000}, {0xc2062000}, {0xc2064000}, {0xc2066000}, - {0xc2068000}, {0xc206a000}, {0xc206c000}, {0xc206e000}, - {0xc2070000}, {0xc2072000}, {0xc2074000}, {0xc2076000}, - {0xc2078000}, {0xc207a000}, {0xc207c000}, {0xc207e000}, - {0xc2080000}, {0xc2082000}, {0xc2084000}, {0xc2086000}, - {0xc2088000}, {0xc208a000}, {0xc208c000}, {0xc208e000}, - {0xc2090000}, {0xc2092000}, {0xc2094000}, {0xc2096000}, - {0xc2098000}, {0xc209a000}, {0xc209c000}, {0xc209e000}, - {0xc20a0000}, {0xc20a2000}, {0xc20a4000}, {0xc20a6000}, - {0xc20a8000}, {0xc20aa000}, {0xc20ac000}, {0xc20ae000}, - {0xc20b0000}, {0xc20b2000}, {0xc20b4000}, {0xc20b6000}, - {0xc20b8000}, {0xc20ba000}, {0xc20bc000}, {0xc20be000}, - {0xc20c0000}, {0xc20c2000}, {0xc20c4000}, {0xc20c6000}, - {0xc20c8000}, {0xc20ca000}, {0xc20cc000}, {0xc20ce000}, - {0xc20d0000}, {0xc20d2000}, {0xc20d4000}, {0xc20d6000}, - {0xc20d8000}, {0xc20da000}, {0xc20dc000}, {0xc20de000}, - {0xc20e0000}, {0xc20e2000}, {0xc20e4000}, {0xc20e6000}, - {0xc20e8000}, {0xc20ea000}, {0xc20ec000}, {0xc20ee000}, - {0xc20f0000}, {0xc20f2000}, {0xc20f4000}, {0xc20f6000}, - {0xc20f8000}, {0xc20fa000}, {0xc20fc000}, {0xc20fe000}, - {0xc2100000}, {0xc2102000}, {0xc2104000}, {0xc2106000}, - {0xc2108000}, {0xc210a000}, {0xc210c000}, {0xc210e000}, - {0xc2110000}, {0xc2112000}, {0xc2114000}, {0xc2116000}, - {0xc2118000}, {0xc211a000}, {0xc211c000}, {0xc211e000}, - {0xc2120000}, {0xc2122000}, {0xc2124000}, {0xc2126000}, - {0xc2128000}, {0xc212a000}, {0xc212c000}, {0xc212e000}, - {0xc2130000}, {0xc2132000}, {0xc2134000}, {0xc2136000}, - {0xc2138000}, {0xc213a000}, {0xc213c000}, {0xc213e000}, - {0xc2140000}, {0xc2142000}, {0xc2144000}, {0xc2146000}, - {0xc2148000}, {0xc214a000}, {0xc214c000}, {0xc214e000}, - {0xc2150000}, {0xc2152000}, {0xc2154000}, {0xc2156000}, - {0xc2158000}, {0xc215a000}, {0xc215c000}, {0xc215e000}, - {0xc2160000}, {0xc2162000}, {0xc2164000}, {0xc2166000}, - {0xc2168000}, {0xc216a000}, {0xc216c000}, {0xc216e000}, - {0xc2170000}, {0xc2172000}, {0xc2174000}, {0xc2176000}, - {0xc2178000}, {0xc217a000}, {0xc217c000}, {0xc217e000}, - {0xc2180000}, {0xc2182000}, {0xc2184000}, {0xc2186000}, - {0xc2188000}, {0xc218a000}, {0xc218c000}, {0xc218e000}, - {0xc2190000}, {0xc2192000}, {0xc2194000}, {0xc2196000}, - {0xc2198000}, {0xc219a000}, {0xc219c000}, {0xc219e000}, - {0xc21a0000}, {0xc21a2000}, {0xc21a4000}, {0xc21a6000}, - {0xc21a8000}, {0xc21aa000}, {0xc21ac000}, {0xc21ae000}, - {0xc21b0000}, {0xc21b2000}, {0xc21b4000}, {0xc21b6000}, - {0xc21b8000}, {0xc21ba000}, {0xc21bc000}, {0xc21be000}, - {0xc21c0000}, {0xc21c2000}, {0xc21c4000}, {0xc21c6000}, - {0xc21c8000}, {0xc21ca000}, {0xc21cc000}, {0xc21ce000}, - {0xc21d0000}, {0xc21d2000}, {0xc21d4000}, {0xc21d6000}, - {0xc21d8000}, {0xc21da000}, {0xc21dc000}, {0xc21de000}, - {0xc21e0000}, {0xc21e2000}, {0xc21e4000}, {0xc21e6000}, - {0xc21e8000}, {0xc21ea000}, {0xc21ec000}, {0xc21ee000}, - {0xc21f0000}, {0xc21f2000}, {0xc21f4000}, {0xc21f6000}, - {0xc21f8000}, {0xc21fa000}, {0xc21fc000}, {0xc21fe000}, - {0xc2200000}, {0xc2202000}, {0xc2204000}, {0xc2206000}, - {0xc2208000}, {0xc220a000}, {0xc220c000}, {0xc220e000}, - {0xc2210000}, {0xc2212000}, {0xc2214000}, {0xc2216000}, - {0xc2218000}, {0xc221a000}, {0xc221c000}, {0xc221e000}, - {0xc2220000}, {0xc2222000}, {0xc2224000}, {0xc2226000}, - {0xc2228000}, {0xc222a000}, {0xc222c000}, {0xc222e000}, - {0xc2230000}, {0xc2232000}, {0xc2234000}, {0xc2236000}, - {0xc2238000}, {0xc223a000}, {0xc223c000}, {0xc223e000}, - {0xc2240000}, {0xc2242000}, {0xc2244000}, {0xc2246000}, - {0xc2248000}, {0xc224a000}, {0xc224c000}, {0xc224e000}, - {0xc2250000}, {0xc2252000}, {0xc2254000}, {0xc2256000}, - {0xc2258000}, {0xc225a000}, {0xc225c000}, {0xc225e000}, - {0xc2260000}, {0xc2262000}, {0xc2264000}, {0xc2266000}, - {0xc2268000}, {0xc226a000}, {0xc226c000}, {0xc226e000}, - {0xc2270000}, {0xc2272000}, {0xc2274000}, {0xc2276000}, - {0xc2278000}, {0xc227a000}, {0xc227c000}, {0xc227e000}, - {0xc2280000}, {0xc2282000}, {0xc2284000}, {0xc2286000}, - {0xc2288000}, {0xc228a000}, {0xc228c000}, {0xc228e000}, - {0xc2290000}, {0xc2292000}, {0xc2294000}, {0xc2296000}, - {0xc2298000}, {0xc229a000}, {0xc229c000}, {0xc229e000}, - {0xc22a0000}, {0xc22a2000}, {0xc22a4000}, {0xc22a6000}, - {0xc22a8000}, {0xc22aa000}, {0xc22ac000}, {0xc22ae000}, - {0xc22b0000}, {0xc22b2000}, {0xc22b4000}, {0xc22b6000}, - {0xc22b8000}, {0xc22ba000}, {0xc22bc000}, {0xc22be000}, - {0xc22c0000}, {0xc22c2000}, {0xc22c4000}, {0xc22c6000}, - {0xc22c8000}, {0xc22ca000}, {0xc22cc000}, {0xc22ce000}, - {0xc22d0000}, {0xc22d2000}, {0xc22d4000}, {0xc22d6000}, - {0xc22d8000}, {0xc22da000}, {0xc22dc000}, {0xc22de000}, - {0xc22e0000}, {0xc22e2000}, {0xc22e4000}, {0xc22e6000}, - {0xc22e8000}, {0xc22ea000}, {0xc22ec000}, {0xc22ee000}, - {0xc22f0000}, {0xc22f2000}, {0xc22f4000}, {0xc22f6000}, - {0xc22f8000}, {0xc22fa000}, {0xc22fc000}, {0xc22fe000}, - {0xc2300000}, {0xc2302000}, {0xc2304000}, {0xc2306000}, - {0xc2308000}, {0xc230a000}, {0xc230c000}, {0xc230e000}, - {0xc2310000}, {0xc2312000}, {0xc2314000}, {0xc2316000}, - {0xc2318000}, {0xc231a000}, {0xc231c000}, {0xc231e000}, - {0xc2320000}, {0xc2322000}, {0xc2324000}, {0xc2326000}, - {0xc2328000}, {0xc232a000}, {0xc232c000}, {0xc232e000}, - {0xc2330000}, {0xc2332000}, {0xc2334000}, {0xc2336000}, - {0xc2338000}, {0xc233a000}, {0xc233c000}, {0xc233e000}, - {0xc2340000}, {0xc2342000}, {0xc2344000}, {0xc2346000}, - {0xc2348000}, {0xc234a000}, {0xc234c000}, {0xc234e000}, - {0xc2350000}, {0xc2352000}, {0xc2354000}, {0xc2356000}, - {0xc2358000}, {0xc235a000}, {0xc235c000}, {0xc235e000}, - {0xc2360000}, {0xc2362000}, {0xc2364000}, {0xc2366000}, - {0xc2368000}, {0xc236a000}, {0xc236c000}, {0xc236e000}, - {0xc2370000}, {0xc2372000}, {0xc2374000}, {0xc2376000}, - {0xc2378000}, {0xc237a000}, {0xc237c000}, {0xc237e000}, - {0xc2380000}, {0xc2382000}, {0xc2384000}, {0xc2386000}, - {0xc2388000}, {0xc238a000}, {0xc238c000}, {0xc238e000}, - {0xc2390000}, {0xc2392000}, {0xc2394000}, {0xc2396000}, - {0xc2398000}, {0xc239a000}, {0xc239c000}, {0xc239e000}, - {0xc23a0000}, {0xc23a2000}, {0xc23a4000}, {0xc23a6000}, - {0xc23a8000}, {0xc23aa000}, {0xc23ac000}, {0xc23ae000}, - {0xc23b0000}, {0xc23b2000}, {0xc23b4000}, {0xc23b6000}, - {0xc23b8000}, {0xc23ba000}, {0xc23bc000}, {0xc23be000}, - {0xc23c0000}, {0xc23c2000}, {0xc23c4000}, {0xc23c6000}, - {0xc23c8000}, {0xc23ca000}, {0xc23cc000}, {0xc23ce000}, - {0xc23d0000}, {0xc23d2000}, {0xc23d4000}, {0xc23d6000}, - {0xc23d8000}, {0xc23da000}, {0xc23dc000}, {0xc23de000}, - {0xc23e0000}, {0xc23e2000}, {0xc23e4000}, {0xc23e6000}, - {0xc23e8000}, {0xc23ea000}, {0xc23ec000}, {0xc23ee000}, - {0xc23f0000}, {0xc23f2000}, {0xc23f4000}, {0xc23f6000}, - {0xc23f8000}, {0xc23fa000}, {0xc23fc000}, {0xc23fe000}, - {0xc2400000}, {0xc2402000}, {0xc2404000}, {0xc2406000}, - {0xc2408000}, {0xc240a000}, {0xc240c000}, {0xc240e000}, - {0xc2410000}, {0xc2412000}, {0xc2414000}, {0xc2416000}, - {0xc2418000}, {0xc241a000}, {0xc241c000}, {0xc241e000}, - {0xc2420000}, {0xc2422000}, {0xc2424000}, {0xc2426000}, - {0xc2428000}, {0xc242a000}, {0xc242c000}, {0xc242e000}, - {0xc2430000}, {0xc2432000}, {0xc2434000}, {0xc2436000}, - {0xc2438000}, {0xc243a000}, {0xc243c000}, {0xc243e000}, - {0xc2440000}, {0xc2442000}, {0xc2444000}, {0xc2446000}, - {0xc2448000}, {0xc244a000}, {0xc244c000}, {0xc244e000}, - {0xc2450000}, {0xc2452000}, {0xc2454000}, {0xc2456000}, - {0xc2458000}, {0xc245a000}, {0xc245c000}, {0xc245e000}, - {0xc2460000}, {0xc2462000}, {0xc2464000}, {0xc2466000}, - {0xc2468000}, {0xc246a000}, {0xc246c000}, {0xc246e000}, - {0xc2470000}, {0xc2472000}, {0xc2474000}, {0xc2476000}, - {0xc2478000}, {0xc247a000}, {0xc247c000}, {0xc247e000}, - {0xc2480000}, {0xc2482000}, {0xc2484000}, {0xc2486000}, - {0xc2488000}, {0xc248a000}, {0xc248c000}, {0xc248e000}, - {0xc2490000}, {0xc2492000}, {0xc2494000}, {0xc2496000}, - {0xc2498000}, {0xc249a000}, {0xc249c000}, {0xc249e000}, - {0xc24a0000}, {0xc24a2000}, {0xc24a4000}, {0xc24a6000}, - {0xc24a8000}, {0xc24aa000}, {0xc24ac000}, {0xc24ae000}, - {0xc24b0000}, {0xc24b2000}, {0xc24b4000}, {0xc24b6000}, - {0xc24b8000}, {0xc24ba000}, {0xc24bc000}, {0xc24be000}, - {0xc24c0000}, {0xc24c2000}, {0xc24c4000}, {0xc24c6000}, - {0xc24c8000}, {0xc24ca000}, {0xc24cc000}, {0xc24ce000}, - {0xc24d0000}, {0xc24d2000}, {0xc24d4000}, {0xc24d6000}, - {0xc24d8000}, {0xc24da000}, {0xc24dc000}, {0xc24de000}, - {0xc24e0000}, {0xc24e2000}, {0xc24e4000}, {0xc24e6000}, - {0xc24e8000}, {0xc24ea000}, {0xc24ec000}, {0xc24ee000}, - {0xc24f0000}, {0xc24f2000}, {0xc24f4000}, {0xc24f6000}, - {0xc24f8000}, {0xc24fa000}, {0xc24fc000}, {0xc24fe000}, - {0xc2500000}, {0xc2502000}, {0xc2504000}, {0xc2506000}, - {0xc2508000}, {0xc250a000}, {0xc250c000}, {0xc250e000}, - {0xc2510000}, {0xc2512000}, {0xc2514000}, {0xc2516000}, - {0xc2518000}, {0xc251a000}, {0xc251c000}, {0xc251e000}, - {0xc2520000}, {0xc2522000}, {0xc2524000}, {0xc2526000}, - {0xc2528000}, {0xc252a000}, {0xc252c000}, {0xc252e000}, - {0xc2530000}, {0xc2532000}, {0xc2534000}, {0xc2536000}, - {0xc2538000}, {0xc253a000}, {0xc253c000}, {0xc253e000}, - {0xc2540000}, {0xc2542000}, {0xc2544000}, {0xc2546000}, - {0xc2548000}, {0xc254a000}, {0xc254c000}, {0xc254e000}, - {0xc2550000}, {0xc2552000}, {0xc2554000}, {0xc2556000}, - {0xc2558000}, {0xc255a000}, {0xc255c000}, {0xc255e000}, - {0xc2560000}, {0xc2562000}, {0xc2564000}, {0xc2566000}, - {0xc2568000}, {0xc256a000}, {0xc256c000}, {0xc256e000}, - {0xc2570000}, {0xc2572000}, {0xc2574000}, {0xc2576000}, - {0xc2578000}, {0xc257a000}, {0xc257c000}, {0xc257e000}, - {0xc2580000}, {0xc2582000}, {0xc2584000}, {0xc2586000}, - {0xc2588000}, {0xc258a000}, {0xc258c000}, {0xc258e000}, - {0xc2590000}, {0xc2592000}, {0xc2594000}, {0xc2596000}, - {0xc2598000}, {0xc259a000}, {0xc259c000}, {0xc259e000}, - {0xc25a0000}, {0xc25a2000}, {0xc25a4000}, {0xc25a6000}, - {0xc25a8000}, {0xc25aa000}, {0xc25ac000}, {0xc25ae000}, - {0xc25b0000}, {0xc25b2000}, {0xc25b4000}, {0xc25b6000}, - {0xc25b8000}, {0xc25ba000}, {0xc25bc000}, {0xc25be000}, - {0xc25c0000}, {0xc25c2000}, {0xc25c4000}, {0xc25c6000}, - {0xc25c8000}, {0xc25ca000}, {0xc25cc000}, {0xc25ce000}, - {0xc25d0000}, {0xc25d2000}, {0xc25d4000}, {0xc25d6000}, - {0xc25d8000}, {0xc25da000}, {0xc25dc000}, {0xc25de000}, - {0xc25e0000}, {0xc25e2000}, {0xc25e4000}, {0xc25e6000}, - {0xc25e8000}, {0xc25ea000}, {0xc25ec000}, {0xc25ee000}, - {0xc25f0000}, {0xc25f2000}, {0xc25f4000}, {0xc25f6000}, - {0xc25f8000}, {0xc25fa000}, {0xc25fc000}, {0xc25fe000}, - {0xc2600000}, {0xc2602000}, {0xc2604000}, {0xc2606000}, - {0xc2608000}, {0xc260a000}, {0xc260c000}, {0xc260e000}, - {0xc2610000}, {0xc2612000}, {0xc2614000}, {0xc2616000}, - {0xc2618000}, {0xc261a000}, {0xc261c000}, {0xc261e000}, - {0xc2620000}, {0xc2622000}, {0xc2624000}, {0xc2626000}, - {0xc2628000}, {0xc262a000}, {0xc262c000}, {0xc262e000}, - {0xc2630000}, {0xc2632000}, {0xc2634000}, {0xc2636000}, - {0xc2638000}, {0xc263a000}, {0xc263c000}, {0xc263e000}, - {0xc2640000}, {0xc2642000}, {0xc2644000}, {0xc2646000}, - {0xc2648000}, {0xc264a000}, {0xc264c000}, {0xc264e000}, - {0xc2650000}, {0xc2652000}, {0xc2654000}, {0xc2656000}, - {0xc2658000}, {0xc265a000}, {0xc265c000}, {0xc265e000}, - {0xc2660000}, {0xc2662000}, {0xc2664000}, {0xc2666000}, - {0xc2668000}, {0xc266a000}, {0xc266c000}, {0xc266e000}, - {0xc2670000}, {0xc2672000}, {0xc2674000}, {0xc2676000}, - {0xc2678000}, {0xc267a000}, {0xc267c000}, {0xc267e000}, - {0xc2680000}, {0xc2682000}, {0xc2684000}, {0xc2686000}, - {0xc2688000}, {0xc268a000}, {0xc268c000}, {0xc268e000}, - {0xc2690000}, {0xc2692000}, {0xc2694000}, {0xc2696000}, - {0xc2698000}, {0xc269a000}, {0xc269c000}, {0xc269e000}, - {0xc26a0000}, {0xc26a2000}, {0xc26a4000}, {0xc26a6000}, - {0xc26a8000}, {0xc26aa000}, {0xc26ac000}, {0xc26ae000}, - {0xc26b0000}, {0xc26b2000}, {0xc26b4000}, {0xc26b6000}, - {0xc26b8000}, {0xc26ba000}, {0xc26bc000}, {0xc26be000}, - {0xc26c0000}, {0xc26c2000}, {0xc26c4000}, {0xc26c6000}, - {0xc26c8000}, {0xc26ca000}, {0xc26cc000}, {0xc26ce000}, - {0xc26d0000}, {0xc26d2000}, {0xc26d4000}, {0xc26d6000}, - {0xc26d8000}, {0xc26da000}, {0xc26dc000}, {0xc26de000}, - {0xc26e0000}, {0xc26e2000}, {0xc26e4000}, {0xc26e6000}, - {0xc26e8000}, {0xc26ea000}, {0xc26ec000}, {0xc26ee000}, - {0xc26f0000}, {0xc26f2000}, {0xc26f4000}, {0xc26f6000}, - {0xc26f8000}, {0xc26fa000}, {0xc26fc000}, {0xc26fe000}, - {0xc2700000}, {0xc2702000}, {0xc2704000}, {0xc2706000}, - {0xc2708000}, {0xc270a000}, {0xc270c000}, {0xc270e000}, - {0xc2710000}, {0xc2712000}, {0xc2714000}, {0xc2716000}, - {0xc2718000}, {0xc271a000}, {0xc271c000}, {0xc271e000}, - {0xc2720000}, {0xc2722000}, {0xc2724000}, {0xc2726000}, - {0xc2728000}, {0xc272a000}, {0xc272c000}, {0xc272e000}, - {0xc2730000}, {0xc2732000}, {0xc2734000}, {0xc2736000}, - {0xc2738000}, {0xc273a000}, {0xc273c000}, {0xc273e000}, - {0xc2740000}, {0xc2742000}, {0xc2744000}, {0xc2746000}, - {0xc2748000}, {0xc274a000}, {0xc274c000}, {0xc274e000}, - {0xc2750000}, {0xc2752000}, {0xc2754000}, {0xc2756000}, - {0xc2758000}, {0xc275a000}, {0xc275c000}, {0xc275e000}, - {0xc2760000}, {0xc2762000}, {0xc2764000}, {0xc2766000}, - {0xc2768000}, {0xc276a000}, {0xc276c000}, {0xc276e000}, - {0xc2770000}, {0xc2772000}, {0xc2774000}, {0xc2776000}, - {0xc2778000}, {0xc277a000}, {0xc277c000}, {0xc277e000}, - {0xc2780000}, {0xc2782000}, {0xc2784000}, {0xc2786000}, - {0xc2788000}, {0xc278a000}, {0xc278c000}, {0xc278e000}, - {0xc2790000}, {0xc2792000}, {0xc2794000}, {0xc2796000}, - {0xc2798000}, {0xc279a000}, {0xc279c000}, {0xc279e000}, - {0xc27a0000}, {0xc27a2000}, {0xc27a4000}, {0xc27a6000}, - {0xc27a8000}, {0xc27aa000}, {0xc27ac000}, {0xc27ae000}, - {0xc27b0000}, {0xc27b2000}, {0xc27b4000}, {0xc27b6000}, - {0xc27b8000}, {0xc27ba000}, {0xc27bc000}, {0xc27be000}, - {0xc27c0000}, {0xc27c2000}, {0xc27c4000}, {0xc27c6000}, - {0xc27c8000}, {0xc27ca000}, {0xc27cc000}, {0xc27ce000}, - {0xc27d0000}, {0xc27d2000}, {0xc27d4000}, {0xc27d6000}, - {0xc27d8000}, {0xc27da000}, {0xc27dc000}, {0xc27de000}, - {0xc27e0000}, {0xc27e2000}, {0xc27e4000}, {0xc27e6000}, - {0xc27e8000}, {0xc27ea000}, {0xc27ec000}, {0xc27ee000}, - {0xc27f0000}, {0xc27f2000}, {0xc27f4000}, {0xc27f6000}, - {0xc27f8000}, {0xc27fa000}, {0xc27fc000}, {0xc27fe000}, - {0xc2800000}, {0xc2802000}, {0xc2804000}, {0xc2806000}, - {0xc2808000}, {0xc280a000}, {0xc280c000}, {0xc280e000}, - {0xc2810000}, {0xc2812000}, {0xc2814000}, {0xc2816000}, - {0xc2818000}, {0xc281a000}, {0xc281c000}, {0xc281e000}, - {0xc2820000}, {0xc2822000}, {0xc2824000}, {0xc2826000}, - {0xc2828000}, {0xc282a000}, {0xc282c000}, {0xc282e000}, - {0xc2830000}, {0xc2832000}, {0xc2834000}, {0xc2836000}, - {0xc2838000}, {0xc283a000}, {0xc283c000}, {0xc283e000}, - {0xc2840000}, {0xc2842000}, {0xc2844000}, {0xc2846000}, - {0xc2848000}, {0xc284a000}, {0xc284c000}, {0xc284e000}, - {0xc2850000}, {0xc2852000}, {0xc2854000}, {0xc2856000}, - {0xc2858000}, {0xc285a000}, {0xc285c000}, {0xc285e000}, - {0xc2860000}, {0xc2862000}, {0xc2864000}, {0xc2866000}, - {0xc2868000}, {0xc286a000}, {0xc286c000}, {0xc286e000}, - {0xc2870000}, {0xc2872000}, {0xc2874000}, {0xc2876000}, - {0xc2878000}, {0xc287a000}, {0xc287c000}, {0xc287e000}, - {0xc2880000}, {0xc2882000}, {0xc2884000}, {0xc2886000}, - {0xc2888000}, {0xc288a000}, {0xc288c000}, {0xc288e000}, - {0xc2890000}, {0xc2892000}, {0xc2894000}, {0xc2896000}, - {0xc2898000}, {0xc289a000}, {0xc289c000}, {0xc289e000}, - {0xc28a0000}, {0xc28a2000}, {0xc28a4000}, {0xc28a6000}, - {0xc28a8000}, {0xc28aa000}, {0xc28ac000}, {0xc28ae000}, - {0xc28b0000}, {0xc28b2000}, {0xc28b4000}, {0xc28b6000}, - {0xc28b8000}, {0xc28ba000}, {0xc28bc000}, {0xc28be000}, - {0xc28c0000}, {0xc28c2000}, {0xc28c4000}, {0xc28c6000}, - {0xc28c8000}, {0xc28ca000}, {0xc28cc000}, {0xc28ce000}, - {0xc28d0000}, {0xc28d2000}, {0xc28d4000}, {0xc28d6000}, - {0xc28d8000}, {0xc28da000}, {0xc28dc000}, {0xc28de000}, - {0xc28e0000}, {0xc28e2000}, {0xc28e4000}, {0xc28e6000}, - {0xc28e8000}, {0xc28ea000}, {0xc28ec000}, {0xc28ee000}, - {0xc28f0000}, {0xc28f2000}, {0xc28f4000}, {0xc28f6000}, - {0xc28f8000}, {0xc28fa000}, {0xc28fc000}, {0xc28fe000}, - {0xc2900000}, {0xc2902000}, {0xc2904000}, {0xc2906000}, - {0xc2908000}, {0xc290a000}, {0xc290c000}, {0xc290e000}, - {0xc2910000}, {0xc2912000}, {0xc2914000}, {0xc2916000}, - {0xc2918000}, {0xc291a000}, {0xc291c000}, {0xc291e000}, - {0xc2920000}, {0xc2922000}, {0xc2924000}, {0xc2926000}, - {0xc2928000}, {0xc292a000}, {0xc292c000}, {0xc292e000}, - {0xc2930000}, {0xc2932000}, {0xc2934000}, {0xc2936000}, - {0xc2938000}, {0xc293a000}, {0xc293c000}, {0xc293e000}, - {0xc2940000}, {0xc2942000}, {0xc2944000}, {0xc2946000}, - {0xc2948000}, {0xc294a000}, {0xc294c000}, {0xc294e000}, - {0xc2950000}, {0xc2952000}, {0xc2954000}, {0xc2956000}, - {0xc2958000}, {0xc295a000}, {0xc295c000}, {0xc295e000}, - {0xc2960000}, {0xc2962000}, {0xc2964000}, {0xc2966000}, - {0xc2968000}, {0xc296a000}, {0xc296c000}, {0xc296e000}, - {0xc2970000}, {0xc2972000}, {0xc2974000}, {0xc2976000}, - {0xc2978000}, {0xc297a000}, {0xc297c000}, {0xc297e000}, - {0xc2980000}, {0xc2982000}, {0xc2984000}, {0xc2986000}, - {0xc2988000}, {0xc298a000}, {0xc298c000}, {0xc298e000}, - {0xc2990000}, {0xc2992000}, {0xc2994000}, {0xc2996000}, - {0xc2998000}, {0xc299a000}, {0xc299c000}, {0xc299e000}, - {0xc29a0000}, {0xc29a2000}, {0xc29a4000}, {0xc29a6000}, - {0xc29a8000}, {0xc29aa000}, {0xc29ac000}, {0xc29ae000}, - {0xc29b0000}, {0xc29b2000}, {0xc29b4000}, {0xc29b6000}, - {0xc29b8000}, {0xc29ba000}, {0xc29bc000}, {0xc29be000}, - {0xc29c0000}, {0xc29c2000}, {0xc29c4000}, {0xc29c6000}, - {0xc29c8000}, {0xc29ca000}, {0xc29cc000}, {0xc29ce000}, - {0xc29d0000}, {0xc29d2000}, {0xc29d4000}, {0xc29d6000}, - {0xc29d8000}, {0xc29da000}, {0xc29dc000}, {0xc29de000}, - {0xc29e0000}, {0xc29e2000}, {0xc29e4000}, {0xc29e6000}, - {0xc29e8000}, {0xc29ea000}, {0xc29ec000}, {0xc29ee000}, - {0xc29f0000}, {0xc29f2000}, {0xc29f4000}, {0xc29f6000}, - {0xc29f8000}, {0xc29fa000}, {0xc29fc000}, {0xc29fe000}, - {0xc2a00000}, {0xc2a02000}, {0xc2a04000}, {0xc2a06000}, - {0xc2a08000}, {0xc2a0a000}, {0xc2a0c000}, {0xc2a0e000}, - {0xc2a10000}, {0xc2a12000}, {0xc2a14000}, {0xc2a16000}, - {0xc2a18000}, {0xc2a1a000}, {0xc2a1c000}, {0xc2a1e000}, - {0xc2a20000}, {0xc2a22000}, {0xc2a24000}, {0xc2a26000}, - {0xc2a28000}, {0xc2a2a000}, {0xc2a2c000}, {0xc2a2e000}, - {0xc2a30000}, {0xc2a32000}, {0xc2a34000}, {0xc2a36000}, - {0xc2a38000}, {0xc2a3a000}, {0xc2a3c000}, {0xc2a3e000}, - {0xc2a40000}, {0xc2a42000}, {0xc2a44000}, {0xc2a46000}, - {0xc2a48000}, {0xc2a4a000}, {0xc2a4c000}, {0xc2a4e000}, - {0xc2a50000}, {0xc2a52000}, {0xc2a54000}, {0xc2a56000}, - {0xc2a58000}, {0xc2a5a000}, {0xc2a5c000}, {0xc2a5e000}, - {0xc2a60000}, {0xc2a62000}, {0xc2a64000}, {0xc2a66000}, - {0xc2a68000}, {0xc2a6a000}, {0xc2a6c000}, {0xc2a6e000}, - {0xc2a70000}, {0xc2a72000}, {0xc2a74000}, {0xc2a76000}, - {0xc2a78000}, {0xc2a7a000}, {0xc2a7c000}, {0xc2a7e000}, - {0xc2a80000}, {0xc2a82000}, {0xc2a84000}, {0xc2a86000}, - {0xc2a88000}, {0xc2a8a000}, {0xc2a8c000}, {0xc2a8e000}, - {0xc2a90000}, {0xc2a92000}, {0xc2a94000}, {0xc2a96000}, - {0xc2a98000}, {0xc2a9a000}, {0xc2a9c000}, {0xc2a9e000}, - {0xc2aa0000}, {0xc2aa2000}, {0xc2aa4000}, {0xc2aa6000}, - {0xc2aa8000}, {0xc2aaa000}, {0xc2aac000}, {0xc2aae000}, - {0xc2ab0000}, {0xc2ab2000}, {0xc2ab4000}, {0xc2ab6000}, - {0xc2ab8000}, {0xc2aba000}, {0xc2abc000}, {0xc2abe000}, - {0xc2ac0000}, {0xc2ac2000}, {0xc2ac4000}, {0xc2ac6000}, - {0xc2ac8000}, {0xc2aca000}, {0xc2acc000}, {0xc2ace000}, - {0xc2ad0000}, {0xc2ad2000}, {0xc2ad4000}, {0xc2ad6000}, - {0xc2ad8000}, {0xc2ada000}, {0xc2adc000}, {0xc2ade000}, - {0xc2ae0000}, {0xc2ae2000}, {0xc2ae4000}, {0xc2ae6000}, - {0xc2ae8000}, {0xc2aea000}, {0xc2aec000}, {0xc2aee000}, - {0xc2af0000}, {0xc2af2000}, {0xc2af4000}, {0xc2af6000}, - {0xc2af8000}, {0xc2afa000}, {0xc2afc000}, {0xc2afe000}, - {0xc2b00000}, {0xc2b02000}, {0xc2b04000}, {0xc2b06000}, - {0xc2b08000}, {0xc2b0a000}, {0xc2b0c000}, {0xc2b0e000}, - {0xc2b10000}, {0xc2b12000}, {0xc2b14000}, {0xc2b16000}, - {0xc2b18000}, {0xc2b1a000}, {0xc2b1c000}, {0xc2b1e000}, - {0xc2b20000}, {0xc2b22000}, {0xc2b24000}, {0xc2b26000}, - {0xc2b28000}, {0xc2b2a000}, {0xc2b2c000}, {0xc2b2e000}, - {0xc2b30000}, {0xc2b32000}, {0xc2b34000}, {0xc2b36000}, - {0xc2b38000}, {0xc2b3a000}, {0xc2b3c000}, {0xc2b3e000}, - {0xc2b40000}, {0xc2b42000}, {0xc2b44000}, {0xc2b46000}, - {0xc2b48000}, {0xc2b4a000}, {0xc2b4c000}, {0xc2b4e000}, - {0xc2b50000}, {0xc2b52000}, {0xc2b54000}, {0xc2b56000}, - {0xc2b58000}, {0xc2b5a000}, {0xc2b5c000}, {0xc2b5e000}, - {0xc2b60000}, {0xc2b62000}, {0xc2b64000}, {0xc2b66000}, - {0xc2b68000}, {0xc2b6a000}, {0xc2b6c000}, {0xc2b6e000}, - {0xc2b70000}, {0xc2b72000}, {0xc2b74000}, {0xc2b76000}, - {0xc2b78000}, {0xc2b7a000}, {0xc2b7c000}, {0xc2b7e000}, - {0xc2b80000}, {0xc2b82000}, {0xc2b84000}, {0xc2b86000}, - {0xc2b88000}, {0xc2b8a000}, {0xc2b8c000}, {0xc2b8e000}, - {0xc2b90000}, {0xc2b92000}, {0xc2b94000}, {0xc2b96000}, - {0xc2b98000}, {0xc2b9a000}, {0xc2b9c000}, {0xc2b9e000}, - {0xc2ba0000}, {0xc2ba2000}, {0xc2ba4000}, {0xc2ba6000}, - {0xc2ba8000}, {0xc2baa000}, {0xc2bac000}, {0xc2bae000}, - {0xc2bb0000}, {0xc2bb2000}, {0xc2bb4000}, {0xc2bb6000}, - {0xc2bb8000}, {0xc2bba000}, {0xc2bbc000}, {0xc2bbe000}, - {0xc2bc0000}, {0xc2bc2000}, {0xc2bc4000}, {0xc2bc6000}, - {0xc2bc8000}, {0xc2bca000}, {0xc2bcc000}, {0xc2bce000}, - {0xc2bd0000}, {0xc2bd2000}, {0xc2bd4000}, {0xc2bd6000}, - {0xc2bd8000}, {0xc2bda000}, {0xc2bdc000}, {0xc2bde000}, - {0xc2be0000}, {0xc2be2000}, {0xc2be4000}, {0xc2be6000}, - {0xc2be8000}, {0xc2bea000}, {0xc2bec000}, {0xc2bee000}, - {0xc2bf0000}, {0xc2bf2000}, {0xc2bf4000}, {0xc2bf6000}, - {0xc2bf8000}, {0xc2bfa000}, {0xc2bfc000}, {0xc2bfe000}, - {0xc2c00000}, {0xc2c02000}, {0xc2c04000}, {0xc2c06000}, - {0xc2c08000}, {0xc2c0a000}, {0xc2c0c000}, {0xc2c0e000}, - {0xc2c10000}, {0xc2c12000}, {0xc2c14000}, {0xc2c16000}, - {0xc2c18000}, {0xc2c1a000}, {0xc2c1c000}, {0xc2c1e000}, - {0xc2c20000}, {0xc2c22000}, {0xc2c24000}, {0xc2c26000}, - {0xc2c28000}, {0xc2c2a000}, {0xc2c2c000}, {0xc2c2e000}, - {0xc2c30000}, {0xc2c32000}, {0xc2c34000}, {0xc2c36000}, - {0xc2c38000}, {0xc2c3a000}, {0xc2c3c000}, {0xc2c3e000}, - {0xc2c40000}, {0xc2c42000}, {0xc2c44000}, {0xc2c46000}, - {0xc2c48000}, {0xc2c4a000}, {0xc2c4c000}, {0xc2c4e000}, - {0xc2c50000}, {0xc2c52000}, {0xc2c54000}, {0xc2c56000}, - {0xc2c58000}, {0xc2c5a000}, {0xc2c5c000}, {0xc2c5e000}, - {0xc2c60000}, {0xc2c62000}, {0xc2c64000}, {0xc2c66000}, - {0xc2c68000}, {0xc2c6a000}, {0xc2c6c000}, {0xc2c6e000}, - {0xc2c70000}, {0xc2c72000}, {0xc2c74000}, {0xc2c76000}, - {0xc2c78000}, {0xc2c7a000}, {0xc2c7c000}, {0xc2c7e000}, - {0xc2c80000}, {0xc2c82000}, {0xc2c84000}, {0xc2c86000}, - {0xc2c88000}, {0xc2c8a000}, {0xc2c8c000}, {0xc2c8e000}, - {0xc2c90000}, {0xc2c92000}, {0xc2c94000}, {0xc2c96000}, - {0xc2c98000}, {0xc2c9a000}, {0xc2c9c000}, {0xc2c9e000}, - {0xc2ca0000}, {0xc2ca2000}, {0xc2ca4000}, {0xc2ca6000}, - {0xc2ca8000}, {0xc2caa000}, {0xc2cac000}, {0xc2cae000}, - {0xc2cb0000}, {0xc2cb2000}, {0xc2cb4000}, {0xc2cb6000}, - {0xc2cb8000}, {0xc2cba000}, {0xc2cbc000}, {0xc2cbe000}, - {0xc2cc0000}, {0xc2cc2000}, {0xc2cc4000}, {0xc2cc6000}, - {0xc2cc8000}, {0xc2cca000}, {0xc2ccc000}, {0xc2cce000}, - {0xc2cd0000}, {0xc2cd2000}, {0xc2cd4000}, {0xc2cd6000}, - {0xc2cd8000}, {0xc2cda000}, {0xc2cdc000}, {0xc2cde000}, - {0xc2ce0000}, {0xc2ce2000}, {0xc2ce4000}, {0xc2ce6000}, - {0xc2ce8000}, {0xc2cea000}, {0xc2cec000}, {0xc2cee000}, - {0xc2cf0000}, {0xc2cf2000}, {0xc2cf4000}, {0xc2cf6000}, - {0xc2cf8000}, {0xc2cfa000}, {0xc2cfc000}, {0xc2cfe000}, - {0xc2d00000}, {0xc2d02000}, {0xc2d04000}, {0xc2d06000}, - {0xc2d08000}, {0xc2d0a000}, {0xc2d0c000}, {0xc2d0e000}, - {0xc2d10000}, {0xc2d12000}, {0xc2d14000}, {0xc2d16000}, - {0xc2d18000}, {0xc2d1a000}, {0xc2d1c000}, {0xc2d1e000}, - {0xc2d20000}, {0xc2d22000}, {0xc2d24000}, {0xc2d26000}, - {0xc2d28000}, {0xc2d2a000}, {0xc2d2c000}, {0xc2d2e000}, - {0xc2d30000}, {0xc2d32000}, {0xc2d34000}, {0xc2d36000}, - {0xc2d38000}, {0xc2d3a000}, {0xc2d3c000}, {0xc2d3e000}, - {0xc2d40000}, {0xc2d42000}, {0xc2d44000}, {0xc2d46000}, - {0xc2d48000}, {0xc2d4a000}, {0xc2d4c000}, {0xc2d4e000}, - {0xc2d50000}, {0xc2d52000}, {0xc2d54000}, {0xc2d56000}, - {0xc2d58000}, {0xc2d5a000}, {0xc2d5c000}, {0xc2d5e000}, - {0xc2d60000}, {0xc2d62000}, {0xc2d64000}, {0xc2d66000}, - {0xc2d68000}, {0xc2d6a000}, {0xc2d6c000}, {0xc2d6e000}, - {0xc2d70000}, {0xc2d72000}, {0xc2d74000}, {0xc2d76000}, - {0xc2d78000}, {0xc2d7a000}, {0xc2d7c000}, {0xc2d7e000}, - {0xc2d80000}, {0xc2d82000}, {0xc2d84000}, {0xc2d86000}, - {0xc2d88000}, {0xc2d8a000}, {0xc2d8c000}, {0xc2d8e000}, - {0xc2d90000}, {0xc2d92000}, {0xc2d94000}, {0xc2d96000}, - {0xc2d98000}, {0xc2d9a000}, {0xc2d9c000}, {0xc2d9e000}, - {0xc2da0000}, {0xc2da2000}, {0xc2da4000}, {0xc2da6000}, - {0xc2da8000}, {0xc2daa000}, {0xc2dac000}, {0xc2dae000}, - {0xc2db0000}, {0xc2db2000}, {0xc2db4000}, {0xc2db6000}, - {0xc2db8000}, {0xc2dba000}, {0xc2dbc000}, {0xc2dbe000}, - {0xc2dc0000}, {0xc2dc2000}, {0xc2dc4000}, {0xc2dc6000}, - {0xc2dc8000}, {0xc2dca000}, {0xc2dcc000}, {0xc2dce000}, - {0xc2dd0000}, {0xc2dd2000}, {0xc2dd4000}, {0xc2dd6000}, - {0xc2dd8000}, {0xc2dda000}, {0xc2ddc000}, {0xc2dde000}, - {0xc2de0000}, {0xc2de2000}, {0xc2de4000}, {0xc2de6000}, - {0xc2de8000}, {0xc2dea000}, {0xc2dec000}, {0xc2dee000}, - {0xc2df0000}, {0xc2df2000}, {0xc2df4000}, {0xc2df6000}, - {0xc2df8000}, {0xc2dfa000}, {0xc2dfc000}, {0xc2dfe000}, - {0xc2e00000}, {0xc2e02000}, {0xc2e04000}, {0xc2e06000}, - {0xc2e08000}, {0xc2e0a000}, {0xc2e0c000}, {0xc2e0e000}, - {0xc2e10000}, {0xc2e12000}, {0xc2e14000}, {0xc2e16000}, - {0xc2e18000}, {0xc2e1a000}, {0xc2e1c000}, {0xc2e1e000}, - {0xc2e20000}, {0xc2e22000}, {0xc2e24000}, {0xc2e26000}, - {0xc2e28000}, {0xc2e2a000}, {0xc2e2c000}, {0xc2e2e000}, - {0xc2e30000}, {0xc2e32000}, {0xc2e34000}, {0xc2e36000}, - {0xc2e38000}, {0xc2e3a000}, {0xc2e3c000}, {0xc2e3e000}, - {0xc2e40000}, {0xc2e42000}, {0xc2e44000}, {0xc2e46000}, - {0xc2e48000}, {0xc2e4a000}, {0xc2e4c000}, {0xc2e4e000}, - {0xc2e50000}, {0xc2e52000}, {0xc2e54000}, {0xc2e56000}, - {0xc2e58000}, {0xc2e5a000}, {0xc2e5c000}, {0xc2e5e000}, - {0xc2e60000}, {0xc2e62000}, {0xc2e64000}, {0xc2e66000}, - {0xc2e68000}, {0xc2e6a000}, {0xc2e6c000}, {0xc2e6e000}, - {0xc2e70000}, {0xc2e72000}, {0xc2e74000}, {0xc2e76000}, - {0xc2e78000}, {0xc2e7a000}, {0xc2e7c000}, {0xc2e7e000}, - {0xc2e80000}, {0xc2e82000}, {0xc2e84000}, {0xc2e86000}, - {0xc2e88000}, {0xc2e8a000}, {0xc2e8c000}, {0xc2e8e000}, - {0xc2e90000}, {0xc2e92000}, {0xc2e94000}, {0xc2e96000}, - {0xc2e98000}, {0xc2e9a000}, {0xc2e9c000}, {0xc2e9e000}, - {0xc2ea0000}, {0xc2ea2000}, {0xc2ea4000}, {0xc2ea6000}, - {0xc2ea8000}, {0xc2eaa000}, {0xc2eac000}, {0xc2eae000}, - {0xc2eb0000}, {0xc2eb2000}, {0xc2eb4000}, {0xc2eb6000}, - {0xc2eb8000}, {0xc2eba000}, {0xc2ebc000}, {0xc2ebe000}, - {0xc2ec0000}, {0xc2ec2000}, {0xc2ec4000}, {0xc2ec6000}, - {0xc2ec8000}, {0xc2eca000}, {0xc2ecc000}, {0xc2ece000}, - {0xc2ed0000}, {0xc2ed2000}, {0xc2ed4000}, {0xc2ed6000}, - {0xc2ed8000}, {0xc2eda000}, {0xc2edc000}, {0xc2ede000}, - {0xc2ee0000}, {0xc2ee2000}, {0xc2ee4000}, {0xc2ee6000}, - {0xc2ee8000}, {0xc2eea000}, {0xc2eec000}, {0xc2eee000}, - {0xc2ef0000}, {0xc2ef2000}, {0xc2ef4000}, {0xc2ef6000}, - {0xc2ef8000}, {0xc2efa000}, {0xc2efc000}, {0xc2efe000}, - {0xc2f00000}, {0xc2f02000}, {0xc2f04000}, {0xc2f06000}, - {0xc2f08000}, {0xc2f0a000}, {0xc2f0c000}, {0xc2f0e000}, - {0xc2f10000}, {0xc2f12000}, {0xc2f14000}, {0xc2f16000}, - {0xc2f18000}, {0xc2f1a000}, {0xc2f1c000}, {0xc2f1e000}, - {0xc2f20000}, {0xc2f22000}, {0xc2f24000}, {0xc2f26000}, - {0xc2f28000}, {0xc2f2a000}, {0xc2f2c000}, {0xc2f2e000}, - {0xc2f30000}, {0xc2f32000}, {0xc2f34000}, {0xc2f36000}, - {0xc2f38000}, {0xc2f3a000}, {0xc2f3c000}, {0xc2f3e000}, - {0xc2f40000}, {0xc2f42000}, {0xc2f44000}, {0xc2f46000}, - {0xc2f48000}, {0xc2f4a000}, {0xc2f4c000}, {0xc2f4e000}, - {0xc2f50000}, {0xc2f52000}, {0xc2f54000}, {0xc2f56000}, - {0xc2f58000}, {0xc2f5a000}, {0xc2f5c000}, {0xc2f5e000}, - {0xc2f60000}, {0xc2f62000}, {0xc2f64000}, {0xc2f66000}, - {0xc2f68000}, {0xc2f6a000}, {0xc2f6c000}, {0xc2f6e000}, - {0xc2f70000}, {0xc2f72000}, {0xc2f74000}, {0xc2f76000}, - {0xc2f78000}, {0xc2f7a000}, {0xc2f7c000}, {0xc2f7e000}, - {0xc2f80000}, {0xc2f82000}, {0xc2f84000}, {0xc2f86000}, - {0xc2f88000}, {0xc2f8a000}, {0xc2f8c000}, {0xc2f8e000}, - {0xc2f90000}, {0xc2f92000}, {0xc2f94000}, {0xc2f96000}, - {0xc2f98000}, {0xc2f9a000}, {0xc2f9c000}, {0xc2f9e000}, - {0xc2fa0000}, {0xc2fa2000}, {0xc2fa4000}, {0xc2fa6000}, - {0xc2fa8000}, {0xc2faa000}, {0xc2fac000}, {0xc2fae000}, - {0xc2fb0000}, {0xc2fb2000}, {0xc2fb4000}, {0xc2fb6000}, - {0xc2fb8000}, {0xc2fba000}, {0xc2fbc000}, {0xc2fbe000}, - {0xc2fc0000}, {0xc2fc2000}, {0xc2fc4000}, {0xc2fc6000}, - {0xc2fc8000}, {0xc2fca000}, {0xc2fcc000}, {0xc2fce000}, - {0xc2fd0000}, {0xc2fd2000}, {0xc2fd4000}, {0xc2fd6000}, - {0xc2fd8000}, {0xc2fda000}, {0xc2fdc000}, {0xc2fde000}, - {0xc2fe0000}, {0xc2fe2000}, {0xc2fe4000}, {0xc2fe6000}, - {0xc2fe8000}, {0xc2fea000}, {0xc2fec000}, {0xc2fee000}, - {0xc2ff0000}, {0xc2ff2000}, {0xc2ff4000}, {0xc2ff6000}, - {0xc2ff8000}, {0xc2ffa000}, {0xc2ffc000}, {0xc2ffe000}, - {0xc3000000}, {0xc3002000}, {0xc3004000}, {0xc3006000}, - {0xc3008000}, {0xc300a000}, {0xc300c000}, {0xc300e000}, - {0xc3010000}, {0xc3012000}, {0xc3014000}, {0xc3016000}, - {0xc3018000}, {0xc301a000}, {0xc301c000}, {0xc301e000}, - {0xc3020000}, {0xc3022000}, {0xc3024000}, {0xc3026000}, - {0xc3028000}, {0xc302a000}, {0xc302c000}, {0xc302e000}, - {0xc3030000}, {0xc3032000}, {0xc3034000}, {0xc3036000}, - {0xc3038000}, {0xc303a000}, {0xc303c000}, {0xc303e000}, - {0xc3040000}, {0xc3042000}, {0xc3044000}, {0xc3046000}, - {0xc3048000}, {0xc304a000}, {0xc304c000}, {0xc304e000}, - {0xc3050000}, {0xc3052000}, {0xc3054000}, {0xc3056000}, - {0xc3058000}, {0xc305a000}, {0xc305c000}, {0xc305e000}, - {0xc3060000}, {0xc3062000}, {0xc3064000}, {0xc3066000}, - {0xc3068000}, {0xc306a000}, {0xc306c000}, {0xc306e000}, - {0xc3070000}, {0xc3072000}, {0xc3074000}, {0xc3076000}, - {0xc3078000}, {0xc307a000}, {0xc307c000}, {0xc307e000}, - {0xc3080000}, {0xc3082000}, {0xc3084000}, {0xc3086000}, - {0xc3088000}, {0xc308a000}, {0xc308c000}, {0xc308e000}, - {0xc3090000}, {0xc3092000}, {0xc3094000}, {0xc3096000}, - {0xc3098000}, {0xc309a000}, {0xc309c000}, {0xc309e000}, - {0xc30a0000}, {0xc30a2000}, {0xc30a4000}, {0xc30a6000}, - {0xc30a8000}, {0xc30aa000}, {0xc30ac000}, {0xc30ae000}, - {0xc30b0000}, {0xc30b2000}, {0xc30b4000}, {0xc30b6000}, - {0xc30b8000}, {0xc30ba000}, {0xc30bc000}, {0xc30be000}, - {0xc30c0000}, {0xc30c2000}, {0xc30c4000}, {0xc30c6000}, - {0xc30c8000}, {0xc30ca000}, {0xc30cc000}, {0xc30ce000}, - {0xc30d0000}, {0xc30d2000}, {0xc30d4000}, {0xc30d6000}, - {0xc30d8000}, {0xc30da000}, {0xc30dc000}, {0xc30de000}, - {0xc30e0000}, {0xc30e2000}, {0xc30e4000}, {0xc30e6000}, - {0xc30e8000}, {0xc30ea000}, {0xc30ec000}, {0xc30ee000}, - {0xc30f0000}, {0xc30f2000}, {0xc30f4000}, {0xc30f6000}, - {0xc30f8000}, {0xc30fa000}, {0xc30fc000}, {0xc30fe000}, - {0xc3100000}, {0xc3102000}, {0xc3104000}, {0xc3106000}, - {0xc3108000}, {0xc310a000}, {0xc310c000}, {0xc310e000}, - {0xc3110000}, {0xc3112000}, {0xc3114000}, {0xc3116000}, - {0xc3118000}, {0xc311a000}, {0xc311c000}, {0xc311e000}, - {0xc3120000}, {0xc3122000}, {0xc3124000}, {0xc3126000}, - {0xc3128000}, {0xc312a000}, {0xc312c000}, {0xc312e000}, - {0xc3130000}, {0xc3132000}, {0xc3134000}, {0xc3136000}, - {0xc3138000}, {0xc313a000}, {0xc313c000}, {0xc313e000}, - {0xc3140000}, {0xc3142000}, {0xc3144000}, {0xc3146000}, - {0xc3148000}, {0xc314a000}, {0xc314c000}, {0xc314e000}, - {0xc3150000}, {0xc3152000}, {0xc3154000}, {0xc3156000}, - {0xc3158000}, {0xc315a000}, {0xc315c000}, {0xc315e000}, - {0xc3160000}, {0xc3162000}, {0xc3164000}, {0xc3166000}, - {0xc3168000}, {0xc316a000}, {0xc316c000}, {0xc316e000}, - {0xc3170000}, {0xc3172000}, {0xc3174000}, {0xc3176000}, - {0xc3178000}, {0xc317a000}, {0xc317c000}, {0xc317e000}, - {0xc3180000}, {0xc3182000}, {0xc3184000}, {0xc3186000}, - {0xc3188000}, {0xc318a000}, {0xc318c000}, {0xc318e000}, - {0xc3190000}, {0xc3192000}, {0xc3194000}, {0xc3196000}, - {0xc3198000}, {0xc319a000}, {0xc319c000}, {0xc319e000}, - {0xc31a0000}, {0xc31a2000}, {0xc31a4000}, {0xc31a6000}, - {0xc31a8000}, {0xc31aa000}, {0xc31ac000}, {0xc31ae000}, - {0xc31b0000}, {0xc31b2000}, {0xc31b4000}, {0xc31b6000}, - {0xc31b8000}, {0xc31ba000}, {0xc31bc000}, {0xc31be000}, - {0xc31c0000}, {0xc31c2000}, {0xc31c4000}, {0xc31c6000}, - {0xc31c8000}, {0xc31ca000}, {0xc31cc000}, {0xc31ce000}, - {0xc31d0000}, {0xc31d2000}, {0xc31d4000}, {0xc31d6000}, - {0xc31d8000}, {0xc31da000}, {0xc31dc000}, {0xc31de000}, - {0xc31e0000}, {0xc31e2000}, {0xc31e4000}, {0xc31e6000}, - {0xc31e8000}, {0xc31ea000}, {0xc31ec000}, {0xc31ee000}, - {0xc31f0000}, {0xc31f2000}, {0xc31f4000}, {0xc31f6000}, - {0xc31f8000}, {0xc31fa000}, {0xc31fc000}, {0xc31fe000}, - {0xc3200000}, {0xc3202000}, {0xc3204000}, {0xc3206000}, - {0xc3208000}, {0xc320a000}, {0xc320c000}, {0xc320e000}, - {0xc3210000}, {0xc3212000}, {0xc3214000}, {0xc3216000}, - {0xc3218000}, {0xc321a000}, {0xc321c000}, {0xc321e000}, - {0xc3220000}, {0xc3222000}, {0xc3224000}, {0xc3226000}, - {0xc3228000}, {0xc322a000}, {0xc322c000}, {0xc322e000}, - {0xc3230000}, {0xc3232000}, {0xc3234000}, {0xc3236000}, - {0xc3238000}, {0xc323a000}, {0xc323c000}, {0xc323e000}, - {0xc3240000}, {0xc3242000}, {0xc3244000}, {0xc3246000}, - {0xc3248000}, {0xc324a000}, {0xc324c000}, {0xc324e000}, - {0xc3250000}, {0xc3252000}, {0xc3254000}, {0xc3256000}, - {0xc3258000}, {0xc325a000}, {0xc325c000}, {0xc325e000}, - {0xc3260000}, {0xc3262000}, {0xc3264000}, {0xc3266000}, - {0xc3268000}, {0xc326a000}, {0xc326c000}, {0xc326e000}, - {0xc3270000}, {0xc3272000}, {0xc3274000}, {0xc3276000}, - {0xc3278000}, {0xc327a000}, {0xc327c000}, {0xc327e000}, - {0xc3280000}, {0xc3282000}, {0xc3284000}, {0xc3286000}, - {0xc3288000}, {0xc328a000}, {0xc328c000}, {0xc328e000}, - {0xc3290000}, {0xc3292000}, {0xc3294000}, {0xc3296000}, - {0xc3298000}, {0xc329a000}, {0xc329c000}, {0xc329e000}, - {0xc32a0000}, {0xc32a2000}, {0xc32a4000}, {0xc32a6000}, - {0xc32a8000}, {0xc32aa000}, {0xc32ac000}, {0xc32ae000}, - {0xc32b0000}, {0xc32b2000}, {0xc32b4000}, {0xc32b6000}, - {0xc32b8000}, {0xc32ba000}, {0xc32bc000}, {0xc32be000}, - {0xc32c0000}, {0xc32c2000}, {0xc32c4000}, {0xc32c6000}, - {0xc32c8000}, {0xc32ca000}, {0xc32cc000}, {0xc32ce000}, - {0xc32d0000}, {0xc32d2000}, {0xc32d4000}, {0xc32d6000}, - {0xc32d8000}, {0xc32da000}, {0xc32dc000}, {0xc32de000}, - {0xc32e0000}, {0xc32e2000}, {0xc32e4000}, {0xc32e6000}, - {0xc32e8000}, {0xc32ea000}, {0xc32ec000}, {0xc32ee000}, - {0xc32f0000}, {0xc32f2000}, {0xc32f4000}, {0xc32f6000}, - {0xc32f8000}, {0xc32fa000}, {0xc32fc000}, {0xc32fe000}, - {0xc3300000}, {0xc3302000}, {0xc3304000}, {0xc3306000}, - {0xc3308000}, {0xc330a000}, {0xc330c000}, {0xc330e000}, - {0xc3310000}, {0xc3312000}, {0xc3314000}, {0xc3316000}, - {0xc3318000}, {0xc331a000}, {0xc331c000}, {0xc331e000}, - {0xc3320000}, {0xc3322000}, {0xc3324000}, {0xc3326000}, - {0xc3328000}, {0xc332a000}, {0xc332c000}, {0xc332e000}, - {0xc3330000}, {0xc3332000}, {0xc3334000}, {0xc3336000}, - {0xc3338000}, {0xc333a000}, {0xc333c000}, {0xc333e000}, - {0xc3340000}, {0xc3342000}, {0xc3344000}, {0xc3346000}, - {0xc3348000}, {0xc334a000}, {0xc334c000}, {0xc334e000}, - {0xc3350000}, {0xc3352000}, {0xc3354000}, {0xc3356000}, - {0xc3358000}, {0xc335a000}, {0xc335c000}, {0xc335e000}, - {0xc3360000}, {0xc3362000}, {0xc3364000}, {0xc3366000}, - {0xc3368000}, {0xc336a000}, {0xc336c000}, {0xc336e000}, - {0xc3370000}, {0xc3372000}, {0xc3374000}, {0xc3376000}, - {0xc3378000}, {0xc337a000}, {0xc337c000}, {0xc337e000}, - {0xc3380000}, {0xc3382000}, {0xc3384000}, {0xc3386000}, - {0xc3388000}, {0xc338a000}, {0xc338c000}, {0xc338e000}, - {0xc3390000}, {0xc3392000}, {0xc3394000}, {0xc3396000}, - {0xc3398000}, {0xc339a000}, {0xc339c000}, {0xc339e000}, - {0xc33a0000}, {0xc33a2000}, {0xc33a4000}, {0xc33a6000}, - {0xc33a8000}, {0xc33aa000}, {0xc33ac000}, {0xc33ae000}, - {0xc33b0000}, {0xc33b2000}, {0xc33b4000}, {0xc33b6000}, - {0xc33b8000}, {0xc33ba000}, {0xc33bc000}, {0xc33be000}, - {0xc33c0000}, {0xc33c2000}, {0xc33c4000}, {0xc33c6000}, - {0xc33c8000}, {0xc33ca000}, {0xc33cc000}, {0xc33ce000}, - {0xc33d0000}, {0xc33d2000}, {0xc33d4000}, {0xc33d6000}, - {0xc33d8000}, {0xc33da000}, {0xc33dc000}, {0xc33de000}, - {0xc33e0000}, {0xc33e2000}, {0xc33e4000}, {0xc33e6000}, - {0xc33e8000}, {0xc33ea000}, {0xc33ec000}, {0xc33ee000}, - {0xc33f0000}, {0xc33f2000}, {0xc33f4000}, {0xc33f6000}, - {0xc33f8000}, {0xc33fa000}, {0xc33fc000}, {0xc33fe000}, - {0xc3400000}, {0xc3402000}, {0xc3404000}, {0xc3406000}, - {0xc3408000}, {0xc340a000}, {0xc340c000}, {0xc340e000}, - {0xc3410000}, {0xc3412000}, {0xc3414000}, {0xc3416000}, - {0xc3418000}, {0xc341a000}, {0xc341c000}, {0xc341e000}, - {0xc3420000}, {0xc3422000}, {0xc3424000}, {0xc3426000}, - {0xc3428000}, {0xc342a000}, {0xc342c000}, {0xc342e000}, - {0xc3430000}, {0xc3432000}, {0xc3434000}, {0xc3436000}, - {0xc3438000}, {0xc343a000}, {0xc343c000}, {0xc343e000}, - {0xc3440000}, {0xc3442000}, {0xc3444000}, {0xc3446000}, - {0xc3448000}, {0xc344a000}, {0xc344c000}, {0xc344e000}, - {0xc3450000}, {0xc3452000}, {0xc3454000}, {0xc3456000}, - {0xc3458000}, {0xc345a000}, {0xc345c000}, {0xc345e000}, - {0xc3460000}, {0xc3462000}, {0xc3464000}, {0xc3466000}, - {0xc3468000}, {0xc346a000}, {0xc346c000}, {0xc346e000}, - {0xc3470000}, {0xc3472000}, {0xc3474000}, {0xc3476000}, - {0xc3478000}, {0xc347a000}, {0xc347c000}, {0xc347e000}, - {0xc3480000}, {0xc3482000}, {0xc3484000}, {0xc3486000}, - {0xc3488000}, {0xc348a000}, {0xc348c000}, {0xc348e000}, - {0xc3490000}, {0xc3492000}, {0xc3494000}, {0xc3496000}, - {0xc3498000}, {0xc349a000}, {0xc349c000}, {0xc349e000}, - {0xc34a0000}, {0xc34a2000}, {0xc34a4000}, {0xc34a6000}, - {0xc34a8000}, {0xc34aa000}, {0xc34ac000}, {0xc34ae000}, - {0xc34b0000}, {0xc34b2000}, {0xc34b4000}, {0xc34b6000}, - {0xc34b8000}, {0xc34ba000}, {0xc34bc000}, {0xc34be000}, - {0xc34c0000}, {0xc34c2000}, {0xc34c4000}, {0xc34c6000}, - {0xc34c8000}, {0xc34ca000}, {0xc34cc000}, {0xc34ce000}, - {0xc34d0000}, {0xc34d2000}, {0xc34d4000}, {0xc34d6000}, - {0xc34d8000}, {0xc34da000}, {0xc34dc000}, {0xc34de000}, - {0xc34e0000}, {0xc34e2000}, {0xc34e4000}, {0xc34e6000}, - {0xc34e8000}, {0xc34ea000}, {0xc34ec000}, {0xc34ee000}, - {0xc34f0000}, {0xc34f2000}, {0xc34f4000}, {0xc34f6000}, - {0xc34f8000}, {0xc34fa000}, {0xc34fc000}, {0xc34fe000}, - {0xc3500000}, {0xc3502000}, {0xc3504000}, {0xc3506000}, - {0xc3508000}, {0xc350a000}, {0xc350c000}, {0xc350e000}, - {0xc3510000}, {0xc3512000}, {0xc3514000}, {0xc3516000}, - {0xc3518000}, {0xc351a000}, {0xc351c000}, {0xc351e000}, - {0xc3520000}, {0xc3522000}, {0xc3524000}, {0xc3526000}, - {0xc3528000}, {0xc352a000}, {0xc352c000}, {0xc352e000}, - {0xc3530000}, {0xc3532000}, {0xc3534000}, {0xc3536000}, - {0xc3538000}, {0xc353a000}, {0xc353c000}, {0xc353e000}, - {0xc3540000}, {0xc3542000}, {0xc3544000}, {0xc3546000}, - {0xc3548000}, {0xc354a000}, {0xc354c000}, {0xc354e000}, - {0xc3550000}, {0xc3552000}, {0xc3554000}, {0xc3556000}, - {0xc3558000}, {0xc355a000}, {0xc355c000}, {0xc355e000}, - {0xc3560000}, {0xc3562000}, {0xc3564000}, {0xc3566000}, - {0xc3568000}, {0xc356a000}, {0xc356c000}, {0xc356e000}, - {0xc3570000}, {0xc3572000}, {0xc3574000}, {0xc3576000}, - {0xc3578000}, {0xc357a000}, {0xc357c000}, {0xc357e000}, - {0xc3580000}, {0xc3582000}, {0xc3584000}, {0xc3586000}, - {0xc3588000}, {0xc358a000}, {0xc358c000}, {0xc358e000}, - {0xc3590000}, {0xc3592000}, {0xc3594000}, {0xc3596000}, - {0xc3598000}, {0xc359a000}, {0xc359c000}, {0xc359e000}, - {0xc35a0000}, {0xc35a2000}, {0xc35a4000}, {0xc35a6000}, - {0xc35a8000}, {0xc35aa000}, {0xc35ac000}, {0xc35ae000}, - {0xc35b0000}, {0xc35b2000}, {0xc35b4000}, {0xc35b6000}, - {0xc35b8000}, {0xc35ba000}, {0xc35bc000}, {0xc35be000}, - {0xc35c0000}, {0xc35c2000}, {0xc35c4000}, {0xc35c6000}, - {0xc35c8000}, {0xc35ca000}, {0xc35cc000}, {0xc35ce000}, - {0xc35d0000}, {0xc35d2000}, {0xc35d4000}, {0xc35d6000}, - {0xc35d8000}, {0xc35da000}, {0xc35dc000}, {0xc35de000}, - {0xc35e0000}, {0xc35e2000}, {0xc35e4000}, {0xc35e6000}, - {0xc35e8000}, {0xc35ea000}, {0xc35ec000}, {0xc35ee000}, - {0xc35f0000}, {0xc35f2000}, {0xc35f4000}, {0xc35f6000}, - {0xc35f8000}, {0xc35fa000}, {0xc35fc000}, {0xc35fe000}, - {0xc3600000}, {0xc3602000}, {0xc3604000}, {0xc3606000}, - {0xc3608000}, {0xc360a000}, {0xc360c000}, {0xc360e000}, - {0xc3610000}, {0xc3612000}, {0xc3614000}, {0xc3616000}, - {0xc3618000}, {0xc361a000}, {0xc361c000}, {0xc361e000}, - {0xc3620000}, {0xc3622000}, {0xc3624000}, {0xc3626000}, - {0xc3628000}, {0xc362a000}, {0xc362c000}, {0xc362e000}, - {0xc3630000}, {0xc3632000}, {0xc3634000}, {0xc3636000}, - {0xc3638000}, {0xc363a000}, {0xc363c000}, {0xc363e000}, - {0xc3640000}, {0xc3642000}, {0xc3644000}, {0xc3646000}, - {0xc3648000}, {0xc364a000}, {0xc364c000}, {0xc364e000}, - {0xc3650000}, {0xc3652000}, {0xc3654000}, {0xc3656000}, - {0xc3658000}, {0xc365a000}, {0xc365c000}, {0xc365e000}, - {0xc3660000}, {0xc3662000}, {0xc3664000}, {0xc3666000}, - {0xc3668000}, {0xc366a000}, {0xc366c000}, {0xc366e000}, - {0xc3670000}, {0xc3672000}, {0xc3674000}, {0xc3676000}, - {0xc3678000}, {0xc367a000}, {0xc367c000}, {0xc367e000}, - {0xc3680000}, {0xc3682000}, {0xc3684000}, {0xc3686000}, - {0xc3688000}, {0xc368a000}, {0xc368c000}, {0xc368e000}, - {0xc3690000}, {0xc3692000}, {0xc3694000}, {0xc3696000}, - {0xc3698000}, {0xc369a000}, {0xc369c000}, {0xc369e000}, - {0xc36a0000}, {0xc36a2000}, {0xc36a4000}, {0xc36a6000}, - {0xc36a8000}, {0xc36aa000}, {0xc36ac000}, {0xc36ae000}, - {0xc36b0000}, {0xc36b2000}, {0xc36b4000}, {0xc36b6000}, - {0xc36b8000}, {0xc36ba000}, {0xc36bc000}, {0xc36be000}, - {0xc36c0000}, {0xc36c2000}, {0xc36c4000}, {0xc36c6000}, - {0xc36c8000}, {0xc36ca000}, {0xc36cc000}, {0xc36ce000}, - {0xc36d0000}, {0xc36d2000}, {0xc36d4000}, {0xc36d6000}, - {0xc36d8000}, {0xc36da000}, {0xc36dc000}, {0xc36de000}, - {0xc36e0000}, {0xc36e2000}, {0xc36e4000}, {0xc36e6000}, - {0xc36e8000}, {0xc36ea000}, {0xc36ec000}, {0xc36ee000}, - {0xc36f0000}, {0xc36f2000}, {0xc36f4000}, {0xc36f6000}, - {0xc36f8000}, {0xc36fa000}, {0xc36fc000}, {0xc36fe000}, - {0xc3700000}, {0xc3702000}, {0xc3704000}, {0xc3706000}, - {0xc3708000}, {0xc370a000}, {0xc370c000}, {0xc370e000}, - {0xc3710000}, {0xc3712000}, {0xc3714000}, {0xc3716000}, - {0xc3718000}, {0xc371a000}, {0xc371c000}, {0xc371e000}, - {0xc3720000}, {0xc3722000}, {0xc3724000}, {0xc3726000}, - {0xc3728000}, {0xc372a000}, {0xc372c000}, {0xc372e000}, - {0xc3730000}, {0xc3732000}, {0xc3734000}, {0xc3736000}, - {0xc3738000}, {0xc373a000}, {0xc373c000}, {0xc373e000}, - {0xc3740000}, {0xc3742000}, {0xc3744000}, {0xc3746000}, - {0xc3748000}, {0xc374a000}, {0xc374c000}, {0xc374e000}, - {0xc3750000}, {0xc3752000}, {0xc3754000}, {0xc3756000}, - {0xc3758000}, {0xc375a000}, {0xc375c000}, {0xc375e000}, - {0xc3760000}, {0xc3762000}, {0xc3764000}, {0xc3766000}, - {0xc3768000}, {0xc376a000}, {0xc376c000}, {0xc376e000}, - {0xc3770000}, {0xc3772000}, {0xc3774000}, {0xc3776000}, - {0xc3778000}, {0xc377a000}, {0xc377c000}, {0xc377e000}, - {0xc3780000}, {0xc3782000}, {0xc3784000}, {0xc3786000}, - {0xc3788000}, {0xc378a000}, {0xc378c000}, {0xc378e000}, - {0xc3790000}, {0xc3792000}, {0xc3794000}, {0xc3796000}, - {0xc3798000}, {0xc379a000}, {0xc379c000}, {0xc379e000}, - {0xc37a0000}, {0xc37a2000}, {0xc37a4000}, {0xc37a6000}, - {0xc37a8000}, {0xc37aa000}, {0xc37ac000}, {0xc37ae000}, - {0xc37b0000}, {0xc37b2000}, {0xc37b4000}, {0xc37b6000}, - {0xc37b8000}, {0xc37ba000}, {0xc37bc000}, {0xc37be000}, - {0xc37c0000}, {0xc37c2000}, {0xc37c4000}, {0xc37c6000}, - {0xc37c8000}, {0xc37ca000}, {0xc37cc000}, {0xc37ce000}, - {0xc37d0000}, {0xc37d2000}, {0xc37d4000}, {0xc37d6000}, - {0xc37d8000}, {0xc37da000}, {0xc37dc000}, {0xc37de000}, - {0xc37e0000}, {0xc37e2000}, {0xc37e4000}, {0xc37e6000}, - {0xc37e8000}, {0xc37ea000}, {0xc37ec000}, {0xc37ee000}, - {0xc37f0000}, {0xc37f2000}, {0xc37f4000}, {0xc37f6000}, - {0xc37f8000}, {0xc37fa000}, {0xc37fc000}, {0xc37fe000}, - {0xc3800000}, {0xc3802000}, {0xc3804000}, {0xc3806000}, - {0xc3808000}, {0xc380a000}, {0xc380c000}, {0xc380e000}, - {0xc3810000}, {0xc3812000}, {0xc3814000}, {0xc3816000}, - {0xc3818000}, {0xc381a000}, {0xc381c000}, {0xc381e000}, - {0xc3820000}, {0xc3822000}, {0xc3824000}, {0xc3826000}, - {0xc3828000}, {0xc382a000}, {0xc382c000}, {0xc382e000}, - {0xc3830000}, {0xc3832000}, {0xc3834000}, {0xc3836000}, - {0xc3838000}, {0xc383a000}, {0xc383c000}, {0xc383e000}, - {0xc3840000}, {0xc3842000}, {0xc3844000}, {0xc3846000}, - {0xc3848000}, {0xc384a000}, {0xc384c000}, {0xc384e000}, - {0xc3850000}, {0xc3852000}, {0xc3854000}, {0xc3856000}, - {0xc3858000}, {0xc385a000}, {0xc385c000}, {0xc385e000}, - {0xc3860000}, {0xc3862000}, {0xc3864000}, {0xc3866000}, - {0xc3868000}, {0xc386a000}, {0xc386c000}, {0xc386e000}, - {0xc3870000}, {0xc3872000}, {0xc3874000}, {0xc3876000}, - {0xc3878000}, {0xc387a000}, {0xc387c000}, {0xc387e000}, - {0xc3880000}, {0xc3882000}, {0xc3884000}, {0xc3886000}, - {0xc3888000}, {0xc388a000}, {0xc388c000}, {0xc388e000}, - {0xc3890000}, {0xc3892000}, {0xc3894000}, {0xc3896000}, - {0xc3898000}, {0xc389a000}, {0xc389c000}, {0xc389e000}, - {0xc38a0000}, {0xc38a2000}, {0xc38a4000}, {0xc38a6000}, - {0xc38a8000}, {0xc38aa000}, {0xc38ac000}, {0xc38ae000}, - {0xc38b0000}, {0xc38b2000}, {0xc38b4000}, {0xc38b6000}, - {0xc38b8000}, {0xc38ba000}, {0xc38bc000}, {0xc38be000}, - {0xc38c0000}, {0xc38c2000}, {0xc38c4000}, {0xc38c6000}, - {0xc38c8000}, {0xc38ca000}, {0xc38cc000}, {0xc38ce000}, - {0xc38d0000}, {0xc38d2000}, {0xc38d4000}, {0xc38d6000}, - {0xc38d8000}, {0xc38da000}, {0xc38dc000}, {0xc38de000}, - {0xc38e0000}, {0xc38e2000}, {0xc38e4000}, {0xc38e6000}, - {0xc38e8000}, {0xc38ea000}, {0xc38ec000}, {0xc38ee000}, - {0xc38f0000}, {0xc38f2000}, {0xc38f4000}, {0xc38f6000}, - {0xc38f8000}, {0xc38fa000}, {0xc38fc000}, {0xc38fe000}, - {0xc3900000}, {0xc3902000}, {0xc3904000}, {0xc3906000}, - {0xc3908000}, {0xc390a000}, {0xc390c000}, {0xc390e000}, - {0xc3910000}, {0xc3912000}, {0xc3914000}, {0xc3916000}, - {0xc3918000}, {0xc391a000}, {0xc391c000}, {0xc391e000}, - {0xc3920000}, {0xc3922000}, {0xc3924000}, {0xc3926000}, - {0xc3928000}, {0xc392a000}, {0xc392c000}, {0xc392e000}, - {0xc3930000}, {0xc3932000}, {0xc3934000}, {0xc3936000}, - {0xc3938000}, {0xc393a000}, {0xc393c000}, {0xc393e000}, - {0xc3940000}, {0xc3942000}, {0xc3944000}, {0xc3946000}, - {0xc3948000}, {0xc394a000}, {0xc394c000}, {0xc394e000}, - {0xc3950000}, {0xc3952000}, {0xc3954000}, {0xc3956000}, - {0xc3958000}, {0xc395a000}, {0xc395c000}, {0xc395e000}, - {0xc3960000}, {0xc3962000}, {0xc3964000}, {0xc3966000}, - {0xc3968000}, {0xc396a000}, {0xc396c000}, {0xc396e000}, - {0xc3970000}, {0xc3972000}, {0xc3974000}, {0xc3976000}, - {0xc3978000}, {0xc397a000}, {0xc397c000}, {0xc397e000}, - {0xc3980000}, {0xc3982000}, {0xc3984000}, {0xc3986000}, - {0xc3988000}, {0xc398a000}, {0xc398c000}, {0xc398e000}, - {0xc3990000}, {0xc3992000}, {0xc3994000}, {0xc3996000}, - {0xc3998000}, {0xc399a000}, {0xc399c000}, {0xc399e000}, - {0xc39a0000}, {0xc39a2000}, {0xc39a4000}, {0xc39a6000}, - {0xc39a8000}, {0xc39aa000}, {0xc39ac000}, {0xc39ae000}, - {0xc39b0000}, {0xc39b2000}, {0xc39b4000}, {0xc39b6000}, - {0xc39b8000}, {0xc39ba000}, {0xc39bc000}, {0xc39be000}, - {0xc39c0000}, {0xc39c2000}, {0xc39c4000}, {0xc39c6000}, - {0xc39c8000}, {0xc39ca000}, {0xc39cc000}, {0xc39ce000}, - {0xc39d0000}, {0xc39d2000}, {0xc39d4000}, {0xc39d6000}, - {0xc39d8000}, {0xc39da000}, {0xc39dc000}, {0xc39de000}, - {0xc39e0000}, {0xc39e2000}, {0xc39e4000}, {0xc39e6000}, - {0xc39e8000}, {0xc39ea000}, {0xc39ec000}, {0xc39ee000}, - {0xc39f0000}, {0xc39f2000}, {0xc39f4000}, {0xc39f6000}, - {0xc39f8000}, {0xc39fa000}, {0xc39fc000}, {0xc39fe000}, - {0xc3a00000}, {0xc3a02000}, {0xc3a04000}, {0xc3a06000}, - {0xc3a08000}, {0xc3a0a000}, {0xc3a0c000}, {0xc3a0e000}, - {0xc3a10000}, {0xc3a12000}, {0xc3a14000}, {0xc3a16000}, - {0xc3a18000}, {0xc3a1a000}, {0xc3a1c000}, {0xc3a1e000}, - {0xc3a20000}, {0xc3a22000}, {0xc3a24000}, {0xc3a26000}, - {0xc3a28000}, {0xc3a2a000}, {0xc3a2c000}, {0xc3a2e000}, - {0xc3a30000}, {0xc3a32000}, {0xc3a34000}, {0xc3a36000}, - {0xc3a38000}, {0xc3a3a000}, {0xc3a3c000}, {0xc3a3e000}, - {0xc3a40000}, {0xc3a42000}, {0xc3a44000}, {0xc3a46000}, - {0xc3a48000}, {0xc3a4a000}, {0xc3a4c000}, {0xc3a4e000}, - {0xc3a50000}, {0xc3a52000}, {0xc3a54000}, {0xc3a56000}, - {0xc3a58000}, {0xc3a5a000}, {0xc3a5c000}, {0xc3a5e000}, - {0xc3a60000}, {0xc3a62000}, {0xc3a64000}, {0xc3a66000}, - {0xc3a68000}, {0xc3a6a000}, {0xc3a6c000}, {0xc3a6e000}, - {0xc3a70000}, {0xc3a72000}, {0xc3a74000}, {0xc3a76000}, - {0xc3a78000}, {0xc3a7a000}, {0xc3a7c000}, {0xc3a7e000}, - {0xc3a80000}, {0xc3a82000}, {0xc3a84000}, {0xc3a86000}, - {0xc3a88000}, {0xc3a8a000}, {0xc3a8c000}, {0xc3a8e000}, - {0xc3a90000}, {0xc3a92000}, {0xc3a94000}, {0xc3a96000}, - {0xc3a98000}, {0xc3a9a000}, {0xc3a9c000}, {0xc3a9e000}, - {0xc3aa0000}, {0xc3aa2000}, {0xc3aa4000}, {0xc3aa6000}, - {0xc3aa8000}, {0xc3aaa000}, {0xc3aac000}, {0xc3aae000}, - {0xc3ab0000}, {0xc3ab2000}, {0xc3ab4000}, {0xc3ab6000}, - {0xc3ab8000}, {0xc3aba000}, {0xc3abc000}, {0xc3abe000}, - {0xc3ac0000}, {0xc3ac2000}, {0xc3ac4000}, {0xc3ac6000}, - {0xc3ac8000}, {0xc3aca000}, {0xc3acc000}, {0xc3ace000}, - {0xc3ad0000}, {0xc3ad2000}, {0xc3ad4000}, {0xc3ad6000}, - {0xc3ad8000}, {0xc3ada000}, {0xc3adc000}, {0xc3ade000}, - {0xc3ae0000}, {0xc3ae2000}, {0xc3ae4000}, {0xc3ae6000}, - {0xc3ae8000}, {0xc3aea000}, {0xc3aec000}, {0xc3aee000}, - {0xc3af0000}, {0xc3af2000}, {0xc3af4000}, {0xc3af6000}, - {0xc3af8000}, {0xc3afa000}, {0xc3afc000}, {0xc3afe000}, - {0xc3b00000}, {0xc3b02000}, {0xc3b04000}, {0xc3b06000}, - {0xc3b08000}, {0xc3b0a000}, {0xc3b0c000}, {0xc3b0e000}, - {0xc3b10000}, {0xc3b12000}, {0xc3b14000}, {0xc3b16000}, - {0xc3b18000}, {0xc3b1a000}, {0xc3b1c000}, {0xc3b1e000}, - {0xc3b20000}, {0xc3b22000}, {0xc3b24000}, {0xc3b26000}, - {0xc3b28000}, {0xc3b2a000}, {0xc3b2c000}, {0xc3b2e000}, - {0xc3b30000}, {0xc3b32000}, {0xc3b34000}, {0xc3b36000}, - {0xc3b38000}, {0xc3b3a000}, {0xc3b3c000}, {0xc3b3e000}, - {0xc3b40000}, {0xc3b42000}, {0xc3b44000}, {0xc3b46000}, - {0xc3b48000}, {0xc3b4a000}, {0xc3b4c000}, {0xc3b4e000}, - {0xc3b50000}, {0xc3b52000}, {0xc3b54000}, {0xc3b56000}, - {0xc3b58000}, {0xc3b5a000}, {0xc3b5c000}, {0xc3b5e000}, - {0xc3b60000}, {0xc3b62000}, {0xc3b64000}, {0xc3b66000}, - {0xc3b68000}, {0xc3b6a000}, {0xc3b6c000}, {0xc3b6e000}, - {0xc3b70000}, {0xc3b72000}, {0xc3b74000}, {0xc3b76000}, - {0xc3b78000}, {0xc3b7a000}, {0xc3b7c000}, {0xc3b7e000}, - {0xc3b80000}, {0xc3b82000}, {0xc3b84000}, {0xc3b86000}, - {0xc3b88000}, {0xc3b8a000}, {0xc3b8c000}, {0xc3b8e000}, - {0xc3b90000}, {0xc3b92000}, {0xc3b94000}, {0xc3b96000}, - {0xc3b98000}, {0xc3b9a000}, {0xc3b9c000}, {0xc3b9e000}, - {0xc3ba0000}, {0xc3ba2000}, {0xc3ba4000}, {0xc3ba6000}, - {0xc3ba8000}, {0xc3baa000}, {0xc3bac000}, {0xc3bae000}, - {0xc3bb0000}, {0xc3bb2000}, {0xc3bb4000}, {0xc3bb6000}, - {0xc3bb8000}, {0xc3bba000}, {0xc3bbc000}, {0xc3bbe000}, - {0xc3bc0000}, {0xc3bc2000}, {0xc3bc4000}, {0xc3bc6000}, - {0xc3bc8000}, {0xc3bca000}, {0xc3bcc000}, {0xc3bce000}, - {0xc3bd0000}, {0xc3bd2000}, {0xc3bd4000}, {0xc3bd6000}, - {0xc3bd8000}, {0xc3bda000}, {0xc3bdc000}, {0xc3bde000}, - {0xc3be0000}, {0xc3be2000}, {0xc3be4000}, {0xc3be6000}, - {0xc3be8000}, {0xc3bea000}, {0xc3bec000}, {0xc3bee000}, - {0xc3bf0000}, {0xc3bf2000}, {0xc3bf4000}, {0xc3bf6000}, - {0xc3bf8000}, {0xc3bfa000}, {0xc3bfc000}, {0xc3bfe000}, - {0xc3c00000}, {0xc3c02000}, {0xc3c04000}, {0xc3c06000}, - {0xc3c08000}, {0xc3c0a000}, {0xc3c0c000}, {0xc3c0e000}, - {0xc3c10000}, {0xc3c12000}, {0xc3c14000}, {0xc3c16000}, - {0xc3c18000}, {0xc3c1a000}, {0xc3c1c000}, {0xc3c1e000}, - {0xc3c20000}, {0xc3c22000}, {0xc3c24000}, {0xc3c26000}, - {0xc3c28000}, {0xc3c2a000}, {0xc3c2c000}, {0xc3c2e000}, - {0xc3c30000}, {0xc3c32000}, {0xc3c34000}, {0xc3c36000}, - {0xc3c38000}, {0xc3c3a000}, {0xc3c3c000}, {0xc3c3e000}, - {0xc3c40000}, {0xc3c42000}, {0xc3c44000}, {0xc3c46000}, - {0xc3c48000}, {0xc3c4a000}, {0xc3c4c000}, {0xc3c4e000}, - {0xc3c50000}, {0xc3c52000}, {0xc3c54000}, {0xc3c56000}, - {0xc3c58000}, {0xc3c5a000}, {0xc3c5c000}, {0xc3c5e000}, - {0xc3c60000}, {0xc3c62000}, {0xc3c64000}, {0xc3c66000}, - {0xc3c68000}, {0xc3c6a000}, {0xc3c6c000}, {0xc3c6e000}, - {0xc3c70000}, {0xc3c72000}, {0xc3c74000}, {0xc3c76000}, - {0xc3c78000}, {0xc3c7a000}, {0xc3c7c000}, {0xc3c7e000}, - {0xc3c80000}, {0xc3c82000}, {0xc3c84000}, {0xc3c86000}, - {0xc3c88000}, {0xc3c8a000}, {0xc3c8c000}, {0xc3c8e000}, - {0xc3c90000}, {0xc3c92000}, {0xc3c94000}, {0xc3c96000}, - {0xc3c98000}, {0xc3c9a000}, {0xc3c9c000}, {0xc3c9e000}, - {0xc3ca0000}, {0xc3ca2000}, {0xc3ca4000}, {0xc3ca6000}, - {0xc3ca8000}, {0xc3caa000}, {0xc3cac000}, {0xc3cae000}, - {0xc3cb0000}, {0xc3cb2000}, {0xc3cb4000}, {0xc3cb6000}, - {0xc3cb8000}, {0xc3cba000}, {0xc3cbc000}, {0xc3cbe000}, - {0xc3cc0000}, {0xc3cc2000}, {0xc3cc4000}, {0xc3cc6000}, - {0xc3cc8000}, {0xc3cca000}, {0xc3ccc000}, {0xc3cce000}, - {0xc3cd0000}, {0xc3cd2000}, {0xc3cd4000}, {0xc3cd6000}, - {0xc3cd8000}, {0xc3cda000}, {0xc3cdc000}, {0xc3cde000}, - {0xc3ce0000}, {0xc3ce2000}, {0xc3ce4000}, {0xc3ce6000}, - {0xc3ce8000}, {0xc3cea000}, {0xc3cec000}, {0xc3cee000}, - {0xc3cf0000}, {0xc3cf2000}, {0xc3cf4000}, {0xc3cf6000}, - {0xc3cf8000}, {0xc3cfa000}, {0xc3cfc000}, {0xc3cfe000}, - {0xc3d00000}, {0xc3d02000}, {0xc3d04000}, {0xc3d06000}, - {0xc3d08000}, {0xc3d0a000}, {0xc3d0c000}, {0xc3d0e000}, - {0xc3d10000}, {0xc3d12000}, {0xc3d14000}, {0xc3d16000}, - {0xc3d18000}, {0xc3d1a000}, {0xc3d1c000}, {0xc3d1e000}, - {0xc3d20000}, {0xc3d22000}, {0xc3d24000}, {0xc3d26000}, - {0xc3d28000}, {0xc3d2a000}, {0xc3d2c000}, {0xc3d2e000}, - {0xc3d30000}, {0xc3d32000}, {0xc3d34000}, {0xc3d36000}, - {0xc3d38000}, {0xc3d3a000}, {0xc3d3c000}, {0xc3d3e000}, - {0xc3d40000}, {0xc3d42000}, {0xc3d44000}, {0xc3d46000}, - {0xc3d48000}, {0xc3d4a000}, {0xc3d4c000}, {0xc3d4e000}, - {0xc3d50000}, {0xc3d52000}, {0xc3d54000}, {0xc3d56000}, - {0xc3d58000}, {0xc3d5a000}, {0xc3d5c000}, {0xc3d5e000}, - {0xc3d60000}, {0xc3d62000}, {0xc3d64000}, {0xc3d66000}, - {0xc3d68000}, {0xc3d6a000}, {0xc3d6c000}, {0xc3d6e000}, - {0xc3d70000}, {0xc3d72000}, {0xc3d74000}, {0xc3d76000}, - {0xc3d78000}, {0xc3d7a000}, {0xc3d7c000}, {0xc3d7e000}, - {0xc3d80000}, {0xc3d82000}, {0xc3d84000}, {0xc3d86000}, - {0xc3d88000}, {0xc3d8a000}, {0xc3d8c000}, {0xc3d8e000}, - {0xc3d90000}, {0xc3d92000}, {0xc3d94000}, {0xc3d96000}, - {0xc3d98000}, {0xc3d9a000}, {0xc3d9c000}, {0xc3d9e000}, - {0xc3da0000}, {0xc3da2000}, {0xc3da4000}, {0xc3da6000}, - {0xc3da8000}, {0xc3daa000}, {0xc3dac000}, {0xc3dae000}, - {0xc3db0000}, {0xc3db2000}, {0xc3db4000}, {0xc3db6000}, - {0xc3db8000}, {0xc3dba000}, {0xc3dbc000}, {0xc3dbe000}, - {0xc3dc0000}, {0xc3dc2000}, {0xc3dc4000}, {0xc3dc6000}, - {0xc3dc8000}, {0xc3dca000}, {0xc3dcc000}, {0xc3dce000}, - {0xc3dd0000}, {0xc3dd2000}, {0xc3dd4000}, {0xc3dd6000}, - {0xc3dd8000}, {0xc3dda000}, {0xc3ddc000}, {0xc3dde000}, - {0xc3de0000}, {0xc3de2000}, {0xc3de4000}, {0xc3de6000}, - {0xc3de8000}, {0xc3dea000}, {0xc3dec000}, {0xc3dee000}, - {0xc3df0000}, {0xc3df2000}, {0xc3df4000}, {0xc3df6000}, - {0xc3df8000}, {0xc3dfa000}, {0xc3dfc000}, {0xc3dfe000}, - {0xc3e00000}, {0xc3e02000}, {0xc3e04000}, {0xc3e06000}, - {0xc3e08000}, {0xc3e0a000}, {0xc3e0c000}, {0xc3e0e000}, - {0xc3e10000}, {0xc3e12000}, {0xc3e14000}, {0xc3e16000}, - {0xc3e18000}, {0xc3e1a000}, {0xc3e1c000}, {0xc3e1e000}, - {0xc3e20000}, {0xc3e22000}, {0xc3e24000}, {0xc3e26000}, - {0xc3e28000}, {0xc3e2a000}, {0xc3e2c000}, {0xc3e2e000}, - {0xc3e30000}, {0xc3e32000}, {0xc3e34000}, {0xc3e36000}, - {0xc3e38000}, {0xc3e3a000}, {0xc3e3c000}, {0xc3e3e000}, - {0xc3e40000}, {0xc3e42000}, {0xc3e44000}, {0xc3e46000}, - {0xc3e48000}, {0xc3e4a000}, {0xc3e4c000}, {0xc3e4e000}, - {0xc3e50000}, {0xc3e52000}, {0xc3e54000}, {0xc3e56000}, - {0xc3e58000}, {0xc3e5a000}, {0xc3e5c000}, {0xc3e5e000}, - {0xc3e60000}, {0xc3e62000}, {0xc3e64000}, {0xc3e66000}, - {0xc3e68000}, {0xc3e6a000}, {0xc3e6c000}, {0xc3e6e000}, - {0xc3e70000}, {0xc3e72000}, {0xc3e74000}, {0xc3e76000}, - {0xc3e78000}, {0xc3e7a000}, {0xc3e7c000}, {0xc3e7e000}, - {0xc3e80000}, {0xc3e82000}, {0xc3e84000}, {0xc3e86000}, - {0xc3e88000}, {0xc3e8a000}, {0xc3e8c000}, {0xc3e8e000}, - {0xc3e90000}, {0xc3e92000}, {0xc3e94000}, {0xc3e96000}, - {0xc3e98000}, {0xc3e9a000}, {0xc3e9c000}, {0xc3e9e000}, - {0xc3ea0000}, {0xc3ea2000}, {0xc3ea4000}, {0xc3ea6000}, - {0xc3ea8000}, {0xc3eaa000}, {0xc3eac000}, {0xc3eae000}, - {0xc3eb0000}, {0xc3eb2000}, {0xc3eb4000}, {0xc3eb6000}, - {0xc3eb8000}, {0xc3eba000}, {0xc3ebc000}, {0xc3ebe000}, - {0xc3ec0000}, {0xc3ec2000}, {0xc3ec4000}, {0xc3ec6000}, - {0xc3ec8000}, {0xc3eca000}, {0xc3ecc000}, {0xc3ece000}, - {0xc3ed0000}, {0xc3ed2000}, {0xc3ed4000}, {0xc3ed6000}, - {0xc3ed8000}, {0xc3eda000}, {0xc3edc000}, {0xc3ede000}, - {0xc3ee0000}, {0xc3ee2000}, {0xc3ee4000}, {0xc3ee6000}, - {0xc3ee8000}, {0xc3eea000}, {0xc3eec000}, {0xc3eee000}, - {0xc3ef0000}, {0xc3ef2000}, {0xc3ef4000}, {0xc3ef6000}, - {0xc3ef8000}, {0xc3efa000}, {0xc3efc000}, {0xc3efe000}, - {0xc3f00000}, {0xc3f02000}, {0xc3f04000}, {0xc3f06000}, - {0xc3f08000}, {0xc3f0a000}, {0xc3f0c000}, {0xc3f0e000}, - {0xc3f10000}, {0xc3f12000}, {0xc3f14000}, {0xc3f16000}, - {0xc3f18000}, {0xc3f1a000}, {0xc3f1c000}, {0xc3f1e000}, - {0xc3f20000}, {0xc3f22000}, {0xc3f24000}, {0xc3f26000}, - {0xc3f28000}, {0xc3f2a000}, {0xc3f2c000}, {0xc3f2e000}, - {0xc3f30000}, {0xc3f32000}, {0xc3f34000}, {0xc3f36000}, - {0xc3f38000}, {0xc3f3a000}, {0xc3f3c000}, {0xc3f3e000}, - {0xc3f40000}, {0xc3f42000}, {0xc3f44000}, {0xc3f46000}, - {0xc3f48000}, {0xc3f4a000}, {0xc3f4c000}, {0xc3f4e000}, - {0xc3f50000}, {0xc3f52000}, {0xc3f54000}, {0xc3f56000}, - {0xc3f58000}, {0xc3f5a000}, {0xc3f5c000}, {0xc3f5e000}, - {0xc3f60000}, {0xc3f62000}, {0xc3f64000}, {0xc3f66000}, - {0xc3f68000}, {0xc3f6a000}, {0xc3f6c000}, {0xc3f6e000}, - {0xc3f70000}, {0xc3f72000}, {0xc3f74000}, {0xc3f76000}, - {0xc3f78000}, {0xc3f7a000}, {0xc3f7c000}, {0xc3f7e000}, - {0xc3f80000}, {0xc3f82000}, {0xc3f84000}, {0xc3f86000}, - {0xc3f88000}, {0xc3f8a000}, {0xc3f8c000}, {0xc3f8e000}, - {0xc3f90000}, {0xc3f92000}, {0xc3f94000}, {0xc3f96000}, - {0xc3f98000}, {0xc3f9a000}, {0xc3f9c000}, {0xc3f9e000}, - {0xc3fa0000}, {0xc3fa2000}, {0xc3fa4000}, {0xc3fa6000}, - {0xc3fa8000}, {0xc3faa000}, {0xc3fac000}, {0xc3fae000}, - {0xc3fb0000}, {0xc3fb2000}, {0xc3fb4000}, {0xc3fb6000}, - {0xc3fb8000}, {0xc3fba000}, {0xc3fbc000}, {0xc3fbe000}, - {0xc3fc0000}, {0xc3fc2000}, {0xc3fc4000}, {0xc3fc6000}, - {0xc3fc8000}, {0xc3fca000}, {0xc3fcc000}, {0xc3fce000}, - {0xc3fd0000}, {0xc3fd2000}, {0xc3fd4000}, {0xc3fd6000}, - {0xc3fd8000}, {0xc3fda000}, {0xc3fdc000}, {0xc3fde000}, - {0xc3fe0000}, {0xc3fe2000}, {0xc3fe4000}, {0xc3fe6000}, - {0xc3fe8000}, {0xc3fea000}, {0xc3fec000}, {0xc3fee000}, - {0xc3ff0000}, {0xc3ff2000}, {0xc3ff4000}, {0xc3ff6000}, - {0xc3ff8000}, {0xc3ffa000}, {0xc3ffc000}, {0xc3ffe000}, - {0xc4000000}, {0xc4002000}, {0xc4004000}, {0xc4006000}, - {0xc4008000}, {0xc400a000}, {0xc400c000}, {0xc400e000}, - {0xc4010000}, {0xc4012000}, {0xc4014000}, {0xc4016000}, - {0xc4018000}, {0xc401a000}, {0xc401c000}, {0xc401e000}, - {0xc4020000}, {0xc4022000}, {0xc4024000}, {0xc4026000}, - {0xc4028000}, {0xc402a000}, {0xc402c000}, {0xc402e000}, - {0xc4030000}, {0xc4032000}, {0xc4034000}, {0xc4036000}, - {0xc4038000}, {0xc403a000}, {0xc403c000}, {0xc403e000}, - {0xc4040000}, {0xc4042000}, {0xc4044000}, {0xc4046000}, - {0xc4048000}, {0xc404a000}, {0xc404c000}, {0xc404e000}, - {0xc4050000}, {0xc4052000}, {0xc4054000}, {0xc4056000}, - {0xc4058000}, {0xc405a000}, {0xc405c000}, {0xc405e000}, - {0xc4060000}, {0xc4062000}, {0xc4064000}, {0xc4066000}, - {0xc4068000}, {0xc406a000}, {0xc406c000}, {0xc406e000}, - {0xc4070000}, {0xc4072000}, {0xc4074000}, {0xc4076000}, - {0xc4078000}, {0xc407a000}, {0xc407c000}, {0xc407e000}, - {0xc4080000}, {0xc4082000}, {0xc4084000}, {0xc4086000}, - {0xc4088000}, {0xc408a000}, {0xc408c000}, {0xc408e000}, - {0xc4090000}, {0xc4092000}, {0xc4094000}, {0xc4096000}, - {0xc4098000}, {0xc409a000}, {0xc409c000}, {0xc409e000}, - {0xc40a0000}, {0xc40a2000}, {0xc40a4000}, {0xc40a6000}, - {0xc40a8000}, {0xc40aa000}, {0xc40ac000}, {0xc40ae000}, - {0xc40b0000}, {0xc40b2000}, {0xc40b4000}, {0xc40b6000}, - {0xc40b8000}, {0xc40ba000}, {0xc40bc000}, {0xc40be000}, - {0xc40c0000}, {0xc40c2000}, {0xc40c4000}, {0xc40c6000}, - {0xc40c8000}, {0xc40ca000}, {0xc40cc000}, {0xc40ce000}, - {0xc40d0000}, {0xc40d2000}, {0xc40d4000}, {0xc40d6000}, - {0xc40d8000}, {0xc40da000}, {0xc40dc000}, {0xc40de000}, - {0xc40e0000}, {0xc40e2000}, {0xc40e4000}, {0xc40e6000}, - {0xc40e8000}, {0xc40ea000}, {0xc40ec000}, {0xc40ee000}, - {0xc40f0000}, {0xc40f2000}, {0xc40f4000}, {0xc40f6000}, - {0xc40f8000}, {0xc40fa000}, {0xc40fc000}, {0xc40fe000}, - {0xc4100000}, {0xc4102000}, {0xc4104000}, {0xc4106000}, - {0xc4108000}, {0xc410a000}, {0xc410c000}, {0xc410e000}, - {0xc4110000}, {0xc4112000}, {0xc4114000}, {0xc4116000}, - {0xc4118000}, {0xc411a000}, {0xc411c000}, {0xc411e000}, - {0xc4120000}, {0xc4122000}, {0xc4124000}, {0xc4126000}, - {0xc4128000}, {0xc412a000}, {0xc412c000}, {0xc412e000}, - {0xc4130000}, {0xc4132000}, {0xc4134000}, {0xc4136000}, - {0xc4138000}, {0xc413a000}, {0xc413c000}, {0xc413e000}, - {0xc4140000}, {0xc4142000}, {0xc4144000}, {0xc4146000}, - {0xc4148000}, {0xc414a000}, {0xc414c000}, {0xc414e000}, - {0xc4150000}, {0xc4152000}, {0xc4154000}, {0xc4156000}, - {0xc4158000}, {0xc415a000}, {0xc415c000}, {0xc415e000}, - {0xc4160000}, {0xc4162000}, {0xc4164000}, {0xc4166000}, - {0xc4168000}, {0xc416a000}, {0xc416c000}, {0xc416e000}, - {0xc4170000}, {0xc4172000}, {0xc4174000}, {0xc4176000}, - {0xc4178000}, {0xc417a000}, {0xc417c000}, {0xc417e000}, - {0xc4180000}, {0xc4182000}, {0xc4184000}, {0xc4186000}, - {0xc4188000}, {0xc418a000}, {0xc418c000}, {0xc418e000}, - {0xc4190000}, {0xc4192000}, {0xc4194000}, {0xc4196000}, - {0xc4198000}, {0xc419a000}, {0xc419c000}, {0xc419e000}, - {0xc41a0000}, {0xc41a2000}, {0xc41a4000}, {0xc41a6000}, - {0xc41a8000}, {0xc41aa000}, {0xc41ac000}, {0xc41ae000}, - {0xc41b0000}, {0xc41b2000}, {0xc41b4000}, {0xc41b6000}, - {0xc41b8000}, {0xc41ba000}, {0xc41bc000}, {0xc41be000}, - {0xc41c0000}, {0xc41c2000}, {0xc41c4000}, {0xc41c6000}, - {0xc41c8000}, {0xc41ca000}, {0xc41cc000}, {0xc41ce000}, - {0xc41d0000}, {0xc41d2000}, {0xc41d4000}, {0xc41d6000}, - {0xc41d8000}, {0xc41da000}, {0xc41dc000}, {0xc41de000}, - {0xc41e0000}, {0xc41e2000}, {0xc41e4000}, {0xc41e6000}, - {0xc41e8000}, {0xc41ea000}, {0xc41ec000}, {0xc41ee000}, - {0xc41f0000}, {0xc41f2000}, {0xc41f4000}, {0xc41f6000}, - {0xc41f8000}, {0xc41fa000}, {0xc41fc000}, {0xc41fe000}, - {0xc4200000}, {0xc4202000}, {0xc4204000}, {0xc4206000}, - {0xc4208000}, {0xc420a000}, {0xc420c000}, {0xc420e000}, - {0xc4210000}, {0xc4212000}, {0xc4214000}, {0xc4216000}, - {0xc4218000}, {0xc421a000}, {0xc421c000}, {0xc421e000}, - {0xc4220000}, {0xc4222000}, {0xc4224000}, {0xc4226000}, - {0xc4228000}, {0xc422a000}, {0xc422c000}, {0xc422e000}, - {0xc4230000}, {0xc4232000}, {0xc4234000}, {0xc4236000}, - {0xc4238000}, {0xc423a000}, {0xc423c000}, {0xc423e000}, - {0xc4240000}, {0xc4242000}, {0xc4244000}, {0xc4246000}, - {0xc4248000}, {0xc424a000}, {0xc424c000}, {0xc424e000}, - {0xc4250000}, {0xc4252000}, {0xc4254000}, {0xc4256000}, - {0xc4258000}, {0xc425a000}, {0xc425c000}, {0xc425e000}, - {0xc4260000}, {0xc4262000}, {0xc4264000}, {0xc4266000}, - {0xc4268000}, {0xc426a000}, {0xc426c000}, {0xc426e000}, - {0xc4270000}, {0xc4272000}, {0xc4274000}, {0xc4276000}, - {0xc4278000}, {0xc427a000}, {0xc427c000}, {0xc427e000}, - {0xc4280000}, {0xc4282000}, {0xc4284000}, {0xc4286000}, - {0xc4288000}, {0xc428a000}, {0xc428c000}, {0xc428e000}, - {0xc4290000}, {0xc4292000}, {0xc4294000}, {0xc4296000}, - {0xc4298000}, {0xc429a000}, {0xc429c000}, {0xc429e000}, - {0xc42a0000}, {0xc42a2000}, {0xc42a4000}, {0xc42a6000}, - {0xc42a8000}, {0xc42aa000}, {0xc42ac000}, {0xc42ae000}, - {0xc42b0000}, {0xc42b2000}, {0xc42b4000}, {0xc42b6000}, - {0xc42b8000}, {0xc42ba000}, {0xc42bc000}, {0xc42be000}, - {0xc42c0000}, {0xc42c2000}, {0xc42c4000}, {0xc42c6000}, - {0xc42c8000}, {0xc42ca000}, {0xc42cc000}, {0xc42ce000}, - {0xc42d0000}, {0xc42d2000}, {0xc42d4000}, {0xc42d6000}, - {0xc42d8000}, {0xc42da000}, {0xc42dc000}, {0xc42de000}, - {0xc42e0000}, {0xc42e2000}, {0xc42e4000}, {0xc42e6000}, - {0xc42e8000}, {0xc42ea000}, {0xc42ec000}, {0xc42ee000}, - {0xc42f0000}, {0xc42f2000}, {0xc42f4000}, {0xc42f6000}, - {0xc42f8000}, {0xc42fa000}, {0xc42fc000}, {0xc42fe000}, - {0xc4300000}, {0xc4302000}, {0xc4304000}, {0xc4306000}, - {0xc4308000}, {0xc430a000}, {0xc430c000}, {0xc430e000}, - {0xc4310000}, {0xc4312000}, {0xc4314000}, {0xc4316000}, - {0xc4318000}, {0xc431a000}, {0xc431c000}, {0xc431e000}, - {0xc4320000}, {0xc4322000}, {0xc4324000}, {0xc4326000}, - {0xc4328000}, {0xc432a000}, {0xc432c000}, {0xc432e000}, - {0xc4330000}, {0xc4332000}, {0xc4334000}, {0xc4336000}, - {0xc4338000}, {0xc433a000}, {0xc433c000}, {0xc433e000}, - {0xc4340000}, {0xc4342000}, {0xc4344000}, {0xc4346000}, - {0xc4348000}, {0xc434a000}, {0xc434c000}, {0xc434e000}, - {0xc4350000}, {0xc4352000}, {0xc4354000}, {0xc4356000}, - {0xc4358000}, {0xc435a000}, {0xc435c000}, {0xc435e000}, - {0xc4360000}, {0xc4362000}, {0xc4364000}, {0xc4366000}, - {0xc4368000}, {0xc436a000}, {0xc436c000}, {0xc436e000}, - {0xc4370000}, {0xc4372000}, {0xc4374000}, {0xc4376000}, - {0xc4378000}, {0xc437a000}, {0xc437c000}, {0xc437e000}, - {0xc4380000}, {0xc4382000}, {0xc4384000}, {0xc4386000}, - {0xc4388000}, {0xc438a000}, {0xc438c000}, {0xc438e000}, - {0xc4390000}, {0xc4392000}, {0xc4394000}, {0xc4396000}, - {0xc4398000}, {0xc439a000}, {0xc439c000}, {0xc439e000}, - {0xc43a0000}, {0xc43a2000}, {0xc43a4000}, {0xc43a6000}, - {0xc43a8000}, {0xc43aa000}, {0xc43ac000}, {0xc43ae000}, - {0xc43b0000}, {0xc43b2000}, {0xc43b4000}, {0xc43b6000}, - {0xc43b8000}, {0xc43ba000}, {0xc43bc000}, {0xc43be000}, - {0xc43c0000}, {0xc43c2000}, {0xc43c4000}, {0xc43c6000}, - {0xc43c8000}, {0xc43ca000}, {0xc43cc000}, {0xc43ce000}, - {0xc43d0000}, {0xc43d2000}, {0xc43d4000}, {0xc43d6000}, - {0xc43d8000}, {0xc43da000}, {0xc43dc000}, {0xc43de000}, - {0xc43e0000}, {0xc43e2000}, {0xc43e4000}, {0xc43e6000}, - {0xc43e8000}, {0xc43ea000}, {0xc43ec000}, {0xc43ee000}, - {0xc43f0000}, {0xc43f2000}, {0xc43f4000}, {0xc43f6000}, - {0xc43f8000}, {0xc43fa000}, {0xc43fc000}, {0xc43fe000}, - {0xc4400000}, {0xc4402000}, {0xc4404000}, {0xc4406000}, - {0xc4408000}, {0xc440a000}, {0xc440c000}, {0xc440e000}, - {0xc4410000}, {0xc4412000}, {0xc4414000}, {0xc4416000}, - {0xc4418000}, {0xc441a000}, {0xc441c000}, {0xc441e000}, - {0xc4420000}, {0xc4422000}, {0xc4424000}, {0xc4426000}, - {0xc4428000}, {0xc442a000}, {0xc442c000}, {0xc442e000}, - {0xc4430000}, {0xc4432000}, {0xc4434000}, {0xc4436000}, - {0xc4438000}, {0xc443a000}, {0xc443c000}, {0xc443e000}, - {0xc4440000}, {0xc4442000}, {0xc4444000}, {0xc4446000}, - {0xc4448000}, {0xc444a000}, {0xc444c000}, {0xc444e000}, - {0xc4450000}, {0xc4452000}, {0xc4454000}, {0xc4456000}, - {0xc4458000}, {0xc445a000}, {0xc445c000}, {0xc445e000}, - {0xc4460000}, {0xc4462000}, {0xc4464000}, {0xc4466000}, - {0xc4468000}, {0xc446a000}, {0xc446c000}, {0xc446e000}, - {0xc4470000}, {0xc4472000}, {0xc4474000}, {0xc4476000}, - {0xc4478000}, {0xc447a000}, {0xc447c000}, {0xc447e000}, - {0xc4480000}, {0xc4482000}, {0xc4484000}, {0xc4486000}, - {0xc4488000}, {0xc448a000}, {0xc448c000}, {0xc448e000}, - {0xc4490000}, {0xc4492000}, {0xc4494000}, {0xc4496000}, - {0xc4498000}, {0xc449a000}, {0xc449c000}, {0xc449e000}, - {0xc44a0000}, {0xc44a2000}, {0xc44a4000}, {0xc44a6000}, - {0xc44a8000}, {0xc44aa000}, {0xc44ac000}, {0xc44ae000}, - {0xc44b0000}, {0xc44b2000}, {0xc44b4000}, {0xc44b6000}, - {0xc44b8000}, {0xc44ba000}, {0xc44bc000}, {0xc44be000}, - {0xc44c0000}, {0xc44c2000}, {0xc44c4000}, {0xc44c6000}, - {0xc44c8000}, {0xc44ca000}, {0xc44cc000}, {0xc44ce000}, - {0xc44d0000}, {0xc44d2000}, {0xc44d4000}, {0xc44d6000}, - {0xc44d8000}, {0xc44da000}, {0xc44dc000}, {0xc44de000}, - {0xc44e0000}, {0xc44e2000}, {0xc44e4000}, {0xc44e6000}, - {0xc44e8000}, {0xc44ea000}, {0xc44ec000}, {0xc44ee000}, - {0xc44f0000}, {0xc44f2000}, {0xc44f4000}, {0xc44f6000}, - {0xc44f8000}, {0xc44fa000}, {0xc44fc000}, {0xc44fe000}, - {0xc4500000}, {0xc4502000}, {0xc4504000}, {0xc4506000}, - {0xc4508000}, {0xc450a000}, {0xc450c000}, {0xc450e000}, - {0xc4510000}, {0xc4512000}, {0xc4514000}, {0xc4516000}, - {0xc4518000}, {0xc451a000}, {0xc451c000}, {0xc451e000}, - {0xc4520000}, {0xc4522000}, {0xc4524000}, {0xc4526000}, - {0xc4528000}, {0xc452a000}, {0xc452c000}, {0xc452e000}, - {0xc4530000}, {0xc4532000}, {0xc4534000}, {0xc4536000}, - {0xc4538000}, {0xc453a000}, {0xc453c000}, {0xc453e000}, - {0xc4540000}, {0xc4542000}, {0xc4544000}, {0xc4546000}, - {0xc4548000}, {0xc454a000}, {0xc454c000}, {0xc454e000}, - {0xc4550000}, {0xc4552000}, {0xc4554000}, {0xc4556000}, - {0xc4558000}, {0xc455a000}, {0xc455c000}, {0xc455e000}, - {0xc4560000}, {0xc4562000}, {0xc4564000}, {0xc4566000}, - {0xc4568000}, {0xc456a000}, {0xc456c000}, {0xc456e000}, - {0xc4570000}, {0xc4572000}, {0xc4574000}, {0xc4576000}, - {0xc4578000}, {0xc457a000}, {0xc457c000}, {0xc457e000}, - {0xc4580000}, {0xc4582000}, {0xc4584000}, {0xc4586000}, - {0xc4588000}, {0xc458a000}, {0xc458c000}, {0xc458e000}, - {0xc4590000}, {0xc4592000}, {0xc4594000}, {0xc4596000}, - {0xc4598000}, {0xc459a000}, {0xc459c000}, {0xc459e000}, - {0xc45a0000}, {0xc45a2000}, {0xc45a4000}, {0xc45a6000}, - {0xc45a8000}, {0xc45aa000}, {0xc45ac000}, {0xc45ae000}, - {0xc45b0000}, {0xc45b2000}, {0xc45b4000}, {0xc45b6000}, - {0xc45b8000}, {0xc45ba000}, {0xc45bc000}, {0xc45be000}, - {0xc45c0000}, {0xc45c2000}, {0xc45c4000}, {0xc45c6000}, - {0xc45c8000}, {0xc45ca000}, {0xc45cc000}, {0xc45ce000}, - {0xc45d0000}, {0xc45d2000}, {0xc45d4000}, {0xc45d6000}, - {0xc45d8000}, {0xc45da000}, {0xc45dc000}, {0xc45de000}, - {0xc45e0000}, {0xc45e2000}, {0xc45e4000}, {0xc45e6000}, - {0xc45e8000}, {0xc45ea000}, {0xc45ec000}, {0xc45ee000}, - {0xc45f0000}, {0xc45f2000}, {0xc45f4000}, {0xc45f6000}, - {0xc45f8000}, {0xc45fa000}, {0xc45fc000}, {0xc45fe000}, - {0xc4600000}, {0xc4602000}, {0xc4604000}, {0xc4606000}, - {0xc4608000}, {0xc460a000}, {0xc460c000}, {0xc460e000}, - {0xc4610000}, {0xc4612000}, {0xc4614000}, {0xc4616000}, - {0xc4618000}, {0xc461a000}, {0xc461c000}, {0xc461e000}, - {0xc4620000}, {0xc4622000}, {0xc4624000}, {0xc4626000}, - {0xc4628000}, {0xc462a000}, {0xc462c000}, {0xc462e000}, - {0xc4630000}, {0xc4632000}, {0xc4634000}, {0xc4636000}, - {0xc4638000}, {0xc463a000}, {0xc463c000}, {0xc463e000}, - {0xc4640000}, {0xc4642000}, {0xc4644000}, {0xc4646000}, - {0xc4648000}, {0xc464a000}, {0xc464c000}, {0xc464e000}, - {0xc4650000}, {0xc4652000}, {0xc4654000}, {0xc4656000}, - {0xc4658000}, {0xc465a000}, {0xc465c000}, {0xc465e000}, - {0xc4660000}, {0xc4662000}, {0xc4664000}, {0xc4666000}, - {0xc4668000}, {0xc466a000}, {0xc466c000}, {0xc466e000}, - {0xc4670000}, {0xc4672000}, {0xc4674000}, {0xc4676000}, - {0xc4678000}, {0xc467a000}, {0xc467c000}, {0xc467e000}, - {0xc4680000}, {0xc4682000}, {0xc4684000}, {0xc4686000}, - {0xc4688000}, {0xc468a000}, {0xc468c000}, {0xc468e000}, - {0xc4690000}, {0xc4692000}, {0xc4694000}, {0xc4696000}, - {0xc4698000}, {0xc469a000}, {0xc469c000}, {0xc469e000}, - {0xc46a0000}, {0xc46a2000}, {0xc46a4000}, {0xc46a6000}, - {0xc46a8000}, {0xc46aa000}, {0xc46ac000}, {0xc46ae000}, - {0xc46b0000}, {0xc46b2000}, {0xc46b4000}, {0xc46b6000}, - {0xc46b8000}, {0xc46ba000}, {0xc46bc000}, {0xc46be000}, - {0xc46c0000}, {0xc46c2000}, {0xc46c4000}, {0xc46c6000}, - {0xc46c8000}, {0xc46ca000}, {0xc46cc000}, {0xc46ce000}, - {0xc46d0000}, {0xc46d2000}, {0xc46d4000}, {0xc46d6000}, - {0xc46d8000}, {0xc46da000}, {0xc46dc000}, {0xc46de000}, - {0xc46e0000}, {0xc46e2000}, {0xc46e4000}, {0xc46e6000}, - {0xc46e8000}, {0xc46ea000}, {0xc46ec000}, {0xc46ee000}, - {0xc46f0000}, {0xc46f2000}, {0xc46f4000}, {0xc46f6000}, - {0xc46f8000}, {0xc46fa000}, {0xc46fc000}, {0xc46fe000}, - {0xc4700000}, {0xc4702000}, {0xc4704000}, {0xc4706000}, - {0xc4708000}, {0xc470a000}, {0xc470c000}, {0xc470e000}, - {0xc4710000}, {0xc4712000}, {0xc4714000}, {0xc4716000}, - {0xc4718000}, {0xc471a000}, {0xc471c000}, {0xc471e000}, - {0xc4720000}, {0xc4722000}, {0xc4724000}, {0xc4726000}, - {0xc4728000}, {0xc472a000}, {0xc472c000}, {0xc472e000}, - {0xc4730000}, {0xc4732000}, {0xc4734000}, {0xc4736000}, - {0xc4738000}, {0xc473a000}, {0xc473c000}, {0xc473e000}, - {0xc4740000}, {0xc4742000}, {0xc4744000}, {0xc4746000}, - {0xc4748000}, {0xc474a000}, {0xc474c000}, {0xc474e000}, - {0xc4750000}, {0xc4752000}, {0xc4754000}, {0xc4756000}, - {0xc4758000}, {0xc475a000}, {0xc475c000}, {0xc475e000}, - {0xc4760000}, {0xc4762000}, {0xc4764000}, {0xc4766000}, - {0xc4768000}, {0xc476a000}, {0xc476c000}, {0xc476e000}, - {0xc4770000}, {0xc4772000}, {0xc4774000}, {0xc4776000}, - {0xc4778000}, {0xc477a000}, {0xc477c000}, {0xc477e000}, - {0xc4780000}, {0xc4782000}, {0xc4784000}, {0xc4786000}, - {0xc4788000}, {0xc478a000}, {0xc478c000}, {0xc478e000}, - {0xc4790000}, {0xc4792000}, {0xc4794000}, {0xc4796000}, - {0xc4798000}, {0xc479a000}, {0xc479c000}, {0xc479e000}, - {0xc47a0000}, {0xc47a2000}, {0xc47a4000}, {0xc47a6000}, - {0xc47a8000}, {0xc47aa000}, {0xc47ac000}, {0xc47ae000}, - {0xc47b0000}, {0xc47b2000}, {0xc47b4000}, {0xc47b6000}, - {0xc47b8000}, {0xc47ba000}, {0xc47bc000}, {0xc47be000}, - {0xc47c0000}, {0xc47c2000}, {0xc47c4000}, {0xc47c6000}, - {0xc47c8000}, {0xc47ca000}, {0xc47cc000}, {0xc47ce000}, - {0xc47d0000}, {0xc47d2000}, {0xc47d4000}, {0xc47d6000}, - {0xc47d8000}, {0xc47da000}, {0xc47dc000}, {0xc47de000}, - {0xc47e0000}, {0xc47e2000}, {0xc47e4000}, {0xc47e6000}, - {0xc47e8000}, {0xc47ea000}, {0xc47ec000}, {0xc47ee000}, - {0xc47f0000}, {0xc47f2000}, {0xc47f4000}, {0xc47f6000}, - {0xc47f8000}, {0xc47fa000}, {0xc47fc000}, {0xc47fe000}, - {0xc4800000}, {0xc4802000}, {0xc4804000}, {0xc4806000}, - {0xc4808000}, {0xc480a000}, {0xc480c000}, {0xc480e000}, - {0xc4810000}, {0xc4812000}, {0xc4814000}, {0xc4816000}, - {0xc4818000}, {0xc481a000}, {0xc481c000}, {0xc481e000}, - {0xc4820000}, {0xc4822000}, {0xc4824000}, {0xc4826000}, - {0xc4828000}, {0xc482a000}, {0xc482c000}, {0xc482e000}, - {0xc4830000}, {0xc4832000}, {0xc4834000}, {0xc4836000}, - {0xc4838000}, {0xc483a000}, {0xc483c000}, {0xc483e000}, - {0xc4840000}, {0xc4842000}, {0xc4844000}, {0xc4846000}, - {0xc4848000}, {0xc484a000}, {0xc484c000}, {0xc484e000}, - {0xc4850000}, {0xc4852000}, {0xc4854000}, {0xc4856000}, - {0xc4858000}, {0xc485a000}, {0xc485c000}, {0xc485e000}, - {0xc4860000}, {0xc4862000}, {0xc4864000}, {0xc4866000}, - {0xc4868000}, {0xc486a000}, {0xc486c000}, {0xc486e000}, - {0xc4870000}, {0xc4872000}, {0xc4874000}, {0xc4876000}, - {0xc4878000}, {0xc487a000}, {0xc487c000}, {0xc487e000}, - {0xc4880000}, {0xc4882000}, {0xc4884000}, {0xc4886000}, - {0xc4888000}, {0xc488a000}, {0xc488c000}, {0xc488e000}, - {0xc4890000}, {0xc4892000}, {0xc4894000}, {0xc4896000}, - {0xc4898000}, {0xc489a000}, {0xc489c000}, {0xc489e000}, - {0xc48a0000}, {0xc48a2000}, {0xc48a4000}, {0xc48a6000}, - {0xc48a8000}, {0xc48aa000}, {0xc48ac000}, {0xc48ae000}, - {0xc48b0000}, {0xc48b2000}, {0xc48b4000}, {0xc48b6000}, - {0xc48b8000}, {0xc48ba000}, {0xc48bc000}, {0xc48be000}, - {0xc48c0000}, {0xc48c2000}, {0xc48c4000}, {0xc48c6000}, - {0xc48c8000}, {0xc48ca000}, {0xc48cc000}, {0xc48ce000}, - {0xc48d0000}, {0xc48d2000}, {0xc48d4000}, {0xc48d6000}, - {0xc48d8000}, {0xc48da000}, {0xc48dc000}, {0xc48de000}, - {0xc48e0000}, {0xc48e2000}, {0xc48e4000}, {0xc48e6000}, - {0xc48e8000}, {0xc48ea000}, {0xc48ec000}, {0xc48ee000}, - {0xc48f0000}, {0xc48f2000}, {0xc48f4000}, {0xc48f6000}, - {0xc48f8000}, {0xc48fa000}, {0xc48fc000}, {0xc48fe000}, - {0xc4900000}, {0xc4902000}, {0xc4904000}, {0xc4906000}, - {0xc4908000}, {0xc490a000}, {0xc490c000}, {0xc490e000}, - {0xc4910000}, {0xc4912000}, {0xc4914000}, {0xc4916000}, - {0xc4918000}, {0xc491a000}, {0xc491c000}, {0xc491e000}, - {0xc4920000}, {0xc4922000}, {0xc4924000}, {0xc4926000}, - {0xc4928000}, {0xc492a000}, {0xc492c000}, {0xc492e000}, - {0xc4930000}, {0xc4932000}, {0xc4934000}, {0xc4936000}, - {0xc4938000}, {0xc493a000}, {0xc493c000}, {0xc493e000}, - {0xc4940000}, {0xc4942000}, {0xc4944000}, {0xc4946000}, - {0xc4948000}, {0xc494a000}, {0xc494c000}, {0xc494e000}, - {0xc4950000}, {0xc4952000}, {0xc4954000}, {0xc4956000}, - {0xc4958000}, {0xc495a000}, {0xc495c000}, {0xc495e000}, - {0xc4960000}, {0xc4962000}, {0xc4964000}, {0xc4966000}, - {0xc4968000}, {0xc496a000}, {0xc496c000}, {0xc496e000}, - {0xc4970000}, {0xc4972000}, {0xc4974000}, {0xc4976000}, - {0xc4978000}, {0xc497a000}, {0xc497c000}, {0xc497e000}, - {0xc4980000}, {0xc4982000}, {0xc4984000}, {0xc4986000}, - {0xc4988000}, {0xc498a000}, {0xc498c000}, {0xc498e000}, - {0xc4990000}, {0xc4992000}, {0xc4994000}, {0xc4996000}, - {0xc4998000}, {0xc499a000}, {0xc499c000}, {0xc499e000}, - {0xc49a0000}, {0xc49a2000}, {0xc49a4000}, {0xc49a6000}, - {0xc49a8000}, {0xc49aa000}, {0xc49ac000}, {0xc49ae000}, - {0xc49b0000}, {0xc49b2000}, {0xc49b4000}, {0xc49b6000}, - {0xc49b8000}, {0xc49ba000}, {0xc49bc000}, {0xc49be000}, - {0xc49c0000}, {0xc49c2000}, {0xc49c4000}, {0xc49c6000}, - {0xc49c8000}, {0xc49ca000}, {0xc49cc000}, {0xc49ce000}, - {0xc49d0000}, {0xc49d2000}, {0xc49d4000}, {0xc49d6000}, - {0xc49d8000}, {0xc49da000}, {0xc49dc000}, {0xc49de000}, - {0xc49e0000}, {0xc49e2000}, {0xc49e4000}, {0xc49e6000}, - {0xc49e8000}, {0xc49ea000}, {0xc49ec000}, {0xc49ee000}, - {0xc49f0000}, {0xc49f2000}, {0xc49f4000}, {0xc49f6000}, - {0xc49f8000}, {0xc49fa000}, {0xc49fc000}, {0xc49fe000}, - {0xc4a00000}, {0xc4a02000}, {0xc4a04000}, {0xc4a06000}, - {0xc4a08000}, {0xc4a0a000}, {0xc4a0c000}, {0xc4a0e000}, - {0xc4a10000}, {0xc4a12000}, {0xc4a14000}, {0xc4a16000}, - {0xc4a18000}, {0xc4a1a000}, {0xc4a1c000}, {0xc4a1e000}, - {0xc4a20000}, {0xc4a22000}, {0xc4a24000}, {0xc4a26000}, - {0xc4a28000}, {0xc4a2a000}, {0xc4a2c000}, {0xc4a2e000}, - {0xc4a30000}, {0xc4a32000}, {0xc4a34000}, {0xc4a36000}, - {0xc4a38000}, {0xc4a3a000}, {0xc4a3c000}, {0xc4a3e000}, - {0xc4a40000}, {0xc4a42000}, {0xc4a44000}, {0xc4a46000}, - {0xc4a48000}, {0xc4a4a000}, {0xc4a4c000}, {0xc4a4e000}, - {0xc4a50000}, {0xc4a52000}, {0xc4a54000}, {0xc4a56000}, - {0xc4a58000}, {0xc4a5a000}, {0xc4a5c000}, {0xc4a5e000}, - {0xc4a60000}, {0xc4a62000}, {0xc4a64000}, {0xc4a66000}, - {0xc4a68000}, {0xc4a6a000}, {0xc4a6c000}, {0xc4a6e000}, - {0xc4a70000}, {0xc4a72000}, {0xc4a74000}, {0xc4a76000}, - {0xc4a78000}, {0xc4a7a000}, {0xc4a7c000}, {0xc4a7e000}, - {0xc4a80000}, {0xc4a82000}, {0xc4a84000}, {0xc4a86000}, - {0xc4a88000}, {0xc4a8a000}, {0xc4a8c000}, {0xc4a8e000}, - {0xc4a90000}, {0xc4a92000}, {0xc4a94000}, {0xc4a96000}, - {0xc4a98000}, {0xc4a9a000}, {0xc4a9c000}, {0xc4a9e000}, - {0xc4aa0000}, {0xc4aa2000}, {0xc4aa4000}, {0xc4aa6000}, - {0xc4aa8000}, {0xc4aaa000}, {0xc4aac000}, {0xc4aae000}, - {0xc4ab0000}, {0xc4ab2000}, {0xc4ab4000}, {0xc4ab6000}, - {0xc4ab8000}, {0xc4aba000}, {0xc4abc000}, {0xc4abe000}, - {0xc4ac0000}, {0xc4ac2000}, {0xc4ac4000}, {0xc4ac6000}, - {0xc4ac8000}, {0xc4aca000}, {0xc4acc000}, {0xc4ace000}, - {0xc4ad0000}, {0xc4ad2000}, {0xc4ad4000}, {0xc4ad6000}, - {0xc4ad8000}, {0xc4ada000}, {0xc4adc000}, {0xc4ade000}, - {0xc4ae0000}, {0xc4ae2000}, {0xc4ae4000}, {0xc4ae6000}, - {0xc4ae8000}, {0xc4aea000}, {0xc4aec000}, {0xc4aee000}, - {0xc4af0000}, {0xc4af2000}, {0xc4af4000}, {0xc4af6000}, - {0xc4af8000}, {0xc4afa000}, {0xc4afc000}, {0xc4afe000}, - {0xc4b00000}, {0xc4b02000}, {0xc4b04000}, {0xc4b06000}, - {0xc4b08000}, {0xc4b0a000}, {0xc4b0c000}, {0xc4b0e000}, - {0xc4b10000}, {0xc4b12000}, {0xc4b14000}, {0xc4b16000}, - {0xc4b18000}, {0xc4b1a000}, {0xc4b1c000}, {0xc4b1e000}, - {0xc4b20000}, {0xc4b22000}, {0xc4b24000}, {0xc4b26000}, - {0xc4b28000}, {0xc4b2a000}, {0xc4b2c000}, {0xc4b2e000}, - {0xc4b30000}, {0xc4b32000}, {0xc4b34000}, {0xc4b36000}, - {0xc4b38000}, {0xc4b3a000}, {0xc4b3c000}, {0xc4b3e000}, - {0xc4b40000}, {0xc4b42000}, {0xc4b44000}, {0xc4b46000}, - {0xc4b48000}, {0xc4b4a000}, {0xc4b4c000}, {0xc4b4e000}, - {0xc4b50000}, {0xc4b52000}, {0xc4b54000}, {0xc4b56000}, - {0xc4b58000}, {0xc4b5a000}, {0xc4b5c000}, {0xc4b5e000}, - {0xc4b60000}, {0xc4b62000}, {0xc4b64000}, {0xc4b66000}, - {0xc4b68000}, {0xc4b6a000}, {0xc4b6c000}, {0xc4b6e000}, - {0xc4b70000}, {0xc4b72000}, {0xc4b74000}, {0xc4b76000}, - {0xc4b78000}, {0xc4b7a000}, {0xc4b7c000}, {0xc4b7e000}, - {0xc4b80000}, {0xc4b82000}, {0xc4b84000}, {0xc4b86000}, - {0xc4b88000}, {0xc4b8a000}, {0xc4b8c000}, {0xc4b8e000}, - {0xc4b90000}, {0xc4b92000}, {0xc4b94000}, {0xc4b96000}, - {0xc4b98000}, {0xc4b9a000}, {0xc4b9c000}, {0xc4b9e000}, - {0xc4ba0000}, {0xc4ba2000}, {0xc4ba4000}, {0xc4ba6000}, - {0xc4ba8000}, {0xc4baa000}, {0xc4bac000}, {0xc4bae000}, - {0xc4bb0000}, {0xc4bb2000}, {0xc4bb4000}, {0xc4bb6000}, - {0xc4bb8000}, {0xc4bba000}, {0xc4bbc000}, {0xc4bbe000}, - {0xc4bc0000}, {0xc4bc2000}, {0xc4bc4000}, {0xc4bc6000}, - {0xc4bc8000}, {0xc4bca000}, {0xc4bcc000}, {0xc4bce000}, - {0xc4bd0000}, {0xc4bd2000}, {0xc4bd4000}, {0xc4bd6000}, - {0xc4bd8000}, {0xc4bda000}, {0xc4bdc000}, {0xc4bde000}, - {0xc4be0000}, {0xc4be2000}, {0xc4be4000}, {0xc4be6000}, - {0xc4be8000}, {0xc4bea000}, {0xc4bec000}, {0xc4bee000}, - {0xc4bf0000}, {0xc4bf2000}, {0xc4bf4000}, {0xc4bf6000}, - {0xc4bf8000}, {0xc4bfa000}, {0xc4bfc000}, {0xc4bfe000}, - {0xc4c00000}, {0xc4c02000}, {0xc4c04000}, {0xc4c06000}, - {0xc4c08000}, {0xc4c0a000}, {0xc4c0c000}, {0xc4c0e000}, - {0xc4c10000}, {0xc4c12000}, {0xc4c14000}, {0xc4c16000}, - {0xc4c18000}, {0xc4c1a000}, {0xc4c1c000}, {0xc4c1e000}, - {0xc4c20000}, {0xc4c22000}, {0xc4c24000}, {0xc4c26000}, - {0xc4c28000}, {0xc4c2a000}, {0xc4c2c000}, {0xc4c2e000}, - {0xc4c30000}, {0xc4c32000}, {0xc4c34000}, {0xc4c36000}, - {0xc4c38000}, {0xc4c3a000}, {0xc4c3c000}, {0xc4c3e000}, - {0xc4c40000}, {0xc4c42000}, {0xc4c44000}, {0xc4c46000}, - {0xc4c48000}, {0xc4c4a000}, {0xc4c4c000}, {0xc4c4e000}, - {0xc4c50000}, {0xc4c52000}, {0xc4c54000}, {0xc4c56000}, - {0xc4c58000}, {0xc4c5a000}, {0xc4c5c000}, {0xc4c5e000}, - {0xc4c60000}, {0xc4c62000}, {0xc4c64000}, {0xc4c66000}, - {0xc4c68000}, {0xc4c6a000}, {0xc4c6c000}, {0xc4c6e000}, - {0xc4c70000}, {0xc4c72000}, {0xc4c74000}, {0xc4c76000}, - {0xc4c78000}, {0xc4c7a000}, {0xc4c7c000}, {0xc4c7e000}, - {0xc4c80000}, {0xc4c82000}, {0xc4c84000}, {0xc4c86000}, - {0xc4c88000}, {0xc4c8a000}, {0xc4c8c000}, {0xc4c8e000}, - {0xc4c90000}, {0xc4c92000}, {0xc4c94000}, {0xc4c96000}, - {0xc4c98000}, {0xc4c9a000}, {0xc4c9c000}, {0xc4c9e000}, - {0xc4ca0000}, {0xc4ca2000}, {0xc4ca4000}, {0xc4ca6000}, - {0xc4ca8000}, {0xc4caa000}, {0xc4cac000}, {0xc4cae000}, - {0xc4cb0000}, {0xc4cb2000}, {0xc4cb4000}, {0xc4cb6000}, - {0xc4cb8000}, {0xc4cba000}, {0xc4cbc000}, {0xc4cbe000}, - {0xc4cc0000}, {0xc4cc2000}, {0xc4cc4000}, {0xc4cc6000}, - {0xc4cc8000}, {0xc4cca000}, {0xc4ccc000}, {0xc4cce000}, - {0xc4cd0000}, {0xc4cd2000}, {0xc4cd4000}, {0xc4cd6000}, - {0xc4cd8000}, {0xc4cda000}, {0xc4cdc000}, {0xc4cde000}, - {0xc4ce0000}, {0xc4ce2000}, {0xc4ce4000}, {0xc4ce6000}, - {0xc4ce8000}, {0xc4cea000}, {0xc4cec000}, {0xc4cee000}, - {0xc4cf0000}, {0xc4cf2000}, {0xc4cf4000}, {0xc4cf6000}, - {0xc4cf8000}, {0xc4cfa000}, {0xc4cfc000}, {0xc4cfe000}, - {0xc4d00000}, {0xc4d02000}, {0xc4d04000}, {0xc4d06000}, - {0xc4d08000}, {0xc4d0a000}, {0xc4d0c000}, {0xc4d0e000}, - {0xc4d10000}, {0xc4d12000}, {0xc4d14000}, {0xc4d16000}, - {0xc4d18000}, {0xc4d1a000}, {0xc4d1c000}, {0xc4d1e000}, - {0xc4d20000}, {0xc4d22000}, {0xc4d24000}, {0xc4d26000}, - {0xc4d28000}, {0xc4d2a000}, {0xc4d2c000}, {0xc4d2e000}, - {0xc4d30000}, {0xc4d32000}, {0xc4d34000}, {0xc4d36000}, - {0xc4d38000}, {0xc4d3a000}, {0xc4d3c000}, {0xc4d3e000}, - {0xc4d40000}, {0xc4d42000}, {0xc4d44000}, {0xc4d46000}, - {0xc4d48000}, {0xc4d4a000}, {0xc4d4c000}, {0xc4d4e000}, - {0xc4d50000}, {0xc4d52000}, {0xc4d54000}, {0xc4d56000}, - {0xc4d58000}, {0xc4d5a000}, {0xc4d5c000}, {0xc4d5e000}, - {0xc4d60000}, {0xc4d62000}, {0xc4d64000}, {0xc4d66000}, - {0xc4d68000}, {0xc4d6a000}, {0xc4d6c000}, {0xc4d6e000}, - {0xc4d70000}, {0xc4d72000}, {0xc4d74000}, {0xc4d76000}, - {0xc4d78000}, {0xc4d7a000}, {0xc4d7c000}, {0xc4d7e000}, - {0xc4d80000}, {0xc4d82000}, {0xc4d84000}, {0xc4d86000}, - {0xc4d88000}, {0xc4d8a000}, {0xc4d8c000}, {0xc4d8e000}, - {0xc4d90000}, {0xc4d92000}, {0xc4d94000}, {0xc4d96000}, - {0xc4d98000}, {0xc4d9a000}, {0xc4d9c000}, {0xc4d9e000}, - {0xc4da0000}, {0xc4da2000}, {0xc4da4000}, {0xc4da6000}, - {0xc4da8000}, {0xc4daa000}, {0xc4dac000}, {0xc4dae000}, - {0xc4db0000}, {0xc4db2000}, {0xc4db4000}, {0xc4db6000}, - {0xc4db8000}, {0xc4dba000}, {0xc4dbc000}, {0xc4dbe000}, - {0xc4dc0000}, {0xc4dc2000}, {0xc4dc4000}, {0xc4dc6000}, - {0xc4dc8000}, {0xc4dca000}, {0xc4dcc000}, {0xc4dce000}, - {0xc4dd0000}, {0xc4dd2000}, {0xc4dd4000}, {0xc4dd6000}, - {0xc4dd8000}, {0xc4dda000}, {0xc4ddc000}, {0xc4dde000}, - {0xc4de0000}, {0xc4de2000}, {0xc4de4000}, {0xc4de6000}, - {0xc4de8000}, {0xc4dea000}, {0xc4dec000}, {0xc4dee000}, - {0xc4df0000}, {0xc4df2000}, {0xc4df4000}, {0xc4df6000}, - {0xc4df8000}, {0xc4dfa000}, {0xc4dfc000}, {0xc4dfe000}, - {0xc4e00000}, {0xc4e02000}, {0xc4e04000}, {0xc4e06000}, - {0xc4e08000}, {0xc4e0a000}, {0xc4e0c000}, {0xc4e0e000}, - {0xc4e10000}, {0xc4e12000}, {0xc4e14000}, {0xc4e16000}, - {0xc4e18000}, {0xc4e1a000}, {0xc4e1c000}, {0xc4e1e000}, - {0xc4e20000}, {0xc4e22000}, {0xc4e24000}, {0xc4e26000}, - {0xc4e28000}, {0xc4e2a000}, {0xc4e2c000}, {0xc4e2e000}, - {0xc4e30000}, {0xc4e32000}, {0xc4e34000}, {0xc4e36000}, - {0xc4e38000}, {0xc4e3a000}, {0xc4e3c000}, {0xc4e3e000}, - {0xc4e40000}, {0xc4e42000}, {0xc4e44000}, {0xc4e46000}, - {0xc4e48000}, {0xc4e4a000}, {0xc4e4c000}, {0xc4e4e000}, - {0xc4e50000}, {0xc4e52000}, {0xc4e54000}, {0xc4e56000}, - {0xc4e58000}, {0xc4e5a000}, {0xc4e5c000}, {0xc4e5e000}, - {0xc4e60000}, {0xc4e62000}, {0xc4e64000}, {0xc4e66000}, - {0xc4e68000}, {0xc4e6a000}, {0xc4e6c000}, {0xc4e6e000}, - {0xc4e70000}, {0xc4e72000}, {0xc4e74000}, {0xc4e76000}, - {0xc4e78000}, {0xc4e7a000}, {0xc4e7c000}, {0xc4e7e000}, - {0xc4e80000}, {0xc4e82000}, {0xc4e84000}, {0xc4e86000}, - {0xc4e88000}, {0xc4e8a000}, {0xc4e8c000}, {0xc4e8e000}, - {0xc4e90000}, {0xc4e92000}, {0xc4e94000}, {0xc4e96000}, - {0xc4e98000}, {0xc4e9a000}, {0xc4e9c000}, {0xc4e9e000}, - {0xc4ea0000}, {0xc4ea2000}, {0xc4ea4000}, {0xc4ea6000}, - {0xc4ea8000}, {0xc4eaa000}, {0xc4eac000}, {0xc4eae000}, - {0xc4eb0000}, {0xc4eb2000}, {0xc4eb4000}, {0xc4eb6000}, - {0xc4eb8000}, {0xc4eba000}, {0xc4ebc000}, {0xc4ebe000}, - {0xc4ec0000}, {0xc4ec2000}, {0xc4ec4000}, {0xc4ec6000}, - {0xc4ec8000}, {0xc4eca000}, {0xc4ecc000}, {0xc4ece000}, - {0xc4ed0000}, {0xc4ed2000}, {0xc4ed4000}, {0xc4ed6000}, - {0xc4ed8000}, {0xc4eda000}, {0xc4edc000}, {0xc4ede000}, - {0xc4ee0000}, {0xc4ee2000}, {0xc4ee4000}, {0xc4ee6000}, - {0xc4ee8000}, {0xc4eea000}, {0xc4eec000}, {0xc4eee000}, - {0xc4ef0000}, {0xc4ef2000}, {0xc4ef4000}, {0xc4ef6000}, - {0xc4ef8000}, {0xc4efa000}, {0xc4efc000}, {0xc4efe000}, - {0xc4f00000}, {0xc4f02000}, {0xc4f04000}, {0xc4f06000}, - {0xc4f08000}, {0xc4f0a000}, {0xc4f0c000}, {0xc4f0e000}, - {0xc4f10000}, {0xc4f12000}, {0xc4f14000}, {0xc4f16000}, - {0xc4f18000}, {0xc4f1a000}, {0xc4f1c000}, {0xc4f1e000}, - {0xc4f20000}, {0xc4f22000}, {0xc4f24000}, {0xc4f26000}, - {0xc4f28000}, {0xc4f2a000}, {0xc4f2c000}, {0xc4f2e000}, - {0xc4f30000}, {0xc4f32000}, {0xc4f34000}, {0xc4f36000}, - {0xc4f38000}, {0xc4f3a000}, {0xc4f3c000}, {0xc4f3e000}, - {0xc4f40000}, {0xc4f42000}, {0xc4f44000}, {0xc4f46000}, - {0xc4f48000}, {0xc4f4a000}, {0xc4f4c000}, {0xc4f4e000}, - {0xc4f50000}, {0xc4f52000}, {0xc4f54000}, {0xc4f56000}, - {0xc4f58000}, {0xc4f5a000}, {0xc4f5c000}, {0xc4f5e000}, - {0xc4f60000}, {0xc4f62000}, {0xc4f64000}, {0xc4f66000}, - {0xc4f68000}, {0xc4f6a000}, {0xc4f6c000}, {0xc4f6e000}, - {0xc4f70000}, {0xc4f72000}, {0xc4f74000}, {0xc4f76000}, - {0xc4f78000}, {0xc4f7a000}, {0xc4f7c000}, {0xc4f7e000}, - {0xc4f80000}, {0xc4f82000}, {0xc4f84000}, {0xc4f86000}, - {0xc4f88000}, {0xc4f8a000}, {0xc4f8c000}, {0xc4f8e000}, - {0xc4f90000}, {0xc4f92000}, {0xc4f94000}, {0xc4f96000}, - {0xc4f98000}, {0xc4f9a000}, {0xc4f9c000}, {0xc4f9e000}, - {0xc4fa0000}, {0xc4fa2000}, {0xc4fa4000}, {0xc4fa6000}, - {0xc4fa8000}, {0xc4faa000}, {0xc4fac000}, {0xc4fae000}, - {0xc4fb0000}, {0xc4fb2000}, {0xc4fb4000}, {0xc4fb6000}, - {0xc4fb8000}, {0xc4fba000}, {0xc4fbc000}, {0xc4fbe000}, - {0xc4fc0000}, {0xc4fc2000}, {0xc4fc4000}, {0xc4fc6000}, - {0xc4fc8000}, {0xc4fca000}, {0xc4fcc000}, {0xc4fce000}, - {0xc4fd0000}, {0xc4fd2000}, {0xc4fd4000}, {0xc4fd6000}, - {0xc4fd8000}, {0xc4fda000}, {0xc4fdc000}, {0xc4fde000}, - {0xc4fe0000}, {0xc4fe2000}, {0xc4fe4000}, {0xc4fe6000}, - {0xc4fe8000}, {0xc4fea000}, {0xc4fec000}, {0xc4fee000}, - {0xc4ff0000}, {0xc4ff2000}, {0xc4ff4000}, {0xc4ff6000}, - {0xc4ff8000}, {0xc4ffa000}, {0xc4ffc000}, {0xc4ffe000}, - {0xc5000000}, {0xc5002000}, {0xc5004000}, {0xc5006000}, - {0xc5008000}, {0xc500a000}, {0xc500c000}, {0xc500e000}, - {0xc5010000}, {0xc5012000}, {0xc5014000}, {0xc5016000}, - {0xc5018000}, {0xc501a000}, {0xc501c000}, {0xc501e000}, - {0xc5020000}, {0xc5022000}, {0xc5024000}, {0xc5026000}, - {0xc5028000}, {0xc502a000}, {0xc502c000}, {0xc502e000}, - {0xc5030000}, {0xc5032000}, {0xc5034000}, {0xc5036000}, - {0xc5038000}, {0xc503a000}, {0xc503c000}, {0xc503e000}, - {0xc5040000}, {0xc5042000}, {0xc5044000}, {0xc5046000}, - {0xc5048000}, {0xc504a000}, {0xc504c000}, {0xc504e000}, - {0xc5050000}, {0xc5052000}, {0xc5054000}, {0xc5056000}, - {0xc5058000}, {0xc505a000}, {0xc505c000}, {0xc505e000}, - {0xc5060000}, {0xc5062000}, {0xc5064000}, {0xc5066000}, - {0xc5068000}, {0xc506a000}, {0xc506c000}, {0xc506e000}, - {0xc5070000}, {0xc5072000}, {0xc5074000}, {0xc5076000}, - {0xc5078000}, {0xc507a000}, {0xc507c000}, {0xc507e000}, - {0xc5080000}, {0xc5082000}, {0xc5084000}, {0xc5086000}, - {0xc5088000}, {0xc508a000}, {0xc508c000}, {0xc508e000}, - {0xc5090000}, {0xc5092000}, {0xc5094000}, {0xc5096000}, - {0xc5098000}, {0xc509a000}, {0xc509c000}, {0xc509e000}, - {0xc50a0000}, {0xc50a2000}, {0xc50a4000}, {0xc50a6000}, - {0xc50a8000}, {0xc50aa000}, {0xc50ac000}, {0xc50ae000}, - {0xc50b0000}, {0xc50b2000}, {0xc50b4000}, {0xc50b6000}, - {0xc50b8000}, {0xc50ba000}, {0xc50bc000}, {0xc50be000}, - {0xc50c0000}, {0xc50c2000}, {0xc50c4000}, {0xc50c6000}, - {0xc50c8000}, {0xc50ca000}, {0xc50cc000}, {0xc50ce000}, - {0xc50d0000}, {0xc50d2000}, {0xc50d4000}, {0xc50d6000}, - {0xc50d8000}, {0xc50da000}, {0xc50dc000}, {0xc50de000}, - {0xc50e0000}, {0xc50e2000}, {0xc50e4000}, {0xc50e6000}, - {0xc50e8000}, {0xc50ea000}, {0xc50ec000}, {0xc50ee000}, - {0xc50f0000}, {0xc50f2000}, {0xc50f4000}, {0xc50f6000}, - {0xc50f8000}, {0xc50fa000}, {0xc50fc000}, {0xc50fe000}, - {0xc5100000}, {0xc5102000}, {0xc5104000}, {0xc5106000}, - {0xc5108000}, {0xc510a000}, {0xc510c000}, {0xc510e000}, - {0xc5110000}, {0xc5112000}, {0xc5114000}, {0xc5116000}, - {0xc5118000}, {0xc511a000}, {0xc511c000}, {0xc511e000}, - {0xc5120000}, {0xc5122000}, {0xc5124000}, {0xc5126000}, - {0xc5128000}, {0xc512a000}, {0xc512c000}, {0xc512e000}, - {0xc5130000}, {0xc5132000}, {0xc5134000}, {0xc5136000}, - {0xc5138000}, {0xc513a000}, {0xc513c000}, {0xc513e000}, - {0xc5140000}, {0xc5142000}, {0xc5144000}, {0xc5146000}, - {0xc5148000}, {0xc514a000}, {0xc514c000}, {0xc514e000}, - {0xc5150000}, {0xc5152000}, {0xc5154000}, {0xc5156000}, - {0xc5158000}, {0xc515a000}, {0xc515c000}, {0xc515e000}, - {0xc5160000}, {0xc5162000}, {0xc5164000}, {0xc5166000}, - {0xc5168000}, {0xc516a000}, {0xc516c000}, {0xc516e000}, - {0xc5170000}, {0xc5172000}, {0xc5174000}, {0xc5176000}, - {0xc5178000}, {0xc517a000}, {0xc517c000}, {0xc517e000}, - {0xc5180000}, {0xc5182000}, {0xc5184000}, {0xc5186000}, - {0xc5188000}, {0xc518a000}, {0xc518c000}, {0xc518e000}, - {0xc5190000}, {0xc5192000}, {0xc5194000}, {0xc5196000}, - {0xc5198000}, {0xc519a000}, {0xc519c000}, {0xc519e000}, - {0xc51a0000}, {0xc51a2000}, {0xc51a4000}, {0xc51a6000}, - {0xc51a8000}, {0xc51aa000}, {0xc51ac000}, {0xc51ae000}, - {0xc51b0000}, {0xc51b2000}, {0xc51b4000}, {0xc51b6000}, - {0xc51b8000}, {0xc51ba000}, {0xc51bc000}, {0xc51be000}, - {0xc51c0000}, {0xc51c2000}, {0xc51c4000}, {0xc51c6000}, - {0xc51c8000}, {0xc51ca000}, {0xc51cc000}, {0xc51ce000}, - {0xc51d0000}, {0xc51d2000}, {0xc51d4000}, {0xc51d6000}, - {0xc51d8000}, {0xc51da000}, {0xc51dc000}, {0xc51de000}, - {0xc51e0000}, {0xc51e2000}, {0xc51e4000}, {0xc51e6000}, - {0xc51e8000}, {0xc51ea000}, {0xc51ec000}, {0xc51ee000}, - {0xc51f0000}, {0xc51f2000}, {0xc51f4000}, {0xc51f6000}, - {0xc51f8000}, {0xc51fa000}, {0xc51fc000}, {0xc51fe000}, - {0xc5200000}, {0xc5202000}, {0xc5204000}, {0xc5206000}, - {0xc5208000}, {0xc520a000}, {0xc520c000}, {0xc520e000}, - {0xc5210000}, {0xc5212000}, {0xc5214000}, {0xc5216000}, - {0xc5218000}, {0xc521a000}, {0xc521c000}, {0xc521e000}, - {0xc5220000}, {0xc5222000}, {0xc5224000}, {0xc5226000}, - {0xc5228000}, {0xc522a000}, {0xc522c000}, {0xc522e000}, - {0xc5230000}, {0xc5232000}, {0xc5234000}, {0xc5236000}, - {0xc5238000}, {0xc523a000}, {0xc523c000}, {0xc523e000}, - {0xc5240000}, {0xc5242000}, {0xc5244000}, {0xc5246000}, - {0xc5248000}, {0xc524a000}, {0xc524c000}, {0xc524e000}, - {0xc5250000}, {0xc5252000}, {0xc5254000}, {0xc5256000}, - {0xc5258000}, {0xc525a000}, {0xc525c000}, {0xc525e000}, - {0xc5260000}, {0xc5262000}, {0xc5264000}, {0xc5266000}, - {0xc5268000}, {0xc526a000}, {0xc526c000}, {0xc526e000}, - {0xc5270000}, {0xc5272000}, {0xc5274000}, {0xc5276000}, - {0xc5278000}, {0xc527a000}, {0xc527c000}, {0xc527e000}, - {0xc5280000}, {0xc5282000}, {0xc5284000}, {0xc5286000}, - {0xc5288000}, {0xc528a000}, {0xc528c000}, {0xc528e000}, - {0xc5290000}, {0xc5292000}, {0xc5294000}, {0xc5296000}, - {0xc5298000}, {0xc529a000}, {0xc529c000}, {0xc529e000}, - {0xc52a0000}, {0xc52a2000}, {0xc52a4000}, {0xc52a6000}, - {0xc52a8000}, {0xc52aa000}, {0xc52ac000}, {0xc52ae000}, - {0xc52b0000}, {0xc52b2000}, {0xc52b4000}, {0xc52b6000}, - {0xc52b8000}, {0xc52ba000}, {0xc52bc000}, {0xc52be000}, - {0xc52c0000}, {0xc52c2000}, {0xc52c4000}, {0xc52c6000}, - {0xc52c8000}, {0xc52ca000}, {0xc52cc000}, {0xc52ce000}, - {0xc52d0000}, {0xc52d2000}, {0xc52d4000}, {0xc52d6000}, - {0xc52d8000}, {0xc52da000}, {0xc52dc000}, {0xc52de000}, - {0xc52e0000}, {0xc52e2000}, {0xc52e4000}, {0xc52e6000}, - {0xc52e8000}, {0xc52ea000}, {0xc52ec000}, {0xc52ee000}, - {0xc52f0000}, {0xc52f2000}, {0xc52f4000}, {0xc52f6000}, - {0xc52f8000}, {0xc52fa000}, {0xc52fc000}, {0xc52fe000}, - {0xc5300000}, {0xc5302000}, {0xc5304000}, {0xc5306000}, - {0xc5308000}, {0xc530a000}, {0xc530c000}, {0xc530e000}, - {0xc5310000}, {0xc5312000}, {0xc5314000}, {0xc5316000}, - {0xc5318000}, {0xc531a000}, {0xc531c000}, {0xc531e000}, - {0xc5320000}, {0xc5322000}, {0xc5324000}, {0xc5326000}, - {0xc5328000}, {0xc532a000}, {0xc532c000}, {0xc532e000}, - {0xc5330000}, {0xc5332000}, {0xc5334000}, {0xc5336000}, - {0xc5338000}, {0xc533a000}, {0xc533c000}, {0xc533e000}, - {0xc5340000}, {0xc5342000}, {0xc5344000}, {0xc5346000}, - {0xc5348000}, {0xc534a000}, {0xc534c000}, {0xc534e000}, - {0xc5350000}, {0xc5352000}, {0xc5354000}, {0xc5356000}, - {0xc5358000}, {0xc535a000}, {0xc535c000}, {0xc535e000}, - {0xc5360000}, {0xc5362000}, {0xc5364000}, {0xc5366000}, - {0xc5368000}, {0xc536a000}, {0xc536c000}, {0xc536e000}, - {0xc5370000}, {0xc5372000}, {0xc5374000}, {0xc5376000}, - {0xc5378000}, {0xc537a000}, {0xc537c000}, {0xc537e000}, - {0xc5380000}, {0xc5382000}, {0xc5384000}, {0xc5386000}, - {0xc5388000}, {0xc538a000}, {0xc538c000}, {0xc538e000}, - {0xc5390000}, {0xc5392000}, {0xc5394000}, {0xc5396000}, - {0xc5398000}, {0xc539a000}, {0xc539c000}, {0xc539e000}, - {0xc53a0000}, {0xc53a2000}, {0xc53a4000}, {0xc53a6000}, - {0xc53a8000}, {0xc53aa000}, {0xc53ac000}, {0xc53ae000}, - {0xc53b0000}, {0xc53b2000}, {0xc53b4000}, {0xc53b6000}, - {0xc53b8000}, {0xc53ba000}, {0xc53bc000}, {0xc53be000}, - {0xc53c0000}, {0xc53c2000}, {0xc53c4000}, {0xc53c6000}, - {0xc53c8000}, {0xc53ca000}, {0xc53cc000}, {0xc53ce000}, - {0xc53d0000}, {0xc53d2000}, {0xc53d4000}, {0xc53d6000}, - {0xc53d8000}, {0xc53da000}, {0xc53dc000}, {0xc53de000}, - {0xc53e0000}, {0xc53e2000}, {0xc53e4000}, {0xc53e6000}, - {0xc53e8000}, {0xc53ea000}, {0xc53ec000}, {0xc53ee000}, - {0xc53f0000}, {0xc53f2000}, {0xc53f4000}, {0xc53f6000}, - {0xc53f8000}, {0xc53fa000}, {0xc53fc000}, {0xc53fe000}, - {0xc5400000}, {0xc5402000}, {0xc5404000}, {0xc5406000}, - {0xc5408000}, {0xc540a000}, {0xc540c000}, {0xc540e000}, - {0xc5410000}, {0xc5412000}, {0xc5414000}, {0xc5416000}, - {0xc5418000}, {0xc541a000}, {0xc541c000}, {0xc541e000}, - {0xc5420000}, {0xc5422000}, {0xc5424000}, {0xc5426000}, - {0xc5428000}, {0xc542a000}, {0xc542c000}, {0xc542e000}, - {0xc5430000}, {0xc5432000}, {0xc5434000}, {0xc5436000}, - {0xc5438000}, {0xc543a000}, {0xc543c000}, {0xc543e000}, - {0xc5440000}, {0xc5442000}, {0xc5444000}, {0xc5446000}, - {0xc5448000}, {0xc544a000}, {0xc544c000}, {0xc544e000}, - {0xc5450000}, {0xc5452000}, {0xc5454000}, {0xc5456000}, - {0xc5458000}, {0xc545a000}, {0xc545c000}, {0xc545e000}, - {0xc5460000}, {0xc5462000}, {0xc5464000}, {0xc5466000}, - {0xc5468000}, {0xc546a000}, {0xc546c000}, {0xc546e000}, - {0xc5470000}, {0xc5472000}, {0xc5474000}, {0xc5476000}, - {0xc5478000}, {0xc547a000}, {0xc547c000}, {0xc547e000}, - {0xc5480000}, {0xc5482000}, {0xc5484000}, {0xc5486000}, - {0xc5488000}, {0xc548a000}, {0xc548c000}, {0xc548e000}, - {0xc5490000}, {0xc5492000}, {0xc5494000}, {0xc5496000}, - {0xc5498000}, {0xc549a000}, {0xc549c000}, {0xc549e000}, - {0xc54a0000}, {0xc54a2000}, {0xc54a4000}, {0xc54a6000}, - {0xc54a8000}, {0xc54aa000}, {0xc54ac000}, {0xc54ae000}, - {0xc54b0000}, {0xc54b2000}, {0xc54b4000}, {0xc54b6000}, - {0xc54b8000}, {0xc54ba000}, {0xc54bc000}, {0xc54be000}, - {0xc54c0000}, {0xc54c2000}, {0xc54c4000}, {0xc54c6000}, - {0xc54c8000}, {0xc54ca000}, {0xc54cc000}, {0xc54ce000}, - {0xc54d0000}, {0xc54d2000}, {0xc54d4000}, {0xc54d6000}, - {0xc54d8000}, {0xc54da000}, {0xc54dc000}, {0xc54de000}, - {0xc54e0000}, {0xc54e2000}, {0xc54e4000}, {0xc54e6000}, - {0xc54e8000}, {0xc54ea000}, {0xc54ec000}, {0xc54ee000}, - {0xc54f0000}, {0xc54f2000}, {0xc54f4000}, {0xc54f6000}, - {0xc54f8000}, {0xc54fa000}, {0xc54fc000}, {0xc54fe000}, - {0xc5500000}, {0xc5502000}, {0xc5504000}, {0xc5506000}, - {0xc5508000}, {0xc550a000}, {0xc550c000}, {0xc550e000}, - {0xc5510000}, {0xc5512000}, {0xc5514000}, {0xc5516000}, - {0xc5518000}, {0xc551a000}, {0xc551c000}, {0xc551e000}, - {0xc5520000}, {0xc5522000}, {0xc5524000}, {0xc5526000}, - {0xc5528000}, {0xc552a000}, {0xc552c000}, {0xc552e000}, - {0xc5530000}, {0xc5532000}, {0xc5534000}, {0xc5536000}, - {0xc5538000}, {0xc553a000}, {0xc553c000}, {0xc553e000}, - {0xc5540000}, {0xc5542000}, {0xc5544000}, {0xc5546000}, - {0xc5548000}, {0xc554a000}, {0xc554c000}, {0xc554e000}, - {0xc5550000}, {0xc5552000}, {0xc5554000}, {0xc5556000}, - {0xc5558000}, {0xc555a000}, {0xc555c000}, {0xc555e000}, - {0xc5560000}, {0xc5562000}, {0xc5564000}, {0xc5566000}, - {0xc5568000}, {0xc556a000}, {0xc556c000}, {0xc556e000}, - {0xc5570000}, {0xc5572000}, {0xc5574000}, {0xc5576000}, - {0xc5578000}, {0xc557a000}, {0xc557c000}, {0xc557e000}, - {0xc5580000}, {0xc5582000}, {0xc5584000}, {0xc5586000}, - {0xc5588000}, {0xc558a000}, {0xc558c000}, {0xc558e000}, - {0xc5590000}, {0xc5592000}, {0xc5594000}, {0xc5596000}, - {0xc5598000}, {0xc559a000}, {0xc559c000}, {0xc559e000}, - {0xc55a0000}, {0xc55a2000}, {0xc55a4000}, {0xc55a6000}, - {0xc55a8000}, {0xc55aa000}, {0xc55ac000}, {0xc55ae000}, - {0xc55b0000}, {0xc55b2000}, {0xc55b4000}, {0xc55b6000}, - {0xc55b8000}, {0xc55ba000}, {0xc55bc000}, {0xc55be000}, - {0xc55c0000}, {0xc55c2000}, {0xc55c4000}, {0xc55c6000}, - {0xc55c8000}, {0xc55ca000}, {0xc55cc000}, {0xc55ce000}, - {0xc55d0000}, {0xc55d2000}, {0xc55d4000}, {0xc55d6000}, - {0xc55d8000}, {0xc55da000}, {0xc55dc000}, {0xc55de000}, - {0xc55e0000}, {0xc55e2000}, {0xc55e4000}, {0xc55e6000}, - {0xc55e8000}, {0xc55ea000}, {0xc55ec000}, {0xc55ee000}, - {0xc55f0000}, {0xc55f2000}, {0xc55f4000}, {0xc55f6000}, - {0xc55f8000}, {0xc55fa000}, {0xc55fc000}, {0xc55fe000}, - {0xc5600000}, {0xc5602000}, {0xc5604000}, {0xc5606000}, - {0xc5608000}, {0xc560a000}, {0xc560c000}, {0xc560e000}, - {0xc5610000}, {0xc5612000}, {0xc5614000}, {0xc5616000}, - {0xc5618000}, {0xc561a000}, {0xc561c000}, {0xc561e000}, - {0xc5620000}, {0xc5622000}, {0xc5624000}, {0xc5626000}, - {0xc5628000}, {0xc562a000}, {0xc562c000}, {0xc562e000}, - {0xc5630000}, {0xc5632000}, {0xc5634000}, {0xc5636000}, - {0xc5638000}, {0xc563a000}, {0xc563c000}, {0xc563e000}, - {0xc5640000}, {0xc5642000}, {0xc5644000}, {0xc5646000}, - {0xc5648000}, {0xc564a000}, {0xc564c000}, {0xc564e000}, - {0xc5650000}, {0xc5652000}, {0xc5654000}, {0xc5656000}, - {0xc5658000}, {0xc565a000}, {0xc565c000}, {0xc565e000}, - {0xc5660000}, {0xc5662000}, {0xc5664000}, {0xc5666000}, - {0xc5668000}, {0xc566a000}, {0xc566c000}, {0xc566e000}, - {0xc5670000}, {0xc5672000}, {0xc5674000}, {0xc5676000}, - {0xc5678000}, {0xc567a000}, {0xc567c000}, {0xc567e000}, - {0xc5680000}, {0xc5682000}, {0xc5684000}, {0xc5686000}, - {0xc5688000}, {0xc568a000}, {0xc568c000}, {0xc568e000}, - {0xc5690000}, {0xc5692000}, {0xc5694000}, {0xc5696000}, - {0xc5698000}, {0xc569a000}, {0xc569c000}, {0xc569e000}, - {0xc56a0000}, {0xc56a2000}, {0xc56a4000}, {0xc56a6000}, - {0xc56a8000}, {0xc56aa000}, {0xc56ac000}, {0xc56ae000}, - {0xc56b0000}, {0xc56b2000}, {0xc56b4000}, {0xc56b6000}, - {0xc56b8000}, {0xc56ba000}, {0xc56bc000}, {0xc56be000}, - {0xc56c0000}, {0xc56c2000}, {0xc56c4000}, {0xc56c6000}, - {0xc56c8000}, {0xc56ca000}, {0xc56cc000}, {0xc56ce000}, - {0xc56d0000}, {0xc56d2000}, {0xc56d4000}, {0xc56d6000}, - {0xc56d8000}, {0xc56da000}, {0xc56dc000}, {0xc56de000}, - {0xc56e0000}, {0xc56e2000}, {0xc56e4000}, {0xc56e6000}, - {0xc56e8000}, {0xc56ea000}, {0xc56ec000}, {0xc56ee000}, - {0xc56f0000}, {0xc56f2000}, {0xc56f4000}, {0xc56f6000}, - {0xc56f8000}, {0xc56fa000}, {0xc56fc000}, {0xc56fe000}, - {0xc5700000}, {0xc5702000}, {0xc5704000}, {0xc5706000}, - {0xc5708000}, {0xc570a000}, {0xc570c000}, {0xc570e000}, - {0xc5710000}, {0xc5712000}, {0xc5714000}, {0xc5716000}, - {0xc5718000}, {0xc571a000}, {0xc571c000}, {0xc571e000}, - {0xc5720000}, {0xc5722000}, {0xc5724000}, {0xc5726000}, - {0xc5728000}, {0xc572a000}, {0xc572c000}, {0xc572e000}, - {0xc5730000}, {0xc5732000}, {0xc5734000}, {0xc5736000}, - {0xc5738000}, {0xc573a000}, {0xc573c000}, {0xc573e000}, - {0xc5740000}, {0xc5742000}, {0xc5744000}, {0xc5746000}, - {0xc5748000}, {0xc574a000}, {0xc574c000}, {0xc574e000}, - {0xc5750000}, {0xc5752000}, {0xc5754000}, {0xc5756000}, - {0xc5758000}, {0xc575a000}, {0xc575c000}, {0xc575e000}, - {0xc5760000}, {0xc5762000}, {0xc5764000}, {0xc5766000}, - {0xc5768000}, {0xc576a000}, {0xc576c000}, {0xc576e000}, - {0xc5770000}, {0xc5772000}, {0xc5774000}, {0xc5776000}, - {0xc5778000}, {0xc577a000}, {0xc577c000}, {0xc577e000}, - {0xc5780000}, {0xc5782000}, {0xc5784000}, {0xc5786000}, - {0xc5788000}, {0xc578a000}, {0xc578c000}, {0xc578e000}, - {0xc5790000}, {0xc5792000}, {0xc5794000}, {0xc5796000}, - {0xc5798000}, {0xc579a000}, {0xc579c000}, {0xc579e000}, - {0xc57a0000}, {0xc57a2000}, {0xc57a4000}, {0xc57a6000}, - {0xc57a8000}, {0xc57aa000}, {0xc57ac000}, {0xc57ae000}, - {0xc57b0000}, {0xc57b2000}, {0xc57b4000}, {0xc57b6000}, - {0xc57b8000}, {0xc57ba000}, {0xc57bc000}, {0xc57be000}, - {0xc57c0000}, {0xc57c2000}, {0xc57c4000}, {0xc57c6000}, - {0xc57c8000}, {0xc57ca000}, {0xc57cc000}, {0xc57ce000}, - {0xc57d0000}, {0xc57d2000}, {0xc57d4000}, {0xc57d6000}, - {0xc57d8000}, {0xc57da000}, {0xc57dc000}, {0xc57de000}, - {0xc57e0000}, {0xc57e2000}, {0xc57e4000}, {0xc57e6000}, - {0xc57e8000}, {0xc57ea000}, {0xc57ec000}, {0xc57ee000}, - {0xc57f0000}, {0xc57f2000}, {0xc57f4000}, {0xc57f6000}, - {0xc57f8000}, {0xc57fa000}, {0xc57fc000}, {0xc57fe000}, - {0xc5800000}, {0xc5802000}, {0xc5804000}, {0xc5806000}, - {0xc5808000}, {0xc580a000}, {0xc580c000}, {0xc580e000}, - {0xc5810000}, {0xc5812000}, {0xc5814000}, {0xc5816000}, - {0xc5818000}, {0xc581a000}, {0xc581c000}, {0xc581e000}, - {0xc5820000}, {0xc5822000}, {0xc5824000}, {0xc5826000}, - {0xc5828000}, {0xc582a000}, {0xc582c000}, {0xc582e000}, - {0xc5830000}, {0xc5832000}, {0xc5834000}, {0xc5836000}, - {0xc5838000}, {0xc583a000}, {0xc583c000}, {0xc583e000}, - {0xc5840000}, {0xc5842000}, {0xc5844000}, {0xc5846000}, - {0xc5848000}, {0xc584a000}, {0xc584c000}, {0xc584e000}, - {0xc5850000}, {0xc5852000}, {0xc5854000}, {0xc5856000}, - {0xc5858000}, {0xc585a000}, {0xc585c000}, {0xc585e000}, - {0xc5860000}, {0xc5862000}, {0xc5864000}, {0xc5866000}, - {0xc5868000}, {0xc586a000}, {0xc586c000}, {0xc586e000}, - {0xc5870000}, {0xc5872000}, {0xc5874000}, {0xc5876000}, - {0xc5878000}, {0xc587a000}, {0xc587c000}, {0xc587e000}, - {0xc5880000}, {0xc5882000}, {0xc5884000}, {0xc5886000}, - {0xc5888000}, {0xc588a000}, {0xc588c000}, {0xc588e000}, - {0xc5890000}, {0xc5892000}, {0xc5894000}, {0xc5896000}, - {0xc5898000}, {0xc589a000}, {0xc589c000}, {0xc589e000}, - {0xc58a0000}, {0xc58a2000}, {0xc58a4000}, {0xc58a6000}, - {0xc58a8000}, {0xc58aa000}, {0xc58ac000}, {0xc58ae000}, - {0xc58b0000}, {0xc58b2000}, {0xc58b4000}, {0xc58b6000}, - {0xc58b8000}, {0xc58ba000}, {0xc58bc000}, {0xc58be000}, - {0xc58c0000}, {0xc58c2000}, {0xc58c4000}, {0xc58c6000}, - {0xc58c8000}, {0xc58ca000}, {0xc58cc000}, {0xc58ce000}, - {0xc58d0000}, {0xc58d2000}, {0xc58d4000}, {0xc58d6000}, - {0xc58d8000}, {0xc58da000}, {0xc58dc000}, {0xc58de000}, - {0xc58e0000}, {0xc58e2000}, {0xc58e4000}, {0xc58e6000}, - {0xc58e8000}, {0xc58ea000}, {0xc58ec000}, {0xc58ee000}, - {0xc58f0000}, {0xc58f2000}, {0xc58f4000}, {0xc58f6000}, - {0xc58f8000}, {0xc58fa000}, {0xc58fc000}, {0xc58fe000}, - {0xc5900000}, {0xc5902000}, {0xc5904000}, {0xc5906000}, - {0xc5908000}, {0xc590a000}, {0xc590c000}, {0xc590e000}, - {0xc5910000}, {0xc5912000}, {0xc5914000}, {0xc5916000}, - {0xc5918000}, {0xc591a000}, {0xc591c000}, {0xc591e000}, - {0xc5920000}, {0xc5922000}, {0xc5924000}, {0xc5926000}, - {0xc5928000}, {0xc592a000}, {0xc592c000}, {0xc592e000}, - {0xc5930000}, {0xc5932000}, {0xc5934000}, {0xc5936000}, - {0xc5938000}, {0xc593a000}, {0xc593c000}, {0xc593e000}, - {0xc5940000}, {0xc5942000}, {0xc5944000}, {0xc5946000}, - {0xc5948000}, {0xc594a000}, {0xc594c000}, {0xc594e000}, - {0xc5950000}, {0xc5952000}, {0xc5954000}, {0xc5956000}, - {0xc5958000}, {0xc595a000}, {0xc595c000}, {0xc595e000}, - {0xc5960000}, {0xc5962000}, {0xc5964000}, {0xc5966000}, - {0xc5968000}, {0xc596a000}, {0xc596c000}, {0xc596e000}, - {0xc5970000}, {0xc5972000}, {0xc5974000}, {0xc5976000}, - {0xc5978000}, {0xc597a000}, {0xc597c000}, {0xc597e000}, - {0xc5980000}, {0xc5982000}, {0xc5984000}, {0xc5986000}, - {0xc5988000}, {0xc598a000}, {0xc598c000}, {0xc598e000}, - {0xc5990000}, {0xc5992000}, {0xc5994000}, {0xc5996000}, - {0xc5998000}, {0xc599a000}, {0xc599c000}, {0xc599e000}, - {0xc59a0000}, {0xc59a2000}, {0xc59a4000}, {0xc59a6000}, - {0xc59a8000}, {0xc59aa000}, {0xc59ac000}, {0xc59ae000}, - {0xc59b0000}, {0xc59b2000}, {0xc59b4000}, {0xc59b6000}, - {0xc59b8000}, {0xc59ba000}, {0xc59bc000}, {0xc59be000}, - {0xc59c0000}, {0xc59c2000}, {0xc59c4000}, {0xc59c6000}, - {0xc59c8000}, {0xc59ca000}, {0xc59cc000}, {0xc59ce000}, - {0xc59d0000}, {0xc59d2000}, {0xc59d4000}, {0xc59d6000}, - {0xc59d8000}, {0xc59da000}, {0xc59dc000}, {0xc59de000}, - {0xc59e0000}, {0xc59e2000}, {0xc59e4000}, {0xc59e6000}, - {0xc59e8000}, {0xc59ea000}, {0xc59ec000}, {0xc59ee000}, - {0xc59f0000}, {0xc59f2000}, {0xc59f4000}, {0xc59f6000}, - {0xc59f8000}, {0xc59fa000}, {0xc59fc000}, {0xc59fe000}, - {0xc5a00000}, {0xc5a02000}, {0xc5a04000}, {0xc5a06000}, - {0xc5a08000}, {0xc5a0a000}, {0xc5a0c000}, {0xc5a0e000}, - {0xc5a10000}, {0xc5a12000}, {0xc5a14000}, {0xc5a16000}, - {0xc5a18000}, {0xc5a1a000}, {0xc5a1c000}, {0xc5a1e000}, - {0xc5a20000}, {0xc5a22000}, {0xc5a24000}, {0xc5a26000}, - {0xc5a28000}, {0xc5a2a000}, {0xc5a2c000}, {0xc5a2e000}, - {0xc5a30000}, {0xc5a32000}, {0xc5a34000}, {0xc5a36000}, - {0xc5a38000}, {0xc5a3a000}, {0xc5a3c000}, {0xc5a3e000}, - {0xc5a40000}, {0xc5a42000}, {0xc5a44000}, {0xc5a46000}, - {0xc5a48000}, {0xc5a4a000}, {0xc5a4c000}, {0xc5a4e000}, - {0xc5a50000}, {0xc5a52000}, {0xc5a54000}, {0xc5a56000}, - {0xc5a58000}, {0xc5a5a000}, {0xc5a5c000}, {0xc5a5e000}, - {0xc5a60000}, {0xc5a62000}, {0xc5a64000}, {0xc5a66000}, - {0xc5a68000}, {0xc5a6a000}, {0xc5a6c000}, {0xc5a6e000}, - {0xc5a70000}, {0xc5a72000}, {0xc5a74000}, {0xc5a76000}, - {0xc5a78000}, {0xc5a7a000}, {0xc5a7c000}, {0xc5a7e000}, - {0xc5a80000}, {0xc5a82000}, {0xc5a84000}, {0xc5a86000}, - {0xc5a88000}, {0xc5a8a000}, {0xc5a8c000}, {0xc5a8e000}, - {0xc5a90000}, {0xc5a92000}, {0xc5a94000}, {0xc5a96000}, - {0xc5a98000}, {0xc5a9a000}, {0xc5a9c000}, {0xc5a9e000}, - {0xc5aa0000}, {0xc5aa2000}, {0xc5aa4000}, {0xc5aa6000}, - {0xc5aa8000}, {0xc5aaa000}, {0xc5aac000}, {0xc5aae000}, - {0xc5ab0000}, {0xc5ab2000}, {0xc5ab4000}, {0xc5ab6000}, - {0xc5ab8000}, {0xc5aba000}, {0xc5abc000}, {0xc5abe000}, - {0xc5ac0000}, {0xc5ac2000}, {0xc5ac4000}, {0xc5ac6000}, - {0xc5ac8000}, {0xc5aca000}, {0xc5acc000}, {0xc5ace000}, - {0xc5ad0000}, {0xc5ad2000}, {0xc5ad4000}, {0xc5ad6000}, - {0xc5ad8000}, {0xc5ada000}, {0xc5adc000}, {0xc5ade000}, - {0xc5ae0000}, {0xc5ae2000}, {0xc5ae4000}, {0xc5ae6000}, - {0xc5ae8000}, {0xc5aea000}, {0xc5aec000}, {0xc5aee000}, - {0xc5af0000}, {0xc5af2000}, {0xc5af4000}, {0xc5af6000}, - {0xc5af8000}, {0xc5afa000}, {0xc5afc000}, {0xc5afe000}, - {0xc5b00000}, {0xc5b02000}, {0xc5b04000}, {0xc5b06000}, - {0xc5b08000}, {0xc5b0a000}, {0xc5b0c000}, {0xc5b0e000}, - {0xc5b10000}, {0xc5b12000}, {0xc5b14000}, {0xc5b16000}, - {0xc5b18000}, {0xc5b1a000}, {0xc5b1c000}, {0xc5b1e000}, - {0xc5b20000}, {0xc5b22000}, {0xc5b24000}, {0xc5b26000}, - {0xc5b28000}, {0xc5b2a000}, {0xc5b2c000}, {0xc5b2e000}, - {0xc5b30000}, {0xc5b32000}, {0xc5b34000}, {0xc5b36000}, - {0xc5b38000}, {0xc5b3a000}, {0xc5b3c000}, {0xc5b3e000}, - {0xc5b40000}, {0xc5b42000}, {0xc5b44000}, {0xc5b46000}, - {0xc5b48000}, {0xc5b4a000}, {0xc5b4c000}, {0xc5b4e000}, - {0xc5b50000}, {0xc5b52000}, {0xc5b54000}, {0xc5b56000}, - {0xc5b58000}, {0xc5b5a000}, {0xc5b5c000}, {0xc5b5e000}, - {0xc5b60000}, {0xc5b62000}, {0xc5b64000}, {0xc5b66000}, - {0xc5b68000}, {0xc5b6a000}, {0xc5b6c000}, {0xc5b6e000}, - {0xc5b70000}, {0xc5b72000}, {0xc5b74000}, {0xc5b76000}, - {0xc5b78000}, {0xc5b7a000}, {0xc5b7c000}, {0xc5b7e000}, - {0xc5b80000}, {0xc5b82000}, {0xc5b84000}, {0xc5b86000}, - {0xc5b88000}, {0xc5b8a000}, {0xc5b8c000}, {0xc5b8e000}, - {0xc5b90000}, {0xc5b92000}, {0xc5b94000}, {0xc5b96000}, - {0xc5b98000}, {0xc5b9a000}, {0xc5b9c000}, {0xc5b9e000}, - {0xc5ba0000}, {0xc5ba2000}, {0xc5ba4000}, {0xc5ba6000}, - {0xc5ba8000}, {0xc5baa000}, {0xc5bac000}, {0xc5bae000}, - {0xc5bb0000}, {0xc5bb2000}, {0xc5bb4000}, {0xc5bb6000}, - {0xc5bb8000}, {0xc5bba000}, {0xc5bbc000}, {0xc5bbe000}, - {0xc5bc0000}, {0xc5bc2000}, {0xc5bc4000}, {0xc5bc6000}, - {0xc5bc8000}, {0xc5bca000}, {0xc5bcc000}, {0xc5bce000}, - {0xc5bd0000}, {0xc5bd2000}, {0xc5bd4000}, {0xc5bd6000}, - {0xc5bd8000}, {0xc5bda000}, {0xc5bdc000}, {0xc5bde000}, - {0xc5be0000}, {0xc5be2000}, {0xc5be4000}, {0xc5be6000}, - {0xc5be8000}, {0xc5bea000}, {0xc5bec000}, {0xc5bee000}, - {0xc5bf0000}, {0xc5bf2000}, {0xc5bf4000}, {0xc5bf6000}, - {0xc5bf8000}, {0xc5bfa000}, {0xc5bfc000}, {0xc5bfe000}, - {0xc5c00000}, {0xc5c02000}, {0xc5c04000}, {0xc5c06000}, - {0xc5c08000}, {0xc5c0a000}, {0xc5c0c000}, {0xc5c0e000}, - {0xc5c10000}, {0xc5c12000}, {0xc5c14000}, {0xc5c16000}, - {0xc5c18000}, {0xc5c1a000}, {0xc5c1c000}, {0xc5c1e000}, - {0xc5c20000}, {0xc5c22000}, {0xc5c24000}, {0xc5c26000}, - {0xc5c28000}, {0xc5c2a000}, {0xc5c2c000}, {0xc5c2e000}, - {0xc5c30000}, {0xc5c32000}, {0xc5c34000}, {0xc5c36000}, - {0xc5c38000}, {0xc5c3a000}, {0xc5c3c000}, {0xc5c3e000}, - {0xc5c40000}, {0xc5c42000}, {0xc5c44000}, {0xc5c46000}, - {0xc5c48000}, {0xc5c4a000}, {0xc5c4c000}, {0xc5c4e000}, - {0xc5c50000}, {0xc5c52000}, {0xc5c54000}, {0xc5c56000}, - {0xc5c58000}, {0xc5c5a000}, {0xc5c5c000}, {0xc5c5e000}, - {0xc5c60000}, {0xc5c62000}, {0xc5c64000}, {0xc5c66000}, - {0xc5c68000}, {0xc5c6a000}, {0xc5c6c000}, {0xc5c6e000}, - {0xc5c70000}, {0xc5c72000}, {0xc5c74000}, {0xc5c76000}, - {0xc5c78000}, {0xc5c7a000}, {0xc5c7c000}, {0xc5c7e000}, - {0xc5c80000}, {0xc5c82000}, {0xc5c84000}, {0xc5c86000}, - {0xc5c88000}, {0xc5c8a000}, {0xc5c8c000}, {0xc5c8e000}, - {0xc5c90000}, {0xc5c92000}, {0xc5c94000}, {0xc5c96000}, - {0xc5c98000}, {0xc5c9a000}, {0xc5c9c000}, {0xc5c9e000}, - {0xc5ca0000}, {0xc5ca2000}, {0xc5ca4000}, {0xc5ca6000}, - {0xc5ca8000}, {0xc5caa000}, {0xc5cac000}, {0xc5cae000}, - {0xc5cb0000}, {0xc5cb2000}, {0xc5cb4000}, {0xc5cb6000}, - {0xc5cb8000}, {0xc5cba000}, {0xc5cbc000}, {0xc5cbe000}, - {0xc5cc0000}, {0xc5cc2000}, {0xc5cc4000}, {0xc5cc6000}, - {0xc5cc8000}, {0xc5cca000}, {0xc5ccc000}, {0xc5cce000}, - {0xc5cd0000}, {0xc5cd2000}, {0xc5cd4000}, {0xc5cd6000}, - {0xc5cd8000}, {0xc5cda000}, {0xc5cdc000}, {0xc5cde000}, - {0xc5ce0000}, {0xc5ce2000}, {0xc5ce4000}, {0xc5ce6000}, - {0xc5ce8000}, {0xc5cea000}, {0xc5cec000}, {0xc5cee000}, - {0xc5cf0000}, {0xc5cf2000}, {0xc5cf4000}, {0xc5cf6000}, - {0xc5cf8000}, {0xc5cfa000}, {0xc5cfc000}, {0xc5cfe000}, - {0xc5d00000}, {0xc5d02000}, {0xc5d04000}, {0xc5d06000}, - {0xc5d08000}, {0xc5d0a000}, {0xc5d0c000}, {0xc5d0e000}, - {0xc5d10000}, {0xc5d12000}, {0xc5d14000}, {0xc5d16000}, - {0xc5d18000}, {0xc5d1a000}, {0xc5d1c000}, {0xc5d1e000}, - {0xc5d20000}, {0xc5d22000}, {0xc5d24000}, {0xc5d26000}, - {0xc5d28000}, {0xc5d2a000}, {0xc5d2c000}, {0xc5d2e000}, - {0xc5d30000}, {0xc5d32000}, {0xc5d34000}, {0xc5d36000}, - {0xc5d38000}, {0xc5d3a000}, {0xc5d3c000}, {0xc5d3e000}, - {0xc5d40000}, {0xc5d42000}, {0xc5d44000}, {0xc5d46000}, - {0xc5d48000}, {0xc5d4a000}, {0xc5d4c000}, {0xc5d4e000}, - {0xc5d50000}, {0xc5d52000}, {0xc5d54000}, {0xc5d56000}, - {0xc5d58000}, {0xc5d5a000}, {0xc5d5c000}, {0xc5d5e000}, - {0xc5d60000}, {0xc5d62000}, {0xc5d64000}, {0xc5d66000}, - {0xc5d68000}, {0xc5d6a000}, {0xc5d6c000}, {0xc5d6e000}, - {0xc5d70000}, {0xc5d72000}, {0xc5d74000}, {0xc5d76000}, - {0xc5d78000}, {0xc5d7a000}, {0xc5d7c000}, {0xc5d7e000}, - {0xc5d80000}, {0xc5d82000}, {0xc5d84000}, {0xc5d86000}, - {0xc5d88000}, {0xc5d8a000}, {0xc5d8c000}, {0xc5d8e000}, - {0xc5d90000}, {0xc5d92000}, {0xc5d94000}, {0xc5d96000}, - {0xc5d98000}, {0xc5d9a000}, {0xc5d9c000}, {0xc5d9e000}, - {0xc5da0000}, {0xc5da2000}, {0xc5da4000}, {0xc5da6000}, - {0xc5da8000}, {0xc5daa000}, {0xc5dac000}, {0xc5dae000}, - {0xc5db0000}, {0xc5db2000}, {0xc5db4000}, {0xc5db6000}, - {0xc5db8000}, {0xc5dba000}, {0xc5dbc000}, {0xc5dbe000}, - {0xc5dc0000}, {0xc5dc2000}, {0xc5dc4000}, {0xc5dc6000}, - {0xc5dc8000}, {0xc5dca000}, {0xc5dcc000}, {0xc5dce000}, - {0xc5dd0000}, {0xc5dd2000}, {0xc5dd4000}, {0xc5dd6000}, - {0xc5dd8000}, {0xc5dda000}, {0xc5ddc000}, {0xc5dde000}, - {0xc5de0000}, {0xc5de2000}, {0xc5de4000}, {0xc5de6000}, - {0xc5de8000}, {0xc5dea000}, {0xc5dec000}, {0xc5dee000}, - {0xc5df0000}, {0xc5df2000}, {0xc5df4000}, {0xc5df6000}, - {0xc5df8000}, {0xc5dfa000}, {0xc5dfc000}, {0xc5dfe000}, - {0xc5e00000}, {0xc5e02000}, {0xc5e04000}, {0xc5e06000}, - {0xc5e08000}, {0xc5e0a000}, {0xc5e0c000}, {0xc5e0e000}, - {0xc5e10000}, {0xc5e12000}, {0xc5e14000}, {0xc5e16000}, - {0xc5e18000}, {0xc5e1a000}, {0xc5e1c000}, {0xc5e1e000}, - {0xc5e20000}, {0xc5e22000}, {0xc5e24000}, {0xc5e26000}, - {0xc5e28000}, {0xc5e2a000}, {0xc5e2c000}, {0xc5e2e000}, - {0xc5e30000}, {0xc5e32000}, {0xc5e34000}, {0xc5e36000}, - {0xc5e38000}, {0xc5e3a000}, {0xc5e3c000}, {0xc5e3e000}, - {0xc5e40000}, {0xc5e42000}, {0xc5e44000}, {0xc5e46000}, - {0xc5e48000}, {0xc5e4a000}, {0xc5e4c000}, {0xc5e4e000}, - {0xc5e50000}, {0xc5e52000}, {0xc5e54000}, {0xc5e56000}, - {0xc5e58000}, {0xc5e5a000}, {0xc5e5c000}, {0xc5e5e000}, - {0xc5e60000}, {0xc5e62000}, {0xc5e64000}, {0xc5e66000}, - {0xc5e68000}, {0xc5e6a000}, {0xc5e6c000}, {0xc5e6e000}, - {0xc5e70000}, {0xc5e72000}, {0xc5e74000}, {0xc5e76000}, - {0xc5e78000}, {0xc5e7a000}, {0xc5e7c000}, {0xc5e7e000}, - {0xc5e80000}, {0xc5e82000}, {0xc5e84000}, {0xc5e86000}, - {0xc5e88000}, {0xc5e8a000}, {0xc5e8c000}, {0xc5e8e000}, - {0xc5e90000}, {0xc5e92000}, {0xc5e94000}, {0xc5e96000}, - {0xc5e98000}, {0xc5e9a000}, {0xc5e9c000}, {0xc5e9e000}, - {0xc5ea0000}, {0xc5ea2000}, {0xc5ea4000}, {0xc5ea6000}, - {0xc5ea8000}, {0xc5eaa000}, {0xc5eac000}, {0xc5eae000}, - {0xc5eb0000}, {0xc5eb2000}, {0xc5eb4000}, {0xc5eb6000}, - {0xc5eb8000}, {0xc5eba000}, {0xc5ebc000}, {0xc5ebe000}, - {0xc5ec0000}, {0xc5ec2000}, {0xc5ec4000}, {0xc5ec6000}, - {0xc5ec8000}, {0xc5eca000}, {0xc5ecc000}, {0xc5ece000}, - {0xc5ed0000}, {0xc5ed2000}, {0xc5ed4000}, {0xc5ed6000}, - {0xc5ed8000}, {0xc5eda000}, {0xc5edc000}, {0xc5ede000}, - {0xc5ee0000}, {0xc5ee2000}, {0xc5ee4000}, {0xc5ee6000}, - {0xc5ee8000}, {0xc5eea000}, {0xc5eec000}, {0xc5eee000}, - {0xc5ef0000}, {0xc5ef2000}, {0xc5ef4000}, {0xc5ef6000}, - {0xc5ef8000}, {0xc5efa000}, {0xc5efc000}, {0xc5efe000}, - {0xc5f00000}, {0xc5f02000}, {0xc5f04000}, {0xc5f06000}, - {0xc5f08000}, {0xc5f0a000}, {0xc5f0c000}, {0xc5f0e000}, - {0xc5f10000}, {0xc5f12000}, {0xc5f14000}, {0xc5f16000}, - {0xc5f18000}, {0xc5f1a000}, {0xc5f1c000}, {0xc5f1e000}, - {0xc5f20000}, {0xc5f22000}, {0xc5f24000}, {0xc5f26000}, - {0xc5f28000}, {0xc5f2a000}, {0xc5f2c000}, {0xc5f2e000}, - {0xc5f30000}, {0xc5f32000}, {0xc5f34000}, {0xc5f36000}, - {0xc5f38000}, {0xc5f3a000}, {0xc5f3c000}, {0xc5f3e000}, - {0xc5f40000}, {0xc5f42000}, {0xc5f44000}, {0xc5f46000}, - {0xc5f48000}, {0xc5f4a000}, {0xc5f4c000}, {0xc5f4e000}, - {0xc5f50000}, {0xc5f52000}, {0xc5f54000}, {0xc5f56000}, - {0xc5f58000}, {0xc5f5a000}, {0xc5f5c000}, {0xc5f5e000}, - {0xc5f60000}, {0xc5f62000}, {0xc5f64000}, {0xc5f66000}, - {0xc5f68000}, {0xc5f6a000}, {0xc5f6c000}, {0xc5f6e000}, - {0xc5f70000}, {0xc5f72000}, {0xc5f74000}, {0xc5f76000}, - {0xc5f78000}, {0xc5f7a000}, {0xc5f7c000}, {0xc5f7e000}, - {0xc5f80000}, {0xc5f82000}, {0xc5f84000}, {0xc5f86000}, - {0xc5f88000}, {0xc5f8a000}, {0xc5f8c000}, {0xc5f8e000}, - {0xc5f90000}, {0xc5f92000}, {0xc5f94000}, {0xc5f96000}, - {0xc5f98000}, {0xc5f9a000}, {0xc5f9c000}, {0xc5f9e000}, - {0xc5fa0000}, {0xc5fa2000}, {0xc5fa4000}, {0xc5fa6000}, - {0xc5fa8000}, {0xc5faa000}, {0xc5fac000}, {0xc5fae000}, - {0xc5fb0000}, {0xc5fb2000}, {0xc5fb4000}, {0xc5fb6000}, - {0xc5fb8000}, {0xc5fba000}, {0xc5fbc000}, {0xc5fbe000}, - {0xc5fc0000}, {0xc5fc2000}, {0xc5fc4000}, {0xc5fc6000}, - {0xc5fc8000}, {0xc5fca000}, {0xc5fcc000}, {0xc5fce000}, - {0xc5fd0000}, {0xc5fd2000}, {0xc5fd4000}, {0xc5fd6000}, - {0xc5fd8000}, {0xc5fda000}, {0xc5fdc000}, {0xc5fde000}, - {0xc5fe0000}, {0xc5fe2000}, {0xc5fe4000}, {0xc5fe6000}, - {0xc5fe8000}, {0xc5fea000}, {0xc5fec000}, {0xc5fee000}, - {0xc5ff0000}, {0xc5ff2000}, {0xc5ff4000}, {0xc5ff6000}, - {0xc5ff8000}, {0xc5ffa000}, {0xc5ffc000}, {0xc5ffe000}, - {0xc6000000}, {0xc6002000}, {0xc6004000}, {0xc6006000}, - {0xc6008000}, {0xc600a000}, {0xc600c000}, {0xc600e000}, - {0xc6010000}, {0xc6012000}, {0xc6014000}, {0xc6016000}, - {0xc6018000}, {0xc601a000}, {0xc601c000}, {0xc601e000}, - {0xc6020000}, {0xc6022000}, {0xc6024000}, {0xc6026000}, - {0xc6028000}, {0xc602a000}, {0xc602c000}, {0xc602e000}, - {0xc6030000}, {0xc6032000}, {0xc6034000}, {0xc6036000}, - {0xc6038000}, {0xc603a000}, {0xc603c000}, {0xc603e000}, - {0xc6040000}, {0xc6042000}, {0xc6044000}, {0xc6046000}, - {0xc6048000}, {0xc604a000}, {0xc604c000}, {0xc604e000}, - {0xc6050000}, {0xc6052000}, {0xc6054000}, {0xc6056000}, - {0xc6058000}, {0xc605a000}, {0xc605c000}, {0xc605e000}, - {0xc6060000}, {0xc6062000}, {0xc6064000}, {0xc6066000}, - {0xc6068000}, {0xc606a000}, {0xc606c000}, {0xc606e000}, - {0xc6070000}, {0xc6072000}, {0xc6074000}, {0xc6076000}, - {0xc6078000}, {0xc607a000}, {0xc607c000}, {0xc607e000}, - {0xc6080000}, {0xc6082000}, {0xc6084000}, {0xc6086000}, - {0xc6088000}, {0xc608a000}, {0xc608c000}, {0xc608e000}, - {0xc6090000}, {0xc6092000}, {0xc6094000}, {0xc6096000}, - {0xc6098000}, {0xc609a000}, {0xc609c000}, {0xc609e000}, - {0xc60a0000}, {0xc60a2000}, {0xc60a4000}, {0xc60a6000}, - {0xc60a8000}, {0xc60aa000}, {0xc60ac000}, {0xc60ae000}, - {0xc60b0000}, {0xc60b2000}, {0xc60b4000}, {0xc60b6000}, - {0xc60b8000}, {0xc60ba000}, {0xc60bc000}, {0xc60be000}, - {0xc60c0000}, {0xc60c2000}, {0xc60c4000}, {0xc60c6000}, - {0xc60c8000}, {0xc60ca000}, {0xc60cc000}, {0xc60ce000}, - {0xc60d0000}, {0xc60d2000}, {0xc60d4000}, {0xc60d6000}, - {0xc60d8000}, {0xc60da000}, {0xc60dc000}, {0xc60de000}, - {0xc60e0000}, {0xc60e2000}, {0xc60e4000}, {0xc60e6000}, - {0xc60e8000}, {0xc60ea000}, {0xc60ec000}, {0xc60ee000}, - {0xc60f0000}, {0xc60f2000}, {0xc60f4000}, {0xc60f6000}, - {0xc60f8000}, {0xc60fa000}, {0xc60fc000}, {0xc60fe000}, - {0xc6100000}, {0xc6102000}, {0xc6104000}, {0xc6106000}, - {0xc6108000}, {0xc610a000}, {0xc610c000}, {0xc610e000}, - {0xc6110000}, {0xc6112000}, {0xc6114000}, {0xc6116000}, - {0xc6118000}, {0xc611a000}, {0xc611c000}, {0xc611e000}, - {0xc6120000}, {0xc6122000}, {0xc6124000}, {0xc6126000}, - {0xc6128000}, {0xc612a000}, {0xc612c000}, {0xc612e000}, - {0xc6130000}, {0xc6132000}, {0xc6134000}, {0xc6136000}, - {0xc6138000}, {0xc613a000}, {0xc613c000}, {0xc613e000}, - {0xc6140000}, {0xc6142000}, {0xc6144000}, {0xc6146000}, - {0xc6148000}, {0xc614a000}, {0xc614c000}, {0xc614e000}, - {0xc6150000}, {0xc6152000}, {0xc6154000}, {0xc6156000}, - {0xc6158000}, {0xc615a000}, {0xc615c000}, {0xc615e000}, - {0xc6160000}, {0xc6162000}, {0xc6164000}, {0xc6166000}, - {0xc6168000}, {0xc616a000}, {0xc616c000}, {0xc616e000}, - {0xc6170000}, {0xc6172000}, {0xc6174000}, {0xc6176000}, - {0xc6178000}, {0xc617a000}, {0xc617c000}, {0xc617e000}, - {0xc6180000}, {0xc6182000}, {0xc6184000}, {0xc6186000}, - {0xc6188000}, {0xc618a000}, {0xc618c000}, {0xc618e000}, - {0xc6190000}, {0xc6192000}, {0xc6194000}, {0xc6196000}, - {0xc6198000}, {0xc619a000}, {0xc619c000}, {0xc619e000}, - {0xc61a0000}, {0xc61a2000}, {0xc61a4000}, {0xc61a6000}, - {0xc61a8000}, {0xc61aa000}, {0xc61ac000}, {0xc61ae000}, - {0xc61b0000}, {0xc61b2000}, {0xc61b4000}, {0xc61b6000}, - {0xc61b8000}, {0xc61ba000}, {0xc61bc000}, {0xc61be000}, - {0xc61c0000}, {0xc61c2000}, {0xc61c4000}, {0xc61c6000}, - {0xc61c8000}, {0xc61ca000}, {0xc61cc000}, {0xc61ce000}, - {0xc61d0000}, {0xc61d2000}, {0xc61d4000}, {0xc61d6000}, - {0xc61d8000}, {0xc61da000}, {0xc61dc000}, {0xc61de000}, - {0xc61e0000}, {0xc61e2000}, {0xc61e4000}, {0xc61e6000}, - {0xc61e8000}, {0xc61ea000}, {0xc61ec000}, {0xc61ee000}, - {0xc61f0000}, {0xc61f2000}, {0xc61f4000}, {0xc61f6000}, - {0xc61f8000}, {0xc61fa000}, {0xc61fc000}, {0xc61fe000}, - {0xc6200000}, {0xc6202000}, {0xc6204000}, {0xc6206000}, - {0xc6208000}, {0xc620a000}, {0xc620c000}, {0xc620e000}, - {0xc6210000}, {0xc6212000}, {0xc6214000}, {0xc6216000}, - {0xc6218000}, {0xc621a000}, {0xc621c000}, {0xc621e000}, - {0xc6220000}, {0xc6222000}, {0xc6224000}, {0xc6226000}, - {0xc6228000}, {0xc622a000}, {0xc622c000}, {0xc622e000}, - {0xc6230000}, {0xc6232000}, {0xc6234000}, {0xc6236000}, - {0xc6238000}, {0xc623a000}, {0xc623c000}, {0xc623e000}, - {0xc6240000}, {0xc6242000}, {0xc6244000}, {0xc6246000}, - {0xc6248000}, {0xc624a000}, {0xc624c000}, {0xc624e000}, - {0xc6250000}, {0xc6252000}, {0xc6254000}, {0xc6256000}, - {0xc6258000}, {0xc625a000}, {0xc625c000}, {0xc625e000}, - {0xc6260000}, {0xc6262000}, {0xc6264000}, {0xc6266000}, - {0xc6268000}, {0xc626a000}, {0xc626c000}, {0xc626e000}, - {0xc6270000}, {0xc6272000}, {0xc6274000}, {0xc6276000}, - {0xc6278000}, {0xc627a000}, {0xc627c000}, {0xc627e000}, - {0xc6280000}, {0xc6282000}, {0xc6284000}, {0xc6286000}, - {0xc6288000}, {0xc628a000}, {0xc628c000}, {0xc628e000}, - {0xc6290000}, {0xc6292000}, {0xc6294000}, {0xc6296000}, - {0xc6298000}, {0xc629a000}, {0xc629c000}, {0xc629e000}, - {0xc62a0000}, {0xc62a2000}, {0xc62a4000}, {0xc62a6000}, - {0xc62a8000}, {0xc62aa000}, {0xc62ac000}, {0xc62ae000}, - {0xc62b0000}, {0xc62b2000}, {0xc62b4000}, {0xc62b6000}, - {0xc62b8000}, {0xc62ba000}, {0xc62bc000}, {0xc62be000}, - {0xc62c0000}, {0xc62c2000}, {0xc62c4000}, {0xc62c6000}, - {0xc62c8000}, {0xc62ca000}, {0xc62cc000}, {0xc62ce000}, - {0xc62d0000}, {0xc62d2000}, {0xc62d4000}, {0xc62d6000}, - {0xc62d8000}, {0xc62da000}, {0xc62dc000}, {0xc62de000}, - {0xc62e0000}, {0xc62e2000}, {0xc62e4000}, {0xc62e6000}, - {0xc62e8000}, {0xc62ea000}, {0xc62ec000}, {0xc62ee000}, - {0xc62f0000}, {0xc62f2000}, {0xc62f4000}, {0xc62f6000}, - {0xc62f8000}, {0xc62fa000}, {0xc62fc000}, {0xc62fe000}, - {0xc6300000}, {0xc6302000}, {0xc6304000}, {0xc6306000}, - {0xc6308000}, {0xc630a000}, {0xc630c000}, {0xc630e000}, - {0xc6310000}, {0xc6312000}, {0xc6314000}, {0xc6316000}, - {0xc6318000}, {0xc631a000}, {0xc631c000}, {0xc631e000}, - {0xc6320000}, {0xc6322000}, {0xc6324000}, {0xc6326000}, - {0xc6328000}, {0xc632a000}, {0xc632c000}, {0xc632e000}, - {0xc6330000}, {0xc6332000}, {0xc6334000}, {0xc6336000}, - {0xc6338000}, {0xc633a000}, {0xc633c000}, {0xc633e000}, - {0xc6340000}, {0xc6342000}, {0xc6344000}, {0xc6346000}, - {0xc6348000}, {0xc634a000}, {0xc634c000}, {0xc634e000}, - {0xc6350000}, {0xc6352000}, {0xc6354000}, {0xc6356000}, - {0xc6358000}, {0xc635a000}, {0xc635c000}, {0xc635e000}, - {0xc6360000}, {0xc6362000}, {0xc6364000}, {0xc6366000}, - {0xc6368000}, {0xc636a000}, {0xc636c000}, {0xc636e000}, - {0xc6370000}, {0xc6372000}, {0xc6374000}, {0xc6376000}, - {0xc6378000}, {0xc637a000}, {0xc637c000}, {0xc637e000}, - {0xc6380000}, {0xc6382000}, {0xc6384000}, {0xc6386000}, - {0xc6388000}, {0xc638a000}, {0xc638c000}, {0xc638e000}, - {0xc6390000}, {0xc6392000}, {0xc6394000}, {0xc6396000}, - {0xc6398000}, {0xc639a000}, {0xc639c000}, {0xc639e000}, - {0xc63a0000}, {0xc63a2000}, {0xc63a4000}, {0xc63a6000}, - {0xc63a8000}, {0xc63aa000}, {0xc63ac000}, {0xc63ae000}, - {0xc63b0000}, {0xc63b2000}, {0xc63b4000}, {0xc63b6000}, - {0xc63b8000}, {0xc63ba000}, {0xc63bc000}, {0xc63be000}, - {0xc63c0000}, {0xc63c2000}, {0xc63c4000}, {0xc63c6000}, - {0xc63c8000}, {0xc63ca000}, {0xc63cc000}, {0xc63ce000}, - {0xc63d0000}, {0xc63d2000}, {0xc63d4000}, {0xc63d6000}, - {0xc63d8000}, {0xc63da000}, {0xc63dc000}, {0xc63de000}, - {0xc63e0000}, {0xc63e2000}, {0xc63e4000}, {0xc63e6000}, - {0xc63e8000}, {0xc63ea000}, {0xc63ec000}, {0xc63ee000}, - {0xc63f0000}, {0xc63f2000}, {0xc63f4000}, {0xc63f6000}, - {0xc63f8000}, {0xc63fa000}, {0xc63fc000}, {0xc63fe000}, - {0xc6400000}, {0xc6402000}, {0xc6404000}, {0xc6406000}, - {0xc6408000}, {0xc640a000}, {0xc640c000}, {0xc640e000}, - {0xc6410000}, {0xc6412000}, {0xc6414000}, {0xc6416000}, - {0xc6418000}, {0xc641a000}, {0xc641c000}, {0xc641e000}, - {0xc6420000}, {0xc6422000}, {0xc6424000}, {0xc6426000}, - {0xc6428000}, {0xc642a000}, {0xc642c000}, {0xc642e000}, - {0xc6430000}, {0xc6432000}, {0xc6434000}, {0xc6436000}, - {0xc6438000}, {0xc643a000}, {0xc643c000}, {0xc643e000}, - {0xc6440000}, {0xc6442000}, {0xc6444000}, {0xc6446000}, - {0xc6448000}, {0xc644a000}, {0xc644c000}, {0xc644e000}, - {0xc6450000}, {0xc6452000}, {0xc6454000}, {0xc6456000}, - {0xc6458000}, {0xc645a000}, {0xc645c000}, {0xc645e000}, - {0xc6460000}, {0xc6462000}, {0xc6464000}, {0xc6466000}, - {0xc6468000}, {0xc646a000}, {0xc646c000}, {0xc646e000}, - {0xc6470000}, {0xc6472000}, {0xc6474000}, {0xc6476000}, - {0xc6478000}, {0xc647a000}, {0xc647c000}, {0xc647e000}, - {0xc6480000}, {0xc6482000}, {0xc6484000}, {0xc6486000}, - {0xc6488000}, {0xc648a000}, {0xc648c000}, {0xc648e000}, - {0xc6490000}, {0xc6492000}, {0xc6494000}, {0xc6496000}, - {0xc6498000}, {0xc649a000}, {0xc649c000}, {0xc649e000}, - {0xc64a0000}, {0xc64a2000}, {0xc64a4000}, {0xc64a6000}, - {0xc64a8000}, {0xc64aa000}, {0xc64ac000}, {0xc64ae000}, - {0xc64b0000}, {0xc64b2000}, {0xc64b4000}, {0xc64b6000}, - {0xc64b8000}, {0xc64ba000}, {0xc64bc000}, {0xc64be000}, - {0xc64c0000}, {0xc64c2000}, {0xc64c4000}, {0xc64c6000}, - {0xc64c8000}, {0xc64ca000}, {0xc64cc000}, {0xc64ce000}, - {0xc64d0000}, {0xc64d2000}, {0xc64d4000}, {0xc64d6000}, - {0xc64d8000}, {0xc64da000}, {0xc64dc000}, {0xc64de000}, - {0xc64e0000}, {0xc64e2000}, {0xc64e4000}, {0xc64e6000}, - {0xc64e8000}, {0xc64ea000}, {0xc64ec000}, {0xc64ee000}, - {0xc64f0000}, {0xc64f2000}, {0xc64f4000}, {0xc64f6000}, - {0xc64f8000}, {0xc64fa000}, {0xc64fc000}, {0xc64fe000}, - {0xc6500000}, {0xc6502000}, {0xc6504000}, {0xc6506000}, - {0xc6508000}, {0xc650a000}, {0xc650c000}, {0xc650e000}, - {0xc6510000}, {0xc6512000}, {0xc6514000}, {0xc6516000}, - {0xc6518000}, {0xc651a000}, {0xc651c000}, {0xc651e000}, - {0xc6520000}, {0xc6522000}, {0xc6524000}, {0xc6526000}, - {0xc6528000}, {0xc652a000}, {0xc652c000}, {0xc652e000}, - {0xc6530000}, {0xc6532000}, {0xc6534000}, {0xc6536000}, - {0xc6538000}, {0xc653a000}, {0xc653c000}, {0xc653e000}, - {0xc6540000}, {0xc6542000}, {0xc6544000}, {0xc6546000}, - {0xc6548000}, {0xc654a000}, {0xc654c000}, {0xc654e000}, - {0xc6550000}, {0xc6552000}, {0xc6554000}, {0xc6556000}, - {0xc6558000}, {0xc655a000}, {0xc655c000}, {0xc655e000}, - {0xc6560000}, {0xc6562000}, {0xc6564000}, {0xc6566000}, - {0xc6568000}, {0xc656a000}, {0xc656c000}, {0xc656e000}, - {0xc6570000}, {0xc6572000}, {0xc6574000}, {0xc6576000}, - {0xc6578000}, {0xc657a000}, {0xc657c000}, {0xc657e000}, - {0xc6580000}, {0xc6582000}, {0xc6584000}, {0xc6586000}, - {0xc6588000}, {0xc658a000}, {0xc658c000}, {0xc658e000}, - {0xc6590000}, {0xc6592000}, {0xc6594000}, {0xc6596000}, - {0xc6598000}, {0xc659a000}, {0xc659c000}, {0xc659e000}, - {0xc65a0000}, {0xc65a2000}, {0xc65a4000}, {0xc65a6000}, - {0xc65a8000}, {0xc65aa000}, {0xc65ac000}, {0xc65ae000}, - {0xc65b0000}, {0xc65b2000}, {0xc65b4000}, {0xc65b6000}, - {0xc65b8000}, {0xc65ba000}, {0xc65bc000}, {0xc65be000}, - {0xc65c0000}, {0xc65c2000}, {0xc65c4000}, {0xc65c6000}, - {0xc65c8000}, {0xc65ca000}, {0xc65cc000}, {0xc65ce000}, - {0xc65d0000}, {0xc65d2000}, {0xc65d4000}, {0xc65d6000}, - {0xc65d8000}, {0xc65da000}, {0xc65dc000}, {0xc65de000}, - {0xc65e0000}, {0xc65e2000}, {0xc65e4000}, {0xc65e6000}, - {0xc65e8000}, {0xc65ea000}, {0xc65ec000}, {0xc65ee000}, - {0xc65f0000}, {0xc65f2000}, {0xc65f4000}, {0xc65f6000}, - {0xc65f8000}, {0xc65fa000}, {0xc65fc000}, {0xc65fe000}, - {0xc6600000}, {0xc6602000}, {0xc6604000}, {0xc6606000}, - {0xc6608000}, {0xc660a000}, {0xc660c000}, {0xc660e000}, - {0xc6610000}, {0xc6612000}, {0xc6614000}, {0xc6616000}, - {0xc6618000}, {0xc661a000}, {0xc661c000}, {0xc661e000}, - {0xc6620000}, {0xc6622000}, {0xc6624000}, {0xc6626000}, - {0xc6628000}, {0xc662a000}, {0xc662c000}, {0xc662e000}, - {0xc6630000}, {0xc6632000}, {0xc6634000}, {0xc6636000}, - {0xc6638000}, {0xc663a000}, {0xc663c000}, {0xc663e000}, - {0xc6640000}, {0xc6642000}, {0xc6644000}, {0xc6646000}, - {0xc6648000}, {0xc664a000}, {0xc664c000}, {0xc664e000}, - {0xc6650000}, {0xc6652000}, {0xc6654000}, {0xc6656000}, - {0xc6658000}, {0xc665a000}, {0xc665c000}, {0xc665e000}, - {0xc6660000}, {0xc6662000}, {0xc6664000}, {0xc6666000}, - {0xc6668000}, {0xc666a000}, {0xc666c000}, {0xc666e000}, - {0xc6670000}, {0xc6672000}, {0xc6674000}, {0xc6676000}, - {0xc6678000}, {0xc667a000}, {0xc667c000}, {0xc667e000}, - {0xc6680000}, {0xc6682000}, {0xc6684000}, {0xc6686000}, - {0xc6688000}, {0xc668a000}, {0xc668c000}, {0xc668e000}, - {0xc6690000}, {0xc6692000}, {0xc6694000}, {0xc6696000}, - {0xc6698000}, {0xc669a000}, {0xc669c000}, {0xc669e000}, - {0xc66a0000}, {0xc66a2000}, {0xc66a4000}, {0xc66a6000}, - {0xc66a8000}, {0xc66aa000}, {0xc66ac000}, {0xc66ae000}, - {0xc66b0000}, {0xc66b2000}, {0xc66b4000}, {0xc66b6000}, - {0xc66b8000}, {0xc66ba000}, {0xc66bc000}, {0xc66be000}, - {0xc66c0000}, {0xc66c2000}, {0xc66c4000}, {0xc66c6000}, - {0xc66c8000}, {0xc66ca000}, {0xc66cc000}, {0xc66ce000}, - {0xc66d0000}, {0xc66d2000}, {0xc66d4000}, {0xc66d6000}, - {0xc66d8000}, {0xc66da000}, {0xc66dc000}, {0xc66de000}, - {0xc66e0000}, {0xc66e2000}, {0xc66e4000}, {0xc66e6000}, - {0xc66e8000}, {0xc66ea000}, {0xc66ec000}, {0xc66ee000}, - {0xc66f0000}, {0xc66f2000}, {0xc66f4000}, {0xc66f6000}, - {0xc66f8000}, {0xc66fa000}, {0xc66fc000}, {0xc66fe000}, - {0xc6700000}, {0xc6702000}, {0xc6704000}, {0xc6706000}, - {0xc6708000}, {0xc670a000}, {0xc670c000}, {0xc670e000}, - {0xc6710000}, {0xc6712000}, {0xc6714000}, {0xc6716000}, - {0xc6718000}, {0xc671a000}, {0xc671c000}, {0xc671e000}, - {0xc6720000}, {0xc6722000}, {0xc6724000}, {0xc6726000}, - {0xc6728000}, {0xc672a000}, {0xc672c000}, {0xc672e000}, - {0xc6730000}, {0xc6732000}, {0xc6734000}, {0xc6736000}, - {0xc6738000}, {0xc673a000}, {0xc673c000}, {0xc673e000}, - {0xc6740000}, {0xc6742000}, {0xc6744000}, {0xc6746000}, - {0xc6748000}, {0xc674a000}, {0xc674c000}, {0xc674e000}, - {0xc6750000}, {0xc6752000}, {0xc6754000}, {0xc6756000}, - {0xc6758000}, {0xc675a000}, {0xc675c000}, {0xc675e000}, - {0xc6760000}, {0xc6762000}, {0xc6764000}, {0xc6766000}, - {0xc6768000}, {0xc676a000}, {0xc676c000}, {0xc676e000}, - {0xc6770000}, {0xc6772000}, {0xc6774000}, {0xc6776000}, - {0xc6778000}, {0xc677a000}, {0xc677c000}, {0xc677e000}, - {0xc6780000}, {0xc6782000}, {0xc6784000}, {0xc6786000}, - {0xc6788000}, {0xc678a000}, {0xc678c000}, {0xc678e000}, - {0xc6790000}, {0xc6792000}, {0xc6794000}, {0xc6796000}, - {0xc6798000}, {0xc679a000}, {0xc679c000}, {0xc679e000}, - {0xc67a0000}, {0xc67a2000}, {0xc67a4000}, {0xc67a6000}, - {0xc67a8000}, {0xc67aa000}, {0xc67ac000}, {0xc67ae000}, - {0xc67b0000}, {0xc67b2000}, {0xc67b4000}, {0xc67b6000}, - {0xc67b8000}, {0xc67ba000}, {0xc67bc000}, {0xc67be000}, - {0xc67c0000}, {0xc67c2000}, {0xc67c4000}, {0xc67c6000}, - {0xc67c8000}, {0xc67ca000}, {0xc67cc000}, {0xc67ce000}, - {0xc67d0000}, {0xc67d2000}, {0xc67d4000}, {0xc67d6000}, - {0xc67d8000}, {0xc67da000}, {0xc67dc000}, {0xc67de000}, - {0xc67e0000}, {0xc67e2000}, {0xc67e4000}, {0xc67e6000}, - {0xc67e8000}, {0xc67ea000}, {0xc67ec000}, {0xc67ee000}, - {0xc67f0000}, {0xc67f2000}, {0xc67f4000}, {0xc67f6000}, - {0xc67f8000}, {0xc67fa000}, {0xc67fc000}, {0xc67fe000}, - {0xc6800000}, {0xc6802000}, {0xc6804000}, {0xc6806000}, - {0xc6808000}, {0xc680a000}, {0xc680c000}, {0xc680e000}, - {0xc6810000}, {0xc6812000}, {0xc6814000}, {0xc6816000}, - {0xc6818000}, {0xc681a000}, {0xc681c000}, {0xc681e000}, - {0xc6820000}, {0xc6822000}, {0xc6824000}, {0xc6826000}, - {0xc6828000}, {0xc682a000}, {0xc682c000}, {0xc682e000}, - {0xc6830000}, {0xc6832000}, {0xc6834000}, {0xc6836000}, - {0xc6838000}, {0xc683a000}, {0xc683c000}, {0xc683e000}, - {0xc6840000}, {0xc6842000}, {0xc6844000}, {0xc6846000}, - {0xc6848000}, {0xc684a000}, {0xc684c000}, {0xc684e000}, - {0xc6850000}, {0xc6852000}, {0xc6854000}, {0xc6856000}, - {0xc6858000}, {0xc685a000}, {0xc685c000}, {0xc685e000}, - {0xc6860000}, {0xc6862000}, {0xc6864000}, {0xc6866000}, - {0xc6868000}, {0xc686a000}, {0xc686c000}, {0xc686e000}, - {0xc6870000}, {0xc6872000}, {0xc6874000}, {0xc6876000}, - {0xc6878000}, {0xc687a000}, {0xc687c000}, {0xc687e000}, - {0xc6880000}, {0xc6882000}, {0xc6884000}, {0xc6886000}, - {0xc6888000}, {0xc688a000}, {0xc688c000}, {0xc688e000}, - {0xc6890000}, {0xc6892000}, {0xc6894000}, {0xc6896000}, - {0xc6898000}, {0xc689a000}, {0xc689c000}, {0xc689e000}, - {0xc68a0000}, {0xc68a2000}, {0xc68a4000}, {0xc68a6000}, - {0xc68a8000}, {0xc68aa000}, {0xc68ac000}, {0xc68ae000}, - {0xc68b0000}, {0xc68b2000}, {0xc68b4000}, {0xc68b6000}, - {0xc68b8000}, {0xc68ba000}, {0xc68bc000}, {0xc68be000}, - {0xc68c0000}, {0xc68c2000}, {0xc68c4000}, {0xc68c6000}, - {0xc68c8000}, {0xc68ca000}, {0xc68cc000}, {0xc68ce000}, - {0xc68d0000}, {0xc68d2000}, {0xc68d4000}, {0xc68d6000}, - {0xc68d8000}, {0xc68da000}, {0xc68dc000}, {0xc68de000}, - {0xc68e0000}, {0xc68e2000}, {0xc68e4000}, {0xc68e6000}, - {0xc68e8000}, {0xc68ea000}, {0xc68ec000}, {0xc68ee000}, - {0xc68f0000}, {0xc68f2000}, {0xc68f4000}, {0xc68f6000}, - {0xc68f8000}, {0xc68fa000}, {0xc68fc000}, {0xc68fe000}, - {0xc6900000}, {0xc6902000}, {0xc6904000}, {0xc6906000}, - {0xc6908000}, {0xc690a000}, {0xc690c000}, {0xc690e000}, - {0xc6910000}, {0xc6912000}, {0xc6914000}, {0xc6916000}, - {0xc6918000}, {0xc691a000}, {0xc691c000}, {0xc691e000}, - {0xc6920000}, {0xc6922000}, {0xc6924000}, {0xc6926000}, - {0xc6928000}, {0xc692a000}, {0xc692c000}, {0xc692e000}, - {0xc6930000}, {0xc6932000}, {0xc6934000}, {0xc6936000}, - {0xc6938000}, {0xc693a000}, {0xc693c000}, {0xc693e000}, - {0xc6940000}, {0xc6942000}, {0xc6944000}, {0xc6946000}, - {0xc6948000}, {0xc694a000}, {0xc694c000}, {0xc694e000}, - {0xc6950000}, {0xc6952000}, {0xc6954000}, {0xc6956000}, - {0xc6958000}, {0xc695a000}, {0xc695c000}, {0xc695e000}, - {0xc6960000}, {0xc6962000}, {0xc6964000}, {0xc6966000}, - {0xc6968000}, {0xc696a000}, {0xc696c000}, {0xc696e000}, - {0xc6970000}, {0xc6972000}, {0xc6974000}, {0xc6976000}, - {0xc6978000}, {0xc697a000}, {0xc697c000}, {0xc697e000}, - {0xc6980000}, {0xc6982000}, {0xc6984000}, {0xc6986000}, - {0xc6988000}, {0xc698a000}, {0xc698c000}, {0xc698e000}, - {0xc6990000}, {0xc6992000}, {0xc6994000}, {0xc6996000}, - {0xc6998000}, {0xc699a000}, {0xc699c000}, {0xc699e000}, - {0xc69a0000}, {0xc69a2000}, {0xc69a4000}, {0xc69a6000}, - {0xc69a8000}, {0xc69aa000}, {0xc69ac000}, {0xc69ae000}, - {0xc69b0000}, {0xc69b2000}, {0xc69b4000}, {0xc69b6000}, - {0xc69b8000}, {0xc69ba000}, {0xc69bc000}, {0xc69be000}, - {0xc69c0000}, {0xc69c2000}, {0xc69c4000}, {0xc69c6000}, - {0xc69c8000}, {0xc69ca000}, {0xc69cc000}, {0xc69ce000}, - {0xc69d0000}, {0xc69d2000}, {0xc69d4000}, {0xc69d6000}, - {0xc69d8000}, {0xc69da000}, {0xc69dc000}, {0xc69de000}, - {0xc69e0000}, {0xc69e2000}, {0xc69e4000}, {0xc69e6000}, - {0xc69e8000}, {0xc69ea000}, {0xc69ec000}, {0xc69ee000}, - {0xc69f0000}, {0xc69f2000}, {0xc69f4000}, {0xc69f6000}, - {0xc69f8000}, {0xc69fa000}, {0xc69fc000}, {0xc69fe000}, - {0xc6a00000}, {0xc6a02000}, {0xc6a04000}, {0xc6a06000}, - {0xc6a08000}, {0xc6a0a000}, {0xc6a0c000}, {0xc6a0e000}, - {0xc6a10000}, {0xc6a12000}, {0xc6a14000}, {0xc6a16000}, - {0xc6a18000}, {0xc6a1a000}, {0xc6a1c000}, {0xc6a1e000}, - {0xc6a20000}, {0xc6a22000}, {0xc6a24000}, {0xc6a26000}, - {0xc6a28000}, {0xc6a2a000}, {0xc6a2c000}, {0xc6a2e000}, - {0xc6a30000}, {0xc6a32000}, {0xc6a34000}, {0xc6a36000}, - {0xc6a38000}, {0xc6a3a000}, {0xc6a3c000}, {0xc6a3e000}, - {0xc6a40000}, {0xc6a42000}, {0xc6a44000}, {0xc6a46000}, - {0xc6a48000}, {0xc6a4a000}, {0xc6a4c000}, {0xc6a4e000}, - {0xc6a50000}, {0xc6a52000}, {0xc6a54000}, {0xc6a56000}, - {0xc6a58000}, {0xc6a5a000}, {0xc6a5c000}, {0xc6a5e000}, - {0xc6a60000}, {0xc6a62000}, {0xc6a64000}, {0xc6a66000}, - {0xc6a68000}, {0xc6a6a000}, {0xc6a6c000}, {0xc6a6e000}, - {0xc6a70000}, {0xc6a72000}, {0xc6a74000}, {0xc6a76000}, - {0xc6a78000}, {0xc6a7a000}, {0xc6a7c000}, {0xc6a7e000}, - {0xc6a80000}, {0xc6a82000}, {0xc6a84000}, {0xc6a86000}, - {0xc6a88000}, {0xc6a8a000}, {0xc6a8c000}, {0xc6a8e000}, - {0xc6a90000}, {0xc6a92000}, {0xc6a94000}, {0xc6a96000}, - {0xc6a98000}, {0xc6a9a000}, {0xc6a9c000}, {0xc6a9e000}, - {0xc6aa0000}, {0xc6aa2000}, {0xc6aa4000}, {0xc6aa6000}, - {0xc6aa8000}, {0xc6aaa000}, {0xc6aac000}, {0xc6aae000}, - {0xc6ab0000}, {0xc6ab2000}, {0xc6ab4000}, {0xc6ab6000}, - {0xc6ab8000}, {0xc6aba000}, {0xc6abc000}, {0xc6abe000}, - {0xc6ac0000}, {0xc6ac2000}, {0xc6ac4000}, {0xc6ac6000}, - {0xc6ac8000}, {0xc6aca000}, {0xc6acc000}, {0xc6ace000}, - {0xc6ad0000}, {0xc6ad2000}, {0xc6ad4000}, {0xc6ad6000}, - {0xc6ad8000}, {0xc6ada000}, {0xc6adc000}, {0xc6ade000}, - {0xc6ae0000}, {0xc6ae2000}, {0xc6ae4000}, {0xc6ae6000}, - {0xc6ae8000}, {0xc6aea000}, {0xc6aec000}, {0xc6aee000}, - {0xc6af0000}, {0xc6af2000}, {0xc6af4000}, {0xc6af6000}, - {0xc6af8000}, {0xc6afa000}, {0xc6afc000}, {0xc6afe000}, - {0xc6b00000}, {0xc6b02000}, {0xc6b04000}, {0xc6b06000}, - {0xc6b08000}, {0xc6b0a000}, {0xc6b0c000}, {0xc6b0e000}, - {0xc6b10000}, {0xc6b12000}, {0xc6b14000}, {0xc6b16000}, - {0xc6b18000}, {0xc6b1a000}, {0xc6b1c000}, {0xc6b1e000}, - {0xc6b20000}, {0xc6b22000}, {0xc6b24000}, {0xc6b26000}, - {0xc6b28000}, {0xc6b2a000}, {0xc6b2c000}, {0xc6b2e000}, - {0xc6b30000}, {0xc6b32000}, {0xc6b34000}, {0xc6b36000}, - {0xc6b38000}, {0xc6b3a000}, {0xc6b3c000}, {0xc6b3e000}, - {0xc6b40000}, {0xc6b42000}, {0xc6b44000}, {0xc6b46000}, - {0xc6b48000}, {0xc6b4a000}, {0xc6b4c000}, {0xc6b4e000}, - {0xc6b50000}, {0xc6b52000}, {0xc6b54000}, {0xc6b56000}, - {0xc6b58000}, {0xc6b5a000}, {0xc6b5c000}, {0xc6b5e000}, - {0xc6b60000}, {0xc6b62000}, {0xc6b64000}, {0xc6b66000}, - {0xc6b68000}, {0xc6b6a000}, {0xc6b6c000}, {0xc6b6e000}, - {0xc6b70000}, {0xc6b72000}, {0xc6b74000}, {0xc6b76000}, - {0xc6b78000}, {0xc6b7a000}, {0xc6b7c000}, {0xc6b7e000}, - {0xc6b80000}, {0xc6b82000}, {0xc6b84000}, {0xc6b86000}, - {0xc6b88000}, {0xc6b8a000}, {0xc6b8c000}, {0xc6b8e000}, - {0xc6b90000}, {0xc6b92000}, {0xc6b94000}, {0xc6b96000}, - {0xc6b98000}, {0xc6b9a000}, {0xc6b9c000}, {0xc6b9e000}, - {0xc6ba0000}, {0xc6ba2000}, {0xc6ba4000}, {0xc6ba6000}, - {0xc6ba8000}, {0xc6baa000}, {0xc6bac000}, {0xc6bae000}, - {0xc6bb0000}, {0xc6bb2000}, {0xc6bb4000}, {0xc6bb6000}, - {0xc6bb8000}, {0xc6bba000}, {0xc6bbc000}, {0xc6bbe000}, - {0xc6bc0000}, {0xc6bc2000}, {0xc6bc4000}, {0xc6bc6000}, - {0xc6bc8000}, {0xc6bca000}, {0xc6bcc000}, {0xc6bce000}, - {0xc6bd0000}, {0xc6bd2000}, {0xc6bd4000}, {0xc6bd6000}, - {0xc6bd8000}, {0xc6bda000}, {0xc6bdc000}, {0xc6bde000}, - {0xc6be0000}, {0xc6be2000}, {0xc6be4000}, {0xc6be6000}, - {0xc6be8000}, {0xc6bea000}, {0xc6bec000}, {0xc6bee000}, - {0xc6bf0000}, {0xc6bf2000}, {0xc6bf4000}, {0xc6bf6000}, - {0xc6bf8000}, {0xc6bfa000}, {0xc6bfc000}, {0xc6bfe000}, - {0xc6c00000}, {0xc6c02000}, {0xc6c04000}, {0xc6c06000}, - {0xc6c08000}, {0xc6c0a000}, {0xc6c0c000}, {0xc6c0e000}, - {0xc6c10000}, {0xc6c12000}, {0xc6c14000}, {0xc6c16000}, - {0xc6c18000}, {0xc6c1a000}, {0xc6c1c000}, {0xc6c1e000}, - {0xc6c20000}, {0xc6c22000}, {0xc6c24000}, {0xc6c26000}, - {0xc6c28000}, {0xc6c2a000}, {0xc6c2c000}, {0xc6c2e000}, - {0xc6c30000}, {0xc6c32000}, {0xc6c34000}, {0xc6c36000}, - {0xc6c38000}, {0xc6c3a000}, {0xc6c3c000}, {0xc6c3e000}, - {0xc6c40000}, {0xc6c42000}, {0xc6c44000}, {0xc6c46000}, - {0xc6c48000}, {0xc6c4a000}, {0xc6c4c000}, {0xc6c4e000}, - {0xc6c50000}, {0xc6c52000}, {0xc6c54000}, {0xc6c56000}, - {0xc6c58000}, {0xc6c5a000}, {0xc6c5c000}, {0xc6c5e000}, - {0xc6c60000}, {0xc6c62000}, {0xc6c64000}, {0xc6c66000}, - {0xc6c68000}, {0xc6c6a000}, {0xc6c6c000}, {0xc6c6e000}, - {0xc6c70000}, {0xc6c72000}, {0xc6c74000}, {0xc6c76000}, - {0xc6c78000}, {0xc6c7a000}, {0xc6c7c000}, {0xc6c7e000}, - {0xc6c80000}, {0xc6c82000}, {0xc6c84000}, {0xc6c86000}, - {0xc6c88000}, {0xc6c8a000}, {0xc6c8c000}, {0xc6c8e000}, - {0xc6c90000}, {0xc6c92000}, {0xc6c94000}, {0xc6c96000}, - {0xc6c98000}, {0xc6c9a000}, {0xc6c9c000}, {0xc6c9e000}, - {0xc6ca0000}, {0xc6ca2000}, {0xc6ca4000}, {0xc6ca6000}, - {0xc6ca8000}, {0xc6caa000}, {0xc6cac000}, {0xc6cae000}, - {0xc6cb0000}, {0xc6cb2000}, {0xc6cb4000}, {0xc6cb6000}, - {0xc6cb8000}, {0xc6cba000}, {0xc6cbc000}, {0xc6cbe000}, - {0xc6cc0000}, {0xc6cc2000}, {0xc6cc4000}, {0xc6cc6000}, - {0xc6cc8000}, {0xc6cca000}, {0xc6ccc000}, {0xc6cce000}, - {0xc6cd0000}, {0xc6cd2000}, {0xc6cd4000}, {0xc6cd6000}, - {0xc6cd8000}, {0xc6cda000}, {0xc6cdc000}, {0xc6cde000}, - {0xc6ce0000}, {0xc6ce2000}, {0xc6ce4000}, {0xc6ce6000}, - {0xc6ce8000}, {0xc6cea000}, {0xc6cec000}, {0xc6cee000}, - {0xc6cf0000}, {0xc6cf2000}, {0xc6cf4000}, {0xc6cf6000}, - {0xc6cf8000}, {0xc6cfa000}, {0xc6cfc000}, {0xc6cfe000}, - {0xc6d00000}, {0xc6d02000}, {0xc6d04000}, {0xc6d06000}, - {0xc6d08000}, {0xc6d0a000}, {0xc6d0c000}, {0xc6d0e000}, - {0xc6d10000}, {0xc6d12000}, {0xc6d14000}, {0xc6d16000}, - {0xc6d18000}, {0xc6d1a000}, {0xc6d1c000}, {0xc6d1e000}, - {0xc6d20000}, {0xc6d22000}, {0xc6d24000}, {0xc6d26000}, - {0xc6d28000}, {0xc6d2a000}, {0xc6d2c000}, {0xc6d2e000}, - {0xc6d30000}, {0xc6d32000}, {0xc6d34000}, {0xc6d36000}, - {0xc6d38000}, {0xc6d3a000}, {0xc6d3c000}, {0xc6d3e000}, - {0xc6d40000}, {0xc6d42000}, {0xc6d44000}, {0xc6d46000}, - {0xc6d48000}, {0xc6d4a000}, {0xc6d4c000}, {0xc6d4e000}, - {0xc6d50000}, {0xc6d52000}, {0xc6d54000}, {0xc6d56000}, - {0xc6d58000}, {0xc6d5a000}, {0xc6d5c000}, {0xc6d5e000}, - {0xc6d60000}, {0xc6d62000}, {0xc6d64000}, {0xc6d66000}, - {0xc6d68000}, {0xc6d6a000}, {0xc6d6c000}, {0xc6d6e000}, - {0xc6d70000}, {0xc6d72000}, {0xc6d74000}, {0xc6d76000}, - {0xc6d78000}, {0xc6d7a000}, {0xc6d7c000}, {0xc6d7e000}, - {0xc6d80000}, {0xc6d82000}, {0xc6d84000}, {0xc6d86000}, - {0xc6d88000}, {0xc6d8a000}, {0xc6d8c000}, {0xc6d8e000}, - {0xc6d90000}, {0xc6d92000}, {0xc6d94000}, {0xc6d96000}, - {0xc6d98000}, {0xc6d9a000}, {0xc6d9c000}, {0xc6d9e000}, - {0xc6da0000}, {0xc6da2000}, {0xc6da4000}, {0xc6da6000}, - {0xc6da8000}, {0xc6daa000}, {0xc6dac000}, {0xc6dae000}, - {0xc6db0000}, {0xc6db2000}, {0xc6db4000}, {0xc6db6000}, - {0xc6db8000}, {0xc6dba000}, {0xc6dbc000}, {0xc6dbe000}, - {0xc6dc0000}, {0xc6dc2000}, {0xc6dc4000}, {0xc6dc6000}, - {0xc6dc8000}, {0xc6dca000}, {0xc6dcc000}, {0xc6dce000}, - {0xc6dd0000}, {0xc6dd2000}, {0xc6dd4000}, {0xc6dd6000}, - {0xc6dd8000}, {0xc6dda000}, {0xc6ddc000}, {0xc6dde000}, - {0xc6de0000}, {0xc6de2000}, {0xc6de4000}, {0xc6de6000}, - {0xc6de8000}, {0xc6dea000}, {0xc6dec000}, {0xc6dee000}, - {0xc6df0000}, {0xc6df2000}, {0xc6df4000}, {0xc6df6000}, - {0xc6df8000}, {0xc6dfa000}, {0xc6dfc000}, {0xc6dfe000}, - {0xc6e00000}, {0xc6e02000}, {0xc6e04000}, {0xc6e06000}, - {0xc6e08000}, {0xc6e0a000}, {0xc6e0c000}, {0xc6e0e000}, - {0xc6e10000}, {0xc6e12000}, {0xc6e14000}, {0xc6e16000}, - {0xc6e18000}, {0xc6e1a000}, {0xc6e1c000}, {0xc6e1e000}, - {0xc6e20000}, {0xc6e22000}, {0xc6e24000}, {0xc6e26000}, - {0xc6e28000}, {0xc6e2a000}, {0xc6e2c000}, {0xc6e2e000}, - {0xc6e30000}, {0xc6e32000}, {0xc6e34000}, {0xc6e36000}, - {0xc6e38000}, {0xc6e3a000}, {0xc6e3c000}, {0xc6e3e000}, - {0xc6e40000}, {0xc6e42000}, {0xc6e44000}, {0xc6e46000}, - {0xc6e48000}, {0xc6e4a000}, {0xc6e4c000}, {0xc6e4e000}, - {0xc6e50000}, {0xc6e52000}, {0xc6e54000}, {0xc6e56000}, - {0xc6e58000}, {0xc6e5a000}, {0xc6e5c000}, {0xc6e5e000}, - {0xc6e60000}, {0xc6e62000}, {0xc6e64000}, {0xc6e66000}, - {0xc6e68000}, {0xc6e6a000}, {0xc6e6c000}, {0xc6e6e000}, - {0xc6e70000}, {0xc6e72000}, {0xc6e74000}, {0xc6e76000}, - {0xc6e78000}, {0xc6e7a000}, {0xc6e7c000}, {0xc6e7e000}, - {0xc6e80000}, {0xc6e82000}, {0xc6e84000}, {0xc6e86000}, - {0xc6e88000}, {0xc6e8a000}, {0xc6e8c000}, {0xc6e8e000}, - {0xc6e90000}, {0xc6e92000}, {0xc6e94000}, {0xc6e96000}, - {0xc6e98000}, {0xc6e9a000}, {0xc6e9c000}, {0xc6e9e000}, - {0xc6ea0000}, {0xc6ea2000}, {0xc6ea4000}, {0xc6ea6000}, - {0xc6ea8000}, {0xc6eaa000}, {0xc6eac000}, {0xc6eae000}, - {0xc6eb0000}, {0xc6eb2000}, {0xc6eb4000}, {0xc6eb6000}, - {0xc6eb8000}, {0xc6eba000}, {0xc6ebc000}, {0xc6ebe000}, - {0xc6ec0000}, {0xc6ec2000}, {0xc6ec4000}, {0xc6ec6000}, - {0xc6ec8000}, {0xc6eca000}, {0xc6ecc000}, {0xc6ece000}, - {0xc6ed0000}, {0xc6ed2000}, {0xc6ed4000}, {0xc6ed6000}, - {0xc6ed8000}, {0xc6eda000}, {0xc6edc000}, {0xc6ede000}, - {0xc6ee0000}, {0xc6ee2000}, {0xc6ee4000}, {0xc6ee6000}, - {0xc6ee8000}, {0xc6eea000}, {0xc6eec000}, {0xc6eee000}, - {0xc6ef0000}, {0xc6ef2000}, {0xc6ef4000}, {0xc6ef6000}, - {0xc6ef8000}, {0xc6efa000}, {0xc6efc000}, {0xc6efe000}, - {0xc6f00000}, {0xc6f02000}, {0xc6f04000}, {0xc6f06000}, - {0xc6f08000}, {0xc6f0a000}, {0xc6f0c000}, {0xc6f0e000}, - {0xc6f10000}, {0xc6f12000}, {0xc6f14000}, {0xc6f16000}, - {0xc6f18000}, {0xc6f1a000}, {0xc6f1c000}, {0xc6f1e000}, - {0xc6f20000}, {0xc6f22000}, {0xc6f24000}, {0xc6f26000}, - {0xc6f28000}, {0xc6f2a000}, {0xc6f2c000}, {0xc6f2e000}, - {0xc6f30000}, {0xc6f32000}, {0xc6f34000}, {0xc6f36000}, - {0xc6f38000}, {0xc6f3a000}, {0xc6f3c000}, {0xc6f3e000}, - {0xc6f40000}, {0xc6f42000}, {0xc6f44000}, {0xc6f46000}, - {0xc6f48000}, {0xc6f4a000}, {0xc6f4c000}, {0xc6f4e000}, - {0xc6f50000}, {0xc6f52000}, {0xc6f54000}, {0xc6f56000}, - {0xc6f58000}, {0xc6f5a000}, {0xc6f5c000}, {0xc6f5e000}, - {0xc6f60000}, {0xc6f62000}, {0xc6f64000}, {0xc6f66000}, - {0xc6f68000}, {0xc6f6a000}, {0xc6f6c000}, {0xc6f6e000}, - {0xc6f70000}, {0xc6f72000}, {0xc6f74000}, {0xc6f76000}, - {0xc6f78000}, {0xc6f7a000}, {0xc6f7c000}, {0xc6f7e000}, - {0xc6f80000}, {0xc6f82000}, {0xc6f84000}, {0xc6f86000}, - {0xc6f88000}, {0xc6f8a000}, {0xc6f8c000}, {0xc6f8e000}, - {0xc6f90000}, {0xc6f92000}, {0xc6f94000}, {0xc6f96000}, - {0xc6f98000}, {0xc6f9a000}, {0xc6f9c000}, {0xc6f9e000}, - {0xc6fa0000}, {0xc6fa2000}, {0xc6fa4000}, {0xc6fa6000}, - {0xc6fa8000}, {0xc6faa000}, {0xc6fac000}, {0xc6fae000}, - {0xc6fb0000}, {0xc6fb2000}, {0xc6fb4000}, {0xc6fb6000}, - {0xc6fb8000}, {0xc6fba000}, {0xc6fbc000}, {0xc6fbe000}, - {0xc6fc0000}, {0xc6fc2000}, {0xc6fc4000}, {0xc6fc6000}, - {0xc6fc8000}, {0xc6fca000}, {0xc6fcc000}, {0xc6fce000}, - {0xc6fd0000}, {0xc6fd2000}, {0xc6fd4000}, {0xc6fd6000}, - {0xc6fd8000}, {0xc6fda000}, {0xc6fdc000}, {0xc6fde000}, - {0xc6fe0000}, {0xc6fe2000}, {0xc6fe4000}, {0xc6fe6000}, - {0xc6fe8000}, {0xc6fea000}, {0xc6fec000}, {0xc6fee000}, - {0xc6ff0000}, {0xc6ff2000}, {0xc6ff4000}, {0xc6ff6000}, - {0xc6ff8000}, {0xc6ffa000}, {0xc6ffc000}, {0xc6ffe000}, - {0xc7000000}, {0xc7002000}, {0xc7004000}, {0xc7006000}, - {0xc7008000}, {0xc700a000}, {0xc700c000}, {0xc700e000}, - {0xc7010000}, {0xc7012000}, {0xc7014000}, {0xc7016000}, - {0xc7018000}, {0xc701a000}, {0xc701c000}, {0xc701e000}, - {0xc7020000}, {0xc7022000}, {0xc7024000}, {0xc7026000}, - {0xc7028000}, {0xc702a000}, {0xc702c000}, {0xc702e000}, - {0xc7030000}, {0xc7032000}, {0xc7034000}, {0xc7036000}, - {0xc7038000}, {0xc703a000}, {0xc703c000}, {0xc703e000}, - {0xc7040000}, {0xc7042000}, {0xc7044000}, {0xc7046000}, - {0xc7048000}, {0xc704a000}, {0xc704c000}, {0xc704e000}, - {0xc7050000}, {0xc7052000}, {0xc7054000}, {0xc7056000}, - {0xc7058000}, {0xc705a000}, {0xc705c000}, {0xc705e000}, - {0xc7060000}, {0xc7062000}, {0xc7064000}, {0xc7066000}, - {0xc7068000}, {0xc706a000}, {0xc706c000}, {0xc706e000}, - {0xc7070000}, {0xc7072000}, {0xc7074000}, {0xc7076000}, - {0xc7078000}, {0xc707a000}, {0xc707c000}, {0xc707e000}, - {0xc7080000}, {0xc7082000}, {0xc7084000}, {0xc7086000}, - {0xc7088000}, {0xc708a000}, {0xc708c000}, {0xc708e000}, - {0xc7090000}, {0xc7092000}, {0xc7094000}, {0xc7096000}, - {0xc7098000}, {0xc709a000}, {0xc709c000}, {0xc709e000}, - {0xc70a0000}, {0xc70a2000}, {0xc70a4000}, {0xc70a6000}, - {0xc70a8000}, {0xc70aa000}, {0xc70ac000}, {0xc70ae000}, - {0xc70b0000}, {0xc70b2000}, {0xc70b4000}, {0xc70b6000}, - {0xc70b8000}, {0xc70ba000}, {0xc70bc000}, {0xc70be000}, - {0xc70c0000}, {0xc70c2000}, {0xc70c4000}, {0xc70c6000}, - {0xc70c8000}, {0xc70ca000}, {0xc70cc000}, {0xc70ce000}, - {0xc70d0000}, {0xc70d2000}, {0xc70d4000}, {0xc70d6000}, - {0xc70d8000}, {0xc70da000}, {0xc70dc000}, {0xc70de000}, - {0xc70e0000}, {0xc70e2000}, {0xc70e4000}, {0xc70e6000}, - {0xc70e8000}, {0xc70ea000}, {0xc70ec000}, {0xc70ee000}, - {0xc70f0000}, {0xc70f2000}, {0xc70f4000}, {0xc70f6000}, - {0xc70f8000}, {0xc70fa000}, {0xc70fc000}, {0xc70fe000}, - {0xc7100000}, {0xc7102000}, {0xc7104000}, {0xc7106000}, - {0xc7108000}, {0xc710a000}, {0xc710c000}, {0xc710e000}, - {0xc7110000}, {0xc7112000}, {0xc7114000}, {0xc7116000}, - {0xc7118000}, {0xc711a000}, {0xc711c000}, {0xc711e000}, - {0xc7120000}, {0xc7122000}, {0xc7124000}, {0xc7126000}, - {0xc7128000}, {0xc712a000}, {0xc712c000}, {0xc712e000}, - {0xc7130000}, {0xc7132000}, {0xc7134000}, {0xc7136000}, - {0xc7138000}, {0xc713a000}, {0xc713c000}, {0xc713e000}, - {0xc7140000}, {0xc7142000}, {0xc7144000}, {0xc7146000}, - {0xc7148000}, {0xc714a000}, {0xc714c000}, {0xc714e000}, - {0xc7150000}, {0xc7152000}, {0xc7154000}, {0xc7156000}, - {0xc7158000}, {0xc715a000}, {0xc715c000}, {0xc715e000}, - {0xc7160000}, {0xc7162000}, {0xc7164000}, {0xc7166000}, - {0xc7168000}, {0xc716a000}, {0xc716c000}, {0xc716e000}, - {0xc7170000}, {0xc7172000}, {0xc7174000}, {0xc7176000}, - {0xc7178000}, {0xc717a000}, {0xc717c000}, {0xc717e000}, - {0xc7180000}, {0xc7182000}, {0xc7184000}, {0xc7186000}, - {0xc7188000}, {0xc718a000}, {0xc718c000}, {0xc718e000}, - {0xc7190000}, {0xc7192000}, {0xc7194000}, {0xc7196000}, - {0xc7198000}, {0xc719a000}, {0xc719c000}, {0xc719e000}, - {0xc71a0000}, {0xc71a2000}, {0xc71a4000}, {0xc71a6000}, - {0xc71a8000}, {0xc71aa000}, {0xc71ac000}, {0xc71ae000}, - {0xc71b0000}, {0xc71b2000}, {0xc71b4000}, {0xc71b6000}, - {0xc71b8000}, {0xc71ba000}, {0xc71bc000}, {0xc71be000}, - {0xc71c0000}, {0xc71c2000}, {0xc71c4000}, {0xc71c6000}, - {0xc71c8000}, {0xc71ca000}, {0xc71cc000}, {0xc71ce000}, - {0xc71d0000}, {0xc71d2000}, {0xc71d4000}, {0xc71d6000}, - {0xc71d8000}, {0xc71da000}, {0xc71dc000}, {0xc71de000}, - {0xc71e0000}, {0xc71e2000}, {0xc71e4000}, {0xc71e6000}, - {0xc71e8000}, {0xc71ea000}, {0xc71ec000}, {0xc71ee000}, - {0xc71f0000}, {0xc71f2000}, {0xc71f4000}, {0xc71f6000}, - {0xc71f8000}, {0xc71fa000}, {0xc71fc000}, {0xc71fe000}, - {0xc7200000}, {0xc7202000}, {0xc7204000}, {0xc7206000}, - {0xc7208000}, {0xc720a000}, {0xc720c000}, {0xc720e000}, - {0xc7210000}, {0xc7212000}, {0xc7214000}, {0xc7216000}, - {0xc7218000}, {0xc721a000}, {0xc721c000}, {0xc721e000}, - {0xc7220000}, {0xc7222000}, {0xc7224000}, {0xc7226000}, - {0xc7228000}, {0xc722a000}, {0xc722c000}, {0xc722e000}, - {0xc7230000}, {0xc7232000}, {0xc7234000}, {0xc7236000}, - {0xc7238000}, {0xc723a000}, {0xc723c000}, {0xc723e000}, - {0xc7240000}, {0xc7242000}, {0xc7244000}, {0xc7246000}, - {0xc7248000}, {0xc724a000}, {0xc724c000}, {0xc724e000}, - {0xc7250000}, {0xc7252000}, {0xc7254000}, {0xc7256000}, - {0xc7258000}, {0xc725a000}, {0xc725c000}, {0xc725e000}, - {0xc7260000}, {0xc7262000}, {0xc7264000}, {0xc7266000}, - {0xc7268000}, {0xc726a000}, {0xc726c000}, {0xc726e000}, - {0xc7270000}, {0xc7272000}, {0xc7274000}, {0xc7276000}, - {0xc7278000}, {0xc727a000}, {0xc727c000}, {0xc727e000}, - {0xc7280000}, {0xc7282000}, {0xc7284000}, {0xc7286000}, - {0xc7288000}, {0xc728a000}, {0xc728c000}, {0xc728e000}, - {0xc7290000}, {0xc7292000}, {0xc7294000}, {0xc7296000}, - {0xc7298000}, {0xc729a000}, {0xc729c000}, {0xc729e000}, - {0xc72a0000}, {0xc72a2000}, {0xc72a4000}, {0xc72a6000}, - {0xc72a8000}, {0xc72aa000}, {0xc72ac000}, {0xc72ae000}, - {0xc72b0000}, {0xc72b2000}, {0xc72b4000}, {0xc72b6000}, - {0xc72b8000}, {0xc72ba000}, {0xc72bc000}, {0xc72be000}, - {0xc72c0000}, {0xc72c2000}, {0xc72c4000}, {0xc72c6000}, - {0xc72c8000}, {0xc72ca000}, {0xc72cc000}, {0xc72ce000}, - {0xc72d0000}, {0xc72d2000}, {0xc72d4000}, {0xc72d6000}, - {0xc72d8000}, {0xc72da000}, {0xc72dc000}, {0xc72de000}, - {0xc72e0000}, {0xc72e2000}, {0xc72e4000}, {0xc72e6000}, - {0xc72e8000}, {0xc72ea000}, {0xc72ec000}, {0xc72ee000}, - {0xc72f0000}, {0xc72f2000}, {0xc72f4000}, {0xc72f6000}, - {0xc72f8000}, {0xc72fa000}, {0xc72fc000}, {0xc72fe000}, - {0xc7300000}, {0xc7302000}, {0xc7304000}, {0xc7306000}, - {0xc7308000}, {0xc730a000}, {0xc730c000}, {0xc730e000}, - {0xc7310000}, {0xc7312000}, {0xc7314000}, {0xc7316000}, - {0xc7318000}, {0xc731a000}, {0xc731c000}, {0xc731e000}, - {0xc7320000}, {0xc7322000}, {0xc7324000}, {0xc7326000}, - {0xc7328000}, {0xc732a000}, {0xc732c000}, {0xc732e000}, - {0xc7330000}, {0xc7332000}, {0xc7334000}, {0xc7336000}, - {0xc7338000}, {0xc733a000}, {0xc733c000}, {0xc733e000}, - {0xc7340000}, {0xc7342000}, {0xc7344000}, {0xc7346000}, - {0xc7348000}, {0xc734a000}, {0xc734c000}, {0xc734e000}, - {0xc7350000}, {0xc7352000}, {0xc7354000}, {0xc7356000}, - {0xc7358000}, {0xc735a000}, {0xc735c000}, {0xc735e000}, - {0xc7360000}, {0xc7362000}, {0xc7364000}, {0xc7366000}, - {0xc7368000}, {0xc736a000}, {0xc736c000}, {0xc736e000}, - {0xc7370000}, {0xc7372000}, {0xc7374000}, {0xc7376000}, - {0xc7378000}, {0xc737a000}, {0xc737c000}, {0xc737e000}, - {0xc7380000}, {0xc7382000}, {0xc7384000}, {0xc7386000}, - {0xc7388000}, {0xc738a000}, {0xc738c000}, {0xc738e000}, - {0xc7390000}, {0xc7392000}, {0xc7394000}, {0xc7396000}, - {0xc7398000}, {0xc739a000}, {0xc739c000}, {0xc739e000}, - {0xc73a0000}, {0xc73a2000}, {0xc73a4000}, {0xc73a6000}, - {0xc73a8000}, {0xc73aa000}, {0xc73ac000}, {0xc73ae000}, - {0xc73b0000}, {0xc73b2000}, {0xc73b4000}, {0xc73b6000}, - {0xc73b8000}, {0xc73ba000}, {0xc73bc000}, {0xc73be000}, - {0xc73c0000}, {0xc73c2000}, {0xc73c4000}, {0xc73c6000}, - {0xc73c8000}, {0xc73ca000}, {0xc73cc000}, {0xc73ce000}, - {0xc73d0000}, {0xc73d2000}, {0xc73d4000}, {0xc73d6000}, - {0xc73d8000}, {0xc73da000}, {0xc73dc000}, {0xc73de000}, - {0xc73e0000}, {0xc73e2000}, {0xc73e4000}, {0xc73e6000}, - {0xc73e8000}, {0xc73ea000}, {0xc73ec000}, {0xc73ee000}, - {0xc73f0000}, {0xc73f2000}, {0xc73f4000}, {0xc73f6000}, - {0xc73f8000}, {0xc73fa000}, {0xc73fc000}, {0xc73fe000}, - {0xc7400000}, {0xc7402000}, {0xc7404000}, {0xc7406000}, - {0xc7408000}, {0xc740a000}, {0xc740c000}, {0xc740e000}, - {0xc7410000}, {0xc7412000}, {0xc7414000}, {0xc7416000}, - {0xc7418000}, {0xc741a000}, {0xc741c000}, {0xc741e000}, - {0xc7420000}, {0xc7422000}, {0xc7424000}, {0xc7426000}, - {0xc7428000}, {0xc742a000}, {0xc742c000}, {0xc742e000}, - {0xc7430000}, {0xc7432000}, {0xc7434000}, {0xc7436000}, - {0xc7438000}, {0xc743a000}, {0xc743c000}, {0xc743e000}, - {0xc7440000}, {0xc7442000}, {0xc7444000}, {0xc7446000}, - {0xc7448000}, {0xc744a000}, {0xc744c000}, {0xc744e000}, - {0xc7450000}, {0xc7452000}, {0xc7454000}, {0xc7456000}, - {0xc7458000}, {0xc745a000}, {0xc745c000}, {0xc745e000}, - {0xc7460000}, {0xc7462000}, {0xc7464000}, {0xc7466000}, - {0xc7468000}, {0xc746a000}, {0xc746c000}, {0xc746e000}, - {0xc7470000}, {0xc7472000}, {0xc7474000}, {0xc7476000}, - {0xc7478000}, {0xc747a000}, {0xc747c000}, {0xc747e000}, - {0xc7480000}, {0xc7482000}, {0xc7484000}, {0xc7486000}, - {0xc7488000}, {0xc748a000}, {0xc748c000}, {0xc748e000}, - {0xc7490000}, {0xc7492000}, {0xc7494000}, {0xc7496000}, - {0xc7498000}, {0xc749a000}, {0xc749c000}, {0xc749e000}, - {0xc74a0000}, {0xc74a2000}, {0xc74a4000}, {0xc74a6000}, - {0xc74a8000}, {0xc74aa000}, {0xc74ac000}, {0xc74ae000}, - {0xc74b0000}, {0xc74b2000}, {0xc74b4000}, {0xc74b6000}, - {0xc74b8000}, {0xc74ba000}, {0xc74bc000}, {0xc74be000}, - {0xc74c0000}, {0xc74c2000}, {0xc74c4000}, {0xc74c6000}, - {0xc74c8000}, {0xc74ca000}, {0xc74cc000}, {0xc74ce000}, - {0xc74d0000}, {0xc74d2000}, {0xc74d4000}, {0xc74d6000}, - {0xc74d8000}, {0xc74da000}, {0xc74dc000}, {0xc74de000}, - {0xc74e0000}, {0xc74e2000}, {0xc74e4000}, {0xc74e6000}, - {0xc74e8000}, {0xc74ea000}, {0xc74ec000}, {0xc74ee000}, - {0xc74f0000}, {0xc74f2000}, {0xc74f4000}, {0xc74f6000}, - {0xc74f8000}, {0xc74fa000}, {0xc74fc000}, {0xc74fe000}, - {0xc7500000}, {0xc7502000}, {0xc7504000}, {0xc7506000}, - {0xc7508000}, {0xc750a000}, {0xc750c000}, {0xc750e000}, - {0xc7510000}, {0xc7512000}, {0xc7514000}, {0xc7516000}, - {0xc7518000}, {0xc751a000}, {0xc751c000}, {0xc751e000}, - {0xc7520000}, {0xc7522000}, {0xc7524000}, {0xc7526000}, - {0xc7528000}, {0xc752a000}, {0xc752c000}, {0xc752e000}, - {0xc7530000}, {0xc7532000}, {0xc7534000}, {0xc7536000}, - {0xc7538000}, {0xc753a000}, {0xc753c000}, {0xc753e000}, - {0xc7540000}, {0xc7542000}, {0xc7544000}, {0xc7546000}, - {0xc7548000}, {0xc754a000}, {0xc754c000}, {0xc754e000}, - {0xc7550000}, {0xc7552000}, {0xc7554000}, {0xc7556000}, - {0xc7558000}, {0xc755a000}, {0xc755c000}, {0xc755e000}, - {0xc7560000}, {0xc7562000}, {0xc7564000}, {0xc7566000}, - {0xc7568000}, {0xc756a000}, {0xc756c000}, {0xc756e000}, - {0xc7570000}, {0xc7572000}, {0xc7574000}, {0xc7576000}, - {0xc7578000}, {0xc757a000}, {0xc757c000}, {0xc757e000}, - {0xc7580000}, {0xc7582000}, {0xc7584000}, {0xc7586000}, - {0xc7588000}, {0xc758a000}, {0xc758c000}, {0xc758e000}, - {0xc7590000}, {0xc7592000}, {0xc7594000}, {0xc7596000}, - {0xc7598000}, {0xc759a000}, {0xc759c000}, {0xc759e000}, - {0xc75a0000}, {0xc75a2000}, {0xc75a4000}, {0xc75a6000}, - {0xc75a8000}, {0xc75aa000}, {0xc75ac000}, {0xc75ae000}, - {0xc75b0000}, {0xc75b2000}, {0xc75b4000}, {0xc75b6000}, - {0xc75b8000}, {0xc75ba000}, {0xc75bc000}, {0xc75be000}, - {0xc75c0000}, {0xc75c2000}, {0xc75c4000}, {0xc75c6000}, - {0xc75c8000}, {0xc75ca000}, {0xc75cc000}, {0xc75ce000}, - {0xc75d0000}, {0xc75d2000}, {0xc75d4000}, {0xc75d6000}, - {0xc75d8000}, {0xc75da000}, {0xc75dc000}, {0xc75de000}, - {0xc75e0000}, {0xc75e2000}, {0xc75e4000}, {0xc75e6000}, - {0xc75e8000}, {0xc75ea000}, {0xc75ec000}, {0xc75ee000}, - {0xc75f0000}, {0xc75f2000}, {0xc75f4000}, {0xc75f6000}, - {0xc75f8000}, {0xc75fa000}, {0xc75fc000}, {0xc75fe000}, - {0xc7600000}, {0xc7602000}, {0xc7604000}, {0xc7606000}, - {0xc7608000}, {0xc760a000}, {0xc760c000}, {0xc760e000}, - {0xc7610000}, {0xc7612000}, {0xc7614000}, {0xc7616000}, - {0xc7618000}, {0xc761a000}, {0xc761c000}, {0xc761e000}, - {0xc7620000}, {0xc7622000}, {0xc7624000}, {0xc7626000}, - {0xc7628000}, {0xc762a000}, {0xc762c000}, {0xc762e000}, - {0xc7630000}, {0xc7632000}, {0xc7634000}, {0xc7636000}, - {0xc7638000}, {0xc763a000}, {0xc763c000}, {0xc763e000}, - {0xc7640000}, {0xc7642000}, {0xc7644000}, {0xc7646000}, - {0xc7648000}, {0xc764a000}, {0xc764c000}, {0xc764e000}, - {0xc7650000}, {0xc7652000}, {0xc7654000}, {0xc7656000}, - {0xc7658000}, {0xc765a000}, {0xc765c000}, {0xc765e000}, - {0xc7660000}, {0xc7662000}, {0xc7664000}, {0xc7666000}, - {0xc7668000}, {0xc766a000}, {0xc766c000}, {0xc766e000}, - {0xc7670000}, {0xc7672000}, {0xc7674000}, {0xc7676000}, - {0xc7678000}, {0xc767a000}, {0xc767c000}, {0xc767e000}, - {0xc7680000}, {0xc7682000}, {0xc7684000}, {0xc7686000}, - {0xc7688000}, {0xc768a000}, {0xc768c000}, {0xc768e000}, - {0xc7690000}, {0xc7692000}, {0xc7694000}, {0xc7696000}, - {0xc7698000}, {0xc769a000}, {0xc769c000}, {0xc769e000}, - {0xc76a0000}, {0xc76a2000}, {0xc76a4000}, {0xc76a6000}, - {0xc76a8000}, {0xc76aa000}, {0xc76ac000}, {0xc76ae000}, - {0xc76b0000}, {0xc76b2000}, {0xc76b4000}, {0xc76b6000}, - {0xc76b8000}, {0xc76ba000}, {0xc76bc000}, {0xc76be000}, - {0xc76c0000}, {0xc76c2000}, {0xc76c4000}, {0xc76c6000}, - {0xc76c8000}, {0xc76ca000}, {0xc76cc000}, {0xc76ce000}, - {0xc76d0000}, {0xc76d2000}, {0xc76d4000}, {0xc76d6000}, - {0xc76d8000}, {0xc76da000}, {0xc76dc000}, {0xc76de000}, - {0xc76e0000}, {0xc76e2000}, {0xc76e4000}, {0xc76e6000}, - {0xc76e8000}, {0xc76ea000}, {0xc76ec000}, {0xc76ee000}, - {0xc76f0000}, {0xc76f2000}, {0xc76f4000}, {0xc76f6000}, - {0xc76f8000}, {0xc76fa000}, {0xc76fc000}, {0xc76fe000}, - {0xc7700000}, {0xc7702000}, {0xc7704000}, {0xc7706000}, - {0xc7708000}, {0xc770a000}, {0xc770c000}, {0xc770e000}, - {0xc7710000}, {0xc7712000}, {0xc7714000}, {0xc7716000}, - {0xc7718000}, {0xc771a000}, {0xc771c000}, {0xc771e000}, - {0xc7720000}, {0xc7722000}, {0xc7724000}, {0xc7726000}, - {0xc7728000}, {0xc772a000}, {0xc772c000}, {0xc772e000}, - {0xc7730000}, {0xc7732000}, {0xc7734000}, {0xc7736000}, - {0xc7738000}, {0xc773a000}, {0xc773c000}, {0xc773e000}, - {0xc7740000}, {0xc7742000}, {0xc7744000}, {0xc7746000}, - {0xc7748000}, {0xc774a000}, {0xc774c000}, {0xc774e000}, - {0xc7750000}, {0xc7752000}, {0xc7754000}, {0xc7756000}, - {0xc7758000}, {0xc775a000}, {0xc775c000}, {0xc775e000}, - {0xc7760000}, {0xc7762000}, {0xc7764000}, {0xc7766000}, - {0xc7768000}, {0xc776a000}, {0xc776c000}, {0xc776e000}, - {0xc7770000}, {0xc7772000}, {0xc7774000}, {0xc7776000}, - {0xc7778000}, {0xc777a000}, {0xc777c000}, {0xc777e000}, - {0xc7780000}, {0xc7782000}, {0xc7784000}, {0xc7786000}, - {0xc7788000}, {0xc778a000}, {0xc778c000}, {0xc778e000}, - {0xc7790000}, {0xc7792000}, {0xc7794000}, {0xc7796000}, - {0xc7798000}, {0xc779a000}, {0xc779c000}, {0xc779e000}, - {0xc77a0000}, {0xc77a2000}, {0xc77a4000}, {0xc77a6000}, - {0xc77a8000}, {0xc77aa000}, {0xc77ac000}, {0xc77ae000}, - {0xc77b0000}, {0xc77b2000}, {0xc77b4000}, {0xc77b6000}, - {0xc77b8000}, {0xc77ba000}, {0xc77bc000}, {0xc77be000}, - {0xc77c0000}, {0xc77c2000}, {0xc77c4000}, {0xc77c6000}, - {0xc77c8000}, {0xc77ca000}, {0xc77cc000}, {0xc77ce000}, - {0xc77d0000}, {0xc77d2000}, {0xc77d4000}, {0xc77d6000}, - {0xc77d8000}, {0xc77da000}, {0xc77dc000}, {0xc77de000}, - {0xc77e0000}, {0xc77e2000}, {0xc77e4000}, {0xc77e6000}, - {0xc77e8000}, {0xc77ea000}, {0xc77ec000}, {0xc77ee000}, - {0xc77f0000}, {0xc77f2000}, {0xc77f4000}, {0xc77f6000}, - {0xc77f8000}, {0xc77fa000}, {0xc77fc000}, {0xc77fe000}, - {0xff800000}, {0xff802000}, {0xff804000}, {0xff806000}, - {0xff808000}, {0xff80a000}, {0xff80c000}, {0xff80e000}, - {0xff810000}, {0xff812000}, {0xff814000}, {0xff816000}, - {0xff818000}, {0xff81a000}, {0xff81c000}, {0xff81e000}, - {0xff820000}, {0xff822000}, {0xff824000}, {0xff826000}, - {0xff828000}, {0xff82a000}, {0xff82c000}, {0xff82e000}, - {0xff830000}, {0xff832000}, {0xff834000}, {0xff836000}, - {0xff838000}, {0xff83a000}, {0xff83c000}, {0xff83e000}, - {0xff840000}, {0xff842000}, {0xff844000}, {0xff846000}, - {0xff848000}, {0xff84a000}, {0xff84c000}, {0xff84e000}, - {0xff850000}, {0xff852000}, {0xff854000}, {0xff856000}, - {0xff858000}, {0xff85a000}, {0xff85c000}, {0xff85e000}, - {0xff860000}, {0xff862000}, {0xff864000}, {0xff866000}, - {0xff868000}, {0xff86a000}, {0xff86c000}, {0xff86e000}, - {0xff870000}, {0xff872000}, {0xff874000}, {0xff876000}, - {0xff878000}, {0xff87a000}, {0xff87c000}, {0xff87e000}, - {0xff880000}, {0xff882000}, {0xff884000}, {0xff886000}, - {0xff888000}, {0xff88a000}, {0xff88c000}, {0xff88e000}, - {0xff890000}, {0xff892000}, {0xff894000}, {0xff896000}, - {0xff898000}, {0xff89a000}, {0xff89c000}, {0xff89e000}, - {0xff8a0000}, {0xff8a2000}, {0xff8a4000}, {0xff8a6000}, - {0xff8a8000}, {0xff8aa000}, {0xff8ac000}, {0xff8ae000}, - {0xff8b0000}, {0xff8b2000}, {0xff8b4000}, {0xff8b6000}, - {0xff8b8000}, {0xff8ba000}, {0xff8bc000}, {0xff8be000}, - {0xff8c0000}, {0xff8c2000}, {0xff8c4000}, {0xff8c6000}, - {0xff8c8000}, {0xff8ca000}, {0xff8cc000}, {0xff8ce000}, - {0xff8d0000}, {0xff8d2000}, {0xff8d4000}, {0xff8d6000}, - {0xff8d8000}, {0xff8da000}, {0xff8dc000}, {0xff8de000}, - {0xff8e0000}, {0xff8e2000}, {0xff8e4000}, {0xff8e6000}, - {0xff8e8000}, {0xff8ea000}, {0xff8ec000}, {0xff8ee000}, - {0xff8f0000}, {0xff8f2000}, {0xff8f4000}, {0xff8f6000}, - {0xff8f8000}, {0xff8fa000}, {0xff8fc000}, {0xff8fe000}, - {0xff900000}, {0xff902000}, {0xff904000}, {0xff906000}, - {0xff908000}, {0xff90a000}, {0xff90c000}, {0xff90e000}, - {0xff910000}, {0xff912000}, {0xff914000}, {0xff916000}, - {0xff918000}, {0xff91a000}, {0xff91c000}, {0xff91e000}, - {0xff920000}, {0xff922000}, {0xff924000}, {0xff926000}, - {0xff928000}, {0xff92a000}, {0xff92c000}, {0xff92e000}, - {0xff930000}, {0xff932000}, {0xff934000}, {0xff936000}, - {0xff938000}, {0xff93a000}, {0xff93c000}, {0xff93e000}, - {0xff940000}, {0xff942000}, {0xff944000}, {0xff946000}, - {0xff948000}, {0xff94a000}, {0xff94c000}, {0xff94e000}, - {0xff950000}, {0xff952000}, {0xff954000}, {0xff956000}, - {0xff958000}, {0xff95a000}, {0xff95c000}, {0xff95e000}, - {0xff960000}, {0xff962000}, {0xff964000}, {0xff966000}, - {0xff968000}, {0xff96a000}, {0xff96c000}, {0xff96e000}, - {0xff970000}, {0xff972000}, {0xff974000}, {0xff976000}, - {0xff978000}, {0xff97a000}, {0xff97c000}, {0xff97e000}, - {0xff980000}, {0xff982000}, {0xff984000}, {0xff986000}, - {0xff988000}, {0xff98a000}, {0xff98c000}, {0xff98e000}, - {0xff990000}, {0xff992000}, {0xff994000}, {0xff996000}, - {0xff998000}, {0xff99a000}, {0xff99c000}, {0xff99e000}, - {0xff9a0000}, {0xff9a2000}, {0xff9a4000}, {0xff9a6000}, - {0xff9a8000}, {0xff9aa000}, {0xff9ac000}, {0xff9ae000}, - {0xff9b0000}, {0xff9b2000}, {0xff9b4000}, {0xff9b6000}, - {0xff9b8000}, {0xff9ba000}, {0xff9bc000}, {0xff9be000}, - {0xff9c0000}, {0xff9c2000}, {0xff9c4000}, {0xff9c6000}, - {0xff9c8000}, {0xff9ca000}, {0xff9cc000}, {0xff9ce000}, - {0xff9d0000}, {0xff9d2000}, {0xff9d4000}, {0xff9d6000}, - {0xff9d8000}, {0xff9da000}, {0xff9dc000}, {0xff9de000}, - {0xff9e0000}, {0xff9e2000}, {0xff9e4000}, {0xff9e6000}, - {0xff9e8000}, {0xff9ea000}, {0xff9ec000}, {0xff9ee000}, - {0xff9f0000}, {0xff9f2000}, {0xff9f4000}, {0xff9f6000}, - {0xff9f8000}, {0xff9fa000}, {0xff9fc000}, {0xff9fe000}, - {0xffa00000}, {0xffa02000}, {0xffa04000}, {0xffa06000}, - {0xffa08000}, {0xffa0a000}, {0xffa0c000}, {0xffa0e000}, - {0xffa10000}, {0xffa12000}, {0xffa14000}, {0xffa16000}, - {0xffa18000}, {0xffa1a000}, {0xffa1c000}, {0xffa1e000}, - {0xffa20000}, {0xffa22000}, {0xffa24000}, {0xffa26000}, - {0xffa28000}, {0xffa2a000}, {0xffa2c000}, {0xffa2e000}, - {0xffa30000}, {0xffa32000}, {0xffa34000}, {0xffa36000}, - {0xffa38000}, {0xffa3a000}, {0xffa3c000}, {0xffa3e000}, - {0xffa40000}, {0xffa42000}, {0xffa44000}, {0xffa46000}, - {0xffa48000}, {0xffa4a000}, {0xffa4c000}, {0xffa4e000}, - {0xffa50000}, {0xffa52000}, {0xffa54000}, {0xffa56000}, - {0xffa58000}, {0xffa5a000}, {0xffa5c000}, {0xffa5e000}, - {0xffa60000}, {0xffa62000}, {0xffa64000}, {0xffa66000}, - {0xffa68000}, {0xffa6a000}, {0xffa6c000}, {0xffa6e000}, - {0xffa70000}, {0xffa72000}, {0xffa74000}, {0xffa76000}, - {0xffa78000}, {0xffa7a000}, {0xffa7c000}, {0xffa7e000}, - {0xffa80000}, {0xffa82000}, {0xffa84000}, {0xffa86000}, - {0xffa88000}, {0xffa8a000}, {0xffa8c000}, {0xffa8e000}, - {0xffa90000}, {0xffa92000}, {0xffa94000}, {0xffa96000}, - {0xffa98000}, {0xffa9a000}, {0xffa9c000}, {0xffa9e000}, - {0xffaa0000}, {0xffaa2000}, {0xffaa4000}, {0xffaa6000}, - {0xffaa8000}, {0xffaaa000}, {0xffaac000}, {0xffaae000}, - {0xffab0000}, {0xffab2000}, {0xffab4000}, {0xffab6000}, - {0xffab8000}, {0xffaba000}, {0xffabc000}, {0xffabe000}, - {0xffac0000}, {0xffac2000}, {0xffac4000}, {0xffac6000}, - {0xffac8000}, {0xffaca000}, {0xffacc000}, {0xfface000}, - {0xffad0000}, {0xffad2000}, {0xffad4000}, {0xffad6000}, - {0xffad8000}, {0xffada000}, {0xffadc000}, {0xffade000}, - {0xffae0000}, {0xffae2000}, {0xffae4000}, {0xffae6000}, - {0xffae8000}, {0xffaea000}, {0xffaec000}, {0xffaee000}, - {0xffaf0000}, {0xffaf2000}, {0xffaf4000}, {0xffaf6000}, - {0xffaf8000}, {0xffafa000}, {0xffafc000}, {0xffafe000}, - {0xffb00000}, {0xffb02000}, {0xffb04000}, {0xffb06000}, - {0xffb08000}, {0xffb0a000}, {0xffb0c000}, {0xffb0e000}, - {0xffb10000}, {0xffb12000}, {0xffb14000}, {0xffb16000}, - {0xffb18000}, {0xffb1a000}, {0xffb1c000}, {0xffb1e000}, - {0xffb20000}, {0xffb22000}, {0xffb24000}, {0xffb26000}, - {0xffb28000}, {0xffb2a000}, {0xffb2c000}, {0xffb2e000}, - {0xffb30000}, {0xffb32000}, {0xffb34000}, {0xffb36000}, - {0xffb38000}, {0xffb3a000}, {0xffb3c000}, {0xffb3e000}, - {0xffb40000}, {0xffb42000}, {0xffb44000}, {0xffb46000}, - {0xffb48000}, {0xffb4a000}, {0xffb4c000}, {0xffb4e000}, - {0xffb50000}, {0xffb52000}, {0xffb54000}, {0xffb56000}, - {0xffb58000}, {0xffb5a000}, {0xffb5c000}, {0xffb5e000}, - {0xffb60000}, {0xffb62000}, {0xffb64000}, {0xffb66000}, - {0xffb68000}, {0xffb6a000}, {0xffb6c000}, {0xffb6e000}, - {0xffb70000}, {0xffb72000}, {0xffb74000}, {0xffb76000}, - {0xffb78000}, {0xffb7a000}, {0xffb7c000}, {0xffb7e000}, - {0xffb80000}, {0xffb82000}, {0xffb84000}, {0xffb86000}, - {0xffb88000}, {0xffb8a000}, {0xffb8c000}, {0xffb8e000}, - {0xffb90000}, {0xffb92000}, {0xffb94000}, {0xffb96000}, - {0xffb98000}, {0xffb9a000}, {0xffb9c000}, {0xffb9e000}, - {0xffba0000}, {0xffba2000}, {0xffba4000}, {0xffba6000}, - {0xffba8000}, {0xffbaa000}, {0xffbac000}, {0xffbae000}, - {0xffbb0000}, {0xffbb2000}, {0xffbb4000}, {0xffbb6000}, - {0xffbb8000}, {0xffbba000}, {0xffbbc000}, {0xffbbe000}, - {0xffbc0000}, {0xffbc2000}, {0xffbc4000}, {0xffbc6000}, - {0xffbc8000}, {0xffbca000}, {0xffbcc000}, {0xffbce000}, - {0xffbd0000}, {0xffbd2000}, {0xffbd4000}, {0xffbd6000}, - {0xffbd8000}, {0xffbda000}, {0xffbdc000}, {0xffbde000}, - {0xffbe0000}, {0xffbe2000}, {0xffbe4000}, {0xffbe6000}, - {0xffbe8000}, {0xffbea000}, {0xffbec000}, {0xffbee000}, - {0xffbf0000}, {0xffbf2000}, {0xffbf4000}, {0xffbf6000}, - {0xffbf8000}, {0xffbfa000}, {0xffbfc000}, {0xffbfe000}, - {0xffc00000}, {0xffc02000}, {0xffc04000}, {0xffc06000}, - {0xffc08000}, {0xffc0a000}, {0xffc0c000}, {0xffc0e000}, - {0xffc10000}, {0xffc12000}, {0xffc14000}, {0xffc16000}, - {0xffc18000}, {0xffc1a000}, {0xffc1c000}, {0xffc1e000}, - {0xffc20000}, {0xffc22000}, {0xffc24000}, {0xffc26000}, - {0xffc28000}, {0xffc2a000}, {0xffc2c000}, {0xffc2e000}, - {0xffc30000}, {0xffc32000}, {0xffc34000}, {0xffc36000}, - {0xffc38000}, {0xffc3a000}, {0xffc3c000}, {0xffc3e000}, - {0xffc40000}, {0xffc42000}, {0xffc44000}, {0xffc46000}, - {0xffc48000}, {0xffc4a000}, {0xffc4c000}, {0xffc4e000}, - {0xffc50000}, {0xffc52000}, {0xffc54000}, {0xffc56000}, - {0xffc58000}, {0xffc5a000}, {0xffc5c000}, {0xffc5e000}, - {0xffc60000}, {0xffc62000}, {0xffc64000}, {0xffc66000}, - {0xffc68000}, {0xffc6a000}, {0xffc6c000}, {0xffc6e000}, - {0xffc70000}, {0xffc72000}, {0xffc74000}, {0xffc76000}, - {0xffc78000}, {0xffc7a000}, {0xffc7c000}, {0xffc7e000}, - {0xffc80000}, {0xffc82000}, {0xffc84000}, {0xffc86000}, - {0xffc88000}, {0xffc8a000}, {0xffc8c000}, {0xffc8e000}, - {0xffc90000}, {0xffc92000}, {0xffc94000}, {0xffc96000}, - {0xffc98000}, {0xffc9a000}, {0xffc9c000}, {0xffc9e000}, - {0xffca0000}, {0xffca2000}, {0xffca4000}, {0xffca6000}, - {0xffca8000}, {0xffcaa000}, {0xffcac000}, {0xffcae000}, - {0xffcb0000}, {0xffcb2000}, {0xffcb4000}, {0xffcb6000}, - {0xffcb8000}, {0xffcba000}, {0xffcbc000}, {0xffcbe000}, - {0xffcc0000}, {0xffcc2000}, {0xffcc4000}, {0xffcc6000}, - {0xffcc8000}, {0xffcca000}, {0xffccc000}, {0xffcce000}, - {0xffcd0000}, {0xffcd2000}, {0xffcd4000}, {0xffcd6000}, - {0xffcd8000}, {0xffcda000}, {0xffcdc000}, {0xffcde000}, - {0xffce0000}, {0xffce2000}, {0xffce4000}, {0xffce6000}, - {0xffce8000}, {0xffcea000}, {0xffcec000}, {0xffcee000}, - {0xffcf0000}, {0xffcf2000}, {0xffcf4000}, {0xffcf6000}, - {0xffcf8000}, {0xffcfa000}, {0xffcfc000}, {0xffcfe000}, - {0xffd00000}, {0xffd02000}, {0xffd04000}, {0xffd06000}, - {0xffd08000}, {0xffd0a000}, {0xffd0c000}, {0xffd0e000}, - {0xffd10000}, {0xffd12000}, {0xffd14000}, {0xffd16000}, - {0xffd18000}, {0xffd1a000}, {0xffd1c000}, {0xffd1e000}, - {0xffd20000}, {0xffd22000}, {0xffd24000}, {0xffd26000}, - {0xffd28000}, {0xffd2a000}, {0xffd2c000}, {0xffd2e000}, - {0xffd30000}, {0xffd32000}, {0xffd34000}, {0xffd36000}, - {0xffd38000}, {0xffd3a000}, {0xffd3c000}, {0xffd3e000}, - {0xffd40000}, {0xffd42000}, {0xffd44000}, {0xffd46000}, - {0xffd48000}, {0xffd4a000}, {0xffd4c000}, {0xffd4e000}, - {0xffd50000}, {0xffd52000}, {0xffd54000}, {0xffd56000}, - {0xffd58000}, {0xffd5a000}, {0xffd5c000}, {0xffd5e000}, - {0xffd60000}, {0xffd62000}, {0xffd64000}, {0xffd66000}, - {0xffd68000}, {0xffd6a000}, {0xffd6c000}, {0xffd6e000}, - {0xffd70000}, {0xffd72000}, {0xffd74000}, {0xffd76000}, - {0xffd78000}, {0xffd7a000}, {0xffd7c000}, {0xffd7e000}, - {0xffd80000}, {0xffd82000}, {0xffd84000}, {0xffd86000}, - {0xffd88000}, {0xffd8a000}, {0xffd8c000}, {0xffd8e000}, - {0xffd90000}, {0xffd92000}, {0xffd94000}, {0xffd96000}, - {0xffd98000}, {0xffd9a000}, {0xffd9c000}, {0xffd9e000}, - {0xffda0000}, {0xffda2000}, {0xffda4000}, {0xffda6000}, - {0xffda8000}, {0xffdaa000}, {0xffdac000}, {0xffdae000}, - {0xffdb0000}, {0xffdb2000}, {0xffdb4000}, {0xffdb6000}, - {0xffdb8000}, {0xffdba000}, {0xffdbc000}, {0xffdbe000}, - {0xffdc0000}, {0xffdc2000}, {0xffdc4000}, {0xffdc6000}, - {0xffdc8000}, {0xffdca000}, {0xffdcc000}, {0xffdce000}, - {0xffdd0000}, {0xffdd2000}, {0xffdd4000}, {0xffdd6000}, - {0xffdd8000}, {0xffdda000}, {0xffddc000}, {0xffdde000}, - {0xffde0000}, {0xffde2000}, {0xffde4000}, {0xffde6000}, - {0xffde8000}, {0xffdea000}, {0xffdec000}, {0xffdee000}, - {0xffdf0000}, {0xffdf2000}, {0xffdf4000}, {0xffdf6000}, - {0xffdf8000}, {0xffdfa000}, {0xffdfc000}, {0xffdfe000}, - {0xffe00000}, {0xffe02000}, {0xffe04000}, {0xffe06000}, - {0xffe08000}, {0xffe0a000}, {0xffe0c000}, {0xffe0e000}, - {0xffe10000}, {0xffe12000}, {0xffe14000}, {0xffe16000}, - {0xffe18000}, {0xffe1a000}, {0xffe1c000}, {0xffe1e000}, - {0xffe20000}, {0xffe22000}, {0xffe24000}, {0xffe26000}, - {0xffe28000}, {0xffe2a000}, {0xffe2c000}, {0xffe2e000}, - {0xffe30000}, {0xffe32000}, {0xffe34000}, {0xffe36000}, - {0xffe38000}, {0xffe3a000}, {0xffe3c000}, {0xffe3e000}, - {0xffe40000}, {0xffe42000}, {0xffe44000}, {0xffe46000}, - {0xffe48000}, {0xffe4a000}, {0xffe4c000}, {0xffe4e000}, - {0xffe50000}, {0xffe52000}, {0xffe54000}, {0xffe56000}, - {0xffe58000}, {0xffe5a000}, {0xffe5c000}, {0xffe5e000}, - {0xffe60000}, {0xffe62000}, {0xffe64000}, {0xffe66000}, - {0xffe68000}, {0xffe6a000}, {0xffe6c000}, {0xffe6e000}, - {0xffe70000}, {0xffe72000}, {0xffe74000}, {0xffe76000}, - {0xffe78000}, {0xffe7a000}, {0xffe7c000}, {0xffe7e000}, - {0xffe80000}, {0xffe82000}, {0xffe84000}, {0xffe86000}, - {0xffe88000}, {0xffe8a000}, {0xffe8c000}, {0xffe8e000}, - {0xffe90000}, {0xffe92000}, {0xffe94000}, {0xffe96000}, - {0xffe98000}, {0xffe9a000}, {0xffe9c000}, {0xffe9e000}, - {0xffea0000}, {0xffea2000}, {0xffea4000}, {0xffea6000}, - {0xffea8000}, {0xffeaa000}, {0xffeac000}, {0xffeae000}, - {0xffeb0000}, {0xffeb2000}, {0xffeb4000}, {0xffeb6000}, - {0xffeb8000}, {0xffeba000}, {0xffebc000}, {0xffebe000}, - {0xffec0000}, {0xffec2000}, {0xffec4000}, {0xffec6000}, - {0xffec8000}, {0xffeca000}, {0xffecc000}, {0xffece000}, - {0xffed0000}, {0xffed2000}, {0xffed4000}, {0xffed6000}, - {0xffed8000}, {0xffeda000}, {0xffedc000}, {0xffede000}, - {0xffee0000}, {0xffee2000}, {0xffee4000}, {0xffee6000}, - {0xffee8000}, {0xffeea000}, {0xffeec000}, {0xffeee000}, - {0xffef0000}, {0xffef2000}, {0xffef4000}, {0xffef6000}, - {0xffef8000}, {0xffefa000}, {0xffefc000}, {0xffefe000}, - {0xfff00000}, {0xfff02000}, {0xfff04000}, {0xfff06000}, - {0xfff08000}, {0xfff0a000}, {0xfff0c000}, {0xfff0e000}, - {0xfff10000}, {0xfff12000}, {0xfff14000}, {0xfff16000}, - {0xfff18000}, {0xfff1a000}, {0xfff1c000}, {0xfff1e000}, - {0xfff20000}, {0xfff22000}, {0xfff24000}, {0xfff26000}, - {0xfff28000}, {0xfff2a000}, {0xfff2c000}, {0xfff2e000}, - {0xfff30000}, {0xfff32000}, {0xfff34000}, {0xfff36000}, - {0xfff38000}, {0xfff3a000}, {0xfff3c000}, {0xfff3e000}, - {0xfff40000}, {0xfff42000}, {0xfff44000}, {0xfff46000}, - {0xfff48000}, {0xfff4a000}, {0xfff4c000}, {0xfff4e000}, - {0xfff50000}, {0xfff52000}, {0xfff54000}, {0xfff56000}, - {0xfff58000}, {0xfff5a000}, {0xfff5c000}, {0xfff5e000}, - {0xfff60000}, {0xfff62000}, {0xfff64000}, {0xfff66000}, - {0xfff68000}, {0xfff6a000}, {0xfff6c000}, {0xfff6e000}, - {0xfff70000}, {0xfff72000}, {0xfff74000}, {0xfff76000}, - {0xfff78000}, {0xfff7a000}, {0xfff7c000}, {0xfff7e000}, - {0xfff80000}, {0xfff82000}, {0xfff84000}, {0xfff86000}, - {0xfff88000}, {0xfff8a000}, {0xfff8c000}, {0xfff8e000}, - {0xfff90000}, {0xfff92000}, {0xfff94000}, {0xfff96000}, - {0xfff98000}, {0xfff9a000}, {0xfff9c000}, {0xfff9e000}, - {0xfffa0000}, {0xfffa2000}, {0xfffa4000}, {0xfffa6000}, - {0xfffa8000}, {0xfffaa000}, {0xfffac000}, {0xfffae000}, - {0xfffb0000}, {0xfffb2000}, {0xfffb4000}, {0xfffb6000}, - {0xfffb8000}, {0xfffba000}, {0xfffbc000}, {0xfffbe000}, - {0xfffc0000}, {0xfffc2000}, {0xfffc4000}, {0xfffc6000}, - {0xfffc8000}, {0xfffca000}, {0xfffcc000}, {0xfffce000}, - {0xfffd0000}, {0xfffd2000}, {0xfffd4000}, {0xfffd6000}, - {0xfffd8000}, {0xfffda000}, {0xfffdc000}, {0xfffde000}, - {0xfffe0000}, {0xfffe2000}, {0xfffe4000}, {0xfffe6000}, - {0xfffe8000}, {0xfffea000}, {0xfffec000}, {0xfffee000}, - {0xffff0000}, {0xffff2000}, {0xffff4000}, {0xffff6000}, - {0xffff8000}, {0xffffa000}, {0xffffc000}, {0xffffe000}, -}; diff --git a/Dependencies/FreeImage/Source/OpenEXR/Iex/Iex.h b/Dependencies/FreeImage/Source/OpenEXR/Iex/Iex.h deleted file mode 100644 index a0fd31d..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Iex/Iex.h +++ /dev/null @@ -1,60 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IEX_H -#define INCLUDED_IEX_H - - -//-------------------------------- -// -// Exception handling -// -//-------------------------------- - - -#include "IexMacros.h" -#include "IexBaseExc.h" -#include "IexMathExc.h" -#include "IexThrowErrnoExc.h" - -// Note that we do not include file IexErrnoExc.h here. That file -// defines over 150 classes and significantly slows down compilation. -// If you throw ErrnoExc exceptions using the throwErrnoExc() function, -// you don't need IexErrnoExc.h. You have to include IexErrnoExc.h -// only if you want to catch specific subclasses of ErrnoExc. - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexBaseExc.cpp b/Dependencies/FreeImage/Source/OpenEXR/Iex/IexBaseExc.cpp deleted file mode 100644 index 3b2e197..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexBaseExc.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//--------------------------------------------------------------------- -// -// Constructors and destructors for our exception base class. -// -//--------------------------------------------------------------------- - -#include "IexExport.h" -#include "IexBaseExc.h" -#include "IexMacros.h" - -#ifdef PLATFORM_WINDOWS -#include -#endif - -#include - -IEX_INTERNAL_NAMESPACE_SOURCE_ENTER - - -namespace { - -StackTracer currentStackTracer = 0; - -} // namespace - - -void -setStackTracer (StackTracer stackTracer) -{ - currentStackTracer = stackTracer; -} - - -StackTracer -stackTracer () -{ - return currentStackTracer; -} - - -BaseExc::BaseExc (const char* s) throw () : - std::string (s? s: ""), - _stackTrace (currentStackTracer? currentStackTracer(): "") -{ - // empty -} - - -BaseExc::BaseExc (const std::string &s) throw () : - std::string (s), - _stackTrace (currentStackTracer? currentStackTracer(): "") -{ - // empty -} - - -BaseExc::BaseExc (std::stringstream &s) throw () : - std::string (s.str()), - _stackTrace (currentStackTracer? currentStackTracer(): "") -{ - // empty -} - - -BaseExc::BaseExc (const BaseExc &be) throw () : - std::string (be), - _stackTrace (be._stackTrace) -{ - // empty -} - - -BaseExc::~BaseExc () throw () -{ - // empty -} - - -const char * -BaseExc::what () const throw () -{ - return c_str(); -} - - -BaseExc & -BaseExc::assign (std::stringstream &s) -{ - std::string::assign (s.str()); - return *this; -} - -BaseExc & -BaseExc::append (std::stringstream &s) -{ - std::string::append (s.str()); - return *this; -} - -IEX_INTERNAL_NAMESPACE_SOURCE_EXIT - - -#ifdef PLATFORM_WINDOWS - -#pragma optimize("", off) -void -iex_debugTrap() -{ - if (0 != getenv("IEXDEBUGTHROW")) - ::DebugBreak(); -} -#else -void -iex_debugTrap() -{ - // how to in Linux? - if (0 != ::getenv("IEXDEBUGTHROW")) - __builtin_trap(); -} -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexBaseExc.h b/Dependencies/FreeImage/Source/OpenEXR/Iex/IexBaseExc.h deleted file mode 100644 index bf016f7..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexBaseExc.h +++ /dev/null @@ -1,264 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IEXBASEEXC_H -#define INCLUDED_IEXBASEEXC_H - -#include "IexNamespace.h" -#include "IexExport.h" - -//---------------------------------------------------------- -// -// A general exception base class, and a few -// useful exceptions derived from the base class. -// -//---------------------------------------------------------- - -#include -#include -#include - -IEX_INTERNAL_NAMESPACE_HEADER_ENTER - - -//------------------------------- -// Our most basic exception class -//------------------------------- - -class BaseExc: public std::string, public std::exception -{ - public: - - //---------------------------- - // Constructors and destructor - //---------------------------- - - IEX_EXPORT BaseExc (const char *s = 0) throw(); // std::string (s) - IEX_EXPORT BaseExc (const std::string &s) throw(); // std::string (s) - IEX_EXPORT BaseExc (std::stringstream &s) throw(); // std::string (s.str()) - - IEX_EXPORT BaseExc (const BaseExc &be) throw(); - IEX_EXPORT virtual ~BaseExc () throw (); - - //-------------------------------------------- - // what() method -- e.what() returns e.c_str() - //-------------------------------------------- - - IEX_EXPORT virtual const char * what () const throw (); - - - //-------------------------------------------------- - // Convenient methods to change the exception's text - //-------------------------------------------------- - - IEX_EXPORT BaseExc & assign (std::stringstream &s); // assign (s.str()) - IEX_EXPORT BaseExc & operator = (std::stringstream &s); - - IEX_EXPORT BaseExc & append (std::stringstream &s); // append (s.str()) - IEX_EXPORT BaseExc & operator += (std::stringstream &s); - - - //-------------------------------------------------- - // These methods from the base class get obscured by - // the definitions above. - //-------------------------------------------------- - - IEX_EXPORT BaseExc & assign (const char *s); - IEX_EXPORT BaseExc & operator = (const char *s); - - IEX_EXPORT BaseExc & append (const char *s); - IEX_EXPORT BaseExc & operator += (const char *s); - - - //-------------------------------------------------- - // Stack trace for the point at which the exception - // was thrown. The stack trace will be an empty - // string unless a working stack-tracing routine - // has been installed (see below, setStackTracer()). - //-------------------------------------------------- - - IEX_EXPORT const std::string & stackTrace () const; - - private: - - std::string _stackTrace; -}; - - -//----------------------------------------------------- -// A macro to save typing when declararing an exception -// class derived directly or indirectly from BaseExc: -//----------------------------------------------------- - -#define DEFINE_EXC_EXP(exp, name, base) \ - class exp name: public base \ - { \ - public: \ - name() throw(): base (0) {} \ - name (const char* text) throw(): base (text) {} \ - name (const std::string &text) throw(): base (text) {} \ - name (std::stringstream &text) throw(): base (text) {} \ - ~name() throw() { } \ - }; - -// For backward compatibility. -#define DEFINE_EXC(name, base) DEFINE_EXC_EXP(, name, base) - - -//-------------------------------------------------------- -// Some exceptions which should be useful in most programs -//-------------------------------------------------------- -DEFINE_EXC_EXP (IEX_EXPORT, ArgExc, BaseExc) // Invalid arguments to a function call - -DEFINE_EXC_EXP (IEX_EXPORT, LogicExc, BaseExc) // General error in a program's logic, - // for example, a function was called - // in a context where the call does - // not make sense. - -DEFINE_EXC_EXP (IEX_EXPORT, InputExc, BaseExc) // Invalid input data, e.g. from a file - -DEFINE_EXC_EXP (IEX_EXPORT, IoExc, BaseExc) // Input or output operation failed - -DEFINE_EXC_EXP (IEX_EXPORT, MathExc, BaseExc) // Arithmetic exception; more specific - // exceptions derived from this class - // are defined in ExcMath.h - -DEFINE_EXC_EXP (IEX_EXPORT, ErrnoExc, BaseExc) // Base class for exceptions corresponding - // to errno values (see errno.h); more - // specific exceptions derived from this - // class are defined in ExcErrno.h - -DEFINE_EXC_EXP (IEX_EXPORT, NoImplExc, BaseExc) // Missing method exception e.g. from a - // call to a method that is only partially - // or not at all implemented. A reminder - // to lazy software people to get back - // to work. - -DEFINE_EXC_EXP (IEX_EXPORT, NullExc, BaseExc) // A pointer is inappropriately null. - -DEFINE_EXC_EXP (IEX_EXPORT, TypeExc, BaseExc) // An object is an inappropriate type, - // i.e. a dynamnic_cast failed. - - -//---------------------------------------------------------------------- -// Stack-tracing support: -// -// setStackTracer(st) -// -// installs a stack-tracing routine, st, which will be called from -// class BaseExc's constructor every time an exception derived from -// BaseExc is thrown. The stack-tracing routine should return a -// string that contains a printable representation of the program's -// current call stack. This string will be stored in the BaseExc -// object; the string is accesible via the BaseExc::stackTrace() -// method. -// -// setStackTracer(0) -// -// removes the current stack tracing routine. When an exception -// derived from BaseExc is thrown, the stack trace string stored -// in the BaseExc object will be empty. -// -// stackTracer() -// -// returns a pointer to the current stack-tracing routine, or 0 -// if there is no current stack stack-tracing routine. -// -//---------------------------------------------------------------------- - -typedef std::string (* StackTracer) (); - -IEX_EXPORT void setStackTracer (StackTracer stackTracer); -IEX_EXPORT StackTracer stackTracer (); - - -//----------------- -// Inline functions -//----------------- - -inline BaseExc & -BaseExc::operator = (std::stringstream &s) -{ - return assign (s); -} - - -inline BaseExc & -BaseExc::operator += (std::stringstream &s) -{ - return append (s); -} - - -inline BaseExc & -BaseExc::assign (const char *s) -{ - std::string::assign(s); - return *this; -} - - -inline BaseExc & -BaseExc::operator = (const char *s) -{ - return assign(s); -} - - -inline BaseExc & -BaseExc::append (const char *s) -{ - std::string::append(s); - return *this; -} - - -inline BaseExc & -BaseExc::operator += (const char *s) -{ - return append(s); -} - - -inline const std::string & -BaseExc::stackTrace () const -{ - return _stackTrace; -} - - -IEX_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IEXBASEEXC_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexErrnoExc.h b/Dependencies/FreeImage/Source/OpenEXR/Iex/IexErrnoExc.h deleted file mode 100644 index 027c7a4..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexErrnoExc.h +++ /dev/null @@ -1,208 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IEXERRNOEXC_H -#define INCLUDED_IEXERRNOEXC_H - -//---------------------------------------------------------------- -// -// Exceptions which correspond to "errno" error codes. -// -//---------------------------------------------------------------- - -#include "IexBaseExc.h" - -IEX_INTERNAL_NAMESPACE_HEADER_ENTER - -DEFINE_EXC (EpermExc, ErrnoExc) -DEFINE_EXC (EnoentExc, ErrnoExc) -DEFINE_EXC (EsrchExc, ErrnoExc) -DEFINE_EXC (EintrExc, ErrnoExc) -DEFINE_EXC (EioExc, ErrnoExc) -DEFINE_EXC (EnxioExc, ErrnoExc) -DEFINE_EXC (E2bigExc, ErrnoExc) -DEFINE_EXC (EnoexecExc, ErrnoExc) -DEFINE_EXC (EbadfExc, ErrnoExc) -DEFINE_EXC (EchildExc, ErrnoExc) -DEFINE_EXC (EagainExc, ErrnoExc) -DEFINE_EXC (EnomemExc, ErrnoExc) -DEFINE_EXC (EaccesExc, ErrnoExc) -DEFINE_EXC (EfaultExc, ErrnoExc) -DEFINE_EXC (EnotblkExc, ErrnoExc) -DEFINE_EXC (EbusyExc, ErrnoExc) -DEFINE_EXC (EexistExc, ErrnoExc) -DEFINE_EXC (ExdevExc, ErrnoExc) -DEFINE_EXC (EnodevExc, ErrnoExc) -DEFINE_EXC (EnotdirExc, ErrnoExc) -DEFINE_EXC (EisdirExc, ErrnoExc) -DEFINE_EXC (EinvalExc, ErrnoExc) -DEFINE_EXC (EnfileExc, ErrnoExc) -DEFINE_EXC (EmfileExc, ErrnoExc) -DEFINE_EXC (EnottyExc, ErrnoExc) -DEFINE_EXC (EtxtbsyExc, ErrnoExc) -DEFINE_EXC (EfbigExc, ErrnoExc) -DEFINE_EXC (EnospcExc, ErrnoExc) -DEFINE_EXC (EspipeExc, ErrnoExc) -DEFINE_EXC (ErofsExc, ErrnoExc) -DEFINE_EXC (EmlinkExc, ErrnoExc) -DEFINE_EXC (EpipeExc, ErrnoExc) -DEFINE_EXC (EdomExc, ErrnoExc) -DEFINE_EXC (ErangeExc, ErrnoExc) -DEFINE_EXC (EnomsgExc, ErrnoExc) -DEFINE_EXC (EidrmExc, ErrnoExc) -DEFINE_EXC (EchrngExc, ErrnoExc) -DEFINE_EXC (El2nsyncExc, ErrnoExc) -DEFINE_EXC (El3hltExc, ErrnoExc) -DEFINE_EXC (El3rstExc, ErrnoExc) -DEFINE_EXC (ElnrngExc, ErrnoExc) -DEFINE_EXC (EunatchExc, ErrnoExc) -DEFINE_EXC (EnocsiExc, ErrnoExc) -DEFINE_EXC (El2hltExc, ErrnoExc) -DEFINE_EXC (EdeadlkExc, ErrnoExc) -DEFINE_EXC (EnolckExc, ErrnoExc) -DEFINE_EXC (EbadeExc, ErrnoExc) -DEFINE_EXC (EbadrExc, ErrnoExc) -DEFINE_EXC (ExfullExc, ErrnoExc) -DEFINE_EXC (EnoanoExc, ErrnoExc) -DEFINE_EXC (EbadrqcExc, ErrnoExc) -DEFINE_EXC (EbadsltExc, ErrnoExc) -DEFINE_EXC (EdeadlockExc, ErrnoExc) -DEFINE_EXC (EbfontExc, ErrnoExc) -DEFINE_EXC (EnostrExc, ErrnoExc) -DEFINE_EXC (EnodataExc, ErrnoExc) -DEFINE_EXC (EtimeExc, ErrnoExc) -DEFINE_EXC (EnosrExc, ErrnoExc) -DEFINE_EXC (EnonetExc, ErrnoExc) -DEFINE_EXC (EnopkgExc, ErrnoExc) -DEFINE_EXC (EremoteExc, ErrnoExc) -DEFINE_EXC (EnolinkExc, ErrnoExc) -DEFINE_EXC (EadvExc, ErrnoExc) -DEFINE_EXC (EsrmntExc, ErrnoExc) -DEFINE_EXC (EcommExc, ErrnoExc) -DEFINE_EXC (EprotoExc, ErrnoExc) -DEFINE_EXC (EmultihopExc, ErrnoExc) -DEFINE_EXC (EbadmsgExc, ErrnoExc) -DEFINE_EXC (EnametoolongExc, ErrnoExc) -DEFINE_EXC (EoverflowExc, ErrnoExc) -DEFINE_EXC (EnotuniqExc, ErrnoExc) -DEFINE_EXC (EbadfdExc, ErrnoExc) -DEFINE_EXC (EremchgExc, ErrnoExc) -DEFINE_EXC (ElibaccExc, ErrnoExc) -DEFINE_EXC (ElibbadExc, ErrnoExc) -DEFINE_EXC (ElibscnExc, ErrnoExc) -DEFINE_EXC (ElibmaxExc, ErrnoExc) -DEFINE_EXC (ElibexecExc, ErrnoExc) -DEFINE_EXC (EilseqExc, ErrnoExc) -DEFINE_EXC (EnosysExc, ErrnoExc) -DEFINE_EXC (EloopExc, ErrnoExc) -DEFINE_EXC (ErestartExc, ErrnoExc) -DEFINE_EXC (EstrpipeExc, ErrnoExc) -DEFINE_EXC (EnotemptyExc, ErrnoExc) -DEFINE_EXC (EusersExc, ErrnoExc) -DEFINE_EXC (EnotsockExc, ErrnoExc) -DEFINE_EXC (EdestaddrreqExc, ErrnoExc) -DEFINE_EXC (EmsgsizeExc, ErrnoExc) -DEFINE_EXC (EprototypeExc, ErrnoExc) -DEFINE_EXC (EnoprotooptExc, ErrnoExc) -DEFINE_EXC (EprotonosupportExc, ErrnoExc) -DEFINE_EXC (EsocktnosupportExc, ErrnoExc) -DEFINE_EXC (EopnotsuppExc, ErrnoExc) -DEFINE_EXC (EpfnosupportExc, ErrnoExc) -DEFINE_EXC (EafnosupportExc, ErrnoExc) -DEFINE_EXC (EaddrinuseExc, ErrnoExc) -DEFINE_EXC (EaddrnotavailExc, ErrnoExc) -DEFINE_EXC (EnetdownExc, ErrnoExc) -DEFINE_EXC (EnetunreachExc, ErrnoExc) -DEFINE_EXC (EnetresetExc, ErrnoExc) -DEFINE_EXC (EconnabortedExc, ErrnoExc) -DEFINE_EXC (EconnresetExc, ErrnoExc) -DEFINE_EXC (EnobufsExc, ErrnoExc) -DEFINE_EXC (EisconnExc, ErrnoExc) -DEFINE_EXC (EnotconnExc, ErrnoExc) -DEFINE_EXC (EshutdownExc, ErrnoExc) -DEFINE_EXC (EtoomanyrefsExc, ErrnoExc) -DEFINE_EXC (EtimedoutExc, ErrnoExc) -DEFINE_EXC (EconnrefusedExc, ErrnoExc) -DEFINE_EXC (EhostdownExc, ErrnoExc) -DEFINE_EXC (EhostunreachExc, ErrnoExc) -DEFINE_EXC (EalreadyExc, ErrnoExc) -DEFINE_EXC (EinprogressExc, ErrnoExc) -DEFINE_EXC (EstaleExc, ErrnoExc) -DEFINE_EXC (EioresidExc, ErrnoExc) -DEFINE_EXC (EucleanExc, ErrnoExc) -DEFINE_EXC (EnotnamExc, ErrnoExc) -DEFINE_EXC (EnavailExc, ErrnoExc) -DEFINE_EXC (EisnamExc, ErrnoExc) -DEFINE_EXC (EremoteioExc, ErrnoExc) -DEFINE_EXC (EinitExc, ErrnoExc) -DEFINE_EXC (EremdevExc, ErrnoExc) -DEFINE_EXC (EcanceledExc, ErrnoExc) -DEFINE_EXC (EnolimfileExc, ErrnoExc) -DEFINE_EXC (EproclimExc, ErrnoExc) -DEFINE_EXC (EdisjointExc, ErrnoExc) -DEFINE_EXC (EnologinExc, ErrnoExc) -DEFINE_EXC (EloginlimExc, ErrnoExc) -DEFINE_EXC (EgrouploopExc, ErrnoExc) -DEFINE_EXC (EnoattachExc, ErrnoExc) -DEFINE_EXC (EnotsupExc, ErrnoExc) -DEFINE_EXC (EnoattrExc, ErrnoExc) -DEFINE_EXC (EdircorruptedExc, ErrnoExc) -DEFINE_EXC (EdquotExc, ErrnoExc) -DEFINE_EXC (EnfsremoteExc, ErrnoExc) -DEFINE_EXC (EcontrollerExc, ErrnoExc) -DEFINE_EXC (EnotcontrollerExc, ErrnoExc) -DEFINE_EXC (EenqueuedExc, ErrnoExc) -DEFINE_EXC (EnotenqueuedExc, ErrnoExc) -DEFINE_EXC (EjoinedExc, ErrnoExc) -DEFINE_EXC (EnotjoinedExc, ErrnoExc) -DEFINE_EXC (EnoprocExc, ErrnoExc) -DEFINE_EXC (EmustrunExc, ErrnoExc) -DEFINE_EXC (EnotstoppedExc, ErrnoExc) -DEFINE_EXC (EclockcpuExc, ErrnoExc) -DEFINE_EXC (EinvalstateExc, ErrnoExc) -DEFINE_EXC (EnoexistExc, ErrnoExc) -DEFINE_EXC (EendofminorExc, ErrnoExc) -DEFINE_EXC (EbufsizeExc, ErrnoExc) -DEFINE_EXC (EemptyExc, ErrnoExc) -DEFINE_EXC (EnointrgroupExc, ErrnoExc) -DEFINE_EXC (EinvalmodeExc, ErrnoExc) -DEFINE_EXC (EcantextentExc, ErrnoExc) -DEFINE_EXC (EinvaltimeExc, ErrnoExc) -DEFINE_EXC (EdestroyedExc, ErrnoExc) - -IEX_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexExport.h b/Dependencies/FreeImage/Source/OpenEXR/Iex/IexExport.h deleted file mode 100644 index 270c1cf..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexExport.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef IEXEXPORT_H -#define IEXEXPORT_H - -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#if defined(OPENEXR_DLL) - #if defined(IEX_EXPORTS) - #define IEX_EXPORT __declspec(dllexport) - #else - #define IEX_EXPORT __declspec(dllimport) - #endif - #define IEX_EXPORT_CONST -#else - #define IEX_EXPORT - #define IEX_EXPORT_CONST const -#endif - -#endif // #ifndef IEXEXPORT_H - diff --git a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexForward.h b/Dependencies/FreeImage/Source/OpenEXR/Iex/IexForward.h deleted file mode 100644 index 743771c..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexForward.h +++ /dev/null @@ -1,229 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IEXFORWARD_H -#define INCLUDED_IEXFORWARD_H - -#include "IexNamespace.h" - -IEX_INTERNAL_NAMESPACE_HEADER_ENTER - -// -// Base exceptions. -// - -class BaseExc; -class ArgExc; -class LogicExc; -class InputExc; -class IoExc; -class MathExc; -class ErrnoExc; -class NoImplExc; -class NullExc; -class TypeExc; - -// -// Math exceptions. -// - -class OverflowExc; -class UnderflowExc; -class DivzeroExc; -class InexactExc; -class InvalidFpOpExc; - -// -// Errno exceptions. -// - -class EpermExc; -class EnoentExc; -class EsrchExc; -class EintrExc; -class EioExc; -class EnxioExc; -class E2bigExc; -class EnoexecExc; -class EbadfExc; -class EchildExc; -class EagainExc; -class EnomemExc; -class EaccesExc; -class EfaultExc; -class EnotblkExc; -class EbusyExc; -class EexistExc; -class ExdevExc; -class EnodevExc; -class EnotdirExc; -class EisdirExc; -class EinvalExc; -class EnfileExc; -class EmfileExc; -class EnottyExc; -class EtxtbsyExc; -class EfbigExc; -class EnospcExc; -class EspipeExc; -class ErofsExc; -class EmlinkExc; -class EpipeExc; -class EdomExc; -class ErangeExc; -class EnomsgExc; -class EidrmExc; -class EchrngExc; -class El2nsyncExc; -class El3hltExc; -class El3rstExc; -class ElnrngExc; -class EunatchExc; -class EnocsiExc; -class El2hltExc; -class EdeadlkExc; -class EnolckExc; -class EbadeExc; -class EbadrExc; -class ExfullExc; -class EnoanoExc; -class EbadrqcExc; -class EbadsltExc; -class EdeadlockExc; -class EbfontExc; -class EnostrExc; -class EnodataExc; -class EtimeExc; -class EnosrExc; -class EnonetExc; -class EnopkgExc; -class EremoteExc; -class EnolinkExc; -class EadvExc; -class EsrmntExc; -class EcommExc; -class EprotoExc; -class EmultihopExc; -class EbadmsgExc; -class EnametoolongExc; -class EoverflowExc; -class EnotuniqExc; -class EbadfdExc; -class EremchgExc; -class ElibaccExc; -class ElibbadExc; -class ElibscnExc; -class ElibmaxExc; -class ElibexecExc; -class EilseqExc; -class EnosysExc; -class EloopExc; -class ErestartExc; -class EstrpipeExc; -class EnotemptyExc; -class EusersExc; -class EnotsockExc; -class EdestaddrreqExc; -class EmsgsizeExc; -class EprototypeExc; -class EnoprotooptExc; -class EprotonosupportExc; -class EsocktnosupportExc; -class EopnotsuppExc; -class EpfnosupportExc; -class EafnosupportExc; -class EaddrinuseExc; -class EaddrnotavailExc; -class EnetdownExc; -class EnetunreachExc; -class EnetresetExc; -class EconnabortedExc; -class EconnresetExc; -class EnobufsExc; -class EisconnExc; -class EnotconnExc; -class EshutdownExc; -class EtoomanyrefsExc; -class EtimedoutExc; -class EconnrefusedExc; -class EhostdownExc; -class EhostunreachExc; -class EalreadyExc; -class EinprogressExc; -class EstaleExc; -class EioresidExc; -class EucleanExc; -class EnotnamExc; -class EnavailExc; -class EisnamExc; -class EremoteioExc; -class EinitExc; -class EremdevExc; -class EcanceledExc; -class EnolimfileExc; -class EproclimExc; -class EdisjointExc; -class EnologinExc; -class EloginlimExc; -class EgrouploopExc; -class EnoattachExc; -class EnotsupExc; -class EnoattrExc; -class EdircorruptedExc; -class EdquotExc; -class EnfsremoteExc; -class EcontrollerExc; -class EnotcontrollerExc; -class EenqueuedExc; -class EnotenqueuedExc; -class EjoinedExc; -class EnotjoinedExc; -class EnoprocExc; -class EmustrunExc; -class EnotstoppedExc; -class EclockcpuExc; -class EinvalstateExc; -class EnoexistExc; -class EendofminorExc; -class EbufsizeExc; -class EemptyExc; -class EnointrgroupExc; -class EinvalmodeExc; -class EcantextentExc; -class EinvaltimeExc; -class EdestroyedExc; - -IEX_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IEXFORWARD_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexMacros.h b/Dependencies/FreeImage/Source/OpenEXR/Iex/IexMacros.h deleted file mode 100644 index 18d37bd..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexMacros.h +++ /dev/null @@ -1,170 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IEXMACROS_H -#define INCLUDED_IEXMACROS_H - -//-------------------------------------------------------------------- -// -// Macros which make throwing exceptions more convenient -// -//-------------------------------------------------------------------- - -#include - - -//---------------------------------------------------------------------------- -// A macro to throw exceptions whose text is assembled using stringstreams. -// -// Example: -// -// THROW (InputExc, "Syntax error in line " << line ", " << file << "."); -// -//---------------------------------------------------------------------------- - -#include "IexExport.h" -#include "IexForward.h" - -IEX_EXPORT void iex_debugTrap(); - -#define THROW(type, text) \ - do \ - { \ - iex_debugTrap(); \ - std::stringstream s; \ - s << text; \ - throw type (s); \ - } \ - while (0) - - -//---------------------------------------------------------------------------- -// Macros to add to or to replace the text of an exception. -// The new text is assembled using stringstreams. -// -// Examples: -// -// Append to end of an exception's text: -// -// catch (BaseExc &e) -// { -// APPEND_EXC (e, " Directory " << name << " does not exist."); -// throw; -// } -// -// Replace an exception's text: -// -// catch (BaseExc &e) -// { -// REPLACE_EXC (e, "Directory " << name << " does not exist. " << e); -// throw; -// } -//---------------------------------------------------------------------------- - -#define APPEND_EXC(exc, text) \ - do \ - { \ - std::stringstream s; \ - s << text; \ - exc.append (s); \ - } \ - while (0) - -#define REPLACE_EXC(exc, text) \ - do \ - { \ - std::stringstream s; \ - s << text; \ - exc.assign (s); \ - } \ - while (0) - - -//------------------------------------------------------------- -// A macro to throw ErrnoExc exceptions whose text is assembled -// using stringstreams: -// -// Example: -// -// THROW_ERRNO ("Cannot open file " << name << " (%T)."); -// -//------------------------------------------------------------- - -#define THROW_ERRNO(text) \ - do \ - { \ - std::stringstream s; \ - s << text; \ - ::IEX_NAMESPACE::throwErrnoExc (s.str()); \ - } \ - while (0) - - -//------------------------------------------------------------- -// A macro to throw exceptions if an assertion is false. -// -// Example: -// -// ASSERT (ptr != 0, NullExc, "Null pointer" ); -// -//------------------------------------------------------------- - -#define ASSERT(assertion, type, text) \ - do \ - { \ - if( (assertion) == false ) \ - { \ - THROW( type, text ); \ - } \ - } \ - while (0) - -//------------------------------------------------------------- -// A macro to throw an IEX_NAMESPACE::LogicExc if an assertion is false, -// with the text composed from the source code file, line number, -// and assertion argument text. -// -// Example: -// -// LOGIC_ASSERT (i < n); -// -//------------------------------------------------------------- -#define LOGIC_ASSERT(assertion) \ - ASSERT(assertion, \ - IEX_NAMESPACE::LogicExc, \ - __FILE__ << "(" << __LINE__ << "): logical assertion failed: " << #assertion ) - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexMathExc.h b/Dependencies/FreeImage/Source/OpenEXR/Iex/IexMathExc.h deleted file mode 100644 index 795f500..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexMathExc.h +++ /dev/null @@ -1,57 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IEXMATHEXC_H -#define INCLUDED_IEXMATHEXC_H - -#include "IexBaseExc.h" - -IEX_INTERNAL_NAMESPACE_HEADER_ENTER - -//--------------------------------------------------------- -// Exception classess which correspond to specific floating -// point exceptions. -//--------------------------------------------------------- - -DEFINE_EXC (OverflowExc, MathExc) // Overflow -DEFINE_EXC (UnderflowExc, MathExc) // Underflow -DEFINE_EXC (DivzeroExc, MathExc) // Division by zero -DEFINE_EXC (InexactExc, MathExc) // Inexact result -DEFINE_EXC (InvalidFpOpExc, MathExc) // Invalid operation - -IEX_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IEXMATHEXC_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexNamespace.h b/Dependencies/FreeImage/Source/OpenEXR/Iex/IexNamespace.h deleted file mode 100644 index bef1572..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexNamespace.h +++ /dev/null @@ -1,112 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IEXNAMESPACE_H -#define INCLUDED_IEXNAMESPACE_H - -// -// The purpose of this file is to make it possible to specify an -// IEX_INTERNAL_NAMESPACE as a preprocessor definition and have all of the -// Iex symbols defined within that namespace rather than the standard -// Iex namespace. Those symbols are made available to client code through -// the IEX_NAMESPACE in addition to the IEX_INTERNAL_NAMESPACE. -// -// To ensure source code compatibility, the IEX_NAMESPACE defaults to Iex -// and then "using namespace IEX_INTERNAL_NAMESPACE;" brings all of the -// declarations from the IEX_INTERNAL_NAMESPACE into the IEX_NAMESPACE. This -// means that client code can continue to use syntax like Iex::BaseExc, but -// at link time it will resolve to a mangled symbol based on the -// IEX_INTERNAL_NAMESPACE. -// -// As an example, if one needed to build against a newer version of Iex and -// have it run alongside an older version in the same application, it is now -// possible to use an internal namespace to prevent collisions between the -// older versions of Iex symbols and the newer ones. To do this, the -// following could be defined at build time: -// -// IEX_INTERNAL_NAMESPACE = Iex_v2 -// -// This means that declarations inside Iex headers look like this (after the -// preprocessor has done its work): -// -// namespace Iex_v2 { -// ... -// class declarations -// ... -// } -// -// namespace Iex { -// using namespace Iex_v2; -// } -// - -// -// Open Source version of this file pulls in the IlmBaseConfig.h file -// for the configure time options. -// -#include "IlmBaseConfig.h" - -#ifndef IEX_NAMESPACE -#define IEX_NAMESPACE Iex -#endif - -#ifndef IEX_INTERNAL_NAMESPACE -#define IEX_INTERNAL_NAMESPACE IEX_NAMESPACE -#endif - -// -// We need to be sure that we import the internal namespace into the public one. -// To do this, we use the small bit of code below which initially defines -// IEX_INTERNAL_NAMESPACE (so it can be referenced) and then defines -// IEX_NAMESPACE and pulls the internal symbols into the public namespace. -// - -namespace IEX_INTERNAL_NAMESPACE {} -namespace IEX_NAMESPACE { - using namespace IEX_INTERNAL_NAMESPACE; -} - -// -// There are identical pairs of HEADER/SOURCE ENTER/EXIT macros so that -// future extension to the namespace mechanism is possible without changing -// project source code. -// - -#define IEX_INTERNAL_NAMESPACE_HEADER_ENTER namespace IEX_INTERNAL_NAMESPACE { -#define IEX_INTERNAL_NAMESPACE_HEADER_EXIT } - -#define IEX_INTERNAL_NAMESPACE_SOURCE_ENTER namespace IEX_INTERNAL_NAMESPACE { -#define IEX_INTERNAL_NAMESPACE_SOURCE_EXIT } - -#endif // INCLUDED_IEXNAMESPACE_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexThrowErrnoExc.cpp b/Dependencies/FreeImage/Source/OpenEXR/Iex/IexThrowErrnoExc.cpp deleted file mode 100644 index 32e7fb2..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexThrowErrnoExc.cpp +++ /dev/null @@ -1,873 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//---------------------------------------------------------------- -// -// Exceptions that correspond to "errno" error codes, -// and a function to make throwing those exceptions easy. -// -//---------------------------------------------------------------- - -#include "IexThrowErrnoExc.h" -#include "IexErrnoExc.h" -#include -#include - -#ifdef PLATFORM_WINDOWS -#include -#endif - -IEX_INTERNAL_NAMESPACE_SOURCE_ENTER - - -void throwErrnoExc (const std::string &text, int errnum) -{ -#ifdef PLATFORM_WINDOWS - if (0 != getenv("IEXDEBUGTHROW")) - DebugBreak(); -#endif - - const char *entext = strerror (errnum); - std::string tmp (text); - std::string::size_type pos; - - while (std::string::npos != (pos = tmp.find ("%T"))) - tmp.replace (pos, 2, entext, strlen (entext)); - - switch (errnum) - { - #if defined (EPERM) - case EPERM: - throw EpermExc (tmp); - #endif - - #if defined (ENOENT) - case ENOENT: - throw EnoentExc (tmp); - #endif - - #if defined (ESRCH) - case ESRCH: - throw EsrchExc (tmp); - #endif - - #if defined (EINTR) - case EINTR: - throw EintrExc (tmp); - #endif - - #if defined (EIO) - case EIO: - throw EioExc (tmp); - #endif - - #if defined (ENXIO) - case ENXIO: - throw EnxioExc (tmp); - #endif - - #if defined (E2BIG) - case E2BIG: - throw E2bigExc (tmp); - #endif - - #if defined (ENOEXEC) - case ENOEXEC: - throw EnoexecExc (tmp); - #endif - - #if defined (EBADF) - case EBADF: - throw EbadfExc (tmp); - #endif - - #if defined (ECHILD) - case ECHILD: - throw EchildExc (tmp); - #endif - - #if defined (EAGAIN) - case EAGAIN: - throw EagainExc (tmp); - #endif - - #if defined (ENOMEM) - case ENOMEM: - throw EnomemExc (tmp); - #endif - - #if defined (EACCES) - case EACCES: - throw EaccesExc (tmp); - #endif - - #if defined (EFAULT) - case EFAULT: - throw EfaultExc (tmp); - #endif - - #if defined (ENOTBLK) - case ENOTBLK: - throw EnotblkExc (tmp); - #endif - - #if defined (EBUSY) - case EBUSY: - throw EbusyExc (tmp); - #endif - - #if defined (EEXIST) - case EEXIST: - throw EexistExc (tmp); - #endif - - #if defined (EXDEV) - case EXDEV: - throw ExdevExc (tmp); - #endif - - #if defined (ENODEV) - case ENODEV: - throw EnodevExc (tmp); - #endif - - #if defined (ENOTDIR) - case ENOTDIR: - throw EnotdirExc (tmp); - #endif - - #if defined (EISDIR) - case EISDIR: - throw EisdirExc (tmp); - #endif - - #if defined (EINVAL) - case EINVAL: - throw EinvalExc (tmp); - #endif - - #if defined (ENFILE) - case ENFILE: - throw EnfileExc (tmp); - #endif - - #if defined (EMFILE) - case EMFILE: - throw EmfileExc (tmp); - #endif - - #if defined (ENOTTY) - case ENOTTY: - throw EnottyExc (tmp); - #endif - - #if defined (ETXTBSY) - case ETXTBSY: - throw EtxtbsyExc (tmp); - #endif - - #if defined (EFBIG) - case EFBIG: - throw EfbigExc (tmp); - #endif - - #if defined (ENOSPC) - case ENOSPC: - throw EnospcExc (tmp); - #endif - - #if defined (ESPIPE) - case ESPIPE: - throw EspipeExc (tmp); - #endif - - #if defined (EROFS) - case EROFS: - throw ErofsExc (tmp); - #endif - - #if defined (EMLINK) - case EMLINK: - throw EmlinkExc (tmp); - #endif - - #if defined (EPIPE) - case EPIPE: - throw EpipeExc (tmp); - #endif - - #if defined (EDOM) - case EDOM: - throw EdomExc (tmp); - #endif - - #if defined (ERANGE) - case ERANGE: - throw ErangeExc (tmp); - #endif - - #if defined (ENOMSG) - case ENOMSG: - throw EnomsgExc (tmp); - #endif - - #if defined (EIDRM) - case EIDRM: - throw EidrmExc (tmp); - #endif - - #if defined (ECHRNG) - case ECHRNG: - throw EchrngExc (tmp); - #endif - - #if defined (EL2NSYNC) - case EL2NSYNC: - throw El2nsyncExc (tmp); - #endif - - #if defined (EL3HLT) - case EL3HLT: - throw El3hltExc (tmp); - #endif - - #if defined (EL3RST) - case EL3RST: - throw El3rstExc (tmp); - #endif - - #if defined (ELNRNG) - case ELNRNG: - throw ElnrngExc (tmp); - #endif - - #if defined (EUNATCH) - case EUNATCH: - throw EunatchExc (tmp); - #endif - - #if defined (ENOSCI) - case ENOCSI: - throw EnocsiExc (tmp); - #endif - - #if defined (EL2HLT) - case EL2HLT: - throw El2hltExc (tmp); - #endif - - #if defined (EDEADLK) - case EDEADLK: - throw EdeadlkExc (tmp); - #endif - - #if defined (ENOLCK) - case ENOLCK: - throw EnolckExc (tmp); - #endif - - #if defined (EBADE) - case EBADE: - throw EbadeExc (tmp); - #endif - - #if defined (EBADR) - case EBADR: - throw EbadrExc (tmp); - #endif - - #if defined (EXFULL) - case EXFULL: - throw ExfullExc (tmp); - #endif - - #if defined (ENOANO) - case ENOANO: - throw EnoanoExc (tmp); - #endif - - #if defined (EBADRQC) - case EBADRQC: - throw EbadrqcExc (tmp); - #endif - - #if defined (EBADSLT) - case EBADSLT: - throw EbadsltExc (tmp); - #endif - - #if defined (EDEADLOCK) && defined (EDEADLK) - #if EDEADLOCK != EDEADLK - case EDEADLOCK: - throw EdeadlockExc (tmp); - #endif - #elif defined (EDEADLOCK) - case EDEADLOCK: - throw EdeadlockExc (tmp); - #endif - - #if defined (EBFONT) - case EBFONT: - throw EbfontExc (tmp); - #endif - - #if defined (ENOSTR) - case ENOSTR: - throw EnostrExc (tmp); - #endif - - #if defined (ENODATA) - case ENODATA: - throw EnodataExc (tmp); - #endif - - #if defined (ETIME) - case ETIME: - throw EtimeExc (tmp); - #endif - - #if defined (ENOSR) - case ENOSR: - throw EnosrExc (tmp); - #endif - - #if defined (ENONET) - case ENONET: - throw EnonetExc (tmp); - #endif - - #if defined (ENOPKG) - case ENOPKG: - throw EnopkgExc (tmp); - #endif - - #if defined (EREMOTE) - case EREMOTE: - throw EremoteExc (tmp); - #endif - - #if defined (ENOLINK) - case ENOLINK: - throw EnolinkExc (tmp); - #endif - - #if defined (EADV) - case EADV: - throw EadvExc (tmp); - #endif - - #if defined (ESRMNT) - case ESRMNT: - throw EsrmntExc (tmp); - #endif - - #if defined (ECOMM) - case ECOMM: - throw EcommExc (tmp); - #endif - - #if defined (EPROTO) - case EPROTO: - throw EprotoExc (tmp); - #endif - - #if defined (EMULTIHOP) - case EMULTIHOP: - throw EmultihopExc (tmp); - #endif - - #if defined (EBADMSG) - case EBADMSG: - throw EbadmsgExc (tmp); - #endif - - #if defined (ENAMETOOLONG) - case ENAMETOOLONG: - throw EnametoolongExc (tmp); - #endif - - #if defined (EOVERFLOW) - case EOVERFLOW: - throw EoverflowExc (tmp); - #endif - - #if defined (ENOTUNIQ) - case ENOTUNIQ: - throw EnotuniqExc (tmp); - #endif - - #if defined (EBADFD) - case EBADFD: - throw EbadfdExc (tmp); - #endif - - #if defined (EREMCHG) - case EREMCHG: - throw EremchgExc (tmp); - #endif - - #if defined (ELIBACC) - case ELIBACC: - throw ElibaccExc (tmp); - #endif - - #if defined (ELIBBAD) - case ELIBBAD: - throw ElibbadExc (tmp); - #endif - - #if defined (ELIBSCN) - case ELIBSCN: - throw ElibscnExc (tmp); - #endif - - #if defined (ELIBMAX) - case ELIBMAX: - throw ElibmaxExc (tmp); - #endif - - #if defined (ELIBEXEC) - case ELIBEXEC: - throw ElibexecExc (tmp); - #endif - - #if defined (EILSEQ) - case EILSEQ: - throw EilseqExc (tmp); - #endif - - #if defined (ENOSYS) - case ENOSYS: - throw EnosysExc (tmp); - #endif - - #if defined (ELOOP) - case ELOOP: - throw EloopExc (tmp); - #endif - - #if defined (ERESTART) - case ERESTART: - throw ErestartExc (tmp); - #endif - - #if defined (ESTRPIPE) - case ESTRPIPE: - throw EstrpipeExc (tmp); - #endif - - #if defined (ENOTEMPTY) - case ENOTEMPTY: - throw EnotemptyExc (tmp); - #endif - - #if defined (EUSERS) - case EUSERS: - throw EusersExc (tmp); - #endif - - #if defined (ENOTSOCK) - case ENOTSOCK: - throw EnotsockExc (tmp); - #endif - - #if defined (EDESTADDRREQ) - case EDESTADDRREQ: - throw EdestaddrreqExc (tmp); - #endif - - #if defined (EMSGSIZE) - case EMSGSIZE: - throw EmsgsizeExc (tmp); - #endif - - #if defined (EPROTOTYPE) - case EPROTOTYPE: - throw EprototypeExc (tmp); - #endif - - #if defined (ENOPROTOOPT) - case ENOPROTOOPT: - throw EnoprotooptExc (tmp); - #endif - - #if defined (EPROTONOSUPPORT) - case EPROTONOSUPPORT: - throw EprotonosupportExc (tmp); - #endif - - #if defined (ESOCKTNOSUPPORT) - case ESOCKTNOSUPPORT: - throw EsocktnosupportExc (tmp); - #endif - - #if defined (EOPNOTSUPP) - case EOPNOTSUPP: - throw EopnotsuppExc (tmp); - #endif - - #if defined (EPFNOSUPPORT) - case EPFNOSUPPORT: - throw EpfnosupportExc (tmp); - #endif - - #if defined (EAFNOSUPPORT) - case EAFNOSUPPORT: - throw EafnosupportExc (tmp); - #endif - - #if defined (EADDRINUSE) - case EADDRINUSE: - throw EaddrinuseExc (tmp); - #endif - - #if defined (EADDRNOTAVAIL) - case EADDRNOTAVAIL: - throw EaddrnotavailExc (tmp); - #endif - - #if defined (ENETDOWN) - case ENETDOWN: - throw EnetdownExc (tmp); - #endif - - #if defined (ENETUNREACH) - case ENETUNREACH: - throw EnetunreachExc (tmp); - #endif - - #if defined (ENETRESET) - case ENETRESET: - throw EnetresetExc (tmp); - #endif - - #if defined (ECONNABORTED) - case ECONNABORTED: - throw EconnabortedExc (tmp); - #endif - - #if defined (ECONNRESET) - case ECONNRESET: - throw EconnresetExc (tmp); - #endif - - #if defined (ENOBUFS) - case ENOBUFS: - throw EnobufsExc (tmp); - #endif - - #if defined (EISCONN) - case EISCONN: - throw EisconnExc (tmp); - #endif - - #if defined (ENOTCONN) - case ENOTCONN: - throw EnotconnExc (tmp); - #endif - - #if defined (ESHUTDOWN) - case ESHUTDOWN: - throw EshutdownExc (tmp); - #endif - - #if defined (ETOOMANYREFS) - case ETOOMANYREFS: - throw EtoomanyrefsExc (tmp); - #endif - - #if defined (ETIMEDOUT) - case ETIMEDOUT: - throw EtimedoutExc (tmp); - #endif - - #if defined (ECONNREFUSED) - case ECONNREFUSED: - throw EconnrefusedExc (tmp); - #endif - - #if defined (EHOSTDOWN) - case EHOSTDOWN: - throw EhostdownExc (tmp); - #endif - - #if defined (EHOSTUNREACH) - case EHOSTUNREACH: - throw EhostunreachExc (tmp); - #endif - - #if defined (EALREADY) - case EALREADY: - throw EalreadyExc (tmp); - #endif - - #if defined (EINPROGRESS) - case EINPROGRESS: - throw EinprogressExc (tmp); - #endif - - #if defined (ESTALE) - case ESTALE: - throw EstaleExc (tmp); - #endif - - #if defined (EIORESID) - case EIORESID: - throw EioresidExc (tmp); - #endif - - #if defined (EUCLEAN) - case EUCLEAN: - throw EucleanExc (tmp); - #endif - - #if defined (ENOTNAM) - case ENOTNAM: - throw EnotnamExc (tmp); - #endif - - #if defined (ENAVAIL) - case ENAVAIL: - throw EnavailExc (tmp); - #endif - - #if defined (EISNAM) - case EISNAM: - throw EisnamExc (tmp); - #endif - - #if defined (EREMOTEIO) - case EREMOTEIO: - throw EremoteioExc (tmp); - #endif - - #if defined (EINIT) - case EINIT: - throw EinitExc (tmp); - #endif - - #if defined (EREMDEV) - case EREMDEV: - throw EremdevExc (tmp); - #endif - - #if defined (ECANCELED) - case ECANCELED: - throw EcanceledExc (tmp); - #endif - - #if defined (ENOLIMFILE) - case ENOLIMFILE: - throw EnolimfileExc (tmp); - #endif - - #if defined (EPROCLIM) - case EPROCLIM: - throw EproclimExc (tmp); - #endif - - #if defined (EDISJOINT) - case EDISJOINT: - throw EdisjointExc (tmp); - #endif - - #if defined (ENOLOGIN) - case ENOLOGIN: - throw EnologinExc (tmp); - #endif - - #if defined (ELOGINLIM) - case ELOGINLIM: - throw EloginlimExc (tmp); - #endif - - #if defined (EGROUPLOOP) - case EGROUPLOOP: - throw EgrouploopExc (tmp); - #endif - - #if defined (ENOATTACH) - case ENOATTACH: - throw EnoattachExc (tmp); - #endif - - #if defined (ENOTSUP) && defined (EOPNOTSUPP) - #if ENOTSUP != EOPNOTSUPP - case ENOTSUP: - throw EnotsupExc (tmp); - #endif - #elif defined (ENOTSUP) - case ENOTSUP: - throw EnotsupExc (tmp); - #endif - - #if defined (ENOATTR) - case ENOATTR: - throw EnoattrExc (tmp); - #endif - - #if defined (EDIRCORRUPTED) - case EDIRCORRUPTED: - throw EdircorruptedExc (tmp); - #endif - - #if defined (EDQUOT) - case EDQUOT: - throw EdquotExc (tmp); - #endif - - #if defined (ENFSREMOTE) - case ENFSREMOTE: - throw EnfsremoteExc (tmp); - #endif - - #if defined (ECONTROLLER) - case ECONTROLLER: - throw EcontrollerExc (tmp); - #endif - - #if defined (ENOTCONTROLLER) - case ENOTCONTROLLER: - throw EnotcontrollerExc (tmp); - #endif - - #if defined (EENQUEUED) - case EENQUEUED: - throw EenqueuedExc (tmp); - #endif - - #if defined (ENOTENQUEUED) - case ENOTENQUEUED: - throw EnotenqueuedExc (tmp); - #endif - - #if defined (EJOINED) - case EJOINED: - throw EjoinedExc (tmp); - #endif - - #if defined (ENOTJOINED) - case ENOTJOINED: - throw EnotjoinedExc (tmp); - #endif - - #if defined (ENOPROC) - case ENOPROC: - throw EnoprocExc (tmp); - #endif - - #if defined (EMUSTRUN) - case EMUSTRUN: - throw EmustrunExc (tmp); - #endif - - #if defined (ENOTSTOPPED) - case ENOTSTOPPED: - throw EnotstoppedExc (tmp); - #endif - - #if defined (ECLOCKCPU) - case ECLOCKCPU: - throw EclockcpuExc (tmp); - #endif - - #if defined (EINVALSTATE) - case EINVALSTATE: - throw EinvalstateExc (tmp); - #endif - - #if defined (ENOEXIST) - case ENOEXIST: - throw EnoexistExc (tmp); - #endif - - #if defined (EENDOFMINOR) - case EENDOFMINOR: - throw EendofminorExc (tmp); - #endif - - #if defined (EBUFSIZE) - case EBUFSIZE: - throw EbufsizeExc (tmp); - #endif - - #if defined (EEMPTY) - case EEMPTY: - throw EemptyExc (tmp); - #endif - - #if defined (ENOINTRGROUP) - case ENOINTRGROUP: - throw EnointrgroupExc (tmp); - #endif - - #if defined (EINVALMODE) - case EINVALMODE: - throw EinvalmodeExc (tmp); - #endif - - #if defined (ECANTEXTENT) - case ECANTEXTENT: - throw EcantextentExc (tmp); - #endif - - #if defined (EINVALTIME) - case EINVALTIME: - throw EinvaltimeExc (tmp); - #endif - - #if defined (EDESTROYED) - case EDESTROYED: - throw EdestroyedExc (tmp); - #endif - } - - throw ErrnoExc (tmp); -} - - -void throwErrnoExc (const std::string &text) -{ - throwErrnoExc (text, errno); -} - -void throwErrnoExc() -{ - std::string txt = "%T."; - throwErrnoExc (txt); -} - -IEX_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexThrowErrnoExc.h b/Dependencies/FreeImage/Source/OpenEXR/Iex/IexThrowErrnoExc.h deleted file mode 100644 index 224ed2b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Iex/IexThrowErrnoExc.h +++ /dev/null @@ -1,97 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IEXTHROWERRNOEXC_H -#define INCLUDED_IEXTHROWERRNOEXC_H - -//---------------------------------------------------------- -// -// A function which throws ExcErrno exceptions -// -//---------------------------------------------------------- - -#include "IexBaseExc.h" -#include "IexExport.h" - -IEX_INTERNAL_NAMESPACE_HEADER_ENTER - - -//-------------------------------------------------------------------------- -// -// Function throwErrnoExc() throws an exception which corresponds to -// error code errnum. The exception text is initialized with a copy -// of the string passed to throwErrnoExc(), where all occurrences of -// "%T" have been replaced with the output of strerror(oserror()). -// -// Example: -// -// If opening file /tmp/output failed with an ENOENT error code, -// calling -// -// throwErrnoExc (); -// -// or -// -// throwErrnoExc ("%T."); -// -// will throw an EnoentExc whose text reads -// -// No such file or directory. -// -// More detailed messages can be assembled using stringstreams: -// -// std::stringstream s; -// s << "Cannot open file " << name << " (%T)."; -// throwErrnoExc (s); -// -// The resulting exception contains the following text: -// -// Cannot open file /tmp/output (No such file or directory). -// -// Alternatively, you may want to use the THROW_ERRNO macro defined -// in IexMacros.h: -// -// THROW_ERRNO ("Cannot open file " << name << " (%T).") -// -//-------------------------------------------------------------------------- - -IEX_EXPORT void throwErrnoExc(const std::string &txt, int errnum); -IEX_EXPORT void throwErrnoExc(const std::string &txt); -IEX_EXPORT void throwErrnoExc(); - -IEX_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IEXTHROWERRNOEXC_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFloatExc.cpp b/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFloatExc.cpp deleted file mode 100644 index 7f492b3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFloatExc.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 1997-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------- -// -// A function to control which IEEE floating -// point exceptions will be translated into -// C++ MathExc exceptions. -// -//----------------------------------------------------- - -#include -#include -#include - -#if 0 - #include - #define debug(x) (std::cout << x << std::flush) -#else - #define debug(x) -#endif - -IEX_INTERNAL_NAMESPACE_SOURCE_ENTER - - -namespace { - -void -fpeHandler (int type, const char explanation[]) -{ - switch (type) - { - case IEEE_OVERFLOW: - throw OverflowExc (explanation); - - case IEEE_UNDERFLOW: - throw UnderflowExc (explanation); - - case IEEE_DIVZERO: - throw DivzeroExc (explanation); - - case IEEE_INEXACT: - throw InexactExc (explanation); - - case IEEE_INVALID: - throw InvalidFpOpExc (explanation); - } - - throw MathExc (explanation); -} - -} // namespace - - -void -mathExcOn (int when) -{ - debug ("mathExcOn (when = 0x" << std::hex << when << ")\n"); - - setFpExceptions (when); - setFpExceptionHandler (fpeHandler); -} - - -int -getMathExcOn () -{ - int when = fpExceptions(); - - debug ("getMathExcOn () == 0x" << std::hex << when << ")\n"); - - return when; -} - -void -MathExcOn::handleOutstandingExceptions() -{ - handleExceptionsSetInRegisters(); -} - - -IEX_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFloatExc.h b/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFloatExc.h deleted file mode 100644 index 825dba1..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFloatExc.h +++ /dev/null @@ -1,146 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IEXMATHFLOATEXC_H -#define INCLUDED_IEXMATHFLOATEXC_H - -#ifndef IEXMATH_EXPORT_H -#define IEXMATH_EXPORT_H - -#if defined(OPENEXR_DLL) - #if defined(IEX_EXPORTS) - #define IEXMATH_EXPORT __declspec(dllexport) - #else - #define IEXMATH_EXPORT __declspec(dllimport) - #endif - #define IEXMATH_EXPORT_CONST -#else - #define IEXMATH_EXPORT - #define IEXMATH_EXPORT_CONST const -#endif - -#endif - -#include "IexNamespace.h" -#include "IexMathExc.h" -//#include -#include "IexMathIeeeExc.h" - -IEX_INTERNAL_NAMESPACE_HEADER_ENTER - - -//------------------------------------------------------------- -// Function mathExcOn() defines which floating point exceptions -// will be trapped and converted to C++ exceptions. -//------------------------------------------------------------- - -IEXMATH_EXPORT -void mathExcOn (int when = (IEEE_OVERFLOW | IEEE_DIVZERO | IEEE_INVALID)); - - -//---------------------------------------------------------------------- -// Function getMathExcOn() tells you for which floating point exceptions -// trapping and conversion to C++ exceptions is currently enabled. -//---------------------------------------------------------------------- - -IEXMATH_EXPORT -int getMathExcOn(); - - -//------------------------------------------------------------------------ -// A classs that temporarily sets floating point exception trapping -// and conversion, and later restores the previous settings. -// -// Example: -// -// float -// trickyComputation (float x) -// { -// MathExcOn meo (0); // temporarily disable floating -// // point exception trapping -// -// float result = ...; // computation which may cause -// // floating point exceptions -// -// return result; // destruction of meo restores -// } // the program's previous floating -// // point exception settings -//------------------------------------------------------------------------ - -class IEXMATH_EXPORT MathExcOn -{ - public: - - MathExcOn (int when) - : - _changed (false) - { - _saved = getMathExcOn(); - - if (_saved != when) - { - _changed = true; - mathExcOn (when); - } - } - - ~MathExcOn () - { - if (_changed) - mathExcOn (_saved); - } - - // It is possible for functions to set the exception registers - // yet not trigger a SIGFPE. Specifically, the implementation - // of pow(x, y) we're using can generates a NaN from a negative x - // and fractional y but a SIGFPE is not generated. - // This function examimes the exception registers and calls the - // fpHandler if those registers modulo the exception mask are set. - // It should be called wherever this class is commonly used where it has - // been found that certain floating point exceptions are not being thrown. - - void handleOutstandingExceptions(); - - private: - - bool _changed; - int _saved; -}; - - -IEX_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFpu.cpp b/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFpu.cpp deleted file mode 100644 index 5543046..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFpu.cpp +++ /dev/null @@ -1,530 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 1997, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//------------------------------------------------------------------------ -// -// Functions to control floating point exceptions. -// -//------------------------------------------------------------------------ - -#include "IexMathFpu.h" - -#include -#include -#include - -#if 0 - #include - #define debug(x) (std::cout << x << std::flush) -#else - #define debug(x) -#endif - -#if defined(HAVE_UCONTEXT_H) && (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)) - -#include -#include -#include -#include - - -IEX_INTERNAL_NAMESPACE_SOURCE_ENTER - - - -namespace FpuControl -{ - -//------------------------------------------------------------------- -// -// Modern x86 processors and all AMD64 processors have two -// sets of floating-point control/status registers: cw and sw -// for legacy x87 stack-based arithmetic, and mxcsr for -// SIMD arithmetic. When setting exception masks or checking -// for exceptions, we must set/check all relevant registers, -// since applications may contain code that uses either FP -// model. -// -// These functions handle both FP models for x86 and AMD64. -// -//------------------------------------------------------------------- - -//------------------------------------------------------------------- -// -// Restore the control register state from a signal handler -// user context, optionally clearing the exception bits -// in the restored control register, if applicable. -// -//------------------------------------------------------------------- - -void restoreControlRegs (const ucontext_t & ucon, - bool clearExceptions = false); - - -//------------------------------------------------------------ -// -// Set exception mask bits in the control register state. -// A value of 1 means the exception is masked, a value of -// 0 means the exception is enabled. -// -// setExceptionMask returns the previous mask value. If -// the 'exceptions' pointer is non-null, it returns in -// this argument the FPU exception bits. -// -//------------------------------------------------------------ - -const int INVALID_EXC = (1<<0); -const int DENORMAL_EXC = (1<<1); -const int DIVZERO_EXC = (1<<2); -const int OVERFLOW_EXC = (1<<3); -const int UNDERFLOW_EXC = (1<<4); -const int INEXACT_EXC = (1<<5); -const int ALL_EXC = INVALID_EXC | DENORMAL_EXC | DIVZERO_EXC | - OVERFLOW_EXC | UNDERFLOW_EXC | INEXACT_EXC; - -int setExceptionMask (int mask, int * exceptions = 0); -int getExceptionMask (); - - -//--------------------------------------------- -// -// Get/clear the exception bits in the FPU. -// -//--------------------------------------------- - -int getExceptions (); -void clearExceptions (); - - -//------------------------------------------------------------------ -// -// Everything below here is implementation. Do not use these -// constants or functions in your applications or libraries. -// This is not the code you're looking for. Move along. -// -// Optimization notes -- on a Pentium 4, at least, it appears -// to be faster to get the mxcsr first and then the cw; and to -// set the cw first and then the mxcsr. Also, it seems to -// be faster to clear the sw exception bits after setting -// cw and mxcsr. -// -//------------------------------------------------------------------ - -static inline uint16_t -getSw () -{ - uint16_t sw; - asm volatile ("fnstsw %0" : "=m" (sw) : ); - return sw; -} - -static inline void -setCw (uint16_t cw) -{ - asm volatile ("fldcw %0" : : "m" (cw) ); -} - -static inline uint16_t -getCw () -{ - uint16_t cw; - asm volatile ("fnstcw %0" : "=m" (cw) : ); - return cw; -} - -static inline void -setMxcsr (uint32_t mxcsr, bool clearExceptions) -{ - mxcsr &= clearExceptions ? 0xffffffc0 : 0xffffffff; - asm volatile ("ldmxcsr %0" : : "m" (mxcsr) ); -} - -static inline uint32_t -getMxcsr () -{ - uint32_t mxcsr; - asm volatile ("stmxcsr %0" : "=m" (mxcsr) : ); - return mxcsr; -} - -static inline int -calcMask (uint16_t cw, uint32_t mxcsr) -{ - // - // Hopefully, if the user has been using FpuControl functions, - // the masks are the same, but just in case they're not, we - // AND them together to report the proper subset of the masks. - // - - return (cw & ALL_EXC) & ((mxcsr >> 7) & ALL_EXC); -} - -inline int -setExceptionMask (int mask, int * exceptions) -{ - uint16_t cw = getCw (); - uint32_t mxcsr = getMxcsr (); - - if (exceptions) - *exceptions = (mxcsr & ALL_EXC) | (getSw () & ALL_EXC); - - int oldmask = calcMask (cw, mxcsr); - - // - // The exception constants are chosen very carefully so that - // we can do a simple mask and shift operation to insert - // them into the control words. The mask operation is for - // safety, in case the user accidentally set some other - // bits in the exception mask. - // - - mask &= ALL_EXC; - cw = (cw & ~ALL_EXC) | mask; - mxcsr = (mxcsr & ~(ALL_EXC << 7)) | (mask << 7); - - setCw (cw); - setMxcsr (mxcsr, false); - - return oldmask; -} - -inline int -getExceptionMask () -{ - uint32_t mxcsr = getMxcsr (); - uint16_t cw = getCw (); - return calcMask (cw, mxcsr); -} - -inline int -getExceptions () -{ - return (getMxcsr () | getSw ()) & ALL_EXC; -} - -void -clearExceptions () -{ - uint32_t mxcsr = getMxcsr () & 0xffffffc0; - asm volatile ("ldmxcsr %0\n" - "fnclex" - : : "m" (mxcsr) ); -} - -// If the fpe was taken while doing a float-to-int cast using the x87, -// the rounding mode and possibly the precision will be wrong. So instead -// of restoring to the state as of the fault, we force the rounding mode -// to be 'nearest' and the precision to be double extended. -// -// rounding mode is in bits 10-11, value 00 == round to nearest -// precision is in bits 8-9, value 11 == double extended (80-bit) -// -const uint16_t cwRestoreMask = ~((3 << 10) | (3 << 8)); -const uint16_t cwRestoreVal = (0 << 10) | (3 << 8); - - -#ifdef ILMBASE_HAVE_CONTROL_REGISTER_SUPPORT - -inline void -restoreControlRegs (const ucontext_t & ucon, bool clearExceptions) -{ - setCw ((ucon.uc_mcontext.fpregs->cwd & cwRestoreMask) | cwRestoreVal); - setMxcsr (ucon.uc_mcontext.fpregs->mxcsr, clearExceptions); -} - -#else - -// -// Ugly, the mxcsr isn't defined in GNU libc ucontext_t, but -// it's passed to the signal handler by the kernel. Use -// the kernel's version of the ucontext to get it, see -// -// - -#include - -inline void -restoreControlRegs (const ucontext_t & ucon, bool clearExceptions) -{ - setCw ((ucon.uc_mcontext.fpregs->cw & cwRestoreMask) | cwRestoreVal); - - _fpstate * kfp = reinterpret_cast<_fpstate *> (ucon.uc_mcontext.fpregs); - setMxcsr (kfp->magic == 0 ? kfp->mxcsr : 0, clearExceptions); -} - -#endif - -} // namespace FpuControl - - -namespace { - -volatile FpExceptionHandler fpeHandler = 0; - -extern "C" void -catchSigFpe (int sig, siginfo_t *info, ucontext_t *ucon) -{ - debug ("catchSigFpe (sig = "<< sig << ", ...)\n"); - - FpuControl::restoreControlRegs (*ucon, true); - - if (fpeHandler == 0) - return; - - if (info->si_code == SI_USER) - { - fpeHandler (0, "Floating-point exception, caused by " - "a signal sent from another process."); - return; - } - - if (sig == SIGFPE) - { - switch (info->si_code) - { - // - // IEEE 754 floating point exceptions: - // - - case FPE_FLTDIV: - fpeHandler (IEEE_DIVZERO, "Floating-point division by zero."); - return; - - case FPE_FLTOVF: - fpeHandler (IEEE_OVERFLOW, "Floating-point overflow."); - return; - - case FPE_FLTUND: - fpeHandler (IEEE_UNDERFLOW, "Floating-point underflow."); - return; - - case FPE_FLTRES: - fpeHandler (IEEE_INEXACT, "Inexact floating-point result."); - return; - - case FPE_FLTINV: - fpeHandler (IEEE_INVALID, "Invalid floating-point operation."); - return; - - // - // Other arithmetic exceptions which can also - // be trapped by the operating system: - // - - case FPE_INTDIV: - fpeHandler (0, "Integer division by zero."); - break; - - case FPE_INTOVF: - fpeHandler (0, "Integer overflow."); - break; - - case FPE_FLTSUB: - fpeHandler (0, "Subscript out of range."); - break; - } - } - - fpeHandler (0, "Floating-point exception."); -} - -} // namespace - -void -setFpExceptions (int when) -{ - int mask = FpuControl::ALL_EXC; - - if (when & IEEE_OVERFLOW) - mask &= ~FpuControl::OVERFLOW_EXC; - if (when & IEEE_UNDERFLOW) - mask &= ~FpuControl::UNDERFLOW_EXC; - if (when & IEEE_DIVZERO) - mask &= ~FpuControl::DIVZERO_EXC; - if (when & IEEE_INEXACT) - mask &= ~FpuControl::INEXACT_EXC; - if (when & IEEE_INVALID) - mask &= ~FpuControl::INVALID_EXC; - - // - // The Linux kernel apparently sometimes passes - // incorrect si_info to signal handlers unless - // the exception flags are cleared. - // - // XXX is this still true on 2.4+ kernels? - // - - FpuControl::setExceptionMask (mask); - FpuControl::clearExceptions (); -} - - -int -fpExceptions () -{ - int mask = FpuControl::getExceptionMask (); - - int when = 0; - - if (!(mask & FpuControl::OVERFLOW_EXC)) - when |= IEEE_OVERFLOW; - if (!(mask & FpuControl::UNDERFLOW_EXC)) - when |= IEEE_UNDERFLOW; - if (!(mask & FpuControl::DIVZERO_EXC)) - when |= IEEE_DIVZERO; - if (!(mask & FpuControl::INEXACT_EXC)) - when |= IEEE_INEXACT; - if (!(mask & FpuControl::INVALID_EXC)) - when |= IEEE_INVALID; - - return when; -} - -void -handleExceptionsSetInRegisters() -{ - if (fpeHandler == 0) - return; - - int mask = FpuControl::getExceptionMask (); - - int exc = FpuControl::getExceptions(); - - if (!(mask & FpuControl::DIVZERO_EXC) && (exc & FpuControl::DIVZERO_EXC)) - { - fpeHandler(IEEE_DIVZERO, "Floating-point division by zero."); - return; - } - - if (!(mask & FpuControl::OVERFLOW_EXC) && (exc & FpuControl::OVERFLOW_EXC)) - { - fpeHandler(IEEE_OVERFLOW, "Floating-point overflow."); - return; - } - - if (!(mask & FpuControl::UNDERFLOW_EXC) && (exc & FpuControl::UNDERFLOW_EXC)) - { - fpeHandler(IEEE_UNDERFLOW, "Floating-point underflow."); - return; - } - - if (!(mask & FpuControl::INEXACT_EXC) && (exc & FpuControl::INEXACT_EXC)) - { - fpeHandler(IEEE_INEXACT, "Inexact floating-point result."); - return; - } - - if (!(mask & FpuControl::INVALID_EXC) && (exc & FpuControl::INVALID_EXC)) - { - fpeHandler(IEEE_INVALID, "Invalid floating-point operation."); - return; - } -} - - -void -setFpExceptionHandler (FpExceptionHandler handler) -{ - if (fpeHandler == 0) - { - struct sigaction action; - sigemptyset (&action.sa_mask); - action.sa_flags = SA_SIGINFO | SA_NOMASK; - action.sa_sigaction = (void (*) (int, siginfo_t *, void *)) catchSigFpe; - action.sa_restorer = 0; - - sigaction (SIGFPE, &action, 0); - } - - fpeHandler = handler; -} - - -IEX_INTERNAL_NAMESPACE_SOURCE_EXIT - - -#else - -#include -#include - -IEX_INTERNAL_NAMESPACE_SOURCE_ENTER - - -namespace -{ - volatile FpExceptionHandler fpeHandler = 0; - void fpExc_(int x) - { - if (fpeHandler != 0) - { - fpeHandler(x, ""); - } - else - { - assert(0 != "Floating point exception"); - } - } -} - -void -setFpExceptions( int ) -{ -} - - -void -setFpExceptionHandler (FpExceptionHandler handler) -{ - // improve floating point exception handling nanoscopically above "nothing at all" - fpeHandler = handler; - signal(SIGFPE, fpExc_); -} - -int -fpExceptions() -{ - return 0; -} - -void -handleExceptionsSetInRegisters() -{ - // No implementation on this platform -} - -IEX_INTERNAL_NAMESPACE_SOURCE_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFpu.h b/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFpu.h deleted file mode 100644 index df2a3e5..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathFpu.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef INCLUDED_IEXMATHFPU_H -#define INCLUDED_IEXMATHFPU_H - -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 1997, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//------------------------------------------------------------------------ -// -// Functions to control floating point exceptions. -// -//------------------------------------------------------------------------ - -#include "IexMathIeeeExc.h" -#include "IexNamespace.h" - -IEX_INTERNAL_NAMESPACE_HEADER_ENTER - - -//----------------------------------------- -// setFpExceptions() defines which floating -// point exceptions cause SIGFPE signals. -//----------------------------------------- - -void setFpExceptions (int when = (IEEE_OVERFLOW | IEEE_DIVZERO | IEEE_INVALID)); - - -//---------------------------------------- -// fpExceptions() tells you which floating -// point exceptions cause SIGFPE signals. -//---------------------------------------- - -int fpExceptions (); - - -//------------------------------------------ -// setFpExceptionHandler() defines a handler -// that will be called when SIGFPE occurs. -//------------------------------------------ - -extern "C" typedef void (* FpExceptionHandler) (int type, const char explanation[]); - -void setFpExceptionHandler (FpExceptionHandler handler); - -// ----------------------------------------- -// handleExceptionsSetInRegisters() examines -// the exception registers and calls the -// floating point exception handler if the -// bits are set. This function exists to -// allow trapping of exception register states -// that can get set though no SIGFPE occurs. -// ----------------------------------------- - -void handleExceptionsSetInRegisters(); - - -IEX_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathIeeeExc.h b/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathIeeeExc.h deleted file mode 100644 index efadebe..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IexMath/IexMathIeeeExc.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef INCLUDED_IEXMATHIEEE_EXC_H -#define INCLUDED_IEXMATHIEEE_EXC_H - -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 1997, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//--------------------------------------------------------------------------- -// -// Names for the loating point exceptions defined by IEEE standard 754 -// -//--------------------------------------------------------------------------- - -#include "IexNamespace.h" - -IEX_INTERNAL_NAMESPACE_HEADER_ENTER - - -enum IeeeExcType -{ - IEEE_OVERFLOW = 1, - IEEE_UNDERFLOW = 2, - IEEE_DIVZERO = 4, - IEEE_INEXACT = 8, - IEEE_INVALID = 16 -}; - - -IEX_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmBaseConfig.h b/Dependencies/FreeImage/Source/OpenEXR/IlmBaseConfig.h deleted file mode 100644 index d6c0b1f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmBaseConfig.h +++ /dev/null @@ -1,61 +0,0 @@ -/** -Define and set to 1 if the target system has POSIX thread support -and you want IlmBase to use it for multithreaded file I/O. -*/ -#if defined(_MSC_VER) || defined(__MINGW32__) -#undef HAVE_PTHREAD -#else -#undef HAVE_PTHREAD -#endif - -/** -Define and set to 1 if the target system supports POSIX semaphores -and you want OpenEXR to use them; otherwise, OpenEXR will use its -own semaphore implementation. -*/ -#if defined(_MSC_VER) || defined(__MINGW32__) -#undef HAVE_POSIX_SEMAPHORES -#else -#undef HAVE_POSIX_SEMAPHORES -#endif - -/** -Define and set to 1 if the target system has support for large stack sizes. -*/ -#undef ILMBASE_HAVE_LARGE_STACK - -/** -Current (internal) library namepace name and corresponding public client namespaces. -*/ -#define ILMBASE_INTERNAL_NAMESPACE_CUSTOM 1 -#define IMATH_INTERNAL_NAMESPACE Imath_2_2 -#define IEX_INTERNAL_NAMESPACE Iex_2_2 -#define ILMTHREAD_INTERNAL_NAMESPACE IlmThread_2_2 - -#define IMATH_NAMESPACE Imath -#define IEX_NAMESPACE Iex -#define ILMTHREAD_NAMESPACE IlmThread - -/** -Required for system-specific debug trap code in IexBaseExc.cpp -*/ -#ifdef _WIN32 -#define PLATFORM_WINDOWS 1 -#endif - -// -// Version information -// -#define ILMBASE_VERSION_STRING "2.2.1" -#define ILMBASE_PACKAGE_STRING "IlmBase 2.2.1" - -#define ILMBASE_VERSION_MAJOR 2 -#define ILMBASE_VERSION_MINOR 2 -#define ILMBASE_VERSION_PATCH 1 - -// Version as a single hex number, e.g. 0x01000300 == 1.0.3 -#define ILMBASE_VERSION_HEX ((ILMBASE_VERSION_MAJOR << 24) | \ - (ILMBASE_VERSION_MINOR << 16) | \ - (ILMBASE_VERSION_PATCH << 8)) - - diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAcesFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAcesFile.cpp deleted file mode 100644 index 8f33fb0..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAcesFile.cpp +++ /dev/null @@ -1,633 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2007, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// ACES image file I/O. -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include -#include - -using namespace std; -using namespace IMATH_NAMESPACE; -using namespace IEX_NAMESPACE; -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -const Chromaticities & -acesChromaticities () -{ - static const Chromaticities acesChr - (V2f (0.73470, 0.26530), // red - V2f (0.00000, 1.00000), // green - V2f (0.00010, -0.07700), // blue - V2f (0.32168, 0.33767)); // white - - return acesChr; -} - - -class AcesOutputFile::Data -{ - public: - - Data(); - ~Data(); - - RgbaOutputFile * rgbaFile; -}; - - -AcesOutputFile::Data::Data (): - rgbaFile (0) -{ - // empty -} - - -AcesOutputFile::Data::~Data () -{ - delete rgbaFile; -} - - -namespace { - -void -checkCompression (Compression compression) -{ - // - // Not all compression methods are allowed in ACES files. - // - - switch (compression) - { - case NO_COMPRESSION: - case PIZ_COMPRESSION: - case B44A_COMPRESSION: - break; - - default: - throw ArgExc ("Invalid compression type for ACES file."); - } -} - -} // namespace - - -AcesOutputFile::AcesOutputFile - (const std::string &name, - const Header &header, - RgbaChannels rgbaChannels, - int numThreads) -: - _data (new Data) -{ - checkCompression (header.compression()); - - Header newHeader = header; - addChromaticities (newHeader, acesChromaticities()); - addAdoptedNeutral (newHeader, acesChromaticities().white); - - _data->rgbaFile = new RgbaOutputFile (name.c_str(), - newHeader, - rgbaChannels, - numThreads); - - _data->rgbaFile->setYCRounding (7, 6); -} - - -AcesOutputFile::AcesOutputFile - (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - RgbaChannels rgbaChannels, - int numThreads) -: - _data (new Data) -{ - checkCompression (header.compression()); - - Header newHeader = header; - addChromaticities (newHeader, acesChromaticities()); - addAdoptedNeutral (newHeader, acesChromaticities().white); - - _data->rgbaFile = new RgbaOutputFile (os, - header, - rgbaChannels, - numThreads); - - _data->rgbaFile->setYCRounding (7, 6); -} - - -AcesOutputFile::AcesOutputFile - (const std::string &name, - const IMATH_NAMESPACE::Box2i &displayWindow, - const IMATH_NAMESPACE::Box2i &dataWindow, - RgbaChannels rgbaChannels, - float pixelAspectRatio, - const IMATH_NAMESPACE::V2f screenWindowCenter, - float screenWindowWidth, - LineOrder lineOrder, - Compression compression, - int numThreads) -: - _data (new Data) -{ - checkCompression (compression); - - Header newHeader (displayWindow, - dataWindow.isEmpty()? displayWindow: dataWindow, - pixelAspectRatio, - screenWindowCenter, - screenWindowWidth, - lineOrder, - compression); - - addChromaticities (newHeader, acesChromaticities()); - addAdoptedNeutral (newHeader, acesChromaticities().white); - - _data->rgbaFile = new RgbaOutputFile (name.c_str(), - newHeader, - rgbaChannels, - numThreads); - - _data->rgbaFile->setYCRounding (7, 6); -} - - -AcesOutputFile::AcesOutputFile - (const std::string &name, - int width, - int height, - RgbaChannels rgbaChannels, - float pixelAspectRatio, - const IMATH_NAMESPACE::V2f screenWindowCenter, - float screenWindowWidth, - LineOrder lineOrder, - Compression compression, - int numThreads) -: - _data (new Data) -{ - checkCompression (compression); - - Header newHeader (width, - height, - pixelAspectRatio, - screenWindowCenter, - screenWindowWidth, - lineOrder, - compression); - - addChromaticities (newHeader, acesChromaticities()); - addAdoptedNeutral (newHeader, acesChromaticities().white); - - _data->rgbaFile = new RgbaOutputFile (name.c_str(), - newHeader, - rgbaChannels, - numThreads); - - _data->rgbaFile->setYCRounding (7, 6); -} - - -AcesOutputFile::~AcesOutputFile () -{ - delete _data; -} - - -void -AcesOutputFile::setFrameBuffer - (const Rgba *base, - size_t xStride, - size_t yStride) -{ - _data->rgbaFile->setFrameBuffer (base, xStride, yStride); -} - - -void -AcesOutputFile::writePixels (int numScanLines) -{ - _data->rgbaFile->writePixels (numScanLines); -} - - -int -AcesOutputFile::currentScanLine () const -{ - return _data->rgbaFile->currentScanLine(); -} - - -const Header & -AcesOutputFile::header () const -{ - return _data->rgbaFile->header(); -} - - -const IMATH_NAMESPACE::Box2i & -AcesOutputFile::displayWindow () const -{ - return _data->rgbaFile->displayWindow(); -} - - -const IMATH_NAMESPACE::Box2i & -AcesOutputFile::dataWindow () const -{ - return _data->rgbaFile->dataWindow(); -} - - -float -AcesOutputFile::pixelAspectRatio () const -{ - return _data->rgbaFile->pixelAspectRatio(); -} - - -const IMATH_NAMESPACE::V2f -AcesOutputFile::screenWindowCenter () const -{ - return _data->rgbaFile->screenWindowCenter(); -} - - -float -AcesOutputFile::screenWindowWidth () const -{ - return _data->rgbaFile->screenWindowWidth(); -} - - -LineOrder -AcesOutputFile::lineOrder () const -{ - return _data->rgbaFile->lineOrder(); -} - - -Compression -AcesOutputFile::compression () const -{ - return _data->rgbaFile->compression(); -} - - -RgbaChannels -AcesOutputFile::channels () const -{ - return _data->rgbaFile->channels(); -} - - -void -AcesOutputFile::updatePreviewImage (const PreviewRgba pixels[]) -{ - _data->rgbaFile->updatePreviewImage (pixels); -} - - -class AcesInputFile::Data -{ - public: - - Data(); - ~Data(); - - void initColorConversion (); - - RgbaInputFile * rgbaFile; - - Rgba * fbBase; - size_t fbXStride; - size_t fbYStride; - int minX; - int maxX; - - bool mustConvertColor; - M44f fileToAces; -}; - - -AcesInputFile::Data::Data (): - rgbaFile (0), - fbBase (0), - fbXStride (0), - fbYStride (0), - minX (0), - maxX (0), - mustConvertColor (false) -{ - // empty -} - - -AcesInputFile::Data::~Data () -{ - delete rgbaFile; -} - - -void -AcesInputFile::Data::initColorConversion () -{ - const Header &header = rgbaFile->header(); - - Chromaticities fileChr; - - if (hasChromaticities (header)) - fileChr = chromaticities (header); - - V2f fileNeutral = fileChr.white; - - if (hasAdoptedNeutral (header)) - fileNeutral = adoptedNeutral (header); - - const Chromaticities acesChr = acesChromaticities(); - - V2f acesNeutral = acesChr.white; - - if (fileChr.red == acesChr.red && - fileChr.green == acesChr.green && - fileChr.blue == acesChr.blue && - fileChr.white == acesChr.white && - fileNeutral == acesNeutral) - { - // - // The file already contains ACES data, - // color conversion is not necessary. - - return; - } - - mustConvertColor = true; - minX = header.dataWindow().min.x; - maxX = header.dataWindow().max.x; - - // - // Create a matrix that transforms colors from the - // RGB space of the input file into the ACES space - // using a color adaptation transform to move the - // white point. - // - - // - // We'll need the Bradford cone primary matrix and its inverse - // - - static const M44f bradfordCPM - (0.895100, -0.750200, 0.038900, 0.000000, - 0.266400, 1.713500, -0.068500, 0.000000, - -0.161400, 0.036700, 1.029600, 0.000000, - 0.000000, 0.000000, 0.000000, 1.000000); - - const static M44f inverseBradfordCPM - (0.986993, 0.432305, -0.008529, 0.000000, - -0.147054, 0.518360, 0.040043, 0.000000, - 0.159963, 0.049291, 0.968487, 0.000000, - 0.000000, 0.000000, 0.000000, 1.000000); - - // - // Convert the white points of the two RGB spaces to XYZ - // - - float fx = fileNeutral.x; - float fy = fileNeutral.y; - V3f fileNeutralXYZ (fx / fy, 1, (1 - fx - fy) / fy); - - float ax = acesNeutral.x; - float ay = acesNeutral.y; - V3f acesNeutralXYZ (ax / ay, 1, (1 - ax - ay) / ay); - - // - // Compute the Bradford transformation matrix - // - - V3f ratio ((acesNeutralXYZ * bradfordCPM) / - (fileNeutralXYZ * bradfordCPM)); - - M44f ratioMat (ratio[0], 0, 0, 0, - 0, ratio[1], 0, 0, - 0, 0, ratio[2], 0, - 0, 0, 0, 1); - - M44f bradfordTrans = bradfordCPM * - ratioMat * - inverseBradfordCPM; - - // - // Build a combined file-RGB-to-ACES-RGB conversion matrix - // - - fileToAces = RGBtoXYZ (fileChr, 1) * bradfordTrans * XYZtoRGB (acesChr, 1); -} - - -AcesInputFile::AcesInputFile (const std::string &name, int numThreads): - _data (new Data) -{ - _data->rgbaFile = new RgbaInputFile (name.c_str(), numThreads); - _data->initColorConversion(); -} - - -AcesInputFile::AcesInputFile (IStream &is, int numThreads): - _data (new Data) -{ - _data->rgbaFile = new RgbaInputFile (is, numThreads); - _data->initColorConversion(); -} - - -AcesInputFile::~AcesInputFile () -{ - delete _data; -} - - -void -AcesInputFile::setFrameBuffer (Rgba *base, size_t xStride, size_t yStride) -{ - _data->rgbaFile->setFrameBuffer (base, xStride, yStride); - _data->fbBase = base; - _data->fbXStride = xStride; - _data->fbYStride = yStride; -} - - -void -AcesInputFile::readPixels (int scanLine1, int scanLine2) -{ - // - // Copy the pixels from the RgbaInputFile into the frame buffer. - // - - _data->rgbaFile->readPixels (scanLine1, scanLine2); - - // - // If the RGB space of the input file is not the same as the ACES - // RGB space, then the pixels in the frame buffer must be transformed - // into the ACES RGB space. - // - - if (!_data->mustConvertColor) - return; - - int minY = min (scanLine1, scanLine2); - int maxY = max (scanLine1, scanLine2); - - for (int y = minY; y <= maxY; ++y) - { - Rgba *base = _data->fbBase + - _data->fbXStride * _data->minX + - _data->fbYStride * y; - - for (int x = _data->minX; x <= _data->maxX; ++x) - { - V3f aces = V3f (base->r, base->g, base->b) * _data->fileToAces; - - base->r = aces[0]; - base->g = aces[1]; - base->b = aces[2]; - - base += _data->fbXStride; - } - } -} - - -void -AcesInputFile::readPixels (int scanLine) -{ - readPixels (scanLine, scanLine); -} - - -const Header & -AcesInputFile::header () const -{ - return _data->rgbaFile->header(); -} - - -const IMATH_NAMESPACE::Box2i & -AcesInputFile::displayWindow () const -{ - return _data->rgbaFile->displayWindow(); -} - - -const IMATH_NAMESPACE::Box2i & -AcesInputFile::dataWindow () const -{ - return _data->rgbaFile->dataWindow(); -} - - -float -AcesInputFile::pixelAspectRatio () const -{ - return _data->rgbaFile->pixelAspectRatio(); -} - - -const IMATH_NAMESPACE::V2f -AcesInputFile::screenWindowCenter () const -{ - return _data->rgbaFile->screenWindowCenter(); -} - - -float -AcesInputFile::screenWindowWidth () const -{ - return _data->rgbaFile->screenWindowWidth(); -} - - -LineOrder -AcesInputFile::lineOrder () const -{ - return _data->rgbaFile->lineOrder(); -} - - -Compression -AcesInputFile::compression () const -{ - return _data->rgbaFile->compression(); -} - - -RgbaChannels -AcesInputFile::channels () const -{ - return _data->rgbaFile->channels(); -} - - -const char * -AcesInputFile::fileName () const -{ - return _data->rgbaFile->fileName(); -} - - -bool -AcesInputFile::isComplete () const -{ - return _data->rgbaFile->isComplete(); -} - - -int -AcesInputFile::version () const -{ - return _data->rgbaFile->version(); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAcesFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAcesFile.h deleted file mode 100644 index b801a86..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAcesFile.h +++ /dev/null @@ -1,324 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2007, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_ACES_FILE_H -#define INCLUDED_IMF_ACES_FILE_H - - -//----------------------------------------------------------------------------- -// -// ACES image file I/O. -// -// This header file declares two classes that directly support -// image file input and output according to the Academy Image -// Interchange Framework. -// -// The Academy Image Interchange file format is a subset of OpenEXR: -// -// - Images are stored as scanlines. Tiles are not allowed. -// -// - Images contain three color channels, either -// R, G, B (red, green, blue) or -// Y, RY, BY (luminance, sub-sampled chroma) -// -// - Images may optionally contain an alpha channel. -// -// - Only three compression types are allowed: -// - NO_COMPRESSION (file is not compressed) -// - PIZ_COMPRESSION (lossless) -// - B44A_COMPRESSION (lossy) -// -// - The "chromaticities" header attribute must specify -// the ACES RGB primaries and white point. -// -// class AcesOutputFile writes an OpenEXR file, enforcing the -// restrictions listed above. Pixel data supplied by application -// software must already be in the ACES RGB space. -// -// class AcesInputFile reads an OpenEXR file. Pixel data delivered -// to application software is guaranteed to be in the ACES RGB space. -// If the RGB space of the file is not the same as the ACES space, -// then the pixels are automatically converted: the pixels are -// converted to CIE XYZ, a color adaptation transform shifts the -// white point, and the result is converted to ACES RGB. -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfRgba.h" -#include "ImathVec.h" -#include "ImathBox.h" -#include "ImfThreading.h" -#include "ImfNamespace.h" -#include "ImfExport.h" -#include "ImfForward.h" - -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -// -// ACES red, green, blue and white-point chromaticities. -// - -const Chromaticities & acesChromaticities (); - - -// -// ACES output file. -// - -class IMF_EXPORT AcesOutputFile -{ - public: - - //--------------------------------------------------- - // Constructor -- header is constructed by the caller - //--------------------------------------------------- - - AcesOutputFile (const std::string &name, - const Header &header, - RgbaChannels rgbaChannels = WRITE_RGBA, - int numThreads = globalThreadCount()); - - - //---------------------------------------------------- - // Constructor -- header is constructed by the caller, - // file is opened by the caller, destructor will not - // automatically close the file. - //---------------------------------------------------- - - AcesOutputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - RgbaChannels rgbaChannels = WRITE_RGBA, - int numThreads = globalThreadCount()); - - - //---------------------------------------------------------------- - // Constructor -- header data are explicitly specified as function - // call arguments (empty dataWindow means "same as displayWindow") - //---------------------------------------------------------------- - - AcesOutputFile (const std::string &name, - const IMATH_NAMESPACE::Box2i &displayWindow, - const IMATH_NAMESPACE::Box2i &dataWindow = IMATH_NAMESPACE::Box2i(), - RgbaChannels rgbaChannels = WRITE_RGBA, - float pixelAspectRatio = 1, - const IMATH_NAMESPACE::V2f screenWindowCenter = IMATH_NAMESPACE::V2f (0, 0), - float screenWindowWidth = 1, - LineOrder lineOrder = INCREASING_Y, - Compression compression = PIZ_COMPRESSION, - int numThreads = globalThreadCount()); - - - //----------------------------------------------- - // Constructor -- like the previous one, but both - // the display window and the data window are - // Box2i (V2i (0, 0), V2i (width - 1, height -1)) - //----------------------------------------------- - - AcesOutputFile (const std::string &name, - int width, - int height, - RgbaChannels rgbaChannels = WRITE_RGBA, - float pixelAspectRatio = 1, - const IMATH_NAMESPACE::V2f screenWindowCenter = IMATH_NAMESPACE::V2f (0, 0), - float screenWindowWidth = 1, - LineOrder lineOrder = INCREASING_Y, - Compression compression = PIZ_COMPRESSION, - int numThreads = globalThreadCount()); - - - //----------- - // Destructor - //----------- - - virtual ~AcesOutputFile (); - - - //------------------------------------------------ - // Define a frame buffer as the pixel data source: - // Pixel (x, y) is at address - // - // base + x * xStride + y * yStride - // - //------------------------------------------------ - - void setFrameBuffer (const Rgba *base, - size_t xStride, - size_t yStride); - - - //------------------------------------------------- - // Write pixel data (see class Imf::OutputFile) - // The pixels are assumed to contain ACES RGB data. - //------------------------------------------------- - - void writePixels (int numScanLines = 1); - int currentScanLine () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - const IMATH_NAMESPACE::Box2i & displayWindow () const; - const IMATH_NAMESPACE::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const IMATH_NAMESPACE::V2f screenWindowCenter () const; - float screenWindowWidth () const; - LineOrder lineOrder () const; - Compression compression () const; - RgbaChannels channels () const; - - - // -------------------------------------------------------------------- - // Update the preview image (see Imf::OutputFile::updatePreviewImage()) - // -------------------------------------------------------------------- - - void updatePreviewImage (const PreviewRgba[]); - - - private: - - AcesOutputFile (const AcesOutputFile &); // not implemented - AcesOutputFile & operator = (const AcesOutputFile &); // not implemented - - class Data; - - Data * _data; -}; - - -// -// ACES input file -// - -class IMF_EXPORT AcesInputFile -{ - public: - - //------------------------------------------------------- - // Constructor -- opens the file with the specified name, - // destructor will automatically close the file. - //------------------------------------------------------- - - AcesInputFile (const std::string &name, - int numThreads = globalThreadCount()); - - - //----------------------------------------------------------- - // Constructor -- attaches the new AcesInputFile object to a - // file that has already been opened by the caller. - // Destroying the AcesInputFile object will not automatically - // close the file. - //----------------------------------------------------------- - - AcesInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - int numThreads = globalThreadCount()); - - - //----------- - // Destructor - //----------- - - virtual ~AcesInputFile (); - - - //----------------------------------------------------- - // Define a frame buffer as the pixel data destination: - // Pixel (x, y) is at address - // - // base + x * xStride + y * yStride - // - //----------------------------------------------------- - - void setFrameBuffer (Rgba *base, - size_t xStride, - size_t yStride); - - - //-------------------------------------------- - // Read pixel data (see class Imf::InputFile) - // Pixels returned will contain ACES RGB data. - //-------------------------------------------- - - void readPixels (int scanLine1, int scanLine2); - void readPixels (int scanLine); - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - const IMATH_NAMESPACE::Box2i & displayWindow () const; - const IMATH_NAMESPACE::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const IMATH_NAMESPACE::V2f screenWindowCenter () const; - float screenWindowWidth () const; - LineOrder lineOrder () const; - Compression compression () const; - RgbaChannels channels () const; - const char * fileName () const; - bool isComplete () const; - - - //---------------------------------- - // Access to the file format version - //---------------------------------- - - int version () const; - - private: - - AcesInputFile (const AcesInputFile &); // not implemented - AcesInputFile & operator = (const AcesInputFile &); // not implemented - - class Data; - - Data * _data; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfArray.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfArray.h deleted file mode 100644 index 6a80d8f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfArray.h +++ /dev/null @@ -1,285 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_ARRAY_H -#define INCLUDED_IMF_ARRAY_H - -#include "ImfForward.h" - -//------------------------------------------------------------------------- -// -// class Array -// class Array2D -// -// "Arrays of T" whose sizes are not known at compile time. -// When an array goes out of scope, its elements are automatically -// deleted. -// -// Usage example: -// -// struct C -// { -// C () {std::cout << "C::C (" << this << ")\n";}; -// virtual ~C () {std::cout << "C::~C (" << this << ")\n";}; -// }; -// -// int -// main () -// { -// Array a(3); -// -// C &b = a[1]; -// const C &c = a[1]; -// C *d = a + 2; -// const C *e = a; -// -// return 0; -// } -// -//------------------------------------------------------------------------- - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -template -class Array -{ - public: - - //----------------------------- - // Constructors and destructors - //----------------------------- - - Array () {_data = 0; _size = 0;} - Array (long size) {_data = new T[size]; _size = size;} - ~Array () {delete [] _data;} - - - //----------------------------- - // Access to the array elements - //----------------------------- - - operator T * () {return _data;} - operator const T * () const {return _data;} - - - //------------------------------------------------------ - // Resize and clear the array (the contents of the array - // are not preserved across the resize operation). - // - // resizeEraseUnsafe() is more memory efficient than - // resizeErase() because it deletes the old memory block - // before allocating a new one, but if allocating the - // new block throws an exception, resizeEraseUnsafe() - // leaves the array in an unusable state. - // - //------------------------------------------------------ - - void resizeErase (long size); - void resizeEraseUnsafe (long size); - - - //------------------------------- - // Return the size of this array. - //------------------------------- - - long size() const {return _size;} - - - private: - - Array (const Array &); // Copying and assignment - Array & operator = (const Array &); // are not implemented - - long _size; - T * _data; -}; - - -template -class Array2D -{ - public: - - //----------------------------- - // Constructors and destructors - //----------------------------- - - Array2D (); // empty array, 0 by 0 elements - Array2D (long sizeX, long sizeY); // sizeX by sizeY elements - ~Array2D (); - - - //----------------------------- - // Access to the array elements - //----------------------------- - - T * operator [] (long x); - const T * operator [] (long x) const; - - - //------------------------------------------------------ - // Resize and clear the array (the contents of the array - // are not preserved across the resize operation). - // - // resizeEraseUnsafe() is more memory efficient than - // resizeErase() because it deletes the old memory block - // before allocating a new one, but if allocating the - // new block throws an exception, resizeEraseUnsafe() - // leaves the array in an unusable state. - // - //------------------------------------------------------ - - void resizeErase (long sizeX, long sizeY); - void resizeEraseUnsafe (long sizeX, long sizeY); - - - //------------------------------- - // Return the size of this array. - //------------------------------- - - long height() const {return _sizeX;} - long width() const {return _sizeY;} - - - private: - - Array2D (const Array2D &); // Copying and assignment - Array2D & operator = (const Array2D &); // are not implemented - - long _sizeX; - long _sizeY; - T * _data; -}; - - -//--------------- -// Implementation -//--------------- - -template -inline void -Array::resizeErase (long size) -{ - T *tmp = new T[size]; - delete [] _data; - _size = size; - _data = tmp; -} - - -template -inline void -Array::resizeEraseUnsafe (long size) -{ - delete [] _data; - _data = 0; - _size = 0; - _data = new T[size]; - _size = size; -} - - -template -inline -Array2D::Array2D (): - _sizeX(0), _sizeY (0), _data (0) -{ - // emtpy -} - - -template -inline -Array2D::Array2D (long sizeX, long sizeY): - _sizeX (sizeX), _sizeY (sizeY), _data (new T[sizeX * sizeY]) -{ - // emtpy -} - - -template -inline -Array2D::~Array2D () -{ - delete [] _data; -} - - -template -inline T * -Array2D::operator [] (long x) -{ - return _data + x * _sizeY; -} - - -template -inline const T * -Array2D::operator [] (long x) const -{ - return _data + x * _sizeY; -} - - -template -inline void -Array2D::resizeErase (long sizeX, long sizeY) -{ - T *tmp = new T[sizeX * sizeY]; - delete [] _data; - _sizeX = sizeX; - _sizeY = sizeY; - _data = tmp; -} - - -template -inline void -Array2D::resizeEraseUnsafe (long sizeX, long sizeY) -{ - delete [] _data; - _data = 0; - _sizeX = 0; - _sizeY = 0; - _data = new T[sizeX * sizeY]; - _sizeX = sizeX; - _sizeY = sizeY; -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAttribute.cpp deleted file mode 100644 index cb4ac36..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAttribute.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class Attribute -// -//----------------------------------------------------------------------------- - -#include -#include "IlmThreadMutex.h" -#include "Iex.h" -#include -#include - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; - - -Attribute::Attribute () {} - - -Attribute::~Attribute () {} - - -namespace { - -struct NameCompare: std::binary_function -{ - bool - operator () (const char *x, const char *y) const - { - return strcmp (x, y) < 0; - } -}; - - -typedef Attribute* (*Constructor)(); -typedef std::map TypeMap; - - -class LockedTypeMap: public TypeMap -{ - public: - - Mutex mutex; -}; - - -LockedTypeMap & -typeMap () -{ - static Mutex criticalSection; - Lock lock (criticalSection); - - static LockedTypeMap* typeMap = 0; - - if (typeMap == 0) - typeMap = new LockedTypeMap (); - - return *typeMap; -} - - -} // namespace - - -bool -Attribute::knownType (const char typeName[]) -{ - LockedTypeMap& tMap = typeMap(); - Lock lock (tMap.mutex); - - return tMap.find (typeName) != tMap.end(); -} - - -void -Attribute::registerAttributeType (const char typeName[], - Attribute *(*newAttribute)()) -{ - LockedTypeMap& tMap = typeMap(); - Lock lock (tMap.mutex); - - if (tMap.find (typeName) != tMap.end()) - THROW (IEX_NAMESPACE::ArgExc, "Cannot register image file attribute " - "type \"" << typeName << "\". " - "The type has already been registered."); - - tMap.insert (TypeMap::value_type (typeName, newAttribute)); -} - - -void -Attribute::unRegisterAttributeType (const char typeName[]) -{ - LockedTypeMap& tMap = typeMap(); - Lock lock (tMap.mutex); - - tMap.erase (typeName); -} - - -Attribute * -Attribute::newAttribute (const char typeName[]) -{ - LockedTypeMap& tMap = typeMap(); - Lock lock (tMap.mutex); - - TypeMap::const_iterator i = tMap.find (typeName); - - if (i == tMap.end()) - THROW (IEX_NAMESPACE::ArgExc, "Cannot create image file attribute of " - "unknown type \"" << typeName << "\"."); - - return (i->second)(); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAttribute.h deleted file mode 100644 index 86762ad..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAttribute.h +++ /dev/null @@ -1,407 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_ATTRIBUTE_H -#define INCLUDED_IMF_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class Attribute -// -//----------------------------------------------------------------------------- - -#include "IexBaseExc.h" -#include "ImfIO.h" -#include "ImfXdr.h" -#include "ImfForward.h" -#include "ImfExport.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT Attribute -{ - public: - - //--------------------------- - // Constructor and destructor - //--------------------------- - - Attribute (); - virtual ~Attribute (); - - - //------------------------------- - // Get this attribute's type name - //------------------------------- - - virtual const char * typeName () const = 0; - - - //------------------------------ - // Make a copy of this attribute - //------------------------------ - - virtual Attribute * copy () const = 0; - - - //---------------------------------------- - // Type-specific attribute I/O and copying - //---------------------------------------- - - virtual void writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - int version) const = 0; - - virtual void readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - int size, - int version) = 0; - - virtual void copyValueFrom (const Attribute &other) = 0; - - - //------------------ - // Attribute factory - //------------------ - - static Attribute * newAttribute (const char typeName[]); - - - //----------------------------------------------------------- - // Test if a given attribute type has already been registered - //----------------------------------------------------------- - - static bool knownType (const char typeName[]); - - - protected: - - //-------------------------------------------------- - // Register an attribute type so that newAttribute() - // knows how to make objects of this type. - //-------------------------------------------------- - - static void registerAttributeType (const char typeName[], - Attribute *(*newAttribute)()); - - //------------------------------------------------------ - // Un-register an attribute type so that newAttribute() - // no longer knows how to make objects of this type (for - // debugging only). - //------------------------------------------------------ - - static void unRegisterAttributeType (const char typeName[]); -}; - - -//------------------------------------------------- -// Class template for attributes of a specific type -//------------------------------------------------- - -template -class TypedAttribute: public Attribute -{ - public: - - //---------------------------- - // Constructors and destructor - //------------_--------------- - - TypedAttribute (); - TypedAttribute (const T &value); - TypedAttribute (const TypedAttribute &other); - virtual ~TypedAttribute (); - - - //-------------------------------- - // Access to the attribute's value - //-------------------------------- - - T & value (); - const T & value () const; - - - //-------------------------------- - // Get this attribute's type name. - //-------------------------------- - - virtual const char * typeName () const; - - - //--------------------------------------------------------- - // Static version of typeName() - // This function must be specialized for each value type T. - //--------------------------------------------------------- - - static const char * staticTypeName (); - - - //--------------------- - // Make a new attribute - //--------------------- - - static Attribute * makeNewAttribute (); - - - //------------------------------ - // Make a copy of this attribute - //------------------------------ - - virtual Attribute * copy () const; - - - //----------------------------------------------------------------- - // Type-specific attribute I/O and copying. - // Depending on type T, these functions may have to be specialized. - //----------------------------------------------------------------- - - virtual void writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - int version) const; - - virtual void readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - int size, - int version); - - virtual void copyValueFrom (const Attribute &other); - - - //------------------------------------------------------------ - // Dynamic casts that throw exceptions instead of returning 0. - //------------------------------------------------------------ - - static TypedAttribute * cast (Attribute *attribute); - static const TypedAttribute * cast (const Attribute *attribute); - static TypedAttribute & cast (Attribute &attribute); - static const TypedAttribute & cast (const Attribute &attribute); - - - //--------------------------------------------------------------- - // Register this attribute type so that Attribute::newAttribute() - // knows how to make objects of this type. - // - // Note that this function is not thread-safe because it modifies - // a global variable in the IlmIlm library. A thread in a multi- - // threaded program may call registerAttributeType() only when no - // other thread is accessing any functions or classes in the - // IlmImf library. - // - //--------------------------------------------------------------- - - static void registerAttributeType (); - - - //----------------------------------------------------- - // Un-register this attribute type (for debugging only) - //----------------------------------------------------- - - static void unRegisterAttributeType (); - - - private: - - T _value; -}; - -//------------------------------------ -// Implementation of TypedAttribute -//------------------------------------ -template -TypedAttribute::TypedAttribute (): - Attribute (), - _value (T()) -{ - // empty -} - - -template -TypedAttribute::TypedAttribute (const T & value): - Attribute (), - _value (value) -{ - // empty -} - - -template -TypedAttribute::TypedAttribute (const TypedAttribute &other): - Attribute (other), - _value () -{ - copyValueFrom (other); -} - - -template -TypedAttribute::~TypedAttribute () -{ - // empty -} - - -template -inline T & -TypedAttribute::value () -{ - return _value; -} - - -template -inline const T & -TypedAttribute::value () const -{ - return _value; -} - - -template -const char * -TypedAttribute::typeName () const -{ - return staticTypeName(); -} - - -template -Attribute * -TypedAttribute::makeNewAttribute () -{ - return new TypedAttribute(); -} - - -template -Attribute * -TypedAttribute::copy () const -{ - Attribute * attribute = new TypedAttribute(); - attribute->copyValueFrom (*this); - return attribute; -} - - -template -void -TypedAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - int version) const -{ - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (os, _value); -} - - -template -void -TypedAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - int size, - int version) -{ - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, _value); -} - - -template -void -TypedAttribute::copyValueFrom (const Attribute &other) -{ - _value = cast(other)._value; -} - - -template -TypedAttribute * -TypedAttribute::cast (Attribute *attribute) -{ - TypedAttribute *t = - dynamic_cast *> (attribute); - - if (t == 0) - throw IEX_NAMESPACE::TypeExc ("Unexpected attribute type."); - - return t; -} - - -template -const TypedAttribute * -TypedAttribute::cast (const Attribute *attribute) -{ - const TypedAttribute *t = - dynamic_cast *> (attribute); - - if (t == 0) - throw IEX_NAMESPACE::TypeExc ("Unexpected attribute type."); - - return t; -} - - -template -inline TypedAttribute & -TypedAttribute::cast (Attribute &attribute) -{ - return *cast (&attribute); -} - - -template -inline const TypedAttribute & -TypedAttribute::cast (const Attribute &attribute) -{ - return *cast (&attribute); -} - - -template -inline void -TypedAttribute::registerAttributeType () -{ - Attribute::registerAttributeType (staticTypeName(), makeNewAttribute); -} - - -template -inline void -TypedAttribute::unRegisterAttributeType () -{ - Attribute::unRegisterAttributeType (staticTypeName()); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAutoArray.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAutoArray.h deleted file mode 100644 index c1ecaff..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfAutoArray.h +++ /dev/null @@ -1,95 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_AUTO_ARRAY_H -#define INCLUDED_IMF_AUTO_ARRAY_H - -//----------------------------------------------------------------------------- -// -// class AutoArray -- a workaround for systems with -// insufficient stack space for large auto arrays. -// -//----------------------------------------------------------------------------- - -#include "ImfNamespace.h" -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -#if !defined (HAVE_LARGE_STACK) - - - template - class AutoArray - { - public: - - AutoArray (): _data (new T [size]) { memset(_data, 0, size*sizeof(T)); } - ~AutoArray () {delete [] _data;} - - operator T * () {return _data;} - operator const T * () const {return _data;} - - private: - - T *_data; - }; - - -#else - - - template - class AutoArray - { - public: - - operator T * () {return _data;} - operator const T * () const {return _data;} - - private: - - T _data[size]; - }; - - -#endif - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfB44Compressor.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfB44Compressor.cpp deleted file mode 100644 index f13e143..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfB44Compressor.cpp +++ /dev/null @@ -1,1072 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class B44Compressor -// -// This compressor is lossy for HALF channels; the compression rate -// is fixed at 32/14 (approximately 2.28). FLOAT and UINT channels -// are not compressed; their data are preserved exactly. -// -// Each HALF channel is split into blocks of 4 by 4 pixels. An -// uncompressed block occupies 32 bytes, which are re-interpreted -// as sixteen 16-bit unsigned integers, t[0] ... t[15]. Compression -// shrinks the block to 14 bytes. The compressed 14-byte block -// contains -// -// - t[0] -// -// - a 6-bit shift value -// -// - 15 densely packed 6-bit values, r[0] ... r[14], which are -// computed by subtracting adjacent pixel values and right- -// shifting the differences according to the stored shift value. -// -// Differences between adjacent pixels are computed according -// to the following diagram: -// -// 0 --------> 1 --------> 2 --------> 3 -// | 3 7 11 -// | -// | 0 -// | -// v -// 4 --------> 5 --------> 6 --------> 7 -// | 4 8 12 -// | -// | 1 -// | -// v -// 8 --------> 9 --------> 10 --------> 11 -// | 5 9 13 -// | -// | 2 -// | -// v -// 12 --------> 13 --------> 14 --------> 15 -// 6 10 14 -// -// Here -// -// 5 ---------> 6 -// 8 -// -// means that r[8] is the difference between t[5] and t[6]. -// -// - optionally, a 4-by-4 pixel block where all pixels have the -// same value can be treated as a special case, where the -// compressed block contains only 3 instead of 14 bytes: -// t[0], followed by an "impossible" 6-bit shift value and -// two padding bits. -// -// This compressor can handle positive and negative pixel values. -// NaNs and infinities are replaced with zeroes before compression. -// -//----------------------------------------------------------------------------- - -#include "ImfB44Compressor.h" -#include "ImfHeader.h" -#include "ImfChannelList.h" -#include "ImfMisc.h" -#include "ImfCheckedArithmetic.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "ImfNamespace.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -using IMATH_NAMESPACE::divp; -using IMATH_NAMESPACE::modp; -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::V2i; -using std::min; - -namespace { - -// -// Lookup tables for -// y = exp (x / 8) -// and -// x = 8 * log (y) -// - -#include "b44ExpLogTable.h" - - -inline void -convertFromLinear (unsigned short s[16]) -{ - for (int i = 0; i < 16; ++i) - s[i] = expTable[s[i]]; -} - - -inline void -convertToLinear (unsigned short s[16]) -{ - for (int i = 0; i < 16; ++i) - s[i] = logTable[s[i]]; -} - - -inline int -shiftAndRound (int x, int shift) -{ - // - // Compute - // - // y = x * pow (2, -shift), - // - // then round y to the nearest integer. - // In case of a tie, where y is exactly - // halfway between two integers, round - // to the even one. - // - - x <<= 1; - int a = (1 << shift) - 1; - shift += 1; - int b = (x >> shift) & 1; - return (x + a + b) >> shift; -} - - -int -pack (const unsigned short s[16], - unsigned char b[14], - bool optFlatFields, - bool exactMax) -{ - // - // Pack a block of 4 by 4 16-bit pixels (32 bytes) into - // either 14 or 3 bytes. - // - - // - // Integers s[0] ... s[15] represent floating-point numbers - // in what is essentially a sign-magnitude format. Convert - // s[0] .. s[15] into a new set of integers, t[0] ... t[15], - // such that if t[i] is greater than t[j], the floating-point - // number that corresponds to s[i] is always greater than - // the floating-point number that corresponds to s[j]. - // - // Also, replace any bit patterns that represent NaNs or - // infinities with bit patterns that represent floating-point - // zeroes. - // - // bit pattern floating-point bit pattern - // in s[i] value in t[i] - // - // 0x7fff NAN 0x8000 - // 0x7ffe NAN 0x8000 - // ... ... - // 0x7c01 NAN 0x8000 - // 0x7c00 +infinity 0x8000 - // 0x7bff +HALF_MAX 0xfbff - // 0x7bfe 0xfbfe - // 0x7bfd 0xfbfd - // ... ... - // 0x0002 +2 * HALF_MIN 0x8002 - // 0x0001 +HALF_MIN 0x8001 - // 0x0000 +0.0 0x8000 - // 0x8000 -0.0 0x7fff - // 0x8001 -HALF_MIN 0x7ffe - // 0x8002 -2 * HALF_MIN 0x7ffd - // ... ... - // 0xfbfd 0x0f02 - // 0xfbfe 0x0401 - // 0xfbff -HALF_MAX 0x0400 - // 0xfc00 -infinity 0x8000 - // 0xfc01 NAN 0x8000 - // ... ... - // 0xfffe NAN 0x8000 - // 0xffff NAN 0x8000 - // - - unsigned short t[16]; - - for (int i = 0; i < 16; ++i) - { - if ((s[i] & 0x7c00) == 0x7c00) - t[i] = 0x8000; - else if (s[i] & 0x8000) - t[i] = ~s[i]; - else - t[i] = s[i] | 0x8000; - } - - // - // Find the maximum, tMax, of t[0] ... t[15]. - // - - unsigned short tMax = 0; - - for (int i = 0; i < 16; ++i) - if (tMax < t[i]) - tMax = t[i]; - - // - // Compute a set of running differences, r[0] ... r[14]: - // Find a shift value such that after rounding off the - // rightmost bits and shifting all differenes are between - // -32 and +31. Then bias the differences so that they - // end up between 0 and 63. - // - - int shift = -1; - int d[16]; - int r[15]; - int rMin; - int rMax; - - const int bias = 0x20; - - do - { - shift += 1; - - // - // Compute absolute differences, d[0] ... d[15], - // between tMax and t[0] ... t[15]. - // - // Shift and round the absolute differences. - // - - for (int i = 0; i < 16; ++i) - d[i] = shiftAndRound (tMax - t[i], shift); - - // - // Convert d[0] .. d[15] into running differences - // - - r[ 0] = d[ 0] - d[ 4] + bias; - r[ 1] = d[ 4] - d[ 8] + bias; - r[ 2] = d[ 8] - d[12] + bias; - - r[ 3] = d[ 0] - d[ 1] + bias; - r[ 4] = d[ 4] - d[ 5] + bias; - r[ 5] = d[ 8] - d[ 9] + bias; - r[ 6] = d[12] - d[13] + bias; - - r[ 7] = d[ 1] - d[ 2] + bias; - r[ 8] = d[ 5] - d[ 6] + bias; - r[ 9] = d[ 9] - d[10] + bias; - r[10] = d[13] - d[14] + bias; - - r[11] = d[ 2] - d[ 3] + bias; - r[12] = d[ 6] - d[ 7] + bias; - r[13] = d[10] - d[11] + bias; - r[14] = d[14] - d[15] + bias; - - rMin = r[0]; - rMax = r[0]; - - for (int i = 1; i < 15; ++i) - { - if (rMin > r[i]) - rMin = r[i]; - - if (rMax < r[i]) - rMax = r[i]; - } - } - while (rMin < 0 || rMax > 0x3f); - - if (rMin == bias && rMax == bias && optFlatFields) - { - // - // Special case - all pixels have the same value. - // We encode this in 3 instead of 14 bytes by - // storing the value 0xfc in the third output byte, - // which cannot occur in the 14-byte encoding. - // - - b[0] = (t[0] >> 8); - b[1] = (unsigned char) t[0]; - b[2] = 0xfc; - - return 3; - } - - if (exactMax) - { - // - // Adjust t[0] so that the pixel whose value is equal - // to tMax gets represented as accurately as possible. - // - - t[0] = tMax - (d[0] << shift); - } - - // - // Pack t[0], shift and r[0] ... r[14] into 14 bytes: - // - - b[ 0] = (t[0] >> 8); - b[ 1] = (unsigned char) t[0]; - - b[ 2] = (unsigned char) ((shift << 2) | (r[ 0] >> 4)); - b[ 3] = (unsigned char) ((r[ 0] << 4) | (r[ 1] >> 2)); - b[ 4] = (unsigned char) ((r[ 1] << 6) | r[ 2] ); - - b[ 5] = (unsigned char) ((r[ 3] << 2) | (r[ 4] >> 4)); - b[ 6] = (unsigned char) ((r[ 4] << 4) | (r[ 5] >> 2)); - b[ 7] = (unsigned char) ((r[ 5] << 6) | r[ 6] ); - - b[ 8] = (unsigned char) ((r[ 7] << 2) | (r[ 8] >> 4)); - b[ 9] = (unsigned char) ((r[ 8] << 4) | (r[ 9] >> 2)); - b[10] = (unsigned char) ((r[ 9] << 6) | r[10] ); - - b[11] = (unsigned char) ((r[11] << 2) | (r[12] >> 4)); - b[12] = (unsigned char) ((r[12] << 4) | (r[13] >> 2)); - b[13] = (unsigned char) ((r[13] << 6) | r[14] ); - - return 14; -} - - -inline -void -unpack14 (const unsigned char b[14], unsigned short s[16]) -{ - // - // Unpack a 14-byte block into 4 by 4 16-bit pixels. - // - - #if defined (DEBUG) - assert (b[2] != 0xfc); - #endif - - s[ 0] = (b[0] << 8) | b[1]; - - unsigned short shift = (b[ 2] >> 2); - unsigned short bias = (0x20 << shift); - - s[ 4] = s[ 0] + ((((b[ 2] << 4) | (b[ 3] >> 4)) & 0x3f) << shift) - bias; - s[ 8] = s[ 4] + ((((b[ 3] << 2) | (b[ 4] >> 6)) & 0x3f) << shift) - bias; - s[12] = s[ 8] + ((b[ 4] & 0x3f) << shift) - bias; - - s[ 1] = s[ 0] + ((b[ 5] >> 2) << shift) - bias; - s[ 5] = s[ 4] + ((((b[ 5] << 4) | (b[ 6] >> 4)) & 0x3f) << shift) - bias; - s[ 9] = s[ 8] + ((((b[ 6] << 2) | (b[ 7] >> 6)) & 0x3f) << shift) - bias; - s[13] = s[12] + ((b[ 7] & 0x3f) << shift) - bias; - - s[ 2] = s[ 1] + ((b[ 8] >> 2) << shift) - bias; - s[ 6] = s[ 5] + ((((b[ 8] << 4) | (b[ 9] >> 4)) & 0x3f) << shift) - bias; - s[10] = s[ 9] + ((((b[ 9] << 2) | (b[10] >> 6)) & 0x3f) << shift) - bias; - s[14] = s[13] + ((b[10] & 0x3f) << shift) - bias; - - s[ 3] = s[ 2] + ((b[11] >> 2) << shift) - bias; - s[ 7] = s[ 6] + ((((b[11] << 4) | (b[12] >> 4)) & 0x3f) << shift) - bias; - s[11] = s[10] + ((((b[12] << 2) | (b[13] >> 6)) & 0x3f) << shift) - bias; - s[15] = s[14] + ((b[13] & 0x3f) << shift) - bias; - - for (int i = 0; i < 16; ++i) - { - if (s[i] & 0x8000) - s[i] &= 0x7fff; - else - s[i] = ~s[i]; - } -} - - -inline -void -unpack3 (const unsigned char b[3], unsigned short s[16]) -{ - // - // Unpack a 3-byte block into 4 by 4 identical 16-bit pixels. - // - - #if defined (DEBUG) - assert (b[2] == 0xfc); - #endif - - s[0] = (b[0] << 8) | b[1]; - - if (s[0] & 0x8000) - s[0] &= 0x7fff; - else - s[0] = ~s[0]; - - for (int i = 1; i < 16; ++i) - s[i] = s[0]; -} - - -void -notEnoughData () -{ - throw IEX_NAMESPACE::InputExc ("Error decompressing data " - "(input data are shorter than expected)."); -} - - -void -tooMuchData () -{ - throw IEX_NAMESPACE::InputExc ("Error decompressing data " - "(input data are longer than expected)."); -} - -} // namespace - - -struct B44Compressor::ChannelData -{ - unsigned short * start; - unsigned short * end; - int nx; - int ny; - int ys; - PixelType type; - bool pLinear; - int size; -}; - - -B44Compressor::B44Compressor - (const Header &hdr, - size_t maxScanLineSize, - size_t numScanLines, - bool optFlatFields) -: - Compressor (hdr), - _maxScanLineSize (maxScanLineSize), - _optFlatFields (optFlatFields), - _format (XDR), - _numScanLines (numScanLines), - _tmpBuffer (0), - _outBuffer (0), - _numChans (0), - _channels (hdr.channels()), - _channelData (0) -{ - // - // Allocate buffers for compressed an uncompressed pixel data, - // allocate a set of ChannelData structs to help speed up the - // compress() and uncompress() functions, below, and determine - // if uncompressed pixel data should be in native or Xdr format. - // - - _tmpBuffer = new unsigned short - [checkArraySize (uiMult (maxScanLineSize, numScanLines), - sizeof (unsigned short))]; - - const ChannelList &channels = header().channels(); - int numHalfChans = 0; - - for (ChannelList::ConstIterator c = channels.begin(); - c != channels.end(); - ++c) - { - assert (pixelTypeSize (c.channel().type) % pixelTypeSize (HALF) == 0); - ++_numChans; - - if (c.channel().type == HALF) - ++numHalfChans; - } - - // - // Compressed data may be larger than the input data - // - - size_t padding = 12 * numHalfChans * (numScanLines + 3) / 4; - - _outBuffer = new char - [uiAdd (uiMult (maxScanLineSize, numScanLines), padding)]; - - _channelData = new ChannelData[_numChans]; - - int i = 0; - - for (ChannelList::ConstIterator c = channels.begin(); - c != channels.end(); - ++c, ++i) - { - _channelData[i].ys = c.channel().ySampling; - _channelData[i].type = c.channel().type; - _channelData[i].pLinear = c.channel().pLinear; - _channelData[i].size = - pixelTypeSize (c.channel().type) / pixelTypeSize (HALF); - } - - const Box2i &dataWindow = hdr.dataWindow(); - - _minX = dataWindow.min.x; - _maxX = dataWindow.max.x; - _maxY = dataWindow.max.y; - - // - // We can support uncompressed data in the machine's native - // format only if all image channels are of type HALF. - // - - assert (sizeof (unsigned short) == pixelTypeSize (HALF)); - - if (_numChans == numHalfChans) - _format = NATIVE; -} - - -B44Compressor::~B44Compressor () -{ - delete [] _tmpBuffer; - delete [] _outBuffer; - delete [] _channelData; -} - - -int -B44Compressor::numScanLines () const -{ - return _numScanLines; -} - - -Compressor::Format -B44Compressor::format () const -{ - return _format; -} - - -int -B44Compressor::compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) -{ - return compress (inPtr, - inSize, - Box2i (V2i (_minX, minY), - V2i (_maxX, minY + numScanLines() - 1)), - outPtr); -} - - -int -B44Compressor::compressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr) -{ - return compress (inPtr, inSize, range, outPtr); -} - - -int -B44Compressor::uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) -{ - return uncompress (inPtr, - inSize, - Box2i (V2i (_minX, minY), - V2i (_maxX, minY + numScanLines() - 1)), - outPtr); -} - - -int -B44Compressor::uncompressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr) -{ - return uncompress (inPtr, inSize, range, outPtr); -} - - -int -B44Compressor::compress (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr) -{ - // - // Compress a block of pixel data: First copy the input pixels - // from the input buffer into _tmpBuffer, rearranging them such - // that blocks of 4x4 pixels of a single channel can be accessed - // conveniently. Then compress each 4x4 block of HALF pixel data - // and append the result to the output buffer. Copy UINT and - // FLOAT data to the output buffer without compressing them. - // - - outPtr = _outBuffer; - - if (inSize == 0) - { - // - // Special case - empty input buffer. - // - - return 0; - } - - // - // For each channel, detemine how many pixels are stored - // in the input buffer, and where those pixels will be - // placed in _tmpBuffer. - // - - int minX = range.min.x; - int maxX = min (range.max.x, _maxX); - int minY = range.min.y; - int maxY = min (range.max.y, _maxY); - - unsigned short *tmpBufferEnd = _tmpBuffer; - int i = 0; - - for (ChannelList::ConstIterator c = _channels.begin(); - c != _channels.end(); - ++c, ++i) - { - ChannelData &cd = _channelData[i]; - - cd.start = tmpBufferEnd; - cd.end = cd.start; - - cd.nx = numSamples (c.channel().xSampling, minX, maxX); - cd.ny = numSamples (c.channel().ySampling, minY, maxY); - - tmpBufferEnd += cd.nx * cd.ny * cd.size; - } - - if (_format == XDR) - { - // - // The data in the input buffer are in the machine-independent - // Xdr format. Copy the HALF channels into _tmpBuffer and - // convert them back into native format for compression. - // Copy UINT and FLOAT channels verbatim into _tmpBuffer. - // - - for (int y = minY; y <= maxY; ++y) - { - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - if (modp (y, cd.ys) != 0) - continue; - - if (cd.type == HALF) - { - for (int x = cd.nx; x > 0; --x) - { - Xdr::read (inPtr, *cd.end); - ++cd.end; - } - } - else - { - int n = cd.nx * cd.size; - memcpy (cd.end, inPtr, n * sizeof (unsigned short)); - inPtr += n * sizeof (unsigned short); - cd.end += n; - } - } - } - } - else - { - // - // The input buffer contains only HALF channels, and they - // are in native, machine-dependent format. Copy the pixels - // into _tmpBuffer. - // - - for (int y = minY; y <= maxY; ++y) - { - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - #if defined (DEBUG) - assert (cd.type == HALF); - #endif - - if (modp (y, cd.ys) != 0) - continue; - - int n = cd.nx * cd.size; - memcpy (cd.end, inPtr, n * sizeof (unsigned short)); - inPtr += n * sizeof (unsigned short); - cd.end += n; - } - } - } - - // - // The pixels for each channel have been packed into a contiguous - // block in _tmpBuffer. HALF channels are in native format; UINT - // and FLOAT channels are in Xdr format. - // - - #if defined (DEBUG) - - for (int i = 1; i < _numChans; ++i) - assert (_channelData[i-1].end == _channelData[i].start); - - assert (_channelData[_numChans-1].end == tmpBufferEnd); - - #endif - - // - // For each HALF channel, split the data in _tmpBuffer into 4x4 - // pixel blocks. Compress each block and append the compressed - // data to the output buffer. - // - // UINT and FLOAT channels are copied from _tmpBuffer into the - // output buffer without further processing. - // - - char *outEnd = _outBuffer; - - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - if (cd.type != HALF) - { - // - // UINT or FLOAT channel. - // - - int n = cd.nx * cd.ny * cd.size * sizeof (unsigned short); - memcpy (outEnd, cd.start, n); - outEnd += n; - - continue; - } - - // - // HALF channel - // - - for (int y = 0; y < cd.ny; y += 4) - { - // - // Copy the next 4x4 pixel block into array s. - // If the width, cd.nx, or the height, cd.ny, of - // the pixel data in _tmpBuffer is not divisible - // by 4, then pad the data by repeating the - // rightmost column and the bottom row. - // - - unsigned short *row0 = cd.start + y * cd.nx; - unsigned short *row1 = row0 + cd.nx; - unsigned short *row2 = row1 + cd.nx; - unsigned short *row3 = row2 + cd.nx; - - if (y + 3 >= cd.ny) - { - if (y + 1 >= cd.ny) - row1 = row0; - - if (y + 2 >= cd.ny) - row2 = row1; - - row3 = row2; - } - - for (int x = 0; x < cd.nx; x += 4) - { - unsigned short s[16]; - - if (x + 3 >= cd.nx) - { - int n = cd.nx - x; - - for (int i = 0; i < 4; ++i) - { - int j = min (i, n - 1); - - s[i + 0] = row0[j]; - s[i + 4] = row1[j]; - s[i + 8] = row2[j]; - s[i + 12] = row3[j]; - } - } - else - { - memcpy (&s[ 0], row0, 4 * sizeof (unsigned short)); - memcpy (&s[ 4], row1, 4 * sizeof (unsigned short)); - memcpy (&s[ 8], row2, 4 * sizeof (unsigned short)); - memcpy (&s[12], row3, 4 * sizeof (unsigned short)); - } - - row0 += 4; - row1 += 4; - row2 += 4; - row3 += 4; - - // - // Compress the contents of array s and append the - // results to the output buffer. - // - - if (cd.pLinear) - convertFromLinear (s); - - outEnd += pack (s, (unsigned char *) outEnd, - _optFlatFields, !cd.pLinear); - } - } - } - - return outEnd - _outBuffer; -} - - -int -B44Compressor::uncompress (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr) -{ - // - // This function is the reverse of the compress() function, - // above. First all pixels are moved from the input buffer - // into _tmpBuffer. UINT and FLOAT channels are copied - // verbatim; HALF channels are uncompressed in blocks of - // 4x4 pixels. Then the pixels in _tmpBuffer are copied - // into the output buffer and rearranged such that the data - // for for each scan line form a contiguous block. - // - - outPtr = _outBuffer; - - if (inSize == 0) - { - return 0; - } - - int minX = range.min.x; - int maxX = min (range.max.x, _maxX); - int minY = range.min.y; - int maxY = min (range.max.y, _maxY); - - unsigned short *tmpBufferEnd = _tmpBuffer; - int i = 0; - - for (ChannelList::ConstIterator c = _channels.begin(); - c != _channels.end(); - ++c, ++i) - { - ChannelData &cd = _channelData[i]; - - cd.start = tmpBufferEnd; - cd.end = cd.start; - - cd.nx = numSamples (c.channel().xSampling, minX, maxX); - cd.ny = numSamples (c.channel().ySampling, minY, maxY); - - tmpBufferEnd += cd.nx * cd.ny * cd.size; - } - - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - if (cd.type != HALF) - { - // - // UINT or FLOAT channel. - // - - int n = cd.nx * cd.ny * cd.size * sizeof (unsigned short); - - if (inSize < n) - notEnoughData(); - - memcpy (cd.start, inPtr, n); - inPtr += n; - inSize -= n; - - continue; - } - - // - // HALF channel - // - - for (int y = 0; y < cd.ny; y += 4) - { - unsigned short *row0 = cd.start + y * cd.nx; - unsigned short *row1 = row0 + cd.nx; - unsigned short *row2 = row1 + cd.nx; - unsigned short *row3 = row2 + cd.nx; - - for (int x = 0; x < cd.nx; x += 4) - { - unsigned short s[16]; - - if (inSize < 3) - notEnoughData(); - - if (((const unsigned char *)inPtr)[2] == 0xfc) - { - unpack3 ((const unsigned char *)inPtr, s); - inPtr += 3; - inSize -= 3; - } - else - { - if (inSize < 14) - notEnoughData(); - - unpack14 ((const unsigned char *)inPtr, s); - inPtr += 14; - inSize -= 14; - } - - if (cd.pLinear) - convertToLinear (s); - - int n = (x + 3 < cd.nx)? - 4 * sizeof (unsigned short) : - (cd.nx - x) * sizeof (unsigned short); - - if (y + 3 < cd.ny) - { - memcpy (row0, &s[ 0], n); - memcpy (row1, &s[ 4], n); - memcpy (row2, &s[ 8], n); - memcpy (row3, &s[12], n); - } - else - { - memcpy (row0, &s[ 0], n); - - if (y + 1 < cd.ny) - memcpy (row1, &s[ 4], n); - - if (y + 2 < cd.ny) - memcpy (row2, &s[ 8], n); - } - - row0 += 4; - row1 += 4; - row2 += 4; - row3 += 4; - } - } - } - - char *outEnd = _outBuffer; - - if (_format == XDR) - { - for (int y = minY; y <= maxY; ++y) - { - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - if (modp (y, cd.ys) != 0) - continue; - - if (cd.type == HALF) - { - for (int x = cd.nx; x > 0; --x) - { - Xdr::write (outEnd, *cd.end); - ++cd.end; - } - } - else - { - int n = cd.nx * cd.size; - memcpy (outEnd, cd.end, n * sizeof (unsigned short)); - outEnd += n * sizeof (unsigned short); - cd.end += n; - } - } - } - } - else - { - for (int y = minY; y <= maxY; ++y) - { - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - #if defined (DEBUG) - assert (cd.type == HALF); - #endif - - if (modp (y, cd.ys) != 0) - continue; - - int n = cd.nx * cd.size; - memcpy (outEnd, cd.end, n * sizeof (unsigned short)); - outEnd += n * sizeof (unsigned short); - cd.end += n; - } - } - } - - #if defined (DEBUG) - - for (int i = 1; i < _numChans; ++i) - assert (_channelData[i-1].end == _channelData[i].start); - - assert (_channelData[_numChans-1].end == tmpBufferEnd); - - #endif - - if (inSize > 0) - tooMuchData(); - - outPtr = _outBuffer; - return outEnd - _outBuffer; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfB44Compressor.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfB44Compressor.h deleted file mode 100644 index 5c381c1..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfB44Compressor.h +++ /dev/null @@ -1,118 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_B44_COMPRESSOR_H -#define INCLUDED_IMF_B44_COMPRESSOR_H - -//----------------------------------------------------------------------------- -// -// class B44Compressor -- lossy compression of 4x4 pixel blocks -// -//----------------------------------------------------------------------------- - -#include "ImfCompressor.h" -#include "ImfNamespace.h" -#include "ImfExport.h" -#include "ImfForward.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT B44Compressor: public Compressor -{ - public: - - B44Compressor (const Header &hdr, - size_t maxScanLineSize, - size_t numScanLines, - bool optFlatFields); - - virtual ~B44Compressor (); - - virtual int numScanLines () const; - - virtual Format format () const; - - virtual int compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - - virtual int compressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - - virtual int uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - - virtual int uncompressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - private: - - struct ChannelData; - - int compress (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - - int uncompress (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - - int _maxScanLineSize; - bool _optFlatFields; - Format _format; - int _numScanLines; - unsigned short * _tmpBuffer; - char * _outBuffer; - int _numChans; - const ChannelList & _channels; - ChannelData * _channelData; - int _minX; - int _maxX; - int _maxY; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp deleted file mode 100644 index 6d44d0c..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class Box2iAttribute -// class Box2fAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -Box2iAttribute::staticTypeName () -{ - return "box2i"; -} - - -template <> -void -Box2iAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.min.x); - Xdr::write (os, _value.min.y); - Xdr::write (os, _value.max.x); - Xdr::write (os, _value.max.y); -} - - -template <> -void -Box2iAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value.min.x); - Xdr::read (is, _value.min.y); - Xdr::read (is, _value.max.x); - Xdr::read (is, _value.max.y); -} - - -template <> -const char * -Box2fAttribute::staticTypeName () -{ - return "box2f"; -} - - -template <> -void -Box2fAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.min.x); - Xdr::write (os, _value.min.y); - Xdr::write (os, _value.max.x); - Xdr::write (os, _value.max.y); -} - - -template <> -void -Box2fAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value.min.x); - Xdr::read (is, _value.min.y); - Xdr::read (is, _value.max.x); - Xdr::read (is, _value.max.y); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfBoxAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfBoxAttribute.h deleted file mode 100644 index 7bf2585..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfBoxAttribute.h +++ /dev/null @@ -1,87 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_BOX_ATTRIBUTE_H -#define INCLUDED_IMF_BOX_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class Box2iAttribute -// class Box2fAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfForward.h" -#include "ImfExport.h" -#include "ImfAttribute.h" -#include "ImathBox.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute Box2iAttribute; - -template <> -IMF_EXPORT -const char *Box2iAttribute::staticTypeName (); -template <> -IMF_EXPORT -void Box2iAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; -template <> -IMF_EXPORT -void Box2iAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, int); - - -typedef TypedAttribute Box2fAttribute; -template <> -IMF_EXPORT -const char *Box2fAttribute::staticTypeName (); -template <> -IMF_EXPORT -void Box2fAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; -template <> -IMF_EXPORT -void Box2fAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp deleted file mode 100644 index 48363b4..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp +++ /dev/null @@ -1,1438 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// C interface to C++ classes Imf::RgbaOutputFile and Imf::RgbaInputFile -// -//----------------------------------------------------------------------------- - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "half.h" -#include "ImfNamespace.h" -#include "ImathForward.h" - -#include - - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::Box2f; -using IMATH_NAMESPACE::V2i; -using IMATH_NAMESPACE::V2f; -using IMATH_NAMESPACE::V3i; -using IMATH_NAMESPACE::V3f; -using IMATH_NAMESPACE::M33f; -using IMATH_NAMESPACE::M44f; - - -namespace { - - -const int MAX_ERR_LENGTH = 1024; -char errorMessage[MAX_ERR_LENGTH]; - - -void -setErrorMessage (const std::exception &e) -{ - strncpy (errorMessage, e.what(), MAX_ERR_LENGTH - 1); - errorMessage[MAX_ERR_LENGTH - 1] = 0; -} - - -inline OPENEXR_IMF_INTERNAL_NAMESPACE::Header * -header (ImfHeader *hdr) -{ - return (OPENEXR_IMF_INTERNAL_NAMESPACE::Header *)(hdr); -} - - -inline const OPENEXR_IMF_INTERNAL_NAMESPACE::Header * -header (const ImfHeader *hdr) -{ - return (const OPENEXR_IMF_INTERNAL_NAMESPACE::Header *)(hdr); -} - - -inline OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaOutputFile * -outfile (ImfOutputFile *out) -{ - return (OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaOutputFile *) out; -} - - -inline const OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaOutputFile * -outfile (const ImfOutputFile *out) -{ - return (const OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaOutputFile *) out; -} - - -inline OPENEXR_IMF_INTERNAL_NAMESPACE::TiledRgbaOutputFile * -outfile (ImfTiledOutputFile *out) -{ - return (OPENEXR_IMF_INTERNAL_NAMESPACE::TiledRgbaOutputFile *) out; -} - - -inline const OPENEXR_IMF_INTERNAL_NAMESPACE::TiledRgbaOutputFile * -outfile (const ImfTiledOutputFile *out) -{ - return (const OPENEXR_IMF_INTERNAL_NAMESPACE::TiledRgbaOutputFile *) out; -} - - -inline OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaInputFile * -infile (ImfInputFile *in) -{ - return (OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaInputFile *) in; -} - - -inline const OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaInputFile * -infile (const ImfInputFile *in) -{ - return (const OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaInputFile *) in; -} - - -inline OPENEXR_IMF_INTERNAL_NAMESPACE::TiledRgbaInputFile * -infile (ImfTiledInputFile *in) -{ - return (OPENEXR_IMF_INTERNAL_NAMESPACE::TiledRgbaInputFile *) in; -} - - -inline const OPENEXR_IMF_INTERNAL_NAMESPACE::TiledRgbaInputFile * -infile (const ImfTiledInputFile *in) -{ - return (const OPENEXR_IMF_INTERNAL_NAMESPACE::TiledRgbaInputFile *) in; -} - - -} // namespace - - -void -ImfFloatToHalf (float f, ImfHalf *h) -{ - *h = half(f).bits(); -} - - -void -ImfFloatToHalfArray (int n, const float f[/*n*/], ImfHalf h[/*n*/]) -{ - for (int i = 0; i < n; ++i) - h[i] = half(f[i]).bits(); -} - - -float -ImfHalfToFloat (ImfHalf h) -{ - return float (*((half *)&h)); -} - - -void -ImfHalfToFloatArray (int n, const ImfHalf h[/*n*/], float f[/*n*/]) -{ - for (int i = 0; i < n; ++i) - f[i] = float (*((half *)(h + i))); -} - - -ImfHeader * -ImfNewHeader (void) -{ - try - { - return (ImfHeader *) new OPENEXR_IMF_INTERNAL_NAMESPACE::Header; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -void -ImfDeleteHeader (ImfHeader *hdr) -{ - delete header (hdr); -} - - -ImfHeader * -ImfCopyHeader (const ImfHeader *hdr) -{ - try - { - return (ImfHeader *) new OPENEXR_IMF_INTERNAL_NAMESPACE::Header (*header (hdr)); - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -void -ImfHeaderSetDisplayWindow (ImfHeader *hdr, - int xMin, int yMin, - int xMax, int yMax) -{ - header(hdr)->displayWindow() = Box2i (V2i (xMin, yMin), V2i (xMax, yMax)); -} - - -void -ImfHeaderDisplayWindow (const ImfHeader *hdr, - int *xMin, int *yMin, - int *xMax, int *yMax) -{ - const Box2i dw = header(hdr)->displayWindow(); - *xMin = dw.min.x; - *yMin = dw.min.y; - *xMax = dw.max.x; - *yMax = dw.max.y; -} - - -void -ImfHeaderSetDataWindow (ImfHeader *hdr, - int xMin, int yMin, - int xMax, int yMax) -{ - header(hdr)->dataWindow() = Box2i (V2i (xMin, yMin), V2i (xMax, yMax)); -} - - -void -ImfHeaderDataWindow (const ImfHeader *hdr, - int *xMin, int *yMin, - int *xMax, int *yMax) -{ - const Box2i dw = header(hdr)->dataWindow(); - *xMin = dw.min.x; - *yMin = dw.min.y; - *xMax = dw.max.x; - *yMax = dw.max.y; -} - - -void -ImfHeaderSetPixelAspectRatio (ImfHeader *hdr, float pixelAspectRatio) -{ - header(hdr)->pixelAspectRatio() = pixelAspectRatio; -} - - -float -ImfHeaderPixelAspectRatio (const ImfHeader *hdr) -{ - return header(hdr)->pixelAspectRatio(); -} - - -void -ImfHeaderSetScreenWindowCenter (ImfHeader *hdr, float x, float y) -{ - header(hdr)->screenWindowCenter() = V2f (x, y); -} - - -void -ImfHeaderScreenWindowCenter (const ImfHeader *hdr, float *x, float *y) -{ - const V2i &swc = header(hdr)->screenWindowCenter(); - *x = (float) swc.x; - *y = (float) swc.y; -} - - -void -ImfHeaderSetScreenWindowWidth (ImfHeader *hdr, float width) -{ - header(hdr)->screenWindowWidth() = width; -} - - -float -ImfHeaderScreenWindowWidth (const ImfHeader *hdr) -{ - return header(hdr)->screenWindowWidth(); -} - - -void -ImfHeaderSetLineOrder (ImfHeader *hdr, int lineOrder) -{ - header(hdr)->lineOrder() = OPENEXR_IMF_INTERNAL_NAMESPACE::LineOrder (lineOrder); -} - - -int -ImfHeaderLineOrder (const ImfHeader *hdr) -{ - return header(hdr)->lineOrder(); -} - - -void -ImfHeaderSetCompression (ImfHeader *hdr, int compression) -{ - header(hdr)->compression() = OPENEXR_IMF_INTERNAL_NAMESPACE::Compression (compression); -} - - -int -ImfHeaderCompression (const ImfHeader *hdr) -{ - return header(hdr)->compression(); -} - - -int -ImfHeaderSetIntAttribute (ImfHeader *hdr, const char name[], int value) -{ - try - { - if (header(hdr)->find(name) == header(hdr)->end()) - { - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::IntAttribute (value)); - } - else - { - header(hdr)->typedAttribute(name).value() = - value; - } - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderIntAttribute (const ImfHeader *hdr, const char name[], int *value) -{ - try - { - *value = header(hdr)->typedAttribute(name).value(); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderSetFloatAttribute (ImfHeader *hdr, const char name[], float value) -{ - try - { - if (header(hdr)->find(name) == header(hdr)->end()) - { - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::FloatAttribute (value)); - } - else - { - header(hdr)->typedAttribute(name).value() = - value; - } - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderSetDoubleAttribute (ImfHeader *hdr, const char name[], double value) -{ - try - { - if (header(hdr)->find(name) == header(hdr)->end()) - { - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::DoubleAttribute (value)); - } - else - { - header(hdr)->typedAttribute(name).value() = - value; - } - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderFloatAttribute (const ImfHeader *hdr, const char name[], float *value) -{ - try - { - *value = header(hdr)->typedAttribute(name).value(); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderDoubleAttribute (const ImfHeader *hdr, - const char name[], - double *value) -{ - try - { - *value = header(hdr)-> - typedAttribute(name).value(); - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderSetStringAttribute (ImfHeader *hdr, - const char name[], - const char value[]) -{ - try - { - if (header(hdr)->find(name) == header(hdr)->end()) - { - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::StringAttribute (value)); - } - else - { - header(hdr)->typedAttribute(name).value() = - value; - } - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderStringAttribute (const ImfHeader *hdr, - const char name[], - const char **value) -{ - try - { - *value = header(hdr)-> - typedAttribute(name).value().c_str(); - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderSetBox2iAttribute (ImfHeader *hdr, - const char name[], - int xMin, int yMin, - int xMax, int yMax) -{ - try - { - Box2i box (V2i (xMin, yMin), V2i (xMax, yMax)); - - if (header(hdr)->find(name) == header(hdr)->end()) - { - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::Box2iAttribute (box)); - } - else - { - header(hdr)->typedAttribute(name).value() = - box; - } - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderBox2iAttribute (const ImfHeader *hdr, - const char name[], - int *xMin, int *yMin, - int *xMax, int *yMax) -{ - try - { - const Box2i &box = - header(hdr)->typedAttribute(name).value(); - - *xMin = box.min.x; - *yMin = box.min.y; - *xMax = box.max.x; - *yMax = box.max.y; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderSetBox2fAttribute (ImfHeader *hdr, - const char name[], - float xMin, float yMin, - float xMax, float yMax) -{ - try - { - Box2f box (V2f (xMin, yMin), V2f (xMax, yMax)); - - if (header(hdr)->find(name) == header(hdr)->end()) - { - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::Box2fAttribute (box)); - } - else - { - header(hdr)->typedAttribute(name).value() = - box; - } - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderBox2fAttribute (const ImfHeader *hdr, - const char name[], - float *xMin, float *yMin, - float *xMax, float *yMax) -{ - try - { - const Box2f &box = - header(hdr)->typedAttribute(name).value(); - - *xMin = box.min.x; - *yMin = box.min.y; - *xMax = box.max.x; - *yMax = box.max.y; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderSetV2iAttribute (ImfHeader *hdr, - const char name[], - int x, int y) -{ - try - { - V2i v (x, y); - - if (header(hdr)->find(name) == header(hdr)->end()) - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::V2iAttribute (v)); - else - header(hdr)->typedAttribute(name).value() = v; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderV2iAttribute (const ImfHeader *hdr, - const char name[], - int *x, int *y) -{ - try - { - const V2i &v = - header(hdr)->typedAttribute(name).value(); - - *x = v.x; - *y = v.y; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderSetV2fAttribute (ImfHeader *hdr, - const char name[], - float x, float y) -{ - try - { - V2f v (x, y); - - if (header(hdr)->find(name) == header(hdr)->end()) - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::V2fAttribute (v)); - else - header(hdr)->typedAttribute(name).value() = v; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderV2fAttribute (const ImfHeader *hdr, - const char name[], - float *x, float *y) -{ - try - { - const V2f &v = - header(hdr)->typedAttribute(name).value(); - - *x = v.x; - *y = v.y; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderSetV3iAttribute (ImfHeader *hdr, - const char name[], - int x, int y, int z) -{ - try - { - V3i v (x, y, z); - - if (header(hdr)->find(name) == header(hdr)->end()) - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::V3iAttribute (v)); - else - header(hdr)->typedAttribute(name).value() = v; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderV3iAttribute (const ImfHeader *hdr, - const char name[], - int *x, int *y, int *z) -{ - try - { - const V3i &v = - header(hdr)->typedAttribute(name).value(); - - *x = v.x; - *y = v.y; - *z = v.z; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderSetV3fAttribute (ImfHeader *hdr, - const char name[], - float x, float y, float z) -{ - try - { - V3f v (x, y, z); - - if (header(hdr)->find(name) == header(hdr)->end()) - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::V3fAttribute (v)); - else - header(hdr)->typedAttribute(name).value() = v; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderV3fAttribute (const ImfHeader *hdr, - const char name[], - float *x, float *y, float *z) -{ - try - { - const V3f &v = - header(hdr)->typedAttribute(name).value(); - - *x = v.x; - *y = v.y; - *z = v.z; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderSetM33fAttribute (ImfHeader *hdr, - const char name[], - const float m[3][3]) -{ - try - { - M33f m3 (m); - - if (header(hdr)->find(name) == header(hdr)->end()) - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::M33fAttribute (m3)); - else - header(hdr)->typedAttribute(name).value() = m3; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderM33fAttribute (const ImfHeader *hdr, - const char name[], - float m[3][3]) -{ - try - { - const M33f &m3 = - header(hdr)->typedAttribute(name).value(); - - m[0][0] = m3[0][0]; - m[0][1] = m3[0][1]; - m[0][2] = m3[0][2]; - - m[1][0] = m3[1][0]; - m[1][1] = m3[1][1]; - m[1][2] = m3[1][2]; - - m[2][0] = m3[2][0]; - m[2][1] = m3[2][1]; - m[2][2] = m3[2][2]; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderSetM44fAttribute (ImfHeader *hdr, - const char name[], - const float m[4][4]) -{ - try - { - M44f m4 (m); - - if (header(hdr)->find(name) == header(hdr)->end()) - header(hdr)->insert (name, OPENEXR_IMF_INTERNAL_NAMESPACE::M44fAttribute (m4)); - else - header(hdr)->typedAttribute(name).value() = m4; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfHeaderM44fAttribute (const ImfHeader *hdr, - const char name[], - float m[4][4]) -{ - try - { - const M44f &m4 = - header(hdr)->typedAttribute(name).value(); - - m[0][0] = m4[0][0]; - m[0][1] = m4[0][1]; - m[0][2] = m4[0][2]; - m[0][3] = m4[0][3]; - - m[1][0] = m4[1][0]; - m[1][1] = m4[1][1]; - m[1][2] = m4[1][2]; - m[1][3] = m4[1][3]; - - m[2][0] = m4[2][0]; - m[2][1] = m4[2][1]; - m[2][2] = m4[2][2]; - m[2][3] = m4[2][3]; - - m[3][0] = m4[3][0]; - m[3][1] = m4[3][1]; - m[3][2] = m4[3][2]; - m[3][3] = m4[3][3]; - - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -ImfOutputFile * -ImfOpenOutputFile (const char name[], const ImfHeader *hdr, int channels) -{ - try - { - return (ImfOutputFile *) new OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaOutputFile - (name, *header(hdr), OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaChannels (channels)); - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfCloseOutputFile (ImfOutputFile *out) -{ - try - { - delete outfile (out); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfOutputSetFrameBuffer (ImfOutputFile *out, - const ImfRgba *base, - size_t xStride, - size_t yStride) -{ - try - { - outfile(out)->setFrameBuffer ((OPENEXR_IMF_INTERNAL_NAMESPACE::Rgba *)base, xStride, yStride); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfOutputWritePixels (ImfOutputFile *out, int numScanLines) -{ - try - { - outfile(out)->writePixels (numScanLines); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfOutputCurrentScanLine (const ImfOutputFile *out) -{ - return outfile(out)->currentScanLine(); -} - - -const ImfHeader * -ImfOutputHeader (const ImfOutputFile *out) -{ - return (const ImfHeader *) &outfile(out)->header(); -} - - -int -ImfOutputChannels (const ImfOutputFile *out) -{ - return outfile(out)->channels(); -} - - -ImfTiledOutputFile * -ImfOpenTiledOutputFile (const char name[], - const ImfHeader *hdr, - int channels, - int xSize, int ySize, - int mode, int rmode) -{ - try - { - return (ImfTiledOutputFile *) new OPENEXR_IMF_INTERNAL_NAMESPACE::TiledRgbaOutputFile - (name, *header(hdr), - OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaChannels (channels), - xSize, ySize, - OPENEXR_IMF_INTERNAL_NAMESPACE::LevelMode (mode), - OPENEXR_IMF_INTERNAL_NAMESPACE::LevelRoundingMode (rmode)); - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfCloseTiledOutputFile (ImfTiledOutputFile *out) -{ - try - { - delete outfile (out); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfTiledOutputSetFrameBuffer (ImfTiledOutputFile *out, - const ImfRgba *base, - size_t xStride, - size_t yStride) -{ - try - { - outfile(out)->setFrameBuffer ((OPENEXR_IMF_INTERNAL_NAMESPACE::Rgba *)base, xStride, yStride); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfTiledOutputWriteTile (ImfTiledOutputFile *out, - int dx, int dy, - int lx, int ly) -{ - try - { - outfile(out)->writeTile (dx, dy, lx, ly); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfTiledOutputWriteTiles (ImfTiledOutputFile *out, - int dxMin, int dxMax, - int dyMin, int dyMax, - int lx, int ly) -{ - try - { - outfile(out)->writeTiles (dxMin, dxMax, dyMin, dyMax, lx, ly); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -const ImfHeader * -ImfTiledOutputHeader (const ImfTiledOutputFile *out) -{ - return (const ImfHeader *) &outfile(out)->header(); -} - - -int -ImfTiledOutputChannels (const ImfTiledOutputFile *out) -{ - return outfile(out)->channels(); -} - - -int -ImfTiledOutputTileXSize (const ImfTiledOutputFile *out) -{ - return outfile(out)->tileXSize(); -} - - -int -ImfTiledOutputTileYSize (const ImfTiledOutputFile *out) -{ - return outfile(out)->tileYSize(); -} - - -int -ImfTiledOutputLevelMode (const ImfTiledOutputFile *out) -{ - return outfile(out)->levelMode(); -} - - -int -ImfTiledOutputLevelRoundingMode (const ImfTiledOutputFile *out) -{ - return outfile(out)->levelRoundingMode(); -} - - -ImfInputFile * -ImfOpenInputFile (const char name[]) -{ - try - { - return (ImfInputFile *) new OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaInputFile (name); - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfCloseInputFile (ImfInputFile *in) -{ - try - { - delete infile (in); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfInputSetFrameBuffer (ImfInputFile *in, - ImfRgba *base, - size_t xStride, - size_t yStride) -{ - try - { - infile(in)->setFrameBuffer ((OPENEXR_IMF_INTERNAL_NAMESPACE::Rgba *) base, xStride, yStride); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfInputReadPixels (ImfInputFile *in, int scanLine1, int scanLine2) -{ - try - { - infile(in)->readPixels (scanLine1, scanLine2); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -const ImfHeader * -ImfInputHeader (const ImfInputFile *in) -{ - return (const ImfHeader *) &infile(in)->header(); -} - - -int -ImfInputChannels (const ImfInputFile *in) -{ - return infile(in)->channels(); -} - - -const char * -ImfInputFileName (const ImfInputFile *in) -{ - return infile(in)->fileName(); -} - - -ImfTiledInputFile * -ImfOpenTiledInputFile (const char name[]) -{ - try - { - return (ImfTiledInputFile *) new OPENEXR_IMF_INTERNAL_NAMESPACE::TiledRgbaInputFile (name); - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfCloseTiledInputFile (ImfTiledInputFile *in) -{ - try - { - delete infile (in); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfTiledInputSetFrameBuffer (ImfTiledInputFile *in, - ImfRgba *base, - size_t xStride, - size_t yStride) -{ - try - { - infile(in)->setFrameBuffer ((OPENEXR_IMF_INTERNAL_NAMESPACE::Rgba *) base, xStride, yStride); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfTiledInputReadTile (ImfTiledInputFile *in, - int dx, int dy, - int lx, int ly) -{ - try - { - infile(in)->readTile (dx, dy, lx, ly); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -int -ImfTiledInputReadTiles (ImfTiledInputFile *in, - int dxMin, int dxMax, - int dyMin, int dyMax, - int lx, int ly) -{ - try - { - infile(in)->readTiles (dxMin, dxMax, dyMin, dyMax, lx, ly); - return 1; - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -const ImfHeader * -ImfTiledInputHeader (const ImfTiledInputFile *in) -{ - return (const ImfHeader *) &infile(in)->header(); -} - - -int -ImfTiledInputChannels (const ImfTiledInputFile *in) -{ - return infile(in)->channels(); -} - - -const char * -ImfTiledInputFileName (const ImfTiledInputFile *in) -{ - return infile(in)->fileName(); -} - - -int -ImfTiledInputTileXSize (const ImfTiledInputFile *in) -{ - return infile(in)->tileXSize(); -} - - -int -ImfTiledInputTileYSize (const ImfTiledInputFile *in) -{ - return infile(in)->tileYSize(); -} - - -int -ImfTiledInputLevelMode (const ImfTiledInputFile *in) -{ - return infile(in)->levelMode(); -} - - -int -ImfTiledInputLevelRoundingMode (const ImfTiledInputFile *in) -{ - return infile(in)->levelRoundingMode(); -} - - -ImfLut * -ImfNewRound12logLut (int channels) -{ - try - { - return (ImfLut *) new OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaLut - (OPENEXR_IMF_INTERNAL_NAMESPACE::round12log, OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaChannels (channels)); - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -ImfLut * -ImfNewRoundNBitLut (unsigned int n, int channels) -{ - try - { - return (ImfLut *) new OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaLut - (OPENEXR_IMF_INTERNAL_NAMESPACE::roundNBit (n), OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaChannels (channels)); - } - catch (const std::exception &e) - { - setErrorMessage (e); - return 0; - } -} - - -void -ImfDeleteLut (ImfLut *lut) -{ - delete (OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaLut *) lut; -} - - -void -ImfApplyLut (ImfLut *lut, ImfRgba *data, int nData, int stride) -{ - ((OPENEXR_IMF_INTERNAL_NAMESPACE::RgbaLut *)lut)->apply ((OPENEXR_IMF_INTERNAL_NAMESPACE::Rgba *)data, nData, stride); -} - - -const char * -ImfErrorMessage () -{ - return errorMessage; -} diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCRgbaFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCRgbaFile.h deleted file mode 100644 index 5ac2bf8..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCRgbaFile.h +++ /dev/null @@ -1,555 +0,0 @@ -/* - -Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -Digital Ltd. LLC - -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 Industrial Light & Magic nor the names of -its contributors may be used to endorse or promote products derived -from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -#ifndef INCLUDED_IMF_C_RGBA_FILE_H -#define INCLUDED_IMF_C_RGBA_FILE_H - -#include "ImfExport.h" - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Interpreting unsigned shorts as 16-bit floating point numbers -*/ - -typedef unsigned short ImfHalf; - -IMF_EXPORT -void ImfFloatToHalf (float f, - ImfHalf *h); - -IMF_EXPORT -void ImfFloatToHalfArray (int n, - const float f[/*n*/], - ImfHalf h[/*n*/]); - -IMF_EXPORT -float ImfHalfToFloat (ImfHalf h); - -IMF_EXPORT -void ImfHalfToFloatArray (int n, - const ImfHalf h[/*n*/], - float f[/*n*/]); - -/* -** RGBA pixel; memory layout must be the same as struct Imf::Rgba. -*/ - -struct ImfRgba -{ - ImfHalf r; - ImfHalf g; - ImfHalf b; - ImfHalf a; -}; - -typedef struct ImfRgba ImfRgba; - -/* -** Magic number; this must be the same as Imf::MAGIC -*/ - -#define IMF_MAGIC 20000630 - -/* -** Version number; this must be the same as Imf::EXR_VERSION -*/ - -#define IMF_VERSION_NUMBER 2 - -/* -** Line order; values must the the same as in Imf::LineOrder. -*/ - -#define IMF_INCREASING_Y 0 -#define IMF_DECREASING_Y 1 -#define IMF_RAMDOM_Y 2 - - -/* -** Compression types; values must be the same as in Imf::Compression. -*/ - -#define IMF_NO_COMPRESSION 0 -#define IMF_RLE_COMPRESSION 1 -#define IMF_ZIPS_COMPRESSION 2 -#define IMF_ZIP_COMPRESSION 3 -#define IMF_PIZ_COMPRESSION 4 -#define IMF_PXR24_COMPRESSION 5 -#define IMF_B44_COMPRESSION 6 -#define IMF_B44A_COMPRESSION 7 - - -/* -** Channels; values must be the same as in Imf::RgbaChannels. -*/ - -#define IMF_WRITE_R 0x01 -#define IMF_WRITE_G 0x02 -#define IMF_WRITE_B 0x04 -#define IMF_WRITE_A 0x08 -#define IMF_WRITE_Y 0x10 -#define IMF_WRITE_C 0x20 -#define IMF_WRITE_RGB 0x07 -#define IMF_WRITE_RGBA 0x0f -#define IMF_WRITE_YC 0x30 -#define IMF_WRITE_YA 0x18 -#define IMF_WRITE_YCA 0x38 - - -/* -** Level modes; values must be the same as in Imf::LevelMode -*/ - -#define IMF_ONE_LEVEL 0 -#define IMF_MIPMAP_LEVELS 1 -#define IMF_RIPMAP_LEVELS 2 - - -/* -** Level rounding modes; values must be the same as in Imf::LevelRoundingMode -*/ - -#define IMF_ROUND_DOWN 0 -#define IMF_ROUND_UP 1 - - -/* -** RGBA file header -*/ - -struct ImfHeader; -typedef struct ImfHeader ImfHeader; - -IMF_EXPORT -ImfHeader * ImfNewHeader (void); - -IMF_EXPORT -void ImfDeleteHeader (ImfHeader *hdr); - -IMF_EXPORT -ImfHeader * ImfCopyHeader (const ImfHeader *hdr); - -IMF_EXPORT -void ImfHeaderSetDisplayWindow (ImfHeader *hdr, - int xMin, int yMin, - int xMax, int yMax); - -IMF_EXPORT -void ImfHeaderDisplayWindow (const ImfHeader *hdr, - int *xMin, int *yMin, - int *xMax, int *yMax); - -IMF_EXPORT -void ImfHeaderSetDataWindow (ImfHeader *hdr, - int xMin, int yMin, - int xMax, int yMax); - -IMF_EXPORT -void ImfHeaderDataWindow (const ImfHeader *hdr, - int *xMin, int *yMin, - int *xMax, int *yMax); - -IMF_EXPORT -void ImfHeaderSetPixelAspectRatio (ImfHeader *hdr, - float pixelAspectRatio); - -IMF_EXPORT -float ImfHeaderPixelAspectRatio (const ImfHeader *hdr); - -IMF_EXPORT -void ImfHeaderSetScreenWindowCenter (ImfHeader *hdr, - float x, float y); - -IMF_EXPORT -void ImfHeaderScreenWindowCenter (const ImfHeader *hdr, - float *x, float *y); - -IMF_EXPORT -void ImfHeaderSetScreenWindowWidth (ImfHeader *hdr, - float width); - -IMF_EXPORT -float ImfHeaderScreenWindowWidth (const ImfHeader *hdr); - -IMF_EXPORT -void ImfHeaderSetLineOrder (ImfHeader *hdr, - int lineOrder); - -IMF_EXPORT -int ImfHeaderLineOrder (const ImfHeader *hdr); - -IMF_EXPORT -void ImfHeaderSetCompression (ImfHeader *hdr, - int compression); - -IMF_EXPORT -int ImfHeaderCompression (const ImfHeader *hdr); - -IMF_EXPORT -int ImfHeaderSetIntAttribute (ImfHeader *hdr, - const char name[], - int value); - -IMF_EXPORT -int ImfHeaderIntAttribute (const ImfHeader *hdr, - const char name[], - int *value); - -IMF_EXPORT -int ImfHeaderSetFloatAttribute (ImfHeader *hdr, - const char name[], - float value); - -IMF_EXPORT -int ImfHeaderSetDoubleAttribute (ImfHeader *hdr, - const char name[], - double value); - -IMF_EXPORT -int ImfHeaderFloatAttribute (const ImfHeader *hdr, - const char name[], - float *value); - -IMF_EXPORT -int ImfHeaderDoubleAttribute (const ImfHeader *hdr, - const char name[], - double *value); - -IMF_EXPORT -int ImfHeaderSetStringAttribute (ImfHeader *hdr, - const char name[], - const char value[]); - -IMF_EXPORT -int ImfHeaderStringAttribute (const ImfHeader *hdr, - const char name[], - const char **value); - -IMF_EXPORT -int ImfHeaderSetBox2iAttribute (ImfHeader *hdr, - const char name[], - int xMin, int yMin, - int xMax, int yMax); - -IMF_EXPORT -int ImfHeaderBox2iAttribute (const ImfHeader *hdr, - const char name[], - int *xMin, int *yMin, - int *xMax, int *yMax); - -IMF_EXPORT -int ImfHeaderSetBox2fAttribute (ImfHeader *hdr, - const char name[], - float xMin, float yMin, - float xMax, float yMax); - -IMF_EXPORT -int ImfHeaderBox2fAttribute (const ImfHeader *hdr, - const char name[], - float *xMin, float *yMin, - float *xMax, float *yMax); - -IMF_EXPORT -int ImfHeaderSetV2iAttribute (ImfHeader *hdr, - const char name[], - int x, int y); - -IMF_EXPORT -int ImfHeaderV2iAttribute (const ImfHeader *hdr, - const char name[], - int *x, int *y); - -IMF_EXPORT -int ImfHeaderSetV2fAttribute (ImfHeader *hdr, - const char name[], - float x, float y); - -IMF_EXPORT -int ImfHeaderV2fAttribute (const ImfHeader *hdr, - const char name[], - float *x, float *y); - -IMF_EXPORT -int ImfHeaderSetV3iAttribute (ImfHeader *hdr, - const char name[], - int x, int y, int z); - -IMF_EXPORT -int ImfHeaderV3iAttribute (const ImfHeader *hdr, - const char name[], - int *x, int *y, int *z); - -IMF_EXPORT -int ImfHeaderSetV3fAttribute (ImfHeader *hdr, - const char name[], - float x, float y, float z); - -IMF_EXPORT -int ImfHeaderV3fAttribute (const ImfHeader *hdr, - const char name[], - float *x, float *y, float *z); - -IMF_EXPORT -int ImfHeaderSetM33fAttribute (ImfHeader *hdr, - const char name[], - const float m[3][3]); - -IMF_EXPORT -int ImfHeaderM33fAttribute (const ImfHeader *hdr, - const char name[], - float m[3][3]); - -IMF_EXPORT -int ImfHeaderSetM44fAttribute (ImfHeader *hdr, - const char name[], - const float m[4][4]); - -IMF_EXPORT -int ImfHeaderM44fAttribute (const ImfHeader *hdr, - const char name[], - float m[4][4]); - -/* -** RGBA output file -*/ - -struct ImfOutputFile; -typedef struct ImfOutputFile ImfOutputFile; - -IMF_EXPORT -ImfOutputFile * ImfOpenOutputFile (const char name[], - const ImfHeader *hdr, - int channels); - -IMF_EXPORT -int ImfCloseOutputFile (ImfOutputFile *out); - -IMF_EXPORT -int ImfOutputSetFrameBuffer (ImfOutputFile *out, - const ImfRgba *base, - size_t xStride, - size_t yStride); - -IMF_EXPORT -int ImfOutputWritePixels (ImfOutputFile *out, - int numScanLines); - -IMF_EXPORT -int ImfOutputCurrentScanLine (const ImfOutputFile *out); - -IMF_EXPORT -const ImfHeader * ImfOutputHeader (const ImfOutputFile *out); - -IMF_EXPORT -int ImfOutputChannels (const ImfOutputFile *out); - - -/* -** Tiled RGBA output file -*/ - -struct ImfTiledOutputFile; -typedef struct ImfTiledOutputFile ImfTiledOutputFile; - -IMF_EXPORT -ImfTiledOutputFile * ImfOpenTiledOutputFile (const char name[], - const ImfHeader *hdr, - int channels, - int xSize, int ySize, - int mode, int rmode); - -IMF_EXPORT -int ImfCloseTiledOutputFile (ImfTiledOutputFile *out); - -IMF_EXPORT -int ImfTiledOutputSetFrameBuffer (ImfTiledOutputFile *out, - const ImfRgba *base, - size_t xStride, - size_t yStride); - -IMF_EXPORT -int ImfTiledOutputWriteTile (ImfTiledOutputFile *out, - int dx, int dy, - int lx, int ly); - -IMF_EXPORT -int ImfTiledOutputWriteTiles (ImfTiledOutputFile *out, - int dxMin, int dxMax, - int dyMin, int dyMax, - int lx, int ly); - -IMF_EXPORT -const ImfHeader * ImfTiledOutputHeader (const ImfTiledOutputFile *out); - -IMF_EXPORT -int ImfTiledOutputChannels (const ImfTiledOutputFile *out); - -IMF_EXPORT -int ImfTiledOutputTileXSize (const ImfTiledOutputFile *out); - -IMF_EXPORT -int ImfTiledOutputTileYSize (const ImfTiledOutputFile *out); - -IMF_EXPORT -int ImfTiledOutputLevelMode (const ImfTiledOutputFile *out); - -IMF_EXPORT -int ImfTiledOutputLevelRoundingMode - (const ImfTiledOutputFile *out); - - -/* -** RGBA input file -*/ - -struct ImfInputFile; -typedef struct ImfInputFile ImfInputFile; - -ImfInputFile * ImfOpenInputFile (const char name[]); - -IMF_EXPORT -int ImfCloseInputFile (ImfInputFile *in); - -IMF_EXPORT -int ImfInputSetFrameBuffer (ImfInputFile *in, - ImfRgba *base, - size_t xStride, - size_t yStride); - -IMF_EXPORT -int ImfInputReadPixels (ImfInputFile *in, - int scanLine1, - int scanLine2); - -IMF_EXPORT -const ImfHeader * ImfInputHeader (const ImfInputFile *in); - -IMF_EXPORT -int ImfInputChannels (const ImfInputFile *in); - -IMF_EXPORT -const char * ImfInputFileName (const ImfInputFile *in); - - -/* -** Tiled RGBA input file -*/ - -struct ImfTiledInputFile; -typedef struct ImfTiledInputFile ImfTiledInputFile; - -IMF_EXPORT -ImfTiledInputFile * ImfOpenTiledInputFile (const char name[]); - -IMF_EXPORT -int ImfCloseTiledInputFile (ImfTiledInputFile *in); - -IMF_EXPORT -int ImfTiledInputSetFrameBuffer (ImfTiledInputFile *in, - ImfRgba *base, - size_t xStride, - size_t yStride); - -IMF_EXPORT -int ImfTiledInputReadTile (ImfTiledInputFile *in, - int dx, int dy, - int lx, int ly); - -IMF_EXPORT -int ImfTiledInputReadTiles (ImfTiledInputFile *in, - int dxMin, int dxMax, - int dyMin, int dyMax, - int lx, int ly); - -IMF_EXPORT -const ImfHeader * ImfTiledInputHeader (const ImfTiledInputFile *in); - -IMF_EXPORT -int ImfTiledInputChannels (const ImfTiledInputFile *in); - -IMF_EXPORT -const char * ImfTiledInputFileName (const ImfTiledInputFile *in); - -IMF_EXPORT -int ImfTiledInputTileXSize (const ImfTiledInputFile *in); - -IMF_EXPORT -int ImfTiledInputTileYSize (const ImfTiledInputFile *in); - -IMF_EXPORT -int ImfTiledInputLevelMode (const ImfTiledInputFile *in); - -IMF_EXPORT -int ImfTiledInputLevelRoundingMode - (const ImfTiledInputFile *in); - -/* -** Lookup tables -*/ - -struct ImfLut; -typedef struct ImfLut ImfLut; - -IMF_EXPORT -ImfLut * ImfNewRound12logLut (int channels); - -IMF_EXPORT -ImfLut * ImfNewRoundNBitLut (unsigned int n, int channels); - -IMF_EXPORT -void ImfDeleteLut (ImfLut *lut); - -IMF_EXPORT -void ImfApplyLut (ImfLut *lut, - ImfRgba *data, - int nData, - int stride); -/* -** Most recent error message -*/ - -IMF_EXPORT -const char * ImfErrorMessage (void); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelList.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelList.cpp deleted file mode 100644 index ae2ccaa..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelList.cpp +++ /dev/null @@ -1,322 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class Channel -// class ChannelList -// -//----------------------------------------------------------------------------- - -#include -#include - - -using std::string; -using std::set; -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -Channel::Channel (PixelType t, int xs, int ys, bool pl): - type (t), - xSampling (xs), - ySampling (ys), - pLinear (pl) -{ - // empty -} - - -bool -Channel::operator == (const Channel &other) const -{ - return type == other.type && - xSampling == other.xSampling && - ySampling == other.ySampling && - pLinear == other.pLinear; -} - - -void -ChannelList::insert (const char name[], const Channel &channel) -{ - if (name[0] == 0) - THROW (IEX_NAMESPACE::ArgExc, "Image channel name cannot be an empty string."); - - _map[name] = channel; -} - - -void -ChannelList::insert (const string &name, const Channel &channel) -{ - insert (name.c_str(), channel); -} - - -Channel & -ChannelList::operator [] (const char name[]) -{ - ChannelMap::iterator i = _map.find (name); - - if (i == _map.end()) - THROW (IEX_NAMESPACE::ArgExc, "Cannot find image channel \"" << name << "\"."); - - return i->second; -} - - -const Channel & -ChannelList::operator [] (const char name[]) const -{ - ChannelMap::const_iterator i = _map.find (name); - - if (i == _map.end()) - THROW (IEX_NAMESPACE::ArgExc, "Cannot find image channel \"" << name << "\"."); - - return i->second; -} - - -Channel & -ChannelList::operator [] (const string &name) -{ - return this->operator[] (name.c_str()); -} - - -const Channel & -ChannelList::operator [] (const string &name) const -{ - return this->operator[] (name.c_str()); -} - - -Channel * -ChannelList::findChannel (const char name[]) -{ - ChannelMap::iterator i = _map.find (name); - return (i == _map.end())? 0: &i->second; -} - - -const Channel * -ChannelList::findChannel (const char name[]) const -{ - ChannelMap::const_iterator i = _map.find (name); - return (i == _map.end())? 0: &i->second; -} - - -Channel * -ChannelList::findChannel (const string &name) -{ - return findChannel (name.c_str()); -} - - -const Channel * -ChannelList::findChannel (const string &name) const -{ - return findChannel (name.c_str()); -} - - -ChannelList::Iterator -ChannelList::begin () -{ - return _map.begin(); -} - - -ChannelList::ConstIterator -ChannelList::begin () const -{ - return _map.begin(); -} - - -ChannelList::Iterator -ChannelList::end () -{ - return _map.end(); -} - - -ChannelList::ConstIterator -ChannelList::end () const -{ - return _map.end(); -} - - -ChannelList::Iterator -ChannelList::find (const char name[]) -{ - return _map.find (name); -} - - -ChannelList::ConstIterator -ChannelList::find (const char name[]) const -{ - return _map.find (name); -} - - -ChannelList::Iterator -ChannelList::find (const string &name) -{ - return find (name.c_str()); -} - - -ChannelList::ConstIterator -ChannelList::find (const string &name) const -{ - return find (name.c_str()); -} - - -void -ChannelList::layers (set &layerNames) const -{ - layerNames.clear(); - - for (ConstIterator i = begin(); i != end(); ++i) - { - string layerName = i.name(); - size_t pos = layerName.rfind ('.'); - - if (pos != string::npos && pos != 0 && pos + 1 < layerName.size()) - { - layerName.erase (pos); - layerNames.insert (layerName); - } - } -} - - -void -ChannelList::channelsInLayer (const string &layerName, - Iterator &first, - Iterator &last) -{ - channelsWithPrefix (layerName + '.', first, last); -} - - -void -ChannelList::channelsInLayer (const string &layerName, - ConstIterator &first, - ConstIterator &last) const -{ - channelsWithPrefix (layerName + '.', first, last); -} - - -void -ChannelList::channelsWithPrefix (const char prefix[], - Iterator &first, - Iterator &last) -{ - first = last = _map.lower_bound (prefix); - size_t n = int(strlen (prefix)); - - while (last != Iterator (_map.end()) && - strncmp (last.name(), prefix, n) <= 0) - { - ++last; - } -} - - -void -ChannelList::channelsWithPrefix (const char prefix[], - ConstIterator &first, - ConstIterator &last) const -{ - first = last = _map.lower_bound (prefix); - size_t n = strlen (prefix); - - while (last != ConstIterator (_map.end()) && - strncmp (last.name(), prefix, n) <= 0) - { - ++last; - } -} - - -void -ChannelList::channelsWithPrefix (const string &prefix, - Iterator &first, - Iterator &last) -{ - return channelsWithPrefix (prefix.c_str(), first, last); -} - - -void -ChannelList::channelsWithPrefix (const string &prefix, - ConstIterator &first, - ConstIterator &last) const -{ - return channelsWithPrefix (prefix.c_str(), first, last); -} - - -bool -ChannelList::operator == (const ChannelList &other) const -{ - ConstIterator i = begin(); - ConstIterator j = other.begin(); - - while (i != end() && j != other.end()) - { - if (!(i.channel() == j.channel())) - return false; - - ++i; - ++j; - } - - return i == end() && j == other.end(); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelList.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelList.h deleted file mode 100644 index fc31a15..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelList.h +++ /dev/null @@ -1,436 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_CHANNEL_LIST_H -#define INCLUDED_IMF_CHANNEL_LIST_H - -//----------------------------------------------------------------------------- -// -// class Channel -// class ChannelList -// -//----------------------------------------------------------------------------- - -#include "ImfName.h" -#include "ImfPixelType.h" - -#include "ImfNamespace.h" -#include "ImfExport.h" - -#include -#include -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -struct IMF_EXPORT Channel -{ - //------------------------------ - // Data type; see ImfPixelType.h - //------------------------------ - - PixelType type; - - - //-------------------------------------------- - // Subsampling: pixel (x, y) is present in the - // channel only if - // - // x % xSampling == 0 && y % ySampling == 0 - // - //-------------------------------------------- - - int xSampling; - int ySampling; - - - //-------------------------------------------------------------- - // Hint to lossy compression methods that indicates whether - // human perception of the quantity represented by this channel - // is closer to linear or closer to logarithmic. Compression - // methods may optimize image quality by adjusting pixel data - // quantization acording to this hint. - // For example, perception of red, green, blue and luminance is - // approximately logarithmic; the difference between 0.1 and 0.2 - // is perceived to be roughly the same as the difference between - // 1.0 and 2.0. Perception of chroma coordinates tends to be - // closer to linear than logarithmic; the difference between 0.1 - // and 0.2 is perceived to be roughly the same as the difference - // between 1.0 and 1.1. - //-------------------------------------------------------------- - - bool pLinear; - - - //------------ - // Constructor - //------------ - - Channel (PixelType type = HALF, - int xSampling = 1, - int ySampling = 1, - bool pLinear = false); - - - //------------ - // Operator == - //------------ - - bool operator == (const Channel &other) const; -}; - - -class IMF_EXPORT ChannelList -{ - public: - - //-------------- - // Add a channel - //-------------- - - void insert (const char name[], - const Channel &channel); - - void insert (const std::string &name, - const Channel &channel); - - //------------------------------------------------------------------ - // Access to existing channels: - // - // [n] Returns a reference to the channel with name n. - // If no channel with name n exists, an IEX_NAMESPACE::ArgExc - // is thrown. - // - // findChannel(n) Returns a pointer to the channel with name n, - // or 0 if no channel with name n exists. - // - //------------------------------------------------------------------ - - Channel & operator [] (const char name[]); - const Channel & operator [] (const char name[]) const; - - Channel & operator [] (const std::string &name); - const Channel & operator [] (const std::string &name) const; - - Channel * findChannel (const char name[]); - const Channel * findChannel (const char name[]) const; - - Channel * findChannel (const std::string &name); - const Channel * findChannel (const std::string &name) const; - - - //------------------------------------------- - // Iterator-style access to existing channels - //------------------------------------------- - - typedef std::map ChannelMap; - - class Iterator; - class ConstIterator; - - Iterator begin (); - ConstIterator begin () const; - - Iterator end (); - ConstIterator end () const; - - Iterator find (const char name[]); - ConstIterator find (const char name[]) const; - - Iterator find (const std::string &name); - ConstIterator find (const std::string &name) const; - - - //----------------------------------------------------------------- - // Support for image layers: - // - // In an image file with many channels it is sometimes useful to - // group the channels into "layers", that is, into sets of channels - // that logically belong together. Grouping channels into layers - // is done using a naming convention: channel C in layer L is - // called "L.C". - // - // For example, a computer graphic image may contain separate - // R, G and B channels for light that originated at each of - // several different virtual light sources. The channels in - // this image might be called "light1.R", "light1.G", "light1.B", - // "light2.R", "light2.G", "light2.B", etc. - // - // Note that this naming convention allows layers to be nested; - // for example, "light1.specular.R" identifies the "R" channel - // in the "specular" sub-layer of layer "light1". - // - // Channel names that don't contain a "." or that contain a - // "." only at the beginning or at the end are not considered - // to be part of any layer. - // - // layers(lns) sorts the channels in this ChannelList - // into layers and stores the names of - // all layers, sorted alphabetically, - // into string set lns. - // - // channelsInLayer(ln,f,l) stores a pair of iterators in f and l - // such that the loop - // - // for (ConstIterator i = f; i != l; ++i) - // ... - // - // iterates over all channels in layer ln. - // channelsInLayer (ln, l, p) calls - // channelsWithPrefix (ln + ".", l, p). - // - //----------------------------------------------------------------- - - void layers (std::set &layerNames) const; - - void channelsInLayer (const std::string &layerName, - Iterator &first, - Iterator &last); - - void channelsInLayer (const std::string &layerName, - ConstIterator &first, - ConstIterator &last) const; - - - //------------------------------------------------------------------- - // Find all channels whose name begins with a given prefix: - // - // channelsWithPrefix(p,f,l) stores a pair of iterators in f and l - // such that the following loop iterates over all channels whose name - // begins with string p: - // - // for (ConstIterator i = f; i != l; ++i) - // ... - // - //------------------------------------------------------------------- - - void channelsWithPrefix (const char prefix[], - Iterator &first, - Iterator &last); - - void channelsWithPrefix (const char prefix[], - ConstIterator &first, - ConstIterator &last) const; - - void channelsWithPrefix (const std::string &prefix, - Iterator &first, - Iterator &last); - - void channelsWithPrefix (const std::string &prefix, - ConstIterator &first, - ConstIterator &last) const; - - //------------ - // Operator == - //------------ - - bool operator == (const ChannelList &other) const; - - private: - - ChannelMap _map; -}; - - -//---------- -// Iterators -//---------- - -class ChannelList::Iterator -{ - public: - - Iterator (); - Iterator (const ChannelList::ChannelMap::iterator &i); - - Iterator & operator ++ (); - Iterator operator ++ (int); - - const char * name () const; - Channel & channel () const; - - private: - - friend class ChannelList::ConstIterator; - - ChannelList::ChannelMap::iterator _i; -}; - - -class ChannelList::ConstIterator -{ - public: - - ConstIterator (); - ConstIterator (const ChannelList::ChannelMap::const_iterator &i); - ConstIterator (const ChannelList::Iterator &other); - - ConstIterator & operator ++ (); - ConstIterator operator ++ (int); - - const char * name () const; - const Channel & channel () const; - - private: - - friend bool operator == (const ConstIterator &, const ConstIterator &); - friend bool operator != (const ConstIterator &, const ConstIterator &); - - ChannelList::ChannelMap::const_iterator _i; -}; - - -//----------------- -// Inline Functions -//----------------- - -inline -ChannelList::Iterator::Iterator (): _i() -{ - // empty -} - - -inline -ChannelList::Iterator::Iterator (const ChannelList::ChannelMap::iterator &i): - _i (i) -{ - // empty -} - - -inline ChannelList::Iterator & -ChannelList::Iterator::operator ++ () -{ - ++_i; - return *this; -} - - -inline ChannelList::Iterator -ChannelList::Iterator::operator ++ (int) -{ - Iterator tmp = *this; - ++_i; - return tmp; -} - - -inline const char * -ChannelList::Iterator::name () const -{ - return *_i->first; -} - - -inline Channel & -ChannelList::Iterator::channel () const -{ - return _i->second; -} - - -inline -ChannelList::ConstIterator::ConstIterator (): _i() -{ - // empty -} - -inline -ChannelList::ConstIterator::ConstIterator - (const ChannelList::ChannelMap::const_iterator &i): _i (i) -{ - // empty -} - - -inline -ChannelList::ConstIterator::ConstIterator (const ChannelList::Iterator &other): - _i (other._i) -{ - // empty -} - -inline ChannelList::ConstIterator & -ChannelList::ConstIterator::operator ++ () -{ - ++_i; - return *this; -} - - -inline ChannelList::ConstIterator -ChannelList::ConstIterator::operator ++ (int) -{ - ConstIterator tmp = *this; - ++_i; - return tmp; -} - - -inline const char * -ChannelList::ConstIterator::name () const -{ - return *_i->first; -} - -inline const Channel & -ChannelList::ConstIterator::channel () const -{ - return _i->second; -} - - -inline bool -operator == (const ChannelList::ConstIterator &x, - const ChannelList::ConstIterator &y) -{ - return x._i == y._i; -} - - -inline bool -operator != (const ChannelList::ConstIterator &x, - const ChannelList::ConstIterator &y) -{ - return !(x == y); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp deleted file mode 100644 index 5549493..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class ChannelListAttribute -// -//----------------------------------------------------------------------------- - -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -namespace { - -template -void checkIsNullTerminated (const char (&str)[N], const char *what) -{ - for (size_t i = 0; i < N; ++i) { - if (str[i] == '\0') - return; - } - std::stringstream s; - s << "Invalid " << what << ": it is more than " << (N - 1) - << " characters long."; - throw IEX_NAMESPACE::InputExc(s); -} - -} // namespace - - -template <> -const char * -ChannelListAttribute::staticTypeName () -{ - return "chlist"; -} - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -void -ChannelListAttribute::writeValueTo (OStream &os, int version) const -{ - for (ChannelList::ConstIterator i = _value.begin(); - i != _value.end(); - ++i) - { - // - // Write name - // - - Xdr::write (os, i.name()); - - // - // Write Channel struct - // - - Xdr::write (os, int (i.channel().type)); - Xdr::write (os, i.channel().pLinear); - Xdr::pad (os, 3); - Xdr::write (os, i.channel().xSampling); - Xdr::write (os, i.channel().ySampling); - } - - // - // Write end of list marker - // - - Xdr::write (os, ""); -} - - -template <> -void -ChannelListAttribute::readValueFrom (IStream &is, - int size, - int version) -{ - while (true) - { - // - // Read name; zero length name means end of channel list - // - - char name[Name::SIZE]; - Xdr::read (is,Name::MAX_LENGTH,name); - - if (name[0] == 0) - break; - - checkIsNullTerminated (name, "channel name"); - - // - // Read Channel struct - // - - int type; - bool pLinear; - int xSampling; - int ySampling; - - Xdr::read (is, type); - Xdr::read (is, pLinear); - Xdr::skip (is, 3); - Xdr::read (is, xSampling); - Xdr::read (is, ySampling); - - _value.insert (name, Channel (PixelType (type), - xSampling, - ySampling, - pLinear)); - } -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelListAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelListAttribute.h deleted file mode 100644 index 60d8907..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChannelListAttribute.h +++ /dev/null @@ -1,74 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_CHANNEL_LIST_ATTRIBUTE_H -#define INCLUDED_IMF_CHANNEL_LIST_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class ChannelListAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfChannelList.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute ChannelListAttribute; - -template <> -IMF_EXPORT -const char *ChannelListAttribute::staticTypeName (); - -template <> -IMF_EXPORT -void ChannelListAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; - -template <> -IMF_EXPORT -void ChannelListAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif - diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCheckedArithmetic.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCheckedArithmetic.h deleted file mode 100644 index 6a7fc15..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCheckedArithmetic.h +++ /dev/null @@ -1,163 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2009, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_CHECKED_ARITHMETIC_H -#define INCLUDED_IMF_CHECKED_ARITHMETIC_H - -//----------------------------------------------------------------------------- -// -// Integer arithmetic operations that throw exceptions -// on overflow, underflow or division by zero. -// -//----------------------------------------------------------------------------- - -#include -#include "IexMathExc.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -template struct StaticAssertionFailed; -template <> struct StaticAssertionFailed {}; - -#define IMF_STATIC_ASSERT(x) \ - do {StaticAssertionFailed staticAssertionFailed; ((void) staticAssertionFailed);} while (false) - - -template -T -uiMult (T a, T b) -{ - // - // Unsigned integer multiplication - // - - IMF_STATIC_ASSERT (!std::numeric_limits::is_signed && - std::numeric_limits::is_integer); - - if (a > 0 && b > std::numeric_limits::max() / a) - throw IEX_NAMESPACE::OverflowExc ("Integer multiplication overflow."); - - return a * b; -} - - -template -T -uiDiv (T a, T b) -{ - // - // Unsigned integer division - // - - IMF_STATIC_ASSERT (!std::numeric_limits::is_signed && - std::numeric_limits::is_integer); - - if (b == 0) - throw IEX_NAMESPACE::DivzeroExc ("Integer division by zero."); - - return a / b; -} - - -template -T -uiAdd (T a, T b) -{ - // - // Unsigned integer addition - // - - IMF_STATIC_ASSERT (!std::numeric_limits::is_signed && - std::numeric_limits::is_integer); - - if (a > std::numeric_limits::max() - b) - throw IEX_NAMESPACE::OverflowExc ("Integer addition overflow."); - - return a + b; -} - - -template -T -uiSub (T a, T b) -{ - // - // Unsigned integer subtraction - // - - IMF_STATIC_ASSERT (!std::numeric_limits::is_signed && - std::numeric_limits::is_integer); - - if (a < b) - throw IEX_NAMESPACE::UnderflowExc ("Integer subtraction underflow."); - - return a - b; -} - - -template -size_t -checkArraySize (T n, size_t s) -{ - // - // Verify that the size, in bytes, of an array with n elements - // of size s can be computed without overflowing: - // - // If computing - // - // size_t (n) * s - // - // would overflow, then throw an IEX_NAMESPACE::OverflowExc exception. - // Otherwise return - // - // size_t (n). - // - - IMF_STATIC_ASSERT (!std::numeric_limits::is_signed && - std::numeric_limits::is_integer); - - IMF_STATIC_ASSERT (sizeof (T) <= sizeof (size_t)); - - if (size_t (n) > std::numeric_limits::max() / s) - throw IEX_NAMESPACE::OverflowExc ("Integer multiplication overflow."); - - return size_t (n); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticities.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticities.cpp deleted file mode 100644 index f354cdf..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticities.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2003, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// CIE (x,y) chromaticities, and conversions between -// RGB tiples and CIE XYZ tristimulus values. -// -//----------------------------------------------------------------------------- - -#include -#include "ImfNamespace.h" -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -Chromaticities::Chromaticities (const IMATH_NAMESPACE::V2f &red, - const IMATH_NAMESPACE::V2f &green, - const IMATH_NAMESPACE::V2f &blue, - const IMATH_NAMESPACE::V2f &white) -: - red (red), - green (green), - blue (blue), - white (white) -{ - // empty -} - - -bool -Chromaticities::operator == (const Chromaticities & c) const -{ - return red == c.red && green == c.green && blue == c.blue; -} - - -bool -Chromaticities::operator != (const Chromaticities & c) const -{ - return red != c.red || green != c.green || blue != c.blue; -} - - -IMATH_NAMESPACE::M44f -RGBtoXYZ (const Chromaticities chroma, float Y) -{ - // - // For an explanation of how the color conversion matrix is derived, - // see Roy Hall, "Illumination and Color in Computer Generated Imagery", - // Springer-Verlag, 1989, chapter 3, "Perceptual Response"; and - // Charles A. Poynton, "A Technical Introduction to Digital Video", - // John Wiley & Sons, 1996, chapter 7, "Color science for video". - // - - // - // X and Z values of RGB value (1, 1, 1), or "white" - // - - float X = chroma.white.x * Y / chroma.white.y; - float Z = (1 - chroma.white.x - chroma.white.y) * Y / chroma.white.y; - - // - // Scale factors for matrix rows - // - - float d = chroma.red.x * (chroma.blue.y - chroma.green.y) + - chroma.blue.x * (chroma.green.y - chroma.red.y) + - chroma.green.x * (chroma.red.y - chroma.blue.y); - - float Sr = (X * (chroma.blue.y - chroma.green.y) - - chroma.green.x * (Y * (chroma.blue.y - 1) + - chroma.blue.y * (X + Z)) + - chroma.blue.x * (Y * (chroma.green.y - 1) + - chroma.green.y * (X + Z))) / d; - - float Sg = (X * (chroma.red.y - chroma.blue.y) + - chroma.red.x * (Y * (chroma.blue.y - 1) + - chroma.blue.y * (X + Z)) - - chroma.blue.x * (Y * (chroma.red.y - 1) + - chroma.red.y * (X + Z))) / d; - - float Sb = (X * (chroma.green.y - chroma.red.y) - - chroma.red.x * (Y * (chroma.green.y - 1) + - chroma.green.y * (X + Z)) + - chroma.green.x * (Y * (chroma.red.y - 1) + - chroma.red.y * (X + Z))) / d; - - // - // Assemble the matrix - // - - IMATH_NAMESPACE::M44f M; - - M[0][0] = Sr * chroma.red.x; - M[0][1] = Sr * chroma.red.y; - M[0][2] = Sr * (1 - chroma.red.x - chroma.red.y); - - M[1][0] = Sg * chroma.green.x; - M[1][1] = Sg * chroma.green.y; - M[1][2] = Sg * (1 - chroma.green.x - chroma.green.y); - - M[2][0] = Sb * chroma.blue.x; - M[2][1] = Sb * chroma.blue.y; - M[2][2] = Sb * (1 - chroma.blue.x - chroma.blue.y); - - return M; -} - - -IMATH_NAMESPACE::M44f -XYZtoRGB (const Chromaticities chroma, float Y) -{ - return RGBtoXYZ (chroma, Y).inverse(); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticities.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticities.h deleted file mode 100644 index 9af4769..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticities.h +++ /dev/null @@ -1,131 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2003, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_CHROMATICITIES_H -#define INCLUDED_IMF_CHROMATICITIES_H - -//----------------------------------------------------------------------------- -// -// CIE (x,y) chromaticities, and conversions between -// RGB tiples and CIE XYZ tristimulus values. -// -//----------------------------------------------------------------------------- - -#include "ImathVec.h" -#include "ImathMatrix.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -struct IMF_EXPORT Chromaticities -{ - //----------------------------------------------- - // The CIE x and y coordinates of the RGB triples - // (1,0,0), (0,1,0), (0,0,1) and (1,1,1). - //----------------------------------------------- - - IMATH_NAMESPACE::V2f red; - IMATH_NAMESPACE::V2f green; - IMATH_NAMESPACE::V2f blue; - IMATH_NAMESPACE::V2f white; - - //-------------------------------------------- - // Default constructor produces chromaticities - // according to Rec. ITU-R BT.709-3 - //-------------------------------------------- - - Chromaticities (const IMATH_NAMESPACE::V2f &red = IMATH_NAMESPACE::V2f (0.6400f, 0.3300f), - const IMATH_NAMESPACE::V2f &green = IMATH_NAMESPACE::V2f (0.3000f, 0.6000f), - const IMATH_NAMESPACE::V2f &blue = IMATH_NAMESPACE::V2f (0.1500f, 0.0600f), - const IMATH_NAMESPACE::V2f &white = IMATH_NAMESPACE::V2f (0.3127f, 0.3290f)); - - - //--------- - // Equality - //--------- - - bool operator == (const Chromaticities &v) const; - bool operator != (const Chromaticities &v) const; -}; - - -// -// Conversions between RGB and CIE XYZ -// -// RGB to XYZ: -// -// Given a set of chromaticities, c, and the luminance, Y, of the RGB -// triple (1,1,1), or "white", RGBtoXYZ(c,Y) computes a matrix, M, so -// that multiplying an RGB value, v, with M produces an equivalent -// XYZ value, w. (w == v * M) -// -// If we define that -// -// (Xr, Yr, Zr) == (1, 0, 0) * M -// (Xg, Yg, Zg) == (0, 1, 0) * M -// (Xb, Yb, Zb) == (0, 0, 1) * M -// (Xw, Yw, Zw) == (1, 1, 1) * M, -// -// then the following statements are true: -// -// Xr / (Xr + Yr + Zr) == c.red.x -// Yr / (Xr + Yr + Zr) == c.red.y -// -// Xg / (Xg + Yg + Zg) == c.red.x -// Yg / (Xg + Yg + Zg) == c.red.y -// -// Xb / (Xb + Yb + Zb) == c.red.x -// Yb / (Xb + Yb + Zb) == c.red.y -// -// Xw / (Xw + Yw + Zw) == c.red.x -// Yw / (Xw + Yw + Zw) == c.red.y -// -// Yw == Y. -// -// XYZ to RGB: -// -// YYZtoRGB(c,Y) returns RGBtoXYZ(c,Y).inverse(). -// - -IMF_EXPORT IMATH_NAMESPACE::M44f RGBtoXYZ (const Chromaticities chroma, float Y); -IMF_EXPORT IMATH_NAMESPACE::M44f XYZtoRGB (const Chromaticities chroma, float Y); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp deleted file mode 100644 index 4d7b985..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2003, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class ChromaticitiesAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -ChromaticitiesAttribute::staticTypeName () -{ - return "chromaticities"; -} - - -template <> -void -ChromaticitiesAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.red.x); - Xdr::write (os, _value.red.y); - Xdr::write (os, _value.green.x); - Xdr::write (os, _value.green.y); - Xdr::write (os, _value.blue.x); - Xdr::write (os, _value.blue.y); - Xdr::write (os, _value.white.x); - Xdr::write (os, _value.white.y); -} - - -template <> -void -ChromaticitiesAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value.red.x); - Xdr::read (is, _value.red.y); - Xdr::read (is, _value.green.x); - Xdr::read (is, _value.green.y); - Xdr::read (is, _value.blue.x); - Xdr::read (is, _value.blue.y); - Xdr::read (is, _value.white.x); - Xdr::read (is, _value.white.y); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h deleted file mode 100644 index 6c0c35a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h +++ /dev/null @@ -1,73 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2003, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_CHROMATICITIES_ATTRIBUTE_H -#define INCLUDED_IMF_CHROMATICITIES_ATTRIBUTE_H - - -//----------------------------------------------------------------------------- -// -// class ChromaticitiesAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfChromaticities.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute ChromaticitiesAttribute; - -template <> -IMF_EXPORT -const char *ChromaticitiesAttribute::staticTypeName (); - -template <> -IMF_EXPORT -void ChromaticitiesAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; - -template <> -IMF_EXPORT -void ChromaticitiesAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, - int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp deleted file mode 100644 index 7e0dac0..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp +++ /dev/null @@ -1,591 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Weta Digital Ltd -// -// 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 Weta Digital nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#include "ImfCompositeDeepScanLine.h" -#include "ImfDeepScanLineInputPart.h" -#include "ImfDeepScanLineInputFile.h" -#include "ImfChannelList.h" -#include "ImfFrameBuffer.h" -#include "ImfDeepFrameBuffer.h" -#include "ImfDeepCompositing.h" -#include "ImfPixelType.h" -#include "IlmThreadPool.h" - -#include -#include -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using std::vector; -using std::string; -using IMATH_NAMESPACE::Box2i; -using ILMTHREAD_NAMESPACE::Task; -using ILMTHREAD_NAMESPACE::TaskGroup; -using ILMTHREAD_NAMESPACE::ThreadPool; - - - -struct CompositeDeepScanLine::Data{ - public : - vector _file; // array of files - vector _part; // array of parts - FrameBuffer _outputFrameBuffer; // output frame buffer provided - bool _zback; // true if we are using zback (otherwise channel 1 = channel 0) - vector< vector > _channeldata; // pixel values, read from the input, one array per channel - vector< int > _sampleCounts; // total per-pixel sample counts, - Box2i _dataWindow; // data window of combined inputs - DeepCompositing * _comp; // user-provided compositor - vector _channels; // names of channels that will be composited - vector _bufferMap; // entry _outputFrameBuffer[n].name() == _channels[ _bufferMap[n] ].name() - - void check_valid(const Header & header); // check newly added part/file is OK; on first good call, set _zback/_dataWindow - - // - // set up the given deep frame buffer to contain the required channels - // resize counts and pointers to the width of _dataWindow - // zero-out all counts, since the datawindow may be smaller than/not include this part - // - - void handleDeepFrameBuffer (DeepFrameBuffer & buf, - vector & counts, //per-pixel counts - vector< vector > & pointers, //per-channel-per-pixel pointers to data - const Header & header, - int start, - int end); - - Data(); -}; - -CompositeDeepScanLine::Data::Data() : _zback(false) , _comp(NULL) {} - -CompositeDeepScanLine::CompositeDeepScanLine() : _Data(new Data) {} - -CompositeDeepScanLine::~CompositeDeepScanLine() -{ - delete _Data; -} - -void -CompositeDeepScanLine::addSource(DeepScanLineInputPart* part) -{ - _Data->check_valid(part->header()); - _Data->_part.push_back(part); -} - -void -CompositeDeepScanLine::addSource(DeepScanLineInputFile* file) -{ - _Data->check_valid(file->header()); - _Data->_file.push_back(file); -} - -int -CompositeDeepScanLine::sources() const -{ - return int(_Data->_part.size())+int(_Data->_file.size()); -} - -void -CompositeDeepScanLine::Data::check_valid(const Header & header) -{ - - bool has_z=false; - bool has_alpha=false; - // check good channel names - for( ChannelList::ConstIterator i=header.channels().begin();i!=header.channels().end();++i) - { - std::string n(i.name()); - if(n=="ZBack") - { - _zback=true; - } - else if(n=="Z") - { - has_z=true; - } - else if(n=="A") - { - has_alpha=true; - } - } - - if(!has_z) - { - throw IEX_NAMESPACE::ArgExc("Deep data provided to CompositeDeepScanLine is missing a Z channel"); - } - - if(!has_alpha) - { - throw IEX_NAMESPACE::ArgExc("Deep data provided to CompositeDeepScanLine is missing an alpha channel"); - } - - - if(_part.size()==0 && _file.size()==0) - { - // first in - update and return - - _dataWindow = header.dataWindow(); - - return; - } - - - const Header * const match_header = _part.size()>0 ? &_part[0]->header() : &_file[0]->header(); - - // check the sizes match - if(match_header->displayWindow() != header.displayWindow()) - { - throw IEX_NAMESPACE::ArgExc("Deep data provided to CompositeDeepScanLine has a different displayWindow to previously provided data"); - } - - _dataWindow.extendBy(header.dataWindow()); - -} -void -CompositeDeepScanLine::Data::handleDeepFrameBuffer (DeepFrameBuffer& buf, - std::vector< unsigned int > & counts, - vector< std::vector< float* > > & pointers, - const Header& header, - int start, - int end) -{ - int width=_dataWindow.size().x+1; - size_t pixelcount = width * (end-start+1); - pointers.resize(_channels.size()); - counts.resize(pixelcount); - buf.insertSampleCountSlice (Slice (OPENEXR_IMF_INTERNAL_NAMESPACE::UINT, - (char *) (&counts[0]-_dataWindow.min.x-start*width), - sizeof(unsigned int), - sizeof(unsigned int)*width)); - - pointers[0].resize(pixelcount); - buf.insert ("Z", DeepSlice (OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT, - (char *)(&pointers[0][0]-_dataWindow.min.x-start*width), - sizeof(float *), - sizeof(float *)*width, - sizeof(float) )); - - if(_zback) - { - pointers[1].resize(pixelcount); - buf.insert ("ZBack", DeepSlice (OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT, - (char *)(&pointers[1][0]-_dataWindow.min.x-start*width), - sizeof(float *), - sizeof(float *)*width, - sizeof(float) )); - } - - pointers[2].resize(pixelcount); - buf.insert ("A", DeepSlice (OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT, - (char *)(&pointers[2][0]-_dataWindow.min.x-start*width), - sizeof(float *), - sizeof(float *)*width, - sizeof(float) )); - - - size_t i =0; - for(FrameBuffer::ConstIterator qt = _outputFrameBuffer.begin(); - qt != _outputFrameBuffer.end(); - qt++) - { - int channel_in_source = _bufferMap[i]; - if(channel_in_source>2) - { - // not dealt with yet (0,1,2 previously inserted) - pointers[channel_in_source].resize(pixelcount); - buf.insert (qt.name(), - DeepSlice (OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT, - (char *)(&pointers[channel_in_source][0]-_dataWindow.min.x-start*width), - sizeof(float *), - sizeof(float *)*width, - sizeof(float) )); - } - - i++; - } - -} - -void -CompositeDeepScanLine::setCompositing(DeepCompositing* c) -{ - _Data->_comp=c; -} - -const IMATH_NAMESPACE::Box2i& CompositeDeepScanLine::dataWindow() const -{ - return _Data->_dataWindow; -} - - -void -CompositeDeepScanLine::setFrameBuffer(const FrameBuffer& fr) -{ - - // - // count channels; build map between channels in frame buffer - // and channels in internal buffers - // - - _Data->_channels.resize(3); - _Data->_channels[0]="Z"; - _Data->_channels[1]=_Data->_zback ? "ZBack" : "Z"; - _Data->_channels[2]="A"; - _Data->_bufferMap.resize(0); - - for(FrameBuffer::ConstIterator q=fr.begin();q!=fr.end();q++) - { - string name(q.name()); - if(name=="ZBack") - { - _Data->_bufferMap.push_back(1); - }else if(name=="Z") - { - _Data->_bufferMap.push_back(0); - }else if(name=="A") - { - _Data->_bufferMap.push_back(2); - }else{ - _Data->_bufferMap.push_back(_Data->_channels.size()); - _Data->_channels.push_back(name); - } - } - - _Data->_outputFrameBuffer=fr; -} - -namespace -{ - -class LineCompositeTask : public Task -{ - public: - - LineCompositeTask ( TaskGroup* group , - CompositeDeepScanLine::Data * data, - int y, - int start, - vector* names, - vector > >* pointers, - vector* total_sizes, - vector* num_sources - ) : Task(group) , - _Data(data), - _y(y), - _start(start), - _names(names), - _pointers(pointers), - _total_sizes(total_sizes), - _num_sources(num_sources) - {} - - virtual ~LineCompositeTask () {} - - virtual void execute (); - CompositeDeepScanLine::Data* _Data; - int _y; - int _start; - vector* _names; - vector > >* _pointers; - vector* _total_sizes; - vector* _num_sources; - -}; - - -void -composite_line(int y, - int start, - CompositeDeepScanLine::Data * _Data, - vector & names, - const vector > > & pointers, - const vector & total_sizes, - const vector & num_sources - ) -{ - vector output_pixel(names.size()); //the pixel we'll output to - vector inputs(names.size()); - DeepCompositing d; // fallback compositing engine - DeepCompositing * comp= _Data->_comp ? _Data->_comp : &d; - - int pixel = (y-start)*(_Data->_dataWindow.max.x+1-_Data->_dataWindow.min.x); - - for(int x=_Data->_dataWindow.min.x;x<=_Data->_dataWindow.max.x;x++) - { - // set inputs[] to point to the first sample of the first part of each channel - // if there's a zback, set all channel independently... - - if(_Data->_zback) - { - - for(size_t channel=0;channelcomposite_pixel(&output_pixel[0], - &inputs[0], - &names[0], - names.size(), - total_sizes[pixel], - num_sources[pixel] - ); - - - size_t channel_number=0; - - - // - // write out composited value into internal frame buffer - // - for(FrameBuffer::Iterator it = _Data->_outputFrameBuffer.begin();it !=_Data->_outputFrameBuffer.end();it++) - { - - float value = output_pixel[ _Data->_bufferMap[channel_number] ]; // value to write - - - // cast to half float if necessary - if(it.slice().type==OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT) - { - * (float *)(it.slice().base + y*it.slice().yStride + x*it.slice().xStride) = value; - } - else if(it.slice().type==HALF) - { - * (half *)(it.slice().base + y*it.slice().yStride + x*it.slice().xStride) = half(value); - } - - channel_number++; - - } - - pixel++; - - }// next pixel on row -} - -void LineCompositeTask::execute() -{ - composite_line(_y,_start,_Data,*_names,*_pointers,*_total_sizes,*_num_sources); -} - - -} - -void -CompositeDeepScanLine::readPixels(int start, int end) -{ - size_t parts = _Data->_file.size() + _Data->_part.size(); // total of files+parts - - vector framebuffers(parts); - vector< vector > counts(parts); - - // - // for each part, a pointer to an array of channels - // - vector > > pointers(parts); - vector headers(parts); - - { - size_t i; - for(i=0;i<_Data->_file.size();i++) - { - headers[i] = &_Data->_file[i]->header(); - } - - for(size_t j=0;j<_Data->_part.size();j++) - { - headers[i+j] = &_Data->_part[j]->header(); - } - } - - - for(size_t i=0;ihandleDeepFrameBuffer(framebuffers[i],counts[i],pointers[i],*headers[i],start,end); - } - - // - // set frame buffers and read scanlines from all parts - // TODO what happens if SCANLINE not in data window? - // - - { - size_t i=0; - for(i=0;i<_Data->_file.size();i++) - { - _Data->_file[i]->setFrameBuffer(framebuffers[i]); - _Data->_file[i]->readPixelSampleCounts(start,end); - } - for(size_t j=0;j<_Data->_part.size();j++) - { - _Data->_part[j]->setFrameBuffer(framebuffers[i+j]); - _Data->_part[j]->readPixelSampleCounts(start,end); - } - } - - - // - // total width - // - - size_t total_width = _Data->_dataWindow.size().x+1; - size_t total_pixels = total_width*(end-start+1); - vector total_sizes(total_pixels); - vector num_sources(total_pixels); //number of parts with non-zero sample count - - size_t overall_sample_count=0; // sum of all samples in all images between start and end - - - // - // accumulate pixel counts - // - for(size_t ptr=0;ptr0) num_sources[ptr]++; - } - overall_sample_count+=total_sizes[ptr]; - - - - } - - - - - // - // allocate arrays for pixel data - // samples array accessed as in pixels[channel][sample] - // - - vector > samples( _Data->_channels.size() ); - - for(size_t channel=0;channel<_Data->_channels.size();channel++) - { - if( channel!=1 || _Data->_zback) - { - samples[channel].resize(overall_sample_count); - } - } - - for(size_t channel=0;channel_zback) - { - - samples[channel].resize(overall_sample_count); - - - // - // allocate pointers for channel data - // - - size_t offset=0; - - for(size_t pixel=0;pixel_file.size();i++) - { - _Data->_file[i]->readPixels(start,end); - } - for(size_t j=0;j<_Data->_part.size();j++) - { - _Data->_part[j]->readPixels(start,end); - } - - - - - // - // composite pixels and write back to framebuffer - // - - - // turn vector of strings into array of char * - // and make sure 'ZBack' channel is correct - vector names(_Data->_channels.size()); - for(size_t i=0;i_channels[i].c_str(); - } - - if(!_Data->_zback) names[1]=names[0]; // no zback channel, so make it point to z - - - - TaskGroup g; - for(int y=start;y<=end;y++) - { - ThreadPool::addGlobalTask(new LineCompositeTask(&g,_Data,y,start,&names,&pointers,&total_sizes,&num_sources)); - }//next row -} - -const FrameBuffer& -CompositeDeepScanLine::frameBuffer() const -{ - return _Data->_outputFrameBuffer; -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.h deleted file mode 100644 index 2dc23e5..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.h +++ /dev/null @@ -1,142 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Weta Digital Ltd -// -// 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 Weta Digital nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_COMPOSITEDEEPSCANLINE_H -#define INCLUDED_IMF_COMPOSITEDEEPSCANLINE_H - -//----------------------------------------------------------------------------- -// -// Class to composite deep samples into a frame buffer -// Initialise with a deep input part or deep inputfile -// (also supports multiple files and parts, and will -// composite them together, as long as their sizes and channelmaps agree) -// -// Then call setFrameBuffer, and readPixels, exactly as for reading -// regular scanline images. -// -// Restrictions - source file(s) must contain at least Z and alpha channels -// - if multiple files/parts are provided, sizes must match -// - all requested channels will be composited as premultiplied -// - only half and float channels can be requested -// -// This object should not be considered threadsafe -// -// The default compositing engine will give spurious results with overlapping -// volumetric samples - you may derive from DeepCompositing class, override the -// sort_pixel() and composite_pixel() functions, and pass an instance to -// setCompositing(). -// -//----------------------------------------------------------------------------- - -#include "ImfForward.h" -#include "ImfNamespace.h" -#include "ImfExport.h" -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -class IMF_EXPORT CompositeDeepScanLine -{ - public: - CompositeDeepScanLine(); - virtual ~CompositeDeepScanLine(); - - /// set the source data as a part - ///@note all parts must remain valid until after last interaction with DeepComp - void addSource(DeepScanLineInputPart * part); - - /// set the source data as a file - ///@note all file must remain valid until after last interaction with DeepComp - void addSource(DeepScanLineInputFile * file); - - - ///////////////////////////////////////// - // - // set the frame buffer for output values - // the buffers specified must be large enough - // to handle the dataWindow() - // - ///////////////////////////////////////// - void setFrameBuffer(const FrameBuffer & fr); - - - - ///////////////////////////////////////// - // - // retrieve frameBuffer - // - //////////////////////////////////////// - const FrameBuffer & frameBuffer() const; - - - ////////////////////////////////////////////////// - // - // read scanlines start to end from the source(s) - // storing the result in the frame buffer provided - // - ////////////////////////////////////////////////// - - void readPixels(int start,int end); - - int sources() const; // return number of sources - - ///////////////////////////////////////////////// - // - // retrieve the datawindow - // If multiple parts are specified, this will - // be the union of the dataWindow of all parts - // - //////////////////////////////////////////////// - - const IMATH_NAMESPACE::Box2i & dataWindow() const; - - - // - // override default sorting/compositing operation - // (otherwise an instance of the base class will be used) - // - - void setCompositing(DeepCompositing *); - - struct Data; - private : - struct Data *_Data; - - CompositeDeepScanLine(const CompositeDeepScanLine &); // not implemented - const CompositeDeepScanLine & operator=(const CompositeDeepScanLine &); // not implemented -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompression.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompression.h deleted file mode 100644 index c066d34..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompression.h +++ /dev/null @@ -1,84 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_COMPRESSION_H -#define INCLUDED_IMF_COMPRESSION_H - -//----------------------------------------------------------------------------- -// -// enum Compression -// -//----------------------------------------------------------------------------- -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -enum Compression -{ - NO_COMPRESSION = 0, // no compression - - RLE_COMPRESSION = 1, // run length encoding - - ZIPS_COMPRESSION = 2, // zlib compression, one scan line at a time - - ZIP_COMPRESSION = 3, // zlib compression, in blocks of 16 scan lines - - PIZ_COMPRESSION = 4, // piz-based wavelet compression - - PXR24_COMPRESSION = 5, // lossy 24-bit float compression - - B44_COMPRESSION = 6, // lossy 4-by-4 pixel block compression, - // fixed compression rate - - B44A_COMPRESSION = 7, // lossy 4-by-4 pixel block compression, - // flat fields are compressed more - - DWAA_COMPRESSION = 8, // lossy DCT based compression, in blocks - // of 32 scanlines. More efficient for partial - // buffer access. - - DWAB_COMPRESSION = 9, // lossy DCT based compression, in blocks - // of 256 scanlines. More efficient space - // wise and faster to decode full frames - // than DWAA_COMPRESSION. - - NUM_COMPRESSION_METHODS // number of different compression methods -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp deleted file mode 100644 index a32c689..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class CompressionAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfCompressionAttribute.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - - -template <> -const char * -CompressionAttribute::staticTypeName () -{ - return "compression"; -} - - -template <> -void -CompressionAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - unsigned char tmp = _value; - Xdr::write (os, tmp); -} - - -template <> -void -CompressionAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - unsigned char tmp; - Xdr::read (is, tmp); - _value = Compression (tmp); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressionAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressionAttribute.h deleted file mode 100644 index bfc72de..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressionAttribute.h +++ /dev/null @@ -1,64 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_COMPRESSION_ATTRIBUTE_H -#define INCLUDED_IMF_COMPRESSION_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class CompressionAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfCompression.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute CompressionAttribute; -template <> const char *CompressionAttribute::staticTypeName (); -template <> void CompressionAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; -template <> void CompressionAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, - int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressor.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressor.cpp deleted file mode 100644 index 1905a4d..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressor.cpp +++ /dev/null @@ -1,226 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class Compressor -// -//----------------------------------------------------------------------------- - -#include "ImfCompressor.h" -#include "ImfRleCompressor.h" -#include "ImfZipCompressor.h" -#include "ImfPizCompressor.h" -#include "ImfPxr24Compressor.h" -#include "ImfB44Compressor.h" -#include "ImfDwaCompressor.h" -#include "ImfCheckedArithmetic.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::Box2i; - - -Compressor::Compressor (const Header &hdr): _header (hdr) {} - - -Compressor::~Compressor () {} - - -Compressor::Format -Compressor::format () const -{ - return XDR; -} - - -int -Compressor::compressTile (const char *inPtr, - int inSize, - Box2i range, - const char *&outPtr) -{ - return compress (inPtr, inSize, range.min.y, outPtr); -} - - -int -Compressor::uncompressTile (const char *inPtr, - int inSize, - Box2i range, - const char *&outPtr) -{ - return uncompress (inPtr, inSize, range.min.y, outPtr); -} - - -bool -isValidCompression (Compression c) -{ - switch (c) - { - case NO_COMPRESSION: - case RLE_COMPRESSION: - case ZIPS_COMPRESSION: - case ZIP_COMPRESSION: - case PIZ_COMPRESSION: - case PXR24_COMPRESSION: - case B44_COMPRESSION: - case B44A_COMPRESSION: - case DWAA_COMPRESSION: - case DWAB_COMPRESSION: - - return true; - - default: - - return false; - } -} - -bool isValidDeepCompression(Compression c) -{ - switch(c) - { - case NO_COMPRESSION: - case RLE_COMPRESSION: - case ZIPS_COMPRESSION: - return true; - default : - return false; - } -} - - -Compressor * -newCompressor (Compression c, size_t maxScanLineSize, const Header &hdr) -{ - switch (c) - { - case RLE_COMPRESSION: - - return new RleCompressor (hdr, maxScanLineSize); - - case ZIPS_COMPRESSION: - - return new ZipCompressor (hdr, maxScanLineSize, 1); - - case ZIP_COMPRESSION: - - return new ZipCompressor (hdr, maxScanLineSize, 16); - - case PIZ_COMPRESSION: - - return new PizCompressor (hdr, maxScanLineSize, 32); - - case PXR24_COMPRESSION: - - return new Pxr24Compressor (hdr, maxScanLineSize, 16); - - case B44_COMPRESSION: - - return new B44Compressor (hdr, maxScanLineSize, 32, false); - - case B44A_COMPRESSION: - - return new B44Compressor (hdr, maxScanLineSize, 32, true); - - case DWAA_COMPRESSION: - - return new DwaCompressor (hdr, maxScanLineSize, 32, - DwaCompressor::STATIC_HUFFMAN); - - case DWAB_COMPRESSION: - - return new DwaCompressor (hdr, maxScanLineSize, 256, - DwaCompressor::STATIC_HUFFMAN); - - default: - - return 0; - } -} - - -Compressor * -newTileCompressor (Compression c, - size_t tileLineSize, - size_t numTileLines, - const Header &hdr) -{ - switch (c) - { - case RLE_COMPRESSION: - - return new RleCompressor (hdr, uiMult (tileLineSize, numTileLines)); - - case ZIPS_COMPRESSION: - case ZIP_COMPRESSION: - - return new ZipCompressor (hdr, tileLineSize, numTileLines); - - case PIZ_COMPRESSION: - - return new PizCompressor (hdr, tileLineSize, numTileLines); - - case PXR24_COMPRESSION: - - return new Pxr24Compressor (hdr, tileLineSize, numTileLines); - - case B44_COMPRESSION: - - return new B44Compressor (hdr, tileLineSize, numTileLines, false); - - case B44A_COMPRESSION: - - return new B44Compressor (hdr, tileLineSize, numTileLines, true); - - case DWAA_COMPRESSION: - case DWAB_COMPRESSION: - - return new DwaCompressor (hdr, tileLineSize, numTileLines, - DwaCompressor::DEFLATE); - - default: - - return 0; - } -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT - diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressor.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressor.h deleted file mode 100644 index d04a4bb..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfCompressor.h +++ /dev/null @@ -1,265 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_COMPRESSOR_H -#define INCLUDED_IMF_COMPRESSOR_H - -//----------------------------------------------------------------------------- -// -// class Compressor -// -//----------------------------------------------------------------------------- - -#include "ImfCompression.h" -#include "ImathBox.h" -#include "ImfNamespace.h" -#include "ImfExport.h" -#include "ImfForward.h" - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT Compressor -{ - public: - - //--------------------------------------------- - // Constructor -- hdr is the header of the file - // that will be compressed or uncompressed - //--------------------------------------------- - - Compressor (const Header &hdr); - - - //----------- - // Destructor - //----------- - - virtual ~Compressor (); - - - //---------------------------------------------- - // Maximum number of scan lines processed by - // a single call to compress() and uncompress(). - //---------------------------------------------- - - virtual int numScanLines () const = 0; - - - //-------------------------------------------- - // Format of the pixel data read and written - // by the compress() and uncompress() methods. - // The default implementation of format() - // returns XDR. - //-------------------------------------------- - - enum Format - { - NATIVE, // the machine's native format - XDR // Xdr format - }; - - virtual Format format () const; - - - //---------------------------- - // Access to the file's header - //---------------------------- - - const Header & header () const {return _header;} - - - //------------------------------------------------------------------------- - // Compress an array of bytes that represents the contents of up to - // numScanLines() scan lines: - // - // inPtr Input buffer (uncompressed data). - // - // inSize Number of bytes in the input buffer - // - // minY Minimum y coordinate of the scan lines to - // be compressed - // - // outPtr Pointer to output buffer - // - // return value Size of compressed data in output buffer - // - // Arrangement of uncompressed pixel data in the input buffer: - // - // Before calling - // - // compress (buf, size, minY, ...); - // - // the InputFile::writePixels() method gathers pixel data from the - // frame buffer, fb, and places them in buffer buf, like this: - // - // char *endOfBuf = buf; - // - // for (int y = minY; - // y <= min (minY + numScanLines() - 1, header().dataWindow().max.y); - // ++y) - // { - // for (ChannelList::ConstIterator c = header().channels().begin(); - // c != header().channels().end(); - // ++c) - // { - // if (modp (y, c.channel().ySampling) != 0) - // continue; - // - // for (int x = header().dataWindow().min.x; - // x <= header().dataWindow().max.x; - // ++x) - // { - // if (modp (x, c.channel().xSampling) != 0) - // continue; - // - // Xdr::write (endOfBuf, fb.pixel (c, x, y)); - // } - // } - // } - // - // int size = endOfBuf - buf; - // - //------------------------------------------------------------------------- - - virtual int compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) = 0; - - virtual int compressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - - //------------------------------------------------------------------------- - // Uncompress an array of bytes that has been compressed by compress(): - // - // inPtr Input buffer (compressed data). - // - // inSize Number of bytes in the input buffer - // - // minY Minimum y coordinate of the scan lines to - // be uncompressed - // - // outPtr Pointer to output buffer - // - // return value Size of uncompressed data in output buffer - // - //------------------------------------------------------------------------- - - virtual int uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) = 0; - - virtual int uncompressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - - private: - - const Header & _header; -}; - - -//-------------------------------------- -// Test if c is a valid compression type -//-------------------------------------- - -IMF_EXPORT -bool isValidCompression (Compression c); - -//-------------------------------------- -// Test if c is valid for deep data -//-------------------------------------- - -IMF_EXPORT -bool isValidDeepCompression (Compression c); - - -//----------------------------------------------------------------- -// Construct a Compressor for compression type c: -// -// maxScanLineSize Maximum number of bytes per uncompressed -// scan line. -// -// header Header of the input or output file whose -// pixels will be compressed or uncompressed. -// -// return value A pointer to a new Compressor object (it -// is the caller's responsibility to delete -// the object), or 0 (if c is NO_COMPRESSION). -// -//----------------------------------------------------------------- - -IMF_EXPORT -Compressor * newCompressor (Compression c, - size_t maxScanLineSize, - const Header &hdr); - - -//----------------------------------------------------------------- -// Construct a Compressor for compression type c for a tiled image: -// -// tileLineSize Maximum number of bytes per uncompressed -// line in a tile. -// -// numTileLines Maximum number of lines in a tile. -// -// header Header of the input or output file whose -// pixels will be compressed or uncompressed. -// -// return value A pointer to a new Compressor object (it -// is the caller's responsibility to delete -// the object), or 0 (if c is NO_COMPRESSION). -// -//----------------------------------------------------------------- - -IMF_EXPORT -Compressor * newTileCompressor (Compression c, - size_t tileLineSize, - size_t numTileLines, - const Header &hdr); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfConvert.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfConvert.cpp deleted file mode 100644 index cce7163..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfConvert.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// Routines for converting between pixel data types, -// with well-defined behavior for exceptional cases. -// -//----------------------------------------------------------------------------- - -#include "ImfConvert.h" -#include "ImfNamespace.h" - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -namespace { - -inline bool -isNegative (float f) -{ - union {float f; int i;} u; - u.f = f; - return (u.i & 0x80000000) != 0; -} - - -inline bool -isNan (float f) -{ - union {float f; int i;} u; - u.f = f; - return (u.i & 0x7fffffff) > 0x7f800000; -} - - -inline bool -isInfinity (float f) -{ - union {float f; int i;} u; - u.f = f; - return (u.i & 0x7fffffff) == 0x7f800000; -} - - -inline bool -isFinite (float f) -{ - union {float f; int i;} u; - u.f = f; - return (u.i & 0x7f800000) != 0x7f800000; -} - -} // namespace - - -unsigned int -halfToUint (half h) -{ - if (h.isNegative() || h.isNan()) - return 0; - - if (h.isInfinity()) - return UINT_MAX; - - return (unsigned int) h; -} - - -unsigned int -floatToUint (float f) -{ - if (isNegative (f) || isNan (f)) - return 0; - - if (isInfinity (f) || f > UINT_MAX) - return UINT_MAX; - - return (unsigned int) f; -} - - -half -uintToHalf (unsigned int ui) -{ - if (ui > HALF_MAX) - return half::posInf(); - - return half ((float) ui); -} - - -half -floatToHalf (float f) -{ - if (isFinite (f)) - { - if (f > HALF_MAX) - return half::posInf(); - - if (f < -HALF_MAX) - return half::negInf(); - } - - return half (f); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfConvert.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfConvert.h deleted file mode 100644 index b0a7f47..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfConvert.h +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_CONVERT_H -#define INCLUDED_IMF_CONVERT_H - -//----------------------------------------------------------------------------- -// -// Routines for converting between pixel data types, -// with well-defined behavior for exceptional cases, -// without depending on how hardware and operating -// system handle integer overflows and floating-point -// exceptions. -// -//----------------------------------------------------------------------------- - -#include "half.h" -#include "ImfExport.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -//--------------------------------------------------------- -// Conversion from half or float to unsigned int: -// -// input result -// --------------------------------------------------- -// -// finite, >= 0 input, cast to unsigned int -// (rounds towards zero) -// -// finite, < 0 0 -// -// NaN 0 -// -// +infinity UINT_MAX -// -// -infinity 0 -// -//--------------------------------------------------------- - -IMF_EXPORT unsigned int halfToUint (half h); -IMF_EXPORT unsigned int floatToUint (float f); - - -//--------------------------------------------------------- -// Conversion from unsigned int or float to half: -// -// input result -// --------------------------------------------------- -// -// finite, closest possible half -// magnitude <= HALF_MAX -// -// finite, > HALF_MAX +infinity -// -// finite, < -HALF_MAX -infinity -// -// NaN NaN -// -// +infinity +infinity -// -// -infinity -infinity -// -//--------------------------------------------------------- - -IMF_EXPORT half uintToHalf (unsigned int ui); -IMF_EXPORT half floatToHalf (float f); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepCompositing.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepCompositing.cpp deleted file mode 100644 index 76702c1..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepCompositing.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Weta Digital Ltd -// -// 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 Weta Digital nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfDeepCompositing.h" - -#include "ImfNamespace.h" -#include -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using std::sort; -using std::vector; -DeepCompositing::DeepCompositing() -{ -} - -DeepCompositing::~DeepCompositing() -{ -} - -void -DeepCompositing::composite_pixel (float outputs[], - const float* inputs[], - const char*channel_names[], - int num_channels, - int num_samples, - int sources) -{ - for(int i=0;i sort_order; - if(sources>1) - { - sort_order.resize(num_samples); - for(int i=0;i1) ? sort_order[i] : i; - float alpha=outputs[2]; - if(alpha>=1.0) return; - - for(int c=0;c inputs[0][b]) return false; - if(inputs[1][a] < inputs[1][b]) return true; - if(inputs[1][a] > inputs[1][b]) return false; - return asecond; -} - - -const DeepSlice & -DeepFrameBuffer::operator [] (const char name[]) const -{ - SliceMap::const_iterator i = _map.find (name); - - if (i == _map.end()) - { - THROW (IEX_NAMESPACE::ArgExc, - "Cannot find frame buffer slice \"" << name << "\"."); - } - - return i->second; -} - - -DeepSlice & -DeepFrameBuffer::operator [] (const string &name) -{ - return this->operator[] (name.c_str()); -} - - -const DeepSlice & -DeepFrameBuffer::operator [] (const string &name) const -{ - return this->operator[] (name.c_str()); -} - - -DeepSlice * -DeepFrameBuffer::findSlice (const char name[]) -{ - SliceMap::iterator i = _map.find (name); - return (i == _map.end())? 0: &i->second; -} - - -const DeepSlice * -DeepFrameBuffer::findSlice (const char name[]) const -{ - SliceMap::const_iterator i = _map.find (name); - return (i == _map.end())? 0: &i->second; -} - - -DeepSlice * -DeepFrameBuffer::findSlice (const string &name) -{ - return findSlice (name.c_str()); -} - - -const DeepSlice * -DeepFrameBuffer::findSlice (const string &name) const -{ - return findSlice (name.c_str()); -} - - -DeepFrameBuffer::Iterator -DeepFrameBuffer::begin () -{ - return _map.begin(); -} - - -DeepFrameBuffer::ConstIterator -DeepFrameBuffer::begin () const -{ - return _map.begin(); -} - - -DeepFrameBuffer::Iterator -DeepFrameBuffer::end () -{ - return _map.end(); -} - - -DeepFrameBuffer::ConstIterator -DeepFrameBuffer::end () const -{ - return _map.end(); -} - - -DeepFrameBuffer::Iterator -DeepFrameBuffer::find (const char name[]) -{ - return _map.find (name); -} - - -DeepFrameBuffer::ConstIterator -DeepFrameBuffer::find (const char name[]) const -{ - return _map.find (name); -} - - -DeepFrameBuffer::Iterator -DeepFrameBuffer::find (const string &name) -{ - return find (name.c_str()); -} - - -DeepFrameBuffer::ConstIterator -DeepFrameBuffer::find (const string &name) const -{ - return find (name.c_str()); -} - - -void -DeepFrameBuffer::insertSampleCountSlice(const Slice & slice) -{ - if (slice.type != UINT) - { - throw IEX_NAMESPACE::ArgExc("The type of sample count slice should be UINT."); - } - - _sampleCounts = slice; -} - - -const Slice & -DeepFrameBuffer::getSampleCountSlice() const -{ - return _sampleCounts; -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepFrameBuffer.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepFrameBuffer.h deleted file mode 100644 index 8eec6ff..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepFrameBuffer.h +++ /dev/null @@ -1,339 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFDEEPFRAMEBUFFER_H_ -#define IMFDEEPFRAMEBUFFER_H_ - -#include "ImfFrameBuffer.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -//-------------------------------------------------------- -// Description of a single deep slice of the frame buffer: -//-------------------------------------------------------- - -struct IMF_EXPORT DeepSlice : public Slice -{ - //--------------------------------------------------------------------- - // The stride for each sample in this slice. - // - // Memory layout: The address of sample i in pixel (x, y) is - // - // base + (xp / xSampling) * xStride + (yp / ySampling) * yStride - // + i * sampleStride - // - // where xp and yp are computed as follows: - // - // * If we are reading or writing a scanline-based file: - // - // xp = x - // yp = y - // - // * If we are reading a tile whose upper left coorner is at (xt, yt): - // - // if xTileCoords is true then xp = x - xt, else xp = x - // if yTileCoords is true then yp = y - yt, else yp = y - // - //--------------------------------------------------------------------- - - int sampleStride; - - //------------ - // Constructor - //------------ - DeepSlice (PixelType type = HALF, - char * base = 0, - size_t xStride = 0, - size_t yStride = 0, - size_t sampleStride = 0, - int xSampling = 1, - int ySampling = 1, - double fillValue = 0.0, - bool xTileCoords = false, - bool yTileCoords = false); -}; - -//----------------- -// DeepFrameBuffer. -//----------------- - -class IMF_EXPORT DeepFrameBuffer -{ - public: - - - //------------ - // Add a slice - //------------ - - void insert (const char name[], - const DeepSlice &slice); - - void insert (const std::string &name, - const DeepSlice &slice); - - //---------------------------------------------------------------- - // Access to existing slices: - // - // [n] Returns a reference to the slice with name n. - // If no slice with name n exists, an IEX_NAMESPACE::ArgExc - // is thrown. - // - // findSlice(n) Returns a pointer to the slice with name n, - // or 0 if no slice with name n exists. - // - //---------------------------------------------------------------- - - DeepSlice & operator [] (const char name[]); - const DeepSlice & operator [] (const char name[]) const; - - DeepSlice & operator [] (const std::string &name); - const DeepSlice & operator [] (const std::string &name) const; - - DeepSlice * findSlice (const char name[]); - const DeepSlice * findSlice (const char name[]) const; - - DeepSlice * findSlice (const std::string &name); - const DeepSlice * findSlice (const std::string &name) const; - - - //----------------------------------------- - // Iterator-style access to existing slices - //----------------------------------------- - - typedef std::map SliceMap; - - class Iterator; - class ConstIterator; - - Iterator begin (); - ConstIterator begin () const; - - Iterator end (); - ConstIterator end () const; - - Iterator find (const char name[]); - ConstIterator find (const char name[]) const; - - Iterator find (const std::string &name); - ConstIterator find (const std::string &name) const; - - //---------------------------------------------------- - // Public function for accessing a sample count slice. - //---------------------------------------------------- - - void insertSampleCountSlice(const Slice & slice); - const Slice & getSampleCountSlice() const; - - private: - - SliceMap _map; - Slice _sampleCounts; -}; - -//---------- -// Iterators -//---------- - -class DeepFrameBuffer::Iterator -{ - public: - - Iterator (); - Iterator (const DeepFrameBuffer::SliceMap::iterator &i); - - Iterator & operator ++ (); - Iterator operator ++ (int); - - const char * name () const; - DeepSlice & slice () const; - - private: - - friend class DeepFrameBuffer::ConstIterator; - - DeepFrameBuffer::SliceMap::iterator _i; -}; - - -class DeepFrameBuffer::ConstIterator -{ - public: - - ConstIterator (); - ConstIterator (const DeepFrameBuffer::SliceMap::const_iterator &i); - ConstIterator (const DeepFrameBuffer::Iterator &other); - - ConstIterator & operator ++ (); - ConstIterator operator ++ (int); - - const char * name () const; - const DeepSlice & slice () const; - - private: - - friend bool operator == (const ConstIterator &, const ConstIterator &); - friend bool operator != (const ConstIterator &, const ConstIterator &); - - DeepFrameBuffer::SliceMap::const_iterator _i; -}; - - -//----------------- -// Inline Functions -//----------------- - -inline -DeepFrameBuffer::Iterator::Iterator (): _i() -{ - // empty -} - - -inline -DeepFrameBuffer::Iterator::Iterator (const DeepFrameBuffer::SliceMap::iterator &i): - _i (i) -{ - // empty -} - - -inline DeepFrameBuffer::Iterator & -DeepFrameBuffer::Iterator::operator ++ () -{ - ++_i; - return *this; -} - - -inline DeepFrameBuffer::Iterator -DeepFrameBuffer::Iterator::operator ++ (int) -{ - Iterator tmp = *this; - ++_i; - return tmp; -} - - -inline const char * -DeepFrameBuffer::Iterator::name () const -{ - return *_i->first; -} - - -inline DeepSlice & -DeepFrameBuffer::Iterator::slice () const -{ - return _i->second; -} - - -inline -DeepFrameBuffer::ConstIterator::ConstIterator (): _i() -{ - // empty -} - -inline -DeepFrameBuffer::ConstIterator::ConstIterator - (const DeepFrameBuffer::SliceMap::const_iterator &i): _i (i) -{ - // empty -} - - -inline -DeepFrameBuffer::ConstIterator::ConstIterator (const DeepFrameBuffer::Iterator &other): - _i (other._i) -{ - // empty -} - -inline DeepFrameBuffer::ConstIterator & -DeepFrameBuffer::ConstIterator::operator ++ () -{ - ++_i; - return *this; -} - - -inline DeepFrameBuffer::ConstIterator -DeepFrameBuffer::ConstIterator::operator ++ (int) -{ - ConstIterator tmp = *this; - ++_i; - return tmp; -} - - -inline const char * -DeepFrameBuffer::ConstIterator::name () const -{ - return *_i->first; -} - -inline const DeepSlice & -DeepFrameBuffer::ConstIterator::slice () const -{ - return _i->second; -} - - -inline bool -operator == (const DeepFrameBuffer::ConstIterator &x, - const DeepFrameBuffer::ConstIterator &y) -{ - return x._i == y._i; -} - - -inline bool -operator != (const DeepFrameBuffer::ConstIterator &x, - const DeepFrameBuffer::ConstIterator &y) -{ - return !(x == y); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - - -#endif /* IMFDEEPFRAMEBUFFER_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageState.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageState.h deleted file mode 100644 index a3941c4..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageState.h +++ /dev/null @@ -1,96 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2013, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_DEEPIMAGESTATE_H -#define INCLUDED_IMF_DEEPIMAGESTATE_H - -//----------------------------------------------------------------------------- -// -// enum DeepImageState -- describes how orderly the pixel data -// in a deep image are -// -// The samples in a deep image pixel may be sorted according to -// depth, and the sample depths or depth ranges may or may not -// overlap each other. A pixel is -// -// - SORTED if for every i and j with i < j -// -// (Z[i] < Z[j]) || (Z[i] == Z[j] && ZBack[i] < ZBack[j]), -// -// - NON_OVERLAPPING if for every i and j with i != j -// -// (Z[i] < Z[j] && ZBack[i] <= Z[j]) || -// (Z[j] < Z[i] && ZBack[j] <= Z[i]) || -// (Z[i] == Z[j] && ZBack[i] <= Z[i] & ZBack[j] > Z[j]) || -// (Z[i] == Z[j] && ZBack[j] <= Z[j] & ZBack[i] > Z[i]), -// -// - TIDY if it is SORTED and NON_OVERLAPPING, -// -// - MESSY if it is neither SORTED nor NON_OVERLAPPING. -// -// A deep image is -// -// - MESSY if at least one of its pixels is MESSY, -// - SORTED if all of its pixels are SORTED, -// - NON_OVERLAPPING if all of its pixels are NON_OVERLAPPING, -// - TIDY if all of its pixels are TIDY. -// -// Note: the rather complicated definition of NON_OVERLAPPING prohibits -// overlapping volume samples, coincident point samples and point samples -// in the middle of a volume sample, but it does allow point samples at -// the front or back of a volume sample. -// -//----------------------------------------------------------------------------- - -#include "ImfNamespace.h" -#include "ImfExport.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -enum DeepImageState -{ - DIS_MESSY = 0, - DIS_SORTED = 1, - DIS_NON_OVERLAPPING = 2, - DIS_TIDY = 3, - - DIS_NUMSTATES // Number of different image states -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.cpp deleted file mode 100644 index 86a70a6..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2013, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class DeepImageStateAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -DeepImageStateAttribute::staticTypeName () -{ - return "deepImageState"; -} - - -template <> -void -DeepImageStateAttribute::writeValueTo - (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - unsigned char tmp = _value; - Xdr::write (os, tmp); -} - - -template <> -void -DeepImageStateAttribute::readValueFrom - (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - unsigned char tmp; - Xdr::read (is, tmp); - _value = DeepImageState (tmp); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.h deleted file mode 100644 index 6174e94..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2013, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_DEEPIMAGESTATE_ATTRIBUTE_H -#define INCLUDED_IMF_DEEPIMAGESTATE_ATTRIBUTE_H - - -//----------------------------------------------------------------------------- -// -// class DeepImageStateAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfDeepImageState.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute - DeepImageStateAttribute; - -template <> IMF_EXPORT const char *DeepImageStateAttribute::staticTypeName (); - -template <> IMF_EXPORT -void DeepImageStateAttribute::writeValueTo - (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; - -template <> IMF_EXPORT -void DeepImageStateAttribute::readValueFrom - (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.cpp deleted file mode 100644 index 8a7002b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.cpp +++ /dev/null @@ -1,2025 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class DeepScanLineInputFile -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "ImfMultiPartInputFile.h" -#include "ImfDeepFrameBuffer.h" -#include "ImfInputStreamMutex.h" -#include "ImfInputPartData.h" - - -#include "ImathBox.h" -#include "ImathFun.h" - - -#include "IlmThreadPool.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" - -#include "Iex.h" - -#include -#include -#include -#include -#include - - -#include "ImfNamespace.h" -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::divp; -using IMATH_NAMESPACE::modp; -using std::string; -using std::vector; -using std::ifstream; -using std::min; -using std::max; -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; -using ILMTHREAD_NAMESPACE::Semaphore; -using ILMTHREAD_NAMESPACE::Task; -using ILMTHREAD_NAMESPACE::TaskGroup; -using ILMTHREAD_NAMESPACE::ThreadPool; - -namespace { - -struct InSliceInfo -{ - PixelType typeInFrameBuffer; - PixelType typeInFile; - char * base; - char* pointerArrayBase; - size_t xPointerStride; - size_t yPointerStride; - size_t sampleStride; - int xSampling; - int ySampling; - bool fill; - bool skip; - double fillValue; - - InSliceInfo (PixelType typeInFrameBuffer = HALF, - char * base = NULL, - PixelType typeInFile = HALF, - size_t xPointerStride = 0, - size_t yPointerStride = 0, - size_t sampleStride = 0, - int xSampling = 1, - int ySampling = 1, - bool fill = false, - bool skip = false, - double fillValue = 0.0); -}; - - -InSliceInfo::InSliceInfo (PixelType tifb, - char * b, - PixelType tifl, - size_t xpst, - size_t ypst, - size_t spst, - int xsm, int ysm, - bool f, bool s, - double fv) -: - typeInFrameBuffer (tifb), - typeInFile (tifl), - base(b), - xPointerStride (xpst), - yPointerStride (ypst), - sampleStride (spst), - xSampling (xsm), - ySampling (ysm), - fill (f), - skip (s), - fillValue (fv) -{ - // empty -} - - -struct LineBuffer -{ - const char * uncompressedData; - char * buffer; - Int64 packedDataSize; - Int64 unpackedDataSize; - - int minY; - int maxY; - Compressor * compressor; - Compressor::Format format; - int number; - bool hasException; - string exception; - - LineBuffer (); - ~LineBuffer (); - - inline void wait () {_sem.wait();} - inline void post () {_sem.post();} - - private: - - Semaphore _sem; -}; - - -LineBuffer::LineBuffer (): - uncompressedData (0), - buffer (0), - packedDataSize (0), - compressor (0), - format (defaultFormat(compressor)), - number (-1), - hasException (false), - exception (), - _sem (1) -{ - // empty -} - - -LineBuffer::~LineBuffer () -{ - if (compressor != 0) - delete compressor; -} - -} // namespace - - -struct DeepScanLineInputFile::Data: public Mutex -{ - Header header; // the image header - int version; // file's version - DeepFrameBuffer frameBuffer; // framebuffer to write into - LineOrder lineOrder; // order of the scanlines in file - int minX; // data window's min x coord - int maxX; // data window's max x coord - int minY; // data window's min y coord - int maxY; // data window's max x coord - vector lineOffsets; // stores offsets in file for - // each line - bool fileIsComplete; // True if no scanlines are missing - // in the file - int nextLineBufferMinY; // minimum y of the next linebuffer - vector bytesPerLine; // combined size of a line over all - // channels - vector offsetInLineBuffer; // offset for each scanline in its - // linebuffer - vector slices; // info about channels in file - - vector lineBuffers; // each holds one line buffer - int linesInBuffer; // number of scanlines each buffer - // holds - int partNumber; // part number - int numThreads; // number of threads - - bool multiPartBackwardSupport; // if we are reading a multipart file using single file API - MultiPartInputFile* multiPartFile; // for multipart files opened as single part - bool memoryMapped; // if the stream is memory mapped - - Array2D sampleCount; // the number of samples - // in each pixel - - Array lineSampleCount; // the number of samples - // in each line - - Array gotSampleCount; // for each scanline, indicating if - // we have got its sample count table - - char* sampleCountSliceBase; // pointer to the start of - // the sample count array - int sampleCountXStride; // x stride of the sample count array - int sampleCountYStride; // y stride of the sample count array - bool frameBufferValid; // set by setFrameBuffer: excepts if readPixelSampleCounts if false - - Array sampleCountTableBuffer; - // the buffer for sample count table - - Compressor* sampleCountTableComp; - // the decompressor for sample count table - - int combinedSampleSize; // total size of all channels combined: used to sanity check sample table size - - int maxSampleCountTableSize; - // the max size in bytes for a pixel - // sample count table - InputStreamMutex* _streamData; - bool _deleteStream; - - - Data (int numThreads); - ~Data (); - - inline LineBuffer * getLineBuffer (int number); // hash function from line - // buffer indices into our - // vector of line buffers -}; - - -DeepScanLineInputFile::Data::Data (int numThreads): - partNumber(-1), - numThreads(numThreads), - multiPartBackwardSupport(false), - multiPartFile(NULL), - memoryMapped(false), - frameBufferValid(false), - _streamData(NULL), - _deleteStream(false) -{ - // - // We need at least one lineBuffer, but if threading is used, - // to keep n threads busy we need 2*n lineBuffers - // - - lineBuffers.resize (max (1, 2 * numThreads)); - - for (size_t i = 0; i < lineBuffers.size(); i++) - lineBuffers[i] = 0; - - sampleCountTableComp = 0; -} - - -DeepScanLineInputFile::Data::~Data () -{ - for (size_t i = 0; i < lineBuffers.size(); i++) - if (lineBuffers[i] != 0) - delete lineBuffers[i]; - - for (size_t i = 0; i < slices.size(); i++) - delete slices[i]; - - if (sampleCountTableComp != 0) - delete sampleCountTableComp; - - if (multiPartBackwardSupport) - delete multiPartFile; -} - - -inline LineBuffer * -DeepScanLineInputFile::Data::getLineBuffer (int lineBufferNumber) -{ - return lineBuffers[lineBufferNumber % lineBuffers.size()]; -} - - -namespace { - - -void -reconstructLineOffsets (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - LineOrder lineOrder, - vector &lineOffsets) -{ - Int64 position = is.tellg(); - - try - { - for (unsigned int i = 0; i < lineOffsets.size(); i++) - { - Int64 lineOffset = is.tellg(); - - int y; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, y); - - Int64 packed_offset; - Int64 packed_sample; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, packed_offset); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, packed_sample); - //next is unpacked sample table size - skip this too - Xdr::skip (is, packed_offset+packed_sample+8); - - if (lineOrder == INCREASING_Y) - lineOffsets[i] = lineOffset; - else - lineOffsets[lineOffsets.size() - i - 1] = lineOffset; - } - } - catch (...) - { - // - // Suppress all exceptions. This functions is - // called only to reconstruct the line offset - // table for incomplete files, and exceptions - // are likely. - // - } - - is.clear(); - is.seekg (position); -} - - -void -readLineOffsets (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - LineOrder lineOrder, - vector &lineOffsets, - bool &complete) -{ - for (unsigned int i = 0; i < lineOffsets.size(); i++) - { - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, lineOffsets[i]); - } - - complete = true; - - for (unsigned int i = 0; i < lineOffsets.size(); i++) - { - if (lineOffsets[i] <= 0) - { - // - // Invalid data in the line offset table mean that - // the file is probably incomplete (the table is - // the last thing written to the file). Either - // some process is still busy writing the file, - // or writing the file was aborted. - // - // We should still be able to read the existing - // parts of the file. In order to do this, we - // have to make a sequential scan over the scan - // line data to reconstruct the line offset table. - // - - complete = false; - reconstructLineOffsets (is, lineOrder, lineOffsets); - break; - } - } -} - - -void -readPixelData (InputStreamMutex *streamData, - DeepScanLineInputFile::Data *ifd, - int minY, - char *&buffer, - Int64 &packedDataSize, - Int64 &unpackedDataSize) -{ - // - // Read a single line buffer from the input file. - // - // If the input file is not memory-mapped, we copy the pixel data into - // into the array pointed to by buffer. If the file is memory-mapped, - // then we change where buffer points to instead of writing into the - // array (hence buffer needs to be a reference to a char *). - // - - int lineBufferNumber = (minY - ifd->minY) / ifd->linesInBuffer; - - Int64 lineOffset = ifd->lineOffsets[lineBufferNumber]; - - if (lineOffset == 0) - THROW (IEX_NAMESPACE::InputExc, "Scan line " << minY << " is missing."); - - // - // Seek to the start of the scan line in the file, - // if necessary. - // - - if (!isMultiPart(ifd->version)) - { - if (ifd->nextLineBufferMinY != minY) - streamData->is->seekg (lineOffset); - } - else - { - // - // In a multi-part file, the file pointer may have been moved by - // other parts, so we have to ask tellg() where we are. - // - if (streamData->is->tellg() != ifd->lineOffsets[lineBufferNumber]) - streamData->is->seekg (lineOffset); - } - - // - // Read the data block's header. - // - - int yInFile; - - // - // Read the part number when we are dealing with a multi-part file. - // - - if (isMultiPart(ifd->version)) - { - int partNumber; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, partNumber); - if (partNumber != ifd->partNumber) - { - THROW (IEX_NAMESPACE::ArgExc, "Unexpected part number " << partNumber - << ", should be " << ifd->partNumber << "."); - } - } - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, yInFile); - - if (yInFile != minY) - throw IEX_NAMESPACE::InputExc ("Unexpected data block y coordinate."); - - Int64 sampleCountTableSize; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, sampleCountTableSize); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, packedDataSize); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, unpackedDataSize); - - - // - // We make a check on the data size requirements here. - // Whilst we wish to store 64bit sizes on disk, not all the compressors - // have been made to work with such data sizes and are still limited to - // using signed 32 bit (int) for the data size. As such, this version - // insists that we validate that the data size does not exceed the data - // type max limit. - // @TODO refactor the compressor code to ensure full 64-bit support. - // - - int compressorMaxDataSize = std::numeric_limits::max(); - if (packedDataSize > Int64(compressorMaxDataSize) || - unpackedDataSize > Int64(compressorMaxDataSize)) - { - THROW (IEX_NAMESPACE::ArgExc, "This version of the library does not support " - << "the allocation of data with size > " << compressorMaxDataSize - << " file unpacked size :" << unpackedDataSize - << " file packed size :" << packedDataSize << ".\n"); - } - - // - // Skip the pixel sample count table because we have read this data. - // - - Xdr::skip (*streamData->is, sampleCountTableSize); - - // - // Read the pixel data. - // - - if (streamData->is->isMemoryMapped ()) - buffer = streamData->is->readMemoryMapped (packedDataSize); - else - { - // (TODO) check if the packed data size is too big? - // (TODO) better memory management. Don't delete buffer all the time. - if (buffer != 0) delete[] buffer; - buffer = new char[packedDataSize]; - streamData->is->read (buffer, packedDataSize); - } - - // - // Keep track of which scan line is the next one in - // the file, so that we can avoid redundant seekg() - // operations (seekg() can be fairly expensive). - // - - if (ifd->lineOrder == INCREASING_Y) - ifd->nextLineBufferMinY = minY + ifd->linesInBuffer; - else - ifd->nextLineBufferMinY = minY - ifd->linesInBuffer; -} - -// -// A LineBufferTask encapsulates the task uncompressing a set of -// scanlines (line buffer) and copying them into the frame buffer. -// - -class LineBufferTask : public Task -{ - public: - - LineBufferTask (TaskGroup *group, - DeepScanLineInputFile::Data *ifd, - LineBuffer *lineBuffer, - int scanLineMin, - int scanLineMax); - - virtual ~LineBufferTask (); - - virtual void execute (); - - private: - - DeepScanLineInputFile::Data * _ifd; - LineBuffer * _lineBuffer; - int _scanLineMin; - int _scanLineMax; -}; - - -LineBufferTask::LineBufferTask - (TaskGroup *group, - DeepScanLineInputFile::Data *ifd, - LineBuffer *lineBuffer, - int scanLineMin, - int scanLineMax) -: - Task (group), - _ifd (ifd), - _lineBuffer (lineBuffer), - _scanLineMin (scanLineMin), - _scanLineMax (scanLineMax) -{ - // empty -} - - -LineBufferTask::~LineBufferTask () -{ - // - // Signal that the line buffer is now free - // - - _lineBuffer->post (); -} - - -void -LineBufferTask::execute () -{ - try - { - // - // Uncompress the data, if necessary - // - - if (_lineBuffer->uncompressedData == 0) - { - Int64 uncompressedSize = 0; - int maxY = min (_lineBuffer->maxY, _ifd->maxY); - - for (int i = _lineBuffer->minY - _ifd->minY; - i <= maxY - _ifd->minY; - ++i) - { - uncompressedSize += (int) _ifd->bytesPerLine[i]; - } - - // - // Create the compressor everytime when we want to use it, - // because we don't know maxBytesPerLine beforehand. - // (TODO) optimize this. don't do this every time. - // - - if (_lineBuffer->compressor != 0) - delete _lineBuffer->compressor; - Int64 maxBytesPerLine = 0; - for (int i = _lineBuffer->minY - _ifd->minY; - i <= maxY - _ifd->minY; - ++i) - { - if (_ifd->bytesPerLine[i] > maxBytesPerLine) - maxBytesPerLine = _ifd->bytesPerLine[i]; - } - _lineBuffer->compressor = newCompressor(_ifd->header.compression(), - maxBytesPerLine, - _ifd->header); - - if (_lineBuffer->compressor && - _lineBuffer->packedDataSize < uncompressedSize) - { - _lineBuffer->format = _lineBuffer->compressor->format(); - - _lineBuffer->packedDataSize = _lineBuffer->compressor->uncompress - (_lineBuffer->buffer, _lineBuffer->packedDataSize, - _lineBuffer->minY, _lineBuffer->uncompressedData); - } - else - { - // - // If the line is uncompressed, it's in XDR format, - // regardless of the compressor's output format. - // - - _lineBuffer->format = Compressor::XDR; - _lineBuffer->uncompressedData = _lineBuffer->buffer; - } - } - - int yStart, yStop, dy; - - if (_ifd->lineOrder == INCREASING_Y) - { - yStart = _scanLineMin; - yStop = _scanLineMax + 1; - dy = 1; - } - else - { - yStart = _scanLineMax; - yStop = _scanLineMin - 1; - dy = -1; - } - - for (int y = yStart; y != yStop; y += dy) - { - // - // Convert one scan line's worth of pixel data back - // from the machine-independent representation, and - // store the result in the frame buffer. - // - - const char *readPtr = _lineBuffer->uncompressedData + - _ifd->offsetInLineBuffer[y - _ifd->minY]; - - // - // Iterate over all image channels. - // - - for (unsigned int i = 0; i < _ifd->slices.size(); ++i) - { - // - // Test if scan line y of this channel contains any data - // (the scan line contains data only if y % ySampling == 0). - // - - InSliceInfo &slice = *_ifd->slices[i]; - - if (modp (y, slice.ySampling) != 0) - continue; - - // - // Find the x coordinates of the leftmost and rightmost - // sampled pixels (i.e. pixels within the data window - // for which x % xSampling == 0). - // - - // - // Fill the frame buffer with pixel data. - // - - if (slice.skip) - { - // - // The file contains data for this channel, but - // the frame buffer contains no slice for this channel. - // - - skipChannel (readPtr, slice.typeInFile, - _ifd->lineSampleCount[y - _ifd->minY]); - } - else - { - // - // The frame buffer contains a slice for this channel. - // - - int width = (_ifd->maxX - _ifd->minX + 1); - - copyIntoDeepFrameBuffer (readPtr, slice.base, - (char*) (&_ifd->sampleCount[0][0] - - _ifd->minX - - _ifd->minY * width), - sizeof(unsigned int) * 1, - sizeof(unsigned int) * width, - y, _ifd->minX, _ifd->maxX, - 0, 0, - 0, 0, - slice.sampleStride, - slice.xPointerStride, - slice.yPointerStride, - slice.fill, - slice.fillValue, _lineBuffer->format, - slice.typeInFrameBuffer, - slice.typeInFile); - } - } - } - } - catch (std::exception &e) - { - if (!_lineBuffer->hasException) - { - _lineBuffer->exception = e.what(); - _lineBuffer->hasException = true; - } - } - catch (...) - { - if (!_lineBuffer->hasException) - { - _lineBuffer->exception = "unrecognized exception"; - _lineBuffer->hasException = true; - } - } -} - - -LineBufferTask * -newLineBufferTask - (TaskGroup *group, - DeepScanLineInputFile::Data *ifd, - int number, - int scanLineMin, - int scanLineMax) -{ - // - // Wait for a line buffer to become available, fill the line - // buffer with raw data from the file if necessary, and create - // a new LineBufferTask whose execute() method will uncompress - // the contents of the buffer and copy the pixels into the - // frame buffer. - // - - LineBuffer *lineBuffer = ifd->getLineBuffer (number); - - try - { - lineBuffer->wait (); - - if (lineBuffer->number != number) - { - lineBuffer->minY = ifd->minY + number * ifd->linesInBuffer; - lineBuffer->maxY = lineBuffer->minY + ifd->linesInBuffer - 1; - - lineBuffer->number = number; - lineBuffer->uncompressedData = 0; - - readPixelData (ifd->_streamData, ifd, lineBuffer->minY, - lineBuffer->buffer, - lineBuffer->packedDataSize, - lineBuffer->unpackedDataSize); - } - } - catch (std::exception &e) - { - if (!lineBuffer->hasException) - { - lineBuffer->exception = e.what(); - lineBuffer->hasException = true; - } - lineBuffer->number = -1; - lineBuffer->post(); - throw; - } - catch (...) - { - // - // Reading from the file caused an exception. - // Signal that the line buffer is free, and - // re-throw the exception. - // - - lineBuffer->exception = "unrecognized exception"; - lineBuffer->hasException = true; - lineBuffer->number = -1; - lineBuffer->post(); - throw; - } - - scanLineMin = max (lineBuffer->minY, scanLineMin); - scanLineMax = min (lineBuffer->maxY, scanLineMax); - - return new LineBufferTask (group, ifd, lineBuffer, - scanLineMin, scanLineMax); -} - -} // namespace - - -void DeepScanLineInputFile::initialize(const Header& header) -{ - try - { - if (header.type() != DEEPSCANLINE) - throw IEX_NAMESPACE::ArgExc("Can't build a DeepScanLineInputFile from " - "a type-mismatched part."); - - if(header.version()!=1) - { - THROW(IEX_NAMESPACE::ArgExc, "Version " << header.version() << " not supported for deepscanline images in this version of the library"); - } - - _data->header = header; - - _data->lineOrder = _data->header.lineOrder(); - - const Box2i &dataWindow = _data->header.dataWindow(); - - _data->minX = dataWindow.min.x; - _data->maxX = dataWindow.max.x; - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - _data->sampleCount.resizeErase(_data->maxY - _data->minY + 1, - _data->maxX - _data->minX + 1); - _data->lineSampleCount.resizeErase(_data->maxY - _data->minY + 1); - - Compressor* compressor = newCompressor(_data->header.compression(), - 0, - _data->header); - - _data->linesInBuffer = numLinesInBuffer (compressor); - - delete compressor; - - _data->nextLineBufferMinY = _data->minY - 1; - - int lineOffsetSize = (dataWindow.max.y - dataWindow.min.y + - _data->linesInBuffer) / _data->linesInBuffer; - - _data->lineOffsets.resize (lineOffsetSize); - - for (size_t i = 0; i < _data->lineBuffers.size(); i++) - _data->lineBuffers[i] = new LineBuffer (); - - _data->gotSampleCount.resizeErase(_data->maxY - _data->minY + 1); - for (int i = 0; i < _data->maxY - _data->minY + 1; i++) - _data->gotSampleCount[i] = false; - - _data->maxSampleCountTableSize = min(_data->linesInBuffer, _data->maxY - _data->minY + 1) * - (_data->maxX - _data->minX + 1) * - sizeof(unsigned int); - - _data->sampleCountTableBuffer.resizeErase(_data->maxSampleCountTableSize); - - _data->sampleCountTableComp = newCompressor(_data->header.compression(), - _data->maxSampleCountTableSize, - _data->header); - - _data->bytesPerLine.resize (_data->maxY - _data->minY + 1); - - const ChannelList & c=header.channels(); - - _data->combinedSampleSize=0; - for(ChannelList::ConstIterator i=c.begin();i!=c.end();i++) - { - switch(i.channel().type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF : - _data->combinedSampleSize+=Xdr::size(); - break; - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT : - _data->combinedSampleSize+=Xdr::size(); - break; - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT : - _data->combinedSampleSize+=Xdr::size(); - break; - default : - THROW(IEX_NAMESPACE::ArgExc, "Bad type for channel " << i.name() << " initializing deepscanline reader"); - - } - } - - } - catch (...) - { - delete _data; - _data=NULL; - throw; - } -} - - -DeepScanLineInputFile::DeepScanLineInputFile(InputPartData* part) - -{ - - _data = new Data(part->numThreads); - _data->_deleteStream=false; - _data->_streamData = part->mutex; - _data->memoryMapped = _data->_streamData->is->isMemoryMapped(); - _data->version = part->version; - - initialize(part->header); - - _data->lineOffsets = part->chunkOffsets; - - _data->partNumber = part->partNumber; -} - - -DeepScanLineInputFile::DeepScanLineInputFile - (const char fileName[], int numThreads) -: - _data (new Data (numThreads)) -{ - _data->_streamData = new InputStreamMutex(); - _data->_deleteStream = true; - OPENEXR_IMF_INTERNAL_NAMESPACE::IStream* is = 0; - - try - { - is = new StdIFStream (fileName); - readMagicNumberAndVersionField(*is, _data->version); - // - // Backward compatibility to read multpart file. - // - if (isMultiPart(_data->version)) - { - compatibilityInitialize(*is); - return; - } - _data->_streamData->is = is; - _data->memoryMapped = is->isMemoryMapped(); - _data->header.readFrom (*_data->_streamData->is, _data->version); - _data->header.sanityCheck (isTiled (_data->version)); - - initialize(_data->header); - - readLineOffsets (*_data->_streamData->is, - _data->lineOrder, - _data->lineOffsets, - _data->fileIsComplete); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (is) delete is; - if (_data && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - REPLACE_EXC (e, "Cannot read image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - if (is) delete is; - if (_data && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - throw; - } -} - - -DeepScanLineInputFile::DeepScanLineInputFile - (const Header &header, - OPENEXR_IMF_INTERNAL_NAMESPACE::IStream *is, - int version, - int numThreads) -: - _data (new Data (numThreads)) -{ - _data->_streamData=new InputStreamMutex(); - _data->_deleteStream=false; - _data->_streamData->is = is; - - _data->memoryMapped = is->isMemoryMapped(); - - _data->version =version; - - initialize (header); - - readLineOffsets (*_data->_streamData->is, - _data->lineOrder, - _data->lineOffsets, - _data->fileIsComplete); -} - - -DeepScanLineInputFile::~DeepScanLineInputFile () -{ - if (_data->_deleteStream) - delete _data->_streamData->is; - - if (_data) - { - if (!_data->memoryMapped) - for (size_t i = 0; i < _data->lineBuffers.size(); i++) - delete [] _data->lineBuffers[i]->buffer; - - // - // Unless this file was opened via the multipart API, delete the streamdata - // object too. - // (TODO) it should be "isMultiPart(data->version)", but when there is only - // single part, - // (see the above constructor) the version field is not set. - // - // (TODO) we should have a way to tell if the stream data is owned by this - // file or by a parent multipart file. - // - - if (_data->partNumber == -1 && _data->_streamData) - delete _data->_streamData; - - delete _data; - } -} - -void -DeepScanLineInputFile::compatibilityInitialize(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is) -{ - is.seekg(0); - // - // Construct a MultiPartInputFile, initialize TiledInputFile - // with the part 0 data. - // (TODO) maybe change the third parameter of the constructor of MultiPartInputFile later. - // - _data->multiPartBackwardSupport = true; - _data->multiPartFile = new MultiPartInputFile(is, _data->numThreads); - InputPartData* part = _data->multiPartFile->getPart(0); - - multiPartInitialize(part); -} - -void DeepScanLineInputFile::multiPartInitialize(InputPartData* part) -{ - - _data->_streamData = part->mutex; - _data->memoryMapped = _data->_streamData->is->isMemoryMapped(); - _data->version = part->version; - - initialize(part->header); - - _data->lineOffsets = part->chunkOffsets; - - _data->partNumber = part->partNumber; - -} - - -const char * -DeepScanLineInputFile::fileName () const -{ - return _data->_streamData->is->fileName(); -} - - -const Header & -DeepScanLineInputFile::header () const -{ - return _data->header; -} - - -int -DeepScanLineInputFile::version () const -{ - return _data->version; -} - - -void -DeepScanLineInputFile::setFrameBuffer (const DeepFrameBuffer &frameBuffer) -{ - Lock lock (*_data->_streamData); - - - // - // Check if the new frame buffer descriptor is - // compatible with the image file header. - // - - const ChannelList &channels = _data->header.channels(); - - for (DeepFrameBuffer::ConstIterator j = frameBuffer.begin(); - j != frameBuffer.end(); - ++j) - { - ChannelList::ConstIterator i = channels.find (j.name()); - - if (i == channels.end()) - continue; - - if (i.channel().xSampling != j.slice().xSampling || - i.channel().ySampling != j.slice().ySampling) - THROW (IEX_NAMESPACE::ArgExc, "X and/or y subsampling factors " - "of \"" << i.name() << "\" channel " - "of input file \"" << fileName() << "\" are " - "not compatible with the frame buffer's " - "subsampling factors."); - } - - // - // Store the pixel sample count table. - // (TODO) Support for different sampling rates? - // - - const Slice& sampleCountSlice = frameBuffer.getSampleCountSlice(); - if (sampleCountSlice.base == 0) - { - throw IEX_NAMESPACE::ArgExc ("Invalid base pointer, please set a proper sample count slice."); - } - else - { - _data->sampleCountSliceBase = sampleCountSlice.base; - _data->sampleCountXStride = sampleCountSlice.xStride; - _data->sampleCountYStride = sampleCountSlice.yStride; - } - - // - // Initialize the slice table for readPixels(). - // - - vector slices; - ChannelList::ConstIterator i = channels.begin(); - - for (DeepFrameBuffer::ConstIterator j = frameBuffer.begin(); - j != frameBuffer.end(); - ++j) - { - while (i != channels.end() && strcmp (i.name(), j.name()) < 0) - { - // - // Channel i is present in the file but not - // in the frame buffer; data for channel i - // will be skipped during readPixels(). - // - - slices.push_back (new InSliceInfo (i.channel().type, - NULL, - i.channel().type, - 0, - 0, - 0, // sampleStride - i.channel().xSampling, - i.channel().ySampling, - false, // fill - true, // skip - 0.0)); // fillValue - ++i; - } - - bool fill = false; - - if (i == channels.end() || strcmp (i.name(), j.name()) > 0) - { - // - // Channel i is present in the frame buffer, but not in the file. - // In the frame buffer, slice j will be filled with a default value. - // - - fill = true; - } - - slices.push_back (new InSliceInfo (j.slice().type, - j.slice().base, - fill? j.slice().type: - i.channel().type, - j.slice().xStride, - j.slice().yStride, - j.slice().sampleStride, - j.slice().xSampling, - j.slice().ySampling, - fill, - false, // skip - j.slice().fillValue)); - - - if (i != channels.end() && !fill) - ++i; - } - - // - // Client may want data to be filled in multiple arrays, - // so we reset gotSampleCount and bytesPerLine. - // - - for (long i = 0; i < _data->gotSampleCount.size(); i++) - _data->gotSampleCount[i] = false; - for (size_t i = 0; i < _data->bytesPerLine.size(); i++) - _data->bytesPerLine[i] = 0; - - // - // Store the new frame buffer. - // - - _data->frameBuffer = frameBuffer; - - for (size_t i = 0; i < _data->slices.size(); i++) - delete _data->slices[i]; - _data->slices = slices; - _data->frameBufferValid = true; -} - - -const DeepFrameBuffer & -DeepScanLineInputFile::frameBuffer () const -{ - Lock lock (*_data->_streamData); - return _data->frameBuffer; -} - - -bool -DeepScanLineInputFile::isComplete () const -{ - return _data->fileIsComplete; -} - - -void -DeepScanLineInputFile::readPixels (int scanLine1, int scanLine2) -{ - try - { - Lock lock (*_data->_streamData); - - if (_data->slices.size() == 0) - throw IEX_NAMESPACE::ArgExc ("No frame buffer specified " - "as pixel data destination."); - - int scanLineMin = min (scanLine1, scanLine2); - int scanLineMax = max (scanLine1, scanLine2); - - if (scanLineMin < _data->minY || scanLineMax > _data->maxY) - throw IEX_NAMESPACE::ArgExc ("Tried to read scan line outside " - "the image file's data window."); - - for (int i = scanLineMin; i <= scanLineMax; i++) - { - if (_data->gotSampleCount[i - _data->minY] == false) - throw IEX_NAMESPACE::ArgExc ("Tried to read scan line without " - "knowing the sample counts, please" - "read the sample counts first."); - } - - - // - // We impose a numbering scheme on the lineBuffers where the first - // scanline is contained in lineBuffer 1. - // - // Determine the first and last lineBuffer numbers in this scanline - // range. We always attempt to read the scanlines in the order that - // they are stored in the file. - // - - int start, stop, dl; - - if (_data->lineOrder == INCREASING_Y) - { - start = (scanLineMin - _data->minY) / _data->linesInBuffer; - stop = (scanLineMax - _data->minY) / _data->linesInBuffer + 1; - dl = 1; - } - else - { - start = (scanLineMax - _data->minY) / _data->linesInBuffer; - stop = (scanLineMin - _data->minY) / _data->linesInBuffer - 1; - dl = -1; - } - - // - // Create a task group for all line buffer tasks. When the - // task group goes out of scope, the destructor waits until - // all tasks are complete. - // - - { - TaskGroup taskGroup; - - // - // Add the line buffer tasks. - // - // The tasks will execute in the order that they are created - // because we lock the line buffers during construction and the - // constructors are called by the main thread. Hence, in order - // for a successive task to execute the previous task which - // used that line buffer must have completed already. - // - - for (int l = start; l != stop; l += dl) - { - ThreadPool::addGlobalTask (newLineBufferTask (&taskGroup, - _data, l, - scanLineMin, - scanLineMax)); - } - - // - // finish all tasks - // - } - - // - // Exeption handling: - // - // LineBufferTask::execute() may have encountered exceptions, but - // those exceptions occurred in another thread, not in the thread - // that is executing this call to ScanLineInputFile::readPixels(). - // LineBufferTask::execute() has caught all exceptions and stored - // the exceptions' what() strings in the line buffers. - // Now we check if any line buffer contains a stored exception; if - // this is the case then we re-throw the exception in this thread. - // (It is possible that multiple line buffers contain stored - // exceptions. We re-throw the first exception we find and - // ignore all others.) - // - - const string *exception = 0; - - for (size_t i = 0; i < _data->lineBuffers.size(); ++i) - { - LineBuffer *lineBuffer = _data->lineBuffers[i]; - - if (lineBuffer->hasException && !exception) - exception = &lineBuffer->exception; - - lineBuffer->hasException = false; - } - - if (exception) - throw IEX_NAMESPACE::IoExc (*exception); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error reading pixel data from image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -void -DeepScanLineInputFile::readPixels (int scanLine) -{ - readPixels (scanLine, scanLine); -} - - -void -DeepScanLineInputFile::rawPixelData (int firstScanLine, - char *pixelData, - Int64 &pixelDataSize) -{ - - - int minY = lineBufferMinY - (firstScanLine, _data->minY, _data->linesInBuffer); - int lineBufferNumber = (minY - _data->minY) / _data->linesInBuffer; - - Int64 lineOffset = _data->lineOffsets[lineBufferNumber]; - - if (lineOffset == 0) - THROW (IEX_NAMESPACE::InputExc, "Scan line " << minY << " is missing."); - - - // enter the lock here - prevent another thread reseeking the file during read - Lock lock (*_data->_streamData); - - // - // Seek to the start of the scan line in the file, - // - - if (_data->_streamData->is->tellg() != _data->lineOffsets[lineBufferNumber]) - _data->_streamData->is->seekg (lineOffset); - - // - // Read the data block's header. - // - - int yInFile; - - // - // Read the part number when we are dealing with a multi-part file. - // - - if (isMultiPart(_data->version)) - { - int partNumber; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*_data->_streamData->is, partNumber); - if (partNumber != _data->partNumber) - { - THROW (IEX_NAMESPACE::ArgExc, "Unexpected part number " << partNumber - << ", should be " << _data->partNumber << "."); - } - } - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*_data->_streamData->is, yInFile); - - if (yInFile != minY) - throw IEX_NAMESPACE::InputExc ("Unexpected data block y coordinate."); - - Int64 sampleCountTableSize; - Int64 packedDataSize; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*_data->_streamData->is, sampleCountTableSize); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*_data->_streamData->is, packedDataSize); - - // total requirement for reading all the data - - Int64 totalSizeRequired=28+sampleCountTableSize+packedDataSize; - - bool big_enough = totalSizeRequired<=pixelDataSize; - - pixelDataSize = totalSizeRequired; - - // was the block we were given big enough? - if(!big_enough || pixelData==NULL) - { - // special case: seek stream back to start if we are at the beginning (regular reading pixels assumes it doesn't need to seek - // in single part files) - if(!isMultiPart(_data->version)) - { - if (_data->nextLineBufferMinY == minY) - _data->_streamData->is->seekg (lineOffset); - } - // leave lock here - bail before reading more data - return; - } - - // copy the values we have read into the output block - *(int *) pixelData = yInFile; - *(Int64 *) (pixelData+4) =sampleCountTableSize; - *(Int64 *) (pixelData+12) = packedDataSize; - - // didn't read the unpackedsize - do that now - Xdr::read (*_data->_streamData->is, *(Int64 *) (pixelData+20)); - - // read the actual data - _data->_streamData->is->read(pixelData+28, sampleCountTableSize+packedDataSize); - - // special case: seek stream back to start if we are at the beginning (regular reading pixels assumes it doesn't need to seek - // in single part files) - if(!isMultiPart(_data->version)) - { - if (_data->nextLineBufferMinY == minY) - _data->_streamData->is->seekg (lineOffset); - } - - // leave lock here - -} - -void DeepScanLineInputFile::readPixels (const char* rawPixelData, - const DeepFrameBuffer& frameBuffer, - int scanLine1, - int scanLine2) const -{ - // - // read header from block - already converted from Xdr to native format - // - int data_scanline = *(int *) rawPixelData; - Int64 sampleCountTableDataSize=*(Int64 *) (rawPixelData+4); - Int64 packedDataSize = *(Int64 *) (rawPixelData+12); - Int64 unpackedDataSize = *(Int64 *) (rawPixelData+20); - - - - // - // Uncompress the data, if necessary - // - - - Compressor * decomp = NULL; - const char * uncompressed_data; - Compressor::Format format = Compressor::XDR; - if(packedDataSize header.compression(), - unpackedDataSize, - _data->header); - - decomp->uncompress(rawPixelData+28+sampleCountTableDataSize, - packedDataSize, - data_scanline, uncompressed_data); - format = decomp->format(); - } - else - { - // - // If the line is uncompressed, it's in XDR format, - // regardless of the compressor's output format. - // - - format = Compressor::XDR; - uncompressed_data = rawPixelData+28+sampleCountTableDataSize; - } - - - int yStart, yStop, dy; - - if (_data->lineOrder == INCREASING_Y) - { - yStart = scanLine1; - yStop = scanLine2 + 1; - dy = 1; - } - else - { - yStart = scanLine2; - yStop = scanLine1 - 1; - dy = -1; - } - - - - const char* samplecount_base = frameBuffer.getSampleCountSlice().base; - int samplecount_xstride = frameBuffer.getSampleCountSlice().xStride; - int samplecount_ystride = frameBuffer.getSampleCountSlice().yStride; - - // - // For each line within the block, get the count of bytes. - // - - int minYInLineBuffer = data_scanline; - int maxYInLineBuffer = min(minYInLineBuffer + _data->linesInBuffer - 1, _data->maxY); - - vector bytesPerLine(1+_data->maxY-_data->minY); - - - bytesPerDeepLineTable (_data->header, - minYInLineBuffer, - maxYInLineBuffer, - samplecount_base, - samplecount_xstride, - samplecount_ystride, - bytesPerLine); - - // - // For each scanline within the block, get the offset. - // - - vector offsetInLineBuffer; - offsetInLineBufferTable (bytesPerLine, - minYInLineBuffer - _data->minY, - maxYInLineBuffer - _data->minY, - _data->linesInBuffer, - offsetInLineBuffer); - - - const ChannelList & channels=header().channels(); - - - for (int y = yStart; y != yStop; y += dy) - { - - const char *readPtr =uncompressed_data + - offsetInLineBuffer[y - _data->minY]; - - // - // need to know the total number of samples on a scanline to skip channels - // compute on demand: -1 means uncomputed - // - int lineSampleCount = -1; - - - // - // Iterate over all image channels in frame buffer - // - - - ChannelList::ConstIterator i = channels.begin(); - - for (DeepFrameBuffer::ConstIterator j = frameBuffer.begin(); - j != frameBuffer.end(); - ++j) - { - while (i != channels.end() && strcmp (i.name(), j.name()) < 0) - { - // - // Channel i is present in the file but not - // in the frame buffer; skip - - if(lineSampleCount==-1) - { - lineSampleCount=0; - const char * ptr = (samplecount_base+y*samplecount_ystride + samplecount_xstride*_data->minX); - for(int x=_data->minX;x<=_data->maxX;x++) - { - - lineSampleCount+=*(const unsigned int *) ptr; - ptr+=samplecount_xstride; - } - } - - skipChannel (readPtr, i.channel().type, lineSampleCount ); - - ++i; - } - - bool fill = false; - - if (i == channels.end() || strcmp (i.name(), j.name()) > 0) - { - // - // Channel i is present in the frame buffer, but not in the file. - // In the frame buffer, slice j will be filled with a default value. - // - - fill = true; - } - if (modp (y, i.channel().ySampling) == 0) - { - - copyIntoDeepFrameBuffer (readPtr, j.slice().base, - samplecount_base, - samplecount_xstride, - samplecount_ystride, - y, _data->minX, _data->maxX, - 0, 0, - 0, 0, - j.slice().sampleStride, - j.slice().xStride, - j.slice().yStride, - fill, - j.slice().fillValue, - format, - j.slice().type, - i.channel().type); - - ++i; - - } - }//next slice in framebuffer - }//next row in image - - // - // clean up - // - - delete decomp; -} - - - -void DeepScanLineInputFile::readPixelSampleCounts (const char* rawPixelData, - const DeepFrameBuffer& frameBuffer, - int scanLine1, - int scanLine2) const -{ - // - // read header from block - already converted from Xdr to native format - // - int data_scanline = *(int *) rawPixelData; - Int64 sampleCountTableDataSize=*(Int64 *) (rawPixelData+4); - - - int maxY; - maxY = min(data_scanline + _data->linesInBuffer - 1, _data->maxY); - - if(scanLine1 != data_scanline) - { - THROW(IEX_NAMESPACE::ArgExc,"readPixelSampleCounts(rawPixelData,frameBuffer,"<< scanLine1 << ',' << scanLine2 << ") called with incorrect start scanline - should be " << data_scanline ); - } - - if(scanLine2 != maxY) - { - THROW(IEX_NAMESPACE::ArgExc,"readPixelSampleCounts(rawPixelData,frameBuffer,"<< scanLine1 << ',' << scanLine2 << ") called with incorrect end scanline - should be " << maxY ); - } - - - // - // If the sample count table is compressed, we'll uncompress it. - // - - Int64 rawSampleCountTableSize = (maxY - data_scanline + 1) * (_data->maxX - _data->minX + 1) * - Xdr::size (); - - - Compressor * decomp=NULL; - const char* readPtr; - if (sampleCountTableDataSize < rawSampleCountTableSize) - { - decomp = newCompressor(_data->header.compression(), - rawSampleCountTableSize, - _data->header); - - decomp->uncompress(rawPixelData+28, - sampleCountTableDataSize, - data_scanline, - readPtr); - } - else readPtr = rawPixelData+28; - - char* base = frameBuffer.getSampleCountSlice().base; - int xStride = frameBuffer.getSampleCountSlice().xStride; - int yStride = frameBuffer.getSampleCountSlice().yStride; - - - - for (int y = scanLine1; y <= scanLine2; y++) - { - int lastAccumulatedCount = 0; - for (int x = _data->minX; x <= _data->maxX; x++) - { - int accumulatedCount, count; - - // - // Read the sample count for pixel (x, y). - // - - Xdr::read (readPtr, accumulatedCount); - if (x == _data->minX) - count = accumulatedCount; - else - count = accumulatedCount - lastAccumulatedCount; - lastAccumulatedCount = accumulatedCount; - - // - // Store the data in both internal and external data structure. - // - - sampleCount(base, xStride, yStride, x, y) = count; - } - } - - if(decomp) - { - delete decomp; - } -} - - - -namespace -{ - -void -readSampleCountForLineBlock(InputStreamMutex* streamData, - DeepScanLineInputFile::Data* data, - int lineBlockId) -{ - streamData->is->seekg(data->lineOffsets[lineBlockId]); - - if (isMultiPart(data->version)) - { - int partNumber; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, partNumber); - - if (partNumber != data->partNumber) - throw IEX_NAMESPACE::ArgExc("Unexpected part number."); - } - - int minY; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, minY); - - // - // Check the correctness of minY. - // - - if (minY != data->minY + lineBlockId * data->linesInBuffer) - throw IEX_NAMESPACE::ArgExc("Unexpected data block y coordinate."); - - int maxY; - maxY = min(minY + data->linesInBuffer - 1, data->maxY); - - Int64 sampleCountTableDataSize; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, sampleCountTableDataSize); - - - - if(sampleCountTableDataSize>data->maxSampleCountTableSize) - { - THROW (IEX_NAMESPACE::ArgExc, "Bad sampleCountTableDataSize read from chunk "<< lineBlockId << ": expected " << data->maxSampleCountTableSize << " or less, got "<< sampleCountTableDataSize); - } - - Int64 packedDataSize; - Int64 unpackedDataSize; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, packedDataSize); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, unpackedDataSize); - - - - // - // We make a check on the data size requirements here. - // Whilst we wish to store 64bit sizes on disk, not all the compressors - // have been made to work with such data sizes and are still limited to - // using signed 32 bit (int) for the data size. As such, this version - // insists that we validate that the data size does not exceed the data - // type max limit. - // @TODO refactor the compressor code to ensure full 64-bit support. - // - - int compressorMaxDataSize = std::numeric_limits::max(); - if (sampleCountTableDataSize > Int64(compressorMaxDataSize)) - { - THROW (IEX_NAMESPACE::ArgExc, "This version of the library does not " - << "support the allocation of data with size > " - << compressorMaxDataSize - << " file table size :" << sampleCountTableDataSize << ".\n"); - } - streamData->is->read(data->sampleCountTableBuffer, sampleCountTableDataSize); - - const char* readPtr; - - // - // If the sample count table is compressed, we'll uncompress it. - // - - - if (sampleCountTableDataSize < data->maxSampleCountTableSize) - { - if(!data->sampleCountTableComp) - { - THROW(IEX_NAMESPACE::ArgExc,"Deep scanline data corrupt at chunk " << lineBlockId << " (sampleCountTableDataSize error)"); - } - data->sampleCountTableComp->uncompress(data->sampleCountTableBuffer, - sampleCountTableDataSize, - minY, - readPtr); - } - else readPtr = data->sampleCountTableBuffer; - - char* base = data->sampleCountSliceBase; - int xStride = data->sampleCountXStride; - int yStride = data->sampleCountYStride; - - // total number of samples in block: used to check samplecount table doesn't - // reference more data than exists - - size_t cumulative_total_samples=0; - - for (int y = minY; y <= maxY; y++) - { - int yInDataWindow = y - data->minY; - data->lineSampleCount[yInDataWindow] = 0; - - int lastAccumulatedCount = 0; - for (int x = data->minX; x <= data->maxX; x++) - { - int accumulatedCount, count; - - // - // Read the sample count for pixel (x, y). - // - - Xdr::read (readPtr, accumulatedCount); - - // sample count table should always contain monotonically - // increasing values. - if (accumulatedCount < lastAccumulatedCount) - { - THROW(IEX_NAMESPACE::ArgExc,"Deep scanline sampleCount data corrupt at chunk " << lineBlockId << " (negative sample count detected)"); - } - - count = accumulatedCount - lastAccumulatedCount; - lastAccumulatedCount = accumulatedCount; - - // - // Store the data in both internal and external data structure. - // - - data->sampleCount[yInDataWindow][x - data->minX] = count; - data->lineSampleCount[yInDataWindow] += count; - sampleCount(base, xStride, yStride, x, y) = count; - } - cumulative_total_samples+=data->lineSampleCount[yInDataWindow]; - if(cumulative_total_samples*data->combinedSampleSize > unpackedDataSize) - { - THROW(IEX_NAMESPACE::ArgExc,"Deep scanline sampleCount data corrupt at chunk " << lineBlockId << ": pixel data only contains " << unpackedDataSize - << " bytes of data but table references at least " << cumulative_total_samples*data->combinedSampleSize << " bytes of sample data" ); - } - data->gotSampleCount[y - data->minY] = true; - } -} - - -void -fillSampleCountFromCache(int y, DeepScanLineInputFile::Data* data) -{ - int yInDataWindow = y - data->minY; - char* base = data->sampleCountSliceBase; - int xStride = data->sampleCountXStride; - int yStride = data->sampleCountYStride; - - for (int x = data->minX; x <= data->maxX; x++) - { - unsigned int count = data->sampleCount[yInDataWindow][x - data->minX]; - sampleCount(base, xStride, yStride, x, y) = count; - } -} - -} // namespace - -void -DeepScanLineInputFile::readPixelSampleCounts (int scanline1, int scanline2) -{ - Int64 savedFilePos = 0; - - if(!_data->frameBufferValid) - { - throw IEX_NAMESPACE::ArgExc("readPixelSampleCounts called with no valid frame buffer"); - } - - try - { - Lock lock (*_data->_streamData); - - savedFilePos = _data->_streamData->is->tellg(); - - int scanLineMin = min (scanline1, scanline2); - int scanLineMax = max (scanline1, scanline2); - - if (scanLineMin < _data->minY || scanLineMax > _data->maxY) - throw IEX_NAMESPACE::ArgExc ("Tried to read scan line sample counts outside " - "the image file's data window."); - - for (int i = scanLineMin; i <= scanLineMax; i++) - { - // - // if scanline is already read, it'll be in the cache - // otherwise, read from file, store in cache and in caller's framebuffer - // - if (_data->gotSampleCount[i - _data->minY]) - { - fillSampleCountFromCache(i,_data); - - }else{ - - int lineBlockId = ( i - _data->minY ) / _data->linesInBuffer; - - readSampleCountForLineBlock ( _data->_streamData, _data, lineBlockId ); - - int minYInLineBuffer = lineBlockId * _data->linesInBuffer + _data->minY; - int maxYInLineBuffer = min ( minYInLineBuffer + _data->linesInBuffer - 1, _data->maxY ); - - // - // For each line within the block, get the count of bytes. - // - - bytesPerDeepLineTable ( _data->header, - minYInLineBuffer, - maxYInLineBuffer, - _data->sampleCountSliceBase, - _data->sampleCountXStride, - _data->sampleCountYStride, - _data->bytesPerLine ); - - // - // For each scanline within the block, get the offset. - // - - offsetInLineBufferTable ( _data->bytesPerLine, - minYInLineBuffer - _data->minY, - maxYInLineBuffer - _data->minY, - _data->linesInBuffer, - _data->offsetInLineBuffer ); - } - } - - _data->_streamData->is->seekg(savedFilePos); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error reading sample count data from image " - "file \"" << fileName() << "\". " << e); - - _data->_streamData->is->seekg(savedFilePos); - - throw; - } -} - -void -DeepScanLineInputFile::readPixelSampleCounts(int scanline) -{ - readPixelSampleCounts(scanline, scanline); -} - -int -DeepScanLineInputFile::firstScanLineInChunk(int y) const -{ - return int((y-_data->minY)/_data->linesInBuffer)*_data->linesInBuffer + _data->minY; -} - -int -DeepScanLineInputFile::lastScanLineInChunk(int y) const -{ - int minY = firstScanLineInChunk(y); - return min(minY+_data->linesInBuffer-1,_data->maxY); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.h deleted file mode 100644 index 87a4065..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.h +++ /dev/null @@ -1,276 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_DEEP_SCAN_LINE_INPUT_FILE_H -#define INCLUDED_IMF_DEEP_SCAN_LINE_INPUT_FILE_H - -//----------------------------------------------------------------------------- -// -// class DeepScanLineInputFile -// -//----------------------------------------------------------------------------- - -#include "ImfThreading.h" -#include "ImfGenericInputFile.h" -#include "ImfNamespace.h" -#include "ImfForward.h" -#include "ImfExport.h" -#include "ImfDeepScanLineOutputFile.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT DeepScanLineInputFile : public GenericInputFile -{ - public: - - //------------ - // Constructor - //------------ - - DeepScanLineInputFile (const char fileName[], - int numThreads = globalThreadCount()); - - DeepScanLineInputFile (const Header &header, OPENEXR_IMF_INTERNAL_NAMESPACE::IStream *is, - int version, /*version field from file*/ - int numThreads = globalThreadCount()); - - - //----------------------------------------- - // Destructor -- deallocates internal data - // structures, but does not close the file. - //----------------------------------------- - - virtual ~DeepScanLineInputFile (); - - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //---------------------------------- - // Access to the file format version - //---------------------------------- - - int version () const; - - - //----------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the InputFile object. - // - // The current frame buffer is the destination for the pixel - // data read from the file. The current frame buffer must be - // set at least once before readPixels() is called. - // The current frame buffer can be changed after each call - // to readPixels(). - //----------------------------------------------------------- - - void setFrameBuffer (const DeepFrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const DeepFrameBuffer & frameBuffer () const; - - - //--------------------------------------------------------------- - // Check if the file is complete: - // - // isComplete() returns true if all pixels in the data window are - // present in the input file, or false if any pixels are missing. - // (Another program may still be busy writing the file, or file - // writing may have been aborted prematurely.) - //--------------------------------------------------------------- - - bool isComplete () const; - - - //--------------------------------------------------------------- - // Read pixel data: - // - // readPixels(s1,s2) reads all scan lines with y coordinates - // in the interval [min (s1, s2), max (s1, s2)] from the file, - // and stores them in the current frame buffer. - // - // Both s1 and s2 must be within the interval - // [header().dataWindow().min.y, header.dataWindow().max.y] - // - // The scan lines can be read from the file in random order, and - // individual scan lines may be skipped or read multiple times. - // For maximum efficiency, the scan lines should be read in the - // order in which they were written to the file. - // - // readPixels(s) calls readPixels(s,s). - // - // If threading is enabled, readPixels (s1, s2) tries to perform - // decopmression of multiple scanlines in parallel. - // - //--------------------------------------------------------------- - - void readPixels (int scanLine1, int scanLine2); - void readPixels (int scanLine); - - - - //--------------------------------------------------------------- - // Extract pixel data from pre-read block - // - // readPixels(rawPixelData,frameBuffer,s1,s2) reads all scan lines with y coordinates - // in the interval [min (s1, s2), max (s1, s2)] from the data provided and - // stores them in the provided frameBuffer. - // the data can be obtained from a call to rawPixelData() - // - // - // Both s1 and s2 must be within the data specified - // - // you must provide a frameBuffer with a samplecountslice, which must have been read - // and the data valid - readPixels uses your sample count buffer to compute - // offsets to the data it needs - // - // This call does not block, and is thread safe for clients with an existing - // threading model. The InputFile's frameBuffer is not used in this call. - // - // This call is only provided for clients which have an existing threading model in place - // and unpredictable access patterns to the data. - // The fastest way to read an entire image is to enable threading,use setFrameBuffer then - // readPixels(header().dataWindow().min.y, header.dataWindow().max.y) - // - //--------------------------------------------------------------- - - void readPixels (const char * rawPixelData, - const DeepFrameBuffer & frameBuffer, - int scanLine1, - int scanLine2) const; - - //---------------------------------------------- - // Read a block of raw pixel data from the file, - // without uncompressing it (this function is - // used to implement OutputFile::copyPixels()). - // note: returns the entire payload of the relevant chunk of data, not including part number - // including compressed and uncompressed sizes - // on entry, if pixelDataSize is insufficiently large, no bytes are read (pixelData can safely be NULL) - // on exit, pixelDataSize is the number of bytes required to read the chunk - // - //---------------------------------------------- - - void rawPixelData (int firstScanLine, - char * pixelData, - Int64 &pixelDataSize); - - - //------------------------------------------------- - // firstScanLineInChunk() returns the row number of the first row that's stored in the - // same chunk as scanline y. Depending on the compression mode, this may not be the same as y - // - // lastScanLineInChunk() returns the row number of the last row that's stored in the same - // chunk as scanline y. Depending on the compression mode, this may not be the same as y. - // The last chunk in the file may be smaller than all the others - // - //------------------------------------------------ - int firstScanLineInChunk(int y) const; - int lastScanLineInChunk (int y) const; - - //----------------------------------------------------------- - // Read pixel sample counts into a slice in the frame buffer. - // - // readPixelSampleCounts(s1, s2) reads all the counts of - // pixel samples with y coordinates in the interval - // [min (s1, s2), max (s1, s2)] from the file, and stores - // them in the slice naming "sample count". - // - // Both s1 and s2 must be within the interval - // [header().dataWindow().min.y, header.dataWindow().max.y] - // - // readPixelSampleCounts(s) calls readPixelSampleCounts(s,s). - // - //----------------------------------------------------------- - - void readPixelSampleCounts (int scanline1, - int scanline2); - void readPixelSampleCounts (int scanline); - - - //---------------------------------------------------------- - // Read pixel sample counts into the provided frameBuffer - // using a block read of data read by rawPixelData - // for multi-scanline compression schemes, you must decode the entire block - // so scanline1=firstScanLineInChunk(y) and scanline2=lastScanLineInChunk(y) - // - // This call does not block, and is thread safe for clients with an existing - // threading model. The InputFile's frameBuffer is not used in this call. - // - // The fastest way to read an entire image is to enable threading in OpenEXR, use setFrameBuffer then - // readPixelSampleCounts(header().dataWindow().min.y, header.dataWindow().max.y) - // - //---------------------------------------------------------- - void readPixelSampleCounts (const char * rawdata , - const DeepFrameBuffer & frameBuffer, - int scanLine1 , - int scanLine2) const; - - struct Data; - - private: - - Data * _data; - - DeepScanLineInputFile (InputPartData* part); - - void initialize(const Header& header); - void compatibilityInitialize(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream & is); - void multiPartInitialize(InputPartData* part); - - friend class InputFile; - friend class MultiPartInputFile; - friend void DeepScanLineOutputFile::copyPixels(DeepScanLineInputFile &); -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.cpp deleted file mode 100644 index 068e1d4..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#include "ImfDeepScanLineInputPart.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -DeepScanLineInputPart::DeepScanLineInputPart(MultiPartInputFile& multiPartFile, int partNumber) -{ - file = multiPartFile.getInputPart(partNumber); -} - - -const char * -DeepScanLineInputPart::fileName () const -{ - return file->fileName(); -} - - -const Header & -DeepScanLineInputPart::header () const -{ - return file->header(); -} - - -int -DeepScanLineInputPart::version () const -{ - return file->version(); -} - - -void -DeepScanLineInputPart::setFrameBuffer (const DeepFrameBuffer &frameBuffer) -{ - file->setFrameBuffer(frameBuffer); -} - - -const DeepFrameBuffer & -DeepScanLineInputPart::frameBuffer () const -{ - return file->frameBuffer(); -} - - -bool -DeepScanLineInputPart::isComplete () const -{ - return file->isComplete(); -} - - -void -DeepScanLineInputPart::readPixels (int scanLine1, int scanLine2) -{ - file->readPixels(scanLine1, scanLine2); -} - - -void -DeepScanLineInputPart::readPixels (int scanLine) -{ - file->readPixels(scanLine); -} - - -void -DeepScanLineInputPart::rawPixelData (int firstScanLine, - char *pixelData, - Int64 &pixelDataSize) -{ - file->rawPixelData(firstScanLine, pixelData, pixelDataSize); -} - - -void -DeepScanLineInputPart::readPixelSampleCounts(int scanline1, - int scanline2) -{ - file->readPixelSampleCounts(scanline1, scanline2); -} - - -void -DeepScanLineInputPart::readPixelSampleCounts(int scanline) -{ - file->readPixelSampleCounts(scanline); -} - -int -DeepScanLineInputPart::firstScanLineInChunk(int y) const -{ - return file->firstScanLineInChunk(y); -} - -int -DeepScanLineInputPart::lastScanLineInChunk(int y) const -{ - return file->lastScanLineInChunk(y); -} - -void -DeepScanLineInputPart::readPixels(const char* rawPixelData, const DeepFrameBuffer& frameBuffer, int scanLine1, int scanLine2) const -{ - return file->readPixels(rawPixelData,frameBuffer,scanLine1,scanLine2); -} -void -DeepScanLineInputPart::readPixelSampleCounts(const char* rawdata, const DeepFrameBuffer& frameBuffer, int scanLine1, int scanLine2) const -{ - return file->readPixelSampleCounts(rawdata,frameBuffer,scanLine1,scanLine2); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.h deleted file mode 100644 index c21786b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.h +++ /dev/null @@ -1,181 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef IMFDEEPSCANLINEINPUTPART_H_ -#define IMFDEEPSCANLINEINPUTPART_H_ - -#include "ImfMultiPartInputFile.h" -#include "ImfDeepScanLineInputFile.h" -#include "ImfDeepScanLineOutputFile.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -class IMF_EXPORT DeepScanLineInputPart -{ - public: - - DeepScanLineInputPart(MultiPartInputFile& file, int partNumber); - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //---------------------------------- - // Access to the file format version - //---------------------------------- - - int version () const; - - - //----------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the InputFile object. - // - // The current frame buffer is the destination for the pixel - // data read from the file. The current frame buffer must be - // set at least once before readPixels() is called. - // The current frame buffer can be changed after each call - // to readPixels(). - //----------------------------------------------------------- - - void setFrameBuffer (const DeepFrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const DeepFrameBuffer & frameBuffer () const; - - - //--------------------------------------------------------------- - // Check if the file is complete: - // - // isComplete() returns true if all pixels in the data window are - // present in the input file, or false if any pixels are missing. - // (Another program may still be busy writing the file, or file - // writing may have been aborted prematurely.) - //--------------------------------------------------------------- - - bool isComplete () const; - - - //--------------------------------------------------------------- - // Read pixel data: - // - // readPixels(s1,s2) reads all scan lines with y coordinates - // in the interval [min (s1, s2), max (s1, s2)] from the file, - // and stores them in the current frame buffer. - // - // Both s1 and s2 must be within the interval - // [header().dataWindow().min.y, header.dataWindow().max.y] - // - // The scan lines can be read from the file in random order, and - // individual scan lines may be skipped or read multiple times. - // For maximum efficiency, the scan lines should be read in the - // order in which they were written to the file. - // - // readPixels(s) calls readPixels(s,s). - // - // If threading is enabled, readPixels (s1, s2) tries to perform - // decopmression of multiple scanlines in parallel. - // - //--------------------------------------------------------------- - - void readPixels (int scanLine1, int scanLine2); - void readPixels (int scanLine); - void readPixels (const char * rawPixelData,const DeepFrameBuffer & frameBuffer, - int scanLine1,int scanLine2) const; - - //---------------------------------------------- - // Read a block of raw pixel data from the file, - // without uncompressing it (this function is - // used to implement OutputFile::copyPixels()). - //---------------------------------------------- - - void rawPixelData (int firstScanLine, - char * pixelData, - Int64 &pixelDataSize); - - - //----------------------------------------------------------- - // Read pixel sample counts into a slice in the frame buffer. - // - // readPixelSampleCounts(s1, s2) reads all the counts of - // pixel samples with y coordinates in the interval - // [min (s1, s2), max (s1, s2)] from the file, and stores - // them in the slice naming "sample count". - // - // Both s1 and s2 must be within the interval - // [header().dataWindow().min.y, header.dataWindow().max.y] - // - // readPixelSampleCounts(s) calls readPixelSampleCounts(s,s). - //----------------------------------------------------------- - - void readPixelSampleCounts(int scanline1, - int scanline2); - void readPixelSampleCounts(int scanline); - - void readPixelSampleCounts( const char * rawdata , const DeepFrameBuffer & frameBuffer, - int scanLine1 , int scanLine2) const; - - int firstScanLineInChunk(int y) const; - int lastScanLineInChunk (int y) const; - private: - DeepScanLineInputFile *file; - - // needed for copyPixels - friend void DeepScanLineOutputFile::copyPixels(DeepScanLineInputPart &); -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif /* IMFDEEPSCANLINEINPUTPART_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.cpp deleted file mode 100644 index ebee084..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.cpp +++ /dev/null @@ -1,1552 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class DeepScanLineOutputFile -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include -#include -#include -#include -#include "ImathBox.h" -#include "ImathFun.h" -#include -#include -#include -#include -#include "ImfDeepFrameBuffer.h" -#include "ImfOutputStreamMutex.h" -#include "ImfOutputPartData.h" - -#include "IlmThreadPool.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" -#include "Iex.h" -#include -#include -#include -#include -#include - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::divp; -using IMATH_NAMESPACE::modp; -using std::string; -using std::vector; -using std::ofstream; -using std::min; -using std::max; -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; -using ILMTHREAD_NAMESPACE::Semaphore; -using ILMTHREAD_NAMESPACE::Task; -using ILMTHREAD_NAMESPACE::TaskGroup; -using ILMTHREAD_NAMESPACE::ThreadPool; - -namespace { - - -struct OutSliceInfo -{ - PixelType type; - const char * base; - ptrdiff_t sampleStride; - ptrdiff_t xStride; - ptrdiff_t yStride; - int xSampling; - int ySampling; - bool zero; - - OutSliceInfo (PixelType type = HALF, - const char * base =NULL, - ptrdiff_t sampleStride = 0, - ptrdiff_t xStride = 0, - ptrdiff_t yStride =0, - int xSampling = 1, - int ySampling = 1, - bool zero = false); -}; - - -OutSliceInfo::OutSliceInfo (PixelType t, - const char * base, - ptrdiff_t spstride, - ptrdiff_t xst, - ptrdiff_t yst, - int xsm, int ysm, - bool z) -: - type (t), - base (base), - sampleStride (spstride), - xStride(xst), - yStride(yst), - xSampling (xsm), - ySampling (ysm), - zero (z) -{ - // empty -} - - -struct LineBuffer -{ - Array< Array > buffer; - Array consecutiveBuffer; - const char * dataPtr; - Int64 uncompressedDataSize; - Int64 dataSize; - Array sampleCountTableBuffer; - const char * sampleCountTablePtr; - Int64 sampleCountTableSize; - Compressor* sampleCountTableCompressor; - int minY; // the min y scanline stored - int maxY; // the max y scanline stored - int scanLineMin; // the min y scanline writing out - int scanLineMax; // the max y scanline writing out - Compressor * compressor; - bool partiallyFull; // has incomplete data - bool hasException; - string exception; - - LineBuffer (int linesInBuffer); - ~LineBuffer (); - - void wait () {_sem.wait();} - void post () {_sem.post();} - - private: - - Semaphore _sem; -}; - - -LineBuffer::LineBuffer (int linesInBuffer) : - dataPtr (0), - dataSize (0), - sampleCountTablePtr (0), - sampleCountTableCompressor (0), - compressor (0), - partiallyFull (false), - hasException (false), - exception (), - _sem (1) -{ - buffer.resizeErase(linesInBuffer); -} - - -LineBuffer::~LineBuffer () -{ - if (compressor != 0) - delete compressor; - - if (sampleCountTableCompressor != 0) - delete sampleCountTableCompressor; -} - -} // namespace - - -struct DeepScanLineOutputFile::Data -{ - Header header; // the image header - int version; // file format version - bool multipart; // from a multipart file - Int64 previewPosition; // file position for preview - DeepFrameBuffer frameBuffer; // framebuffer to write into - int currentScanLine; // next scanline to be written - int missingScanLines; // number of lines to write - LineOrder lineOrder; // the file's lineorder - int minX; // data window's min x coord - int maxX; // data window's max x coord - int minY; // data window's min y coord - int maxY; // data window's max x coord - vector lineOffsets; // stores offsets in file for - // each scanline - vector bytesPerLine; // combined size of a line over - // all channels - Compressor::Format format; // compressor's data format - vector slices; // info about channels in file - Int64 lineOffsetsPosition; // file position for line - // offset table - - vector lineBuffers; // each holds one line buffer - int linesInBuffer; // number of scanlines each - // buffer holds - int partNumber; // the output part number - - char* sampleCountSliceBase; // the pointer to the number - // of samples in each pixel - int sampleCountXStride; // the x stride for sampleCountSliceBase - int sampleCountYStride; // the y stride for sampleCountSliceBase - - Array lineSampleCount; // the number of samples - // in each line - - Int64 maxSampleCountTableSize; - // the max size in bytes for a pixel - // sample count table - OutputStreamMutex* _streamData; - bool _deleteStream; - - Data (int numThreads); - ~Data (); - - - inline LineBuffer * getLineBuffer (int number);// hash function from line - // buffer indices into our - // vector of line buffers - - inline int& getSampleCount(int x, int y); // get the number of samples - // in each pixel -}; - - -DeepScanLineOutputFile::Data::Data (int numThreads): - lineOffsetsPosition (0), - partNumber (-1) , - _streamData(NULL), - _deleteStream(false) -{ - // - // We need at least one lineBuffer, but if threading is used, - // to keep n threads busy we need 2*n lineBuffers. - // - - lineBuffers.resize (max (1, 2 * numThreads)); - for (size_t i = 0; i < lineBuffers.size(); i++) - lineBuffers[i] = 0; -} - - -DeepScanLineOutputFile::Data::~Data () -{ - for (size_t i = 0; i < lineBuffers.size(); i++) - if (lineBuffers[i] != 0) - delete lineBuffers[i]; - - for (size_t i = 0; i < slices.size(); i++) - delete slices[i]; -} - - -int& -DeepScanLineOutputFile::Data::getSampleCount(int x, int y) -{ - return sampleCount(sampleCountSliceBase, - sampleCountXStride, - sampleCountYStride, - x, y); -} - - -LineBuffer* -DeepScanLineOutputFile::Data::getLineBuffer (int number) -{ - return lineBuffers[number % lineBuffers.size()]; -} - - -namespace { - -Int64 -writeLineOffsets (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, const vector &lineOffsets) -{ - Int64 pos = os.tellp(); - - if (pos == -1) - IEX_NAMESPACE::throwErrnoExc ("Cannot determine current file position (%T)."); - - for (unsigned int i = 0; i < lineOffsets.size(); i++) - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (os, lineOffsets[i]); - - return pos; -} - - -void -writePixelData (OutputStreamMutex *filedata, - DeepScanLineOutputFile::Data *partdata, - int lineBufferMinY, - const char pixelData[], - Int64 packedDataSize, - Int64 unpackedDataSize, - const char sampleCountTableData[], - Int64 sampleCountTableSize) -{ - // - // Store a block of pixel data in the output file, and try - // to keep track of the current writing position the file - // without calling tellp() (tellp() can be fairly expensive). - // - - Int64 currentPosition = filedata->currentPosition; - filedata->currentPosition = 0; - - if (currentPosition == 0) - currentPosition = filedata->os->tellp(); - - partdata->lineOffsets[(partdata->currentScanLine - partdata->minY) / partdata->linesInBuffer] = - currentPosition; - - #ifdef DEBUG - - assert (filedata->os->tellp() == currentPosition); - - #endif - - // - // Write the optional part number. - // - - if (partdata->multipart) - { - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (*filedata->os, partdata->partNumber); - } - - // - // Write the y coordinate of the first scanline in the chunk. - // - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (*filedata->os, lineBufferMinY); - - // - // Write the packed size of the pixel sample count table. - // - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (*filedata->os, sampleCountTableSize); - - // - // Write the packed pixel data size. - // - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (*filedata->os, packedDataSize); - - // - // Write the unpacked pixel data size. - // - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (*filedata->os, unpackedDataSize); - - // - // Write the packed pixel sample count table. - // - - filedata->os->write (sampleCountTableData, sampleCountTableSize); - - // - // Write the compressed data. - // - - filedata->os->write (pixelData, packedDataSize); - - // - // Update stream position. - // - - filedata->currentPosition = currentPosition + - Xdr::size() + // y coordinate - Xdr::size() + // packed sample count table size - Xdr::size() + // packed data size - Xdr::size() + // unpacked data size - sampleCountTableSize + // pixel sample count table - packedDataSize; // pixel data - - if (partdata->multipart) - { - filedata->currentPosition += Xdr::size(); // optional part number - } -} - - -inline void -writePixelData (OutputStreamMutex* filedata, - DeepScanLineOutputFile::Data *partdata, - const LineBuffer *lineBuffer) -{ - writePixelData (filedata, partdata, - lineBuffer->minY, - lineBuffer->dataPtr, - lineBuffer->dataSize, - lineBuffer->uncompressedDataSize, - lineBuffer->sampleCountTablePtr, - lineBuffer->sampleCountTableSize); -} - - -void -convertToXdr (DeepScanLineOutputFile::Data *ofd, - Array &lineBuffer, - int lineBufferMinY, - int lineBufferMaxY, - int inSize) -{ - // - // Convert the contents of a lineBuffer from the machine's native - // representation to Xdr format. This function is called by - // CompressLineBuffer::execute(), below, if the compressor wanted - // its input pixel data in the machine's native format, but then - // failed to compress the data (most compressors will expand rather - // than compress random input data). - // - // Note that this routine assumes that the machine's native - // representation of the pixel data has the same size as the - // Xdr representation. This makes it possible to convert the - // pixel data in place, without an intermediate temporary buffer. - // - - // - // Iterate over all scanlines in the lineBuffer to convert. - // - - char* writePtr = &lineBuffer[0]; - for (int y = lineBufferMinY; y <= lineBufferMaxY; y++) - { - // - // Set these to point to the start of line y. - // We will write to writePtr from readPtr. - // - - const char *readPtr = writePtr; - - // - // Iterate over all slices in the file. - // - - for (unsigned int i = 0; i < ofd->slices.size(); ++i) - { - // - // Test if scan line y of this channel is - // contains any data (the scan line contains - // data only if y % ySampling == 0). - // - - const OutSliceInfo &slice = *ofd->slices[i]; - - if (modp (y, slice.ySampling) != 0) - continue; - - // - // Find the number of sampled pixels, dMaxX-dMinX+1, for - // slice i in scan line y (i.e. pixels within the data window - // for which x % xSampling == 0). - // - - int xSampleCount = ofd->lineSampleCount[y - ofd->minY]; - - // - // Convert the samples in place. - // - - convertInPlace (writePtr, readPtr, slice.type, xSampleCount); - } - } -} - - -// -// A LineBufferTask encapsulates the task of copying a set of scanlines -// from the user's frame buffer into a LineBuffer object, compressing -// the data if necessary. -// - -class LineBufferTask: public Task -{ - public: - - LineBufferTask (TaskGroup *group, - DeepScanLineOutputFile::Data *ofd, - int number, - int scanLineMin, - int scanLineMax); - - virtual ~LineBufferTask (); - - virtual void execute (); - - private: - - DeepScanLineOutputFile::Data * _ofd; - LineBuffer * _lineBuffer; -}; - - -LineBufferTask::LineBufferTask - (TaskGroup *group, - DeepScanLineOutputFile::Data *ofd, - int number, - int scanLineMin, - int scanLineMax) -: - Task (group), - _ofd (ofd), - _lineBuffer (_ofd->getLineBuffer(number)) -{ - // - // Wait for the lineBuffer to become available - // - - _lineBuffer->wait (); - - // - // Initialize the lineBuffer data if necessary - // - - if (!_lineBuffer->partiallyFull) - { - - _lineBuffer->minY = _ofd->minY + number * _ofd->linesInBuffer; - - _lineBuffer->maxY = min (_lineBuffer->minY + _ofd->linesInBuffer - 1, - _ofd->maxY); - - _lineBuffer->partiallyFull = true; - } - - _lineBuffer->scanLineMin = max (_lineBuffer->minY, scanLineMin); - _lineBuffer->scanLineMax = min (_lineBuffer->maxY, scanLineMax); -} - - -LineBufferTask::~LineBufferTask () -{ - // - // Signal that the line buffer is now free - // - - _lineBuffer->post (); -} - - -void -LineBufferTask::execute () -{ - try - { - // - // First copy the pixel data from the - // frame buffer into the line buffer - // - - int yStart, yStop, dy; - - if (_ofd->lineOrder == INCREASING_Y) - { - yStart = _lineBuffer->scanLineMin; - yStop = _lineBuffer->scanLineMax + 1; - dy = 1; - } - else - { - yStart = _lineBuffer->scanLineMax; - yStop = _lineBuffer->scanLineMin - 1; - dy = -1; - } - - // - // Allocate buffers for scanlines. - // And calculate the sample counts for each line. - // - - bytesPerDeepLineTable (_ofd->header, - _lineBuffer->scanLineMin, - _lineBuffer->scanLineMax, - _ofd->sampleCountSliceBase, - _ofd->sampleCountXStride, - _ofd->sampleCountYStride, - _ofd->bytesPerLine); - for (int i = _lineBuffer->scanLineMin; i <= _lineBuffer->scanLineMax; i++) - { - // (TODO) don't do this all the time. - _lineBuffer->buffer[i - _lineBuffer->minY].resizeErase( - _ofd->bytesPerLine[i - _ofd->minY]); - - for (int j = _ofd->minX; j <= _ofd->maxX; j++) - _ofd->lineSampleCount[i - _ofd->minY] += _ofd->getSampleCount(j, i); - } - - // - // Copy data from frame buffer to line buffer. - // - - int y; - - for (y = yStart; y != yStop; y += dy) - { - // - // Gather one scan line's worth of pixel data and store - // them in _ofd->lineBuffer. - // - - char *writePtr = &_lineBuffer->buffer[y - _lineBuffer->minY][0]; - // - // Iterate over all image channels. - // - - for (unsigned int i = 0; i < _ofd->slices.size(); ++i) - { - // - // Test if scan line y of this channel contains any data - // (the scan line contains data only if y % ySampling == 0). - // - - const OutSliceInfo &slice = *_ofd->slices[i]; - - if (modp (y, slice.ySampling) != 0) - continue; - - // - // Fill the line buffer with with pixel data. - // - - if (slice.zero) - { - // - // The frame buffer contains no data for this channel. - // Store zeroes in _lineBuffer->buffer. - // - - fillChannelWithZeroes (writePtr, _ofd->format, slice.type, - _ofd->lineSampleCount[y - _ofd->minY]); - } - else - { - - copyFromDeepFrameBuffer (writePtr, slice.base, - _ofd->sampleCountSliceBase, - _ofd->sampleCountXStride, - _ofd->sampleCountYStride, - y, _ofd->minX, _ofd->maxX, - 0, 0,//offsets for samplecount - 0, 0,//offsets for data - slice.sampleStride, - slice.xStride, - slice.yStride, - _ofd->format, - slice.type); - } - } - } - - // - // If the next scanline isn't past the bounds of the lineBuffer - // then we have partially filled the linebuffer, - // otherwise the whole linebuffer is filled and then - // we compress the linebuffer and write it out. - // - - if (y >= _lineBuffer->minY && y <= _lineBuffer->maxY) - return; - - // - // Copy all data into a consecutive buffer. - // - - Int64 totalBytes = 0; - Int64 maxBytesPerLine = 0; - for (int i = 0; i < _lineBuffer->maxY - _lineBuffer->minY + 1; i++) - { - totalBytes += _lineBuffer->buffer[i].size(); - if (Int64(_lineBuffer->buffer[i].size()) > maxBytesPerLine) - maxBytesPerLine = _lineBuffer->buffer[i].size(); - } - _lineBuffer->consecutiveBuffer.resizeErase(totalBytes); - - int pos = 0; - for (int i = 0; i < _lineBuffer->maxY - _lineBuffer->minY + 1; i++) - { - memcpy(_lineBuffer->consecutiveBuffer + pos, - &_lineBuffer->buffer[i][0], - _lineBuffer->buffer[i].size()); - pos += _lineBuffer->buffer[i].size(); - } - - _lineBuffer->dataPtr = _lineBuffer->consecutiveBuffer; - - _lineBuffer->dataSize = totalBytes; - _lineBuffer->uncompressedDataSize = _lineBuffer->dataSize; - - // - // Compress the pixel sample count table. - // - - char* ptr = _lineBuffer->sampleCountTableBuffer; - Int64 tableDataSize = 0; - for (int i = _lineBuffer->minY; i <= _lineBuffer->maxY; i++) - { - int count = 0; - for (int j = _ofd->minX; j <= _ofd->maxX; j++) - { - count += _ofd->getSampleCount(j, i); - Xdr::write (ptr, count); - tableDataSize += sizeof (int); - } - } - - if(_lineBuffer->sampleCountTableCompressor) - { - _lineBuffer->sampleCountTableSize = - _lineBuffer->sampleCountTableCompressor->compress ( - _lineBuffer->sampleCountTableBuffer, - tableDataSize, - _lineBuffer->minY, - _lineBuffer->sampleCountTablePtr); - } - - // - // If we can't make data shrink (or we weren't compressing), then just use the raw data. - // - - if (!_lineBuffer->sampleCountTableCompressor || - _lineBuffer->sampleCountTableSize >= tableDataSize) - { - _lineBuffer->sampleCountTableSize = tableDataSize; - _lineBuffer->sampleCountTablePtr = _lineBuffer->sampleCountTableBuffer; - } - - // - // Compress the sample data - // - - // (TODO) don't do this all the time. - if (_lineBuffer->compressor != 0) - delete _lineBuffer->compressor; - _lineBuffer->compressor = newCompressor (_ofd->header.compression(), - maxBytesPerLine, - _ofd->header); - - Compressor *compressor = _lineBuffer->compressor; - - if (compressor) - { - const char *compPtr; - - Int64 compSize = compressor->compress (_lineBuffer->dataPtr, - _lineBuffer->dataSize, - _lineBuffer->minY, compPtr); - - if (compSize < _lineBuffer->dataSize) - { - _lineBuffer->dataSize = compSize; - _lineBuffer->dataPtr = compPtr; - } - else if (_ofd->format == Compressor::NATIVE) - { - // - // The data did not shrink during compression, but - // we cannot write to the file using the machine's - // native format, so we need to convert the lineBuffer - // to Xdr. - // - - convertToXdr (_ofd, _lineBuffer->consecutiveBuffer, _lineBuffer->minY, - _lineBuffer->maxY, _lineBuffer->dataSize); - } - } - - _lineBuffer->partiallyFull = false; - } - catch (std::exception &e) - { - if (!_lineBuffer->hasException) - { - _lineBuffer->exception = e.what (); - _lineBuffer->hasException = true; - } - } - catch (...) - { - if (!_lineBuffer->hasException) - { - _lineBuffer->exception = "unrecognized exception"; - _lineBuffer->hasException = true; - } - } -} - -} // namespace - - -DeepScanLineOutputFile::DeepScanLineOutputFile - (const char fileName[], - const Header &header, - int numThreads) -: - _data (new Data (numThreads)) -{ - _data->_streamData=new OutputStreamMutex (); - _data->_deleteStream=true; - try - { - header.sanityCheck(); - _data->_streamData->os = new StdOFStream (fileName); - initialize (header); - _data->_streamData->currentPosition = _data->_streamData->os->tellp(); - - // Write header and empty offset table to the file. - writeMagicNumberAndVersionField(*_data->_streamData->os, _data->header); - _data->previewPosition = - _data->header.writeTo (*_data->_streamData->os); - _data->lineOffsetsPosition = - writeLineOffsets (*_data->_streamData->os, _data->lineOffsets); - _data->multipart=false;// not multipart; only one header - } - catch (IEX_NAMESPACE::BaseExc &e) - { - delete _data->_streamData; - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - delete _data->_streamData; - delete _data; - throw; - } -} - - -DeepScanLineOutputFile::DeepScanLineOutputFile - (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - int numThreads) -: - _data (new Data (numThreads)) - -{ - _data->_streamData = new OutputStreamMutex (); - _data->_deleteStream = false; - try - { - header.sanityCheck(); - _data->_streamData->os = &os; - initialize (header); - _data->_streamData->currentPosition = _data->_streamData->os->tellp(); - - // Write header and empty offset table to the file. - writeMagicNumberAndVersionField(*_data->_streamData->os, _data->header); - _data->previewPosition = - _data->header.writeTo (*_data->_streamData->os); - _data->lineOffsetsPosition = - writeLineOffsets (*_data->_streamData->os, _data->lineOffsets); - _data->multipart=false; - } - catch (IEX_NAMESPACE::BaseExc &e) - { - delete _data->_streamData; - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << os.fileName() << "\". " << e); - throw; - } - catch (...) - { - delete _data->_streamData; - delete _data; - throw; - } -} - -DeepScanLineOutputFile::DeepScanLineOutputFile(const OutputPartData* part) -{ - try - { - if (part->header.type() != DEEPSCANLINE) - throw IEX_NAMESPACE::ArgExc("Can't build a DeepScanLineOutputFile from a type-mismatched part."); - - _data = new Data (part->numThreads); - _data->_streamData = part->mutex; - _data->_deleteStream=false; - initialize (part->header); - _data->partNumber = part->partNumber; - _data->lineOffsetsPosition = part->chunkOffsetTablePosition; - _data->previewPosition = part->previewPosition; - _data->multipart=part->multipart; - } - catch (IEX_NAMESPACE::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot initialize output part " - "\"" << part->partNumber << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - -void -DeepScanLineOutputFile::initialize (const Header &header) -{ - _data->header = header; - - _data->header.setType(DEEPSCANLINE); - - const Box2i &dataWindow = header.dataWindow(); - - _data->currentScanLine = (header.lineOrder() == INCREASING_Y)? - dataWindow.min.y: dataWindow.max.y; - - _data->missingScanLines = dataWindow.max.y - dataWindow.min.y + 1; - _data->lineOrder = header.lineOrder(); - _data->minX = dataWindow.min.x; - _data->maxX = dataWindow.max.x; - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - _data->lineSampleCount.resizeErase(_data->maxY - _data->minY + 1); - - Compressor* compressor = newCompressor (_data->header.compression(), - 0, - _data->header); - _data->format = defaultFormat (compressor); - _data->linesInBuffer = numLinesInBuffer (compressor); - if (compressor != 0) - delete compressor; - - int lineOffsetSize = (_data->maxY - _data->minY + - _data->linesInBuffer) / _data->linesInBuffer; - - - _data->header.setChunkCount(lineOffsetSize); - - _data->lineOffsets.resize (lineOffsetSize); - - _data->bytesPerLine.resize (_data->maxY - _data->minY + 1); - - _data->maxSampleCountTableSize = min(_data->linesInBuffer, _data->maxY - _data->minY + 1) * - (_data->maxX - _data->minX + 1) * - sizeof(unsigned int); - - for (size_t i = 0; i < _data->lineBuffers.size(); ++i) - { - _data->lineBuffers[i] = new LineBuffer (_data->linesInBuffer); - _data->lineBuffers[i]->sampleCountTableBuffer.resizeErase(_data->maxSampleCountTableSize); - - _data->lineBuffers[i]->sampleCountTableCompressor = - newCompressor (_data->header.compression(), - _data->maxSampleCountTableSize, - _data->header); - } -} - - -DeepScanLineOutputFile::~DeepScanLineOutputFile () -{ - { - Lock lock(*_data->_streamData); - Int64 originalPosition = _data->_streamData->os->tellp(); - - if (_data->lineOffsetsPosition > 0) - { - try - { - _data->_streamData->os->seekp (_data->lineOffsetsPosition); - writeLineOffsets (*_data->_streamData->os, _data->lineOffsets); - - // - // Restore the original position. - // - _data->_streamData->os->seekp (originalPosition); - } - catch (...) - { - // - // We cannot safely throw any exceptions from here. - // This destructor may have been called because the - // stack is currently being unwound for another - // exception. - // - } - } - } - - if (_data->_deleteStream) - delete _data->_streamData->os; - - // - // (TODO) we should have a way to tell if the stream data is owned by this file or - // by a parent multipart file. - // - - if (_data->partNumber == -1) - delete _data->_streamData; - - delete _data; -} - - -const char * -DeepScanLineOutputFile::fileName () const -{ - return _data->_streamData->os->fileName(); -} - - -const Header & -DeepScanLineOutputFile::header () const -{ - return _data->header; -} - - -void -DeepScanLineOutputFile::setFrameBuffer (const DeepFrameBuffer &frameBuffer) -{ - Lock lock (*_data->_streamData); - - // - // Check if the new frame buffer descriptor - // is compatible with the image file header. - // - - const ChannelList &channels = _data->header.channels(); - - for (ChannelList::ConstIterator i = channels.begin(); - i != channels.end(); - ++i) - { - DeepFrameBuffer::ConstIterator j = frameBuffer.find (i.name()); - - if (j == frameBuffer.end()) - continue; - - if (i.channel().type != j.slice().type) - { - THROW (IEX_NAMESPACE::ArgExc, "Pixel type of \"" << i.name() << "\" channel " - "of output file \"" << fileName() << "\" is " - "not compatible with the frame buffer's " - "pixel type."); - } - - if (i.channel().xSampling != j.slice().xSampling || - i.channel().ySampling != j.slice().ySampling) - { - THROW (IEX_NAMESPACE::ArgExc, "X and/or y subsampling factors " - "of \"" << i.name() << "\" channel " - "of output file \"" << fileName() << "\" are " - "not compatible with the frame buffer's " - "subsampling factors."); - } - } - - // - // Store the pixel sample count table. - // (TODO) Support for different sampling rates? - // - - const Slice& sampleCountSlice = frameBuffer.getSampleCountSlice(); - if (sampleCountSlice.base == 0) - { - throw IEX_NAMESPACE::ArgExc ("Invalid base pointer, please set a proper sample count slice."); - } - else - { - _data->sampleCountSliceBase = sampleCountSlice.base; - _data->sampleCountXStride = sampleCountSlice.xStride; - _data->sampleCountYStride = sampleCountSlice.yStride; - } - - // - // Initialize slice table for writePixels(). - // Pixel sample count slice is not presented in the header, - // so it wouldn't be added here. - // Store the pixel base pointer table. - // (TODO) Support for different sampling rates? - // - - vector slices; - - for (ChannelList::ConstIterator i = channels.begin(); - i != channels.end(); - ++i) - { - DeepFrameBuffer::ConstIterator j = frameBuffer.find (i.name()); - - if (j == frameBuffer.end()) - { - // - // Channel i is not present in the frame buffer. - // In the file, channel i will contain only zeroes. - // - - slices.push_back (new OutSliceInfo (i.channel().type, - NULL,// base - 0,// sampleStride, - 0,// xStride - 0,// yStride - i.channel().xSampling, - i.channel().ySampling, - true)); // zero - } - else - { - // - // Channel i is present in the frame buffer. - // - - slices.push_back (new OutSliceInfo (j.slice().type, - j.slice().base, - j.slice().sampleStride, - j.slice().xStride, - j.slice().yStride, - j.slice().xSampling, - j.slice().ySampling, - false)); // zero - - } - } - - // - // Store the new frame buffer. - // - - _data->frameBuffer = frameBuffer; - - for (size_t i = 0; i < _data->slices.size(); i++) - delete _data->slices[i]; - _data->slices = slices; -} - - -const DeepFrameBuffer & -DeepScanLineOutputFile::frameBuffer () const -{ - Lock lock (*_data->_streamData); - return _data->frameBuffer; -} - - -void -DeepScanLineOutputFile::writePixels (int numScanLines) -{ - try - { - Lock lock (*_data->_streamData); - - if (_data->slices.size() == 0) - throw IEX_NAMESPACE::ArgExc ("No frame buffer specified " - "as pixel data source."); - - // - // Maintain two iterators: - // nextWriteBuffer: next linebuffer to be written to the file - // nextCompressBuffer: next linebuffer to compress - // - - int first = (_data->currentScanLine - _data->minY) / - _data->linesInBuffer; - - int nextWriteBuffer = first; - int nextCompressBuffer; - int stop; - int step; - int scanLineMin; - int scanLineMax; - - { - // - // Create a task group for all line buffer tasks. When the - // taskgroup goes out of scope, the destructor waits until - // all tasks are complete. - // - - TaskGroup taskGroup; - - // - // Determine the range of lineBuffers that intersect the scan - // line range. Then add the initial compression tasks to the - // thread pool. We always add in at least one task but the - // individual task might not do anything if numScanLines == 0. - // - - if (_data->lineOrder == INCREASING_Y) - { - int last = (_data->currentScanLine + (numScanLines - 1) - - _data->minY) / _data->linesInBuffer; - - scanLineMin = _data->currentScanLine; - scanLineMax = _data->currentScanLine + numScanLines - 1; - - int numTasks = max (min ((int)_data->lineBuffers.size(), - last - first + 1), - 1); - - for (int i = 0; i < numTasks; i++) - { - ThreadPool::addGlobalTask - (new LineBufferTask (&taskGroup, _data, first + i, - scanLineMin, scanLineMax)); - } - - nextCompressBuffer = first + numTasks; - stop = last + 1; - step = 1; - } - else - { - int last = (_data->currentScanLine - (numScanLines - 1) - - _data->minY) / _data->linesInBuffer; - - scanLineMax = _data->currentScanLine; - scanLineMin = _data->currentScanLine - numScanLines + 1; - - int numTasks = max (min ((int)_data->lineBuffers.size(), - first - last + 1), - 1); - - for (int i = 0; i < numTasks; i++) - { - ThreadPool::addGlobalTask - (new LineBufferTask (&taskGroup, _data, first - i, - scanLineMin, scanLineMax)); - } - - nextCompressBuffer = first - numTasks; - stop = last - 1; - step = -1; - } - - while (true) - { - if (_data->missingScanLines <= 0) - { - throw IEX_NAMESPACE::ArgExc ("Tried to write more scan lines " - "than specified by the data window."); - } - - // - // Wait until the next line buffer is ready to be written - // - - LineBuffer *writeBuffer = - _data->getLineBuffer (nextWriteBuffer); - - writeBuffer->wait(); - - int numLines = writeBuffer->scanLineMax - - writeBuffer->scanLineMin + 1; - - _data->missingScanLines -= numLines; - - // - // If the line buffer is only partially full, then it is - // not complete and we cannot write it to disk yet. - // - - if (writeBuffer->partiallyFull) - { - _data->currentScanLine = _data->currentScanLine + - step * numLines; - writeBuffer->post(); - - return; - } - - // - // Write the line buffer - // - - writePixelData (_data->_streamData, _data, writeBuffer); - nextWriteBuffer += step; - - _data->currentScanLine = _data->currentScanLine + - step * numLines; - - #ifdef DEBUG - - assert (_data->currentScanLine == - ((_data->lineOrder == INCREASING_Y) ? - writeBuffer->scanLineMax + 1: - writeBuffer->scanLineMin - 1)); - - #endif - - // - // Release the lock on the line buffer - // - - writeBuffer->post(); - - // - // If this was the last line buffer in the scanline range - // - - if (nextWriteBuffer == stop) - break; - - // - // If there are no more line buffers to compress, - // then only continue to write out remaining lineBuffers - // - - if (nextCompressBuffer == stop) - continue; - - // - // Add nextCompressBuffer as a compression task - // - - ThreadPool::addGlobalTask - (new LineBufferTask (&taskGroup, _data, nextCompressBuffer, - scanLineMin, scanLineMax)); - - // - // Update the next line buffer we need to compress - // - - nextCompressBuffer += step; - } - - // - // Finish all tasks - // - } - - // - // Exeption handling: - // - // LineBufferTask::execute() may have encountered exceptions, but - // those exceptions occurred in another thread, not in the thread - // that is executing this call to OutputFile::writePixels(). - // LineBufferTask::execute() has caught all exceptions and stored - // the exceptions' what() strings in the line buffers. - // Now we check if any line buffer contains a stored exception; if - // this is the case then we re-throw the exception in this thread. - // (It is possible that multiple line buffers contain stored - // exceptions. We re-throw the first exception we find and - // ignore all others.) - // - - const string *exception = 0; - - for (size_t i = 0; i < _data->lineBuffers.size(); ++i) - { - LineBuffer *lineBuffer = _data->lineBuffers[i]; - - if (lineBuffer->hasException && !exception) - exception = &lineBuffer->exception; - - lineBuffer->hasException = false; - } - - if (exception) - throw IEX_NAMESPACE::IoExc (*exception); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Failed to write pixel data to image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -int -DeepScanLineOutputFile::currentScanLine () const -{ - Lock lock (*_data->_streamData); - return _data->currentScanLine; -} - - -void -DeepScanLineOutputFile::copyPixels (DeepScanLineInputPart &in) -{ - copyPixels(*in.file); -} - -void -DeepScanLineOutputFile::copyPixels (DeepScanLineInputFile &in) -{ - - Lock lock (*_data->_streamData); - - // - // Check if this file's and and the InputFile's - // headers are compatible. - // - - const Header &hdr = _data->header; - const Header &inHdr = in.header(); - - if(!inHdr.hasType() || inHdr.type()!=DEEPSCANLINE) - { - THROW (IEX_NAMESPACE::ArgExc, "Cannot copy pixels from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\": the input needs to be a deep scanline image"); - } - if (!(hdr.dataWindow() == inHdr.dataWindow())) - THROW (IEX_NAMESPACE::ArgExc, "Cannot copy pixels from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\". " - "The files have different data windows."); - - if (!(hdr.lineOrder() == inHdr.lineOrder())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files have different line orders."); - - if (!(hdr.compression() == inHdr.compression())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files use different compression methods."); - - if (!(hdr.channels() == inHdr.channels())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files have different channel lists."); - - // - // Verify that no pixel data have been written to this file yet. - // - - const Box2i &dataWindow = hdr.dataWindow(); - - if (_data->missingScanLines != dataWindow.max.y - dataWindow.min.y + 1) - THROW (IEX_NAMESPACE::LogicExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "\"" << fileName() << "\" already contains " - "pixel data."); - - // - // Copy the pixel data. - // - - vector data(4096); - - while (_data->missingScanLines > 0) - { - Int64 dataSize = (Int64) data.size(); - in.rawPixelData(_data->currentScanLine, &data[0], dataSize); - if(dataSize > data.size()) - { - // block wasn't big enough - go again with enough memory this time - data.resize(dataSize); - in.rawPixelData(_data->currentScanLine, &data[0], dataSize); - } - - // extract header from block to pass to writePixelData - - Int64 packedSampleCountSize = *(Int64 *) (&data[4]); - Int64 packedDataSize = *(Int64 *) (&data[12]); - Int64 unpackedDataSize = *(Int64 *) (&data[20]); - const char * sampleCountTable = &data[0]+28; - const char * pixelData = sampleCountTable + packedSampleCountSize; - - - writePixelData (_data->_streamData, _data, lineBufferMinY (_data->currentScanLine, - _data->minY, - _data->linesInBuffer), - pixelData, packedDataSize, unpackedDataSize,sampleCountTable,packedSampleCountSize); - - _data->currentScanLine += (_data->lineOrder == INCREASING_Y)? - _data->linesInBuffer: -_data->linesInBuffer; - - _data->missingScanLines -= _data->linesInBuffer; - } -} - - -void -DeepScanLineOutputFile::updatePreviewImage (const PreviewRgba newPixels[]) -{ - Lock lock (*_data->_streamData); - - if (_data->previewPosition <= 0) - THROW (IEX_NAMESPACE::LogicExc, "Cannot update preview image pixels. " - "File \"" << fileName() << "\" does not " - "contain a preview image."); - - // - // Store the new pixels in the header's preview image attribute. - // - - PreviewImageAttribute &pia = - _data->header.typedAttribute ("preview"); - - PreviewImage &pi = pia.value(); - PreviewRgba *pixels = pi.pixels(); - int numPixels = pi.width() * pi.height(); - - for (int i = 0; i < numPixels; ++i) - pixels[i] = newPixels[i]; - - // - // Save the current file position, jump to the position in - // the file where the preview image starts, store the new - // preview image, and jump back to the saved file position. - // - - Int64 savedPosition = _data->_streamData->os->tellp(); - - try - { - _data->_streamData->os->seekp (_data->previewPosition); - pia.writeValueTo (*_data->_streamData->os, _data->version); - _data->_streamData->os->seekp (savedPosition); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Cannot update preview image pixels for " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.h deleted file mode 100644 index c823d7f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.h +++ /dev/null @@ -1,244 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_DEEP_SCAN_LINE_OUTPUT_FILE_H -#define INCLUDED_IMF_DEEP_SCAN_LINE_OUTPUT_FILE_H - -//----------------------------------------------------------------------------- -// -// class DeepScanLineOutputFile -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfFrameBuffer.h" -#include "ImfThreading.h" -#include "ImfGenericOutputFile.h" -#include "ImfNamespace.h" -#include "ImfForward.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -struct PreviewRgba; - -class IMF_EXPORT DeepScanLineOutputFile : public GenericOutputFile -{ - public: - - //----------------------------------------------------------- - // Constructor -- opens the file and writes the file header. - // The file header is also copied into the DeepScanLineOutputFile - // object, and can later be accessed via the header() method. - // Destroying this DeepScanLineOutputFile object automatically closes - // the file. - // - // numThreads determines the number of threads that will be - // used to write the file (see ImfThreading.h). - //----------------------------------------------------------- - - DeepScanLineOutputFile (const char fileName[], const Header &header, - int numThreads = globalThreadCount()); - - - //------------------------------------------------------------ - // Constructor -- attaches the new DeepScanLineOutputFile object - // to a file that has already been opened, and writes the file header. - // The file header is also copied into the DeepScanLineOutputFile - // object, and can later be accessed via the header() method. - // Destroying this DeepScanLineOutputFile object does not automatically - // close the file. - // - // numThreads determines the number of threads that will be - // used to write the file (see ImfThreading.h). - //------------------------------------------------------------ - - DeepScanLineOutputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, const Header &header, - int numThreads = globalThreadCount()); - - - //------------------------------------------------- - // Destructor - // - // Destroying the DeepScanLineOutputFile object - // before writing all scan lines within the data - // window results in an incomplete file. - //------------------------------------------------- - - virtual ~DeepScanLineOutputFile (); - - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the OutputFile object. - // - // The current frame buffer is the source of the pixel - // data written to the file. The current frame buffer - // must be set at least once before writePixels() is - // called. The current frame buffer can be changed - // after each call to writePixels. - //------------------------------------------------------- - - void setFrameBuffer (const DeepFrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const DeepFrameBuffer & frameBuffer () const; - - - //------------------------------------------------------------------- - // Write pixel data: - // - // writePixels(n) retrieves the next n scan lines worth of data from - // the current frame buffer, starting with the scan line indicated by - // currentScanLine(), and stores the data in the output file, and - // progressing in the direction indicated by header.lineOrder(). - // - // To produce a complete and correct file, exactly m scan lines must - // be written, where m is equal to - // header().dataWindow().max.y - header().dataWindow().min.y + 1. - //------------------------------------------------------------------- - - void writePixels (int numScanLines = 1); - - - //------------------------------------------------------------------ - // Access to the current scan line: - // - // currentScanLine() returns the y coordinate of the first scan line - // that will be read from the current frame buffer during the next - // call to writePixels(). - // - // If header.lineOrder() == INCREASING_Y: - // - // The current scan line before the first call to writePixels() - // is header().dataWindow().min.y. After writing each scan line, - // the current scan line is incremented by 1. - // - // If header.lineOrder() == DECREASING_Y: - // - // The current scan line before the first call to writePixels() - // is header().dataWindow().max.y. After writing each scan line, - // the current scan line is decremented by 1. - // - //------------------------------------------------------------------ - - int currentScanLine () const; - - - //-------------------------------------------------------------- - // Shortcut to copy all pixels from an InputFile into this file, - // without uncompressing and then recompressing the pixel data. - // This file's header must be compatible with the InputFile's - // header: The two header's "dataWindow", "compression", - // "lineOrder" and "channels" attributes must be the same. - //-------------------------------------------------------------- - - void copyPixels (DeepScanLineInputFile &in); - - // -------------------------------------------------------------- - // Shortcut to copy pixels from a given part of a multipart file - // -------------------------------------------------------------- - void copyPixels (DeepScanLineInputPart &in); - - - //-------------------------------------------------------------- - // Updating the preview image: - // - // updatePreviewImage() supplies a new set of pixels for the - // preview image attribute in the file's header. If the header - // does not contain a preview image, updatePreviewImage() throws - // an IEX_NAMESPACE::LogicExc. - // - // Note: updatePreviewImage() is necessary because images are - // often stored in a file incrementally, a few scan lines at a - // time, while the image is being generated. Since the preview - // image is an attribute in the file's header, it gets stored in - // the file as soon as the file is opened, but we may not know - // what the preview image should look like until we have written - // the last scan line of the main image. - // - //-------------------------------------------------------------- - - void updatePreviewImage (const PreviewRgba newPixels[]); - - - struct Data; - - private: - - //------------------------------------------------------------ - // Constructor -- attaches the OutputStreamMutex to the - // given one from MultiPartOutputFile. Set the previewPosition - // and lineOffsetsPosition which have been acquired from - // the constructor of MultiPartOutputFile as well. - //------------------------------------------------------------ - DeepScanLineOutputFile (const OutputPartData* part); - - DeepScanLineOutputFile (const DeepScanLineOutputFile &); // not implemented - DeepScanLineOutputFile & operator = (const DeepScanLineOutputFile &); // not implemented - - void initialize (const Header &header); - void initializeLineBuffer(); - - Data * _data; - - - - friend class MultiPartOutputFile; -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.cpp deleted file mode 100644 index d7a44e8..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfDeepScanLineOutputPart.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -DeepScanLineOutputPart::DeepScanLineOutputPart(MultiPartOutputFile& multiPartFile, int partNumber) -{ - file = multiPartFile.getOutputPart(partNumber); -} - - -const char * -DeepScanLineOutputPart::fileName () const -{ - return file->fileName(); -} - - -const Header & -DeepScanLineOutputPart::header () const -{ - return file->header(); -} - - -void -DeepScanLineOutputPart::setFrameBuffer (const DeepFrameBuffer &frameBuffer) -{ - file->setFrameBuffer(frameBuffer); -} - - -const DeepFrameBuffer & -DeepScanLineOutputPart::frameBuffer () const -{ - return file->frameBuffer(); -} - - -void -DeepScanLineOutputPart::writePixels (int numScanLines) -{ - file->writePixels(numScanLines); -} - - -int -DeepScanLineOutputPart::currentScanLine () const -{ - return file->currentScanLine(); -} - - -void -DeepScanLineOutputPart::copyPixels (DeepScanLineInputFile &in) -{ - file->copyPixels(in); -} - -void -DeepScanLineOutputPart::copyPixels (DeepScanLineInputPart &in) -{ - file->copyPixels(in); -} - -void -DeepScanLineOutputPart::updatePreviewImage (const PreviewRgba newPixels[]) -{ - file->updatePreviewImage(newPixels); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT - diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.h deleted file mode 100644 index 05410f3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.h +++ /dev/null @@ -1,168 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFDEEPSCANLINEOUTPUTPART_H_ -#define IMFDEEPSCANLINEOUTPUTPART_H_ - -#include "ImfDeepScanLineOutputFile.h" -#include "ImfMultiPartOutputFile.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -class IMF_EXPORT DeepScanLineOutputPart -{ - public: - - DeepScanLineOutputPart(MultiPartOutputFile& multiPartFile, int partNumber); - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the OutputFile object. - // - // The current frame buffer is the source of the pixel - // data written to the file. The current frame buffer - // must be set at least once before writePixels() is - // called. The current frame buffer can be changed - // after each call to writePixels. - //------------------------------------------------------- - - void setFrameBuffer (const DeepFrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const DeepFrameBuffer & frameBuffer () const; - - - //------------------------------------------------------------------- - // Write pixel data: - // - // writePixels(n) retrieves the next n scan lines worth of data from - // the current frame buffer, starting with the scan line indicated by - // currentScanLine(), and stores the data in the output file, and - // progressing in the direction indicated by header.lineOrder(). - // - // To produce a complete and correct file, exactly m scan lines must - // be written, where m is equal to - // header().dataWindow().max.y - header().dataWindow().min.y + 1. - //------------------------------------------------------------------- - - void writePixels (int numScanLines = 1); - - - //------------------------------------------------------------------ - // Access to the current scan line: - // - // currentScanLine() returns the y coordinate of the first scan line - // that will be read from the current frame buffer during the next - // call to writePixels(). - // - // If header.lineOrder() == INCREASING_Y: - // - // The current scan line before the first call to writePixels() - // is header().dataWindow().min.y. After writing each scan line, - // the current scan line is incremented by 1. - // - // If header.lineOrder() == DECREASING_Y: - // - // The current scan line before the first call to writePixels() - // is header().dataWindow().max.y. After writing each scan line, - // the current scan line is decremented by 1. - // - //------------------------------------------------------------------ - - int currentScanLine () const; - - - //-------------------------------------------------------------- - // Shortcut to copy all pixels from an InputFile into this file, - // without uncompressing and then recompressing the pixel data. - // This file's header must be compatible with the InputFile's - // header: The two header's "dataWindow", "compression", - // "lineOrder" and "channels" attributes must be the same. - //-------------------------------------------------------------- - - void copyPixels (DeepScanLineInputFile &in); - void copyPixels (DeepScanLineInputPart &in); - - - //-------------------------------------------------------------- - // Updating the preview image: - // - // updatePreviewImage() supplies a new set of pixels for the - // preview image attribute in the file's header. If the header - // does not contain a preview image, updatePreviewImage() throws - // an IEX_NAMESPACE::LogicExc. - // - // Note: updatePreviewImage() is necessary because images are - // often stored in a file incrementally, a few scan lines at a - // time, while the image is being generated. Since the preview - // image is an attribute in the file's header, it gets stored in - // the file as soon as the file is opened, but we may not know - // what the preview image should look like until we have written - // the last scan line of the main image. - // - //-------------------------------------------------------------- - - void updatePreviewImage (const PreviewRgba newPixels[]); - - private: - DeepScanLineOutputFile* file; -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif /* IMFDEEPSCANLINEOUTPUTPART_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.cpp deleted file mode 100644 index 4919620..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.cpp +++ /dev/null @@ -1,1979 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class DeepTiledInputFile -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include -#include -#include -#include -#include "ImathBox.h" -#include -#include -#include -#include -#include -#include -#include -#include "IlmThreadPool.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" -#include "ImfInputStreamMutex.h" -#include "ImfInputPartData.h" -#include "ImathVec.h" -#include "Iex.h" -#include -#include -#include -#include -#include - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::V2i; -using std::string; -using std::vector; -using std::min; -using std::max; -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; -using ILMTHREAD_NAMESPACE::Semaphore; -using ILMTHREAD_NAMESPACE::Task; -using ILMTHREAD_NAMESPACE::TaskGroup; -using ILMTHREAD_NAMESPACE::ThreadPool; - -namespace { - -struct TInSliceInfo -{ - PixelType typeInFrameBuffer; - PixelType typeInFile; - char* pointerArrayBase; - size_t xStride; - size_t yStride; - ptrdiff_t sampleStride; - bool fill; - bool skip; - double fillValue; - int xTileCoords; - int yTileCoords; - - TInSliceInfo (PixelType typeInFrameBuffer = HALF, - char * base = NULL, - PixelType typeInFile = HALF, - size_t xStride = 0, - size_t yStride = 0, - ptrdiff_t sampleStride = 0, - bool fill = false, - bool skip = false, - double fillValue = 0.0, - int xTileCoords = 0, - int yTileCoords = 0); -}; - - -TInSliceInfo::TInSliceInfo (PixelType tifb, - char * b, - PixelType tifl, - size_t xs, size_t ys, - ptrdiff_t spst, - bool f, bool s, - double fv, - int xtc, - int ytc) -: - typeInFrameBuffer (tifb), - typeInFile (tifl), - pointerArrayBase (b), - xStride (xs), - yStride (ys), - sampleStride (spst), - fill (f), - skip (s), - fillValue (fv), - xTileCoords (xtc), - yTileCoords (ytc) -{ - // empty -} - - -struct TileBuffer -{ - Array2D sampleCount; - const char * uncompressedData; - char * buffer; - Int64 dataSize; - Int64 uncompressedDataSize; - Compressor * compressor; - Compressor::Format format; - int dx; - int dy; - int lx; - int ly; - bool hasException; - string exception; - - TileBuffer (); - ~TileBuffer (); - - inline void wait () {_sem.wait();} - inline void post () {_sem.post();} - - protected: - - Semaphore _sem; -}; - - -TileBuffer::TileBuffer (): - uncompressedData (0), - buffer (0), - dataSize (0), - compressor (0), - format (defaultFormat (compressor)), - dx (-1), - dy (-1), - lx (-1), - ly (-1), - hasException (false), - exception (), - _sem (1) -{ - // empty -} - - -TileBuffer::~TileBuffer () -{ - delete compressor; -} - -} // namespace - - -class MultiPartInputFile; - - -// -// struct TiledInputFile::Data stores things that will be -// needed between calls to readTile() -// - -struct DeepTiledInputFile::Data: public Mutex -{ - Header header; // the image header - TileDescription tileDesc; // describes the tile layout - int version; // file's version - DeepFrameBuffer frameBuffer; // framebuffer to write into - LineOrder lineOrder; // the file's lineorder - int minX; // data window's min x coord - int maxX; // data window's max x coord - int minY; // data window's min y coord - int maxY; // data window's max x coord - - int numXLevels; // number of x levels - int numYLevels; // number of y levels - int * numXTiles; // number of x tiles at a level - int * numYTiles; // number of y tiles at a level - - TileOffsets tileOffsets; // stores offsets in file for - // each tile - - bool fileIsComplete; // True if no tiles are missing - // in the file - - vector slices; // info about channels in file - - // ourselves? or does someone - // else do it? - - int partNumber; // part number - - bool multiPartBackwardSupport; // if we are reading a multipart file - // using OpenEXR 1.7 API - - int numThreads; // number of threads - - MultiPartInputFile* multiPartFile; // the MultiPartInputFile used to - // support backward compatibility - - vector tileBuffers; // each holds a single tile - - bool memoryMapped; // if the stream is memory mapped - - char* sampleCountSliceBase; // pointer to the start of - // the sample count array - ptrdiff_t sampleCountXStride; // x stride of the sample count array - ptrdiff_t sampleCountYStride; // y stride of the sample count array - - int sampleCountXTileCoords; // the value of xTileCoords from the - // sample count slice - int sampleCountYTileCoords; // the value of yTileCoords from the - // sample count slice - - Array sampleCountTableBuffer; // the buffer for sample count table - - Compressor* sampleCountTableComp; // the decompressor for sample count table - - Int64 maxSampleCountTableSize; // the max size in bytes for a pixel - // sample count table - int combinedSampleSize; // total size of all channels combined to check sampletable size - - InputStreamMutex * _streamData; - bool _deleteStream; // should we delete the stream - Data (int numThreads); - ~Data (); - - inline TileBuffer * getTileBuffer (int number); - // hash function from tile indices - // into our vector of tile buffers - - int& getSampleCount(int x, int y); - // get the number of samples - // in each pixel -}; - - -DeepTiledInputFile::Data::Data (int numThreads): - numXTiles (0), - numYTiles (0), - partNumber (-1), - multiPartBackwardSupport(false), - numThreads(numThreads), - memoryMapped(false), - _streamData(NULL), - _deleteStream(false) -{ - // - // We need at least one tileBuffer, but if threading is used, - // to keep n threads busy we need 2*n tileBuffers - // - - tileBuffers.resize (max (1, 2 * numThreads)); -} - - -DeepTiledInputFile::Data::~Data () -{ - delete [] numXTiles; - delete [] numYTiles; - - for (size_t i = 0; i < tileBuffers.size(); i++) - delete tileBuffers[i]; - - if (multiPartBackwardSupport) - delete multiPartFile; - - for (size_t i = 0; i < slices.size(); i++) - delete slices[i]; -} - - -TileBuffer* -DeepTiledInputFile::Data::getTileBuffer (int number) -{ - return tileBuffers[number % tileBuffers.size()]; -} - - -int& -DeepTiledInputFile::Data::getSampleCount(int x, int y) -{ - return sampleCount(sampleCountSliceBase, - sampleCountXStride, - sampleCountYStride, - x, y); -} - - -namespace { - -void -readTileData (InputStreamMutex *streamData, - DeepTiledInputFile::Data *ifd, - int dx, int dy, - int lx, int ly, - char *&buffer, - Int64 &dataSize, - Int64 &unpackedDataSize) -{ - // - // Read a single tile block from the file and into the array pointed - // to by buffer. If the file is memory-mapped, then we change where - // buffer points instead of writing into the array (hence buffer needs - // to be a reference to a char *). - // - - // - // Look up the location for this tile in the Index and - // seek to that position if necessary - // - - Int64 tileOffset = ifd->tileOffsets (dx, dy, lx, ly); - - if (tileOffset == 0) - { - THROW (IEX_NAMESPACE::InputExc, "Tile (" << dx << ", " << dy << ", " << - lx << ", " << ly << ") is missing."); - } - - // - // In a multi-part file, the next chunk does not need to - // belong to the same part, so we have to compare the - // offset here. - // - - if ( !isMultiPart(ifd->version) ) - { - if (streamData->currentPosition != tileOffset) - streamData->is->seekg(tileOffset); - } - else - { - // - // In a multi-part file, the file pointer may be moved by other - // parts, so we have to ask tellg() where we are. - // - if (streamData->is->tellg() != tileOffset) - streamData->is->seekg (tileOffset); - } - - // - // Read the first few bytes of the tile (the header). - // Verify that the tile coordinates and the level number - // are correct. - // - - int tileXCoord, tileYCoord, levelX, levelY; - - if (isMultiPart(ifd->version)) - { - int partNumber; - Xdr::read (*streamData->is, partNumber); - if (partNumber != ifd->partNumber) - { - THROW (IEX_NAMESPACE::ArgExc, "Unexpected part number " << partNumber - << ", should be " << ifd->partNumber << "."); - } - } - - Xdr::read (*streamData->is, tileXCoord); - Xdr::read (*streamData->is, tileYCoord); - Xdr::read (*streamData->is, levelX); - Xdr::read (*streamData->is, levelY); - - Int64 tableSize; - Xdr::read (*streamData->is, tableSize); - - Xdr::read (*streamData->is, dataSize); - Xdr::read (*streamData->is, unpackedDataSize); - - - // - // Skip the pixel sample count table because we have read this data. - // - - Xdr::skip (*streamData->is, tableSize); - - - if (tileXCoord != dx) - throw IEX_NAMESPACE::InputExc ("Unexpected tile x coordinate."); - - if (tileYCoord != dy) - throw IEX_NAMESPACE::InputExc ("Unexpected tile y coordinate."); - - if (levelX != lx) - throw IEX_NAMESPACE::InputExc ("Unexpected tile x level number coordinate."); - - if (levelY != ly) - throw IEX_NAMESPACE::InputExc ("Unexpected tile y level number coordinate."); - - // - // Read the pixel data. - // - - if (streamData->is->isMemoryMapped ()) - buffer = streamData->is->readMemoryMapped (dataSize); - else - { - // (TODO) check if the packed data size is too big? - // (TODO) better memory management here. Don't delete buffer everytime. - if (buffer != 0) delete[] buffer; - buffer = new char[dataSize]; - streamData->is->read (buffer, dataSize); - } - - // - // Keep track of which tile is the next one in - // the file, so that we can avoid redundant seekg() - // operations (seekg() can be fairly expensive). - // - - streamData->currentPosition = tileOffset + 4 * Xdr::size() + - 3 * Xdr::size() + - tableSize + - dataSize; -} - - -void -readNextTileData (InputStreamMutex *streamData, - DeepTiledInputFile::Data *ifd, - int &dx, int &dy, - int &lx, int &ly, - char * & buffer, - Int64 &dataSize, - Int64 &unpackedDataSize) -{ - // - // Read the next tile block from the file - // - - // - // Read the first few bytes of the tile (the header). - // - - Xdr::read (*streamData->is, dx); - Xdr::read (*streamData->is, dy); - Xdr::read (*streamData->is, lx); - Xdr::read (*streamData->is, ly); - - Int64 tableSize; - Xdr::read (*streamData->is, tableSize); - - Xdr::read (*streamData->is, dataSize); - Xdr::read (*streamData->is, unpackedDataSize); - - // - // Skip the pixel sample count table because we have read this data. - // - - Xdr::skip (*streamData->is, tableSize); - - // - // Read the pixel data. - // - - streamData->is->read (buffer, dataSize); - - // - // Keep track of which tile is the next one in - // the file, so that we can avoid redundant seekg() - // operations (seekg() can be fairly expensive). - // - - streamData->currentPosition += 4 * Xdr::size() + - 3 * Xdr::size() + - tableSize + - dataSize; -} - - -// -// A TileBufferTask encapsulates the task of uncompressing -// a single tile and copying it into the frame buffer. -// - -class TileBufferTask : public Task -{ - public: - - TileBufferTask (TaskGroup *group, - DeepTiledInputFile::Data *ifd, - TileBuffer *tileBuffer); - - virtual ~TileBufferTask (); - - virtual void execute (); - - private: - - DeepTiledInputFile::Data * _ifd; - TileBuffer * _tileBuffer; -}; - - -TileBufferTask::TileBufferTask - (TaskGroup *group, - DeepTiledInputFile::Data *ifd, - TileBuffer *tileBuffer) -: - Task (group), - _ifd (ifd), - _tileBuffer (tileBuffer) -{ - // empty -} - - -TileBufferTask::~TileBufferTask () -{ - // - // Signal that the tile buffer is now free - // - - _tileBuffer->post (); -} - - -void -TileBufferTask::execute () -{ - try - { - // - // Calculate information about the tile - // - - Box2i tileRange = OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForTile ( - _ifd->tileDesc, - _ifd->minX, _ifd->maxX, - _ifd->minY, _ifd->maxY, - _tileBuffer->dx, - _tileBuffer->dy, - _tileBuffer->lx, - _tileBuffer->ly); - - // - // Get the size of the tile. - // - - Array numPixelsPerScanLine; - numPixelsPerScanLine.resizeErase(tileRange.max.y - tileRange.min.y + 1); - - int sizeOfTile = 0; - int maxBytesPerTileLine = 0; - - for (int y = tileRange.min.y; y <= tileRange.max.y; y++) - { - numPixelsPerScanLine[y - tileRange.min.y] = 0; - - int bytesPerLine = 0; - - for (int x = tileRange.min.x; x <= tileRange.max.x; x++) - { - int xOffset = _ifd->sampleCountXTileCoords * tileRange.min.x; - int yOffset = _ifd->sampleCountYTileCoords * tileRange.min.y; - - int count = _ifd->getSampleCount(x - xOffset, y - yOffset); - for (unsigned int c = 0; c < _ifd->slices.size(); ++c) - { - sizeOfTile += count * pixelTypeSize(_ifd->slices[c]->typeInFile); - bytesPerLine += count * pixelTypeSize(_ifd->slices[c]->typeInFile); - } - numPixelsPerScanLine[y - tileRange.min.y] += count; - } - - if (bytesPerLine > maxBytesPerTileLine) - maxBytesPerTileLine = bytesPerLine; - } - - // (TODO) don't do this every time. - if (_tileBuffer->compressor != 0) - delete _tileBuffer->compressor; - _tileBuffer->compressor = newTileCompressor - (_ifd->header.compression(), - maxBytesPerTileLine, - _ifd->tileDesc.ySize, - _ifd->header); - - // - // Uncompress the data, if necessary - // - - if (_tileBuffer->compressor && _tileBuffer->dataSize < Int64(sizeOfTile)) - { - _tileBuffer->format = _tileBuffer->compressor->format(); - - _tileBuffer->dataSize = _tileBuffer->compressor->uncompressTile - (_tileBuffer->buffer, _tileBuffer->dataSize, - tileRange, _tileBuffer->uncompressedData); - } - else - { - // - // If the line is uncompressed, it's in XDR format, - // regardless of the compressor's output format. - // - - _tileBuffer->format = Compressor::XDR; - _tileBuffer->uncompressedData = _tileBuffer->buffer; - } - - // - // Convert the tile of pixel data back from the machine-independent - // representation, and store the result in the frame buffer. - // - - const char *readPtr = _tileBuffer->uncompressedData; - // points to where we - // read from in the - // tile block - - // - // Iterate over the scan lines in the tile. - // - - for (int y = tileRange.min.y; y <= tileRange.max.y; ++y) - { - // - // Iterate over all image channels. - // - - for (unsigned int i = 0; i < _ifd->slices.size(); ++i) - { - TInSliceInfo &slice = *_ifd->slices[i]; - - // - // These offsets are used to facilitate both - // absolute and tile-relative pixel coordinates. - // - - int xOffsetForData = (slice.xTileCoords == 0) ? 0 : tileRange.min.x; - int yOffsetForData = (slice.yTileCoords == 0) ? 0 : tileRange.min.y; - int xOffsetForSampleCount = - (_ifd->sampleCountXTileCoords == 0) ? 0 : tileRange.min.x; - int yOffsetForSampleCount = - (_ifd->sampleCountYTileCoords == 0) ? 0 : tileRange.min.y; - - // - // Fill the frame buffer with pixel data. - // - - if (slice.skip) - { - // - // The file contains data for this channel, but - // the frame buffer contains no slice for this channel. - // - - skipChannel (readPtr, slice.typeInFile, - numPixelsPerScanLine[y - tileRange.min.y]); - } - else - { - // - // The frame buffer contains a slice for this channel. - // - - copyIntoDeepFrameBuffer (readPtr, slice.pointerArrayBase, - _ifd->sampleCountSliceBase, - _ifd->sampleCountXStride, - _ifd->sampleCountYStride, - y, - tileRange.min.x, - tileRange.max.x, - xOffsetForSampleCount, yOffsetForSampleCount, - xOffsetForData, yOffsetForData, - slice.sampleStride, - slice.xStride, - slice.yStride, - slice.fill, - slice.fillValue, _tileBuffer->format, - slice.typeInFrameBuffer, - slice.typeInFile); - } - } - } - } - catch (std::exception &e) - { - if (!_tileBuffer->hasException) - { - _tileBuffer->exception = e.what (); - _tileBuffer->hasException = true; - } - } - catch (...) - { - if (!_tileBuffer->hasException) - { - _tileBuffer->exception = "unrecognized exception"; - _tileBuffer->hasException = true; - } - } -} - - -TileBufferTask * -newTileBufferTask - (TaskGroup *group, - DeepTiledInputFile::Data *ifd, - int number, - int dx, int dy, - int lx, int ly) -{ - // - // Wait for a tile buffer to become available, - // fill the buffer with raw data from the file, - // and create a new TileBufferTask whose execute() - // method will uncompress the tile and copy the - // tile's pixels into the frame buffer. - // - - TileBuffer *tileBuffer = ifd->getTileBuffer (number); - - try - { - tileBuffer->wait(); - - tileBuffer->dx = dx; - tileBuffer->dy = dy; - tileBuffer->lx = lx; - tileBuffer->ly = ly; - - tileBuffer->uncompressedData = 0; - - readTileData (ifd->_streamData, ifd, dx, dy, lx, ly, - tileBuffer->buffer, - tileBuffer->dataSize, - tileBuffer->uncompressedDataSize); - } - catch (...) - { - // - // Reading from the file caused an exception. - // Signal that the tile buffer is free, and - // re-throw the exception. - // - - tileBuffer->post(); - throw; - } - - return new TileBufferTask (group, ifd, tileBuffer); -} - - -} // namespace - - -DeepTiledInputFile::DeepTiledInputFile (const char fileName[], int numThreads): - _data (new Data (numThreads)) -{ - _data->_deleteStream=true; - // - // This constructor is called when a user - // explicitly wants to read a tiled file. - // - - IStream* is = 0; - try - { - is = new StdIFStream (fileName); - readMagicNumberAndVersionField(*is, _data->version); - - // - // Compatibility to read multpart file. - // - if (isMultiPart(_data->version)) - { - compatibilityInitialize(*is); - } - else - { - _data->_streamData = new InputStreamMutex(); - _data->_streamData->is = is; - _data->header.readFrom (*_data->_streamData->is, _data->version); - initialize(); - _data->tileOffsets.readFrom (*(_data->_streamData->is), _data->fileIsComplete,false,true); - _data->_streamData->currentPosition = _data->_streamData->is->tellg(); - } - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (is) delete is; - if (_data && !_data->multiPartBackwardSupport && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - if (is) delete is; - if (_data && !_data->multiPartBackwardSupport && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - throw; - } -} - - -DeepTiledInputFile::DeepTiledInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads): - _data (new Data (numThreads)) -{ - _data->_streamData=0; - _data->_deleteStream=false; - - // - // This constructor is called when a user - // explicitly wants to read a tiled file. - // - - try - { - readMagicNumberAndVersionField(is, _data->version); - - // - // Backward compatibility to read multpart file. - // - if (isMultiPart(_data->version)) - { - compatibilityInitialize(is); - } - else - { - _data->_streamData = new InputStreamMutex(); - _data->_streamData->is = &is; - _data->header.readFrom (*_data->_streamData->is, _data->version); - initialize(); - // file is guaranteed not to be multipart, but is deep - _data->tileOffsets.readFrom (*(_data->_streamData->is), _data->fileIsComplete, false,true); - _data->memoryMapped = _data->_streamData->is->isMemoryMapped(); - _data->_streamData->currentPosition = _data->_streamData->is->tellg(); - } - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (_data && !_data->multiPartBackwardSupport && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << is.fileName() << "\". " << e); - throw; - } - catch (...) - { - if (_data && !_data->multiPartBackwardSupport && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - throw; - } -} - - -DeepTiledInputFile::DeepTiledInputFile (const Header &header, - OPENEXR_IMF_INTERNAL_NAMESPACE::IStream *is, - int version, - int numThreads) : - _data (new Data (numThreads)) - -{ - _data->_streamData->is = is; - _data->_deleteStream=false; - - // - // This constructor called by class Imf::InputFile - // when a user wants to just read an image file, and - // doesn't care or know if the file is tiled. - // No need to have backward compatibility here, because - // we have the header. - // - - _data->header = header; - _data->version = version; - initialize(); - _data->tileOffsets.readFrom (*(_data->_streamData->is), _data->fileIsComplete,false,true); - _data->memoryMapped = is->isMemoryMapped(); - _data->_streamData->currentPosition = _data->_streamData->is->tellg(); -} - - -DeepTiledInputFile::DeepTiledInputFile (InputPartData* part) : - _data (new Data (part->numThreads)) -{ - _data->_deleteStream=false; - multiPartInitialize(part); -} - - -void -DeepTiledInputFile::compatibilityInitialize(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is) -{ - is.seekg(0); - // - // Construct a MultiPartInputFile, initialize TiledInputFile - // with the part 0 data. - // (TODO) maybe change the third parameter of the constructor of MultiPartInputFile later. - // - _data->multiPartFile = new MultiPartInputFile(is, _data->numThreads); - _data->multiPartBackwardSupport = true; - InputPartData* part = _data->multiPartFile->getPart(0); - - multiPartInitialize(part); -} - - -void -DeepTiledInputFile::multiPartInitialize(InputPartData* part) -{ - if (isTiled(part->header.type()) == false) - THROW (IEX_NAMESPACE::ArgExc, "Can't build a DeepTiledInputFile from a part of type " << part->header.type()); - - _data->_streamData = part->mutex; - _data->header = part->header; - _data->version = part->version; - _data->partNumber = part->partNumber; - _data->memoryMapped = _data->_streamData->is->isMemoryMapped(); - initialize(); - _data->tileOffsets.readFrom(part->chunkOffsets , _data->fileIsComplete); - _data->_streamData->currentPosition = _data->_streamData->is->tellg(); -} - - -void -DeepTiledInputFile::initialize () -{ - if (_data->partNumber == -1) - if (_data->header.type() != DEEPTILE) - throw IEX_NAMESPACE::ArgExc ("Expected a deep tiled file but the file is not deep tiled."); - if(_data->header.version()!=1) - { - THROW(IEX_NAMESPACE::ArgExc, "Version " << _data->header.version() << " not supported for deeptiled images in this version of the library"); - } - - _data->header.sanityCheck (true); - - _data->tileDesc = _data->header.tileDescription(); - _data->lineOrder = _data->header.lineOrder(); - - // - // Save the dataWindow information - // - - const Box2i &dataWindow = _data->header.dataWindow(); - _data->minX = dataWindow.min.x; - _data->maxX = dataWindow.max.x; - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - // - // Precompute level and tile information to speed up utility functions - // - - precalculateTileInfo (_data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - _data->numXTiles, _data->numYTiles, - _data->numXLevels, _data->numYLevels); - - // - // Create all the TileBuffers and allocate their internal buffers - // - - _data->tileOffsets = TileOffsets (_data->tileDesc.mode, - _data->numXLevels, - _data->numYLevels, - _data->numXTiles, - _data->numYTiles); - - for (size_t i = 0; i < _data->tileBuffers.size(); i++) - _data->tileBuffers[i] = new TileBuffer (); - - _data->maxSampleCountTableSize = _data->tileDesc.ySize * - _data->tileDesc.xSize * - sizeof(int); - - _data->sampleCountTableBuffer.resizeErase(_data->maxSampleCountTableSize); - - _data->sampleCountTableComp = newCompressor(_data->header.compression(), - _data->maxSampleCountTableSize, - _data->header); - - - const ChannelList & c=_data->header.channels(); - _data->combinedSampleSize=0; - for(ChannelList::ConstIterator i=c.begin();i!=c.end();i++) - { - switch( i.channel().type ) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF : - _data->combinedSampleSize+=Xdr::size(); - break; - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT : - _data->combinedSampleSize+=Xdr::size(); - break; - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT : - _data->combinedSampleSize+=Xdr::size(); - break; - default : - THROW(IEX_NAMESPACE::ArgExc, "Bad type for channel " << i.name() << " initializing deepscanline reader"); - } - } - -} - - -DeepTiledInputFile::~DeepTiledInputFile () -{ - if (!_data->memoryMapped) - for (size_t i = 0; i < _data->tileBuffers.size(); i++) - if (_data->tileBuffers[i]->buffer != 0) - delete [] _data->tileBuffers[i]->buffer; - - if (_data->_deleteStream) - delete _data->_streamData->is; - - // - // (TODO) we should have a way to tell if the stream data is owned by this file or - // by a parent multipart file. - // - - if (_data->partNumber == -1) - delete _data->_streamData; - - delete _data; -} - - -const char * -DeepTiledInputFile::fileName () const -{ - return _data->_streamData->is->fileName(); -} - - -const Header & -DeepTiledInputFile::header () const -{ - return _data->header; -} - - -int -DeepTiledInputFile::version () const -{ - return _data->version; -} - - -void -DeepTiledInputFile::setFrameBuffer (const DeepFrameBuffer &frameBuffer) -{ - Lock lock (*_data->_streamData); - - // - // Set the frame buffer - // - - // - // Check if the new frame buffer descriptor is - // compatible with the image file header. - // - - const ChannelList &channels = _data->header.channels(); - - for (DeepFrameBuffer::ConstIterator j = frameBuffer.begin(); - j != frameBuffer.end(); - ++j) - { - ChannelList::ConstIterator i = channels.find (j.name()); - - if (i == channels.end()) - continue; - - if (i.channel().xSampling != j.slice().xSampling || - i.channel().ySampling != j.slice().ySampling) - THROW (IEX_NAMESPACE::ArgExc, "X and/or y subsampling factors " - "of \"" << i.name() << "\" channel " - "of input file \"" << fileName() << "\" are " - "not compatible with the frame buffer's " - "subsampling factors."); - } - - // - // Store the pixel sample count table. - // (TODO) Support for different sampling rates? - // - - const Slice& sampleCountSlice = frameBuffer.getSampleCountSlice(); - if (sampleCountSlice.base == 0) - { - throw IEX_NAMESPACE::ArgExc ("Invalid base pointer, please set a proper sample count slice."); - } - else - { - _data->sampleCountSliceBase = sampleCountSlice.base; - _data->sampleCountXStride = sampleCountSlice.xStride; - _data->sampleCountYStride = sampleCountSlice.yStride; - _data->sampleCountXTileCoords = sampleCountSlice.xTileCoords; - _data->sampleCountYTileCoords = sampleCountSlice.yTileCoords; - } - - // - // Initialize the slice table for readPixels(). - // - - vector slices; - ChannelList::ConstIterator i = channels.begin(); - - for (DeepFrameBuffer::ConstIterator j = frameBuffer.begin(); - j != frameBuffer.end(); - ++j) - { - while (i != channels.end() && strcmp (i.name(), j.name()) < 0) - { - // - // Channel i is present in the file but not - // in the frame buffer; data for channel i - // will be skipped during readPixels(). - // - - slices.push_back (new TInSliceInfo (i.channel().type, - NULL, - i.channel().type, - 0, // xStride - 0, // yStride - 0, // sampleStride - false, // fill - true, // skip - 0.0)); // fillValue - ++i; - } - - bool fill = false; - - if (i == channels.end() || strcmp (i.name(), j.name()) > 0) - { - // - // Channel i is present in the frame buffer, but not in the file. - // In the frame buffer, slice j will be filled with a default value. - // - - fill = true; - } - - slices.push_back (new TInSliceInfo (j.slice().type, - j.slice().base, - fill? j.slice().type: i.channel().type, - j.slice().xStride, - j.slice().yStride, - j.slice().sampleStride, - fill, - false, // skip - j.slice().fillValue, - (j.slice().xTileCoords)? 1: 0, - (j.slice().yTileCoords)? 1: 0)); - - - if (i != channels.end() && !fill) - ++i; - } - - // (TODO) inspect the following code. It's additional to the scanline input file. - // Is this needed? - - while (i != channels.end()) - { - // - // Channel i is present in the file but not - // in the frame buffer; data for channel i - // will be skipped during readPixels(). - // - - slices.push_back (new TInSliceInfo (i.channel().type, - NULL, - i.channel().type, - 0, // xStride - 0, // yStride - 0, // sampleStride - false, // fill - true, // skip - 0.0)); // fillValue - ++i; - } - - // - // Store the new frame buffer. - // - - _data->frameBuffer = frameBuffer; - - for (size_t i = 0; i < _data->slices.size(); i++) - delete _data->slices[i]; - _data->slices = slices; -} - - -const DeepFrameBuffer & -DeepTiledInputFile::frameBuffer () const -{ - Lock lock (*_data->_streamData); - return _data->frameBuffer; -} - - -bool -DeepTiledInputFile::isComplete () const -{ - return _data->fileIsComplete; -} - - -void -DeepTiledInputFile::readTiles (int dx1, int dx2, int dy1, int dy2, int lx, int ly) -{ - // - // Read a range of tiles from the file into the framebuffer - // - - try - { - Lock lock (*_data->_streamData); - - if (_data->slices.size() == 0) - throw IEX_NAMESPACE::ArgExc ("No frame buffer specified " - "as pixel data destination."); - - if (!isValidLevel (lx, ly)) - THROW (IEX_NAMESPACE::ArgExc, - "Level coordinate " - "(" << lx << ", " << ly << ") " - "is invalid."); - - // - // Determine the first and last tile coordinates in both dimensions. - // We always attempt to read the range of tiles in the order that - // they are stored in the file. - // - - if (dx1 > dx2) - std::swap (dx1, dx2); - - if (dy1 > dy2) - std::swap (dy1, dy2); - - int dyStart = dy1; - int dyStop = dy2 + 1; - int dY = 1; - - if (_data->lineOrder == DECREASING_Y) - { - dyStart = dy2; - dyStop = dy1 - 1; - dY = -1; - } - - // - // Create a task group for all tile buffer tasks. When the - // task group goes out of scope, the destructor waits until - // all tasks are complete. - // - - { - TaskGroup taskGroup; - int tileNumber = 0; - - for (int dy = dyStart; dy != dyStop; dy += dY) - { - for (int dx = dx1; dx <= dx2; dx++) - { - if (!isValidTile (dx, dy, lx, ly)) - THROW (IEX_NAMESPACE::ArgExc, - "Tile (" << dx << ", " << dy << ", " << - lx << "," << ly << ") is not a valid tile."); - - ThreadPool::addGlobalTask (newTileBufferTask (&taskGroup, - _data, - tileNumber++, - dx, dy, - lx, ly)); - } - } - - // - // finish all tasks - // - } - - // - // Exeption handling: - // - // TileBufferTask::execute() may have encountered exceptions, but - // those exceptions occurred in another thread, not in the thread - // that is executing this call to TiledInputFile::readTiles(). - // TileBufferTask::execute() has caught all exceptions and stored - // the exceptions' what() strings in the tile buffers. - // Now we check if any tile buffer contains a stored exception; if - // this is the case then we re-throw the exception in this thread. - // (It is possible that multiple tile buffers contain stored - // exceptions. We re-throw the first exception we find and - // ignore all others.) - // - - const string *exception = 0; - - for (size_t i = 0; i < _data->tileBuffers.size(); ++i) - { - TileBuffer *tileBuffer = _data->tileBuffers[i]; - - if (tileBuffer->hasException && !exception) - exception = &tileBuffer->exception; - - tileBuffer->hasException = false; - } - - if (exception) - throw IEX_NAMESPACE::IoExc (*exception); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error reading pixel data from image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -void -DeepTiledInputFile::readTiles (int dx1, int dx2, int dy1, int dy2, int l) -{ - readTiles (dx1, dx2, dy1, dy2, l, l); -} - - -void -DeepTiledInputFile::readTile (int dx, int dy, int lx, int ly) -{ - readTiles (dx, dx, dy, dy, lx, ly); -} - - -void -DeepTiledInputFile::readTile (int dx, int dy, int l) -{ - readTile (dx, dy, l, l); -} - - -void -DeepTiledInputFile::rawTileData (int &dx, int &dy, - int &lx, int &ly, - char * pixelData, - Int64 &pixelDataSize) const -{ - if (!isValidTile (dx, dy, lx, ly)) - throw IEX_NAMESPACE::ArgExc ("Tried to read a tile outside " - "the image file's data window."); - - Int64 tileOffset = _data->tileOffsets (dx, dy, lx, ly); - - if(tileOffset == 0) - { - THROW (IEX_NAMESPACE::InputExc, "Tile (" << dx << ", " << dy << ", " << - lx << ", " << ly << ") is missing."); - } - - Lock lock(*_data->_streamData); - - if (_data->_streamData->is->tellg() != tileOffset) - _data->_streamData->is->seekg (tileOffset); - - - // - // Read the first few bytes of the tile (the header). - // Verify that the tile coordinates and the level number - // are correct. - // - - int tileXCoord, tileYCoord, levelX, levelY; - - if (isMultiPart(_data->version)) - { - int partNumber; - Xdr::read (*_data->_streamData->is, partNumber); - if (partNumber != _data->partNumber) - { - THROW (IEX_NAMESPACE::ArgExc, "Unexpected part number " << partNumber - << ", should be " << _data->partNumber << "."); - } - } - - Xdr::read (*_data->_streamData->is, tileXCoord); - Xdr::read (*_data->_streamData->is, tileYCoord); - Xdr::read (*_data->_streamData->is, levelX); - Xdr::read (*_data->_streamData->is, levelY); - - Int64 sampleCountTableSize; - Int64 packedDataSize; - Xdr::read (*_data->_streamData->is, sampleCountTableSize); - - Xdr::read (*_data->_streamData->is, packedDataSize); - - - - if (tileXCoord != dx) - throw IEX_NAMESPACE::InputExc ("Unexpected tile x coordinate."); - - if (tileYCoord != dy) - throw IEX_NAMESPACE::InputExc ("Unexpected tile y coordinate."); - - if (levelX != lx) - throw IEX_NAMESPACE::InputExc ("Unexpected tile x level number coordinate."); - - if (levelY != ly) - throw IEX_NAMESPACE::InputExc ("Unexpected tile y level number coordinate."); - - - // total requirement for reading all the data - - Int64 totalSizeRequired=40+sampleCountTableSize+packedDataSize; - - bool big_enough = totalSizeRequired<=pixelDataSize; - - pixelDataSize = totalSizeRequired; - - // was the block we were given big enough? - if(!big_enough || pixelData==NULL) - { - // special case: seek stream back to start if we are at the beginning (regular reading pixels assumes it doesn't need to seek - // in single part files) - if(!isMultiPart(_data->version)) - { - _data->_streamData->is->seekg(_data->_streamData->currentPosition); - } - // leave lock here - bail before reading more data - return; - } - - // copy the values we have read into the output block - *(int *) (pixelData+0) = dx; - *(int *) (pixelData+4) = dy; - *(int *) (pixelData+8) = levelX; - *(int *) (pixelData+12) = levelY; - *(Int64 *) (pixelData+16) =sampleCountTableSize; - *(Int64 *) (pixelData+24) = packedDataSize; - - // didn't read the unpackedsize - do that now - Xdr::read (*_data->_streamData->is, *(Int64 *) (pixelData+32)); - - // read the actual data - _data->_streamData->is->read(pixelData+40, sampleCountTableSize+packedDataSize); - - - if(!isMultiPart(_data->version)) - { - _data->_streamData->currentPosition+=sampleCountTableSize+packedDataSize+40; - } - - // leave lock here - - -} - - -unsigned int -DeepTiledInputFile::tileXSize () const -{ - return _data->tileDesc.xSize; -} - - -unsigned int -DeepTiledInputFile::tileYSize () const -{ - return _data->tileDesc.ySize; -} - - -LevelMode -DeepTiledInputFile::levelMode () const -{ - return _data->tileDesc.mode; -} - - -LevelRoundingMode -DeepTiledInputFile::levelRoundingMode () const -{ - return _data->tileDesc.roundingMode; -} - - -int -DeepTiledInputFile::numLevels () const -{ - if (levelMode() == RIPMAP_LEVELS) - THROW (IEX_NAMESPACE::LogicExc, "Error calling numLevels() on image " - "file \"" << fileName() << "\" " - "(numLevels() is not defined for files " - "with RIPMAP level mode)."); - - return _data->numXLevels; -} - - -int -DeepTiledInputFile::numXLevels () const -{ - return _data->numXLevels; -} - - -int -DeepTiledInputFile::numYLevels () const -{ - return _data->numYLevels; -} - - -bool -DeepTiledInputFile::isValidLevel (int lx, int ly) const -{ - if (lx < 0 || ly < 0) - return false; - - if (levelMode() == MIPMAP_LEVELS && lx != ly) - return false; - - if (lx >= numXLevels() || ly >= numYLevels()) - return false; - - return true; -} - - -int -DeepTiledInputFile::levelWidth (int lx) const -{ - try - { - return levelSize (_data->minX, _data->maxX, lx, - _data->tileDesc.roundingMode); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling levelWidth() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -int -DeepTiledInputFile::levelHeight (int ly) const -{ - try - { - return levelSize (_data->minY, _data->maxY, ly, - _data->tileDesc.roundingMode); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling levelHeight() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -int -DeepTiledInputFile::numXTiles (int lx) const -{ - if (lx < 0 || lx >= _data->numXLevels) - { - THROW (IEX_NAMESPACE::ArgExc, "Error calling numXTiles() on image " - "file \"" << _data->_streamData->is->fileName() << "\" " - "(Argument is not in valid range)."); - - } - - return _data->numXTiles[lx]; -} - - -int -DeepTiledInputFile::numYTiles (int ly) const -{ - if (ly < 0 || ly >= _data->numYLevels) - { - THROW (IEX_NAMESPACE::ArgExc, "Error calling numYTiles() on image " - "file \"" << _data->_streamData->is->fileName() << "\" " - "(Argument is not in valid range)."); - } - - return _data->numYTiles[ly]; -} - - -Box2i -DeepTiledInputFile::dataWindowForLevel (int l) const -{ - return dataWindowForLevel (l, l); -} - - -Box2i -DeepTiledInputFile::dataWindowForLevel (int lx, int ly) const -{ - try - { - return OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForLevel ( - _data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - lx, ly); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling dataWindowForLevel() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -Box2i -DeepTiledInputFile::dataWindowForTile (int dx, int dy, int l) const -{ - return dataWindowForTile (dx, dy, l, l); -} - - -Box2i -DeepTiledInputFile::dataWindowForTile (int dx, int dy, int lx, int ly) const -{ - try - { - if (!isValidTile (dx, dy, lx, ly)) - throw IEX_NAMESPACE::ArgExc ("Arguments not in valid range."); - - return OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForTile ( - _data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - dx, dy, lx, ly); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling dataWindowForTile() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -bool -DeepTiledInputFile::isValidTile (int dx, int dy, int lx, int ly) const -{ - return ((lx < _data->numXLevels && lx >= 0) && - (ly < _data->numYLevels && ly >= 0) && - (dx < _data->numXTiles[lx] && dx >= 0) && - (dy < _data->numYTiles[ly] && dy >= 0)); -} - - -void -DeepTiledInputFile::readPixelSampleCounts (int dx1, int dx2, - int dy1, int dy2, - int lx, int ly) -{ - Int64 savedFilePos = 0; - - try - { - Lock lock (*_data->_streamData); - - savedFilePos = _data->_streamData->is->tellg(); - - - if (!isValidLevel (lx, ly)) - { - THROW (IEX_NAMESPACE::ArgExc, - "Level coordinate " - "(" << lx << ", " << ly << ") " - "is invalid."); - } - - if (dx1 > dx2) - std::swap (dx1, dx2); - - if (dy1 > dy2) - std::swap (dy1, dy2); - - int dyStart = dy1; - int dyStop = dy2 + 1; - int dY = 1; - - if (_data->lineOrder == DECREASING_Y) - { - dyStart = dy2; - dyStop = dy1 - 1; - dY = -1; - } - - // (TODO) Check if we have read the sample counts for those tiles, - // if we have, no need to read again. - for (int dy = dyStart; dy != dyStop; dy += dY) - { - for (int dx = dx1; dx <= dx2; dx++) - { - - if (!isValidTile (dx, dy, lx, ly)) - { - THROW (IEX_NAMESPACE::ArgExc, - "Tile (" << dx << ", " << dy << ", " << - lx << "," << ly << ") is not a valid tile."); - } - - Box2i tileRange = OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForTile ( - _data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - dx, dy, lx, ly); - - int xOffset = _data->sampleCountXTileCoords * tileRange.min.x; - int yOffset = _data->sampleCountYTileCoords * tileRange.min.y; - - // - // Skip and check the tile coordinates. - // - - _data->_streamData->is->seekg(_data->tileOffsets(dx, dy, lx, ly)); - - if (isMultiPart(_data->version)) - { - int partNumber; - Xdr::read (*_data->_streamData->is, partNumber); - - if (partNumber != _data->partNumber) - throw IEX_NAMESPACE::InputExc ("Unexpected part number."); - } - - int xInFile, yInFile, lxInFile, lyInFile; - Xdr::read (*_data->_streamData->is, xInFile); - Xdr::read (*_data->_streamData->is, yInFile); - Xdr::read (*_data->_streamData->is, lxInFile); - Xdr::read (*_data->_streamData->is, lyInFile); - - if (xInFile != dx) - throw IEX_NAMESPACE::InputExc ("Unexpected tile x coordinate."); - - if (yInFile != dy) - throw IEX_NAMESPACE::InputExc ("Unexpected tile y coordinate."); - - if (lxInFile != lx) - throw IEX_NAMESPACE::InputExc ("Unexpected tile x level number coordinate."); - - if (lyInFile != ly) - throw IEX_NAMESPACE::InputExc ("Unexpected tile y level number coordinate."); - - Int64 tableSize, dataSize, unpackedDataSize; - Xdr::read (*_data->_streamData->is, tableSize); - Xdr::read (*_data->_streamData->is, dataSize); - Xdr::read (*_data->_streamData->is, unpackedDataSize); - - - if(tableSize>_data->maxSampleCountTableSize) - { - THROW (IEX_NAMESPACE::ArgExc, "Bad sampleCountTableDataSize read from tile "<< dx << ',' << dy << ',' << lx << ',' << ly << ": expected " << _data->maxSampleCountTableSize << " or less, got "<< tableSize); - } - - - // - // We make a check on the data size requirements here. - // Whilst we wish to store 64bit sizes on disk, not all the compressors - // have been made to work with such data sizes and are still limited to - // using signed 32 bit (int) for the data size. As such, this version - // insists that we validate that the data size does not exceed the data - // type max limit. - // @TODO refactor the compressor code to ensure full 64-bit support. - // - - Int64 compressorMaxDataSize = Int64(std::numeric_limits::max()); - if (dataSize > compressorMaxDataSize || - unpackedDataSize > compressorMaxDataSize || - tableSize > compressorMaxDataSize) - { - THROW (IEX_NAMESPACE::ArgExc, "This version of the library does not" - << "support the allocation of data with size > " - << compressorMaxDataSize - << " file table size :" << tableSize - << " file unpacked size :" << unpackedDataSize - << " file packed size :" << dataSize << ".\n"); - } - - // - // Read and uncompress the pixel sample count table. - // - - _data->_streamData->is->read(_data->sampleCountTableBuffer, tableSize); - - const char* readPtr; - - if (tableSize < _data->maxSampleCountTableSize) - { - if(!_data->sampleCountTableComp) - { - THROW(IEX_NAMESPACE::ArgExc,"Deep scanline data corrupt at tile " << dx << ',' << dy << ',' << lx << ',' << ly << " (sampleCountTableDataSize error)"); - } - _data->sampleCountTableComp->uncompress(_data->sampleCountTableBuffer, - tableSize, - tileRange.min.y, - readPtr); - } - else - readPtr = _data->sampleCountTableBuffer; - - size_t cumulative_total_samples =0; - int lastAccumulatedCount; - for (int j = tileRange.min.y; j <= tileRange.max.y; j++) - { - lastAccumulatedCount = 0; - for (int i = tileRange.min.x; i <= tileRange.max.x; i++) - { - int accumulatedCount; - Xdr::read (readPtr, accumulatedCount); - - if (accumulatedCount < lastAccumulatedCount) - { - THROW(IEX_NAMESPACE::ArgExc,"Deep tile sampleCount data corrupt at tile " - << dx << ',' << dy << ',' << lx << ',' << ly << " (negative sample count detected)"); - } - - int count = accumulatedCount - lastAccumulatedCount; - lastAccumulatedCount = accumulatedCount; - - _data->getSampleCount(i - xOffset, j - yOffset) =count; - } - cumulative_total_samples += lastAccumulatedCount; - } - - if(cumulative_total_samples * _data->combinedSampleSize > unpackedDataSize) - { - THROW(IEX_NAMESPACE::ArgExc,"Deep scanline sampleCount data corrupt at tile " - << dx << ',' << dy << ',' << lx << ',' << ly - << ": pixel data only contains " << unpackedDataSize - << " bytes of data but table references at least " - << cumulative_total_samples*_data->combinedSampleSize << " bytes of sample data" ); - } - - } - } - - _data->_streamData->is->seekg(savedFilePos); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error reading sample count data from image " - "file \"" << fileName() << "\". " << e); - - _data->_streamData->is->seekg(savedFilePos); - - throw; - } -} - - -void -DeepTiledInputFile::readPixelSampleCount (int dx, int dy, int l) -{ - readPixelSampleCount (dx, dy, l, l); -} - - -void -DeepTiledInputFile::readPixelSampleCount (int dx, int dy, int lx, int ly) -{ - readPixelSampleCounts (dx, dx, dy, dy, lx, ly); -} - - -void -DeepTiledInputFile::readPixelSampleCounts (int dx1, int dx2, - int dy1, int dy2, - int l) -{ - readPixelSampleCounts (dx1, dx2, dy1, dy2, l, l); -} - - -size_t -DeepTiledInputFile::totalTiles() const -{ - // - // Calculate the total number of tiles in the file - // - - int numAllTiles = 0; - - switch (levelMode ()) - { - case ONE_LEVEL: - case MIPMAP_LEVELS: - - for (int i_l = 0; i_l < numLevels (); ++i_l) - numAllTiles += numXTiles (i_l) * numYTiles (i_l); - - break; - - case RIPMAP_LEVELS: - - for (int i_ly = 0; i_ly < numYLevels (); ++i_ly) - for (int i_lx = 0; i_lx < numXLevels (); ++i_lx) - numAllTiles += numXTiles (i_lx) * numYTiles (i_ly); - - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown LevelMode format."); - } - return numAllTiles; -} - - - - -void -DeepTiledInputFile::getTileOrder(int dx[],int dy[],int lx[],int ly[]) const -{ - return _data->tileOffsets.getTileOrder(dx,dy,lx,ly); - -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.h deleted file mode 100644 index 87294b5..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.h +++ /dev/null @@ -1,437 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_DEEP_TILED_INPUT_FILE_H -#define INCLUDED_IMF_DEEP_TILED_INPUT_FILE_H - -//----------------------------------------------------------------------------- -// -// class DeepTiledInputFile -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfFrameBuffer.h" -#include "ImathBox.h" -#include "ImfTileDescription.h" -#include "ImfThreading.h" -#include "ImfGenericInputFile.h" -#include "ImfDeepFrameBuffer.h" -#include "ImfDeepTiledOutputFile.h" -#include "ImfForward.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -class IMF_EXPORT DeepTiledInputFile : public GenericInputFile -{ - public: - - //-------------------------------------------------------------------- - // A constructor that opens the file with the specified name, and - // reads the file header. The constructor throws an IEX_NAMESPACE::ArgExc - // exception if the file is not tiled. - // The numThreads parameter specifies how many worker threads this - // file will try to keep busy when decompressing individual tiles. - // Destroying TiledInputFile objects constructed with this constructor - // automatically closes the corresponding files. - //-------------------------------------------------------------------- - - DeepTiledInputFile (const char fileName[], - int numThreads = globalThreadCount ()); - - - // ---------------------------------------------------------- - // A constructor that attaches the new TiledInputFile object - // to a file that has already been opened. - // Destroying TiledInputFile objects constructed with this - // constructor does not automatically close the corresponding - // files. - // ---------------------------------------------------------- - - DeepTiledInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads = globalThreadCount ()); - - - //----------- - // Destructor - //----------- - - virtual ~DeepTiledInputFile (); - - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //---------------------------------- - // Access to the file format version - //---------------------------------- - - int version () const; - - - //----------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the TiledInputFile object. - // - // The current frame buffer is the destination for the pixel - // data read from the file. The current frame buffer must be - // set at least once before readTile() is called. - // The current frame buffer can be changed after each call - // to readTile(). - //----------------------------------------------------------- - - void setFrameBuffer (const DeepFrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const DeepFrameBuffer & frameBuffer () const; - - - //------------------------------------------------------------ - // Check if the file is complete: - // - // isComplete() returns true if all pixels in the data window - // (in all levels) are present in the input file, or false if - // any pixels are missing. (Another program may still be busy - // writing the file, or file writing may have been aborted - // prematurely.) - //------------------------------------------------------------ - - bool isComplete () const; - - - //-------------------------------------------------- - // Utility functions: - //-------------------------------------------------- - - //--------------------------------------------------------- - // Multiresolution mode and tile size: - // The following functions return the xSize, ySize and mode - // fields of the file header's TileDescriptionAttribute. - //--------------------------------------------------------- - - unsigned int tileXSize () const; - unsigned int tileYSize () const; - LevelMode levelMode () const; - LevelRoundingMode levelRoundingMode () const; - - - //-------------------------------------------------------------------- - // Number of levels: - // - // numXLevels() returns the file's number of levels in x direction. - // - // if levelMode() == ONE_LEVEL: - // return value is: 1 - // - // if levelMode() == MIPMAP_LEVELS: - // return value is: rfunc (log (max (w, h)) / log (2)) + 1 - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (w) / log (2)) + 1 - // - // where - // w is the width of the image's data window, max.x - min.x + 1, - // y is the height of the image's data window, max.y - min.y + 1, - // and rfunc(x) is either floor(x), or ceil(x), depending on - // whether levelRoundingMode() returns ROUND_DOWN or ROUND_UP. - // - // numYLevels() returns the file's number of levels in y direction. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (h) / log (2)) + 1 - // - // - // numLevels() is a convenience function for use with - // MIPMAP_LEVELS files. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // an IEX_NAMESPACE::LogicExc exception is thrown - // - // isValidLevel(lx, ly) returns true if the file contains - // a level with level number (lx, ly), false if not. - // - // totalTiles() returns the total number of tiles in the image - // - //-------------------------------------------------------------------- - - int numLevels () const; - int numXLevels () const; - int numYLevels () const; - bool isValidLevel (int lx, int ly) const; - size_t totalTiles() const; - - //---------------------------------------------------------- - // Dimensions of a level: - // - // levelWidth(lx) returns the width of a level with level - // number (lx, *), where * is any number. - // - // return value is: - // max (1, rfunc (w / pow (2, lx))) - // - // - // levelHeight(ly) returns the height of a level with level - // number (*, ly), where * is any number. - // - // return value is: - // max (1, rfunc (h / pow (2, ly))) - // - //---------------------------------------------------------- - - int levelWidth (int lx) const; - int levelHeight (int ly) const; - - - //-------------------------------------------------------------- - // Number of tiles: - // - // numXTiles(lx) returns the number of tiles in x direction - // that cover a level with level number (lx, *), where * is - // any number. - // - // return value is: - // (levelWidth(lx) + tileXSize() - 1) / tileXSize() - // - // - // numYTiles(ly) returns the number of tiles in y direction - // that cover a level with level number (*, ly), where * is - // any number. - // - // return value is: - // (levelHeight(ly) + tileXSize() - 1) / tileXSize() - // - //-------------------------------------------------------------- - - int numXTiles (int lx = 0) const; - int numYTiles (int ly = 0) const; - - - //--------------------------------------------------------------- - // Level pixel ranges: - // - // dataWindowForLevel(lx, ly) returns a 2-dimensional region of - // valid pixel coordinates for a level with level number (lx, ly) - // - // return value is a Box2i with min value: - // (dataWindow.min.x, dataWindow.min.y) - // - // and max value: - // (dataWindow.min.x + levelWidth(lx) - 1, - // dataWindow.min.y + levelHeight(ly) - 1) - // - // dataWindowForLevel(level) is a convenience function used - // for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForLevel(level, level). - // - //--------------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForLevel (int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const; - - - //------------------------------------------------------------------- - // Tile pixel ranges: - // - // dataWindowForTile(dx, dy, lx, ly) returns a 2-dimensional - // region of valid pixel coordinates for a tile with tile coordinates - // (dx,dy) and level number (lx, ly). - // - // return value is a Box2i with min value: - // (dataWindow.min.x + dx * tileXSize(), - // dataWindow.min.y + dy * tileYSize()) - // - // and max value: - // (dataWindow.min.x + (dx + 1) * tileXSize() - 1, - // dataWindow.min.y + (dy + 1) * tileYSize() - 1) - // - // dataWindowForTile(dx, dy, level) is a convenience function - // used for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForTile(dx, dy, level, level). - // - //------------------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, int l = 0) const; - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int lx, int ly) const; - - //------------------------------------------------------------ - // Read pixel data: - // - // readTile(dx, dy, lx, ly) reads the tile with tile - // coordinates (dx, dy), and level number (lx, ly), - // and stores it in the current frame buffer. - // - // dx must lie in the interval [0, numXTiles(lx)-1] - // dy must lie in the interval [0, numYTiles(ly)-1] - // - // lx must lie in the interval [0, numXLevels()-1] - // ly must lie in the inverval [0, numYLevels()-1] - // - // readTile(dx, dy, level) is a convenience function used - // for ONE_LEVEL and MIPMAP_LEVELS files. It calls - // readTile(dx, dy, level, level). - // - // The two readTiles(dx1, dx2, dy1, dy2, ...) functions allow - // reading multiple tiles at once. If multi-threading is used - // the multiple tiles are read concurrently. - // - // Pixels that are outside the pixel coordinate range for the - // tile's level, are never accessed by readTile(). - // - // Attempting to access a tile that is not present in the file - // throws an InputExc exception. - // - //------------------------------------------------------------ - - void readTile (int dx, int dy, int l = 0); - void readTile (int dx, int dy, int lx, int ly); - - void readTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly); - - void readTiles (int dx1, int dx2, int dy1, int dy2, - int l = 0); - - - //-------------------------------------------------- - // Read a tile of raw pixel data from the file, - // without uncompressing it (this function is - // used to implement TiledOutputFile::copyPixels()). - //-------------------------------------------------- - - void rawTileData (int &dx, int &dy, - int &lx, int &ly, - char *pixelData, - Int64 &dataSize) const; - - //------------------------------------------------------------------ - // Read pixel sample counts into a slice in the frame buffer. - // - // readPixelSampleCount(dx, dy, lx, ly) reads the sample counts - // for tile (dx, dy) in level (lx, ly). - // - // readPixelSampleCount(dx, dy, l) calls - // readPixelSampleCount(dx, dy, lx = l, ly = l) - // - // dx must lie in the interval [0, numXTiles(lx)-1] - // dy must lie in the interval [0, numYTiles(ly)-1] - // - // lx must lie in the interval [0, numXLevels()-1] - // ly must lie in the inverval [0, numYLevels()-1] - // - // readPixelSampleCounts(dx1, dx2, dy1, dy2, lx, ly) reads all - // the sample counts for tiles within range - // [(min(dx1, dx2), min(dy1, dy2))...(max(dx1, dx2), max(dy1, dy2)], - // and on level (lx, ly) - // - // readPixelSampleCounts(dx1, dx2, dy1, dy2, l) calls - // readPixelSampleCounts(dx1, dx2, dy1, dy2, lx = l, ly = l). - //------------------------------------------------------------------ - - void readPixelSampleCount (int dx, int dy, int l = 0); - void readPixelSampleCount (int dx, int dy, int lx, int ly); - - void readPixelSampleCounts (int dx1, int dx2, - int dy1, int dy2, - int lx, int ly); - - void readPixelSampleCounts (int dx1, int dx2, - int dy1, int dy2, - int l = 0); - - struct Data; - - - - private: - - friend class InputFile; - friend class MultiPartInputFile; - - DeepTiledInputFile (InputPartData* part); - - DeepTiledInputFile (const DeepTiledInputFile &); // not implemented - DeepTiledInputFile & operator = (const DeepTiledInputFile &); // not implemented - - DeepTiledInputFile (const Header &header, OPENEXR_IMF_INTERNAL_NAMESPACE::IStream *is, int version, - int numThreads); - - void initialize (); - void multiPartInitialize(InputPartData* part); - void compatibilityInitialize(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is); - - bool isValidTile (int dx, int dy, - int lx, int ly) const; - - size_t bytesPerLineForTile (int dx, int dy, - int lx, int ly) const; - - - void getTileOrder(int dx[],int dy[],int lx[],int ly[]) const; - - - Data * _data; - - - // needed for copyPixels - friend void DeepTiledOutputFile::copyPixels(DeepTiledInputFile &); -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.cpp deleted file mode 100644 index 1262f23..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.cpp +++ /dev/null @@ -1,273 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#include "ImfDeepTiledInputPart.h" -#include "ImfMultiPartInputFile.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -DeepTiledInputPart::DeepTiledInputPart(MultiPartInputFile& multiPartFile, int partNumber) -{ - file = multiPartFile.getInputPart(partNumber); -} - - -const char * -DeepTiledInputPart::fileName () const -{ - return file->fileName(); -} - - -const Header & -DeepTiledInputPart::header () const -{ - return file->header(); -} - - -int -DeepTiledInputPart::version () const -{ - return file->version(); -} - - -void -DeepTiledInputPart::setFrameBuffer (const DeepFrameBuffer &frameBuffer) -{ - file->setFrameBuffer(frameBuffer); -} - - -const DeepFrameBuffer & -DeepTiledInputPart::frameBuffer () const -{ - return file->frameBuffer(); -} - - -bool -DeepTiledInputPart::isComplete () const -{ - return file->isComplete(); -} - - -unsigned int -DeepTiledInputPart::tileXSize () const -{ - return file->isComplete(); -} - - -unsigned int -DeepTiledInputPart::tileYSize () const -{ - return file->tileYSize(); -} - - -LevelMode -DeepTiledInputPart::levelMode () const -{ - return file->levelMode(); -} - - -LevelRoundingMode -DeepTiledInputPart::levelRoundingMode () const -{ - return file->levelRoundingMode(); -} - - -int -DeepTiledInputPart::numLevels () const -{ - return file->numLevels(); -} - - -int -DeepTiledInputPart::numXLevels () const -{ - return file->numXLevels(); -} - - -int -DeepTiledInputPart::numYLevels () const -{ - return file->numYLevels(); -} - - -bool -DeepTiledInputPart::isValidLevel (int lx, int ly) const -{ - return file->isValidLevel(lx, ly); -} - - -int -DeepTiledInputPart::levelWidth (int lx) const -{ - return file->levelWidth(lx); -} - - -int -DeepTiledInputPart::levelHeight (int ly) const -{ - return file->levelHeight(ly); -} - - -int -DeepTiledInputPart::numXTiles (int lx) const -{ - return file->numXTiles(lx); -} - - -int -DeepTiledInputPart::numYTiles (int ly) const -{ - return file->numYTiles(ly); -} - - -IMATH_NAMESPACE::Box2i -DeepTiledInputPart::dataWindowForLevel (int l) const -{ - return file->dataWindowForLevel(l); -} - -IMATH_NAMESPACE::Box2i -DeepTiledInputPart::dataWindowForLevel (int lx, int ly) const -{ - return file->dataWindowForLevel(lx, ly); -} - - -IMATH_NAMESPACE::Box2i -DeepTiledInputPart::dataWindowForTile (int dx, int dy, int l) const -{ - return file->dataWindowForTile(dx, dy, l); -} - - -IMATH_NAMESPACE::Box2i -DeepTiledInputPart::dataWindowForTile (int dx, int dy, - int lx, int ly) const -{ - return file->dataWindowForTile(dx, dy, lx, ly); -} - - -void -DeepTiledInputPart::readTile (int dx, int dy, int l) -{ - file->readTile(dx, dy, l); -} - - -void -DeepTiledInputPart::readTile (int dx, int dy, int lx, int ly) -{ - file->readTile(dx, dy, lx, ly); -} - - -void -DeepTiledInputPart::readTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly) -{ - file->readTiles(dx1, dx2, dy1, dy2, lx, ly); -} - - -void -DeepTiledInputPart::readTiles (int dx1, int dx2, int dy1, int dy2, - int l) -{ - file->readTiles(dx1, dx2, dy1, dy2, l); -} - - -void -DeepTiledInputPart::rawTileData (int &dx, int &dy, - int &lx, int &ly, - char * pixelData, - Int64 & dataSize) const -{ - file->rawTileData(dx, dy, lx, ly, pixelData, dataSize ); -} - - -void -DeepTiledInputPart::readPixelSampleCount (int dx, int dy, int l) -{ - file->readPixelSampleCount(dx, dy, l); -} - - -void -DeepTiledInputPart::readPixelSampleCount (int dx, int dy, int lx, int ly) -{ - file->readPixelSampleCount(dx, dy, lx, ly); -} - - -void -DeepTiledInputPart::readPixelSampleCounts (int dx1, int dx2, - int dy1, int dy2, - int lx, int ly) -{ - file->readPixelSampleCounts(dx1, dx2, dy1, dy2, lx, ly); -} - -void -DeepTiledInputPart::readPixelSampleCounts (int dx1, int dx2, - int dy1, int dy2, - int l) -{ - file->readPixelSampleCounts(dx1, dx2, dy1, dy2, l); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.h deleted file mode 100644 index 8663639..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.h +++ /dev/null @@ -1,362 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef IMFDEEPTILEDINPUTPART_H_ -#define IMFDEEPTILEDINPUTPART_H_ - -#include "ImfDeepTiledInputFile.h" -#include "ImfNamespace.h" -#include "ImfForward.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -class IMF_EXPORT DeepTiledInputPart -{ - public: - - DeepTiledInputPart(MultiPartInputFile& multiPartFile, int partNumber); - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //---------------------------------- - // Access to the file format version - //---------------------------------- - - int version () const; - - - //----------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the TiledInputFile object. - // - // The current frame buffer is the destination for the pixel - // data read from the file. The current frame buffer must be - // set at least once before readTile() is called. - // The current frame buffer can be changed after each call - // to readTile(). - //----------------------------------------------------------- - - void setFrameBuffer (const DeepFrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const DeepFrameBuffer & frameBuffer () const; - - - //------------------------------------------------------------ - // Check if the file is complete: - // - // isComplete() returns true if all pixels in the data window - // (in all levels) are present in the input file, or false if - // any pixels are missing. (Another program may still be busy - // writing the file, or file writing may have been aborted - // prematurely.) - //------------------------------------------------------------ - - bool isComplete () const; - - - //-------------------------------------------------- - // Utility functions: - //-------------------------------------------------- - - //--------------------------------------------------------- - // Multiresolution mode and tile size: - // The following functions return the xSize, ySize and mode - // fields of the file header's TileDescriptionAttribute. - //--------------------------------------------------------- - - unsigned int tileXSize () const; - unsigned int tileYSize () const; - LevelMode levelMode () const; - LevelRoundingMode levelRoundingMode () const; - - - //-------------------------------------------------------------------- - // Number of levels: - // - // numXLevels() returns the file's number of levels in x direction. - // - // if levelMode() == ONE_LEVEL: - // return value is: 1 - // - // if levelMode() == MIPMAP_LEVELS: - // return value is: rfunc (log (max (w, h)) / log (2)) + 1 - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (w) / log (2)) + 1 - // - // where - // w is the width of the image's data window, max.x - min.x + 1, - // y is the height of the image's data window, max.y - min.y + 1, - // and rfunc(x) is either floor(x), or ceil(x), depending on - // whether levelRoundingMode() returns ROUND_DOWN or ROUND_UP. - // - // numYLevels() returns the file's number of levels in y direction. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (h) / log (2)) + 1 - // - // - // numLevels() is a convenience function for use with - // MIPMAP_LEVELS files. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // an IEX_NAMESPACE::LogicExc exception is thrown - // - // isValidLevel(lx, ly) returns true if the file contains - // a level with level number (lx, ly), false if not. - // - //-------------------------------------------------------------------- - - int numLevels () const; - int numXLevels () const; - int numYLevels () const; - bool isValidLevel (int lx, int ly) const; - - - //---------------------------------------------------------- - // Dimensions of a level: - // - // levelWidth(lx) returns the width of a level with level - // number (lx, *), where * is any number. - // - // return value is: - // max (1, rfunc (w / pow (2, lx))) - // - // - // levelHeight(ly) returns the height of a level with level - // number (*, ly), where * is any number. - // - // return value is: - // max (1, rfunc (h / pow (2, ly))) - // - //---------------------------------------------------------- - - int levelWidth (int lx) const; - int levelHeight (int ly) const; - - - //-------------------------------------------------------------- - // Number of tiles: - // - // numXTiles(lx) returns the number of tiles in x direction - // that cover a level with level number (lx, *), where * is - // any number. - // - // return value is: - // (levelWidth(lx) + tileXSize() - 1) / tileXSize() - // - // - // numYTiles(ly) returns the number of tiles in y direction - // that cover a level with level number (*, ly), where * is - // any number. - // - // return value is: - // (levelHeight(ly) + tileXSize() - 1) / tileXSize() - // - //-------------------------------------------------------------- - - int numXTiles (int lx = 0) const; - int numYTiles (int ly = 0) const; - - - //--------------------------------------------------------------- - // Level pixel ranges: - // - // dataWindowForLevel(lx, ly) returns a 2-dimensional region of - // valid pixel coordinates for a level with level number (lx, ly) - // - // return value is a Box2i with min value: - // (dataWindow.min.x, dataWindow.min.y) - // - // and max value: - // (dataWindow.min.x + levelWidth(lx) - 1, - // dataWindow.min.y + levelHeight(ly) - 1) - // - // dataWindowForLevel(level) is a convenience function used - // for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForLevel(level, level). - // - //--------------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForLevel (int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const; - - - //------------------------------------------------------------------- - // Tile pixel ranges: - // - // dataWindowForTile(dx, dy, lx, ly) returns a 2-dimensional - // region of valid pixel coordinates for a tile with tile coordinates - // (dx,dy) and level number (lx, ly). - // - // return value is a Box2i with min value: - // (dataWindow.min.x + dx * tileXSize(), - // dataWindow.min.y + dy * tileYSize()) - // - // and max value: - // (dataWindow.min.x + (dx + 1) * tileXSize() - 1, - // dataWindow.min.y + (dy + 1) * tileYSize() - 1) - // - // dataWindowForTile(dx, dy, level) is a convenience function - // used for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForTile(dx, dy, level, level). - // - //------------------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, int l = 0) const; - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int lx, int ly) const; - - //------------------------------------------------------------ - // Read pixel data: - // - // readTile(dx, dy, lx, ly) reads the tile with tile - // coordinates (dx, dy), and level number (lx, ly), - // and stores it in the current frame buffer. - // - // dx must lie in the interval [0, numXTiles(lx)-1] - // dy must lie in the interval [0, numYTiles(ly)-1] - // - // lx must lie in the interval [0, numXLevels()-1] - // ly must lie in the inverval [0, numYLevels()-1] - // - // readTile(dx, dy, level) is a convenience function used - // for ONE_LEVEL and MIPMAP_LEVELS files. It calls - // readTile(dx, dy, level, level). - // - // The two readTiles(dx1, dx2, dy1, dy2, ...) functions allow - // reading multiple tiles at once. If multi-threading is used - // the multiple tiles are read concurrently. - // - // Pixels that are outside the pixel coordinate range for the - // tile's level, are never accessed by readTile(). - // - // Attempting to access a tile that is not present in the file - // throws an InputExc exception. - // - //------------------------------------------------------------ - - void readTile (int dx, int dy, int l = 0); - void readTile (int dx, int dy, int lx, int ly); - - void readTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly); - - void readTiles (int dx1, int dx2, int dy1, int dy2, - int l = 0); - - - //-------------------------------------------------- - // Read a tile of raw pixel data from the file, - // without uncompressing it (this function is - // used to implement TiledOutputFile::copyPixels()). - //-------------------------------------------------- - - void rawTileData (int &dx, int &dy, - int &lx, int &ly, - char *data, - Int64 &dataSize - ) const; - - //------------------------------------------------------------------ - // Read pixel sample counts into a slice in the frame buffer. - // - // readPixelSampleCount(dx, dy, lx, ly) reads the sample counts - // for tile (dx, dy) in level (lx, ly). - // - // readPixelSampleCount(dx, dy, l) calls - // readPixelSampleCount(dx, dy, lx = l, ly = l) - // - // dx must lie in the interval [0, numXTiles(lx)-1] - // dy must lie in the interval [0, numYTiles(ly)-1] - // - // lx must lie in the interval [0, numXLevels()-1] - // ly must lie in the inverval [0, numYLevels()-1] - // - // readPixelSampleCounts(dx1, dx2, dy1, dy2, lx, ly) reads all - // the sample counts for tiles within range - // [(min(dx1, dx2), min(dy1, dy2))...(max(dx1, dx2), max(dy1, dy2)], - // and on level (lx, ly) - // - // readPixelSampleCounts(dx1, dx2, dy1, dy2, l) calls - // readPixelSampleCounts(dx1, dx2, dy1, dy2, lx = l, ly = l). - //------------------------------------------------------------------ - - void readPixelSampleCount (int dx, int dy, int l = 0); - void readPixelSampleCount (int dx, int dy, int lx, int ly); - - void readPixelSampleCounts (int dx1, int dx2, - int dy1, int dy2, - int lx, int ly); - - void readPixelSampleCounts (int dx1, int dx2, - int dy1, int dy2, - int l = 0); - - private: - DeepTiledInputFile* file; - - friend void DeepTiledOutputFile::copyPixels(DeepTiledInputPart &); -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif /* IMFDEEPTILEDINPUTPART_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.cpp deleted file mode 100644 index a9b226b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.cpp +++ /dev/null @@ -1,2055 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class DeepTiledOutputFile -// -//----------------------------------------------------------------------------- - -#include "ImfDeepTiledOutputFile.h" -#include "ImfDeepTiledInputFile.h" -#include "ImfDeepTiledInputPart.h" -#include "ImfInputFile.h" -#include "ImfTileDescriptionAttribute.h" -#include "ImfPreviewImageAttribute.h" -#include "ImfChannelList.h" -#include "ImfMisc.h" -#include "ImfTiledMisc.h" -#include "ImfStdIO.h" -#include "ImfCompressor.h" -#include "ImfOutputStreamMutex.h" -#include "ImfOutputPartData.h" -#include "ImfArray.h" -#include "ImfXdr.h" -#include "ImfVersion.h" -#include "ImfTileOffsets.h" -#include "ImfThreading.h" -#include "ImfPartType.h" - -#include "ImathBox.h" - -#include "IlmThreadPool.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" - -#include "Iex.h" - -#include -#include -#include -#include -#include -#include - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::V2i; -using std::string; -using std::vector; -using std::ofstream; -using std::map; -using std::min; -using std::max; -using std::swap; -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; -using ILMTHREAD_NAMESPACE::Semaphore; -using ILMTHREAD_NAMESPACE::Task; -using ILMTHREAD_NAMESPACE::TaskGroup; -using ILMTHREAD_NAMESPACE::ThreadPool; - -namespace { - -struct TOutSliceInfo -{ - PixelType type; - const char * base; - size_t sampleStride; - size_t xStride; - size_t yStride; - bool zero; - int xTileCoords; - int yTileCoords; - - TOutSliceInfo (PixelType type = HALF, - size_t sampleStride = 0, - size_t xStride = 0, - size_t yStride = 0, - bool zero = false, - int xTileCoords = 0, - int yTileCoords = 0); -}; - - -TOutSliceInfo::TOutSliceInfo (PixelType t, - size_t spst, - size_t xStride, - size_t yStride, - bool z, - int xtc, - int ytc) -: - type (t), - sampleStride (spst), - xStride(xStride), - yStride(yStride), - zero (z), - xTileCoords (xtc), - yTileCoords (ytc) -{ - // empty -} - - -struct TileCoord -{ - int dx; - int dy; - int lx; - int ly; - - - TileCoord (int xTile = 0, int yTile = 0, - int xLevel = 0, int yLevel = 0) - : - dx (xTile), dy (yTile), - lx (xLevel), ly (yLevel) - { - // empty - } - - - bool - operator < (const TileCoord &other) const - { - return (ly < other.ly) || - (ly == other.ly && lx < other.lx) || - ((ly == other.ly && lx == other.lx) && - ((dy < other.dy) || (dy == other.dy && dx < other.dx))); - } - - - bool - operator == (const TileCoord &other) const - { - return lx == other.lx && - ly == other.ly && - dx == other.dx && - dy == other.dy; - } -}; - - -struct BufferedTile -{ - char * pixelData; - Int64 pixelDataSize; - Int64 unpackedDataSize; - char * sampleCountTableData; - Int64 sampleCountTableSize; - - BufferedTile (const char *data, int size, int unpackedSize, - const char *tableData, int tableSize): - pixelData (0), - pixelDataSize(size), - unpackedDataSize(unpackedSize), - sampleCountTableData(0), - sampleCountTableSize(tableSize) - { - pixelData = new char[pixelDataSize]; - memcpy (pixelData, data, pixelDataSize); - - sampleCountTableData = new char[tableSize]; - memcpy (sampleCountTableData, tableData, tableSize); - } - - ~BufferedTile() - { - delete [] pixelData; - delete [] sampleCountTableData; - } -}; - - -typedef map TileMap; - - -struct TileBuffer -{ - Array buffer; - const char * dataPtr; - Int64 dataSize; - Int64 uncompressedSize; - Compressor * compressor; - Array sampleCountTableBuffer; - const char * sampleCountTablePtr; - Int64 sampleCountTableSize; - Compressor* sampleCountTableCompressor; - TileCoord tileCoord; - bool hasException; - string exception; - - TileBuffer (); - ~TileBuffer (); - - inline void wait () {_sem.wait();} - inline void post () {_sem.post();} - - protected: - - Semaphore _sem; -}; - - -TileBuffer::TileBuffer (): - dataPtr (0), - dataSize (0), - compressor (0), - sampleCountTablePtr (0), - sampleCountTableCompressor (0), - hasException (false), - exception (), - _sem (1) -{ - // empty -} - - -TileBuffer::~TileBuffer () -{ - if (compressor != 0) - delete compressor; - - if (sampleCountTableCompressor != 0) - delete sampleCountTableCompressor; -} - - -} // namespace - - -struct DeepTiledOutputFile::Data -{ - Header header; // the image header - int version; // file format version - bool multipart; // file is multipart - TileDescription tileDesc; // describes the tile layout - DeepFrameBuffer frameBuffer; // framebuffer to write into - Int64 previewPosition; - LineOrder lineOrder; // the file's lineorder - int minX; // data window's min x coord - int maxX; // data window's max x coord - int minY; // data window's min y coord - int maxY; // data window's max x coord - - int numXLevels; // number of x levels - int numYLevels; // number of y levels - int * numXTiles; // number of x tiles at a level - int * numYTiles; // number of y tiles at a level - - TileOffsets tileOffsets; // stores offsets in file for - // each tile - - Compressor::Format format; // compressor's data format - vector slices; // info about channels in file - - vector tileBuffers; - - Int64 tileOffsetsPosition; // position of the tile index - - TileMap tileMap; // the map of buffered tiles - TileCoord nextTileToWrite; - - int partNumber; // the output part number - - char* sampleCountSliceBase; // the pointer to the number - // of samples in each pixel - int sampleCountXStride; // the x stride for sampleCountSliceBase - int sampleCountYStride; // the y stride for sampleCountSliceBase - int sampleCountXTileCoords; // using x coordinates relative to current tile - int sampleCountYTileCoords; // using y coordinates relative to current tile - - Int64 maxSampleCountTableSize;// the max size in bytes for a pixel - // sample count table - OutputStreamMutex* _streamData; - bool _deleteStream; - - Data (int numThreads); - ~Data (); - - inline TileBuffer * getTileBuffer (int number); - // hash function from tile - // buffer coords into our - // vector of tile buffers - - int& getSampleCount(int x, int y); - // get the number of samples - // in each pixel - - TileCoord nextTileCoord (const TileCoord &a); -}; - - -DeepTiledOutputFile::Data::Data (int numThreads): - numXTiles(0), - numYTiles(0), - tileOffsetsPosition (0), - partNumber(-1), - _streamData(NULL), - _deleteStream(true) -{ - // - // We need at least one tileBuffer, but if threading is used, - // to keep n threads busy we need 2*n tileBuffers - // - - tileBuffers.resize (max (1, 2 * numThreads)); - for (size_t i = 0; i < tileBuffers.size(); i++) - tileBuffers[i] = 0; -} - - -DeepTiledOutputFile::Data::~Data () -{ - delete [] numXTiles; - delete [] numYTiles; - - // - // Delete all the tile buffers, if any still happen to exist - // - - for (TileMap::iterator i = tileMap.begin(); i != tileMap.end(); ++i) - delete i->second; - - for (size_t i = 0; i < tileBuffers.size(); i++) - if (tileBuffers[i] != 0) - delete tileBuffers[i]; - - for (size_t i = 0; i < slices.size(); i++) - delete slices[i]; -} - - -int& -DeepTiledOutputFile::Data::getSampleCount(int x, int y) -{ - return sampleCount(sampleCountSliceBase, - sampleCountXStride, - sampleCountYStride, - x, y); -} - - -TileBuffer* -DeepTiledOutputFile::Data::getTileBuffer (int number) -{ - return tileBuffers[number % tileBuffers.size()]; -} - - -TileCoord -DeepTiledOutputFile::Data::nextTileCoord (const TileCoord &a) -{ - TileCoord b = a; - - if (lineOrder == INCREASING_Y) - { - b.dx++; - - if (b.dx >= numXTiles[b.lx]) - { - b.dx = 0; - b.dy++; - - if (b.dy >= numYTiles[b.ly]) - { - // - // the next tile is in the next level - // - - b.dy = 0; - - switch (tileDesc.mode) - { - case ONE_LEVEL: - case MIPMAP_LEVELS: - - b.lx++; - b.ly++; - break; - - case RIPMAP_LEVELS: - - b.lx++; - - if (b.lx >= numXLevels) - { - b.lx = 0; - b.ly++; - - #ifdef DEBUG - assert (b.ly <= numYLevels); - #endif - } - break; - case NUM_LEVELMODES : - throw IEX_NAMESPACE::LogicExc("unknown level mode computing nextTileCoord"); - } - } - } - } - else if (lineOrder == DECREASING_Y) - { - b.dx++; - - if (b.dx >= numXTiles[b.lx]) - { - b.dx = 0; - b.dy--; - - if (b.dy < 0) - { - // - // the next tile is in the next level - // - - switch (tileDesc.mode) - { - case ONE_LEVEL: - case MIPMAP_LEVELS: - - b.lx++; - b.ly++; - break; - - case RIPMAP_LEVELS: - - b.lx++; - - if (b.lx >= numXLevels) - { - b.lx = 0; - b.ly++; - - #ifdef DEBUG - assert (b.ly <= numYLevels); - #endif - } - break; - case NUM_LEVELMODES : - throw IEX_NAMESPACE::LogicExc("unknown level mode computing nextTileCoord"); - } - - if (b.ly < numYLevels) - b.dy = numYTiles[b.ly] - 1; - } - } - }else if(lineOrder==RANDOM_Y) - { - THROW (IEX_NAMESPACE::ArgExc, - "can't compute next tile from randomly ordered image: use getTilesInOrder instead"); - - } - - return b; -} - - -namespace { - -void -writeTileData (DeepTiledOutputFile::Data *ofd, - int dx, int dy, - int lx, int ly, - const char pixelData[], - Int64 pixelDataSize, - Int64 unpackedDataSize, - const char sampleCountTableData[], - Int64 sampleCountTableSize) -{ - - // - // Store a block of pixel data in the output file, and try - // to keep track of the current writing position the file, - // without calling tellp() (tellp() can be fairly expensive). - // - - Int64 currentPosition = ofd->_streamData->currentPosition; - ofd->_streamData->currentPosition = 0; - - if (currentPosition == 0) - currentPosition = ofd->_streamData->os->tellp(); - - ofd->tileOffsets (dx, dy, lx, ly) = currentPosition; - - #ifdef DEBUG - assert (ofd->_streamData->os->tellp() == currentPosition); - #endif - - // - // Write the tile header. - // - - if (ofd->multipart) - { - Xdr::write (*ofd->_streamData->os, ofd->partNumber); - } - Xdr::write (*ofd->_streamData->os, dx); - Xdr::write (*ofd->_streamData->os, dy); - Xdr::write (*ofd->_streamData->os, lx); - Xdr::write (*ofd->_streamData->os, ly); - - // - // Write the packed size of the pixel sample count table (64 bits) - // - - Xdr::write (*ofd->_streamData->os, sampleCountTableSize); - - // - // Write the packed and unpacked data size (64 bits each) - // - - Xdr::write (*ofd->_streamData->os, pixelDataSize); - Xdr::write (*ofd->_streamData->os, unpackedDataSize); - - // - // Write the compressed pixel sample count table. - // - - ofd->_streamData->os->write (sampleCountTableData, sampleCountTableSize); - - // - // Write the compressed data. - // - - ofd->_streamData->os->write (pixelData, pixelDataSize); - - // - // Keep current position in the file so that we can avoid - // redundant seekg() operations (seekg() can be fairly expensive). - // - - ofd->_streamData->currentPosition = currentPosition + - 4 * Xdr::size() + // dx, dy, lx, ly, - 3 * Xdr::size() + // sampleCountTableSize, - // pixelDataSize, - // unpackedDataSize - sampleCountTableSize + - pixelDataSize; - - if (ofd->multipart) - { - ofd->_streamData->currentPosition += Xdr::size(); - } -} - - - -void -bufferedTileWrite ( - DeepTiledOutputFile::Data *ofd, - int dx, int dy, - int lx, int ly, - const char pixelData[], - Int64 pixelDataSize, - Int64 unpackedDataSize, - const char sampleCountTableData[], - Int64 sampleCountTableSize) -{ - // - // Check if a tile with coordinates (dx,dy,lx,ly) has already been written. - // - - if (ofd->tileOffsets (dx, dy, lx, ly)) - { - THROW (IEX_NAMESPACE::ArgExc, - "Attempt to write tile " - "(" << dx << ", " << dy << ", " << lx << ", " << ly << ") " - "more than once."); - } - - // - // If tiles can be written in random order, then don't buffer anything. - // - - if (ofd->lineOrder == RANDOM_Y) - { - writeTileData (ofd, dx, dy, lx, ly, - pixelData, pixelDataSize, unpackedDataSize, - sampleCountTableData, sampleCountTableSize); - return; - } - - // - // If the tiles cannot be written in random order, then check if a - // tile with coordinates (dx,dy,lx,ly) has already been buffered. - // - - TileCoord currentTile = TileCoord(dx, dy, lx, ly); - - if (ofd->tileMap.find (currentTile) != ofd->tileMap.end()) - { - THROW (IEX_NAMESPACE::ArgExc, - "Attempt to write tile " - "(" << dx << ", " << dy << ", " << lx << ", " << ly << ") " - "more than once."); - } - - // - // If all the tiles before this one have already been written to the file, - // then write this tile immediately and check if we have buffered tiles - // that can be written after this tile. - // - // Otherwise, buffer the tile so it can be written to file later. - // - - if (ofd->nextTileToWrite == currentTile) - { - writeTileData (ofd, dx, dy, lx, ly, - pixelData, pixelDataSize, unpackedDataSize, - sampleCountTableData, sampleCountTableSize); - ofd->nextTileToWrite = ofd->nextTileCoord (ofd->nextTileToWrite); - - TileMap::iterator i = ofd->tileMap.find (ofd->nextTileToWrite); - - // - // Step through the tiles and write all successive buffered tiles after - // the current one. - // - - while(i != ofd->tileMap.end()) - { - // - // Write the tile, and then delete the tile's buffered data - // - - writeTileData (ofd, - i->first.dx, i->first.dy, - i->first.lx, i->first.ly, - i->second->pixelData, - i->second->pixelDataSize, - i->second->unpackedDataSize, - i->second->sampleCountTableData, - i->second->sampleCountTableSize); - - delete i->second; - ofd->tileMap.erase (i); - - // - // Proceed to the next tile - // - - ofd->nextTileToWrite = ofd->nextTileCoord (ofd->nextTileToWrite); - i = ofd->tileMap.find (ofd->nextTileToWrite); - } - } - else - { - // - // Create a new BufferedTile, copy the pixelData into it, and - // insert it into the tileMap. - // - - ofd->tileMap[currentTile] = - new BufferedTile ((const char *)pixelData, pixelDataSize, unpackedDataSize, - sampleCountTableData, sampleCountTableSize); - } -} - - -void -convertToXdr (DeepTiledOutputFile::Data *ofd, - Array& tileBuffer, - int numScanLines, - vector& bytesPerLine) -{ - // - // Convert the contents of a TiledOutputFile's tileBuffer from the - // machine's native representation to Xdr format. This function is called - // by writeTile(), below, if the compressor wanted its input pixel data - // in the machine's native format, but then failed to compress the data - // (most compressors will expand rather than compress random input data). - // - // Note that this routine assumes that the machine's native representation - // of the pixel data has the same size as the Xdr representation. This - // makes it possible to convert the pixel data in place, without an - // intermediate temporary buffer. - // - - // - // Set these to point to the start of the tile. - // We will write to toPtr, and read from fromPtr. - // - - char *writePtr = tileBuffer; - const char *readPtr = writePtr; - - // - // Iterate over all scan lines in the tile. - // - - for (int y = 0; y < numScanLines; ++y) - { - // - // Iterate over all slices in the file. - // - - for (unsigned int i = 0; i < ofd->slices.size(); ++i) - { - const TOutSliceInfo &slice = *ofd->slices[i]; - - // - // Convert the samples in place. - // - - Int64 numPixelsPerScanLine = bytesPerLine[y]; - - convertInPlace (writePtr, readPtr, slice.type, - numPixelsPerScanLine); - } - } - - #ifdef DEBUG - - assert (writePtr == readPtr); - - #endif -} - - -// -// A TileBufferTask encapsulates the task of copying a tile from -// the user's framebuffer into a LineBuffer and compressing the data -// if necessary. -// - -class TileBufferTask: public Task -{ - public: - - TileBufferTask (TaskGroup *group, - DeepTiledOutputFile::Data *ofd, - int number, - int dx, int dy, - int lx, int ly); - - virtual ~TileBufferTask (); - - virtual void execute (); - - private: - - DeepTiledOutputFile::Data * _ofd; - TileBuffer * _tileBuffer; -}; - - -TileBufferTask::TileBufferTask - (TaskGroup *group, - DeepTiledOutputFile::Data *ofd, - int number, - int dx, int dy, - int lx, int ly) -: - Task (group), - _ofd (ofd), - _tileBuffer (_ofd->getTileBuffer (number)) -{ - // - // Wait for the tileBuffer to become available - // - - _tileBuffer->wait (); - _tileBuffer->tileCoord = TileCoord (dx, dy, lx, ly); -} - - -TileBufferTask::~TileBufferTask () -{ - // - // Signal that the tile buffer is now free - // - - _tileBuffer->post (); -} - - -void -TileBufferTask::execute () -{ - try - { - // - // First copy the pixel data from the frame buffer - // into the tile buffer - // - // Convert one tile's worth of pixel data to - // a machine-independent representation, and store - // the result in _tileBuffer->buffer. - // - - Box2i tileRange = OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForTile ( - _ofd->tileDesc, - _ofd->minX, _ofd->maxX, - _ofd->minY, _ofd->maxY, - _tileBuffer->tileCoord.dx, - _tileBuffer->tileCoord.dy, - _tileBuffer->tileCoord.lx, - _tileBuffer->tileCoord.ly); - - int numScanLines = tileRange.max.y - tileRange.min.y + 1; -// int numPixelsPerScanLine = tileRange.max.x - tileRange.min.x + 1; - - // - // Get the bytes for each line. - // - - vector bytesPerLine(_ofd->tileDesc.ySize); - vector xOffsets(_ofd->slices.size()); - vector yOffsets(_ofd->slices.size()); - for (size_t i = 0; i < _ofd->slices.size(); i++) - { - const TOutSliceInfo &slice = *_ofd->slices[i]; - xOffsets[i] = slice.xTileCoords * tileRange.min.x; - yOffsets[i] = slice.yTileCoords * tileRange.min.y; - } - - calculateBytesPerLine(_ofd->header, - _ofd->sampleCountSliceBase, - _ofd->sampleCountXStride, - _ofd->sampleCountYStride, - tileRange.min.x, tileRange.max.x, - tileRange.min.y, tileRange.max.y, - xOffsets, yOffsets, - bytesPerLine); - - // - // Allocate the memory for internal buffer. - // (TODO) more efficient memory management? - // - - Int64 totalBytes = 0; - Int64 maxBytesPerTileLine = 0; - for (size_t i = 0; i < bytesPerLine.size(); i++) - { - totalBytes += bytesPerLine[i]; - if (bytesPerLine[i] > maxBytesPerTileLine) - maxBytesPerTileLine = bytesPerLine[i]; - } - _tileBuffer->buffer.resizeErase(totalBytes); - - char *writePtr = _tileBuffer->buffer; - - // - // Iterate over the scan lines in the tile. - // - - int xOffsetForSampleCount = - (_ofd->sampleCountXTileCoords == 0) ? 0 : tileRange.min.x; - int yOffsetForSampleCount = - (_ofd->sampleCountYTileCoords == 0) ? 0 : tileRange.min.y; - - for (int y = tileRange.min.y; y <= tileRange.max.y; ++y) - { - // - // Iterate over all image channels. - // - - for (unsigned int i = 0; i < _ofd->slices.size(); ++i) - { - const TOutSliceInfo &slice = *_ofd->slices[i]; - - - // - // Fill the tile buffer with pixel data. - // - - if (slice.zero) - { - // - // The frame buffer contains no data for this channel. - // Store zeroes in _data->tileBuffer. - // - - fillChannelWithZeroes (writePtr, _ofd->format, slice.type, - bytesPerLine[y - tileRange.min.y]); - } - else - { - // - // The frame buffer contains data for this channel. - // - - - int xOffsetForData = slice.xTileCoords ? tileRange.min.x : 0; - int yOffsetForData = slice.yTileCoords ? tileRange.min.y : 0; - - // (TOOD) treat sample count offsets differently. - copyFromDeepFrameBuffer (writePtr, - slice.base, - _ofd->sampleCountSliceBase, - _ofd->sampleCountXStride, - _ofd->sampleCountYStride, - y, - tileRange.min.x, - tileRange.max.x, - xOffsetForSampleCount, - yOffsetForSampleCount, - xOffsetForData, - yOffsetForData, - slice.sampleStride, - slice.xStride, - slice.yStride, - _ofd->format, - slice.type); -#if defined(DEBUG) - assert(writePtr-_tileBuffer->buffer<=totalBytes); -#endif - } - } - } - - // - // Compress the pixel sample count table. - // - - char* ptr = _tileBuffer->sampleCountTableBuffer; - Int64 tableDataSize = 0; - for (int i = tileRange.min.y; i <= tileRange.max.y; i++) - { - int count = 0; - for (int j = tileRange.min.x; j <= tileRange.max.x; j++) - { - count += _ofd->getSampleCount(j - xOffsetForSampleCount, - i - yOffsetForSampleCount); - Xdr::write (ptr, count); - tableDataSize += sizeof (int); - } - } - - if(_tileBuffer->sampleCountTableCompressor) - { - _tileBuffer->sampleCountTableSize = - _tileBuffer->sampleCountTableCompressor->compress ( - _tileBuffer->sampleCountTableBuffer, - tableDataSize, - tileRange.min.y, - _tileBuffer->sampleCountTablePtr); - } - - // - // If we can't make data shrink (or compression was disabled), then just use the raw data. - // - - if ( ! _tileBuffer->sampleCountTableCompressor || - _tileBuffer->sampleCountTableSize >= _ofd->maxSampleCountTableSize) - { - _tileBuffer->sampleCountTableSize = _ofd->maxSampleCountTableSize; - _tileBuffer->sampleCountTablePtr = _tileBuffer->sampleCountTableBuffer; - } - - // - // Compress the contents of the tileBuffer, - // and store the compressed data in the output file. - // - - _tileBuffer->dataSize = writePtr - _tileBuffer->buffer; - _tileBuffer->uncompressedSize = _tileBuffer->dataSize; - _tileBuffer->dataPtr = _tileBuffer->buffer; - - // (TODO) don't do this all the time. - if (_tileBuffer->compressor != 0) - delete _tileBuffer->compressor; - _tileBuffer->compressor = newTileCompressor - (_ofd->header.compression(), - maxBytesPerTileLine, - _ofd->tileDesc.ySize, - _ofd->header); - - if (_tileBuffer->compressor) - { - const char *compPtr; - - Int64 compSize = _tileBuffer->compressor->compressTile - (_tileBuffer->dataPtr, - _tileBuffer->dataSize, - tileRange, compPtr); - - if (compSize < _tileBuffer->dataSize) - { - _tileBuffer->dataSize = compSize; - _tileBuffer->dataPtr = compPtr; - } - else if (_ofd->format == Compressor::NATIVE) - { - // - // The data did not shrink during compression, but - // we cannot write to the file using native format, - // so we need to convert the lineBuffer to Xdr. - // - - convertToXdr (_ofd, _tileBuffer->buffer, numScanLines, - bytesPerLine); - } - } - } - catch (std::exception &e) - { - if (!_tileBuffer->hasException) - { - _tileBuffer->exception = e.what (); - _tileBuffer->hasException = true; - } - } - catch (...) - { - if (!_tileBuffer->hasException) - { - _tileBuffer->exception = "unrecognized exception"; - _tileBuffer->hasException = true; - } - } -} - -} // namespace - - -DeepTiledOutputFile::DeepTiledOutputFile - (const char fileName[], - const Header &header, - int numThreads) -: - _data (new Data (numThreads)) - -{ - _data->_streamData=new OutputStreamMutex(); - _data->_deleteStream =true; - try - { - header.sanityCheck (true); - _data->_streamData->os = new StdOFStream (fileName); - initialize (header); - _data->_streamData->currentPosition = _data->_streamData->os->tellp(); - - // Write header and empty offset table to the file. - writeMagicNumberAndVersionField(*_data->_streamData->os, _data->header); - _data->previewPosition = _data->header.writeTo (*_data->_streamData->os, true); - _data->tileOffsetsPosition = _data->tileOffsets.writeTo (*_data->_streamData->os); - _data->multipart = false; - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (_data && _data->_streamData && _data->_streamData->os) delete _data->_streamData->os; - if (_data && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - if (_data && _data->_streamData && _data->_streamData->os) delete _data->_streamData->os; - if (_data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - throw; - } -} - - -DeepTiledOutputFile::DeepTiledOutputFile - (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - int numThreads) -: - _data (new Data (numThreads)) -{ - _data->_streamData=new OutputStreamMutex(); - _data->_deleteStream=false; - - try - { - header.sanityCheck(true); - _data->_streamData->os = &os; - initialize (header); - _data->_streamData->currentPosition = _data->_streamData->os->tellp(); - - // Write header and empty offset table to the file. - writeMagicNumberAndVersionField(*_data->_streamData->os, _data->header); - _data->previewPosition = _data->header.writeTo (*_data->_streamData->os, true); - _data->tileOffsetsPosition = _data->tileOffsets.writeTo (*_data->_streamData->os); - _data->multipart = false; - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (_data && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << os.fileName() << "\". " << e); - throw; - } - catch (...) - { - if (_data && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - throw; - } -} - -DeepTiledOutputFile::DeepTiledOutputFile(const OutputPartData* part) -{ - - try - { - if (part->header.type() != DEEPTILE) - throw IEX_NAMESPACE::ArgExc("Can't build a DeepTiledOutputFile from " - "a type-mismatched part."); - - _data = new Data (part->numThreads); - _data->_streamData=part->mutex; - _data->_deleteStream=false; - initialize(part->header); - _data->partNumber = part->partNumber; - _data->tileOffsetsPosition = part->chunkOffsetTablePosition; - _data->previewPosition = part->previewPosition; - _data->multipart = part->multipart; - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (_data) delete _data; - - REPLACE_EXC (e, "Cannot initialize output part " - "\"" << part->partNumber << "\". " << e); - throw; - } - catch (...) - { - if (_data) delete _data; - - throw; - } -} - -void -DeepTiledOutputFile::initialize (const Header &header) -{ - _data->header = header; - _data->header.setType(DEEPTILE); - _data->lineOrder = _data->header.lineOrder(); - - // - // Check that the file is indeed tiled - // - - _data->tileDesc = _data->header.tileDescription(); - - // - // Save the dataWindow information - // - - const Box2i &dataWindow = _data->header.dataWindow(); - _data->minX = dataWindow.min.x; - _data->maxX = dataWindow.max.x; - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - // - // Precompute level and tile information to speed up utility functions - // - - precalculateTileInfo (_data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - _data->numXTiles, _data->numYTiles, - _data->numXLevels, _data->numYLevels); - - // - // Determine the first tile coordinate that we will be writing - // if the file is not RANDOM_Y. - // - - _data->nextTileToWrite = (_data->lineOrder == INCREASING_Y)? - TileCoord (0, 0, 0, 0): - TileCoord (0, _data->numYTiles[0] - 1, 0, 0); - - Compressor* compressor = newTileCompressor - (_data->header.compression(), - 0, - _data->tileDesc.ySize, - _data->header); - - _data->format = defaultFormat (compressor); - - if (compressor != 0) - delete compressor; - - _data->tileOffsets = TileOffsets (_data->tileDesc.mode, - _data->numXLevels, - _data->numYLevels, - _data->numXTiles, - _data->numYTiles); - - //ignore the existing value of chunkCount - correct it if it's wrong - _data->header.setChunkCount(getChunkOffsetTableSize(_data->header,true)); - - _data->maxSampleCountTableSize = _data->tileDesc.ySize * - _data->tileDesc.xSize * - sizeof(int); - - - for (size_t i = 0; i < _data->tileBuffers.size(); i++) - { - _data->tileBuffers[i] = new TileBuffer (); - - _data->tileBuffers[i]->sampleCountTableBuffer. - resizeErase(_data->maxSampleCountTableSize); - - char * p = &(_data->tileBuffers[i]->sampleCountTableBuffer[0]); - memset (p, 0, _data->maxSampleCountTableSize); - - _data->tileBuffers[i]->sampleCountTableCompressor = - newCompressor (_data->header.compression(), - _data->maxSampleCountTableSize, - _data->header); - } -} - - -DeepTiledOutputFile::~DeepTiledOutputFile () -{ - if (_data) - { - { - Lock lock(*_data->_streamData); - Int64 originalPosition = _data->_streamData->os->tellp(); - - if (_data->tileOffsetsPosition > 0) - { - try - { - _data->_streamData->os->seekp (_data->tileOffsetsPosition); - _data->tileOffsets.writeTo (*_data->_streamData->os); - - // - // Restore the original position. - // - _data->_streamData->os->seekp (originalPosition); - } - catch (...) - { - // - // We cannot safely throw any exceptions from here. - // This destructor may have been called because the - // stack is currently being unwound for another - // exception. - // - } - } - } - - if (_data->_deleteStream && _data->_streamData) - delete _data->_streamData->os; - - // - // (TODO) we should have a way to tell if the stream data is owned by - // this file or by a parent multipart file. - // - - if (_data->partNumber == -1 && _data->_streamData) - delete _data->_streamData; - - delete _data; - } -} - - -const char * -DeepTiledOutputFile::fileName () const -{ - return _data->_streamData->os->fileName(); -} - - -const Header & -DeepTiledOutputFile::header () const -{ - return _data->header; -} - - -void -DeepTiledOutputFile::setFrameBuffer (const DeepFrameBuffer &frameBuffer) -{ - Lock lock (*_data->_streamData); - - // - // Check if the new frame buffer descriptor - // is compatible with the image file header. - // - - const ChannelList &channels = _data->header.channels(); - - for (ChannelList::ConstIterator i = channels.begin(); - i != channels.end(); - ++i) - { - DeepFrameBuffer::ConstIterator j = frameBuffer.find (i.name()); - - if (j == frameBuffer.end()) - continue; - - if (i.channel().type != j.slice().type) - THROW (IEX_NAMESPACE::ArgExc, "Pixel type of \"" << i.name() << "\" channel " - "of output file \"" << fileName() << "\" is " - "not compatible with the frame buffer's " - "pixel type."); - - if (j.slice().xSampling != 1 || j.slice().ySampling != 1) - THROW (IEX_NAMESPACE::ArgExc, "All channels in a tiled file must have" - "sampling (1,1)."); - } - - // - // Store the pixel sample count table. - // - - const Slice& sampleCountSlice = frameBuffer.getSampleCountSlice(); - if (sampleCountSlice.base == 0) - { - throw IEX_NAMESPACE::ArgExc ("Invalid base pointer, please set a proper sample count slice."); - } - else - { - _data->sampleCountSliceBase = sampleCountSlice.base; - _data->sampleCountXStride = sampleCountSlice.xStride; - _data->sampleCountYStride = sampleCountSlice.yStride; - _data->sampleCountXTileCoords = sampleCountSlice.xTileCoords; - _data->sampleCountYTileCoords = sampleCountSlice.yTileCoords; - } - - // - // Initialize slice table for writePixels(). - // Pixel sample count slice is not presented in the header, - // so it wouldn't be added here. - // Store the pixel base pointer table. - // - - vector slices; - - for (ChannelList::ConstIterator i = channels.begin(); - i != channels.end(); - ++i) - { - DeepFrameBuffer::ConstIterator j = frameBuffer.find (i.name()); - - if (j == frameBuffer.end()) - { - // - // Channel i is not present in the frame buffer. - // In the file, channel i will contain only zeroes. - // - - slices.push_back (new TOutSliceInfo (i.channel().type, - 0, // sampleStride, - 0, // xStride - 0, // yStride - true)); // zero - } - else - { - // - // Channel i is present in the frame buffer. - // - - slices.push_back (new TOutSliceInfo (j.slice().type, - j.slice().sampleStride, - j.slice().xStride, - j.slice().yStride, - false, // zero - (j.slice().xTileCoords)? 1: 0, - (j.slice().yTileCoords)? 1: 0)); - - TOutSliceInfo* slice = slices.back(); - slice->base = j.slice().base; - - } - } - - // - // Store the new frame buffer. - // - - _data->frameBuffer = frameBuffer; - - for (size_t i = 0; i < _data->slices.size(); i++) - delete _data->slices[i]; - _data->slices = slices; -} - - -const DeepFrameBuffer & -DeepTiledOutputFile::frameBuffer () const -{ - Lock lock (*_data->_streamData); - return _data->frameBuffer; -} - - -void -DeepTiledOutputFile::writeTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly) -{ - try - { - Lock lock (*_data->_streamData); - - if (_data->slices.size() == 0) - throw IEX_NAMESPACE::ArgExc ("No frame buffer specified " - "as pixel data source."); - - if (!isValidTile (dx1, dy1, lx, ly) || !isValidTile (dx2, dy2, lx, ly)) - throw IEX_NAMESPACE::ArgExc ("Tile coordinates are invalid."); - - if (!isValidLevel (lx, ly)) - THROW (IEX_NAMESPACE::ArgExc, - "Level coordinate " - "(" << lx << ", " << ly << ") " - "is invalid."); - // - // Determine the first and last tile coordinates in both dimensions - // based on the file's lineOrder - // - - if (dx1 > dx2) - swap (dx1, dx2); - - if (dy1 > dy2) - swap (dy1, dy2); - - int dyStart = dy1; - int dyStop = dy2 + 1; - int dY = 1; - - if (_data->lineOrder == DECREASING_Y) - { - dyStart = dy2; - dyStop = dy1 - 1; - dY = -1; - } - - int numTiles = (dx2 - dx1 + 1) * (dy2 - dy1 + 1); - int numTasks = min ((int)_data->tileBuffers.size(), numTiles); - - // - // Create a task group for all tile buffer tasks. When the - // task group goes out of scope, the destructor waits until - // all tasks are complete. - // - - { - TaskGroup taskGroup; - - // - // Add in the initial compression tasks to the thread pool - // - - int nextCompBuffer = 0; - int dxComp = dx1; - int dyComp = dyStart; - - while (nextCompBuffer < numTasks) - { - ThreadPool::addGlobalTask (new TileBufferTask (&taskGroup, - _data, - nextCompBuffer++, - dxComp, dyComp, - lx, ly)); - dxComp++; - - if (dxComp > dx2) - { - dxComp = dx1; - dyComp += dY; - } - } - - // - // Write the compressed buffers and add in more compression - // tasks until done - // - - int nextWriteBuffer = 0; - int dxWrite = dx1; - int dyWrite = dyStart; - - while (nextWriteBuffer < numTiles) - { - // - // Wait until the nextWriteBuffer is ready to be written - // - - TileBuffer* writeBuffer = - _data->getTileBuffer (nextWriteBuffer); - - writeBuffer->wait(); - - // - // Write the tilebuffer - // - - bufferedTileWrite ( _data, dxWrite, dyWrite, lx, ly, - writeBuffer->dataPtr, - writeBuffer->dataSize, - writeBuffer->uncompressedSize, - writeBuffer->sampleCountTablePtr, - writeBuffer->sampleCountTableSize); - - // - // Release the lock on nextWriteBuffer - // - - writeBuffer->post(); - - // - // If there are no more tileBuffers to compress, then - // only continue to write out remaining tileBuffers, - // otherwise keep adding compression tasks. - // - - if (nextCompBuffer < numTiles) - { - // - // add nextCompBuffer as a compression Task - // - - ThreadPool::addGlobalTask - (new TileBufferTask (&taskGroup, - _data, - nextCompBuffer, - dxComp, dyComp, - lx, ly)); - } - - nextWriteBuffer++; - dxWrite++; - - if (dxWrite > dx2) - { - dxWrite = dx1; - dyWrite += dY; - } - - nextCompBuffer++; - dxComp++; - - if (dxComp > dx2) - { - dxComp = dx1; - dyComp += dY; - } - } - - // - // finish all tasks - // - } - - // - // Exeption handling: - // - // TileBufferTask::execute() may have encountered exceptions, but - // those exceptions occurred in another thread, not in the thread - // that is executing this call to TiledOutputFile::writeTiles(). - // TileBufferTask::execute() has caught all exceptions and stored - // the exceptions' what() strings in the tile buffers. - // Now we check if any tile buffer contains a stored exception; if - // this is the case then we re-throw the exception in this thread. - // (It is possible that multiple tile buffers contain stored - // exceptions. We re-throw the first exception we find and - // ignore all others.) - // - - const string *exception = 0; - - for (size_t i = 0; i < _data->tileBuffers.size(); ++i) - { - TileBuffer *tileBuffer = _data->tileBuffers[i]; - - if (tileBuffer->hasException && !exception) - exception = &tileBuffer->exception; - - tileBuffer->hasException = false; - } - - if (exception) - throw IEX_NAMESPACE::IoExc (*exception); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Failed to write pixel data to image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -void -DeepTiledOutputFile::writeTiles (int dx1, int dxMax, int dyMin, int dyMax, int l) -{ - writeTiles (dx1, dxMax, dyMin, dyMax, l, l); -} - - -void -DeepTiledOutputFile::writeTile (int dx, int dy, int lx, int ly) -{ - writeTiles (dx, dx, dy, dy, lx, ly); -} - - -void -DeepTiledOutputFile::writeTile (int dx, int dy, int l) -{ - writeTile(dx, dy, l, l); -} - - -void -DeepTiledOutputFile::copyPixels (DeepTiledInputFile &in) -{ - - // - // Check if this file's and and the InputFile's - // headers are compatible. - // - - const Header &hdr = _data->header; - const Header &inHdr = in.header(); - - - - if (!(hdr.tileDescription() == inHdr.tileDescription())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files have different tile descriptions."); - - if (!(hdr.dataWindow() == inHdr.dataWindow())) - THROW (IEX_NAMESPACE::ArgExc, "Cannot copy pixels from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\". The " - "files have different data windows."); - - if (!(hdr.lineOrder() == inHdr.lineOrder())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files have different line orders."); - - if (!(hdr.compression() == inHdr.compression())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files use different compression methods."); - - if (!(hdr.channels() == inHdr.channels())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" " - "failed. The files have different channel " - "lists."); - - - // Verify that no pixel data have been written to this file yet. - // - - if (!_data->tileOffsets.isEmpty()) - THROW (IEX_NAMESPACE::LogicExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << _data->_streamData->os->fileName() << "\" " - "failed. \"" << fileName() << "\" " - "already contains pixel data."); - - - int numAllTiles = in.totalTiles(); - - Lock lock (*_data->_streamData); - - // - // special handling for random tiles - // - - vector dx_list(_data->lineOrder==RANDOM_Y ? numAllTiles : 1); - vector dy_list(_data->lineOrder==RANDOM_Y ? numAllTiles : 1); - vector lx_list(_data->lineOrder==RANDOM_Y ? numAllTiles : 1); - vector ly_list(_data->lineOrder==RANDOM_Y ? numAllTiles : 1); - - if(_data->lineOrder==RANDOM_Y) - { - in.getTileOrder(&dx_list[0],&dy_list[0],&lx_list[0],&ly_list[0]); - _data->nextTileToWrite.dx=dx_list[0]; - _data->nextTileToWrite.dy=dy_list[0]; - _data->nextTileToWrite.lx=lx_list[0]; - _data->nextTileToWrite.ly=ly_list[0]; - } - - - vector data(4096); - for (int i = 0; i < numAllTiles; ++i) - { - - int dx = _data->nextTileToWrite.dx; - int dy = _data->nextTileToWrite.dy; - int lx = _data->nextTileToWrite.lx; - int ly = _data->nextTileToWrite.ly; - - Int64 dataSize = data.size(); - - in.rawTileData (dx, dy, lx, ly, &data[0], dataSize); - if(dataSize>data.size()) - { - data.resize(dataSize); - in.rawTileData (dx, dy, lx, ly, &data[0], dataSize); - } - Int64 sampleCountTableSize = *(Int64 *)(&data[0] + 16); - Int64 pixelDataSize = *(Int64 *)(&data[0] + 24); - Int64 unpackedPixelDataSize = *(Int64 *)(&data[0] + 32); - char * sampleCountTable = &data[0]+40; - char * pixelData = sampleCountTable + sampleCountTableSize; - - writeTileData (_data, dx, dy, lx, ly, pixelData, pixelDataSize,unpackedPixelDataSize,sampleCountTable,sampleCountTableSize); - - - if(_data->lineOrder==RANDOM_Y) - { - if(inextTileToWrite.dx=dx_list[i+1]; - _data->nextTileToWrite.dy=dy_list[i+1]; - _data->nextTileToWrite.lx=lx_list[i+1]; - _data->nextTileToWrite.ly=ly_list[i+1]; - } - }else{ - _data->nextTileToWrite = _data->nextTileCoord (_data->nextTileToWrite); - } - - } -} - - -void -DeepTiledOutputFile::copyPixels (DeepTiledInputPart &in) -{ - copyPixels(*in.file); -} - - -unsigned int -DeepTiledOutputFile::tileXSize () const -{ - return _data->tileDesc.xSize; -} - - -unsigned int -DeepTiledOutputFile::tileYSize () const -{ - return _data->tileDesc.ySize; -} - - -LevelMode -DeepTiledOutputFile::levelMode () const -{ - return _data->tileDesc.mode; -} - - -LevelRoundingMode -DeepTiledOutputFile::levelRoundingMode () const -{ - return _data->tileDesc.roundingMode; -} - - -int -DeepTiledOutputFile::numLevels () const -{ - if (levelMode() == RIPMAP_LEVELS) - THROW (IEX_NAMESPACE::LogicExc, "Error calling numLevels() on image " - "file \"" << fileName() << "\" " - "(numLevels() is not defined for RIPMAPs)."); - return _data->numXLevels; -} - - -int -DeepTiledOutputFile::numXLevels () const -{ - return _data->numXLevels; -} - - -int -DeepTiledOutputFile::numYLevels () const -{ - return _data->numYLevels; -} - - -bool -DeepTiledOutputFile::isValidLevel (int lx, int ly) const -{ - if (lx < 0 || ly < 0) - return false; - - if (levelMode() == MIPMAP_LEVELS && lx != ly) - return false; - - if (lx >= numXLevels() || ly >= numYLevels()) - return false; - - return true; -} - - -int -DeepTiledOutputFile::levelWidth (int lx) const -{ - try - { - int retVal = levelSize (_data->minX, _data->maxX, lx, - _data->tileDesc.roundingMode); - - return retVal; - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling levelWidth() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -int -DeepTiledOutputFile::levelHeight (int ly) const -{ - try - { - return levelSize (_data->minY, _data->maxY, ly, - _data->tileDesc.roundingMode); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling levelHeight() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -int -DeepTiledOutputFile::numXTiles (int lx) const -{ - if (lx < 0 || lx >= _data->numXLevels) - THROW (IEX_NAMESPACE::LogicExc, "Error calling numXTiles() on image " - "file \"" << _data->_streamData->os->fileName() << "\" " - "(Argument is not in valid range)."); - - return _data->numXTiles[lx]; -} - - -int -DeepTiledOutputFile::numYTiles (int ly) const -{ - if (ly < 0 || ly >= _data->numYLevels) - THROW (IEX_NAMESPACE::LogicExc, "Error calling numXTiles() on image " - "file \"" << _data->_streamData->os->fileName() << "\" " - "(Argument is not in valid range)."); - - return _data->numYTiles[ly]; -} - - -Box2i -DeepTiledOutputFile::dataWindowForLevel (int l) const -{ - return dataWindowForLevel (l, l); -} - - -Box2i -DeepTiledOutputFile::dataWindowForLevel (int lx, int ly) const -{ - try - { - return OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForLevel ( - _data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - lx, ly); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling dataWindowForLevel() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -Box2i -DeepTiledOutputFile::dataWindowForTile (int dx, int dy, int l) const -{ - return dataWindowForTile (dx, dy, l, l); -} - - -Box2i -DeepTiledOutputFile::dataWindowForTile (int dx, int dy, int lx, int ly) const -{ - try - { - if (!isValidTile (dx, dy, lx, ly)) - throw IEX_NAMESPACE::ArgExc ("Arguments not in valid range."); - - return OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForTile ( - _data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - dx, dy, - lx, ly); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling dataWindowForTile() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -bool -DeepTiledOutputFile::isValidTile (int dx, int dy, int lx, int ly) const -{ - return ((lx < _data->numXLevels && lx >= 0) && - (ly < _data->numYLevels && ly >= 0) && - (dx < _data->numXTiles[lx] && dx >= 0) && - (dy < _data->numYTiles[ly] && dy >= 0)); -} - - -void -DeepTiledOutputFile::updatePreviewImage (const PreviewRgba newPixels[]) -{ - Lock lock (*_data->_streamData); - - if (_data->previewPosition <= 0) - THROW (IEX_NAMESPACE::LogicExc, "Cannot update preview image pixels. " - "File \"" << fileName() << "\" does not " - "contain a preview image."); - - // - // Store the new pixels in the header's preview image attribute. - // - - PreviewImageAttribute &pia = - _data->header.typedAttribute ("preview"); - - PreviewImage &pi = pia.value(); - PreviewRgba *pixels = pi.pixels(); - int numPixels = pi.width() * pi.height(); - - for (int i = 0; i < numPixels; ++i) - pixels[i] = newPixels[i]; - - // - // Save the current file position, jump to the position in - // the file where the preview image starts, store the new - // preview image, and jump back to the saved file position. - // - - Int64 savedPosition = _data->_streamData->os->tellp(); - - try - { - _data->_streamData->os->seekp (_data->previewPosition); - pia.writeValueTo (*_data->_streamData->os, _data->version); - _data->_streamData->os->seekp (savedPosition); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Cannot update preview image pixels for " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -void -DeepTiledOutputFile::breakTile - (int dx, int dy, - int lx, int ly, - int offset, - int length, - char c) -{ - Lock lock (*_data->_streamData); - - Int64 position = _data->tileOffsets (dx, dy, lx, ly); - - if (!position) - THROW (IEX_NAMESPACE::ArgExc, - "Cannot overwrite tile " - "(" << dx << ", " << dy << ", " << lx << "," << ly << "). " - "The tile has not yet been stored in " - "file \"" << fileName() << "\"."); - - _data->_streamData->currentPosition = 0; - _data->_streamData->os->seekp (position + offset); - - for (int i = 0; i < length; ++i) - _data->_streamData->os->write (&c, 1); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.h deleted file mode 100644 index e12dda1..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.h +++ /dev/null @@ -1,475 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_DEEP_TILED_OUTPUT_FILE_H -#define INCLUDED_IMF_DEEP_TILED_OUTPUT_FILE_H - -//----------------------------------------------------------------------------- -// -// class DeepTiledOutputFile -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfFrameBuffer.h" -#include "ImathBox.h" -#include "ImfThreading.h" -#include "ImfGenericOutputFile.h" -#include "ImfNamespace.h" -#include "ImfForward.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT DeepTiledOutputFile : public GenericOutputFile -{ - public: - - //------------------------------------------------------------------- - // A constructor that opens the file with the specified name, and - // writes the file header. The file header is also copied into the - // TiledOutputFile object, and can later be accessed via the header() - // method. - // - // Destroying TiledOutputFile constructed with this constructor - // automatically closes the corresponding files. - // - // The header must contain a TileDescriptionAttribute called "tiles". - // - // The x and y subsampling factors for all image channels must be 1; - // subsampling is not supported. - // - // Tiles can be written to the file in arbitrary order. The line - // order attribute can be used to cause the tiles to be sorted in - // the file. When the file is read later, reading the tiles in the - // same order as they are in the file tends to be significantly - // faster than reading the tiles in random order (see writeTile, - // below). - //------------------------------------------------------------------- - - DeepTiledOutputFile (const char fileName[], - const Header &header, - int numThreads = globalThreadCount ()); - - - // ---------------------------------------------------------------- - // A constructor that attaches the new TiledOutputFile object to - // a file that has already been opened. Destroying TiledOutputFile - // objects constructed with this constructor does not automatically - // close the corresponding files. - // ---------------------------------------------------------------- - - DeepTiledOutputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - int numThreads = globalThreadCount ()); - - - //----------------------------------------------------- - // Destructor - // - // Destroying a TiledOutputFile object before all tiles - // have been written results in an incomplete file. - //----------------------------------------------------- - - virtual ~DeepTiledOutputFile (); - - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the TiledOutputFile object. - // - // The current frame buffer is the source of the pixel - // data written to the file. The current frame buffer - // must be set at least once before writeTile() is - // called. The current frame buffer can be changed - // after each call to writeTile(). - //------------------------------------------------------- - - void setFrameBuffer (const DeepFrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const DeepFrameBuffer & frameBuffer () const; - - - //------------------- - // Utility functions: - //------------------- - - //--------------------------------------------------------- - // Multiresolution mode and tile size: - // The following functions return the xSize, ySize and mode - // fields of the file header's TileDescriptionAttribute. - //--------------------------------------------------------- - - unsigned int tileXSize () const; - unsigned int tileYSize () const; - LevelMode levelMode () const; - LevelRoundingMode levelRoundingMode () const; - - - //-------------------------------------------------------------------- - // Number of levels: - // - // numXLevels() returns the file's number of levels in x direction. - // - // if levelMode() == ONE_LEVEL: - // return value is: 1 - // - // if levelMode() == MIPMAP_LEVELS: - // return value is: rfunc (log (max (w, h)) / log (2)) + 1 - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (w) / log (2)) + 1 - // - // where - // w is the width of the image's data window, max.x - min.x + 1, - // y is the height of the image's data window, max.y - min.y + 1, - // and rfunc(x) is either floor(x), or ceil(x), depending on - // whether levelRoundingMode() returns ROUND_DOWN or ROUND_UP. - // - // numYLevels() returns the file's number of levels in y direction. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (h) / log (2)) + 1 - // - // - // numLevels() is a convenience function for use with MIPMAP_LEVELS - // files. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // an IEX_NAMESPACE::LogicExc exception is thrown - // - // isValidLevel(lx, ly) returns true if the file contains - // a level with level number (lx, ly), false if not. - // - //-------------------------------------------------------------------- - - int numLevels () const; - int numXLevels () const; - int numYLevels () const; - bool isValidLevel (int lx, int ly) const; - - - //--------------------------------------------------------- - // Dimensions of a level: - // - // levelWidth(lx) returns the width of a level with level - // number (lx, *), where * is any number. - // - // return value is: - // max (1, rfunc (w / pow (2, lx))) - // - // - // levelHeight(ly) returns the height of a level with level - // number (*, ly), where * is any number. - // - // return value is: - // max (1, rfunc (h / pow (2, ly))) - // - //--------------------------------------------------------- - - int levelWidth (int lx) const; - int levelHeight (int ly) const; - - - //---------------------------------------------------------- - // Number of tiles: - // - // numXTiles(lx) returns the number of tiles in x direction - // that cover a level with level number (lx, *), where * is - // any number. - // - // return value is: - // (levelWidth(lx) + tileXSize() - 1) / tileXSize() - // - // - // numYTiles(ly) returns the number of tiles in y direction - // that cover a level with level number (*, ly), where * is - // any number. - // - // return value is: - // (levelHeight(ly) + tileXSize() - 1) / tileXSize() - // - //---------------------------------------------------------- - - int numXTiles (int lx = 0) const; - int numYTiles (int ly = 0) const; - - - //--------------------------------------------------------- - // Level pixel ranges: - // - // dataWindowForLevel(lx, ly) returns a 2-dimensional - // region of valid pixel coordinates for a level with - // level number (lx, ly) - // - // return value is a Box2i with min value: - // (dataWindow.min.x, dataWindow.min.y) - // - // and max value: - // (dataWindow.min.x + levelWidth(lx) - 1, - // dataWindow.min.y + levelHeight(ly) - 1) - // - // dataWindowForLevel(level) is a convenience function used - // for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForLevel(level, level). - // - //--------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForLevel (int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const; - - - //------------------------------------------------------------------- - // Tile pixel ranges: - // - // dataWindowForTile(dx, dy, lx, ly) returns a 2-dimensional - // region of valid pixel coordinates for a tile with tile coordinates - // (dx,dy) and level number (lx, ly). - // - // return value is a Box2i with min value: - // (dataWindow.min.x + dx * tileXSize(), - // dataWindow.min.y + dy * tileYSize()) - // - // and max value: - // (dataWindow.min.x + (dx + 1) * tileXSize() - 1, - // dataWindow.min.y + (dy + 1) * tileYSize() - 1) - // - // dataWindowForTile(dx, dy, level) is a convenience function - // used for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForTile(dx, dy, level, level). - // - //------------------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int l = 0) const; - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int lx, int ly) const; - - //------------------------------------------------------------------ - // Write pixel data: - // - // writeTile(dx, dy, lx, ly) writes the tile with tile - // coordinates (dx, dy), and level number (lx, ly) to - // the file. - // - // dx must lie in the interval [0, numXTiles(lx) - 1] - // dy must lie in the interval [0, numYTiles(ly) - 1] - // - // lx must lie in the interval [0, numXLevels() - 1] - // ly must lie in the inverval [0, numYLevels() - 1] - // - // writeTile(dx, dy, level) is a convenience function - // used for ONE_LEVEL and MIPMAP_LEVEL files. It calls - // writeTile(dx, dy, level, level). - // - // The two writeTiles(dx1, dx2, dy1, dy2, ...) functions allow - // writing multiple tiles at once. If multi-threading is used - // multiple tiles are written concurrently. The tile coordinates, - // dx1, dx2 and dy1, dy2, specify inclusive ranges of tile - // coordinates. It is valid for dx1 < dx2 or dy1 < dy2; the - // tiles are always written in the order specified by the line - // order attribute. Hence, it is not possible to specify an - // "invalid" or empty tile range. - // - // Pixels that are outside the pixel coordinate range for the tile's - // level, are never accessed by writeTile(). - // - // Each tile in the file must be written exactly once. - // - // The file's line order attribute determines the order of the tiles - // in the file: - // - // INCREASING_Y In the file, the tiles for each level are stored - // in a contiguous block. The levels are ordered - // like this: - // - // (0, 0) (1, 0) ... (nx-1, 0) - // (0, 1) (1, 1) ... (nx-1, 1) - // ... - // (0,ny-1) (1,ny-1) ... (nx-1,ny-1) - // - // where nx = numXLevels(), and ny = numYLevels(). - // In an individual level, (lx, ly), the tiles - // are stored in the following order: - // - // (0, 0) (1, 0) ... (tx-1, 0) - // (0, 1) (1, 1) ... (tx-1, 1) - // ... - // (0,ty-1) (1,ty-1) ... (tx-1,ty-1) - // - // where tx = numXTiles(lx), - // and ty = numYTiles(ly). - // - // DECREASING_Y As for INCREASING_Y, the tiles for each level - // are stored in a contiguous block. The levels - // are ordered the same way as for INCREASING_Y, - // but within an individual level, the tiles - // are stored in this order: - // - // (0,ty-1) (1,ty-1) ... (tx-1,ty-1) - // ... - // (0, 1) (1, 1) ... (tx-1, 1) - // (0, 0) (1, 0) ... (tx-1, 0) - // - // - // RANDOM_Y The order of the calls to writeTile() determines - // the order of the tiles in the file. - // - //------------------------------------------------------------------ - - void writeTile (int dx, int dy, int l = 0); - void writeTile (int dx, int dy, int lx, int ly); - - void writeTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly); - - void writeTiles (int dx1, int dx2, int dy1, int dy2, - int l = 0); - - - //------------------------------------------------------------------ - // Shortcut to copy all pixels from a TiledInputFile into this file, - // without uncompressing and then recompressing the pixel data. - // This file's header must be compatible with the TiledInputFile's - // header: The two header's "dataWindow", "compression", - // "lineOrder", "channels", and "tiles" attributes must be the same. - //------------------------------------------------------------------ - - void copyPixels (DeepTiledInputFile &in); - void copyPixels (DeepTiledInputPart &in); - - - - //-------------------------------------------------------------- - // Updating the preview image: - // - // updatePreviewImage() supplies a new set of pixels for the - // preview image attribute in the file's header. If the header - // does not contain a preview image, updatePreviewImage() throws - // an IEX_NAMESPACE::LogicExc. - // - // Note: updatePreviewImage() is necessary because images are - // often stored in a file incrementally, a few tiles at a time, - // while the image is being generated. Since the preview image - // is an attribute in the file's header, it gets stored in the - // file as soon as the file is opened, but we may not know what - // the preview image should look like until we have written the - // last tile of the main image. - // - //-------------------------------------------------------------- - - void updatePreviewImage (const PreviewRgba newPixels[]); - - - //------------------------------------------------------------- - // Break a tile -- for testing and debugging only: - // - // breakTile(dx,dy,lx,ly,p,n,c) introduces an error into the - // output file by writing n copies of character c, starting - // p bytes from the beginning of the tile with tile coordinates - // (dx, dy) and level number (lx, ly). - // - // Warning: Calling this function usually results in a broken - // image file. The file or parts of it may not be readable, - // or the file may contain bad data. - // - //------------------------------------------------------------- - - void breakTile (int dx, int dy, - int lx, int ly, - int offset, - int length, - char c); - struct Data; - - private: - - // ---------------------------------------------------------------- - // A constructor attaches the OutputStreamMutex to the - // given one from MultiPartOutputFile. Set the previewPosition - // and lineOffsetsPosition which have been acquired from - // the constructor of MultiPartOutputFile as well. - // ---------------------------------------------------------------- - DeepTiledOutputFile (const OutputPartData* part); - - DeepTiledOutputFile (const DeepTiledOutputFile &); // not implemented - DeepTiledOutputFile & operator = (const DeepTiledOutputFile &); // not implemented - - void initialize (const Header &header); - - bool isValidTile (int dx, int dy, - int lx, int ly) const; - - size_t bytesPerLineForTile (int dx, int dy, - int lx, int ly) const; - - Data * _data; - - - friend class MultiPartOutputFile; - -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.cpp deleted file mode 100644 index 7239c01..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfDeepTiledOutputPart.h" -#include "ImfMultiPartOutputFile.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -DeepTiledOutputPart::DeepTiledOutputPart(MultiPartOutputFile& multiPartFile, int partNumber) -{ - file = multiPartFile.getOutputPart(partNumber); -} - -const char * -DeepTiledOutputPart::fileName () const -{ - return file->fileName(); -} - - -const Header & -DeepTiledOutputPart::header () const -{ - return file->header(); -} - - -void -DeepTiledOutputPart::setFrameBuffer (const DeepFrameBuffer &frameBuffer) -{ - file->setFrameBuffer(frameBuffer); -} - - -const DeepFrameBuffer & -DeepTiledOutputPart::frameBuffer () const -{ - return file->frameBuffer(); -} - - -unsigned int -DeepTiledOutputPart::tileXSize () const -{ - return file->tileXSize(); -} - - -unsigned int -DeepTiledOutputPart::tileYSize () const -{ - return file->tileYSize(); -} - - -LevelMode -DeepTiledOutputPart::levelMode () const -{ - return file->levelMode(); -} - - -LevelRoundingMode -DeepTiledOutputPart::levelRoundingMode () const -{ - return file->levelRoundingMode(); -} - - -int -DeepTiledOutputPart::numLevels () const -{ - return file->numLevels(); -} - - -int -DeepTiledOutputPart::numXLevels () const -{ - return file->numXLevels(); -} - - -int -DeepTiledOutputPart::numYLevels () const -{ - return file->numYLevels(); -} - - -bool -DeepTiledOutputPart::isValidLevel (int lx, int ly) const -{ - return file->isValidLevel(lx, ly); -} - - -int -DeepTiledOutputPart::levelWidth (int lx) const -{ - return file->levelWidth(lx); -} - - -int -DeepTiledOutputPart::levelHeight (int ly) const -{ - return file->levelHeight(ly); -} - - -int -DeepTiledOutputPart::numXTiles (int lx) const -{ - return file->numXTiles(lx); -} - - -int -DeepTiledOutputPart::numYTiles (int ly) const -{ - return file->numYTiles(ly); -} - - - -IMATH_NAMESPACE::Box2i -DeepTiledOutputPart::dataWindowForLevel (int l) const -{ - return file->dataWindowForLevel(l); -} - - -IMATH_NAMESPACE::Box2i -DeepTiledOutputPart::dataWindowForLevel (int lx, int ly) const -{ - return file->dataWindowForLevel(lx, ly); -} - - -IMATH_NAMESPACE::Box2i -DeepTiledOutputPart::dataWindowForTile (int dx, int dy, - int l) const -{ - return file->dataWindowForTile(dx, dy, l); -} - - -IMATH_NAMESPACE::Box2i -DeepTiledOutputPart::dataWindowForTile (int dx, int dy, - int lx, int ly) const -{ - return file->dataWindowForTile(dx, dy, lx, ly); -} - - -void -DeepTiledOutputPart::writeTile (int dx, int dy, int l) -{ - file->writeTile(dx, dy, l); -} - - -void -DeepTiledOutputPart::writeTile (int dx, int dy, int lx, int ly) -{ - file->writeTile(dx, dy, lx, ly); -} - - -void -DeepTiledOutputPart::writeTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly) -{ - file->writeTiles(dx1, dx2, dy1, dy2, lx, ly); -} - - -void -DeepTiledOutputPart::writeTiles (int dx1, int dx2, int dy1, int dy2, - int l) -{ - file->writeTiles(dx1, dx2, dy1, dy2, l); -} - - -void -DeepTiledOutputPart::copyPixels (DeepTiledInputFile &in) -{ - file->copyPixels(in); -} - - -void -DeepTiledOutputPart::copyPixels (DeepTiledInputPart &in) -{ - file->copyPixels(in); -} - - -void -DeepTiledOutputPart::updatePreviewImage (const PreviewRgba newPixels[]) -{ - file->updatePreviewImage(newPixels); -} - - -void -DeepTiledOutputPart::breakTile (int dx, int dy, - int lx, int ly, - int offset, - int length, - char c) -{ - file->breakTile(dx, dy, lx, ly, offset, length, c); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.h deleted file mode 100644 index c88da12..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.h +++ /dev/null @@ -1,394 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFDEEPTILEDOUTPUTPART_H_ -#define IMFDEEPTILEDOUTPUTPART_H_ - -#include "ImfForward.h" -#include "ImfDeepTiledInputFile.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT DeepTiledOutputPart -{ - public: - - DeepTiledOutputPart(MultiPartOutputFile& multiPartFile, int partNumber); - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the TiledOutputFile object. - // - // The current frame buffer is the source of the pixel - // data written to the file. The current frame buffer - // must be set at least once before writeTile() is - // called. The current frame buffer can be changed - // after each call to writeTile(). - //------------------------------------------------------- - - void setFrameBuffer (const DeepFrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const DeepFrameBuffer & frameBuffer () const; - - - //------------------- - // Utility functions: - //------------------- - - //--------------------------------------------------------- - // Multiresolution mode and tile size: - // The following functions return the xSize, ySize and mode - // fields of the file header's TileDescriptionAttribute. - //--------------------------------------------------------- - - unsigned int tileXSize () const; - unsigned int tileYSize () const; - LevelMode levelMode () const; - LevelRoundingMode levelRoundingMode () const; - - - //-------------------------------------------------------------------- - // Number of levels: - // - // numXLevels() returns the file's number of levels in x direction. - // - // if levelMode() == ONE_LEVEL: - // return value is: 1 - // - // if levelMode() == MIPMAP_LEVELS: - // return value is: rfunc (log (max (w, h)) / log (2)) + 1 - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (w) / log (2)) + 1 - // - // where - // w is the width of the image's data window, max.x - min.x + 1, - // y is the height of the image's data window, max.y - min.y + 1, - // and rfunc(x) is either floor(x), or ceil(x), depending on - // whether levelRoundingMode() returns ROUND_DOWN or ROUND_UP. - // - // numYLevels() returns the file's number of levels in y direction. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (h) / log (2)) + 1 - // - // - // numLevels() is a convenience function for use with MIPMAP_LEVELS - // files. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // an IEX_NAMESPACE::LogicExc exception is thrown - // - // isValidLevel(lx, ly) returns true if the file contains - // a level with level number (lx, ly), false if not. - // - //-------------------------------------------------------------------- - - int numLevels () const; - int numXLevels () const; - int numYLevels () const; - bool isValidLevel (int lx, int ly) const; - - - //--------------------------------------------------------- - // Dimensions of a level: - // - // levelWidth(lx) returns the width of a level with level - // number (lx, *), where * is any number. - // - // return value is: - // max (1, rfunc (w / pow (2, lx))) - // - // - // levelHeight(ly) returns the height of a level with level - // number (*, ly), where * is any number. - // - // return value is: - // max (1, rfunc (h / pow (2, ly))) - // - //--------------------------------------------------------- - - int levelWidth (int lx) const; - int levelHeight (int ly) const; - - - //---------------------------------------------------------- - // Number of tiles: - // - // numXTiles(lx) returns the number of tiles in x direction - // that cover a level with level number (lx, *), where * is - // any number. - // - // return value is: - // (levelWidth(lx) + tileXSize() - 1) / tileXSize() - // - // - // numYTiles(ly) returns the number of tiles in y direction - // that cover a level with level number (*, ly), where * is - // any number. - // - // return value is: - // (levelHeight(ly) + tileXSize() - 1) / tileXSize() - // - //---------------------------------------------------------- - - int numXTiles (int lx = 0) const; - int numYTiles (int ly = 0) const; - - - //--------------------------------------------------------- - // Level pixel ranges: - // - // dataWindowForLevel(lx, ly) returns a 2-dimensional - // region of valid pixel coordinates for a level with - // level number (lx, ly) - // - // return value is a Box2i with min value: - // (dataWindow.min.x, dataWindow.min.y) - // - // and max value: - // (dataWindow.min.x + levelWidth(lx) - 1, - // dataWindow.min.y + levelHeight(ly) - 1) - // - // dataWindowForLevel(level) is a convenience function used - // for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForLevel(level, level). - // - //--------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForLevel (int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const; - - - //------------------------------------------------------------------- - // Tile pixel ranges: - // - // dataWindowForTile(dx, dy, lx, ly) returns a 2-dimensional - // region of valid pixel coordinates for a tile with tile coordinates - // (dx,dy) and level number (lx, ly). - // - // return value is a Box2i with min value: - // (dataWindow.min.x + dx * tileXSize(), - // dataWindow.min.y + dy * tileYSize()) - // - // and max value: - // (dataWindow.min.x + (dx + 1) * tileXSize() - 1, - // dataWindow.min.y + (dy + 1) * tileYSize() - 1) - // - // dataWindowForTile(dx, dy, level) is a convenience function - // used for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForTile(dx, dy, level, level). - // - //------------------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int l = 0) const; - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int lx, int ly) const; - - //------------------------------------------------------------------ - // Write pixel data: - // - // writeTile(dx, dy, lx, ly) writes the tile with tile - // coordinates (dx, dy), and level number (lx, ly) to - // the file. - // - // dx must lie in the interval [0, numXTiles(lx) - 1] - // dy must lie in the interval [0, numYTiles(ly) - 1] - // - // lx must lie in the interval [0, numXLevels() - 1] - // ly must lie in the inverval [0, numYLevels() - 1] - // - // writeTile(dx, dy, level) is a convenience function - // used for ONE_LEVEL and MIPMAP_LEVEL files. It calls - // writeTile(dx, dy, level, level). - // - // The two writeTiles(dx1, dx2, dy1, dy2, ...) functions allow - // writing multiple tiles at once. If multi-threading is used - // multiple tiles are written concurrently. The tile coordinates, - // dx1, dx2 and dy1, dy2, specify inclusive ranges of tile - // coordinates. It is valid for dx1 < dx2 or dy1 < dy2; the - // tiles are always written in the order specified by the line - // order attribute. Hence, it is not possible to specify an - // "invalid" or empty tile range. - // - // Pixels that are outside the pixel coordinate range for the tile's - // level, are never accessed by writeTile(). - // - // Each tile in the file must be written exactly once. - // - // The file's line order attribute determines the order of the tiles - // in the file: - // - // INCREASING_Y In the file, the tiles for each level are stored - // in a contiguous block. The levels are ordered - // like this: - // - // (0, 0) (1, 0) ... (nx-1, 0) - // (0, 1) (1, 1) ... (nx-1, 1) - // ... - // (0,ny-1) (1,ny-1) ... (nx-1,ny-1) - // - // where nx = numXLevels(), and ny = numYLevels(). - // In an individual level, (lx, ly), the tiles - // are stored in the following order: - // - // (0, 0) (1, 0) ... (tx-1, 0) - // (0, 1) (1, 1) ... (tx-1, 1) - // ... - // (0,ty-1) (1,ty-1) ... (tx-1,ty-1) - // - // where tx = numXTiles(lx), - // and ty = numYTiles(ly). - // - // DECREASING_Y As for INCREASING_Y, the tiles for each level - // are stored in a contiguous block. The levels - // are ordered the same way as for INCREASING_Y, - // but within an individual level, the tiles - // are stored in this order: - // - // (0,ty-1) (1,ty-1) ... (tx-1,ty-1) - // ... - // (0, 1) (1, 1) ... (tx-1, 1) - // (0, 0) (1, 0) ... (tx-1, 0) - // - // - // RANDOM_Y The order of the calls to writeTile() determines - // the order of the tiles in the file. - // - //------------------------------------------------------------------ - - void writeTile (int dx, int dy, int l = 0); - void writeTile (int dx, int dy, int lx, int ly); - - void writeTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly); - - void writeTiles (int dx1, int dx2, int dy1, int dy2, - int l = 0); - - - //------------------------------------------------------------------ - // Shortcut to copy all pixels from a TiledInputFile into this file, - // without uncompressing and then recompressing the pixel data. - // This file's header must be compatible with the TiledInputFile's - // header: The two header's "dataWindow", "compression", - // "lineOrder", "channels", and "tiles" attributes must be the same. - //------------------------------------------------------------------ - - void copyPixels (DeepTiledInputFile &in); - void copyPixels (DeepTiledInputPart &in); - - - - - //-------------------------------------------------------------- - // Updating the preview image: - // - // updatePreviewImage() supplies a new set of pixels for the - // preview image attribute in the file's header. If the header - // does not contain a preview image, updatePreviewImage() throws - // an IEX_NAMESPACE::LogicExc. - // - // Note: updatePreviewImage() is necessary because images are - // often stored in a file incrementally, a few tiles at a time, - // while the image is being generated. Since the preview image - // is an attribute in the file's header, it gets stored in the - // file as soon as the file is opened, but we may not know what - // the preview image should look like until we have written the - // last tile of the main image. - // - //-------------------------------------------------------------- - - void updatePreviewImage (const PreviewRgba newPixels[]); - - - //------------------------------------------------------------- - // Break a tile -- for testing and debugging only: - // - // breakTile(dx,dy,lx,ly,p,n,c) introduces an error into the - // output file by writing n copies of character c, starting - // p bytes from the beginning of the tile with tile coordinates - // (dx, dy) and level number (lx, ly). - // - // Warning: Calling this function usually results in a broken - // image file. The file or parts of it may not be readable, - // or the file may contain bad data. - // - //------------------------------------------------------------- - - void breakTile (int dx, int dy, - int lx, int ly, - int offset, - int length, - char c); - - private: - DeepTiledOutputFile* file; - -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif /* IMFDEEPTILEDOUTPUTPART_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp deleted file mode 100644 index cbeabe3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class DoubleAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -template <> -const char * -DoubleAttribute::staticTypeName () -{ - return "double"; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDoubleAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDoubleAttribute.h deleted file mode 100644 index d9a88a8..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDoubleAttribute.h +++ /dev/null @@ -1,59 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_DOUBLE_ATTRIBUTE_H -#define INCLUDED_IMF_DOUBLE_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class DoubleAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute DoubleAttribute; -template <> IMF_EXPORT const char *DoubleAttribute::staticTypeName (); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressor.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressor.cpp deleted file mode 100644 index 2ef8878..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressor.cpp +++ /dev/null @@ -1,3429 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2009-2014 DreamWorks Animation LLC. -// -// 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 DreamWorks Animation nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//--------------------------------------------------- -// -// class DwaCompressor -- Store lossy RGB data by quantizing -// DCT components. -// -// First, we try and figure out what compression strategy to take -// based in channel name. For RGB channels, we want a lossy method -// described below. But, if we have alpha, we should do something -// different (and probably using RLE). If we have depth, or velocity, -// or something else, just fall back to ZIP. The rules for deciding -// which strategy to use are setup in initializeDefaultChannelRules(). -// When writing a file, the relevant rules needed to decode are written -// into the start of the data block, making a self-contained file. -// If initializeDefaultChannelRules() doesn't quite suite your naming -// conventions, you can adjust the rules without breaking decoder -// compatability. -// -// If we're going to lossy compress R, G, or B channels, it's easier -// to toss bits in a more perceptual uniform space. One could argue -// at length as to what constitutes perceptually uniform, expecially -// when storing either scene/input/focal plane referred and output referred -// data. -// -// We'll compromise. For values <= 1, we use a traditional power function -// (without any of that straight-line business at the bottom). For values > 1, -// we want something more like a log function, since power functions blow -// up. At 1, we want a smooth blend between the functions. So, we use a -// piecewise function that does just that - see dwaLookups.cpp for -// a little more detail. -// -// Also, if we find that we have R, G, and B channels from the same layer, -// we can get a bit more compression efficiency by transforming to a Y'CbCr -// space. We use the 709 transform, but with Cb,Cr = 0 for an input of -// (0, 0, 0), instead of the traditional Cb,Cr = .5. Shifting the zero point -// makes no sense with large range data. Transforms are done to from -// the perceptual space data, not the linear-light space data (R'G'B' -> -// (Y'CbCr, not RGB -> YCbCr). -// -// Next, we forward DCT the data. This is done with a floating -// point DCT, as we don't really have control over the src range. The -// resulting values are dropped to half-float precision. -// -// Now, we need to quantize. Quantization departs from the usual way -// of dividing and rounding. Instead, we start with some floating -// point "base-error" value. From this, we can derive quantization -// error for each DCT component. Take the standard JPEG quantization -// tables and normalize them by the smallest value. Then, multiply -// the normalized quant tables by our base-error value. This gives -// a range of errors for each DCT component. -// -// For each DCT component, we want to find a quantized value that -// is within +- the per-component error. Pick the quantized value -// that has the fewest bits set in its' binary representation. -// Brute-forcing the search would make for extremly inefficient -// compression. Fortunatly, we can precompute a table to assist -// with this search. -// -// For each 16-bit float value, there are at most 15 other values with -// fewer bits set. We can precompute these values in a compact form, since -// many source values have far fewer that 15 possible quantized values. -// Now, instead of searching the entire range +- the component error, -// we can just search at most 15 quantization candidates. The search can -// be accelerated a bit more by sorting the candidates by the -// number of bits set, in increasing order. Then, the search can stop -// once a candidate is found w/i the per-component quantization -// error range. -// -// The quantization strategy has the side-benefit that there is no -// de-quantization step upon decode, so we don't bother recording -// the quantization table. -// -// Ok. So we now have quantized values. Time for entropy coding. We -// can use either static Huffman or zlib/DEFLATE. The static Huffman -// is more efficient at compacting data, but can have a greater -// overhead, especially for smaller tile/strip sizes. -// -// There is some additional fun, like ZIP compressing the DC components -// instead of Huffman/zlib, which helps make things slightly smaller. -// -// Compression level is controlled by setting an int/float/double attribute -// on the header named "dwaCompressionLevel". This is a thinly veiled name for -// the "base-error" value mentioned above. The "base-error" is just -// dwaCompressionLevel / 100000. The default value of 45.0 is generally -// pretty good at generating "visually lossless" values at reasonable -// data rates. Setting dwaCompressionLevel to 0 should result in no additional -// quantization at the quantization stage (though there may be -// quantization in practice at the CSC/DCT steps). But if you really -// want lossless compression, there are pleanty of other choices -// of compressors ;) -// -// When dealing with FLOAT source buffers, we first quantize the source -// to HALF and continue down as we would for HALF source. -// -//--------------------------------------------------- - - -#include "ImfDwaCompressor.h" -#include "ImfDwaCompressorSimd.h" - -#include "ImfChannelList.h" -#include "ImfStandardAttributes.h" -#include "ImfHeader.h" -#include "ImfHuf.h" -#include "ImfInt64.h" -#include "ImfIntAttribute.h" -#include "ImfIO.h" -#include "ImfMisc.h" -#include "ImfNamespace.h" -#include "ImfRle.h" -#include "ImfSimd.h" -#include "ImfSystemSpecific.h" -#include "ImfXdr.h" -#include "ImfZip.h" - -#include "ImathFun.h" -#include "ImathBox.h" -#include "ImathVec.h" -#include "half.h" - -#include "dwaLookups.h" - -#include -#include -#include -#include -#include - -// Windows specific addition to prevent the indirect import of the redefined min/max macros -#if defined _WIN32 || defined _WIN64 - #ifdef NOMINMAX - #undef NOMINMAX - #endif - #define NOMINMAX -#endif -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -namespace { - - // - // Function pointer to dispatch to an approprate - // convertFloatToHalf64_* impl, based on runtime cpu checking. - // Should be initialized in DwaCompressor::initializeFuncs() - // - - void (*convertFloatToHalf64)(unsigned short*, float*) = - convertFloatToHalf64_scalar; - - // - // Function pointer for dispatching a fromHalfZigZag_ impl - // - - void (*fromHalfZigZag)(unsigned short*, float*) = - fromHalfZigZag_scalar; - - // - // Dispatch the inverse DCT on an 8x8 block, where the last - // n rows can be all zeros. The n=0 case converts the full block. - // - void (*dctInverse8x8_0)(float*) = dctInverse8x8_scalar<0>; - void (*dctInverse8x8_1)(float*) = dctInverse8x8_scalar<1>; - void (*dctInverse8x8_2)(float*) = dctInverse8x8_scalar<2>; - void (*dctInverse8x8_3)(float*) = dctInverse8x8_scalar<3>; - void (*dctInverse8x8_4)(float*) = dctInverse8x8_scalar<4>; - void (*dctInverse8x8_5)(float*) = dctInverse8x8_scalar<5>; - void (*dctInverse8x8_6)(float*) = dctInverse8x8_scalar<6>; - void (*dctInverse8x8_7)(float*) = dctInverse8x8_scalar<7>; - -} // namespace - - -struct DwaCompressor::ChannelData -{ - std::string name; - CompressorScheme compression; - int xSampling; - int ySampling; - PixelType type; - bool pLinear; - - int width; - int height; - - // - // Incoming and outgoing data is scanline interleaved, and it's much - // easier to operate on contiguous data. Assuming the planare unc - // buffer is to hold RLE data, we need to rearrange to make bytes - // adjacent. - // - - char *planarUncBuffer; - char *planarUncBufferEnd; - - char *planarUncRle[4]; - char *planarUncRleEnd[4]; - - PixelType planarUncType; - int planarUncSize; -}; - - -struct DwaCompressor::CscChannelSet -{ - int idx[3]; -}; - - -struct DwaCompressor::Classifier -{ - Classifier (std::string suffix, - CompressorScheme scheme, - PixelType type, - int cscIdx, - bool caseInsensitive): - _suffix(suffix), - _scheme(scheme), - _type(type), - _cscIdx(cscIdx), - _caseInsensitive(caseInsensitive) - { - if (caseInsensitive) - transform(_suffix.begin(), _suffix.end(), _suffix.begin(), tolower); - } - - Classifier (const char *&ptr, int size) - { - if (size <= 0) - throw Iex::InputExc("Error uncompressing DWA data" - " (truncated rule)."); - - { - char suffix[Name::SIZE]; - memset (suffix, 0, Name::SIZE); - Xdr::read (ptr, std::min(size, Name::SIZE-1), suffix); - _suffix = std::string(suffix); - } - - if (size < _suffix.length() + 1 + 2*Xdr::size()) - throw Iex::InputExc("Error uncompressing DWA data" - " (truncated rule)."); - - char value; - Xdr::read (ptr, value); - - _cscIdx = (int)(value >> 4) - 1; - if (_cscIdx < -1 || _cscIdx >= 3) - throw Iex::InputExc("Error uncompressing DWA data" - " (corrupt cscIdx rule)."); - - _scheme = (CompressorScheme)((value >> 2) & 3); - if (_scheme < 0 || _scheme >= NUM_COMPRESSOR_SCHEMES) - throw Iex::InputExc("Error uncompressing DWA data" - " (corrupt scheme rule)."); - - _caseInsensitive = (value & 1 ? true : false); - - Xdr::read (ptr, value); - if (value < 0 || value >= NUM_PIXELTYPES) - throw Iex::InputExc("Error uncompressing DWA data" - " (corrupt rule)."); - _type = (PixelType)value; - } - - bool match (const std::string &suffix, const PixelType type) const - { - if (_type != type) return false; - - if (_caseInsensitive) - { - std::string tmp(suffix); - transform(tmp.begin(), tmp.end(), tmp.begin(), tolower); - return tmp == _suffix; - } - - return suffix == _suffix; - } - - size_t size () const - { - // string length + \0 - size_t sizeBytes = _suffix.length() + 1; - - // 1 byte for scheme / cscIdx / caseInsensitive, and 1 byte for type - sizeBytes += 2 * Xdr::size(); - - return sizeBytes; - } - - void write (char *&ptr) const - { - Xdr::write (ptr, _suffix.c_str()); - - // Encode _cscIdx (-1-3) in the upper 4 bits, - // _scheme (0-2) in the next 2 bits - // _caseInsen in the bottom bit - unsigned char value = 0; - value |= ((unsigned char)(_cscIdx+1) & 15) << 4; - value |= ((unsigned char)_scheme & 3) << 2; - value |= (unsigned char)_caseInsensitive & 1; - - Xdr::write (ptr, value); - Xdr::write (ptr, (unsigned char)_type); - } - - std::string _suffix; - CompressorScheme _scheme; - PixelType _type; - int _cscIdx; - bool _caseInsensitive; -}; - - -// -// Base class for the LOSSY_DCT decoder classes -// - -class DwaCompressor::LossyDctDecoderBase -{ - public: - - LossyDctDecoderBase - (char *packedAc, - char *packedDc, - const unsigned short *toLinear, - int width, - int height); - - virtual ~LossyDctDecoderBase (); - - void execute(); - - // - // These return number of items, not bytes. Each item - // is an unsigned short - // - - int numAcValuesEncoded() const { return _packedAcCount; } - int numDcValuesEncoded() const { return _packedDcCount; } - - protected: - - // - // Un-RLE the packed AC components into - // a half buffer. The half block should - // be the full 8x8 block (in zig-zag order - // still), not the first AC component. - // - // currAcComp is advanced as bytes are decoded. - // - // This returns the index of the last non-zero - // value in the buffer - with the index into zig zag - // order data. If we return 0, we have DC only data. - // - - int unRleAc (unsigned short *&currAcComp, - unsigned short *halfZigBlock); - - - // - // if NATIVE and XDR are really the same values, we can - // skip some processing and speed things along - // - - bool _isNativeXdr; - - - // - // Counts of how many items have been packed into the - // AC and DC buffers - // - - int _packedAcCount; - int _packedDcCount; - - - // - // AC and DC buffers to pack - // - - char *_packedAc; - char *_packedDc; - - - // - // half -> half LUT to transform from nonlinear to linear - // - - const unsigned short *_toLinear; - - - // - // image dimensions - // - - int _width; - int _height; - - - // - // Pointers to the start of each scanlines, to be filled on decode - // Generally, these will be filled by the subclasses. - // - - std::vector< std::vector > _rowPtrs; - - - // - // The type of each data that _rowPtrs[i] is referring. Layout - // is in the same order as _rowPtrs[]. - // - - std::vector _type; - std::vector _dctData; -}; - - -// -// Used to decode a single channel of LOSSY_DCT data. -// - -class DwaCompressor::LossyDctDecoder: public LossyDctDecoderBase -{ - public: - - // - // toLinear is a half-float LUT to convert the encoded values - // back to linear light. If you want to skip this step, pass - // in NULL here. - // - - LossyDctDecoder - (std::vector &rowPtrs, - char *packedAc, - char *packedDc, - const unsigned short *toLinear, - int width, - int height, - PixelType type) - : - LossyDctDecoderBase(packedAc, packedDc, toLinear, width, height) - { - _rowPtrs.push_back(rowPtrs); - _type.push_back(type); - } - - virtual ~LossyDctDecoder () {} -}; - - -// -// Used to decode 3 channels of LOSSY_DCT data that -// are grouped together and color space converted. -// - -class DwaCompressor::LossyDctDecoderCsc: public LossyDctDecoderBase -{ - public: - - // - // toLinear is a half-float LUT to convert the encoded values - // back to linear light. If you want to skip this step, pass - // in NULL here. - // - - LossyDctDecoderCsc - (std::vector &rowPtrsR, - std::vector &rowPtrsG, - std::vector &rowPtrsB, - char *packedAc, - char *packedDc, - const unsigned short *toLinear, - int width, - int height, - PixelType typeR, - PixelType typeG, - PixelType typeB) - : - LossyDctDecoderBase(packedAc, packedDc, toLinear, width, height) - { - _rowPtrs.push_back(rowPtrsR); - _rowPtrs.push_back(rowPtrsG); - _rowPtrs.push_back(rowPtrsB); - _type.push_back(typeR); - _type.push_back(typeG); - _type.push_back(typeB); - } - - virtual ~LossyDctDecoderCsc () {} -}; - - -// -// Base class for encoding using the lossy DCT scheme -// - -class DwaCompressor::LossyDctEncoderBase -{ - public: - - LossyDctEncoderBase - (float quantBaseError, - char *packedAc, - char *packedDc, - const unsigned short *toNonlinear, - int width, - int height); - - virtual ~LossyDctEncoderBase (); - - void execute (); - - // - // These return number of items, not bytes. Each item - // is an unsigned short - // - - int numAcValuesEncoded () const {return _numAcComp;} - int numDcValuesEncoded () const {return _numDcComp;} - - protected: - - void toZigZag (half *dst, half *src); - int countSetBits (unsigned short src); - half quantize (half src, float errorTolerance); - void rleAc (half *block, unsigned short *&acPtr); - - float _quantBaseError; - - int _width, - _height; - const unsigned short *_toNonlinear; - - int _numAcComp, - _numDcComp; - - std::vector< std::vector > _rowPtrs; - std::vector _type; - std::vector _dctData; - - - // - // Pointers to the buffers where AC and DC - // DCT components should be packed for - // lossless compression downstream - // - - char *_packedAc; - char *_packedDc; - - - // - // Our "quantization tables" - the example JPEG tables, - // normalized so that the smallest value in each is 1.0. - // This gives us a relationship between error in DCT - // components - // - - float _quantTableY[64]; - float _quantTableCbCr[64]; -}; - - - -// -// Single channel lossy DCT encoder -// - -class DwaCompressor::LossyDctEncoder: public LossyDctEncoderBase -{ - public: - - LossyDctEncoder - (float quantBaseError, - std::vector &rowPtrs, - char *packedAc, - char *packedDc, - const unsigned short *toNonlinear, - int width, - int height, - PixelType type) - : - LossyDctEncoderBase - (quantBaseError, packedAc, packedDc, toNonlinear, width, height) - { - _rowPtrs.push_back(rowPtrs); - _type.push_back(type); - } - - virtual ~LossyDctEncoder () {} -}; - - -// -// RGB channel lossy DCT encoder -// - -class DwaCompressor::LossyDctEncoderCsc: public LossyDctEncoderBase -{ - public: - - LossyDctEncoderCsc - (float quantBaseError, - std::vector &rowPtrsR, - std::vector &rowPtrsG, - std::vector &rowPtrsB, - char *packedAc, - char *packedDc, - const unsigned short *toNonlinear, - int width, - int height, - PixelType typeR, - PixelType typeG, - PixelType typeB) - : - LossyDctEncoderBase - (quantBaseError, packedAc, packedDc, toNonlinear, width, height) - { - _type.push_back(typeR); - _type.push_back(typeG); - _type.push_back(typeB); - - _rowPtrs.push_back(rowPtrsR); - _rowPtrs.push_back(rowPtrsG); - _rowPtrs.push_back(rowPtrsB); - } - - virtual ~LossyDctEncoderCsc () {} -}; - - -// ============================================================== -// -// LossyDctDecoderBase -// -// -------------------------------------------------------------- - -DwaCompressor::LossyDctDecoderBase::LossyDctDecoderBase - (char *packedAc, - char *packedDc, - const unsigned short *toLinear, - int width, - int height) -: - _isNativeXdr(false), - _packedAcCount(0), - _packedDcCount(0), - _packedAc(packedAc), - _packedDc(packedDc), - _toLinear(toLinear), - _width(width), - _height(height) -{ - if (_toLinear == 0) - _toLinear = dwaCompressorNoOp; - - _isNativeXdr = GLOBAL_SYSTEM_LITTLE_ENDIAN; -} - - -DwaCompressor::LossyDctDecoderBase::~LossyDctDecoderBase () {} - - -void -DwaCompressor::LossyDctDecoderBase::execute () -{ - int numComp = _rowPtrs.size(); - int lastNonZero = 0; - int numBlocksX = (int) ceil ((float)_width / 8.0f); - int numBlocksY = (int) ceil ((float)_height / 8.0f); - int leftoverX = _width - (numBlocksX-1) * 8; - int leftoverY = _height - (numBlocksY-1) * 8; - - int numFullBlocksX = (int)floor ((float)_width / 8.0f); - - unsigned short tmpShortNative = 0; - unsigned short tmpShortXdr = 0; - const char *tmpConstCharPtr = 0; - - unsigned short *currAcComp = (unsigned short *)_packedAc; - std::vector currDcComp (_rowPtrs.size()); - std::vector halfZigBlock (_rowPtrs.size()); - - if (_type.size() != _rowPtrs.size()) - throw Iex::BaseExc ("Row pointers and types mismatch in count"); - - if ((_rowPtrs.size() != 3) && (_rowPtrs.size() != 1)) - throw Iex::NoImplExc ("Only 1 and 3 channel encoding is supported"); - - _dctData.resize(numComp); - - // - // Allocate a temp aligned buffer to hold a rows worth of full - // 8x8 half-float blocks - // - - unsigned char *rowBlockHandle = new unsigned char - [numComp * numBlocksX * 64 * sizeof(unsigned short) + _SSE_ALIGNMENT]; - - unsigned short *rowBlock[3]; - - rowBlock[0] = (unsigned short*)rowBlockHandle; - - for (int i = 0; i < _SSE_ALIGNMENT; ++i) - { - if (((size_t)(rowBlockHandle + i) & _SSE_ALIGNMENT_MASK) == 0) - rowBlock[0] = (unsigned short *)(rowBlockHandle + i); - } - - for (int comp = 1; comp < numComp; ++comp) - rowBlock[comp] = rowBlock[comp - 1] + numBlocksX * 64; - - // - // Pack DC components together by common plane, so we can get - // a little more out of differencing them. We'll always have - // one component per block, so we can computed offsets. - // - - currDcComp[0] = (unsigned short *)_packedDc; - - for (unsigned int comp = 1; comp < numComp; ++comp) - currDcComp[comp] = currDcComp[comp - 1] + numBlocksX * numBlocksY; - - for (int blocky = 0; blocky < numBlocksY; ++blocky) - { - int maxY = 8; - - if (blocky == numBlocksY-1) - maxY = leftoverY; - - int maxX = 8; - - for (int blockx = 0; blockx < numBlocksX; ++blockx) - { - if (blockx == numBlocksX-1) - maxX = leftoverX; - - // - // If we can detect that the block is constant values - // (all components only have DC values, and all AC is 0), - // we can do everything only on 1 value, instead of all - // 64. - // - // This won't really help for regular images, but it is - // meant more for layers with large swaths of black - // - - bool blockIsConstant = true; - - for (unsigned int comp = 0; comp < numComp; ++comp) - { - - // - // DC component is stored separately - // - - #ifdef IMF_HAVE_SSE2 - { - __m128i *dst = (__m128i*)halfZigBlock[comp]._buffer; - - dst[7] = _mm_setzero_si128(); - dst[6] = _mm_setzero_si128(); - dst[5] = _mm_setzero_si128(); - dst[4] = _mm_setzero_si128(); - dst[3] = _mm_setzero_si128(); - dst[2] = _mm_setzero_si128(); - dst[1] = _mm_setzero_si128(); - dst[0] = _mm_insert_epi16 - (_mm_setzero_si128(), *currDcComp[comp]++, 0); - } - #else /* IMF_HAVE_SSE2 */ - - memset (halfZigBlock[comp]._buffer, 0, 64 * 2); - halfZigBlock[comp]._buffer[0] = *currDcComp[comp]++; - - #endif /* IMF_HAVE_SSE2 */ - - _packedDcCount++; - - // - // UnRLE the AC. This will modify currAcComp - // - - lastNonZero = unRleAc (currAcComp, halfZigBlock[comp]._buffer); - - // - // Convert from XDR to NATIVE - // - - if (!_isNativeXdr) - { - for (int i = 0; i < 64; ++i) - { - tmpShortXdr = halfZigBlock[comp]._buffer[i]; - tmpConstCharPtr = (const char *)&tmpShortXdr; - - Xdr::read (tmpConstCharPtr, tmpShortNative); - - halfZigBlock[comp]._buffer[i] = tmpShortNative; - } - } - - if (lastNonZero == 0) - { - // - // DC only case - AC components are all 0 - // - - half h; - - h.setBits (halfZigBlock[comp]._buffer[0]); - _dctData[comp]._buffer[0] = (float)h; - - dctInverse8x8DcOnly (_dctData[comp]._buffer); - } - else - { - // - // We have some AC components that are non-zero. - // Can't use the 'constant block' optimization - // - - blockIsConstant = false; - - // - // Un-Zig zag - // - - (*fromHalfZigZag) - (halfZigBlock[comp]._buffer, _dctData[comp]._buffer); - - // - // Zig-Zag indices in normal layout are as follows: - // - // 0 1 3 6 10 15 21 28 - // 2 4 7 11 16 22 29 36 - // 5 8 12 17 23 30 37 43 - // 9 13 18 24 31 38 44 49 - // 14 19 25 32 39 45 50 54 - // 20 26 33 40 46 51 55 58 - // 27 34 41 47 52 56 59 61 - // 35 42 48 53 57 60 62 63 - // - // If lastNonZero is less than the first item on - // each row, we know that the whole row is zero and - // can be skipped in the row-oriented part of the - // iDCT. - // - // The unrolled logic here is: - // - // if lastNonZero < rowStartIdx[i], - // zeroedRows = rowsEmpty[i] - // - // where: - // - // const int rowStartIdx[] = {2, 5, 9, 14, 20, 27, 35}; - // const int rowsEmpty[] = {7, 6, 5, 4, 3, 2, 1}; - // - - if (lastNonZero < 2) - dctInverse8x8_7(_dctData[comp]._buffer); - else if (lastNonZero < 5) - dctInverse8x8_6(_dctData[comp]._buffer); - else if (lastNonZero < 9) - dctInverse8x8_5(_dctData[comp]._buffer); - else if (lastNonZero < 14) - dctInverse8x8_4(_dctData[comp]._buffer); - else if (lastNonZero < 20) - dctInverse8x8_3(_dctData[comp]._buffer); - else if (lastNonZero < 27) - dctInverse8x8_2(_dctData[comp]._buffer); - else if (lastNonZero < 35) - dctInverse8x8_1(_dctData[comp]._buffer); - else - dctInverse8x8_0(_dctData[comp]._buffer); - } - } - - // - // Perform the CSC - // - - if (numComp == 3) - { - if (!blockIsConstant) - { - csc709Inverse64 (_dctData[0]._buffer, - _dctData[1]._buffer, - _dctData[2]._buffer); - - } - else - { - csc709Inverse (_dctData[0]._buffer[0], - _dctData[1]._buffer[0], - _dctData[2]._buffer[0]); - } - } - - // - // Float -> Half conversion. - // - // If the block has a constant value, just convert the first pixel. - // - - for (unsigned int comp = 0; comp < numComp; ++comp) - { - if (!blockIsConstant) - { - (*convertFloatToHalf64) - (&rowBlock[comp][blockx*64], _dctData[comp]._buffer); - } - else - { - #if IMF_HAVE_SSE2 - - __m128i *dst = (__m128i*)&rowBlock[comp][blockx*64]; - - dst[0] = _mm_set1_epi16 - (((half)_dctData[comp]._buffer[0]).bits()); - - dst[1] = dst[0]; - dst[2] = dst[0]; - dst[3] = dst[0]; - dst[4] = dst[0]; - dst[5] = dst[0]; - dst[6] = dst[0]; - dst[7] = dst[0]; - - #else /* IMF_HAVE_SSE2 */ - - unsigned short *dst = &rowBlock[comp][blockx*64]; - - dst[0] = ((half)_dctData[comp]._buffer[0]).bits(); - - for (int i = 1; i < 64; ++i) - { - dst[i] = dst[0]; - } - - #endif /* IMF_HAVE_SSE2 */ - } // blockIsConstant - } // comp - } // blockx - - // - // At this point, we have half-float nonlinear value blocked - // in rowBlock[][]. We need to unblock the data, transfer - // back to linear, and write the results in the _rowPtrs[]. - // - // There is a fast-path for aligned rows, which helps - // things a little. Since this fast path is only valid - // for full 8-element wide blocks, the partial x blocks - // are broken into a separate loop below. - // - // At the moment, the fast path requires: - // * sse support - // * aligned row pointers - // * full 8-element wide blocks - // - - for (int comp = 0; comp < numComp; ++comp) - { - // - // Test if we can use the fast path - // - - #ifdef IMF_HAVE_SSE2 - - bool fastPath = true; - - for (int y = 8 * blocky; y < 8 * blocky + maxY; ++y) - { - if ((size_t)_rowPtrs[comp][y] & _SSE_ALIGNMENT_MASK) - fastPath = false; - } - - if (fastPath) - { - // - // Handle all the full X blocks, in a fast path with sse2 and - // aligned row pointers - // - - for (int y=8*blocky; y<8*blocky+maxY; ++y) - { - __m128i *dst = (__m128i *)_rowPtrs[comp][y]; - __m128i *src = (__m128i *)&rowBlock[comp][(y & 0x7) * 8]; - - - for (int blockx = 0; blockx < numFullBlocksX; ++blockx) - { - // - // These may need some twiddling. - // Run with multiples of 8 - // - - _mm_prefetch ((char *)(src + 16), _MM_HINT_NTA); - - unsigned short i0 = _mm_extract_epi16 (*src, 0); - unsigned short i1 = _mm_extract_epi16 (*src, 1); - unsigned short i2 = _mm_extract_epi16 (*src, 2); - unsigned short i3 = _mm_extract_epi16 (*src, 3); - - unsigned short i4 = _mm_extract_epi16 (*src, 4); - unsigned short i5 = _mm_extract_epi16 (*src, 5); - unsigned short i6 = _mm_extract_epi16 (*src, 6); - unsigned short i7 = _mm_extract_epi16 (*src, 7); - - i0 = _toLinear[i0]; - i1 = _toLinear[i1]; - i2 = _toLinear[i2]; - i3 = _toLinear[i3]; - - i4 = _toLinear[i4]; - i5 = _toLinear[i5]; - i6 = _toLinear[i6]; - i7 = _toLinear[i7]; - - *dst = _mm_insert_epi16 (_mm_setzero_si128(), i0, 0); - *dst = _mm_insert_epi16 (*dst, i1, 1); - *dst = _mm_insert_epi16 (*dst, i2, 2); - *dst = _mm_insert_epi16 (*dst, i3, 3); - - *dst = _mm_insert_epi16 (*dst, i4, 4); - *dst = _mm_insert_epi16 (*dst, i5, 5); - *dst = _mm_insert_epi16 (*dst, i6, 6); - *dst = _mm_insert_epi16 (*dst, i7, 7); - - src += 8; - dst++; - } - } - } - else - { - - #endif /* IMF_HAVE_SSE2 */ - - // - // Basic scalar kinda slow path for handling the full X blocks - // - - for (int y = 8 * blocky; y < 8 * blocky + maxY; ++y) - { - unsigned short *dst = (unsigned short *)_rowPtrs[comp][y]; - - for (int blockx = 0; blockx < numFullBlocksX; ++blockx) - { - unsigned short *src = - &rowBlock[comp][blockx * 64 + ((y & 0x7) * 8)]; - - dst[0] = _toLinear[src[0]]; - dst[1] = _toLinear[src[1]]; - dst[2] = _toLinear[src[2]]; - dst[3] = _toLinear[src[3]]; - - dst[4] = _toLinear[src[4]]; - dst[5] = _toLinear[src[5]]; - dst[6] = _toLinear[src[6]]; - dst[7] = _toLinear[src[7]]; - - dst += 8; - } - } - - #ifdef IMF_HAVE_SSE2 - - } - - #endif /* IMF_HAVE_SSE2 */ - - // - // If we have partial X blocks, deal with all those now - // Since this should be minimal work, there currently - // is only one path that should work for everyone. - // - - if (numFullBlocksX != numBlocksX) - { - for (int y = 8 * blocky; y < 8 * blocky + maxY; ++y) - { - unsigned short *src = (unsigned short *) - &rowBlock[comp][numFullBlocksX * 64 + ((y & 0x7) * 8)]; - - unsigned short *dst = (unsigned short *)_rowPtrs[comp][y]; - - dst += 8 * numFullBlocksX; - - for (int x = 0; x < maxX; ++x) - { - *dst++ = _toLinear[*src++]; - } - } - } - } // comp - } // blocky - - // - // Walk over all the channels that are of type FLOAT. - // Convert from HALF XDR back to FLOAT XDR. - // - - for (unsigned int chan = 0; chan < numComp; ++chan) - { - - if (_type[chan] != FLOAT) - continue; - - std::vector halfXdr (_width); - - for (int y=0; y<_height; ++y) - { - char *floatXdrPtr = _rowPtrs[chan][y]; - - memcpy(&halfXdr[0], floatXdrPtr, _width*sizeof(unsigned short)); - - const char *halfXdrPtr = (const char *)(&halfXdr[0]); - - for (int x=0; x<_width; ++x) - { - half tmpHalf; - - Xdr::read (halfXdrPtr, tmpHalf); - Xdr::write (floatXdrPtr, (float)tmpHalf); - - // - // Xdr::write and Xdr::read will advance the ptrs - // - } - } - } - - delete[] rowBlockHandle; -} - - -// -// Un-RLE the packed AC components into -// a half buffer. The half block should -// be the full 8x8 block (in zig-zag order -// still), not the first AC component. -// -// currAcComp is advanced as bytes are decoded. -// -// This returns the index of the last non-zero -// value in the buffer - with the index into zig zag -// order data. If we return 0, we have DC only data. -// -// This is assuminging that halfZigBlock is zero'ed -// prior to calling -// - -int -DwaCompressor::LossyDctDecoderBase::unRleAc - (unsigned short *&currAcComp, - unsigned short *halfZigBlock) -{ - // - // Un-RLE the RLE'd blocks. If we find an item whose - // high byte is 0xff, then insert the number of 0's - // as indicated by the low byte. - // - // Otherwise, just copy the number verbaitm. - // - - int lastNonZero = 0; - int dctComp = 1; - - // - // Start with a zero'ed block, so we don't have to - // write when we hit a run symbol - // - - while (dctComp < 64) - { - if (*currAcComp == 0xff00) - { - // - // End of block - // - - dctComp = 64; - - } - else if ((*currAcComp) >> 8 == 0xff) - { - // - // Run detected! Insert 0's. - // - // Since the block has been zeroed, just advance the ptr - // - - dctComp += (*currAcComp) & 0xff; - } - else - { - // - // Not a run, just copy over the value - // - - lastNonZero = dctComp; - halfZigBlock[dctComp] = *currAcComp; - - dctComp++; - } - - _packedAcCount++; - currAcComp++; - } - - return lastNonZero; -} - - -// ============================================================== -// -// LossyDctEncoderBase -// -// -------------------------------------------------------------- - -DwaCompressor::LossyDctEncoderBase::LossyDctEncoderBase - (float quantBaseError, - char *packedAc, - char *packedDc, - const unsigned short *toNonlinear, - int width, - int height) -: - _quantBaseError(quantBaseError), - _width(width), - _height(height), - _toNonlinear(toNonlinear), - _numAcComp(0), - _numDcComp(0), - _packedAc(packedAc), - _packedDc(packedDc) -{ - // - // Here, we take the generic JPEG quantization tables and - // normalize them by the smallest component in each table. - // This gives us a relationship amongst the DCT components, - // in terms of how sensitive each component is to - // error. - // - // A higher normalized value means we can quantize more, - // and a small normalized value means we can quantize less. - // - // Eventually, we will want an acceptable quantization - // error range for each component. We find this by - // multiplying some user-specified level (_quantBaseError) - // by the normalized table (_quantTableY, _quantTableCbCr) to - // find the acceptable quantization error range. - // - // The quantization table is not needed for decoding, and - // is not transmitted. So, if you want to get really fancy, - // you could derive some content-dependent quantization - // table, and the decoder would not need to be changed. But, - // for now, we'll just use statice quantization tables. - // - - int jpegQuantTableY[] = - { - 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 - }; - - int jpegQuantTableYMin = 10; - - int jpegQuantTableCbCr[] = - { - 17, 18, 24, 47, 99, 99, 99, 99, - 18, 21, 26, 66, 99, 99, 99, 99, - 24, 26, 56, 99, 99, 99, 99, 99, - 47, 66, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 - }; - - int jpegQuantTableCbCrMin = 17; - - for (int idx = 0; idx < 64; ++idx) - { - _quantTableY[idx] = static_cast (jpegQuantTableY[idx]) / - static_cast (jpegQuantTableYMin); - - _quantTableCbCr[idx] = static_cast (jpegQuantTableCbCr[idx]) / - static_cast (jpegQuantTableCbCrMin); - } - - if (_quantBaseError < 0) - quantBaseError = 0; -} - - -DwaCompressor::LossyDctEncoderBase::~LossyDctEncoderBase () -{ -} - - -// -// Given three channels of source data, encoding by first applying -// a color space conversion to a YCbCr space. Otherwise, if we only -// have one channel, just encode it as is. -// -// Other numbers of channels are somewhat unexpected at this point, -// and will throw an exception. -// - -void -DwaCompressor::LossyDctEncoderBase::execute () -{ - int numBlocksX = (int)ceil ((float)_width / 8.0f); - int numBlocksY = (int)ceil ((float)_height/ 8.0f); - - half halfZigCoef[64]; - half halfCoef[64]; - - std::vector currDcComp (_rowPtrs.size()); - unsigned short *currAcComp = (unsigned short *)_packedAc; - - _dctData.resize (_rowPtrs.size()); - _numAcComp = 0; - _numDcComp = 0; - - assert (_type.size() == _rowPtrs.size()); - assert ((_rowPtrs.size() == 3) || (_rowPtrs.size() == 1)); - - // - // Allocate a temp half buffer to quantize into for - // any FLOAT source channels. - // - - int tmpHalfBufferElements = 0; - - for (unsigned int chan = 0; chan < _rowPtrs.size(); ++chan) - if (_type[chan] == FLOAT) - tmpHalfBufferElements += _width * _height; - - std::vector tmpHalfBuffer (tmpHalfBufferElements); - - char *tmpHalfBufferPtr = 0; - - if (tmpHalfBufferElements) - tmpHalfBufferPtr = (char *)&tmpHalfBuffer[0]; - - // - // Run over all the float scanlines, quantizing, - // and re-assigning _rowPtr[y]. We need to translate - // FLOAT XDR to HALF XDR. - // - - for (unsigned int chan = 0; chan < _rowPtrs.size(); ++chan) - { - if (_type[chan] != FLOAT) - continue; - - for (int y = 0; y < _height; ++y) - { - float src = 0; - const char *srcXdr = _rowPtrs[chan][y]; - char *dstXdr = tmpHalfBufferPtr; - - for (int x = 0; x < _width; ++x) - { - - Xdr::read (srcXdr, src); - Xdr::write (dstXdr, ((half)src).bits()); - - // - // Xdr::read and Xdr::write will advance the ptr - // - } - - _rowPtrs[chan][y] = (const char *)tmpHalfBufferPtr; - tmpHalfBufferPtr += _width * sizeof (unsigned short); - } - } - - // - // Pack DC components together by common plane, so we can get - // a little more out of differencing them. We'll always have - // one component per block, so we can computed offsets. - // - - currDcComp[0] = (unsigned short *)_packedDc; - - for (unsigned int chan = 1; chan < _rowPtrs.size(); ++chan) - currDcComp[chan] = currDcComp[chan-1] + numBlocksX * numBlocksY; - - for (int blocky = 0; blocky < numBlocksY; ++blocky) - { - for (int blockx = 0; blockx < numBlocksX; ++blockx) - { - half h; - unsigned short tmpShortXdr, tmpShortNative; - char *tmpCharPtr; - - for (unsigned int chan = 0; chan < _rowPtrs.size(); ++chan) - { - // - // Break the source into 8x8 blocks. If we don't - // fit at the edges, mirror. - // - // Also, convert from linear to nonlinear representation. - // Our source is assumed to be XDR, and we need to convert - // to NATIVE prior to converting to float. - // - // If we're converting linear -> nonlinear, assume that the - // XDR -> NATIVE conversion is built into the lookup. Otherwise, - // we'll need to explicitly do it. - // - - for (int y = 0; y < 8; ++y) - { - for (int x = 0; x < 8; ++x) - { - int vx = 8 * blockx + x; - int vy = 8 * blocky + y; - - if (vx >= _width) - vx = _width - (vx - (_width - 1)); - - if (vx < 0) vx = _width-1; - - if (vy >=_height) - vy = _height - (vy - (_height - 1)); - - if (vy < 0) vy = _height-1; - - tmpShortXdr = - ((const unsigned short *)(_rowPtrs[chan])[vy])[vx]; - - if (_toNonlinear) - { - h.setBits (_toNonlinear[tmpShortXdr]); - } - else - { - const char *tmpConstCharPtr = - (const char *)(&tmpShortXdr); - - Xdr::read - (tmpConstCharPtr, tmpShortNative); - - h.setBits(tmpShortNative); - } - - _dctData[chan]._buffer[y * 8 + x] = (float)h; - } // x - } // y - } // chan - - // - // Color space conversion - // - - if (_rowPtrs.size() == 3) - { - csc709Forward64 (_dctData[0]._buffer, - _dctData[1]._buffer, - _dctData[2]._buffer); - } - - for (unsigned int chan = 0; chan < _rowPtrs.size(); ++chan) - { - // - // Forward DCT - // - - dctForward8x8(_dctData[chan]._buffer); - - // - // Quantize to half, and zigzag - // - - if (chan == 0) - { - for (int i = 0; i < 64; ++i) - { - halfCoef[i] = - quantize ((half)_dctData[chan]._buffer[i], - _quantBaseError*_quantTableY[i]); - } - } - else - { - for (int i = 0; i < 64; ++i) - { - halfCoef[i] = - quantize ((half)_dctData[chan]._buffer[i], - _quantBaseError*_quantTableCbCr[i]); - } - } - - toZigZag (halfZigCoef, halfCoef); - - // - // Convert from NATIVE back to XDR, before we write out - // - - for (int i = 0; i < 64; ++i) - { - tmpCharPtr = (char *)&tmpShortXdr; - Xdr::write(tmpCharPtr, halfZigCoef[i].bits()); - halfZigCoef[i].setBits(tmpShortXdr); - } - - // - // Save the DC component separately, to be compressed on - // its own. - // - - *currDcComp[chan]++ = halfZigCoef[0].bits(); - _numDcComp++; - - // - // Then RLE the AC components (which will record the count - // of the resulting number of items) - // - - rleAc (halfZigCoef, currAcComp); - } // chan - } // blockx - } // blocky -} - - -// -// Reorder from zig-zag order to normal ordering -// - -void -DwaCompressor::LossyDctEncoderBase::toZigZag (half *dst, half *src) -{ - const int remap[] = - { - 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 - }; - - for (int i=0; i<64; ++i) - dst[i] = src[remap[i]]; -} - - -// -// Precomputing the bit count runs faster than using -// the builtin instruction, at least in one case.. -// -// Precomputing 8-bits is no slower than 16-bits, -// and saves a fair bit of overhead.. -// - -int -DwaCompressor::LossyDctEncoderBase::countSetBits (unsigned short src) -{ - static const unsigned short numBitsSet[256] = - { - 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 - }; - - return numBitsSet[src & 0xff] + numBitsSet[src >> 8]; -} - - -// -// Take a DCT coefficient, as well as an acceptable error. Search -// nearby values within the error tolerance, that have fewer -// bits set. -// -// The list of candidates has been pre-computed and sorted -// in order of increasing numbers of bits set. This way, we -// can stop searching as soon as we find a candidate that -// is within the error tolerance. -// - -half -DwaCompressor::LossyDctEncoderBase::quantize (half src, float errorTolerance) -{ - half tmp; - float srcFloat = (float)src; - int numSetBits = countSetBits(src.bits()); - const unsigned short *closest = closestData + closestDataOffset[src.bits()]; - - for (int targetNumSetBits = numSetBits - 1; - targetNumSetBits >= 0; - --targetNumSetBits) - { - tmp.setBits (*closest); - - if (fabs ((float)tmp - srcFloat) < errorTolerance) - return tmp; - - closest++; - } - - return src; -} - - -// -// RLE the zig-zag of the AC components + copy over -// into another tmp buffer -// -// Try to do a simple RLE scheme to reduce run's of 0's. This -// differs from the jpeg EOB case, since EOB just indicates that -// the rest of the block is zero. In our case, we have lots of -// NaN symbols, which shouldn't be allowed to occur in DCT -// coefficents - so we'll use them for encoding runs. -// -// If the high byte is 0xff, then we have a run of 0's, of length -// given by the low byte. For example, 0xff03 would be a run -// of 3 0's, starting at the current location. -// -// block is our block of 64 coefficients -// acPtr a pointer to back the RLE'd values into. -// -// This will advance the counter, _numAcComp. -// - -void -DwaCompressor::LossyDctEncoderBase::rleAc - (half *block, - unsigned short *&acPtr) -{ - int dctComp = 1; - unsigned short rleSymbol = 0x0; - - while (dctComp < 64) - { - int runLen = 1; - - // - // If we don't have a 0, output verbatim - // - - if (block[dctComp].bits() != rleSymbol) - { - *acPtr++ = block[dctComp].bits(); - _numAcComp++; - - dctComp += runLen; - continue; - } - - // - // We're sitting on a 0, so see how big the run is. - // - - while ((dctComp+runLen < 64) && - (block[dctComp+runLen].bits() == rleSymbol)) - { - runLen++; - } - - // - // If the run len is too small, just output verbatim - // otherwise output our run token - // - // Originally, we wouldn't have a separate symbol for - // "end of block". But in some experimentation, it looks - // like using 0xff00 for "end of block" can save a bit - // of space. - // - - if (runLen == 1) - { - runLen = 1; - *acPtr++ = block[dctComp].bits(); - _numAcComp++; - - // - // Using 0xff00 for "end of block" - // - } - else if (runLen + dctComp == 64) - { - // - // Signal EOB - // - - *acPtr++ = 0xff00; - _numAcComp++; - } - else - { - // - // Signal normal run - // - - *acPtr++ = 0xff00 | runLen; - _numAcComp++; - } - - // - // Advance by runLen - // - - dctComp += runLen; - } -} - - -// ============================================================== -// -// DwaCompressor -// -// -------------------------------------------------------------- - -// -// DwaCompressor() -// - -DwaCompressor::DwaCompressor - (const Header &hdr, - int maxScanLineSize, - int numScanLines, - AcCompression acCompression) -: - Compressor(hdr), - _acCompression(acCompression), - _maxScanLineSize(maxScanLineSize), - _numScanLines(numScanLines), - _channels(hdr.channels()), - _packedAcBuffer(0), - _packedAcBufferSize(0), - _packedDcBuffer(0), - _packedDcBufferSize(0), - _rleBuffer(0), - _rleBufferSize(0), - _outBuffer(0), - _outBufferSize(0), - _zip(0), - _dwaCompressionLevel(45.0) -{ - _min[0] = hdr.dataWindow().min.x; - _min[1] = hdr.dataWindow().min.y; - _max[0] = hdr.dataWindow().max.x; - _max[1] = hdr.dataWindow().max.y; - - for (int i=0; i < NUM_COMPRESSOR_SCHEMES; ++i) - { - _planarUncBuffer[i] = 0; - _planarUncBufferSize[i] = 0; - } - - // - // Check the header for a quality attribute - // - - if (hasDwaCompressionLevel (hdr)) - _dwaCompressionLevel = dwaCompressionLevel (hdr); -} - - -DwaCompressor::~DwaCompressor() -{ - delete[] _packedAcBuffer; - delete[] _packedDcBuffer; - delete[] _rleBuffer; - delete[] _outBuffer; - delete _zip; - - for (int i=0; i channelRules; - if (fileVersion >= 2) - { - relevantChannelRules(channelRules); - - channelRuleSize = Xdr::size(); - for (size_t i = 0; i < channelRules.size(); ++i) - channelRuleSize += channelRules[i].size(); - } - - // - // Remember to allocate _outBuffer, if we haven't done so already. - // - - outBufferSize += channelRuleSize; - if (outBufferSize > _outBufferSize) - { - _outBufferSize = outBufferSize; - if (_outBuffer == 0) - delete[] _outBuffer; - _outBuffer = new char[outBufferSize]; - } - - char *outDataPtr = &_outBuffer[NUM_SIZES_SINGLE * sizeof(Imf::Int64) + - channelRuleSize]; - - // - // We might not be dealing with any color data, in which - // case the AC buffer size will be 0, and deferencing - // a vector will not be a good thing to do. - // - - if (_packedAcBuffer) - packedAcEnd = _packedAcBuffer; - - if (_packedDcBuffer) - packedDcEnd = _packedDcBuffer; - - #define OBIDX(x) (Int64 *)&_outBuffer[x * sizeof (Int64)] - - Int64 *version = OBIDX (VERSION); - Int64 *unknownUncompressedSize = OBIDX (UNKNOWN_UNCOMPRESSED_SIZE); - Int64 *unknownCompressedSize = OBIDX (UNKNOWN_COMPRESSED_SIZE); - Int64 *acCompressedSize = OBIDX (AC_COMPRESSED_SIZE); - Int64 *dcCompressedSize = OBIDX (DC_COMPRESSED_SIZE); - Int64 *rleCompressedSize = OBIDX (RLE_COMPRESSED_SIZE); - Int64 *rleUncompressedSize = OBIDX (RLE_UNCOMPRESSED_SIZE); - Int64 *rleRawSize = OBIDX (RLE_RAW_SIZE); - - Int64 *totalAcUncompressedCount = OBIDX (AC_UNCOMPRESSED_COUNT); - Int64 *totalDcUncompressedCount = OBIDX (DC_UNCOMPRESSED_COUNT); - - Int64 *acCompression = OBIDX (AC_COMPRESSION); - - int minX = range.min.x; - int maxX = std::min(range.max.x, _max[0]); - int minY = range.min.y; - int maxY = std::min(range.max.y, _max[1]); - - // - // Zero all the numbers in the chunk header - // - - memset (_outBuffer, 0, NUM_SIZES_SINGLE * sizeof (Int64)); - - // - // Setup the AC compression strategy and the version in the data block, - // then write the relevant channel classification rules if needed - // - *version = fileVersion; - *acCompression = _acCompression; - - setupChannelData (minX, minY, maxX, maxY); - - if (fileVersion >= 2) - { - char *writePtr = &_outBuffer[NUM_SIZES_SINGLE * sizeof(Imf::Int64)]; - Xdr::write (writePtr, channelRuleSize); - - for (size_t i = 0; i < channelRules.size(); ++i) - channelRules[i].write(writePtr); - } - - // - // Determine the start of each row in the input buffer - // Channels are interleaved by scanline - // - - std::vector encodedChannels (_channelData.size()); - std::vector< std::vector > rowPtrs (_channelData.size()); - - for (unsigned int chan = 0; chan < _channelData.size(); ++chan) - encodedChannels[chan] = false; - - inDataPtr = inPtr; - - for (int y = minY; y <= maxY; ++y) - { - for (unsigned int chan = 0; chan < _channelData.size(); ++chan) - { - - ChannelData *cd = &_channelData[chan]; - - if (Imath::modp(y, cd->ySampling) != 0) - continue; - - rowPtrs[chan].push_back(inDataPtr); - inDataPtr += cd->width * Imf::pixelTypeSize(cd->type); - } - } - - inDataPtr = inPtr; - - // - // Make a pass over all our CSC sets and try to encode them first - // - - for (unsigned int csc = 0; csc < _cscSets.size(); ++csc) - { - - LossyDctEncoderCsc encoder - (_dwaCompressionLevel / 100000.f, - rowPtrs[_cscSets[csc].idx[0]], - rowPtrs[_cscSets[csc].idx[1]], - rowPtrs[_cscSets[csc].idx[2]], - packedAcEnd, - packedDcEnd, - dwaCompressorToNonlinear, - _channelData[_cscSets[csc].idx[0]].width, - _channelData[_cscSets[csc].idx[0]].height, - _channelData[_cscSets[csc].idx[0]].type, - _channelData[_cscSets[csc].idx[1]].type, - _channelData[_cscSets[csc].idx[2]].type); - - encoder.execute(); - - *totalAcUncompressedCount += encoder.numAcValuesEncoded(); - *totalDcUncompressedCount += encoder.numDcValuesEncoded(); - - packedAcEnd += encoder.numAcValuesEncoded() * sizeof(unsigned short); - packedDcEnd += encoder.numDcValuesEncoded() * sizeof(unsigned short); - - encodedChannels[_cscSets[csc].idx[0]] = true; - encodedChannels[_cscSets[csc].idx[1]] = true; - encodedChannels[_cscSets[csc].idx[2]] = true; - } - - for (unsigned int chan = 0; chan < _channelData.size(); ++chan) - { - ChannelData *cd = &_channelData[chan]; - - if (encodedChannels[chan]) - continue; - - switch (cd->compression) - { - case LOSSY_DCT: - - // - // For LOSSY_DCT, treat this just like the CSC'd case, - // but only operate on one channel - // - - { - const unsigned short *nonlinearLut = 0; - - if (!cd->pLinear) - nonlinearLut = dwaCompressorToNonlinear; - - LossyDctEncoder encoder - (_dwaCompressionLevel / 100000.f, - rowPtrs[chan], - packedAcEnd, - packedDcEnd, - nonlinearLut, - cd->width, - cd->height, - cd->type); - - encoder.execute(); - - *totalAcUncompressedCount += encoder.numAcValuesEncoded(); - *totalDcUncompressedCount += encoder.numDcValuesEncoded(); - - packedAcEnd += - encoder.numAcValuesEncoded() * sizeof (unsigned short); - - packedDcEnd += - encoder.numDcValuesEncoded() * sizeof (unsigned short); - } - - break; - - case RLE: - - // - // For RLE, bash the bytes up so that the first bytes of each - // pixel are contingous, as are the second bytes, and so on. - // - - for (unsigned int y = 0; y < rowPtrs[chan].size(); ++y) - { - const char *row = rowPtrs[chan][y]; - - for (int x = 0; x < cd->width; ++x) - { - for (int byte = 0; - byte < Imf::pixelTypeSize (cd->type); - ++byte) - { - - *cd->planarUncRleEnd[byte]++ = *row++; - } - } - - *rleRawSize += cd->width * Imf::pixelTypeSize(cd->type); - } - - break; - - case UNKNOWN: - - // - // Otherwise, just copy data over verbatim - // - - { - int scanlineSize = cd->width * Imf::pixelTypeSize(cd->type); - - for (unsigned int y = 0; y < rowPtrs[chan].size(); ++y) - { - memcpy (cd->planarUncBufferEnd, - rowPtrs[chan][y], - scanlineSize); - - cd->planarUncBufferEnd += scanlineSize; - } - - *unknownUncompressedSize += cd->planarUncSize; - } - - break; - - default: - - assert (false); - } - - encodedChannels[chan] = true; - } - - // - // Pack the Unknown data into the output buffer first. Instead of - // just copying it uncompressed, try zlib compression at least. - // - - if (*unknownUncompressedSize > 0) - { - uLongf inSize = (uLongf)(*unknownUncompressedSize); - uLongf outSize = (uLongf)(ceil ((float)inSize * 1.01f) + 100); - - if (Z_OK != ::compress2 ((Bytef *)outDataPtr, - &outSize, - (const Bytef *)_planarUncBuffer[UNKNOWN], - inSize, - 9)) - { - throw Iex::BaseExc ("Data compression (zlib) failed."); - } - - outDataPtr += outSize; - *unknownCompressedSize = outSize; - } - - // - // Now, pack all the Lossy DCT coefficients into our output - // buffer, with Huffman encoding. - // - // Also, record the compressed size and the number of - // uncompressed componentns we have. - // - - if (*totalAcUncompressedCount > 0) - { - switch (_acCompression) - { - case STATIC_HUFFMAN: - - *acCompressedSize = (int) - hufCompress((unsigned short *)_packedAcBuffer, - (int)*totalAcUncompressedCount, - outDataPtr); - break; - - case DEFLATE: - - { - uLongf destLen = (uLongf) - (2 * (*totalAcUncompressedCount) * sizeof (unsigned short)); - - if (Z_OK != ::compress2 - ((Bytef *)outDataPtr, - &destLen, - (Bytef *)_packedAcBuffer, - (uLong)(*totalAcUncompressedCount - * sizeof (unsigned short)), - 9)) - { - throw Iex::InputExc ("Data compression (zlib) failed."); - } - - *acCompressedSize = destLen; - } - - break; - - default: - - assert (false); - } - - outDataPtr += *acCompressedSize; - } - - // - // Handle the DC components separately - // - - if (*totalDcUncompressedCount > 0) - { - *dcCompressedSize = _zip->compress - (_packedDcBuffer, - (int)(*totalDcUncompressedCount) * sizeof (unsigned short), - outDataPtr); - - outDataPtr += *dcCompressedSize; - } - - // - // If we have RLE data, first RLE encode it and set the uncompressed - // size. Then, deflate the results and set the compressed size. - // - - if (*rleRawSize > 0) - { - *rleUncompressedSize = rleCompress - ((int)(*rleRawSize), - _planarUncBuffer[RLE], - (signed char *)_rleBuffer); - - uLongf dstLen = - (uLongf)ceil (1.01f * (float) * rleUncompressedSize) + 24; - - if (Z_OK != ::compress2 - ((Bytef *)outDataPtr, - &dstLen, - (Bytef *)_rleBuffer, - (uLong)(*rleUncompressedSize), - 9)) - { - throw Iex::BaseExc ("Error compressing RLE'd data."); - } - - *rleCompressedSize = dstLen; - outDataPtr += *rleCompressedSize; - } - - // - // Flip the counters to XDR format - // - - for (int i = 0; i < NUM_SIZES_SINGLE; ++i) - { - Int64 src = *(((Int64 *)_outBuffer) + i); - char *dst = (char *)(((Int64 *)_outBuffer) + i); - - Xdr::write (dst, src); - } - - // - // We're done - compute the number of bytes we packed - // - - outPtr = _outBuffer; - - return static_cast(outDataPtr - _outBuffer + 1); -} - - -int -DwaCompressor::uncompress - (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) -{ - return uncompress (inPtr, - inSize, - Imath::Box2i (Imath::V2i (_min[0], minY), - Imath::V2i (_max[0], minY + numScanLines() - 1)), - outPtr); -} - - -int -DwaCompressor::uncompressTile - (const char *inPtr, - int inSize, - Imath::Box2i range, - const char *&outPtr) -{ - return uncompress (inPtr, inSize, range, outPtr); -} - - -int -DwaCompressor::uncompress - (const char *inPtr, - int inSize, - Imath::Box2i range, - const char *&outPtr) -{ - int minX = range.min.x; - int maxX = std::min (range.max.x, _max[0]); - int minY = range.min.y; - int maxY = std::min (range.max.y, _max[1]); - - int headerSize = NUM_SIZES_SINGLE*sizeof(Int64); - if (inSize < headerSize) - { - throw Iex::InputExc("Error uncompressing DWA data" - "(truncated header)."); - } - - // - // Flip the counters from XDR to NATIVE - // - - for (int i = 0; i < NUM_SIZES_SINGLE; ++i) - { - Int64 *dst = (((Int64 *)inPtr) + i); - const char *src = (char *)(((Int64 *)inPtr) + i); - - Xdr::read (src, *dst); - } - - // - // Unwind all the counter info - // - - const Int64 *inPtr64 = (const Int64*) inPtr; - - Int64 version = *(inPtr64 + VERSION); - Int64 unknownUncompressedSize = *(inPtr64 + UNKNOWN_UNCOMPRESSED_SIZE); - Int64 unknownCompressedSize = *(inPtr64 + UNKNOWN_COMPRESSED_SIZE); - Int64 acCompressedSize = *(inPtr64 + AC_COMPRESSED_SIZE); - Int64 dcCompressedSize = *(inPtr64 + DC_COMPRESSED_SIZE); - Int64 rleCompressedSize = *(inPtr64 + RLE_COMPRESSED_SIZE); - Int64 rleUncompressedSize = *(inPtr64 + RLE_UNCOMPRESSED_SIZE); - Int64 rleRawSize = *(inPtr64 + RLE_RAW_SIZE); - - Int64 totalAcUncompressedCount = *(inPtr64 + AC_UNCOMPRESSED_COUNT); - Int64 totalDcUncompressedCount = *(inPtr64 + DC_UNCOMPRESSED_COUNT); - - Int64 acCompression = *(inPtr64 + AC_COMPRESSION); - - Int64 compressedSize = unknownCompressedSize + - acCompressedSize + - dcCompressedSize + - rleCompressedSize; - - const char *dataPtr = inPtr + NUM_SIZES_SINGLE * sizeof(Int64); - - /* Both the sum and individual sizes are checked in case of overflow. */ - if (inSize < (headerSize + compressedSize) || - inSize < unknownCompressedSize || - inSize < acCompressedSize || - inSize < dcCompressedSize || - inSize < rleCompressedSize) - { - throw Iex::InputExc("Error uncompressing DWA data" - "(truncated file)."); - } - - if (unknownUncompressedSize < 0 || - unknownCompressedSize < 0 || - acCompressedSize < 0 || - dcCompressedSize < 0 || - rleCompressedSize < 0 || - rleUncompressedSize < 0 || - rleRawSize < 0 || - totalAcUncompressedCount < 0 || - totalDcUncompressedCount < 0) - { - throw Iex::InputExc("Error uncompressing DWA data" - " (corrupt header)."); - } - - if (version < 2) - initializeLegacyChannelRules(); - else - { - unsigned short ruleSize = 0; - Xdr::read(dataPtr, ruleSize); - - if (ruleSize < 0) - throw Iex::InputExc("Error uncompressing DWA data" - " (corrupt header file)."); - - headerSize += ruleSize; - if (inSize < headerSize + compressedSize) - throw Iex::InputExc("Error uncompressing DWA data" - " (truncated file)."); - - _channelRules.clear(); - ruleSize -= Xdr::size (); - while (ruleSize > 0) - { - Classifier rule(dataPtr, ruleSize); - - _channelRules.push_back(rule); - ruleSize -= rule.size(); - } - } - - - size_t outBufferSize = 0; - initializeBuffers(outBufferSize); - - // - // Allocate _outBuffer, if we haven't done so already - // - - if (_maxScanLineSize * numScanLines() > _outBufferSize) - { - _outBufferSize = _maxScanLineSize * numScanLines(); - if (_outBuffer != 0) - delete[] _outBuffer; - _outBuffer = new char[_maxScanLineSize * numScanLines()]; - } - - - char *outBufferEnd = _outBuffer; - - - // - // Find the start of the RLE packed AC components and - // the DC components for each channel. This will be handy - // if you want to decode the channels in parallel later on. - // - - char *packedAcBufferEnd = 0; - - if (_packedAcBuffer) - packedAcBufferEnd = _packedAcBuffer; - - char *packedDcBufferEnd = 0; - - if (_packedDcBuffer) - packedDcBufferEnd = _packedDcBuffer; - - // - // UNKNOWN data is packed first, followed by the - // Huffman-compressed AC, then the DC values, - // and then the zlib compressed RLE data. - // - - const char *compressedUnknownBuf = dataPtr; - - const char *compressedAcBuf = compressedUnknownBuf + - static_cast(unknownCompressedSize); - const char *compressedDcBuf = compressedAcBuf + - static_cast(acCompressedSize); - const char *compressedRleBuf = compressedDcBuf + - static_cast(dcCompressedSize); - - // - // Sanity check that the version is something we expect. Right now, - // we can decode version 0, 1, and 2. v1 adds 'end of block' symbols - // to the AC RLE. v2 adds channel classification rules at the - // start of the data block. - // - - if ((version < 0) || (version > 2)) - throw Iex::InputExc ("Invalid version of compressed data block"); - - setupChannelData(minX, minY, maxX, maxY); - - // - // Uncompress the UNKNOWN data into _planarUncBuffer[UNKNOWN] - // - - if (unknownCompressedSize > 0) - { - uLongf outSize = static_cast( - ceil( (float)unknownUncompressedSize * 1.01) + 100); - - if (unknownUncompressedSize < 0 || - outSize > _planarUncBufferSize[UNKNOWN]) - { - throw Iex::InputExc("Error uncompressing DWA data" - "(corrupt header)."); - } - - if (Z_OK != ::uncompress - ((Bytef *)_planarUncBuffer[UNKNOWN], - &outSize, - (Bytef *)compressedUnknownBuf, - (uLong)unknownCompressedSize)) - { - throw Iex::BaseExc("Error uncompressing UNKNOWN data."); - } - } - - // - // Uncompress the AC data into _packedAcBuffer - // - - if (acCompressedSize > 0) - { - if (totalAcUncompressedCount*sizeof(unsigned short) > _packedAcBufferSize) - { - throw Iex::InputExc("Error uncompressing DWA data" - "(corrupt header)."); - } - - // - // Don't trust the user to get it right, look in the file. - // - - switch (acCompression) - { - case STATIC_HUFFMAN: - - hufUncompress - (compressedAcBuf, - (int)acCompressedSize, - (unsigned short *)_packedAcBuffer, - (int)totalAcUncompressedCount); - - break; - - case DEFLATE: - { - uLongf destLen = - (int)(totalAcUncompressedCount) * sizeof (unsigned short); - - if (Z_OK != ::uncompress - ((Bytef *)_packedAcBuffer, - &destLen, - (Bytef *)compressedAcBuf, - (uLong)acCompressedSize)) - { - throw Iex::InputExc ("Data decompression (zlib) failed."); - } - - if (totalAcUncompressedCount * sizeof (unsigned short) != - destLen) - { - throw Iex::InputExc ("AC data corrupt."); - } - } - break; - - default: - - throw Iex::NoImplExc ("Unknown AC Compression"); - break; - } - } - - // - // Uncompress the DC data into _packedDcBuffer - // - - if (dcCompressedSize > 0) - { - if (totalDcUncompressedCount*sizeof(unsigned short) > _packedDcBufferSize) - { - throw Iex::InputExc("Error uncompressing DWA data" - "(corrupt header)."); - } - - if (_zip->uncompress - (compressedDcBuf, (int)dcCompressedSize, _packedDcBuffer) - != (int)totalDcUncompressedCount * sizeof (unsigned short)) - { - throw Iex::BaseExc("DC data corrupt."); - } - } - - // - // Uncompress the RLE data into _rleBuffer, then unRLE the results - // into _planarUncBuffer[RLE] - // - - if (rleRawSize > 0) - { - if (rleUncompressedSize > _rleBufferSize || - rleRawSize > _planarUncBufferSize[RLE]) - { - throw Iex::InputExc("Error uncompressing DWA data" - "(corrupt header)."); - } - - uLongf dstLen = (uLongf)rleUncompressedSize; - - if (Z_OK != ::uncompress - ((Bytef *)_rleBuffer, - &dstLen, - (Bytef *)compressedRleBuf, - (uLong)rleCompressedSize)) - { - throw Iex::BaseExc("Error uncompressing RLE data."); - } - - if (dstLen != rleUncompressedSize) - throw Iex::BaseExc("RLE data corrupted"); - - if (rleUncompress - ((int)rleUncompressedSize, - (int)rleRawSize, - (signed char *)_rleBuffer, - _planarUncBuffer[RLE]) != rleRawSize) - { - throw Iex::BaseExc("RLE data corrupted"); - } - } - - // - // Determine the start of each row in the output buffer - // - - std::vector decodedChannels (_channelData.size()); - std::vector< std::vector > rowPtrs (_channelData.size()); - - for (unsigned int chan = 0; chan < _channelData.size(); ++chan) - decodedChannels[chan] = false; - - outBufferEnd = _outBuffer; - - for (int y = minY; y <= maxY; ++y) - { - for (unsigned int chan = 0; chan < _channelData.size(); ++chan) - { - ChannelData *cd = &_channelData[chan]; - - if (Imath::modp (y, cd->ySampling) != 0) - continue; - - rowPtrs[chan].push_back (outBufferEnd); - outBufferEnd += cd->width * Imf::pixelTypeSize (cd->type); - } - } - - // - // Setup to decode each block of 3 channels that need to - // be handled together - // - - for (unsigned int csc = 0; csc < _cscSets.size(); ++csc) - { - int rChan = _cscSets[csc].idx[0]; - int gChan = _cscSets[csc].idx[1]; - int bChan = _cscSets[csc].idx[2]; - - - LossyDctDecoderCsc decoder - (rowPtrs[rChan], - rowPtrs[gChan], - rowPtrs[bChan], - packedAcBufferEnd, - packedDcBufferEnd, - dwaCompressorToLinear, - _channelData[rChan].width, - _channelData[rChan].height, - _channelData[rChan].type, - _channelData[gChan].type, - _channelData[bChan].type); - - decoder.execute(); - - packedAcBufferEnd += - decoder.numAcValuesEncoded() * sizeof (unsigned short); - - packedDcBufferEnd += - decoder.numDcValuesEncoded() * sizeof (unsigned short); - - decodedChannels[rChan] = true; - decodedChannels[gChan] = true; - decodedChannels[bChan] = true; - } - - // - // Setup to handle the remaining channels by themselves - // - - for (unsigned int chan = 0; chan < _channelData.size(); ++chan) - { - if (decodedChannels[chan]) - continue; - - ChannelData *cd = &_channelData[chan]; - int pixelSize = Imf::pixelTypeSize (cd->type); - - switch (cd->compression) - { - case LOSSY_DCT: - - // - // Setup a single-channel lossy DCT decoder pointing - // at the output buffer - // - - { - const unsigned short *linearLut = 0; - - if (!cd->pLinear) - linearLut = dwaCompressorToLinear; - - LossyDctDecoder decoder - (rowPtrs[chan], - packedAcBufferEnd, - packedDcBufferEnd, - linearLut, - cd->width, - cd->height, - cd->type); - - decoder.execute(); - - packedAcBufferEnd += - decoder.numAcValuesEncoded() * sizeof (unsigned short); - - packedDcBufferEnd += - decoder.numDcValuesEncoded() * sizeof (unsigned short); - } - - break; - - case RLE: - - // - // For the RLE case, the data has been un-RLE'd into - // planarUncRleEnd[], but is still split out by bytes. - // We need to rearrange the bytes back into the correct - // order in the output buffer; - // - - { - int row = 0; - - for (int y = minY; y <= maxY; ++y) - { - if (Imath::modp (y, cd->ySampling) != 0) - continue; - - char *dst = rowPtrs[chan][row]; - - if (pixelSize == 2) - { - interleaveByte2 (dst, - cd->planarUncRleEnd[0], - cd->planarUncRleEnd[1], - cd->width); - - cd->planarUncRleEnd[0] += cd->width; - cd->planarUncRleEnd[1] += cd->width; - } - else - { - for (int x = 0; x < cd->width; ++x) - { - for (int byte = 0; byte < pixelSize; ++byte) - { - *dst++ = *cd->planarUncRleEnd[byte]++; - } - } - } - - row++; - } - } - - break; - - case UNKNOWN: - - // - // In the UNKNOWN case, data is already in planarUncBufferEnd - // and just needs to copied over to the output buffer - // - - { - int row = 0; - int dstScanlineSize = cd->width * Imf::pixelTypeSize (cd->type); - - for (int y = minY; y <= maxY; ++y) - { - if (Imath::modp (y, cd->ySampling) != 0) - continue; - - memcpy (rowPtrs[chan][row], - cd->planarUncBufferEnd, - dstScanlineSize); - - cd->planarUncBufferEnd += dstScanlineSize; - row++; - } - } - - break; - - default: - - throw Iex::NoImplExc ("Unhandled compression scheme case"); - break; - } - - decodedChannels[chan] = true; - } - - // - // Return a ptr to _outBuffer - // - - outPtr = _outBuffer; - return (int)(outBufferEnd - _outBuffer); -} - - -// static -void -DwaCompressor::initializeFuncs() -{ - convertFloatToHalf64 = convertFloatToHalf64_scalar; - fromHalfZigZag = fromHalfZigZag_scalar; - - CpuId cpuId; - - // - // Setup HALF <-> FLOAT conversion implementations - // - - if (cpuId.avx && cpuId.f16c) - { - convertFloatToHalf64 = convertFloatToHalf64_f16c; - fromHalfZigZag = fromHalfZigZag_f16c; - } - - // - // Setup inverse DCT implementations - // - - dctInverse8x8_0 = dctInverse8x8_scalar<0>; - dctInverse8x8_1 = dctInverse8x8_scalar<1>; - dctInverse8x8_2 = dctInverse8x8_scalar<2>; - dctInverse8x8_3 = dctInverse8x8_scalar<3>; - dctInverse8x8_4 = dctInverse8x8_scalar<4>; - dctInverse8x8_5 = dctInverse8x8_scalar<5>; - dctInverse8x8_6 = dctInverse8x8_scalar<6>; - dctInverse8x8_7 = dctInverse8x8_scalar<7>; - - if (cpuId.avx) - { - dctInverse8x8_0 = dctInverse8x8_avx<0>; - dctInverse8x8_1 = dctInverse8x8_avx<1>; - dctInverse8x8_2 = dctInverse8x8_avx<2>; - dctInverse8x8_3 = dctInverse8x8_avx<3>; - dctInverse8x8_4 = dctInverse8x8_avx<4>; - dctInverse8x8_5 = dctInverse8x8_avx<5>; - dctInverse8x8_6 = dctInverse8x8_avx<6>; - dctInverse8x8_7 = dctInverse8x8_avx<7>; - } - else if (cpuId.sse2) - { - dctInverse8x8_0 = dctInverse8x8_sse2<0>; - dctInverse8x8_1 = dctInverse8x8_sse2<1>; - dctInverse8x8_2 = dctInverse8x8_sse2<2>; - dctInverse8x8_3 = dctInverse8x8_sse2<3>; - dctInverse8x8_4 = dctInverse8x8_sse2<4>; - dctInverse8x8_5 = dctInverse8x8_sse2<5>; - dctInverse8x8_6 = dctInverse8x8_sse2<6>; - dctInverse8x8_7 = dctInverse8x8_sse2<7>; - } -} - - -// -// Handle channel classification and buffer allocation once we know -// how to classify channels -// - -void -DwaCompressor::initializeBuffers (size_t &outBufferSize) -{ - classifyChannels (_channels, _channelData, _cscSets); - - // - // _outBuffer needs to be big enough to hold all our - // compressed data - which could vary depending on what sort - // of channels we have. - // - - int maxOutBufferSize = 0; - int numLossyDctChans = 0; - int unknownBufferSize = 0; - int rleBufferSize = 0; - - int maxLossyDctAcSize = (int)ceil ((float)numScanLines() / 8.0f) * - (int)ceil ((float)(_max[0] - _min[0] + 1) / 8.0f) * - 63 * sizeof (unsigned short); - - int maxLossyDctDcSize = (int)ceil ((float)numScanLines() / 8.0f) * - (int)ceil ((float)(_max[0] - _min[0] + 1) / 8.0f) * - sizeof (unsigned short); - - for (unsigned int chan = 0; chan < _channelData.size(); ++chan) - { - switch (_channelData[chan].compression) - { - case LOSSY_DCT: - - // - // This is the size of the number of packed - // components, plus the requirements for - // maximum Huffman encoding size. - // - - maxOutBufferSize += 2 * maxLossyDctAcSize + 65536; - numLossyDctChans++; - break; - - case RLE: - { - // - // RLE, if gone horribly wrong, could double the size - // of the source data. - // - - int rleAmount = 2 * numScanLines() * (_max[0] - _min[0] + 1) * - Imf::pixelTypeSize (_channelData[chan].type); - - rleBufferSize += rleAmount; - } - break; - - - case UNKNOWN: - - unknownBufferSize += numScanLines() * (_max[0] - _min[0] + 1) * - Imf::pixelTypeSize (_channelData[chan].type); - break; - - default: - - throw Iex::NoImplExc ("Unhandled compression scheme case"); - break; - } - } - - // - // Also, since the results of the RLE are packed into - // the output buffer, we need the extra room there. But - // we're going to zlib compress() the data we pack, - // which could take slightly more space - // - - maxOutBufferSize += (int)(ceil (1.01f * (float)rleBufferSize) + 100); - - // - // And the same goes for the UNKNOWN data - // - - maxOutBufferSize += (int)(ceil (1.01f * (float)unknownBufferSize) + 100); - - // - // Allocate a zip/deflate compressor big enought to hold the DC data - // and include it's compressed results in the size requirements - // for our output buffer - // - - if (_zip == 0) - _zip = new Zip (maxLossyDctDcSize * numLossyDctChans); - else if (_zip->maxRawSize() < maxLossyDctDcSize * numLossyDctChans) - { - delete _zip; - _zip = new Zip (maxLossyDctDcSize * numLossyDctChans); - } - - - maxOutBufferSize += _zip->maxCompressedSize(); - - // - // We also need to reserve space at the head of the buffer to - // write out the size of our various packed and compressed data. - // - - maxOutBufferSize += NUM_SIZES_SINGLE * sizeof (Int64); - - - // - // Later, we're going to hijack outBuffer for the result of - // both encoding and decoding. So it needs to be big enough - // to hold either a buffers' worth of uncompressed or - // compressed data - // - // For encoding, we'll need _outBuffer to hold maxOutBufferSize bytes, - // but for decoding, we only need it to be maxScanLineSize*numScanLines. - // Cache the max size for now, and alloc the buffer when we either - // encode or decode. - // - - outBufferSize = maxOutBufferSize; - - - // - // _packedAcBuffer holds the quantized DCT coefficients prior - // to Huffman encoding - // - - if (maxLossyDctAcSize * numLossyDctChans > _packedAcBufferSize) - { - _packedAcBufferSize = maxLossyDctAcSize * numLossyDctChans; - if (_packedAcBuffer != 0) - delete[] _packedAcBuffer; - _packedAcBuffer = new char[_packedAcBufferSize]; - } - - // - // _packedDcBuffer holds one quantized DCT coef per 8x8 block - // - - if (maxLossyDctDcSize * numLossyDctChans > _packedDcBufferSize) - { - _packedDcBufferSize = maxLossyDctDcSize * numLossyDctChans; - if (_packedDcBuffer != 0) - delete[] _packedDcBuffer; - _packedDcBuffer = new char[_packedDcBufferSize]; - } - - if (rleBufferSize > _rleBufferSize) - { - _rleBufferSize = rleBufferSize; - if (_rleBuffer != 0) - delete[] _rleBuffer; - _rleBuffer = new char[rleBufferSize]; - } - - // - // The planar uncompressed buffer will hold float data for LOSSY_DCT - // compressed values, and whatever the native type is for other - // channels. We're going to use this to hold data in a planar - // format, as opposed to the native interleaved format we take - // into compress() and give back from uncompress(). - // - // This also makes it easier to compress the UNKNOWN and RLE data - // all in one swoop (for each compression scheme). - // - - int planarUncBufferSize[NUM_COMPRESSOR_SCHEMES]; - for (int i=0; i 0) - { - planarUncBufferSize[UNKNOWN] = - (int) ceil (1.01f * (float)planarUncBufferSize[UNKNOWN]) + 100; - } - - for (int i = 0; i < NUM_COMPRESSOR_SCHEMES; ++i) - { - if (planarUncBufferSize[i] > _planarUncBufferSize[i]) - { - _planarUncBufferSize[i] = planarUncBufferSize[i]; - if (_planarUncBuffer[i] != 0) - delete[] _planarUncBuffer[i]; - _planarUncBuffer[i] = new char[planarUncBufferSize[i]]; - } - } -} - - -// -// Setup channel classification rules to use when writing files -// - -void -DwaCompressor::initializeDefaultChannelRules () -{ - _channelRules.clear(); - - _channelRules.push_back (Classifier ("R", LOSSY_DCT, HALF, 0, false)); - _channelRules.push_back (Classifier ("R", LOSSY_DCT, FLOAT, 0, false)); - _channelRules.push_back (Classifier ("G", LOSSY_DCT, HALF, 1, false)); - _channelRules.push_back (Classifier ("G", LOSSY_DCT, FLOAT, 1, false)); - _channelRules.push_back (Classifier ("B", LOSSY_DCT, HALF, 2, false)); - _channelRules.push_back (Classifier ("B", LOSSY_DCT, FLOAT, 2, false)); - - _channelRules.push_back (Classifier ("Y", LOSSY_DCT, HALF, -1, false)); - _channelRules.push_back (Classifier ("Y", LOSSY_DCT, FLOAT, -1, false)); - _channelRules.push_back (Classifier ("BY", LOSSY_DCT, HALF, -1, false)); - _channelRules.push_back (Classifier ("BY", LOSSY_DCT, FLOAT, -1, false)); - _channelRules.push_back (Classifier ("RY", LOSSY_DCT, HALF, -1, false)); - _channelRules.push_back (Classifier ("RY", LOSSY_DCT, FLOAT, -1, false)); - - _channelRules.push_back (Classifier ("A", RLE, UINT, -1, false)); - _channelRules.push_back (Classifier ("A", RLE, HALF, -1, false)); - _channelRules.push_back (Classifier ("A", RLE, FLOAT, -1, false)); -} - - -// -// Setup channel classification rules when reading files with VERSION < 2 -// - -void -DwaCompressor::initializeLegacyChannelRules () -{ - _channelRules.clear(); - - _channelRules.push_back (Classifier ("r", LOSSY_DCT, HALF, 0, true)); - _channelRules.push_back (Classifier ("r", LOSSY_DCT, FLOAT, 0, true)); - _channelRules.push_back (Classifier ("red", LOSSY_DCT, HALF, 0, true)); - _channelRules.push_back (Classifier ("red", LOSSY_DCT, FLOAT, 0, true)); - _channelRules.push_back (Classifier ("g", LOSSY_DCT, HALF, 1, true)); - _channelRules.push_back (Classifier ("g", LOSSY_DCT, FLOAT, 1, true)); - _channelRules.push_back (Classifier ("grn", LOSSY_DCT, HALF, 1, true)); - _channelRules.push_back (Classifier ("grn", LOSSY_DCT, FLOAT, 1, true)); - _channelRules.push_back (Classifier ("green", LOSSY_DCT, HALF, 1, true)); - _channelRules.push_back (Classifier ("green", LOSSY_DCT, FLOAT, 1, true)); - _channelRules.push_back (Classifier ("b", LOSSY_DCT, HALF, 2, true)); - _channelRules.push_back (Classifier ("b", LOSSY_DCT, FLOAT, 2, true)); - _channelRules.push_back (Classifier ("blu", LOSSY_DCT, HALF, 2, true)); - _channelRules.push_back (Classifier ("blu", LOSSY_DCT, FLOAT, 2, true)); - _channelRules.push_back (Classifier ("blue", LOSSY_DCT, HALF, 2, true)); - _channelRules.push_back (Classifier ("blue", LOSSY_DCT, FLOAT, 2, true)); - - _channelRules.push_back (Classifier ("y", LOSSY_DCT, HALF, -1, true)); - _channelRules.push_back (Classifier ("y", LOSSY_DCT, FLOAT, -1, true)); - _channelRules.push_back (Classifier ("by", LOSSY_DCT, HALF, -1, true)); - _channelRules.push_back (Classifier ("by", LOSSY_DCT, FLOAT, -1, true)); - _channelRules.push_back (Classifier ("ry", LOSSY_DCT, HALF, -1, true)); - _channelRules.push_back (Classifier ("ry", LOSSY_DCT, FLOAT, -1, true)); - _channelRules.push_back (Classifier ("a", RLE, UINT, -1, true)); - _channelRules.push_back (Classifier ("a", RLE, HALF, -1, true)); - _channelRules.push_back (Classifier ("a", RLE, FLOAT, -1, true)); -} - - -// -// Given a set of rules and ChannelData, figure out which rules apply -// - -void -DwaCompressor::relevantChannelRules (std::vector &rules) const -{ - rules.clear(); - - std::vector suffixes; - - for (size_t cd = 0; cd < _channelData.size(); ++cd) - { - std::string suffix = _channelData[cd].name; - size_t lastDot = suffix.find_last_of ('.'); - - if (lastDot != std::string::npos) - suffix = suffix.substr (lastDot+1, std::string::npos); - - suffixes.push_back(suffix); - } - - - for (size_t i = 0; i < _channelRules.size(); ++i) - { - for (size_t cd = 0; cd < _channelData.size(); ++cd) - { - if (_channelRules[i].match (suffixes[cd], _channelData[cd].type )) - { - rules.push_back (_channelRules[i]); - break; - } - } - } -} - - -// -// Take our initial list of channels, and cache the contents. -// -// Determine approprate compression schemes for each channel, -// and figure out which sets should potentially be CSC'ed -// prior to lossy compression. -// - -void -DwaCompressor::classifyChannels - (ChannelList channels, - std::vector &chanData, - std::vector &cscData) -{ - // - // prefixMap used to map channel name prefixes to - // potential CSC-able sets of channels. - // - - std::map prefixMap; - std::vector tmpCscSet; - - unsigned int numChan = 0; - - for (ChannelList::Iterator c = channels.begin(); c != channels.end(); ++c) - numChan++; - - if (numChan) - chanData.resize (numChan); - - // - // Cache the relevant data from the channel structs. - // - - unsigned int offset = 0; - - for (ChannelList::Iterator c = channels.begin(); c != channels.end(); ++c) - { - chanData[offset].name = std::string (c.name()); - chanData[offset].compression = UNKNOWN; - chanData[offset].xSampling = c.channel().xSampling; - chanData[offset].ySampling = c.channel().ySampling; - chanData[offset].type = c.channel().type; - chanData[offset].pLinear = c.channel().pLinear; - - offset++; - } - - // - // Try and figure out which channels should be - // compressed by which means. - // - - for (offset = 0; offset::iterator - theSet = prefixMap.find (prefix); - - if (theSet == prefixMap.end()) - { - DwaCompressor::CscChannelSet tmpSet; - - tmpSet.idx[0] = - tmpSet.idx[1] = - tmpSet.idx[2] = -1; - - prefixMap[prefix] = tmpSet; - } - - // - // Check the suffix against the list of classifications - // we defined previously. If the _cscIdx is not negative, - // it indicates that we should be part of a CSC group. - // - - for (std::vector::iterator i = _channelRules.begin(); - i != _channelRules.end(); - ++i) - { - if ( i->match(suffix, chanData[offset].type) ) - { - chanData[offset].compression = i->_scheme; - - if ( i->_cscIdx >= 0) - prefixMap[prefix].idx[i->_cscIdx] = offset; - } - } - } - - // - // Finally, try and find RGB sets of channels which - // can be CSC'ed to a Y'CbCr space prior to loss, for - // better compression. - // - // Walk over our set of candidates, and see who has - // all three channels defined (and has common sampling - // patterns, etc). - // - - for (std::map::iterator - theItem = prefixMap.begin(); theItem != prefixMap.end(); - ++theItem) - { - int red = (*theItem).second.idx[0]; - int grn = (*theItem).second.idx[1]; - int blu = (*theItem).second.idx[2]; - - if ((red < 0) || (grn < 0) || (blu < 0)) - continue; - - if ((chanData[red].xSampling != chanData[grn].xSampling) || - (chanData[red].xSampling != chanData[blu].xSampling) || - (chanData[grn].xSampling != chanData[blu].xSampling) || - (chanData[red].ySampling != chanData[grn].ySampling) || - (chanData[red].ySampling != chanData[blu].ySampling) || - (chanData[grn].ySampling != chanData[blu].ySampling)) - { - continue; - } - - tmpCscSet.push_back ((*theItem).second); - } - - size_t numCsc = tmpCscSet.size(); - - if (numCsc) - cscData.resize(numCsc); - - for (offset = 0; offset < numCsc; ++offset) - cscData[offset] = tmpCscSet[offset]; -} - - - -// -// Setup some buffer pointers, determine channel sizes, things -// like that. -// - -void -DwaCompressor::setupChannelData (int minX, int minY, int maxX, int maxY) -{ - char *planarUncBuffer[NUM_COMPRESSOR_SCHEMES]; - - for (int i=0; iwidth = Imf::numSamples (cd->xSampling, minX, maxX); - cd->height = Imf::numSamples (cd->ySampling, minY, maxY); - - cd->planarUncSize = - cd->width * cd->height * Imf::pixelTypeSize (cd->type); - - cd->planarUncBuffer = planarUncBuffer[cd->compression]; - cd->planarUncBufferEnd = cd->planarUncBuffer; - - cd->planarUncRle[0] = cd->planarUncBuffer; - cd->planarUncRleEnd[0] = cd->planarUncRle[0]; - - for (int byte = 1; byte < Imf::pixelTypeSize(cd->type); ++byte) - { - cd->planarUncRle[byte] = - cd->planarUncRle[byte-1] + cd->width * cd->height; - - cd->planarUncRleEnd[byte] = - cd->planarUncRle[byte]; - } - - cd->planarUncType = cd->type; - - if (cd->compression == LOSSY_DCT) - { - cd->planarUncType = FLOAT; - } - else - { - planarUncBuffer[cd->compression] += - cd->width * cd->height * Imf::pixelTypeSize (cd->planarUncType); - } - } -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressor.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressor.h deleted file mode 100644 index 8e390b0..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressor.h +++ /dev/null @@ -1,210 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2009-2014 DreamWorks Animation LLC. -// -// 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 DreamWorks Animation nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_DWA_COMRESSOR_H -#define INCLUDED_IMF_DWA_COMRESSOR_H - -//------------------------------------------------------------------------------ -// -// class DwaCompressor -- Store lossy RGB data by quantizing DCT components. -// -//------------------------------------------------------------------------------ - -#include -#include - -#include "ImfInt64.h" -#include "ImfZip.h" -#include "ImfChannelList.h" -#include "ImfCompressor.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -class DwaCompressor: public Compressor -{ - public: - - enum AcCompression - { - STATIC_HUFFMAN, - DEFLATE, - }; - - - DwaCompressor (const Header &hdr, - int maxScanLineSize, - int numScanLines, // ideally is a multiple of 8 - AcCompression acCompression); - - virtual ~DwaCompressor (); - - virtual int numScanLines () const; - - virtual Imf::Compressor::Format format () const; - - virtual int compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - - virtual int compressTile (const char *inPtr, - int inSize, - Imath::Box2i range, - const char *&outPtr); - - virtual int uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - - virtual int uncompressTile (const char *inPtr, - int inSize, - Imath::Box2i range, - const char *&outPtr); - - static void initializeFuncs (); - - private: - - struct ChannelData; - struct CscChannelSet; - struct Classifier; - - class LossyDctDecoderBase; - class LossyDctDecoder; - class LossyDctDecoderCsc; - - class LossyDctEncoderBase; - class LossyDctEncoder; - class LossyDctEncoderCsc; - - enum CompressorScheme - { - UNKNOWN = 0, - LOSSY_DCT, - RLE, - - NUM_COMPRESSOR_SCHEMES - }; - - // - // Per-chunk compressed data sizes, one value per chunk - // - - enum DataSizesSingle - { - VERSION = 0, // Version number: - // 0: classic - // 1: adds "end of block" to the AC RLE - - UNKNOWN_UNCOMPRESSED_SIZE, // Size of leftover data, uncompressed. - UNKNOWN_COMPRESSED_SIZE, // Size of leftover data, zlib compressed. - - AC_COMPRESSED_SIZE, // AC RLE + Huffman size - DC_COMPRESSED_SIZE, // DC + Deflate size - RLE_COMPRESSED_SIZE, // RLE + Deflate data size - RLE_UNCOMPRESSED_SIZE, // RLE'd data size - RLE_RAW_SIZE, // Un-RLE'd data size - - AC_UNCOMPRESSED_COUNT, // AC RLE number of elements - DC_UNCOMPRESSED_COUNT, // DC number of elements - - AC_COMPRESSION, // AC compression strategy - NUM_SIZES_SINGLE - }; - - AcCompression _acCompression; - - int _maxScanLineSize; - int _numScanLines; - int _min[2], _max[2]; - - ChannelList _channels; - std::vector _channelData; - std::vector _cscSets; - std::vector _channelRules; - - char *_packedAcBuffer; - size_t _packedAcBufferSize; - char *_packedDcBuffer; - size_t _packedDcBufferSize; - char *_rleBuffer; - size_t _rleBufferSize; - char *_outBuffer; - size_t _outBufferSize; - char *_planarUncBuffer[NUM_COMPRESSOR_SCHEMES]; - size_t _planarUncBufferSize[NUM_COMPRESSOR_SCHEMES]; - - Zip *_zip; - float _dwaCompressionLevel; - - int compress (const char *inPtr, - int inSize, - Imath::Box2i range, - const char *&outPtr); - - int uncompress (const char *inPtr, - int inSize, - Imath::Box2i range, - const char *&outPtr); - - void initializeBuffers (size_t&); - void initializeDefaultChannelRules (); - void initializeLegacyChannelRules (); - - void relevantChannelRules( std::vector &) const; - - // - // Populate our cached version of the channel data with - // data from the real channel list. We want to - // copy over attributes, determine compression schemes - // releveant for the channel type, and find sets of - // channels to be compressed from Y'CbCr data instead - // of R'G'B'. - // - - void classifyChannels (ChannelList channels, - std::vector &chanData, - std::vector &cscData); - - // - // Compute various buffer pointers for each channel - // - - void setupChannelData (int minX, int minY, int maxX, int maxY); -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressorSimd.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressorSimd.h deleted file mode 100644 index 93246f6..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressorSimd.h +++ /dev/null @@ -1,2145 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2009-2014 DreamWorks Animation LLC. -// -// 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 DreamWorks Animation nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMF_DWACOMPRESSORSIMD_H_HAS_BEEN_INCLUDED -#define IMF_DWACOMPRESSORSIMD_H_HAS_BEEN_INCLUDED - -// -// Various SSE accelerated functions, used by Imf::DwaCompressor. -// These have been separated into a separate .h file, as the fast -// paths are done with template specialization. -// -// Unless otherwise noted, all pointers are assumed to be 32-byte -// aligned. Unaligned pointers may risk seg-faulting. -// - -#include "ImfNamespace.h" -#include "ImfSimd.h" -#include "ImfSystemSpecific.h" -#include "OpenEXRConfig.h" - -#include -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -#define _SSE_ALIGNMENT 32 -#define _SSE_ALIGNMENT_MASK 0x0F -#define _AVX_ALIGNMENT_MASK 0x1F - -// -// Test if we should enable GCC inline asm paths for AVX -// - -#ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX - - #define IMF_HAVE_GCC_INLINEASM - - #ifdef __LP64__ - #define IMF_HAVE_GCC_INLINEASM_64 - #endif /* __LP64__ */ - -#endif /* OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX */ - -// -// A simple 64-element array, aligned properly for SIMD access. -// - -template -class SimdAlignedBuffer64 -{ - public: - - SimdAlignedBuffer64(): _buffer (0), _handle (0) - { - alloc(); - } - - SimdAlignedBuffer64(const SimdAlignedBuffer64 &rhs): _handle(0) - { - alloc(); - memcpy (_buffer, rhs._buffer, 64 * sizeof (T)); - } - - ~SimdAlignedBuffer64 () - { - EXRFreeAligned (_handle); - _handle = 0; - _buffer = 0; - } - - void alloc() - { - // - // Try EXRAllocAligned first - but it might fallback to - // unaligned allocs. If so, overalloc. - // - - _handle = (char *) EXRAllocAligned - (64 * sizeof(T), _SSE_ALIGNMENT); - - if (((size_t)_handle & (_SSE_ALIGNMENT - 1)) == 0) - { - _buffer = (T *)_handle; - return; - } - - EXRFreeAligned(_handle); - _handle = (char *) EXRAllocAligned - (64 * sizeof(T) + _SSE_ALIGNMENT, _SSE_ALIGNMENT); - - char *aligned = _handle; - - while ((size_t)aligned & (_SSE_ALIGNMENT - 1)) - aligned++; - - _buffer = (T *)aligned; - } - - T *_buffer; - - private: - - char *_handle; -}; - -typedef SimdAlignedBuffer64 SimdAlignedBuffer64f; -typedef SimdAlignedBuffer64 SimdAlignedBuffer64us; - -namespace { - -// -// Color space conversion, Inverse 709 CSC, Y'CbCr -> R'G'B' -// - -void -csc709Inverse (float &comp0, float &comp1, float &comp2) -{ - float src[3]; - - src[0] = comp0; - src[1] = comp1; - src[2] = comp2; - - comp0 = src[0] + 1.5747f * src[2]; - comp1 = src[0] - 0.1873f * src[1] - 0.4682f * src[2]; - comp2 = src[0] + 1.8556f * src[1]; -} - -#ifndef IMF_HAVE_SSE2 - - -// -// Scalar color space conversion, based on 709 primiary chromaticies. -// No scaling or offsets, just the matrix -// - -void -csc709Inverse64 (float *comp0, float *comp1, float *comp2) -{ - for (int i = 0; i < 64; ++i) - csc709Inverse (comp0[i], comp1[i], comp2[i]); -} - -#else /* IMF_HAVE_SSE2 */ - -// -// SSE2 color space conversion -// - -void -csc709Inverse64 (float *comp0, float *comp1, float *comp2) -{ - __m128 c0 = { 1.5747f, 1.5747f, 1.5747f, 1.5747f}; - __m128 c1 = { 1.8556f, 1.8556f, 1.8556f, 1.8556f}; - __m128 c2 = {-0.1873f, -0.1873f, -0.1873f, -0.1873f}; - __m128 c3 = {-0.4682f, -0.4682f, -0.4682f, -0.4682f}; - - __m128 *r = (__m128 *)comp0; - __m128 *g = (__m128 *)comp1; - __m128 *b = (__m128 *)comp2; - __m128 src[3]; - - #define CSC_INVERSE_709_SSE2_LOOP(i) \ - src[0] = r[i]; \ - src[1] = g[i]; \ - src[2] = b[i]; \ - \ - r[i] = _mm_add_ps (r[i], _mm_mul_ps (src[2], c0)); \ - \ - g[i] = _mm_mul_ps (g[i], c2); \ - src[2] = _mm_mul_ps (src[2], c3); \ - g[i] = _mm_add_ps (g[i], src[0]); \ - g[i] = _mm_add_ps (g[i], src[2]); \ - \ - b[i] = _mm_mul_ps (c1, src[1]); \ - b[i] = _mm_add_ps (b[i], src[0]); - - CSC_INVERSE_709_SSE2_LOOP (0) - CSC_INVERSE_709_SSE2_LOOP (1) - CSC_INVERSE_709_SSE2_LOOP (2) - CSC_INVERSE_709_SSE2_LOOP (3) - - CSC_INVERSE_709_SSE2_LOOP (4) - CSC_INVERSE_709_SSE2_LOOP (5) - CSC_INVERSE_709_SSE2_LOOP (6) - CSC_INVERSE_709_SSE2_LOOP (7) - - CSC_INVERSE_709_SSE2_LOOP (8) - CSC_INVERSE_709_SSE2_LOOP (9) - CSC_INVERSE_709_SSE2_LOOP (10) - CSC_INVERSE_709_SSE2_LOOP (11) - - CSC_INVERSE_709_SSE2_LOOP (12) - CSC_INVERSE_709_SSE2_LOOP (13) - CSC_INVERSE_709_SSE2_LOOP (14) - CSC_INVERSE_709_SSE2_LOOP (15) -} - -#endif /* IMF_HAVE_SSE2 */ - - -// -// Color space conversion, Forward 709 CSC, R'G'B' -> Y'CbCr -// -// Simple FPU color space conversion. Based on the 709 -// primary chromaticies, with no scaling or offsets. -// - -void -csc709Forward64 (float *comp0, float *comp1, float *comp2) -{ - float src[3]; - - for (int i = 0; i<64; ++i) - { - src[0] = comp0[i]; - src[1] = comp1[i]; - src[2] = comp2[i]; - - comp0[i] = 0.2126f * src[0] + 0.7152f * src[1] + 0.0722f * src[2]; - comp1[i] = -0.1146f * src[0] - 0.3854f * src[1] + 0.5000f * src[2]; - comp2[i] = 0.5000f * src[0] - 0.4542f * src[1] - 0.0458f * src[2]; - } -} - - -// -// Byte interleaving of 2 byte arrays: -// src0 = AAAA -// src1 = BBBB -// dst = ABABABAB -// -// numBytes is the size of each of the source buffers -// - -#ifndef IMF_HAVE_SSE2 - -// -// Scalar default implementation -// - -void -interleaveByte2 (char *dst, char *src0, char *src1, int numBytes) -{ - for (int x = 0; x < numBytes; ++x) - { - dst[2 * x] = src0[x]; - dst[2 * x + 1] = src1[x]; - } -} - -#else /* IMF_HAVE_SSE2 */ - -// -// SSE2 byte interleaving -// - -void -interleaveByte2 (char *dst, char *src0, char *src1, int numBytes) -{ - int dstAlignment = (size_t)dst % 16; - int src0Alignment = (size_t)src0 % 16; - int src1Alignment = (size_t)src1 % 16; - - __m128i *dst_epi8 = (__m128i*)dst; - __m128i *src0_epi8 = (__m128i*)src0; - __m128i *src1_epi8 = (__m128i*)src1; - int sseWidth = numBytes / 16; - - if ((!dstAlignment) && (!src0Alignment) && (!src1Alignment)) - { - __m128i tmp0, tmp1; - - // - // Aligned loads and stores - // - - for (int x = 0; x < sseWidth; ++x) - { - tmp0 = src0_epi8[x]; - tmp1 = src1_epi8[x]; - - _mm_stream_si128 (&dst_epi8[2 * x], - _mm_unpacklo_epi8 (tmp0, tmp1)); - - _mm_stream_si128 (&dst_epi8[2 * x + 1], - _mm_unpackhi_epi8 (tmp0, tmp1)); - } - - // - // Then do run the leftovers one at a time - // - - for (int x = 16 * sseWidth; x < numBytes; ++x) - { - dst[2 * x] = src0[x]; - dst[2 * x + 1] = src1[x]; - } - } - else if ((!dstAlignment) && (src0Alignment == 8) && (src1Alignment == 8)) - { - // - // Aligned stores, but catch up a few values so we can - // use aligned loads - // - - for (int x = 0; x < 8; ++x) - { - dst[2 * x] = src0[x]; - dst[2 * x + 1] = src1[x]; - } - - dst_epi8 = (__m128i*)&dst[16]; - src0_epi8 = (__m128i*)&src0[8]; - src1_epi8 = (__m128i*)&src1[8]; - sseWidth = (numBytes - 8) / 16; - - for (int x=0; x half float conversion -// -// To enable F16C based conversion, we can't rely on compile-time -// detection, hence the multiple defined versions. Pick one based -// on runtime cpuid detection. -// - -// -// Default boring conversion -// - -void -convertFloatToHalf64_scalar (unsigned short *dst, float *src) -{ - for (int i=0; i<64; ++i) - dst[i] = ((half)src[i]).bits(); -} - - -// -// F16C conversion - Assumes aligned src and dst -// - -void -convertFloatToHalf64_f16c (unsigned short *dst, float *src) -{ - // - // Ordinarly, I'd avoid using inline asm and prefer intrinsics. - // However, in order to get the intrinsics, we need to tell - // the compiler to generate VEX instructions. - // - // (On the GCC side, -mf16c goes ahead and activates -mavc, - // resulting in VEX code. Without -mf16c, no intrinsics..) - // - // Now, it's quite likely that we'll find ourselves in situations - // where we want to build *without* VEX, in order to maintain - // maximum compatability. But to get there with intrinsics, - // we'd need to break out code into a separate file. Bleh. - // I'll take the asm. - // - - #if defined IMF_HAVE_GCC_INLINEASM - __asm__ - ("vmovaps (%0), %%ymm0 \n" - "vmovaps 0x20(%0), %%ymm1 \n" - "vmovaps 0x40(%0), %%ymm2 \n" - "vmovaps 0x60(%0), %%ymm3 \n" - "vcvtps2ph $0, %%ymm0, %%xmm0 \n" - "vcvtps2ph $0, %%ymm1, %%xmm1 \n" - "vcvtps2ph $0, %%ymm2, %%xmm2 \n" - "vcvtps2ph $0, %%ymm3, %%xmm3 \n" - "vmovdqa %%xmm0, 0x00(%1) \n" - "vmovdqa %%xmm1, 0x10(%1) \n" - "vmovdqa %%xmm2, 0x20(%1) \n" - "vmovdqa %%xmm3, 0x30(%1) \n" - "vmovaps 0x80(%0), %%ymm0 \n" - "vmovaps 0xa0(%0), %%ymm1 \n" - "vmovaps 0xc0(%0), %%ymm2 \n" - "vmovaps 0xe0(%0), %%ymm3 \n" - "vcvtps2ph $0, %%ymm0, %%xmm0 \n" - "vcvtps2ph $0, %%ymm1, %%xmm1 \n" - "vcvtps2ph $0, %%ymm2, %%xmm2 \n" - "vcvtps2ph $0, %%ymm3, %%xmm3 \n" - "vmovdqa %%xmm0, 0x40(%1) \n" - "vmovdqa %%xmm1, 0x50(%1) \n" - "vmovdqa %%xmm2, 0x60(%1) \n" - "vmovdqa %%xmm3, 0x70(%1) \n" - #ifndef __AVX__ - "vzeroupper \n" - #endif /* __AVX__ */ - : /* Output */ - : /* Input */ "r"(src), "r"(dst) - #ifndef __AVX__ - : /* Clobber */ "%xmm0", "%xmm1", "%xmm2", "%xmm3", "memory" - #else - : /* Clobber */ "%ymm0", "%ymm1", "%ymm2", "%ymm3", "memory" - #endif /* __AVX__ */ - ); - #else - convertFloatToHalf64_scalar (dst, src); - #endif /* IMF_HAVE_GCC_INLINEASM */ -} - - -// -// Convert an 8x8 block of HALF from zig-zag order to -// FLOAT in normal order. The order we want is: -// -// src dst -// 0 1 2 3 4 5 6 7 0 1 5 6 14 15 27 28 -// 8 9 10 11 12 13 14 15 2 4 7 13 16 26 29 42 -// 16 17 18 19 20 21 22 23 3 8 12 17 25 30 41 43 -// 24 25 26 27 28 29 30 31 9 11 18 24 31 40 44 53 -// 32 33 34 35 36 37 38 39 10 19 23 32 39 45 52 54 -// 40 41 42 43 44 45 46 47 20 22 33 38 46 51 55 60 -// 48 49 50 51 52 53 54 55 21 34 37 47 50 56 59 61 -// 56 57 58 59 60 61 62 63 35 36 48 49 57 58 62 63 -// - -void -fromHalfZigZag_scalar (unsigned short *src, float *dst) -{ - half *srcHalf = (half *)src; - - dst[0] = (float)srcHalf[0]; - dst[1] = (float)srcHalf[1]; - dst[2] = (float)srcHalf[5]; - dst[3] = (float)srcHalf[6]; - dst[4] = (float)srcHalf[14]; - dst[5] = (float)srcHalf[15]; - dst[6] = (float)srcHalf[27]; - dst[7] = (float)srcHalf[28]; - dst[8] = (float)srcHalf[2]; - dst[9] = (float)srcHalf[4]; - - dst[10] = (float)srcHalf[7]; - dst[11] = (float)srcHalf[13]; - dst[12] = (float)srcHalf[16]; - dst[13] = (float)srcHalf[26]; - dst[14] = (float)srcHalf[29]; - dst[15] = (float)srcHalf[42]; - dst[16] = (float)srcHalf[3]; - dst[17] = (float)srcHalf[8]; - dst[18] = (float)srcHalf[12]; - dst[19] = (float)srcHalf[17]; - - dst[20] = (float)srcHalf[25]; - dst[21] = (float)srcHalf[30]; - dst[22] = (float)srcHalf[41]; - dst[23] = (float)srcHalf[43]; - dst[24] = (float)srcHalf[9]; - dst[25] = (float)srcHalf[11]; - dst[26] = (float)srcHalf[18]; - dst[27] = (float)srcHalf[24]; - dst[28] = (float)srcHalf[31]; - dst[29] = (float)srcHalf[40]; - - dst[30] = (float)srcHalf[44]; - dst[31] = (float)srcHalf[53]; - dst[32] = (float)srcHalf[10]; - dst[33] = (float)srcHalf[19]; - dst[34] = (float)srcHalf[23]; - dst[35] = (float)srcHalf[32]; - dst[36] = (float)srcHalf[39]; - dst[37] = (float)srcHalf[45]; - dst[38] = (float)srcHalf[52]; - dst[39] = (float)srcHalf[54]; - - dst[40] = (float)srcHalf[20]; - dst[41] = (float)srcHalf[22]; - dst[42] = (float)srcHalf[33]; - dst[43] = (float)srcHalf[38]; - dst[44] = (float)srcHalf[46]; - dst[45] = (float)srcHalf[51]; - dst[46] = (float)srcHalf[55]; - dst[47] = (float)srcHalf[60]; - dst[48] = (float)srcHalf[21]; - dst[49] = (float)srcHalf[34]; - - dst[50] = (float)srcHalf[37]; - dst[51] = (float)srcHalf[47]; - dst[52] = (float)srcHalf[50]; - dst[53] = (float)srcHalf[56]; - dst[54] = (float)srcHalf[59]; - dst[55] = (float)srcHalf[61]; - dst[56] = (float)srcHalf[35]; - dst[57] = (float)srcHalf[36]; - dst[58] = (float)srcHalf[48]; - dst[59] = (float)srcHalf[49]; - - dst[60] = (float)srcHalf[57]; - dst[61] = (float)srcHalf[58]; - dst[62] = (float)srcHalf[62]; - dst[63] = (float)srcHalf[63]; -} - - -// -// If we can form the correct ordering in xmm registers, -// we can use F16C to convert from HALF -> FLOAT. However, -// making the correct order isn't trivial. -// -// We want to re-order a source 8x8 matrix from: -// -// 0 1 2 3 4 5 6 7 0 1 5 6 14 15 27 28 -// 8 9 10 11 12 13 14 15 2 4 7 13 16 26 29 42 -// 16 17 18 19 20 21 22 23 3 8 12 17 25 30 41 43 -// 24 25 26 27 28 29 30 31 9 11 18 24 31 40 44 53 (A) -// 32 33 34 35 36 37 38 39 --> 10 19 23 32 39 45 52 54 -// 40 41 42 43 44 45 46 47 20 22 33 38 46 51 55 60 -// 48 49 50 51 52 53 54 55 21 34 37 47 50 56 59 61 -// 56 57 58 59 60 61 62 63 35 36 48 49 57 58 62 63 -// -// Which looks like a mess, right? -// -// Now, check out the NE/SW diagonals of (A). Along those lines, -// we have runs of contiguous values! If we rewrite (A) a bit, we get: -// -// 0 -// 1 2 -// 5 4 3 -// 6 7 8 9 -// 14 13 12 11 10 -// 15 16 17 18 19 20 -// 27 26 25 24 23 22 21 (B) -// 28 29 30 31 32 33 34 35 -// 42 41 40 39 38 37 36 -// 43 44 45 46 47 48 -// 53 52 51 50 49 -// 54 55 56 57 -// 60 59 58 -// 61 62 -// 63 -// -// In this ordering, the columns are the rows (A). If we can 'transpose' -// (B), we'll achieve our goal. But we want this to fit nicely into -// xmm registers and still be able to load large runs efficiently. -// Also, notice that the odd rows are in ascending order, while -// the even rows are in descending order. -// -// If we 'fold' the bottom half up into the top, we can preserve ordered -// runs accross rows, and still keep all the correct values in columns. -// After transposing, we'll need to rotate things back into place. -// This gives us: -// -// 0 | 42 41 40 39 38 37 36 -// 1 2 | 43 44 45 46 47 48 -// 5 4 3 | 53 52 51 50 49 -// 6 7 8 9 | 54 55 56 57 (C) -// 14 13 12 11 10 | 60 59 58 -// 15 16 17 18 19 20 | 61 62 -// 27 26 25 24 23 22 21 | 61 -// 28 29 30 31 32 33 34 35 -// -// But hang on. We still have the backwards descending rows to deal with. -// Lets reverse the even rows so that all values are in ascending order -// -// 36 37 38 39 40 41 42 | 0 -// 1 2 | 43 44 45 46 47 48 -// 49 50 51 52 53 | 3 4 5 -// 6 7 8 9 | 54 55 56 57 (D) -// 58 59 60 | 10 11 12 13 14 -// 15 16 17 18 19 20 | 61 62 -// 61 | 21 22 23 24 25 26 27 -// 28 29 30 31 32 33 34 35 -// -// If we can form (D), we will then: -// 1) Reverse the even rows -// 2) Transpose -// 3) Rotate the rows -// -// and we'll have (A). -// - -void -fromHalfZigZag_f16c (unsigned short *src, float *dst) -{ - #if defined IMF_HAVE_GCC_INLINEASM_64 - __asm__ - - /* x3 <- 0 - * x8 <- [ 0- 7] - * x6 <- [56-63] - * x9 <- [21-28] - * x7 <- [28-35] - * x3 <- [ 6- 9] (lower half) */ - - ("vpxor %%xmm3, %%xmm3, %%xmm3 \n" - "vmovdqa (%0), %%xmm8 \n" - "vmovdqa 112(%0), %%xmm6 \n" - "vmovdqu 42(%0), %%xmm9 \n" - "vmovdqu 56(%0), %%xmm7 \n" - "vmovq 12(%0), %%xmm3 \n" - - /* Setup rows 0-2 of A in xmm0-xmm2 - * x1 <- x8 >> 16 (1 value) - * x2 <- x8 << 32 (2 values) - * x0 <- alignr([35-42], x8, 2) - * x1 <- blend(x1, [41-48]) - * x2 <- blend(x2, [49-56]) */ - - "vpsrldq $2, %%xmm8, %%xmm1 \n" - "vpslldq $4, %%xmm8, %%xmm2 \n" - "vpalignr $2, 70(%0), %%xmm8, %%xmm0 \n" - "vpblendw $0xfc, 82(%0), %%xmm1, %%xmm1 \n" - "vpblendw $0x1f, 98(%0), %%xmm2, %%xmm2 \n" - - /* Setup rows 4-6 of A in xmm4-xmm6 - * x4 <- x6 >> 32 (2 values) - * x5 <- x6 << 16 (1 value) - * x6 <- alignr(x6,x9,14) - * x4 <- blend(x4, [ 7-14]) - * x5 <- blend(x5, [15-22]) */ - - "vpsrldq $4, %%xmm6, %%xmm4 \n" - "vpslldq $2, %%xmm6, %%xmm5 \n" - "vpalignr $14, %%xmm6, %%xmm9, %%xmm6 \n" - "vpblendw $0xf8, 14(%0), %%xmm4, %%xmm4 \n" - "vpblendw $0x3f, 30(%0), %%xmm5, %%xmm5 \n" - - /* Load the upper half of row 3 into xmm3 - * x3 <- [54-57] (upper half) */ - - "vpinsrq $1, 108(%0), %%xmm3, %%xmm3\n" - - /* Reverse the even rows. We're not using PSHUFB as - * that requires loading an extra constant all the time, - * and we're alreadly pretty memory bound. - */ - - "vpshuflw $0x1b, %%xmm0, %%xmm0 \n" - "vpshuflw $0x1b, %%xmm2, %%xmm2 \n" - "vpshuflw $0x1b, %%xmm4, %%xmm4 \n" - "vpshuflw $0x1b, %%xmm6, %%xmm6 \n" - - "vpshufhw $0x1b, %%xmm0, %%xmm0 \n" - "vpshufhw $0x1b, %%xmm2, %%xmm2 \n" - "vpshufhw $0x1b, %%xmm4, %%xmm4 \n" - "vpshufhw $0x1b, %%xmm6, %%xmm6 \n" - - "vpshufd $0x4e, %%xmm0, %%xmm0 \n" - "vpshufd $0x4e, %%xmm2, %%xmm2 \n" - "vpshufd $0x4e, %%xmm4, %%xmm4 \n" - "vpshufd $0x4e, %%xmm6, %%xmm6 \n" - - /* Transpose xmm0-xmm7 into xmm8-xmm15 */ - - "vpunpcklwd %%xmm1, %%xmm0, %%xmm8 \n" - "vpunpcklwd %%xmm3, %%xmm2, %%xmm9 \n" - "vpunpcklwd %%xmm5, %%xmm4, %%xmm10 \n" - "vpunpcklwd %%xmm7, %%xmm6, %%xmm11 \n" - "vpunpckhwd %%xmm1, %%xmm0, %%xmm12 \n" - "vpunpckhwd %%xmm3, %%xmm2, %%xmm13 \n" - "vpunpckhwd %%xmm5, %%xmm4, %%xmm14 \n" - "vpunpckhwd %%xmm7, %%xmm6, %%xmm15 \n" - - "vpunpckldq %%xmm9, %%xmm8, %%xmm0 \n" - "vpunpckldq %%xmm11, %%xmm10, %%xmm1 \n" - "vpunpckhdq %%xmm9, %%xmm8, %%xmm2 \n" - "vpunpckhdq %%xmm11, %%xmm10, %%xmm3 \n" - "vpunpckldq %%xmm13, %%xmm12, %%xmm4 \n" - "vpunpckldq %%xmm15, %%xmm14, %%xmm5 \n" - "vpunpckhdq %%xmm13, %%xmm12, %%xmm6 \n" - "vpunpckhdq %%xmm15, %%xmm14, %%xmm7 \n" - - "vpunpcklqdq %%xmm1, %%xmm0, %%xmm8 \n" - "vpunpckhqdq %%xmm1, %%xmm0, %%xmm9 \n" - "vpunpcklqdq %%xmm3, %%xmm2, %%xmm10 \n" - "vpunpckhqdq %%xmm3, %%xmm2, %%xmm11 \n" - "vpunpcklqdq %%xmm4, %%xmm5, %%xmm12 \n" - "vpunpckhqdq %%xmm5, %%xmm4, %%xmm13 \n" - "vpunpcklqdq %%xmm7, %%xmm6, %%xmm14 \n" - "vpunpckhqdq %%xmm7, %%xmm6, %%xmm15 \n" - - /* Rotate the rows to get the correct final order. - * Rotating xmm12 isn't needed, as we can handle - * the rotation in the PUNPCKLQDQ above. Rotating - * xmm8 isn't needed as it's already in the right order - */ - - "vpalignr $2, %%xmm9, %%xmm9, %%xmm9 \n" - "vpalignr $4, %%xmm10, %%xmm10, %%xmm10 \n" - "vpalignr $6, %%xmm11, %%xmm11, %%xmm11 \n" - "vpalignr $10, %%xmm13, %%xmm13, %%xmm13 \n" - "vpalignr $12, %%xmm14, %%xmm14, %%xmm14 \n" - "vpalignr $14, %%xmm15, %%xmm15, %%xmm15 \n" - - /* Convert from half -> float */ - - "vcvtph2ps %%xmm8, %%ymm8 \n" - "vcvtph2ps %%xmm9, %%ymm9 \n" - "vcvtph2ps %%xmm10, %%ymm10 \n" - "vcvtph2ps %%xmm11, %%ymm11 \n" - "vcvtph2ps %%xmm12, %%ymm12 \n" - "vcvtph2ps %%xmm13, %%ymm13 \n" - "vcvtph2ps %%xmm14, %%ymm14 \n" - "vcvtph2ps %%xmm15, %%ymm15 \n" - - /* Move float values to dst */ - - "vmovaps %%ymm8, (%1) \n" - "vmovaps %%ymm9, 32(%1) \n" - "vmovaps %%ymm10, 64(%1) \n" - "vmovaps %%ymm11, 96(%1) \n" - "vmovaps %%ymm12, 128(%1) \n" - "vmovaps %%ymm13, 160(%1) \n" - "vmovaps %%ymm14, 192(%1) \n" - "vmovaps %%ymm15, 224(%1) \n" - #ifndef __AVX__ - "vzeroupper \n" - #endif /* __AVX__ */ - : /* Output */ - : /* Input */ "r"(src), "r"(dst) - : /* Clobber */ "memory", - #ifndef __AVX__ - "%xmm0", "%xmm1", "%xmm2", "%xmm3", - "%xmm4", "%xmm5", "%xmm6", "%xmm7", - "%xmm8", "%xmm9", "%xmm10", "%xmm11", - "%xmm12", "%xmm13", "%xmm14", "%xmm15" - #else - "%ymm0", "%ymm1", "%ymm2", "%ymm3", - "%ymm4", "%ymm5", "%ymm6", "%ymm7", - "%ymm8", "%ymm9", "%ymm10", "%ymm11", - "%ymm12", "%ymm13", "%ymm14", "%ymm15" - #endif /* __AVX__ */ - ); - - #else - fromHalfZigZag_scalar(src, dst); - #endif /* defined IMF_HAVE_GCC_INLINEASM_64 */ -} - - -// -// Inverse 8x8 DCT, only inverting the DC. This assumes that -// all AC frequencies are 0. -// - -#ifndef IMF_HAVE_SSE2 - -void -dctInverse8x8DcOnly (float *data) -{ - float val = data[0] * 3.535536e-01f * 3.535536e-01f; - - for (int i = 0; i < 64; ++i) - data[i] = val; -} - -#else /* IMF_HAVE_SSE2 */ - -void -dctInverse8x8DcOnly (float *data) -{ - __m128 src = _mm_set1_ps (data[0] * 3.535536e-01f * 3.535536e-01f); - __m128 *dst = (__m128 *)data; - - for (int i = 0; i < 16; ++i) - dst[i] = src; -} - -#endif /* IMF_HAVE_SSE2 */ - - -// -// Full 8x8 Inverse DCT: -// -// Simple inverse DCT on an 8x8 block, with scalar ops only. -// Operates on data in-place. -// -// This is based on the iDCT formuation (y = frequency domain, -// x = spatial domain) -// -// [x0] [ ][y0] [ ][y1] -// [x1] = [ M1 ][y2] + [ M2 ][y3] -// [x2] [ ][y4] [ ][y5] -// [x3] [ ][y6] [ ][y7] -// -// [x7] [ ][y0] [ ][y1] -// [x6] = [ M1 ][y2] - [ M2 ][y3] -// [x5] [ ][y4] [ ][y5] -// [x4] [ ][y6] [ ][y7] -// -// where M1: M2: -// -// [a c a f] [b d e g] -// [a f -a -c] [d -g -b -e] -// [a -f -a c] [e -b g d] -// [a -c a -f] [g -e d -b] -// -// and the constants are as defined below.. -// -// If you know how many of the lower rows are zero, that can -// be passed in to help speed things up. If you don't know, -// just set zeroedRows=0. -// - -// -// Default implementation -// - -template -void -dctInverse8x8_scalar (float *data) -{ - const float a = .5f * cosf (3.14159f / 4.0f); - const float b = .5f * cosf (3.14159f / 16.0f); - const float c = .5f * cosf (3.14159f / 8.0f); - const float d = .5f * cosf (3.f*3.14159f / 16.0f); - const float e = .5f * cosf (5.f*3.14159f / 16.0f); - const float f = .5f * cosf (3.f*3.14159f / 8.0f); - const float g = .5f * cosf (7.f*3.14159f / 16.0f); - - float alpha[4], beta[4], theta[4], gamma[4]; - - float *rowPtr = NULL; - - // - // First pass - row wise. - // - // This looks less-compact than the description above in - // an attempt to fold together common sub-expressions. - // - - for (int row = 0; row < 8 - zeroedRows; ++row) - { - rowPtr = data + row * 8; - - alpha[0] = c * rowPtr[2]; - alpha[1] = f * rowPtr[2]; - alpha[2] = c * rowPtr[6]; - alpha[3] = f * rowPtr[6]; - - beta[0] = b * rowPtr[1] + d * rowPtr[3] + e * rowPtr[5] + g * rowPtr[7]; - beta[1] = d * rowPtr[1] - g * rowPtr[3] - b * rowPtr[5] - e * rowPtr[7]; - beta[2] = e * rowPtr[1] - b * rowPtr[3] + g * rowPtr[5] + d * rowPtr[7]; - beta[3] = g * rowPtr[1] - e * rowPtr[3] + d * rowPtr[5] - b * rowPtr[7]; - - theta[0] = a * (rowPtr[0] + rowPtr[4]); - theta[3] = a * (rowPtr[0] - rowPtr[4]); - - theta[1] = alpha[0] + alpha[3]; - theta[2] = alpha[1] - alpha[2]; - - - gamma[0] = theta[0] + theta[1]; - gamma[1] = theta[3] + theta[2]; - gamma[2] = theta[3] - theta[2]; - gamma[3] = theta[0] - theta[1]; - - - rowPtr[0] = gamma[0] + beta[0]; - rowPtr[1] = gamma[1] + beta[1]; - rowPtr[2] = gamma[2] + beta[2]; - rowPtr[3] = gamma[3] + beta[3]; - - rowPtr[4] = gamma[3] - beta[3]; - rowPtr[5] = gamma[2] - beta[2]; - rowPtr[6] = gamma[1] - beta[1]; - rowPtr[7] = gamma[0] - beta[0]; - } - - // - // Second pass - column wise. - // - - for (int column = 0; column < 8; ++column) - { - alpha[0] = c * data[16+column]; - alpha[1] = f * data[16+column]; - alpha[2] = c * data[48+column]; - alpha[3] = f * data[48+column]; - - beta[0] = b * data[8+column] + d * data[24+column] + - e * data[40+column] + g * data[56+column]; - - beta[1] = d * data[8+column] - g * data[24+column] - - b * data[40+column] - e * data[56+column]; - - beta[2] = e * data[8+column] - b * data[24+column] + - g * data[40+column] + d * data[56+column]; - - beta[3] = g * data[8+column] - e * data[24+column] + - d * data[40+column] - b * data[56+column]; - - theta[0] = a * (data[column] + data[32+column]); - theta[3] = a * (data[column] - data[32+column]); - - theta[1] = alpha[0] + alpha[3]; - theta[2] = alpha[1] - alpha[2]; - - gamma[0] = theta[0] + theta[1]; - gamma[1] = theta[3] + theta[2]; - gamma[2] = theta[3] - theta[2]; - gamma[3] = theta[0] - theta[1]; - - data[ column] = gamma[0] + beta[0]; - data[ 8 + column] = gamma[1] + beta[1]; - data[16 + column] = gamma[2] + beta[2]; - data[24 + column] = gamma[3] + beta[3]; - - data[32 + column] = gamma[3] - beta[3]; - data[40 + column] = gamma[2] - beta[2]; - data[48 + column] = gamma[1] - beta[1]; - data[56 + column] = gamma[0] - beta[0]; - } -} - - -// -// SSE2 Implementation -// - -template -void -dctInverse8x8_sse2 (float *data) -{ - #ifdef IMF_HAVE_SSE2 - __m128 a = {3.535536e-01f,3.535536e-01f,3.535536e-01f,3.535536e-01f}; - __m128 b = {4.903927e-01f,4.903927e-01f,4.903927e-01f,4.903927e-01f}; - __m128 c = {4.619398e-01f,4.619398e-01f,4.619398e-01f,4.619398e-01f}; - __m128 d = {4.157349e-01f,4.157349e-01f,4.157349e-01f,4.157349e-01f}; - __m128 e = {2.777855e-01f,2.777855e-01f,2.777855e-01f,2.777855e-01f}; - __m128 f = {1.913422e-01f,1.913422e-01f,1.913422e-01f,1.913422e-01f}; - __m128 g = {9.754573e-02f,9.754573e-02f,9.754573e-02f,9.754573e-02f}; - - __m128 c0 = {3.535536e-01f, 3.535536e-01f, 3.535536e-01f, 3.535536e-01f}; - __m128 c1 = {4.619398e-01f, 1.913422e-01f,-1.913422e-01f,-4.619398e-01f}; - __m128 c2 = {3.535536e-01f,-3.535536e-01f,-3.535536e-01f, 3.535536e-01f}; - __m128 c3 = {1.913422e-01f,-4.619398e-01f, 4.619398e-01f,-1.913422e-01f}; - - __m128 c4 = {4.903927e-01f, 4.157349e-01f, 2.777855e-01f, 9.754573e-02f}; - __m128 c5 = {4.157349e-01f,-9.754573e-02f,-4.903927e-01f,-2.777855e-01f}; - __m128 c6 = {2.777855e-01f,-4.903927e-01f, 9.754573e-02f, 4.157349e-01f}; - __m128 c7 = {9.754573e-02f,-2.777855e-01f, 4.157349e-01f,-4.903927e-01f}; - - __m128 *srcVec = (__m128 *)data; - __m128 x[8], evenSum, oddSum; - __m128 in[8], alpha[4], beta[4], theta[4], gamma[4]; - - // - // Rows - - // - // Treat this just like matrix-vector multiplication. The - // trick is to note that: - // - // [M00 M01 M02 M03][v0] [(v0 M00) + (v1 M01) + (v2 M02) + (v3 M03)] - // [M10 M11 M12 M13][v1] = [(v0 M10) + (v1 M11) + (v2 M12) + (v3 M13)] - // [M20 M21 M22 M23][v2] [(v0 M20) + (v1 M21) + (v2 M22) + (v3 M23)] - // [M30 M31 M32 M33][v3] [(v0 M30) + (v1 M31) + (v2 M32) + (v3 M33)] - // - // Then, we can fill a register with v_i and multiply by the i-th column - // of M, accumulating across all i-s. - // - // The kids refer to the populating of a register with a single value - // "broadcasting", and it can be done with a shuffle instruction. It - // seems to be the slowest part of the whole ordeal. - // - // Our matrix columns are stored above in c0-c7. c0-3 make up M1, and - // c4-7 are from M2. - // - - #define DCT_INVERSE_8x8_SS2_ROW_LOOP(i) \ - /* \ - * Broadcast the components of the row \ - */ \ - \ - x[0] = _mm_shuffle_ps (srcVec[2 * i], \ - srcVec[2 * i], \ - _MM_SHUFFLE (0, 0, 0, 0)); \ - \ - x[1] = _mm_shuffle_ps (srcVec[2 * i], \ - srcVec[2 * i], \ - _MM_SHUFFLE (1, 1, 1, 1)); \ - \ - x[2] = _mm_shuffle_ps (srcVec[2 * i], \ - srcVec[2 * i], \ - _MM_SHUFFLE (2, 2, 2, 2)); \ - \ - x[3] = _mm_shuffle_ps (srcVec[2 * i], \ - srcVec[2 * i], \ - _MM_SHUFFLE (3, 3, 3, 3)); \ - \ - x[4] = _mm_shuffle_ps (srcVec[2 * i + 1], \ - srcVec[2 * i + 1], \ - _MM_SHUFFLE (0, 0, 0, 0)); \ - \ - x[5] = _mm_shuffle_ps (srcVec[2 * i + 1], \ - srcVec[2 * i + 1], \ - _MM_SHUFFLE (1, 1, 1, 1)); \ - \ - x[6] = _mm_shuffle_ps (srcVec[2 * i + 1], \ - srcVec[2 * i + 1], \ - _MM_SHUFFLE (2, 2, 2, 2)); \ - \ - x[7] = _mm_shuffle_ps (srcVec[2 * i + 1], \ - srcVec[2 * i + 1], \ - _MM_SHUFFLE (3, 3, 3, 3)); \ - /* \ - * Multiply the components by each column of the matrix \ - */ \ - \ - x[0] = _mm_mul_ps (x[0], c0); \ - x[2] = _mm_mul_ps (x[2], c1); \ - x[4] = _mm_mul_ps (x[4], c2); \ - x[6] = _mm_mul_ps (x[6], c3); \ - \ - x[1] = _mm_mul_ps (x[1], c4); \ - x[3] = _mm_mul_ps (x[3], c5); \ - x[5] = _mm_mul_ps (x[5], c6); \ - x[7] = _mm_mul_ps (x[7], c7); \ - \ - /* \ - * Add across \ - */ \ - \ - evenSum = _mm_setzero_ps(); \ - evenSum = _mm_add_ps (evenSum, x[0]); \ - evenSum = _mm_add_ps (evenSum, x[2]); \ - evenSum = _mm_add_ps (evenSum, x[4]); \ - evenSum = _mm_add_ps (evenSum, x[6]); \ - \ - oddSum = _mm_setzero_ps(); \ - oddSum = _mm_add_ps (oddSum, x[1]); \ - oddSum = _mm_add_ps (oddSum, x[3]); \ - oddSum = _mm_add_ps (oddSum, x[5]); \ - oddSum = _mm_add_ps (oddSum, x[7]); \ - \ - /* \ - * Final Sum: \ - * out [0, 1, 2, 3] = evenSum + oddSum \ - * out [7, 6, 5, 4] = evenSum - oddSum \ - */ \ - \ - srcVec[2 * i] = _mm_add_ps (evenSum, oddSum); \ - srcVec[2 * i + 1] = _mm_sub_ps (evenSum, oddSum); \ - srcVec[2 * i + 1] = _mm_shuffle_ps (srcVec[2 * i + 1], \ - srcVec[2 * i + 1], \ - _MM_SHUFFLE (0, 1, 2, 3)); - - switch (zeroedRows) - { - case 0: - default: - DCT_INVERSE_8x8_SS2_ROW_LOOP (0) - DCT_INVERSE_8x8_SS2_ROW_LOOP (1) - DCT_INVERSE_8x8_SS2_ROW_LOOP (2) - DCT_INVERSE_8x8_SS2_ROW_LOOP (3) - DCT_INVERSE_8x8_SS2_ROW_LOOP (4) - DCT_INVERSE_8x8_SS2_ROW_LOOP (5) - DCT_INVERSE_8x8_SS2_ROW_LOOP (6) - DCT_INVERSE_8x8_SS2_ROW_LOOP (7) - break; - - case 1: - DCT_INVERSE_8x8_SS2_ROW_LOOP (0) - DCT_INVERSE_8x8_SS2_ROW_LOOP (1) - DCT_INVERSE_8x8_SS2_ROW_LOOP (2) - DCT_INVERSE_8x8_SS2_ROW_LOOP (3) - DCT_INVERSE_8x8_SS2_ROW_LOOP (4) - DCT_INVERSE_8x8_SS2_ROW_LOOP (5) - DCT_INVERSE_8x8_SS2_ROW_LOOP (6) - break; - - case 2: - DCT_INVERSE_8x8_SS2_ROW_LOOP (0) - DCT_INVERSE_8x8_SS2_ROW_LOOP (1) - DCT_INVERSE_8x8_SS2_ROW_LOOP (2) - DCT_INVERSE_8x8_SS2_ROW_LOOP (3) - DCT_INVERSE_8x8_SS2_ROW_LOOP (4) - DCT_INVERSE_8x8_SS2_ROW_LOOP (5) - break; - - case 3: - DCT_INVERSE_8x8_SS2_ROW_LOOP (0) - DCT_INVERSE_8x8_SS2_ROW_LOOP (1) - DCT_INVERSE_8x8_SS2_ROW_LOOP (2) - DCT_INVERSE_8x8_SS2_ROW_LOOP (3) - DCT_INVERSE_8x8_SS2_ROW_LOOP (4) - break; - - case 4: - DCT_INVERSE_8x8_SS2_ROW_LOOP (0) - DCT_INVERSE_8x8_SS2_ROW_LOOP (1) - DCT_INVERSE_8x8_SS2_ROW_LOOP (2) - DCT_INVERSE_8x8_SS2_ROW_LOOP (3) - break; - - case 5: - DCT_INVERSE_8x8_SS2_ROW_LOOP (0) - DCT_INVERSE_8x8_SS2_ROW_LOOP (1) - DCT_INVERSE_8x8_SS2_ROW_LOOP (2) - break; - - case 6: - DCT_INVERSE_8x8_SS2_ROW_LOOP (0) - DCT_INVERSE_8x8_SS2_ROW_LOOP (1) - break; - - case 7: - DCT_INVERSE_8x8_SS2_ROW_LOOP (0) - break; - } - - // - // Columns - - // - // This is slightly more straightforward, if less readable. Here - // we just operate on 4 columns at a time, in two batches. - // - // The slight mess is to try and cache sub-expressions, which - // we ignore in the row-wise pass. - // - - for (int col = 0; col < 2; ++col) - { - - for (int i = 0; i < 8; ++i) - in[i] = srcVec[2 * i + col]; - - alpha[0] = _mm_mul_ps (c, in[2]); - alpha[1] = _mm_mul_ps (f, in[2]); - alpha[2] = _mm_mul_ps (c, in[6]); - alpha[3] = _mm_mul_ps (f, in[6]); - - beta[0] = _mm_add_ps (_mm_add_ps (_mm_mul_ps (in[1], b), - _mm_mul_ps (in[3], d)), - _mm_add_ps (_mm_mul_ps (in[5], e), - _mm_mul_ps (in[7], g))); - - beta[1] = _mm_sub_ps (_mm_sub_ps (_mm_mul_ps (in[1], d), - _mm_mul_ps (in[3], g)), - _mm_add_ps (_mm_mul_ps (in[5], b), - _mm_mul_ps (in[7], e))); - - beta[2] = _mm_add_ps (_mm_sub_ps (_mm_mul_ps (in[1], e), - _mm_mul_ps (in[3], b)), - _mm_add_ps (_mm_mul_ps (in[5], g), - _mm_mul_ps (in[7], d))); - - beta[3] = _mm_add_ps (_mm_sub_ps (_mm_mul_ps (in[1], g), - _mm_mul_ps (in[3], e)), - _mm_sub_ps (_mm_mul_ps (in[5], d), - _mm_mul_ps (in[7], b))); - - theta[0] = _mm_mul_ps (a, _mm_add_ps (in[0], in[4])); - theta[3] = _mm_mul_ps (a, _mm_sub_ps (in[0], in[4])); - - theta[1] = _mm_add_ps (alpha[0], alpha[3]); - theta[2] = _mm_sub_ps (alpha[1], alpha[2]); - - gamma[0] = _mm_add_ps (theta[0], theta[1]); - gamma[1] = _mm_add_ps (theta[3], theta[2]); - gamma[2] = _mm_sub_ps (theta[3], theta[2]); - gamma[3] = _mm_sub_ps (theta[0], theta[1]); - - srcVec[ col] = _mm_add_ps (gamma[0], beta[0]); - srcVec[2+col] = _mm_add_ps (gamma[1], beta[1]); - srcVec[4+col] = _mm_add_ps (gamma[2], beta[2]); - srcVec[6+col] = _mm_add_ps (gamma[3], beta[3]); - - srcVec[ 8+col] = _mm_sub_ps (gamma[3], beta[3]); - srcVec[10+col] = _mm_sub_ps (gamma[2], beta[2]); - srcVec[12+col] = _mm_sub_ps (gamma[1], beta[1]); - srcVec[14+col] = _mm_sub_ps (gamma[0], beta[0]); - } - - #else /* IMF_HAVE_SSE2 */ - - dctInverse8x8_scalar (data); - - #endif /* IMF_HAVE_SSE2 */ -} - - -// -// AVX Implementation -// - -#define STR(A) #A - -#define IDCT_AVX_SETUP_2_ROWS(_DST0, _DST1, _TMP0, _TMP1, \ - _OFF00, _OFF01, _OFF10, _OFF11) \ - "vmovaps " STR(_OFF00) "(%0), %%xmm" STR(_TMP0) " \n" \ - "vmovaps " STR(_OFF01) "(%0), %%xmm" STR(_TMP1) " \n" \ - " \n" \ - "vinsertf128 $1, " STR(_OFF10) "(%0), %%ymm" STR(_TMP0) ", %%ymm" STR(_TMP0) " \n" \ - "vinsertf128 $1, " STR(_OFF11) "(%0), %%ymm" STR(_TMP1) ", %%ymm" STR(_TMP1) " \n" \ - " \n" \ - "vunpcklpd %%ymm" STR(_TMP1) ", %%ymm" STR(_TMP0) ", %%ymm" STR(_DST0) " \n" \ - "vunpckhpd %%ymm" STR(_TMP1) ", %%ymm" STR(_TMP0) ", %%ymm" STR(_DST1) " \n" \ - " \n" \ - "vunpcklps %%ymm" STR(_DST1) ", %%ymm" STR(_DST0) ", %%ymm" STR(_TMP0) " \n" \ - "vunpckhps %%ymm" STR(_DST1) ", %%ymm" STR(_DST0) ", %%ymm" STR(_TMP1) " \n" \ - " \n" \ - "vunpcklpd %%ymm" STR(_TMP1) ", %%ymm" STR(_TMP0) ", %%ymm" STR(_DST0) " \n" \ - "vunpckhpd %%ymm" STR(_TMP1) ", %%ymm" STR(_TMP0) ", %%ymm" STR(_DST1) " \n" - -#define IDCT_AVX_MMULT_ROWS(_SRC) \ - /* Broadcast the source values into y12-y15 */ \ - "vpermilps $0x00, " STR(_SRC) ", %%ymm12 \n" \ - "vpermilps $0x55, " STR(_SRC) ", %%ymm13 \n" \ - "vpermilps $0xaa, " STR(_SRC) ", %%ymm14 \n" \ - "vpermilps $0xff, " STR(_SRC) ", %%ymm15 \n" \ - \ - /* Multiple coefs and the broadcasted values */ \ - "vmulps %%ymm12, %%ymm8, %%ymm12 \n" \ - "vmulps %%ymm13, %%ymm9, %%ymm13 \n" \ - "vmulps %%ymm14, %%ymm10, %%ymm14 \n" \ - "vmulps %%ymm15, %%ymm11, %%ymm15 \n" \ - \ - /* Accumulate the result back into the source */ \ - "vaddps %%ymm13, %%ymm12, %%ymm12 \n" \ - "vaddps %%ymm15, %%ymm14, %%ymm14 \n" \ - "vaddps %%ymm14, %%ymm12, " STR(_SRC) "\n" - -#define IDCT_AVX_EO_TO_ROW_HALVES(_EVEN, _ODD, _FRONT, _BACK) \ - "vsubps " STR(_ODD) "," STR(_EVEN) "," STR(_BACK) "\n" \ - "vaddps " STR(_ODD) "," STR(_EVEN) "," STR(_FRONT) "\n" \ - /* Reverse the back half */ \ - "vpermilps $0x1b," STR(_BACK) "," STR(_BACK) "\n" - -/* In order to allow for path paths when we know certain rows - * of the 8x8 block are zero, most of the body of the DCT is - * in the following macro. Statements are wrapped in a ROWn() - * macro, where n is the lowest row in the 8x8 block in which - * they depend. - * - * This should work for the cases where we have 2-8 full rows. - * the 1-row case is special, and we'll handle it seperately. - */ -#define IDCT_AVX_BODY \ - /* ============================================== - * Row 1D DCT - * ---------------------------------------------- - */ \ - \ - /* Setup for the row-oriented 1D DCT. Assuming that (%0) holds - * the row-major 8x8 block, load ymm0-3 with the even columns - * and ymm4-7 with the odd columns. The lower half of the ymm - * holds one row, while the upper half holds the next row. - * - * If our source is: - * a0 a1 a2 a3 a4 a5 a6 a7 - * b0 b1 b2 b3 b4 b5 b6 b7 - * - * We'll be forming: - * a0 a2 a4 a6 b0 b2 b4 b6 - * a1 a3 a5 a7 b1 b3 b5 b7 - */ \ - ROW0( IDCT_AVX_SETUP_2_ROWS(0, 4, 14, 15, 0, 16, 32, 48) ) \ - ROW2( IDCT_AVX_SETUP_2_ROWS(1, 5, 12, 13, 64, 80, 96, 112) ) \ - ROW4( IDCT_AVX_SETUP_2_ROWS(2, 6, 10, 11, 128, 144, 160, 176) ) \ - ROW6( IDCT_AVX_SETUP_2_ROWS(3, 7, 8, 9, 192, 208, 224, 240) ) \ - \ - /* Multiple the even columns (ymm0-3) by the matrix M1 - * storing the results back in ymm0-3 - * - * Assume that (%1) holds the matrix in column major order - */ \ - "vbroadcastf128 (%1), %%ymm8 \n" \ - "vbroadcastf128 16(%1), %%ymm9 \n" \ - "vbroadcastf128 32(%1), %%ymm10 \n" \ - "vbroadcastf128 48(%1), %%ymm11 \n" \ - \ - ROW0( IDCT_AVX_MMULT_ROWS(%%ymm0) ) \ - ROW2( IDCT_AVX_MMULT_ROWS(%%ymm1) ) \ - ROW4( IDCT_AVX_MMULT_ROWS(%%ymm2) ) \ - ROW6( IDCT_AVX_MMULT_ROWS(%%ymm3) ) \ - \ - /* Repeat, but with the odd columns (ymm4-7) and the - * matrix M2 - */ \ - "vbroadcastf128 64(%1), %%ymm8 \n" \ - "vbroadcastf128 80(%1), %%ymm9 \n" \ - "vbroadcastf128 96(%1), %%ymm10 \n" \ - "vbroadcastf128 112(%1), %%ymm11 \n" \ - \ - ROW0( IDCT_AVX_MMULT_ROWS(%%ymm4) ) \ - ROW2( IDCT_AVX_MMULT_ROWS(%%ymm5) ) \ - ROW4( IDCT_AVX_MMULT_ROWS(%%ymm6) ) \ - ROW6( IDCT_AVX_MMULT_ROWS(%%ymm7) ) \ - \ - /* Sum the M1 (ymm0-3) and M2 (ymm4-7) results to get the - * front halves of the results, and difference to get the - * back halves. The front halfs end up in ymm0-3, the back - * halves end up in ymm12-15. - */ \ - ROW0( IDCT_AVX_EO_TO_ROW_HALVES(%%ymm0, %%ymm4, %%ymm0, %%ymm12) ) \ - ROW2( IDCT_AVX_EO_TO_ROW_HALVES(%%ymm1, %%ymm5, %%ymm1, %%ymm13) ) \ - ROW4( IDCT_AVX_EO_TO_ROW_HALVES(%%ymm2, %%ymm6, %%ymm2, %%ymm14) ) \ - ROW6( IDCT_AVX_EO_TO_ROW_HALVES(%%ymm3, %%ymm7, %%ymm3, %%ymm15) ) \ - \ - /* Reassemble the rows halves into ymm0-7 */ \ - ROW7( "vperm2f128 $0x13, %%ymm3, %%ymm15, %%ymm7 \n" ) \ - ROW6( "vperm2f128 $0x02, %%ymm3, %%ymm15, %%ymm6 \n" ) \ - ROW5( "vperm2f128 $0x13, %%ymm2, %%ymm14, %%ymm5 \n" ) \ - ROW4( "vperm2f128 $0x02, %%ymm2, %%ymm14, %%ymm4 \n" ) \ - ROW3( "vperm2f128 $0x13, %%ymm1, %%ymm13, %%ymm3 \n" ) \ - ROW2( "vperm2f128 $0x02, %%ymm1, %%ymm13, %%ymm2 \n" ) \ - ROW1( "vperm2f128 $0x13, %%ymm0, %%ymm12, %%ymm1 \n" ) \ - ROW0( "vperm2f128 $0x02, %%ymm0, %%ymm12, %%ymm0 \n" ) \ - \ - \ - /* ============================================== - * Column 1D DCT - * ---------------------------------------------- - */ \ - \ - /* Rows should be in ymm0-7, and M2 columns should still be - * preserved in ymm8-11. M2 has 4 unique values (and +- - * versions of each), and all (positive) values appear in - * the first column (and row), which is in ymm8. - * - * For the column-wise DCT, we need to: - * 1) Broadcast each element a row of M2 into 4 vectors - * 2) Multiple the odd rows (ymm1,3,5,7) by the broadcasts. - * 3) Accumulate into ymm12-15 for the odd outputs. - * - * Instead of doing 16 broadcasts for each element in M2, - * do 4, filling y8-11 with: - * - * ymm8: [ b b b b | b b b b ] - * ymm9: [ d d d d | d d d d ] - * ymm10: [ e e e e | e e e e ] - * ymm11: [ g g g g | g g g g ] - * - * And deal with the negative values by subtracting during accum. - */ \ - "vpermilps $0xff, %%ymm8, %%ymm11 \n" \ - "vpermilps $0xaa, %%ymm8, %%ymm10 \n" \ - "vpermilps $0x55, %%ymm8, %%ymm9 \n" \ - "vpermilps $0x00, %%ymm8, %%ymm8 \n" \ - \ - /* This one is easy, since we have ymm12-15 open for scratch - * ymm12 = b ymm1 + d ymm3 + e ymm5 + g ymm7 - */ \ - ROW1( "vmulps %%ymm1, %%ymm8, %%ymm12 \n" ) \ - ROW3( "vmulps %%ymm3, %%ymm9, %%ymm13 \n" ) \ - ROW5( "vmulps %%ymm5, %%ymm10, %%ymm14 \n" ) \ - ROW7( "vmulps %%ymm7, %%ymm11, %%ymm15 \n" ) \ - \ - ROW3( "vaddps %%ymm12, %%ymm13, %%ymm12 \n" ) \ - ROW7( "vaddps %%ymm14, %%ymm15, %%ymm14 \n" ) \ - ROW5( "vaddps %%ymm12, %%ymm14, %%ymm12 \n" ) \ - \ - /* Tricker, since only y13-15 are open for scratch - * ymm13 = d ymm1 - g ymm3 - b ymm5 - e ymm7 - */ \ - ROW1( "vmulps %%ymm1, %%ymm9, %%ymm13 \n" ) \ - ROW3( "vmulps %%ymm3, %%ymm11, %%ymm14 \n" ) \ - ROW5( "vmulps %%ymm5, %%ymm8, %%ymm15 \n" ) \ - \ - ROW5( "vaddps %%ymm14, %%ymm15, %%ymm14 \n" ) \ - ROW3( "vsubps %%ymm14, %%ymm13, %%ymm13 \n" ) \ - \ - ROW7( "vmulps %%ymm7, %%ymm10, %%ymm15 \n" ) \ - ROW7( "vsubps %%ymm15, %%ymm13, %%ymm13 \n" ) \ - \ - /* Tricker still, as only y14-15 are open for scratch - * ymm14 = e ymm1 - b ymm3 + g ymm5 + d ymm7 - */ \ - ROW1( "vmulps %%ymm1, %%ymm10, %%ymm14 \n" ) \ - ROW3( "vmulps %%ymm3, %%ymm8, %%ymm15 \n" ) \ - \ - ROW3( "vsubps %%ymm15, %%ymm14, %%ymm14 \n" ) \ - \ - ROW5( "vmulps %%ymm5, %%ymm11, %%ymm15 \n" ) \ - ROW5( "vaddps %%ymm15, %%ymm14, %%ymm14 \n" ) \ - \ - ROW7( "vmulps %%ymm7, %%ymm9, %%ymm15 \n" ) \ - ROW7( "vaddps %%ymm15, %%ymm14, %%ymm14 \n" ) \ - \ - \ - /* Easy, as we can blow away ymm1,3,5,7 for scratch - * ymm15 = g ymm1 - e ymm3 + d ymm5 - b ymm7 - */ \ - ROW1( "vmulps %%ymm1, %%ymm11, %%ymm15 \n" ) \ - ROW3( "vmulps %%ymm3, %%ymm10, %%ymm3 \n" ) \ - ROW5( "vmulps %%ymm5, %%ymm9, %%ymm5 \n" ) \ - ROW7( "vmulps %%ymm7, %%ymm8, %%ymm7 \n" ) \ - \ - ROW5( "vaddps %%ymm15, %%ymm5, %%ymm15 \n" ) \ - ROW7( "vaddps %%ymm3, %%ymm7, %%ymm3 \n" ) \ - ROW3( "vsubps %%ymm3, %%ymm15, %%ymm15 \n" ) \ - \ - \ - /* Load coefs for M1. Because we're going to broadcast - * coefs, we don't need to load the actual structure from - * M1. Instead, just load enough that we can broadcast. - * There are only 6 unique values in M1, but they're in +- - * pairs, leaving only 3 unique coefs if we add and subtract - * properly. - * - * Fill ymm1 with coef[2] = [ a a c f | a a c f ] - * Broadcast ymm5 with [ f f f f | f f f f ] - * Broadcast ymm3 with [ c c c c | c c c c ] - * Broadcast ymm1 with [ a a a a | a a a a ] - */ \ - "vbroadcastf128 8(%1), %%ymm1 \n" \ - "vpermilps $0xff, %%ymm1, %%ymm5 \n" \ - "vpermilps $0xaa, %%ymm1, %%ymm3 \n" \ - "vpermilps $0x00, %%ymm1, %%ymm1 \n" \ - \ - /* If we expand E = [M1] [x0 x2 x4 x6]^t, we get the following - * common expressions: - * - * E_0 = ymm8 = (a ymm0 + a ymm4) + (c ymm2 + f ymm6) - * E_3 = ymm11 = (a ymm0 + a ymm4) - (c ymm2 + f ymm6) - * - * E_1 = ymm9 = (a ymm0 - a ymm4) + (f ymm2 - c ymm6) - * E_2 = ymm10 = (a ymm0 - a ymm4) - (f ymm2 - c ymm6) - * - * Afterwards, ymm8-11 will hold the even outputs. - */ \ - \ - /* ymm11 = (a ymm0 + a ymm4), ymm1 = (a ymm0 - a ymm4) */ \ - ROW0( "vmulps %%ymm1, %%ymm0, %%ymm11 \n" ) \ - ROW4( "vmulps %%ymm1, %%ymm4, %%ymm4 \n" ) \ - ROW0( "vmovaps %%ymm11, %%ymm1 \n" ) \ - ROW4( "vaddps %%ymm4, %%ymm11, %%ymm11 \n" ) \ - ROW4( "vsubps %%ymm4, %%ymm1, %%ymm1 \n" ) \ - \ - /* ymm7 = (c ymm2 + f ymm6) */ \ - ROW2( "vmulps %%ymm3, %%ymm2, %%ymm7 \n" ) \ - ROW6( "vmulps %%ymm5, %%ymm6, %%ymm9 \n" ) \ - ROW6( "vaddps %%ymm9, %%ymm7, %%ymm7 \n" ) \ - \ - /* E_0 = ymm8 = (a ymm0 + a ymm4) + (c ymm2 + f ymm6) - * E_3 = ymm11 = (a ymm0 + a ymm4) - (c ymm2 + f ymm6) - */ \ - ROW0( "vmovaps %%ymm11, %%ymm8 \n" ) \ - ROW2( "vaddps %%ymm7, %%ymm8, %%ymm8 \n" ) \ - ROW2( "vsubps %%ymm7, %%ymm11, %%ymm11 \n" ) \ - \ - /* ymm7 = (f ymm2 - c ymm6) */ \ - ROW2( "vmulps %%ymm5, %%ymm2, %%ymm7 \n" ) \ - ROW6( "vmulps %%ymm3, %%ymm6, %%ymm9 \n" ) \ - ROW6( "vsubps %%ymm9, %%ymm7, %%ymm7 \n" ) \ - \ - /* E_1 = ymm9 = (a ymm0 - a ymm4) + (f ymm2 - c ymm6) - * E_2 = ymm10 = (a ymm0 - a ymm4) - (f ymm2 - c ymm6) - */ \ - ROW0( "vmovaps %%ymm1, %%ymm9 \n" ) \ - ROW0( "vmovaps %%ymm1, %%ymm10 \n" ) \ - ROW2( "vaddps %%ymm7, %%ymm1, %%ymm9 \n" ) \ - ROW2( "vsubps %%ymm7, %%ymm1, %%ymm10 \n" ) \ - \ - /* Add the even (ymm8-11) and the odds (ymm12-15), - * placing the results into ymm0-7 - */ \ - "vaddps %%ymm12, %%ymm8, %%ymm0 \n" \ - "vaddps %%ymm13, %%ymm9, %%ymm1 \n" \ - "vaddps %%ymm14, %%ymm10, %%ymm2 \n" \ - "vaddps %%ymm15, %%ymm11, %%ymm3 \n" \ - \ - "vsubps %%ymm12, %%ymm8, %%ymm7 \n" \ - "vsubps %%ymm13, %%ymm9, %%ymm6 \n" \ - "vsubps %%ymm14, %%ymm10, %%ymm5 \n" \ - "vsubps %%ymm15, %%ymm11, %%ymm4 \n" \ - \ - /* Copy out the results from ymm0-7 */ \ - "vmovaps %%ymm0, (%0) \n" \ - "vmovaps %%ymm1, 32(%0) \n" \ - "vmovaps %%ymm2, 64(%0) \n" \ - "vmovaps %%ymm3, 96(%0) \n" \ - "vmovaps %%ymm4, 128(%0) \n" \ - "vmovaps %%ymm5, 160(%0) \n" \ - "vmovaps %%ymm6, 192(%0) \n" \ - "vmovaps %%ymm7, 224(%0) \n" - -/* Output, input, and clobber (OIC) sections of the inline asm */ -#define IDCT_AVX_OIC(_IN0) \ - : /* Output */ \ - : /* Input */ "r"(_IN0), "r"(sAvxCoef) \ - : /* Clobber */ "memory", \ - "%xmm0", "%xmm1", "%xmm2", "%xmm3", \ - "%xmm4", "%xmm5", "%xmm6", "%xmm7", \ - "%xmm8", "%xmm9", "%xmm10", "%xmm11",\ - "%xmm12", "%xmm13", "%xmm14", "%xmm15" - -/* Include vzeroupper for non-AVX builds */ -#ifndef __AVX__ - #define IDCT_AVX_ASM(_IN0) \ - __asm__( \ - IDCT_AVX_BODY \ - "vzeroupper \n" \ - IDCT_AVX_OIC(_IN0) \ - ); -#else /* __AVX__ */ - #define IDCT_AVX_ASM(_IN0) \ - __asm__( \ - IDCT_AVX_BODY \ - IDCT_AVX_OIC(_IN0) \ - ); -#endif /* __AVX__ */ - -template -void -dctInverse8x8_avx (float *data) -{ - #if defined IMF_HAVE_GCC_INLINEASM_64 - - /* The column-major version of M1, followed by the - * column-major version of M2: - * - * [ a c a f ] [ b d e g ] - * M1 = [ a f -a -c ] M2 = [ d -g -b -e ] - * [ a -f -a c ] [ e -b g d ] - * [ a -c a -f ] [ g -e d -b ] - */ - const float sAvxCoef[32] __attribute__((aligned(32))) = { - 3.535536e-01, 3.535536e-01, 3.535536e-01, 3.535536e-01, /* a a a a */ - 4.619398e-01, 1.913422e-01, -1.913422e-01, -4.619398e-01, /* c f -f -c */ - 3.535536e-01, -3.535536e-01, -3.535536e-01, 3.535536e-01, /* a -a -a a */ - 1.913422e-01, -4.619398e-01, 4.619398e-01, -1.913422e-01, /* f -c c -f */ - - 4.903927e-01, 4.157349e-01, 2.777855e-01, 9.754573e-02, /* b d e g */ - 4.157349e-01, -9.754573e-02, -4.903927e-01, -2.777855e-01, /* d -g -b -e */ - 2.777855e-01, -4.903927e-01, 9.754573e-02, 4.157349e-01, /* e -b g d */ - 9.754573e-02, -2.777855e-01, 4.157349e-01, -4.903927e-01 /* g -e d -b */ - }; - - #define ROW0(_X) _X - #define ROW1(_X) _X - #define ROW2(_X) _X - #define ROW3(_X) _X - #define ROW4(_X) _X - #define ROW5(_X) _X - #define ROW6(_X) _X - #define ROW7(_X) _X - - if (zeroedRows == 0) { - - IDCT_AVX_ASM(data) - - } else if (zeroedRows == 1) { - - #undef ROW7 - #define ROW7(_X) - IDCT_AVX_ASM(data) - - } else if (zeroedRows == 2) { - - #undef ROW6 - #define ROW6(_X) - IDCT_AVX_ASM(data) - - } else if (zeroedRows == 3) { - - #undef ROW5 - #define ROW5(_X) - IDCT_AVX_ASM(data) - - } else if (zeroedRows == 4) { - - #undef ROW4 - #define ROW4(_X) - IDCT_AVX_ASM(data) - - } else if (zeroedRows == 5) { - - #undef ROW3 - #define ROW3(_X) - IDCT_AVX_ASM(data) - - } else if (zeroedRows == 6) { - - #undef ROW2 - #define ROW2(_X) - IDCT_AVX_ASM(data) - - } else if (zeroedRows == 7) { - - __asm__( - - /* ============================================== - * Row 1D DCT - * ---------------------------------------------- - */ - IDCT_AVX_SETUP_2_ROWS(0, 4, 14, 15, 0, 16, 32, 48) - - "vbroadcastf128 (%1), %%ymm8 \n" - "vbroadcastf128 16(%1), %%ymm9 \n" - "vbroadcastf128 32(%1), %%ymm10 \n" - "vbroadcastf128 48(%1), %%ymm11 \n" - - /* Stash a vector of [a a a a | a a a a] away in ymm2 */ - "vinsertf128 $1, %%xmm8, %%ymm8, %%ymm2 \n" - - IDCT_AVX_MMULT_ROWS(%%ymm0) - - "vbroadcastf128 64(%1), %%ymm8 \n" - "vbroadcastf128 80(%1), %%ymm9 \n" - "vbroadcastf128 96(%1), %%ymm10 \n" - "vbroadcastf128 112(%1), %%ymm11 \n" - - IDCT_AVX_MMULT_ROWS(%%ymm4) - - IDCT_AVX_EO_TO_ROW_HALVES(%%ymm0, %%ymm4, %%ymm0, %%ymm12) - - "vperm2f128 $0x02, %%ymm0, %%ymm12, %%ymm0 \n" - - /* ============================================== - * Column 1D DCT - * ---------------------------------------------- - */ - - /* DC only, so multiple by a and we're done */ - "vmulps %%ymm2, %%ymm0, %%ymm0 \n" - - /* Copy out results */ - "vmovaps %%ymm0, (%0) \n" - "vmovaps %%ymm0, 32(%0) \n" - "vmovaps %%ymm0, 64(%0) \n" - "vmovaps %%ymm0, 96(%0) \n" - "vmovaps %%ymm0, 128(%0) \n" - "vmovaps %%ymm0, 160(%0) \n" - "vmovaps %%ymm0, 192(%0) \n" - "vmovaps %%ymm0, 224(%0) \n" - - #ifndef __AVX__ - "vzeroupper \n" - #endif /* __AVX__ */ - IDCT_AVX_OIC(data) - ); - } else { - assert(false); // Invalid template instance parameter - } - #else /* IMF_HAVE_GCC_INLINEASM_64 */ - - dctInverse8x8_scalar(data); - - #endif /* IMF_HAVE_GCC_INLINEASM_64 */ -} - - -// -// Full 8x8 Forward DCT: -// -// Base forward 8x8 DCT implementation. Works on the data in-place -// -// The implementation describedin Pennebaker + Mitchell, -// section 4.3.2, and illustrated in figure 4-7 -// -// The basic idea is that the 1D DCT math reduces to: -// -// 2*out_0 = c_4 [(s_07 + s_34) + (s_12 + s_56)] -// 2*out_4 = c_4 [(s_07 + s_34) - (s_12 + s_56)] -// -// {2*out_2, 2*out_6} = rot_6 ((d_12 - d_56), (s_07 - s_34)) -// -// {2*out_3, 2*out_5} = rot_-3 (d_07 - c_4 (s_12 - s_56), -// d_34 - c_4 (d_12 + d_56)) -// -// {2*out_1, 2*out_7} = rot_-1 (d_07 + c_4 (s_12 - s_56), -// -d_34 - c_4 (d_12 + d_56)) -// -// where: -// -// c_i = cos(i*pi/16) -// s_i = sin(i*pi/16) -// -// s_ij = in_i + in_j -// d_ij = in_i - in_j -// -// rot_i(x, y) = {c_i*x + s_i*y, -s_i*x + c_i*y} -// -// We'll run the DCT in two passes. First, run the 1D DCT on -// the rows, in-place. Then, run over the columns in-place, -// and be done with it. -// - -#ifndef IMF_HAVE_SSE2 - -// -// Default implementation -// - -void -dctForward8x8 (float *data) -{ - float A0, A1, A2, A3, A4, A5, A6, A7; - float K0, K1, rot_x, rot_y; - - float *srcPtr = data; - float *dstPtr = data; - - const float c1 = cosf (3.14159f * 1.0f / 16.0f); - const float c2 = cosf (3.14159f * 2.0f / 16.0f); - const float c3 = cosf (3.14159f * 3.0f / 16.0f); - const float c4 = cosf (3.14159f * 4.0f / 16.0f); - const float c5 = cosf (3.14159f * 5.0f / 16.0f); - const float c6 = cosf (3.14159f * 6.0f / 16.0f); - const float c7 = cosf (3.14159f * 7.0f / 16.0f); - - const float c1Half = .5f * c1; - const float c2Half = .5f * c2; - const float c3Half = .5f * c3; - const float c5Half = .5f * c5; - const float c6Half = .5f * c6; - const float c7Half = .5f * c7; - - // - // First pass - do a 1D DCT over the rows and write the - // results back in place - // - - for (int row=0; row<8; ++row) - { - float *srcRowPtr = srcPtr + 8 * row; - float *dstRowPtr = dstPtr + 8 * row; - - A0 = srcRowPtr[0] + srcRowPtr[7]; - A1 = srcRowPtr[1] + srcRowPtr[2]; - A2 = srcRowPtr[1] - srcRowPtr[2]; - A3 = srcRowPtr[3] + srcRowPtr[4]; - A4 = srcRowPtr[3] - srcRowPtr[4]; - A5 = srcRowPtr[5] + srcRowPtr[6]; - A6 = srcRowPtr[5] - srcRowPtr[6]; - A7 = srcRowPtr[0] - srcRowPtr[7]; - - K0 = c4 * (A0 + A3); - K1 = c4 * (A1 + A5); - - dstRowPtr[0] = .5f * (K0 + K1); - dstRowPtr[4] = .5f * (K0 - K1); - - // - // (2*dst2, 2*dst6) = rot 6 (d12 - d56, s07 - s34) - // - - rot_x = A2 - A6; - rot_y = A0 - A3; - - dstRowPtr[2] = c6Half * rot_x + c2Half * rot_y; - dstRowPtr[6] = c6Half * rot_y - c2Half * rot_x; - - // - // K0, K1 are active until after dst[1],dst[7] - // as well as dst[3], dst[5] are computed. - // - - K0 = c4 * (A1 - A5); - K1 = -1 * c4 * (A2 + A6); - - // - // Two ways to do a rotation: - // - // rot i (x, y) = - // X = c_i*x + s_i*y - // Y = -s_i*x + c_i*y - // - // OR - // - // X = c_i*(x+y) + (s_i-c_i)*y - // Y = c_i*y - (s_i+c_i)*x - // - // the first case has 4 multiplies, but fewer constants, - // while the 2nd case has fewer multiplies but takes more space. - - // - // (2*dst3, 2*dst5) = rot -3 ( d07 - K0, d34 + K1 ) - // - - rot_x = A7 - K0; - rot_y = A4 + K1; - - dstRowPtr[3] = c3Half * rot_x - c5Half * rot_y; - dstRowPtr[5] = c5Half * rot_x + c3Half * rot_y; - - // - // (2*dst1, 2*dst7) = rot -1 ( d07 + K0, K1 - d34 ) - // - - rot_x = A7 + K0; - rot_y = K1 - A4; - - // - // A: 4, 7 are inactive. All A's are inactive - // - - dstRowPtr[1] = c1Half * rot_x - c7Half * rot_y; - dstRowPtr[7] = c7Half * rot_x + c1Half * rot_y; - } - - // - // Second pass - do the same, but on the columns - // - - for (int column = 0; column < 8; ++column) - { - - A0 = srcPtr[ column] + srcPtr[56 + column]; - A7 = srcPtr[ column] - srcPtr[56 + column]; - - A1 = srcPtr[ 8 + column] + srcPtr[16 + column]; - A2 = srcPtr[ 8 + column] - srcPtr[16 + column]; - - A3 = srcPtr[24 + column] + srcPtr[32 + column]; - A4 = srcPtr[24 + column] - srcPtr[32 + column]; - - A5 = srcPtr[40 + column] + srcPtr[48 + column]; - A6 = srcPtr[40 + column] - srcPtr[48 + column]; - - K0 = c4 * (A0 + A3); - K1 = c4 * (A1 + A5); - - dstPtr[ column] = .5f * (K0 + K1); - dstPtr[32+column] = .5f * (K0 - K1); - - // - // (2*dst2, 2*dst6) = rot 6 ( d12 - d56, s07 - s34 ) - // - - rot_x = A2 - A6; - rot_y = A0 - A3; - - dstPtr[16+column] = .5f * (c6 * rot_x + c2 * rot_y); - dstPtr[48+column] = .5f * (c6 * rot_y - c2 * rot_x); - - // - // K0, K1 are active until after dst[1],dst[7] - // as well as dst[3], dst[5] are computed. - // - - K0 = c4 * (A1 - A5); - K1 = -1 * c4 * (A2 + A6); - - // - // (2*dst3, 2*dst5) = rot -3 ( d07 - K0, d34 + K1 ) - // - - rot_x = A7 - K0; - rot_y = A4 + K1; - - dstPtr[24+column] = .5f * (c3 * rot_x - c5 * rot_y); - dstPtr[40+column] = .5f * (c5 * rot_x + c3 * rot_y); - - // - // (2*dst1, 2*dst7) = rot -1 ( d07 + K0, K1 - d34 ) - // - - rot_x = A7 + K0; - rot_y = K1 - A4; - - dstPtr[ 8+column] = .5f * (c1 * rot_x - c7 * rot_y); - dstPtr[56+column] = .5f * (c7 * rot_x + c1 * rot_y); - } -} - -#else /* IMF_HAVE_SSE2 */ - -// -// SSE2 implementation -// -// Here, we're always doing a column-wise operation -// plus transposes. This might be faster to do differently -// between rows-wise and column-wise -// - -void -dctForward8x8 (float *data) -{ - __m128 *srcVec = (__m128 *)data; - __m128 a0Vec, a1Vec, a2Vec, a3Vec, a4Vec, a5Vec, a6Vec, a7Vec; - __m128 k0Vec, k1Vec, rotXVec, rotYVec; - __m128 transTmp[4], transTmp2[4]; - - __m128 c4Vec = { .70710678f, .70710678f, .70710678f, .70710678f}; - __m128 c4NegVec = {-.70710678f, -.70710678f, -.70710678f, -.70710678f}; - - __m128 c1HalfVec = {.490392640f, .490392640f, .490392640f, .490392640f}; - __m128 c2HalfVec = {.461939770f, .461939770f, .461939770f, .461939770f}; - __m128 c3HalfVec = {.415734810f, .415734810f, .415734810f, .415734810f}; - __m128 c5HalfVec = {.277785120f, .277785120f, .277785120f, .277785120f}; - __m128 c6HalfVec = {.191341720f, .191341720f, .191341720f, .191341720f}; - __m128 c7HalfVec = {.097545161f, .097545161f, .097545161f, .097545161f}; - - __m128 halfVec = {.5f, .5f, .5f, .5f}; - - for (int iter = 0; iter < 2; ++iter) - { - // - // Operate on 4 columns at a time. The - // offsets into our row-major array are: - // 0: 0 1 - // 1: 2 3 - // 2: 4 5 - // 3: 6 7 - // 4: 8 9 - // 5: 10 11 - // 6: 12 13 - // 7: 14 15 - // - - for (int pass=0; pass<2; ++pass) - { - a0Vec = _mm_add_ps (srcVec[ 0 + pass], srcVec[14 + pass]); - a1Vec = _mm_add_ps (srcVec[ 2 + pass], srcVec[ 4 + pass]); - a3Vec = _mm_add_ps (srcVec[ 6 + pass], srcVec[ 8 + pass]); - a5Vec = _mm_add_ps (srcVec[10 + pass], srcVec[12 + pass]); - - a7Vec = _mm_sub_ps (srcVec[ 0 + pass], srcVec[14 + pass]); - a2Vec = _mm_sub_ps (srcVec[ 2 + pass], srcVec[ 4 + pass]); - a4Vec = _mm_sub_ps (srcVec[ 6 + pass], srcVec[ 8 + pass]); - a6Vec = _mm_sub_ps (srcVec[10 + pass], srcVec[12 + pass]); - - // - // First stage; Compute out_0 and out_4 - // - - k0Vec = _mm_add_ps (a0Vec, a3Vec); - k1Vec = _mm_add_ps (a1Vec, a5Vec); - - k0Vec = _mm_mul_ps (c4Vec, k0Vec); - k1Vec = _mm_mul_ps (c4Vec, k1Vec); - - srcVec[0 + pass] = _mm_add_ps (k0Vec, k1Vec); - srcVec[8 + pass] = _mm_sub_ps (k0Vec, k1Vec); - - srcVec[0 + pass] = _mm_mul_ps (srcVec[0 + pass], halfVec ); - srcVec[8 + pass] = _mm_mul_ps (srcVec[8 + pass], halfVec ); - - - // - // Second stage; Compute out_2 and out_6 - // - - k0Vec = _mm_sub_ps (a2Vec, a6Vec); - k1Vec = _mm_sub_ps (a0Vec, a3Vec); - - srcVec[ 4 + pass] = _mm_add_ps (_mm_mul_ps (c6HalfVec, k0Vec), - _mm_mul_ps (c2HalfVec, k1Vec)); - - srcVec[12 + pass] = _mm_sub_ps (_mm_mul_ps (c6HalfVec, k1Vec), - _mm_mul_ps (c2HalfVec, k0Vec)); - - // - // Precompute K0 and K1 for the remaining stages - // - - k0Vec = _mm_mul_ps (_mm_sub_ps (a1Vec, a5Vec), c4Vec); - k1Vec = _mm_mul_ps (_mm_add_ps (a2Vec, a6Vec), c4NegVec); - - // - // Third Stage, compute out_3 and out_5 - // - - rotXVec = _mm_sub_ps (a7Vec, k0Vec); - rotYVec = _mm_add_ps (a4Vec, k1Vec); - - srcVec[ 6 + pass] = _mm_sub_ps (_mm_mul_ps (c3HalfVec, rotXVec), - _mm_mul_ps (c5HalfVec, rotYVec)); - - srcVec[10 + pass] = _mm_add_ps (_mm_mul_ps (c5HalfVec, rotXVec), - _mm_mul_ps (c3HalfVec, rotYVec)); - - // - // Fourth Stage, compute out_1 and out_7 - // - - rotXVec = _mm_add_ps (a7Vec, k0Vec); - rotYVec = _mm_sub_ps (k1Vec, a4Vec); - - srcVec[ 2 + pass] = _mm_sub_ps (_mm_mul_ps (c1HalfVec, rotXVec), - _mm_mul_ps (c7HalfVec, rotYVec)); - - srcVec[14 + pass] = _mm_add_ps (_mm_mul_ps (c7HalfVec, rotXVec), - _mm_mul_ps (c1HalfVec, rotYVec)); - } - - // - // Transpose the matrix, in 4x4 blocks. So, if we have our - // 8x8 matrix divied into 4x4 blocks: - // - // M0 | M1 M0t | M2t - // ----+--- --> -----+------ - // M2 | M3 M1t | M3t - // - - // - // M0t, done in place, the first half. - // - - transTmp[0] = _mm_shuffle_ps (srcVec[0], srcVec[2], 0x44); - transTmp[1] = _mm_shuffle_ps (srcVec[4], srcVec[6], 0x44); - transTmp[3] = _mm_shuffle_ps (srcVec[4], srcVec[6], 0xEE); - transTmp[2] = _mm_shuffle_ps (srcVec[0], srcVec[2], 0xEE); - - // - // M3t, also done in place, the first half. - // - - transTmp2[0] = _mm_shuffle_ps (srcVec[ 9], srcVec[11], 0x44); - transTmp2[1] = _mm_shuffle_ps (srcVec[13], srcVec[15], 0x44); - transTmp2[2] = _mm_shuffle_ps (srcVec[ 9], srcVec[11], 0xEE); - transTmp2[3] = _mm_shuffle_ps (srcVec[13], srcVec[15], 0xEE); - - // - // M0t, the second half. - // - - srcVec[0] = _mm_shuffle_ps (transTmp[0], transTmp[1], 0x88); - srcVec[4] = _mm_shuffle_ps (transTmp[2], transTmp[3], 0x88); - srcVec[2] = _mm_shuffle_ps (transTmp[0], transTmp[1], 0xDD); - srcVec[6] = _mm_shuffle_ps (transTmp[2], transTmp[3], 0xDD); - - // - // M3t, the second half. - // - - srcVec[ 9] = _mm_shuffle_ps (transTmp2[0], transTmp2[1], 0x88); - srcVec[13] = _mm_shuffle_ps (transTmp2[2], transTmp2[3], 0x88); - srcVec[11] = _mm_shuffle_ps (transTmp2[0], transTmp2[1], 0xDD); - srcVec[15] = _mm_shuffle_ps (transTmp2[2], transTmp2[3], 0xDD); - - // - // M1 and M2 need to be done at the same time, because we're - // swapping. - // - // First, the first half of M1t - // - - transTmp[0] = _mm_shuffle_ps (srcVec[1], srcVec[3], 0x44); - transTmp[1] = _mm_shuffle_ps (srcVec[5], srcVec[7], 0x44); - transTmp[2] = _mm_shuffle_ps (srcVec[1], srcVec[3], 0xEE); - transTmp[3] = _mm_shuffle_ps (srcVec[5], srcVec[7], 0xEE); - - // - // And the first half of M2t - // - - transTmp2[0] = _mm_shuffle_ps (srcVec[ 8], srcVec[10], 0x44); - transTmp2[1] = _mm_shuffle_ps (srcVec[12], srcVec[14], 0x44); - transTmp2[2] = _mm_shuffle_ps (srcVec[ 8], srcVec[10], 0xEE); - transTmp2[3] = _mm_shuffle_ps (srcVec[12], srcVec[14], 0xEE); - - // - // Second half of M1t - // - - srcVec[ 8] = _mm_shuffle_ps (transTmp[0], transTmp[1], 0x88); - srcVec[12] = _mm_shuffle_ps (transTmp[2], transTmp[3], 0x88); - srcVec[10] = _mm_shuffle_ps (transTmp[0], transTmp[1], 0xDD); - srcVec[14] = _mm_shuffle_ps (transTmp[2], transTmp[3], 0xDD); - - // - // Second half of M2 - // - - srcVec[1] = _mm_shuffle_ps (transTmp2[0], transTmp2[1], 0x88); - srcVec[5] = _mm_shuffle_ps (transTmp2[2], transTmp2[3], 0x88); - srcVec[3] = _mm_shuffle_ps (transTmp2[0], transTmp2[1], 0xDD); - srcVec[7] = _mm_shuffle_ps (transTmp2[2], transTmp2[3], 0xDD); - } -} - -#endif /* IMF_HAVE_SSE2 */ - -} // anonymous namespace - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmap.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmap.cpp deleted file mode 100644 index f962fc9..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmap.cpp +++ /dev/null @@ -1,335 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// Environment maps -// -//----------------------------------------------------------------------------- - -#include "ImfEnvmap.h" -#include "ImathFun.h" -#include "ImfNamespace.h" - -#include -#include - -using namespace std; -using namespace IMATH_NAMESPACE; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -namespace LatLongMap { - -V2f -latLong (const V3f &dir) -{ - float r = sqrt (dir.z * dir.z + dir.x * dir.x); - - float latitude = (r < abs (dir.y))? - acos (r / dir.length()) * sign (dir.y): - asin (dir.y / dir.length()); - - float longitude = (dir.z == 0 && dir.x == 0)? 0: atan2 (dir.x, dir.z); - - return V2f (latitude, longitude); -} - - -V2f -latLong (const Box2i &dataWindow, const V2f &pixelPosition) -{ - float latitude, longitude; - - if (dataWindow.max.y > dataWindow.min.y) - { - latitude = -1 * float(M_PI) * - ((pixelPosition.y - dataWindow.min.y) / - (dataWindow.max.y - dataWindow.min.y) - 0.5f); - } - else - { - latitude = 0; - } - - if (dataWindow.max.x > dataWindow.min.x) - { - longitude = -2 * float(M_PI) * - ((pixelPosition.x - dataWindow.min.x) / - (dataWindow.max.x - dataWindow.min.x) - 0.5f); - } - else - { - longitude = 0; - } - - return V2f (latitude, longitude); -} - - -V2f -pixelPosition (const Box2i &dataWindow, const V2f &latLong) -{ - float x = latLong.y / (-2 * float(M_PI)) + 0.5f; - float y = latLong.x / (-1 * float(M_PI)) + 0.5f; - - return V2f (x * (dataWindow.max.x - dataWindow.min.x) + dataWindow.min.x, - y * (dataWindow.max.y - dataWindow.min.y) + dataWindow.min.y); -} - - -V2f -pixelPosition (const Box2i &dataWindow, const V3f &direction) -{ - return pixelPosition (dataWindow, latLong (direction)); -} - - -V3f -direction (const Box2i &dataWindow, const V2f &pixelPosition) -{ - V2f ll = latLong (dataWindow, pixelPosition); - - return V3f (sin (ll.y) * cos (ll.x), - sin (ll.x), - cos (ll.y) * cos (ll.x)); -} - -} // namespace LatLongMap - - -namespace CubeMap { - -int -sizeOfFace (const Box2i &dataWindow) -{ - return min ((dataWindow.max.x - dataWindow.min.x + 1), - (dataWindow.max.y - dataWindow.min.y + 1) / 6); -} - - -Box2i -dataWindowForFace (CubeMapFace face, const Box2i &dataWindow) -{ - int sof = sizeOfFace (dataWindow); - Box2i dwf; - - dwf.min.x = 0; - dwf.min.y = int (face) * sof; - - dwf.max.x = dwf.min.x + sof - 1; - dwf.max.y = dwf.min.y + sof - 1; - - return dwf; -} - - -V2f -pixelPosition (CubeMapFace face, const Box2i &dataWindow, V2f positionInFace) -{ - Box2i dwf = dataWindowForFace (face, dataWindow); - V2f pos (0, 0); - - switch (face) - { - case CUBEFACE_POS_X: - - pos.x = dwf.min.x + positionInFace.y; - pos.y = dwf.max.y - positionInFace.x; - break; - - case CUBEFACE_NEG_X: - - pos.x = dwf.max.x - positionInFace.y; - pos.y = dwf.max.y - positionInFace.x; - break; - - case CUBEFACE_POS_Y: - - pos.x = dwf.min.x + positionInFace.x; - pos.y = dwf.max.y - positionInFace.y; - break; - - case CUBEFACE_NEG_Y: - - pos.x = dwf.min.x + positionInFace.x; - pos.y = dwf.min.y + positionInFace.y; - break; - - case CUBEFACE_POS_Z: - - pos.x = dwf.max.x - positionInFace.x; - pos.y = dwf.max.y - positionInFace.y; - break; - - case CUBEFACE_NEG_Z: - - pos.x = dwf.min.x + positionInFace.x; - pos.y = dwf.max.y - positionInFace.y; - break; - } - - return pos; -} - - -void -faceAndPixelPosition (const V3f &direction, - const Box2i &dataWindow, - CubeMapFace &face, - V2f &pif) -{ - int sof = sizeOfFace (dataWindow); - float absx = abs (direction.x); - float absy = abs (direction.y); - float absz = abs (direction.z); - - if (absx >= absy && absx >= absz) - { - if (absx == 0) - { - // - // Special case - direction is (0, 0, 0) - // - - face = CUBEFACE_POS_X; - pif = V2f (0, 0); - return; - } - - pif.x = (direction.y / absx + 1) / 2 * (sof - 1); - pif.y = (direction.z / absx + 1) / 2 * (sof - 1); - - if (direction.x > 0) - face = CUBEFACE_POS_X; - else - face = CUBEFACE_NEG_X; - } - else if (absy >= absz) - { - pif.x = (direction.x / absy + 1) / 2 * (sof - 1); - pif.y = (direction.z / absy + 1) / 2 * (sof - 1); - - if (direction.y > 0) - face = CUBEFACE_POS_Y; - else - face = CUBEFACE_NEG_Y; - } - else - { - pif.x = (direction.x / absz + 1) / 2 * (sof - 1); - pif.y = (direction.y / absz + 1) / 2 * (sof - 1); - - if (direction.z > 0) - face = CUBEFACE_POS_Z; - else - face = CUBEFACE_NEG_Z; - } -} - - -V3f -direction (CubeMapFace face, const Box2i &dataWindow, const V2f &positionInFace) -{ - int sof = sizeOfFace (dataWindow); - - V2f pos; - - if (sof > 1) - { - pos = V2f (positionInFace.x / (sof - 1) * 2 - 1, - positionInFace.y / (sof - 1) * 2 - 1); - } - else - { - pos = V2f (0, 0); - } - - V3f dir (1, 0, 0); - - switch (face) - { - case CUBEFACE_POS_X: - - dir.x = 1; - dir.y = pos.x; - dir.z = pos.y; - break; - - case CUBEFACE_NEG_X: - - dir.x = -1; - dir.y = pos.x; - dir.z = pos.y; - break; - - case CUBEFACE_POS_Y: - - dir.x = pos.x; - dir.y = 1; - dir.z = pos.y; - break; - - case CUBEFACE_NEG_Y: - - dir.x = pos.x; - dir.y = -1; - dir.z = pos.y; - break; - - case CUBEFACE_POS_Z: - - dir.x = pos.x; - dir.y = pos.y; - dir.z = 1; - break; - - case CUBEFACE_NEG_Z: - - dir.x = pos.x; - dir.y = pos.y; - dir.z = -1; - break; - } - - return dir; -} - -} // namespace CubeMap - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmap.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmap.h deleted file mode 100644 index 16e4ee3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmap.h +++ /dev/null @@ -1,336 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_ENVMAP_H -#define INCLUDED_IMF_ENVMAP_H - -//----------------------------------------------------------------------------- -// -// Environment maps -// -// Environment maps define a mapping from 3D directions to 2D -// pixel space locations. Environment maps are typically used -// in 3D rendering, for effects such as quickly approximating -// how shiny surfaces reflect their environment. -// -// Environment maps can be stored in scanline-based or in tiled -// OpenEXR files. The fact that an image is an environment map -// is indicated by the presence of an EnvmapAttribute whose name -// is "envmap". (Convenience functions to access this attribute -// are defined in header file ImfStandardAttributes.h.) -// The attribute's value defines the mapping from 3D directions -// to 2D pixel space locations. -// -// This header file defines the set of possible EnvmapAttribute -// values. -// -// For each possible EnvmapAttribute value, this header file also -// defines a set of convienience functions to convert between 3D -// directions and 2D pixel locations. -// -// Most of the convenience functions defined below require a -// dataWindow parameter. For scanline-based images, and for -// tiled images with level mode ONE_LEVEL, the dataWindow -// parameter should be set to the image's data window, as -// defined in the image header. For tiled images with level -// mode MIPMAP_LEVELS or RIPMAP_LEVELS, the data window of the -// image level that is being accessed should be used instead. -// (See the dataWindowForLevel() methods in ImfTiledInputFile.h -// and ImfTiledOutputFile.h.) -// -//----------------------------------------------------------------------------- - -#include "ImathBox.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -//-------------------------------- -// Supported environment map types -//-------------------------------- - -enum Envmap -{ - ENVMAP_LATLONG = 0, // Latitude-longitude environment map - ENVMAP_CUBE = 1, // Cube map - - NUM_ENVMAPTYPES // Number of different environment map types -}; - - -//------------------------------------------------------------------------- -// Latitude-Longitude Map: -// -// The environment is projected onto the image using polar coordinates -// (latitude and longitude). A pixel's x coordinate corresponds to -// its longitude, and the y coordinate corresponds to its latitude. -// Pixel (dataWindow.min.x, dataWindow.min.y) has latitude +pi/2 and -// longitude +pi; pixel (dataWindow.max.x, dataWindow.max.y) has -// latitude -pi/2 and longitude -pi. -// -// In 3D space, latitudes -pi/2 and +pi/2 correspond to the negative and -// positive y direction. Latitude 0, longitude 0 points into positive -// z direction; and latitude 0, longitude pi/2 points into positive x -// direction. -// -// The size of the data window should be 2*N by N pixels (width by height), -// where N can be any integer greater than 0. -//------------------------------------------------------------------------- - -namespace LatLongMap -{ - //---------------------------------------------------- - // Convert a 3D direction to a 2D vector whose x and y - // components represent the corresponding latitude - // and longitude. - //---------------------------------------------------- - - IMF_EXPORT - IMATH_NAMESPACE::V2f latLong (const IMATH_NAMESPACE::V3f &direction); - - - //-------------------------------------------------------- - // Convert the position of a pixel to a 2D vector whose - // x and y components represent the corresponding latitude - // and longitude. - //-------------------------------------------------------- - - IMF_EXPORT - IMATH_NAMESPACE::V2f latLong (const IMATH_NAMESPACE::Box2i &dataWindow, - const IMATH_NAMESPACE::V2f &pixelPosition); - - - //------------------------------------------------------------- - // Convert a 2D vector, whose x and y components represent - // longitude and latitude, into a corresponding pixel position. - //------------------------------------------------------------- - - IMF_EXPORT - IMATH_NAMESPACE::V2f pixelPosition (const IMATH_NAMESPACE::Box2i &dataWindow, - const IMATH_NAMESPACE::V2f &latLong); - - - //----------------------------------------------------- - // Convert a 3D direction vector into a corresponding - // pixel position. pixelPosition(dw,dir) is equivalent - // to pixelPosition(dw,latLong(dw,dir)). - //----------------------------------------------------- - - IMF_EXPORT - IMATH_NAMESPACE::V2f pixelPosition (const IMATH_NAMESPACE::Box2i &dataWindow, - const IMATH_NAMESPACE::V3f &direction); - - - //-------------------------------------------------------- - // Convert the position of a pixel in a latitude-longitude - // map into a corresponding 3D direction. - //-------------------------------------------------------- - - IMF_EXPORT - IMATH_NAMESPACE::V3f direction (const IMATH_NAMESPACE::Box2i &dataWindow, - const IMATH_NAMESPACE::V2f &pixelPosition); -} - - -//-------------------------------------------------------------- -// Cube Map: -// -// The environment is projected onto the six faces of an -// axis-aligned cube. The cube's faces are then arranged -// in a 2D image as shown below. -// -// 2-----------3 -// / /| -// / / | Y -// / / | | -// 6-----------7 | | -// | | | | -// | | | | -// | 0 | 1 *------- X -// | | / / -// | | / / -// | |/ / -// 4-----------5 Z -// -// dataWindow.min -// / -// / -// +-----------+ -// |3 Y 7| -// | | | -// | | | -// | ---+---Z | +X face -// | | | -// | | | -// |1 5| -// +-----------+ -// |6 Y 2| -// | | | -// | | | -// | Z---+--- | -X face -// | | | -// | | | -// |4 0| -// +-----------+ -// |6 Z 7| -// | | | -// | | | -// | ---+---X | +Y face -// | | | -// | | | -// |2 3| -// +-----------+ -// |0 1| -// | | | -// | | | -// | ---+---X | -Y face -// | | | -// | | | -// |4 Z 5| -// +-----------+ -// |7 Y 6| -// | | | -// | | | -// | X---+--- | +Z face -// | | | -// | | | -// |5 4| -// +-----------+ -// |2 Y 3| -// | | | -// | | | -// | ---+---X | -Z face -// | | | -// | | | -// |0 1| -// +-----------+ -// / -// / -// dataWindow.max -// -// The size of the data window should be N by 6*N pixels -// (width by height), where N can be any integer greater -// than 0. -// -//-------------------------------------------------------------- - -//------------------------------------ -// Names for the six faces of the cube -//------------------------------------ - -enum CubeMapFace -{ - CUBEFACE_POS_X, // +X face - CUBEFACE_NEG_X, // -X face - CUBEFACE_POS_Y, // +Y face - CUBEFACE_NEG_Y, // -Y face - CUBEFACE_POS_Z, // +Z face - CUBEFACE_NEG_Z // -Z face -}; - -namespace CubeMap -{ - //--------------------------------------------- - // Width and height of a cube's face, in pixels - //--------------------------------------------- - - IMF_EXPORT - int sizeOfFace (const IMATH_NAMESPACE::Box2i &dataWindow); - - - //------------------------------------------ - // Compute the region in the environment map - // that is covered by the specified face. - //------------------------------------------ - - IMF_EXPORT - IMATH_NAMESPACE::Box2i dataWindowForFace (CubeMapFace face, - const IMATH_NAMESPACE::Box2i &dataWindow); - - - //---------------------------------------------------- - // Convert the coordinates of a pixel within a face - // [in the range from (0,0) to (s-1,s-1), where - // s == sizeOfFace(dataWindow)] to pixel coordinates - // in the environment map. - //---------------------------------------------------- - - IMF_EXPORT - IMATH_NAMESPACE::V2f pixelPosition (CubeMapFace face, - const IMATH_NAMESPACE::Box2i &dataWindow, - IMATH_NAMESPACE::V2f positionInFace); - - - //-------------------------------------------------------------- - // Convert a 3D direction into a cube face, and a pixel position - // within that face. - // - // If you have a 3D direction, dir, the following code fragment - // finds the position, pos, of the corresponding pixel in an - // environment map with data window dw: - // - // CubeMapFace f; - // V2f pif, pos; - // - // faceAndPixelPosition (dir, dw, f, pif); - // pos = pixelPosition (f, dw, pif); - // - //-------------------------------------------------------------- - - IMF_EXPORT - void faceAndPixelPosition (const IMATH_NAMESPACE::V3f &direction, - const IMATH_NAMESPACE::Box2i &dataWindow, - CubeMapFace &face, - IMATH_NAMESPACE::V2f &positionInFace); - - - // -------------------------------------------------------- - // Given a cube face and a pixel position within that face, - // compute the corresponding 3D direction. - // -------------------------------------------------------- - - IMF_EXPORT - IMATH_NAMESPACE::V3f direction (CubeMapFace face, - const IMATH_NAMESPACE::Box2i &dataWindow, - const IMATH_NAMESPACE::V2f &positionInFace); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp deleted file mode 100644 index b6f88c2..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class EnvmapAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -EnvmapAttribute::staticTypeName () -{ - return "envmap"; -} - - -template <> -void -EnvmapAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - unsigned char tmp = _value; - Xdr::write (os, tmp); -} - - -template <> -void -EnvmapAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - unsigned char tmp; - Xdr::read (is, tmp); - _value = Envmap (tmp); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h deleted file mode 100644 index 0d0129b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_ENVMAP_ATTRIBUTE_H -#define INCLUDED_IMF_ENVMAP_ATTRIBUTE_H - - -//----------------------------------------------------------------------------- -// -// class EnvmapAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfEnvmap.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute EnvmapAttribute; - -template <> IMF_EXPORT const char *EnvmapAttribute::staticTypeName (); - -template <> IMF_EXPORT -void EnvmapAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; - -template <> IMF_EXPORT -void EnvmapAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, - int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfExport.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfExport.h deleted file mode 100644 index 6563fd5..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfExport.h +++ /dev/null @@ -1,46 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#if defined(OPENEXR_DLL) - #if defined(ILMIMF_EXPORTS) - #define IMF_EXPORT __declspec(dllexport) - #define IMF_EXPORT_CONST extern __declspec(dllexport) - #else - #define IMF_EXPORT __declspec(dllimport) - #define IMF_EXPORT_CONST extern __declspec(dllimport) - #endif -#else - #define IMF_EXPORT - #define IMF_EXPORT_CONST extern const -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFastHuf.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFastHuf.cpp deleted file mode 100644 index 86c84dc..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFastHuf.cpp +++ /dev/null @@ -1,768 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2009-2014 DreamWorks Animation LLC. -// -// 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 DreamWorks Animation nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfFastHuf.h" -#include - -#include -#include -#include -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -// -// Adapted from hufUnpackEncTable - -// We don't need to reconstruct the code book, just the encoded -// lengths for each symbol. From the lengths, we can build the -// base + offset tables. This should be a bit more efficient -// for sparse code books. -// -// table - ptr to the start of the code length data. Will be -// updated as we decode data -// -// numBytes - size of the encoded table (I think)? -// -// minSymbol - smallest symbol in the code book -// -// maxSymbol - largest symbol in the code book. -// -// rleSymbol - the symbol to trigger RLE in the encoded bitstream -// - -FastHufDecoder::FastHufDecoder - (const char *&table, - int numBytes, - int minSymbol, - int maxSymbol, - int rleSymbol) -: - _rleSymbol (rleSymbol), - _numSymbols (0), - _minCodeLength (255), - _maxCodeLength (0), - _idToSymbol (0) -{ - // - // List of symbols that we find with non-zero code lengths - // (listed in the order we find them). Store these in the - // same format as the code book stores codes + lengths - - // low 6 bits are the length, everything above that is - // the symbol. - // - - std::vector symbols; - - // - // The 'base' table is the minimum code at each code length. base[i] - // is the smallest code (numerically) of length i. - // - - Int64 base[MAX_CODE_LEN + 1]; - - // - // The 'offset' table is the position (in sorted order) of the first id - // of a given code lenght. Array is indexed by code length, like base. - // - - Int64 offset[MAX_CODE_LEN + 1]; - - // - // Count of how many codes at each length there are. Array is - // indexed by code length, like base and offset. - // - - size_t codeCount[MAX_CODE_LEN + 1]; - - for (int i = 0; i <= MAX_CODE_LEN; ++i) - { - codeCount[i] = 0; - base[i] = 0xffffffffffffffffL; - offset[i] = 0; - } - - // - // Count the number of codes, the min/max code lengths, the number of - // codes with each length, and record symbols with non-zero code - // length as we find them. - // - - const char *currByte = table; - Int64 currBits = 0; - int currBitCount = 0; - - const int SHORT_ZEROCODE_RUN = 59; - const int LONG_ZEROCODE_RUN = 63; - const int SHORTEST_LONG_RUN = 2 + LONG_ZEROCODE_RUN - SHORT_ZEROCODE_RUN; - - for (Int64 symbol = minSymbol; symbol <= maxSymbol; symbol++) - { - if (currByte - table > numBytes) - { - throw Iex::InputExc ("Error decoding Huffman table " - "(Truncated table data)."); - } - - // - // Next code length - either: - // 0-58 (literal code length) - // 59-62 (various lengths runs of 0) - // 63 (run of n 0's, with n is the next 8 bits) - // - - Int64 codeLen = readBits (6, currBits, currBitCount, currByte); - - if (codeLen == (Int64) LONG_ZEROCODE_RUN) - { - if (currByte - table > numBytes) - { - throw Iex::InputExc ("Error decoding Huffman table " - "(Truncated table data)."); - } - - int runLen = readBits (8, currBits, currBitCount, currByte) + - SHORTEST_LONG_RUN; - - if (symbol + runLen > maxSymbol + 1) - { - throw Iex::InputExc ("Error decoding Huffman table " - "(Run beyond end of table)."); - } - - symbol += runLen - 1; - - } - else if (codeLen >= (Int64) SHORT_ZEROCODE_RUN) - { - int runLen = codeLen - SHORT_ZEROCODE_RUN + 2; - - if (symbol + runLen > maxSymbol + 1) - { - throw Iex::InputExc ("Error decoding Huffman table " - "(Run beyond end of table)."); - } - - symbol += runLen - 1; - - } - else if (codeLen != 0) - { - symbols.push_back ((symbol << 6) | (codeLen & 63)); - - if (codeLen < _minCodeLength) - _minCodeLength = codeLen; - - if (codeLen > _maxCodeLength) - _maxCodeLength = codeLen; - - codeCount[codeLen]++; - } - } - - for (int i = 0; i < MAX_CODE_LEN; ++i) - _numSymbols += codeCount[i]; - - table = currByte; - - // - // Compute base - once we have the code length counts, there - // is a closed form solution for this - // - - { - double* countTmp = new double[_maxCodeLength+1]; - - for (int l = _minCodeLength; l <= _maxCodeLength; ++l) - { - countTmp[l] = (double)codeCount[l] * - (double)(2 << (_maxCodeLength-l)); - } - - for (int l = _minCodeLength; l <= _maxCodeLength; ++l) - { - double tmp = 0; - - for (int k =l + 1; k <= _maxCodeLength; ++k) - tmp += countTmp[k]; - - tmp /= (double)(2 << (_maxCodeLength - l)); - - base[l] = (Int64)ceil (tmp); - } - - delete [] countTmp; - } - - // - // Compute offset - these are the positions of the first - // id (not symbol) that has length [i] - // - - offset[_maxCodeLength] = 0; - - for (int i= _maxCodeLength - 1; i >= _minCodeLength; i--) - offset[i] = offset[i + 1] + codeCount[i + 1]; - - // - // Allocate and fill the symbol-to-id mapping. Smaller Ids should be - // mapped to less-frequent symbols (which have longer codes). Use - // the offset table to tell us where the id's for a given code - // length start off. - // - - _idToSymbol = new int[_numSymbols]; - - Int64 mapping[MAX_CODE_LEN + 1]; - for (int i = 0; i < MAX_CODE_LEN + 1; ++i) - mapping[i] = -1; - for (int i = _minCodeLength; i <= _maxCodeLength; ++i) - mapping[i] = offset[i]; - - for (std::vector::const_iterator i = symbols.begin(); - i != symbols.end(); - ++i) - { - int codeLen = *i & 63; - int symbol = *i >> 6; - - if (mapping[codeLen] >= _numSymbols) - throw Iex::InputExc ("Huffman decode error " - "(Invalid symbol in header)."); - - _idToSymbol[mapping[codeLen]] = symbol; - mapping[codeLen]++; - } - - buildTables(base, offset); -} - - -FastHufDecoder::~FastHufDecoder() -{ - delete[] _idToSymbol; -} - - -// -// Static check if the decoder is enabled. -// -// ATM, I only have access to little endian hardware for testing, -// so I'm not entirely sure that we are reading fom the bit stream -// properly on BE. -// -// If you happen to have more obscure hardware, check that the -// byte swapping in refill() is happening sensable, add an endian -// check if needed, and fix the preprocessor magic here. -// - -#define READ64(c) \ - ((Int64)(c)[0] << 56) | ((Int64)(c)[1] << 48) | ((Int64)(c)[2] << 40) | \ - ((Int64)(c)[3] << 32) | ((Int64)(c)[4] << 24) | ((Int64)(c)[5] << 16) | \ - ((Int64)(c)[6] << 8) | ((Int64)(c)[7] ) - -#ifdef __INTEL_COMPILER // ICC built-in swap for LE hosts - #if defined (__i386__) || defined(__x86_64__) - #undef READ64 - #define READ64(c) _bswap64 (*(const Int64*)(c)) - #endif -#endif - - -bool -FastHufDecoder::enabled() -{ - #if defined(__INTEL_COMPILER) || defined(__GNUC__) - - // - // Enabled for ICC, GCC: - // __i386__ -> x86 - // __x86_64__ -> 64-bit x86 - // - - #if defined (__i386__) || defined(__x86_64__) - return true; - #else - return false; - #endif - - #elif defined (_MSC_VER) - - // - // Enabled for Visual Studio: - // _M_IX86 -> x86 - // _M_X64 -> 64bit x86 - - #if defined (_M_IX86) || defined(_M_X64) - return true; - #else - return false; - #endif - - #else - - // - // Unknown compiler - Be safe and disable. - // - return false; - #endif -} - -// -// -// Built the acceleration tables for lookups on the upper bits -// as well as the 'LJ' tables. -// - -void -FastHufDecoder::buildTables (Int64 *base, Int64 *offset) -{ - // - // Build the 'left justified' base table, by shifting base left.. - // - - for (int i = 0; i <= MAX_CODE_LEN; ++i) - { - if (base[i] != 0xffffffffffffffffL) - { - _ljBase[i] = base[i] << (64 - i); - } - else - { - // - // Unused code length - insert dummy values - // - - _ljBase[i] = 0xffffffffffffffffL; - } - } - - // - // Combine some terms into a big fat constant, which for - // lack of a better term we'll call the 'left justified' - // offset table (because it serves the same function - // as 'offset', when using the left justified base table. - // - - for (int i = 0; i <= MAX_CODE_LEN; ++i) - _ljOffset[i] = offset[i] - (_ljBase[i] >> (64 - i)); - - // - // Build the acceleration tables for the lookups of - // short codes ( <= TABLE_LOOKUP_BITS long) - // - - for (Int64 i = 0; i < 1 << TABLE_LOOKUP_BITS; ++i) - { - Int64 value = i << (64 - TABLE_LOOKUP_BITS); - - _tableSymbol[i] = 0xffff; - _tableCodeLen[i] = 0; - - for (int codeLen = _minCodeLength; codeLen <= _maxCodeLength; ++codeLen) - { - if (_ljBase[codeLen] <= value) - { - _tableCodeLen[i] = codeLen; - - Int64 id = _ljOffset[codeLen] + (value >> (64 - codeLen)); - if (id < _numSymbols) - { - _tableSymbol[i] = _idToSymbol[id]; - } - else - { - throw Iex::InputExc ("Huffman decode error " - "(Overrun)."); - } - break; - } - } - } - - // - // Store the smallest value in the table that points to real data. - // This should be the entry for the largest length that has - // valid data (in our case, non-dummy _ljBase) - // - - int minIdx = TABLE_LOOKUP_BITS; - - while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffL) - minIdx--; - - if (minIdx < 0) - { - // - // Error, no codes with lengths 0-TABLE_LOOKUP_BITS used. - // Set the min value such that the table is never tested. - // - - _tableMin = 0xffffffffffffffffL; - } - else - { - _tableMin = _ljBase[minIdx]; - } -} - - -// -// For decoding, we're holding onto 2 Int64's. -// -// The first (buffer), holds the next bits from the bitstream to be -// decoded. For certain paths in the decoder, we only need TABLE_LOOKUP_BITS -// valid bits to decode the next symbol. For other paths, we need a full -// 64-bits to decode a symbol. -// -// When we need to refill 'buffer', we could pull bits straight from -// the bitstream. But this is very slow and requires lots of book keeping -// (what's the next bit in the next byte?). Instead, we keep another Int64 -// around that we use to refill from. While this doesn't cut down on the -// book keeping (still need to know how many valid bits), it does cut -// down on some of the bit shifting crazy and byte access. -// -// The refill Int64 (bufferBack) gets left-shifted after we've pulled -// off bits. If we run out of bits in the input bit stream, we just -// shift in 0's to bufferBack. -// -// The refill act takes numBits from the top of bufferBack and sticks -// them in the bottom of buffer. If there arn't enough bits in bufferBack, -// it gets refilled (to 64-bits) from the input bitstream. -// - -inline void -FastHufDecoder::refill - (Int64 &buffer, - int numBits, // number of bits to refill - Int64 &bufferBack, // the next 64-bits, to refill from - int &bufferBackNumBits, // number of bits left in bufferBack - const unsigned char *&currByte, // current byte in the bitstream - int &currBitsLeft) // number of bits left in the bitsream -{ - // - // Refill bits into the bottom of buffer, from the top of bufferBack. - // Always top up buffer to be completely full. - // - - buffer |= bufferBack >> (64 - numBits); - - if (bufferBackNumBits < numBits) - { - numBits -= bufferBackNumBits; - - // - // Refill all of bufferBack from the bitstream. Either grab - // a full 64-bit chunk, or whatever bytes are left. If we - // don't have 64-bits left, pad with 0's. - // - - if (currBitsLeft >= 64) - { - bufferBack = READ64 (currByte); - bufferBackNumBits = 64; - currByte += sizeof (Int64); - currBitsLeft -= 8 * sizeof (Int64); - - } - else - { - bufferBack = 0; - bufferBackNumBits = 64; - - Int64 shift = 56; - - while (currBitsLeft > 0) - { - bufferBack |= ((Int64)(*currByte)) << shift; - - currByte++; - shift -= 8; - currBitsLeft -= 8; - } - - // - // At this point, currBitsLeft might be negative, just because - // we're subtracting whole bytes. To keep anyone from freaking - // out, zero the counter. - // - - if (currBitsLeft < 0) - currBitsLeft = 0; - } - - buffer |= bufferBack >> (64 - numBits); - } - - bufferBack = bufferBack << numBits; - bufferBackNumBits -= numBits; - - // - // We can have cases where the previous shift of bufferBack is << 64 - - // in which case no shift occurs. The bit count math still works though, - // so if we don't have any bits left, zero out bufferBack. - // - - if (bufferBackNumBits == 0) - bufferBack = 0; -} - -// -// Read the next few bits out of a bitstream. Will be given a backing buffer -// (buffer) that may still have data left over from previous reads -// (bufferNumBits). Bitstream pointer (currByte) will be advanced when needed. -// - -inline Int64 -FastHufDecoder::readBits - (int numBits, - Int64 &buffer, // c - int &bufferNumBits, // lc - const char *&currByte) // in -{ - while (bufferNumBits < numBits) - { - buffer = (buffer << 8) | *(unsigned char*)(currByte++); - bufferNumBits += 8; - } - - bufferNumBits -= numBits; - return (buffer >> bufferNumBits) & ((1 << numBits) - 1); -} - - -// -// Decode using a the 'One-Shift' strategy for decoding, with a -// small-ish table to accelerate decoding of short codes. -// -// If possible, try looking up codes into the acceleration table. -// This has a few benifits - there's no search involved; We don't -// need an additional lookup to map id to symbol; we don't need -// a full 64-bits (so less refilling). -// - -void -FastHufDecoder::decode - (const unsigned char *src, - int numSrcBits, - unsigned short *dst, - int numDstElems) -{ - if (numSrcBits < 128) - throw Iex::InputExc ("Error choosing Huffman decoder implementation " - "(insufficient number of bits)."); - - // - // Current position (byte/bit) in the src data stream - // (after the first buffer fill) - // - - const unsigned char *currByte = src + 2 * sizeof (Int64); - - numSrcBits -= 8 * 2 * sizeof (Int64); - - // - // 64-bit buffer holding the current bits in the stream - // - - Int64 buffer = READ64 (src); - int bufferNumBits = 64; - - // - // 64-bit buffer holding the next bits in the stream - // - - Int64 bufferBack = READ64 ((src + sizeof (Int64))); - int bufferBackNumBits = 64; - - int dstIdx = 0; - - while (dstIdx < numDstElems) - { - int codeLen; - int symbol; - - // - // Test if we can be table accelerated. If so, directly - // lookup the output symbol. Otherwise, we need to fall - // back to searching for the code. - // - // If we're doing table lookups, we don't really need - // a re-filled buffer, so long as we have TABLE_LOOKUP_BITS - // left. But for a search, we do need a refilled table. - // - - if (_tableMin <= buffer) - { - int tableIdx = buffer >> (64 - TABLE_LOOKUP_BITS); - - // - // For invalid codes, _tableCodeLen[] should return 0. This - // will cause the decoder to get stuck in the current spot - // until we run out of elements, then barf that the codestream - // is bad. So we don't need to stick a condition like - // if (codeLen > _maxCodeLength) in this inner. - // - - codeLen = _tableCodeLen[tableIdx]; - symbol = _tableSymbol[tableIdx]; - } - else - { - if (bufferNumBits < 64) - { - refill (buffer, - 64 - bufferNumBits, - bufferBack, - bufferBackNumBits, - currByte, - numSrcBits); - - bufferNumBits = 64; - } - - // - // Brute force search: - // Find the smallest length where _ljBase[length] <= buffer - // - - codeLen = TABLE_LOOKUP_BITS + 1; - - while (_ljBase[codeLen] > buffer && codeLen <= _maxCodeLength) - codeLen++; - - if (codeLen > _maxCodeLength) - { - throw Iex::InputExc ("Huffman decode error " - "(Decoded an invalid symbol)."); - } - - Int64 id = _ljOffset[codeLen] + (buffer >> (64 - codeLen)); - if (id < _numSymbols) - { - symbol = _idToSymbol[id]; - } - else - { - throw Iex::InputExc ("Huffman decode error " - "(Decoded an invalid symbol)."); - } - } - - // - // Shift over bit stream, and update the bit count in the buffer - // - - buffer = buffer << codeLen; - bufferNumBits -= codeLen; - - // - // If we recieved a RLE symbol (_rleSymbol), then we need - // to read ahead 8 bits to know how many times to repeat - // the previous symbol. Need to ensure we at least have - // 8 bits of data in the buffer - // - - if (symbol == _rleSymbol) - { - if (bufferNumBits < 8) - { - refill (buffer, - 64 - bufferNumBits, - bufferBack, - bufferBackNumBits, - currByte, - numSrcBits); - - bufferNumBits = 64; - } - - int rleCount = buffer >> 56; - - if (dstIdx < 1) - { - throw Iex::InputExc ("Huffman decode error (RLE code " - "with no previous symbol)."); - } - - if (dstIdx + rleCount > numDstElems) - { - throw Iex::InputExc ("Huffman decode error (Symbol run " - "beyond expected output buffer length)."); - } - - if (rleCount <= 0) - { - throw Iex::InputExc("Huffman decode error" - " (Invalid RLE length)"); - } - - for (int i = 0; i < rleCount; ++i) - dst[dstIdx + i] = dst[dstIdx - 1]; - - dstIdx += rleCount; - - buffer = buffer << 8; - bufferNumBits -= 8; - } - else - { - dst[dstIdx] = symbol; - dstIdx++; - } - - // - // refill bit stream buffer if we're below the number of - // bits needed for a table lookup - // - - if (bufferNumBits < TABLE_LOOKUP_BITS) - { - refill (buffer, - 64 - bufferNumBits, - bufferBack, - bufferBackNumBits, - currByte, - numSrcBits); - - bufferNumBits = 64; - } - } - - if (numSrcBits != 0) - { - throw Iex::InputExc ("Huffman decode error (Compressed data remains " - "after filling expected output buffer)."); - } -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFastHuf.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFastHuf.h deleted file mode 100644 index ce7fd3f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFastHuf.h +++ /dev/null @@ -1,148 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2009-2014 DreamWorks Animation LLC. -// -// 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 DreamWorks Animation nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_FAST_HUF_H -#define INCLUDED_IMF_FAST_HUF_H - -#include "ImfInt64.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -// -// Alternative Canonical Huffman decoder: -// -// Canonical Huffman decoder based on 'On the Implementation of Minimum -// Redundancy Prefix Codes' by Moffat and Turpin - highly recommended -// reading as a good description of the problem space, as well as -// a fast decoding algorithm. -// -// The premise is that instead of working directly with the coded -// symbols, we create a new ordering based on the frequency of symbols. -// Less frequent symbols (and thus longer codes) are ordered earler. -// We're calling the values in this ordering 'Ids', as oppsed to -// 'Symbols' - which are the short values we eventually want decoded. -// -// With this new ordering, a few small tables can be derived ('base' -// and 'offset') which drive the decoding. To cut down on the -// linear scanning of these tables, you can add a small table -// to directly look up short codes (as you might in a traditional -// lookup-table driven decoder). -// -// The decoder is meant to be compatible with the encoder (and decoder) -// in ImfHuf.cpp, just faster. For ease of implementation, this decoder -// should only be used on compressed bitstreams >= 128 bits long. -// - -class FastHufDecoder -{ - public: - - // - // Longest compressed code length that ImfHuf supports (58 bits) - // - - static const int MAX_CODE_LEN = 58; - - // - // Number of bits in our acceleration table. Should match all - // codes up to TABLE_LOOKUP_BITS in length. - // - - static const int TABLE_LOOKUP_BITS = 12; - - FastHufDecoder (const char*& table, - int numBytes, - int minSymbol, - int maxSymbol, - int rleSymbol); - - ~FastHufDecoder (); - - static bool enabled (); - - void decode (const unsigned char *src, - int numSrcBits, - unsigned short *dst, - int numDstElems); - - private: - - void buildTables (Int64*, Int64*); - void refill (Int64&, int, Int64&, int&, const unsigned char *&, int&); - Int64 readBits (int, Int64&, int&, const char *&); - - int _rleSymbol; // RLE symbol written by the encoder. - // This could be 65536, so beware - // when you use shorts to hold things. - - int _numSymbols; // Number of symbols in the codebook. - - unsigned char _minCodeLength; // Minimum code length, in bits. - unsigned char _maxCodeLength; // Maximum code length, in bits. - - int *_idToSymbol; // Maps Ids to symbols. Ids are a symbol - // ordering sorted first in terms of - // code length, and by code within - // the same length. Ids run from 0 - // to mNumSymbols-1. - - Int64 _ljBase[MAX_CODE_LEN + 1]; // the 'left justified base' table. - // Takes base[i] (i = code length) - // and 'left justifies' it into an Int64 - - Int64 _ljOffset[MAX_CODE_LEN +1 ]; // There are some other terms that can - // be folded into constants when taking - // the 'left justified' decode path. This - // holds those constants, indexed by - // code length - - // - // We can accelerate the 'left justified' processing by running the - // top TABLE_LOOKUP_BITS through a LUT, to find the symbol and code - // length. These are those acceleration tables. - // - // Even though our evental 'symbols' are ushort's, the encoder adds - // a symbol to indicate RLE. So with a dense code book, we could - // have 2^16+1 codes, so both mIdToSymbol and mTableSymbol need - // to be bigger than 16 bits. - // - - int _tableSymbol[1 << TABLE_LOOKUP_BITS]; - unsigned char _tableCodeLen[1 << TABLE_LOOKUP_BITS]; - Int64 _tableMin; -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp deleted file mode 100644 index 4e22e90..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class FloatAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -template <> -const char * -FloatAttribute::staticTypeName () -{ - return "float"; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatAttribute.h deleted file mode 100644 index 7370721..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatAttribute.h +++ /dev/null @@ -1,58 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_FLOAT_ATTRIBUTE_H -#define INCLUDED_IMF_FLOAT_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class FloatAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute FloatAttribute; -template <> IMF_EXPORT const char *FloatAttribute::staticTypeName (); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.cpp deleted file mode 100644 index 49eda90..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2013, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class FloatVectorAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - - -template <> -const char * -FloatVectorAttribute::staticTypeName () -{ - return "floatvector"; -} - - -template <> -void -FloatVectorAttribute::writeValueTo - (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - int n = _value.size(); - - for (int i = 0; i < n; ++i) - Xdr::write (os, _value[i]); -} - - -template <> -void -FloatVectorAttribute::readValueFrom - (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - int n = size / Xdr::size(); - _value.resize (n); - - for (int i = 0; i < n; ++i) - Xdr::read (is, _value[i]); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.h deleted file mode 100644 index 66e7642..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.h +++ /dev/null @@ -1,76 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2007, Weta Digital Ltd -// -// 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 Weta Digital nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_FLOATVECTOR_ATTRIBUTE_H -#define INCLUDED_IMF_FLOATVECTOR_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class FloatVectorAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfNamespace.h" - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -typedef std::vector - FloatVector; - -typedef TypedAttribute - FloatVectorAttribute; - -template <> -IMF_EXPORT -const char *FloatVectorAttribute::staticTypeName (); - -template <> -IMF_EXPORT -void FloatVectorAttribute::writeValueTo - (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; - -template <> -IMF_EXPORT -void FloatVectorAttribute::readValueFrom - (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfForward.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfForward.h deleted file mode 100644 index ea51c24..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfForward.h +++ /dev/null @@ -1,127 +0,0 @@ - - -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// Portions (c) 2012 Weta Digital Ltd -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_FORWARD_H -#define INCLUDED_IMF_FORWARD_H - -//////////////////////////////////////////////////////////////////// -// -// Forward declarations for OpenEXR - correctly declares namespace -// -//////////////////////////////////////////////////////////////////// - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -// classes for basic types; -template class Array; -template class Array2D; -struct Channel; -class ChannelList; -struct Chromaticities; - -// attributes used in headers are TypedAttributes -class Attribute; - -class Header; - -// file handling classes -class OutputFile; -class TiledInputFile; -class ScanLineInputFile; -class InputFile; -class TiledOutputFile; -class DeepScanLineInputFile; -class DeepScanLineOutputFile; -class DeepTiledInputFile; -class DeepTiledOutputFile; -class AcesInputFile; -class AcesOutputFile; -class TiledInputPart; -class TiledInputFile; -class TileOffsets; - -// multipart file handling -class GenericInputFile; -class GenericOutputFile; -class MultiPartInputFile; -class MultiPartOutputFile; - -class InputPart; -class TiledInputPart; -class DeepScanLineInputPart; -class DeepTiledInputPart; - -class OutputPart; -class ScanLineOutputPart; -class TiledOutputPart; -class DeepScanLineOutputPart; -class DeepTiledOutputPart; - - -// internal use only -struct InputPartData; -struct OutputStreamMutex; -struct OutputPartData; -struct InputStreamMutex; - -// frame buffers - -class FrameBuffer; -class DeepFrameBuffer; -struct DeepSlice; - -// compositing -class DeepCompositing; -class CompositeDeepScanLine; - -// preview image -class PreviewImage; -struct PreviewRgba; - -// streams -class OStream; -class IStream; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif // include guard diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp deleted file mode 100644 index bced3b1..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class Slice -// class FrameBuffer -// -//----------------------------------------------------------------------------- - -#include -#include "Iex.h" - - -using namespace std; - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -Slice::Slice (PixelType t, - char *b, - size_t xst, - size_t yst, - int xsm, - int ysm, - double fv, - bool xtc, - bool ytc) -: - type (t), - base (b), - xStride (xst), - yStride (yst), - xSampling (xsm), - ySampling (ysm), - fillValue (fv), - xTileCoords (xtc), - yTileCoords (ytc) -{ - // empty -} - - -void -FrameBuffer::insert (const char name[], const Slice &slice) -{ - if (name[0] == 0) - { - THROW (IEX_NAMESPACE::ArgExc, - "Frame buffer slice name cannot be an empty string."); - } - - _map[name] = slice; -} - - -void -FrameBuffer::insert (const string &name, const Slice &slice) -{ - insert (name.c_str(), slice); -} - - -Slice & -FrameBuffer::operator [] (const char name[]) -{ - SliceMap::iterator i = _map.find (name); - - if (i == _map.end()) - { - THROW (IEX_NAMESPACE::ArgExc, - "Cannot find frame buffer slice \"" << name << "\"."); - } - - return i->second; -} - - -const Slice & -FrameBuffer::operator [] (const char name[]) const -{ - SliceMap::const_iterator i = _map.find (name); - - if (i == _map.end()) - { - THROW (IEX_NAMESPACE::ArgExc, - "Cannot find frame buffer slice \"" << name << "\"."); - } - - return i->second; -} - - -Slice & -FrameBuffer::operator [] (const string &name) -{ - return this->operator[] (name.c_str()); -} - - -const Slice & -FrameBuffer::operator [] (const string &name) const -{ - return this->operator[] (name.c_str()); -} - - -Slice * -FrameBuffer::findSlice (const char name[]) -{ - SliceMap::iterator i = _map.find (name); - return (i == _map.end())? 0: &i->second; -} - - -const Slice * -FrameBuffer::findSlice (const char name[]) const -{ - SliceMap::const_iterator i = _map.find (name); - return (i == _map.end())? 0: &i->second; -} - - -Slice * -FrameBuffer::findSlice (const string &name) -{ - return findSlice (name.c_str()); -} - - -const Slice * -FrameBuffer::findSlice (const string &name) const -{ - return findSlice (name.c_str()); -} - - -FrameBuffer::Iterator -FrameBuffer::begin () -{ - return _map.begin(); -} - - -FrameBuffer::ConstIterator -FrameBuffer::begin () const -{ - return _map.begin(); -} - - -FrameBuffer::Iterator -FrameBuffer::end () -{ - return _map.end(); -} - - -FrameBuffer::ConstIterator -FrameBuffer::end () const -{ - return _map.end(); -} - - -FrameBuffer::Iterator -FrameBuffer::find (const char name[]) -{ - return _map.find (name); -} - - -FrameBuffer::ConstIterator -FrameBuffer::find (const char name[]) const -{ - return _map.find (name); -} - - -FrameBuffer::Iterator -FrameBuffer::find (const string &name) -{ - return find (name.c_str()); -} - - -FrameBuffer::ConstIterator -FrameBuffer::find (const string &name) const -{ - return find (name.c_str()); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFrameBuffer.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFrameBuffer.h deleted file mode 100644 index a810cfa..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFrameBuffer.h +++ /dev/null @@ -1,386 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_FRAME_BUFFER_H -#define INCLUDED_IMF_FRAME_BUFFER_H - -//----------------------------------------------------------------------------- -// -// class Slice -// class FrameBuffer -// -//----------------------------------------------------------------------------- - -#include "ImfName.h" -#include "ImfPixelType.h" -#include "ImfExport.h" -#include "ImfNamespace.h" - -#include -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -//------------------------------------------------------- -// Description of a single slice of the frame buffer: -// -// Note -- terminology: as part of a file, a component of -// an image (e.g. red, green, blue, depth etc.) is called -// a "channel". As part of a frame buffer, an image -// component is called a "slice". -//------------------------------------------------------- - -struct IMF_EXPORT Slice -{ - //------------------------------ - // Data type; see ImfPixelType.h - //------------------------------ - - PixelType type; - - - //--------------------------------------------------------------------- - // Memory layout: The address of pixel (x, y) is - // - // base + (xp / xSampling) * xStride + (yp / ySampling) * yStride - // - // where xp and yp are computed as follows: - // - // * If we are reading or writing a scanline-based file: - // - // xp = x - // yp = y - // - // * If we are reading a tile whose upper left coorner is at (xt, yt): - // - // if xTileCoords is true then xp = x - xt, else xp = x - // if yTileCoords is true then yp = y - yt, else yp = y - // - //--------------------------------------------------------------------- - - char * base; - size_t xStride; - size_t yStride; - - - //-------------------------------------------- - // Subsampling: pixel (x, y) is present in the - // slice only if - // - // x % xSampling == 0 && y % ySampling == 0 - // - //-------------------------------------------- - - int xSampling; - int ySampling; - - - //---------------------------------------------------------- - // Default value, used to fill the slice when a file without - // a channel that corresponds to this slice is read. - //---------------------------------------------------------- - - double fillValue; - - - //------------------------------------------------------- - // For tiled files, the xTileCoords and yTileCoords flags - // determine whether pixel addressing is performed using - // absolute coordinates or coordinates relative to a - // tile's upper left corner. (See the comment on base, - // xStride and yStride, above.) - // - // For scanline-based files these flags have no effect; - // pixel addressing is always done using absolute - // coordinates. - //------------------------------------------------------- - - bool xTileCoords; - bool yTileCoords; - - - //------------ - // Constructor - //------------ - - Slice (PixelType type = HALF, - char * base = 0, - size_t xStride = 0, - size_t yStride = 0, - int xSampling = 1, - int ySampling = 1, - double fillValue = 0.0, - bool xTileCoords = false, - bool yTileCoords = false); -}; - - -class IMF_EXPORT FrameBuffer -{ - public: - - //------------ - // Add a slice - //------------ - - void insert (const char name[], - const Slice &slice); - - void insert (const std::string &name, - const Slice &slice); - - //---------------------------------------------------------------- - // Access to existing slices: - // - // [n] Returns a reference to the slice with name n. - // If no slice with name n exists, an IEX_NAMESPACE::ArgExc - // is thrown. - // - // findSlice(n) Returns a pointer to the slice with name n, - // or 0 if no slice with name n exists. - // - //---------------------------------------------------------------- - - Slice & operator [] (const char name[]); - const Slice & operator [] (const char name[]) const; - - Slice & operator [] (const std::string &name); - const Slice & operator [] (const std::string &name) const; - - Slice * findSlice (const char name[]); - const Slice * findSlice (const char name[]) const; - - Slice * findSlice (const std::string &name); - const Slice * findSlice (const std::string &name) const; - - - //----------------------------------------- - // Iterator-style access to existing slices - //----------------------------------------- - - typedef std::map SliceMap; - - class Iterator; - class ConstIterator; - - Iterator begin (); - ConstIterator begin () const; - - Iterator end (); - ConstIterator end () const; - - Iterator find (const char name[]); - ConstIterator find (const char name[]) const; - - Iterator find (const std::string &name); - ConstIterator find (const std::string &name) const; - - private: - - SliceMap _map; -}; - - -//---------- -// Iterators -//---------- - -class FrameBuffer::Iterator -{ - public: - - Iterator (); - Iterator (const FrameBuffer::SliceMap::iterator &i); - - Iterator & operator ++ (); - Iterator operator ++ (int); - - const char * name () const; - Slice & slice () const; - - private: - - friend class FrameBuffer::ConstIterator; - - FrameBuffer::SliceMap::iterator _i; -}; - - -class FrameBuffer::ConstIterator -{ - public: - - ConstIterator (); - ConstIterator (const FrameBuffer::SliceMap::const_iterator &i); - ConstIterator (const FrameBuffer::Iterator &other); - - ConstIterator & operator ++ (); - ConstIterator operator ++ (int); - - const char * name () const; - const Slice & slice () const; - - private: - - friend bool operator == (const ConstIterator &, const ConstIterator &); - friend bool operator != (const ConstIterator &, const ConstIterator &); - - FrameBuffer::SliceMap::const_iterator _i; -}; - - -//----------------- -// Inline Functions -//----------------- - -inline -FrameBuffer::Iterator::Iterator (): _i() -{ - // empty -} - - -inline -FrameBuffer::Iterator::Iterator (const FrameBuffer::SliceMap::iterator &i): - _i (i) -{ - // empty -} - - -inline FrameBuffer::Iterator & -FrameBuffer::Iterator::operator ++ () -{ - ++_i; - return *this; -} - - -inline FrameBuffer::Iterator -FrameBuffer::Iterator::operator ++ (int) -{ - Iterator tmp = *this; - ++_i; - return tmp; -} - - -inline const char * -FrameBuffer::Iterator::name () const -{ - return *_i->first; -} - - -inline Slice & -FrameBuffer::Iterator::slice () const -{ - return _i->second; -} - - -inline -FrameBuffer::ConstIterator::ConstIterator (): _i() -{ - // empty -} - -inline -FrameBuffer::ConstIterator::ConstIterator - (const FrameBuffer::SliceMap::const_iterator &i): _i (i) -{ - // empty -} - - -inline -FrameBuffer::ConstIterator::ConstIterator (const FrameBuffer::Iterator &other): - _i (other._i) -{ - // empty -} - -inline FrameBuffer::ConstIterator & -FrameBuffer::ConstIterator::operator ++ () -{ - ++_i; - return *this; -} - - -inline FrameBuffer::ConstIterator -FrameBuffer::ConstIterator::operator ++ (int) -{ - ConstIterator tmp = *this; - ++_i; - return tmp; -} - - -inline const char * -FrameBuffer::ConstIterator::name () const -{ - return *_i->first; -} - -inline const Slice & -FrameBuffer::ConstIterator::slice () const -{ - return _i->second; -} - - -inline bool -operator == (const FrameBuffer::ConstIterator &x, - const FrameBuffer::ConstIterator &y) -{ - return x._i == y._i; -} - - -inline bool -operator != (const FrameBuffer::ConstIterator &x, - const FrameBuffer::ConstIterator &y) -{ - return !(x == y); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp deleted file mode 100644 index b56f948..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// Convenience functions related to the framesPerSecond attribute -// -//----------------------------------------------------------------------------- - -#include -#include "ImathFun.h" - -using namespace IMATH_NAMESPACE; -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -Rational -guessExactFps (double fps) -{ - return guessExactFps (Rational (fps)); -} - - -Rational -guessExactFps (const Rational &fps) -{ - const double e = 0.002; - - if (abs (double (fps) - double (fps_23_976())) < e) - return fps_23_976(); - - if (abs (double (fps) - double (fps_29_97())) < e) - return fps_29_97(); - - if (abs (double (fps) - double (fps_47_952())) < e) - return fps_47_952(); - - if (abs (double (fps) - double (fps_59_94())) < e) - return fps_59_94(); - - return fps; -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFramesPerSecond.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFramesPerSecond.h deleted file mode 100644 index 59ab4cb..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfFramesPerSecond.h +++ /dev/null @@ -1,94 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_FRAMES_PER_SECOND_H -#define INCLUDED_IMF_FRAMES_PER_SECOND_H - -//----------------------------------------------------------------------------- -// -// Convenience functions related to the framesPerSecond attribute -// -// Functions that return the exact values for commonly used frame rates: -// -// name frames per second -// -// fps_23_976() 23.976023... -// fps_24() 24.0 35mm film frames -// fps_25() 25.0 PAL video frames -// fps_29_97() 29.970029... NTSC video frames -// fps_30() 30.0 60Hz HDTV frames -// fps_47_952() 47.952047... -// fps_48() 48.0 -// fps_50() 50.0 PAL video fields -// fps_59_94() 59.940059... NTSC video fields -// fps_60() 60.0 60Hz HDTV fields -// -// Functions that try to convert inexact frame rates into exact ones: -// -// Given a frame rate, fps, that is close to one of the pre-defined -// frame rates fps_23_976(), fps_29_97(), fps_47_952() or fps_59_94(), -// guessExactFps(fps) returns the corresponding pre-defined frame -// rate. If fps is not close to one of the pre-defined frame rates, -// then guessExactFps(fps) returns Rational(fps). -// -//----------------------------------------------------------------------------- - -#include "ImfRational.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -inline Rational fps_23_976 () {return Rational (24000, 1001);} -inline Rational fps_24 () {return Rational (24, 1);} -inline Rational fps_25 () {return Rational (25, 1);} -inline Rational fps_29_97 () {return Rational (30000, 1001);} -inline Rational fps_30 () {return Rational (30, 1);} -inline Rational fps_47_952 () {return Rational (48000, 1001);} -inline Rational fps_48 () {return Rational (48, 1);} -inline Rational fps_50 () {return Rational (50, 1);} -inline Rational fps_59_94 () {return Rational (60000, 1001);} -inline Rational fps_60 () {return Rational (60, 1);} - -IMF_EXPORT Rational guessExactFps (double fps); -IMF_EXPORT Rational guessExactFps (const Rational &fps); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericInputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericInputFile.cpp deleted file mode 100644 index 0096a0a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericInputFile.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfGenericInputFile.h" - -#include -#include -#include -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -void GenericInputFile::readMagicNumberAndVersionField(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, int& version) -{ - // - // Read the magic number and the file format version number. - // Then check if we can read the rest of this file. - // - - int magic; - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, magic); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, version); - - if (magic != MAGIC) - { - throw IEX_NAMESPACE::InputExc ("File is not an image file."); - } - - if (getVersion (version) != EXR_VERSION) - { - THROW (IEX_NAMESPACE::InputExc, "Cannot read " - "version " << getVersion (version) << " " - "image files. Current file format version " - "is " << EXR_VERSION << "."); - } - - if (!supportsFlags (getFlags (version))) - { - THROW (IEX_NAMESPACE::InputExc, "The file format version number's flag field " - "contains unrecognized flags."); - } -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericInputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericInputFile.h deleted file mode 100644 index 78b32ba..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericInputFile.h +++ /dev/null @@ -1,58 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFGENERICINPUTFILE_H_ -#define IMFGENERICINPUTFILE_H_ - -#include "ImfIO.h" -#include "ImfHeader.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -class IMF_EXPORT GenericInputFile -{ - public: - virtual ~GenericInputFile() {} - - protected: - GenericInputFile() {} - void readMagicNumberAndVersionField(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, int& version); -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif /* IMFGENERICINPUTFILE_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericOutputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericOutputFile.cpp deleted file mode 100644 index 8ec707b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericOutputFile.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfGenericOutputFile.h" - -#include -#include -#include -#include - -#include -#include - -#include "ImfNamespace.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -using namespace std; - - - -void -GenericOutputFile::writeMagicNumberAndVersionField (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream& os, - const Header& header) -{ - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (os, MAGIC); - - int version = EXR_VERSION; - - if (header.hasType() && isDeepData(header.type())) - { - version |= NON_IMAGE_FLAG; - } - else - { - // (TODO) we may want to check something else in function signature - // instead of hasTileDescription()? - if (header.hasTileDescription()) - version |= TILED_FLAG; - } - - if (usesLongNames (header)) - version |= LONG_NAMES_FLAG; - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (os, version); -} - -void -GenericOutputFile::writeMagicNumberAndVersionField (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream& os, - const Header * headers, - int parts) -{ - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (os, MAGIC); - - int version = EXR_VERSION; - - if (parts == 1) - { - if (headers[0].type() == TILEDIMAGE) - version |= TILED_FLAG; - } - else - { - version |= MULTI_PART_FILE_FLAG; - } - - for (int i = 0; i < parts; i++) - { - if (usesLongNames (headers[i])) - version |= LONG_NAMES_FLAG; - - if (headers[i].hasType() && isImage(headers[i].type()) == false) - version |= NON_IMAGE_FLAG; - } - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (os, version); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericOutputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericOutputFile.h deleted file mode 100644 index 6b37f2a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfGenericOutputFile.h +++ /dev/null @@ -1,62 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFGENERICOUTPUTFILE_H_ -#define IMFGENERICOUTPUTFILE_H_ - -#include "ImfVersion.h" -#include "ImfIO.h" -#include "ImfXdr.h" -#include "ImfHeader.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT GenericOutputFile -{ - public: - virtual ~GenericOutputFile() {} - - protected: - GenericOutputFile() {} - void writeMagicNumberAndVersionField (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream& os, const Header& header); - void writeMagicNumberAndVersionField (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream& os, const Header * headers, int parts); - -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif /* GENERICOUTPUTFILE_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHeader.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHeader.cpp deleted file mode 100644 index d6b55f3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHeader.cpp +++ /dev/null @@ -1,1283 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class Header -// -//----------------------------------------------------------------------------- - -#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 "IlmThreadMutex.h" -#include "Iex.h" -#include -#include -#include - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace std; -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::V2i; -using IMATH_NAMESPACE::V2f; -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; - - -namespace { - -int maxImageWidth = 0; -int maxImageHeight = 0; -int maxTileWidth = 0; -int maxTileHeight = 0; - - -void -initialize (Header &header, - const Box2i &displayWindow, - const Box2i &dataWindow, - float pixelAspectRatio, - const V2f &screenWindowCenter, - float screenWindowWidth, - LineOrder lineOrder, - Compression compression) -{ - header.insert ("displayWindow", Box2iAttribute (displayWindow)); - header.insert ("dataWindow", Box2iAttribute (dataWindow)); - header.insert ("pixelAspectRatio", FloatAttribute (pixelAspectRatio)); - header.insert ("screenWindowCenter", V2fAttribute (screenWindowCenter)); - header.insert ("screenWindowWidth", FloatAttribute (screenWindowWidth)); - header.insert ("lineOrder", LineOrderAttribute (lineOrder)); - header.insert ("compression", CompressionAttribute (compression)); - header.insert ("channels", ChannelListAttribute ()); -} - -template -void checkIsNullTerminated (const char (&str)[N], const char *what) -{ - for (size_t i = 0; i < N; ++i) { - if (str[i] == '\0') - return; - } - std::stringstream s; - s << "Invalid " << what << ": it is more than " << (N - 1) - << " characters long."; - throw IEX_NAMESPACE::InputExc(s); -} - -} // namespace - - -Header::Header (int width, - int height, - float pixelAspectRatio, - const V2f &screenWindowCenter, - float screenWindowWidth, - LineOrder lineOrder, - Compression compression) -: - _map() -{ - staticInitialize(); - - Box2i displayWindow (V2i (0, 0), V2i (width - 1, height - 1)); - - initialize (*this, - displayWindow, - displayWindow, - pixelAspectRatio, - screenWindowCenter, - screenWindowWidth, - lineOrder, - compression); -} - - -Header::Header (int width, - int height, - const Box2i &dataWindow, - float pixelAspectRatio, - const V2f &screenWindowCenter, - float screenWindowWidth, - LineOrder lineOrder, - Compression compression) -: - _map() -{ - staticInitialize(); - - Box2i displayWindow (V2i (0, 0), V2i (width - 1, height - 1)); - - initialize (*this, - displayWindow, - dataWindow, - pixelAspectRatio, - screenWindowCenter, - screenWindowWidth, - lineOrder, - compression); -} - - -Header::Header (const Box2i &displayWindow, - const Box2i &dataWindow, - float pixelAspectRatio, - const V2f &screenWindowCenter, - float screenWindowWidth, - LineOrder lineOrder, - Compression compression) -: - _map() -{ - staticInitialize(); - - initialize (*this, - displayWindow, - dataWindow, - pixelAspectRatio, - screenWindowCenter, - screenWindowWidth, - lineOrder, - compression); -} - - -Header::Header (const Header &other): _map() -{ - for (AttributeMap::const_iterator i = other._map.begin(); - i != other._map.end(); - ++i) - { - insert (*i->first, *i->second); - } -} - - -Header::~Header () -{ - for (AttributeMap::iterator i = _map.begin(); - i != _map.end(); - ++i) - { - delete i->second; - } -} - - -Header & -Header::operator = (const Header &other) -{ - if (this != &other) - { - for (AttributeMap::iterator i = _map.begin(); - i != _map.end(); - ++i) - { - delete i->second; - } - - _map.erase (_map.begin(), _map.end()); - - for (AttributeMap::const_iterator i = other._map.begin(); - i != other._map.end(); - ++i) - { - insert (*i->first, *i->second); - } - } - - return *this; -} - - -void -Header::erase (const char name[]) -{ - if (name[0] == 0) - THROW (IEX_NAMESPACE::ArgExc, "Image attribute name cannot be an empty string."); - - - AttributeMap::iterator i = _map.find (name); - if (i != _map.end()) - _map.erase (i); - -} - - -void -Header::erase (const string &name) -{ - erase (name.c_str()); -} - - -void -Header::insert (const char name[], const Attribute &attribute) -{ - if (name[0] == 0) - THROW (IEX_NAMESPACE::ArgExc, "Image attribute name cannot be an empty string."); - - AttributeMap::iterator i = _map.find (name); - - if (i == _map.end()) - { - Attribute *tmp = attribute.copy(); - - try - { - _map[name] = tmp; - } - catch (...) - { - delete tmp; - throw; - } - } - else - { - if (strcmp (i->second->typeName(), attribute.typeName())) - THROW (IEX_NAMESPACE::TypeExc, "Cannot assign a value of " - "type \"" << attribute.typeName() << "\" " - "to image attribute \"" << name << "\" of " - "type \"" << i->second->typeName() << "\"."); - - Attribute *tmp = attribute.copy(); - delete i->second; - i->second = tmp; - } -} - - -void -Header::insert (const string &name, const Attribute &attribute) -{ - insert (name.c_str(), attribute); -} - - -Attribute & -Header::operator [] (const char name[]) -{ - AttributeMap::iterator i = _map.find (name); - - if (i == _map.end()) - THROW (IEX_NAMESPACE::ArgExc, "Cannot find image attribute \"" << name << "\"."); - - return *i->second; -} - - -const Attribute & -Header::operator [] (const char name[]) const -{ - AttributeMap::const_iterator i = _map.find (name); - - if (i == _map.end()) - THROW (IEX_NAMESPACE::ArgExc, "Cannot find image attribute \"" << name << "\"."); - - return *i->second; -} - - -Attribute & -Header::operator [] (const string &name) -{ - return this->operator[] (name.c_str()); -} - - -const Attribute & -Header::operator [] (const string &name) const -{ - return this->operator[] (name.c_str()); -} - - -Header::Iterator -Header::begin () -{ - return _map.begin(); -} - - -Header::ConstIterator -Header::begin () const -{ - return _map.begin(); -} - - -Header::Iterator -Header::end () -{ - return _map.end(); -} - - -Header::ConstIterator -Header::end () const -{ - return _map.end(); -} - - -Header::Iterator -Header::find (const char name[]) -{ - return _map.find (name); -} - - -Header::ConstIterator -Header::find (const char name[]) const -{ - return _map.find (name); -} - - -Header::Iterator -Header::find (const string &name) -{ - return find (name.c_str()); -} - - -Header::ConstIterator -Header::find (const string &name) const -{ - return find (name.c_str()); -} - - -IMATH_NAMESPACE::Box2i & -Header::displayWindow () -{ - return static_cast - ((*this)["displayWindow"]).value(); -} - - -const IMATH_NAMESPACE::Box2i & -Header::displayWindow () const -{ - return static_cast - ((*this)["displayWindow"]).value(); -} - - -IMATH_NAMESPACE::Box2i & -Header::dataWindow () -{ - return static_cast - ((*this)["dataWindow"]).value(); -} - - -const IMATH_NAMESPACE::Box2i & -Header::dataWindow () const -{ - return static_cast - ((*this)["dataWindow"]).value(); -} - - -float & -Header::pixelAspectRatio () -{ - return static_cast - ((*this)["pixelAspectRatio"]).value(); -} - - -const float & -Header::pixelAspectRatio () const -{ - return static_cast - ((*this)["pixelAspectRatio"]).value(); -} - - -IMATH_NAMESPACE::V2f & -Header::screenWindowCenter () -{ - return static_cast - ((*this)["screenWindowCenter"]).value(); -} - - -const IMATH_NAMESPACE::V2f & -Header::screenWindowCenter () const -{ - return static_cast - ((*this)["screenWindowCenter"]).value(); -} - - -float & -Header::screenWindowWidth () -{ - return static_cast - ((*this)["screenWindowWidth"]).value(); -} - - -const float & -Header::screenWindowWidth () const -{ - return static_cast - ((*this)["screenWindowWidth"]).value(); -} - - -ChannelList & -Header::channels () -{ - return static_cast - ((*this)["channels"]).value(); -} - - -const ChannelList & -Header::channels () const -{ - return static_cast - ((*this)["channels"]).value(); -} - - -LineOrder & -Header::lineOrder () -{ - return static_cast - ((*this)["lineOrder"]).value(); -} - - -const LineOrder & -Header::lineOrder () const -{ - return static_cast - ((*this)["lineOrder"]).value(); -} - - -Compression & -Header::compression () -{ - return static_cast - ((*this)["compression"]).value(); -} - - -const Compression & -Header::compression () const -{ - return static_cast - ((*this)["compression"]).value(); -} - - -void -Header::setName(const string& name) -{ - insert ("name", StringAttribute (name)); -} - - -bool -Header::hasName() const -{ - return findTypedAttribute ("name") != 0; -} - - -string & -Header::name() -{ - return typedAttribute ("name").value(); -} - - -const string & -Header::name() const -{ - return typedAttribute ("name").value(); -} - - -void -Header::setType(const string& type) -{ - if (isSupportedType(type) == false) - { - throw IEX_NAMESPACE::ArgExc (type + "is not a supported image type." + - "The following are supported: " + - SCANLINEIMAGE + ", " + - TILEDIMAGE + ", " + - DEEPSCANLINE + " or " + - DEEPTILE + "."); - } - - insert ("type", StringAttribute (type)); - - // (TODO) Should we do it here? - if (isDeepData(type) && hasVersion() == false) - { - setVersion(1); - } -} - - -bool -Header::hasType() const -{ - return findTypedAttribute ("type") != 0; -} - - -string & -Header::type() -{ - return typedAttribute ("type").value(); -} - - -const string & -Header::type() const -{ - return typedAttribute ("type").value(); -} - - -void -Header::setView(const string& view) -{ - insert ("view", StringAttribute (view)); -} - - -bool -Header::hasView() const -{ - return findTypedAttribute ("view") != 0; -} - - -string & -Header::view() -{ - return typedAttribute ("view").value(); -} - - -const string & -Header::view() const -{ - return typedAttribute ("view").value(); -} - - -void -Header::setVersion(const int version) -{ - if (version != 1) - { - throw IEX_NAMESPACE::ArgExc ("We can only process version 1"); - } - - insert ("version", IntAttribute (version)); -} - - -bool -Header::hasVersion() const -{ - return findTypedAttribute ("version") != 0; -} - - -int & -Header::version() -{ - return typedAttribute ("version").value(); -} - - -const int & -Header::version() const -{ - return typedAttribute ("version").value(); -} - -void -Header::setChunkCount(int chunks) -{ - insert("chunkCount",IntAttribute(chunks)); -} - -bool -Header::hasChunkCount() const -{ - return findTypedAttribute("chunkCount") != 0; -} - -int& -Header::chunkCount() -{ - return typedAttribute ("chunkCount").value(); -} - -const int& -Header::chunkCount() const -{ - return typedAttribute ("chunkCount").value(); -} - -void -Header::setTileDescription(const TileDescription& td) -{ - insert ("tiles", TileDescriptionAttribute (td)); -} - - -bool -Header::hasTileDescription() const -{ - return findTypedAttribute ("tiles") != 0; -} - - -TileDescription & -Header::tileDescription () -{ - return typedAttribute ("tiles").value(); -} - - -const TileDescription & -Header::tileDescription () const -{ - return typedAttribute ("tiles").value(); -} - -void -Header::setPreviewImage (const PreviewImage &pi) -{ - insert ("preview", PreviewImageAttribute (pi)); -} - - -PreviewImage & -Header::previewImage () -{ - return typedAttribute ("preview").value(); -} - - -const PreviewImage & -Header::previewImage () const -{ - return typedAttribute ("preview").value(); -} - - -bool -Header::hasPreviewImage () const -{ - return findTypedAttribute ("preview") != 0; -} - - -void -Header::sanityCheck (bool isTiled, bool isMultipartFile) const -{ - // - // The display window and the data window must each - // contain at least one pixel. In addition, the - // coordinates of the window corners must be small - // enough to keep expressions like max-min+1 or - // max+min from overflowing. - // - - const Box2i &displayWindow = this->displayWindow(); - - if (displayWindow.min.x > displayWindow.max.x || - displayWindow.min.y > displayWindow.max.y || - displayWindow.min.x <= -(INT_MAX / 2) || - displayWindow.min.y <= -(INT_MAX / 2) || - displayWindow.max.x >= (INT_MAX / 2) || - displayWindow.max.y >= (INT_MAX / 2)) - { - throw IEX_NAMESPACE::ArgExc ("Invalid display window in image header."); - } - - const Box2i &dataWindow = this->dataWindow(); - - if (dataWindow.min.x > dataWindow.max.x || - dataWindow.min.y > dataWindow.max.y || - dataWindow.min.x <= -(INT_MAX / 2) || - dataWindow.min.y <= -(INT_MAX / 2) || - dataWindow.max.x >= (INT_MAX / 2) || - dataWindow.max.y >= (INT_MAX / 2)) - { - throw IEX_NAMESPACE::ArgExc ("Invalid data window in image header."); - } - - if (maxImageWidth > 0 && - maxImageWidth < (dataWindow.max.x - dataWindow.min.x + 1)) - { - THROW (IEX_NAMESPACE::ArgExc, "The width of the data window exceeds the " - "maximum width of " << maxImageWidth << "pixels."); - } - - if (maxImageHeight > 0 && - maxImageHeight < dataWindow.max.y - dataWindow.min.y + 1) - { - THROW (IEX_NAMESPACE::ArgExc, "The width of the data window exceeds the " - "maximum width of " << maxImageHeight << "pixels."); - } - - // chunk table must be smaller than the maximum image area - // (only reachable for unknown types or damaged files: will have thrown earlier - // for regular image types) - if( maxImageHeight>0 && maxImageWidth>0 && - hasChunkCount() && chunkCount()>Int64(maxImageWidth)*Int64(maxImageHeight)) - { - THROW (IEX_NAMESPACE::ArgExc, "chunkCount exceeds maximum area of " - << Int64(maxImageWidth)*Int64(maxImageHeight) << " pixels." ); - - } - - - // - // The pixel aspect ratio must be greater than 0. - // In applications, numbers like the the display or - // data window dimensions are likely to be multiplied - // or divided by the pixel aspect ratio; to avoid - // arithmetic exceptions, we limit the pixel aspect - // ratio to a range that is smaller than theoretically - // possible (real aspect ratios are likely to be close - // to 1.0 anyway). - // - - float pixelAspectRatio = this->pixelAspectRatio(); - - const float MIN_PIXEL_ASPECT_RATIO = 1e-6f; - const float MAX_PIXEL_ASPECT_RATIO = 1e+6f; - - if (pixelAspectRatio < MIN_PIXEL_ASPECT_RATIO || - pixelAspectRatio > MAX_PIXEL_ASPECT_RATIO) - { - throw IEX_NAMESPACE::ArgExc ("Invalid pixel aspect ratio in image header."); - } - - // - // The screen window width must not be less than 0. - // The size of the screen window can vary over a wide - // range (fish-eye lens to astronomical telescope), - // so we can't limit the screen window width to a - // small range. - // - - float screenWindowWidth = this->screenWindowWidth(); - - if (screenWindowWidth < 0) - throw IEX_NAMESPACE::ArgExc ("Invalid screen window width in image header."); - - // - // If the file has multiple parts, verify that each header has attribute - // name and type. - // (TODO) We may want to check more stuff here. - // - - if (isMultipartFile) - { - if (!hasName()) - { - throw IEX_NAMESPACE::ArgExc ("Headers in a multipart file should" - " have name attribute."); - } - - if (!hasType()) - { - throw IEX_NAMESPACE::ArgExc ("Headers in a multipart file should" - " have type attribute."); - } - - } - - const std::string & part_type=hasType() ? type() : ""; - - if(part_type!="" && !isSupportedType(part_type)) - { - // - // skip remaining sanity checks with unsupported types - they may not hold - // - return; - } - - - // - // If the file is tiled, verify that the tile description has reasonable - // values and check to see if the lineOrder is one of the predefined 3. - // If the file is not tiled, then the lineOrder can only be INCREASING_Y - // or DECREASING_Y. - // - - LineOrder lineOrder = this->lineOrder(); - - if (isTiled) - { - if (!hasTileDescription()) - { - throw IEX_NAMESPACE::ArgExc ("Tiled image has no tile " - "description attribute."); - } - - const TileDescription &tileDesc = tileDescription(); - - if (tileDesc.xSize <= 0 || tileDesc.ySize <= 0) - throw IEX_NAMESPACE::ArgExc ("Invalid tile size in image header."); - - if (maxTileWidth > 0 && - maxTileWidth < int(tileDesc.xSize)) - { - THROW (IEX_NAMESPACE::ArgExc, "The width of the tiles exceeds the maximum " - "width of " << maxTileWidth << "pixels."); - } - - if (maxTileHeight > 0 && - maxTileHeight < int(tileDesc.ySize)) - { - THROW (IEX_NAMESPACE::ArgExc, "The width of the tiles exceeds the maximum " - "width of " << maxTileHeight << "pixels."); - } - - if (tileDesc.mode != ONE_LEVEL && - tileDesc.mode != MIPMAP_LEVELS && - tileDesc.mode != RIPMAP_LEVELS) - throw IEX_NAMESPACE::ArgExc ("Invalid level mode in image header."); - - if (tileDesc.roundingMode != ROUND_UP && - tileDesc.roundingMode != ROUND_DOWN) - throw IEX_NAMESPACE::ArgExc ("Invalid level rounding mode in image header."); - - if (lineOrder != INCREASING_Y && - lineOrder != DECREASING_Y && - lineOrder != RANDOM_Y) - throw IEX_NAMESPACE::ArgExc ("Invalid line order in image header."); - } - else - { - if (lineOrder != INCREASING_Y && - lineOrder != DECREASING_Y) - throw IEX_NAMESPACE::ArgExc ("Invalid line order in image header."); - - - } - - // - // The compression method must be one of the predefined values. - // - - if (!isValidCompression (this->compression())) - throw IEX_NAMESPACE::ArgExc ("Unknown compression type in image header."); - - if(isDeepData(part_type)) - { - if (!isValidDeepCompression (this->compression())) - throw IEX_NAMESPACE::ArgExc ("Compression type in header not valid for deep data"); - } - - // - // Check the channel list: - // - // If the file is tiled then for each channel, the type must be one of the - // predefined values, and the x and y sampling must both be 1. - // - // If the file is not tiled then for each channel, the type must be one - // of the predefined values, the x and y coordinates of the data window's - // upper left corner must be divisible by the x and y subsampling factors, - // and the width and height of the data window must be divisible by the - // x and y subsampling factors. - // - - const ChannelList &channels = this->channels(); - - if (isTiled) - { - for (ChannelList::ConstIterator i = channels.begin(); - i != channels.end(); - ++i) - { - if (i.channel().type != OPENEXR_IMF_INTERNAL_NAMESPACE::UINT && - i.channel().type != OPENEXR_IMF_INTERNAL_NAMESPACE::HALF && - i.channel().type != OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT) - { - THROW (IEX_NAMESPACE::ArgExc, "Pixel type of \"" << i.name() << "\" " - "image channel is invalid."); - } - - if (i.channel().xSampling != 1) - { - THROW (IEX_NAMESPACE::ArgExc, "The x subsampling factor for the " - "\"" << i.name() << "\" channel " - "is not 1."); - } - - if (i.channel().ySampling != 1) - { - THROW (IEX_NAMESPACE::ArgExc, "The y subsampling factor for the " - "\"" << i.name() << "\" channel " - "is not 1."); - } - } - } - else - { - for (ChannelList::ConstIterator i = channels.begin(); - i != channels.end(); - ++i) - { - if (i.channel().type != OPENEXR_IMF_INTERNAL_NAMESPACE::UINT && - i.channel().type != OPENEXR_IMF_INTERNAL_NAMESPACE::HALF && - i.channel().type != OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT) - { - THROW (IEX_NAMESPACE::ArgExc, "Pixel type of \"" << i.name() << "\" " - "image channel is invalid."); - } - - if (i.channel().xSampling < 1) - { - THROW (IEX_NAMESPACE::ArgExc, "The x subsampling factor for the " - "\"" << i.name() << "\" channel " - "is invalid."); - } - - if (i.channel().ySampling < 1) - { - THROW (IEX_NAMESPACE::ArgExc, "The y subsampling factor for the " - "\"" << i.name() << "\" channel " - "is invalid."); - } - - if (dataWindow.min.x % i.channel().xSampling) - { - THROW (IEX_NAMESPACE::ArgExc, "The minimum x coordinate of the " - "image's data window is not a multiple " - "of the x subsampling factor of " - "the \"" << i.name() << "\" channel."); - } - - if (dataWindow.min.y % i.channel().ySampling) - { - THROW (IEX_NAMESPACE::ArgExc, "The minimum y coordinate of the " - "image's data window is not a multiple " - "of the y subsampling factor of " - "the \"" << i.name() << "\" channel."); - } - - if ((dataWindow.max.x - dataWindow.min.x + 1) % - i.channel().xSampling) - { - THROW (IEX_NAMESPACE::ArgExc, "Number of pixels per row in the " - "image's data window is not a multiple " - "of the x subsampling factor of " - "the \"" << i.name() << "\" channel."); - } - - if ((dataWindow.max.y - dataWindow.min.y + 1) % - i.channel().ySampling) - { - THROW (IEX_NAMESPACE::ArgExc, "Number of pixels per column in the " - "image's data window is not a multiple " - "of the y subsampling factor of " - "the \"" << i.name() << "\" channel."); - } - } - } -} - - -void -Header::setMaxImageSize (int maxWidth, int maxHeight) -{ - maxImageWidth = maxWidth; - maxImageHeight = maxHeight; -} - - -void -Header::setMaxTileSize (int maxWidth, int maxHeight) -{ - maxTileWidth = maxWidth; - maxTileHeight = maxHeight; -} - - -bool -Header::readsNothing() -{ - return _readsNothing; -} - - -Int64 -Header::writeTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, bool isTiled) const -{ - // - // Write a "magic number" to identify the file as an image file. - // Write the current file format version number. - // - - int version = EXR_VERSION; - - // - // Write all attributes. If we have a preview image attribute, - // keep track of its position in the file. - // - - Int64 previewPosition = 0; - - const Attribute *preview = - findTypedAttribute ("preview"); - - for (ConstIterator i = begin(); i != end(); ++i) - { - // - // Write the attribute's name and type. - // - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (os, i.name()); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (os, i.attribute().typeName()); - - // - // Write the size of the attribute value, - // and the value itself. - // - - StdOSStream oss; - i.attribute().writeValueTo (oss, version); - - std::string s = oss.str(); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (os, (int) s.length()); - - if (&i.attribute() == preview) - previewPosition = os.tellp(); - - os.write (s.data(), int(s.length())); - } - - // - // Write zero-length attribute name to mark the end of the header. - // - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (os, ""); - - return previewPosition; -} - - -void -Header::readFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int &version) -{ - // - // Read all attributes. - // - - int attrCount = 0; - - while (true) - { - // - // Read the name of the attribute. - // A zero-length attribute name indicates the end of the header. - // - - char name[Name::SIZE]; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, Name::MAX_LENGTH, name); - - if (name[0] == 0) - { - if (attrCount == 0) _readsNothing = true; - else _readsNothing = false; - break; - } - - attrCount++; - - checkIsNullTerminated (name, "attribute name"); - - // - // Read the attribute type and the size of the attribute value. - // - - char typeName[Name::SIZE]; - int size; - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, Name::MAX_LENGTH, typeName); - checkIsNullTerminated (typeName, "attribute type name"); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, size); - - AttributeMap::iterator i = _map.find (name); - - if (i != _map.end()) - { - // - // The attribute already exists (for example, - // because it is a predefined attribute). - // Read the attribute's new value from the file. - // - - if (strncmp (i->second->typeName(), typeName, sizeof (typeName))) - THROW (IEX_NAMESPACE::InputExc, "Unexpected type for image attribute " - "\"" << name << "\"."); - - i->second->readValueFrom (is, size, version); - } - else - { - // - // The new attribute does not exist yet. - // If the attribute type is of a known type, - // read the attribute value. If the attribute - // is of an unknown type, read its value and - // store it as an OpaqueAttribute. - // - - Attribute *attr; - - if (Attribute::knownType (typeName)) - attr = Attribute::newAttribute (typeName); - else - attr = new OpaqueAttribute (typeName); - - try - { - attr->readValueFrom (is, size, version); - _map[name] = attr; - } - catch (...) - { - delete attr; - throw; - } - } - } -} - - -void -staticInitialize () -{ - static Mutex criticalSection; - Lock lock (criticalSection); - - static bool initialized = false; - - if (!initialized) - { - // - // One-time initialization -- register - // some predefined attribute types. - // - - Box2fAttribute::registerAttributeType(); - Box2iAttribute::registerAttributeType(); - ChannelListAttribute::registerAttributeType(); - CompressionAttribute::registerAttributeType(); - ChromaticitiesAttribute::registerAttributeType(); - DeepImageStateAttribute::registerAttributeType(); - DoubleAttribute::registerAttributeType(); - EnvmapAttribute::registerAttributeType(); - FloatAttribute::registerAttributeType(); - FloatVectorAttribute::registerAttributeType(); - IntAttribute::registerAttributeType(); - KeyCodeAttribute::registerAttributeType(); - LineOrderAttribute::registerAttributeType(); - M33dAttribute::registerAttributeType(); - M33fAttribute::registerAttributeType(); - M44dAttribute::registerAttributeType(); - M44fAttribute::registerAttributeType(); - PreviewImageAttribute::registerAttributeType(); - RationalAttribute::registerAttributeType(); - StringAttribute::registerAttributeType(); - StringVectorAttribute::registerAttributeType(); - TileDescriptionAttribute::registerAttributeType(); - TimeCodeAttribute::registerAttributeType(); - V2dAttribute::registerAttributeType(); - V2fAttribute::registerAttributeType(); - V2iAttribute::registerAttributeType(); - V3dAttribute::registerAttributeType(); - V3fAttribute::registerAttributeType(); - V3iAttribute::registerAttributeType(); - DwaCompressor::initializeFuncs(); - - initialized = true; - } -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHeader.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHeader.h deleted file mode 100644 index 756a62e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHeader.h +++ /dev/null @@ -1,699 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_HEADER_H -#define INCLUDED_IMF_HEADER_H - -//----------------------------------------------------------------------------- -// -// class Header -// -//----------------------------------------------------------------------------- - -#include "ImfLineOrder.h" -#include "ImfCompression.h" -#include "ImfName.h" -#include "ImfTileDescription.h" -#include "ImfInt64.h" -#include "ImathVec.h" -#include "ImathBox.h" -#include "IexBaseExc.h" - -#include "ImfForward.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -#include -#include -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -using std::string; - - -class IMF_EXPORT Header -{ - public: - - //---------------------------------------------------------------- - // Default constructor -- the display window and the data window - // are both set to Box2i (V2i (0, 0), V2i (width-1, height-1). - //---------------------------------------------------------------- - - Header (int width = 64, - int height = 64, - float pixelAspectRatio = 1, - const IMATH_NAMESPACE::V2f &screenWindowCenter = IMATH_NAMESPACE::V2f (0, 0), - float screenWindowWidth = 1, - LineOrder lineOrder = INCREASING_Y, - Compression = ZIP_COMPRESSION); - - - //-------------------------------------------------------------------- - // Constructor -- the data window is specified explicitly; the display - // window is set to Box2i (V2i (0, 0), V2i (width-1, height-1). - //-------------------------------------------------------------------- - - Header (int width, - int height, - const IMATH_NAMESPACE::Box2i &dataWindow, - float pixelAspectRatio = 1, - const IMATH_NAMESPACE::V2f &screenWindowCenter = IMATH_NAMESPACE::V2f (0, 0), - float screenWindowWidth = 1, - LineOrder lineOrder = INCREASING_Y, - Compression = ZIP_COMPRESSION); - - - //---------------------------------------------------------- - // Constructor -- the display window and the data window are - // both specified explicitly. - //---------------------------------------------------------- - - Header (const IMATH_NAMESPACE::Box2i &displayWindow, - const IMATH_NAMESPACE::Box2i &dataWindow, - float pixelAspectRatio = 1, - const IMATH_NAMESPACE::V2f &screenWindowCenter = IMATH_NAMESPACE::V2f (0, 0), - float screenWindowWidth = 1, - LineOrder lineOrder = INCREASING_Y, - Compression = ZIP_COMPRESSION); - - - //----------------- - // Copy constructor - //----------------- - - Header (const Header &other); - - - //----------- - // Destructor - //----------- - - ~Header (); - - - //----------- - // Assignment - //----------- - - Header & operator = (const Header &other); - - - //--------------------------------------------------------------- - // Add an attribute: - // - // insert(n,attr) If no attribute with name n exists, a new - // attribute with name n, and the same type as - // attr, is added, and the value of attr is - // copied into the new attribute. - // - // If an attribute with name n exists, and its - // type is the same as attr, the value of attr - // is copied into this attribute. - // - // If an attribute with name n exists, and its - // type is different from attr, an IEX_NAMESPACE::TypeExc - // is thrown. - // - //--------------------------------------------------------------- - - void insert (const char name[], - const Attribute &attribute); - - void insert (const std::string &name, - const Attribute &attribute); - - //--------------------------------------------------------------- - // Remove an attribute: - // - // remove(n) If an attribute with name n exists, then it - // is removed from the map of present attributes. - // - // If no attribute with name n exists, then this - // functions becomes a 'no-op' - // - //--------------------------------------------------------------- - void erase (const char name[]); - void erase (const std::string &name); - - - - //------------------------------------------------------------------ - // Access to existing attributes: - // - // [n] Returns a reference to the attribute - // with name n. If no attribute with - // name n exists, an IEX_NAMESPACE::ArgExc is thrown. - // - // typedAttribute(n) Returns a reference to the attribute - // with name n and type T. If no attribute - // with name n exists, an IEX_NAMESPACE::ArgExc is - // thrown. If an attribute with name n - // exists, but its type is not T, an - // IEX_NAMESPACE::TypeExc is thrown. - // - // findTypedAttribute(n) Returns a pointer to the attribute with - // name n and type T, or 0 if no attribute - // with name n and type T exists. - // - //------------------------------------------------------------------ - - Attribute & operator [] (const char name[]); - const Attribute & operator [] (const char name[]) const; - - Attribute & operator [] (const std::string &name); - const Attribute & operator [] (const std::string &name) const; - - template T& typedAttribute (const char name[]); - template const T& typedAttribute (const char name[]) const; - - template T& typedAttribute (const std::string &name); - template const T& typedAttribute (const std::string &name) const; - - template T* findTypedAttribute (const char name[]); - template const T* findTypedAttribute (const char name[]) const; - - template T* findTypedAttribute (const std::string &name); - template const T* findTypedAttribute (const std::string &name) - const; - - //--------------------------------------------- - // Iterator-style access to existing attributes - //--------------------------------------------- - - typedef std::map AttributeMap; - - class Iterator; - class ConstIterator; - - Iterator begin (); - ConstIterator begin () const; - - Iterator end (); - ConstIterator end () const; - - Iterator find (const char name[]); - ConstIterator find (const char name[]) const; - - Iterator find (const std::string &name); - ConstIterator find (const std::string &name) const; - - - //-------------------------------- - // Access to predefined attributes - //-------------------------------- - - IMATH_NAMESPACE::Box2i & displayWindow (); - const IMATH_NAMESPACE::Box2i & displayWindow () const; - - IMATH_NAMESPACE::Box2i & dataWindow (); - const IMATH_NAMESPACE::Box2i & dataWindow () const; - - float & pixelAspectRatio (); - const float & pixelAspectRatio () const; - - IMATH_NAMESPACE::V2f & screenWindowCenter (); - const IMATH_NAMESPACE::V2f & screenWindowCenter () const; - - float & screenWindowWidth (); - const float & screenWindowWidth () const; - - ChannelList & channels (); - const ChannelList & channels () const; - - LineOrder & lineOrder (); - const LineOrder & lineOrder () const; - - Compression & compression (); - const Compression & compression () const; - - - //----------------------------------------------------- - // Access to required attributes for multipart files - // They are optional to non-multipart files and mandatory - // for multipart files. - //----------------------------------------------------- - void setName (const string& name); - - string& name(); - const string& name() const; - - bool hasName() const; - - void setType (const string& Type); - - string& type(); - const string& type() const; - - bool hasType() const; - - void setVersion (const int version); - - int& version(); - const int& version() const; - - bool hasVersion() const; - - // - // the chunkCount attribute is set automatically when a file is written. - // There is no need to set it manually - // - void setChunkCount(int chunks); - bool hasChunkCount() const; - const int & chunkCount() const; - int & chunkCount(); - - - // - // for multipart files, return whether the file has a view string attribute - // (for the deprecated single part multiview format EXR, see ImfMultiView.h) - // - void setView(const string & view); - bool hasView() const; - string & view(); - const string & view() const; - - - //---------------------------------------------------------------------- - // Tile Description: - // - // The tile description is a TileDescriptionAttribute whose name - // is "tiles". The "tiles" attribute must be present in any tiled - // image file. When present, it describes various properties of the - // tiles that make up the file. - // - // Convenience functions: - // - // setTileDescription(td) - // calls insert ("tiles", TileDescriptionAttribute (td)) - // - // tileDescription() - // returns typedAttribute("tiles").value() - // - // hasTileDescription() - // return findTypedAttribute("tiles") != 0 - // - //---------------------------------------------------------------------- - - void setTileDescription (const TileDescription & td); - - TileDescription & tileDescription (); - const TileDescription & tileDescription () const; - - bool hasTileDescription() const; - - - //---------------------------------------------------------------------- - // Preview image: - // - // The preview image is a PreviewImageAttribute whose name is "preview". - // This attribute is special -- while an image file is being written, - // the pixels of the preview image can be changed repeatedly by calling - // OutputFile::updatePreviewImage(). - // - // Convenience functions: - // - // setPreviewImage(p) - // calls insert ("preview", PreviewImageAttribute (p)) - // - // previewImage() - // returns typedAttribute("preview").value() - // - // hasPreviewImage() - // return findTypedAttribute("preview") != 0 - // - //---------------------------------------------------------------------- - - void setPreviewImage (const PreviewImage &p); - - PreviewImage & previewImage (); - const PreviewImage & previewImage () const; - - bool hasPreviewImage () const; - - - //------------------------------------------------------------- - // Sanity check -- examines the header, and throws an exception - // if it finds something wrong (empty display window, negative - // pixel aspect ratio, unknown compression sceme etc.) - // - // set isTiled to true if you are checking a tiled/multi-res - // header - //------------------------------------------------------------- - - void sanityCheck (bool isTiled = false, - bool isMultipartFile = false) const; - - - //---------------------------------------------------------------- - // Maximum image size and maximim tile size: - // - // sanityCheck() will throw an exception if the width or height of - // the data window exceeds the maximum image width or height, or - // if the size of a tile exceeds the maximum tile width or height. - // - // At program startup the maximum image and tile width and height - // are set to zero, meaning that width and height are unlimited. - // - // Limiting image and tile width and height limits how much memory - // will be allocated when a file is opened. This can help protect - // applications from running out of memory while trying to read - // a damaged image file. - //---------------------------------------------------------------- - - static void setMaxImageSize (int maxWidth, int maxHeight); - static void setMaxTileSize (int maxWidth, int maxHeight); - - // - // Check if the header reads nothing. - // - bool readsNothing(); - - - //------------------------------------------------------------------ - // Input and output: - // - // If the header contains a preview image attribute, then writeTo() - // returns the position of that attribute in the output stream; this - // information is used by OutputFile::updatePreviewImage(). - // If the header contains no preview image attribute, then writeTo() - // returns 0. - //------------------------------------------------------------------ - - - Int64 writeTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - bool isTiled = false) const; - - void readFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - int &version); - - - private: - - AttributeMap _map; - - bool _readsNothing; -}; - - -//---------- -// Iterators -//---------- - -class Header::Iterator -{ - public: - - Iterator (); - Iterator (const Header::AttributeMap::iterator &i); - - Iterator & operator ++ (); - Iterator operator ++ (int); - - const char * name () const; - Attribute & attribute () const; - - private: - - friend class Header::ConstIterator; - - Header::AttributeMap::iterator _i; -}; - - -class Header::ConstIterator -{ - public: - - ConstIterator (); - ConstIterator (const Header::AttributeMap::const_iterator &i); - ConstIterator (const Header::Iterator &other); - - ConstIterator & operator ++ (); - ConstIterator operator ++ (int); - - const char * name () const; - const Attribute & attribute () const; - - private: - - friend bool operator == (const ConstIterator &, const ConstIterator &); - friend bool operator != (const ConstIterator &, const ConstIterator &); - - Header::AttributeMap::const_iterator _i; -}; - - -//------------------------------------------------------------------------ -// Library initialization: -// -// In a multithreaded program, staticInitialize() must be called once -// during startup, before the program accesses any other functions or -// classes in the IlmImf library. Calling staticInitialize() in this -// way avoids races during initialization of the library's global -// variables. -// -// Single-threaded programs are not required to call staticInitialize(); -// initialization of the library's global variables happens automatically. -// -//------------------------------------------------------------------------ - -void staticInitialize (); - - -//----------------- -// Inline Functions -//----------------- - - -inline -Header::Iterator::Iterator (): _i() -{ - // empty -} - - -inline -Header::Iterator::Iterator (const Header::AttributeMap::iterator &i): _i (i) -{ - // empty -} - - -inline Header::Iterator & -Header::Iterator::operator ++ () -{ - ++_i; - return *this; -} - - -inline Header::Iterator -Header::Iterator::operator ++ (int) -{ - Iterator tmp = *this; - ++_i; - return tmp; -} - - -inline const char * -Header::Iterator::name () const -{ - return *_i->first; -} - - -inline Attribute & -Header::Iterator::attribute () const -{ - return *_i->second; -} - - -inline -Header::ConstIterator::ConstIterator (): _i() -{ - // empty -} - -inline -Header::ConstIterator::ConstIterator - (const Header::AttributeMap::const_iterator &i): _i (i) -{ - // empty -} - - -inline -Header::ConstIterator::ConstIterator (const Header::Iterator &other): - _i (other._i) -{ - // empty -} - -inline Header::ConstIterator & -Header::ConstIterator::operator ++ () -{ - ++_i; - return *this; -} - - -inline Header::ConstIterator -Header::ConstIterator::operator ++ (int) -{ - ConstIterator tmp = *this; - ++_i; - return tmp; -} - - -inline const char * -Header::ConstIterator::name () const -{ - return *_i->first; -} - - -inline const Attribute & -Header::ConstIterator::attribute () const -{ - return *_i->second; -} - - -inline bool -operator == (const Header::ConstIterator &x, const Header::ConstIterator &y) -{ - return x._i == y._i; -} - - -inline bool -operator != (const Header::ConstIterator &x, const Header::ConstIterator &y) -{ - return !(x == y); -} - - -//--------------------- -// Template definitions -//--------------------- - -template -T & -Header::typedAttribute (const char name[]) -{ - Attribute *attr = &(*this)[name]; - T *tattr = dynamic_cast (attr); - - if (tattr == 0) - throw IEX_NAMESPACE::TypeExc ("Unexpected attribute type."); - - return *tattr; -} - - -template -const T & -Header::typedAttribute (const char name[]) const -{ - const Attribute *attr = &(*this)[name]; - const T *tattr = dynamic_cast (attr); - - if (tattr == 0) - throw IEX_NAMESPACE::TypeExc ("Unexpected attribute type."); - - return *tattr; -} - - -template -T & -Header::typedAttribute (const std::string &name) -{ - return typedAttribute (name.c_str()); -} - - -template -const T & -Header::typedAttribute (const std::string &name) const -{ - return typedAttribute (name.c_str()); -} - - -template -T * -Header::findTypedAttribute (const char name[]) -{ - AttributeMap::iterator i = _map.find (name); - return (i == _map.end())? 0: dynamic_cast (i->second); -} - - -template -const T * -Header::findTypedAttribute (const char name[]) const -{ - AttributeMap::const_iterator i = _map.find (name); - return (i == _map.end())? 0: dynamic_cast (i->second); -} - - -template -T * -Header::findTypedAttribute (const std::string &name) -{ - return findTypedAttribute (name.c_str()); -} - - -template -const T * -Header::findTypedAttribute (const std::string &name) const -{ - return findTypedAttribute (name.c_str()); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHuf.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHuf.cpp deleted file mode 100644 index 97909a5..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHuf.cpp +++ /dev/null @@ -1,1116 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - - -//----------------------------------------------------------------------------- -// -// 16-bit Huffman compression and decompression. -// -// The source code in this file is derived from the 8-bit -// Huffman compression and decompression routines written -// by Christian Rouet for his PIZ image file format. -// -//----------------------------------------------------------------------------- - -#include -#include -#include "ImfAutoArray.h" -#include "ImfFastHuf.h" -#include "Iex.h" -#include -#include -#include - - -using namespace std; -using namespace IEX_NAMESPACE; -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -namespace { - - -const int HUF_ENCBITS = 16; // literal (value) bit length -const int HUF_DECBITS = 14; // decoding bit size (>= 8) - -const int HUF_ENCSIZE = (1 << HUF_ENCBITS) + 1; // encoding table size -const int HUF_DECSIZE = 1 << HUF_DECBITS; // decoding table size -const int HUF_DECMASK = HUF_DECSIZE - 1; - - -struct HufDec -{ // short code long code - //------------------------------- - int len:8; // code length 0 - int lit:24; // lit p size - int * p; // 0 lits -}; - - -void -invalidNBits () -{ - throw InputExc ("Error in header for Huffman-encoded data " - "(invalid number of bits)."); -} - - -void -tooMuchData () -{ - throw InputExc ("Error in Huffman-encoded data " - "(decoded data are longer than expected)."); -} - - -void -notEnoughData () -{ - throw InputExc ("Error in Huffman-encoded data " - "(decoded data are shorter than expected)."); -} - - -void -invalidCode () -{ - throw InputExc ("Error in Huffman-encoded data " - "(invalid code)."); -} - - -void -invalidTableSize () -{ - throw InputExc ("Error in Huffman-encoded data " - "(invalid code table size)."); -} - - -void -unexpectedEndOfTable () -{ - throw InputExc ("Error in Huffman-encoded data " - "(unexpected end of code table data)."); -} - - -void -tableTooLong () -{ - throw InputExc ("Error in Huffman-encoded data " - "(code table is longer than expected)."); -} - - -void -invalidTableEntry () -{ - throw InputExc ("Error in Huffman-encoded data " - "(invalid code table entry)."); -} - - -inline Int64 -hufLength (Int64 code) -{ - return code & 63; -} - - -inline Int64 -hufCode (Int64 code) -{ - return code >> 6; -} - - -inline void -outputBits (int nBits, Int64 bits, Int64 &c, int &lc, char *&out) -{ - c <<= nBits; - lc += nBits; - - c |= bits; - - while (lc >= 8) - *out++ = (c >> (lc -= 8)); -} - - -inline Int64 -getBits (int nBits, Int64 &c, int &lc, const char *&in) -{ - while (lc < nBits) - { - c = (c << 8) | *(unsigned char *)(in++); - lc += 8; - } - - lc -= nBits; - return (c >> lc) & ((1 << nBits) - 1); -} - - -// -// ENCODING TABLE BUILDING & (UN)PACKING -// - -// -// Build a "canonical" Huffman code table: -// - for each (uncompressed) symbol, hcode contains the length -// of the corresponding code (in the compressed data) -// - canonical codes are computed and stored in hcode -// - the rules for constructing canonical codes are as follows: -// * shorter codes (if filled with zeroes to the right) -// have a numerically higher value than longer codes -// * for codes with the same length, numerical values -// increase with numerical symbol values -// - because the canonical code table can be constructed from -// symbol lengths alone, the code table can be transmitted -// without sending the actual code values -// - see http://www.compressconsult.com/huffman/ -// - -void -hufCanonicalCodeTable (Int64 hcode[HUF_ENCSIZE]) -{ - Int64 n[59]; - - // - // For each i from 0 through 58, count the - // number of different codes of length i, and - // store the count in n[i]. - // - - for (int i = 0; i <= 58; ++i) - n[i] = 0; - - for (int i = 0; i < HUF_ENCSIZE; ++i) - n[hcode[i]] += 1; - - // - // For each i from 58 through 1, compute the - // numerically lowest code with length i, and - // store that code in n[i]. - // - - Int64 c = 0; - - for (int i = 58; i > 0; --i) - { - Int64 nc = ((c + n[i]) >> 1); - n[i] = c; - c = nc; - } - - // - // hcode[i] contains the length, l, of the - // code for symbol i. Assign the next available - // code of length l to the symbol and store both - // l and the code in hcode[i]. - // - - for (int i = 0; i < HUF_ENCSIZE; ++i) - { - int l = hcode[i]; - - if (l > 0) - hcode[i] = l | (n[l]++ << 6); - } -} - - -// -// Compute Huffman codes (based on frq input) and store them in frq: -// - code structure is : [63:lsb - 6:msb] | [5-0: bit length]; -// - max code length is 58 bits; -// - codes outside the range [im-iM] have a null length (unused values); -// - original frequencies are destroyed; -// - encoding tables are used by hufEncode() and hufBuildDecTable(); -// - - -struct FHeapCompare -{ - bool operator () (Int64 *a, Int64 *b) {return *a > *b;} -}; - - -void -hufBuildEncTable - (Int64* frq, // io: input frequencies [HUF_ENCSIZE], output table - int* im, // o: min frq index - int* iM) // o: max frq index -{ - // - // This function assumes that when it is called, array frq - // indicates the frequency of all possible symbols in the data - // that are to be Huffman-encoded. (frq[i] contains the number - // of occurrences of symbol i in the data.) - // - // The loop below does three things: - // - // 1) Finds the minimum and maximum indices that point - // to non-zero entries in frq: - // - // frq[im] != 0, and frq[i] == 0 for all i < im - // frq[iM] != 0, and frq[i] == 0 for all i > iM - // - // 2) Fills array fHeap with pointers to all non-zero - // entries in frq. - // - // 3) Initializes array hlink such that hlink[i] == i - // for all array entries. - // - - AutoArray hlink; - AutoArray fHeap; - - *im = 0; - - while (!frq[*im]) - (*im)++; - - int nf = 0; - - for (int i = *im; i < HUF_ENCSIZE; i++) - { - hlink[i] = i; - - if (frq[i]) - { - fHeap[nf] = &frq[i]; - nf++; - *iM = i; - } - } - - // - // Add a pseudo-symbol, with a frequency count of 1, to frq; - // adjust the fHeap and hlink array accordingly. Function - // hufEncode() uses the pseudo-symbol for run-length encoding. - // - - (*iM)++; - frq[*iM] = 1; - fHeap[nf] = &frq[*iM]; - nf++; - - // - // Build an array, scode, such that scode[i] contains the number - // of bits assigned to symbol i. Conceptually this is done by - // constructing a tree whose leaves are the symbols with non-zero - // frequency: - // - // Make a heap that contains all symbols with a non-zero frequency, - // with the least frequent symbol on top. - // - // Repeat until only one symbol is left on the heap: - // - // Take the two least frequent symbols off the top of the heap. - // Create a new node that has first two nodes as children, and - // whose frequency is the sum of the frequencies of the first - // two nodes. Put the new node back into the heap. - // - // The last node left on the heap is the root of the tree. For each - // leaf node, the distance between the root and the leaf is the length - // of the code for the corresponding symbol. - // - // The loop below doesn't actually build the tree; instead we compute - // the distances of the leaves from the root on the fly. When a new - // node is added to the heap, then that node's descendants are linked - // into a single linear list that starts at the new node, and the code - // lengths of the descendants (that is, their distance from the root - // of the tree) are incremented by one. - // - - make_heap (&fHeap[0], &fHeap[nf], FHeapCompare()); - - AutoArray scode; - memset (scode, 0, sizeof (Int64) * HUF_ENCSIZE); - - while (nf > 1) - { - // - // Find the indices, mm and m, of the two smallest non-zero frq - // values in fHeap, add the smallest frq to the second-smallest - // frq, and remove the smallest frq value from fHeap. - // - - int mm = fHeap[0] - frq; - pop_heap (&fHeap[0], &fHeap[nf], FHeapCompare()); - --nf; - - int m = fHeap[0] - frq; - pop_heap (&fHeap[0], &fHeap[nf], FHeapCompare()); - - frq[m ] += frq[mm]; - push_heap (&fHeap[0], &fHeap[nf], FHeapCompare()); - - // - // The entries in scode are linked into lists with the - // entries in hlink serving as "next" pointers and with - // the end of a list marked by hlink[j] == j. - // - // Traverse the lists that start at scode[m] and scode[mm]. - // For each element visited, increment the length of the - // corresponding code by one bit. (If we visit scode[j] - // during the traversal, then the code for symbol j becomes - // one bit longer.) - // - // Merge the lists that start at scode[m] and scode[mm] - // into a single list that starts at scode[m]. - // - - // - // Add a bit to all codes in the first list. - // - - for (int j = m; true; j = hlink[j]) - { - scode[j]++; - - assert (scode[j] <= 58); - - if (hlink[j] == j) - { - // - // Merge the two lists. - // - - hlink[j] = mm; - break; - } - } - - // - // Add a bit to all codes in the second list - // - - for (int j = mm; true; j = hlink[j]) - { - scode[j]++; - - assert (scode[j] <= 58); - - if (hlink[j] == j) - break; - } - } - - // - // Build a canonical Huffman code table, replacing the code - // lengths in scode with (code, code length) pairs. Copy the - // code table from scode into frq. - // - - hufCanonicalCodeTable (scode); - memcpy (frq, scode, sizeof (Int64) * HUF_ENCSIZE); -} - - -// -// Pack an encoding table: -// - only code lengths, not actual codes, are stored -// - runs of zeroes are compressed as follows: -// -// unpacked packed -// -------------------------------- -// 1 zero 0 (6 bits) -// 2 zeroes 59 -// 3 zeroes 60 -// 4 zeroes 61 -// 5 zeroes 62 -// n zeroes (6 or more) 63 n-6 (6 + 8 bits) -// - -const int SHORT_ZEROCODE_RUN = 59; -const int LONG_ZEROCODE_RUN = 63; -const int SHORTEST_LONG_RUN = 2 + LONG_ZEROCODE_RUN - SHORT_ZEROCODE_RUN; -const int LONGEST_LONG_RUN = 255 + SHORTEST_LONG_RUN; - - -void -hufPackEncTable - (const Int64* hcode, // i : encoding table [HUF_ENCSIZE] - int im, // i : min hcode index - int iM, // i : max hcode index - char** pcode) // o: ptr to packed table (updated) -{ - char *p = *pcode; - Int64 c = 0; - int lc = 0; - - for (; im <= iM; im++) - { - int l = hufLength (hcode[im]); - - if (l == 0) - { - int zerun = 1; - - while ((im < iM) && (zerun < LONGEST_LONG_RUN)) - { - if (hufLength (hcode[im+1]) > 0 ) - break; - im++; - zerun++; - } - - if (zerun >= 2) - { - if (zerun >= SHORTEST_LONG_RUN) - { - outputBits (6, LONG_ZEROCODE_RUN, c, lc, p); - outputBits (8, zerun - SHORTEST_LONG_RUN, c, lc, p); - } - else - { - outputBits (6, SHORT_ZEROCODE_RUN + zerun - 2, c, lc, p); - } - continue; - } - } - - outputBits (6, l, c, lc, p); - } - - if (lc > 0) - *p++ = (unsigned char) (c << (8 - lc)); - - *pcode = p; -} - - -// -// Unpack an encoding table packed by hufPackEncTable(): -// - -void -hufUnpackEncTable - (const char** pcode, // io: ptr to packed table (updated) - int ni, // i : input size (in bytes) - int im, // i : min hcode index - int iM, // i : max hcode index - Int64* hcode) // o: encoding table [HUF_ENCSIZE] -{ - memset (hcode, 0, sizeof (Int64) * HUF_ENCSIZE); - - const char *p = *pcode; - Int64 c = 0; - int lc = 0; - - for (; im <= iM; im++) - { - if (p - *pcode > ni) - unexpectedEndOfTable(); - - Int64 l = hcode[im] = getBits (6, c, lc, p); // code length - - if (l == (Int64) LONG_ZEROCODE_RUN) - { - if (p - *pcode > ni) - unexpectedEndOfTable(); - - int zerun = getBits (8, c, lc, p) + SHORTEST_LONG_RUN; - - if (im + zerun > iM + 1) - tableTooLong(); - - while (zerun--) - hcode[im++] = 0; - - im--; - } - else if (l >= (Int64) SHORT_ZEROCODE_RUN) - { - int zerun = l - SHORT_ZEROCODE_RUN + 2; - - if (im + zerun > iM + 1) - tableTooLong(); - - while (zerun--) - hcode[im++] = 0; - - im--; - } - } - - *pcode = const_cast(p); - - hufCanonicalCodeTable (hcode); -} - - -// -// DECODING TABLE BUILDING -// - -// -// Clear a newly allocated decoding table so that it contains only zeroes. -// - -void -hufClearDecTable - (HufDec * hdecod) // io: (allocated by caller) - // decoding table [HUF_DECSIZE] -{ - memset (hdecod, 0, sizeof (HufDec) * HUF_DECSIZE); -} - - -// -// Build a decoding hash table based on the encoding table hcode: -// - short codes (<= HUF_DECBITS) are resolved with a single table access; -// - long code entry allocations are not optimized, because long codes are -// unfrequent; -// - decoding tables are used by hufDecode(); -// - -void -hufBuildDecTable - (const Int64* hcode, // i : encoding table - int im, // i : min index in hcode - int iM, // i : max index in hcode - HufDec * hdecod) // o: (allocated by caller) - // decoding table [HUF_DECSIZE] -{ - // - // Init hashtable & loop on all codes. - // Assumes that hufClearDecTable(hdecod) has already been called. - // - - for (; im <= iM; im++) - { - Int64 c = hufCode (hcode[im]); - int l = hufLength (hcode[im]); - - if (c >> l) - { - // - // Error: c is supposed to be an l-bit code, - // but c contains a value that is greater - // than the largest l-bit number. - // - - invalidTableEntry(); - } - - if (l > HUF_DECBITS) - { - // - // Long code: add a secondary entry - // - - HufDec *pl = hdecod + (c >> (l - HUF_DECBITS)); - - if (pl->len) - { - // - // Error: a short code has already - // been stored in table entry *pl. - // - - invalidTableEntry(); - } - - pl->lit++; - - if (pl->p) - { - int *p = pl->p; - pl->p = new int [pl->lit]; - - for (int i = 0; i < pl->lit - 1; ++i) - pl->p[i] = p[i]; - - delete [] p; - } - else - { - pl->p = new int [1]; - } - - pl->p[pl->lit - 1]= im; - } - else if (l) - { - // - // Short code: init all primary entries - // - - HufDec *pl = hdecod + (c << (HUF_DECBITS - l)); - - for (Int64 i = 1 << (HUF_DECBITS - l); i > 0; i--, pl++) - { - if (pl->len || pl->p) - { - // - // Error: a short code or a long code has - // already been stored in table entry *pl. - // - - invalidTableEntry(); - } - - pl->len = l; - pl->lit = im; - } - } - } -} - - -// -// Free the long code entries of a decoding table built by hufBuildDecTable() -// - -void -hufFreeDecTable (HufDec *hdecod) // io: Decoding table -{ - for (int i = 0; i < HUF_DECSIZE; i++) - { - if (hdecod[i].p) - { - delete [] hdecod[i].p; - hdecod[i].p = 0; - } - } -} - - -// -// ENCODING -// - -inline void -outputCode (Int64 code, Int64 &c, int &lc, char *&out) -{ - outputBits (hufLength (code), hufCode (code), c, lc, out); -} - - -inline void -sendCode (Int64 sCode, int runCount, Int64 runCode, - Int64 &c, int &lc, char *&out) -{ - // - // Output a run of runCount instances of the symbol sCount. - // Output the symbols explicitly, or if that is shorter, output - // the sCode symbol once followed by a runCode symbol and runCount - // expressed as an 8-bit number. - // - - if (hufLength (sCode) + hufLength (runCode) + 8 < - hufLength (sCode) * runCount) - { - outputCode (sCode, c, lc, out); - outputCode (runCode, c, lc, out); - outputBits (8, runCount, c, lc, out); - } - else - { - while (runCount-- >= 0) - outputCode (sCode, c, lc, out); - } -} - - -// -// Encode (compress) ni values based on the Huffman encoding table hcode: -// - -int -hufEncode // return: output size (in bits) - (const Int64* hcode, // i : encoding table - const unsigned short* in, // i : uncompressed input buffer - const int ni, // i : input buffer size (in bytes) - int rlc, // i : rl code - char* out) // o: compressed output buffer -{ - char *outStart = out; - Int64 c = 0; // bits not yet written to out - int lc = 0; // number of valid bits in c (LSB) - int s = in[0]; - int cs = 0; - - // - // Loop on input values - // - - for (int i = 1; i < ni; i++) - { - // - // Count same values or send code - // - - if (s == in[i] && cs < 255) - { - cs++; - } - else - { - sendCode (hcode[s], cs, hcode[rlc], c, lc, out); - cs=0; - } - - s = in[i]; - } - - // - // Send remaining code - // - - sendCode (hcode[s], cs, hcode[rlc], c, lc, out); - - if (lc) - *out = (c << (8 - lc)) & 0xff; - - return (out - outStart) * 8 + lc; -} - - -// -// DECODING -// - -// -// In order to force the compiler to inline them, -// getChar() and getCode() are implemented as macros -// instead of "inline" functions. -// - -#define getChar(c, lc, in) \ -{ \ - c = (c << 8) | *(unsigned char *)(in++); \ - lc += 8; \ -} - - -#define getCode(po, rlc, c, lc, in, out, ob, oe)\ -{ \ - if (po == rlc) \ - { \ - if (lc < 8) \ - getChar(c, lc, in); \ - \ - lc -= 8; \ - \ - unsigned char cs = (c >> lc); \ - \ - if (out + cs > oe) \ - tooMuchData(); \ - else if (out - 1 < ob) \ - notEnoughData(); \ - \ - unsigned short s = out[-1]; \ - \ - while (cs-- > 0) \ - *out++ = s; \ - } \ - else if (out < oe) \ - { \ - *out++ = po; \ - } \ - else \ - { \ - tooMuchData(); \ - } \ -} - - -// -// Decode (uncompress) ni bits based on encoding & decoding tables: -// - -void -hufDecode - (const Int64 * hcode, // i : encoding table - const HufDec * hdecod, // i : decoding table - const char* in, // i : compressed input buffer - int ni, // i : input size (in bits) - int rlc, // i : run-length code - int no, // i : expected output size (in bytes) - unsigned short* out) // o: uncompressed output buffer -{ - Int64 c = 0; - int lc = 0; - unsigned short * outb = out; - unsigned short * oe = out + no; - const char * ie = in + (ni + 7) / 8; // input byte size - - // - // Loop on input bytes - // - - while (in < ie) - { - getChar (c, lc, in); - - // - // Access decoding table - // - - while (lc >= HUF_DECBITS) - { - const HufDec pl = hdecod[(c >> (lc-HUF_DECBITS)) & HUF_DECMASK]; - - if (pl.len) - { - // - // Get short code - // - - lc -= pl.len; - getCode (pl.lit, rlc, c, lc, in, out, outb, oe); - } - else - { - if (!pl.p) - invalidCode(); // wrong code - - // - // Search long code - // - - int j; - - for (j = 0; j < pl.lit; j++) - { - int l = hufLength (hcode[pl.p[j]]); - - while (lc < l && in < ie) // get more bits - getChar (c, lc, in); - - if (lc >= l) - { - if (hufCode (hcode[pl.p[j]]) == - ((c >> (lc - l)) & ((Int64(1) << l) - 1))) - { - // - // Found : get long code - // - - lc -= l; - getCode (pl.p[j], rlc, c, lc, in, out, outb, oe); - break; - } - } - } - - if (j == pl.lit) - invalidCode(); // Not found - } - } - } - - // - // Get remaining (short) codes - // - - int i = (8 - ni) & 7; - c >>= i; - lc -= i; - - while (lc > 0) - { - const HufDec pl = hdecod[(c << (HUF_DECBITS - lc)) & HUF_DECMASK]; - - if (pl.len) - { - lc -= pl.len; - getCode (pl.lit, rlc, c, lc, in, out, outb, oe); - } - else - { - invalidCode(); // wrong (long) code - } - } - - if (out - outb != no) - notEnoughData (); -} - - -void -countFrequencies (Int64 freq[HUF_ENCSIZE], - const unsigned short data[/*n*/], - int n) -{ - for (int i = 0; i < HUF_ENCSIZE; ++i) - freq[i] = 0; - - for (int i = 0; i < n; ++i) - ++freq[data[i]]; -} - - -void -writeUInt (char buf[4], unsigned int i) -{ - unsigned char *b = (unsigned char *) buf; - - b[0] = i; - b[1] = i >> 8; - b[2] = i >> 16; - b[3] = i >> 24; -} - - -unsigned int -readUInt (const char buf[4]) -{ - const unsigned char *b = (const unsigned char *) buf; - - return ( b[0] & 0x000000ff) | - ((b[1] << 8) & 0x0000ff00) | - ((b[2] << 16) & 0x00ff0000) | - ((b[3] << 24) & 0xff000000); -} - -} // namespace - - -// -// EXTERNAL INTERFACE -// - - -int -hufCompress (const unsigned short raw[], - int nRaw, - char compressed[]) -{ - if (nRaw == 0) - return 0; - - AutoArray freq; - - countFrequencies (freq, raw, nRaw); - - int im = 0; - int iM = 0; - hufBuildEncTable (freq, &im, &iM); - - char *tableStart = compressed + 20; - char *tableEnd = tableStart; - hufPackEncTable (freq, im, iM, &tableEnd); - int tableLength = tableEnd - tableStart; - - char *dataStart = tableEnd; - int nBits = hufEncode (freq, raw, nRaw, iM, dataStart); - int dataLength = (nBits + 7) / 8; - - writeUInt (compressed, im); - writeUInt (compressed + 4, iM); - writeUInt (compressed + 8, tableLength); - writeUInt (compressed + 12, nBits); - writeUInt (compressed + 16, 0); // room for future extensions - - return dataStart + dataLength - compressed; -} - - -void -hufUncompress (const char compressed[], - int nCompressed, - unsigned short raw[], - int nRaw) -{ - if (nCompressed == 0) - { - if (nRaw != 0) - notEnoughData(); - - return; - } - - int im = readUInt (compressed); - int iM = readUInt (compressed + 4); - // int tableLength = readUInt (compressed + 8); - int nBits = readUInt (compressed + 12); - - if (im < 0 || im >= HUF_ENCSIZE || iM < 0 || iM >= HUF_ENCSIZE) - invalidTableSize(); - - const char *ptr = compressed + 20; - - // - // Fast decoder needs at least 2x64-bits of compressed data, and - // needs to be run-able on this platform. Otherwise, fall back - // to the original decoder - // - - if (FastHufDecoder::enabled() && nBits > 128) - { - FastHufDecoder fhd (ptr, nCompressed - (ptr - compressed), im, iM, iM); - fhd.decode ((unsigned char*)ptr, nBits, raw, nRaw); - } - else - { - AutoArray freq; - AutoArray hdec; - - hufClearDecTable (hdec); - - hufUnpackEncTable (&ptr, - nCompressed - (ptr - compressed), - im, - iM, - freq); - - try - { - if (nBits > 8 * (nCompressed - (ptr - compressed))) - invalidNBits(); - - hufBuildDecTable (freq, im, iM, hdec); - hufDecode (freq, hdec, ptr, nBits, iM, nRaw, raw); - } - catch (...) - { - hufFreeDecTable (hdec); - throw; - } - - hufFreeDecTable (hdec); - } -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHuf.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHuf.h deleted file mode 100644 index fa89604..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfHuf.h +++ /dev/null @@ -1,82 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_HUF_H -#define INCLUDED_IMF_HUF_H - -#include "ImfExport.h" -#include "ImfNamespace.h" - -//----------------------------------------------------------------------------- -// -// 16-bit Huffman compression and decompression: -// -// hufCompress (r, nr, c) -// -// Compresses the contents of array r (of length nr), -// stores the compressed data in array c, and returns -// the size of the compressed data (in bytes). -// -// To avoid buffer overflows, the size of array c should -// be at least 2 * nr + 65536. -// -// hufUncompress (c, nc, r, nr) -// -// Uncompresses the data in array c (with length nc), -// and stores the results in array r (with length nr). -// -//----------------------------------------------------------------------------- - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -IMF_EXPORT -int -hufCompress (const unsigned short raw[/*nRaw*/], - int nRaw, - char compressed[/*2 * nRaw + 65536*/]); - -IMF_EXPORT -void -hufUncompress (const char compressed[/*nCompressed*/], - int nCompressed, - unsigned short raw[/*nRaw*/], - int nRaw); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIO.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIO.cpp deleted file mode 100644 index c52fc54..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIO.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// Low-level file input and output for OpenEXR. -// -//----------------------------------------------------------------------------- - -#include -#include "Iex.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -IStream::IStream (const char fileName[]): _fileName (fileName) -{ - // empty -} - - -IStream::~IStream () -{ - // empty -} - - -bool -IStream::isMemoryMapped () const -{ - return false; -} - - -char * -IStream::readMemoryMapped (int n) -{ - throw IEX_NAMESPACE::InputExc ("Attempt to perform a memory-mapped read " - "on a file that is not memory mapped."); - return 0; -} - - -void -IStream::clear () -{ - // empty -} - - -const char * -IStream::fileName () const -{ - return _fileName.c_str(); -} - - -OStream::OStream (const char fileName[]): _fileName (fileName) -{ - // empty -} - - -OStream::~OStream () -{ - // empty -} - - -const char * -OStream::fileName () const -{ - return _fileName.c_str(); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIO.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIO.h deleted file mode 100644 index 4416d17..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIO.h +++ /dev/null @@ -1,255 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_IO_H -#define INCLUDED_IMF_IO_H - -//----------------------------------------------------------------------------- -// -// Low-level file input and output for OpenEXR. -// -//----------------------------------------------------------------------------- - -#include "ImfInt64.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -//----------------------------------------------------------- -// class IStream -- an abstract base class for input streams. -//----------------------------------------------------------- - -class IMF_EXPORT IStream -{ - public: - - //----------- - // Destructor - //----------- - - virtual ~IStream (); - - - //------------------------------------------------- - // Does this input stream support memory-mapped IO? - // - // Memory-mapped streams can avoid an extra copy; - // memory-mapped read operations return a pointer - // to an internal buffer instead of copying data - // into a buffer supplied by the caller. - //------------------------------------------------- - - virtual bool isMemoryMapped () const; - - - //------------------------------------------------------ - // Read from the stream: - // - // read(c,n) reads n bytes from the stream, and stores - // them in array c. If the stream contains less than n - // bytes, or if an I/O error occurs, read(c,n) throws - // an exception. If read(c,n) reads the last byte from - // the file it returns false, otherwise it returns true. - //------------------------------------------------------ - - virtual bool read (char c[/*n*/], int n) = 0; - - - //--------------------------------------------------- - // Read from a memory-mapped stream: - // - // readMemoryMapped(n) reads n bytes from the stream - // and returns a pointer to the first byte. The - // returned pointer remains valid until the stream - // is closed. If there are less than n byte left to - // read in the stream or if the stream is not memory- - // mapped, readMemoryMapped(n) throws an exception. - //--------------------------------------------------- - - virtual char * readMemoryMapped (int n); - - - //-------------------------------------------------------- - // Get the current reading position, in bytes from the - // beginning of the file. If the next call to read() will - // read the first byte in the file, tellg() returns 0. - //-------------------------------------------------------- - - virtual Int64 tellg () = 0; - - - //------------------------------------------- - // Set the current reading position. - // After calling seekg(i), tellg() returns i. - //------------------------------------------- - - virtual void seekg (Int64 pos) = 0; - - - //------------------------------------------------------ - // Clear error conditions after an operation has failed. - //------------------------------------------------------ - - virtual void clear (); - - - //------------------------------------------------------ - // Get the name of the file associated with this stream. - //------------------------------------------------------ - - const char * fileName () const; - - protected: - - IStream (const char fileName[]); - - private: - - IStream (const IStream &); // not implemented - IStream & operator = (const IStream &); // not implemented - - std::string _fileName; -}; - - -//----------------------------------------------------------- -// class OStream -- an abstract base class for output streams -//----------------------------------------------------------- - -class IMF_EXPORT OStream -{ - public: - - //----------- - // Destructor - //----------- - - virtual ~OStream (); - - - //---------------------------------------------------------- - // Write to the stream: - // - // write(c,n) takes n bytes from array c, and stores them - // in the stream. If an I/O error occurs, write(c,n) throws - // an exception. - //---------------------------------------------------------- - - virtual void write (const char c[/*n*/], int n) = 0; - - - //--------------------------------------------------------- - // Get the current writing position, in bytes from the - // beginning of the file. If the next call to write() will - // start writing at the beginning of the file, tellp() - // returns 0. - //--------------------------------------------------------- - - virtual Int64 tellp () = 0; - - - //------------------------------------------- - // Set the current writing position. - // After calling seekp(i), tellp() returns i. - //------------------------------------------- - - virtual void seekp (Int64 pos) = 0; - - - //------------------------------------------------------ - // Get the name of the file associated with this stream. - //------------------------------------------------------ - - const char * fileName () const; - - protected: - - OStream (const char fileName[]); - - private: - - OStream (const OStream &); // not implemented - OStream & operator = (const OStream &); // not implemented - - std::string _fileName; -}; - - -//----------------------- -// Helper classes for Xdr -//----------------------- - -struct StreamIO -{ - static void - writeChars (OStream &os, const char c[/*n*/], int n) - { - os.write (c, n); - } - - static bool - readChars (IStream &is, char c[/*n*/], int n) - { - return is.read (c, n); - } -}; - - -struct CharPtrIO -{ - static void - writeChars (char *&op, const char c[/*n*/], int n) - { - while (n--) - *op++ = *c++; - } - - static bool - readChars (const char *&ip, char c[/*n*/], int n) - { - while (n--) - *c++ = *ip++; - - return true; - } -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputFile.cpp deleted file mode 100644 index 3f4f861..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputFile.cpp +++ /dev/null @@ -1,895 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class InputFile -// -//----------------------------------------------------------------------------- - -#include "ImfInputFile.h" -#include "ImfScanLineInputFile.h" -#include "ImfTiledInputFile.h" -#include "ImfChannelList.h" -#include "ImfMisc.h" -#include "ImfStdIO.h" -#include "ImfVersion.h" -#include "ImfPartType.h" -#include "ImfInputPartData.h" -#include "ImfMultiPartInputFile.h" - -#include -#include - -#include "ImathFun.h" -#include "IlmThreadMutex.h" -#include "Iex.h" -#include "half.h" - -#include -#include - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::divp; -using IMATH_NAMESPACE::modp; -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; - - -// -// Struct InputFile::Data stores things that will be -// needed between calls to readPixels -// - -struct InputFile::Data : public Mutex -{ - Header header; - int version; - bool isTiled; - - TiledInputFile * tFile; - ScanLineInputFile * sFile; - DeepScanLineInputFile * dsFile; - - LineOrder lineOrder; // the file's lineorder - int minY; // data window's min y coord - int maxY; // data window's max x coord - - FrameBuffer tFileBuffer; - FrameBuffer * cachedBuffer; - CompositeDeepScanLine * compositor; // for loading deep files - - int cachedTileY; - int offset; - - int numThreads; - - int partNumber; - InputPartData* part; - - bool multiPartBackwardSupport; - MultiPartInputFile* multiPartFile; - InputStreamMutex * _streamData; - bool _deleteStream; - - Data (int numThreads); - ~Data (); - - void deleteCachedBuffer(); -}; - - -InputFile::Data::Data (int numThreads): - isTiled (false), - tFile (0), - sFile (0), - dsFile(0), - cachedBuffer (0), - compositor(0), - cachedTileY (-1), - numThreads (numThreads), - partNumber (-1), - part(NULL), - multiPartBackwardSupport (false), - multiPartFile (0), - _streamData(0), - _deleteStream(false) - -{ - // empty -} - - -InputFile::Data::~Data () -{ - if (tFile) - delete tFile; - if (sFile) - delete sFile; - if (dsFile) - delete dsFile; - if (compositor) - delete compositor; - - deleteCachedBuffer(); - - if (multiPartBackwardSupport && multiPartFile) - delete multiPartFile; -} - - -void -InputFile::Data::deleteCachedBuffer() -{ - // - // Delete the cached frame buffer, and all memory - // allocated for the slices in the cached frameBuffer. - // - - if (cachedBuffer) - { - for (FrameBuffer::Iterator k = cachedBuffer->begin(); - k != cachedBuffer->end(); - ++k) - { - Slice &s = k.slice(); - - switch (s.type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - delete [] (((unsigned int *)s.base) + offset); - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - delete [] ((half *)s.base + offset); - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - delete [] (((float *)s.base) + offset); - break; - case NUM_PIXELTYPES : - throw(IEX_NAMESPACE::ArgExc("Invalid pixel type")); - } - } - - // - // delete the cached frame buffer - // - - delete cachedBuffer; - cachedBuffer = 0; - } -} - - -namespace { - -void -bufferedReadPixels (InputFile::Data* ifd, int scanLine1, int scanLine2) -{ - // - // bufferedReadPixels reads each row of tiles that intersect the - // scan-line range (scanLine1 to scanLine2). The previous row of - // tiles is cached in order to prevent redundent tile reads when - // accessing scanlines sequentially. - // - - int minY = std::min (scanLine1, scanLine2); - int maxY = std::max (scanLine1, scanLine2); - - if (minY < ifd->minY || maxY > ifd->maxY) - { - throw IEX_NAMESPACE::ArgExc ("Tried to read scan line outside " - "the image file's data window."); - } - - // - // The minimum and maximum y tile coordinates that intersect this - // scanline range - // - - int minDy = (minY - ifd->minY) / ifd->tFile->tileYSize(); - int maxDy = (maxY - ifd->minY) / ifd->tFile->tileYSize(); - - // - // Figure out which one is first in the file so we can read without seeking - // - - int yStart, yEnd, yStep; - - if (ifd->lineOrder == DECREASING_Y) - { - yStart = maxDy; - yEnd = minDy - 1; - yStep = -1; - } - else - { - yStart = minDy; - yEnd = maxDy + 1; - yStep = 1; - } - - // - // the number of pixels in a row of tiles - // - - Box2i levelRange = ifd->tFile->dataWindowForLevel(0); - - // - // Read the tiles into our temporary framebuffer and copy them into - // the user's buffer - // - - for (int j = yStart; j != yEnd; j += yStep) - { - Box2i tileRange = ifd->tFile->dataWindowForTile (0, j, 0); - - int minYThisRow = std::max (minY, tileRange.min.y); - int maxYThisRow = std::min (maxY, tileRange.max.y); - - if (j != ifd->cachedTileY) - { - // - // We don't have any valid buffered info, so we need to read in - // from the file. - // - - ifd->tFile->readTiles (0, ifd->tFile->numXTiles (0) - 1, j, j); - ifd->cachedTileY = j; - } - - // - // Copy the data from our cached framebuffer into the user's - // framebuffer. - // - - for (FrameBuffer::ConstIterator k = ifd->cachedBuffer->begin(); - k != ifd->cachedBuffer->end(); - ++k) - { - Slice fromSlice = k.slice(); // slice to write from - Slice toSlice = ifd->tFileBuffer[k.name()]; // slice to write to - - char *fromPtr, *toPtr; - int size = pixelTypeSize (toSlice.type); - - int xStart = levelRange.min.x; - int yStart = minYThisRow; - - while (modp (xStart, toSlice.xSampling) != 0) - ++xStart; - - while (modp (yStart, toSlice.ySampling) != 0) - ++yStart; - - for (int y = yStart; - y <= maxYThisRow; - y += toSlice.ySampling) - { - // - // Set the pointers to the start of the y scanline in - // this row of tiles - // - - fromPtr = fromSlice.base + - (y - tileRange.min.y) * fromSlice.yStride + - xStart * fromSlice.xStride; - - toPtr = toSlice.base + - divp (y, toSlice.ySampling) * toSlice.yStride + - divp (xStart, toSlice.xSampling) * toSlice.xStride; - - // - // Copy all pixels for the scanline in this row of tiles - // - - for (int x = xStart; - x <= levelRange.max.x; - x += toSlice.xSampling) - { - for (int i = 0; i < size; ++i) - toPtr[i] = fromPtr[i]; - - fromPtr += fromSlice.xStride * toSlice.xSampling; - toPtr += toSlice.xStride; - } - } - } - } -} - -} // namespace - - - -InputFile::InputFile (const char fileName[], int numThreads): - _data (new Data (numThreads)) -{ - _data->_streamData = NULL; - _data->_deleteStream=true; - - OPENEXR_IMF_INTERNAL_NAMESPACE::IStream* is = 0; - try - { - is = new StdIFStream (fileName); - readMagicNumberAndVersionField(*is, _data->version); - - // - // compatibility to read multipart file. - // - if (isMultiPart(_data->version)) - { - compatibilityInitialize(*is); - } - else - { - _data->_streamData = new InputStreamMutex(); - _data->_streamData->is = is; - _data->header.readFrom (*_data->_streamData->is, _data->version); - - // fix type attribute in single part regular image types - // (may be wrong if an old version of OpenEXR converts - // a tiled image to scanline or vice versa) - if(!isNonImage(_data->version) && - !isMultiPart(_data->version) && - _data->header.hasType()) - { - _data->header.setType(isTiled(_data->version) ? TILEDIMAGE : SCANLINEIMAGE); - } - - _data->header.sanityCheck (isTiled (_data->version)); - - initialize(); - } - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (is) delete is; - - if ( _data && !_data->multiPartBackwardSupport && _data->_streamData) - { - delete _data->_streamData; - _data->_streamData=NULL; - } - - if (_data) delete _data; - _data=NULL; - - REPLACE_EXC (e, "Cannot read image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - if (is) delete is; - if (_data && !_data->multiPartBackwardSupport && _data->_streamData) - { - delete _data->_streamData; - } - if (_data) delete _data; - - throw; - } -} - - -InputFile::InputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads): - _data (new Data (numThreads)) -{ - _data->_streamData=NULL; - _data->_deleteStream=false; - try - { - readMagicNumberAndVersionField(is, _data->version); - - // - // Backward compatibility to read multpart file. - // - if (isMultiPart(_data->version)) - { - compatibilityInitialize(is); - } - else - { - _data->_streamData = new InputStreamMutex(); - _data->_streamData->is = &is; - _data->header.readFrom (*_data->_streamData->is, _data->version); - - // fix type attribute in single part regular image types - // (may be wrong if an old version of OpenEXR converts - // a tiled image to scanline or vice versa) - if(!isNonImage(_data->version) && - !isMultiPart(_data->version) && - _data->header.hasType()) - { - _data->header.setType(isTiled(_data->version) ? TILEDIMAGE : SCANLINEIMAGE); - } - - _data->header.sanityCheck (isTiled (_data->version)); - - initialize(); - } - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (_data && !_data->multiPartBackwardSupport && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - _data=NULL; - - REPLACE_EXC (e, "Cannot read image file " - "\"" << is.fileName() << "\". " << e); - throw; - } - catch (...) - { - if (_data && !_data->multiPartBackwardSupport && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - _data=NULL; - throw; - } -} - - -InputFile::InputFile (InputPartData* part) : - _data (new Data (part->numThreads)) -{ - _data->_deleteStream=false; - multiPartInitialize (part); -} - - -void -InputFile::compatibilityInitialize (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is) -{ - is.seekg(0); - - // - // Construct a MultiPartInputFile, initialize InputFile - // with the part 0 data. - // (TODO) may want to have a way to set the reconstruction flag. - // - _data->multiPartBackwardSupport = true; - _data->multiPartFile = new MultiPartInputFile(is, _data->numThreads); - InputPartData* part = _data->multiPartFile->getPart(0); - - multiPartInitialize (part); -} - - -void -InputFile::multiPartInitialize (InputPartData* part) -{ - _data->_streamData = part->mutex; - _data->version = part->version; - _data->header = part->header; - _data->partNumber = part->partNumber; - _data->part = part; - - initialize(); -} - - -void -InputFile::initialize () -{ - if (!_data->part) - { - if(_data->header.hasType() && _data->header.type()==DEEPSCANLINE) - { - _data->isTiled=false; - const Box2i &dataWindow = _data->header.dataWindow(); - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - _data->dsFile = new DeepScanLineInputFile (_data->header, - _data->_streamData->is, - _data->version, - _data->numThreads); - _data->compositor = new CompositeDeepScanLine; - _data->compositor->addSource(_data->dsFile); - } - - else if (isTiled (_data->version)) - { - _data->isTiled = true; - _data->lineOrder = _data->header.lineOrder(); - - // - // Save the dataWindow information - // - - const Box2i &dataWindow = _data->header.dataWindow(); - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - _data->tFile = new TiledInputFile (_data->header, - _data->_streamData->is, - _data->version, - _data->numThreads); - } - - else if(!_data->header.hasType() || _data->header.type()==SCANLINEIMAGE) - { - _data->sFile = new ScanLineInputFile (_data->header, - _data->_streamData->is, - _data->numThreads); - }else{ - // type set but not recognised - - THROW(IEX_NAMESPACE::ArgExc, "InputFile cannot handle parts of type " << _data->header.type()); - } - } - else - { - if(_data->header.hasType() && _data->header.type()==DEEPSCANLINE) - { - _data->isTiled=false; - const Box2i &dataWindow = _data->header.dataWindow(); - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - _data->dsFile = new DeepScanLineInputFile (_data->part); - _data->compositor = new CompositeDeepScanLine; - _data->compositor->addSource(_data->dsFile); - } - else if (isTiled (_data->header.type())) - { - _data->isTiled = true; - _data->lineOrder = _data->header.lineOrder(); - - // - // Save the dataWindow information - // - - const Box2i &dataWindow = _data->header.dataWindow(); - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - _data->tFile = new TiledInputFile (_data->part); - } - else if(!_data->header.hasType() || _data->header.type()==SCANLINEIMAGE) - { - _data->sFile = new ScanLineInputFile (_data->part); - }else{ - THROW(IEX_NAMESPACE::ArgExc, "InputFile cannot handle parts of type " << _data->header.type()); - - } - } -} - -#include -InputFile::~InputFile () -{ - if (_data->_deleteStream) - delete _data->_streamData->is; - - // unless this file was opened via the multipart API, - // delete the streamData object too - if (_data->partNumber==-1 && _data->_streamData) - delete _data->_streamData; - - if (_data) delete _data; -} - -const char * -InputFile::fileName () const -{ - return _data->_streamData->is->fileName(); -} - - -const Header & -InputFile::header () const -{ - return _data->header; -} - - -int -InputFile::version () const -{ - return _data->version; -} - - -void -InputFile::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - if (_data->isTiled) - { - Lock lock (*_data); - - // - // We must invalidate the cached buffer if the new frame - // buffer has a different set of channels than the old - // frame buffer, or if the type of a channel has changed. - // - - const FrameBuffer &oldFrameBuffer = _data->tFileBuffer; - - FrameBuffer::ConstIterator i = oldFrameBuffer.begin(); - FrameBuffer::ConstIterator j = frameBuffer.begin(); - - while (i != oldFrameBuffer.end() && j != frameBuffer.end()) - { - if (strcmp (i.name(), j.name()) || i.slice().type != j.slice().type) - break; - - ++i; - ++j; - } - - if (i != oldFrameBuffer.end() || j != frameBuffer.end()) - { - // - // Invalidate the cached buffer. - // - - _data->deleteCachedBuffer (); - _data->cachedTileY = -1; - - // - // Create new a cached frame buffer. It can hold a single - // row of tiles. The cached buffer can be reused for each - // row of tiles because we set the yTileCoords parameter of - // each Slice to true. - // - - const Box2i &dataWindow = _data->header.dataWindow(); - _data->cachedBuffer = new FrameBuffer(); - _data->offset = dataWindow.min.x; - - int tileRowSize = (dataWindow.max.x - dataWindow.min.x + 1) * - _data->tFile->tileYSize(); - - for (FrameBuffer::ConstIterator k = frameBuffer.begin(); - k != frameBuffer.end(); - ++k) - { - Slice s = k.slice(); - - switch (s.type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - _data->cachedBuffer->insert - (k.name(), - Slice (UINT, - (char *)(new unsigned int[tileRowSize] - - _data->offset), - sizeof (unsigned int), - sizeof (unsigned int) * - _data->tFile->levelWidth(0), - 1, 1, - s.fillValue, - false, true)); - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - _data->cachedBuffer->insert - (k.name(), - Slice (HALF, - (char *)(new half[tileRowSize] - - _data->offset), - sizeof (half), - sizeof (half) * - _data->tFile->levelWidth(0), - 1, 1, - s.fillValue, - false, true)); - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - _data->cachedBuffer->insert - (k.name(), - Slice (OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT, - (char *)(new float[tileRowSize] - - _data->offset), - sizeof(float), - sizeof(float) * - _data->tFile->levelWidth(0), - 1, 1, - s.fillValue, - false, true)); - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } - - _data->tFile->setFrameBuffer (*_data->cachedBuffer); - } - - _data->tFileBuffer = frameBuffer; - } - else if(_data->compositor) - { - _data->compositor->setFrameBuffer(frameBuffer); - }else { - _data->sFile->setFrameBuffer(frameBuffer); - _data->tFileBuffer = frameBuffer; - } -} - - -const FrameBuffer & -InputFile::frameBuffer () const -{ - if(_data->compositor) - { - return _data->compositor->frameBuffer(); - } - else if(_data->isTiled) - { - Lock lock (*_data); - return _data->tFileBuffer; - } - else - { - return _data->sFile->frameBuffer(); - } -} - - -bool -InputFile::isComplete () const -{ - if (_data->dsFile) - return _data->dsFile->isComplete(); - else if (_data->isTiled) - return _data->tFile->isComplete(); - else - return _data->sFile->isComplete(); -} - -bool -InputFile::isOptimizationEnabled() const -{ - if(_data->sFile) - { - return _data->sFile->isOptimizationEnabled(); - }else{ - return false; - } -} - - -void -InputFile::readPixels (int scanLine1, int scanLine2) -{ - if (_data->compositor) - { - _data->compositor->readPixels(scanLine1,scanLine2); - } - else if (_data->isTiled) - { - Lock lock (*_data); - bufferedReadPixels (_data, scanLine1, scanLine2); - } - else - { - _data->sFile->readPixels (scanLine1, scanLine2); - } -} - - -void -InputFile::readPixels (int scanLine) -{ - readPixels (scanLine, scanLine); -} - - -void -InputFile::rawPixelData (int firstScanLine, - const char *&pixelData, - int &pixelDataSize) -{ - try - { - if (_data->dsFile) - { - throw IEX_NAMESPACE::ArgExc ("Tried to read a raw scanline " - "from a deep image."); - } - - else if (_data->isTiled) - { - throw IEX_NAMESPACE::ArgExc ("Tried to read a raw scanline " - "from a tiled image."); - } - - _data->sFile->rawPixelData (firstScanLine, pixelData, pixelDataSize); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error reading pixel data from image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -void -InputFile::rawTileData (int &dx, int &dy, - int &lx, int &ly, - const char *&pixelData, - int &pixelDataSize) -{ - try - { - if (!_data->isTiled) - { - throw IEX_NAMESPACE::ArgExc ("Tried to read a raw tile " - "from a scanline-based image."); - } - - _data->tFile->rawTileData (dx, dy, lx, ly, pixelData, pixelDataSize); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error reading tile data from image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -TiledInputFile* -InputFile::tFile() -{ - if (!_data->isTiled) - { - throw IEX_NAMESPACE::ArgExc ("Cannot get a TiledInputFile pointer " - "from an InputFile that is not tiled."); - } - - return _data->tFile; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputFile.h deleted file mode 100644 index 42c6352..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputFile.h +++ /dev/null @@ -1,240 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_INPUT_FILE_H -#define INCLUDED_IMF_INPUT_FILE_H - -//----------------------------------------------------------------------------- -// -// class InputFile -- a scanline-based interface that can be used -// to read both scanline-based and tiled OpenEXR image files. -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfFrameBuffer.h" -#include "ImfTiledOutputFile.h" -#include "ImfThreading.h" -#include "ImfGenericInputFile.h" -#include "ImfNamespace.h" -#include "ImfForward.h" -#include "ImfExport.h" - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT InputFile : public GenericInputFile -{ - public: - - //----------------------------------------------------------- - // A constructor that opens the file with the specified name. - // Destroying the InputFile object will close the file. - // - // numThreads determines the number of threads that will be - // used to read the file (see ImfThreading.h). - //----------------------------------------------------------- - - InputFile (const char fileName[], int numThreads = globalThreadCount()); - - - //------------------------------------------------------------- - // A constructor that attaches the new InputFile object to a - // file that has already been opened. Destroying the InputFile - // object will not close the file. - // - // numThreads determines the number of threads that will be - // used to read the file (see ImfThreading.h). - //------------------------------------------------------------- - - InputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads = globalThreadCount()); - - - //----------- - // Destructor - //----------- - - virtual ~InputFile (); - - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //---------------------------------- - // Access to the file format version - //---------------------------------- - - int version () const; - - - //----------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the InputFile object. - // - // The current frame buffer is the destination for the pixel - // data read from the file. The current frame buffer must be - // set at least once before readPixels() is called. - // The current frame buffer can be changed after each call - // to readPixels(). - //----------------------------------------------------------- - - void setFrameBuffer (const FrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const FrameBuffer & frameBuffer () const; - - - //--------------------------------------------------------------- - // Check if the file is complete: - // - // isComplete() returns true if all pixels in the data window are - // present in the input file, or false if any pixels are missing. - // (Another program may still be busy writing the file, or file - // writing may have been aborted prematurely.) - //--------------------------------------------------------------- - - bool isComplete () const; - - - //--------------------------------------------------------------- - // Check if SSE optimization is enabled - // - // Call after setFrameBuffer() to query whether optimized file decoding - // is available - decode times will be faster if returns true - // - // Optimization depends on: - // the file type (only scanline data is supported), - // the framebuffer channels (RGB/RGBA mono or stereo) - // the framebuffer channel types (all channels half-float format only) - // the file channels (RGB/RGBA mono or stereo) - // the file channel types (all channel half-float format only) - // whether SSE2 instruction support was detected at compile time - // - // Calling isOptimizationEnabled before setFrameBuffer will throw an exception - // - //--------------------------------------------------------------- - - bool isOptimizationEnabled () const; - - - - - //--------------------------------------------------------------- - // Read pixel data: - // - // readPixels(s1,s2) reads all scan lines with y coordinates - // in the interval [min (s1, s2), max (s1, s2)] from the file, - // and stores them in the current frame buffer. - // - // Both s1 and s2 must be within the interval - // [header().dataWindow().min.y, header().dataWindow().max.y] - // - // The scan lines can be read from the file in random order, and - // individual scan lines may be skipped or read multiple times. - // For maximum efficiency, the scan lines should be read in the - // order in which they were written to the file. - // - // readPixels(s) calls readPixels(s,s). - // - //--------------------------------------------------------------- - - void readPixels (int scanLine1, int scanLine2); - void readPixels (int scanLine); - - - //---------------------------------------------- - // Read a block of raw pixel data from the file, - // without uncompressing it (this function is - // used to implement OutputFile::copyPixels()). - //---------------------------------------------- - - void rawPixelData (int firstScanLine, - const char *&pixelData, - int &pixelDataSize); - - //-------------------------------------------------- - // Read a tile of raw pixel data from the file, - // without uncompressing it (this function is - // used to implement TiledOutputFile::copyPixels()). - //-------------------------------------------------- - - void rawTileData (int &dx, int &dy, - int &lx, int &ly, - const char *&pixelData, - int &pixelDataSize); - - struct Data; - - private: - - InputFile (InputPartData* part); - InputFile (const InputFile &); // not implemented - InputFile & operator = (const InputFile &); // not implemented - - void initialize (); - void multiPartInitialize(InputPartData* part); - void compatibilityInitialize(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is); - TiledInputFile * tFile (); - - friend void TiledOutputFile::copyPixels (InputFile &); - - Data * _data; - - - friend class MultiPartInputFile; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPart.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPart.cpp deleted file mode 100644 index 7cfce0f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPart.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfInputPart.h" -#include "ImfNamespace.h" - -#include "ImfMultiPartInputFile.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -InputPart::InputPart(MultiPartInputFile& multiPartFile, int partNumber) -{ - file = multiPartFile.getInputPart(partNumber); -} - -const char * -InputPart::fileName () const -{ - return file->fileName(); -} - -const Header & -InputPart::header () const -{ - return file->header(); -} - -int -InputPart::version () const -{ - return file->version(); -} - -void -InputPart::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - file->setFrameBuffer(frameBuffer); -} - -const FrameBuffer & -InputPart::frameBuffer () const -{ - return file->frameBuffer(); -} - -bool -InputPart::isComplete () const -{ - return file->isComplete(); -} - -bool -InputPart::isOptimizationEnabled() const -{ - return file->isOptimizationEnabled(); -} - -void -InputPart::readPixels (int scanLine1, int scanLine2) -{ - file->readPixels(scanLine1, scanLine2); -} - -void -InputPart::readPixels (int scanLine) -{ - file->readPixels(scanLine); -} - -void -InputPart::rawPixelData (int firstScanLine, const char *&pixelData, int &pixelDataSize) -{ - file->rawPixelData(firstScanLine, pixelData, pixelDataSize); -} - -void -InputPart::rawTileData (int &dx, int &dy, int &lx, int &ly, - const char *&pixelData, int &pixelDataSize) -{ - file->rawTileData(dx, dy, lx, ly, pixelData, pixelDataSize); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPart.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPart.h deleted file mode 100644 index bfc30e3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPart.h +++ /dev/null @@ -1,84 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFINPUTPART_H_ -#define IMFINPUTPART_H_ - -#include "ImfInputFile.h" -#include "ImfOutputPart.h" -#include "ImfForward.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -//------------------------------------------------------------------- -// class InputPart: -// -// Same interface as InputFile. Please refer to InputFile. -//------------------------------------------------------------------- - -class IMF_EXPORT InputPart -{ - public: - InputPart(MultiPartInputFile& multiPartFile, int partNumber); - - const char * fileName () const; - const Header & header () const; - int version () const; - void setFrameBuffer (const FrameBuffer &frameBuffer); - const FrameBuffer & frameBuffer () const; - bool isComplete () const; - bool isOptimizationEnabled () const; - void readPixels (int scanLine1, int scanLine2); - void readPixels (int scanLine); - void rawPixelData (int firstScanLine, - const char *&pixelData, - int &pixelDataSize); - void rawTileData (int &dx, int &dy, - int &lx, int &ly, - const char *&pixelData, - int &pixelDataSize); - - private: - InputFile* file; - // for internal use - give OutputFile and TiledOutputFile access to file for copyPixels - friend void OutputFile::copyPixels(InputPart&); - friend void TiledOutputFile::copyPixels(InputPart&); - -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif /* IMFINPUTPART_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPartData.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPartData.cpp deleted file mode 100644 index d241aed..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPartData.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfInputPartData.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -InputPartData::InputPartData(InputStreamMutex* mutex, const Header &header, - int partNumber, int numThreads, int version): - header(header), - numThreads(numThreads), - partNumber(partNumber), - version(version), - mutex(mutex), - completed(false) -{ -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPartData.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPartData.h deleted file mode 100644 index e03952b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputPartData.h +++ /dev/null @@ -1,69 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFINPUTPARTDATA_H_ -#define IMFINPUTPARTDATA_H_ - -#include - -#include "ImfInputStreamMutex.h" -#include "ImfHeader.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -struct InputPartData -{ - Header header; - int numThreads; - int partNumber; - int version; - InputStreamMutex* mutex; - std::vector chunkOffsets; - bool completed; - - InputPartData(InputStreamMutex* mutex, const Header &header, - int partNumber, int numThreads, int version); - -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif /* IMFINPUTPARTDATA_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputStreamMutex.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputStreamMutex.h deleted file mode 100644 index c491dbe..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInputStreamMutex.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFINPUTSTREAMMUTEX_H_ -#define IMFINPUTSTREAMMUTEX_H_ - -#include "ImfIO.h" -#include "IlmThreadMutex.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -using ILMTHREAD_NAMESPACE::Mutex; - -// -// Used to wrap OPENEXR_IMF_INTERNAL_NAMESPACE::IStream as a Mutex. -// -struct InputStreamMutex : public Mutex -{ - OPENEXR_IMF_INTERNAL_NAMESPACE::IStream* is; - Int64 currentPosition; - - InputStreamMutex() - { - is = 0; - currentPosition = 0; - } -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif /* IMFINPUTSTREAMMUTEX_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInt64.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInt64.h deleted file mode 100644 index 761557d..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfInt64.h +++ /dev/null @@ -1,56 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_INT64_H -#define INCLUDED_IMF_INT64_H - -//---------------------------------------------------------------------------- -// -// Int64 -- unsigned 64-bit integers, imported from namespace Imath -// -//---------------------------------------------------------------------------- - -#include "ImathInt64.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -using IMATH_NAMESPACE::Int64; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - -#endif // INCLUDED_IMF_INT64_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIntAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIntAttribute.cpp deleted file mode 100644 index 7486a2e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIntAttribute.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class IntAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -template <> -const char * -IntAttribute::staticTypeName () -{ - return "int"; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIntAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIntAttribute.h deleted file mode 100644 index 3d271ca..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfIntAttribute.h +++ /dev/null @@ -1,58 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_INT_ATTRIBUTE_H -#define INCLUDED_IMF_INT_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class IntAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute IntAttribute; -template <> IMF_EXPORT const char *IntAttribute::staticTypeName (); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCode.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCode.cpp deleted file mode 100644 index f90e433..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCode.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class KeyCode -// -//----------------------------------------------------------------------------- - -#include -#include "Iex.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -KeyCode::KeyCode (int filmMfcCode, - int filmType, - int prefix, - int count, - int perfOffset, - int perfsPerFrame, - int perfsPerCount) -{ - setFilmMfcCode (filmMfcCode); - setFilmType (filmType); - setPrefix (prefix); - setCount (count); - setPerfOffset (perfOffset); - setPerfsPerFrame (perfsPerFrame); - setPerfsPerCount (perfsPerCount); -} - - -KeyCode::KeyCode (const KeyCode &other) -{ - _filmMfcCode = other._filmMfcCode; - _filmType = other._filmType; - _prefix = other._prefix; - _count = other._count; - _perfOffset = other._perfOffset; - _perfsPerFrame = other._perfsPerFrame; - _perfsPerCount = other._perfsPerCount; -} - - -KeyCode & -KeyCode::operator = (const KeyCode &other) -{ - _filmMfcCode = other._filmMfcCode; - _filmType = other._filmType; - _prefix = other._prefix; - _count = other._count; - _perfOffset = other._perfOffset; - _perfsPerFrame = other._perfsPerFrame; - _perfsPerCount = other._perfsPerCount; - - return *this; -} - - -int -KeyCode::filmMfcCode () const -{ - return _filmMfcCode; -} - - -void -KeyCode::setFilmMfcCode (int filmMfcCode) -{ - if (filmMfcCode < 0 || filmMfcCode > 99) - throw IEX_NAMESPACE::ArgExc ("Invalid key code film manufacturer code " - "(must be between 0 and 99)."); - - _filmMfcCode = filmMfcCode; -} - -int -KeyCode::filmType () const -{ - return _filmType; -} - - -void -KeyCode::setFilmType (int filmType) -{ - if (filmType < 0 || filmType > 99) - throw IEX_NAMESPACE::ArgExc ("Invalid key code film type " - "(must be between 0 and 99)."); - - _filmType = filmType; -} - -int -KeyCode::prefix () const -{ - return _prefix; -} - - -void -KeyCode::setPrefix (int prefix) -{ - if (prefix < 0 || prefix > 999999) - throw IEX_NAMESPACE::ArgExc ("Invalid key code prefix " - "(must be between 0 and 999999)."); - - _prefix = prefix; -} - - -int -KeyCode::count () const -{ - return _count; -} - - -void -KeyCode::setCount (int count) -{ - if (count < 0 || count > 9999) - throw IEX_NAMESPACE::ArgExc ("Invalid key code count " - "(must be between 0 and 9999)."); - - _count = count; -} - - -int -KeyCode::perfOffset () const -{ - return _perfOffset; -} - - -void -KeyCode::setPerfOffset (int perfOffset) -{ - if (perfOffset < 0 || perfOffset > 119) - throw IEX_NAMESPACE::ArgExc ("Invalid key code perforation offset " - "(must be between 0 and 119)."); - - _perfOffset = perfOffset; -} - - -int -KeyCode::perfsPerFrame () const -{ - return _perfsPerFrame; -} - - -void -KeyCode::setPerfsPerFrame (int perfsPerFrame) -{ - if (perfsPerFrame < 1 || perfsPerFrame > 15) - throw IEX_NAMESPACE::ArgExc ("Invalid key code number of perforations per frame " - "(must be between 1 and 15)."); - - _perfsPerFrame = perfsPerFrame; -} - - -int -KeyCode::perfsPerCount () const -{ - return _perfsPerCount; -} - - -void -KeyCode::setPerfsPerCount (int perfsPerCount) -{ - if (perfsPerCount < 20 || perfsPerCount > 120) - throw IEX_NAMESPACE::ArgExc ("Invalid key code number of perforations per count " - "(must be between 20 and 120)."); - - _perfsPerCount = perfsPerCount; -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCode.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCode.h deleted file mode 100644 index 2146101..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCode.h +++ /dev/null @@ -1,167 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_KEY_CODE_H -#define INCLUDED_IMF_KEY_CODE_H - -//----------------------------------------------------------------------------- -// -// class KeyCode -// -// A KeyCode object uniquely identifies a motion picture film frame. -// The following fields specifiy film manufacturer, film type, film -// roll and the frame's position within the roll: -// -// filmMfcCode film manufacturer code -// range: 0 - 99 -// -// filmType film type code -// range: 0 - 99 -// -// prefix prefix to identify film roll -// range: 0 - 999999 -// -// count count, increments once every perfsPerCount -// perforations (see below) -// range: 0 - 9999 -// -// perfOffset offset of frame, in perforations from -// zero-frame reference mark -// range: 0 - 119 -// -// perfsPerFrame number of perforations per frame -// range: 1 - 15 -// -// typical values: -// -// 1 for 16mm film -// 3, 4, or 8 for 35mm film -// 5, 8 or 15 for 65mm film -// -// perfsPerCount number of perforations per count -// range: 20 - 120 -// -// typical values: -// -// 20 for 16mm film -// 64 for 35mm film -// 80 or 120 for 65mm film -// -// For more information about the interpretation of those fields see -// the following standards and recommended practice publications: -// -// SMPTE 254 Motion-Picture Film (35-mm) - Manufacturer-Printed -// Latent Image Identification Information -// -// SMPTE 268M File Format for Digital Moving-Picture Exchange (DPX) -// (section 6.1) -// -// SMPTE 270 Motion-Picture Film (65-mm) - Manufacturer- Printed -// Latent Image Identification Information -// -// SMPTE 271 Motion-Picture Film (16-mm) - Manufacturer- Printed -// Latent Image Identification Information -// -//----------------------------------------------------------------------------- -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT KeyCode -{ - public: - - //------------------------------------- - // Constructors and assignment operator - //------------------------------------- - - KeyCode (int filmMfcCode = 0, - int filmType = 0, - int prefix = 0, - int count = 0, - int perfOffset = 0, - int perfsPerFrame = 4, - int perfsPerCount = 64); - - KeyCode (const KeyCode &other); - KeyCode & operator = (const KeyCode &other); - - - //---------------------------- - // Access to individual fields - //---------------------------- - - int filmMfcCode () const; - void setFilmMfcCode (int filmMfcCode); - - int filmType () const; - void setFilmType (int filmType); - - int prefix () const; - void setPrefix (int prefix); - - int count () const; - void setCount (int count); - - int perfOffset () const; - void setPerfOffset (int perfOffset); - - int perfsPerFrame () const; - void setPerfsPerFrame (int perfsPerFrame); - - int perfsPerCount () const; - void setPerfsPerCount (int perfsPerCount); - - private: - - int _filmMfcCode; - int _filmType; - int _prefix; - int _count; - int _perfOffset; - int _perfsPerFrame; - int _perfsPerCount; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp deleted file mode 100644 index 06c666b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class KeyCodeAttribute -// -//----------------------------------------------------------------------------- - -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -KeyCodeAttribute::staticTypeName () -{ - return "keycode"; -} - - -template <> -void -KeyCodeAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.filmMfcCode()); - Xdr::write (os, _value.filmType()); - Xdr::write (os, _value.prefix()); - Xdr::write (os, _value.count()); - Xdr::write (os, _value.perfOffset()); - Xdr::write (os, _value.perfsPerFrame()); - Xdr::write (os, _value.perfsPerCount()); -} - - -template <> -void -KeyCodeAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - int tmp; - - Xdr::read (is, tmp); - _value.setFilmMfcCode (tmp); - - Xdr::read (is, tmp); - _value.setFilmType (tmp); - - Xdr::read (is, tmp); - _value.setPrefix (tmp); - - Xdr::read (is, tmp); - _value.setCount (tmp); - - Xdr::read (is, tmp); - _value.setPerfOffset (tmp); - - Xdr::read (is, tmp); - _value.setPerfsPerFrame (tmp); - - Xdr::read (is, tmp); - _value.setPerfsPerCount (tmp); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.h deleted file mode 100644 index 00d4ece..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.h +++ /dev/null @@ -1,73 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_KEY_CODE_ATTRIBUTE_H -#define INCLUDED_IMF_KEY_CODE_ATTRIBUTE_H - - -//----------------------------------------------------------------------------- -// -// class KeyCodeAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfKeyCode.h" -#include "ImfExport.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute KeyCodeAttribute; - -template <> -IMF_EXPORT -const char *KeyCodeAttribute::staticTypeName (); - -template <> -IMF_EXPORT -void KeyCodeAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; - -template <> -IMF_EXPORT -void KeyCodeAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrder.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrder.h deleted file mode 100644 index 8f30bed..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrder.h +++ /dev/null @@ -1,69 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_LINE_ORDER_H -#define INCLUDED_IMF_LINE_ORDER_H - -//----------------------------------------------------------------------------- -// -// enum LineOrder -// -//----------------------------------------------------------------------------- -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -enum LineOrder -{ - INCREASING_Y = 0, // first scan line has lowest y coordinate - - DECREASING_Y = 1, // first scan line has highest y coordinate - - RANDOM_Y = 2, // only for tiled files; tiles are written - // in random order - - NUM_LINEORDERS // number of different line orders -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp deleted file mode 100644 index aebbac7..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - - -//----------------------------------------------------------------------------- -// -// class LineOrderAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfLineOrderAttribute.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -LineOrderAttribute::staticTypeName () -{ - return "lineOrder"; -} - - -template <> -void -LineOrderAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - unsigned char tmp = _value; - Xdr::write (os, tmp); -} - - -template <> -void -LineOrderAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - unsigned char tmp; - Xdr::read (is, tmp); - _value = LineOrder (tmp); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h deleted file mode 100644 index 342c3d0..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h +++ /dev/null @@ -1,72 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_LINE_ORDER_ATTRIBUTE_H -#define INCLUDED_IMF_LINE_ORDER_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class LineOrderAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfLineOrder.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute LineOrderAttribute; - -template <> -IMF_EXPORT -const char *LineOrderAttribute::staticTypeName (); - -template <> -IMF_EXPORT -void LineOrderAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; - -template <> -IMF_EXPORT -void LineOrderAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLut.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLut.cpp deleted file mode 100644 index 3209abc..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLut.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// Lookup tables for efficient application -// of half --> half functions to pixel data, -// and some commonly applied functions. -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -void -HalfLut::apply (half *data, int nData, int stride) const -{ - while (nData) - { - *data = _lut (*data); - data += stride; - nData -= 1; - } -} - - -void -HalfLut::apply (const Slice &data, const IMATH_NAMESPACE::Box2i &dataWindow) const -{ - assert (data.type == HALF); - assert (dataWindow.min.x % data.xSampling == 0); - assert (dataWindow.min.y % data.ySampling == 0); - assert ((dataWindow.max.x - dataWindow.min.x + 1) % data.xSampling == 0); - assert ((dataWindow.max.y - dataWindow.min.y + 1) % data.ySampling == 0); - - char *base = data.base + data.yStride * - (dataWindow.min.y / data.ySampling); - - for (int y = dataWindow.min.y; - y <= dataWindow.max.y; - y += data.ySampling) - { - char *pixel = base + data.xStride * - (dataWindow.min.x / data.xSampling); - - for (int x = dataWindow.min.x; - x <= dataWindow.max.x; - x += data.xSampling) - { - *(half *)pixel = _lut (*(half *)pixel); - pixel += data.xStride; - } - - base += data.yStride; - } -} - - -void -RgbaLut::apply (Rgba *data, int nData, int stride) const -{ - while (nData) - { - if (_chn & WRITE_R) - data->r = _lut (data->r); - - if (_chn & WRITE_G) - data->g = _lut (data->g); - - if (_chn & WRITE_B) - data->b = _lut (data->b); - - if (_chn & WRITE_A) - data->a = _lut (data->a); - - data += stride; - nData -= 1; - } -} - - -void -RgbaLut::apply (Rgba *base, - int xStride, int yStride, - const IMATH_NAMESPACE::Box2i &dataWindow) const -{ - base += dataWindow.min.y * yStride; - - for (int y = dataWindow.min.y; y <= dataWindow.max.y; ++y) - { - Rgba *pixel = base + dataWindow.min.x * xStride; - - for (int x = dataWindow.min.x; x <= dataWindow.max.x; ++x) - { - if (_chn & WRITE_R) - pixel->r = _lut (pixel->r); - - if (_chn & WRITE_G) - pixel->g = _lut (pixel->g); - - if (_chn & WRITE_B) - pixel->b = _lut (pixel->b); - - if (_chn & WRITE_A) - pixel->a = _lut (pixel->a); - - pixel += xStride; - } - - base += yStride; - } -} - - -half -round12log (half x) -{ - const float middleval = pow (2.0, -2.5); - int int12log; - - if (x <= 0) - { - return 0; - } - else - { - int12log = int (2000.5 + 200.0 * log (x / middleval) / log (2.0)); - - if (int12log > 4095) - int12log = 4095; - - if (int12log < 1) - int12log = 1; - } - - return middleval * pow (2.0, (int12log - 2000.0) / 200.0); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT - diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLut.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLut.h deleted file mode 100644 index b9ccc4c..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfLut.h +++ /dev/null @@ -1,188 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_LUT_H -#define INCLUDED_IMF_LUT_H - -//----------------------------------------------------------------------------- -// -// Lookup tables for efficient application -// of half --> half functions to pixel data, -// and some commonly applied functions. -// -//----------------------------------------------------------------------------- - -#include "ImfRgbaFile.h" -#include "ImfFrameBuffer.h" -#include "ImathBox.h" -#include "halfFunction.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -// -// Lookup table for individual half channels. -// - -class IMF_EXPORT HalfLut -{ - public: - - //------------ - // Constructor - //------------ - - template - HalfLut (Function f); - - - //---------------------------------------------------------------------- - // Apply the table to data[0], data[stride] ... data[(nData-1) * stride] - //---------------------------------------------------------------------- - - void apply (half *data, - int nData, - int stride = 1) const; - - - //--------------------------------------------------------------- - // Apply the table to a frame buffer slice (see ImfFrameBuffer.h) - //--------------------------------------------------------------- - - void apply (const Slice &data, - const IMATH_NAMESPACE::Box2i &dataWindow) const; - - private: - - halfFunction _lut; -}; - - -// -// Lookup table for combined RGBA data. -// - -class IMF_EXPORT RgbaLut -{ - public: - - //------------ - // Constructor - //------------ - - template - RgbaLut (Function f, RgbaChannels chn = WRITE_RGB); - - - //---------------------------------------------------------------------- - // Apply the table to data[0], data[stride] ... data[(nData-1) * stride] - //---------------------------------------------------------------------- - - void apply (Rgba *data, - int nData, - int stride = 1) const; - - - //----------------------------------------------------------------------- - // Apply the table to a frame buffer (see RgbaOutpuFile.setFrameBuffer()) - //----------------------------------------------------------------------- - - void apply (Rgba *base, - int xStride, - int yStride, - const IMATH_NAMESPACE::Box2i &dataWindow) const; - - private: - - halfFunction _lut; - RgbaChannels _chn; -}; - - -// -// 12bit log rounding reduces data to 20 stops with 200 steps per stop. -// That makes 4000 numbers. An extra 96 just come along for the ride. -// Zero explicitly remains zero. The first non-zero half will map to 1 -// in the 0-4095 12log space. A nice power of two number is placed at -// the center [2000] and that number is near 0.18. -// - -IMF_EXPORT -half round12log (half x); - - -// -// Round to n-bit precision (n should be between 0 and 10). -// After rounding, the significand's 10-n least significant -// bits will be zero. -// - -struct roundNBit -{ - roundNBit (int n): n(n) {} - half operator () (half x) {return x.round(n);} - int n; -}; - - -// -// Template definitions -// - - -template -HalfLut::HalfLut (Function f): - _lut(f, -HALF_MAX, HALF_MAX, half (0), - half::posInf(), half::negInf(), half::qNan()) -{ - // empty -} - - -template -RgbaLut::RgbaLut (Function f, RgbaChannels chn): - _lut(f, -HALF_MAX, HALF_MAX, half (0), - half::posInf(), half::negInf(), half::qNan()), - _chn(chn) -{ - // empty -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp deleted file mode 100644 index 84efe7e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp +++ /dev/null @@ -1,263 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class M33fAttribute -// class M33dAttribute -// class M44fAttribute -// class M44dAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - - -template <> -const char * -M33fAttribute::staticTypeName () -{ - return "m33f"; -} - - -template <> -void -M33fAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value[0][0]); - Xdr::write (os, _value[0][1]); - Xdr::write (os, _value[0][2]); - - Xdr::write (os, _value[1][0]); - Xdr::write (os, _value[1][1]); - Xdr::write (os, _value[1][2]); - - Xdr::write (os, _value[2][0]); - Xdr::write (os, _value[2][1]); - Xdr::write (os, _value[2][2]); -} - - -template <> -void -M33fAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value[0][0]); - Xdr::read (is, _value[0][1]); - Xdr::read (is, _value[0][2]); - - Xdr::read (is, _value[1][0]); - Xdr::read (is, _value[1][1]); - Xdr::read (is, _value[1][2]); - - Xdr::read (is, _value[2][0]); - Xdr::read (is, _value[2][1]); - Xdr::read (is, _value[2][2]); -} - - -template <> -const char * -M33dAttribute::staticTypeName () -{ - return "m33d"; -} - - -template <> -void -M33dAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value[0][0]); - Xdr::write (os, _value[0][1]); - Xdr::write (os, _value[0][2]); - - Xdr::write (os, _value[1][0]); - Xdr::write (os, _value[1][1]); - Xdr::write (os, _value[1][2]); - - Xdr::write (os, _value[2][0]); - Xdr::write (os, _value[2][1]); - Xdr::write (os, _value[2][2]); -} - - -template <> -void -M33dAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value[0][0]); - Xdr::read (is, _value[0][1]); - Xdr::read (is, _value[0][2]); - - Xdr::read (is, _value[1][0]); - Xdr::read (is, _value[1][1]); - Xdr::read (is, _value[1][2]); - - Xdr::read (is, _value[2][0]); - Xdr::read (is, _value[2][1]); - Xdr::read (is, _value[2][2]); -} - - -template <> -const char * -M44fAttribute::staticTypeName () -{ - return "m44f"; -} - - -template <> -void -M44fAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value[0][0]); - Xdr::write (os, _value[0][1]); - Xdr::write (os, _value[0][2]); - Xdr::write (os, _value[0][3]); - - Xdr::write (os, _value[1][0]); - Xdr::write (os, _value[1][1]); - Xdr::write (os, _value[1][2]); - Xdr::write (os, _value[1][3]); - - Xdr::write (os, _value[2][0]); - Xdr::write (os, _value[2][1]); - Xdr::write (os, _value[2][2]); - Xdr::write (os, _value[2][3]); - - Xdr::write (os, _value[3][0]); - Xdr::write (os, _value[3][1]); - Xdr::write (os, _value[3][2]); - Xdr::write (os, _value[3][3]); -} - - -template <> -void -M44fAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value[0][0]); - Xdr::read (is, _value[0][1]); - Xdr::read (is, _value[0][2]); - Xdr::read (is, _value[0][3]); - - Xdr::read (is, _value[1][0]); - Xdr::read (is, _value[1][1]); - Xdr::read (is, _value[1][2]); - Xdr::read (is, _value[1][3]); - - Xdr::read (is, _value[2][0]); - Xdr::read (is, _value[2][1]); - Xdr::read (is, _value[2][2]); - Xdr::read (is, _value[2][3]); - - Xdr::read (is, _value[3][0]); - Xdr::read (is, _value[3][1]); - Xdr::read (is, _value[3][2]); - Xdr::read (is, _value[3][3]); -} - - -template <> -const char * -M44dAttribute::staticTypeName () -{ - return "m44d"; -} - - -template <> -void -M44dAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value[0][0]); - Xdr::write (os, _value[0][1]); - Xdr::write (os, _value[0][2]); - Xdr::write (os, _value[0][3]); - - Xdr::write (os, _value[1][0]); - Xdr::write (os, _value[1][1]); - Xdr::write (os, _value[1][2]); - Xdr::write (os, _value[1][3]); - - Xdr::write (os, _value[2][0]); - Xdr::write (os, _value[2][1]); - Xdr::write (os, _value[2][2]); - Xdr::write (os, _value[2][3]); - - Xdr::write (os, _value[3][0]); - Xdr::write (os, _value[3][1]); - Xdr::write (os, _value[3][2]); - Xdr::write (os, _value[3][3]); -} - - -template <> -void -M44dAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value[0][0]); - Xdr::read (is, _value[0][1]); - Xdr::read (is, _value[0][2]); - Xdr::read (is, _value[0][3]); - - Xdr::read (is, _value[1][0]); - Xdr::read (is, _value[1][1]); - Xdr::read (is, _value[1][2]); - Xdr::read (is, _value[1][3]); - - Xdr::read (is, _value[2][0]); - Xdr::read (is, _value[2][1]); - Xdr::read (is, _value[2][2]); - Xdr::read (is, _value[2][3]); - - Xdr::read (is, _value[3][0]); - Xdr::read (is, _value[3][1]); - Xdr::read (is, _value[3][2]); - Xdr::read (is, _value[3][3]); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMatrixAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMatrixAttribute.h deleted file mode 100644 index 31f1466..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMatrixAttribute.h +++ /dev/null @@ -1,83 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_MATRIX_ATTRIBUTE_H -#define INCLUDED_IMF_MATRIX_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class M33fAttribute -// class M33dAttribute -// class M44fAttribute -// class M44dAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImathMatrix.h" -#include "ImfExport.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute M33fAttribute; -template <> IMF_EXPORT const char *M33fAttribute::staticTypeName (); -template <> IMF_EXPORT void M33fAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; -template <> IMF_EXPORT void M33fAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -typedef TypedAttribute M33dAttribute; -template <> IMF_EXPORT const char *M33dAttribute::staticTypeName (); -template <> IMF_EXPORT void M33dAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; -template <> IMF_EXPORT void M33dAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -typedef TypedAttribute M44fAttribute; -template <> IMF_EXPORT const char *M44fAttribute::staticTypeName (); -template <> IMF_EXPORT void M44fAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; -template <> IMF_EXPORT void M44fAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -typedef TypedAttribute M44dAttribute; -template <> IMF_EXPORT const char *M44dAttribute::staticTypeName (); -template <> IMF_EXPORT void M44dAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; -template <> IMF_EXPORT void M44dAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMisc.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMisc.cpp deleted file mode 100644 index 37a6281..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMisc.cpp +++ /dev/null @@ -1,1872 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// Miscellaneous helper functions for OpenEXR image file I/O -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::divp; -using IMATH_NAMESPACE::modp; -using std::vector; - -int -pixelTypeSize (PixelType type) -{ - int size; - - switch (type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - size = Xdr::size (); - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - size = Xdr::size (); - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - size = Xdr::size (); - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel type."); - } - - return size; -} - - -int -numSamples (int s, int a, int b) -{ - int a1 = divp (a, s); - int b1 = divp (b, s); - return b1 - a1 + ((a1 * s < a)? 0: 1); -} - - -size_t -bytesPerLineTable (const Header &header, - vector &bytesPerLine) -{ - const Box2i &dataWindow = header.dataWindow(); - const ChannelList &channels = header.channels(); - - bytesPerLine.resize (dataWindow.max.y - dataWindow.min.y + 1); - - for (ChannelList::ConstIterator c = channels.begin(); - c != channels.end(); - ++c) - { - int nBytes = pixelTypeSize (c.channel().type) * - (dataWindow.max.x - dataWindow.min.x + 1) / - c.channel().xSampling; - - for (int y = dataWindow.min.y, i = 0; y <= dataWindow.max.y; ++y, ++i) - if (modp (y, c.channel().ySampling) == 0) - bytesPerLine[i] += nBytes; - } - - size_t maxBytesPerLine = 0; - - for (int y = dataWindow.min.y, i = 0; y <= dataWindow.max.y; ++y, ++i) - if (maxBytesPerLine < bytesPerLine[i]) - maxBytesPerLine = bytesPerLine[i]; - - return maxBytesPerLine; -} - - -const int& -sampleCount(const char* base, int xStride, int yStride, int x, int y) -{ - const char* ptr = base + y * yStride + x * xStride; - int* intPtr = (int*) ptr; - - return *intPtr; -} - -int& -sampleCount(char* base, int xStride, int yStride, int x, int y) -{ - char* ptr = base + y * yStride + x * xStride; - int* intPtr = (int*) ptr; - - return *intPtr; -} - - -size_t -bytesPerDeepLineTable (const Header &header, - int minY, int maxY, - const char* base, - int xStride, - int yStride, - vector &bytesPerLine) -{ - const Box2i &dataWindow = header.dataWindow(); - const ChannelList &channels = header.channels(); - - for (ChannelList::ConstIterator c = channels.begin(); - c != channels.end(); - ++c) - { - for (int y = minY; y <= maxY; ++y) - if (modp (y, c.channel().ySampling) == 0) - { - int nBytes = 0; - for (int x = dataWindow.min.x; x <= dataWindow.max.x; x++) - { - if (modp (x, c.channel().xSampling) == 0) - nBytes += pixelTypeSize (c.channel().type) * - sampleCount(base, xStride, yStride, x, y); - } - bytesPerLine[y - dataWindow.min.y] += nBytes; - } - } - - size_t maxBytesPerLine = 0; - - for (int y = minY; y <= maxY; ++y) - if (maxBytesPerLine < bytesPerLine[y - dataWindow.min.y]) - maxBytesPerLine = bytesPerLine[y - dataWindow.min.y]; - - return maxBytesPerLine; -} - - -size_t -bytesPerDeepLineTable (const Header &header, - char* base, - int xStride, - int yStride, - vector &bytesPerLine) -{ - return bytesPerDeepLineTable(header, - header.dataWindow().min.y, - header.dataWindow().max.y, - base, - xStride, - yStride, - bytesPerLine); -} - - -void -offsetInLineBufferTable (const vector &bytesPerLine, - int scanline1, int scanline2, - int linesInLineBuffer, - vector &offsetInLineBuffer) -{ - offsetInLineBuffer.resize (bytesPerLine.size()); - - size_t offset = 0; - - for (int i = scanline1; i <= scanline2; ++i) - { - if (i % linesInLineBuffer == 0) - offset = 0; - - offsetInLineBuffer[i] = offset; - offset += bytesPerLine[i]; - } -} - - -void -offsetInLineBufferTable (const vector &bytesPerLine, - int linesInLineBuffer, - vector &offsetInLineBuffer) -{ - offsetInLineBufferTable (bytesPerLine, - 0, bytesPerLine.size() - 1, - linesInLineBuffer, - offsetInLineBuffer); -} - - -int -lineBufferMinY (int y, int minY, int linesInLineBuffer) -{ - return ((y - minY) / linesInLineBuffer) * linesInLineBuffer + minY; -} - - -int -lineBufferMaxY (int y, int minY, int linesInLineBuffer) -{ - return lineBufferMinY (y, minY, linesInLineBuffer) + linesInLineBuffer - 1; -} - - -Compressor::Format -defaultFormat (Compressor * compressor) -{ - return compressor? compressor->format(): Compressor::XDR; -} - - -int -numLinesInBuffer (Compressor * compressor) -{ - return compressor? compressor->numScanLines(): 1; -} - - -void -copyIntoFrameBuffer (const char *& readPtr, - char * writePtr, - char * endPtr, - size_t xStride, - bool fill, - double fillValue, - Compressor::Format format, - PixelType typeInFrameBuffer, - PixelType typeInFile) -{ - // - // Copy a horizontal row of pixels from an input - // file's line or tile buffer to a frame buffer. - // - - if (fill) - { - // - // The file contains no data for this channel. - // Store a default value in the frame buffer. - // - - switch (typeInFrameBuffer) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - { - unsigned int fillVal = (unsigned int) (fillValue); - - while (writePtr <= endPtr) - { - *(unsigned int *) writePtr = fillVal; - writePtr += xStride; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - { - half fillVal = half (fillValue); - - while (writePtr <= endPtr) - { - *(half *) writePtr = fillVal; - writePtr += xStride; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - { - float fillVal = float (fillValue); - - while (writePtr <= endPtr) - { - *(float *) writePtr = fillVal; - writePtr += xStride; - } - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } - else if (format == Compressor::XDR) - { - // - // The the line or tile buffer is in XDR format. - // - // Convert the pixels from the file's machine- - // independent representation, and store the - // results in the frame buffer. - // - - switch (typeInFrameBuffer) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - while (writePtr <= endPtr) - { - Xdr::read (readPtr, *(unsigned int *) writePtr); - writePtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - while (writePtr <= endPtr) - { - half h; - Xdr::read (readPtr, h); - *(unsigned int *) writePtr = halfToUint (h); - writePtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - while (writePtr <= endPtr) - { - float f; - Xdr::read (readPtr, f); - *(unsigned int *)writePtr = floatToUint (f); - writePtr += xStride; - } - break; - - default: - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - while (writePtr <= endPtr) - { - unsigned int ui; - Xdr::read (readPtr, ui); - *(half *) writePtr = uintToHalf (ui); - writePtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - while (writePtr <= endPtr) - { - Xdr::read (readPtr, *(half *) writePtr); - writePtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - while (writePtr <= endPtr) - { - float f; - Xdr::read (readPtr, f); - *(half *) writePtr = floatToHalf (f); - writePtr += xStride; - } - break; - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - while (writePtr <= endPtr) - { - unsigned int ui; - Xdr::read (readPtr, ui); - *(float *) writePtr = float (ui); - writePtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - while (writePtr <= endPtr) - { - half h; - Xdr::read (readPtr, h); - *(float *) writePtr = float (h); - writePtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - while (writePtr <= endPtr) - { - Xdr::read (readPtr, *(float *) writePtr); - writePtr += xStride; - } - break; - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } - else - { - // - // The the line or tile buffer is in NATIVE format. - // Copy the results into the frame buffer. - // - - switch (typeInFrameBuffer) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - while (writePtr <= endPtr) - { - for (size_t i = 0; i < sizeof (unsigned int); ++i) - writePtr[i] = readPtr[i]; - - readPtr += sizeof (unsigned int); - writePtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - while (writePtr <= endPtr) - { - half h = *(half *) readPtr; - *(unsigned int *) writePtr = halfToUint (h); - readPtr += sizeof (half); - writePtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - while (writePtr <= endPtr) - { - float f; - - for (size_t i = 0; i < sizeof (float); ++i) - ((char *)&f)[i] = readPtr[i]; - - *(unsigned int *)writePtr = floatToUint (f); - readPtr += sizeof (float); - writePtr += xStride; - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - while (writePtr <= endPtr) - { - unsigned int ui; - - for (size_t i = 0; i < sizeof (unsigned int); ++i) - ((char *)&ui)[i] = readPtr[i]; - - *(half *) writePtr = uintToHalf (ui); - readPtr += sizeof (unsigned int); - writePtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - // If we're tightly packed, just memcpy - if (xStride == sizeof(half)) { - int numBytes = endPtr-writePtr+sizeof(half); - memcpy(writePtr, readPtr, numBytes); - readPtr += numBytes; - writePtr += numBytes; - } else { - while (writePtr <= endPtr) - { - *(half *) writePtr = *(half *)readPtr; - readPtr += sizeof (half); - writePtr += xStride; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - while (writePtr <= endPtr) - { - float f; - - for (size_t i = 0; i < sizeof (float); ++i) - ((char *)&f)[i] = readPtr[i]; - - *(half *) writePtr = floatToHalf (f); - readPtr += sizeof (float); - writePtr += xStride; - } - break; - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - while (writePtr <= endPtr) - { - unsigned int ui; - - for (size_t i = 0; i < sizeof (unsigned int); ++i) - ((char *)&ui)[i] = readPtr[i]; - - *(float *) writePtr = float (ui); - readPtr += sizeof (unsigned int); - writePtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - while (writePtr <= endPtr) - { - half h = *(half *) readPtr; - *(float *) writePtr = float (h); - readPtr += sizeof (half); - writePtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - while (writePtr <= endPtr) - { - for (size_t i = 0; i < sizeof (float); ++i) - writePtr[i] = readPtr[i]; - - readPtr += sizeof (float); - writePtr += xStride; - } - break; - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } -} - -void -copyIntoDeepFrameBuffer (const char *& readPtr, - char * base, - const char* sampleCountBase, - ptrdiff_t sampleCountXStride, - ptrdiff_t sampleCountYStride, - int y, int minX, int maxX, - int xOffsetForSampleCount, - int yOffsetForSampleCount, - int xOffsetForData, - int yOffsetForData, - ptrdiff_t sampleStride, - ptrdiff_t xPointerStride, - ptrdiff_t yPointerStride, - bool fill, - double fillValue, - Compressor::Format format, - PixelType typeInFrameBuffer, - PixelType typeInFile) -{ - // - // Copy a horizontal row of pixels from an input - // file's line or tile buffer to a frame buffer. - // - - if (fill) - { - // - // The file contains no data for this channel. - // Store a default value in the frame buffer. - // - - switch (typeInFrameBuffer) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - { - unsigned int fillVal = (unsigned int) (fillValue); - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - if(writePtr) - { - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - for (int i = 0; i < count; i++) - { - *(unsigned int *) writePtr = fillVal; - writePtr += sampleStride; - } - } - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - { - half fillVal = half (fillValue); - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - if(writePtr) - { - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - for (int i = 0; i < count; i++) - { - *(half *) writePtr = fillVal; - writePtr += sampleStride; - } - } - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - { - float fillVal = float (fillValue); - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - if(writePtr) - { - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - for (int i = 0; i < count; i++) - { - *(float *) writePtr = fillVal; - writePtr += sampleStride; - } - } - } - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } - else if (format == Compressor::XDR) - { - // - // The the line or tile buffer is in XDR format. - // - // Convert the pixels from the file's machine- - // independent representation, and store the - // results in the frame buffer. - // - - switch (typeInFrameBuffer) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - if(writePtr) - { - - for (int i = 0; i < count; i++) - { - Xdr::read (readPtr, *(unsigned int *) writePtr); - writePtr += sampleStride; - } - }else{ - Xdr::skip (readPtr,count*Xdr::size()); - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - if(writePtr) - { - - for (int i = 0; i < count; i++) - { - half h; - Xdr::read (readPtr, h); - *(unsigned int *) writePtr = halfToUint (h); - writePtr += sampleStride; - } - }else{ - Xdr::skip (readPtr,count*Xdr::size()); - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - if(writePtr) - { - for (int i = 0; i < count; i++) - { - float f; - Xdr::read (readPtr, f); - *(unsigned int *)writePtr = floatToUint (f); - writePtr += sampleStride; - } - }else{ - Xdr::skip (readPtr,count*Xdr::size()); - } - - } - break; - default: - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - if(writePtr) - { - - for (int i = 0; i < count; i++) - { - unsigned int ui; - Xdr::read (readPtr, ui); - *(half *) writePtr = uintToHalf (ui); - writePtr += sampleStride; - } - }else{ - Xdr::skip (readPtr,count*Xdr::size()); - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - if(writePtr) - { - - for (int i = 0; i < count; i++) - { - Xdr::read (readPtr, *(half *) writePtr); - writePtr += sampleStride; - } - }else{ - Xdr::skip (readPtr,count*Xdr::size()); - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **) (base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - if(writePtr) - { - for (int i = 0; i < count; i++) - { - float f; - Xdr::read (readPtr, f); - *(half *) writePtr = floatToHalf (f); - writePtr += sampleStride; - } - }else{ - Xdr::skip (readPtr,count*Xdr::size()); - } - } - break; - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - if(writePtr) - { - for (int i = 0; i < count; i++) - { - unsigned int ui; - Xdr::read (readPtr, ui); - *(float *) writePtr = float (ui); - writePtr += sampleStride; - } - }else{ - Xdr::skip (readPtr,count*Xdr::size()); - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - if(writePtr) - { - - for (int i = 0; i < count; i++) - { - half h; - Xdr::read (readPtr, h); - *(float *) writePtr = float (h); - writePtr += sampleStride; - } - - }else{ - Xdr::skip (readPtr,count*Xdr::size()); - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - if(writePtr) - { - - for (int i = 0; i < count; i++) - { - Xdr::read (readPtr, *(float *) writePtr); - writePtr += sampleStride; - } - } else{ - Xdr::skip (readPtr,count*Xdr::size()); - } - - } - break; - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } - else - { - // - // The the line or tile buffer is in NATIVE format. - // Copy the results into the frame buffer. - // - - switch (typeInFrameBuffer) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - if(writePtr) - { - for (int i = 0; i < count; i++) - { - for (size_t i = 0; i < sizeof (unsigned int); ++i) - writePtr[i] = readPtr[i]; - - readPtr += sizeof (unsigned int); - writePtr += sampleStride; - } - }else{ - readPtr+=sizeof(unsigned int)*count; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - if(writePtr) - { - for (int i = 0; i < count; i++) - { - half h = *(half *) readPtr; - *(unsigned int *) writePtr = halfToUint (h); - readPtr += sizeof (half); - writePtr += sampleStride; - } - }else{ - readPtr+=sizeof(half)*count; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - if(writePtr) - { - - for (int i = 0; i < count; i++) - { - float f; - - for (size_t i = 0; i < sizeof (float); ++i) - ((char *)&f)[i] = readPtr[i]; - - *(unsigned int *)writePtr = floatToUint (f); - readPtr += sizeof (float); - writePtr += sampleStride; - } - }else{ - readPtr+=sizeof(float)*count; - } - } - break; - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - if(writePtr) - { - for (int i = 0; i < count; i++) - { - unsigned int ui; - - for (size_t i = 0; i < sizeof (unsigned int); ++i) - ((char *)&ui)[i] = readPtr[i]; - - *(half *) writePtr = uintToHalf (ui); - readPtr += sizeof (unsigned int); - writePtr += sampleStride; - } - }else{ - readPtr+=sizeof(unsigned int)*count; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - if(writePtr) - { - for (int i = 0; i < count; i++) - { - *(half *) writePtr = *(half *)readPtr; - readPtr += sizeof (half); - writePtr += sampleStride; - } - }else{ - readPtr+=sizeof(half)*count; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - if(writePtr) - { - for (int i = 0; i < count; i++) - { - float f; - - for (size_t i = 0; i < sizeof (float); ++i) - ((char *)&f)[i] = readPtr[i]; - - *(half *) writePtr = floatToHalf (f); - readPtr += sizeof (float); - writePtr += sampleStride; - } - }else{ - readPtr+=sizeof(float)*count; - } - } - break; - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - if(writePtr) - { - for (int i = 0; i < count; i++) - { - unsigned int ui; - - for (size_t i = 0; i < sizeof (unsigned int); ++i) - ((char *)&ui)[i] = readPtr[i]; - - *(float *) writePtr = float (ui); - readPtr += sizeof (unsigned int); - writePtr += sampleStride; - } - }else{ - readPtr+=sizeof(unsigned int)*count; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - if(writePtr) - { - for (int i = 0; i < count; i++) - { - half h = *(half *) readPtr; - *(float *) writePtr = float (h); - readPtr += sizeof (half); - writePtr += sampleStride; - } - }else{ - readPtr+=sizeof(half)*count; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - for (int x = minX; x <= maxX; x++) - { - char* writePtr = *(char **)(base+(y-yOffsetForData)*yPointerStride + (x-xOffsetForData)*xPointerStride); - - int count = sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - if(writePtr) - { - for (int i = 0; i < count; i++) - { - for (size_t i = 0; i < sizeof (float); ++i) - writePtr[i] = readPtr[i]; - - readPtr += sizeof (float); - writePtr += sampleStride; - } - }else{ - readPtr+=sizeof(float)*count; - } - } - break; - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } -} - - -void -skipChannel (const char *& readPtr, - PixelType typeInFile, - size_t xSize) -{ - switch (typeInFile) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - Xdr::skip (readPtr, Xdr::size () * xSize); - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - Xdr::skip (readPtr, Xdr::size () * xSize); - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - Xdr::skip (readPtr, Xdr::size () * xSize); - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } -} - - -void -convertInPlace (char *& writePtr, - const char *& readPtr, - PixelType type, - size_t numPixels) -{ - switch (type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - for (size_t j = 0; j < numPixels; ++j) - { - Xdr::write (writePtr, *(const unsigned int *) readPtr); - readPtr += sizeof(unsigned int); - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - for (size_t j = 0; j < numPixels; ++j) - { - Xdr::write (writePtr, *(const half *) readPtr); - readPtr += sizeof(half); - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - for (size_t j = 0; j < numPixels; ++j) - { - Xdr::write (writePtr, *(const float *) readPtr); - readPtr += sizeof(float); - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } -} - - -void -copyFromFrameBuffer (char *& writePtr, - const char *& readPtr, - const char * endPtr, - size_t xStride, - Compressor::Format format, - PixelType type) -{ - // - // Copy a horizontal row of pixels from a frame - // buffer to an output file's line or tile buffer. - // - - if (format == Compressor::XDR) - { - // - // The the line or tile buffer is in XDR format. - // - - switch (type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - while (readPtr <= endPtr) - { - Xdr::write (writePtr, - *(const unsigned int *) readPtr); - readPtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - while (readPtr <= endPtr) - { - Xdr::write (writePtr, *(const half *) readPtr); - readPtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - while (readPtr <= endPtr) - { - Xdr::write (writePtr, *(const float *) readPtr); - readPtr += xStride; - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } - else - { - // - // The the line or tile buffer is in NATIVE format. - // - - switch (type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - while (readPtr <= endPtr) - { - for (size_t i = 0; i < sizeof (unsigned int); ++i) - *writePtr++ = readPtr[i]; - - readPtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - while (readPtr <= endPtr) - { - *(half *) writePtr = *(const half *) readPtr; - writePtr += sizeof (half); - readPtr += xStride; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - while (readPtr <= endPtr) - { - for (size_t i = 0; i < sizeof (float); ++i) - *writePtr++ = readPtr[i]; - - readPtr += xStride; - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } -} - -void -copyFromDeepFrameBuffer (char *& writePtr, - const char * base, - char* sampleCountBase, - ptrdiff_t sampleCountXStride, - ptrdiff_t sampleCountYStride, - int y, int xMin, int xMax, - int xOffsetForSampleCount, - int yOffsetForSampleCount, - int xOffsetForData, - int yOffsetForData, - ptrdiff_t sampleStride, - ptrdiff_t dataXStride, - ptrdiff_t dataYStride, - Compressor::Format format, - PixelType type) -{ - // - // Copy a horizontal row of pixels from a frame - // buffer to an output file's line or tile buffer. - // - - if (format == Compressor::XDR) - { - // - // The the line or tile buffer is in XDR format. - // - - switch (type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - for (int x = xMin; x <= xMax; x++) - { - unsigned int count = - sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - const char* ptr = base + (y-yOffsetForData) * dataYStride + (x-xOffsetForData) * dataXStride; - const char* readPtr = ((const char**) ptr)[0]; - for (unsigned int i = 0; i < count; i++) - { - Xdr::write (writePtr, - *(const unsigned int *) readPtr); - readPtr += sampleStride; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - for (int x = xMin; x <= xMax; x++) - { - unsigned int count = - sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - const char* ptr = base + (y-yOffsetForData) * dataYStride + (x-xOffsetForData) * dataXStride; - const char* readPtr = ((const char**) ptr)[0]; - for (unsigned int i = 0; i < count; i++) - { - Xdr::write (writePtr, *(const half *) readPtr); - readPtr += sampleStride; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - for (int x = xMin; x <= xMax; x++) - { - unsigned int count = - sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - const char* ptr = base + (y-yOffsetForData) * dataYStride + (x-xOffsetForData) * dataXStride; - - const char* readPtr = ((const char**) ptr)[0]; - for (unsigned int i = 0; i < count; i++) - { - Xdr::write (writePtr, *(const float *) readPtr); - readPtr += sampleStride; - } - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } - else - { - // - // The the line or tile buffer is in NATIVE format. - // - - switch (type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - for (int x = xMin; x <= xMax; x++) - { - unsigned int count = - sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - const char* ptr = base + (y-yOffsetForData) * dataYStride + (x-xOffsetForData) * dataXStride; - const char* readPtr = ((const char**) ptr)[0]; - for (unsigned int i = 0; i < count; i++) - { - for (size_t j = 0; j < sizeof (unsigned int); ++j) - *writePtr++ = readPtr[j]; - - readPtr += sampleStride; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - for (int x = xMin; x <= xMax; x++) - { - unsigned int count = - sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - const char* ptr = base + (y-yOffsetForData) * dataYStride + (x-xOffsetForData) * dataXStride; - const char* readPtr = ((const char**) ptr)[0]; - for (unsigned int i = 0; i < count; i++) - { - *(half *) writePtr = *(const half *) readPtr; - writePtr += sizeof (half); - readPtr += sampleStride; - } - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - for (int x = xMin; x <= xMax; x++) - { - unsigned int count = - sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x - xOffsetForSampleCount, - y - yOffsetForSampleCount); - - const char* ptr = base + (y-yOffsetForData) * dataYStride + (x-xOffsetForData) * dataXStride; - const char* readPtr = ((const char**) ptr)[0]; - for (unsigned int i = 0; i < count; i++) - { - for (size_t j = 0; j < sizeof (float); ++j) - *writePtr++ = readPtr[j]; - - readPtr += sampleStride; - } - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } -} - - -void -fillChannelWithZeroes (char *& writePtr, - Compressor::Format format, - PixelType type, - size_t xSize) -{ - if (format == Compressor::XDR) - { - // - // Fill with data in XDR format. - // - - switch (type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - for (size_t j = 0; j < xSize; ++j) - Xdr::write (writePtr, (unsigned int) 0); - - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - for (size_t j = 0; j < xSize; ++j) - Xdr::write (writePtr, (half) 0); - - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - for (size_t j = 0; j < xSize; ++j) - Xdr::write (writePtr, (float) 0); - - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } - else - { - // - // Fill with data in NATIVE format. - // - - switch (type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - for (size_t j = 0; j < xSize; ++j) - { - static const unsigned int ui = 0; - - for (size_t i = 0; i < sizeof (ui); ++i) - *writePtr++ = ((char *) &ui)[i]; - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - for (size_t j = 0; j < xSize; ++j) - { - *(half *) writePtr = half (0); - writePtr += sizeof (half); - } - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - for (size_t j = 0; j < xSize; ++j) - { - static const float f = 0; - - for (size_t i = 0; i < sizeof (f); ++i) - *writePtr++ = ((char *) &f)[i]; - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown pixel data type."); - } - } -} - -bool -usesLongNames (const Header &header) -{ - // - // If an OpenEXR file contains any attribute names, attribute type names - // or channel names longer than 31 characters, then the file cannot be - // read by older versions of the IlmImf library (up to OpenEXR 1.6.1). - // Before writing the file header, we check if the header contains - // any names longer than 31 characters; if it does, then we set the - // LONG_NAMES_FLAG in the file version number. Older versions of the - // IlmImf library will refuse to read files that have the LONG_NAMES_FLAG - // set. Without the flag, older versions of the library would mis- - // interpret the file as broken. - // - - for (Header::ConstIterator i = header.begin(); - i != header.end(); - ++i) - { - if (strlen (i.name()) >= 32 || strlen (i.attribute().typeName()) >= 32) - return true; - } - - const ChannelList &channels = header.channels(); - - for (ChannelList::ConstIterator i = channels.begin(); - i != channels.end(); - ++i) - { - if (strlen (i.name()) >= 32) - return true; - } - - return false; -} - -int -getScanlineChunkOffsetTableSize(const Header& header) -{ - const Box2i &dataWindow = header.dataWindow(); - - vector bytesPerLine; - size_t maxBytesPerLine = bytesPerLineTable (header, - bytesPerLine); - - Compressor* compressor = newCompressor(header.compression(), - maxBytesPerLine, - header); - - int linesInBuffer = numLinesInBuffer (compressor); - - int lineOffsetSize = (dataWindow.max.y - dataWindow.min.y + - linesInBuffer) / linesInBuffer; - - delete compressor; - - return lineOffsetSize; -} - -// -// Located in ImfTiledMisc.cpp -// -int -getTiledChunkOffsetTableSize(const Header& header); - -int -getChunkOffsetTableSize(const Header& header,bool ignore_attribute) -{ - if(!ignore_attribute && header.hasChunkCount()) - { - return header.chunkCount(); - } - - if(header.hasType() && !isSupportedType(header.type())) - { - throw IEX_NAMESPACE::ArgExc ("unsupported header type to " - "get chunk offset table size"); - } - if (isTiled(header.type()) == false) - return getScanlineChunkOffsetTableSize(header); - else - return getTiledChunkOffsetTableSize(header); - -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMisc.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMisc.h deleted file mode 100644 index cc697e2..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMisc.h +++ /dev/null @@ -1,466 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_MISC_H -#define INCLUDED_IMF_MISC_H - -//----------------------------------------------------------------------------- -// -// Miscellaneous helper functions for OpenEXR image file I/O -// -//----------------------------------------------------------------------------- - -#include "ImfPixelType.h" -#include "ImfCompressor.h" -#include "ImfArray.h" -#include "ImfNamespace.h" -#include "ImfExport.h" -#include "ImfForward.h" - -#include -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -// -// Return the size of a single value of the indicated type, -// in the machine's native format. -// - -IMF_EXPORT -int pixelTypeSize (PixelType type); - - -// -// Return the number of samples a channel with subsampling rate -// s has in the interval [a, b]. For example, a channel with -// subsampling rate 2 (and samples at 0, 2, 4, 6, 8, etc.) has -// 2 samples in the interval [1, 5] and three samples in the -// interval [2, 6]. -// - -IMF_EXPORT -int numSamples (int s, int a, int b); - - -// -// Build a table that lists, for each scanline in a file's -// data window, how many bytes are required to store all -// pixels in all channels in that scanline (assuming that -// the pixel data are tightly packed). -// - -IMF_EXPORT -size_t bytesPerLineTable (const Header &header, - std::vector &bytesPerLine); - - -// -// Get the sample count for pixel (x, y) using the array base -// pointer, xStride and yStride. -// - -IMF_EXPORT -int& -sampleCount(char* base, int xStride, int yStride, int x, int y); - - -IMF_EXPORT -const int& -sampleCount(const char* base, int xStride, int yStride, int x, int y); - -// -// Build a table that lists, for each scanline in a DEEP file's -// data window, how many bytes are required to store all -// pixels in all channels in scanlines ranged in [minY, maxY] -// (assuming that the pixel data are tightly packed). -// - -IMF_EXPORT -size_t bytesPerDeepLineTable (const Header &header, - int minY, int maxY, - const char* base, - int xStride, - int yStride, - std::vector &bytesPerLine); - - -// -// Build a table that lists, for each scanline in a DEEP file's -// data window, how many bytes are required to store all -// pixels in all channels in every scanline (assuming that -// the pixel data are tightly packed). -// - -IMF_EXPORT -size_t bytesPerDeepLineTable (const Header &header, - char* base, - int xStride, - int yStride, - std::vector &bytesPerLine); - - -// -// For scanline-based files, pixels are read or written in -// in multi-scanline blocks. Internally, class OutputFile -// and class ScanLineInputFile store a block of scan lines -// in a "line buffer". Function offsetInLineBufferTable() -// builds a table that lists, scanlines within range -// [scanline1, scanline2], the location of the pixel data -// for the scanline relative to the beginning of the line buffer, -// where scanline1 = 0 represents the first line in the DATA WINDOW. -// The one without specifying the range will make scanline1 = 0 -// and scanline2 = bytesPerLine.size(). -// - -IMF_EXPORT -void offsetInLineBufferTable (const std::vector &bytesPerLine, - int scanline1, int scanline2, - int linesInLineBuffer, - std::vector &offsetInLineBuffer); - -IMF_EXPORT -void offsetInLineBufferTable (const std::vector &bytesPerLine, - int linesInLineBuffer, - std::vector &offsetInLineBuffer); - -// -// For a scanline-based file, compute the range of scanlines -// that occupy the same line buffer as a given scanline, y. -// (minY is the minimum y coordinate of the file's data window.) -// - -IMF_EXPORT int lineBufferMinY (int y, int minY, int linesInLineBuffer); -IMF_EXPORT int lineBufferMaxY (int y, int minY, int linesInLineBuffer); - - -// -// Return a compressor's data format (Compressor::NATIVE or Compressor::XDR). -// If compressor is 0, return Compressor::XDR. -// - -IMF_EXPORT -Compressor::Format defaultFormat (Compressor *compressor); - - -// -// Return the number of scan lines a compressor wants to compress -// or uncompress at once. If compressor is 0, return 1. -// - -IMF_EXPORT -int numLinesInBuffer (Compressor *compressor); - - -// -// Copy a single channel of a horizontal row of pixels from an -// input file's internal line buffer or tile buffer into a -// frame buffer slice. If necessary, perform on-the-fly data -// type conversion. -// -// readPtr initially points to the beginning of the -// data in the line or tile buffer. readPtr -// is advanced as the pixel data are copied; -// when copyIntoFrameBuffer() returns, -// readPtr points just past the end of the -// copied data. -// -// writePtr, endPtr point to the lefmost and rightmost pixels -// in the frame buffer slice -// -// xStride the xStride for the frame buffer slice -// -// format indicates if the line or tile buffer is -// in NATIVE or XDR format. -// -// typeInFrameBuffer the pixel data type of the frame buffer slice -// -// typeInFile the pixel data type in the input file's channel -// - -IMF_EXPORT -void copyIntoFrameBuffer (const char *&readPtr, - char *writePtr, - char *endPtr, - size_t xStride, - bool fill, - double fillValue, - Compressor::Format format, - PixelType typeInFrameBuffer, - PixelType typeInFile); - - -// -// Copy a single channel of a horizontal row of pixels from an -// input file's internal line buffer or tile buffer into a -// frame buffer slice. If necessary, perform on-the-fly data -// type conversion. -// -// readPtr initially points to the beginning of the -// data in the line or tile buffer. readPtr -// is advanced as the pixel data are copied; -// when copyIntoFrameBuffer() returns, -// readPtr points just past the end of the -// copied data. -// -// base point to each pixel in the framebuffer -// -// sampleCountBase, provide the number of samples in each pixel -// sampleCountXStride, -// sampleCountYStride -// -// y the scanline to copy. The coordinate is -// relative to the datawindow.min.y. -// -// minX, maxX used to indicate which pixels in the scanline -// will be copied. -// -// xOffsetForSampleCount, used to offset the sample count array -// yOffsetForSampleCount, and the base array. -// xOffsetForData, -// yOffsetForData -// -// xStride the xStride for the frame buffer slice -// -// format indicates if the line or tile buffer is -// in NATIVE or XDR format. -// -// typeInFrameBuffer the pixel data type of the frame buffer slice -// -// typeInFile the pixel data type in the input file's channel -// - -IMF_EXPORT -void copyIntoDeepFrameBuffer (const char *& readPtr, - char * base, - const char* sampleCountBase, - ptrdiff_t sampleCountXStride, - ptrdiff_t sampleCountYStride, - int y, int minX, int maxX, - int xOffsetForSampleCount, - int yOffsetForSampleCount, - int xOffsetForData, - int yOffsetForData, - ptrdiff_t xStride, - ptrdiff_t xPointerStride, - ptrdiff_t yPointerStride, - bool fill, - double fillValue, - Compressor::Format format, - PixelType typeInFrameBuffer, - PixelType typeInFile); - - -// -// Given a pointer into a an input file's line buffer or tile buffer, -// skip over the data for xSize pixels of type typeInFile. -// readPtr initially points to the beginning of the data to be skipped; -// when skipChannel() returns, readPtr points just past the end of the -// skipped data. -// - -IMF_EXPORT -void skipChannel (const char *&readPtr, - PixelType typeInFile, - size_t xSize); - -// -// Convert an array of pixel data from the machine's native -// representation to XDR format. -// -// toPtr, fromPtr initially point to the beginning of the input -// and output pixel data arrays; when convertInPlace() -// returns, toPtr and fromPtr point just past the -// end of the input and output arrays. -// If the native representation of the data has the -// same size as the XDR data, then the conversion -// can take in place, without an intermediate -// temporary buffer (toPtr and fromPtr can point -// to the same location). -// -// type the pixel data type -// -// numPixels number of pixels in the input and output arrays -// - -IMF_EXPORT -void convertInPlace (char *&toPtr, - const char *&fromPtr, - PixelType type, - size_t numPixels); - -// -// Copy a single channel of a horizontal row of pixels from a -// a frame buffer into an output file's internal line buffer or -// tile buffer. -// -// writePtr initially points to the beginning of the -// data in the line or tile buffer. writePtr -// is advanced as the pixel data are copied; -// when copyFromFrameBuffer() returns, -// writePtr points just past the end of the -// copied data. -// -// readPtr, endPtr point to the lefmost and rightmost pixels -// in the frame buffer slice -// -// xStride the xStride for the frame buffer slice -// -// format indicates if the line or tile buffer is -// in NATIVE or XDR format. -// -// type the pixel data type in the frame buffer -// and in the output file's channel (function -// copyFromFrameBuffer() doesn't do on-the-fly -// data type conversion) -// - -IMF_EXPORT -void copyFromFrameBuffer (char *&writePtr, - const char *&readPtr, - const char *endPtr, - size_t xStride, - Compressor::Format format, - PixelType type); - -// -// Copy a single channel of a horizontal row of pixels from a -// a frame buffer in a deep data file into an output file's -// internal line buffer or tile buffer. -// -// writePtr initially points to the beginning of the -// data in the line or tile buffer. writePtr -// is advanced as the pixel data are copied; -// when copyFromDeepFrameBuffer() returns, -// writePtr points just past the end of the -// copied data. -// -// base the start pointer of each pixel in this channel. -// It points to the real data in FrameBuffer. -// It is different for different channels. -// dataWindowMinX and dataWindowMinY are involved in -// locating for base. -// -// sampleCountBase, used to locate the position to get -// sampleCountXStride, the number of samples for each pixel. -// sampleCountYStride Used to determine how far we should -// read based on the pointer provided by base. -// -// y the scanline to copy. If we are dealing -// with a tiled deep file, then probably a portion -// of the scanline is copied. -// -// xMin, xMax used to indicate which pixels in the scanline -// will be copied. -// -// xOffsetForSampleCount, used to offset the sample count array -// yOffsetForSampleCount, and the base array. -// xOffsetForData, -// yOffsetForData -// -// xStride the xStride for the frame buffer slice -// -// format indicates if the line or tile buffer is -// in NATIVE or XDR format. -// -// type the pixel data type in the frame buffer -// and in the output file's channel (function -// copyFromFrameBuffer() doesn't do on-the-fly -// data type conversion) -// - -IMF_EXPORT -void copyFromDeepFrameBuffer (char *& writePtr, - const char * base, - char* sampleCountBase, - ptrdiff_t sampleCountXStride, - ptrdiff_t sampleCountYStride, - int y, int xMin, int xMax, - int xOffsetForSampleCount, - int yOffsetForSampleCount, - int xOffsetForData, - int yOffsetForData, - ptrdiff_t sampleStride, - ptrdiff_t xStrideForData, - ptrdiff_t yStrideForData, - Compressor::Format format, - PixelType type); - -// -// Fill part of an output file's line buffer or tile buffer with -// zeroes. This routine is called when an output file contains -// a channel for which the frame buffer contains no corresponding -// slice. -// -// writePtr initially points to the beginning of the -// data in the line or tile buffer. When -// fillChannelWithZeroes() returns, writePtr -// points just past the end of the zeroed -// data. -// -// format indicates if the line or tile buffer is -// in NATIVE or XDR format. -// -// type the pixel data type in the line or frame buffer. -// -// xSize number of pixels to be filled with zeroes. -// - -IMF_EXPORT -void fillChannelWithZeroes (char *&writePtr, - Compressor::Format format, - PixelType type, - size_t xSize); - -IMF_EXPORT -bool usesLongNames (const Header &header); - - -// -// compute size of chunk offset table - if ignore_attribute set to true -// will compute from the image size and layout, rather than the attribute -// The default behaviour is to read the attribute -// - -IMF_EXPORT -int getChunkOffsetTableSize(const Header& header,bool ignore_attribute=false); - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.cpp deleted file mode 100644 index 81ccf6b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.cpp +++ /dev/null @@ -1,783 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfMultiPartInputFile.h" - -#include "ImfTimeCodeAttribute.h" -#include "ImfChromaticitiesAttribute.h" -#include "ImfBoxAttribute.h" -#include "ImfFloatAttribute.h" -#include "ImfStdIO.h" -#include "ImfTileOffsets.h" -#include "ImfMisc.h" -#include "ImfTiledMisc.h" -#include "ImfInputStreamMutex.h" -#include "ImfInputPartData.h" -#include "ImfPartType.h" -#include "ImfInputFile.h" -#include "ImfScanLineInputFile.h" -#include "ImfTiledInputFile.h" -#include "ImfDeepScanLineInputFile.h" -#include "ImfDeepTiledInputFile.h" -#include "ImfVersion.h" - -#include -#include -#include - -#include -#include -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; -using IMATH_NAMESPACE::Box2i; - -using std::vector; -using std::map; -using std::set; -using std::string; - -namespace -{ - // Controls whether we error out in the event of shared attribute - // inconsistency in the input file - static const bool strictSharedAttribute = true; -} - -struct MultiPartInputFile::Data: public InputStreamMutex -{ - int version; // Version of this file. - bool deleteStream; // If we should delete the stream during destruction. - vector parts; // Data to initialize Output files. - int numThreads; // Number of threads - bool reconstructChunkOffsetTable; // If we should reconstruct - // the offset table if it's broken. - std::map _inputFiles; - std::vector
_headers; - - - void chunkOffsetReconstruction(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, const std::vector& parts); - - void readChunkOffsetTables(bool reconstructChunkOffsetTable); - - bool checkSharedAttributesValues(const Header & src, - const Header & dst, - std::vector & conflictingAttributes) const; - - TileOffsets* createTileOffsets(const Header& header); - - InputPartData* getPart(int partNumber); - - Data (bool deleteStream, int numThreads, bool reconstructChunkOffsetTable): - InputStreamMutex(), - deleteStream (deleteStream), - numThreads (numThreads), - reconstructChunkOffsetTable(reconstructChunkOffsetTable) - { - } - - ~Data() - { - if (deleteStream) delete is; - - for (size_t i = 0; i < parts.size(); i++) - delete parts[i]; - } - - template - T* createInputPartT(int partNumber) - { - - } -}; - -MultiPartInputFile::MultiPartInputFile(const char fileName[], - int numThreads, - bool reconstructChunkOffsetTable): - _data(new Data(true, numThreads, reconstructChunkOffsetTable)) -{ - try - { - _data->is = new StdIFStream (fileName); - initialize(); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot read image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - -MultiPartInputFile::MultiPartInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, - int numThreads, - bool reconstructChunkOffsetTable): - _data(new Data(false, numThreads, reconstructChunkOffsetTable)) -{ - try - { - _data->is = &is; - initialize(); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot read image file " - "\"" << is.fileName() << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - -template -T* -MultiPartInputFile::getInputPart(int partNumber) -{ - Lock lock(*_data); - if (_data->_inputFiles.find(partNumber) == _data->_inputFiles.end()) - { - T* file = new T(_data->getPart(partNumber)); - _data->_inputFiles.insert(std::make_pair(partNumber, (GenericInputFile*) file)); - return file; - } - else return (T*) _data->_inputFiles[partNumber]; -} - - -template InputFile* MultiPartInputFile::getInputPart(int); -template TiledInputFile* MultiPartInputFile::getInputPart(int); -template DeepScanLineInputFile* MultiPartInputFile::getInputPart(int); -template DeepTiledInputFile* MultiPartInputFile::getInputPart(int); - -InputPartData* -MultiPartInputFile::getPart(int partNumber) -{ - return _data->getPart(partNumber); -} - - - -const Header & - MultiPartInputFile::header(int n) const -{ - return _data->_headers[n]; -} - - - -MultiPartInputFile::~MultiPartInputFile() -{ - for (map::iterator it = _data->_inputFiles.begin(); - it != _data->_inputFiles.end(); it++) - { - delete it->second; - } - - delete _data; -} - - -bool -MultiPartInputFile::Data::checkSharedAttributesValues(const Header & src, - const Header & dst, - vector & conflictingAttributes) const -{ - conflictingAttributes.clear(); - - bool conflict = false; - - // - // Display Window - // - if (src.displayWindow() != dst.displayWindow()) - { - conflict = true; - conflictingAttributes.push_back ("displayWindow"); - } - - - // - // Pixel Aspect Ratio - // - if (src.pixelAspectRatio() != dst.pixelAspectRatio()) - { - conflict = true; - conflictingAttributes.push_back ("pixelAspectRatio"); - } - - - // - // Timecode - // - const TimeCodeAttribute * srcTimeCode = src.findTypedAttribute< - TimeCodeAttribute> (TimeCodeAttribute::staticTypeName()); - const TimeCodeAttribute * dstTimeCode = dst.findTypedAttribute< - TimeCodeAttribute> (TimeCodeAttribute::staticTypeName()); - - if (dstTimeCode) - { - if ( (srcTimeCode && (srcTimeCode->value() != dstTimeCode->value())) || - (!srcTimeCode)) - { - conflict = true; - conflictingAttributes.push_back (TimeCodeAttribute::staticTypeName()); - } - } - - // - // Chromaticities - // - const ChromaticitiesAttribute * srcChrom = src.findTypedAttribute< - ChromaticitiesAttribute> (ChromaticitiesAttribute::staticTypeName()); - const ChromaticitiesAttribute * dstChrom = dst.findTypedAttribute< - ChromaticitiesAttribute> (ChromaticitiesAttribute::staticTypeName()); - - if (dstChrom) - { - if ( (srcChrom && (srcChrom->value() != dstChrom->value())) || - (!srcChrom)) - { - conflict = true; - conflictingAttributes.push_back (ChromaticitiesAttribute::staticTypeName()); - } - } - - - return conflict; -} - - -void -MultiPartInputFile::initialize() -{ - readMagicNumberAndVersionField(*_data->is, _data->version); - - bool multipart = isMultiPart(_data->version); - bool tiled = isTiled(_data->version); - - // - // Multipart files don't have and shouldn't have the tiled bit set. - // - - if (tiled && multipart) - throw IEX_NAMESPACE::InputExc ("Multipart files cannot have the tiled bit set"); - - - int pos = 0; - while (true) - { - Header header; - header.readFrom(*_data->is, _data->version); - - // - // If we read nothing then we stop reading. - // - - if (header.readsNothing()) - { - pos++; - break; - } - - _data->_headers.push_back(header); - - if(multipart == false) - break; - } - - // - // Perform usual check on headers. - // - - for (size_t i = 0; i < _data->_headers.size(); i++) - { - // - // Silently invent a type if the file is a single part regular image. - // - - if( _data->_headers[i].hasType() == false ) - { - if(multipart) - - throw IEX_NAMESPACE::ArgExc ("Every header in a multipart file should have a type"); - - _data->_headers[i].setType(tiled ? TILEDIMAGE : SCANLINEIMAGE); - } - else - { - - // - // Silently fix the header type if it's wrong - // (happens when a regular Image file written by EXR_2.0 is rewritten by an older library, - // so doesn't effect deep image types) - // - - if(!multipart && !isNonImage(_data->version)) - { - _data->_headers[i].setType(tiled ? TILEDIMAGE : SCANLINEIMAGE); - } - } - - - - if( _data->_headers[i].hasName() == false ) - { - if(multipart) - throw IEX_NAMESPACE::ArgExc ("Every header in a multipart file should have a name"); - } - - if (isTiled(_data->_headers[i].type())) - _data->_headers[i].sanityCheck(true, multipart); - else - _data->_headers[i].sanityCheck(false, multipart); - } - - // - // Check name uniqueness. - // - - if (multipart) - { - set names; - for (size_t i = 0; i < _data->_headers.size(); i++) - { - - if (names.find(_data->_headers[i].name()) != names.end()) - { - throw IEX_NAMESPACE::InputExc ("Header name " + _data->_headers[i].name() + - " is not a unique name."); - } - names.insert(_data->_headers[i].name()); - } - } - - // - // Check shared attributes compliance. - // - - if (multipart && strictSharedAttribute) - { - for (size_t i = 1; i < _data->_headers.size(); i++) - { - vector attrs; - if (_data->checkSharedAttributesValues (_data->_headers[0], _data->_headers[i], attrs)) - { - string attrNames; - for (size_t j=0; j_headers[i].name() + - " has non-conforming shared attributes: "+ - attrNames); - } - } - } - - // - // Create InputParts and read chunk offset tables. - // - - for (size_t i = 0; i < _data->_headers.size(); i++) - _data->parts.push_back( - new InputPartData(_data, _data->_headers[i], i, _data->numThreads, _data->version)); - - _data->readChunkOffsetTables(_data->reconstructChunkOffsetTable); -} - -TileOffsets* -MultiPartInputFile::Data::createTileOffsets(const Header& header) -{ - // - // Get the dataWindow information - // - - const Box2i &dataWindow = header.dataWindow(); - int minX = dataWindow.min.x; - int maxX = dataWindow.max.x; - int minY = dataWindow.min.y; - int maxY = dataWindow.max.y; - - // - // Precompute level and tile information - // - - int* numXTiles; - int* numYTiles; - int numXLevels, numYLevels; - TileDescription tileDesc = header.tileDescription(); - precalculateTileInfo (tileDesc, - minX, maxX, - minY, maxY, - numXTiles, numYTiles, - numXLevels, numYLevels); - - TileOffsets* tileOffsets = new TileOffsets (tileDesc.mode, - numXLevels, - numYLevels, - numXTiles, - numYTiles); - delete [] numXTiles; - delete [] numYTiles; - - return tileOffsets; -} - - -void -MultiPartInputFile::Data::chunkOffsetReconstruction(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, const vector& parts) -{ - // - // Reconstruct broken chunk offset tables. Stop once we received any exception. - // - - Int64 position = is.tellg(); - - - // - // check we understand all the parts available: if not, we cannot continue - // exceptions thrown here should trickle back up to the constructor - // - - for (size_t i = 0; i < parts.size(); i++) - { - Header& header=parts[i]->header; - - // - // do we have a valid type entry? - // we only need them for true multipart files or single part non-image (deep) files - // - if(!header.hasType() && (isMultiPart(version) || isNonImage(version))) - { - throw IEX_NAMESPACE::ArgExc("cannot reconstruct incomplete file: part with missing type"); - } - if(!isSupportedType(header.type())) - { - throw IEX_NAMESPACE::ArgExc("cannot reconstruct incomplete file: part with unknown type "+header.type()); - } - } - - - // how many chunks should we read? We should stop when we reach the end - size_t total_chunks = 0; - - // for tiled-based parts, array of (pointers to) tileOffsets objects - // to create mapping between tile coordinates and chunk table indices - - - vector tileOffsets(parts.size()); - - // for scanline-based parts, number of scanlines in each part - vector rowsizes(parts.size()); - - for(size_t i = 0 ; i < parts.size() ; i++) - { - total_chunks += parts[i]->chunkOffsets.size(); - if (isTiled(parts[i]->header.type())) - { - tileOffsets[i] = createTileOffsets(parts[i]->header); - }else{ - tileOffsets[i] = NULL; - // (TODO) fix this so that it doesn't need to be revised for future compression types. - switch(parts[i]->header.compression()) - { - case DWAB_COMPRESSION : - rowsizes[i] = 256; - break; - case PIZ_COMPRESSION : - case B44_COMPRESSION : - case B44A_COMPRESSION : - case DWAA_COMPRESSION : - rowsizes[i]=32; - break; - case ZIP_COMPRESSION : - case PXR24_COMPRESSION : - rowsizes[i]=16; - break; - case ZIPS_COMPRESSION : - case RLE_COMPRESSION : - case NO_COMPRESSION : - rowsizes[i]=1; - break; - default : - throw(IEX_NAMESPACE::ArgExc("Unknown compression method in chunk offset reconstruction")); - } - } - } - - try - { - - // - // - // - - Int64 chunk_start = position; - for (size_t i = 0; i < total_chunks ; i++) - { - // - // do we have a part number? - // - - int partNumber = 0; - if(isMultiPart(version)) - { - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, partNumber); - } - - - - if(partNumber<0 || partNumber>int(parts.size())) - { - // bail here - bad part number - throw int(); - } - - Header& header = parts[partNumber]->header; - - // size of chunk NOT including multipart field - - Int64 size_of_chunk=0; - - if (isTiled(header.type())) - { - // - // - // - int tilex,tiley,levelx,levely; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, tilex); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, tiley); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, levelx); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, levely); - - //std::cout << "chunk_start for " << tilex <<',' << tiley << ',' << levelx << ' ' << levely << ':' << chunk_start << std::endl; - - - if(!tileOffsets[partNumber]) - { - // this shouldn't actually happen - we should have allocated a valid - // tileOffsets for any part which isTiled - throw int(); - - } - - if(!tileOffsets[partNumber]->isValidTile(tilex,tiley,levelx,levely)) - { - //std::cout << "invalid tile : aborting\n"; - throw int(); - } - - (*tileOffsets[partNumber])(tilex,tiley,levelx,levely)=chunk_start; - - // compute chunk sizes - different procedure for deep tiles and regular - // ones - if(header.type()==DEEPTILE) - { - Int64 packed_offset; - Int64 packed_sample; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, packed_offset); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, packed_sample); - - //add 40 byte header to packed sizes (tile coordinates, packed sizes, unpacked size) - size_of_chunk=packed_offset+packed_sample+40; - } - else - { - - // regular image has 20 bytes of header, 4 byte chunksize; - int chunksize; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, chunksize); - size_of_chunk=chunksize+20; - } - } - else - { - int y_coordinate; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, y_coordinate); - - y_coordinate -= header.dataWindow().min.y; - y_coordinate /= rowsizes[partNumber]; - - if(y_coordinate < 0 || y_coordinate >= int(parts[partNumber]->chunkOffsets.size())) - { - //std::cout << "aborting reconstruction: bad data " << y_coordinate << endl; - //bail to exception catcher: broken scanline - throw int(); - } - - parts[partNumber]->chunkOffsets[y_coordinate]=chunk_start; - //std::cout << "chunk_start for " << y_coordinate << ':' << chunk_start << std::endl; - - if(header.type()==DEEPSCANLINE) - { - Int64 packed_offset; - Int64 packed_sample; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, packed_offset); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, packed_sample); - - - size_of_chunk=packed_offset+packed_sample+28; - } - else - { - int chunksize; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, chunksize); - size_of_chunk=chunksize+8; - } - - } - - if(isMultiPart(version)) - { - chunk_start+=4; - } - - chunk_start+=size_of_chunk; - - //std::cout << " next chunk +"<header,false); - parts[i]->chunkOffsets.resize(chunkOffsetTableSize); - - for (int j = 0; j < chunkOffsetTableSize; j++) - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*is, parts[i]->chunkOffsets[j]); - - // - // Check chunk offsets, reconstruct if broken. - // At first we assume the table is complete. - // - parts[i]->completed = true; - for (int j = 0; j < chunkOffsetTableSize; j++) - { - if (parts[i]->chunkOffsets[j] <= 0) - { - brokenPartsExist = true; - parts[i]->completed = false; - break; - } - } - } - - if (brokenPartsExist && reconstructChunkOffsetTable) - chunkOffsetReconstruction(*is, parts); -} - -int -MultiPartInputFile::version() const -{ - return _data->version; -} - -bool -MultiPartInputFile::partComplete(int part) const -{ - return _data->parts[part]->completed; -} - -int -MultiPartInputFile::parts() const -{ - return int(_data->_headers.size()); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.h deleted file mode 100644 index 51ef9d3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.h +++ /dev/null @@ -1,128 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFMULTIPARTINPUTFILE_H_ -#define IMFMULTIPARTINPUTFILE_H_ - -#include "ImfGenericInputFile.h" -#include "ImfNamespace.h" -#include "ImfForward.h" -#include "ImfThreading.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT MultiPartInputFile : public GenericInputFile -{ - public: - MultiPartInputFile(const char fileName[], - int numThreads = globalThreadCount(), - bool reconstructChunkOffsetTable = true); - - MultiPartInputFile(IStream& is, - int numThreads = globalThreadCount(), - bool reconstructChunkOffsetTable = true); - - virtual ~MultiPartInputFile(); - - // ---------------------- - // Count of number of parts in file - // --------------------- - int parts() const; - - - //---------------------- - // Access to the headers - //---------------------- - - const Header & header(int n) const; - - - //---------------------------------- - // Access to the file format version - //---------------------------------- - - int version () const; - - - // =---------------------------------------- - // Check whether the entire chunk offset - // table for the part is written correctly - // ----------------------------------------- - bool partComplete(int part) const; - - - - struct Data; - - - private: - Data* _data; - - MultiPartInputFile(const MultiPartInputFile &); // not implemented - - - // - // used internally by 'Part' types to access individual parts of the multipart file - // - template T* getInputPart(int partNumber); - InputPartData* getPart(int); - - void initialize(); - - - - - friend class InputPart; - friend class ScanLineInputPart; - friend class TiledInputPart; - friend class DeepScanLineInputPart; - friend class DeepTiledInputPart; - - // - // For backward compatibility. - // - - friend class InputFile; - friend class TiledInputFile; - friend class ScanLineInputFile; - friend class DeepScanLineInputFile; - friend class DeepTiledInputFile; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif /* IMFMULTIPARTINPUTFILE_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.cpp deleted file mode 100644 index 32b2ae1..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.cpp +++ /dev/null @@ -1,519 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfMultiPartOutputFile.h" -#include "ImfBoxAttribute.h" -#include "ImfFloatAttribute.h" -#include "ImfTimeCodeAttribute.h" -#include "ImfChromaticitiesAttribute.h" -#include "ImfOutputPartData.h" -#include "ImfPartType.h" -#include "ImfOutputFile.h" -#include "ImfTiledOutputFile.h" -#include "ImfThreading.h" -#include "IlmThreadMutex.h" -#include "ImfMisc.h" -#include "ImfStdIO.h" -#include "ImfDeepScanLineOutputFile.h" -#include "ImfDeepTiledOutputFile.h" -#include "ImfOutputStreamMutex.h" - -#include "ImfNamespace.h" -#include - - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::Box2i; -using ILMTHREAD_NAMESPACE::Lock; - - -using std::vector; -using std::map; -using std::set; - - -struct MultiPartOutputFile::Data: public OutputStreamMutex -{ - vector parts; // Contains data to initialize Output files. - bool deleteStream; // If we should delete the stream when destruction. - int numThreads; // The number of threads. - std::map _outputFiles; - std::vector
_headers; - - - void headerNameUniquenessCheck (const std::vector
&headers); - - void writeHeadersToFile (const std::vector
&headers); - - void writeChunkTableOffsets (std::vector &parts); - - - //------------------------------------- - // ensure that _headers is valid: called by constructors - //------------------------------------- - void do_header_sanity_checks(bool overrideSharedAttributes); - - // ------------------------------------------------ - // Given a source header, we copy over all the 'shared attributes' to - // the destination header and remove any conflicting ones. - // ------------------------------------------------ - void overrideSharedAttributesValues (const Header & src, - Header & dst); - - // ------------------------------------------------ - // Given a source header, we check the destination header for any - // attributes that are part of the shared attribute set. For attributes - // present in both we check the values. For attribute present in - // destination but absent in source we return false. - // For attributes present in src but missing from dst we return false - // and add the attribute to dst. - // We return false for all other cases. - // If we return true then we also populate the conflictingAttributes - // vector with the names of the attributes that failed the above. - // ------------------------------------------------ - bool checkSharedAttributesValues (const Header & src, - const Header & dst, - std::vector & conflictingAttributes) const; - Data (bool deleteStream, int numThreads): - OutputStreamMutex(), - deleteStream (deleteStream), - numThreads (numThreads) - { - } - - - ~Data() - { - if (deleteStream) delete os; - - for (size_t i = 0; i < parts.size(); i++) - delete parts[i]; - } -}; - -void -MultiPartOutputFile::Data::do_header_sanity_checks(bool overrideSharedAttributes) -{ - size_t parts = _headers.size(); - if (parts == 0) - throw IEX_NAMESPACE::ArgExc ("Empty header list."); - - bool isMultiPart = (parts > 1); - - // - // Do part 0 checks first. - // - - _headers[0].sanityCheck (_headers[0].hasTileDescription(), isMultiPart); - - - if (isMultiPart) - { - // multipart files must contain a chunkCount attribute - _headers[0].setChunkCount(getChunkOffsetTableSize(_headers[0],true)); - - for (size_t i = 1; i < parts; i++) - { - if (_headers[i].hasType() == false) - throw IEX_NAMESPACE::ArgExc ("Every header in a multipart file should have a type"); - - - _headers[i].setChunkCount(getChunkOffsetTableSize(_headers[i],true)); - _headers[i].sanityCheck (_headers[i].hasTileDescription(), isMultiPart); - - - if (overrideSharedAttributes) - overrideSharedAttributesValues(_headers[0],_headers[i]); - else - { - std::vector conflictingAttributes; - bool valid =checkSharedAttributesValues (_headers[0], - _headers[i], - conflictingAttributes); - if (valid) - { - string excMsg("Conflicting attributes found for header :: "); - excMsg += _headers[i].name(); - for (size_t i=0; i_headers.resize(parts); - - for(int i=0;i_headers[i]=headers[i]; - } - try - { - - _data->do_header_sanity_checks(overrideSharedAttributes); - - // - // Build parts and write headers and offset tables to file. - // - - _data->os = new StdOFStream (fileName); - for (size_t i = 0; i < _data->_headers.size(); i++) - _data->parts.push_back( new OutputPartData(_data, _data->_headers[i], i, numThreads, parts>1 ) ); - - writeMagicNumberAndVersionField(*_data->os, &_data->_headers[0],_data->_headers.size()); - _data->writeHeadersToFile(_data->_headers); - _data->writeChunkTableOffsets(_data->parts); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - -MultiPartOutputFile::MultiPartOutputFile(OStream& os, - const Header* headers, - int parts, - bool overrideSharedAttributes, - int numThreads): - _data(new Data(false,numThreads)) -{ - // grab headers - _data->_headers.resize(parts); - _data->os=&os; - - for(int i=0;i_headers[i]=headers[i]; - } - try - { - - _data->do_header_sanity_checks(overrideSharedAttributes); - - // - // Build parts and write headers and offset tables to file. - // - - for (size_t i = 0; i < _data->_headers.size(); i++) - _data->parts.push_back( new OutputPartData(_data, _data->_headers[i], i, numThreads, parts>1 ) ); - - writeMagicNumberAndVersionField(*_data->os, &_data->_headers[0],_data->_headers.size()); - _data->writeHeadersToFile(_data->_headers); - _data->writeChunkTableOffsets(_data->parts); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot open image stream " - "\"" << os.fileName() << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - - -const Header & -MultiPartOutputFile::header(int n) const -{ - if(n<0 || n>int(_data->_headers.size())) - { - throw IEX_NAMESPACE::ArgExc("MultiPartOutputFile::header called with invalid part number"); - } - return _data->_headers[n]; -} - -int -MultiPartOutputFile::parts() const -{ - return _data->_headers.size(); -} - - -MultiPartOutputFile::~MultiPartOutputFile () -{ - for (map::iterator it = _data->_outputFiles.begin(); - it != _data->_outputFiles.end(); it++) - { - delete it->second; - } - - delete _data; -} - -template -T* -MultiPartOutputFile::getOutputPart(int partNumber) -{ - Lock lock(*_data); - if (_data->_outputFiles.find(partNumber) == _data->_outputFiles.end()) - { - T* file = new T(_data->parts[partNumber]); - _data->_outputFiles.insert(std::make_pair(partNumber, (GenericOutputFile*) file)); - return file; - } - else return (T*) _data->_outputFiles[partNumber]; -} - -// instance above function for all four types -template OutputFile* MultiPartOutputFile::getOutputPart(int); -template TiledOutputFile * MultiPartOutputFile::getOutputPart(int); -template DeepScanLineOutputFile * MultiPartOutputFile::getOutputPart (int); -template DeepTiledOutputFile * MultiPartOutputFile::getOutputPart (int); - - - -void -MultiPartOutputFile::Data::overrideSharedAttributesValues(const Header & src, Header & dst) -{ - // - // Display Window - // - const Box2iAttribute * displayWindow = - src.findTypedAttribute ("displayWindow"); - - if (displayWindow) - dst.insert ("displayWindow", *displayWindow); - else - dst.erase ("displayWindow"); - - - // - // Pixel Aspect Ratio - // - const FloatAttribute * pixelAspectRatio = - src.findTypedAttribute ("pixelAspectRatio"); - - if (pixelAspectRatio) - dst.insert ("pixelAspectRatio", *pixelAspectRatio); - else - dst.erase ("pixelAspectRatio"); - - - // - // Timecode - // - const TimeCodeAttribute * timeCode = - src.findTypedAttribute ("timecode"); - - if (timeCode) - dst.insert ("timecode", *timeCode); - else - dst.erase ("timecode"); - - - // - // Chromaticities - // - const ChromaticitiesAttribute * chromaticities = - src.findTypedAttribute ("chromaticities"); - - if (chromaticities) - dst.insert ("chromaticities", *chromaticities); - else - dst.erase ("chromaticities"); - -} - - -bool -MultiPartOutputFile::Data::checkSharedAttributesValues(const Header & src, - const Header & dst, - vector & conflictingAttributes) const -{ - bool conflict = false; - - // - // Display Window - // - if (src.displayWindow() != dst.displayWindow()) - { - conflict = true; - conflictingAttributes.push_back ("displayWindow"); - } - - - // - // Pixel Aspect Ratio - // - if (src.pixelAspectRatio() != dst.pixelAspectRatio()) - { - conflict = true; - conflictingAttributes.push_back ("pixelAspectRatio"); - } - - - // - // Timecode - // - const TimeCodeAttribute * srcTimeCode = src.findTypedAttribute< - TimeCodeAttribute> (TimeCodeAttribute::staticTypeName()); - const TimeCodeAttribute * dstTimeCode = dst.findTypedAttribute< - TimeCodeAttribute> (TimeCodeAttribute::staticTypeName()); - - if (dstTimeCode) - { - if ((srcTimeCode && (srcTimeCode->value() != dstTimeCode->value())) || - (!srcTimeCode)) - { - conflict = true; - conflictingAttributes.push_back (TimeCodeAttribute::staticTypeName()); - } - } - - // - // Chromaticities - // - const ChromaticitiesAttribute * srcChrom = src.findTypedAttribute< - ChromaticitiesAttribute> (ChromaticitiesAttribute::staticTypeName()); - const ChromaticitiesAttribute * dstChrom = dst.findTypedAttribute< - ChromaticitiesAttribute> (ChromaticitiesAttribute::staticTypeName()); - - if (dstChrom) - { - if ( (srcChrom && (srcChrom->value() != dstChrom->value())) || - (!srcChrom)) - { - conflict = true; - conflictingAttributes.push_back (ChromaticitiesAttribute::staticTypeName()); - } - } - - return conflict; -} - - -void -MultiPartOutputFile::Data::headerNameUniquenessCheck (const vector
&headers) -{ - set names; - for (size_t i = 0; i < headers.size(); i++) - { - if (names.find(headers[i].name()) != names.end()) - throw IEX_NAMESPACE::ArgExc ("Each part should have a unique name."); - names.insert(headers[i].name()); - } -} - -void -MultiPartOutputFile::Data::writeHeadersToFile (const vector
&headers) -{ - for (size_t i = 0; i < headers.size(); i++) - { - - // (TODO) consider deep files' preview images here. - if (headers[i].type() == TILEDIMAGE) - parts[i]->previewPosition = headers[i].writeTo(*os, true); - else - parts[i]->previewPosition = headers[i].writeTo(*os, false); - } - - // - // If a multipart file, write zero-length attribute name to mark the end of all headers. - // - - if (headers.size() !=1) - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (*os, ""); -} - -void -MultiPartOutputFile::Data::writeChunkTableOffsets (vector &parts) -{ - for (size_t i = 0; i < parts.size(); i++) - { - int chunkTableSize = getChunkOffsetTableSize(parts[i]->header,false); - - Int64 pos = os->tellp(); - - if (pos == -1) - IEX_NAMESPACE::throwErrnoExc ("Cannot determine current file position (%T)."); - - parts[i]->chunkOffsetTablePosition = os->tellp(); - - // - // Fill in empty data for now. We'll write actual offsets during destruction. - // - - for (int j = 0; j < chunkTableSize; j++) - { - Int64 empty = 0; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (*os, empty); - } - } -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.h deleted file mode 100644 index d5d6bfc..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.h +++ /dev/null @@ -1,118 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// Portions (c) 2012 Weta Digital Ltd -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef MULTIPARTOUTPUTFILE_H_ -#define MULTIPARTOUTPUTFILE_H_ - -#include "ImfHeader.h" -#include "ImfGenericOutputFile.h" -#include "ImfForward.h" -#include "ImfThreading.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -// -// Class responsible for handling the writing of multipart images. -// -// Note: Certain attributes are 'common' to all parts. Notably: -// * Display Window -// * Pixel Aspect Ratio -// * Time Code -// * Chromaticities -// The first header forms the basis for the set of attributes that are shared -// across the constituent parts. -// -// Parameters -// headers - pointer to array of headers; one for each part of the image file -// parts - count of number of parts -// overrideSharedAttributes - toggle for the handling of shared attributes. -// set false to check for inconsistencies, true -// to copy the values over from the first header. -// numThreads - number of threads that should be used in encoding the data. -// - -class IMF_EXPORT MultiPartOutputFile : public GenericOutputFile -{ - public: - MultiPartOutputFile(const char fileName[], - const Header * headers, - int parts, - bool overrideSharedAttributes = false, - int numThreads = globalThreadCount()); - - MultiPartOutputFile(OStream & os, - const Header * headers, - int parts, - bool overrideSharedAttributes = false, - int numThreads = globalThreadCount()); - - // - // return number of parts in file - // - int parts() const ; - - - // - // return header for part n - // (note: may have additional attributes compared to that passed to constructor) - // - const Header & header(int n) const; - - ~MultiPartOutputFile(); - - struct Data; - - private: - Data* _data; - - MultiPartOutputFile(const MultiPartOutputFile &); // not implemented - - template T* getOutputPart(int partNumber); - - - friend class OutputPart; - friend class TiledOutputPart; - friend class DeepScanLineOutputPart; - friend class DeepTiledOutputPart; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif /* MULTIPARTOUTPUTFILE_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiView.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiView.cpp deleted file mode 100644 index acca3fe..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiView.cpp +++ /dev/null @@ -1,435 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2007, Weta Digital Ltd -// -// 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 Weta Digital nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// Functions related to accessing channels -// and views in multi-view OpenEXR files. -// -//----------------------------------------------------------------------------- - -#include - -using namespace std; -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -namespace { - -StringVector -parseString (string name, char c = '.') -{ - // - // Turn name into a list of strings, separating - // on char 'c' with whitespace stripped. - // - - StringVector r; - - while (name.size() > 0) - { - size_t s = name.find (c); - string sec = name.substr (0, s); - - // - // Strip spaces from beginning - // - - while (sec.size() > 0 && sec[0] == ' ') - sec.erase (0, 1); - - // - // Strip spaces from end - // - - while (sec.size() > 0 && sec[sec.size() - 1] == ' ') - sec.erase (sec.size() - 1); - - r.push_back (sec); - - // - // Strip off name including ending 'c' - // - - if (s == name.npos) - name = ""; - else - name = name.substr (s + 1); - } - - return r; -} - - -int -viewNum (const string &view, const StringVector &multiView) -{ - // - // returns which view number is called 'view' - // returns -1 if no member of multiView is 'view' - // (i.e. if viewNum() returns -1, 'view' isn't a view name - // if viewNum() returns 0, 'view' is the default view - // otherwise, it's some other (valid) view - // - - for (size_t i = 0; i < multiView.size(); ++i) - { - if (multiView[i] == view) - return i; - } - - return -1; -} - -} // namespace - - -string -defaultViewName (const StringVector &multiView) -{ - if (multiView.size() > 0) - return multiView[0]; - else - return ""; -} - - -string -viewFromChannelName (const string &channel, - const StringVector &multiView) -{ - // - // Given the name of a channel, return the name of the view to - // which it belongs. - // - - // - // View name is penultimate section of name separated by periods ('.'s) - // - - StringVector s = parseString (channel, '.'); - - if (s.size() == 0) - return ""; // nothing in, nothing out - - if (s.size() == 1) - { - // - // Return default view name. - // The rules say ALL channels with no periods - // in the name belong to the default view. - // - - return multiView[0]; - } - else - { - // - // size >= 2 - the last part is the channel name, - // the next-to-last part is the view name. - // Check if that part of the name really is - // a valid view and, if it is, return it. - // - - const string &viewName = s[s.size() - 2]; - - if (viewNum (viewName, multiView) >= 0) - return viewName; - else - return ""; // not associated with any particular view - } -} - - -ChannelList -channelsInView (const string & viewName, - const ChannelList & channelList, - const StringVector & multiView) -{ - // - // Return a list of all channels belonging to view viewName. - // - - ChannelList q; - - for (ChannelList::ConstIterator i = channelList.begin(); - i != channelList.end(); - ++i) - { - // - // Get view name for this channel - // - - string view = viewFromChannelName (i.name(), multiView); - - - // - // Insert channel into q if it's a member of view viewName - // - - if (view == viewName) - q.insert (i.name(), i.channel()); - } - - return q; -} - - -ChannelList -channelsInNoView (const ChannelList &channelList, - const StringVector &multiView) -{ - // - // Return a list of channels not associated with any named view. - // - - return channelsInView ("", channelList, multiView); -} - - - -bool -areCounterparts (const string &channel1, - const string &channel2, - const StringVector &multiView) -{ - // - // Given two channels, return true if they are the same - // channel in two different views. - // - - StringVector chan1 = parseString (channel1); - size_t size1 = chan1.size(); // number of SECTIONS in string - // name (not string length) - - StringVector chan2 = parseString (channel2); - size_t size2 = chan2.size(); - - if (size1 == 0 || size2 == 0) - return false; - - // - // channel1 and channel2 can't be counterparts - // if either channel is in no view. - // - - if (size1 > 1 && viewNum (chan1[size1 - 2], multiView) == -1) - return false; - - if (size2 > 1 && viewNum (chan2[size2 - 2], multiView) == -1) - return false; - - if (viewFromChannelName (channel1, multiView) == - viewFromChannelName (channel2, multiView)) - { - // - // channel1 and channel2 are not counterparts - // if they are in the same view. - // - - return false; - } - - if (size1 == 1) - { - // - // channel1 is a default channel - the channels will only be - // counterparts if channel2 is of the form . - // - - return size2 == 2 && chan1[0] == chan2[1]; - } - - if (size2 == 1) - { - // - // channel2 is a default channel - the channels will only be - // counterparts if channel1 is of the form . - // - - return size1 == 2 && chan2[0] == chan1[1]; - } - - // - // Neither channel is a default channel. To be counterparts both - // channel names must have the same number of components, and - // all components except the penultimate one must be the same. - // - - if (size1 != size2) - return false; - - for(size_t i = 0; i < size1; ++i) - { - if (i != size1 - 2 && chan1[i] != chan2[i]) - return false; - } - - return true; -} - - -ChannelList -channelInAllViews (const string &channelName, - const ChannelList &channelList, - const StringVector &multiView) -{ - // - // Given the name of a channel, return a - // list of the same channel in all views. - // - - ChannelList q; - - for (ChannelList::ConstIterator i=channelList.begin(); - i != channelList.end(); - ++i) - { - if (i.name() == channelName || - areCounterparts (i.name(), channelName, multiView)) - { - q.insert (i.name(), i.channel()); - } - } - - return q; -} - - -string -channelInOtherView (const string &channelName, - const ChannelList &channelList, - const StringVector &multiView, - const string &otherViewName) -{ - // - // Given the name of a channel in one view, return the - // corresponding channel name for view otherViewName. - // - - for (ChannelList::ConstIterator i=channelList.begin(); - i != channelList.end(); - ++i) - { - if (viewFromChannelName (i.name(), multiView) == otherViewName && - areCounterparts (i.name(), channelName, multiView)) - { - return i.name(); - } - } - - return ""; -} - - -string -insertViewName (const string &channel, - const StringVector &multiView, - int i) -{ - // - // Insert multiView[i] into the channel name if appropriate. - // - - StringVector s = parseString (channel, '.'); - - if (s.size() == 0) - return ""; // nothing in, nothing out - - if (s.size() == 1 && i == 0) - { - // - // Channel in the default view, with no periods in its name. - // Do not insert view name. - // - - return channel; - } - - // - // View name becomes penultimate section of new channel name. - // - - string newName; - - for (size_t j = 0; j < s.size(); ++j) - { - if (j < s.size() - 1) - newName += s[j] + "."; - else - newName += multiView[i] + "." + s[j]; - } - - return newName; -} - - -string -removeViewName(const string & channel,const string & view) -{ - StringVector s = parseString (channel, '.'); - - if (s.size() == 0) - return ""; // nothing in, nothing out - - if (s.size() == 1) - { - // - // Channel in the default view, since no periods in its name. - // No viewname to remove - // - - return channel; - } - - string newName; - for( size_t j = 0 ; j < s.size() ; ++j) - { - // only add the penultimate string part - // if it doesn't match the view name - if(j+2!=s.size() || s[j]!=view) - { - newName += s[j]; - if(j+1!=s.size()) - { - newName += "."; - } - } - } - - return newName; - -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiView.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiView.h deleted file mode 100644 index 127f97d..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfMultiView.h +++ /dev/null @@ -1,187 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2007, Weta Digital Ltd -// -// 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 Weta Digital nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_MULTIVIEW_H -#define INCLUDED_IMF_MULTIVIEW_H - -#include "ImfChannelList.h" -#include "ImfStringVectorAttribute.h" -#include "ImfExport.h" -#include "ImfNamespace.h" - -//----------------------------------------------------------------------------- -// -// Functions related to accessing channels and views in multi-view -// OpenEXR files. -// -// A multi-view image file contains two or more views of the same -// scene, as seen from different viewpoints, for example, a left-eye -// and a right-eye view for stereo displays. Each view has its own -// set of image channels. A naming convention identifies the channels -// that belong to a given view. -// -// A "multiView" attribute in the file header lists the names of the -// views in an image (see ImfStandardAttributes.h), and channel names -// of the form -// -// layer.view.channel -// -// allow channels to be matched with views. -// -// For compatibility with singe-view images, the first view listed in -// the multiView attribute is the "default view", and channels that -// have no periods in their names are considered part of the default -// view. -// -// For example, if a file's multiView attribute lists the views -// "left" and "right", in that order, then "left" is the default -// view. Channels -// -// "R", "left.Z", "diffuse.left.R" -// -// are part of the "left" view; channels -// -// "right.R", "right.Z", "diffuse.right.R" -// -// are part of the "right" view; and channels -// -// "tmp.R", "right.diffuse.R", "diffuse.tmp.R" -// -// belong to no view at all. -// -//----------------------------------------------------------------------------- - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -// -// Return the name of the default view given a multi-view string vector, -// that is, return the first element of the string vector. If the string -// vector is empty, return "". -// - -IMF_EXPORT -std::string defaultViewName (const StringVector &multiView); - - -// -// Given the name of a channel, return the name of the view to -// which it belongs. Returns the empty string ("") if the channel -// is not a member of any named view. -// - -IMF_EXPORT -std::string viewFromChannelName (const std::string &channel, - const StringVector &multiView); - - -// -// Return whether channel1 and channel2 are the same channel but -// viewed in different views. (Return false if either channel -// belongs to no view or if both channels belong to the same view.) -// - -IMF_EXPORT -bool areCounterparts (const std::string &channel1, - const std::string &channel2, - const StringVector &multiView); - -// -// Return a list of all channels belonging to view viewName. -// - -IMF_EXPORT -ChannelList channelsInView (const std::string &viewName, - const ChannelList &channelList, - const StringVector &multiView); - -// -// Return a list of channels not associated with any view. -// - -IMF_EXPORT -ChannelList channelsInNoView (const ChannelList &channelList, - const StringVector &multiView); - -// -// Given the name of a channel, return a list of the same channel -// in all views (for example, given X.left.Y return X.left.Y, -// X.right.Y, X.centre.Y, etc.). -// - -IMF_EXPORT -ChannelList channelInAllViews (const std::string &channame, - const ChannelList &channelList, - const StringVector &multiView); - -// -// Given the name of a channel in one view, return the corresponding -// channel name for view otherViewName. Return "" if no corresponding -// channel exists in view otherViewName, or if view otherViewName doesn't -// exist. -// - -IMF_EXPORT -std::string channelInOtherView (const std::string &channel, - const ChannelList &channelList, - const StringVector &multiView, - const std::string &otherViewName); - -// -// Given a channel name that does not include a view name, insert -// multiView[i] into the channel name at the appropriate location. -// If i is zero and the channel name contains no periods, then do -// not insert the view name. -// - -IMF_EXPORT -std::string insertViewName (const std::string &channel, - const StringVector &multiView, - int i); - -// -// Given a channel name that does may include a view name, return -// string without the view name. If the string does not contain -// the view name, return the string unaltered. -// (Will only remove the viewname if it is in the correct position -// in the string) -// - -IMF_EXPORT -std::string removeViewName (const std::string &channel, - const std::string &view); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfName.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfName.h deleted file mode 100644 index 4d4f25a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfName.h +++ /dev/null @@ -1,150 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_NAME_H -#define INCLUDED_IMF_NAME_H - -//----------------------------------------------------------------------------- -// -// class ImfName -- a zero-terminated string -// with a fixed, small maximum length -// -//----------------------------------------------------------------------------- - -#include -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class Name -{ - public: - - //------------- - // Constructors - //------------- - - Name (); - Name (const char text[]); - - - //-------------------- - // Assignment operator - //-------------------- - - Name & operator = (const char text[]); - - - //--------------------- - // Access to the string - //--------------------- - - const char * text () const {return _text;} - const char * operator * () const {return _text;} - - //--------------- - // Maximum length - //--------------- - - static const int SIZE = 256; - static const int MAX_LENGTH = SIZE - 1; - - private: - - char _text[SIZE]; -}; - - -bool operator == (const Name &x, const Name &y); -bool operator != (const Name &x, const Name &y); -bool operator < (const Name &x, const Name &y); - - -//----------------- -// Inline functions -//----------------- - -inline Name & -Name::operator = (const char text[]) -{ - strncpy (_text, text, MAX_LENGTH); - return *this; -} - - -inline -Name::Name () -{ - _text[0] = 0; -} - - -inline -Name::Name (const char text[]) -{ - *this = text; - _text [MAX_LENGTH] = 0; -} - - -inline bool -operator == (const Name &x, const Name &y) -{ - return strcmp (*x, *y) == 0; -} - - -inline bool -operator != (const Name &x, const Name &y) -{ - return !(x == y); -} - - -inline bool -operator < (const Name &x, const Name &y) -{ - return strcmp (*x, *y) < 0; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfNamespace.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfNamespace.h deleted file mode 100644 index c36a31e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfNamespace.h +++ /dev/null @@ -1,115 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMFNAMESPACE_H -#define INCLUDED_IMFNAMESPACE_H - -// -// The purpose of this file is to have all of the Imath symbols defined within -// the OPENEXR_IMF_INTERNAL_NAMESPACE namespace rather than the standard Imath -// namespace. Those symbols are made available to client code through the -// OPENEXR_IMF_NAMESPACE in addition to the OPENEXR_IMF_INTERNAL_NAMESPACE. -// -// To ensure source code compatibility, the OPENEXR_IMF_NAMESPACE defaults to -// Imath and then "using namespace OPENEXR_IMF_INTERNAL_NAMESPACE;" brings all -// of the declarations from the OPENEXR_IMF_INTERNAL_NAMESPACE into the -// OPENEXR_IMF_NAMESPACE. -// This means that client code can continue to use syntax like -// Imf::Header, but at link time it will resolve to a -// mangled symbol based on the OPENEXR_IMF_INTERNAL_NAMESPACE. -// -// As an example, if one needed to build against a newer version of Imath and -// have it run alongside an older version in the same application, it is now -// possible to use an internal namespace to prevent collisions between the -// older versions of Imath symbols and the newer ones. To do this, the -// following could be defined at build time: -// -// OPENEXR_IMF_INTERNAL_NAMESPACE = Imf_v2 -// -// This means that declarations inside Imath headers look like this (after -// the preprocessor has done its work): -// -// namespace Imf_v2 { -// ... -// class declarations -// ... -// } -// -// namespace Imf { -// using namespace IMF_NAMESPACE_v2; -// } -// - -// -// Open Source version of this file pulls in the OpenEXRConfig.h file -// for the configure time options. -// -#include "OpenEXRConfig.h" - - -#ifndef OPENEXR_IMF_NAMESPACE -#define OPENEXR_IMF_NAMESPACE Imf -#endif - -#ifndef OPENEXR_IMF_INTERNAL_NAMESPACE -#define OPENEXR_IMF_INTERNAL_NAMESPACE OPENEXR_IMF_NAMESPACE -#endif - -// -// We need to be sure that we import the internal namespace into the public one. -// To do this, we use the small bit of code below which initially defines -// OPENEXR_IMF_INTERNAL_NAMESPACE (so it can be referenced) and then defines -// OPENEXR_IMF_NAMESPACE and pulls the internal symbols into the public -// namespace. -// - -namespace OPENEXR_IMF_INTERNAL_NAMESPACE {} -namespace OPENEXR_IMF_NAMESPACE { - using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; -} - -// -// There are identical pairs of HEADER/SOURCE ENTER/EXIT macros so that -// future extension to the namespace mechanism is possible without changing -// project source code. -// - -#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER namespace OPENEXR_IMF_INTERNAL_NAMESPACE { -#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT } - -#define OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER namespace OPENEXR_IMF_INTERNAL_NAMESPACE { -#define OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT } - - -#endif /* INCLUDED_IMFNAMESPACE_H */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp deleted file mode 100644 index 4a473ef..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class OpaqueAttribute -// -//----------------------------------------------------------------------------- - -#include -#include "Iex.h" -#include -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -OpaqueAttribute::OpaqueAttribute (const char typeName[]): - _typeName (strlen (typeName) + 1), - _dataSize (0) -{ - strcpy (_typeName, typeName); -} - - -OpaqueAttribute::OpaqueAttribute (const OpaqueAttribute &other): - _typeName (strlen (other._typeName) + 1), - _dataSize (other._dataSize), - _data (other._dataSize) -{ - strcpy (_typeName, other._typeName); - _data.resizeErase (other._dataSize); - memcpy ((char *) _data, (const char *) other._data, other._dataSize); -} - - -OpaqueAttribute::~OpaqueAttribute () -{ - // empty -} - - -const char * -OpaqueAttribute::typeName () const -{ - return _typeName; -} - - -Attribute * -OpaqueAttribute::copy () const -{ - return new OpaqueAttribute (*this); -} - - -void -OpaqueAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _data, _dataSize); -} - - -void -OpaqueAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - _data.resizeErase (size); - _dataSize = size; - Xdr::read (is, _data, size); -} - - -void -OpaqueAttribute::copyValueFrom (const Attribute &other) -{ - const OpaqueAttribute *oa = dynamic_cast (&other); - - if (oa == 0 || strcmp (_typeName, oa->_typeName)) - { - THROW (IEX_NAMESPACE::TypeExc, "Cannot copy the value of an " - "image file attribute of type " - "\"" << other.typeName() << "\" " - "to an attribute of type " - "\"" << _typeName << "\"."); - } - - _data.resizeErase (oa->_dataSize); - _dataSize = oa->_dataSize; - memcpy ((char *) _data, (const char *) oa->_data, oa->_dataSize); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h deleted file mode 100644 index 1682bfd..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h +++ /dev/null @@ -1,110 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_OPAQUE_ATTRIBUTE_H -#define INCLUDED_IMF_OPAQUE_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class OpaqueAttribute -// -// When an image file is read, OpqaqueAttribute objects are used -// to hold the values of attributes whose types are not recognized -// by the reading program. OpaqueAttribute objects can be read -// from an image file, copied, and written back to to another image -// file, but their values are inaccessible. -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfArray.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT OpaqueAttribute: public Attribute -{ - public: - - //---------------------------- - // Constructors and destructor - //---------------------------- - - OpaqueAttribute (const char typeName[]); - OpaqueAttribute (const OpaqueAttribute &other); - virtual ~OpaqueAttribute (); - - - //------------------------------- - // Get this attribute's type name - //------------------------------- - - virtual const char * typeName () const; - - - //------------------------------ - // Make a copy of this attribute - //------------------------------ - - virtual Attribute * copy () const; - - - //---------------- - // I/O and copying - //---------------- - - virtual void writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - int version) const; - - virtual void readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - int size, - int version); - - virtual void copyValueFrom (const Attribute &other); - - - private: - - Array _typeName; - long _dataSize; - Array _data; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOptimizedPixelReading.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOptimizedPixelReading.h deleted file mode 100644 index 1c83497..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOptimizedPixelReading.h +++ /dev/null @@ -1,646 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Autodesk, Inc. -// -// All rights reserved. -// -// Implementation of IIF-specific file format and speed optimizations -// provided by Innobec Technologies inc on behalf of Autodesk. -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#pragma once - -#ifndef INCLUDED_IMF_OPTIMIZED_PIXEL_READING_H -#define INCLUDED_IMF_OPTIMIZED_PIXEL_READING_H - -#include "ImfSimd.h" -#include "ImfSystemSpecific.h" -#include -#include "ImfChannelList.h" -#include "ImfFrameBuffer.h" -#include "ImfStringVectorAttribute.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -class OptimizationMode -{ -public: - - - bool _optimizable; - int _ySampling; - OptimizationMode() : _optimizable(false) {} - -}; - - -#if IMF_HAVE_SSE2 - - -//------------------------------------------------------------------------ -// Test for SSE pointer alignemnt -//------------------------------------------------------------------------ -EXR_FORCEINLINE -bool -isPointerSSEAligned (const void* EXR_RESTRICT pPointer) -{ - unsigned long trailingBits = ((unsigned long)pPointer) & 15; - return trailingBits == 0; -} - -//------------------------------------------------------------------------ -// Load SSE from address into register -//------------------------------------------------------------------------ -template -EXR_FORCEINLINE -__m128i loadSSE (__m128i*& loadAddress) -{ - // throw exception :: this is not accepted - return _mm_loadu_si128 (loadAddress); -} - -template<> -EXR_FORCEINLINE -__m128i loadSSE (__m128i*& loadAddress) -{ - return _mm_loadu_si128 (loadAddress); -} - -template<> -EXR_FORCEINLINE -__m128i loadSSE (__m128i*& loadAddress) -{ - return _mm_load_si128 (loadAddress); -} - -//------------------------------------------------------------------------ -// Store SSE from register into address -//------------------------------------------------------------------------ -template -EXR_FORCEINLINE -void storeSSE (__m128i*& storeAddress, __m128i& dataToStore) -{ - -} - -template<> -EXR_FORCEINLINE -void -storeSSE (__m128i*& storeAddress, __m128i& dataToStore) -{ - _mm_storeu_si128 (storeAddress, dataToStore); -} - -template<> -EXR_FORCEINLINE -void -storeSSE (__m128i*& storeAddress, __m128i& dataToStore) -{ - _mm_stream_si128 (storeAddress, dataToStore); -} - - - -//------------------------------------------------------------------------ -// -// Write to RGBA -// -//------------------------------------------------------------------------ - -// -// Using SSE intrinsics -// -template -EXR_FORCEINLINE -void writeToRGBASSETemplate - (__m128i*& readPtrSSERed, - __m128i*& readPtrSSEGreen, - __m128i*& readPtrSSEBlue, - __m128i*& readPtrSSEAlpha, - __m128i*& writePtrSSE, - const size_t& lPixelsToCopySSE) -{ - for (size_t i = 0; i < lPixelsToCopySSE; ++i) - { - __m128i redRegister = loadSSE (readPtrSSERed); - __m128i greenRegister = loadSSE (readPtrSSEGreen); - __m128i blueRegister = loadSSE (readPtrSSEBlue); - __m128i alphaRegister = loadSSE (readPtrSSEAlpha); - - __m128i redGreenRegister = _mm_unpacklo_epi16 (redRegister, - greenRegister); - __m128i blueAlphaRegister = _mm_unpacklo_epi16 (blueRegister, - alphaRegister); - - __m128i pixel12Register = _mm_unpacklo_epi32 (redGreenRegister, - blueAlphaRegister); - __m128i pixel34Register = _mm_unpackhi_epi32 (redGreenRegister, - blueAlphaRegister); - - storeSSE (writePtrSSE, pixel12Register); - ++writePtrSSE; - - storeSSE (writePtrSSE, pixel34Register); - ++writePtrSSE; - - redGreenRegister = _mm_unpackhi_epi16 (redRegister, greenRegister); - blueAlphaRegister = _mm_unpackhi_epi16 (blueRegister, alphaRegister); - - pixel12Register = _mm_unpacklo_epi32 (redGreenRegister, - blueAlphaRegister); - pixel34Register = _mm_unpackhi_epi32 (redGreenRegister, - blueAlphaRegister); - - storeSSE (writePtrSSE, pixel12Register); - ++writePtrSSE; - - storeSSE (writePtrSSE, pixel34Register); - ++writePtrSSE; - - ++readPtrSSEAlpha; - ++readPtrSSEBlue; - ++readPtrSSEGreen; - ++readPtrSSERed; - } -} - -// -// Not using SSE intrinsics. This is still faster than the alternative -// because we have multiple read pointers and therefore we are able to -// take advantage of data locality for write operations. -// -EXR_FORCEINLINE -void writeToRGBANormal (unsigned short*& readPtrRed, - unsigned short*& readPtrGreen, - unsigned short*& readPtrBlue, - unsigned short*& readPtrAlpha, - unsigned short*& writePtr, - const size_t& lPixelsToCopy) -{ - for (size_t i = 0; i < lPixelsToCopy; ++i) - { - *(writePtr++) = *(readPtrRed++); - *(writePtr++) = *(readPtrGreen++); - *(writePtr++) = *(readPtrBlue++); - *(writePtr++) = *(readPtrAlpha++); - } -} - -// -// Determine which (template) version to use by checking whether pointers -// are aligned -// -EXR_FORCEINLINE -void optimizedWriteToRGBA (unsigned short*& readPtrRed, - unsigned short*& readPtrGreen, - unsigned short*& readPtrBlue, - unsigned short*& readPtrAlpha, - unsigned short*& writePtr, - const size_t& pixelsToCopySSE, - const size_t& pixelsToCopyNormal) -{ - bool readPtrAreAligned = true; - - readPtrAreAligned &= isPointerSSEAligned(readPtrRed); - readPtrAreAligned &= isPointerSSEAligned(readPtrGreen); - readPtrAreAligned &= isPointerSSEAligned(readPtrBlue); - readPtrAreAligned &= isPointerSSEAligned(readPtrAlpha); - - bool writePtrIsAligned = isPointerSSEAligned(writePtr); - - if (!readPtrAreAligned && !writePtrIsAligned) - { - writeToRGBASSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - (__m128i*&)readPtrAlpha, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - else if (!readPtrAreAligned && writePtrIsAligned) - { - writeToRGBASSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - (__m128i*&)readPtrAlpha, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - else if (readPtrAreAligned && !writePtrIsAligned) - { - writeToRGBASSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - (__m128i*&)readPtrAlpha, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - else if(readPtrAreAligned && writePtrIsAligned) - { - writeToRGBASSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - (__m128i*&)readPtrAlpha, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - - writeToRGBANormal (readPtrRed, readPtrGreen, readPtrBlue, readPtrAlpha, - writePtr, pixelsToCopyNormal); -} - - - -//------------------------------------------------------------------------ -// -// Write to RGBA Fill A -// -//------------------------------------------------------------------------ - -// -// Using SSE intrinsics -// -template -EXR_FORCEINLINE -void -writeToRGBAFillASSETemplate (__m128i*& readPtrSSERed, - __m128i*& readPtrSSEGreen, - __m128i*& readPtrSSEBlue, - const unsigned short& alphaFillValue, - __m128i*& writePtrSSE, - const size_t& pixelsToCopySSE) -{ - const __m128i dummyAlphaRegister = _mm_set_epi16 (alphaFillValue, - alphaFillValue, - alphaFillValue, - alphaFillValue, - alphaFillValue, - alphaFillValue, - alphaFillValue, - alphaFillValue); - - for (size_t pixelCounter = 0; pixelCounter < pixelsToCopySSE; ++pixelCounter) - { - __m128i redRegister = loadSSE (readPtrSSERed); - __m128i greenRegister = loadSSE (readPtrSSEGreen); - __m128i blueRegister = loadSSE (readPtrSSEBlue); - - __m128i redGreenRegister = _mm_unpacklo_epi16 (redRegister, - greenRegister); - __m128i blueAlphaRegister = _mm_unpacklo_epi16 (blueRegister, - dummyAlphaRegister); - - __m128i pixel12Register = _mm_unpacklo_epi32 (redGreenRegister, - blueAlphaRegister); - __m128i pixel34Register = _mm_unpackhi_epi32 (redGreenRegister, - blueAlphaRegister); - - storeSSE (writePtrSSE, pixel12Register); - ++writePtrSSE; - - storeSSE (writePtrSSE, pixel34Register); - ++writePtrSSE; - - redGreenRegister = _mm_unpackhi_epi16 (redRegister, - greenRegister); - blueAlphaRegister = _mm_unpackhi_epi16 (blueRegister, - dummyAlphaRegister); - - pixel12Register = _mm_unpacklo_epi32 (redGreenRegister, - blueAlphaRegister); - pixel34Register = _mm_unpackhi_epi32 (redGreenRegister, - blueAlphaRegister); - - storeSSE (writePtrSSE, pixel12Register); - ++writePtrSSE; - - storeSSE (writePtrSSE, pixel34Register); - ++writePtrSSE; - - ++readPtrSSEBlue; - ++readPtrSSEGreen; - ++readPtrSSERed; - } -} - -// -// Not using SSE intrinsics. This is still faster than the alternative -// because we have multiple read pointers and therefore we are able to -// take advantage of data locality for write operations. -// -EXR_FORCEINLINE -void -writeToRGBAFillANormal (unsigned short*& readPtrRed, - unsigned short*& readPtrGreen, - unsigned short*& readPtrBlue, - const unsigned short& alphaFillValue, - unsigned short*& writePtr, - const size_t& pixelsToCopy) -{ - for (size_t i = 0; i < pixelsToCopy; ++i) - { - *(writePtr++) = *(readPtrRed++); - *(writePtr++) = *(readPtrGreen++); - *(writePtr++) = *(readPtrBlue++); - *(writePtr++) = alphaFillValue; - } -} - -// -// Determine which (template) version to use by checking whether pointers -// are aligned. -// -EXR_FORCEINLINE -void -optimizedWriteToRGBAFillA (unsigned short*& readPtrRed, - unsigned short*& readPtrGreen, - unsigned short*& readPtrBlue, - const unsigned short& alphaFillValue, - unsigned short*& writePtr, - const size_t& pixelsToCopySSE, - const size_t& pixelsToCopyNormal) -{ - bool readPtrAreAligned = true; - - readPtrAreAligned &= isPointerSSEAligned (readPtrRed); - readPtrAreAligned &= isPointerSSEAligned (readPtrGreen); - readPtrAreAligned &= isPointerSSEAligned (readPtrBlue); - - bool writePtrIsAligned = isPointerSSEAligned (writePtr); - - if (!readPtrAreAligned && !writePtrIsAligned) - { - writeToRGBAFillASSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - alphaFillValue, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - else if (!readPtrAreAligned && writePtrIsAligned) - { - writeToRGBAFillASSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - alphaFillValue, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - else if (readPtrAreAligned && !writePtrIsAligned) - { - writeToRGBAFillASSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - alphaFillValue, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - else if (readPtrAreAligned && writePtrIsAligned) - { - writeToRGBAFillASSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - alphaFillValue, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - - writeToRGBAFillANormal (readPtrRed, - readPtrGreen, readPtrBlue, alphaFillValue, - writePtr, pixelsToCopyNormal); -} - - - -//------------------------------------------------------------------------ -// -// Write to RGB -// -//------------------------------------------------------------------------ - -// -// Using SSE intrinsics -// -template -EXR_FORCEINLINE -void -writeToRGBSSETemplate (__m128i*& readPtrSSERed, - __m128i*& readPtrSSEGreen, - __m128i*& readPtrSSEBlue, - __m128i*& writePtrSSE, - const size_t& pixelsToCopySSE) -{ - - for (size_t pixelCounter = 0; pixelCounter < pixelsToCopySSE; ++pixelCounter) - { - // - // Need to shuffle and unpack pointers to obtain my first register - // We must save 8 pixels at a time, so we must have the following three registers at the end: - // 1) R1 G1 B1 R2 G2 B2 R3 G3 - // 2) B3 R4 G4 B4 R5 G5 B5 R6 - // 3) G6 B6 R7 G7 B7 R8 G8 B8 - // - __m128i redRegister = loadSSE (readPtrSSERed); - __m128i greenRegister = loadSSE (readPtrSSEGreen); - __m128i blueRegister = loadSSE (readPtrSSEBlue); - - // - // First register: R1 G1 B1 R2 G2 B2 R3 G3 - // Construct 2 registers and then unpack them to obtain our final result: - // - __m128i redGreenRegister = _mm_unpacklo_epi16 (redRegister, - greenRegister); - __m128i redBlueRegister = _mm_unpacklo_epi16 (redRegister, - blueRegister); - __m128i greenBlueRegister = _mm_unpacklo_epi16 (greenRegister, - blueRegister); - - // Left Part (R1 G1 B1 R2) - __m128i quarterRight = _mm_shufflelo_epi16 (redBlueRegister, - _MM_SHUFFLE(3,0,2,1)); - __m128i halfLeft = _mm_unpacklo_epi32 (redGreenRegister, - quarterRight); - - // Right Part (G2 B2 R3 G3) - __m128i quarterLeft = _mm_shuffle_epi32 (greenBlueRegister, - _MM_SHUFFLE(3,2,0,1)); - quarterRight = _mm_shuffle_epi32 (redGreenRegister, - _MM_SHUFFLE(3,0,1,2)); - __m128i halfRight = _mm_unpacklo_epi32 (quarterLeft, quarterRight); - - __m128i fullRegister = _mm_unpacklo_epi64 (halfLeft, halfRight); - storeSSE (writePtrSSE, fullRegister); - ++writePtrSSE; - - // - // Second register: B3 R4 G4 B4 R5 G5 B5 R6 - // - - // Left Part (B3, R4, G4, B4) - quarterLeft = _mm_shufflehi_epi16 (redBlueRegister, - _MM_SHUFFLE(0, 3, 2, 1)); - quarterRight = _mm_shufflehi_epi16 (greenBlueRegister, - _MM_SHUFFLE(1, 0, 3, 2)); - halfLeft = _mm_unpackhi_epi32 (quarterLeft, quarterRight); - - // Update the registers - redGreenRegister = _mm_unpackhi_epi16 (redRegister, greenRegister); - redBlueRegister = _mm_unpackhi_epi16 (redRegister, blueRegister); - greenBlueRegister = _mm_unpackhi_epi16 (greenRegister, blueRegister); - - // Right Part (R5 G5 B5 R6) - quarterRight = _mm_shufflelo_epi16 (redBlueRegister, - _MM_SHUFFLE(3,0,2,1)); - halfRight = _mm_unpacklo_epi32 (redGreenRegister, quarterRight); - - fullRegister = _mm_unpacklo_epi64 (halfLeft, halfRight); - storeSSE (writePtrSSE, fullRegister); - ++writePtrSSE; - - // - // Third register: G6 B6 R7 G7 B7 R8 G8 B8 - // - - // Left part (G6 B6 R7 G7) - quarterLeft = _mm_shuffle_epi32 (greenBlueRegister, - _MM_SHUFFLE(3,2,0,1)); - quarterRight = _mm_shuffle_epi32 (redGreenRegister, - _MM_SHUFFLE(3,0,1,2)); - halfLeft = _mm_unpacklo_epi32 (quarterLeft, quarterRight); - - // Right part (B7 R8 G8 B8) - quarterLeft = _mm_shufflehi_epi16 (redBlueRegister, - _MM_SHUFFLE(0, 3, 2, 1)); - quarterRight = _mm_shufflehi_epi16 (greenBlueRegister, - _MM_SHUFFLE(1, 0, 3, 2)); - halfRight = _mm_unpackhi_epi32 (quarterLeft, quarterRight); - - fullRegister = _mm_unpacklo_epi64 (halfLeft, halfRight); - storeSSE (writePtrSSE, fullRegister); - ++writePtrSSE; - - // - // Increment read pointers - // - ++readPtrSSEBlue; - ++readPtrSSEGreen; - ++readPtrSSERed; - } -} - -// -// Not using SSE intrinsics. This is still faster than the alternative -// because we have multiple read pointers and therefore we are able to -// take advantage of data locality for write operations. -// -EXR_FORCEINLINE -void -writeToRGBNormal (unsigned short*& readPtrRed, - unsigned short*& readPtrGreen, - unsigned short*& readPtrBlue, - unsigned short*& writePtr, - const size_t& pixelsToCopy) -{ - for (size_t i = 0; i < pixelsToCopy; ++i) - { - *(writePtr++) = *(readPtrRed++); - *(writePtr++) = *(readPtrGreen++); - *(writePtr++) = *(readPtrBlue++); - } -} - -// -// Determine which (template) version to use by checking whether pointers -// are aligned -// -EXR_FORCEINLINE -void optimizedWriteToRGB (unsigned short*& readPtrRed, - unsigned short*& readPtrGreen, - unsigned short*& readPtrBlue, - unsigned short*& writePtr, - const size_t& pixelsToCopySSE, - const size_t& pixelsToCopyNormal) -{ - bool readPtrAreAligned = true; - - readPtrAreAligned &= isPointerSSEAligned(readPtrRed); - readPtrAreAligned &= isPointerSSEAligned(readPtrGreen); - readPtrAreAligned &= isPointerSSEAligned(readPtrBlue); - - bool writePtrIsAligned = isPointerSSEAligned(writePtr); - - if (!readPtrAreAligned && !writePtrIsAligned) - { - writeToRGBSSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - else if (!readPtrAreAligned && writePtrIsAligned) - { - writeToRGBSSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - else if (readPtrAreAligned && !writePtrIsAligned) - { - writeToRGBSSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - else if (readPtrAreAligned && writePtrIsAligned) - { - writeToRGBSSETemplate ((__m128i*&)readPtrRed, - (__m128i*&)readPtrGreen, - (__m128i*&)readPtrBlue, - (__m128i*&)writePtr, - pixelsToCopySSE); - } - - - writeToRGBNormal (readPtrRed, readPtrGreen, readPtrBlue, - writePtr, pixelsToCopyNormal); -} - - - - -#else // ! defined IMF_HAVE_SSE2 - -#endif // defined IMF_HAVE_SSE2 - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputFile.cpp deleted file mode 100644 index 2619d9c..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputFile.cpp +++ /dev/null @@ -1,1378 +0,0 @@ -// -///\todo: version needs fixing! -// - -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class OutputFile -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include -#include -#include -#include "ImathBox.h" -#include "ImathFun.h" -#include -#include "ImfXdr.h" -#include -#include -#include "IlmThreadPool.h" -#include "ImfOutputStreamMutex.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" -#include "Iex.h" -#include "ImfInputPart.h" -#include "ImfNamespace.h" -#include "ImfOutputPartData.h" - -#include -#include -#include -#include -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::divp; -using IMATH_NAMESPACE::modp; -using std::string; -using std::vector; -using std::ofstream; -using std::min; -using std::max; -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; -using ILMTHREAD_NAMESPACE::Semaphore; -using ILMTHREAD_NAMESPACE::Task; -using ILMTHREAD_NAMESPACE::TaskGroup; -using ILMTHREAD_NAMESPACE::ThreadPool; - - -namespace { - - -struct OutSliceInfo -{ - PixelType type; - const char * base; - size_t xStride; - size_t yStride; - int xSampling; - int ySampling; - bool zero; - - OutSliceInfo (PixelType type = HALF, - const char *base = 0, - size_t xStride = 0, - size_t yStride = 0, - int xSampling = 1, - int ySampling = 1, - bool zero = false); - -}; - - -OutSliceInfo::OutSliceInfo (PixelType t, - const char *b, - size_t xs, size_t ys, - int xsm, int ysm, - bool z) -: - type (t), - base (b), - xStride (xs), - yStride (ys), - xSampling (xsm), - ySampling (ysm), - zero (z) -{ - // empty -} - - -struct LineBuffer -{ - Array buffer; - const char * dataPtr; - int dataSize; - char * endOfLineBufferData; - int minY; - int maxY; - int scanLineMin; - int scanLineMax; - Compressor * compressor; - bool partiallyFull; // has incomplete data - bool hasException; - string exception; - - LineBuffer (Compressor *comp); - ~LineBuffer (); - - void wait () {_sem.wait();} - void post () {_sem.post();} - - private: - - Semaphore _sem; -}; - - -LineBuffer::LineBuffer (Compressor *comp) : - dataPtr (0), - dataSize (0), - compressor (comp), - partiallyFull (false), - hasException (false), - exception (), - _sem (1) -{ - // empty -} - - -LineBuffer::~LineBuffer () -{ - delete compressor; -} - -} // namespace - -struct OutputFile::Data -{ - Header header; // the image header - bool multiPart; // is the file multipart? - int version; // version attribute \todo NOT BEING WRITTEN PROPERLY - Int64 previewPosition; // file position for preview - FrameBuffer frameBuffer; // framebuffer to write into - int currentScanLine; // next scanline to be written - int missingScanLines; // number of lines to write - LineOrder lineOrder; // the file's lineorder - int minX; // data window's min x coord - int maxX; // data window's max x coord - int minY; // data window's min y coord - int maxY; // data window's max x coord - vector lineOffsets; // stores offsets in file for - // each scanline - vector bytesPerLine; // combined size of a line over - // all channels - vector offsetInLineBuffer; // offset for each scanline in - // its linebuffer - Compressor::Format format; // compressor's data format - vector slices; // info about channels in file - Int64 lineOffsetsPosition; // file position for line - // offset table - - vector lineBuffers; // each holds one line buffer - int linesInBuffer; // number of scanlines each - // buffer holds - size_t lineBufferSize; // size of the line buffer - - int partNumber; // the output part number - OutputStreamMutex * _streamData; - bool _deleteStream; - Data (int numThreads); - ~Data (); - - - inline LineBuffer * getLineBuffer (int number); // hash function from line - // buffer indices into our - // vector of line buffers -}; - - -OutputFile::Data::Data (int numThreads): - lineOffsetsPosition (0), - partNumber (-1), - _streamData(0), - _deleteStream(false) -{ - // - // We need at least one lineBuffer, but if threading is used, - // to keep n threads busy we need 2*n lineBuffers. - // - - lineBuffers.resize (max (1, 2 * numThreads)); -} - - -OutputFile::Data::~Data () -{ - for (size_t i = 0; i < lineBuffers.size(); i++) - delete lineBuffers[i]; -} - - -LineBuffer* -OutputFile::Data::getLineBuffer (int number) -{ - return lineBuffers[number % lineBuffers.size()]; -} - -namespace { - -Int64 -writeLineOffsets (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, const vector &lineOffsets) -{ - Int64 pos = os.tellp(); - - if (pos == -1) - IEX_NAMESPACE::throwErrnoExc ("Cannot determine current file position (%T)."); - - for (unsigned int i = 0; i < lineOffsets.size(); i++) - Xdr::write (os, lineOffsets[i]); - - return pos; -} - - -void -writePixelData (OutputStreamMutex *filedata, - OutputFile::Data *partdata, - int lineBufferMinY, - const char pixelData[], - int pixelDataSize) -{ - // - // Store a block of pixel data in the output file, and try - // to keep track of the current writing position the file - // without calling tellp() (tellp() can be fairly expensive). - // - - Int64 currentPosition = filedata->currentPosition; - filedata->currentPosition = 0; - - if (currentPosition == 0) - currentPosition = filedata->os->tellp(); - - partdata->lineOffsets[(partdata->currentScanLine - partdata->minY) / partdata->linesInBuffer] = - currentPosition; - - #ifdef DEBUG - - assert (filedata->os->tellp() == currentPosition); - - #endif - - - - if (partdata->multiPart) - { - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (*filedata->os, partdata->partNumber); - } - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (*filedata->os, lineBufferMinY); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (*filedata->os, pixelDataSize); - filedata->os->write (pixelData, pixelDataSize); - - filedata->currentPosition = currentPosition + - Xdr::size() + - Xdr::size() + - pixelDataSize; - - if (partdata->multiPart) - { - filedata->currentPosition += Xdr::size(); - } -} - - -inline void -writePixelData (OutputStreamMutex* filedata, - OutputFile::Data *partdata, - const LineBuffer *lineBuffer) -{ - writePixelData (filedata, partdata, - lineBuffer->minY, - lineBuffer->dataPtr, - lineBuffer->dataSize); -} - - -void -convertToXdr (OutputFile::Data *ofd, - Array &lineBuffer, - int lineBufferMinY, - int lineBufferMaxY, - int inSize) -{ - // - // Convert the contents of a lineBuffer from the machine's native - // representation to Xdr format. This function is called by - // CompressLineBuffer::execute(), below, if the compressor wanted - // its input pixel data in the machine's native format, but then - // failed to compress the data (most compressors will expand rather - // than compress random input data). - // - // Note that this routine assumes that the machine's native - // representation of the pixel data has the same size as the - // Xdr representation. This makes it possible to convert the - // pixel data in place, without an intermediate temporary buffer. - // - - // - // Iterate over all scanlines in the lineBuffer to convert. - // - - char *writePtr = &lineBuffer[0]; - for (int y = lineBufferMinY; y <= lineBufferMaxY; y++) - { - // - // Set these to point to the start of line y. - // We will write to writePtr from readPtr. - // - - const char *readPtr = writePtr; - - // - // Iterate over all slices in the file. - // - - for (unsigned int i = 0; i < ofd->slices.size(); ++i) - { - // - // Test if scan line y of this channel is - // contains any data (the scan line contains - // data only if y % ySampling == 0). - // - - const OutSliceInfo &slice = ofd->slices[i]; - - if (modp (y, slice.ySampling) != 0) - continue; - - // - // Find the number of sampled pixels, dMaxX-dMinX+1, for - // slice i in scan line y (i.e. pixels within the data window - // for which x % xSampling == 0). - // - - int dMinX = divp (ofd->minX, slice.xSampling); - int dMaxX = divp (ofd->maxX, slice.xSampling); - - // - // Convert the samples in place. - // - - convertInPlace (writePtr, readPtr, slice.type, dMaxX - dMinX + 1); - } - } -} - - -// -// A LineBufferTask encapsulates the task of copying a set of scanlines -// from the user's frame buffer into a LineBuffer object, compressing -// the data if necessary. -// - -class LineBufferTask: public Task -{ - public: - - LineBufferTask (TaskGroup *group, - OutputFile::Data *ofd, - int number, - int scanLineMin, - int scanLineMax); - - virtual ~LineBufferTask (); - - virtual void execute (); - - private: - - OutputFile::Data * _ofd; - LineBuffer * _lineBuffer; -}; - - -LineBufferTask::LineBufferTask - (TaskGroup *group, - OutputFile::Data *ofd, - int number, - int scanLineMin, - int scanLineMax) -: - Task (group), - _ofd (ofd), - _lineBuffer (_ofd->getLineBuffer(number)) -{ - // - // Wait for the lineBuffer to become available - // - - _lineBuffer->wait (); - - // - // Initialize the lineBuffer data if necessary - // - - if (!_lineBuffer->partiallyFull) - { - _lineBuffer->endOfLineBufferData = _lineBuffer->buffer; - - _lineBuffer->minY = _ofd->minY + number * _ofd->linesInBuffer; - - _lineBuffer->maxY = min (_lineBuffer->minY + _ofd->linesInBuffer - 1, - _ofd->maxY); - - _lineBuffer->partiallyFull = true; - } - - _lineBuffer->scanLineMin = max (_lineBuffer->minY, scanLineMin); - _lineBuffer->scanLineMax = min (_lineBuffer->maxY, scanLineMax); -} - - -LineBufferTask::~LineBufferTask () -{ - // - // Signal that the line buffer is now free - // - - _lineBuffer->post (); -} - - -void -LineBufferTask::execute () -{ - try - { - // - // First copy the pixel data from the - // frame buffer into the line buffer - // - - int yStart, yStop, dy; - - if (_ofd->lineOrder == INCREASING_Y) - { - yStart = _lineBuffer->scanLineMin; - yStop = _lineBuffer->scanLineMax + 1; - dy = 1; - } - else - { - yStart = _lineBuffer->scanLineMax; - yStop = _lineBuffer->scanLineMin - 1; - dy = -1; - } - - int y; - - for (y = yStart; y != yStop; y += dy) - { - // - // Gather one scan line's worth of pixel data and store - // them in _ofd->lineBuffer. - // - - char *writePtr = _lineBuffer->buffer + - _ofd->offsetInLineBuffer[y - _ofd->minY]; - // - // Iterate over all image channels. - // - - for (unsigned int i = 0; i < _ofd->slices.size(); ++i) - { - // - // Test if scan line y of this channel contains any data - // (the scan line contains data only if y % ySampling == 0). - // - - const OutSliceInfo &slice = _ofd->slices[i]; - - if (modp (y, slice.ySampling) != 0) - continue; - - // - // Find the x coordinates of the leftmost and rightmost - // sampled pixels (i.e. pixels within the data window - // for which x % xSampling == 0). - // - - int dMinX = divp (_ofd->minX, slice.xSampling); - int dMaxX = divp (_ofd->maxX, slice.xSampling); - - // - // Fill the line buffer with with pixel data. - // - - if (slice.zero) - { - // - // The frame buffer contains no data for this channel. - // Store zeroes in _lineBuffer->buffer. - // - - fillChannelWithZeroes (writePtr, _ofd->format, slice.type, - dMaxX - dMinX + 1); - } - else - { - // - // If necessary, convert the pixel data to Xdr format. - // Then store the pixel data in _ofd->lineBuffer. - // - - const char *linePtr = slice.base + - divp (y, slice.ySampling) * - slice.yStride; - - const char *readPtr = linePtr + dMinX * slice.xStride; - const char *endPtr = linePtr + dMaxX * slice.xStride; - - copyFromFrameBuffer (writePtr, readPtr, endPtr, - slice.xStride, _ofd->format, - slice.type); - } - } - - if (_lineBuffer->endOfLineBufferData < writePtr) - _lineBuffer->endOfLineBufferData = writePtr; - - #ifdef DEBUG - - assert (writePtr - (_lineBuffer->buffer + - _ofd->offsetInLineBuffer[y - _ofd->minY]) == - (int) _ofd->bytesPerLine[y - _ofd->minY]); - - #endif - - } - - // - // If the next scanline isn't past the bounds of the lineBuffer - // then we are done, otherwise compress the linebuffer - // - - if (y >= _lineBuffer->minY && y <= _lineBuffer->maxY) - return; - - _lineBuffer->dataPtr = _lineBuffer->buffer; - - _lineBuffer->dataSize = _lineBuffer->endOfLineBufferData - - _lineBuffer->buffer; - - // - // Compress the data - // - - Compressor *compressor = _lineBuffer->compressor; - - if (compressor) - { - const char *compPtr; - - int compSize = compressor->compress (_lineBuffer->dataPtr, - _lineBuffer->dataSize, - _lineBuffer->minY, compPtr); - - if (compSize < _lineBuffer->dataSize) - { - _lineBuffer->dataSize = compSize; - _lineBuffer->dataPtr = compPtr; - } - else if (_ofd->format == Compressor::NATIVE) - { - // - // The data did not shrink during compression, but - // we cannot write to the file using the machine's - // native format, so we need to convert the lineBuffer - // to Xdr. - // - - convertToXdr (_ofd, _lineBuffer->buffer, _lineBuffer->minY, - _lineBuffer->maxY, _lineBuffer->dataSize); - } - } - - _lineBuffer->partiallyFull = false; - } - catch (std::exception &e) - { - if (!_lineBuffer->hasException) - { - _lineBuffer->exception = e.what (); - _lineBuffer->hasException = true; - } - } - catch (...) - { - if (!_lineBuffer->hasException) - { - _lineBuffer->exception = "unrecognized exception"; - _lineBuffer->hasException = true; - } - } -} - -} // namespace - - -OutputFile::OutputFile - (const char fileName[], - const Header &header, - int numThreads) -: - _data (new Data (numThreads)) - -{ - _data->_streamData=new OutputStreamMutex (); - _data->_deleteStream=true; - try - { - header.sanityCheck(); - _data->_streamData->os = new StdOFStream (fileName); - _data->multiPart=false; // only one header, not multipart - initialize (header); - _data->_streamData->currentPosition = _data->_streamData->os->tellp(); - - // Write header and empty offset table to the file. - writeMagicNumberAndVersionField(*_data->_streamData->os, _data->header); - _data->previewPosition = - _data->header.writeTo (*_data->_streamData->os); - _data->lineOffsetsPosition = - writeLineOffsets (*_data->_streamData->os,_data->lineOffsets); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (_data && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - if (_data && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - throw; - } -} - - -OutputFile::OutputFile - (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - int numThreads) -: - _data (new Data (numThreads)) -{ - - _data->_streamData=new OutputStreamMutex (); - _data->_deleteStream=false; - try - { - header.sanityCheck(); - _data->_streamData->os = &os; - _data->multiPart=false; - initialize (header); - _data->_streamData->currentPosition = _data->_streamData->os->tellp(); - - // Write header and empty offset table to the file. - writeMagicNumberAndVersionField(*_data->_streamData->os, _data->header); - _data->previewPosition = - _data->header.writeTo (*_data->_streamData->os); - _data->lineOffsetsPosition = - writeLineOffsets (*_data->_streamData->os, _data->lineOffsets); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (_data && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << os.fileName() << "\". " << e); - throw; - } - catch (...) - { - if (_data && _data->_streamData) delete _data->_streamData; - if (_data) delete _data; - - throw; - } -} - -OutputFile::OutputFile(const OutputPartData* part) : _data(NULL) -{ - try - { - if (part->header.type() != SCANLINEIMAGE) - throw IEX_NAMESPACE::ArgExc("Can't build a OutputFile from a type-mismatched part."); - - _data = new Data (part->numThreads); - _data->_streamData = part->mutex; - _data->_deleteStream=false; - _data->multiPart=part->multipart; - - initialize (part->header); - _data->partNumber = part->partNumber; - _data->lineOffsetsPosition = part->chunkOffsetTablePosition; - _data->previewPosition = part->previewPosition; - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (_data) delete _data; - - REPLACE_EXC (e, "Cannot initialize output part " - "\"" << part->partNumber << "\". " << e); - throw; - } - catch (...) - { - if (_data) delete _data; - - throw; - } -} - -void -OutputFile::initialize (const Header &header) -{ - _data->header = header; - - // "fix" the type if it happens to be set incorrectly - // (attribute is optional, but ensure it is correct if it exists) - if(_data->header.hasType()) - { - _data->header.setType(SCANLINEIMAGE); - } - - const Box2i &dataWindow = header.dataWindow(); - - _data->currentScanLine = (header.lineOrder() == INCREASING_Y)? - dataWindow.min.y: dataWindow.max.y; - - _data->missingScanLines = dataWindow.max.y - dataWindow.min.y + 1; - _data->lineOrder = header.lineOrder(); - _data->minX = dataWindow.min.x; - _data->maxX = dataWindow.max.x; - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - size_t maxBytesPerLine = bytesPerLineTable (_data->header, - _data->bytesPerLine); - - for (size_t i = 0; i < _data->lineBuffers.size(); ++i) - { - _data->lineBuffers[i] = - new LineBuffer (newCompressor (_data->header.compression(), - maxBytesPerLine, - _data->header)); - } - - LineBuffer *lineBuffer = _data->lineBuffers[0]; - _data->format = defaultFormat (lineBuffer->compressor); - _data->linesInBuffer = numLinesInBuffer (lineBuffer->compressor); - _data->lineBufferSize = maxBytesPerLine * _data->linesInBuffer; - - for (size_t i = 0; i < _data->lineBuffers.size(); i++) - _data->lineBuffers[i]->buffer.resizeErase(_data->lineBufferSize); - - int lineOffsetSize = (dataWindow.max.y - dataWindow.min.y + - _data->linesInBuffer) / _data->linesInBuffer; - - _data->lineOffsets.resize (lineOffsetSize); - - - offsetInLineBufferTable (_data->bytesPerLine, - _data->linesInBuffer, - _data->offsetInLineBuffer); -} - - -OutputFile::~OutputFile () -{ - if (_data) - { - { - Lock lock(*_data->_streamData); - Int64 originalPosition = _data->_streamData->os->tellp(); - - if (_data->lineOffsetsPosition > 0) - { - try - { - _data->_streamData->os->seekp (_data->lineOffsetsPosition); - writeLineOffsets (*_data->_streamData->os, _data->lineOffsets); - - // - // Restore the original position. - // - _data->_streamData->os->seekp (originalPosition); - } - catch (...) - { - // - // We cannot safely throw any exceptions from here. - // This destructor may have been called because the - // stack is currently being unwound for another - // exception. - // - } - } - } - - if (_data->_deleteStream && _data->_streamData) - delete _data->_streamData->os; - - if (_data->partNumber == -1 && _data->_streamData) - delete _data->_streamData; - - delete _data; - } - -} - - -const char * -OutputFile::fileName () const -{ - return _data->_streamData->os->fileName(); -} - - -const Header & -OutputFile::header () const -{ - return _data->header; -} - - -void -OutputFile::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - Lock lock (*_data->_streamData); - - // - // Check if the new frame buffer descriptor - // is compatible with the image file header. - // - - const ChannelList &channels = _data->header.channels(); - - for (ChannelList::ConstIterator i = channels.begin(); - i != channels.end(); - ++i) - { - FrameBuffer::ConstIterator j = frameBuffer.find (i.name()); - - if (j == frameBuffer.end()) - continue; - - if (i.channel().type != j.slice().type) - { - THROW (IEX_NAMESPACE::ArgExc, "Pixel type of \"" << i.name() << "\" channel " - "of output file \"" << fileName() << "\" is " - "not compatible with the frame buffer's " - "pixel type."); - } - - if (i.channel().xSampling != j.slice().xSampling || - i.channel().ySampling != j.slice().ySampling) - { - THROW (IEX_NAMESPACE::ArgExc, "X and/or y subsampling factors " - "of \"" << i.name() << "\" channel " - "of output file \"" << fileName() << "\" are " - "not compatible with the frame buffer's " - "subsampling factors."); - } - } - - // - // Initialize slice table for writePixels(). - // - - vector slices; - - for (ChannelList::ConstIterator i = channels.begin(); - i != channels.end(); - ++i) - { - FrameBuffer::ConstIterator j = frameBuffer.find (i.name()); - - if (j == frameBuffer.end()) - { - // - // Channel i is not present in the frame buffer. - // In the file, channel i will contain only zeroes. - // - - slices.push_back (OutSliceInfo (i.channel().type, - 0, // base - 0, // xStride, - 0, // yStride, - i.channel().xSampling, - i.channel().ySampling, - true)); // zero - } - else - { - // - // Channel i is present in the frame buffer. - // - - slices.push_back (OutSliceInfo (j.slice().type, - j.slice().base, - j.slice().xStride, - j.slice().yStride, - j.slice().xSampling, - j.slice().ySampling, - false)); // zero - } - } - - // - // Store the new frame buffer. - // - - _data->frameBuffer = frameBuffer; - _data->slices = slices; -} - - -const FrameBuffer & -OutputFile::frameBuffer () const -{ - Lock lock (*_data->_streamData); - return _data->frameBuffer; -} - - -void -OutputFile::writePixels (int numScanLines) -{ - try - { - Lock lock (*_data->_streamData); - - if (_data->slices.size() == 0) - throw IEX_NAMESPACE::ArgExc ("No frame buffer specified " - "as pixel data source."); - - // - // Maintain two iterators: - // nextWriteBuffer: next linebuffer to be written to the file - // nextCompressBuffer: next linebuffer to compress - // - - int first = (_data->currentScanLine - _data->minY) / - _data->linesInBuffer; - - int nextWriteBuffer = first; - int nextCompressBuffer; - int stop; - int step; - int scanLineMin; - int scanLineMax; - - { - // - // Create a task group for all line buffer tasks. When the - // taskgroup goes out of scope, the destructor waits until - // all tasks are complete. - // - - TaskGroup taskGroup; - - // - // Determine the range of lineBuffers that intersect the scan - // line range. Then add the initial compression tasks to the - // thread pool. We always add in at least one task but the - // individual task might not do anything if numScanLines == 0. - // - - if (_data->lineOrder == INCREASING_Y) - { - int last = (_data->currentScanLine + (numScanLines - 1) - - _data->minY) / _data->linesInBuffer; - - scanLineMin = _data->currentScanLine; - scanLineMax = _data->currentScanLine + numScanLines - 1; - - int numTasks = max (min ((int)_data->lineBuffers.size(), - last - first + 1), - 1); - - for (int i = 0; i < numTasks; i++) - { - ThreadPool::addGlobalTask - (new LineBufferTask (&taskGroup, _data, first + i, - scanLineMin, scanLineMax)); - } - - nextCompressBuffer = first + numTasks; - stop = last + 1; - step = 1; - } - else - { - int last = (_data->currentScanLine - (numScanLines - 1) - - _data->minY) / _data->linesInBuffer; - - scanLineMax = _data->currentScanLine; - scanLineMin = _data->currentScanLine - numScanLines + 1; - - int numTasks = max (min ((int)_data->lineBuffers.size(), - first - last + 1), - 1); - - for (int i = 0; i < numTasks; i++) - { - ThreadPool::addGlobalTask - (new LineBufferTask (&taskGroup, _data, first - i, - scanLineMin, scanLineMax)); - } - - nextCompressBuffer = first - numTasks; - stop = last - 1; - step = -1; - } - - while (true) - { - if (_data->missingScanLines <= 0) - { - throw IEX_NAMESPACE::ArgExc ("Tried to write more scan lines " - "than specified by the data window."); - } - - // - // Wait until the next line buffer is ready to be written - // - - LineBuffer *writeBuffer = - _data->getLineBuffer (nextWriteBuffer); - - writeBuffer->wait(); - - int numLines = writeBuffer->scanLineMax - - writeBuffer->scanLineMin + 1; - - _data->missingScanLines -= numLines; - - // - // If the line buffer is only partially full, then it is - // not complete and we cannot write it to disk yet. - // - - if (writeBuffer->partiallyFull) - { - _data->currentScanLine = _data->currentScanLine + - step * numLines; - writeBuffer->post(); - - return; - } - - // - // Write the line buffer - // - - writePixelData (_data->_streamData, _data, writeBuffer); - nextWriteBuffer += step; - - _data->currentScanLine = _data->currentScanLine + - step * numLines; - - #ifdef DEBUG - - assert (_data->currentScanLine == - ((_data->lineOrder == INCREASING_Y) ? - writeBuffer->scanLineMax + 1: - writeBuffer->scanLineMin - 1)); - - #endif - - // - // Release the lock on the line buffer - // - - writeBuffer->post(); - - // - // If this was the last line buffer in the scanline range - // - - if (nextWriteBuffer == stop) - break; - - // - // If there are no more line buffers to compress, - // then only continue to write out remaining lineBuffers - // - - if (nextCompressBuffer == stop) - continue; - - // - // Add nextCompressBuffer as a compression task - // - - ThreadPool::addGlobalTask - (new LineBufferTask (&taskGroup, _data, nextCompressBuffer, - scanLineMin, scanLineMax)); - - // - // Update the next line buffer we need to compress - // - - nextCompressBuffer += step; - } - - // - // Finish all tasks - // - } - - // - // Exeption handling: - // - // LineBufferTask::execute() may have encountered exceptions, but - // those exceptions occurred in another thread, not in the thread - // that is executing this call to OutputFile::writePixels(). - // LineBufferTask::execute() has caught all exceptions and stored - // the exceptions' what() strings in the line buffers. - // Now we check if any line buffer contains a stored exception; if - // this is the case then we re-throw the exception in this thread. - // (It is possible that multiple line buffers contain stored - // exceptions. We re-throw the first exception we find and - // ignore all others.) - // - - const string *exception = 0; - - for (size_t i = 0; i < _data->lineBuffers.size(); ++i) - { - LineBuffer *lineBuffer = _data->lineBuffers[i]; - - if (lineBuffer->hasException && !exception) - exception = &lineBuffer->exception; - - lineBuffer->hasException = false; - } - - if (exception) - throw IEX_NAMESPACE::IoExc (*exception); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Failed to write pixel data to image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -int -OutputFile::currentScanLine () const -{ - Lock lock (*_data->_streamData); - return _data->currentScanLine; -} - - -void -OutputFile::copyPixels (InputFile &in) -{ - Lock lock (*_data->_streamData); - - // - // Check if this file's and and the InputFile's - // headers are compatible. - // - - const Header &hdr = _data->header; - const Header &inHdr = in.header(); - - if (inHdr.find("tiles") != inHdr.end()) - THROW (IEX_NAMESPACE::ArgExc, "Cannot copy pixels from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\". " - "The input file is tiled, but the output file is " - "not. Try using TiledOutputFile::copyPixels " - "instead."); - - if (!(hdr.dataWindow() == inHdr.dataWindow())) - THROW (IEX_NAMESPACE::ArgExc, "Cannot copy pixels from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\". " - "The files have different data windows."); - - if (!(hdr.lineOrder() == inHdr.lineOrder())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files have different line orders."); - - if (!(hdr.compression() == inHdr.compression())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files use different compression methods."); - - if (!(hdr.channels() == inHdr.channels())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files have different channel lists."); - - // - // Verify that no pixel data have been written to this file yet. - // - - const Box2i &dataWindow = hdr.dataWindow(); - - if (_data->missingScanLines != dataWindow.max.y - dataWindow.min.y + 1) - THROW (IEX_NAMESPACE::LogicExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "\"" << fileName() << "\" already contains " - "pixel data."); - - // - // Copy the pixel data. - // - - while (_data->missingScanLines > 0) - { - const char *pixelData; - int pixelDataSize; - - in.rawPixelData (_data->currentScanLine, pixelData, pixelDataSize); - - writePixelData (_data->_streamData, _data, lineBufferMinY (_data->currentScanLine, - _data->minY, - _data->linesInBuffer), - pixelData, pixelDataSize); - - _data->currentScanLine += (_data->lineOrder == INCREASING_Y)? - _data->linesInBuffer: -_data->linesInBuffer; - - _data->missingScanLines -= _data->linesInBuffer; - } -} - - -void -OutputFile::copyPixels( InputPart & in) -{ - copyPixels(*in.file); -} - - - -void -OutputFile::updatePreviewImage (const PreviewRgba newPixels[]) -{ - Lock lock (*_data->_streamData); - - if (_data->previewPosition <= 0) - THROW (IEX_NAMESPACE::LogicExc, "Cannot update preview image pixels. " - "File \"" << fileName() << "\" does not " - "contain a preview image."); - - // - // Store the new pixels in the header's preview image attribute. - // - - PreviewImageAttribute &pia = - _data->header.typedAttribute ("preview"); - - PreviewImage &pi = pia.value(); - PreviewRgba *pixels = pi.pixels(); - int numPixels = pi.width() * pi.height(); - - for (int i = 0; i < numPixels; ++i) - pixels[i] = newPixels[i]; - - // - // Save the current file position, jump to the position in - // the file where the preview image starts, store the new - // preview image, and jump back to the saved file position. - // - - Int64 savedPosition = _data->_streamData->os->tellp(); - - try - { - _data->_streamData->os->seekp (_data->previewPosition); - pia.writeValueTo (*_data->_streamData->os, _data->version); - _data->_streamData->os->seekp (savedPosition); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Cannot update preview image pixels for " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -void -OutputFile::breakScanLine (int y, int offset, int length, char c) -{ - Lock lock (*_data->_streamData); - - Int64 position = - _data->lineOffsets[(y - _data->minY) / _data->linesInBuffer]; - - if (!position) - THROW (IEX_NAMESPACE::ArgExc, "Cannot overwrite scan line " << y << ". " - "The scan line has not yet been stored in " - "file \"" << fileName() << "\"."); - - _data->_streamData->currentPosition = 0; - _data->_streamData->os->seekp (position + offset); - - for (int i = 0; i < length; ++i) - _data->_streamData->os->write (&c, 1); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputFile.h deleted file mode 100644 index 00f9f80..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputFile.h +++ /dev/null @@ -1,263 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_OUTPUT_FILE_H -#define INCLUDED_IMF_OUTPUT_FILE_H - -//----------------------------------------------------------------------------- -// -// class OutputFile -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfFrameBuffer.h" -#include "ImfThreading.h" -#include "ImfGenericOutputFile.h" -#include "ImfNamespace.h" -#include "ImfForward.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT OutputFile : public GenericOutputFile -{ - public: - - //----------------------------------------------------------- - // Constructor -- opens the file and writes the file header. - // The file header is also copied into the OutputFile object, - // and can later be accessed via the header() method. - // Destroying this OutputFile object automatically closes - // the file. - // - // numThreads determines the number of threads that will be - // used to write the file (see ImfThreading.h). - //----------------------------------------------------------- - - OutputFile (const char fileName[], const Header &header, - int numThreads = globalThreadCount()); - - - //------------------------------------------------------------ - // Constructor -- attaches the new OutputFile object to a file - // that has already been opened, and writes the file header. - // The file header is also copied into the OutputFile object, - // and can later be accessed via the header() method. - // Destroying this OutputFile object does not automatically - // close the file. - // - // numThreads determines the number of threads that will be - // used to write the file (see ImfThreading.h). - //------------------------------------------------------------ - - OutputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, const Header &header, - int numThreads = globalThreadCount()); - - - //------------------------------------------------- - // Destructor - // - // Destroying the OutputFile object before writing - // all scan lines within the data window results in - // an incomplete file. - //------------------------------------------------- - - virtual ~OutputFile (); - - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the OutputFile object. - // - // The current frame buffer is the source of the pixel - // data written to the file. The current frame buffer - // must be set at least once before writePixels() is - // called. The current frame buffer can be changed - // after each call to writePixels. - //------------------------------------------------------- - - void setFrameBuffer (const FrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const FrameBuffer & frameBuffer () const; - - - //------------------------------------------------------------------- - // Write pixel data: - // - // writePixels(n) retrieves the next n scan lines worth of data from - // the current frame buffer, starting with the scan line indicated by - // currentScanLine(), and stores the data in the output file, and - // progressing in the direction indicated by header.lineOrder(). - // - // To produce a complete and correct file, exactly m scan lines must - // be written, where m is equal to - // header().dataWindow().max.y - header().dataWindow().min.y + 1. - //------------------------------------------------------------------- - - void writePixels (int numScanLines = 1); - - - //------------------------------------------------------------------ - // Access to the current scan line: - // - // currentScanLine() returns the y coordinate of the first scan line - // that will be read from the current frame buffer during the next - // call to writePixels(). - // - // If header.lineOrder() == INCREASING_Y: - // - // The current scan line before the first call to writePixels() - // is header().dataWindow().min.y. After writing each scan line, - // the current scan line is incremented by 1. - // - // If header.lineOrder() == DECREASING_Y: - // - // The current scan line before the first call to writePixels() - // is header().dataWindow().max.y. After writing each scan line, - // the current scan line is decremented by 1. - // - //------------------------------------------------------------------ - - int currentScanLine () const; - - - //-------------------------------------------------------------- - // Shortcut to copy all pixels from an InputFile into this file, - // without uncompressing and then recompressing the pixel data. - // This file's header must be compatible with the InputFile's - // header: The two header's "dataWindow", "compression", - // "lineOrder" and "channels" attributes must be the same. - //-------------------------------------------------------------- - - void copyPixels (InputFile &in); - - //------------------------------------------------------------- - // Shortcut to copy all pixels from an InputPart into this file - // - equivalent to copyPixel(InputFile &in) but for multipart files - //--------------------------------------------------------------- - - void copyPixels (InputPart &in); - - - - //-------------------------------------------------------------- - // Updating the preview image: - // - // updatePreviewImage() supplies a new set of pixels for the - // preview image attribute in the file's header. If the header - // does not contain a preview image, updatePreviewImage() throws - // an IEX_NAMESPACE::LogicExc. - // - // Note: updatePreviewImage() is necessary because images are - // often stored in a file incrementally, a few scan lines at a - // time, while the image is being generated. Since the preview - // image is an attribute in the file's header, it gets stored in - // the file as soon as the file is opened, but we may not know - // what the preview image should look like until we have written - // the last scan line of the main image. - // - //-------------------------------------------------------------- - - void updatePreviewImage (const PreviewRgba newPixels[]); - - - //--------------------------------------------------------- - // Break a scan line -- for testing and debugging only: - // - // breakScanLine(y,p,n,c) introduces an error into the - // output file by writing n copies of character c, starting - // p bytes from the beginning of the pixel data block that - // contains scan line y. - // - // Warning: Calling this function usually results in a - // broken image file. The file or parts of it may not - // be readable, or the file may contain bad data. - // - //--------------------------------------------------------- - - void breakScanLine (int y, int offset, int length, char c); - - - struct Data; - - private: - - //------------------------------------------------------------ - // Constructor -- attaches the OutputStreamMutex to the - // given one from MultiPartOutputFile. Set the previewPosition - // and lineOffsetsPosition which have been acquired from - // the constructor of MultiPartOutputFile as well. - //------------------------------------------------------------ - OutputFile (const OutputPartData* part); - - OutputFile (const OutputFile &); // not implemented - OutputFile & operator = (const OutputFile &); // not implemented - - void initialize (const Header &header); - - Data * _data; - - - friend class MultiPartOutputFile; - -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPart.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPart.cpp deleted file mode 100644 index 920b4d3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPart.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfOutputPart.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -OutputPart::OutputPart(MultiPartOutputFile& multiPartFile, int partNumber) -{ - file = multiPartFile.getOutputPart(partNumber); -} - -const char * -OutputPart::fileName () const -{ - return file->fileName(); -} - -const Header & -OutputPart::header () const -{ - return file->header(); -} - -void -OutputPart::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - file->setFrameBuffer(frameBuffer); -} - -const FrameBuffer & -OutputPart::frameBuffer () const -{ - return file->frameBuffer(); -} - -void -OutputPart::writePixels (int numScanLines) -{ - file->writePixels(numScanLines); -} - -int -OutputPart::currentScanLine () const -{ - return file->currentScanLine(); -} - -void -OutputPart::copyPixels (InputFile &in) -{ - file->copyPixels(in); -} - -void -OutputPart::copyPixels (InputPart &in) -{ - file->copyPixels(in); -} - -void -OutputPart::updatePreviewImage (const PreviewRgba newPixels[]) -{ - file->updatePreviewImage(newPixels); -} - -void -OutputPart::breakScanLine (int y, int offset, int length, char c) -{ - file->breakScanLine(y, offset, length, c); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPart.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPart.h deleted file mode 100644 index 41f3cf3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPart.h +++ /dev/null @@ -1,77 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFOUTPUTPART_H_ -#define IMFOUTPUTPART_H_ - -#include "ImfMultiPartOutputFile.h" -#include "ImfOutputFile.h" -#include "ImfForward.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -//--------------------------------------------------------------------- -// class OutputPart: -// -// Same interface as OutputFile. Please refer to OutputFile. -//--------------------------------------------------------------------- - -class IMF_EXPORT OutputPart -{ - public: - OutputPart(MultiPartOutputFile& multiPartFile, int partNumber); - - const char * fileName () const; - const Header & header () const; - void setFrameBuffer (const FrameBuffer &frameBuffer); - const FrameBuffer & frameBuffer () const; - void writePixels (int numScanLines = 1); - int currentScanLine () const; - void copyPixels (InputFile &in); - void copyPixels (InputPart &in); - - void updatePreviewImage (const PreviewRgba newPixels[]); - void breakScanLine (int y, int offset, int length, char c); - - private: - OutputFile* file; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif /* IMFOUTPUTPART_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPartData.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPartData.cpp deleted file mode 100644 index b517a47..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPartData.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfOutputPartData.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -OutputPartData::OutputPartData(OutputStreamMutex* mutex, const Header &header, - int partNumber, int numThreads, bool multipart): - header(header), - numThreads(numThreads), - partNumber(partNumber), - multipart(multipart), - mutex(mutex) -{ -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPartData.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPartData.h deleted file mode 100644 index ac8159a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPartData.h +++ /dev/null @@ -1,62 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFOUTPUTPARTDATA_H_ -#define IMFOUTPUTPARTDATA_H_ - -#include "ImfHeader.h" -#include "ImfForward.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -struct IMF_EXPORT OutputPartData -{ - Header header; - Int64 chunkOffsetTablePosition; - Int64 previewPosition; - int numThreads; - int partNumber; - bool multipart; - OutputStreamMutex* mutex; - - OutputPartData(OutputStreamMutex* mutex, const Header &header, - int partNumber, int numThreads, bool multipart); - -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif /* IMFOUTPUTPARTDATA_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputStreamMutex.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputStreamMutex.h deleted file mode 100644 index bf5e1c3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfOutputStreamMutex.h +++ /dev/null @@ -1,70 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFOUTPUTSTREAMMUTEX_H_ -#define IMFOUTPUTSTREAMMUTEX_H_ - -#include - -#include "ImfIO.h" -#include "IlmThreadMutex.h" -#include "ImfGenericOutputFile.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -using ILMTHREAD_NAMESPACE::Mutex; - -// -// Used to wrap OPENEXR_IMF_INTERNAL_NAMESPACE::OStream as a Mutex. -// -struct OutputStreamMutex : public Mutex -{ - OPENEXR_IMF_INTERNAL_NAMESPACE::OStream* os; - Int64 currentPosition; - - OutputStreamMutex() - { - os = 0; - currentPosition = 0; - } -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif /* IMFOUTPUTSTREAMMUTEX_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPartHelper.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPartHelper.h deleted file mode 100644 index d55cc7b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPartHelper.h +++ /dev/null @@ -1,262 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Weta Digital Ltd -// -// 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 Weta Digital nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_PARTHELPER_H -#define INCLUDED_IMF_PARTHELPER_H - -//----------------------------------------------------------------------------- -// -// Functions to help split channels into separate parts: provide a list of -// channels, with desired views. call SplitChannels to assign a part to each -// layer, or correct the name of the channel. -// Also can enumerate the parts in a file and list which parts channels are in -// -// This is a good way to offer a 'create Multipart file' checkbox to the user in a -// write dialog box: Populate a list of MultiViewChannelName objects, -// call SplitChannels with whether single or multipart files are required. -// Then write the number of parts it specifies, using internal_name for the channel -// names in the ChannelList and FrameBuffer objects. There should be no need -// for different codepaths for single part and multipart files -// -// Similarly, on reading a file as a MultiPartInputFile, use GetChannelsInMultiPartFile to -// enumerate all channels in the file, using internal_name in FrameBuffer objects -// to read the channel -// -// -//----------------------------------------------------------------------------- - -#include "ImfForward.h" -#include "ImfNamespace.h" -#include "ImfExport.h" -#include "ImfMultiPartInputFile.h" -#include "ImfChannelList.h" -#include "ImfStringVectorAttribute.h" -#include "ImfStandardAttributes.h" -#include "ImfMultiView.h" - -#include -#include -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -struct MultiViewChannelName{ - -public: - std::string name; ///< name of channel - std::string view; ///< view for channel - - int part_number; ///< part number: updated by SplitChannels - std::string internal_name;///< name used in headers: in singlepart mode, may contain viewname - - virtual ~MultiViewChannelName() {} - - //return layer for this channel, or "" if no layer - std::string getLayer() const - { - std::size_t q=name.rfind('.'); - if( q==name.npos ) - { - return ""; - } - return name.substr(0,q); - - } - - std::string getSuffix() const - { - std::size_t q=name.rfind('.'); - if( q==name.npos ) - { - return name; - } - return name.substr(q+1); - - } - -}; - - - -// -///\brief assigns individual channels to different parts based on their layer and view name -/// input is an array, list, vector etc of MultiViewChannelName objects -/// on entry, each MultiViewChannelName name/view must be set (view can be empty if not multiview) -/// -/// if singlepart set, then on exit part_number will be zero, and internal_name will have view name inserted -/// otherwise, each channel will be assigned to a different part based on its layer name and view name -/// -/// @param begin pointer to first MultiViewChannelName item -/// @param end pointer to end of MultiViewChannelName item array -/// @return total number of parts required -// - -template int -SplitChannels(const T & begin,const T & end,bool multipart=true,const std::string & heroView="") -{ - if(!multipart) - { - for(T i=begin;i!=end;i++) - { - i->part_number=0; - - //does this have a view name set? - if(i->view=="") - { - i->internal_name=i->name; - }else{ - - std::string lname = i->getLayer(); - - // no layer, only non-hero views get view name in layer name - - - if(lname=="") - { - if(i->view==heroView) - { - i->internal_name = i->name; - }else{ - i->internal_name = i->view+"."+i->name; - } - }else{ - i->internal_name = lname+"."+i->view+"."+i->getSuffix(); - } - } - } - // single part created - return 1; - }else{ - // step 1: extract individual layers and parts - // for each layer, enumerate which views are active - - std::map< std::string , std::set< std::string > > viewsInLayers; - for(T i=begin;i!=end;i++) - { - viewsInLayers[i->getLayer()].insert(i->view); - } - - // step 2: assign a part number to each layer/view - - std::map< std::pair , int > layerToPart; - - int partCount=0; - - for(std::map< std::string , std::set< std::string > >::const_iterator layer=viewsInLayers.begin(); - layer!=viewsInLayers.end();layer++) - { - // if this layer has a heroView, insert that first - bool layer_has_hero = layer->second.find(heroView)!=layer->second.end(); - if( layer_has_hero ) - { - layerToPart[ std::make_pair(layer->first,heroView) ] = partCount++; - } - - - // insert other layers which aren't the hero view - for(std::set< std::string >::const_iterator view=layer->second.begin(); - view!=layer->second.end();view++) - { - if(*view!=heroView) - { - layerToPart[ std::make_pair(layer->first,*view) ] = partCount++; - } - } - - } - - // step 3: update part number of each provided channel - - for( T i=begin;i!=end;i++) - { - i->internal_name=i->name; - i->part_number = layerToPart[ std::make_pair(i->getLayer(),i->view) ]; - } - - - // return number of parts created - return partCount; - } -} - -// -// populate the chans vector with a list of channels in the file -// and their corresponding part number -// -template void -GetChannelsInMultiPartFile(const MultiPartInputFile & file,T & chans) -{ - bool has_multiview=false; - StringVector mview; - if(file.parts()==1) - { - if(hasMultiView(file.header(0))) - { - mview=multiView(file.header(0)); - has_multiview=true; - } - } - - for(int p=0;p -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using std::string; - -bool isImage(const string& name) -{ - return (name == SCANLINEIMAGE || name == TILEDIMAGE); -} - -bool isTiled(const string& name) -{ - return (name == TILEDIMAGE || name == DEEPTILE); -} - -bool isDeepData(const string& name) -{ - return (name == DEEPTILE || name == DEEPSCANLINE); -} - -bool isSupportedType(const string& name) -{ - return (name == SCANLINEIMAGE || name == TILEDIMAGE || - name == DEEPSCANLINE || name == DEEPTILE); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPartType.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPartType.h deleted file mode 100644 index 423bce0..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPartType.h +++ /dev/null @@ -1,62 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFPARTTYPE_H_ -#define IMFPARTTYPE_H_ - -#include -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -const std::string SCANLINEIMAGE = "scanlineimage"; -const std::string TILEDIMAGE = "tiledimage"; -const std::string DEEPSCANLINE = "deepscanline"; -const std::string DEEPTILE = "deeptile"; - -IMF_EXPORT bool isImage(const std::string& name); - -IMF_EXPORT bool isTiled(const std::string& name); - -IMF_EXPORT bool isDeepData(const std::string& name); - -IMF_EXPORT bool isSupportedType(const std::string& name); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif /* IMFPARTTYPE_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPixelType.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPixelType.h deleted file mode 100644 index 4b8005e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPixelType.h +++ /dev/null @@ -1,67 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_PIXEL_TYPE_H -#define INCLUDED_IMF_PIXEL_TYPE_H - -//----------------------------------------------------------------------------- -// -// enum PixelType -// -//----------------------------------------------------------------------------- - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -enum PixelType -{ - UINT = 0, // unsigned int (32 bit) - HALF = 1, // half (16 bit floating point) - FLOAT = 2, // float (32 bit floating point) - - NUM_PIXELTYPES // number of different pixel types -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPizCompressor.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPizCompressor.cpp deleted file mode 100644 index 8b3ee38..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPizCompressor.cpp +++ /dev/null @@ -1,673 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class PizCompressor -// -//----------------------------------------------------------------------------- - -#include "ImfPizCompressor.h" -#include "ImfHeader.h" -#include "ImfChannelList.h" -#include "ImfHuf.h" -#include "ImfWav.h" -#include "ImfMisc.h" -#include "ImfCheckedArithmetic.h" -#include -#include -#include -#include "ImfIO.h" -#include "ImfXdr.h" -#include "ImfAutoArray.h" -#include -#include -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::divp; -using IMATH_NAMESPACE::modp; -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::V2i; -using IEX_NAMESPACE::InputExc; - -namespace { - -// -// Functions to compress the range of values in the pixel data -// - -const int USHORT_RANGE = (1 << 16); -const int BITMAP_SIZE = (USHORT_RANGE >> 3); - -void -bitmapFromData (const unsigned short data[/*nData*/], - int nData, - unsigned char bitmap[BITMAP_SIZE], - unsigned short &minNonZero, - unsigned short &maxNonZero) -{ - for (int i = 0; i < BITMAP_SIZE; ++i) - bitmap[i] = 0; - - for (int i = 0; i < nData; ++i) - bitmap[data[i] >> 3] |= (1 << (data[i] & 7)); - - bitmap[0] &= ~1; // zero is not explicitly stored in - // the bitmap; we assume that the - // data always contain zeroes - minNonZero = BITMAP_SIZE - 1; - maxNonZero = 0; - - for (int i = 0; i < BITMAP_SIZE; ++i) - { - if (bitmap[i]) - { - if (minNonZero > i) - minNonZero = i; - if (maxNonZero < i) - maxNonZero = i; - } - } -} - - -unsigned short -forwardLutFromBitmap (const unsigned char bitmap[BITMAP_SIZE], - unsigned short lut[USHORT_RANGE]) -{ - int k = 0; - - for (int i = 0; i < USHORT_RANGE; ++i) - { - if ((i == 0) || (bitmap[i >> 3] & (1 << (i & 7)))) - lut[i] = k++; - else - lut[i] = 0; - } - - return k - 1; // maximum value stored in lut[], -} // i.e. number of ones in bitmap minus 1 - - -unsigned short -reverseLutFromBitmap (const unsigned char bitmap[BITMAP_SIZE], - unsigned short lut[USHORT_RANGE]) -{ - int k = 0; - - for (int i = 0; i < USHORT_RANGE; ++i) - { - if ((i == 0) || (bitmap[i >> 3] & (1 << (i & 7)))) - lut[k++] = i; - } - - int n = k - 1; - - while (k < USHORT_RANGE) - lut[k++] = 0; - - return n; // maximum k where lut[k] is non-zero, -} // i.e. number of ones in bitmap minus 1 - - -void -applyLut (const unsigned short lut[USHORT_RANGE], - unsigned short data[/*nData*/], - int nData) -{ - for (int i = 0; i < nData; ++i) - data[i] = lut[data[i]]; -} - - -} // namespace - - -struct PizCompressor::ChannelData -{ - unsigned short * start; - unsigned short * end; - int nx; - int ny; - int ys; - int size; -}; - - -PizCompressor::PizCompressor - (const Header &hdr, - size_t maxScanLineSize, - size_t numScanLines) -: - Compressor (hdr), - _maxScanLineSize (maxScanLineSize), - _format (XDR), - _numScanLines (numScanLines), - _tmpBuffer (0), - _outBuffer (0), - _numChans (0), - _channels (hdr.channels()), - _channelData (0) -{ - size_t tmpBufferSize = - uiMult (maxScanLineSize, numScanLines) / 2; - - size_t outBufferSize = - uiAdd (uiMult (maxScanLineSize, numScanLines), - size_t (65536 + 8192)); - - _tmpBuffer = new unsigned short - [checkArraySize (tmpBufferSize, sizeof (unsigned short))]; - - _outBuffer = new char [outBufferSize]; - - const ChannelList &channels = header().channels(); - bool onlyHalfChannels = true; - - for (ChannelList::ConstIterator c = channels.begin(); - c != channels.end(); - ++c) - { - _numChans++; - - assert (pixelTypeSize (c.channel().type) % pixelTypeSize (HALF) == 0); - - if (c.channel().type != HALF) - onlyHalfChannels = false; - } - - _channelData = new ChannelData[_numChans]; - - const Box2i &dataWindow = hdr.dataWindow(); - - _minX = dataWindow.min.x; - _maxX = dataWindow.max.x; - _maxY = dataWindow.max.y; - - // - // We can support uncompressed data in the machine's native format - // if all image channels are of type HALF, and if the Xdr and the - // native represenations of a half have the same size. - // - - if (onlyHalfChannels && (sizeof (half) == pixelTypeSize (HALF))) - _format = NATIVE; -} - - -PizCompressor::~PizCompressor () -{ - delete [] _tmpBuffer; - delete [] _outBuffer; - delete [] _channelData; -} - - -int -PizCompressor::numScanLines () const -{ - return _numScanLines; -} - - -Compressor::Format -PizCompressor::format () const -{ - return _format; -} - - -int -PizCompressor::compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) -{ - return compress (inPtr, - inSize, - Box2i (V2i (_minX, minY), - V2i (_maxX, minY + numScanLines() - 1)), - outPtr); -} - - -int -PizCompressor::compressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr) -{ - return compress (inPtr, inSize, range, outPtr); -} - - -int -PizCompressor::uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) -{ - return uncompress (inPtr, - inSize, - Box2i (V2i (_minX, minY), - V2i (_maxX, minY + numScanLines() - 1)), - outPtr); -} - - -int -PizCompressor::uncompressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr) -{ - return uncompress (inPtr, inSize, range, outPtr); -} - - -int -PizCompressor::compress (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr) -{ - // - // This is the compress function which is used by both the tiled and - // scanline compression routines. - // - - // - // Special case �- empty input buffer - // - - if (inSize == 0) - { - outPtr = _outBuffer; - return 0; - } - - // - // Rearrange the pixel data so that the wavelet - // and Huffman encoders can process them easily. - // - // The wavelet and Huffman encoders both handle only - // 16-bit data, so 32-bit data must be split into smaller - // pieces. We treat each 32-bit channel (UINT, FLOAT) as - // two interleaved 16-bit channels. - // - - int minX = range.min.x; - int maxX = range.max.x; - int minY = range.min.y; - int maxY = range.max.y; - - if (maxY > _maxY) - maxY = _maxY; - - if (maxX > _maxX) - maxX = _maxX; - - unsigned short *tmpBufferEnd = _tmpBuffer; - int i = 0; - - for (ChannelList::ConstIterator c = _channels.begin(); - c != _channels.end(); - ++c, ++i) - { - ChannelData &cd = _channelData[i]; - - cd.start = tmpBufferEnd; - cd.end = cd.start; - - cd.nx = numSamples (c.channel().xSampling, minX, maxX); - cd.ny = numSamples (c.channel().ySampling, minY, maxY); - cd.ys = c.channel().ySampling; - - cd.size = pixelTypeSize (c.channel().type) / pixelTypeSize (HALF); - - tmpBufferEnd += cd.nx * cd.ny * cd.size; - } - - if (_format == XDR) - { - // - // Machine-independent (Xdr) data format - // - - for (int y = minY; y <= maxY; ++y) - { - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - if (modp (y, cd.ys) != 0) - continue; - - for (int x = cd.nx * cd.size; x > 0; --x) - { - Xdr::read (inPtr, *cd.end); - ++cd.end; - } - } - } - } - else - { - // - // Native, machine-dependent data format - // - - for (int y = minY; y <= maxY; ++y) - { - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - if (modp (y, cd.ys) != 0) - continue; - - int n = cd.nx * cd.size; - memcpy (cd.end, inPtr, n * sizeof (unsigned short)); - inPtr += n * sizeof (unsigned short); - cd.end += n; - } - } - } - - #if defined (DEBUG) - - for (int i = 1; i < _numChans; ++i) - assert (_channelData[i-1].end == _channelData[i].start); - - assert (_channelData[_numChans-1].end == tmpBufferEnd); - - #endif - - // - // Compress the range of the pixel data - // - - AutoArray bitmap; - unsigned short minNonZero; - unsigned short maxNonZero; - - bitmapFromData (_tmpBuffer, - tmpBufferEnd - _tmpBuffer, - bitmap, - minNonZero, maxNonZero); - - AutoArray lut; - unsigned short maxValue = forwardLutFromBitmap (bitmap, lut); - applyLut (lut, _tmpBuffer, tmpBufferEnd - _tmpBuffer); - - // - // Store range compression info in _outBuffer - // - - char *buf = _outBuffer; - - Xdr::write (buf, minNonZero); - Xdr::write (buf, maxNonZero); - - if (minNonZero <= maxNonZero) - { - Xdr::write (buf, (char *) &bitmap[0] + minNonZero, - maxNonZero - minNonZero + 1); - } - - // - // Apply wavelet encoding - // - - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - for (int j = 0; j < cd.size; ++j) - { - wav2Encode (cd.start + j, - cd.nx, cd.size, - cd.ny, cd.nx * cd.size, - maxValue); - } - } - - // - // Apply Huffman encoding; append the result to _outBuffer - // - - char *lengthPtr = buf; - Xdr::write (buf, int(0)); - - int length = hufCompress (_tmpBuffer, tmpBufferEnd - _tmpBuffer, buf); - Xdr::write (lengthPtr, length); - - outPtr = _outBuffer; - return buf - _outBuffer + length; -} - - -int -PizCompressor::uncompress (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr) -{ - // - // This is the cunompress function which is used by both the tiled and - // scanline decompression routines. - // - - // - // Special case - empty input buffer - // - - if (inSize == 0) - { - outPtr = _outBuffer; - return 0; - } - - // - // Determine the layout of the compressed pixel data - // - - int minX = range.min.x; - int maxX = range.max.x; - int minY = range.min.y; - int maxY = range.max.y; - - if (maxY > _maxY) - maxY = _maxY; - - if (maxX > _maxX) - maxX = _maxX; - - unsigned short *tmpBufferEnd = _tmpBuffer; - int i = 0; - - for (ChannelList::ConstIterator c = _channels.begin(); - c != _channels.end(); - ++c, ++i) - { - ChannelData &cd = _channelData[i]; - - cd.start = tmpBufferEnd; - cd.end = cd.start; - - cd.nx = numSamples (c.channel().xSampling, minX, maxX); - cd.ny = numSamples (c.channel().ySampling, minY, maxY); - cd.ys = c.channel().ySampling; - - cd.size = pixelTypeSize (c.channel().type) / pixelTypeSize (HALF); - - tmpBufferEnd += cd.nx * cd.ny * cd.size; - } - - // - // Read range compression data - // - - unsigned short minNonZero; - unsigned short maxNonZero; - - AutoArray bitmap; - memset (bitmap, 0, sizeof (unsigned char) * BITMAP_SIZE); - - Xdr::read (inPtr, minNonZero); - Xdr::read (inPtr, maxNonZero); - - if (maxNonZero >= BITMAP_SIZE) - { - throw InputExc ("Error in header for PIZ-compressed data " - "(invalid bitmap size)."); - } - - if (minNonZero <= maxNonZero) - { - Xdr::read (inPtr, (char *) &bitmap[0] + minNonZero, - maxNonZero - minNonZero + 1); - } - - AutoArray lut; - unsigned short maxValue = reverseLutFromBitmap (bitmap, lut); - - // - // Huffman decoding - // - - int length; - Xdr::read (inPtr, length); - - if (length > inSize) - { - throw InputExc ("Error in header for PIZ-compressed data " - "(invalid array length)."); - } - - hufUncompress (inPtr, length, _tmpBuffer, tmpBufferEnd - _tmpBuffer); - - // - // Wavelet decoding - // - - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - for (int j = 0; j < cd.size; ++j) - { - wav2Decode (cd.start + j, - cd.nx, cd.size, - cd.ny, cd.nx * cd.size, - maxValue); - } - } - - // - // Expand the pixel data to their original range - // - - applyLut (lut, _tmpBuffer, tmpBufferEnd - _tmpBuffer); - - // - // Rearrange the pixel data into the format expected by the caller. - // - - char *outEnd = _outBuffer; - - if (_format == XDR) - { - // - // Machine-independent (Xdr) data format - // - - for (int y = minY; y <= maxY; ++y) - { - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - if (modp (y, cd.ys) != 0) - continue; - - for (int x = cd.nx * cd.size; x > 0; --x) - { - Xdr::write (outEnd, *cd.end); - ++cd.end; - } - } - } - } - else - { - // - // Native, machine-dependent data format - // - - for (int y = minY; y <= maxY; ++y) - { - for (int i = 0; i < _numChans; ++i) - { - ChannelData &cd = _channelData[i]; - - if (modp (y, cd.ys) != 0) - continue; - - int n = cd.nx * cd.size; - memcpy (outEnd, cd.end, n * sizeof (unsigned short)); - outEnd += n * sizeof (unsigned short); - cd.end += n; - } - } - } - - #if defined (DEBUG) - - for (int i = 1; i < _numChans; ++i) - assert (_channelData[i-1].end == _channelData[i].start); - - assert (_channelData[_numChans-1].end == tmpBufferEnd); - - #endif - - outPtr = _outBuffer; - return outEnd - _outBuffer; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPizCompressor.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPizCompressor.h deleted file mode 100644 index fb3086b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPizCompressor.h +++ /dev/null @@ -1,117 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_PIZ_COMPRESSOR_H -#define INCLUDED_IMF_PIZ_COMPRESSOR_H - -//----------------------------------------------------------------------------- -// -// class PizCompressor -- uses Wavelet and Huffman encoding. -// -//----------------------------------------------------------------------------- - -#include "ImfCompressor.h" -#include "ImfNamespace.h" -#include "ImfExport.h" -#include "ImfForward.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT PizCompressor: public Compressor -{ - public: - - PizCompressor (const Header &hdr, - size_t maxScanLineSize, - size_t numScanLines); - - virtual ~PizCompressor (); - - virtual int numScanLines () const; - - virtual Format format () const; - - virtual int compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - - virtual int compressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - - virtual int uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - - virtual int uncompressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - private: - - struct ChannelData; - - int compress (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - - int uncompress (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - - int _maxScanLineSize; - Format _format; - int _numScanLines; - unsigned short * _tmpBuffer; - char * _outBuffer; - int _numChans; - const ChannelList & _channels; - ChannelData * _channelData; - int _minX; - int _maxX; - int _maxY; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImage.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImage.cpp deleted file mode 100644 index 8027d0f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImage.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2003, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class PreviewImage -// -//----------------------------------------------------------------------------- - -#include "ImfPreviewImage.h" -#include "ImfCheckedArithmetic.h" -#include "Iex.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -PreviewImage::PreviewImage (unsigned int width, - unsigned int height, - const PreviewRgba pixels[]) -{ - _width = width; - _height = height; - _pixels = new PreviewRgba - [checkArraySize (uiMult (_width, _height), sizeof (PreviewRgba))]; - - if (pixels) - { - for (unsigned int i = 0; i < _width * _height; ++i) - _pixels[i] = pixels[i]; - } - else - { - for (unsigned int i = 0; i < _width * _height; ++i) - _pixels[i] = PreviewRgba(); - } -} - - -PreviewImage::PreviewImage (const PreviewImage &other): - _width (other._width), - _height (other._height), - _pixels (new PreviewRgba [other._width * other._height]) -{ - for (unsigned int i = 0; i < _width * _height; ++i) - _pixels[i] = other._pixels[i]; -} - - -PreviewImage::~PreviewImage () -{ - delete [] _pixels; -} - - -PreviewImage & -PreviewImage::operator = (const PreviewImage &other) -{ - delete [] _pixels; - - _width = other._width; - _height = other._height; - _pixels = new PreviewRgba [other._width * other._height]; - - for (unsigned int i = 0; i < _width * _height; ++i) - _pixels[i] = other._pixels[i]; - - return *this; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImage.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImage.h deleted file mode 100644 index dcd2ebe..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImage.h +++ /dev/null @@ -1,135 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2003, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_PREVIEW_IMAGE_H -#define INCLUDED_IMF_PREVIEW_IMAGE_H - -#include "ImfNamespace.h" -#include "ImfExport.h" - -//----------------------------------------------------------------------------- -// -// class PreviewImage -- a usually small, low-dynamic range image, -// that is intended to be stored in an image file's header. -// -// struct PreviewRgba -- holds the value of a PreviewImage pixel. -// -//----------------------------------------------------------------------------- - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -struct IMF_EXPORT PreviewRgba -{ - unsigned char r; // Red, green and blue components of - unsigned char g; // the pixel's color; intensity is - unsigned char b; // proportional to pow (x/255, 2.2), - // where x is r, g, or b. - - unsigned char a; // The pixel's alpha; 0 == transparent, - // 255 == opaque. - - PreviewRgba (unsigned char r = 0, - unsigned char g = 0, - unsigned char b = 0, - unsigned char a = 255) - : r(r), g(g), b(b), a(a) {} -}; - - -class IMF_EXPORT PreviewImage -{ - public: - - //-------------------------------------------------------------------- - // Constructor: - // - // PreviewImage(w,h,p) constructs a preview image with w by h pixels - // whose initial values are specified in pixel array p. The x and y - // coordinates of the pixels in p go from 0 to w-1, and from 0 to h-1. - // The pixel with coordinates (x, y) is at address p + y*w + x. - // Pixel (0, 0) is in the upper left corner of the preview image. - // If p is zero, the pixels in the preview image are initialized with - // (r = 0, b = 0, g = 0, a = 255). - // - //-------------------------------------------------------------------- - - PreviewImage (unsigned int width = 0, - unsigned int height = 0, - const PreviewRgba pixels[] = 0); - - //----------------------------------------------------- - // Copy constructor, destructor and assignment operator - //----------------------------------------------------- - - PreviewImage (const PreviewImage &other); - ~PreviewImage (); - - PreviewImage & operator = (const PreviewImage &other); - - - //----------------------------------------------- - // Access to width, height and to the pixel array - //----------------------------------------------- - - unsigned int width () const {return _width;} - unsigned int height () const {return _height;} - - PreviewRgba * pixels () {return _pixels;} - const PreviewRgba * pixels () const {return _pixels;} - - - //---------------------------- - // Access to individual pixels - //---------------------------- - - PreviewRgba & pixel (unsigned int x, unsigned int y) - {return _pixels[y * _width + x];} - - const PreviewRgba & pixel (unsigned int x, unsigned int y) const - {return _pixels[y * _width + x];} - - private: - - unsigned int _width; - unsigned int _height; - PreviewRgba * _pixels; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp deleted file mode 100644 index 8729f88..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class PreviewImageAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -PreviewImageAttribute::staticTypeName () -{ - return "preview"; -} - - -template <> -void -PreviewImageAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.width()); - Xdr::write (os, _value.height()); - - int numPixels = _value.width() * _value.height(); - const PreviewRgba *pixels = _value.pixels(); - - for (int i = 0; i < numPixels; ++i) - { - Xdr::write (os, pixels[i].r); - Xdr::write (os, pixels[i].g); - Xdr::write (os, pixels[i].b); - Xdr::write (os, pixels[i].a); - } -} - - -template <> -void -PreviewImageAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - int width, height; - - Xdr::read (is, width); - Xdr::read (is, height); - - PreviewImage p (width, height); - - int numPixels = p.width() * p.height(); - PreviewRgba *pixels = p.pixels(); - - for (int i = 0; i < numPixels; ++i) - { - Xdr::read (is, pixels[i].r); - Xdr::read (is, pixels[i].g); - Xdr::read (is, pixels[i].b); - Xdr::read (is, pixels[i].a); - } - - _value = p; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.h deleted file mode 100644 index 160e409..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.h +++ /dev/null @@ -1,70 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_PREVIEW_IMAGE_ATTRIBUTE_H -#define INCLUDED_IMF_PREVIEW_IMAGE_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class PreviewImageAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfPreviewImage.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute PreviewImageAttribute; - -template <> -IMF_EXPORT -const char *PreviewImageAttribute::staticTypeName (); - -template <> -IMF_EXPORT -void PreviewImageAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; - -template <> -IMF_EXPORT -void PreviewImageAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp deleted file mode 100644 index 6489576..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp +++ /dev/null @@ -1,553 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Pixar Animation Studios -// -// 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 Pixar Animation Studios nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -///////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Pxr24Compressor -// -// This compressor is based on source code that was contributed to -// OpenEXR by Pixar Animation Studios. The compression method was -// developed by Loren Carpenter. -// -// The compressor preprocesses the pixel data to reduce entropy, -// and then calls zlib. -// -// Compression of HALF and UINT channels is lossless, but compressing -// FLOAT channels is lossy: 32-bit floating-point numbers are converted -// to 24 bits by rounding the significand to 15 bits. -// -// When the compressor is invoked, the caller has already arranged -// the pixel data so that the values for each channel appear in a -// contiguous block of memory. The compressor converts the pixel -// values to unsigned integers: For UINT, this is a no-op. HALF -// values are simply re-interpreted as 16-bit integers. FLOAT -// values are converted to 24 bits, and the resulting bit patterns -// are interpreted as integers. The compressor then replaces each -// value with the difference between the value and its left neighbor. -// This turns flat fields in the image into zeroes, and ramps into -// strings of similar values. Next, each difference is split into -// 2, 3 or 4 bytes, and the bytes are transposed so that all the -// most significant bytes end up in a contiguous block, followed -// by the second most significant bytes, and so on. The resulting -// string of bytes is compressed with zlib. -// -//----------------------------------------------------------------------------- - -#include "ImfPxr24Compressor.h" -#include "ImfHeader.h" -#include "ImfChannelList.h" -#include "ImfMisc.h" -#include "ImfCheckedArithmetic.h" -#include "ImfNamespace.h" - -#include -#include - -#include -#include -#include -#include - -using namespace std; -using namespace IMATH_NAMESPACE; - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -namespace { - -// -// Conversion from 32-bit to 24-bit floating-point numbers. -// Conversion back to 32 bits is simply an 8-bit shift to the left. -// - -inline unsigned int -floatToFloat24 (float f) -{ - union - { - float f; - unsigned int i; - } u; - - u.f = f; - - // - // Disassemble the 32-bit floating point number, f, - // into sign, s, exponent, e, and significand, m. - // - - unsigned int s = u.i & 0x80000000; - unsigned int e = u.i & 0x7f800000; - unsigned int m = u.i & 0x007fffff; - unsigned int i; - - if (e == 0x7f800000) - { - if (m) - { - // - // F is a NAN; we preserve the sign bit and - // the 15 leftmost bits of the significand, - // with one exception: If the 15 leftmost - // bits are all zero, the NAN would turn - // into an infinity, so we have to set at - // least one bit in the significand. - // - - m >>= 8; - i = (e >> 8) | m | (m == 0); - } - else - { - // - // F is an infinity. - // - - i = e >> 8; - } - } - else - { - // - // F is finite, round the significand to 15 bits. - // - - i = ((e | m) + (m & 0x00000080)) >> 8; - - if (i >= 0x7f8000) - { - // - // F was close to FLT_MAX, and the significand was - // rounded up, resulting in an exponent overflow. - // Avoid the overflow by truncating the significand - // instead of rounding it. - // - - i = (e | m) >> 8; - } - } - - return (s >> 8) | i; -} - - -void -notEnoughData () -{ - throw IEX_NAMESPACE::InputExc ("Error decompressing data " - "(input data are shorter than expected)."); -} - - -void -tooMuchData () -{ - throw IEX_NAMESPACE::InputExc ("Error decompressing data " - "(input data are longer than expected)."); -} - -} // namespace - - -Pxr24Compressor::Pxr24Compressor (const Header &hdr, - size_t maxScanLineSize, - size_t numScanLines) -: - Compressor (hdr), - _maxScanLineSize (maxScanLineSize), - _numScanLines (numScanLines), - _tmpBuffer (0), - _outBuffer (0), - _channels (hdr.channels()) -{ - size_t maxInBytes = - uiMult (maxScanLineSize, numScanLines); - - size_t maxOutBytes = - uiAdd (uiAdd (maxInBytes, - size_t (ceil (maxInBytes * 0.01))), - size_t (100)); - - _tmpBuffer = new unsigned char [maxInBytes]; - _outBuffer = new char [maxOutBytes]; - - const Box2i &dataWindow = hdr.dataWindow(); - - _minX = dataWindow.min.x; - _maxX = dataWindow.max.x; - _maxY = dataWindow.max.y; -} - - -Pxr24Compressor::~Pxr24Compressor () -{ - delete [] _tmpBuffer; - delete [] _outBuffer; -} - - -int -Pxr24Compressor::numScanLines () const -{ - return _numScanLines; -} - - -Compressor::Format -Pxr24Compressor::format () const -{ - return NATIVE; -} - - -int -Pxr24Compressor::compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) -{ - return compress (inPtr, - inSize, - Box2i (V2i (_minX, minY), - V2i (_maxX, minY + _numScanLines - 1)), - outPtr); -} - - -int -Pxr24Compressor::compressTile (const char *inPtr, - int inSize, - Box2i range, - const char *&outPtr) -{ - return compress (inPtr, inSize, range, outPtr); -} - - -int -Pxr24Compressor::uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) -{ - return uncompress (inPtr, - inSize, - Box2i (V2i (_minX, minY), - V2i (_maxX, minY + _numScanLines - 1)), - outPtr); -} - - -int -Pxr24Compressor::uncompressTile (const char *inPtr, - int inSize, - Box2i range, - const char *&outPtr) -{ - return uncompress (inPtr, inSize, range, outPtr); -} - - -int -Pxr24Compressor::compress (const char *inPtr, - int inSize, - Box2i range, - const char *&outPtr) -{ - if (inSize == 0) - { - outPtr = _outBuffer; - return 0; - } - - int minX = range.min.x; - int maxX = min (range.max.x, _maxX); - int minY = range.min.y; - int maxY = min (range.max.y, _maxY); - - unsigned char *tmpBufferEnd = _tmpBuffer; - - for (int y = minY; y <= maxY; ++y) - { - for (ChannelList::ConstIterator i = _channels.begin(); - i != _channels.end(); - ++i) - { - const Channel &c = i.channel(); - - if (modp (y, c.ySampling) != 0) - continue; - - int n = numSamples (c.xSampling, minX, maxX); - - unsigned char *ptr[4]; - unsigned int previousPixel = 0; - - switch (c.type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - ptr[0] = tmpBufferEnd; - ptr[1] = ptr[0] + n; - ptr[2] = ptr[1] + n; - ptr[3] = ptr[2] + n; - tmpBufferEnd = ptr[3] + n; - - for (int j = 0; j < n; ++j) - { - unsigned int pixel; - char *pPtr = (char *) &pixel; - - for (size_t k = 0; k < sizeof (pixel); ++k) - *pPtr++ = *inPtr++; - - unsigned int diff = pixel - previousPixel; - previousPixel = pixel; - - *(ptr[0]++) = diff >> 24; - *(ptr[1]++) = diff >> 16; - *(ptr[2]++) = diff >> 8; - *(ptr[3]++) = diff; - } - - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - ptr[0] = tmpBufferEnd; - ptr[1] = ptr[0] + n; - tmpBufferEnd = ptr[1] + n; - - for (int j = 0; j < n; ++j) - { - half pixel; - - pixel = *(const half *) inPtr; - inPtr += sizeof (half); - - unsigned int diff = pixel.bits() - previousPixel; - previousPixel = pixel.bits(); - - *(ptr[0]++) = diff >> 8; - *(ptr[1]++) = diff; - } - - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - ptr[0] = tmpBufferEnd; - ptr[1] = ptr[0] + n; - ptr[2] = ptr[1] + n; - tmpBufferEnd = ptr[2] + n; - - for (int j = 0; j < n; ++j) - { - float pixel; - char *pPtr = (char *) &pixel; - - for (size_t k = 0; k < sizeof (pixel); ++k) - *pPtr++ = *inPtr++; - - unsigned int pixel24 = floatToFloat24 (pixel); - unsigned int diff = pixel24 - previousPixel; - previousPixel = pixel24; - - *(ptr[0]++) = diff >> 16; - *(ptr[1]++) = diff >> 8; - *(ptr[2]++) = diff; - } - - break; - - default: - - assert (false); - } - } - } - - uLongf outSize = int (ceil ((tmpBufferEnd - _tmpBuffer) * 1.01)) + 100; - - if (Z_OK != ::compress ((Bytef *) _outBuffer, - &outSize, - (const Bytef *) _tmpBuffer, - tmpBufferEnd - _tmpBuffer)) - { - throw IEX_NAMESPACE::BaseExc ("Data compression (zlib) failed."); - } - - outPtr = _outBuffer; - return outSize; -} - - -int -Pxr24Compressor::uncompress (const char *inPtr, - int inSize, - Box2i range, - const char *&outPtr) -{ - if (inSize == 0) - { - outPtr = _outBuffer; - return 0; - } - - uLongf tmpSize = _maxScanLineSize * _numScanLines; - - if (Z_OK != ::uncompress ((Bytef *)_tmpBuffer, - &tmpSize, - (const Bytef *) inPtr, - inSize)) - { - throw IEX_NAMESPACE::InputExc ("Data decompression (zlib) failed."); - } - - int minX = range.min.x; - int maxX = min (range.max.x, _maxX); - int minY = range.min.y; - int maxY = min (range.max.y, _maxY); - - const unsigned char *tmpBufferEnd = _tmpBuffer; - char *writePtr = _outBuffer; - - for (int y = minY; y <= maxY; ++y) - { - for (ChannelList::ConstIterator i = _channels.begin(); - i != _channels.end(); - ++i) - { - const Channel &c = i.channel(); - - if (modp (y, c.ySampling) != 0) - continue; - - int n = numSamples (c.xSampling, minX, maxX); - - const unsigned char *ptr[4]; - unsigned int pixel = 0; - - switch (c.type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: - - ptr[0] = tmpBufferEnd; - ptr[1] = ptr[0] + n; - ptr[2] = ptr[1] + n; - ptr[3] = ptr[2] + n; - tmpBufferEnd = ptr[3] + n; - - if ( (uLongf)(tmpBufferEnd - _tmpBuffer) > tmpSize) - notEnoughData(); - - for (int j = 0; j < n; ++j) - { - unsigned int diff = (*(ptr[0]++) << 24) | - (*(ptr[1]++) << 16) | - (*(ptr[2]++) << 8) | - *(ptr[3]++); - - pixel += diff; - - char *pPtr = (char *) &pixel; - - for (size_t k = 0; k < sizeof (pixel); ++k) - *writePtr++ = *pPtr++; - } - - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF: - - ptr[0] = tmpBufferEnd; - ptr[1] = ptr[0] + n; - tmpBufferEnd = ptr[1] + n; - - if ( (uLongf)(tmpBufferEnd - _tmpBuffer) > tmpSize) - notEnoughData(); - - for (int j = 0; j < n; ++j) - { - unsigned int diff = (*(ptr[0]++) << 8) | - *(ptr[1]++); - - pixel += diff; - - half * hPtr = (half *) writePtr; - hPtr->setBits ((unsigned short) pixel); - writePtr += sizeof (half); - } - - break; - - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT: - - ptr[0] = tmpBufferEnd; - ptr[1] = ptr[0] + n; - ptr[2] = ptr[1] + n; - tmpBufferEnd = ptr[2] + n; - - if ( (uLongf) (tmpBufferEnd - _tmpBuffer) > tmpSize) - notEnoughData(); - - for (int j = 0; j < n; ++j) - { - unsigned int diff = (*(ptr[0]++) << 24) | - (*(ptr[1]++) << 16) | - (*(ptr[2]++) << 8); - pixel += diff; - - char *pPtr = (char *) &pixel; - - for (size_t k = 0; k < sizeof (pixel); ++k) - *writePtr++ = *pPtr++; - } - - break; - - default: - - assert (false); - } - } - } - - if ((uLongf) (tmpBufferEnd - _tmpBuffer) < tmpSize) - tooMuchData(); - - outPtr = _outBuffer; - return writePtr - _outBuffer; -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPxr24Compressor.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPxr24Compressor.h deleted file mode 100644 index 026e926..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfPxr24Compressor.h +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef INCLUDED_IMF_PXR24_COMPRESSOR_H -#define INCLUDED_IMF_PXR24_COMPRESSOR_H - -///////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Pixar Animation Studios -// -// 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 Pixar Animation Studios nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -///////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Pxr24Compressor -- Loren Carpenter's 24-bit float compressor -// -//----------------------------------------------------------------------------- - -#include "ImfCompressor.h" -#include "ImfNamespace.h" -#include "ImfExport.h" -#include "ImfForward.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT Pxr24Compressor: public Compressor -{ - public: - - Pxr24Compressor (const Header &hdr, - size_t maxScanLineSize, - size_t numScanLines); - - virtual ~Pxr24Compressor (); - - virtual int numScanLines () const; - - virtual Format format () const; - - virtual int compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - - virtual int compressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - - virtual int uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - - virtual int uncompressTile (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - private: - - int compress (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - - int uncompress (const char *inPtr, - int inSize, - IMATH_NAMESPACE::Box2i range, - const char *&outPtr); - - int _maxScanLineSize; - int _numScanLines; - unsigned char * _tmpBuffer; - char * _outBuffer; - const ChannelList & _channels; - int _minX; - int _maxX; - int _maxY; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRational.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRational.cpp deleted file mode 100644 index fda7fc9..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRational.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// Rational numbers -// -// The double-to-Rational conversion code below -// was contributed to OpenEXR by Greg Ward. -// -//----------------------------------------------------------------------------- - -#include -#include - -using namespace std; -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -namespace { - -double -frac (double x, double e) -{ - return x - floor (x + e); -} - - -double -square (double x) -{ - return x * x; -} - - -double -denom (double x, double e) -{ - if (e > frac (x, e)) - { - return 1; - } - else - { - double r = frac (1 / x, e); - - if (e > r) - { - return floor (1 / x + e); - } - else - { - return denom (frac (1 / r, e), e / square (x * r)) + - floor (1 / x + e) * denom (frac (1 / x, e), e / square (x)); - } - } -} - -} // namespace - - -Rational::Rational (double x) -{ - int sign; - - if (x >= 0) - { - sign = 1; // positive - } - else if (x < 0) - { - sign = -1; // negative - x = -x; - } - else - { - n = 0; // NaN - d = 0; - return; - } - - if (x >= (1U << 31) - 0.5) - { - n = sign; // infinity - d = 0; - return; - } - - double e = (x < 1? 1: x) / (1U << 30); - d = (unsigned int) denom (x, e); - n = sign * (int) floor (x * d + 0.5); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRational.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRational.h deleted file mode 100644 index ba62b6b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRational.h +++ /dev/null @@ -1,98 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_RATIONAL_H -#define INCLUDED_IMF_RATIONAL_H - -#include "ImfExport.h" -#include "ImfNamespace.h" - -//----------------------------------------------------------------------------- -// -// Rational numbers -// -// A rational number is represented as pair of integers, n and d. -// The value of of the rational number is -// -// n/d for d > 0 -// positive infinity for n > 0, d == 0 -// negative infinity for n < 0, d == 0 -// not a number (NaN) for n == 0, d == 0 -// -//----------------------------------------------------------------------------- - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT Rational -{ - public: - - int n; // numerator - unsigned int d; // denominator - - - //---------------------------------------- - // Default constructor, sets value to zero - //---------------------------------------- - - Rational (): n (0), d (1) {} - - - //------------------------------------- - // Constructor, explicitly sets n and d - //------------------------------------- - - Rational (int n, int d): n (n), d (d) {} - - - //---------------------------- - // Constructor, approximates x - //---------------------------- - - explicit Rational (double x); - - - //--------------------------------- - // Approximate conversion to double - //--------------------------------- - - operator double () const {return double (n) / double (d);} -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp deleted file mode 100644 index a416468..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class RationalAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -RationalAttribute::staticTypeName () -{ - return "rational"; -} - - -template <> -void -RationalAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.n); - Xdr::write (os, _value.d); -} - - -template <> -void -RationalAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value.n); - Xdr::read (is, _value.d); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRationalAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRationalAttribute.h deleted file mode 100644 index 988fe01..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRationalAttribute.h +++ /dev/null @@ -1,69 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_RATIONAL_ATTRIBUTE_H -#define INCLUDED_IMF_RATIONAL_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class RationalAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfRational.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute RationalAttribute; - -template <> -IMF_EXPORT -const char *RationalAttribute::staticTypeName (); - -template <> -IMF_EXPORT -void RationalAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; - -template <> -IMF_EXPORT -void RationalAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgba.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgba.h deleted file mode 100644 index dccba9f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgba.h +++ /dev/null @@ -1,109 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_RGBA_H -#define INCLUDED_IMF_RGBA_H - -//----------------------------------------------------------------------------- -// -// class Rgba -// -//----------------------------------------------------------------------------- - -#include "half.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -// -// RGBA pixel -// - -struct Rgba -{ - half r; - half g; - half b; - half a; - - Rgba () {} - Rgba (half r, half g, half b, half a = 1.f): r (r), g (g), b (b), a (a) {} - - Rgba & operator = (const Rgba &other) - { - r = other.r; - g = other.g; - b = other.b; - a = other.a; - - return *this; - } -}; - - -// -// Channels in an RGBA file -// - -enum RgbaChannels -{ - WRITE_R = 0x01, // Red - WRITE_G = 0x02, // Green - WRITE_B = 0x04, // Blue - WRITE_A = 0x08, // Alpha - - WRITE_Y = 0x10, // Luminance, for black-and-white images, - // or in combination with chroma - - WRITE_C = 0x20, // Chroma (two subsampled channels, RY and BY, - // supported only for scanline-based files) - - WRITE_RGB = 0x07, // Red, green, blue - WRITE_RGBA = 0x0f, // Red, green, blue, alpha - - WRITE_YC = 0x30, // Luminance, chroma - WRITE_YA = 0x18, // Luminance, alpha - WRITE_YCA = 0x38 // Luminance, chroma, alpha -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaFile.cpp deleted file mode 100644 index c2b604a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaFile.cpp +++ /dev/null @@ -1,1405 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class RgbaOutputFile -// class RgbaInputFile -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace std; -using namespace IMATH_NAMESPACE; -using namespace RgbaYca; -using namespace ILMTHREAD_NAMESPACE; - -namespace { - -void -insertChannels (Header &header, RgbaChannels rgbaChannels) -{ - ChannelList ch; - - if (rgbaChannels & (WRITE_Y | WRITE_C)) - { - if (rgbaChannels & WRITE_Y) - { - ch.insert ("Y", Channel (HALF, 1, 1)); - } - - if (rgbaChannels & WRITE_C) - { - ch.insert ("RY", Channel (HALF, 2, 2, true)); - ch.insert ("BY", Channel (HALF, 2, 2, true)); - } - } - else - { - if (rgbaChannels & WRITE_R) - ch.insert ("R", Channel (HALF, 1, 1)); - - if (rgbaChannels & WRITE_G) - ch.insert ("G", Channel (HALF, 1, 1)); - - if (rgbaChannels & WRITE_B) - ch.insert ("B", Channel (HALF, 1, 1)); - } - - if (rgbaChannels & WRITE_A) - ch.insert ("A", Channel (HALF, 1, 1)); - - header.channels() = ch; -} - - -RgbaChannels -rgbaChannels (const ChannelList &ch, const string &channelNamePrefix = "") -{ - int i = 0; - - if (ch.findChannel (channelNamePrefix + "R")) - i |= WRITE_R; - - if (ch.findChannel (channelNamePrefix + "G")) - i |= WRITE_G; - - if (ch.findChannel (channelNamePrefix + "B")) - i |= WRITE_B; - - if (ch.findChannel (channelNamePrefix + "A")) - i |= WRITE_A; - - if (ch.findChannel (channelNamePrefix + "Y")) - i |= WRITE_Y; - - if (ch.findChannel (channelNamePrefix + "RY") || - ch.findChannel (channelNamePrefix + "BY")) - i |= WRITE_C; - - return RgbaChannels (i); -} - - -string -prefixFromLayerName (const string &layerName, const Header &header) -{ - if (layerName.empty()) - return ""; - - if (hasMultiView (header) && multiView(header)[0] == layerName) - return ""; - - return layerName + "."; -} - - -V3f -ywFromHeader (const Header &header) -{ - Chromaticities cr; - - if (hasChromaticities (header)) - cr = chromaticities (header); - - return computeYw (cr); -} - - -ptrdiff_t -cachePadding (ptrdiff_t size) -{ - // - // Some of the buffers that are allocated by classes ToYca and - // FromYca, below, may need to be padded to avoid cache thrashing. - // If the difference between the buffer size and the nearest power - // of two is less than CACHE_LINE_SIZE, then we add an appropriate - // amount of padding. - // - // CACHE_LINE_SIZE must be a power of two, and it must be at - // least as big as the true size of a cache line on the machine - // we are running on. (It is ok if CACHE_LINE_SIZE is larger - // than a real cache line.) - // - - static int LOG2_CACHE_LINE_SIZE = 8; - static const ptrdiff_t CACHE_LINE_SIZE = (1 << LOG2_CACHE_LINE_SIZE); - - int i = LOG2_CACHE_LINE_SIZE + 2; - - while ((size >> i) > 1) - ++i; - - if (size > (1 << (i + 1)) - 64) - return 64 + ((1 << (i + 1)) - size); - - if (size < (1 << i) + 64) - return 64 + ((1 << i) - size); - - return 0; -} - -} // namespace - - -class RgbaOutputFile::ToYca: public Mutex -{ - public: - - ToYca (OutputFile &outputFile, RgbaChannels rgbaChannels); - ~ToYca (); - - void setYCRounding (unsigned int roundY, - unsigned int roundC); - - void setFrameBuffer (const Rgba *base, - size_t xStride, - size_t yStride); - - void writePixels (int numScanLines); - int currentScanLine () const; - - private: - - void padTmpBuf (); - void rotateBuffers (); - void duplicateLastBuffer (); - void duplicateSecondToLastBuffer (); - void decimateChromaVertAndWriteScanLine (); - - OutputFile & _outputFile; - bool _writeY; - bool _writeC; - bool _writeA; - int _xMin; - int _width; - int _height; - int _linesConverted; - LineOrder _lineOrder; - int _currentScanLine; - V3f _yw; - Rgba * _bufBase; - Rgba * _buf[N]; - Rgba * _tmpBuf; - const Rgba * _fbBase; - size_t _fbXStride; - size_t _fbYStride; - int _roundY; - int _roundC; -}; - - -RgbaOutputFile::ToYca::ToYca (OutputFile &outputFile, - RgbaChannels rgbaChannels) -: - _outputFile (outputFile) -{ - _writeY = (rgbaChannels & WRITE_Y)? true: false; - _writeC = (rgbaChannels & WRITE_C)? true: false; - _writeA = (rgbaChannels & WRITE_A)? true: false; - - const Box2i dw = _outputFile.header().dataWindow(); - - _xMin = dw.min.x; - _width = dw.max.x - dw.min.x + 1; - _height = dw.max.y - dw.min.y + 1; - - _linesConverted = 0; - _lineOrder = _outputFile.header().lineOrder(); - - if (_lineOrder == INCREASING_Y) - _currentScanLine = dw.min.y; - else - _currentScanLine = dw.max.y; - - _yw = ywFromHeader (_outputFile.header()); - - ptrdiff_t pad = cachePadding (_width * sizeof (Rgba)) / sizeof (Rgba); - - _bufBase = new Rgba[(_width + pad) * N]; - - for (int i = 0; i < N; ++i) - _buf[i] = _bufBase + (i * (_width + pad)); - - _tmpBuf = new Rgba[_width + N - 1]; - - _fbBase = 0; - _fbXStride = 0; - _fbYStride = 0; - - _roundY = 7; - _roundC = 5; -} - - -RgbaOutputFile::ToYca::~ToYca () -{ - delete [] _bufBase; - delete [] _tmpBuf; -} - - -void -RgbaOutputFile::ToYca::setYCRounding (unsigned int roundY, - unsigned int roundC) -{ - _roundY = roundY; - _roundC = roundC; -} - - -void -RgbaOutputFile::ToYca::setFrameBuffer (const Rgba *base, - size_t xStride, - size_t yStride) -{ - if (_fbBase == 0) - { - FrameBuffer fb; - - if (_writeY) - { - fb.insert ("Y", - Slice (HALF, // type - (char *) &_tmpBuf[-_xMin].g, // base - sizeof (Rgba), // xStride - 0, // yStride - 1, // xSampling - 1)); // ySampling - } - - if (_writeC) - { - fb.insert ("RY", - Slice (HALF, // type - (char *) &_tmpBuf[-_xMin].r, // base - sizeof (Rgba) * 2, // xStride - 0, // yStride - 2, // xSampling - 2)); // ySampling - - fb.insert ("BY", - Slice (HALF, // type - (char *) &_tmpBuf[-_xMin].b, // base - sizeof (Rgba) * 2, // xStride - 0, // yStride - 2, // xSampling - 2)); // ySampling - } - - if (_writeA) - { - fb.insert ("A", - Slice (HALF, // type - (char *) &_tmpBuf[-_xMin].a, // base - sizeof (Rgba), // xStride - 0, // yStride - 1, // xSampling - 1)); // ySampling - } - - _outputFile.setFrameBuffer (fb); - } - - _fbBase = base; - _fbXStride = xStride; - _fbYStride = yStride; -} - - -void -RgbaOutputFile::ToYca::writePixels (int numScanLines) -{ - if (_fbBase == 0) - { - THROW (IEX_NAMESPACE::ArgExc, "No frame buffer was specified as the " - "pixel data source for image file " - "\"" << _outputFile.fileName() << "\"."); - } - - if (_writeY && !_writeC) - { - // - // We are writing only luminance; filtering - // and subsampling are not necessary. - // - - for (int i = 0; i < numScanLines; ++i) - { - // - // Copy the next scan line from the caller's - // frame buffer into _tmpBuf. - // - - for (int j = 0; j < _width; ++j) - { - _tmpBuf[j] = _fbBase[_fbYStride * _currentScanLine + - _fbXStride * (j + _xMin)]; - } - - // - // Convert the scan line from RGB to luminance/chroma, - // and store the result in the output file. - // - - RGBAtoYCA (_yw, _width, _writeA, _tmpBuf, _tmpBuf); - _outputFile.writePixels (1); - - ++_linesConverted; - - if (_lineOrder == INCREASING_Y) - ++_currentScanLine; - else - --_currentScanLine; - } - } - else - { - // - // We are writing chroma; the pixels must be filtered and subsampled. - // - - for (int i = 0; i < numScanLines; ++i) - { - // - // Copy the next scan line from the caller's - // frame buffer into _tmpBuf. - // - - for (int j = 0; j < _width; ++j) - { - _tmpBuf[j + N2] = _fbBase[_fbYStride * _currentScanLine + - _fbXStride * (j + _xMin)]; - } - - // - // Convert the scan line from RGB to luminance/chroma. - // - - RGBAtoYCA (_yw, _width, _writeA, _tmpBuf + N2, _tmpBuf + N2); - - // - // Append N2 copies of the first and last pixel to the - // beginning and end of the scan line. - // - - padTmpBuf (); - - // - // Filter and subsample the scan line's chroma channels - // horizontally; store the result in _buf. - // - - rotateBuffers(); - decimateChromaHoriz (_width, _tmpBuf, _buf[N - 1]); - - // - // If this is the first scan line in the image, - // store N2 more copies of the scan line in _buf. - // - - if (_linesConverted == 0) - { - for (int j = 0; j < N2; ++j) - duplicateLastBuffer(); - } - - ++_linesConverted; - - // - // If we have have converted at least N2 scan lines from - // RGBA to luminance/chroma, then we can start to filter - // and subsample vertically, and store pixels in the - // output file. - // - - if (_linesConverted > N2) - decimateChromaVertAndWriteScanLine(); - - // - // If we have already converted the last scan line in - // the image to luminance/chroma, filter, subsample and - // store the remaining scan lines in _buf. - // - - if (_linesConverted >= _height) - { - for (int j = 0; j < N2 - _height; ++j) - duplicateLastBuffer(); - - duplicateSecondToLastBuffer(); - ++_linesConverted; - decimateChromaVertAndWriteScanLine(); - - for (int j = 1; j < min (_height, N2); ++j) - { - duplicateLastBuffer(); - ++_linesConverted; - decimateChromaVertAndWriteScanLine(); - } - } - - if (_lineOrder == INCREASING_Y) - ++_currentScanLine; - else - --_currentScanLine; - } - } -} - - -int -RgbaOutputFile::ToYca::currentScanLine () const -{ - return _currentScanLine; -} - - -void -RgbaOutputFile::ToYca::padTmpBuf () -{ - for (int i = 0; i < N2; ++i) - { - _tmpBuf[i] = _tmpBuf[N2]; - _tmpBuf[_width + N2 + i] = _tmpBuf[_width + N2 - 2]; - } -} - - -void -RgbaOutputFile::ToYca::rotateBuffers () -{ - Rgba *tmp = _buf[0]; - - for (int i = 0; i < N - 1; ++i) - _buf[i] = _buf[i + 1]; - - _buf[N - 1] = tmp; -} - - -void -RgbaOutputFile::ToYca::duplicateLastBuffer () -{ - rotateBuffers(); - memcpy (_buf[N - 1], _buf[N - 2], _width * sizeof (Rgba)); -} - - -void -RgbaOutputFile::ToYca::duplicateSecondToLastBuffer () -{ - rotateBuffers(); - memcpy (_buf[N - 1], _buf[N - 3], _width * sizeof (Rgba)); -} - - -void -RgbaOutputFile::ToYca::decimateChromaVertAndWriteScanLine () -{ - if (_linesConverted & 1) - memcpy (_tmpBuf, _buf[N2], _width * sizeof (Rgba)); - else - decimateChromaVert (_width, _buf, _tmpBuf); - - if (_writeY && _writeC) - roundYCA (_width, _roundY, _roundC, _tmpBuf, _tmpBuf); - - _outputFile.writePixels (1); -} - - -RgbaOutputFile::RgbaOutputFile (const char name[], - const Header &header, - RgbaChannels rgbaChannels, - int numThreads): - _outputFile (0), - _toYca (0) -{ - Header hd (header); - insertChannels (hd, rgbaChannels); - _outputFile = new OutputFile (name, hd, numThreads); - - if (rgbaChannels & (WRITE_Y | WRITE_C)) - _toYca = new ToYca (*_outputFile, rgbaChannels); -} - - -RgbaOutputFile::RgbaOutputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - RgbaChannels rgbaChannels, - int numThreads): - _outputFile (0), - _toYca (0) -{ - Header hd (header); - insertChannels (hd, rgbaChannels); - _outputFile = new OutputFile (os, hd, numThreads); - - if (rgbaChannels & (WRITE_Y | WRITE_C)) - _toYca = new ToYca (*_outputFile, rgbaChannels); -} - - -RgbaOutputFile::RgbaOutputFile (const char name[], - const IMATH_NAMESPACE::Box2i &displayWindow, - const IMATH_NAMESPACE::Box2i &dataWindow, - RgbaChannels rgbaChannels, - float pixelAspectRatio, - const IMATH_NAMESPACE::V2f screenWindowCenter, - float screenWindowWidth, - LineOrder lineOrder, - Compression compression, - int numThreads): - _outputFile (0), - _toYca (0) -{ - Header hd (displayWindow, - dataWindow.isEmpty()? displayWindow: dataWindow, - pixelAspectRatio, - screenWindowCenter, - screenWindowWidth, - lineOrder, - compression); - - insertChannels (hd, rgbaChannels); - _outputFile = new OutputFile (name, hd, numThreads); - - if (rgbaChannels & (WRITE_Y | WRITE_C)) - _toYca = new ToYca (*_outputFile, rgbaChannels); -} - - -RgbaOutputFile::RgbaOutputFile (const char name[], - int width, - int height, - RgbaChannels rgbaChannels, - float pixelAspectRatio, - const IMATH_NAMESPACE::V2f screenWindowCenter, - float screenWindowWidth, - LineOrder lineOrder, - Compression compression, - int numThreads): - _outputFile (0), - _toYca (0) -{ - Header hd (width, - height, - pixelAspectRatio, - screenWindowCenter, - screenWindowWidth, - lineOrder, - compression); - - insertChannels (hd, rgbaChannels); - _outputFile = new OutputFile (name, hd, numThreads); - - if (rgbaChannels & (WRITE_Y | WRITE_C)) - _toYca = new ToYca (*_outputFile, rgbaChannels); -} - - -RgbaOutputFile::~RgbaOutputFile () -{ - delete _toYca; - delete _outputFile; -} - - -void -RgbaOutputFile::setFrameBuffer (const Rgba *base, - size_t xStride, - size_t yStride) -{ - if (_toYca) - { - Lock lock (*_toYca); - _toYca->setFrameBuffer (base, xStride, yStride); - } - else - { - size_t xs = xStride * sizeof (Rgba); - size_t ys = yStride * sizeof (Rgba); - - FrameBuffer fb; - - fb.insert ("R", Slice (HALF, (char *) &base[0].r, xs, ys)); - fb.insert ("G", Slice (HALF, (char *) &base[0].g, xs, ys)); - fb.insert ("B", Slice (HALF, (char *) &base[0].b, xs, ys)); - fb.insert ("A", Slice (HALF, (char *) &base[0].a, xs, ys)); - - _outputFile->setFrameBuffer (fb); - } -} - - -void -RgbaOutputFile::writePixels (int numScanLines) -{ - if (_toYca) - { - Lock lock (*_toYca); - _toYca->writePixels (numScanLines); - } - else - { - _outputFile->writePixels (numScanLines); - } -} - - -int -RgbaOutputFile::currentScanLine () const -{ - if (_toYca) - { - Lock lock (*_toYca); - return _toYca->currentScanLine(); - } - else - { - return _outputFile->currentScanLine(); - } -} - - -const Header & -RgbaOutputFile::header () const -{ - return _outputFile->header(); -} - - -const FrameBuffer & -RgbaOutputFile::frameBuffer () const -{ - return _outputFile->frameBuffer(); -} - - -const IMATH_NAMESPACE::Box2i & -RgbaOutputFile::displayWindow () const -{ - return _outputFile->header().displayWindow(); -} - - -const IMATH_NAMESPACE::Box2i & -RgbaOutputFile::dataWindow () const -{ - return _outputFile->header().dataWindow(); -} - - -float -RgbaOutputFile::pixelAspectRatio () const -{ - return _outputFile->header().pixelAspectRatio(); -} - - -const IMATH_NAMESPACE::V2f -RgbaOutputFile::screenWindowCenter () const -{ - return _outputFile->header().screenWindowCenter(); -} - - -float -RgbaOutputFile::screenWindowWidth () const -{ - return _outputFile->header().screenWindowWidth(); -} - - -LineOrder -RgbaOutputFile::lineOrder () const -{ - return _outputFile->header().lineOrder(); -} - - -Compression -RgbaOutputFile::compression () const -{ - return _outputFile->header().compression(); -} - - -RgbaChannels -RgbaOutputFile::channels () const -{ - return rgbaChannels (_outputFile->header().channels()); -} - - -void -RgbaOutputFile::updatePreviewImage (const PreviewRgba newPixels[]) -{ - _outputFile->updatePreviewImage (newPixels); -} - - -void -RgbaOutputFile::setYCRounding (unsigned int roundY, unsigned int roundC) -{ - if (_toYca) - { - Lock lock (*_toYca); - _toYca->setYCRounding (roundY, roundC); - } -} - - -void -RgbaOutputFile::breakScanLine (int y, int offset, int length, char c) -{ - _outputFile->breakScanLine (y, offset, length, c); -} - - -class RgbaInputFile::FromYca: public Mutex -{ - public: - - FromYca (InputFile &inputFile, RgbaChannels rgbaChannels); - ~FromYca (); - - void setFrameBuffer (Rgba *base, - size_t xStride, - size_t yStride, - const string &channelNamePrefix); - - void readPixels (int scanLine1, int scanLine2); - - private: - - void readPixels (int scanLine); - void rotateBuf1 (int d); - void rotateBuf2 (int d); - void readYCAScanLine (int y, Rgba buf[]); - void padTmpBuf (); - - InputFile & _inputFile; - bool _readC; - int _xMin; - int _yMin; - int _yMax; - int _width; - int _height; - int _currentScanLine; - LineOrder _lineOrder; - V3f _yw; - Rgba * _bufBase; - Rgba * _buf1[N + 2]; - Rgba * _buf2[3]; - Rgba * _tmpBuf; - Rgba * _fbBase; - size_t _fbXStride; - size_t _fbYStride; -}; - - -RgbaInputFile::FromYca::FromYca (InputFile &inputFile, - RgbaChannels rgbaChannels) -: - _inputFile (inputFile) -{ - _readC = (rgbaChannels & WRITE_C)? true: false; - - const Box2i dw = _inputFile.header().dataWindow(); - - _xMin = dw.min.x; - _yMin = dw.min.y; - _yMax = dw.max.y; - _width = dw.max.x - dw.min.x + 1; - _height = dw.max.y - dw.min.y + 1; - _currentScanLine = dw.min.y - N - 2; - _lineOrder = _inputFile.header().lineOrder(); - _yw = ywFromHeader (_inputFile.header()); - - ptrdiff_t pad = cachePadding (_width * sizeof (Rgba)) / sizeof (Rgba); - - _bufBase = new Rgba[(_width + pad) * (N + 2 + 3)]; - - for (int i = 0; i < N + 2; ++i) - _buf1[i] = _bufBase + (i * (_width + pad)); - - for (int i = 0; i < 3; ++i) - _buf2[i] = _bufBase + ((i + N + 2) * (_width + pad)); - - _tmpBuf = new Rgba[_width + N - 1]; - - _fbBase = 0; - _fbXStride = 0; - _fbYStride = 0; -} - - -RgbaInputFile::FromYca::~FromYca () -{ - delete [] _bufBase; - delete [] _tmpBuf; -} - - -void -RgbaInputFile::FromYca::setFrameBuffer (Rgba *base, - size_t xStride, - size_t yStride, - const string &channelNamePrefix) -{ - if (_fbBase == 0) - { - FrameBuffer fb; - - fb.insert (channelNamePrefix + "Y", - Slice (HALF, // type - (char *) &_tmpBuf[N2 - _xMin].g, // base - sizeof (Rgba), // xStride - 0, // yStride - 1, // xSampling - 1, // ySampling - 0.5)); // fillValue - - if (_readC) - { - fb.insert (channelNamePrefix + "RY", - Slice (HALF, // type - (char *) &_tmpBuf[N2 - _xMin].r, // base - sizeof (Rgba) * 2, // xStride - 0, // yStride - 2, // xSampling - 2, // ySampling - 0.0)); // fillValue - - fb.insert (channelNamePrefix + "BY", - Slice (HALF, // type - (char *) &_tmpBuf[N2 - _xMin].b, // base - sizeof (Rgba) * 2, // xStride - 0, // yStride - 2, // xSampling - 2, // ySampling - 0.0)); // fillValue - } - - fb.insert (channelNamePrefix + "A", - Slice (HALF, // type - (char *) &_tmpBuf[N2 - _xMin].a, // base - sizeof (Rgba), // xStride - 0, // yStride - 1, // xSampling - 1, // ySampling - 1.0)); // fillValue - - _inputFile.setFrameBuffer (fb); - } - - _fbBase = base; - _fbXStride = xStride; - _fbYStride = yStride; -} - - -void -RgbaInputFile::FromYca::readPixels (int scanLine1, int scanLine2) -{ - int minY = min (scanLine1, scanLine2); - int maxY = max (scanLine1, scanLine2); - - if (_lineOrder == INCREASING_Y) - { - for (int y = minY; y <= maxY; ++y) - readPixels (y); - } - else - { - for (int y = maxY; y >= minY; --y) - readPixels (y); - } -} - - -void -RgbaInputFile::FromYca::readPixels (int scanLine) -{ - if (_fbBase == 0) - { - THROW (IEX_NAMESPACE::ArgExc, "No frame buffer was specified as the " - "pixel data destination for image file " - "\"" << _inputFile.fileName() << "\"."); - } - - // - // In order to convert one scan line to RGB format, we need that - // scan line plus N2+1 extra scan lines above and N2+1 scan lines - // below in luminance/chroma format. - // - // We allow random access to scan lines, but we buffer partially - // processed luminance/chroma data in order to make reading pixels - // in increasing y or decreasing y order reasonably efficient: - // - // _currentScanLine holds the y coordinate of the scan line - // that was most recently read. - // - // _buf1 contains scan lines _currentScanLine-N2-1 - // through _currentScanLine+N2+1 in - // luminance/chroma format. Odd-numbered - // lines contain no chroma data. Even-numbered - // lines have valid chroma data for all pixels. - // - // _buf2 contains scan lines _currentScanLine-1 - // through _currentScanLine+1, in RGB format. - // Super-saturated pixels (see ImfRgbaYca.h) - // have not yet been eliminated. - // - // If the scan line we are trying to read now is close enough to - // _currentScanLine, we don't have to recompute the contents of _buf1 - // and _buf2 from scratch. We can rotate _buf1 and _buf2, and fill - // in the missing data. - // - - int dy = scanLine - _currentScanLine; - - if (abs (dy) < N + 2) - rotateBuf1 (dy); - - if (abs (dy) < 3) - rotateBuf2 (dy); - - if (dy < 0) - { - { - int n = min (-dy, N + 2); - int yMin = scanLine - N2 - 1; - - for (int i = n - 1; i >= 0; --i) - readYCAScanLine (yMin + i, _buf1[i]); - } - - { - int n = min (-dy, 3); - - for (int i = 0; i < n; ++i) - { - if ((scanLine + i) & 1) - { - YCAtoRGBA (_yw, _width, _buf1[N2 + i], _buf2[i]); - } - else - { - reconstructChromaVert (_width, _buf1 + i, _buf2[i]); - YCAtoRGBA (_yw, _width, _buf2[i], _buf2[i]); - } - } - } - } - else - { - { - int n = min (dy, N + 2); - int yMax = scanLine + N2 + 1; - - for (int i = n - 1; i >= 0; --i) - readYCAScanLine (yMax - i, _buf1[N + 1 - i]); - } - - { - int n = min (dy, 3); - - for (int i = 2; i > 2 - n; --i) - { - if ((scanLine + i) & 1) - { - YCAtoRGBA (_yw, _width, _buf1[N2 + i], _buf2[i]); - } - else - { - reconstructChromaVert (_width, _buf1 + i, _buf2[i]); - YCAtoRGBA (_yw, _width, _buf2[i], _buf2[i]); - } - } - } - } - - fixSaturation (_yw, _width, _buf2, _tmpBuf); - - for (int i = 0; i < _width; ++i) - _fbBase[_fbYStride * scanLine + _fbXStride * (i + _xMin)] = _tmpBuf[i]; - - _currentScanLine = scanLine; -} - - -void -RgbaInputFile::FromYca::rotateBuf1 (int d) -{ - d = modp (d, N + 2); - - Rgba *tmp[N + 2]; - - for (int i = 0; i < N + 2; ++i) - tmp[i] = _buf1[i]; - - for (int i = 0; i < N + 2; ++i) - _buf1[i] = tmp[(i + d) % (N + 2)]; -} - - -void -RgbaInputFile::FromYca::rotateBuf2 (int d) -{ - d = modp (d, 3); - - Rgba *tmp[3]; - - for (int i = 0; i < 3; ++i) - tmp[i] = _buf2[i]; - - for (int i = 0; i < 3; ++i) - _buf2[i] = tmp[(i + d) % 3]; -} - - -void -RgbaInputFile::FromYca::readYCAScanLine (int y, Rgba *buf) -{ - // - // Clamp y. - // - - if (y < _yMin) - y = _yMin; - else if (y > _yMax) - y = _yMax - 1; - - // - // Read scan line y into _tmpBuf. - // - - _inputFile.readPixels (y); - - // - // Reconstruct missing chroma samples and copy - // the scan line into buf. - // - - if (!_readC) - { - for (int i = 0; i < _width; ++i) - { - _tmpBuf[i + N2].r = 0; - _tmpBuf[i + N2].b = 0; - } - } - - if (y & 1) - { - memcpy (buf, _tmpBuf + N2, _width * sizeof (Rgba)); - } - else - { - padTmpBuf(); - reconstructChromaHoriz (_width, _tmpBuf, buf); - } -} - - -void -RgbaInputFile::FromYca::padTmpBuf () -{ - for (int i = 0; i < N2; ++i) - { - _tmpBuf[i] = _tmpBuf[N2]; - _tmpBuf[_width + N2 + i] = _tmpBuf[_width + N2 - 2]; - } -} - - -RgbaInputFile::RgbaInputFile (const char name[], int numThreads): - _inputFile (new InputFile (name, numThreads)), - _fromYca (0), - _channelNamePrefix ("") -{ - RgbaChannels rgbaChannels = channels(); - - if (rgbaChannels & (WRITE_Y | WRITE_C)) - _fromYca = new FromYca (*_inputFile, rgbaChannels); -} - - -RgbaInputFile::RgbaInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads): - _inputFile (new InputFile (is, numThreads)), - _fromYca (0), - _channelNamePrefix ("") -{ - RgbaChannels rgbaChannels = channels(); - - if (rgbaChannels & (WRITE_Y | WRITE_C)) - _fromYca = new FromYca (*_inputFile, rgbaChannels); -} - - -RgbaInputFile::RgbaInputFile (const char name[], - const string &layerName, - int numThreads) -: - _inputFile (new InputFile (name, numThreads)), - _fromYca (0), - _channelNamePrefix (prefixFromLayerName (layerName, _inputFile->header())) -{ - RgbaChannels rgbaChannels = channels(); - - if (rgbaChannels & (WRITE_Y | WRITE_C)) - _fromYca = new FromYca (*_inputFile, rgbaChannels); -} - - -RgbaInputFile::RgbaInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - const string &layerName, - int numThreads) -: - _inputFile (new InputFile (is, numThreads)), - _fromYca (0), - _channelNamePrefix (prefixFromLayerName (layerName, _inputFile->header())) -{ - RgbaChannels rgbaChannels = channels(); - - if (rgbaChannels & (WRITE_Y | WRITE_C)) - _fromYca = new FromYca (*_inputFile, rgbaChannels); -} - - -RgbaInputFile::~RgbaInputFile () -{ - delete _inputFile; - delete _fromYca; -} - - -void -RgbaInputFile::setFrameBuffer (Rgba *base, size_t xStride, size_t yStride) -{ - if (_fromYca) - { - Lock lock (*_fromYca); - _fromYca->setFrameBuffer (base, xStride, yStride, _channelNamePrefix); - } - else - { - size_t xs = xStride * sizeof (Rgba); - size_t ys = yStride * sizeof (Rgba); - - FrameBuffer fb; - - fb.insert (_channelNamePrefix + "R", - Slice (HALF, - (char *) &base[0].r, - xs, ys, - 1, 1, // xSampling, ySampling - 0.0)); // fillValue - - fb.insert (_channelNamePrefix + "G", - Slice (HALF, - (char *) &base[0].g, - xs, ys, - 1, 1, // xSampling, ySampling - 0.0)); // fillValue - - fb.insert (_channelNamePrefix + "B", - Slice (HALF, - (char *) &base[0].b, - xs, ys, - 1, 1, // xSampling, ySampling - 0.0)); // fillValue - - fb.insert (_channelNamePrefix + "A", - Slice (HALF, - (char *) &base[0].a, - xs, ys, - 1, 1, // xSampling, ySampling - 1.0)); // fillValue - - _inputFile->setFrameBuffer (fb); - } -} - - -void -RgbaInputFile::setLayerName (const string &layerName) -{ - delete _fromYca; - _fromYca = 0; - - _channelNamePrefix = prefixFromLayerName (layerName, _inputFile->header()); - - RgbaChannels rgbaChannels = channels(); - - if (rgbaChannels & (WRITE_Y | WRITE_C)) - _fromYca = new FromYca (*_inputFile, rgbaChannels); - - FrameBuffer fb; - _inputFile->setFrameBuffer (fb); -} - - -void -RgbaInputFile::readPixels (int scanLine1, int scanLine2) -{ - if (_fromYca) - { - Lock lock (*_fromYca); - _fromYca->readPixels (scanLine1, scanLine2); - } - else - { - _inputFile->readPixels (scanLine1, scanLine2); - } -} - - -void -RgbaInputFile::readPixels (int scanLine) -{ - readPixels (scanLine, scanLine); -} - - -bool -RgbaInputFile::isComplete () const -{ - return _inputFile->isComplete(); -} - - -const Header & -RgbaInputFile::header () const -{ - return _inputFile->header(); -} - - -const char * -RgbaInputFile::fileName () const -{ - return _inputFile->fileName(); -} - - -const FrameBuffer & -RgbaInputFile::frameBuffer () const -{ - return _inputFile->frameBuffer(); -} - - -const IMATH_NAMESPACE::Box2i & -RgbaInputFile::displayWindow () const -{ - return _inputFile->header().displayWindow(); -} - - -const IMATH_NAMESPACE::Box2i & -RgbaInputFile::dataWindow () const -{ - return _inputFile->header().dataWindow(); -} - - -float -RgbaInputFile::pixelAspectRatio () const -{ - return _inputFile->header().pixelAspectRatio(); -} - - -const IMATH_NAMESPACE::V2f -RgbaInputFile::screenWindowCenter () const -{ - return _inputFile->header().screenWindowCenter(); -} - - -float -RgbaInputFile::screenWindowWidth () const -{ - return _inputFile->header().screenWindowWidth(); -} - - -LineOrder -RgbaInputFile::lineOrder () const -{ - return _inputFile->header().lineOrder(); -} - - -Compression -RgbaInputFile::compression () const -{ - return _inputFile->header().compression(); -} - - -RgbaChannels -RgbaInputFile::channels () const -{ - return rgbaChannels (_inputFile->header().channels(), _channelNamePrefix); -} - - -int -RgbaInputFile::version () const -{ - return _inputFile->version(); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaFile.h deleted file mode 100644 index 10a74a0..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaFile.h +++ /dev/null @@ -1,346 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_RGBA_FILE_H -#define INCLUDED_IMF_RGBA_FILE_H - - -//----------------------------------------------------------------------------- -// -// Simplified RGBA image I/O -// -// class RgbaOutputFile -// class RgbaInputFile -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfFrameBuffer.h" -#include "ImfRgba.h" -#include "ImathVec.h" -#include "ImathBox.h" -#include "half.h" -#include "ImfThreading.h" -#include -#include "ImfNamespace.h" -#include "ImfForward.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -// -// RGBA output file. -// - -class IMF_EXPORT RgbaOutputFile -{ - public: - - //--------------------------------------------------- - // Constructor -- header is constructed by the caller - //--------------------------------------------------- - - RgbaOutputFile (const char name[], - const Header &header, - RgbaChannels rgbaChannels = WRITE_RGBA, - int numThreads = globalThreadCount()); - - - //---------------------------------------------------- - // Constructor -- header is constructed by the caller, - // file is opened by the caller, destructor will not - // automatically close the file. - //---------------------------------------------------- - - RgbaOutputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - RgbaChannels rgbaChannels = WRITE_RGBA, - int numThreads = globalThreadCount()); - - - //---------------------------------------------------------------- - // Constructor -- header data are explicitly specified as function - // call arguments (empty dataWindow means "same as displayWindow") - //---------------------------------------------------------------- - - RgbaOutputFile (const char name[], - const IMATH_NAMESPACE::Box2i &displayWindow, - const IMATH_NAMESPACE::Box2i &dataWindow = IMATH_NAMESPACE::Box2i(), - RgbaChannels rgbaChannels = WRITE_RGBA, - float pixelAspectRatio = 1, - const IMATH_NAMESPACE::V2f screenWindowCenter = IMATH_NAMESPACE::V2f (0, 0), - float screenWindowWidth = 1, - LineOrder lineOrder = INCREASING_Y, - Compression compression = PIZ_COMPRESSION, - int numThreads = globalThreadCount()); - - - //----------------------------------------------- - // Constructor -- like the previous one, but both - // the display window and the data window are - // Box2i (V2i (0, 0), V2i (width - 1, height -1)) - //----------------------------------------------- - - RgbaOutputFile (const char name[], - int width, - int height, - RgbaChannels rgbaChannels = WRITE_RGBA, - float pixelAspectRatio = 1, - const IMATH_NAMESPACE::V2f screenWindowCenter = IMATH_NAMESPACE::V2f (0, 0), - float screenWindowWidth = 1, - LineOrder lineOrder = INCREASING_Y, - Compression compression = PIZ_COMPRESSION, - int numThreads = globalThreadCount()); - - - //----------- - // Destructor - //----------- - - virtual ~RgbaOutputFile (); - - - //------------------------------------------------ - // Define a frame buffer as the pixel data source: - // Pixel (x, y) is at address - // - // base + x * xStride + y * yStride - // - //------------------------------------------------ - - void setFrameBuffer (const Rgba *base, - size_t xStride, - size_t yStride); - - - //--------------------------------------------- - // Write pixel data (see class Imf::OutputFile) - //--------------------------------------------- - - void writePixels (int numScanLines = 1); - int currentScanLine () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - const FrameBuffer & frameBuffer () const; - const IMATH_NAMESPACE::Box2i & displayWindow () const; - const IMATH_NAMESPACE::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const IMATH_NAMESPACE::V2f screenWindowCenter () const; - float screenWindowWidth () const; - LineOrder lineOrder () const; - Compression compression () const; - RgbaChannels channels () const; - - - // -------------------------------------------------------------------- - // Update the preview image (see Imf::OutputFile::updatePreviewImage()) - // -------------------------------------------------------------------- - - void updatePreviewImage (const PreviewRgba[]); - - - //----------------------------------------------------------------------- - // Rounding control for luminance/chroma images: - // - // If the output file contains luminance and chroma channels (WRITE_YC - // or WRITE_YCA), then the the significands of the luminance and - // chroma values are rounded to roundY and roundC bits respectively (see - // function half::round()). Rounding improves compression with minimal - // image degradation, usually much less than the degradation caused by - // chroma subsampling. By default, roundY is 7, and roundC is 5. - // - // If the output file contains RGB channels or a luminance channel, - // without chroma, then no rounding is performed. - //----------------------------------------------------------------------- - - void setYCRounding (unsigned int roundY, - unsigned int roundC); - - - //---------------------------------------------------- - // Break a scan line -- for testing and debugging only - // (see Imf::OutputFile::updatePreviewImage() - // - // Warning: Calling this function usually results in a - // broken image file. The file or parts of it may not - // be readable, or the file may contain bad data. - // - //---------------------------------------------------- - - void breakScanLine (int y, - int offset, - int length, - char c); - private: - - RgbaOutputFile (const RgbaOutputFile &); // not implemented - RgbaOutputFile & operator = (const RgbaOutputFile &); // not implemented - - class ToYca; - - OutputFile * _outputFile; - ToYca * _toYca; -}; - - -// -// RGBA input file -// - -class IMF_EXPORT RgbaInputFile -{ - public: - - //------------------------------------------------------- - // Constructor -- opens the file with the specified name, - // destructor will automatically close the file. - //------------------------------------------------------- - - RgbaInputFile (const char name[], int numThreads = globalThreadCount()); - - - //----------------------------------------------------------- - // Constructor -- attaches the new RgbaInputFile object to a - // file that has already been opened by the caller. - // Destroying the RgbaInputFile object will not automatically - // close the file. - //----------------------------------------------------------- - - RgbaInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads = globalThreadCount()); - - - //-------------------------------------------------------------- - // Constructors -- the same as the previous two, but the names - // of the red, green, blue, alpha, luminance and chroma channels - // are expected to be layerName.R, layerName.G, etc. - //-------------------------------------------------------------- - - RgbaInputFile (const char name[], - const std::string &layerName, - int numThreads = globalThreadCount()); - - RgbaInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - const std::string &layerName, - int numThreads = globalThreadCount()); - - - //----------- - // Destructor - //----------- - - virtual ~RgbaInputFile (); - - - //----------------------------------------------------- - // Define a frame buffer as the pixel data destination: - // Pixel (x, y) is at address - // - // base + x * xStride + y * yStride - // - //----------------------------------------------------- - - void setFrameBuffer (Rgba *base, - size_t xStride, - size_t yStride); - - - //---------------------------------------------------------------- - // Switch to a different layer -- subsequent calls to readPixels() - // will read channels layerName.R, layerName.G, etc. - // After each call to setLayerName(), setFrameBuffer() must be - // called at least once before the next call to readPixels(). - //---------------------------------------------------------------- - - void setLayerName (const std::string &layerName); - - - //------------------------------------------- - // Read pixel data (see class Imf::InputFile) - //------------------------------------------- - - void readPixels (int scanLine1, int scanLine2); - void readPixels (int scanLine); - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - const FrameBuffer & frameBuffer () const; - const IMATH_NAMESPACE::Box2i & displayWindow () const; - const IMATH_NAMESPACE::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const IMATH_NAMESPACE::V2f screenWindowCenter () const; - float screenWindowWidth () const; - LineOrder lineOrder () const; - Compression compression () const; - RgbaChannels channels () const; - const char * fileName () const; - bool isComplete () const; - - - //---------------------------------- - // Access to the file format version - //---------------------------------- - - int version () const; - - private: - - RgbaInputFile (const RgbaInputFile &); // not implemented - RgbaInputFile & operator = (const RgbaInputFile &); // not implemented - - class FromYca; - - InputFile * _inputFile; - FromYca * _fromYca; - std::string _channelNamePrefix; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaYca.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaYca.cpp deleted file mode 100644 index c6212f3..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaYca.cpp +++ /dev/null @@ -1,497 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucasfilm -// Entertainment Company Ltd. Portions contributed and copyright held by -// others as indicated. 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 Industrial Light & Magic nor the names of -// any other contributors to this software may be used to endorse or -// promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -////////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// Conversion between RGBA and YCA data. -// -//----------------------------------------------------------------------------- - -#include -#include -#include - -using namespace IMATH_NAMESPACE; -using namespace std; -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -namespace RgbaYca { - - -V3f -computeYw (const Chromaticities &cr) -{ - M44f m = RGBtoXYZ (cr, 1); - return V3f (m[0][1], m[1][1], m[2][1]) / (m[0][1] + m[1][1] + m[2][1]); -} - - -void -RGBAtoYCA (const V3f &yw, - int n, - bool aIsValid, - const Rgba rgbaIn[/*n*/], - Rgba ycaOut[/*n*/]) -{ - for (int i = 0; i < n; ++i) - { - Rgba in = rgbaIn[i]; - Rgba &out = ycaOut[i]; - - // - // Conversion to YCA and subsequent chroma subsampling - // work only if R, G and B are finite and non-negative. - // - - if (!in.r.isFinite() || in.r < 0) - in.r = 0; - - if (!in.g.isFinite() || in.g < 0) - in.g = 0; - - if (!in.b.isFinite() || in.b < 0) - in.b = 0; - - if (in.r == in.g && in.g == in.b) - { - // - // Special case -- R, G and B are equal. To avoid rounding - // errors, we explicitly set the output luminance channel - // to G, and the chroma channels to 0. - // - // The special cases here and in YCAtoRGBA() ensure that - // converting black-and white images from RGBA to YCA and - // back is lossless. - // - - out.r = 0; - out.g = in.g; - out.b = 0; - } - else - { - out.g = in.r * yw.x + in.g * yw.y + in.b * yw.z; - - float Y = out.g; - - if (abs (in.r - Y) < HALF_MAX * Y) - out.r = (in.r - Y) / Y; - else - out.r = 0; - - if (abs (in.b - Y) < HALF_MAX * Y) - out.b = (in.b - Y) / Y; - else - out.b = 0; - } - - if (aIsValid) - out.a = in.a; - else - out.a = 1; - } -} - - -void -decimateChromaHoriz (int n, - const Rgba ycaIn[/*n+N-1*/], - Rgba ycaOut[/*n*/]) -{ - #ifdef DEBUG - assert (ycaIn != ycaOut); - #endif - - int begin = N2; - int end = begin + n; - - for (int i = begin, j = 0; i < end; ++i, ++j) - { - if ((j & 1) == 0) - { - ycaOut[j].r = ycaIn[i - 13].r * 0.001064f + - ycaIn[i - 11].r * -0.003771f + - ycaIn[i - 9].r * 0.009801f + - ycaIn[i - 7].r * -0.021586f + - ycaIn[i - 5].r * 0.043978f + - ycaIn[i - 3].r * -0.093067f + - ycaIn[i - 1].r * 0.313659f + - ycaIn[i ].r * 0.499846f + - ycaIn[i + 1].r * 0.313659f + - ycaIn[i + 3].r * -0.093067f + - ycaIn[i + 5].r * 0.043978f + - ycaIn[i + 7].r * -0.021586f + - ycaIn[i + 9].r * 0.009801f + - ycaIn[i + 11].r * -0.003771f + - ycaIn[i + 13].r * 0.001064f; - - ycaOut[j].b = ycaIn[i - 13].b * 0.001064f + - ycaIn[i - 11].b * -0.003771f + - ycaIn[i - 9].b * 0.009801f + - ycaIn[i - 7].b * -0.021586f + - ycaIn[i - 5].b * 0.043978f + - ycaIn[i - 3].b * -0.093067f + - ycaIn[i - 1].b * 0.313659f + - ycaIn[i ].b * 0.499846f + - ycaIn[i + 1].b * 0.313659f + - ycaIn[i + 3].b * -0.093067f + - ycaIn[i + 5].b * 0.043978f + - ycaIn[i + 7].b * -0.021586f + - ycaIn[i + 9].b * 0.009801f + - ycaIn[i + 11].b * -0.003771f + - ycaIn[i + 13].b * 0.001064f; - } - - ycaOut[j].g = ycaIn[i].g; - ycaOut[j].a = ycaIn[i].a; - } -} - - -void -decimateChromaVert (int n, - const Rgba * const ycaIn[N], - Rgba ycaOut[/*n*/]) -{ - for (int i = 0; i < n; ++i) - { - if ((i & 1) == 0) - { - ycaOut[i].r = ycaIn[ 0][i].r * 0.001064f + - ycaIn[ 2][i].r * -0.003771f + - ycaIn[ 4][i].r * 0.009801f + - ycaIn[ 6][i].r * -0.021586f + - ycaIn[ 8][i].r * 0.043978f + - ycaIn[10][i].r * -0.093067f + - ycaIn[12][i].r * 0.313659f + - ycaIn[13][i].r * 0.499846f + - ycaIn[14][i].r * 0.313659f + - ycaIn[16][i].r * -0.093067f + - ycaIn[18][i].r * 0.043978f + - ycaIn[20][i].r * -0.021586f + - ycaIn[22][i].r * 0.009801f + - ycaIn[24][i].r * -0.003771f + - ycaIn[26][i].r * 0.001064f; - - ycaOut[i].b = ycaIn[ 0][i].b * 0.001064f + - ycaIn[ 2][i].b * -0.003771f + - ycaIn[ 4][i].b * 0.009801f + - ycaIn[ 6][i].b * -0.021586f + - ycaIn[ 8][i].b * 0.043978f + - ycaIn[10][i].b * -0.093067f + - ycaIn[12][i].b * 0.313659f + - ycaIn[13][i].b * 0.499846f + - ycaIn[14][i].b * 0.313659f + - ycaIn[16][i].b * -0.093067f + - ycaIn[18][i].b * 0.043978f + - ycaIn[20][i].b * -0.021586f + - ycaIn[22][i].b * 0.009801f + - ycaIn[24][i].b * -0.003771f + - ycaIn[26][i].b * 0.001064f; - } - - ycaOut[i].g = ycaIn[13][i].g; - ycaOut[i].a = ycaIn[13][i].a; - } -} - - -void -roundYCA (int n, - unsigned int roundY, - unsigned int roundC, - const Rgba ycaIn[/*n*/], - Rgba ycaOut[/*n*/]) -{ - for (int i = 0; i < n; ++i) - { - ycaOut[i].g = ycaIn[i].g.round (roundY); - ycaOut[i].a = ycaIn[i].a; - - if ((i & 1) == 0) - { - ycaOut[i].r = ycaIn[i].r.round (roundC); - ycaOut[i].b = ycaIn[i].b.round (roundC); - } - } -} - - -void -reconstructChromaHoriz (int n, - const Rgba ycaIn[/*n+N-1*/], - Rgba ycaOut[/*n*/]) -{ - #ifdef DEBUG - assert (ycaIn != ycaOut); - #endif - - int begin = N2; - int end = begin + n; - - for (int i = begin, j = 0; i < end; ++i, ++j) - { - if (j & 1) - { - ycaOut[j].r = ycaIn[i - 13].r * 0.002128f + - ycaIn[i - 11].r * -0.007540f + - ycaIn[i - 9].r * 0.019597f + - ycaIn[i - 7].r * -0.043159f + - ycaIn[i - 5].r * 0.087929f + - ycaIn[i - 3].r * -0.186077f + - ycaIn[i - 1].r * 0.627123f + - ycaIn[i + 1].r * 0.627123f + - ycaIn[i + 3].r * -0.186077f + - ycaIn[i + 5].r * 0.087929f + - ycaIn[i + 7].r * -0.043159f + - ycaIn[i + 9].r * 0.019597f + - ycaIn[i + 11].r * -0.007540f + - ycaIn[i + 13].r * 0.002128f; - - ycaOut[j].b = ycaIn[i - 13].b * 0.002128f + - ycaIn[i - 11].b * -0.007540f + - ycaIn[i - 9].b * 0.019597f + - ycaIn[i - 7].b * -0.043159f + - ycaIn[i - 5].b * 0.087929f + - ycaIn[i - 3].b * -0.186077f + - ycaIn[i - 1].b * 0.627123f + - ycaIn[i + 1].b * 0.627123f + - ycaIn[i + 3].b * -0.186077f + - ycaIn[i + 5].b * 0.087929f + - ycaIn[i + 7].b * -0.043159f + - ycaIn[i + 9].b * 0.019597f + - ycaIn[i + 11].b * -0.007540f + - ycaIn[i + 13].b * 0.002128f; - } - else - { - ycaOut[j].r = ycaIn[i].r; - ycaOut[j].b = ycaIn[i].b; - } - - ycaOut[j].g = ycaIn[i].g; - ycaOut[j].a = ycaIn[i].a; - } -} - - -void -reconstructChromaVert (int n, - const Rgba * const ycaIn[N], - Rgba ycaOut[/*n*/]) -{ - for (int i = 0; i < n; ++i) - { - ycaOut[i].r = ycaIn[ 0][i].r * 0.002128f + - ycaIn[ 2][i].r * -0.007540f + - ycaIn[ 4][i].r * 0.019597f + - ycaIn[ 6][i].r * -0.043159f + - ycaIn[ 8][i].r * 0.087929f + - ycaIn[10][i].r * -0.186077f + - ycaIn[12][i].r * 0.627123f + - ycaIn[14][i].r * 0.627123f + - ycaIn[16][i].r * -0.186077f + - ycaIn[18][i].r * 0.087929f + - ycaIn[20][i].r * -0.043159f + - ycaIn[22][i].r * 0.019597f + - ycaIn[24][i].r * -0.007540f + - ycaIn[26][i].r * 0.002128f; - - ycaOut[i].b = ycaIn[ 0][i].b * 0.002128f + - ycaIn[ 2][i].b * -0.007540f + - ycaIn[ 4][i].b * 0.019597f + - ycaIn[ 6][i].b * -0.043159f + - ycaIn[ 8][i].b * 0.087929f + - ycaIn[10][i].b * -0.186077f + - ycaIn[12][i].b * 0.627123f + - ycaIn[14][i].b * 0.627123f + - ycaIn[16][i].b * -0.186077f + - ycaIn[18][i].b * 0.087929f + - ycaIn[20][i].b * -0.043159f + - ycaIn[22][i].b * 0.019597f + - ycaIn[24][i].b * -0.007540f + - ycaIn[26][i].b * 0.002128f; - - ycaOut[i].g = ycaIn[13][i].g; - ycaOut[i].a = ycaIn[13][i].a; - } -} - - -void -YCAtoRGBA (const IMATH_NAMESPACE::V3f &yw, - int n, - const Rgba ycaIn[/*n*/], - Rgba rgbaOut[/*n*/]) -{ - for (int i = 0; i < n; ++i) - { - const Rgba &in = ycaIn[i]; - Rgba &out = rgbaOut[i]; - - if (in.r == 0 && in.b == 0) - { - // - // Special case -- both chroma channels are 0. To avoid - // rounding errors, we explicitly set the output R, G and B - // channels equal to the input luminance. - // - // The special cases here and in RGBAtoYCA() ensure that - // converting black-and white images from RGBA to YCA and - // back is lossless. - // - - out.r = in.g; - out.g = in.g; - out.b = in.g; - out.a = in.a; - } - else - { - float Y = in.g; - float r = (in.r + 1) * Y; - float b = (in.b + 1) * Y; - float g = (Y - r * yw.x - b * yw.z) / yw.y; - - out.r = r; - out.g = g; - out.b = b; - out.a = in.a; - } - } -} - - -namespace { - -inline float -saturation (const Rgba &in) -{ - float rgbMax = max (in.r, max (in.g, in.b)); - float rgbMin = min (in.r, min (in.g, in.b)); - - if (rgbMax > 0) - return 1 - rgbMin / rgbMax; - else - return 0; -} - - -void -desaturate (const Rgba &in, float f, const V3f &yw, Rgba &out) -{ - float rgbMax = max (in.r, max (in.g, in.b)); - - out.r = max (float (rgbMax - (rgbMax - in.r) * f), 0.0f); - out.g = max (float (rgbMax - (rgbMax - in.g) * f), 0.0f); - out.b = max (float (rgbMax - (rgbMax - in.b) * f), 0.0f); - out.a = in.a; - - float Yin = in.r * yw.x + in.g * yw.y + in.b * yw.z; - float Yout = out.r * yw.x + out.g * yw.y + out.b * yw.z; - - if (Yout > 0) - { - out.r *= Yin / Yout; - out.g *= Yin / Yout; - out.b *= Yin / Yout; - } -} - -} // namespace - - -void -fixSaturation (const IMATH_NAMESPACE::V3f &yw, - int n, - const Rgba * const rgbaIn[3], - Rgba rgbaOut[/*n*/]) -{ - float neighborA2 = saturation (rgbaIn[0][0]); - float neighborA1 = neighborA2; - - float neighborB2 = saturation (rgbaIn[2][0]); - float neighborB1 = neighborB2; - - for (int i = 0; i < n; ++i) - { - float neighborA0 = neighborA1; - neighborA1 = neighborA2; - - float neighborB0 = neighborB1; - neighborB1 = neighborB2; - - if (i < n - 1) - { - neighborA2 = saturation (rgbaIn[0][i + 1]); - neighborB2 = saturation (rgbaIn[2][i + 1]); - } - - // - // A0 A1 A2 - // rgbaOut[i] - // B0 B1 B2 - // - - float sMean = min (1.0f, 0.25f * (neighborA0 + neighborA2 + - neighborB0 + neighborB2)); - - const Rgba &in = rgbaIn[1][i]; - Rgba &out = rgbaOut[i]; - - float s = saturation (in); - - if (s > sMean) - { - float sMax = min (1.0f, 1 - (1 - sMean) * 0.25f); - - if (s > sMax) - { - desaturate (in, sMax / s, yw, out); - continue; - } - } - - out = in; - } -} - -} // namespace RgbaYca -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaYca.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaYca.h deleted file mode 100644 index c4c6775..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaYca.h +++ /dev/null @@ -1,259 +0,0 @@ -#ifndef INCLUDED_IMF_RGBA_YCA_H -#define INCLUDED_IMF_RGBA_YCA_H - -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucasfilm -// Entertainment Company Ltd. Portions contributed and copyright held by -// others as indicated. 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 Industrial Light & Magic nor the names of -// any other contributors to this software may be used to endorse or -// promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -////////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// Conversion between RGBA (red, green, blue alpha) -// and YCA (luminance, subsampled chroma, alpha) data: -// -// Luminance, Y, is computed as a weighted sum of R, G, and B: -// -// Y = yw.x * R + yw.y * G + yw.z * B -// -// Function computeYw() computes a set of RGB-to-Y weights, yw, -// from a set of primary and white point chromaticities. -// -// Chroma, C, consists of two components, RY and BY: -// -// RY = (R - Y) / Y -// BY = (B - Y) / Y -// -// For efficiency, the x and y subsampling rates for chroma are -// hardwired to 2, and the chroma subsampling and reconstruction -// filters are fixed 27-pixel wide windowed sinc functions. -// -// Starting with an image that has RGBA data for all pixels, -// -// RGBA RGBA RGBA RGBA ... RGBA RGBA -// RGBA RGBA RGBA RGBA ... RGBA RGBA -// RGBA RGBA RGBA RGBA ... RGBA RGBA -// RGBA RGBA RGBA RGBA ... RGBA RGBA -// ... -// RGBA RGBA RGBA RGBA ... RGBA RGBA -// RGBA RGBA RGBA RGBA ... RGBA RGBA -// -// function RGBAtoYCA() converts the pixels to YCA format: -// -// YCA YCA YCA YCA ... YCA YCA -// YCA YCA YCA YCA ... YCA YCA -// YCA YCA YCA YCA ... YCA YCA -// YCA YCA YCA YCA ... YCA YCA -// ... -// YCA YCA YCA YCA ... YCA YCA -// YCA YCA YCA YCA ... YCA YCA -// -// Next, decimateChomaHoriz() eliminates the chroma values from -// the odd-numbered pixels in every scan line: -// -// YCA YA YCA YA ... YCA YA -// YCA YA YCA YA ... YCA YA -// YCA YA YCA YA ... YCA YA -// YCA YA YCA YA ... YCA YA -// ... -// YCA YA YCA YA ... YCA YA -// YCA YA YCA YA ... YCA YA -// -// decimateChromaVert() eliminates all chroma values from the -// odd-numbered scan lines: -// -// YCA YA YCA YA ... YCA YA -// YA YA YA YA ... YA YA -// YCA YA YCA YA ... YCA YA -// YA YA YA YA ... YA YA -// ... -// YCA YA YCA YA ... YCA YA -// YA YA YA YA ... YA YA -// -// Finally, roundYCA() reduces the precision of the luminance -// and chroma values so that the pixel data shrink more when -// they are saved in a compressed file. -// -// The output of roundYCA() can be converted back to a set -// of RGBA pixel data that is visually very similar to the -// original RGBA image, by calling reconstructChromaHoriz(), -// reconstructChromaVert(), YCAtoRGBA(), and finally -// fixSaturation(). -// -//----------------------------------------------------------------------------- - -#include "ImfRgba.h" -#include "ImfChromaticities.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -namespace RgbaYca { - - -// -// Width of the chroma subsampling and reconstruction filters -// - -static const int N = 27; -static const int N2 = N / 2; - - -// -// Convert a set of primary chromaticities into a set of weighting -// factors for computing a pixels's luminance, Y, from R, G and B -// - -IMF_EXPORT -IMATH_NAMESPACE::V3f computeYw (const Chromaticities &cr); - - -// -// Convert an array of n RGBA pixels, rgbaIn, to YCA (luminance/chroma/alpha): -// -// ycaOut[i].g = Y (rgbaIn[i]); -// ycaOut[i].r = RY (rgbaIn[i]); -// ycaOut[i].b = BY (rgbaIn[i]); -// ycaOut[i].a = aIsValid? rgbaIn[i].a: 1 -// -// yw is a set of RGB-to-Y weighting factors, as computed by computeYw(). -// - -IMF_EXPORT -void RGBAtoYCA (const IMATH_NAMESPACE::V3f &yw, - int n, - bool aIsValid, - const Rgba rgbaIn[/*n*/], - Rgba ycaOut[/*n*/]); - -// -// Perform horizontal low-pass filtering and subsampling of -// the chroma channels of an array of n pixels. In order -// to avoid indexing off the ends of the input array during -// low-pass filtering, ycaIn must have N2 extra pixels at -// both ends. Before calling decimateChromaHoriz(), the extra -// pixels should be filled with copies of the first and last -// "real" input pixel. -// - -IMF_EXPORT -void decimateChromaHoriz (int n, - const Rgba ycaIn[/*n+N-1*/], - Rgba ycaOut[/*n*/]); - -// -// Perform vertical chroma channel low-pass filtering and subsampling. -// N scan lines of input pixels are combined into a single scan line -// of output pixels. -// - -IMF_EXPORT -void decimateChromaVert (int n, - const Rgba * const ycaIn[N], - Rgba ycaOut[/*n*/]); - -// -// Round the luminance and chroma channels of an array of YCA -// pixels that has already been filtered and subsampled. -// The signifcands of the pixels' luminance and chroma values -// are rounded to roundY and roundC bits respectively. -// - -IMF_EXPORT -void roundYCA (int n, - unsigned int roundY, - unsigned int roundC, - const Rgba ycaIn[/*n*/], - Rgba ycaOut[/*n*/]); - -// -// For a scan line that has valid chroma data only for every other pixel, -// reconstruct the missing chroma values. -// - -IMF_EXPORT -void reconstructChromaHoriz (int n, - const Rgba ycaIn[/*n+N-1*/], - Rgba ycaOut[/*n*/]); - -// -// For a scan line that has only luminance and no valid chroma data, -// reconstruct chroma from the surronding N scan lines. -// - -IMF_EXPORT -void reconstructChromaVert (int n, - const Rgba * const ycaIn[N], - Rgba ycaOut[/*n*/]); - -// -// Convert an array of n YCA (luminance/chroma/alpha) pixels to RGBA. -// This function is the inverse of RGBAtoYCA(). -// yw is a set of RGB-to-Y weighting factors, as computed by computeYw(). -// - -IMF_EXPORT -void YCAtoRGBA (const IMATH_NAMESPACE::V3f &yw, - int n, - const Rgba ycaIn[/*n*/], - Rgba rgbaOut[/*n*/]); - -// -// Eliminate super-saturated pixels: -// -// Converting an image from RGBA to YCA, low-pass filtering chroma, -// and converting the result back to RGBA can produce pixels with -// super-saturated colors, where one or two of the RGB components -// become zero or negative. (The low-pass and reconstruction filters -// introduce some amount of ringing into the chroma components. -// This can lead to negative RGB values near high-contrast edges.) -// -// The fixSaturation() function finds super-saturated pixels and -// corrects them by desaturating their colors while maintaining -// their luminance. fixSaturation() takes three adjacent input -// scan lines, rgbaIn[0], rgbaIn[1], rgbaIn[2], adjusts the -// saturation of rgbaIn[1], and stores the result in rgbaOut. -// - -IMF_EXPORT -void fixSaturation (const IMATH_NAMESPACE::V3f &yw, - int n, - const Rgba * const rgbaIn[3], - Rgba rgbaOut[/*n*/]); - -} // namespace RgbaYca -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRle.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRle.cpp deleted file mode 100644 index 7be6ac4..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRle.cpp +++ /dev/null @@ -1,157 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include -#include "ImfRle.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -namespace { - -const int MIN_RUN_LENGTH = 3; -const int MAX_RUN_LENGTH = 127; - -} - -// -// Compress an array of bytes, using run-length encoding, -// and return the length of the compressed data. -// - -int -rleCompress (int inLength, const char in[], signed char out[]) -{ - const char *inEnd = in + inLength; - const char *runStart = in; - const char *runEnd = in + 1; - signed char *outWrite = out; - - while (runStart < inEnd) - { - while (runEnd < inEnd && - *runStart == *runEnd && - runEnd - runStart - 1 < MAX_RUN_LENGTH) - { - ++runEnd; - } - - if (runEnd - runStart >= MIN_RUN_LENGTH) - { - // - // Compressable run - // - - *outWrite++ = (runEnd - runStart) - 1; - *outWrite++ = *(signed char *) runStart; - runStart = runEnd; - } - else - { - // - // Uncompressable run - // - - while (runEnd < inEnd && - ((runEnd + 1 >= inEnd || - *runEnd != *(runEnd + 1)) || - (runEnd + 2 >= inEnd || - *(runEnd + 1) != *(runEnd + 2))) && - runEnd - runStart < MAX_RUN_LENGTH) - { - ++runEnd; - } - - *outWrite++ = runStart - runEnd; - - while (runStart < runEnd) - { - *outWrite++ = *(signed char *) (runStart++); - } - } - - ++runEnd; - } - - return outWrite - out; -} - - -// -// Uncompress an array of bytes compressed with rleCompress(). -// Returns the length of the oncompressed data, or 0 if the -// length of the uncompressed data would be more than maxLength. -// - -int -rleUncompress (int inLength, int maxLength, const signed char in[], char out[]) -{ - char *outStart = out; - - while (inLength > 0) - { - if (*in < 0) - { - int count = -((int)*in++); - inLength -= count + 1; - - if (0 > (maxLength -= count)) - return 0; - - memcpy(out, in, count); - out += count; - in += count; - } - else - { - int count = *in++; - inLength -= 2; - - if (0 > (maxLength -= count + 1)) - return 0; - - memset(out, *(char*)in, count+1); - out += count+1; - - in++; - } - } - - return out - outStart; -} - - - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRle.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRle.h deleted file mode 100644 index 0def336..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRle.h +++ /dev/null @@ -1,63 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_RLE_H_ -#define INCLUDED_IMF_RLE_H_ - -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -// -// Compress an array of bytes, using run-length encoding, -// and return the length of the compressed data. -// - -IMF_EXPORT -int rleCompress (int inLength, const char in[], signed char out[]); - -// -// Uncompress an array of bytes compressed with rleCompress(). -// Returns the length of the uncompressed data, or 0 if the -// length of the uncompressed data would be more than maxLength. -// - -IMF_EXPORT -int rleUncompress (int inLength, int maxLength, - const signed char in[], char out[]); - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRleCompressor.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRleCompressor.cpp deleted file mode 100644 index 33914e8..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRleCompressor.cpp +++ /dev/null @@ -1,220 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class RleCompressor -// -//----------------------------------------------------------------------------- - -#include "ImfRleCompressor.h" -#include "ImfCheckedArithmetic.h" -#include "ImfRle.h" -#include "Iex.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -RleCompressor::RleCompressor (const Header &hdr, size_t maxScanLineSize): - Compressor (hdr), - _maxScanLineSize (maxScanLineSize), - _tmpBuffer (0), - _outBuffer (0) -{ - _tmpBuffer = new char [maxScanLineSize]; - _outBuffer = new char [uiMult (maxScanLineSize, size_t (3)) / 2]; -} - - -RleCompressor::~RleCompressor () -{ - delete [] _tmpBuffer; - delete [] _outBuffer; -} - - -int -RleCompressor::numScanLines () const -{ - // - // This compressor compresses individual scan lines. - // - - return 1; -} - - -int -RleCompressor::compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) -{ - // - // Special case �- empty input buffer - // - - if (inSize == 0) - { - outPtr = _outBuffer; - return 0; - } - - // - // Reorder the pixel data. - // - - { - char *t1 = _tmpBuffer; - char *t2 = _tmpBuffer + (inSize + 1) / 2; - const char *stop = inPtr + inSize; - - while (true) - { - if (inPtr < stop) - *(t1++) = *(inPtr++); - else - break; - - if (inPtr < stop) - *(t2++) = *(inPtr++); - else - break; - } - } - - // - // Predictor. - // - - { - unsigned char *t = (unsigned char *) _tmpBuffer + 1; - unsigned char *stop = (unsigned char *) _tmpBuffer + inSize; - int p = t[-1]; - - while (t < stop) - { - int d = int (t[0]) - p + (128 + 256); - p = t[0]; - t[0] = d; - ++t; - } - } - - // - // Run-length encode the data. - // - - outPtr = _outBuffer; - return rleCompress (inSize, _tmpBuffer, (signed char *) _outBuffer); -} - - -int -RleCompressor::uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) -{ - // - // Special case �- empty input buffer - // - - if (inSize == 0) - { - outPtr = _outBuffer; - return 0; - } - - // - // Decode the run-length encoded data - // - - int outSize; - - if (0 == (outSize = rleUncompress (inSize, _maxScanLineSize, - (const signed char *) inPtr, - _tmpBuffer))) - { - throw IEX_NAMESPACE::InputExc ("Data decoding (rle) failed."); - } - - // - // Predictor. - // - - { - unsigned char *t = (unsigned char *) _tmpBuffer + 1; - unsigned char *stop = (unsigned char *) _tmpBuffer + outSize; - - while (t < stop) - { - int d = int (t[-1]) + int (t[0]) - 128; - t[0] = d; - ++t; - } - } - - // - // Reorder the pixel data. - // - - { - const char *t1 = _tmpBuffer; - const char *t2 = _tmpBuffer + (outSize + 1) / 2; - char *s = _outBuffer; - char *stop = s + outSize; - - while (true) - { - if (s < stop) - *(s++) = *(t1++); - else - break; - - if (s < stop) - *(s++) = *(t2++); - else - break; - } - } - - outPtr = _outBuffer; - return outSize; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRleCompressor.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRleCompressor.h deleted file mode 100644 index af3d30e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfRleCompressor.h +++ /dev/null @@ -1,80 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_RLE_COMPRESSOR_H -#define INCLUDED_IMF_RLE_COMPRESSOR_H - -//----------------------------------------------------------------------------- -// -// class RleCompressor -- performs run-length encoding -// -//----------------------------------------------------------------------------- - -#include "ImfCompressor.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT RleCompressor: public Compressor -{ - public: - - RleCompressor (const Header &hdr, size_t maxScanLineSize); - virtual ~RleCompressor (); - - virtual int numScanLines () const; - - virtual int compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - - virtual int uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - private: - - int _maxScanLineSize; - char * _tmpBuffer; - char * _outBuffer; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp deleted file mode 100644 index 9e13b9f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp +++ /dev/null @@ -1,1702 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class ScanLineInputFile -// -//----------------------------------------------------------------------------- - -#include "ImfScanLineInputFile.h" -#include "ImfChannelList.h" -#include "ImfMisc.h" -#include "ImfStdIO.h" -#include "ImfCompressor.h" -#include "ImathBox.h" -#include "ImathFun.h" -#include -#include -#include -#include -#include "IlmThreadPool.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" -#include "Iex.h" -#include "ImfVersion.h" -#include "ImfOptimizedPixelReading.h" -#include "ImfNamespace.h" -#include "ImfStandardAttributes.h" - -#include -#include -#include -#include -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::divp; -using IMATH_NAMESPACE::modp; -using std::string; -using std::vector; -using std::ifstream; -using std::min; -using std::max; -using std::sort; -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; -using ILMTHREAD_NAMESPACE::Semaphore; -using ILMTHREAD_NAMESPACE::Task; -using ILMTHREAD_NAMESPACE::TaskGroup; -using ILMTHREAD_NAMESPACE::ThreadPool; - -namespace { - -struct InSliceInfo -{ - PixelType typeInFrameBuffer; - PixelType typeInFile; - char * base; - size_t xStride; - size_t yStride; - int xSampling; - int ySampling; - bool fill; - bool skip; - double fillValue; - - InSliceInfo (PixelType typeInFrameBuffer = HALF, - PixelType typeInFile = HALF, - char *base = 0, - size_t xStride = 0, - size_t yStride = 0, - int xSampling = 1, - int ySampling = 1, - bool fill = false, - bool skip = false, - double fillValue = 0.0); -}; - - -InSliceInfo::InSliceInfo (PixelType tifb, - PixelType tifl, - char *b, - size_t xs, size_t ys, - int xsm, int ysm, - bool f, bool s, - double fv) -: - typeInFrameBuffer (tifb), - typeInFile (tifl), - base (b), - xStride (xs), - yStride (ys), - xSampling (xsm), - ySampling (ysm), - fill (f), - skip (s), - fillValue (fv) -{ - // empty -} - - -struct LineBuffer -{ - const char * uncompressedData; - char * buffer; - int dataSize; - int minY; - int maxY; - Compressor * compressor; - Compressor::Format format; - int number; - bool hasException; - string exception; - - LineBuffer (Compressor * const comp); - ~LineBuffer (); - - inline void wait () {_sem.wait();} - inline void post () {_sem.post();} - - private: - - Semaphore _sem; -}; - - -LineBuffer::LineBuffer (Compressor *comp): - uncompressedData (0), - buffer (0), - dataSize (0), - compressor (comp), - format (defaultFormat(compressor)), - number (-1), - hasException (false), - exception (), - _sem (1) -{ - // empty -} - - -LineBuffer::~LineBuffer () -{ - delete compressor; -} - -/// helper struct used to detect the order that the channels are stored - -struct sliceOptimizationData -{ - const char * base; ///< pointer to pixel data - bool fill; ///< is this channel being filled with constant, instead of read? - half fillValue; ///< if filling, the value to use - size_t offset; ///< position this channel will be in the read buffer, accounting for previous channels, as well as their type - PixelType type; ///< type of channel - size_t xStride; ///< x-stride of channel in buffer (must be set to cause channels to interleave) - size_t yStride; ///< y-stride of channel in buffer (must be same in all channels, else order will change, which is bad) - int xSampling; ///< channel x sampling - int ySampling; ///< channel y sampling - - - /// we need to keep the list sorted in the order they'll be written to memory - bool operator<(const sliceOptimizationData& other ) const - { - return base < other.base; - } -}; - - -} // namespace - - -struct ScanLineInputFile::Data: public Mutex -{ - Header header; // the image header - int version; // file's version - FrameBuffer frameBuffer; // framebuffer to write into - LineOrder lineOrder; // order of the scanlines in file - int minX; // data window's min x coord - int maxX; // data window's max x coord - int minY; // data window's min y coord - int maxY; // data window's max x coord - vector lineOffsets; // stores offsets in file for - // each line - bool fileIsComplete; // True if no scanlines are missing - // in the file - int nextLineBufferMinY; // minimum y of the next linebuffer - vector bytesPerLine; // combined size of a line over all - // channels - vector offsetInLineBuffer; // offset for each scanline in its - // linebuffer - vector slices; // info about channels in file - - vector lineBuffers; // each holds one line buffer - int linesInBuffer; // number of scanlines each buffer - // holds - size_t lineBufferSize; // size of the line buffer - int partNumber; // part number - - bool memoryMapped; // if the stream is memory mapped - OptimizationMode optimizationMode; // optimizibility of the input file - vector optimizationData; ///< channel ordering for optimized reading - - Data (int numThreads); - ~Data (); - - inline LineBuffer * getLineBuffer (int number); // hash function from line - // buffer indices into our - // vector of line buffers - - -}; - - -ScanLineInputFile::Data::Data (int numThreads): - partNumber(-1), - memoryMapped(false) -{ - // - // We need at least one lineBuffer, but if threading is used, - // to keep n threads busy we need 2*n lineBuffers - // - - lineBuffers.resize (max (1, 2 * numThreads)); -} - - -ScanLineInputFile::Data::~Data () -{ - for (size_t i = 0; i < lineBuffers.size(); i++) - delete lineBuffers[i]; -} - - -inline LineBuffer * -ScanLineInputFile::Data::getLineBuffer (int lineBufferNumber) -{ - return lineBuffers[lineBufferNumber % lineBuffers.size()]; -} - - -namespace { - - -void -reconstructLineOffsets (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - LineOrder lineOrder, - vector &lineOffsets) -{ - Int64 position = is.tellg(); - - try - { - for (unsigned int i = 0; i < lineOffsets.size(); i++) - { - Int64 lineOffset = is.tellg(); - - int y; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, y); - - int dataSize; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, dataSize); - - Xdr::skip (is, dataSize); - - if (lineOrder == INCREASING_Y) - lineOffsets[i] = lineOffset; - else - lineOffsets[lineOffsets.size() - i - 1] = lineOffset; - } - } - catch (...) - { - // - // Suppress all exceptions. This functions is - // called only to reconstruct the line offset - // table for incomplete files, and exceptions - // are likely. - // - } - - is.clear(); - is.seekg (position); -} - - -void -readLineOffsets (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - LineOrder lineOrder, - vector &lineOffsets, - bool &complete) -{ - for (unsigned int i = 0; i < lineOffsets.size(); i++) - { - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, lineOffsets[i]); - } - - complete = true; - - for (unsigned int i = 0; i < lineOffsets.size(); i++) - { - if (lineOffsets[i] <= 0) - { - // - // Invalid data in the line offset table mean that - // the file is probably incomplete (the table is - // the last thing written to the file). Either - // some process is still busy writing the file, - // or writing the file was aborted. - // - // We should still be able to read the existing - // parts of the file. In order to do this, we - // have to make a sequential scan over the scan - // line data to reconstruct the line offset table. - // - - complete = false; - reconstructLineOffsets (is, lineOrder, lineOffsets); - break; - } - } -} - - -void -readPixelData (InputStreamMutex *streamData, - ScanLineInputFile::Data *ifd, - int minY, - char *&buffer, - int &dataSize) -{ - // - // Read a single line buffer from the input file. - // - // If the input file is not memory-mapped, we copy the pixel data into - // into the array pointed to by buffer. If the file is memory-mapped, - // then we change where buffer points to instead of writing into the - // array (hence buffer needs to be a reference to a char *). - // - - int lineBufferNumber = (minY - ifd->minY) / ifd->linesInBuffer; - - Int64 lineOffset = ifd->lineOffsets[lineBufferNumber]; - - if (lineOffset == 0) - THROW (IEX_NAMESPACE::InputExc, "Scan line " << minY << " is missing."); - - // - // Seek to the start of the scan line in the file, - // if necessary. - // - - if ( !isMultiPart(ifd->version) ) - { - if (ifd->nextLineBufferMinY != minY) - streamData->is->seekg (lineOffset); - } - else - { - // - // In a multi-part file, the file pointer may have been moved by - // other parts, so we have to ask tellg() where we are. - // - if (streamData->is->tellg() != ifd->lineOffsets[lineBufferNumber]) - streamData->is->seekg (lineOffset); - } - - // - // Read the data block's header. - // - - int yInFile; - - // - // Read the part number when we are dealing with a multi-part file. - // - if (isMultiPart(ifd->version)) - { - int partNumber; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, partNumber); - if (partNumber != ifd->partNumber) - { - THROW (IEX_NAMESPACE::ArgExc, "Unexpected part number " << partNumber - << ", should be " << ifd->partNumber << "."); - } - } - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, yInFile); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, dataSize); - - if (yInFile != minY) - throw IEX_NAMESPACE::InputExc ("Unexpected data block y coordinate."); - - if (dataSize > (int) ifd->lineBufferSize) - throw IEX_NAMESPACE::InputExc ("Unexpected data block length."); - - // - // Read the pixel data. - // - - if (streamData->is->isMemoryMapped ()) - buffer = streamData->is->readMemoryMapped (dataSize); - else - streamData->is->read (buffer, dataSize); - - // - // Keep track of which scan line is the next one in - // the file, so that we can avoid redundant seekg() - // operations (seekg() can be fairly expensive). - // - - if (ifd->lineOrder == INCREASING_Y) - ifd->nextLineBufferMinY = minY + ifd->linesInBuffer; - else - ifd->nextLineBufferMinY = minY - ifd->linesInBuffer; -} - - - -// -// A LineBufferTask encapsulates the task uncompressing a set of -// scanlines (line buffer) and copying them into the frame buffer. -// - -class LineBufferTask : public Task -{ - public: - - LineBufferTask (TaskGroup *group, - ScanLineInputFile::Data *ifd, - LineBuffer *lineBuffer, - int scanLineMin, - int scanLineMax, - OptimizationMode optimizationMode); - - virtual ~LineBufferTask (); - - virtual void execute (); - - private: - - ScanLineInputFile::Data * _ifd; - LineBuffer * _lineBuffer; - int _scanLineMin; - int _scanLineMax; - OptimizationMode _optimizationMode; -}; - - -LineBufferTask::LineBufferTask - (TaskGroup *group, - ScanLineInputFile::Data *ifd, - LineBuffer *lineBuffer, - int scanLineMin, - int scanLineMax,OptimizationMode optimizationMode) -: - Task (group), - _ifd (ifd), - _lineBuffer (lineBuffer), - _scanLineMin (scanLineMin), - _scanLineMax (scanLineMax), - _optimizationMode(optimizationMode) -{ - // empty -} - - -LineBufferTask::~LineBufferTask () -{ - // - // Signal that the line buffer is now free - // - - _lineBuffer->post (); -} - - -void -LineBufferTask::execute () -{ - try - { - // - // Uncompress the data, if necessary - // - - if (_lineBuffer->uncompressedData == 0) - { - int uncompressedSize = 0; - int maxY = min (_lineBuffer->maxY, _ifd->maxY); - - for (int i = _lineBuffer->minY - _ifd->minY; - i <= maxY - _ifd->minY; - ++i) - { - uncompressedSize += (int) _ifd->bytesPerLine[i]; - } - - if (_lineBuffer->compressor && - _lineBuffer->dataSize < uncompressedSize) - { - _lineBuffer->format = _lineBuffer->compressor->format(); - - _lineBuffer->dataSize = _lineBuffer->compressor->uncompress - (_lineBuffer->buffer, - _lineBuffer->dataSize, - _lineBuffer->minY, - _lineBuffer->uncompressedData); - } - else - { - // - // If the line is uncompressed, it's in XDR format, - // regardless of the compressor's output format. - // - - _lineBuffer->format = Compressor::XDR; - _lineBuffer->uncompressedData = _lineBuffer->buffer; - } - } - - int yStart, yStop, dy; - - if (_ifd->lineOrder == INCREASING_Y) - { - yStart = _scanLineMin; - yStop = _scanLineMax + 1; - dy = 1; - } - else - { - yStart = _scanLineMax; - yStop = _scanLineMin - 1; - dy = -1; - } - - for (int y = yStart; y != yStop; y += dy) - { - // - // Convert one scan line's worth of pixel data back - // from the machine-independent representation, and - // store the result in the frame buffer. - // - - const char *readPtr = _lineBuffer->uncompressedData + - _ifd->offsetInLineBuffer[y - _ifd->minY]; - - // - // Iterate over all image channels. - // - - for (unsigned int i = 0; i < _ifd->slices.size(); ++i) - { - // - // Test if scan line y of this channel contains any data - // (the scan line contains data only if y % ySampling == 0). - // - - const InSliceInfo &slice = _ifd->slices[i]; - - if (modp (y, slice.ySampling) != 0) - continue; - - // - // Find the x coordinates of the leftmost and rightmost - // sampled pixels (i.e. pixels within the data window - // for which x % xSampling == 0). - // - - int dMinX = divp (_ifd->minX, slice.xSampling); - int dMaxX = divp (_ifd->maxX, slice.xSampling); - - // - // Fill the frame buffer with pixel data. - // - - if (slice.skip) - { - // - // The file contains data for this channel, but - // the frame buffer contains no slice for this channel. - // - - skipChannel (readPtr, slice.typeInFile, dMaxX - dMinX + 1); - } - else - { - // - // The frame buffer contains a slice for this channel. - // - - char *linePtr = slice.base + - divp (y, slice.ySampling) * - slice.yStride; - - char *writePtr = linePtr + dMinX * slice.xStride; - char *endPtr = linePtr + dMaxX * slice.xStride; - - copyIntoFrameBuffer (readPtr, writePtr, endPtr, - slice.xStride, slice.fill, - slice.fillValue, _lineBuffer->format, - slice.typeInFrameBuffer, - slice.typeInFile); - } - } - } - } - catch (std::exception &e) - { - if (!_lineBuffer->hasException) - { - _lineBuffer->exception = e.what(); - _lineBuffer->hasException = true; - } - } - catch (...) - { - if (!_lineBuffer->hasException) - { - _lineBuffer->exception = "unrecognized exception"; - _lineBuffer->hasException = true; - } - } -} - - -#ifdef IMF_HAVE_SSE2 -// -// IIF format is more restricted than a perfectly generic one, -// so it is possible to perform some optimizations. -// -class LineBufferTaskIIF : public Task -{ - public: - - LineBufferTaskIIF (TaskGroup *group, - ScanLineInputFile::Data *ifd, - LineBuffer *lineBuffer, - int scanLineMin, - int scanLineMax, - OptimizationMode optimizationMode); - - virtual ~LineBufferTaskIIF (); - - virtual void execute (); - - template - void getWritePointer (int y, - unsigned short*& pOutWritePointerRight, - size_t& outPixelsToCopySSE, - size_t& outPixelsToCopyNormal,int bank=0) const; - - template - void getWritePointerStereo (int y, - unsigned short*& outWritePointerRight, - unsigned short*& outWritePointerLeft, - size_t& outPixelsToCopySSE, - size_t& outPixelsToCopyNormal) const; - - private: - - ScanLineInputFile::Data * _ifd; - LineBuffer * _lineBuffer; - int _scanLineMin; - int _scanLineMax; - OptimizationMode _optimizationMode; - -}; - -LineBufferTaskIIF::LineBufferTaskIIF - (TaskGroup *group, - ScanLineInputFile::Data *ifd, - LineBuffer *lineBuffer, - int scanLineMin, - int scanLineMax, - OptimizationMode optimizationMode - ) - : - Task (group), - _ifd (ifd), - _lineBuffer (lineBuffer), - _scanLineMin (scanLineMin), - _scanLineMax (scanLineMax), - _optimizationMode (optimizationMode) -{ - /* - // - // indicates the optimised path has been taken - // - static bool could_optimise=false; - if(could_optimise==false) - { - std::cerr << " optimised path\n"; - could_optimise=true; - } - */ -} - -LineBufferTaskIIF::~LineBufferTaskIIF () -{ - // - // Signal that the line buffer is now free - // - - _lineBuffer->post (); -} - -// Return 0 if we are to skip because of sampling -// channelBank is 0 for the first group of channels, 1 for the second -template -void LineBufferTaskIIF::getWritePointer - (int y, - unsigned short*& outWritePointerRight, - size_t& outPixelsToCopySSE, - size_t& outPixelsToCopyNormal, - int channelBank - ) const -{ - // Channels are saved alphabetically, so the order is B G R. - // The last slice (R) will give us the location of our write pointer. - // The only slice that we support skipping is alpha, i.e. the first one. - // This does not impact the write pointer or the pixels to copy at all. - - size_t nbSlicesInBank = _ifd->optimizationData.size(); - - int sizeOfSingleValue = sizeof(TYPE); - - if(_ifd->optimizationData.size()>4) - { - // there are two banks - we only copy one at once - nbSlicesInBank/=2; - } - - - size_t firstChannel = 0; - if(channelBank==1) - { - firstChannel = _ifd->optimizationData.size()/2; - } - - sliceOptimizationData& firstSlice = _ifd->optimizationData[firstChannel]; - - if (modp (y, firstSlice.ySampling) != 0) - { - outPixelsToCopySSE = 0; - outPixelsToCopyNormal = 0; - outWritePointerRight = 0; - } - - const char* linePtr1 = firstSlice.base + - divp (y, firstSlice.ySampling) * - firstSlice.yStride; - - int dMinX1 = divp (_ifd->minX, firstSlice.xSampling); - int dMaxX1 = divp (_ifd->maxX, firstSlice.xSampling); - - // Construct the writePtr so that we start writing at - // linePtr + Min offset in the line. - outWritePointerRight = (unsigned short*)(linePtr1 + - dMinX1 * firstSlice.xStride ); - - size_t bytesToCopy = ((linePtr1 + dMaxX1 * firstSlice.xStride ) - - (linePtr1 + dMinX1 * firstSlice.xStride )) + 2; - size_t shortsToCopy = bytesToCopy / sizeOfSingleValue; - size_t pixelsToCopy = (shortsToCopy / nbSlicesInBank ) + 1; - - // We only support writing to SSE if we have no pixels to copy normally - outPixelsToCopySSE = pixelsToCopy / 8; - outPixelsToCopyNormal = pixelsToCopy % 8; - -} - - -template -void LineBufferTaskIIF::getWritePointerStereo - (int y, - unsigned short*& outWritePointerRight, - unsigned short*& outWritePointerLeft, - size_t& outPixelsToCopySSE, - size_t& outPixelsToCopyNormal) const -{ - getWritePointer(y,outWritePointerRight,outPixelsToCopySSE,outPixelsToCopyNormal,0); - - - if(outWritePointerRight) - { - getWritePointer(y,outWritePointerLeft,outPixelsToCopySSE,outPixelsToCopyNormal,1); - } - -} - -void -LineBufferTaskIIF::execute() -{ - try - { - // - // Uncompress the data, if necessary - // - - if (_lineBuffer->uncompressedData == 0) - { - int uncompressedSize = 0; - int maxY = min (_lineBuffer->maxY, _ifd->maxY); - - for (int i = _lineBuffer->minY - _ifd->minY; - i <= maxY - _ifd->minY; - ++i) - { - uncompressedSize += (int) _ifd->bytesPerLine[i]; - } - - if (_lineBuffer->compressor && - _lineBuffer->dataSize < uncompressedSize) - { - _lineBuffer->format = _lineBuffer->compressor->format(); - - _lineBuffer->dataSize = - _lineBuffer->compressor->uncompress (_lineBuffer->buffer, - _lineBuffer->dataSize, - _lineBuffer->minY, - _lineBuffer->uncompressedData); - } - else - { - // - // If the line is uncompressed, it's in XDR format, - // regardless of the compressor's output format. - // - - _lineBuffer->format = Compressor::XDR; - _lineBuffer->uncompressedData = _lineBuffer->buffer; - } - } - - int yStart, yStop, dy; - - if (_ifd->lineOrder == INCREASING_Y) - { - yStart = _scanLineMin; - yStop = _scanLineMax + 1; - dy = 1; - } - else - { - yStart = _scanLineMax; - yStop = _scanLineMin - 1; - dy = -1; - } - - for (int y = yStart; y != yStop; y += dy) - { - if (modp (y, _optimizationMode._ySampling) != 0) - continue; - - // - // Convert one scan line's worth of pixel data back - // from the machine-independent representation, and - // store the result in the frame buffer. - // - - // Set the readPtr to read at the start of uncompressedData - // but with an offet based on calculated array. - // _ifd->offsetInLineBuffer contains offsets based on which - // line we are currently processing. - // Stride will be taken into consideration later. - - - const char* readPtr = _lineBuffer->uncompressedData + - _ifd->offsetInLineBuffer[y - _ifd->minY]; - - size_t pixelsToCopySSE = 0; - size_t pixelsToCopyNormal = 0; - - unsigned short* writePtrLeft = 0; - unsigned short* writePtrRight = 0; - - size_t channels = _ifd->optimizationData.size(); - - if(channels>4) - { - getWritePointerStereo(y, writePtrRight, writePtrLeft, pixelsToCopySSE, pixelsToCopyNormal); - } - else - { - getWritePointer(y, writePtrRight, pixelsToCopySSE, pixelsToCopyNormal); - } - - if (writePtrRight == 0 && pixelsToCopySSE == 0 && pixelsToCopyNormal == 0) - { - continue; - } - - - // - // support reading up to eight channels - // - unsigned short* readPointers[8]; - - for (size_t i = 0; i < channels ; ++i) - { - readPointers[i] = (unsigned short*)readPtr + (_ifd->optimizationData[i].offset * (pixelsToCopySSE * 8 + pixelsToCopyNormal)); - } - - //RGB only - if(channels==3 || channels == 6 ) - { - optimizedWriteToRGB(readPointers[0], readPointers[1], readPointers[2], writePtrRight, pixelsToCopySSE, pixelsToCopyNormal); - - //stereo RGB - if( channels == 6) - { - optimizedWriteToRGB(readPointers[3], readPointers[4], readPointers[5], writePtrLeft, pixelsToCopySSE, pixelsToCopyNormal); - } - //RGBA - }else if(channels==4 || channels==8) - { - - if(_ifd->optimizationData[3].fill) - { - optimizedWriteToRGBAFillA(readPointers[0], readPointers[1], readPointers[2], _ifd->optimizationData[3].fillValue.bits() , writePtrRight, pixelsToCopySSE, pixelsToCopyNormal); - }else{ - optimizedWriteToRGBA(readPointers[0], readPointers[1], readPointers[2], readPointers[3] , writePtrRight, pixelsToCopySSE, pixelsToCopyNormal); - } - - //stereo RGBA - if( channels == 8) - { - if(_ifd->optimizationData[7].fill) - { - optimizedWriteToRGBAFillA(readPointers[4], readPointers[5], readPointers[6], _ifd->optimizationData[7].fillValue.bits() , writePtrLeft, pixelsToCopySSE, pixelsToCopyNormal); - }else{ - optimizedWriteToRGBA(readPointers[4], readPointers[5], readPointers[6], readPointers[7] , writePtrLeft, pixelsToCopySSE, pixelsToCopyNormal); - } - } - } - else { - throw(IEX_NAMESPACE::LogicExc("IIF mode called with incorrect channel pattern")); - } - - // If we are in NO_OPTIMIZATION mode, this class will never - // get instantiated, so no need to check for it and duplicate - // the code. - } - } - catch (std::exception &e) - { - if (!_lineBuffer->hasException) - { - _lineBuffer->exception = e.what(); - _lineBuffer->hasException = true; - } - } - catch (...) - { - if (!_lineBuffer->hasException) - { - _lineBuffer->exception = "unrecognized exception"; - _lineBuffer->hasException = true; - } - } -} -#endif - - -Task * -newLineBufferTask (TaskGroup *group, - InputStreamMutex *streamData, - ScanLineInputFile::Data *ifd, - int number, - int scanLineMin, - int scanLineMax, - OptimizationMode optimizationMode) -{ - // - // Wait for a line buffer to become available, fill the line - // buffer with raw data from the file if necessary, and create - // a new LineBufferTask whose execute() method will uncompress - // the contents of the buffer and copy the pixels into the - // frame buffer. - // - - LineBuffer *lineBuffer = ifd->getLineBuffer (number); - - try - { - lineBuffer->wait (); - - if (lineBuffer->number != number) - { - lineBuffer->minY = ifd->minY + number * ifd->linesInBuffer; - lineBuffer->maxY = lineBuffer->minY + ifd->linesInBuffer - 1; - - lineBuffer->number = number; - lineBuffer->uncompressedData = 0; - - readPixelData (streamData, ifd, lineBuffer->minY, - lineBuffer->buffer, - lineBuffer->dataSize); - } - } - catch (std::exception &e) - { - if (!lineBuffer->hasException) - { - lineBuffer->exception = e.what(); - lineBuffer->hasException = true; - } - lineBuffer->number = -1; - lineBuffer->post(); - throw; - } - catch (...) - { - // - // Reading from the file caused an exception. - // Signal that the line buffer is free, and - // re-throw the exception. - // - - lineBuffer->exception = "unrecognized exception"; - lineBuffer->hasException = true; - lineBuffer->number = -1; - lineBuffer->post(); - throw; - } - - scanLineMin = max (lineBuffer->minY, scanLineMin); - scanLineMax = min (lineBuffer->maxY, scanLineMax); - - - Task* retTask = 0; - -#ifdef IMF_HAVE_SSE2 - if (optimizationMode._optimizable) - { - - retTask = new LineBufferTaskIIF (group, ifd, lineBuffer, - scanLineMin, scanLineMax, - optimizationMode); - - } - else -#endif - { - retTask = new LineBufferTask (group, ifd, lineBuffer, - scanLineMin, scanLineMax, - optimizationMode); - } - - return retTask; - - } - - - - -} // namespace - - -void ScanLineInputFile::initialize(const Header& header) -{ - try - { - _data->header = header; - - _data->lineOrder = _data->header.lineOrder(); - - const Box2i &dataWindow = _data->header.dataWindow(); - - _data->minX = dataWindow.min.x; - _data->maxX = dataWindow.max.x; - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - size_t maxBytesPerLine = bytesPerLineTable (_data->header, - _data->bytesPerLine); - - for (size_t i = 0; i < _data->lineBuffers.size(); i++) - { - _data->lineBuffers[i] = new LineBuffer (newCompressor - (_data->header.compression(), - maxBytesPerLine, - _data->header)); - } - - _data->linesInBuffer = - numLinesInBuffer (_data->lineBuffers[0]->compressor); - - _data->lineBufferSize = maxBytesPerLine * _data->linesInBuffer; - - if (!_streamData->is->isMemoryMapped()) - { - for (size_t i = 0; i < _data->lineBuffers.size(); i++) - { - _data->lineBuffers[i]->buffer = (char *) EXRAllocAligned(_data->lineBufferSize*sizeof(char),16); - } - } - _data->nextLineBufferMinY = _data->minY - 1; - - offsetInLineBufferTable (_data->bytesPerLine, - _data->linesInBuffer, - _data->offsetInLineBuffer); - - int lineOffsetSize = (dataWindow.max.y - dataWindow.min.y + - _data->linesInBuffer) / _data->linesInBuffer; - - _data->lineOffsets.resize (lineOffsetSize); - } - catch (...) - { - delete _data; - _data=NULL; - throw; - } -} - - -ScanLineInputFile::ScanLineInputFile(InputPartData* part) -{ - if (part->header.type() != SCANLINEIMAGE) - throw IEX_NAMESPACE::ArgExc("Can't build a ScanLineInputFile from a type-mismatched part."); - - _data = new Data(part->numThreads); - _streamData = part->mutex; - _data->memoryMapped = _streamData->is->isMemoryMapped(); - - _data->version = part->version; - - initialize(part->header); - - _data->lineOffsets = part->chunkOffsets; - - _data->partNumber = part->partNumber; - // - // (TODO) change this code later. - // The completeness of the file should be detected in MultiPartInputFile. - // - _data->fileIsComplete = true; -} - - -ScanLineInputFile::ScanLineInputFile - (const Header &header, - OPENEXR_IMF_INTERNAL_NAMESPACE::IStream *is, - int numThreads) -: - _data (new Data (numThreads)), - _streamData (new InputStreamMutex()) -{ - _streamData->is = is; - _data->memoryMapped = is->isMemoryMapped(); - - initialize(header); - - // - // (TODO) this is nasty - we need a better way of working out what type of file has been used. - // in any case I believe this constructor only gets used with single part files - // and 'version' currently only tracks multipart state, so setting to 0 (not multipart) works for us - // - - _data->version=0; - readLineOffsets (*_streamData->is, - _data->lineOrder, - _data->lineOffsets, - _data->fileIsComplete); -} - - -ScanLineInputFile::~ScanLineInputFile () -{ - if (!_data->memoryMapped) - { - for (size_t i = 0; i < _data->lineBuffers.size(); i++) - { - EXRFreeAligned(_data->lineBuffers[i]->buffer); - } - } - - - // - // ScanLineInputFile should never delete the stream, - // because it does not own the stream. - // We just delete the Mutex here. - // - if (_data->partNumber == -1) - delete _streamData; - - delete _data; -} - - -const char * -ScanLineInputFile::fileName () const -{ - return _streamData->is->fileName(); -} - - -const Header & -ScanLineInputFile::header () const -{ - return _data->header; -} - - -int -ScanLineInputFile::version () const -{ - return _data->version; -} - - -namespace -{ - - -// returns the optimization state for the given arrangement of frame bufers -// this assumes: -// both the file and framebuffer are half float data -// both the file and framebuffer have xSampling and ySampling=1 -// entries in optData are sorted into their interleave order (i.e. by base address) -// These tests are done by SetFrameBuffer as it is building optData -// -OptimizationMode -detectOptimizationMode (const vector& optData) -{ - OptimizationMode w; - - // need to be compiled with SSE optimisations: if not, just returns false -#if IMF_HAVE_SSE2 - - - // only handle reading 3,4,6 or 8 channels - switch(optData.size()) - { - case 3 : break; - case 4 : break; - case 6 : break; - case 8 : break; - default : - return w; - } - - // - // the point at which data switches between the primary and secondary bank - // - size_t bankSize = optData.size()>4 ? optData.size()/2 : optData.size(); - - for(size_t i=0;iheader.channels(); - for (FrameBuffer::ConstIterator j = frameBuffer.begin(); - j != frameBuffer.end(); - ++j) - { - ChannelList::ConstIterator i = channels.find (j.name()); - - if (i == channels.end()) - continue; - - if (i.channel().xSampling != j.slice().xSampling || - i.channel().ySampling != j.slice().ySampling) - THROW (IEX_NAMESPACE::ArgExc, "X and/or y subsampling factors " - "of \"" << i.name() << "\" channel " - "of input file \"" << fileName() << "\" are " - "not compatible with the frame buffer's " - "subsampling factors."); - } - - // optimization is possible if this is a little endian system - // and both inputs and outputs are half floats - // - bool optimizationPossible = true; - - if (!GLOBAL_SYSTEM_LITTLE_ENDIAN) - { - optimizationPossible =false; - } - - vector optData; - - - // - // Initialize the slice table for readPixels(). - // - - vector slices; - ChannelList::ConstIterator i = channels.begin(); - - // current offset of channel: pixel data starts at offset*width into the - // decompressed scanline buffer - size_t offset = 0; - - for (FrameBuffer::ConstIterator j = frameBuffer.begin(); - j != frameBuffer.end(); - ++j) - { - while (i != channels.end() && strcmp (i.name(), j.name()) < 0) - { - // - // Channel i is present in the file but not - // in the frame buffer; data for channel i - // will be skipped during readPixels(). - // - - slices.push_back (InSliceInfo (i.channel().type, - i.channel().type, - 0, // base - 0, // xStride - 0, // yStride - i.channel().xSampling, - i.channel().ySampling, - false, // fill - true, // skip - 0.0)); // fillValue - - switch(i.channel().type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF : - offset++; - break; - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT : - offset+=2; - break; - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT : - offset+=2; - break; - } - ++i; - } - - bool fill = false; - - if (i == channels.end() || strcmp (i.name(), j.name()) > 0) - { - // - // Channel i is present in the frame buffer, but not in the file. - // In the frame buffer, slice j will be filled with a default value. - // - - fill = true; - } - - slices.push_back (InSliceInfo (j.slice().type, - fill? j.slice().type: - i.channel().type, - j.slice().base, - j.slice().xStride, - j.slice().yStride, - j.slice().xSampling, - j.slice().ySampling, - fill, - false, // skip - j.slice().fillValue)); - - if(!fill && i.channel().type!=OPENEXR_IMF_INTERNAL_NAMESPACE::HALF) - { - optimizationPossible = false; - } - - if(j.slice().type != OPENEXR_IMF_INTERNAL_NAMESPACE::HALF) - { - optimizationPossible = false; - } - if(j.slice().xSampling!=1 || j.slice().ySampling!=1) - { - optimizationPossible = false; - } - - - if(optimizationPossible) - { - sliceOptimizationData dat; - dat.base = j.slice().base; - dat.fill = fill; - dat.fillValue = j.slice().fillValue; - dat.offset = offset; - dat.xStride = j.slice().xStride; - dat.yStride = j.slice().yStride; - dat.xSampling = j.slice().xSampling; - dat.ySampling = j.slice().ySampling; - optData.push_back(dat); - } - - if(!fill) - { - switch(i.channel().type) - { - case OPENEXR_IMF_INTERNAL_NAMESPACE::HALF : - offset++; - break; - case OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT : - offset+=2; - break; - case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT : - offset+=2; - break; - } - } - - - - if (i != channels.end() && !fill) - ++i; - } - - - if(optimizationPossible) - { - // - // check optimisibility - // based on channel ordering and fill channel positions - // - sort(optData.begin(),optData.end()); - _data->optimizationMode = detectOptimizationMode(optData); - } - - if(!optimizationPossible || _data->optimizationMode._optimizable==false) - { - optData = vector(); - _data->optimizationMode._optimizable=false; - } - - // - // Store the new frame buffer. - // - - _data->frameBuffer = frameBuffer; - _data->slices = slices; - _data->optimizationData = optData; -} - - -const FrameBuffer & -ScanLineInputFile::frameBuffer () const -{ - Lock lock (*_streamData); - return _data->frameBuffer; -} - - -bool -ScanLineInputFile::isComplete () const -{ - return _data->fileIsComplete; -} - -bool ScanLineInputFile::isOptimizationEnabled() const -{ - if (_data->slices.size() == 0) - throw IEX_NAMESPACE::ArgExc ("No frame buffer specified " - "as pixel data destination."); - - return _data->optimizationMode._optimizable; -} - - -void -ScanLineInputFile::readPixels (int scanLine1, int scanLine2) -{ - try - { - Lock lock (*_streamData); - - if (_data->slices.size() == 0) - throw IEX_NAMESPACE::ArgExc ("No frame buffer specified " - "as pixel data destination."); - - int scanLineMin = min (scanLine1, scanLine2); - int scanLineMax = max (scanLine1, scanLine2); - - if (scanLineMin < _data->minY || scanLineMax > _data->maxY) - throw IEX_NAMESPACE::ArgExc ("Tried to read scan line outside " - "the image file's data window."); - - // - // We impose a numbering scheme on the lineBuffers where the first - // scanline is contained in lineBuffer 1. - // - // Determine the first and last lineBuffer numbers in this scanline - // range. We always attempt to read the scanlines in the order that - // they are stored in the file. - // - - int start, stop, dl; - - if (_data->lineOrder == INCREASING_Y) - { - start = (scanLineMin - _data->minY) / _data->linesInBuffer; - stop = (scanLineMax - _data->minY) / _data->linesInBuffer + 1; - dl = 1; - } - else - { - start = (scanLineMax - _data->minY) / _data->linesInBuffer; - stop = (scanLineMin - _data->minY) / _data->linesInBuffer - 1; - dl = -1; - } - - // - // Create a task group for all line buffer tasks. When the - // task group goes out of scope, the destructor waits until - // all tasks are complete. - // - - { - TaskGroup taskGroup; - - // - // Add the line buffer tasks. - // - // The tasks will execute in the order that they are created - // because we lock the line buffers during construction and the - // constructors are called by the main thread. Hence, in order - // for a successive task to execute the previous task which - // used that line buffer must have completed already. - // - - for (int l = start; l != stop; l += dl) - { - ThreadPool::addGlobalTask (newLineBufferTask (&taskGroup, - _streamData, - _data, l, - scanLineMin, - scanLineMax, - _data->optimizationMode)); - } - - // - // finish all tasks - // - } - - // - // Exeption handling: - // - // LineBufferTask::execute() may have encountered exceptions, but - // those exceptions occurred in another thread, not in the thread - // that is executing this call to ScanLineInputFile::readPixels(). - // LineBufferTask::execute() has caught all exceptions and stored - // the exceptions' what() strings in the line buffers. - // Now we check if any line buffer contains a stored exception; if - // this is the case then we re-throw the exception in this thread. - // (It is possible that multiple line buffers contain stored - // exceptions. We re-throw the first exception we find and - // ignore all others.) - // - - const string *exception = 0; - - for (size_t i = 0; i < _data->lineBuffers.size(); ++i) - { - LineBuffer *lineBuffer = _data->lineBuffers[i]; - - if (lineBuffer->hasException && !exception) - exception = &lineBuffer->exception; - - lineBuffer->hasException = false; - } - - if (exception) - throw IEX_NAMESPACE::IoExc (*exception); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error reading pixel data from image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -void -ScanLineInputFile::readPixels (int scanLine) -{ - readPixels (scanLine, scanLine); -} - - -void -ScanLineInputFile::rawPixelData (int firstScanLine, - const char *&pixelData, - int &pixelDataSize) -{ - try - { - Lock lock (*_streamData); - - if (firstScanLine < _data->minY || firstScanLine > _data->maxY) - { - throw IEX_NAMESPACE::ArgExc ("Tried to read scan line outside " - "the image file's data window."); - } - - int minY = lineBufferMinY - (firstScanLine, _data->minY, _data->linesInBuffer); - - readPixelData - (_streamData, _data, minY, _data->lineBuffers[0]->buffer, pixelDataSize); - - pixelData = _data->lineBuffers[0]->buffer; - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error reading pixel data from image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfScanLineInputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfScanLineInputFile.h deleted file mode 100644 index 4f5e2da..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfScanLineInputFile.h +++ /dev/null @@ -1,210 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_SCAN_LINE_INPUT_FILE_H -#define INCLUDED_IMF_SCAN_LINE_INPUT_FILE_H - -//----------------------------------------------------------------------------- -// -// class ScanLineInputFile -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfFrameBuffer.h" -#include "ImfThreading.h" -#include "ImfInputStreamMutex.h" -#include "ImfInputPartData.h" -#include "ImfGenericInputFile.h" -#include "ImfExport.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT ScanLineInputFile : public GenericInputFile -{ - public: - - //------------ - // Constructor - //------------ - - ScanLineInputFile (const Header &header, OPENEXR_IMF_INTERNAL_NAMESPACE::IStream *is, - int numThreads = globalThreadCount()); - - - //----------------------------------------- - // Destructor -- deallocates internal data - // structures, but does not close the file. - //----------------------------------------- - - virtual ~ScanLineInputFile (); - - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //---------------------------------- - // Access to the file format version - //---------------------------------- - - int version () const; - - - //----------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the InputFile object. - // - // The current frame buffer is the destination for the pixel - // data read from the file. The current frame buffer must be - // set at least once before readPixels() is called. - // The current frame buffer can be changed after each call - // to readPixels(). - //----------------------------------------------------------- - - void setFrameBuffer (const FrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const FrameBuffer & frameBuffer () const; - - - //--------------------------------------------------------------- - // Check if the file is complete: - // - // isComplete() returns true if all pixels in the data window are - // present in the input file, or false if any pixels are missing. - // (Another program may still be busy writing the file, or file - // writing may have been aborted prematurely.) - //--------------------------------------------------------------- - - bool isComplete () const; - - - - //--------------------------------------------------------------- - // Check if SSE optimisation is enabled - // - // Call after setFrameBuffer() to query whether optimised file decoding - // is available - decode times will be faster if returns true - // - // Optimisation depends on the framebuffer channels and channel types - // as well as the file/part channels and channel types, as well as - // whether SSE2 instruction support was detected at compile time - // - // Calling before setFrameBuffer will throw an exception - // - //--------------------------------------------------------------- - - bool isOptimizationEnabled () const; - - - - - //--------------------------------------------------------------- - // Read pixel data: - // - // readPixels(s1,s2) reads all scan lines with y coordinates - // in the interval [min (s1, s2), max (s1, s2)] from the file, - // and stores them in the current frame buffer. - // - // Both s1 and s2 must be within the interval - // [header().dataWindow().min.y, header.dataWindow().max.y] - // - // The scan lines can be read from the file in random order, and - // individual scan lines may be skipped or read multiple times. - // For maximum efficiency, the scan lines should be read in the - // order in which they were written to the file. - // - // readPixels(s) calls readPixels(s,s). - // - // If threading is enabled, readPixels (s1, s2) tries to perform - // decopmression of multiple scanlines in parallel. - // - //--------------------------------------------------------------- - - void readPixels (int scanLine1, int scanLine2); - void readPixels (int scanLine); - - - //---------------------------------------------- - // Read a block of raw pixel data from the file, - // without uncompressing it (this function is - // used to implement OutputFile::copyPixels()). - //---------------------------------------------- - - void rawPixelData (int firstScanLine, - const char *&pixelData, - int &pixelDataSize); - - struct Data; - - private: - - Data * _data; - - InputStreamMutex* _streamData; - - ScanLineInputFile (InputPartData* part); - - void initialize(const Header& header); - - friend class MultiPartInputFile; - friend class InputFile; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfSimd.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfSimd.h deleted file mode 100644 index 09b1042..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfSimd.h +++ /dev/null @@ -1,59 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Autodesk, Inc. -// -// All rights reserved. -// -// Implementation of IIF-specific file format and speed optimizations -// provided by Innobec Technologies inc on behalf of Autodesk. -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_SIMD_H -#define INCLUDED_IMF_SIMD_H - -// -// Compile time SSE detection: -// IMF_HAVE_SSE2 - Defined if it's safe to compile SSE2 optimizations -// - - -// GCC and Visual Studio SSE2 compiler flags -#if defined __SSE2__ || (_MSC_VER >= 1300 && !_M_CEE_PURE) - #define IMF_HAVE_SSE2 1 -#endif - -extern "C" -{ -#if IMF_HAVE_SSE2 - #include - #include -#endif -} - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp deleted file mode 100644 index df952c2..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2003, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// Optional Standard Attributes -// -//----------------------------------------------------------------------------- - -#include - - -#define IMF_STRING(name) #name - -#define IMF_STD_ATTRIBUTE_IMP(name,suffix,type) \ - \ - void \ - add##suffix (Header &header, const type &value) \ - { \ - header.insert (IMF_STRING (name), TypedAttribute (value)); \ - } \ - \ - bool \ - has##suffix (const Header &header) \ - { \ - return header.findTypedAttribute > \ - (IMF_STRING (name)) != 0; \ - } \ - \ - const TypedAttribute & \ - name##Attribute (const Header &header) \ - { \ - return header.typedAttribute > \ - (IMF_STRING (name)); \ - } \ - \ - TypedAttribute & \ - name##Attribute (Header &header) \ - { \ - return header.typedAttribute > \ - (IMF_STRING (name)); \ - } \ - \ - const type & \ - name (const Header &header) \ - { \ - return name##Attribute(header).value(); \ - } \ - \ - type & \ - name (Header &header) \ - { \ - return name##Attribute(header).value(); \ - } - -#include "ImfNamespace.h" - -using namespace IMATH_NAMESPACE; -using namespace std; - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -IMF_STD_ATTRIBUTE_IMP (chromaticities, Chromaticities, Chromaticities) -IMF_STD_ATTRIBUTE_IMP (whiteLuminance, WhiteLuminance, float) -IMF_STD_ATTRIBUTE_IMP (adoptedNeutral, AdoptedNeutral, V2f) -IMF_STD_ATTRIBUTE_IMP (renderingTransform, RenderingTransform, string) -IMF_STD_ATTRIBUTE_IMP (lookModTransform, LookModTransform, string) -IMF_STD_ATTRIBUTE_IMP (xDensity, XDensity, float) -IMF_STD_ATTRIBUTE_IMP (owner, Owner, string) -IMF_STD_ATTRIBUTE_IMP (comments, Comments, string) -IMF_STD_ATTRIBUTE_IMP (capDate, CapDate, string) -IMF_STD_ATTRIBUTE_IMP (utcOffset, UtcOffset, float) -IMF_STD_ATTRIBUTE_IMP (longitude, Longitude, float) -IMF_STD_ATTRIBUTE_IMP (latitude, Latitude, float) -IMF_STD_ATTRIBUTE_IMP (altitude, Altitude, float) -IMF_STD_ATTRIBUTE_IMP (focus, Focus, float) -IMF_STD_ATTRIBUTE_IMP (expTime, ExpTime, float) -IMF_STD_ATTRIBUTE_IMP (aperture, Aperture, float) -IMF_STD_ATTRIBUTE_IMP (isoSpeed, IsoSpeed, float) -IMF_STD_ATTRIBUTE_IMP (envmap, Envmap, Envmap) -IMF_STD_ATTRIBUTE_IMP (keyCode, KeyCode, KeyCode) -IMF_STD_ATTRIBUTE_IMP (timeCode, TimeCode, TimeCode) -IMF_STD_ATTRIBUTE_IMP (wrapmodes, Wrapmodes, string) -IMF_STD_ATTRIBUTE_IMP (framesPerSecond, FramesPerSecond, Rational) -IMF_STD_ATTRIBUTE_IMP (multiView, MultiView, StringVector) -IMF_STD_ATTRIBUTE_IMP (worldToCamera, WorldToCamera, M44f) -IMF_STD_ATTRIBUTE_IMP (worldToNDC, WorldToNDC, M44f) -IMF_STD_ATTRIBUTE_IMP (deepImageState, DeepImageState, DeepImageState) -IMF_STD_ATTRIBUTE_IMP (originalDataWindow, OriginalDataWindow, Box2i) -IMF_STD_ATTRIBUTE_IMP (dwaCompressionLevel, DwaCompressionLevel, float) - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStandardAttributes.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStandardAttributes.h deleted file mode 100644 index 4280ac4..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStandardAttributes.h +++ /dev/null @@ -1,382 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_STANDARD_ATTRIBUTES_H -#define INCLUDED_IMF_STANDARD_ATTRIBUTES_H - -//----------------------------------------------------------------------------- -// -// Optional Standard Attributes -- these attributes are "optional" -// because not every image file header has them, but they define a -// "standard" way to represent commonly used data in the file header. -// -// For each attribute, with name "foo", and type "T", the following -// functions are automatically generated via macros: -// -// void addFoo (Header &header, const T &value); -// bool hasFoo (const Header &header); -// const TypedAttribute & fooAttribute (const Header &header); -// TypedAttribute & fooAttribute (Header &header); -// const T & foo (const Header &Header); -// T & foo (Header &Header); -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfBoxAttribute.h" -#include "ImfChromaticitiesAttribute.h" -#include "ImfEnvmapAttribute.h" -#include "ImfDeepImageStateAttribute.h" -#include "ImfFloatAttribute.h" -#include "ImfKeyCodeAttribute.h" -#include "ImfMatrixAttribute.h" -#include "ImfRationalAttribute.h" -#include "ImfStringAttribute.h" -#include "ImfStringVectorAttribute.h" -#include "ImfTimeCodeAttribute.h" -#include "ImfVecAttribute.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -#define IMF_STD_ATTRIBUTE_DEF(name,suffix,object) \ - \ - OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER \ - IMF_EXPORT void add##suffix (Header &header, const object &v); \ - IMF_EXPORT bool has##suffix (const Header &header); \ - IMF_EXPORT const TypedAttribute & \ - name##Attribute (const Header &header); \ - IMF_EXPORT TypedAttribute & \ - name##Attribute (Header &header); \ - IMF_EXPORT const object & \ - name (const Header &header); \ - IMF_EXPORT object & name (Header &header); \ - OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT \ - -// -// chromaticities -- for RGB images, specifies the CIE (x,y) -// chromaticities of the primaries and the white point -// - -IMF_STD_ATTRIBUTE_DEF (chromaticities, Chromaticities, Chromaticities) - - -// -// whiteLuminance -- for RGB images, defines the luminance, in Nits -// (candelas per square meter) of the RGB value (1.0, 1.0, 1.0). -// -// If the chromaticities and the whiteLuminance of an RGB image are -// known, then it is possible to convert the image's pixels from RGB -// to CIE XYZ tristimulus values (see function RGBtoXYZ() in header -// file ImfChromaticities.h). -// -// - -IMF_STD_ATTRIBUTE_DEF (whiteLuminance, WhiteLuminance, float) - - -// -// adoptedNeutral -- specifies the CIE (x,y) coordinates that should -// be considered neutral during color rendering. Pixels in the image -// file whose (x,y) coordinates match the adoptedNeutral value should -// be mapped to neutral values on the display. -// - -IMF_STD_ATTRIBUTE_DEF (adoptedNeutral, AdoptedNeutral, IMATH_NAMESPACE::V2f) - - -// -// renderingTransform, lookModTransform -- specify the names of the -// CTL functions that implements the intended color rendering and look -// modification transforms for this image. -// - -IMF_STD_ATTRIBUTE_DEF (renderingTransform, RenderingTransform, std::string) -IMF_STD_ATTRIBUTE_DEF (lookModTransform, LookModTransform, std::string) - - -// -// xDensity -- horizontal output density, in pixels per inch. -// The image's vertical output density is xDensity * pixelAspectRatio. -// - -IMF_STD_ATTRIBUTE_DEF (xDensity, XDensity, float) - - -// -// owner -- name of the owner of the image -// - -IMF_STD_ATTRIBUTE_DEF (owner, Owner, std::string) - - -// -// comments -- additional image information in human-readable -// form, for example a verbal description of the image -// - -IMF_STD_ATTRIBUTE_DEF (comments, Comments, std::string) - - -// -// capDate -- the date when the image was created or captured, -// in local time, and formatted as -// -// YYYY:MM:DD hh:mm:ss -// -// where YYYY is the year (4 digits, e.g. 2003), MM is the month -// (2 digits, 01, 02, ... 12), DD is the day of the month (2 digits, -// 01, 02, ... 31), hh is the hour (2 digits, 00, 01, ... 23), mm -// is the minute, and ss is the second (2 digits, 00, 01, ... 59). -// -// - -IMF_STD_ATTRIBUTE_DEF (capDate, CapDate, std::string) - - -// -// utcOffset -- offset of local time at capDate from -// Universal Coordinated Time (UTC), in seconds: -// -// UTC == local time + utcOffset -// - -IMF_STD_ATTRIBUTE_DEF (utcOffset, UtcOffset, float) - - -// -// longitude, latitude, altitude -- for images of real objects, the -// location where the image was recorded. Longitude and latitude are -// in degrees east of Greenwich and north of the equator. Altitude -// is in meters above sea level. For example, Kathmandu, Nepal is -// at longitude 85.317, latitude 27.717, altitude 1305. -// - -IMF_STD_ATTRIBUTE_DEF (longitude, Longitude, float) -IMF_STD_ATTRIBUTE_DEF (latitude, Latitude, float) -IMF_STD_ATTRIBUTE_DEF (altitude, Altitude, float) - - -// -// focus -- the camera's focus distance, in meters -// - -IMF_STD_ATTRIBUTE_DEF (focus, Focus, float) - - -// -// exposure -- exposure time, in seconds -// - -IMF_STD_ATTRIBUTE_DEF (expTime, ExpTime, float) - - -// -// aperture -- the camera's lens aperture, in f-stops (focal length -// of the lens divided by the diameter of the iris opening) -// - -IMF_STD_ATTRIBUTE_DEF (aperture, Aperture, float) - - -// -// isoSpeed -- the ISO speed of the film or image sensor -// that was used to record the image -// - -IMF_STD_ATTRIBUTE_DEF (isoSpeed, IsoSpeed, float) - - -// -// envmap -- if this attribute is present, the image represents -// an environment map. The attribute's value defines how 3D -// directions are mapped to 2D pixel locations. For details -// see header file ImfEnvmap.h -// - -IMF_STD_ATTRIBUTE_DEF (envmap, Envmap, Envmap) - - -// -// keyCode -- for motion picture film frames. Identifies film -// manufacturer, film type, film roll and frame position within -// the roll. -// - -IMF_STD_ATTRIBUTE_DEF (keyCode, KeyCode, KeyCode) - - -// -// timeCode -- time and control code -// - -IMF_STD_ATTRIBUTE_DEF (timeCode, TimeCode, TimeCode) - - -// -// wrapmodes -- determines how texture map images are extrapolated. -// If an OpenEXR file is used as a texture map for 3D rendering, -// texture coordinates (0.0, 0.0) and (1.0, 1.0) correspond to -// the upper left and lower right corners of the data window. -// If the image is mapped onto a surface with texture coordinates -// outside the zero-to-one range, then the image must be extrapolated. -// This attribute tells the renderer how to do this extrapolation. -// The attribute contains either a pair of comma-separated keywords, -// to specify separate extrapolation modes for the horizontal and -// vertical directions; or a single keyword, to specify extrapolation -// in both directions (e.g. "clamp,periodic" or "clamp"). Extra white -// space surrounding the keywords is allowed, but should be ignored -// by the renderer ("clamp, black " is equivalent to "clamp,black"). -// The keywords listed below are predefined; some renderers may support -// additional extrapolation modes: -// -// black pixels outside the zero-to-one range are black -// -// clamp texture coordinates less than 0.0 and greater -// than 1.0 are clamped to 0.0 and 1.0 respectively -// -// periodic the texture image repeats periodically -// -// mirror the texture image repeats periodically, but -// every other instance is mirrored -// - -IMF_STD_ATTRIBUTE_DEF (wrapmodes, Wrapmodes, std::string) - - -// -// framesPerSecond -- defines the nominal playback frame rate for image -// sequences, in frames per second. Every image in a sequence should -// have a framesPerSecond attribute, and the attribute value should be -// the same for all images in the sequence. If an image sequence has -// no framesPerSecond attribute, playback software should assume that -// the frame rate for the sequence is 24 frames per second. -// -// In order to allow exact representation of NTSC frame and field rates, -// framesPerSecond is stored as a rational number. A rational number is -// a pair of integers, n and d, that represents the value n/d. -// -// For the exact values of commonly used frame rates, please see header -// file ImfFramesPerSecond.h. -// - -IMF_STD_ATTRIBUTE_DEF (framesPerSecond, FramesPerSecond, Rational) - - -// -// multiView -- defines the view names for multi-view image files. -// A multi-view image contains two or more views of the same scene, -// as seen from different viewpoints, for example a left-eye and -// a right-eye view for stereo displays. The multiView attribute -// lists the names of the views in an image, and a naming convention -// identifies the channels that belong to each view. -// -// For details, please see header file ImfMultiView.h -// - -IMF_STD_ATTRIBUTE_DEF (multiView , MultiView, StringVector) - - -// -// worldToCamera -- for images generated by 3D computer graphics rendering, -// a matrix that transforms 3D points from the world to the camera coordinate -// space of the renderer. -// -// The camera coordinate space is left-handed. Its origin indicates the -// location of the camera. The positive x and y axes correspond to the -// "right" and "up" directions in the rendered image. The positive z -// axis indicates the camera's viewing direction. (Objects in front of -// the camera have positive z coordinates.) -// -// Camera coordinate space in OpenEXR is the same as in Pixar's Renderman. -// - -IMF_STD_ATTRIBUTE_DEF (worldToCamera, WorldToCamera, IMATH_NAMESPACE::M44f) - - -// -// worldToNDC -- for images generated by 3D computer graphics rendering, a -// matrix that transforms 3D points from the world to the Normalized Device -// Coordinate (NDC) space of the renderer. -// -// NDC is a 2D coordinate space that corresponds to the image plane, with -// positive x and pointing to the right and y positive pointing down. The -// coordinates (0, 0) and (1, 1) correspond to the upper left and lower right -// corners of the OpenEXR display window. -// -// To transform a 3D point in word space into a 2D point in NDC space, -// multiply the 3D point by the worldToNDC matrix and discard the z -// coordinate. -// -// NDC space in OpenEXR is the same as in Pixar's Renderman. -// - -IMF_STD_ATTRIBUTE_DEF (worldToNDC, WorldToNDC, IMATH_NAMESPACE::M44f) - - -// -// deepImageState -- specifies whether the pixels in a deep image are -// sorted and non-overlapping. -// -// Note: this attribute can be set by application code that writes a file -// in order to tell applications that read the file whether the pixel data -// must be cleaned up prior to image processing operations such as flattening. -// The IlmImf library does not verify that the attribute is consistent with -// the actual state of the pixels. Application software may assume that the -// attribute is valid, as long as the software will not crash or lock up if -// any pixels are inconsistent with the deepImageState attribute. -// - -IMF_STD_ATTRIBUTE_DEF (deepImageState, DeepImageState, DeepImageState) - - -// -// originalDataWindow -- if application software crops an image, then it -// should save the data window of the original, un-cropped image in the -// originalDataWindow attribute. -// - -IMF_STD_ATTRIBUTE_DEF - (originalDataWindow, OriginalDataWindow, IMATH_NAMESPACE::Box2i) - - -// -// dwaCompressionLevel -- sets the quality level for images compressed -// with the DWAA or DWAB method. -// - -IMF_STD_ATTRIBUTE_DEF (dwaCompressionLevel, DwaCompressionLevel, float) - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStdIO.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStdIO.cpp deleted file mode 100644 index 1839a94..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStdIO.cpp +++ /dev/null @@ -1,242 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.67 -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// Low-level file input and output for OpenEXR -// based on C++ standard iostreams. -// -//----------------------------------------------------------------------------- - -#include -#include "Iex.h" -#include - -using namespace std; -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -namespace { - -void -clearError () -{ - errno = 0; -} - - -bool -checkError (istream &is, streamsize expected = 0) -{ - if (!is) - { - if (errno) - IEX_NAMESPACE::throwErrnoExc(); - - if (is.gcount() < expected) - { - THROW (IEX_NAMESPACE::InputExc, "Early end of file: read " << is.gcount() - << " out of " << expected << " requested bytes."); - } - return false; - } - - return true; -} - - -void -checkError (ostream &os) -{ - if (!os) - { - if (errno) - IEX_NAMESPACE::throwErrnoExc(); - - throw IEX_NAMESPACE::ErrnoExc ("File output failed."); - } -} - -} // namespace - - -StdIFStream::StdIFStream (const char fileName[]): - OPENEXR_IMF_INTERNAL_NAMESPACE::IStream (fileName), - _is (new ifstream (fileName, ios_base::binary)), - _deleteStream (true) -{ - if (!*_is) - { - delete _is; - IEX_NAMESPACE::throwErrnoExc(); - } -} - - -StdIFStream::StdIFStream (ifstream &is, const char fileName[]): - OPENEXR_IMF_INTERNAL_NAMESPACE::IStream (fileName), - _is (&is), - _deleteStream (false) -{ - // empty -} - - -StdIFStream::~StdIFStream () -{ - if (_deleteStream) - delete _is; -} - - -bool -StdIFStream::read (char c[/*n*/], int n) -{ - if (!*_is) - throw IEX_NAMESPACE::InputExc ("Unexpected end of file."); - - clearError(); - _is->read (c, n); - return checkError (*_is, n); -} - - -Int64 -StdIFStream::tellg () -{ - return std::streamoff (_is->tellg()); -} - - -void -StdIFStream::seekg (Int64 pos) -{ - _is->seekg (pos); - checkError (*_is); -} - - -void -StdIFStream::clear () -{ - _is->clear(); -} - - -StdOFStream::StdOFStream (const char fileName[]): - OPENEXR_IMF_INTERNAL_NAMESPACE::OStream (fileName), - _os (new ofstream (fileName, ios_base::binary)), - _deleteStream (true) -{ - if (!*_os) - { - delete _os; - IEX_NAMESPACE::throwErrnoExc(); - } -} - - -StdOFStream::StdOFStream (ofstream &os, const char fileName[]): - OPENEXR_IMF_INTERNAL_NAMESPACE::OStream (fileName), - _os (&os), - _deleteStream (false) -{ - // empty -} - - -StdOFStream::~StdOFStream () -{ - if (_deleteStream) - delete _os; -} - - -void -StdOFStream::write (const char c[/*n*/], int n) -{ - clearError(); - _os->write (c, n); - checkError (*_os); -} - - -Int64 -StdOFStream::tellp () -{ - return std::streamoff (_os->tellp()); -} - - -void -StdOFStream::seekp (Int64 pos) -{ - _os->seekp (pos); - checkError (*_os); -} - - -StdOSStream::StdOSStream (): OPENEXR_IMF_INTERNAL_NAMESPACE::OStream ("(string)") -{ - // empty -} - - -void -StdOSStream::write (const char c[/*n*/], int n) -{ - clearError(); - _os.write (c, n); - checkError (_os); -} - - -Int64 -StdOSStream::tellp () -{ - return std::streamoff (_os.tellp()); -} - - -void -StdOSStream::seekp (Int64 pos) -{ - _os.seekp (pos); - checkError (_os); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStdIO.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStdIO.h deleted file mode 100644 index 56ea4e2..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStdIO.h +++ /dev/null @@ -1,160 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_STD_IO_H -#define INCLUDED_IMF_STD_IO_H - -//----------------------------------------------------------------------------- -// -// Low-level file input and output for OpenEXR -// based on C++ standard iostreams. -// -//----------------------------------------------------------------------------- - -#include "ImfIO.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -#include -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -//------------------------------------------- -// class StdIFStream -- an implementation of -// class OPENEXR_IMF_INTERNAL_NAMESPACE::IStream based on class std::ifstream -//------------------------------------------- - -class IMF_EXPORT StdIFStream: public OPENEXR_IMF_INTERNAL_NAMESPACE::IStream -{ - public: - - //------------------------------------------------------- - // A constructor that opens the file with the given name. - // The destructor will close the file. - //------------------------------------------------------- - - StdIFStream (const char fileName[]); - - - //--------------------------------------------------------- - // A constructor that uses a std::ifstream that has already - // been opened by the caller. The StdIFStream's destructor - // will not close the std::ifstream. - //--------------------------------------------------------- - - StdIFStream (std::ifstream &is, const char fileName[]); - - - virtual ~StdIFStream (); - - virtual bool read (char c[/*n*/], int n); - virtual Int64 tellg (); - virtual void seekg (Int64 pos); - virtual void clear (); - - private: - - std::ifstream * _is; - bool _deleteStream; -}; - - -//------------------------------------------- -// class StdOFStream -- an implementation of -// class OPENEXR_IMF_INTERNAL_NAMESPACE::OStream based on class std::ofstream -//------------------------------------------- - -class IMF_EXPORT StdOFStream: public OPENEXR_IMF_INTERNAL_NAMESPACE::OStream -{ - public: - - //------------------------------------------------------- - // A constructor that opens the file with the given name. - // The destructor will close the file. - //------------------------------------------------------- - - StdOFStream (const char fileName[]); - - - //--------------------------------------------------------- - // A constructor that uses a std::ofstream that has already - // been opened by the caller. The StdOFStream's destructor - // will not close the std::ofstream. - //--------------------------------------------------------- - - StdOFStream (std::ofstream &os, const char fileName[]); - - - virtual ~StdOFStream (); - - virtual void write (const char c[/*n*/], int n); - virtual Int64 tellp (); - virtual void seekp (Int64 pos); - - private: - - std::ofstream * _os; - bool _deleteStream; -}; - - -//------------------------------------------------ -// class StdOSStream -- an implementation of class -// OPENEXR_IMF_INTERNAL_NAMESPACE::OStream, based on class std::ostringstream -//------------------------------------------------ - -class IMF_EXPORT StdOSStream: public OPENEXR_IMF_INTERNAL_NAMESPACE::OStream -{ - public: - - StdOSStream (); - - virtual void write (const char c[/*n*/], int n); - virtual Int64 tellp (); - virtual void seekp (Int64 pos); - - std::string str () const {return _os.str();} - - private: - - std::ostringstream _os; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringAttribute.cpp deleted file mode 100644 index cd241ba..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringAttribute.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class StringAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -StringAttribute::staticTypeName () -{ - return "string"; -} - - -template <> -void -StringAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - int size = _value.size(); - - for (int i = 0; i < size; i++) - Xdr::write (os, _value[i]); -} - - -template <> -void -StringAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - _value.resize (size); - - for (int i = 0; i < size; i++) - Xdr::read (is, _value[i]); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringAttribute.h deleted file mode 100644 index f5d62d7..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringAttribute.h +++ /dev/null @@ -1,71 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_STRING_ATTRIBUTE_H -#define INCLUDED_IMF_STRING_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class StringAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute StringAttribute; - -template <> -IMF_EXPORT -const char *StringAttribute::staticTypeName (); - -template <> -IMF_EXPORT -void StringAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; - -template <> -IMF_EXPORT -void StringAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp deleted file mode 100644 index 88fdf8e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2007, Weta Digital Ltd -// -// 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 Weta Digital nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class StringVectorAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - - -template <> -const char * -StringVectorAttribute::staticTypeName () -{ - return "stringvector"; -} - - -template <> -void -StringVectorAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - int size = _value.size(); - - for (int i = 0; i < size; i++) - { - int strSize = _value[i].size(); - Xdr::write (os, strSize); - Xdr::write (os, &_value[i][0], strSize); - } -} - - -template <> -void -StringVectorAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - int read = 0; - - while (read < size) - { - int strSize; - Xdr::read (is, strSize); - read += Xdr::size(); - - std::string str; - str.resize (strSize); - - if( strSize>0 ) - { - Xdr::read (is, &str[0], strSize); - } - - read += strSize; - - _value.push_back (str); - } -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h deleted file mode 100644 index d13ef96..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h +++ /dev/null @@ -1,74 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2007, Weta Digital Ltd -// -// 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 Weta Digital nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_STRINGVECTOR_ATTRIBUTE_H -#define INCLUDED_IMF_STRINGVECTOR_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class StringVectorAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfNamespace.h" - -#include -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -typedef std::vector StringVector; -typedef TypedAttribute StringVectorAttribute; - -template <> -IMF_EXPORT -const char *StringVectorAttribute::staticTypeName (); - -template <> -IMF_EXPORT -void StringVectorAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; - -template <> -IMF_EXPORT -void StringVectorAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp deleted file mode 100644 index d10f9bc..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2009-2014 DreamWorks Animation LLC. -// -// 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 DreamWorks Animation nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfSimd.h" -#include "ImfSystemSpecific.h" -#include "ImfNamespace.h" -#include "OpenEXRConfig.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -namespace { -#if defined(IMF_HAVE_SSE2) && defined(__GNUC__) - - // Helper functions for gcc + SSE enabled - void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) - { - __asm__ __volatile__ ( - "cpuid" - : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) - : /* Input */ "a"(n) - : /* Clobber */); - } - -#else // IMF_HAVE_SSE2 && __GNUC__ - - // Helper functions for generic compiler - all disabled - void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) - { - eax = ebx = ecx = edx = 0; - } - -#endif // IMF_HAVE_SSE2 && __GNUC__ - - -#ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX - - void xgetbv(int n, int &eax, int &edx) - { - __asm__ __volatile__ ( - "xgetbv" - : /* Output */ "=a"(eax), "=d"(edx) - : /* Input */ "c"(n) - : /* Clobber */); - } - -#else // OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX - - void xgetbv(int n, int &eax, int &edx) - { - eax = edx = 0; - } - -#endif // OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX - -} // namespace - -CpuId::CpuId(): - sse2(false), - sse3(false), - ssse3(false), - sse4_1(false), - sse4_2(false), - avx(false), - f16c(false) -{ - bool osxsave = false; - int max = 0; - int eax, ebx, ecx, edx; - - cpuid(0, max, ebx, ecx, edx); - if (max > 0) - { - cpuid(1, eax, ebx, ecx, edx); - sse2 = ( edx & (1<<26) ); - sse3 = ( ecx & (1<< 0) ); - ssse3 = ( ecx & (1<< 9) ); - sse4_1 = ( ecx & (1<<19) ); - sse4_2 = ( ecx & (1<<20) ); - osxsave = ( ecx & (1<<27) ); - avx = ( ecx & (1<<28) ); - f16c = ( ecx & (1<<29) ); - - if (!osxsave) - { - avx = f16c = false; - } - else - { - xgetbv(0, eax, edx); - // eax bit 1 - SSE managed, bit 2 - AVX managed - if ((eax & 6) != 6) - { - avx = f16c = false; - } - } - } -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfSystemSpecific.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfSystemSpecific.h deleted file mode 100644 index c0261a7..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfSystemSpecific.h +++ /dev/null @@ -1,172 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_COMPILER_SPECIFIC_H -#define INCLUDED_IMF_COMPILER_SPECIFIC_H - -#include -#include -#include -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -static unsigned long systemEndianCheckValue = 0x12345678; -static unsigned long* systemEndianCheckPointer = &systemEndianCheckValue; - -// EXR files are little endian - check processor architecture is too -// (optimisation currently not supported for big endian machines) -static bool GLOBAL_SYSTEM_LITTLE_ENDIAN = - (*(unsigned char*)systemEndianCheckPointer == 0x78 ? true : false); - - -#ifdef IMF_HAVE_SSE2 - -#ifdef __GNUC__ -// Causes issues on certain gcc versions -//#define EXR_FORCEINLINE inline __attribute__((always_inline)) -#define EXR_FORCEINLINE inline -#define EXR_RESTRICT __restrict - -static void* EXRAllocAligned(size_t size, size_t alignment) -{ - void* ptr = 0; - posix_memalign(&ptr, alignment, size); - return ptr; -} - - -static void EXRFreeAligned(void* ptr) -{ - free(ptr); -} - -#elif defined _MSC_VER - -#define EXR_FORCEINLINE __forceinline -#define EXR_RESTRICT __restrict - -static void* EXRAllocAligned(size_t size, size_t alignment) -{ - return _aligned_malloc(size, alignment); -} - - -static void EXRFreeAligned(void* ptr) -{ - _aligned_free(ptr); -} - -#elif defined (__INTEL_COMPILER) || \ - defined(__ICL) || \ - defined(__ICC) || \ - defined(__ECC) - -#define EXR_FORCEINLINE inline -#define EXR_RESTRICT restrict - -static void* EXRAllocAligned(size_t size, size_t alignment) -{ - return _mm_malloc(size, alignment); -} - - -static void EXRFreeAligned(void* ptr) -{ - _mm_free(ptr); -} - -#else - -// generic compiler -#define EXR_FORCEINLINE inline -#define EXR_RESTRICT - -static void* EXRAllocAligned(size_t size, size_t alignment) -{ - return malloc(size); -} - - -static void EXRFreeAligned(void* ptr) -{ - free(ptr); -} - -#endif // compiler switch - - -#else // IMF_HAVE_SSE2 - - -#define EXR_FORCEINLINE inline -#define EXR_RESTRICT - -static void* EXRAllocAligned(size_t size, size_t alignment) -{ - return malloc(size); -} - - -static void EXRFreeAligned(void* ptr) -{ - free(ptr); -} - - -#endif // IMF_HAVE_SSE2 - -// -// Simple CPUID based runtime detection of various capabilities -// -class IMF_EXPORT CpuId -{ - public: - CpuId(); - - bool sse2; - bool sse3; - bool ssse3; - bool sse4_1; - bool sse4_2; - bool avx; - bool f16c; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif //include guard diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTestFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTestFile.cpp deleted file mode 100644 index 198a4d5..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTestFile.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// Utility routines to test quickly if a given -// file is an OpenEXR file, and whether the -// file is scanline-based or tiled. -// -//----------------------------------------------------------------------------- - - -#include -#include -#include -#include -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -bool -isOpenExrFile - (const char fileName[], - bool &tiled, - bool &deep, - bool &multiPart) -{ - try - { - StdIFStream is (fileName); - - int magic, version; - Xdr::read (is, magic); - Xdr::read (is, version); - - tiled = isTiled (version); - deep = isNonImage (version); - multiPart = isMultiPart (version); - return magic == MAGIC; - } - catch (...) - { - tiled = false; - return false; - } -} - - -bool -isOpenExrFile (const char fileName[], bool &tiled, bool &deep) -{ - bool multiPart; - return isOpenExrFile (fileName, tiled, deep, multiPart); -} - - -bool -isOpenExrFile (const char fileName[], bool &tiled) -{ - bool deep, multiPart; - return isOpenExrFile (fileName, tiled, deep, multiPart); -} - - -bool -isOpenExrFile (const char fileName[]) -{ - bool tiled, deep, multiPart; - return isOpenExrFile (fileName, tiled, deep, multiPart); -} - - -bool -isTiledOpenExrFile (const char fileName[]) -{ - bool exr, tiled, deep, multiPart; - exr = isOpenExrFile (fileName, tiled, deep, multiPart); - return exr && tiled; -} - - -bool -isDeepOpenExrFile (const char fileName[]) -{ - bool exr, tiled, deep, multiPart; - exr = isOpenExrFile (fileName, tiled, deep, multiPart); - return exr && deep; -} - - -bool -isMultiPartOpenExrFile (const char fileName[]) -{ - bool exr, tiled, deep, multiPart; - exr = isOpenExrFile (fileName, tiled, deep, multiPart); - return exr && multiPart; -} - - -bool -isOpenExrFile - (IStream &is, - bool &tiled, - bool &deep, - bool &multiPart) -{ - try - { - Int64 pos = is.tellg(); - - if (pos != 0) - is.seekg (0); - - int magic, version; - Xdr::read (is, magic); - Xdr::read (is, version); - - is.seekg (pos); - - tiled = isTiled (version); - deep = isNonImage (version); - multiPart = isMultiPart (version); - return magic == MAGIC; - } - catch (...) - { - is.clear(); - tiled = false; - return false; - } -} - - -bool -isOpenExrFile (IStream &is, bool &tiled, bool &deep) -{ - bool multiPart; - return isOpenExrFile (is, tiled, deep, multiPart); -} - - -bool -isOpenExrFile (IStream &is, bool &tiled) -{ - bool deep, multiPart; - return isOpenExrFile (is, tiled, deep, multiPart); -} - - -bool -isOpenExrFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is) -{ - bool tiled, deep, multiPart; - return isOpenExrFile (is, tiled, deep, multiPart); -} - - -bool -isTiledOpenExrFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is) -{ - bool exr, tiled, deep, multiPart; - exr = isOpenExrFile (is, tiled, deep, multiPart); - return exr && tiled; -} - - -bool -isDeepOpenExrFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is) -{ - bool exr, tiled, deep, multiPart; - exr = isOpenExrFile (is, tiled, deep, multiPart); - return exr && deep; -} - - -bool -isMultiPartOpenExrFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is) -{ - bool exr, tiled, deep, multiPart; - exr = isOpenExrFile (is, tiled, deep, multiPart); - return exr && multiPart; -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTestFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTestFile.h deleted file mode 100644 index d02d3bc..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTestFile.h +++ /dev/null @@ -1,97 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_TEST_FILE_H -#define INCLUDED_IMF_TEST_FILE_H - -//----------------------------------------------------------------------------- -// -// Utility routines to test quickly if a given -// file is an OpenEXR file, and whether the -// file is scanline-based or tiled. -// -//----------------------------------------------------------------------------- - -#include "ImfForward.h" -#include "ImfExport.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -IMF_EXPORT bool isOpenExrFile (const char fileName[]); - -IMF_EXPORT bool isOpenExrFile (const char fileName[], - bool &isTiled); - -IMF_EXPORT bool isOpenExrFile (const char fileName[], - bool &isTiled, - bool &isDeep); - -IMF_EXPORT bool isOpenExrFile (const char fileName[], - bool &isTiled, - bool &isDeep, - bool &isMultiPart); - -IMF_EXPORT bool isTiledOpenExrFile (const char fileName[]); - -IMF_EXPORT bool isDeepOpenExrFile (const char fileName[]); - -IMF_EXPORT bool isMultiPartOpenExrFile (const char fileName[]); - -IMF_EXPORT bool isOpenExrFile (IStream &is); - -IMF_EXPORT bool isOpenExrFile (IStream &is, - bool &isTiled); - -IMF_EXPORT bool isOpenExrFile (IStream &is, - bool &isTiled, - bool &isDeep); - -IMF_EXPORT bool isOpenExrFile (IStream &is, - bool &isTiled, - bool &isDeep, - bool &isMultiPart); - -IMF_EXPORT bool isTiledOpenExrFile (IStream &is); - -IMF_EXPORT bool isDeepOpenExrFile (IStream &is); - -IMF_EXPORT bool isMultiPartOpenExrFile (IStream &is); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfThreading.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfThreading.cpp deleted file mode 100644 index a3cf383..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfThreading.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// Threading support for the IlmImf library -// -//----------------------------------------------------------------------------- - -#include "ImfThreading.h" -#include "IlmThreadPool.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -int -globalThreadCount () -{ - return ILMTHREAD_NAMESPACE::ThreadPool::globalThreadPool().numThreads(); -} - - -void -setGlobalThreadCount (int count) -{ - ILMTHREAD_NAMESPACE::ThreadPool::globalThreadPool().setNumThreads (count); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfThreading.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfThreading.h deleted file mode 100644 index 4d1db04..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfThreading.h +++ /dev/null @@ -1,95 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMF_THREADING_H -#define INCLUDED_IMF_THREADING_H - -#include "ImfExport.h" -#include "ImfNamespace.h" - -//----------------------------------------------------------------------------- -// -// Threading support for the IlmImf library -// -// The IlmImf library uses threads to perform reading and writing -// of OpenEXR files in parallel. The thread that calls the library -// always performs the actual file IO (this is usually the main -// application thread) whereas a several worker threads perform -// data compression and decompression. The number of worker -// threads can be any non-negative value (a value of zero reverts -// to single-threaded operation). As long as there is at least -// one worker thread, file IO and compression can potentially be -// done concurrently through pinelining. If there are two or more -// worker threads, then pipelining as well as concurrent compression -// of multiple blocks can be performed. -// -// Threading in the Imf library is controllable at two granularities: -// -// * The functions in this file query and control the total number -// of worker threads, which will be created globally for the whole -// library. Regardless of how many input or output files are -// opened simultaneously, the library will use at most this number -// of worker threads to perform all work. The default number of -// global worker threads is zero (i.e. single-threaded operation; -// everything happens in the thread that calls the library). -// -// * Furthermore, it is possible to set the number of threads that -// each input or output file should keep busy. This number can -// be explicitly set for each file. The default behavior is for -// each file to try to occupy all worker threads in the library's -// thread pool. -// -//----------------------------------------------------------------------------- - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -//----------------------------------------------------------------------------- -// Return the number of Imf-global worker threads used for parallel -// compression and decompression of OpenEXR files. -//----------------------------------------------------------------------------- - -IMF_EXPORT int globalThreadCount (); - - -//----------------------------------------------------------------------------- -// Change the number of Imf-global worker threads -//----------------------------------------------------------------------------- - -IMF_EXPORT void setGlobalThreadCount (int count); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescription.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescription.h deleted file mode 100644 index 7b219c8..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescription.h +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_TILE_DESCRIPTION_H -#define INCLUDED_IMF_TILE_DESCRIPTION_H - -//----------------------------------------------------------------------------- -// -// class TileDescription and enum LevelMode -// -//----------------------------------------------------------------------------- -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -enum LevelMode -{ - ONE_LEVEL = 0, - MIPMAP_LEVELS = 1, - RIPMAP_LEVELS = 2, - - NUM_LEVELMODES // number of different level modes -}; - - -enum LevelRoundingMode -{ - ROUND_DOWN = 0, - ROUND_UP = 1, - - NUM_ROUNDINGMODES // number of different rounding modes -}; - - -class TileDescription -{ - public: - - unsigned int xSize; // size of a tile in the x dimension - unsigned int ySize; // size of a tile in the y dimension - LevelMode mode; - LevelRoundingMode roundingMode; - - TileDescription (unsigned int xs = 32, - unsigned int ys = 32, - LevelMode m = ONE_LEVEL, - LevelRoundingMode r = ROUND_DOWN) - : - xSize (xs), - ySize (ys), - mode (m), - roundingMode (r) - { - // empty - } - - bool - operator == (const TileDescription &other) const - { - return xSize == other.xSize && - ySize == other.ySize && - mode == other.mode && - roundingMode == other.roundingMode; - } -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp deleted file mode 100644 index 18aead5..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class TileDescriptionAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -TileDescriptionAttribute::staticTypeName () -{ - return "tiledesc"; -} - - -template <> -void -TileDescriptionAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.xSize); - Xdr::write (os, _value.ySize); - - unsigned char tmp = _value.mode | (_value.roundingMode << 4); - Xdr::write (os, tmp); -} - - -template <> -void -TileDescriptionAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - int size, - int version) -{ - Xdr::read (is, _value.xSize); - Xdr::read (is, _value.ySize); - - unsigned char tmp; - Xdr::read (is, tmp); - _value.mode = LevelMode (tmp & 0x0f); - _value.roundingMode = LevelRoundingMode ((tmp >> 4) & 0x0f); - -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.h deleted file mode 100644 index a8b69b9..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.h +++ /dev/null @@ -1,72 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_TILE_DESCRIPTION_ATTRIBUTE_H -#define INCLUDED_IMF_TILE_DESCRIPTION_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class TileDescriptionAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfTileDescription.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -typedef TypedAttribute TileDescriptionAttribute; - -template <> -IMF_EXPORT -const char * -TileDescriptionAttribute::staticTypeName (); - -template <> -IMF_EXPORT -void -TileDescriptionAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; - -template <> -IMF_EXPORT -void -TileDescriptionAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileOffsets.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileOffsets.cpp deleted file mode 100644 index b0b40f6..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileOffsets.cpp +++ /dev/null @@ -1,552 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class TileOffsets -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include "Iex.h" -#include "ImfNamespace.h" -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -TileOffsets::TileOffsets (LevelMode mode, - int numXLevels, int numYLevels, - const int *numXTiles, const int *numYTiles) -: - _mode (mode), - _numXLevels (numXLevels), - _numYLevels (numYLevels) -{ - switch (_mode) - { - case ONE_LEVEL: - case MIPMAP_LEVELS: - - _offsets.resize (_numXLevels); - - for (unsigned int l = 0; l < _offsets.size(); ++l) - { - _offsets[l].resize (numYTiles[l]); - - for (unsigned int dy = 0; dy < _offsets[l].size(); ++dy) - { - _offsets[l][dy].resize (numXTiles[l]); - } - } - break; - - case RIPMAP_LEVELS: - - _offsets.resize (_numXLevels * _numYLevels); - - for (int ly = 0; ly < _numYLevels; ++ly) - { - for (int lx = 0; lx < _numXLevels; ++lx) - { - int l = ly * _numXLevels + lx; - _offsets[l].resize (numYTiles[ly]); - - for (size_t dy = 0; dy < _offsets[l].size(); ++dy) - { - _offsets[l][dy].resize (numXTiles[lx]); - } - } - } - break; - - case NUM_LEVELMODES : - throw IEX_NAMESPACE::ArgExc("Bad initialisation of TileOffsets object"); - } -} - - -bool -TileOffsets::anyOffsetsAreInvalid () const -{ - for (unsigned int l = 0; l < _offsets.size(); ++l) - for (unsigned int dy = 0; dy < _offsets[l].size(); ++dy) - for (unsigned int dx = 0; dx < _offsets[l][dy].size(); ++dx) - if (_offsets[l][dy][dx] <= 0) - return true; - - return false; -} - - -void -TileOffsets::findTiles (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, bool isMultiPartFile, bool isDeep, bool skipOnly) -{ - for (unsigned int l = 0; l < _offsets.size(); ++l) - { - for (unsigned int dy = 0; dy < _offsets[l].size(); ++dy) - { - for (unsigned int dx = 0; dx < _offsets[l][dy].size(); ++dx) - { - Int64 tileOffset = is.tellg(); - - if (isMultiPartFile) - { - int partNumber; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, partNumber); - } - - int tileX; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, tileX); - - int tileY; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, tileY); - - int levelX; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, levelX); - - int levelY; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, levelY); - - if(isDeep) - { - Int64 packed_offset_table_size; - Int64 packed_sample_size; - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, packed_offset_table_size); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, packed_sample_size); - - // next Int64 is unpacked sample size - skip that too - Xdr::skip (is, packed_offset_table_size+packed_sample_size+8); - - }else{ - - int dataSize; - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, dataSize); - - Xdr::skip (is, dataSize); - } - if (skipOnly) continue; - - if (!isValidTile(tileX, tileY, levelX, levelY)) - return; - - operator () (tileX, tileY, levelX, levelY) = tileOffset; - } - } - } -} - - -void -TileOffsets::reconstructFromFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is,bool isMultiPart,bool isDeep) -{ - // - // Try to reconstruct a missing tile offset table by sequentially - // scanning through the file, and recording the offsets in the file - // of the tiles we find. - // - - Int64 position = is.tellg(); - - try - { - findTiles (is,isMultiPart,isDeep,false); - } - catch (...) - { - // - // Suppress all exceptions. This function is called only to - // reconstruct the tile offset table for incomplete files, - // and exceptions are likely. - // - } - - is.clear(); - is.seekg (position); -} - - -void -TileOffsets::readFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, bool &complete,bool isMultiPartFile, bool isDeep) -{ - // - // Read in the tile offsets from the file's tile offset table - // - - for (unsigned int l = 0; l < _offsets.size(); ++l) - for (unsigned int dy = 0; dy < _offsets[l].size(); ++dy) - for (unsigned int dx = 0; dx < _offsets[l][dy].size(); ++dx) - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (is, _offsets[l][dy][dx]); - - // - // Check if any tile offsets are invalid. - // - // Invalid offsets mean that the file is probably incomplete - // (the offset table is the last thing written to the file). - // Either some process is still busy writing the file, or - // writing the file was aborted. - // - // We should still be able to read the existing parts of the - // file. In order to do this, we have to make a sequential - // scan over the scan tile to reconstruct the tile offset - // table. - // - - if (anyOffsetsAreInvalid()) - { - complete = false; - reconstructFromFile (is,isMultiPartFile,isDeep); - } - else - { - complete = true; - } - -} - - -void -TileOffsets::readFrom (std::vector chunkOffsets,bool &complete) -{ - size_t totalSize = 0; - - for (unsigned int l = 0; l < _offsets.size(); ++l) - for (unsigned int dy = 0; dy < _offsets[l].size(); ++dy) - totalSize += _offsets[l][dy].size(); - - if (chunkOffsets.size() != totalSize) - throw IEX_NAMESPACE::ArgExc ("Wrong offset count, not able to read from this array"); - - - - int pos = 0; - for (size_t l = 0; l < _offsets.size(); ++l) - for (size_t dy = 0; dy < _offsets[l].size(); ++dy) - for (size_t dx = 0; dx < _offsets[l][dy].size(); ++dx) - { - _offsets[l][dy][dx] = chunkOffsets[pos]; - pos++; - } - - complete = !anyOffsetsAreInvalid(); - -} - - -Int64 -TileOffsets::writeTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os) const -{ - // - // Write the tile offset table to the file, and - // return the position of the start of the table - // in the file. - // - - Int64 pos = os.tellp(); - - if (pos == -1) - IEX_NAMESPACE::throwErrnoExc ("Cannot determine current file position (%T)."); - - for (unsigned int l = 0; l < _offsets.size(); ++l) - for (unsigned int dy = 0; dy < _offsets[l].size(); ++dy) - for (unsigned int dx = 0; dx < _offsets[l][dy].size(); ++dx) - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write (os, _offsets[l][dy][dx]); - - return pos; -} - -namespace { -struct tilepos{ - Int64 filePos; - int dx; - int dy; - int l; - bool operator <(const tilepos & other) const - { - return filePos < other.filePos; - } -}; -} -//------------------------------------- -// fill array with tile coordinates in the order they appear in the file -// -// each input array must be of size (totalTiles) -// -// -// if the tile order is not RANDOM_Y, it is more efficient to compute the -// tile ordering rather than using this function -// -//------------------------------------- -void TileOffsets::getTileOrder(int dx_table[],int dy_table[],int lx_table[],int ly_table[]) const -{ - // - // helper class - // - - // how many entries? - size_t entries=0; - for (unsigned int l = 0; l < _offsets.size(); ++l) - for (unsigned int dy = 0; dy < _offsets[l].size(); ++dy) - entries+=_offsets[l][dy].size(); - - std::vector table(entries); - - size_t i = 0; - for (unsigned int l = 0; l < _offsets.size(); ++l) - for (unsigned int dy = 0; dy < _offsets[l].size(); ++dy) - for (unsigned int dx = 0; dx < _offsets[l][dy].size(); ++dx) - { - table[i].filePos = _offsets[l][dy][dx]; - table[i].dx = dx; - table[i].dy = dy; - table[i].l = l; - - ++i; - - } - - std::sort(table.begin(),table.end()); - - // - // write out the values - // - - // pass 1: write out dx and dy, since these are independent of level mode - - for(size_t i=0;i 0 && - int(_offsets[0].size()) > dy && - int(_offsets[0][dy].size()) > dx) - { - return true; - } - - break; - - case MIPMAP_LEVELS: - - if (lx < _numXLevels && - ly < _numYLevels && - int(_offsets.size()) > lx && - int(_offsets[lx].size()) > dy && - int(_offsets[lx][dy].size()) > dx) - { - return true; - } - - break; - - case RIPMAP_LEVELS: - - if (lx < _numXLevels && - ly < _numYLevels && - (_offsets.size() > (size_t) lx+ ly * (size_t) _numXLevels) && - int(_offsets[lx + ly * _numXLevels].size()) > dy && - int(_offsets[lx + ly * _numXLevels][dy].size()) > dx) - { - return true; - } - - break; - - default: - - return false; - } - - return false; -} - - -Int64 & -TileOffsets::operator () (int dx, int dy, int lx, int ly) -{ - // - // Looks up the value of the tile with tile coordinate (dx, dy) - // and level number (lx, ly) in the _offsets array, and returns - // the cooresponding offset. - // - - switch (_mode) - { - case ONE_LEVEL: - - return _offsets[0][dy][dx]; - break; - - case MIPMAP_LEVELS: - - return _offsets[lx][dy][dx]; - break; - - case RIPMAP_LEVELS: - - return _offsets[lx + ly * _numXLevels][dy][dx]; - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown LevelMode format."); - } -} - - -Int64 & -TileOffsets::operator () (int dx, int dy, int l) -{ - return operator () (dx, dy, l, l); -} - - -const Int64 & -TileOffsets::operator () (int dx, int dy, int lx, int ly) const -{ - // - // Looks up the value of the tile with tile coordinate (dx, dy) - // and level number (lx, ly) in the _offsets array, and returns - // the cooresponding offset. - // - - switch (_mode) - { - case ONE_LEVEL: - - return _offsets[0][dy][dx]; - break; - - case MIPMAP_LEVELS: - - return _offsets[lx][dy][dx]; - break; - - case RIPMAP_LEVELS: - - return _offsets[lx + ly * _numXLevels][dy][dx]; - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown LevelMode format."); - } -} - - -const Int64 & -TileOffsets::operator () (int dx, int dy, int l) const -{ - return operator () (dx, dy, l, l); -} - -const std::vector > >& -TileOffsets::getOffsets() const -{ - return _offsets; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileOffsets.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileOffsets.h deleted file mode 100644 index d8c151e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTileOffsets.h +++ /dev/null @@ -1,125 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_TILE_OFFSETS_H -#define INCLUDED_IMF_TILE_OFFSETS_H - -//----------------------------------------------------------------------------- -// -// class TileOffsets -// -//----------------------------------------------------------------------------- - -#include "ImfTileDescription.h" -#include "ImfInt64.h" -#include -#include "ImfNamespace.h" -#include "ImfForward.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT TileOffsets -{ - public: - - TileOffsets (LevelMode mode = ONE_LEVEL, - int numXLevels = 0, - int numYLevels = 0, - const int *numXTiles = 0, - const int *numYTiles = 0); - - // -------- - // File I/O - // -------- - - void readFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, bool &complete,bool isMultiPart,bool isDeep); - void readFrom (std::vector chunkOffsets,bool &complete); - Int64 writeTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os) const; - - - //----------------------------------------------------------- - // Test if the tileOffsets array is empty (all entries are 0) - //----------------------------------------------------------- - - bool isEmpty () const; - - - - //----------------------------------------------------------- - // populate 'list' with tiles coordinates in the order they appear - // in the offset table (assumes full table! - // each array myst be at leat totalTiles long - //----------------------------------------------------------- - void getTileOrder(int dx_table[], int dy_table[], int lx_table[], int ly_table[]) const; - - - //----------------------- - // Access to the elements - //----------------------- - - Int64 & operator () (int dx, int dy, int lx, int ly); - Int64 & operator () (int dx, int dy, int l); - const Int64 & operator () (int dx, int dy, int lx, int ly) const; - const Int64 & operator () (int dx, int dy, int l) const; - bool isValidTile (int dx, int dy, int lx, int ly) const; - const std::vector > >& getOffsets() const; - - private: - - void findTiles (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, bool isMultiPartFile, - bool isDeep, - bool skipOnly); - void reconstructFromFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is,bool isMultiPartFile,bool isDeep); - bool readTile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is); - bool anyOffsetsAreInvalid () const; - - LevelMode _mode; - int _numXLevels; - int _numYLevels; - - std::vector > > _offsets; - -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp deleted file mode 100644 index cd244cc..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp +++ /dev/null @@ -1,1533 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class TiledInputFile -// -//----------------------------------------------------------------------------- - -#include "ImfTiledInputFile.h" -#include "ImfTileDescriptionAttribute.h" -#include "ImfChannelList.h" -#include "ImfMisc.h" -#include "ImfTiledMisc.h" -#include "ImfStdIO.h" -#include "ImfCompressor.h" -#include "ImfXdr.h" -#include "ImfConvert.h" -#include "ImfVersion.h" -#include "ImfTileOffsets.h" -#include "ImfThreading.h" -#include "ImfPartType.h" -#include "ImfMultiPartInputFile.h" -#include "ImfInputStreamMutex.h" -#include "IlmThreadPool.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" -#include "ImathVec.h" -#include "Iex.h" -#include -#include -#include -#include -#include "ImfInputPartData.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::V2i; -using std::string; -using std::vector; -using std::min; -using std::max; -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; -using ILMTHREAD_NAMESPACE::Semaphore; -using ILMTHREAD_NAMESPACE::Task; -using ILMTHREAD_NAMESPACE::TaskGroup; -using ILMTHREAD_NAMESPACE::ThreadPool; - -namespace { - -struct TInSliceInfo -{ - PixelType typeInFrameBuffer; - PixelType typeInFile; - char * base; - size_t xStride; - size_t yStride; - bool fill; - bool skip; - double fillValue; - int xTileCoords; - int yTileCoords; - - TInSliceInfo (PixelType typeInFrameBuffer = HALF, - PixelType typeInFile = HALF, - char *base = 0, - size_t xStride = 0, - size_t yStride = 0, - bool fill = false, - bool skip = false, - double fillValue = 0.0, - int xTileCoords = 0, - int yTileCoords = 0); -}; - - -TInSliceInfo::TInSliceInfo (PixelType tifb, - PixelType tifl, - char *b, - size_t xs, size_t ys, - bool f, bool s, - double fv, - int xtc, - int ytc) -: - typeInFrameBuffer (tifb), - typeInFile (tifl), - base (b), - xStride (xs), - yStride (ys), - fill (f), - skip (s), - fillValue (fv), - xTileCoords (xtc), - yTileCoords (ytc) -{ - // empty -} - - -struct TileBuffer -{ - const char * uncompressedData; - char * buffer; - int dataSize; - Compressor * compressor; - Compressor::Format format; - int dx; - int dy; - int lx; - int ly; - bool hasException; - string exception; - - TileBuffer (Compressor * const comp); - ~TileBuffer (); - - inline void wait () {_sem.wait();} - inline void post () {_sem.post();} - - protected: - - Semaphore _sem; -}; - - -TileBuffer::TileBuffer (Compressor *comp): - uncompressedData (0), - buffer (0), - dataSize (0), - compressor (comp), - format (defaultFormat (compressor)), - dx (-1), - dy (-1), - lx (-1), - ly (-1), - hasException (false), - exception (), - _sem (1) -{ - // empty -} - - -TileBuffer::~TileBuffer () -{ - delete compressor; -} - -} // namespace - - -class MultiPartInputFile; - - -// -// struct TiledInputFile::Data stores things that will be -// needed between calls to readTile() -// - -struct TiledInputFile::Data: public Mutex -{ - Header header; // the image header - TileDescription tileDesc; // describes the tile layout - int version; // file's version - FrameBuffer frameBuffer; // framebuffer to write into - LineOrder lineOrder; // the file's lineorder - int minX; // data window's min x coord - int maxX; // data window's max x coord - int minY; // data window's min y coord - int maxY; // data window's max x coord - - int numXLevels; // number of x levels - int numYLevels; // number of y levels - int * numXTiles; // number of x tiles at a level - int * numYTiles; // number of y tiles at a level - - TileOffsets tileOffsets; // stores offsets in file for - // each tile - - bool fileIsComplete; // True if no tiles are missing - // in the file - - vector slices; // info about channels in file - - size_t bytesPerPixel; // size of an uncompressed pixel - - size_t maxBytesPerTileLine; // combined size of a line - // over all channels - - int partNumber; // part number - - bool multiPartBackwardSupport; // if we are reading a multipart file - // using OpenEXR 1.7 API - - int numThreads; // number of threads - - MultiPartInputFile* multiPartFile; // the MultiPartInputFile used to - // support backward compatibility - - vector tileBuffers; // each holds a single tile - size_t tileBufferSize; // size of the tile buffers - - bool memoryMapped; // if the stream is memory mapped - - InputStreamMutex * _streamData; - bool _deleteStream; - - Data (int numThreads); - ~Data (); - - inline TileBuffer * getTileBuffer (int number); - // hash function from tile indices - // into our vector of tile buffers -}; - - -TiledInputFile::Data::Data (int numThreads): - numXTiles (0), - numYTiles (0), - partNumber (-1), - multiPartBackwardSupport(false), - numThreads(numThreads), - memoryMapped(false), - _streamData(NULL), - _deleteStream(false) -{ - // - // We need at least one tileBuffer, but if threading is used, - // to keep n threads busy we need 2*n tileBuffers - // - - tileBuffers.resize (max (1, 2 * numThreads)); -} - - -TiledInputFile::Data::~Data () -{ - delete [] numXTiles; - delete [] numYTiles; - - for (size_t i = 0; i < tileBuffers.size(); i++) - delete tileBuffers[i]; - - if (multiPartBackwardSupport) - delete multiPartFile; -} - - -TileBuffer* -TiledInputFile::Data::getTileBuffer (int number) -{ - return tileBuffers[number % tileBuffers.size()]; -} - - -namespace { - -void -readTileData (InputStreamMutex *streamData, - TiledInputFile::Data *ifd, - int dx, int dy, - int lx, int ly, - char *&buffer, - int &dataSize) -{ - // - // Read a single tile block from the file and into the array pointed - // to by buffer. If the file is memory-mapped, then we change where - // buffer points instead of writing into the array (hence buffer needs - // to be a reference to a char *). - // - - // - // Look up the location for this tile in the Index and - // seek to that position if necessary - // - - Int64 tileOffset = ifd->tileOffsets (dx, dy, lx, ly); - - if (tileOffset == 0) - { - THROW (IEX_NAMESPACE::InputExc, "Tile (" << dx << ", " << dy << ", " << - lx << ", " << ly << ") is missing."); - } - - - // - // In a multi-part file, the next chunk does not need to - // belong to the same part, so we have to compare the - // offset here. - // - - if (!isMultiPart(ifd->version)) - { - if (streamData->currentPosition != tileOffset) - streamData->is->seekg (tileOffset); - } - else - { - // - // In a multi-part file, the file pointer may be moved by other - // parts, so we have to ask tellg() where we are. - // - if (streamData->is->tellg() != tileOffset) - streamData->is->seekg (tileOffset); - } - - // - // Read the first few bytes of the tile (the header). - // Verify that the tile coordinates and the level number - // are correct. - // - - int tileXCoord, tileYCoord, levelX, levelY; - - if (isMultiPart(ifd->version)) - { - int partNumber; - Xdr::read (*streamData->is, partNumber); - if (partNumber != ifd->partNumber) - { - THROW (IEX_NAMESPACE::ArgExc, "Unexpected part number " << partNumber - << ", should be " << ifd->partNumber << "."); - } - } - - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, tileXCoord); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, tileYCoord); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, levelX); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, levelY); - OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read (*streamData->is, dataSize); - - if (tileXCoord != dx) - throw IEX_NAMESPACE::InputExc ("Unexpected tile x coordinate."); - - if (tileYCoord != dy) - throw IEX_NAMESPACE::InputExc ("Unexpected tile y coordinate."); - - if (levelX != lx) - throw IEX_NAMESPACE::InputExc ("Unexpected tile x level number coordinate."); - - if (levelY != ly) - throw IEX_NAMESPACE::InputExc ("Unexpected tile y level number coordinate."); - - if (dataSize > (int) ifd->tileBufferSize) - throw IEX_NAMESPACE::InputExc ("Unexpected tile block length."); - - // - // Read the pixel data. - // - - if (streamData->is->isMemoryMapped ()) - buffer = streamData->is->readMemoryMapped (dataSize); - else - streamData->is->read (buffer, dataSize); - - // - // Keep track of which tile is the next one in - // the file, so that we can avoid redundant seekg() - // operations (seekg() can be fairly expensive). - // - - streamData->currentPosition = tileOffset + 5 * Xdr::size() + dataSize; -} - - -void -readNextTileData (InputStreamMutex *streamData, - TiledInputFile::Data *ifd, - int &dx, int &dy, - int &lx, int &ly, - char * & buffer, - int &dataSize) -{ - // - // Read the next tile block from the file - // - - if(isMultiPart(ifd->version)) - { - int part; - Xdr::read (*streamData->is, part); - if(part!=ifd->partNumber) - { - throw IEX_NAMESPACE::InputExc("Unexpected part number in readNextTileData"); - } - } - - // - // Read the first few bytes of the tile (the header). - // - - Xdr::read (*streamData->is, dx); - Xdr::read (*streamData->is, dy); - Xdr::read (*streamData->is, lx); - Xdr::read (*streamData->is, ly); - Xdr::read (*streamData->is, dataSize); - - if (dataSize > (int) ifd->tileBufferSize) - throw IEX_NAMESPACE::InputExc ("Unexpected tile block length."); - - // - // Read the pixel data. - // - - streamData->is->read (buffer, dataSize); - - // - // Keep track of which tile is the next one in - // the file, so that we can avoid redundant seekg() - // operations (seekg() can be fairly expensive). - // - - streamData->currentPosition += 5 * Xdr::size() + dataSize; -} - - -// -// A TileBufferTask encapsulates the task of uncompressing -// a single tile and copying it into the frame buffer. -// - -class TileBufferTask : public Task -{ - public: - - TileBufferTask (TaskGroup *group, - TiledInputFile::Data *ifd, - TileBuffer *tileBuffer); - - virtual ~TileBufferTask (); - - virtual void execute (); - - private: - - TiledInputFile::Data * _ifd; - TileBuffer * _tileBuffer; -}; - - -TileBufferTask::TileBufferTask - (TaskGroup *group, - TiledInputFile::Data *ifd, - TileBuffer *tileBuffer) -: - Task (group), - _ifd (ifd), - _tileBuffer (tileBuffer) -{ - // empty -} - - -TileBufferTask::~TileBufferTask () -{ - // - // Signal that the tile buffer is now free - // - - _tileBuffer->post (); -} - - -void -TileBufferTask::execute () -{ - try - { - // - // Calculate information about the tile - // - - Box2i tileRange = OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForTile ( - _ifd->tileDesc, - _ifd->minX, _ifd->maxX, - _ifd->minY, _ifd->maxY, - _tileBuffer->dx, - _tileBuffer->dy, - _tileBuffer->lx, - _tileBuffer->ly); - - int numPixelsPerScanLine = tileRange.max.x - tileRange.min.x + 1; - - int numPixelsInTile = numPixelsPerScanLine * - (tileRange.max.y - tileRange.min.y + 1); - - int sizeOfTile = _ifd->bytesPerPixel * numPixelsInTile; - - - // - // Uncompress the data, if necessary - // - - if (_tileBuffer->compressor && _tileBuffer->dataSize < sizeOfTile) - { - _tileBuffer->format = _tileBuffer->compressor->format(); - - _tileBuffer->dataSize = _tileBuffer->compressor->uncompressTile - (_tileBuffer->buffer, _tileBuffer->dataSize, - tileRange, _tileBuffer->uncompressedData); - } - else - { - // - // If the line is uncompressed, it's in XDR format, - // regardless of the compressor's output format. - // - - _tileBuffer->format = Compressor::XDR; - _tileBuffer->uncompressedData = _tileBuffer->buffer; - } - - // - // Convert the tile of pixel data back from the machine-independent - // representation, and store the result in the frame buffer. - // - - const char *readPtr = _tileBuffer->uncompressedData; - // points to where we - // read from in the - // tile block - - // - // Iterate over the scan lines in the tile. - // - - for (int y = tileRange.min.y; y <= tileRange.max.y; ++y) - { - // - // Iterate over all image channels. - // - - for (unsigned int i = 0; i < _ifd->slices.size(); ++i) - { - const TInSliceInfo &slice = _ifd->slices[i]; - - // - // These offsets are used to facilitate both - // absolute and tile-relative pixel coordinates. - // - - int xOffset = slice.xTileCoords * tileRange.min.x; - int yOffset = slice.yTileCoords * tileRange.min.y; - - // - // Fill the frame buffer with pixel data. - // - - if (slice.skip) - { - // - // The file contains data for this channel, but - // the frame buffer contains no slice for this channel. - // - - skipChannel (readPtr, slice.typeInFile, - numPixelsPerScanLine); - } - else - { - // - // The frame buffer contains a slice for this channel. - // - - char *writePtr = slice.base + - (y - yOffset) * slice.yStride + - (tileRange.min.x - xOffset) * - slice.xStride; - - char *endPtr = writePtr + - (numPixelsPerScanLine - 1) * slice.xStride; - - copyIntoFrameBuffer (readPtr, writePtr, endPtr, - slice.xStride, - slice.fill, slice.fillValue, - _tileBuffer->format, - slice.typeInFrameBuffer, - slice.typeInFile); - } - } - } - } - catch (std::exception &e) - { - if (!_tileBuffer->hasException) - { - _tileBuffer->exception = e.what (); - _tileBuffer->hasException = true; - } - } - catch (...) - { - if (!_tileBuffer->hasException) - { - _tileBuffer->exception = "unrecognized exception"; - _tileBuffer->hasException = true; - } - } -} - - -TileBufferTask * -newTileBufferTask - (TaskGroup *group, - InputStreamMutex *streamData, - TiledInputFile::Data *ifd, - int number, - int dx, int dy, - int lx, int ly) -{ - // - // Wait for a tile buffer to become available, - // fill the buffer with raw data from the file, - // and create a new TileBufferTask whose execute() - // method will uncompress the tile and copy the - // tile's pixels into the frame buffer. - // - - TileBuffer *tileBuffer = ifd->getTileBuffer (number); - - try - { - tileBuffer->wait(); - - tileBuffer->dx = dx; - tileBuffer->dy = dy; - tileBuffer->lx = lx; - tileBuffer->ly = ly; - - tileBuffer->uncompressedData = 0; - - readTileData (streamData, ifd, dx, dy, lx, ly, - tileBuffer->buffer, - tileBuffer->dataSize); - } - catch (...) - { - // - // Reading from the file caused an exception. - // Signal that the tile buffer is free, and - // re-throw the exception. - // - - tileBuffer->post(); - throw; - } - - return new TileBufferTask (group, ifd, tileBuffer); -} - - -} // namespace - - -TiledInputFile::TiledInputFile (const char fileName[], int numThreads): - _data (new Data (numThreads)) -{ - _data->_streamData=NULL; - _data->_deleteStream=true; - - // - // This constructor is called when a user - // explicitly wants to read a tiled file. - // - - - IStream* is = 0; - try - { - is = new StdIFStream (fileName); - readMagicNumberAndVersionField(*is, _data->version); - - // - // Backward compatibility to read multpart file. - // - if (isMultiPart(_data->version)) - { - compatibilityInitialize(*is); - return; - } - - _data->_streamData = new InputStreamMutex(); - _data->_streamData->is = is; - _data->header.readFrom (*_data->_streamData->is, _data->version); - initialize(); - //read tile offsets - we are not multipart or deep - _data->tileOffsets.readFrom (*(_data->_streamData->is), _data->fileIsComplete,false,false); - _data->_streamData->currentPosition = _data->_streamData->is->tellg(); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (_data->_streamData != 0) - { - if (_data->_streamData->is != 0) - { - delete _data->_streamData->is; - _data->_streamData->is = is = 0; - } - - delete _data->_streamData; - } - - if (is != 0) - delete is; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - if ( _data->_streamData != 0) - { - if ( _data->_streamData->is != 0) - { - delete _data->_streamData->is; - _data->_streamData->is = is = 0; - } - - delete _data->_streamData; - } - - if (is != 0) - delete is; - throw; - } -} - - -TiledInputFile::TiledInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads): - _data (new Data (numThreads)) -{ - _data->_deleteStream=false; - // - // This constructor is called when a user - // explicitly wants to read a tiled file. - // - - bool streamDataCreated = false; - - try - { - readMagicNumberAndVersionField(is, _data->version); - - // - // Backward compatibility to read multpart file. - // - if (isMultiPart(_data->version)) - { - compatibilityInitialize(is); - return; - } - - streamDataCreated = true; - _data->_streamData = new InputStreamMutex(); - _data->_streamData->is = &is; - _data->header.readFrom (*_data->_streamData->is, _data->version); - initialize(); - // file is guaranteed to be single part, regular image - _data->tileOffsets.readFrom (*(_data->_streamData->is), _data->fileIsComplete,false,false); - _data->memoryMapped = _data->_streamData->is->isMemoryMapped(); - _data->_streamData->currentPosition = _data->_streamData->is->tellg(); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - if (streamDataCreated) delete _data->_streamData; - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << is.fileName() << "\". " << e); - throw; - } - catch (...) - { - if (streamDataCreated) delete _data->_streamData; - delete _data; - throw; - } -} - - -TiledInputFile::TiledInputFile (const Header &header, - OPENEXR_IMF_INTERNAL_NAMESPACE::IStream *is, - int version, - int numThreads) : - _data (new Data (numThreads)) -{ - _data->_deleteStream=false; - _data->_streamData = new InputStreamMutex(); - // - // This constructor called by class Imf::InputFile - // when a user wants to just read an image file, and - // doesn't care or know if the file is tiled. - // No need to have backward compatibility here, because - // we have somehow got the header. - // - - _data->_streamData->is = is; - _data->header = header; - _data->version = version; - initialize(); - _data->tileOffsets.readFrom (*(_data->_streamData->is),_data->fileIsComplete,false,false); - _data->memoryMapped = is->isMemoryMapped(); - _data->_streamData->currentPosition = _data->_streamData->is->tellg(); -} - - -TiledInputFile::TiledInputFile (InputPartData* part) -{ - _data = new Data (part->numThreads); - _data->_deleteStream=false; - multiPartInitialize(part); -} - - -void -TiledInputFile::compatibilityInitialize(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is) -{ - is.seekg(0); - // - // Construct a MultiPartInputFile, initialize TiledInputFile - // with the part 0 data. - // (TODO) maybe change the third parameter of the constructor of MultiPartInputFile later. - // - _data->multiPartBackwardSupport = true; - _data->multiPartFile = new MultiPartInputFile(is, _data->numThreads); - InputPartData* part = _data->multiPartFile->getPart(0); - - multiPartInitialize(part); -} - - -void -TiledInputFile::multiPartInitialize(InputPartData* part) -{ - if (part->header.type() != TILEDIMAGE) - throw IEX_NAMESPACE::ArgExc("Can't build a TiledInputFile from a type-mismatched part."); - - _data->_streamData = part->mutex; - _data->header = part->header; - _data->version = part->version; - _data->partNumber = part->partNumber; - _data->memoryMapped = _data->_streamData->is->isMemoryMapped(); - initialize(); - _data->tileOffsets.readFrom(part->chunkOffsets,_data->fileIsComplete); - _data->_streamData->currentPosition = _data->_streamData->is->tellg(); -} - - -void -TiledInputFile::initialize () -{ - // fix bad types in header (arises when a tool built against an older version of - // OpenEXR converts a scanline image to tiled) - // only applies when file is a single part, regular image, tiled file - // - if(!isMultiPart(_data->version) && - !isNonImage(_data->version) && - isTiled(_data->version) && - _data->header.hasType() ) - { - _data->header.setType(TILEDIMAGE); - } - - if (_data->partNumber == -1) - { - if (!isTiled (_data->version)) - throw IEX_NAMESPACE::ArgExc ("Expected a tiled file but the file is not tiled."); - - } - else - { - if(_data->header.hasType() && _data->header.type()!=TILEDIMAGE) - { - throw IEX_NAMESPACE::ArgExc ("TiledInputFile used for non-tiledimage part."); - } - } - - _data->header.sanityCheck (true); - - _data->tileDesc = _data->header.tileDescription(); - _data->lineOrder = _data->header.lineOrder(); - - // - // Save the dataWindow information - // - - const Box2i &dataWindow = _data->header.dataWindow(); - _data->minX = dataWindow.min.x; - _data->maxX = dataWindow.max.x; - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - // - // Precompute level and tile information to speed up utility functions - // - - precalculateTileInfo (_data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - _data->numXTiles, _data->numYTiles, - _data->numXLevels, _data->numYLevels); - - _data->bytesPerPixel = calculateBytesPerPixel (_data->header); - - _data->maxBytesPerTileLine = _data->bytesPerPixel * _data->tileDesc.xSize; - - _data->tileBufferSize = _data->maxBytesPerTileLine * _data->tileDesc.ySize; - - // - // Create all the TileBuffers and allocate their internal buffers - // - - for (size_t i = 0; i < _data->tileBuffers.size(); i++) - { - _data->tileBuffers[i] = new TileBuffer (newTileCompressor - (_data->header.compression(), - _data->maxBytesPerTileLine, - _data->tileDesc.ySize, - _data->header)); - - if (!_data->_streamData->is->isMemoryMapped ()) - _data->tileBuffers[i]->buffer = new char [_data->tileBufferSize]; - } - - _data->tileOffsets = TileOffsets (_data->tileDesc.mode, - _data->numXLevels, - _data->numYLevels, - _data->numXTiles, - _data->numYTiles); -} - - -TiledInputFile::~TiledInputFile () -{ - if (!_data->memoryMapped) - for (size_t i = 0; i < _data->tileBuffers.size(); i++) - delete [] _data->tileBuffers[i]->buffer; - - if (_data->_deleteStream) - delete _data->_streamData->is; - - if (_data->partNumber == -1) - delete _data->_streamData; - - delete _data; -} - - -const char * -TiledInputFile::fileName () const -{ - return _data->_streamData->is->fileName(); -} - - -const Header & -TiledInputFile::header () const -{ - return _data->header; -} - - -int -TiledInputFile::version () const -{ - return _data->version; -} - - -void -TiledInputFile::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - Lock lock (*_data->_streamData); - - // - // Set the frame buffer - // - - // - // Check if the new frame buffer descriptor is - // compatible with the image file header. - // - - const ChannelList &channels = _data->header.channels(); - - for (FrameBuffer::ConstIterator j = frameBuffer.begin(); - j != frameBuffer.end(); - ++j) - { - ChannelList::ConstIterator i = channels.find (j.name()); - - if (i == channels.end()) - continue; - - if (i.channel().xSampling != j.slice().xSampling || - i.channel().ySampling != j.slice().ySampling) - THROW (IEX_NAMESPACE::ArgExc, "X and/or y subsampling factors " - "of \"" << i.name() << "\" channel " - "of input file \"" << fileName() << "\" are " - "not compatible with the frame buffer's " - "subsampling factors."); - } - - // - // Initialize the slice table for readPixels(). - // - - vector slices; - ChannelList::ConstIterator i = channels.begin(); - - for (FrameBuffer::ConstIterator j = frameBuffer.begin(); - j != frameBuffer.end(); - ++j) - { - while (i != channels.end() && strcmp (i.name(), j.name()) < 0) - { - // - // Channel i is present in the file but not - // in the frame buffer; data for channel i - // will be skipped during readPixels(). - // - - slices.push_back (TInSliceInfo (i.channel().type, - i.channel().type, - 0, // base - 0, // xStride - 0, // yStride - false, // fill - true, // skip - 0.0)); // fillValue - ++i; - } - - bool fill = false; - - if (i == channels.end() || strcmp (i.name(), j.name()) > 0) - { - // - // Channel i is present in the frame buffer, but not in the file. - // In the frame buffer, slice j will be filled with a default value. - // - - fill = true; - } - - slices.push_back (TInSliceInfo (j.slice().type, - fill? j.slice().type: i.channel().type, - j.slice().base, - j.slice().xStride, - j.slice().yStride, - fill, - false, // skip - j.slice().fillValue, - (j.slice().xTileCoords)? 1: 0, - (j.slice().yTileCoords)? 1: 0)); - - if (i != channels.end() && !fill) - ++i; - } - - while (i != channels.end()) - { - // - // Channel i is present in the file but not - // in the frame buffer; data for channel i - // will be skipped during readPixels(). - // - - slices.push_back (TInSliceInfo (i.channel().type, - i.channel().type, - 0, // base - 0, // xStride - 0, // yStride - false, // fill - true, // skip - 0.0)); // fillValue - ++i; - } - - // - // Store the new frame buffer. - // - - _data->frameBuffer = frameBuffer; - _data->slices = slices; -} - - -const FrameBuffer & -TiledInputFile::frameBuffer () const -{ - Lock lock (*_data->_streamData); - return _data->frameBuffer; -} - - -bool -TiledInputFile::isComplete () const -{ - return _data->fileIsComplete; -} - - -void -TiledInputFile::readTiles (int dx1, int dx2, int dy1, int dy2, int lx, int ly) -{ - // - // Read a range of tiles from the file into the framebuffer - // - - try - { - Lock lock (*_data->_streamData); - - if (_data->slices.size() == 0) - throw IEX_NAMESPACE::ArgExc ("No frame buffer specified " - "as pixel data destination."); - - if (!isValidLevel (lx, ly)) - THROW (IEX_NAMESPACE::ArgExc, - "Level coordinate " - "(" << lx << ", " << ly << ") " - "is invalid."); - - // - // Determine the first and last tile coordinates in both dimensions. - // We always attempt to read the range of tiles in the order that - // they are stored in the file. - // - - if (dx1 > dx2) - std::swap (dx1, dx2); - - if (dy1 > dy2) - std::swap (dy1, dy2); - - int dyStart = dy1; - int dyStop = dy2 + 1; - int dY = 1; - - if (_data->lineOrder == DECREASING_Y) - { - dyStart = dy2; - dyStop = dy1 - 1; - dY = -1; - } - - // - // Create a task group for all tile buffer tasks. When the - // task group goes out of scope, the destructor waits until - // all tasks are complete. - // - - { - TaskGroup taskGroup; - int tileNumber = 0; - - for (int dy = dyStart; dy != dyStop; dy += dY) - { - for (int dx = dx1; dx <= dx2; dx++) - { - if (!isValidTile (dx, dy, lx, ly)) - THROW (IEX_NAMESPACE::ArgExc, - "Tile (" << dx << ", " << dy << ", " << - lx << "," << ly << ") is not a valid tile."); - - ThreadPool::addGlobalTask (newTileBufferTask (&taskGroup, - _data->_streamData, - _data, - tileNumber++, - dx, dy, - lx, ly)); - } - } - - // - // finish all tasks - // - } - - // - // Exeption handling: - // - // TileBufferTask::execute() may have encountered exceptions, but - // those exceptions occurred in another thread, not in the thread - // that is executing this call to TiledInputFile::readTiles(). - // TileBufferTask::execute() has caught all exceptions and stored - // the exceptions' what() strings in the tile buffers. - // Now we check if any tile buffer contains a stored exception; if - // this is the case then we re-throw the exception in this thread. - // (It is possible that multiple tile buffers contain stored - // exceptions. We re-throw the first exception we find and - // ignore all others.) - // - - const string *exception = 0; - - for (size_t i = 0; i < _data->tileBuffers.size(); ++i) - { - TileBuffer *tileBuffer = _data->tileBuffers[i]; - - if (tileBuffer->hasException && !exception) - exception = &tileBuffer->exception; - - tileBuffer->hasException = false; - } - - if (exception) - throw IEX_NAMESPACE::IoExc (*exception); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error reading pixel data from image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -void -TiledInputFile::readTiles (int dx1, int dx2, int dy1, int dy2, int l) -{ - readTiles (dx1, dx2, dy1, dy2, l, l); -} - - -void -TiledInputFile::readTile (int dx, int dy, int lx, int ly) -{ - readTiles (dx, dx, dy, dy, lx, ly); -} - - -void -TiledInputFile::readTile (int dx, int dy, int l) -{ - readTile (dx, dy, l, l); -} - - -void -TiledInputFile::rawTileData (int &dx, int &dy, - int &lx, int &ly, - const char *&pixelData, - int &pixelDataSize) -{ - try - { - Lock lock (*_data->_streamData); - - if (!isValidTile (dx, dy, lx, ly)) - throw IEX_NAMESPACE::ArgExc ("Tried to read a tile outside " - "the image file's data window."); - - TileBuffer *tileBuffer = _data->getTileBuffer (0); - - // - // if file is a multipart file, we have to seek to the required tile - // since we don't know where the file pointer is - // - int old_dx=dx; - int old_dy=dy; - int old_lx=lx; - int old_ly=ly; - if(isMultiPart(version())) - { - _data->_streamData->is->seekg(_data->tileOffsets(dx,dy,lx,ly)); - } - readNextTileData (_data->_streamData, _data, dx, dy, lx, ly, - tileBuffer->buffer, - pixelDataSize); - if(isMultiPart(version())) - { - if (old_dx!=dx || old_dy !=dy || old_lx!=lx || old_ly!=ly) - { - throw IEX_NAMESPACE::ArgExc ("rawTileData read the wrong tile"); - } - } - pixelData = tileBuffer->buffer; - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error reading pixel data from image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -unsigned int -TiledInputFile::tileXSize () const -{ - return _data->tileDesc.xSize; -} - - -unsigned int -TiledInputFile::tileYSize () const -{ - return _data->tileDesc.ySize; -} - - -LevelMode -TiledInputFile::levelMode () const -{ - return _data->tileDesc.mode; -} - - -LevelRoundingMode -TiledInputFile::levelRoundingMode () const -{ - return _data->tileDesc.roundingMode; -} - - -int -TiledInputFile::numLevels () const -{ - if (levelMode() == RIPMAP_LEVELS) - THROW (IEX_NAMESPACE::LogicExc, "Error calling numLevels() on image " - "file \"" << fileName() << "\" " - "(numLevels() is not defined for files " - "with RIPMAP level mode)."); - - return _data->numXLevels; -} - - -int -TiledInputFile::numXLevels () const -{ - return _data->numXLevels; -} - - -int -TiledInputFile::numYLevels () const -{ - return _data->numYLevels; -} - - -bool -TiledInputFile::isValidLevel (int lx, int ly) const -{ - if (lx < 0 || ly < 0) - return false; - - if (levelMode() == MIPMAP_LEVELS && lx != ly) - return false; - - if (lx >= numXLevels() || ly >= numYLevels()) - return false; - - return true; -} - - -int -TiledInputFile::levelWidth (int lx) const -{ - try - { - return levelSize (_data->minX, _data->maxX, lx, - _data->tileDesc.roundingMode); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling levelWidth() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -int -TiledInputFile::levelHeight (int ly) const -{ - try - { - return levelSize (_data->minY, _data->maxY, ly, - _data->tileDesc.roundingMode); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling levelHeight() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -int -TiledInputFile::numXTiles (int lx) const -{ - if (lx < 0 || lx >= _data->numXLevels) - { - THROW (IEX_NAMESPACE::ArgExc, "Error calling numXTiles() on image " - "file \"" << _data->_streamData->is->fileName() << "\" " - "(Argument is not in valid range)."); - - } - - return _data->numXTiles[lx]; -} - - -int -TiledInputFile::numYTiles (int ly) const -{ - if (ly < 0 || ly >= _data->numYLevels) - { - THROW (IEX_NAMESPACE::ArgExc, "Error calling numYTiles() on image " - "file \"" << _data->_streamData->is->fileName() << "\" " - "(Argument is not in valid range)."); - } - - return _data->numYTiles[ly]; -} - - -Box2i -TiledInputFile::dataWindowForLevel (int l) const -{ - return dataWindowForLevel (l, l); -} - - -Box2i -TiledInputFile::dataWindowForLevel (int lx, int ly) const -{ - try - { - return OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForLevel ( - _data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - lx, ly); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling dataWindowForLevel() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -Box2i -TiledInputFile::dataWindowForTile (int dx, int dy, int l) const -{ - return dataWindowForTile (dx, dy, l, l); -} - - -Box2i -TiledInputFile::dataWindowForTile (int dx, int dy, int lx, int ly) const -{ - try - { - if (!isValidTile (dx, dy, lx, ly)) - throw IEX_NAMESPACE::ArgExc ("Arguments not in valid range."); - - return OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForTile ( - _data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - dx, dy, lx, ly); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling dataWindowForTile() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -bool -TiledInputFile::isValidTile (int dx, int dy, int lx, int ly) const -{ - return ((lx < _data->numXLevels && lx >= 0) && - (ly < _data->numYLevels && ly >= 0) && - (dx < _data->numXTiles[lx] && dx >= 0) && - (dy < _data->numYTiles[ly] && dy >= 0)); -} - -void TiledInputFile::tileOrder(int dx[], int dy[], int lx[], int ly[]) const -{ - return _data->tileOffsets.getTileOrder(dx,dy,lx,ly); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputFile.h deleted file mode 100644 index 108ec7a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputFile.h +++ /dev/null @@ -1,401 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_TILED_INPUT_FILE_H -#define INCLUDED_IMF_TILED_INPUT_FILE_H - -//----------------------------------------------------------------------------- -// -// class TiledInputFile -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfFrameBuffer.h" -#include "ImathBox.h" -#include "ImfTileDescription.h" -#include "ImfThreading.h" -#include "ImfGenericInputFile.h" -#include "ImfTiledOutputFile.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT TiledInputFile : public GenericInputFile -{ - public: - - //-------------------------------------------------------------------- - // A constructor that opens the file with the specified name, and - // reads the file header. The constructor throws an IEX_NAMESPACE::ArgExc - // exception if the file is not tiled. - // The numThreads parameter specifies how many worker threads this - // file will try to keep busy when decompressing individual tiles. - // Destroying TiledInputFile objects constructed with this constructor - // automatically closes the corresponding files. - //-------------------------------------------------------------------- - - TiledInputFile (const char fileName[], - int numThreads = globalThreadCount ()); - - - // ---------------------------------------------------------- - // A constructor that attaches the new TiledInputFile object - // to a file that has already been opened. - // Destroying TiledInputFile objects constructed with this - // constructor does not automatically close the corresponding - // files. - // ---------------------------------------------------------- - - TiledInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads = globalThreadCount ()); - - - //----------- - // Destructor - //----------- - - virtual ~TiledInputFile (); - - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //---------------------------------- - // Access to the file format version - //---------------------------------- - - int version () const; - - - //----------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the TiledInputFile object. - // - // The current frame buffer is the destination for the pixel - // data read from the file. The current frame buffer must be - // set at least once before readTile() is called. - // The current frame buffer can be changed after each call - // to readTile(). - //----------------------------------------------------------- - - void setFrameBuffer (const FrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const FrameBuffer & frameBuffer () const; - - - //------------------------------------------------------------ - // Check if the file is complete: - // - // isComplete() returns true if all pixels in the data window - // (in all levels) are present in the input file, or false if - // any pixels are missing. (Another program may still be busy - // writing the file, or file writing may have been aborted - // prematurely.) - //------------------------------------------------------------ - - bool isComplete () const; - - - //-------------------------------------------------- - // Utility functions: - //-------------------------------------------------- - - //--------------------------------------------------------- - // Multiresolution mode and tile size: - // The following functions return the xSize, ySize and mode - // fields of the file header's TileDescriptionAttribute. - //--------------------------------------------------------- - - unsigned int tileXSize () const; - unsigned int tileYSize () const; - LevelMode levelMode () const; - LevelRoundingMode levelRoundingMode () const; - - - //-------------------------------------------------------------------- - // Number of levels: - // - // numXLevels() returns the file's number of levels in x direction. - // - // if levelMode() == ONE_LEVEL: - // return value is: 1 - // - // if levelMode() == MIPMAP_LEVELS: - // return value is: rfunc (log (max (w, h)) / log (2)) + 1 - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (w) / log (2)) + 1 - // - // where - // w is the width of the image's data window, max.x - min.x + 1, - // y is the height of the image's data window, max.y - min.y + 1, - // and rfunc(x) is either floor(x), or ceil(x), depending on - // whether levelRoundingMode() returns ROUND_DOWN or ROUND_UP. - // - // numYLevels() returns the file's number of levels in y direction. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (h) / log (2)) + 1 - // - // - // numLevels() is a convenience function for use with - // MIPMAP_LEVELS files. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // an IEX_NAMESPACE::LogicExc exception is thrown - // - // isValidLevel(lx, ly) returns true if the file contains - // a level with level number (lx, ly), false if not. - // - //-------------------------------------------------------------------- - - int numLevels () const; - int numXLevels () const; - int numYLevels () const; - bool isValidLevel (int lx, int ly) const; - - - //---------------------------------------------------------- - // Dimensions of a level: - // - // levelWidth(lx) returns the width of a level with level - // number (lx, *), where * is any number. - // - // return value is: - // max (1, rfunc (w / pow (2, lx))) - // - // - // levelHeight(ly) returns the height of a level with level - // number (*, ly), where * is any number. - // - // return value is: - // max (1, rfunc (h / pow (2, ly))) - // - //---------------------------------------------------------- - - int levelWidth (int lx) const; - int levelHeight (int ly) const; - - - //-------------------------------------------------------------- - // Number of tiles: - // - // numXTiles(lx) returns the number of tiles in x direction - // that cover a level with level number (lx, *), where * is - // any number. - // - // return value is: - // (levelWidth(lx) + tileXSize() - 1) / tileXSize() - // - // - // numYTiles(ly) returns the number of tiles in y direction - // that cover a level with level number (*, ly), where * is - // any number. - // - // return value is: - // (levelHeight(ly) + tileXSize() - 1) / tileXSize() - // - //-------------------------------------------------------------- - - int numXTiles (int lx = 0) const; - int numYTiles (int ly = 0) const; - - - //--------------------------------------------------------------- - // Level pixel ranges: - // - // dataWindowForLevel(lx, ly) returns a 2-dimensional region of - // valid pixel coordinates for a level with level number (lx, ly) - // - // return value is a Box2i with min value: - // (dataWindow.min.x, dataWindow.min.y) - // - // and max value: - // (dataWindow.min.x + levelWidth(lx) - 1, - // dataWindow.min.y + levelHeight(ly) - 1) - // - // dataWindowForLevel(level) is a convenience function used - // for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForLevel(level, level). - // - //--------------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForLevel (int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const; - - - //------------------------------------------------------------------- - // Tile pixel ranges: - // - // dataWindowForTile(dx, dy, lx, ly) returns a 2-dimensional - // region of valid pixel coordinates for a tile with tile coordinates - // (dx,dy) and level number (lx, ly). - // - // return value is a Box2i with min value: - // (dataWindow.min.x + dx * tileXSize(), - // dataWindow.min.y + dy * tileYSize()) - // - // and max value: - // (dataWindow.min.x + (dx + 1) * tileXSize() - 1, - // dataWindow.min.y + (dy + 1) * tileYSize() - 1) - // - // dataWindowForTile(dx, dy, level) is a convenience function - // used for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForTile(dx, dy, level, level). - // - //------------------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, int l = 0) const; - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int lx, int ly) const; - - //------------------------------------------------------------ - // Read pixel data: - // - // readTile(dx, dy, lx, ly) reads the tile with tile - // coordinates (dx, dy), and level number (lx, ly), - // and stores it in the current frame buffer. - // - // dx must lie in the interval [0, numXTiles(lx)-1] - // dy must lie in the interval [0, numYTiles(ly)-1] - // - // lx must lie in the interval [0, numXLevels()-1] - // ly must lie in the inverval [0, numYLevels()-1] - // - // readTile(dx, dy, level) is a convenience function used - // for ONE_LEVEL and MIPMAP_LEVELS files. It calls - // readTile(dx, dy, level, level). - // - // The two readTiles(dx1, dx2, dy1, dy2, ...) functions allow - // reading multiple tiles at once. If multi-threading is used - // the multiple tiles are read concurrently. - // - // Pixels that are outside the pixel coordinate range for the - // tile's level, are never accessed by readTile(). - // - // Attempting to access a tile that is not present in the file - // throws an InputExc exception. - // - //------------------------------------------------------------ - - void readTile (int dx, int dy, int l = 0); - void readTile (int dx, int dy, int lx, int ly); - - void readTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly); - - void readTiles (int dx1, int dx2, int dy1, int dy2, - int l = 0); - - - //-------------------------------------------------- - // Read a tile of raw pixel data from the file, - // without uncompressing it (this function is - // used to implement TiledOutputFile::copyPixels()). - // - // for single part files, reads the next tile in the file - // for multipart files, reads the tile specified by dx,dy,lx,ly - // - //-------------------------------------------------- - - void rawTileData (int &dx, int &dy, - int &lx, int &ly, - const char *&pixelData, - int &pixelDataSize); - - struct Data; - - private: - - friend class InputFile; - friend class MultiPartInputFile; - - TiledInputFile (InputPartData* part); - - TiledInputFile (const TiledInputFile &); // not implemented - TiledInputFile & operator = (const TiledInputFile &); // not implemented - - TiledInputFile (const Header &header, OPENEXR_IMF_INTERNAL_NAMESPACE::IStream *is, int version, - int numThreads); - - void initialize (); - void multiPartInitialize(InputPartData* part); - void compatibilityInitialize(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is); - - bool isValidTile (int dx, int dy, - int lx, int ly) const; - - size_t bytesPerLineForTile (int dx, int dy, - int lx, int ly) const; - - void tileOrder(int dx[],int dy[],int lx[],int ly[]) const; - Data * _data; - - friend void TiledOutputFile::copyPixels(TiledInputFile &); -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputPart.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputPart.cpp deleted file mode 100644 index 3f89d95..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputPart.cpp +++ /dev/null @@ -1,208 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfTiledInputPart.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -TiledInputPart::TiledInputPart(MultiPartInputFile& multiPartFile, int partNumber) -{ - file = multiPartFile.getInputPart(partNumber); -} - -const char * -TiledInputPart::fileName () const -{ - return file->fileName(); -} - -const Header & -TiledInputPart::header () const -{ - return file->header(); -} - -int -TiledInputPart::version () const -{ - return file->version(); -} - -void -TiledInputPart::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - file->setFrameBuffer(frameBuffer); -} - -const FrameBuffer & -TiledInputPart::frameBuffer () const -{ - return file->frameBuffer(); -} - -bool -TiledInputPart::isComplete () const -{ - return file->isComplete(); -} - -unsigned int -TiledInputPart::tileXSize () const -{ - return file->tileXSize(); -} - -unsigned int -TiledInputPart::tileYSize () const -{ - return file->tileYSize(); -} - -LevelMode -TiledInputPart::levelMode () const -{ - return file->levelMode(); -} - -LevelRoundingMode -TiledInputPart::levelRoundingMode () const -{ - return file->levelRoundingMode(); -} - -int -TiledInputPart::numLevels () const -{ - return file->numLevels(); -} - -int -TiledInputPart::numXLevels () const -{ - return file->numXLevels(); -} - -int -TiledInputPart::numYLevels () const -{ - return file->numYLevels(); -} - -bool -TiledInputPart::isValidLevel (int lx, int ly) const -{ - return file->isValidLevel(lx, ly); -} - -int -TiledInputPart::levelWidth (int lx) const -{ - return file->levelWidth(lx); -} - -int -TiledInputPart::levelHeight (int ly) const -{ - return file->levelHeight(ly); -} - -int -TiledInputPart::numXTiles (int lx) const -{ - return file->numXTiles(lx); -} - -int -TiledInputPart::numYTiles (int ly) const -{ - return file->numYTiles(ly); -} - -IMATH_NAMESPACE::Box2i -TiledInputPart::dataWindowForLevel (int l) const -{ - return file->dataWindowForLevel(l); -} - -IMATH_NAMESPACE::Box2i -TiledInputPart::dataWindowForLevel (int lx, int ly) const -{ - return file->dataWindowForLevel(lx, ly); -} - -IMATH_NAMESPACE::Box2i -TiledInputPart::dataWindowForTile (int dx, int dy, int l) const -{ - return file->dataWindowForTile(dx, dy, l); -} - -IMATH_NAMESPACE::Box2i -TiledInputPart::dataWindowForTile (int dx, int dy, int lx, int ly) const -{ - return file->dataWindowForTile(dx, dy, lx, ly); -} - -void -TiledInputPart::readTile (int dx, int dy, int l) -{ - file->readTile(dx, dy, l); -} - -void -TiledInputPart::readTile (int dx, int dy, int lx, int ly) -{ - file->readTile(dx, dy, lx, ly); -} - -void -TiledInputPart::readTiles (int dx1, int dx2, int dy1, int dy2, int lx, int ly) -{ - file->readTiles(dx1, dx2, dy1, dy2, lx, ly); -} - -void -TiledInputPart::readTiles (int dx1, int dx2, int dy1, int dy2, int l) -{ - file->readTiles(dx1, dx2, dy1, dy2, l); -} - -void -TiledInputPart::rawTileData (int &dx, int &dy, int &lx, int &ly, - const char *&pixelData, int &pixelDataSize) -{ - file->rawTileData(dx, dy, lx, ly, pixelData, pixelDataSize); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputPart.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputPart.h deleted file mode 100644 index ea44c02..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputPart.h +++ /dev/null @@ -1,100 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFTILEDINPUTPART_H_ -#define IMFTILEDINPUTPART_H_ - -#include "ImfMultiPartInputFile.h" -#include "ImfTiledInputFile.h" -#include "ImfNamespace.h" -#include "ImfForward.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -//----------------------------------------------------------------------------- -// class TiledInputPart: -// -// Same interface as TiledInputFile. Please have a reference to TiledInputFile. -//----------------------------------------------------------------------------- - -class IMF_EXPORT TiledInputPart -{ - public: - TiledInputPart(MultiPartInputFile& multiPartFile, int partNumber); - - const char * fileName () const; - const Header & header () const; - int version () const; - void setFrameBuffer (const FrameBuffer &frameBuffer); - const FrameBuffer & frameBuffer () const; - bool isComplete () const; - unsigned int tileXSize () const; - unsigned int tileYSize () const; - LevelMode levelMode () const; - LevelRoundingMode levelRoundingMode () const; - int numLevels () const; - int numXLevels () const; - int numYLevels () const; - bool isValidLevel (int lx, int ly) const; - int levelWidth (int lx) const; - int levelHeight (int ly) const; - int numXTiles (int lx = 0) const; - int numYTiles (int ly = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const; - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int lx, int ly) const; - void readTile (int dx, int dy, int l = 0); - void readTile (int dx, int dy, int lx, int ly); - void readTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly); - void readTiles (int dx1, int dx2, int dy1, int dy2, - int l = 0); - void rawTileData (int &dx, int &dy, - int &lx, int &ly, - const char *&pixelData, - int &pixelDataSize); - - private: - TiledInputFile* file; - // for internal use - allow TiledOutputFile access to file for copyPixels - friend class TiledOutputFile; - -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif /* IMFTILEDINPUTPART_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledMisc.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledMisc.cpp deleted file mode 100644 index d72d823..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledMisc.cpp +++ /dev/null @@ -1,389 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// Miscellaneous stuff related to tiled files -// -//----------------------------------------------------------------------------- - -#include -#include "Iex.h" -#include -#include -#include -#include - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::V2i; - - -int -levelSize (int min, int max, int l, LevelRoundingMode rmode) -{ - if (l < 0) - throw IEX_NAMESPACE::ArgExc ("Argument not in valid range."); - - int a = max - min + 1; - int b = (1 << l); - int size = a / b; - - if (rmode == ROUND_UP && size * b < a) - size += 1; - - return std::max (size, 1); -} - - -Box2i -dataWindowForLevel (const TileDescription &tileDesc, - int minX, int maxX, - int minY, int maxY, - int lx, int ly) -{ - V2i levelMin = V2i (minX, minY); - - V2i levelMax = levelMin + - V2i (levelSize (minX, maxX, lx, tileDesc.roundingMode) - 1, - levelSize (minY, maxY, ly, tileDesc.roundingMode) - 1); - - return Box2i(levelMin, levelMax); -} - - -Box2i -dataWindowForTile (const TileDescription &tileDesc, - int minX, int maxX, - int minY, int maxY, - int dx, int dy, - int lx, int ly) -{ - V2i tileMin = V2i (minX + dx * tileDesc.xSize, - minY + dy * tileDesc.ySize); - - V2i tileMax = tileMin + V2i (tileDesc.xSize - 1, tileDesc.ySize - 1); - - V2i levelMax = dataWindowForLevel - (tileDesc, minX, maxX, minY, maxY, lx, ly).max; - - tileMax = V2i (std::min (tileMax[0], levelMax[0]), - std::min (tileMax[1], levelMax[1])); - - return Box2i (tileMin, tileMax); -} - - -size_t -calculateBytesPerPixel (const Header &header) -{ - const ChannelList &channels = header.channels(); - - size_t bytesPerPixel = 0; - - for (ChannelList::ConstIterator c = channels.begin(); - c != channels.end(); - ++c) - { - bytesPerPixel += pixelTypeSize (c.channel().type); - } - - return bytesPerPixel; -} - - -void -calculateBytesPerLine (const Header &header, - char* sampleCountBase, - int sampleCountXStride, - int sampleCountYStride, - int minX, int maxX, - int minY, int maxY, - std::vector& xOffsets, - std::vector& yOffsets, - std::vector& bytesPerLine) -{ - const ChannelList &channels = header.channels(); - - int pos = 0; - for (ChannelList::ConstIterator c = channels.begin(); - c != channels.end(); - ++c, ++pos) - { - int xOffset = xOffsets[pos]; - int yOffset = yOffsets[pos]; - int i = 0; - for (int y = minY - yOffset; y <= maxY - yOffset; y++, i++) - for (int x = minX - xOffset; x <= maxX - xOffset; x++) - { - bytesPerLine[i] += sampleCount(sampleCountBase, - sampleCountXStride, - sampleCountYStride, - x, y) - * pixelTypeSize (c.channel().type); - } - } -} - - -namespace { - -int -floorLog2 (int x) -{ - // - // For x > 0, floorLog2(y) returns floor(log(x)/log(2)). - // - - int y = 0; - - while (x > 1) - { - y += 1; - x >>= 1; - } - - return y; -} - - -int -ceilLog2 (int x) -{ - // - // For x > 0, ceilLog2(y) returns ceil(log(x)/log(2)). - // - - int y = 0; - int r = 0; - - while (x > 1) - { - if (x & 1) - r = 1; - - y += 1; - x >>= 1; - } - - return y + r; -} - - -int -roundLog2 (int x, LevelRoundingMode rmode) -{ - return (rmode == ROUND_DOWN)? floorLog2 (x): ceilLog2 (x); -} - - -int -calculateNumXLevels (const TileDescription& tileDesc, - int minX, int maxX, - int minY, int maxY) -{ - int num = 0; - - switch (tileDesc.mode) - { - case ONE_LEVEL: - - num = 1; - break; - - case MIPMAP_LEVELS: - - { - int w = maxX - minX + 1; - int h = maxY - minY + 1; - num = roundLog2 (std::max (w, h), tileDesc.roundingMode) + 1; - } - break; - - case RIPMAP_LEVELS: - - { - int w = maxX - minX + 1; - num = roundLog2 (w, tileDesc.roundingMode) + 1; - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown LevelMode format."); - } - - return num; -} - - -int -calculateNumYLevels (const TileDescription& tileDesc, - int minX, int maxX, - int minY, int maxY) -{ - int num = 0; - - switch (tileDesc.mode) - { - case ONE_LEVEL: - - num = 1; - break; - - case MIPMAP_LEVELS: - - { - int w = maxX - minX + 1; - int h = maxY - minY + 1; - num = roundLog2 (std::max (w, h), tileDesc.roundingMode) + 1; - } - break; - - case RIPMAP_LEVELS: - - { - int h = maxY - minY + 1; - num = roundLog2 (h, tileDesc.roundingMode) + 1; - } - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown LevelMode format."); - } - - return num; -} - - -void -calculateNumTiles (int *numTiles, - int numLevels, - int min, int max, - int size, - LevelRoundingMode rmode) -{ - for (int i = 0; i < numLevels; i++) - { - numTiles[i] = (levelSize (min, max, i, rmode) + size - 1) / size; - } -} - -} // namespace - - -void -precalculateTileInfo (const TileDescription& tileDesc, - int minX, int maxX, - int minY, int maxY, - int *&numXTiles, int *&numYTiles, - int &numXLevels, int &numYLevels) -{ - numXLevels = calculateNumXLevels(tileDesc, minX, maxX, minY, maxY); - numYLevels = calculateNumYLevels(tileDesc, minX, maxX, minY, maxY); - - numXTiles = new int[numXLevels]; - numYTiles = new int[numYLevels]; - - calculateNumTiles (numXTiles, - numXLevels, - minX, maxX, - tileDesc.xSize, - tileDesc.roundingMode); - - calculateNumTiles (numYTiles, - numYLevels, - minY, maxY, - tileDesc.ySize, - tileDesc.roundingMode); -} - - -int -getTiledChunkOffsetTableSize(const Header& header) -{ - // - // Save the dataWindow information - // - - const Box2i &dataWindow = header.dataWindow(); - - // - // Precompute level and tile information. - // - - int* numXTiles; - int* numYTiles; - int numXLevels; - int numYLevels; - precalculateTileInfo (header.tileDescription(), - dataWindow.min.x, dataWindow.max.x, - dataWindow.min.y, dataWindow.max.y, - numXTiles, numYTiles, - numXLevels, numYLevels); - - // - // Calculate lineOffsetSize. - // - int lineOffsetSize = 0; - const TileDescription &desc = header.tileDescription(); - switch (desc.mode) - { - case ONE_LEVEL: - case MIPMAP_LEVELS: - for (int i = 0; i < numXLevels; i++) - lineOffsetSize += numXTiles[i] * numYTiles[i]; - break; - case RIPMAP_LEVELS: - for (int i = 0; i < numXLevels; i++) - for (int j = 0; j < numYLevels; j++) - lineOffsetSize += numXTiles[i] * numYTiles[j]; - break; - case NUM_LEVELMODES : - throw IEX_NAMESPACE::LogicExc("Bad level mode getting chunk offset table size"); - } - - delete[] numXTiles; - delete[] numYTiles; - - return lineOffsetSize; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledMisc.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledMisc.h deleted file mode 100644 index 2696663..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledMisc.h +++ /dev/null @@ -1,106 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_TILED_MISC_H -#define INCLUDED_IMF_TILED_MISC_H - -//----------------------------------------------------------------------------- -// -// Miscellaneous stuff related to tiled files -// -//----------------------------------------------------------------------------- - -#include "ImathBox.h" -#include "ImfHeader.h" -#include "ImfNamespace.h" - -#include -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -IMF_EXPORT -int levelSize (int min, int max, int l, LevelRoundingMode rmode); - -IMF_EXPORT -IMATH_NAMESPACE::Box2i dataWindowForLevel (const TileDescription &tileDesc, - int minX, int maxX, - int minY, int maxY, - int lx, int ly); - -IMF_EXPORT -IMATH_NAMESPACE::Box2i dataWindowForTile (const TileDescription &tileDesc, - int minX, int maxX, - int minY, int maxY, - int dx, int dy, - int lx, int ly); - -IMF_EXPORT -size_t calculateBytesPerPixel (const Header &header); - -// -// Calculate the count of bytes for each lines in range [minY, maxY], -// and pixels in range [minX, maxX]. -// Data will be saved in bytesPerLine. -// sampleCountBase, sampleCountXStride and sampleCountYStride are -// used to get the sample count values. -// - -IMF_EXPORT -void calculateBytesPerLine (const Header &header, - char* sampleCountBase, - int sampleCountXStride, - int sampleCountYStride, - int minX, int maxX, - int minY, int maxY, - std::vector& xOffsets, - std::vector& yOffsets, - std::vector& bytesPerLine); - -IMF_EXPORT -void precalculateTileInfo (const TileDescription& tileDesc, - int minX, int maxX, - int minY, int maxY, - int *&numXTiles, int *&numYTiles, - int &numXLevels, int &numYLevels); - -IMF_EXPORT -int getTiledChunkOffsetTableSize(const Header& header); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp deleted file mode 100644 index 3a17561..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp +++ /dev/null @@ -1,1841 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class TiledOutputFile -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "ImathBox.h" -#include -#include -#include -#include -#include -#include -#include "IlmThreadPool.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadMutex.h" -#include "ImfOutputStreamMutex.h" -#include "ImfOutputPartData.h" -#include "Iex.h" -#include -#include -#include -#include -#include -#include - -#include "ImfNamespace.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using IMATH_NAMESPACE::Box2i; -using IMATH_NAMESPACE::V2i; -using std::string; -using std::vector; -using std::ofstream; -using std::map; -using std::min; -using std::max; -using std::swap; -using ILMTHREAD_NAMESPACE::Mutex; -using ILMTHREAD_NAMESPACE::Lock; -using ILMTHREAD_NAMESPACE::Semaphore; -using ILMTHREAD_NAMESPACE::Task; -using ILMTHREAD_NAMESPACE::TaskGroup; -using ILMTHREAD_NAMESPACE::ThreadPool; - -namespace { - -struct TOutSliceInfo -{ - PixelType type; - const char * base; - size_t xStride; - size_t yStride; - bool zero; - int xTileCoords; - int yTileCoords; - - TOutSliceInfo (PixelType type = HALF, - const char *base = 0, - size_t xStride = 0, - size_t yStride = 0, - bool zero = false, - int xTileCoords = 0, - int yTileCoords = 0); -}; - - -TOutSliceInfo::TOutSliceInfo (PixelType t, - const char *b, - size_t xs, size_t ys, - bool z, - int xtc, - int ytc) -: - type (t), - base (b), - xStride (xs), - yStride (ys), - zero (z), - xTileCoords (xtc), - yTileCoords (ytc) -{ - // empty -} - - -struct TileCoord -{ - int dx; - int dy; - int lx; - int ly; - - - TileCoord (int xTile = 0, int yTile = 0, - int xLevel = 0, int yLevel = 0) - : - dx (xTile), dy (yTile), - lx (xLevel), ly (yLevel) - { - // empty - } - - - bool - operator < (const TileCoord &other) const - { - return (ly < other.ly) || - (ly == other.ly && lx < other.lx) || - ((ly == other.ly && lx == other.lx) && - ((dy < other.dy) || (dy == other.dy && dx < other.dx))); - } - - - bool - operator == (const TileCoord &other) const - { - return lx == other.lx && - ly == other.ly && - dx == other.dx && - dy == other.dy; - } -}; - - -struct BufferedTile -{ - char * pixelData; - int pixelDataSize; - - BufferedTile (const char *data, int size): - pixelData (0), - pixelDataSize(size) - { - pixelData = new char[pixelDataSize]; - memcpy (pixelData, data, pixelDataSize); - } - - ~BufferedTile() - { - delete [] pixelData; - } -}; - - -typedef map TileMap; - - -struct TileBuffer -{ - Array buffer; - const char * dataPtr; - int dataSize; - Compressor * compressor; - TileCoord tileCoord; - bool hasException; - string exception; - - TileBuffer (Compressor *comp); - ~TileBuffer (); - - inline void wait () {_sem.wait();} - inline void post () {_sem.post();} - - protected: - - Semaphore _sem; -}; - - -TileBuffer::TileBuffer (Compressor *comp): - dataPtr (0), - dataSize (0), - compressor (comp), - hasException (false), - exception (), - _sem (1) -{ - // empty -} - - -TileBuffer::~TileBuffer () -{ - delete compressor; -} - - -} // namespace - - -struct TiledOutputFile::Data -{ - Header header; // the image header - int version; // file format version - bool multipart; // part came from a multipart file - TileDescription tileDesc; // describes the tile layout - FrameBuffer frameBuffer; // framebuffer to write into - Int64 previewPosition; - LineOrder lineOrder; // the file's lineorder - int minX; // data window's min x coord - int maxX; // data window's max x coord - int minY; // data window's min y coord - int maxY; // data window's max x coord - - int numXLevels; // number of x levels - int numYLevels; // number of y levels - int * numXTiles; // number of x tiles at a level - int * numYTiles; // number of y tiles at a level - - TileOffsets tileOffsets; // stores offsets in file for - // each tile - - Compressor::Format format; // compressor's data format - vector slices; // info about channels in file - - size_t maxBytesPerTileLine; // combined size of a tile line - // over all channels - - - vector tileBuffers; - size_t tileBufferSize; // size of a tile buffer - - Int64 tileOffsetsPosition; // position of the tile index - - TileMap tileMap; - TileCoord nextTileToWrite; - - int partNumber; // the output part number - - Data (int numThreads); - ~Data (); - - inline TileBuffer * getTileBuffer (int number); - // hash function from tile - // buffer coords into our - // vector of tile buffers - - TileCoord nextTileCoord (const TileCoord &a); -}; - - -TiledOutputFile::Data::Data (int numThreads): - multipart(false), - numXTiles(0), - numYTiles(0), - tileOffsetsPosition (0), - partNumber(-1) -{ - // - // We need at least one tileBuffer, but if threading is used, - // to keep n threads busy we need 2*n tileBuffers - // - - tileBuffers.resize (max (1, 2 * numThreads)); -} - - -TiledOutputFile::Data::~Data () -{ - delete [] numXTiles; - delete [] numYTiles; - - // - // Delete all the tile buffers, if any still happen to exist - // - - for (TileMap::iterator i = tileMap.begin(); i != tileMap.end(); ++i) - delete i->second; - - for (size_t i = 0; i < tileBuffers.size(); i++) - delete tileBuffers[i]; -} - - -TileBuffer* -TiledOutputFile::Data::getTileBuffer (int number) -{ - return tileBuffers[number % tileBuffers.size()]; -} - - -TileCoord -TiledOutputFile::Data::nextTileCoord (const TileCoord &a) -{ - TileCoord b = a; - - if (lineOrder == INCREASING_Y) - { - b.dx++; - - if (b.dx >= numXTiles[b.lx]) - { - b.dx = 0; - b.dy++; - - if (b.dy >= numYTiles[b.ly]) - { - // - // the next tile is in the next level - // - - b.dy = 0; - - switch (tileDesc.mode) - { - case ONE_LEVEL: - case MIPMAP_LEVELS: - - b.lx++; - b.ly++; - break; - - case RIPMAP_LEVELS: - - b.lx++; - - if (b.lx >= numXLevels) - { - b.lx = 0; - b.ly++; - - #ifdef DEBUG - assert (b.ly <= numYLevels); - #endif - } - break; - case NUM_LEVELMODES: - throw(IEX_NAMESPACE::ArgExc("Invalid tile description")); - - } - } - } - } - else if (lineOrder == DECREASING_Y) - { - b.dx++; - - if (b.dx >= numXTiles[b.lx]) - { - b.dx = 0; - b.dy--; - - if (b.dy < 0) - { - // - // the next tile is in the next level - // - - switch (tileDesc.mode) - { - case ONE_LEVEL: - case MIPMAP_LEVELS: - - b.lx++; - b.ly++; - break; - - case RIPMAP_LEVELS: - - b.lx++; - - if (b.lx >= numXLevels) - { - b.lx = 0; - b.ly++; - - #ifdef DEBUG - assert (b.ly <= numYLevels); - #endif - } - break; - case NUM_LEVELMODES: - throw(IEX_NAMESPACE::ArgExc("Invalid tile description")); - - } - - if (b.ly < numYLevels) - b.dy = numYTiles[b.ly] - 1; - } - } - } - - return b; -} - - -namespace { - -void -writeTileData (OutputStreamMutex *streamData, - TiledOutputFile::Data *ofd, - int dx, int dy, - int lx, int ly, - const char pixelData[], - int pixelDataSize) -{ - // - // Store a block of pixel data in the output file, and try - // to keep track of the current writing position the file, - // without calling tellp() (tellp() can be fairly expensive). - // - - Int64 currentPosition = streamData->currentPosition; - streamData->currentPosition = 0; - - if (currentPosition == 0) - currentPosition = streamData->os->tellp(); - - ofd->tileOffsets (dx, dy, lx, ly) = currentPosition; - - #ifdef DEBUG - assert (streamData->os->tellp() == currentPosition); - #endif - - // - // Write the tile header. - // - - if (ofd->multipart) - { - Xdr::write (*streamData->os, ofd->partNumber); - } - Xdr::write (*streamData->os, dx); - Xdr::write (*streamData->os, dy); - Xdr::write (*streamData->os, lx); - Xdr::write (*streamData->os, ly); - Xdr::write (*streamData->os, pixelDataSize); - - streamData->os->write (pixelData, pixelDataSize); - - // - // Keep current position in the file so that we can avoid - // redundant seekg() operations (seekg() can be fairly expensive). - // - - streamData->currentPosition = currentPosition + - 5 * Xdr::size() + - pixelDataSize; - - if (ofd->multipart) - { - streamData->currentPosition += Xdr::size(); - } -} - - - -void -bufferedTileWrite (OutputStreamMutex *streamData, - TiledOutputFile::Data *ofd, - int dx, int dy, - int lx, int ly, - const char pixelData[], - int pixelDataSize) -{ - // - // Check if a tile with coordinates (dx,dy,lx,ly) has already been written. - // - - if (ofd->tileOffsets (dx, dy, lx, ly)) - { - THROW (IEX_NAMESPACE::ArgExc, - "Attempt to write tile " - "(" << dx << ", " << dy << ", " << lx << ", " << ly << ") " - "more than once."); - } - - // - // If tiles can be written in random order, then don't buffer anything. - // - - if (ofd->lineOrder == RANDOM_Y) - { - writeTileData (streamData, ofd, dx, dy, lx, ly, pixelData, pixelDataSize); - return; - } - - // - // If the tiles cannot be written in random order, then check if a - // tile with coordinates (dx,dy,lx,ly) has already been buffered. - // - - TileCoord currentTile = TileCoord(dx, dy, lx, ly); - - if (ofd->tileMap.find (currentTile) != ofd->tileMap.end()) - { - THROW (IEX_NAMESPACE::ArgExc, - "Attempt to write tile " - "(" << dx << ", " << dy << ", " << lx << ", " << ly << ") " - "more than once."); - } - - // - // If all the tiles before this one have already been written to the file, - // then write this tile immediately and check if we have buffered tiles - // that can be written after this tile. - // - // Otherwise, buffer the tile so it can be written to file later. - // - - if (ofd->nextTileToWrite == currentTile) - { - writeTileData (streamData, ofd, dx, dy, lx, ly, pixelData, pixelDataSize); - ofd->nextTileToWrite = ofd->nextTileCoord (ofd->nextTileToWrite); - - TileMap::iterator i = ofd->tileMap.find (ofd->nextTileToWrite); - - // - // Step through the tiles and write all successive buffered tiles after - // the current one. - // - - while(i != ofd->tileMap.end()) - { - // - // Write the tile, and then delete the tile's buffered data - // - - writeTileData (streamData, - ofd, - i->first.dx, i->first.dy, - i->first.lx, i->first.ly, - i->second->pixelData, - i->second->pixelDataSize); - - delete i->second; - ofd->tileMap.erase (i); - - // - // Proceed to the next tile - // - - ofd->nextTileToWrite = ofd->nextTileCoord (ofd->nextTileToWrite); - i = ofd->tileMap.find (ofd->nextTileToWrite); - } - } - else - { - // - // Create a new BufferedTile, copy the pixelData into it, and - // insert it into the tileMap. - // - - ofd->tileMap[currentTile] = - new BufferedTile ((const char *)pixelData, pixelDataSize); - } -} - - -void -convertToXdr (TiledOutputFile::Data *ofd, - Array& tileBuffer, - int numScanLines, - int numPixelsPerScanLine) -{ - // - // Convert the contents of a TiledOutputFile's tileBuffer from the - // machine's native representation to Xdr format. This function is called - // by writeTile(), below, if the compressor wanted its input pixel data - // in the machine's native format, but then failed to compress the data - // (most compressors will expand rather than compress random input data). - // - // Note that this routine assumes that the machine's native representation - // of the pixel data has the same size as the Xdr representation. This - // makes it possible to convert the pixel data in place, without an - // intermediate temporary buffer. - // - - // - // Set these to point to the start of the tile. - // We will write to toPtr, and read from fromPtr. - // - - char *writePtr = tileBuffer; - const char *readPtr = writePtr; - - // - // Iterate over all scan lines in the tile. - // - - for (int y = 0; y < numScanLines; ++y) - { - // - // Iterate over all slices in the file. - // - - for (unsigned int i = 0; i < ofd->slices.size(); ++i) - { - const TOutSliceInfo &slice = ofd->slices[i]; - - // - // Convert the samples in place. - // - - convertInPlace (writePtr, readPtr, slice.type, - numPixelsPerScanLine); - } - } - - #ifdef DEBUG - - assert (writePtr == readPtr); - - #endif -} - - -// -// A TileBufferTask encapsulates the task of copying a tile from -// the user's framebuffer into a LineBuffer and compressing the data -// if necessary. -// - -class TileBufferTask: public Task -{ - public: - - TileBufferTask (TaskGroup *group, - TiledOutputFile::Data *ofd, - int number, - int dx, int dy, - int lx, int ly); - - virtual ~TileBufferTask (); - - virtual void execute (); - - private: - - TiledOutputFile::Data * _ofd; - TileBuffer * _tileBuffer; -}; - - -TileBufferTask::TileBufferTask - (TaskGroup *group, - TiledOutputFile::Data *ofd, - int number, - int dx, int dy, - int lx, int ly) -: - Task (group), - _ofd (ofd), - _tileBuffer (_ofd->getTileBuffer (number)) -{ - // - // Wait for the tileBuffer to become available - // - - _tileBuffer->wait (); - _tileBuffer->tileCoord = TileCoord (dx, dy, lx, ly); -} - - -TileBufferTask::~TileBufferTask () -{ - // - // Signal that the tile buffer is now free - // - - _tileBuffer->post (); -} - - -void -TileBufferTask::execute () -{ - try - { - // - // First copy the pixel data from the frame buffer - // into the tile buffer - // - // Convert one tile's worth of pixel data to - // a machine-independent representation, and store - // the result in _tileBuffer->buffer. - // - - char *writePtr = _tileBuffer->buffer; - - Box2i tileRange = dataWindowForTile (_ofd->tileDesc, - _ofd->minX, _ofd->maxX, - _ofd->minY, _ofd->maxY, - _tileBuffer->tileCoord.dx, - _tileBuffer->tileCoord.dy, - _tileBuffer->tileCoord.lx, - _tileBuffer->tileCoord.ly); - - int numScanLines = tileRange.max.y - tileRange.min.y + 1; - int numPixelsPerScanLine = tileRange.max.x - tileRange.min.x + 1; - - // - // Iterate over the scan lines in the tile. - // - - for (int y = tileRange.min.y; y <= tileRange.max.y; ++y) - { - // - // Iterate over all image channels. - // - - for (unsigned int i = 0; i < _ofd->slices.size(); ++i) - { - const TOutSliceInfo &slice = _ofd->slices[i]; - - // - // These offsets are used to facilitate both absolute - // and tile-relative pixel coordinates. - // - - int xOffset = slice.xTileCoords * tileRange.min.x; - int yOffset = slice.yTileCoords * tileRange.min.y; - - // - // Fill the tile buffer with pixel data. - // - - if (slice.zero) - { - // - // The frame buffer contains no data for this channel. - // Store zeroes in _data->tileBuffer. - // - - fillChannelWithZeroes (writePtr, _ofd->format, slice.type, - numPixelsPerScanLine); - } - else - { - // - // The frame buffer contains data for this channel. - // - - const char *readPtr = slice.base + - (y - yOffset) * slice.yStride + - (tileRange.min.x - xOffset) * - slice.xStride; - - const char *endPtr = readPtr + - (numPixelsPerScanLine - 1) * - slice.xStride; - - copyFromFrameBuffer (writePtr, readPtr, endPtr, - slice.xStride, _ofd->format, - slice.type); - } - } - } - - // - // Compress the contents of the tileBuffer, - // and store the compressed data in the output file. - // - - _tileBuffer->dataSize = writePtr - _tileBuffer->buffer; - _tileBuffer->dataPtr = _tileBuffer->buffer; - - if (_tileBuffer->compressor) - { - const char *compPtr; - - int compSize = _tileBuffer->compressor->compressTile - (_tileBuffer->dataPtr, - _tileBuffer->dataSize, - tileRange, compPtr); - - if (compSize < _tileBuffer->dataSize) - { - _tileBuffer->dataSize = compSize; - _tileBuffer->dataPtr = compPtr; - } - else if (_ofd->format == Compressor::NATIVE) - { - // - // The data did not shrink during compression, but - // we cannot write to the file using native format, - // so we need to convert the lineBuffer to Xdr. - // - - convertToXdr (_ofd, _tileBuffer->buffer, numScanLines, - numPixelsPerScanLine); - } - } - } - catch (std::exception &e) - { - if (!_tileBuffer->hasException) - { - _tileBuffer->exception = e.what (); - _tileBuffer->hasException = true; - } - } - catch (...) - { - if (!_tileBuffer->hasException) - { - _tileBuffer->exception = "unrecognized exception"; - _tileBuffer->hasException = true; - } - } -} - -} // namespace - - -TiledOutputFile::TiledOutputFile - (const char fileName[], - const Header &header, - int numThreads) -: - _data (new Data (numThreads)), - _streamData (new OutputStreamMutex()), - _deleteStream (true) -{ - try - { - header.sanityCheck (true); - _streamData->os = new StdOFStream (fileName); - _data->multipart=false; // since we opened with one header we can't be multipart - initialize (header); - _streamData->currentPosition = _streamData->os->tellp(); - - // Write header and empty offset table to the file. - writeMagicNumberAndVersionField(*_streamData->os, _data->header); - _data->previewPosition = _data->header.writeTo (*_streamData->os, true); - _data->tileOffsetsPosition = _data->tileOffsets.writeTo (*_streamData->os); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - delete _streamData; - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << fileName << "\". " << e); - throw; - } - catch (...) - { - delete _streamData; - delete _data; - throw; - } -} - - -TiledOutputFile::TiledOutputFile - (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - int numThreads) -: - _data (new Data (numThreads)), - _streamData (new OutputStreamMutex()), - _deleteStream (false) -{ - try - { - header.sanityCheck(true); - _streamData->os = &os; - _data->multipart=false; // since we opened with one header we can't be multipart - initialize (header); - _streamData->currentPosition = _streamData->os->tellp(); - - // Write header and empty offset table to the file. - writeMagicNumberAndVersionField(*_streamData->os, _data->header); - _data->previewPosition = _data->header.writeTo (*_streamData->os, true); - _data->tileOffsetsPosition = _data->tileOffsets.writeTo (*_streamData->os); - - } - catch (IEX_NAMESPACE::BaseExc &e) - { - delete _streamData; - delete _data; - - REPLACE_EXC (e, "Cannot open image file " - "\"" << os.fileName() << "\". " << e); - throw; - } - catch (...) - { - delete _streamData; - delete _data; - throw; - } -} - -TiledOutputFile::TiledOutputFile(const OutputPartData* part) : - _deleteStream (false) -{ - try - { - if (part->header.type() != TILEDIMAGE) - throw IEX_NAMESPACE::ArgExc("Can't build a TiledOutputFile from a type-mismatched part."); - - _streamData = part->mutex; - _data = new Data(part->numThreads); - _data->multipart=part->multipart; - initialize(part->header); - _data->partNumber = part->partNumber; - _data->tileOffsetsPosition = part->chunkOffsetTablePosition; - _data->previewPosition = part->previewPosition; - } - catch (IEX_NAMESPACE::BaseExc &e) - { - delete _data; - - REPLACE_EXC (e, "Cannot initialize output part " - "\"" << part->partNumber << "\". " << e); - throw; - } - catch (...) - { - delete _data; - throw; - } -} - -void -TiledOutputFile::initialize (const Header &header) -{ - _data->header = header; - _data->lineOrder = _data->header.lineOrder(); - - - - // - // Check that the file is indeed tiled - // - - _data->tileDesc = _data->header.tileDescription(); - - - // - // 'Fix' the type attribute if it exists but is incorrectly set - // (attribute is optional, but ensure it is correct if it exists) - // - if(_data->header.hasType()) - { - _data->header.setType(TILEDIMAGE); - } - - - // - // Save the dataWindow information - // - - const Box2i &dataWindow = _data->header.dataWindow(); - _data->minX = dataWindow.min.x; - _data->maxX = dataWindow.max.x; - _data->minY = dataWindow.min.y; - _data->maxY = dataWindow.max.y; - - // - // Precompute level and tile information to speed up utility functions - // - - precalculateTileInfo (_data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - _data->numXTiles, _data->numYTiles, - _data->numXLevels, _data->numYLevels); - - // - // Determine the first tile coordinate that we will be writing - // if the file is not RANDOM_Y. - // - - _data->nextTileToWrite = (_data->lineOrder == INCREASING_Y)? - TileCoord (0, 0, 0, 0): - TileCoord (0, _data->numYTiles[0] - 1, 0, 0); - - _data->maxBytesPerTileLine = - calculateBytesPerPixel (_data->header) * _data->tileDesc.xSize; - - _data->tileBufferSize = _data->maxBytesPerTileLine * _data->tileDesc.ySize; - - // - // Create all the TileBuffers and allocate their internal buffers - // - - for (size_t i = 0; i < _data->tileBuffers.size(); i++) - { - _data->tileBuffers[i] = new TileBuffer (newTileCompressor - (_data->header.compression(), - _data->maxBytesPerTileLine, - _data->tileDesc.ySize, - _data->header)); - - _data->tileBuffers[i]->buffer.resizeErase(_data->tileBufferSize); - } - - _data->format = defaultFormat (_data->tileBuffers[0]->compressor); - - _data->tileOffsets = TileOffsets (_data->tileDesc.mode, - _data->numXLevels, - _data->numYLevels, - _data->numXTiles, - _data->numYTiles); -} - - -TiledOutputFile::~TiledOutputFile () -{ - if (_data) - { - { - Lock lock(*_streamData); - Int64 originalPosition = _streamData->os->tellp(); - - if (_data->tileOffsetsPosition > 0) - { - try - { - _streamData->os->seekp (_data->tileOffsetsPosition); - _data->tileOffsets.writeTo (*_streamData->os); - - // - // Restore the original position. - // - _streamData->os->seekp (originalPosition); - } - catch (...) - { - // - // We cannot safely throw any exceptions from here. - // This destructor may have been called because the - // stack is currently being unwound for another - // exception. - // - } - } - } - - if (_deleteStream && _streamData) - delete _streamData->os; - - if (_data->partNumber == -1) - delete _streamData; - - delete _data; - } -} - - -const char * -TiledOutputFile::fileName () const -{ - return _streamData->os->fileName(); -} - - -const Header & -TiledOutputFile::header () const -{ - return _data->header; -} - - -void -TiledOutputFile::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - Lock lock (*_streamData); - - // - // Check if the new frame buffer descriptor - // is compatible with the image file header. - // - - const ChannelList &channels = _data->header.channels(); - - for (ChannelList::ConstIterator i = channels.begin(); - i != channels.end(); - ++i) - { - FrameBuffer::ConstIterator j = frameBuffer.find (i.name()); - - if (j == frameBuffer.end()) - continue; - - if (i.channel().type != j.slice().type) - THROW (IEX_NAMESPACE::ArgExc, "Pixel type of \"" << i.name() << "\" channel " - "of output file \"" << fileName() << "\" is " - "not compatible with the frame buffer's " - "pixel type."); - - if (j.slice().xSampling != 1 || j.slice().ySampling != 1) - THROW (IEX_NAMESPACE::ArgExc, "All channels in a tiled file must have" - "sampling (1,1)."); - } - - // - // Initialize slice table for writePixels(). - // - - vector slices; - - for (ChannelList::ConstIterator i = channels.begin(); - i != channels.end(); - ++i) - { - FrameBuffer::ConstIterator j = frameBuffer.find (i.name()); - - if (j == frameBuffer.end()) - { - // - // Channel i is not present in the frame buffer. - // In the file, channel i will contain only zeroes. - // - - slices.push_back (TOutSliceInfo (i.channel().type, - 0, // base - 0, // xStride, - 0, // yStride, - true)); // zero - } - else - { - // - // Channel i is present in the frame buffer. - // - - slices.push_back (TOutSliceInfo (j.slice().type, - j.slice().base, - j.slice().xStride, - j.slice().yStride, - false, // zero - (j.slice().xTileCoords)? 1: 0, - (j.slice().yTileCoords)? 1: 0)); - } - } - - // - // Store the new frame buffer. - // - - _data->frameBuffer = frameBuffer; - _data->slices = slices; -} - - -const FrameBuffer & -TiledOutputFile::frameBuffer () const -{ - Lock lock (*_streamData); - return _data->frameBuffer; -} - - -void -TiledOutputFile::writeTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly) -{ - try - { - Lock lock (*_streamData); - - if (_data->slices.size() == 0) - throw IEX_NAMESPACE::ArgExc ("No frame buffer specified " - "as pixel data source."); - - if (!isValidTile (dx1, dy1, lx, ly) || !isValidTile (dx2, dy2, lx, ly)) - throw IEX_NAMESPACE::ArgExc ("Tile coordinates are invalid."); - - if (!isValidLevel (lx, ly)) - THROW (IEX_NAMESPACE::ArgExc, - "Level coordinate " - "(" << lx << ", " << ly << ") " - "is invalid."); - // - // Determine the first and last tile coordinates in both dimensions - // based on the file's lineOrder - // - - if (dx1 > dx2) - swap (dx1, dx2); - - if (dy1 > dy2) - swap (dy1, dy2); - - int dyStart = dy1; - int dyStop = dy2 + 1; - int dY = 1; - - if (_data->lineOrder == DECREASING_Y) - { - dyStart = dy2; - dyStop = dy1 - 1; - dY = -1; - } - - int numTiles = (dx2 - dx1 + 1) * (dy2 - dy1 + 1); - int numTasks = min ((int)_data->tileBuffers.size(), numTiles); - - // - // Create a task group for all tile buffer tasks. When the - // task group goes out of scope, the destructor waits until - // all tasks are complete. - // - - { - TaskGroup taskGroup; - - // - // Add in the initial compression tasks to the thread pool - // - - int nextCompBuffer = 0; - int dxComp = dx1; - int dyComp = dyStart; - - while (nextCompBuffer < numTasks) - { - ThreadPool::addGlobalTask (new TileBufferTask (&taskGroup, - _data, - nextCompBuffer++, - dxComp, dyComp, - lx, ly)); - dxComp++; - - if (dxComp > dx2) - { - dxComp = dx1; - dyComp += dY; - } - } - - // - // Write the compressed buffers and add in more compression - // tasks until done - // - - int nextWriteBuffer = 0; - int dxWrite = dx1; - int dyWrite = dyStart; - - while (nextWriteBuffer < numTiles) - { - // - // Wait until the nextWriteBuffer is ready to be written - // - - TileBuffer* writeBuffer = - _data->getTileBuffer (nextWriteBuffer); - - writeBuffer->wait(); - - // - // Write the tilebuffer - // - - bufferedTileWrite (_streamData, _data, dxWrite, dyWrite, lx, ly, - writeBuffer->dataPtr, - writeBuffer->dataSize); - - // - // Release the lock on nextWriteBuffer - // - - writeBuffer->post(); - - // - // If there are no more tileBuffers to compress, then - // only continue to write out remaining tileBuffers, - // otherwise keep adding compression tasks. - // - - if (nextCompBuffer < numTiles) - { - // - // add nextCompBuffer as a compression Task - // - - ThreadPool::addGlobalTask - (new TileBufferTask (&taskGroup, - _data, - nextCompBuffer, - dxComp, dyComp, - lx, ly)); - } - - nextWriteBuffer++; - dxWrite++; - - if (dxWrite > dx2) - { - dxWrite = dx1; - dyWrite += dY; - } - - nextCompBuffer++; - dxComp++; - - if (dxComp > dx2) - { - dxComp = dx1; - dyComp += dY; - } - } - - // - // finish all tasks - // - } - - // - // Exeption handling: - // - // TileBufferTask::execute() may have encountered exceptions, but - // those exceptions occurred in another thread, not in the thread - // that is executing this call to TiledOutputFile::writeTiles(). - // TileBufferTask::execute() has caught all exceptions and stored - // the exceptions' what() strings in the tile buffers. - // Now we check if any tile buffer contains a stored exception; if - // this is the case then we re-throw the exception in this thread. - // (It is possible that multiple tile buffers contain stored - // exceptions. We re-throw the first exception we find and - // ignore all others.) - // - - const string *exception = 0; - - for (size_t i = 0; i < _data->tileBuffers.size(); ++i) - { - TileBuffer *tileBuffer = _data->tileBuffers[i]; - - if (tileBuffer->hasException && !exception) - exception = &tileBuffer->exception; - - tileBuffer->hasException = false; - } - - if (exception) - throw IEX_NAMESPACE::IoExc (*exception); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Failed to write pixel data to image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -void -TiledOutputFile::writeTiles (int dx1, int dxMax, int dyMin, int dyMax, int l) -{ - writeTiles (dx1, dxMax, dyMin, dyMax, l, l); -} - - -void -TiledOutputFile::writeTile (int dx, int dy, int lx, int ly) -{ - writeTiles (dx, dx, dy, dy, lx, ly); -} - - -void -TiledOutputFile::writeTile (int dx, int dy, int l) -{ - writeTile(dx, dy, l, l); -} - - -void -TiledOutputFile::copyPixels (TiledInputFile &in) -{ - Lock lock (*_streamData); - - // - // Check if this file's and and the InputFile's - // headers are compatible. - // - - const Header &hdr = _data->header; - const Header &inHdr = in.header(); - - if (!hdr.hasTileDescription() || !inHdr.hasTileDescription()) - THROW (IEX_NAMESPACE::ArgExc, "Cannot perform a quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\". The " - "output file is tiled, but the input file is not. " - "Try using OutputFile::copyPixels() instead."); - - if (!(hdr.tileDescription() == inHdr.tileDescription())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files have different tile descriptions."); - - if (!(hdr.dataWindow() == inHdr.dataWindow())) - THROW (IEX_NAMESPACE::ArgExc, "Cannot copy pixels from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\". The " - "files have different data windows."); - - if (!(hdr.lineOrder() == inHdr.lineOrder())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files have different line orders."); - - if (!(hdr.compression() == inHdr.compression())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" failed. " - "The files use different compression methods."); - - if (!(hdr.channels() == inHdr.channels())) - THROW (IEX_NAMESPACE::ArgExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << fileName() << "\" " - "failed. The files have different channel " - "lists."); - - // - // Verify that no pixel data have been written to this file yet. - // - - if (!_data->tileOffsets.isEmpty()) - THROW (IEX_NAMESPACE::LogicExc, "Quick pixel copy from image " - "file \"" << in.fileName() << "\" to image " - "file \"" << _streamData->os->fileName() << "\" " - "failed. \"" << fileName() << "\" " - "already contains pixel data."); - - // - // Calculate the total number of tiles in the file - // - - int numAllTiles = 0; - - switch (levelMode ()) - { - case ONE_LEVEL: - case MIPMAP_LEVELS: - - for (int i_l = 0; i_l < numLevels (); ++i_l) - numAllTiles += numXTiles (i_l) * numYTiles (i_l); - - break; - - case RIPMAP_LEVELS: - - for (int i_ly = 0; i_ly < numYLevels (); ++i_ly) - for (int i_lx = 0; i_lx < numXLevels (); ++i_lx) - numAllTiles += numXTiles (i_lx) * numYTiles (i_ly); - - break; - - default: - - throw IEX_NAMESPACE::ArgExc ("Unknown LevelMode format."); - } - - bool random_y = _data->lineOrder==RANDOM_Y; - - std::vector dx_table(random_y ? numAllTiles : 1); - std::vector dy_table(random_y ? numAllTiles : 1); - std::vector lx_table(random_y ? numAllTiles : 1); - std::vector ly_table(random_y ? numAllTiles : 1); - - if(random_y) - { - in.tileOrder(&dx_table[0],&dy_table[0],&lx_table[0],&ly_table[0]); - _data->nextTileToWrite.dx=dx_table[0]; - _data->nextTileToWrite.dy=dy_table[0]; - _data->nextTileToWrite.lx=lx_table[0]; - _data->nextTileToWrite.ly=ly_table[0]; - } - - for (int i = 0; i < numAllTiles; ++i) - { - const char *pixelData; - int pixelDataSize; - - int dx = _data->nextTileToWrite.dx; - int dy = _data->nextTileToWrite.dy; - int lx = _data->nextTileToWrite.lx; - int ly = _data->nextTileToWrite.ly; - - - in.rawTileData (dx, dy, lx, ly, pixelData, pixelDataSize); - writeTileData (_streamData, _data, dx, dy, lx, ly, pixelData, pixelDataSize); - - if(random_y) - { - if(inextTileToWrite.dx=dx_table[i+1]; - _data->nextTileToWrite.dy=dy_table[i+1]; - _data->nextTileToWrite.lx=lx_table[i+1]; - _data->nextTileToWrite.ly=ly_table[i+1]; - } - }else{ - _data->nextTileToWrite=_data->nextTileCoord(_data->nextTileToWrite); - } - } -} - - -void -TiledOutputFile::copyPixels (InputFile &in) -{ - copyPixels (*in.tFile()); -} - - -void -TiledOutputFile::copyPixels (InputPart &in) -{ - copyPixels (*in.file); -} - -void -TiledOutputFile::copyPixels (TiledInputPart &in) -{ - copyPixels (*in.file); -} - - - -unsigned int -TiledOutputFile::tileXSize () const -{ - return _data->tileDesc.xSize; -} - - -unsigned int -TiledOutputFile::tileYSize () const -{ - return _data->tileDesc.ySize; -} - - -LevelMode -TiledOutputFile::levelMode () const -{ - return _data->tileDesc.mode; -} - - -LevelRoundingMode -TiledOutputFile::levelRoundingMode () const -{ - return _data->tileDesc.roundingMode; -} - - -int -TiledOutputFile::numLevels () const -{ - if (levelMode() == RIPMAP_LEVELS) - THROW (IEX_NAMESPACE::LogicExc, "Error calling numLevels() on image " - "file \"" << fileName() << "\" " - "(numLevels() is not defined for RIPMAPs)."); - return _data->numXLevels; -} - - -int -TiledOutputFile::numXLevels () const -{ - return _data->numXLevels; -} - - -int -TiledOutputFile::numYLevels () const -{ - return _data->numYLevels; -} - - -bool -TiledOutputFile::isValidLevel (int lx, int ly) const -{ - if (lx < 0 || ly < 0) - return false; - - if (levelMode() == MIPMAP_LEVELS && lx != ly) - return false; - - if (lx >= numXLevels() || ly >= numYLevels()) - return false; - - return true; -} - - -int -TiledOutputFile::levelWidth (int lx) const -{ - try - { - int retVal = levelSize (_data->minX, _data->maxX, lx, - _data->tileDesc.roundingMode); - - return retVal; - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling levelWidth() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -int -TiledOutputFile::levelHeight (int ly) const -{ - try - { - return levelSize (_data->minY, _data->maxY, ly, - _data->tileDesc.roundingMode); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling levelHeight() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -int -TiledOutputFile::numXTiles (int lx) const -{ - if (lx < 0 || lx >= _data->numXLevels) - THROW (IEX_NAMESPACE::LogicExc, "Error calling numXTiles() on image " - "file \"" << _streamData->os->fileName() << "\" " - "(Argument is not in valid range)."); - - return _data->numXTiles[lx]; -} - - -int -TiledOutputFile::numYTiles (int ly) const -{ - if (ly < 0 || ly >= _data->numYLevels) - THROW (IEX_NAMESPACE::LogicExc, "Error calling numXTiles() on image " - "file \"" << _streamData->os->fileName() << "\" " - "(Argument is not in valid range)."); - - return _data->numYTiles[ly]; -} - - -Box2i -TiledOutputFile::dataWindowForLevel (int l) const -{ - return dataWindowForLevel (l, l); -} - - -Box2i -TiledOutputFile::dataWindowForLevel (int lx, int ly) const -{ - try - { - return OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForLevel ( - _data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - lx, ly); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling dataWindowForLevel() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -Box2i -TiledOutputFile::dataWindowForTile (int dx, int dy, int l) const -{ - return dataWindowForTile (dx, dy, l, l); -} - - -Box2i -TiledOutputFile::dataWindowForTile (int dx, int dy, int lx, int ly) const -{ - try - { - if (!isValidTile (dx, dy, lx, ly)) - throw IEX_NAMESPACE::ArgExc ("Arguments not in valid range."); - - return OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForTile ( - _data->tileDesc, - _data->minX, _data->maxX, - _data->minY, _data->maxY, - dx, dy, - lx, ly); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Error calling dataWindowForTile() on image " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -bool -TiledOutputFile::isValidTile (int dx, int dy, int lx, int ly) const -{ - return ((lx < _data->numXLevels && lx >= 0) && - (ly < _data->numYLevels && ly >= 0) && - (dx < _data->numXTiles[lx] && dx >= 0) && - (dy < _data->numYTiles[ly] && dy >= 0)); -} - - -void -TiledOutputFile::updatePreviewImage (const PreviewRgba newPixels[]) -{ - Lock lock (*_streamData); - - if (_data->previewPosition <= 0) - THROW (IEX_NAMESPACE::LogicExc, "Cannot update preview image pixels. " - "File \"" << fileName() << "\" does not " - "contain a preview image."); - - // - // Store the new pixels in the header's preview image attribute. - // - - PreviewImageAttribute &pia = - _data->header.typedAttribute ("preview"); - - PreviewImage &pi = pia.value(); - PreviewRgba *pixels = pi.pixels(); - int numPixels = pi.width() * pi.height(); - - for (int i = 0; i < numPixels; ++i) - pixels[i] = newPixels[i]; - - // - // Save the current file position, jump to the position in - // the file where the preview image starts, store the new - // preview image, and jump back to the saved file position. - // - - Int64 savedPosition = _streamData->os->tellp(); - - try - { - _streamData->os->seekp (_data->previewPosition); - pia.writeValueTo (*_streamData->os, _data->version); - _streamData->os->seekp (savedPosition); - } - catch (IEX_NAMESPACE::BaseExc &e) - { - REPLACE_EXC (e, "Cannot update preview image pixels for " - "file \"" << fileName() << "\". " << e); - throw; - } -} - - -void -TiledOutputFile::breakTile - (int dx, int dy, - int lx, int ly, - int offset, - int length, - char c) -{ - Lock lock (*_streamData); - - Int64 position = _data->tileOffsets (dx, dy, lx, ly); - - if (!position) - THROW (IEX_NAMESPACE::ArgExc, - "Cannot overwrite tile " - "(" << dx << ", " << dy << ", " << lx << "," << ly << "). " - "The tile has not yet been stored in " - "file \"" << fileName() << "\"."); - - _streamData->currentPosition = 0; - _streamData->os->seekp (position + offset); - - for (int i = 0; i < length; ++i) - _streamData->os->write (&c, 1); -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputFile.h deleted file mode 100644 index bfd6bea..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputFile.h +++ /dev/null @@ -1,495 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_TILED_OUTPUT_FILE_H -#define INCLUDED_IMF_TILED_OUTPUT_FILE_H - -//----------------------------------------------------------------------------- -// -// class TiledOutputFile -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfFrameBuffer.h" -#include "ImathBox.h" -#include "ImfTileDescription.h" -#include "ImfThreading.h" -#include "ImfGenericOutputFile.h" -#include "ImfForward.h" -#include "ImfNamespace.h" -#include "ImfExport.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -struct PreviewRgba; - - -class IMF_EXPORT TiledOutputFile : public GenericOutputFile -{ - public: - - //------------------------------------------------------------------- - // A constructor that opens the file with the specified name, and - // writes the file header. The file header is also copied into the - // TiledOutputFile object, and can later be accessed via the header() - // method. - // - // Destroying TiledOutputFile constructed with this constructor - // automatically closes the corresponding files. - // - // The header must contain a TileDescriptionAttribute called "tiles". - // - // The x and y subsampling factors for all image channels must be 1; - // subsampling is not supported. - // - // Tiles can be written to the file in arbitrary order. The line - // order attribute can be used to cause the tiles to be sorted in - // the file. When the file is read later, reading the tiles in the - // same order as they are in the file tends to be significantly - // faster than reading the tiles in random order (see writeTile, - // below). - //------------------------------------------------------------------- - - TiledOutputFile (const char fileName[], - const Header &header, - int numThreads = globalThreadCount ()); - - - // ---------------------------------------------------------------- - // A constructor that attaches the new TiledOutputFile object to - // a file that has already been opened. Destroying TiledOutputFile - // objects constructed with this constructor does not automatically - // close the corresponding files. - // ---------------------------------------------------------------- - - TiledOutputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - int numThreads = globalThreadCount ()); - - - //----------------------------------------------------- - // Destructor - // - // Destroying a TiledOutputFile object before all tiles - // have been written results in an incomplete file. - //----------------------------------------------------- - - virtual ~TiledOutputFile (); - - - //------------------------ - // Access to the file name - //------------------------ - - const char * fileName () const; - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - - - //------------------------------------------------------- - // Set the current frame buffer -- copies the FrameBuffer - // object into the TiledOutputFile object. - // - // The current frame buffer is the source of the pixel - // data written to the file. The current frame buffer - // must be set at least once before writeTile() is - // called. The current frame buffer can be changed - // after each call to writeTile(). - //------------------------------------------------------- - - void setFrameBuffer (const FrameBuffer &frameBuffer); - - - //----------------------------------- - // Access to the current frame buffer - //----------------------------------- - - const FrameBuffer & frameBuffer () const; - - - //------------------- - // Utility functions: - //------------------- - - //--------------------------------------------------------- - // Multiresolution mode and tile size: - // The following functions return the xSize, ySize and mode - // fields of the file header's TileDescriptionAttribute. - //--------------------------------------------------------- - - unsigned int tileXSize () const; - unsigned int tileYSize () const; - LevelMode levelMode () const; - LevelRoundingMode levelRoundingMode () const; - - - //-------------------------------------------------------------------- - // Number of levels: - // - // numXLevels() returns the file's number of levels in x direction. - // - // if levelMode() == ONE_LEVEL: - // return value is: 1 - // - // if levelMode() == MIPMAP_LEVELS: - // return value is: rfunc (log (max (w, h)) / log (2)) + 1 - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (w) / log (2)) + 1 - // - // where - // w is the width of the image's data window, max.x - min.x + 1, - // y is the height of the image's data window, max.y - min.y + 1, - // and rfunc(x) is either floor(x), or ceil(x), depending on - // whether levelRoundingMode() returns ROUND_DOWN or ROUND_UP. - // - // numYLevels() returns the file's number of levels in y direction. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // return value is: rfunc (log (h) / log (2)) + 1 - // - // - // numLevels() is a convenience function for use with MIPMAP_LEVELS - // files. - // - // if levelMode() == ONE_LEVEL or levelMode() == MIPMAP_LEVELS: - // return value is the same as for numXLevels() - // - // if levelMode() == RIPMAP_LEVELS: - // an IEX_NAMESPACE::LogicExc exception is thrown - // - // isValidLevel(lx, ly) returns true if the file contains - // a level with level number (lx, ly), false if not. - // - //-------------------------------------------------------------------- - - int numLevels () const; - int numXLevels () const; - int numYLevels () const; - bool isValidLevel (int lx, int ly) const; - - - //--------------------------------------------------------- - // Dimensions of a level: - // - // levelWidth(lx) returns the width of a level with level - // number (lx, *), where * is any number. - // - // return value is: - // max (1, rfunc (w / pow (2, lx))) - // - // - // levelHeight(ly) returns the height of a level with level - // number (*, ly), where * is any number. - // - // return value is: - // max (1, rfunc (h / pow (2, ly))) - // - //--------------------------------------------------------- - - int levelWidth (int lx) const; - int levelHeight (int ly) const; - - - //---------------------------------------------------------- - // Number of tiles: - // - // numXTiles(lx) returns the number of tiles in x direction - // that cover a level with level number (lx, *), where * is - // any number. - // - // return value is: - // (levelWidth(lx) + tileXSize() - 1) / tileXSize() - // - // - // numYTiles(ly) returns the number of tiles in y direction - // that cover a level with level number (*, ly), where * is - // any number. - // - // return value is: - // (levelHeight(ly) + tileXSize() - 1) / tileXSize() - // - //---------------------------------------------------------- - - int numXTiles (int lx = 0) const; - int numYTiles (int ly = 0) const; - - - //--------------------------------------------------------- - // Level pixel ranges: - // - // dataWindowForLevel(lx, ly) returns a 2-dimensional - // region of valid pixel coordinates for a level with - // level number (lx, ly) - // - // return value is a Box2i with min value: - // (dataWindow.min.x, dataWindow.min.y) - // - // and max value: - // (dataWindow.min.x + levelWidth(lx) - 1, - // dataWindow.min.y + levelHeight(ly) - 1) - // - // dataWindowForLevel(level) is a convenience function used - // for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForLevel(level, level). - // - //--------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForLevel (int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const; - - - //------------------------------------------------------------------- - // Tile pixel ranges: - // - // dataWindowForTile(dx, dy, lx, ly) returns a 2-dimensional - // region of valid pixel coordinates for a tile with tile coordinates - // (dx,dy) and level number (lx, ly). - // - // return value is a Box2i with min value: - // (dataWindow.min.x + dx * tileXSize(), - // dataWindow.min.y + dy * tileYSize()) - // - // and max value: - // (dataWindow.min.x + (dx + 1) * tileXSize() - 1, - // dataWindow.min.y + (dy + 1) * tileYSize() - 1) - // - // dataWindowForTile(dx, dy, level) is a convenience function - // used for ONE_LEVEL and MIPMAP_LEVELS files. It returns - // dataWindowForTile(dx, dy, level, level). - // - //------------------------------------------------------------------- - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int l = 0) const; - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int lx, int ly) const; - - //------------------------------------------------------------------ - // Write pixel data: - // - // writeTile(dx, dy, lx, ly) writes the tile with tile - // coordinates (dx, dy), and level number (lx, ly) to - // the file. - // - // dx must lie in the interval [0, numXTiles(lx) - 1] - // dy must lie in the interval [0, numYTiles(ly) - 1] - // - // lx must lie in the interval [0, numXLevels() - 1] - // ly must lie in the inverval [0, numYLevels() - 1] - // - // writeTile(dx, dy, level) is a convenience function - // used for ONE_LEVEL and MIPMAP_LEVEL files. It calls - // writeTile(dx, dy, level, level). - // - // The two writeTiles(dx1, dx2, dy1, dy2, ...) functions allow - // writing multiple tiles at once. If multi-threading is used - // multiple tiles are written concurrently. The tile coordinates, - // dx1, dx2 and dy1, dy2, specify inclusive ranges of tile - // coordinates. It is valid for dx1 < dx2 or dy1 < dy2; the - // tiles are always written in the order specified by the line - // order attribute. Hence, it is not possible to specify an - // "invalid" or empty tile range. - // - // Pixels that are outside the pixel coordinate range for the tile's - // level, are never accessed by writeTile(). - // - // Each tile in the file must be written exactly once. - // - // The file's line order attribute determines the order of the tiles - // in the file: - // - // INCREASING_Y In the file, the tiles for each level are stored - // in a contiguous block. The levels are ordered - // like this: - // - // (0, 0) (1, 0) ... (nx-1, 0) - // (0, 1) (1, 1) ... (nx-1, 1) - // ... - // (0,ny-1) (1,ny-1) ... (nx-1,ny-1) - // - // where nx = numXLevels(), and ny = numYLevels(). - // In an individual level, (lx, ly), the tiles - // are stored in the following order: - // - // (0, 0) (1, 0) ... (tx-1, 0) - // (0, 1) (1, 1) ... (tx-1, 1) - // ... - // (0,ty-1) (1,ty-1) ... (tx-1,ty-1) - // - // where tx = numXTiles(lx), - // and ty = numYTiles(ly). - // - // DECREASING_Y As for INCREASING_Y, the tiles for each level - // are stored in a contiguous block. The levels - // are ordered the same way as for INCREASING_Y, - // but within an individual level, the tiles - // are stored in this order: - // - // (0,ty-1) (1,ty-1) ... (tx-1,ty-1) - // ... - // (0, 1) (1, 1) ... (tx-1, 1) - // (0, 0) (1, 0) ... (tx-1, 0) - // - // - // RANDOM_Y The order of the calls to writeTile() determines - // the order of the tiles in the file. - // - //------------------------------------------------------------------ - - void writeTile (int dx, int dy, int l = 0); - void writeTile (int dx, int dy, int lx, int ly); - - void writeTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly); - - void writeTiles (int dx1, int dx2, int dy1, int dy2, - int l = 0); - - - //------------------------------------------------------------------ - // Shortcut to copy all pixels from a TiledInputFile into this file, - // without uncompressing and then recompressing the pixel data. - // This file's header must be compatible with the TiledInputFile's - // header: The two header's "dataWindow", "compression", - // "lineOrder", "channels", and "tiles" attributes must be the same. - //------------------------------------------------------------------ - - void copyPixels (TiledInputFile &in); - void copyPixels (TiledInputPart &in); - - - //------------------------------------------------------------------ - // Shortcut to copy all pixels from an InputFile into this file, - // without uncompressing and then recompressing the pixel data. - // This file's header must be compatible with the InputFile's - // header: The two header's "dataWindow", "compression", - // "lineOrder", "channels", and "tiles" attributes must be the same. - // - // To use this function, the InputFile must be tiled. - //------------------------------------------------------------------ - - void copyPixels (InputFile &in); - void copyPixels (InputPart &in); - - - - //-------------------------------------------------------------- - // Updating the preview image: - // - // updatePreviewImage() supplies a new set of pixels for the - // preview image attribute in the file's header. If the header - // does not contain a preview image, updatePreviewImage() throws - // an IEX_NAMESPACE::LogicExc. - // - // Note: updatePreviewImage() is necessary because images are - // often stored in a file incrementally, a few tiles at a time, - // while the image is being generated. Since the preview image - // is an attribute in the file's header, it gets stored in the - // file as soon as the file is opened, but we may not know what - // the preview image should look like until we have written the - // last tile of the main image. - // - //-------------------------------------------------------------- - - void updatePreviewImage (const PreviewRgba newPixels[]); - - - //------------------------------------------------------------- - // Break a tile -- for testing and debugging only: - // - // breakTile(dx,dy,lx,ly,p,n,c) introduces an error into the - // output file by writing n copies of character c, starting - // p bytes from the beginning of the tile with tile coordinates - // (dx, dy) and level number (lx, ly). - // - // Warning: Calling this function usually results in a broken - // image file. The file or parts of it may not be readable, - // or the file may contain bad data. - // - //------------------------------------------------------------- - - void breakTile (int dx, int dy, - int lx, int ly, - int offset, - int length, - char c); - struct Data; - - private: - - // ---------------------------------------------------------------- - // A constructor attaches the OutputStreamMutex to the - // given one from MultiPartOutputFile. Set the previewPosition - // and lineOffsetsPosition which have been acquired from - // the constructor of MultiPartOutputFile as well. - // ---------------------------------------------------------------- - TiledOutputFile (const OutputPartData* part); - - TiledOutputFile (const TiledOutputFile &); // not implemented - TiledOutputFile & operator = (const TiledOutputFile &); // not implemented - - void initialize (const Header &header); - - bool isValidTile (int dx, int dy, - int lx, int ly) const; - - size_t bytesPerLineForTile (int dx, int dy, - int lx, int ly) const; - - Data * _data; - - OutputStreamMutex* _streamData; - bool _deleteStream; - - friend class MultiPartOutputFile; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputPart.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputPart.cpp deleted file mode 100644 index cfa0e78..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputPart.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfTiledOutputPart.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -TiledOutputPart::TiledOutputPart(MultiPartOutputFile& multiPartFile, int partNumber) -{ - file = multiPartFile.getOutputPart(partNumber); -} - -const char * -TiledOutputPart::fileName () const -{ - return file->fileName(); -} - -const Header & -TiledOutputPart::header () const -{ - return file->header(); -} - -void -TiledOutputPart::setFrameBuffer (const FrameBuffer &frameBuffer) -{ - file->setFrameBuffer(frameBuffer); -} - -const FrameBuffer & -TiledOutputPart::frameBuffer () const -{ - return file->frameBuffer(); -} - -unsigned int -TiledOutputPart::tileXSize () const -{ - return file->tileXSize(); -} - -unsigned int -TiledOutputPart::tileYSize () const -{ - return file->tileYSize(); -} - -LevelMode -TiledOutputPart::levelMode () const -{ - return file->levelMode(); -} - -LevelRoundingMode -TiledOutputPart::levelRoundingMode () const -{ - return file->levelRoundingMode(); -} - -int -TiledOutputPart::numLevels () const -{ - return file->numLevels(); -} - -int -TiledOutputPart::numXLevels () const -{ - return file->numXLevels(); -} - -int -TiledOutputPart::numYLevels () const -{ - return file->numYLevels(); -} - -bool -TiledOutputPart::isValidLevel (int lx, int ly) const -{ - return file->isValidLevel(lx, ly); -} - -int -TiledOutputPart::levelWidth (int lx) const -{ - return file->levelWidth(lx); -} - -int -TiledOutputPart::levelHeight (int ly) const -{ - return file->levelHeight(ly); -} - -int -TiledOutputPart::numXTiles (int lx) const -{ - return file->numXTiles(lx); -} - -int -TiledOutputPart::numYTiles (int ly) const -{ - return file->numYTiles(ly); -} - -IMATH_NAMESPACE::Box2i -TiledOutputPart::dataWindowForLevel (int l) const -{ - return file->dataWindowForLevel(l); -} - -IMATH_NAMESPACE::Box2i -TiledOutputPart::dataWindowForLevel (int lx, int ly) const -{ - return file->dataWindowForLevel(lx, ly); -} - -IMATH_NAMESPACE::Box2i -TiledOutputPart::dataWindowForTile (int dx, int dy, int l) const -{ - return file->dataWindowForTile(dx, dy, l); -} - -IMATH_NAMESPACE::Box2i -TiledOutputPart::dataWindowForTile (int dx, int dy, int lx, int ly) const -{ - return file->dataWindowForTile(dx, dy, lx, ly); -} - -void -TiledOutputPart::writeTile (int dx, int dy, int l) -{ - file->writeTile(dx, dy, l); -} - -void -TiledOutputPart::writeTile (int dx, int dy, int lx, int ly) -{ - file->writeTile(dx, dy, lx, ly); -} - -void -TiledOutputPart::writeTiles (int dx1, int dx2, int dy1, int dy2, int lx, int ly) -{ - file->writeTiles(dx1, dx2, dy1, dy2, lx, ly); -} - -void -TiledOutputPart::writeTiles (int dx1, int dx2, int dy1, int dy2, int l) -{ - file->writeTiles(dx1, dx2, dy1, dy2, l); -} - -void -TiledOutputPart::copyPixels (TiledInputFile &in) -{ - file->copyPixels(in); -} - -void -TiledOutputPart::copyPixels (InputFile &in) -{ - file->copyPixels(in); -} - -void -TiledOutputPart::copyPixels (TiledInputPart &in) -{ - file->copyPixels(in); -} - -void -TiledOutputPart::copyPixels (InputPart &in) -{ - file->copyPixels(in); -} - - - -void -TiledOutputPart::updatePreviewImage (const PreviewRgba newPixels[]) -{ - file->updatePreviewImage(newPixels); -} - -void -TiledOutputPart::breakTile (int dx, int dy, int lx, int ly, int offset, int length, char c) -{ - file->breakTile(dx, dy, lx, ly, offset, length, c); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputPart.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputPart.h deleted file mode 100644 index 1af84be..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputPart.h +++ /dev/null @@ -1,105 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef IMFTILEDOUTPUTPART_H_ -#define IMFTILEDOUTPUTPART_H_ - -#include "ImfMultiPartOutputFile.h" -#include "ImfTiledOutputFile.h" -#include "ImfForward.h" -#include "ImfExport.h" -#include "ImfNamespace.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -//------------------------------------------------------------------------------- -// class TiledOutputPart: -// -// Same interface as TiledOutputFile. Please have a reference to TiledOutputFile. -//------------------------------------------------------------------------------- - -class IMF_EXPORT TiledOutputPart -{ - public: - TiledOutputPart(MultiPartOutputFile& multiPartFile, int partNumber); - - const char * fileName () const; - const Header & header () const; - void setFrameBuffer (const FrameBuffer &frameBuffer); - const FrameBuffer & frameBuffer () const; - unsigned int tileXSize () const; - unsigned int tileYSize () const; - LevelMode levelMode () const; - LevelRoundingMode levelRoundingMode () const; - int numLevels () const; - int numXLevels () const; - int numYLevels () const; - bool isValidLevel (int lx, int ly) const; - int levelWidth (int lx) const; - int levelHeight (int ly) const; - int numXTiles (int lx = 0) const; - int numYTiles (int ly = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const; - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int lx, int ly) const; - void writeTile (int dx, int dy, int l = 0); - void writeTile (int dx, int dy, int lx, int ly); - void writeTiles (int dx1, int dx2, int dy1, int dy2, - int lx, int ly); - void writeTiles (int dx1, int dx2, int dy1, int dy2, - int l = 0); - void copyPixels (TiledInputFile &in); - void copyPixels (InputFile &in); - void copyPixels (TiledInputPart &in); - void copyPixels (InputPart &in); - - - void updatePreviewImage (const PreviewRgba newPixels[]); - void breakTile (int dx, int dy, - int lx, int ly, - int offset, - int length, - char c); - - private: - TiledOutputFile* file; -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif /* IMFTILEDOUTPUTPART_H_ */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp deleted file mode 100644 index 157aec0..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp +++ /dev/null @@ -1,1163 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class TiledRgbaOutputFile -// class TiledRgbaInputFile -// -//----------------------------------------------------------------------------- - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "IlmThreadMutex.h" -#include "Iex.h" - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace std; -using namespace IMATH_NAMESPACE; -using namespace RgbaYca; -using namespace ILMTHREAD_NAMESPACE; - -namespace { - -void -insertChannels (Header &header, - RgbaChannels rgbaChannels, - const char fileName[]) -{ - ChannelList ch; - - if (rgbaChannels & (WRITE_Y | WRITE_C)) - { - if (rgbaChannels & WRITE_Y) - { - ch.insert ("Y", Channel (HALF, 1, 1)); - } - - if (rgbaChannels & WRITE_C) - { - THROW (IEX_NAMESPACE::ArgExc, "Cannot open file \"" << fileName << "\" " - "for writing. Tiled image files do not " - "support subsampled chroma channels."); - } - } - else - { - if (rgbaChannels & WRITE_R) - ch.insert ("R", Channel (HALF, 1, 1)); - - if (rgbaChannels & WRITE_G) - ch.insert ("G", Channel (HALF, 1, 1)); - - if (rgbaChannels & WRITE_B) - ch.insert ("B", Channel (HALF, 1, 1)); - } - - if (rgbaChannels & WRITE_A) - ch.insert ("A", Channel (HALF, 1, 1)); - - header.channels() = ch; -} - - -RgbaChannels -rgbaChannels (const ChannelList &ch, const string &channelNamePrefix = "") -{ - int i = 0; - - if (ch.findChannel (channelNamePrefix + "R")) - i |= WRITE_R; - - if (ch.findChannel (channelNamePrefix + "G")) - i |= WRITE_G; - - if (ch.findChannel (channelNamePrefix + "B")) - i |= WRITE_B; - - if (ch.findChannel (channelNamePrefix + "A")) - i |= WRITE_A; - - if (ch.findChannel (channelNamePrefix + "Y")) - i |= WRITE_Y; - - return RgbaChannels (i); -} - - -string -prefixFromLayerName (const string &layerName, const Header &header) -{ - if (layerName.empty()) - return ""; - - if (hasMultiView (header) && multiView(header)[0] == layerName) - return ""; - - return layerName + "."; -} - - -V3f -ywFromHeader (const Header &header) -{ - Chromaticities cr; - - if (hasChromaticities (header)) - cr = chromaticities (header); - - return computeYw (cr); -} - -} // namespace - - -class TiledRgbaOutputFile::ToYa: public Mutex -{ - public: - - ToYa (TiledOutputFile &outputFile, RgbaChannels rgbaChannels); - - void setFrameBuffer (const Rgba *base, - size_t xStride, - size_t yStride); - - void writeTile (int dx, int dy, int lx, int ly); - - private: - - TiledOutputFile & _outputFile; - bool _writeA; - unsigned int _tileXSize; - unsigned int _tileYSize; - V3f _yw; - Array2D _buf; - const Rgba * _fbBase; - size_t _fbXStride; - size_t _fbYStride; -}; - - -TiledRgbaOutputFile::ToYa::ToYa (TiledOutputFile &outputFile, - RgbaChannels rgbaChannels) -: - _outputFile (outputFile) -{ - _writeA = (rgbaChannels & WRITE_A)? true: false; - - const TileDescription &td = outputFile.header().tileDescription(); - - _tileXSize = td.xSize; - _tileYSize = td.ySize; - _yw = ywFromHeader (_outputFile.header()); - _buf.resizeErase (_tileYSize, _tileXSize); - _fbBase = 0; - _fbXStride = 0; - _fbYStride = 0; -} - - -void -TiledRgbaOutputFile::ToYa::setFrameBuffer (const Rgba *base, - size_t xStride, - size_t yStride) -{ - _fbBase = base; - _fbXStride = xStride; - _fbYStride = yStride; -} - - -void -TiledRgbaOutputFile::ToYa::writeTile (int dx, int dy, int lx, int ly) -{ - if (_fbBase == 0) - { - THROW (IEX_NAMESPACE::ArgExc, "No frame buffer was specified as the " - "pixel data source for image file " - "\"" << _outputFile.fileName() << "\"."); - } - - // - // Copy the tile's RGBA pixels into _buf and convert - // them to luminance/alpha format - // - - Box2i dw = _outputFile.dataWindowForTile (dx, dy, lx, ly); - int width = dw.max.x - dw.min.x + 1; - - for (int y = dw.min.y, y1 = 0; y <= dw.max.y; ++y, ++y1) - { - for (int x = dw.min.x, x1 = 0; x <= dw.max.x; ++x, ++x1) - _buf[y1][x1] = _fbBase[x * _fbXStride + y * _fbYStride]; - - RGBAtoYCA (_yw, width, _writeA, _buf[y1], _buf[y1]); - } - - // - // Store the contents of _buf in the output file - // - - FrameBuffer fb; - - fb.insert ("Y", Slice (HALF, // type - (char *) &_buf[-dw.min.y][-dw.min.x].g, // base - sizeof (Rgba), // xStride - sizeof (Rgba) * _tileXSize)); // yStride - - fb.insert ("A", Slice (HALF, // type - (char *) &_buf[-dw.min.y][-dw.min.x].a, // base - sizeof (Rgba), // xStride - sizeof (Rgba) * _tileXSize)); // yStride - - _outputFile.setFrameBuffer (fb); - _outputFile.writeTile (dx, dy, lx, ly); -} - - -TiledRgbaOutputFile::TiledRgbaOutputFile - (const char name[], - const Header &header, - RgbaChannels rgbaChannels, - int tileXSize, - int tileYSize, - LevelMode mode, - LevelRoundingMode rmode, - int numThreads) -: - _outputFile (0), - _toYa (0) -{ - Header hd (header); - insertChannels (hd, rgbaChannels, name); - hd.setTileDescription (TileDescription (tileXSize, tileYSize, mode, rmode)); - _outputFile = new TiledOutputFile (name, hd, numThreads); - - if (rgbaChannels & WRITE_Y) - _toYa = new ToYa (*_outputFile, rgbaChannels); -} - - - -TiledRgbaOutputFile::TiledRgbaOutputFile - (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - RgbaChannels rgbaChannels, - int tileXSize, - int tileYSize, - LevelMode mode, - LevelRoundingMode rmode, - int numThreads) -: - _outputFile (0), - _toYa (0) -{ - Header hd (header); - insertChannels (hd, rgbaChannels, os.fileName()); - hd.setTileDescription (TileDescription (tileXSize, tileYSize, mode, rmode)); - _outputFile = new TiledOutputFile (os, hd, numThreads); - - if (rgbaChannels & WRITE_Y) - _toYa = new ToYa (*_outputFile, rgbaChannels); -} - - - -TiledRgbaOutputFile::TiledRgbaOutputFile - (const char name[], - int tileXSize, - int tileYSize, - LevelMode mode, - LevelRoundingMode rmode, - const IMATH_NAMESPACE::Box2i &displayWindow, - const IMATH_NAMESPACE::Box2i &dataWindow, - RgbaChannels rgbaChannels, - float pixelAspectRatio, - const IMATH_NAMESPACE::V2f screenWindowCenter, - float screenWindowWidth, - LineOrder lineOrder, - Compression compression, - int numThreads) -: - _outputFile (0), - _toYa (0) -{ - Header hd (displayWindow, - dataWindow.isEmpty()? displayWindow: dataWindow, - pixelAspectRatio, - screenWindowCenter, - screenWindowWidth, - lineOrder, - compression); - - insertChannels (hd, rgbaChannels, name); - hd.setTileDescription (TileDescription (tileXSize, tileYSize, mode, rmode)); - _outputFile = new TiledOutputFile (name, hd, numThreads); - - if (rgbaChannels & WRITE_Y) - _toYa = new ToYa (*_outputFile, rgbaChannels); -} - - -TiledRgbaOutputFile::TiledRgbaOutputFile - (const char name[], - int width, - int height, - int tileXSize, - int tileYSize, - LevelMode mode, - LevelRoundingMode rmode, - RgbaChannels rgbaChannels, - float pixelAspectRatio, - const IMATH_NAMESPACE::V2f screenWindowCenter, - float screenWindowWidth, - LineOrder lineOrder, - Compression compression, - int numThreads) -: - _outputFile (0), - _toYa (0) -{ - Header hd (width, - height, - pixelAspectRatio, - screenWindowCenter, - screenWindowWidth, - lineOrder, - compression); - - insertChannels (hd, rgbaChannels, name); - hd.setTileDescription (TileDescription (tileXSize, tileYSize, mode, rmode)); - _outputFile = new TiledOutputFile (name, hd, numThreads); - - if (rgbaChannels & WRITE_Y) - _toYa = new ToYa (*_outputFile, rgbaChannels); -} - - -TiledRgbaOutputFile::~TiledRgbaOutputFile () -{ - delete _outputFile; - delete _toYa; -} - - -void -TiledRgbaOutputFile::setFrameBuffer (const Rgba *base, - size_t xStride, - size_t yStride) -{ - if (_toYa) - { - Lock lock (*_toYa); - _toYa->setFrameBuffer (base, xStride, yStride); - } - else - { - size_t xs = xStride * sizeof (Rgba); - size_t ys = yStride * sizeof (Rgba); - - FrameBuffer fb; - - fb.insert ("R", Slice (HALF, (char *) &base[0].r, xs, ys)); - fb.insert ("G", Slice (HALF, (char *) &base[0].g, xs, ys)); - fb.insert ("B", Slice (HALF, (char *) &base[0].b, xs, ys)); - fb.insert ("A", Slice (HALF, (char *) &base[0].a, xs, ys)); - - _outputFile->setFrameBuffer (fb); - } -} - - -const Header & -TiledRgbaOutputFile::header () const -{ - return _outputFile->header(); -} - - -const FrameBuffer & -TiledRgbaOutputFile::frameBuffer () const -{ - return _outputFile->frameBuffer(); -} - - -const IMATH_NAMESPACE::Box2i & -TiledRgbaOutputFile::displayWindow () const -{ - return _outputFile->header().displayWindow(); -} - - -const IMATH_NAMESPACE::Box2i & -TiledRgbaOutputFile::dataWindow () const -{ - return _outputFile->header().dataWindow(); -} - - -float -TiledRgbaOutputFile::pixelAspectRatio () const -{ - return _outputFile->header().pixelAspectRatio(); -} - - -const IMATH_NAMESPACE::V2f -TiledRgbaOutputFile::screenWindowCenter () const -{ - return _outputFile->header().screenWindowCenter(); -} - - -float -TiledRgbaOutputFile::screenWindowWidth () const -{ - return _outputFile->header().screenWindowWidth(); -} - - -LineOrder -TiledRgbaOutputFile::lineOrder () const -{ - return _outputFile->header().lineOrder(); -} - - -Compression -TiledRgbaOutputFile::compression () const -{ - return _outputFile->header().compression(); -} - - -RgbaChannels -TiledRgbaOutputFile::channels () const -{ - return rgbaChannels (_outputFile->header().channels()); -} - - -unsigned int -TiledRgbaOutputFile::tileXSize () const -{ - return _outputFile->tileXSize(); -} - - -unsigned int -TiledRgbaOutputFile::tileYSize () const -{ - return _outputFile->tileYSize(); -} - - -LevelMode -TiledRgbaOutputFile::levelMode () const -{ - return _outputFile->levelMode(); -} - - -LevelRoundingMode -TiledRgbaOutputFile::levelRoundingMode () const -{ - return _outputFile->levelRoundingMode(); -} - - -int -TiledRgbaOutputFile::numLevels () const -{ - return _outputFile->numLevels(); -} - - -int -TiledRgbaOutputFile::numXLevels () const -{ - return _outputFile->numXLevels(); -} - - -int -TiledRgbaOutputFile::numYLevels () const -{ - return _outputFile->numYLevels(); -} - - -bool -TiledRgbaOutputFile::isValidLevel (int lx, int ly) const -{ - return _outputFile->isValidLevel (lx, ly); -} - - -int -TiledRgbaOutputFile::levelWidth (int lx) const -{ - return _outputFile->levelWidth (lx); -} - - -int -TiledRgbaOutputFile::levelHeight (int ly) const -{ - return _outputFile->levelHeight (ly); -} - - -int -TiledRgbaOutputFile::numXTiles (int lx) const -{ - return _outputFile->numXTiles (lx); -} - - -int -TiledRgbaOutputFile::numYTiles (int ly) const -{ - return _outputFile->numYTiles (ly); -} - - -IMATH_NAMESPACE::Box2i -TiledRgbaOutputFile::dataWindowForLevel (int l) const -{ - return _outputFile->dataWindowForLevel (l); -} - - -IMATH_NAMESPACE::Box2i -TiledRgbaOutputFile::dataWindowForLevel (int lx, int ly) const -{ - return _outputFile->dataWindowForLevel (lx, ly); -} - - -IMATH_NAMESPACE::Box2i -TiledRgbaOutputFile::dataWindowForTile (int dx, int dy, int l) const -{ - return _outputFile->dataWindowForTile (dx, dy, l); -} - - -IMATH_NAMESPACE::Box2i -TiledRgbaOutputFile::dataWindowForTile (int dx, int dy, int lx, int ly) const -{ - return _outputFile->dataWindowForTile (dx, dy, lx, ly); -} - - -void -TiledRgbaOutputFile::writeTile (int dx, int dy, int l) -{ - if (_toYa) - { - Lock lock (*_toYa); - _toYa->writeTile (dx, dy, l, l); - } - else - { - _outputFile->writeTile (dx, dy, l); - } -} - - -void -TiledRgbaOutputFile::writeTile (int dx, int dy, int lx, int ly) -{ - if (_toYa) - { - Lock lock (*_toYa); - _toYa->writeTile (dx, dy, lx, ly); - } - else - { - _outputFile->writeTile (dx, dy, lx, ly); - } -} - - -void -TiledRgbaOutputFile::writeTiles - (int dxMin, int dxMax, int dyMin, int dyMax, int lx, int ly) -{ - if (_toYa) - { - Lock lock (*_toYa); - - for (int dy = dyMin; dy <= dyMax; dy++) - for (int dx = dxMin; dx <= dxMax; dx++) - _toYa->writeTile (dx, dy, lx, ly); - } - else - { - _outputFile->writeTiles (dxMin, dxMax, dyMin, dyMax, lx, ly); - } -} - -void -TiledRgbaOutputFile::writeTiles - (int dxMin, int dxMax, int dyMin, int dyMax, int l) -{ - writeTiles (dxMin, dxMax, dyMin, dyMax, l, l); -} - - -class TiledRgbaInputFile::FromYa: public Mutex -{ - public: - - FromYa (TiledInputFile &inputFile); - - void setFrameBuffer (Rgba *base, - size_t xStride, - size_t yStride, - const string &channelNamePrefix); - - void readTile (int dx, int dy, int lx, int ly); - - private: - - TiledInputFile & _inputFile; - unsigned int _tileXSize; - unsigned int _tileYSize; - V3f _yw; - Array2D _buf; - Rgba * _fbBase; - size_t _fbXStride; - size_t _fbYStride; -}; - - -TiledRgbaInputFile::FromYa::FromYa (TiledInputFile &inputFile) -: - _inputFile (inputFile) -{ - const TileDescription &td = inputFile.header().tileDescription(); - - _tileXSize = td.xSize; - _tileYSize = td.ySize; - _yw = ywFromHeader (_inputFile.header()); - _buf.resizeErase (_tileYSize, _tileXSize); - _fbBase = 0; - _fbXStride = 0; - _fbYStride = 0; -} - - -void -TiledRgbaInputFile::FromYa::setFrameBuffer (Rgba *base, - size_t xStride, - size_t yStride, - const string &channelNamePrefix) -{ - if (_fbBase == 0) -{ - FrameBuffer fb; - - fb.insert (channelNamePrefix + "Y", - Slice (HALF, // type - (char *) &_buf[0][0].g, // base - sizeof (Rgba), // xStride - sizeof (Rgba) * _tileXSize, // yStride - 1, 1, // sampling - 0.0, // fillValue - true, true)); // tileCoordinates - - fb.insert (channelNamePrefix + "A", - Slice (HALF, // type - (char *) &_buf[0][0].a, // base - sizeof (Rgba), // xStride - sizeof (Rgba) * _tileXSize, // yStride - 1, 1, // sampling - 1.0, // fillValue - true, true)); // tileCoordinates - - _inputFile.setFrameBuffer (fb); - } - - _fbBase = base; - _fbXStride = xStride; - _fbYStride = yStride; -} - - -void -TiledRgbaInputFile::FromYa::readTile (int dx, int dy, int lx, int ly) -{ - if (_fbBase == 0) - { - THROW (IEX_NAMESPACE::ArgExc, "No frame buffer was specified as the " - "pixel data destination for image file " - "\"" << _inputFile.fileName() << "\"."); - } - - // - // Read the tile requested by the caller into _buf. - // - - _inputFile.readTile (dx, dy, lx, ly); - - // - // Convert the luminance/alpha pixels to RGBA - // and copy them into the caller's frame buffer. - // - - Box2i dw = _inputFile.dataWindowForTile (dx, dy, lx, ly); - int width = dw.max.x - dw.min.x + 1; - - for (int y = dw.min.y, y1 = 0; y <= dw.max.y; ++y, ++y1) - { - for (int x1 = 0; x1 < width; ++x1) - { - _buf[y1][x1].r = 0; - _buf[y1][x1].b = 0; - } - - YCAtoRGBA (_yw, width, _buf[y1], _buf[y1]); - - for (int x = dw.min.x, x1 = 0; x <= dw.max.x; ++x, ++x1) - { - _fbBase[x * _fbXStride + y * _fbYStride] = _buf[y1][x1]; - } - } -} - - -TiledRgbaInputFile::TiledRgbaInputFile (const char name[], int numThreads): - _inputFile (new TiledInputFile (name, numThreads)), - _fromYa (0), - _channelNamePrefix ("") -{ - if (channels() & WRITE_Y) - _fromYa = new FromYa (*_inputFile); -} - - -TiledRgbaInputFile::TiledRgbaInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads): - _inputFile (new TiledInputFile (is, numThreads)), - _fromYa (0), - _channelNamePrefix ("") -{ - if (channels() & WRITE_Y) - _fromYa = new FromYa (*_inputFile); -} - - -TiledRgbaInputFile::TiledRgbaInputFile (const char name[], - const string &layerName, - int numThreads) -: - _inputFile (new TiledInputFile (name, numThreads)), - _fromYa (0), - _channelNamePrefix (prefixFromLayerName (layerName, _inputFile->header())) -{ - if (channels() & WRITE_Y) - _fromYa = new FromYa (*_inputFile); -} - - -TiledRgbaInputFile::TiledRgbaInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - const string &layerName, - int numThreads) -: - _inputFile (new TiledInputFile (is, numThreads)), - _fromYa (0), - _channelNamePrefix (prefixFromLayerName (layerName, _inputFile->header())) -{ - if (channels() & WRITE_Y) - _fromYa = new FromYa (*_inputFile); -} - - -TiledRgbaInputFile::~TiledRgbaInputFile () -{ - delete _inputFile; - delete _fromYa; -} - - -void -TiledRgbaInputFile::setFrameBuffer (Rgba *base, size_t xStride, size_t yStride) -{ - if (_fromYa) - { - Lock lock (*_fromYa); - _fromYa->setFrameBuffer (base, xStride, yStride, _channelNamePrefix); - } - else - { - size_t xs = xStride * sizeof (Rgba); - size_t ys = yStride * sizeof (Rgba); - - FrameBuffer fb; - - fb.insert (_channelNamePrefix + "R", - Slice (HALF, - (char *) &base[0].r, - xs, ys, - 1, 1, // xSampling, ySampling - 0.0)); // fillValue - - fb.insert (_channelNamePrefix + "G", - Slice (HALF, - (char *) &base[0].g, - xs, ys, - 1, 1, // xSampling, ySampling - 0.0)); // fillValue - - fb.insert (_channelNamePrefix + "B", - Slice (HALF, - (char *) &base[0].b, - xs, ys, - 1, 1, // xSampling, ySampling - 0.0)); // fillValue - - fb.insert (_channelNamePrefix + "A", - Slice (HALF, - (char *) &base[0].a, - xs, ys, - 1, 1, // xSampling, ySampling - 1.0)); // fillValue - - _inputFile->setFrameBuffer (fb); - } -} - - -void -TiledRgbaInputFile::setLayerName (const std::string &layerName) -{ - delete _fromYa; - _fromYa = 0; - - _channelNamePrefix = prefixFromLayerName (layerName, _inputFile->header()); - - if (channels() & WRITE_Y) - _fromYa = new FromYa (*_inputFile); - - FrameBuffer fb; - _inputFile->setFrameBuffer (fb); -} - - -const Header & -TiledRgbaInputFile::header () const -{ - return _inputFile->header(); -} - - -const char * -TiledRgbaInputFile::fileName () const -{ - return _inputFile->fileName(); -} - - -const FrameBuffer & -TiledRgbaInputFile::frameBuffer () const -{ - return _inputFile->frameBuffer(); -} - - -const IMATH_NAMESPACE::Box2i & -TiledRgbaInputFile::displayWindow () const -{ - return _inputFile->header().displayWindow(); -} - - -const IMATH_NAMESPACE::Box2i & -TiledRgbaInputFile::dataWindow () const -{ - return _inputFile->header().dataWindow(); -} - - -float -TiledRgbaInputFile::pixelAspectRatio () const -{ - return _inputFile->header().pixelAspectRatio(); -} - - -const IMATH_NAMESPACE::V2f -TiledRgbaInputFile::screenWindowCenter () const -{ - return _inputFile->header().screenWindowCenter(); -} - - -float -TiledRgbaInputFile::screenWindowWidth () const -{ - return _inputFile->header().screenWindowWidth(); -} - - -LineOrder -TiledRgbaInputFile::lineOrder () const -{ - return _inputFile->header().lineOrder(); -} - - -Compression -TiledRgbaInputFile::compression () const -{ - return _inputFile->header().compression(); -} - - -RgbaChannels -TiledRgbaInputFile::channels () const -{ - return rgbaChannels (_inputFile->header().channels(), _channelNamePrefix); -} - - -int -TiledRgbaInputFile::version () const -{ - return _inputFile->version(); -} - - -bool -TiledRgbaInputFile::isComplete () const -{ - return _inputFile->isComplete(); -} - - -unsigned int -TiledRgbaInputFile::tileXSize () const -{ - return _inputFile->tileXSize(); -} - - -unsigned int -TiledRgbaInputFile::tileYSize () const -{ - return _inputFile->tileYSize(); -} - - -LevelMode -TiledRgbaInputFile::levelMode () const -{ - return _inputFile->levelMode(); -} - - -LevelRoundingMode -TiledRgbaInputFile::levelRoundingMode () const -{ - return _inputFile->levelRoundingMode(); -} - - -int -TiledRgbaInputFile::numLevels () const -{ - return _inputFile->numLevels(); -} - - -int -TiledRgbaInputFile::numXLevels () const -{ - return _inputFile->numXLevels(); -} - - -int -TiledRgbaInputFile::numYLevels () const -{ - return _inputFile->numYLevels(); -} - - -bool -TiledRgbaInputFile::isValidLevel (int lx, int ly) const -{ - return _inputFile->isValidLevel (lx, ly); -} - - -int -TiledRgbaInputFile::levelWidth (int lx) const -{ - return _inputFile->levelWidth (lx); -} - - -int -TiledRgbaInputFile::levelHeight (int ly) const -{ - return _inputFile->levelHeight (ly); -} - - -int -TiledRgbaInputFile::numXTiles (int lx) const -{ - return _inputFile->numXTiles(lx); -} - - -int -TiledRgbaInputFile::numYTiles (int ly) const -{ - return _inputFile->numYTiles(ly); -} - - -IMATH_NAMESPACE::Box2i -TiledRgbaInputFile::dataWindowForLevel (int l) const -{ - return _inputFile->dataWindowForLevel (l); -} - - -IMATH_NAMESPACE::Box2i -TiledRgbaInputFile::dataWindowForLevel (int lx, int ly) const -{ - return _inputFile->dataWindowForLevel (lx, ly); -} - - -IMATH_NAMESPACE::Box2i -TiledRgbaInputFile::dataWindowForTile (int dx, int dy, int l) const -{ - return _inputFile->dataWindowForTile (dx, dy, l); -} - - -IMATH_NAMESPACE::Box2i -TiledRgbaInputFile::dataWindowForTile (int dx, int dy, int lx, int ly) const -{ - return _inputFile->dataWindowForTile (dx, dy, lx, ly); -} - - -void -TiledRgbaInputFile::readTile (int dx, int dy, int l) -{ - if (_fromYa) - { - Lock lock (*_fromYa); - _fromYa->readTile (dx, dy, l, l); - } - else - { - _inputFile->readTile (dx, dy, l); - } -} - - -void -TiledRgbaInputFile::readTile (int dx, int dy, int lx, int ly) -{ - if (_fromYa) - { - Lock lock (*_fromYa); - _fromYa->readTile (dx, dy, lx, ly); - } - else - { - _inputFile->readTile (dx, dy, lx, ly); - } -} - - -void -TiledRgbaInputFile::readTiles (int dxMin, int dxMax, int dyMin, int dyMax, - int lx, int ly) -{ - if (_fromYa) - { - Lock lock (*_fromYa); - - for (int dy = dyMin; dy <= dyMax; dy++) - for (int dx = dxMin; dx <= dxMax; dx++) - _fromYa->readTile (dx, dy, lx, ly); - } - else - { - _inputFile->readTiles (dxMin, dxMax, dyMin, dyMax, lx, ly); - } -} - -void -TiledRgbaInputFile::readTiles (int dxMin, int dxMax, int dyMin, int dyMax, - int l) -{ - readTiles (dxMin, dxMax, dyMin, dyMax, l, l); -} - - -void -TiledRgbaOutputFile::updatePreviewImage (const PreviewRgba newPixels[]) -{ - _outputFile->updatePreviewImage (newPixels); -} - - -void -TiledRgbaOutputFile::breakTile (int dx, int dy, int lx, int ly, - int offset, int length, char c) -{ - _outputFile->breakTile (dx, dy, lx, ly, offset, length, c); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h deleted file mode 100644 index 978ba36..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h +++ /dev/null @@ -1,482 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_TILED_RGBA_FILE_H -#define INCLUDED_IMF_TILED_RGBA_FILE_H - -//----------------------------------------------------------------------------- -// -// Simplified RGBA image I/O for tiled files -// -// class TiledRgbaOutputFile -// class TiledRgbaInputFile -// -//----------------------------------------------------------------------------- - -#include "ImfHeader.h" -#include "ImfFrameBuffer.h" -#include "ImathVec.h" -#include "ImathBox.h" -#include "half.h" -#include "ImfTileDescription.h" -#include "ImfRgba.h" -#include "ImfThreading.h" -#include -#include "ImfNamespace.h" -#include "ImfForward.h" - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -// -// Tiled RGBA output file. -// - -class IMF_EXPORT TiledRgbaOutputFile -{ - public: - - //--------------------------------------------------- - // Constructor -- rgbaChannels, tileXSize, tileYSize, - // levelMode, and levelRoundingMode overwrite the - // channel list and tile description attribute in the - // header that is passed as an argument to the - // constructor. - //--------------------------------------------------- - - TiledRgbaOutputFile (const char name[], - const Header &header, - RgbaChannels rgbaChannels, - int tileXSize, - int tileYSize, - LevelMode mode, - LevelRoundingMode rmode = ROUND_DOWN, - int numThreads = globalThreadCount ()); - - - //--------------------------------------------------- - // Constructor -- like the previous one, but the new - // TiledRgbaOutputFile is attached to a file that has - // already been opened by the caller. Destroying - // TiledRgbaOutputFileObjects constructed with this - // constructor does not automatically close the - // corresponding files. - //--------------------------------------------------- - - TiledRgbaOutputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, - const Header &header, - RgbaChannels rgbaChannels, - int tileXSize, - int tileYSize, - LevelMode mode, - LevelRoundingMode rmode = ROUND_DOWN, - int numThreads = globalThreadCount ()); - - - //------------------------------------------------------ - // Constructor -- header data are explicitly specified - // as function call arguments (an empty dataWindow means - // "same as displayWindow") - //------------------------------------------------------ - - TiledRgbaOutputFile (const char name[], - int tileXSize, - int tileYSize, - LevelMode mode, - LevelRoundingMode rmode, - const IMATH_NAMESPACE::Box2i &displayWindow, - const IMATH_NAMESPACE::Box2i &dataWindow = IMATH_NAMESPACE::Box2i(), - RgbaChannels rgbaChannels = WRITE_RGBA, - float pixelAspectRatio = 1, - const IMATH_NAMESPACE::V2f screenWindowCenter = - IMATH_NAMESPACE::V2f (0, 0), - float screenWindowWidth = 1, - LineOrder lineOrder = INCREASING_Y, - Compression compression = ZIP_COMPRESSION, - int numThreads = globalThreadCount ()); - - - //----------------------------------------------- - // Constructor -- like the previous one, but both - // the display window and the data window are - // Box2i (V2i (0, 0), V2i (width - 1, height -1)) - //----------------------------------------------- - - TiledRgbaOutputFile (const char name[], - int width, - int height, - int tileXSize, - int tileYSize, - LevelMode mode, - LevelRoundingMode rmode = ROUND_DOWN, - RgbaChannels rgbaChannels = WRITE_RGBA, - float pixelAspectRatio = 1, - const IMATH_NAMESPACE::V2f screenWindowCenter = - IMATH_NAMESPACE::V2f (0, 0), - float screenWindowWidth = 1, - LineOrder lineOrder = INCREASING_Y, - Compression compression = ZIP_COMPRESSION, - int numThreads = globalThreadCount ()); - - - virtual ~TiledRgbaOutputFile (); - - - //------------------------------------------------ - // Define a frame buffer as the pixel data source: - // Pixel (x, y) is at address - // - // base + x * xStride + y * yStride - // - //------------------------------------------------ - - void setFrameBuffer (const Rgba *base, - size_t xStride, - size_t yStride); - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - const FrameBuffer & frameBuffer () const; - const IMATH_NAMESPACE::Box2i & displayWindow () const; - const IMATH_NAMESPACE::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const IMATH_NAMESPACE::V2f screenWindowCenter () const; - float screenWindowWidth () const; - LineOrder lineOrder () const; - Compression compression () const; - RgbaChannels channels () const; - - - //---------------------------------------------------- - // Utility functions (same as in Imf::TiledOutputFile) - //---------------------------------------------------- - - unsigned int tileXSize () const; - unsigned int tileYSize () const; - LevelMode levelMode () const; - LevelRoundingMode levelRoundingMode () const; - - int numLevels () const; - int numXLevels () const; - int numYLevels () const; - bool isValidLevel (int lx, int ly) const; - - int levelWidth (int lx) const; - int levelHeight (int ly) const; - - int numXTiles (int lx = 0) const; - int numYTiles (int ly = 0) const; - - IMATH_NAMESPACE::Box2i dataWindowForLevel (int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const; - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int l = 0) const; - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int lx, int ly) const; - - //------------------------------------------------------------------ - // Write pixel data: - // - // writeTile(dx, dy, lx, ly) writes the tile with tile - // coordinates (dx, dy), and level number (lx, ly) to - // the file. - // - // dx must lie in the interval [0, numXTiles(lx)-1] - // dy must lie in the interval [0, numYTiles(ly)-1] - // - // lx must lie in the interval [0, numXLevels()-1] - // ly must lie in the inverval [0, numYLevels()-1] - // - // writeTile(dx, dy, level) is a convenience function - // used for ONE_LEVEL and MIPMAP_LEVEL files. It calls - // writeTile(dx, dy, level, level). - // - // The two writeTiles(dx1, dx2, dy1, dy2, ...) functions allow - // writing multiple tiles at once. If multi-threading is used - // multiple tiles are written concurrently. - // - // Pixels that are outside the pixel coordinate range for the tile's - // level, are never accessed by writeTile(). - // - // Each tile in the file must be written exactly once. - // - //------------------------------------------------------------------ - - void writeTile (int dx, int dy, int l = 0); - void writeTile (int dx, int dy, int lx, int ly); - - void writeTiles (int dxMin, int dxMax, int dyMin, int dyMax, - int lx, int ly); - - void writeTiles (int dxMin, int dxMax, int dyMin, int dyMax, - int l = 0); - - - // ------------------------------------------------------------------------- - // Update the preview image (see Imf::TiledOutputFile::updatePreviewImage()) - // ------------------------------------------------------------------------- - - void updatePreviewImage (const PreviewRgba[]); - - - //------------------------------------------------ - // Break a tile -- for testing and debugging only - // (see Imf::TiledOutputFile::breakTile()) - // - // Warning: Calling this function usually results - // in a broken image file. The file or parts of - // it may not be readable, or the file may contain - // bad data. - // - //------------------------------------------------ - - void breakTile (int dx, int dy, - int lx, int ly, - int offset, - int length, - char c); - private: - - // - // Copy constructor and assignment are not implemented - // - - TiledRgbaOutputFile (const TiledRgbaOutputFile &); - TiledRgbaOutputFile & operator = (const TiledRgbaOutputFile &); - - class ToYa; - - TiledOutputFile * _outputFile; - ToYa * _toYa; -}; - - - -// -// Tiled RGBA input file -// - -class IMF_EXPORT TiledRgbaInputFile -{ - public: - - //-------------------------------------------------------- - // Constructor -- opens the file with the specified name. - // Destroying TiledRgbaInputFile objects constructed with - // this constructor automatically closes the corresponding - // files. - //-------------------------------------------------------- - - TiledRgbaInputFile (const char name[], - int numThreads = globalThreadCount ()); - - - //------------------------------------------------------- - // Constructor -- attaches the new TiledRgbaInputFile - // object to a file that has already been opened by the - // caller. - // Destroying TiledRgbaInputFile objects constructed with - // this constructor does not automatically close the - // corresponding files. - //------------------------------------------------------- - - TiledRgbaInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads = globalThreadCount ()); - - - //------------------------------------------------------------ - // Constructors -- the same as the previous two, but the names - // of the red, green, blue, alpha, and luminance channels are - // expected to be layerName.R, layerName.G, etc. - //------------------------------------------------------------ - - TiledRgbaInputFile (const char name[], - const std::string &layerName, - int numThreads = globalThreadCount()); - - TiledRgbaInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, - const std::string &layerName, - int numThreads = globalThreadCount()); - - //----------- - // Destructor - //----------- - - virtual ~TiledRgbaInputFile (); - - - //----------------------------------------------------- - // Define a frame buffer as the pixel data destination: - // Pixel (x, y) is at address - // - // base + x * xStride + y * yStride - // - //----------------------------------------------------- - - void setFrameBuffer (Rgba *base, - size_t xStride, - size_t yStride); - - //------------------------------------------------------------------- - // Switch to a different layer -- subsequent calls to readTile() - // and readTiles() will read channels layerName.R, layerName.G, etc. - // After each call to setLayerName(), setFrameBuffer() must be called - // at least once before the next call to readTile() or readTiles(). - //------------------------------------------------------------------- - - void setLayerName (const std::string &layerName); - - - //-------------------------- - // Access to the file header - //-------------------------- - - const Header & header () const; - const FrameBuffer & frameBuffer () const; - const IMATH_NAMESPACE::Box2i & displayWindow () const; - const IMATH_NAMESPACE::Box2i & dataWindow () const; - float pixelAspectRatio () const; - const IMATH_NAMESPACE::V2f screenWindowCenter () const; - float screenWindowWidth () const; - LineOrder lineOrder () const; - Compression compression () const; - RgbaChannels channels () const; - const char * fileName () const; - bool isComplete () const; - - //---------------------------------- - // Access to the file format version - //---------------------------------- - - int version () const; - - - //--------------------------------------------------- - // Utility functions (same as in Imf::TiledInputFile) - //--------------------------------------------------- - - unsigned int tileXSize () const; - unsigned int tileYSize () const; - LevelMode levelMode () const; - LevelRoundingMode levelRoundingMode () const; - - int numLevels () const; - int numXLevels () const; - int numYLevels () const; - bool isValidLevel (int lx, int ly) const; - - int levelWidth (int lx) const; - int levelHeight (int ly) const; - - int numXTiles (int lx = 0) const; - int numYTiles (int ly = 0) const; - - IMATH_NAMESPACE::Box2i dataWindowForLevel (int l = 0) const; - IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const; - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int l = 0) const; - - IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, - int lx, int ly) const; - - - //---------------------------------------------------------------- - // Read pixel data: - // - // readTile(dx, dy, lx, ly) reads the tile with tile - // coordinates (dx, dy), and level number (lx, ly), - // and stores it in the current frame buffer. - // - // dx must lie in the interval [0, numXTiles(lx)-1] - // dy must lie in the interval [0, numYTiles(ly)-1] - // - // lx must lie in the interval [0, numXLevels()-1] - // ly must lie in the inverval [0, numYLevels()-1] - // - // readTile(dx, dy, level) is a convenience function used - // for ONE_LEVEL and MIPMAP_LEVELS files. It calls - // readTile(dx, dy, level, level). - // - // The two readTiles(dx1, dx2, dy1, dy2, ...) functions allow - // reading multiple tiles at once. If multi-threading is used - // multiple tiles are read concurrently. - // - // Pixels that are outside the pixel coordinate range for the - // tile's level, are never accessed by readTile(). - // - // Attempting to access a tile that is not present in the file - // throws an InputExc exception. - // - //---------------------------------------------------------------- - - void readTile (int dx, int dy, int l = 0); - void readTile (int dx, int dy, int lx, int ly); - - void readTiles (int dxMin, int dxMax, - int dyMin, int dyMax, int lx, int ly); - - void readTiles (int dxMin, int dxMax, - int dyMin, int dyMax, int l = 0); - - private: - - // - // Copy constructor and assignment are not implemented - // - - TiledRgbaInputFile (const TiledRgbaInputFile &); - TiledRgbaInputFile & operator = (const TiledRgbaInputFile &); - - class FromYa; - - TiledInputFile * _inputFile; - FromYa * _fromYa; - std::string _channelNamePrefix; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCode.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCode.cpp deleted file mode 100644 index 88b9d1c..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCode.cpp +++ /dev/null @@ -1,431 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class TimeCode -// -//----------------------------------------------------------------------------- - -#include -#include "Iex.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -TimeCode::TimeCode () -{ - _time = 0; - _user = 0; -} - - -TimeCode::TimeCode - (int hours, - int minutes, - int seconds, - int frame, - bool dropFrame, - bool colorFrame, - bool fieldPhase, - bool bgf0, - bool bgf1, - bool bgf2, - int binaryGroup1, - int binaryGroup2, - int binaryGroup3, - int binaryGroup4, - int binaryGroup5, - int binaryGroup6, - int binaryGroup7, - int binaryGroup8) -{ - setHours (hours); - setMinutes (minutes); - setSeconds (seconds); - setFrame (frame); - setDropFrame (dropFrame); - setColorFrame (colorFrame); - setFieldPhase (fieldPhase); - setBgf0 (bgf0); - setBgf1 (bgf1); - setBgf2 (bgf2); - setBinaryGroup (1, binaryGroup1); - setBinaryGroup (2, binaryGroup2); - setBinaryGroup (3, binaryGroup3); - setBinaryGroup (4, binaryGroup4); - setBinaryGroup (5, binaryGroup5); - setBinaryGroup (6, binaryGroup6); - setBinaryGroup (7, binaryGroup7); - setBinaryGroup (8, binaryGroup8); -} - - -TimeCode::TimeCode - (unsigned int timeAndFlags, - unsigned int userData, - Packing packing) -{ - setTimeAndFlags (timeAndFlags, packing); - setUserData (userData); -} - - -TimeCode::TimeCode (const TimeCode &other) -{ - _time = other._time; - _user = other._user; -} - - -TimeCode & -TimeCode::operator = (const TimeCode &other) -{ - _time = other._time; - _user = other._user; - return *this; -} - - -bool -TimeCode::operator == (const TimeCode & c) const -{ - return (_time == c._time && _user == c._user); -} - - -bool -TimeCode::operator != (const TimeCode & c) const -{ - return (_time != c._time || _user != c._user); -} - - - -namespace { - -unsigned int -bitField (unsigned int value, int minBit, int maxBit) -{ - int shift = minBit; - unsigned int mask = (~(~0U << (maxBit - minBit + 1)) << minBit); - return (value & mask) >> shift; -} - - -void -setBitField (unsigned int &value, int minBit, int maxBit, unsigned int field) -{ - int shift = minBit; - unsigned int mask = (~(~0U << (maxBit - minBit + 1)) << minBit); - value = ((value & ~mask) | ((field << shift) & mask)); -} - - -int -bcdToBinary (unsigned int bcd) -{ - return int ((bcd & 0x0f) + 10 * ((bcd >> 4) & 0x0f)); -} - - -unsigned int -binaryToBcd (int binary) -{ - int units = binary % 10; - int tens = (binary / 10) % 10; - return (unsigned int) (units | (tens << 4)); -} - - -} // namespace - - -int -TimeCode::hours () const -{ - return bcdToBinary (bitField (_time, 24, 29)); -} - - -void -TimeCode::setHours (int value) -{ - if (value < 0 || value > 23) - throw IEX_NAMESPACE::ArgExc ("Cannot set hours field in time code. " - "New value is out of range."); - - setBitField (_time, 24, 29, binaryToBcd (value)); -} - - -int -TimeCode::minutes () const -{ - return bcdToBinary (bitField (_time, 16, 22)); -} - - -void -TimeCode::setMinutes (int value) -{ - if (value < 0 || value > 59) - throw IEX_NAMESPACE::ArgExc ("Cannot set minutes field in time code. " - "New value is out of range."); - - setBitField (_time, 16, 22, binaryToBcd (value)); -} - - -int -TimeCode::seconds () const -{ - return bcdToBinary (bitField (_time, 8, 14)); -} - - -void -TimeCode::setSeconds (int value) -{ - if (value < 0 || value > 59) - throw IEX_NAMESPACE::ArgExc ("Cannot set seconds field in time code. " - "New value is out of range."); - - setBitField (_time, 8, 14, binaryToBcd (value)); -} - - -int -TimeCode::frame () const -{ - return bcdToBinary (bitField (_time, 0, 5)); -} - - -void -TimeCode::setFrame (int value) -{ - if (value < 0 || value > 59) - throw IEX_NAMESPACE::ArgExc ("Cannot set frame field in time code. " - "New value is out of range."); - - setBitField (_time, 0, 5, binaryToBcd (value)); -} - - -bool -TimeCode::dropFrame () const -{ - return !!bitField (_time, 6, 6); -} - - -void -TimeCode::setDropFrame (bool value) -{ - setBitField (_time, 6, 6, (unsigned int) !!value); -} - - -bool -TimeCode::colorFrame () const -{ - return !!bitField (_time, 7, 7); -} - - -void -TimeCode::setColorFrame (bool value) -{ - setBitField (_time, 7, 7, (unsigned int) !!value); -} - - -bool -TimeCode::fieldPhase () const -{ - return !!bitField (_time, 15, 15); -} - - -void -TimeCode::setFieldPhase (bool value) -{ - setBitField (_time, 15, 15, (unsigned int) !!value); -} - - -bool -TimeCode::bgf0 () const -{ - return !!bitField (_time, 23, 23); -} - - -void -TimeCode::setBgf0 (bool value) -{ - setBitField (_time, 23, 23, (unsigned int) !!value); -} - - -bool -TimeCode::bgf1 () const -{ - return!!bitField (_time, 30, 30); -} - - -void -TimeCode::setBgf1 (bool value) -{ - setBitField (_time, 30, 30, (unsigned int) !!value); -} - - -bool -TimeCode::bgf2 () const -{ - return !!bitField (_time, 31, 31); -} - - -void -TimeCode::setBgf2 (bool value) -{ - setBitField (_time, 31, 31, (unsigned int) !!value); -} - - -int -TimeCode::binaryGroup (int group) const -{ - if (group < 1 || group > 8) - throw IEX_NAMESPACE::ArgExc ("Cannot extract binary group from time code " - "user data. Group number is out of range."); - - int minBit = 4 * (group - 1); - int maxBit = minBit + 3; - return int (bitField (_user, minBit, maxBit)); -} - - -void -TimeCode::setBinaryGroup (int group, int value) -{ - if (group < 1 || group > 8) - throw IEX_NAMESPACE::ArgExc ("Cannot extract binary group from time code " - "user data. Group number is out of range."); - - int minBit = 4 * (group - 1); - int maxBit = minBit + 3; - setBitField (_user, minBit, maxBit, (unsigned int) value); -} - - -unsigned int -TimeCode::timeAndFlags (Packing packing) const -{ - if (packing == TV50_PACKING) - { - unsigned int t = _time; - - t &= ~((1 << 6) | (1 << 15) | (1 << 23) | (1 << 30) | (1 << 31)); - - t |= ((unsigned int) bgf0() << 15); - t |= ((unsigned int) bgf2() << 23); - t |= ((unsigned int) bgf1() << 30); - t |= ((unsigned int) fieldPhase() << 31); - - return t; - } - if (packing == FILM24_PACKING) - { - return _time & ~((1 << 6) | (1 << 7)); - } - else // packing == TV60_PACKING - { - return _time; - } -} - - -void -TimeCode::setTimeAndFlags (unsigned int value, Packing packing) -{ - if (packing == TV50_PACKING) - { - _time = value & - ~((1 << 6) | (1 << 15) | (1 << 23) | (1 << 30) | (1 << 31)); - - if (value & (1 << 15)) - setBgf0 (true); - - if (value & (1 << 23)) - setBgf2 (true); - - if (value & (1 << 30)) - setBgf1 (true); - - if (value & (1 << 31)) - setFieldPhase (true); - } - else if (packing == FILM24_PACKING) - { - _time = value & ~((1 << 6) | (1 << 7)); - } - else // packing == TV60_PACKING - { - _time = value; - } -} - - -unsigned int -TimeCode::userData () const -{ - return _user; -} - - -void -TimeCode::setUserData (unsigned int value) -{ - _user = value; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCode.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCode.h deleted file mode 100644 index 751c416..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCode.h +++ /dev/null @@ -1,242 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_TIME_CODE_H -#define INCLUDED_IMF_TIME_CODE_H - -#include "ImfExport.h" -#include "ImfNamespace.h" - -//----------------------------------------------------------------------------- -// -// class TimeCode -// -// A TimeCode object stores time and control codes as described -// in SMPTE standard 12M-1999. A TimeCode object contains the -// following fields: -// -// Time Address: -// -// hours integer, range 0 - 23 -// minutes integer, range 0 - 59 -// seconds integer, range 0 - 59 -// frame integer, range 0 - 29 -// -// Flags: -// -// drop frame flag boolean -// color frame flag boolean -// field/phase flag boolean -// bgf0 boolean -// bgf1 boolean -// bgf2 boolean -// -// Binary groups for user-defined data and control codes: -// -// binary group 1 integer, range 0 - 15 -// binary group 2 integer, range 0 - 15 -// ... -// binary group 8 integer, range 0 - 15 -// -// Class TimeCode contains methods to convert between the fields -// listed above and a more compact representation where the fields -// are packed into two unsigned 32-bit integers. In the packed -// integer representations, bit 0 is the least significant bit, -// and bit 31 is the most significant bit of the integer value. -// -// The time address and flags fields can be packed in three -// different ways: -// -// bits packing for packing for packing for -// 24-frame 60-field 50-field -// film television television -// -// 0 - 3 frame units frame units frame units -// 4 - 5 frame tens frame tens frame tens -// 6 unused, set to 0 drop frame flag unused, set to 0 -// 7 unused, set to 0 color frame flag color frame flag -// 8 - 11 seconds units seconds units seconds units -// 12 - 14 seconds tens seconds tens seconds tens -// 15 phase flag field/phase flag bgf0 -// 16 - 19 minutes units minutes units minutes units -// 20 - 22 minutes tens minutes tens minutes tens -// 23 bgf0 bgf0 bgf2 -// 24 - 27 hours units hours units hours units -// 28 - 29 hours tens hours tens hours tens -// 30 bgf1 bgf1 bgf1 -// 31 bgf2 bgf2 field/phase flag -// -// User-defined data and control codes are packed as follows: -// -// bits field -// -// 0 - 3 binary group 1 -// 4 - 7 binary group 2 -// 8 - 11 binary group 3 -// 12 - 15 binary group 4 -// 16 - 19 binary group 5 -// 20 - 23 binary group 6 -// 24 - 27 binary group 7 -// 28 - 31 binary group 8 -// -//----------------------------------------------------------------------------- - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class IMF_EXPORT TimeCode -{ - public: - - //--------------------- - // Bit packing variants - //--------------------- - - enum Packing - { - TV60_PACKING, // packing for 60-field television - TV50_PACKING, // packing for 50-field television - FILM24_PACKING // packing for 24-frame film - }; - - - //------------------------------------- - // Constructors and assignment operator - //------------------------------------- - - TimeCode (); // all fields set to 0 or false - - TimeCode (int hours, - int minutes, - int seconds, - int frame, - bool dropFrame = false, - bool colorFrame = false, - bool fieldPhase = false, - bool bgf0 = false, - bool bgf1 = false, - bool bgf2 = false, - int binaryGroup1 = 0, - int binaryGroup2 = 0, - int binaryGroup3 = 0, - int binaryGroup4 = 0, - int binaryGroup5 = 0, - int binaryGroup6 = 0, - int binaryGroup7 = 0, - int binaryGroup8 = 0); - - TimeCode (unsigned int timeAndFlags, - unsigned int userData = 0, - Packing packing = TV60_PACKING); - - TimeCode (const TimeCode &other); - - TimeCode & operator = (const TimeCode &other); - - - //---------------------------- - // Access to individual fields - //---------------------------- - - int hours () const; - void setHours (int value); - - int minutes () const; - void setMinutes (int value); - - int seconds () const; - void setSeconds (int value); - - int frame () const; - void setFrame (int value); - - bool dropFrame () const; - void setDropFrame (bool value); - - bool colorFrame () const; - void setColorFrame (bool value); - - bool fieldPhase () const; - void setFieldPhase (bool value); - - bool bgf0 () const; - void setBgf0 (bool value); - - bool bgf1 () const; - void setBgf1 (bool value); - - bool bgf2 () const; - void setBgf2 (bool value); - - int binaryGroup (int group) const; // group must be between 1 and 8 - void setBinaryGroup (int group, int value); - - - //--------------------------------- - // Access to packed representations - //--------------------------------- - - unsigned int timeAndFlags (Packing packing = TV60_PACKING) const; - - void setTimeAndFlags (unsigned int value, - Packing packing = TV60_PACKING); - - unsigned int userData () const; - - void setUserData (unsigned int value); - - - //--------- - // Equality - //--------- - - bool operator == (const TimeCode &v) const; - bool operator != (const TimeCode &v) const; - - private: - - unsigned int _time; - unsigned int _user; -}; - - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp deleted file mode 100644 index 5e7ea59..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// class TimeCodeAttribute -// -//----------------------------------------------------------------------------- - -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -TimeCodeAttribute::staticTypeName () -{ - return "timecode"; -} - - -template <> -void -TimeCodeAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.timeAndFlags()); - Xdr::write (os, _value.userData()); -} - - -template <> -void -TimeCodeAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - unsigned int tmp; - - Xdr::read (is, tmp); - _value.setTimeAndFlags (tmp); - - Xdr::read (is, tmp); - _value.setUserData (tmp); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.h deleted file mode 100644 index ccd893a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.h +++ /dev/null @@ -1,74 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_TIME_CODE_ATTRIBUTE_H -#define INCLUDED_IMF_TIME_CODE_ATTRIBUTE_H - - -//----------------------------------------------------------------------------- -// -// class TimeCodeAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImfTimeCode.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -typedef TypedAttribute TimeCodeAttribute; - -template <> -IMF_EXPORT -const char *TimeCodeAttribute::staticTypeName (); - -template <> -IMF_EXPORT -void TimeCodeAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, - int) const; - -template <> -IMF_EXPORT -void TimeCodeAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, - int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVecAttribute.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVecAttribute.cpp deleted file mode 100644 index 7d51904..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVecAttribute.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class V2iAttribute -// class V2fAttribute -// class V2dAttribute -// class V3iAttribute -// class V3fAttribute -// class V3dAttribute -// -//----------------------------------------------------------------------------- - -#include - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; - -template <> -const char * -V2iAttribute::staticTypeName () -{ - return "v2i"; -} - - -template <> -void -V2iAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); -} - - -template <> -void -V2iAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value.x); - Xdr::read (is, _value.y); -} - - -template <> -const char * -V2fAttribute::staticTypeName () -{ - return "v2f"; -} - - -template <> -void -V2fAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); -} - - -template <> -void -V2fAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value.x); - Xdr::read (is, _value.y); -} - - -template <> -const char * -V2dAttribute::staticTypeName () -{ - return "v2d"; -} - - -template <> -void -V2dAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); -} - - -template <> -void -V2dAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value.x); - Xdr::read (is, _value.y); -} - - -template <> -const char * -V3iAttribute::staticTypeName () -{ - return "v3i"; -} - - -template <> -void -V3iAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); - Xdr::write (os, _value.z); -} - - -template <> -void -V3iAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value.x); - Xdr::read (is, _value.y); - Xdr::read (is, _value.z); -} - - -template <> -const char * -V3fAttribute::staticTypeName () -{ - return "v3f"; -} - - -template <> -void -V3fAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); - Xdr::write (os, _value.z); -} - - -template <> -void -V3fAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value.x); - Xdr::read (is, _value.y); - Xdr::read (is, _value.z); -} - - -template <> -const char * -V3dAttribute::staticTypeName () -{ - return "v3d"; -} - - -template <> -void -V3dAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const -{ - Xdr::write (os, _value.x); - Xdr::write (os, _value.y); - Xdr::write (os, _value.z); -} - - -template <> -void -V3dAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version) -{ - Xdr::read (is, _value.x); - Xdr::read (is, _value.y); - Xdr::read (is, _value.z); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVecAttribute.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVecAttribute.h deleted file mode 100644 index 8480fe6..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVecAttribute.h +++ /dev/null @@ -1,100 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_VEC_ATTRIBUTE_H -#define INCLUDED_IMF_VEC_ATTRIBUTE_H - -//----------------------------------------------------------------------------- -// -// class V2iAttribute -// class V2fAttribute -// class V2dAttribute -// class V3iAttribute -// class V3fAttribute -// class V3dAttribute -// -//----------------------------------------------------------------------------- - -#include "ImfAttribute.h" -#include "ImathVec.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -typedef TypedAttribute V2iAttribute; -template <> IMF_EXPORT const char *V2iAttribute::staticTypeName (); -template <> IMF_EXPORT void V2iAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; -template <> IMF_EXPORT void V2iAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -typedef TypedAttribute V2fAttribute; -template <> IMF_EXPORT const char *V2fAttribute::staticTypeName (); -template <> IMF_EXPORT void V2fAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; -template <> IMF_EXPORT void V2fAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -typedef TypedAttribute V2dAttribute; -template <> IMF_EXPORT const char *V2dAttribute::staticTypeName (); -template <> IMF_EXPORT void V2dAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; -template <> IMF_EXPORT void V2dAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -typedef TypedAttribute V3iAttribute; -template <> IMF_EXPORT const char *V3iAttribute::staticTypeName (); -template <> IMF_EXPORT void V3iAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; -template <> IMF_EXPORT void V3iAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -typedef TypedAttribute V3fAttribute; -template <> IMF_EXPORT const char *V3fAttribute::staticTypeName (); -template <> IMF_EXPORT void V3fAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; -template <> IMF_EXPORT void V3fAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -typedef TypedAttribute V3dAttribute; -template <> IMF_EXPORT const char *V3dAttribute::staticTypeName (); -template <> IMF_EXPORT void V3dAttribute::writeValueTo (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &, int) const; -template <> IMF_EXPORT void V3dAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &, int, int); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#if defined (OPENEXR_IMF_INTERNAL_NAMESPACE_AUTO_EXPOSE) -namespace Imf { using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; } - -#endif - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVersion.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVersion.cpp deleted file mode 100644 index 4f49aa0..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVersion.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//----------------------------------------------------------------------------- -// -// Magic and version number. -// -//----------------------------------------------------------------------------- - - -#include -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -bool -isImfMagic (const char bytes[4]) -{ - return bytes[0] == ((MAGIC >> 0) & 0x00ff) && - bytes[1] == ((MAGIC >> 8) & 0x00ff) && - bytes[2] == ((MAGIC >> 16) & 0x00ff) && - bytes[3] == ((MAGIC >> 24) & 0x00ff); -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT - diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVersion.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVersion.h deleted file mode 100644 index de2577f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfVersion.h +++ /dev/null @@ -1,136 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_VERSION_H -#define INCLUDED_IMF_VERSION_H - -//----------------------------------------------------------------------------- -// -// Magic and version number. -// -//----------------------------------------------------------------------------- - -#include "ImfExport.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -// -// The MAGIC number is stored in the first four bytes of every -// OpenEXR image file. This can be used to quickly test whether -// a given file is an OpenEXR image file (see isImfMagic(), below). -// - -const int MAGIC = 20000630; - - -// -// The second item in each OpenEXR image file, right after the -// magic number, is a four-byte file version identifier. Depending -// on a file's version identifier, a file reader can enable various -// backwards-compatibility switches, or it can quickly reject files -// that it cannot read. -// -// The version identifier is split into an 8-bit version number, -// and a 24-bit flags field. -// - -const int VERSION_NUMBER_FIELD = 0x000000ff; -const int VERSION_FLAGS_FIELD = 0xffffff00; - - -// -// Value that goes into VERSION_NUMBER_FIELD. -// - -const int EXR_VERSION = 2; - - -// -// Flags that can go into VERSION_FLAGS_FIELD. -// Flags can only occupy the 1 bits in VERSION_FLAGS_FIELD. -// - -const int TILED_FLAG = 0x00000200; // File is tiled - -const int LONG_NAMES_FLAG = 0x00000400; // File contains long - // attribute or channel - // names - -const int NON_IMAGE_FLAG = 0x00000800; // File has at least one part - // which is not a regular - // scanline image or regular tiled image - // (that is, it is a deep format) - -const int MULTI_PART_FILE_FLAG = 0x00001000; // File has multiple parts - -// -// Bitwise OR of all known flags. -// - -const int ALL_FLAGS = TILED_FLAG | LONG_NAMES_FLAG | - NON_IMAGE_FLAG | MULTI_PART_FILE_FLAG; - - -// -// Utility functions -// - -inline bool isTiled (int version) {return !!(version & TILED_FLAG);} -inline bool isMultiPart (int version) {return version & MULTI_PART_FILE_FLAG; } -inline bool isNonImage(int version) {return version & NON_IMAGE_FLAG; } -inline int makeTiled (int version) {return version | TILED_FLAG;} -inline int makeNotTiled (int version) {return version & ~TILED_FLAG;} -inline int getVersion (int version) {return version & VERSION_NUMBER_FIELD;} -inline int getFlags (int version) {return version & VERSION_FLAGS_FIELD;} -inline bool supportsFlags (int flags) {return !(flags & ~ALL_FLAGS);} - - -// -// Given the first four bytes of a file, returns true if the -// file is probably an OpenEXR image file, false if not. -// - -IMF_EXPORT -bool isImfMagic (const char bytes[4]); - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfWav.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfWav.cpp deleted file mode 100644 index 5d71d56..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfWav.cpp +++ /dev/null @@ -1,391 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// 16-bit Haar Wavelet encoding and decoding -// -// The source code in this file is derived from the encoding -// and decoding routines written by Christian Rouet for his -// PIZ image file format. -// -//----------------------------------------------------------------------------- - - -#include -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER -namespace { - - -// -// Wavelet basis functions without modulo arithmetic; they produce -// the best compression ratios when the wavelet-transformed data are -// Huffman-encoded, but the wavelet transform works only for 14-bit -// data (untransformed data values must be less than (1 << 14)). -// - -inline void -wenc14 (unsigned short a, unsigned short b, - unsigned short &l, unsigned short &h) -{ - short as = a; - short bs = b; - - short ms = (as + bs) >> 1; - short ds = as - bs; - - l = ms; - h = ds; -} - - -inline void -wdec14 (unsigned short l, unsigned short h, - unsigned short &a, unsigned short &b) -{ - short ls = l; - short hs = h; - - int hi = hs; - int ai = ls + (hi & 1) + (hi >> 1); - - short as = ai; - short bs = ai - hi; - - a = as; - b = bs; -} - - -// -// Wavelet basis functions with modulo arithmetic; they work with full -// 16-bit data, but Huffman-encoding the wavelet-transformed data doesn't -// compress the data quite as well. -// - -const int NBITS = 16; -const int A_OFFSET = 1 << (NBITS - 1); -const int M_OFFSET = 1 << (NBITS - 1); -const int MOD_MASK = (1 << NBITS) - 1; - - -inline void -wenc16 (unsigned short a, unsigned short b, - unsigned short &l, unsigned short &h) -{ - int ao = (a + A_OFFSET) & MOD_MASK; - int m = ((ao + b) >> 1); - int d = ao - b; - - if (d < 0) - m = (m + M_OFFSET) & MOD_MASK; - - d &= MOD_MASK; - - l = m; - h = d; -} - - -inline void -wdec16 (unsigned short l, unsigned short h, - unsigned short &a, unsigned short &b) -{ - int m = l; - int d = h; - int bb = (m - (d >> 1)) & MOD_MASK; - int aa = (d + bb - A_OFFSET) & MOD_MASK; - b = bb; - a = aa; -} - -} // namespace - - -// -// 2D Wavelet encoding: -// - -void -wav2Encode - (unsigned short* in, // io: values are transformed in place - int nx, // i : x size - int ox, // i : x offset - int ny, // i : y size - int oy, // i : y offset - unsigned short mx) // i : maximum in[x][y] value -{ - bool w14 = (mx < (1 << 14)); - int n = (nx > ny)? ny: nx; - int p = 1; // == 1 << level - int p2 = 2; // == 1 << (level+1) - - // - // Hierachical loop on smaller dimension n - // - - while (p2 <= n) - { - unsigned short *py = in; - unsigned short *ey = in + oy * (ny - p2); - int oy1 = oy * p; - int oy2 = oy * p2; - int ox1 = ox * p; - int ox2 = ox * p2; - unsigned short i00,i01,i10,i11; - - // - // Y loop - // - - for (; py <= ey; py += oy2) - { - unsigned short *px = py; - unsigned short *ex = py + ox * (nx - p2); - - // - // X loop - // - - for (; px <= ex; px += ox2) - { - unsigned short *p01 = px + ox1; - unsigned short *p10 = px + oy1; - unsigned short *p11 = p10 + ox1; - - // - // 2D wavelet encoding - // - - if (w14) - { - wenc14 (*px, *p01, i00, i01); - wenc14 (*p10, *p11, i10, i11); - wenc14 (i00, i10, *px, *p10); - wenc14 (i01, i11, *p01, *p11); - } - else - { - wenc16 (*px, *p01, i00, i01); - wenc16 (*p10, *p11, i10, i11); - wenc16 (i00, i10, *px, *p10); - wenc16 (i01, i11, *p01, *p11); - } - } - - // - // Encode (1D) odd column (still in Y loop) - // - - if (nx & p) - { - unsigned short *p10 = px + oy1; - - if (w14) - wenc14 (*px, *p10, i00, *p10); - else - wenc16 (*px, *p10, i00, *p10); - - *px= i00; - } - } - - // - // Encode (1D) odd line (must loop in X) - // - - if (ny & p) - { - unsigned short *px = py; - unsigned short *ex = py + ox * (nx - p2); - - for (; px <= ex; px += ox2) - { - unsigned short *p01 = px + ox1; - - if (w14) - wenc14 (*px, *p01, i00, *p01); - else - wenc16 (*px, *p01, i00, *p01); - - *px= i00; - } - } - - // - // Next level - // - - p = p2; - p2 <<= 1; - } -} - - -// -// 2D Wavelet decoding: -// - -void -wav2Decode - (unsigned short* in, // io: values are transformed in place - int nx, // i : x size - int ox, // i : x offset - int ny, // i : y size - int oy, // i : y offset - unsigned short mx) // i : maximum in[x][y] value -{ - bool w14 = (mx < (1 << 14)); - int n = (nx > ny)? ny: nx; - int p = 1; - int p2; - - // - // Search max level - // - - while (p <= n) - p <<= 1; - - p >>= 1; - p2 = p; - p >>= 1; - - // - // Hierarchical loop on smaller dimension n - // - - while (p >= 1) - { - unsigned short *py = in; - unsigned short *ey = in + oy * (ny - p2); - int oy1 = oy * p; - int oy2 = oy * p2; - int ox1 = ox * p; - int ox2 = ox * p2; - unsigned short i00,i01,i10,i11; - - // - // Y loop - // - - for (; py <= ey; py += oy2) - { - unsigned short *px = py; - unsigned short *ex = py + ox * (nx - p2); - - // - // X loop - // - - for (; px <= ex; px += ox2) - { - unsigned short *p01 = px + ox1; - unsigned short *p10 = px + oy1; - unsigned short *p11 = p10 + ox1; - - // - // 2D wavelet decoding - // - - if (w14) - { - wdec14 (*px, *p10, i00, i10); - wdec14 (*p01, *p11, i01, i11); - wdec14 (i00, i01, *px, *p01); - wdec14 (i10, i11, *p10, *p11); - } - else - { - wdec16 (*px, *p10, i00, i10); - wdec16 (*p01, *p11, i01, i11); - wdec16 (i00, i01, *px, *p01); - wdec16 (i10, i11, *p10, *p11); - } - } - - // - // Decode (1D) odd column (still in Y loop) - // - - if (nx & p) - { - unsigned short *p10 = px + oy1; - - if (w14) - wdec14 (*px, *p10, i00, *p10); - else - wdec16 (*px, *p10, i00, *p10); - - *px= i00; - } - } - - // - // Decode (1D) odd line (must loop in X) - // - - if (ny & p) - { - unsigned short *px = py; - unsigned short *ex = py + ox * (nx - p2); - - for (; px <= ex; px += ox2) - { - unsigned short *p01 = px + ox1; - - if (w14) - wdec14 (*px, *p01, i00, *p01); - else - wdec16 (*px, *p01, i00, *p01); - - *px= i00; - } - } - - // - // Next level - // - - p2 = p; - p >>= 1; - } -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfWav.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfWav.h deleted file mode 100644 index 9751433..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfWav.h +++ /dev/null @@ -1,78 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_WAV_H -#define INCLUDED_IMF_WAV_H - -//----------------------------------------------------------------------------- -// -// 16-bit Haar Wavelet encoding and decoding -// -//----------------------------------------------------------------------------- -#include "ImfNamespace.h" -#include "ImfExport.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -IMF_EXPORT -void -wav2Encode - (unsigned short *in, // io: values in[y][x] are transformed in place - int nx, // i : x size - int ox, // i : x offset - int ny, // i : y size - int oy, // i : y offset - unsigned short mx); // i : maximum in[x][y] value - -IMF_EXPORT -void -wav2Decode - (unsigned short *in, // io: values in[y][x] are transformed in place - int nx, // i : x size - int ox, // i : x offset - int ny, // i : y size - int oy, // i : y offset - unsigned short mx); // i : maximum in[x][y] value - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfXdr.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfXdr.h deleted file mode 100644 index 0af6f67..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfXdr.h +++ /dev/null @@ -1,927 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_XDR_H -#define INCLUDED_IMF_XDR_H - - -//---------------------------------------------------------------------------- -// -// Xdr -- routines to convert data between the machine's native -// format and a machine-independent external data representation: -// -// write (T &o, S v); converts a value, v, of type S -// into a machine-independent -// representation and stores the -// result in an output buffer, o. -// -// read (T &i, S &v); reads the machine-independent -// representation of a value of type -// S from input buffer i, converts -// the value into the machine's native -// representation, and stores the result -// in v. -// -// size(); returns the size, in bytes, of the -// machine-independent representation -// of an object of type S. -// -// The write() and read() routines are templates; data can be written -// to and read from any output or input buffer type T for which a helper -// class, R, exits. Class R must define a method to store a char array -// in a T, and a method to read a char array from a T: -// -// struct R -// { -// static void -// writeChars (T &o, const char c[/*n*/], int n) -// { -// ... // Write c[0], c[1] ... c[n-1] to output buffer o. -// } -// -// static void -// readChars (T &i, char c[/*n*/], int n) -// { -// ... // Read n characters from input buffer i -// // and copy them to c[0], c[1] ... c[n-1]. -// } -// }; -// -// Example - writing to and reading from iostreams: -// -// struct CharStreamIO -// { -// static void -// writeChars (ostream &os, const char c[], int n) -// { -// os.write (c, n); -// } -// -// static void -// readChars (istream &is, char c[], int n) -// { -// is.read (c, n); -// } -// }; -// -// ... -// -// Xdr::write (os, 3); -// Xdr::write (os, 5.0); -// -//---------------------------------------------------------------------------- - -#include "ImfInt64.h" -#include "IexMathExc.h" -#include "half.h" -#include - -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -namespace Xdr { - - -//------------------------------- -// Write data to an output stream -//------------------------------- - -template -void -write (T &out, bool v); - -template -void -write (T &out, char v); - -template -void -write (T &out, signed char v); - -template -void -write (T &out, unsigned char v); - -template -void -write (T &out, signed short v); - -template -void -write (T &out, unsigned short v); - -template -void -write (T &out, signed int v); - -template -void -write (T &out, unsigned int v); - -template -void -write (T &out, signed long v); - -template -void -write (T &out, unsigned long v); - -#if ULONG_MAX != 18446744073709551615LU - - template - void - write (T &out, Int64 v); - -#endif - -template -void -write (T &out, float v); - -template -void -write (T &out, double v); - -template -void -write (T &out, half v); - -template -void -write (T &out, const char v[/*n*/], int n); // fixed-size char array - -template -void -write (T &out, const char v[]); // zero-terminated string - - -//----------------------------------------- -// Append padding bytes to an output stream -//----------------------------------------- - -template -void -pad (T &out, int n); // write n padding bytes - - - -//------------------------------- -// Read data from an input stream -//------------------------------- - -template -void -read (T &in, bool &v); - -template -void -read (T &in, char &v); - -template -void -read (T &in, signed char &v); - -template -void -read (T &in, unsigned char &v); - -template -void -read (T &in, signed short &v); - -template -void -read (T &in, unsigned short &v); - -template -void -read (T &in, signed int &v); - -template -void -read (T &in, unsigned int &v); - -template -void -read (T &in, signed long &v); - -template -void -read (T &in, unsigned long &v); - -#if ULONG_MAX != 18446744073709551615LU - - template - void - read (T &in, Int64 &v); - -#endif - -template -void -read (T &in, float &v); - -template -void -read (T &in, double &v); - -template -void -read (T &in, half &v); - -template -void -read (T &in, char v[/*n*/], int n); // fixed-size char array - -template -void -read (T &in, int n, char v[/*n*/]); // zero-terminated string - - -//------------------------------------------- -// Skip over padding bytes in an input stream -//------------------------------------------- - -template -void -skip (T &in, int n); // skip n padding bytes - - - -//-------------------------------------- -// Size of the machine-independent -// representation of an object of type S -//-------------------------------------- - -template -int -size (); - - -//--------------- -// Implementation -//--------------- - -template -inline void -writeSignedChars (T &out, const signed char c[], int n) -{ - S::writeChars (out, (const char *) c, n); -} - - -template -inline void -writeUnsignedChars (T &out, const unsigned char c[], int n) -{ - S::writeChars (out, (const char *) c, n); -} - - -template -inline void -readSignedChars (T &in, signed char c[], int n) -{ - S::readChars (in, (char *) c, n); -} - - -template -inline void -readUnsignedChars (T &in, unsigned char c[], int n) -{ - S::readChars (in, (char *) c, n); -} - - -template -inline void -write (T &out, bool v) -{ - char c = !!v; - S::writeChars (out, &c, 1); -} - - -template -inline void -write (T &out, char v) -{ - S::writeChars (out, &v, 1); -} - - -template -inline void -write (T &out, signed char v) -{ - writeSignedChars (out, &v, 1); -} - - -template -inline void -write (T &out, unsigned char v) -{ - writeUnsignedChars (out, &v, 1); -} - - -template -void -write (T &out, signed short v) -{ - signed char b[2]; - - b[0] = (signed char) (v); - b[1] = (signed char) (v >> 8); - - writeSignedChars (out, b, 2); -} - - -template -void -write (T &out, unsigned short v) -{ - unsigned char b[2]; - - b[0] = (unsigned char) (v); - b[1] = (unsigned char) (v >> 8); - - writeUnsignedChars (out, b, 2); -} - - -template -void -write (T &out, signed int v) -{ - signed char b[4]; - - b[0] = (signed char) (v); - b[1] = (signed char) (v >> 8); - b[2] = (signed char) (v >> 16); - b[3] = (signed char) (v >> 24); - - writeSignedChars (out, b, 4); -} - - -template -void -write (T &out, unsigned int v) -{ - unsigned char b[4]; - - b[0] = (unsigned char) (v); - b[1] = (unsigned char) (v >> 8); - b[2] = (unsigned char) (v >> 16); - b[3] = (unsigned char) (v >> 24); - - writeUnsignedChars (out, b, 4); -} - - -template -void -write (T &out, signed long v) -{ - signed char b[8]; - - b[0] = (signed char) (v); - b[1] = (signed char) (v >> 8); - b[2] = (signed char) (v >> 16); - b[3] = (signed char) (v >> 24); - - #if LONG_MAX == 2147483647 - - if (v >= 0) - { - b[4] = 0; - b[5] = 0; - b[6] = 0; - b[7] = 0; - } - else - { - b[4] = ~0; - b[5] = ~0; - b[6] = ~0; - b[7] = ~0; - } - - #elif LONG_MAX == 9223372036854775807L - - b[4] = (signed char) (v >> 32); - b[5] = (signed char) (v >> 40); - b[6] = (signed char) (v >> 48); - b[7] = (signed char) (v >> 56); - - #else - - #error write (T &out, signed long v) not implemented - - #endif - - writeSignedChars (out, b, 8); -} - - -template -void -write (T &out, unsigned long v) -{ - unsigned char b[8]; - - b[0] = (unsigned char) (v); - b[1] = (unsigned char) (v >> 8); - b[2] = (unsigned char) (v >> 16); - b[3] = (unsigned char) (v >> 24); - - #if ULONG_MAX == 4294967295U - - b[4] = 0; - b[5] = 0; - b[6] = 0; - b[7] = 0; - - #elif ULONG_MAX == 18446744073709551615LU - - b[4] = (unsigned char) (v >> 32); - b[5] = (unsigned char) (v >> 40); - b[6] = (unsigned char) (v >> 48); - b[7] = (unsigned char) (v >> 56); - - #else - - #error write (T &out, unsigned long v) not implemented - - #endif - - writeUnsignedChars (out, b, 8); -} - - -#if ULONG_MAX != 18446744073709551615LU - - template - void - write (T &out, Int64 v) - { - unsigned char b[8]; - - b[0] = (unsigned char) (v); - b[1] = (unsigned char) (v >> 8); - b[2] = (unsigned char) (v >> 16); - b[3] = (unsigned char) (v >> 24); - b[4] = (unsigned char) (v >> 32); - b[5] = (unsigned char) (v >> 40); - b[6] = (unsigned char) (v >> 48); - b[7] = (unsigned char) (v >> 56); - - writeUnsignedChars (out, b, 8); - } - -#endif - - -template -void -write (T &out, float v) -{ - union {unsigned int i; float f;} u; - u.f = v; - - unsigned char b[4]; - - b[0] = (unsigned char) (u.i); - b[1] = (unsigned char) (u.i >> 8); - b[2] = (unsigned char) (u.i >> 16); - b[3] = (unsigned char) (u.i >> 24); - - writeUnsignedChars (out, b, 4); -} - - -template -void -write (T &out, double v) -{ - union {Int64 i; double d;} u; - u.d = v; - - unsigned char b[8]; - - b[0] = (unsigned char) (u.i); - b[1] = (unsigned char) (u.i >> 8); - b[2] = (unsigned char) (u.i >> 16); - b[3] = (unsigned char) (u.i >> 24); - b[4] = (unsigned char) (u.i >> 32); - b[5] = (unsigned char) (u.i >> 40); - b[6] = (unsigned char) (u.i >> 48); - b[7] = (unsigned char) (u.i >> 56); - - writeUnsignedChars (out, b, 8); -} - - -template -inline void -write (T &out, half v) -{ - unsigned char b[2]; - - b[0] = (unsigned char) (v.bits()); - b[1] = (unsigned char) (v.bits() >> 8); - - writeUnsignedChars (out, b, 2); -} - - -template -inline void -write (T &out, const char v[], int n) // fixed-size char array -{ - S::writeChars (out, v, n); -} - - -template -void -write (T &out, const char v[]) // zero-terminated string -{ - while (*v) - { - S::writeChars (out, v, 1); - ++v; - } - - S::writeChars (out, v, 1); -} - - -template -void -pad (T &out, int n) // add n padding bytes -{ - for (int i = 0; i < n; i++) - { - const char c = 0; - S::writeChars (out, &c, 1); - } -} - - -template -inline void -read (T &in, bool &v) -{ - char c; - - S::readChars (in, &c, 1); - v = !!c; -} - - -template -inline void -read (T &in, char &v) -{ - S::readChars (in, &v, 1); -} - - -template -inline void -read (T &in, signed char &v) -{ - readSignedChars (in, &v, 1); -} - - -template -inline void -read (T &in, unsigned char &v) -{ - readUnsignedChars (in, &v, 1); -} - - -template -void -read (T &in, signed short &v) -{ - signed char b[2]; - - readSignedChars (in, b, 2); - - v = (b[0] & 0x00ff) | - (b[1] << 8); -} - - -template -void -read (T &in, unsigned short &v) -{ - unsigned char b[2]; - - readUnsignedChars (in, b, 2); - - v = (b[0] & 0x00ff) | - (b[1] << 8); -} - - -template -void -read (T &in, signed int &v) -{ - signed char b[4]; - - readSignedChars (in, b, 4); - - v = (b[0] & 0x000000ff) | - ((b[1] << 8) & 0x0000ff00) | - ((b[2] << 16) & 0x00ff0000) | - (b[3] << 24); -} - - -template -void -read (T &in, unsigned int &v) -{ - unsigned char b[4]; - - readUnsignedChars (in, b, 4); - - v = (b[0] & 0x000000ff) | - ((b[1] << 8) & 0x0000ff00) | - ((b[2] << 16) & 0x00ff0000) | - (b[3] << 24); -} - - -template -void -read (T &in, signed long &v) -{ - signed char b[8]; - - readSignedChars (in, b, 8); - - #if LONG_MAX == 2147483647 - - v = (b[0] & 0x000000ff) | - ((b[1] << 8) & 0x0000ff00) | - ((b[2] << 16) & 0x00ff0000) | - (b[3] << 24); - - if (( b[4] || b[5] || b[6] || b[7]) && - (~b[4] || ~b[5] || ~b[6] || ~b[7])) - { - throw IEX_NAMESPACE::OverflowExc ("Long int overflow - read a large " - "64-bit integer in a 32-bit process."); - } - - #elif LONG_MAX == 9223372036854775807L - - v = ((long) b[0] & 0x00000000000000ff) | - (((long) b[1] << 8) & 0x000000000000ff00) | - (((long) b[2] << 16) & 0x0000000000ff0000) | - (((long) b[3] << 24) & 0x00000000ff000000) | - (((long) b[4] << 32) & 0x000000ff00000000) | - (((long) b[5] << 40) & 0x0000ff0000000000) | - (((long) b[6] << 48) & 0x00ff000000000000) | - ((long) b[7] << 56); - - #else - - #error read (T &in, signed long &v) not implemented - - #endif -} - - -template -void -read (T &in, unsigned long &v) -{ - unsigned char b[8]; - - readUnsignedChars (in, b, 8); - - #if ULONG_MAX == 4294967295U - - v = (b[0] & 0x000000ff) | - ((b[1] << 8) & 0x0000ff00) | - ((b[2] << 16) & 0x00ff0000) | - (b[3] << 24); - - if (b[4] || b[5] || b[6] || b[7]) - { - throw IEX_NAMESPACE::OverflowExc ("Long int overflow - read a large " - "64-bit integer in a 32-bit process."); - } - - #elif ULONG_MAX == 18446744073709551615LU - - v = ((unsigned long) b[0] & 0x00000000000000ff) | - (((unsigned long) b[1] << 8) & 0x000000000000ff00) | - (((unsigned long) b[2] << 16) & 0x0000000000ff0000) | - (((unsigned long) b[3] << 24) & 0x00000000ff000000) | - (((unsigned long) b[4] << 32) & 0x000000ff00000000) | - (((unsigned long) b[5] << 40) & 0x0000ff0000000000) | - (((unsigned long) b[6] << 48) & 0x00ff000000000000) | - ((unsigned long) b[7] << 56); - - #else - - #error read (T &in, unsigned long &v) not implemented - - #endif -} - - -#if ULONG_MAX != 18446744073709551615LU - - template - void - read (T &in, Int64 &v) - { - unsigned char b[8]; - - readUnsignedChars (in, b, 8); - - v = ((Int64) b[0] & 0x00000000000000ffLL) | - (((Int64) b[1] << 8) & 0x000000000000ff00LL) | - (((Int64) b[2] << 16) & 0x0000000000ff0000LL) | - (((Int64) b[3] << 24) & 0x00000000ff000000LL) | - (((Int64) b[4] << 32) & 0x000000ff00000000LL) | - (((Int64) b[5] << 40) & 0x0000ff0000000000LL) | - (((Int64) b[6] << 48) & 0x00ff000000000000LL) | - ((Int64) b[7] << 56); - } - -#endif - - -template -void -read (T &in, float &v) -{ - unsigned char b[4]; - - readUnsignedChars (in, b, 4); - - union {unsigned int i; float f;} u; - - u.i = (b[0] & 0x000000ff) | - ((b[1] << 8) & 0x0000ff00) | - ((b[2] << 16) & 0x00ff0000) | - (b[3] << 24); - - v = u.f; -} - - -template -void -read (T &in, double &v) -{ - unsigned char b[8]; - - readUnsignedChars (in, b, 8); - - union {Int64 i; double d;} u; - - u.i = ((Int64) b[0] & 0x00000000000000ffULL) | - (((Int64) b[1] << 8) & 0x000000000000ff00ULL) | - (((Int64) b[2] << 16) & 0x0000000000ff0000ULL) | - (((Int64) b[3] << 24) & 0x00000000ff000000ULL) | - (((Int64) b[4] << 32) & 0x000000ff00000000ULL) | - (((Int64) b[5] << 40) & 0x0000ff0000000000ULL) | - (((Int64) b[6] << 48) & 0x00ff000000000000ULL) | - ((Int64) b[7] << 56); - - v = u.d; -} - - -template -inline void -read (T &in, half &v) -{ - unsigned char b[2]; - - readUnsignedChars (in, b, 2); - - v.setBits ((b[0] & 0x00ff) | (b[1] << 8)); -} - - -template -inline void -read (T &in, char v[], int n) // fixed-size char array -{ - S::readChars (in, v, n); -} - - -template -void -read (T &in, int n, char v[]) // zero-terminated string -{ - while (n >= 0) - { - S::readChars (in, v, 1); - - if (*v == 0) - break; - - --n; - ++v; - } -} - - -template -void -skip (T &in, int n) // skip n padding bytes -{ - char c[1024]; - - while (n >= (int) sizeof (c)) - { - if (!S::readChars (in, c, sizeof (c))) - return; - - n -= sizeof (c); - } - - if (n >= 1) - S::readChars (in, c, n); -} - - -template <> inline int size () {return 1;} -template <> inline int size () {return 1;} -template <> inline int size () {return 1;} -template <> inline int size () {return 1;} -template <> inline int size () {return 2;} -template <> inline int size () {return 2;} -template <> inline int size () {return 4;} -template <> inline int size () {return 4;} -template <> inline int size () {return 8;} -template <> inline int size () {return 8;} -template <> inline int size () {return 8;} -template <> inline int size () {return 4;} -template <> inline int size () {return 8;} -template <> inline int size () {return 2;} - - -} // namespace Xdr -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - -#if defined (OPENEXR_IMF_INTERNAL_NAMESPACE_AUTO_EXPOSE) -namespace Imf{using namespace OPENEXR_IMF_INTERNAL_NAMESPACE;} -#endif - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZip.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZip.cpp deleted file mode 100644 index 93d625e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZip.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImfZip.h" -#include "ImfCheckedArithmetic.h" -#include "ImfNamespace.h" -#include "Iex.h" - -#include -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - -Imf::Zip::Zip(size_t maxRawSize): - _maxRawSize(maxRawSize), - _tmpBuffer(0) -{ - _tmpBuffer = new char[_maxRawSize]; -} - -Imf::Zip::Zip(size_t maxScanLineSize, size_t numScanLines): - _maxRawSize(0), - _tmpBuffer(0) -{ - _maxRawSize = uiMult (maxScanLineSize, numScanLines); - _tmpBuffer = new char[_maxRawSize]; -} - -Imf::Zip::~Zip() -{ - if (_tmpBuffer) delete[] _tmpBuffer; -} - -size_t -Imf::Zip::maxRawSize() -{ - return _maxRawSize; -} - -size_t -Imf::Zip::maxCompressedSize() -{ - return uiAdd (uiAdd (_maxRawSize, - size_t (ceil (_maxRawSize * 0.01))), - size_t (100)); -} - -int -Imf::Zip::compress(const char *raw, int rawSize, char *compressed) -{ - // - // Reorder the pixel data. - // - - { - char *t1 = _tmpBuffer; - char *t2 = _tmpBuffer + (rawSize + 1) / 2; - const char *stop = raw + rawSize; - - while (true) - { - if (raw < stop) - *(t1++) = *(raw++); - else - break; - - if (raw < stop) - *(t2++) = *(raw++); - else - break; - } - } - - // - // Predictor. - // - - { - unsigned char *t = (unsigned char *) _tmpBuffer + 1; - unsigned char *stop = (unsigned char *) _tmpBuffer + rawSize; - int p = t[-1]; - - while (t < stop) - { - int d = int (t[0]) - p + (128 + 256); - p = t[0]; - t[0] = d; - ++t; - } - } - - // - // Compress the data using zlib - // - - uLongf outSize = int(ceil(rawSize * 1.01)) + 100; - - if (Z_OK != ::compress ((Bytef *)compressed, &outSize, - (const Bytef *) _tmpBuffer, rawSize)) - { - throw Iex::BaseExc ("Data compression (zlib) failed."); - } - - return outSize; -} - -int -Imf::Zip::uncompress(const char *compressed, int compressedSize, - char *raw) -{ - // - // Decompress the data using zlib - // - - uLongf outSize = _maxRawSize; - - if (Z_OK != ::uncompress ((Bytef *)_tmpBuffer, &outSize, - (const Bytef *) compressed, compressedSize)) - { - throw Iex::InputExc ("Data decompression (zlib) failed."); - } - - // - // Predictor. - // - { - unsigned char *t = (unsigned char *) _tmpBuffer + 1; - unsigned char *stop = (unsigned char *) _tmpBuffer + outSize; - - while (t < stop) - { - int d = int (t[-1]) + int (t[0]) - 128; - t[0] = d; - ++t; - } - } - - // - // Reorder the pixel data. - // - - { - const char *t1 = _tmpBuffer; - const char *t2 = _tmpBuffer + (outSize + 1) / 2; - char *s = raw; - char *stop = s + outSize; - - while (true) - { - if (s < stop) - *(s++) = *(t1++); - else - break; - - if (s < stop) - *(s++) = *(t2++); - else - break; - } - } - - return outSize; -} - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZip.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZip.h deleted file mode 100644 index 03f2c5e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZip.h +++ /dev/null @@ -1,78 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMF_ZIP_H -#define INCLUDED_IMF_ZIP_H - -#include "ImfNamespace.h" - -#include - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - -class Zip -{ - public: - explicit Zip(size_t rawMaxSize); - Zip(size_t maxScanlineSize, size_t numScanLines); - ~Zip(); - - size_t maxRawSize(); - size_t maxCompressedSize(); - - // - // Compress the raw data into the provided buffer. - // Returns the amount of compressed data. - // - int compress(const char *raw, int rawSize, char *compressed); - - // - // Uncompress the compressed data into the provided - // buffer. Returns the amount of raw data actually decoded. - // - int uncompress(const char *compressed, int compressedSize, - char *raw); - - private: - size_t _maxRawSize; - char *_tmpBuffer; - - Zip(); - Zip(const Zip&); -}; - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZipCompressor.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZipCompressor.cpp deleted file mode 100644 index b0d6989..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZipCompressor.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//----------------------------------------------------------------------------- -// -// class ZipCompressor -// -//----------------------------------------------------------------------------- - -#include "ImfZipCompressor.h" -#include "ImfCheckedArithmetic.h" -#include "Iex.h" -#include -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - -ZipCompressor::ZipCompressor - (const Header &hdr, - size_t maxScanLineSize, - size_t numScanLines) -: - Compressor (hdr), - _maxScanLineSize (maxScanLineSize), - _numScanLines (numScanLines), - _outBuffer (0), - _zip(maxScanLineSize, numScanLines) -{ - _outBuffer = new char[_zip.maxCompressedSize()]; -} - - -ZipCompressor::~ZipCompressor () -{ - delete [] _outBuffer; -} - - -int -ZipCompressor::numScanLines () const -{ - return _numScanLines; -} - - -int -ZipCompressor::compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) -{ - // - // Special case �- empty input buffer - // - - if (inSize == 0) - { - outPtr = _outBuffer; - return 0; - } - - int outSize = _zip.compress(inPtr, inSize, _outBuffer); - - outPtr = _outBuffer; - return outSize; -} - - -int -ZipCompressor::uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr) -{ - // - // Special case �- empty input buffer - // - - if (inSize == 0) - { - outPtr = _outBuffer; - return 0; - } - - int outSize = _zip.uncompress(inPtr, inSize, _outBuffer); - - outPtr = _outBuffer; - return outSize; -} - - -OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT - diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZipCompressor.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZipCompressor.h deleted file mode 100644 index 03a88e8..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/ImfZipCompressor.h +++ /dev/null @@ -1,89 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMF_ZIP_COMPRESSOR_H -#define INCLUDED_IMF_ZIP_COMPRESSOR_H - -//----------------------------------------------------------------------------- -// -// class ZipCompressor -- performs zlib-style compression -// -//----------------------------------------------------------------------------- - -#include "ImfCompressor.h" -#include "ImfZip.h" -#include "ImfNamespace.h" - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - -class ZipCompressor: public Compressor -{ - public: - - ZipCompressor (const Header &hdr, - size_t maxScanLineSize, - size_t numScanLines); - - virtual ~ZipCompressor (); - - virtual int numScanLines () const; - - virtual int compress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - - virtual int uncompress (const char *inPtr, - int inSize, - int minY, - const char *&outPtr); - private: - - int _maxScanLineSize; - int _numScanLines; - char * _outBuffer; - Zip _zip; -}; - - -OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT - - - - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/b44ExpLogTable.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/b44ExpLogTable.cpp deleted file mode 100644 index 24e35fb..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/b44ExpLogTable.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//--------------------------------------------------------------------------- -// -// b44ExpLogTable -// -// A program to generate lookup tables for -// -// y = exp (x / 8) -// -// and -// x = 8 * log (x); -// -// where x and y are 16-bit floating-point numbers -// -// The tables are used by class B44Compressor. -// -//--------------------------------------------------------------------------- - -#include -#include -#include -#include - -using namespace std; - -//--------------------------------------------- -// Main - prints the half-to-float lookup table -//--------------------------------------------- - -int -main () -{ -#ifndef HAVE_IOS_BASE - cout.setf (ios::hex, ios::basefield); -#else - cout.setf (ios_base::hex, ios_base::basefield); -#endif - - cout << "//\n" - "// This is an automatically generated file.\n" - "// Do not edit.\n" - "//\n\n"; - - const int iMax = (1 << 16); - - cout << "const unsigned short expTable[] =\n" - "{\n" - " "; - - for (int i = 0; i < iMax; i++) - { - half h; - h.setBits (i); - - if (!h.isFinite()) - h = 0; - else if (h >= 8 * log (HALF_MAX)) - h = HALF_MAX; - else - h = exp (h / 8); - - cout << "0x" << setfill ('0') << setw (4) << h.bits() << ", "; - - if (i % 8 == 7) - { - cout << "\n"; - - if (i < iMax - 1) - cout << " "; - } - } - - cout << "};\n\n"; - - cout << "const unsigned short logTable[] =\n" - "{\n" - " "; - - for (int i = 0; i < iMax; i++) - { - half h; - h.setBits (i); - - if (!h.isFinite() || h < 0) - h = 0; - else - h = 8 * log (h); - - cout << "0x" << setfill ('0') << setw (4) << h.bits() << ", "; - - if (i % 8 == 7) - { - cout << "\n"; - - if (i < iMax - 1) - cout << " "; - } - } - - cout << "};\n"; - - return 0; -} diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/b44ExpLogTable.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/b44ExpLogTable.h deleted file mode 100644 index c13d16c..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/b44ExpLogTable.h +++ /dev/null @@ -1,16396 +0,0 @@ -// -// This is an automatically generated file. -// Do not edit. -// - -const unsigned short expTable[] = -{ - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, - 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, - 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c02, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, - 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c03, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, - 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c04, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, - 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c05, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, 0x3c06, - 0x3c06, 0x3c06, 0x3c06, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, 0x3c07, - 0x3c07, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c08, - 0x3c08, 0x3c08, 0x3c08, 0x3c08, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, 0x3c09, - 0x3c09, 0x3c09, 0x3c09, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, 0x3c0a, - 0x3c0a, 0x3c0a, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, 0x3c0b, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, - 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0c, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, - 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0e, - 0x3c0e, 0x3c0e, 0x3c0e, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, 0x3c0f, - 0x3c0f, 0x3c0f, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, 0x3c10, - 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, - 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, - 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, - 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, - 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, - 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, - 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, - 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c11, 0x3c12, - 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, - 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, - 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, - 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, - 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, - 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, - 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, - 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c12, 0x3c13, 0x3c13, - 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, - 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, - 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, - 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, - 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, - 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, - 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, - 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c13, 0x3c14, 0x3c14, 0x3c14, - 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, - 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, - 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, - 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, - 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, - 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, - 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c14, - 0x3c14, 0x3c14, 0x3c14, 0x3c14, 0x3c15, 0x3c15, 0x3c15, 0x3c15, - 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, - 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, - 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, - 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, - 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, - 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, - 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, 0x3c15, - 0x3c15, 0x3c15, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, - 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, - 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, - 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, - 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, - 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, - 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, - 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, 0x3c16, - 0x3c16, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, - 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, - 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, - 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, - 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, - 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, - 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, - 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c17, 0x3c18, - 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, - 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, - 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, - 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, - 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, - 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, - 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, - 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c18, 0x3c19, 0x3c19, - 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, - 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, - 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, - 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, - 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, - 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, - 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, - 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c19, 0x3c1a, 0x3c1a, 0x3c1a, - 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, - 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, - 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, - 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, - 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, - 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, - 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1a, - 0x3c1a, 0x3c1a, 0x3c1a, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, - 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, - 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, - 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, - 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, - 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, - 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, - 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1b, - 0x3c1b, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, - 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, - 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, - 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, - 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, - 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, - 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, - 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, 0x3c1c, - 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, - 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, - 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, - 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, - 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, - 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, - 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, - 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1e, 0x3c1e, - 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, - 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, - 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, - 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, - 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, - 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, - 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, - 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1e, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, - 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, - 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, - 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, - 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, - 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, - 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, - 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, 0x3c1f, - 0x3c1f, 0x3c1f, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, - 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, - 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, - 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, - 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, - 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, - 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, - 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, 0x3c20, - 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, - 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, - 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, - 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c21, 0x3c22, - 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, - 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, - 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, - 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c22, 0x3c23, 0x3c23, - 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, - 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, - 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, - 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c23, 0x3c24, 0x3c24, 0x3c24, - 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, - 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, - 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c24, - 0x3c24, 0x3c24, 0x3c24, 0x3c24, 0x3c25, 0x3c25, 0x3c25, 0x3c25, - 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, - 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, - 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, 0x3c25, - 0x3c25, 0x3c25, 0x3c25, 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, - 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, - 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, - 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, 0x3c26, - 0x3c26, 0x3c26, 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, - 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, - 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, - 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, 0x3c27, - 0x3c27, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, - 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, - 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, - 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, 0x3c28, - 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, - 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, - 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, - 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c29, 0x3c2a, 0x3c2a, - 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, - 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, - 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, - 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2a, 0x3c2b, 0x3c2b, 0x3c2b, - 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, - 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, - 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, - 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, - 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, - 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, - 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, 0x3c2c, - 0x3c2c, 0x3c2c, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, - 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, - 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, - 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, 0x3c2d, - 0x3c2d, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, - 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, - 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, - 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, 0x3c2e, - 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, - 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, - 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, - 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c30, 0x3c30, - 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, - 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, - 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, - 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c30, 0x3c31, 0x3c31, 0x3c31, - 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, - 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, - 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, 0x3c31, - 0x3c31, 0x3c31, 0x3c31, 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, - 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, - 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, - 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, 0x3c32, - 0x3c32, 0x3c32, 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, - 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, - 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, - 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, 0x3c33, - 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, - 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, - 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, - 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c34, 0x3c35, - 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, - 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, - 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, - 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c35, 0x3c36, 0x3c36, 0x3c36, - 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, - 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, - 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c36, - 0x3c36, 0x3c36, 0x3c36, 0x3c36, 0x3c37, 0x3c37, 0x3c37, 0x3c37, - 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, - 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, - 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, 0x3c37, - 0x3c37, 0x3c37, 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, - 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, - 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, - 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, 0x3c38, - 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, - 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, - 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, - 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c39, 0x3c3a, - 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, - 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, - 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, - 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3a, 0x3c3b, 0x3c3b, 0x3c3b, - 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, - 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, - 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3b, - 0x3c3b, 0x3c3b, 0x3c3b, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, - 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, - 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, - 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3c, - 0x3c3c, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, - 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, - 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, - 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, 0x3c3d, - 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, - 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, - 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, - 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3f, 0x3c3f, - 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, - 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, - 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, - 0x3c3f, 0x3c3f, 0x3c3f, 0x3c3f, 0x3c40, 0x3c40, 0x3c40, 0x3c40, - 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, - 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, - 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, 0x3c40, - 0x3c40, 0x3c40, 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, - 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, - 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, - 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, 0x3c41, - 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c42, - 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c42, - 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c42, 0x3c43, - 0x3c43, 0x3c43, 0x3c43, 0x3c43, 0x3c43, 0x3c43, 0x3c43, 0x3c43, - 0x3c43, 0x3c43, 0x3c43, 0x3c43, 0x3c43, 0x3c43, 0x3c44, 0x3c44, - 0x3c44, 0x3c44, 0x3c44, 0x3c44, 0x3c44, 0x3c44, 0x3c44, 0x3c44, - 0x3c44, 0x3c44, 0x3c44, 0x3c44, 0x3c44, 0x3c45, 0x3c45, 0x3c45, - 0x3c45, 0x3c45, 0x3c45, 0x3c45, 0x3c45, 0x3c45, 0x3c45, 0x3c45, - 0x3c45, 0x3c45, 0x3c45, 0x3c45, 0x3c46, 0x3c46, 0x3c46, 0x3c46, - 0x3c46, 0x3c46, 0x3c46, 0x3c46, 0x3c46, 0x3c46, 0x3c46, 0x3c46, - 0x3c46, 0x3c46, 0x3c46, 0x3c47, 0x3c47, 0x3c47, 0x3c47, 0x3c47, - 0x3c47, 0x3c47, 0x3c47, 0x3c47, 0x3c47, 0x3c47, 0x3c47, 0x3c47, - 0x3c47, 0x3c47, 0x3c48, 0x3c48, 0x3c48, 0x3c48, 0x3c48, 0x3c48, - 0x3c48, 0x3c48, 0x3c48, 0x3c48, 0x3c48, 0x3c48, 0x3c48, 0x3c48, - 0x3c48, 0x3c49, 0x3c49, 0x3c49, 0x3c49, 0x3c49, 0x3c49, 0x3c49, - 0x3c49, 0x3c49, 0x3c49, 0x3c49, 0x3c49, 0x3c49, 0x3c49, 0x3c49, - 0x3c4a, 0x3c4a, 0x3c4a, 0x3c4a, 0x3c4a, 0x3c4a, 0x3c4a, 0x3c4a, - 0x3c4a, 0x3c4a, 0x3c4a, 0x3c4a, 0x3c4a, 0x3c4a, 0x3c4a, 0x3c4b, - 0x3c4b, 0x3c4b, 0x3c4b, 0x3c4b, 0x3c4b, 0x3c4b, 0x3c4b, 0x3c4b, - 0x3c4b, 0x3c4b, 0x3c4b, 0x3c4b, 0x3c4b, 0x3c4b, 0x3c4c, 0x3c4c, - 0x3c4c, 0x3c4c, 0x3c4c, 0x3c4c, 0x3c4c, 0x3c4c, 0x3c4c, 0x3c4c, - 0x3c4c, 0x3c4c, 0x3c4c, 0x3c4c, 0x3c4c, 0x3c4d, 0x3c4d, 0x3c4d, - 0x3c4d, 0x3c4d, 0x3c4d, 0x3c4d, 0x3c4d, 0x3c4d, 0x3c4d, 0x3c4d, - 0x3c4d, 0x3c4d, 0x3c4d, 0x3c4d, 0x3c4e, 0x3c4e, 0x3c4e, 0x3c4e, - 0x3c4e, 0x3c4e, 0x3c4e, 0x3c4e, 0x3c4e, 0x3c4e, 0x3c4e, 0x3c4e, - 0x3c4e, 0x3c4e, 0x3c4e, 0x3c4f, 0x3c4f, 0x3c4f, 0x3c4f, 0x3c4f, - 0x3c4f, 0x3c4f, 0x3c4f, 0x3c4f, 0x3c4f, 0x3c4f, 0x3c4f, 0x3c4f, - 0x3c4f, 0x3c4f, 0x3c50, 0x3c50, 0x3c50, 0x3c50, 0x3c50, 0x3c50, - 0x3c50, 0x3c50, 0x3c50, 0x3c50, 0x3c50, 0x3c50, 0x3c50, 0x3c50, - 0x3c51, 0x3c51, 0x3c51, 0x3c51, 0x3c51, 0x3c51, 0x3c51, 0x3c51, - 0x3c51, 0x3c51, 0x3c51, 0x3c51, 0x3c51, 0x3c51, 0x3c51, 0x3c52, - 0x3c52, 0x3c52, 0x3c52, 0x3c52, 0x3c52, 0x3c52, 0x3c52, 0x3c52, - 0x3c52, 0x3c52, 0x3c52, 0x3c52, 0x3c52, 0x3c52, 0x3c53, 0x3c53, - 0x3c53, 0x3c53, 0x3c53, 0x3c53, 0x3c53, 0x3c53, 0x3c53, 0x3c53, - 0x3c53, 0x3c53, 0x3c53, 0x3c53, 0x3c53, 0x3c54, 0x3c54, 0x3c54, - 0x3c54, 0x3c54, 0x3c54, 0x3c54, 0x3c54, 0x3c54, 0x3c54, 0x3c54, - 0x3c54, 0x3c54, 0x3c54, 0x3c54, 0x3c55, 0x3c55, 0x3c55, 0x3c55, - 0x3c55, 0x3c55, 0x3c55, 0x3c55, 0x3c55, 0x3c55, 0x3c55, 0x3c55, - 0x3c55, 0x3c55, 0x3c56, 0x3c56, 0x3c56, 0x3c56, 0x3c56, 0x3c56, - 0x3c56, 0x3c56, 0x3c56, 0x3c56, 0x3c56, 0x3c56, 0x3c56, 0x3c56, - 0x3c56, 0x3c57, 0x3c57, 0x3c57, 0x3c57, 0x3c57, 0x3c57, 0x3c57, - 0x3c57, 0x3c57, 0x3c57, 0x3c57, 0x3c57, 0x3c57, 0x3c57, 0x3c57, - 0x3c58, 0x3c58, 0x3c58, 0x3c58, 0x3c58, 0x3c58, 0x3c58, 0x3c58, - 0x3c58, 0x3c58, 0x3c58, 0x3c58, 0x3c58, 0x3c58, 0x3c58, 0x3c59, - 0x3c59, 0x3c59, 0x3c59, 0x3c59, 0x3c59, 0x3c59, 0x3c59, 0x3c59, - 0x3c59, 0x3c59, 0x3c59, 0x3c59, 0x3c59, 0x3c5a, 0x3c5a, 0x3c5a, - 0x3c5a, 0x3c5a, 0x3c5a, 0x3c5a, 0x3c5a, 0x3c5a, 0x3c5a, 0x3c5a, - 0x3c5a, 0x3c5a, 0x3c5a, 0x3c5a, 0x3c5b, 0x3c5b, 0x3c5b, 0x3c5b, - 0x3c5b, 0x3c5b, 0x3c5b, 0x3c5b, 0x3c5b, 0x3c5b, 0x3c5b, 0x3c5b, - 0x3c5b, 0x3c5b, 0x3c5b, 0x3c5c, 0x3c5c, 0x3c5c, 0x3c5c, 0x3c5c, - 0x3c5c, 0x3c5c, 0x3c5c, 0x3c5c, 0x3c5c, 0x3c5c, 0x3c5c, 0x3c5c, - 0x3c5c, 0x3c5d, 0x3c5d, 0x3c5d, 0x3c5d, 0x3c5d, 0x3c5d, 0x3c5d, - 0x3c5d, 0x3c5d, 0x3c5d, 0x3c5d, 0x3c5d, 0x3c5d, 0x3c5d, 0x3c5d, - 0x3c5e, 0x3c5e, 0x3c5e, 0x3c5e, 0x3c5e, 0x3c5e, 0x3c5e, 0x3c5e, - 0x3c5e, 0x3c5e, 0x3c5e, 0x3c5e, 0x3c5e, 0x3c5e, 0x3c5e, 0x3c5f, - 0x3c5f, 0x3c5f, 0x3c5f, 0x3c5f, 0x3c5f, 0x3c5f, 0x3c5f, 0x3c5f, - 0x3c5f, 0x3c5f, 0x3c5f, 0x3c5f, 0x3c5f, 0x3c60, 0x3c60, 0x3c60, - 0x3c60, 0x3c60, 0x3c60, 0x3c60, 0x3c60, 0x3c60, 0x3c60, 0x3c60, - 0x3c60, 0x3c60, 0x3c60, 0x3c60, 0x3c61, 0x3c61, 0x3c61, 0x3c61, - 0x3c61, 0x3c61, 0x3c61, 0x3c61, 0x3c61, 0x3c61, 0x3c61, 0x3c61, - 0x3c61, 0x3c61, 0x3c61, 0x3c62, 0x3c62, 0x3c62, 0x3c62, 0x3c62, - 0x3c62, 0x3c62, 0x3c62, 0x3c62, 0x3c62, 0x3c62, 0x3c62, 0x3c62, - 0x3c62, 0x3c63, 0x3c63, 0x3c63, 0x3c63, 0x3c63, 0x3c63, 0x3c63, - 0x3c63, 0x3c63, 0x3c63, 0x3c63, 0x3c63, 0x3c63, 0x3c63, 0x3c63, - 0x3c64, 0x3c64, 0x3c64, 0x3c64, 0x3c64, 0x3c64, 0x3c64, 0x3c64, - 0x3c64, 0x3c64, 0x3c64, 0x3c64, 0x3c64, 0x3c64, 0x3c65, 0x3c65, - 0x3c65, 0x3c65, 0x3c65, 0x3c65, 0x3c65, 0x3c65, 0x3c65, 0x3c65, - 0x3c65, 0x3c65, 0x3c65, 0x3c65, 0x3c65, 0x3c66, 0x3c66, 0x3c66, - 0x3c66, 0x3c66, 0x3c66, 0x3c66, 0x3c66, 0x3c66, 0x3c66, 0x3c66, - 0x3c66, 0x3c66, 0x3c66, 0x3c66, 0x3c67, 0x3c67, 0x3c67, 0x3c67, - 0x3c67, 0x3c67, 0x3c67, 0x3c67, 0x3c67, 0x3c67, 0x3c67, 0x3c67, - 0x3c67, 0x3c67, 0x3c68, 0x3c68, 0x3c68, 0x3c68, 0x3c68, 0x3c68, - 0x3c68, 0x3c68, 0x3c68, 0x3c68, 0x3c68, 0x3c68, 0x3c68, 0x3c68, - 0x3c68, 0x3c69, 0x3c69, 0x3c69, 0x3c69, 0x3c69, 0x3c69, 0x3c69, - 0x3c69, 0x3c69, 0x3c69, 0x3c69, 0x3c69, 0x3c69, 0x3c69, 0x3c6a, - 0x3c6a, 0x3c6a, 0x3c6a, 0x3c6a, 0x3c6a, 0x3c6a, 0x3c6a, 0x3c6a, - 0x3c6a, 0x3c6a, 0x3c6a, 0x3c6a, 0x3c6a, 0x3c6a, 0x3c6b, 0x3c6b, - 0x3c6b, 0x3c6b, 0x3c6b, 0x3c6b, 0x3c6b, 0x3c6b, 0x3c6b, 0x3c6b, - 0x3c6b, 0x3c6b, 0x3c6b, 0x3c6b, 0x3c6c, 0x3c6c, 0x3c6c, 0x3c6c, - 0x3c6c, 0x3c6c, 0x3c6c, 0x3c6c, 0x3c6c, 0x3c6c, 0x3c6c, 0x3c6c, - 0x3c6c, 0x3c6c, 0x3c6c, 0x3c6d, 0x3c6d, 0x3c6d, 0x3c6d, 0x3c6d, - 0x3c6d, 0x3c6d, 0x3c6d, 0x3c6d, 0x3c6d, 0x3c6d, 0x3c6d, 0x3c6d, - 0x3c6d, 0x3c6e, 0x3c6e, 0x3c6e, 0x3c6e, 0x3c6e, 0x3c6e, 0x3c6e, - 0x3c6e, 0x3c6e, 0x3c6e, 0x3c6e, 0x3c6e, 0x3c6e, 0x3c6e, 0x3c6f, - 0x3c6f, 0x3c6f, 0x3c6f, 0x3c6f, 0x3c6f, 0x3c6f, 0x3c6f, 0x3c6f, - 0x3c6f, 0x3c6f, 0x3c6f, 0x3c6f, 0x3c6f, 0x3c6f, 0x3c70, 0x3c70, - 0x3c70, 0x3c70, 0x3c70, 0x3c70, 0x3c70, 0x3c70, 0x3c70, 0x3c70, - 0x3c70, 0x3c70, 0x3c70, 0x3c70, 0x3c71, 0x3c71, 0x3c71, 0x3c71, - 0x3c71, 0x3c71, 0x3c71, 0x3c71, 0x3c71, 0x3c71, 0x3c71, 0x3c71, - 0x3c71, 0x3c71, 0x3c71, 0x3c72, 0x3c72, 0x3c72, 0x3c72, 0x3c72, - 0x3c72, 0x3c72, 0x3c72, 0x3c72, 0x3c72, 0x3c72, 0x3c72, 0x3c72, - 0x3c72, 0x3c73, 0x3c73, 0x3c73, 0x3c73, 0x3c73, 0x3c73, 0x3c73, - 0x3c73, 0x3c73, 0x3c73, 0x3c73, 0x3c73, 0x3c73, 0x3c73, 0x3c73, - 0x3c74, 0x3c74, 0x3c74, 0x3c74, 0x3c74, 0x3c74, 0x3c74, 0x3c74, - 0x3c74, 0x3c74, 0x3c74, 0x3c74, 0x3c74, 0x3c74, 0x3c75, 0x3c75, - 0x3c75, 0x3c75, 0x3c75, 0x3c75, 0x3c75, 0x3c75, 0x3c75, 0x3c75, - 0x3c75, 0x3c75, 0x3c75, 0x3c75, 0x3c76, 0x3c76, 0x3c76, 0x3c76, - 0x3c76, 0x3c76, 0x3c76, 0x3c76, 0x3c76, 0x3c76, 0x3c76, 0x3c76, - 0x3c76, 0x3c76, 0x3c76, 0x3c77, 0x3c77, 0x3c77, 0x3c77, 0x3c77, - 0x3c77, 0x3c77, 0x3c77, 0x3c77, 0x3c77, 0x3c77, 0x3c77, 0x3c77, - 0x3c77, 0x3c78, 0x3c78, 0x3c78, 0x3c78, 0x3c78, 0x3c78, 0x3c78, - 0x3c78, 0x3c78, 0x3c78, 0x3c78, 0x3c78, 0x3c78, 0x3c78, 0x3c79, - 0x3c79, 0x3c79, 0x3c79, 0x3c79, 0x3c79, 0x3c79, 0x3c79, 0x3c79, - 0x3c79, 0x3c79, 0x3c79, 0x3c79, 0x3c79, 0x3c79, 0x3c7a, 0x3c7a, - 0x3c7a, 0x3c7a, 0x3c7a, 0x3c7a, 0x3c7a, 0x3c7a, 0x3c7a, 0x3c7a, - 0x3c7a, 0x3c7a, 0x3c7a, 0x3c7a, 0x3c7b, 0x3c7b, 0x3c7b, 0x3c7b, - 0x3c7b, 0x3c7b, 0x3c7b, 0x3c7b, 0x3c7b, 0x3c7b, 0x3c7b, 0x3c7b, - 0x3c7b, 0x3c7b, 0x3c7c, 0x3c7c, 0x3c7c, 0x3c7c, 0x3c7c, 0x3c7c, - 0x3c7c, 0x3c7c, 0x3c7c, 0x3c7c, 0x3c7c, 0x3c7c, 0x3c7c, 0x3c7c, - 0x3c7d, 0x3c7d, 0x3c7d, 0x3c7d, 0x3c7d, 0x3c7d, 0x3c7d, 0x3c7d, - 0x3c7d, 0x3c7d, 0x3c7d, 0x3c7d, 0x3c7d, 0x3c7d, 0x3c7d, 0x3c7e, - 0x3c7e, 0x3c7e, 0x3c7e, 0x3c7e, 0x3c7e, 0x3c7e, 0x3c7e, 0x3c7e, - 0x3c7e, 0x3c7e, 0x3c7e, 0x3c7e, 0x3c7e, 0x3c7f, 0x3c7f, 0x3c7f, - 0x3c7f, 0x3c7f, 0x3c7f, 0x3c7f, 0x3c7f, 0x3c7f, 0x3c7f, 0x3c7f, - 0x3c7f, 0x3c7f, 0x3c7f, 0x3c80, 0x3c80, 0x3c80, 0x3c80, 0x3c80, - 0x3c80, 0x3c80, 0x3c80, 0x3c80, 0x3c80, 0x3c80, 0x3c80, 0x3c80, - 0x3c80, 0x3c81, 0x3c81, 0x3c81, 0x3c81, 0x3c81, 0x3c81, 0x3c81, - 0x3c81, 0x3c81, 0x3c81, 0x3c81, 0x3c81, 0x3c81, 0x3c81, 0x3c81, - 0x3c82, 0x3c82, 0x3c82, 0x3c82, 0x3c82, 0x3c82, 0x3c82, 0x3c82, - 0x3c82, 0x3c82, 0x3c82, 0x3c82, 0x3c82, 0x3c82, 0x3c83, 0x3c83, - 0x3c83, 0x3c83, 0x3c83, 0x3c83, 0x3c83, 0x3c83, 0x3c83, 0x3c83, - 0x3c83, 0x3c83, 0x3c83, 0x3c83, 0x3c84, 0x3c84, 0x3c84, 0x3c84, - 0x3c84, 0x3c84, 0x3c84, 0x3c84, 0x3c84, 0x3c84, 0x3c84, 0x3c84, - 0x3c84, 0x3c84, 0x3c85, 0x3c85, 0x3c85, 0x3c85, 0x3c85, 0x3c85, - 0x3c85, 0x3c85, 0x3c85, 0x3c85, 0x3c85, 0x3c85, 0x3c85, 0x3c85, - 0x3c86, 0x3c86, 0x3c86, 0x3c86, 0x3c86, 0x3c86, 0x3c86, 0x3c86, - 0x3c86, 0x3c86, 0x3c86, 0x3c86, 0x3c86, 0x3c86, 0x3c87, 0x3c87, - 0x3c87, 0x3c87, 0x3c87, 0x3c87, 0x3c87, 0x3c87, 0x3c87, 0x3c87, - 0x3c87, 0x3c87, 0x3c87, 0x3c87, 0x3c87, 0x3c88, 0x3c88, 0x3c88, - 0x3c88, 0x3c88, 0x3c88, 0x3c88, 0x3c88, 0x3c88, 0x3c88, 0x3c88, - 0x3c88, 0x3c88, 0x3c89, 0x3c89, 0x3c89, 0x3c89, 0x3c89, 0x3c89, - 0x3c89, 0x3c8a, 0x3c8a, 0x3c8a, 0x3c8a, 0x3c8a, 0x3c8a, 0x3c8a, - 0x3c8b, 0x3c8b, 0x3c8b, 0x3c8b, 0x3c8b, 0x3c8b, 0x3c8b, 0x3c8c, - 0x3c8c, 0x3c8c, 0x3c8c, 0x3c8c, 0x3c8c, 0x3c8c, 0x3c8d, 0x3c8d, - 0x3c8d, 0x3c8d, 0x3c8d, 0x3c8d, 0x3c8d, 0x3c8e, 0x3c8e, 0x3c8e, - 0x3c8e, 0x3c8e, 0x3c8e, 0x3c8e, 0x3c8f, 0x3c8f, 0x3c8f, 0x3c8f, - 0x3c8f, 0x3c8f, 0x3c8f, 0x3c90, 0x3c90, 0x3c90, 0x3c90, 0x3c90, - 0x3c90, 0x3c90, 0x3c91, 0x3c91, 0x3c91, 0x3c91, 0x3c91, 0x3c91, - 0x3c91, 0x3c92, 0x3c92, 0x3c92, 0x3c92, 0x3c92, 0x3c92, 0x3c92, - 0x3c93, 0x3c93, 0x3c93, 0x3c93, 0x3c93, 0x3c93, 0x3c93, 0x3c94, - 0x3c94, 0x3c94, 0x3c94, 0x3c94, 0x3c94, 0x3c94, 0x3c95, 0x3c95, - 0x3c95, 0x3c95, 0x3c95, 0x3c95, 0x3c95, 0x3c96, 0x3c96, 0x3c96, - 0x3c96, 0x3c96, 0x3c96, 0x3c96, 0x3c97, 0x3c97, 0x3c97, 0x3c97, - 0x3c97, 0x3c97, 0x3c97, 0x3c98, 0x3c98, 0x3c98, 0x3c98, 0x3c98, - 0x3c98, 0x3c98, 0x3c99, 0x3c99, 0x3c99, 0x3c99, 0x3c99, 0x3c99, - 0x3c99, 0x3c9a, 0x3c9a, 0x3c9a, 0x3c9a, 0x3c9a, 0x3c9a, 0x3c9a, - 0x3c9b, 0x3c9b, 0x3c9b, 0x3c9b, 0x3c9b, 0x3c9b, 0x3c9b, 0x3c9c, - 0x3c9c, 0x3c9c, 0x3c9c, 0x3c9c, 0x3c9c, 0x3c9c, 0x3c9d, 0x3c9d, - 0x3c9d, 0x3c9d, 0x3c9d, 0x3c9d, 0x3c9d, 0x3c9e, 0x3c9e, 0x3c9e, - 0x3c9e, 0x3c9e, 0x3c9e, 0x3c9f, 0x3c9f, 0x3c9f, 0x3c9f, 0x3c9f, - 0x3c9f, 0x3c9f, 0x3ca0, 0x3ca0, 0x3ca0, 0x3ca0, 0x3ca0, 0x3ca0, - 0x3ca0, 0x3ca1, 0x3ca1, 0x3ca1, 0x3ca1, 0x3ca1, 0x3ca1, 0x3ca1, - 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca3, - 0x3ca3, 0x3ca3, 0x3ca3, 0x3ca3, 0x3ca3, 0x3ca3, 0x3ca4, 0x3ca4, - 0x3ca4, 0x3ca4, 0x3ca4, 0x3ca4, 0x3ca4, 0x3ca5, 0x3ca5, 0x3ca5, - 0x3ca5, 0x3ca5, 0x3ca5, 0x3ca5, 0x3ca6, 0x3ca6, 0x3ca6, 0x3ca6, - 0x3ca6, 0x3ca6, 0x3ca6, 0x3ca7, 0x3ca7, 0x3ca7, 0x3ca7, 0x3ca7, - 0x3ca7, 0x3ca7, 0x3ca8, 0x3ca8, 0x3ca8, 0x3ca8, 0x3ca8, 0x3ca8, - 0x3ca9, 0x3ca9, 0x3ca9, 0x3ca9, 0x3ca9, 0x3ca9, 0x3ca9, 0x3caa, - 0x3caa, 0x3caa, 0x3caa, 0x3caa, 0x3caa, 0x3caa, 0x3cab, 0x3cab, - 0x3cab, 0x3cab, 0x3cab, 0x3cab, 0x3cab, 0x3cac, 0x3cac, 0x3cac, - 0x3cac, 0x3cac, 0x3cac, 0x3cac, 0x3cad, 0x3cad, 0x3cad, 0x3cad, - 0x3cad, 0x3cad, 0x3cad, 0x3cae, 0x3cae, 0x3cae, 0x3cae, 0x3cae, - 0x3cae, 0x3cae, 0x3caf, 0x3caf, 0x3caf, 0x3caf, 0x3caf, 0x3caf, - 0x3cb0, 0x3cb0, 0x3cb0, 0x3cb0, 0x3cb0, 0x3cb0, 0x3cb0, 0x3cb1, - 0x3cb1, 0x3cb1, 0x3cb1, 0x3cb1, 0x3cb1, 0x3cb1, 0x3cb2, 0x3cb2, - 0x3cb2, 0x3cb2, 0x3cb2, 0x3cb2, 0x3cb2, 0x3cb3, 0x3cb3, 0x3cb3, - 0x3cb3, 0x3cb3, 0x3cb3, 0x3cb3, 0x3cb4, 0x3cb4, 0x3cb4, 0x3cb4, - 0x3cb4, 0x3cb4, 0x3cb5, 0x3cb5, 0x3cb5, 0x3cb5, 0x3cb5, 0x3cb5, - 0x3cb5, 0x3cb6, 0x3cb6, 0x3cb6, 0x3cb6, 0x3cb6, 0x3cb6, 0x3cb6, - 0x3cb7, 0x3cb7, 0x3cb7, 0x3cb7, 0x3cb7, 0x3cb7, 0x3cb7, 0x3cb8, - 0x3cb8, 0x3cb8, 0x3cb8, 0x3cb8, 0x3cb8, 0x3cb8, 0x3cb9, 0x3cb9, - 0x3cb9, 0x3cb9, 0x3cb9, 0x3cb9, 0x3cba, 0x3cba, 0x3cba, 0x3cba, - 0x3cba, 0x3cba, 0x3cba, 0x3cbb, 0x3cbb, 0x3cbb, 0x3cbb, 0x3cbb, - 0x3cbb, 0x3cbb, 0x3cbc, 0x3cbc, 0x3cbc, 0x3cbc, 0x3cbc, 0x3cbc, - 0x3cbc, 0x3cbd, 0x3cbd, 0x3cbd, 0x3cbd, 0x3cbd, 0x3cbd, 0x3cbe, - 0x3cbe, 0x3cbe, 0x3cbe, 0x3cbe, 0x3cbe, 0x3cbe, 0x3cbf, 0x3cbf, - 0x3cbf, 0x3cbf, 0x3cbf, 0x3cbf, 0x3cbf, 0x3cc0, 0x3cc0, 0x3cc0, - 0x3cc0, 0x3cc0, 0x3cc0, 0x3cc0, 0x3cc1, 0x3cc1, 0x3cc1, 0x3cc1, - 0x3cc1, 0x3cc1, 0x3cc2, 0x3cc2, 0x3cc2, 0x3cc2, 0x3cc2, 0x3cc2, - 0x3cc2, 0x3cc3, 0x3cc3, 0x3cc3, 0x3cc3, 0x3cc3, 0x3cc3, 0x3cc3, - 0x3cc4, 0x3cc4, 0x3cc4, 0x3cc4, 0x3cc4, 0x3cc4, 0x3cc4, 0x3cc5, - 0x3cc5, 0x3cc5, 0x3cc5, 0x3cc5, 0x3cc5, 0x3cc6, 0x3cc6, 0x3cc6, - 0x3cc6, 0x3cc6, 0x3cc6, 0x3cc6, 0x3cc7, 0x3cc7, 0x3cc7, 0x3cc7, - 0x3cc7, 0x3cc7, 0x3cc7, 0x3cc8, 0x3cc8, 0x3cc8, 0x3cc8, 0x3cc8, - 0x3cc8, 0x3cc9, 0x3cc9, 0x3cc9, 0x3cc9, 0x3cc9, 0x3cc9, 0x3cc9, - 0x3cca, 0x3cca, 0x3cca, 0x3cca, 0x3cca, 0x3cca, 0x3cca, 0x3ccb, - 0x3ccb, 0x3ccb, 0x3ccb, 0x3ccb, 0x3ccb, 0x3ccc, 0x3ccc, 0x3ccc, - 0x3ccc, 0x3ccc, 0x3ccc, 0x3ccc, 0x3ccd, 0x3ccd, 0x3ccd, 0x3ccd, - 0x3ccd, 0x3ccd, 0x3ccd, 0x3cce, 0x3cce, 0x3cce, 0x3cce, 0x3cce, - 0x3cce, 0x3ccf, 0x3ccf, 0x3ccf, 0x3ccf, 0x3ccf, 0x3ccf, 0x3ccf, - 0x3cd0, 0x3cd0, 0x3cd0, 0x3cd0, 0x3cd0, 0x3cd0, 0x3cd0, 0x3cd1, - 0x3cd1, 0x3cd1, 0x3cd1, 0x3cd1, 0x3cd1, 0x3cd2, 0x3cd2, 0x3cd2, - 0x3cd2, 0x3cd2, 0x3cd2, 0x3cd2, 0x3cd3, 0x3cd3, 0x3cd3, 0x3cd3, - 0x3cd3, 0x3cd3, 0x3cd3, 0x3cd4, 0x3cd4, 0x3cd4, 0x3cd4, 0x3cd4, - 0x3cd4, 0x3cd5, 0x3cd5, 0x3cd5, 0x3cd5, 0x3cd5, 0x3cd5, 0x3cd5, - 0x3cd6, 0x3cd6, 0x3cd6, 0x3cd6, 0x3cd6, 0x3cd6, 0x3cd7, 0x3cd7, - 0x3cd7, 0x3cd7, 0x3cd7, 0x3cd7, 0x3cd7, 0x3cd8, 0x3cd8, 0x3cd8, - 0x3cd8, 0x3cd8, 0x3cd8, 0x3cd8, 0x3cd9, 0x3cd9, 0x3cd9, 0x3cd9, - 0x3cd9, 0x3cd9, 0x3cda, 0x3cda, 0x3cda, 0x3cda, 0x3cda, 0x3cda, - 0x3cda, 0x3cdb, 0x3cdb, 0x3cdb, 0x3cdb, 0x3cdb, 0x3cdb, 0x3cdc, - 0x3cdc, 0x3cdc, 0x3cdc, 0x3cdc, 0x3cdc, 0x3cdc, 0x3cdd, 0x3cdd, - 0x3cdd, 0x3cdd, 0x3cdd, 0x3cdd, 0x3cdd, 0x3cde, 0x3cde, 0x3cde, - 0x3cde, 0x3cde, 0x3cde, 0x3cdf, 0x3cdf, 0x3cdf, 0x3cdf, 0x3cdf, - 0x3cdf, 0x3cdf, 0x3ce0, 0x3ce0, 0x3ce0, 0x3ce0, 0x3ce0, 0x3ce0, - 0x3ce1, 0x3ce1, 0x3ce1, 0x3ce1, 0x3ce1, 0x3ce1, 0x3ce1, 0x3ce2, - 0x3ce2, 0x3ce2, 0x3ce2, 0x3ce2, 0x3ce2, 0x3ce3, 0x3ce3, 0x3ce3, - 0x3ce3, 0x3ce3, 0x3ce3, 0x3ce3, 0x3ce4, 0x3ce4, 0x3ce4, 0x3ce4, - 0x3ce4, 0x3ce4, 0x3ce4, 0x3ce5, 0x3ce5, 0x3ce5, 0x3ce5, 0x3ce5, - 0x3ce5, 0x3ce6, 0x3ce6, 0x3ce6, 0x3ce6, 0x3ce6, 0x3ce6, 0x3ce6, - 0x3ce7, 0x3ce7, 0x3ce7, 0x3ce7, 0x3ce7, 0x3ce7, 0x3ce8, 0x3ce8, - 0x3ce8, 0x3ce8, 0x3ce8, 0x3ce8, 0x3ce8, 0x3ce9, 0x3ce9, 0x3ce9, - 0x3ce9, 0x3ce9, 0x3ce9, 0x3cea, 0x3cea, 0x3cea, 0x3cea, 0x3cea, - 0x3cea, 0x3cea, 0x3ceb, 0x3ceb, 0x3ceb, 0x3ceb, 0x3ceb, 0x3ceb, - 0x3cec, 0x3cec, 0x3cec, 0x3cec, 0x3cec, 0x3cec, 0x3cec, 0x3ced, - 0x3ced, 0x3ced, 0x3ced, 0x3ced, 0x3ced, 0x3cee, 0x3cee, 0x3cee, - 0x3cee, 0x3cee, 0x3cee, 0x3cee, 0x3cef, 0x3cef, 0x3cef, 0x3cef, - 0x3cef, 0x3cef, 0x3cf0, 0x3cf0, 0x3cf0, 0x3cf0, 0x3cf0, 0x3cf0, - 0x3cf0, 0x3cf1, 0x3cf1, 0x3cf1, 0x3cf1, 0x3cf1, 0x3cf1, 0x3cf2, - 0x3cf2, 0x3cf2, 0x3cf2, 0x3cf2, 0x3cf2, 0x3cf2, 0x3cf3, 0x3cf3, - 0x3cf3, 0x3cf3, 0x3cf3, 0x3cf3, 0x3cf4, 0x3cf4, 0x3cf4, 0x3cf4, - 0x3cf4, 0x3cf4, 0x3cf4, 0x3cf5, 0x3cf5, 0x3cf5, 0x3cf5, 0x3cf5, - 0x3cf5, 0x3cf6, 0x3cf6, 0x3cf6, 0x3cf6, 0x3cf6, 0x3cf6, 0x3cf7, - 0x3cf7, 0x3cf7, 0x3cf7, 0x3cf7, 0x3cf7, 0x3cf7, 0x3cf8, 0x3cf8, - 0x3cf8, 0x3cf8, 0x3cf8, 0x3cf8, 0x3cf9, 0x3cf9, 0x3cf9, 0x3cf9, - 0x3cf9, 0x3cf9, 0x3cf9, 0x3cfa, 0x3cfa, 0x3cfa, 0x3cfa, 0x3cfa, - 0x3cfa, 0x3cfb, 0x3cfb, 0x3cfb, 0x3cfb, 0x3cfb, 0x3cfb, 0x3cfb, - 0x3cfc, 0x3cfc, 0x3cfc, 0x3cfc, 0x3cfc, 0x3cfc, 0x3cfd, 0x3cfd, - 0x3cfd, 0x3cfd, 0x3cfd, 0x3cfd, 0x3cfe, 0x3cfe, 0x3cfe, 0x3cfe, - 0x3cfe, 0x3cfe, 0x3cfe, 0x3cff, 0x3cff, 0x3cff, 0x3cff, 0x3cff, - 0x3cff, 0x3d00, 0x3d00, 0x3d00, 0x3d00, 0x3d00, 0x3d00, 0x3d00, - 0x3d01, 0x3d01, 0x3d01, 0x3d01, 0x3d01, 0x3d01, 0x3d02, 0x3d02, - 0x3d02, 0x3d02, 0x3d02, 0x3d02, 0x3d03, 0x3d03, 0x3d03, 0x3d03, - 0x3d03, 0x3d03, 0x3d03, 0x3d04, 0x3d04, 0x3d04, 0x3d04, 0x3d04, - 0x3d04, 0x3d05, 0x3d05, 0x3d05, 0x3d05, 0x3d05, 0x3d05, 0x3d05, - 0x3d06, 0x3d06, 0x3d06, 0x3d06, 0x3d06, 0x3d06, 0x3d07, 0x3d07, - 0x3d07, 0x3d07, 0x3d07, 0x3d07, 0x3d08, 0x3d08, 0x3d08, 0x3d08, - 0x3d08, 0x3d08, 0x3d08, 0x3d09, 0x3d09, 0x3d09, 0x3d09, 0x3d09, - 0x3d09, 0x3d0a, 0x3d0a, 0x3d0a, 0x3d0a, 0x3d0a, 0x3d0a, 0x3d0b, - 0x3d0b, 0x3d0b, 0x3d0b, 0x3d0b, 0x3d0b, 0x3d0b, 0x3d0c, 0x3d0c, - 0x3d0c, 0x3d0c, 0x3d0c, 0x3d0c, 0x3d0d, 0x3d0d, 0x3d0d, 0x3d0d, - 0x3d0d, 0x3d0d, 0x3d0e, 0x3d0e, 0x3d0e, 0x3d0e, 0x3d0e, 0x3d0e, - 0x3d0e, 0x3d0f, 0x3d0f, 0x3d0f, 0x3d0f, 0x3d0f, 0x3d0f, 0x3d10, - 0x3d10, 0x3d10, 0x3d10, 0x3d10, 0x3d10, 0x3d11, 0x3d11, 0x3d11, - 0x3d11, 0x3d11, 0x3d11, 0x3d11, 0x3d12, 0x3d12, 0x3d12, 0x3d12, - 0x3d12, 0x3d12, 0x3d13, 0x3d13, 0x3d13, 0x3d13, 0x3d13, 0x3d13, - 0x3d14, 0x3d14, 0x3d14, 0x3d14, 0x3d14, 0x3d14, 0x3d14, 0x3d15, - 0x3d15, 0x3d15, 0x3d15, 0x3d15, 0x3d15, 0x3d16, 0x3d16, 0x3d16, - 0x3d16, 0x3d16, 0x3d16, 0x3d17, 0x3d17, 0x3d17, 0x3d17, 0x3d17, - 0x3d17, 0x3d17, 0x3d18, 0x3d18, 0x3d18, 0x3d18, 0x3d18, 0x3d18, - 0x3d19, 0x3d19, 0x3d19, 0x3d19, 0x3d19, 0x3d19, 0x3d1a, 0x3d1a, - 0x3d1a, 0x3d1a, 0x3d1a, 0x3d1a, 0x3d1b, 0x3d1b, 0x3d1b, 0x3d1b, - 0x3d1b, 0x3d1b, 0x3d1b, 0x3d1c, 0x3d1c, 0x3d1c, 0x3d1c, 0x3d1c, - 0x3d1c, 0x3d1d, 0x3d1d, 0x3d1d, 0x3d1d, 0x3d1d, 0x3d1d, 0x3d1e, - 0x3d1e, 0x3d1e, 0x3d1e, 0x3d1e, 0x3d1e, 0x3d1f, 0x3d1f, 0x3d1f, - 0x3d1f, 0x3d1f, 0x3d1f, 0x3d1f, 0x3d20, 0x3d20, 0x3d20, 0x3d20, - 0x3d20, 0x3d20, 0x3d21, 0x3d21, 0x3d21, 0x3d21, 0x3d21, 0x3d21, - 0x3d22, 0x3d22, 0x3d22, 0x3d22, 0x3d22, 0x3d22, 0x3d23, 0x3d23, - 0x3d23, 0x3d23, 0x3d23, 0x3d24, 0x3d24, 0x3d24, 0x3d25, 0x3d25, - 0x3d25, 0x3d26, 0x3d26, 0x3d26, 0x3d27, 0x3d27, 0x3d27, 0x3d28, - 0x3d28, 0x3d28, 0x3d29, 0x3d29, 0x3d29, 0x3d2a, 0x3d2a, 0x3d2a, - 0x3d2b, 0x3d2b, 0x3d2b, 0x3d2c, 0x3d2c, 0x3d2c, 0x3d2d, 0x3d2d, - 0x3d2d, 0x3d2d, 0x3d2e, 0x3d2e, 0x3d2e, 0x3d2f, 0x3d2f, 0x3d2f, - 0x3d30, 0x3d30, 0x3d30, 0x3d31, 0x3d31, 0x3d31, 0x3d32, 0x3d32, - 0x3d32, 0x3d33, 0x3d33, 0x3d33, 0x3d34, 0x3d34, 0x3d34, 0x3d35, - 0x3d35, 0x3d35, 0x3d36, 0x3d36, 0x3d36, 0x3d37, 0x3d37, 0x3d37, - 0x3d38, 0x3d38, 0x3d38, 0x3d39, 0x3d39, 0x3d39, 0x3d3a, 0x3d3a, - 0x3d3a, 0x3d3a, 0x3d3b, 0x3d3b, 0x3d3b, 0x3d3c, 0x3d3c, 0x3d3c, - 0x3d3d, 0x3d3d, 0x3d3d, 0x3d3e, 0x3d3e, 0x3d3e, 0x3d3f, 0x3d3f, - 0x3d3f, 0x3d40, 0x3d40, 0x3d40, 0x3d41, 0x3d41, 0x3d41, 0x3d42, - 0x3d42, 0x3d42, 0x3d43, 0x3d43, 0x3d43, 0x3d44, 0x3d44, 0x3d44, - 0x3d45, 0x3d45, 0x3d45, 0x3d46, 0x3d46, 0x3d46, 0x3d47, 0x3d47, - 0x3d47, 0x3d48, 0x3d48, 0x3d48, 0x3d49, 0x3d49, 0x3d49, 0x3d4a, - 0x3d4a, 0x3d4a, 0x3d4b, 0x3d4b, 0x3d4b, 0x3d4c, 0x3d4c, 0x3d4c, - 0x3d4d, 0x3d4d, 0x3d4d, 0x3d4e, 0x3d4e, 0x3d4e, 0x3d4f, 0x3d4f, - 0x3d4f, 0x3d50, 0x3d50, 0x3d50, 0x3d51, 0x3d51, 0x3d51, 0x3d52, - 0x3d52, 0x3d52, 0x3d53, 0x3d53, 0x3d53, 0x3d54, 0x3d54, 0x3d54, - 0x3d55, 0x3d55, 0x3d55, 0x3d56, 0x3d56, 0x3d56, 0x3d57, 0x3d57, - 0x3d57, 0x3d58, 0x3d58, 0x3d58, 0x3d59, 0x3d59, 0x3d59, 0x3d5a, - 0x3d5a, 0x3d5a, 0x3d5b, 0x3d5b, 0x3d5b, 0x3d5c, 0x3d5c, 0x3d5c, - 0x3d5d, 0x3d5d, 0x3d5d, 0x3d5e, 0x3d5e, 0x3d5e, 0x3d5f, 0x3d5f, - 0x3d5f, 0x3d60, 0x3d60, 0x3d60, 0x3d61, 0x3d61, 0x3d61, 0x3d62, - 0x3d62, 0x3d62, 0x3d63, 0x3d63, 0x3d63, 0x3d64, 0x3d64, 0x3d64, - 0x3d65, 0x3d65, 0x3d65, 0x3d66, 0x3d66, 0x3d66, 0x3d67, 0x3d67, - 0x3d67, 0x3d68, 0x3d68, 0x3d68, 0x3d69, 0x3d69, 0x3d69, 0x3d6a, - 0x3d6a, 0x3d6a, 0x3d6b, 0x3d6b, 0x3d6b, 0x3d6c, 0x3d6c, 0x3d6c, - 0x3d6d, 0x3d6d, 0x3d6d, 0x3d6e, 0x3d6e, 0x3d6e, 0x3d6f, 0x3d6f, - 0x3d6f, 0x3d70, 0x3d70, 0x3d70, 0x3d71, 0x3d71, 0x3d72, 0x3d72, - 0x3d72, 0x3d73, 0x3d73, 0x3d73, 0x3d74, 0x3d74, 0x3d74, 0x3d75, - 0x3d75, 0x3d75, 0x3d76, 0x3d76, 0x3d76, 0x3d77, 0x3d77, 0x3d77, - 0x3d78, 0x3d78, 0x3d78, 0x3d79, 0x3d79, 0x3d79, 0x3d7a, 0x3d7a, - 0x3d7a, 0x3d7b, 0x3d7b, 0x3d7b, 0x3d7c, 0x3d7c, 0x3d7c, 0x3d7d, - 0x3d7d, 0x3d7d, 0x3d7e, 0x3d7e, 0x3d7e, 0x3d7f, 0x3d7f, 0x3d80, - 0x3d80, 0x3d80, 0x3d81, 0x3d81, 0x3d81, 0x3d82, 0x3d82, 0x3d82, - 0x3d83, 0x3d83, 0x3d83, 0x3d84, 0x3d84, 0x3d84, 0x3d85, 0x3d85, - 0x3d85, 0x3d86, 0x3d86, 0x3d86, 0x3d87, 0x3d87, 0x3d87, 0x3d88, - 0x3d88, 0x3d88, 0x3d89, 0x3d89, 0x3d8a, 0x3d8a, 0x3d8a, 0x3d8b, - 0x3d8b, 0x3d8b, 0x3d8c, 0x3d8c, 0x3d8c, 0x3d8d, 0x3d8d, 0x3d8d, - 0x3d8e, 0x3d8e, 0x3d8e, 0x3d8f, 0x3d8f, 0x3d8f, 0x3d90, 0x3d90, - 0x3d90, 0x3d91, 0x3d91, 0x3d92, 0x3d92, 0x3d92, 0x3d93, 0x3d93, - 0x3d93, 0x3d94, 0x3d94, 0x3d94, 0x3d95, 0x3d95, 0x3d95, 0x3d96, - 0x3d96, 0x3d96, 0x3d97, 0x3d97, 0x3d97, 0x3d98, 0x3d98, 0x3d98, - 0x3d99, 0x3d99, 0x3d9a, 0x3d9a, 0x3d9a, 0x3d9b, 0x3d9b, 0x3d9b, - 0x3d9c, 0x3d9c, 0x3d9c, 0x3d9d, 0x3d9d, 0x3d9d, 0x3d9e, 0x3d9e, - 0x3d9e, 0x3d9f, 0x3d9f, 0x3d9f, 0x3da0, 0x3da0, 0x3da1, 0x3da1, - 0x3da1, 0x3da2, 0x3da2, 0x3da2, 0x3da3, 0x3da3, 0x3da3, 0x3da4, - 0x3da4, 0x3da4, 0x3da5, 0x3da5, 0x3da5, 0x3da6, 0x3da6, 0x3da7, - 0x3da7, 0x3da7, 0x3da8, 0x3da8, 0x3da8, 0x3da9, 0x3da9, 0x3da9, - 0x3daa, 0x3daa, 0x3daa, 0x3dab, 0x3dab, 0x3dab, 0x3dac, 0x3dac, - 0x3dad, 0x3dad, 0x3dad, 0x3dae, 0x3dae, 0x3dae, 0x3daf, 0x3daf, - 0x3daf, 0x3db0, 0x3db0, 0x3db0, 0x3db1, 0x3db1, 0x3db2, 0x3db2, - 0x3db2, 0x3db3, 0x3db3, 0x3db3, 0x3db4, 0x3db4, 0x3db4, 0x3db5, - 0x3db5, 0x3db5, 0x3db6, 0x3db6, 0x3db7, 0x3db7, 0x3db7, 0x3db8, - 0x3db8, 0x3db8, 0x3db9, 0x3db9, 0x3db9, 0x3dba, 0x3dba, 0x3dba, - 0x3dbb, 0x3dbb, 0x3dbc, 0x3dbc, 0x3dbc, 0x3dbd, 0x3dbd, 0x3dbd, - 0x3dbe, 0x3dbe, 0x3dbe, 0x3dbf, 0x3dbf, 0x3dbf, 0x3dc0, 0x3dc0, - 0x3dc1, 0x3dc1, 0x3dc1, 0x3dc2, 0x3dc2, 0x3dc2, 0x3dc3, 0x3dc3, - 0x3dc3, 0x3dc4, 0x3dc4, 0x3dc5, 0x3dc5, 0x3dc5, 0x3dc6, 0x3dc6, - 0x3dc6, 0x3dc7, 0x3dc7, 0x3dc7, 0x3dc8, 0x3dc8, 0x3dc8, 0x3dc9, - 0x3dc9, 0x3dca, 0x3dca, 0x3dca, 0x3dcb, 0x3dcb, 0x3dcb, 0x3dcc, - 0x3dcc, 0x3dcc, 0x3dcd, 0x3dcd, 0x3dce, 0x3dce, 0x3dce, 0x3dcf, - 0x3dcf, 0x3dcf, 0x3dd0, 0x3dd0, 0x3dd0, 0x3dd1, 0x3dd1, 0x3dd2, - 0x3dd2, 0x3dd2, 0x3dd3, 0x3dd3, 0x3dd3, 0x3dd4, 0x3dd4, 0x3dd4, - 0x3dd5, 0x3dd5, 0x3dd6, 0x3dd6, 0x3dd6, 0x3dd7, 0x3dd7, 0x3dd7, - 0x3dd8, 0x3dd8, 0x3dd8, 0x3dd9, 0x3dd9, 0x3dda, 0x3dda, 0x3dda, - 0x3ddb, 0x3ddb, 0x3ddb, 0x3ddc, 0x3ddc, 0x3ddc, 0x3ddd, 0x3ddd, - 0x3dde, 0x3dde, 0x3dde, 0x3ddf, 0x3ddf, 0x3ddf, 0x3de0, 0x3de0, - 0x3de1, 0x3de1, 0x3de1, 0x3de2, 0x3de2, 0x3de2, 0x3de3, 0x3de3, - 0x3de3, 0x3de4, 0x3de4, 0x3de5, 0x3de5, 0x3de5, 0x3de6, 0x3de6, - 0x3de6, 0x3de7, 0x3de7, 0x3de8, 0x3de8, 0x3de8, 0x3de9, 0x3de9, - 0x3de9, 0x3dea, 0x3dea, 0x3dea, 0x3deb, 0x3deb, 0x3dec, 0x3dec, - 0x3dec, 0x3ded, 0x3ded, 0x3ded, 0x3dee, 0x3dee, 0x3def, 0x3def, - 0x3def, 0x3df0, 0x3df0, 0x3df0, 0x3df1, 0x3df1, 0x3df2, 0x3df2, - 0x3df2, 0x3df3, 0x3df3, 0x3df3, 0x3df4, 0x3df4, 0x3df4, 0x3df5, - 0x3df5, 0x3df6, 0x3df6, 0x3df6, 0x3df7, 0x3df7, 0x3df7, 0x3df8, - 0x3df8, 0x3df9, 0x3df9, 0x3df9, 0x3dfa, 0x3dfa, 0x3dfa, 0x3dfb, - 0x3dfb, 0x3dfc, 0x3dfc, 0x3dfc, 0x3dfd, 0x3dfd, 0x3dfd, 0x3dfe, - 0x3dfe, 0x3dff, 0x3dff, 0x3dff, 0x3e00, 0x3e00, 0x3e00, 0x3e01, - 0x3e01, 0x3e02, 0x3e02, 0x3e02, 0x3e03, 0x3e03, 0x3e03, 0x3e04, - 0x3e04, 0x3e05, 0x3e05, 0x3e05, 0x3e06, 0x3e06, 0x3e06, 0x3e07, - 0x3e07, 0x3e08, 0x3e08, 0x3e08, 0x3e09, 0x3e09, 0x3e09, 0x3e0a, - 0x3e0a, 0x3e0b, 0x3e0b, 0x3e0b, 0x3e0c, 0x3e0c, 0x3e0d, 0x3e0d, - 0x3e0d, 0x3e0e, 0x3e0e, 0x3e0e, 0x3e0f, 0x3e0f, 0x3e10, 0x3e10, - 0x3e10, 0x3e11, 0x3e11, 0x3e11, 0x3e12, 0x3e12, 0x3e13, 0x3e13, - 0x3e13, 0x3e14, 0x3e14, 0x3e14, 0x3e15, 0x3e15, 0x3e16, 0x3e16, - 0x3e16, 0x3e17, 0x3e17, 0x3e18, 0x3e18, 0x3e18, 0x3e19, 0x3e19, - 0x3e19, 0x3e1a, 0x3e1a, 0x3e1b, 0x3e1b, 0x3e1b, 0x3e1c, 0x3e1c, - 0x3e1c, 0x3e1d, 0x3e1d, 0x3e1e, 0x3e1e, 0x3e1e, 0x3e1f, 0x3e1f, - 0x3e20, 0x3e20, 0x3e20, 0x3e21, 0x3e21, 0x3e21, 0x3e22, 0x3e22, - 0x3e23, 0x3e23, 0x3e23, 0x3e24, 0x3e24, 0x3e25, 0x3e25, 0x3e25, - 0x3e26, 0x3e26, 0x3e26, 0x3e27, 0x3e27, 0x3e28, 0x3e28, 0x3e28, - 0x3e29, 0x3e29, 0x3e2a, 0x3e2a, 0x3e2a, 0x3e2b, 0x3e2b, 0x3e2b, - 0x3e2c, 0x3e2c, 0x3e2d, 0x3e2d, 0x3e2d, 0x3e2e, 0x3e2e, 0x3e2f, - 0x3e2f, 0x3e2f, 0x3e30, 0x3e30, 0x3e30, 0x3e31, 0x3e31, 0x3e32, - 0x3e32, 0x3e32, 0x3e33, 0x3e33, 0x3e34, 0x3e34, 0x3e34, 0x3e35, - 0x3e35, 0x3e35, 0x3e36, 0x3e36, 0x3e37, 0x3e37, 0x3e37, 0x3e38, - 0x3e38, 0x3e39, 0x3e39, 0x3e39, 0x3e3a, 0x3e3a, 0x3e3b, 0x3e3b, - 0x3e3b, 0x3e3c, 0x3e3c, 0x3e3c, 0x3e3d, 0x3e3d, 0x3e3e, 0x3e3e, - 0x3e3e, 0x3e3f, 0x3e3f, 0x3e40, 0x3e40, 0x3e40, 0x3e41, 0x3e41, - 0x3e42, 0x3e42, 0x3e42, 0x3e43, 0x3e43, 0x3e44, 0x3e44, 0x3e44, - 0x3e45, 0x3e45, 0x3e45, 0x3e46, 0x3e46, 0x3e47, 0x3e47, 0x3e47, - 0x3e48, 0x3e48, 0x3e49, 0x3e49, 0x3e49, 0x3e4a, 0x3e4a, 0x3e4b, - 0x3e4b, 0x3e4b, 0x3e4c, 0x3e4c, 0x3e4d, 0x3e4d, 0x3e4d, 0x3e4e, - 0x3e4e, 0x3e4f, 0x3e4f, 0x3e4f, 0x3e50, 0x3e50, 0x3e50, 0x3e51, - 0x3e51, 0x3e52, 0x3e52, 0x3e52, 0x3e53, 0x3e53, 0x3e54, 0x3e54, - 0x3e54, 0x3e55, 0x3e55, 0x3e56, 0x3e56, 0x3e56, 0x3e57, 0x3e57, - 0x3e58, 0x3e58, 0x3e58, 0x3e59, 0x3e59, 0x3e5a, 0x3e5a, 0x3e5a, - 0x3e5b, 0x3e5b, 0x3e5c, 0x3e5c, 0x3e5c, 0x3e5d, 0x3e5d, 0x3e5e, - 0x3e5e, 0x3e5e, 0x3e5f, 0x3e5f, 0x3e60, 0x3e60, 0x3e60, 0x3e61, - 0x3e61, 0x3e62, 0x3e62, 0x3e62, 0x3e63, 0x3e63, 0x3e64, 0x3e64, - 0x3e64, 0x3e65, 0x3e65, 0x3e66, 0x3e66, 0x3e66, 0x3e67, 0x3e67, - 0x3e68, 0x3e68, 0x3e68, 0x3e69, 0x3e69, 0x3e6a, 0x3e6a, 0x3e6a, - 0x3e6b, 0x3e6b, 0x3e6c, 0x3e6c, 0x3e6c, 0x3e6d, 0x3e6d, 0x3e6e, - 0x3e6e, 0x3e6e, 0x3e6f, 0x3e6f, 0x3e70, 0x3e70, 0x3e70, 0x3e71, - 0x3e71, 0x3e72, 0x3e72, 0x3e72, 0x3e73, 0x3e73, 0x3e74, 0x3e74, - 0x3e74, 0x3e75, 0x3e75, 0x3e76, 0x3e76, 0x3e76, 0x3e77, 0x3e77, - 0x3e78, 0x3e78, 0x3e78, 0x3e79, 0x3e79, 0x3e7a, 0x3e7a, 0x3e7a, - 0x3e7b, 0x3e7b, 0x3e7c, 0x3e7c, 0x3e7c, 0x3e7d, 0x3e7d, 0x3e7e, - 0x3e7e, 0x3e7f, 0x3e7f, 0x3e7f, 0x3e80, 0x3e80, 0x3e81, 0x3e81, - 0x3e81, 0x3e82, 0x3e82, 0x3e83, 0x3e83, 0x3e83, 0x3e84, 0x3e84, - 0x3e85, 0x3e85, 0x3e85, 0x3e86, 0x3e86, 0x3e87, 0x3e87, 0x3e87, - 0x3e88, 0x3e88, 0x3e89, 0x3e89, 0x3e8a, 0x3e8a, 0x3e8a, 0x3e8b, - 0x3e8b, 0x3e8c, 0x3e8c, 0x3e8c, 0x3e8d, 0x3e8d, 0x3e8e, 0x3e8e, - 0x3e8e, 0x3e8f, 0x3e8f, 0x3e90, 0x3e90, 0x3e90, 0x3e91, 0x3e91, - 0x3e92, 0x3e92, 0x3e93, 0x3e93, 0x3e93, 0x3e94, 0x3e94, 0x3e95, - 0x3e95, 0x3e95, 0x3e96, 0x3e96, 0x3e97, 0x3e97, 0x3e97, 0x3e98, - 0x3e98, 0x3e99, 0x3e9a, 0x3e9b, 0x3e9c, 0x3e9c, 0x3e9d, 0x3e9e, - 0x3e9f, 0x3ea0, 0x3ea1, 0x3ea1, 0x3ea2, 0x3ea3, 0x3ea4, 0x3ea5, - 0x3ea6, 0x3ea6, 0x3ea7, 0x3ea8, 0x3ea9, 0x3eaa, 0x3eab, 0x3eab, - 0x3eac, 0x3ead, 0x3eae, 0x3eaf, 0x3eb0, 0x3eb0, 0x3eb1, 0x3eb2, - 0x3eb3, 0x3eb4, 0x3eb5, 0x3eb5, 0x3eb6, 0x3eb7, 0x3eb8, 0x3eb9, - 0x3eba, 0x3eba, 0x3ebb, 0x3ebc, 0x3ebd, 0x3ebe, 0x3ebf, 0x3ebf, - 0x3ec0, 0x3ec1, 0x3ec2, 0x3ec3, 0x3ec4, 0x3ec5, 0x3ec5, 0x3ec6, - 0x3ec7, 0x3ec8, 0x3ec9, 0x3eca, 0x3eca, 0x3ecb, 0x3ecc, 0x3ecd, - 0x3ece, 0x3ecf, 0x3ed0, 0x3ed0, 0x3ed1, 0x3ed2, 0x3ed3, 0x3ed4, - 0x3ed5, 0x3ed6, 0x3ed6, 0x3ed7, 0x3ed8, 0x3ed9, 0x3eda, 0x3edb, - 0x3edc, 0x3edc, 0x3edd, 0x3ede, 0x3edf, 0x3ee0, 0x3ee1, 0x3ee2, - 0x3ee2, 0x3ee3, 0x3ee4, 0x3ee5, 0x3ee6, 0x3ee7, 0x3ee8, 0x3ee8, - 0x3ee9, 0x3eea, 0x3eeb, 0x3eec, 0x3eed, 0x3eee, 0x3eef, 0x3eef, - 0x3ef0, 0x3ef1, 0x3ef2, 0x3ef3, 0x3ef4, 0x3ef5, 0x3ef5, 0x3ef6, - 0x3ef7, 0x3ef8, 0x3ef9, 0x3efa, 0x3efb, 0x3efc, 0x3efc, 0x3efd, - 0x3efe, 0x3eff, 0x3f00, 0x3f01, 0x3f02, 0x3f03, 0x3f03, 0x3f04, - 0x3f05, 0x3f06, 0x3f07, 0x3f08, 0x3f09, 0x3f0a, 0x3f0a, 0x3f0b, - 0x3f0c, 0x3f0d, 0x3f0e, 0x3f0f, 0x3f10, 0x3f11, 0x3f12, 0x3f12, - 0x3f13, 0x3f14, 0x3f15, 0x3f16, 0x3f17, 0x3f18, 0x3f19, 0x3f19, - 0x3f1a, 0x3f1b, 0x3f1c, 0x3f1d, 0x3f1e, 0x3f1f, 0x3f20, 0x3f21, - 0x3f21, 0x3f22, 0x3f23, 0x3f24, 0x3f25, 0x3f26, 0x3f27, 0x3f28, - 0x3f29, 0x3f2a, 0x3f2a, 0x3f2b, 0x3f2c, 0x3f2d, 0x3f2e, 0x3f2f, - 0x3f30, 0x3f31, 0x3f32, 0x3f32, 0x3f33, 0x3f34, 0x3f35, 0x3f36, - 0x3f37, 0x3f38, 0x3f39, 0x3f3a, 0x3f3b, 0x3f3c, 0x3f3c, 0x3f3d, - 0x3f3e, 0x3f3f, 0x3f40, 0x3f41, 0x3f42, 0x3f43, 0x3f44, 0x3f45, - 0x3f45, 0x3f46, 0x3f47, 0x3f48, 0x3f49, 0x3f4a, 0x3f4b, 0x3f4c, - 0x3f4d, 0x3f4e, 0x3f4f, 0x3f50, 0x3f50, 0x3f51, 0x3f52, 0x3f53, - 0x3f54, 0x3f55, 0x3f56, 0x3f57, 0x3f58, 0x3f59, 0x3f5a, 0x3f5b, - 0x3f5b, 0x3f5c, 0x3f5d, 0x3f5e, 0x3f5f, 0x3f60, 0x3f61, 0x3f62, - 0x3f63, 0x3f64, 0x3f65, 0x3f66, 0x3f66, 0x3f67, 0x3f68, 0x3f69, - 0x3f6a, 0x3f6b, 0x3f6c, 0x3f6d, 0x3f6e, 0x3f6f, 0x3f70, 0x3f71, - 0x3f72, 0x3f73, 0x3f73, 0x3f74, 0x3f75, 0x3f76, 0x3f77, 0x3f78, - 0x3f79, 0x3f7a, 0x3f7b, 0x3f7c, 0x3f7d, 0x3f7e, 0x3f7f, 0x3f80, - 0x3f81, 0x3f82, 0x3f82, 0x3f83, 0x3f84, 0x3f85, 0x3f86, 0x3f87, - 0x3f88, 0x3f89, 0x3f8a, 0x3f8b, 0x3f8c, 0x3f8d, 0x3f8e, 0x3f8f, - 0x3f90, 0x3f91, 0x3f92, 0x3f92, 0x3f93, 0x3f94, 0x3f95, 0x3f96, - 0x3f97, 0x3f98, 0x3f99, 0x3f9a, 0x3f9b, 0x3f9c, 0x3f9d, 0x3f9e, - 0x3f9f, 0x3fa0, 0x3fa1, 0x3fa2, 0x3fa3, 0x3fa4, 0x3fa5, 0x3fa5, - 0x3fa6, 0x3fa7, 0x3fa8, 0x3fa9, 0x3faa, 0x3fab, 0x3fac, 0x3fad, - 0x3fae, 0x3faf, 0x3fb0, 0x3fb1, 0x3fb2, 0x3fb3, 0x3fb4, 0x3fb5, - 0x3fb6, 0x3fb7, 0x3fb8, 0x3fb9, 0x3fba, 0x3fbb, 0x3fbc, 0x3fbd, - 0x3fbe, 0x3fbf, 0x3fbf, 0x3fc0, 0x3fc1, 0x3fc2, 0x3fc3, 0x3fc4, - 0x3fc5, 0x3fc6, 0x3fc7, 0x3fc8, 0x3fc9, 0x3fca, 0x3fcb, 0x3fcc, - 0x3fcd, 0x3fce, 0x3fcf, 0x3fd0, 0x3fd1, 0x3fd2, 0x3fd3, 0x3fd4, - 0x3fd5, 0x3fd6, 0x3fd7, 0x3fd8, 0x3fd9, 0x3fda, 0x3fdb, 0x3fdc, - 0x3fdd, 0x3fde, 0x3fdf, 0x3fe0, 0x3fe1, 0x3fe2, 0x3fe3, 0x3fe4, - 0x3fe5, 0x3fe6, 0x3fe7, 0x3fe8, 0x3fe9, 0x3fea, 0x3feb, 0x3fec, - 0x3fed, 0x3fee, 0x3fef, 0x3ff0, 0x3ff0, 0x3ff1, 0x3ff2, 0x3ff3, - 0x3ff4, 0x3ff5, 0x3ff6, 0x3ff7, 0x3ff8, 0x3ff9, 0x3ffa, 0x3ffb, - 0x3ffc, 0x3ffd, 0x3ffe, 0x3fff, 0x4000, 0x4001, 0x4001, 0x4002, - 0x4002, 0x4003, 0x4003, 0x4004, 0x4004, 0x4005, 0x4005, 0x4006, - 0x4006, 0x4007, 0x4007, 0x4008, 0x4008, 0x4009, 0x4009, 0x400a, - 0x400a, 0x400b, 0x400b, 0x400c, 0x400c, 0x400d, 0x400d, 0x400e, - 0x400e, 0x400f, 0x400f, 0x4010, 0x4010, 0x4011, 0x4011, 0x4012, - 0x4012, 0x4013, 0x4013, 0x4014, 0x4014, 0x4015, 0x4015, 0x4016, - 0x4016, 0x4017, 0x4017, 0x4018, 0x4019, 0x4019, 0x401a, 0x401a, - 0x401b, 0x401b, 0x401c, 0x401c, 0x401d, 0x401d, 0x401e, 0x401e, - 0x401f, 0x401f, 0x4020, 0x4020, 0x4021, 0x4021, 0x4022, 0x4022, - 0x4023, 0x4023, 0x4024, 0x4024, 0x4025, 0x4025, 0x4026, 0x4026, - 0x4027, 0x4027, 0x4028, 0x4028, 0x4029, 0x402a, 0x402a, 0x402b, - 0x402b, 0x402c, 0x402c, 0x402d, 0x402d, 0x402e, 0x402e, 0x402f, - 0x402f, 0x4030, 0x4030, 0x4031, 0x4031, 0x4032, 0x4032, 0x4033, - 0x4033, 0x4034, 0x4035, 0x4035, 0x4036, 0x4036, 0x4037, 0x4037, - 0x4038, 0x4038, 0x4039, 0x4039, 0x403a, 0x403a, 0x403b, 0x403b, - 0x403c, 0x403c, 0x403d, 0x403d, 0x403e, 0x403f, 0x403f, 0x4040, - 0x4040, 0x4041, 0x4041, 0x4042, 0x4042, 0x4043, 0x4043, 0x4044, - 0x4044, 0x4045, 0x4045, 0x4046, 0x4047, 0x4047, 0x4048, 0x4048, - 0x4049, 0x4049, 0x404a, 0x404a, 0x404b, 0x404b, 0x404c, 0x404c, - 0x404d, 0x404e, 0x404e, 0x404f, 0x404f, 0x4050, 0x4050, 0x4051, - 0x4051, 0x4052, 0x4052, 0x4053, 0x4053, 0x4054, 0x4055, 0x4055, - 0x4056, 0x4056, 0x4057, 0x4057, 0x4058, 0x4058, 0x4059, 0x4059, - 0x405a, 0x405a, 0x405b, 0x405c, 0x405c, 0x405d, 0x405d, 0x405e, - 0x405e, 0x405f, 0x405f, 0x4060, 0x4060, 0x4061, 0x4062, 0x4062, - 0x4063, 0x4063, 0x4064, 0x4064, 0x4065, 0x4065, 0x4066, 0x4067, - 0x4067, 0x4068, 0x4068, 0x4069, 0x4069, 0x406a, 0x406a, 0x406b, - 0x406b, 0x406c, 0x406d, 0x406d, 0x406e, 0x406e, 0x406f, 0x406f, - 0x4070, 0x4070, 0x4071, 0x4072, 0x4072, 0x4073, 0x4073, 0x4074, - 0x4074, 0x4075, 0x4075, 0x4076, 0x4077, 0x4077, 0x4078, 0x4078, - 0x4079, 0x4079, 0x407a, 0x407b, 0x407b, 0x407c, 0x407c, 0x407d, - 0x407d, 0x407e, 0x407e, 0x407f, 0x4080, 0x4080, 0x4081, 0x4081, - 0x4082, 0x4082, 0x4083, 0x4084, 0x4084, 0x4085, 0x4085, 0x4086, - 0x4086, 0x4087, 0x4087, 0x4088, 0x4089, 0x4089, 0x408a, 0x408a, - 0x408b, 0x408b, 0x408c, 0x408d, 0x408d, 0x408e, 0x408e, 0x408f, - 0x408f, 0x4090, 0x4091, 0x4091, 0x4092, 0x4092, 0x4093, 0x4093, - 0x4094, 0x4095, 0x4095, 0x4096, 0x4096, 0x4097, 0x4097, 0x4098, - 0x4099, 0x4099, 0x409a, 0x409a, 0x409b, 0x409b, 0x409c, 0x409d, - 0x409d, 0x409e, 0x409e, 0x409f, 0x409f, 0x40a0, 0x40a1, 0x40a1, - 0x40a2, 0x40a2, 0x40a3, 0x40a4, 0x40a4, 0x40a5, 0x40a5, 0x40a6, - 0x40a6, 0x40a7, 0x40a8, 0x40a8, 0x40a9, 0x40a9, 0x40aa, 0x40ab, - 0x40ab, 0x40ac, 0x40ac, 0x40ad, 0x40ad, 0x40ae, 0x40af, 0x40af, - 0x40b0, 0x40b0, 0x40b1, 0x40b2, 0x40b2, 0x40b3, 0x40b3, 0x40b4, - 0x40b4, 0x40b5, 0x40b6, 0x40b6, 0x40b7, 0x40b7, 0x40b8, 0x40b9, - 0x40b9, 0x40ba, 0x40ba, 0x40bb, 0x40bc, 0x40bc, 0x40bd, 0x40bd, - 0x40be, 0x40bf, 0x40bf, 0x40c0, 0x40c0, 0x40c1, 0x40c1, 0x40c2, - 0x40c3, 0x40c3, 0x40c4, 0x40c4, 0x40c5, 0x40c6, 0x40c6, 0x40c7, - 0x40c7, 0x40c8, 0x40c9, 0x40c9, 0x40ca, 0x40ca, 0x40cb, 0x40cc, - 0x40cc, 0x40cd, 0x40cd, 0x40ce, 0x40cf, 0x40cf, 0x40d0, 0x40d0, - 0x40d1, 0x40d2, 0x40d2, 0x40d3, 0x40d3, 0x40d4, 0x40d5, 0x40d5, - 0x40d6, 0x40d6, 0x40d7, 0x40d8, 0x40d8, 0x40d9, 0x40d9, 0x40da, - 0x40db, 0x40db, 0x40dc, 0x40dd, 0x40dd, 0x40de, 0x40de, 0x40df, - 0x40e0, 0x40e0, 0x40e1, 0x40e1, 0x40e2, 0x40e3, 0x40e3, 0x40e4, - 0x40e4, 0x40e5, 0x40e6, 0x40e6, 0x40e7, 0x40e8, 0x40e8, 0x40e9, - 0x40e9, 0x40ea, 0x40eb, 0x40eb, 0x40ec, 0x40ec, 0x40ed, 0x40ee, - 0x40ee, 0x40ef, 0x40f0, 0x40f0, 0x40f1, 0x40f1, 0x40f2, 0x40f3, - 0x40f3, 0x40f4, 0x40f4, 0x40f5, 0x40f6, 0x40f6, 0x40f7, 0x40f8, - 0x40f8, 0x40f9, 0x40f9, 0x40fa, 0x40fb, 0x40fb, 0x40fc, 0x40fd, - 0x40fd, 0x40fe, 0x40fe, 0x40ff, 0x4100, 0x4100, 0x4101, 0x4102, - 0x4102, 0x4103, 0x4103, 0x4104, 0x4105, 0x4105, 0x4106, 0x4107, - 0x4107, 0x4108, 0x4108, 0x4109, 0x410a, 0x410a, 0x410b, 0x410c, - 0x410c, 0x410d, 0x410d, 0x410e, 0x410f, 0x410f, 0x4110, 0x4111, - 0x4111, 0x4112, 0x4113, 0x4113, 0x4114, 0x4114, 0x4115, 0x4116, - 0x4116, 0x4117, 0x4118, 0x4118, 0x4119, 0x411a, 0x411a, 0x411b, - 0x411b, 0x411c, 0x411d, 0x411d, 0x411e, 0x411f, 0x411f, 0x4120, - 0x4121, 0x4121, 0x4122, 0x4122, 0x4123, 0x4124, 0x4124, 0x4125, - 0x4126, 0x4126, 0x4127, 0x4128, 0x4128, 0x4129, 0x412a, 0x412a, - 0x412b, 0x412b, 0x412c, 0x412d, 0x412d, 0x412e, 0x412f, 0x412f, - 0x4130, 0x4131, 0x4131, 0x4132, 0x4133, 0x4133, 0x4134, 0x4135, - 0x4135, 0x4136, 0x4137, 0x4137, 0x4138, 0x4138, 0x4139, 0x413a, - 0x413a, 0x413b, 0x413c, 0x413c, 0x413d, 0x413e, 0x413e, 0x413f, - 0x4140, 0x4140, 0x4141, 0x4142, 0x4142, 0x4143, 0x4144, 0x4144, - 0x4145, 0x4146, 0x4146, 0x4147, 0x4148, 0x4148, 0x4149, 0x414a, - 0x414a, 0x414b, 0x414c, 0x414c, 0x414d, 0x414e, 0x414e, 0x414f, - 0x4150, 0x4150, 0x4151, 0x4152, 0x4152, 0x4153, 0x4154, 0x4154, - 0x4155, 0x4156, 0x4156, 0x4157, 0x4158, 0x4158, 0x4159, 0x415a, - 0x415a, 0x415b, 0x415c, 0x415c, 0x415d, 0x415e, 0x415e, 0x415f, - 0x4160, 0x4160, 0x4161, 0x4162, 0x4162, 0x4163, 0x4164, 0x4164, - 0x4165, 0x4166, 0x4166, 0x4167, 0x4168, 0x4168, 0x4169, 0x416a, - 0x416a, 0x416b, 0x416c, 0x416c, 0x416d, 0x416e, 0x416e, 0x416f, - 0x4170, 0x4171, 0x4172, 0x4174, 0x4175, 0x4177, 0x4178, 0x4179, - 0x417b, 0x417c, 0x417d, 0x417f, 0x4180, 0x4182, 0x4183, 0x4184, - 0x4186, 0x4187, 0x4188, 0x418a, 0x418b, 0x418d, 0x418e, 0x418f, - 0x4191, 0x4192, 0x4194, 0x4195, 0x4196, 0x4198, 0x4199, 0x419b, - 0x419c, 0x419d, 0x419f, 0x41a0, 0x41a2, 0x41a3, 0x41a4, 0x41a6, - 0x41a7, 0x41a9, 0x41aa, 0x41ab, 0x41ad, 0x41ae, 0x41b0, 0x41b1, - 0x41b3, 0x41b4, 0x41b5, 0x41b7, 0x41b8, 0x41ba, 0x41bb, 0x41bd, - 0x41be, 0x41bf, 0x41c1, 0x41c2, 0x41c4, 0x41c5, 0x41c7, 0x41c8, - 0x41ca, 0x41cb, 0x41cc, 0x41ce, 0x41cf, 0x41d1, 0x41d2, 0x41d4, - 0x41d5, 0x41d7, 0x41d8, 0x41da, 0x41db, 0x41dc, 0x41de, 0x41df, - 0x41e1, 0x41e2, 0x41e4, 0x41e5, 0x41e7, 0x41e8, 0x41ea, 0x41eb, - 0x41ed, 0x41ee, 0x41f0, 0x41f1, 0x41f3, 0x41f4, 0x41f6, 0x41f7, - 0x41f9, 0x41fa, 0x41fc, 0x41fd, 0x41ff, 0x4200, 0x4202, 0x4203, - 0x4205, 0x4206, 0x4208, 0x4209, 0x420b, 0x420c, 0x420e, 0x420f, - 0x4211, 0x4212, 0x4214, 0x4215, 0x4217, 0x4218, 0x421a, 0x421b, - 0x421d, 0x421e, 0x4220, 0x4221, 0x4223, 0x4224, 0x4226, 0x4228, - 0x4229, 0x422b, 0x422c, 0x422e, 0x422f, 0x4231, 0x4232, 0x4234, - 0x4235, 0x4237, 0x4239, 0x423a, 0x423c, 0x423d, 0x423f, 0x4240, - 0x4242, 0x4243, 0x4245, 0x4247, 0x4248, 0x424a, 0x424b, 0x424d, - 0x424e, 0x4250, 0x4252, 0x4253, 0x4255, 0x4256, 0x4258, 0x425a, - 0x425b, 0x425d, 0x425e, 0x4260, 0x4262, 0x4263, 0x4265, 0x4266, - 0x4268, 0x4269, 0x426b, 0x426d, 0x426e, 0x4270, 0x4272, 0x4273, - 0x4275, 0x4276, 0x4278, 0x427a, 0x427b, 0x427d, 0x427e, 0x4280, - 0x4282, 0x4283, 0x4285, 0x4287, 0x4288, 0x428a, 0x428c, 0x428d, - 0x428f, 0x4290, 0x4292, 0x4294, 0x4295, 0x4297, 0x4299, 0x429a, - 0x429c, 0x429e, 0x429f, 0x42a1, 0x42a3, 0x42a4, 0x42a6, 0x42a8, - 0x42a9, 0x42ab, 0x42ad, 0x42ae, 0x42b0, 0x42b2, 0x42b3, 0x42b5, - 0x42b7, 0x42b8, 0x42ba, 0x42bc, 0x42bd, 0x42bf, 0x42c1, 0x42c2, - 0x42c4, 0x42c6, 0x42c7, 0x42c9, 0x42cb, 0x42cd, 0x42ce, 0x42d0, - 0x42d2, 0x42d3, 0x42d5, 0x42d7, 0x42d8, 0x42da, 0x42dc, 0x42de, - 0x42df, 0x42e1, 0x42e3, 0x42e5, 0x42e6, 0x42e8, 0x42ea, 0x42eb, - 0x42ed, 0x42ef, 0x42f1, 0x42f2, 0x42f4, 0x42f6, 0x42f8, 0x42f9, - 0x42fb, 0x42fd, 0x42ff, 0x4300, 0x4302, 0x4304, 0x4306, 0x4307, - 0x4309, 0x430b, 0x430d, 0x430e, 0x4310, 0x4312, 0x4314, 0x4315, - 0x4317, 0x4319, 0x431b, 0x431d, 0x431e, 0x4320, 0x4322, 0x4324, - 0x4325, 0x4327, 0x4329, 0x432b, 0x432d, 0x432e, 0x4330, 0x4332, - 0x4334, 0x4336, 0x4337, 0x4339, 0x433b, 0x433d, 0x433f, 0x4340, - 0x4342, 0x4344, 0x4346, 0x4348, 0x434a, 0x434b, 0x434d, 0x434f, - 0x4351, 0x4353, 0x4354, 0x4356, 0x4358, 0x435a, 0x435c, 0x435e, - 0x4360, 0x4361, 0x4363, 0x4365, 0x4367, 0x4369, 0x436b, 0x436c, - 0x436e, 0x4370, 0x4372, 0x4374, 0x4376, 0x4378, 0x4379, 0x437b, - 0x437d, 0x437f, 0x4381, 0x4383, 0x4385, 0x4387, 0x4388, 0x438a, - 0x438c, 0x438e, 0x4390, 0x4392, 0x4394, 0x4396, 0x4398, 0x439a, - 0x439b, 0x439d, 0x439f, 0x43a1, 0x43a3, 0x43a5, 0x43a7, 0x43a9, - 0x43ab, 0x43ad, 0x43af, 0x43b0, 0x43b2, 0x43b4, 0x43b6, 0x43b8, - 0x43ba, 0x43bc, 0x43be, 0x43c0, 0x43c2, 0x43c4, 0x43c6, 0x43c8, - 0x43ca, 0x43cc, 0x43ce, 0x43cf, 0x43d1, 0x43d3, 0x43d5, 0x43d7, - 0x43d9, 0x43db, 0x43dd, 0x43df, 0x43e1, 0x43e3, 0x43e5, 0x43e7, - 0x43e9, 0x43eb, 0x43ed, 0x43ef, 0x43f1, 0x43f3, 0x43f5, 0x43f7, - 0x43f9, 0x43fb, 0x43fd, 0x43ff, 0x4400, 0x4401, 0x4402, 0x4403, - 0x4404, 0x4405, 0x4406, 0x4407, 0x4408, 0x4409, 0x440a, 0x440b, - 0x440d, 0x440e, 0x440f, 0x4410, 0x4411, 0x4412, 0x4413, 0x4414, - 0x4415, 0x4416, 0x4417, 0x4418, 0x4419, 0x441a, 0x441b, 0x441c, - 0x441d, 0x441e, 0x441f, 0x4420, 0x4421, 0x4422, 0x4423, 0x4424, - 0x4425, 0x4426, 0x4427, 0x4428, 0x4429, 0x442a, 0x442b, 0x442c, - 0x442d, 0x442e, 0x4430, 0x4431, 0x4432, 0x4433, 0x4434, 0x4435, - 0x4436, 0x4437, 0x4438, 0x4439, 0x443a, 0x443b, 0x443c, 0x443d, - 0x443e, 0x443f, 0x4440, 0x4441, 0x4443, 0x4444, 0x4445, 0x4446, - 0x4447, 0x4448, 0x4449, 0x444a, 0x444b, 0x444c, 0x444d, 0x444e, - 0x444f, 0x4450, 0x4452, 0x4453, 0x4454, 0x4455, 0x4456, 0x4457, - 0x4458, 0x4459, 0x445a, 0x445b, 0x445c, 0x445d, 0x445f, 0x4460, - 0x4461, 0x4462, 0x4463, 0x4464, 0x4465, 0x4466, 0x4467, 0x4468, - 0x446a, 0x446b, 0x446c, 0x446d, 0x446e, 0x446f, 0x4470, 0x4471, - 0x4472, 0x4473, 0x4475, 0x4476, 0x4477, 0x4478, 0x4479, 0x447a, - 0x447b, 0x447c, 0x447e, 0x447f, 0x4480, 0x4481, 0x4482, 0x4483, - 0x4484, 0x4485, 0x4487, 0x4488, 0x4489, 0x448a, 0x448b, 0x448c, - 0x448d, 0x448f, 0x4490, 0x4491, 0x4492, 0x4493, 0x4494, 0x4495, - 0x4497, 0x4498, 0x4499, 0x449a, 0x449b, 0x449c, 0x449d, 0x449f, - 0x44a0, 0x44a1, 0x44a2, 0x44a3, 0x44a4, 0x44a6, 0x44a7, 0x44a8, - 0x44a9, 0x44aa, 0x44ab, 0x44ad, 0x44ae, 0x44af, 0x44b0, 0x44b1, - 0x44b2, 0x44b4, 0x44b5, 0x44b6, 0x44b7, 0x44b8, 0x44b9, 0x44bb, - 0x44bc, 0x44bd, 0x44be, 0x44bf, 0x44c1, 0x44c2, 0x44c3, 0x44c4, - 0x44c5, 0x44c7, 0x44c8, 0x44c9, 0x44ca, 0x44cb, 0x44cc, 0x44ce, - 0x44cf, 0x44d0, 0x44d1, 0x44d2, 0x44d4, 0x44d5, 0x44d6, 0x44d7, - 0x44d9, 0x44da, 0x44db, 0x44dc, 0x44dd, 0x44df, 0x44e0, 0x44e1, - 0x44e2, 0x44e3, 0x44e5, 0x44e6, 0x44e7, 0x44e8, 0x44ea, 0x44eb, - 0x44ec, 0x44ed, 0x44ef, 0x44f0, 0x44f1, 0x44f2, 0x44f3, 0x44f5, - 0x44f6, 0x44f7, 0x44f8, 0x44fa, 0x44fb, 0x44fc, 0x44fd, 0x44ff, - 0x4500, 0x4501, 0x4502, 0x4504, 0x4505, 0x4506, 0x4507, 0x4509, - 0x450a, 0x450b, 0x450c, 0x450e, 0x450f, 0x4510, 0x4512, 0x4513, - 0x4514, 0x4515, 0x4517, 0x4518, 0x4519, 0x451a, 0x451c, 0x451d, - 0x451e, 0x4520, 0x4521, 0x4522, 0x4523, 0x4525, 0x4526, 0x4527, - 0x4529, 0x452a, 0x452b, 0x452c, 0x452e, 0x452f, 0x4530, 0x4532, - 0x4533, 0x4534, 0x4536, 0x4537, 0x4538, 0x4539, 0x453b, 0x453c, - 0x453d, 0x453f, 0x4540, 0x4541, 0x4543, 0x4544, 0x4545, 0x4547, - 0x4548, 0x4549, 0x454b, 0x454c, 0x454d, 0x454e, 0x4550, 0x4551, - 0x4552, 0x4554, 0x4555, 0x4556, 0x4558, 0x4559, 0x455a, 0x455c, - 0x455d, 0x455e, 0x4560, 0x4561, 0x4563, 0x4564, 0x4565, 0x4567, - 0x4568, 0x4569, 0x456b, 0x456c, 0x456d, 0x456f, 0x4570, 0x4571, - 0x4573, 0x4574, 0x4576, 0x4577, 0x4578, 0x457a, 0x457b, 0x457c, - 0x457e, 0x457f, 0x4580, 0x4582, 0x4583, 0x4585, 0x4586, 0x4587, - 0x4589, 0x458a, 0x458c, 0x458d, 0x458e, 0x4590, 0x4591, 0x4592, - 0x4594, 0x4595, 0x4597, 0x4598, 0x4599, 0x459b, 0x459c, 0x459e, - 0x459f, 0x45a0, 0x45a2, 0x45a3, 0x45a5, 0x45a6, 0x45a8, 0x45a9, - 0x45aa, 0x45ac, 0x45ad, 0x45af, 0x45b0, 0x45b1, 0x45b3, 0x45b4, - 0x45b6, 0x45b7, 0x45b9, 0x45ba, 0x45bb, 0x45bd, 0x45be, 0x45c0, - 0x45c1, 0x45c3, 0x45c4, 0x45c6, 0x45c7, 0x45c8, 0x45ca, 0x45cb, - 0x45cd, 0x45ce, 0x45d0, 0x45d1, 0x45d3, 0x45d4, 0x45d5, 0x45d7, - 0x45d8, 0x45da, 0x45db, 0x45dd, 0x45de, 0x45e0, 0x45e1, 0x45e3, - 0x45e4, 0x45e6, 0x45e7, 0x45e9, 0x45ea, 0x45eb, 0x45ed, 0x45ee, - 0x45f0, 0x45f1, 0x45f3, 0x45f4, 0x45f6, 0x45f7, 0x45f9, 0x45fa, - 0x45fc, 0x45fd, 0x45ff, 0x4600, 0x4602, 0x4603, 0x4605, 0x4606, - 0x4608, 0x4609, 0x460b, 0x460c, 0x460e, 0x460f, 0x4611, 0x4612, - 0x4614, 0x4616, 0x4617, 0x4619, 0x461a, 0x461c, 0x461d, 0x461f, - 0x4620, 0x4622, 0x4623, 0x4625, 0x4626, 0x4628, 0x4629, 0x462b, - 0x462c, 0x462e, 0x4630, 0x4631, 0x4633, 0x4634, 0x4636, 0x4637, - 0x4639, 0x463a, 0x463c, 0x463e, 0x463f, 0x4641, 0x4642, 0x4644, - 0x4645, 0x4647, 0x4649, 0x464a, 0x464c, 0x464d, 0x464f, 0x4650, - 0x4652, 0x4654, 0x4655, 0x4657, 0x4658, 0x465a, 0x465b, 0x465d, - 0x465f, 0x4660, 0x4662, 0x4663, 0x4665, 0x4667, 0x4668, 0x466a, - 0x466b, 0x466d, 0x466f, 0x4670, 0x4672, 0x4673, 0x4675, 0x4677, - 0x4678, 0x467a, 0x467c, 0x467d, 0x467f, 0x4680, 0x4682, 0x4684, - 0x4685, 0x4687, 0x4689, 0x468a, 0x468c, 0x468e, 0x468f, 0x4691, - 0x4692, 0x4694, 0x4696, 0x4697, 0x4699, 0x469b, 0x469c, 0x469e, - 0x46a0, 0x46a1, 0x46a3, 0x46a5, 0x46a6, 0x46a8, 0x46aa, 0x46ab, - 0x46ad, 0x46af, 0x46b0, 0x46b2, 0x46b4, 0x46b5, 0x46b7, 0x46b9, - 0x46ba, 0x46bc, 0x46be, 0x46bf, 0x46c1, 0x46c3, 0x46c4, 0x46c6, - 0x46c8, 0x46ca, 0x46cb, 0x46cd, 0x46cf, 0x46d0, 0x46d2, 0x46d4, - 0x46d5, 0x46d7, 0x46d9, 0x46db, 0x46dc, 0x46de, 0x46e0, 0x46e1, - 0x46e3, 0x46e5, 0x46e7, 0x46e8, 0x46ea, 0x46ec, 0x46ee, 0x46ef, - 0x46f1, 0x46f3, 0x46f4, 0x46f6, 0x46f8, 0x46fa, 0x46fb, 0x46fd, - 0x46ff, 0x4701, 0x4702, 0x4704, 0x4706, 0x4708, 0x4709, 0x470b, - 0x470d, 0x470f, 0x4711, 0x4712, 0x4714, 0x4716, 0x4718, 0x4719, - 0x471b, 0x471d, 0x471f, 0x4720, 0x4722, 0x4724, 0x4726, 0x4728, - 0x4729, 0x472b, 0x472d, 0x472f, 0x4731, 0x4732, 0x4734, 0x4736, - 0x4738, 0x473a, 0x473b, 0x473d, 0x473f, 0x4741, 0x4743, 0x4744, - 0x4746, 0x4748, 0x474a, 0x474c, 0x474e, 0x474f, 0x4751, 0x4753, - 0x4755, 0x4757, 0x4759, 0x475a, 0x475c, 0x475e, 0x4760, 0x4762, - 0x4764, 0x4767, 0x476b, 0x476f, 0x4772, 0x4776, 0x477a, 0x477e, - 0x4781, 0x4785, 0x4789, 0x478d, 0x4790, 0x4794, 0x4798, 0x479c, - 0x47a0, 0x47a3, 0x47a7, 0x47ab, 0x47af, 0x47b3, 0x47b7, 0x47bb, - 0x47be, 0x47c2, 0x47c6, 0x47ca, 0x47ce, 0x47d2, 0x47d6, 0x47da, - 0x47de, 0x47e2, 0x47e5, 0x47e9, 0x47ed, 0x47f1, 0x47f5, 0x47f9, - 0x47fd, 0x4801, 0x4803, 0x4805, 0x4807, 0x4809, 0x480b, 0x480d, - 0x480f, 0x4811, 0x4813, 0x4815, 0x4817, 0x4819, 0x481b, 0x481d, - 0x481f, 0x4821, 0x4823, 0x4825, 0x4827, 0x4829, 0x482c, 0x482e, - 0x4830, 0x4832, 0x4834, 0x4836, 0x4838, 0x483a, 0x483c, 0x483e, - 0x4841, 0x4843, 0x4845, 0x4847, 0x4849, 0x484b, 0x484d, 0x4850, - 0x4852, 0x4854, 0x4856, 0x4858, 0x485a, 0x485d, 0x485f, 0x4861, - 0x4863, 0x4865, 0x4868, 0x486a, 0x486c, 0x486e, 0x4870, 0x4873, - 0x4875, 0x4877, 0x4879, 0x487c, 0x487e, 0x4880, 0x4882, 0x4885, - 0x4887, 0x4889, 0x488b, 0x488e, 0x4890, 0x4892, 0x4894, 0x4897, - 0x4899, 0x489b, 0x489e, 0x48a0, 0x48a2, 0x48a5, 0x48a7, 0x48a9, - 0x48ac, 0x48ae, 0x48b0, 0x48b3, 0x48b5, 0x48b7, 0x48ba, 0x48bc, - 0x48be, 0x48c1, 0x48c3, 0x48c6, 0x48c8, 0x48ca, 0x48cd, 0x48cf, - 0x48d2, 0x48d4, 0x48d6, 0x48d9, 0x48db, 0x48de, 0x48e0, 0x48e3, - 0x48e5, 0x48e7, 0x48ea, 0x48ec, 0x48ef, 0x48f1, 0x48f4, 0x48f6, - 0x48f9, 0x48fb, 0x48fe, 0x4900, 0x4903, 0x4905, 0x4908, 0x490a, - 0x490d, 0x490f, 0x4912, 0x4914, 0x4917, 0x4919, 0x491c, 0x491f, - 0x4921, 0x4924, 0x4926, 0x4929, 0x492b, 0x492e, 0x4931, 0x4933, - 0x4936, 0x4938, 0x493b, 0x493e, 0x4940, 0x4943, 0x4946, 0x4948, - 0x494b, 0x494d, 0x4950, 0x4953, 0x4955, 0x4958, 0x495b, 0x495d, - 0x4960, 0x4963, 0x4966, 0x4968, 0x496b, 0x496e, 0x4970, 0x4973, - 0x4976, 0x4979, 0x497b, 0x497e, 0x4981, 0x4984, 0x4986, 0x4989, - 0x498c, 0x498f, 0x4991, 0x4994, 0x4997, 0x499a, 0x499d, 0x499f, - 0x49a2, 0x49a5, 0x49a8, 0x49ab, 0x49ad, 0x49b0, 0x49b3, 0x49b6, - 0x49b9, 0x49bc, 0x49bf, 0x49c1, 0x49c4, 0x49c7, 0x49ca, 0x49cd, - 0x49d0, 0x49d3, 0x49d6, 0x49d9, 0x49dc, 0x49df, 0x49e1, 0x49e4, - 0x49e7, 0x49ea, 0x49ed, 0x49f0, 0x49f3, 0x49f6, 0x49f9, 0x49fc, - 0x49ff, 0x4a02, 0x4a05, 0x4a08, 0x4a0b, 0x4a0e, 0x4a11, 0x4a14, - 0x4a17, 0x4a1a, 0x4a1d, 0x4a21, 0x4a24, 0x4a27, 0x4a2a, 0x4a2d, - 0x4a30, 0x4a33, 0x4a36, 0x4a39, 0x4a3c, 0x4a3f, 0x4a43, 0x4a46, - 0x4a49, 0x4a4c, 0x4a4f, 0x4a52, 0x4a55, 0x4a59, 0x4a5c, 0x4a5f, - 0x4a62, 0x4a65, 0x4a69, 0x4a6c, 0x4a6f, 0x4a72, 0x4a75, 0x4a79, - 0x4a7c, 0x4a7f, 0x4a82, 0x4a86, 0x4a89, 0x4a8c, 0x4a8f, 0x4a93, - 0x4a96, 0x4a99, 0x4a9d, 0x4aa0, 0x4aa3, 0x4aa7, 0x4aaa, 0x4aad, - 0x4ab1, 0x4ab4, 0x4ab7, 0x4abb, 0x4abe, 0x4ac1, 0x4ac5, 0x4ac8, - 0x4acc, 0x4acf, 0x4ad2, 0x4ad6, 0x4ad9, 0x4add, 0x4ae0, 0x4ae4, - 0x4ae7, 0x4aea, 0x4aee, 0x4af1, 0x4af5, 0x4af8, 0x4afc, 0x4aff, - 0x4b03, 0x4b06, 0x4b0a, 0x4b0d, 0x4b11, 0x4b14, 0x4b18, 0x4b1c, - 0x4b1f, 0x4b23, 0x4b26, 0x4b2a, 0x4b2d, 0x4b31, 0x4b35, 0x4b38, - 0x4b3c, 0x4b3f, 0x4b43, 0x4b47, 0x4b4a, 0x4b4e, 0x4b52, 0x4b55, - 0x4b59, 0x4b5d, 0x4b60, 0x4b64, 0x4b68, 0x4b6b, 0x4b6f, 0x4b73, - 0x4b77, 0x4b7a, 0x4b7e, 0x4b82, 0x4b86, 0x4b89, 0x4b8d, 0x4b91, - 0x4b95, 0x4b98, 0x4b9c, 0x4ba0, 0x4ba4, 0x4ba8, 0x4bac, 0x4baf, - 0x4bb3, 0x4bb7, 0x4bbb, 0x4bbf, 0x4bc3, 0x4bc7, 0x4bca, 0x4bce, - 0x4bd2, 0x4bd6, 0x4bda, 0x4bde, 0x4be2, 0x4be6, 0x4bea, 0x4bee, - 0x4bf2, 0x4bf6, 0x4bfa, 0x4bfe, 0x4c01, 0x4c03, 0x4c05, 0x4c07, - 0x4c09, 0x4c0b, 0x4c0d, 0x4c0f, 0x4c11, 0x4c13, 0x4c15, 0x4c17, - 0x4c19, 0x4c1b, 0x4c1d, 0x4c1f, 0x4c21, 0x4c23, 0x4c26, 0x4c28, - 0x4c2a, 0x4c2c, 0x4c2e, 0x4c30, 0x4c32, 0x4c34, 0x4c36, 0x4c38, - 0x4c3a, 0x4c3d, 0x4c3f, 0x4c41, 0x4c43, 0x4c45, 0x4c47, 0x4c49, - 0x4c4c, 0x4c4e, 0x4c50, 0x4c52, 0x4c54, 0x4c56, 0x4c58, 0x4c5b, - 0x4c5d, 0x4c5f, 0x4c61, 0x4c63, 0x4c66, 0x4c68, 0x4c6a, 0x4c6c, - 0x4c6e, 0x4c71, 0x4c73, 0x4c75, 0x4c77, 0x4c7a, 0x4c7c, 0x4c7e, - 0x4c80, 0x4c83, 0x4c85, 0x4c87, 0x4c89, 0x4c8c, 0x4c8e, 0x4c90, - 0x4c92, 0x4c95, 0x4c97, 0x4c99, 0x4c9c, 0x4c9e, 0x4ca0, 0x4ca3, - 0x4ca5, 0x4ca7, 0x4caa, 0x4cac, 0x4cae, 0x4cb1, 0x4cb3, 0x4cb5, - 0x4cb8, 0x4cba, 0x4cbc, 0x4cbf, 0x4cc1, 0x4cc3, 0x4cc6, 0x4cc8, - 0x4ccb, 0x4ccd, 0x4ccf, 0x4cd2, 0x4cd4, 0x4cd7, 0x4cd9, 0x4cdb, - 0x4cde, 0x4ce0, 0x4ce3, 0x4ce5, 0x4ce8, 0x4cea, 0x4ced, 0x4cef, - 0x4cf2, 0x4cf4, 0x4cf6, 0x4cf9, 0x4cfb, 0x4cfe, 0x4d00, 0x4d03, - 0x4d05, 0x4d08, 0x4d0b, 0x4d0d, 0x4d10, 0x4d12, 0x4d15, 0x4d17, - 0x4d1a, 0x4d1c, 0x4d1f, 0x4d21, 0x4d24, 0x4d27, 0x4d29, 0x4d2c, - 0x4d2e, 0x4d31, 0x4d33, 0x4d36, 0x4d39, 0x4d3b, 0x4d3e, 0x4d41, - 0x4d43, 0x4d46, 0x4d48, 0x4d4b, 0x4d4e, 0x4d50, 0x4d53, 0x4d56, - 0x4d58, 0x4d5b, 0x4d5e, 0x4d60, 0x4d63, 0x4d66, 0x4d69, 0x4d6b, - 0x4d6e, 0x4d71, 0x4d73, 0x4d76, 0x4d79, 0x4d7c, 0x4d7e, 0x4d81, - 0x4d84, 0x4d87, 0x4d89, 0x4d8c, 0x4d8f, 0x4d92, 0x4d94, 0x4d97, - 0x4d9a, 0x4d9d, 0x4da0, 0x4da2, 0x4da5, 0x4da8, 0x4dab, 0x4dae, - 0x4db1, 0x4db3, 0x4db6, 0x4db9, 0x4dbc, 0x4dbf, 0x4dc2, 0x4dc5, - 0x4dc8, 0x4dca, 0x4dcd, 0x4dd0, 0x4dd3, 0x4dd6, 0x4dd9, 0x4ddc, - 0x4ddf, 0x4de2, 0x4de5, 0x4de8, 0x4deb, 0x4dee, 0x4df1, 0x4df4, - 0x4df7, 0x4dfa, 0x4dfd, 0x4e00, 0x4e03, 0x4e06, 0x4e09, 0x4e0c, - 0x4e0f, 0x4e12, 0x4e15, 0x4e18, 0x4e1b, 0x4e1e, 0x4e21, 0x4e24, - 0x4e27, 0x4e2a, 0x4e2d, 0x4e30, 0x4e33, 0x4e36, 0x4e3a, 0x4e3d, - 0x4e40, 0x4e43, 0x4e46, 0x4e49, 0x4e4c, 0x4e4f, 0x4e53, 0x4e56, - 0x4e59, 0x4e5c, 0x4e5f, 0x4e63, 0x4e66, 0x4e69, 0x4e6c, 0x4e6f, - 0x4e73, 0x4e76, 0x4e79, 0x4e7c, 0x4e80, 0x4e83, 0x4e86, 0x4e89, - 0x4e8d, 0x4e90, 0x4e93, 0x4e96, 0x4e9a, 0x4e9d, 0x4ea0, 0x4ea4, - 0x4ea7, 0x4eaa, 0x4eae, 0x4eb1, 0x4eb4, 0x4eb8, 0x4ebb, 0x4ebe, - 0x4ec2, 0x4ec5, 0x4ec9, 0x4ecc, 0x4ecf, 0x4ed3, 0x4ed6, 0x4eda, - 0x4edd, 0x4ee0, 0x4ee4, 0x4ee7, 0x4eeb, 0x4eee, 0x4ef2, 0x4ef5, - 0x4ef9, 0x4efc, 0x4f00, 0x4f03, 0x4f07, 0x4f0a, 0x4f0e, 0x4f11, - 0x4f15, 0x4f18, 0x4f1c, 0x4f1f, 0x4f23, 0x4f27, 0x4f2a, 0x4f2e, - 0x4f31, 0x4f35, 0x4f39, 0x4f3c, 0x4f40, 0x4f43, 0x4f47, 0x4f4b, - 0x4f4e, 0x4f52, 0x4f56, 0x4f59, 0x4f5d, 0x4f61, 0x4f64, 0x4f68, - 0x4f6c, 0x4f70, 0x4f73, 0x4f77, 0x4f7b, 0x4f7e, 0x4f82, 0x4f86, - 0x4f8a, 0x4f8d, 0x4f91, 0x4f95, 0x4f99, 0x4f9d, 0x4fa0, 0x4fa4, - 0x4fa8, 0x4fac, 0x4fb0, 0x4fb4, 0x4fb7, 0x4fbb, 0x4fbf, 0x4fc3, - 0x4fc7, 0x4fcb, 0x4fcf, 0x4fd3, 0x4fd7, 0x4fdb, 0x4fde, 0x4fe2, - 0x4fe6, 0x4fea, 0x4fee, 0x4ff2, 0x4ff6, 0x4ffa, 0x4ffe, 0x5001, - 0x5003, 0x5005, 0x5007, 0x5009, 0x500b, 0x500d, 0x500f, 0x5011, - 0x5013, 0x5015, 0x5017, 0x5019, 0x501b, 0x501e, 0x5020, 0x5022, - 0x5024, 0x5026, 0x5028, 0x502a, 0x502c, 0x502e, 0x5030, 0x5032, - 0x5034, 0x5036, 0x5039, 0x503b, 0x503d, 0x503f, 0x5041, 0x5043, - 0x5045, 0x5047, 0x504a, 0x504c, 0x504e, 0x5050, 0x5052, 0x5054, - 0x5057, 0x5059, 0x505b, 0x505d, 0x505f, 0x5061, 0x5064, 0x5066, - 0x5068, 0x506a, 0x506c, 0x506f, 0x5071, 0x5073, 0x5075, 0x5078, - 0x507a, 0x507c, 0x507e, 0x5081, 0x5083, 0x5085, 0x5087, 0x508a, - 0x508c, 0x508e, 0x5090, 0x5093, 0x5095, 0x5097, 0x509a, 0x509c, - 0x509e, 0x50a0, 0x50a3, 0x50a5, 0x50a7, 0x50aa, 0x50ac, 0x50ae, - 0x50b1, 0x50b3, 0x50b5, 0x50b8, 0x50ba, 0x50bd, 0x50bf, 0x50c1, - 0x50c4, 0x50c6, 0x50c8, 0x50cb, 0x50cd, 0x50d0, 0x50d2, 0x50d4, - 0x50d7, 0x50d9, 0x50dc, 0x50de, 0x50e1, 0x50e3, 0x50e6, 0x50e8, - 0x50ea, 0x50ed, 0x50ef, 0x50f2, 0x50f4, 0x50f7, 0x50f9, 0x50fc, - 0x50fe, 0x5101, 0x5103, 0x5106, 0x5108, 0x510b, 0x510d, 0x5110, - 0x5112, 0x5115, 0x5117, 0x511a, 0x511d, 0x511f, 0x5122, 0x5124, - 0x5127, 0x5129, 0x512c, 0x512f, 0x5131, 0x5134, 0x5136, 0x5139, - 0x513c, 0x513e, 0x5141, 0x5143, 0x5146, 0x5149, 0x514b, 0x514e, - 0x5151, 0x5153, 0x5156, 0x5159, 0x515b, 0x515e, 0x5161, 0x5163, - 0x5166, 0x5169, 0x516c, 0x516e, 0x5171, 0x5174, 0x5176, 0x5179, - 0x517c, 0x517f, 0x5181, 0x5184, 0x5187, 0x518a, 0x518c, 0x518f, - 0x5192, 0x5195, 0x5198, 0x519a, 0x519d, 0x51a0, 0x51a3, 0x51a6, - 0x51a8, 0x51ab, 0x51ae, 0x51b1, 0x51b4, 0x51b7, 0x51ba, 0x51bc, - 0x51bf, 0x51c2, 0x51c5, 0x51c8, 0x51cb, 0x51ce, 0x51d1, 0x51d3, - 0x51d6, 0x51d9, 0x51dc, 0x51df, 0x51e2, 0x51e5, 0x51e8, 0x51eb, - 0x51ee, 0x51f1, 0x51f4, 0x51f7, 0x51fa, 0x51fd, 0x5200, 0x5203, - 0x5206, 0x5209, 0x520c, 0x520f, 0x5212, 0x5215, 0x5218, 0x521b, - 0x521e, 0x5221, 0x5224, 0x5227, 0x522a, 0x522d, 0x5231, 0x5234, - 0x5237, 0x523a, 0x523d, 0x5240, 0x5243, 0x5246, 0x524a, 0x524d, - 0x5250, 0x5253, 0x5256, 0x5259, 0x525d, 0x5260, 0x5263, 0x5266, - 0x5269, 0x526c, 0x5270, 0x5273, 0x5276, 0x5279, 0x527d, 0x5280, - 0x5283, 0x5286, 0x528a, 0x528d, 0x5290, 0x5293, 0x5297, 0x529a, - 0x529d, 0x52a1, 0x52a4, 0x52a7, 0x52ab, 0x52ae, 0x52b1, 0x52b5, - 0x52b8, 0x52bb, 0x52bf, 0x52c2, 0x52c6, 0x52c9, 0x52cc, 0x52d0, - 0x52d3, 0x52da, 0x52e1, 0x52e8, 0x52ef, 0x52f6, 0x52fd, 0x5304, - 0x530b, 0x5312, 0x5319, 0x5320, 0x5327, 0x532e, 0x5335, 0x533d, - 0x5344, 0x534b, 0x5352, 0x535a, 0x5361, 0x5369, 0x5370, 0x5377, - 0x537f, 0x5386, 0x538e, 0x5395, 0x539d, 0x53a5, 0x53ac, 0x53b4, - 0x53bc, 0x53c4, 0x53cb, 0x53d3, 0x53db, 0x53e3, 0x53eb, 0x53f3, - 0x53fb, 0x5401, 0x5405, 0x5409, 0x540d, 0x5411, 0x5416, 0x541a, - 0x541e, 0x5422, 0x5426, 0x542a, 0x542e, 0x5433, 0x5437, 0x543b, - 0x543f, 0x5443, 0x5448, 0x544c, 0x5450, 0x5455, 0x5459, 0x545d, - 0x5462, 0x5466, 0x546a, 0x546f, 0x5473, 0x5478, 0x547c, 0x5481, - 0x5485, 0x548a, 0x548e, 0x5493, 0x5498, 0x549c, 0x54a1, 0x54a5, - 0x54aa, 0x54af, 0x54b3, 0x54b8, 0x54bd, 0x54c2, 0x54c6, 0x54cb, - 0x54d0, 0x54d5, 0x54da, 0x54de, 0x54e3, 0x54e8, 0x54ed, 0x54f2, - 0x54f7, 0x54fc, 0x5501, 0x5506, 0x550b, 0x5510, 0x5515, 0x551a, - 0x551f, 0x5525, 0x552a, 0x552f, 0x5534, 0x5539, 0x553e, 0x5544, - 0x5549, 0x554e, 0x5554, 0x5559, 0x555e, 0x5564, 0x5569, 0x556f, - 0x5574, 0x5579, 0x557f, 0x5584, 0x558a, 0x558f, 0x5595, 0x559b, - 0x55a0, 0x55a6, 0x55ac, 0x55b1, 0x55b7, 0x55bd, 0x55c2, 0x55c8, - 0x55ce, 0x55d4, 0x55da, 0x55e0, 0x55e5, 0x55eb, 0x55f1, 0x55f7, - 0x55fd, 0x5603, 0x5609, 0x560f, 0x5615, 0x561b, 0x5622, 0x5628, - 0x562e, 0x5634, 0x563a, 0x5640, 0x5647, 0x564d, 0x5653, 0x565a, - 0x5660, 0x5666, 0x566d, 0x5673, 0x567a, 0x5680, 0x5687, 0x568d, - 0x5694, 0x569a, 0x56a1, 0x56a8, 0x56ae, 0x56b5, 0x56bc, 0x56c3, - 0x56c9, 0x56d0, 0x56d7, 0x56de, 0x56e5, 0x56ec, 0x56f3, 0x56f9, - 0x5700, 0x5707, 0x570f, 0x5716, 0x571d, 0x5724, 0x572b, 0x5732, - 0x5739, 0x5741, 0x5748, 0x574f, 0x5756, 0x575e, 0x5765, 0x576d, - 0x5774, 0x577c, 0x5783, 0x578b, 0x5792, 0x579a, 0x57a1, 0x57a9, - 0x57b1, 0x57b8, 0x57c0, 0x57c8, 0x57d0, 0x57d7, 0x57df, 0x57e7, - 0x57ef, 0x57f7, 0x57ff, 0x5804, 0x5808, 0x580c, 0x5810, 0x5814, - 0x5818, 0x581c, 0x5820, 0x5824, 0x5828, 0x582c, 0x5831, 0x5835, - 0x5839, 0x583d, 0x5842, 0x5846, 0x584a, 0x584e, 0x5853, 0x5857, - 0x585b, 0x5860, 0x5864, 0x5869, 0x586d, 0x5871, 0x5876, 0x587a, - 0x587f, 0x5883, 0x5888, 0x588c, 0x5891, 0x5895, 0x589a, 0x589f, - 0x58a3, 0x58a8, 0x58ad, 0x58b1, 0x58b6, 0x58bb, 0x58bf, 0x58c4, - 0x58c9, 0x58ce, 0x58d3, 0x58d7, 0x58dc, 0x58e1, 0x58e6, 0x58eb, - 0x58f0, 0x58f5, 0x58fa, 0x58ff, 0x5904, 0x5909, 0x590e, 0x5913, - 0x5918, 0x591d, 0x5922, 0x5927, 0x592d, 0x5932, 0x5937, 0x593c, - 0x5941, 0x5947, 0x594c, 0x5951, 0x5957, 0x595c, 0x5961, 0x5967, - 0x596c, 0x5972, 0x5977, 0x597c, 0x5982, 0x5987, 0x598d, 0x5993, - 0x5998, 0x599e, 0x59a3, 0x59a9, 0x59af, 0x59b4, 0x59ba, 0x59c0, - 0x59c6, 0x59cb, 0x59d1, 0x59d7, 0x59dd, 0x59e3, 0x59e9, 0x59ef, - 0x59f5, 0x59fa, 0x5a00, 0x5a07, 0x5a0d, 0x5a13, 0x5a19, 0x5a1f, - 0x5a25, 0x5a2b, 0x5a31, 0x5a37, 0x5a3e, 0x5a44, 0x5a4a, 0x5a51, - 0x5a57, 0x5a5d, 0x5a64, 0x5a6a, 0x5a70, 0x5a77, 0x5a7d, 0x5a84, - 0x5a8a, 0x5a91, 0x5a98, 0x5a9e, 0x5aa5, 0x5aab, 0x5ab2, 0x5ab9, - 0x5ac0, 0x5ac6, 0x5acd, 0x5ad4, 0x5adb, 0x5ae2, 0x5ae8, 0x5aef, - 0x5af6, 0x5afd, 0x5b04, 0x5b0b, 0x5b12, 0x5b1a, 0x5b21, 0x5b28, - 0x5b2f, 0x5b36, 0x5b3d, 0x5b45, 0x5b4c, 0x5b53, 0x5b5b, 0x5b62, - 0x5b69, 0x5b71, 0x5b78, 0x5b80, 0x5b87, 0x5b8f, 0x5b96, 0x5b9e, - 0x5ba6, 0x5bad, 0x5bb5, 0x5bbd, 0x5bc4, 0x5bcc, 0x5bd4, 0x5bdc, - 0x5be4, 0x5bec, 0x5bf4, 0x5bfb, 0x5c02, 0x5c06, 0x5c0a, 0x5c0e, - 0x5c12, 0x5c16, 0x5c1a, 0x5c1e, 0x5c22, 0x5c26, 0x5c2b, 0x5c2f, - 0x5c33, 0x5c37, 0x5c3b, 0x5c40, 0x5c44, 0x5c48, 0x5c4c, 0x5c51, - 0x5c55, 0x5c59, 0x5c5e, 0x5c62, 0x5c67, 0x5c6b, 0x5c6f, 0x5c74, - 0x5c78, 0x5c7d, 0x5c81, 0x5c86, 0x5c8a, 0x5c8f, 0x5c93, 0x5c98, - 0x5c9d, 0x5ca1, 0x5ca6, 0x5cab, 0x5caf, 0x5cb4, 0x5cb9, 0x5cbd, - 0x5cc2, 0x5cc7, 0x5ccc, 0x5cd0, 0x5cd5, 0x5cda, 0x5cdf, 0x5ce4, - 0x5ce9, 0x5cee, 0x5cf3, 0x5cf8, 0x5cfd, 0x5d02, 0x5d07, 0x5d0c, - 0x5d11, 0x5d16, 0x5d1b, 0x5d20, 0x5d25, 0x5d2a, 0x5d2f, 0x5d35, - 0x5d3a, 0x5d3f, 0x5d44, 0x5d4a, 0x5d4f, 0x5d54, 0x5d5a, 0x5d5f, - 0x5d64, 0x5d6a, 0x5d6f, 0x5d75, 0x5d7a, 0x5d80, 0x5d85, 0x5d8b, - 0x5d90, 0x5d96, 0x5d9b, 0x5da1, 0x5da7, 0x5dac, 0x5db2, 0x5db8, - 0x5dbd, 0x5dc3, 0x5dc9, 0x5dcf, 0x5dd4, 0x5dda, 0x5de0, 0x5de6, - 0x5dec, 0x5df2, 0x5df8, 0x5dfe, 0x5e04, 0x5e0a, 0x5e10, 0x5e16, - 0x5e1c, 0x5e22, 0x5e28, 0x5e2f, 0x5e35, 0x5e3b, 0x5e41, 0x5e47, - 0x5e4e, 0x5e54, 0x5e5a, 0x5e61, 0x5e67, 0x5e6e, 0x5e74, 0x5e7a, - 0x5e81, 0x5e87, 0x5e8e, 0x5e95, 0x5e9b, 0x5ea2, 0x5ea8, 0x5eaf, - 0x5eb6, 0x5ebd, 0x5ec3, 0x5eca, 0x5ed1, 0x5ed8, 0x5edf, 0x5ee5, - 0x5eec, 0x5ef3, 0x5efa, 0x5f01, 0x5f08, 0x5f0f, 0x5f16, 0x5f1d, - 0x5f25, 0x5f2c, 0x5f33, 0x5f3a, 0x5f41, 0x5f49, 0x5f50, 0x5f57, - 0x5f5f, 0x5f66, 0x5f6d, 0x5f75, 0x5f7c, 0x5f84, 0x5f8b, 0x5f93, - 0x5f9b, 0x5fa2, 0x5faa, 0x5fb1, 0x5fb9, 0x5fc1, 0x5fc9, 0x5fd0, - 0x5fd8, 0x5fe0, 0x5fe8, 0x5ff0, 0x5ff8, 0x6000, 0x6004, 0x6008, - 0x600c, 0x6010, 0x6014, 0x6018, 0x601c, 0x6020, 0x6025, 0x6029, - 0x602d, 0x6031, 0x6035, 0x603a, 0x603e, 0x6042, 0x6046, 0x604b, - 0x604f, 0x6053, 0x6057, 0x605c, 0x6060, 0x6065, 0x6069, 0x606d, - 0x6072, 0x6076, 0x607b, 0x607f, 0x6084, 0x6088, 0x608d, 0x6091, - 0x6096, 0x609b, 0x609f, 0x60a4, 0x60a8, 0x60ad, 0x60b2, 0x60b7, - 0x60bb, 0x60c0, 0x60c5, 0x60ca, 0x60ce, 0x60d3, 0x60d8, 0x60dd, - 0x60e2, 0x60e7, 0x60eb, 0x60f0, 0x60f5, 0x60fa, 0x60ff, 0x6104, - 0x6109, 0x610e, 0x6113, 0x6119, 0x611e, 0x6123, 0x6128, 0x612d, - 0x6132, 0x6137, 0x613d, 0x6142, 0x6147, 0x614d, 0x6152, 0x6157, - 0x615d, 0x6162, 0x6167, 0x616d, 0x6172, 0x6178, 0x617d, 0x6183, - 0x6188, 0x618e, 0x6193, 0x6199, 0x619e, 0x61a4, 0x61aa, 0x61af, - 0x61b5, 0x61bb, 0x61c0, 0x61c6, 0x61cc, 0x61d2, 0x61d8, 0x61de, - 0x61e3, 0x61e9, 0x61ef, 0x61f5, 0x61fb, 0x6201, 0x6207, 0x620d, - 0x6213, 0x6219, 0x621f, 0x6226, 0x622c, 0x6232, 0x6238, 0x623e, - 0x6245, 0x624b, 0x6251, 0x6258, 0x625e, 0x6264, 0x626b, 0x6271, - 0x6278, 0x627e, 0x6285, 0x628b, 0x6292, 0x6298, 0x629f, 0x62a5, - 0x62ac, 0x62b3, 0x62ba, 0x62c0, 0x62c7, 0x62ce, 0x62d5, 0x62db, - 0x62e2, 0x62e9, 0x62f0, 0x62f7, 0x62fe, 0x6305, 0x630c, 0x6313, - 0x631a, 0x6321, 0x6329, 0x6330, 0x6337, 0x633e, 0x6345, 0x634d, - 0x6354, 0x635b, 0x6363, 0x636a, 0x6372, 0x6379, 0x6380, 0x6388, - 0x6390, 0x6397, 0x639f, 0x63a6, 0x63ae, 0x63b6, 0x63bd, 0x63c5, - 0x63cd, 0x63d5, 0x63dd, 0x63e5, 0x63ec, 0x63f4, 0x63fc, 0x6402, - 0x6406, 0x640a, 0x640e, 0x6412, 0x6416, 0x641b, 0x641f, 0x6423, - 0x6427, 0x642b, 0x642f, 0x6433, 0x6438, 0x643c, 0x6440, 0x6444, - 0x6449, 0x644d, 0x6451, 0x6456, 0x645a, 0x645e, 0x6463, 0x6467, - 0x646b, 0x6470, 0x6474, 0x6479, 0x647d, 0x6482, 0x6486, 0x648b, - 0x648f, 0x6494, 0x6499, 0x649d, 0x64a2, 0x64a6, 0x64ab, 0x64b0, - 0x64b4, 0x64b9, 0x64be, 0x64c3, 0x64c7, 0x64cc, 0x64d1, 0x64d6, - 0x64db, 0x64e0, 0x64e4, 0x64e9, 0x64ee, 0x64f3, 0x64f8, 0x64fd, - 0x6502, 0x6507, 0x650c, 0x6511, 0x6516, 0x651b, 0x6520, 0x6526, - 0x652b, 0x6530, 0x6535, 0x653a, 0x6540, 0x6545, 0x654a, 0x654f, - 0x6555, 0x655a, 0x655f, 0x6565, 0x656a, 0x6570, 0x6575, 0x657b, - 0x6580, 0x6586, 0x658b, 0x6591, 0x6596, 0x659c, 0x65a1, 0x65a7, - 0x65ad, 0x65b2, 0x65b8, 0x65be, 0x65c4, 0x65c9, 0x65cf, 0x65d5, - 0x65db, 0x65e1, 0x65e7, 0x65ed, 0x65f3, 0x65f8, 0x65fe, 0x6604, - 0x660b, 0x6611, 0x6617, 0x661d, 0x6623, 0x6629, 0x662f, 0x6635, - 0x663c, 0x6642, 0x6648, 0x664e, 0x6655, 0x665b, 0x6661, 0x6668, - 0x666e, 0x6675, 0x667b, 0x6682, 0x6688, 0x668f, 0x6695, 0x669c, - 0x66a2, 0x66a9, 0x66b0, 0x66b7, 0x66bd, 0x66c4, 0x66cb, 0x66d2, - 0x66d8, 0x66df, 0x66e6, 0x66ed, 0x66f4, 0x66fb, 0x6702, 0x6709, - 0x6710, 0x6717, 0x671e, 0x6725, 0x672d, 0x6734, 0x673b, 0x6742, - 0x6749, 0x6751, 0x6758, 0x675f, 0x6767, 0x676e, 0x6776, 0x677d, - 0x6785, 0x678c, 0x6794, 0x679b, 0x67a3, 0x67ab, 0x67b2, 0x67ba, - 0x67c2, 0x67ca, 0x67d1, 0x67d9, 0x67e1, 0x67e9, 0x67f1, 0x67f9, - 0x6800, 0x6804, 0x6808, 0x680c, 0x6811, 0x6815, 0x6819, 0x681d, - 0x6821, 0x6825, 0x6829, 0x682d, 0x6832, 0x6836, 0x683a, 0x683e, - 0x6842, 0x6847, 0x684b, 0x684f, 0x6854, 0x6858, 0x685c, 0x6861, - 0x6865, 0x6869, 0x686e, 0x6872, 0x6877, 0x687b, 0x6880, 0x6884, - 0x6889, 0x688d, 0x6892, 0x6896, 0x689b, 0x68a0, 0x68a4, 0x68a9, - 0x68ae, 0x68b2, 0x68b7, 0x68bc, 0x68c0, 0x68c5, 0x68ca, 0x68cf, - 0x68d4, 0x68d8, 0x68dd, 0x68e2, 0x68e7, 0x68ec, 0x68f1, 0x68f6, - 0x68fb, 0x6900, 0x6905, 0x690a, 0x690f, 0x6914, 0x6919, 0x691e, - 0x6923, 0x6928, 0x692e, 0x6933, 0x6938, 0x693d, 0x6943, 0x6948, - 0x694d, 0x6952, 0x6958, 0x695d, 0x6962, 0x6968, 0x696d, 0x6973, - 0x6978, 0x697e, 0x6983, 0x6989, 0x698e, 0x6994, 0x6999, 0x699f, - 0x69a5, 0x69aa, 0x69b0, 0x69b6, 0x69bb, 0x69c1, 0x69c7, 0x69cd, - 0x69d2, 0x69de, 0x69ea, 0x69f6, 0x6a02, 0x6a0e, 0x6a1a, 0x6a26, - 0x6a33, 0x6a3f, 0x6a4c, 0x6a58, 0x6a65, 0x6a72, 0x6a7f, 0x6a8c, - 0x6a99, 0x6aa6, 0x6ab4, 0x6ac1, 0x6acf, 0x6adc, 0x6aea, 0x6af8, - 0x6b06, 0x6b14, 0x6b22, 0x6b30, 0x6b3f, 0x6b4d, 0x6b5c, 0x6b6b, - 0x6b7a, 0x6b89, 0x6b98, 0x6ba7, 0x6bb7, 0x6bc6, 0x6bd6, 0x6be5, - 0x6bf5, 0x6c03, 0x6c0b, 0x6c13, 0x6c1b, 0x6c23, 0x6c2c, 0x6c34, - 0x6c3c, 0x6c45, 0x6c4d, 0x6c56, 0x6c5f, 0x6c68, 0x6c70, 0x6c79, - 0x6c82, 0x6c8b, 0x6c94, 0x6c9e, 0x6ca7, 0x6cb0, 0x6cba, 0x6cc3, - 0x6ccd, 0x6cd6, 0x6ce0, 0x6cea, 0x6cf4, 0x6cfe, 0x6d08, 0x6d12, - 0x6d1c, 0x6d26, 0x6d31, 0x6d3b, 0x6d45, 0x6d50, 0x6d5b, 0x6d65, - 0x6d70, 0x6d7b, 0x6d86, 0x6d91, 0x6d9c, 0x6da8, 0x6db3, 0x6dbf, - 0x6dca, 0x6dd6, 0x6de1, 0x6ded, 0x6df9, 0x6e05, 0x6e11, 0x6e1d, - 0x6e2a, 0x6e36, 0x6e43, 0x6e4f, 0x6e5c, 0x6e69, 0x6e75, 0x6e82, - 0x6e8f, 0x6e9d, 0x6eaa, 0x6eb7, 0x6ec5, 0x6ed2, 0x6ee0, 0x6eee, - 0x6efc, 0x6f0a, 0x6f18, 0x6f26, 0x6f34, 0x6f43, 0x6f52, 0x6f60, - 0x6f6f, 0x6f7e, 0x6f8d, 0x6f9c, 0x6fab, 0x6fbb, 0x6fca, 0x6fda, - 0x6fea, 0x6ffa, 0x7005, 0x700d, 0x7015, 0x701d, 0x7025, 0x702e, - 0x7036, 0x703f, 0x7047, 0x7050, 0x7058, 0x7061, 0x706a, 0x7073, - 0x707c, 0x7085, 0x708e, 0x7097, 0x70a0, 0x70a9, 0x70b3, 0x70bc, - 0x70c6, 0x70cf, 0x70d9, 0x70e3, 0x70ed, 0x70f6, 0x7100, 0x710a, - 0x7115, 0x711f, 0x7129, 0x7133, 0x713e, 0x7148, 0x7153, 0x715e, - 0x7168, 0x7173, 0x717e, 0x7189, 0x7194, 0x71a0, 0x71ab, 0x71b6, - 0x71c2, 0x71cd, 0x71d9, 0x71e5, 0x71f1, 0x71fc, 0x7208, 0x7215, - 0x7221, 0x722d, 0x7239, 0x7246, 0x7253, 0x725f, 0x726c, 0x7279, - 0x7286, 0x7293, 0x72a0, 0x72ae, 0x72bb, 0x72c8, 0x72d6, 0x72e4, - 0x72f2, 0x7300, 0x730e, 0x731c, 0x732a, 0x7338, 0x7347, 0x7356, - 0x7364, 0x7373, 0x7382, 0x7391, 0x73a0, 0x73b0, 0x73bf, 0x73cf, - 0x73de, 0x73ee, 0x73fe, 0x7407, 0x740f, 0x7417, 0x7420, 0x7428, - 0x7430, 0x7439, 0x7441, 0x744a, 0x7452, 0x745b, 0x7464, 0x746c, - 0x7475, 0x747e, 0x7487, 0x7490, 0x749a, 0x74a3, 0x74ac, 0x74b5, - 0x74bf, 0x74c8, 0x74d2, 0x74dc, 0x74e5, 0x74ef, 0x74f9, 0x7503, - 0x750d, 0x7517, 0x7522, 0x752c, 0x7536, 0x7541, 0x754b, 0x7556, - 0x7561, 0x756b, 0x7576, 0x7581, 0x758c, 0x7597, 0x75a3, 0x75ae, - 0x75b9, 0x75c5, 0x75d1, 0x75dc, 0x75e8, 0x75f4, 0x7600, 0x760c, - 0x7618, 0x7624, 0x7631, 0x763d, 0x7649, 0x7656, 0x7663, 0x7670, - 0x767d, 0x768a, 0x7697, 0x76a4, 0x76b1, 0x76bf, 0x76cc, 0x76da, - 0x76e8, 0x76f6, 0x7703, 0x7712, 0x7720, 0x772e, 0x773c, 0x774b, - 0x775a, 0x7768, 0x7777, 0x7786, 0x7795, 0x77a5, 0x77b4, 0x77c3, - 0x77d3, 0x77e3, 0x77f3, 0x7801, 0x7809, 0x7811, 0x781a, 0x7822, - 0x782a, 0x7832, 0x783b, 0x7843, 0x784c, 0x7855, 0x785d, 0x7866, - 0x786f, 0x7878, 0x7881, 0x788a, 0x7893, 0x789c, 0x78a5, 0x78af, - 0x78b8, 0x78c2, 0x78cb, 0x78d5, 0x78de, 0x78e8, 0x78f2, 0x78fc, - 0x7906, 0x7910, 0x791a, 0x7924, 0x792f, 0x7939, 0x7944, 0x794e, - 0x7959, 0x7964, 0x796e, 0x7979, 0x7984, 0x798f, 0x799b, 0x79a6, - 0x79b1, 0x79bd, 0x79c8, 0x79d4, 0x79df, 0x79eb, 0x79f7, 0x7a03, - 0x7a0f, 0x7a1b, 0x7a28, 0x7a34, 0x7a40, 0x7a4d, 0x7a5a, 0x7a66, - 0x7a73, 0x7a80, 0x7a8d, 0x7a9a, 0x7aa8, 0x7ab5, 0x7ac2, 0x7ad0, - 0x7ade, 0x7aeb, 0x7af9, 0x7b07, 0x7b16, 0x7b24, 0x7b32, 0x7b41, - 0x7b4f, 0x7b5e, 0x7b6d, 0x7b7b, 0x7b8a, 0x7b9a, 0x7ba9, 0x7bb8, - 0x7bc8, 0x7bd7, 0x7be7, 0x7bf7, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, - 0x3c00, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, 0x3bff, - 0x3bff, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, 0x3bfe, - 0x3bfe, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, 0x3bfd, - 0x3bfd, 0x3bfd, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, 0x3bfc, - 0x3bfc, 0x3bfc, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfb, - 0x3bfb, 0x3bfb, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, 0x3bfa, - 0x3bfa, 0x3bfa, 0x3bfa, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, - 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf9, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf8, - 0x3bf8, 0x3bf8, 0x3bf8, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf7, - 0x3bf7, 0x3bf7, 0x3bf7, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, - 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, - 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf5, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, - 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf4, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, - 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf3, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, - 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf2, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, 0x3bf1, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, - 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bef, 0x3bef, 0x3bef, - 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, - 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, - 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, - 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, - 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, - 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, - 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, - 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bef, 0x3bee, 0x3bee, 0x3bee, - 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, - 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, - 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, - 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, - 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, - 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, - 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, - 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bee, 0x3bed, 0x3bed, - 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, - 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, - 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, - 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, - 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, - 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, - 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, - 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bed, 0x3bec, 0x3bec, - 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, - 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, - 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, - 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, - 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, - 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, - 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, - 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3bec, 0x3beb, - 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, - 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, - 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, - 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, - 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, - 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, - 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, - 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, 0x3beb, - 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, - 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, - 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, - 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, - 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, - 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, - 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, - 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, 0x3bea, - 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, - 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, - 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, - 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, - 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, - 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, - 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, - 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, 0x3be9, - 0x3be9, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, - 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, - 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, - 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, - 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, - 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, - 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, - 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, 0x3be8, - 0x3be8, 0x3be8, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, - 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, - 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, - 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, - 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, - 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, - 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, - 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, 0x3be7, - 0x3be7, 0x3be7, 0x3be7, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, - 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, - 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, - 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, - 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, - 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, - 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, - 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be6, - 0x3be6, 0x3be6, 0x3be6, 0x3be6, 0x3be5, 0x3be5, 0x3be5, 0x3be5, - 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, - 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, - 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, - 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, - 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, - 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, - 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be5, - 0x3be5, 0x3be5, 0x3be5, 0x3be5, 0x3be4, 0x3be4, 0x3be4, 0x3be4, - 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, - 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, - 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, - 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, - 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, - 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, - 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, - 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be4, 0x3be3, 0x3be3, 0x3be3, - 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, - 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, - 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, - 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, - 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, - 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, - 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, - 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be3, 0x3be2, 0x3be2, - 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, - 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, - 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, - 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, - 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, - 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, - 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, - 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be2, 0x3be1, - 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, - 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, - 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, - 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, - 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, - 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, - 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, - 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, 0x3be1, - 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, - 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, - 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, - 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, - 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, 0x3be0, - 0x3be0, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, - 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, - 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, - 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, 0x3bdf, - 0x3bdf, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, - 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, - 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, - 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, 0x3bde, - 0x3bde, 0x3bde, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, - 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, - 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, - 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, 0x3bdd, - 0x3bdd, 0x3bdd, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, - 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, - 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, - 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdc, - 0x3bdc, 0x3bdc, 0x3bdc, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, - 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, - 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, - 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, - 0x3bdb, 0x3bdb, 0x3bdb, 0x3bdb, 0x3bda, 0x3bda, 0x3bda, 0x3bda, - 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, - 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, - 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bda, - 0x3bda, 0x3bda, 0x3bda, 0x3bda, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, - 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, - 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, - 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, - 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd9, 0x3bd8, 0x3bd8, 0x3bd8, - 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, - 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, - 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, - 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd7, 0x3bd7, 0x3bd7, - 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, - 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, - 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, - 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd7, 0x3bd6, 0x3bd6, - 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, - 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, - 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, - 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd6, 0x3bd5, - 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, - 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, - 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, - 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd5, 0x3bd4, - 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, - 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, - 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, - 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, 0x3bd4, - 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, - 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, - 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, - 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, 0x3bd3, - 0x3bd3, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, - 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, - 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, - 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, 0x3bd2, - 0x3bd2, 0x3bd2, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, - 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, - 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, - 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd1, - 0x3bd1, 0x3bd1, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, - 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, - 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, - 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, 0x3bd0, - 0x3bd0, 0x3bd0, 0x3bd0, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, - 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, - 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, - 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, - 0x3bcf, 0x3bcf, 0x3bcf, 0x3bcf, 0x3bce, 0x3bce, 0x3bce, 0x3bce, - 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, - 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, - 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, - 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bce, 0x3bcd, 0x3bcd, 0x3bcd, - 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, - 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, - 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, - 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcd, 0x3bcc, 0x3bcc, - 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, - 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, - 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, - 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcc, 0x3bcb, 0x3bcb, - 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, - 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, - 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, - 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bcb, 0x3bca, - 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, - 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, - 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, - 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, 0x3bca, - 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, - 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, - 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, - 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, 0x3bc9, - 0x3bc9, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, - 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, - 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, - 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, 0x3bc8, - 0x3bc8, 0x3bc8, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, - 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, - 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, - 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc7, - 0x3bc7, 0x3bc7, 0x3bc7, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, - 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, - 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, - 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, - 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc6, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, - 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, - 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, - 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, - 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc5, 0x3bc4, 0x3bc4, 0x3bc4, - 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, - 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, - 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, - 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc4, 0x3bc3, 0x3bc3, - 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, - 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, - 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, - 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc3, 0x3bc2, - 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, - 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, - 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, - 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, 0x3bc2, - 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, - 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, - 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, 0x3bc1, - 0x3bc1, 0x3bc0, 0x3bc0, 0x3bc0, 0x3bc0, 0x3bc0, 0x3bc0, 0x3bc0, - 0x3bc0, 0x3bc0, 0x3bc0, 0x3bc0, 0x3bc0, 0x3bc0, 0x3bc0, 0x3bc0, - 0x3bc0, 0x3bbf, 0x3bbf, 0x3bbf, 0x3bbf, 0x3bbf, 0x3bbf, 0x3bbf, - 0x3bbf, 0x3bbf, 0x3bbf, 0x3bbf, 0x3bbf, 0x3bbf, 0x3bbf, 0x3bbf, - 0x3bbf, 0x3bbf, 0x3bbe, 0x3bbe, 0x3bbe, 0x3bbe, 0x3bbe, 0x3bbe, - 0x3bbe, 0x3bbe, 0x3bbe, 0x3bbe, 0x3bbe, 0x3bbe, 0x3bbe, 0x3bbe, - 0x3bbe, 0x3bbe, 0x3bbd, 0x3bbd, 0x3bbd, 0x3bbd, 0x3bbd, 0x3bbd, - 0x3bbd, 0x3bbd, 0x3bbd, 0x3bbd, 0x3bbd, 0x3bbd, 0x3bbd, 0x3bbd, - 0x3bbd, 0x3bbd, 0x3bbd, 0x3bbc, 0x3bbc, 0x3bbc, 0x3bbc, 0x3bbc, - 0x3bbc, 0x3bbc, 0x3bbc, 0x3bbc, 0x3bbc, 0x3bbc, 0x3bbc, 0x3bbc, - 0x3bbc, 0x3bbc, 0x3bbc, 0x3bbb, 0x3bbb, 0x3bbb, 0x3bbb, 0x3bbb, - 0x3bbb, 0x3bbb, 0x3bbb, 0x3bbb, 0x3bbb, 0x3bbb, 0x3bbb, 0x3bbb, - 0x3bbb, 0x3bbb, 0x3bbb, 0x3bbb, 0x3bba, 0x3bba, 0x3bba, 0x3bba, - 0x3bba, 0x3bba, 0x3bba, 0x3bba, 0x3bba, 0x3bba, 0x3bba, 0x3bba, - 0x3bba, 0x3bba, 0x3bba, 0x3bba, 0x3bb9, 0x3bb9, 0x3bb9, 0x3bb9, - 0x3bb9, 0x3bb9, 0x3bb9, 0x3bb9, 0x3bb9, 0x3bb9, 0x3bb9, 0x3bb9, - 0x3bb9, 0x3bb9, 0x3bb9, 0x3bb9, 0x3bb9, 0x3bb8, 0x3bb8, 0x3bb8, - 0x3bb8, 0x3bb8, 0x3bb8, 0x3bb8, 0x3bb8, 0x3bb8, 0x3bb8, 0x3bb8, - 0x3bb8, 0x3bb8, 0x3bb8, 0x3bb8, 0x3bb8, 0x3bb8, 0x3bb7, 0x3bb7, - 0x3bb7, 0x3bb7, 0x3bb7, 0x3bb7, 0x3bb7, 0x3bb7, 0x3bb7, 0x3bb7, - 0x3bb7, 0x3bb7, 0x3bb7, 0x3bb7, 0x3bb7, 0x3bb7, 0x3bb6, 0x3bb6, - 0x3bb6, 0x3bb6, 0x3bb6, 0x3bb6, 0x3bb6, 0x3bb6, 0x3bb6, 0x3bb6, - 0x3bb6, 0x3bb6, 0x3bb6, 0x3bb6, 0x3bb6, 0x3bb6, 0x3bb6, 0x3bb5, - 0x3bb5, 0x3bb5, 0x3bb5, 0x3bb5, 0x3bb5, 0x3bb5, 0x3bb5, 0x3bb5, - 0x3bb5, 0x3bb5, 0x3bb5, 0x3bb5, 0x3bb5, 0x3bb5, 0x3bb5, 0x3bb4, - 0x3bb4, 0x3bb4, 0x3bb4, 0x3bb4, 0x3bb4, 0x3bb4, 0x3bb4, 0x3bb4, - 0x3bb4, 0x3bb4, 0x3bb4, 0x3bb4, 0x3bb4, 0x3bb4, 0x3bb4, 0x3bb4, - 0x3bb3, 0x3bb3, 0x3bb3, 0x3bb3, 0x3bb3, 0x3bb3, 0x3bb3, 0x3bb3, - 0x3bb3, 0x3bb3, 0x3bb3, 0x3bb3, 0x3bb3, 0x3bb3, 0x3bb3, 0x3bb3, - 0x3bb3, 0x3bb2, 0x3bb2, 0x3bb2, 0x3bb2, 0x3bb2, 0x3bb2, 0x3bb2, - 0x3bb2, 0x3bb2, 0x3bb2, 0x3bb2, 0x3bb2, 0x3bb2, 0x3bb2, 0x3bb2, - 0x3bb2, 0x3bb1, 0x3bb1, 0x3bb1, 0x3bb1, 0x3bb1, 0x3bb1, 0x3bb1, - 0x3bb1, 0x3bb1, 0x3bb1, 0x3bb1, 0x3bb1, 0x3bb1, 0x3bb1, 0x3bb1, - 0x3bb1, 0x3bb1, 0x3bb0, 0x3bb0, 0x3bb0, 0x3bb0, 0x3bb0, 0x3bb0, - 0x3bb0, 0x3bb0, 0x3bb0, 0x3bb0, 0x3bb0, 0x3bb0, 0x3bb0, 0x3bb0, - 0x3bb0, 0x3bb0, 0x3baf, 0x3baf, 0x3baf, 0x3baf, 0x3baf, 0x3baf, - 0x3baf, 0x3baf, 0x3baf, 0x3baf, 0x3baf, 0x3baf, 0x3baf, 0x3baf, - 0x3baf, 0x3baf, 0x3baf, 0x3bae, 0x3bae, 0x3bae, 0x3bae, 0x3bae, - 0x3bae, 0x3bae, 0x3bae, 0x3bae, 0x3bae, 0x3bae, 0x3bae, 0x3bae, - 0x3bae, 0x3bae, 0x3bae, 0x3bae, 0x3bad, 0x3bad, 0x3bad, 0x3bad, - 0x3bad, 0x3bad, 0x3bad, 0x3bad, 0x3bad, 0x3bad, 0x3bad, 0x3bad, - 0x3bad, 0x3bad, 0x3bad, 0x3bad, 0x3bac, 0x3bac, 0x3bac, 0x3bac, - 0x3bac, 0x3bac, 0x3bac, 0x3bac, 0x3bac, 0x3bac, 0x3bac, 0x3bac, - 0x3bac, 0x3bac, 0x3bac, 0x3bac, 0x3bac, 0x3bab, 0x3bab, 0x3bab, - 0x3bab, 0x3bab, 0x3bab, 0x3bab, 0x3bab, 0x3bab, 0x3bab, 0x3bab, - 0x3bab, 0x3bab, 0x3bab, 0x3bab, 0x3bab, 0x3bab, 0x3baa, 0x3baa, - 0x3baa, 0x3baa, 0x3baa, 0x3baa, 0x3baa, 0x3baa, 0x3baa, 0x3baa, - 0x3baa, 0x3baa, 0x3baa, 0x3baa, 0x3baa, 0x3baa, 0x3baa, 0x3ba9, - 0x3ba9, 0x3ba9, 0x3ba9, 0x3ba9, 0x3ba9, 0x3ba9, 0x3ba9, 0x3ba9, - 0x3ba9, 0x3ba9, 0x3ba9, 0x3ba9, 0x3ba9, 0x3ba9, 0x3ba9, 0x3ba8, - 0x3ba8, 0x3ba8, 0x3ba8, 0x3ba8, 0x3ba8, 0x3ba8, 0x3ba8, 0x3ba8, - 0x3ba8, 0x3ba8, 0x3ba8, 0x3ba8, 0x3ba8, 0x3ba8, 0x3ba8, 0x3ba8, - 0x3ba7, 0x3ba7, 0x3ba7, 0x3ba7, 0x3ba7, 0x3ba7, 0x3ba7, 0x3ba7, - 0x3ba7, 0x3ba7, 0x3ba7, 0x3ba7, 0x3ba7, 0x3ba7, 0x3ba7, 0x3ba7, - 0x3ba7, 0x3ba6, 0x3ba6, 0x3ba6, 0x3ba6, 0x3ba6, 0x3ba6, 0x3ba6, - 0x3ba6, 0x3ba6, 0x3ba6, 0x3ba6, 0x3ba6, 0x3ba6, 0x3ba6, 0x3ba6, - 0x3ba6, 0x3ba5, 0x3ba5, 0x3ba5, 0x3ba5, 0x3ba5, 0x3ba5, 0x3ba5, - 0x3ba5, 0x3ba5, 0x3ba5, 0x3ba5, 0x3ba5, 0x3ba5, 0x3ba5, 0x3ba5, - 0x3ba5, 0x3ba5, 0x3ba4, 0x3ba4, 0x3ba4, 0x3ba4, 0x3ba4, 0x3ba4, - 0x3ba4, 0x3ba4, 0x3ba4, 0x3ba4, 0x3ba4, 0x3ba4, 0x3ba4, 0x3ba4, - 0x3ba4, 0x3ba4, 0x3ba4, 0x3ba3, 0x3ba3, 0x3ba3, 0x3ba3, 0x3ba3, - 0x3ba3, 0x3ba3, 0x3ba3, 0x3ba3, 0x3ba3, 0x3ba3, 0x3ba3, 0x3ba3, - 0x3ba3, 0x3ba3, 0x3ba3, 0x3ba3, 0x3ba2, 0x3ba2, 0x3ba2, 0x3ba2, - 0x3ba2, 0x3ba2, 0x3ba2, 0x3ba2, 0x3ba2, 0x3ba2, 0x3ba2, 0x3ba2, - 0x3ba2, 0x3ba2, 0x3ba2, 0x3ba2, 0x3ba1, 0x3ba1, 0x3ba1, 0x3ba1, - 0x3ba1, 0x3ba1, 0x3ba1, 0x3ba1, 0x3ba1, 0x3ba1, 0x3ba1, 0x3ba1, - 0x3ba1, 0x3ba1, 0x3ba1, 0x3ba1, 0x3ba1, 0x3ba0, 0x3ba0, 0x3ba0, - 0x3ba0, 0x3ba0, 0x3ba0, 0x3ba0, 0x3ba0, 0x3ba0, 0x3ba0, 0x3ba0, - 0x3ba0, 0x3ba0, 0x3ba0, 0x3ba0, 0x3ba0, 0x3ba0, 0x3b9f, 0x3b9f, - 0x3b9f, 0x3b9f, 0x3b9f, 0x3b9f, 0x3b9f, 0x3b9f, 0x3b9f, 0x3b9f, - 0x3b9f, 0x3b9f, 0x3b9f, 0x3b9f, 0x3b9f, 0x3b9f, 0x3b9f, 0x3b9e, - 0x3b9e, 0x3b9e, 0x3b9e, 0x3b9e, 0x3b9e, 0x3b9e, 0x3b9e, 0x3b9e, - 0x3b9e, 0x3b9e, 0x3b9e, 0x3b9e, 0x3b9e, 0x3b9e, 0x3b9e, 0x3b9e, - 0x3b9d, 0x3b9d, 0x3b9d, 0x3b9d, 0x3b9d, 0x3b9d, 0x3b9d, 0x3b9d, - 0x3b9d, 0x3b9d, 0x3b9d, 0x3b9d, 0x3b9d, 0x3b9d, 0x3b9d, 0x3b9d, - 0x3b9c, 0x3b9c, 0x3b9c, 0x3b9c, 0x3b9c, 0x3b9c, 0x3b9c, 0x3b9c, - 0x3b9c, 0x3b9c, 0x3b9c, 0x3b9c, 0x3b9c, 0x3b9c, 0x3b9c, 0x3b9c, - 0x3b9c, 0x3b9b, 0x3b9b, 0x3b9b, 0x3b9b, 0x3b9b, 0x3b9b, 0x3b9b, - 0x3b9b, 0x3b9b, 0x3b9b, 0x3b9b, 0x3b9b, 0x3b9b, 0x3b9b, 0x3b9b, - 0x3b9b, 0x3b9b, 0x3b9a, 0x3b9a, 0x3b9a, 0x3b9a, 0x3b9a, 0x3b9a, - 0x3b9a, 0x3b9a, 0x3b9a, 0x3b9a, 0x3b9a, 0x3b9a, 0x3b9a, 0x3b9a, - 0x3b9a, 0x3b9a, 0x3b9a, 0x3b99, 0x3b99, 0x3b99, 0x3b99, 0x3b99, - 0x3b99, 0x3b99, 0x3b99, 0x3b99, 0x3b99, 0x3b99, 0x3b99, 0x3b99, - 0x3b99, 0x3b99, 0x3b99, 0x3b99, 0x3b98, 0x3b98, 0x3b98, 0x3b98, - 0x3b98, 0x3b98, 0x3b98, 0x3b98, 0x3b98, 0x3b98, 0x3b98, 0x3b98, - 0x3b98, 0x3b98, 0x3b98, 0x3b98, 0x3b98, 0x3b97, 0x3b97, 0x3b97, - 0x3b97, 0x3b97, 0x3b97, 0x3b97, 0x3b97, 0x3b97, 0x3b97, 0x3b97, - 0x3b97, 0x3b97, 0x3b97, 0x3b97, 0x3b97, 0x3b97, 0x3b96, 0x3b96, - 0x3b96, 0x3b96, 0x3b96, 0x3b96, 0x3b96, 0x3b96, 0x3b96, 0x3b96, - 0x3b96, 0x3b96, 0x3b96, 0x3b96, 0x3b96, 0x3b96, 0x3b95, 0x3b95, - 0x3b95, 0x3b95, 0x3b95, 0x3b95, 0x3b95, 0x3b95, 0x3b95, 0x3b95, - 0x3b95, 0x3b95, 0x3b95, 0x3b95, 0x3b95, 0x3b95, 0x3b95, 0x3b94, - 0x3b94, 0x3b94, 0x3b94, 0x3b94, 0x3b94, 0x3b94, 0x3b94, 0x3b94, - 0x3b94, 0x3b94, 0x3b94, 0x3b94, 0x3b94, 0x3b94, 0x3b94, 0x3b94, - 0x3b93, 0x3b93, 0x3b93, 0x3b93, 0x3b93, 0x3b93, 0x3b93, 0x3b93, - 0x3b93, 0x3b93, 0x3b93, 0x3b93, 0x3b93, 0x3b93, 0x3b93, 0x3b93, - 0x3b93, 0x3b92, 0x3b92, 0x3b92, 0x3b92, 0x3b92, 0x3b92, 0x3b92, - 0x3b92, 0x3b92, 0x3b92, 0x3b92, 0x3b92, 0x3b92, 0x3b92, 0x3b92, - 0x3b92, 0x3b92, 0x3b91, 0x3b91, 0x3b91, 0x3b91, 0x3b91, 0x3b91, - 0x3b91, 0x3b91, 0x3b91, 0x3b91, 0x3b91, 0x3b91, 0x3b91, 0x3b91, - 0x3b91, 0x3b91, 0x3b91, 0x3b90, 0x3b90, 0x3b90, 0x3b90, 0x3b90, - 0x3b90, 0x3b90, 0x3b90, 0x3b90, 0x3b90, 0x3b90, 0x3b90, 0x3b90, - 0x3b90, 0x3b90, 0x3b90, 0x3b90, 0x3b8f, 0x3b8f, 0x3b8f, 0x3b8f, - 0x3b8f, 0x3b8f, 0x3b8f, 0x3b8f, 0x3b8f, 0x3b8f, 0x3b8f, 0x3b8f, - 0x3b8f, 0x3b8f, 0x3b8f, 0x3b8f, 0x3b8f, 0x3b8e, 0x3b8e, 0x3b8e, - 0x3b8e, 0x3b8e, 0x3b8e, 0x3b8e, 0x3b8e, 0x3b8e, 0x3b8e, 0x3b8e, - 0x3b8e, 0x3b8e, 0x3b8e, 0x3b8e, 0x3b8e, 0x3b8e, 0x3b8d, 0x3b8d, - 0x3b8d, 0x3b8d, 0x3b8d, 0x3b8d, 0x3b8d, 0x3b8d, 0x3b8d, 0x3b8d, - 0x3b8d, 0x3b8d, 0x3b8d, 0x3b8d, 0x3b8d, 0x3b8d, 0x3b8d, 0x3b8c, - 0x3b8c, 0x3b8c, 0x3b8c, 0x3b8c, 0x3b8c, 0x3b8c, 0x3b8c, 0x3b8c, - 0x3b8c, 0x3b8c, 0x3b8c, 0x3b8c, 0x3b8c, 0x3b8c, 0x3b8c, 0x3b8c, - 0x3b8b, 0x3b8b, 0x3b8b, 0x3b8b, 0x3b8b, 0x3b8b, 0x3b8b, 0x3b8b, - 0x3b8b, 0x3b8b, 0x3b8b, 0x3b8b, 0x3b8b, 0x3b8b, 0x3b8b, 0x3b8b, - 0x3b8b, 0x3b8a, 0x3b8a, 0x3b8a, 0x3b8a, 0x3b8a, 0x3b8a, 0x3b8a, - 0x3b8a, 0x3b8a, 0x3b8a, 0x3b8a, 0x3b8a, 0x3b8a, 0x3b8a, 0x3b8a, - 0x3b8a, 0x3b8a, 0x3b89, 0x3b89, 0x3b89, 0x3b89, 0x3b89, 0x3b89, - 0x3b89, 0x3b89, 0x3b89, 0x3b89, 0x3b89, 0x3b89, 0x3b89, 0x3b89, - 0x3b89, 0x3b89, 0x3b89, 0x3b88, 0x3b88, 0x3b88, 0x3b88, 0x3b88, - 0x3b88, 0x3b88, 0x3b88, 0x3b88, 0x3b88, 0x3b88, 0x3b88, 0x3b88, - 0x3b88, 0x3b88, 0x3b88, 0x3b88, 0x3b87, 0x3b87, 0x3b87, 0x3b87, - 0x3b87, 0x3b87, 0x3b87, 0x3b87, 0x3b87, 0x3b87, 0x3b87, 0x3b87, - 0x3b87, 0x3b87, 0x3b87, 0x3b87, 0x3b87, 0x3b86, 0x3b86, 0x3b86, - 0x3b86, 0x3b86, 0x3b86, 0x3b86, 0x3b86, 0x3b86, 0x3b86, 0x3b86, - 0x3b86, 0x3b86, 0x3b86, 0x3b86, 0x3b86, 0x3b86, 0x3b85, 0x3b85, - 0x3b85, 0x3b85, 0x3b85, 0x3b85, 0x3b85, 0x3b85, 0x3b85, 0x3b85, - 0x3b85, 0x3b85, 0x3b85, 0x3b85, 0x3b85, 0x3b85, 0x3b85, 0x3b84, - 0x3b84, 0x3b84, 0x3b84, 0x3b84, 0x3b84, 0x3b84, 0x3b84, 0x3b84, - 0x3b84, 0x3b84, 0x3b84, 0x3b84, 0x3b83, 0x3b83, 0x3b83, 0x3b83, - 0x3b83, 0x3b83, 0x3b83, 0x3b83, 0x3b83, 0x3b82, 0x3b82, 0x3b82, - 0x3b82, 0x3b82, 0x3b82, 0x3b82, 0x3b82, 0x3b81, 0x3b81, 0x3b81, - 0x3b81, 0x3b81, 0x3b81, 0x3b81, 0x3b81, 0x3b81, 0x3b80, 0x3b80, - 0x3b80, 0x3b80, 0x3b80, 0x3b80, 0x3b80, 0x3b80, 0x3b7f, 0x3b7f, - 0x3b7f, 0x3b7f, 0x3b7f, 0x3b7f, 0x3b7f, 0x3b7f, 0x3b7f, 0x3b7e, - 0x3b7e, 0x3b7e, 0x3b7e, 0x3b7e, 0x3b7e, 0x3b7e, 0x3b7e, 0x3b7d, - 0x3b7d, 0x3b7d, 0x3b7d, 0x3b7d, 0x3b7d, 0x3b7d, 0x3b7d, 0x3b7d, - 0x3b7c, 0x3b7c, 0x3b7c, 0x3b7c, 0x3b7c, 0x3b7c, 0x3b7c, 0x3b7c, - 0x3b7b, 0x3b7b, 0x3b7b, 0x3b7b, 0x3b7b, 0x3b7b, 0x3b7b, 0x3b7b, - 0x3b7b, 0x3b7a, 0x3b7a, 0x3b7a, 0x3b7a, 0x3b7a, 0x3b7a, 0x3b7a, - 0x3b7a, 0x3b79, 0x3b79, 0x3b79, 0x3b79, 0x3b79, 0x3b79, 0x3b79, - 0x3b79, 0x3b79, 0x3b78, 0x3b78, 0x3b78, 0x3b78, 0x3b78, 0x3b78, - 0x3b78, 0x3b78, 0x3b78, 0x3b77, 0x3b77, 0x3b77, 0x3b77, 0x3b77, - 0x3b77, 0x3b77, 0x3b77, 0x3b76, 0x3b76, 0x3b76, 0x3b76, 0x3b76, - 0x3b76, 0x3b76, 0x3b76, 0x3b76, 0x3b75, 0x3b75, 0x3b75, 0x3b75, - 0x3b75, 0x3b75, 0x3b75, 0x3b75, 0x3b74, 0x3b74, 0x3b74, 0x3b74, - 0x3b74, 0x3b74, 0x3b74, 0x3b74, 0x3b74, 0x3b73, 0x3b73, 0x3b73, - 0x3b73, 0x3b73, 0x3b73, 0x3b73, 0x3b73, 0x3b73, 0x3b72, 0x3b72, - 0x3b72, 0x3b72, 0x3b72, 0x3b72, 0x3b72, 0x3b72, 0x3b71, 0x3b71, - 0x3b71, 0x3b71, 0x3b71, 0x3b71, 0x3b71, 0x3b71, 0x3b71, 0x3b70, - 0x3b70, 0x3b70, 0x3b70, 0x3b70, 0x3b70, 0x3b70, 0x3b70, 0x3b6f, - 0x3b6f, 0x3b6f, 0x3b6f, 0x3b6f, 0x3b6f, 0x3b6f, 0x3b6f, 0x3b6f, - 0x3b6e, 0x3b6e, 0x3b6e, 0x3b6e, 0x3b6e, 0x3b6e, 0x3b6e, 0x3b6e, - 0x3b6e, 0x3b6d, 0x3b6d, 0x3b6d, 0x3b6d, 0x3b6d, 0x3b6d, 0x3b6d, - 0x3b6d, 0x3b6c, 0x3b6c, 0x3b6c, 0x3b6c, 0x3b6c, 0x3b6c, 0x3b6c, - 0x3b6c, 0x3b6c, 0x3b6b, 0x3b6b, 0x3b6b, 0x3b6b, 0x3b6b, 0x3b6b, - 0x3b6b, 0x3b6b, 0x3b6a, 0x3b6a, 0x3b6a, 0x3b6a, 0x3b6a, 0x3b6a, - 0x3b6a, 0x3b6a, 0x3b6a, 0x3b69, 0x3b69, 0x3b69, 0x3b69, 0x3b69, - 0x3b69, 0x3b69, 0x3b69, 0x3b69, 0x3b68, 0x3b68, 0x3b68, 0x3b68, - 0x3b68, 0x3b68, 0x3b68, 0x3b68, 0x3b67, 0x3b67, 0x3b67, 0x3b67, - 0x3b67, 0x3b67, 0x3b67, 0x3b67, 0x3b67, 0x3b66, 0x3b66, 0x3b66, - 0x3b66, 0x3b66, 0x3b66, 0x3b66, 0x3b66, 0x3b66, 0x3b65, 0x3b65, - 0x3b65, 0x3b65, 0x3b65, 0x3b65, 0x3b65, 0x3b65, 0x3b64, 0x3b64, - 0x3b64, 0x3b64, 0x3b64, 0x3b64, 0x3b64, 0x3b64, 0x3b64, 0x3b63, - 0x3b63, 0x3b63, 0x3b63, 0x3b63, 0x3b63, 0x3b63, 0x3b63, 0x3b63, - 0x3b62, 0x3b62, 0x3b62, 0x3b62, 0x3b62, 0x3b62, 0x3b62, 0x3b62, - 0x3b61, 0x3b61, 0x3b61, 0x3b61, 0x3b61, 0x3b61, 0x3b61, 0x3b61, - 0x3b61, 0x3b60, 0x3b60, 0x3b60, 0x3b60, 0x3b60, 0x3b60, 0x3b60, - 0x3b60, 0x3b60, 0x3b5f, 0x3b5f, 0x3b5f, 0x3b5f, 0x3b5f, 0x3b5f, - 0x3b5f, 0x3b5f, 0x3b5e, 0x3b5e, 0x3b5e, 0x3b5e, 0x3b5e, 0x3b5e, - 0x3b5e, 0x3b5e, 0x3b5e, 0x3b5d, 0x3b5d, 0x3b5d, 0x3b5d, 0x3b5d, - 0x3b5d, 0x3b5d, 0x3b5d, 0x3b5d, 0x3b5c, 0x3b5c, 0x3b5c, 0x3b5c, - 0x3b5c, 0x3b5c, 0x3b5c, 0x3b5c, 0x3b5b, 0x3b5b, 0x3b5b, 0x3b5b, - 0x3b5b, 0x3b5b, 0x3b5b, 0x3b5b, 0x3b5b, 0x3b5a, 0x3b5a, 0x3b5a, - 0x3b5a, 0x3b5a, 0x3b5a, 0x3b5a, 0x3b5a, 0x3b5a, 0x3b59, 0x3b59, - 0x3b59, 0x3b59, 0x3b59, 0x3b59, 0x3b59, 0x3b59, 0x3b58, 0x3b58, - 0x3b58, 0x3b58, 0x3b58, 0x3b58, 0x3b58, 0x3b58, 0x3b58, 0x3b57, - 0x3b57, 0x3b57, 0x3b57, 0x3b57, 0x3b57, 0x3b57, 0x3b57, 0x3b57, - 0x3b56, 0x3b56, 0x3b56, 0x3b56, 0x3b56, 0x3b56, 0x3b56, 0x3b56, - 0x3b56, 0x3b55, 0x3b55, 0x3b55, 0x3b55, 0x3b55, 0x3b55, 0x3b55, - 0x3b55, 0x3b54, 0x3b54, 0x3b54, 0x3b54, 0x3b54, 0x3b54, 0x3b54, - 0x3b54, 0x3b54, 0x3b53, 0x3b53, 0x3b53, 0x3b53, 0x3b53, 0x3b53, - 0x3b53, 0x3b53, 0x3b53, 0x3b52, 0x3b52, 0x3b52, 0x3b52, 0x3b52, - 0x3b52, 0x3b52, 0x3b52, 0x3b52, 0x3b51, 0x3b51, 0x3b51, 0x3b51, - 0x3b51, 0x3b51, 0x3b51, 0x3b51, 0x3b50, 0x3b50, 0x3b50, 0x3b50, - 0x3b50, 0x3b50, 0x3b50, 0x3b50, 0x3b50, 0x3b4f, 0x3b4f, 0x3b4f, - 0x3b4f, 0x3b4f, 0x3b4f, 0x3b4f, 0x3b4f, 0x3b4f, 0x3b4e, 0x3b4e, - 0x3b4e, 0x3b4e, 0x3b4e, 0x3b4e, 0x3b4e, 0x3b4e, 0x3b4e, 0x3b4d, - 0x3b4d, 0x3b4d, 0x3b4d, 0x3b4d, 0x3b4d, 0x3b4d, 0x3b4d, 0x3b4c, - 0x3b4c, 0x3b4c, 0x3b4c, 0x3b4c, 0x3b4c, 0x3b4c, 0x3b4c, 0x3b4c, - 0x3b4b, 0x3b4b, 0x3b4b, 0x3b4b, 0x3b4b, 0x3b4b, 0x3b4b, 0x3b4b, - 0x3b4b, 0x3b4a, 0x3b4a, 0x3b4a, 0x3b4a, 0x3b4a, 0x3b4a, 0x3b4a, - 0x3b4a, 0x3b4a, 0x3b49, 0x3b49, 0x3b49, 0x3b49, 0x3b49, 0x3b49, - 0x3b49, 0x3b49, 0x3b48, 0x3b48, 0x3b48, 0x3b48, 0x3b48, 0x3b48, - 0x3b48, 0x3b48, 0x3b48, 0x3b47, 0x3b47, 0x3b47, 0x3b47, 0x3b47, - 0x3b47, 0x3b47, 0x3b47, 0x3b47, 0x3b46, 0x3b46, 0x3b46, 0x3b46, - 0x3b46, 0x3b46, 0x3b46, 0x3b46, 0x3b46, 0x3b45, 0x3b45, 0x3b45, - 0x3b45, 0x3b45, 0x3b45, 0x3b45, 0x3b45, 0x3b45, 0x3b44, 0x3b44, - 0x3b44, 0x3b44, 0x3b44, 0x3b44, 0x3b44, 0x3b44, 0x3b43, 0x3b43, - 0x3b43, 0x3b43, 0x3b43, 0x3b43, 0x3b43, 0x3b43, 0x3b43, 0x3b42, - 0x3b42, 0x3b42, 0x3b42, 0x3b42, 0x3b42, 0x3b42, 0x3b42, 0x3b42, - 0x3b41, 0x3b41, 0x3b41, 0x3b41, 0x3b41, 0x3b41, 0x3b41, 0x3b41, - 0x3b41, 0x3b40, 0x3b40, 0x3b40, 0x3b40, 0x3b40, 0x3b40, 0x3b40, - 0x3b40, 0x3b40, 0x3b3f, 0x3b3f, 0x3b3f, 0x3b3f, 0x3b3f, 0x3b3f, - 0x3b3f, 0x3b3f, 0x3b3f, 0x3b3e, 0x3b3e, 0x3b3e, 0x3b3e, 0x3b3e, - 0x3b3e, 0x3b3e, 0x3b3e, 0x3b3d, 0x3b3d, 0x3b3d, 0x3b3d, 0x3b3d, - 0x3b3d, 0x3b3d, 0x3b3d, 0x3b3d, 0x3b3c, 0x3b3c, 0x3b3c, 0x3b3c, - 0x3b3c, 0x3b3c, 0x3b3c, 0x3b3c, 0x3b3c, 0x3b3b, 0x3b3b, 0x3b3b, - 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3b, 0x3b3a, 0x3b3a, - 0x3b3a, 0x3b3a, 0x3b3a, 0x3b3a, 0x3b3a, 0x3b3a, 0x3b3a, 0x3b39, - 0x3b39, 0x3b39, 0x3b39, 0x3b39, 0x3b39, 0x3b39, 0x3b39, 0x3b39, - 0x3b38, 0x3b38, 0x3b38, 0x3b38, 0x3b38, 0x3b38, 0x3b38, 0x3b38, - 0x3b38, 0x3b37, 0x3b37, 0x3b37, 0x3b37, 0x3b37, 0x3b37, 0x3b37, - 0x3b37, 0x3b36, 0x3b36, 0x3b36, 0x3b36, 0x3b36, 0x3b36, 0x3b36, - 0x3b36, 0x3b36, 0x3b35, 0x3b35, 0x3b35, 0x3b35, 0x3b35, 0x3b35, - 0x3b35, 0x3b35, 0x3b35, 0x3b34, 0x3b34, 0x3b34, 0x3b34, 0x3b34, - 0x3b34, 0x3b34, 0x3b34, 0x3b34, 0x3b33, 0x3b33, 0x3b33, 0x3b33, - 0x3b33, 0x3b33, 0x3b33, 0x3b33, 0x3b33, 0x3b32, 0x3b32, 0x3b32, - 0x3b32, 0x3b32, 0x3b32, 0x3b32, 0x3b32, 0x3b32, 0x3b31, 0x3b31, - 0x3b31, 0x3b31, 0x3b31, 0x3b31, 0x3b31, 0x3b31, 0x3b31, 0x3b30, - 0x3b30, 0x3b30, 0x3b30, 0x3b30, 0x3b30, 0x3b30, 0x3b30, 0x3b30, - 0x3b2f, 0x3b2f, 0x3b2f, 0x3b2f, 0x3b2f, 0x3b2f, 0x3b2f, 0x3b2f, - 0x3b2f, 0x3b2e, 0x3b2e, 0x3b2e, 0x3b2e, 0x3b2e, 0x3b2e, 0x3b2e, - 0x3b2e, 0x3b2d, 0x3b2d, 0x3b2d, 0x3b2d, 0x3b2d, 0x3b2d, 0x3b2d, - 0x3b2d, 0x3b2d, 0x3b2c, 0x3b2c, 0x3b2c, 0x3b2c, 0x3b2c, 0x3b2c, - 0x3b2c, 0x3b2c, 0x3b2c, 0x3b2b, 0x3b2b, 0x3b2b, 0x3b2b, 0x3b2b, - 0x3b2b, 0x3b2b, 0x3b2b, 0x3b2b, 0x3b2a, 0x3b2a, 0x3b2a, 0x3b2a, - 0x3b2a, 0x3b2a, 0x3b2a, 0x3b2a, 0x3b2a, 0x3b29, 0x3b29, 0x3b29, - 0x3b29, 0x3b29, 0x3b29, 0x3b29, 0x3b29, 0x3b29, 0x3b28, 0x3b28, - 0x3b28, 0x3b28, 0x3b28, 0x3b28, 0x3b28, 0x3b28, 0x3b28, 0x3b27, - 0x3b27, 0x3b27, 0x3b27, 0x3b27, 0x3b27, 0x3b27, 0x3b27, 0x3b27, - 0x3b26, 0x3b26, 0x3b26, 0x3b26, 0x3b26, 0x3b26, 0x3b26, 0x3b26, - 0x3b26, 0x3b25, 0x3b25, 0x3b25, 0x3b25, 0x3b25, 0x3b25, 0x3b25, - 0x3b25, 0x3b25, 0x3b24, 0x3b24, 0x3b24, 0x3b24, 0x3b24, 0x3b24, - 0x3b24, 0x3b24, 0x3b24, 0x3b23, 0x3b23, 0x3b23, 0x3b23, 0x3b23, - 0x3b23, 0x3b23, 0x3b23, 0x3b23, 0x3b22, 0x3b22, 0x3b22, 0x3b22, - 0x3b22, 0x3b22, 0x3b22, 0x3b22, 0x3b22, 0x3b21, 0x3b21, 0x3b21, - 0x3b21, 0x3b21, 0x3b21, 0x3b21, 0x3b21, 0x3b21, 0x3b20, 0x3b20, - 0x3b20, 0x3b20, 0x3b20, 0x3b20, 0x3b20, 0x3b20, 0x3b20, 0x3b1f, - 0x3b1f, 0x3b1f, 0x3b1f, 0x3b1f, 0x3b1f, 0x3b1f, 0x3b1f, 0x3b1f, - 0x3b1e, 0x3b1e, 0x3b1e, 0x3b1e, 0x3b1e, 0x3b1e, 0x3b1e, 0x3b1e, - 0x3b1e, 0x3b1d, 0x3b1d, 0x3b1d, 0x3b1d, 0x3b1d, 0x3b1d, 0x3b1d, - 0x3b1d, 0x3b1d, 0x3b1c, 0x3b1c, 0x3b1c, 0x3b1c, 0x3b1c, 0x3b1c, - 0x3b1c, 0x3b1c, 0x3b1c, 0x3b1b, 0x3b1b, 0x3b1b, 0x3b1b, 0x3b1b, - 0x3b1b, 0x3b1b, 0x3b1b, 0x3b1b, 0x3b1a, 0x3b1a, 0x3b1a, 0x3b1a, - 0x3b1a, 0x3b1a, 0x3b1a, 0x3b1a, 0x3b1a, 0x3b19, 0x3b19, 0x3b19, - 0x3b19, 0x3b19, 0x3b19, 0x3b19, 0x3b19, 0x3b19, 0x3b18, 0x3b18, - 0x3b18, 0x3b18, 0x3b18, 0x3b18, 0x3b18, 0x3b18, 0x3b18, 0x3b17, - 0x3b17, 0x3b17, 0x3b17, 0x3b17, 0x3b17, 0x3b17, 0x3b17, 0x3b17, - 0x3b16, 0x3b16, 0x3b16, 0x3b16, 0x3b16, 0x3b16, 0x3b16, 0x3b16, - 0x3b16, 0x3b15, 0x3b15, 0x3b15, 0x3b15, 0x3b15, 0x3b15, 0x3b15, - 0x3b15, 0x3b15, 0x3b14, 0x3b14, 0x3b14, 0x3b14, 0x3b14, 0x3b14, - 0x3b14, 0x3b14, 0x3b14, 0x3b13, 0x3b13, 0x3b13, 0x3b13, 0x3b13, - 0x3b13, 0x3b13, 0x3b13, 0x3b13, 0x3b12, 0x3b12, 0x3b12, 0x3b12, - 0x3b12, 0x3b12, 0x3b12, 0x3b12, 0x3b12, 0x3b11, 0x3b11, 0x3b11, - 0x3b11, 0x3b11, 0x3b11, 0x3b11, 0x3b11, 0x3b11, 0x3b10, 0x3b10, - 0x3b10, 0x3b10, 0x3b10, 0x3b10, 0x3b10, 0x3b10, 0x3b10, 0x3b0f, - 0x3b0f, 0x3b0f, 0x3b0f, 0x3b0f, 0x3b0e, 0x3b0e, 0x3b0e, 0x3b0e, - 0x3b0e, 0x3b0d, 0x3b0d, 0x3b0d, 0x3b0d, 0x3b0c, 0x3b0c, 0x3b0c, - 0x3b0c, 0x3b0c, 0x3b0b, 0x3b0b, 0x3b0b, 0x3b0b, 0x3b0b, 0x3b0a, - 0x3b0a, 0x3b0a, 0x3b0a, 0x3b09, 0x3b09, 0x3b09, 0x3b09, 0x3b09, - 0x3b08, 0x3b08, 0x3b08, 0x3b08, 0x3b07, 0x3b07, 0x3b07, 0x3b07, - 0x3b07, 0x3b06, 0x3b06, 0x3b06, 0x3b06, 0x3b05, 0x3b05, 0x3b05, - 0x3b05, 0x3b05, 0x3b04, 0x3b04, 0x3b04, 0x3b04, 0x3b03, 0x3b03, - 0x3b03, 0x3b03, 0x3b03, 0x3b02, 0x3b02, 0x3b02, 0x3b02, 0x3b02, - 0x3b01, 0x3b01, 0x3b01, 0x3b01, 0x3b00, 0x3b00, 0x3b00, 0x3b00, - 0x3b00, 0x3aff, 0x3aff, 0x3aff, 0x3aff, 0x3afe, 0x3afe, 0x3afe, - 0x3afe, 0x3afe, 0x3afd, 0x3afd, 0x3afd, 0x3afd, 0x3afc, 0x3afc, - 0x3afc, 0x3afc, 0x3afc, 0x3afb, 0x3afb, 0x3afb, 0x3afb, 0x3afb, - 0x3afa, 0x3afa, 0x3afa, 0x3afa, 0x3af9, 0x3af9, 0x3af9, 0x3af9, - 0x3af9, 0x3af8, 0x3af8, 0x3af8, 0x3af8, 0x3af7, 0x3af7, 0x3af7, - 0x3af7, 0x3af7, 0x3af6, 0x3af6, 0x3af6, 0x3af6, 0x3af6, 0x3af5, - 0x3af5, 0x3af5, 0x3af5, 0x3af4, 0x3af4, 0x3af4, 0x3af4, 0x3af4, - 0x3af3, 0x3af3, 0x3af3, 0x3af3, 0x3af2, 0x3af2, 0x3af2, 0x3af2, - 0x3af2, 0x3af1, 0x3af1, 0x3af1, 0x3af1, 0x3af1, 0x3af0, 0x3af0, - 0x3af0, 0x3af0, 0x3aef, 0x3aef, 0x3aef, 0x3aef, 0x3aef, 0x3aee, - 0x3aee, 0x3aee, 0x3aee, 0x3aed, 0x3aed, 0x3aed, 0x3aed, 0x3aed, - 0x3aec, 0x3aec, 0x3aec, 0x3aec, 0x3aec, 0x3aeb, 0x3aeb, 0x3aeb, - 0x3aeb, 0x3aea, 0x3aea, 0x3aea, 0x3aea, 0x3aea, 0x3ae9, 0x3ae9, - 0x3ae9, 0x3ae9, 0x3ae9, 0x3ae8, 0x3ae8, 0x3ae8, 0x3ae8, 0x3ae7, - 0x3ae7, 0x3ae7, 0x3ae7, 0x3ae7, 0x3ae6, 0x3ae6, 0x3ae6, 0x3ae6, - 0x3ae5, 0x3ae5, 0x3ae5, 0x3ae5, 0x3ae5, 0x3ae4, 0x3ae4, 0x3ae4, - 0x3ae4, 0x3ae4, 0x3ae3, 0x3ae3, 0x3ae3, 0x3ae3, 0x3ae2, 0x3ae2, - 0x3ae2, 0x3ae2, 0x3ae2, 0x3ae1, 0x3ae1, 0x3ae1, 0x3ae1, 0x3ae1, - 0x3ae0, 0x3ae0, 0x3ae0, 0x3ae0, 0x3adf, 0x3adf, 0x3adf, 0x3adf, - 0x3adf, 0x3ade, 0x3ade, 0x3ade, 0x3ade, 0x3ade, 0x3add, 0x3add, - 0x3add, 0x3add, 0x3adc, 0x3adc, 0x3adc, 0x3adc, 0x3adc, 0x3adb, - 0x3adb, 0x3adb, 0x3adb, 0x3adb, 0x3ada, 0x3ada, 0x3ada, 0x3ada, - 0x3ad9, 0x3ad9, 0x3ad9, 0x3ad9, 0x3ad9, 0x3ad8, 0x3ad8, 0x3ad8, - 0x3ad8, 0x3ad8, 0x3ad7, 0x3ad7, 0x3ad7, 0x3ad7, 0x3ad6, 0x3ad6, - 0x3ad6, 0x3ad6, 0x3ad6, 0x3ad5, 0x3ad5, 0x3ad5, 0x3ad5, 0x3ad5, - 0x3ad4, 0x3ad4, 0x3ad4, 0x3ad4, 0x3ad3, 0x3ad3, 0x3ad3, 0x3ad3, - 0x3ad3, 0x3ad2, 0x3ad2, 0x3ad2, 0x3ad2, 0x3ad2, 0x3ad1, 0x3ad1, - 0x3ad1, 0x3ad1, 0x3ad0, 0x3ad0, 0x3ad0, 0x3ad0, 0x3ad0, 0x3acf, - 0x3acf, 0x3acf, 0x3acf, 0x3acf, 0x3ace, 0x3ace, 0x3ace, 0x3ace, - 0x3ace, 0x3acd, 0x3acd, 0x3acd, 0x3acd, 0x3acc, 0x3acc, 0x3acc, - 0x3acc, 0x3acc, 0x3acb, 0x3acb, 0x3acb, 0x3acb, 0x3acb, 0x3aca, - 0x3aca, 0x3aca, 0x3aca, 0x3ac9, 0x3ac9, 0x3ac9, 0x3ac9, 0x3ac9, - 0x3ac8, 0x3ac8, 0x3ac8, 0x3ac8, 0x3ac8, 0x3ac7, 0x3ac7, 0x3ac7, - 0x3ac7, 0x3ac7, 0x3ac6, 0x3ac6, 0x3ac6, 0x3ac6, 0x3ac5, 0x3ac5, - 0x3ac5, 0x3ac5, 0x3ac5, 0x3ac4, 0x3ac4, 0x3ac4, 0x3ac4, 0x3ac4, - 0x3ac3, 0x3ac3, 0x3ac3, 0x3ac3, 0x3ac2, 0x3ac2, 0x3ac2, 0x3ac2, - 0x3ac2, 0x3ac1, 0x3ac1, 0x3ac1, 0x3ac1, 0x3ac1, 0x3ac0, 0x3ac0, - 0x3ac0, 0x3ac0, 0x3ac0, 0x3abf, 0x3abf, 0x3abf, 0x3abf, 0x3abe, - 0x3abe, 0x3abe, 0x3abe, 0x3abe, 0x3abd, 0x3abd, 0x3abd, 0x3abd, - 0x3abd, 0x3abc, 0x3abc, 0x3abc, 0x3abc, 0x3abc, 0x3abb, 0x3abb, - 0x3abb, 0x3abb, 0x3aba, 0x3aba, 0x3aba, 0x3aba, 0x3aba, 0x3ab9, - 0x3ab9, 0x3ab9, 0x3ab9, 0x3ab9, 0x3ab8, 0x3ab8, 0x3ab8, 0x3ab8, - 0x3ab8, 0x3ab7, 0x3ab7, 0x3ab7, 0x3ab7, 0x3ab6, 0x3ab6, 0x3ab6, - 0x3ab6, 0x3ab6, 0x3ab5, 0x3ab5, 0x3ab5, 0x3ab5, 0x3ab5, 0x3ab4, - 0x3ab4, 0x3ab4, 0x3ab4, 0x3ab4, 0x3ab3, 0x3ab3, 0x3ab3, 0x3ab3, - 0x3ab3, 0x3ab2, 0x3ab2, 0x3ab2, 0x3ab2, 0x3ab1, 0x3ab1, 0x3ab1, - 0x3ab1, 0x3ab1, 0x3ab0, 0x3ab0, 0x3ab0, 0x3ab0, 0x3ab0, 0x3aaf, - 0x3aaf, 0x3aaf, 0x3aaf, 0x3aaf, 0x3aae, 0x3aae, 0x3aae, 0x3aae, - 0x3aad, 0x3aad, 0x3aad, 0x3aad, 0x3aad, 0x3aac, 0x3aac, 0x3aac, - 0x3aac, 0x3aac, 0x3aab, 0x3aab, 0x3aab, 0x3aab, 0x3aab, 0x3aaa, - 0x3aaa, 0x3aaa, 0x3aaa, 0x3aaa, 0x3aa9, 0x3aa9, 0x3aa9, 0x3aa9, - 0x3aa8, 0x3aa8, 0x3aa8, 0x3aa8, 0x3aa8, 0x3aa7, 0x3aa7, 0x3aa7, - 0x3aa7, 0x3aa7, 0x3aa6, 0x3aa6, 0x3aa6, 0x3aa6, 0x3aa6, 0x3aa5, - 0x3aa5, 0x3aa5, 0x3aa5, 0x3aa5, 0x3aa4, 0x3aa4, 0x3aa4, 0x3aa4, - 0x3aa4, 0x3aa3, 0x3aa3, 0x3aa3, 0x3aa3, 0x3aa2, 0x3aa2, 0x3aa2, - 0x3aa2, 0x3aa2, 0x3aa1, 0x3aa1, 0x3aa1, 0x3aa1, 0x3aa1, 0x3aa0, - 0x3aa0, 0x3aa0, 0x3aa0, 0x3aa0, 0x3a9f, 0x3a9f, 0x3a9f, 0x3a9f, - 0x3a9f, 0x3a9e, 0x3a9e, 0x3a9e, 0x3a9e, 0x3a9e, 0x3a9d, 0x3a9d, - 0x3a9d, 0x3a9d, 0x3a9c, 0x3a9c, 0x3a9c, 0x3a9c, 0x3a9c, 0x3a9b, - 0x3a9b, 0x3a9b, 0x3a9b, 0x3a9b, 0x3a9a, 0x3a9a, 0x3a9a, 0x3a9a, - 0x3a9a, 0x3a99, 0x3a99, 0x3a99, 0x3a99, 0x3a99, 0x3a98, 0x3a98, - 0x3a98, 0x3a98, 0x3a98, 0x3a97, 0x3a97, 0x3a97, 0x3a97, 0x3a96, - 0x3a96, 0x3a96, 0x3a96, 0x3a96, 0x3a95, 0x3a95, 0x3a95, 0x3a95, - 0x3a95, 0x3a94, 0x3a94, 0x3a94, 0x3a94, 0x3a94, 0x3a93, 0x3a93, - 0x3a93, 0x3a93, 0x3a93, 0x3a92, 0x3a92, 0x3a92, 0x3a92, 0x3a92, - 0x3a91, 0x3a91, 0x3a91, 0x3a91, 0x3a91, 0x3a90, 0x3a90, 0x3a90, - 0x3a90, 0x3a90, 0x3a8f, 0x3a8f, 0x3a8f, 0x3a8f, 0x3a8e, 0x3a8e, - 0x3a8e, 0x3a8e, 0x3a8e, 0x3a8d, 0x3a8d, 0x3a8d, 0x3a8d, 0x3a8d, - 0x3a8c, 0x3a8c, 0x3a8c, 0x3a8c, 0x3a8c, 0x3a8b, 0x3a8b, 0x3a8b, - 0x3a8b, 0x3a8b, 0x3a8a, 0x3a8a, 0x3a8a, 0x3a8a, 0x3a8a, 0x3a89, - 0x3a89, 0x3a89, 0x3a89, 0x3a89, 0x3a88, 0x3a88, 0x3a88, 0x3a88, - 0x3a88, 0x3a87, 0x3a87, 0x3a87, 0x3a87, 0x3a87, 0x3a86, 0x3a86, - 0x3a86, 0x3a86, 0x3a85, 0x3a85, 0x3a85, 0x3a85, 0x3a85, 0x3a84, - 0x3a84, 0x3a84, 0x3a84, 0x3a84, 0x3a83, 0x3a83, 0x3a83, 0x3a83, - 0x3a83, 0x3a82, 0x3a82, 0x3a82, 0x3a82, 0x3a82, 0x3a81, 0x3a81, - 0x3a81, 0x3a81, 0x3a81, 0x3a80, 0x3a80, 0x3a80, 0x3a80, 0x3a80, - 0x3a7f, 0x3a7f, 0x3a7f, 0x3a7f, 0x3a7f, 0x3a7e, 0x3a7e, 0x3a7e, - 0x3a7e, 0x3a7e, 0x3a7d, 0x3a7d, 0x3a7d, 0x3a7d, 0x3a7d, 0x3a7c, - 0x3a7c, 0x3a7c, 0x3a7c, 0x3a7c, 0x3a7b, 0x3a7b, 0x3a7b, 0x3a7b, - 0x3a7b, 0x3a7a, 0x3a7a, 0x3a7a, 0x3a7a, 0x3a7a, 0x3a79, 0x3a79, - 0x3a79, 0x3a79, 0x3a78, 0x3a78, 0x3a78, 0x3a78, 0x3a78, 0x3a77, - 0x3a77, 0x3a77, 0x3a77, 0x3a77, 0x3a76, 0x3a76, 0x3a76, 0x3a76, - 0x3a76, 0x3a75, 0x3a75, 0x3a75, 0x3a75, 0x3a75, 0x3a74, 0x3a74, - 0x3a74, 0x3a74, 0x3a74, 0x3a73, 0x3a73, 0x3a73, 0x3a73, 0x3a73, - 0x3a72, 0x3a72, 0x3a72, 0x3a72, 0x3a72, 0x3a71, 0x3a71, 0x3a71, - 0x3a71, 0x3a71, 0x3a70, 0x3a70, 0x3a70, 0x3a70, 0x3a70, 0x3a6f, - 0x3a6f, 0x3a6f, 0x3a6f, 0x3a6f, 0x3a6e, 0x3a6e, 0x3a6e, 0x3a6e, - 0x3a6e, 0x3a6d, 0x3a6d, 0x3a6d, 0x3a6d, 0x3a6d, 0x3a6c, 0x3a6c, - 0x3a6c, 0x3a6c, 0x3a6c, 0x3a6b, 0x3a6b, 0x3a6b, 0x3a6b, 0x3a6b, - 0x3a6a, 0x3a6a, 0x3a6a, 0x3a6a, 0x3a6a, 0x3a69, 0x3a69, 0x3a69, - 0x3a69, 0x3a69, 0x3a68, 0x3a68, 0x3a68, 0x3a68, 0x3a68, 0x3a67, - 0x3a67, 0x3a67, 0x3a67, 0x3a67, 0x3a66, 0x3a66, 0x3a66, 0x3a66, - 0x3a66, 0x3a65, 0x3a65, 0x3a65, 0x3a65, 0x3a65, 0x3a64, 0x3a64, - 0x3a64, 0x3a64, 0x3a64, 0x3a63, 0x3a63, 0x3a63, 0x3a63, 0x3a63, - 0x3a62, 0x3a62, 0x3a62, 0x3a62, 0x3a62, 0x3a61, 0x3a61, 0x3a61, - 0x3a61, 0x3a61, 0x3a60, 0x3a60, 0x3a60, 0x3a60, 0x3a60, 0x3a5f, - 0x3a5f, 0x3a5f, 0x3a5f, 0x3a5f, 0x3a5e, 0x3a5e, 0x3a5e, 0x3a5e, - 0x3a5e, 0x3a5d, 0x3a5d, 0x3a5d, 0x3a5d, 0x3a5d, 0x3a5c, 0x3a5c, - 0x3a5c, 0x3a5c, 0x3a5c, 0x3a5b, 0x3a5b, 0x3a5b, 0x3a5b, 0x3a5b, - 0x3a5a, 0x3a5a, 0x3a5a, 0x3a5a, 0x3a5a, 0x3a59, 0x3a59, 0x3a59, - 0x3a59, 0x3a59, 0x3a58, 0x3a58, 0x3a58, 0x3a58, 0x3a58, 0x3a57, - 0x3a57, 0x3a57, 0x3a57, 0x3a57, 0x3a56, 0x3a56, 0x3a56, 0x3a56, - 0x3a56, 0x3a55, 0x3a55, 0x3a55, 0x3a55, 0x3a55, 0x3a54, 0x3a54, - 0x3a54, 0x3a54, 0x3a54, 0x3a54, 0x3a53, 0x3a53, 0x3a53, 0x3a53, - 0x3a53, 0x3a52, 0x3a52, 0x3a52, 0x3a52, 0x3a52, 0x3a51, 0x3a51, - 0x3a51, 0x3a51, 0x3a51, 0x3a50, 0x3a50, 0x3a50, 0x3a50, 0x3a50, - 0x3a4f, 0x3a4f, 0x3a4f, 0x3a4f, 0x3a4f, 0x3a4e, 0x3a4e, 0x3a4e, - 0x3a4e, 0x3a4e, 0x3a4d, 0x3a4d, 0x3a4d, 0x3a4d, 0x3a4d, 0x3a4c, - 0x3a4c, 0x3a4c, 0x3a4c, 0x3a4c, 0x3a4b, 0x3a4b, 0x3a4b, 0x3a4b, - 0x3a4b, 0x3a4a, 0x3a4a, 0x3a4a, 0x3a4a, 0x3a4a, 0x3a49, 0x3a49, - 0x3a49, 0x3a49, 0x3a49, 0x3a48, 0x3a48, 0x3a48, 0x3a48, 0x3a48, - 0x3a47, 0x3a47, 0x3a47, 0x3a47, 0x3a47, 0x3a47, 0x3a46, 0x3a46, - 0x3a46, 0x3a46, 0x3a46, 0x3a45, 0x3a45, 0x3a45, 0x3a45, 0x3a45, - 0x3a44, 0x3a44, 0x3a44, 0x3a44, 0x3a44, 0x3a43, 0x3a43, 0x3a43, - 0x3a43, 0x3a43, 0x3a42, 0x3a42, 0x3a42, 0x3a42, 0x3a42, 0x3a41, - 0x3a41, 0x3a41, 0x3a41, 0x3a41, 0x3a40, 0x3a40, 0x3a40, 0x3a40, - 0x3a40, 0x3a3f, 0x3a3f, 0x3a3f, 0x3a3f, 0x3a3f, 0x3a3e, 0x3a3e, - 0x3a3e, 0x3a3e, 0x3a3e, 0x3a3e, 0x3a3d, 0x3a3d, 0x3a3d, 0x3a3d, - 0x3a3d, 0x3a3c, 0x3a3c, 0x3a3c, 0x3a3c, 0x3a3c, 0x3a3b, 0x3a3b, - 0x3a3b, 0x3a3b, 0x3a3a, 0x3a3a, 0x3a39, 0x3a39, 0x3a39, 0x3a38, - 0x3a38, 0x3a37, 0x3a37, 0x3a37, 0x3a36, 0x3a36, 0x3a36, 0x3a35, - 0x3a35, 0x3a34, 0x3a34, 0x3a34, 0x3a33, 0x3a33, 0x3a32, 0x3a32, - 0x3a32, 0x3a31, 0x3a31, 0x3a31, 0x3a30, 0x3a30, 0x3a2f, 0x3a2f, - 0x3a2f, 0x3a2e, 0x3a2e, 0x3a2d, 0x3a2d, 0x3a2d, 0x3a2c, 0x3a2c, - 0x3a2b, 0x3a2b, 0x3a2b, 0x3a2a, 0x3a2a, 0x3a2a, 0x3a29, 0x3a29, - 0x3a28, 0x3a28, 0x3a28, 0x3a27, 0x3a27, 0x3a26, 0x3a26, 0x3a26, - 0x3a25, 0x3a25, 0x3a25, 0x3a24, 0x3a24, 0x3a23, 0x3a23, 0x3a23, - 0x3a22, 0x3a22, 0x3a21, 0x3a21, 0x3a21, 0x3a20, 0x3a20, 0x3a20, - 0x3a1f, 0x3a1f, 0x3a1e, 0x3a1e, 0x3a1e, 0x3a1d, 0x3a1d, 0x3a1d, - 0x3a1c, 0x3a1c, 0x3a1b, 0x3a1b, 0x3a1b, 0x3a1a, 0x3a1a, 0x3a19, - 0x3a19, 0x3a19, 0x3a18, 0x3a18, 0x3a18, 0x3a17, 0x3a17, 0x3a16, - 0x3a16, 0x3a16, 0x3a15, 0x3a15, 0x3a15, 0x3a14, 0x3a14, 0x3a13, - 0x3a13, 0x3a13, 0x3a12, 0x3a12, 0x3a11, 0x3a11, 0x3a11, 0x3a10, - 0x3a10, 0x3a10, 0x3a0f, 0x3a0f, 0x3a0e, 0x3a0e, 0x3a0e, 0x3a0d, - 0x3a0d, 0x3a0d, 0x3a0c, 0x3a0c, 0x3a0b, 0x3a0b, 0x3a0b, 0x3a0a, - 0x3a0a, 0x3a0a, 0x3a09, 0x3a09, 0x3a08, 0x3a08, 0x3a08, 0x3a07, - 0x3a07, 0x3a07, 0x3a06, 0x3a06, 0x3a05, 0x3a05, 0x3a05, 0x3a04, - 0x3a04, 0x3a04, 0x3a03, 0x3a03, 0x3a02, 0x3a02, 0x3a02, 0x3a01, - 0x3a01, 0x3a01, 0x3a00, 0x3a00, 0x39ff, 0x39ff, 0x39ff, 0x39fe, - 0x39fe, 0x39fe, 0x39fd, 0x39fd, 0x39fc, 0x39fc, 0x39fc, 0x39fb, - 0x39fb, 0x39fb, 0x39fa, 0x39fa, 0x39f9, 0x39f9, 0x39f9, 0x39f8, - 0x39f8, 0x39f8, 0x39f7, 0x39f7, 0x39f6, 0x39f6, 0x39f6, 0x39f5, - 0x39f5, 0x39f5, 0x39f4, 0x39f4, 0x39f3, 0x39f3, 0x39f3, 0x39f2, - 0x39f2, 0x39f2, 0x39f1, 0x39f1, 0x39f0, 0x39f0, 0x39f0, 0x39ef, - 0x39ef, 0x39ef, 0x39ee, 0x39ee, 0x39ed, 0x39ed, 0x39ed, 0x39ec, - 0x39ec, 0x39ec, 0x39eb, 0x39eb, 0x39eb, 0x39ea, 0x39ea, 0x39e9, - 0x39e9, 0x39e9, 0x39e8, 0x39e8, 0x39e8, 0x39e7, 0x39e7, 0x39e6, - 0x39e6, 0x39e6, 0x39e5, 0x39e5, 0x39e5, 0x39e4, 0x39e4, 0x39e4, - 0x39e3, 0x39e3, 0x39e2, 0x39e2, 0x39e2, 0x39e1, 0x39e1, 0x39e1, - 0x39e0, 0x39e0, 0x39df, 0x39df, 0x39df, 0x39de, 0x39de, 0x39de, - 0x39dd, 0x39dd, 0x39dd, 0x39dc, 0x39dc, 0x39db, 0x39db, 0x39db, - 0x39da, 0x39da, 0x39da, 0x39d9, 0x39d9, 0x39d9, 0x39d8, 0x39d8, - 0x39d7, 0x39d7, 0x39d7, 0x39d6, 0x39d6, 0x39d6, 0x39d5, 0x39d5, - 0x39d5, 0x39d4, 0x39d4, 0x39d3, 0x39d3, 0x39d3, 0x39d2, 0x39d2, - 0x39d2, 0x39d1, 0x39d1, 0x39d1, 0x39d0, 0x39d0, 0x39cf, 0x39cf, - 0x39cf, 0x39ce, 0x39ce, 0x39ce, 0x39cd, 0x39cd, 0x39cd, 0x39cc, - 0x39cc, 0x39cb, 0x39cb, 0x39cb, 0x39ca, 0x39ca, 0x39ca, 0x39c9, - 0x39c9, 0x39c9, 0x39c8, 0x39c8, 0x39c7, 0x39c7, 0x39c7, 0x39c6, - 0x39c6, 0x39c6, 0x39c5, 0x39c5, 0x39c5, 0x39c4, 0x39c4, 0x39c3, - 0x39c3, 0x39c3, 0x39c2, 0x39c2, 0x39c2, 0x39c1, 0x39c1, 0x39c1, - 0x39c0, 0x39c0, 0x39c0, 0x39bf, 0x39bf, 0x39be, 0x39be, 0x39be, - 0x39bd, 0x39bd, 0x39bd, 0x39bc, 0x39bc, 0x39bc, 0x39bb, 0x39bb, - 0x39bb, 0x39ba, 0x39ba, 0x39b9, 0x39b9, 0x39b9, 0x39b8, 0x39b8, - 0x39b8, 0x39b7, 0x39b7, 0x39b7, 0x39b6, 0x39b6, 0x39b5, 0x39b5, - 0x39b5, 0x39b4, 0x39b4, 0x39b4, 0x39b3, 0x39b3, 0x39b3, 0x39b2, - 0x39b2, 0x39b2, 0x39b1, 0x39b1, 0x39b1, 0x39b0, 0x39b0, 0x39af, - 0x39af, 0x39af, 0x39ae, 0x39ae, 0x39ae, 0x39ad, 0x39ad, 0x39ad, - 0x39ac, 0x39ac, 0x39ac, 0x39ab, 0x39ab, 0x39aa, 0x39aa, 0x39aa, - 0x39a9, 0x39a9, 0x39a9, 0x39a8, 0x39a8, 0x39a8, 0x39a7, 0x39a7, - 0x39a7, 0x39a6, 0x39a6, 0x39a6, 0x39a5, 0x39a5, 0x39a4, 0x39a4, - 0x39a4, 0x39a3, 0x39a3, 0x39a3, 0x39a2, 0x39a2, 0x39a2, 0x39a1, - 0x39a1, 0x39a1, 0x39a0, 0x39a0, 0x39a0, 0x399f, 0x399f, 0x399e, - 0x399e, 0x399e, 0x399d, 0x399d, 0x399d, 0x399c, 0x399c, 0x399c, - 0x399b, 0x399b, 0x399b, 0x399a, 0x399a, 0x399a, 0x3999, 0x3999, - 0x3999, 0x3998, 0x3998, 0x3997, 0x3997, 0x3997, 0x3996, 0x3996, - 0x3996, 0x3995, 0x3995, 0x3995, 0x3994, 0x3994, 0x3994, 0x3993, - 0x3993, 0x3993, 0x3992, 0x3992, 0x3992, 0x3991, 0x3991, 0x3991, - 0x3990, 0x3990, 0x398f, 0x398f, 0x398f, 0x398e, 0x398e, 0x398e, - 0x398d, 0x398d, 0x398d, 0x398c, 0x398c, 0x398c, 0x398b, 0x398b, - 0x398b, 0x398a, 0x398a, 0x398a, 0x3989, 0x3989, 0x3989, 0x3988, - 0x3988, 0x3987, 0x3987, 0x3987, 0x3986, 0x3986, 0x3986, 0x3985, - 0x3985, 0x3985, 0x3984, 0x3984, 0x3984, 0x3983, 0x3983, 0x3983, - 0x3982, 0x3982, 0x3982, 0x3981, 0x3981, 0x3981, 0x3980, 0x3980, - 0x3980, 0x397f, 0x397f, 0x397f, 0x397e, 0x397e, 0x397e, 0x397d, - 0x397d, 0x397c, 0x397c, 0x397c, 0x397b, 0x397b, 0x397b, 0x397a, - 0x397a, 0x397a, 0x3979, 0x3979, 0x3979, 0x3978, 0x3978, 0x3978, - 0x3977, 0x3977, 0x3977, 0x3976, 0x3976, 0x3976, 0x3975, 0x3975, - 0x3975, 0x3974, 0x3974, 0x3974, 0x3973, 0x3973, 0x3973, 0x3972, - 0x3972, 0x3972, 0x3971, 0x3971, 0x3971, 0x3970, 0x3970, 0x3970, - 0x396f, 0x396f, 0x396e, 0x396e, 0x396e, 0x396d, 0x396d, 0x396d, - 0x396c, 0x396c, 0x396c, 0x396b, 0x396b, 0x396b, 0x396a, 0x396a, - 0x396a, 0x3969, 0x3969, 0x3969, 0x3968, 0x3968, 0x3968, 0x3967, - 0x3967, 0x3967, 0x3966, 0x3966, 0x3966, 0x3965, 0x3965, 0x3965, - 0x3964, 0x3964, 0x3964, 0x3963, 0x3963, 0x3963, 0x3962, 0x3962, - 0x3962, 0x3961, 0x3961, 0x3961, 0x3960, 0x3960, 0x3960, 0x395f, - 0x395f, 0x395f, 0x395e, 0x395e, 0x395e, 0x395d, 0x395d, 0x395d, - 0x395c, 0x395c, 0x395c, 0x395b, 0x395b, 0x395b, 0x395a, 0x395a, - 0x395a, 0x3959, 0x3959, 0x3959, 0x3958, 0x3958, 0x3958, 0x3957, - 0x3957, 0x3957, 0x3956, 0x3956, 0x3956, 0x3955, 0x3955, 0x3955, - 0x3954, 0x3954, 0x3954, 0x3953, 0x3953, 0x3953, 0x3952, 0x3952, - 0x3952, 0x3951, 0x3951, 0x3951, 0x3950, 0x3950, 0x3950, 0x394f, - 0x394f, 0x394f, 0x394e, 0x394e, 0x394e, 0x394d, 0x394d, 0x394d, - 0x394c, 0x394c, 0x394c, 0x394b, 0x394b, 0x394b, 0x394a, 0x394a, - 0x394a, 0x3949, 0x3949, 0x3949, 0x3948, 0x3948, 0x3948, 0x3947, - 0x3947, 0x3947, 0x3946, 0x3946, 0x3946, 0x3945, 0x3945, 0x3945, - 0x3944, 0x3944, 0x3944, 0x3943, 0x3943, 0x3943, 0x3942, 0x3942, - 0x3942, 0x3941, 0x3941, 0x3941, 0x3940, 0x3940, 0x3940, 0x393f, - 0x393f, 0x393f, 0x393e, 0x393e, 0x393e, 0x393d, 0x393d, 0x393d, - 0x393c, 0x393c, 0x393c, 0x393c, 0x393b, 0x393b, 0x393b, 0x393a, - 0x393a, 0x393a, 0x3939, 0x3939, 0x3939, 0x3938, 0x3938, 0x3938, - 0x3937, 0x3937, 0x3937, 0x3936, 0x3936, 0x3936, 0x3935, 0x3935, - 0x3935, 0x3934, 0x3934, 0x3934, 0x3933, 0x3933, 0x3933, 0x3932, - 0x3932, 0x3932, 0x3931, 0x3931, 0x3931, 0x3930, 0x3930, 0x3930, - 0x392f, 0x392f, 0x392f, 0x392e, 0x392e, 0x392e, 0x392e, 0x392d, - 0x392d, 0x392d, 0x392c, 0x392c, 0x392c, 0x392b, 0x392b, 0x392b, - 0x392a, 0x392a, 0x392a, 0x3929, 0x3929, 0x3929, 0x3928, 0x3928, - 0x3928, 0x3927, 0x3927, 0x3927, 0x3926, 0x3926, 0x3926, 0x3925, - 0x3925, 0x3925, 0x3924, 0x3924, 0x3924, 0x3924, 0x3923, 0x3923, - 0x3923, 0x3922, 0x3922, 0x3922, 0x3921, 0x3921, 0x3921, 0x3920, - 0x3920, 0x3920, 0x391f, 0x391f, 0x391f, 0x391e, 0x391e, 0x391e, - 0x391d, 0x391d, 0x391d, 0x391c, 0x391c, 0x391c, 0x391c, 0x391b, - 0x391b, 0x391b, 0x391a, 0x391a, 0x391a, 0x3919, 0x3919, 0x3919, - 0x3918, 0x3918, 0x3918, 0x3917, 0x3917, 0x3917, 0x3916, 0x3916, - 0x3916, 0x3915, 0x3915, 0x3915, 0x3915, 0x3914, 0x3914, 0x3914, - 0x3913, 0x3913, 0x3913, 0x3912, 0x3912, 0x3912, 0x3911, 0x3911, - 0x3911, 0x3910, 0x3910, 0x3910, 0x390f, 0x390f, 0x390f, 0x390e, - 0x390e, 0x390e, 0x390e, 0x390d, 0x390d, 0x390d, 0x390c, 0x390c, - 0x390c, 0x390b, 0x390b, 0x390b, 0x390a, 0x390a, 0x390a, 0x3909, - 0x3909, 0x3909, 0x3909, 0x3908, 0x3908, 0x3908, 0x3907, 0x3907, - 0x3907, 0x3906, 0x3906, 0x3906, 0x3905, 0x3905, 0x3905, 0x3904, - 0x3904, 0x3904, 0x3903, 0x3903, 0x3903, 0x3903, 0x3902, 0x3902, - 0x3902, 0x3901, 0x3901, 0x3901, 0x3900, 0x3900, 0x3900, 0x38ff, - 0x38ff, 0x38ff, 0x38fe, 0x38fe, 0x38fe, 0x38fe, 0x38fd, 0x38fd, - 0x38fd, 0x38fc, 0x38fc, 0x38fc, 0x38fb, 0x38fb, 0x38fb, 0x38fa, - 0x38fa, 0x38fa, 0x38f9, 0x38f9, 0x38f9, 0x38f9, 0x38f8, 0x38f8, - 0x38f8, 0x38f7, 0x38f7, 0x38f7, 0x38f6, 0x38f6, 0x38f6, 0x38f5, - 0x38f5, 0x38f5, 0x38f5, 0x38f4, 0x38f4, 0x38f4, 0x38f3, 0x38f3, - 0x38f3, 0x38f2, 0x38f2, 0x38f2, 0x38f1, 0x38f1, 0x38f1, 0x38f1, - 0x38f0, 0x38f0, 0x38f0, 0x38ef, 0x38ef, 0x38ef, 0x38ee, 0x38ee, - 0x38ee, 0x38ed, 0x38ed, 0x38ed, 0x38ed, 0x38ec, 0x38ec, 0x38ec, - 0x38eb, 0x38eb, 0x38eb, 0x38ea, 0x38ea, 0x38ea, 0x38e9, 0x38e9, - 0x38e9, 0x38e9, 0x38e8, 0x38e8, 0x38e8, 0x38e7, 0x38e7, 0x38e7, - 0x38e6, 0x38e6, 0x38e6, 0x38e5, 0x38e5, 0x38e5, 0x38e5, 0x38e4, - 0x38e4, 0x38e4, 0x38e3, 0x38e3, 0x38e3, 0x38e2, 0x38e2, 0x38e2, - 0x38e1, 0x38e1, 0x38e1, 0x38e1, 0x38e0, 0x38e0, 0x38e0, 0x38df, - 0x38df, 0x38df, 0x38de, 0x38de, 0x38de, 0x38de, 0x38dd, 0x38dd, - 0x38dd, 0x38dc, 0x38dc, 0x38dc, 0x38db, 0x38db, 0x38db, 0x38da, - 0x38da, 0x38da, 0x38d9, 0x38d8, 0x38d8, 0x38d7, 0x38d7, 0x38d6, - 0x38d5, 0x38d5, 0x38d4, 0x38d4, 0x38d3, 0x38d2, 0x38d2, 0x38d1, - 0x38d1, 0x38d0, 0x38cf, 0x38cf, 0x38ce, 0x38ce, 0x38cd, 0x38cc, - 0x38cc, 0x38cb, 0x38cb, 0x38ca, 0x38c9, 0x38c9, 0x38c8, 0x38c8, - 0x38c7, 0x38c6, 0x38c6, 0x38c5, 0x38c5, 0x38c4, 0x38c3, 0x38c3, - 0x38c2, 0x38c2, 0x38c1, 0x38c0, 0x38c0, 0x38bf, 0x38bf, 0x38be, - 0x38bd, 0x38bd, 0x38bc, 0x38bc, 0x38bb, 0x38ba, 0x38ba, 0x38b9, - 0x38b9, 0x38b8, 0x38b7, 0x38b7, 0x38b6, 0x38b6, 0x38b5, 0x38b5, - 0x38b4, 0x38b3, 0x38b3, 0x38b2, 0x38b2, 0x38b1, 0x38b0, 0x38b0, - 0x38af, 0x38af, 0x38ae, 0x38ae, 0x38ad, 0x38ac, 0x38ac, 0x38ab, - 0x38ab, 0x38aa, 0x38a9, 0x38a9, 0x38a8, 0x38a8, 0x38a7, 0x38a7, - 0x38a6, 0x38a5, 0x38a5, 0x38a4, 0x38a4, 0x38a3, 0x38a2, 0x38a2, - 0x38a1, 0x38a1, 0x38a0, 0x38a0, 0x389f, 0x389e, 0x389e, 0x389d, - 0x389d, 0x389c, 0x389c, 0x389b, 0x389a, 0x389a, 0x3899, 0x3899, - 0x3898, 0x3897, 0x3897, 0x3896, 0x3896, 0x3895, 0x3895, 0x3894, - 0x3893, 0x3893, 0x3892, 0x3892, 0x3891, 0x3891, 0x3890, 0x388f, - 0x388f, 0x388e, 0x388e, 0x388d, 0x388d, 0x388c, 0x388c, 0x388b, - 0x388a, 0x388a, 0x3889, 0x3889, 0x3888, 0x3888, 0x3887, 0x3886, - 0x3886, 0x3885, 0x3885, 0x3884, 0x3884, 0x3883, 0x3882, 0x3882, - 0x3881, 0x3881, 0x3880, 0x3880, 0x387f, 0x387f, 0x387e, 0x387d, - 0x387d, 0x387c, 0x387c, 0x387b, 0x387b, 0x387a, 0x3879, 0x3879, - 0x3878, 0x3878, 0x3877, 0x3877, 0x3876, 0x3876, 0x3875, 0x3874, - 0x3874, 0x3873, 0x3873, 0x3872, 0x3872, 0x3871, 0x3871, 0x3870, - 0x386f, 0x386f, 0x386e, 0x386e, 0x386d, 0x386d, 0x386c, 0x386c, - 0x386b, 0x386a, 0x386a, 0x3869, 0x3869, 0x3868, 0x3868, 0x3867, - 0x3867, 0x3866, 0x3866, 0x3865, 0x3864, 0x3864, 0x3863, 0x3863, - 0x3862, 0x3862, 0x3861, 0x3861, 0x3860, 0x385f, 0x385f, 0x385e, - 0x385e, 0x385d, 0x385d, 0x385c, 0x385c, 0x385b, 0x385b, 0x385a, - 0x3859, 0x3859, 0x3858, 0x3858, 0x3857, 0x3857, 0x3856, 0x3856, - 0x3855, 0x3855, 0x3854, 0x3854, 0x3853, 0x3852, 0x3852, 0x3851, - 0x3851, 0x3850, 0x3850, 0x384f, 0x384f, 0x384e, 0x384e, 0x384d, - 0x384d, 0x384c, 0x384b, 0x384b, 0x384a, 0x384a, 0x3849, 0x3849, - 0x3848, 0x3848, 0x3847, 0x3847, 0x3846, 0x3846, 0x3845, 0x3844, - 0x3844, 0x3843, 0x3843, 0x3842, 0x3842, 0x3841, 0x3841, 0x3840, - 0x3840, 0x383f, 0x383f, 0x383e, 0x383e, 0x383d, 0x383d, 0x383c, - 0x383b, 0x383b, 0x383a, 0x383a, 0x3839, 0x3839, 0x3838, 0x3838, - 0x3837, 0x3837, 0x3836, 0x3836, 0x3835, 0x3835, 0x3834, 0x3834, - 0x3833, 0x3832, 0x3832, 0x3831, 0x3831, 0x3830, 0x3830, 0x382f, - 0x382f, 0x382e, 0x382e, 0x382d, 0x382d, 0x382c, 0x382c, 0x382b, - 0x382b, 0x382a, 0x382a, 0x3829, 0x3829, 0x3828, 0x3828, 0x3827, - 0x3826, 0x3826, 0x3825, 0x3825, 0x3824, 0x3824, 0x3823, 0x3823, - 0x3822, 0x3822, 0x3821, 0x3821, 0x3820, 0x3820, 0x381f, 0x381f, - 0x381e, 0x381e, 0x381d, 0x381d, 0x381c, 0x381c, 0x381b, 0x381b, - 0x381a, 0x381a, 0x3819, 0x3819, 0x3818, 0x3818, 0x3817, 0x3817, - 0x3816, 0x3816, 0x3815, 0x3814, 0x3814, 0x3813, 0x3813, 0x3812, - 0x3812, 0x3811, 0x3811, 0x3810, 0x3810, 0x380f, 0x380f, 0x380e, - 0x380e, 0x380d, 0x380d, 0x380c, 0x380c, 0x380b, 0x380b, 0x380a, - 0x380a, 0x3809, 0x3809, 0x3808, 0x3808, 0x3807, 0x3807, 0x3806, - 0x3806, 0x3805, 0x3805, 0x3804, 0x3804, 0x3803, 0x3803, 0x3802, - 0x3802, 0x3801, 0x3801, 0x3800, 0x3800, 0x37ff, 0x37fe, 0x37fd, - 0x37fc, 0x37fb, 0x37fa, 0x37f9, 0x37f8, 0x37f7, 0x37f6, 0x37f5, - 0x37f4, 0x37f3, 0x37f2, 0x37f1, 0x37f0, 0x37ef, 0x37ee, 0x37ed, - 0x37ec, 0x37eb, 0x37ea, 0x37e9, 0x37e8, 0x37e7, 0x37e6, 0x37e5, - 0x37e4, 0x37e3, 0x37e2, 0x37e1, 0x37e0, 0x37df, 0x37de, 0x37dd, - 0x37dc, 0x37db, 0x37da, 0x37d9, 0x37d8, 0x37d7, 0x37d6, 0x37d5, - 0x37d4, 0x37d3, 0x37d2, 0x37d1, 0x37d0, 0x37cf, 0x37ce, 0x37cd, - 0x37cc, 0x37cb, 0x37ca, 0x37c9, 0x37c8, 0x37c7, 0x37c6, 0x37c5, - 0x37c4, 0x37c3, 0x37c3, 0x37c2, 0x37c1, 0x37c0, 0x37bf, 0x37be, - 0x37bd, 0x37bc, 0x37bb, 0x37ba, 0x37b9, 0x37b8, 0x37b7, 0x37b6, - 0x37b5, 0x37b4, 0x37b3, 0x37b2, 0x37b1, 0x37b0, 0x37af, 0x37ae, - 0x37ad, 0x37ac, 0x37ab, 0x37aa, 0x37a9, 0x37a8, 0x37a8, 0x37a7, - 0x37a6, 0x37a5, 0x37a4, 0x37a3, 0x37a2, 0x37a1, 0x37a0, 0x379f, - 0x379e, 0x379d, 0x379c, 0x379b, 0x379a, 0x3799, 0x3798, 0x3797, - 0x3796, 0x3795, 0x3794, 0x3794, 0x3793, 0x3792, 0x3791, 0x3790, - 0x378f, 0x378e, 0x378d, 0x378c, 0x378b, 0x378a, 0x3789, 0x3788, - 0x3787, 0x3786, 0x3785, 0x3784, 0x3784, 0x3783, 0x3782, 0x3781, - 0x3780, 0x377f, 0x377e, 0x377d, 0x377c, 0x377b, 0x377a, 0x3779, - 0x3778, 0x3777, 0x3776, 0x3775, 0x3775, 0x3774, 0x3773, 0x3772, - 0x3771, 0x3770, 0x376f, 0x376e, 0x376d, 0x376c, 0x376b, 0x376a, - 0x3769, 0x3768, 0x3768, 0x3767, 0x3766, 0x3765, 0x3764, 0x3763, - 0x3762, 0x3761, 0x3760, 0x375f, 0x375e, 0x375d, 0x375c, 0x375c, - 0x375b, 0x375a, 0x3759, 0x3758, 0x3757, 0x3756, 0x3755, 0x3754, - 0x3753, 0x3752, 0x3751, 0x3751, 0x3750, 0x374f, 0x374e, 0x374d, - 0x374c, 0x374b, 0x374a, 0x3749, 0x3748, 0x3747, 0x3747, 0x3746, - 0x3745, 0x3744, 0x3743, 0x3742, 0x3741, 0x3740, 0x373f, 0x373e, - 0x373d, 0x373d, 0x373c, 0x373b, 0x373a, 0x3739, 0x3738, 0x3737, - 0x3736, 0x3735, 0x3734, 0x3734, 0x3733, 0x3732, 0x3731, 0x3730, - 0x372f, 0x372e, 0x372d, 0x372c, 0x372b, 0x372b, 0x372a, 0x3729, - 0x3728, 0x3727, 0x3726, 0x3725, 0x3724, 0x3723, 0x3722, 0x3722, - 0x3721, 0x3720, 0x371f, 0x371e, 0x371d, 0x371c, 0x371b, 0x371a, - 0x371a, 0x3719, 0x3718, 0x3717, 0x3716, 0x3715, 0x3714, 0x3713, - 0x3713, 0x3712, 0x3711, 0x3710, 0x370f, 0x370e, 0x370d, 0x370c, - 0x370b, 0x370b, 0x370a, 0x3709, 0x3708, 0x3707, 0x3706, 0x3705, - 0x3704, 0x3704, 0x3703, 0x3702, 0x3701, 0x3700, 0x36ff, 0x36fe, - 0x36fd, 0x36fd, 0x36fc, 0x36fb, 0x36fa, 0x36f9, 0x36f8, 0x36f7, - 0x36f6, 0x36f6, 0x36f5, 0x36f4, 0x36f3, 0x36f2, 0x36f1, 0x36f0, - 0x36ef, 0x36ef, 0x36ee, 0x36ed, 0x36ec, 0x36eb, 0x36ea, 0x36e9, - 0x36e9, 0x36e8, 0x36e7, 0x36e6, 0x36e5, 0x36e4, 0x36e3, 0x36e3, - 0x36e2, 0x36e1, 0x36e0, 0x36df, 0x36de, 0x36dd, 0x36dd, 0x36dc, - 0x36db, 0x36da, 0x36d9, 0x36d8, 0x36d7, 0x36d7, 0x36d6, 0x36d5, - 0x36d4, 0x36d3, 0x36d2, 0x36d1, 0x36d1, 0x36d0, 0x36cf, 0x36ce, - 0x36cd, 0x36cc, 0x36cb, 0x36cb, 0x36ca, 0x36c9, 0x36c8, 0x36c7, - 0x36c6, 0x36c6, 0x36c5, 0x36c4, 0x36c3, 0x36c2, 0x36c1, 0x36c0, - 0x36c0, 0x36bf, 0x36be, 0x36bd, 0x36bc, 0x36bb, 0x36bb, 0x36ba, - 0x36b9, 0x36b8, 0x36b7, 0x36b6, 0x36b6, 0x36b5, 0x36b4, 0x36b3, - 0x36b2, 0x36b1, 0x36b0, 0x36b0, 0x36af, 0x36ae, 0x36ad, 0x36ac, - 0x36ab, 0x36ab, 0x36aa, 0x36a9, 0x36a8, 0x36a7, 0x36a6, 0x36a6, - 0x36a5, 0x36a4, 0x36a3, 0x36a2, 0x36a1, 0x36a1, 0x36a0, 0x369f, - 0x369e, 0x369d, 0x369d, 0x369c, 0x369b, 0x369a, 0x3699, 0x3698, - 0x3698, 0x3697, 0x3696, 0x3695, 0x3694, 0x3693, 0x3693, 0x3692, - 0x3691, 0x3690, 0x368f, 0x368f, 0x368e, 0x368d, 0x368c, 0x368b, - 0x368a, 0x368a, 0x3689, 0x3688, 0x3687, 0x3686, 0x3686, 0x3685, - 0x3684, 0x3683, 0x3682, 0x3681, 0x3681, 0x3680, 0x367f, 0x367e, - 0x367d, 0x367d, 0x367c, 0x367b, 0x367a, 0x3679, 0x3679, 0x3678, - 0x3677, 0x3676, 0x3675, 0x3675, 0x3674, 0x3673, 0x3672, 0x3671, - 0x3670, 0x3670, 0x366f, 0x366e, 0x366d, 0x366c, 0x366c, 0x366b, - 0x366a, 0x3669, 0x3668, 0x3668, 0x3667, 0x3666, 0x3665, 0x3664, - 0x3664, 0x3663, 0x3662, 0x3661, 0x3660, 0x3660, 0x365f, 0x365e, - 0x365d, 0x365c, 0x365c, 0x365b, 0x365a, 0x3659, 0x3659, 0x3658, - 0x3657, 0x3656, 0x3655, 0x3655, 0x3654, 0x3653, 0x3652, 0x3651, - 0x3651, 0x3650, 0x364f, 0x364e, 0x364d, 0x364d, 0x364c, 0x364b, - 0x364a, 0x364a, 0x3649, 0x3648, 0x3647, 0x3646, 0x3646, 0x3645, - 0x3644, 0x3643, 0x3642, 0x3642, 0x3641, 0x3640, 0x363f, 0x363f, - 0x363e, 0x363d, 0x363c, 0x363b, 0x363b, 0x363a, 0x3639, 0x3638, - 0x3638, 0x3637, 0x3636, 0x3635, 0x3634, 0x3634, 0x3633, 0x3632, - 0x3631, 0x3631, 0x3630, 0x362f, 0x362e, 0x362d, 0x362d, 0x362c, - 0x362b, 0x362a, 0x362a, 0x3629, 0x3628, 0x3627, 0x3627, 0x3626, - 0x3625, 0x3624, 0x3623, 0x3623, 0x3622, 0x3621, 0x3620, 0x3620, - 0x361f, 0x361e, 0x361d, 0x361d, 0x361c, 0x361b, 0x361a, 0x361a, - 0x3619, 0x3618, 0x3617, 0x3616, 0x3616, 0x3615, 0x3614, 0x3613, - 0x3613, 0x3612, 0x3611, 0x3610, 0x3610, 0x360f, 0x360e, 0x360d, - 0x360d, 0x360c, 0x360b, 0x360a, 0x360a, 0x3609, 0x3608, 0x3607, - 0x3607, 0x3606, 0x3605, 0x3604, 0x3604, 0x3603, 0x3602, 0x3601, - 0x3601, 0x3600, 0x35ff, 0x35fe, 0x35fe, 0x35fd, 0x35fc, 0x35fb, - 0x35fb, 0x35fa, 0x35f9, 0x35f8, 0x35f8, 0x35f7, 0x35f6, 0x35f5, - 0x35f5, 0x35f4, 0x35f3, 0x35f2, 0x35f2, 0x35f1, 0x35f0, 0x35ef, - 0x35ef, 0x35ee, 0x35ed, 0x35ec, 0x35ec, 0x35eb, 0x35ea, 0x35e9, - 0x35e9, 0x35e8, 0x35e7, 0x35e7, 0x35e6, 0x35e5, 0x35e4, 0x35e4, - 0x35e3, 0x35e1, 0x35e0, 0x35de, 0x35dd, 0x35db, 0x35da, 0x35d9, - 0x35d7, 0x35d6, 0x35d4, 0x35d3, 0x35d1, 0x35d0, 0x35ce, 0x35cd, - 0x35cb, 0x35ca, 0x35c9, 0x35c7, 0x35c6, 0x35c4, 0x35c3, 0x35c1, - 0x35c0, 0x35be, 0x35bd, 0x35bc, 0x35ba, 0x35b9, 0x35b7, 0x35b6, - 0x35b4, 0x35b3, 0x35b2, 0x35b0, 0x35af, 0x35ad, 0x35ac, 0x35ab, - 0x35a9, 0x35a8, 0x35a6, 0x35a5, 0x35a3, 0x35a2, 0x35a1, 0x359f, - 0x359e, 0x359c, 0x359b, 0x359a, 0x3598, 0x3597, 0x3595, 0x3594, - 0x3593, 0x3591, 0x3590, 0x358e, 0x358d, 0x358c, 0x358a, 0x3589, - 0x3588, 0x3586, 0x3585, 0x3583, 0x3582, 0x3581, 0x357f, 0x357e, - 0x357d, 0x357b, 0x357a, 0x3578, 0x3577, 0x3576, 0x3574, 0x3573, - 0x3572, 0x3570, 0x356f, 0x356e, 0x356c, 0x356b, 0x3569, 0x3568, - 0x3567, 0x3565, 0x3564, 0x3563, 0x3561, 0x3560, 0x355f, 0x355d, - 0x355c, 0x355b, 0x3559, 0x3558, 0x3557, 0x3555, 0x3554, 0x3553, - 0x3551, 0x3550, 0x354f, 0x354d, 0x354c, 0x354b, 0x3549, 0x3548, - 0x3547, 0x3545, 0x3544, 0x3543, 0x3541, 0x3540, 0x353f, 0x353e, - 0x353c, 0x353b, 0x353a, 0x3538, 0x3537, 0x3536, 0x3534, 0x3533, - 0x3532, 0x3530, 0x352f, 0x352e, 0x352d, 0x352b, 0x352a, 0x3529, - 0x3527, 0x3526, 0x3525, 0x3524, 0x3522, 0x3521, 0x3520, 0x351e, - 0x351d, 0x351c, 0x351b, 0x3519, 0x3518, 0x3517, 0x3516, 0x3514, - 0x3513, 0x3512, 0x3510, 0x350f, 0x350e, 0x350d, 0x350b, 0x350a, - 0x3509, 0x3508, 0x3506, 0x3505, 0x3504, 0x3503, 0x3501, 0x3500, - 0x34ff, 0x34fe, 0x34fc, 0x34fb, 0x34fa, 0x34f9, 0x34f7, 0x34f6, - 0x34f5, 0x34f4, 0x34f2, 0x34f1, 0x34f0, 0x34ef, 0x34ed, 0x34ec, - 0x34eb, 0x34ea, 0x34e9, 0x34e7, 0x34e6, 0x34e5, 0x34e4, 0x34e2, - 0x34e1, 0x34e0, 0x34df, 0x34de, 0x34dc, 0x34db, 0x34da, 0x34d9, - 0x34d7, 0x34d6, 0x34d5, 0x34d4, 0x34d3, 0x34d1, 0x34d0, 0x34cf, - 0x34ce, 0x34cd, 0x34cb, 0x34ca, 0x34c9, 0x34c8, 0x34c7, 0x34c5, - 0x34c4, 0x34c3, 0x34c2, 0x34c1, 0x34c0, 0x34be, 0x34bd, 0x34bc, - 0x34bb, 0x34ba, 0x34b8, 0x34b7, 0x34b6, 0x34b5, 0x34b4, 0x34b3, - 0x34b1, 0x34b0, 0x34af, 0x34ae, 0x34ad, 0x34ac, 0x34aa, 0x34a9, - 0x34a8, 0x34a7, 0x34a6, 0x34a5, 0x34a3, 0x34a2, 0x34a1, 0x34a0, - 0x349f, 0x349e, 0x349c, 0x349b, 0x349a, 0x3499, 0x3498, 0x3497, - 0x3496, 0x3494, 0x3493, 0x3492, 0x3491, 0x3490, 0x348f, 0x348e, - 0x348c, 0x348b, 0x348a, 0x3489, 0x3488, 0x3487, 0x3486, 0x3484, - 0x3483, 0x3482, 0x3481, 0x3480, 0x347f, 0x347e, 0x347d, 0x347b, - 0x347a, 0x3479, 0x3478, 0x3477, 0x3476, 0x3475, 0x3474, 0x3473, - 0x3471, 0x3470, 0x346f, 0x346e, 0x346d, 0x346c, 0x346b, 0x346a, - 0x3469, 0x3467, 0x3466, 0x3465, 0x3464, 0x3463, 0x3462, 0x3461, - 0x3460, 0x345f, 0x345e, 0x345d, 0x345b, 0x345a, 0x3459, 0x3458, - 0x3457, 0x3456, 0x3455, 0x3454, 0x3453, 0x3452, 0x3451, 0x3450, - 0x344e, 0x344d, 0x344c, 0x344b, 0x344a, 0x3449, 0x3448, 0x3447, - 0x3446, 0x3445, 0x3444, 0x3443, 0x3442, 0x3441, 0x343f, 0x343e, - 0x343d, 0x343c, 0x343b, 0x343a, 0x3439, 0x3438, 0x3437, 0x3436, - 0x3435, 0x3434, 0x3433, 0x3432, 0x3431, 0x3430, 0x342f, 0x342e, - 0x342d, 0x342b, 0x342a, 0x3429, 0x3428, 0x3427, 0x3426, 0x3425, - 0x3424, 0x3423, 0x3422, 0x3421, 0x3420, 0x341f, 0x341e, 0x341d, - 0x341c, 0x341b, 0x341a, 0x3419, 0x3418, 0x3417, 0x3416, 0x3415, - 0x3414, 0x3413, 0x3412, 0x3411, 0x3410, 0x340f, 0x340e, 0x340d, - 0x340c, 0x340b, 0x340a, 0x3409, 0x3408, 0x3407, 0x3406, 0x3405, - 0x3404, 0x3403, 0x3402, 0x3401, 0x33ff, 0x33fd, 0x33fb, 0x33f9, - 0x33f7, 0x33f5, 0x33f3, 0x33f1, 0x33ef, 0x33ed, 0x33eb, 0x33e9, - 0x33e7, 0x33e5, 0x33e3, 0x33e1, 0x33df, 0x33dd, 0x33db, 0x33d9, - 0x33d8, 0x33d6, 0x33d4, 0x33d2, 0x33d0, 0x33ce, 0x33cc, 0x33ca, - 0x33c8, 0x33c6, 0x33c4, 0x33c2, 0x33c0, 0x33be, 0x33bc, 0x33ba, - 0x33b8, 0x33b6, 0x33b5, 0x33b3, 0x33b1, 0x33af, 0x33ad, 0x33ab, - 0x33a9, 0x33a7, 0x33a5, 0x33a3, 0x33a1, 0x339f, 0x339e, 0x339c, - 0x339a, 0x3398, 0x3396, 0x3394, 0x3392, 0x3390, 0x338e, 0x338d, - 0x338b, 0x3389, 0x3387, 0x3385, 0x3383, 0x3381, 0x337f, 0x337d, - 0x337c, 0x337a, 0x3378, 0x3376, 0x3374, 0x3372, 0x3370, 0x336f, - 0x336d, 0x336b, 0x3369, 0x3367, 0x3365, 0x3363, 0x3362, 0x3360, - 0x335e, 0x335c, 0x335a, 0x3358, 0x3357, 0x3355, 0x3353, 0x3351, - 0x334f, 0x334d, 0x334c, 0x334a, 0x3348, 0x3346, 0x3344, 0x3342, - 0x3341, 0x333f, 0x333d, 0x333b, 0x3339, 0x3338, 0x3336, 0x3334, - 0x3332, 0x3330, 0x332f, 0x332d, 0x332b, 0x3329, 0x3327, 0x3326, - 0x3324, 0x3322, 0x3320, 0x331f, 0x331d, 0x331b, 0x3319, 0x3317, - 0x3316, 0x3314, 0x3312, 0x3310, 0x330f, 0x330d, 0x330b, 0x3309, - 0x3308, 0x3306, 0x3304, 0x3302, 0x3301, 0x32ff, 0x32fd, 0x32fb, - 0x32fa, 0x32f8, 0x32f6, 0x32f4, 0x32f3, 0x32f1, 0x32ef, 0x32ed, - 0x32ec, 0x32ea, 0x32e8, 0x32e6, 0x32e5, 0x32e3, 0x32e1, 0x32e0, - 0x32de, 0x32dc, 0x32da, 0x32d9, 0x32d7, 0x32d5, 0x32d4, 0x32d2, - 0x32d0, 0x32ce, 0x32cd, 0x32cb, 0x32c9, 0x32c8, 0x32c6, 0x32c4, - 0x32c3, 0x32c1, 0x32bf, 0x32be, 0x32bc, 0x32ba, 0x32b8, 0x32b7, - 0x32b5, 0x32b3, 0x32b2, 0x32b0, 0x32ae, 0x32ad, 0x32ab, 0x32a9, - 0x32a8, 0x32a6, 0x32a4, 0x32a3, 0x32a1, 0x329f, 0x329e, 0x329c, - 0x329b, 0x3299, 0x3297, 0x3296, 0x3294, 0x3292, 0x3291, 0x328f, - 0x328d, 0x328c, 0x328a, 0x3288, 0x3287, 0x3285, 0x3284, 0x3282, - 0x3280, 0x327f, 0x327d, 0x327b, 0x327a, 0x3278, 0x3277, 0x3275, - 0x3273, 0x3272, 0x3270, 0x326f, 0x326d, 0x326b, 0x326a, 0x3268, - 0x3267, 0x3265, 0x3263, 0x3262, 0x3260, 0x325f, 0x325d, 0x325b, - 0x325a, 0x3258, 0x3257, 0x3255, 0x3253, 0x3252, 0x3250, 0x324f, - 0x324d, 0x324c, 0x324a, 0x3248, 0x3247, 0x3245, 0x3244, 0x3242, - 0x3241, 0x323f, 0x323d, 0x323c, 0x323a, 0x3239, 0x3237, 0x3236, - 0x3234, 0x3233, 0x3231, 0x322f, 0x322e, 0x322c, 0x322b, 0x3229, - 0x3228, 0x3226, 0x3225, 0x3223, 0x3222, 0x3220, 0x321f, 0x321d, - 0x321b, 0x321a, 0x3218, 0x3217, 0x3215, 0x3214, 0x3212, 0x3211, - 0x320f, 0x320e, 0x320c, 0x320b, 0x3209, 0x3208, 0x3206, 0x3205, - 0x3203, 0x3202, 0x3200, 0x31ff, 0x31fd, 0x31fc, 0x31fa, 0x31f9, - 0x31f7, 0x31f6, 0x31f4, 0x31f3, 0x31f1, 0x31f0, 0x31ee, 0x31ed, - 0x31eb, 0x31ea, 0x31e8, 0x31e7, 0x31e5, 0x31e4, 0x31e3, 0x31e1, - 0x31e0, 0x31de, 0x31dd, 0x31db, 0x31da, 0x31d8, 0x31d7, 0x31d5, - 0x31d4, 0x31d2, 0x31d1, 0x31d0, 0x31ce, 0x31cd, 0x31cb, 0x31ca, - 0x31c8, 0x31c7, 0x31c5, 0x31c4, 0x31c2, 0x31c1, 0x31c0, 0x31be, - 0x31bd, 0x31bb, 0x31ba, 0x31b8, 0x31b7, 0x31b6, 0x31b4, 0x31b3, - 0x31b1, 0x31b0, 0x31ae, 0x31ad, 0x31ac, 0x31aa, 0x31a9, 0x31a7, - 0x31a6, 0x31a5, 0x31a3, 0x31a2, 0x31a0, 0x319f, 0x319e, 0x319c, - 0x319b, 0x3199, 0x3198, 0x3197, 0x3195, 0x3194, 0x3192, 0x3191, - 0x3190, 0x318e, 0x318d, 0x318b, 0x318a, 0x3189, 0x3187, 0x3186, - 0x3184, 0x3183, 0x3182, 0x3180, 0x317f, 0x317e, 0x317c, 0x317b, - 0x3179, 0x3178, 0x3177, 0x3175, 0x3174, 0x3173, 0x3171, 0x3170, - 0x316f, 0x316d, 0x316c, 0x316b, 0x3169, 0x3168, 0x3166, 0x3165, - 0x3164, 0x3162, 0x3161, 0x3160, 0x315e, 0x315d, 0x315c, 0x315a, - 0x3159, 0x3158, 0x3156, 0x3155, 0x3154, 0x3152, 0x3151, 0x3150, - 0x314e, 0x314d, 0x314c, 0x314a, 0x3149, 0x3148, 0x3146, 0x3145, - 0x3144, 0x3142, 0x3141, 0x3140, 0x313f, 0x313d, 0x313c, 0x313b, - 0x3139, 0x3138, 0x3137, 0x3135, 0x3134, 0x3133, 0x3131, 0x3130, - 0x312f, 0x312e, 0x312c, 0x312b, 0x312a, 0x3128, 0x3127, 0x3126, - 0x3125, 0x3123, 0x3122, 0x3121, 0x311f, 0x311e, 0x311d, 0x311c, - 0x311a, 0x3119, 0x3118, 0x3117, 0x3115, 0x3114, 0x3113, 0x3111, - 0x3110, 0x310f, 0x310e, 0x310c, 0x310b, 0x310a, 0x3109, 0x3107, - 0x3106, 0x3105, 0x3104, 0x3102, 0x3101, 0x3100, 0x30ff, 0x30fd, - 0x30fc, 0x30fb, 0x30fa, 0x30f8, 0x30f7, 0x30f6, 0x30f5, 0x30f3, - 0x30f2, 0x30f1, 0x30f0, 0x30ee, 0x30ed, 0x30ec, 0x30eb, 0x30ea, - 0x30e8, 0x30e7, 0x30e6, 0x30e5, 0x30e3, 0x30e2, 0x30e1, 0x30e0, - 0x30df, 0x30dd, 0x30dc, 0x30db, 0x30da, 0x30d8, 0x30d7, 0x30d6, - 0x30d5, 0x30d4, 0x30d2, 0x30d1, 0x30d0, 0x30cf, 0x30ce, 0x30cc, - 0x30cb, 0x30ca, 0x30c9, 0x30c8, 0x30c6, 0x30c5, 0x30c4, 0x30c3, - 0x30c2, 0x30c0, 0x30bf, 0x30be, 0x30bd, 0x30bc, 0x30bb, 0x30b9, - 0x30b8, 0x30b7, 0x30b6, 0x30b5, 0x30b3, 0x30b2, 0x30b1, 0x30b0, - 0x30af, 0x30ae, 0x30ac, 0x30ab, 0x30aa, 0x30a9, 0x30a8, 0x30a7, - 0x30a5, 0x30a4, 0x30a3, 0x30a2, 0x30a1, 0x30a0, 0x309e, 0x309d, - 0x309c, 0x309b, 0x309a, 0x3099, 0x3098, 0x3096, 0x3095, 0x3094, - 0x3093, 0x3092, 0x3091, 0x3090, 0x308e, 0x308d, 0x308c, 0x308b, - 0x308a, 0x3089, 0x3088, 0x3086, 0x3085, 0x3084, 0x3083, 0x3082, - 0x3081, 0x3080, 0x307f, 0x307d, 0x307c, 0x307b, 0x307a, 0x3079, - 0x3078, 0x3077, 0x3076, 0x3075, 0x3073, 0x3072, 0x3071, 0x3070, - 0x306f, 0x306e, 0x306d, 0x306c, 0x306b, 0x3069, 0x3068, 0x3067, - 0x3066, 0x3065, 0x3064, 0x3063, 0x3062, 0x3061, 0x3060, 0x305e, - 0x305d, 0x305c, 0x305b, 0x305a, 0x3059, 0x3058, 0x3057, 0x3056, - 0x3055, 0x3053, 0x3050, 0x304e, 0x304c, 0x304a, 0x3048, 0x3046, - 0x3043, 0x3041, 0x303f, 0x303d, 0x303b, 0x3039, 0x3037, 0x3035, - 0x3033, 0x3030, 0x302e, 0x302c, 0x302a, 0x3028, 0x3026, 0x3024, - 0x3022, 0x3020, 0x301e, 0x301c, 0x301a, 0x3018, 0x3016, 0x3014, - 0x3011, 0x300f, 0x300d, 0x300b, 0x3009, 0x3007, 0x3005, 0x3003, - 0x3001, 0x2fff, 0x2ffb, 0x2ff7, 0x2ff3, 0x2fef, 0x2feb, 0x2fe7, - 0x2fe3, 0x2fdf, 0x2fdb, 0x2fd7, 0x2fd3, 0x2fcf, 0x2fcb, 0x2fc7, - 0x2fc4, 0x2fc0, 0x2fbc, 0x2fb8, 0x2fb4, 0x2fb0, 0x2fac, 0x2fa9, - 0x2fa5, 0x2fa1, 0x2f9d, 0x2f99, 0x2f96, 0x2f92, 0x2f8e, 0x2f8a, - 0x2f86, 0x2f83, 0x2f7f, 0x2f7b, 0x2f77, 0x2f74, 0x2f70, 0x2f6c, - 0x2f69, 0x2f65, 0x2f61, 0x2f5e, 0x2f5a, 0x2f56, 0x2f52, 0x2f4f, - 0x2f4b, 0x2f48, 0x2f44, 0x2f40, 0x2f3d, 0x2f39, 0x2f35, 0x2f32, - 0x2f2e, 0x2f2b, 0x2f27, 0x2f23, 0x2f20, 0x2f1c, 0x2f19, 0x2f15, - 0x2f12, 0x2f0e, 0x2f0b, 0x2f07, 0x2f04, 0x2f00, 0x2efd, 0x2ef9, - 0x2ef6, 0x2ef2, 0x2eef, 0x2eeb, 0x2ee8, 0x2ee4, 0x2ee1, 0x2edd, - 0x2eda, 0x2ed7, 0x2ed3, 0x2ed0, 0x2ecc, 0x2ec9, 0x2ec6, 0x2ec2, - 0x2ebf, 0x2ebb, 0x2eb8, 0x2eb5, 0x2eb1, 0x2eae, 0x2eab, 0x2ea7, - 0x2ea4, 0x2ea1, 0x2e9d, 0x2e9a, 0x2e97, 0x2e94, 0x2e90, 0x2e8d, - 0x2e8a, 0x2e86, 0x2e83, 0x2e80, 0x2e7d, 0x2e79, 0x2e76, 0x2e73, - 0x2e70, 0x2e6d, 0x2e69, 0x2e66, 0x2e63, 0x2e60, 0x2e5d, 0x2e59, - 0x2e56, 0x2e53, 0x2e50, 0x2e4d, 0x2e4a, 0x2e46, 0x2e43, 0x2e40, - 0x2e3d, 0x2e3a, 0x2e37, 0x2e34, 0x2e31, 0x2e2e, 0x2e2a, 0x2e27, - 0x2e24, 0x2e21, 0x2e1e, 0x2e1b, 0x2e18, 0x2e15, 0x2e12, 0x2e0f, - 0x2e0c, 0x2e09, 0x2e06, 0x2e03, 0x2e00, 0x2dfd, 0x2dfa, 0x2df7, - 0x2df4, 0x2df1, 0x2dee, 0x2deb, 0x2de8, 0x2de5, 0x2de2, 0x2ddf, - 0x2ddc, 0x2dd9, 0x2dd6, 0x2dd4, 0x2dd1, 0x2dce, 0x2dcb, 0x2dc8, - 0x2dc5, 0x2dc2, 0x2dbf, 0x2dbc, 0x2dba, 0x2db7, 0x2db4, 0x2db1, - 0x2dae, 0x2dab, 0x2da8, 0x2da6, 0x2da3, 0x2da0, 0x2d9d, 0x2d9a, - 0x2d98, 0x2d95, 0x2d92, 0x2d8f, 0x2d8c, 0x2d8a, 0x2d87, 0x2d84, - 0x2d81, 0x2d7f, 0x2d7c, 0x2d79, 0x2d76, 0x2d74, 0x2d71, 0x2d6e, - 0x2d6c, 0x2d69, 0x2d66, 0x2d63, 0x2d61, 0x2d5e, 0x2d5b, 0x2d59, - 0x2d56, 0x2d53, 0x2d51, 0x2d4e, 0x2d4b, 0x2d49, 0x2d46, 0x2d44, - 0x2d41, 0x2d3e, 0x2d3c, 0x2d39, 0x2d36, 0x2d34, 0x2d31, 0x2d2f, - 0x2d2c, 0x2d29, 0x2d27, 0x2d24, 0x2d22, 0x2d1f, 0x2d1d, 0x2d1a, - 0x2d18, 0x2d15, 0x2d12, 0x2d10, 0x2d0d, 0x2d0b, 0x2d08, 0x2d06, - 0x2d03, 0x2d01, 0x2cfe, 0x2cfc, 0x2cf9, 0x2cf7, 0x2cf4, 0x2cf2, - 0x2cef, 0x2ced, 0x2cea, 0x2ce8, 0x2ce6, 0x2ce3, 0x2ce1, 0x2cde, - 0x2cdc, 0x2cd9, 0x2cd7, 0x2cd5, 0x2cd2, 0x2cd0, 0x2ccd, 0x2ccb, - 0x2cc9, 0x2cc6, 0x2cc4, 0x2cc1, 0x2cbf, 0x2cbd, 0x2cba, 0x2cb8, - 0x2cb6, 0x2cb3, 0x2cb1, 0x2caf, 0x2cac, 0x2caa, 0x2ca7, 0x2ca5, - 0x2ca3, 0x2ca1, 0x2c9e, 0x2c9c, 0x2c9a, 0x2c97, 0x2c95, 0x2c93, - 0x2c90, 0x2c8e, 0x2c8c, 0x2c8a, 0x2c87, 0x2c85, 0x2c83, 0x2c81, - 0x2c7e, 0x2c7c, 0x2c7a, 0x2c78, 0x2c75, 0x2c73, 0x2c71, 0x2c6f, - 0x2c6d, 0x2c6a, 0x2c68, 0x2c66, 0x2c64, 0x2c61, 0x2c5f, 0x2c5d, - 0x2c5b, 0x2c59, 0x2c57, 0x2c54, 0x2c52, 0x2c50, 0x2c4e, 0x2c4c, - 0x2c4a, 0x2c48, 0x2c45, 0x2c43, 0x2c41, 0x2c3f, 0x2c3d, 0x2c3b, - 0x2c39, 0x2c37, 0x2c34, 0x2c32, 0x2c30, 0x2c2e, 0x2c2c, 0x2c2a, - 0x2c28, 0x2c26, 0x2c24, 0x2c22, 0x2c20, 0x2c1e, 0x2c1b, 0x2c19, - 0x2c17, 0x2c15, 0x2c13, 0x2c11, 0x2c0f, 0x2c0d, 0x2c0b, 0x2c09, - 0x2c07, 0x2c05, 0x2c03, 0x2c01, 0x2bfe, 0x2bfa, 0x2bf6, 0x2bf2, - 0x2bee, 0x2bea, 0x2be6, 0x2be2, 0x2bdf, 0x2bdb, 0x2bd7, 0x2bd3, - 0x2bcf, 0x2bcb, 0x2bc7, 0x2bc3, 0x2bbf, 0x2bbb, 0x2bb8, 0x2bb4, - 0x2bb0, 0x2bac, 0x2ba8, 0x2ba4, 0x2ba1, 0x2b9d, 0x2b99, 0x2b95, - 0x2b91, 0x2b8e, 0x2b8a, 0x2b86, 0x2b82, 0x2b7f, 0x2b7b, 0x2b77, - 0x2b73, 0x2b70, 0x2b6c, 0x2b68, 0x2b64, 0x2b61, 0x2b5d, 0x2b59, - 0x2b56, 0x2b52, 0x2b4e, 0x2b4b, 0x2b47, 0x2b44, 0x2b40, 0x2b3c, - 0x2b39, 0x2b35, 0x2b31, 0x2b2e, 0x2b2a, 0x2b27, 0x2b23, 0x2b20, - 0x2b1c, 0x2b18, 0x2b15, 0x2b11, 0x2b0e, 0x2b0a, 0x2b07, 0x2b03, - 0x2b00, 0x2afc, 0x2af9, 0x2af5, 0x2af2, 0x2aee, 0x2aeb, 0x2ae7, - 0x2ae4, 0x2ae1, 0x2add, 0x2ada, 0x2ad6, 0x2ad3, 0x2acf, 0x2acc, - 0x2ac9, 0x2ac5, 0x2ac2, 0x2abe, 0x2abb, 0x2ab8, 0x2ab4, 0x2ab1, - 0x2aae, 0x2aaa, 0x2aa7, 0x2aa4, 0x2aa0, 0x2a9d, 0x2a9a, 0x2a97, - 0x2a93, 0x2a90, 0x2a8d, 0x2a89, 0x2a86, 0x2a83, 0x2a80, 0x2a7c, - 0x2a79, 0x2a76, 0x2a73, 0x2a6f, 0x2a6c, 0x2a69, 0x2a66, 0x2a63, - 0x2a5f, 0x2a5c, 0x2a59, 0x2a56, 0x2a53, 0x2a50, 0x2a4c, 0x2a49, - 0x2a46, 0x2a43, 0x2a40, 0x2a3d, 0x2a3a, 0x2a37, 0x2a33, 0x2a30, - 0x2a2d, 0x2a2a, 0x2a27, 0x2a24, 0x2a21, 0x2a1e, 0x2a1b, 0x2a18, - 0x2a15, 0x2a12, 0x2a0f, 0x2a0c, 0x2a09, 0x2a06, 0x2a03, 0x2a00, - 0x29fd, 0x29fa, 0x29f7, 0x29f4, 0x29f1, 0x29ee, 0x29eb, 0x29e8, - 0x29e5, 0x29e2, 0x29df, 0x29dc, 0x29d9, 0x29d6, 0x29d3, 0x29d0, - 0x29cd, 0x29cb, 0x29c8, 0x29c5, 0x29c2, 0x29bf, 0x29bc, 0x29b9, - 0x29b6, 0x29b4, 0x29b1, 0x29ae, 0x29ab, 0x29a8, 0x29a5, 0x29a3, - 0x29a0, 0x299d, 0x299a, 0x2997, 0x2995, 0x2992, 0x298f, 0x298c, - 0x2989, 0x2987, 0x2984, 0x2981, 0x297e, 0x297c, 0x2979, 0x2976, - 0x2973, 0x2971, 0x296e, 0x296b, 0x2969, 0x2966, 0x2963, 0x2960, - 0x295e, 0x295b, 0x2958, 0x2956, 0x2953, 0x2950, 0x294e, 0x294b, - 0x2948, 0x2946, 0x2943, 0x2941, 0x293e, 0x293b, 0x2939, 0x2936, - 0x2934, 0x2931, 0x292e, 0x292c, 0x2929, 0x2927, 0x2924, 0x2921, - 0x291f, 0x291c, 0x291a, 0x2917, 0x2915, 0x2912, 0x2910, 0x290d, - 0x290b, 0x2908, 0x2906, 0x2903, 0x2901, 0x28fe, 0x28fc, 0x28f9, - 0x28f7, 0x28f4, 0x28f2, 0x28ef, 0x28ed, 0x28ea, 0x28e8, 0x28e5, - 0x28e3, 0x28e0, 0x28de, 0x28dc, 0x28d9, 0x28d7, 0x28d4, 0x28d2, - 0x28cf, 0x28cd, 0x28cb, 0x28c8, 0x28c6, 0x28c3, 0x28c1, 0x28bf, - 0x28bc, 0x28ba, 0x28b8, 0x28b5, 0x28b3, 0x28b1, 0x28ae, 0x28ac, - 0x28aa, 0x28a7, 0x28a5, 0x28a3, 0x28a0, 0x289e, 0x289c, 0x2899, - 0x2897, 0x2895, 0x2892, 0x2890, 0x288e, 0x288c, 0x2889, 0x2887, - 0x2885, 0x2883, 0x2880, 0x287e, 0x287c, 0x287a, 0x2877, 0x2875, - 0x2873, 0x2871, 0x286e, 0x286c, 0x286a, 0x2868, 0x2866, 0x2863, - 0x2861, 0x285f, 0x285d, 0x285b, 0x2859, 0x2856, 0x2854, 0x2852, - 0x2850, 0x284e, 0x284c, 0x2849, 0x2847, 0x2845, 0x2843, 0x2841, - 0x283f, 0x283d, 0x283b, 0x2838, 0x2836, 0x2834, 0x2832, 0x2830, - 0x282e, 0x282c, 0x282a, 0x2828, 0x2826, 0x2824, 0x2821, 0x281f, - 0x281d, 0x281b, 0x2819, 0x2817, 0x2815, 0x2813, 0x2811, 0x280f, - 0x280d, 0x280b, 0x2809, 0x2807, 0x2805, 0x2803, 0x2801, 0x27fe, - 0x27fa, 0x27f6, 0x27f2, 0x27ee, 0x27ea, 0x27e6, 0x27e2, 0x27de, - 0x27da, 0x27d6, 0x27d2, 0x27ce, 0x27cb, 0x27c7, 0x27c3, 0x27bf, - 0x27bb, 0x27b7, 0x27b3, 0x27af, 0x27ac, 0x27a8, 0x27a4, 0x27a0, - 0x279c, 0x2799, 0x2795, 0x2791, 0x278d, 0x2789, 0x2786, 0x2782, - 0x277e, 0x277a, 0x2777, 0x2773, 0x276f, 0x276b, 0x2768, 0x2764, - 0x2760, 0x275d, 0x2759, 0x2755, 0x2752, 0x274e, 0x274a, 0x2747, - 0x2743, 0x273f, 0x273c, 0x2738, 0x2735, 0x2731, 0x272d, 0x272a, - 0x2726, 0x2723, 0x271f, 0x271c, 0x2718, 0x2715, 0x2711, 0x270d, - 0x270a, 0x2706, 0x2703, 0x26ff, 0x26fc, 0x26f8, 0x26f5, 0x26f1, - 0x26ee, 0x26eb, 0x26e7, 0x26e4, 0x26e0, 0x26dd, 0x26d9, 0x26d6, - 0x26d2, 0x26cf, 0x26cc, 0x26c8, 0x26c5, 0x26c2, 0x26be, 0x26bb, - 0x26b7, 0x26b4, 0x26b1, 0x26ad, 0x26aa, 0x26a7, 0x26a3, 0x26a0, - 0x269d, 0x2699, 0x2696, 0x2693, 0x2690, 0x268c, 0x2689, 0x2686, - 0x2682, 0x267f, 0x267c, 0x2679, 0x2676, 0x2672, 0x266f, 0x266c, - 0x2669, 0x2665, 0x2662, 0x265f, 0x265c, 0x2659, 0x2656, 0x2652, - 0x264f, 0x264c, 0x2649, 0x2646, 0x2643, 0x2640, 0x263c, 0x2639, - 0x2636, 0x2633, 0x2630, 0x262d, 0x262a, 0x2627, 0x2624, 0x2621, - 0x261e, 0x261a, 0x2617, 0x2614, 0x2611, 0x260e, 0x260b, 0x2608, - 0x2605, 0x2602, 0x25ff, 0x25fc, 0x25f9, 0x25f6, 0x25f3, 0x25f0, - 0x25ed, 0x25ea, 0x25e7, 0x25e4, 0x25e2, 0x25df, 0x25dc, 0x25d9, - 0x25d6, 0x25d3, 0x25d0, 0x25cd, 0x25ca, 0x25c7, 0x25c4, 0x25c2, - 0x25bf, 0x25bc, 0x25b9, 0x25b6, 0x25b3, 0x25b0, 0x25ae, 0x25ab, - 0x25a8, 0x25a5, 0x25a2, 0x259f, 0x259d, 0x259a, 0x2597, 0x2594, - 0x2591, 0x258f, 0x258c, 0x2589, 0x2586, 0x2584, 0x2581, 0x257e, - 0x257b, 0x2579, 0x2576, 0x2573, 0x2570, 0x256e, 0x256b, 0x2568, - 0x2566, 0x2563, 0x2560, 0x255e, 0x255b, 0x2558, 0x2555, 0x2553, - 0x2550, 0x254e, 0x254b, 0x2548, 0x2546, 0x2543, 0x2540, 0x253e, - 0x253b, 0x2538, 0x2536, 0x2533, 0x2531, 0x252e, 0x252b, 0x2529, - 0x2526, 0x2524, 0x2521, 0x251f, 0x251c, 0x2519, 0x2517, 0x2514, - 0x2512, 0x250f, 0x250d, 0x250a, 0x2508, 0x2505, 0x2503, 0x2500, - 0x24fe, 0x24fb, 0x24f9, 0x24f6, 0x24f4, 0x24f1, 0x24ef, 0x24ec, - 0x24ea, 0x24e7, 0x24e5, 0x24e3, 0x24e0, 0x24de, 0x24db, 0x24d9, - 0x24d6, 0x24d4, 0x24d2, 0x24cf, 0x24cd, 0x24ca, 0x24c8, 0x24c6, - 0x24c3, 0x24c1, 0x24be, 0x24bc, 0x24ba, 0x24b7, 0x24b5, 0x24b3, - 0x24b0, 0x24ac, 0x24a7, 0x24a2, 0x249e, 0x2499, 0x2495, 0x2490, - 0x248b, 0x2487, 0x2482, 0x247e, 0x2479, 0x2475, 0x2470, 0x246c, - 0x2468, 0x2463, 0x245f, 0x245a, 0x2456, 0x2452, 0x244d, 0x2449, - 0x2445, 0x2441, 0x243c, 0x2438, 0x2434, 0x2430, 0x242c, 0x2427, - 0x2423, 0x241f, 0x241b, 0x2417, 0x2413, 0x240f, 0x240b, 0x2407, - 0x2403, 0x23fd, 0x23f5, 0x23ed, 0x23e6, 0x23de, 0x23d6, 0x23ce, - 0x23c6, 0x23be, 0x23b7, 0x23af, 0x23a7, 0x23a0, 0x2398, 0x2391, - 0x2389, 0x2381, 0x237a, 0x2373, 0x236b, 0x2364, 0x235c, 0x2355, - 0x234e, 0x2346, 0x233f, 0x2338, 0x2331, 0x2329, 0x2322, 0x231b, - 0x2314, 0x230d, 0x2306, 0x22ff, 0x22f8, 0x22f1, 0x22ea, 0x22e3, - 0x22dc, 0x22d6, 0x22cf, 0x22c8, 0x22c1, 0x22ba, 0x22b4, 0x22ad, - 0x22a6, 0x22a0, 0x2299, 0x2292, 0x228c, 0x2285, 0x227f, 0x2278, - 0x2272, 0x226c, 0x2265, 0x225f, 0x2258, 0x2252, 0x224c, 0x2245, - 0x223f, 0x2239, 0x2233, 0x222d, 0x2226, 0x2220, 0x221a, 0x2214, - 0x220e, 0x2208, 0x2202, 0x21fc, 0x21f6, 0x21f0, 0x21ea, 0x21e4, - 0x21de, 0x21d8, 0x21d3, 0x21cd, 0x21c7, 0x21c1, 0x21bb, 0x21b6, - 0x21b0, 0x21aa, 0x21a5, 0x219f, 0x219a, 0x2194, 0x218e, 0x2189, - 0x2183, 0x217e, 0x2178, 0x2173, 0x216d, 0x2168, 0x2163, 0x215d, - 0x2158, 0x2153, 0x214d, 0x2148, 0x2143, 0x213d, 0x2138, 0x2133, - 0x212e, 0x2129, 0x2123, 0x211e, 0x2119, 0x2114, 0x210f, 0x210a, - 0x2105, 0x2100, 0x20fb, 0x20f6, 0x20f1, 0x20ec, 0x20e7, 0x20e2, - 0x20dd, 0x20d9, 0x20d4, 0x20cf, 0x20ca, 0x20c5, 0x20c1, 0x20bc, - 0x20b7, 0x20b2, 0x20ae, 0x20a9, 0x20a4, 0x20a0, 0x209b, 0x2097, - 0x2092, 0x208d, 0x2089, 0x2084, 0x2080, 0x207b, 0x2077, 0x2072, - 0x206e, 0x206a, 0x2065, 0x2061, 0x205c, 0x2058, 0x2054, 0x204f, - 0x204b, 0x2047, 0x2043, 0x203e, 0x203a, 0x2036, 0x2032, 0x202d, - 0x2029, 0x2025, 0x2021, 0x201d, 0x2019, 0x2015, 0x2011, 0x200d, - 0x2009, 0x2004, 0x2000, 0x1ff9, 0x1ff1, 0x1fe9, 0x1fe1, 0x1fd9, - 0x1fd1, 0x1fca, 0x1fc2, 0x1fba, 0x1fb2, 0x1fab, 0x1fa3, 0x1f9c, - 0x1f94, 0x1f8c, 0x1f85, 0x1f7d, 0x1f76, 0x1f6e, 0x1f67, 0x1f60, - 0x1f58, 0x1f51, 0x1f4a, 0x1f42, 0x1f3b, 0x1f34, 0x1f2d, 0x1f26, - 0x1f1e, 0x1f17, 0x1f10, 0x1f09, 0x1f02, 0x1efb, 0x1ef4, 0x1eed, - 0x1ee6, 0x1edf, 0x1ed9, 0x1ed2, 0x1ecb, 0x1ec4, 0x1ebd, 0x1eb7, - 0x1eb0, 0x1ea9, 0x1ea3, 0x1e9c, 0x1e95, 0x1e8f, 0x1e88, 0x1e82, - 0x1e7b, 0x1e75, 0x1e6e, 0x1e68, 0x1e62, 0x1e5b, 0x1e55, 0x1e4f, - 0x1e48, 0x1e42, 0x1e3c, 0x1e36, 0x1e2f, 0x1e29, 0x1e23, 0x1e1d, - 0x1e17, 0x1e11, 0x1e0b, 0x1e05, 0x1dff, 0x1df9, 0x1df3, 0x1ded, - 0x1de7, 0x1de1, 0x1ddb, 0x1dd5, 0x1dcf, 0x1dca, 0x1dc4, 0x1dbe, - 0x1db8, 0x1db3, 0x1dad, 0x1da7, 0x1da2, 0x1d9c, 0x1d96, 0x1d91, - 0x1d8b, 0x1d86, 0x1d80, 0x1d7b, 0x1d75, 0x1d70, 0x1d6a, 0x1d65, - 0x1d60, 0x1d5a, 0x1d55, 0x1d50, 0x1d4a, 0x1d45, 0x1d40, 0x1d3b, - 0x1d35, 0x1d30, 0x1d2b, 0x1d26, 0x1d21, 0x1d1b, 0x1d16, 0x1d11, - 0x1d0c, 0x1d07, 0x1d02, 0x1cfd, 0x1cf8, 0x1cf3, 0x1cee, 0x1ce9, - 0x1ce5, 0x1ce0, 0x1cdb, 0x1cd6, 0x1cd1, 0x1ccc, 0x1cc7, 0x1cc3, - 0x1cbe, 0x1cb9, 0x1cb5, 0x1cb0, 0x1cab, 0x1ca6, 0x1ca2, 0x1c9d, - 0x1c99, 0x1c94, 0x1c8f, 0x1c8b, 0x1c86, 0x1c82, 0x1c7d, 0x1c79, - 0x1c74, 0x1c70, 0x1c6c, 0x1c67, 0x1c63, 0x1c5e, 0x1c5a, 0x1c56, - 0x1c51, 0x1c4d, 0x1c49, 0x1c44, 0x1c40, 0x1c3c, 0x1c38, 0x1c34, - 0x1c2f, 0x1c2b, 0x1c27, 0x1c23, 0x1c1f, 0x1c1b, 0x1c17, 0x1c12, - 0x1c0e, 0x1c0a, 0x1c06, 0x1c02, 0x1bfd, 0x1bf5, 0x1bed, 0x1be5, - 0x1bdd, 0x1bd5, 0x1bcd, 0x1bc5, 0x1bbe, 0x1bb6, 0x1bae, 0x1ba7, - 0x1b9f, 0x1b97, 0x1b90, 0x1b88, 0x1b81, 0x1b79, 0x1b72, 0x1b6a, - 0x1b63, 0x1b5c, 0x1b54, 0x1b4d, 0x1b46, 0x1b3e, 0x1b37, 0x1b30, - 0x1b29, 0x1b22, 0x1b1a, 0x1b13, 0x1b0c, 0x1b05, 0x1afe, 0x1af7, - 0x1af0, 0x1ae9, 0x1ae2, 0x1adc, 0x1ad5, 0x1ace, 0x1ac7, 0x1ac0, - 0x1aba, 0x1ab3, 0x1aac, 0x1aa6, 0x1a9f, 0x1a98, 0x1a92, 0x1a8b, - 0x1a85, 0x1a7e, 0x1a78, 0x1a71, 0x1a6b, 0x1a64, 0x1a5e, 0x1a58, - 0x1a51, 0x1a4b, 0x1a45, 0x1a3f, 0x1a38, 0x1a32, 0x1a2c, 0x1a26, - 0x1a20, 0x1a19, 0x1a13, 0x1a0d, 0x1a07, 0x1a01, 0x19fb, 0x19f5, - 0x19ef, 0x19e9, 0x19e4, 0x19de, 0x19d8, 0x19d2, 0x19cc, 0x19c6, - 0x19c1, 0x19bb, 0x19b5, 0x19af, 0x19aa, 0x19a4, 0x199f, 0x1999, - 0x1993, 0x198e, 0x1988, 0x1983, 0x197d, 0x1978, 0x1972, 0x196d, - 0x1967, 0x1962, 0x195d, 0x1957, 0x1952, 0x194d, 0x1947, 0x1942, - 0x193d, 0x1938, 0x1932, 0x192d, 0x1928, 0x1923, 0x191e, 0x1919, - 0x1914, 0x190f, 0x1909, 0x1904, 0x18ff, 0x18fa, 0x18f5, 0x18f1, - 0x18ec, 0x18e7, 0x18e2, 0x18dd, 0x18d8, 0x18d3, 0x18ce, 0x18ca, - 0x18c5, 0x18c0, 0x18bb, 0x18b7, 0x18b2, 0x18ad, 0x18a9, 0x18a4, - 0x189f, 0x189b, 0x1896, 0x1891, 0x188d, 0x1888, 0x1884, 0x187f, - 0x187b, 0x1876, 0x1872, 0x186e, 0x1869, 0x1865, 0x1860, 0x185c, - 0x1858, 0x1853, 0x184f, 0x184b, 0x1846, 0x1842, 0x183e, 0x183a, - 0x1835, 0x1831, 0x182d, 0x1829, 0x1825, 0x1821, 0x181c, 0x1818, - 0x1814, 0x1810, 0x180c, 0x1808, 0x1804, 0x1800, 0x17f8, 0x17f0, - 0x17e8, 0x17e0, 0x17d8, 0x17d1, 0x17c9, 0x17c1, 0x17b9, 0x17b2, - 0x17aa, 0x17a2, 0x179b, 0x1793, 0x178c, 0x1784, 0x177d, 0x1775, - 0x176e, 0x1766, 0x175f, 0x1757, 0x1750, 0x1749, 0x1742, 0x173a, - 0x1733, 0x172c, 0x1725, 0x171e, 0x1717, 0x170f, 0x1708, 0x1701, - 0x16fa, 0x16f3, 0x16ec, 0x16e6, 0x16df, 0x16d8, 0x16d1, 0x16ca, - 0x16c3, 0x16bd, 0x16b6, 0x16af, 0x16a9, 0x16a2, 0x169b, 0x1695, - 0x168e, 0x1688, 0x1681, 0x167b, 0x1674, 0x166e, 0x1667, 0x1661, - 0x165b, 0x1654, 0x164e, 0x1648, 0x1641, 0x163b, 0x1635, 0x162f, - 0x1628, 0x1622, 0x161c, 0x1616, 0x1610, 0x160a, 0x1604, 0x15fe, - 0x15f8, 0x15f2, 0x15ec, 0x15e6, 0x15e0, 0x15da, 0x15d5, 0x15cf, - 0x15c9, 0x15c3, 0x15bd, 0x15b8, 0x15b2, 0x15ac, 0x15a7, 0x15a1, - 0x159b, 0x1596, 0x1590, 0x158b, 0x1585, 0x1580, 0x157a, 0x1575, - 0x156f, 0x156a, 0x1564, 0x155f, 0x155a, 0x1554, 0x154f, 0x154a, - 0x1544, 0x153f, 0x153a, 0x1535, 0x1530, 0x152a, 0x1525, 0x1520, - 0x151b, 0x1516, 0x1511, 0x150c, 0x1507, 0x1502, 0x14fd, 0x14f8, - 0x14f3, 0x14ee, 0x14e9, 0x14e4, 0x14df, 0x14da, 0x14d5, 0x14d1, - 0x14cc, 0x14c7, 0x14c2, 0x14bd, 0x14b9, 0x14b4, 0x14af, 0x14ab, - 0x14a6, 0x14a1, 0x149d, 0x1498, 0x1494, 0x148f, 0x148a, 0x1486, - 0x1481, 0x147d, 0x1478, 0x1474, 0x146f, 0x146b, 0x1467, 0x1462, - 0x145e, 0x145a, 0x1455, 0x1451, 0x144d, 0x1448, 0x1444, 0x1440, - 0x143b, 0x1437, 0x1433, 0x142f, 0x142b, 0x1427, 0x1422, 0x141e, - 0x141a, 0x1416, 0x1412, 0x140e, 0x140a, 0x1406, 0x1402, 0x13fc, - 0x13f4, 0x13ec, 0x13e4, 0x13dc, 0x13d4, 0x13cc, 0x13c5, 0x13bd, - 0x13b5, 0x13ad, 0x13a6, 0x139e, 0x1396, 0x138f, 0x1387, 0x1380, - 0x1378, 0x1371, 0x1369, 0x1362, 0x135b, 0x1353, 0x134c, 0x1345, - 0x133e, 0x1336, 0x132f, 0x1328, 0x1321, 0x131a, 0x1313, 0x130c, - 0x1304, 0x12fd, 0x12f7, 0x12f0, 0x12e9, 0x12e2, 0x12db, 0x12d4, - 0x12cd, 0x12c6, 0x12c0, 0x12b9, 0x12b2, 0x12ac, 0x12a5, 0x129e, - 0x1298, 0x1291, 0x128b, 0x1284, 0x127d, 0x1277, 0x1271, 0x126a, - 0x1264, 0x125d, 0x1257, 0x1251, 0x124a, 0x1244, 0x123e, 0x1238, - 0x1231, 0x122b, 0x1225, 0x121f, 0x1219, 0x1213, 0x120d, 0x1207, - 0x1201, 0x11fb, 0x11f5, 0x11ef, 0x11e9, 0x11e3, 0x11dd, 0x11d7, - 0x11d1, 0x11cc, 0x11c6, 0x11c0, 0x11ba, 0x11b5, 0x11af, 0x11a9, - 0x11a4, 0x119e, 0x1198, 0x1193, 0x118d, 0x1188, 0x1182, 0x117d, - 0x1177, 0x1172, 0x116c, 0x1167, 0x1161, 0x115c, 0x1157, 0x1151, - 0x114c, 0x1147, 0x1142, 0x113c, 0x1137, 0x1132, 0x112d, 0x1127, - 0x1122, 0x111d, 0x1118, 0x1113, 0x110e, 0x1109, 0x1104, 0x10ff, - 0x10fa, 0x10f5, 0x10f0, 0x10eb, 0x10e6, 0x10e1, 0x10dc, 0x10d8, - 0x10d3, 0x10ce, 0x10c9, 0x10c4, 0x10c0, 0x10bb, 0x10b6, 0x10b1, - 0x10ad, 0x10a8, 0x10a3, 0x109f, 0x109a, 0x1096, 0x1091, 0x108c, - 0x1088, 0x1083, 0x107f, 0x107a, 0x1076, 0x1071, 0x106d, 0x1069, - 0x1064, 0x1060, 0x105b, 0x1057, 0x1053, 0x104e, 0x104a, 0x1046, - 0x1042, 0x103d, 0x1039, 0x1035, 0x1031, 0x102d, 0x1028, 0x1024, - 0x1020, 0x101c, 0x1018, 0x1014, 0x1010, 0x100c, 0x1008, 0x1004, - 0x0fff, 0x0ff7, 0x0fef, 0x0fe7, 0x0fdf, 0x0fd8, 0x0fd0, 0x0fc8, - 0x0fc0, 0x0fb8, 0x0fb1, 0x0fa9, 0x0fa1, 0x0f9a, 0x0f92, 0x0f8b, - 0x0f83, 0x0f7c, 0x0f74, 0x0f6d, 0x0f65, 0x0f5e, 0x0f57, 0x0f4f, - 0x0f48, 0x0f41, 0x0f3a, 0x0f32, 0x0f2b, 0x0f24, 0x0f1d, 0x0f16, - 0x0f0f, 0x0f08, 0x0f01, 0x0efa, 0x0ef3, 0x0eec, 0x0ee5, 0x0ede, - 0x0ed7, 0x0ed0, 0x0ec9, 0x0ec3, 0x0ebc, 0x0eb5, 0x0eaf, 0x0ea8, - 0x0ea1, 0x0e9b, 0x0e94, 0x0e8d, 0x0e87, 0x0e80, 0x0e7a, 0x0e73, - 0x0e6d, 0x0e67, 0x0e60, 0x0e5a, 0x0e53, 0x0e4d, 0x0e47, 0x0e41, - 0x0e3a, 0x0e34, 0x0e2e, 0x0e28, 0x0e22, 0x0e1c, 0x0e15, 0x0e0f, - 0x0e09, 0x0e03, 0x0dfd, 0x0df7, 0x0df1, 0x0deb, 0x0de6, 0x0de0, - 0x0dda, 0x0dd4, 0x0dce, 0x0dc8, 0x0dc3, 0x0dbd, 0x0db7, 0x0db1, - 0x0dac, 0x0da6, 0x0da0, 0x0d9b, 0x0d95, 0x0d90, 0x0d8a, 0x0d85, - 0x0d7f, 0x0d74, 0x0d69, 0x0d5e, 0x0d54, 0x0d49, 0x0d3f, 0x0d34, - 0x0d2a, 0x0d1f, 0x0d15, 0x0d0b, 0x0d01, 0x0cf7, 0x0ced, 0x0ce3, - 0x0cda, 0x0cd0, 0x0cc6, 0x0cbd, 0x0cb3, 0x0caa, 0x0ca1, 0x0c98, - 0x0c8e, 0x0c85, 0x0c7c, 0x0c73, 0x0c6b, 0x0c62, 0x0c59, 0x0c50, - 0x0c48, 0x0c3f, 0x0c37, 0x0c2e, 0x0c26, 0x0c1e, 0x0c16, 0x0c0d, - 0x0c05, 0x0bfb, 0x0beb, 0x0bdb, 0x0bcb, 0x0bbc, 0x0bad, 0x0b9d, - 0x0b8e, 0x0b7f, 0x0b70, 0x0b61, 0x0b53, 0x0b44, 0x0b36, 0x0b27, - 0x0b19, 0x0b0b, 0x0afd, 0x0aef, 0x0ae1, 0x0ad3, 0x0ac6, 0x0ab8, - 0x0aab, 0x0a9e, 0x0a90, 0x0a83, 0x0a76, 0x0a69, 0x0a5d, 0x0a50, - 0x0a43, 0x0a37, 0x0a2b, 0x0a1e, 0x0a12, 0x0a06, 0x09fa, 0x09ee, - 0x09e2, 0x09d7, 0x09cb, 0x09bf, 0x09b4, 0x09a9, 0x099d, 0x0992, - 0x0987, 0x097c, 0x0971, 0x0966, 0x095b, 0x0951, 0x0946, 0x093c, - 0x0931, 0x0927, 0x091d, 0x0912, 0x0908, 0x08fe, 0x08f4, 0x08eb, - 0x08e1, 0x08d7, 0x08cd, 0x08c4, 0x08ba, 0x08b1, 0x08a8, 0x089e, - 0x0895, 0x088c, 0x0883, 0x087a, 0x0871, 0x0868, 0x085f, 0x0857, - 0x084e, 0x0845, 0x083d, 0x0834, 0x082c, 0x0824, 0x081c, 0x0813, - 0x080b, 0x0803, 0x07f6, 0x07e7, 0x07d7, 0x07c7, 0x07b8, 0x07a8, - 0x0799, 0x078a, 0x077b, 0x076c, 0x075d, 0x074f, 0x0740, 0x0732, - 0x0723, 0x0715, 0x0707, 0x06f9, 0x06eb, 0x06dd, 0x06d0, 0x06c2, - 0x06b4, 0x06a7, 0x069a, 0x068d, 0x0680, 0x0673, 0x0666, 0x0659, - 0x064c, 0x0640, 0x0633, 0x0627, 0x061b, 0x060f, 0x0603, 0x05f7, - 0x05eb, 0x05df, 0x05d3, 0x05c8, 0x05bc, 0x05b1, 0x05a5, 0x059a, - 0x058f, 0x0584, 0x0579, 0x056e, 0x0563, 0x0558, 0x054e, 0x0543, - 0x0539, 0x052e, 0x0524, 0x051a, 0x0510, 0x0506, 0x04fc, 0x04f2, - 0x04e8, 0x04de, 0x04d4, 0x04cb, 0x04c1, 0x04b8, 0x04ae, 0x04a5, - 0x049c, 0x0493, 0x0489, 0x0480, 0x0477, 0x046f, 0x0466, 0x045d, - 0x0454, 0x044c, 0x0443, 0x043b, 0x0432, 0x042a, 0x0421, 0x0419, - 0x0411, 0x0409, 0x0401, 0x03f9, 0x03f1, 0x03e9, 0x03e1, 0x03da, - 0x03d2, 0x03ca, 0x03c3, 0x03bb, 0x03b4, 0x03ad, 0x03a5, 0x039e, - 0x0397, 0x0390, 0x0389, 0x0381, 0x037a, 0x0374, 0x036d, 0x0366, - 0x035f, 0x0358, 0x0352, 0x034b, 0x0345, 0x033e, 0x0338, 0x0331, - 0x032b, 0x0324, 0x031e, 0x0318, 0x0312, 0x030c, 0x0306, 0x0300, - 0x02fa, 0x02f4, 0x02ee, 0x02e8, 0x02e2, 0x02dd, 0x02d7, 0x02d1, - 0x02cc, 0x02c6, 0x02c0, 0x02bb, 0x02b6, 0x02b0, 0x02ab, 0x02a5, - 0x02a0, 0x029b, 0x0296, 0x0291, 0x028c, 0x0286, 0x0281, 0x027c, - 0x0277, 0x0273, 0x026e, 0x0269, 0x0264, 0x025f, 0x025b, 0x0256, - 0x0251, 0x024d, 0x0248, 0x0243, 0x023f, 0x023a, 0x0236, 0x0232, - 0x022d, 0x0229, 0x0225, 0x0220, 0x021c, 0x0218, 0x0214, 0x0210, - 0x020b, 0x0207, 0x0203, 0x01ff, 0x01fb, 0x01f7, 0x01f4, 0x01f0, - 0x01ec, 0x01e8, 0x01e4, 0x01e0, 0x01dd, 0x01d9, 0x01d5, 0x01d2, - 0x01ce, 0x01ca, 0x01c7, 0x01c3, 0x01c0, 0x01bc, 0x01b9, 0x01b5, - 0x01b2, 0x01af, 0x01ab, 0x01a8, 0x01a5, 0x01a1, 0x019e, 0x019b, - 0x0198, 0x0195, 0x0191, 0x018e, 0x018b, 0x0188, 0x0185, 0x0182, - 0x017f, 0x017c, 0x0179, 0x0176, 0x0173, 0x0170, 0x016d, 0x016b, - 0x0168, 0x0165, 0x0162, 0x015f, 0x015d, 0x015a, 0x0157, 0x0155, - 0x0152, 0x014f, 0x014d, 0x014a, 0x0148, 0x0145, 0x0143, 0x0140, - 0x013e, 0x013b, 0x0139, 0x0136, 0x0134, 0x0131, 0x012f, 0x012d, - 0x012a, 0x0128, 0x0126, 0x0123, 0x0121, 0x011f, 0x011d, 0x011a, - 0x0118, 0x0116, 0x0114, 0x0112, 0x0110, 0x010d, 0x010b, 0x0109, - 0x0107, 0x0105, 0x0103, 0x0101, 0x00ff, 0x00fd, 0x00fb, 0x00f9, - 0x00f7, 0x00f5, 0x00f3, 0x00f2, 0x00f0, 0x00ee, 0x00ec, 0x00ea, - 0x00e8, 0x00e6, 0x00e5, 0x00e3, 0x00e1, 0x00df, 0x00de, 0x00dc, - 0x00da, 0x00d9, 0x00d7, 0x00d5, 0x00d4, 0x00d2, 0x00d0, 0x00cf, - 0x00cd, 0x00cb, 0x00ca, 0x00c8, 0x00c7, 0x00c5, 0x00c4, 0x00c2, - 0x00c1, 0x00bf, 0x00be, 0x00bc, 0x00bb, 0x00b9, 0x00b8, 0x00b6, - 0x00b5, 0x00b4, 0x00b2, 0x00b1, 0x00af, 0x00ae, 0x00ad, 0x00ab, - 0x00aa, 0x00a9, 0x00a7, 0x00a6, 0x00a5, 0x00a3, 0x00a2, 0x00a1, - 0x00a0, 0x009e, 0x009d, 0x009c, 0x009b, 0x009a, 0x0098, 0x0097, - 0x0096, 0x0095, 0x0094, 0x0093, 0x0091, 0x0090, 0x008f, 0x008e, - 0x008d, 0x008c, 0x008b, 0x008a, 0x0089, 0x0087, 0x0086, 0x0085, - 0x0084, 0x0083, 0x0082, 0x0081, 0x0080, 0x007f, 0x007e, 0x007d, - 0x007c, 0x007b, 0x007a, 0x0079, 0x0079, 0x0078, 0x0077, 0x0076, - 0x0075, 0x0074, 0x0073, 0x0072, 0x0071, 0x0070, 0x006f, 0x006f, - 0x006e, 0x006d, 0x006c, 0x006b, 0x006a, 0x006a, 0x0069, 0x0068, - 0x0067, 0x0066, 0x0065, 0x0065, 0x0064, 0x0063, 0x0062, 0x0062, - 0x0061, 0x0060, 0x005f, 0x005f, 0x005e, 0x005d, 0x005c, 0x005c, - 0x005b, 0x005a, 0x005a, 0x0059, 0x0058, 0x0057, 0x0057, 0x0056, - 0x0055, 0x0055, 0x0054, 0x0053, 0x0053, 0x0052, 0x0052, 0x0051, - 0x0050, 0x0050, 0x004f, 0x004e, 0x004e, 0x004d, 0x004d, 0x004c, - 0x004b, 0x004b, 0x004a, 0x004a, 0x0049, 0x0049, 0x0048, 0x0047, - 0x0047, 0x0046, 0x0046, 0x0045, 0x0045, 0x0044, 0x0044, 0x0043, - 0x0043, 0x0042, 0x0042, 0x0041, 0x0041, 0x0040, 0x0040, 0x003f, - 0x003f, 0x003e, 0x003e, 0x003d, 0x003d, 0x003c, 0x003c, 0x003b, - 0x003b, 0x003a, 0x003a, 0x0039, 0x0039, 0x0038, 0x0038, 0x0038, - 0x0037, 0x0037, 0x0036, 0x0036, 0x0035, 0x0035, 0x0035, 0x0034, - 0x0034, 0x0033, 0x0033, 0x0033, 0x0032, 0x0032, 0x0031, 0x0031, - 0x0031, 0x0030, 0x0030, 0x0030, 0x002f, 0x002f, 0x002e, 0x002e, - 0x002e, 0x002d, 0x002d, 0x002d, 0x002c, 0x002c, 0x002c, 0x002b, - 0x002b, 0x002b, 0x002a, 0x002a, 0x002a, 0x0029, 0x0029, 0x0029, - 0x0028, 0x0028, 0x0028, 0x0027, 0x0027, 0x0027, 0x0027, 0x0026, - 0x0026, 0x0026, 0x0025, 0x0025, 0x0025, 0x0024, 0x0024, 0x0024, - 0x0024, 0x0023, 0x0023, 0x0023, 0x0023, 0x0022, 0x0022, 0x0022, - 0x0021, 0x0021, 0x0021, 0x0021, 0x0020, 0x0020, 0x0020, 0x0020, - 0x001f, 0x001f, 0x001f, 0x001f, 0x001e, 0x001e, 0x001e, 0x001e, - 0x001e, 0x001d, 0x001d, 0x001d, 0x001d, 0x001c, 0x001c, 0x001c, - 0x001c, 0x001c, 0x001b, 0x001b, 0x001b, 0x001b, 0x001a, 0x001a, - 0x001a, 0x001a, 0x001a, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, - 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0017, 0x0017, - 0x0017, 0x0017, 0x0017, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, - 0x0016, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0014, - 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0013, 0x0013, - 0x0013, 0x0013, 0x0013, 0x0013, 0x0012, 0x0012, 0x0012, 0x0012, - 0x0012, 0x0012, 0x0012, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, - 0x0011, 0x0011, 0x0011, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, - 0x000f, 0x000f, 0x000f, 0x000f, 0x000e, 0x000e, 0x000e, 0x000e, - 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000d, 0x000d, 0x000d, - 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, - 0x000c, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, - 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000a, 0x000a, 0x000a, - 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, - 0x000a, 0x000a, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, - 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -}; - -const unsigned short logTable[] = -{ - 0xfc00, 0xd829, 0xd7f9, 0xd7c5, 0xd7a0, 0xd783, 0xd76c, 0xd758, - 0xd747, 0xd738, 0xd72b, 0xd71e, 0xd713, 0xd709, 0xd700, 0xd6f7, - 0xd6ee, 0xd6e7, 0xd6df, 0xd6d8, 0xd6d2, 0xd6cc, 0xd6c6, 0xd6c0, - 0xd6bb, 0xd6b5, 0xd6b0, 0xd6ab, 0xd6a7, 0xd6a2, 0xd69e, 0xd69a, - 0xd696, 0xd692, 0xd68e, 0xd68a, 0xd687, 0xd683, 0xd680, 0xd67c, - 0xd679, 0xd676, 0xd673, 0xd670, 0xd66d, 0xd66a, 0xd667, 0xd665, - 0xd662, 0xd65f, 0xd65d, 0xd65a, 0xd658, 0xd655, 0xd653, 0xd650, - 0xd64e, 0xd64c, 0xd64a, 0xd647, 0xd645, 0xd643, 0xd641, 0xd63f, - 0xd63d, 0xd63b, 0xd639, 0xd637, 0xd635, 0xd633, 0xd632, 0xd630, - 0xd62e, 0xd62c, 0xd62a, 0xd629, 0xd627, 0xd625, 0xd624, 0xd622, - 0xd620, 0xd61f, 0xd61d, 0xd61c, 0xd61a, 0xd619, 0xd617, 0xd616, - 0xd614, 0xd613, 0xd611, 0xd610, 0xd60f, 0xd60d, 0xd60c, 0xd60a, - 0xd609, 0xd608, 0xd606, 0xd605, 0xd604, 0xd603, 0xd601, 0xd600, - 0xd5ff, 0xd5fe, 0xd5fc, 0xd5fb, 0xd5fa, 0xd5f9, 0xd5f8, 0xd5f7, - 0xd5f5, 0xd5f4, 0xd5f3, 0xd5f2, 0xd5f1, 0xd5f0, 0xd5ef, 0xd5ee, - 0xd5ed, 0xd5eb, 0xd5ea, 0xd5e9, 0xd5e8, 0xd5e7, 0xd5e6, 0xd5e5, - 0xd5e4, 0xd5e3, 0xd5e2, 0xd5e1, 0xd5e0, 0xd5df, 0xd5de, 0xd5dd, - 0xd5dd, 0xd5dc, 0xd5db, 0xd5da, 0xd5d9, 0xd5d8, 0xd5d7, 0xd5d6, - 0xd5d5, 0xd5d4, 0xd5d3, 0xd5d3, 0xd5d2, 0xd5d1, 0xd5d0, 0xd5cf, - 0xd5ce, 0xd5cd, 0xd5cd, 0xd5cc, 0xd5cb, 0xd5ca, 0xd5c9, 0xd5c9, - 0xd5c8, 0xd5c7, 0xd5c6, 0xd5c5, 0xd5c5, 0xd5c4, 0xd5c3, 0xd5c2, - 0xd5c1, 0xd5c1, 0xd5c0, 0xd5bf, 0xd5be, 0xd5be, 0xd5bd, 0xd5bc, - 0xd5bc, 0xd5bb, 0xd5ba, 0xd5b9, 0xd5b9, 0xd5b8, 0xd5b7, 0xd5b7, - 0xd5b6, 0xd5b5, 0xd5b4, 0xd5b4, 0xd5b3, 0xd5b2, 0xd5b2, 0xd5b1, - 0xd5b0, 0xd5b0, 0xd5af, 0xd5ae, 0xd5ae, 0xd5ad, 0xd5ac, 0xd5ac, - 0xd5ab, 0xd5ab, 0xd5aa, 0xd5a9, 0xd5a9, 0xd5a8, 0xd5a7, 0xd5a7, - 0xd5a6, 0xd5a6, 0xd5a5, 0xd5a4, 0xd5a4, 0xd5a3, 0xd5a3, 0xd5a2, - 0xd5a1, 0xd5a1, 0xd5a0, 0xd5a0, 0xd59f, 0xd59e, 0xd59e, 0xd59d, - 0xd59d, 0xd59c, 0xd59c, 0xd59b, 0xd59a, 0xd59a, 0xd599, 0xd599, - 0xd598, 0xd598, 0xd597, 0xd597, 0xd596, 0xd595, 0xd595, 0xd594, - 0xd594, 0xd593, 0xd593, 0xd592, 0xd592, 0xd591, 0xd591, 0xd590, - 0xd590, 0xd58f, 0xd58f, 0xd58e, 0xd58e, 0xd58d, 0xd58d, 0xd58c, - 0xd58c, 0xd58b, 0xd58b, 0xd58a, 0xd58a, 0xd589, 0xd589, 0xd588, - 0xd588, 0xd587, 0xd587, 0xd586, 0xd586, 0xd585, 0xd585, 0xd584, - 0xd584, 0xd583, 0xd583, 0xd582, 0xd582, 0xd581, 0xd581, 0xd581, - 0xd580, 0xd580, 0xd57f, 0xd57f, 0xd57e, 0xd57e, 0xd57d, 0xd57d, - 0xd57c, 0xd57c, 0xd57c, 0xd57b, 0xd57b, 0xd57a, 0xd57a, 0xd579, - 0xd579, 0xd579, 0xd578, 0xd578, 0xd577, 0xd577, 0xd576, 0xd576, - 0xd576, 0xd575, 0xd575, 0xd574, 0xd574, 0xd573, 0xd573, 0xd573, - 0xd572, 0xd572, 0xd571, 0xd571, 0xd571, 0xd570, 0xd570, 0xd56f, - 0xd56f, 0xd56f, 0xd56e, 0xd56e, 0xd56d, 0xd56d, 0xd56d, 0xd56c, - 0xd56c, 0xd56b, 0xd56b, 0xd56b, 0xd56a, 0xd56a, 0xd56a, 0xd569, - 0xd569, 0xd568, 0xd568, 0xd568, 0xd567, 0xd567, 0xd566, 0xd566, - 0xd566, 0xd565, 0xd565, 0xd565, 0xd564, 0xd564, 0xd564, 0xd563, - 0xd563, 0xd562, 0xd562, 0xd562, 0xd561, 0xd561, 0xd561, 0xd560, - 0xd560, 0xd560, 0xd55f, 0xd55f, 0xd55f, 0xd55e, 0xd55e, 0xd55d, - 0xd55d, 0xd55d, 0xd55c, 0xd55c, 0xd55c, 0xd55b, 0xd55b, 0xd55b, - 0xd55a, 0xd55a, 0xd55a, 0xd559, 0xd559, 0xd559, 0xd558, 0xd558, - 0xd558, 0xd557, 0xd557, 0xd557, 0xd556, 0xd556, 0xd556, 0xd555, - 0xd555, 0xd555, 0xd554, 0xd554, 0xd554, 0xd553, 0xd553, 0xd553, - 0xd552, 0xd552, 0xd552, 0xd551, 0xd551, 0xd551, 0xd551, 0xd550, - 0xd550, 0xd550, 0xd54f, 0xd54f, 0xd54f, 0xd54e, 0xd54e, 0xd54e, - 0xd54d, 0xd54d, 0xd54d, 0xd54d, 0xd54c, 0xd54c, 0xd54c, 0xd54b, - 0xd54b, 0xd54b, 0xd54a, 0xd54a, 0xd54a, 0xd549, 0xd549, 0xd549, - 0xd549, 0xd548, 0xd548, 0xd548, 0xd547, 0xd547, 0xd547, 0xd547, - 0xd546, 0xd546, 0xd546, 0xd545, 0xd545, 0xd545, 0xd545, 0xd544, - 0xd544, 0xd544, 0xd543, 0xd543, 0xd543, 0xd543, 0xd542, 0xd542, - 0xd542, 0xd541, 0xd541, 0xd541, 0xd541, 0xd540, 0xd540, 0xd540, - 0xd53f, 0xd53f, 0xd53f, 0xd53f, 0xd53e, 0xd53e, 0xd53e, 0xd53e, - 0xd53d, 0xd53d, 0xd53d, 0xd53c, 0xd53c, 0xd53c, 0xd53c, 0xd53b, - 0xd53b, 0xd53b, 0xd53b, 0xd53a, 0xd53a, 0xd53a, 0xd53a, 0xd539, - 0xd539, 0xd539, 0xd538, 0xd538, 0xd538, 0xd538, 0xd537, 0xd537, - 0xd537, 0xd537, 0xd536, 0xd536, 0xd536, 0xd536, 0xd535, 0xd535, - 0xd535, 0xd535, 0xd534, 0xd534, 0xd534, 0xd534, 0xd533, 0xd533, - 0xd533, 0xd533, 0xd532, 0xd532, 0xd532, 0xd532, 0xd531, 0xd531, - 0xd531, 0xd531, 0xd530, 0xd530, 0xd530, 0xd530, 0xd52f, 0xd52f, - 0xd52f, 0xd52f, 0xd52e, 0xd52e, 0xd52e, 0xd52e, 0xd52d, 0xd52d, - 0xd52d, 0xd52d, 0xd52d, 0xd52c, 0xd52c, 0xd52c, 0xd52c, 0xd52b, - 0xd52b, 0xd52b, 0xd52b, 0xd52a, 0xd52a, 0xd52a, 0xd52a, 0xd529, - 0xd529, 0xd529, 0xd529, 0xd529, 0xd528, 0xd528, 0xd528, 0xd528, - 0xd527, 0xd527, 0xd527, 0xd527, 0xd526, 0xd526, 0xd526, 0xd526, - 0xd526, 0xd525, 0xd525, 0xd525, 0xd525, 0xd524, 0xd524, 0xd524, - 0xd524, 0xd524, 0xd523, 0xd523, 0xd523, 0xd523, 0xd522, 0xd522, - 0xd522, 0xd522, 0xd522, 0xd521, 0xd521, 0xd521, 0xd521, 0xd520, - 0xd520, 0xd520, 0xd520, 0xd520, 0xd51f, 0xd51f, 0xd51f, 0xd51f, - 0xd51f, 0xd51e, 0xd51e, 0xd51e, 0xd51e, 0xd51d, 0xd51d, 0xd51d, - 0xd51d, 0xd51d, 0xd51c, 0xd51c, 0xd51c, 0xd51c, 0xd51c, 0xd51b, - 0xd51b, 0xd51b, 0xd51b, 0xd51b, 0xd51a, 0xd51a, 0xd51a, 0xd51a, - 0xd51a, 0xd519, 0xd519, 0xd519, 0xd519, 0xd518, 0xd518, 0xd518, - 0xd518, 0xd518, 0xd517, 0xd517, 0xd517, 0xd517, 0xd517, 0xd516, - 0xd516, 0xd516, 0xd516, 0xd516, 0xd515, 0xd515, 0xd515, 0xd515, - 0xd515, 0xd514, 0xd514, 0xd514, 0xd514, 0xd514, 0xd514, 0xd513, - 0xd513, 0xd513, 0xd513, 0xd513, 0xd512, 0xd512, 0xd512, 0xd512, - 0xd512, 0xd511, 0xd511, 0xd511, 0xd511, 0xd511, 0xd510, 0xd510, - 0xd510, 0xd510, 0xd510, 0xd50f, 0xd50f, 0xd50f, 0xd50f, 0xd50f, - 0xd50f, 0xd50e, 0xd50e, 0xd50e, 0xd50e, 0xd50e, 0xd50d, 0xd50d, - 0xd50d, 0xd50d, 0xd50d, 0xd50c, 0xd50c, 0xd50c, 0xd50c, 0xd50c, - 0xd50c, 0xd50b, 0xd50b, 0xd50b, 0xd50b, 0xd50b, 0xd50a, 0xd50a, - 0xd50a, 0xd50a, 0xd50a, 0xd50a, 0xd509, 0xd509, 0xd509, 0xd509, - 0xd509, 0xd508, 0xd508, 0xd508, 0xd508, 0xd508, 0xd508, 0xd507, - 0xd507, 0xd507, 0xd507, 0xd507, 0xd506, 0xd506, 0xd506, 0xd506, - 0xd506, 0xd506, 0xd505, 0xd505, 0xd505, 0xd505, 0xd505, 0xd505, - 0xd504, 0xd504, 0xd504, 0xd504, 0xd504, 0xd504, 0xd503, 0xd503, - 0xd503, 0xd503, 0xd503, 0xd502, 0xd502, 0xd502, 0xd502, 0xd502, - 0xd502, 0xd501, 0xd501, 0xd501, 0xd501, 0xd501, 0xd501, 0xd500, - 0xd500, 0xd500, 0xd500, 0xd500, 0xd500, 0xd4ff, 0xd4ff, 0xd4ff, - 0xd4ff, 0xd4ff, 0xd4ff, 0xd4fe, 0xd4fe, 0xd4fe, 0xd4fe, 0xd4fe, - 0xd4fe, 0xd4fd, 0xd4fd, 0xd4fd, 0xd4fd, 0xd4fd, 0xd4fd, 0xd4fc, - 0xd4fc, 0xd4fc, 0xd4fc, 0xd4fc, 0xd4fc, 0xd4fb, 0xd4fb, 0xd4fb, - 0xd4fb, 0xd4fb, 0xd4fb, 0xd4fb, 0xd4fa, 0xd4fa, 0xd4fa, 0xd4fa, - 0xd4fa, 0xd4fa, 0xd4f9, 0xd4f9, 0xd4f9, 0xd4f9, 0xd4f9, 0xd4f9, - 0xd4f8, 0xd4f8, 0xd4f8, 0xd4f8, 0xd4f8, 0xd4f8, 0xd4f7, 0xd4f7, - 0xd4f7, 0xd4f7, 0xd4f7, 0xd4f7, 0xd4f7, 0xd4f6, 0xd4f6, 0xd4f6, - 0xd4f6, 0xd4f6, 0xd4f6, 0xd4f5, 0xd4f5, 0xd4f5, 0xd4f5, 0xd4f5, - 0xd4f5, 0xd4f5, 0xd4f4, 0xd4f4, 0xd4f4, 0xd4f4, 0xd4f4, 0xd4f4, - 0xd4f3, 0xd4f3, 0xd4f3, 0xd4f3, 0xd4f3, 0xd4f3, 0xd4f3, 0xd4f2, - 0xd4f2, 0xd4f2, 0xd4f2, 0xd4f2, 0xd4f2, 0xd4f2, 0xd4f1, 0xd4f1, - 0xd4f1, 0xd4f1, 0xd4f1, 0xd4f1, 0xd4f0, 0xd4f0, 0xd4f0, 0xd4f0, - 0xd4f0, 0xd4f0, 0xd4f0, 0xd4ef, 0xd4ef, 0xd4ef, 0xd4ef, 0xd4ef, - 0xd4ef, 0xd4ef, 0xd4ee, 0xd4ee, 0xd4ee, 0xd4ee, 0xd4ee, 0xd4ee, - 0xd4ee, 0xd4ed, 0xd4ed, 0xd4ed, 0xd4ed, 0xd4ed, 0xd4ed, 0xd4ed, - 0xd4ec, 0xd4ec, 0xd4ec, 0xd4ec, 0xd4ec, 0xd4ec, 0xd4eb, 0xd4eb, - 0xd4eb, 0xd4eb, 0xd4eb, 0xd4eb, 0xd4eb, 0xd4ea, 0xd4ea, 0xd4ea, - 0xd4ea, 0xd4ea, 0xd4ea, 0xd4ea, 0xd4ea, 0xd4e9, 0xd4e9, 0xd4e9, - 0xd4e9, 0xd4e9, 0xd4e9, 0xd4e9, 0xd4e8, 0xd4e8, 0xd4e8, 0xd4e8, - 0xd4e8, 0xd4e8, 0xd4e8, 0xd4e7, 0xd4e7, 0xd4e7, 0xd4e7, 0xd4e7, - 0xd4e7, 0xd4e7, 0xd4e6, 0xd4e6, 0xd4e6, 0xd4e6, 0xd4e6, 0xd4e6, - 0xd4e6, 0xd4e5, 0xd4e5, 0xd4e5, 0xd4e5, 0xd4e5, 0xd4e5, 0xd4e5, - 0xd4e5, 0xd4e4, 0xd4e4, 0xd4e4, 0xd4e4, 0xd4e4, 0xd4e4, 0xd4e4, - 0xd4e3, 0xd4e3, 0xd4e3, 0xd4e3, 0xd4e3, 0xd4e3, 0xd4e3, 0xd4e3, - 0xd4e2, 0xd4e2, 0xd4e2, 0xd4e2, 0xd4e2, 0xd4e2, 0xd4e2, 0xd4e1, - 0xd4e1, 0xd4e1, 0xd4e1, 0xd4e1, 0xd4e1, 0xd4e1, 0xd4e1, 0xd4e0, - 0xd4e0, 0xd4e0, 0xd4e0, 0xd4e0, 0xd4e0, 0xd4e0, 0xd4df, 0xd4df, - 0xd4df, 0xd4df, 0xd4df, 0xd4df, 0xd4df, 0xd4df, 0xd4de, 0xd4de, - 0xd4de, 0xd4de, 0xd4de, 0xd4de, 0xd4de, 0xd4de, 0xd4dd, 0xd4dd, - 0xd4dd, 0xd4dd, 0xd4dd, 0xd4dd, 0xd4dd, 0xd4dd, 0xd4dc, 0xd4dc, - 0xd4dc, 0xd4dc, 0xd4dc, 0xd4dc, 0xd4dc, 0xd4dc, 0xd4db, 0xd4db, - 0xd4db, 0xd4db, 0xd4db, 0xd4db, 0xd4db, 0xd4da, 0xd4da, 0xd4da, - 0xd4da, 0xd4da, 0xd4da, 0xd4da, 0xd4da, 0xd4d9, 0xd4d9, 0xd4d9, - 0xd4d9, 0xd4d9, 0xd4d9, 0xd4d9, 0xd4d9, 0xd4d9, 0xd4d8, 0xd4d8, - 0xd4d8, 0xd4d8, 0xd4d8, 0xd4d8, 0xd4d8, 0xd4d8, 0xd4d7, 0xd4d7, - 0xd4d7, 0xd4d7, 0xd4d7, 0xd4d7, 0xd4d7, 0xd4d7, 0xd4d6, 0xd4d6, - 0xd4d6, 0xd4d6, 0xd4d6, 0xd4d6, 0xd4d6, 0xd4d6, 0xd4d5, 0xd4d5, - 0xd4d5, 0xd4d5, 0xd4d5, 0xd4d5, 0xd4d5, 0xd4d5, 0xd4d4, 0xd4d4, - 0xd4d4, 0xd4d4, 0xd4d4, 0xd4d4, 0xd4d4, 0xd4d4, 0xd4d4, 0xd4d3, - 0xd4d3, 0xd4d3, 0xd4d3, 0xd4d3, 0xd4d3, 0xd4d3, 0xd4d3, 0xd4d2, - 0xd4d2, 0xd4d2, 0xd4d2, 0xd4d2, 0xd4d2, 0xd4d2, 0xd4d2, 0xd4d2, - 0xd4d1, 0xd4d1, 0xd4d1, 0xd4d1, 0xd4d1, 0xd4d1, 0xd4d1, 0xd4d1, - 0xd4d0, 0xd4d0, 0xd4d0, 0xd4d0, 0xd4d0, 0xd4d0, 0xd4d0, 0xd4d0, - 0xd4d0, 0xd4cf, 0xd4cf, 0xd4cf, 0xd4cf, 0xd4cf, 0xd4cf, 0xd4cf, - 0xd4cf, 0xd4cf, 0xd4ce, 0xd4ce, 0xd4ce, 0xd4ce, 0xd4ce, 0xd4ce, - 0xd4ce, 0xd4ce, 0xd4ce, 0xd4cd, 0xd4cd, 0xd4cd, 0xd4cd, 0xd4cd, - 0xd4cd, 0xd4cd, 0xd4cd, 0xd4cc, 0xd4cc, 0xd4cc, 0xd4cc, 0xd4cc, - 0xd4cc, 0xd4cc, 0xd4cc, 0xd4cc, 0xd4cb, 0xd4cb, 0xd4cb, 0xd4cb, - 0xd4cb, 0xd4cb, 0xd4cb, 0xd4cb, 0xd4cb, 0xd4ca, 0xd4ca, 0xd4ca, - 0xd4ca, 0xd4ca, 0xd4ca, 0xd4ca, 0xd4ca, 0xd4ca, 0xd4c9, 0xd4c9, - 0xd4c9, 0xd4c9, 0xd4c9, 0xd4c9, 0xd4c9, 0xd4c9, 0xd4c9, 0xd4c9, - 0xd4c8, 0xd4c8, 0xd4c8, 0xd4c8, 0xd4c8, 0xd4c8, 0xd4c8, 0xd4c8, - 0xd4c8, 0xd4c7, 0xd4c7, 0xd4c7, 0xd4c7, 0xd4c7, 0xd4c7, 0xd4c7, - 0xd4c7, 0xd4c7, 0xd4c6, 0xd4c6, 0xd4c6, 0xd4c6, 0xd4c6, 0xd4c6, - 0xd4c6, 0xd4c6, 0xd4c6, 0xd4c5, 0xd4c5, 0xd4c5, 0xd4c5, 0xd4c5, - 0xd4c5, 0xd4c5, 0xd4c5, 0xd4c5, 0xd4c5, 0xd4c4, 0xd4c4, 0xd4c4, - 0xd4c4, 0xd4c4, 0xd4c4, 0xd4c4, 0xd4c4, 0xd4c4, 0xd4c3, 0xd4c3, - 0xd4c3, 0xd4c3, 0xd4c3, 0xd4c3, 0xd4c3, 0xd4c3, 0xd4c3, 0xd4c3, - 0xd4c2, 0xd4c2, 0xd4c2, 0xd4c2, 0xd4c2, 0xd4c2, 0xd4c2, 0xd4c2, - 0xd4c2, 0xd4c2, 0xd4c1, 0xd4c1, 0xd4c1, 0xd4c1, 0xd4c1, 0xd4c1, - 0xd4c1, 0xd4c1, 0xd4c1, 0xd4c0, 0xd4c0, 0xd4c0, 0xd4c0, 0xd4c0, - 0xd4c0, 0xd4c0, 0xd4c0, 0xd4c0, 0xd4c0, 0xd4bf, 0xd4bf, 0xd4bf, - 0xd4bf, 0xd4bf, 0xd4bf, 0xd4bf, 0xd4bf, 0xd4bf, 0xd4bf, 0xd4be, - 0xd4be, 0xd4be, 0xd4be, 0xd4be, 0xd4be, 0xd4be, 0xd4be, 0xd4be, - 0xd4be, 0xd4bd, 0xd4bd, 0xd4bd, 0xd4bd, 0xd4bd, 0xd4bd, 0xd4bd, - 0xd4bd, 0xd4bd, 0xd4bd, 0xd4bc, 0xd4bc, 0xd4bc, 0xd4bc, 0xd4bc, - 0xd4bc, 0xd4bc, 0xd4bc, 0xd4bc, 0xd4bc, 0xd4bb, 0xd4bb, 0xd4bb, - 0xd4bb, 0xd4bb, 0xd4bb, 0xd4bb, 0xd4bb, 0xd4bb, 0xd4bb, 0xd4ba, - 0xd4ba, 0xd4ba, 0xd4ba, 0xd4ba, 0xd4ba, 0xd4ba, 0xd4ba, 0xd4ba, - 0xd4ba, 0xd4ba, 0xd4b9, 0xd4b9, 0xd4b9, 0xd4b9, 0xd4b9, 0xd4b9, - 0xd4b9, 0xd4b9, 0xd4b9, 0xd4b9, 0xd4b8, 0xd4b8, 0xd4b8, 0xd4b8, - 0xd4b8, 0xd4b8, 0xd4b8, 0xd4b8, 0xd4b8, 0xd4b8, 0xd4b8, 0xd4b7, - 0xd4b7, 0xd4b7, 0xd4b7, 0xd4b7, 0xd4b7, 0xd4b7, 0xd4b7, 0xd4b7, - 0xd4b7, 0xd4b6, 0xd4b6, 0xd4b6, 0xd4b6, 0xd4b6, 0xd4b6, 0xd4b6, - 0xd4b6, 0xd4b6, 0xd4b6, 0xd4b6, 0xd4b5, 0xd4b5, 0xd4b5, 0xd4b5, - 0xd4b5, 0xd4b5, 0xd4b5, 0xd4b5, 0xd4b5, 0xd4b5, 0xd4b4, 0xd4b4, - 0xd4b4, 0xd4b4, 0xd4b4, 0xd4b4, 0xd4b4, 0xd4b4, 0xd4b4, 0xd4b4, - 0xd4b4, 0xd4b3, 0xd4b3, 0xd4b3, 0xd4b3, 0xd4b3, 0xd4b3, 0xd4b3, - 0xd4b3, 0xd4b3, 0xd4b3, 0xd4b3, 0xd4b2, 0xd4b2, 0xd4b2, 0xd4b2, - 0xd4b2, 0xd4b2, 0xd4b2, 0xd4b2, 0xd4b2, 0xd4b2, 0xd4b2, 0xd4b1, - 0xd4b1, 0xd4b1, 0xd4b1, 0xd4b1, 0xd4b1, 0xd4b1, 0xd4b1, 0xd4b1, - 0xd4b1, 0xd4b1, 0xd4b0, 0xd4b0, 0xd4b0, 0xd4b0, 0xd4b0, 0xd4b0, - 0xd4b0, 0xd4b0, 0xd4b0, 0xd4b0, 0xd4b0, 0xd4af, 0xd4af, 0xd4af, - 0xd4af, 0xd4af, 0xd4af, 0xd4af, 0xd4af, 0xd4af, 0xd4af, 0xd4af, - 0xd4ae, 0xd4ae, 0xd4ae, 0xd4ae, 0xd4ae, 0xd4ae, 0xd4ae, 0xd4ae, - 0xd4ae, 0xd4ae, 0xd4ae, 0xd4ae, 0xd4ad, 0xd4ad, 0xd4ad, 0xd4ad, - 0xd4ad, 0xd4ad, 0xd4ad, 0xd4ad, 0xd4ad, 0xd4ad, 0xd4ad, 0xd4ac, - 0xd4ac, 0xd4ac, 0xd4ac, 0xd4ac, 0xd4ac, 0xd4ac, 0xd4ac, 0xd4ac, - 0xd4ac, 0xd4ac, 0xd4ab, 0xd4ab, 0xd4ab, 0xd4ab, 0xd4ab, 0xd4ab, - 0xd4ab, 0xd4ab, 0xd4ab, 0xd4ab, 0xd4ab, 0xd4ab, 0xd4aa, 0xd4aa, - 0xd4aa, 0xd4aa, 0xd4aa, 0xd4aa, 0xd4aa, 0xd4aa, 0xd4aa, 0xd4aa, - 0xd4aa, 0xd4aa, 0xd4a9, 0xd4a9, 0xd4a9, 0xd4a9, 0xd4a9, 0xd4a9, - 0xd4a9, 0xd4a9, 0xd4a9, 0xd4a9, 0xd4a9, 0xd4a8, 0xd4a8, 0xd4a8, - 0xd4a8, 0xd4a8, 0xd4a8, 0xd4a8, 0xd4a8, 0xd4a8, 0xd4a8, 0xd4a8, - 0xd4a8, 0xd4a7, 0xd4a7, 0xd4a7, 0xd4a7, 0xd4a7, 0xd4a7, 0xd4a7, - 0xd4a7, 0xd4a7, 0xd4a7, 0xd4a7, 0xd4a7, 0xd4a6, 0xd4a6, 0xd4a6, - 0xd4a6, 0xd4a6, 0xd4a6, 0xd4a6, 0xd4a6, 0xd4a6, 0xd4a6, 0xd4a6, - 0xd4a6, 0xd4a5, 0xd4a5, 0xd4a5, 0xd4a5, 0xd4a5, 0xd4a5, 0xd4a5, - 0xd4a5, 0xd4a5, 0xd4a5, 0xd4a5, 0xd4a5, 0xd4a4, 0xd4a4, 0xd4a4, - 0xd4a4, 0xd4a4, 0xd4a4, 0xd4a4, 0xd4a4, 0xd4a4, 0xd4a4, 0xd4a4, - 0xd4a4, 0xd4a3, 0xd4a3, 0xd4a3, 0xd4a3, 0xd4a3, 0xd4a3, 0xd4a3, - 0xd4a3, 0xd4a3, 0xd4a3, 0xd4a3, 0xd4a3, 0xd4a3, 0xd4a2, 0xd4a2, - 0xd4a2, 0xd4a2, 0xd4a2, 0xd4a2, 0xd4a2, 0xd4a2, 0xd4a2, 0xd4a2, - 0xd4a2, 0xd4a2, 0xd4a1, 0xd4a1, 0xd4a1, 0xd4a1, 0xd4a1, 0xd4a1, - 0xd4a1, 0xd4a1, 0xd4a1, 0xd4a1, 0xd4a1, 0xd4a1, 0xd4a1, 0xd4a0, - 0xd4a0, 0xd4a0, 0xd4a0, 0xd4a0, 0xd4a0, 0xd4a0, 0xd4a0, 0xd4a0, - 0xd4a0, 0xd4a0, 0xd4a0, 0xd49f, 0xd49f, 0xd49f, 0xd49f, 0xd49f, - 0xd49f, 0xd49f, 0xd49f, 0xd49f, 0xd49f, 0xd49f, 0xd49f, 0xd49f, - 0xd49e, 0xd49e, 0xd49e, 0xd49e, 0xd49e, 0xd49e, 0xd49e, 0xd49e, - 0xd49e, 0xd49e, 0xd49e, 0xd49e, 0xd49e, 0xd49d, 0xd49d, 0xd49d, - 0xd49d, 0xd49d, 0xd49d, 0xd49d, 0xd49d, 0xd49d, 0xd49d, 0xd49d, - 0xd49d, 0xd49d, 0xd49c, 0xd49c, 0xd49c, 0xd49c, 0xd49c, 0xd49c, - 0xd49c, 0xd49c, 0xd49c, 0xd49c, 0xd49c, 0xd49c, 0xd49c, 0xd49b, - 0xd49b, 0xd49b, 0xd49b, 0xd49b, 0xd49b, 0xd49b, 0xd49b, 0xd49b, - 0xd49b, 0xd49b, 0xd49b, 0xd49b, 0xd49a, 0xd49a, 0xd49a, 0xd49a, - 0xd49a, 0xd49a, 0xd49a, 0xd49a, 0xd49a, 0xd49a, 0xd49a, 0xd49a, - 0xd49a, 0xd499, 0xd499, 0xd499, 0xd499, 0xd499, 0xd499, 0xd499, - 0xd499, 0xd499, 0xd499, 0xd499, 0xd499, 0xd499, 0xd498, 0xd498, - 0xd498, 0xd498, 0xd498, 0xd498, 0xd498, 0xd498, 0xd498, 0xd498, - 0xd498, 0xd498, 0xd498, 0xd498, 0xd497, 0xd497, 0xd497, 0xd497, - 0xd497, 0xd497, 0xd497, 0xd497, 0xd497, 0xd497, 0xd497, 0xd497, - 0xd497, 0xd496, 0xd496, 0xd496, 0xd496, 0xd496, 0xd496, 0xd496, - 0xd496, 0xd496, 0xd496, 0xd496, 0xd496, 0xd496, 0xd496, 0xd495, - 0xd495, 0xd495, 0xd495, 0xd495, 0xd495, 0xd495, 0xd495, 0xd495, - 0xd495, 0xd495, 0xd495, 0xd495, 0xd495, 0xd494, 0xd494, 0xd494, - 0xd494, 0xd494, 0xd494, 0xd494, 0xd494, 0xd494, 0xd494, 0xd494, - 0xd494, 0xd494, 0xd493, 0xd493, 0xd493, 0xd493, 0xd493, 0xd493, - 0xd493, 0xd493, 0xd493, 0xd493, 0xd493, 0xd493, 0xd493, 0xd493, - 0xd492, 0xd492, 0xd492, 0xd492, 0xd492, 0xd492, 0xd492, 0xd492, - 0xd492, 0xd492, 0xd492, 0xd492, 0xd492, 0xd492, 0xd491, 0xd491, - 0xd491, 0xd491, 0xd491, 0xd491, 0xd491, 0xd491, 0xd491, 0xd491, - 0xd491, 0xd491, 0xd491, 0xd491, 0xd491, 0xd490, 0xd490, 0xd490, - 0xd490, 0xd490, 0xd490, 0xd490, 0xd490, 0xd490, 0xd490, 0xd490, - 0xd490, 0xd490, 0xd490, 0xd48f, 0xd48f, 0xd48f, 0xd48f, 0xd48f, - 0xd48f, 0xd48f, 0xd48f, 0xd48f, 0xd48f, 0xd48f, 0xd48f, 0xd48f, - 0xd48f, 0xd48e, 0xd48e, 0xd48e, 0xd48e, 0xd48e, 0xd48e, 0xd48e, - 0xd48e, 0xd48e, 0xd48e, 0xd48e, 0xd48e, 0xd48e, 0xd48e, 0xd48e, - 0xd48d, 0xd48d, 0xd48d, 0xd48d, 0xd48d, 0xd48d, 0xd48d, 0xd48d, - 0xd48d, 0xd48d, 0xd48d, 0xd48d, 0xd48d, 0xd48d, 0xd48c, 0xd48c, - 0xd48c, 0xd48c, 0xd48c, 0xd48c, 0xd48c, 0xd48c, 0xd48c, 0xd48c, - 0xd48c, 0xd48c, 0xd48c, 0xd48c, 0xd48c, 0xd48b, 0xd48b, 0xd48b, - 0xd48b, 0xd48b, 0xd48b, 0xd48b, 0xd48b, 0xd48b, 0xd48b, 0xd48b, - 0xd48b, 0xd48b, 0xd48b, 0xd48b, 0xd48a, 0xd48a, 0xd48a, 0xd48a, - 0xd48a, 0xd48a, 0xd48a, 0xd48a, 0xd48a, 0xd48a, 0xd48a, 0xd48a, - 0xd48a, 0xd48a, 0xd48a, 0xd489, 0xd489, 0xd489, 0xd489, 0xd489, - 0xd489, 0xd489, 0xd489, 0xd489, 0xd489, 0xd489, 0xd489, 0xd489, - 0xd489, 0xd489, 0xd488, 0xd488, 0xd488, 0xd488, 0xd488, 0xd488, - 0xd488, 0xd488, 0xd488, 0xd488, 0xd488, 0xd488, 0xd488, 0xd488, - 0xd488, 0xd487, 0xd487, 0xd487, 0xd487, 0xd487, 0xd487, 0xd487, - 0xd487, 0xd487, 0xd487, 0xd487, 0xd487, 0xd487, 0xd487, 0xd487, - 0xd486, 0xd486, 0xd486, 0xd486, 0xd486, 0xd486, 0xd486, 0xd486, - 0xd486, 0xd486, 0xd486, 0xd486, 0xd486, 0xd486, 0xd486, 0xd486, - 0xd485, 0xd485, 0xd485, 0xd485, 0xd485, 0xd485, 0xd485, 0xd485, - 0xd485, 0xd485, 0xd485, 0xd485, 0xd485, 0xd485, 0xd485, 0xd484, - 0xd484, 0xd484, 0xd484, 0xd484, 0xd484, 0xd484, 0xd484, 0xd484, - 0xd484, 0xd484, 0xd484, 0xd484, 0xd484, 0xd484, 0xd484, 0xd483, - 0xd483, 0xd483, 0xd483, 0xd483, 0xd483, 0xd483, 0xd483, 0xd483, - 0xd483, 0xd483, 0xd483, 0xd483, 0xd483, 0xd483, 0xd483, 0xd482, - 0xd482, 0xd482, 0xd482, 0xd482, 0xd482, 0xd482, 0xd482, 0xd482, - 0xd482, 0xd482, 0xd482, 0xd482, 0xd482, 0xd482, 0xd482, 0xd481, - 0xd481, 0xd481, 0xd481, 0xd481, 0xd481, 0xd481, 0xd481, 0xd481, - 0xd480, 0xd480, 0xd480, 0xd480, 0xd480, 0xd480, 0xd480, 0xd480, - 0xd47f, 0xd47f, 0xd47f, 0xd47f, 0xd47f, 0xd47f, 0xd47f, 0xd47f, - 0xd47e, 0xd47e, 0xd47e, 0xd47e, 0xd47e, 0xd47e, 0xd47e, 0xd47e, - 0xd47d, 0xd47d, 0xd47d, 0xd47d, 0xd47d, 0xd47d, 0xd47d, 0xd47d, - 0xd47c, 0xd47c, 0xd47c, 0xd47c, 0xd47c, 0xd47c, 0xd47c, 0xd47c, - 0xd47c, 0xd47b, 0xd47b, 0xd47b, 0xd47b, 0xd47b, 0xd47b, 0xd47b, - 0xd47b, 0xd47a, 0xd47a, 0xd47a, 0xd47a, 0xd47a, 0xd47a, 0xd47a, - 0xd47a, 0xd47a, 0xd479, 0xd479, 0xd479, 0xd479, 0xd479, 0xd479, - 0xd479, 0xd479, 0xd478, 0xd478, 0xd478, 0xd478, 0xd478, 0xd478, - 0xd478, 0xd478, 0xd478, 0xd477, 0xd477, 0xd477, 0xd477, 0xd477, - 0xd477, 0xd477, 0xd477, 0xd476, 0xd476, 0xd476, 0xd476, 0xd476, - 0xd476, 0xd476, 0xd476, 0xd476, 0xd475, 0xd475, 0xd475, 0xd475, - 0xd475, 0xd475, 0xd475, 0xd475, 0xd475, 0xd474, 0xd474, 0xd474, - 0xd474, 0xd474, 0xd474, 0xd474, 0xd474, 0xd474, 0xd473, 0xd473, - 0xd473, 0xd473, 0xd473, 0xd473, 0xd473, 0xd473, 0xd473, 0xd472, - 0xd472, 0xd472, 0xd472, 0xd472, 0xd472, 0xd472, 0xd472, 0xd472, - 0xd471, 0xd471, 0xd471, 0xd471, 0xd471, 0xd471, 0xd471, 0xd471, - 0xd471, 0xd470, 0xd470, 0xd470, 0xd470, 0xd470, 0xd470, 0xd470, - 0xd470, 0xd470, 0xd46f, 0xd46f, 0xd46f, 0xd46f, 0xd46f, 0xd46f, - 0xd46f, 0xd46f, 0xd46f, 0xd46e, 0xd46e, 0xd46e, 0xd46e, 0xd46e, - 0xd46e, 0xd46e, 0xd46e, 0xd46e, 0xd46e, 0xd46d, 0xd46d, 0xd46d, - 0xd46d, 0xd46d, 0xd46d, 0xd46d, 0xd46d, 0xd46d, 0xd46c, 0xd46c, - 0xd46c, 0xd46c, 0xd46c, 0xd46c, 0xd46c, 0xd46c, 0xd46c, 0xd46c, - 0xd46b, 0xd46b, 0xd46b, 0xd46b, 0xd46b, 0xd46b, 0xd46b, 0xd46b, - 0xd46b, 0xd46a, 0xd46a, 0xd46a, 0xd46a, 0xd46a, 0xd46a, 0xd46a, - 0xd46a, 0xd46a, 0xd46a, 0xd469, 0xd469, 0xd469, 0xd469, 0xd469, - 0xd469, 0xd469, 0xd469, 0xd469, 0xd468, 0xd468, 0xd468, 0xd468, - 0xd468, 0xd468, 0xd468, 0xd468, 0xd468, 0xd468, 0xd467, 0xd467, - 0xd467, 0xd467, 0xd467, 0xd467, 0xd467, 0xd467, 0xd467, 0xd467, - 0xd466, 0xd466, 0xd466, 0xd466, 0xd466, 0xd466, 0xd466, 0xd466, - 0xd466, 0xd466, 0xd465, 0xd465, 0xd465, 0xd465, 0xd465, 0xd465, - 0xd465, 0xd465, 0xd465, 0xd465, 0xd464, 0xd464, 0xd464, 0xd464, - 0xd464, 0xd464, 0xd464, 0xd464, 0xd464, 0xd464, 0xd463, 0xd463, - 0xd463, 0xd463, 0xd463, 0xd463, 0xd463, 0xd463, 0xd463, 0xd463, - 0xd462, 0xd462, 0xd462, 0xd462, 0xd462, 0xd462, 0xd462, 0xd462, - 0xd462, 0xd462, 0xd461, 0xd461, 0xd461, 0xd461, 0xd461, 0xd461, - 0xd461, 0xd461, 0xd461, 0xd461, 0xd461, 0xd460, 0xd460, 0xd460, - 0xd460, 0xd460, 0xd460, 0xd460, 0xd460, 0xd460, 0xd460, 0xd45f, - 0xd45f, 0xd45f, 0xd45f, 0xd45f, 0xd45f, 0xd45f, 0xd45f, 0xd45f, - 0xd45f, 0xd45e, 0xd45e, 0xd45e, 0xd45e, 0xd45e, 0xd45e, 0xd45e, - 0xd45e, 0xd45e, 0xd45e, 0xd45e, 0xd45d, 0xd45d, 0xd45d, 0xd45d, - 0xd45d, 0xd45d, 0xd45d, 0xd45d, 0xd45d, 0xd45d, 0xd45d, 0xd45c, - 0xd45c, 0xd45c, 0xd45c, 0xd45c, 0xd45c, 0xd45c, 0xd45c, 0xd45c, - 0xd45c, 0xd45b, 0xd45b, 0xd45b, 0xd45b, 0xd45b, 0xd45b, 0xd45b, - 0xd45b, 0xd45b, 0xd45b, 0xd45b, 0xd45a, 0xd45a, 0xd45a, 0xd45a, - 0xd45a, 0xd45a, 0xd45a, 0xd45a, 0xd45a, 0xd45a, 0xd45a, 0xd459, - 0xd459, 0xd459, 0xd459, 0xd459, 0xd459, 0xd459, 0xd459, 0xd459, - 0xd459, 0xd459, 0xd458, 0xd458, 0xd458, 0xd458, 0xd458, 0xd458, - 0xd458, 0xd458, 0xd458, 0xd458, 0xd458, 0xd457, 0xd457, 0xd457, - 0xd457, 0xd457, 0xd457, 0xd457, 0xd457, 0xd457, 0xd457, 0xd457, - 0xd456, 0xd456, 0xd456, 0xd456, 0xd456, 0xd456, 0xd456, 0xd456, - 0xd456, 0xd456, 0xd456, 0xd455, 0xd455, 0xd455, 0xd455, 0xd455, - 0xd455, 0xd455, 0xd455, 0xd455, 0xd455, 0xd455, 0xd455, 0xd454, - 0xd454, 0xd454, 0xd454, 0xd454, 0xd454, 0xd454, 0xd454, 0xd454, - 0xd454, 0xd454, 0xd453, 0xd453, 0xd453, 0xd453, 0xd453, 0xd453, - 0xd453, 0xd453, 0xd453, 0xd453, 0xd453, 0xd453, 0xd452, 0xd452, - 0xd452, 0xd452, 0xd452, 0xd452, 0xd452, 0xd452, 0xd452, 0xd452, - 0xd452, 0xd451, 0xd451, 0xd451, 0xd451, 0xd451, 0xd451, 0xd451, - 0xd451, 0xd451, 0xd451, 0xd451, 0xd451, 0xd450, 0xd450, 0xd450, - 0xd450, 0xd450, 0xd450, 0xd450, 0xd450, 0xd450, 0xd450, 0xd450, - 0xd450, 0xd44f, 0xd44f, 0xd44f, 0xd44f, 0xd44f, 0xd44f, 0xd44f, - 0xd44f, 0xd44f, 0xd44f, 0xd44f, 0xd44f, 0xd44e, 0xd44e, 0xd44e, - 0xd44e, 0xd44e, 0xd44e, 0xd44e, 0xd44e, 0xd44e, 0xd44e, 0xd44e, - 0xd44d, 0xd44d, 0xd44d, 0xd44d, 0xd44d, 0xd44d, 0xd44d, 0xd44d, - 0xd44d, 0xd44d, 0xd44d, 0xd44d, 0xd44d, 0xd44c, 0xd44c, 0xd44c, - 0xd44c, 0xd44c, 0xd44c, 0xd44c, 0xd44c, 0xd44c, 0xd44c, 0xd44c, - 0xd44c, 0xd44b, 0xd44b, 0xd44b, 0xd44b, 0xd44b, 0xd44b, 0xd44b, - 0xd44b, 0xd44b, 0xd44b, 0xd44b, 0xd44b, 0xd44a, 0xd44a, 0xd44a, - 0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a, 0xd44a, - 0xd44a, 0xd449, 0xd449, 0xd449, 0xd449, 0xd449, 0xd449, 0xd449, - 0xd449, 0xd449, 0xd449, 0xd449, 0xd449, 0xd449, 0xd448, 0xd448, - 0xd448, 0xd448, 0xd448, 0xd448, 0xd448, 0xd448, 0xd448, 0xd448, - 0xd448, 0xd448, 0xd447, 0xd447, 0xd447, 0xd447, 0xd447, 0xd447, - 0xd447, 0xd447, 0xd447, 0xd447, 0xd447, 0xd447, 0xd447, 0xd446, - 0xd446, 0xd446, 0xd446, 0xd446, 0xd446, 0xd446, 0xd446, 0xd446, - 0xd446, 0xd446, 0xd446, 0xd446, 0xd445, 0xd445, 0xd445, 0xd445, - 0xd445, 0xd445, 0xd445, 0xd445, 0xd445, 0xd445, 0xd445, 0xd445, - 0xd444, 0xd444, 0xd444, 0xd444, 0xd444, 0xd444, 0xd444, 0xd444, - 0xd444, 0xd444, 0xd444, 0xd444, 0xd444, 0xd443, 0xd443, 0xd443, - 0xd443, 0xd443, 0xd443, 0xd443, 0xd443, 0xd443, 0xd443, 0xd443, - 0xd443, 0xd443, 0xd442, 0xd442, 0xd442, 0xd442, 0xd442, 0xd442, - 0xd442, 0xd442, 0xd442, 0xd442, 0xd442, 0xd442, 0xd442, 0xd441, - 0xd441, 0xd441, 0xd441, 0xd441, 0xd441, 0xd441, 0xd441, 0xd441, - 0xd441, 0xd441, 0xd441, 0xd441, 0xd441, 0xd440, 0xd440, 0xd440, - 0xd440, 0xd440, 0xd440, 0xd440, 0xd440, 0xd440, 0xd440, 0xd440, - 0xd440, 0xd440, 0xd43f, 0xd43f, 0xd43f, 0xd43f, 0xd43f, 0xd43f, - 0xd43f, 0xd43f, 0xd43f, 0xd43f, 0xd43f, 0xd43f, 0xd43f, 0xd43e, - 0xd43e, 0xd43e, 0xd43e, 0xd43e, 0xd43e, 0xd43e, 0xd43e, 0xd43e, - 0xd43e, 0xd43e, 0xd43e, 0xd43e, 0xd43e, 0xd43d, 0xd43d, 0xd43d, - 0xd43d, 0xd43d, 0xd43d, 0xd43d, 0xd43d, 0xd43d, 0xd43d, 0xd43d, - 0xd43d, 0xd43d, 0xd43d, 0xd43c, 0xd43c, 0xd43c, 0xd43c, 0xd43c, - 0xd43c, 0xd43c, 0xd43c, 0xd43c, 0xd43c, 0xd43c, 0xd43c, 0xd43c, - 0xd43b, 0xd43b, 0xd43b, 0xd43b, 0xd43b, 0xd43b, 0xd43b, 0xd43b, - 0xd43b, 0xd43b, 0xd43b, 0xd43b, 0xd43b, 0xd43b, 0xd43a, 0xd43a, - 0xd43a, 0xd43a, 0xd43a, 0xd43a, 0xd43a, 0xd43a, 0xd43a, 0xd43a, - 0xd43a, 0xd43a, 0xd43a, 0xd43a, 0xd439, 0xd439, 0xd439, 0xd439, - 0xd439, 0xd439, 0xd439, 0xd439, 0xd439, 0xd439, 0xd439, 0xd439, - 0xd439, 0xd439, 0xd438, 0xd438, 0xd438, 0xd438, 0xd438, 0xd438, - 0xd438, 0xd438, 0xd438, 0xd438, 0xd438, 0xd438, 0xd438, 0xd438, - 0xd438, 0xd437, 0xd437, 0xd437, 0xd437, 0xd437, 0xd437, 0xd437, - 0xd437, 0xd437, 0xd437, 0xd437, 0xd437, 0xd437, 0xd437, 0xd436, - 0xd436, 0xd436, 0xd436, 0xd436, 0xd436, 0xd436, 0xd436, 0xd436, - 0xd436, 0xd436, 0xd436, 0xd436, 0xd436, 0xd435, 0xd435, 0xd435, - 0xd435, 0xd435, 0xd435, 0xd435, 0xd435, 0xd435, 0xd435, 0xd435, - 0xd435, 0xd435, 0xd435, 0xd435, 0xd434, 0xd434, 0xd434, 0xd434, - 0xd434, 0xd434, 0xd434, 0xd434, 0xd434, 0xd434, 0xd434, 0xd434, - 0xd434, 0xd434, 0xd433, 0xd433, 0xd433, 0xd433, 0xd433, 0xd433, - 0xd433, 0xd433, 0xd433, 0xd433, 0xd433, 0xd433, 0xd433, 0xd433, - 0xd433, 0xd432, 0xd432, 0xd432, 0xd432, 0xd432, 0xd432, 0xd432, - 0xd432, 0xd432, 0xd432, 0xd432, 0xd432, 0xd432, 0xd432, 0xd432, - 0xd431, 0xd431, 0xd431, 0xd431, 0xd431, 0xd431, 0xd431, 0xd431, - 0xd431, 0xd431, 0xd431, 0xd431, 0xd431, 0xd431, 0xd431, 0xd430, - 0xd430, 0xd430, 0xd430, 0xd430, 0xd430, 0xd430, 0xd430, 0xd430, - 0xd430, 0xd430, 0xd430, 0xd430, 0xd430, 0xd430, 0xd42f, 0xd42f, - 0xd42f, 0xd42f, 0xd42f, 0xd42f, 0xd42f, 0xd42f, 0xd42f, 0xd42f, - 0xd42f, 0xd42f, 0xd42f, 0xd42f, 0xd42f, 0xd42e, 0xd42e, 0xd42e, - 0xd42e, 0xd42e, 0xd42e, 0xd42e, 0xd42e, 0xd42e, 0xd42e, 0xd42e, - 0xd42e, 0xd42e, 0xd42e, 0xd42e, 0xd42e, 0xd42d, 0xd42d, 0xd42d, - 0xd42d, 0xd42d, 0xd42d, 0xd42d, 0xd42d, 0xd42d, 0xd42d, 0xd42d, - 0xd42d, 0xd42d, 0xd42d, 0xd42d, 0xd42c, 0xd42c, 0xd42c, 0xd42c, - 0xd42c, 0xd42c, 0xd42c, 0xd42c, 0xd42c, 0xd42c, 0xd42c, 0xd42c, - 0xd42c, 0xd42c, 0xd42c, 0xd42c, 0xd42b, 0xd42b, 0xd42b, 0xd42b, - 0xd42b, 0xd42b, 0xd42b, 0xd42b, 0xd42b, 0xd42b, 0xd42b, 0xd42b, - 0xd42b, 0xd42b, 0xd42b, 0xd42a, 0xd42a, 0xd42a, 0xd42a, 0xd42a, - 0xd42a, 0xd42a, 0xd42a, 0xd42a, 0xd42a, 0xd42a, 0xd42a, 0xd42a, - 0xd42a, 0xd42a, 0xd42a, 0xd429, 0xd429, 0xd429, 0xd429, 0xd429, - 0xd429, 0xd429, 0xd429, 0xd429, 0xd429, 0xd429, 0xd429, 0xd429, - 0xd429, 0xd429, 0xd428, 0xd428, 0xd428, 0xd428, 0xd428, 0xd428, - 0xd428, 0xd428, 0xd427, 0xd427, 0xd427, 0xd427, 0xd427, 0xd427, - 0xd427, 0xd427, 0xd426, 0xd426, 0xd426, 0xd426, 0xd426, 0xd426, - 0xd426, 0xd426, 0xd425, 0xd425, 0xd425, 0xd425, 0xd425, 0xd425, - 0xd425, 0xd425, 0xd424, 0xd424, 0xd424, 0xd424, 0xd424, 0xd424, - 0xd424, 0xd424, 0xd424, 0xd423, 0xd423, 0xd423, 0xd423, 0xd423, - 0xd423, 0xd423, 0xd423, 0xd422, 0xd422, 0xd422, 0xd422, 0xd422, - 0xd422, 0xd422, 0xd422, 0xd422, 0xd421, 0xd421, 0xd421, 0xd421, - 0xd421, 0xd421, 0xd421, 0xd421, 0xd420, 0xd420, 0xd420, 0xd420, - 0xd420, 0xd420, 0xd420, 0xd420, 0xd420, 0xd41f, 0xd41f, 0xd41f, - 0xd41f, 0xd41f, 0xd41f, 0xd41f, 0xd41f, 0xd41e, 0xd41e, 0xd41e, - 0xd41e, 0xd41e, 0xd41e, 0xd41e, 0xd41e, 0xd41e, 0xd41d, 0xd41d, - 0xd41d, 0xd41d, 0xd41d, 0xd41d, 0xd41d, 0xd41d, 0xd41d, 0xd41c, - 0xd41c, 0xd41c, 0xd41c, 0xd41c, 0xd41c, 0xd41c, 0xd41c, 0xd41c, - 0xd41b, 0xd41b, 0xd41b, 0xd41b, 0xd41b, 0xd41b, 0xd41b, 0xd41b, - 0xd41a, 0xd41a, 0xd41a, 0xd41a, 0xd41a, 0xd41a, 0xd41a, 0xd41a, - 0xd41a, 0xd419, 0xd419, 0xd419, 0xd419, 0xd419, 0xd419, 0xd419, - 0xd419, 0xd419, 0xd418, 0xd418, 0xd418, 0xd418, 0xd418, 0xd418, - 0xd418, 0xd418, 0xd418, 0xd418, 0xd417, 0xd417, 0xd417, 0xd417, - 0xd417, 0xd417, 0xd417, 0xd417, 0xd417, 0xd416, 0xd416, 0xd416, - 0xd416, 0xd416, 0xd416, 0xd416, 0xd416, 0xd416, 0xd415, 0xd415, - 0xd415, 0xd415, 0xd415, 0xd415, 0xd415, 0xd415, 0xd415, 0xd414, - 0xd414, 0xd414, 0xd414, 0xd414, 0xd414, 0xd414, 0xd414, 0xd414, - 0xd414, 0xd413, 0xd413, 0xd413, 0xd413, 0xd413, 0xd413, 0xd413, - 0xd413, 0xd413, 0xd412, 0xd412, 0xd412, 0xd412, 0xd412, 0xd412, - 0xd412, 0xd412, 0xd412, 0xd412, 0xd411, 0xd411, 0xd411, 0xd411, - 0xd411, 0xd411, 0xd411, 0xd411, 0xd411, 0xd410, 0xd410, 0xd410, - 0xd410, 0xd410, 0xd410, 0xd410, 0xd410, 0xd410, 0xd410, 0xd40f, - 0xd40f, 0xd40f, 0xd40f, 0xd40f, 0xd40f, 0xd40f, 0xd40f, 0xd40f, - 0xd40f, 0xd40e, 0xd40e, 0xd40e, 0xd40e, 0xd40e, 0xd40e, 0xd40e, - 0xd40e, 0xd40e, 0xd40e, 0xd40d, 0xd40d, 0xd40d, 0xd40d, 0xd40d, - 0xd40d, 0xd40d, 0xd40d, 0xd40d, 0xd40d, 0xd40c, 0xd40c, 0xd40c, - 0xd40c, 0xd40c, 0xd40c, 0xd40c, 0xd40c, 0xd40c, 0xd40c, 0xd40b, - 0xd40b, 0xd40b, 0xd40b, 0xd40b, 0xd40b, 0xd40b, 0xd40b, 0xd40b, - 0xd40b, 0xd40a, 0xd40a, 0xd40a, 0xd40a, 0xd40a, 0xd40a, 0xd40a, - 0xd40a, 0xd40a, 0xd40a, 0xd409, 0xd409, 0xd409, 0xd409, 0xd409, - 0xd409, 0xd409, 0xd409, 0xd409, 0xd409, 0xd408, 0xd408, 0xd408, - 0xd408, 0xd408, 0xd408, 0xd408, 0xd408, 0xd408, 0xd408, 0xd407, - 0xd407, 0xd407, 0xd407, 0xd407, 0xd407, 0xd407, 0xd407, 0xd407, - 0xd407, 0xd407, 0xd406, 0xd406, 0xd406, 0xd406, 0xd406, 0xd406, - 0xd406, 0xd406, 0xd406, 0xd406, 0xd405, 0xd405, 0xd405, 0xd405, - 0xd405, 0xd405, 0xd405, 0xd405, 0xd405, 0xd405, 0xd405, 0xd404, - 0xd404, 0xd404, 0xd404, 0xd404, 0xd404, 0xd404, 0xd404, 0xd404, - 0xd404, 0xd404, 0xd403, 0xd403, 0xd403, 0xd403, 0xd403, 0xd403, - 0xd403, 0xd403, 0xd403, 0xd403, 0xd402, 0xd402, 0xd402, 0xd402, - 0xd402, 0xd402, 0xd402, 0xd402, 0xd402, 0xd402, 0xd402, 0xd401, - 0xd401, 0xd401, 0xd401, 0xd401, 0xd401, 0xd401, 0xd401, 0xd401, - 0xd401, 0xd401, 0xd400, 0xd400, 0xd400, 0xd400, 0xd400, 0xd400, - 0xd400, 0xd400, 0xd3ff, 0xd3ff, 0xd3ff, 0xd3ff, 0xd3ff, 0xd3ff, - 0xd3fe, 0xd3fe, 0xd3fe, 0xd3fe, 0xd3fe, 0xd3fd, 0xd3fd, 0xd3fd, - 0xd3fd, 0xd3fd, 0xd3fd, 0xd3fc, 0xd3fc, 0xd3fc, 0xd3fc, 0xd3fc, - 0xd3fb, 0xd3fb, 0xd3fb, 0xd3fb, 0xd3fb, 0xd3fb, 0xd3fa, 0xd3fa, - 0xd3fa, 0xd3fa, 0xd3fa, 0xd3fa, 0xd3f9, 0xd3f9, 0xd3f9, 0xd3f9, - 0xd3f9, 0xd3f8, 0xd3f8, 0xd3f8, 0xd3f8, 0xd3f8, 0xd3f8, 0xd3f7, - 0xd3f7, 0xd3f7, 0xd3f7, 0xd3f7, 0xd3f7, 0xd3f6, 0xd3f6, 0xd3f6, - 0xd3f6, 0xd3f6, 0xd3f5, 0xd3f5, 0xd3f5, 0xd3f5, 0xd3f5, 0xd3f5, - 0xd3f4, 0xd3f4, 0xd3f4, 0xd3f4, 0xd3f4, 0xd3f4, 0xd3f3, 0xd3f3, - 0xd3f3, 0xd3f3, 0xd3f3, 0xd3f3, 0xd3f2, 0xd3f2, 0xd3f2, 0xd3f2, - 0xd3f2, 0xd3f2, 0xd3f1, 0xd3f1, 0xd3f1, 0xd3f1, 0xd3f1, 0xd3f0, - 0xd3f0, 0xd3f0, 0xd3f0, 0xd3f0, 0xd3f0, 0xd3ef, 0xd3ef, 0xd3ef, - 0xd3ef, 0xd3ef, 0xd3ef, 0xd3ee, 0xd3ee, 0xd3ee, 0xd3ee, 0xd3ee, - 0xd3ee, 0xd3ed, 0xd3ed, 0xd3ed, 0xd3ed, 0xd3ed, 0xd3ed, 0xd3ec, - 0xd3ec, 0xd3ec, 0xd3ec, 0xd3ec, 0xd3ec, 0xd3eb, 0xd3eb, 0xd3eb, - 0xd3eb, 0xd3eb, 0xd3eb, 0xd3ea, 0xd3ea, 0xd3ea, 0xd3ea, 0xd3ea, - 0xd3ea, 0xd3e9, 0xd3e9, 0xd3e9, 0xd3e9, 0xd3e9, 0xd3e9, 0xd3e8, - 0xd3e8, 0xd3e8, 0xd3e8, 0xd3e8, 0xd3e8, 0xd3e7, 0xd3e7, 0xd3e7, - 0xd3e7, 0xd3e7, 0xd3e7, 0xd3e6, 0xd3e6, 0xd3e6, 0xd3e6, 0xd3e6, - 0xd3e6, 0xd3e5, 0xd3e5, 0xd3e5, 0xd3e5, 0xd3e5, 0xd3e5, 0xd3e4, - 0xd3e4, 0xd3e4, 0xd3e4, 0xd3e4, 0xd3e4, 0xd3e3, 0xd3e3, 0xd3e3, - 0xd3e3, 0xd3e3, 0xd3e3, 0xd3e2, 0xd3e2, 0xd3e2, 0xd3e2, 0xd3e2, - 0xd3e2, 0xd3e2, 0xd3e1, 0xd3e1, 0xd3e1, 0xd3e1, 0xd3e1, 0xd3e1, - 0xd3e0, 0xd3e0, 0xd3e0, 0xd3e0, 0xd3e0, 0xd3e0, 0xd3df, 0xd3df, - 0xd3df, 0xd3df, 0xd3df, 0xd3df, 0xd3de, 0xd3de, 0xd3de, 0xd3de, - 0xd3de, 0xd3de, 0xd3de, 0xd3dd, 0xd3dd, 0xd3dd, 0xd3dd, 0xd3dd, - 0xd3dd, 0xd3dc, 0xd3dc, 0xd3dc, 0xd3dc, 0xd3dc, 0xd3dc, 0xd3db, - 0xd3db, 0xd3db, 0xd3db, 0xd3db, 0xd3db, 0xd3db, 0xd3da, 0xd3da, - 0xd3da, 0xd3da, 0xd3da, 0xd3da, 0xd3d9, 0xd3d9, 0xd3d9, 0xd3d9, - 0xd3d9, 0xd3d9, 0xd3d8, 0xd3d8, 0xd3d8, 0xd3d8, 0xd3d8, 0xd3d8, - 0xd3d8, 0xd3d7, 0xd3d7, 0xd3d7, 0xd3d7, 0xd3d7, 0xd3d7, 0xd3d6, - 0xd3d6, 0xd3d6, 0xd3d6, 0xd3d6, 0xd3d6, 0xd3d6, 0xd3d5, 0xd3d5, - 0xd3d5, 0xd3d5, 0xd3d5, 0xd3d5, 0xd3d4, 0xd3d4, 0xd3d4, 0xd3d4, - 0xd3d4, 0xd3d4, 0xd3d4, 0xd3d3, 0xd3d3, 0xd3d3, 0xd3d3, 0xd3d3, - 0xd3d3, 0xd3d2, 0xd3d2, 0xd3d2, 0xd3d2, 0xd3d2, 0xd3d2, 0xd3d2, - 0xd3d1, 0xd3d1, 0xd3d1, 0xd3d1, 0xd3d1, 0xd3d1, 0xd3d0, 0xd3d0, - 0xd3d0, 0xd3d0, 0xd3d0, 0xd3d0, 0xd3d0, 0xd3cf, 0xd3cf, 0xd3cf, - 0xd3cf, 0xd3cf, 0xd3cf, 0xd3cf, 0xd3ce, 0xd3ce, 0xd3ce, 0xd3ce, - 0xd3ce, 0xd3ce, 0xd3cd, 0xd3cd, 0xd3cd, 0xd3cd, 0xd3cd, 0xd3cd, - 0xd3cd, 0xd3cc, 0xd3cc, 0xd3cc, 0xd3cc, 0xd3cc, 0xd3cc, 0xd3cc, - 0xd3cb, 0xd3cb, 0xd3cb, 0xd3cb, 0xd3cb, 0xd3cb, 0xd3cb, 0xd3ca, - 0xd3ca, 0xd3ca, 0xd3ca, 0xd3ca, 0xd3ca, 0xd3c9, 0xd3c9, 0xd3c9, - 0xd3c9, 0xd3c9, 0xd3c9, 0xd3c9, 0xd3c8, 0xd3c8, 0xd3c8, 0xd3c8, - 0xd3c8, 0xd3c8, 0xd3c8, 0xd3c7, 0xd3c7, 0xd3c7, 0xd3c7, 0xd3c7, - 0xd3c7, 0xd3c7, 0xd3c6, 0xd3c6, 0xd3c6, 0xd3c6, 0xd3c6, 0xd3c6, - 0xd3c6, 0xd3c5, 0xd3c5, 0xd3c5, 0xd3c5, 0xd3c5, 0xd3c5, 0xd3c5, - 0xd3c4, 0xd3c4, 0xd3c4, 0xd3c4, 0xd3c4, 0xd3c4, 0xd3c4, 0xd3c3, - 0xd3c3, 0xd3c3, 0xd3c3, 0xd3c3, 0xd3c3, 0xd3c3, 0xd3c2, 0xd3c2, - 0xd3c2, 0xd3c2, 0xd3c2, 0xd3c2, 0xd3c2, 0xd3c1, 0xd3c1, 0xd3c1, - 0xd3c1, 0xd3c1, 0xd3c1, 0xd3c1, 0xd3c0, 0xd3c0, 0xd3c0, 0xd3c0, - 0xd3c0, 0xd3c0, 0xd3c0, 0xd3bf, 0xd3bf, 0xd3bf, 0xd3bf, 0xd3bf, - 0xd3bf, 0xd3bf, 0xd3be, 0xd3be, 0xd3be, 0xd3be, 0xd3be, 0xd3be, - 0xd3be, 0xd3bd, 0xd3bd, 0xd3bd, 0xd3bd, 0xd3bd, 0xd3bd, 0xd3bd, - 0xd3bc, 0xd3bc, 0xd3bc, 0xd3bc, 0xd3bc, 0xd3bc, 0xd3bc, 0xd3bb, - 0xd3bb, 0xd3bb, 0xd3bb, 0xd3bb, 0xd3bb, 0xd3bb, 0xd3ba, 0xd3ba, - 0xd3ba, 0xd3ba, 0xd3ba, 0xd3ba, 0xd3ba, 0xd3ba, 0xd3b9, 0xd3b9, - 0xd3b9, 0xd3b9, 0xd3b9, 0xd3b9, 0xd3b9, 0xd3b8, 0xd3b8, 0xd3b8, - 0xd3b8, 0xd3b8, 0xd3b8, 0xd3b8, 0xd3b7, 0xd3b7, 0xd3b7, 0xd3b7, - 0xd3b7, 0xd3b7, 0xd3b7, 0xd3b6, 0xd3b6, 0xd3b6, 0xd3b6, 0xd3b6, - 0xd3b6, 0xd3b6, 0xd3b6, 0xd3b5, 0xd3b5, 0xd3b5, 0xd3b5, 0xd3b5, - 0xd3b5, 0xd3b5, 0xd3b4, 0xd3b4, 0xd3b4, 0xd3b4, 0xd3b4, 0xd3b4, - 0xd3b4, 0xd3b4, 0xd3b3, 0xd3b3, 0xd3b3, 0xd3b3, 0xd3b3, 0xd3b3, - 0xd3b3, 0xd3b2, 0xd3b2, 0xd3b2, 0xd3b2, 0xd3b2, 0xd3b2, 0xd3b2, - 0xd3b1, 0xd3b1, 0xd3b1, 0xd3b1, 0xd3b1, 0xd3b1, 0xd3b1, 0xd3b1, - 0xd3b0, 0xd3b0, 0xd3b0, 0xd3b0, 0xd3b0, 0xd3b0, 0xd3b0, 0xd3af, - 0xd3af, 0xd3af, 0xd3af, 0xd3af, 0xd3af, 0xd3af, 0xd3af, 0xd3ae, - 0xd3ae, 0xd3ae, 0xd3ae, 0xd3ae, 0xd3ae, 0xd3ae, 0xd3ae, 0xd3ad, - 0xd3ad, 0xd3ad, 0xd3ad, 0xd3ad, 0xd3ad, 0xd3ad, 0xd3ac, 0xd3ac, - 0xd3ac, 0xd3ac, 0xd3ac, 0xd3ac, 0xd3ac, 0xd3ac, 0xd3ab, 0xd3ab, - 0xd3ab, 0xd3ab, 0xd3ab, 0xd3ab, 0xd3ab, 0xd3aa, 0xd3aa, 0xd3aa, - 0xd3aa, 0xd3aa, 0xd3aa, 0xd3aa, 0xd3aa, 0xd3a9, 0xd3a9, 0xd3a9, - 0xd3a9, 0xd3a9, 0xd3a9, 0xd3a9, 0xd3a9, 0xd3a8, 0xd3a8, 0xd3a8, - 0xd3a8, 0xd3a8, 0xd3a8, 0xd3a8, 0xd3a8, 0xd3a7, 0xd3a7, 0xd3a7, - 0xd3a7, 0xd3a7, 0xd3a7, 0xd3a7, 0xd3a6, 0xd3a6, 0xd3a6, 0xd3a6, - 0xd3a6, 0xd3a6, 0xd3a6, 0xd3a6, 0xd3a5, 0xd3a5, 0xd3a5, 0xd3a5, - 0xd3a5, 0xd3a5, 0xd3a5, 0xd3a5, 0xd3a4, 0xd3a4, 0xd3a4, 0xd3a4, - 0xd3a4, 0xd3a4, 0xd3a4, 0xd3a4, 0xd3a3, 0xd3a3, 0xd3a3, 0xd3a3, - 0xd3a3, 0xd3a3, 0xd3a3, 0xd3a3, 0xd3a2, 0xd3a2, 0xd3a2, 0xd3a2, - 0xd3a2, 0xd3a2, 0xd3a2, 0xd3a2, 0xd3a1, 0xd3a1, 0xd3a1, 0xd3a1, - 0xd3a1, 0xd3a1, 0xd3a1, 0xd3a1, 0xd3a0, 0xd3a0, 0xd3a0, 0xd3a0, - 0xd3a0, 0xd3a0, 0xd39f, 0xd39f, 0xd39f, 0xd39f, 0xd39e, 0xd39e, - 0xd39e, 0xd39e, 0xd39d, 0xd39d, 0xd39d, 0xd39d, 0xd39c, 0xd39c, - 0xd39c, 0xd39c, 0xd39b, 0xd39b, 0xd39b, 0xd39b, 0xd39a, 0xd39a, - 0xd39a, 0xd39a, 0xd399, 0xd399, 0xd399, 0xd399, 0xd399, 0xd398, - 0xd398, 0xd398, 0xd398, 0xd397, 0xd397, 0xd397, 0xd397, 0xd396, - 0xd396, 0xd396, 0xd396, 0xd395, 0xd395, 0xd395, 0xd395, 0xd394, - 0xd394, 0xd394, 0xd394, 0xd393, 0xd393, 0xd393, 0xd393, 0xd393, - 0xd392, 0xd392, 0xd392, 0xd392, 0xd391, 0xd391, 0xd391, 0xd391, - 0xd390, 0xd390, 0xd390, 0xd390, 0xd38f, 0xd38f, 0xd38f, 0xd38f, - 0xd38f, 0xd38e, 0xd38e, 0xd38e, 0xd38e, 0xd38d, 0xd38d, 0xd38d, - 0xd38d, 0xd38c, 0xd38c, 0xd38c, 0xd38c, 0xd38b, 0xd38b, 0xd38b, - 0xd38b, 0xd38b, 0xd38a, 0xd38a, 0xd38a, 0xd38a, 0xd389, 0xd389, - 0xd389, 0xd389, 0xd389, 0xd388, 0xd388, 0xd388, 0xd388, 0xd387, - 0xd387, 0xd387, 0xd387, 0xd386, 0xd386, 0xd386, 0xd386, 0xd386, - 0xd385, 0xd385, 0xd385, 0xd385, 0xd384, 0xd384, 0xd384, 0xd384, - 0xd384, 0xd383, 0xd383, 0xd383, 0xd383, 0xd382, 0xd382, 0xd382, - 0xd382, 0xd382, 0xd381, 0xd381, 0xd381, 0xd381, 0xd380, 0xd380, - 0xd380, 0xd380, 0xd380, 0xd37f, 0xd37f, 0xd37f, 0xd37f, 0xd37e, - 0xd37e, 0xd37e, 0xd37e, 0xd37e, 0xd37d, 0xd37d, 0xd37d, 0xd37d, - 0xd37c, 0xd37c, 0xd37c, 0xd37c, 0xd37c, 0xd37b, 0xd37b, 0xd37b, - 0xd37b, 0xd37b, 0xd37a, 0xd37a, 0xd37a, 0xd37a, 0xd379, 0xd379, - 0xd379, 0xd379, 0xd379, 0xd378, 0xd378, 0xd378, 0xd378, 0xd378, - 0xd377, 0xd377, 0xd377, 0xd377, 0xd376, 0xd376, 0xd376, 0xd376, - 0xd376, 0xd375, 0xd375, 0xd375, 0xd375, 0xd375, 0xd374, 0xd374, - 0xd374, 0xd374, 0xd373, 0xd373, 0xd373, 0xd373, 0xd373, 0xd372, - 0xd372, 0xd372, 0xd372, 0xd372, 0xd371, 0xd371, 0xd371, 0xd371, - 0xd371, 0xd370, 0xd370, 0xd370, 0xd370, 0xd370, 0xd36f, 0xd36f, - 0xd36f, 0xd36f, 0xd36e, 0xd36e, 0xd36e, 0xd36e, 0xd36e, 0xd36d, - 0xd36d, 0xd36d, 0xd36d, 0xd36d, 0xd36c, 0xd36c, 0xd36c, 0xd36c, - 0xd36c, 0xd36b, 0xd36b, 0xd36b, 0xd36b, 0xd36b, 0xd36a, 0xd36a, - 0xd36a, 0xd36a, 0xd36a, 0xd369, 0xd369, 0xd369, 0xd369, 0xd369, - 0xd368, 0xd368, 0xd368, 0xd368, 0xd368, 0xd367, 0xd367, 0xd367, - 0xd367, 0xd367, 0xd366, 0xd366, 0xd366, 0xd366, 0xd366, 0xd365, - 0xd365, 0xd365, 0xd365, 0xd365, 0xd364, 0xd364, 0xd364, 0xd364, - 0xd364, 0xd363, 0xd363, 0xd363, 0xd363, 0xd363, 0xd362, 0xd362, - 0xd362, 0xd362, 0xd362, 0xd361, 0xd361, 0xd361, 0xd361, 0xd361, - 0xd360, 0xd360, 0xd360, 0xd360, 0xd360, 0xd35f, 0xd35f, 0xd35f, - 0xd35f, 0xd35f, 0xd35f, 0xd35e, 0xd35e, 0xd35e, 0xd35e, 0xd35e, - 0xd35d, 0xd35d, 0xd35d, 0xd35d, 0xd35d, 0xd35c, 0xd35c, 0xd35c, - 0xd35c, 0xd35c, 0xd35b, 0xd35b, 0xd35b, 0xd35b, 0xd35b, 0xd35a, - 0xd35a, 0xd35a, 0xd35a, 0xd35a, 0xd35a, 0xd359, 0xd359, 0xd359, - 0xd359, 0xd359, 0xd358, 0xd358, 0xd358, 0xd358, 0xd358, 0xd357, - 0xd357, 0xd357, 0xd357, 0xd357, 0xd357, 0xd356, 0xd356, 0xd356, - 0xd356, 0xd356, 0xd355, 0xd355, 0xd355, 0xd355, 0xd355, 0xd354, - 0xd354, 0xd354, 0xd354, 0xd354, 0xd354, 0xd353, 0xd353, 0xd353, - 0xd353, 0xd353, 0xd352, 0xd352, 0xd352, 0xd352, 0xd352, 0xd351, - 0xd351, 0xd351, 0xd351, 0xd351, 0xd351, 0xd350, 0xd350, 0xd350, - 0xd350, 0xd350, 0xd34f, 0xd34f, 0xd34f, 0xd34f, 0xd34f, 0xd34f, - 0xd34e, 0xd34e, 0xd34e, 0xd34e, 0xd34e, 0xd34d, 0xd34d, 0xd34d, - 0xd34d, 0xd34d, 0xd34d, 0xd34c, 0xd34c, 0xd34c, 0xd34c, 0xd34c, - 0xd34b, 0xd34b, 0xd34b, 0xd34b, 0xd34b, 0xd34b, 0xd34a, 0xd34a, - 0xd34a, 0xd34a, 0xd34a, 0xd34a, 0xd349, 0xd349, 0xd349, 0xd349, - 0xd349, 0xd348, 0xd348, 0xd348, 0xd348, 0xd348, 0xd348, 0xd347, - 0xd347, 0xd347, 0xd347, 0xd347, 0xd347, 0xd346, 0xd346, 0xd346, - 0xd346, 0xd346, 0xd345, 0xd345, 0xd345, 0xd345, 0xd345, 0xd345, - 0xd344, 0xd344, 0xd344, 0xd344, 0xd344, 0xd344, 0xd343, 0xd343, - 0xd343, 0xd343, 0xd343, 0xd342, 0xd342, 0xd342, 0xd342, 0xd342, - 0xd342, 0xd341, 0xd341, 0xd341, 0xd341, 0xd341, 0xd341, 0xd340, - 0xd340, 0xd340, 0xd340, 0xd340, 0xd340, 0xd33f, 0xd33f, 0xd33f, - 0xd33f, 0xd33f, 0xd33f, 0xd33e, 0xd33e, 0xd33e, 0xd33e, 0xd33e, - 0xd33d, 0xd33d, 0xd33d, 0xd33d, 0xd33d, 0xd33d, 0xd33c, 0xd33c, - 0xd33c, 0xd33c, 0xd33c, 0xd33c, 0xd33b, 0xd33b, 0xd33b, 0xd33b, - 0xd33b, 0xd33b, 0xd33a, 0xd33a, 0xd33a, 0xd33a, 0xd33a, 0xd33a, - 0xd339, 0xd339, 0xd339, 0xd339, 0xd339, 0xd339, 0xd338, 0xd338, - 0xd338, 0xd338, 0xd338, 0xd338, 0xd337, 0xd337, 0xd337, 0xd337, - 0xd337, 0xd337, 0xd336, 0xd336, 0xd336, 0xd336, 0xd336, 0xd336, - 0xd335, 0xd335, 0xd335, 0xd335, 0xd335, 0xd335, 0xd334, 0xd334, - 0xd334, 0xd334, 0xd334, 0xd334, 0xd333, 0xd333, 0xd333, 0xd333, - 0xd333, 0xd333, 0xd332, 0xd332, 0xd332, 0xd332, 0xd332, 0xd332, - 0xd332, 0xd331, 0xd331, 0xd331, 0xd331, 0xd331, 0xd331, 0xd330, - 0xd330, 0xd330, 0xd330, 0xd330, 0xd330, 0xd32f, 0xd32f, 0xd32f, - 0xd32f, 0xd32f, 0xd32f, 0xd32e, 0xd32e, 0xd32e, 0xd32e, 0xd32e, - 0xd32e, 0xd32d, 0xd32d, 0xd32d, 0xd32d, 0xd32d, 0xd32d, 0xd32d, - 0xd32c, 0xd32c, 0xd32c, 0xd32c, 0xd32c, 0xd32c, 0xd32b, 0xd32b, - 0xd32b, 0xd32b, 0xd32b, 0xd32b, 0xd32a, 0xd32a, 0xd32a, 0xd32a, - 0xd32a, 0xd32a, 0xd32a, 0xd329, 0xd329, 0xd329, 0xd329, 0xd329, - 0xd329, 0xd328, 0xd328, 0xd328, 0xd328, 0xd328, 0xd328, 0xd327, - 0xd327, 0xd327, 0xd327, 0xd327, 0xd327, 0xd327, 0xd326, 0xd326, - 0xd326, 0xd326, 0xd326, 0xd326, 0xd325, 0xd325, 0xd325, 0xd325, - 0xd325, 0xd325, 0xd325, 0xd324, 0xd324, 0xd324, 0xd324, 0xd324, - 0xd324, 0xd323, 0xd323, 0xd323, 0xd323, 0xd323, 0xd323, 0xd323, - 0xd322, 0xd322, 0xd322, 0xd322, 0xd322, 0xd322, 0xd321, 0xd321, - 0xd321, 0xd321, 0xd321, 0xd321, 0xd321, 0xd320, 0xd320, 0xd320, - 0xd320, 0xd320, 0xd320, 0xd31f, 0xd31f, 0xd31f, 0xd31f, 0xd31f, - 0xd31f, 0xd31f, 0xd31e, 0xd31e, 0xd31e, 0xd31e, 0xd31e, 0xd31e, - 0xd31e, 0xd31d, 0xd31d, 0xd31d, 0xd31d, 0xd31d, 0xd31d, 0xd31c, - 0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd31c, 0xd31b, 0xd31b, - 0xd31b, 0xd31b, 0xd31b, 0xd31b, 0xd31b, 0xd31a, 0xd31a, 0xd31a, - 0xd31a, 0xd31a, 0xd31a, 0xd31a, 0xd319, 0xd319, 0xd319, 0xd319, - 0xd319, 0xd319, 0xd318, 0xd318, 0xd318, 0xd318, 0xd318, 0xd318, - 0xd318, 0xd317, 0xd317, 0xd317, 0xd317, 0xd317, 0xd317, 0xd317, - 0xd316, 0xd316, 0xd316, 0xd316, 0xd316, 0xd316, 0xd316, 0xd315, - 0xd315, 0xd315, 0xd315, 0xd315, 0xd315, 0xd315, 0xd314, 0xd314, - 0xd314, 0xd314, 0xd314, 0xd314, 0xd314, 0xd313, 0xd313, 0xd313, - 0xd313, 0xd313, 0xd313, 0xd313, 0xd312, 0xd312, 0xd312, 0xd312, - 0xd312, 0xd312, 0xd311, 0xd311, 0xd311, 0xd311, 0xd311, 0xd311, - 0xd311, 0xd310, 0xd310, 0xd310, 0xd310, 0xd310, 0xd310, 0xd310, - 0xd310, 0xd30f, 0xd30f, 0xd30f, 0xd30f, 0xd30f, 0xd30f, 0xd30f, - 0xd30e, 0xd30e, 0xd30e, 0xd30e, 0xd30e, 0xd30e, 0xd30e, 0xd30d, - 0xd30d, 0xd30d, 0xd30d, 0xd30d, 0xd30d, 0xd30d, 0xd30c, 0xd30c, - 0xd30c, 0xd30c, 0xd30c, 0xd30c, 0xd30c, 0xd30b, 0xd30b, 0xd30b, - 0xd30b, 0xd30b, 0xd30b, 0xd30b, 0xd30a, 0xd30a, 0xd30a, 0xd30a, - 0xd30a, 0xd30a, 0xd30a, 0xd309, 0xd309, 0xd309, 0xd309, 0xd309, - 0xd309, 0xd309, 0xd308, 0xd308, 0xd308, 0xd308, 0xd308, 0xd308, - 0xd308, 0xd308, 0xd307, 0xd307, 0xd307, 0xd307, 0xd307, 0xd307, - 0xd307, 0xd306, 0xd306, 0xd306, 0xd306, 0xd306, 0xd306, 0xd306, - 0xd305, 0xd305, 0xd305, 0xd305, 0xd305, 0xd305, 0xd305, 0xd305, - 0xd304, 0xd304, 0xd304, 0xd304, 0xd304, 0xd304, 0xd304, 0xd303, - 0xd303, 0xd303, 0xd303, 0xd303, 0xd303, 0xd303, 0xd302, 0xd302, - 0xd302, 0xd302, 0xd302, 0xd302, 0xd302, 0xd302, 0xd301, 0xd301, - 0xd301, 0xd301, 0xd301, 0xd301, 0xd301, 0xd300, 0xd300, 0xd300, - 0xd300, 0xd300, 0xd300, 0xd300, 0xd300, 0xd2ff, 0xd2ff, 0xd2ff, - 0xd2ff, 0xd2ff, 0xd2ff, 0xd2ff, 0xd2fe, 0xd2fe, 0xd2fe, 0xd2fe, - 0xd2fe, 0xd2fe, 0xd2fe, 0xd2fe, 0xd2fd, 0xd2fd, 0xd2fd, 0xd2fd, - 0xd2fd, 0xd2fd, 0xd2fd, 0xd2fc, 0xd2fc, 0xd2fc, 0xd2fc, 0xd2fc, - 0xd2fc, 0xd2fc, 0xd2fc, 0xd2fb, 0xd2fb, 0xd2fb, 0xd2fb, 0xd2fb, - 0xd2fb, 0xd2fb, 0xd2fa, 0xd2fa, 0xd2fa, 0xd2fa, 0xd2fa, 0xd2fa, - 0xd2fa, 0xd2fa, 0xd2f9, 0xd2f9, 0xd2f9, 0xd2f9, 0xd2f9, 0xd2f9, - 0xd2f9, 0xd2f9, 0xd2f8, 0xd2f8, 0xd2f8, 0xd2f8, 0xd2f8, 0xd2f8, - 0xd2f8, 0xd2f7, 0xd2f7, 0xd2f7, 0xd2f7, 0xd2f7, 0xd2f7, 0xd2f7, - 0xd2f7, 0xd2f6, 0xd2f6, 0xd2f6, 0xd2f6, 0xd2f6, 0xd2f6, 0xd2f6, - 0xd2f6, 0xd2f5, 0xd2f5, 0xd2f5, 0xd2f5, 0xd2f5, 0xd2f5, 0xd2f5, - 0xd2f5, 0xd2f4, 0xd2f4, 0xd2f4, 0xd2f4, 0xd2f4, 0xd2f4, 0xd2f4, - 0xd2f4, 0xd2f3, 0xd2f3, 0xd2f3, 0xd2f3, 0xd2f3, 0xd2f3, 0xd2f3, - 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, 0xd2f2, - 0xd2f1, 0xd2f1, 0xd2f1, 0xd2f1, 0xd2f1, 0xd2f1, 0xd2f1, 0xd2f1, - 0xd2f0, 0xd2f0, 0xd2f0, 0xd2f0, 0xd2f0, 0xd2f0, 0xd2f0, 0xd2f0, - 0xd2ef, 0xd2ef, 0xd2ef, 0xd2ef, 0xd2ef, 0xd2ef, 0xd2ef, 0xd2ef, - 0xd2ee, 0xd2ee, 0xd2ee, 0xd2ee, 0xd2ed, 0xd2ed, 0xd2ed, 0xd2ed, - 0xd2ec, 0xd2ec, 0xd2ec, 0xd2ec, 0xd2eb, 0xd2eb, 0xd2eb, 0xd2eb, - 0xd2ea, 0xd2ea, 0xd2ea, 0xd2ea, 0xd2ea, 0xd2e9, 0xd2e9, 0xd2e9, - 0xd2e9, 0xd2e8, 0xd2e8, 0xd2e8, 0xd2e8, 0xd2e7, 0xd2e7, 0xd2e7, - 0xd2e7, 0xd2e6, 0xd2e6, 0xd2e6, 0xd2e6, 0xd2e5, 0xd2e5, 0xd2e5, - 0xd2e5, 0xd2e4, 0xd2e4, 0xd2e4, 0xd2e4, 0xd2e3, 0xd2e3, 0xd2e3, - 0xd2e3, 0xd2e2, 0xd2e2, 0xd2e2, 0xd2e2, 0xd2e2, 0xd2e1, 0xd2e1, - 0xd2e1, 0xd2e1, 0xd2e0, 0xd2e0, 0xd2e0, 0xd2e0, 0xd2df, 0xd2df, - 0xd2df, 0xd2df, 0xd2de, 0xd2de, 0xd2de, 0xd2de, 0xd2de, 0xd2dd, - 0xd2dd, 0xd2dd, 0xd2dd, 0xd2dc, 0xd2dc, 0xd2dc, 0xd2dc, 0xd2db, - 0xd2db, 0xd2db, 0xd2db, 0xd2db, 0xd2da, 0xd2da, 0xd2da, 0xd2da, - 0xd2d9, 0xd2d9, 0xd2d9, 0xd2d9, 0xd2d8, 0xd2d8, 0xd2d8, 0xd2d8, - 0xd2d8, 0xd2d7, 0xd2d7, 0xd2d7, 0xd2d7, 0xd2d6, 0xd2d6, 0xd2d6, - 0xd2d6, 0xd2d5, 0xd2d5, 0xd2d5, 0xd2d5, 0xd2d5, 0xd2d4, 0xd2d4, - 0xd2d4, 0xd2d4, 0xd2d3, 0xd2d3, 0xd2d3, 0xd2d3, 0xd2d3, 0xd2d2, - 0xd2d2, 0xd2d2, 0xd2d2, 0xd2d1, 0xd2d1, 0xd2d1, 0xd2d1, 0xd2d1, - 0xd2d0, 0xd2d0, 0xd2d0, 0xd2d0, 0xd2cf, 0xd2cf, 0xd2cf, 0xd2cf, - 0xd2cf, 0xd2ce, 0xd2ce, 0xd2ce, 0xd2ce, 0xd2cd, 0xd2cd, 0xd2cd, - 0xd2cd, 0xd2cd, 0xd2cc, 0xd2cc, 0xd2cc, 0xd2cc, 0xd2cb, 0xd2cb, - 0xd2cb, 0xd2cb, 0xd2cb, 0xd2ca, 0xd2ca, 0xd2ca, 0xd2ca, 0xd2ca, - 0xd2c9, 0xd2c9, 0xd2c9, 0xd2c9, 0xd2c8, 0xd2c8, 0xd2c8, 0xd2c8, - 0xd2c8, 0xd2c7, 0xd2c7, 0xd2c7, 0xd2c7, 0xd2c6, 0xd2c6, 0xd2c6, - 0xd2c6, 0xd2c6, 0xd2c5, 0xd2c5, 0xd2c5, 0xd2c5, 0xd2c5, 0xd2c4, - 0xd2c4, 0xd2c4, 0xd2c4, 0xd2c4, 0xd2c3, 0xd2c3, 0xd2c3, 0xd2c3, - 0xd2c2, 0xd2c2, 0xd2c2, 0xd2c2, 0xd2c2, 0xd2c1, 0xd2c1, 0xd2c1, - 0xd2c1, 0xd2c1, 0xd2c0, 0xd2c0, 0xd2c0, 0xd2c0, 0xd2c0, 0xd2bf, - 0xd2bf, 0xd2bf, 0xd2bf, 0xd2be, 0xd2be, 0xd2be, 0xd2be, 0xd2be, - 0xd2bd, 0xd2bd, 0xd2bd, 0xd2bd, 0xd2bd, 0xd2bc, 0xd2bc, 0xd2bc, - 0xd2bc, 0xd2bc, 0xd2bb, 0xd2bb, 0xd2bb, 0xd2bb, 0xd2bb, 0xd2ba, - 0xd2ba, 0xd2ba, 0xd2ba, 0xd2ba, 0xd2b9, 0xd2b9, 0xd2b9, 0xd2b9, - 0xd2b9, 0xd2b8, 0xd2b8, 0xd2b8, 0xd2b8, 0xd2b8, 0xd2b7, 0xd2b7, - 0xd2b7, 0xd2b7, 0xd2b7, 0xd2b6, 0xd2b6, 0xd2b6, 0xd2b6, 0xd2b6, - 0xd2b5, 0xd2b5, 0xd2b5, 0xd2b5, 0xd2b5, 0xd2b4, 0xd2b4, 0xd2b4, - 0xd2b4, 0xd2b4, 0xd2b3, 0xd2b3, 0xd2b3, 0xd2b3, 0xd2b3, 0xd2b2, - 0xd2b2, 0xd2b2, 0xd2b2, 0xd2b2, 0xd2b1, 0xd2b1, 0xd2b1, 0xd2b1, - 0xd2b1, 0xd2b0, 0xd2b0, 0xd2b0, 0xd2b0, 0xd2b0, 0xd2af, 0xd2af, - 0xd2af, 0xd2af, 0xd2af, 0xd2ae, 0xd2ae, 0xd2ae, 0xd2ae, 0xd2ae, - 0xd2ad, 0xd2ad, 0xd2ad, 0xd2ad, 0xd2ad, 0xd2ac, 0xd2ac, 0xd2ac, - 0xd2ac, 0xd2ac, 0xd2ac, 0xd2ab, 0xd2ab, 0xd2ab, 0xd2ab, 0xd2ab, - 0xd2aa, 0xd2aa, 0xd2aa, 0xd2aa, 0xd2aa, 0xd2a9, 0xd2a9, 0xd2a9, - 0xd2a9, 0xd2a9, 0xd2a8, 0xd2a8, 0xd2a8, 0xd2a8, 0xd2a8, 0xd2a8, - 0xd2a7, 0xd2a7, 0xd2a7, 0xd2a7, 0xd2a7, 0xd2a6, 0xd2a6, 0xd2a6, - 0xd2a6, 0xd2a6, 0xd2a5, 0xd2a5, 0xd2a5, 0xd2a5, 0xd2a5, 0xd2a4, - 0xd2a4, 0xd2a4, 0xd2a4, 0xd2a4, 0xd2a4, 0xd2a3, 0xd2a3, 0xd2a3, - 0xd2a3, 0xd2a3, 0xd2a2, 0xd2a2, 0xd2a2, 0xd2a2, 0xd2a2, 0xd2a2, - 0xd2a1, 0xd2a1, 0xd2a1, 0xd2a1, 0xd2a1, 0xd2a0, 0xd2a0, 0xd2a0, - 0xd2a0, 0xd2a0, 0xd29f, 0xd29f, 0xd29f, 0xd29f, 0xd29f, 0xd29f, - 0xd29e, 0xd29e, 0xd29e, 0xd29e, 0xd29e, 0xd29d, 0xd29d, 0xd29d, - 0xd29d, 0xd29d, 0xd29d, 0xd29c, 0xd29c, 0xd29c, 0xd29c, 0xd29c, - 0xd29b, 0xd29b, 0xd29b, 0xd29b, 0xd29b, 0xd29b, 0xd29a, 0xd29a, - 0xd29a, 0xd29a, 0xd29a, 0xd29a, 0xd299, 0xd299, 0xd299, 0xd299, - 0xd299, 0xd298, 0xd298, 0xd298, 0xd298, 0xd298, 0xd298, 0xd297, - 0xd297, 0xd297, 0xd297, 0xd297, 0xd296, 0xd296, 0xd296, 0xd296, - 0xd296, 0xd296, 0xd295, 0xd295, 0xd295, 0xd295, 0xd295, 0xd295, - 0xd294, 0xd294, 0xd294, 0xd294, 0xd294, 0xd293, 0xd293, 0xd293, - 0xd293, 0xd293, 0xd293, 0xd292, 0xd292, 0xd292, 0xd292, 0xd292, - 0xd292, 0xd291, 0xd291, 0xd291, 0xd291, 0xd291, 0xd291, 0xd290, - 0xd290, 0xd290, 0xd290, 0xd290, 0xd28f, 0xd28f, 0xd28f, 0xd28f, - 0xd28f, 0xd28f, 0xd28e, 0xd28e, 0xd28e, 0xd28e, 0xd28e, 0xd28e, - 0xd28d, 0xd28d, 0xd28d, 0xd28d, 0xd28d, 0xd28d, 0xd28c, 0xd28c, - 0xd28c, 0xd28c, 0xd28c, 0xd28c, 0xd28b, 0xd28b, 0xd28b, 0xd28b, - 0xd28b, 0xd28b, 0xd28a, 0xd28a, 0xd28a, 0xd28a, 0xd28a, 0xd28a, - 0xd289, 0xd289, 0xd289, 0xd289, 0xd289, 0xd288, 0xd288, 0xd288, - 0xd288, 0xd288, 0xd288, 0xd287, 0xd287, 0xd287, 0xd287, 0xd287, - 0xd287, 0xd286, 0xd286, 0xd286, 0xd286, 0xd286, 0xd286, 0xd285, - 0xd285, 0xd285, 0xd285, 0xd285, 0xd285, 0xd285, 0xd284, 0xd284, - 0xd284, 0xd284, 0xd284, 0xd284, 0xd283, 0xd283, 0xd283, 0xd283, - 0xd283, 0xd283, 0xd282, 0xd282, 0xd282, 0xd282, 0xd282, 0xd282, - 0xd281, 0xd281, 0xd281, 0xd281, 0xd281, 0xd281, 0xd280, 0xd280, - 0xd280, 0xd280, 0xd280, 0xd280, 0xd27f, 0xd27f, 0xd27f, 0xd27f, - 0xd27f, 0xd27f, 0xd27e, 0xd27e, 0xd27e, 0xd27e, 0xd27e, 0xd27e, - 0xd27d, 0xd27d, 0xd27d, 0xd27d, 0xd27d, 0xd27d, 0xd27d, 0xd27c, - 0xd27c, 0xd27c, 0xd27c, 0xd27c, 0xd27c, 0xd27b, 0xd27b, 0xd27b, - 0xd27b, 0xd27b, 0xd27b, 0xd27a, 0xd27a, 0xd27a, 0xd27a, 0xd27a, - 0xd27a, 0xd27a, 0xd279, 0xd279, 0xd279, 0xd279, 0xd279, 0xd279, - 0xd278, 0xd278, 0xd278, 0xd278, 0xd278, 0xd278, 0xd277, 0xd277, - 0xd277, 0xd277, 0xd277, 0xd277, 0xd277, 0xd276, 0xd276, 0xd276, - 0xd276, 0xd276, 0xd276, 0xd275, 0xd275, 0xd275, 0xd275, 0xd275, - 0xd275, 0xd274, 0xd274, 0xd274, 0xd274, 0xd274, 0xd274, 0xd274, - 0xd273, 0xd273, 0xd273, 0xd273, 0xd273, 0xd273, 0xd272, 0xd272, - 0xd272, 0xd272, 0xd272, 0xd272, 0xd272, 0xd271, 0xd271, 0xd271, - 0xd271, 0xd271, 0xd271, 0xd270, 0xd270, 0xd270, 0xd270, 0xd270, - 0xd270, 0xd270, 0xd26f, 0xd26f, 0xd26f, 0xd26f, 0xd26f, 0xd26f, - 0xd26f, 0xd26e, 0xd26e, 0xd26e, 0xd26e, 0xd26e, 0xd26e, 0xd26d, - 0xd26d, 0xd26d, 0xd26d, 0xd26d, 0xd26d, 0xd26d, 0xd26c, 0xd26c, - 0xd26c, 0xd26c, 0xd26c, 0xd26c, 0xd26b, 0xd26b, 0xd26b, 0xd26b, - 0xd26b, 0xd26b, 0xd26b, 0xd26a, 0xd26a, 0xd26a, 0xd26a, 0xd26a, - 0xd26a, 0xd26a, 0xd269, 0xd269, 0xd269, 0xd269, 0xd269, 0xd269, - 0xd269, 0xd268, 0xd268, 0xd268, 0xd268, 0xd268, 0xd268, 0xd267, - 0xd267, 0xd267, 0xd267, 0xd267, 0xd267, 0xd267, 0xd266, 0xd266, - 0xd266, 0xd266, 0xd266, 0xd266, 0xd266, 0xd265, 0xd265, 0xd265, - 0xd265, 0xd265, 0xd265, 0xd265, 0xd264, 0xd264, 0xd264, 0xd264, - 0xd264, 0xd264, 0xd264, 0xd263, 0xd263, 0xd263, 0xd263, 0xd263, - 0xd263, 0xd263, 0xd262, 0xd262, 0xd262, 0xd262, 0xd262, 0xd262, - 0xd261, 0xd261, 0xd261, 0xd261, 0xd261, 0xd261, 0xd261, 0xd260, - 0xd260, 0xd260, 0xd260, 0xd260, 0xd260, 0xd260, 0xd25f, 0xd25f, - 0xd25f, 0xd25f, 0xd25f, 0xd25f, 0xd25f, 0xd25e, 0xd25e, 0xd25e, - 0xd25e, 0xd25e, 0xd25e, 0xd25e, 0xd25d, 0xd25d, 0xd25d, 0xd25d, - 0xd25d, 0xd25d, 0xd25d, 0xd25c, 0xd25c, 0xd25c, 0xd25c, 0xd25c, - 0xd25c, 0xd25c, 0xd25c, 0xd25b, 0xd25b, 0xd25b, 0xd25b, 0xd25b, - 0xd25b, 0xd25b, 0xd25a, 0xd25a, 0xd25a, 0xd25a, 0xd25a, 0xd25a, - 0xd25a, 0xd259, 0xd259, 0xd259, 0xd259, 0xd259, 0xd259, 0xd259, - 0xd258, 0xd258, 0xd258, 0xd258, 0xd258, 0xd258, 0xd258, 0xd257, - 0xd257, 0xd257, 0xd257, 0xd257, 0xd257, 0xd257, 0xd256, 0xd256, - 0xd256, 0xd256, 0xd256, 0xd256, 0xd256, 0xd256, 0xd255, 0xd255, - 0xd255, 0xd255, 0xd255, 0xd255, 0xd255, 0xd254, 0xd254, 0xd254, - 0xd254, 0xd254, 0xd254, 0xd254, 0xd253, 0xd253, 0xd253, 0xd253, - 0xd253, 0xd253, 0xd253, 0xd253, 0xd252, 0xd252, 0xd252, 0xd252, - 0xd252, 0xd252, 0xd252, 0xd251, 0xd251, 0xd251, 0xd251, 0xd251, - 0xd251, 0xd251, 0xd250, 0xd250, 0xd250, 0xd250, 0xd250, 0xd250, - 0xd250, 0xd250, 0xd24f, 0xd24f, 0xd24f, 0xd24f, 0xd24f, 0xd24f, - 0xd24f, 0xd24e, 0xd24e, 0xd24e, 0xd24e, 0xd24e, 0xd24e, 0xd24e, - 0xd24e, 0xd24d, 0xd24d, 0xd24d, 0xd24d, 0xd24d, 0xd24d, 0xd24d, - 0xd24c, 0xd24c, 0xd24c, 0xd24c, 0xd24c, 0xd24c, 0xd24c, 0xd24c, - 0xd24b, 0xd24b, 0xd24b, 0xd24b, 0xd24b, 0xd24b, 0xd24b, 0xd24a, - 0xd24a, 0xd24a, 0xd24a, 0xd24a, 0xd24a, 0xd24a, 0xd24a, 0xd249, - 0xd249, 0xd249, 0xd249, 0xd249, 0xd249, 0xd249, 0xd249, 0xd248, - 0xd248, 0xd248, 0xd248, 0xd248, 0xd248, 0xd248, 0xd247, 0xd247, - 0xd247, 0xd247, 0xd247, 0xd247, 0xd247, 0xd247, 0xd246, 0xd246, - 0xd246, 0xd246, 0xd246, 0xd246, 0xd246, 0xd246, 0xd245, 0xd245, - 0xd245, 0xd245, 0xd245, 0xd245, 0xd245, 0xd244, 0xd244, 0xd244, - 0xd244, 0xd244, 0xd244, 0xd244, 0xd244, 0xd243, 0xd243, 0xd243, - 0xd243, 0xd243, 0xd243, 0xd243, 0xd243, 0xd242, 0xd242, 0xd242, - 0xd242, 0xd242, 0xd242, 0xd242, 0xd242, 0xd241, 0xd241, 0xd241, - 0xd241, 0xd241, 0xd241, 0xd241, 0xd241, 0xd240, 0xd240, 0xd240, - 0xd240, 0xd240, 0xd240, 0xd240, 0xd240, 0xd23f, 0xd23f, 0xd23f, - 0xd23f, 0xd23f, 0xd23f, 0xd23f, 0xd23f, 0xd23e, 0xd23e, 0xd23e, - 0xd23e, 0xd23e, 0xd23e, 0xd23e, 0xd23e, 0xd23d, 0xd23d, 0xd23d, - 0xd23d, 0xd23d, 0xd23d, 0xd23c, 0xd23c, 0xd23c, 0xd23c, 0xd23b, - 0xd23b, 0xd23b, 0xd23b, 0xd23a, 0xd23a, 0xd23a, 0xd23a, 0xd239, - 0xd239, 0xd239, 0xd239, 0xd238, 0xd238, 0xd238, 0xd238, 0xd237, - 0xd237, 0xd237, 0xd237, 0xd236, 0xd236, 0xd236, 0xd236, 0xd235, - 0xd235, 0xd235, 0xd235, 0xd234, 0xd234, 0xd234, 0xd234, 0xd233, - 0xd233, 0xd233, 0xd233, 0xd232, 0xd232, 0xd232, 0xd232, 0xd232, - 0xd231, 0xd231, 0xd231, 0xd231, 0xd230, 0xd230, 0xd230, 0xd230, - 0xd22f, 0xd22f, 0xd22f, 0xd22f, 0xd22e, 0xd22e, 0xd22e, 0xd22e, - 0xd22d, 0xd22d, 0xd22d, 0xd22d, 0xd22d, 0xd22c, 0xd22c, 0xd22c, - 0xd22c, 0xd22b, 0xd22b, 0xd22b, 0xd22b, 0xd22a, 0xd22a, 0xd22a, - 0xd22a, 0xd22a, 0xd229, 0xd229, 0xd229, 0xd229, 0xd228, 0xd228, - 0xd228, 0xd228, 0xd227, 0xd227, 0xd227, 0xd227, 0xd227, 0xd226, - 0xd226, 0xd226, 0xd226, 0xd225, 0xd225, 0xd225, 0xd225, 0xd224, - 0xd224, 0xd224, 0xd224, 0xd224, 0xd223, 0xd223, 0xd223, 0xd223, - 0xd222, 0xd222, 0xd222, 0xd222, 0xd222, 0xd221, 0xd221, 0xd221, - 0xd221, 0xd220, 0xd220, 0xd220, 0xd220, 0xd220, 0xd21f, 0xd21f, - 0xd21f, 0xd21f, 0xd21e, 0xd21e, 0xd21e, 0xd21e, 0xd21e, 0xd21d, - 0xd21d, 0xd21d, 0xd21d, 0xd21c, 0xd21c, 0xd21c, 0xd21c, 0xd21c, - 0xd21b, 0xd21b, 0xd21b, 0xd21b, 0xd21a, 0xd21a, 0xd21a, 0xd21a, - 0xd21a, 0xd219, 0xd219, 0xd219, 0xd219, 0xd218, 0xd218, 0xd218, - 0xd218, 0xd218, 0xd217, 0xd217, 0xd217, 0xd217, 0xd217, 0xd216, - 0xd216, 0xd216, 0xd216, 0xd215, 0xd215, 0xd215, 0xd215, 0xd215, - 0xd214, 0xd214, 0xd214, 0xd214, 0xd214, 0xd213, 0xd213, 0xd213, - 0xd213, 0xd212, 0xd212, 0xd212, 0xd212, 0xd212, 0xd211, 0xd211, - 0xd211, 0xd211, 0xd211, 0xd210, 0xd210, 0xd210, 0xd210, 0xd210, - 0xd20f, 0xd20f, 0xd20f, 0xd20f, 0xd20f, 0xd20e, 0xd20e, 0xd20e, - 0xd20e, 0xd20d, 0xd20d, 0xd20d, 0xd20d, 0xd20d, 0xd20c, 0xd20c, - 0xd20c, 0xd20c, 0xd20c, 0xd20b, 0xd20b, 0xd20b, 0xd20b, 0xd20b, - 0xd20a, 0xd20a, 0xd20a, 0xd20a, 0xd20a, 0xd209, 0xd209, 0xd209, - 0xd209, 0xd209, 0xd208, 0xd208, 0xd208, 0xd208, 0xd208, 0xd207, - 0xd207, 0xd207, 0xd207, 0xd206, 0xd206, 0xd206, 0xd206, 0xd206, - 0xd205, 0xd205, 0xd205, 0xd205, 0xd205, 0xd204, 0xd204, 0xd204, - 0xd204, 0xd204, 0xd203, 0xd203, 0xd203, 0xd203, 0xd203, 0xd202, - 0xd202, 0xd202, 0xd202, 0xd202, 0xd201, 0xd201, 0xd201, 0xd201, - 0xd201, 0xd201, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd1ff, - 0xd1ff, 0xd1ff, 0xd1ff, 0xd1ff, 0xd1fe, 0xd1fe, 0xd1fe, 0xd1fe, - 0xd1fe, 0xd1fd, 0xd1fd, 0xd1fd, 0xd1fd, 0xd1fd, 0xd1fc, 0xd1fc, - 0xd1fc, 0xd1fc, 0xd1fc, 0xd1fb, 0xd1fb, 0xd1fb, 0xd1fb, 0xd1fb, - 0xd1fa, 0xd1fa, 0xd1fa, 0xd1fa, 0xd1fa, 0xd1f9, 0xd1f9, 0xd1f9, - 0xd1f9, 0xd1f9, 0xd1f9, 0xd1f8, 0xd1f8, 0xd1f8, 0xd1f8, 0xd1f8, - 0xd1f7, 0xd1f7, 0xd1f7, 0xd1f7, 0xd1f7, 0xd1f6, 0xd1f6, 0xd1f6, - 0xd1f6, 0xd1f6, 0xd1f5, 0xd1f5, 0xd1f5, 0xd1f5, 0xd1f5, 0xd1f5, - 0xd1f4, 0xd1f4, 0xd1f4, 0xd1f4, 0xd1f4, 0xd1f3, 0xd1f3, 0xd1f3, - 0xd1f3, 0xd1f3, 0xd1f2, 0xd1f2, 0xd1f2, 0xd1f2, 0xd1f2, 0xd1f2, - 0xd1f1, 0xd1f1, 0xd1f1, 0xd1f1, 0xd1f1, 0xd1f0, 0xd1f0, 0xd1f0, - 0xd1f0, 0xd1f0, 0xd1f0, 0xd1ef, 0xd1ef, 0xd1ef, 0xd1ef, 0xd1ef, - 0xd1ee, 0xd1ee, 0xd1ee, 0xd1ee, 0xd1ee, 0xd1ed, 0xd1ed, 0xd1ed, - 0xd1ed, 0xd1ed, 0xd1ed, 0xd1ec, 0xd1ec, 0xd1ec, 0xd1ec, 0xd1ec, - 0xd1eb, 0xd1eb, 0xd1eb, 0xd1eb, 0xd1eb, 0xd1eb, 0xd1ea, 0xd1ea, - 0xd1ea, 0xd1ea, 0xd1ea, 0xd1e9, 0xd1e9, 0xd1e9, 0xd1e9, 0xd1e9, - 0xd1e9, 0xd1e8, 0xd1e8, 0xd1e8, 0xd1e8, 0xd1e8, 0xd1e8, 0xd1e7, - 0xd1e7, 0xd1e7, 0xd1e7, 0xd1e7, 0xd1e6, 0xd1e6, 0xd1e6, 0xd1e6, - 0xd1e6, 0xd1e6, 0xd1e5, 0xd1e5, 0xd1e5, 0xd1e5, 0xd1e5, 0xd1e4, - 0xd1e4, 0xd1e4, 0xd1e4, 0xd1e4, 0xd1e4, 0xd1e3, 0xd1e3, 0xd1e3, - 0xd1e3, 0xd1e3, 0xd1e3, 0xd1e2, 0xd1e2, 0xd1e2, 0xd1e2, 0xd1e2, - 0xd1e2, 0xd1e1, 0xd1e1, 0xd1e1, 0xd1e1, 0xd1e1, 0xd1e0, 0xd1e0, - 0xd1e0, 0xd1e0, 0xd1e0, 0xd1e0, 0xd1df, 0xd1df, 0xd1df, 0xd1df, - 0xd1df, 0xd1df, 0xd1de, 0xd1de, 0xd1de, 0xd1de, 0xd1de, 0xd1de, - 0xd1dd, 0xd1dd, 0xd1dd, 0xd1dd, 0xd1dd, 0xd1dc, 0xd1dc, 0xd1dc, - 0xd1dc, 0xd1dc, 0xd1dc, 0xd1db, 0xd1db, 0xd1db, 0xd1db, 0xd1db, - 0xd1db, 0xd1da, 0xd1da, 0xd1da, 0xd1da, 0xd1da, 0xd1da, 0xd1d9, - 0xd1d9, 0xd1d9, 0xd1d9, 0xd1d9, 0xd1d9, 0xd1d8, 0xd1d8, 0xd1d8, - 0xd1d8, 0xd1d8, 0xd1d8, 0xd1d7, 0xd1d7, 0xd1d7, 0xd1d7, 0xd1d7, - 0xd1d7, 0xd1d6, 0xd1d6, 0xd1d6, 0xd1d6, 0xd1d6, 0xd1d6, 0xd1d5, - 0xd1d5, 0xd1d5, 0xd1d5, 0xd1d5, 0xd1d5, 0xd1d4, 0xd1d4, 0xd1d4, - 0xd1d4, 0xd1d4, 0xd1d4, 0xd1d3, 0xd1d3, 0xd1d3, 0xd1d3, 0xd1d3, - 0xd1d3, 0xd1d2, 0xd1d2, 0xd1d2, 0xd1d2, 0xd1d2, 0xd1d2, 0xd1d1, - 0xd1d1, 0xd1d1, 0xd1d1, 0xd1d1, 0xd1d1, 0xd1d0, 0xd1d0, 0xd1d0, - 0xd1d0, 0xd1d0, 0xd1d0, 0xd1cf, 0xd1cf, 0xd1cf, 0xd1cf, 0xd1cf, - 0xd1cf, 0xd1ce, 0xd1ce, 0xd1ce, 0xd1ce, 0xd1ce, 0xd1ce, 0xd1cd, - 0xd1cd, 0xd1cd, 0xd1cd, 0xd1cd, 0xd1cd, 0xd1cd, 0xd1cc, 0xd1cc, - 0xd1cc, 0xd1cc, 0xd1cc, 0xd1cc, 0xd1cb, 0xd1cb, 0xd1cb, 0xd1cb, - 0xd1cb, 0xd1cb, 0xd1ca, 0xd1ca, 0xd1ca, 0xd1ca, 0xd1ca, 0xd1ca, - 0xd1c9, 0xd1c9, 0xd1c9, 0xd1c9, 0xd1c9, 0xd1c9, 0xd1c9, 0xd1c8, - 0xd1c8, 0xd1c8, 0xd1c8, 0xd1c8, 0xd1c8, 0xd1c7, 0xd1c7, 0xd1c7, - 0xd1c7, 0xd1c7, 0xd1c7, 0xd1c6, 0xd1c6, 0xd1c6, 0xd1c6, 0xd1c6, - 0xd1c6, 0xd1c6, 0xd1c5, 0xd1c5, 0xd1c5, 0xd1c5, 0xd1c5, 0xd1c5, - 0xd1c4, 0xd1c4, 0xd1c4, 0xd1c4, 0xd1c4, 0xd1c4, 0xd1c4, 0xd1c3, - 0xd1c3, 0xd1c3, 0xd1c3, 0xd1c3, 0xd1c3, 0xd1c2, 0xd1c2, 0xd1c2, - 0xd1c2, 0xd1c2, 0xd1c2, 0xd1c1, 0xd1c1, 0xd1c1, 0xd1c1, 0xd1c1, - 0xd1c1, 0xd1c1, 0xd1c0, 0xd1c0, 0xd1c0, 0xd1c0, 0xd1c0, 0xd1c0, - 0xd1bf, 0xd1bf, 0xd1bf, 0xd1bf, 0xd1bf, 0xd1bf, 0xd1bf, 0xd1be, - 0xd1be, 0xd1be, 0xd1be, 0xd1be, 0xd1be, 0xd1be, 0xd1bd, 0xd1bd, - 0xd1bd, 0xd1bd, 0xd1bd, 0xd1bd, 0xd1bc, 0xd1bc, 0xd1bc, 0xd1bc, - 0xd1bc, 0xd1bc, 0xd1bc, 0xd1bb, 0xd1bb, 0xd1bb, 0xd1bb, 0xd1bb, - 0xd1bb, 0xd1ba, 0xd1ba, 0xd1ba, 0xd1ba, 0xd1ba, 0xd1ba, 0xd1ba, - 0xd1b9, 0xd1b9, 0xd1b9, 0xd1b9, 0xd1b9, 0xd1b9, 0xd1b9, 0xd1b8, - 0xd1b8, 0xd1b8, 0xd1b8, 0xd1b8, 0xd1b8, 0xd1b8, 0xd1b7, 0xd1b7, - 0xd1b7, 0xd1b7, 0xd1b7, 0xd1b7, 0xd1b6, 0xd1b6, 0xd1b6, 0xd1b6, - 0xd1b6, 0xd1b6, 0xd1b6, 0xd1b5, 0xd1b5, 0xd1b5, 0xd1b5, 0xd1b5, - 0xd1b5, 0xd1b5, 0xd1b4, 0xd1b4, 0xd1b4, 0xd1b4, 0xd1b4, 0xd1b4, - 0xd1b4, 0xd1b3, 0xd1b3, 0xd1b3, 0xd1b3, 0xd1b3, 0xd1b3, 0xd1b3, - 0xd1b2, 0xd1b2, 0xd1b2, 0xd1b2, 0xd1b2, 0xd1b2, 0xd1b1, 0xd1b1, - 0xd1b1, 0xd1b1, 0xd1b1, 0xd1b1, 0xd1b1, 0xd1b0, 0xd1b0, 0xd1b0, - 0xd1b0, 0xd1b0, 0xd1b0, 0xd1b0, 0xd1af, 0xd1af, 0xd1af, 0xd1af, - 0xd1af, 0xd1af, 0xd1af, 0xd1ae, 0xd1ae, 0xd1ae, 0xd1ae, 0xd1ae, - 0xd1ae, 0xd1ae, 0xd1ad, 0xd1ad, 0xd1ad, 0xd1ad, 0xd1ad, 0xd1ad, - 0xd1ad, 0xd1ac, 0xd1ac, 0xd1ac, 0xd1ac, 0xd1ac, 0xd1ac, 0xd1ac, - 0xd1ab, 0xd1ab, 0xd1ab, 0xd1ab, 0xd1ab, 0xd1ab, 0xd1ab, 0xd1aa, - 0xd1aa, 0xd1aa, 0xd1aa, 0xd1aa, 0xd1aa, 0xd1aa, 0xd1a9, 0xd1a9, - 0xd1a9, 0xd1a9, 0xd1a9, 0xd1a9, 0xd1a9, 0xd1a9, 0xd1a8, 0xd1a8, - 0xd1a8, 0xd1a8, 0xd1a8, 0xd1a8, 0xd1a8, 0xd1a7, 0xd1a7, 0xd1a7, - 0xd1a7, 0xd1a7, 0xd1a7, 0xd1a7, 0xd1a6, 0xd1a6, 0xd1a6, 0xd1a6, - 0xd1a6, 0xd1a6, 0xd1a6, 0xd1a5, 0xd1a5, 0xd1a5, 0xd1a5, 0xd1a5, - 0xd1a5, 0xd1a5, 0xd1a4, 0xd1a4, 0xd1a4, 0xd1a4, 0xd1a4, 0xd1a4, - 0xd1a4, 0xd1a4, 0xd1a3, 0xd1a3, 0xd1a3, 0xd1a3, 0xd1a3, 0xd1a3, - 0xd1a3, 0xd1a2, 0xd1a2, 0xd1a2, 0xd1a2, 0xd1a2, 0xd1a2, 0xd1a2, - 0xd1a1, 0xd1a1, 0xd1a1, 0xd1a1, 0xd1a1, 0xd1a1, 0xd1a1, 0xd1a1, - 0xd1a0, 0xd1a0, 0xd1a0, 0xd1a0, 0xd1a0, 0xd1a0, 0xd1a0, 0xd19f, - 0xd19f, 0xd19f, 0xd19f, 0xd19f, 0xd19f, 0xd19f, 0xd19e, 0xd19e, - 0xd19e, 0xd19e, 0xd19e, 0xd19e, 0xd19e, 0xd19e, 0xd19d, 0xd19d, - 0xd19d, 0xd19d, 0xd19d, 0xd19d, 0xd19d, 0xd19c, 0xd19c, 0xd19c, - 0xd19c, 0xd19c, 0xd19c, 0xd19c, 0xd19c, 0xd19b, 0xd19b, 0xd19b, - 0xd19b, 0xd19b, 0xd19b, 0xd19b, 0xd19a, 0xd19a, 0xd19a, 0xd19a, - 0xd19a, 0xd19a, 0xd19a, 0xd19a, 0xd199, 0xd199, 0xd199, 0xd199, - 0xd199, 0xd199, 0xd199, 0xd199, 0xd198, 0xd198, 0xd198, 0xd198, - 0xd198, 0xd198, 0xd198, 0xd197, 0xd197, 0xd197, 0xd197, 0xd197, - 0xd197, 0xd197, 0xd197, 0xd196, 0xd196, 0xd196, 0xd196, 0xd196, - 0xd196, 0xd196, 0xd196, 0xd195, 0xd195, 0xd195, 0xd195, 0xd195, - 0xd195, 0xd195, 0xd194, 0xd194, 0xd194, 0xd194, 0xd194, 0xd194, - 0xd194, 0xd194, 0xd193, 0xd193, 0xd193, 0xd193, 0xd193, 0xd193, - 0xd193, 0xd193, 0xd192, 0xd192, 0xd192, 0xd192, 0xd192, 0xd192, - 0xd192, 0xd192, 0xd191, 0xd191, 0xd191, 0xd191, 0xd191, 0xd191, - 0xd191, 0xd190, 0xd190, 0xd190, 0xd190, 0xd190, 0xd190, 0xd190, - 0xd190, 0xd18f, 0xd18f, 0xd18f, 0xd18f, 0xd18f, 0xd18f, 0xd18f, - 0xd18f, 0xd18e, 0xd18e, 0xd18e, 0xd18e, 0xd18e, 0xd18e, 0xd18e, - 0xd18e, 0xd18d, 0xd18d, 0xd18d, 0xd18d, 0xd18d, 0xd18d, 0xd18d, - 0xd18d, 0xd18c, 0xd18c, 0xd18c, 0xd18c, 0xd18c, 0xd18c, 0xd18c, - 0xd18c, 0xd18b, 0xd18b, 0xd18b, 0xd18b, 0xd18a, 0xd18a, 0xd18a, - 0xd18a, 0xd189, 0xd189, 0xd189, 0xd189, 0xd188, 0xd188, 0xd188, - 0xd188, 0xd187, 0xd187, 0xd187, 0xd187, 0xd186, 0xd186, 0xd186, - 0xd186, 0xd185, 0xd185, 0xd185, 0xd185, 0xd184, 0xd184, 0xd184, - 0xd184, 0xd183, 0xd183, 0xd183, 0xd183, 0xd182, 0xd182, 0xd182, - 0xd182, 0xd182, 0xd181, 0xd181, 0xd181, 0xd181, 0xd180, 0xd180, - 0xd180, 0xd180, 0xd17f, 0xd17f, 0xd17f, 0xd17f, 0xd17e, 0xd17e, - 0xd17e, 0xd17e, 0xd17d, 0xd17d, 0xd17d, 0xd17d, 0xd17d, 0xd17c, - 0xd17c, 0xd17c, 0xd17c, 0xd17b, 0xd17b, 0xd17b, 0xd17b, 0xd17a, - 0xd17a, 0xd17a, 0xd17a, 0xd179, 0xd179, 0xd179, 0xd179, 0xd179, - 0xd178, 0xd178, 0xd178, 0xd178, 0xd177, 0xd177, 0xd177, 0xd177, - 0xd176, 0xd176, 0xd176, 0xd176, 0xd176, 0xd175, 0xd175, 0xd175, - 0xd175, 0xd174, 0xd174, 0xd174, 0xd174, 0xd173, 0xd173, 0xd173, - 0xd173, 0xd173, 0xd172, 0xd172, 0xd172, 0xd172, 0xd171, 0xd171, - 0xd171, 0xd171, 0xd171, 0xd170, 0xd170, 0xd170, 0xd170, 0xd16f, - 0xd16f, 0xd16f, 0xd16f, 0xd16f, 0xd16e, 0xd16e, 0xd16e, 0xd16e, - 0xd16d, 0xd16d, 0xd16d, 0xd16d, 0xd16d, 0xd16c, 0xd16c, 0xd16c, - 0xd16c, 0xd16b, 0xd16b, 0xd16b, 0xd16b, 0xd16b, 0xd16a, 0xd16a, - 0xd16a, 0xd16a, 0xd169, 0xd169, 0xd169, 0xd169, 0xd169, 0xd168, - 0xd168, 0xd168, 0xd168, 0xd167, 0xd167, 0xd167, 0xd167, 0xd167, - 0xd166, 0xd166, 0xd166, 0xd166, 0xd166, 0xd165, 0xd165, 0xd165, - 0xd165, 0xd164, 0xd164, 0xd164, 0xd164, 0xd164, 0xd163, 0xd163, - 0xd163, 0xd163, 0xd163, 0xd162, 0xd162, 0xd162, 0xd162, 0xd161, - 0xd161, 0xd161, 0xd161, 0xd161, 0xd160, 0xd160, 0xd160, 0xd160, - 0xd160, 0xd15f, 0xd15f, 0xd15f, 0xd15f, 0xd15f, 0xd15e, 0xd15e, - 0xd15e, 0xd15e, 0xd15d, 0xd15d, 0xd15d, 0xd15d, 0xd15d, 0xd15c, - 0xd15c, 0xd15c, 0xd15c, 0xd15c, 0xd15b, 0xd15b, 0xd15b, 0xd15b, - 0xd15b, 0xd15a, 0xd15a, 0xd15a, 0xd15a, 0xd15a, 0xd159, 0xd159, - 0xd159, 0xd159, 0xd159, 0xd158, 0xd158, 0xd158, 0xd158, 0xd157, - 0xd157, 0xd157, 0xd157, 0xd157, 0xd156, 0xd156, 0xd156, 0xd156, - 0xd156, 0xd155, 0xd155, 0xd155, 0xd155, 0xd155, 0xd154, 0xd154, - 0xd154, 0xd154, 0xd154, 0xd153, 0xd153, 0xd153, 0xd153, 0xd153, - 0xd152, 0xd152, 0xd152, 0xd152, 0xd152, 0xd151, 0xd151, 0xd151, - 0xd151, 0xd151, 0xd150, 0xd150, 0xd150, 0xd150, 0xd150, 0xd14f, - 0xd14f, 0xd14f, 0xd14f, 0xd14f, 0xd14e, 0xd14e, 0xd14e, 0xd14e, - 0xd14e, 0xd14d, 0xd14d, 0xd14d, 0xd14d, 0xd14d, 0xd14d, 0xd14c, - 0xd14c, 0xd14c, 0xd14c, 0xd14c, 0xd14b, 0xd14b, 0xd14b, 0xd14b, - 0xd14b, 0xd14a, 0xd14a, 0xd14a, 0xd14a, 0xd14a, 0xd149, 0xd149, - 0xd149, 0xd149, 0xd149, 0xd148, 0xd148, 0xd148, 0xd148, 0xd148, - 0xd147, 0xd147, 0xd147, 0xd147, 0xd147, 0xd147, 0xd146, 0xd146, - 0xd146, 0xd146, 0xd146, 0xd145, 0xd145, 0xd145, 0xd145, 0xd145, - 0xd144, 0xd144, 0xd144, 0xd144, 0xd144, 0xd143, 0xd143, 0xd143, - 0xd143, 0xd143, 0xd143, 0xd142, 0xd142, 0xd142, 0xd142, 0xd142, - 0xd141, 0xd141, 0xd141, 0xd141, 0xd141, 0xd140, 0xd140, 0xd140, - 0xd140, 0xd140, 0xd140, 0xd13f, 0xd13f, 0xd13f, 0xd13f, 0xd13f, - 0xd13e, 0xd13e, 0xd13e, 0xd13e, 0xd13e, 0xd13e, 0xd13d, 0xd13d, - 0xd13d, 0xd13d, 0xd13d, 0xd13c, 0xd13c, 0xd13c, 0xd13c, 0xd13c, - 0xd13c, 0xd13b, 0xd13b, 0xd13b, 0xd13b, 0xd13b, 0xd13a, 0xd13a, - 0xd13a, 0xd13a, 0xd13a, 0xd139, 0xd139, 0xd139, 0xd139, 0xd139, - 0xd139, 0xd138, 0xd138, 0xd138, 0xd138, 0xd138, 0xd138, 0xd137, - 0xd137, 0xd137, 0xd137, 0xd137, 0xd136, 0xd136, 0xd136, 0xd136, - 0xd136, 0xd136, 0xd135, 0xd135, 0xd135, 0xd135, 0xd135, 0xd134, - 0xd134, 0xd134, 0xd134, 0xd134, 0xd134, 0xd133, 0xd133, 0xd133, - 0xd133, 0xd133, 0xd133, 0xd132, 0xd132, 0xd132, 0xd132, 0xd132, - 0xd131, 0xd131, 0xd131, 0xd131, 0xd131, 0xd131, 0xd130, 0xd130, - 0xd130, 0xd130, 0xd130, 0xd130, 0xd12f, 0xd12f, 0xd12f, 0xd12f, - 0xd12f, 0xd12e, 0xd12e, 0xd12e, 0xd12e, 0xd12e, 0xd12e, 0xd12d, - 0xd12d, 0xd12d, 0xd12d, 0xd12d, 0xd12d, 0xd12c, 0xd12c, 0xd12c, - 0xd12c, 0xd12c, 0xd12c, 0xd12b, 0xd12b, 0xd12b, 0xd12b, 0xd12b, - 0xd12b, 0xd12a, 0xd12a, 0xd12a, 0xd12a, 0xd12a, 0xd129, 0xd129, - 0xd129, 0xd129, 0xd129, 0xd129, 0xd128, 0xd128, 0xd128, 0xd128, - 0xd128, 0xd128, 0xd127, 0xd127, 0xd127, 0xd127, 0xd127, 0xd127, - 0xd126, 0xd126, 0xd126, 0xd126, 0xd126, 0xd126, 0xd125, 0xd125, - 0xd125, 0xd125, 0xd125, 0xd125, 0xd124, 0xd124, 0xd124, 0xd124, - 0xd124, 0xd124, 0xd123, 0xd123, 0xd123, 0xd123, 0xd123, 0xd123, - 0xd122, 0xd122, 0xd122, 0xd122, 0xd122, 0xd122, 0xd121, 0xd121, - 0xd121, 0xd121, 0xd121, 0xd121, 0xd120, 0xd120, 0xd120, 0xd120, - 0xd120, 0xd120, 0xd11f, 0xd11f, 0xd11f, 0xd11f, 0xd11f, 0xd11f, - 0xd11e, 0xd11e, 0xd11e, 0xd11e, 0xd11e, 0xd11e, 0xd11e, 0xd11d, - 0xd11d, 0xd11d, 0xd11d, 0xd11d, 0xd11d, 0xd11c, 0xd11c, 0xd11c, - 0xd11c, 0xd11c, 0xd11c, 0xd11b, 0xd11b, 0xd11b, 0xd11b, 0xd11b, - 0xd11b, 0xd11a, 0xd11a, 0xd11a, 0xd11a, 0xd11a, 0xd11a, 0xd119, - 0xd119, 0xd119, 0xd119, 0xd119, 0xd119, 0xd119, 0xd118, 0xd118, - 0xd118, 0xd118, 0xd118, 0xd118, 0xd117, 0xd117, 0xd117, 0xd117, - 0xd117, 0xd117, 0xd116, 0xd116, 0xd116, 0xd116, 0xd116, 0xd116, - 0xd116, 0xd115, 0xd115, 0xd115, 0xd115, 0xd115, 0xd115, 0xd114, - 0xd114, 0xd114, 0xd114, 0xd114, 0xd114, 0xd113, 0xd113, 0xd113, - 0xd113, 0xd113, 0xd113, 0xd113, 0xd112, 0xd112, 0xd112, 0xd112, - 0xd112, 0xd112, 0xd111, 0xd111, 0xd111, 0xd111, 0xd111, 0xd111, - 0xd111, 0xd110, 0xd110, 0xd110, 0xd110, 0xd110, 0xd110, 0xd10f, - 0xd10f, 0xd10f, 0xd10f, 0xd10f, 0xd10f, 0xd10f, 0xd10e, 0xd10e, - 0xd10e, 0xd10e, 0xd10e, 0xd10e, 0xd10d, 0xd10d, 0xd10d, 0xd10d, - 0xd10d, 0xd10d, 0xd10d, 0xd10c, 0xd10c, 0xd10c, 0xd10c, 0xd10c, - 0xd10c, 0xd10b, 0xd10b, 0xd10b, 0xd10b, 0xd10b, 0xd10b, 0xd10b, - 0xd10a, 0xd10a, 0xd10a, 0xd10a, 0xd10a, 0xd10a, 0xd109, 0xd109, - 0xd109, 0xd109, 0xd109, 0xd109, 0xd109, 0xd108, 0xd108, 0xd108, - 0xd108, 0xd108, 0xd108, 0xd108, 0xd107, 0xd107, 0xd107, 0xd107, - 0xd107, 0xd107, 0xd107, 0xd106, 0xd106, 0xd106, 0xd106, 0xd106, - 0xd106, 0xd105, 0xd105, 0xd105, 0xd105, 0xd105, 0xd105, 0xd105, - 0xd104, 0xd104, 0xd104, 0xd104, 0xd104, 0xd104, 0xd104, 0xd103, - 0xd103, 0xd103, 0xd103, 0xd103, 0xd103, 0xd103, 0xd102, 0xd102, - 0xd102, 0xd102, 0xd102, 0xd102, 0xd101, 0xd101, 0xd101, 0xd101, - 0xd101, 0xd101, 0xd101, 0xd100, 0xd100, 0xd100, 0xd100, 0xd100, - 0xd100, 0xd100, 0xd0ff, 0xd0ff, 0xd0ff, 0xd0ff, 0xd0ff, 0xd0ff, - 0xd0ff, 0xd0fe, 0xd0fe, 0xd0fe, 0xd0fe, 0xd0fe, 0xd0fe, 0xd0fe, - 0xd0fd, 0xd0fd, 0xd0fd, 0xd0fd, 0xd0fd, 0xd0fd, 0xd0fd, 0xd0fc, - 0xd0fc, 0xd0fc, 0xd0fc, 0xd0fc, 0xd0fc, 0xd0fc, 0xd0fb, 0xd0fb, - 0xd0fb, 0xd0fb, 0xd0fb, 0xd0fb, 0xd0fb, 0xd0fa, 0xd0fa, 0xd0fa, - 0xd0fa, 0xd0fa, 0xd0fa, 0xd0fa, 0xd0f9, 0xd0f9, 0xd0f9, 0xd0f9, - 0xd0f9, 0xd0f9, 0xd0f9, 0xd0f8, 0xd0f8, 0xd0f8, 0xd0f8, 0xd0f8, - 0xd0f8, 0xd0f8, 0xd0f7, 0xd0f7, 0xd0f7, 0xd0f7, 0xd0f7, 0xd0f7, - 0xd0f7, 0xd0f7, 0xd0f6, 0xd0f6, 0xd0f6, 0xd0f6, 0xd0f6, 0xd0f6, - 0xd0f6, 0xd0f5, 0xd0f5, 0xd0f5, 0xd0f5, 0xd0f5, 0xd0f5, 0xd0f5, - 0xd0f4, 0xd0f4, 0xd0f4, 0xd0f4, 0xd0f4, 0xd0f4, 0xd0f4, 0xd0f3, - 0xd0f3, 0xd0f3, 0xd0f3, 0xd0f3, 0xd0f3, 0xd0f3, 0xd0f2, 0xd0f2, - 0xd0f2, 0xd0f2, 0xd0f2, 0xd0f2, 0xd0f2, 0xd0f2, 0xd0f1, 0xd0f1, - 0xd0f1, 0xd0f1, 0xd0f1, 0xd0f1, 0xd0f1, 0xd0f0, 0xd0f0, 0xd0f0, - 0xd0f0, 0xd0f0, 0xd0f0, 0xd0f0, 0xd0ef, 0xd0ef, 0xd0ef, 0xd0ef, - 0xd0ef, 0xd0ef, 0xd0ef, 0xd0ef, 0xd0ee, 0xd0ee, 0xd0ee, 0xd0ee, - 0xd0ee, 0xd0ee, 0xd0ee, 0xd0ed, 0xd0ed, 0xd0ed, 0xd0ed, 0xd0ed, - 0xd0ed, 0xd0ed, 0xd0ed, 0xd0ec, 0xd0ec, 0xd0ec, 0xd0ec, 0xd0ec, - 0xd0ec, 0xd0ec, 0xd0eb, 0xd0eb, 0xd0eb, 0xd0eb, 0xd0eb, 0xd0eb, - 0xd0eb, 0xd0eb, 0xd0ea, 0xd0ea, 0xd0ea, 0xd0ea, 0xd0ea, 0xd0ea, - 0xd0ea, 0xd0e9, 0xd0e9, 0xd0e9, 0xd0e9, 0xd0e9, 0xd0e9, 0xd0e9, - 0xd0e9, 0xd0e8, 0xd0e8, 0xd0e8, 0xd0e8, 0xd0e8, 0xd0e8, 0xd0e8, - 0xd0e7, 0xd0e7, 0xd0e7, 0xd0e7, 0xd0e7, 0xd0e7, 0xd0e7, 0xd0e7, - 0xd0e6, 0xd0e6, 0xd0e6, 0xd0e6, 0xd0e6, 0xd0e6, 0xd0e6, 0xd0e5, - 0xd0e5, 0xd0e5, 0xd0e5, 0xd0e5, 0xd0e5, 0xd0e5, 0xd0e5, 0xd0e4, - 0xd0e4, 0xd0e4, 0xd0e4, 0xd0e4, 0xd0e4, 0xd0e4, 0xd0e4, 0xd0e3, - 0xd0e3, 0xd0e3, 0xd0e3, 0xd0e3, 0xd0e3, 0xd0e3, 0xd0e3, 0xd0e2, - 0xd0e2, 0xd0e2, 0xd0e2, 0xd0e2, 0xd0e2, 0xd0e2, 0xd0e1, 0xd0e1, - 0xd0e1, 0xd0e1, 0xd0e1, 0xd0e1, 0xd0e1, 0xd0e1, 0xd0e0, 0xd0e0, - 0xd0e0, 0xd0e0, 0xd0e0, 0xd0e0, 0xd0e0, 0xd0e0, 0xd0df, 0xd0df, - 0xd0df, 0xd0df, 0xd0df, 0xd0df, 0xd0df, 0xd0df, 0xd0de, 0xd0de, - 0xd0de, 0xd0de, 0xd0de, 0xd0de, 0xd0de, 0xd0de, 0xd0dd, 0xd0dd, - 0xd0dd, 0xd0dd, 0xd0dd, 0xd0dd, 0xd0dd, 0xd0dd, 0xd0dc, 0xd0dc, - 0xd0dc, 0xd0dc, 0xd0dc, 0xd0dc, 0xd0dc, 0xd0db, 0xd0db, 0xd0db, - 0xd0db, 0xd0db, 0xd0db, 0xd0db, 0xd0db, 0xd0da, 0xd0da, 0xd0da, - 0xd0da, 0xd0da, 0xd0da, 0xd0d9, 0xd0d9, 0xd0d9, 0xd0d9, 0xd0d8, - 0xd0d8, 0xd0d8, 0xd0d8, 0xd0d7, 0xd0d7, 0xd0d7, 0xd0d7, 0xd0d6, - 0xd0d6, 0xd0d6, 0xd0d6, 0xd0d5, 0xd0d5, 0xd0d5, 0xd0d5, 0xd0d4, - 0xd0d4, 0xd0d4, 0xd0d4, 0xd0d3, 0xd0d3, 0xd0d3, 0xd0d3, 0xd0d2, - 0xd0d2, 0xd0d2, 0xd0d2, 0xd0d2, 0xd0d1, 0xd0d1, 0xd0d1, 0xd0d1, - 0xd0d0, 0xd0d0, 0xd0d0, 0xd0d0, 0xd0cf, 0xd0cf, 0xd0cf, 0xd0cf, - 0xd0ce, 0xd0ce, 0xd0ce, 0xd0ce, 0xd0cd, 0xd0cd, 0xd0cd, 0xd0cd, - 0xd0cc, 0xd0cc, 0xd0cc, 0xd0cc, 0xd0cc, 0xd0cb, 0xd0cb, 0xd0cb, - 0xd0cb, 0xd0ca, 0xd0ca, 0xd0ca, 0xd0ca, 0xd0c9, 0xd0c9, 0xd0c9, - 0xd0c9, 0xd0c8, 0xd0c8, 0xd0c8, 0xd0c8, 0xd0c8, 0xd0c7, 0xd0c7, - 0xd0c7, 0xd0c7, 0xd0c6, 0xd0c6, 0xd0c6, 0xd0c6, 0xd0c5, 0xd0c5, - 0xd0c5, 0xd0c5, 0xd0c5, 0xd0c4, 0xd0c4, 0xd0c4, 0xd0c4, 0xd0c3, - 0xd0c3, 0xd0c3, 0xd0c3, 0xd0c2, 0xd0c2, 0xd0c2, 0xd0c2, 0xd0c2, - 0xd0c1, 0xd0c1, 0xd0c1, 0xd0c1, 0xd0c0, 0xd0c0, 0xd0c0, 0xd0c0, - 0xd0c0, 0xd0bf, 0xd0bf, 0xd0bf, 0xd0bf, 0xd0be, 0xd0be, 0xd0be, - 0xd0be, 0xd0be, 0xd0bd, 0xd0bd, 0xd0bd, 0xd0bd, 0xd0bc, 0xd0bc, - 0xd0bc, 0xd0bc, 0xd0bc, 0xd0bb, 0xd0bb, 0xd0bb, 0xd0bb, 0xd0ba, - 0xd0ba, 0xd0ba, 0xd0ba, 0xd0ba, 0xd0b9, 0xd0b9, 0xd0b9, 0xd0b9, - 0xd0b8, 0xd0b8, 0xd0b8, 0xd0b8, 0xd0b8, 0xd0b7, 0xd0b7, 0xd0b7, - 0xd0b7, 0xd0b6, 0xd0b6, 0xd0b6, 0xd0b6, 0xd0b6, 0xd0b5, 0xd0b5, - 0xd0b5, 0xd0b5, 0xd0b5, 0xd0b4, 0xd0b4, 0xd0b4, 0xd0b4, 0xd0b3, - 0xd0b3, 0xd0b3, 0xd0b3, 0xd0b3, 0xd0b2, 0xd0b2, 0xd0b2, 0xd0b2, - 0xd0b2, 0xd0b1, 0xd0b1, 0xd0b1, 0xd0b1, 0xd0b0, 0xd0b0, 0xd0b0, - 0xd0b0, 0xd0b0, 0xd0af, 0xd0af, 0xd0af, 0xd0af, 0xd0af, 0xd0ae, - 0xd0ae, 0xd0ae, 0xd0ae, 0xd0ad, 0xd0ad, 0xd0ad, 0xd0ad, 0xd0ad, - 0xd0ac, 0xd0ac, 0xd0ac, 0xd0ac, 0xd0ac, 0xd0ab, 0xd0ab, 0xd0ab, - 0xd0ab, 0xd0ab, 0xd0aa, 0xd0aa, 0xd0aa, 0xd0aa, 0xd0aa, 0xd0a9, - 0xd0a9, 0xd0a9, 0xd0a9, 0xd0a9, 0xd0a8, 0xd0a8, 0xd0a8, 0xd0a8, - 0xd0a7, 0xd0a7, 0xd0a7, 0xd0a7, 0xd0a7, 0xd0a6, 0xd0a6, 0xd0a6, - 0xd0a6, 0xd0a6, 0xd0a5, 0xd0a5, 0xd0a5, 0xd0a5, 0xd0a5, 0xd0a4, - 0xd0a4, 0xd0a4, 0xd0a4, 0xd0a4, 0xd0a3, 0xd0a3, 0xd0a3, 0xd0a3, - 0xd0a3, 0xd0a2, 0xd0a2, 0xd0a2, 0xd0a2, 0xd0a2, 0xd0a1, 0xd0a1, - 0xd0a1, 0xd0a1, 0xd0a1, 0xd0a0, 0xd0a0, 0xd0a0, 0xd0a0, 0xd0a0, - 0xd09f, 0xd09f, 0xd09f, 0xd09f, 0xd09f, 0xd09e, 0xd09e, 0xd09e, - 0xd09e, 0xd09e, 0xd09d, 0xd09d, 0xd09d, 0xd09d, 0xd09d, 0xd09c, - 0xd09c, 0xd09c, 0xd09c, 0xd09c, 0xd09b, 0xd09b, 0xd09b, 0xd09b, - 0xd09b, 0xd09a, 0xd09a, 0xd09a, 0xd09a, 0xd09a, 0xd09a, 0xd099, - 0xd099, 0xd099, 0xd099, 0xd099, 0xd098, 0xd098, 0xd098, 0xd098, - 0xd098, 0xd097, 0xd097, 0xd097, 0xd097, 0xd097, 0xd096, 0xd096, - 0xd096, 0xd096, 0xd096, 0xd095, 0xd095, 0xd095, 0xd095, 0xd095, - 0xd095, 0xd094, 0xd094, 0xd094, 0xd094, 0xd094, 0xd093, 0xd093, - 0xd093, 0xd093, 0xd093, 0xd092, 0xd092, 0xd092, 0xd092, 0xd092, - 0xd091, 0xd091, 0xd091, 0xd091, 0xd091, 0xd091, 0xd090, 0xd090, - 0xd090, 0xd090, 0xd090, 0xd08f, 0xd08f, 0xd08f, 0xd08f, 0xd08f, - 0xd08e, 0xd08e, 0xd08e, 0xd08e, 0xd08e, 0xd08e, 0xd08d, 0xd08d, - 0xd08d, 0xd08d, 0xd08d, 0xd08c, 0xd08c, 0xd08c, 0xd08c, 0xd08c, - 0xd08c, 0xd08b, 0xd08b, 0xd08b, 0xd08b, 0xd08b, 0xd08a, 0xd08a, - 0xd08a, 0xd08a, 0xd08a, 0xd08a, 0xd089, 0xd089, 0xd089, 0xd089, - 0xd089, 0xd088, 0xd088, 0xd088, 0xd088, 0xd088, 0xd088, 0xd087, - 0xd087, 0xd087, 0xd087, 0xd087, 0xd086, 0xd086, 0xd086, 0xd086, - 0xd086, 0xd086, 0xd085, 0xd085, 0xd085, 0xd085, 0xd085, 0xd084, - 0xd084, 0xd084, 0xd084, 0xd084, 0xd084, 0xd083, 0xd083, 0xd083, - 0xd083, 0xd083, 0xd082, 0xd082, 0xd082, 0xd082, 0xd082, 0xd082, - 0xd081, 0xd081, 0xd081, 0xd081, 0xd081, 0xd081, 0xd080, 0xd080, - 0xd080, 0xd080, 0xd080, 0xd07f, 0xd07f, 0xd07f, 0xd07f, 0xd07f, - 0xd07f, 0xd07e, 0xd07e, 0xd07e, 0xd07e, 0xd07e, 0xd07e, 0xd07d, - 0xd07d, 0xd07d, 0xd07d, 0xd07d, 0xd07d, 0xd07c, 0xd07c, 0xd07c, - 0xd07c, 0xd07c, 0xd07b, 0xd07b, 0xd07b, 0xd07b, 0xd07b, 0xd07b, - 0xd07a, 0xd07a, 0xd07a, 0xd07a, 0xd07a, 0xd07a, 0xd079, 0xd079, - 0xd079, 0xd079, 0xd079, 0xd079, 0xd078, 0xd078, 0xd078, 0xd078, - 0xd078, 0xd078, 0xd077, 0xd077, 0xd077, 0xd077, 0xd077, 0xd077, - 0xd076, 0xd076, 0xd076, 0xd076, 0xd076, 0xd076, 0xd075, 0xd075, - 0xd075, 0xd075, 0xd075, 0xd074, 0xd074, 0xd074, 0xd074, 0xd074, - 0xd074, 0xd073, 0xd073, 0xd073, 0xd073, 0xd073, 0xd073, 0xd072, - 0xd072, 0xd072, 0xd072, 0xd072, 0xd072, 0xd071, 0xd071, 0xd071, - 0xd071, 0xd071, 0xd071, 0xd070, 0xd070, 0xd070, 0xd070, 0xd070, - 0xd070, 0xd070, 0xd06f, 0xd06f, 0xd06f, 0xd06f, 0xd06f, 0xd06f, - 0xd06e, 0xd06e, 0xd06e, 0xd06e, 0xd06e, 0xd06e, 0xd06d, 0xd06d, - 0xd06d, 0xd06d, 0xd06d, 0xd06d, 0xd06c, 0xd06c, 0xd06c, 0xd06c, - 0xd06c, 0xd06c, 0xd06b, 0xd06b, 0xd06b, 0xd06b, 0xd06b, 0xd06b, - 0xd06a, 0xd06a, 0xd06a, 0xd06a, 0xd06a, 0xd06a, 0xd069, 0xd069, - 0xd069, 0xd069, 0xd069, 0xd069, 0xd069, 0xd068, 0xd068, 0xd068, - 0xd068, 0xd068, 0xd068, 0xd067, 0xd067, 0xd067, 0xd067, 0xd067, - 0xd067, 0xd066, 0xd066, 0xd066, 0xd066, 0xd066, 0xd066, 0xd065, - 0xd065, 0xd065, 0xd065, 0xd065, 0xd065, 0xd065, 0xd064, 0xd064, - 0xd064, 0xd064, 0xd064, 0xd064, 0xd063, 0xd063, 0xd063, 0xd063, - 0xd063, 0xd063, 0xd062, 0xd062, 0xd062, 0xd062, 0xd062, 0xd062, - 0xd062, 0xd061, 0xd061, 0xd061, 0xd061, 0xd061, 0xd061, 0xd060, - 0xd060, 0xd060, 0xd060, 0xd060, 0xd060, 0xd060, 0xd05f, 0xd05f, - 0xd05f, 0xd05f, 0xd05f, 0xd05f, 0xd05e, 0xd05e, 0xd05e, 0xd05e, - 0xd05e, 0xd05e, 0xd05e, 0xd05d, 0xd05d, 0xd05d, 0xd05d, 0xd05d, - 0xd05d, 0xd05c, 0xd05c, 0xd05c, 0xd05c, 0xd05c, 0xd05c, 0xd05c, - 0xd05b, 0xd05b, 0xd05b, 0xd05b, 0xd05b, 0xd05b, 0xd05a, 0xd05a, - 0xd05a, 0xd05a, 0xd05a, 0xd05a, 0xd05a, 0xd059, 0xd059, 0xd059, - 0xd059, 0xd059, 0xd059, 0xd059, 0xd058, 0xd058, 0xd058, 0xd058, - 0xd058, 0xd058, 0xd057, 0xd057, 0xd057, 0xd057, 0xd057, 0xd057, - 0xd057, 0xd056, 0xd056, 0xd056, 0xd056, 0xd056, 0xd056, 0xd056, - 0xd055, 0xd055, 0xd055, 0xd055, 0xd055, 0xd055, 0xd054, 0xd054, - 0xd054, 0xd054, 0xd054, 0xd054, 0xd054, 0xd053, 0xd053, 0xd053, - 0xd053, 0xd053, 0xd053, 0xd053, 0xd052, 0xd052, 0xd052, 0xd052, - 0xd052, 0xd052, 0xd052, 0xd051, 0xd051, 0xd051, 0xd051, 0xd051, - 0xd051, 0xd050, 0xd050, 0xd050, 0xd050, 0xd050, 0xd050, 0xd050, - 0xd04f, 0xd04f, 0xd04f, 0xd04f, 0xd04f, 0xd04f, 0xd04f, 0xd04e, - 0xd04e, 0xd04e, 0xd04e, 0xd04e, 0xd04e, 0xd04e, 0xd04d, 0xd04d, - 0xd04d, 0xd04d, 0xd04d, 0xd04d, 0xd04d, 0xd04c, 0xd04c, 0xd04c, - 0xd04c, 0xd04c, 0xd04c, 0xd04c, 0xd04b, 0xd04b, 0xd04b, 0xd04b, - 0xd04b, 0xd04b, 0xd04b, 0xd04a, 0xd04a, 0xd04a, 0xd04a, 0xd04a, - 0xd04a, 0xd04a, 0xd049, 0xd049, 0xd049, 0xd049, 0xd049, 0xd049, - 0xd049, 0xd048, 0xd048, 0xd048, 0xd048, 0xd048, 0xd048, 0xd048, - 0xd047, 0xd047, 0xd047, 0xd047, 0xd047, 0xd047, 0xd047, 0xd046, - 0xd046, 0xd046, 0xd046, 0xd046, 0xd046, 0xd046, 0xd045, 0xd045, - 0xd045, 0xd045, 0xd045, 0xd045, 0xd045, 0xd045, 0xd044, 0xd044, - 0xd044, 0xd044, 0xd044, 0xd044, 0xd044, 0xd043, 0xd043, 0xd043, - 0xd043, 0xd043, 0xd043, 0xd043, 0xd042, 0xd042, 0xd042, 0xd042, - 0xd042, 0xd042, 0xd042, 0xd041, 0xd041, 0xd041, 0xd041, 0xd041, - 0xd041, 0xd041, 0xd040, 0xd040, 0xd040, 0xd040, 0xd040, 0xd040, - 0xd040, 0xd040, 0xd03f, 0xd03f, 0xd03f, 0xd03f, 0xd03f, 0xd03f, - 0xd03f, 0xd03e, 0xd03e, 0xd03e, 0xd03e, 0xd03e, 0xd03e, 0xd03e, - 0xd03d, 0xd03d, 0xd03d, 0xd03d, 0xd03d, 0xd03d, 0xd03d, 0xd03d, - 0xd03c, 0xd03c, 0xd03c, 0xd03c, 0xd03c, 0xd03c, 0xd03c, 0xd03b, - 0xd03b, 0xd03b, 0xd03b, 0xd03b, 0xd03b, 0xd03b, 0xd03b, 0xd03a, - 0xd03a, 0xd03a, 0xd03a, 0xd03a, 0xd03a, 0xd03a, 0xd039, 0xd039, - 0xd039, 0xd039, 0xd039, 0xd039, 0xd039, 0xd039, 0xd038, 0xd038, - 0xd038, 0xd038, 0xd038, 0xd038, 0xd038, 0xd037, 0xd037, 0xd037, - 0xd037, 0xd037, 0xd037, 0xd037, 0xd037, 0xd036, 0xd036, 0xd036, - 0xd036, 0xd036, 0xd036, 0xd036, 0xd035, 0xd035, 0xd035, 0xd035, - 0xd035, 0xd035, 0xd035, 0xd035, 0xd034, 0xd034, 0xd034, 0xd034, - 0xd034, 0xd034, 0xd034, 0xd034, 0xd033, 0xd033, 0xd033, 0xd033, - 0xd033, 0xd033, 0xd033, 0xd032, 0xd032, 0xd032, 0xd032, 0xd032, - 0xd032, 0xd032, 0xd032, 0xd031, 0xd031, 0xd031, 0xd031, 0xd031, - 0xd031, 0xd031, 0xd031, 0xd030, 0xd030, 0xd030, 0xd030, 0xd030, - 0xd030, 0xd030, 0xd030, 0xd02f, 0xd02f, 0xd02f, 0xd02f, 0xd02f, - 0xd02f, 0xd02f, 0xd02e, 0xd02e, 0xd02e, 0xd02e, 0xd02e, 0xd02e, - 0xd02e, 0xd02e, 0xd02d, 0xd02d, 0xd02d, 0xd02d, 0xd02d, 0xd02d, - 0xd02d, 0xd02d, 0xd02c, 0xd02c, 0xd02c, 0xd02c, 0xd02c, 0xd02c, - 0xd02c, 0xd02c, 0xd02b, 0xd02b, 0xd02b, 0xd02b, 0xd02b, 0xd02b, - 0xd02b, 0xd02b, 0xd02a, 0xd02a, 0xd02a, 0xd02a, 0xd02a, 0xd02a, - 0xd02a, 0xd02a, 0xd029, 0xd029, 0xd029, 0xd029, 0xd029, 0xd029, - 0xd029, 0xd028, 0xd028, 0xd028, 0xd028, 0xd027, 0xd027, 0xd027, - 0xd027, 0xd026, 0xd026, 0xd026, 0xd026, 0xd025, 0xd025, 0xd025, - 0xd025, 0xd024, 0xd024, 0xd024, 0xd024, 0xd023, 0xd023, 0xd023, - 0xd023, 0xd022, 0xd022, 0xd022, 0xd022, 0xd022, 0xd021, 0xd021, - 0xd021, 0xd021, 0xd020, 0xd020, 0xd020, 0xd020, 0xd01f, 0xd01f, - 0xd01f, 0xd01f, 0xd01e, 0xd01e, 0xd01e, 0xd01e, 0xd01d, 0xd01d, - 0xd01d, 0xd01d, 0xd01c, 0xd01c, 0xd01c, 0xd01c, 0xd01c, 0xd01b, - 0xd01b, 0xd01b, 0xd01b, 0xd01a, 0xd01a, 0xd01a, 0xd01a, 0xd019, - 0xd019, 0xd019, 0xd019, 0xd018, 0xd018, 0xd018, 0xd018, 0xd018, - 0xd017, 0xd017, 0xd017, 0xd017, 0xd016, 0xd016, 0xd016, 0xd016, - 0xd015, 0xd015, 0xd015, 0xd015, 0xd014, 0xd014, 0xd014, 0xd014, - 0xd014, 0xd013, 0xd013, 0xd013, 0xd013, 0xd012, 0xd012, 0xd012, - 0xd012, 0xd012, 0xd011, 0xd011, 0xd011, 0xd011, 0xd010, 0xd010, - 0xd010, 0xd010, 0xd00f, 0xd00f, 0xd00f, 0xd00f, 0xd00f, 0xd00e, - 0xd00e, 0xd00e, 0xd00e, 0xd00d, 0xd00d, 0xd00d, 0xd00d, 0xd00d, - 0xd00c, 0xd00c, 0xd00c, 0xd00c, 0xd00b, 0xd00b, 0xd00b, 0xd00b, - 0xd00b, 0xd00a, 0xd00a, 0xd00a, 0xd00a, 0xd009, 0xd009, 0xd009, - 0xd009, 0xd009, 0xd008, 0xd008, 0xd008, 0xd008, 0xd007, 0xd007, - 0xd007, 0xd007, 0xd007, 0xd006, 0xd006, 0xd006, 0xd006, 0xd005, - 0xd005, 0xd005, 0xd005, 0xd005, 0xd004, 0xd004, 0xd004, 0xd004, - 0xd004, 0xd003, 0xd003, 0xd003, 0xd003, 0xd002, 0xd002, 0xd002, - 0xd002, 0xd002, 0xd001, 0xd001, 0xd001, 0xd001, 0xd000, 0xd000, - 0xd000, 0xd000, 0xcfff, 0xcfff, 0xcffe, 0xcffe, 0xcffe, 0xcffd, - 0xcffd, 0xcffc, 0xcffc, 0xcffb, 0xcffb, 0xcffb, 0xcffa, 0xcffa, - 0xcff9, 0xcff9, 0xcff9, 0xcff8, 0xcff8, 0xcff7, 0xcff7, 0xcff6, - 0xcff6, 0xcff6, 0xcff5, 0xcff5, 0xcff4, 0xcff4, 0xcff3, 0xcff3, - 0xcff3, 0xcff2, 0xcff2, 0xcff1, 0xcff1, 0xcff1, 0xcff0, 0xcff0, - 0xcfef, 0xcfef, 0xcfef, 0xcfee, 0xcfee, 0xcfed, 0xcfed, 0xcfec, - 0xcfec, 0xcfec, 0xcfeb, 0xcfeb, 0xcfea, 0xcfea, 0xcfea, 0xcfe9, - 0xcfe9, 0xcfe8, 0xcfe8, 0xcfe8, 0xcfe7, 0xcfe7, 0xcfe6, 0xcfe6, - 0xcfe6, 0xcfe5, 0xcfe5, 0xcfe4, 0xcfe4, 0xcfe4, 0xcfe3, 0xcfe3, - 0xcfe2, 0xcfe2, 0xcfe2, 0xcfe1, 0xcfe1, 0xcfe0, 0xcfe0, 0xcfdf, - 0xcfdf, 0xcfdf, 0xcfde, 0xcfde, 0xcfde, 0xcfdd, 0xcfdd, 0xcfdc, - 0xcfdc, 0xcfdc, 0xcfdb, 0xcfdb, 0xcfda, 0xcfda, 0xcfda, 0xcfd9, - 0xcfd9, 0xcfd8, 0xcfd8, 0xcfd8, 0xcfd7, 0xcfd7, 0xcfd6, 0xcfd6, - 0xcfd6, 0xcfd5, 0xcfd5, 0xcfd4, 0xcfd4, 0xcfd4, 0xcfd3, 0xcfd3, - 0xcfd2, 0xcfd2, 0xcfd2, 0xcfd1, 0xcfd1, 0xcfd1, 0xcfd0, 0xcfd0, - 0xcfcf, 0xcfcf, 0xcfcf, 0xcfce, 0xcfce, 0xcfcd, 0xcfcd, 0xcfcd, - 0xcfcc, 0xcfcc, 0xcfcb, 0xcfcb, 0xcfcb, 0xcfca, 0xcfca, 0xcfca, - 0xcfc9, 0xcfc9, 0xcfc8, 0xcfc8, 0xcfc8, 0xcfc7, 0xcfc7, 0xcfc6, - 0xcfc6, 0xcfc6, 0xcfc5, 0xcfc5, 0xcfc5, 0xcfc4, 0xcfc4, 0xcfc3, - 0xcfc3, 0xcfc3, 0xcfc2, 0xcfc2, 0xcfc2, 0xcfc1, 0xcfc1, 0xcfc0, - 0xcfc0, 0xcfc0, 0xcfbf, 0xcfbf, 0xcfbf, 0xcfbe, 0xcfbe, 0xcfbd, - 0xcfbd, 0xcfbd, 0xcfbc, 0xcfbc, 0xcfbc, 0xcfbb, 0xcfbb, 0xcfba, - 0xcfba, 0xcfba, 0xcfb9, 0xcfb9, 0xcfb9, 0xcfb8, 0xcfb8, 0xcfb7, - 0xcfb7, 0xcfb7, 0xcfb6, 0xcfb6, 0xcfb6, 0xcfb5, 0xcfb5, 0xcfb5, - 0xcfb4, 0xcfb4, 0xcfb3, 0xcfb3, 0xcfb3, 0xcfb2, 0xcfb2, 0xcfb2, - 0xcfb1, 0xcfb1, 0xcfb0, 0xcfb0, 0xcfb0, 0xcfaf, 0xcfaf, 0xcfaf, - 0xcfae, 0xcfae, 0xcfae, 0xcfad, 0xcfad, 0xcfac, 0xcfac, 0xcfac, - 0xcfab, 0xcfab, 0xcfab, 0xcfaa, 0xcfaa, 0xcfaa, 0xcfa9, 0xcfa9, - 0xcfa9, 0xcfa8, 0xcfa8, 0xcfa7, 0xcfa7, 0xcfa7, 0xcfa6, 0xcfa6, - 0xcfa6, 0xcfa5, 0xcfa5, 0xcfa5, 0xcfa4, 0xcfa4, 0xcfa4, 0xcfa3, - 0xcfa3, 0xcfa2, 0xcfa2, 0xcfa2, 0xcfa1, 0xcfa1, 0xcfa1, 0xcfa0, - 0xcfa0, 0xcfa0, 0xcf9f, 0xcf9f, 0xcf9f, 0xcf9e, 0xcf9e, 0xcf9d, - 0xcf9d, 0xcf9d, 0xcf9c, 0xcf9c, 0xcf9c, 0xcf9b, 0xcf9b, 0xcf9b, - 0xcf9a, 0xcf9a, 0xcf9a, 0xcf99, 0xcf99, 0xcf99, 0xcf98, 0xcf98, - 0xcf98, 0xcf97, 0xcf97, 0xcf96, 0xcf96, 0xcf96, 0xcf95, 0xcf95, - 0xcf95, 0xcf94, 0xcf94, 0xcf94, 0xcf93, 0xcf93, 0xcf93, 0xcf92, - 0xcf92, 0xcf92, 0xcf91, 0xcf91, 0xcf91, 0xcf90, 0xcf90, 0xcf90, - 0xcf8f, 0xcf8f, 0xcf8f, 0xcf8e, 0xcf8e, 0xcf8e, 0xcf8d, 0xcf8d, - 0xcf8d, 0xcf8c, 0xcf8c, 0xcf8c, 0xcf8b, 0xcf8b, 0xcf8a, 0xcf8a, - 0xcf8a, 0xcf89, 0xcf89, 0xcf89, 0xcf88, 0xcf88, 0xcf88, 0xcf87, - 0xcf87, 0xcf87, 0xcf86, 0xcf86, 0xcf86, 0xcf85, 0xcf85, 0xcf85, - 0xcf84, 0xcf84, 0xcf84, 0xcf83, 0xcf83, 0xcf83, 0xcf82, 0xcf82, - 0xcf82, 0xcf81, 0xcf81, 0xcf81, 0xcf80, 0xcf80, 0xcf80, 0xcf7f, - 0xcf7f, 0xcf7f, 0xcf7e, 0xcf7e, 0xcf7e, 0xcf7d, 0xcf7d, 0xcf7d, - 0xcf7c, 0xcf7c, 0xcf7c, 0xcf7b, 0xcf7b, 0xcf7b, 0xcf7a, 0xcf7a, - 0xcf7a, 0xcf79, 0xcf79, 0xcf79, 0xcf79, 0xcf78, 0xcf78, 0xcf78, - 0xcf77, 0xcf77, 0xcf77, 0xcf76, 0xcf76, 0xcf76, 0xcf75, 0xcf75, - 0xcf75, 0xcf74, 0xcf74, 0xcf74, 0xcf73, 0xcf73, 0xcf73, 0xcf72, - 0xcf72, 0xcf72, 0xcf71, 0xcf71, 0xcf71, 0xcf70, 0xcf70, 0xcf70, - 0xcf6f, 0xcf6f, 0xcf6f, 0xcf6e, 0xcf6e, 0xcf6e, 0xcf6d, 0xcf6d, - 0xcf6d, 0xcf6d, 0xcf6c, 0xcf6c, 0xcf6c, 0xcf6b, 0xcf6b, 0xcf6b, - 0xcf6a, 0xcf6a, 0xcf6a, 0xcf69, 0xcf69, 0xcf69, 0xcf68, 0xcf68, - 0xcf68, 0xcf67, 0xcf67, 0xcf67, 0xcf66, 0xcf66, 0xcf66, 0xcf66, - 0xcf65, 0xcf65, 0xcf65, 0xcf64, 0xcf64, 0xcf64, 0xcf63, 0xcf63, - 0xcf63, 0xcf62, 0xcf62, 0xcf62, 0xcf61, 0xcf61, 0xcf61, 0xcf61, - 0xcf60, 0xcf60, 0xcf60, 0xcf5f, 0xcf5f, 0xcf5f, 0xcf5e, 0xcf5e, - 0xcf5e, 0xcf5d, 0xcf5d, 0xcf5d, 0xcf5c, 0xcf5c, 0xcf5c, 0xcf5c, - 0xcf5b, 0xcf5b, 0xcf5b, 0xcf5a, 0xcf5a, 0xcf5a, 0xcf59, 0xcf59, - 0xcf59, 0xcf58, 0xcf58, 0xcf58, 0xcf58, 0xcf57, 0xcf57, 0xcf57, - 0xcf56, 0xcf56, 0xcf56, 0xcf55, 0xcf55, 0xcf55, 0xcf54, 0xcf54, - 0xcf54, 0xcf54, 0xcf53, 0xcf53, 0xcf53, 0xcf52, 0xcf52, 0xcf52, - 0xcf51, 0xcf51, 0xcf51, 0xcf51, 0xcf50, 0xcf50, 0xcf50, 0xcf4f, - 0xcf4f, 0xcf4f, 0xcf4e, 0xcf4e, 0xcf4e, 0xcf4e, 0xcf4d, 0xcf4d, - 0xcf4d, 0xcf4c, 0xcf4c, 0xcf4c, 0xcf4b, 0xcf4b, 0xcf4b, 0xcf4b, - 0xcf4a, 0xcf4a, 0xcf4a, 0xcf49, 0xcf49, 0xcf49, 0xcf48, 0xcf48, - 0xcf48, 0xcf48, 0xcf47, 0xcf47, 0xcf47, 0xcf46, 0xcf46, 0xcf46, - 0xcf45, 0xcf45, 0xcf45, 0xcf45, 0xcf44, 0xcf44, 0xcf44, 0xcf43, - 0xcf43, 0xcf43, 0xcf42, 0xcf42, 0xcf42, 0xcf42, 0xcf41, 0xcf41, - 0xcf41, 0xcf40, 0xcf40, 0xcf40, 0xcf40, 0xcf3f, 0xcf3f, 0xcf3f, - 0xcf3e, 0xcf3e, 0xcf3e, 0xcf3e, 0xcf3d, 0xcf3d, 0xcf3d, 0xcf3c, - 0xcf3c, 0xcf3c, 0xcf3b, 0xcf3b, 0xcf3b, 0xcf3b, 0xcf3a, 0xcf3a, - 0xcf3a, 0xcf39, 0xcf39, 0xcf39, 0xcf39, 0xcf38, 0xcf38, 0xcf38, - 0xcf37, 0xcf37, 0xcf37, 0xcf37, 0xcf36, 0xcf36, 0xcf36, 0xcf35, - 0xcf35, 0xcf35, 0xcf35, 0xcf34, 0xcf34, 0xcf34, 0xcf33, 0xcf33, - 0xcf33, 0xcf33, 0xcf32, 0xcf32, 0xcf32, 0xcf31, 0xcf31, 0xcf31, - 0xcf31, 0xcf30, 0xcf30, 0xcf30, 0xcf2f, 0xcf2f, 0xcf2f, 0xcf2f, - 0xcf2e, 0xcf2e, 0xcf2e, 0xcf2d, 0xcf2d, 0xcf2d, 0xcf2d, 0xcf2c, - 0xcf2c, 0xcf2c, 0xcf2b, 0xcf2b, 0xcf2b, 0xcf2b, 0xcf2a, 0xcf2a, - 0xcf2a, 0xcf29, 0xcf29, 0xcf29, 0xcf29, 0xcf28, 0xcf28, 0xcf28, - 0xcf28, 0xcf27, 0xcf27, 0xcf27, 0xcf26, 0xcf26, 0xcf26, 0xcf26, - 0xcf25, 0xcf25, 0xcf25, 0xcf24, 0xcf24, 0xcf24, 0xcf24, 0xcf23, - 0xcf23, 0xcf23, 0xcf23, 0xcf22, 0xcf22, 0xcf22, 0xcf21, 0xcf21, - 0xcf21, 0xcf21, 0xcf20, 0xcf20, 0xcf20, 0xcf1f, 0xcf1f, 0xcf1f, - 0xcf1f, 0xcf1e, 0xcf1e, 0xcf1e, 0xcf1e, 0xcf1d, 0xcf1d, 0xcf1d, - 0xcf1c, 0xcf1c, 0xcf1c, 0xcf1c, 0xcf1b, 0xcf1b, 0xcf1b, 0xcf1b, - 0xcf1a, 0xcf1a, 0xcf1a, 0xcf19, 0xcf19, 0xcf19, 0xcf19, 0xcf18, - 0xcf18, 0xcf18, 0xcf18, 0xcf17, 0xcf17, 0xcf17, 0xcf16, 0xcf16, - 0xcf16, 0xcf16, 0xcf15, 0xcf15, 0xcf15, 0xcf15, 0xcf14, 0xcf14, - 0xcf14, 0xcf14, 0xcf13, 0xcf13, 0xcf13, 0xcf12, 0xcf12, 0xcf12, - 0xcf12, 0xcf11, 0xcf11, 0xcf11, 0xcf11, 0xcf10, 0xcf10, 0xcf10, - 0xcf10, 0xcf0f, 0xcf0f, 0xcf0f, 0xcf0e, 0xcf0e, 0xcf0e, 0xcf0e, - 0xcf0d, 0xcf0d, 0xcf0d, 0xcf0d, 0xcf0c, 0xcf0c, 0xcf0c, 0xcf0c, - 0xcf0b, 0xcf0b, 0xcf0b, 0xcf0a, 0xcf0a, 0xcf0a, 0xcf0a, 0xcf09, - 0xcf09, 0xcf09, 0xcf09, 0xcf08, 0xcf08, 0xcf08, 0xcf08, 0xcf07, - 0xcf07, 0xcf07, 0xcf07, 0xcf06, 0xcf06, 0xcf06, 0xcf05, 0xcf05, - 0xcf05, 0xcf05, 0xcf04, 0xcf04, 0xcf04, 0xcf04, 0xcf03, 0xcf03, - 0xcf03, 0xcf03, 0xcf02, 0xcf02, 0xcf02, 0xcf02, 0xcf01, 0xcf01, - 0xcf01, 0xcf01, 0xcf00, 0xcf00, 0xcf00, 0xceff, 0xceff, 0xceff, - 0xceff, 0xcefe, 0xcefe, 0xcefe, 0xcefe, 0xcefd, 0xcefd, 0xcefd, - 0xcefd, 0xcefc, 0xcefc, 0xcefc, 0xcefc, 0xcefb, 0xcefb, 0xcefb, - 0xcefb, 0xcefa, 0xcefa, 0xcefa, 0xcefa, 0xcef9, 0xcef9, 0xcef9, - 0xcef9, 0xcef8, 0xcef8, 0xcef8, 0xcef8, 0xcef7, 0xcef7, 0xcef7, - 0xcef7, 0xcef6, 0xcef6, 0xcef6, 0xcef6, 0xcef5, 0xcef5, 0xcef5, - 0xcef4, 0xcef4, 0xcef4, 0xcef4, 0xcef3, 0xcef3, 0xcef3, 0xcef3, - 0xcef2, 0xcef2, 0xcef2, 0xcef2, 0xcef1, 0xcef1, 0xcef1, 0xcef1, - 0xcef0, 0xcef0, 0xcef0, 0xcef0, 0xceef, 0xceef, 0xceef, 0xceef, - 0xceee, 0xceee, 0xceed, 0xceed, 0xceec, 0xceec, 0xceeb, 0xceeb, - 0xceea, 0xceea, 0xcee9, 0xcee9, 0xcee8, 0xcee8, 0xcee8, 0xcee7, - 0xcee7, 0xcee6, 0xcee6, 0xcee5, 0xcee5, 0xcee4, 0xcee4, 0xcee3, - 0xcee3, 0xcee2, 0xcee2, 0xcee1, 0xcee1, 0xcee0, 0xcee0, 0xcedf, - 0xcedf, 0xcede, 0xcede, 0xcedd, 0xcedd, 0xcedc, 0xcedc, 0xcedb, - 0xcedb, 0xceda, 0xceda, 0xced9, 0xced9, 0xced8, 0xced8, 0xced7, - 0xced7, 0xced7, 0xced6, 0xced6, 0xced5, 0xced5, 0xced4, 0xced4, - 0xced3, 0xced3, 0xced2, 0xced2, 0xced1, 0xced1, 0xced0, 0xced0, - 0xcecf, 0xcecf, 0xcece, 0xcece, 0xcece, 0xcecd, 0xcecd, 0xcecc, - 0xcecc, 0xcecb, 0xcecb, 0xceca, 0xceca, 0xcec9, 0xcec9, 0xcec8, - 0xcec8, 0xcec7, 0xcec7, 0xcec7, 0xcec6, 0xcec6, 0xcec5, 0xcec5, - 0xcec4, 0xcec4, 0xcec3, 0xcec3, 0xcec2, 0xcec2, 0xcec1, 0xcec1, - 0xcec1, 0xcec0, 0xcec0, 0xcebf, 0xcebf, 0xcebe, 0xcebe, 0xcebd, - 0xcebd, 0xcebc, 0xcebc, 0xcebc, 0xcebb, 0xcebb, 0xceba, 0xceba, - 0xceb9, 0xceb9, 0xceb8, 0xceb8, 0xceb8, 0xceb7, 0xceb7, 0xceb6, - 0xceb6, 0xceb5, 0xceb5, 0xceb4, 0xceb4, 0xceb3, 0xceb3, 0xceb3, - 0xceb2, 0xceb2, 0xceb1, 0xceb1, 0xceb0, 0xceb0, 0xceaf, 0xceaf, - 0xceaf, 0xceae, 0xceae, 0xcead, 0xcead, 0xceac, 0xceac, 0xceac, - 0xceab, 0xceab, 0xceaa, 0xceaa, 0xcea9, 0xcea9, 0xcea8, 0xcea8, - 0xcea8, 0xcea7, 0xcea7, 0xcea6, 0xcea6, 0xcea5, 0xcea5, 0xcea5, - 0xcea4, 0xcea4, 0xcea3, 0xcea3, 0xcea2, 0xcea2, 0xcea2, 0xcea1, - 0xcea1, 0xcea0, 0xcea0, 0xce9f, 0xce9f, 0xce9f, 0xce9e, 0xce9e, - 0xce9d, 0xce9d, 0xce9c, 0xce9c, 0xce9c, 0xce9b, 0xce9b, 0xce9a, - 0xce9a, 0xce99, 0xce99, 0xce99, 0xce98, 0xce98, 0xce97, 0xce97, - 0xce96, 0xce96, 0xce96, 0xce95, 0xce95, 0xce94, 0xce94, 0xce94, - 0xce93, 0xce93, 0xce92, 0xce92, 0xce91, 0xce91, 0xce91, 0xce90, - 0xce90, 0xce8f, 0xce8f, 0xce8f, 0xce8e, 0xce8e, 0xce8d, 0xce8d, - 0xce8c, 0xce8c, 0xce8c, 0xce8b, 0xce8b, 0xce8a, 0xce8a, 0xce8a, - 0xce89, 0xce89, 0xce88, 0xce88, 0xce88, 0xce87, 0xce87, 0xce86, - 0xce86, 0xce85, 0xce85, 0xce85, 0xce84, 0xce84, 0xce83, 0xce83, - 0xce83, 0xce82, 0xce82, 0xce81, 0xce81, 0xce81, 0xce80, 0xce80, - 0xce7f, 0xce7f, 0xce7f, 0xce7e, 0xce7e, 0xce7d, 0xce7d, 0xce7d, - 0xce7c, 0xce7c, 0xce7b, 0xce7b, 0xce7b, 0xce7a, 0xce7a, 0xce79, - 0xce79, 0xce79, 0xce78, 0xce78, 0xce77, 0xce77, 0xce77, 0xce76, - 0xce76, 0xce75, 0xce75, 0xce75, 0xce74, 0xce74, 0xce73, 0xce73, - 0xce73, 0xce72, 0xce72, 0xce72, 0xce71, 0xce71, 0xce70, 0xce70, - 0xce70, 0xce6f, 0xce6f, 0xce6e, 0xce6e, 0xce6e, 0xce6d, 0xce6d, - 0xce6c, 0xce6c, 0xce6c, 0xce6b, 0xce6b, 0xce6b, 0xce6a, 0xce6a, - 0xce69, 0xce69, 0xce69, 0xce68, 0xce68, 0xce67, 0xce67, 0xce67, - 0xce66, 0xce66, 0xce66, 0xce65, 0xce65, 0xce64, 0xce64, 0xce64, - 0xce63, 0xce63, 0xce62, 0xce62, 0xce62, 0xce61, 0xce61, 0xce61, - 0xce60, 0xce60, 0xce5f, 0xce5f, 0xce5f, 0xce5e, 0xce5e, 0xce5e, - 0xce5d, 0xce5d, 0xce5c, 0xce5c, 0xce5c, 0xce5b, 0xce5b, 0xce5b, - 0xce5a, 0xce5a, 0xce59, 0xce59, 0xce59, 0xce58, 0xce58, 0xce58, - 0xce57, 0xce57, 0xce56, 0xce56, 0xce56, 0xce55, 0xce55, 0xce55, - 0xce54, 0xce54, 0xce53, 0xce53, 0xce53, 0xce52, 0xce52, 0xce52, - 0xce51, 0xce51, 0xce51, 0xce50, 0xce50, 0xce4f, 0xce4f, 0xce4f, - 0xce4e, 0xce4e, 0xce4e, 0xce4d, 0xce4d, 0xce4d, 0xce4c, 0xce4c, - 0xce4b, 0xce4b, 0xce4b, 0xce4a, 0xce4a, 0xce4a, 0xce49, 0xce49, - 0xce49, 0xce48, 0xce48, 0xce47, 0xce47, 0xce47, 0xce46, 0xce46, - 0xce46, 0xce45, 0xce45, 0xce45, 0xce44, 0xce44, 0xce43, 0xce43, - 0xce43, 0xce42, 0xce42, 0xce42, 0xce41, 0xce41, 0xce41, 0xce40, - 0xce40, 0xce40, 0xce3f, 0xce3f, 0xce3e, 0xce3e, 0xce3e, 0xce3d, - 0xce3d, 0xce3d, 0xce3c, 0xce3c, 0xce3c, 0xce3b, 0xce3b, 0xce3b, - 0xce3a, 0xce3a, 0xce3a, 0xce39, 0xce39, 0xce38, 0xce38, 0xce38, - 0xce37, 0xce37, 0xce37, 0xce36, 0xce36, 0xce36, 0xce35, 0xce35, - 0xce35, 0xce34, 0xce34, 0xce34, 0xce33, 0xce33, 0xce33, 0xce32, - 0xce32, 0xce32, 0xce31, 0xce31, 0xce30, 0xce30, 0xce30, 0xce2f, - 0xce2f, 0xce2f, 0xce2e, 0xce2e, 0xce2e, 0xce2d, 0xce2d, 0xce2d, - 0xce2c, 0xce2c, 0xce2c, 0xce2b, 0xce2b, 0xce2b, 0xce2a, 0xce2a, - 0xce2a, 0xce29, 0xce29, 0xce29, 0xce28, 0xce28, 0xce28, 0xce27, - 0xce27, 0xce27, 0xce26, 0xce26, 0xce26, 0xce25, 0xce25, 0xce25, - 0xce24, 0xce24, 0xce24, 0xce23, 0xce23, 0xce23, 0xce22, 0xce22, - 0xce22, 0xce21, 0xce21, 0xce21, 0xce20, 0xce20, 0xce20, 0xce1f, - 0xce1f, 0xce1f, 0xce1e, 0xce1e, 0xce1e, 0xce1d, 0xce1d, 0xce1d, - 0xce1c, 0xce1c, 0xce1c, 0xce1b, 0xce1b, 0xce1b, 0xce1a, 0xce1a, - 0xce1a, 0xce19, 0xce19, 0xce19, 0xce18, 0xce18, 0xce18, 0xce17, - 0xce17, 0xce17, 0xce16, 0xce16, 0xce16, 0xce15, 0xce15, 0xce15, - 0xce14, 0xce14, 0xce14, 0xce13, 0xce13, 0xce13, 0xce12, 0xce12, - 0xce12, 0xce11, 0xce11, 0xce11, 0xce10, 0xce10, 0xce10, 0xce0f, - 0xce0f, 0xce0f, 0xce0e, 0xce0e, 0xce0e, 0xce0d, 0xce0d, 0xce0d, - 0xce0d, 0xce0c, 0xce0c, 0xce0c, 0xce0b, 0xce0b, 0xce0b, 0xce0a, - 0xce0a, 0xce0a, 0xce09, 0xce09, 0xce09, 0xce08, 0xce08, 0xce08, - 0xce07, 0xce07, 0xce07, 0xce06, 0xce06, 0xce06, 0xce05, 0xce05, - 0xce05, 0xce05, 0xce04, 0xce04, 0xce04, 0xce03, 0xce03, 0xce03, - 0xce02, 0xce02, 0xce02, 0xce01, 0xce01, 0xce01, 0xce00, 0xce00, - 0xce00, 0xce00, 0xcdff, 0xcdff, 0xcdff, 0xcdfe, 0xcdfe, 0xcdfe, - 0xcdfd, 0xcdfd, 0xcdfd, 0xcdfc, 0xcdfc, 0xcdfc, 0xcdfb, 0xcdfb, - 0xcdfb, 0xcdfb, 0xcdfa, 0xcdfa, 0xcdfa, 0xcdf9, 0xcdf9, 0xcdf9, - 0xcdf8, 0xcdf8, 0xcdf8, 0xcdf7, 0xcdf7, 0xcdf7, 0xcdf6, 0xcdf6, - 0xcdf6, 0xcdf6, 0xcdf5, 0xcdf5, 0xcdf5, 0xcdf4, 0xcdf4, 0xcdf4, - 0xcdf3, 0xcdf3, 0xcdf3, 0xcdf3, 0xcdf2, 0xcdf2, 0xcdf2, 0xcdf1, - 0xcdf1, 0xcdf1, 0xcdf0, 0xcdf0, 0xcdf0, 0xcdef, 0xcdef, 0xcdef, - 0xcdef, 0xcdee, 0xcdee, 0xcdee, 0xcded, 0xcded, 0xcded, 0xcdec, - 0xcdec, 0xcdec, 0xcdec, 0xcdeb, 0xcdeb, 0xcdeb, 0xcdea, 0xcdea, - 0xcdea, 0xcde9, 0xcde9, 0xcde9, 0xcde9, 0xcde8, 0xcde8, 0xcde8, - 0xcde7, 0xcde7, 0xcde7, 0xcde6, 0xcde6, 0xcde6, 0xcde6, 0xcde5, - 0xcde5, 0xcde5, 0xcde4, 0xcde4, 0xcde4, 0xcde3, 0xcde3, 0xcde3, - 0xcde3, 0xcde2, 0xcde2, 0xcde2, 0xcde1, 0xcde1, 0xcde1, 0xcde0, - 0xcde0, 0xcde0, 0xcde0, 0xcddf, 0xcddf, 0xcddf, 0xcdde, 0xcdde, - 0xcdde, 0xcdde, 0xcddd, 0xcddd, 0xcddd, 0xcddc, 0xcddc, 0xcddc, - 0xcddb, 0xcddb, 0xcddb, 0xcddb, 0xcdda, 0xcdda, 0xcdda, 0xcdd9, - 0xcdd9, 0xcdd9, 0xcdd9, 0xcdd8, 0xcdd8, 0xcdd8, 0xcdd7, 0xcdd7, - 0xcdd7, 0xcdd7, 0xcdd6, 0xcdd6, 0xcdd6, 0xcdd5, 0xcdd5, 0xcdd5, - 0xcdd5, 0xcdd4, 0xcdd4, 0xcdd4, 0xcdd3, 0xcdd3, 0xcdd3, 0xcdd3, - 0xcdd2, 0xcdd2, 0xcdd2, 0xcdd1, 0xcdd1, 0xcdd1, 0xcdd1, 0xcdd0, - 0xcdd0, 0xcdd0, 0xcdcf, 0xcdcf, 0xcdcf, 0xcdcf, 0xcdce, 0xcdce, - 0xcdce, 0xcdcd, 0xcdcd, 0xcdcd, 0xcdcd, 0xcdcc, 0xcdcc, 0xcdcc, - 0xcdcb, 0xcdcb, 0xcdcb, 0xcdcb, 0xcdca, 0xcdca, 0xcdca, 0xcdc9, - 0xcdc9, 0xcdc9, 0xcdc9, 0xcdc8, 0xcdc8, 0xcdc8, 0xcdc7, 0xcdc7, - 0xcdc7, 0xcdc7, 0xcdc6, 0xcdc6, 0xcdc6, 0xcdc5, 0xcdc5, 0xcdc5, - 0xcdc5, 0xcdc4, 0xcdc4, 0xcdc4, 0xcdc4, 0xcdc3, 0xcdc3, 0xcdc3, - 0xcdc2, 0xcdc2, 0xcdc2, 0xcdc2, 0xcdc1, 0xcdc1, 0xcdc1, 0xcdc0, - 0xcdc0, 0xcdc0, 0xcdc0, 0xcdbf, 0xcdbf, 0xcdbf, 0xcdbf, 0xcdbe, - 0xcdbe, 0xcdbe, 0xcdbd, 0xcdbd, 0xcdbd, 0xcdbd, 0xcdbc, 0xcdbc, - 0xcdbc, 0xcdbb, 0xcdbb, 0xcdbb, 0xcdbb, 0xcdba, 0xcdba, 0xcdba, - 0xcdba, 0xcdb9, 0xcdb9, 0xcdb9, 0xcdb8, 0xcdb8, 0xcdb8, 0xcdb8, - 0xcdb7, 0xcdb7, 0xcdb7, 0xcdb7, 0xcdb6, 0xcdb6, 0xcdb6, 0xcdb5, - 0xcdb5, 0xcdb5, 0xcdb5, 0xcdb4, 0xcdb4, 0xcdb4, 0xcdb4, 0xcdb3, - 0xcdb3, 0xcdb3, 0xcdb3, 0xcdb2, 0xcdb2, 0xcdb2, 0xcdb1, 0xcdb1, - 0xcdb1, 0xcdb1, 0xcdb0, 0xcdb0, 0xcdb0, 0xcdb0, 0xcdaf, 0xcdaf, - 0xcdaf, 0xcdae, 0xcdae, 0xcdae, 0xcdae, 0xcdad, 0xcdad, 0xcdad, - 0xcdad, 0xcdac, 0xcdac, 0xcdac, 0xcdac, 0xcdab, 0xcdab, 0xcdab, - 0xcdaa, 0xcdaa, 0xcdaa, 0xcdaa, 0xcda9, 0xcda9, 0xcda9, 0xcda9, - 0xcda8, 0xcda8, 0xcda8, 0xcda8, 0xcda7, 0xcda7, 0xcda7, 0xcda7, - 0xcda6, 0xcda6, 0xcda6, 0xcda5, 0xcda5, 0xcda5, 0xcda5, 0xcda4, - 0xcda4, 0xcda4, 0xcda4, 0xcda3, 0xcda3, 0xcda3, 0xcda3, 0xcda2, - 0xcda2, 0xcda2, 0xcda2, 0xcda1, 0xcda1, 0xcda1, 0xcda0, 0xcda0, - 0xcda0, 0xcda0, 0xcd9f, 0xcd9f, 0xcd9f, 0xcd9f, 0xcd9e, 0xcd9e, - 0xcd9e, 0xcd9e, 0xcd9d, 0xcd9d, 0xcd9d, 0xcd9d, 0xcd9c, 0xcd9c, - 0xcd9c, 0xcd9c, 0xcd9b, 0xcd9b, 0xcd9b, 0xcd9b, 0xcd9a, 0xcd9a, - 0xcd9a, 0xcd9a, 0xcd99, 0xcd99, 0xcd99, 0xcd98, 0xcd98, 0xcd98, - 0xcd98, 0xcd97, 0xcd97, 0xcd97, 0xcd97, 0xcd96, 0xcd96, 0xcd96, - 0xcd96, 0xcd95, 0xcd95, 0xcd95, 0xcd95, 0xcd94, 0xcd94, 0xcd94, - 0xcd94, 0xcd93, 0xcd93, 0xcd93, 0xcd93, 0xcd92, 0xcd92, 0xcd92, - 0xcd92, 0xcd91, 0xcd91, 0xcd91, 0xcd91, 0xcd90, 0xcd90, 0xcd90, - 0xcd90, 0xcd8f, 0xcd8f, 0xcd8f, 0xcd8f, 0xcd8e, 0xcd8e, 0xcd8e, - 0xcd8e, 0xcd8d, 0xcd8d, 0xcd8d, 0xcd8d, 0xcd8c, 0xcd8c, 0xcd8c, - 0xcd8c, 0xcd8b, 0xcd8b, 0xcd8a, 0xcd8a, 0xcd89, 0xcd89, 0xcd88, - 0xcd88, 0xcd87, 0xcd87, 0xcd86, 0xcd86, 0xcd85, 0xcd85, 0xcd84, - 0xcd84, 0xcd83, 0xcd83, 0xcd82, 0xcd82, 0xcd81, 0xcd81, 0xcd80, - 0xcd80, 0xcd7f, 0xcd7f, 0xcd7e, 0xcd7e, 0xcd7d, 0xcd7d, 0xcd7c, - 0xcd7c, 0xcd7b, 0xcd7b, 0xcd7a, 0xcd7a, 0xcd79, 0xcd79, 0xcd78, - 0xcd78, 0xcd77, 0xcd77, 0xcd77, 0xcd76, 0xcd76, 0xcd75, 0xcd75, - 0xcd74, 0xcd74, 0xcd73, 0xcd73, 0xcd72, 0xcd72, 0xcd71, 0xcd71, - 0xcd70, 0xcd70, 0xcd6f, 0xcd6f, 0xcd6e, 0xcd6e, 0xcd6d, 0xcd6d, - 0xcd6d, 0xcd6c, 0xcd6c, 0xcd6b, 0xcd6b, 0xcd6a, 0xcd6a, 0xcd69, - 0xcd69, 0xcd68, 0xcd68, 0xcd67, 0xcd67, 0xcd66, 0xcd66, 0xcd66, - 0xcd65, 0xcd65, 0xcd64, 0xcd64, 0xcd63, 0xcd63, 0xcd62, 0xcd62, - 0xcd61, 0xcd61, 0xcd60, 0xcd60, 0xcd60, 0xcd5f, 0xcd5f, 0xcd5e, - 0xcd5e, 0xcd5d, 0xcd5d, 0xcd5c, 0xcd5c, 0xcd5b, 0xcd5b, 0xcd5a, - 0xcd5a, 0xcd5a, 0xcd59, 0xcd59, 0xcd58, 0xcd58, 0xcd57, 0xcd57, - 0xcd56, 0xcd56, 0xcd56, 0xcd55, 0xcd55, 0xcd54, 0xcd54, 0xcd53, - 0xcd53, 0xcd52, 0xcd52, 0xcd51, 0xcd51, 0xcd51, 0xcd50, 0xcd50, - 0xcd4f, 0xcd4f, 0xcd4e, 0xcd4e, 0xcd4d, 0xcd4d, 0xcd4d, 0xcd4c, - 0xcd4c, 0xcd4b, 0xcd4b, 0xcd4a, 0xcd4a, 0xcd4a, 0xcd49, 0xcd49, - 0xcd48, 0xcd48, 0xcd47, 0xcd47, 0xcd46, 0xcd46, 0xcd46, 0xcd45, - 0xcd45, 0xcd44, 0xcd44, 0xcd43, 0xcd43, 0xcd43, 0xcd42, 0xcd42, - 0xcd41, 0xcd41, 0xcd40, 0xcd40, 0xcd40, 0xcd3f, 0xcd3f, 0xcd3e, - 0xcd3e, 0xcd3d, 0xcd3d, 0xcd3c, 0xcd3c, 0xcd3c, 0xcd3b, 0xcd3b, - 0xcd3a, 0xcd3a, 0xcd3a, 0xcd39, 0xcd39, 0xcd38, 0xcd38, 0xcd37, - 0xcd37, 0xcd37, 0xcd36, 0xcd36, 0xcd35, 0xcd35, 0xcd34, 0xcd34, - 0xcd34, 0xcd33, 0xcd33, 0xcd32, 0xcd32, 0xcd31, 0xcd31, 0xcd31, - 0xcd30, 0xcd30, 0xcd2f, 0xcd2f, 0xcd2f, 0xcd2e, 0xcd2e, 0xcd2d, - 0xcd2d, 0xcd2c, 0xcd2c, 0xcd2c, 0xcd2b, 0xcd2b, 0xcd2a, 0xcd2a, - 0xcd2a, 0xcd29, 0xcd29, 0xcd28, 0xcd28, 0xcd28, 0xcd27, 0xcd27, - 0xcd26, 0xcd26, 0xcd25, 0xcd25, 0xcd25, 0xcd24, 0xcd24, 0xcd23, - 0xcd23, 0xcd23, 0xcd22, 0xcd22, 0xcd21, 0xcd21, 0xcd21, 0xcd20, - 0xcd20, 0xcd1f, 0xcd1f, 0xcd1f, 0xcd1e, 0xcd1e, 0xcd1d, 0xcd1d, - 0xcd1d, 0xcd1c, 0xcd1c, 0xcd1b, 0xcd1b, 0xcd1b, 0xcd1a, 0xcd1a, - 0xcd19, 0xcd19, 0xcd19, 0xcd18, 0xcd18, 0xcd17, 0xcd17, 0xcd17, - 0xcd16, 0xcd16, 0xcd15, 0xcd15, 0xcd15, 0xcd14, 0xcd14, 0xcd13, - 0xcd13, 0xcd13, 0xcd12, 0xcd12, 0xcd11, 0xcd11, 0xcd11, 0xcd10, - 0xcd10, 0xcd0f, 0xcd0f, 0xcd0f, 0xcd0e, 0xcd0e, 0xcd0d, 0xcd0d, - 0xcd0d, 0xcd0c, 0xcd0c, 0xcd0c, 0xcd0b, 0xcd0b, 0xcd0a, 0xcd0a, - 0xcd0a, 0xcd09, 0xcd09, 0xcd08, 0xcd08, 0xcd08, 0xcd07, 0xcd07, - 0xcd06, 0xcd06, 0xcd06, 0xcd05, 0xcd05, 0xcd05, 0xcd04, 0xcd04, - 0xcd03, 0xcd03, 0xcd03, 0xcd02, 0xcd02, 0xcd01, 0xcd01, 0xcd01, - 0xcd00, 0xcd00, 0xcd00, 0xccff, 0xccff, 0xccfe, 0xccfe, 0xccfe, - 0xccfd, 0xccfd, 0xccfd, 0xccfc, 0xccfc, 0xccfb, 0xccfb, 0xccfb, - 0xccfa, 0xccfa, 0xccfa, 0xccf9, 0xccf9, 0xccf8, 0xccf8, 0xccf8, - 0xccf7, 0xccf7, 0xccf7, 0xccf6, 0xccf6, 0xccf5, 0xccf5, 0xccf5, - 0xccf4, 0xccf4, 0xccf4, 0xccf3, 0xccf3, 0xccf2, 0xccf2, 0xccf2, - 0xccf1, 0xccf1, 0xccf1, 0xccf0, 0xccf0, 0xccef, 0xccef, 0xccef, - 0xccee, 0xccee, 0xccee, 0xcced, 0xcced, 0xcced, 0xccec, 0xccec, - 0xcceb, 0xcceb, 0xcceb, 0xccea, 0xccea, 0xccea, 0xcce9, 0xcce9, - 0xcce9, 0xcce8, 0xcce8, 0xcce7, 0xcce7, 0xcce7, 0xcce6, 0xcce6, - 0xcce6, 0xcce5, 0xcce5, 0xcce5, 0xcce4, 0xcce4, 0xcce3, 0xcce3, - 0xcce3, 0xcce2, 0xcce2, 0xcce2, 0xcce1, 0xcce1, 0xcce1, 0xcce0, - 0xcce0, 0xcce0, 0xccdf, 0xccdf, 0xccde, 0xccde, 0xccde, 0xccdd, - 0xccdd, 0xccdd, 0xccdc, 0xccdc, 0xccdc, 0xccdb, 0xccdb, 0xccdb, - 0xccda, 0xccda, 0xccd9, 0xccd9, 0xccd9, 0xccd8, 0xccd8, 0xccd8, - 0xccd7, 0xccd7, 0xccd7, 0xccd6, 0xccd6, 0xccd6, 0xccd5, 0xccd5, - 0xccd5, 0xccd4, 0xccd4, 0xccd3, 0xccd3, 0xccd3, 0xccd2, 0xccd2, - 0xccd2, 0xccd1, 0xccd1, 0xccd1, 0xccd0, 0xccd0, 0xccd0, 0xcccf, - 0xcccf, 0xcccf, 0xccce, 0xccce, 0xccce, 0xcccd, 0xcccd, 0xcccd, - 0xcccc, 0xcccc, 0xcccc, 0xcccb, 0xcccb, 0xcccb, 0xccca, 0xccca, - 0xccc9, 0xccc9, 0xccc9, 0xccc8, 0xccc8, 0xccc8, 0xccc7, 0xccc7, - 0xccc7, 0xccc6, 0xccc6, 0xccc6, 0xccc5, 0xccc5, 0xccc5, 0xccc4, - 0xccc4, 0xccc4, 0xccc3, 0xccc3, 0xccc3, 0xccc2, 0xccc2, 0xccc2, - 0xccc1, 0xccc1, 0xccc1, 0xccc0, 0xccc0, 0xccc0, 0xccbf, 0xccbf, - 0xccbf, 0xccbe, 0xccbe, 0xccbe, 0xccbd, 0xccbd, 0xccbd, 0xccbc, - 0xccbc, 0xccbc, 0xccbb, 0xccbb, 0xccbb, 0xccba, 0xccba, 0xccba, - 0xccb9, 0xccb9, 0xccb9, 0xccb8, 0xccb8, 0xccb8, 0xccb7, 0xccb7, - 0xccb7, 0xccb6, 0xccb6, 0xccb6, 0xccb5, 0xccb5, 0xccb5, 0xccb4, - 0xccb4, 0xccb4, 0xccb3, 0xccb3, 0xccb3, 0xccb2, 0xccb2, 0xccb2, - 0xccb1, 0xccb1, 0xccb1, 0xccb0, 0xccb0, 0xccb0, 0xccaf, 0xccaf, - 0xccaf, 0xccae, 0xccae, 0xccae, 0xccae, 0xccad, 0xccad, 0xccad, - 0xccac, 0xccac, 0xccac, 0xccab, 0xccab, 0xccab, 0xccaa, 0xccaa, - 0xccaa, 0xcca9, 0xcca9, 0xcca9, 0xcca8, 0xcca8, 0xcca8, 0xcca7, - 0xcca7, 0xcca7, 0xcca6, 0xcca6, 0xcca6, 0xcca5, 0xcca5, 0xcca5, - 0xcca5, 0xcca4, 0xcca4, 0xcca4, 0xcca3, 0xcca3, 0xcca3, 0xcca2, - 0xcca2, 0xcca2, 0xcca1, 0xcca1, 0xcca1, 0xcca0, 0xcca0, 0xcca0, - 0xcc9f, 0xcc9f, 0xcc9f, 0xcc9e, 0xcc9e, 0xcc9e, 0xcc9e, 0xcc9d, - 0xcc9d, 0xcc9d, 0xcc9c, 0xcc9c, 0xcc9c, 0xcc9b, 0xcc9b, 0xcc9b, - 0xcc9a, 0xcc9a, 0xcc9a, 0xcc99, 0xcc99, 0xcc99, 0xcc99, 0xcc98, - 0xcc98, 0xcc98, 0xcc97, 0xcc97, 0xcc97, 0xcc96, 0xcc96, 0xcc96, - 0xcc95, 0xcc95, 0xcc95, 0xcc95, 0xcc94, 0xcc94, 0xcc94, 0xcc93, - 0xcc93, 0xcc93, 0xcc92, 0xcc92, 0xcc92, 0xcc91, 0xcc91, 0xcc91, - 0xcc91, 0xcc90, 0xcc90, 0xcc90, 0xcc8f, 0xcc8f, 0xcc8f, 0xcc8e, - 0xcc8e, 0xcc8e, 0xcc8d, 0xcc8d, 0xcc8d, 0xcc8d, 0xcc8c, 0xcc8c, - 0xcc8c, 0xcc8b, 0xcc8b, 0xcc8b, 0xcc8a, 0xcc8a, 0xcc8a, 0xcc8a, - 0xcc89, 0xcc89, 0xcc89, 0xcc88, 0xcc88, 0xcc88, 0xcc87, 0xcc87, - 0xcc87, 0xcc87, 0xcc86, 0xcc86, 0xcc86, 0xcc85, 0xcc85, 0xcc85, - 0xcc84, 0xcc84, 0xcc84, 0xcc84, 0xcc83, 0xcc83, 0xcc83, 0xcc82, - 0xcc82, 0xcc82, 0xcc81, 0xcc81, 0xcc81, 0xcc81, 0xcc80, 0xcc80, - 0xcc80, 0xcc7f, 0xcc7f, 0xcc7f, 0xcc7e, 0xcc7e, 0xcc7e, 0xcc7e, - 0xcc7d, 0xcc7d, 0xcc7d, 0xcc7c, 0xcc7c, 0xcc7c, 0xcc7c, 0xcc7b, - 0xcc7b, 0xcc7b, 0xcc7a, 0xcc7a, 0xcc7a, 0xcc79, 0xcc79, 0xcc79, - 0xcc79, 0xcc78, 0xcc78, 0xcc78, 0xcc77, 0xcc77, 0xcc77, 0xcc77, - 0xcc76, 0xcc76, 0xcc76, 0xcc75, 0xcc75, 0xcc75, 0xcc75, 0xcc74, - 0xcc74, 0xcc74, 0xcc73, 0xcc73, 0xcc73, 0xcc72, 0xcc72, 0xcc72, - 0xcc72, 0xcc71, 0xcc71, 0xcc71, 0xcc70, 0xcc70, 0xcc70, 0xcc70, - 0xcc6f, 0xcc6f, 0xcc6f, 0xcc6e, 0xcc6e, 0xcc6e, 0xcc6e, 0xcc6d, - 0xcc6d, 0xcc6d, 0xcc6c, 0xcc6c, 0xcc6c, 0xcc6c, 0xcc6b, 0xcc6b, - 0xcc6b, 0xcc6a, 0xcc6a, 0xcc6a, 0xcc6a, 0xcc69, 0xcc69, 0xcc69, - 0xcc68, 0xcc68, 0xcc68, 0xcc68, 0xcc67, 0xcc67, 0xcc67, 0xcc67, - 0xcc66, 0xcc66, 0xcc66, 0xcc65, 0xcc65, 0xcc65, 0xcc65, 0xcc64, - 0xcc64, 0xcc64, 0xcc63, 0xcc63, 0xcc63, 0xcc63, 0xcc62, 0xcc62, - 0xcc62, 0xcc61, 0xcc61, 0xcc61, 0xcc61, 0xcc60, 0xcc60, 0xcc60, - 0xcc60, 0xcc5f, 0xcc5f, 0xcc5f, 0xcc5e, 0xcc5e, 0xcc5e, 0xcc5e, - 0xcc5d, 0xcc5d, 0xcc5d, 0xcc5c, 0xcc5c, 0xcc5c, 0xcc5c, 0xcc5b, - 0xcc5b, 0xcc5b, 0xcc5b, 0xcc5a, 0xcc5a, 0xcc5a, 0xcc59, 0xcc59, - 0xcc59, 0xcc59, 0xcc58, 0xcc58, 0xcc58, 0xcc58, 0xcc57, 0xcc57, - 0xcc57, 0xcc56, 0xcc56, 0xcc56, 0xcc56, 0xcc55, 0xcc55, 0xcc55, - 0xcc54, 0xcc54, 0xcc54, 0xcc54, 0xcc53, 0xcc53, 0xcc53, 0xcc53, - 0xcc52, 0xcc52, 0xcc52, 0xcc52, 0xcc51, 0xcc51, 0xcc51, 0xcc50, - 0xcc50, 0xcc50, 0xcc50, 0xcc4f, 0xcc4f, 0xcc4f, 0xcc4f, 0xcc4e, - 0xcc4e, 0xcc4e, 0xcc4d, 0xcc4d, 0xcc4d, 0xcc4d, 0xcc4c, 0xcc4c, - 0xcc4c, 0xcc4c, 0xcc4b, 0xcc4b, 0xcc4b, 0xcc4b, 0xcc4a, 0xcc4a, - 0xcc4a, 0xcc49, 0xcc49, 0xcc49, 0xcc49, 0xcc48, 0xcc48, 0xcc48, - 0xcc48, 0xcc47, 0xcc47, 0xcc47, 0xcc47, 0xcc46, 0xcc46, 0xcc46, - 0xcc45, 0xcc45, 0xcc45, 0xcc45, 0xcc44, 0xcc44, 0xcc44, 0xcc44, - 0xcc43, 0xcc43, 0xcc43, 0xcc43, 0xcc42, 0xcc42, 0xcc42, 0xcc42, - 0xcc41, 0xcc41, 0xcc41, 0xcc40, 0xcc40, 0xcc40, 0xcc40, 0xcc3f, - 0xcc3f, 0xcc3f, 0xcc3f, 0xcc3e, 0xcc3e, 0xcc3e, 0xcc3e, 0xcc3d, - 0xcc3d, 0xcc3d, 0xcc3d, 0xcc3c, 0xcc3c, 0xcc3c, 0xcc3c, 0xcc3b, - 0xcc3b, 0xcc3b, 0xcc3a, 0xcc3a, 0xcc3a, 0xcc3a, 0xcc39, 0xcc39, - 0xcc39, 0xcc39, 0xcc38, 0xcc38, 0xcc38, 0xcc38, 0xcc37, 0xcc37, - 0xcc37, 0xcc37, 0xcc36, 0xcc36, 0xcc36, 0xcc36, 0xcc35, 0xcc35, - 0xcc35, 0xcc35, 0xcc34, 0xcc34, 0xcc34, 0xcc34, 0xcc33, 0xcc33, - 0xcc33, 0xcc33, 0xcc32, 0xcc32, 0xcc32, 0xcc31, 0xcc31, 0xcc31, - 0xcc31, 0xcc30, 0xcc30, 0xcc30, 0xcc30, 0xcc2f, 0xcc2f, 0xcc2f, - 0xcc2f, 0xcc2e, 0xcc2e, 0xcc2e, 0xcc2e, 0xcc2d, 0xcc2d, 0xcc2d, - 0xcc2d, 0xcc2c, 0xcc2c, 0xcc2c, 0xcc2c, 0xcc2b, 0xcc2b, 0xcc2b, - 0xcc2b, 0xcc2a, 0xcc2a, 0xcc2a, 0xcc2a, 0xcc29, 0xcc29, 0xcc29, - 0xcc29, 0xcc28, 0xcc28, 0xcc27, 0xcc27, 0xcc26, 0xcc26, 0xcc25, - 0xcc25, 0xcc24, 0xcc24, 0xcc23, 0xcc23, 0xcc22, 0xcc22, 0xcc21, - 0xcc21, 0xcc20, 0xcc20, 0xcc1f, 0xcc1f, 0xcc1e, 0xcc1e, 0xcc1d, - 0xcc1d, 0xcc1c, 0xcc1c, 0xcc1b, 0xcc1b, 0xcc1a, 0xcc1a, 0xcc19, - 0xcc19, 0xcc18, 0xcc18, 0xcc17, 0xcc17, 0xcc17, 0xcc16, 0xcc16, - 0xcc15, 0xcc15, 0xcc14, 0xcc14, 0xcc13, 0xcc13, 0xcc12, 0xcc12, - 0xcc11, 0xcc11, 0xcc10, 0xcc10, 0xcc0f, 0xcc0f, 0xcc0e, 0xcc0e, - 0xcc0d, 0xcc0d, 0xcc0c, 0xcc0c, 0xcc0c, 0xcc0b, 0xcc0b, 0xcc0a, - 0xcc0a, 0xcc09, 0xcc09, 0xcc08, 0xcc08, 0xcc07, 0xcc07, 0xcc06, - 0xcc06, 0xcc05, 0xcc05, 0xcc04, 0xcc04, 0xcc04, 0xcc03, 0xcc03, - 0xcc02, 0xcc02, 0xcc01, 0xcc01, 0xcc00, 0xcc00, 0xcbff, 0xcbfe, - 0xcbfd, 0xcbfc, 0xcbfb, 0xcbfa, 0xcbf9, 0xcbf8, 0xcbf7, 0xcbf6, - 0xcbf6, 0xcbf5, 0xcbf4, 0xcbf3, 0xcbf2, 0xcbf1, 0xcbf0, 0xcbef, - 0xcbee, 0xcbed, 0xcbec, 0xcbec, 0xcbeb, 0xcbea, 0xcbe9, 0xcbe8, - 0xcbe7, 0xcbe6, 0xcbe5, 0xcbe4, 0xcbe3, 0xcbe3, 0xcbe2, 0xcbe1, - 0xcbe0, 0xcbdf, 0xcbde, 0xcbdd, 0xcbdc, 0xcbdb, 0xcbdb, 0xcbda, - 0xcbd9, 0xcbd8, 0xcbd7, 0xcbd6, 0xcbd5, 0xcbd4, 0xcbd3, 0xcbd3, - 0xcbd2, 0xcbd1, 0xcbd0, 0xcbcf, 0xcbce, 0xcbcd, 0xcbcc, 0xcbcb, - 0xcbcb, 0xcbca, 0xcbc9, 0xcbc8, 0xcbc7, 0xcbc6, 0xcbc5, 0xcbc4, - 0xcbc4, 0xcbc3, 0xcbc2, 0xcbc1, 0xcbc0, 0xcbbf, 0xcbbe, 0xcbbe, - 0xcbbd, 0xcbbc, 0xcbbb, 0xcbba, 0xcbb9, 0xcbb8, 0xcbb8, 0xcbb7, - 0xcbb6, 0xcbb5, 0xcbb4, 0xcbb3, 0xcbb2, 0xcbb1, 0xcbb1, 0xcbb0, - 0xcbaf, 0xcbae, 0xcbad, 0xcbac, 0xcbac, 0xcbab, 0xcbaa, 0xcba9, - 0xcba8, 0xcba7, 0xcba6, 0xcba6, 0xcba5, 0xcba4, 0xcba3, 0xcba2, - 0xcba1, 0xcba1, 0xcba0, 0xcb9f, 0xcb9e, 0xcb9d, 0xcb9c, 0xcb9b, - 0xcb9b, 0xcb9a, 0xcb99, 0xcb98, 0xcb97, 0xcb96, 0xcb96, 0xcb95, - 0xcb94, 0xcb93, 0xcb92, 0xcb91, 0xcb91, 0xcb90, 0xcb8f, 0xcb8e, - 0xcb8d, 0xcb8d, 0xcb8c, 0xcb8b, 0xcb8a, 0xcb89, 0xcb88, 0xcb88, - 0xcb87, 0xcb86, 0xcb85, 0xcb84, 0xcb83, 0xcb83, 0xcb82, 0xcb81, - 0xcb80, 0xcb7f, 0xcb7f, 0xcb7e, 0xcb7d, 0xcb7c, 0xcb7b, 0xcb7b, - 0xcb7a, 0xcb79, 0xcb78, 0xcb77, 0xcb76, 0xcb76, 0xcb75, 0xcb74, - 0xcb73, 0xcb72, 0xcb72, 0xcb71, 0xcb70, 0xcb6f, 0xcb6e, 0xcb6e, - 0xcb6d, 0xcb6c, 0xcb6b, 0xcb6a, 0xcb6a, 0xcb69, 0xcb68, 0xcb67, - 0xcb66, 0xcb66, 0xcb65, 0xcb64, 0xcb63, 0xcb63, 0xcb62, 0xcb61, - 0xcb60, 0xcb5f, 0xcb5f, 0xcb5e, 0xcb5d, 0xcb5c, 0xcb5b, 0xcb5b, - 0xcb5a, 0xcb59, 0xcb58, 0xcb57, 0xcb57, 0xcb56, 0xcb55, 0xcb54, - 0xcb54, 0xcb53, 0xcb52, 0xcb51, 0xcb50, 0xcb50, 0xcb4f, 0xcb4e, - 0xcb4d, 0xcb4d, 0xcb4c, 0xcb4b, 0xcb4a, 0xcb49, 0xcb49, 0xcb48, - 0xcb47, 0xcb46, 0xcb46, 0xcb45, 0xcb44, 0xcb43, 0xcb43, 0xcb42, - 0xcb41, 0xcb40, 0xcb3f, 0xcb3f, 0xcb3e, 0xcb3d, 0xcb3c, 0xcb3c, - 0xcb3b, 0xcb3a, 0xcb39, 0xcb39, 0xcb38, 0xcb37, 0xcb36, 0xcb36, - 0xcb35, 0xcb34, 0xcb33, 0xcb33, 0xcb32, 0xcb31, 0xcb30, 0xcb30, - 0xcb2f, 0xcb2e, 0xcb2d, 0xcb2d, 0xcb2c, 0xcb2b, 0xcb2a, 0xcb2a, - 0xcb29, 0xcb28, 0xcb27, 0xcb27, 0xcb26, 0xcb25, 0xcb24, 0xcb24, - 0xcb23, 0xcb22, 0xcb21, 0xcb21, 0xcb20, 0xcb1f, 0xcb1e, 0xcb1e, - 0xcb1d, 0xcb1c, 0xcb1b, 0xcb1b, 0xcb1a, 0xcb19, 0xcb18, 0xcb18, - 0xcb17, 0xcb16, 0xcb15, 0xcb15, 0xcb14, 0xcb13, 0xcb13, 0xcb12, - 0xcb11, 0xcb10, 0xcb10, 0xcb0f, 0xcb0e, 0xcb0d, 0xcb0d, 0xcb0c, - 0xcb0b, 0xcb0b, 0xcb0a, 0xcb09, 0xcb08, 0xcb08, 0xcb07, 0xcb06, - 0xcb05, 0xcb05, 0xcb04, 0xcb03, 0xcb03, 0xcb02, 0xcb01, 0xcb00, - 0xcb00, 0xcaff, 0xcafe, 0xcafe, 0xcafd, 0xcafc, 0xcafb, 0xcafb, - 0xcafa, 0xcaf9, 0xcaf9, 0xcaf8, 0xcaf7, 0xcaf6, 0xcaf6, 0xcaf5, - 0xcaf4, 0xcaf4, 0xcaf3, 0xcaf2, 0xcaf1, 0xcaf1, 0xcaf0, 0xcaef, - 0xcaef, 0xcaee, 0xcaed, 0xcaec, 0xcaec, 0xcaeb, 0xcaea, 0xcaea, - 0xcae9, 0xcae8, 0xcae8, 0xcae7, 0xcae6, 0xcae5, 0xcae5, 0xcae4, - 0xcae3, 0xcae3, 0xcae2, 0xcae1, 0xcae1, 0xcae0, 0xcadf, 0xcade, - 0xcade, 0xcadd, 0xcadc, 0xcadc, 0xcadb, 0xcada, 0xcada, 0xcad9, - 0xcad8, 0xcad7, 0xcad7, 0xcad6, 0xcad5, 0xcad5, 0xcad4, 0xcad3, - 0xcad3, 0xcad2, 0xcad1, 0xcad1, 0xcad0, 0xcacf, 0xcacf, 0xcace, - 0xcacd, 0xcacc, 0xcacc, 0xcacb, 0xcaca, 0xcaca, 0xcac9, 0xcac8, - 0xcac8, 0xcac7, 0xcac6, 0xcac6, 0xcac5, 0xcac4, 0xcac4, 0xcac3, - 0xcac2, 0xcac2, 0xcac1, 0xcac0, 0xcac0, 0xcabf, 0xcabe, 0xcabe, - 0xcabd, 0xcabc, 0xcabc, 0xcabb, 0xcaba, 0xcaba, 0xcab9, 0xcab8, - 0xcab7, 0xcab7, 0xcab6, 0xcab5, 0xcab5, 0xcab4, 0xcab3, 0xcab3, - 0xcab2, 0xcab1, 0xcab1, 0xcab0, 0xcaaf, 0xcaaf, 0xcaae, 0xcaad, - 0xcaad, 0xcaac, 0xcaac, 0xcaab, 0xcaaa, 0xcaaa, 0xcaa9, 0xcaa8, - 0xcaa8, 0xcaa7, 0xcaa6, 0xcaa6, 0xcaa5, 0xcaa4, 0xcaa4, 0xcaa3, - 0xcaa2, 0xcaa2, 0xcaa1, 0xcaa0, 0xcaa0, 0xca9f, 0xca9e, 0xca9e, - 0xca9d, 0xca9c, 0xca9c, 0xca9b, 0xca9a, 0xca9a, 0xca99, 0xca98, - 0xca98, 0xca97, 0xca97, 0xca96, 0xca95, 0xca95, 0xca94, 0xca93, - 0xca93, 0xca92, 0xca91, 0xca91, 0xca90, 0xca8f, 0xca8f, 0xca8e, - 0xca8d, 0xca8d, 0xca8c, 0xca8c, 0xca8b, 0xca8a, 0xca8a, 0xca89, - 0xca88, 0xca88, 0xca87, 0xca86, 0xca86, 0xca85, 0xca85, 0xca84, - 0xca83, 0xca83, 0xca82, 0xca81, 0xca81, 0xca80, 0xca7f, 0xca7f, - 0xca7e, 0xca7e, 0xca7d, 0xca7c, 0xca7c, 0xca7b, 0xca7a, 0xca7a, - 0xca79, 0xca78, 0xca78, 0xca77, 0xca77, 0xca76, 0xca75, 0xca75, - 0xca74, 0xca73, 0xca73, 0xca72, 0xca72, 0xca71, 0xca70, 0xca70, - 0xca6f, 0xca6e, 0xca6e, 0xca6d, 0xca6d, 0xca6c, 0xca6b, 0xca6b, - 0xca6a, 0xca69, 0xca69, 0xca68, 0xca68, 0xca67, 0xca66, 0xca66, - 0xca65, 0xca65, 0xca64, 0xca63, 0xca63, 0xca62, 0xca61, 0xca61, - 0xca60, 0xca60, 0xca5f, 0xca5e, 0xca5e, 0xca5d, 0xca5d, 0xca5c, - 0xca5b, 0xca5b, 0xca5a, 0xca59, 0xca59, 0xca58, 0xca58, 0xca57, - 0xca56, 0xca56, 0xca55, 0xca55, 0xca54, 0xca53, 0xca53, 0xca52, - 0xca52, 0xca51, 0xca50, 0xca50, 0xca4f, 0xca4e, 0xca4e, 0xca4d, - 0xca4d, 0xca4c, 0xca4b, 0xca4b, 0xca4a, 0xca4a, 0xca49, 0xca48, - 0xca48, 0xca47, 0xca47, 0xca46, 0xca45, 0xca45, 0xca44, 0xca44, - 0xca43, 0xca42, 0xca42, 0xca41, 0xca41, 0xca40, 0xca3f, 0xca3f, - 0xca3e, 0xca3e, 0xca3d, 0xca3d, 0xca3c, 0xca3b, 0xca3b, 0xca3a, - 0xca3a, 0xca39, 0xca38, 0xca38, 0xca37, 0xca37, 0xca36, 0xca35, - 0xca35, 0xca34, 0xca34, 0xca33, 0xca32, 0xca32, 0xca31, 0xca31, - 0xca30, 0xca30, 0xca2f, 0xca2e, 0xca2e, 0xca2d, 0xca2d, 0xca2c, - 0xca2b, 0xca2b, 0xca2a, 0xca2a, 0xca29, 0xca28, 0xca28, 0xca27, - 0xca27, 0xca26, 0xca26, 0xca25, 0xca24, 0xca24, 0xca23, 0xca23, - 0xca22, 0xca22, 0xca21, 0xca20, 0xca20, 0xca1f, 0xca1f, 0xca1e, - 0xca1d, 0xca1d, 0xca1c, 0xca1c, 0xca1b, 0xca1b, 0xca1a, 0xca19, - 0xca19, 0xca18, 0xca18, 0xca17, 0xca17, 0xca16, 0xca15, 0xca15, - 0xca14, 0xca14, 0xca13, 0xca13, 0xca12, 0xca11, 0xca11, 0xca10, - 0xca10, 0xca0f, 0xca0f, 0xca0e, 0xca0d, 0xca0d, 0xca0c, 0xca0c, - 0xca0b, 0xca0b, 0xca0a, 0xca0a, 0xca09, 0xca08, 0xca08, 0xca07, - 0xca07, 0xca06, 0xca06, 0xca05, 0xca04, 0xca04, 0xca03, 0xca03, - 0xca02, 0xca02, 0xca01, 0xca00, 0xca00, 0xc9ff, 0xc9ff, 0xc9fe, - 0xc9fe, 0xc9fd, 0xc9fd, 0xc9fc, 0xc9fb, 0xc9fb, 0xc9fa, 0xc9fa, - 0xc9f9, 0xc9f9, 0xc9f8, 0xc9f8, 0xc9f7, 0xc9f6, 0xc9f6, 0xc9f5, - 0xc9f5, 0xc9f4, 0xc9f4, 0xc9f3, 0xc9f3, 0xc9f2, 0xc9f1, 0xc9f1, - 0xc9f0, 0xc9f0, 0xc9ef, 0xc9ef, 0xc9ee, 0xc9ee, 0xc9ed, 0xc9ed, - 0xc9ec, 0xc9eb, 0xc9eb, 0xc9ea, 0xc9ea, 0xc9e9, 0xc9e9, 0xc9e8, - 0xc9e8, 0xc9e7, 0xc9e6, 0xc9e6, 0xc9e5, 0xc9e5, 0xc9e4, 0xc9e4, - 0xc9e3, 0xc9e3, 0xc9e2, 0xc9e2, 0xc9e1, 0xc9e0, 0xc9e0, 0xc9df, - 0xc9df, 0xc9de, 0xc9de, 0xc9dd, 0xc9dd, 0xc9dc, 0xc9dc, 0xc9db, - 0xc9db, 0xc9da, 0xc9d9, 0xc9d9, 0xc9d8, 0xc9d8, 0xc9d7, 0xc9d7, - 0xc9d6, 0xc9d6, 0xc9d5, 0xc9d5, 0xc9d4, 0xc9d4, 0xc9d3, 0xc9d2, - 0xc9d2, 0xc9d1, 0xc9d1, 0xc9d0, 0xc9d0, 0xc9cf, 0xc9cf, 0xc9ce, - 0xc9ce, 0xc9cd, 0xc9cd, 0xc9cc, 0xc9cc, 0xc9cb, 0xc9ca, 0xc9ca, - 0xc9c9, 0xc9c9, 0xc9c8, 0xc9c8, 0xc9c7, 0xc9c7, 0xc9c6, 0xc9c6, - 0xc9c5, 0xc9c5, 0xc9c4, 0xc9c4, 0xc9c3, 0xc9c3, 0xc9c2, 0xc9c1, - 0xc9c1, 0xc9c0, 0xc9c0, 0xc9bf, 0xc9bf, 0xc9be, 0xc9be, 0xc9bd, - 0xc9bd, 0xc9bc, 0xc9bc, 0xc9bb, 0xc9bb, 0xc9ba, 0xc9ba, 0xc9b9, - 0xc9b9, 0xc9b8, 0xc9b7, 0xc9b7, 0xc9b6, 0xc9b6, 0xc9b5, 0xc9b5, - 0xc9b4, 0xc9b4, 0xc9b3, 0xc9b3, 0xc9b2, 0xc9b2, 0xc9b1, 0xc9b1, - 0xc9b0, 0xc9b0, 0xc9af, 0xc9af, 0xc9ae, 0xc9ae, 0xc9ad, 0xc9ad, - 0xc9ac, 0xc9ac, 0xc9ab, 0xc9ab, 0xc9aa, 0xc9a9, 0xc9a9, 0xc9a8, - 0xc9a8, 0xc9a7, 0xc9a7, 0xc9a6, 0xc9a6, 0xc9a5, 0xc9a5, 0xc9a4, - 0xc9a4, 0xc9a3, 0xc9a3, 0xc9a2, 0xc9a2, 0xc9a1, 0xc9a1, 0xc9a0, - 0xc9a0, 0xc99f, 0xc99f, 0xc99e, 0xc99e, 0xc99d, 0xc99d, 0xc99c, - 0xc99c, 0xc99b, 0xc99b, 0xc99a, 0xc99a, 0xc999, 0xc999, 0xc998, - 0xc998, 0xc997, 0xc997, 0xc996, 0xc996, 0xc995, 0xc995, 0xc994, - 0xc994, 0xc993, 0xc993, 0xc992, 0xc992, 0xc991, 0xc991, 0xc990, - 0xc990, 0xc98f, 0xc98f, 0xc98e, 0xc98e, 0xc98d, 0xc98d, 0xc98c, - 0xc98c, 0xc98b, 0xc98a, 0xc989, 0xc988, 0xc987, 0xc986, 0xc985, - 0xc984, 0xc983, 0xc982, 0xc981, 0xc980, 0xc97f, 0xc97e, 0xc97d, - 0xc97c, 0xc97b, 0xc97a, 0xc979, 0xc978, 0xc977, 0xc976, 0xc975, - 0xc974, 0xc973, 0xc972, 0xc971, 0xc970, 0xc96f, 0xc96e, 0xc96d, - 0xc96c, 0xc96b, 0xc96a, 0xc969, 0xc968, 0xc967, 0xc966, 0xc965, - 0xc964, 0xc963, 0xc962, 0xc961, 0xc960, 0xc960, 0xc95f, 0xc95e, - 0xc95d, 0xc95c, 0xc95b, 0xc95a, 0xc959, 0xc958, 0xc957, 0xc956, - 0xc955, 0xc954, 0xc953, 0xc952, 0xc951, 0xc950, 0xc94f, 0xc94e, - 0xc94d, 0xc94d, 0xc94c, 0xc94b, 0xc94a, 0xc949, 0xc948, 0xc947, - 0xc946, 0xc945, 0xc944, 0xc943, 0xc942, 0xc941, 0xc940, 0xc93f, - 0xc93f, 0xc93e, 0xc93d, 0xc93c, 0xc93b, 0xc93a, 0xc939, 0xc938, - 0xc937, 0xc936, 0xc935, 0xc934, 0xc933, 0xc933, 0xc932, 0xc931, - 0xc930, 0xc92f, 0xc92e, 0xc92d, 0xc92c, 0xc92b, 0xc92a, 0xc929, - 0xc929, 0xc928, 0xc927, 0xc926, 0xc925, 0xc924, 0xc923, 0xc922, - 0xc921, 0xc920, 0xc91f, 0xc91f, 0xc91e, 0xc91d, 0xc91c, 0xc91b, - 0xc91a, 0xc919, 0xc918, 0xc917, 0xc917, 0xc916, 0xc915, 0xc914, - 0xc913, 0xc912, 0xc911, 0xc910, 0xc90f, 0xc90f, 0xc90e, 0xc90d, - 0xc90c, 0xc90b, 0xc90a, 0xc909, 0xc908, 0xc907, 0xc907, 0xc906, - 0xc905, 0xc904, 0xc903, 0xc902, 0xc901, 0xc900, 0xc900, 0xc8ff, - 0xc8fe, 0xc8fd, 0xc8fc, 0xc8fb, 0xc8fa, 0xc8f9, 0xc8f9, 0xc8f8, - 0xc8f7, 0xc8f6, 0xc8f5, 0xc8f4, 0xc8f3, 0xc8f3, 0xc8f2, 0xc8f1, - 0xc8f0, 0xc8ef, 0xc8ee, 0xc8ed, 0xc8ed, 0xc8ec, 0xc8eb, 0xc8ea, - 0xc8e9, 0xc8e8, 0xc8e7, 0xc8e7, 0xc8e6, 0xc8e5, 0xc8e4, 0xc8e3, - 0xc8e2, 0xc8e2, 0xc8e1, 0xc8e0, 0xc8df, 0xc8de, 0xc8dd, 0xc8dc, - 0xc8dc, 0xc8db, 0xc8da, 0xc8d9, 0xc8d8, 0xc8d7, 0xc8d7, 0xc8d6, - 0xc8d5, 0xc8d4, 0xc8d3, 0xc8d2, 0xc8d2, 0xc8d1, 0xc8d0, 0xc8cf, - 0xc8ce, 0xc8cd, 0xc8cd, 0xc8cc, 0xc8cb, 0xc8ca, 0xc8c9, 0xc8c8, - 0xc8c8, 0xc8c7, 0xc8c6, 0xc8c5, 0xc8c4, 0xc8c3, 0xc8c3, 0xc8c2, - 0xc8c1, 0xc8c0, 0xc8bf, 0xc8bf, 0xc8be, 0xc8bd, 0xc8bc, 0xc8bb, - 0xc8ba, 0xc8ba, 0xc8b9, 0xc8b8, 0xc8b7, 0xc8b6, 0xc8b6, 0xc8b5, - 0xc8b4, 0xc8b3, 0xc8b2, 0xc8b2, 0xc8b1, 0xc8b0, 0xc8af, 0xc8ae, - 0xc8ad, 0xc8ad, 0xc8ac, 0xc8ab, 0xc8aa, 0xc8a9, 0xc8a9, 0xc8a8, - 0xc8a7, 0xc8a6, 0xc8a5, 0xc8a5, 0xc8a4, 0xc8a3, 0xc8a2, 0xc8a1, - 0xc8a1, 0xc8a0, 0xc89f, 0xc89e, 0xc89e, 0xc89d, 0xc89c, 0xc89b, - 0xc89a, 0xc89a, 0xc899, 0xc898, 0xc897, 0xc896, 0xc896, 0xc895, - 0xc894, 0xc893, 0xc892, 0xc892, 0xc891, 0xc890, 0xc88f, 0xc88f, - 0xc88e, 0xc88d, 0xc88c, 0xc88b, 0xc88b, 0xc88a, 0xc889, 0xc888, - 0xc888, 0xc887, 0xc886, 0xc885, 0xc884, 0xc884, 0xc883, 0xc882, - 0xc881, 0xc881, 0xc880, 0xc87f, 0xc87e, 0xc87e, 0xc87d, 0xc87c, - 0xc87b, 0xc87a, 0xc87a, 0xc879, 0xc878, 0xc877, 0xc877, 0xc876, - 0xc875, 0xc874, 0xc874, 0xc873, 0xc872, 0xc871, 0xc871, 0xc870, - 0xc86f, 0xc86e, 0xc86e, 0xc86d, 0xc86c, 0xc86b, 0xc86a, 0xc86a, - 0xc869, 0xc868, 0xc867, 0xc867, 0xc866, 0xc865, 0xc864, 0xc864, - 0xc863, 0xc862, 0xc861, 0xc861, 0xc860, 0xc85f, 0xc85e, 0xc85e, - 0xc85d, 0xc85c, 0xc85c, 0xc85b, 0xc85a, 0xc859, 0xc859, 0xc858, - 0xc857, 0xc856, 0xc856, 0xc855, 0xc854, 0xc853, 0xc853, 0xc852, - 0xc851, 0xc850, 0xc850, 0xc84f, 0xc84e, 0xc84e, 0xc84d, 0xc84c, - 0xc84b, 0xc84b, 0xc84a, 0xc849, 0xc848, 0xc848, 0xc847, 0xc846, - 0xc845, 0xc845, 0xc844, 0xc843, 0xc843, 0xc842, 0xc841, 0xc840, - 0xc840, 0xc83f, 0xc83e, 0xc83d, 0xc83d, 0xc83c, 0xc83b, 0xc83b, - 0xc83a, 0xc839, 0xc838, 0xc838, 0xc837, 0xc836, 0xc836, 0xc835, - 0xc834, 0xc833, 0xc833, 0xc832, 0xc831, 0xc831, 0xc830, 0xc82f, - 0xc82e, 0xc82e, 0xc82d, 0xc82c, 0xc82c, 0xc82b, 0xc82a, 0xc829, - 0xc829, 0xc828, 0xc827, 0xc827, 0xc826, 0xc825, 0xc825, 0xc824, - 0xc823, 0xc822, 0xc822, 0xc821, 0xc820, 0xc820, 0xc81f, 0xc81e, - 0xc81e, 0xc81d, 0xc81c, 0xc81b, 0xc81b, 0xc81a, 0xc819, 0xc819, - 0xc818, 0xc817, 0xc817, 0xc816, 0xc815, 0xc814, 0xc814, 0xc813, - 0xc812, 0xc812, 0xc811, 0xc810, 0xc810, 0xc80f, 0xc80e, 0xc80e, - 0xc80d, 0xc80c, 0xc80c, 0xc80b, 0xc80a, 0xc809, 0xc809, 0xc808, - 0xc807, 0xc807, 0xc806, 0xc805, 0xc805, 0xc804, 0xc803, 0xc803, - 0xc802, 0xc801, 0xc801, 0xc800, 0xc7fe, 0xc7fd, 0xc7fc, 0xc7fa, - 0xc7f9, 0xc7f8, 0xc7f6, 0xc7f5, 0xc7f4, 0xc7f2, 0xc7f1, 0xc7f0, - 0xc7ee, 0xc7ed, 0xc7eb, 0xc7ea, 0xc7e9, 0xc7e7, 0xc7e6, 0xc7e5, - 0xc7e3, 0xc7e2, 0xc7e1, 0xc7df, 0xc7de, 0xc7dd, 0xc7db, 0xc7da, - 0xc7d9, 0xc7d7, 0xc7d6, 0xc7d5, 0xc7d3, 0xc7d2, 0xc7d1, 0xc7cf, - 0xc7ce, 0xc7cd, 0xc7cb, 0xc7ca, 0xc7c9, 0xc7c7, 0xc7c6, 0xc7c5, - 0xc7c4, 0xc7c2, 0xc7c1, 0xc7c0, 0xc7be, 0xc7bd, 0xc7bc, 0xc7ba, - 0xc7b9, 0xc7b8, 0xc7b6, 0xc7b5, 0xc7b4, 0xc7b2, 0xc7b1, 0xc7b0, - 0xc7af, 0xc7ad, 0xc7ac, 0xc7ab, 0xc7a9, 0xc7a8, 0xc7a7, 0xc7a5, - 0xc7a4, 0xc7a3, 0xc7a1, 0xc7a0, 0xc79f, 0xc79e, 0xc79c, 0xc79b, - 0xc79a, 0xc798, 0xc797, 0xc796, 0xc795, 0xc793, 0xc792, 0xc791, - 0xc78f, 0xc78e, 0xc78d, 0xc78c, 0xc78a, 0xc789, 0xc788, 0xc786, - 0xc785, 0xc784, 0xc783, 0xc781, 0xc780, 0xc77f, 0xc77d, 0xc77c, - 0xc77b, 0xc77a, 0xc778, 0xc777, 0xc776, 0xc775, 0xc773, 0xc772, - 0xc771, 0xc76f, 0xc76e, 0xc76d, 0xc76c, 0xc76a, 0xc769, 0xc768, - 0xc767, 0xc765, 0xc764, 0xc763, 0xc762, 0xc760, 0xc75f, 0xc75e, - 0xc75d, 0xc75b, 0xc75a, 0xc759, 0xc758, 0xc756, 0xc755, 0xc754, - 0xc753, 0xc751, 0xc750, 0xc74f, 0xc74e, 0xc74c, 0xc74b, 0xc74a, - 0xc749, 0xc747, 0xc746, 0xc745, 0xc744, 0xc742, 0xc741, 0xc740, - 0xc73f, 0xc73d, 0xc73c, 0xc73b, 0xc73a, 0xc739, 0xc737, 0xc736, - 0xc735, 0xc734, 0xc732, 0xc731, 0xc730, 0xc72f, 0xc72d, 0xc72c, - 0xc72b, 0xc72a, 0xc729, 0xc727, 0xc726, 0xc725, 0xc724, 0xc722, - 0xc721, 0xc720, 0xc71f, 0xc71e, 0xc71c, 0xc71b, 0xc71a, 0xc719, - 0xc717, 0xc716, 0xc715, 0xc714, 0xc713, 0xc711, 0xc710, 0xc70f, - 0xc70e, 0xc70d, 0xc70b, 0xc70a, 0xc709, 0xc708, 0xc707, 0xc705, - 0xc704, 0xc703, 0xc702, 0xc701, 0xc6ff, 0xc6fe, 0xc6fd, 0xc6fc, - 0xc6fb, 0xc6f9, 0xc6f8, 0xc6f7, 0xc6f6, 0xc6f5, 0xc6f3, 0xc6f2, - 0xc6f1, 0xc6f0, 0xc6ef, 0xc6ed, 0xc6ec, 0xc6eb, 0xc6ea, 0xc6e9, - 0xc6e8, 0xc6e6, 0xc6e5, 0xc6e4, 0xc6e3, 0xc6e2, 0xc6e0, 0xc6df, - 0xc6de, 0xc6dd, 0xc6dc, 0xc6db, 0xc6d9, 0xc6d8, 0xc6d7, 0xc6d6, - 0xc6d5, 0xc6d3, 0xc6d2, 0xc6d1, 0xc6d0, 0xc6cf, 0xc6ce, 0xc6cc, - 0xc6cb, 0xc6ca, 0xc6c9, 0xc6c8, 0xc6c7, 0xc6c5, 0xc6c4, 0xc6c3, - 0xc6c2, 0xc6c1, 0xc6c0, 0xc6be, 0xc6bd, 0xc6bc, 0xc6bb, 0xc6ba, - 0xc6b9, 0xc6b7, 0xc6b6, 0xc6b5, 0xc6b4, 0xc6b3, 0xc6b2, 0xc6b1, - 0xc6af, 0xc6ae, 0xc6ad, 0xc6ac, 0xc6ab, 0xc6aa, 0xc6a8, 0xc6a7, - 0xc6a6, 0xc6a5, 0xc6a4, 0xc6a3, 0xc6a2, 0xc6a0, 0xc69f, 0xc69e, - 0xc69d, 0xc69c, 0xc69b, 0xc69a, 0xc698, 0xc697, 0xc696, 0xc695, - 0xc694, 0xc693, 0xc692, 0xc691, 0xc68f, 0xc68e, 0xc68d, 0xc68c, - 0xc68b, 0xc68a, 0xc689, 0xc687, 0xc686, 0xc685, 0xc684, 0xc683, - 0xc682, 0xc681, 0xc680, 0xc67e, 0xc67d, 0xc67c, 0xc67b, 0xc67a, - 0xc679, 0xc678, 0xc677, 0xc675, 0xc674, 0xc673, 0xc672, 0xc671, - 0xc670, 0xc66f, 0xc66e, 0xc66c, 0xc66b, 0xc66a, 0xc669, 0xc668, - 0xc667, 0xc666, 0xc665, 0xc664, 0xc662, 0xc661, 0xc660, 0xc65f, - 0xc65e, 0xc65d, 0xc65c, 0xc65b, 0xc65a, 0xc658, 0xc657, 0xc656, - 0xc655, 0xc654, 0xc653, 0xc652, 0xc651, 0xc650, 0xc64f, 0xc64d, - 0xc64c, 0xc64b, 0xc64a, 0xc649, 0xc648, 0xc647, 0xc646, 0xc645, - 0xc644, 0xc642, 0xc641, 0xc640, 0xc63f, 0xc63e, 0xc63d, 0xc63c, - 0xc63b, 0xc63a, 0xc639, 0xc638, 0xc637, 0xc635, 0xc634, 0xc633, - 0xc632, 0xc631, 0xc630, 0xc62f, 0xc62e, 0xc62d, 0xc62c, 0xc62b, - 0xc62a, 0xc628, 0xc627, 0xc626, 0xc625, 0xc624, 0xc623, 0xc622, - 0xc621, 0xc620, 0xc61f, 0xc61e, 0xc61d, 0xc61c, 0xc61a, 0xc619, - 0xc618, 0xc617, 0xc616, 0xc615, 0xc614, 0xc613, 0xc612, 0xc611, - 0xc610, 0xc60f, 0xc60e, 0xc60d, 0xc60b, 0xc60a, 0xc609, 0xc608, - 0xc607, 0xc606, 0xc605, 0xc604, 0xc603, 0xc602, 0xc601, 0xc600, - 0xc5ff, 0xc5fe, 0xc5fd, 0xc5fc, 0xc5fb, 0xc5f9, 0xc5f8, 0xc5f7, - 0xc5f6, 0xc5f5, 0xc5f4, 0xc5f3, 0xc5f2, 0xc5f1, 0xc5f0, 0xc5ef, - 0xc5ee, 0xc5ed, 0xc5ec, 0xc5eb, 0xc5ea, 0xc5e9, 0xc5e8, 0xc5e7, - 0xc5e6, 0xc5e4, 0xc5e3, 0xc5e2, 0xc5e1, 0xc5e0, 0xc5df, 0xc5de, - 0xc5dd, 0xc5dc, 0xc5db, 0xc5da, 0xc5d9, 0xc5d8, 0xc5d7, 0xc5d6, - 0xc5d5, 0xc5d4, 0xc5d3, 0xc5d2, 0xc5d1, 0xc5d0, 0xc5cf, 0xc5ce, - 0xc5cd, 0xc5cc, 0xc5cb, 0xc5c9, 0xc5c8, 0xc5c7, 0xc5c6, 0xc5c5, - 0xc5c4, 0xc5c3, 0xc5c2, 0xc5c1, 0xc5c0, 0xc5bf, 0xc5be, 0xc5bd, - 0xc5bc, 0xc5bb, 0xc5ba, 0xc5b9, 0xc5b8, 0xc5b7, 0xc5b6, 0xc5b5, - 0xc5b4, 0xc5b3, 0xc5b2, 0xc5b1, 0xc5b0, 0xc5af, 0xc5ae, 0xc5ad, - 0xc5ac, 0xc5ab, 0xc5aa, 0xc5a9, 0xc5a8, 0xc5a7, 0xc5a6, 0xc5a5, - 0xc5a4, 0xc5a3, 0xc5a2, 0xc5a1, 0xc5a0, 0xc59f, 0xc59e, 0xc59d, - 0xc59c, 0xc59b, 0xc59a, 0xc599, 0xc598, 0xc597, 0xc596, 0xc595, - 0xc594, 0xc593, 0xc592, 0xc591, 0xc590, 0xc58f, 0xc58e, 0xc58d, - 0xc58c, 0xc58a, 0xc588, 0xc586, 0xc584, 0xc582, 0xc580, 0xc57e, - 0xc57c, 0xc57a, 0xc578, 0xc576, 0xc574, 0xc572, 0xc570, 0xc56e, - 0xc56c, 0xc56a, 0xc568, 0xc566, 0xc564, 0xc562, 0xc560, 0xc55e, - 0xc55c, 0xc55a, 0xc558, 0xc556, 0xc554, 0xc552, 0xc550, 0xc54e, - 0xc54d, 0xc54b, 0xc549, 0xc547, 0xc545, 0xc543, 0xc541, 0xc53f, - 0xc53d, 0xc53b, 0xc539, 0xc537, 0xc535, 0xc533, 0xc532, 0xc530, - 0xc52e, 0xc52c, 0xc52a, 0xc528, 0xc526, 0xc524, 0xc522, 0xc520, - 0xc51f, 0xc51d, 0xc51b, 0xc519, 0xc517, 0xc515, 0xc513, 0xc511, - 0xc50f, 0xc50e, 0xc50c, 0xc50a, 0xc508, 0xc506, 0xc504, 0xc502, - 0xc500, 0xc4ff, 0xc4fd, 0xc4fb, 0xc4f9, 0xc4f7, 0xc4f5, 0xc4f3, - 0xc4f2, 0xc4f0, 0xc4ee, 0xc4ec, 0xc4ea, 0xc4e8, 0xc4e6, 0xc4e5, - 0xc4e3, 0xc4e1, 0xc4df, 0xc4dd, 0xc4db, 0xc4da, 0xc4d8, 0xc4d6, - 0xc4d4, 0xc4d2, 0xc4d0, 0xc4cf, 0xc4cd, 0xc4cb, 0xc4c9, 0xc4c7, - 0xc4c5, 0xc4c4, 0xc4c2, 0xc4c0, 0xc4be, 0xc4bc, 0xc4bb, 0xc4b9, - 0xc4b7, 0xc4b5, 0xc4b3, 0xc4b2, 0xc4b0, 0xc4ae, 0xc4ac, 0xc4aa, - 0xc4a9, 0xc4a7, 0xc4a5, 0xc4a3, 0xc4a1, 0xc4a0, 0xc49e, 0xc49c, - 0xc49a, 0xc499, 0xc497, 0xc495, 0xc493, 0xc491, 0xc490, 0xc48e, - 0xc48c, 0xc48a, 0xc489, 0xc487, 0xc485, 0xc483, 0xc482, 0xc480, - 0xc47e, 0xc47c, 0xc47b, 0xc479, 0xc477, 0xc475, 0xc474, 0xc472, - 0xc470, 0xc46e, 0xc46d, 0xc46b, 0xc469, 0xc467, 0xc466, 0xc464, - 0xc462, 0xc461, 0xc45f, 0xc45d, 0xc45b, 0xc45a, 0xc458, 0xc456, - 0xc454, 0xc453, 0xc451, 0xc44f, 0xc44e, 0xc44c, 0xc44a, 0xc448, - 0xc447, 0xc445, 0xc443, 0xc442, 0xc440, 0xc43e, 0xc43d, 0xc43b, - 0xc439, 0xc437, 0xc436, 0xc434, 0xc432, 0xc431, 0xc42f, 0xc42d, - 0xc42c, 0xc42a, 0xc428, 0xc427, 0xc425, 0xc423, 0xc422, 0xc420, - 0xc41e, 0xc41d, 0xc41b, 0xc419, 0xc418, 0xc416, 0xc414, 0xc413, - 0xc411, 0xc40f, 0xc40e, 0xc40c, 0xc40a, 0xc409, 0xc407, 0xc405, - 0xc404, 0xc402, 0xc400, 0xc3fd, 0xc3fa, 0xc3f7, 0xc3f3, 0xc3f0, - 0xc3ed, 0xc3ea, 0xc3e6, 0xc3e3, 0xc3e0, 0xc3dc, 0xc3d9, 0xc3d6, - 0xc3d3, 0xc3cf, 0xc3cc, 0xc3c9, 0xc3c6, 0xc3c2, 0xc3bf, 0xc3bc, - 0xc3b9, 0xc3b5, 0xc3b2, 0xc3af, 0xc3ac, 0xc3a8, 0xc3a5, 0xc3a2, - 0xc39f, 0xc39c, 0xc398, 0xc395, 0xc392, 0xc38f, 0xc38c, 0xc388, - 0xc385, 0xc382, 0xc37f, 0xc37c, 0xc378, 0xc375, 0xc372, 0xc36f, - 0xc36c, 0xc368, 0xc365, 0xc362, 0xc35f, 0xc35c, 0xc359, 0xc355, - 0xc352, 0xc34f, 0xc34c, 0xc349, 0xc346, 0xc342, 0xc33f, 0xc33c, - 0xc339, 0xc336, 0xc333, 0xc330, 0xc32d, 0xc329, 0xc326, 0xc323, - 0xc320, 0xc31d, 0xc31a, 0xc317, 0xc314, 0xc310, 0xc30d, 0xc30a, - 0xc307, 0xc304, 0xc301, 0xc2fe, 0xc2fb, 0xc2f8, 0xc2f5, 0xc2f1, - 0xc2ee, 0xc2eb, 0xc2e8, 0xc2e5, 0xc2e2, 0xc2df, 0xc2dc, 0xc2d9, - 0xc2d6, 0xc2d3, 0xc2d0, 0xc2cd, 0xc2c9, 0xc2c6, 0xc2c3, 0xc2c0, - 0xc2bd, 0xc2ba, 0xc2b7, 0xc2b4, 0xc2b1, 0xc2ae, 0xc2ab, 0xc2a8, - 0xc2a5, 0xc2a2, 0xc29f, 0xc29c, 0xc299, 0xc296, 0xc293, 0xc290, - 0xc28d, 0xc28a, 0xc287, 0xc284, 0xc281, 0xc27e, 0xc27b, 0xc278, - 0xc275, 0xc272, 0xc26f, 0xc26c, 0xc269, 0xc266, 0xc263, 0xc260, - 0xc25d, 0xc25a, 0xc257, 0xc254, 0xc251, 0xc24e, 0xc24b, 0xc248, - 0xc245, 0xc242, 0xc23f, 0xc23c, 0xc239, 0xc236, 0xc233, 0xc230, - 0xc22e, 0xc22b, 0xc228, 0xc225, 0xc222, 0xc21f, 0xc21c, 0xc219, - 0xc216, 0xc213, 0xc210, 0xc20d, 0xc20a, 0xc207, 0xc205, 0xc202, - 0xc1ff, 0xc1fc, 0xc1f9, 0xc1f6, 0xc1f3, 0xc1f0, 0xc1ed, 0xc1ea, - 0xc1e8, 0xc1e5, 0xc1e2, 0xc1df, 0xc1dc, 0xc1d9, 0xc1d6, 0xc1d3, - 0xc1d0, 0xc1ce, 0xc1cb, 0xc1c8, 0xc1c5, 0xc1c2, 0xc1bf, 0xc1bc, - 0xc1ba, 0xc1b7, 0xc1b4, 0xc1b1, 0xc1ae, 0xc1ab, 0xc1a8, 0xc1a6, - 0xc1a3, 0xc1a0, 0xc19d, 0xc19a, 0xc197, 0xc194, 0xc192, 0xc18f, - 0xc18c, 0xc189, 0xc186, 0xc184, 0xc181, 0xc17e, 0xc17b, 0xc178, - 0xc175, 0xc173, 0xc170, 0xc16d, 0xc16a, 0xc167, 0xc165, 0xc162, - 0xc15f, 0xc15c, 0xc159, 0xc157, 0xc154, 0xc151, 0xc14e, 0xc14b, - 0xc149, 0xc146, 0xc143, 0xc140, 0xc13e, 0xc13b, 0xc138, 0xc135, - 0xc132, 0xc130, 0xc12d, 0xc12a, 0xc127, 0xc125, 0xc122, 0xc11f, - 0xc11c, 0xc11a, 0xc117, 0xc114, 0xc111, 0xc10f, 0xc10c, 0xc109, - 0xc106, 0xc104, 0xc101, 0xc0fe, 0xc0fb, 0xc0f9, 0xc0f6, 0xc0f3, - 0xc0f1, 0xc0ee, 0xc0eb, 0xc0e8, 0xc0e6, 0xc0e3, 0xc0e0, 0xc0de, - 0xc0db, 0xc0d8, 0xc0d5, 0xc0d3, 0xc0d0, 0xc0cd, 0xc0cb, 0xc0c8, - 0xc0c5, 0xc0c3, 0xc0c0, 0xc0bd, 0xc0ba, 0xc0b8, 0xc0b5, 0xc0b2, - 0xc0b0, 0xc0ad, 0xc0aa, 0xc0a8, 0xc0a5, 0xc0a2, 0xc0a0, 0xc09d, - 0xc09a, 0xc098, 0xc095, 0xc092, 0xc090, 0xc08d, 0xc08a, 0xc088, - 0xc085, 0xc082, 0xc080, 0xc07d, 0xc07a, 0xc078, 0xc075, 0xc073, - 0xc070, 0xc06d, 0xc06b, 0xc068, 0xc065, 0xc063, 0xc060, 0xc05d, - 0xc05b, 0xc058, 0xc056, 0xc053, 0xc050, 0xc04e, 0xc04b, 0xc049, - 0xc046, 0xc043, 0xc041, 0xc03e, 0xc03b, 0xc039, 0xc036, 0xc034, - 0xc031, 0xc02e, 0xc02c, 0xc029, 0xc027, 0xc024, 0xc021, 0xc01f, - 0xc01c, 0xc01a, 0xc017, 0xc015, 0xc012, 0xc00f, 0xc00d, 0xc00a, - 0xc008, 0xc005, 0xc003, 0xc000, 0xbffb, 0xbff6, 0xbff1, 0xbfeb, - 0xbfe6, 0xbfe1, 0xbfdc, 0xbfd7, 0xbfd2, 0xbfcd, 0xbfc8, 0xbfc3, - 0xbfbd, 0xbfb8, 0xbfb3, 0xbfae, 0xbfa9, 0xbfa4, 0xbf9f, 0xbf9a, - 0xbf95, 0xbf90, 0xbf8b, 0xbf86, 0xbf81, 0xbf7b, 0xbf76, 0xbf71, - 0xbf6c, 0xbf67, 0xbf62, 0xbf5d, 0xbf58, 0xbf53, 0xbf4e, 0xbf49, - 0xbf44, 0xbf3f, 0xbf3a, 0xbf35, 0xbf30, 0xbf2b, 0xbf26, 0xbf21, - 0xbf1c, 0xbf17, 0xbf12, 0xbf0d, 0xbf08, 0xbf03, 0xbefe, 0xbef9, - 0xbef4, 0xbeef, 0xbeea, 0xbee5, 0xbee0, 0xbedb, 0xbed6, 0xbed1, - 0xbecc, 0xbec8, 0xbec3, 0xbebe, 0xbeb9, 0xbeb4, 0xbeaf, 0xbeaa, - 0xbea5, 0xbea0, 0xbe9b, 0xbe96, 0xbe91, 0xbe8c, 0xbe87, 0xbe83, - 0xbe7e, 0xbe79, 0xbe74, 0xbe6f, 0xbe6a, 0xbe65, 0xbe60, 0xbe5b, - 0xbe57, 0xbe52, 0xbe4d, 0xbe48, 0xbe43, 0xbe3e, 0xbe39, 0xbe35, - 0xbe30, 0xbe2b, 0xbe26, 0xbe21, 0xbe1c, 0xbe17, 0xbe13, 0xbe0e, - 0xbe09, 0xbe04, 0xbdff, 0xbdfa, 0xbdf6, 0xbdf1, 0xbdec, 0xbde7, - 0xbde2, 0xbdde, 0xbdd9, 0xbdd4, 0xbdcf, 0xbdca, 0xbdc6, 0xbdc1, - 0xbdbc, 0xbdb7, 0xbdb2, 0xbdae, 0xbda9, 0xbda4, 0xbd9f, 0xbd9b, - 0xbd96, 0xbd91, 0xbd8c, 0xbd88, 0xbd83, 0xbd7e, 0xbd79, 0xbd75, - 0xbd70, 0xbd6b, 0xbd66, 0xbd62, 0xbd5d, 0xbd58, 0xbd53, 0xbd4f, - 0xbd4a, 0xbd45, 0xbd41, 0xbd3c, 0xbd37, 0xbd32, 0xbd2e, 0xbd29, - 0xbd24, 0xbd20, 0xbd1b, 0xbd16, 0xbd12, 0xbd0d, 0xbd08, 0xbd03, - 0xbcff, 0xbcfa, 0xbcf5, 0xbcf1, 0xbcec, 0xbce7, 0xbce3, 0xbcde, - 0xbcd9, 0xbcd5, 0xbcd0, 0xbccc, 0xbcc7, 0xbcc2, 0xbcbe, 0xbcb9, - 0xbcb4, 0xbcb0, 0xbcab, 0xbca6, 0xbca2, 0xbc9d, 0xbc99, 0xbc94, - 0xbc8f, 0xbc8b, 0xbc86, 0xbc82, 0xbc7d, 0xbc78, 0xbc74, 0xbc6f, - 0xbc6b, 0xbc66, 0xbc61, 0xbc5d, 0xbc58, 0xbc54, 0xbc4f, 0xbc4a, - 0xbc46, 0xbc41, 0xbc3d, 0xbc38, 0xbc34, 0xbc2f, 0xbc2b, 0xbc26, - 0xbc21, 0xbc1d, 0xbc18, 0xbc14, 0xbc0f, 0xbc0b, 0xbc06, 0xbc02, - 0xbbfa, 0xbbf1, 0xbbe8, 0xbbdf, 0xbbd6, 0xbbcd, 0xbbc4, 0xbbbb, - 0xbbb2, 0xbba9, 0xbba0, 0xbb97, 0xbb8e, 0xbb85, 0xbb7c, 0xbb73, - 0xbb6a, 0xbb61, 0xbb58, 0xbb4f, 0xbb46, 0xbb3d, 0xbb34, 0xbb2b, - 0xbb22, 0xbb19, 0xbb10, 0xbb07, 0xbafe, 0xbaf5, 0xbaed, 0xbae4, - 0xbadb, 0xbad2, 0xbac9, 0xbac0, 0xbab7, 0xbaae, 0xbaa5, 0xba9c, - 0xba94, 0xba8b, 0xba82, 0xba79, 0xba70, 0xba67, 0xba5f, 0xba56, - 0xba4d, 0xba44, 0xba3b, 0xba32, 0xba2a, 0xba21, 0xba18, 0xba0f, - 0xba06, 0xb9fe, 0xb9f5, 0xb9ec, 0xb9e3, 0xb9da, 0xb9d2, 0xb9c9, - 0xb9c0, 0xb9b7, 0xb9af, 0xb9a6, 0xb99d, 0xb995, 0xb98c, 0xb983, - 0xb97a, 0xb972, 0xb969, 0xb960, 0xb958, 0xb94f, 0xb946, 0xb93d, - 0xb935, 0xb92c, 0xb923, 0xb91b, 0xb912, 0xb909, 0xb901, 0xb8f8, - 0xb8ef, 0xb8e7, 0xb8de, 0xb8d6, 0xb8cd, 0xb8c4, 0xb8bc, 0xb8b3, - 0xb8ab, 0xb8a2, 0xb899, 0xb891, 0xb888, 0xb880, 0xb877, 0xb86e, - 0xb866, 0xb85d, 0xb855, 0xb84c, 0xb844, 0xb83b, 0xb832, 0xb82a, - 0xb821, 0xb819, 0xb810, 0xb808, 0xb7ff, 0xb7ee, 0xb7dd, 0xb7cc, - 0xb7bb, 0xb7aa, 0xb799, 0xb788, 0xb777, 0xb766, 0xb755, 0xb744, - 0xb733, 0xb722, 0xb711, 0xb700, 0xb6ef, 0xb6de, 0xb6cd, 0xb6bd, - 0xb6ac, 0xb69b, 0xb68a, 0xb679, 0xb668, 0xb658, 0xb647, 0xb636, - 0xb625, 0xb614, 0xb604, 0xb5f3, 0xb5e2, 0xb5d1, 0xb5c1, 0xb5b0, - 0xb59f, 0xb58e, 0xb57e, 0xb56d, 0xb55c, 0xb54c, 0xb53b, 0xb52a, - 0xb51a, 0xb509, 0xb4f8, 0xb4e8, 0xb4d7, 0xb4c7, 0xb4b6, 0xb4a5, - 0xb495, 0xb484, 0xb474, 0xb463, 0xb452, 0xb442, 0xb431, 0xb421, - 0xb410, 0xb400, 0xb3df, 0xb3be, 0xb39d, 0xb37c, 0xb35b, 0xb33a, - 0xb319, 0xb2f8, 0xb2d7, 0xb2b6, 0xb295, 0xb275, 0xb254, 0xb233, - 0xb212, 0xb1f2, 0xb1d1, 0xb1b0, 0xb18f, 0xb16f, 0xb14e, 0xb12d, - 0xb10d, 0xb0ec, 0xb0cb, 0xb0ab, 0xb08a, 0xb06a, 0xb049, 0xb029, - 0xb008, 0xafcf, 0xaf8e, 0xaf4d, 0xaf0c, 0xaecb, 0xae8b, 0xae4a, - 0xae09, 0xadc8, 0xad88, 0xad47, 0xad06, 0xacc6, 0xac85, 0xac45, - 0xac04, 0xab87, 0xab06, 0xaa85, 0xaa05, 0xa984, 0xa903, 0xa883, - 0xa802, 0xa703, 0xa602, 0xa502, 0xa401, 0xa201, 0xa001, 0x9c00, - 0x0000, 0x1fff, 0x23fe, 0x25fe, 0x27fc, 0x28fd, 0x29fc, 0x2afa, - 0x2bf8, 0x2c7b, 0x2cfa, 0x2d78, 0x2df7, 0x2e76, 0x2ef4, 0x2f72, - 0x2ff0, 0x3037, 0x3076, 0x30b5, 0x30f4, 0x3132, 0x3171, 0x31b0, - 0x31ee, 0x322d, 0x326b, 0x32aa, 0x32e8, 0x3326, 0x3364, 0x33a3, - 0x33e1, 0x340f, 0x342e, 0x344d, 0x346c, 0x348b, 0x34aa, 0x34c9, - 0x34e8, 0x3506, 0x3525, 0x3544, 0x3563, 0x3581, 0x35a0, 0x35bf, - 0x35dd, 0x35fc, 0x361a, 0x3639, 0x3657, 0x3676, 0x3694, 0x36b2, - 0x36d1, 0x36ef, 0x370d, 0x372c, 0x374a, 0x3768, 0x3786, 0x37a4, - 0x37c3, 0x37e1, 0x37ff, 0x380e, 0x381d, 0x382c, 0x383b, 0x384a, - 0x3859, 0x3868, 0x3877, 0x3886, 0x3895, 0x38a4, 0x38b3, 0x38c2, - 0x38d0, 0x38df, 0x38ee, 0x38fd, 0x390c, 0x391a, 0x3929, 0x3938, - 0x3947, 0x3955, 0x3964, 0x3973, 0x3982, 0x3990, 0x399f, 0x39ae, - 0x39bc, 0x39cb, 0x39d9, 0x39e8, 0x39f7, 0x3a05, 0x3a14, 0x3a22, - 0x3a31, 0x3a3f, 0x3a4e, 0x3a5c, 0x3a6b, 0x3a79, 0x3a88, 0x3a96, - 0x3aa5, 0x3ab3, 0x3ac1, 0x3ad0, 0x3ade, 0x3aed, 0x3afb, 0x3b09, - 0x3b18, 0x3b26, 0x3b34, 0x3b42, 0x3b51, 0x3b5f, 0x3b6d, 0x3b7c, - 0x3b8a, 0x3b98, 0x3ba6, 0x3bb4, 0x3bc3, 0x3bd1, 0x3bdf, 0x3bed, - 0x3bfb, 0x3c05, 0x3c0c, 0x3c13, 0x3c1a, 0x3c21, 0x3c28, 0x3c2f, - 0x3c36, 0x3c3d, 0x3c44, 0x3c4b, 0x3c52, 0x3c59, 0x3c60, 0x3c67, - 0x3c6e, 0x3c75, 0x3c7c, 0x3c83, 0x3c8a, 0x3c91, 0x3c97, 0x3c9e, - 0x3ca5, 0x3cac, 0x3cb3, 0x3cba, 0x3cc1, 0x3cc8, 0x3ccf, 0x3cd6, - 0x3cdc, 0x3ce3, 0x3cea, 0x3cf1, 0x3cf8, 0x3cff, 0x3d06, 0x3d0c, - 0x3d13, 0x3d1a, 0x3d21, 0x3d28, 0x3d2f, 0x3d35, 0x3d3c, 0x3d43, - 0x3d4a, 0x3d51, 0x3d57, 0x3d5e, 0x3d65, 0x3d6c, 0x3d72, 0x3d79, - 0x3d80, 0x3d87, 0x3d8d, 0x3d94, 0x3d9b, 0x3da1, 0x3da8, 0x3daf, - 0x3db6, 0x3dbc, 0x3dc3, 0x3dca, 0x3dd0, 0x3dd7, 0x3dde, 0x3de4, - 0x3deb, 0x3df2, 0x3df8, 0x3dff, 0x3e05, 0x3e0c, 0x3e13, 0x3e19, - 0x3e20, 0x3e27, 0x3e2d, 0x3e34, 0x3e3a, 0x3e41, 0x3e47, 0x3e4e, - 0x3e55, 0x3e5b, 0x3e62, 0x3e68, 0x3e6f, 0x3e75, 0x3e7c, 0x3e82, - 0x3e89, 0x3e8f, 0x3e96, 0x3e9c, 0x3ea3, 0x3ea9, 0x3eb0, 0x3eb6, - 0x3ebd, 0x3ec3, 0x3eca, 0x3ed0, 0x3ed7, 0x3edd, 0x3ee4, 0x3eea, - 0x3ef1, 0x3ef7, 0x3efe, 0x3f04, 0x3f0a, 0x3f11, 0x3f17, 0x3f1e, - 0x3f24, 0x3f2a, 0x3f31, 0x3f37, 0x3f3e, 0x3f44, 0x3f4a, 0x3f51, - 0x3f57, 0x3f5d, 0x3f64, 0x3f6a, 0x3f70, 0x3f77, 0x3f7d, 0x3f83, - 0x3f8a, 0x3f90, 0x3f96, 0x3f9d, 0x3fa3, 0x3fa9, 0x3fb0, 0x3fb6, - 0x3fbc, 0x3fc2, 0x3fc9, 0x3fcf, 0x3fd5, 0x3fdc, 0x3fe2, 0x3fe8, - 0x3fee, 0x3ff5, 0x3ffb, 0x4000, 0x4004, 0x4007, 0x400a, 0x400d, - 0x4010, 0x4013, 0x4016, 0x4019, 0x401c, 0x4020, 0x4023, 0x4026, - 0x4029, 0x402c, 0x402f, 0x4032, 0x4035, 0x4038, 0x403b, 0x403e, - 0x4041, 0x4044, 0x4048, 0x404b, 0x404e, 0x4051, 0x4054, 0x4057, - 0x405a, 0x405d, 0x4060, 0x4063, 0x4066, 0x4069, 0x406c, 0x406f, - 0x4072, 0x4075, 0x4078, 0x407b, 0x407e, 0x4081, 0x4084, 0x4087, - 0x408a, 0x408d, 0x4090, 0x4093, 0x4096, 0x4099, 0x409c, 0x409f, - 0x40a2, 0x40a5, 0x40a8, 0x40ab, 0x40ae, 0x40b1, 0x40b4, 0x40b7, - 0x40ba, 0x40bd, 0x40c0, 0x40c3, 0x40c6, 0x40c9, 0x40cc, 0x40cf, - 0x40d2, 0x40d5, 0x40d8, 0x40db, 0x40de, 0x40e1, 0x40e4, 0x40e7, - 0x40ea, 0x40ed, 0x40ef, 0x40f2, 0x40f5, 0x40f8, 0x40fb, 0x40fe, - 0x4101, 0x4104, 0x4107, 0x410a, 0x410d, 0x4110, 0x4113, 0x4115, - 0x4118, 0x411b, 0x411e, 0x4121, 0x4124, 0x4127, 0x412a, 0x412d, - 0x4130, 0x4132, 0x4135, 0x4138, 0x413b, 0x413e, 0x4141, 0x4144, - 0x4147, 0x414a, 0x414c, 0x414f, 0x4152, 0x4155, 0x4158, 0x415b, - 0x415e, 0x4160, 0x4163, 0x4166, 0x4169, 0x416c, 0x416f, 0x4172, - 0x4174, 0x4177, 0x417a, 0x417d, 0x4180, 0x4183, 0x4185, 0x4188, - 0x418b, 0x418e, 0x4191, 0x4194, 0x4196, 0x4199, 0x419c, 0x419f, - 0x41a2, 0x41a5, 0x41a7, 0x41aa, 0x41ad, 0x41b0, 0x41b3, 0x41b5, - 0x41b8, 0x41bb, 0x41be, 0x41c1, 0x41c3, 0x41c6, 0x41c9, 0x41cc, - 0x41ce, 0x41d1, 0x41d4, 0x41d7, 0x41da, 0x41dc, 0x41df, 0x41e2, - 0x41e5, 0x41e7, 0x41ea, 0x41ed, 0x41f0, 0x41f2, 0x41f5, 0x41f8, - 0x41fb, 0x41fd, 0x4200, 0x4203, 0x4206, 0x4208, 0x420b, 0x420e, - 0x4211, 0x4213, 0x4216, 0x4219, 0x421c, 0x421e, 0x4221, 0x4224, - 0x4227, 0x4229, 0x422c, 0x422f, 0x4231, 0x4234, 0x4237, 0x423a, - 0x423c, 0x423f, 0x4242, 0x4244, 0x4247, 0x424a, 0x424d, 0x424f, - 0x4252, 0x4255, 0x4257, 0x425a, 0x425d, 0x425f, 0x4262, 0x4265, - 0x4267, 0x426a, 0x426d, 0x426f, 0x4272, 0x4275, 0x4277, 0x427a, - 0x427d, 0x427f, 0x4282, 0x4285, 0x4287, 0x428a, 0x428d, 0x428f, - 0x4292, 0x4295, 0x4297, 0x429a, 0x429d, 0x429f, 0x42a2, 0x42a5, - 0x42a7, 0x42aa, 0x42ad, 0x42af, 0x42b2, 0x42b4, 0x42b7, 0x42ba, - 0x42bc, 0x42bf, 0x42c2, 0x42c4, 0x42c7, 0x42c9, 0x42cc, 0x42cf, - 0x42d1, 0x42d4, 0x42d6, 0x42d9, 0x42dc, 0x42de, 0x42e1, 0x42e3, - 0x42e6, 0x42e9, 0x42eb, 0x42ee, 0x42f0, 0x42f3, 0x42f6, 0x42f8, - 0x42fb, 0x42fd, 0x4300, 0x4303, 0x4305, 0x4308, 0x430a, 0x430d, - 0x430f, 0x4312, 0x4315, 0x4317, 0x431a, 0x431c, 0x431f, 0x4321, - 0x4324, 0x4327, 0x4329, 0x432c, 0x432e, 0x4331, 0x4333, 0x4336, - 0x4338, 0x433b, 0x433e, 0x4340, 0x4343, 0x4345, 0x4348, 0x434a, - 0x434d, 0x434f, 0x4352, 0x4354, 0x4357, 0x4359, 0x435c, 0x435e, - 0x4361, 0x4363, 0x4366, 0x4369, 0x436b, 0x436e, 0x4370, 0x4373, - 0x4375, 0x4378, 0x437a, 0x437d, 0x437f, 0x4382, 0x4384, 0x4387, - 0x4389, 0x438c, 0x438e, 0x4391, 0x4393, 0x4396, 0x4398, 0x439b, - 0x439d, 0x43a0, 0x43a2, 0x43a5, 0x43a7, 0x43a9, 0x43ac, 0x43ae, - 0x43b1, 0x43b3, 0x43b6, 0x43b8, 0x43bb, 0x43bd, 0x43c0, 0x43c2, - 0x43c5, 0x43c7, 0x43ca, 0x43cc, 0x43ce, 0x43d1, 0x43d3, 0x43d6, - 0x43d8, 0x43db, 0x43dd, 0x43e0, 0x43e2, 0x43e5, 0x43e7, 0x43e9, - 0x43ec, 0x43ee, 0x43f1, 0x43f3, 0x43f6, 0x43f8, 0x43fa, 0x43fd, - 0x43ff, 0x4401, 0x4402, 0x4403, 0x4404, 0x4406, 0x4407, 0x4408, - 0x4409, 0x440b, 0x440c, 0x440d, 0x440e, 0x440f, 0x4411, 0x4412, - 0x4413, 0x4414, 0x4415, 0x4417, 0x4418, 0x4419, 0x441a, 0x441b, - 0x441d, 0x441e, 0x441f, 0x4420, 0x4421, 0x4423, 0x4424, 0x4425, - 0x4426, 0x4427, 0x4428, 0x442a, 0x442b, 0x442c, 0x442d, 0x442e, - 0x4430, 0x4431, 0x4432, 0x4433, 0x4434, 0x4436, 0x4437, 0x4438, - 0x4439, 0x443a, 0x443b, 0x443d, 0x443e, 0x443f, 0x4440, 0x4441, - 0x4442, 0x4444, 0x4445, 0x4446, 0x4447, 0x4448, 0x444a, 0x444b, - 0x444c, 0x444d, 0x444e, 0x444f, 0x4451, 0x4452, 0x4453, 0x4454, - 0x4455, 0x4456, 0x4458, 0x4459, 0x445a, 0x445b, 0x445c, 0x445d, - 0x445e, 0x4460, 0x4461, 0x4462, 0x4463, 0x4464, 0x4465, 0x4467, - 0x4468, 0x4469, 0x446a, 0x446b, 0x446c, 0x446d, 0x446f, 0x4470, - 0x4471, 0x4472, 0x4473, 0x4474, 0x4476, 0x4477, 0x4478, 0x4479, - 0x447a, 0x447b, 0x447c, 0x447e, 0x447f, 0x4480, 0x4481, 0x4482, - 0x4483, 0x4484, 0x4485, 0x4487, 0x4488, 0x4489, 0x448a, 0x448b, - 0x448c, 0x448d, 0x448f, 0x4490, 0x4491, 0x4492, 0x4493, 0x4494, - 0x4495, 0x4496, 0x4498, 0x4499, 0x449a, 0x449b, 0x449c, 0x449d, - 0x449e, 0x449f, 0x44a1, 0x44a2, 0x44a3, 0x44a4, 0x44a5, 0x44a6, - 0x44a7, 0x44a8, 0x44aa, 0x44ab, 0x44ac, 0x44ad, 0x44ae, 0x44af, - 0x44b0, 0x44b1, 0x44b2, 0x44b4, 0x44b5, 0x44b6, 0x44b7, 0x44b8, - 0x44b9, 0x44ba, 0x44bb, 0x44bc, 0x44be, 0x44bf, 0x44c0, 0x44c1, - 0x44c2, 0x44c3, 0x44c4, 0x44c5, 0x44c6, 0x44c7, 0x44c9, 0x44ca, - 0x44cb, 0x44cc, 0x44cd, 0x44ce, 0x44cf, 0x44d0, 0x44d1, 0x44d2, - 0x44d4, 0x44d5, 0x44d6, 0x44d7, 0x44d8, 0x44d9, 0x44da, 0x44db, - 0x44dc, 0x44dd, 0x44de, 0x44e0, 0x44e1, 0x44e2, 0x44e3, 0x44e4, - 0x44e5, 0x44e6, 0x44e7, 0x44e8, 0x44e9, 0x44ea, 0x44eb, 0x44ed, - 0x44ee, 0x44ef, 0x44f0, 0x44f1, 0x44f2, 0x44f3, 0x44f4, 0x44f5, - 0x44f6, 0x44f7, 0x44f8, 0x44f9, 0x44fb, 0x44fc, 0x44fd, 0x44fe, - 0x44ff, 0x4500, 0x4501, 0x4502, 0x4503, 0x4504, 0x4505, 0x4506, - 0x4507, 0x4508, 0x450a, 0x450b, 0x450c, 0x450d, 0x450e, 0x450f, - 0x4510, 0x4511, 0x4512, 0x4513, 0x4514, 0x4515, 0x4516, 0x4517, - 0x4518, 0x4519, 0x451b, 0x451c, 0x451d, 0x451e, 0x451f, 0x4520, - 0x4521, 0x4522, 0x4523, 0x4524, 0x4525, 0x4526, 0x4527, 0x4528, - 0x4529, 0x452a, 0x452b, 0x452c, 0x452d, 0x452e, 0x4530, 0x4531, - 0x4532, 0x4533, 0x4534, 0x4535, 0x4536, 0x4537, 0x4538, 0x4539, - 0x453a, 0x453b, 0x453c, 0x453d, 0x453e, 0x453f, 0x4540, 0x4541, - 0x4542, 0x4543, 0x4544, 0x4545, 0x4546, 0x4547, 0x4548, 0x454a, - 0x454b, 0x454c, 0x454d, 0x454e, 0x454f, 0x4550, 0x4551, 0x4552, - 0x4553, 0x4554, 0x4555, 0x4556, 0x4557, 0x4558, 0x4559, 0x455a, - 0x455b, 0x455c, 0x455d, 0x455e, 0x455f, 0x4560, 0x4561, 0x4562, - 0x4563, 0x4564, 0x4565, 0x4566, 0x4567, 0x4568, 0x4569, 0x456a, - 0x456b, 0x456c, 0x456d, 0x456e, 0x456f, 0x4570, 0x4571, 0x4572, - 0x4573, 0x4574, 0x4575, 0x4576, 0x4577, 0x4578, 0x4579, 0x457a, - 0x457c, 0x457d, 0x457e, 0x457f, 0x4580, 0x4581, 0x4582, 0x4583, - 0x4584, 0x4585, 0x4586, 0x4587, 0x4588, 0x4589, 0x458a, 0x458b, - 0x458c, 0x458e, 0x4590, 0x4592, 0x4594, 0x4596, 0x4598, 0x459a, - 0x459c, 0x459d, 0x459f, 0x45a1, 0x45a3, 0x45a5, 0x45a7, 0x45a9, - 0x45ab, 0x45ad, 0x45af, 0x45b1, 0x45b3, 0x45b5, 0x45b7, 0x45b9, - 0x45bb, 0x45bd, 0x45bf, 0x45c1, 0x45c3, 0x45c5, 0x45c7, 0x45c9, - 0x45cb, 0x45cd, 0x45ce, 0x45d0, 0x45d2, 0x45d4, 0x45d6, 0x45d8, - 0x45da, 0x45dc, 0x45de, 0x45e0, 0x45e2, 0x45e4, 0x45e6, 0x45e7, - 0x45e9, 0x45eb, 0x45ed, 0x45ef, 0x45f1, 0x45f3, 0x45f5, 0x45f7, - 0x45f9, 0x45fb, 0x45fc, 0x45fe, 0x4600, 0x4602, 0x4604, 0x4606, - 0x4608, 0x460a, 0x460b, 0x460d, 0x460f, 0x4611, 0x4613, 0x4615, - 0x4617, 0x4619, 0x461a, 0x461c, 0x461e, 0x4620, 0x4622, 0x4624, - 0x4626, 0x4627, 0x4629, 0x462b, 0x462d, 0x462f, 0x4631, 0x4633, - 0x4634, 0x4636, 0x4638, 0x463a, 0x463c, 0x463e, 0x463f, 0x4641, - 0x4643, 0x4645, 0x4647, 0x4649, 0x464a, 0x464c, 0x464e, 0x4650, - 0x4652, 0x4653, 0x4655, 0x4657, 0x4659, 0x465b, 0x465d, 0x465e, - 0x4660, 0x4662, 0x4664, 0x4666, 0x4667, 0x4669, 0x466b, 0x466d, - 0x466f, 0x4670, 0x4672, 0x4674, 0x4676, 0x4677, 0x4679, 0x467b, - 0x467d, 0x467f, 0x4680, 0x4682, 0x4684, 0x4686, 0x4687, 0x4689, - 0x468b, 0x468d, 0x468e, 0x4690, 0x4692, 0x4694, 0x4696, 0x4697, - 0x4699, 0x469b, 0x469d, 0x469e, 0x46a0, 0x46a2, 0x46a4, 0x46a5, - 0x46a7, 0x46a9, 0x46aa, 0x46ac, 0x46ae, 0x46b0, 0x46b1, 0x46b3, - 0x46b5, 0x46b7, 0x46b8, 0x46ba, 0x46bc, 0x46be, 0x46bf, 0x46c1, - 0x46c3, 0x46c4, 0x46c6, 0x46c8, 0x46ca, 0x46cb, 0x46cd, 0x46cf, - 0x46d0, 0x46d2, 0x46d4, 0x46d6, 0x46d7, 0x46d9, 0x46db, 0x46dc, - 0x46de, 0x46e0, 0x46e1, 0x46e3, 0x46e5, 0x46e6, 0x46e8, 0x46ea, - 0x46ec, 0x46ed, 0x46ef, 0x46f1, 0x46f2, 0x46f4, 0x46f6, 0x46f7, - 0x46f9, 0x46fb, 0x46fc, 0x46fe, 0x4700, 0x4701, 0x4703, 0x4705, - 0x4706, 0x4708, 0x470a, 0x470b, 0x470d, 0x470f, 0x4710, 0x4712, - 0x4714, 0x4715, 0x4717, 0x4718, 0x471a, 0x471c, 0x471d, 0x471f, - 0x4721, 0x4722, 0x4724, 0x4726, 0x4727, 0x4729, 0x472b, 0x472c, - 0x472e, 0x472f, 0x4731, 0x4733, 0x4734, 0x4736, 0x4738, 0x4739, - 0x473b, 0x473c, 0x473e, 0x4740, 0x4741, 0x4743, 0x4745, 0x4746, - 0x4748, 0x4749, 0x474b, 0x474d, 0x474e, 0x4750, 0x4751, 0x4753, - 0x4755, 0x4756, 0x4758, 0x4759, 0x475b, 0x475d, 0x475e, 0x4760, - 0x4761, 0x4763, 0x4765, 0x4766, 0x4768, 0x4769, 0x476b, 0x476c, - 0x476e, 0x4770, 0x4771, 0x4773, 0x4774, 0x4776, 0x4777, 0x4779, - 0x477b, 0x477c, 0x477e, 0x477f, 0x4781, 0x4782, 0x4784, 0x4786, - 0x4787, 0x4789, 0x478a, 0x478c, 0x478d, 0x478f, 0x4790, 0x4792, - 0x4794, 0x4795, 0x4797, 0x4798, 0x479a, 0x479b, 0x479d, 0x479e, - 0x47a0, 0x47a2, 0x47a3, 0x47a5, 0x47a6, 0x47a8, 0x47a9, 0x47ab, - 0x47ac, 0x47ae, 0x47af, 0x47b1, 0x47b2, 0x47b4, 0x47b5, 0x47b7, - 0x47b8, 0x47ba, 0x47bc, 0x47bd, 0x47bf, 0x47c0, 0x47c2, 0x47c3, - 0x47c5, 0x47c6, 0x47c8, 0x47c9, 0x47cb, 0x47cc, 0x47ce, 0x47cf, - 0x47d1, 0x47d2, 0x47d4, 0x47d5, 0x47d7, 0x47d8, 0x47da, 0x47db, - 0x47dd, 0x47de, 0x47e0, 0x47e1, 0x47e3, 0x47e4, 0x47e6, 0x47e7, - 0x47e9, 0x47ea, 0x47ec, 0x47ed, 0x47ef, 0x47f0, 0x47f2, 0x47f3, - 0x47f5, 0x47f6, 0x47f8, 0x47f9, 0x47fa, 0x47fc, 0x47fd, 0x47ff, - 0x4800, 0x4801, 0x4802, 0x4802, 0x4803, 0x4804, 0x4805, 0x4805, - 0x4806, 0x4807, 0x4808, 0x4808, 0x4809, 0x480a, 0x480a, 0x480b, - 0x480c, 0x480d, 0x480d, 0x480e, 0x480f, 0x4810, 0x4810, 0x4811, - 0x4812, 0x4812, 0x4813, 0x4814, 0x4815, 0x4815, 0x4816, 0x4817, - 0x4817, 0x4818, 0x4819, 0x481a, 0x481a, 0x481b, 0x481c, 0x481c, - 0x481d, 0x481e, 0x481f, 0x481f, 0x4820, 0x4821, 0x4821, 0x4822, - 0x4823, 0x4824, 0x4824, 0x4825, 0x4826, 0x4826, 0x4827, 0x4828, - 0x4829, 0x4829, 0x482a, 0x482b, 0x482b, 0x482c, 0x482d, 0x482e, - 0x482e, 0x482f, 0x4830, 0x4830, 0x4831, 0x4832, 0x4832, 0x4833, - 0x4834, 0x4835, 0x4835, 0x4836, 0x4837, 0x4837, 0x4838, 0x4839, - 0x4839, 0x483a, 0x483b, 0x483b, 0x483c, 0x483d, 0x483e, 0x483e, - 0x483f, 0x4840, 0x4840, 0x4841, 0x4842, 0x4842, 0x4843, 0x4844, - 0x4844, 0x4845, 0x4846, 0x4847, 0x4847, 0x4848, 0x4849, 0x4849, - 0x484a, 0x484b, 0x484b, 0x484c, 0x484d, 0x484d, 0x484e, 0x484f, - 0x484f, 0x4850, 0x4851, 0x4851, 0x4852, 0x4853, 0x4853, 0x4854, - 0x4855, 0x4856, 0x4856, 0x4857, 0x4858, 0x4858, 0x4859, 0x485a, - 0x485a, 0x485b, 0x485c, 0x485c, 0x485d, 0x485e, 0x485e, 0x485f, - 0x4860, 0x4860, 0x4861, 0x4862, 0x4862, 0x4863, 0x4864, 0x4864, - 0x4865, 0x4866, 0x4866, 0x4867, 0x4868, 0x4868, 0x4869, 0x486a, - 0x486a, 0x486b, 0x486c, 0x486c, 0x486d, 0x486e, 0x486e, 0x486f, - 0x4870, 0x4870, 0x4871, 0x4872, 0x4872, 0x4873, 0x4874, 0x4874, - 0x4875, 0x4876, 0x4876, 0x4877, 0x4877, 0x4878, 0x4879, 0x4879, - 0x487a, 0x487b, 0x487b, 0x487c, 0x487d, 0x487d, 0x487e, 0x487f, - 0x487f, 0x4880, 0x4881, 0x4881, 0x4882, 0x4883, 0x4883, 0x4884, - 0x4884, 0x4885, 0x4886, 0x4886, 0x4887, 0x4888, 0x4888, 0x4889, - 0x488a, 0x488a, 0x488b, 0x488c, 0x488c, 0x488d, 0x488d, 0x488e, - 0x488f, 0x488f, 0x4890, 0x4891, 0x4891, 0x4892, 0x4893, 0x4893, - 0x4894, 0x4895, 0x4895, 0x4896, 0x4896, 0x4897, 0x4898, 0x4898, - 0x4899, 0x489a, 0x489a, 0x489b, 0x489c, 0x489c, 0x489d, 0x489d, - 0x489e, 0x489f, 0x489f, 0x48a0, 0x48a1, 0x48a1, 0x48a2, 0x48a2, - 0x48a3, 0x48a4, 0x48a4, 0x48a5, 0x48a6, 0x48a6, 0x48a7, 0x48a7, - 0x48a8, 0x48a9, 0x48a9, 0x48aa, 0x48ab, 0x48ab, 0x48ac, 0x48ac, - 0x48ad, 0x48ae, 0x48ae, 0x48af, 0x48b0, 0x48b0, 0x48b1, 0x48b1, - 0x48b2, 0x48b3, 0x48b3, 0x48b4, 0x48b4, 0x48b5, 0x48b6, 0x48b6, - 0x48b7, 0x48b8, 0x48b8, 0x48b9, 0x48b9, 0x48ba, 0x48bb, 0x48bb, - 0x48bc, 0x48bc, 0x48bd, 0x48be, 0x48be, 0x48bf, 0x48c0, 0x48c0, - 0x48c1, 0x48c1, 0x48c2, 0x48c3, 0x48c3, 0x48c4, 0x48c4, 0x48c5, - 0x48c6, 0x48c6, 0x48c7, 0x48c7, 0x48c8, 0x48c9, 0x48c9, 0x48ca, - 0x48ca, 0x48cb, 0x48cc, 0x48cc, 0x48cd, 0x48cd, 0x48ce, 0x48cf, - 0x48cf, 0x48d0, 0x48d0, 0x48d1, 0x48d2, 0x48d2, 0x48d3, 0x48d3, - 0x48d4, 0x48d5, 0x48d5, 0x48d6, 0x48d6, 0x48d7, 0x48d8, 0x48d8, - 0x48d9, 0x48d9, 0x48da, 0x48db, 0x48db, 0x48dc, 0x48dc, 0x48dd, - 0x48de, 0x48de, 0x48df, 0x48df, 0x48e0, 0x48e1, 0x48e1, 0x48e2, - 0x48e2, 0x48e3, 0x48e3, 0x48e4, 0x48e5, 0x48e5, 0x48e6, 0x48e6, - 0x48e7, 0x48e8, 0x48e8, 0x48e9, 0x48e9, 0x48ea, 0x48eb, 0x48eb, - 0x48ec, 0x48ec, 0x48ed, 0x48ed, 0x48ee, 0x48ef, 0x48ef, 0x48f0, - 0x48f0, 0x48f1, 0x48f2, 0x48f2, 0x48f3, 0x48f3, 0x48f4, 0x48f4, - 0x48f5, 0x48f6, 0x48f6, 0x48f7, 0x48f7, 0x48f8, 0x48f8, 0x48f9, - 0x48fa, 0x48fa, 0x48fb, 0x48fb, 0x48fc, 0x48fd, 0x48fd, 0x48fe, - 0x48fe, 0x48ff, 0x48ff, 0x4900, 0x4901, 0x4901, 0x4902, 0x4902, - 0x4903, 0x4903, 0x4904, 0x4905, 0x4905, 0x4906, 0x4906, 0x4907, - 0x4907, 0x4908, 0x4909, 0x4909, 0x490a, 0x490a, 0x490b, 0x490b, - 0x490c, 0x490c, 0x490d, 0x490e, 0x490e, 0x490f, 0x490f, 0x4910, - 0x4910, 0x4911, 0x4912, 0x4912, 0x4913, 0x4913, 0x4914, 0x4914, - 0x4915, 0x4916, 0x4916, 0x4917, 0x4917, 0x4918, 0x4918, 0x4919, - 0x4919, 0x491a, 0x491b, 0x491b, 0x491c, 0x491c, 0x491d, 0x491d, - 0x491e, 0x491e, 0x491f, 0x4920, 0x4920, 0x4921, 0x4921, 0x4922, - 0x4922, 0x4923, 0x4923, 0x4924, 0x4925, 0x4925, 0x4926, 0x4926, - 0x4927, 0x4927, 0x4928, 0x4928, 0x4929, 0x492a, 0x492a, 0x492b, - 0x492b, 0x492c, 0x492c, 0x492d, 0x492d, 0x492e, 0x492e, 0x492f, - 0x4930, 0x4930, 0x4931, 0x4931, 0x4932, 0x4932, 0x4933, 0x4933, - 0x4934, 0x4934, 0x4935, 0x4936, 0x4936, 0x4937, 0x4937, 0x4938, - 0x4938, 0x4939, 0x4939, 0x493a, 0x493a, 0x493b, 0x493c, 0x493c, - 0x493d, 0x493d, 0x493e, 0x493e, 0x493f, 0x493f, 0x4940, 0x4940, - 0x4941, 0x4941, 0x4942, 0x4943, 0x4943, 0x4944, 0x4944, 0x4945, - 0x4945, 0x4946, 0x4946, 0x4947, 0x4947, 0x4948, 0x4948, 0x4949, - 0x4949, 0x494a, 0x494b, 0x494b, 0x494c, 0x494c, 0x494d, 0x494d, - 0x494e, 0x494e, 0x494f, 0x494f, 0x4950, 0x4950, 0x4951, 0x4951, - 0x4952, 0x4953, 0x4953, 0x4954, 0x4954, 0x4955, 0x4955, 0x4956, - 0x4956, 0x4957, 0x4957, 0x4958, 0x4958, 0x4959, 0x4959, 0x495a, - 0x495a, 0x495b, 0x495b, 0x495c, 0x495d, 0x495d, 0x495e, 0x495e, - 0x495f, 0x495f, 0x4960, 0x4960, 0x4961, 0x4961, 0x4962, 0x4962, - 0x4963, 0x4963, 0x4964, 0x4964, 0x4965, 0x4965, 0x4966, 0x4966, - 0x4967, 0x4967, 0x4968, 0x4968, 0x4969, 0x496a, 0x496a, 0x496b, - 0x496b, 0x496c, 0x496c, 0x496d, 0x496d, 0x496e, 0x496e, 0x496f, - 0x496f, 0x4970, 0x4970, 0x4971, 0x4971, 0x4972, 0x4972, 0x4973, - 0x4973, 0x4974, 0x4974, 0x4975, 0x4975, 0x4976, 0x4976, 0x4977, - 0x4977, 0x4978, 0x4978, 0x4979, 0x4979, 0x497a, 0x497a, 0x497b, - 0x497b, 0x497c, 0x497c, 0x497d, 0x497d, 0x497e, 0x497e, 0x497f, - 0x497f, 0x4980, 0x4981, 0x4981, 0x4982, 0x4982, 0x4983, 0x4983, - 0x4984, 0x4984, 0x4985, 0x4985, 0x4986, 0x4986, 0x4987, 0x4987, - 0x4988, 0x4988, 0x4989, 0x4989, 0x498a, 0x498a, 0x498b, 0x498b, - 0x498c, 0x498d, 0x498e, 0x498f, 0x4990, 0x4991, 0x4992, 0x4993, - 0x4994, 0x4995, 0x4996, 0x4997, 0x4997, 0x4998, 0x4999, 0x499a, - 0x499b, 0x499c, 0x499d, 0x499e, 0x499f, 0x49a0, 0x49a1, 0x49a2, - 0x49a3, 0x49a4, 0x49a5, 0x49a6, 0x49a7, 0x49a8, 0x49a9, 0x49aa, - 0x49ab, 0x49ac, 0x49ad, 0x49ae, 0x49af, 0x49b0, 0x49b1, 0x49b2, - 0x49b3, 0x49b4, 0x49b5, 0x49b6, 0x49b7, 0x49b8, 0x49b9, 0x49ba, - 0x49ba, 0x49bb, 0x49bc, 0x49bd, 0x49be, 0x49bf, 0x49c0, 0x49c1, - 0x49c2, 0x49c3, 0x49c4, 0x49c5, 0x49c6, 0x49c7, 0x49c8, 0x49c9, - 0x49ca, 0x49cb, 0x49cc, 0x49cc, 0x49cd, 0x49ce, 0x49cf, 0x49d0, - 0x49d1, 0x49d2, 0x49d3, 0x49d4, 0x49d5, 0x49d6, 0x49d7, 0x49d8, - 0x49d9, 0x49da, 0x49da, 0x49db, 0x49dc, 0x49dd, 0x49de, 0x49df, - 0x49e0, 0x49e1, 0x49e2, 0x49e3, 0x49e4, 0x49e5, 0x49e5, 0x49e6, - 0x49e7, 0x49e8, 0x49e9, 0x49ea, 0x49eb, 0x49ec, 0x49ed, 0x49ee, - 0x49ef, 0x49f0, 0x49f0, 0x49f1, 0x49f2, 0x49f3, 0x49f4, 0x49f5, - 0x49f6, 0x49f7, 0x49f8, 0x49f9, 0x49f9, 0x49fa, 0x49fb, 0x49fc, - 0x49fd, 0x49fe, 0x49ff, 0x4a00, 0x4a01, 0x4a02, 0x4a02, 0x4a03, - 0x4a04, 0x4a05, 0x4a06, 0x4a07, 0x4a08, 0x4a09, 0x4a09, 0x4a0a, - 0x4a0b, 0x4a0c, 0x4a0d, 0x4a0e, 0x4a0f, 0x4a10, 0x4a11, 0x4a11, - 0x4a12, 0x4a13, 0x4a14, 0x4a15, 0x4a16, 0x4a17, 0x4a18, 0x4a18, - 0x4a19, 0x4a1a, 0x4a1b, 0x4a1c, 0x4a1d, 0x4a1e, 0x4a1f, 0x4a1f, - 0x4a20, 0x4a21, 0x4a22, 0x4a23, 0x4a24, 0x4a25, 0x4a25, 0x4a26, - 0x4a27, 0x4a28, 0x4a29, 0x4a2a, 0x4a2b, 0x4a2b, 0x4a2c, 0x4a2d, - 0x4a2e, 0x4a2f, 0x4a30, 0x4a31, 0x4a31, 0x4a32, 0x4a33, 0x4a34, - 0x4a35, 0x4a36, 0x4a36, 0x4a37, 0x4a38, 0x4a39, 0x4a3a, 0x4a3b, - 0x4a3c, 0x4a3c, 0x4a3d, 0x4a3e, 0x4a3f, 0x4a40, 0x4a41, 0x4a41, - 0x4a42, 0x4a43, 0x4a44, 0x4a45, 0x4a46, 0x4a46, 0x4a47, 0x4a48, - 0x4a49, 0x4a4a, 0x4a4b, 0x4a4b, 0x4a4c, 0x4a4d, 0x4a4e, 0x4a4f, - 0x4a50, 0x4a50, 0x4a51, 0x4a52, 0x4a53, 0x4a54, 0x4a54, 0x4a55, - 0x4a56, 0x4a57, 0x4a58, 0x4a59, 0x4a59, 0x4a5a, 0x4a5b, 0x4a5c, - 0x4a5d, 0x4a5d, 0x4a5e, 0x4a5f, 0x4a60, 0x4a61, 0x4a62, 0x4a62, - 0x4a63, 0x4a64, 0x4a65, 0x4a66, 0x4a66, 0x4a67, 0x4a68, 0x4a69, - 0x4a6a, 0x4a6a, 0x4a6b, 0x4a6c, 0x4a6d, 0x4a6e, 0x4a6e, 0x4a6f, - 0x4a70, 0x4a71, 0x4a72, 0x4a72, 0x4a73, 0x4a74, 0x4a75, 0x4a76, - 0x4a76, 0x4a77, 0x4a78, 0x4a79, 0x4a7a, 0x4a7a, 0x4a7b, 0x4a7c, - 0x4a7d, 0x4a7e, 0x4a7e, 0x4a7f, 0x4a80, 0x4a81, 0x4a82, 0x4a82, - 0x4a83, 0x4a84, 0x4a85, 0x4a85, 0x4a86, 0x4a87, 0x4a88, 0x4a89, - 0x4a89, 0x4a8a, 0x4a8b, 0x4a8c, 0x4a8c, 0x4a8d, 0x4a8e, 0x4a8f, - 0x4a90, 0x4a90, 0x4a91, 0x4a92, 0x4a93, 0x4a93, 0x4a94, 0x4a95, - 0x4a96, 0x4a97, 0x4a97, 0x4a98, 0x4a99, 0x4a9a, 0x4a9a, 0x4a9b, - 0x4a9c, 0x4a9d, 0x4a9d, 0x4a9e, 0x4a9f, 0x4aa0, 0x4aa1, 0x4aa1, - 0x4aa2, 0x4aa3, 0x4aa4, 0x4aa4, 0x4aa5, 0x4aa6, 0x4aa7, 0x4aa7, - 0x4aa8, 0x4aa9, 0x4aaa, 0x4aaa, 0x4aab, 0x4aac, 0x4aad, 0x4aad, - 0x4aae, 0x4aaf, 0x4ab0, 0x4ab0, 0x4ab1, 0x4ab2, 0x4ab3, 0x4ab3, - 0x4ab4, 0x4ab5, 0x4ab6, 0x4ab6, 0x4ab7, 0x4ab8, 0x4ab9, 0x4ab9, - 0x4aba, 0x4abb, 0x4abc, 0x4abc, 0x4abd, 0x4abe, 0x4abf, 0x4abf, - 0x4ac0, 0x4ac1, 0x4ac2, 0x4ac2, 0x4ac3, 0x4ac4, 0x4ac4, 0x4ac5, - 0x4ac6, 0x4ac7, 0x4ac7, 0x4ac8, 0x4ac9, 0x4aca, 0x4aca, 0x4acb, - 0x4acc, 0x4acd, 0x4acd, 0x4ace, 0x4acf, 0x4acf, 0x4ad0, 0x4ad1, - 0x4ad2, 0x4ad2, 0x4ad3, 0x4ad4, 0x4ad5, 0x4ad5, 0x4ad6, 0x4ad7, - 0x4ad7, 0x4ad8, 0x4ad9, 0x4ada, 0x4ada, 0x4adb, 0x4adc, 0x4add, - 0x4add, 0x4ade, 0x4adf, 0x4adf, 0x4ae0, 0x4ae1, 0x4ae2, 0x4ae2, - 0x4ae3, 0x4ae4, 0x4ae4, 0x4ae5, 0x4ae6, 0x4ae7, 0x4ae7, 0x4ae8, - 0x4ae9, 0x4ae9, 0x4aea, 0x4aeb, 0x4aec, 0x4aec, 0x4aed, 0x4aee, - 0x4aee, 0x4aef, 0x4af0, 0x4af0, 0x4af1, 0x4af2, 0x4af3, 0x4af3, - 0x4af4, 0x4af5, 0x4af5, 0x4af6, 0x4af7, 0x4af7, 0x4af8, 0x4af9, - 0x4afa, 0x4afa, 0x4afb, 0x4afc, 0x4afc, 0x4afd, 0x4afe, 0x4afe, - 0x4aff, 0x4b00, 0x4b01, 0x4b01, 0x4b02, 0x4b03, 0x4b03, 0x4b04, - 0x4b05, 0x4b05, 0x4b06, 0x4b07, 0x4b07, 0x4b08, 0x4b09, 0x4b0a, - 0x4b0a, 0x4b0b, 0x4b0c, 0x4b0c, 0x4b0d, 0x4b0e, 0x4b0e, 0x4b0f, - 0x4b10, 0x4b10, 0x4b11, 0x4b12, 0x4b12, 0x4b13, 0x4b14, 0x4b15, - 0x4b15, 0x4b16, 0x4b17, 0x4b17, 0x4b18, 0x4b19, 0x4b19, 0x4b1a, - 0x4b1b, 0x4b1b, 0x4b1c, 0x4b1d, 0x4b1d, 0x4b1e, 0x4b1f, 0x4b1f, - 0x4b20, 0x4b21, 0x4b21, 0x4b22, 0x4b23, 0x4b23, 0x4b24, 0x4b25, - 0x4b25, 0x4b26, 0x4b27, 0x4b27, 0x4b28, 0x4b29, 0x4b29, 0x4b2a, - 0x4b2b, 0x4b2b, 0x4b2c, 0x4b2d, 0x4b2d, 0x4b2e, 0x4b2f, 0x4b2f, - 0x4b30, 0x4b31, 0x4b31, 0x4b32, 0x4b33, 0x4b33, 0x4b34, 0x4b35, - 0x4b35, 0x4b36, 0x4b37, 0x4b37, 0x4b38, 0x4b39, 0x4b39, 0x4b3a, - 0x4b3b, 0x4b3b, 0x4b3c, 0x4b3d, 0x4b3d, 0x4b3e, 0x4b3f, 0x4b3f, - 0x4b40, 0x4b41, 0x4b41, 0x4b42, 0x4b42, 0x4b43, 0x4b44, 0x4b44, - 0x4b45, 0x4b46, 0x4b46, 0x4b47, 0x4b48, 0x4b48, 0x4b49, 0x4b4a, - 0x4b4a, 0x4b4b, 0x4b4c, 0x4b4c, 0x4b4d, 0x4b4d, 0x4b4e, 0x4b4f, - 0x4b4f, 0x4b50, 0x4b51, 0x4b51, 0x4b52, 0x4b53, 0x4b53, 0x4b54, - 0x4b55, 0x4b55, 0x4b56, 0x4b56, 0x4b57, 0x4b58, 0x4b58, 0x4b59, - 0x4b5a, 0x4b5a, 0x4b5b, 0x4b5c, 0x4b5c, 0x4b5d, 0x4b5d, 0x4b5e, - 0x4b5f, 0x4b5f, 0x4b60, 0x4b61, 0x4b61, 0x4b62, 0x4b63, 0x4b63, - 0x4b64, 0x4b64, 0x4b65, 0x4b66, 0x4b66, 0x4b67, 0x4b68, 0x4b68, - 0x4b69, 0x4b69, 0x4b6a, 0x4b6b, 0x4b6b, 0x4b6c, 0x4b6d, 0x4b6d, - 0x4b6e, 0x4b6e, 0x4b6f, 0x4b70, 0x4b70, 0x4b71, 0x4b72, 0x4b72, - 0x4b73, 0x4b73, 0x4b74, 0x4b75, 0x4b75, 0x4b76, 0x4b77, 0x4b77, - 0x4b78, 0x4b78, 0x4b79, 0x4b7a, 0x4b7a, 0x4b7b, 0x4b7b, 0x4b7c, - 0x4b7d, 0x4b7d, 0x4b7e, 0x4b7f, 0x4b7f, 0x4b80, 0x4b80, 0x4b81, - 0x4b82, 0x4b82, 0x4b83, 0x4b83, 0x4b84, 0x4b85, 0x4b85, 0x4b86, - 0x4b87, 0x4b87, 0x4b88, 0x4b88, 0x4b89, 0x4b8a, 0x4b8a, 0x4b8b, - 0x4b8b, 0x4b8c, 0x4b8d, 0x4b8d, 0x4b8e, 0x4b8e, 0x4b8f, 0x4b90, - 0x4b90, 0x4b91, 0x4b91, 0x4b92, 0x4b93, 0x4b93, 0x4b94, 0x4b94, - 0x4b95, 0x4b96, 0x4b96, 0x4b97, 0x4b97, 0x4b98, 0x4b99, 0x4b99, - 0x4b9a, 0x4b9a, 0x4b9b, 0x4b9c, 0x4b9c, 0x4b9d, 0x4b9d, 0x4b9e, - 0x4b9f, 0x4b9f, 0x4ba0, 0x4ba0, 0x4ba1, 0x4ba2, 0x4ba2, 0x4ba3, - 0x4ba3, 0x4ba4, 0x4ba5, 0x4ba5, 0x4ba6, 0x4ba6, 0x4ba7, 0x4ba8, - 0x4ba8, 0x4ba9, 0x4ba9, 0x4baa, 0x4baa, 0x4bab, 0x4bac, 0x4bac, - 0x4bad, 0x4bad, 0x4bae, 0x4baf, 0x4baf, 0x4bb0, 0x4bb0, 0x4bb1, - 0x4bb1, 0x4bb2, 0x4bb3, 0x4bb3, 0x4bb4, 0x4bb4, 0x4bb5, 0x4bb6, - 0x4bb6, 0x4bb7, 0x4bb7, 0x4bb8, 0x4bb8, 0x4bb9, 0x4bba, 0x4bba, - 0x4bbb, 0x4bbb, 0x4bbc, 0x4bbd, 0x4bbd, 0x4bbe, 0x4bbe, 0x4bbf, - 0x4bbf, 0x4bc0, 0x4bc1, 0x4bc1, 0x4bc2, 0x4bc2, 0x4bc3, 0x4bc3, - 0x4bc4, 0x4bc5, 0x4bc5, 0x4bc6, 0x4bc6, 0x4bc7, 0x4bc7, 0x4bc8, - 0x4bc9, 0x4bc9, 0x4bca, 0x4bca, 0x4bcb, 0x4bcb, 0x4bcc, 0x4bcd, - 0x4bcd, 0x4bce, 0x4bce, 0x4bcf, 0x4bcf, 0x4bd0, 0x4bd1, 0x4bd1, - 0x4bd2, 0x4bd2, 0x4bd3, 0x4bd3, 0x4bd4, 0x4bd5, 0x4bd5, 0x4bd6, - 0x4bd6, 0x4bd7, 0x4bd7, 0x4bd8, 0x4bd8, 0x4bd9, 0x4bda, 0x4bda, - 0x4bdb, 0x4bdb, 0x4bdc, 0x4bdc, 0x4bdd, 0x4bde, 0x4bde, 0x4bdf, - 0x4bdf, 0x4be0, 0x4be0, 0x4be1, 0x4be1, 0x4be2, 0x4be3, 0x4be3, - 0x4be4, 0x4be4, 0x4be5, 0x4be5, 0x4be6, 0x4be6, 0x4be7, 0x4be8, - 0x4be8, 0x4be9, 0x4be9, 0x4bea, 0x4bea, 0x4beb, 0x4beb, 0x4bec, - 0x4bed, 0x4bed, 0x4bee, 0x4bee, 0x4bef, 0x4bef, 0x4bf0, 0x4bf0, - 0x4bf1, 0x4bf1, 0x4bf2, 0x4bf3, 0x4bf3, 0x4bf4, 0x4bf4, 0x4bf5, - 0x4bf5, 0x4bf6, 0x4bf6, 0x4bf7, 0x4bf8, 0x4bf8, 0x4bf9, 0x4bf9, - 0x4bfa, 0x4bfa, 0x4bfb, 0x4bfb, 0x4bfc, 0x4bfc, 0x4bfd, 0x4bfe, - 0x4bfe, 0x4bff, 0x4bff, 0x4c00, 0x4c00, 0x4c00, 0x4c01, 0x4c01, - 0x4c01, 0x4c01, 0x4c02, 0x4c02, 0x4c02, 0x4c03, 0x4c03, 0x4c03, - 0x4c03, 0x4c04, 0x4c04, 0x4c04, 0x4c04, 0x4c05, 0x4c05, 0x4c05, - 0x4c05, 0x4c06, 0x4c06, 0x4c06, 0x4c07, 0x4c07, 0x4c07, 0x4c07, - 0x4c08, 0x4c08, 0x4c08, 0x4c08, 0x4c09, 0x4c09, 0x4c09, 0x4c09, - 0x4c0a, 0x4c0a, 0x4c0a, 0x4c0b, 0x4c0b, 0x4c0b, 0x4c0b, 0x4c0c, - 0x4c0c, 0x4c0c, 0x4c0c, 0x4c0d, 0x4c0d, 0x4c0d, 0x4c0d, 0x4c0e, - 0x4c0e, 0x4c0e, 0x4c0f, 0x4c0f, 0x4c0f, 0x4c0f, 0x4c10, 0x4c10, - 0x4c10, 0x4c10, 0x4c11, 0x4c11, 0x4c11, 0x4c11, 0x4c12, 0x4c12, - 0x4c12, 0x4c12, 0x4c13, 0x4c13, 0x4c13, 0x4c13, 0x4c14, 0x4c14, - 0x4c14, 0x4c15, 0x4c15, 0x4c15, 0x4c15, 0x4c16, 0x4c16, 0x4c16, - 0x4c16, 0x4c17, 0x4c17, 0x4c17, 0x4c17, 0x4c18, 0x4c18, 0x4c18, - 0x4c18, 0x4c19, 0x4c19, 0x4c19, 0x4c19, 0x4c1a, 0x4c1a, 0x4c1a, - 0x4c1a, 0x4c1b, 0x4c1b, 0x4c1b, 0x4c1c, 0x4c1c, 0x4c1c, 0x4c1c, - 0x4c1d, 0x4c1d, 0x4c1d, 0x4c1d, 0x4c1e, 0x4c1e, 0x4c1e, 0x4c1e, - 0x4c1f, 0x4c1f, 0x4c1f, 0x4c1f, 0x4c20, 0x4c20, 0x4c20, 0x4c20, - 0x4c21, 0x4c21, 0x4c21, 0x4c21, 0x4c22, 0x4c22, 0x4c22, 0x4c22, - 0x4c23, 0x4c23, 0x4c23, 0x4c23, 0x4c24, 0x4c24, 0x4c24, 0x4c24, - 0x4c25, 0x4c25, 0x4c25, 0x4c25, 0x4c26, 0x4c26, 0x4c26, 0x4c26, - 0x4c27, 0x4c27, 0x4c27, 0x4c27, 0x4c28, 0x4c28, 0x4c28, 0x4c28, - 0x4c29, 0x4c29, 0x4c2a, 0x4c2a, 0x4c2b, 0x4c2b, 0x4c2c, 0x4c2c, - 0x4c2d, 0x4c2d, 0x4c2e, 0x4c2e, 0x4c2f, 0x4c2f, 0x4c30, 0x4c30, - 0x4c31, 0x4c31, 0x4c32, 0x4c32, 0x4c33, 0x4c33, 0x4c34, 0x4c34, - 0x4c35, 0x4c35, 0x4c36, 0x4c36, 0x4c36, 0x4c37, 0x4c37, 0x4c38, - 0x4c38, 0x4c39, 0x4c39, 0x4c3a, 0x4c3a, 0x4c3b, 0x4c3b, 0x4c3c, - 0x4c3c, 0x4c3d, 0x4c3d, 0x4c3e, 0x4c3e, 0x4c3f, 0x4c3f, 0x4c40, - 0x4c40, 0x4c41, 0x4c41, 0x4c42, 0x4c42, 0x4c43, 0x4c43, 0x4c43, - 0x4c44, 0x4c44, 0x4c45, 0x4c45, 0x4c46, 0x4c46, 0x4c47, 0x4c47, - 0x4c48, 0x4c48, 0x4c49, 0x4c49, 0x4c4a, 0x4c4a, 0x4c4b, 0x4c4b, - 0x4c4b, 0x4c4c, 0x4c4c, 0x4c4d, 0x4c4d, 0x4c4e, 0x4c4e, 0x4c4f, - 0x4c4f, 0x4c50, 0x4c50, 0x4c51, 0x4c51, 0x4c52, 0x4c52, 0x4c52, - 0x4c53, 0x4c53, 0x4c54, 0x4c54, 0x4c55, 0x4c55, 0x4c56, 0x4c56, - 0x4c57, 0x4c57, 0x4c57, 0x4c58, 0x4c58, 0x4c59, 0x4c59, 0x4c5a, - 0x4c5a, 0x4c5b, 0x4c5b, 0x4c5c, 0x4c5c, 0x4c5c, 0x4c5d, 0x4c5d, - 0x4c5e, 0x4c5e, 0x4c5f, 0x4c5f, 0x4c60, 0x4c60, 0x4c61, 0x4c61, - 0x4c61, 0x4c62, 0x4c62, 0x4c63, 0x4c63, 0x4c64, 0x4c64, 0x4c65, - 0x4c65, 0x4c65, 0x4c66, 0x4c66, 0x4c67, 0x4c67, 0x4c68, 0x4c68, - 0x4c69, 0x4c69, 0x4c69, 0x4c6a, 0x4c6a, 0x4c6b, 0x4c6b, 0x4c6c, - 0x4c6c, 0x4c6c, 0x4c6d, 0x4c6d, 0x4c6e, 0x4c6e, 0x4c6f, 0x4c6f, - 0x4c70, 0x4c70, 0x4c70, 0x4c71, 0x4c71, 0x4c72, 0x4c72, 0x4c73, - 0x4c73, 0x4c73, 0x4c74, 0x4c74, 0x4c75, 0x4c75, 0x4c76, 0x4c76, - 0x4c76, 0x4c77, 0x4c77, 0x4c78, 0x4c78, 0x4c79, 0x4c79, 0x4c79, - 0x4c7a, 0x4c7a, 0x4c7b, 0x4c7b, 0x4c7c, 0x4c7c, 0x4c7c, 0x4c7d, - 0x4c7d, 0x4c7e, 0x4c7e, 0x4c7f, 0x4c7f, 0x4c7f, 0x4c80, 0x4c80, - 0x4c81, 0x4c81, 0x4c82, 0x4c82, 0x4c82, 0x4c83, 0x4c83, 0x4c84, - 0x4c84, 0x4c84, 0x4c85, 0x4c85, 0x4c86, 0x4c86, 0x4c87, 0x4c87, - 0x4c87, 0x4c88, 0x4c88, 0x4c89, 0x4c89, 0x4c89, 0x4c8a, 0x4c8a, - 0x4c8b, 0x4c8b, 0x4c8b, 0x4c8c, 0x4c8c, 0x4c8d, 0x4c8d, 0x4c8e, - 0x4c8e, 0x4c8e, 0x4c8f, 0x4c8f, 0x4c90, 0x4c90, 0x4c90, 0x4c91, - 0x4c91, 0x4c92, 0x4c92, 0x4c92, 0x4c93, 0x4c93, 0x4c94, 0x4c94, - 0x4c94, 0x4c95, 0x4c95, 0x4c96, 0x4c96, 0x4c97, 0x4c97, 0x4c97, - 0x4c98, 0x4c98, 0x4c99, 0x4c99, 0x4c99, 0x4c9a, 0x4c9a, 0x4c9b, - 0x4c9b, 0x4c9b, 0x4c9c, 0x4c9c, 0x4c9d, 0x4c9d, 0x4c9d, 0x4c9e, - 0x4c9e, 0x4c9f, 0x4c9f, 0x4c9f, 0x4ca0, 0x4ca0, 0x4ca0, 0x4ca1, - 0x4ca1, 0x4ca2, 0x4ca2, 0x4ca2, 0x4ca3, 0x4ca3, 0x4ca4, 0x4ca4, - 0x4ca4, 0x4ca5, 0x4ca5, 0x4ca6, 0x4ca6, 0x4ca6, 0x4ca7, 0x4ca7, - 0x4ca8, 0x4ca8, 0x4ca8, 0x4ca9, 0x4ca9, 0x4caa, 0x4caa, 0x4caa, - 0x4cab, 0x4cab, 0x4cab, 0x4cac, 0x4cac, 0x4cad, 0x4cad, 0x4cad, - 0x4cae, 0x4cae, 0x4caf, 0x4caf, 0x4caf, 0x4cb0, 0x4cb0, 0x4cb0, - 0x4cb1, 0x4cb1, 0x4cb2, 0x4cb2, 0x4cb2, 0x4cb3, 0x4cb3, 0x4cb4, - 0x4cb4, 0x4cb4, 0x4cb5, 0x4cb5, 0x4cb5, 0x4cb6, 0x4cb6, 0x4cb7, - 0x4cb7, 0x4cb7, 0x4cb8, 0x4cb8, 0x4cb8, 0x4cb9, 0x4cb9, 0x4cba, - 0x4cba, 0x4cba, 0x4cbb, 0x4cbb, 0x4cbb, 0x4cbc, 0x4cbc, 0x4cbd, - 0x4cbd, 0x4cbd, 0x4cbe, 0x4cbe, 0x4cbe, 0x4cbf, 0x4cbf, 0x4cc0, - 0x4cc0, 0x4cc0, 0x4cc1, 0x4cc1, 0x4cc1, 0x4cc2, 0x4cc2, 0x4cc3, - 0x4cc3, 0x4cc3, 0x4cc4, 0x4cc4, 0x4cc4, 0x4cc5, 0x4cc5, 0x4cc6, - 0x4cc6, 0x4cc6, 0x4cc7, 0x4cc7, 0x4cc7, 0x4cc8, 0x4cc8, 0x4cc8, - 0x4cc9, 0x4cc9, 0x4cca, 0x4cca, 0x4cca, 0x4ccb, 0x4ccb, 0x4ccb, - 0x4ccc, 0x4ccc, 0x4ccc, 0x4ccd, 0x4ccd, 0x4cce, 0x4cce, 0x4cce, - 0x4ccf, 0x4ccf, 0x4ccf, 0x4cd0, 0x4cd0, 0x4cd0, 0x4cd1, 0x4cd1, - 0x4cd2, 0x4cd2, 0x4cd2, 0x4cd3, 0x4cd3, 0x4cd3, 0x4cd4, 0x4cd4, - 0x4cd4, 0x4cd5, 0x4cd5, 0x4cd5, 0x4cd6, 0x4cd6, 0x4cd7, 0x4cd7, - 0x4cd7, 0x4cd8, 0x4cd8, 0x4cd8, 0x4cd9, 0x4cd9, 0x4cd9, 0x4cda, - 0x4cda, 0x4cda, 0x4cdb, 0x4cdb, 0x4cdb, 0x4cdc, 0x4cdc, 0x4cdd, - 0x4cdd, 0x4cdd, 0x4cde, 0x4cde, 0x4cde, 0x4cdf, 0x4cdf, 0x4cdf, - 0x4ce0, 0x4ce0, 0x4ce0, 0x4ce1, 0x4ce1, 0x4ce1, 0x4ce2, 0x4ce2, - 0x4ce2, 0x4ce3, 0x4ce3, 0x4ce4, 0x4ce4, 0x4ce4, 0x4ce5, 0x4ce5, - 0x4ce5, 0x4ce6, 0x4ce6, 0x4ce6, 0x4ce7, 0x4ce7, 0x4ce7, 0x4ce8, - 0x4ce8, 0x4ce8, 0x4ce9, 0x4ce9, 0x4ce9, 0x4cea, 0x4cea, 0x4cea, - 0x4ceb, 0x4ceb, 0x4ceb, 0x4cec, 0x4cec, 0x4cec, 0x4ced, 0x4ced, - 0x4ced, 0x4cee, 0x4cee, 0x4cef, 0x4cef, 0x4cef, 0x4cf0, 0x4cf0, - 0x4cf0, 0x4cf1, 0x4cf1, 0x4cf1, 0x4cf2, 0x4cf2, 0x4cf2, 0x4cf3, - 0x4cf3, 0x4cf3, 0x4cf4, 0x4cf4, 0x4cf4, 0x4cf5, 0x4cf5, 0x4cf5, - 0x4cf6, 0x4cf6, 0x4cf6, 0x4cf7, 0x4cf7, 0x4cf7, 0x4cf8, 0x4cf8, - 0x4cf8, 0x4cf9, 0x4cf9, 0x4cf9, 0x4cfa, 0x4cfa, 0x4cfa, 0x4cfb, - 0x4cfb, 0x4cfb, 0x4cfc, 0x4cfc, 0x4cfc, 0x4cfd, 0x4cfd, 0x4cfd, - 0x4cfe, 0x4cfe, 0x4cfe, 0x4cff, 0x4cff, 0x4cff, 0x4d00, 0x4d00, - 0x4d00, 0x4d01, 0x4d01, 0x4d01, 0x4d02, 0x4d02, 0x4d02, 0x4d03, - 0x4d03, 0x4d03, 0x4d03, 0x4d04, 0x4d04, 0x4d04, 0x4d05, 0x4d05, - 0x4d05, 0x4d06, 0x4d06, 0x4d06, 0x4d07, 0x4d07, 0x4d07, 0x4d08, - 0x4d08, 0x4d08, 0x4d09, 0x4d09, 0x4d09, 0x4d0a, 0x4d0a, 0x4d0a, - 0x4d0b, 0x4d0b, 0x4d0b, 0x4d0c, 0x4d0c, 0x4d0c, 0x4d0d, 0x4d0d, - 0x4d0d, 0x4d0d, 0x4d0e, 0x4d0e, 0x4d0e, 0x4d0f, 0x4d0f, 0x4d0f, - 0x4d10, 0x4d10, 0x4d10, 0x4d11, 0x4d11, 0x4d11, 0x4d12, 0x4d12, - 0x4d12, 0x4d13, 0x4d13, 0x4d13, 0x4d14, 0x4d14, 0x4d14, 0x4d14, - 0x4d15, 0x4d15, 0x4d15, 0x4d16, 0x4d16, 0x4d16, 0x4d17, 0x4d17, - 0x4d17, 0x4d18, 0x4d18, 0x4d18, 0x4d19, 0x4d19, 0x4d19, 0x4d1a, - 0x4d1a, 0x4d1a, 0x4d1a, 0x4d1b, 0x4d1b, 0x4d1b, 0x4d1c, 0x4d1c, - 0x4d1c, 0x4d1d, 0x4d1d, 0x4d1d, 0x4d1e, 0x4d1e, 0x4d1e, 0x4d1e, - 0x4d1f, 0x4d1f, 0x4d1f, 0x4d20, 0x4d20, 0x4d20, 0x4d21, 0x4d21, - 0x4d21, 0x4d22, 0x4d22, 0x4d22, 0x4d22, 0x4d23, 0x4d23, 0x4d23, - 0x4d24, 0x4d24, 0x4d24, 0x4d25, 0x4d25, 0x4d25, 0x4d26, 0x4d26, - 0x4d26, 0x4d26, 0x4d27, 0x4d27, 0x4d27, 0x4d28, 0x4d28, 0x4d28, - 0x4d29, 0x4d29, 0x4d29, 0x4d29, 0x4d2a, 0x4d2a, 0x4d2a, 0x4d2b, - 0x4d2b, 0x4d2b, 0x4d2c, 0x4d2c, 0x4d2c, 0x4d2d, 0x4d2d, 0x4d2d, - 0x4d2d, 0x4d2e, 0x4d2e, 0x4d2e, 0x4d2f, 0x4d2f, 0x4d2f, 0x4d30, - 0x4d30, 0x4d30, 0x4d30, 0x4d31, 0x4d31, 0x4d31, 0x4d32, 0x4d32, - 0x4d32, 0x4d32, 0x4d33, 0x4d33, 0x4d33, 0x4d34, 0x4d34, 0x4d34, - 0x4d35, 0x4d35, 0x4d35, 0x4d35, 0x4d36, 0x4d36, 0x4d36, 0x4d37, - 0x4d37, 0x4d37, 0x4d38, 0x4d38, 0x4d38, 0x4d38, 0x4d39, 0x4d39, - 0x4d39, 0x4d3a, 0x4d3a, 0x4d3a, 0x4d3a, 0x4d3b, 0x4d3b, 0x4d3b, - 0x4d3c, 0x4d3c, 0x4d3c, 0x4d3d, 0x4d3d, 0x4d3d, 0x4d3d, 0x4d3e, - 0x4d3e, 0x4d3e, 0x4d3f, 0x4d3f, 0x4d3f, 0x4d3f, 0x4d40, 0x4d40, - 0x4d40, 0x4d41, 0x4d41, 0x4d41, 0x4d41, 0x4d42, 0x4d42, 0x4d42, - 0x4d43, 0x4d43, 0x4d43, 0x4d43, 0x4d44, 0x4d44, 0x4d44, 0x4d45, - 0x4d45, 0x4d45, 0x4d45, 0x4d46, 0x4d46, 0x4d46, 0x4d47, 0x4d47, - 0x4d47, 0x4d47, 0x4d48, 0x4d48, 0x4d48, 0x4d49, 0x4d49, 0x4d49, - 0x4d49, 0x4d4a, 0x4d4a, 0x4d4a, 0x4d4b, 0x4d4b, 0x4d4b, 0x4d4b, - 0x4d4c, 0x4d4c, 0x4d4c, 0x4d4d, 0x4d4d, 0x4d4d, 0x4d4d, 0x4d4e, - 0x4d4e, 0x4d4e, 0x4d4f, 0x4d4f, 0x4d4f, 0x4d4f, 0x4d50, 0x4d50, - 0x4d50, 0x4d51, 0x4d51, 0x4d51, 0x4d51, 0x4d52, 0x4d52, 0x4d52, - 0x4d53, 0x4d53, 0x4d53, 0x4d53, 0x4d54, 0x4d54, 0x4d54, 0x4d54, - 0x4d55, 0x4d55, 0x4d55, 0x4d56, 0x4d56, 0x4d56, 0x4d56, 0x4d57, - 0x4d57, 0x4d57, 0x4d58, 0x4d58, 0x4d58, 0x4d58, 0x4d59, 0x4d59, - 0x4d59, 0x4d59, 0x4d5a, 0x4d5a, 0x4d5a, 0x4d5b, 0x4d5b, 0x4d5b, - 0x4d5b, 0x4d5c, 0x4d5c, 0x4d5c, 0x4d5c, 0x4d5d, 0x4d5d, 0x4d5d, - 0x4d5e, 0x4d5e, 0x4d5e, 0x4d5e, 0x4d5f, 0x4d5f, 0x4d5f, 0x4d5f, - 0x4d60, 0x4d60, 0x4d60, 0x4d61, 0x4d61, 0x4d61, 0x4d61, 0x4d62, - 0x4d62, 0x4d62, 0x4d62, 0x4d63, 0x4d63, 0x4d63, 0x4d64, 0x4d64, - 0x4d64, 0x4d64, 0x4d65, 0x4d65, 0x4d65, 0x4d65, 0x4d66, 0x4d66, - 0x4d66, 0x4d67, 0x4d67, 0x4d67, 0x4d67, 0x4d68, 0x4d68, 0x4d68, - 0x4d68, 0x4d69, 0x4d69, 0x4d69, 0x4d69, 0x4d6a, 0x4d6a, 0x4d6a, - 0x4d6b, 0x4d6b, 0x4d6b, 0x4d6b, 0x4d6c, 0x4d6c, 0x4d6c, 0x4d6c, - 0x4d6d, 0x4d6d, 0x4d6d, 0x4d6d, 0x4d6e, 0x4d6e, 0x4d6e, 0x4d6f, - 0x4d6f, 0x4d6f, 0x4d6f, 0x4d70, 0x4d70, 0x4d70, 0x4d70, 0x4d71, - 0x4d71, 0x4d71, 0x4d71, 0x4d72, 0x4d72, 0x4d72, 0x4d72, 0x4d73, - 0x4d73, 0x4d73, 0x4d74, 0x4d74, 0x4d74, 0x4d74, 0x4d75, 0x4d75, - 0x4d75, 0x4d75, 0x4d76, 0x4d76, 0x4d76, 0x4d76, 0x4d77, 0x4d77, - 0x4d77, 0x4d77, 0x4d78, 0x4d78, 0x4d78, 0x4d78, 0x4d79, 0x4d79, - 0x4d79, 0x4d7a, 0x4d7a, 0x4d7a, 0x4d7a, 0x4d7b, 0x4d7b, 0x4d7b, - 0x4d7b, 0x4d7c, 0x4d7c, 0x4d7c, 0x4d7c, 0x4d7d, 0x4d7d, 0x4d7d, - 0x4d7d, 0x4d7e, 0x4d7e, 0x4d7e, 0x4d7e, 0x4d7f, 0x4d7f, 0x4d7f, - 0x4d7f, 0x4d80, 0x4d80, 0x4d80, 0x4d80, 0x4d81, 0x4d81, 0x4d81, - 0x4d81, 0x4d82, 0x4d82, 0x4d82, 0x4d82, 0x4d83, 0x4d83, 0x4d83, - 0x4d84, 0x4d84, 0x4d84, 0x4d84, 0x4d85, 0x4d85, 0x4d85, 0x4d85, - 0x4d86, 0x4d86, 0x4d86, 0x4d86, 0x4d87, 0x4d87, 0x4d87, 0x4d87, - 0x4d88, 0x4d88, 0x4d88, 0x4d88, 0x4d89, 0x4d89, 0x4d89, 0x4d89, - 0x4d8a, 0x4d8a, 0x4d8a, 0x4d8a, 0x4d8b, 0x4d8b, 0x4d8b, 0x4d8b, - 0x4d8c, 0x4d8c, 0x4d8d, 0x4d8d, 0x4d8e, 0x4d8e, 0x4d8f, 0x4d8f, - 0x4d90, 0x4d90, 0x4d91, 0x4d91, 0x4d92, 0x4d92, 0x4d93, 0x4d93, - 0x4d94, 0x4d94, 0x4d94, 0x4d95, 0x4d95, 0x4d96, 0x4d96, 0x4d97, - 0x4d97, 0x4d98, 0x4d98, 0x4d99, 0x4d99, 0x4d9a, 0x4d9a, 0x4d9b, - 0x4d9b, 0x4d9c, 0x4d9c, 0x4d9d, 0x4d9d, 0x4d9e, 0x4d9e, 0x4d9f, - 0x4d9f, 0x4da0, 0x4da0, 0x4da1, 0x4da1, 0x4da2, 0x4da2, 0x4da3, - 0x4da3, 0x4da3, 0x4da4, 0x4da4, 0x4da5, 0x4da5, 0x4da6, 0x4da6, - 0x4da7, 0x4da7, 0x4da8, 0x4da8, 0x4da9, 0x4da9, 0x4daa, 0x4daa, - 0x4dab, 0x4dab, 0x4dac, 0x4dac, 0x4dac, 0x4dad, 0x4dad, 0x4dae, - 0x4dae, 0x4daf, 0x4daf, 0x4db0, 0x4db0, 0x4db1, 0x4db1, 0x4db2, - 0x4db2, 0x4db3, 0x4db3, 0x4db3, 0x4db4, 0x4db4, 0x4db5, 0x4db5, - 0x4db6, 0x4db6, 0x4db7, 0x4db7, 0x4db8, 0x4db8, 0x4db9, 0x4db9, - 0x4db9, 0x4dba, 0x4dba, 0x4dbb, 0x4dbb, 0x4dbc, 0x4dbc, 0x4dbd, - 0x4dbd, 0x4dbe, 0x4dbe, 0x4dbe, 0x4dbf, 0x4dbf, 0x4dc0, 0x4dc0, - 0x4dc1, 0x4dc1, 0x4dc2, 0x4dc2, 0x4dc3, 0x4dc3, 0x4dc3, 0x4dc4, - 0x4dc4, 0x4dc5, 0x4dc5, 0x4dc6, 0x4dc6, 0x4dc7, 0x4dc7, 0x4dc7, - 0x4dc8, 0x4dc8, 0x4dc9, 0x4dc9, 0x4dca, 0x4dca, 0x4dcb, 0x4dcb, - 0x4dcb, 0x4dcc, 0x4dcc, 0x4dcd, 0x4dcd, 0x4dce, 0x4dce, 0x4dce, - 0x4dcf, 0x4dcf, 0x4dd0, 0x4dd0, 0x4dd1, 0x4dd1, 0x4dd2, 0x4dd2, - 0x4dd2, 0x4dd3, 0x4dd3, 0x4dd4, 0x4dd4, 0x4dd5, 0x4dd5, 0x4dd5, - 0x4dd6, 0x4dd6, 0x4dd7, 0x4dd7, 0x4dd8, 0x4dd8, 0x4dd8, 0x4dd9, - 0x4dd9, 0x4dda, 0x4dda, 0x4ddb, 0x4ddb, 0x4ddb, 0x4ddc, 0x4ddc, - 0x4ddd, 0x4ddd, 0x4dde, 0x4dde, 0x4dde, 0x4ddf, 0x4ddf, 0x4de0, - 0x4de0, 0x4de1, 0x4de1, 0x4de1, 0x4de2, 0x4de2, 0x4de3, 0x4de3, - 0x4de4, 0x4de4, 0x4de4, 0x4de5, 0x4de5, 0x4de6, 0x4de6, 0x4de6, - 0x4de7, 0x4de7, 0x4de8, 0x4de8, 0x4de9, 0x4de9, 0x4de9, 0x4dea, - 0x4dea, 0x4deb, 0x4deb, 0x4deb, 0x4dec, 0x4dec, 0x4ded, 0x4ded, - 0x4dee, 0x4dee, 0x4dee, 0x4def, 0x4def, 0x4df0, 0x4df0, 0x4df0, - 0x4df1, 0x4df1, 0x4df2, 0x4df2, 0x4df2, 0x4df3, 0x4df3, 0x4df4, - 0x4df4, 0x4df5, 0x4df5, 0x4df5, 0x4df6, 0x4df6, 0x4df7, 0x4df7, - 0x4df7, 0x4df8, 0x4df8, 0x4df9, 0x4df9, 0x4df9, 0x4dfa, 0x4dfa, - 0x4dfb, 0x4dfb, 0x4dfb, 0x4dfc, 0x4dfc, 0x4dfd, 0x4dfd, 0x4dfd, - 0x4dfe, 0x4dfe, 0x4dff, 0x4dff, 0x4dff, 0x4e00, 0x4e00, 0x4e01, - 0x4e01, 0x4e01, 0x4e02, 0x4e02, 0x4e03, 0x4e03, 0x4e03, 0x4e04, - 0x4e04, 0x4e05, 0x4e05, 0x4e05, 0x4e06, 0x4e06, 0x4e07, 0x4e07, - 0x4e07, 0x4e08, 0x4e08, 0x4e09, 0x4e09, 0x4e09, 0x4e0a, 0x4e0a, - 0x4e0a, 0x4e0b, 0x4e0b, 0x4e0c, 0x4e0c, 0x4e0c, 0x4e0d, 0x4e0d, - 0x4e0e, 0x4e0e, 0x4e0e, 0x4e0f, 0x4e0f, 0x4e10, 0x4e10, 0x4e10, - 0x4e11, 0x4e11, 0x4e11, 0x4e12, 0x4e12, 0x4e13, 0x4e13, 0x4e13, - 0x4e14, 0x4e14, 0x4e15, 0x4e15, 0x4e15, 0x4e16, 0x4e16, 0x4e16, - 0x4e17, 0x4e17, 0x4e18, 0x4e18, 0x4e18, 0x4e19, 0x4e19, 0x4e19, - 0x4e1a, 0x4e1a, 0x4e1b, 0x4e1b, 0x4e1b, 0x4e1c, 0x4e1c, 0x4e1c, - 0x4e1d, 0x4e1d, 0x4e1e, 0x4e1e, 0x4e1e, 0x4e1f, 0x4e1f, 0x4e1f, - 0x4e20, 0x4e20, 0x4e21, 0x4e21, 0x4e21, 0x4e22, 0x4e22, 0x4e22, - 0x4e23, 0x4e23, 0x4e24, 0x4e24, 0x4e24, 0x4e25, 0x4e25, 0x4e25, - 0x4e26, 0x4e26, 0x4e27, 0x4e27, 0x4e27, 0x4e28, 0x4e28, 0x4e28, - 0x4e29, 0x4e29, 0x4e29, 0x4e2a, 0x4e2a, 0x4e2b, 0x4e2b, 0x4e2b, - 0x4e2c, 0x4e2c, 0x4e2c, 0x4e2d, 0x4e2d, 0x4e2e, 0x4e2e, 0x4e2e, - 0x4e2f, 0x4e2f, 0x4e2f, 0x4e30, 0x4e30, 0x4e30, 0x4e31, 0x4e31, - 0x4e32, 0x4e32, 0x4e32, 0x4e33, 0x4e33, 0x4e33, 0x4e34, 0x4e34, - 0x4e34, 0x4e35, 0x4e35, 0x4e35, 0x4e36, 0x4e36, 0x4e37, 0x4e37, - 0x4e37, 0x4e38, 0x4e38, 0x4e38, 0x4e39, 0x4e39, 0x4e39, 0x4e3a, - 0x4e3a, 0x4e3a, 0x4e3b, 0x4e3b, 0x4e3c, 0x4e3c, 0x4e3c, 0x4e3d, - 0x4e3d, 0x4e3d, 0x4e3e, 0x4e3e, 0x4e3e, 0x4e3f, 0x4e3f, 0x4e3f, - 0x4e40, 0x4e40, 0x4e40, 0x4e41, 0x4e41, 0x4e42, 0x4e42, 0x4e42, - 0x4e43, 0x4e43, 0x4e43, 0x4e44, 0x4e44, 0x4e44, 0x4e45, 0x4e45, - 0x4e45, 0x4e46, 0x4e46, 0x4e46, 0x4e47, 0x4e47, 0x4e47, 0x4e48, - 0x4e48, 0x4e48, 0x4e49, 0x4e49, 0x4e4a, 0x4e4a, 0x4e4a, 0x4e4b, - 0x4e4b, 0x4e4b, 0x4e4c, 0x4e4c, 0x4e4c, 0x4e4d, 0x4e4d, 0x4e4d, - 0x4e4e, 0x4e4e, 0x4e4e, 0x4e4f, 0x4e4f, 0x4e4f, 0x4e50, 0x4e50, - 0x4e50, 0x4e51, 0x4e51, 0x4e51, 0x4e52, 0x4e52, 0x4e52, 0x4e53, - 0x4e53, 0x4e53, 0x4e54, 0x4e54, 0x4e54, 0x4e55, 0x4e55, 0x4e55, - 0x4e56, 0x4e56, 0x4e56, 0x4e57, 0x4e57, 0x4e57, 0x4e58, 0x4e58, - 0x4e58, 0x4e59, 0x4e59, 0x4e59, 0x4e5a, 0x4e5a, 0x4e5a, 0x4e5b, - 0x4e5b, 0x4e5b, 0x4e5c, 0x4e5c, 0x4e5c, 0x4e5d, 0x4e5d, 0x4e5d, - 0x4e5e, 0x4e5e, 0x4e5e, 0x4e5f, 0x4e5f, 0x4e5f, 0x4e60, 0x4e60, - 0x4e60, 0x4e61, 0x4e61, 0x4e61, 0x4e62, 0x4e62, 0x4e62, 0x4e63, - 0x4e63, 0x4e63, 0x4e64, 0x4e64, 0x4e64, 0x4e65, 0x4e65, 0x4e65, - 0x4e66, 0x4e66, 0x4e66, 0x4e67, 0x4e67, 0x4e67, 0x4e68, 0x4e68, - 0x4e68, 0x4e69, 0x4e69, 0x4e69, 0x4e6a, 0x4e6a, 0x4e6a, 0x4e6b, - 0x4e6b, 0x4e6b, 0x4e6c, 0x4e6c, 0x4e6c, 0x4e6d, 0x4e6d, 0x4e6d, - 0x4e6d, 0x4e6e, 0x4e6e, 0x4e6e, 0x4e6f, 0x4e6f, 0x4e6f, 0x4e70, - 0x4e70, 0x4e70, 0x4e71, 0x4e71, 0x4e71, 0x4e72, 0x4e72, 0x4e72, - 0x4e73, 0x4e73, 0x4e73, 0x4e74, 0x4e74, 0x4e74, 0x4e75, 0x4e75, - 0x4e75, 0x4e75, 0x4e76, 0x4e76, 0x4e76, 0x4e77, 0x4e77, 0x4e77, - 0x4e78, 0x4e78, 0x4e78, 0x4e79, 0x4e79, 0x4e79, 0x4e7a, 0x4e7a, - 0x4e7a, 0x4e7b, 0x4e7b, 0x4e7b, 0x4e7b, 0x4e7c, 0x4e7c, 0x4e7c, - 0x4e7d, 0x4e7d, 0x4e7d, 0x4e7e, 0x4e7e, 0x4e7e, 0x4e7f, 0x4e7f, - 0x4e7f, 0x4e80, 0x4e80, 0x4e80, 0x4e80, 0x4e81, 0x4e81, 0x4e81, - 0x4e82, 0x4e82, 0x4e82, 0x4e83, 0x4e83, 0x4e83, 0x4e84, 0x4e84, - 0x4e84, 0x4e84, 0x4e85, 0x4e85, 0x4e85, 0x4e86, 0x4e86, 0x4e86, - 0x4e87, 0x4e87, 0x4e87, 0x4e88, 0x4e88, 0x4e88, 0x4e88, 0x4e89, - 0x4e89, 0x4e89, 0x4e8a, 0x4e8a, 0x4e8a, 0x4e8b, 0x4e8b, 0x4e8b, - 0x4e8b, 0x4e8c, 0x4e8c, 0x4e8c, 0x4e8d, 0x4e8d, 0x4e8d, 0x4e8e, - 0x4e8e, 0x4e8e, 0x4e8f, 0x4e8f, 0x4e8f, 0x4e8f, 0x4e90, 0x4e90, - 0x4e90, 0x4e91, 0x4e91, 0x4e91, 0x4e92, 0x4e92, 0x4e92, 0x4e92, - 0x4e93, 0x4e93, 0x4e93, 0x4e94, 0x4e94, 0x4e94, 0x4e94, 0x4e95, - 0x4e95, 0x4e95, 0x4e96, 0x4e96, 0x4e96, 0x4e97, 0x4e97, 0x4e97, - 0x4e97, 0x4e98, 0x4e98, 0x4e98, 0x4e99, 0x4e99, 0x4e99, 0x4e9a, - 0x4e9a, 0x4e9a, 0x4e9a, 0x4e9b, 0x4e9b, 0x4e9b, 0x4e9c, 0x4e9c, - 0x4e9c, 0x4e9c, 0x4e9d, 0x4e9d, 0x4e9d, 0x4e9e, 0x4e9e, 0x4e9e, - 0x4e9f, 0x4e9f, 0x4e9f, 0x4e9f, 0x4ea0, 0x4ea0, 0x4ea0, 0x4ea1, - 0x4ea1, 0x4ea1, 0x4ea1, 0x4ea2, 0x4ea2, 0x4ea2, 0x4ea3, 0x4ea3, - 0x4ea3, 0x4ea3, 0x4ea4, 0x4ea4, 0x4ea4, 0x4ea5, 0x4ea5, 0x4ea5, - 0x4ea5, 0x4ea6, 0x4ea6, 0x4ea6, 0x4ea7, 0x4ea7, 0x4ea7, 0x4ea8, - 0x4ea8, 0x4ea8, 0x4ea8, 0x4ea9, 0x4ea9, 0x4ea9, 0x4eaa, 0x4eaa, - 0x4eaa, 0x4eaa, 0x4eab, 0x4eab, 0x4eab, 0x4eac, 0x4eac, 0x4eac, - 0x4eac, 0x4ead, 0x4ead, 0x4ead, 0x4eae, 0x4eae, 0x4eae, 0x4eae, - 0x4eaf, 0x4eaf, 0x4eaf, 0x4eaf, 0x4eb0, 0x4eb0, 0x4eb0, 0x4eb1, - 0x4eb1, 0x4eb1, 0x4eb1, 0x4eb2, 0x4eb2, 0x4eb2, 0x4eb3, 0x4eb3, - 0x4eb3, 0x4eb3, 0x4eb4, 0x4eb4, 0x4eb4, 0x4eb5, 0x4eb5, 0x4eb5, - 0x4eb5, 0x4eb6, 0x4eb6, 0x4eb6, 0x4eb7, 0x4eb7, 0x4eb7, 0x4eb7, - 0x4eb8, 0x4eb8, 0x4eb8, 0x4eb8, 0x4eb9, 0x4eb9, 0x4eb9, 0x4eba, - 0x4eba, 0x4eba, 0x4eba, 0x4ebb, 0x4ebb, 0x4ebb, 0x4ebc, 0x4ebc, - 0x4ebc, 0x4ebc, 0x4ebd, 0x4ebd, 0x4ebd, 0x4ebd, 0x4ebe, 0x4ebe, - 0x4ebe, 0x4ebf, 0x4ebf, 0x4ebf, 0x4ebf, 0x4ec0, 0x4ec0, 0x4ec0, - 0x4ec0, 0x4ec1, 0x4ec1, 0x4ec1, 0x4ec2, 0x4ec2, 0x4ec2, 0x4ec2, - 0x4ec3, 0x4ec3, 0x4ec3, 0x4ec3, 0x4ec4, 0x4ec4, 0x4ec4, 0x4ec5, - 0x4ec5, 0x4ec5, 0x4ec5, 0x4ec6, 0x4ec6, 0x4ec6, 0x4ec6, 0x4ec7, - 0x4ec7, 0x4ec7, 0x4ec8, 0x4ec8, 0x4ec8, 0x4ec8, 0x4ec9, 0x4ec9, - 0x4ec9, 0x4ec9, 0x4eca, 0x4eca, 0x4eca, 0x4eca, 0x4ecb, 0x4ecb, - 0x4ecb, 0x4ecc, 0x4ecc, 0x4ecc, 0x4ecc, 0x4ecd, 0x4ecd, 0x4ecd, - 0x4ecd, 0x4ece, 0x4ece, 0x4ece, 0x4ece, 0x4ecf, 0x4ecf, 0x4ecf, - 0x4ed0, 0x4ed0, 0x4ed0, 0x4ed0, 0x4ed1, 0x4ed1, 0x4ed1, 0x4ed1, - 0x4ed2, 0x4ed2, 0x4ed2, 0x4ed2, 0x4ed3, 0x4ed3, 0x4ed3, 0x4ed4, - 0x4ed4, 0x4ed4, 0x4ed4, 0x4ed5, 0x4ed5, 0x4ed5, 0x4ed5, 0x4ed6, - 0x4ed6, 0x4ed6, 0x4ed6, 0x4ed7, 0x4ed7, 0x4ed7, 0x4ed7, 0x4ed8, - 0x4ed8, 0x4ed8, 0x4ed8, 0x4ed9, 0x4ed9, 0x4ed9, 0x4eda, 0x4eda, - 0x4eda, 0x4eda, 0x4edb, 0x4edb, 0x4edb, 0x4edb, 0x4edc, 0x4edc, - 0x4edc, 0x4edc, 0x4edd, 0x4edd, 0x4edd, 0x4edd, 0x4ede, 0x4ede, - 0x4ede, 0x4ede, 0x4edf, 0x4edf, 0x4edf, 0x4edf, 0x4ee0, 0x4ee0, - 0x4ee0, 0x4ee1, 0x4ee1, 0x4ee1, 0x4ee1, 0x4ee2, 0x4ee2, 0x4ee2, - 0x4ee2, 0x4ee3, 0x4ee3, 0x4ee3, 0x4ee3, 0x4ee4, 0x4ee4, 0x4ee4, - 0x4ee4, 0x4ee5, 0x4ee5, 0x4ee5, 0x4ee5, 0x4ee6, 0x4ee6, 0x4ee6, - 0x4ee6, 0x4ee7, 0x4ee7, 0x4ee7, 0x4ee7, 0x4ee8, 0x4ee8, 0x4ee8, - 0x4ee8, 0x4ee9, 0x4ee9, 0x4ee9, 0x4ee9, 0x4eea, 0x4eea, 0x4eea, - 0x4eea, 0x4eeb, 0x4eeb, 0x4eeb, 0x4eeb, 0x4eec, 0x4eec, 0x4eec, - 0x4eec, 0x4eed, 0x4eed, 0x4eed, 0x4eed, 0x4eee, 0x4eee, 0x4eee, - 0x4eee, 0x4eef, 0x4eef, 0x4ef0, 0x4ef0, 0x4ef1, 0x4ef1, 0x4ef2, - 0x4ef2, 0x4ef3, 0x4ef3, 0x4ef4, 0x4ef4, 0x4ef5, 0x4ef5, 0x4ef6, - 0x4ef6, 0x4ef7, 0x4ef7, 0x4ef8, 0x4ef8, 0x4ef9, 0x4ef9, 0x4efa, - 0x4efa, 0x4efb, 0x4efb, 0x4efc, 0x4efc, 0x4efd, 0x4efd, 0x4efe, - 0x4efe, 0x4eff, 0x4eff, 0x4f00, 0x4f00, 0x4f01, 0x4f01, 0x4f02, - 0x4f02, 0x4f03, 0x4f03, 0x4f04, 0x4f04, 0x4f04, 0x4f05, 0x4f05, - 0x4f06, 0x4f06, 0x4f07, 0x4f07, 0x4f08, 0x4f08, 0x4f09, 0x4f09, - 0x4f0a, 0x4f0a, 0x4f0b, 0x4f0b, 0x4f0c, 0x4f0c, 0x4f0d, 0x4f0d, - 0x4f0d, 0x4f0e, 0x4f0e, 0x4f0f, 0x4f0f, 0x4f10, 0x4f10, 0x4f11, - 0x4f11, 0x4f12, 0x4f12, 0x4f13, 0x4f13, 0x4f14, 0x4f14, 0x4f15, - 0x4f15, 0x4f15, 0x4f16, 0x4f16, 0x4f17, 0x4f17, 0x4f18, 0x4f18, - 0x4f19, 0x4f19, 0x4f1a, 0x4f1a, 0x4f1b, 0x4f1b, 0x4f1b, 0x4f1c, - 0x4f1c, 0x4f1d, 0x4f1d, 0x4f1e, 0x4f1e, 0x4f1f, 0x4f1f, 0x4f20, - 0x4f20, 0x4f20, 0x4f21, 0x4f21, 0x4f22, 0x4f22, 0x4f23, 0x4f23, - 0x4f24, 0x4f24, 0x4f25, 0x4f25, 0x4f25, 0x4f26, 0x4f26, 0x4f27, - 0x4f27, 0x4f28, 0x4f28, 0x4f29, 0x4f29, 0x4f29, 0x4f2a, 0x4f2a, - 0x4f2b, 0x4f2b, 0x4f2c, 0x4f2c, 0x4f2d, 0x4f2d, 0x4f2d, 0x4f2e, - 0x4f2e, 0x4f2f, 0x4f2f, 0x4f30, 0x4f30, 0x4f31, 0x4f31, 0x4f31, - 0x4f32, 0x4f32, 0x4f33, 0x4f33, 0x4f34, 0x4f34, 0x4f34, 0x4f35, - 0x4f35, 0x4f36, 0x4f36, 0x4f37, 0x4f37, 0x4f37, 0x4f38, 0x4f38, - 0x4f39, 0x4f39, 0x4f3a, 0x4f3a, 0x4f3b, 0x4f3b, 0x4f3b, 0x4f3c, - 0x4f3c, 0x4f3d, 0x4f3d, 0x4f3e, 0x4f3e, 0x4f3e, 0x4f3f, 0x4f3f, - 0x4f40, 0x4f40, 0x4f41, 0x4f41, 0x4f41, 0x4f42, 0x4f42, 0x4f43, - 0x4f43, 0x4f43, 0x4f44, 0x4f44, 0x4f45, 0x4f45, 0x4f46, 0x4f46, - 0x4f46, 0x4f47, 0x4f47, 0x4f48, 0x4f48, 0x4f49, 0x4f49, 0x4f49, - 0x4f4a, 0x4f4a, 0x4f4b, 0x4f4b, 0x4f4b, 0x4f4c, 0x4f4c, 0x4f4d, - 0x4f4d, 0x4f4e, 0x4f4e, 0x4f4e, 0x4f4f, 0x4f4f, 0x4f50, 0x4f50, - 0x4f50, 0x4f51, 0x4f51, 0x4f52, 0x4f52, 0x4f53, 0x4f53, 0x4f53, - 0x4f54, 0x4f54, 0x4f55, 0x4f55, 0x4f55, 0x4f56, 0x4f56, 0x4f57, - 0x4f57, 0x4f57, 0x4f58, 0x4f58, 0x4f59, 0x4f59, 0x4f59, 0x4f5a, - 0x4f5a, 0x4f5b, 0x4f5b, 0x4f5b, 0x4f5c, 0x4f5c, 0x4f5d, 0x4f5d, - 0x4f5d, 0x4f5e, 0x4f5e, 0x4f5f, 0x4f5f, 0x4f60, 0x4f60, 0x4f60, - 0x4f61, 0x4f61, 0x4f62, 0x4f62, 0x4f62, 0x4f63, 0x4f63, 0x4f63, - 0x4f64, 0x4f64, 0x4f65, 0x4f65, 0x4f65, 0x4f66, 0x4f66, 0x4f67, - 0x4f67, 0x4f67, 0x4f68, 0x4f68, 0x4f69, 0x4f69, 0x4f69, 0x4f6a, - 0x4f6a, 0x4f6b, 0x4f6b, 0x4f6b, 0x4f6c, 0x4f6c, 0x4f6d, 0x4f6d, - 0x4f6d, 0x4f6e, 0x4f6e, 0x4f6f, 0x4f6f, 0x4f6f, 0x4f70, 0x4f70, - 0x4f70, 0x4f71, 0x4f71, 0x4f72, 0x4f72, 0x4f72, 0x4f73, 0x4f73, - 0x4f74, 0x4f74, 0x4f74, 0x4f75, 0x4f75, 0x4f75, 0x4f76, 0x4f76, - 0x4f77, 0x4f77, 0x4f77, 0x4f78, 0x4f78, 0x4f79, 0x4f79, 0x4f79, - 0x4f7a, 0x4f7a, 0x4f7a, 0x4f7b, 0x4f7b, 0x4f7c, 0x4f7c, 0x4f7c, - 0x4f7d, 0x4f7d, 0x4f7d, 0x4f7e, 0x4f7e, 0x4f7f, 0x4f7f, 0x4f7f, - 0x4f80, 0x4f80, 0x4f80, 0x4f81, 0x4f81, 0x4f82, 0x4f82, 0x4f82, - 0x4f83, 0x4f83, 0x4f83, 0x4f84, 0x4f84, 0x4f85, 0x4f85, 0x4f85, - 0x4f86, 0x4f86, 0x4f86, 0x4f87, 0x4f87, 0x4f88, 0x4f88, 0x4f88, - 0x4f89, 0x4f89, 0x4f89, 0x4f8a, 0x4f8a, 0x4f8b, 0x4f8b, 0x4f8b, - 0x4f8c, 0x4f8c, 0x4f8c, 0x4f8d, 0x4f8d, 0x4f8d, 0x4f8e, 0x4f8e, - 0x4f8f, 0x4f8f, 0x4f8f, 0x4f90, 0x4f90, 0x4f90, 0x4f91, 0x4f91, - 0x4f92, 0x4f92, 0x4f92, 0x4f93, 0x4f93, 0x4f93, 0x4f94, 0x4f94, - 0x4f94, 0x4f95, 0x4f95, 0x4f95, 0x4f96, 0x4f96, 0x4f97, 0x4f97, - 0x4f97, 0x4f98, 0x4f98, 0x4f98, 0x4f99, 0x4f99, 0x4f99, 0x4f9a, - 0x4f9a, 0x4f9b, 0x4f9b, 0x4f9b, 0x4f9c, 0x4f9c, 0x4f9c, 0x4f9d, - 0x4f9d, 0x4f9d, 0x4f9e, 0x4f9e, 0x4f9e, 0x4f9f, 0x4f9f, 0x4f9f, - 0x4fa0, 0x4fa0, 0x4fa1, 0x4fa1, 0x4fa1, 0x4fa2, 0x4fa2, 0x4fa2, - 0x4fa3, 0x4fa3, 0x4fa3, 0x4fa4, 0x4fa4, 0x4fa4, 0x4fa5, 0x4fa5, - 0x4fa5, 0x4fa6, 0x4fa6, 0x4fa7, 0x4fa7, 0x4fa7, 0x4fa8, 0x4fa8, - 0x4fa8, 0x4fa9, 0x4fa9, 0x4fa9, 0x4faa, 0x4faa, 0x4faa, 0x4fab, - 0x4fab, 0x4fab, 0x4fac, 0x4fac, 0x4fac, 0x4fad, 0x4fad, 0x4fad, - 0x4fae, 0x4fae, 0x4fae, 0x4faf, 0x4faf, 0x4fb0, 0x4fb0, 0x4fb0, - 0x4fb1, 0x4fb1, 0x4fb1, 0x4fb2, 0x4fb2, 0x4fb2, 0x4fb3, 0x4fb3, - 0x4fb3, 0x4fb4, 0x4fb4, 0x4fb4, 0x4fb5, 0x4fb5, 0x4fb5, 0x4fb6, - 0x4fb6, 0x4fb6, 0x4fb7, 0x4fb7, 0x4fb7, 0x4fb8, 0x4fb8, 0x4fb8, - 0x4fb9, 0x4fb9, 0x4fb9, 0x4fba, 0x4fba, 0x4fba, 0x4fbb, 0x4fbb, - 0x4fbb, 0x4fbc, 0x4fbc, 0x4fbc, 0x4fbd, 0x4fbd, 0x4fbd, 0x4fbe, - 0x4fbe, 0x4fbe, 0x4fbf, 0x4fbf, 0x4fbf, 0x4fc0, 0x4fc0, 0x4fc0, - 0x4fc1, 0x4fc1, 0x4fc1, 0x4fc2, 0x4fc2, 0x4fc2, 0x4fc3, 0x4fc3, - 0x4fc3, 0x4fc4, 0x4fc4, 0x4fc4, 0x4fc5, 0x4fc5, 0x4fc5, 0x4fc6, - 0x4fc6, 0x4fc6, 0x4fc7, 0x4fc7, 0x4fc7, 0x4fc8, 0x4fc8, 0x4fc8, - 0x4fc9, 0x4fc9, 0x4fc9, 0x4fca, 0x4fca, 0x4fca, 0x4fcb, 0x4fcb, - 0x4fcb, 0x4fcc, 0x4fcc, 0x4fcc, 0x4fcd, 0x4fcd, 0x4fcd, 0x4fcd, - 0x4fce, 0x4fce, 0x4fce, 0x4fcf, 0x4fcf, 0x4fcf, 0x4fd0, 0x4fd0, - 0x4fd0, 0x4fd1, 0x4fd1, 0x4fd1, 0x4fd2, 0x4fd2, 0x4fd2, 0x4fd3, - 0x4fd3, 0x4fd3, 0x4fd4, 0x4fd4, 0x4fd4, 0x4fd5, 0x4fd5, 0x4fd5, - 0x4fd6, 0x4fd6, 0x4fd6, 0x4fd6, 0x4fd7, 0x4fd7, 0x4fd7, 0x4fd8, - 0x4fd8, 0x4fd8, 0x4fd9, 0x4fd9, 0x4fd9, 0x4fda, 0x4fda, 0x4fda, - 0x4fdb, 0x4fdb, 0x4fdb, 0x4fdc, 0x4fdc, 0x4fdc, 0x4fdc, 0x4fdd, - 0x4fdd, 0x4fdd, 0x4fde, 0x4fde, 0x4fde, 0x4fdf, 0x4fdf, 0x4fdf, - 0x4fe0, 0x4fe0, 0x4fe0, 0x4fe1, 0x4fe1, 0x4fe1, 0x4fe1, 0x4fe2, - 0x4fe2, 0x4fe2, 0x4fe3, 0x4fe3, 0x4fe3, 0x4fe4, 0x4fe4, 0x4fe4, - 0x4fe5, 0x4fe5, 0x4fe5, 0x4fe5, 0x4fe6, 0x4fe6, 0x4fe6, 0x4fe7, - 0x4fe7, 0x4fe7, 0x4fe8, 0x4fe8, 0x4fe8, 0x4fe9, 0x4fe9, 0x4fe9, - 0x4fe9, 0x4fea, 0x4fea, 0x4fea, 0x4feb, 0x4feb, 0x4feb, 0x4fec, - 0x4fec, 0x4fec, 0x4fed, 0x4fed, 0x4fed, 0x4fed, 0x4fee, 0x4fee, - 0x4fee, 0x4fef, 0x4fef, 0x4fef, 0x4ff0, 0x4ff0, 0x4ff0, 0x4ff0, - 0x4ff1, 0x4ff1, 0x4ff1, 0x4ff2, 0x4ff2, 0x4ff2, 0x4ff3, 0x4ff3, - 0x4ff3, 0x4ff3, 0x4ff4, 0x4ff4, 0x4ff4, 0x4ff5, 0x4ff5, 0x4ff5, - 0x4ff6, 0x4ff6, 0x4ff6, 0x4ff6, 0x4ff7, 0x4ff7, 0x4ff7, 0x4ff8, - 0x4ff8, 0x4ff8, 0x4ff9, 0x4ff9, 0x4ff9, 0x4ff9, 0x4ffa, 0x4ffa, - 0x4ffa, 0x4ffb, 0x4ffb, 0x4ffb, 0x4ffc, 0x4ffc, 0x4ffc, 0x4ffc, - 0x4ffd, 0x4ffd, 0x4ffd, 0x4ffe, 0x4ffe, 0x4ffe, 0x4ffe, 0x4fff, - 0x4fff, 0x4fff, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5001, - 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5001, 0x5002, 0x5002, - 0x5002, 0x5002, 0x5002, 0x5002, 0x5002, 0x5003, 0x5003, 0x5003, - 0x5003, 0x5003, 0x5003, 0x5003, 0x5004, 0x5004, 0x5004, 0x5004, - 0x5004, 0x5004, 0x5004, 0x5005, 0x5005, 0x5005, 0x5005, 0x5005, - 0x5005, 0x5005, 0x5006, 0x5006, 0x5006, 0x5006, 0x5006, 0x5006, - 0x5006, 0x5007, 0x5007, 0x5007, 0x5007, 0x5007, 0x5007, 0x5007, - 0x5008, 0x5008, 0x5008, 0x5008, 0x5008, 0x5008, 0x5008, 0x5009, - 0x5009, 0x5009, 0x5009, 0x5009, 0x5009, 0x5009, 0x500a, 0x500a, - 0x500a, 0x500a, 0x500a, 0x500a, 0x500a, 0x500b, 0x500b, 0x500b, - 0x500b, 0x500b, 0x500b, 0x500b, 0x500c, 0x500c, 0x500c, 0x500c, - 0x500c, 0x500c, 0x500c, 0x500d, 0x500d, 0x500d, 0x500d, 0x500d, - 0x500d, 0x500d, 0x500e, 0x500e, 0x500e, 0x500e, 0x500e, 0x500e, - 0x500e, 0x500f, 0x500f, 0x500f, 0x500f, 0x500f, 0x500f, 0x500f, - 0x500f, 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, - 0x5011, 0x5011, 0x5011, 0x5011, 0x5011, 0x5011, 0x5011, 0x5012, - 0x5012, 0x5012, 0x5012, 0x5012, 0x5012, 0x5012, 0x5012, 0x5013, - 0x5013, 0x5013, 0x5013, 0x5013, 0x5013, 0x5013, 0x5014, 0x5014, - 0x5014, 0x5014, 0x5014, 0x5014, 0x5014, 0x5015, 0x5015, 0x5015, - 0x5015, 0x5015, 0x5015, 0x5015, 0x5015, 0x5016, 0x5016, 0x5016, - 0x5016, 0x5016, 0x5016, 0x5016, 0x5017, 0x5017, 0x5017, 0x5017, - 0x5017, 0x5017, 0x5017, 0x5017, 0x5018, 0x5018, 0x5018, 0x5018, - 0x5018, 0x5018, 0x5018, 0x5019, 0x5019, 0x5019, 0x5019, 0x5019, - 0x5019, 0x5019, 0x5019, 0x501a, 0x501a, 0x501a, 0x501a, 0x501a, - 0x501a, 0x501a, 0x501b, 0x501b, 0x501b, 0x501b, 0x501b, 0x501b, - 0x501b, 0x501b, 0x501c, 0x501c, 0x501c, 0x501c, 0x501c, 0x501c, - 0x501c, 0x501d, 0x501d, 0x501d, 0x501d, 0x501d, 0x501d, 0x501d, - 0x501d, 0x501e, 0x501e, 0x501e, 0x501e, 0x501e, 0x501e, 0x501e, - 0x501e, 0x501f, 0x501f, 0x501f, 0x501f, 0x501f, 0x501f, 0x501f, - 0x5020, 0x5020, 0x5020, 0x5020, 0x5020, 0x5020, 0x5020, 0x5020, - 0x5021, 0x5021, 0x5021, 0x5021, 0x5021, 0x5021, 0x5021, 0x5021, - 0x5022, 0x5022, 0x5022, 0x5022, 0x5022, 0x5022, 0x5022, 0x5022, - 0x5023, 0x5023, 0x5023, 0x5023, 0x5023, 0x5023, 0x5023, 0x5023, - 0x5024, 0x5024, 0x5024, 0x5024, 0x5024, 0x5024, 0x5024, 0x5025, - 0x5025, 0x5025, 0x5025, 0x5025, 0x5025, 0x5025, 0x5025, 0x5026, - 0x5026, 0x5026, 0x5026, 0x5026, 0x5026, 0x5026, 0x5026, 0x5027, - 0x5027, 0x5027, 0x5027, 0x5027, 0x5027, 0x5027, 0x5027, 0x5028, - 0x5028, 0x5028, 0x5028, 0x5028, 0x5028, 0x5028, 0x5028, 0x5029, - 0x5029, 0x5029, 0x5029, 0x5029, 0x502a, 0x502a, 0x502a, 0x502a, - 0x502b, 0x502b, 0x502b, 0x502b, 0x502c, 0x502c, 0x502c, 0x502c, - 0x502d, 0x502d, 0x502d, 0x502d, 0x502e, 0x502e, 0x502e, 0x502e, - 0x502f, 0x502f, 0x502f, 0x502f, 0x5030, 0x5030, 0x5030, 0x5030, - 0x5031, 0x5031, 0x5031, 0x5031, 0x5032, 0x5032, 0x5032, 0x5032, - 0x5032, 0x5033, 0x5033, 0x5033, 0x5033, 0x5034, 0x5034, 0x5034, - 0x5034, 0x5035, 0x5035, 0x5035, 0x5035, 0x5036, 0x5036, 0x5036, - 0x5036, 0x5037, 0x5037, 0x5037, 0x5037, 0x5037, 0x5038, 0x5038, - 0x5038, 0x5038, 0x5039, 0x5039, 0x5039, 0x5039, 0x503a, 0x503a, - 0x503a, 0x503a, 0x503b, 0x503b, 0x503b, 0x503b, 0x503b, 0x503c, - 0x503c, 0x503c, 0x503c, 0x503d, 0x503d, 0x503d, 0x503d, 0x503e, - 0x503e, 0x503e, 0x503e, 0x503e, 0x503f, 0x503f, 0x503f, 0x503f, - 0x5040, 0x5040, 0x5040, 0x5040, 0x5041, 0x5041, 0x5041, 0x5041, - 0x5041, 0x5042, 0x5042, 0x5042, 0x5042, 0x5043, 0x5043, 0x5043, - 0x5043, 0x5043, 0x5044, 0x5044, 0x5044, 0x5044, 0x5045, 0x5045, - 0x5045, 0x5045, 0x5045, 0x5046, 0x5046, 0x5046, 0x5046, 0x5047, - 0x5047, 0x5047, 0x5047, 0x5047, 0x5048, 0x5048, 0x5048, 0x5048, - 0x5049, 0x5049, 0x5049, 0x5049, 0x5049, 0x504a, 0x504a, 0x504a, - 0x504a, 0x504b, 0x504b, 0x504b, 0x504b, 0x504b, 0x504c, 0x504c, - 0x504c, 0x504c, 0x504d, 0x504d, 0x504d, 0x504d, 0x504d, 0x504e, - 0x504e, 0x504e, 0x504e, 0x504e, 0x504f, 0x504f, 0x504f, 0x504f, - 0x5050, 0x5050, 0x5050, 0x5050, 0x5050, 0x5051, 0x5051, 0x5051, - 0x5051, 0x5051, 0x5052, 0x5052, 0x5052, 0x5052, 0x5053, 0x5053, - 0x5053, 0x5053, 0x5053, 0x5054, 0x5054, 0x5054, 0x5054, 0x5054, - 0x5055, 0x5055, 0x5055, 0x5055, 0x5056, 0x5056, 0x5056, 0x5056, - 0x5056, 0x5057, 0x5057, 0x5057, 0x5057, 0x5057, 0x5058, 0x5058, - 0x5058, 0x5058, 0x5058, 0x5059, 0x5059, 0x5059, 0x5059, 0x5059, - 0x505a, 0x505a, 0x505a, 0x505a, 0x505a, 0x505b, 0x505b, 0x505b, - 0x505b, 0x505c, 0x505c, 0x505c, 0x505c, 0x505c, 0x505d, 0x505d, - 0x505d, 0x505d, 0x505d, 0x505e, 0x505e, 0x505e, 0x505e, 0x505e, - 0x505f, 0x505f, 0x505f, 0x505f, 0x505f, 0x5060, 0x5060, 0x5060, - 0x5060, 0x5060, 0x5061, 0x5061, 0x5061, 0x5061, 0x5061, 0x5062, - 0x5062, 0x5062, 0x5062, 0x5062, 0x5063, 0x5063, 0x5063, 0x5063, - 0x5063, 0x5064, 0x5064, 0x5064, 0x5064, 0x5064, 0x5065, 0x5065, - 0x5065, 0x5065, 0x5065, 0x5066, 0x5066, 0x5066, 0x5066, 0x5066, - 0x5067, 0x5067, 0x5067, 0x5067, 0x5067, 0x5068, 0x5068, 0x5068, - 0x5068, 0x5068, 0x5069, 0x5069, 0x5069, 0x5069, 0x5069, 0x5069, - 0x506a, 0x506a, 0x506a, 0x506a, 0x506a, 0x506b, 0x506b, 0x506b, - 0x506b, 0x506b, 0x506c, 0x506c, 0x506c, 0x506c, 0x506c, 0x506d, - 0x506d, 0x506d, 0x506d, 0x506d, 0x506e, 0x506e, 0x506e, 0x506e, - 0x506e, 0x506e, 0x506f, 0x506f, 0x506f, 0x506f, 0x506f, 0x5070, - 0x5070, 0x5070, 0x5070, 0x5070, 0x5071, 0x5071, 0x5071, 0x5071, - 0x5071, 0x5072, 0x5072, 0x5072, 0x5072, 0x5072, 0x5072, 0x5073, - 0x5073, 0x5073, 0x5073, 0x5073, 0x5074, 0x5074, 0x5074, 0x5074, - 0x5074, 0x5074, 0x5075, 0x5075, 0x5075, 0x5075, 0x5075, 0x5076, - 0x5076, 0x5076, 0x5076, 0x5076, 0x5077, 0x5077, 0x5077, 0x5077, - 0x5077, 0x5077, 0x5078, 0x5078, 0x5078, 0x5078, 0x5078, 0x5079, - 0x5079, 0x5079, 0x5079, 0x5079, 0x5079, 0x507a, 0x507a, 0x507a, - 0x507a, 0x507a, 0x507b, 0x507b, 0x507b, 0x507b, 0x507b, 0x507b, - 0x507c, 0x507c, 0x507c, 0x507c, 0x507c, 0x507d, 0x507d, 0x507d, - 0x507d, 0x507d, 0x507d, 0x507e, 0x507e, 0x507e, 0x507e, 0x507e, - 0x507f, 0x507f, 0x507f, 0x507f, 0x507f, 0x507f, 0x5080, 0x5080, - 0x5080, 0x5080, 0x5080, 0x5080, 0x5081, 0x5081, 0x5081, 0x5081, - 0x5081, 0x5082, 0x5082, 0x5082, 0x5082, 0x5082, 0x5082, 0x5083, - 0x5083, 0x5083, 0x5083, 0x5083, 0x5083, 0x5084, 0x5084, 0x5084, - 0x5084, 0x5084, 0x5085, 0x5085, 0x5085, 0x5085, 0x5085, 0x5085, - 0x5086, 0x5086, 0x5086, 0x5086, 0x5086, 0x5086, 0x5087, 0x5087, - 0x5087, 0x5087, 0x5087, 0x5087, 0x5088, 0x5088, 0x5088, 0x5088, - 0x5088, 0x5089, 0x5089, 0x5089, 0x5089, 0x5089, 0x5089, 0x508a, - 0x508a, 0x508a, 0x508a, 0x508a, 0x508a, 0x508b, 0x508b, 0x508b, - 0x508b, 0x508b, 0x508b, 0x508c, 0x508c, 0x508c, 0x508c, 0x508c, - 0x508c, 0x508d, 0x508d, 0x508d, 0x508d, 0x508d, 0x508d, 0x508e, - 0x508e, 0x508e, 0x508e, 0x508e, 0x508e, 0x508f, 0x508f, 0x508f, - 0x508f, 0x508f, 0x508f, 0x5090, 0x5090, 0x5090, 0x5090, 0x5090, - 0x5090, 0x5091, 0x5091, 0x5091, 0x5091, 0x5091, 0x5091, 0x5092, - 0x5092, 0x5092, 0x5092, 0x5092, 0x5092, 0x5093, 0x5093, 0x5093, - 0x5093, 0x5093, 0x5093, 0x5094, 0x5094, 0x5094, 0x5094, 0x5094, - 0x5094, 0x5095, 0x5095, 0x5095, 0x5095, 0x5095, 0x5095, 0x5096, - 0x5096, 0x5096, 0x5096, 0x5096, 0x5096, 0x5097, 0x5097, 0x5097, - 0x5097, 0x5097, 0x5097, 0x5098, 0x5098, 0x5098, 0x5098, 0x5098, - 0x5098, 0x5099, 0x5099, 0x5099, 0x5099, 0x5099, 0x5099, 0x5099, - 0x509a, 0x509a, 0x509a, 0x509a, 0x509a, 0x509a, 0x509b, 0x509b, - 0x509b, 0x509b, 0x509b, 0x509b, 0x509c, 0x509c, 0x509c, 0x509c, - 0x509c, 0x509c, 0x509d, 0x509d, 0x509d, 0x509d, 0x509d, 0x509d, - 0x509d, 0x509e, 0x509e, 0x509e, 0x509e, 0x509e, 0x509e, 0x509f, - 0x509f, 0x509f, 0x509f, 0x509f, 0x509f, 0x50a0, 0x50a0, 0x50a0, - 0x50a0, 0x50a0, 0x50a0, 0x50a0, 0x50a1, 0x50a1, 0x50a1, 0x50a1, - 0x50a1, 0x50a1, 0x50a2, 0x50a2, 0x50a2, 0x50a2, 0x50a2, 0x50a2, - 0x50a2, 0x50a3, 0x50a3, 0x50a3, 0x50a3, 0x50a3, 0x50a3, 0x50a4, - 0x50a4, 0x50a4, 0x50a4, 0x50a4, 0x50a4, 0x50a5, 0x50a5, 0x50a5, - 0x50a5, 0x50a5, 0x50a5, 0x50a5, 0x50a6, 0x50a6, 0x50a6, 0x50a6, - 0x50a6, 0x50a6, 0x50a6, 0x50a7, 0x50a7, 0x50a7, 0x50a7, 0x50a7, - 0x50a7, 0x50a8, 0x50a8, 0x50a8, 0x50a8, 0x50a8, 0x50a8, 0x50a8, - 0x50a9, 0x50a9, 0x50a9, 0x50a9, 0x50a9, 0x50a9, 0x50aa, 0x50aa, - 0x50aa, 0x50aa, 0x50aa, 0x50aa, 0x50aa, 0x50ab, 0x50ab, 0x50ab, - 0x50ab, 0x50ab, 0x50ab, 0x50ab, 0x50ac, 0x50ac, 0x50ac, 0x50ac, - 0x50ac, 0x50ac, 0x50ad, 0x50ad, 0x50ad, 0x50ad, 0x50ad, 0x50ad, - 0x50ad, 0x50ae, 0x50ae, 0x50ae, 0x50ae, 0x50ae, 0x50ae, 0x50ae, - 0x50af, 0x50af, 0x50af, 0x50af, 0x50af, 0x50af, 0x50b0, 0x50b0, - 0x50b0, 0x50b0, 0x50b0, 0x50b0, 0x50b0, 0x50b1, 0x50b1, 0x50b1, - 0x50b1, 0x50b1, 0x50b1, 0x50b1, 0x50b2, 0x50b2, 0x50b2, 0x50b2, - 0x50b2, 0x50b2, 0x50b2, 0x50b3, 0x50b3, 0x50b3, 0x50b3, 0x50b3, - 0x50b3, 0x50b3, 0x50b4, 0x50b4, 0x50b4, 0x50b4, 0x50b4, 0x50b4, - 0x50b4, 0x50b5, 0x50b5, 0x50b5, 0x50b5, 0x50b5, 0x50b5, 0x50b5, - 0x50b6, 0x50b6, 0x50b6, 0x50b6, 0x50b6, 0x50b6, 0x50b7, 0x50b7, - 0x50b7, 0x50b7, 0x50b7, 0x50b7, 0x50b7, 0x50b8, 0x50b8, 0x50b8, - 0x50b8, 0x50b8, 0x50b8, 0x50b8, 0x50b9, 0x50b9, 0x50b9, 0x50b9, - 0x50b9, 0x50b9, 0x50b9, 0x50ba, 0x50ba, 0x50ba, 0x50ba, 0x50ba, - 0x50ba, 0x50ba, 0x50ba, 0x50bb, 0x50bb, 0x50bb, 0x50bb, 0x50bb, - 0x50bb, 0x50bb, 0x50bc, 0x50bc, 0x50bc, 0x50bc, 0x50bc, 0x50bc, - 0x50bc, 0x50bd, 0x50bd, 0x50bd, 0x50bd, 0x50bd, 0x50bd, 0x50bd, - 0x50be, 0x50be, 0x50be, 0x50be, 0x50be, 0x50be, 0x50be, 0x50bf, - 0x50bf, 0x50bf, 0x50bf, 0x50bf, 0x50bf, 0x50bf, 0x50c0, 0x50c0, - 0x50c0, 0x50c0, 0x50c0, 0x50c0, 0x50c0, 0x50c1, 0x50c1, 0x50c1, - 0x50c1, 0x50c1, 0x50c1, 0x50c1, 0x50c1, 0x50c2, 0x50c2, 0x50c2, - 0x50c2, 0x50c2, 0x50c2, 0x50c2, 0x50c3, 0x50c3, 0x50c3, 0x50c3, - 0x50c3, 0x50c3, 0x50c3, 0x50c4, 0x50c4, 0x50c4, 0x50c4, 0x50c4, - 0x50c4, 0x50c4, 0x50c4, 0x50c5, 0x50c5, 0x50c5, 0x50c5, 0x50c5, - 0x50c5, 0x50c5, 0x50c6, 0x50c6, 0x50c6, 0x50c6, 0x50c6, 0x50c6, - 0x50c6, 0x50c7, 0x50c7, 0x50c7, 0x50c7, 0x50c7, 0x50c7, 0x50c7, - 0x50c7, 0x50c8, 0x50c8, 0x50c8, 0x50c8, 0x50c8, 0x50c8, 0x50c8, - 0x50c9, 0x50c9, 0x50c9, 0x50c9, 0x50c9, 0x50c9, 0x50c9, 0x50c9, - 0x50ca, 0x50ca, 0x50ca, 0x50ca, 0x50ca, 0x50ca, 0x50ca, 0x50cb, - 0x50cb, 0x50cb, 0x50cb, 0x50cb, 0x50cb, 0x50cb, 0x50cb, 0x50cc, - 0x50cc, 0x50cc, 0x50cc, 0x50cc, 0x50cc, 0x50cc, 0x50cd, 0x50cd, - 0x50cd, 0x50cd, 0x50cd, 0x50cd, 0x50cd, 0x50cd, 0x50ce, 0x50ce, - 0x50ce, 0x50ce, 0x50ce, 0x50ce, 0x50ce, 0x50ce, 0x50cf, 0x50cf, - 0x50cf, 0x50cf, 0x50cf, 0x50cf, 0x50cf, 0x50d0, 0x50d0, 0x50d0, - 0x50d0, 0x50d0, 0x50d0, 0x50d0, 0x50d0, 0x50d1, 0x50d1, 0x50d1, - 0x50d1, 0x50d1, 0x50d1, 0x50d1, 0x50d1, 0x50d2, 0x50d2, 0x50d2, - 0x50d2, 0x50d2, 0x50d2, 0x50d2, 0x50d3, 0x50d3, 0x50d3, 0x50d3, - 0x50d3, 0x50d3, 0x50d3, 0x50d3, 0x50d4, 0x50d4, 0x50d4, 0x50d4, - 0x50d4, 0x50d4, 0x50d4, 0x50d4, 0x50d5, 0x50d5, 0x50d5, 0x50d5, - 0x50d5, 0x50d5, 0x50d5, 0x50d5, 0x50d6, 0x50d6, 0x50d6, 0x50d6, - 0x50d6, 0x50d6, 0x50d6, 0x50d6, 0x50d7, 0x50d7, 0x50d7, 0x50d7, - 0x50d7, 0x50d7, 0x50d7, 0x50d7, 0x50d8, 0x50d8, 0x50d8, 0x50d8, - 0x50d8, 0x50d8, 0x50d8, 0x50d8, 0x50d9, 0x50d9, 0x50d9, 0x50d9, - 0x50d9, 0x50d9, 0x50d9, 0x50d9, 0x50da, 0x50da, 0x50da, 0x50da, - 0x50da, 0x50da, 0x50db, 0x50db, 0x50db, 0x50db, 0x50dc, 0x50dc, - 0x50dc, 0x50dc, 0x50dd, 0x50dd, 0x50dd, 0x50dd, 0x50de, 0x50de, - 0x50de, 0x50de, 0x50df, 0x50df, 0x50df, 0x50df, 0x50e0, 0x50e0, - 0x50e0, 0x50e0, 0x50e1, 0x50e1, 0x50e1, 0x50e1, 0x50e2, 0x50e2, - 0x50e2, 0x50e2, 0x50e2, 0x50e3, 0x50e3, 0x50e3, 0x50e3, 0x50e4, - 0x50e4, 0x50e4, 0x50e4, 0x50e5, 0x50e5, 0x50e5, 0x50e5, 0x50e6, - 0x50e6, 0x50e6, 0x50e6, 0x50e7, 0x50e7, 0x50e7, 0x50e7, 0x50e8, - 0x50e8, 0x50e8, 0x50e8, 0x50e8, 0x50e9, 0x50e9, 0x50e9, 0x50e9, - 0x50ea, 0x50ea, 0x50ea, 0x50ea, 0x50eb, 0x50eb, 0x50eb, 0x50eb, - 0x50ec, 0x50ec, 0x50ec, 0x50ec, 0x50ec, 0x50ed, 0x50ed, 0x50ed, - 0x50ed, 0x50ee, 0x50ee, 0x50ee, 0x50ee, 0x50ef, 0x50ef, 0x50ef, - 0x50ef, 0x50ef, 0x50f0, 0x50f0, 0x50f0, 0x50f0, 0x50f1, 0x50f1, - 0x50f1, 0x50f1, 0x50f2, 0x50f2, 0x50f2, 0x50f2, 0x50f2, 0x50f3, - 0x50f3, 0x50f3, 0x50f3, 0x50f4, 0x50f4, 0x50f4, 0x50f4, 0x50f4, - 0x50f5, 0x50f5, 0x50f5, 0x50f5, 0x50f6, 0x50f6, 0x50f6, 0x50f6, - 0x50f6, 0x50f7, 0x50f7, 0x50f7, 0x50f7, 0x50f8, 0x50f8, 0x50f8, - 0x50f8, 0x50f8, 0x50f9, 0x50f9, 0x50f9, 0x50f9, 0x50fa, 0x50fa, - 0x50fa, 0x50fa, 0x50fa, 0x50fb, 0x50fb, 0x50fb, 0x50fb, 0x50fc, - 0x50fc, 0x50fc, 0x50fc, 0x50fc, 0x50fd, 0x50fd, 0x50fd, 0x50fd, - 0x50fe, 0x50fe, 0x50fe, 0x50fe, 0x50fe, 0x50ff, 0x50ff, 0x50ff, - 0x50ff, 0x5100, 0x5100, 0x5100, 0x5100, 0x5100, 0x5101, 0x5101, - 0x5101, 0x5101, 0x5101, 0x5102, 0x5102, 0x5102, 0x5102, 0x5103, - 0x5103, 0x5103, 0x5103, 0x5103, 0x5104, 0x5104, 0x5104, 0x5104, - 0x5104, 0x5105, 0x5105, 0x5105, 0x5105, 0x5105, 0x5106, 0x5106, - 0x5106, 0x5106, 0x5107, 0x5107, 0x5107, 0x5107, 0x5107, 0x5108, - 0x5108, 0x5108, 0x5108, 0x5108, 0x5109, 0x5109, 0x5109, 0x5109, - 0x5109, 0x510a, 0x510a, 0x510a, 0x510a, 0x510a, 0x510b, 0x510b, - 0x510b, 0x510b, 0x510c, 0x510c, 0x510c, 0x510c, 0x510c, 0x510d, - 0x510d, 0x510d, 0x510d, 0x510d, 0x510e, 0x510e, 0x510e, 0x510e, - 0x510e, 0x510f, 0x510f, 0x510f, 0x510f, 0x510f, 0x5110, 0x5110, - 0x5110, 0x5110, 0x5110, 0x5111, 0x5111, 0x5111, 0x5111, 0x5111, - 0x5112, 0x5112, 0x5112, 0x5112, 0x5112, 0x5113, 0x5113, 0x5113, - 0x5113, 0x5113, 0x5114, 0x5114, 0x5114, 0x5114, 0x5114, 0x5115, - 0x5115, 0x5115, 0x5115, 0x5115, 0x5116, 0x5116, 0x5116, 0x5116, - 0x5116, 0x5117, 0x5117, 0x5117, 0x5117, 0x5117, 0x5118, 0x5118, - 0x5118, 0x5118, 0x5118, 0x5119, 0x5119, 0x5119, 0x5119, 0x5119, - 0x511a, 0x511a, 0x511a, 0x511a, 0x511a, 0x511b, 0x511b, 0x511b, - 0x511b, 0x511b, 0x511c, 0x511c, 0x511c, 0x511c, 0x511c, 0x511c, - 0x511d, 0x511d, 0x511d, 0x511d, 0x511d, 0x511e, 0x511e, 0x511e, - 0x511e, 0x511e, 0x511f, 0x511f, 0x511f, 0x511f, 0x511f, 0x5120, - 0x5120, 0x5120, 0x5120, 0x5120, 0x5120, 0x5121, 0x5121, 0x5121, - 0x5121, 0x5121, 0x5122, 0x5122, 0x5122, 0x5122, 0x5122, 0x5123, - 0x5123, 0x5123, 0x5123, 0x5123, 0x5124, 0x5124, 0x5124, 0x5124, - 0x5124, 0x5124, 0x5125, 0x5125, 0x5125, 0x5125, 0x5125, 0x5126, - 0x5126, 0x5126, 0x5126, 0x5126, 0x5127, 0x5127, 0x5127, 0x5127, - 0x5127, 0x5127, 0x5128, 0x5128, 0x5128, 0x5128, 0x5128, 0x5129, - 0x5129, 0x5129, 0x5129, 0x5129, 0x5129, 0x512a, 0x512a, 0x512a, - 0x512a, 0x512a, 0x512b, 0x512b, 0x512b, 0x512b, 0x512b, 0x512b, - 0x512c, 0x512c, 0x512c, 0x512c, 0x512c, 0x512d, 0x512d, 0x512d, - 0x512d, 0x512d, 0x512d, 0x512e, 0x512e, 0x512e, 0x512e, 0x512e, - 0x512f, 0x512f, 0x512f, 0x512f, 0x512f, 0x512f, 0x5130, 0x5130, - 0x5130, 0x5130, 0x5130, 0x5131, 0x5131, 0x5131, 0x5131, 0x5131, - 0x5131, 0x5132, 0x5132, 0x5132, 0x5132, 0x5132, 0x5132, 0x5133, - 0x5133, 0x5133, 0x5133, 0x5133, 0x5134, 0x5134, 0x5134, 0x5134, - 0x5134, 0x5134, 0x5135, 0x5135, 0x5135, 0x5135, 0x5135, 0x5135, - 0x5136, 0x5136, 0x5136, 0x5136, 0x5136, 0x5137, 0x5137, 0x5137, - 0x5137, 0x5137, 0x5137, 0x5138, 0x5138, 0x5138, 0x5138, 0x5138, - 0x5138, 0x5139, 0x5139, 0x5139, 0x5139, 0x5139, 0x5139, 0x513a, - 0x513a, 0x513a, 0x513a, 0x513a, 0x513a, 0x513b, 0x513b, 0x513b, - 0x513b, 0x513b, 0x513c, 0x513c, 0x513c, 0x513c, 0x513c, 0x513c, - 0x513d, 0x513d, 0x513d, 0x513d, 0x513d, 0x513d, 0x513e, 0x513e, - 0x513e, 0x513e, 0x513e, 0x513e, 0x513f, 0x513f, 0x513f, 0x513f, - 0x513f, 0x513f, 0x5140, 0x5140, 0x5140, 0x5140, 0x5140, 0x5140, - 0x5141, 0x5141, 0x5141, 0x5141, 0x5141, 0x5141, 0x5142, 0x5142, - 0x5142, 0x5142, 0x5142, 0x5142, 0x5143, 0x5143, 0x5143, 0x5143, - 0x5143, 0x5143, 0x5144, 0x5144, 0x5144, 0x5144, 0x5144, 0x5144, - 0x5145, 0x5145, 0x5145, 0x5145, 0x5145, 0x5145, 0x5146, 0x5146, - 0x5146, 0x5146, 0x5146, 0x5146, 0x5147, 0x5147, 0x5147, 0x5147, - 0x5147, 0x5147, 0x5148, 0x5148, 0x5148, 0x5148, 0x5148, 0x5148, - 0x5149, 0x5149, 0x5149, 0x5149, 0x5149, 0x5149, 0x5149, 0x514a, - 0x514a, 0x514a, 0x514a, 0x514a, 0x514a, 0x514b, 0x514b, 0x514b, - 0x514b, 0x514b, 0x514b, 0x514c, 0x514c, 0x514c, 0x514c, 0x514c, - 0x514c, 0x514d, 0x514d, 0x514d, 0x514d, 0x514d, 0x514d, 0x514d, - 0x514e, 0x514e, 0x514e, 0x514e, 0x514e, 0x514e, 0x514f, 0x514f, - 0x514f, 0x514f, 0x514f, 0x514f, 0x5150, 0x5150, 0x5150, 0x5150, - 0x5150, 0x5150, 0x5150, 0x5151, 0x5151, 0x5151, 0x5151, 0x5151, - 0x5151, 0x5152, 0x5152, 0x5152, 0x5152, 0x5152, 0x5152, 0x5153, - 0x5153, 0x5153, 0x5153, 0x5153, 0x5153, 0x5153, 0x5154, 0x5154, - 0x5154, 0x5154, 0x5154, 0x5154, 0x5155, 0x5155, 0x5155, 0x5155, - 0x5155, 0x5155, 0x5155, 0x5156, 0x5156, 0x5156, 0x5156, 0x5156, - 0x5156, 0x5157, 0x5157, 0x5157, 0x5157, 0x5157, 0x5157, 0x5157, - 0x5158, 0x5158, 0x5158, 0x5158, 0x5158, 0x5158, 0x5159, 0x5159, - 0x5159, 0x5159, 0x5159, 0x5159, 0x5159, 0x515a, 0x515a, 0x515a, - 0x515a, 0x515a, 0x515a, 0x515b, 0x515b, 0x515b, 0x515b, 0x515b, - 0x515b, 0x515b, 0x515c, 0x515c, 0x515c, 0x515c, 0x515c, 0x515c, - 0x515c, 0x515d, 0x515d, 0x515d, 0x515d, 0x515d, 0x515d, 0x515e, - 0x515e, 0x515e, 0x515e, 0x515e, 0x515e, 0x515e, 0x515f, 0x515f, - 0x515f, 0x515f, 0x515f, 0x515f, 0x515f, 0x5160, 0x5160, 0x5160, - 0x5160, 0x5160, 0x5160, 0x5161, 0x5161, 0x5161, 0x5161, 0x5161, - 0x5161, 0x5161, 0x5162, 0x5162, 0x5162, 0x5162, 0x5162, 0x5162, - 0x5162, 0x5163, 0x5163, 0x5163, 0x5163, 0x5163, 0x5163, 0x5163, - 0x5164, 0x5164, 0x5164, 0x5164, 0x5164, 0x5164, 0x5164, 0x5165, - 0x5165, 0x5165, 0x5165, 0x5165, 0x5165, 0x5165, 0x5166, 0x5166, - 0x5166, 0x5166, 0x5166, 0x5166, 0x5167, 0x5167, 0x5167, 0x5167, - 0x5167, 0x5167, 0x5167, 0x5168, 0x5168, 0x5168, 0x5168, 0x5168, - 0x5168, 0x5168, 0x5169, 0x5169, 0x5169, 0x5169, 0x5169, 0x5169, - 0x5169, 0x516a, 0x516a, 0x516a, 0x516a, 0x516a, 0x516a, 0x516a, - 0x516b, 0x516b, 0x516b, 0x516b, 0x516b, 0x516b, 0x516b, 0x516c, - 0x516c, 0x516c, 0x516c, 0x516c, 0x516c, 0x516c, 0x516d, 0x516d, - 0x516d, 0x516d, 0x516d, 0x516d, 0x516d, 0x516d, 0x516e, 0x516e, - 0x516e, 0x516e, 0x516e, 0x516e, 0x516e, 0x516f, 0x516f, 0x516f, - 0x516f, 0x516f, 0x516f, 0x516f, 0x5170, 0x5170, 0x5170, 0x5170, - 0x5170, 0x5170, 0x5170, 0x5171, 0x5171, 0x5171, 0x5171, 0x5171, - 0x5171, 0x5171, 0x5172, 0x5172, 0x5172, 0x5172, 0x5172, 0x5172, - 0x5172, 0x5173, 0x5173, 0x5173, 0x5173, 0x5173, 0x5173, 0x5173, - 0x5173, 0x5174, 0x5174, 0x5174, 0x5174, 0x5174, 0x5174, 0x5174, - 0x5175, 0x5175, 0x5175, 0x5175, 0x5175, 0x5175, 0x5175, 0x5176, - 0x5176, 0x5176, 0x5176, 0x5176, 0x5176, 0x5176, 0x5176, 0x5177, - 0x5177, 0x5177, 0x5177, 0x5177, 0x5177, 0x5177, 0x5178, 0x5178, - 0x5178, 0x5178, 0x5178, 0x5178, 0x5178, 0x5178, 0x5179, 0x5179, - 0x5179, 0x5179, 0x5179, 0x5179, 0x5179, 0x517a, 0x517a, 0x517a, - 0x517a, 0x517a, 0x517a, 0x517a, 0x517b, 0x517b, 0x517b, 0x517b, - 0x517b, 0x517b, 0x517b, 0x517b, 0x517c, 0x517c, 0x517c, 0x517c, - 0x517c, 0x517c, 0x517c, 0x517d, 0x517d, 0x517d, 0x517d, 0x517d, - 0x517d, 0x517d, 0x517d, 0x517e, 0x517e, 0x517e, 0x517e, 0x517e, - 0x517e, 0x517e, 0x517e, 0x517f, 0x517f, 0x517f, 0x517f, 0x517f, - 0x517f, 0x517f, 0x5180, 0x5180, 0x5180, 0x5180, 0x5180, 0x5180, - 0x5180, 0x5180, 0x5181, 0x5181, 0x5181, 0x5181, 0x5181, 0x5181, - 0x5181, 0x5181, 0x5182, 0x5182, 0x5182, 0x5182, 0x5182, 0x5182, - 0x5182, 0x5183, 0x5183, 0x5183, 0x5183, 0x5183, 0x5183, 0x5183, - 0x5183, 0x5184, 0x5184, 0x5184, 0x5184, 0x5184, 0x5184, 0x5184, - 0x5184, 0x5185, 0x5185, 0x5185, 0x5185, 0x5185, 0x5185, 0x5185, - 0x5185, 0x5186, 0x5186, 0x5186, 0x5186, 0x5186, 0x5186, 0x5186, - 0x5187, 0x5187, 0x5187, 0x5187, 0x5187, 0x5187, 0x5187, 0x5187, - 0x5188, 0x5188, 0x5188, 0x5188, 0x5188, 0x5188, 0x5188, 0x5188, - 0x5189, 0x5189, 0x5189, 0x5189, 0x5189, 0x5189, 0x5189, 0x5189, - 0x518a, 0x518a, 0x518a, 0x518a, 0x518a, 0x518a, 0x518a, 0x518a, - 0x518b, 0x518b, 0x518b, 0x518b, 0x518b, 0x518b, 0x518b, 0x518b, - 0x518c, 0x518c, 0x518c, 0x518c, 0x518d, 0x518d, 0x518d, 0x518d, - 0x518e, 0x518e, 0x518e, 0x518e, 0x518f, 0x518f, 0x518f, 0x518f, - 0x5190, 0x5190, 0x5190, 0x5190, 0x5191, 0x5191, 0x5191, 0x5191, - 0x5191, 0x5192, 0x5192, 0x5192, 0x5192, 0x5193, 0x5193, 0x5193, - 0x5193, 0x5194, 0x5194, 0x5194, 0x5194, 0x5195, 0x5195, 0x5195, - 0x5195, 0x5196, 0x5196, 0x5196, 0x5196, 0x5197, 0x5197, 0x5197, - 0x5197, 0x5198, 0x5198, 0x5198, 0x5198, 0x5198, 0x5199, 0x5199, - 0x5199, 0x5199, 0x519a, 0x519a, 0x519a, 0x519a, 0x519b, 0x519b, - 0x519b, 0x519b, 0x519c, 0x519c, 0x519c, 0x519c, 0x519c, 0x519d, - 0x519d, 0x519d, 0x519d, 0x519e, 0x519e, 0x519e, 0x519e, 0x519f, - 0x519f, 0x519f, 0x519f, 0x51a0, 0x51a0, 0x51a0, 0x51a0, 0x51a0, - 0x51a1, 0x51a1, 0x51a1, 0x51a1, 0x51a2, 0x51a2, 0x51a2, 0x51a2, - 0x51a3, 0x51a3, 0x51a3, 0x51a3, 0x51a3, 0x51a4, 0x51a4, 0x51a4, - 0x51a4, 0x51a5, 0x51a5, 0x51a5, 0x51a5, 0x51a5, 0x51a6, 0x51a6, - 0x51a6, 0x51a6, 0x51a7, 0x51a7, 0x51a7, 0x51a7, 0x51a7, 0x51a8, - 0x51a8, 0x51a8, 0x51a8, 0x51a9, 0x51a9, 0x51a9, 0x51a9, 0x51a9, - 0x51aa, 0x51aa, 0x51aa, 0x51aa, 0x51ab, 0x51ab, 0x51ab, 0x51ab, - 0x51ab, 0x51ac, 0x51ac, 0x51ac, 0x51ac, 0x51ad, 0x51ad, 0x51ad, - 0x51ad, 0x51ad, 0x51ae, 0x51ae, 0x51ae, 0x51ae, 0x51af, 0x51af, - 0x51af, 0x51af, 0x51af, 0x51b0, 0x51b0, 0x51b0, 0x51b0, 0x51b1, - 0x51b1, 0x51b1, 0x51b1, 0x51b1, 0x51b2, 0x51b2, 0x51b2, 0x51b2, - 0x51b2, 0x51b3, 0x51b3, 0x51b3, 0x51b3, 0x51b4, 0x51b4, 0x51b4, - 0x51b4, 0x51b4, 0x51b5, 0x51b5, 0x51b5, 0x51b5, 0x51b5, 0x51b6, - 0x51b6, 0x51b6, 0x51b6, 0x51b7, 0x51b7, 0x51b7, 0x51b7, 0x51b7, - 0x51b8, 0x51b8, 0x51b8, 0x51b8, 0x51b8, 0x51b9, 0x51b9, 0x51b9, - 0x51b9, 0x51b9, 0x51ba, 0x51ba, 0x51ba, 0x51ba, 0x51ba, 0x51bb, - 0x51bb, 0x51bb, 0x51bb, 0x51bc, 0x51bc, 0x51bc, 0x51bc, 0x51bc, - 0x51bd, 0x51bd, 0x51bd, 0x51bd, 0x51bd, 0x51be, 0x51be, 0x51be, - 0x51be, 0x51be, 0x51bf, 0x51bf, 0x51bf, 0x51bf, 0x51bf, 0x51c0, - 0x51c0, 0x51c0, 0x51c0, 0x51c0, 0x51c1, 0x51c1, 0x51c1, 0x51c1, - 0x51c1, 0x51c2, 0x51c2, 0x51c2, 0x51c2, 0x51c2, 0x51c3, 0x51c3, - 0x51c3, 0x51c3, 0x51c3, 0x51c4, 0x51c4, 0x51c4, 0x51c4, 0x51c4, - 0x51c5, 0x51c5, 0x51c5, 0x51c5, 0x51c5, 0x51c6, 0x51c6, 0x51c6, - 0x51c6, 0x51c6, 0x51c7, 0x51c7, 0x51c7, 0x51c7, 0x51c7, 0x51c8, - 0x51c8, 0x51c8, 0x51c8, 0x51c8, 0x51c9, 0x51c9, 0x51c9, 0x51c9, - 0x51c9, 0x51ca, 0x51ca, 0x51ca, 0x51ca, 0x51ca, 0x51cb, 0x51cb, - 0x51cb, 0x51cb, 0x51cb, 0x51cc, 0x51cc, 0x51cc, 0x51cc, 0x51cc, - 0x51cd, 0x51cd, 0x51cd, 0x51cd, 0x51cd, 0x51ce, 0x51ce, 0x51ce, - 0x51ce, 0x51ce, 0x51ce, 0x51cf, 0x51cf, 0x51cf, 0x51cf, 0x51cf, - 0x51d0, 0x51d0, 0x51d0, 0x51d0, 0x51d0, 0x51d1, 0x51d1, 0x51d1, - 0x51d1, 0x51d1, 0x51d2, 0x51d2, 0x51d2, 0x51d2, 0x51d2, 0x51d3, - 0x51d3, 0x51d3, 0x51d3, 0x51d3, 0x51d3, 0x51d4, 0x51d4, 0x51d4, - 0x51d4, 0x51d4, 0x51d5, 0x51d5, 0x51d5, 0x51d5, 0x51d5, 0x51d6, - 0x51d6, 0x51d6, 0x51d6, 0x51d6, 0x51d6, 0x51d7, 0x51d7, 0x51d7, - 0x51d7, 0x51d7, 0x51d8, 0x51d8, 0x51d8, 0x51d8, 0x51d8, 0x51d9, - 0x51d9, 0x51d9, 0x51d9, 0x51d9, 0x51d9, 0x51da, 0x51da, 0x51da, - 0x51da, 0x51da, 0x51db, 0x51db, 0x51db, 0x51db, 0x51db, 0x51db, - 0x51dc, 0x51dc, 0x51dc, 0x51dc, 0x51dc, 0x51dd, 0x51dd, 0x51dd, - 0x51dd, 0x51dd, 0x51dd, 0x51de, 0x51de, 0x51de, 0x51de, 0x51de, - 0x51df, 0x51df, 0x51df, 0x51df, 0x51df, 0x51df, 0x51e0, 0x51e0, - 0x51e0, 0x51e0, 0x51e0, 0x51e1, 0x51e1, 0x51e1, 0x51e1, 0x51e1, - 0x51e1, 0x51e2, 0x51e2, 0x51e2, 0x51e2, 0x51e2, 0x51e2, 0x51e3, - 0x51e3, 0x51e3, 0x51e3, 0x51e3, 0x51e4, 0x51e4, 0x51e4, 0x51e4, - 0x51e4, 0x51e4, 0x51e5, 0x51e5, 0x51e5, 0x51e5, 0x51e5, 0x51e5, - 0x51e6, 0x51e6, 0x51e6, 0x51e6, 0x51e6, 0x51e7, 0x51e7, 0x51e7, - 0x51e7, 0x51e7, 0x51e7, 0x51e8, 0x51e8, 0x51e8, 0x51e8, 0x51e8, - 0x51e8, 0x51e9, 0x51e9, 0x51e9, 0x51e9, 0x51e9, 0x51ea, 0x51ea, - 0x51ea, 0x51ea, 0x51ea, 0x51ea, 0x51eb, 0x51eb, 0x51eb, 0x51eb, - 0x51eb, 0x51eb, 0x51ec, 0x51ec, 0x51ec, 0x51ec, 0x51ec, 0x51ec, - 0x51ed, 0x51ed, 0x51ed, 0x51ed, 0x51ed, 0x51ed, 0x51ee, 0x51ee, - 0x51ee, 0x51ee, 0x51ee, 0x51ee, 0x51ef, 0x51ef, 0x51ef, 0x51ef, - 0x51ef, 0x51f0, 0x51f0, 0x51f0, 0x51f0, 0x51f0, 0x51f0, 0x51f1, - 0x51f1, 0x51f1, 0x51f1, 0x51f1, 0x51f1, 0x51f2, 0x51f2, 0x51f2, - 0x51f2, 0x51f2, 0x51f2, 0x51f3, 0x51f3, 0x51f3, 0x51f3, 0x51f3, - 0x51f3, 0x51f4, 0x51f4, 0x51f4, 0x51f4, 0x51f4, 0x51f4, 0x51f5, - 0x51f5, 0x51f5, 0x51f5, 0x51f5, 0x51f5, 0x51f6, 0x51f6, 0x51f6, - 0x51f6, 0x51f6, 0x51f6, 0x51f7, 0x51f7, 0x51f7, 0x51f7, 0x51f7, - 0x51f7, 0x51f7, 0x51f8, 0x51f8, 0x51f8, 0x51f8, 0x51f8, 0x51f8, - 0x51f9, 0x51f9, 0x51f9, 0x51f9, 0x51f9, 0x51f9, 0x51fa, 0x51fa, - 0x51fa, 0x51fa, 0x51fa, 0x51fa, 0x51fb, 0x51fb, 0x51fb, 0x51fb, - 0x51fb, 0x51fb, 0x51fc, 0x51fc, 0x51fc, 0x51fc, 0x51fc, 0x51fc, - 0x51fd, 0x51fd, 0x51fd, 0x51fd, 0x51fd, 0x51fd, 0x51fd, 0x51fe, - 0x51fe, 0x51fe, 0x51fe, 0x51fe, 0x51fe, 0x51ff, 0x51ff, 0x51ff, - 0x51ff, 0x51ff, 0x51ff, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, - 0x5200, 0x5201, 0x5201, 0x5201, 0x5201, 0x5201, 0x5201, 0x5201, - 0x5202, 0x5202, 0x5202, 0x5202, 0x5202, 0x5202, 0x5203, 0x5203, - 0x5203, 0x5203, 0x5203, 0x5203, 0x5204, 0x5204, 0x5204, 0x5204, - 0x5204, 0x5204, 0x5204, 0x5205, 0x5205, 0x5205, 0x5205, 0x5205, - 0x5205, 0x5206, 0x5206, 0x5206, 0x5206, 0x5206, 0x5206, 0x5206, - 0x5207, 0x5207, 0x5207, 0x5207, 0x5207, 0x5207, 0x5208, 0x5208, - 0x5208, 0x5208, 0x5208, 0x5208, 0x5208, 0x5209, 0x5209, 0x5209, - 0x5209, 0x5209, 0x5209, 0x520a, 0x520a, 0x520a, 0x520a, 0x520a, - 0x520a, 0x520a, 0x520b, 0x520b, 0x520b, 0x520b, 0x520b, 0x520b, - 0x520c, 0x520c, 0x520c, 0x520c, 0x520c, 0x520c, 0x520c, 0x520d, - 0x520d, 0x520d, 0x520d, 0x520d, 0x520d, 0x520d, 0x520e, 0x520e, - 0x520e, 0x520e, 0x520e, 0x520e, 0x520f, 0x520f, 0x520f, 0x520f, - 0x520f, 0x520f, 0x520f, 0x5210, 0x5210, 0x5210, 0x5210, 0x5210, - 0x5210, 0x5210, 0x5211, 0x5211, 0x5211, 0x5211, 0x5211, 0x5211, - 0x5212, 0x5212, 0x5212, 0x5212, 0x5212, 0x5212, 0x5212, 0x5213, - 0x5213, 0x5213, 0x5213, 0x5213, 0x5213, 0x5213, 0x5214, 0x5214, - 0x5214, 0x5214, 0x5214, 0x5214, 0x5214, 0x5215, 0x5215, 0x5215, - 0x5215, 0x5215, 0x5215, 0x5215, 0x5216, 0x5216, 0x5216, 0x5216, - 0x5216, 0x5216, 0x5217, 0x5217, 0x5217, 0x5217, 0x5217, 0x5217, - 0x5217, 0x5218, 0x5218, 0x5218, 0x5218, 0x5218, 0x5218, 0x5218, - 0x5219, 0x5219, 0x5219, 0x5219, 0x5219, 0x5219, 0x5219, 0x521a, - 0x521a, 0x521a, 0x521a, 0x521a, 0x521a, 0x521a, 0x521b, 0x521b, - 0x521b, 0x521b, 0x521b, 0x521b, 0x521b, 0x521c, 0x521c, 0x521c, - 0x521c, 0x521c, 0x521c, 0x521c, 0x521d, 0x521d, 0x521d, 0x521d, - 0x521d, 0x521d, 0x521d, 0x521e, 0x521e, 0x521e, 0x521e, 0x521e, - 0x521e, 0x521e, 0x521f, 0x521f, 0x521f, 0x521f, 0x521f, 0x521f, - 0x521f, 0x521f, 0x5220, 0x5220, 0x5220, 0x5220, 0x5220, 0x5220, - 0x5220, 0x5221, 0x5221, 0x5221, 0x5221, 0x5221, 0x5221, 0x5221, - 0x5222, 0x5222, 0x5222, 0x5222, 0x5222, 0x5222, 0x5222, 0x5223, - 0x5223, 0x5223, 0x5223, 0x5223, 0x5223, 0x5223, 0x5224, 0x5224, - 0x5224, 0x5224, 0x5224, 0x5224, 0x5224, 0x5224, 0x5225, 0x5225, - 0x5225, 0x5225, 0x5225, 0x5225, 0x5225, 0x5226, 0x5226, 0x5226, - 0x5226, 0x5226, 0x5226, 0x5226, 0x5227, 0x5227, 0x5227, 0x5227, - 0x5227, 0x5227, 0x5227, 0x5228, 0x5228, 0x5228, 0x5228, 0x5228, - 0x5228, 0x5228, 0x5228, 0x5229, 0x5229, 0x5229, 0x5229, 0x5229, - 0x5229, 0x5229, 0x522a, 0x522a, 0x522a, 0x522a, 0x522a, 0x522a, - 0x522a, 0x522a, 0x522b, 0x522b, 0x522b, 0x522b, 0x522b, 0x522b, - 0x522b, 0x522c, 0x522c, 0x522c, 0x522c, 0x522c, 0x522c, 0x522c, - 0x522c, 0x522d, 0x522d, 0x522d, 0x522d, 0x522d, 0x522d, 0x522d, - 0x522e, 0x522e, 0x522e, 0x522e, 0x522e, 0x522e, 0x522e, 0x522e, - 0x522f, 0x522f, 0x522f, 0x522f, 0x522f, 0x522f, 0x522f, 0x5230, - 0x5230, 0x5230, 0x5230, 0x5230, 0x5230, 0x5230, 0x5230, 0x5231, - 0x5231, 0x5231, 0x5231, 0x5231, 0x5231, 0x5231, 0x5232, 0x5232, - 0x5232, 0x5232, 0x5232, 0x5232, 0x5232, 0x5232, 0x5233, 0x5233, - 0x5233, 0x5233, 0x5233, 0x5233, 0x5233, 0x5233, 0x5234, 0x5234, - 0x5234, 0x5234, 0x5234, 0x5234, 0x5234, 0x5234, 0x5235, 0x5235, - 0x5235, 0x5235, 0x5235, 0x5235, 0x5235, 0x5236, 0x5236, 0x5236, - 0x5236, 0x5236, 0x5236, 0x5236, 0x5236, 0x5237, 0x5237, 0x5237, - 0x5237, 0x5237, 0x5237, 0x5237, 0x5237, 0x5238, 0x5238, 0x5238, - 0x5238, 0x5238, 0x5238, 0x5238, 0x5238, 0x5239, 0x5239, 0x5239, - 0x5239, 0x5239, 0x5239, 0x5239, 0x5239, 0x523a, 0x523a, 0x523a, - 0x523a, 0x523a, 0x523a, 0x523a, 0x523a, 0x523b, 0x523b, 0x523b, - 0x523b, 0x523b, 0x523b, 0x523b, 0x523c, 0x523c, 0x523c, 0x523c, - 0x523c, 0x523c, 0x523c, 0x523c, 0x523d, 0x523d, 0x523d, 0x523d, - 0x523d, 0x523d, 0x523e, 0x523e, 0x523e, 0x523e, 0x523f, 0x523f, - 0x523f, 0x523f, 0x523f, 0x5240, 0x5240, 0x5240, 0x5240, 0x5241, - 0x5241, 0x5241, 0x5241, 0x5242, 0x5242, 0x5242, 0x5242, 0x5243, - 0x5243, 0x5243, 0x5243, 0x5244, 0x5244, 0x5244, 0x5244, 0x5245, - 0x5245, 0x5245, 0x5245, 0x5246, 0x5246, 0x5246, 0x5246, 0x5247, - 0x5247, 0x5247, 0x5247, 0x5248, 0x5248, 0x5248, 0x5248, 0x5248, - 0x5249, 0x5249, 0x5249, 0x5249, 0x524a, 0x524a, 0x524a, 0x524a, - 0x524b, 0x524b, 0x524b, 0x524b, 0x524c, 0x524c, 0x524c, 0x524c, - 0x524d, 0x524d, 0x524d, 0x524d, 0x524d, 0x524e, 0x524e, 0x524e, - 0x524e, 0x524f, 0x524f, 0x524f, 0x524f, 0x5250, 0x5250, 0x5250, - 0x5250, 0x5251, 0x5251, 0x5251, 0x5251, 0x5251, 0x5252, 0x5252, - 0x5252, 0x5252, 0x5253, 0x5253, 0x5253, 0x5253, 0x5253, 0x5254, - 0x5254, 0x5254, 0x5254, 0x5255, 0x5255, 0x5255, 0x5255, 0x5256, - 0x5256, 0x5256, 0x5256, 0x5256, 0x5257, 0x5257, 0x5257, 0x5257, - 0x5258, 0x5258, 0x5258, 0x5258, 0x5258, 0x5259, 0x5259, 0x5259, - 0x5259, 0x525a, 0x525a, 0x525a, 0x525a, 0x525a, 0x525b, 0x525b, - 0x525b, 0x525b, 0x525c, 0x525c, 0x525c, 0x525c, 0x525c, 0x525d, - 0x525d, 0x525d, 0x525d, 0x525e, 0x525e, 0x525e, 0x525e, 0x525e, - 0x525f, 0x525f, 0x525f, 0x525f, 0x5260, 0x5260, 0x5260, 0x5260, - 0x5260, 0x5261, 0x5261, 0x5261, 0x5261, 0x5262, 0x5262, 0x5262, - 0x5262, 0x5262, 0x5263, 0x5263, 0x5263, 0x5263, 0x5263, 0x5264, - 0x5264, 0x5264, 0x5264, 0x5265, 0x5265, 0x5265, 0x5265, 0x5265, - 0x5266, 0x5266, 0x5266, 0x5266, 0x5266, 0x5267, 0x5267, 0x5267, - 0x5267, 0x5268, 0x5268, 0x5268, 0x5268, 0x5268, 0x5269, 0x5269, - 0x5269, 0x5269, 0x5269, 0x526a, 0x526a, 0x526a, 0x526a, 0x526a, - 0x526b, 0x526b, 0x526b, 0x526b, 0x526c, 0x526c, 0x526c, 0x526c, - 0x526c, 0x526d, 0x526d, 0x526d, 0x526d, 0x526d, 0x526e, 0x526e, - 0x526e, 0x526e, 0x526e, 0x526f, 0x526f, 0x526f, 0x526f, 0x526f, - 0x5270, 0x5270, 0x5270, 0x5270, 0x5270, 0x5271, 0x5271, 0x5271, - 0x5271, 0x5271, 0x5272, 0x5272, 0x5272, 0x5272, 0x5273, 0x5273, - 0x5273, 0x5273, 0x5273, 0x5274, 0x5274, 0x5274, 0x5274, 0x5274, - 0x5275, 0x5275, 0x5275, 0x5275, 0x5275, 0x5276, 0x5276, 0x5276, - 0x5276, 0x5276, 0x5277, 0x5277, 0x5277, 0x5277, 0x5277, 0x5278, - 0x5278, 0x5278, 0x5278, 0x5278, 0x5279, 0x5279, 0x5279, 0x5279, - 0x5279, 0x527a, 0x527a, 0x527a, 0x527a, 0x527a, 0x527a, 0x527b, - 0x527b, 0x527b, 0x527b, 0x527b, 0x527c, 0x527c, 0x527c, 0x527c, - 0x527c, 0x527d, 0x527d, 0x527d, 0x527d, 0x527d, 0x527e, 0x527e, - 0x527e, 0x527e, 0x527e, 0x527f, 0x527f, 0x527f, 0x527f, 0x527f, - 0x5280, 0x5280, 0x5280, 0x5280, 0x5280, 0x5281, 0x5281, 0x5281, - 0x5281, 0x5281, 0x5281, 0x5282, 0x5282, 0x5282, 0x5282, 0x5282, - 0x5283, 0x5283, 0x5283, 0x5283, 0x5283, 0x5284, 0x5284, 0x5284, - 0x5284, 0x5284, 0x5285, 0x5285, 0x5285, 0x5285, 0x5285, 0x5285, - 0x5286, 0x5286, 0x5286, 0x5286, 0x5286, 0x5287, 0x5287, 0x5287, - 0x5287, 0x5287, 0x5288, 0x5288, 0x5288, 0x5288, 0x5288, 0x5288, - 0x5289, 0x5289, 0x5289, 0x5289, 0x5289, 0x528a, 0x528a, 0x528a, - 0x528a, 0x528a, 0x528b, 0x528b, 0x528b, 0x528b, 0x528b, 0x528b, - 0x528c, 0x528c, 0x528c, 0x528c, 0x528c, 0x528d, 0x528d, 0x528d, - 0x528d, 0x528d, 0x528d, 0x528e, 0x528e, 0x528e, 0x528e, 0x528e, - 0x528f, 0x528f, 0x528f, 0x528f, 0x528f, 0x528f, 0x5290, 0x5290, - 0x5290, 0x5290, 0x5290, 0x5291, 0x5291, 0x5291, 0x5291, 0x5291, - 0x5291, 0x5292, 0x5292, 0x5292, 0x5292, 0x5292, 0x5293, 0x5293, - 0x5293, 0x5293, 0x5293, 0x5293, 0x5294, 0x5294, 0x5294, 0x5294, - 0x5294, 0x5294, 0x5295, 0x5295, 0x5295, 0x5295, 0x5295, 0x5296, - 0x5296, 0x5296, 0x5296, 0x5296, 0x5296, 0x5297, 0x5297, 0x5297, - 0x5297, 0x5297, 0x5297, 0x5298, 0x5298, 0x5298, 0x5298, 0x5298, - 0x5299, 0x5299, 0x5299, 0x5299, 0x5299, 0x5299, 0x529a, 0x529a, - 0x529a, 0x529a, 0x529a, 0x529a, 0x529b, 0x529b, 0x529b, 0x529b, - 0x529b, 0x529b, 0x529c, 0x529c, 0x529c, 0x529c, 0x529c, 0x529d, - 0x529d, 0x529d, 0x529d, 0x529d, 0x529d, 0x529e, 0x529e, 0x529e, - 0x529e, 0x529e, 0x529e, 0x529f, 0x529f, 0x529f, 0x529f, 0x529f, - 0x529f, 0x52a0, 0x52a0, 0x52a0, 0x52a0, 0x52a0, 0x52a0, 0x52a1, - 0x52a1, 0x52a1, 0x52a1, 0x52a1, 0x52a1, 0x52a2, 0x52a2, 0x52a2, - 0x52a2, 0x52a2, 0x52a2, 0x52a3, 0x52a3, 0x52a3, 0x52a3, 0x52a3, - 0x52a3, 0x52a4, 0x52a4, 0x52a4, 0x52a4, 0x52a4, 0x52a4, 0x52a5, - 0x52a5, 0x52a5, 0x52a5, 0x52a5, 0x52a5, 0x52a6, 0x52a6, 0x52a6, - 0x52a6, 0x52a6, 0x52a6, 0x52a7, 0x52a7, 0x52a7, 0x52a7, 0x52a7, - 0x52a7, 0x52a8, 0x52a8, 0x52a8, 0x52a8, 0x52a8, 0x52a8, 0x52a9, - 0x52a9, 0x52a9, 0x52a9, 0x52a9, 0x52a9, 0x52aa, 0x52aa, 0x52aa, - 0x52aa, 0x52aa, 0x52aa, 0x52ab, 0x52ab, 0x52ab, 0x52ab, 0x52ab, - 0x52ab, 0x52ac, 0x52ac, 0x52ac, 0x52ac, 0x52ac, 0x52ac, 0x52ad, - 0x52ad, 0x52ad, 0x52ad, 0x52ad, 0x52ad, 0x52ad, 0x52ae, 0x52ae, - 0x52ae, 0x52ae, 0x52ae, 0x52ae, 0x52af, 0x52af, 0x52af, 0x52af, - 0x52af, 0x52af, 0x52b0, 0x52b0, 0x52b0, 0x52b0, 0x52b0, 0x52b0, - 0x52b1, 0x52b1, 0x52b1, 0x52b1, 0x52b1, 0x52b1, 0x52b1, 0x52b2, - 0x52b2, 0x52b2, 0x52b2, 0x52b2, 0x52b2, 0x52b3, 0x52b3, 0x52b3, - 0x52b3, 0x52b3, 0x52b3, 0x52b4, 0x52b4, 0x52b4, 0x52b4, 0x52b4, - 0x52b4, 0x52b4, 0x52b5, 0x52b5, 0x52b5, 0x52b5, 0x52b5, 0x52b5, - 0x52b6, 0x52b6, 0x52b6, 0x52b6, 0x52b6, 0x52b6, 0x52b7, 0x52b7, - 0x52b7, 0x52b7, 0x52b7, 0x52b7, 0x52b7, 0x52b8, 0x52b8, 0x52b8, - 0x52b8, 0x52b8, 0x52b8, 0x52b9, 0x52b9, 0x52b9, 0x52b9, 0x52b9, - 0x52b9, 0x52b9, 0x52ba, 0x52ba, 0x52ba, 0x52ba, 0x52ba, 0x52ba, - 0x52bb, 0x52bb, 0x52bb, 0x52bb, 0x52bb, 0x52bb, 0x52bb, 0x52bc, - 0x52bc, 0x52bc, 0x52bc, 0x52bc, 0x52bc, 0x52bd, 0x52bd, 0x52bd, - 0x52bd, 0x52bd, 0x52bd, 0x52bd, 0x52be, 0x52be, 0x52be, 0x52be, - 0x52be, 0x52be, 0x52be, 0x52bf, 0x52bf, 0x52bf, 0x52bf, 0x52bf, - 0x52bf, 0x52c0, 0x52c0, 0x52c0, 0x52c0, 0x52c0, 0x52c0, 0x52c0, - 0x52c1, 0x52c1, 0x52c1, 0x52c1, 0x52c1, 0x52c1, 0x52c1, 0x52c2, - 0x52c2, 0x52c2, 0x52c2, 0x52c2, 0x52c2, 0x52c3, 0x52c3, 0x52c3, - 0x52c3, 0x52c3, 0x52c3, 0x52c3, 0x52c4, 0x52c4, 0x52c4, 0x52c4, - 0x52c4, 0x52c4, 0x52c4, 0x52c5, 0x52c5, 0x52c5, 0x52c5, 0x52c5, - 0x52c5, 0x52c5, 0x52c6, 0x52c6, 0x52c6, 0x52c6, 0x52c6, 0x52c6, - 0x52c6, 0x52c7, 0x52c7, 0x52c7, 0x52c7, 0x52c7, 0x52c7, 0x52c8, - 0x52c8, 0x52c8, 0x52c8, 0x52c8, 0x52c8, 0x52c8, 0x52c9, 0x52c9, - 0x52c9, 0x52c9, 0x52c9, 0x52c9, 0x52c9, 0x52ca, 0x52ca, 0x52ca, - 0x52ca, 0x52ca, 0x52ca, 0x52ca, 0x52cb, 0x52cb, 0x52cb, 0x52cb, - 0x52cb, 0x52cb, 0x52cb, 0x52cc, 0x52cc, 0x52cc, 0x52cc, 0x52cc, - 0x52cc, 0x52cc, 0x52cd, 0x52cd, 0x52cd, 0x52cd, 0x52cd, 0x52cd, - 0x52cd, 0x52ce, 0x52ce, 0x52ce, 0x52ce, 0x52ce, 0x52ce, 0x52ce, - 0x52cf, 0x52cf, 0x52cf, 0x52cf, 0x52cf, 0x52cf, 0x52cf, 0x52d0, - 0x52d0, 0x52d0, 0x52d0, 0x52d0, 0x52d0, 0x52d0, 0x52d1, 0x52d1, - 0x52d1, 0x52d1, 0x52d1, 0x52d1, 0x52d1, 0x52d2, 0x52d2, 0x52d2, - 0x52d2, 0x52d2, 0x52d2, 0x52d2, 0x52d2, 0x52d3, 0x52d3, 0x52d3, - 0x52d3, 0x52d3, 0x52d3, 0x52d3, 0x52d4, 0x52d4, 0x52d4, 0x52d4, - 0x52d4, 0x52d4, 0x52d4, 0x52d5, 0x52d5, 0x52d5, 0x52d5, 0x52d5, - 0x52d5, 0x52d5, 0x52d6, 0x52d6, 0x52d6, 0x52d6, 0x52d6, 0x52d6, - 0x52d6, 0x52d6, 0x52d7, 0x52d7, 0x52d7, 0x52d7, 0x52d7, 0x52d7, - 0x52d7, 0x52d8, 0x52d8, 0x52d8, 0x52d8, 0x52d8, 0x52d8, 0x52d8, - 0x52d9, 0x52d9, 0x52d9, 0x52d9, 0x52d9, 0x52d9, 0x52d9, 0x52d9, - 0x52da, 0x52da, 0x52da, 0x52da, 0x52da, 0x52da, 0x52da, 0x52db, - 0x52db, 0x52db, 0x52db, 0x52db, 0x52db, 0x52db, 0x52dc, 0x52dc, - 0x52dc, 0x52dc, 0x52dc, 0x52dc, 0x52dc, 0x52dc, 0x52dd, 0x52dd, - 0x52dd, 0x52dd, 0x52dd, 0x52dd, 0x52dd, 0x52de, 0x52de, 0x52de, - 0x52de, 0x52de, 0x52de, 0x52de, 0x52de, 0x52df, 0x52df, 0x52df, - 0x52df, 0x52df, 0x52df, 0x52df, 0x52e0, 0x52e0, 0x52e0, 0x52e0, - 0x52e0, 0x52e0, 0x52e0, 0x52e0, 0x52e1, 0x52e1, 0x52e1, 0x52e1, - 0x52e1, 0x52e1, 0x52e1, 0x52e2, 0x52e2, 0x52e2, 0x52e2, 0x52e2, - 0x52e2, 0x52e2, 0x52e2, 0x52e3, 0x52e3, 0x52e3, 0x52e3, 0x52e3, - 0x52e3, 0x52e3, 0x52e3, 0x52e4, 0x52e4, 0x52e4, 0x52e4, 0x52e4, - 0x52e4, 0x52e4, 0x52e5, 0x52e5, 0x52e5, 0x52e5, 0x52e5, 0x52e5, - 0x52e5, 0x52e5, 0x52e6, 0x52e6, 0x52e6, 0x52e6, 0x52e6, 0x52e6, - 0x52e6, 0x52e6, 0x52e7, 0x52e7, 0x52e7, 0x52e7, 0x52e7, 0x52e7, - 0x52e7, 0x52e7, 0x52e8, 0x52e8, 0x52e8, 0x52e8, 0x52e8, 0x52e8, - 0x52e8, 0x52e9, 0x52e9, 0x52e9, 0x52e9, 0x52e9, 0x52e9, 0x52e9, - 0x52e9, 0x52ea, 0x52ea, 0x52ea, 0x52ea, 0x52ea, 0x52ea, 0x52ea, - 0x52ea, 0x52eb, 0x52eb, 0x52eb, 0x52eb, 0x52eb, 0x52eb, 0x52eb, - 0x52eb, 0x52ec, 0x52ec, 0x52ec, 0x52ec, 0x52ec, 0x52ec, 0x52ec, - 0x52ec, 0x52ed, 0x52ed, 0x52ed, 0x52ed, 0x52ed, 0x52ed, 0x52ed, - 0x52ed, 0x52ee, 0x52ee, 0x52ee, 0x52ee, 0x52ee, 0x52ee, 0x52ee, - 0x52ee, 0x52ef, 0x52ef, 0x52ef, 0x52ef, 0x52f0, 0x52f0, 0x52f0, - 0x52f0, 0x52f1, 0x52f1, 0x52f1, 0x52f1, 0x52f2, 0x52f2, 0x52f2, - 0x52f2, 0x52f3, 0x52f3, 0x52f3, 0x52f3, 0x52f4, 0x52f4, 0x52f4, - 0x52f4, 0x52f5, 0x52f5, 0x52f5, 0x52f5, 0x52f6, 0x52f6, 0x52f6, - 0x52f6, 0x52f7, 0x52f7, 0x52f7, 0x52f7, 0x52f8, 0x52f8, 0x52f8, - 0x52f8, 0x52f9, 0x52f9, 0x52f9, 0x52f9, 0x52f9, 0x52fa, 0x52fa, - 0x52fa, 0x52fa, 0x52fb, 0x52fb, 0x52fb, 0x52fb, 0x52fc, 0x52fc, - 0x52fc, 0x52fc, 0x52fd, 0x52fd, 0x52fd, 0x52fd, 0x52fe, 0x52fe, - 0x52fe, 0x52fe, 0x52fe, 0x52ff, 0x52ff, 0x52ff, 0x52ff, 0x5300, - 0x5300, 0x5300, 0x5300, 0x5301, 0x5301, 0x5301, 0x5301, 0x5301, - 0x5302, 0x5302, 0x5302, 0x5302, 0x5303, 0x5303, 0x5303, 0x5303, - 0x5304, 0x5304, 0x5304, 0x5304, 0x5304, 0x5305, 0x5305, 0x5305, - 0x5305, 0x5306, 0x5306, 0x5306, 0x5306, 0x5307, 0x5307, 0x5307, - 0x5307, 0x5307, 0x5308, 0x5308, 0x5308, 0x5308, 0x5309, 0x5309, - 0x5309, 0x5309, 0x5309, 0x530a, 0x530a, 0x530a, 0x530a, 0x530b, - 0x530b, 0x530b, 0x530b, 0x530b, 0x530c, 0x530c, 0x530c, 0x530c, - 0x530d, 0x530d, 0x530d, 0x530d, 0x530d, 0x530e, 0x530e, 0x530e, - 0x530e, 0x530f, 0x530f, 0x530f, 0x530f, 0x530f, 0x5310, 0x5310, - 0x5310, 0x5310, 0x5311, 0x5311, 0x5311, 0x5311, 0x5311, 0x5312, - 0x5312, 0x5312, 0x5312, 0x5313, 0x5313, 0x5313, 0x5313, 0x5313, - 0x5314, 0x5314, 0x5314, 0x5314, 0x5314, 0x5315, 0x5315, 0x5315, - 0x5315, 0x5316, 0x5316, 0x5316, 0x5316, 0x5316, 0x5317, 0x5317, - 0x5317, 0x5317, 0x5317, 0x5318, 0x5318, 0x5318, 0x5318, 0x5319, - 0x5319, 0x5319, 0x5319, 0x5319, 0x531a, 0x531a, 0x531a, 0x531a, - 0x531a, 0x531b, 0x531b, 0x531b, 0x531b, 0x531c, 0x531c, 0x531c, - 0x531c, 0x531c, 0x531d, 0x531d, 0x531d, 0x531d, 0x531d, 0x531e, - 0x531e, 0x531e, 0x531e, 0x531e, 0x531f, 0x531f, 0x531f, 0x531f, - 0x531f, 0x5320, 0x5320, 0x5320, 0x5320, 0x5320, 0x5321, 0x5321, - 0x5321, 0x5321, 0x5322, 0x5322, 0x5322, 0x5322, 0x5322, 0x5323, - 0x5323, 0x5323, 0x5323, 0x5323, 0x5324, 0x5324, 0x5324, 0x5324, - 0x5324, 0x5325, 0x5325, 0x5325, 0x5325, 0x5325, 0x5326, 0x5326, - 0x5326, 0x5326, 0x5326, 0x5327, 0x5327, 0x5327, 0x5327, 0x5327, - 0x5328, 0x5328, 0x5328, 0x5328, 0x5328, 0x5329, 0x5329, 0x5329, - 0x5329, 0x5329, 0x532a, 0x532a, 0x532a, 0x532a, 0x532a, 0x532b, - 0x532b, 0x532b, 0x532b, 0x532b, 0x532c, 0x532c, 0x532c, 0x532c, - 0x532c, 0x532d, 0x532d, 0x532d, 0x532d, 0x532d, 0x532e, 0x532e, - 0x532e, 0x532e, 0x532e, 0x532e, 0x532f, 0x532f, 0x532f, 0x532f, - 0x532f, 0x5330, 0x5330, 0x5330, 0x5330, 0x5330, 0x5331, 0x5331, - 0x5331, 0x5331, 0x5331, 0x5332, 0x5332, 0x5332, 0x5332, 0x5332, - 0x5333, 0x5333, 0x5333, 0x5333, 0x5333, 0x5333, 0x5334, 0x5334, - 0x5334, 0x5334, 0x5334, 0x5335, 0x5335, 0x5335, 0x5335, 0x5335, - 0x5336, 0x5336, 0x5336, 0x5336, 0x5336, 0x5337, 0x5337, 0x5337, - 0x5337, 0x5337, 0x5337, 0x5338, 0x5338, 0x5338, 0x5338, 0x5338, - 0x5339, 0x5339, 0x5339, 0x5339, 0x5339, 0x533a, 0x533a, 0x533a, - 0x533a, 0x533a, 0x533a, 0x533b, 0x533b, 0x533b, 0x533b, 0x533b, - 0x533c, 0x533c, 0x533c, 0x533c, 0x533c, 0x533d, 0x533d, 0x533d, - 0x533d, 0x533d, 0x533d, 0x533e, 0x533e, 0x533e, 0x533e, 0x533e, - 0x533f, 0x533f, 0x533f, 0x533f, 0x533f, 0x533f, 0x5340, 0x5340, - 0x5340, 0x5340, 0x5340, 0x5341, 0x5341, 0x5341, 0x5341, 0x5341, - 0x5341, 0x5342, 0x5342, 0x5342, 0x5342, 0x5342, 0x5343, 0x5343, - 0x5343, 0x5343, 0x5343, 0x5343, 0x5344, 0x5344, 0x5344, 0x5344, - 0x5344, 0x5344, 0x5345, 0x5345, 0x5345, 0x5345, 0x5345, 0x5346, - 0x5346, 0x5346, 0x5346, 0x5346, 0x5346, 0x5347, 0x5347, 0x5347, - 0x5347, 0x5347, 0x5348, 0x5348, 0x5348, 0x5348, 0x5348, 0x5348, - 0x5349, 0x5349, 0x5349, 0x5349, 0x5349, 0x5349, 0x534a, 0x534a, - 0x534a, 0x534a, 0x534a, 0x534a, 0x534b, 0x534b, 0x534b, 0x534b, - 0x534b, 0x534c, 0x534c, 0x534c, 0x534c, 0x534c, 0x534c, 0x534d, - 0x534d, 0x534d, 0x534d, 0x534d, 0x534d, 0x534e, 0x534e, 0x534e, - 0x534e, 0x534e, 0x534e, 0x534f, 0x534f, 0x534f, 0x534f, 0x534f, - 0x5350, 0x5350, 0x5350, 0x5350, 0x5350, 0x5350, 0x5351, 0x5351, - 0x5351, 0x5351, 0x5351, 0x5351, 0x5352, 0x5352, 0x5352, 0x5352, - 0x5352, 0x5352, 0x5353, 0x5353, 0x5353, 0x5353, 0x5353, 0x5353, - 0x5354, 0x5354, 0x5354, 0x5354, 0x5354, 0x5354, 0x5355, 0x5355, - 0x5355, 0x5355, 0x5355, 0x5355, 0x5356, 0x5356, 0x5356, 0x5356, - 0x5356, 0x5356, 0x5357, 0x5357, 0x5357, 0x5357, 0x5357, 0x5357, - 0x5358, 0x5358, 0x5358, 0x5358, 0x5358, 0x5358, 0x5359, 0x5359, - 0x5359, 0x5359, 0x5359, 0x5359, 0x535a, 0x535a, 0x535a, 0x535a, - 0x535a, 0x535a, 0x535b, 0x535b, 0x535b, 0x535b, 0x535b, 0x535b, - 0x535c, 0x535c, 0x535c, 0x535c, 0x535c, 0x535c, 0x535d, 0x535d, - 0x535d, 0x535d, 0x535d, 0x535d, 0x535d, 0x535e, 0x535e, 0x535e, - 0x535e, 0x535e, 0x535e, 0x535f, 0x535f, 0x535f, 0x535f, 0x535f, - 0x535f, 0x5360, 0x5360, 0x5360, 0x5360, 0x5360, 0x5360, 0x5361, - 0x5361, 0x5361, 0x5361, 0x5361, 0x5361, 0x5362, 0x5362, 0x5362, - 0x5362, 0x5362, 0x5362, 0x5362, 0x5363, 0x5363, 0x5363, 0x5363, - 0x5363, 0x5363, 0x5364, 0x5364, 0x5364, 0x5364, 0x5364, 0x5364, - 0x5365, 0x5365, 0x5365, 0x5365, 0x5365, 0x5365, 0x5365, 0x5366, - 0x5366, 0x5366, 0x5366, 0x5366, 0x5366, 0x5367, 0x5367, 0x5367, - 0x5367, 0x5367, 0x5367, 0x5367, 0x5368, 0x5368, 0x5368, 0x5368, - 0x5368, 0x5368, 0x5369, 0x5369, 0x5369, 0x5369, 0x5369, 0x5369, - 0x536a, 0x536a, 0x536a, 0x536a, 0x536a, 0x536a, 0x536a, 0x536b, - 0x536b, 0x536b, 0x536b, 0x536b, 0x536b, 0x536c, 0x536c, 0x536c, - 0x536c, 0x536c, 0x536c, 0x536c, 0x536d, 0x536d, 0x536d, 0x536d, - 0x536d, 0x536d, 0x536e, 0x536e, 0x536e, 0x536e, 0x536e, 0x536e, - 0x536e, 0x536f, 0x536f, 0x536f, 0x536f, 0x536f, 0x536f, 0x536f, - 0x5370, 0x5370, 0x5370, 0x5370, 0x5370, 0x5370, 0x5371, 0x5371, - 0x5371, 0x5371, 0x5371, 0x5371, 0x5371, 0x5372, 0x5372, 0x5372, - 0x5372, 0x5372, 0x5372, 0x5372, 0x5373, 0x5373, 0x5373, 0x5373, - 0x5373, 0x5373, 0x5374, 0x5374, 0x5374, 0x5374, 0x5374, 0x5374, - 0x5374, 0x5375, 0x5375, 0x5375, 0x5375, 0x5375, 0x5375, 0x5375, - 0x5376, 0x5376, 0x5376, 0x5376, 0x5376, 0x5376, 0x5376, 0x5377, - 0x5377, 0x5377, 0x5377, 0x5377, 0x5377, 0x5378, 0x5378, 0x5378, - 0x5378, 0x5378, 0x5378, 0x5378, 0x5379, 0x5379, 0x5379, 0x5379, - 0x5379, 0x5379, 0x5379, 0x537a, 0x537a, 0x537a, 0x537a, 0x537a, - 0x537a, 0x537a, 0x537b, 0x537b, 0x537b, 0x537b, 0x537b, 0x537b, - 0x537b, 0x537c, 0x537c, 0x537c, 0x537c, 0x537c, 0x537c, 0x537c, - 0x537d, 0x537d, 0x537d, 0x537d, 0x537d, 0x537d, 0x537d, 0x537e, - 0x537e, 0x537e, 0x537e, 0x537e, 0x537e, 0x537e, 0x537f, 0x537f, - 0x537f, 0x537f, 0x537f, 0x537f, 0x537f, 0x5380, 0x5380, 0x5380, - 0x5380, 0x5380, 0x5380, 0x5380, 0x5381, 0x5381, 0x5381, 0x5381, - 0x5381, 0x5381, 0x5381, 0x5382, 0x5382, 0x5382, 0x5382, 0x5382, - 0x5382, 0x5382, 0x5383, 0x5383, 0x5383, 0x5383, 0x5383, 0x5383, - 0x5383, 0x5384, 0x5384, 0x5384, 0x5384, 0x5384, 0x5384, 0x5384, - 0x5384, 0x5385, 0x5385, 0x5385, 0x5385, 0x5385, 0x5385, 0x5385, - 0x5386, 0x5386, 0x5386, 0x5386, 0x5386, 0x5386, 0x5386, 0x5387, - 0x5387, 0x5387, 0x5387, 0x5387, 0x5387, 0x5387, 0x5388, 0x5388, - 0x5388, 0x5388, 0x5388, 0x5388, 0x5388, 0x5388, 0x5389, 0x5389, - 0x5389, 0x5389, 0x5389, 0x5389, 0x5389, 0x538a, 0x538a, 0x538a, - 0x538a, 0x538a, 0x538a, 0x538a, 0x538b, 0x538b, 0x538b, 0x538b, - 0x538b, 0x538b, 0x538b, 0x538b, 0x538c, 0x538c, 0x538c, 0x538c, - 0x538c, 0x538c, 0x538c, 0x538d, 0x538d, 0x538d, 0x538d, 0x538d, - 0x538d, 0x538d, 0x538e, 0x538e, 0x538e, 0x538e, 0x538e, 0x538e, - 0x538e, 0x538e, 0x538f, 0x538f, 0x538f, 0x538f, 0x538f, 0x538f, - 0x538f, 0x5390, 0x5390, 0x5390, 0x5390, 0x5390, 0x5390, 0x5390, - 0x5390, 0x5391, 0x5391, 0x5391, 0x5391, 0x5391, 0x5391, 0x5391, - 0x5392, 0x5392, 0x5392, 0x5392, 0x5392, 0x5392, 0x5392, 0x5392, - 0x5393, 0x5393, 0x5393, 0x5393, 0x5393, 0x5393, 0x5393, 0x5393, - 0x5394, 0x5394, 0x5394, 0x5394, 0x5394, 0x5394, 0x5394, 0x5395, - 0x5395, 0x5395, 0x5395, 0x5395, 0x5395, 0x5395, 0x5395, 0x5396, - 0x5396, 0x5396, 0x5396, 0x5396, 0x5396, 0x5396, 0x5396, 0x5397, - 0x5397, 0x5397, 0x5397, 0x5397, 0x5397, 0x5397, 0x5398, 0x5398, - 0x5398, 0x5398, 0x5398, 0x5398, 0x5398, 0x5398, 0x5399, 0x5399, - 0x5399, 0x5399, 0x5399, 0x5399, 0x5399, 0x5399, 0x539a, 0x539a, - 0x539a, 0x539a, 0x539a, 0x539a, 0x539a, 0x539a, 0x539b, 0x539b, - 0x539b, 0x539b, 0x539b, 0x539b, 0x539b, 0x539b, 0x539c, 0x539c, - 0x539c, 0x539c, 0x539c, 0x539c, 0x539c, 0x539d, 0x539d, 0x539d, - 0x539d, 0x539d, 0x539d, 0x539d, 0x539d, 0x539e, 0x539e, 0x539e, - 0x539e, 0x539e, 0x539e, 0x539e, 0x539e, 0x539f, 0x539f, 0x539f, - 0x539f, 0x539f, 0x539f, 0x539f, 0x539f, 0x53a0, 0x53a0, 0x53a0, - 0x53a0, 0x53a0, 0x53a0, 0x53a1, 0x53a1, 0x53a1, 0x53a1, 0x53a2, - 0x53a2, 0x53a2, 0x53a2, 0x53a3, 0x53a3, 0x53a3, 0x53a3, 0x53a4, - 0x53a4, 0x53a4, 0x53a4, 0x53a5, 0x53a5, 0x53a5, 0x53a5, 0x53a6, - 0x53a6, 0x53a6, 0x53a6, 0x53a7, 0x53a7, 0x53a7, 0x53a7, 0x53a8, - 0x53a8, 0x53a8, 0x53a8, 0x53a9, 0x53a9, 0x53a9, 0x53a9, 0x53a9, - 0x53aa, 0x53aa, 0x53aa, 0x53aa, 0x53ab, 0x53ab, 0x53ab, 0x53ab, - 0x53ac, 0x53ac, 0x53ac, 0x53ac, 0x53ad, 0x53ad, 0x53ad, 0x53ad, - 0x53ae, 0x53ae, 0x53ae, 0x53ae, 0x53ae, 0x53af, 0x53af, 0x53af, - 0x53af, 0x53b0, 0x53b0, 0x53b0, 0x53b0, 0x53b1, 0x53b1, 0x53b1, - 0x53b1, 0x53b2, 0x53b2, 0x53b2, 0x53b2, 0x53b2, 0x53b3, 0x53b3, - 0x53b3, 0x53b3, 0x53b4, 0x53b4, 0x53b4, 0x53b4, 0x53b5, 0x53b5, - 0x53b5, 0x53b5, 0x53b5, 0x53b6, 0x53b6, 0x53b6, 0x53b6, 0x53b7, - 0x53b7, 0x53b7, 0x53b7, 0x53b8, 0x53b8, 0x53b8, 0x53b8, 0x53b8, - 0x53b9, 0x53b9, 0x53b9, 0x53b9, 0x53ba, 0x53ba, 0x53ba, 0x53ba, - 0x53ba, 0x53bb, 0x53bb, 0x53bb, 0x53bb, 0x53bc, 0x53bc, 0x53bc, - 0x53bc, 0x53bc, 0x53bd, 0x53bd, 0x53bd, 0x53bd, 0x53be, 0x53be, - 0x53be, 0x53be, 0x53be, 0x53bf, 0x53bf, 0x53bf, 0x53bf, 0x53c0, - 0x53c0, 0x53c0, 0x53c0, 0x53c0, 0x53c1, 0x53c1, 0x53c1, 0x53c1, - 0x53c2, 0x53c2, 0x53c2, 0x53c2, 0x53c2, 0x53c3, 0x53c3, 0x53c3, - 0x53c3, 0x53c4, 0x53c4, 0x53c4, 0x53c4, 0x53c4, 0x53c5, 0x53c5, - 0x53c5, 0x53c5, 0x53c6, 0x53c6, 0x53c6, 0x53c6, 0x53c6, 0x53c7, - 0x53c7, 0x53c7, 0x53c7, 0x53c7, 0x53c8, 0x53c8, 0x53c8, 0x53c8, - 0x53c9, 0x53c9, 0x53c9, 0x53c9, 0x53c9, 0x53ca, 0x53ca, 0x53ca, - 0x53ca, 0x53ca, 0x53cb, 0x53cb, 0x53cb, 0x53cb, 0x53cb, 0x53cc, - 0x53cc, 0x53cc, 0x53cc, 0x53cd, 0x53cd, 0x53cd, 0x53cd, 0x53cd, - 0x53ce, 0x53ce, 0x53ce, 0x53ce, 0x53ce, 0x53cf, 0x53cf, 0x53cf, - 0x53cf, 0x53cf, 0x53d0, 0x53d0, 0x53d0, 0x53d0, 0x53d0, 0x53d1, - 0x53d1, 0x53d1, 0x53d1, 0x53d2, 0x53d2, 0x53d2, 0x53d2, 0x53d2, - 0x53d3, 0x53d3, 0x53d3, 0x53d3, 0x53d3, 0x53d4, 0x53d4, 0x53d4, - 0x53d4, 0x53d4, 0x53d5, 0x53d5, 0x53d5, 0x53d5, 0x53d5, 0x53d6, - 0x53d6, 0x53d6, 0x53d6, 0x53d6, 0x53d7, 0x53d7, 0x53d7, 0x53d7, - 0x53d7, 0x53d8, 0x53d8, 0x53d8, 0x53d8, 0x53d8, 0x53d9, 0x53d9, - 0x53d9, 0x53d9, 0x53d9, 0x53da, 0x53da, 0x53da, 0x53da, 0x53da, - 0x53db, 0x53db, 0x53db, 0x53db, 0x53db, 0x53dc, 0x53dc, 0x53dc, - 0x53dc, 0x53dc, 0x53dd, 0x53dd, 0x53dd, 0x53dd, 0x53dd, 0x53de, - 0x53de, 0x53de, 0x53de, 0x53de, 0x53df, 0x53df, 0x53df, 0x53df, - 0x53df, 0x53e0, 0x53e0, 0x53e0, 0x53e0, 0x53e0, 0x53e1, 0x53e1, - 0x53e1, 0x53e1, 0x53e1, 0x53e1, 0x53e2, 0x53e2, 0x53e2, 0x53e2, - 0x53e2, 0x53e3, 0x53e3, 0x53e3, 0x53e3, 0x53e3, 0x53e4, 0x53e4, - 0x53e4, 0x53e4, 0x53e4, 0x53e5, 0x53e5, 0x53e5, 0x53e5, 0x53e5, - 0x53e6, 0x53e6, 0x53e6, 0x53e6, 0x53e6, 0x53e6, 0x53e7, 0x53e7, - 0x53e7, 0x53e7, 0x53e7, 0x53e8, 0x53e8, 0x53e8, 0x53e8, 0x53e8, - 0x53e9, 0x53e9, 0x53e9, 0x53e9, 0x53e9, 0x53e9, 0x53ea, 0x53ea, - 0x53ea, 0x53ea, 0x53ea, 0x53eb, 0x53eb, 0x53eb, 0x53eb, 0x53eb, - 0x53ec, 0x53ec, 0x53ec, 0x53ec, 0x53ec, 0x53ec, 0x53ed, 0x53ed, - 0x53ed, 0x53ed, 0x53ed, 0x53ee, 0x53ee, 0x53ee, 0x53ee, 0x53ee, - 0x53ef, 0x53ef, 0x53ef, 0x53ef, 0x53ef, 0x53ef, 0x53f0, 0x53f0, - 0x53f0, 0x53f0, 0x53f0, 0x53f1, 0x53f1, 0x53f1, 0x53f1, 0x53f1, - 0x53f1, 0x53f2, 0x53f2, 0x53f2, 0x53f2, 0x53f2, 0x53f3, 0x53f3, - 0x53f3, 0x53f3, 0x53f3, 0x53f3, 0x53f4, 0x53f4, 0x53f4, 0x53f4, - 0x53f4, 0x53f4, 0x53f5, 0x53f5, 0x53f5, 0x53f5, 0x53f5, 0x53f6, - 0x53f6, 0x53f6, 0x53f6, 0x53f6, 0x53f6, 0x53f7, 0x53f7, 0x53f7, - 0x53f7, 0x53f7, 0x53f8, 0x53f8, 0x53f8, 0x53f8, 0x53f8, 0x53f8, - 0x53f9, 0x53f9, 0x53f9, 0x53f9, 0x53f9, 0x53f9, 0x53fa, 0x53fa, - 0x53fa, 0x53fa, 0x53fa, 0x53fb, 0x53fb, 0x53fb, 0x53fb, 0x53fb, - 0x53fb, 0x53fc, 0x53fc, 0x53fc, 0x53fc, 0x53fc, 0x53fc, 0x53fd, - 0x53fd, 0x53fd, 0x53fd, 0x53fd, 0x53fe, 0x53fe, 0x53fe, 0x53fe, - 0x53fe, 0x53fe, 0x53ff, 0x53ff, 0x53ff, 0x53ff, 0x53ff, 0x53ff, - 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, - 0x5400, 0x5401, 0x5401, 0x5401, 0x5401, 0x5401, 0x5401, 0x5401, - 0x5401, 0x5401, 0x5401, 0x5401, 0x5401, 0x5402, 0x5402, 0x5402, - 0x5402, 0x5402, 0x5402, 0x5402, 0x5402, 0x5402, 0x5402, 0x5402, - 0x5403, 0x5403, 0x5403, 0x5403, 0x5403, 0x5403, 0x5403, 0x5403, - 0x5403, 0x5403, 0x5403, 0x5403, 0x5404, 0x5404, 0x5404, 0x5404, - 0x5404, 0x5404, 0x5404, 0x5404, 0x5404, 0x5404, 0x5404, 0x5404, - 0x5405, 0x5405, 0x5405, 0x5405, 0x5405, 0x5405, 0x5405, 0x5405, - 0x5405, 0x5405, 0x5405, 0x5405, 0x5406, 0x5406, 0x5406, 0x5406, - 0x5406, 0x5406, 0x5406, 0x5406, 0x5406, 0x5406, 0x5406, 0x5406, - 0x5406, 0x5407, 0x5407, 0x5407, 0x5407, 0x5407, 0x5407, 0x5407, - 0x5407, 0x5407, 0x5407, 0x5407, 0x5407, 0x5408, 0x5408, 0x5408, - 0x5408, 0x5408, 0x5408, 0x5408, 0x5408, 0x5408, 0x5408, 0x5408, - 0x5408, 0x5409, 0x5409, 0x5409, 0x5409, 0x5409, 0x5409, 0x5409, - 0x5409, 0x5409, 0x5409, 0x5409, 0x5409, 0x5409, 0x540a, 0x540a, - 0x540a, 0x540a, 0x540a, 0x540a, 0x540a, 0x540a, 0x540a, 0x540a, - 0x540a, 0x540a, 0x540b, 0x540b, 0x540b, 0x540b, 0x540b, 0x540b, - 0x540b, 0x540b, 0x540b, 0x540b, 0x540b, 0x540b, 0x540b, 0x540c, - 0x540c, 0x540c, 0x540c, 0x540c, 0x540c, 0x540c, 0x540c, 0x540c, - 0x540c, 0x540c, 0x540c, 0x540c, 0x540d, 0x540d, 0x540d, 0x540d, - 0x540d, 0x540d, 0x540d, 0x540d, 0x540d, 0x540d, 0x540d, 0x540d, - 0x540d, 0x540e, 0x540e, 0x540e, 0x540e, 0x540e, 0x540e, 0x540e, - 0x540e, 0x540e, 0x540e, 0x540e, 0x540e, 0x540e, 0x540f, 0x540f, - 0x540f, 0x540f, 0x540f, 0x540f, 0x540f, 0x540f, 0x540f, 0x540f, - 0x540f, 0x540f, 0x540f, 0x5410, 0x5410, 0x5410, 0x5410, 0x5410, - 0x5410, 0x5410, 0x5410, 0x5410, 0x5410, 0x5410, 0x5410, 0x5410, - 0x5411, 0x5411, 0x5411, 0x5411, 0x5411, 0x5411, 0x5411, 0x5411, - 0x5411, 0x5411, 0x5411, 0x5411, 0x5411, 0x5412, 0x5412, 0x5412, - 0x5412, 0x5412, 0x5412, 0x5412, 0x5412, 0x5412, 0x5412, 0x5412, - 0x5412, 0x5412, 0x5412, 0x5413, 0x5413, 0x5413, 0x5413, 0x5413, - 0x5413, 0x5413, 0x5413, 0x5413, 0x5413, 0x5413, 0x5413, 0x5413, - 0x5414, 0x5414, 0x5414, 0x5414, 0x5414, 0x5414, 0x5414, 0x5414, - 0x5414, 0x5414, 0x5414, 0x5414, 0x5414, 0x5414, 0x5415, 0x5415, - 0x5415, 0x5415, 0x5415, 0x5415, 0x5415, 0x5415, 0x5415, 0x5415, - 0x5415, 0x5415, 0x5415, 0x5415, 0x5416, 0x5416, 0x5416, 0x5416, - 0x5416, 0x5416, 0x5416, 0x5416, 0x5416, 0x5416, 0x5416, 0x5416, - 0x5416, 0x5417, 0x5417, 0x5417, 0x5417, 0x5417, 0x5417, 0x5417, - 0x5417, 0x5417, 0x5417, 0x5417, 0x5417, 0x5417, 0x5417, 0x5418, - 0x5418, 0x5418, 0x5418, 0x5418, 0x5418, 0x5418, 0x5418, 0x5418, - 0x5418, 0x5418, 0x5418, 0x5418, 0x5418, 0x5419, 0x5419, 0x5419, - 0x5419, 0x5419, 0x5419, 0x5419, 0x5419, 0x5419, 0x5419, 0x5419, - 0x5419, 0x5419, 0x5419, 0x5419, 0x541a, 0x541a, 0x541a, 0x541a, - 0x541a, 0x541a, 0x541a, 0x541a, 0x541a, 0x541a, 0x541a, 0x541a, - 0x541a, 0x541a, 0x541b, 0x541b, 0x541b, 0x541b, 0x541b, 0x541b, - 0x541b, 0x541b, 0x541b, 0x541b, 0x541b, 0x541b, 0x541b, 0x541b, - 0x541c, 0x541c, 0x541c, 0x541c, 0x541c, 0x541c, 0x541c, 0x541c, - 0x541c, 0x541c, 0x541c, 0x541c, 0x541c, 0x541c, 0x541c, 0x541d, - 0x541d, 0x541d, 0x541d, 0x541d, 0x541d, 0x541d, 0x541d, 0x541d, - 0x541d, 0x541d, 0x541d, 0x541d, 0x541d, 0x541e, 0x541e, 0x541e, - 0x541e, 0x541e, 0x541e, 0x541e, 0x541e, 0x541e, 0x541e, 0x541e, - 0x541e, 0x541e, 0x541e, 0x541e, 0x541f, 0x541f, 0x541f, 0x541f, - 0x541f, 0x541f, 0x541f, 0x541f, 0x541f, 0x541f, 0x541f, 0x541f, - 0x541f, 0x541f, 0x541f, 0x5420, 0x5420, 0x5420, 0x5420, 0x5420, - 0x5420, 0x5420, 0x5420, 0x5420, 0x5420, 0x5420, 0x5420, 0x5420, - 0x5420, 0x5420, 0x5421, 0x5421, 0x5421, 0x5421, 0x5421, 0x5421, - 0x5421, 0x5421, 0x5421, 0x5421, 0x5421, 0x5421, 0x5421, 0x5421, - 0x5421, 0x5422, 0x5422, 0x5422, 0x5422, 0x5422, 0x5422, 0x5422, - 0x5422, 0x5422, 0x5422, 0x5422, 0x5422, 0x5422, 0x5422, 0x5422, - 0x5423, 0x5423, 0x5423, 0x5423, 0x5423, 0x5423, 0x5423, 0x5423, - 0x5423, 0x5423, 0x5423, 0x5423, 0x5423, 0x5423, 0x5423, 0x5424, - 0x5424, 0x5424, 0x5424, 0x5424, 0x5424, 0x5424, 0x5424, 0x5424, - 0x5424, 0x5424, 0x5424, 0x5424, 0x5424, 0x5424, 0x5424, 0x5425, - 0x5425, 0x5425, 0x5425, 0x5425, 0x5425, 0x5425, 0x5425, 0x5425, - 0x5425, 0x5425, 0x5425, 0x5425, 0x5425, 0x5425, 0x5426, 0x5426, - 0x5426, 0x5426, 0x5426, 0x5426, 0x5426, 0x5426, 0x5426, 0x5426, - 0x5426, 0x5426, 0x5426, 0x5426, 0x5426, 0x5426, 0x5427, 0x5427, - 0x5427, 0x5427, 0x5427, 0x5427, 0x5427, 0x5427, 0x5427, 0x5427, - 0x5427, 0x5427, 0x5427, 0x5427, 0x5427, 0x5427, 0x5428, 0x5428, - 0x5428, 0x5428, 0x5428, 0x5428, 0x5428, 0x5428, 0x5428, 0x5428, - 0x5428, 0x5428, 0x5428, 0x5428, 0x5428, 0x5428, 0x5429, 0x5429, - 0x5429, 0x5429, 0x5429, 0x5429, 0x5429, 0x5429, 0x5429, 0x542a, - 0x542a, 0x542a, 0x542a, 0x542a, 0x542a, 0x542a, 0x542a, 0x542b, - 0x542b, 0x542b, 0x542b, 0x542b, 0x542b, 0x542b, 0x542b, 0x542c, - 0x542c, 0x542c, 0x542c, 0x542c, 0x542c, 0x542c, 0x542c, 0x542c, - 0x542d, 0x542d, 0x542d, 0x542d, 0x542d, 0x542d, 0x542d, 0x542d, - 0x542e, 0x542e, 0x542e, 0x542e, 0x542e, 0x542e, 0x542e, 0x542e, - 0x542f, 0x542f, 0x542f, 0x542f, 0x542f, 0x542f, 0x542f, 0x542f, - 0x542f, 0x5430, 0x5430, 0x5430, 0x5430, 0x5430, 0x5430, 0x5430, - 0x5430, 0x5431, 0x5431, 0x5431, 0x5431, 0x5431, 0x5431, 0x5431, - 0x5431, 0x5431, 0x5432, 0x5432, 0x5432, 0x5432, 0x5432, 0x5432, - 0x5432, 0x5432, 0x5433, 0x5433, 0x5433, 0x5433, 0x5433, 0x5433, - 0x5433, 0x5433, 0x5433, 0x5434, 0x5434, 0x5434, 0x5434, 0x5434, - 0x5434, 0x5434, 0x5434, 0x5434, 0x5435, 0x5435, 0x5435, 0x5435, - 0x5435, 0x5435, 0x5435, 0x5435, 0x5436, 0x5436, 0x5436, 0x5436, - 0x5436, 0x5436, 0x5436, 0x5436, 0x5436, 0x5437, 0x5437, 0x5437, - 0x5437, 0x5437, 0x5437, 0x5437, 0x5437, 0x5437, 0x5438, 0x5438, - 0x5438, 0x5438, 0x5438, 0x5438, 0x5438, 0x5438, 0x5438, 0x5439, - 0x5439, 0x5439, 0x5439, 0x5439, 0x5439, 0x5439, 0x5439, 0x5439, - 0x543a, 0x543a, 0x543a, 0x543a, 0x543a, 0x543a, 0x543a, 0x543a, - 0x543a, 0x543a, 0x543b, 0x543b, 0x543b, 0x543b, 0x543b, 0x543b, - 0x543b, 0x543b, 0x543b, 0x543c, 0x543c, 0x543c, 0x543c, 0x543c, - 0x543c, 0x543c, 0x543c, 0x543c, 0x543d, 0x543d, 0x543d, 0x543d, - 0x543d, 0x543d, 0x543d, 0x543d, 0x543d, 0x543e, 0x543e, 0x543e, - 0x543e, 0x543e, 0x543e, 0x543e, 0x543e, 0x543e, 0x543e, 0x543f, - 0x543f, 0x543f, 0x543f, 0x543f, 0x543f, 0x543f, 0x543f, 0x543f, - 0x5440, 0x5440, 0x5440, 0x5440, 0x5440, 0x5440, 0x5440, 0x5440, - 0x5440, 0x5440, 0x5441, 0x5441, 0x5441, 0x5441, 0x5441, 0x5441, - 0x5441, 0x5441, 0x5441, 0x5441, 0x5442, 0x5442, 0x5442, 0x5442, - 0x5442, 0x5442, 0x5442, 0x5442, 0x5442, 0x5443, 0x5443, 0x5443, - 0x5443, 0x5443, 0x5443, 0x5443, 0x5443, 0x5443, 0x5443, 0x5444, - 0x5444, 0x5444, 0x5444, 0x5444, 0x5444, 0x5444, 0x5444, 0x5444, - 0x5444, 0x5445, 0x5445, 0x5445, 0x5445, 0x5445, 0x5445, 0x5445, - 0x5445, 0x5445, 0x5445, 0x5446, 0x5446, 0x5446, 0x5446, 0x5446, - 0x5446, 0x5446, 0x5446, 0x5446, 0x5446, 0x5447, 0x5447, 0x5447, - 0x5447, 0x5447, 0x5447, 0x5447, 0x5447, 0x5447, 0x5447, 0x5448, - 0x5448, 0x5448, 0x5448, 0x5448, 0x5448, 0x5448, 0x5448, 0x5448, - 0x5448, 0x5448, 0x5449, 0x5449, 0x5449, 0x5449, 0x5449, 0x5449, - 0x5449, 0x5449, 0x5449, 0x5449, 0x544a, 0x544a, 0x544a, 0x544a, - 0x544a, 0x544a, 0x544a, 0x544a, 0x544a, 0x544a, 0x544b, 0x544b, - 0x544b, 0x544b, 0x544b, 0x544b, 0x544b, 0x544b, 0x544b, 0x544b, - 0x544b, 0x544c, 0x544c, 0x544c, 0x544c, 0x544c, 0x544c, 0x544c, - 0x544c, 0x544c, 0x544c, 0x544d, 0x544d, 0x544d, 0x544d, 0x544d, - 0x544d, 0x544d, 0x544d, 0x544d, 0x544d, 0x544d, 0x544e, 0x544e, - 0x544e, 0x544e, 0x544e, 0x544e, 0x544e, 0x544e, 0x544e, 0x544e, - 0x544e, 0x544f, 0x544f, 0x544f, 0x544f, 0x544f, 0x544f, 0x544f, - 0x544f, 0x544f, 0x544f, 0x5450, 0x5450, 0x5450, 0x5450, 0x5450, - 0x5450, 0x5450, 0x5450, 0x5450, 0x5450, 0x5450, 0x5451, 0x5451, - 0x5451, 0x5451, 0x5451, 0x5451, 0x5451, 0x5451, 0x5451, 0x5451, - 0x5451, 0x5452, 0x5452, 0x5452, 0x5452, 0x5452, 0x5452, 0x5452, - 0x5452, 0x5452, 0x5452, 0x5452, 0x5453, 0x5453, 0x5453, 0x5453, - 0x5453, 0x5453, 0x5453, 0x5453, 0x5453, 0x5453, 0x5453, 0x5454, - 0x5454, 0x5454, 0x5454, 0x5454, 0x5454, 0x5454, 0x5454, 0x5454, - 0x5454, 0x5454, 0x5454, 0x5455, 0x5455, 0x5455, 0x5455, 0x5455, - 0x5455, 0x5455, 0x5455, 0x5455, 0x5455, 0x5455, 0x5456, 0x5456, - 0x5456, 0x5456, 0x5456, 0x5456, 0x5456, 0x5456, 0x5456, 0x5456, - 0x5456, 0x5457, 0x5457, 0x5457, 0x5457, 0x5457, 0x5457, 0x5457, - 0x5457, 0x5457, 0x5457, 0x5457, 0x5457, 0x5458, 0x5458, 0x5458, - 0x5458, 0x5458, 0x5458, 0x5458, 0x5458, 0x5458, 0x5458, 0x5458, - 0x5459, 0x5459, 0x5459, 0x5459, 0x5459, 0x5459, 0x5459, 0x5459, - 0x5459, 0x5459, 0x5459, 0x5459, 0x545a, 0x545a, 0x545a, 0x545a, - 0x545a, 0x545a, 0x545a, 0x545a, 0x545a, 0x545a, 0x545a, 0x545a, - 0x545b, 0x545b, 0x545b, 0x545b, 0x545b, 0x545b, 0x545b, 0x545b, - 0x545b, 0x545b, 0x545b, 0x545b, 0x545c, 0x545c, 0x545c, 0x545c, - 0x545c, 0x545c, 0x545c, 0x545c, 0x545c, 0x545c, 0x545c, 0x545c, - 0x545d, 0x545d, 0x545d, 0x545d, 0x545d, 0x545d, 0x545d, 0x545d, - 0x545d, 0x545d, 0x545d, 0x545d, 0x545e, 0x545e, 0x545e, 0x545e, - 0x545e, 0x545e, 0x545e, 0x545e, 0x545e, 0x545e, 0x545e, 0x545e, - 0x545f, 0x545f, 0x545f, 0x545f, 0x545f, 0x545f, 0x545f, 0x545f, - 0x545f, 0x545f, 0x545f, 0x545f, 0x5460, 0x5460, 0x5460, 0x5460, - 0x5460, 0x5460, 0x5460, 0x5460, 0x5460, 0x5460, 0x5460, 0x5460, - 0x5461, 0x5461, 0x5461, 0x5461, 0x5461, 0x5461, 0x5461, 0x5461, - 0x5461, 0x5461, 0x5461, 0x5461, 0x5461, 0x5462, 0x5462, 0x5462, - 0x5462, 0x5462, 0x5462, 0x5462, 0x5462, 0x5462, 0x5462, 0x5462, - 0x5462, 0x5463, 0x5463, 0x5463, 0x5463, 0x5463, 0x5463, 0x5463, - 0x5463, 0x5463, 0x5463, 0x5463, 0x5463, 0x5463, 0x5464, 0x5464, - 0x5464, 0x5464, 0x5464, 0x5464, 0x5464, 0x5464, 0x5464, 0x5464, - 0x5464, 0x5464, 0x5464, 0x5465, 0x5465, 0x5465, 0x5465, 0x5465, - 0x5465, 0x5465, 0x5465, 0x5465, 0x5465, 0x5465, 0x5465, 0x5466, - 0x5466, 0x5466, 0x5466, 0x5466, 0x5466, 0x5466, 0x5466, 0x5466, - 0x5466, 0x5466, 0x5466, 0x5466, 0x5467, 0x5467, 0x5467, 0x5467, - 0x5467, 0x5467, 0x5467, 0x5467, 0x5467, 0x5467, 0x5467, 0x5467, - 0x5467, 0x5468, 0x5468, 0x5468, 0x5468, 0x5468, 0x5468, 0x5468, - 0x5468, 0x5468, 0x5468, 0x5468, 0x5468, 0x5468, 0x5469, 0x5469, - 0x5469, 0x5469, 0x5469, 0x5469, 0x5469, 0x5469, 0x5469, 0x5469, - 0x5469, 0x5469, 0x5469, 0x5469, 0x546a, 0x546a, 0x546a, 0x546a, - 0x546a, 0x546a, 0x546a, 0x546a, 0x546a, 0x546a, 0x546a, 0x546a, - 0x546a, 0x546b, 0x546b, 0x546b, 0x546b, 0x546b, 0x546b, 0x546b, - 0x546b, 0x546b, 0x546b, 0x546b, 0x546b, 0x546b, 0x546c, 0x546c, - 0x546c, 0x546c, 0x546c, 0x546c, 0x546c, 0x546c, 0x546c, 0x546c, - 0x546c, 0x546c, 0x546c, 0x546c, 0x546d, 0x546d, 0x546d, 0x546d, - 0x546d, 0x546d, 0x546d, 0x546d, 0x546d, 0x546d, 0x546d, 0x546d, - 0x546d, 0x546d, 0x546e, 0x546e, 0x546e, 0x546e, 0x546e, 0x546e, - 0x546e, 0x546e, 0x546e, 0x546e, 0x546e, 0x546e, 0x546e, 0x546f, - 0x546f, 0x546f, 0x546f, 0x546f, 0x546f, 0x546f, 0x546f, 0x546f, - 0x546f, 0x546f, 0x546f, 0x546f, 0x546f, 0x5470, 0x5470, 0x5470, - 0x5470, 0x5470, 0x5470, 0x5470, 0x5470, 0x5470, 0x5470, 0x5470, - 0x5470, 0x5470, 0x5470, 0x5471, 0x5471, 0x5471, 0x5471, 0x5471, - 0x5471, 0x5471, 0x5471, 0x5471, 0x5471, 0x5471, 0x5471, 0x5471, - 0x5471, 0x5472, 0x5472, 0x5472, 0x5472, 0x5472, 0x5472, 0x5472, - 0x5472, 0x5472, 0x5472, 0x5472, 0x5472, 0x5472, 0x5472, 0x5473, - 0x5473, 0x5473, 0x5473, 0x5473, 0x5473, 0x5473, 0x5473, 0x5473, - 0x5473, 0x5473, 0x5473, 0x5473, 0x5473, 0x5473, 0x5474, 0x5474, - 0x5474, 0x5474, 0x5474, 0x5474, 0x5474, 0x5474, 0x5474, 0x5474, - 0x5474, 0x5474, 0x5474, 0x5474, 0x5475, 0x5475, 0x5475, 0x5475, - 0x5475, 0x5475, 0x5475, 0x5475, 0x5475, 0x5475, 0x5475, 0x5475, - 0x5475, 0x5475, 0x5475, 0x5476, 0x5476, 0x5476, 0x5476, 0x5476, - 0x5476, 0x5476, 0x5476, 0x5476, 0x5476, 0x5476, 0x5476, 0x5476, - 0x5476, 0x5477, 0x5477, 0x5477, 0x5477, 0x5477, 0x5477, 0x5477, - 0x5477, 0x5477, 0x5477, 0x5477, 0x5477, 0x5477, 0x5477, 0x5477, - 0x5478, 0x5478, 0x5478, 0x5478, 0x5478, 0x5478, 0x5478, 0x5478, - 0x5478, 0x5478, 0x5478, 0x5478, 0x5478, 0x5478, 0x5478, 0x5479, - 0x5479, 0x5479, 0x5479, 0x5479, 0x5479, 0x5479, 0x5479, 0x5479, - 0x5479, 0x5479, 0x5479, 0x5479, 0x5479, 0x5479, 0x547a, 0x547a, - 0x547a, 0x547a, 0x547a, 0x547a, 0x547a, 0x547a, 0x547a, 0x547a, - 0x547a, 0x547a, 0x547a, 0x547a, 0x547a, 0x547b, 0x547b, 0x547b, - 0x547b, 0x547b, 0x547b, 0x547b, 0x547b, 0x547b, 0x547b, 0x547b, - 0x547b, 0x547b, 0x547b, 0x547b, 0x547c, 0x547c, 0x547c, 0x547c, - 0x547c, 0x547c, 0x547c, 0x547c, 0x547c, 0x547c, 0x547c, 0x547c, - 0x547c, 0x547c, 0x547c, 0x547c, 0x547d, 0x547d, 0x547d, 0x547d, - 0x547d, 0x547d, 0x547d, 0x547d, 0x547d, 0x547d, 0x547d, 0x547d, - 0x547d, 0x547d, 0x547d, 0x547e, 0x547e, 0x547e, 0x547e, 0x547e, - 0x547e, 0x547e, 0x547e, 0x547e, 0x547e, 0x547e, 0x547e, 0x547e, - 0x547e, 0x547e, 0x547e, 0x547f, 0x547f, 0x547f, 0x547f, 0x547f, - 0x547f, 0x547f, 0x547f, 0x547f, 0x547f, 0x547f, 0x547f, 0x547f, - 0x547f, 0x547f, 0x5480, 0x5480, 0x5480, 0x5480, 0x5480, 0x5480, - 0x5480, 0x5480, 0x5480, 0x5480, 0x5480, 0x5480, 0x5480, 0x5480, - 0x5480, 0x5480, 0x5481, 0x5481, 0x5481, 0x5481, 0x5481, 0x5481, - 0x5481, 0x5481, 0x5481, 0x5481, 0x5481, 0x5481, 0x5481, 0x5481, - 0x5481, 0x5482, 0x5482, 0x5482, 0x5482, 0x5482, 0x5482, 0x5482, - 0x5482, 0x5483, 0x5483, 0x5483, 0x5483, 0x5483, 0x5483, 0x5483, - 0x5483, 0x5484, 0x5484, 0x5484, 0x5484, 0x5484, 0x5484, 0x5484, - 0x5484, 0x5484, 0x5485, 0x5485, 0x5485, 0x5485, 0x5485, 0x5485, - 0x5485, 0x5485, 0x5486, 0x5486, 0x5486, 0x5486, 0x5486, 0x5486, - 0x5486, 0x5486, 0x5487, 0x5487, 0x5487, 0x5487, 0x5487, 0x5487, - 0x5487, 0x5487, 0x5487, 0x5488, 0x5488, 0x5488, 0x5488, 0x5488, - 0x5488, 0x5488, 0x5488, 0x5489, 0x5489, 0x5489, 0x5489, 0x5489, - 0x5489, 0x5489, 0x5489, 0x548a, 0x548a, 0x548a, 0x548a, 0x548a, - 0x548a, 0x548a, 0x548a, 0x548a, 0x548b, 0x548b, 0x548b, 0x548b, - 0x548b, 0x548b, 0x548b, 0x548b, 0x548b, 0x548c, 0x548c, 0x548c, - 0x548c, 0x548c, 0x548c, 0x548c, 0x548c, 0x548d, 0x548d, 0x548d, - 0x548d, 0x548d, 0x548d, 0x548d, 0x548d, 0x548d, 0x548e, 0x548e, - 0x548e, 0x548e, 0x548e, 0x548e, 0x548e, 0x548e, 0x548e, 0x548f, - 0x548f, 0x548f, 0x548f, 0x548f, 0x548f, 0x548f, 0x548f, 0x548f, - 0x5490, 0x5490, 0x5490, 0x5490, 0x5490, 0x5490, 0x5490, 0x5490, - 0x5490, 0x5491, 0x5491, 0x5491, 0x5491, 0x5491, 0x5491, 0x5491, - 0x5491, 0x5491, 0x5492, 0x5492, 0x5492, 0x5492, 0x5492, 0x5492, - 0x5492, 0x5492, 0x5492, 0x5493, 0x5493, 0x5493, 0x5493, 0x5493, - 0x5493, 0x5493, 0x5493, 0x5493, 0x5494, 0x5494, 0x5494, 0x5494, - 0x5494, 0x5494, 0x5494, 0x5494, 0x5494, 0x5495, 0x5495, 0x5495, - 0x5495, 0x5495, 0x5495, 0x5495, 0x5495, 0x5495, 0x5495, 0x5496, - 0x5496, 0x5496, 0x5496, 0x5496, 0x5496, 0x5496, 0x5496, 0x5496, - 0x5497, 0x5497, 0x5497, 0x5497, 0x5497, 0x5497, 0x5497, 0x5497, - 0x5497, 0x5497, 0x5498, 0x5498, 0x5498, 0x5498, 0x5498, 0x5498, - 0x5498, 0x5498, 0x5498, 0x5499, 0x5499, 0x5499, 0x5499, 0x5499, - 0x5499, 0x5499, 0x5499, 0x5499, 0x5499, 0x549a, 0x549a, 0x549a, - 0x549a, 0x549a, 0x549a, 0x549a, 0x549a, 0x549a, 0x549b, 0x549b, - 0x549b, 0x549b, 0x549b, 0x549b, 0x549b, 0x549b, 0x549b, 0x549b, - 0x549c, 0x549c, 0x549c, 0x549c, 0x549c, 0x549c, 0x549c, 0x549c, - 0x549c, 0x549c, 0x549d, 0x549d, 0x549d, 0x549d, 0x549d, 0x549d, - 0x549d, 0x549d, 0x549d, 0x549d, 0x549e, 0x549e, 0x549e, 0x549e, - 0x549e, 0x549e, 0x549e, 0x549e, 0x549e, 0x549e, 0x549f, 0x549f, - 0x549f, 0x549f, 0x549f, 0x549f, 0x549f, 0x549f, 0x549f, 0x549f, - 0x54a0, 0x54a0, 0x54a0, 0x54a0, 0x54a0, 0x54a0, 0x54a0, 0x54a0, - 0x54a0, 0x54a0, 0x54a1, 0x54a1, 0x54a1, 0x54a1, 0x54a1, 0x54a1, - 0x54a1, 0x54a1, 0x54a1, 0x54a1, 0x54a2, 0x54a2, 0x54a2, 0x54a2, - 0x54a2, 0x54a2, 0x54a2, 0x54a2, 0x54a2, 0x54a2, 0x54a2, 0x54a3, - 0x54a3, 0x54a3, 0x54a3, 0x54a3, 0x54a3, 0x54a3, 0x54a3, 0x54a3, - 0x54a3, 0x54a4, 0x54a4, 0x54a4, 0x54a4, 0x54a4, 0x54a4, 0x54a4, - 0x54a4, 0x54a4, 0x54a4, 0x54a4, 0x54a5, 0x54a5, 0x54a5, 0x54a5, - 0x54a5, 0x54a5, 0x54a5, 0x54a5, 0x54a5, 0x54a5, 0x54a6, 0x54a6, - 0x54a6, 0x54a6, 0x54a6, 0x54a6, 0x54a6, 0x54a6, 0x54a6, 0x54a6, - 0x54a6, 0x54a7, 0x54a7, 0x54a7, 0x54a7, 0x54a7, 0x54a7, 0x54a7, - 0x54a7, 0x54a7, 0x54a7, 0x54a7, 0x54a8, 0x54a8, 0x54a8, 0x54a8, - 0x54a8, 0x54a8, 0x54a8, 0x54a8, 0x54a8, 0x54a8, 0x54a9, 0x54a9, - 0x54a9, 0x54a9, 0x54a9, 0x54a9, 0x54a9, 0x54a9, 0x54a9, 0x54a9, - 0x54a9, 0x54aa, 0x54aa, 0x54aa, 0x54aa, 0x54aa, 0x54aa, 0x54aa, - 0x54aa, 0x54aa, 0x54aa, 0x54aa, 0x54ab, 0x54ab, 0x54ab, 0x54ab, - 0x54ab, 0x54ab, 0x54ab, 0x54ab, 0x54ab, 0x54ab, 0x54ab, 0x54ac, - 0x54ac, 0x54ac, 0x54ac, 0x54ac, 0x54ac, 0x54ac, 0x54ac, 0x54ac, - 0x54ac, 0x54ac, 0x54ad, 0x54ad, 0x54ad, 0x54ad, 0x54ad, 0x54ad, - 0x54ad, 0x54ad, 0x54ad, 0x54ad, 0x54ad, 0x54ad, 0x54ae, 0x54ae, - 0x54ae, 0x54ae, 0x54ae, 0x54ae, 0x54ae, 0x54ae, 0x54ae, 0x54ae, - 0x54ae, 0x54af, 0x54af, 0x54af, 0x54af, 0x54af, 0x54af, 0x54af, - 0x54af, 0x54af, 0x54af, 0x54af, 0x54b0, 0x54b0, 0x54b0, 0x54b0, - 0x54b0, 0x54b0, 0x54b0, 0x54b0, 0x54b0, 0x54b0, 0x54b0, 0x54b0, - 0x54b1, 0x54b1, 0x54b1, 0x54b1, 0x54b1, 0x54b1, 0x54b1, 0x54b1, - 0x54b1, 0x54b1, 0x54b1, 0x54b1, 0x54b2, 0x54b2, 0x54b2, 0x54b2, - 0x54b2, 0x54b2, 0x54b2, 0x54b2, 0x54b2, 0x54b2, 0x54b2, 0x54b3, - 0x54b3, 0x54b3, 0x54b3, 0x54b3, 0x54b3, 0x54b3, 0x54b3, 0x54b3, - 0x54b3, 0x54b3, 0x54b3, 0x54b4, 0x54b4, 0x54b4, 0x54b4, 0x54b4, - 0x54b4, 0x54b4, 0x54b4, 0x54b4, 0x54b4, 0x54b4, 0x54b4, 0x54b5, - 0x54b5, 0x54b5, 0x54b5, 0x54b5, 0x54b5, 0x54b5, 0x54b5, 0x54b5, - 0x54b5, 0x54b5, 0x54b5, 0x54b6, 0x54b6, 0x54b6, 0x54b6, 0x54b6, - 0x54b6, 0x54b6, 0x54b6, 0x54b6, 0x54b6, 0x54b6, 0x54b6, 0x54b7, - 0x54b7, 0x54b7, 0x54b7, 0x54b7, 0x54b7, 0x54b7, 0x54b7, 0x54b7, - 0x54b7, 0x54b7, 0x54b7, 0x54b8, 0x54b8, 0x54b8, 0x54b8, 0x54b8, - 0x54b8, 0x54b8, 0x54b8, 0x54b8, 0x54b8, 0x54b8, 0x54b8, 0x54b9, - 0x54b9, 0x54b9, 0x54b9, 0x54b9, 0x54b9, 0x54b9, 0x54b9, 0x54b9, - 0x54b9, 0x54b9, 0x54b9, 0x54b9, 0x54ba, 0x54ba, 0x54ba, 0x54ba, - 0x54ba, 0x54ba, 0x54ba, 0x54ba, 0x54ba, 0x54ba, 0x54ba, 0x54ba, - 0x54bb, 0x54bb, 0x54bb, 0x54bb, 0x54bb, 0x54bb, 0x54bb, 0x54bb, - 0x54bb, 0x54bb, 0x54bb, 0x54bb, 0x54bb, 0x54bc, 0x54bc, 0x54bc, - 0x54bc, 0x54bc, 0x54bc, 0x54bc, 0x54bc, 0x54bc, 0x54bc, 0x54bc, - 0x54bc, 0x54bd, 0x54bd, 0x54bd, 0x54bd, 0x54bd, 0x54bd, 0x54bd, - 0x54bd, 0x54bd, 0x54bd, 0x54bd, 0x54bd, 0x54bd, 0x54be, 0x54be, - 0x54be, 0x54be, 0x54be, 0x54be, 0x54be, 0x54be, 0x54be, 0x54be, - 0x54be, 0x54be, 0x54be, 0x54bf, 0x54bf, 0x54bf, 0x54bf, 0x54bf, - 0x54bf, 0x54bf, 0x54bf, 0x54bf, 0x54bf, 0x54bf, 0x54bf, 0x54bf, - 0x54c0, 0x54c0, 0x54c0, 0x54c0, 0x54c0, 0x54c0, 0x54c0, 0x54c0, - 0x54c0, 0x54c0, 0x54c0, 0x54c0, 0x54c0, 0x54c1, 0x54c1, 0x54c1, - 0x54c1, 0x54c1, 0x54c1, 0x54c1, 0x54c1, 0x54c1, 0x54c1, 0x54c1, - 0x54c1, 0x54c1, 0x54c2, 0x54c2, 0x54c2, 0x54c2, 0x54c2, 0x54c2, - 0x54c2, 0x54c2, 0x54c2, 0x54c2, 0x54c2, 0x54c2, 0x54c2, 0x54c3, - 0x54c3, 0x54c3, 0x54c3, 0x54c3, 0x54c3, 0x54c3, 0x54c3, 0x54c3, - 0x54c3, 0x54c3, 0x54c3, 0x54c3, 0x54c3, 0x54c4, 0x54c4, 0x54c4, - 0x54c4, 0x54c4, 0x54c4, 0x54c4, 0x54c4, 0x54c4, 0x54c4, 0x54c4, - 0x54c4, 0x54c4, 0x54c5, 0x54c5, 0x54c5, 0x54c5, 0x54c5, 0x54c5, - 0x54c5, 0x54c5, 0x54c5, 0x54c5, 0x54c5, 0x54c5, 0x54c5, 0x54c5, - 0x54c6, 0x54c6, 0x54c6, 0x54c6, 0x54c6, 0x54c6, 0x54c6, 0x54c6, - 0x54c6, 0x54c6, 0x54c6, 0x54c6, 0x54c6, 0x54c7, 0x54c7, 0x54c7, - 0x54c7, 0x54c7, 0x54c7, 0x54c7, 0x54c7, 0x54c7, 0x54c7, 0x54c7, - 0x54c7, 0x54c7, 0x54c7, 0x54c8, 0x54c8, 0x54c8, 0x54c8, 0x54c8, - 0x54c8, 0x54c8, 0x54c8, 0x54c8, 0x54c8, 0x54c8, 0x54c8, 0x54c8, - 0x54c8, 0x54c9, 0x54c9, 0x54c9, 0x54c9, 0x54c9, 0x54c9, 0x54c9, - 0x54c9, 0x54c9, 0x54c9, 0x54c9, 0x54c9, 0x54c9, 0x54c9, 0x54ca, - 0x54ca, 0x54ca, 0x54ca, 0x54ca, 0x54ca, 0x54ca, 0x54ca, 0x54ca, - 0x54ca, 0x54ca, 0x54ca, 0x54ca, 0x54ca, 0x54cb, 0x54cb, 0x54cb, - 0x54cb, 0x54cb, 0x54cb, 0x54cb, 0x54cb, 0x54cb, 0x54cb, 0x54cb, - 0x54cb, 0x54cb, 0x54cb, 0x54cc, 0x54cc, 0x54cc, 0x54cc, 0x54cc, - 0x54cc, 0x54cc, 0x54cc, 0x54cc, 0x54cc, 0x54cc, 0x54cc, 0x54cc, - 0x54cc, 0x54cc, 0x54cd, 0x54cd, 0x54cd, 0x54cd, 0x54cd, 0x54cd, - 0x54cd, 0x54cd, 0x54cd, 0x54cd, 0x54cd, 0x54cd, 0x54cd, 0x54cd, - 0x54ce, 0x54ce, 0x54ce, 0x54ce, 0x54ce, 0x54ce, 0x54ce, 0x54ce, - 0x54ce, 0x54ce, 0x54ce, 0x54ce, 0x54ce, 0x54ce, 0x54ce, 0x54cf, - 0x54cf, 0x54cf, 0x54cf, 0x54cf, 0x54cf, 0x54cf, 0x54cf, 0x54cf, - 0x54cf, 0x54cf, 0x54cf, 0x54cf, 0x54cf, 0x54d0, 0x54d0, 0x54d0, - 0x54d0, 0x54d0, 0x54d0, 0x54d0, 0x54d0, 0x54d0, 0x54d0, 0x54d0, - 0x54d0, 0x54d0, 0x54d0, 0x54d0, 0x54d1, 0x54d1, 0x54d1, 0x54d1, - 0x54d1, 0x54d1, 0x54d1, 0x54d1, 0x54d1, 0x54d1, 0x54d1, 0x54d1, - 0x54d1, 0x54d1, 0x54d1, 0x54d2, 0x54d2, 0x54d2, 0x54d2, 0x54d2, - 0x54d2, 0x54d2, 0x54d2, 0x54d2, 0x54d2, 0x54d2, 0x54d2, 0x54d2, - 0x54d2, 0x54d2, 0x54d3, 0x54d3, 0x54d3, 0x54d3, 0x54d3, 0x54d3, - 0x54d3, 0x54d3, 0x54d3, 0x54d3, 0x54d3, 0x54d3, 0x54d3, 0x54d3, - 0x54d3, 0x54d4, 0x54d4, 0x54d4, 0x54d4, 0x54d4, 0x54d4, 0x54d4, - 0x54d4, 0x54d4, 0x54d4, 0x54d4, 0x54d4, 0x54d4, 0x54d4, 0x54d4, - 0x54d4, 0x54d5, 0x54d5, 0x54d5, 0x54d5, 0x54d5, 0x54d5, 0x54d5, - 0x54d5, 0x54d5, 0x54d5, 0x54d5, 0x54d5, 0x54d5, 0x54d5, 0x54d5, - 0x54d6, 0x54d6, 0x54d6, 0x54d6, 0x54d6, 0x54d6, 0x54d6, 0x54d6, - 0x54d6, 0x54d6, 0x54d6, 0x54d6, 0x54d6, 0x54d6, 0x54d6, 0x54d7, - 0x54d7, 0x54d7, 0x54d7, 0x54d7, 0x54d7, 0x54d7, 0x54d7, 0x54d7, - 0x54d7, 0x54d7, 0x54d7, 0x54d7, 0x54d7, 0x54d7, 0x54d7, 0x54d8, - 0x54d8, 0x54d8, 0x54d8, 0x54d8, 0x54d8, 0x54d8, 0x54d8, 0x54d8, - 0x54d8, 0x54d8, 0x54d8, 0x54d8, 0x54d8, 0x54d8, 0x54d8, 0x54d9, - 0x54d9, 0x54d9, 0x54d9, 0x54d9, 0x54d9, 0x54d9, 0x54d9, 0x54d9, - 0x54d9, 0x54d9, 0x54d9, 0x54d9, 0x54d9, 0x54d9, 0x54d9, 0x54da, - 0x54da, 0x54da, 0x54da, 0x54da, 0x54da, 0x54da, 0x54da, 0x54da, - 0x54da, 0x54da, 0x54da, 0x54da, 0x54db, 0x54db, 0x54db, 0x54db, - 0x54db, 0x54db, 0x54db, 0x54db, 0x54dc, 0x54dc, 0x54dc, 0x54dc, - 0x54dc, 0x54dc, 0x54dc, 0x54dc, 0x54dd, 0x54dd, 0x54dd, 0x54dd, - 0x54dd, 0x54dd, 0x54dd, 0x54dd, 0x54de, 0x54de, 0x54de, 0x54de, - 0x54de, 0x54de, 0x54de, 0x54de, 0x54df, 0x54df, 0x54df, 0x54df, - 0x54df, 0x54df, 0x54df, 0x54df, 0x54e0, 0x54e0, 0x54e0, 0x54e0, - 0x54e0, 0x54e0, 0x54e0, 0x54e0, 0x54e0, 0x54e1, 0x54e1, 0x54e1, - 0x54e1, 0x54e1, 0x54e1, 0x54e1, 0x54e1, 0x54e2, 0x54e2, 0x54e2, - 0x54e2, 0x54e2, 0x54e2, 0x54e2, 0x54e2, 0x54e2, 0x54e3, 0x54e3, - 0x54e3, 0x54e3, 0x54e3, 0x54e3, 0x54e3, 0x54e3, 0x54e4, 0x54e4, - 0x54e4, 0x54e4, 0x54e4, 0x54e4, 0x54e4, 0x54e4, 0x54e4, 0x54e5, - 0x54e5, 0x54e5, 0x54e5, 0x54e5, 0x54e5, 0x54e5, 0x54e5, 0x54e5, - 0x54e6, 0x54e6, 0x54e6, 0x54e6, 0x54e6, 0x54e6, 0x54e6, 0x54e6, - 0x54e7, 0x54e7, 0x54e7, 0x54e7, 0x54e7, 0x54e7, 0x54e7, 0x54e7, - 0x54e7, 0x54e8, 0x54e8, 0x54e8, 0x54e8, 0x54e8, 0x54e8, 0x54e8, - 0x54e8, 0x54e8, 0x54e9, 0x54e9, 0x54e9, 0x54e9, 0x54e9, 0x54e9, - 0x54e9, 0x54e9, 0x54e9, 0x54ea, 0x54ea, 0x54ea, 0x54ea, 0x54ea, - 0x54ea, 0x54ea, 0x54ea, 0x54ea, 0x54eb, 0x54eb, 0x54eb, 0x54eb, - 0x54eb, 0x54eb, 0x54eb, 0x54eb, 0x54eb, 0x54ec, 0x54ec, 0x54ec, - 0x54ec, 0x54ec, 0x54ec, 0x54ec, 0x54ec, 0x54ec, 0x54ec, 0x54ed, - 0x54ed, 0x54ed, 0x54ed, 0x54ed, 0x54ed, 0x54ed, 0x54ed, 0x54ed, - 0x54ee, 0x54ee, 0x54ee, 0x54ee, 0x54ee, 0x54ee, 0x54ee, 0x54ee, - 0x54ee, 0x54ef, 0x54ef, 0x54ef, 0x54ef, 0x54ef, 0x54ef, 0x54ef, - 0x54ef, 0x54ef, 0x54ef, 0x54f0, 0x54f0, 0x54f0, 0x54f0, 0x54f0, - 0x54f0, 0x54f0, 0x54f0, 0x54f0, 0x54f1, 0x54f1, 0x54f1, 0x54f1, - 0x54f1, 0x54f1, 0x54f1, 0x54f1, 0x54f1, 0x54f1, 0x54f2, 0x54f2, - 0x54f2, 0x54f2, 0x54f2, 0x54f2, 0x54f2, 0x54f2, 0x54f2, 0x54f3, - 0x54f3, 0x54f3, 0x54f3, 0x54f3, 0x54f3, 0x54f3, 0x54f3, 0x54f3, - 0x54f3, 0x54f4, 0x54f4, 0x54f4, 0x54f4, 0x54f4, 0x54f4, 0x54f4, - 0x54f4, 0x54f4, 0x54f4, 0x54f5, 0x54f5, 0x54f5, 0x54f5, 0x54f5, - 0x54f5, 0x54f5, 0x54f5, 0x54f5, 0x54f5, 0x54f6, 0x54f6, 0x54f6, - 0x54f6, 0x54f6, 0x54f6, 0x54f6, 0x54f6, 0x54f6, 0x54f6, 0x54f7, - 0x54f7, 0x54f7, 0x54f7, 0x54f7, 0x54f7, 0x54f7, 0x54f7, 0x54f7, - 0x54f7, 0x54f8, 0x54f8, 0x54f8, 0x54f8, 0x54f8, 0x54f8, 0x54f8, - 0x54f8, 0x54f8, 0x54f8, 0x54f9, 0x54f9, 0x54f9, 0x54f9, 0x54f9, - 0x54f9, 0x54f9, 0x54f9, 0x54f9, 0x54f9, 0x54fa, 0x54fa, 0x54fa, - 0x54fa, 0x54fa, 0x54fa, 0x54fa, 0x54fa, 0x54fa, 0x54fa, 0x54fb, - 0x54fb, 0x54fb, 0x54fb, 0x54fb, 0x54fb, 0x54fb, 0x54fb, 0x54fb, - 0x54fb, 0x54fb, 0x54fc, 0x54fc, 0x54fc, 0x54fc, 0x54fc, 0x54fc, - 0x54fc, 0x54fc, 0x54fc, 0x54fc, 0x54fd, 0x54fd, 0x54fd, 0x54fd, - 0x54fd, 0x54fd, 0x54fd, 0x54fd, 0x54fd, 0x54fd, 0x54fd, 0x54fe, - 0x54fe, 0x54fe, 0x54fe, 0x54fe, 0x54fe, 0x54fe, 0x54fe, 0x54fe, - 0x54fe, 0x54ff, 0x54ff, 0x54ff, 0x54ff, 0x54ff, 0x54ff, 0x54ff, - 0x54ff, 0x54ff, 0x54ff, 0x54ff, 0x5500, 0x5500, 0x5500, 0x5500, - 0x5500, 0x5500, 0x5500, 0x5500, 0x5500, 0x5500, 0x5500, 0x5501, - 0x5501, 0x5501, 0x5501, 0x5501, 0x5501, 0x5501, 0x5501, 0x5501, - 0x5501, 0x5502, 0x5502, 0x5502, 0x5502, 0x5502, 0x5502, 0x5502, - 0x5502, 0x5502, 0x5502, 0x5502, 0x5503, 0x5503, 0x5503, 0x5503, - 0x5503, 0x5503, 0x5503, 0x5503, 0x5503, 0x5503, 0x5503, 0x5504, - 0x5504, 0x5504, 0x5504, 0x5504, 0x5504, 0x5504, 0x5504, 0x5504, - 0x5504, 0x5504, 0x5505, 0x5505, 0x5505, 0x5505, 0x5505, 0x5505, - 0x5505, 0x5505, 0x5505, 0x5505, 0x5505, 0x5505, 0x5506, 0x5506, - 0x5506, 0x5506, 0x5506, 0x5506, 0x5506, 0x5506, 0x5506, 0x5506, - 0x5506, 0x5507, 0x5507, 0x5507, 0x5507, 0x5507, 0x5507, 0x5507, - 0x5507, 0x5507, 0x5507, 0x5507, 0x5508, 0x5508, 0x5508, 0x5508, - 0x5508, 0x5508, 0x5508, 0x5508, 0x5508, 0x5508, 0x5508, 0x5508, - 0x5509, 0x5509, 0x5509, 0x5509, 0x5509, 0x5509, 0x5509, 0x5509, - 0x5509, 0x5509, 0x5509, 0x550a, 0x550a, 0x550a, 0x550a, 0x550a, - 0x550a, 0x550a, 0x550a, 0x550a, 0x550a, 0x550a, 0x550a, 0x550b, - 0x550b, 0x550b, 0x550b, 0x550b, 0x550b, 0x550b, 0x550b, 0x550b, - 0x550b, 0x550b, 0x550b, 0x550c, 0x550c, 0x550c, 0x550c, 0x550c, - 0x550c, 0x550c, 0x550c, 0x550c, 0x550c, 0x550c, 0x550d, 0x550d, - 0x550d, 0x550d, 0x550d, 0x550d, 0x550d, 0x550d, 0x550d, 0x550d, - 0x550d, 0x550d, 0x550e, 0x550e, 0x550e, 0x550e, 0x550e, 0x550e, - 0x550e, 0x550e, 0x550e, 0x550e, 0x550e, 0x550e, 0x550f, 0x550f, - 0x550f, 0x550f, 0x550f, 0x550f, 0x550f, 0x550f, 0x550f, 0x550f, - 0x550f, 0x550f, 0x5510, 0x5510, 0x5510, 0x5510, 0x5510, 0x5510, - 0x5510, 0x5510, 0x5510, 0x5510, 0x5510, 0x5510, 0x5510, 0x5511, - 0x5511, 0x5511, 0x5511, 0x5511, 0x5511, 0x5511, 0x5511, 0x5511, - 0x5511, 0x5511, 0x5511, 0x5512, 0x5512, 0x5512, 0x5512, 0x5512, - 0x5512, 0x5512, 0x5512, 0x5512, 0x5512, 0x5512, 0x5512, 0x5513, - 0x5513, 0x5513, 0x5513, 0x5513, 0x5513, 0x5513, 0x5513, 0x5513, - 0x5513, 0x5513, 0x5513, 0x5513, 0x5514, 0x5514, 0x5514, 0x5514, - 0x5514, 0x5514, 0x5514, 0x5514, 0x5514, 0x5514, 0x5514, 0x5514, - 0x5515, 0x5515, 0x5515, 0x5515, 0x5515, 0x5515, 0x5515, 0x5515, - 0x5515, 0x5515, 0x5515, 0x5515, 0x5515, 0x5516, 0x5516, 0x5516, - 0x5516, 0x5516, 0x5516, 0x5516, 0x5516, 0x5516, 0x5516, 0x5516, - 0x5516, 0x5516, 0x5517, 0x5517, 0x5517, 0x5517, 0x5517, 0x5517, - 0x5517, 0x5517, 0x5517, 0x5517, 0x5517, 0x5517, 0x5517, 0x5518, - 0x5518, 0x5518, 0x5518, 0x5518, 0x5518, 0x5518, 0x5518, 0x5518, - 0x5518, 0x5518, 0x5518, 0x5518, 0x5519, 0x5519, 0x5519, 0x5519, - 0x5519, 0x5519, 0x5519, 0x5519, 0x5519, 0x5519, 0x5519, 0x5519, - 0x5519, 0x551a, 0x551a, 0x551a, 0x551a, 0x551a, 0x551a, 0x551a, - 0x551a, 0x551a, 0x551a, 0x551a, 0x551a, 0x551a, 0x551b, 0x551b, - 0x551b, 0x551b, 0x551b, 0x551b, 0x551b, 0x551b, 0x551b, 0x551b, - 0x551b, 0x551b, 0x551b, 0x551c, 0x551c, 0x551c, 0x551c, 0x551c, - 0x551c, 0x551c, 0x551c, 0x551c, 0x551c, 0x551c, 0x551c, 0x551c, - 0x551d, 0x551d, 0x551d, 0x551d, 0x551d, 0x551d, 0x551d, 0x551d, - 0x551d, 0x551d, 0x551d, 0x551d, 0x551d, 0x551d, 0x551e, 0x551e, - 0x551e, 0x551e, 0x551e, 0x551e, 0x551e, 0x551e, 0x551e, 0x551e, - 0x551e, 0x551e, 0x551e, 0x551e, 0x551f, 0x551f, 0x551f, 0x551f, - 0x551f, 0x551f, 0x551f, 0x551f, 0x551f, 0x551f, 0x551f, 0x551f, - 0x551f, 0x5520, 0x5520, 0x5520, 0x5520, 0x5520, 0x5520, 0x5520, - 0x5520, 0x5520, 0x5520, 0x5520, 0x5520, 0x5520, 0x5520, 0x5521, - 0x5521, 0x5521, 0x5521, 0x5521, 0x5521, 0x5521, 0x5521, 0x5521, - 0x5521, 0x5521, 0x5521, 0x5521, 0x5521, 0x5522, 0x5522, 0x5522, - 0x5522, 0x5522, 0x5522, 0x5522, 0x5522, 0x5522, 0x5522, 0x5522, - 0x5522, 0x5522, 0x5522, 0x5523, 0x5523, 0x5523, 0x5523, 0x5523, - 0x5523, 0x5523, 0x5523, 0x5523, 0x5523, 0x5523, 0x5523, 0x5523, - 0x5523, 0x5524, 0x5524, 0x5524, 0x5524, 0x5524, 0x5524, 0x5524, - 0x5524, 0x5524, 0x5524, 0x5524, 0x5524, 0x5524, 0x5524, 0x5525, - 0x5525, 0x5525, 0x5525, 0x5525, 0x5525, 0x5525, 0x5525, 0x5525, - 0x5525, 0x5525, 0x5525, 0x5525, 0x5525, 0x5525, 0x5526, 0x5526, - 0x5526, 0x5526, 0x5526, 0x5526, 0x5526, 0x5526, 0x5526, 0x5526, - 0x5526, 0x5526, 0x5526, 0x5526, 0x5527, 0x5527, 0x5527, 0x5527, - 0x5527, 0x5527, 0x5527, 0x5527, 0x5527, 0x5527, 0x5527, 0x5527, - 0x5527, 0x5527, 0x5527, 0x5528, 0x5528, 0x5528, 0x5528, 0x5528, - 0x5528, 0x5528, 0x5528, 0x5528, 0x5528, 0x5528, 0x5528, 0x5528, - 0x5528, 0x5528, 0x5529, 0x5529, 0x5529, 0x5529, 0x5529, 0x5529, - 0x5529, 0x5529, 0x5529, 0x5529, 0x5529, 0x5529, 0x5529, 0x5529, - 0x552a, 0x552a, 0x552a, 0x552a, 0x552a, 0x552a, 0x552a, 0x552a, - 0x552a, 0x552a, 0x552a, 0x552a, 0x552a, 0x552a, 0x552a, 0x552b, - 0x552b, 0x552b, 0x552b, 0x552b, 0x552b, 0x552b, 0x552b, 0x552b, - 0x552b, 0x552b, 0x552b, 0x552b, 0x552b, 0x552b, 0x552c, 0x552c, - 0x552c, 0x552c, 0x552c, 0x552c, 0x552c, 0x552c, 0x552c, 0x552c, - 0x552c, 0x552c, 0x552c, 0x552c, 0x552c, 0x552d, 0x552d, 0x552d, - 0x552d, 0x552d, 0x552d, 0x552d, 0x552d, 0x552d, 0x552d, 0x552d, - 0x552d, 0x552d, 0x552d, 0x552d, 0x552d, 0x552e, 0x552e, 0x552e, - 0x552e, 0x552e, 0x552e, 0x552e, 0x552e, 0x552e, 0x552e, 0x552e, - 0x552e, 0x552e, 0x552e, 0x552e, 0x552f, 0x552f, 0x552f, 0x552f, - 0x552f, 0x552f, 0x552f, 0x552f, 0x552f, 0x552f, 0x552f, 0x552f, - 0x552f, 0x552f, 0x552f, 0x552f, 0x5530, 0x5530, 0x5530, 0x5530, - 0x5530, 0x5530, 0x5530, 0x5530, 0x5530, 0x5530, 0x5530, 0x5530, - 0x5530, 0x5530, 0x5530, 0x5531, 0x5531, 0x5531, 0x5531, 0x5531, - 0x5531, 0x5531, 0x5531, 0x5531, 0x5531, 0x5531, 0x5531, 0x5531, - 0x5531, 0x5531, 0x5531, 0x5532, 0x5532, 0x5532, 0x5532, 0x5532, - 0x5532, 0x5532, 0x5532, 0x5532, 0x5532, 0x5532, 0x5532, 0x5532, - 0x5532, 0x5532, 0x5532, 0x5533, 0x5533, 0x5533, 0x5533, 0x5533, - 0x5533, 0x5533, 0x5533, 0x5533, 0x5533, 0x5533, 0x5534, 0x5534, - 0x5534, 0x5534, 0x5534, 0x5534, 0x5534, 0x5534, 0x5535, 0x5535, - 0x5535, 0x5535, 0x5535, 0x5535, 0x5535, 0x5535, 0x5536, 0x5536, - 0x5536, 0x5536, 0x5536, 0x5536, 0x5536, 0x5536, 0x5537, 0x5537, - 0x5537, 0x5537, 0x5537, 0x5537, 0x5537, 0x5537, 0x5538, 0x5538, - 0x5538, 0x5538, 0x5538, 0x5538, 0x5538, 0x5538, 0x5538, 0x5539, - 0x5539, 0x5539, 0x5539, 0x5539, 0x5539, 0x5539, 0x5539, 0x553a, - 0x553a, 0x553a, 0x553a, 0x553a, 0x553a, 0x553a, 0x553a, 0x553a, - 0x553b, 0x553b, 0x553b, 0x553b, 0x553b, 0x553b, 0x553b, 0x553b, - 0x553c, 0x553c, 0x553c, 0x553c, 0x553c, 0x553c, 0x553c, 0x553c, - 0x553c, 0x553d, 0x553d, 0x553d, 0x553d, 0x553d, 0x553d, 0x553d, - 0x553d, 0x553e, 0x553e, 0x553e, 0x553e, 0x553e, 0x553e, 0x553e, - 0x553e, 0x553e, 0x553f, 0x553f, 0x553f, 0x553f, 0x553f, 0x553f, - 0x553f, 0x553f, 0x553f, 0x5540, 0x5540, 0x5540, 0x5540, 0x5540, - 0x5540, 0x5540, 0x5540, 0x5540, 0x5541, 0x5541, 0x5541, 0x5541, - 0x5541, 0x5541, 0x5541, 0x5541, 0x5541, 0x5542, 0x5542, 0x5542, - 0x5542, 0x5542, 0x5542, 0x5542, 0x5542, 0x5542, 0x5543, 0x5543, - 0x5543, 0x5543, 0x5543, 0x5543, 0x5543, 0x5543, 0x5543, 0x5544, - 0x5544, 0x5544, 0x5544, 0x5544, 0x5544, 0x5544, 0x5544, 0x5544, - 0x5545, 0x5545, 0x5545, 0x5545, 0x5545, 0x5545, 0x5545, 0x5545, - 0x5545, 0x5546, 0x5546, 0x5546, 0x5546, 0x5546, 0x5546, 0x5546, - 0x5546, 0x5546, 0x5547, 0x5547, 0x5547, 0x5547, 0x5547, 0x5547, - 0x5547, 0x5547, 0x5547, 0x5547, 0x5548, 0x5548, 0x5548, 0x5548, - 0x5548, 0x5548, 0x5548, 0x5548, 0x5548, 0x5549, 0x5549, 0x5549, - 0x5549, 0x5549, 0x5549, 0x5549, 0x5549, 0x5549, 0x5549, 0x554a, - 0x554a, 0x554a, 0x554a, 0x554a, 0x554a, 0x554a, 0x554a, 0x554a, - 0x554b, 0x554b, 0x554b, 0x554b, 0x554b, 0x554b, 0x554b, 0x554b, - 0x554b, 0x554b, 0x554c, 0x554c, 0x554c, 0x554c, 0x554c, 0x554c, - 0x554c, 0x554c, 0x554c, 0x554c, 0x554d, 0x554d, 0x554d, 0x554d, - 0x554d, 0x554d, 0x554d, 0x554d, 0x554d, 0x554d, 0x554e, 0x554e, - 0x554e, 0x554e, 0x554e, 0x554e, 0x554e, 0x554e, 0x554e, 0x554f, - 0x554f, 0x554f, 0x554f, 0x554f, 0x554f, 0x554f, 0x554f, 0x554f, - 0x554f, 0x5550, 0x5550, 0x5550, 0x5550, 0x5550, 0x5550, 0x5550, - 0x5550, 0x5550, 0x5550, 0x5551, 0x5551, 0x5551, 0x5551, 0x5551, - 0x5551, 0x5551, 0x5551, 0x5551, 0x5551, 0x5551, 0x5552, 0x5552, - 0x5552, 0x5552, 0x5552, 0x5552, 0x5552, 0x5552, 0x5552, 0x5552, - 0x5553, 0x5553, 0x5553, 0x5553, 0x5553, 0x5553, 0x5553, 0x5553, - 0x5553, 0x5553, 0x5554, 0x5554, 0x5554, 0x5554, 0x5554, 0x5554, - 0x5554, 0x5554, 0x5554, 0x5554, 0x5555, 0x5555, 0x5555, 0x5555, - 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5556, - 0x5556, 0x5556, 0x5556, 0x5556, 0x5556, 0x5556, 0x5556, 0x5556, - 0x5556, 0x5557, 0x5557, 0x5557, 0x5557, 0x5557, 0x5557, 0x5557, - 0x5557, 0x5557, 0x5557, 0x5557, 0x5558, 0x5558, 0x5558, 0x5558, - 0x5558, 0x5558, 0x5558, 0x5558, 0x5558, 0x5558, 0x5558, 0x5559, - 0x5559, 0x5559, 0x5559, 0x5559, 0x5559, 0x5559, 0x5559, 0x5559, - 0x5559, 0x5559, 0x555a, 0x555a, 0x555a, 0x555a, 0x555a, 0x555a, - 0x555a, 0x555a, 0x555a, 0x555a, 0x555b, 0x555b, 0x555b, 0x555b, - 0x555b, 0x555b, 0x555b, 0x555b, 0x555b, 0x555b, 0x555b, 0x555c, - 0x555c, 0x555c, 0x555c, 0x555c, 0x555c, 0x555c, 0x555c, 0x555c, - 0x555c, 0x555c, 0x555d, 0x555d, 0x555d, 0x555d, 0x555d, 0x555d, - 0x555d, 0x555d, 0x555d, 0x555d, 0x555d, 0x555d, 0x555e, 0x555e, - 0x555e, 0x555e, 0x555e, 0x555e, 0x555e, 0x555e, 0x555e, 0x555e, - 0x555e, 0x555f, 0x555f, 0x555f, 0x555f, 0x555f, 0x555f, 0x555f, - 0x555f, 0x555f, 0x555f, 0x555f, 0x5560, 0x5560, 0x5560, 0x5560, - 0x5560, 0x5560, 0x5560, 0x5560, 0x5560, 0x5560, 0x5560, 0x5561, - 0x5561, 0x5561, 0x5561, 0x5561, 0x5561, 0x5561, 0x5561, 0x5561, - 0x5561, 0x5561, 0x5561, 0x5562, 0x5562, 0x5562, 0x5562, 0x5562, - 0x5562, 0x5562, 0x5562, 0x5562, 0x5562, 0x5562, 0x5563, 0x5563, - 0x5563, 0x5563, 0x5563, 0x5563, 0x5563, 0x5563, 0x5563, 0x5563, - 0x5563, 0x5563, 0x5564, 0x5564, 0x5564, 0x5564, 0x5564, 0x5564, - 0x5564, 0x5564, 0x5564, 0x5564, 0x5564, 0x5564, 0x5565, 0x5565, - 0x5565, 0x5565, 0x5565, 0x5565, 0x5565, 0x5565, 0x5565, 0x5565, - 0x5565, 0x5565, 0x5566, 0x5566, 0x5566, 0x5566, 0x5566, 0x5566, - 0x5566, 0x5566, 0x5566, 0x5566, 0x5566, 0x5566, 0x5567, 0x5567, - 0x5567, 0x5567, 0x5567, 0x5567, 0x5567, 0x5567, 0x5567, 0x5567, - 0x5567, 0x5567, 0x5568, 0x5568, 0x5568, 0x5568, 0x5568, 0x5568, - 0x5568, 0x5568, 0x5568, 0x5568, 0x5568, 0x5568, 0x5569, 0x5569, - 0x5569, 0x5569, 0x5569, 0x5569, 0x5569, 0x5569, 0x5569, 0x5569, - 0x5569, 0x5569, 0x556a, 0x556a, 0x556a, 0x556a, 0x556a, 0x556a, - 0x556a, 0x556a, 0x556a, 0x556a, 0x556a, 0x556a, 0x556b, 0x556b, - 0x556b, 0x556b, 0x556b, 0x556b, 0x556b, 0x556b, 0x556b, 0x556b, - 0x556b, 0x556b, 0x556b, 0x556c, 0x556c, 0x556c, 0x556c, 0x556c, - 0x556c, 0x556c, 0x556c, 0x556c, 0x556c, 0x556c, 0x556c, 0x556d, - 0x556d, 0x556d, 0x556d, 0x556d, 0x556d, 0x556d, 0x556d, 0x556d, - 0x556d, 0x556d, 0x556d, 0x556d, 0x556e, 0x556e, 0x556e, 0x556e, - 0x556e, 0x556e, 0x556e, 0x556e, 0x556e, 0x556e, 0x556e, 0x556e, - 0x556f, 0x556f, 0x556f, 0x556f, 0x556f, 0x556f, 0x556f, 0x556f, - 0x556f, 0x556f, 0x556f, 0x556f, 0x556f, 0x5570, 0x5570, 0x5570, - 0x5570, 0x5570, 0x5570, 0x5570, 0x5570, 0x5570, 0x5570, 0x5570, - 0x5570, 0x5570, 0x5571, 0x5571, 0x5571, 0x5571, 0x5571, 0x5571, - 0x5571, 0x5571, 0x5571, 0x5571, 0x5571, 0x5571, 0x5571, 0x5572, - 0x5572, 0x5572, 0x5572, 0x5572, 0x5572, 0x5572, 0x5572, 0x5572, - 0x5572, 0x5572, 0x5572, 0x5572, 0x5573, 0x5573, 0x5573, 0x5573, - 0x5573, 0x5573, 0x5573, 0x5573, 0x5573, 0x5573, 0x5573, 0x5573, - 0x5573, 0x5574, 0x5574, 0x5574, 0x5574, 0x5574, 0x5574, 0x5574, - 0x5574, 0x5574, 0x5574, 0x5574, 0x5574, 0x5574, 0x5574, 0x5575, - 0x5575, 0x5575, 0x5575, 0x5575, 0x5575, 0x5575, 0x5575, 0x5575, - 0x5575, 0x5575, 0x5575, 0x5575, 0x5576, 0x5576, 0x5576, 0x5576, - 0x5576, 0x5576, 0x5576, 0x5576, 0x5576, 0x5576, 0x5576, 0x5576, - 0x5576, 0x5576, 0x5577, 0x5577, 0x5577, 0x5577, 0x5577, 0x5577, - 0x5577, 0x5577, 0x5577, 0x5577, 0x5577, 0x5577, 0x5577, 0x5578, - 0x5578, 0x5578, 0x5578, 0x5578, 0x5578, 0x5578, 0x5578, 0x5578, - 0x5578, 0x5578, 0x5578, 0x5578, 0x5578, 0x5579, 0x5579, 0x5579, - 0x5579, 0x5579, 0x5579, 0x5579, 0x5579, 0x5579, 0x5579, 0x5579, - 0x5579, 0x5579, 0x5579, 0x557a, 0x557a, 0x557a, 0x557a, 0x557a, - 0x557a, 0x557a, 0x557a, 0x557a, 0x557a, 0x557a, 0x557a, 0x557a, - 0x557a, 0x557b, 0x557b, 0x557b, 0x557b, 0x557b, 0x557b, 0x557b, - 0x557b, 0x557b, 0x557b, 0x557b, 0x557b, 0x557b, 0x557b, 0x557c, - 0x557c, 0x557c, 0x557c, 0x557c, 0x557c, 0x557c, 0x557c, 0x557c, - 0x557c, 0x557c, 0x557c, 0x557c, 0x557c, 0x557d, 0x557d, 0x557d, - 0x557d, 0x557d, 0x557d, 0x557d, 0x557d, 0x557d, 0x557d, 0x557d, - 0x557d, 0x557d, 0x557d, 0x557e, 0x557e, 0x557e, 0x557e, 0x557e, - 0x557e, 0x557e, 0x557e, 0x557e, 0x557e, 0x557e, 0x557e, 0x557e, - 0x557e, 0x557e, 0x557f, 0x557f, 0x557f, 0x557f, 0x557f, 0x557f, - 0x557f, 0x557f, 0x557f, 0x557f, 0x557f, 0x557f, 0x557f, 0x557f, - 0x5580, 0x5580, 0x5580, 0x5580, 0x5580, 0x5580, 0x5580, 0x5580, - 0x5580, 0x5580, 0x5580, 0x5580, 0x5580, 0x5580, 0x5580, 0x5581, - 0x5581, 0x5581, 0x5581, 0x5581, 0x5581, 0x5581, 0x5581, 0x5581, - 0x5581, 0x5581, 0x5581, 0x5581, 0x5581, 0x5581, 0x5582, 0x5582, - 0x5582, 0x5582, 0x5582, 0x5582, 0x5582, 0x5582, 0x5582, 0x5582, - 0x5582, 0x5582, 0x5582, 0x5582, 0x5583, 0x5583, 0x5583, 0x5583, - 0x5583, 0x5583, 0x5583, 0x5583, 0x5583, 0x5583, 0x5583, 0x5583, - 0x5583, 0x5583, 0x5583, 0x5584, 0x5584, 0x5584, 0x5584, 0x5584, - 0x5584, 0x5584, 0x5584, 0x5584, 0x5584, 0x5584, 0x5584, 0x5584, - 0x5584, 0x5584, 0x5584, 0x5585, 0x5585, 0x5585, 0x5585, 0x5585, - 0x5585, 0x5585, 0x5585, 0x5585, 0x5585, 0x5585, 0x5585, 0x5585, - 0x5585, 0x5585, 0x5586, 0x5586, 0x5586, 0x5586, 0x5586, 0x5586, - 0x5586, 0x5586, 0x5586, 0x5586, 0x5586, 0x5586, 0x5586, 0x5586, - 0x5586, 0x5587, 0x5587, 0x5587, 0x5587, 0x5587, 0x5587, 0x5587, - 0x5587, 0x5587, 0x5587, 0x5587, 0x5587, 0x5587, 0x5587, 0x5587, - 0x5588, 0x5588, 0x5588, 0x5588, 0x5588, 0x5588, 0x5588, 0x5588, - 0x5588, 0x5588, 0x5588, 0x5588, 0x5588, 0x5588, 0x5588, 0x5588, - 0x5589, 0x5589, 0x5589, 0x5589, 0x5589, 0x5589, 0x5589, 0x5589, - 0x5589, 0x5589, 0x5589, 0x5589, 0x5589, 0x5589, 0x5589, 0x5589, - 0x558a, 0x558a, 0x558a, 0x558a, 0x558a, 0x558a, 0x558a, 0x558a, - 0x558a, 0x558a, 0x558a, 0x558a, 0x558a, 0x558a, 0x558a, 0x558a, - 0x558b, 0x558b, 0x558b, 0x558b, 0x558b, 0x558b, 0x558b, 0x558b, - 0x558b, 0x558b, 0x558b, 0x558b, 0x558b, 0x558b, 0x558b, 0x558c, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xfc00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -}; diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/dwaLookups.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/dwaLookups.cpp deleted file mode 100644 index 19ec831..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/dwaLookups.cpp +++ /dev/null @@ -1,573 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2009-2014 DreamWorks Animation LLC. -// -// 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 DreamWorks Animation nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -// -// A program to generate various acceleration lookup tables -// for Imf::DwaCompressor -// - -#include -#include -#include -#include -#include - -#include - -#ifdef OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN -#include -#endif - -#include -#include -#include -#include -#include -#include "ImfNamespace.h" - -using namespace OPENEXR_IMF_NAMESPACE; - -namespace { - - class LutHeaderWorker - { - public: - class Runner : public IlmThread::Thread - { - public: - Runner(LutHeaderWorker &worker, bool output): - IlmThread::Thread(), - _worker(worker), - _output(output) - { - start(); - } - - virtual ~Runner() - { - _semaphore.wait(); - } - - virtual void run() - { - _semaphore.post(); - _worker.run(_output); - } - - private: - LutHeaderWorker &_worker; - bool _output; - IlmThread::Semaphore _semaphore; - - }; // class LutHeaderWorker::Runner - - - LutHeaderWorker(size_t startValue, - size_t endValue): - _lastCandidateCount(0), - _startValue(startValue), - _endValue(endValue), - _numElements(0), - _offset(new size_t[numValues()]), - _elements(new unsigned short[1024*1024*2]) - { - } - - ~LutHeaderWorker() - { - delete[] _offset; - delete[] _elements; - } - - size_t lastCandidateCount() const - { - return _lastCandidateCount; - } - - size_t numValues() const - { - return _endValue - _startValue; - } - - size_t numElements() const - { - return _numElements; - } - - const size_t* offset() const - { - return _offset; - } - - const unsigned short* elements() const - { - return _elements; - } - - void run(bool outputProgress) - { - half candidate[16]; - int candidateCount = 0; - - for (size_t input=_startValue; input<_endValue; ++input) { - - if (outputProgress) { -#ifdef __GNUC__ - if (input % 100 == 0) { - fprintf(stderr, - " Building acceleration for DwaCompressor, %.2f %% %c", - 100.*(float)input/(float)numValues(), 13); - } -#else - if (input % 1000 == 0) { - fprintf(stderr, - " Building acceleration for DwaCompressor, %.2f %%\n", - 100.*(float)input/(float)numValues()); - } -#endif - } - - - int numSetBits = countSetBits(input); - half inputHalf, closestHalf; - - inputHalf.setBits(input); - - _offset[input - _startValue] = _numElements; - - // Gather candidates - candidateCount = 0; - for (int targetNumSetBits=numSetBits-1; targetNumSetBits>=0; - --targetNumSetBits) { - bool valueFound = false; - - for (int i=0; i<65536; ++i) { - if (countSetBits(i) != targetNumSetBits) continue; - - if (!valueFound) { - closestHalf.setBits(i); - valueFound = true; - } else { - half tmpHalf; - - tmpHalf.setBits(i); - - if (fabs((float)inputHalf - (float)tmpHalf) < - fabs((float)inputHalf - (float)closestHalf)) { - closestHalf = tmpHalf; - } - } - } - - if (valueFound == false) { - fprintf(stderr, "bork bork bork!\n"); - } - - candidate[candidateCount] = closestHalf; - candidateCount++; - } - - // Sort candidates by increasing number of bits set - for (int i=0; i> 8]; - } - - }; // class LutHeaderWorker - -} // namespace - - -// -// Generate a no-op LUT, to cut down in conditional branches -// -void -generateNoop() -{ - printf("const unsigned short dwaCompressorNoOp[] = \n"); - printf("{"); - for (int i=0; i<65536; ++i) { - - if (i % 8 == 0) { - printf("\n "); - } - - unsigned short dst; - char *tmp = (char *)(&dst); - - unsigned short src = (unsigned short)i; - Xdr::write (tmp, src); - - printf("0x%04x, ", dst); - } - printf("\n};\n"); -} - -// -// Nonlinearly encode luminance. For values below 1.0, we want -// to use a gamma 2.2 function to match what is fairly common -// for storing output referred. However, > 1, gamma functions blow up, -// and log functions are much better behaved. We could use a log -// function everywhere, but it tends to over-sample dark -// regions and undersample the brighter regions, when -// compared to the way real devices reproduce values. -// -// So, above 1, use a log function which is a smooth blend -// into the gamma function. -// -// Nonlinear(linear) = -// -// linear^(1./2.2) / linear <= 1.0 -// | -// ln(linear)/ln(e^2.2) + 1 \ otherwise -// -// -// toNonlinear[] needs to take in XDR format half float values, -// and output NATIVE format float. -// -// toLinear[] does the opposite - takes in NATIVE half and -// outputs XDR half values. -// - -void -generateToLinear() -{ - unsigned short toLinear[65536]; - - toLinear[0] = 0; - - for (int i=1; i<65536; ++i) { - half h; - float sign = 1; - float logBase = pow(2.7182818, 2.2); - - // map NaN and inf to 0 - if ((i & 0x7c00) == 0x7c00) { - toLinear[i] = 0; - continue; - } - - // - // _toLinear - assume i is NATIVE, but our output needs - // to get flipped to XDR - // - h.setBits(i); - sign = 1; - if ((float)h < 0) { - sign = -1; - } - - if ( fabs( (float)h) <= 1.0 ) { - h = (half)(sign * pow((float)fabs((float)h), 2.2f)); - } else { - h = (half)(sign * pow(logBase, (float)(fabs((float)h) - 1.0))); - } - - { - char *tmp = (char *)(&toLinear[i]); - - Xdr::write ( tmp, h.bits()); - } - } - - printf("const unsigned short dwaCompressorToLinear[] = \n"); - printf("{"); - for (int i=0; i<65536; ++i) { - if (i % 8 == 0) { - printf("\n "); - } - printf("0x%04x, ", toLinear[i]); - } - printf("\n};\n"); -} - - -void -generateToNonlinear() -{ - unsigned short toNonlinear[65536]; - - toNonlinear[0] = 0; - - for (int i=1; i<65536; ++i) { - unsigned short usNative, usXdr; - half h; - float sign = 1; - float logBase = pow(2.7182818, 2.2); - - usXdr = i; - - { - const char *tmp = (char *)(&usXdr); - - Xdr::read(tmp, usNative); - } - - // map NaN and inf to 0 - if ((usNative & 0x7c00) == 0x7c00) { - toNonlinear[i] = 0; - continue; - } - - // - // toNonlinear - assume i is XDR - // - h.setBits(usNative); - sign = 1; - if ((float)h < 0) { - sign = -1; - } - - if ( fabs( (float)h ) <= 1.0) { - h = (half)(sign * pow(fabs((float)h), 1.f/2.2f)); - } else { - h = (half)(sign * ( log(fabs((float)h)) / log(logBase) + 1.0) ); - } - toNonlinear[i] = h.bits(); - } - - printf("const unsigned short dwaCompressorToNonlinear[] = \n"); - printf("{"); - for (int i=0; i<65536; ++i) { - if (i % 8 == 0) { - printf("\n "); - } - printf("0x%04x, ", toNonlinear[i]); - } - printf("\n};\n"); -} - -// -// Attempt to get available CPUs in a somewhat portable way. -// - -int -cpuCount() -{ - if (!IlmThread::supportsThreads()) return 1; - - int cpuCount = 1; - -#if defined (OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN) - - cpuCount = sysconf(_SC_NPROCESSORS_ONLN); - -#elif defined (_WIN32) - - SYSTEM_INFO sysinfo; - GetSystemInfo( &sysinfo ); - cpuCount = sysinfo.dwNumberOfProcessors; - -#endif - - if (cpuCount < 1) cpuCount = 1; - return cpuCount; -} - -// -// Generate acceleration luts for the quantization. -// -// For each possible input value, we want to find the closest numbers -// which have one fewer bits set than before. -// -// This gives us num_bits(input)-1 values per input. If we alloc -// space for everything, that's like a 2MB table. We can do better -// by compressing all the values to be contigious and using offset -// pointers. -// -// After we've found the candidates with fewer bits set, sort them -// based on increasing numbers of bits set. This way, on quantize(), -// we can scan through the list and halt once we find the first -// candidate within the error range. For small values that can -// be quantized to 0, 0 is the first value tested and the search -// can exit fairly quickly. -// - -void -generateLutHeader() -{ - std::vector workers; - - size_t numWorkers = cpuCount(); - size_t workerInterval = 65536 / numWorkers; - - for (size_t i=0; i runners; - for (size_t i=0; irun(i == 0); - } - } - - printf("static unsigned int closestDataOffset[] = {\n"); - int offsetIdx = 0; - int offsetPrev = 0; - for (size_t i=0; inumValues(); ++value) { - if (offsetIdx % 8 == 0) { - printf(" "); - } - printf("%6lu, ", workers[i]->offset()[value] + offsetPrev); - if (offsetIdx % 8 == 7) { - printf("\n"); - } - offsetIdx++; - } - offsetPrev += workers[i]->offset()[workers[i]->numValues()-1] + - workers[i]->lastCandidateCount(); - } - printf("};\n\n\n"); - - - printf("static unsigned short closestData[] = {\n"); - int elementIdx = 0; - for (size_t i=0; inumElements(); ++element) { - if (elementIdx % 8 == 0) { - printf(" "); - } - printf("%5d, ", workers[i]->elements()[element]); - if (elementIdx % 8 == 7) { - printf("\n"); - } - elementIdx++; - } - } - printf("};\n\n\n"); - - for (size_t i=0; i\n"); - printf("\n\n\n"); - - generateNoop(); - - printf("\n\n\n"); - - generateToLinear(); - - printf("\n\n\n"); - - generateToNonlinear(); - - printf("\n\n\n"); - - generateLutHeader(); - - return 0; -} diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/dwaLookups.h b/Dependencies/FreeImage/Source/OpenEXR/IlmImf/dwaLookups.h deleted file mode 100644 index 63c0d3d..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmImf/dwaLookups.h +++ /dev/null @@ -1,98334 +0,0 @@ -#include - - - -const unsigned short dwaCompressorNoOp[] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, - 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, - 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff, - 0x0100, 0x0101, 0x0102, 0x0103, 0x0104, 0x0105, 0x0106, 0x0107, - 0x0108, 0x0109, 0x010a, 0x010b, 0x010c, 0x010d, 0x010e, 0x010f, - 0x0110, 0x0111, 0x0112, 0x0113, 0x0114, 0x0115, 0x0116, 0x0117, - 0x0118, 0x0119, 0x011a, 0x011b, 0x011c, 0x011d, 0x011e, 0x011f, - 0x0120, 0x0121, 0x0122, 0x0123, 0x0124, 0x0125, 0x0126, 0x0127, - 0x0128, 0x0129, 0x012a, 0x012b, 0x012c, 0x012d, 0x012e, 0x012f, - 0x0130, 0x0131, 0x0132, 0x0133, 0x0134, 0x0135, 0x0136, 0x0137, - 0x0138, 0x0139, 0x013a, 0x013b, 0x013c, 0x013d, 0x013e, 0x013f, - 0x0140, 0x0141, 0x0142, 0x0143, 0x0144, 0x0145, 0x0146, 0x0147, - 0x0148, 0x0149, 0x014a, 0x014b, 0x014c, 0x014d, 0x014e, 0x014f, - 0x0150, 0x0151, 0x0152, 0x0153, 0x0154, 0x0155, 0x0156, 0x0157, - 0x0158, 0x0159, 0x015a, 0x015b, 0x015c, 0x015d, 0x015e, 0x015f, - 0x0160, 0x0161, 0x0162, 0x0163, 0x0164, 0x0165, 0x0166, 0x0167, - 0x0168, 0x0169, 0x016a, 0x016b, 0x016c, 0x016d, 0x016e, 0x016f, - 0x0170, 0x0171, 0x0172, 0x0173, 0x0174, 0x0175, 0x0176, 0x0177, - 0x0178, 0x0179, 0x017a, 0x017b, 0x017c, 0x017d, 0x017e, 0x017f, - 0x0180, 0x0181, 0x0182, 0x0183, 0x0184, 0x0185, 0x0186, 0x0187, - 0x0188, 0x0189, 0x018a, 0x018b, 0x018c, 0x018d, 0x018e, 0x018f, - 0x0190, 0x0191, 0x0192, 0x0193, 0x0194, 0x0195, 0x0196, 0x0197, - 0x0198, 0x0199, 0x019a, 0x019b, 0x019c, 0x019d, 0x019e, 0x019f, - 0x01a0, 0x01a1, 0x01a2, 0x01a3, 0x01a4, 0x01a5, 0x01a6, 0x01a7, - 0x01a8, 0x01a9, 0x01aa, 0x01ab, 0x01ac, 0x01ad, 0x01ae, 0x01af, - 0x01b0, 0x01b1, 0x01b2, 0x01b3, 0x01b4, 0x01b5, 0x01b6, 0x01b7, - 0x01b8, 0x01b9, 0x01ba, 0x01bb, 0x01bc, 0x01bd, 0x01be, 0x01bf, - 0x01c0, 0x01c1, 0x01c2, 0x01c3, 0x01c4, 0x01c5, 0x01c6, 0x01c7, - 0x01c8, 0x01c9, 0x01ca, 0x01cb, 0x01cc, 0x01cd, 0x01ce, 0x01cf, - 0x01d0, 0x01d1, 0x01d2, 0x01d3, 0x01d4, 0x01d5, 0x01d6, 0x01d7, - 0x01d8, 0x01d9, 0x01da, 0x01db, 0x01dc, 0x01dd, 0x01de, 0x01df, - 0x01e0, 0x01e1, 0x01e2, 0x01e3, 0x01e4, 0x01e5, 0x01e6, 0x01e7, - 0x01e8, 0x01e9, 0x01ea, 0x01eb, 0x01ec, 0x01ed, 0x01ee, 0x01ef, - 0x01f0, 0x01f1, 0x01f2, 0x01f3, 0x01f4, 0x01f5, 0x01f6, 0x01f7, - 0x01f8, 0x01f9, 0x01fa, 0x01fb, 0x01fc, 0x01fd, 0x01fe, 0x01ff, - 0x0200, 0x0201, 0x0202, 0x0203, 0x0204, 0x0205, 0x0206, 0x0207, - 0x0208, 0x0209, 0x020a, 0x020b, 0x020c, 0x020d, 0x020e, 0x020f, - 0x0210, 0x0211, 0x0212, 0x0213, 0x0214, 0x0215, 0x0216, 0x0217, - 0x0218, 0x0219, 0x021a, 0x021b, 0x021c, 0x021d, 0x021e, 0x021f, - 0x0220, 0x0221, 0x0222, 0x0223, 0x0224, 0x0225, 0x0226, 0x0227, - 0x0228, 0x0229, 0x022a, 0x022b, 0x022c, 0x022d, 0x022e, 0x022f, - 0x0230, 0x0231, 0x0232, 0x0233, 0x0234, 0x0235, 0x0236, 0x0237, - 0x0238, 0x0239, 0x023a, 0x023b, 0x023c, 0x023d, 0x023e, 0x023f, - 0x0240, 0x0241, 0x0242, 0x0243, 0x0244, 0x0245, 0x0246, 0x0247, - 0x0248, 0x0249, 0x024a, 0x024b, 0x024c, 0x024d, 0x024e, 0x024f, - 0x0250, 0x0251, 0x0252, 0x0253, 0x0254, 0x0255, 0x0256, 0x0257, - 0x0258, 0x0259, 0x025a, 0x025b, 0x025c, 0x025d, 0x025e, 0x025f, - 0x0260, 0x0261, 0x0262, 0x0263, 0x0264, 0x0265, 0x0266, 0x0267, - 0x0268, 0x0269, 0x026a, 0x026b, 0x026c, 0x026d, 0x026e, 0x026f, - 0x0270, 0x0271, 0x0272, 0x0273, 0x0274, 0x0275, 0x0276, 0x0277, - 0x0278, 0x0279, 0x027a, 0x027b, 0x027c, 0x027d, 0x027e, 0x027f, - 0x0280, 0x0281, 0x0282, 0x0283, 0x0284, 0x0285, 0x0286, 0x0287, - 0x0288, 0x0289, 0x028a, 0x028b, 0x028c, 0x028d, 0x028e, 0x028f, - 0x0290, 0x0291, 0x0292, 0x0293, 0x0294, 0x0295, 0x0296, 0x0297, - 0x0298, 0x0299, 0x029a, 0x029b, 0x029c, 0x029d, 0x029e, 0x029f, - 0x02a0, 0x02a1, 0x02a2, 0x02a3, 0x02a4, 0x02a5, 0x02a6, 0x02a7, - 0x02a8, 0x02a9, 0x02aa, 0x02ab, 0x02ac, 0x02ad, 0x02ae, 0x02af, - 0x02b0, 0x02b1, 0x02b2, 0x02b3, 0x02b4, 0x02b5, 0x02b6, 0x02b7, - 0x02b8, 0x02b9, 0x02ba, 0x02bb, 0x02bc, 0x02bd, 0x02be, 0x02bf, - 0x02c0, 0x02c1, 0x02c2, 0x02c3, 0x02c4, 0x02c5, 0x02c6, 0x02c7, - 0x02c8, 0x02c9, 0x02ca, 0x02cb, 0x02cc, 0x02cd, 0x02ce, 0x02cf, - 0x02d0, 0x02d1, 0x02d2, 0x02d3, 0x02d4, 0x02d5, 0x02d6, 0x02d7, - 0x02d8, 0x02d9, 0x02da, 0x02db, 0x02dc, 0x02dd, 0x02de, 0x02df, - 0x02e0, 0x02e1, 0x02e2, 0x02e3, 0x02e4, 0x02e5, 0x02e6, 0x02e7, - 0x02e8, 0x02e9, 0x02ea, 0x02eb, 0x02ec, 0x02ed, 0x02ee, 0x02ef, - 0x02f0, 0x02f1, 0x02f2, 0x02f3, 0x02f4, 0x02f5, 0x02f6, 0x02f7, - 0x02f8, 0x02f9, 0x02fa, 0x02fb, 0x02fc, 0x02fd, 0x02fe, 0x02ff, - 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306, 0x0307, - 0x0308, 0x0309, 0x030a, 0x030b, 0x030c, 0x030d, 0x030e, 0x030f, - 0x0310, 0x0311, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, 0x0317, - 0x0318, 0x0319, 0x031a, 0x031b, 0x031c, 0x031d, 0x031e, 0x031f, - 0x0320, 0x0321, 0x0322, 0x0323, 0x0324, 0x0325, 0x0326, 0x0327, - 0x0328, 0x0329, 0x032a, 0x032b, 0x032c, 0x032d, 0x032e, 0x032f, - 0x0330, 0x0331, 0x0332, 0x0333, 0x0334, 0x0335, 0x0336, 0x0337, - 0x0338, 0x0339, 0x033a, 0x033b, 0x033c, 0x033d, 0x033e, 0x033f, - 0x0340, 0x0341, 0x0342, 0x0343, 0x0344, 0x0345, 0x0346, 0x0347, - 0x0348, 0x0349, 0x034a, 0x034b, 0x034c, 0x034d, 0x034e, 0x034f, - 0x0350, 0x0351, 0x0352, 0x0353, 0x0354, 0x0355, 0x0356, 0x0357, - 0x0358, 0x0359, 0x035a, 0x035b, 0x035c, 0x035d, 0x035e, 0x035f, - 0x0360, 0x0361, 0x0362, 0x0363, 0x0364, 0x0365, 0x0366, 0x0367, - 0x0368, 0x0369, 0x036a, 0x036b, 0x036c, 0x036d, 0x036e, 0x036f, - 0x0370, 0x0371, 0x0372, 0x0373, 0x0374, 0x0375, 0x0376, 0x0377, - 0x0378, 0x0379, 0x037a, 0x037b, 0x037c, 0x037d, 0x037e, 0x037f, - 0x0380, 0x0381, 0x0382, 0x0383, 0x0384, 0x0385, 0x0386, 0x0387, - 0x0388, 0x0389, 0x038a, 0x038b, 0x038c, 0x038d, 0x038e, 0x038f, - 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, - 0x03a0, 0x03a1, 0x03a2, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, - 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af, - 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, - 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, - 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, - 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x03cf, - 0x03d0, 0x03d1, 0x03d2, 0x03d3, 0x03d4, 0x03d5, 0x03d6, 0x03d7, - 0x03d8, 0x03d9, 0x03da, 0x03db, 0x03dc, 0x03dd, 0x03de, 0x03df, - 0x03e0, 0x03e1, 0x03e2, 0x03e3, 0x03e4, 0x03e5, 0x03e6, 0x03e7, - 0x03e8, 0x03e9, 0x03ea, 0x03eb, 0x03ec, 0x03ed, 0x03ee, 0x03ef, - 0x03f0, 0x03f1, 0x03f2, 0x03f3, 0x03f4, 0x03f5, 0x03f6, 0x03f7, - 0x03f8, 0x03f9, 0x03fa, 0x03fb, 0x03fc, 0x03fd, 0x03fe, 0x03ff, - 0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, - 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x040d, 0x040e, 0x040f, - 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, - 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, - 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, - 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, - 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, - 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, - 0x0450, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, - 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x045d, 0x045e, 0x045f, - 0x0460, 0x0461, 0x0462, 0x0463, 0x0464, 0x0465, 0x0466, 0x0467, - 0x0468, 0x0469, 0x046a, 0x046b, 0x046c, 0x046d, 0x046e, 0x046f, - 0x0470, 0x0471, 0x0472, 0x0473, 0x0474, 0x0475, 0x0476, 0x0477, - 0x0478, 0x0479, 0x047a, 0x047b, 0x047c, 0x047d, 0x047e, 0x047f, - 0x0480, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487, - 0x0488, 0x0489, 0x048a, 0x048b, 0x048c, 0x048d, 0x048e, 0x048f, - 0x0490, 0x0491, 0x0492, 0x0493, 0x0494, 0x0495, 0x0496, 0x0497, - 0x0498, 0x0499, 0x049a, 0x049b, 0x049c, 0x049d, 0x049e, 0x049f, - 0x04a0, 0x04a1, 0x04a2, 0x04a3, 0x04a4, 0x04a5, 0x04a6, 0x04a7, - 0x04a8, 0x04a9, 0x04aa, 0x04ab, 0x04ac, 0x04ad, 0x04ae, 0x04af, - 0x04b0, 0x04b1, 0x04b2, 0x04b3, 0x04b4, 0x04b5, 0x04b6, 0x04b7, - 0x04b8, 0x04b9, 0x04ba, 0x04bb, 0x04bc, 0x04bd, 0x04be, 0x04bf, - 0x04c0, 0x04c1, 0x04c2, 0x04c3, 0x04c4, 0x04c5, 0x04c6, 0x04c7, - 0x04c8, 0x04c9, 0x04ca, 0x04cb, 0x04cc, 0x04cd, 0x04ce, 0x04cf, - 0x04d0, 0x04d1, 0x04d2, 0x04d3, 0x04d4, 0x04d5, 0x04d6, 0x04d7, - 0x04d8, 0x04d9, 0x04da, 0x04db, 0x04dc, 0x04dd, 0x04de, 0x04df, - 0x04e0, 0x04e1, 0x04e2, 0x04e3, 0x04e4, 0x04e5, 0x04e6, 0x04e7, - 0x04e8, 0x04e9, 0x04ea, 0x04eb, 0x04ec, 0x04ed, 0x04ee, 0x04ef, - 0x04f0, 0x04f1, 0x04f2, 0x04f3, 0x04f4, 0x04f5, 0x04f6, 0x04f7, - 0x04f8, 0x04f9, 0x04fa, 0x04fb, 0x04fc, 0x04fd, 0x04fe, 0x04ff, - 0x0500, 0x0501, 0x0502, 0x0503, 0x0504, 0x0505, 0x0506, 0x0507, - 0x0508, 0x0509, 0x050a, 0x050b, 0x050c, 0x050d, 0x050e, 0x050f, - 0x0510, 0x0511, 0x0512, 0x0513, 0x0514, 0x0515, 0x0516, 0x0517, - 0x0518, 0x0519, 0x051a, 0x051b, 0x051c, 0x051d, 0x051e, 0x051f, - 0x0520, 0x0521, 0x0522, 0x0523, 0x0524, 0x0525, 0x0526, 0x0527, - 0x0528, 0x0529, 0x052a, 0x052b, 0x052c, 0x052d, 0x052e, 0x052f, - 0x0530, 0x0531, 0x0532, 0x0533, 0x0534, 0x0535, 0x0536, 0x0537, - 0x0538, 0x0539, 0x053a, 0x053b, 0x053c, 0x053d, 0x053e, 0x053f, - 0x0540, 0x0541, 0x0542, 0x0543, 0x0544, 0x0545, 0x0546, 0x0547, - 0x0548, 0x0549, 0x054a, 0x054b, 0x054c, 0x054d, 0x054e, 0x054f, - 0x0550, 0x0551, 0x0552, 0x0553, 0x0554, 0x0555, 0x0556, 0x0557, - 0x0558, 0x0559, 0x055a, 0x055b, 0x055c, 0x055d, 0x055e, 0x055f, - 0x0560, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, 0x0566, 0x0567, - 0x0568, 0x0569, 0x056a, 0x056b, 0x056c, 0x056d, 0x056e, 0x056f, - 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577, - 0x0578, 0x0579, 0x057a, 0x057b, 0x057c, 0x057d, 0x057e, 0x057f, - 0x0580, 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0587, - 0x0588, 0x0589, 0x058a, 0x058b, 0x058c, 0x058d, 0x058e, 0x058f, - 0x0590, 0x0591, 0x0592, 0x0593, 0x0594, 0x0595, 0x0596, 0x0597, - 0x0598, 0x0599, 0x059a, 0x059b, 0x059c, 0x059d, 0x059e, 0x059f, - 0x05a0, 0x05a1, 0x05a2, 0x05a3, 0x05a4, 0x05a5, 0x05a6, 0x05a7, - 0x05a8, 0x05a9, 0x05aa, 0x05ab, 0x05ac, 0x05ad, 0x05ae, 0x05af, - 0x05b0, 0x05b1, 0x05b2, 0x05b3, 0x05b4, 0x05b5, 0x05b6, 0x05b7, - 0x05b8, 0x05b9, 0x05ba, 0x05bb, 0x05bc, 0x05bd, 0x05be, 0x05bf, - 0x05c0, 0x05c1, 0x05c2, 0x05c3, 0x05c4, 0x05c5, 0x05c6, 0x05c7, - 0x05c8, 0x05c9, 0x05ca, 0x05cb, 0x05cc, 0x05cd, 0x05ce, 0x05cf, - 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, - 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, - 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, - 0x05e8, 0x05e9, 0x05ea, 0x05eb, 0x05ec, 0x05ed, 0x05ee, 0x05ef, - 0x05f0, 0x05f1, 0x05f2, 0x05f3, 0x05f4, 0x05f5, 0x05f6, 0x05f7, - 0x05f8, 0x05f9, 0x05fa, 0x05fb, 0x05fc, 0x05fd, 0x05fe, 0x05ff, - 0x0600, 0x0601, 0x0602, 0x0603, 0x0604, 0x0605, 0x0606, 0x0607, - 0x0608, 0x0609, 0x060a, 0x060b, 0x060c, 0x060d, 0x060e, 0x060f, - 0x0610, 0x0611, 0x0612, 0x0613, 0x0614, 0x0615, 0x0616, 0x0617, - 0x0618, 0x0619, 0x061a, 0x061b, 0x061c, 0x061d, 0x061e, 0x061f, - 0x0620, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, - 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, - 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, - 0x0638, 0x0639, 0x063a, 0x063b, 0x063c, 0x063d, 0x063e, 0x063f, - 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, - 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, - 0x0650, 0x0651, 0x0652, 0x0653, 0x0654, 0x0655, 0x0656, 0x0657, - 0x0658, 0x0659, 0x065a, 0x065b, 0x065c, 0x065d, 0x065e, 0x065f, - 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, - 0x0668, 0x0669, 0x066a, 0x066b, 0x066c, 0x066d, 0x066e, 0x066f, - 0x0670, 0x0671, 0x0672, 0x0673, 0x0674, 0x0675, 0x0676, 0x0677, - 0x0678, 0x0679, 0x067a, 0x067b, 0x067c, 0x067d, 0x067e, 0x067f, - 0x0680, 0x0681, 0x0682, 0x0683, 0x0684, 0x0685, 0x0686, 0x0687, - 0x0688, 0x0689, 0x068a, 0x068b, 0x068c, 0x068d, 0x068e, 0x068f, - 0x0690, 0x0691, 0x0692, 0x0693, 0x0694, 0x0695, 0x0696, 0x0697, - 0x0698, 0x0699, 0x069a, 0x069b, 0x069c, 0x069d, 0x069e, 0x069f, - 0x06a0, 0x06a1, 0x06a2, 0x06a3, 0x06a4, 0x06a5, 0x06a6, 0x06a7, - 0x06a8, 0x06a9, 0x06aa, 0x06ab, 0x06ac, 0x06ad, 0x06ae, 0x06af, - 0x06b0, 0x06b1, 0x06b2, 0x06b3, 0x06b4, 0x06b5, 0x06b6, 0x06b7, - 0x06b8, 0x06b9, 0x06ba, 0x06bb, 0x06bc, 0x06bd, 0x06be, 0x06bf, - 0x06c0, 0x06c1, 0x06c2, 0x06c3, 0x06c4, 0x06c5, 0x06c6, 0x06c7, - 0x06c8, 0x06c9, 0x06ca, 0x06cb, 0x06cc, 0x06cd, 0x06ce, 0x06cf, - 0x06d0, 0x06d1, 0x06d2, 0x06d3, 0x06d4, 0x06d5, 0x06d6, 0x06d7, - 0x06d8, 0x06d9, 0x06da, 0x06db, 0x06dc, 0x06dd, 0x06de, 0x06df, - 0x06e0, 0x06e1, 0x06e2, 0x06e3, 0x06e4, 0x06e5, 0x06e6, 0x06e7, - 0x06e8, 0x06e9, 0x06ea, 0x06eb, 0x06ec, 0x06ed, 0x06ee, 0x06ef, - 0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, 0x06f7, - 0x06f8, 0x06f9, 0x06fa, 0x06fb, 0x06fc, 0x06fd, 0x06fe, 0x06ff, - 0x0700, 0x0701, 0x0702, 0x0703, 0x0704, 0x0705, 0x0706, 0x0707, - 0x0708, 0x0709, 0x070a, 0x070b, 0x070c, 0x070d, 0x070e, 0x070f, - 0x0710, 0x0711, 0x0712, 0x0713, 0x0714, 0x0715, 0x0716, 0x0717, - 0x0718, 0x0719, 0x071a, 0x071b, 0x071c, 0x071d, 0x071e, 0x071f, - 0x0720, 0x0721, 0x0722, 0x0723, 0x0724, 0x0725, 0x0726, 0x0727, - 0x0728, 0x0729, 0x072a, 0x072b, 0x072c, 0x072d, 0x072e, 0x072f, - 0x0730, 0x0731, 0x0732, 0x0733, 0x0734, 0x0735, 0x0736, 0x0737, - 0x0738, 0x0739, 0x073a, 0x073b, 0x073c, 0x073d, 0x073e, 0x073f, - 0x0740, 0x0741, 0x0742, 0x0743, 0x0744, 0x0745, 0x0746, 0x0747, - 0x0748, 0x0749, 0x074a, 0x074b, 0x074c, 0x074d, 0x074e, 0x074f, - 0x0750, 0x0751, 0x0752, 0x0753, 0x0754, 0x0755, 0x0756, 0x0757, - 0x0758, 0x0759, 0x075a, 0x075b, 0x075c, 0x075d, 0x075e, 0x075f, - 0x0760, 0x0761, 0x0762, 0x0763, 0x0764, 0x0765, 0x0766, 0x0767, - 0x0768, 0x0769, 0x076a, 0x076b, 0x076c, 0x076d, 0x076e, 0x076f, - 0x0770, 0x0771, 0x0772, 0x0773, 0x0774, 0x0775, 0x0776, 0x0777, - 0x0778, 0x0779, 0x077a, 0x077b, 0x077c, 0x077d, 0x077e, 0x077f, - 0x0780, 0x0781, 0x0782, 0x0783, 0x0784, 0x0785, 0x0786, 0x0787, - 0x0788, 0x0789, 0x078a, 0x078b, 0x078c, 0x078d, 0x078e, 0x078f, - 0x0790, 0x0791, 0x0792, 0x0793, 0x0794, 0x0795, 0x0796, 0x0797, - 0x0798, 0x0799, 0x079a, 0x079b, 0x079c, 0x079d, 0x079e, 0x079f, - 0x07a0, 0x07a1, 0x07a2, 0x07a3, 0x07a4, 0x07a5, 0x07a6, 0x07a7, - 0x07a8, 0x07a9, 0x07aa, 0x07ab, 0x07ac, 0x07ad, 0x07ae, 0x07af, - 0x07b0, 0x07b1, 0x07b2, 0x07b3, 0x07b4, 0x07b5, 0x07b6, 0x07b7, - 0x07b8, 0x07b9, 0x07ba, 0x07bb, 0x07bc, 0x07bd, 0x07be, 0x07bf, - 0x07c0, 0x07c1, 0x07c2, 0x07c3, 0x07c4, 0x07c5, 0x07c6, 0x07c7, - 0x07c8, 0x07c9, 0x07ca, 0x07cb, 0x07cc, 0x07cd, 0x07ce, 0x07cf, - 0x07d0, 0x07d1, 0x07d2, 0x07d3, 0x07d4, 0x07d5, 0x07d6, 0x07d7, - 0x07d8, 0x07d9, 0x07da, 0x07db, 0x07dc, 0x07dd, 0x07de, 0x07df, - 0x07e0, 0x07e1, 0x07e2, 0x07e3, 0x07e4, 0x07e5, 0x07e6, 0x07e7, - 0x07e8, 0x07e9, 0x07ea, 0x07eb, 0x07ec, 0x07ed, 0x07ee, 0x07ef, - 0x07f0, 0x07f1, 0x07f2, 0x07f3, 0x07f4, 0x07f5, 0x07f6, 0x07f7, - 0x07f8, 0x07f9, 0x07fa, 0x07fb, 0x07fc, 0x07fd, 0x07fe, 0x07ff, - 0x0800, 0x0801, 0x0802, 0x0803, 0x0804, 0x0805, 0x0806, 0x0807, - 0x0808, 0x0809, 0x080a, 0x080b, 0x080c, 0x080d, 0x080e, 0x080f, - 0x0810, 0x0811, 0x0812, 0x0813, 0x0814, 0x0815, 0x0816, 0x0817, - 0x0818, 0x0819, 0x081a, 0x081b, 0x081c, 0x081d, 0x081e, 0x081f, - 0x0820, 0x0821, 0x0822, 0x0823, 0x0824, 0x0825, 0x0826, 0x0827, - 0x0828, 0x0829, 0x082a, 0x082b, 0x082c, 0x082d, 0x082e, 0x082f, - 0x0830, 0x0831, 0x0832, 0x0833, 0x0834, 0x0835, 0x0836, 0x0837, - 0x0838, 0x0839, 0x083a, 0x083b, 0x083c, 0x083d, 0x083e, 0x083f, - 0x0840, 0x0841, 0x0842, 0x0843, 0x0844, 0x0845, 0x0846, 0x0847, - 0x0848, 0x0849, 0x084a, 0x084b, 0x084c, 0x084d, 0x084e, 0x084f, - 0x0850, 0x0851, 0x0852, 0x0853, 0x0854, 0x0855, 0x0856, 0x0857, - 0x0858, 0x0859, 0x085a, 0x085b, 0x085c, 0x085d, 0x085e, 0x085f, - 0x0860, 0x0861, 0x0862, 0x0863, 0x0864, 0x0865, 0x0866, 0x0867, - 0x0868, 0x0869, 0x086a, 0x086b, 0x086c, 0x086d, 0x086e, 0x086f, - 0x0870, 0x0871, 0x0872, 0x0873, 0x0874, 0x0875, 0x0876, 0x0877, - 0x0878, 0x0879, 0x087a, 0x087b, 0x087c, 0x087d, 0x087e, 0x087f, - 0x0880, 0x0881, 0x0882, 0x0883, 0x0884, 0x0885, 0x0886, 0x0887, - 0x0888, 0x0889, 0x088a, 0x088b, 0x088c, 0x088d, 0x088e, 0x088f, - 0x0890, 0x0891, 0x0892, 0x0893, 0x0894, 0x0895, 0x0896, 0x0897, - 0x0898, 0x0899, 0x089a, 0x089b, 0x089c, 0x089d, 0x089e, 0x089f, - 0x08a0, 0x08a1, 0x08a2, 0x08a3, 0x08a4, 0x08a5, 0x08a6, 0x08a7, - 0x08a8, 0x08a9, 0x08aa, 0x08ab, 0x08ac, 0x08ad, 0x08ae, 0x08af, - 0x08b0, 0x08b1, 0x08b2, 0x08b3, 0x08b4, 0x08b5, 0x08b6, 0x08b7, - 0x08b8, 0x08b9, 0x08ba, 0x08bb, 0x08bc, 0x08bd, 0x08be, 0x08bf, - 0x08c0, 0x08c1, 0x08c2, 0x08c3, 0x08c4, 0x08c5, 0x08c6, 0x08c7, - 0x08c8, 0x08c9, 0x08ca, 0x08cb, 0x08cc, 0x08cd, 0x08ce, 0x08cf, - 0x08d0, 0x08d1, 0x08d2, 0x08d3, 0x08d4, 0x08d5, 0x08d6, 0x08d7, - 0x08d8, 0x08d9, 0x08da, 0x08db, 0x08dc, 0x08dd, 0x08de, 0x08df, - 0x08e0, 0x08e1, 0x08e2, 0x08e3, 0x08e4, 0x08e5, 0x08e6, 0x08e7, - 0x08e8, 0x08e9, 0x08ea, 0x08eb, 0x08ec, 0x08ed, 0x08ee, 0x08ef, - 0x08f0, 0x08f1, 0x08f2, 0x08f3, 0x08f4, 0x08f5, 0x08f6, 0x08f7, - 0x08f8, 0x08f9, 0x08fa, 0x08fb, 0x08fc, 0x08fd, 0x08fe, 0x08ff, - 0x0900, 0x0901, 0x0902, 0x0903, 0x0904, 0x0905, 0x0906, 0x0907, - 0x0908, 0x0909, 0x090a, 0x090b, 0x090c, 0x090d, 0x090e, 0x090f, - 0x0910, 0x0911, 0x0912, 0x0913, 0x0914, 0x0915, 0x0916, 0x0917, - 0x0918, 0x0919, 0x091a, 0x091b, 0x091c, 0x091d, 0x091e, 0x091f, - 0x0920, 0x0921, 0x0922, 0x0923, 0x0924, 0x0925, 0x0926, 0x0927, - 0x0928, 0x0929, 0x092a, 0x092b, 0x092c, 0x092d, 0x092e, 0x092f, - 0x0930, 0x0931, 0x0932, 0x0933, 0x0934, 0x0935, 0x0936, 0x0937, - 0x0938, 0x0939, 0x093a, 0x093b, 0x093c, 0x093d, 0x093e, 0x093f, - 0x0940, 0x0941, 0x0942, 0x0943, 0x0944, 0x0945, 0x0946, 0x0947, - 0x0948, 0x0949, 0x094a, 0x094b, 0x094c, 0x094d, 0x094e, 0x094f, - 0x0950, 0x0951, 0x0952, 0x0953, 0x0954, 0x0955, 0x0956, 0x0957, - 0x0958, 0x0959, 0x095a, 0x095b, 0x095c, 0x095d, 0x095e, 0x095f, - 0x0960, 0x0961, 0x0962, 0x0963, 0x0964, 0x0965, 0x0966, 0x0967, - 0x0968, 0x0969, 0x096a, 0x096b, 0x096c, 0x096d, 0x096e, 0x096f, - 0x0970, 0x0971, 0x0972, 0x0973, 0x0974, 0x0975, 0x0976, 0x0977, - 0x0978, 0x0979, 0x097a, 0x097b, 0x097c, 0x097d, 0x097e, 0x097f, - 0x0980, 0x0981, 0x0982, 0x0983, 0x0984, 0x0985, 0x0986, 0x0987, - 0x0988, 0x0989, 0x098a, 0x098b, 0x098c, 0x098d, 0x098e, 0x098f, - 0x0990, 0x0991, 0x0992, 0x0993, 0x0994, 0x0995, 0x0996, 0x0997, - 0x0998, 0x0999, 0x099a, 0x099b, 0x099c, 0x099d, 0x099e, 0x099f, - 0x09a0, 0x09a1, 0x09a2, 0x09a3, 0x09a4, 0x09a5, 0x09a6, 0x09a7, - 0x09a8, 0x09a9, 0x09aa, 0x09ab, 0x09ac, 0x09ad, 0x09ae, 0x09af, - 0x09b0, 0x09b1, 0x09b2, 0x09b3, 0x09b4, 0x09b5, 0x09b6, 0x09b7, - 0x09b8, 0x09b9, 0x09ba, 0x09bb, 0x09bc, 0x09bd, 0x09be, 0x09bf, - 0x09c0, 0x09c1, 0x09c2, 0x09c3, 0x09c4, 0x09c5, 0x09c6, 0x09c7, - 0x09c8, 0x09c9, 0x09ca, 0x09cb, 0x09cc, 0x09cd, 0x09ce, 0x09cf, - 0x09d0, 0x09d1, 0x09d2, 0x09d3, 0x09d4, 0x09d5, 0x09d6, 0x09d7, - 0x09d8, 0x09d9, 0x09da, 0x09db, 0x09dc, 0x09dd, 0x09de, 0x09df, - 0x09e0, 0x09e1, 0x09e2, 0x09e3, 0x09e4, 0x09e5, 0x09e6, 0x09e7, - 0x09e8, 0x09e9, 0x09ea, 0x09eb, 0x09ec, 0x09ed, 0x09ee, 0x09ef, - 0x09f0, 0x09f1, 0x09f2, 0x09f3, 0x09f4, 0x09f5, 0x09f6, 0x09f7, - 0x09f8, 0x09f9, 0x09fa, 0x09fb, 0x09fc, 0x09fd, 0x09fe, 0x09ff, - 0x0a00, 0x0a01, 0x0a02, 0x0a03, 0x0a04, 0x0a05, 0x0a06, 0x0a07, - 0x0a08, 0x0a09, 0x0a0a, 0x0a0b, 0x0a0c, 0x0a0d, 0x0a0e, 0x0a0f, - 0x0a10, 0x0a11, 0x0a12, 0x0a13, 0x0a14, 0x0a15, 0x0a16, 0x0a17, - 0x0a18, 0x0a19, 0x0a1a, 0x0a1b, 0x0a1c, 0x0a1d, 0x0a1e, 0x0a1f, - 0x0a20, 0x0a21, 0x0a22, 0x0a23, 0x0a24, 0x0a25, 0x0a26, 0x0a27, - 0x0a28, 0x0a29, 0x0a2a, 0x0a2b, 0x0a2c, 0x0a2d, 0x0a2e, 0x0a2f, - 0x0a30, 0x0a31, 0x0a32, 0x0a33, 0x0a34, 0x0a35, 0x0a36, 0x0a37, - 0x0a38, 0x0a39, 0x0a3a, 0x0a3b, 0x0a3c, 0x0a3d, 0x0a3e, 0x0a3f, - 0x0a40, 0x0a41, 0x0a42, 0x0a43, 0x0a44, 0x0a45, 0x0a46, 0x0a47, - 0x0a48, 0x0a49, 0x0a4a, 0x0a4b, 0x0a4c, 0x0a4d, 0x0a4e, 0x0a4f, - 0x0a50, 0x0a51, 0x0a52, 0x0a53, 0x0a54, 0x0a55, 0x0a56, 0x0a57, - 0x0a58, 0x0a59, 0x0a5a, 0x0a5b, 0x0a5c, 0x0a5d, 0x0a5e, 0x0a5f, - 0x0a60, 0x0a61, 0x0a62, 0x0a63, 0x0a64, 0x0a65, 0x0a66, 0x0a67, - 0x0a68, 0x0a69, 0x0a6a, 0x0a6b, 0x0a6c, 0x0a6d, 0x0a6e, 0x0a6f, - 0x0a70, 0x0a71, 0x0a72, 0x0a73, 0x0a74, 0x0a75, 0x0a76, 0x0a77, - 0x0a78, 0x0a79, 0x0a7a, 0x0a7b, 0x0a7c, 0x0a7d, 0x0a7e, 0x0a7f, - 0x0a80, 0x0a81, 0x0a82, 0x0a83, 0x0a84, 0x0a85, 0x0a86, 0x0a87, - 0x0a88, 0x0a89, 0x0a8a, 0x0a8b, 0x0a8c, 0x0a8d, 0x0a8e, 0x0a8f, - 0x0a90, 0x0a91, 0x0a92, 0x0a93, 0x0a94, 0x0a95, 0x0a96, 0x0a97, - 0x0a98, 0x0a99, 0x0a9a, 0x0a9b, 0x0a9c, 0x0a9d, 0x0a9e, 0x0a9f, - 0x0aa0, 0x0aa1, 0x0aa2, 0x0aa3, 0x0aa4, 0x0aa5, 0x0aa6, 0x0aa7, - 0x0aa8, 0x0aa9, 0x0aaa, 0x0aab, 0x0aac, 0x0aad, 0x0aae, 0x0aaf, - 0x0ab0, 0x0ab1, 0x0ab2, 0x0ab3, 0x0ab4, 0x0ab5, 0x0ab6, 0x0ab7, - 0x0ab8, 0x0ab9, 0x0aba, 0x0abb, 0x0abc, 0x0abd, 0x0abe, 0x0abf, - 0x0ac0, 0x0ac1, 0x0ac2, 0x0ac3, 0x0ac4, 0x0ac5, 0x0ac6, 0x0ac7, - 0x0ac8, 0x0ac9, 0x0aca, 0x0acb, 0x0acc, 0x0acd, 0x0ace, 0x0acf, - 0x0ad0, 0x0ad1, 0x0ad2, 0x0ad3, 0x0ad4, 0x0ad5, 0x0ad6, 0x0ad7, - 0x0ad8, 0x0ad9, 0x0ada, 0x0adb, 0x0adc, 0x0add, 0x0ade, 0x0adf, - 0x0ae0, 0x0ae1, 0x0ae2, 0x0ae3, 0x0ae4, 0x0ae5, 0x0ae6, 0x0ae7, - 0x0ae8, 0x0ae9, 0x0aea, 0x0aeb, 0x0aec, 0x0aed, 0x0aee, 0x0aef, - 0x0af0, 0x0af1, 0x0af2, 0x0af3, 0x0af4, 0x0af5, 0x0af6, 0x0af7, - 0x0af8, 0x0af9, 0x0afa, 0x0afb, 0x0afc, 0x0afd, 0x0afe, 0x0aff, - 0x0b00, 0x0b01, 0x0b02, 0x0b03, 0x0b04, 0x0b05, 0x0b06, 0x0b07, - 0x0b08, 0x0b09, 0x0b0a, 0x0b0b, 0x0b0c, 0x0b0d, 0x0b0e, 0x0b0f, - 0x0b10, 0x0b11, 0x0b12, 0x0b13, 0x0b14, 0x0b15, 0x0b16, 0x0b17, - 0x0b18, 0x0b19, 0x0b1a, 0x0b1b, 0x0b1c, 0x0b1d, 0x0b1e, 0x0b1f, - 0x0b20, 0x0b21, 0x0b22, 0x0b23, 0x0b24, 0x0b25, 0x0b26, 0x0b27, - 0x0b28, 0x0b29, 0x0b2a, 0x0b2b, 0x0b2c, 0x0b2d, 0x0b2e, 0x0b2f, - 0x0b30, 0x0b31, 0x0b32, 0x0b33, 0x0b34, 0x0b35, 0x0b36, 0x0b37, - 0x0b38, 0x0b39, 0x0b3a, 0x0b3b, 0x0b3c, 0x0b3d, 0x0b3e, 0x0b3f, - 0x0b40, 0x0b41, 0x0b42, 0x0b43, 0x0b44, 0x0b45, 0x0b46, 0x0b47, - 0x0b48, 0x0b49, 0x0b4a, 0x0b4b, 0x0b4c, 0x0b4d, 0x0b4e, 0x0b4f, - 0x0b50, 0x0b51, 0x0b52, 0x0b53, 0x0b54, 0x0b55, 0x0b56, 0x0b57, - 0x0b58, 0x0b59, 0x0b5a, 0x0b5b, 0x0b5c, 0x0b5d, 0x0b5e, 0x0b5f, - 0x0b60, 0x0b61, 0x0b62, 0x0b63, 0x0b64, 0x0b65, 0x0b66, 0x0b67, - 0x0b68, 0x0b69, 0x0b6a, 0x0b6b, 0x0b6c, 0x0b6d, 0x0b6e, 0x0b6f, - 0x0b70, 0x0b71, 0x0b72, 0x0b73, 0x0b74, 0x0b75, 0x0b76, 0x0b77, - 0x0b78, 0x0b79, 0x0b7a, 0x0b7b, 0x0b7c, 0x0b7d, 0x0b7e, 0x0b7f, - 0x0b80, 0x0b81, 0x0b82, 0x0b83, 0x0b84, 0x0b85, 0x0b86, 0x0b87, - 0x0b88, 0x0b89, 0x0b8a, 0x0b8b, 0x0b8c, 0x0b8d, 0x0b8e, 0x0b8f, - 0x0b90, 0x0b91, 0x0b92, 0x0b93, 0x0b94, 0x0b95, 0x0b96, 0x0b97, - 0x0b98, 0x0b99, 0x0b9a, 0x0b9b, 0x0b9c, 0x0b9d, 0x0b9e, 0x0b9f, - 0x0ba0, 0x0ba1, 0x0ba2, 0x0ba3, 0x0ba4, 0x0ba5, 0x0ba6, 0x0ba7, - 0x0ba8, 0x0ba9, 0x0baa, 0x0bab, 0x0bac, 0x0bad, 0x0bae, 0x0baf, - 0x0bb0, 0x0bb1, 0x0bb2, 0x0bb3, 0x0bb4, 0x0bb5, 0x0bb6, 0x0bb7, - 0x0bb8, 0x0bb9, 0x0bba, 0x0bbb, 0x0bbc, 0x0bbd, 0x0bbe, 0x0bbf, - 0x0bc0, 0x0bc1, 0x0bc2, 0x0bc3, 0x0bc4, 0x0bc5, 0x0bc6, 0x0bc7, - 0x0bc8, 0x0bc9, 0x0bca, 0x0bcb, 0x0bcc, 0x0bcd, 0x0bce, 0x0bcf, - 0x0bd0, 0x0bd1, 0x0bd2, 0x0bd3, 0x0bd4, 0x0bd5, 0x0bd6, 0x0bd7, - 0x0bd8, 0x0bd9, 0x0bda, 0x0bdb, 0x0bdc, 0x0bdd, 0x0bde, 0x0bdf, - 0x0be0, 0x0be1, 0x0be2, 0x0be3, 0x0be4, 0x0be5, 0x0be6, 0x0be7, - 0x0be8, 0x0be9, 0x0bea, 0x0beb, 0x0bec, 0x0bed, 0x0bee, 0x0bef, - 0x0bf0, 0x0bf1, 0x0bf2, 0x0bf3, 0x0bf4, 0x0bf5, 0x0bf6, 0x0bf7, - 0x0bf8, 0x0bf9, 0x0bfa, 0x0bfb, 0x0bfc, 0x0bfd, 0x0bfe, 0x0bff, - 0x0c00, 0x0c01, 0x0c02, 0x0c03, 0x0c04, 0x0c05, 0x0c06, 0x0c07, - 0x0c08, 0x0c09, 0x0c0a, 0x0c0b, 0x0c0c, 0x0c0d, 0x0c0e, 0x0c0f, - 0x0c10, 0x0c11, 0x0c12, 0x0c13, 0x0c14, 0x0c15, 0x0c16, 0x0c17, - 0x0c18, 0x0c19, 0x0c1a, 0x0c1b, 0x0c1c, 0x0c1d, 0x0c1e, 0x0c1f, - 0x0c20, 0x0c21, 0x0c22, 0x0c23, 0x0c24, 0x0c25, 0x0c26, 0x0c27, - 0x0c28, 0x0c29, 0x0c2a, 0x0c2b, 0x0c2c, 0x0c2d, 0x0c2e, 0x0c2f, - 0x0c30, 0x0c31, 0x0c32, 0x0c33, 0x0c34, 0x0c35, 0x0c36, 0x0c37, - 0x0c38, 0x0c39, 0x0c3a, 0x0c3b, 0x0c3c, 0x0c3d, 0x0c3e, 0x0c3f, - 0x0c40, 0x0c41, 0x0c42, 0x0c43, 0x0c44, 0x0c45, 0x0c46, 0x0c47, - 0x0c48, 0x0c49, 0x0c4a, 0x0c4b, 0x0c4c, 0x0c4d, 0x0c4e, 0x0c4f, - 0x0c50, 0x0c51, 0x0c52, 0x0c53, 0x0c54, 0x0c55, 0x0c56, 0x0c57, - 0x0c58, 0x0c59, 0x0c5a, 0x0c5b, 0x0c5c, 0x0c5d, 0x0c5e, 0x0c5f, - 0x0c60, 0x0c61, 0x0c62, 0x0c63, 0x0c64, 0x0c65, 0x0c66, 0x0c67, - 0x0c68, 0x0c69, 0x0c6a, 0x0c6b, 0x0c6c, 0x0c6d, 0x0c6e, 0x0c6f, - 0x0c70, 0x0c71, 0x0c72, 0x0c73, 0x0c74, 0x0c75, 0x0c76, 0x0c77, - 0x0c78, 0x0c79, 0x0c7a, 0x0c7b, 0x0c7c, 0x0c7d, 0x0c7e, 0x0c7f, - 0x0c80, 0x0c81, 0x0c82, 0x0c83, 0x0c84, 0x0c85, 0x0c86, 0x0c87, - 0x0c88, 0x0c89, 0x0c8a, 0x0c8b, 0x0c8c, 0x0c8d, 0x0c8e, 0x0c8f, - 0x0c90, 0x0c91, 0x0c92, 0x0c93, 0x0c94, 0x0c95, 0x0c96, 0x0c97, - 0x0c98, 0x0c99, 0x0c9a, 0x0c9b, 0x0c9c, 0x0c9d, 0x0c9e, 0x0c9f, - 0x0ca0, 0x0ca1, 0x0ca2, 0x0ca3, 0x0ca4, 0x0ca5, 0x0ca6, 0x0ca7, - 0x0ca8, 0x0ca9, 0x0caa, 0x0cab, 0x0cac, 0x0cad, 0x0cae, 0x0caf, - 0x0cb0, 0x0cb1, 0x0cb2, 0x0cb3, 0x0cb4, 0x0cb5, 0x0cb6, 0x0cb7, - 0x0cb8, 0x0cb9, 0x0cba, 0x0cbb, 0x0cbc, 0x0cbd, 0x0cbe, 0x0cbf, - 0x0cc0, 0x0cc1, 0x0cc2, 0x0cc3, 0x0cc4, 0x0cc5, 0x0cc6, 0x0cc7, - 0x0cc8, 0x0cc9, 0x0cca, 0x0ccb, 0x0ccc, 0x0ccd, 0x0cce, 0x0ccf, - 0x0cd0, 0x0cd1, 0x0cd2, 0x0cd3, 0x0cd4, 0x0cd5, 0x0cd6, 0x0cd7, - 0x0cd8, 0x0cd9, 0x0cda, 0x0cdb, 0x0cdc, 0x0cdd, 0x0cde, 0x0cdf, - 0x0ce0, 0x0ce1, 0x0ce2, 0x0ce3, 0x0ce4, 0x0ce5, 0x0ce6, 0x0ce7, - 0x0ce8, 0x0ce9, 0x0cea, 0x0ceb, 0x0cec, 0x0ced, 0x0cee, 0x0cef, - 0x0cf0, 0x0cf1, 0x0cf2, 0x0cf3, 0x0cf4, 0x0cf5, 0x0cf6, 0x0cf7, - 0x0cf8, 0x0cf9, 0x0cfa, 0x0cfb, 0x0cfc, 0x0cfd, 0x0cfe, 0x0cff, - 0x0d00, 0x0d01, 0x0d02, 0x0d03, 0x0d04, 0x0d05, 0x0d06, 0x0d07, - 0x0d08, 0x0d09, 0x0d0a, 0x0d0b, 0x0d0c, 0x0d0d, 0x0d0e, 0x0d0f, - 0x0d10, 0x0d11, 0x0d12, 0x0d13, 0x0d14, 0x0d15, 0x0d16, 0x0d17, - 0x0d18, 0x0d19, 0x0d1a, 0x0d1b, 0x0d1c, 0x0d1d, 0x0d1e, 0x0d1f, - 0x0d20, 0x0d21, 0x0d22, 0x0d23, 0x0d24, 0x0d25, 0x0d26, 0x0d27, - 0x0d28, 0x0d29, 0x0d2a, 0x0d2b, 0x0d2c, 0x0d2d, 0x0d2e, 0x0d2f, - 0x0d30, 0x0d31, 0x0d32, 0x0d33, 0x0d34, 0x0d35, 0x0d36, 0x0d37, - 0x0d38, 0x0d39, 0x0d3a, 0x0d3b, 0x0d3c, 0x0d3d, 0x0d3e, 0x0d3f, - 0x0d40, 0x0d41, 0x0d42, 0x0d43, 0x0d44, 0x0d45, 0x0d46, 0x0d47, - 0x0d48, 0x0d49, 0x0d4a, 0x0d4b, 0x0d4c, 0x0d4d, 0x0d4e, 0x0d4f, - 0x0d50, 0x0d51, 0x0d52, 0x0d53, 0x0d54, 0x0d55, 0x0d56, 0x0d57, - 0x0d58, 0x0d59, 0x0d5a, 0x0d5b, 0x0d5c, 0x0d5d, 0x0d5e, 0x0d5f, - 0x0d60, 0x0d61, 0x0d62, 0x0d63, 0x0d64, 0x0d65, 0x0d66, 0x0d67, - 0x0d68, 0x0d69, 0x0d6a, 0x0d6b, 0x0d6c, 0x0d6d, 0x0d6e, 0x0d6f, - 0x0d70, 0x0d71, 0x0d72, 0x0d73, 0x0d74, 0x0d75, 0x0d76, 0x0d77, - 0x0d78, 0x0d79, 0x0d7a, 0x0d7b, 0x0d7c, 0x0d7d, 0x0d7e, 0x0d7f, - 0x0d80, 0x0d81, 0x0d82, 0x0d83, 0x0d84, 0x0d85, 0x0d86, 0x0d87, - 0x0d88, 0x0d89, 0x0d8a, 0x0d8b, 0x0d8c, 0x0d8d, 0x0d8e, 0x0d8f, - 0x0d90, 0x0d91, 0x0d92, 0x0d93, 0x0d94, 0x0d95, 0x0d96, 0x0d97, - 0x0d98, 0x0d99, 0x0d9a, 0x0d9b, 0x0d9c, 0x0d9d, 0x0d9e, 0x0d9f, - 0x0da0, 0x0da1, 0x0da2, 0x0da3, 0x0da4, 0x0da5, 0x0da6, 0x0da7, - 0x0da8, 0x0da9, 0x0daa, 0x0dab, 0x0dac, 0x0dad, 0x0dae, 0x0daf, - 0x0db0, 0x0db1, 0x0db2, 0x0db3, 0x0db4, 0x0db5, 0x0db6, 0x0db7, - 0x0db8, 0x0db9, 0x0dba, 0x0dbb, 0x0dbc, 0x0dbd, 0x0dbe, 0x0dbf, - 0x0dc0, 0x0dc1, 0x0dc2, 0x0dc3, 0x0dc4, 0x0dc5, 0x0dc6, 0x0dc7, - 0x0dc8, 0x0dc9, 0x0dca, 0x0dcb, 0x0dcc, 0x0dcd, 0x0dce, 0x0dcf, - 0x0dd0, 0x0dd1, 0x0dd2, 0x0dd3, 0x0dd4, 0x0dd5, 0x0dd6, 0x0dd7, - 0x0dd8, 0x0dd9, 0x0dda, 0x0ddb, 0x0ddc, 0x0ddd, 0x0dde, 0x0ddf, - 0x0de0, 0x0de1, 0x0de2, 0x0de3, 0x0de4, 0x0de5, 0x0de6, 0x0de7, - 0x0de8, 0x0de9, 0x0dea, 0x0deb, 0x0dec, 0x0ded, 0x0dee, 0x0def, - 0x0df0, 0x0df1, 0x0df2, 0x0df3, 0x0df4, 0x0df5, 0x0df6, 0x0df7, - 0x0df8, 0x0df9, 0x0dfa, 0x0dfb, 0x0dfc, 0x0dfd, 0x0dfe, 0x0dff, - 0x0e00, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, - 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, - 0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, - 0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, - 0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, - 0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, - 0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, - 0x0e38, 0x0e39, 0x0e3a, 0x0e3b, 0x0e3c, 0x0e3d, 0x0e3e, 0x0e3f, - 0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, - 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f, - 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, - 0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0x0e5c, 0x0e5d, 0x0e5e, 0x0e5f, - 0x0e60, 0x0e61, 0x0e62, 0x0e63, 0x0e64, 0x0e65, 0x0e66, 0x0e67, - 0x0e68, 0x0e69, 0x0e6a, 0x0e6b, 0x0e6c, 0x0e6d, 0x0e6e, 0x0e6f, - 0x0e70, 0x0e71, 0x0e72, 0x0e73, 0x0e74, 0x0e75, 0x0e76, 0x0e77, - 0x0e78, 0x0e79, 0x0e7a, 0x0e7b, 0x0e7c, 0x0e7d, 0x0e7e, 0x0e7f, - 0x0e80, 0x0e81, 0x0e82, 0x0e83, 0x0e84, 0x0e85, 0x0e86, 0x0e87, - 0x0e88, 0x0e89, 0x0e8a, 0x0e8b, 0x0e8c, 0x0e8d, 0x0e8e, 0x0e8f, - 0x0e90, 0x0e91, 0x0e92, 0x0e93, 0x0e94, 0x0e95, 0x0e96, 0x0e97, - 0x0e98, 0x0e99, 0x0e9a, 0x0e9b, 0x0e9c, 0x0e9d, 0x0e9e, 0x0e9f, - 0x0ea0, 0x0ea1, 0x0ea2, 0x0ea3, 0x0ea4, 0x0ea5, 0x0ea6, 0x0ea7, - 0x0ea8, 0x0ea9, 0x0eaa, 0x0eab, 0x0eac, 0x0ead, 0x0eae, 0x0eaf, - 0x0eb0, 0x0eb1, 0x0eb2, 0x0eb3, 0x0eb4, 0x0eb5, 0x0eb6, 0x0eb7, - 0x0eb8, 0x0eb9, 0x0eba, 0x0ebb, 0x0ebc, 0x0ebd, 0x0ebe, 0x0ebf, - 0x0ec0, 0x0ec1, 0x0ec2, 0x0ec3, 0x0ec4, 0x0ec5, 0x0ec6, 0x0ec7, - 0x0ec8, 0x0ec9, 0x0eca, 0x0ecb, 0x0ecc, 0x0ecd, 0x0ece, 0x0ecf, - 0x0ed0, 0x0ed1, 0x0ed2, 0x0ed3, 0x0ed4, 0x0ed5, 0x0ed6, 0x0ed7, - 0x0ed8, 0x0ed9, 0x0eda, 0x0edb, 0x0edc, 0x0edd, 0x0ede, 0x0edf, - 0x0ee0, 0x0ee1, 0x0ee2, 0x0ee3, 0x0ee4, 0x0ee5, 0x0ee6, 0x0ee7, - 0x0ee8, 0x0ee9, 0x0eea, 0x0eeb, 0x0eec, 0x0eed, 0x0eee, 0x0eef, - 0x0ef0, 0x0ef1, 0x0ef2, 0x0ef3, 0x0ef4, 0x0ef5, 0x0ef6, 0x0ef7, - 0x0ef8, 0x0ef9, 0x0efa, 0x0efb, 0x0efc, 0x0efd, 0x0efe, 0x0eff, - 0x0f00, 0x0f01, 0x0f02, 0x0f03, 0x0f04, 0x0f05, 0x0f06, 0x0f07, - 0x0f08, 0x0f09, 0x0f0a, 0x0f0b, 0x0f0c, 0x0f0d, 0x0f0e, 0x0f0f, - 0x0f10, 0x0f11, 0x0f12, 0x0f13, 0x0f14, 0x0f15, 0x0f16, 0x0f17, - 0x0f18, 0x0f19, 0x0f1a, 0x0f1b, 0x0f1c, 0x0f1d, 0x0f1e, 0x0f1f, - 0x0f20, 0x0f21, 0x0f22, 0x0f23, 0x0f24, 0x0f25, 0x0f26, 0x0f27, - 0x0f28, 0x0f29, 0x0f2a, 0x0f2b, 0x0f2c, 0x0f2d, 0x0f2e, 0x0f2f, - 0x0f30, 0x0f31, 0x0f32, 0x0f33, 0x0f34, 0x0f35, 0x0f36, 0x0f37, - 0x0f38, 0x0f39, 0x0f3a, 0x0f3b, 0x0f3c, 0x0f3d, 0x0f3e, 0x0f3f, - 0x0f40, 0x0f41, 0x0f42, 0x0f43, 0x0f44, 0x0f45, 0x0f46, 0x0f47, - 0x0f48, 0x0f49, 0x0f4a, 0x0f4b, 0x0f4c, 0x0f4d, 0x0f4e, 0x0f4f, - 0x0f50, 0x0f51, 0x0f52, 0x0f53, 0x0f54, 0x0f55, 0x0f56, 0x0f57, - 0x0f58, 0x0f59, 0x0f5a, 0x0f5b, 0x0f5c, 0x0f5d, 0x0f5e, 0x0f5f, - 0x0f60, 0x0f61, 0x0f62, 0x0f63, 0x0f64, 0x0f65, 0x0f66, 0x0f67, - 0x0f68, 0x0f69, 0x0f6a, 0x0f6b, 0x0f6c, 0x0f6d, 0x0f6e, 0x0f6f, - 0x0f70, 0x0f71, 0x0f72, 0x0f73, 0x0f74, 0x0f75, 0x0f76, 0x0f77, - 0x0f78, 0x0f79, 0x0f7a, 0x0f7b, 0x0f7c, 0x0f7d, 0x0f7e, 0x0f7f, - 0x0f80, 0x0f81, 0x0f82, 0x0f83, 0x0f84, 0x0f85, 0x0f86, 0x0f87, - 0x0f88, 0x0f89, 0x0f8a, 0x0f8b, 0x0f8c, 0x0f8d, 0x0f8e, 0x0f8f, - 0x0f90, 0x0f91, 0x0f92, 0x0f93, 0x0f94, 0x0f95, 0x0f96, 0x0f97, - 0x0f98, 0x0f99, 0x0f9a, 0x0f9b, 0x0f9c, 0x0f9d, 0x0f9e, 0x0f9f, - 0x0fa0, 0x0fa1, 0x0fa2, 0x0fa3, 0x0fa4, 0x0fa5, 0x0fa6, 0x0fa7, - 0x0fa8, 0x0fa9, 0x0faa, 0x0fab, 0x0fac, 0x0fad, 0x0fae, 0x0faf, - 0x0fb0, 0x0fb1, 0x0fb2, 0x0fb3, 0x0fb4, 0x0fb5, 0x0fb6, 0x0fb7, - 0x0fb8, 0x0fb9, 0x0fba, 0x0fbb, 0x0fbc, 0x0fbd, 0x0fbe, 0x0fbf, - 0x0fc0, 0x0fc1, 0x0fc2, 0x0fc3, 0x0fc4, 0x0fc5, 0x0fc6, 0x0fc7, - 0x0fc8, 0x0fc9, 0x0fca, 0x0fcb, 0x0fcc, 0x0fcd, 0x0fce, 0x0fcf, - 0x0fd0, 0x0fd1, 0x0fd2, 0x0fd3, 0x0fd4, 0x0fd5, 0x0fd6, 0x0fd7, - 0x0fd8, 0x0fd9, 0x0fda, 0x0fdb, 0x0fdc, 0x0fdd, 0x0fde, 0x0fdf, - 0x0fe0, 0x0fe1, 0x0fe2, 0x0fe3, 0x0fe4, 0x0fe5, 0x0fe6, 0x0fe7, - 0x0fe8, 0x0fe9, 0x0fea, 0x0feb, 0x0fec, 0x0fed, 0x0fee, 0x0fef, - 0x0ff0, 0x0ff1, 0x0ff2, 0x0ff3, 0x0ff4, 0x0ff5, 0x0ff6, 0x0ff7, - 0x0ff8, 0x0ff9, 0x0ffa, 0x0ffb, 0x0ffc, 0x0ffd, 0x0ffe, 0x0fff, - 0x1000, 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006, 0x1007, - 0x1008, 0x1009, 0x100a, 0x100b, 0x100c, 0x100d, 0x100e, 0x100f, - 0x1010, 0x1011, 0x1012, 0x1013, 0x1014, 0x1015, 0x1016, 0x1017, - 0x1018, 0x1019, 0x101a, 0x101b, 0x101c, 0x101d, 0x101e, 0x101f, - 0x1020, 0x1021, 0x1022, 0x1023, 0x1024, 0x1025, 0x1026, 0x1027, - 0x1028, 0x1029, 0x102a, 0x102b, 0x102c, 0x102d, 0x102e, 0x102f, - 0x1030, 0x1031, 0x1032, 0x1033, 0x1034, 0x1035, 0x1036, 0x1037, - 0x1038, 0x1039, 0x103a, 0x103b, 0x103c, 0x103d, 0x103e, 0x103f, - 0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047, - 0x1048, 0x1049, 0x104a, 0x104b, 0x104c, 0x104d, 0x104e, 0x104f, - 0x1050, 0x1051, 0x1052, 0x1053, 0x1054, 0x1055, 0x1056, 0x1057, - 0x1058, 0x1059, 0x105a, 0x105b, 0x105c, 0x105d, 0x105e, 0x105f, - 0x1060, 0x1061, 0x1062, 0x1063, 0x1064, 0x1065, 0x1066, 0x1067, - 0x1068, 0x1069, 0x106a, 0x106b, 0x106c, 0x106d, 0x106e, 0x106f, - 0x1070, 0x1071, 0x1072, 0x1073, 0x1074, 0x1075, 0x1076, 0x1077, - 0x1078, 0x1079, 0x107a, 0x107b, 0x107c, 0x107d, 0x107e, 0x107f, - 0x1080, 0x1081, 0x1082, 0x1083, 0x1084, 0x1085, 0x1086, 0x1087, - 0x1088, 0x1089, 0x108a, 0x108b, 0x108c, 0x108d, 0x108e, 0x108f, - 0x1090, 0x1091, 0x1092, 0x1093, 0x1094, 0x1095, 0x1096, 0x1097, - 0x1098, 0x1099, 0x109a, 0x109b, 0x109c, 0x109d, 0x109e, 0x109f, - 0x10a0, 0x10a1, 0x10a2, 0x10a3, 0x10a4, 0x10a5, 0x10a6, 0x10a7, - 0x10a8, 0x10a9, 0x10aa, 0x10ab, 0x10ac, 0x10ad, 0x10ae, 0x10af, - 0x10b0, 0x10b1, 0x10b2, 0x10b3, 0x10b4, 0x10b5, 0x10b6, 0x10b7, - 0x10b8, 0x10b9, 0x10ba, 0x10bb, 0x10bc, 0x10bd, 0x10be, 0x10bf, - 0x10c0, 0x10c1, 0x10c2, 0x10c3, 0x10c4, 0x10c5, 0x10c6, 0x10c7, - 0x10c8, 0x10c9, 0x10ca, 0x10cb, 0x10cc, 0x10cd, 0x10ce, 0x10cf, - 0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4, 0x10d5, 0x10d6, 0x10d7, - 0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc, 0x10dd, 0x10de, 0x10df, - 0x10e0, 0x10e1, 0x10e2, 0x10e3, 0x10e4, 0x10e5, 0x10e6, 0x10e7, - 0x10e8, 0x10e9, 0x10ea, 0x10eb, 0x10ec, 0x10ed, 0x10ee, 0x10ef, - 0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0x10f6, 0x10f7, - 0x10f8, 0x10f9, 0x10fa, 0x10fb, 0x10fc, 0x10fd, 0x10fe, 0x10ff, - 0x1100, 0x1101, 0x1102, 0x1103, 0x1104, 0x1105, 0x1106, 0x1107, - 0x1108, 0x1109, 0x110a, 0x110b, 0x110c, 0x110d, 0x110e, 0x110f, - 0x1110, 0x1111, 0x1112, 0x1113, 0x1114, 0x1115, 0x1116, 0x1117, - 0x1118, 0x1119, 0x111a, 0x111b, 0x111c, 0x111d, 0x111e, 0x111f, - 0x1120, 0x1121, 0x1122, 0x1123, 0x1124, 0x1125, 0x1126, 0x1127, - 0x1128, 0x1129, 0x112a, 0x112b, 0x112c, 0x112d, 0x112e, 0x112f, - 0x1130, 0x1131, 0x1132, 0x1133, 0x1134, 0x1135, 0x1136, 0x1137, - 0x1138, 0x1139, 0x113a, 0x113b, 0x113c, 0x113d, 0x113e, 0x113f, - 0x1140, 0x1141, 0x1142, 0x1143, 0x1144, 0x1145, 0x1146, 0x1147, - 0x1148, 0x1149, 0x114a, 0x114b, 0x114c, 0x114d, 0x114e, 0x114f, - 0x1150, 0x1151, 0x1152, 0x1153, 0x1154, 0x1155, 0x1156, 0x1157, - 0x1158, 0x1159, 0x115a, 0x115b, 0x115c, 0x115d, 0x115e, 0x115f, - 0x1160, 0x1161, 0x1162, 0x1163, 0x1164, 0x1165, 0x1166, 0x1167, - 0x1168, 0x1169, 0x116a, 0x116b, 0x116c, 0x116d, 0x116e, 0x116f, - 0x1170, 0x1171, 0x1172, 0x1173, 0x1174, 0x1175, 0x1176, 0x1177, - 0x1178, 0x1179, 0x117a, 0x117b, 0x117c, 0x117d, 0x117e, 0x117f, - 0x1180, 0x1181, 0x1182, 0x1183, 0x1184, 0x1185, 0x1186, 0x1187, - 0x1188, 0x1189, 0x118a, 0x118b, 0x118c, 0x118d, 0x118e, 0x118f, - 0x1190, 0x1191, 0x1192, 0x1193, 0x1194, 0x1195, 0x1196, 0x1197, - 0x1198, 0x1199, 0x119a, 0x119b, 0x119c, 0x119d, 0x119e, 0x119f, - 0x11a0, 0x11a1, 0x11a2, 0x11a3, 0x11a4, 0x11a5, 0x11a6, 0x11a7, - 0x11a8, 0x11a9, 0x11aa, 0x11ab, 0x11ac, 0x11ad, 0x11ae, 0x11af, - 0x11b0, 0x11b1, 0x11b2, 0x11b3, 0x11b4, 0x11b5, 0x11b6, 0x11b7, - 0x11b8, 0x11b9, 0x11ba, 0x11bb, 0x11bc, 0x11bd, 0x11be, 0x11bf, - 0x11c0, 0x11c1, 0x11c2, 0x11c3, 0x11c4, 0x11c5, 0x11c6, 0x11c7, - 0x11c8, 0x11c9, 0x11ca, 0x11cb, 0x11cc, 0x11cd, 0x11ce, 0x11cf, - 0x11d0, 0x11d1, 0x11d2, 0x11d3, 0x11d4, 0x11d5, 0x11d6, 0x11d7, - 0x11d8, 0x11d9, 0x11da, 0x11db, 0x11dc, 0x11dd, 0x11de, 0x11df, - 0x11e0, 0x11e1, 0x11e2, 0x11e3, 0x11e4, 0x11e5, 0x11e6, 0x11e7, - 0x11e8, 0x11e9, 0x11ea, 0x11eb, 0x11ec, 0x11ed, 0x11ee, 0x11ef, - 0x11f0, 0x11f1, 0x11f2, 0x11f3, 0x11f4, 0x11f5, 0x11f6, 0x11f7, - 0x11f8, 0x11f9, 0x11fa, 0x11fb, 0x11fc, 0x11fd, 0x11fe, 0x11ff, - 0x1200, 0x1201, 0x1202, 0x1203, 0x1204, 0x1205, 0x1206, 0x1207, - 0x1208, 0x1209, 0x120a, 0x120b, 0x120c, 0x120d, 0x120e, 0x120f, - 0x1210, 0x1211, 0x1212, 0x1213, 0x1214, 0x1215, 0x1216, 0x1217, - 0x1218, 0x1219, 0x121a, 0x121b, 0x121c, 0x121d, 0x121e, 0x121f, - 0x1220, 0x1221, 0x1222, 0x1223, 0x1224, 0x1225, 0x1226, 0x1227, - 0x1228, 0x1229, 0x122a, 0x122b, 0x122c, 0x122d, 0x122e, 0x122f, - 0x1230, 0x1231, 0x1232, 0x1233, 0x1234, 0x1235, 0x1236, 0x1237, - 0x1238, 0x1239, 0x123a, 0x123b, 0x123c, 0x123d, 0x123e, 0x123f, - 0x1240, 0x1241, 0x1242, 0x1243, 0x1244, 0x1245, 0x1246, 0x1247, - 0x1248, 0x1249, 0x124a, 0x124b, 0x124c, 0x124d, 0x124e, 0x124f, - 0x1250, 0x1251, 0x1252, 0x1253, 0x1254, 0x1255, 0x1256, 0x1257, - 0x1258, 0x1259, 0x125a, 0x125b, 0x125c, 0x125d, 0x125e, 0x125f, - 0x1260, 0x1261, 0x1262, 0x1263, 0x1264, 0x1265, 0x1266, 0x1267, - 0x1268, 0x1269, 0x126a, 0x126b, 0x126c, 0x126d, 0x126e, 0x126f, - 0x1270, 0x1271, 0x1272, 0x1273, 0x1274, 0x1275, 0x1276, 0x1277, - 0x1278, 0x1279, 0x127a, 0x127b, 0x127c, 0x127d, 0x127e, 0x127f, - 0x1280, 0x1281, 0x1282, 0x1283, 0x1284, 0x1285, 0x1286, 0x1287, - 0x1288, 0x1289, 0x128a, 0x128b, 0x128c, 0x128d, 0x128e, 0x128f, - 0x1290, 0x1291, 0x1292, 0x1293, 0x1294, 0x1295, 0x1296, 0x1297, - 0x1298, 0x1299, 0x129a, 0x129b, 0x129c, 0x129d, 0x129e, 0x129f, - 0x12a0, 0x12a1, 0x12a2, 0x12a3, 0x12a4, 0x12a5, 0x12a6, 0x12a7, - 0x12a8, 0x12a9, 0x12aa, 0x12ab, 0x12ac, 0x12ad, 0x12ae, 0x12af, - 0x12b0, 0x12b1, 0x12b2, 0x12b3, 0x12b4, 0x12b5, 0x12b6, 0x12b7, - 0x12b8, 0x12b9, 0x12ba, 0x12bb, 0x12bc, 0x12bd, 0x12be, 0x12bf, - 0x12c0, 0x12c1, 0x12c2, 0x12c3, 0x12c4, 0x12c5, 0x12c6, 0x12c7, - 0x12c8, 0x12c9, 0x12ca, 0x12cb, 0x12cc, 0x12cd, 0x12ce, 0x12cf, - 0x12d0, 0x12d1, 0x12d2, 0x12d3, 0x12d4, 0x12d5, 0x12d6, 0x12d7, - 0x12d8, 0x12d9, 0x12da, 0x12db, 0x12dc, 0x12dd, 0x12de, 0x12df, - 0x12e0, 0x12e1, 0x12e2, 0x12e3, 0x12e4, 0x12e5, 0x12e6, 0x12e7, - 0x12e8, 0x12e9, 0x12ea, 0x12eb, 0x12ec, 0x12ed, 0x12ee, 0x12ef, - 0x12f0, 0x12f1, 0x12f2, 0x12f3, 0x12f4, 0x12f5, 0x12f6, 0x12f7, - 0x12f8, 0x12f9, 0x12fa, 0x12fb, 0x12fc, 0x12fd, 0x12fe, 0x12ff, - 0x1300, 0x1301, 0x1302, 0x1303, 0x1304, 0x1305, 0x1306, 0x1307, - 0x1308, 0x1309, 0x130a, 0x130b, 0x130c, 0x130d, 0x130e, 0x130f, - 0x1310, 0x1311, 0x1312, 0x1313, 0x1314, 0x1315, 0x1316, 0x1317, - 0x1318, 0x1319, 0x131a, 0x131b, 0x131c, 0x131d, 0x131e, 0x131f, - 0x1320, 0x1321, 0x1322, 0x1323, 0x1324, 0x1325, 0x1326, 0x1327, - 0x1328, 0x1329, 0x132a, 0x132b, 0x132c, 0x132d, 0x132e, 0x132f, - 0x1330, 0x1331, 0x1332, 0x1333, 0x1334, 0x1335, 0x1336, 0x1337, - 0x1338, 0x1339, 0x133a, 0x133b, 0x133c, 0x133d, 0x133e, 0x133f, - 0x1340, 0x1341, 0x1342, 0x1343, 0x1344, 0x1345, 0x1346, 0x1347, - 0x1348, 0x1349, 0x134a, 0x134b, 0x134c, 0x134d, 0x134e, 0x134f, - 0x1350, 0x1351, 0x1352, 0x1353, 0x1354, 0x1355, 0x1356, 0x1357, - 0x1358, 0x1359, 0x135a, 0x135b, 0x135c, 0x135d, 0x135e, 0x135f, - 0x1360, 0x1361, 0x1362, 0x1363, 0x1364, 0x1365, 0x1366, 0x1367, - 0x1368, 0x1369, 0x136a, 0x136b, 0x136c, 0x136d, 0x136e, 0x136f, - 0x1370, 0x1371, 0x1372, 0x1373, 0x1374, 0x1375, 0x1376, 0x1377, - 0x1378, 0x1379, 0x137a, 0x137b, 0x137c, 0x137d, 0x137e, 0x137f, - 0x1380, 0x1381, 0x1382, 0x1383, 0x1384, 0x1385, 0x1386, 0x1387, - 0x1388, 0x1389, 0x138a, 0x138b, 0x138c, 0x138d, 0x138e, 0x138f, - 0x1390, 0x1391, 0x1392, 0x1393, 0x1394, 0x1395, 0x1396, 0x1397, - 0x1398, 0x1399, 0x139a, 0x139b, 0x139c, 0x139d, 0x139e, 0x139f, - 0x13a0, 0x13a1, 0x13a2, 0x13a3, 0x13a4, 0x13a5, 0x13a6, 0x13a7, - 0x13a8, 0x13a9, 0x13aa, 0x13ab, 0x13ac, 0x13ad, 0x13ae, 0x13af, - 0x13b0, 0x13b1, 0x13b2, 0x13b3, 0x13b4, 0x13b5, 0x13b6, 0x13b7, - 0x13b8, 0x13b9, 0x13ba, 0x13bb, 0x13bc, 0x13bd, 0x13be, 0x13bf, - 0x13c0, 0x13c1, 0x13c2, 0x13c3, 0x13c4, 0x13c5, 0x13c6, 0x13c7, - 0x13c8, 0x13c9, 0x13ca, 0x13cb, 0x13cc, 0x13cd, 0x13ce, 0x13cf, - 0x13d0, 0x13d1, 0x13d2, 0x13d3, 0x13d4, 0x13d5, 0x13d6, 0x13d7, - 0x13d8, 0x13d9, 0x13da, 0x13db, 0x13dc, 0x13dd, 0x13de, 0x13df, - 0x13e0, 0x13e1, 0x13e2, 0x13e3, 0x13e4, 0x13e5, 0x13e6, 0x13e7, - 0x13e8, 0x13e9, 0x13ea, 0x13eb, 0x13ec, 0x13ed, 0x13ee, 0x13ef, - 0x13f0, 0x13f1, 0x13f2, 0x13f3, 0x13f4, 0x13f5, 0x13f6, 0x13f7, - 0x13f8, 0x13f9, 0x13fa, 0x13fb, 0x13fc, 0x13fd, 0x13fe, 0x13ff, - 0x1400, 0x1401, 0x1402, 0x1403, 0x1404, 0x1405, 0x1406, 0x1407, - 0x1408, 0x1409, 0x140a, 0x140b, 0x140c, 0x140d, 0x140e, 0x140f, - 0x1410, 0x1411, 0x1412, 0x1413, 0x1414, 0x1415, 0x1416, 0x1417, - 0x1418, 0x1419, 0x141a, 0x141b, 0x141c, 0x141d, 0x141e, 0x141f, - 0x1420, 0x1421, 0x1422, 0x1423, 0x1424, 0x1425, 0x1426, 0x1427, - 0x1428, 0x1429, 0x142a, 0x142b, 0x142c, 0x142d, 0x142e, 0x142f, - 0x1430, 0x1431, 0x1432, 0x1433, 0x1434, 0x1435, 0x1436, 0x1437, - 0x1438, 0x1439, 0x143a, 0x143b, 0x143c, 0x143d, 0x143e, 0x143f, - 0x1440, 0x1441, 0x1442, 0x1443, 0x1444, 0x1445, 0x1446, 0x1447, - 0x1448, 0x1449, 0x144a, 0x144b, 0x144c, 0x144d, 0x144e, 0x144f, - 0x1450, 0x1451, 0x1452, 0x1453, 0x1454, 0x1455, 0x1456, 0x1457, - 0x1458, 0x1459, 0x145a, 0x145b, 0x145c, 0x145d, 0x145e, 0x145f, - 0x1460, 0x1461, 0x1462, 0x1463, 0x1464, 0x1465, 0x1466, 0x1467, - 0x1468, 0x1469, 0x146a, 0x146b, 0x146c, 0x146d, 0x146e, 0x146f, - 0x1470, 0x1471, 0x1472, 0x1473, 0x1474, 0x1475, 0x1476, 0x1477, - 0x1478, 0x1479, 0x147a, 0x147b, 0x147c, 0x147d, 0x147e, 0x147f, - 0x1480, 0x1481, 0x1482, 0x1483, 0x1484, 0x1485, 0x1486, 0x1487, - 0x1488, 0x1489, 0x148a, 0x148b, 0x148c, 0x148d, 0x148e, 0x148f, - 0x1490, 0x1491, 0x1492, 0x1493, 0x1494, 0x1495, 0x1496, 0x1497, - 0x1498, 0x1499, 0x149a, 0x149b, 0x149c, 0x149d, 0x149e, 0x149f, - 0x14a0, 0x14a1, 0x14a2, 0x14a3, 0x14a4, 0x14a5, 0x14a6, 0x14a7, - 0x14a8, 0x14a9, 0x14aa, 0x14ab, 0x14ac, 0x14ad, 0x14ae, 0x14af, - 0x14b0, 0x14b1, 0x14b2, 0x14b3, 0x14b4, 0x14b5, 0x14b6, 0x14b7, - 0x14b8, 0x14b9, 0x14ba, 0x14bb, 0x14bc, 0x14bd, 0x14be, 0x14bf, - 0x14c0, 0x14c1, 0x14c2, 0x14c3, 0x14c4, 0x14c5, 0x14c6, 0x14c7, - 0x14c8, 0x14c9, 0x14ca, 0x14cb, 0x14cc, 0x14cd, 0x14ce, 0x14cf, - 0x14d0, 0x14d1, 0x14d2, 0x14d3, 0x14d4, 0x14d5, 0x14d6, 0x14d7, - 0x14d8, 0x14d9, 0x14da, 0x14db, 0x14dc, 0x14dd, 0x14de, 0x14df, - 0x14e0, 0x14e1, 0x14e2, 0x14e3, 0x14e4, 0x14e5, 0x14e6, 0x14e7, - 0x14e8, 0x14e9, 0x14ea, 0x14eb, 0x14ec, 0x14ed, 0x14ee, 0x14ef, - 0x14f0, 0x14f1, 0x14f2, 0x14f3, 0x14f4, 0x14f5, 0x14f6, 0x14f7, - 0x14f8, 0x14f9, 0x14fa, 0x14fb, 0x14fc, 0x14fd, 0x14fe, 0x14ff, - 0x1500, 0x1501, 0x1502, 0x1503, 0x1504, 0x1505, 0x1506, 0x1507, - 0x1508, 0x1509, 0x150a, 0x150b, 0x150c, 0x150d, 0x150e, 0x150f, - 0x1510, 0x1511, 0x1512, 0x1513, 0x1514, 0x1515, 0x1516, 0x1517, - 0x1518, 0x1519, 0x151a, 0x151b, 0x151c, 0x151d, 0x151e, 0x151f, - 0x1520, 0x1521, 0x1522, 0x1523, 0x1524, 0x1525, 0x1526, 0x1527, - 0x1528, 0x1529, 0x152a, 0x152b, 0x152c, 0x152d, 0x152e, 0x152f, - 0x1530, 0x1531, 0x1532, 0x1533, 0x1534, 0x1535, 0x1536, 0x1537, - 0x1538, 0x1539, 0x153a, 0x153b, 0x153c, 0x153d, 0x153e, 0x153f, - 0x1540, 0x1541, 0x1542, 0x1543, 0x1544, 0x1545, 0x1546, 0x1547, - 0x1548, 0x1549, 0x154a, 0x154b, 0x154c, 0x154d, 0x154e, 0x154f, - 0x1550, 0x1551, 0x1552, 0x1553, 0x1554, 0x1555, 0x1556, 0x1557, - 0x1558, 0x1559, 0x155a, 0x155b, 0x155c, 0x155d, 0x155e, 0x155f, - 0x1560, 0x1561, 0x1562, 0x1563, 0x1564, 0x1565, 0x1566, 0x1567, - 0x1568, 0x1569, 0x156a, 0x156b, 0x156c, 0x156d, 0x156e, 0x156f, - 0x1570, 0x1571, 0x1572, 0x1573, 0x1574, 0x1575, 0x1576, 0x1577, - 0x1578, 0x1579, 0x157a, 0x157b, 0x157c, 0x157d, 0x157e, 0x157f, - 0x1580, 0x1581, 0x1582, 0x1583, 0x1584, 0x1585, 0x1586, 0x1587, - 0x1588, 0x1589, 0x158a, 0x158b, 0x158c, 0x158d, 0x158e, 0x158f, - 0x1590, 0x1591, 0x1592, 0x1593, 0x1594, 0x1595, 0x1596, 0x1597, - 0x1598, 0x1599, 0x159a, 0x159b, 0x159c, 0x159d, 0x159e, 0x159f, - 0x15a0, 0x15a1, 0x15a2, 0x15a3, 0x15a4, 0x15a5, 0x15a6, 0x15a7, - 0x15a8, 0x15a9, 0x15aa, 0x15ab, 0x15ac, 0x15ad, 0x15ae, 0x15af, - 0x15b0, 0x15b1, 0x15b2, 0x15b3, 0x15b4, 0x15b5, 0x15b6, 0x15b7, - 0x15b8, 0x15b9, 0x15ba, 0x15bb, 0x15bc, 0x15bd, 0x15be, 0x15bf, - 0x15c0, 0x15c1, 0x15c2, 0x15c3, 0x15c4, 0x15c5, 0x15c6, 0x15c7, - 0x15c8, 0x15c9, 0x15ca, 0x15cb, 0x15cc, 0x15cd, 0x15ce, 0x15cf, - 0x15d0, 0x15d1, 0x15d2, 0x15d3, 0x15d4, 0x15d5, 0x15d6, 0x15d7, - 0x15d8, 0x15d9, 0x15da, 0x15db, 0x15dc, 0x15dd, 0x15de, 0x15df, - 0x15e0, 0x15e1, 0x15e2, 0x15e3, 0x15e4, 0x15e5, 0x15e6, 0x15e7, - 0x15e8, 0x15e9, 0x15ea, 0x15eb, 0x15ec, 0x15ed, 0x15ee, 0x15ef, - 0x15f0, 0x15f1, 0x15f2, 0x15f3, 0x15f4, 0x15f5, 0x15f6, 0x15f7, - 0x15f8, 0x15f9, 0x15fa, 0x15fb, 0x15fc, 0x15fd, 0x15fe, 0x15ff, - 0x1600, 0x1601, 0x1602, 0x1603, 0x1604, 0x1605, 0x1606, 0x1607, - 0x1608, 0x1609, 0x160a, 0x160b, 0x160c, 0x160d, 0x160e, 0x160f, - 0x1610, 0x1611, 0x1612, 0x1613, 0x1614, 0x1615, 0x1616, 0x1617, - 0x1618, 0x1619, 0x161a, 0x161b, 0x161c, 0x161d, 0x161e, 0x161f, - 0x1620, 0x1621, 0x1622, 0x1623, 0x1624, 0x1625, 0x1626, 0x1627, - 0x1628, 0x1629, 0x162a, 0x162b, 0x162c, 0x162d, 0x162e, 0x162f, - 0x1630, 0x1631, 0x1632, 0x1633, 0x1634, 0x1635, 0x1636, 0x1637, - 0x1638, 0x1639, 0x163a, 0x163b, 0x163c, 0x163d, 0x163e, 0x163f, - 0x1640, 0x1641, 0x1642, 0x1643, 0x1644, 0x1645, 0x1646, 0x1647, - 0x1648, 0x1649, 0x164a, 0x164b, 0x164c, 0x164d, 0x164e, 0x164f, - 0x1650, 0x1651, 0x1652, 0x1653, 0x1654, 0x1655, 0x1656, 0x1657, - 0x1658, 0x1659, 0x165a, 0x165b, 0x165c, 0x165d, 0x165e, 0x165f, - 0x1660, 0x1661, 0x1662, 0x1663, 0x1664, 0x1665, 0x1666, 0x1667, - 0x1668, 0x1669, 0x166a, 0x166b, 0x166c, 0x166d, 0x166e, 0x166f, - 0x1670, 0x1671, 0x1672, 0x1673, 0x1674, 0x1675, 0x1676, 0x1677, - 0x1678, 0x1679, 0x167a, 0x167b, 0x167c, 0x167d, 0x167e, 0x167f, - 0x1680, 0x1681, 0x1682, 0x1683, 0x1684, 0x1685, 0x1686, 0x1687, - 0x1688, 0x1689, 0x168a, 0x168b, 0x168c, 0x168d, 0x168e, 0x168f, - 0x1690, 0x1691, 0x1692, 0x1693, 0x1694, 0x1695, 0x1696, 0x1697, - 0x1698, 0x1699, 0x169a, 0x169b, 0x169c, 0x169d, 0x169e, 0x169f, - 0x16a0, 0x16a1, 0x16a2, 0x16a3, 0x16a4, 0x16a5, 0x16a6, 0x16a7, - 0x16a8, 0x16a9, 0x16aa, 0x16ab, 0x16ac, 0x16ad, 0x16ae, 0x16af, - 0x16b0, 0x16b1, 0x16b2, 0x16b3, 0x16b4, 0x16b5, 0x16b6, 0x16b7, - 0x16b8, 0x16b9, 0x16ba, 0x16bb, 0x16bc, 0x16bd, 0x16be, 0x16bf, - 0x16c0, 0x16c1, 0x16c2, 0x16c3, 0x16c4, 0x16c5, 0x16c6, 0x16c7, - 0x16c8, 0x16c9, 0x16ca, 0x16cb, 0x16cc, 0x16cd, 0x16ce, 0x16cf, - 0x16d0, 0x16d1, 0x16d2, 0x16d3, 0x16d4, 0x16d5, 0x16d6, 0x16d7, - 0x16d8, 0x16d9, 0x16da, 0x16db, 0x16dc, 0x16dd, 0x16de, 0x16df, - 0x16e0, 0x16e1, 0x16e2, 0x16e3, 0x16e4, 0x16e5, 0x16e6, 0x16e7, - 0x16e8, 0x16e9, 0x16ea, 0x16eb, 0x16ec, 0x16ed, 0x16ee, 0x16ef, - 0x16f0, 0x16f1, 0x16f2, 0x16f3, 0x16f4, 0x16f5, 0x16f6, 0x16f7, - 0x16f8, 0x16f9, 0x16fa, 0x16fb, 0x16fc, 0x16fd, 0x16fe, 0x16ff, - 0x1700, 0x1701, 0x1702, 0x1703, 0x1704, 0x1705, 0x1706, 0x1707, - 0x1708, 0x1709, 0x170a, 0x170b, 0x170c, 0x170d, 0x170e, 0x170f, - 0x1710, 0x1711, 0x1712, 0x1713, 0x1714, 0x1715, 0x1716, 0x1717, - 0x1718, 0x1719, 0x171a, 0x171b, 0x171c, 0x171d, 0x171e, 0x171f, - 0x1720, 0x1721, 0x1722, 0x1723, 0x1724, 0x1725, 0x1726, 0x1727, - 0x1728, 0x1729, 0x172a, 0x172b, 0x172c, 0x172d, 0x172e, 0x172f, - 0x1730, 0x1731, 0x1732, 0x1733, 0x1734, 0x1735, 0x1736, 0x1737, - 0x1738, 0x1739, 0x173a, 0x173b, 0x173c, 0x173d, 0x173e, 0x173f, - 0x1740, 0x1741, 0x1742, 0x1743, 0x1744, 0x1745, 0x1746, 0x1747, - 0x1748, 0x1749, 0x174a, 0x174b, 0x174c, 0x174d, 0x174e, 0x174f, - 0x1750, 0x1751, 0x1752, 0x1753, 0x1754, 0x1755, 0x1756, 0x1757, - 0x1758, 0x1759, 0x175a, 0x175b, 0x175c, 0x175d, 0x175e, 0x175f, - 0x1760, 0x1761, 0x1762, 0x1763, 0x1764, 0x1765, 0x1766, 0x1767, - 0x1768, 0x1769, 0x176a, 0x176b, 0x176c, 0x176d, 0x176e, 0x176f, - 0x1770, 0x1771, 0x1772, 0x1773, 0x1774, 0x1775, 0x1776, 0x1777, - 0x1778, 0x1779, 0x177a, 0x177b, 0x177c, 0x177d, 0x177e, 0x177f, - 0x1780, 0x1781, 0x1782, 0x1783, 0x1784, 0x1785, 0x1786, 0x1787, - 0x1788, 0x1789, 0x178a, 0x178b, 0x178c, 0x178d, 0x178e, 0x178f, - 0x1790, 0x1791, 0x1792, 0x1793, 0x1794, 0x1795, 0x1796, 0x1797, - 0x1798, 0x1799, 0x179a, 0x179b, 0x179c, 0x179d, 0x179e, 0x179f, - 0x17a0, 0x17a1, 0x17a2, 0x17a3, 0x17a4, 0x17a5, 0x17a6, 0x17a7, - 0x17a8, 0x17a9, 0x17aa, 0x17ab, 0x17ac, 0x17ad, 0x17ae, 0x17af, - 0x17b0, 0x17b1, 0x17b2, 0x17b3, 0x17b4, 0x17b5, 0x17b6, 0x17b7, - 0x17b8, 0x17b9, 0x17ba, 0x17bb, 0x17bc, 0x17bd, 0x17be, 0x17bf, - 0x17c0, 0x17c1, 0x17c2, 0x17c3, 0x17c4, 0x17c5, 0x17c6, 0x17c7, - 0x17c8, 0x17c9, 0x17ca, 0x17cb, 0x17cc, 0x17cd, 0x17ce, 0x17cf, - 0x17d0, 0x17d1, 0x17d2, 0x17d3, 0x17d4, 0x17d5, 0x17d6, 0x17d7, - 0x17d8, 0x17d9, 0x17da, 0x17db, 0x17dc, 0x17dd, 0x17de, 0x17df, - 0x17e0, 0x17e1, 0x17e2, 0x17e3, 0x17e4, 0x17e5, 0x17e6, 0x17e7, - 0x17e8, 0x17e9, 0x17ea, 0x17eb, 0x17ec, 0x17ed, 0x17ee, 0x17ef, - 0x17f0, 0x17f1, 0x17f2, 0x17f3, 0x17f4, 0x17f5, 0x17f6, 0x17f7, - 0x17f8, 0x17f9, 0x17fa, 0x17fb, 0x17fc, 0x17fd, 0x17fe, 0x17ff, - 0x1800, 0x1801, 0x1802, 0x1803, 0x1804, 0x1805, 0x1806, 0x1807, - 0x1808, 0x1809, 0x180a, 0x180b, 0x180c, 0x180d, 0x180e, 0x180f, - 0x1810, 0x1811, 0x1812, 0x1813, 0x1814, 0x1815, 0x1816, 0x1817, - 0x1818, 0x1819, 0x181a, 0x181b, 0x181c, 0x181d, 0x181e, 0x181f, - 0x1820, 0x1821, 0x1822, 0x1823, 0x1824, 0x1825, 0x1826, 0x1827, - 0x1828, 0x1829, 0x182a, 0x182b, 0x182c, 0x182d, 0x182e, 0x182f, - 0x1830, 0x1831, 0x1832, 0x1833, 0x1834, 0x1835, 0x1836, 0x1837, - 0x1838, 0x1839, 0x183a, 0x183b, 0x183c, 0x183d, 0x183e, 0x183f, - 0x1840, 0x1841, 0x1842, 0x1843, 0x1844, 0x1845, 0x1846, 0x1847, - 0x1848, 0x1849, 0x184a, 0x184b, 0x184c, 0x184d, 0x184e, 0x184f, - 0x1850, 0x1851, 0x1852, 0x1853, 0x1854, 0x1855, 0x1856, 0x1857, - 0x1858, 0x1859, 0x185a, 0x185b, 0x185c, 0x185d, 0x185e, 0x185f, - 0x1860, 0x1861, 0x1862, 0x1863, 0x1864, 0x1865, 0x1866, 0x1867, - 0x1868, 0x1869, 0x186a, 0x186b, 0x186c, 0x186d, 0x186e, 0x186f, - 0x1870, 0x1871, 0x1872, 0x1873, 0x1874, 0x1875, 0x1876, 0x1877, - 0x1878, 0x1879, 0x187a, 0x187b, 0x187c, 0x187d, 0x187e, 0x187f, - 0x1880, 0x1881, 0x1882, 0x1883, 0x1884, 0x1885, 0x1886, 0x1887, - 0x1888, 0x1889, 0x188a, 0x188b, 0x188c, 0x188d, 0x188e, 0x188f, - 0x1890, 0x1891, 0x1892, 0x1893, 0x1894, 0x1895, 0x1896, 0x1897, - 0x1898, 0x1899, 0x189a, 0x189b, 0x189c, 0x189d, 0x189e, 0x189f, - 0x18a0, 0x18a1, 0x18a2, 0x18a3, 0x18a4, 0x18a5, 0x18a6, 0x18a7, - 0x18a8, 0x18a9, 0x18aa, 0x18ab, 0x18ac, 0x18ad, 0x18ae, 0x18af, - 0x18b0, 0x18b1, 0x18b2, 0x18b3, 0x18b4, 0x18b5, 0x18b6, 0x18b7, - 0x18b8, 0x18b9, 0x18ba, 0x18bb, 0x18bc, 0x18bd, 0x18be, 0x18bf, - 0x18c0, 0x18c1, 0x18c2, 0x18c3, 0x18c4, 0x18c5, 0x18c6, 0x18c7, - 0x18c8, 0x18c9, 0x18ca, 0x18cb, 0x18cc, 0x18cd, 0x18ce, 0x18cf, - 0x18d0, 0x18d1, 0x18d2, 0x18d3, 0x18d4, 0x18d5, 0x18d6, 0x18d7, - 0x18d8, 0x18d9, 0x18da, 0x18db, 0x18dc, 0x18dd, 0x18de, 0x18df, - 0x18e0, 0x18e1, 0x18e2, 0x18e3, 0x18e4, 0x18e5, 0x18e6, 0x18e7, - 0x18e8, 0x18e9, 0x18ea, 0x18eb, 0x18ec, 0x18ed, 0x18ee, 0x18ef, - 0x18f0, 0x18f1, 0x18f2, 0x18f3, 0x18f4, 0x18f5, 0x18f6, 0x18f7, - 0x18f8, 0x18f9, 0x18fa, 0x18fb, 0x18fc, 0x18fd, 0x18fe, 0x18ff, - 0x1900, 0x1901, 0x1902, 0x1903, 0x1904, 0x1905, 0x1906, 0x1907, - 0x1908, 0x1909, 0x190a, 0x190b, 0x190c, 0x190d, 0x190e, 0x190f, - 0x1910, 0x1911, 0x1912, 0x1913, 0x1914, 0x1915, 0x1916, 0x1917, - 0x1918, 0x1919, 0x191a, 0x191b, 0x191c, 0x191d, 0x191e, 0x191f, - 0x1920, 0x1921, 0x1922, 0x1923, 0x1924, 0x1925, 0x1926, 0x1927, - 0x1928, 0x1929, 0x192a, 0x192b, 0x192c, 0x192d, 0x192e, 0x192f, - 0x1930, 0x1931, 0x1932, 0x1933, 0x1934, 0x1935, 0x1936, 0x1937, - 0x1938, 0x1939, 0x193a, 0x193b, 0x193c, 0x193d, 0x193e, 0x193f, - 0x1940, 0x1941, 0x1942, 0x1943, 0x1944, 0x1945, 0x1946, 0x1947, - 0x1948, 0x1949, 0x194a, 0x194b, 0x194c, 0x194d, 0x194e, 0x194f, - 0x1950, 0x1951, 0x1952, 0x1953, 0x1954, 0x1955, 0x1956, 0x1957, - 0x1958, 0x1959, 0x195a, 0x195b, 0x195c, 0x195d, 0x195e, 0x195f, - 0x1960, 0x1961, 0x1962, 0x1963, 0x1964, 0x1965, 0x1966, 0x1967, - 0x1968, 0x1969, 0x196a, 0x196b, 0x196c, 0x196d, 0x196e, 0x196f, - 0x1970, 0x1971, 0x1972, 0x1973, 0x1974, 0x1975, 0x1976, 0x1977, - 0x1978, 0x1979, 0x197a, 0x197b, 0x197c, 0x197d, 0x197e, 0x197f, - 0x1980, 0x1981, 0x1982, 0x1983, 0x1984, 0x1985, 0x1986, 0x1987, - 0x1988, 0x1989, 0x198a, 0x198b, 0x198c, 0x198d, 0x198e, 0x198f, - 0x1990, 0x1991, 0x1992, 0x1993, 0x1994, 0x1995, 0x1996, 0x1997, - 0x1998, 0x1999, 0x199a, 0x199b, 0x199c, 0x199d, 0x199e, 0x199f, - 0x19a0, 0x19a1, 0x19a2, 0x19a3, 0x19a4, 0x19a5, 0x19a6, 0x19a7, - 0x19a8, 0x19a9, 0x19aa, 0x19ab, 0x19ac, 0x19ad, 0x19ae, 0x19af, - 0x19b0, 0x19b1, 0x19b2, 0x19b3, 0x19b4, 0x19b5, 0x19b6, 0x19b7, - 0x19b8, 0x19b9, 0x19ba, 0x19bb, 0x19bc, 0x19bd, 0x19be, 0x19bf, - 0x19c0, 0x19c1, 0x19c2, 0x19c3, 0x19c4, 0x19c5, 0x19c6, 0x19c7, - 0x19c8, 0x19c9, 0x19ca, 0x19cb, 0x19cc, 0x19cd, 0x19ce, 0x19cf, - 0x19d0, 0x19d1, 0x19d2, 0x19d3, 0x19d4, 0x19d5, 0x19d6, 0x19d7, - 0x19d8, 0x19d9, 0x19da, 0x19db, 0x19dc, 0x19dd, 0x19de, 0x19df, - 0x19e0, 0x19e1, 0x19e2, 0x19e3, 0x19e4, 0x19e5, 0x19e6, 0x19e7, - 0x19e8, 0x19e9, 0x19ea, 0x19eb, 0x19ec, 0x19ed, 0x19ee, 0x19ef, - 0x19f0, 0x19f1, 0x19f2, 0x19f3, 0x19f4, 0x19f5, 0x19f6, 0x19f7, - 0x19f8, 0x19f9, 0x19fa, 0x19fb, 0x19fc, 0x19fd, 0x19fe, 0x19ff, - 0x1a00, 0x1a01, 0x1a02, 0x1a03, 0x1a04, 0x1a05, 0x1a06, 0x1a07, - 0x1a08, 0x1a09, 0x1a0a, 0x1a0b, 0x1a0c, 0x1a0d, 0x1a0e, 0x1a0f, - 0x1a10, 0x1a11, 0x1a12, 0x1a13, 0x1a14, 0x1a15, 0x1a16, 0x1a17, - 0x1a18, 0x1a19, 0x1a1a, 0x1a1b, 0x1a1c, 0x1a1d, 0x1a1e, 0x1a1f, - 0x1a20, 0x1a21, 0x1a22, 0x1a23, 0x1a24, 0x1a25, 0x1a26, 0x1a27, - 0x1a28, 0x1a29, 0x1a2a, 0x1a2b, 0x1a2c, 0x1a2d, 0x1a2e, 0x1a2f, - 0x1a30, 0x1a31, 0x1a32, 0x1a33, 0x1a34, 0x1a35, 0x1a36, 0x1a37, - 0x1a38, 0x1a39, 0x1a3a, 0x1a3b, 0x1a3c, 0x1a3d, 0x1a3e, 0x1a3f, - 0x1a40, 0x1a41, 0x1a42, 0x1a43, 0x1a44, 0x1a45, 0x1a46, 0x1a47, - 0x1a48, 0x1a49, 0x1a4a, 0x1a4b, 0x1a4c, 0x1a4d, 0x1a4e, 0x1a4f, - 0x1a50, 0x1a51, 0x1a52, 0x1a53, 0x1a54, 0x1a55, 0x1a56, 0x1a57, - 0x1a58, 0x1a59, 0x1a5a, 0x1a5b, 0x1a5c, 0x1a5d, 0x1a5e, 0x1a5f, - 0x1a60, 0x1a61, 0x1a62, 0x1a63, 0x1a64, 0x1a65, 0x1a66, 0x1a67, - 0x1a68, 0x1a69, 0x1a6a, 0x1a6b, 0x1a6c, 0x1a6d, 0x1a6e, 0x1a6f, - 0x1a70, 0x1a71, 0x1a72, 0x1a73, 0x1a74, 0x1a75, 0x1a76, 0x1a77, - 0x1a78, 0x1a79, 0x1a7a, 0x1a7b, 0x1a7c, 0x1a7d, 0x1a7e, 0x1a7f, - 0x1a80, 0x1a81, 0x1a82, 0x1a83, 0x1a84, 0x1a85, 0x1a86, 0x1a87, - 0x1a88, 0x1a89, 0x1a8a, 0x1a8b, 0x1a8c, 0x1a8d, 0x1a8e, 0x1a8f, - 0x1a90, 0x1a91, 0x1a92, 0x1a93, 0x1a94, 0x1a95, 0x1a96, 0x1a97, - 0x1a98, 0x1a99, 0x1a9a, 0x1a9b, 0x1a9c, 0x1a9d, 0x1a9e, 0x1a9f, - 0x1aa0, 0x1aa1, 0x1aa2, 0x1aa3, 0x1aa4, 0x1aa5, 0x1aa6, 0x1aa7, - 0x1aa8, 0x1aa9, 0x1aaa, 0x1aab, 0x1aac, 0x1aad, 0x1aae, 0x1aaf, - 0x1ab0, 0x1ab1, 0x1ab2, 0x1ab3, 0x1ab4, 0x1ab5, 0x1ab6, 0x1ab7, - 0x1ab8, 0x1ab9, 0x1aba, 0x1abb, 0x1abc, 0x1abd, 0x1abe, 0x1abf, - 0x1ac0, 0x1ac1, 0x1ac2, 0x1ac3, 0x1ac4, 0x1ac5, 0x1ac6, 0x1ac7, - 0x1ac8, 0x1ac9, 0x1aca, 0x1acb, 0x1acc, 0x1acd, 0x1ace, 0x1acf, - 0x1ad0, 0x1ad1, 0x1ad2, 0x1ad3, 0x1ad4, 0x1ad5, 0x1ad6, 0x1ad7, - 0x1ad8, 0x1ad9, 0x1ada, 0x1adb, 0x1adc, 0x1add, 0x1ade, 0x1adf, - 0x1ae0, 0x1ae1, 0x1ae2, 0x1ae3, 0x1ae4, 0x1ae5, 0x1ae6, 0x1ae7, - 0x1ae8, 0x1ae9, 0x1aea, 0x1aeb, 0x1aec, 0x1aed, 0x1aee, 0x1aef, - 0x1af0, 0x1af1, 0x1af2, 0x1af3, 0x1af4, 0x1af5, 0x1af6, 0x1af7, - 0x1af8, 0x1af9, 0x1afa, 0x1afb, 0x1afc, 0x1afd, 0x1afe, 0x1aff, - 0x1b00, 0x1b01, 0x1b02, 0x1b03, 0x1b04, 0x1b05, 0x1b06, 0x1b07, - 0x1b08, 0x1b09, 0x1b0a, 0x1b0b, 0x1b0c, 0x1b0d, 0x1b0e, 0x1b0f, - 0x1b10, 0x1b11, 0x1b12, 0x1b13, 0x1b14, 0x1b15, 0x1b16, 0x1b17, - 0x1b18, 0x1b19, 0x1b1a, 0x1b1b, 0x1b1c, 0x1b1d, 0x1b1e, 0x1b1f, - 0x1b20, 0x1b21, 0x1b22, 0x1b23, 0x1b24, 0x1b25, 0x1b26, 0x1b27, - 0x1b28, 0x1b29, 0x1b2a, 0x1b2b, 0x1b2c, 0x1b2d, 0x1b2e, 0x1b2f, - 0x1b30, 0x1b31, 0x1b32, 0x1b33, 0x1b34, 0x1b35, 0x1b36, 0x1b37, - 0x1b38, 0x1b39, 0x1b3a, 0x1b3b, 0x1b3c, 0x1b3d, 0x1b3e, 0x1b3f, - 0x1b40, 0x1b41, 0x1b42, 0x1b43, 0x1b44, 0x1b45, 0x1b46, 0x1b47, - 0x1b48, 0x1b49, 0x1b4a, 0x1b4b, 0x1b4c, 0x1b4d, 0x1b4e, 0x1b4f, - 0x1b50, 0x1b51, 0x1b52, 0x1b53, 0x1b54, 0x1b55, 0x1b56, 0x1b57, - 0x1b58, 0x1b59, 0x1b5a, 0x1b5b, 0x1b5c, 0x1b5d, 0x1b5e, 0x1b5f, - 0x1b60, 0x1b61, 0x1b62, 0x1b63, 0x1b64, 0x1b65, 0x1b66, 0x1b67, - 0x1b68, 0x1b69, 0x1b6a, 0x1b6b, 0x1b6c, 0x1b6d, 0x1b6e, 0x1b6f, - 0x1b70, 0x1b71, 0x1b72, 0x1b73, 0x1b74, 0x1b75, 0x1b76, 0x1b77, - 0x1b78, 0x1b79, 0x1b7a, 0x1b7b, 0x1b7c, 0x1b7d, 0x1b7e, 0x1b7f, - 0x1b80, 0x1b81, 0x1b82, 0x1b83, 0x1b84, 0x1b85, 0x1b86, 0x1b87, - 0x1b88, 0x1b89, 0x1b8a, 0x1b8b, 0x1b8c, 0x1b8d, 0x1b8e, 0x1b8f, - 0x1b90, 0x1b91, 0x1b92, 0x1b93, 0x1b94, 0x1b95, 0x1b96, 0x1b97, - 0x1b98, 0x1b99, 0x1b9a, 0x1b9b, 0x1b9c, 0x1b9d, 0x1b9e, 0x1b9f, - 0x1ba0, 0x1ba1, 0x1ba2, 0x1ba3, 0x1ba4, 0x1ba5, 0x1ba6, 0x1ba7, - 0x1ba8, 0x1ba9, 0x1baa, 0x1bab, 0x1bac, 0x1bad, 0x1bae, 0x1baf, - 0x1bb0, 0x1bb1, 0x1bb2, 0x1bb3, 0x1bb4, 0x1bb5, 0x1bb6, 0x1bb7, - 0x1bb8, 0x1bb9, 0x1bba, 0x1bbb, 0x1bbc, 0x1bbd, 0x1bbe, 0x1bbf, - 0x1bc0, 0x1bc1, 0x1bc2, 0x1bc3, 0x1bc4, 0x1bc5, 0x1bc6, 0x1bc7, - 0x1bc8, 0x1bc9, 0x1bca, 0x1bcb, 0x1bcc, 0x1bcd, 0x1bce, 0x1bcf, - 0x1bd0, 0x1bd1, 0x1bd2, 0x1bd3, 0x1bd4, 0x1bd5, 0x1bd6, 0x1bd7, - 0x1bd8, 0x1bd9, 0x1bda, 0x1bdb, 0x1bdc, 0x1bdd, 0x1bde, 0x1bdf, - 0x1be0, 0x1be1, 0x1be2, 0x1be3, 0x1be4, 0x1be5, 0x1be6, 0x1be7, - 0x1be8, 0x1be9, 0x1bea, 0x1beb, 0x1bec, 0x1bed, 0x1bee, 0x1bef, - 0x1bf0, 0x1bf1, 0x1bf2, 0x1bf3, 0x1bf4, 0x1bf5, 0x1bf6, 0x1bf7, - 0x1bf8, 0x1bf9, 0x1bfa, 0x1bfb, 0x1bfc, 0x1bfd, 0x1bfe, 0x1bff, - 0x1c00, 0x1c01, 0x1c02, 0x1c03, 0x1c04, 0x1c05, 0x1c06, 0x1c07, - 0x1c08, 0x1c09, 0x1c0a, 0x1c0b, 0x1c0c, 0x1c0d, 0x1c0e, 0x1c0f, - 0x1c10, 0x1c11, 0x1c12, 0x1c13, 0x1c14, 0x1c15, 0x1c16, 0x1c17, - 0x1c18, 0x1c19, 0x1c1a, 0x1c1b, 0x1c1c, 0x1c1d, 0x1c1e, 0x1c1f, - 0x1c20, 0x1c21, 0x1c22, 0x1c23, 0x1c24, 0x1c25, 0x1c26, 0x1c27, - 0x1c28, 0x1c29, 0x1c2a, 0x1c2b, 0x1c2c, 0x1c2d, 0x1c2e, 0x1c2f, - 0x1c30, 0x1c31, 0x1c32, 0x1c33, 0x1c34, 0x1c35, 0x1c36, 0x1c37, - 0x1c38, 0x1c39, 0x1c3a, 0x1c3b, 0x1c3c, 0x1c3d, 0x1c3e, 0x1c3f, - 0x1c40, 0x1c41, 0x1c42, 0x1c43, 0x1c44, 0x1c45, 0x1c46, 0x1c47, - 0x1c48, 0x1c49, 0x1c4a, 0x1c4b, 0x1c4c, 0x1c4d, 0x1c4e, 0x1c4f, - 0x1c50, 0x1c51, 0x1c52, 0x1c53, 0x1c54, 0x1c55, 0x1c56, 0x1c57, - 0x1c58, 0x1c59, 0x1c5a, 0x1c5b, 0x1c5c, 0x1c5d, 0x1c5e, 0x1c5f, - 0x1c60, 0x1c61, 0x1c62, 0x1c63, 0x1c64, 0x1c65, 0x1c66, 0x1c67, - 0x1c68, 0x1c69, 0x1c6a, 0x1c6b, 0x1c6c, 0x1c6d, 0x1c6e, 0x1c6f, - 0x1c70, 0x1c71, 0x1c72, 0x1c73, 0x1c74, 0x1c75, 0x1c76, 0x1c77, - 0x1c78, 0x1c79, 0x1c7a, 0x1c7b, 0x1c7c, 0x1c7d, 0x1c7e, 0x1c7f, - 0x1c80, 0x1c81, 0x1c82, 0x1c83, 0x1c84, 0x1c85, 0x1c86, 0x1c87, - 0x1c88, 0x1c89, 0x1c8a, 0x1c8b, 0x1c8c, 0x1c8d, 0x1c8e, 0x1c8f, - 0x1c90, 0x1c91, 0x1c92, 0x1c93, 0x1c94, 0x1c95, 0x1c96, 0x1c97, - 0x1c98, 0x1c99, 0x1c9a, 0x1c9b, 0x1c9c, 0x1c9d, 0x1c9e, 0x1c9f, - 0x1ca0, 0x1ca1, 0x1ca2, 0x1ca3, 0x1ca4, 0x1ca5, 0x1ca6, 0x1ca7, - 0x1ca8, 0x1ca9, 0x1caa, 0x1cab, 0x1cac, 0x1cad, 0x1cae, 0x1caf, - 0x1cb0, 0x1cb1, 0x1cb2, 0x1cb3, 0x1cb4, 0x1cb5, 0x1cb6, 0x1cb7, - 0x1cb8, 0x1cb9, 0x1cba, 0x1cbb, 0x1cbc, 0x1cbd, 0x1cbe, 0x1cbf, - 0x1cc0, 0x1cc1, 0x1cc2, 0x1cc3, 0x1cc4, 0x1cc5, 0x1cc6, 0x1cc7, - 0x1cc8, 0x1cc9, 0x1cca, 0x1ccb, 0x1ccc, 0x1ccd, 0x1cce, 0x1ccf, - 0x1cd0, 0x1cd1, 0x1cd2, 0x1cd3, 0x1cd4, 0x1cd5, 0x1cd6, 0x1cd7, - 0x1cd8, 0x1cd9, 0x1cda, 0x1cdb, 0x1cdc, 0x1cdd, 0x1cde, 0x1cdf, - 0x1ce0, 0x1ce1, 0x1ce2, 0x1ce3, 0x1ce4, 0x1ce5, 0x1ce6, 0x1ce7, - 0x1ce8, 0x1ce9, 0x1cea, 0x1ceb, 0x1cec, 0x1ced, 0x1cee, 0x1cef, - 0x1cf0, 0x1cf1, 0x1cf2, 0x1cf3, 0x1cf4, 0x1cf5, 0x1cf6, 0x1cf7, - 0x1cf8, 0x1cf9, 0x1cfa, 0x1cfb, 0x1cfc, 0x1cfd, 0x1cfe, 0x1cff, - 0x1d00, 0x1d01, 0x1d02, 0x1d03, 0x1d04, 0x1d05, 0x1d06, 0x1d07, - 0x1d08, 0x1d09, 0x1d0a, 0x1d0b, 0x1d0c, 0x1d0d, 0x1d0e, 0x1d0f, - 0x1d10, 0x1d11, 0x1d12, 0x1d13, 0x1d14, 0x1d15, 0x1d16, 0x1d17, - 0x1d18, 0x1d19, 0x1d1a, 0x1d1b, 0x1d1c, 0x1d1d, 0x1d1e, 0x1d1f, - 0x1d20, 0x1d21, 0x1d22, 0x1d23, 0x1d24, 0x1d25, 0x1d26, 0x1d27, - 0x1d28, 0x1d29, 0x1d2a, 0x1d2b, 0x1d2c, 0x1d2d, 0x1d2e, 0x1d2f, - 0x1d30, 0x1d31, 0x1d32, 0x1d33, 0x1d34, 0x1d35, 0x1d36, 0x1d37, - 0x1d38, 0x1d39, 0x1d3a, 0x1d3b, 0x1d3c, 0x1d3d, 0x1d3e, 0x1d3f, - 0x1d40, 0x1d41, 0x1d42, 0x1d43, 0x1d44, 0x1d45, 0x1d46, 0x1d47, - 0x1d48, 0x1d49, 0x1d4a, 0x1d4b, 0x1d4c, 0x1d4d, 0x1d4e, 0x1d4f, - 0x1d50, 0x1d51, 0x1d52, 0x1d53, 0x1d54, 0x1d55, 0x1d56, 0x1d57, - 0x1d58, 0x1d59, 0x1d5a, 0x1d5b, 0x1d5c, 0x1d5d, 0x1d5e, 0x1d5f, - 0x1d60, 0x1d61, 0x1d62, 0x1d63, 0x1d64, 0x1d65, 0x1d66, 0x1d67, - 0x1d68, 0x1d69, 0x1d6a, 0x1d6b, 0x1d6c, 0x1d6d, 0x1d6e, 0x1d6f, - 0x1d70, 0x1d71, 0x1d72, 0x1d73, 0x1d74, 0x1d75, 0x1d76, 0x1d77, - 0x1d78, 0x1d79, 0x1d7a, 0x1d7b, 0x1d7c, 0x1d7d, 0x1d7e, 0x1d7f, - 0x1d80, 0x1d81, 0x1d82, 0x1d83, 0x1d84, 0x1d85, 0x1d86, 0x1d87, - 0x1d88, 0x1d89, 0x1d8a, 0x1d8b, 0x1d8c, 0x1d8d, 0x1d8e, 0x1d8f, - 0x1d90, 0x1d91, 0x1d92, 0x1d93, 0x1d94, 0x1d95, 0x1d96, 0x1d97, - 0x1d98, 0x1d99, 0x1d9a, 0x1d9b, 0x1d9c, 0x1d9d, 0x1d9e, 0x1d9f, - 0x1da0, 0x1da1, 0x1da2, 0x1da3, 0x1da4, 0x1da5, 0x1da6, 0x1da7, - 0x1da8, 0x1da9, 0x1daa, 0x1dab, 0x1dac, 0x1dad, 0x1dae, 0x1daf, - 0x1db0, 0x1db1, 0x1db2, 0x1db3, 0x1db4, 0x1db5, 0x1db6, 0x1db7, - 0x1db8, 0x1db9, 0x1dba, 0x1dbb, 0x1dbc, 0x1dbd, 0x1dbe, 0x1dbf, - 0x1dc0, 0x1dc1, 0x1dc2, 0x1dc3, 0x1dc4, 0x1dc5, 0x1dc6, 0x1dc7, - 0x1dc8, 0x1dc9, 0x1dca, 0x1dcb, 0x1dcc, 0x1dcd, 0x1dce, 0x1dcf, - 0x1dd0, 0x1dd1, 0x1dd2, 0x1dd3, 0x1dd4, 0x1dd5, 0x1dd6, 0x1dd7, - 0x1dd8, 0x1dd9, 0x1dda, 0x1ddb, 0x1ddc, 0x1ddd, 0x1dde, 0x1ddf, - 0x1de0, 0x1de1, 0x1de2, 0x1de3, 0x1de4, 0x1de5, 0x1de6, 0x1de7, - 0x1de8, 0x1de9, 0x1dea, 0x1deb, 0x1dec, 0x1ded, 0x1dee, 0x1def, - 0x1df0, 0x1df1, 0x1df2, 0x1df3, 0x1df4, 0x1df5, 0x1df6, 0x1df7, - 0x1df8, 0x1df9, 0x1dfa, 0x1dfb, 0x1dfc, 0x1dfd, 0x1dfe, 0x1dff, - 0x1e00, 0x1e01, 0x1e02, 0x1e03, 0x1e04, 0x1e05, 0x1e06, 0x1e07, - 0x1e08, 0x1e09, 0x1e0a, 0x1e0b, 0x1e0c, 0x1e0d, 0x1e0e, 0x1e0f, - 0x1e10, 0x1e11, 0x1e12, 0x1e13, 0x1e14, 0x1e15, 0x1e16, 0x1e17, - 0x1e18, 0x1e19, 0x1e1a, 0x1e1b, 0x1e1c, 0x1e1d, 0x1e1e, 0x1e1f, - 0x1e20, 0x1e21, 0x1e22, 0x1e23, 0x1e24, 0x1e25, 0x1e26, 0x1e27, - 0x1e28, 0x1e29, 0x1e2a, 0x1e2b, 0x1e2c, 0x1e2d, 0x1e2e, 0x1e2f, - 0x1e30, 0x1e31, 0x1e32, 0x1e33, 0x1e34, 0x1e35, 0x1e36, 0x1e37, - 0x1e38, 0x1e39, 0x1e3a, 0x1e3b, 0x1e3c, 0x1e3d, 0x1e3e, 0x1e3f, - 0x1e40, 0x1e41, 0x1e42, 0x1e43, 0x1e44, 0x1e45, 0x1e46, 0x1e47, - 0x1e48, 0x1e49, 0x1e4a, 0x1e4b, 0x1e4c, 0x1e4d, 0x1e4e, 0x1e4f, - 0x1e50, 0x1e51, 0x1e52, 0x1e53, 0x1e54, 0x1e55, 0x1e56, 0x1e57, - 0x1e58, 0x1e59, 0x1e5a, 0x1e5b, 0x1e5c, 0x1e5d, 0x1e5e, 0x1e5f, - 0x1e60, 0x1e61, 0x1e62, 0x1e63, 0x1e64, 0x1e65, 0x1e66, 0x1e67, - 0x1e68, 0x1e69, 0x1e6a, 0x1e6b, 0x1e6c, 0x1e6d, 0x1e6e, 0x1e6f, - 0x1e70, 0x1e71, 0x1e72, 0x1e73, 0x1e74, 0x1e75, 0x1e76, 0x1e77, - 0x1e78, 0x1e79, 0x1e7a, 0x1e7b, 0x1e7c, 0x1e7d, 0x1e7e, 0x1e7f, - 0x1e80, 0x1e81, 0x1e82, 0x1e83, 0x1e84, 0x1e85, 0x1e86, 0x1e87, - 0x1e88, 0x1e89, 0x1e8a, 0x1e8b, 0x1e8c, 0x1e8d, 0x1e8e, 0x1e8f, - 0x1e90, 0x1e91, 0x1e92, 0x1e93, 0x1e94, 0x1e95, 0x1e96, 0x1e97, - 0x1e98, 0x1e99, 0x1e9a, 0x1e9b, 0x1e9c, 0x1e9d, 0x1e9e, 0x1e9f, - 0x1ea0, 0x1ea1, 0x1ea2, 0x1ea3, 0x1ea4, 0x1ea5, 0x1ea6, 0x1ea7, - 0x1ea8, 0x1ea9, 0x1eaa, 0x1eab, 0x1eac, 0x1ead, 0x1eae, 0x1eaf, - 0x1eb0, 0x1eb1, 0x1eb2, 0x1eb3, 0x1eb4, 0x1eb5, 0x1eb6, 0x1eb7, - 0x1eb8, 0x1eb9, 0x1eba, 0x1ebb, 0x1ebc, 0x1ebd, 0x1ebe, 0x1ebf, - 0x1ec0, 0x1ec1, 0x1ec2, 0x1ec3, 0x1ec4, 0x1ec5, 0x1ec6, 0x1ec7, - 0x1ec8, 0x1ec9, 0x1eca, 0x1ecb, 0x1ecc, 0x1ecd, 0x1ece, 0x1ecf, - 0x1ed0, 0x1ed1, 0x1ed2, 0x1ed3, 0x1ed4, 0x1ed5, 0x1ed6, 0x1ed7, - 0x1ed8, 0x1ed9, 0x1eda, 0x1edb, 0x1edc, 0x1edd, 0x1ede, 0x1edf, - 0x1ee0, 0x1ee1, 0x1ee2, 0x1ee3, 0x1ee4, 0x1ee5, 0x1ee6, 0x1ee7, - 0x1ee8, 0x1ee9, 0x1eea, 0x1eeb, 0x1eec, 0x1eed, 0x1eee, 0x1eef, - 0x1ef0, 0x1ef1, 0x1ef2, 0x1ef3, 0x1ef4, 0x1ef5, 0x1ef6, 0x1ef7, - 0x1ef8, 0x1ef9, 0x1efa, 0x1efb, 0x1efc, 0x1efd, 0x1efe, 0x1eff, - 0x1f00, 0x1f01, 0x1f02, 0x1f03, 0x1f04, 0x1f05, 0x1f06, 0x1f07, - 0x1f08, 0x1f09, 0x1f0a, 0x1f0b, 0x1f0c, 0x1f0d, 0x1f0e, 0x1f0f, - 0x1f10, 0x1f11, 0x1f12, 0x1f13, 0x1f14, 0x1f15, 0x1f16, 0x1f17, - 0x1f18, 0x1f19, 0x1f1a, 0x1f1b, 0x1f1c, 0x1f1d, 0x1f1e, 0x1f1f, - 0x1f20, 0x1f21, 0x1f22, 0x1f23, 0x1f24, 0x1f25, 0x1f26, 0x1f27, - 0x1f28, 0x1f29, 0x1f2a, 0x1f2b, 0x1f2c, 0x1f2d, 0x1f2e, 0x1f2f, - 0x1f30, 0x1f31, 0x1f32, 0x1f33, 0x1f34, 0x1f35, 0x1f36, 0x1f37, - 0x1f38, 0x1f39, 0x1f3a, 0x1f3b, 0x1f3c, 0x1f3d, 0x1f3e, 0x1f3f, - 0x1f40, 0x1f41, 0x1f42, 0x1f43, 0x1f44, 0x1f45, 0x1f46, 0x1f47, - 0x1f48, 0x1f49, 0x1f4a, 0x1f4b, 0x1f4c, 0x1f4d, 0x1f4e, 0x1f4f, - 0x1f50, 0x1f51, 0x1f52, 0x1f53, 0x1f54, 0x1f55, 0x1f56, 0x1f57, - 0x1f58, 0x1f59, 0x1f5a, 0x1f5b, 0x1f5c, 0x1f5d, 0x1f5e, 0x1f5f, - 0x1f60, 0x1f61, 0x1f62, 0x1f63, 0x1f64, 0x1f65, 0x1f66, 0x1f67, - 0x1f68, 0x1f69, 0x1f6a, 0x1f6b, 0x1f6c, 0x1f6d, 0x1f6e, 0x1f6f, - 0x1f70, 0x1f71, 0x1f72, 0x1f73, 0x1f74, 0x1f75, 0x1f76, 0x1f77, - 0x1f78, 0x1f79, 0x1f7a, 0x1f7b, 0x1f7c, 0x1f7d, 0x1f7e, 0x1f7f, - 0x1f80, 0x1f81, 0x1f82, 0x1f83, 0x1f84, 0x1f85, 0x1f86, 0x1f87, - 0x1f88, 0x1f89, 0x1f8a, 0x1f8b, 0x1f8c, 0x1f8d, 0x1f8e, 0x1f8f, - 0x1f90, 0x1f91, 0x1f92, 0x1f93, 0x1f94, 0x1f95, 0x1f96, 0x1f97, - 0x1f98, 0x1f99, 0x1f9a, 0x1f9b, 0x1f9c, 0x1f9d, 0x1f9e, 0x1f9f, - 0x1fa0, 0x1fa1, 0x1fa2, 0x1fa3, 0x1fa4, 0x1fa5, 0x1fa6, 0x1fa7, - 0x1fa8, 0x1fa9, 0x1faa, 0x1fab, 0x1fac, 0x1fad, 0x1fae, 0x1faf, - 0x1fb0, 0x1fb1, 0x1fb2, 0x1fb3, 0x1fb4, 0x1fb5, 0x1fb6, 0x1fb7, - 0x1fb8, 0x1fb9, 0x1fba, 0x1fbb, 0x1fbc, 0x1fbd, 0x1fbe, 0x1fbf, - 0x1fc0, 0x1fc1, 0x1fc2, 0x1fc3, 0x1fc4, 0x1fc5, 0x1fc6, 0x1fc7, - 0x1fc8, 0x1fc9, 0x1fca, 0x1fcb, 0x1fcc, 0x1fcd, 0x1fce, 0x1fcf, - 0x1fd0, 0x1fd1, 0x1fd2, 0x1fd3, 0x1fd4, 0x1fd5, 0x1fd6, 0x1fd7, - 0x1fd8, 0x1fd9, 0x1fda, 0x1fdb, 0x1fdc, 0x1fdd, 0x1fde, 0x1fdf, - 0x1fe0, 0x1fe1, 0x1fe2, 0x1fe3, 0x1fe4, 0x1fe5, 0x1fe6, 0x1fe7, - 0x1fe8, 0x1fe9, 0x1fea, 0x1feb, 0x1fec, 0x1fed, 0x1fee, 0x1fef, - 0x1ff0, 0x1ff1, 0x1ff2, 0x1ff3, 0x1ff4, 0x1ff5, 0x1ff6, 0x1ff7, - 0x1ff8, 0x1ff9, 0x1ffa, 0x1ffb, 0x1ffc, 0x1ffd, 0x1ffe, 0x1fff, - 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, - 0x2008, 0x2009, 0x200a, 0x200b, 0x200c, 0x200d, 0x200e, 0x200f, - 0x2010, 0x2011, 0x2012, 0x2013, 0x2014, 0x2015, 0x2016, 0x2017, - 0x2018, 0x2019, 0x201a, 0x201b, 0x201c, 0x201d, 0x201e, 0x201f, - 0x2020, 0x2021, 0x2022, 0x2023, 0x2024, 0x2025, 0x2026, 0x2027, - 0x2028, 0x2029, 0x202a, 0x202b, 0x202c, 0x202d, 0x202e, 0x202f, - 0x2030, 0x2031, 0x2032, 0x2033, 0x2034, 0x2035, 0x2036, 0x2037, - 0x2038, 0x2039, 0x203a, 0x203b, 0x203c, 0x203d, 0x203e, 0x203f, - 0x2040, 0x2041, 0x2042, 0x2043, 0x2044, 0x2045, 0x2046, 0x2047, - 0x2048, 0x2049, 0x204a, 0x204b, 0x204c, 0x204d, 0x204e, 0x204f, - 0x2050, 0x2051, 0x2052, 0x2053, 0x2054, 0x2055, 0x2056, 0x2057, - 0x2058, 0x2059, 0x205a, 0x205b, 0x205c, 0x205d, 0x205e, 0x205f, - 0x2060, 0x2061, 0x2062, 0x2063, 0x2064, 0x2065, 0x2066, 0x2067, - 0x2068, 0x2069, 0x206a, 0x206b, 0x206c, 0x206d, 0x206e, 0x206f, - 0x2070, 0x2071, 0x2072, 0x2073, 0x2074, 0x2075, 0x2076, 0x2077, - 0x2078, 0x2079, 0x207a, 0x207b, 0x207c, 0x207d, 0x207e, 0x207f, - 0x2080, 0x2081, 0x2082, 0x2083, 0x2084, 0x2085, 0x2086, 0x2087, - 0x2088, 0x2089, 0x208a, 0x208b, 0x208c, 0x208d, 0x208e, 0x208f, - 0x2090, 0x2091, 0x2092, 0x2093, 0x2094, 0x2095, 0x2096, 0x2097, - 0x2098, 0x2099, 0x209a, 0x209b, 0x209c, 0x209d, 0x209e, 0x209f, - 0x20a0, 0x20a1, 0x20a2, 0x20a3, 0x20a4, 0x20a5, 0x20a6, 0x20a7, - 0x20a8, 0x20a9, 0x20aa, 0x20ab, 0x20ac, 0x20ad, 0x20ae, 0x20af, - 0x20b0, 0x20b1, 0x20b2, 0x20b3, 0x20b4, 0x20b5, 0x20b6, 0x20b7, - 0x20b8, 0x20b9, 0x20ba, 0x20bb, 0x20bc, 0x20bd, 0x20be, 0x20bf, - 0x20c0, 0x20c1, 0x20c2, 0x20c3, 0x20c4, 0x20c5, 0x20c6, 0x20c7, - 0x20c8, 0x20c9, 0x20ca, 0x20cb, 0x20cc, 0x20cd, 0x20ce, 0x20cf, - 0x20d0, 0x20d1, 0x20d2, 0x20d3, 0x20d4, 0x20d5, 0x20d6, 0x20d7, - 0x20d8, 0x20d9, 0x20da, 0x20db, 0x20dc, 0x20dd, 0x20de, 0x20df, - 0x20e0, 0x20e1, 0x20e2, 0x20e3, 0x20e4, 0x20e5, 0x20e6, 0x20e7, - 0x20e8, 0x20e9, 0x20ea, 0x20eb, 0x20ec, 0x20ed, 0x20ee, 0x20ef, - 0x20f0, 0x20f1, 0x20f2, 0x20f3, 0x20f4, 0x20f5, 0x20f6, 0x20f7, - 0x20f8, 0x20f9, 0x20fa, 0x20fb, 0x20fc, 0x20fd, 0x20fe, 0x20ff, - 0x2100, 0x2101, 0x2102, 0x2103, 0x2104, 0x2105, 0x2106, 0x2107, - 0x2108, 0x2109, 0x210a, 0x210b, 0x210c, 0x210d, 0x210e, 0x210f, - 0x2110, 0x2111, 0x2112, 0x2113, 0x2114, 0x2115, 0x2116, 0x2117, - 0x2118, 0x2119, 0x211a, 0x211b, 0x211c, 0x211d, 0x211e, 0x211f, - 0x2120, 0x2121, 0x2122, 0x2123, 0x2124, 0x2125, 0x2126, 0x2127, - 0x2128, 0x2129, 0x212a, 0x212b, 0x212c, 0x212d, 0x212e, 0x212f, - 0x2130, 0x2131, 0x2132, 0x2133, 0x2134, 0x2135, 0x2136, 0x2137, - 0x2138, 0x2139, 0x213a, 0x213b, 0x213c, 0x213d, 0x213e, 0x213f, - 0x2140, 0x2141, 0x2142, 0x2143, 0x2144, 0x2145, 0x2146, 0x2147, - 0x2148, 0x2149, 0x214a, 0x214b, 0x214c, 0x214d, 0x214e, 0x214f, - 0x2150, 0x2151, 0x2152, 0x2153, 0x2154, 0x2155, 0x2156, 0x2157, - 0x2158, 0x2159, 0x215a, 0x215b, 0x215c, 0x215d, 0x215e, 0x215f, - 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, - 0x2168, 0x2169, 0x216a, 0x216b, 0x216c, 0x216d, 0x216e, 0x216f, - 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, - 0x2178, 0x2179, 0x217a, 0x217b, 0x217c, 0x217d, 0x217e, 0x217f, - 0x2180, 0x2181, 0x2182, 0x2183, 0x2184, 0x2185, 0x2186, 0x2187, - 0x2188, 0x2189, 0x218a, 0x218b, 0x218c, 0x218d, 0x218e, 0x218f, - 0x2190, 0x2191, 0x2192, 0x2193, 0x2194, 0x2195, 0x2196, 0x2197, - 0x2198, 0x2199, 0x219a, 0x219b, 0x219c, 0x219d, 0x219e, 0x219f, - 0x21a0, 0x21a1, 0x21a2, 0x21a3, 0x21a4, 0x21a5, 0x21a6, 0x21a7, - 0x21a8, 0x21a9, 0x21aa, 0x21ab, 0x21ac, 0x21ad, 0x21ae, 0x21af, - 0x21b0, 0x21b1, 0x21b2, 0x21b3, 0x21b4, 0x21b5, 0x21b6, 0x21b7, - 0x21b8, 0x21b9, 0x21ba, 0x21bb, 0x21bc, 0x21bd, 0x21be, 0x21bf, - 0x21c0, 0x21c1, 0x21c2, 0x21c3, 0x21c4, 0x21c5, 0x21c6, 0x21c7, - 0x21c8, 0x21c9, 0x21ca, 0x21cb, 0x21cc, 0x21cd, 0x21ce, 0x21cf, - 0x21d0, 0x21d1, 0x21d2, 0x21d3, 0x21d4, 0x21d5, 0x21d6, 0x21d7, - 0x21d8, 0x21d9, 0x21da, 0x21db, 0x21dc, 0x21dd, 0x21de, 0x21df, - 0x21e0, 0x21e1, 0x21e2, 0x21e3, 0x21e4, 0x21e5, 0x21e6, 0x21e7, - 0x21e8, 0x21e9, 0x21ea, 0x21eb, 0x21ec, 0x21ed, 0x21ee, 0x21ef, - 0x21f0, 0x21f1, 0x21f2, 0x21f3, 0x21f4, 0x21f5, 0x21f6, 0x21f7, - 0x21f8, 0x21f9, 0x21fa, 0x21fb, 0x21fc, 0x21fd, 0x21fe, 0x21ff, - 0x2200, 0x2201, 0x2202, 0x2203, 0x2204, 0x2205, 0x2206, 0x2207, - 0x2208, 0x2209, 0x220a, 0x220b, 0x220c, 0x220d, 0x220e, 0x220f, - 0x2210, 0x2211, 0x2212, 0x2213, 0x2214, 0x2215, 0x2216, 0x2217, - 0x2218, 0x2219, 0x221a, 0x221b, 0x221c, 0x221d, 0x221e, 0x221f, - 0x2220, 0x2221, 0x2222, 0x2223, 0x2224, 0x2225, 0x2226, 0x2227, - 0x2228, 0x2229, 0x222a, 0x222b, 0x222c, 0x222d, 0x222e, 0x222f, - 0x2230, 0x2231, 0x2232, 0x2233, 0x2234, 0x2235, 0x2236, 0x2237, - 0x2238, 0x2239, 0x223a, 0x223b, 0x223c, 0x223d, 0x223e, 0x223f, - 0x2240, 0x2241, 0x2242, 0x2243, 0x2244, 0x2245, 0x2246, 0x2247, - 0x2248, 0x2249, 0x224a, 0x224b, 0x224c, 0x224d, 0x224e, 0x224f, - 0x2250, 0x2251, 0x2252, 0x2253, 0x2254, 0x2255, 0x2256, 0x2257, - 0x2258, 0x2259, 0x225a, 0x225b, 0x225c, 0x225d, 0x225e, 0x225f, - 0x2260, 0x2261, 0x2262, 0x2263, 0x2264, 0x2265, 0x2266, 0x2267, - 0x2268, 0x2269, 0x226a, 0x226b, 0x226c, 0x226d, 0x226e, 0x226f, - 0x2270, 0x2271, 0x2272, 0x2273, 0x2274, 0x2275, 0x2276, 0x2277, - 0x2278, 0x2279, 0x227a, 0x227b, 0x227c, 0x227d, 0x227e, 0x227f, - 0x2280, 0x2281, 0x2282, 0x2283, 0x2284, 0x2285, 0x2286, 0x2287, - 0x2288, 0x2289, 0x228a, 0x228b, 0x228c, 0x228d, 0x228e, 0x228f, - 0x2290, 0x2291, 0x2292, 0x2293, 0x2294, 0x2295, 0x2296, 0x2297, - 0x2298, 0x2299, 0x229a, 0x229b, 0x229c, 0x229d, 0x229e, 0x229f, - 0x22a0, 0x22a1, 0x22a2, 0x22a3, 0x22a4, 0x22a5, 0x22a6, 0x22a7, - 0x22a8, 0x22a9, 0x22aa, 0x22ab, 0x22ac, 0x22ad, 0x22ae, 0x22af, - 0x22b0, 0x22b1, 0x22b2, 0x22b3, 0x22b4, 0x22b5, 0x22b6, 0x22b7, - 0x22b8, 0x22b9, 0x22ba, 0x22bb, 0x22bc, 0x22bd, 0x22be, 0x22bf, - 0x22c0, 0x22c1, 0x22c2, 0x22c3, 0x22c4, 0x22c5, 0x22c6, 0x22c7, - 0x22c8, 0x22c9, 0x22ca, 0x22cb, 0x22cc, 0x22cd, 0x22ce, 0x22cf, - 0x22d0, 0x22d1, 0x22d2, 0x22d3, 0x22d4, 0x22d5, 0x22d6, 0x22d7, - 0x22d8, 0x22d9, 0x22da, 0x22db, 0x22dc, 0x22dd, 0x22de, 0x22df, - 0x22e0, 0x22e1, 0x22e2, 0x22e3, 0x22e4, 0x22e5, 0x22e6, 0x22e7, - 0x22e8, 0x22e9, 0x22ea, 0x22eb, 0x22ec, 0x22ed, 0x22ee, 0x22ef, - 0x22f0, 0x22f1, 0x22f2, 0x22f3, 0x22f4, 0x22f5, 0x22f6, 0x22f7, - 0x22f8, 0x22f9, 0x22fa, 0x22fb, 0x22fc, 0x22fd, 0x22fe, 0x22ff, - 0x2300, 0x2301, 0x2302, 0x2303, 0x2304, 0x2305, 0x2306, 0x2307, - 0x2308, 0x2309, 0x230a, 0x230b, 0x230c, 0x230d, 0x230e, 0x230f, - 0x2310, 0x2311, 0x2312, 0x2313, 0x2314, 0x2315, 0x2316, 0x2317, - 0x2318, 0x2319, 0x231a, 0x231b, 0x231c, 0x231d, 0x231e, 0x231f, - 0x2320, 0x2321, 0x2322, 0x2323, 0x2324, 0x2325, 0x2326, 0x2327, - 0x2328, 0x2329, 0x232a, 0x232b, 0x232c, 0x232d, 0x232e, 0x232f, - 0x2330, 0x2331, 0x2332, 0x2333, 0x2334, 0x2335, 0x2336, 0x2337, - 0x2338, 0x2339, 0x233a, 0x233b, 0x233c, 0x233d, 0x233e, 0x233f, - 0x2340, 0x2341, 0x2342, 0x2343, 0x2344, 0x2345, 0x2346, 0x2347, - 0x2348, 0x2349, 0x234a, 0x234b, 0x234c, 0x234d, 0x234e, 0x234f, - 0x2350, 0x2351, 0x2352, 0x2353, 0x2354, 0x2355, 0x2356, 0x2357, - 0x2358, 0x2359, 0x235a, 0x235b, 0x235c, 0x235d, 0x235e, 0x235f, - 0x2360, 0x2361, 0x2362, 0x2363, 0x2364, 0x2365, 0x2366, 0x2367, - 0x2368, 0x2369, 0x236a, 0x236b, 0x236c, 0x236d, 0x236e, 0x236f, - 0x2370, 0x2371, 0x2372, 0x2373, 0x2374, 0x2375, 0x2376, 0x2377, - 0x2378, 0x2379, 0x237a, 0x237b, 0x237c, 0x237d, 0x237e, 0x237f, - 0x2380, 0x2381, 0x2382, 0x2383, 0x2384, 0x2385, 0x2386, 0x2387, - 0x2388, 0x2389, 0x238a, 0x238b, 0x238c, 0x238d, 0x238e, 0x238f, - 0x2390, 0x2391, 0x2392, 0x2393, 0x2394, 0x2395, 0x2396, 0x2397, - 0x2398, 0x2399, 0x239a, 0x239b, 0x239c, 0x239d, 0x239e, 0x239f, - 0x23a0, 0x23a1, 0x23a2, 0x23a3, 0x23a4, 0x23a5, 0x23a6, 0x23a7, - 0x23a8, 0x23a9, 0x23aa, 0x23ab, 0x23ac, 0x23ad, 0x23ae, 0x23af, - 0x23b0, 0x23b1, 0x23b2, 0x23b3, 0x23b4, 0x23b5, 0x23b6, 0x23b7, - 0x23b8, 0x23b9, 0x23ba, 0x23bb, 0x23bc, 0x23bd, 0x23be, 0x23bf, - 0x23c0, 0x23c1, 0x23c2, 0x23c3, 0x23c4, 0x23c5, 0x23c6, 0x23c7, - 0x23c8, 0x23c9, 0x23ca, 0x23cb, 0x23cc, 0x23cd, 0x23ce, 0x23cf, - 0x23d0, 0x23d1, 0x23d2, 0x23d3, 0x23d4, 0x23d5, 0x23d6, 0x23d7, - 0x23d8, 0x23d9, 0x23da, 0x23db, 0x23dc, 0x23dd, 0x23de, 0x23df, - 0x23e0, 0x23e1, 0x23e2, 0x23e3, 0x23e4, 0x23e5, 0x23e6, 0x23e7, - 0x23e8, 0x23e9, 0x23ea, 0x23eb, 0x23ec, 0x23ed, 0x23ee, 0x23ef, - 0x23f0, 0x23f1, 0x23f2, 0x23f3, 0x23f4, 0x23f5, 0x23f6, 0x23f7, - 0x23f8, 0x23f9, 0x23fa, 0x23fb, 0x23fc, 0x23fd, 0x23fe, 0x23ff, - 0x2400, 0x2401, 0x2402, 0x2403, 0x2404, 0x2405, 0x2406, 0x2407, - 0x2408, 0x2409, 0x240a, 0x240b, 0x240c, 0x240d, 0x240e, 0x240f, - 0x2410, 0x2411, 0x2412, 0x2413, 0x2414, 0x2415, 0x2416, 0x2417, - 0x2418, 0x2419, 0x241a, 0x241b, 0x241c, 0x241d, 0x241e, 0x241f, - 0x2420, 0x2421, 0x2422, 0x2423, 0x2424, 0x2425, 0x2426, 0x2427, - 0x2428, 0x2429, 0x242a, 0x242b, 0x242c, 0x242d, 0x242e, 0x242f, - 0x2430, 0x2431, 0x2432, 0x2433, 0x2434, 0x2435, 0x2436, 0x2437, - 0x2438, 0x2439, 0x243a, 0x243b, 0x243c, 0x243d, 0x243e, 0x243f, - 0x2440, 0x2441, 0x2442, 0x2443, 0x2444, 0x2445, 0x2446, 0x2447, - 0x2448, 0x2449, 0x244a, 0x244b, 0x244c, 0x244d, 0x244e, 0x244f, - 0x2450, 0x2451, 0x2452, 0x2453, 0x2454, 0x2455, 0x2456, 0x2457, - 0x2458, 0x2459, 0x245a, 0x245b, 0x245c, 0x245d, 0x245e, 0x245f, - 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, - 0x2468, 0x2469, 0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x246f, - 0x2470, 0x2471, 0x2472, 0x2473, 0x2474, 0x2475, 0x2476, 0x2477, - 0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, 0x247f, - 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, 0x2487, - 0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e, 0x248f, - 0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496, 0x2497, - 0x2498, 0x2499, 0x249a, 0x249b, 0x249c, 0x249d, 0x249e, 0x249f, - 0x24a0, 0x24a1, 0x24a2, 0x24a3, 0x24a4, 0x24a5, 0x24a6, 0x24a7, - 0x24a8, 0x24a9, 0x24aa, 0x24ab, 0x24ac, 0x24ad, 0x24ae, 0x24af, - 0x24b0, 0x24b1, 0x24b2, 0x24b3, 0x24b4, 0x24b5, 0x24b6, 0x24b7, - 0x24b8, 0x24b9, 0x24ba, 0x24bb, 0x24bc, 0x24bd, 0x24be, 0x24bf, - 0x24c0, 0x24c1, 0x24c2, 0x24c3, 0x24c4, 0x24c5, 0x24c6, 0x24c7, - 0x24c8, 0x24c9, 0x24ca, 0x24cb, 0x24cc, 0x24cd, 0x24ce, 0x24cf, - 0x24d0, 0x24d1, 0x24d2, 0x24d3, 0x24d4, 0x24d5, 0x24d6, 0x24d7, - 0x24d8, 0x24d9, 0x24da, 0x24db, 0x24dc, 0x24dd, 0x24de, 0x24df, - 0x24e0, 0x24e1, 0x24e2, 0x24e3, 0x24e4, 0x24e5, 0x24e6, 0x24e7, - 0x24e8, 0x24e9, 0x24ea, 0x24eb, 0x24ec, 0x24ed, 0x24ee, 0x24ef, - 0x24f0, 0x24f1, 0x24f2, 0x24f3, 0x24f4, 0x24f5, 0x24f6, 0x24f7, - 0x24f8, 0x24f9, 0x24fa, 0x24fb, 0x24fc, 0x24fd, 0x24fe, 0x24ff, - 0x2500, 0x2501, 0x2502, 0x2503, 0x2504, 0x2505, 0x2506, 0x2507, - 0x2508, 0x2509, 0x250a, 0x250b, 0x250c, 0x250d, 0x250e, 0x250f, - 0x2510, 0x2511, 0x2512, 0x2513, 0x2514, 0x2515, 0x2516, 0x2517, - 0x2518, 0x2519, 0x251a, 0x251b, 0x251c, 0x251d, 0x251e, 0x251f, - 0x2520, 0x2521, 0x2522, 0x2523, 0x2524, 0x2525, 0x2526, 0x2527, - 0x2528, 0x2529, 0x252a, 0x252b, 0x252c, 0x252d, 0x252e, 0x252f, - 0x2530, 0x2531, 0x2532, 0x2533, 0x2534, 0x2535, 0x2536, 0x2537, - 0x2538, 0x2539, 0x253a, 0x253b, 0x253c, 0x253d, 0x253e, 0x253f, - 0x2540, 0x2541, 0x2542, 0x2543, 0x2544, 0x2545, 0x2546, 0x2547, - 0x2548, 0x2549, 0x254a, 0x254b, 0x254c, 0x254d, 0x254e, 0x254f, - 0x2550, 0x2551, 0x2552, 0x2553, 0x2554, 0x2555, 0x2556, 0x2557, - 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e, 0x255f, - 0x2560, 0x2561, 0x2562, 0x2563, 0x2564, 0x2565, 0x2566, 0x2567, - 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x256d, 0x256e, 0x256f, - 0x2570, 0x2571, 0x2572, 0x2573, 0x2574, 0x2575, 0x2576, 0x2577, - 0x2578, 0x2579, 0x257a, 0x257b, 0x257c, 0x257d, 0x257e, 0x257f, - 0x2580, 0x2581, 0x2582, 0x2583, 0x2584, 0x2585, 0x2586, 0x2587, - 0x2588, 0x2589, 0x258a, 0x258b, 0x258c, 0x258d, 0x258e, 0x258f, - 0x2590, 0x2591, 0x2592, 0x2593, 0x2594, 0x2595, 0x2596, 0x2597, - 0x2598, 0x2599, 0x259a, 0x259b, 0x259c, 0x259d, 0x259e, 0x259f, - 0x25a0, 0x25a1, 0x25a2, 0x25a3, 0x25a4, 0x25a5, 0x25a6, 0x25a7, - 0x25a8, 0x25a9, 0x25aa, 0x25ab, 0x25ac, 0x25ad, 0x25ae, 0x25af, - 0x25b0, 0x25b1, 0x25b2, 0x25b3, 0x25b4, 0x25b5, 0x25b6, 0x25b7, - 0x25b8, 0x25b9, 0x25ba, 0x25bb, 0x25bc, 0x25bd, 0x25be, 0x25bf, - 0x25c0, 0x25c1, 0x25c2, 0x25c3, 0x25c4, 0x25c5, 0x25c6, 0x25c7, - 0x25c8, 0x25c9, 0x25ca, 0x25cb, 0x25cc, 0x25cd, 0x25ce, 0x25cf, - 0x25d0, 0x25d1, 0x25d2, 0x25d3, 0x25d4, 0x25d5, 0x25d6, 0x25d7, - 0x25d8, 0x25d9, 0x25da, 0x25db, 0x25dc, 0x25dd, 0x25de, 0x25df, - 0x25e0, 0x25e1, 0x25e2, 0x25e3, 0x25e4, 0x25e5, 0x25e6, 0x25e7, - 0x25e8, 0x25e9, 0x25ea, 0x25eb, 0x25ec, 0x25ed, 0x25ee, 0x25ef, - 0x25f0, 0x25f1, 0x25f2, 0x25f3, 0x25f4, 0x25f5, 0x25f6, 0x25f7, - 0x25f8, 0x25f9, 0x25fa, 0x25fb, 0x25fc, 0x25fd, 0x25fe, 0x25ff, - 0x2600, 0x2601, 0x2602, 0x2603, 0x2604, 0x2605, 0x2606, 0x2607, - 0x2608, 0x2609, 0x260a, 0x260b, 0x260c, 0x260d, 0x260e, 0x260f, - 0x2610, 0x2611, 0x2612, 0x2613, 0x2614, 0x2615, 0x2616, 0x2617, - 0x2618, 0x2619, 0x261a, 0x261b, 0x261c, 0x261d, 0x261e, 0x261f, - 0x2620, 0x2621, 0x2622, 0x2623, 0x2624, 0x2625, 0x2626, 0x2627, - 0x2628, 0x2629, 0x262a, 0x262b, 0x262c, 0x262d, 0x262e, 0x262f, - 0x2630, 0x2631, 0x2632, 0x2633, 0x2634, 0x2635, 0x2636, 0x2637, - 0x2638, 0x2639, 0x263a, 0x263b, 0x263c, 0x263d, 0x263e, 0x263f, - 0x2640, 0x2641, 0x2642, 0x2643, 0x2644, 0x2645, 0x2646, 0x2647, - 0x2648, 0x2649, 0x264a, 0x264b, 0x264c, 0x264d, 0x264e, 0x264f, - 0x2650, 0x2651, 0x2652, 0x2653, 0x2654, 0x2655, 0x2656, 0x2657, - 0x2658, 0x2659, 0x265a, 0x265b, 0x265c, 0x265d, 0x265e, 0x265f, - 0x2660, 0x2661, 0x2662, 0x2663, 0x2664, 0x2665, 0x2666, 0x2667, - 0x2668, 0x2669, 0x266a, 0x266b, 0x266c, 0x266d, 0x266e, 0x266f, - 0x2670, 0x2671, 0x2672, 0x2673, 0x2674, 0x2675, 0x2676, 0x2677, - 0x2678, 0x2679, 0x267a, 0x267b, 0x267c, 0x267d, 0x267e, 0x267f, - 0x2680, 0x2681, 0x2682, 0x2683, 0x2684, 0x2685, 0x2686, 0x2687, - 0x2688, 0x2689, 0x268a, 0x268b, 0x268c, 0x268d, 0x268e, 0x268f, - 0x2690, 0x2691, 0x2692, 0x2693, 0x2694, 0x2695, 0x2696, 0x2697, - 0x2698, 0x2699, 0x269a, 0x269b, 0x269c, 0x269d, 0x269e, 0x269f, - 0x26a0, 0x26a1, 0x26a2, 0x26a3, 0x26a4, 0x26a5, 0x26a6, 0x26a7, - 0x26a8, 0x26a9, 0x26aa, 0x26ab, 0x26ac, 0x26ad, 0x26ae, 0x26af, - 0x26b0, 0x26b1, 0x26b2, 0x26b3, 0x26b4, 0x26b5, 0x26b6, 0x26b7, - 0x26b8, 0x26b9, 0x26ba, 0x26bb, 0x26bc, 0x26bd, 0x26be, 0x26bf, - 0x26c0, 0x26c1, 0x26c2, 0x26c3, 0x26c4, 0x26c5, 0x26c6, 0x26c7, - 0x26c8, 0x26c9, 0x26ca, 0x26cb, 0x26cc, 0x26cd, 0x26ce, 0x26cf, - 0x26d0, 0x26d1, 0x26d2, 0x26d3, 0x26d4, 0x26d5, 0x26d6, 0x26d7, - 0x26d8, 0x26d9, 0x26da, 0x26db, 0x26dc, 0x26dd, 0x26de, 0x26df, - 0x26e0, 0x26e1, 0x26e2, 0x26e3, 0x26e4, 0x26e5, 0x26e6, 0x26e7, - 0x26e8, 0x26e9, 0x26ea, 0x26eb, 0x26ec, 0x26ed, 0x26ee, 0x26ef, - 0x26f0, 0x26f1, 0x26f2, 0x26f3, 0x26f4, 0x26f5, 0x26f6, 0x26f7, - 0x26f8, 0x26f9, 0x26fa, 0x26fb, 0x26fc, 0x26fd, 0x26fe, 0x26ff, - 0x2700, 0x2701, 0x2702, 0x2703, 0x2704, 0x2705, 0x2706, 0x2707, - 0x2708, 0x2709, 0x270a, 0x270b, 0x270c, 0x270d, 0x270e, 0x270f, - 0x2710, 0x2711, 0x2712, 0x2713, 0x2714, 0x2715, 0x2716, 0x2717, - 0x2718, 0x2719, 0x271a, 0x271b, 0x271c, 0x271d, 0x271e, 0x271f, - 0x2720, 0x2721, 0x2722, 0x2723, 0x2724, 0x2725, 0x2726, 0x2727, - 0x2728, 0x2729, 0x272a, 0x272b, 0x272c, 0x272d, 0x272e, 0x272f, - 0x2730, 0x2731, 0x2732, 0x2733, 0x2734, 0x2735, 0x2736, 0x2737, - 0x2738, 0x2739, 0x273a, 0x273b, 0x273c, 0x273d, 0x273e, 0x273f, - 0x2740, 0x2741, 0x2742, 0x2743, 0x2744, 0x2745, 0x2746, 0x2747, - 0x2748, 0x2749, 0x274a, 0x274b, 0x274c, 0x274d, 0x274e, 0x274f, - 0x2750, 0x2751, 0x2752, 0x2753, 0x2754, 0x2755, 0x2756, 0x2757, - 0x2758, 0x2759, 0x275a, 0x275b, 0x275c, 0x275d, 0x275e, 0x275f, - 0x2760, 0x2761, 0x2762, 0x2763, 0x2764, 0x2765, 0x2766, 0x2767, - 0x2768, 0x2769, 0x276a, 0x276b, 0x276c, 0x276d, 0x276e, 0x276f, - 0x2770, 0x2771, 0x2772, 0x2773, 0x2774, 0x2775, 0x2776, 0x2777, - 0x2778, 0x2779, 0x277a, 0x277b, 0x277c, 0x277d, 0x277e, 0x277f, - 0x2780, 0x2781, 0x2782, 0x2783, 0x2784, 0x2785, 0x2786, 0x2787, - 0x2788, 0x2789, 0x278a, 0x278b, 0x278c, 0x278d, 0x278e, 0x278f, - 0x2790, 0x2791, 0x2792, 0x2793, 0x2794, 0x2795, 0x2796, 0x2797, - 0x2798, 0x2799, 0x279a, 0x279b, 0x279c, 0x279d, 0x279e, 0x279f, - 0x27a0, 0x27a1, 0x27a2, 0x27a3, 0x27a4, 0x27a5, 0x27a6, 0x27a7, - 0x27a8, 0x27a9, 0x27aa, 0x27ab, 0x27ac, 0x27ad, 0x27ae, 0x27af, - 0x27b0, 0x27b1, 0x27b2, 0x27b3, 0x27b4, 0x27b5, 0x27b6, 0x27b7, - 0x27b8, 0x27b9, 0x27ba, 0x27bb, 0x27bc, 0x27bd, 0x27be, 0x27bf, - 0x27c0, 0x27c1, 0x27c2, 0x27c3, 0x27c4, 0x27c5, 0x27c6, 0x27c7, - 0x27c8, 0x27c9, 0x27ca, 0x27cb, 0x27cc, 0x27cd, 0x27ce, 0x27cf, - 0x27d0, 0x27d1, 0x27d2, 0x27d3, 0x27d4, 0x27d5, 0x27d6, 0x27d7, - 0x27d8, 0x27d9, 0x27da, 0x27db, 0x27dc, 0x27dd, 0x27de, 0x27df, - 0x27e0, 0x27e1, 0x27e2, 0x27e3, 0x27e4, 0x27e5, 0x27e6, 0x27e7, - 0x27e8, 0x27e9, 0x27ea, 0x27eb, 0x27ec, 0x27ed, 0x27ee, 0x27ef, - 0x27f0, 0x27f1, 0x27f2, 0x27f3, 0x27f4, 0x27f5, 0x27f6, 0x27f7, - 0x27f8, 0x27f9, 0x27fa, 0x27fb, 0x27fc, 0x27fd, 0x27fe, 0x27ff, - 0x2800, 0x2801, 0x2802, 0x2803, 0x2804, 0x2805, 0x2806, 0x2807, - 0x2808, 0x2809, 0x280a, 0x280b, 0x280c, 0x280d, 0x280e, 0x280f, - 0x2810, 0x2811, 0x2812, 0x2813, 0x2814, 0x2815, 0x2816, 0x2817, - 0x2818, 0x2819, 0x281a, 0x281b, 0x281c, 0x281d, 0x281e, 0x281f, - 0x2820, 0x2821, 0x2822, 0x2823, 0x2824, 0x2825, 0x2826, 0x2827, - 0x2828, 0x2829, 0x282a, 0x282b, 0x282c, 0x282d, 0x282e, 0x282f, - 0x2830, 0x2831, 0x2832, 0x2833, 0x2834, 0x2835, 0x2836, 0x2837, - 0x2838, 0x2839, 0x283a, 0x283b, 0x283c, 0x283d, 0x283e, 0x283f, - 0x2840, 0x2841, 0x2842, 0x2843, 0x2844, 0x2845, 0x2846, 0x2847, - 0x2848, 0x2849, 0x284a, 0x284b, 0x284c, 0x284d, 0x284e, 0x284f, - 0x2850, 0x2851, 0x2852, 0x2853, 0x2854, 0x2855, 0x2856, 0x2857, - 0x2858, 0x2859, 0x285a, 0x285b, 0x285c, 0x285d, 0x285e, 0x285f, - 0x2860, 0x2861, 0x2862, 0x2863, 0x2864, 0x2865, 0x2866, 0x2867, - 0x2868, 0x2869, 0x286a, 0x286b, 0x286c, 0x286d, 0x286e, 0x286f, - 0x2870, 0x2871, 0x2872, 0x2873, 0x2874, 0x2875, 0x2876, 0x2877, - 0x2878, 0x2879, 0x287a, 0x287b, 0x287c, 0x287d, 0x287e, 0x287f, - 0x2880, 0x2881, 0x2882, 0x2883, 0x2884, 0x2885, 0x2886, 0x2887, - 0x2888, 0x2889, 0x288a, 0x288b, 0x288c, 0x288d, 0x288e, 0x288f, - 0x2890, 0x2891, 0x2892, 0x2893, 0x2894, 0x2895, 0x2896, 0x2897, - 0x2898, 0x2899, 0x289a, 0x289b, 0x289c, 0x289d, 0x289e, 0x289f, - 0x28a0, 0x28a1, 0x28a2, 0x28a3, 0x28a4, 0x28a5, 0x28a6, 0x28a7, - 0x28a8, 0x28a9, 0x28aa, 0x28ab, 0x28ac, 0x28ad, 0x28ae, 0x28af, - 0x28b0, 0x28b1, 0x28b2, 0x28b3, 0x28b4, 0x28b5, 0x28b6, 0x28b7, - 0x28b8, 0x28b9, 0x28ba, 0x28bb, 0x28bc, 0x28bd, 0x28be, 0x28bf, - 0x28c0, 0x28c1, 0x28c2, 0x28c3, 0x28c4, 0x28c5, 0x28c6, 0x28c7, - 0x28c8, 0x28c9, 0x28ca, 0x28cb, 0x28cc, 0x28cd, 0x28ce, 0x28cf, - 0x28d0, 0x28d1, 0x28d2, 0x28d3, 0x28d4, 0x28d5, 0x28d6, 0x28d7, - 0x28d8, 0x28d9, 0x28da, 0x28db, 0x28dc, 0x28dd, 0x28de, 0x28df, - 0x28e0, 0x28e1, 0x28e2, 0x28e3, 0x28e4, 0x28e5, 0x28e6, 0x28e7, - 0x28e8, 0x28e9, 0x28ea, 0x28eb, 0x28ec, 0x28ed, 0x28ee, 0x28ef, - 0x28f0, 0x28f1, 0x28f2, 0x28f3, 0x28f4, 0x28f5, 0x28f6, 0x28f7, - 0x28f8, 0x28f9, 0x28fa, 0x28fb, 0x28fc, 0x28fd, 0x28fe, 0x28ff, - 0x2900, 0x2901, 0x2902, 0x2903, 0x2904, 0x2905, 0x2906, 0x2907, - 0x2908, 0x2909, 0x290a, 0x290b, 0x290c, 0x290d, 0x290e, 0x290f, - 0x2910, 0x2911, 0x2912, 0x2913, 0x2914, 0x2915, 0x2916, 0x2917, - 0x2918, 0x2919, 0x291a, 0x291b, 0x291c, 0x291d, 0x291e, 0x291f, - 0x2920, 0x2921, 0x2922, 0x2923, 0x2924, 0x2925, 0x2926, 0x2927, - 0x2928, 0x2929, 0x292a, 0x292b, 0x292c, 0x292d, 0x292e, 0x292f, - 0x2930, 0x2931, 0x2932, 0x2933, 0x2934, 0x2935, 0x2936, 0x2937, - 0x2938, 0x2939, 0x293a, 0x293b, 0x293c, 0x293d, 0x293e, 0x293f, - 0x2940, 0x2941, 0x2942, 0x2943, 0x2944, 0x2945, 0x2946, 0x2947, - 0x2948, 0x2949, 0x294a, 0x294b, 0x294c, 0x294d, 0x294e, 0x294f, - 0x2950, 0x2951, 0x2952, 0x2953, 0x2954, 0x2955, 0x2956, 0x2957, - 0x2958, 0x2959, 0x295a, 0x295b, 0x295c, 0x295d, 0x295e, 0x295f, - 0x2960, 0x2961, 0x2962, 0x2963, 0x2964, 0x2965, 0x2966, 0x2967, - 0x2968, 0x2969, 0x296a, 0x296b, 0x296c, 0x296d, 0x296e, 0x296f, - 0x2970, 0x2971, 0x2972, 0x2973, 0x2974, 0x2975, 0x2976, 0x2977, - 0x2978, 0x2979, 0x297a, 0x297b, 0x297c, 0x297d, 0x297e, 0x297f, - 0x2980, 0x2981, 0x2982, 0x2983, 0x2984, 0x2985, 0x2986, 0x2987, - 0x2988, 0x2989, 0x298a, 0x298b, 0x298c, 0x298d, 0x298e, 0x298f, - 0x2990, 0x2991, 0x2992, 0x2993, 0x2994, 0x2995, 0x2996, 0x2997, - 0x2998, 0x2999, 0x299a, 0x299b, 0x299c, 0x299d, 0x299e, 0x299f, - 0x29a0, 0x29a1, 0x29a2, 0x29a3, 0x29a4, 0x29a5, 0x29a6, 0x29a7, - 0x29a8, 0x29a9, 0x29aa, 0x29ab, 0x29ac, 0x29ad, 0x29ae, 0x29af, - 0x29b0, 0x29b1, 0x29b2, 0x29b3, 0x29b4, 0x29b5, 0x29b6, 0x29b7, - 0x29b8, 0x29b9, 0x29ba, 0x29bb, 0x29bc, 0x29bd, 0x29be, 0x29bf, - 0x29c0, 0x29c1, 0x29c2, 0x29c3, 0x29c4, 0x29c5, 0x29c6, 0x29c7, - 0x29c8, 0x29c9, 0x29ca, 0x29cb, 0x29cc, 0x29cd, 0x29ce, 0x29cf, - 0x29d0, 0x29d1, 0x29d2, 0x29d3, 0x29d4, 0x29d5, 0x29d6, 0x29d7, - 0x29d8, 0x29d9, 0x29da, 0x29db, 0x29dc, 0x29dd, 0x29de, 0x29df, - 0x29e0, 0x29e1, 0x29e2, 0x29e3, 0x29e4, 0x29e5, 0x29e6, 0x29e7, - 0x29e8, 0x29e9, 0x29ea, 0x29eb, 0x29ec, 0x29ed, 0x29ee, 0x29ef, - 0x29f0, 0x29f1, 0x29f2, 0x29f3, 0x29f4, 0x29f5, 0x29f6, 0x29f7, - 0x29f8, 0x29f9, 0x29fa, 0x29fb, 0x29fc, 0x29fd, 0x29fe, 0x29ff, - 0x2a00, 0x2a01, 0x2a02, 0x2a03, 0x2a04, 0x2a05, 0x2a06, 0x2a07, - 0x2a08, 0x2a09, 0x2a0a, 0x2a0b, 0x2a0c, 0x2a0d, 0x2a0e, 0x2a0f, - 0x2a10, 0x2a11, 0x2a12, 0x2a13, 0x2a14, 0x2a15, 0x2a16, 0x2a17, - 0x2a18, 0x2a19, 0x2a1a, 0x2a1b, 0x2a1c, 0x2a1d, 0x2a1e, 0x2a1f, - 0x2a20, 0x2a21, 0x2a22, 0x2a23, 0x2a24, 0x2a25, 0x2a26, 0x2a27, - 0x2a28, 0x2a29, 0x2a2a, 0x2a2b, 0x2a2c, 0x2a2d, 0x2a2e, 0x2a2f, - 0x2a30, 0x2a31, 0x2a32, 0x2a33, 0x2a34, 0x2a35, 0x2a36, 0x2a37, - 0x2a38, 0x2a39, 0x2a3a, 0x2a3b, 0x2a3c, 0x2a3d, 0x2a3e, 0x2a3f, - 0x2a40, 0x2a41, 0x2a42, 0x2a43, 0x2a44, 0x2a45, 0x2a46, 0x2a47, - 0x2a48, 0x2a49, 0x2a4a, 0x2a4b, 0x2a4c, 0x2a4d, 0x2a4e, 0x2a4f, - 0x2a50, 0x2a51, 0x2a52, 0x2a53, 0x2a54, 0x2a55, 0x2a56, 0x2a57, - 0x2a58, 0x2a59, 0x2a5a, 0x2a5b, 0x2a5c, 0x2a5d, 0x2a5e, 0x2a5f, - 0x2a60, 0x2a61, 0x2a62, 0x2a63, 0x2a64, 0x2a65, 0x2a66, 0x2a67, - 0x2a68, 0x2a69, 0x2a6a, 0x2a6b, 0x2a6c, 0x2a6d, 0x2a6e, 0x2a6f, - 0x2a70, 0x2a71, 0x2a72, 0x2a73, 0x2a74, 0x2a75, 0x2a76, 0x2a77, - 0x2a78, 0x2a79, 0x2a7a, 0x2a7b, 0x2a7c, 0x2a7d, 0x2a7e, 0x2a7f, - 0x2a80, 0x2a81, 0x2a82, 0x2a83, 0x2a84, 0x2a85, 0x2a86, 0x2a87, - 0x2a88, 0x2a89, 0x2a8a, 0x2a8b, 0x2a8c, 0x2a8d, 0x2a8e, 0x2a8f, - 0x2a90, 0x2a91, 0x2a92, 0x2a93, 0x2a94, 0x2a95, 0x2a96, 0x2a97, - 0x2a98, 0x2a99, 0x2a9a, 0x2a9b, 0x2a9c, 0x2a9d, 0x2a9e, 0x2a9f, - 0x2aa0, 0x2aa1, 0x2aa2, 0x2aa3, 0x2aa4, 0x2aa5, 0x2aa6, 0x2aa7, - 0x2aa8, 0x2aa9, 0x2aaa, 0x2aab, 0x2aac, 0x2aad, 0x2aae, 0x2aaf, - 0x2ab0, 0x2ab1, 0x2ab2, 0x2ab3, 0x2ab4, 0x2ab5, 0x2ab6, 0x2ab7, - 0x2ab8, 0x2ab9, 0x2aba, 0x2abb, 0x2abc, 0x2abd, 0x2abe, 0x2abf, - 0x2ac0, 0x2ac1, 0x2ac2, 0x2ac3, 0x2ac4, 0x2ac5, 0x2ac6, 0x2ac7, - 0x2ac8, 0x2ac9, 0x2aca, 0x2acb, 0x2acc, 0x2acd, 0x2ace, 0x2acf, - 0x2ad0, 0x2ad1, 0x2ad2, 0x2ad3, 0x2ad4, 0x2ad5, 0x2ad6, 0x2ad7, - 0x2ad8, 0x2ad9, 0x2ada, 0x2adb, 0x2adc, 0x2add, 0x2ade, 0x2adf, - 0x2ae0, 0x2ae1, 0x2ae2, 0x2ae3, 0x2ae4, 0x2ae5, 0x2ae6, 0x2ae7, - 0x2ae8, 0x2ae9, 0x2aea, 0x2aeb, 0x2aec, 0x2aed, 0x2aee, 0x2aef, - 0x2af0, 0x2af1, 0x2af2, 0x2af3, 0x2af4, 0x2af5, 0x2af6, 0x2af7, - 0x2af8, 0x2af9, 0x2afa, 0x2afb, 0x2afc, 0x2afd, 0x2afe, 0x2aff, - 0x2b00, 0x2b01, 0x2b02, 0x2b03, 0x2b04, 0x2b05, 0x2b06, 0x2b07, - 0x2b08, 0x2b09, 0x2b0a, 0x2b0b, 0x2b0c, 0x2b0d, 0x2b0e, 0x2b0f, - 0x2b10, 0x2b11, 0x2b12, 0x2b13, 0x2b14, 0x2b15, 0x2b16, 0x2b17, - 0x2b18, 0x2b19, 0x2b1a, 0x2b1b, 0x2b1c, 0x2b1d, 0x2b1e, 0x2b1f, - 0x2b20, 0x2b21, 0x2b22, 0x2b23, 0x2b24, 0x2b25, 0x2b26, 0x2b27, - 0x2b28, 0x2b29, 0x2b2a, 0x2b2b, 0x2b2c, 0x2b2d, 0x2b2e, 0x2b2f, - 0x2b30, 0x2b31, 0x2b32, 0x2b33, 0x2b34, 0x2b35, 0x2b36, 0x2b37, - 0x2b38, 0x2b39, 0x2b3a, 0x2b3b, 0x2b3c, 0x2b3d, 0x2b3e, 0x2b3f, - 0x2b40, 0x2b41, 0x2b42, 0x2b43, 0x2b44, 0x2b45, 0x2b46, 0x2b47, - 0x2b48, 0x2b49, 0x2b4a, 0x2b4b, 0x2b4c, 0x2b4d, 0x2b4e, 0x2b4f, - 0x2b50, 0x2b51, 0x2b52, 0x2b53, 0x2b54, 0x2b55, 0x2b56, 0x2b57, - 0x2b58, 0x2b59, 0x2b5a, 0x2b5b, 0x2b5c, 0x2b5d, 0x2b5e, 0x2b5f, - 0x2b60, 0x2b61, 0x2b62, 0x2b63, 0x2b64, 0x2b65, 0x2b66, 0x2b67, - 0x2b68, 0x2b69, 0x2b6a, 0x2b6b, 0x2b6c, 0x2b6d, 0x2b6e, 0x2b6f, - 0x2b70, 0x2b71, 0x2b72, 0x2b73, 0x2b74, 0x2b75, 0x2b76, 0x2b77, - 0x2b78, 0x2b79, 0x2b7a, 0x2b7b, 0x2b7c, 0x2b7d, 0x2b7e, 0x2b7f, - 0x2b80, 0x2b81, 0x2b82, 0x2b83, 0x2b84, 0x2b85, 0x2b86, 0x2b87, - 0x2b88, 0x2b89, 0x2b8a, 0x2b8b, 0x2b8c, 0x2b8d, 0x2b8e, 0x2b8f, - 0x2b90, 0x2b91, 0x2b92, 0x2b93, 0x2b94, 0x2b95, 0x2b96, 0x2b97, - 0x2b98, 0x2b99, 0x2b9a, 0x2b9b, 0x2b9c, 0x2b9d, 0x2b9e, 0x2b9f, - 0x2ba0, 0x2ba1, 0x2ba2, 0x2ba3, 0x2ba4, 0x2ba5, 0x2ba6, 0x2ba7, - 0x2ba8, 0x2ba9, 0x2baa, 0x2bab, 0x2bac, 0x2bad, 0x2bae, 0x2baf, - 0x2bb0, 0x2bb1, 0x2bb2, 0x2bb3, 0x2bb4, 0x2bb5, 0x2bb6, 0x2bb7, - 0x2bb8, 0x2bb9, 0x2bba, 0x2bbb, 0x2bbc, 0x2bbd, 0x2bbe, 0x2bbf, - 0x2bc0, 0x2bc1, 0x2bc2, 0x2bc3, 0x2bc4, 0x2bc5, 0x2bc6, 0x2bc7, - 0x2bc8, 0x2bc9, 0x2bca, 0x2bcb, 0x2bcc, 0x2bcd, 0x2bce, 0x2bcf, - 0x2bd0, 0x2bd1, 0x2bd2, 0x2bd3, 0x2bd4, 0x2bd5, 0x2bd6, 0x2bd7, - 0x2bd8, 0x2bd9, 0x2bda, 0x2bdb, 0x2bdc, 0x2bdd, 0x2bde, 0x2bdf, - 0x2be0, 0x2be1, 0x2be2, 0x2be3, 0x2be4, 0x2be5, 0x2be6, 0x2be7, - 0x2be8, 0x2be9, 0x2bea, 0x2beb, 0x2bec, 0x2bed, 0x2bee, 0x2bef, - 0x2bf0, 0x2bf1, 0x2bf2, 0x2bf3, 0x2bf4, 0x2bf5, 0x2bf6, 0x2bf7, - 0x2bf8, 0x2bf9, 0x2bfa, 0x2bfb, 0x2bfc, 0x2bfd, 0x2bfe, 0x2bff, - 0x2c00, 0x2c01, 0x2c02, 0x2c03, 0x2c04, 0x2c05, 0x2c06, 0x2c07, - 0x2c08, 0x2c09, 0x2c0a, 0x2c0b, 0x2c0c, 0x2c0d, 0x2c0e, 0x2c0f, - 0x2c10, 0x2c11, 0x2c12, 0x2c13, 0x2c14, 0x2c15, 0x2c16, 0x2c17, - 0x2c18, 0x2c19, 0x2c1a, 0x2c1b, 0x2c1c, 0x2c1d, 0x2c1e, 0x2c1f, - 0x2c20, 0x2c21, 0x2c22, 0x2c23, 0x2c24, 0x2c25, 0x2c26, 0x2c27, - 0x2c28, 0x2c29, 0x2c2a, 0x2c2b, 0x2c2c, 0x2c2d, 0x2c2e, 0x2c2f, - 0x2c30, 0x2c31, 0x2c32, 0x2c33, 0x2c34, 0x2c35, 0x2c36, 0x2c37, - 0x2c38, 0x2c39, 0x2c3a, 0x2c3b, 0x2c3c, 0x2c3d, 0x2c3e, 0x2c3f, - 0x2c40, 0x2c41, 0x2c42, 0x2c43, 0x2c44, 0x2c45, 0x2c46, 0x2c47, - 0x2c48, 0x2c49, 0x2c4a, 0x2c4b, 0x2c4c, 0x2c4d, 0x2c4e, 0x2c4f, - 0x2c50, 0x2c51, 0x2c52, 0x2c53, 0x2c54, 0x2c55, 0x2c56, 0x2c57, - 0x2c58, 0x2c59, 0x2c5a, 0x2c5b, 0x2c5c, 0x2c5d, 0x2c5e, 0x2c5f, - 0x2c60, 0x2c61, 0x2c62, 0x2c63, 0x2c64, 0x2c65, 0x2c66, 0x2c67, - 0x2c68, 0x2c69, 0x2c6a, 0x2c6b, 0x2c6c, 0x2c6d, 0x2c6e, 0x2c6f, - 0x2c70, 0x2c71, 0x2c72, 0x2c73, 0x2c74, 0x2c75, 0x2c76, 0x2c77, - 0x2c78, 0x2c79, 0x2c7a, 0x2c7b, 0x2c7c, 0x2c7d, 0x2c7e, 0x2c7f, - 0x2c80, 0x2c81, 0x2c82, 0x2c83, 0x2c84, 0x2c85, 0x2c86, 0x2c87, - 0x2c88, 0x2c89, 0x2c8a, 0x2c8b, 0x2c8c, 0x2c8d, 0x2c8e, 0x2c8f, - 0x2c90, 0x2c91, 0x2c92, 0x2c93, 0x2c94, 0x2c95, 0x2c96, 0x2c97, - 0x2c98, 0x2c99, 0x2c9a, 0x2c9b, 0x2c9c, 0x2c9d, 0x2c9e, 0x2c9f, - 0x2ca0, 0x2ca1, 0x2ca2, 0x2ca3, 0x2ca4, 0x2ca5, 0x2ca6, 0x2ca7, - 0x2ca8, 0x2ca9, 0x2caa, 0x2cab, 0x2cac, 0x2cad, 0x2cae, 0x2caf, - 0x2cb0, 0x2cb1, 0x2cb2, 0x2cb3, 0x2cb4, 0x2cb5, 0x2cb6, 0x2cb7, - 0x2cb8, 0x2cb9, 0x2cba, 0x2cbb, 0x2cbc, 0x2cbd, 0x2cbe, 0x2cbf, - 0x2cc0, 0x2cc1, 0x2cc2, 0x2cc3, 0x2cc4, 0x2cc5, 0x2cc6, 0x2cc7, - 0x2cc8, 0x2cc9, 0x2cca, 0x2ccb, 0x2ccc, 0x2ccd, 0x2cce, 0x2ccf, - 0x2cd0, 0x2cd1, 0x2cd2, 0x2cd3, 0x2cd4, 0x2cd5, 0x2cd6, 0x2cd7, - 0x2cd8, 0x2cd9, 0x2cda, 0x2cdb, 0x2cdc, 0x2cdd, 0x2cde, 0x2cdf, - 0x2ce0, 0x2ce1, 0x2ce2, 0x2ce3, 0x2ce4, 0x2ce5, 0x2ce6, 0x2ce7, - 0x2ce8, 0x2ce9, 0x2cea, 0x2ceb, 0x2cec, 0x2ced, 0x2cee, 0x2cef, - 0x2cf0, 0x2cf1, 0x2cf2, 0x2cf3, 0x2cf4, 0x2cf5, 0x2cf6, 0x2cf7, - 0x2cf8, 0x2cf9, 0x2cfa, 0x2cfb, 0x2cfc, 0x2cfd, 0x2cfe, 0x2cff, - 0x2d00, 0x2d01, 0x2d02, 0x2d03, 0x2d04, 0x2d05, 0x2d06, 0x2d07, - 0x2d08, 0x2d09, 0x2d0a, 0x2d0b, 0x2d0c, 0x2d0d, 0x2d0e, 0x2d0f, - 0x2d10, 0x2d11, 0x2d12, 0x2d13, 0x2d14, 0x2d15, 0x2d16, 0x2d17, - 0x2d18, 0x2d19, 0x2d1a, 0x2d1b, 0x2d1c, 0x2d1d, 0x2d1e, 0x2d1f, - 0x2d20, 0x2d21, 0x2d22, 0x2d23, 0x2d24, 0x2d25, 0x2d26, 0x2d27, - 0x2d28, 0x2d29, 0x2d2a, 0x2d2b, 0x2d2c, 0x2d2d, 0x2d2e, 0x2d2f, - 0x2d30, 0x2d31, 0x2d32, 0x2d33, 0x2d34, 0x2d35, 0x2d36, 0x2d37, - 0x2d38, 0x2d39, 0x2d3a, 0x2d3b, 0x2d3c, 0x2d3d, 0x2d3e, 0x2d3f, - 0x2d40, 0x2d41, 0x2d42, 0x2d43, 0x2d44, 0x2d45, 0x2d46, 0x2d47, - 0x2d48, 0x2d49, 0x2d4a, 0x2d4b, 0x2d4c, 0x2d4d, 0x2d4e, 0x2d4f, - 0x2d50, 0x2d51, 0x2d52, 0x2d53, 0x2d54, 0x2d55, 0x2d56, 0x2d57, - 0x2d58, 0x2d59, 0x2d5a, 0x2d5b, 0x2d5c, 0x2d5d, 0x2d5e, 0x2d5f, - 0x2d60, 0x2d61, 0x2d62, 0x2d63, 0x2d64, 0x2d65, 0x2d66, 0x2d67, - 0x2d68, 0x2d69, 0x2d6a, 0x2d6b, 0x2d6c, 0x2d6d, 0x2d6e, 0x2d6f, - 0x2d70, 0x2d71, 0x2d72, 0x2d73, 0x2d74, 0x2d75, 0x2d76, 0x2d77, - 0x2d78, 0x2d79, 0x2d7a, 0x2d7b, 0x2d7c, 0x2d7d, 0x2d7e, 0x2d7f, - 0x2d80, 0x2d81, 0x2d82, 0x2d83, 0x2d84, 0x2d85, 0x2d86, 0x2d87, - 0x2d88, 0x2d89, 0x2d8a, 0x2d8b, 0x2d8c, 0x2d8d, 0x2d8e, 0x2d8f, - 0x2d90, 0x2d91, 0x2d92, 0x2d93, 0x2d94, 0x2d95, 0x2d96, 0x2d97, - 0x2d98, 0x2d99, 0x2d9a, 0x2d9b, 0x2d9c, 0x2d9d, 0x2d9e, 0x2d9f, - 0x2da0, 0x2da1, 0x2da2, 0x2da3, 0x2da4, 0x2da5, 0x2da6, 0x2da7, - 0x2da8, 0x2da9, 0x2daa, 0x2dab, 0x2dac, 0x2dad, 0x2dae, 0x2daf, - 0x2db0, 0x2db1, 0x2db2, 0x2db3, 0x2db4, 0x2db5, 0x2db6, 0x2db7, - 0x2db8, 0x2db9, 0x2dba, 0x2dbb, 0x2dbc, 0x2dbd, 0x2dbe, 0x2dbf, - 0x2dc0, 0x2dc1, 0x2dc2, 0x2dc3, 0x2dc4, 0x2dc5, 0x2dc6, 0x2dc7, - 0x2dc8, 0x2dc9, 0x2dca, 0x2dcb, 0x2dcc, 0x2dcd, 0x2dce, 0x2dcf, - 0x2dd0, 0x2dd1, 0x2dd2, 0x2dd3, 0x2dd4, 0x2dd5, 0x2dd6, 0x2dd7, - 0x2dd8, 0x2dd9, 0x2dda, 0x2ddb, 0x2ddc, 0x2ddd, 0x2dde, 0x2ddf, - 0x2de0, 0x2de1, 0x2de2, 0x2de3, 0x2de4, 0x2de5, 0x2de6, 0x2de7, - 0x2de8, 0x2de9, 0x2dea, 0x2deb, 0x2dec, 0x2ded, 0x2dee, 0x2def, - 0x2df0, 0x2df1, 0x2df2, 0x2df3, 0x2df4, 0x2df5, 0x2df6, 0x2df7, - 0x2df8, 0x2df9, 0x2dfa, 0x2dfb, 0x2dfc, 0x2dfd, 0x2dfe, 0x2dff, - 0x2e00, 0x2e01, 0x2e02, 0x2e03, 0x2e04, 0x2e05, 0x2e06, 0x2e07, - 0x2e08, 0x2e09, 0x2e0a, 0x2e0b, 0x2e0c, 0x2e0d, 0x2e0e, 0x2e0f, - 0x2e10, 0x2e11, 0x2e12, 0x2e13, 0x2e14, 0x2e15, 0x2e16, 0x2e17, - 0x2e18, 0x2e19, 0x2e1a, 0x2e1b, 0x2e1c, 0x2e1d, 0x2e1e, 0x2e1f, - 0x2e20, 0x2e21, 0x2e22, 0x2e23, 0x2e24, 0x2e25, 0x2e26, 0x2e27, - 0x2e28, 0x2e29, 0x2e2a, 0x2e2b, 0x2e2c, 0x2e2d, 0x2e2e, 0x2e2f, - 0x2e30, 0x2e31, 0x2e32, 0x2e33, 0x2e34, 0x2e35, 0x2e36, 0x2e37, - 0x2e38, 0x2e39, 0x2e3a, 0x2e3b, 0x2e3c, 0x2e3d, 0x2e3e, 0x2e3f, - 0x2e40, 0x2e41, 0x2e42, 0x2e43, 0x2e44, 0x2e45, 0x2e46, 0x2e47, - 0x2e48, 0x2e49, 0x2e4a, 0x2e4b, 0x2e4c, 0x2e4d, 0x2e4e, 0x2e4f, - 0x2e50, 0x2e51, 0x2e52, 0x2e53, 0x2e54, 0x2e55, 0x2e56, 0x2e57, - 0x2e58, 0x2e59, 0x2e5a, 0x2e5b, 0x2e5c, 0x2e5d, 0x2e5e, 0x2e5f, - 0x2e60, 0x2e61, 0x2e62, 0x2e63, 0x2e64, 0x2e65, 0x2e66, 0x2e67, - 0x2e68, 0x2e69, 0x2e6a, 0x2e6b, 0x2e6c, 0x2e6d, 0x2e6e, 0x2e6f, - 0x2e70, 0x2e71, 0x2e72, 0x2e73, 0x2e74, 0x2e75, 0x2e76, 0x2e77, - 0x2e78, 0x2e79, 0x2e7a, 0x2e7b, 0x2e7c, 0x2e7d, 0x2e7e, 0x2e7f, - 0x2e80, 0x2e81, 0x2e82, 0x2e83, 0x2e84, 0x2e85, 0x2e86, 0x2e87, - 0x2e88, 0x2e89, 0x2e8a, 0x2e8b, 0x2e8c, 0x2e8d, 0x2e8e, 0x2e8f, - 0x2e90, 0x2e91, 0x2e92, 0x2e93, 0x2e94, 0x2e95, 0x2e96, 0x2e97, - 0x2e98, 0x2e99, 0x2e9a, 0x2e9b, 0x2e9c, 0x2e9d, 0x2e9e, 0x2e9f, - 0x2ea0, 0x2ea1, 0x2ea2, 0x2ea3, 0x2ea4, 0x2ea5, 0x2ea6, 0x2ea7, - 0x2ea8, 0x2ea9, 0x2eaa, 0x2eab, 0x2eac, 0x2ead, 0x2eae, 0x2eaf, - 0x2eb0, 0x2eb1, 0x2eb2, 0x2eb3, 0x2eb4, 0x2eb5, 0x2eb6, 0x2eb7, - 0x2eb8, 0x2eb9, 0x2eba, 0x2ebb, 0x2ebc, 0x2ebd, 0x2ebe, 0x2ebf, - 0x2ec0, 0x2ec1, 0x2ec2, 0x2ec3, 0x2ec4, 0x2ec5, 0x2ec6, 0x2ec7, - 0x2ec8, 0x2ec9, 0x2eca, 0x2ecb, 0x2ecc, 0x2ecd, 0x2ece, 0x2ecf, - 0x2ed0, 0x2ed1, 0x2ed2, 0x2ed3, 0x2ed4, 0x2ed5, 0x2ed6, 0x2ed7, - 0x2ed8, 0x2ed9, 0x2eda, 0x2edb, 0x2edc, 0x2edd, 0x2ede, 0x2edf, - 0x2ee0, 0x2ee1, 0x2ee2, 0x2ee3, 0x2ee4, 0x2ee5, 0x2ee6, 0x2ee7, - 0x2ee8, 0x2ee9, 0x2eea, 0x2eeb, 0x2eec, 0x2eed, 0x2eee, 0x2eef, - 0x2ef0, 0x2ef1, 0x2ef2, 0x2ef3, 0x2ef4, 0x2ef5, 0x2ef6, 0x2ef7, - 0x2ef8, 0x2ef9, 0x2efa, 0x2efb, 0x2efc, 0x2efd, 0x2efe, 0x2eff, - 0x2f00, 0x2f01, 0x2f02, 0x2f03, 0x2f04, 0x2f05, 0x2f06, 0x2f07, - 0x2f08, 0x2f09, 0x2f0a, 0x2f0b, 0x2f0c, 0x2f0d, 0x2f0e, 0x2f0f, - 0x2f10, 0x2f11, 0x2f12, 0x2f13, 0x2f14, 0x2f15, 0x2f16, 0x2f17, - 0x2f18, 0x2f19, 0x2f1a, 0x2f1b, 0x2f1c, 0x2f1d, 0x2f1e, 0x2f1f, - 0x2f20, 0x2f21, 0x2f22, 0x2f23, 0x2f24, 0x2f25, 0x2f26, 0x2f27, - 0x2f28, 0x2f29, 0x2f2a, 0x2f2b, 0x2f2c, 0x2f2d, 0x2f2e, 0x2f2f, - 0x2f30, 0x2f31, 0x2f32, 0x2f33, 0x2f34, 0x2f35, 0x2f36, 0x2f37, - 0x2f38, 0x2f39, 0x2f3a, 0x2f3b, 0x2f3c, 0x2f3d, 0x2f3e, 0x2f3f, - 0x2f40, 0x2f41, 0x2f42, 0x2f43, 0x2f44, 0x2f45, 0x2f46, 0x2f47, - 0x2f48, 0x2f49, 0x2f4a, 0x2f4b, 0x2f4c, 0x2f4d, 0x2f4e, 0x2f4f, - 0x2f50, 0x2f51, 0x2f52, 0x2f53, 0x2f54, 0x2f55, 0x2f56, 0x2f57, - 0x2f58, 0x2f59, 0x2f5a, 0x2f5b, 0x2f5c, 0x2f5d, 0x2f5e, 0x2f5f, - 0x2f60, 0x2f61, 0x2f62, 0x2f63, 0x2f64, 0x2f65, 0x2f66, 0x2f67, - 0x2f68, 0x2f69, 0x2f6a, 0x2f6b, 0x2f6c, 0x2f6d, 0x2f6e, 0x2f6f, - 0x2f70, 0x2f71, 0x2f72, 0x2f73, 0x2f74, 0x2f75, 0x2f76, 0x2f77, - 0x2f78, 0x2f79, 0x2f7a, 0x2f7b, 0x2f7c, 0x2f7d, 0x2f7e, 0x2f7f, - 0x2f80, 0x2f81, 0x2f82, 0x2f83, 0x2f84, 0x2f85, 0x2f86, 0x2f87, - 0x2f88, 0x2f89, 0x2f8a, 0x2f8b, 0x2f8c, 0x2f8d, 0x2f8e, 0x2f8f, - 0x2f90, 0x2f91, 0x2f92, 0x2f93, 0x2f94, 0x2f95, 0x2f96, 0x2f97, - 0x2f98, 0x2f99, 0x2f9a, 0x2f9b, 0x2f9c, 0x2f9d, 0x2f9e, 0x2f9f, - 0x2fa0, 0x2fa1, 0x2fa2, 0x2fa3, 0x2fa4, 0x2fa5, 0x2fa6, 0x2fa7, - 0x2fa8, 0x2fa9, 0x2faa, 0x2fab, 0x2fac, 0x2fad, 0x2fae, 0x2faf, - 0x2fb0, 0x2fb1, 0x2fb2, 0x2fb3, 0x2fb4, 0x2fb5, 0x2fb6, 0x2fb7, - 0x2fb8, 0x2fb9, 0x2fba, 0x2fbb, 0x2fbc, 0x2fbd, 0x2fbe, 0x2fbf, - 0x2fc0, 0x2fc1, 0x2fc2, 0x2fc3, 0x2fc4, 0x2fc5, 0x2fc6, 0x2fc7, - 0x2fc8, 0x2fc9, 0x2fca, 0x2fcb, 0x2fcc, 0x2fcd, 0x2fce, 0x2fcf, - 0x2fd0, 0x2fd1, 0x2fd2, 0x2fd3, 0x2fd4, 0x2fd5, 0x2fd6, 0x2fd7, - 0x2fd8, 0x2fd9, 0x2fda, 0x2fdb, 0x2fdc, 0x2fdd, 0x2fde, 0x2fdf, - 0x2fe0, 0x2fe1, 0x2fe2, 0x2fe3, 0x2fe4, 0x2fe5, 0x2fe6, 0x2fe7, - 0x2fe8, 0x2fe9, 0x2fea, 0x2feb, 0x2fec, 0x2fed, 0x2fee, 0x2fef, - 0x2ff0, 0x2ff1, 0x2ff2, 0x2ff3, 0x2ff4, 0x2ff5, 0x2ff6, 0x2ff7, - 0x2ff8, 0x2ff9, 0x2ffa, 0x2ffb, 0x2ffc, 0x2ffd, 0x2ffe, 0x2fff, - 0x3000, 0x3001, 0x3002, 0x3003, 0x3004, 0x3005, 0x3006, 0x3007, - 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e, 0x300f, - 0x3010, 0x3011, 0x3012, 0x3013, 0x3014, 0x3015, 0x3016, 0x3017, - 0x3018, 0x3019, 0x301a, 0x301b, 0x301c, 0x301d, 0x301e, 0x301f, - 0x3020, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026, 0x3027, - 0x3028, 0x3029, 0x302a, 0x302b, 0x302c, 0x302d, 0x302e, 0x302f, - 0x3030, 0x3031, 0x3032, 0x3033, 0x3034, 0x3035, 0x3036, 0x3037, - 0x3038, 0x3039, 0x303a, 0x303b, 0x303c, 0x303d, 0x303e, 0x303f, - 0x3040, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, - 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, - 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, - 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, - 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, - 0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, - 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, - 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, - 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, - 0x3088, 0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, - 0x3090, 0x3091, 0x3092, 0x3093, 0x3094, 0x3095, 0x3096, 0x3097, - 0x3098, 0x3099, 0x309a, 0x309b, 0x309c, 0x309d, 0x309e, 0x309f, - 0x30a0, 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, - 0x30a8, 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, - 0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, - 0x30b8, 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, - 0x30c0, 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, - 0x30c8, 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, - 0x30d0, 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, - 0x30d8, 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, - 0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, - 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, - 0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0x30f7, - 0x30f8, 0x30f9, 0x30fa, 0x30fb, 0x30fc, 0x30fd, 0x30fe, 0x30ff, - 0x3100, 0x3101, 0x3102, 0x3103, 0x3104, 0x3105, 0x3106, 0x3107, - 0x3108, 0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f, - 0x3110, 0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, 0x3117, - 0x3118, 0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, 0x311f, - 0x3120, 0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127, - 0x3128, 0x3129, 0x312a, 0x312b, 0x312c, 0x312d, 0x312e, 0x312f, - 0x3130, 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, - 0x3138, 0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, - 0x3140, 0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, - 0x3148, 0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, - 0x3150, 0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, - 0x3158, 0x3159, 0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f, - 0x3160, 0x3161, 0x3162, 0x3163, 0x3164, 0x3165, 0x3166, 0x3167, - 0x3168, 0x3169, 0x316a, 0x316b, 0x316c, 0x316d, 0x316e, 0x316f, - 0x3170, 0x3171, 0x3172, 0x3173, 0x3174, 0x3175, 0x3176, 0x3177, - 0x3178, 0x3179, 0x317a, 0x317b, 0x317c, 0x317d, 0x317e, 0x317f, - 0x3180, 0x3181, 0x3182, 0x3183, 0x3184, 0x3185, 0x3186, 0x3187, - 0x3188, 0x3189, 0x318a, 0x318b, 0x318c, 0x318d, 0x318e, 0x318f, - 0x3190, 0x3191, 0x3192, 0x3193, 0x3194, 0x3195, 0x3196, 0x3197, - 0x3198, 0x3199, 0x319a, 0x319b, 0x319c, 0x319d, 0x319e, 0x319f, - 0x31a0, 0x31a1, 0x31a2, 0x31a3, 0x31a4, 0x31a5, 0x31a6, 0x31a7, - 0x31a8, 0x31a9, 0x31aa, 0x31ab, 0x31ac, 0x31ad, 0x31ae, 0x31af, - 0x31b0, 0x31b1, 0x31b2, 0x31b3, 0x31b4, 0x31b5, 0x31b6, 0x31b7, - 0x31b8, 0x31b9, 0x31ba, 0x31bb, 0x31bc, 0x31bd, 0x31be, 0x31bf, - 0x31c0, 0x31c1, 0x31c2, 0x31c3, 0x31c4, 0x31c5, 0x31c6, 0x31c7, - 0x31c8, 0x31c9, 0x31ca, 0x31cb, 0x31cc, 0x31cd, 0x31ce, 0x31cf, - 0x31d0, 0x31d1, 0x31d2, 0x31d3, 0x31d4, 0x31d5, 0x31d6, 0x31d7, - 0x31d8, 0x31d9, 0x31da, 0x31db, 0x31dc, 0x31dd, 0x31de, 0x31df, - 0x31e0, 0x31e1, 0x31e2, 0x31e3, 0x31e4, 0x31e5, 0x31e6, 0x31e7, - 0x31e8, 0x31e9, 0x31ea, 0x31eb, 0x31ec, 0x31ed, 0x31ee, 0x31ef, - 0x31f0, 0x31f1, 0x31f2, 0x31f3, 0x31f4, 0x31f5, 0x31f6, 0x31f7, - 0x31f8, 0x31f9, 0x31fa, 0x31fb, 0x31fc, 0x31fd, 0x31fe, 0x31ff, - 0x3200, 0x3201, 0x3202, 0x3203, 0x3204, 0x3205, 0x3206, 0x3207, - 0x3208, 0x3209, 0x320a, 0x320b, 0x320c, 0x320d, 0x320e, 0x320f, - 0x3210, 0x3211, 0x3212, 0x3213, 0x3214, 0x3215, 0x3216, 0x3217, - 0x3218, 0x3219, 0x321a, 0x321b, 0x321c, 0x321d, 0x321e, 0x321f, - 0x3220, 0x3221, 0x3222, 0x3223, 0x3224, 0x3225, 0x3226, 0x3227, - 0x3228, 0x3229, 0x322a, 0x322b, 0x322c, 0x322d, 0x322e, 0x322f, - 0x3230, 0x3231, 0x3232, 0x3233, 0x3234, 0x3235, 0x3236, 0x3237, - 0x3238, 0x3239, 0x323a, 0x323b, 0x323c, 0x323d, 0x323e, 0x323f, - 0x3240, 0x3241, 0x3242, 0x3243, 0x3244, 0x3245, 0x3246, 0x3247, - 0x3248, 0x3249, 0x324a, 0x324b, 0x324c, 0x324d, 0x324e, 0x324f, - 0x3250, 0x3251, 0x3252, 0x3253, 0x3254, 0x3255, 0x3256, 0x3257, - 0x3258, 0x3259, 0x325a, 0x325b, 0x325c, 0x325d, 0x325e, 0x325f, - 0x3260, 0x3261, 0x3262, 0x3263, 0x3264, 0x3265, 0x3266, 0x3267, - 0x3268, 0x3269, 0x326a, 0x326b, 0x326c, 0x326d, 0x326e, 0x326f, - 0x3270, 0x3271, 0x3272, 0x3273, 0x3274, 0x3275, 0x3276, 0x3277, - 0x3278, 0x3279, 0x327a, 0x327b, 0x327c, 0x327d, 0x327e, 0x327f, - 0x3280, 0x3281, 0x3282, 0x3283, 0x3284, 0x3285, 0x3286, 0x3287, - 0x3288, 0x3289, 0x328a, 0x328b, 0x328c, 0x328d, 0x328e, 0x328f, - 0x3290, 0x3291, 0x3292, 0x3293, 0x3294, 0x3295, 0x3296, 0x3297, - 0x3298, 0x3299, 0x329a, 0x329b, 0x329c, 0x329d, 0x329e, 0x329f, - 0x32a0, 0x32a1, 0x32a2, 0x32a3, 0x32a4, 0x32a5, 0x32a6, 0x32a7, - 0x32a8, 0x32a9, 0x32aa, 0x32ab, 0x32ac, 0x32ad, 0x32ae, 0x32af, - 0x32b0, 0x32b1, 0x32b2, 0x32b3, 0x32b4, 0x32b5, 0x32b6, 0x32b7, - 0x32b8, 0x32b9, 0x32ba, 0x32bb, 0x32bc, 0x32bd, 0x32be, 0x32bf, - 0x32c0, 0x32c1, 0x32c2, 0x32c3, 0x32c4, 0x32c5, 0x32c6, 0x32c7, - 0x32c8, 0x32c9, 0x32ca, 0x32cb, 0x32cc, 0x32cd, 0x32ce, 0x32cf, - 0x32d0, 0x32d1, 0x32d2, 0x32d3, 0x32d4, 0x32d5, 0x32d6, 0x32d7, - 0x32d8, 0x32d9, 0x32da, 0x32db, 0x32dc, 0x32dd, 0x32de, 0x32df, - 0x32e0, 0x32e1, 0x32e2, 0x32e3, 0x32e4, 0x32e5, 0x32e6, 0x32e7, - 0x32e8, 0x32e9, 0x32ea, 0x32eb, 0x32ec, 0x32ed, 0x32ee, 0x32ef, - 0x32f0, 0x32f1, 0x32f2, 0x32f3, 0x32f4, 0x32f5, 0x32f6, 0x32f7, - 0x32f8, 0x32f9, 0x32fa, 0x32fb, 0x32fc, 0x32fd, 0x32fe, 0x32ff, - 0x3300, 0x3301, 0x3302, 0x3303, 0x3304, 0x3305, 0x3306, 0x3307, - 0x3308, 0x3309, 0x330a, 0x330b, 0x330c, 0x330d, 0x330e, 0x330f, - 0x3310, 0x3311, 0x3312, 0x3313, 0x3314, 0x3315, 0x3316, 0x3317, - 0x3318, 0x3319, 0x331a, 0x331b, 0x331c, 0x331d, 0x331e, 0x331f, - 0x3320, 0x3321, 0x3322, 0x3323, 0x3324, 0x3325, 0x3326, 0x3327, - 0x3328, 0x3329, 0x332a, 0x332b, 0x332c, 0x332d, 0x332e, 0x332f, - 0x3330, 0x3331, 0x3332, 0x3333, 0x3334, 0x3335, 0x3336, 0x3337, - 0x3338, 0x3339, 0x333a, 0x333b, 0x333c, 0x333d, 0x333e, 0x333f, - 0x3340, 0x3341, 0x3342, 0x3343, 0x3344, 0x3345, 0x3346, 0x3347, - 0x3348, 0x3349, 0x334a, 0x334b, 0x334c, 0x334d, 0x334e, 0x334f, - 0x3350, 0x3351, 0x3352, 0x3353, 0x3354, 0x3355, 0x3356, 0x3357, - 0x3358, 0x3359, 0x335a, 0x335b, 0x335c, 0x335d, 0x335e, 0x335f, - 0x3360, 0x3361, 0x3362, 0x3363, 0x3364, 0x3365, 0x3366, 0x3367, - 0x3368, 0x3369, 0x336a, 0x336b, 0x336c, 0x336d, 0x336e, 0x336f, - 0x3370, 0x3371, 0x3372, 0x3373, 0x3374, 0x3375, 0x3376, 0x3377, - 0x3378, 0x3379, 0x337a, 0x337b, 0x337c, 0x337d, 0x337e, 0x337f, - 0x3380, 0x3381, 0x3382, 0x3383, 0x3384, 0x3385, 0x3386, 0x3387, - 0x3388, 0x3389, 0x338a, 0x338b, 0x338c, 0x338d, 0x338e, 0x338f, - 0x3390, 0x3391, 0x3392, 0x3393, 0x3394, 0x3395, 0x3396, 0x3397, - 0x3398, 0x3399, 0x339a, 0x339b, 0x339c, 0x339d, 0x339e, 0x339f, - 0x33a0, 0x33a1, 0x33a2, 0x33a3, 0x33a4, 0x33a5, 0x33a6, 0x33a7, - 0x33a8, 0x33a9, 0x33aa, 0x33ab, 0x33ac, 0x33ad, 0x33ae, 0x33af, - 0x33b0, 0x33b1, 0x33b2, 0x33b3, 0x33b4, 0x33b5, 0x33b6, 0x33b7, - 0x33b8, 0x33b9, 0x33ba, 0x33bb, 0x33bc, 0x33bd, 0x33be, 0x33bf, - 0x33c0, 0x33c1, 0x33c2, 0x33c3, 0x33c4, 0x33c5, 0x33c6, 0x33c7, - 0x33c8, 0x33c9, 0x33ca, 0x33cb, 0x33cc, 0x33cd, 0x33ce, 0x33cf, - 0x33d0, 0x33d1, 0x33d2, 0x33d3, 0x33d4, 0x33d5, 0x33d6, 0x33d7, - 0x33d8, 0x33d9, 0x33da, 0x33db, 0x33dc, 0x33dd, 0x33de, 0x33df, - 0x33e0, 0x33e1, 0x33e2, 0x33e3, 0x33e4, 0x33e5, 0x33e6, 0x33e7, - 0x33e8, 0x33e9, 0x33ea, 0x33eb, 0x33ec, 0x33ed, 0x33ee, 0x33ef, - 0x33f0, 0x33f1, 0x33f2, 0x33f3, 0x33f4, 0x33f5, 0x33f6, 0x33f7, - 0x33f8, 0x33f9, 0x33fa, 0x33fb, 0x33fc, 0x33fd, 0x33fe, 0x33ff, - 0x3400, 0x3401, 0x3402, 0x3403, 0x3404, 0x3405, 0x3406, 0x3407, - 0x3408, 0x3409, 0x340a, 0x340b, 0x340c, 0x340d, 0x340e, 0x340f, - 0x3410, 0x3411, 0x3412, 0x3413, 0x3414, 0x3415, 0x3416, 0x3417, - 0x3418, 0x3419, 0x341a, 0x341b, 0x341c, 0x341d, 0x341e, 0x341f, - 0x3420, 0x3421, 0x3422, 0x3423, 0x3424, 0x3425, 0x3426, 0x3427, - 0x3428, 0x3429, 0x342a, 0x342b, 0x342c, 0x342d, 0x342e, 0x342f, - 0x3430, 0x3431, 0x3432, 0x3433, 0x3434, 0x3435, 0x3436, 0x3437, - 0x3438, 0x3439, 0x343a, 0x343b, 0x343c, 0x343d, 0x343e, 0x343f, - 0x3440, 0x3441, 0x3442, 0x3443, 0x3444, 0x3445, 0x3446, 0x3447, - 0x3448, 0x3449, 0x344a, 0x344b, 0x344c, 0x344d, 0x344e, 0x344f, - 0x3450, 0x3451, 0x3452, 0x3453, 0x3454, 0x3455, 0x3456, 0x3457, - 0x3458, 0x3459, 0x345a, 0x345b, 0x345c, 0x345d, 0x345e, 0x345f, - 0x3460, 0x3461, 0x3462, 0x3463, 0x3464, 0x3465, 0x3466, 0x3467, - 0x3468, 0x3469, 0x346a, 0x346b, 0x346c, 0x346d, 0x346e, 0x346f, - 0x3470, 0x3471, 0x3472, 0x3473, 0x3474, 0x3475, 0x3476, 0x3477, - 0x3478, 0x3479, 0x347a, 0x347b, 0x347c, 0x347d, 0x347e, 0x347f, - 0x3480, 0x3481, 0x3482, 0x3483, 0x3484, 0x3485, 0x3486, 0x3487, - 0x3488, 0x3489, 0x348a, 0x348b, 0x348c, 0x348d, 0x348e, 0x348f, - 0x3490, 0x3491, 0x3492, 0x3493, 0x3494, 0x3495, 0x3496, 0x3497, - 0x3498, 0x3499, 0x349a, 0x349b, 0x349c, 0x349d, 0x349e, 0x349f, - 0x34a0, 0x34a1, 0x34a2, 0x34a3, 0x34a4, 0x34a5, 0x34a6, 0x34a7, - 0x34a8, 0x34a9, 0x34aa, 0x34ab, 0x34ac, 0x34ad, 0x34ae, 0x34af, - 0x34b0, 0x34b1, 0x34b2, 0x34b3, 0x34b4, 0x34b5, 0x34b6, 0x34b7, - 0x34b8, 0x34b9, 0x34ba, 0x34bb, 0x34bc, 0x34bd, 0x34be, 0x34bf, - 0x34c0, 0x34c1, 0x34c2, 0x34c3, 0x34c4, 0x34c5, 0x34c6, 0x34c7, - 0x34c8, 0x34c9, 0x34ca, 0x34cb, 0x34cc, 0x34cd, 0x34ce, 0x34cf, - 0x34d0, 0x34d1, 0x34d2, 0x34d3, 0x34d4, 0x34d5, 0x34d6, 0x34d7, - 0x34d8, 0x34d9, 0x34da, 0x34db, 0x34dc, 0x34dd, 0x34de, 0x34df, - 0x34e0, 0x34e1, 0x34e2, 0x34e3, 0x34e4, 0x34e5, 0x34e6, 0x34e7, - 0x34e8, 0x34e9, 0x34ea, 0x34eb, 0x34ec, 0x34ed, 0x34ee, 0x34ef, - 0x34f0, 0x34f1, 0x34f2, 0x34f3, 0x34f4, 0x34f5, 0x34f6, 0x34f7, - 0x34f8, 0x34f9, 0x34fa, 0x34fb, 0x34fc, 0x34fd, 0x34fe, 0x34ff, - 0x3500, 0x3501, 0x3502, 0x3503, 0x3504, 0x3505, 0x3506, 0x3507, - 0x3508, 0x3509, 0x350a, 0x350b, 0x350c, 0x350d, 0x350e, 0x350f, - 0x3510, 0x3511, 0x3512, 0x3513, 0x3514, 0x3515, 0x3516, 0x3517, - 0x3518, 0x3519, 0x351a, 0x351b, 0x351c, 0x351d, 0x351e, 0x351f, - 0x3520, 0x3521, 0x3522, 0x3523, 0x3524, 0x3525, 0x3526, 0x3527, - 0x3528, 0x3529, 0x352a, 0x352b, 0x352c, 0x352d, 0x352e, 0x352f, - 0x3530, 0x3531, 0x3532, 0x3533, 0x3534, 0x3535, 0x3536, 0x3537, - 0x3538, 0x3539, 0x353a, 0x353b, 0x353c, 0x353d, 0x353e, 0x353f, - 0x3540, 0x3541, 0x3542, 0x3543, 0x3544, 0x3545, 0x3546, 0x3547, - 0x3548, 0x3549, 0x354a, 0x354b, 0x354c, 0x354d, 0x354e, 0x354f, - 0x3550, 0x3551, 0x3552, 0x3553, 0x3554, 0x3555, 0x3556, 0x3557, - 0x3558, 0x3559, 0x355a, 0x355b, 0x355c, 0x355d, 0x355e, 0x355f, - 0x3560, 0x3561, 0x3562, 0x3563, 0x3564, 0x3565, 0x3566, 0x3567, - 0x3568, 0x3569, 0x356a, 0x356b, 0x356c, 0x356d, 0x356e, 0x356f, - 0x3570, 0x3571, 0x3572, 0x3573, 0x3574, 0x3575, 0x3576, 0x3577, - 0x3578, 0x3579, 0x357a, 0x357b, 0x357c, 0x357d, 0x357e, 0x357f, - 0x3580, 0x3581, 0x3582, 0x3583, 0x3584, 0x3585, 0x3586, 0x3587, - 0x3588, 0x3589, 0x358a, 0x358b, 0x358c, 0x358d, 0x358e, 0x358f, - 0x3590, 0x3591, 0x3592, 0x3593, 0x3594, 0x3595, 0x3596, 0x3597, - 0x3598, 0x3599, 0x359a, 0x359b, 0x359c, 0x359d, 0x359e, 0x359f, - 0x35a0, 0x35a1, 0x35a2, 0x35a3, 0x35a4, 0x35a5, 0x35a6, 0x35a7, - 0x35a8, 0x35a9, 0x35aa, 0x35ab, 0x35ac, 0x35ad, 0x35ae, 0x35af, - 0x35b0, 0x35b1, 0x35b2, 0x35b3, 0x35b4, 0x35b5, 0x35b6, 0x35b7, - 0x35b8, 0x35b9, 0x35ba, 0x35bb, 0x35bc, 0x35bd, 0x35be, 0x35bf, - 0x35c0, 0x35c1, 0x35c2, 0x35c3, 0x35c4, 0x35c5, 0x35c6, 0x35c7, - 0x35c8, 0x35c9, 0x35ca, 0x35cb, 0x35cc, 0x35cd, 0x35ce, 0x35cf, - 0x35d0, 0x35d1, 0x35d2, 0x35d3, 0x35d4, 0x35d5, 0x35d6, 0x35d7, - 0x35d8, 0x35d9, 0x35da, 0x35db, 0x35dc, 0x35dd, 0x35de, 0x35df, - 0x35e0, 0x35e1, 0x35e2, 0x35e3, 0x35e4, 0x35e5, 0x35e6, 0x35e7, - 0x35e8, 0x35e9, 0x35ea, 0x35eb, 0x35ec, 0x35ed, 0x35ee, 0x35ef, - 0x35f0, 0x35f1, 0x35f2, 0x35f3, 0x35f4, 0x35f5, 0x35f6, 0x35f7, - 0x35f8, 0x35f9, 0x35fa, 0x35fb, 0x35fc, 0x35fd, 0x35fe, 0x35ff, - 0x3600, 0x3601, 0x3602, 0x3603, 0x3604, 0x3605, 0x3606, 0x3607, - 0x3608, 0x3609, 0x360a, 0x360b, 0x360c, 0x360d, 0x360e, 0x360f, - 0x3610, 0x3611, 0x3612, 0x3613, 0x3614, 0x3615, 0x3616, 0x3617, - 0x3618, 0x3619, 0x361a, 0x361b, 0x361c, 0x361d, 0x361e, 0x361f, - 0x3620, 0x3621, 0x3622, 0x3623, 0x3624, 0x3625, 0x3626, 0x3627, - 0x3628, 0x3629, 0x362a, 0x362b, 0x362c, 0x362d, 0x362e, 0x362f, - 0x3630, 0x3631, 0x3632, 0x3633, 0x3634, 0x3635, 0x3636, 0x3637, - 0x3638, 0x3639, 0x363a, 0x363b, 0x363c, 0x363d, 0x363e, 0x363f, - 0x3640, 0x3641, 0x3642, 0x3643, 0x3644, 0x3645, 0x3646, 0x3647, - 0x3648, 0x3649, 0x364a, 0x364b, 0x364c, 0x364d, 0x364e, 0x364f, - 0x3650, 0x3651, 0x3652, 0x3653, 0x3654, 0x3655, 0x3656, 0x3657, - 0x3658, 0x3659, 0x365a, 0x365b, 0x365c, 0x365d, 0x365e, 0x365f, - 0x3660, 0x3661, 0x3662, 0x3663, 0x3664, 0x3665, 0x3666, 0x3667, - 0x3668, 0x3669, 0x366a, 0x366b, 0x366c, 0x366d, 0x366e, 0x366f, - 0x3670, 0x3671, 0x3672, 0x3673, 0x3674, 0x3675, 0x3676, 0x3677, - 0x3678, 0x3679, 0x367a, 0x367b, 0x367c, 0x367d, 0x367e, 0x367f, - 0x3680, 0x3681, 0x3682, 0x3683, 0x3684, 0x3685, 0x3686, 0x3687, - 0x3688, 0x3689, 0x368a, 0x368b, 0x368c, 0x368d, 0x368e, 0x368f, - 0x3690, 0x3691, 0x3692, 0x3693, 0x3694, 0x3695, 0x3696, 0x3697, - 0x3698, 0x3699, 0x369a, 0x369b, 0x369c, 0x369d, 0x369e, 0x369f, - 0x36a0, 0x36a1, 0x36a2, 0x36a3, 0x36a4, 0x36a5, 0x36a6, 0x36a7, - 0x36a8, 0x36a9, 0x36aa, 0x36ab, 0x36ac, 0x36ad, 0x36ae, 0x36af, - 0x36b0, 0x36b1, 0x36b2, 0x36b3, 0x36b4, 0x36b5, 0x36b6, 0x36b7, - 0x36b8, 0x36b9, 0x36ba, 0x36bb, 0x36bc, 0x36bd, 0x36be, 0x36bf, - 0x36c0, 0x36c1, 0x36c2, 0x36c3, 0x36c4, 0x36c5, 0x36c6, 0x36c7, - 0x36c8, 0x36c9, 0x36ca, 0x36cb, 0x36cc, 0x36cd, 0x36ce, 0x36cf, - 0x36d0, 0x36d1, 0x36d2, 0x36d3, 0x36d4, 0x36d5, 0x36d6, 0x36d7, - 0x36d8, 0x36d9, 0x36da, 0x36db, 0x36dc, 0x36dd, 0x36de, 0x36df, - 0x36e0, 0x36e1, 0x36e2, 0x36e3, 0x36e4, 0x36e5, 0x36e6, 0x36e7, - 0x36e8, 0x36e9, 0x36ea, 0x36eb, 0x36ec, 0x36ed, 0x36ee, 0x36ef, - 0x36f0, 0x36f1, 0x36f2, 0x36f3, 0x36f4, 0x36f5, 0x36f6, 0x36f7, - 0x36f8, 0x36f9, 0x36fa, 0x36fb, 0x36fc, 0x36fd, 0x36fe, 0x36ff, - 0x3700, 0x3701, 0x3702, 0x3703, 0x3704, 0x3705, 0x3706, 0x3707, - 0x3708, 0x3709, 0x370a, 0x370b, 0x370c, 0x370d, 0x370e, 0x370f, - 0x3710, 0x3711, 0x3712, 0x3713, 0x3714, 0x3715, 0x3716, 0x3717, - 0x3718, 0x3719, 0x371a, 0x371b, 0x371c, 0x371d, 0x371e, 0x371f, - 0x3720, 0x3721, 0x3722, 0x3723, 0x3724, 0x3725, 0x3726, 0x3727, - 0x3728, 0x3729, 0x372a, 0x372b, 0x372c, 0x372d, 0x372e, 0x372f, - 0x3730, 0x3731, 0x3732, 0x3733, 0x3734, 0x3735, 0x3736, 0x3737, - 0x3738, 0x3739, 0x373a, 0x373b, 0x373c, 0x373d, 0x373e, 0x373f, - 0x3740, 0x3741, 0x3742, 0x3743, 0x3744, 0x3745, 0x3746, 0x3747, - 0x3748, 0x3749, 0x374a, 0x374b, 0x374c, 0x374d, 0x374e, 0x374f, - 0x3750, 0x3751, 0x3752, 0x3753, 0x3754, 0x3755, 0x3756, 0x3757, - 0x3758, 0x3759, 0x375a, 0x375b, 0x375c, 0x375d, 0x375e, 0x375f, - 0x3760, 0x3761, 0x3762, 0x3763, 0x3764, 0x3765, 0x3766, 0x3767, - 0x3768, 0x3769, 0x376a, 0x376b, 0x376c, 0x376d, 0x376e, 0x376f, - 0x3770, 0x3771, 0x3772, 0x3773, 0x3774, 0x3775, 0x3776, 0x3777, - 0x3778, 0x3779, 0x377a, 0x377b, 0x377c, 0x377d, 0x377e, 0x377f, - 0x3780, 0x3781, 0x3782, 0x3783, 0x3784, 0x3785, 0x3786, 0x3787, - 0x3788, 0x3789, 0x378a, 0x378b, 0x378c, 0x378d, 0x378e, 0x378f, - 0x3790, 0x3791, 0x3792, 0x3793, 0x3794, 0x3795, 0x3796, 0x3797, - 0x3798, 0x3799, 0x379a, 0x379b, 0x379c, 0x379d, 0x379e, 0x379f, - 0x37a0, 0x37a1, 0x37a2, 0x37a3, 0x37a4, 0x37a5, 0x37a6, 0x37a7, - 0x37a8, 0x37a9, 0x37aa, 0x37ab, 0x37ac, 0x37ad, 0x37ae, 0x37af, - 0x37b0, 0x37b1, 0x37b2, 0x37b3, 0x37b4, 0x37b5, 0x37b6, 0x37b7, - 0x37b8, 0x37b9, 0x37ba, 0x37bb, 0x37bc, 0x37bd, 0x37be, 0x37bf, - 0x37c0, 0x37c1, 0x37c2, 0x37c3, 0x37c4, 0x37c5, 0x37c6, 0x37c7, - 0x37c8, 0x37c9, 0x37ca, 0x37cb, 0x37cc, 0x37cd, 0x37ce, 0x37cf, - 0x37d0, 0x37d1, 0x37d2, 0x37d3, 0x37d4, 0x37d5, 0x37d6, 0x37d7, - 0x37d8, 0x37d9, 0x37da, 0x37db, 0x37dc, 0x37dd, 0x37de, 0x37df, - 0x37e0, 0x37e1, 0x37e2, 0x37e3, 0x37e4, 0x37e5, 0x37e6, 0x37e7, - 0x37e8, 0x37e9, 0x37ea, 0x37eb, 0x37ec, 0x37ed, 0x37ee, 0x37ef, - 0x37f0, 0x37f1, 0x37f2, 0x37f3, 0x37f4, 0x37f5, 0x37f6, 0x37f7, - 0x37f8, 0x37f9, 0x37fa, 0x37fb, 0x37fc, 0x37fd, 0x37fe, 0x37ff, - 0x3800, 0x3801, 0x3802, 0x3803, 0x3804, 0x3805, 0x3806, 0x3807, - 0x3808, 0x3809, 0x380a, 0x380b, 0x380c, 0x380d, 0x380e, 0x380f, - 0x3810, 0x3811, 0x3812, 0x3813, 0x3814, 0x3815, 0x3816, 0x3817, - 0x3818, 0x3819, 0x381a, 0x381b, 0x381c, 0x381d, 0x381e, 0x381f, - 0x3820, 0x3821, 0x3822, 0x3823, 0x3824, 0x3825, 0x3826, 0x3827, - 0x3828, 0x3829, 0x382a, 0x382b, 0x382c, 0x382d, 0x382e, 0x382f, - 0x3830, 0x3831, 0x3832, 0x3833, 0x3834, 0x3835, 0x3836, 0x3837, - 0x3838, 0x3839, 0x383a, 0x383b, 0x383c, 0x383d, 0x383e, 0x383f, - 0x3840, 0x3841, 0x3842, 0x3843, 0x3844, 0x3845, 0x3846, 0x3847, - 0x3848, 0x3849, 0x384a, 0x384b, 0x384c, 0x384d, 0x384e, 0x384f, - 0x3850, 0x3851, 0x3852, 0x3853, 0x3854, 0x3855, 0x3856, 0x3857, - 0x3858, 0x3859, 0x385a, 0x385b, 0x385c, 0x385d, 0x385e, 0x385f, - 0x3860, 0x3861, 0x3862, 0x3863, 0x3864, 0x3865, 0x3866, 0x3867, - 0x3868, 0x3869, 0x386a, 0x386b, 0x386c, 0x386d, 0x386e, 0x386f, - 0x3870, 0x3871, 0x3872, 0x3873, 0x3874, 0x3875, 0x3876, 0x3877, - 0x3878, 0x3879, 0x387a, 0x387b, 0x387c, 0x387d, 0x387e, 0x387f, - 0x3880, 0x3881, 0x3882, 0x3883, 0x3884, 0x3885, 0x3886, 0x3887, - 0x3888, 0x3889, 0x388a, 0x388b, 0x388c, 0x388d, 0x388e, 0x388f, - 0x3890, 0x3891, 0x3892, 0x3893, 0x3894, 0x3895, 0x3896, 0x3897, - 0x3898, 0x3899, 0x389a, 0x389b, 0x389c, 0x389d, 0x389e, 0x389f, - 0x38a0, 0x38a1, 0x38a2, 0x38a3, 0x38a4, 0x38a5, 0x38a6, 0x38a7, - 0x38a8, 0x38a9, 0x38aa, 0x38ab, 0x38ac, 0x38ad, 0x38ae, 0x38af, - 0x38b0, 0x38b1, 0x38b2, 0x38b3, 0x38b4, 0x38b5, 0x38b6, 0x38b7, - 0x38b8, 0x38b9, 0x38ba, 0x38bb, 0x38bc, 0x38bd, 0x38be, 0x38bf, - 0x38c0, 0x38c1, 0x38c2, 0x38c3, 0x38c4, 0x38c5, 0x38c6, 0x38c7, - 0x38c8, 0x38c9, 0x38ca, 0x38cb, 0x38cc, 0x38cd, 0x38ce, 0x38cf, - 0x38d0, 0x38d1, 0x38d2, 0x38d3, 0x38d4, 0x38d5, 0x38d6, 0x38d7, - 0x38d8, 0x38d9, 0x38da, 0x38db, 0x38dc, 0x38dd, 0x38de, 0x38df, - 0x38e0, 0x38e1, 0x38e2, 0x38e3, 0x38e4, 0x38e5, 0x38e6, 0x38e7, - 0x38e8, 0x38e9, 0x38ea, 0x38eb, 0x38ec, 0x38ed, 0x38ee, 0x38ef, - 0x38f0, 0x38f1, 0x38f2, 0x38f3, 0x38f4, 0x38f5, 0x38f6, 0x38f7, - 0x38f8, 0x38f9, 0x38fa, 0x38fb, 0x38fc, 0x38fd, 0x38fe, 0x38ff, - 0x3900, 0x3901, 0x3902, 0x3903, 0x3904, 0x3905, 0x3906, 0x3907, - 0x3908, 0x3909, 0x390a, 0x390b, 0x390c, 0x390d, 0x390e, 0x390f, - 0x3910, 0x3911, 0x3912, 0x3913, 0x3914, 0x3915, 0x3916, 0x3917, - 0x3918, 0x3919, 0x391a, 0x391b, 0x391c, 0x391d, 0x391e, 0x391f, - 0x3920, 0x3921, 0x3922, 0x3923, 0x3924, 0x3925, 0x3926, 0x3927, - 0x3928, 0x3929, 0x392a, 0x392b, 0x392c, 0x392d, 0x392e, 0x392f, - 0x3930, 0x3931, 0x3932, 0x3933, 0x3934, 0x3935, 0x3936, 0x3937, - 0x3938, 0x3939, 0x393a, 0x393b, 0x393c, 0x393d, 0x393e, 0x393f, - 0x3940, 0x3941, 0x3942, 0x3943, 0x3944, 0x3945, 0x3946, 0x3947, - 0x3948, 0x3949, 0x394a, 0x394b, 0x394c, 0x394d, 0x394e, 0x394f, - 0x3950, 0x3951, 0x3952, 0x3953, 0x3954, 0x3955, 0x3956, 0x3957, - 0x3958, 0x3959, 0x395a, 0x395b, 0x395c, 0x395d, 0x395e, 0x395f, - 0x3960, 0x3961, 0x3962, 0x3963, 0x3964, 0x3965, 0x3966, 0x3967, - 0x3968, 0x3969, 0x396a, 0x396b, 0x396c, 0x396d, 0x396e, 0x396f, - 0x3970, 0x3971, 0x3972, 0x3973, 0x3974, 0x3975, 0x3976, 0x3977, - 0x3978, 0x3979, 0x397a, 0x397b, 0x397c, 0x397d, 0x397e, 0x397f, - 0x3980, 0x3981, 0x3982, 0x3983, 0x3984, 0x3985, 0x3986, 0x3987, - 0x3988, 0x3989, 0x398a, 0x398b, 0x398c, 0x398d, 0x398e, 0x398f, - 0x3990, 0x3991, 0x3992, 0x3993, 0x3994, 0x3995, 0x3996, 0x3997, - 0x3998, 0x3999, 0x399a, 0x399b, 0x399c, 0x399d, 0x399e, 0x399f, - 0x39a0, 0x39a1, 0x39a2, 0x39a3, 0x39a4, 0x39a5, 0x39a6, 0x39a7, - 0x39a8, 0x39a9, 0x39aa, 0x39ab, 0x39ac, 0x39ad, 0x39ae, 0x39af, - 0x39b0, 0x39b1, 0x39b2, 0x39b3, 0x39b4, 0x39b5, 0x39b6, 0x39b7, - 0x39b8, 0x39b9, 0x39ba, 0x39bb, 0x39bc, 0x39bd, 0x39be, 0x39bf, - 0x39c0, 0x39c1, 0x39c2, 0x39c3, 0x39c4, 0x39c5, 0x39c6, 0x39c7, - 0x39c8, 0x39c9, 0x39ca, 0x39cb, 0x39cc, 0x39cd, 0x39ce, 0x39cf, - 0x39d0, 0x39d1, 0x39d2, 0x39d3, 0x39d4, 0x39d5, 0x39d6, 0x39d7, - 0x39d8, 0x39d9, 0x39da, 0x39db, 0x39dc, 0x39dd, 0x39de, 0x39df, - 0x39e0, 0x39e1, 0x39e2, 0x39e3, 0x39e4, 0x39e5, 0x39e6, 0x39e7, - 0x39e8, 0x39e9, 0x39ea, 0x39eb, 0x39ec, 0x39ed, 0x39ee, 0x39ef, - 0x39f0, 0x39f1, 0x39f2, 0x39f3, 0x39f4, 0x39f5, 0x39f6, 0x39f7, - 0x39f8, 0x39f9, 0x39fa, 0x39fb, 0x39fc, 0x39fd, 0x39fe, 0x39ff, - 0x3a00, 0x3a01, 0x3a02, 0x3a03, 0x3a04, 0x3a05, 0x3a06, 0x3a07, - 0x3a08, 0x3a09, 0x3a0a, 0x3a0b, 0x3a0c, 0x3a0d, 0x3a0e, 0x3a0f, - 0x3a10, 0x3a11, 0x3a12, 0x3a13, 0x3a14, 0x3a15, 0x3a16, 0x3a17, - 0x3a18, 0x3a19, 0x3a1a, 0x3a1b, 0x3a1c, 0x3a1d, 0x3a1e, 0x3a1f, - 0x3a20, 0x3a21, 0x3a22, 0x3a23, 0x3a24, 0x3a25, 0x3a26, 0x3a27, - 0x3a28, 0x3a29, 0x3a2a, 0x3a2b, 0x3a2c, 0x3a2d, 0x3a2e, 0x3a2f, - 0x3a30, 0x3a31, 0x3a32, 0x3a33, 0x3a34, 0x3a35, 0x3a36, 0x3a37, - 0x3a38, 0x3a39, 0x3a3a, 0x3a3b, 0x3a3c, 0x3a3d, 0x3a3e, 0x3a3f, - 0x3a40, 0x3a41, 0x3a42, 0x3a43, 0x3a44, 0x3a45, 0x3a46, 0x3a47, - 0x3a48, 0x3a49, 0x3a4a, 0x3a4b, 0x3a4c, 0x3a4d, 0x3a4e, 0x3a4f, - 0x3a50, 0x3a51, 0x3a52, 0x3a53, 0x3a54, 0x3a55, 0x3a56, 0x3a57, - 0x3a58, 0x3a59, 0x3a5a, 0x3a5b, 0x3a5c, 0x3a5d, 0x3a5e, 0x3a5f, - 0x3a60, 0x3a61, 0x3a62, 0x3a63, 0x3a64, 0x3a65, 0x3a66, 0x3a67, - 0x3a68, 0x3a69, 0x3a6a, 0x3a6b, 0x3a6c, 0x3a6d, 0x3a6e, 0x3a6f, - 0x3a70, 0x3a71, 0x3a72, 0x3a73, 0x3a74, 0x3a75, 0x3a76, 0x3a77, - 0x3a78, 0x3a79, 0x3a7a, 0x3a7b, 0x3a7c, 0x3a7d, 0x3a7e, 0x3a7f, - 0x3a80, 0x3a81, 0x3a82, 0x3a83, 0x3a84, 0x3a85, 0x3a86, 0x3a87, - 0x3a88, 0x3a89, 0x3a8a, 0x3a8b, 0x3a8c, 0x3a8d, 0x3a8e, 0x3a8f, - 0x3a90, 0x3a91, 0x3a92, 0x3a93, 0x3a94, 0x3a95, 0x3a96, 0x3a97, - 0x3a98, 0x3a99, 0x3a9a, 0x3a9b, 0x3a9c, 0x3a9d, 0x3a9e, 0x3a9f, - 0x3aa0, 0x3aa1, 0x3aa2, 0x3aa3, 0x3aa4, 0x3aa5, 0x3aa6, 0x3aa7, - 0x3aa8, 0x3aa9, 0x3aaa, 0x3aab, 0x3aac, 0x3aad, 0x3aae, 0x3aaf, - 0x3ab0, 0x3ab1, 0x3ab2, 0x3ab3, 0x3ab4, 0x3ab5, 0x3ab6, 0x3ab7, - 0x3ab8, 0x3ab9, 0x3aba, 0x3abb, 0x3abc, 0x3abd, 0x3abe, 0x3abf, - 0x3ac0, 0x3ac1, 0x3ac2, 0x3ac3, 0x3ac4, 0x3ac5, 0x3ac6, 0x3ac7, - 0x3ac8, 0x3ac9, 0x3aca, 0x3acb, 0x3acc, 0x3acd, 0x3ace, 0x3acf, - 0x3ad0, 0x3ad1, 0x3ad2, 0x3ad3, 0x3ad4, 0x3ad5, 0x3ad6, 0x3ad7, - 0x3ad8, 0x3ad9, 0x3ada, 0x3adb, 0x3adc, 0x3add, 0x3ade, 0x3adf, - 0x3ae0, 0x3ae1, 0x3ae2, 0x3ae3, 0x3ae4, 0x3ae5, 0x3ae6, 0x3ae7, - 0x3ae8, 0x3ae9, 0x3aea, 0x3aeb, 0x3aec, 0x3aed, 0x3aee, 0x3aef, - 0x3af0, 0x3af1, 0x3af2, 0x3af3, 0x3af4, 0x3af5, 0x3af6, 0x3af7, - 0x3af8, 0x3af9, 0x3afa, 0x3afb, 0x3afc, 0x3afd, 0x3afe, 0x3aff, - 0x3b00, 0x3b01, 0x3b02, 0x3b03, 0x3b04, 0x3b05, 0x3b06, 0x3b07, - 0x3b08, 0x3b09, 0x3b0a, 0x3b0b, 0x3b0c, 0x3b0d, 0x3b0e, 0x3b0f, - 0x3b10, 0x3b11, 0x3b12, 0x3b13, 0x3b14, 0x3b15, 0x3b16, 0x3b17, - 0x3b18, 0x3b19, 0x3b1a, 0x3b1b, 0x3b1c, 0x3b1d, 0x3b1e, 0x3b1f, - 0x3b20, 0x3b21, 0x3b22, 0x3b23, 0x3b24, 0x3b25, 0x3b26, 0x3b27, - 0x3b28, 0x3b29, 0x3b2a, 0x3b2b, 0x3b2c, 0x3b2d, 0x3b2e, 0x3b2f, - 0x3b30, 0x3b31, 0x3b32, 0x3b33, 0x3b34, 0x3b35, 0x3b36, 0x3b37, - 0x3b38, 0x3b39, 0x3b3a, 0x3b3b, 0x3b3c, 0x3b3d, 0x3b3e, 0x3b3f, - 0x3b40, 0x3b41, 0x3b42, 0x3b43, 0x3b44, 0x3b45, 0x3b46, 0x3b47, - 0x3b48, 0x3b49, 0x3b4a, 0x3b4b, 0x3b4c, 0x3b4d, 0x3b4e, 0x3b4f, - 0x3b50, 0x3b51, 0x3b52, 0x3b53, 0x3b54, 0x3b55, 0x3b56, 0x3b57, - 0x3b58, 0x3b59, 0x3b5a, 0x3b5b, 0x3b5c, 0x3b5d, 0x3b5e, 0x3b5f, - 0x3b60, 0x3b61, 0x3b62, 0x3b63, 0x3b64, 0x3b65, 0x3b66, 0x3b67, - 0x3b68, 0x3b69, 0x3b6a, 0x3b6b, 0x3b6c, 0x3b6d, 0x3b6e, 0x3b6f, - 0x3b70, 0x3b71, 0x3b72, 0x3b73, 0x3b74, 0x3b75, 0x3b76, 0x3b77, - 0x3b78, 0x3b79, 0x3b7a, 0x3b7b, 0x3b7c, 0x3b7d, 0x3b7e, 0x3b7f, - 0x3b80, 0x3b81, 0x3b82, 0x3b83, 0x3b84, 0x3b85, 0x3b86, 0x3b87, - 0x3b88, 0x3b89, 0x3b8a, 0x3b8b, 0x3b8c, 0x3b8d, 0x3b8e, 0x3b8f, - 0x3b90, 0x3b91, 0x3b92, 0x3b93, 0x3b94, 0x3b95, 0x3b96, 0x3b97, - 0x3b98, 0x3b99, 0x3b9a, 0x3b9b, 0x3b9c, 0x3b9d, 0x3b9e, 0x3b9f, - 0x3ba0, 0x3ba1, 0x3ba2, 0x3ba3, 0x3ba4, 0x3ba5, 0x3ba6, 0x3ba7, - 0x3ba8, 0x3ba9, 0x3baa, 0x3bab, 0x3bac, 0x3bad, 0x3bae, 0x3baf, - 0x3bb0, 0x3bb1, 0x3bb2, 0x3bb3, 0x3bb4, 0x3bb5, 0x3bb6, 0x3bb7, - 0x3bb8, 0x3bb9, 0x3bba, 0x3bbb, 0x3bbc, 0x3bbd, 0x3bbe, 0x3bbf, - 0x3bc0, 0x3bc1, 0x3bc2, 0x3bc3, 0x3bc4, 0x3bc5, 0x3bc6, 0x3bc7, - 0x3bc8, 0x3bc9, 0x3bca, 0x3bcb, 0x3bcc, 0x3bcd, 0x3bce, 0x3bcf, - 0x3bd0, 0x3bd1, 0x3bd2, 0x3bd3, 0x3bd4, 0x3bd5, 0x3bd6, 0x3bd7, - 0x3bd8, 0x3bd9, 0x3bda, 0x3bdb, 0x3bdc, 0x3bdd, 0x3bde, 0x3bdf, - 0x3be0, 0x3be1, 0x3be2, 0x3be3, 0x3be4, 0x3be5, 0x3be6, 0x3be7, - 0x3be8, 0x3be9, 0x3bea, 0x3beb, 0x3bec, 0x3bed, 0x3bee, 0x3bef, - 0x3bf0, 0x3bf1, 0x3bf2, 0x3bf3, 0x3bf4, 0x3bf5, 0x3bf6, 0x3bf7, - 0x3bf8, 0x3bf9, 0x3bfa, 0x3bfb, 0x3bfc, 0x3bfd, 0x3bfe, 0x3bff, - 0x3c00, 0x3c01, 0x3c02, 0x3c03, 0x3c04, 0x3c05, 0x3c06, 0x3c07, - 0x3c08, 0x3c09, 0x3c0a, 0x3c0b, 0x3c0c, 0x3c0d, 0x3c0e, 0x3c0f, - 0x3c10, 0x3c11, 0x3c12, 0x3c13, 0x3c14, 0x3c15, 0x3c16, 0x3c17, - 0x3c18, 0x3c19, 0x3c1a, 0x3c1b, 0x3c1c, 0x3c1d, 0x3c1e, 0x3c1f, - 0x3c20, 0x3c21, 0x3c22, 0x3c23, 0x3c24, 0x3c25, 0x3c26, 0x3c27, - 0x3c28, 0x3c29, 0x3c2a, 0x3c2b, 0x3c2c, 0x3c2d, 0x3c2e, 0x3c2f, - 0x3c30, 0x3c31, 0x3c32, 0x3c33, 0x3c34, 0x3c35, 0x3c36, 0x3c37, - 0x3c38, 0x3c39, 0x3c3a, 0x3c3b, 0x3c3c, 0x3c3d, 0x3c3e, 0x3c3f, - 0x3c40, 0x3c41, 0x3c42, 0x3c43, 0x3c44, 0x3c45, 0x3c46, 0x3c47, - 0x3c48, 0x3c49, 0x3c4a, 0x3c4b, 0x3c4c, 0x3c4d, 0x3c4e, 0x3c4f, - 0x3c50, 0x3c51, 0x3c52, 0x3c53, 0x3c54, 0x3c55, 0x3c56, 0x3c57, - 0x3c58, 0x3c59, 0x3c5a, 0x3c5b, 0x3c5c, 0x3c5d, 0x3c5e, 0x3c5f, - 0x3c60, 0x3c61, 0x3c62, 0x3c63, 0x3c64, 0x3c65, 0x3c66, 0x3c67, - 0x3c68, 0x3c69, 0x3c6a, 0x3c6b, 0x3c6c, 0x3c6d, 0x3c6e, 0x3c6f, - 0x3c70, 0x3c71, 0x3c72, 0x3c73, 0x3c74, 0x3c75, 0x3c76, 0x3c77, - 0x3c78, 0x3c79, 0x3c7a, 0x3c7b, 0x3c7c, 0x3c7d, 0x3c7e, 0x3c7f, - 0x3c80, 0x3c81, 0x3c82, 0x3c83, 0x3c84, 0x3c85, 0x3c86, 0x3c87, - 0x3c88, 0x3c89, 0x3c8a, 0x3c8b, 0x3c8c, 0x3c8d, 0x3c8e, 0x3c8f, - 0x3c90, 0x3c91, 0x3c92, 0x3c93, 0x3c94, 0x3c95, 0x3c96, 0x3c97, - 0x3c98, 0x3c99, 0x3c9a, 0x3c9b, 0x3c9c, 0x3c9d, 0x3c9e, 0x3c9f, - 0x3ca0, 0x3ca1, 0x3ca2, 0x3ca3, 0x3ca4, 0x3ca5, 0x3ca6, 0x3ca7, - 0x3ca8, 0x3ca9, 0x3caa, 0x3cab, 0x3cac, 0x3cad, 0x3cae, 0x3caf, - 0x3cb0, 0x3cb1, 0x3cb2, 0x3cb3, 0x3cb4, 0x3cb5, 0x3cb6, 0x3cb7, - 0x3cb8, 0x3cb9, 0x3cba, 0x3cbb, 0x3cbc, 0x3cbd, 0x3cbe, 0x3cbf, - 0x3cc0, 0x3cc1, 0x3cc2, 0x3cc3, 0x3cc4, 0x3cc5, 0x3cc6, 0x3cc7, - 0x3cc8, 0x3cc9, 0x3cca, 0x3ccb, 0x3ccc, 0x3ccd, 0x3cce, 0x3ccf, - 0x3cd0, 0x3cd1, 0x3cd2, 0x3cd3, 0x3cd4, 0x3cd5, 0x3cd6, 0x3cd7, - 0x3cd8, 0x3cd9, 0x3cda, 0x3cdb, 0x3cdc, 0x3cdd, 0x3cde, 0x3cdf, - 0x3ce0, 0x3ce1, 0x3ce2, 0x3ce3, 0x3ce4, 0x3ce5, 0x3ce6, 0x3ce7, - 0x3ce8, 0x3ce9, 0x3cea, 0x3ceb, 0x3cec, 0x3ced, 0x3cee, 0x3cef, - 0x3cf0, 0x3cf1, 0x3cf2, 0x3cf3, 0x3cf4, 0x3cf5, 0x3cf6, 0x3cf7, - 0x3cf8, 0x3cf9, 0x3cfa, 0x3cfb, 0x3cfc, 0x3cfd, 0x3cfe, 0x3cff, - 0x3d00, 0x3d01, 0x3d02, 0x3d03, 0x3d04, 0x3d05, 0x3d06, 0x3d07, - 0x3d08, 0x3d09, 0x3d0a, 0x3d0b, 0x3d0c, 0x3d0d, 0x3d0e, 0x3d0f, - 0x3d10, 0x3d11, 0x3d12, 0x3d13, 0x3d14, 0x3d15, 0x3d16, 0x3d17, - 0x3d18, 0x3d19, 0x3d1a, 0x3d1b, 0x3d1c, 0x3d1d, 0x3d1e, 0x3d1f, - 0x3d20, 0x3d21, 0x3d22, 0x3d23, 0x3d24, 0x3d25, 0x3d26, 0x3d27, - 0x3d28, 0x3d29, 0x3d2a, 0x3d2b, 0x3d2c, 0x3d2d, 0x3d2e, 0x3d2f, - 0x3d30, 0x3d31, 0x3d32, 0x3d33, 0x3d34, 0x3d35, 0x3d36, 0x3d37, - 0x3d38, 0x3d39, 0x3d3a, 0x3d3b, 0x3d3c, 0x3d3d, 0x3d3e, 0x3d3f, - 0x3d40, 0x3d41, 0x3d42, 0x3d43, 0x3d44, 0x3d45, 0x3d46, 0x3d47, - 0x3d48, 0x3d49, 0x3d4a, 0x3d4b, 0x3d4c, 0x3d4d, 0x3d4e, 0x3d4f, - 0x3d50, 0x3d51, 0x3d52, 0x3d53, 0x3d54, 0x3d55, 0x3d56, 0x3d57, - 0x3d58, 0x3d59, 0x3d5a, 0x3d5b, 0x3d5c, 0x3d5d, 0x3d5e, 0x3d5f, - 0x3d60, 0x3d61, 0x3d62, 0x3d63, 0x3d64, 0x3d65, 0x3d66, 0x3d67, - 0x3d68, 0x3d69, 0x3d6a, 0x3d6b, 0x3d6c, 0x3d6d, 0x3d6e, 0x3d6f, - 0x3d70, 0x3d71, 0x3d72, 0x3d73, 0x3d74, 0x3d75, 0x3d76, 0x3d77, - 0x3d78, 0x3d79, 0x3d7a, 0x3d7b, 0x3d7c, 0x3d7d, 0x3d7e, 0x3d7f, - 0x3d80, 0x3d81, 0x3d82, 0x3d83, 0x3d84, 0x3d85, 0x3d86, 0x3d87, - 0x3d88, 0x3d89, 0x3d8a, 0x3d8b, 0x3d8c, 0x3d8d, 0x3d8e, 0x3d8f, - 0x3d90, 0x3d91, 0x3d92, 0x3d93, 0x3d94, 0x3d95, 0x3d96, 0x3d97, - 0x3d98, 0x3d99, 0x3d9a, 0x3d9b, 0x3d9c, 0x3d9d, 0x3d9e, 0x3d9f, - 0x3da0, 0x3da1, 0x3da2, 0x3da3, 0x3da4, 0x3da5, 0x3da6, 0x3da7, - 0x3da8, 0x3da9, 0x3daa, 0x3dab, 0x3dac, 0x3dad, 0x3dae, 0x3daf, - 0x3db0, 0x3db1, 0x3db2, 0x3db3, 0x3db4, 0x3db5, 0x3db6, 0x3db7, - 0x3db8, 0x3db9, 0x3dba, 0x3dbb, 0x3dbc, 0x3dbd, 0x3dbe, 0x3dbf, - 0x3dc0, 0x3dc1, 0x3dc2, 0x3dc3, 0x3dc4, 0x3dc5, 0x3dc6, 0x3dc7, - 0x3dc8, 0x3dc9, 0x3dca, 0x3dcb, 0x3dcc, 0x3dcd, 0x3dce, 0x3dcf, - 0x3dd0, 0x3dd1, 0x3dd2, 0x3dd3, 0x3dd4, 0x3dd5, 0x3dd6, 0x3dd7, - 0x3dd8, 0x3dd9, 0x3dda, 0x3ddb, 0x3ddc, 0x3ddd, 0x3dde, 0x3ddf, - 0x3de0, 0x3de1, 0x3de2, 0x3de3, 0x3de4, 0x3de5, 0x3de6, 0x3de7, - 0x3de8, 0x3de9, 0x3dea, 0x3deb, 0x3dec, 0x3ded, 0x3dee, 0x3def, - 0x3df0, 0x3df1, 0x3df2, 0x3df3, 0x3df4, 0x3df5, 0x3df6, 0x3df7, - 0x3df8, 0x3df9, 0x3dfa, 0x3dfb, 0x3dfc, 0x3dfd, 0x3dfe, 0x3dff, - 0x3e00, 0x3e01, 0x3e02, 0x3e03, 0x3e04, 0x3e05, 0x3e06, 0x3e07, - 0x3e08, 0x3e09, 0x3e0a, 0x3e0b, 0x3e0c, 0x3e0d, 0x3e0e, 0x3e0f, - 0x3e10, 0x3e11, 0x3e12, 0x3e13, 0x3e14, 0x3e15, 0x3e16, 0x3e17, - 0x3e18, 0x3e19, 0x3e1a, 0x3e1b, 0x3e1c, 0x3e1d, 0x3e1e, 0x3e1f, - 0x3e20, 0x3e21, 0x3e22, 0x3e23, 0x3e24, 0x3e25, 0x3e26, 0x3e27, - 0x3e28, 0x3e29, 0x3e2a, 0x3e2b, 0x3e2c, 0x3e2d, 0x3e2e, 0x3e2f, - 0x3e30, 0x3e31, 0x3e32, 0x3e33, 0x3e34, 0x3e35, 0x3e36, 0x3e37, - 0x3e38, 0x3e39, 0x3e3a, 0x3e3b, 0x3e3c, 0x3e3d, 0x3e3e, 0x3e3f, - 0x3e40, 0x3e41, 0x3e42, 0x3e43, 0x3e44, 0x3e45, 0x3e46, 0x3e47, - 0x3e48, 0x3e49, 0x3e4a, 0x3e4b, 0x3e4c, 0x3e4d, 0x3e4e, 0x3e4f, - 0x3e50, 0x3e51, 0x3e52, 0x3e53, 0x3e54, 0x3e55, 0x3e56, 0x3e57, - 0x3e58, 0x3e59, 0x3e5a, 0x3e5b, 0x3e5c, 0x3e5d, 0x3e5e, 0x3e5f, - 0x3e60, 0x3e61, 0x3e62, 0x3e63, 0x3e64, 0x3e65, 0x3e66, 0x3e67, - 0x3e68, 0x3e69, 0x3e6a, 0x3e6b, 0x3e6c, 0x3e6d, 0x3e6e, 0x3e6f, - 0x3e70, 0x3e71, 0x3e72, 0x3e73, 0x3e74, 0x3e75, 0x3e76, 0x3e77, - 0x3e78, 0x3e79, 0x3e7a, 0x3e7b, 0x3e7c, 0x3e7d, 0x3e7e, 0x3e7f, - 0x3e80, 0x3e81, 0x3e82, 0x3e83, 0x3e84, 0x3e85, 0x3e86, 0x3e87, - 0x3e88, 0x3e89, 0x3e8a, 0x3e8b, 0x3e8c, 0x3e8d, 0x3e8e, 0x3e8f, - 0x3e90, 0x3e91, 0x3e92, 0x3e93, 0x3e94, 0x3e95, 0x3e96, 0x3e97, - 0x3e98, 0x3e99, 0x3e9a, 0x3e9b, 0x3e9c, 0x3e9d, 0x3e9e, 0x3e9f, - 0x3ea0, 0x3ea1, 0x3ea2, 0x3ea3, 0x3ea4, 0x3ea5, 0x3ea6, 0x3ea7, - 0x3ea8, 0x3ea9, 0x3eaa, 0x3eab, 0x3eac, 0x3ead, 0x3eae, 0x3eaf, - 0x3eb0, 0x3eb1, 0x3eb2, 0x3eb3, 0x3eb4, 0x3eb5, 0x3eb6, 0x3eb7, - 0x3eb8, 0x3eb9, 0x3eba, 0x3ebb, 0x3ebc, 0x3ebd, 0x3ebe, 0x3ebf, - 0x3ec0, 0x3ec1, 0x3ec2, 0x3ec3, 0x3ec4, 0x3ec5, 0x3ec6, 0x3ec7, - 0x3ec8, 0x3ec9, 0x3eca, 0x3ecb, 0x3ecc, 0x3ecd, 0x3ece, 0x3ecf, - 0x3ed0, 0x3ed1, 0x3ed2, 0x3ed3, 0x3ed4, 0x3ed5, 0x3ed6, 0x3ed7, - 0x3ed8, 0x3ed9, 0x3eda, 0x3edb, 0x3edc, 0x3edd, 0x3ede, 0x3edf, - 0x3ee0, 0x3ee1, 0x3ee2, 0x3ee3, 0x3ee4, 0x3ee5, 0x3ee6, 0x3ee7, - 0x3ee8, 0x3ee9, 0x3eea, 0x3eeb, 0x3eec, 0x3eed, 0x3eee, 0x3eef, - 0x3ef0, 0x3ef1, 0x3ef2, 0x3ef3, 0x3ef4, 0x3ef5, 0x3ef6, 0x3ef7, - 0x3ef8, 0x3ef9, 0x3efa, 0x3efb, 0x3efc, 0x3efd, 0x3efe, 0x3eff, - 0x3f00, 0x3f01, 0x3f02, 0x3f03, 0x3f04, 0x3f05, 0x3f06, 0x3f07, - 0x3f08, 0x3f09, 0x3f0a, 0x3f0b, 0x3f0c, 0x3f0d, 0x3f0e, 0x3f0f, - 0x3f10, 0x3f11, 0x3f12, 0x3f13, 0x3f14, 0x3f15, 0x3f16, 0x3f17, - 0x3f18, 0x3f19, 0x3f1a, 0x3f1b, 0x3f1c, 0x3f1d, 0x3f1e, 0x3f1f, - 0x3f20, 0x3f21, 0x3f22, 0x3f23, 0x3f24, 0x3f25, 0x3f26, 0x3f27, - 0x3f28, 0x3f29, 0x3f2a, 0x3f2b, 0x3f2c, 0x3f2d, 0x3f2e, 0x3f2f, - 0x3f30, 0x3f31, 0x3f32, 0x3f33, 0x3f34, 0x3f35, 0x3f36, 0x3f37, - 0x3f38, 0x3f39, 0x3f3a, 0x3f3b, 0x3f3c, 0x3f3d, 0x3f3e, 0x3f3f, - 0x3f40, 0x3f41, 0x3f42, 0x3f43, 0x3f44, 0x3f45, 0x3f46, 0x3f47, - 0x3f48, 0x3f49, 0x3f4a, 0x3f4b, 0x3f4c, 0x3f4d, 0x3f4e, 0x3f4f, - 0x3f50, 0x3f51, 0x3f52, 0x3f53, 0x3f54, 0x3f55, 0x3f56, 0x3f57, - 0x3f58, 0x3f59, 0x3f5a, 0x3f5b, 0x3f5c, 0x3f5d, 0x3f5e, 0x3f5f, - 0x3f60, 0x3f61, 0x3f62, 0x3f63, 0x3f64, 0x3f65, 0x3f66, 0x3f67, - 0x3f68, 0x3f69, 0x3f6a, 0x3f6b, 0x3f6c, 0x3f6d, 0x3f6e, 0x3f6f, - 0x3f70, 0x3f71, 0x3f72, 0x3f73, 0x3f74, 0x3f75, 0x3f76, 0x3f77, - 0x3f78, 0x3f79, 0x3f7a, 0x3f7b, 0x3f7c, 0x3f7d, 0x3f7e, 0x3f7f, - 0x3f80, 0x3f81, 0x3f82, 0x3f83, 0x3f84, 0x3f85, 0x3f86, 0x3f87, - 0x3f88, 0x3f89, 0x3f8a, 0x3f8b, 0x3f8c, 0x3f8d, 0x3f8e, 0x3f8f, - 0x3f90, 0x3f91, 0x3f92, 0x3f93, 0x3f94, 0x3f95, 0x3f96, 0x3f97, - 0x3f98, 0x3f99, 0x3f9a, 0x3f9b, 0x3f9c, 0x3f9d, 0x3f9e, 0x3f9f, - 0x3fa0, 0x3fa1, 0x3fa2, 0x3fa3, 0x3fa4, 0x3fa5, 0x3fa6, 0x3fa7, - 0x3fa8, 0x3fa9, 0x3faa, 0x3fab, 0x3fac, 0x3fad, 0x3fae, 0x3faf, - 0x3fb0, 0x3fb1, 0x3fb2, 0x3fb3, 0x3fb4, 0x3fb5, 0x3fb6, 0x3fb7, - 0x3fb8, 0x3fb9, 0x3fba, 0x3fbb, 0x3fbc, 0x3fbd, 0x3fbe, 0x3fbf, - 0x3fc0, 0x3fc1, 0x3fc2, 0x3fc3, 0x3fc4, 0x3fc5, 0x3fc6, 0x3fc7, - 0x3fc8, 0x3fc9, 0x3fca, 0x3fcb, 0x3fcc, 0x3fcd, 0x3fce, 0x3fcf, - 0x3fd0, 0x3fd1, 0x3fd2, 0x3fd3, 0x3fd4, 0x3fd5, 0x3fd6, 0x3fd7, - 0x3fd8, 0x3fd9, 0x3fda, 0x3fdb, 0x3fdc, 0x3fdd, 0x3fde, 0x3fdf, - 0x3fe0, 0x3fe1, 0x3fe2, 0x3fe3, 0x3fe4, 0x3fe5, 0x3fe6, 0x3fe7, - 0x3fe8, 0x3fe9, 0x3fea, 0x3feb, 0x3fec, 0x3fed, 0x3fee, 0x3fef, - 0x3ff0, 0x3ff1, 0x3ff2, 0x3ff3, 0x3ff4, 0x3ff5, 0x3ff6, 0x3ff7, - 0x3ff8, 0x3ff9, 0x3ffa, 0x3ffb, 0x3ffc, 0x3ffd, 0x3ffe, 0x3fff, - 0x4000, 0x4001, 0x4002, 0x4003, 0x4004, 0x4005, 0x4006, 0x4007, - 0x4008, 0x4009, 0x400a, 0x400b, 0x400c, 0x400d, 0x400e, 0x400f, - 0x4010, 0x4011, 0x4012, 0x4013, 0x4014, 0x4015, 0x4016, 0x4017, - 0x4018, 0x4019, 0x401a, 0x401b, 0x401c, 0x401d, 0x401e, 0x401f, - 0x4020, 0x4021, 0x4022, 0x4023, 0x4024, 0x4025, 0x4026, 0x4027, - 0x4028, 0x4029, 0x402a, 0x402b, 0x402c, 0x402d, 0x402e, 0x402f, - 0x4030, 0x4031, 0x4032, 0x4033, 0x4034, 0x4035, 0x4036, 0x4037, - 0x4038, 0x4039, 0x403a, 0x403b, 0x403c, 0x403d, 0x403e, 0x403f, - 0x4040, 0x4041, 0x4042, 0x4043, 0x4044, 0x4045, 0x4046, 0x4047, - 0x4048, 0x4049, 0x404a, 0x404b, 0x404c, 0x404d, 0x404e, 0x404f, - 0x4050, 0x4051, 0x4052, 0x4053, 0x4054, 0x4055, 0x4056, 0x4057, - 0x4058, 0x4059, 0x405a, 0x405b, 0x405c, 0x405d, 0x405e, 0x405f, - 0x4060, 0x4061, 0x4062, 0x4063, 0x4064, 0x4065, 0x4066, 0x4067, - 0x4068, 0x4069, 0x406a, 0x406b, 0x406c, 0x406d, 0x406e, 0x406f, - 0x4070, 0x4071, 0x4072, 0x4073, 0x4074, 0x4075, 0x4076, 0x4077, - 0x4078, 0x4079, 0x407a, 0x407b, 0x407c, 0x407d, 0x407e, 0x407f, - 0x4080, 0x4081, 0x4082, 0x4083, 0x4084, 0x4085, 0x4086, 0x4087, - 0x4088, 0x4089, 0x408a, 0x408b, 0x408c, 0x408d, 0x408e, 0x408f, - 0x4090, 0x4091, 0x4092, 0x4093, 0x4094, 0x4095, 0x4096, 0x4097, - 0x4098, 0x4099, 0x409a, 0x409b, 0x409c, 0x409d, 0x409e, 0x409f, - 0x40a0, 0x40a1, 0x40a2, 0x40a3, 0x40a4, 0x40a5, 0x40a6, 0x40a7, - 0x40a8, 0x40a9, 0x40aa, 0x40ab, 0x40ac, 0x40ad, 0x40ae, 0x40af, - 0x40b0, 0x40b1, 0x40b2, 0x40b3, 0x40b4, 0x40b5, 0x40b6, 0x40b7, - 0x40b8, 0x40b9, 0x40ba, 0x40bb, 0x40bc, 0x40bd, 0x40be, 0x40bf, - 0x40c0, 0x40c1, 0x40c2, 0x40c3, 0x40c4, 0x40c5, 0x40c6, 0x40c7, - 0x40c8, 0x40c9, 0x40ca, 0x40cb, 0x40cc, 0x40cd, 0x40ce, 0x40cf, - 0x40d0, 0x40d1, 0x40d2, 0x40d3, 0x40d4, 0x40d5, 0x40d6, 0x40d7, - 0x40d8, 0x40d9, 0x40da, 0x40db, 0x40dc, 0x40dd, 0x40de, 0x40df, - 0x40e0, 0x40e1, 0x40e2, 0x40e3, 0x40e4, 0x40e5, 0x40e6, 0x40e7, - 0x40e8, 0x40e9, 0x40ea, 0x40eb, 0x40ec, 0x40ed, 0x40ee, 0x40ef, - 0x40f0, 0x40f1, 0x40f2, 0x40f3, 0x40f4, 0x40f5, 0x40f6, 0x40f7, - 0x40f8, 0x40f9, 0x40fa, 0x40fb, 0x40fc, 0x40fd, 0x40fe, 0x40ff, - 0x4100, 0x4101, 0x4102, 0x4103, 0x4104, 0x4105, 0x4106, 0x4107, - 0x4108, 0x4109, 0x410a, 0x410b, 0x410c, 0x410d, 0x410e, 0x410f, - 0x4110, 0x4111, 0x4112, 0x4113, 0x4114, 0x4115, 0x4116, 0x4117, - 0x4118, 0x4119, 0x411a, 0x411b, 0x411c, 0x411d, 0x411e, 0x411f, - 0x4120, 0x4121, 0x4122, 0x4123, 0x4124, 0x4125, 0x4126, 0x4127, - 0x4128, 0x4129, 0x412a, 0x412b, 0x412c, 0x412d, 0x412e, 0x412f, - 0x4130, 0x4131, 0x4132, 0x4133, 0x4134, 0x4135, 0x4136, 0x4137, - 0x4138, 0x4139, 0x413a, 0x413b, 0x413c, 0x413d, 0x413e, 0x413f, - 0x4140, 0x4141, 0x4142, 0x4143, 0x4144, 0x4145, 0x4146, 0x4147, - 0x4148, 0x4149, 0x414a, 0x414b, 0x414c, 0x414d, 0x414e, 0x414f, - 0x4150, 0x4151, 0x4152, 0x4153, 0x4154, 0x4155, 0x4156, 0x4157, - 0x4158, 0x4159, 0x415a, 0x415b, 0x415c, 0x415d, 0x415e, 0x415f, - 0x4160, 0x4161, 0x4162, 0x4163, 0x4164, 0x4165, 0x4166, 0x4167, - 0x4168, 0x4169, 0x416a, 0x416b, 0x416c, 0x416d, 0x416e, 0x416f, - 0x4170, 0x4171, 0x4172, 0x4173, 0x4174, 0x4175, 0x4176, 0x4177, - 0x4178, 0x4179, 0x417a, 0x417b, 0x417c, 0x417d, 0x417e, 0x417f, - 0x4180, 0x4181, 0x4182, 0x4183, 0x4184, 0x4185, 0x4186, 0x4187, - 0x4188, 0x4189, 0x418a, 0x418b, 0x418c, 0x418d, 0x418e, 0x418f, - 0x4190, 0x4191, 0x4192, 0x4193, 0x4194, 0x4195, 0x4196, 0x4197, - 0x4198, 0x4199, 0x419a, 0x419b, 0x419c, 0x419d, 0x419e, 0x419f, - 0x41a0, 0x41a1, 0x41a2, 0x41a3, 0x41a4, 0x41a5, 0x41a6, 0x41a7, - 0x41a8, 0x41a9, 0x41aa, 0x41ab, 0x41ac, 0x41ad, 0x41ae, 0x41af, - 0x41b0, 0x41b1, 0x41b2, 0x41b3, 0x41b4, 0x41b5, 0x41b6, 0x41b7, - 0x41b8, 0x41b9, 0x41ba, 0x41bb, 0x41bc, 0x41bd, 0x41be, 0x41bf, - 0x41c0, 0x41c1, 0x41c2, 0x41c3, 0x41c4, 0x41c5, 0x41c6, 0x41c7, - 0x41c8, 0x41c9, 0x41ca, 0x41cb, 0x41cc, 0x41cd, 0x41ce, 0x41cf, - 0x41d0, 0x41d1, 0x41d2, 0x41d3, 0x41d4, 0x41d5, 0x41d6, 0x41d7, - 0x41d8, 0x41d9, 0x41da, 0x41db, 0x41dc, 0x41dd, 0x41de, 0x41df, - 0x41e0, 0x41e1, 0x41e2, 0x41e3, 0x41e4, 0x41e5, 0x41e6, 0x41e7, - 0x41e8, 0x41e9, 0x41ea, 0x41eb, 0x41ec, 0x41ed, 0x41ee, 0x41ef, - 0x41f0, 0x41f1, 0x41f2, 0x41f3, 0x41f4, 0x41f5, 0x41f6, 0x41f7, - 0x41f8, 0x41f9, 0x41fa, 0x41fb, 0x41fc, 0x41fd, 0x41fe, 0x41ff, - 0x4200, 0x4201, 0x4202, 0x4203, 0x4204, 0x4205, 0x4206, 0x4207, - 0x4208, 0x4209, 0x420a, 0x420b, 0x420c, 0x420d, 0x420e, 0x420f, - 0x4210, 0x4211, 0x4212, 0x4213, 0x4214, 0x4215, 0x4216, 0x4217, - 0x4218, 0x4219, 0x421a, 0x421b, 0x421c, 0x421d, 0x421e, 0x421f, - 0x4220, 0x4221, 0x4222, 0x4223, 0x4224, 0x4225, 0x4226, 0x4227, - 0x4228, 0x4229, 0x422a, 0x422b, 0x422c, 0x422d, 0x422e, 0x422f, - 0x4230, 0x4231, 0x4232, 0x4233, 0x4234, 0x4235, 0x4236, 0x4237, - 0x4238, 0x4239, 0x423a, 0x423b, 0x423c, 0x423d, 0x423e, 0x423f, - 0x4240, 0x4241, 0x4242, 0x4243, 0x4244, 0x4245, 0x4246, 0x4247, - 0x4248, 0x4249, 0x424a, 0x424b, 0x424c, 0x424d, 0x424e, 0x424f, - 0x4250, 0x4251, 0x4252, 0x4253, 0x4254, 0x4255, 0x4256, 0x4257, - 0x4258, 0x4259, 0x425a, 0x425b, 0x425c, 0x425d, 0x425e, 0x425f, - 0x4260, 0x4261, 0x4262, 0x4263, 0x4264, 0x4265, 0x4266, 0x4267, - 0x4268, 0x4269, 0x426a, 0x426b, 0x426c, 0x426d, 0x426e, 0x426f, - 0x4270, 0x4271, 0x4272, 0x4273, 0x4274, 0x4275, 0x4276, 0x4277, - 0x4278, 0x4279, 0x427a, 0x427b, 0x427c, 0x427d, 0x427e, 0x427f, - 0x4280, 0x4281, 0x4282, 0x4283, 0x4284, 0x4285, 0x4286, 0x4287, - 0x4288, 0x4289, 0x428a, 0x428b, 0x428c, 0x428d, 0x428e, 0x428f, - 0x4290, 0x4291, 0x4292, 0x4293, 0x4294, 0x4295, 0x4296, 0x4297, - 0x4298, 0x4299, 0x429a, 0x429b, 0x429c, 0x429d, 0x429e, 0x429f, - 0x42a0, 0x42a1, 0x42a2, 0x42a3, 0x42a4, 0x42a5, 0x42a6, 0x42a7, - 0x42a8, 0x42a9, 0x42aa, 0x42ab, 0x42ac, 0x42ad, 0x42ae, 0x42af, - 0x42b0, 0x42b1, 0x42b2, 0x42b3, 0x42b4, 0x42b5, 0x42b6, 0x42b7, - 0x42b8, 0x42b9, 0x42ba, 0x42bb, 0x42bc, 0x42bd, 0x42be, 0x42bf, - 0x42c0, 0x42c1, 0x42c2, 0x42c3, 0x42c4, 0x42c5, 0x42c6, 0x42c7, - 0x42c8, 0x42c9, 0x42ca, 0x42cb, 0x42cc, 0x42cd, 0x42ce, 0x42cf, - 0x42d0, 0x42d1, 0x42d2, 0x42d3, 0x42d4, 0x42d5, 0x42d6, 0x42d7, - 0x42d8, 0x42d9, 0x42da, 0x42db, 0x42dc, 0x42dd, 0x42de, 0x42df, - 0x42e0, 0x42e1, 0x42e2, 0x42e3, 0x42e4, 0x42e5, 0x42e6, 0x42e7, - 0x42e8, 0x42e9, 0x42ea, 0x42eb, 0x42ec, 0x42ed, 0x42ee, 0x42ef, - 0x42f0, 0x42f1, 0x42f2, 0x42f3, 0x42f4, 0x42f5, 0x42f6, 0x42f7, - 0x42f8, 0x42f9, 0x42fa, 0x42fb, 0x42fc, 0x42fd, 0x42fe, 0x42ff, - 0x4300, 0x4301, 0x4302, 0x4303, 0x4304, 0x4305, 0x4306, 0x4307, - 0x4308, 0x4309, 0x430a, 0x430b, 0x430c, 0x430d, 0x430e, 0x430f, - 0x4310, 0x4311, 0x4312, 0x4313, 0x4314, 0x4315, 0x4316, 0x4317, - 0x4318, 0x4319, 0x431a, 0x431b, 0x431c, 0x431d, 0x431e, 0x431f, - 0x4320, 0x4321, 0x4322, 0x4323, 0x4324, 0x4325, 0x4326, 0x4327, - 0x4328, 0x4329, 0x432a, 0x432b, 0x432c, 0x432d, 0x432e, 0x432f, - 0x4330, 0x4331, 0x4332, 0x4333, 0x4334, 0x4335, 0x4336, 0x4337, - 0x4338, 0x4339, 0x433a, 0x433b, 0x433c, 0x433d, 0x433e, 0x433f, - 0x4340, 0x4341, 0x4342, 0x4343, 0x4344, 0x4345, 0x4346, 0x4347, - 0x4348, 0x4349, 0x434a, 0x434b, 0x434c, 0x434d, 0x434e, 0x434f, - 0x4350, 0x4351, 0x4352, 0x4353, 0x4354, 0x4355, 0x4356, 0x4357, - 0x4358, 0x4359, 0x435a, 0x435b, 0x435c, 0x435d, 0x435e, 0x435f, - 0x4360, 0x4361, 0x4362, 0x4363, 0x4364, 0x4365, 0x4366, 0x4367, - 0x4368, 0x4369, 0x436a, 0x436b, 0x436c, 0x436d, 0x436e, 0x436f, - 0x4370, 0x4371, 0x4372, 0x4373, 0x4374, 0x4375, 0x4376, 0x4377, - 0x4378, 0x4379, 0x437a, 0x437b, 0x437c, 0x437d, 0x437e, 0x437f, - 0x4380, 0x4381, 0x4382, 0x4383, 0x4384, 0x4385, 0x4386, 0x4387, - 0x4388, 0x4389, 0x438a, 0x438b, 0x438c, 0x438d, 0x438e, 0x438f, - 0x4390, 0x4391, 0x4392, 0x4393, 0x4394, 0x4395, 0x4396, 0x4397, - 0x4398, 0x4399, 0x439a, 0x439b, 0x439c, 0x439d, 0x439e, 0x439f, - 0x43a0, 0x43a1, 0x43a2, 0x43a3, 0x43a4, 0x43a5, 0x43a6, 0x43a7, - 0x43a8, 0x43a9, 0x43aa, 0x43ab, 0x43ac, 0x43ad, 0x43ae, 0x43af, - 0x43b0, 0x43b1, 0x43b2, 0x43b3, 0x43b4, 0x43b5, 0x43b6, 0x43b7, - 0x43b8, 0x43b9, 0x43ba, 0x43bb, 0x43bc, 0x43bd, 0x43be, 0x43bf, - 0x43c0, 0x43c1, 0x43c2, 0x43c3, 0x43c4, 0x43c5, 0x43c6, 0x43c7, - 0x43c8, 0x43c9, 0x43ca, 0x43cb, 0x43cc, 0x43cd, 0x43ce, 0x43cf, - 0x43d0, 0x43d1, 0x43d2, 0x43d3, 0x43d4, 0x43d5, 0x43d6, 0x43d7, - 0x43d8, 0x43d9, 0x43da, 0x43db, 0x43dc, 0x43dd, 0x43de, 0x43df, - 0x43e0, 0x43e1, 0x43e2, 0x43e3, 0x43e4, 0x43e5, 0x43e6, 0x43e7, - 0x43e8, 0x43e9, 0x43ea, 0x43eb, 0x43ec, 0x43ed, 0x43ee, 0x43ef, - 0x43f0, 0x43f1, 0x43f2, 0x43f3, 0x43f4, 0x43f5, 0x43f6, 0x43f7, - 0x43f8, 0x43f9, 0x43fa, 0x43fb, 0x43fc, 0x43fd, 0x43fe, 0x43ff, - 0x4400, 0x4401, 0x4402, 0x4403, 0x4404, 0x4405, 0x4406, 0x4407, - 0x4408, 0x4409, 0x440a, 0x440b, 0x440c, 0x440d, 0x440e, 0x440f, - 0x4410, 0x4411, 0x4412, 0x4413, 0x4414, 0x4415, 0x4416, 0x4417, - 0x4418, 0x4419, 0x441a, 0x441b, 0x441c, 0x441d, 0x441e, 0x441f, - 0x4420, 0x4421, 0x4422, 0x4423, 0x4424, 0x4425, 0x4426, 0x4427, - 0x4428, 0x4429, 0x442a, 0x442b, 0x442c, 0x442d, 0x442e, 0x442f, - 0x4430, 0x4431, 0x4432, 0x4433, 0x4434, 0x4435, 0x4436, 0x4437, - 0x4438, 0x4439, 0x443a, 0x443b, 0x443c, 0x443d, 0x443e, 0x443f, - 0x4440, 0x4441, 0x4442, 0x4443, 0x4444, 0x4445, 0x4446, 0x4447, - 0x4448, 0x4449, 0x444a, 0x444b, 0x444c, 0x444d, 0x444e, 0x444f, - 0x4450, 0x4451, 0x4452, 0x4453, 0x4454, 0x4455, 0x4456, 0x4457, - 0x4458, 0x4459, 0x445a, 0x445b, 0x445c, 0x445d, 0x445e, 0x445f, - 0x4460, 0x4461, 0x4462, 0x4463, 0x4464, 0x4465, 0x4466, 0x4467, - 0x4468, 0x4469, 0x446a, 0x446b, 0x446c, 0x446d, 0x446e, 0x446f, - 0x4470, 0x4471, 0x4472, 0x4473, 0x4474, 0x4475, 0x4476, 0x4477, - 0x4478, 0x4479, 0x447a, 0x447b, 0x447c, 0x447d, 0x447e, 0x447f, - 0x4480, 0x4481, 0x4482, 0x4483, 0x4484, 0x4485, 0x4486, 0x4487, - 0x4488, 0x4489, 0x448a, 0x448b, 0x448c, 0x448d, 0x448e, 0x448f, - 0x4490, 0x4491, 0x4492, 0x4493, 0x4494, 0x4495, 0x4496, 0x4497, - 0x4498, 0x4499, 0x449a, 0x449b, 0x449c, 0x449d, 0x449e, 0x449f, - 0x44a0, 0x44a1, 0x44a2, 0x44a3, 0x44a4, 0x44a5, 0x44a6, 0x44a7, - 0x44a8, 0x44a9, 0x44aa, 0x44ab, 0x44ac, 0x44ad, 0x44ae, 0x44af, - 0x44b0, 0x44b1, 0x44b2, 0x44b3, 0x44b4, 0x44b5, 0x44b6, 0x44b7, - 0x44b8, 0x44b9, 0x44ba, 0x44bb, 0x44bc, 0x44bd, 0x44be, 0x44bf, - 0x44c0, 0x44c1, 0x44c2, 0x44c3, 0x44c4, 0x44c5, 0x44c6, 0x44c7, - 0x44c8, 0x44c9, 0x44ca, 0x44cb, 0x44cc, 0x44cd, 0x44ce, 0x44cf, - 0x44d0, 0x44d1, 0x44d2, 0x44d3, 0x44d4, 0x44d5, 0x44d6, 0x44d7, - 0x44d8, 0x44d9, 0x44da, 0x44db, 0x44dc, 0x44dd, 0x44de, 0x44df, - 0x44e0, 0x44e1, 0x44e2, 0x44e3, 0x44e4, 0x44e5, 0x44e6, 0x44e7, - 0x44e8, 0x44e9, 0x44ea, 0x44eb, 0x44ec, 0x44ed, 0x44ee, 0x44ef, - 0x44f0, 0x44f1, 0x44f2, 0x44f3, 0x44f4, 0x44f5, 0x44f6, 0x44f7, - 0x44f8, 0x44f9, 0x44fa, 0x44fb, 0x44fc, 0x44fd, 0x44fe, 0x44ff, - 0x4500, 0x4501, 0x4502, 0x4503, 0x4504, 0x4505, 0x4506, 0x4507, - 0x4508, 0x4509, 0x450a, 0x450b, 0x450c, 0x450d, 0x450e, 0x450f, - 0x4510, 0x4511, 0x4512, 0x4513, 0x4514, 0x4515, 0x4516, 0x4517, - 0x4518, 0x4519, 0x451a, 0x451b, 0x451c, 0x451d, 0x451e, 0x451f, - 0x4520, 0x4521, 0x4522, 0x4523, 0x4524, 0x4525, 0x4526, 0x4527, - 0x4528, 0x4529, 0x452a, 0x452b, 0x452c, 0x452d, 0x452e, 0x452f, - 0x4530, 0x4531, 0x4532, 0x4533, 0x4534, 0x4535, 0x4536, 0x4537, - 0x4538, 0x4539, 0x453a, 0x453b, 0x453c, 0x453d, 0x453e, 0x453f, - 0x4540, 0x4541, 0x4542, 0x4543, 0x4544, 0x4545, 0x4546, 0x4547, - 0x4548, 0x4549, 0x454a, 0x454b, 0x454c, 0x454d, 0x454e, 0x454f, - 0x4550, 0x4551, 0x4552, 0x4553, 0x4554, 0x4555, 0x4556, 0x4557, - 0x4558, 0x4559, 0x455a, 0x455b, 0x455c, 0x455d, 0x455e, 0x455f, - 0x4560, 0x4561, 0x4562, 0x4563, 0x4564, 0x4565, 0x4566, 0x4567, - 0x4568, 0x4569, 0x456a, 0x456b, 0x456c, 0x456d, 0x456e, 0x456f, - 0x4570, 0x4571, 0x4572, 0x4573, 0x4574, 0x4575, 0x4576, 0x4577, - 0x4578, 0x4579, 0x457a, 0x457b, 0x457c, 0x457d, 0x457e, 0x457f, - 0x4580, 0x4581, 0x4582, 0x4583, 0x4584, 0x4585, 0x4586, 0x4587, - 0x4588, 0x4589, 0x458a, 0x458b, 0x458c, 0x458d, 0x458e, 0x458f, - 0x4590, 0x4591, 0x4592, 0x4593, 0x4594, 0x4595, 0x4596, 0x4597, - 0x4598, 0x4599, 0x459a, 0x459b, 0x459c, 0x459d, 0x459e, 0x459f, - 0x45a0, 0x45a1, 0x45a2, 0x45a3, 0x45a4, 0x45a5, 0x45a6, 0x45a7, - 0x45a8, 0x45a9, 0x45aa, 0x45ab, 0x45ac, 0x45ad, 0x45ae, 0x45af, - 0x45b0, 0x45b1, 0x45b2, 0x45b3, 0x45b4, 0x45b5, 0x45b6, 0x45b7, - 0x45b8, 0x45b9, 0x45ba, 0x45bb, 0x45bc, 0x45bd, 0x45be, 0x45bf, - 0x45c0, 0x45c1, 0x45c2, 0x45c3, 0x45c4, 0x45c5, 0x45c6, 0x45c7, - 0x45c8, 0x45c9, 0x45ca, 0x45cb, 0x45cc, 0x45cd, 0x45ce, 0x45cf, - 0x45d0, 0x45d1, 0x45d2, 0x45d3, 0x45d4, 0x45d5, 0x45d6, 0x45d7, - 0x45d8, 0x45d9, 0x45da, 0x45db, 0x45dc, 0x45dd, 0x45de, 0x45df, - 0x45e0, 0x45e1, 0x45e2, 0x45e3, 0x45e4, 0x45e5, 0x45e6, 0x45e7, - 0x45e8, 0x45e9, 0x45ea, 0x45eb, 0x45ec, 0x45ed, 0x45ee, 0x45ef, - 0x45f0, 0x45f1, 0x45f2, 0x45f3, 0x45f4, 0x45f5, 0x45f6, 0x45f7, - 0x45f8, 0x45f9, 0x45fa, 0x45fb, 0x45fc, 0x45fd, 0x45fe, 0x45ff, - 0x4600, 0x4601, 0x4602, 0x4603, 0x4604, 0x4605, 0x4606, 0x4607, - 0x4608, 0x4609, 0x460a, 0x460b, 0x460c, 0x460d, 0x460e, 0x460f, - 0x4610, 0x4611, 0x4612, 0x4613, 0x4614, 0x4615, 0x4616, 0x4617, - 0x4618, 0x4619, 0x461a, 0x461b, 0x461c, 0x461d, 0x461e, 0x461f, - 0x4620, 0x4621, 0x4622, 0x4623, 0x4624, 0x4625, 0x4626, 0x4627, - 0x4628, 0x4629, 0x462a, 0x462b, 0x462c, 0x462d, 0x462e, 0x462f, - 0x4630, 0x4631, 0x4632, 0x4633, 0x4634, 0x4635, 0x4636, 0x4637, - 0x4638, 0x4639, 0x463a, 0x463b, 0x463c, 0x463d, 0x463e, 0x463f, - 0x4640, 0x4641, 0x4642, 0x4643, 0x4644, 0x4645, 0x4646, 0x4647, - 0x4648, 0x4649, 0x464a, 0x464b, 0x464c, 0x464d, 0x464e, 0x464f, - 0x4650, 0x4651, 0x4652, 0x4653, 0x4654, 0x4655, 0x4656, 0x4657, - 0x4658, 0x4659, 0x465a, 0x465b, 0x465c, 0x465d, 0x465e, 0x465f, - 0x4660, 0x4661, 0x4662, 0x4663, 0x4664, 0x4665, 0x4666, 0x4667, - 0x4668, 0x4669, 0x466a, 0x466b, 0x466c, 0x466d, 0x466e, 0x466f, - 0x4670, 0x4671, 0x4672, 0x4673, 0x4674, 0x4675, 0x4676, 0x4677, - 0x4678, 0x4679, 0x467a, 0x467b, 0x467c, 0x467d, 0x467e, 0x467f, - 0x4680, 0x4681, 0x4682, 0x4683, 0x4684, 0x4685, 0x4686, 0x4687, - 0x4688, 0x4689, 0x468a, 0x468b, 0x468c, 0x468d, 0x468e, 0x468f, - 0x4690, 0x4691, 0x4692, 0x4693, 0x4694, 0x4695, 0x4696, 0x4697, - 0x4698, 0x4699, 0x469a, 0x469b, 0x469c, 0x469d, 0x469e, 0x469f, - 0x46a0, 0x46a1, 0x46a2, 0x46a3, 0x46a4, 0x46a5, 0x46a6, 0x46a7, - 0x46a8, 0x46a9, 0x46aa, 0x46ab, 0x46ac, 0x46ad, 0x46ae, 0x46af, - 0x46b0, 0x46b1, 0x46b2, 0x46b3, 0x46b4, 0x46b5, 0x46b6, 0x46b7, - 0x46b8, 0x46b9, 0x46ba, 0x46bb, 0x46bc, 0x46bd, 0x46be, 0x46bf, - 0x46c0, 0x46c1, 0x46c2, 0x46c3, 0x46c4, 0x46c5, 0x46c6, 0x46c7, - 0x46c8, 0x46c9, 0x46ca, 0x46cb, 0x46cc, 0x46cd, 0x46ce, 0x46cf, - 0x46d0, 0x46d1, 0x46d2, 0x46d3, 0x46d4, 0x46d5, 0x46d6, 0x46d7, - 0x46d8, 0x46d9, 0x46da, 0x46db, 0x46dc, 0x46dd, 0x46de, 0x46df, - 0x46e0, 0x46e1, 0x46e2, 0x46e3, 0x46e4, 0x46e5, 0x46e6, 0x46e7, - 0x46e8, 0x46e9, 0x46ea, 0x46eb, 0x46ec, 0x46ed, 0x46ee, 0x46ef, - 0x46f0, 0x46f1, 0x46f2, 0x46f3, 0x46f4, 0x46f5, 0x46f6, 0x46f7, - 0x46f8, 0x46f9, 0x46fa, 0x46fb, 0x46fc, 0x46fd, 0x46fe, 0x46ff, - 0x4700, 0x4701, 0x4702, 0x4703, 0x4704, 0x4705, 0x4706, 0x4707, - 0x4708, 0x4709, 0x470a, 0x470b, 0x470c, 0x470d, 0x470e, 0x470f, - 0x4710, 0x4711, 0x4712, 0x4713, 0x4714, 0x4715, 0x4716, 0x4717, - 0x4718, 0x4719, 0x471a, 0x471b, 0x471c, 0x471d, 0x471e, 0x471f, - 0x4720, 0x4721, 0x4722, 0x4723, 0x4724, 0x4725, 0x4726, 0x4727, - 0x4728, 0x4729, 0x472a, 0x472b, 0x472c, 0x472d, 0x472e, 0x472f, - 0x4730, 0x4731, 0x4732, 0x4733, 0x4734, 0x4735, 0x4736, 0x4737, - 0x4738, 0x4739, 0x473a, 0x473b, 0x473c, 0x473d, 0x473e, 0x473f, - 0x4740, 0x4741, 0x4742, 0x4743, 0x4744, 0x4745, 0x4746, 0x4747, - 0x4748, 0x4749, 0x474a, 0x474b, 0x474c, 0x474d, 0x474e, 0x474f, - 0x4750, 0x4751, 0x4752, 0x4753, 0x4754, 0x4755, 0x4756, 0x4757, - 0x4758, 0x4759, 0x475a, 0x475b, 0x475c, 0x475d, 0x475e, 0x475f, - 0x4760, 0x4761, 0x4762, 0x4763, 0x4764, 0x4765, 0x4766, 0x4767, - 0x4768, 0x4769, 0x476a, 0x476b, 0x476c, 0x476d, 0x476e, 0x476f, - 0x4770, 0x4771, 0x4772, 0x4773, 0x4774, 0x4775, 0x4776, 0x4777, - 0x4778, 0x4779, 0x477a, 0x477b, 0x477c, 0x477d, 0x477e, 0x477f, - 0x4780, 0x4781, 0x4782, 0x4783, 0x4784, 0x4785, 0x4786, 0x4787, - 0x4788, 0x4789, 0x478a, 0x478b, 0x478c, 0x478d, 0x478e, 0x478f, - 0x4790, 0x4791, 0x4792, 0x4793, 0x4794, 0x4795, 0x4796, 0x4797, - 0x4798, 0x4799, 0x479a, 0x479b, 0x479c, 0x479d, 0x479e, 0x479f, - 0x47a0, 0x47a1, 0x47a2, 0x47a3, 0x47a4, 0x47a5, 0x47a6, 0x47a7, - 0x47a8, 0x47a9, 0x47aa, 0x47ab, 0x47ac, 0x47ad, 0x47ae, 0x47af, - 0x47b0, 0x47b1, 0x47b2, 0x47b3, 0x47b4, 0x47b5, 0x47b6, 0x47b7, - 0x47b8, 0x47b9, 0x47ba, 0x47bb, 0x47bc, 0x47bd, 0x47be, 0x47bf, - 0x47c0, 0x47c1, 0x47c2, 0x47c3, 0x47c4, 0x47c5, 0x47c6, 0x47c7, - 0x47c8, 0x47c9, 0x47ca, 0x47cb, 0x47cc, 0x47cd, 0x47ce, 0x47cf, - 0x47d0, 0x47d1, 0x47d2, 0x47d3, 0x47d4, 0x47d5, 0x47d6, 0x47d7, - 0x47d8, 0x47d9, 0x47da, 0x47db, 0x47dc, 0x47dd, 0x47de, 0x47df, - 0x47e0, 0x47e1, 0x47e2, 0x47e3, 0x47e4, 0x47e5, 0x47e6, 0x47e7, - 0x47e8, 0x47e9, 0x47ea, 0x47eb, 0x47ec, 0x47ed, 0x47ee, 0x47ef, - 0x47f0, 0x47f1, 0x47f2, 0x47f3, 0x47f4, 0x47f5, 0x47f6, 0x47f7, - 0x47f8, 0x47f9, 0x47fa, 0x47fb, 0x47fc, 0x47fd, 0x47fe, 0x47ff, - 0x4800, 0x4801, 0x4802, 0x4803, 0x4804, 0x4805, 0x4806, 0x4807, - 0x4808, 0x4809, 0x480a, 0x480b, 0x480c, 0x480d, 0x480e, 0x480f, - 0x4810, 0x4811, 0x4812, 0x4813, 0x4814, 0x4815, 0x4816, 0x4817, - 0x4818, 0x4819, 0x481a, 0x481b, 0x481c, 0x481d, 0x481e, 0x481f, - 0x4820, 0x4821, 0x4822, 0x4823, 0x4824, 0x4825, 0x4826, 0x4827, - 0x4828, 0x4829, 0x482a, 0x482b, 0x482c, 0x482d, 0x482e, 0x482f, - 0x4830, 0x4831, 0x4832, 0x4833, 0x4834, 0x4835, 0x4836, 0x4837, - 0x4838, 0x4839, 0x483a, 0x483b, 0x483c, 0x483d, 0x483e, 0x483f, - 0x4840, 0x4841, 0x4842, 0x4843, 0x4844, 0x4845, 0x4846, 0x4847, - 0x4848, 0x4849, 0x484a, 0x484b, 0x484c, 0x484d, 0x484e, 0x484f, - 0x4850, 0x4851, 0x4852, 0x4853, 0x4854, 0x4855, 0x4856, 0x4857, - 0x4858, 0x4859, 0x485a, 0x485b, 0x485c, 0x485d, 0x485e, 0x485f, - 0x4860, 0x4861, 0x4862, 0x4863, 0x4864, 0x4865, 0x4866, 0x4867, - 0x4868, 0x4869, 0x486a, 0x486b, 0x486c, 0x486d, 0x486e, 0x486f, - 0x4870, 0x4871, 0x4872, 0x4873, 0x4874, 0x4875, 0x4876, 0x4877, - 0x4878, 0x4879, 0x487a, 0x487b, 0x487c, 0x487d, 0x487e, 0x487f, - 0x4880, 0x4881, 0x4882, 0x4883, 0x4884, 0x4885, 0x4886, 0x4887, - 0x4888, 0x4889, 0x488a, 0x488b, 0x488c, 0x488d, 0x488e, 0x488f, - 0x4890, 0x4891, 0x4892, 0x4893, 0x4894, 0x4895, 0x4896, 0x4897, - 0x4898, 0x4899, 0x489a, 0x489b, 0x489c, 0x489d, 0x489e, 0x489f, - 0x48a0, 0x48a1, 0x48a2, 0x48a3, 0x48a4, 0x48a5, 0x48a6, 0x48a7, - 0x48a8, 0x48a9, 0x48aa, 0x48ab, 0x48ac, 0x48ad, 0x48ae, 0x48af, - 0x48b0, 0x48b1, 0x48b2, 0x48b3, 0x48b4, 0x48b5, 0x48b6, 0x48b7, - 0x48b8, 0x48b9, 0x48ba, 0x48bb, 0x48bc, 0x48bd, 0x48be, 0x48bf, - 0x48c0, 0x48c1, 0x48c2, 0x48c3, 0x48c4, 0x48c5, 0x48c6, 0x48c7, - 0x48c8, 0x48c9, 0x48ca, 0x48cb, 0x48cc, 0x48cd, 0x48ce, 0x48cf, - 0x48d0, 0x48d1, 0x48d2, 0x48d3, 0x48d4, 0x48d5, 0x48d6, 0x48d7, - 0x48d8, 0x48d9, 0x48da, 0x48db, 0x48dc, 0x48dd, 0x48de, 0x48df, - 0x48e0, 0x48e1, 0x48e2, 0x48e3, 0x48e4, 0x48e5, 0x48e6, 0x48e7, - 0x48e8, 0x48e9, 0x48ea, 0x48eb, 0x48ec, 0x48ed, 0x48ee, 0x48ef, - 0x48f0, 0x48f1, 0x48f2, 0x48f3, 0x48f4, 0x48f5, 0x48f6, 0x48f7, - 0x48f8, 0x48f9, 0x48fa, 0x48fb, 0x48fc, 0x48fd, 0x48fe, 0x48ff, - 0x4900, 0x4901, 0x4902, 0x4903, 0x4904, 0x4905, 0x4906, 0x4907, - 0x4908, 0x4909, 0x490a, 0x490b, 0x490c, 0x490d, 0x490e, 0x490f, - 0x4910, 0x4911, 0x4912, 0x4913, 0x4914, 0x4915, 0x4916, 0x4917, - 0x4918, 0x4919, 0x491a, 0x491b, 0x491c, 0x491d, 0x491e, 0x491f, - 0x4920, 0x4921, 0x4922, 0x4923, 0x4924, 0x4925, 0x4926, 0x4927, - 0x4928, 0x4929, 0x492a, 0x492b, 0x492c, 0x492d, 0x492e, 0x492f, - 0x4930, 0x4931, 0x4932, 0x4933, 0x4934, 0x4935, 0x4936, 0x4937, - 0x4938, 0x4939, 0x493a, 0x493b, 0x493c, 0x493d, 0x493e, 0x493f, - 0x4940, 0x4941, 0x4942, 0x4943, 0x4944, 0x4945, 0x4946, 0x4947, - 0x4948, 0x4949, 0x494a, 0x494b, 0x494c, 0x494d, 0x494e, 0x494f, - 0x4950, 0x4951, 0x4952, 0x4953, 0x4954, 0x4955, 0x4956, 0x4957, - 0x4958, 0x4959, 0x495a, 0x495b, 0x495c, 0x495d, 0x495e, 0x495f, - 0x4960, 0x4961, 0x4962, 0x4963, 0x4964, 0x4965, 0x4966, 0x4967, - 0x4968, 0x4969, 0x496a, 0x496b, 0x496c, 0x496d, 0x496e, 0x496f, - 0x4970, 0x4971, 0x4972, 0x4973, 0x4974, 0x4975, 0x4976, 0x4977, - 0x4978, 0x4979, 0x497a, 0x497b, 0x497c, 0x497d, 0x497e, 0x497f, - 0x4980, 0x4981, 0x4982, 0x4983, 0x4984, 0x4985, 0x4986, 0x4987, - 0x4988, 0x4989, 0x498a, 0x498b, 0x498c, 0x498d, 0x498e, 0x498f, - 0x4990, 0x4991, 0x4992, 0x4993, 0x4994, 0x4995, 0x4996, 0x4997, - 0x4998, 0x4999, 0x499a, 0x499b, 0x499c, 0x499d, 0x499e, 0x499f, - 0x49a0, 0x49a1, 0x49a2, 0x49a3, 0x49a4, 0x49a5, 0x49a6, 0x49a7, - 0x49a8, 0x49a9, 0x49aa, 0x49ab, 0x49ac, 0x49ad, 0x49ae, 0x49af, - 0x49b0, 0x49b1, 0x49b2, 0x49b3, 0x49b4, 0x49b5, 0x49b6, 0x49b7, - 0x49b8, 0x49b9, 0x49ba, 0x49bb, 0x49bc, 0x49bd, 0x49be, 0x49bf, - 0x49c0, 0x49c1, 0x49c2, 0x49c3, 0x49c4, 0x49c5, 0x49c6, 0x49c7, - 0x49c8, 0x49c9, 0x49ca, 0x49cb, 0x49cc, 0x49cd, 0x49ce, 0x49cf, - 0x49d0, 0x49d1, 0x49d2, 0x49d3, 0x49d4, 0x49d5, 0x49d6, 0x49d7, - 0x49d8, 0x49d9, 0x49da, 0x49db, 0x49dc, 0x49dd, 0x49de, 0x49df, - 0x49e0, 0x49e1, 0x49e2, 0x49e3, 0x49e4, 0x49e5, 0x49e6, 0x49e7, - 0x49e8, 0x49e9, 0x49ea, 0x49eb, 0x49ec, 0x49ed, 0x49ee, 0x49ef, - 0x49f0, 0x49f1, 0x49f2, 0x49f3, 0x49f4, 0x49f5, 0x49f6, 0x49f7, - 0x49f8, 0x49f9, 0x49fa, 0x49fb, 0x49fc, 0x49fd, 0x49fe, 0x49ff, - 0x4a00, 0x4a01, 0x4a02, 0x4a03, 0x4a04, 0x4a05, 0x4a06, 0x4a07, - 0x4a08, 0x4a09, 0x4a0a, 0x4a0b, 0x4a0c, 0x4a0d, 0x4a0e, 0x4a0f, - 0x4a10, 0x4a11, 0x4a12, 0x4a13, 0x4a14, 0x4a15, 0x4a16, 0x4a17, - 0x4a18, 0x4a19, 0x4a1a, 0x4a1b, 0x4a1c, 0x4a1d, 0x4a1e, 0x4a1f, - 0x4a20, 0x4a21, 0x4a22, 0x4a23, 0x4a24, 0x4a25, 0x4a26, 0x4a27, - 0x4a28, 0x4a29, 0x4a2a, 0x4a2b, 0x4a2c, 0x4a2d, 0x4a2e, 0x4a2f, - 0x4a30, 0x4a31, 0x4a32, 0x4a33, 0x4a34, 0x4a35, 0x4a36, 0x4a37, - 0x4a38, 0x4a39, 0x4a3a, 0x4a3b, 0x4a3c, 0x4a3d, 0x4a3e, 0x4a3f, - 0x4a40, 0x4a41, 0x4a42, 0x4a43, 0x4a44, 0x4a45, 0x4a46, 0x4a47, - 0x4a48, 0x4a49, 0x4a4a, 0x4a4b, 0x4a4c, 0x4a4d, 0x4a4e, 0x4a4f, - 0x4a50, 0x4a51, 0x4a52, 0x4a53, 0x4a54, 0x4a55, 0x4a56, 0x4a57, - 0x4a58, 0x4a59, 0x4a5a, 0x4a5b, 0x4a5c, 0x4a5d, 0x4a5e, 0x4a5f, - 0x4a60, 0x4a61, 0x4a62, 0x4a63, 0x4a64, 0x4a65, 0x4a66, 0x4a67, - 0x4a68, 0x4a69, 0x4a6a, 0x4a6b, 0x4a6c, 0x4a6d, 0x4a6e, 0x4a6f, - 0x4a70, 0x4a71, 0x4a72, 0x4a73, 0x4a74, 0x4a75, 0x4a76, 0x4a77, - 0x4a78, 0x4a79, 0x4a7a, 0x4a7b, 0x4a7c, 0x4a7d, 0x4a7e, 0x4a7f, - 0x4a80, 0x4a81, 0x4a82, 0x4a83, 0x4a84, 0x4a85, 0x4a86, 0x4a87, - 0x4a88, 0x4a89, 0x4a8a, 0x4a8b, 0x4a8c, 0x4a8d, 0x4a8e, 0x4a8f, - 0x4a90, 0x4a91, 0x4a92, 0x4a93, 0x4a94, 0x4a95, 0x4a96, 0x4a97, - 0x4a98, 0x4a99, 0x4a9a, 0x4a9b, 0x4a9c, 0x4a9d, 0x4a9e, 0x4a9f, - 0x4aa0, 0x4aa1, 0x4aa2, 0x4aa3, 0x4aa4, 0x4aa5, 0x4aa6, 0x4aa7, - 0x4aa8, 0x4aa9, 0x4aaa, 0x4aab, 0x4aac, 0x4aad, 0x4aae, 0x4aaf, - 0x4ab0, 0x4ab1, 0x4ab2, 0x4ab3, 0x4ab4, 0x4ab5, 0x4ab6, 0x4ab7, - 0x4ab8, 0x4ab9, 0x4aba, 0x4abb, 0x4abc, 0x4abd, 0x4abe, 0x4abf, - 0x4ac0, 0x4ac1, 0x4ac2, 0x4ac3, 0x4ac4, 0x4ac5, 0x4ac6, 0x4ac7, - 0x4ac8, 0x4ac9, 0x4aca, 0x4acb, 0x4acc, 0x4acd, 0x4ace, 0x4acf, - 0x4ad0, 0x4ad1, 0x4ad2, 0x4ad3, 0x4ad4, 0x4ad5, 0x4ad6, 0x4ad7, - 0x4ad8, 0x4ad9, 0x4ada, 0x4adb, 0x4adc, 0x4add, 0x4ade, 0x4adf, - 0x4ae0, 0x4ae1, 0x4ae2, 0x4ae3, 0x4ae4, 0x4ae5, 0x4ae6, 0x4ae7, - 0x4ae8, 0x4ae9, 0x4aea, 0x4aeb, 0x4aec, 0x4aed, 0x4aee, 0x4aef, - 0x4af0, 0x4af1, 0x4af2, 0x4af3, 0x4af4, 0x4af5, 0x4af6, 0x4af7, - 0x4af8, 0x4af9, 0x4afa, 0x4afb, 0x4afc, 0x4afd, 0x4afe, 0x4aff, - 0x4b00, 0x4b01, 0x4b02, 0x4b03, 0x4b04, 0x4b05, 0x4b06, 0x4b07, - 0x4b08, 0x4b09, 0x4b0a, 0x4b0b, 0x4b0c, 0x4b0d, 0x4b0e, 0x4b0f, - 0x4b10, 0x4b11, 0x4b12, 0x4b13, 0x4b14, 0x4b15, 0x4b16, 0x4b17, - 0x4b18, 0x4b19, 0x4b1a, 0x4b1b, 0x4b1c, 0x4b1d, 0x4b1e, 0x4b1f, - 0x4b20, 0x4b21, 0x4b22, 0x4b23, 0x4b24, 0x4b25, 0x4b26, 0x4b27, - 0x4b28, 0x4b29, 0x4b2a, 0x4b2b, 0x4b2c, 0x4b2d, 0x4b2e, 0x4b2f, - 0x4b30, 0x4b31, 0x4b32, 0x4b33, 0x4b34, 0x4b35, 0x4b36, 0x4b37, - 0x4b38, 0x4b39, 0x4b3a, 0x4b3b, 0x4b3c, 0x4b3d, 0x4b3e, 0x4b3f, - 0x4b40, 0x4b41, 0x4b42, 0x4b43, 0x4b44, 0x4b45, 0x4b46, 0x4b47, - 0x4b48, 0x4b49, 0x4b4a, 0x4b4b, 0x4b4c, 0x4b4d, 0x4b4e, 0x4b4f, - 0x4b50, 0x4b51, 0x4b52, 0x4b53, 0x4b54, 0x4b55, 0x4b56, 0x4b57, - 0x4b58, 0x4b59, 0x4b5a, 0x4b5b, 0x4b5c, 0x4b5d, 0x4b5e, 0x4b5f, - 0x4b60, 0x4b61, 0x4b62, 0x4b63, 0x4b64, 0x4b65, 0x4b66, 0x4b67, - 0x4b68, 0x4b69, 0x4b6a, 0x4b6b, 0x4b6c, 0x4b6d, 0x4b6e, 0x4b6f, - 0x4b70, 0x4b71, 0x4b72, 0x4b73, 0x4b74, 0x4b75, 0x4b76, 0x4b77, - 0x4b78, 0x4b79, 0x4b7a, 0x4b7b, 0x4b7c, 0x4b7d, 0x4b7e, 0x4b7f, - 0x4b80, 0x4b81, 0x4b82, 0x4b83, 0x4b84, 0x4b85, 0x4b86, 0x4b87, - 0x4b88, 0x4b89, 0x4b8a, 0x4b8b, 0x4b8c, 0x4b8d, 0x4b8e, 0x4b8f, - 0x4b90, 0x4b91, 0x4b92, 0x4b93, 0x4b94, 0x4b95, 0x4b96, 0x4b97, - 0x4b98, 0x4b99, 0x4b9a, 0x4b9b, 0x4b9c, 0x4b9d, 0x4b9e, 0x4b9f, - 0x4ba0, 0x4ba1, 0x4ba2, 0x4ba3, 0x4ba4, 0x4ba5, 0x4ba6, 0x4ba7, - 0x4ba8, 0x4ba9, 0x4baa, 0x4bab, 0x4bac, 0x4bad, 0x4bae, 0x4baf, - 0x4bb0, 0x4bb1, 0x4bb2, 0x4bb3, 0x4bb4, 0x4bb5, 0x4bb6, 0x4bb7, - 0x4bb8, 0x4bb9, 0x4bba, 0x4bbb, 0x4bbc, 0x4bbd, 0x4bbe, 0x4bbf, - 0x4bc0, 0x4bc1, 0x4bc2, 0x4bc3, 0x4bc4, 0x4bc5, 0x4bc6, 0x4bc7, - 0x4bc8, 0x4bc9, 0x4bca, 0x4bcb, 0x4bcc, 0x4bcd, 0x4bce, 0x4bcf, - 0x4bd0, 0x4bd1, 0x4bd2, 0x4bd3, 0x4bd4, 0x4bd5, 0x4bd6, 0x4bd7, - 0x4bd8, 0x4bd9, 0x4bda, 0x4bdb, 0x4bdc, 0x4bdd, 0x4bde, 0x4bdf, - 0x4be0, 0x4be1, 0x4be2, 0x4be3, 0x4be4, 0x4be5, 0x4be6, 0x4be7, - 0x4be8, 0x4be9, 0x4bea, 0x4beb, 0x4bec, 0x4bed, 0x4bee, 0x4bef, - 0x4bf0, 0x4bf1, 0x4bf2, 0x4bf3, 0x4bf4, 0x4bf5, 0x4bf6, 0x4bf7, - 0x4bf8, 0x4bf9, 0x4bfa, 0x4bfb, 0x4bfc, 0x4bfd, 0x4bfe, 0x4bff, - 0x4c00, 0x4c01, 0x4c02, 0x4c03, 0x4c04, 0x4c05, 0x4c06, 0x4c07, - 0x4c08, 0x4c09, 0x4c0a, 0x4c0b, 0x4c0c, 0x4c0d, 0x4c0e, 0x4c0f, - 0x4c10, 0x4c11, 0x4c12, 0x4c13, 0x4c14, 0x4c15, 0x4c16, 0x4c17, - 0x4c18, 0x4c19, 0x4c1a, 0x4c1b, 0x4c1c, 0x4c1d, 0x4c1e, 0x4c1f, - 0x4c20, 0x4c21, 0x4c22, 0x4c23, 0x4c24, 0x4c25, 0x4c26, 0x4c27, - 0x4c28, 0x4c29, 0x4c2a, 0x4c2b, 0x4c2c, 0x4c2d, 0x4c2e, 0x4c2f, - 0x4c30, 0x4c31, 0x4c32, 0x4c33, 0x4c34, 0x4c35, 0x4c36, 0x4c37, - 0x4c38, 0x4c39, 0x4c3a, 0x4c3b, 0x4c3c, 0x4c3d, 0x4c3e, 0x4c3f, - 0x4c40, 0x4c41, 0x4c42, 0x4c43, 0x4c44, 0x4c45, 0x4c46, 0x4c47, - 0x4c48, 0x4c49, 0x4c4a, 0x4c4b, 0x4c4c, 0x4c4d, 0x4c4e, 0x4c4f, - 0x4c50, 0x4c51, 0x4c52, 0x4c53, 0x4c54, 0x4c55, 0x4c56, 0x4c57, - 0x4c58, 0x4c59, 0x4c5a, 0x4c5b, 0x4c5c, 0x4c5d, 0x4c5e, 0x4c5f, - 0x4c60, 0x4c61, 0x4c62, 0x4c63, 0x4c64, 0x4c65, 0x4c66, 0x4c67, - 0x4c68, 0x4c69, 0x4c6a, 0x4c6b, 0x4c6c, 0x4c6d, 0x4c6e, 0x4c6f, - 0x4c70, 0x4c71, 0x4c72, 0x4c73, 0x4c74, 0x4c75, 0x4c76, 0x4c77, - 0x4c78, 0x4c79, 0x4c7a, 0x4c7b, 0x4c7c, 0x4c7d, 0x4c7e, 0x4c7f, - 0x4c80, 0x4c81, 0x4c82, 0x4c83, 0x4c84, 0x4c85, 0x4c86, 0x4c87, - 0x4c88, 0x4c89, 0x4c8a, 0x4c8b, 0x4c8c, 0x4c8d, 0x4c8e, 0x4c8f, - 0x4c90, 0x4c91, 0x4c92, 0x4c93, 0x4c94, 0x4c95, 0x4c96, 0x4c97, - 0x4c98, 0x4c99, 0x4c9a, 0x4c9b, 0x4c9c, 0x4c9d, 0x4c9e, 0x4c9f, - 0x4ca0, 0x4ca1, 0x4ca2, 0x4ca3, 0x4ca4, 0x4ca5, 0x4ca6, 0x4ca7, - 0x4ca8, 0x4ca9, 0x4caa, 0x4cab, 0x4cac, 0x4cad, 0x4cae, 0x4caf, - 0x4cb0, 0x4cb1, 0x4cb2, 0x4cb3, 0x4cb4, 0x4cb5, 0x4cb6, 0x4cb7, - 0x4cb8, 0x4cb9, 0x4cba, 0x4cbb, 0x4cbc, 0x4cbd, 0x4cbe, 0x4cbf, - 0x4cc0, 0x4cc1, 0x4cc2, 0x4cc3, 0x4cc4, 0x4cc5, 0x4cc6, 0x4cc7, - 0x4cc8, 0x4cc9, 0x4cca, 0x4ccb, 0x4ccc, 0x4ccd, 0x4cce, 0x4ccf, - 0x4cd0, 0x4cd1, 0x4cd2, 0x4cd3, 0x4cd4, 0x4cd5, 0x4cd6, 0x4cd7, - 0x4cd8, 0x4cd9, 0x4cda, 0x4cdb, 0x4cdc, 0x4cdd, 0x4cde, 0x4cdf, - 0x4ce0, 0x4ce1, 0x4ce2, 0x4ce3, 0x4ce4, 0x4ce5, 0x4ce6, 0x4ce7, - 0x4ce8, 0x4ce9, 0x4cea, 0x4ceb, 0x4cec, 0x4ced, 0x4cee, 0x4cef, - 0x4cf0, 0x4cf1, 0x4cf2, 0x4cf3, 0x4cf4, 0x4cf5, 0x4cf6, 0x4cf7, - 0x4cf8, 0x4cf9, 0x4cfa, 0x4cfb, 0x4cfc, 0x4cfd, 0x4cfe, 0x4cff, - 0x4d00, 0x4d01, 0x4d02, 0x4d03, 0x4d04, 0x4d05, 0x4d06, 0x4d07, - 0x4d08, 0x4d09, 0x4d0a, 0x4d0b, 0x4d0c, 0x4d0d, 0x4d0e, 0x4d0f, - 0x4d10, 0x4d11, 0x4d12, 0x4d13, 0x4d14, 0x4d15, 0x4d16, 0x4d17, - 0x4d18, 0x4d19, 0x4d1a, 0x4d1b, 0x4d1c, 0x4d1d, 0x4d1e, 0x4d1f, - 0x4d20, 0x4d21, 0x4d22, 0x4d23, 0x4d24, 0x4d25, 0x4d26, 0x4d27, - 0x4d28, 0x4d29, 0x4d2a, 0x4d2b, 0x4d2c, 0x4d2d, 0x4d2e, 0x4d2f, - 0x4d30, 0x4d31, 0x4d32, 0x4d33, 0x4d34, 0x4d35, 0x4d36, 0x4d37, - 0x4d38, 0x4d39, 0x4d3a, 0x4d3b, 0x4d3c, 0x4d3d, 0x4d3e, 0x4d3f, - 0x4d40, 0x4d41, 0x4d42, 0x4d43, 0x4d44, 0x4d45, 0x4d46, 0x4d47, - 0x4d48, 0x4d49, 0x4d4a, 0x4d4b, 0x4d4c, 0x4d4d, 0x4d4e, 0x4d4f, - 0x4d50, 0x4d51, 0x4d52, 0x4d53, 0x4d54, 0x4d55, 0x4d56, 0x4d57, - 0x4d58, 0x4d59, 0x4d5a, 0x4d5b, 0x4d5c, 0x4d5d, 0x4d5e, 0x4d5f, - 0x4d60, 0x4d61, 0x4d62, 0x4d63, 0x4d64, 0x4d65, 0x4d66, 0x4d67, - 0x4d68, 0x4d69, 0x4d6a, 0x4d6b, 0x4d6c, 0x4d6d, 0x4d6e, 0x4d6f, - 0x4d70, 0x4d71, 0x4d72, 0x4d73, 0x4d74, 0x4d75, 0x4d76, 0x4d77, - 0x4d78, 0x4d79, 0x4d7a, 0x4d7b, 0x4d7c, 0x4d7d, 0x4d7e, 0x4d7f, - 0x4d80, 0x4d81, 0x4d82, 0x4d83, 0x4d84, 0x4d85, 0x4d86, 0x4d87, - 0x4d88, 0x4d89, 0x4d8a, 0x4d8b, 0x4d8c, 0x4d8d, 0x4d8e, 0x4d8f, - 0x4d90, 0x4d91, 0x4d92, 0x4d93, 0x4d94, 0x4d95, 0x4d96, 0x4d97, - 0x4d98, 0x4d99, 0x4d9a, 0x4d9b, 0x4d9c, 0x4d9d, 0x4d9e, 0x4d9f, - 0x4da0, 0x4da1, 0x4da2, 0x4da3, 0x4da4, 0x4da5, 0x4da6, 0x4da7, - 0x4da8, 0x4da9, 0x4daa, 0x4dab, 0x4dac, 0x4dad, 0x4dae, 0x4daf, - 0x4db0, 0x4db1, 0x4db2, 0x4db3, 0x4db4, 0x4db5, 0x4db6, 0x4db7, - 0x4db8, 0x4db9, 0x4dba, 0x4dbb, 0x4dbc, 0x4dbd, 0x4dbe, 0x4dbf, - 0x4dc0, 0x4dc1, 0x4dc2, 0x4dc3, 0x4dc4, 0x4dc5, 0x4dc6, 0x4dc7, - 0x4dc8, 0x4dc9, 0x4dca, 0x4dcb, 0x4dcc, 0x4dcd, 0x4dce, 0x4dcf, - 0x4dd0, 0x4dd1, 0x4dd2, 0x4dd3, 0x4dd4, 0x4dd5, 0x4dd6, 0x4dd7, - 0x4dd8, 0x4dd9, 0x4dda, 0x4ddb, 0x4ddc, 0x4ddd, 0x4dde, 0x4ddf, - 0x4de0, 0x4de1, 0x4de2, 0x4de3, 0x4de4, 0x4de5, 0x4de6, 0x4de7, - 0x4de8, 0x4de9, 0x4dea, 0x4deb, 0x4dec, 0x4ded, 0x4dee, 0x4def, - 0x4df0, 0x4df1, 0x4df2, 0x4df3, 0x4df4, 0x4df5, 0x4df6, 0x4df7, - 0x4df8, 0x4df9, 0x4dfa, 0x4dfb, 0x4dfc, 0x4dfd, 0x4dfe, 0x4dff, - 0x4e00, 0x4e01, 0x4e02, 0x4e03, 0x4e04, 0x4e05, 0x4e06, 0x4e07, - 0x4e08, 0x4e09, 0x4e0a, 0x4e0b, 0x4e0c, 0x4e0d, 0x4e0e, 0x4e0f, - 0x4e10, 0x4e11, 0x4e12, 0x4e13, 0x4e14, 0x4e15, 0x4e16, 0x4e17, - 0x4e18, 0x4e19, 0x4e1a, 0x4e1b, 0x4e1c, 0x4e1d, 0x4e1e, 0x4e1f, - 0x4e20, 0x4e21, 0x4e22, 0x4e23, 0x4e24, 0x4e25, 0x4e26, 0x4e27, - 0x4e28, 0x4e29, 0x4e2a, 0x4e2b, 0x4e2c, 0x4e2d, 0x4e2e, 0x4e2f, - 0x4e30, 0x4e31, 0x4e32, 0x4e33, 0x4e34, 0x4e35, 0x4e36, 0x4e37, - 0x4e38, 0x4e39, 0x4e3a, 0x4e3b, 0x4e3c, 0x4e3d, 0x4e3e, 0x4e3f, - 0x4e40, 0x4e41, 0x4e42, 0x4e43, 0x4e44, 0x4e45, 0x4e46, 0x4e47, - 0x4e48, 0x4e49, 0x4e4a, 0x4e4b, 0x4e4c, 0x4e4d, 0x4e4e, 0x4e4f, - 0x4e50, 0x4e51, 0x4e52, 0x4e53, 0x4e54, 0x4e55, 0x4e56, 0x4e57, - 0x4e58, 0x4e59, 0x4e5a, 0x4e5b, 0x4e5c, 0x4e5d, 0x4e5e, 0x4e5f, - 0x4e60, 0x4e61, 0x4e62, 0x4e63, 0x4e64, 0x4e65, 0x4e66, 0x4e67, - 0x4e68, 0x4e69, 0x4e6a, 0x4e6b, 0x4e6c, 0x4e6d, 0x4e6e, 0x4e6f, - 0x4e70, 0x4e71, 0x4e72, 0x4e73, 0x4e74, 0x4e75, 0x4e76, 0x4e77, - 0x4e78, 0x4e79, 0x4e7a, 0x4e7b, 0x4e7c, 0x4e7d, 0x4e7e, 0x4e7f, - 0x4e80, 0x4e81, 0x4e82, 0x4e83, 0x4e84, 0x4e85, 0x4e86, 0x4e87, - 0x4e88, 0x4e89, 0x4e8a, 0x4e8b, 0x4e8c, 0x4e8d, 0x4e8e, 0x4e8f, - 0x4e90, 0x4e91, 0x4e92, 0x4e93, 0x4e94, 0x4e95, 0x4e96, 0x4e97, - 0x4e98, 0x4e99, 0x4e9a, 0x4e9b, 0x4e9c, 0x4e9d, 0x4e9e, 0x4e9f, - 0x4ea0, 0x4ea1, 0x4ea2, 0x4ea3, 0x4ea4, 0x4ea5, 0x4ea6, 0x4ea7, - 0x4ea8, 0x4ea9, 0x4eaa, 0x4eab, 0x4eac, 0x4ead, 0x4eae, 0x4eaf, - 0x4eb0, 0x4eb1, 0x4eb2, 0x4eb3, 0x4eb4, 0x4eb5, 0x4eb6, 0x4eb7, - 0x4eb8, 0x4eb9, 0x4eba, 0x4ebb, 0x4ebc, 0x4ebd, 0x4ebe, 0x4ebf, - 0x4ec0, 0x4ec1, 0x4ec2, 0x4ec3, 0x4ec4, 0x4ec5, 0x4ec6, 0x4ec7, - 0x4ec8, 0x4ec9, 0x4eca, 0x4ecb, 0x4ecc, 0x4ecd, 0x4ece, 0x4ecf, - 0x4ed0, 0x4ed1, 0x4ed2, 0x4ed3, 0x4ed4, 0x4ed5, 0x4ed6, 0x4ed7, - 0x4ed8, 0x4ed9, 0x4eda, 0x4edb, 0x4edc, 0x4edd, 0x4ede, 0x4edf, - 0x4ee0, 0x4ee1, 0x4ee2, 0x4ee3, 0x4ee4, 0x4ee5, 0x4ee6, 0x4ee7, - 0x4ee8, 0x4ee9, 0x4eea, 0x4eeb, 0x4eec, 0x4eed, 0x4eee, 0x4eef, - 0x4ef0, 0x4ef1, 0x4ef2, 0x4ef3, 0x4ef4, 0x4ef5, 0x4ef6, 0x4ef7, - 0x4ef8, 0x4ef9, 0x4efa, 0x4efb, 0x4efc, 0x4efd, 0x4efe, 0x4eff, - 0x4f00, 0x4f01, 0x4f02, 0x4f03, 0x4f04, 0x4f05, 0x4f06, 0x4f07, - 0x4f08, 0x4f09, 0x4f0a, 0x4f0b, 0x4f0c, 0x4f0d, 0x4f0e, 0x4f0f, - 0x4f10, 0x4f11, 0x4f12, 0x4f13, 0x4f14, 0x4f15, 0x4f16, 0x4f17, - 0x4f18, 0x4f19, 0x4f1a, 0x4f1b, 0x4f1c, 0x4f1d, 0x4f1e, 0x4f1f, - 0x4f20, 0x4f21, 0x4f22, 0x4f23, 0x4f24, 0x4f25, 0x4f26, 0x4f27, - 0x4f28, 0x4f29, 0x4f2a, 0x4f2b, 0x4f2c, 0x4f2d, 0x4f2e, 0x4f2f, - 0x4f30, 0x4f31, 0x4f32, 0x4f33, 0x4f34, 0x4f35, 0x4f36, 0x4f37, - 0x4f38, 0x4f39, 0x4f3a, 0x4f3b, 0x4f3c, 0x4f3d, 0x4f3e, 0x4f3f, - 0x4f40, 0x4f41, 0x4f42, 0x4f43, 0x4f44, 0x4f45, 0x4f46, 0x4f47, - 0x4f48, 0x4f49, 0x4f4a, 0x4f4b, 0x4f4c, 0x4f4d, 0x4f4e, 0x4f4f, - 0x4f50, 0x4f51, 0x4f52, 0x4f53, 0x4f54, 0x4f55, 0x4f56, 0x4f57, - 0x4f58, 0x4f59, 0x4f5a, 0x4f5b, 0x4f5c, 0x4f5d, 0x4f5e, 0x4f5f, - 0x4f60, 0x4f61, 0x4f62, 0x4f63, 0x4f64, 0x4f65, 0x4f66, 0x4f67, - 0x4f68, 0x4f69, 0x4f6a, 0x4f6b, 0x4f6c, 0x4f6d, 0x4f6e, 0x4f6f, - 0x4f70, 0x4f71, 0x4f72, 0x4f73, 0x4f74, 0x4f75, 0x4f76, 0x4f77, - 0x4f78, 0x4f79, 0x4f7a, 0x4f7b, 0x4f7c, 0x4f7d, 0x4f7e, 0x4f7f, - 0x4f80, 0x4f81, 0x4f82, 0x4f83, 0x4f84, 0x4f85, 0x4f86, 0x4f87, - 0x4f88, 0x4f89, 0x4f8a, 0x4f8b, 0x4f8c, 0x4f8d, 0x4f8e, 0x4f8f, - 0x4f90, 0x4f91, 0x4f92, 0x4f93, 0x4f94, 0x4f95, 0x4f96, 0x4f97, - 0x4f98, 0x4f99, 0x4f9a, 0x4f9b, 0x4f9c, 0x4f9d, 0x4f9e, 0x4f9f, - 0x4fa0, 0x4fa1, 0x4fa2, 0x4fa3, 0x4fa4, 0x4fa5, 0x4fa6, 0x4fa7, - 0x4fa8, 0x4fa9, 0x4faa, 0x4fab, 0x4fac, 0x4fad, 0x4fae, 0x4faf, - 0x4fb0, 0x4fb1, 0x4fb2, 0x4fb3, 0x4fb4, 0x4fb5, 0x4fb6, 0x4fb7, - 0x4fb8, 0x4fb9, 0x4fba, 0x4fbb, 0x4fbc, 0x4fbd, 0x4fbe, 0x4fbf, - 0x4fc0, 0x4fc1, 0x4fc2, 0x4fc3, 0x4fc4, 0x4fc5, 0x4fc6, 0x4fc7, - 0x4fc8, 0x4fc9, 0x4fca, 0x4fcb, 0x4fcc, 0x4fcd, 0x4fce, 0x4fcf, - 0x4fd0, 0x4fd1, 0x4fd2, 0x4fd3, 0x4fd4, 0x4fd5, 0x4fd6, 0x4fd7, - 0x4fd8, 0x4fd9, 0x4fda, 0x4fdb, 0x4fdc, 0x4fdd, 0x4fde, 0x4fdf, - 0x4fe0, 0x4fe1, 0x4fe2, 0x4fe3, 0x4fe4, 0x4fe5, 0x4fe6, 0x4fe7, - 0x4fe8, 0x4fe9, 0x4fea, 0x4feb, 0x4fec, 0x4fed, 0x4fee, 0x4fef, - 0x4ff0, 0x4ff1, 0x4ff2, 0x4ff3, 0x4ff4, 0x4ff5, 0x4ff6, 0x4ff7, - 0x4ff8, 0x4ff9, 0x4ffa, 0x4ffb, 0x4ffc, 0x4ffd, 0x4ffe, 0x4fff, - 0x5000, 0x5001, 0x5002, 0x5003, 0x5004, 0x5005, 0x5006, 0x5007, - 0x5008, 0x5009, 0x500a, 0x500b, 0x500c, 0x500d, 0x500e, 0x500f, - 0x5010, 0x5011, 0x5012, 0x5013, 0x5014, 0x5015, 0x5016, 0x5017, - 0x5018, 0x5019, 0x501a, 0x501b, 0x501c, 0x501d, 0x501e, 0x501f, - 0x5020, 0x5021, 0x5022, 0x5023, 0x5024, 0x5025, 0x5026, 0x5027, - 0x5028, 0x5029, 0x502a, 0x502b, 0x502c, 0x502d, 0x502e, 0x502f, - 0x5030, 0x5031, 0x5032, 0x5033, 0x5034, 0x5035, 0x5036, 0x5037, - 0x5038, 0x5039, 0x503a, 0x503b, 0x503c, 0x503d, 0x503e, 0x503f, - 0x5040, 0x5041, 0x5042, 0x5043, 0x5044, 0x5045, 0x5046, 0x5047, - 0x5048, 0x5049, 0x504a, 0x504b, 0x504c, 0x504d, 0x504e, 0x504f, - 0x5050, 0x5051, 0x5052, 0x5053, 0x5054, 0x5055, 0x5056, 0x5057, - 0x5058, 0x5059, 0x505a, 0x505b, 0x505c, 0x505d, 0x505e, 0x505f, - 0x5060, 0x5061, 0x5062, 0x5063, 0x5064, 0x5065, 0x5066, 0x5067, - 0x5068, 0x5069, 0x506a, 0x506b, 0x506c, 0x506d, 0x506e, 0x506f, - 0x5070, 0x5071, 0x5072, 0x5073, 0x5074, 0x5075, 0x5076, 0x5077, - 0x5078, 0x5079, 0x507a, 0x507b, 0x507c, 0x507d, 0x507e, 0x507f, - 0x5080, 0x5081, 0x5082, 0x5083, 0x5084, 0x5085, 0x5086, 0x5087, - 0x5088, 0x5089, 0x508a, 0x508b, 0x508c, 0x508d, 0x508e, 0x508f, - 0x5090, 0x5091, 0x5092, 0x5093, 0x5094, 0x5095, 0x5096, 0x5097, - 0x5098, 0x5099, 0x509a, 0x509b, 0x509c, 0x509d, 0x509e, 0x509f, - 0x50a0, 0x50a1, 0x50a2, 0x50a3, 0x50a4, 0x50a5, 0x50a6, 0x50a7, - 0x50a8, 0x50a9, 0x50aa, 0x50ab, 0x50ac, 0x50ad, 0x50ae, 0x50af, - 0x50b0, 0x50b1, 0x50b2, 0x50b3, 0x50b4, 0x50b5, 0x50b6, 0x50b7, - 0x50b8, 0x50b9, 0x50ba, 0x50bb, 0x50bc, 0x50bd, 0x50be, 0x50bf, - 0x50c0, 0x50c1, 0x50c2, 0x50c3, 0x50c4, 0x50c5, 0x50c6, 0x50c7, - 0x50c8, 0x50c9, 0x50ca, 0x50cb, 0x50cc, 0x50cd, 0x50ce, 0x50cf, - 0x50d0, 0x50d1, 0x50d2, 0x50d3, 0x50d4, 0x50d5, 0x50d6, 0x50d7, - 0x50d8, 0x50d9, 0x50da, 0x50db, 0x50dc, 0x50dd, 0x50de, 0x50df, - 0x50e0, 0x50e1, 0x50e2, 0x50e3, 0x50e4, 0x50e5, 0x50e6, 0x50e7, - 0x50e8, 0x50e9, 0x50ea, 0x50eb, 0x50ec, 0x50ed, 0x50ee, 0x50ef, - 0x50f0, 0x50f1, 0x50f2, 0x50f3, 0x50f4, 0x50f5, 0x50f6, 0x50f7, - 0x50f8, 0x50f9, 0x50fa, 0x50fb, 0x50fc, 0x50fd, 0x50fe, 0x50ff, - 0x5100, 0x5101, 0x5102, 0x5103, 0x5104, 0x5105, 0x5106, 0x5107, - 0x5108, 0x5109, 0x510a, 0x510b, 0x510c, 0x510d, 0x510e, 0x510f, - 0x5110, 0x5111, 0x5112, 0x5113, 0x5114, 0x5115, 0x5116, 0x5117, - 0x5118, 0x5119, 0x511a, 0x511b, 0x511c, 0x511d, 0x511e, 0x511f, - 0x5120, 0x5121, 0x5122, 0x5123, 0x5124, 0x5125, 0x5126, 0x5127, - 0x5128, 0x5129, 0x512a, 0x512b, 0x512c, 0x512d, 0x512e, 0x512f, - 0x5130, 0x5131, 0x5132, 0x5133, 0x5134, 0x5135, 0x5136, 0x5137, - 0x5138, 0x5139, 0x513a, 0x513b, 0x513c, 0x513d, 0x513e, 0x513f, - 0x5140, 0x5141, 0x5142, 0x5143, 0x5144, 0x5145, 0x5146, 0x5147, - 0x5148, 0x5149, 0x514a, 0x514b, 0x514c, 0x514d, 0x514e, 0x514f, - 0x5150, 0x5151, 0x5152, 0x5153, 0x5154, 0x5155, 0x5156, 0x5157, - 0x5158, 0x5159, 0x515a, 0x515b, 0x515c, 0x515d, 0x515e, 0x515f, - 0x5160, 0x5161, 0x5162, 0x5163, 0x5164, 0x5165, 0x5166, 0x5167, - 0x5168, 0x5169, 0x516a, 0x516b, 0x516c, 0x516d, 0x516e, 0x516f, - 0x5170, 0x5171, 0x5172, 0x5173, 0x5174, 0x5175, 0x5176, 0x5177, - 0x5178, 0x5179, 0x517a, 0x517b, 0x517c, 0x517d, 0x517e, 0x517f, - 0x5180, 0x5181, 0x5182, 0x5183, 0x5184, 0x5185, 0x5186, 0x5187, - 0x5188, 0x5189, 0x518a, 0x518b, 0x518c, 0x518d, 0x518e, 0x518f, - 0x5190, 0x5191, 0x5192, 0x5193, 0x5194, 0x5195, 0x5196, 0x5197, - 0x5198, 0x5199, 0x519a, 0x519b, 0x519c, 0x519d, 0x519e, 0x519f, - 0x51a0, 0x51a1, 0x51a2, 0x51a3, 0x51a4, 0x51a5, 0x51a6, 0x51a7, - 0x51a8, 0x51a9, 0x51aa, 0x51ab, 0x51ac, 0x51ad, 0x51ae, 0x51af, - 0x51b0, 0x51b1, 0x51b2, 0x51b3, 0x51b4, 0x51b5, 0x51b6, 0x51b7, - 0x51b8, 0x51b9, 0x51ba, 0x51bb, 0x51bc, 0x51bd, 0x51be, 0x51bf, - 0x51c0, 0x51c1, 0x51c2, 0x51c3, 0x51c4, 0x51c5, 0x51c6, 0x51c7, - 0x51c8, 0x51c9, 0x51ca, 0x51cb, 0x51cc, 0x51cd, 0x51ce, 0x51cf, - 0x51d0, 0x51d1, 0x51d2, 0x51d3, 0x51d4, 0x51d5, 0x51d6, 0x51d7, - 0x51d8, 0x51d9, 0x51da, 0x51db, 0x51dc, 0x51dd, 0x51de, 0x51df, - 0x51e0, 0x51e1, 0x51e2, 0x51e3, 0x51e4, 0x51e5, 0x51e6, 0x51e7, - 0x51e8, 0x51e9, 0x51ea, 0x51eb, 0x51ec, 0x51ed, 0x51ee, 0x51ef, - 0x51f0, 0x51f1, 0x51f2, 0x51f3, 0x51f4, 0x51f5, 0x51f6, 0x51f7, - 0x51f8, 0x51f9, 0x51fa, 0x51fb, 0x51fc, 0x51fd, 0x51fe, 0x51ff, - 0x5200, 0x5201, 0x5202, 0x5203, 0x5204, 0x5205, 0x5206, 0x5207, - 0x5208, 0x5209, 0x520a, 0x520b, 0x520c, 0x520d, 0x520e, 0x520f, - 0x5210, 0x5211, 0x5212, 0x5213, 0x5214, 0x5215, 0x5216, 0x5217, - 0x5218, 0x5219, 0x521a, 0x521b, 0x521c, 0x521d, 0x521e, 0x521f, - 0x5220, 0x5221, 0x5222, 0x5223, 0x5224, 0x5225, 0x5226, 0x5227, - 0x5228, 0x5229, 0x522a, 0x522b, 0x522c, 0x522d, 0x522e, 0x522f, - 0x5230, 0x5231, 0x5232, 0x5233, 0x5234, 0x5235, 0x5236, 0x5237, - 0x5238, 0x5239, 0x523a, 0x523b, 0x523c, 0x523d, 0x523e, 0x523f, - 0x5240, 0x5241, 0x5242, 0x5243, 0x5244, 0x5245, 0x5246, 0x5247, - 0x5248, 0x5249, 0x524a, 0x524b, 0x524c, 0x524d, 0x524e, 0x524f, - 0x5250, 0x5251, 0x5252, 0x5253, 0x5254, 0x5255, 0x5256, 0x5257, - 0x5258, 0x5259, 0x525a, 0x525b, 0x525c, 0x525d, 0x525e, 0x525f, - 0x5260, 0x5261, 0x5262, 0x5263, 0x5264, 0x5265, 0x5266, 0x5267, - 0x5268, 0x5269, 0x526a, 0x526b, 0x526c, 0x526d, 0x526e, 0x526f, - 0x5270, 0x5271, 0x5272, 0x5273, 0x5274, 0x5275, 0x5276, 0x5277, - 0x5278, 0x5279, 0x527a, 0x527b, 0x527c, 0x527d, 0x527e, 0x527f, - 0x5280, 0x5281, 0x5282, 0x5283, 0x5284, 0x5285, 0x5286, 0x5287, - 0x5288, 0x5289, 0x528a, 0x528b, 0x528c, 0x528d, 0x528e, 0x528f, - 0x5290, 0x5291, 0x5292, 0x5293, 0x5294, 0x5295, 0x5296, 0x5297, - 0x5298, 0x5299, 0x529a, 0x529b, 0x529c, 0x529d, 0x529e, 0x529f, - 0x52a0, 0x52a1, 0x52a2, 0x52a3, 0x52a4, 0x52a5, 0x52a6, 0x52a7, - 0x52a8, 0x52a9, 0x52aa, 0x52ab, 0x52ac, 0x52ad, 0x52ae, 0x52af, - 0x52b0, 0x52b1, 0x52b2, 0x52b3, 0x52b4, 0x52b5, 0x52b6, 0x52b7, - 0x52b8, 0x52b9, 0x52ba, 0x52bb, 0x52bc, 0x52bd, 0x52be, 0x52bf, - 0x52c0, 0x52c1, 0x52c2, 0x52c3, 0x52c4, 0x52c5, 0x52c6, 0x52c7, - 0x52c8, 0x52c9, 0x52ca, 0x52cb, 0x52cc, 0x52cd, 0x52ce, 0x52cf, - 0x52d0, 0x52d1, 0x52d2, 0x52d3, 0x52d4, 0x52d5, 0x52d6, 0x52d7, - 0x52d8, 0x52d9, 0x52da, 0x52db, 0x52dc, 0x52dd, 0x52de, 0x52df, - 0x52e0, 0x52e1, 0x52e2, 0x52e3, 0x52e4, 0x52e5, 0x52e6, 0x52e7, - 0x52e8, 0x52e9, 0x52ea, 0x52eb, 0x52ec, 0x52ed, 0x52ee, 0x52ef, - 0x52f0, 0x52f1, 0x52f2, 0x52f3, 0x52f4, 0x52f5, 0x52f6, 0x52f7, - 0x52f8, 0x52f9, 0x52fa, 0x52fb, 0x52fc, 0x52fd, 0x52fe, 0x52ff, - 0x5300, 0x5301, 0x5302, 0x5303, 0x5304, 0x5305, 0x5306, 0x5307, - 0x5308, 0x5309, 0x530a, 0x530b, 0x530c, 0x530d, 0x530e, 0x530f, - 0x5310, 0x5311, 0x5312, 0x5313, 0x5314, 0x5315, 0x5316, 0x5317, - 0x5318, 0x5319, 0x531a, 0x531b, 0x531c, 0x531d, 0x531e, 0x531f, - 0x5320, 0x5321, 0x5322, 0x5323, 0x5324, 0x5325, 0x5326, 0x5327, - 0x5328, 0x5329, 0x532a, 0x532b, 0x532c, 0x532d, 0x532e, 0x532f, - 0x5330, 0x5331, 0x5332, 0x5333, 0x5334, 0x5335, 0x5336, 0x5337, - 0x5338, 0x5339, 0x533a, 0x533b, 0x533c, 0x533d, 0x533e, 0x533f, - 0x5340, 0x5341, 0x5342, 0x5343, 0x5344, 0x5345, 0x5346, 0x5347, - 0x5348, 0x5349, 0x534a, 0x534b, 0x534c, 0x534d, 0x534e, 0x534f, - 0x5350, 0x5351, 0x5352, 0x5353, 0x5354, 0x5355, 0x5356, 0x5357, - 0x5358, 0x5359, 0x535a, 0x535b, 0x535c, 0x535d, 0x535e, 0x535f, - 0x5360, 0x5361, 0x5362, 0x5363, 0x5364, 0x5365, 0x5366, 0x5367, - 0x5368, 0x5369, 0x536a, 0x536b, 0x536c, 0x536d, 0x536e, 0x536f, - 0x5370, 0x5371, 0x5372, 0x5373, 0x5374, 0x5375, 0x5376, 0x5377, - 0x5378, 0x5379, 0x537a, 0x537b, 0x537c, 0x537d, 0x537e, 0x537f, - 0x5380, 0x5381, 0x5382, 0x5383, 0x5384, 0x5385, 0x5386, 0x5387, - 0x5388, 0x5389, 0x538a, 0x538b, 0x538c, 0x538d, 0x538e, 0x538f, - 0x5390, 0x5391, 0x5392, 0x5393, 0x5394, 0x5395, 0x5396, 0x5397, - 0x5398, 0x5399, 0x539a, 0x539b, 0x539c, 0x539d, 0x539e, 0x539f, - 0x53a0, 0x53a1, 0x53a2, 0x53a3, 0x53a4, 0x53a5, 0x53a6, 0x53a7, - 0x53a8, 0x53a9, 0x53aa, 0x53ab, 0x53ac, 0x53ad, 0x53ae, 0x53af, - 0x53b0, 0x53b1, 0x53b2, 0x53b3, 0x53b4, 0x53b5, 0x53b6, 0x53b7, - 0x53b8, 0x53b9, 0x53ba, 0x53bb, 0x53bc, 0x53bd, 0x53be, 0x53bf, - 0x53c0, 0x53c1, 0x53c2, 0x53c3, 0x53c4, 0x53c5, 0x53c6, 0x53c7, - 0x53c8, 0x53c9, 0x53ca, 0x53cb, 0x53cc, 0x53cd, 0x53ce, 0x53cf, - 0x53d0, 0x53d1, 0x53d2, 0x53d3, 0x53d4, 0x53d5, 0x53d6, 0x53d7, - 0x53d8, 0x53d9, 0x53da, 0x53db, 0x53dc, 0x53dd, 0x53de, 0x53df, - 0x53e0, 0x53e1, 0x53e2, 0x53e3, 0x53e4, 0x53e5, 0x53e6, 0x53e7, - 0x53e8, 0x53e9, 0x53ea, 0x53eb, 0x53ec, 0x53ed, 0x53ee, 0x53ef, - 0x53f0, 0x53f1, 0x53f2, 0x53f3, 0x53f4, 0x53f5, 0x53f6, 0x53f7, - 0x53f8, 0x53f9, 0x53fa, 0x53fb, 0x53fc, 0x53fd, 0x53fe, 0x53ff, - 0x5400, 0x5401, 0x5402, 0x5403, 0x5404, 0x5405, 0x5406, 0x5407, - 0x5408, 0x5409, 0x540a, 0x540b, 0x540c, 0x540d, 0x540e, 0x540f, - 0x5410, 0x5411, 0x5412, 0x5413, 0x5414, 0x5415, 0x5416, 0x5417, - 0x5418, 0x5419, 0x541a, 0x541b, 0x541c, 0x541d, 0x541e, 0x541f, - 0x5420, 0x5421, 0x5422, 0x5423, 0x5424, 0x5425, 0x5426, 0x5427, - 0x5428, 0x5429, 0x542a, 0x542b, 0x542c, 0x542d, 0x542e, 0x542f, - 0x5430, 0x5431, 0x5432, 0x5433, 0x5434, 0x5435, 0x5436, 0x5437, - 0x5438, 0x5439, 0x543a, 0x543b, 0x543c, 0x543d, 0x543e, 0x543f, - 0x5440, 0x5441, 0x5442, 0x5443, 0x5444, 0x5445, 0x5446, 0x5447, - 0x5448, 0x5449, 0x544a, 0x544b, 0x544c, 0x544d, 0x544e, 0x544f, - 0x5450, 0x5451, 0x5452, 0x5453, 0x5454, 0x5455, 0x5456, 0x5457, - 0x5458, 0x5459, 0x545a, 0x545b, 0x545c, 0x545d, 0x545e, 0x545f, - 0x5460, 0x5461, 0x5462, 0x5463, 0x5464, 0x5465, 0x5466, 0x5467, - 0x5468, 0x5469, 0x546a, 0x546b, 0x546c, 0x546d, 0x546e, 0x546f, - 0x5470, 0x5471, 0x5472, 0x5473, 0x5474, 0x5475, 0x5476, 0x5477, - 0x5478, 0x5479, 0x547a, 0x547b, 0x547c, 0x547d, 0x547e, 0x547f, - 0x5480, 0x5481, 0x5482, 0x5483, 0x5484, 0x5485, 0x5486, 0x5487, - 0x5488, 0x5489, 0x548a, 0x548b, 0x548c, 0x548d, 0x548e, 0x548f, - 0x5490, 0x5491, 0x5492, 0x5493, 0x5494, 0x5495, 0x5496, 0x5497, - 0x5498, 0x5499, 0x549a, 0x549b, 0x549c, 0x549d, 0x549e, 0x549f, - 0x54a0, 0x54a1, 0x54a2, 0x54a3, 0x54a4, 0x54a5, 0x54a6, 0x54a7, - 0x54a8, 0x54a9, 0x54aa, 0x54ab, 0x54ac, 0x54ad, 0x54ae, 0x54af, - 0x54b0, 0x54b1, 0x54b2, 0x54b3, 0x54b4, 0x54b5, 0x54b6, 0x54b7, - 0x54b8, 0x54b9, 0x54ba, 0x54bb, 0x54bc, 0x54bd, 0x54be, 0x54bf, - 0x54c0, 0x54c1, 0x54c2, 0x54c3, 0x54c4, 0x54c5, 0x54c6, 0x54c7, - 0x54c8, 0x54c9, 0x54ca, 0x54cb, 0x54cc, 0x54cd, 0x54ce, 0x54cf, - 0x54d0, 0x54d1, 0x54d2, 0x54d3, 0x54d4, 0x54d5, 0x54d6, 0x54d7, - 0x54d8, 0x54d9, 0x54da, 0x54db, 0x54dc, 0x54dd, 0x54de, 0x54df, - 0x54e0, 0x54e1, 0x54e2, 0x54e3, 0x54e4, 0x54e5, 0x54e6, 0x54e7, - 0x54e8, 0x54e9, 0x54ea, 0x54eb, 0x54ec, 0x54ed, 0x54ee, 0x54ef, - 0x54f0, 0x54f1, 0x54f2, 0x54f3, 0x54f4, 0x54f5, 0x54f6, 0x54f7, - 0x54f8, 0x54f9, 0x54fa, 0x54fb, 0x54fc, 0x54fd, 0x54fe, 0x54ff, - 0x5500, 0x5501, 0x5502, 0x5503, 0x5504, 0x5505, 0x5506, 0x5507, - 0x5508, 0x5509, 0x550a, 0x550b, 0x550c, 0x550d, 0x550e, 0x550f, - 0x5510, 0x5511, 0x5512, 0x5513, 0x5514, 0x5515, 0x5516, 0x5517, - 0x5518, 0x5519, 0x551a, 0x551b, 0x551c, 0x551d, 0x551e, 0x551f, - 0x5520, 0x5521, 0x5522, 0x5523, 0x5524, 0x5525, 0x5526, 0x5527, - 0x5528, 0x5529, 0x552a, 0x552b, 0x552c, 0x552d, 0x552e, 0x552f, - 0x5530, 0x5531, 0x5532, 0x5533, 0x5534, 0x5535, 0x5536, 0x5537, - 0x5538, 0x5539, 0x553a, 0x553b, 0x553c, 0x553d, 0x553e, 0x553f, - 0x5540, 0x5541, 0x5542, 0x5543, 0x5544, 0x5545, 0x5546, 0x5547, - 0x5548, 0x5549, 0x554a, 0x554b, 0x554c, 0x554d, 0x554e, 0x554f, - 0x5550, 0x5551, 0x5552, 0x5553, 0x5554, 0x5555, 0x5556, 0x5557, - 0x5558, 0x5559, 0x555a, 0x555b, 0x555c, 0x555d, 0x555e, 0x555f, - 0x5560, 0x5561, 0x5562, 0x5563, 0x5564, 0x5565, 0x5566, 0x5567, - 0x5568, 0x5569, 0x556a, 0x556b, 0x556c, 0x556d, 0x556e, 0x556f, - 0x5570, 0x5571, 0x5572, 0x5573, 0x5574, 0x5575, 0x5576, 0x5577, - 0x5578, 0x5579, 0x557a, 0x557b, 0x557c, 0x557d, 0x557e, 0x557f, - 0x5580, 0x5581, 0x5582, 0x5583, 0x5584, 0x5585, 0x5586, 0x5587, - 0x5588, 0x5589, 0x558a, 0x558b, 0x558c, 0x558d, 0x558e, 0x558f, - 0x5590, 0x5591, 0x5592, 0x5593, 0x5594, 0x5595, 0x5596, 0x5597, - 0x5598, 0x5599, 0x559a, 0x559b, 0x559c, 0x559d, 0x559e, 0x559f, - 0x55a0, 0x55a1, 0x55a2, 0x55a3, 0x55a4, 0x55a5, 0x55a6, 0x55a7, - 0x55a8, 0x55a9, 0x55aa, 0x55ab, 0x55ac, 0x55ad, 0x55ae, 0x55af, - 0x55b0, 0x55b1, 0x55b2, 0x55b3, 0x55b4, 0x55b5, 0x55b6, 0x55b7, - 0x55b8, 0x55b9, 0x55ba, 0x55bb, 0x55bc, 0x55bd, 0x55be, 0x55bf, - 0x55c0, 0x55c1, 0x55c2, 0x55c3, 0x55c4, 0x55c5, 0x55c6, 0x55c7, - 0x55c8, 0x55c9, 0x55ca, 0x55cb, 0x55cc, 0x55cd, 0x55ce, 0x55cf, - 0x55d0, 0x55d1, 0x55d2, 0x55d3, 0x55d4, 0x55d5, 0x55d6, 0x55d7, - 0x55d8, 0x55d9, 0x55da, 0x55db, 0x55dc, 0x55dd, 0x55de, 0x55df, - 0x55e0, 0x55e1, 0x55e2, 0x55e3, 0x55e4, 0x55e5, 0x55e6, 0x55e7, - 0x55e8, 0x55e9, 0x55ea, 0x55eb, 0x55ec, 0x55ed, 0x55ee, 0x55ef, - 0x55f0, 0x55f1, 0x55f2, 0x55f3, 0x55f4, 0x55f5, 0x55f6, 0x55f7, - 0x55f8, 0x55f9, 0x55fa, 0x55fb, 0x55fc, 0x55fd, 0x55fe, 0x55ff, - 0x5600, 0x5601, 0x5602, 0x5603, 0x5604, 0x5605, 0x5606, 0x5607, - 0x5608, 0x5609, 0x560a, 0x560b, 0x560c, 0x560d, 0x560e, 0x560f, - 0x5610, 0x5611, 0x5612, 0x5613, 0x5614, 0x5615, 0x5616, 0x5617, - 0x5618, 0x5619, 0x561a, 0x561b, 0x561c, 0x561d, 0x561e, 0x561f, - 0x5620, 0x5621, 0x5622, 0x5623, 0x5624, 0x5625, 0x5626, 0x5627, - 0x5628, 0x5629, 0x562a, 0x562b, 0x562c, 0x562d, 0x562e, 0x562f, - 0x5630, 0x5631, 0x5632, 0x5633, 0x5634, 0x5635, 0x5636, 0x5637, - 0x5638, 0x5639, 0x563a, 0x563b, 0x563c, 0x563d, 0x563e, 0x563f, - 0x5640, 0x5641, 0x5642, 0x5643, 0x5644, 0x5645, 0x5646, 0x5647, - 0x5648, 0x5649, 0x564a, 0x564b, 0x564c, 0x564d, 0x564e, 0x564f, - 0x5650, 0x5651, 0x5652, 0x5653, 0x5654, 0x5655, 0x5656, 0x5657, - 0x5658, 0x5659, 0x565a, 0x565b, 0x565c, 0x565d, 0x565e, 0x565f, - 0x5660, 0x5661, 0x5662, 0x5663, 0x5664, 0x5665, 0x5666, 0x5667, - 0x5668, 0x5669, 0x566a, 0x566b, 0x566c, 0x566d, 0x566e, 0x566f, - 0x5670, 0x5671, 0x5672, 0x5673, 0x5674, 0x5675, 0x5676, 0x5677, - 0x5678, 0x5679, 0x567a, 0x567b, 0x567c, 0x567d, 0x567e, 0x567f, - 0x5680, 0x5681, 0x5682, 0x5683, 0x5684, 0x5685, 0x5686, 0x5687, - 0x5688, 0x5689, 0x568a, 0x568b, 0x568c, 0x568d, 0x568e, 0x568f, - 0x5690, 0x5691, 0x5692, 0x5693, 0x5694, 0x5695, 0x5696, 0x5697, - 0x5698, 0x5699, 0x569a, 0x569b, 0x569c, 0x569d, 0x569e, 0x569f, - 0x56a0, 0x56a1, 0x56a2, 0x56a3, 0x56a4, 0x56a5, 0x56a6, 0x56a7, - 0x56a8, 0x56a9, 0x56aa, 0x56ab, 0x56ac, 0x56ad, 0x56ae, 0x56af, - 0x56b0, 0x56b1, 0x56b2, 0x56b3, 0x56b4, 0x56b5, 0x56b6, 0x56b7, - 0x56b8, 0x56b9, 0x56ba, 0x56bb, 0x56bc, 0x56bd, 0x56be, 0x56bf, - 0x56c0, 0x56c1, 0x56c2, 0x56c3, 0x56c4, 0x56c5, 0x56c6, 0x56c7, - 0x56c8, 0x56c9, 0x56ca, 0x56cb, 0x56cc, 0x56cd, 0x56ce, 0x56cf, - 0x56d0, 0x56d1, 0x56d2, 0x56d3, 0x56d4, 0x56d5, 0x56d6, 0x56d7, - 0x56d8, 0x56d9, 0x56da, 0x56db, 0x56dc, 0x56dd, 0x56de, 0x56df, - 0x56e0, 0x56e1, 0x56e2, 0x56e3, 0x56e4, 0x56e5, 0x56e6, 0x56e7, - 0x56e8, 0x56e9, 0x56ea, 0x56eb, 0x56ec, 0x56ed, 0x56ee, 0x56ef, - 0x56f0, 0x56f1, 0x56f2, 0x56f3, 0x56f4, 0x56f5, 0x56f6, 0x56f7, - 0x56f8, 0x56f9, 0x56fa, 0x56fb, 0x56fc, 0x56fd, 0x56fe, 0x56ff, - 0x5700, 0x5701, 0x5702, 0x5703, 0x5704, 0x5705, 0x5706, 0x5707, - 0x5708, 0x5709, 0x570a, 0x570b, 0x570c, 0x570d, 0x570e, 0x570f, - 0x5710, 0x5711, 0x5712, 0x5713, 0x5714, 0x5715, 0x5716, 0x5717, - 0x5718, 0x5719, 0x571a, 0x571b, 0x571c, 0x571d, 0x571e, 0x571f, - 0x5720, 0x5721, 0x5722, 0x5723, 0x5724, 0x5725, 0x5726, 0x5727, - 0x5728, 0x5729, 0x572a, 0x572b, 0x572c, 0x572d, 0x572e, 0x572f, - 0x5730, 0x5731, 0x5732, 0x5733, 0x5734, 0x5735, 0x5736, 0x5737, - 0x5738, 0x5739, 0x573a, 0x573b, 0x573c, 0x573d, 0x573e, 0x573f, - 0x5740, 0x5741, 0x5742, 0x5743, 0x5744, 0x5745, 0x5746, 0x5747, - 0x5748, 0x5749, 0x574a, 0x574b, 0x574c, 0x574d, 0x574e, 0x574f, - 0x5750, 0x5751, 0x5752, 0x5753, 0x5754, 0x5755, 0x5756, 0x5757, - 0x5758, 0x5759, 0x575a, 0x575b, 0x575c, 0x575d, 0x575e, 0x575f, - 0x5760, 0x5761, 0x5762, 0x5763, 0x5764, 0x5765, 0x5766, 0x5767, - 0x5768, 0x5769, 0x576a, 0x576b, 0x576c, 0x576d, 0x576e, 0x576f, - 0x5770, 0x5771, 0x5772, 0x5773, 0x5774, 0x5775, 0x5776, 0x5777, - 0x5778, 0x5779, 0x577a, 0x577b, 0x577c, 0x577d, 0x577e, 0x577f, - 0x5780, 0x5781, 0x5782, 0x5783, 0x5784, 0x5785, 0x5786, 0x5787, - 0x5788, 0x5789, 0x578a, 0x578b, 0x578c, 0x578d, 0x578e, 0x578f, - 0x5790, 0x5791, 0x5792, 0x5793, 0x5794, 0x5795, 0x5796, 0x5797, - 0x5798, 0x5799, 0x579a, 0x579b, 0x579c, 0x579d, 0x579e, 0x579f, - 0x57a0, 0x57a1, 0x57a2, 0x57a3, 0x57a4, 0x57a5, 0x57a6, 0x57a7, - 0x57a8, 0x57a9, 0x57aa, 0x57ab, 0x57ac, 0x57ad, 0x57ae, 0x57af, - 0x57b0, 0x57b1, 0x57b2, 0x57b3, 0x57b4, 0x57b5, 0x57b6, 0x57b7, - 0x57b8, 0x57b9, 0x57ba, 0x57bb, 0x57bc, 0x57bd, 0x57be, 0x57bf, - 0x57c0, 0x57c1, 0x57c2, 0x57c3, 0x57c4, 0x57c5, 0x57c6, 0x57c7, - 0x57c8, 0x57c9, 0x57ca, 0x57cb, 0x57cc, 0x57cd, 0x57ce, 0x57cf, - 0x57d0, 0x57d1, 0x57d2, 0x57d3, 0x57d4, 0x57d5, 0x57d6, 0x57d7, - 0x57d8, 0x57d9, 0x57da, 0x57db, 0x57dc, 0x57dd, 0x57de, 0x57df, - 0x57e0, 0x57e1, 0x57e2, 0x57e3, 0x57e4, 0x57e5, 0x57e6, 0x57e7, - 0x57e8, 0x57e9, 0x57ea, 0x57eb, 0x57ec, 0x57ed, 0x57ee, 0x57ef, - 0x57f0, 0x57f1, 0x57f2, 0x57f3, 0x57f4, 0x57f5, 0x57f6, 0x57f7, - 0x57f8, 0x57f9, 0x57fa, 0x57fb, 0x57fc, 0x57fd, 0x57fe, 0x57ff, - 0x5800, 0x5801, 0x5802, 0x5803, 0x5804, 0x5805, 0x5806, 0x5807, - 0x5808, 0x5809, 0x580a, 0x580b, 0x580c, 0x580d, 0x580e, 0x580f, - 0x5810, 0x5811, 0x5812, 0x5813, 0x5814, 0x5815, 0x5816, 0x5817, - 0x5818, 0x5819, 0x581a, 0x581b, 0x581c, 0x581d, 0x581e, 0x581f, - 0x5820, 0x5821, 0x5822, 0x5823, 0x5824, 0x5825, 0x5826, 0x5827, - 0x5828, 0x5829, 0x582a, 0x582b, 0x582c, 0x582d, 0x582e, 0x582f, - 0x5830, 0x5831, 0x5832, 0x5833, 0x5834, 0x5835, 0x5836, 0x5837, - 0x5838, 0x5839, 0x583a, 0x583b, 0x583c, 0x583d, 0x583e, 0x583f, - 0x5840, 0x5841, 0x5842, 0x5843, 0x5844, 0x5845, 0x5846, 0x5847, - 0x5848, 0x5849, 0x584a, 0x584b, 0x584c, 0x584d, 0x584e, 0x584f, - 0x5850, 0x5851, 0x5852, 0x5853, 0x5854, 0x5855, 0x5856, 0x5857, - 0x5858, 0x5859, 0x585a, 0x585b, 0x585c, 0x585d, 0x585e, 0x585f, - 0x5860, 0x5861, 0x5862, 0x5863, 0x5864, 0x5865, 0x5866, 0x5867, - 0x5868, 0x5869, 0x586a, 0x586b, 0x586c, 0x586d, 0x586e, 0x586f, - 0x5870, 0x5871, 0x5872, 0x5873, 0x5874, 0x5875, 0x5876, 0x5877, - 0x5878, 0x5879, 0x587a, 0x587b, 0x587c, 0x587d, 0x587e, 0x587f, - 0x5880, 0x5881, 0x5882, 0x5883, 0x5884, 0x5885, 0x5886, 0x5887, - 0x5888, 0x5889, 0x588a, 0x588b, 0x588c, 0x588d, 0x588e, 0x588f, - 0x5890, 0x5891, 0x5892, 0x5893, 0x5894, 0x5895, 0x5896, 0x5897, - 0x5898, 0x5899, 0x589a, 0x589b, 0x589c, 0x589d, 0x589e, 0x589f, - 0x58a0, 0x58a1, 0x58a2, 0x58a3, 0x58a4, 0x58a5, 0x58a6, 0x58a7, - 0x58a8, 0x58a9, 0x58aa, 0x58ab, 0x58ac, 0x58ad, 0x58ae, 0x58af, - 0x58b0, 0x58b1, 0x58b2, 0x58b3, 0x58b4, 0x58b5, 0x58b6, 0x58b7, - 0x58b8, 0x58b9, 0x58ba, 0x58bb, 0x58bc, 0x58bd, 0x58be, 0x58bf, - 0x58c0, 0x58c1, 0x58c2, 0x58c3, 0x58c4, 0x58c5, 0x58c6, 0x58c7, - 0x58c8, 0x58c9, 0x58ca, 0x58cb, 0x58cc, 0x58cd, 0x58ce, 0x58cf, - 0x58d0, 0x58d1, 0x58d2, 0x58d3, 0x58d4, 0x58d5, 0x58d6, 0x58d7, - 0x58d8, 0x58d9, 0x58da, 0x58db, 0x58dc, 0x58dd, 0x58de, 0x58df, - 0x58e0, 0x58e1, 0x58e2, 0x58e3, 0x58e4, 0x58e5, 0x58e6, 0x58e7, - 0x58e8, 0x58e9, 0x58ea, 0x58eb, 0x58ec, 0x58ed, 0x58ee, 0x58ef, - 0x58f0, 0x58f1, 0x58f2, 0x58f3, 0x58f4, 0x58f5, 0x58f6, 0x58f7, - 0x58f8, 0x58f9, 0x58fa, 0x58fb, 0x58fc, 0x58fd, 0x58fe, 0x58ff, - 0x5900, 0x5901, 0x5902, 0x5903, 0x5904, 0x5905, 0x5906, 0x5907, - 0x5908, 0x5909, 0x590a, 0x590b, 0x590c, 0x590d, 0x590e, 0x590f, - 0x5910, 0x5911, 0x5912, 0x5913, 0x5914, 0x5915, 0x5916, 0x5917, - 0x5918, 0x5919, 0x591a, 0x591b, 0x591c, 0x591d, 0x591e, 0x591f, - 0x5920, 0x5921, 0x5922, 0x5923, 0x5924, 0x5925, 0x5926, 0x5927, - 0x5928, 0x5929, 0x592a, 0x592b, 0x592c, 0x592d, 0x592e, 0x592f, - 0x5930, 0x5931, 0x5932, 0x5933, 0x5934, 0x5935, 0x5936, 0x5937, - 0x5938, 0x5939, 0x593a, 0x593b, 0x593c, 0x593d, 0x593e, 0x593f, - 0x5940, 0x5941, 0x5942, 0x5943, 0x5944, 0x5945, 0x5946, 0x5947, - 0x5948, 0x5949, 0x594a, 0x594b, 0x594c, 0x594d, 0x594e, 0x594f, - 0x5950, 0x5951, 0x5952, 0x5953, 0x5954, 0x5955, 0x5956, 0x5957, - 0x5958, 0x5959, 0x595a, 0x595b, 0x595c, 0x595d, 0x595e, 0x595f, - 0x5960, 0x5961, 0x5962, 0x5963, 0x5964, 0x5965, 0x5966, 0x5967, - 0x5968, 0x5969, 0x596a, 0x596b, 0x596c, 0x596d, 0x596e, 0x596f, - 0x5970, 0x5971, 0x5972, 0x5973, 0x5974, 0x5975, 0x5976, 0x5977, - 0x5978, 0x5979, 0x597a, 0x597b, 0x597c, 0x597d, 0x597e, 0x597f, - 0x5980, 0x5981, 0x5982, 0x5983, 0x5984, 0x5985, 0x5986, 0x5987, - 0x5988, 0x5989, 0x598a, 0x598b, 0x598c, 0x598d, 0x598e, 0x598f, - 0x5990, 0x5991, 0x5992, 0x5993, 0x5994, 0x5995, 0x5996, 0x5997, - 0x5998, 0x5999, 0x599a, 0x599b, 0x599c, 0x599d, 0x599e, 0x599f, - 0x59a0, 0x59a1, 0x59a2, 0x59a3, 0x59a4, 0x59a5, 0x59a6, 0x59a7, - 0x59a8, 0x59a9, 0x59aa, 0x59ab, 0x59ac, 0x59ad, 0x59ae, 0x59af, - 0x59b0, 0x59b1, 0x59b2, 0x59b3, 0x59b4, 0x59b5, 0x59b6, 0x59b7, - 0x59b8, 0x59b9, 0x59ba, 0x59bb, 0x59bc, 0x59bd, 0x59be, 0x59bf, - 0x59c0, 0x59c1, 0x59c2, 0x59c3, 0x59c4, 0x59c5, 0x59c6, 0x59c7, - 0x59c8, 0x59c9, 0x59ca, 0x59cb, 0x59cc, 0x59cd, 0x59ce, 0x59cf, - 0x59d0, 0x59d1, 0x59d2, 0x59d3, 0x59d4, 0x59d5, 0x59d6, 0x59d7, - 0x59d8, 0x59d9, 0x59da, 0x59db, 0x59dc, 0x59dd, 0x59de, 0x59df, - 0x59e0, 0x59e1, 0x59e2, 0x59e3, 0x59e4, 0x59e5, 0x59e6, 0x59e7, - 0x59e8, 0x59e9, 0x59ea, 0x59eb, 0x59ec, 0x59ed, 0x59ee, 0x59ef, - 0x59f0, 0x59f1, 0x59f2, 0x59f3, 0x59f4, 0x59f5, 0x59f6, 0x59f7, - 0x59f8, 0x59f9, 0x59fa, 0x59fb, 0x59fc, 0x59fd, 0x59fe, 0x59ff, - 0x5a00, 0x5a01, 0x5a02, 0x5a03, 0x5a04, 0x5a05, 0x5a06, 0x5a07, - 0x5a08, 0x5a09, 0x5a0a, 0x5a0b, 0x5a0c, 0x5a0d, 0x5a0e, 0x5a0f, - 0x5a10, 0x5a11, 0x5a12, 0x5a13, 0x5a14, 0x5a15, 0x5a16, 0x5a17, - 0x5a18, 0x5a19, 0x5a1a, 0x5a1b, 0x5a1c, 0x5a1d, 0x5a1e, 0x5a1f, - 0x5a20, 0x5a21, 0x5a22, 0x5a23, 0x5a24, 0x5a25, 0x5a26, 0x5a27, - 0x5a28, 0x5a29, 0x5a2a, 0x5a2b, 0x5a2c, 0x5a2d, 0x5a2e, 0x5a2f, - 0x5a30, 0x5a31, 0x5a32, 0x5a33, 0x5a34, 0x5a35, 0x5a36, 0x5a37, - 0x5a38, 0x5a39, 0x5a3a, 0x5a3b, 0x5a3c, 0x5a3d, 0x5a3e, 0x5a3f, - 0x5a40, 0x5a41, 0x5a42, 0x5a43, 0x5a44, 0x5a45, 0x5a46, 0x5a47, - 0x5a48, 0x5a49, 0x5a4a, 0x5a4b, 0x5a4c, 0x5a4d, 0x5a4e, 0x5a4f, - 0x5a50, 0x5a51, 0x5a52, 0x5a53, 0x5a54, 0x5a55, 0x5a56, 0x5a57, - 0x5a58, 0x5a59, 0x5a5a, 0x5a5b, 0x5a5c, 0x5a5d, 0x5a5e, 0x5a5f, - 0x5a60, 0x5a61, 0x5a62, 0x5a63, 0x5a64, 0x5a65, 0x5a66, 0x5a67, - 0x5a68, 0x5a69, 0x5a6a, 0x5a6b, 0x5a6c, 0x5a6d, 0x5a6e, 0x5a6f, - 0x5a70, 0x5a71, 0x5a72, 0x5a73, 0x5a74, 0x5a75, 0x5a76, 0x5a77, - 0x5a78, 0x5a79, 0x5a7a, 0x5a7b, 0x5a7c, 0x5a7d, 0x5a7e, 0x5a7f, - 0x5a80, 0x5a81, 0x5a82, 0x5a83, 0x5a84, 0x5a85, 0x5a86, 0x5a87, - 0x5a88, 0x5a89, 0x5a8a, 0x5a8b, 0x5a8c, 0x5a8d, 0x5a8e, 0x5a8f, - 0x5a90, 0x5a91, 0x5a92, 0x5a93, 0x5a94, 0x5a95, 0x5a96, 0x5a97, - 0x5a98, 0x5a99, 0x5a9a, 0x5a9b, 0x5a9c, 0x5a9d, 0x5a9e, 0x5a9f, - 0x5aa0, 0x5aa1, 0x5aa2, 0x5aa3, 0x5aa4, 0x5aa5, 0x5aa6, 0x5aa7, - 0x5aa8, 0x5aa9, 0x5aaa, 0x5aab, 0x5aac, 0x5aad, 0x5aae, 0x5aaf, - 0x5ab0, 0x5ab1, 0x5ab2, 0x5ab3, 0x5ab4, 0x5ab5, 0x5ab6, 0x5ab7, - 0x5ab8, 0x5ab9, 0x5aba, 0x5abb, 0x5abc, 0x5abd, 0x5abe, 0x5abf, - 0x5ac0, 0x5ac1, 0x5ac2, 0x5ac3, 0x5ac4, 0x5ac5, 0x5ac6, 0x5ac7, - 0x5ac8, 0x5ac9, 0x5aca, 0x5acb, 0x5acc, 0x5acd, 0x5ace, 0x5acf, - 0x5ad0, 0x5ad1, 0x5ad2, 0x5ad3, 0x5ad4, 0x5ad5, 0x5ad6, 0x5ad7, - 0x5ad8, 0x5ad9, 0x5ada, 0x5adb, 0x5adc, 0x5add, 0x5ade, 0x5adf, - 0x5ae0, 0x5ae1, 0x5ae2, 0x5ae3, 0x5ae4, 0x5ae5, 0x5ae6, 0x5ae7, - 0x5ae8, 0x5ae9, 0x5aea, 0x5aeb, 0x5aec, 0x5aed, 0x5aee, 0x5aef, - 0x5af0, 0x5af1, 0x5af2, 0x5af3, 0x5af4, 0x5af5, 0x5af6, 0x5af7, - 0x5af8, 0x5af9, 0x5afa, 0x5afb, 0x5afc, 0x5afd, 0x5afe, 0x5aff, - 0x5b00, 0x5b01, 0x5b02, 0x5b03, 0x5b04, 0x5b05, 0x5b06, 0x5b07, - 0x5b08, 0x5b09, 0x5b0a, 0x5b0b, 0x5b0c, 0x5b0d, 0x5b0e, 0x5b0f, - 0x5b10, 0x5b11, 0x5b12, 0x5b13, 0x5b14, 0x5b15, 0x5b16, 0x5b17, - 0x5b18, 0x5b19, 0x5b1a, 0x5b1b, 0x5b1c, 0x5b1d, 0x5b1e, 0x5b1f, - 0x5b20, 0x5b21, 0x5b22, 0x5b23, 0x5b24, 0x5b25, 0x5b26, 0x5b27, - 0x5b28, 0x5b29, 0x5b2a, 0x5b2b, 0x5b2c, 0x5b2d, 0x5b2e, 0x5b2f, - 0x5b30, 0x5b31, 0x5b32, 0x5b33, 0x5b34, 0x5b35, 0x5b36, 0x5b37, - 0x5b38, 0x5b39, 0x5b3a, 0x5b3b, 0x5b3c, 0x5b3d, 0x5b3e, 0x5b3f, - 0x5b40, 0x5b41, 0x5b42, 0x5b43, 0x5b44, 0x5b45, 0x5b46, 0x5b47, - 0x5b48, 0x5b49, 0x5b4a, 0x5b4b, 0x5b4c, 0x5b4d, 0x5b4e, 0x5b4f, - 0x5b50, 0x5b51, 0x5b52, 0x5b53, 0x5b54, 0x5b55, 0x5b56, 0x5b57, - 0x5b58, 0x5b59, 0x5b5a, 0x5b5b, 0x5b5c, 0x5b5d, 0x5b5e, 0x5b5f, - 0x5b60, 0x5b61, 0x5b62, 0x5b63, 0x5b64, 0x5b65, 0x5b66, 0x5b67, - 0x5b68, 0x5b69, 0x5b6a, 0x5b6b, 0x5b6c, 0x5b6d, 0x5b6e, 0x5b6f, - 0x5b70, 0x5b71, 0x5b72, 0x5b73, 0x5b74, 0x5b75, 0x5b76, 0x5b77, - 0x5b78, 0x5b79, 0x5b7a, 0x5b7b, 0x5b7c, 0x5b7d, 0x5b7e, 0x5b7f, - 0x5b80, 0x5b81, 0x5b82, 0x5b83, 0x5b84, 0x5b85, 0x5b86, 0x5b87, - 0x5b88, 0x5b89, 0x5b8a, 0x5b8b, 0x5b8c, 0x5b8d, 0x5b8e, 0x5b8f, - 0x5b90, 0x5b91, 0x5b92, 0x5b93, 0x5b94, 0x5b95, 0x5b96, 0x5b97, - 0x5b98, 0x5b99, 0x5b9a, 0x5b9b, 0x5b9c, 0x5b9d, 0x5b9e, 0x5b9f, - 0x5ba0, 0x5ba1, 0x5ba2, 0x5ba3, 0x5ba4, 0x5ba5, 0x5ba6, 0x5ba7, - 0x5ba8, 0x5ba9, 0x5baa, 0x5bab, 0x5bac, 0x5bad, 0x5bae, 0x5baf, - 0x5bb0, 0x5bb1, 0x5bb2, 0x5bb3, 0x5bb4, 0x5bb5, 0x5bb6, 0x5bb7, - 0x5bb8, 0x5bb9, 0x5bba, 0x5bbb, 0x5bbc, 0x5bbd, 0x5bbe, 0x5bbf, - 0x5bc0, 0x5bc1, 0x5bc2, 0x5bc3, 0x5bc4, 0x5bc5, 0x5bc6, 0x5bc7, - 0x5bc8, 0x5bc9, 0x5bca, 0x5bcb, 0x5bcc, 0x5bcd, 0x5bce, 0x5bcf, - 0x5bd0, 0x5bd1, 0x5bd2, 0x5bd3, 0x5bd4, 0x5bd5, 0x5bd6, 0x5bd7, - 0x5bd8, 0x5bd9, 0x5bda, 0x5bdb, 0x5bdc, 0x5bdd, 0x5bde, 0x5bdf, - 0x5be0, 0x5be1, 0x5be2, 0x5be3, 0x5be4, 0x5be5, 0x5be6, 0x5be7, - 0x5be8, 0x5be9, 0x5bea, 0x5beb, 0x5bec, 0x5bed, 0x5bee, 0x5bef, - 0x5bf0, 0x5bf1, 0x5bf2, 0x5bf3, 0x5bf4, 0x5bf5, 0x5bf6, 0x5bf7, - 0x5bf8, 0x5bf9, 0x5bfa, 0x5bfb, 0x5bfc, 0x5bfd, 0x5bfe, 0x5bff, - 0x5c00, 0x5c01, 0x5c02, 0x5c03, 0x5c04, 0x5c05, 0x5c06, 0x5c07, - 0x5c08, 0x5c09, 0x5c0a, 0x5c0b, 0x5c0c, 0x5c0d, 0x5c0e, 0x5c0f, - 0x5c10, 0x5c11, 0x5c12, 0x5c13, 0x5c14, 0x5c15, 0x5c16, 0x5c17, - 0x5c18, 0x5c19, 0x5c1a, 0x5c1b, 0x5c1c, 0x5c1d, 0x5c1e, 0x5c1f, - 0x5c20, 0x5c21, 0x5c22, 0x5c23, 0x5c24, 0x5c25, 0x5c26, 0x5c27, - 0x5c28, 0x5c29, 0x5c2a, 0x5c2b, 0x5c2c, 0x5c2d, 0x5c2e, 0x5c2f, - 0x5c30, 0x5c31, 0x5c32, 0x5c33, 0x5c34, 0x5c35, 0x5c36, 0x5c37, - 0x5c38, 0x5c39, 0x5c3a, 0x5c3b, 0x5c3c, 0x5c3d, 0x5c3e, 0x5c3f, - 0x5c40, 0x5c41, 0x5c42, 0x5c43, 0x5c44, 0x5c45, 0x5c46, 0x5c47, - 0x5c48, 0x5c49, 0x5c4a, 0x5c4b, 0x5c4c, 0x5c4d, 0x5c4e, 0x5c4f, - 0x5c50, 0x5c51, 0x5c52, 0x5c53, 0x5c54, 0x5c55, 0x5c56, 0x5c57, - 0x5c58, 0x5c59, 0x5c5a, 0x5c5b, 0x5c5c, 0x5c5d, 0x5c5e, 0x5c5f, - 0x5c60, 0x5c61, 0x5c62, 0x5c63, 0x5c64, 0x5c65, 0x5c66, 0x5c67, - 0x5c68, 0x5c69, 0x5c6a, 0x5c6b, 0x5c6c, 0x5c6d, 0x5c6e, 0x5c6f, - 0x5c70, 0x5c71, 0x5c72, 0x5c73, 0x5c74, 0x5c75, 0x5c76, 0x5c77, - 0x5c78, 0x5c79, 0x5c7a, 0x5c7b, 0x5c7c, 0x5c7d, 0x5c7e, 0x5c7f, - 0x5c80, 0x5c81, 0x5c82, 0x5c83, 0x5c84, 0x5c85, 0x5c86, 0x5c87, - 0x5c88, 0x5c89, 0x5c8a, 0x5c8b, 0x5c8c, 0x5c8d, 0x5c8e, 0x5c8f, - 0x5c90, 0x5c91, 0x5c92, 0x5c93, 0x5c94, 0x5c95, 0x5c96, 0x5c97, - 0x5c98, 0x5c99, 0x5c9a, 0x5c9b, 0x5c9c, 0x5c9d, 0x5c9e, 0x5c9f, - 0x5ca0, 0x5ca1, 0x5ca2, 0x5ca3, 0x5ca4, 0x5ca5, 0x5ca6, 0x5ca7, - 0x5ca8, 0x5ca9, 0x5caa, 0x5cab, 0x5cac, 0x5cad, 0x5cae, 0x5caf, - 0x5cb0, 0x5cb1, 0x5cb2, 0x5cb3, 0x5cb4, 0x5cb5, 0x5cb6, 0x5cb7, - 0x5cb8, 0x5cb9, 0x5cba, 0x5cbb, 0x5cbc, 0x5cbd, 0x5cbe, 0x5cbf, - 0x5cc0, 0x5cc1, 0x5cc2, 0x5cc3, 0x5cc4, 0x5cc5, 0x5cc6, 0x5cc7, - 0x5cc8, 0x5cc9, 0x5cca, 0x5ccb, 0x5ccc, 0x5ccd, 0x5cce, 0x5ccf, - 0x5cd0, 0x5cd1, 0x5cd2, 0x5cd3, 0x5cd4, 0x5cd5, 0x5cd6, 0x5cd7, - 0x5cd8, 0x5cd9, 0x5cda, 0x5cdb, 0x5cdc, 0x5cdd, 0x5cde, 0x5cdf, - 0x5ce0, 0x5ce1, 0x5ce2, 0x5ce3, 0x5ce4, 0x5ce5, 0x5ce6, 0x5ce7, - 0x5ce8, 0x5ce9, 0x5cea, 0x5ceb, 0x5cec, 0x5ced, 0x5cee, 0x5cef, - 0x5cf0, 0x5cf1, 0x5cf2, 0x5cf3, 0x5cf4, 0x5cf5, 0x5cf6, 0x5cf7, - 0x5cf8, 0x5cf9, 0x5cfa, 0x5cfb, 0x5cfc, 0x5cfd, 0x5cfe, 0x5cff, - 0x5d00, 0x5d01, 0x5d02, 0x5d03, 0x5d04, 0x5d05, 0x5d06, 0x5d07, - 0x5d08, 0x5d09, 0x5d0a, 0x5d0b, 0x5d0c, 0x5d0d, 0x5d0e, 0x5d0f, - 0x5d10, 0x5d11, 0x5d12, 0x5d13, 0x5d14, 0x5d15, 0x5d16, 0x5d17, - 0x5d18, 0x5d19, 0x5d1a, 0x5d1b, 0x5d1c, 0x5d1d, 0x5d1e, 0x5d1f, - 0x5d20, 0x5d21, 0x5d22, 0x5d23, 0x5d24, 0x5d25, 0x5d26, 0x5d27, - 0x5d28, 0x5d29, 0x5d2a, 0x5d2b, 0x5d2c, 0x5d2d, 0x5d2e, 0x5d2f, - 0x5d30, 0x5d31, 0x5d32, 0x5d33, 0x5d34, 0x5d35, 0x5d36, 0x5d37, - 0x5d38, 0x5d39, 0x5d3a, 0x5d3b, 0x5d3c, 0x5d3d, 0x5d3e, 0x5d3f, - 0x5d40, 0x5d41, 0x5d42, 0x5d43, 0x5d44, 0x5d45, 0x5d46, 0x5d47, - 0x5d48, 0x5d49, 0x5d4a, 0x5d4b, 0x5d4c, 0x5d4d, 0x5d4e, 0x5d4f, - 0x5d50, 0x5d51, 0x5d52, 0x5d53, 0x5d54, 0x5d55, 0x5d56, 0x5d57, - 0x5d58, 0x5d59, 0x5d5a, 0x5d5b, 0x5d5c, 0x5d5d, 0x5d5e, 0x5d5f, - 0x5d60, 0x5d61, 0x5d62, 0x5d63, 0x5d64, 0x5d65, 0x5d66, 0x5d67, - 0x5d68, 0x5d69, 0x5d6a, 0x5d6b, 0x5d6c, 0x5d6d, 0x5d6e, 0x5d6f, - 0x5d70, 0x5d71, 0x5d72, 0x5d73, 0x5d74, 0x5d75, 0x5d76, 0x5d77, - 0x5d78, 0x5d79, 0x5d7a, 0x5d7b, 0x5d7c, 0x5d7d, 0x5d7e, 0x5d7f, - 0x5d80, 0x5d81, 0x5d82, 0x5d83, 0x5d84, 0x5d85, 0x5d86, 0x5d87, - 0x5d88, 0x5d89, 0x5d8a, 0x5d8b, 0x5d8c, 0x5d8d, 0x5d8e, 0x5d8f, - 0x5d90, 0x5d91, 0x5d92, 0x5d93, 0x5d94, 0x5d95, 0x5d96, 0x5d97, - 0x5d98, 0x5d99, 0x5d9a, 0x5d9b, 0x5d9c, 0x5d9d, 0x5d9e, 0x5d9f, - 0x5da0, 0x5da1, 0x5da2, 0x5da3, 0x5da4, 0x5da5, 0x5da6, 0x5da7, - 0x5da8, 0x5da9, 0x5daa, 0x5dab, 0x5dac, 0x5dad, 0x5dae, 0x5daf, - 0x5db0, 0x5db1, 0x5db2, 0x5db3, 0x5db4, 0x5db5, 0x5db6, 0x5db7, - 0x5db8, 0x5db9, 0x5dba, 0x5dbb, 0x5dbc, 0x5dbd, 0x5dbe, 0x5dbf, - 0x5dc0, 0x5dc1, 0x5dc2, 0x5dc3, 0x5dc4, 0x5dc5, 0x5dc6, 0x5dc7, - 0x5dc8, 0x5dc9, 0x5dca, 0x5dcb, 0x5dcc, 0x5dcd, 0x5dce, 0x5dcf, - 0x5dd0, 0x5dd1, 0x5dd2, 0x5dd3, 0x5dd4, 0x5dd5, 0x5dd6, 0x5dd7, - 0x5dd8, 0x5dd9, 0x5dda, 0x5ddb, 0x5ddc, 0x5ddd, 0x5dde, 0x5ddf, - 0x5de0, 0x5de1, 0x5de2, 0x5de3, 0x5de4, 0x5de5, 0x5de6, 0x5de7, - 0x5de8, 0x5de9, 0x5dea, 0x5deb, 0x5dec, 0x5ded, 0x5dee, 0x5def, - 0x5df0, 0x5df1, 0x5df2, 0x5df3, 0x5df4, 0x5df5, 0x5df6, 0x5df7, - 0x5df8, 0x5df9, 0x5dfa, 0x5dfb, 0x5dfc, 0x5dfd, 0x5dfe, 0x5dff, - 0x5e00, 0x5e01, 0x5e02, 0x5e03, 0x5e04, 0x5e05, 0x5e06, 0x5e07, - 0x5e08, 0x5e09, 0x5e0a, 0x5e0b, 0x5e0c, 0x5e0d, 0x5e0e, 0x5e0f, - 0x5e10, 0x5e11, 0x5e12, 0x5e13, 0x5e14, 0x5e15, 0x5e16, 0x5e17, - 0x5e18, 0x5e19, 0x5e1a, 0x5e1b, 0x5e1c, 0x5e1d, 0x5e1e, 0x5e1f, - 0x5e20, 0x5e21, 0x5e22, 0x5e23, 0x5e24, 0x5e25, 0x5e26, 0x5e27, - 0x5e28, 0x5e29, 0x5e2a, 0x5e2b, 0x5e2c, 0x5e2d, 0x5e2e, 0x5e2f, - 0x5e30, 0x5e31, 0x5e32, 0x5e33, 0x5e34, 0x5e35, 0x5e36, 0x5e37, - 0x5e38, 0x5e39, 0x5e3a, 0x5e3b, 0x5e3c, 0x5e3d, 0x5e3e, 0x5e3f, - 0x5e40, 0x5e41, 0x5e42, 0x5e43, 0x5e44, 0x5e45, 0x5e46, 0x5e47, - 0x5e48, 0x5e49, 0x5e4a, 0x5e4b, 0x5e4c, 0x5e4d, 0x5e4e, 0x5e4f, - 0x5e50, 0x5e51, 0x5e52, 0x5e53, 0x5e54, 0x5e55, 0x5e56, 0x5e57, - 0x5e58, 0x5e59, 0x5e5a, 0x5e5b, 0x5e5c, 0x5e5d, 0x5e5e, 0x5e5f, - 0x5e60, 0x5e61, 0x5e62, 0x5e63, 0x5e64, 0x5e65, 0x5e66, 0x5e67, - 0x5e68, 0x5e69, 0x5e6a, 0x5e6b, 0x5e6c, 0x5e6d, 0x5e6e, 0x5e6f, - 0x5e70, 0x5e71, 0x5e72, 0x5e73, 0x5e74, 0x5e75, 0x5e76, 0x5e77, - 0x5e78, 0x5e79, 0x5e7a, 0x5e7b, 0x5e7c, 0x5e7d, 0x5e7e, 0x5e7f, - 0x5e80, 0x5e81, 0x5e82, 0x5e83, 0x5e84, 0x5e85, 0x5e86, 0x5e87, - 0x5e88, 0x5e89, 0x5e8a, 0x5e8b, 0x5e8c, 0x5e8d, 0x5e8e, 0x5e8f, - 0x5e90, 0x5e91, 0x5e92, 0x5e93, 0x5e94, 0x5e95, 0x5e96, 0x5e97, - 0x5e98, 0x5e99, 0x5e9a, 0x5e9b, 0x5e9c, 0x5e9d, 0x5e9e, 0x5e9f, - 0x5ea0, 0x5ea1, 0x5ea2, 0x5ea3, 0x5ea4, 0x5ea5, 0x5ea6, 0x5ea7, - 0x5ea8, 0x5ea9, 0x5eaa, 0x5eab, 0x5eac, 0x5ead, 0x5eae, 0x5eaf, - 0x5eb0, 0x5eb1, 0x5eb2, 0x5eb3, 0x5eb4, 0x5eb5, 0x5eb6, 0x5eb7, - 0x5eb8, 0x5eb9, 0x5eba, 0x5ebb, 0x5ebc, 0x5ebd, 0x5ebe, 0x5ebf, - 0x5ec0, 0x5ec1, 0x5ec2, 0x5ec3, 0x5ec4, 0x5ec5, 0x5ec6, 0x5ec7, - 0x5ec8, 0x5ec9, 0x5eca, 0x5ecb, 0x5ecc, 0x5ecd, 0x5ece, 0x5ecf, - 0x5ed0, 0x5ed1, 0x5ed2, 0x5ed3, 0x5ed4, 0x5ed5, 0x5ed6, 0x5ed7, - 0x5ed8, 0x5ed9, 0x5eda, 0x5edb, 0x5edc, 0x5edd, 0x5ede, 0x5edf, - 0x5ee0, 0x5ee1, 0x5ee2, 0x5ee3, 0x5ee4, 0x5ee5, 0x5ee6, 0x5ee7, - 0x5ee8, 0x5ee9, 0x5eea, 0x5eeb, 0x5eec, 0x5eed, 0x5eee, 0x5eef, - 0x5ef0, 0x5ef1, 0x5ef2, 0x5ef3, 0x5ef4, 0x5ef5, 0x5ef6, 0x5ef7, - 0x5ef8, 0x5ef9, 0x5efa, 0x5efb, 0x5efc, 0x5efd, 0x5efe, 0x5eff, - 0x5f00, 0x5f01, 0x5f02, 0x5f03, 0x5f04, 0x5f05, 0x5f06, 0x5f07, - 0x5f08, 0x5f09, 0x5f0a, 0x5f0b, 0x5f0c, 0x5f0d, 0x5f0e, 0x5f0f, - 0x5f10, 0x5f11, 0x5f12, 0x5f13, 0x5f14, 0x5f15, 0x5f16, 0x5f17, - 0x5f18, 0x5f19, 0x5f1a, 0x5f1b, 0x5f1c, 0x5f1d, 0x5f1e, 0x5f1f, - 0x5f20, 0x5f21, 0x5f22, 0x5f23, 0x5f24, 0x5f25, 0x5f26, 0x5f27, - 0x5f28, 0x5f29, 0x5f2a, 0x5f2b, 0x5f2c, 0x5f2d, 0x5f2e, 0x5f2f, - 0x5f30, 0x5f31, 0x5f32, 0x5f33, 0x5f34, 0x5f35, 0x5f36, 0x5f37, - 0x5f38, 0x5f39, 0x5f3a, 0x5f3b, 0x5f3c, 0x5f3d, 0x5f3e, 0x5f3f, - 0x5f40, 0x5f41, 0x5f42, 0x5f43, 0x5f44, 0x5f45, 0x5f46, 0x5f47, - 0x5f48, 0x5f49, 0x5f4a, 0x5f4b, 0x5f4c, 0x5f4d, 0x5f4e, 0x5f4f, - 0x5f50, 0x5f51, 0x5f52, 0x5f53, 0x5f54, 0x5f55, 0x5f56, 0x5f57, - 0x5f58, 0x5f59, 0x5f5a, 0x5f5b, 0x5f5c, 0x5f5d, 0x5f5e, 0x5f5f, - 0x5f60, 0x5f61, 0x5f62, 0x5f63, 0x5f64, 0x5f65, 0x5f66, 0x5f67, - 0x5f68, 0x5f69, 0x5f6a, 0x5f6b, 0x5f6c, 0x5f6d, 0x5f6e, 0x5f6f, - 0x5f70, 0x5f71, 0x5f72, 0x5f73, 0x5f74, 0x5f75, 0x5f76, 0x5f77, - 0x5f78, 0x5f79, 0x5f7a, 0x5f7b, 0x5f7c, 0x5f7d, 0x5f7e, 0x5f7f, - 0x5f80, 0x5f81, 0x5f82, 0x5f83, 0x5f84, 0x5f85, 0x5f86, 0x5f87, - 0x5f88, 0x5f89, 0x5f8a, 0x5f8b, 0x5f8c, 0x5f8d, 0x5f8e, 0x5f8f, - 0x5f90, 0x5f91, 0x5f92, 0x5f93, 0x5f94, 0x5f95, 0x5f96, 0x5f97, - 0x5f98, 0x5f99, 0x5f9a, 0x5f9b, 0x5f9c, 0x5f9d, 0x5f9e, 0x5f9f, - 0x5fa0, 0x5fa1, 0x5fa2, 0x5fa3, 0x5fa4, 0x5fa5, 0x5fa6, 0x5fa7, - 0x5fa8, 0x5fa9, 0x5faa, 0x5fab, 0x5fac, 0x5fad, 0x5fae, 0x5faf, - 0x5fb0, 0x5fb1, 0x5fb2, 0x5fb3, 0x5fb4, 0x5fb5, 0x5fb6, 0x5fb7, - 0x5fb8, 0x5fb9, 0x5fba, 0x5fbb, 0x5fbc, 0x5fbd, 0x5fbe, 0x5fbf, - 0x5fc0, 0x5fc1, 0x5fc2, 0x5fc3, 0x5fc4, 0x5fc5, 0x5fc6, 0x5fc7, - 0x5fc8, 0x5fc9, 0x5fca, 0x5fcb, 0x5fcc, 0x5fcd, 0x5fce, 0x5fcf, - 0x5fd0, 0x5fd1, 0x5fd2, 0x5fd3, 0x5fd4, 0x5fd5, 0x5fd6, 0x5fd7, - 0x5fd8, 0x5fd9, 0x5fda, 0x5fdb, 0x5fdc, 0x5fdd, 0x5fde, 0x5fdf, - 0x5fe0, 0x5fe1, 0x5fe2, 0x5fe3, 0x5fe4, 0x5fe5, 0x5fe6, 0x5fe7, - 0x5fe8, 0x5fe9, 0x5fea, 0x5feb, 0x5fec, 0x5fed, 0x5fee, 0x5fef, - 0x5ff0, 0x5ff1, 0x5ff2, 0x5ff3, 0x5ff4, 0x5ff5, 0x5ff6, 0x5ff7, - 0x5ff8, 0x5ff9, 0x5ffa, 0x5ffb, 0x5ffc, 0x5ffd, 0x5ffe, 0x5fff, - 0x6000, 0x6001, 0x6002, 0x6003, 0x6004, 0x6005, 0x6006, 0x6007, - 0x6008, 0x6009, 0x600a, 0x600b, 0x600c, 0x600d, 0x600e, 0x600f, - 0x6010, 0x6011, 0x6012, 0x6013, 0x6014, 0x6015, 0x6016, 0x6017, - 0x6018, 0x6019, 0x601a, 0x601b, 0x601c, 0x601d, 0x601e, 0x601f, - 0x6020, 0x6021, 0x6022, 0x6023, 0x6024, 0x6025, 0x6026, 0x6027, - 0x6028, 0x6029, 0x602a, 0x602b, 0x602c, 0x602d, 0x602e, 0x602f, - 0x6030, 0x6031, 0x6032, 0x6033, 0x6034, 0x6035, 0x6036, 0x6037, - 0x6038, 0x6039, 0x603a, 0x603b, 0x603c, 0x603d, 0x603e, 0x603f, - 0x6040, 0x6041, 0x6042, 0x6043, 0x6044, 0x6045, 0x6046, 0x6047, - 0x6048, 0x6049, 0x604a, 0x604b, 0x604c, 0x604d, 0x604e, 0x604f, - 0x6050, 0x6051, 0x6052, 0x6053, 0x6054, 0x6055, 0x6056, 0x6057, - 0x6058, 0x6059, 0x605a, 0x605b, 0x605c, 0x605d, 0x605e, 0x605f, - 0x6060, 0x6061, 0x6062, 0x6063, 0x6064, 0x6065, 0x6066, 0x6067, - 0x6068, 0x6069, 0x606a, 0x606b, 0x606c, 0x606d, 0x606e, 0x606f, - 0x6070, 0x6071, 0x6072, 0x6073, 0x6074, 0x6075, 0x6076, 0x6077, - 0x6078, 0x6079, 0x607a, 0x607b, 0x607c, 0x607d, 0x607e, 0x607f, - 0x6080, 0x6081, 0x6082, 0x6083, 0x6084, 0x6085, 0x6086, 0x6087, - 0x6088, 0x6089, 0x608a, 0x608b, 0x608c, 0x608d, 0x608e, 0x608f, - 0x6090, 0x6091, 0x6092, 0x6093, 0x6094, 0x6095, 0x6096, 0x6097, - 0x6098, 0x6099, 0x609a, 0x609b, 0x609c, 0x609d, 0x609e, 0x609f, - 0x60a0, 0x60a1, 0x60a2, 0x60a3, 0x60a4, 0x60a5, 0x60a6, 0x60a7, - 0x60a8, 0x60a9, 0x60aa, 0x60ab, 0x60ac, 0x60ad, 0x60ae, 0x60af, - 0x60b0, 0x60b1, 0x60b2, 0x60b3, 0x60b4, 0x60b5, 0x60b6, 0x60b7, - 0x60b8, 0x60b9, 0x60ba, 0x60bb, 0x60bc, 0x60bd, 0x60be, 0x60bf, - 0x60c0, 0x60c1, 0x60c2, 0x60c3, 0x60c4, 0x60c5, 0x60c6, 0x60c7, - 0x60c8, 0x60c9, 0x60ca, 0x60cb, 0x60cc, 0x60cd, 0x60ce, 0x60cf, - 0x60d0, 0x60d1, 0x60d2, 0x60d3, 0x60d4, 0x60d5, 0x60d6, 0x60d7, - 0x60d8, 0x60d9, 0x60da, 0x60db, 0x60dc, 0x60dd, 0x60de, 0x60df, - 0x60e0, 0x60e1, 0x60e2, 0x60e3, 0x60e4, 0x60e5, 0x60e6, 0x60e7, - 0x60e8, 0x60e9, 0x60ea, 0x60eb, 0x60ec, 0x60ed, 0x60ee, 0x60ef, - 0x60f0, 0x60f1, 0x60f2, 0x60f3, 0x60f4, 0x60f5, 0x60f6, 0x60f7, - 0x60f8, 0x60f9, 0x60fa, 0x60fb, 0x60fc, 0x60fd, 0x60fe, 0x60ff, - 0x6100, 0x6101, 0x6102, 0x6103, 0x6104, 0x6105, 0x6106, 0x6107, - 0x6108, 0x6109, 0x610a, 0x610b, 0x610c, 0x610d, 0x610e, 0x610f, - 0x6110, 0x6111, 0x6112, 0x6113, 0x6114, 0x6115, 0x6116, 0x6117, - 0x6118, 0x6119, 0x611a, 0x611b, 0x611c, 0x611d, 0x611e, 0x611f, - 0x6120, 0x6121, 0x6122, 0x6123, 0x6124, 0x6125, 0x6126, 0x6127, - 0x6128, 0x6129, 0x612a, 0x612b, 0x612c, 0x612d, 0x612e, 0x612f, - 0x6130, 0x6131, 0x6132, 0x6133, 0x6134, 0x6135, 0x6136, 0x6137, - 0x6138, 0x6139, 0x613a, 0x613b, 0x613c, 0x613d, 0x613e, 0x613f, - 0x6140, 0x6141, 0x6142, 0x6143, 0x6144, 0x6145, 0x6146, 0x6147, - 0x6148, 0x6149, 0x614a, 0x614b, 0x614c, 0x614d, 0x614e, 0x614f, - 0x6150, 0x6151, 0x6152, 0x6153, 0x6154, 0x6155, 0x6156, 0x6157, - 0x6158, 0x6159, 0x615a, 0x615b, 0x615c, 0x615d, 0x615e, 0x615f, - 0x6160, 0x6161, 0x6162, 0x6163, 0x6164, 0x6165, 0x6166, 0x6167, - 0x6168, 0x6169, 0x616a, 0x616b, 0x616c, 0x616d, 0x616e, 0x616f, - 0x6170, 0x6171, 0x6172, 0x6173, 0x6174, 0x6175, 0x6176, 0x6177, - 0x6178, 0x6179, 0x617a, 0x617b, 0x617c, 0x617d, 0x617e, 0x617f, - 0x6180, 0x6181, 0x6182, 0x6183, 0x6184, 0x6185, 0x6186, 0x6187, - 0x6188, 0x6189, 0x618a, 0x618b, 0x618c, 0x618d, 0x618e, 0x618f, - 0x6190, 0x6191, 0x6192, 0x6193, 0x6194, 0x6195, 0x6196, 0x6197, - 0x6198, 0x6199, 0x619a, 0x619b, 0x619c, 0x619d, 0x619e, 0x619f, - 0x61a0, 0x61a1, 0x61a2, 0x61a3, 0x61a4, 0x61a5, 0x61a6, 0x61a7, - 0x61a8, 0x61a9, 0x61aa, 0x61ab, 0x61ac, 0x61ad, 0x61ae, 0x61af, - 0x61b0, 0x61b1, 0x61b2, 0x61b3, 0x61b4, 0x61b5, 0x61b6, 0x61b7, - 0x61b8, 0x61b9, 0x61ba, 0x61bb, 0x61bc, 0x61bd, 0x61be, 0x61bf, - 0x61c0, 0x61c1, 0x61c2, 0x61c3, 0x61c4, 0x61c5, 0x61c6, 0x61c7, - 0x61c8, 0x61c9, 0x61ca, 0x61cb, 0x61cc, 0x61cd, 0x61ce, 0x61cf, - 0x61d0, 0x61d1, 0x61d2, 0x61d3, 0x61d4, 0x61d5, 0x61d6, 0x61d7, - 0x61d8, 0x61d9, 0x61da, 0x61db, 0x61dc, 0x61dd, 0x61de, 0x61df, - 0x61e0, 0x61e1, 0x61e2, 0x61e3, 0x61e4, 0x61e5, 0x61e6, 0x61e7, - 0x61e8, 0x61e9, 0x61ea, 0x61eb, 0x61ec, 0x61ed, 0x61ee, 0x61ef, - 0x61f0, 0x61f1, 0x61f2, 0x61f3, 0x61f4, 0x61f5, 0x61f6, 0x61f7, - 0x61f8, 0x61f9, 0x61fa, 0x61fb, 0x61fc, 0x61fd, 0x61fe, 0x61ff, - 0x6200, 0x6201, 0x6202, 0x6203, 0x6204, 0x6205, 0x6206, 0x6207, - 0x6208, 0x6209, 0x620a, 0x620b, 0x620c, 0x620d, 0x620e, 0x620f, - 0x6210, 0x6211, 0x6212, 0x6213, 0x6214, 0x6215, 0x6216, 0x6217, - 0x6218, 0x6219, 0x621a, 0x621b, 0x621c, 0x621d, 0x621e, 0x621f, - 0x6220, 0x6221, 0x6222, 0x6223, 0x6224, 0x6225, 0x6226, 0x6227, - 0x6228, 0x6229, 0x622a, 0x622b, 0x622c, 0x622d, 0x622e, 0x622f, - 0x6230, 0x6231, 0x6232, 0x6233, 0x6234, 0x6235, 0x6236, 0x6237, - 0x6238, 0x6239, 0x623a, 0x623b, 0x623c, 0x623d, 0x623e, 0x623f, - 0x6240, 0x6241, 0x6242, 0x6243, 0x6244, 0x6245, 0x6246, 0x6247, - 0x6248, 0x6249, 0x624a, 0x624b, 0x624c, 0x624d, 0x624e, 0x624f, - 0x6250, 0x6251, 0x6252, 0x6253, 0x6254, 0x6255, 0x6256, 0x6257, - 0x6258, 0x6259, 0x625a, 0x625b, 0x625c, 0x625d, 0x625e, 0x625f, - 0x6260, 0x6261, 0x6262, 0x6263, 0x6264, 0x6265, 0x6266, 0x6267, - 0x6268, 0x6269, 0x626a, 0x626b, 0x626c, 0x626d, 0x626e, 0x626f, - 0x6270, 0x6271, 0x6272, 0x6273, 0x6274, 0x6275, 0x6276, 0x6277, - 0x6278, 0x6279, 0x627a, 0x627b, 0x627c, 0x627d, 0x627e, 0x627f, - 0x6280, 0x6281, 0x6282, 0x6283, 0x6284, 0x6285, 0x6286, 0x6287, - 0x6288, 0x6289, 0x628a, 0x628b, 0x628c, 0x628d, 0x628e, 0x628f, - 0x6290, 0x6291, 0x6292, 0x6293, 0x6294, 0x6295, 0x6296, 0x6297, - 0x6298, 0x6299, 0x629a, 0x629b, 0x629c, 0x629d, 0x629e, 0x629f, - 0x62a0, 0x62a1, 0x62a2, 0x62a3, 0x62a4, 0x62a5, 0x62a6, 0x62a7, - 0x62a8, 0x62a9, 0x62aa, 0x62ab, 0x62ac, 0x62ad, 0x62ae, 0x62af, - 0x62b0, 0x62b1, 0x62b2, 0x62b3, 0x62b4, 0x62b5, 0x62b6, 0x62b7, - 0x62b8, 0x62b9, 0x62ba, 0x62bb, 0x62bc, 0x62bd, 0x62be, 0x62bf, - 0x62c0, 0x62c1, 0x62c2, 0x62c3, 0x62c4, 0x62c5, 0x62c6, 0x62c7, - 0x62c8, 0x62c9, 0x62ca, 0x62cb, 0x62cc, 0x62cd, 0x62ce, 0x62cf, - 0x62d0, 0x62d1, 0x62d2, 0x62d3, 0x62d4, 0x62d5, 0x62d6, 0x62d7, - 0x62d8, 0x62d9, 0x62da, 0x62db, 0x62dc, 0x62dd, 0x62de, 0x62df, - 0x62e0, 0x62e1, 0x62e2, 0x62e3, 0x62e4, 0x62e5, 0x62e6, 0x62e7, - 0x62e8, 0x62e9, 0x62ea, 0x62eb, 0x62ec, 0x62ed, 0x62ee, 0x62ef, - 0x62f0, 0x62f1, 0x62f2, 0x62f3, 0x62f4, 0x62f5, 0x62f6, 0x62f7, - 0x62f8, 0x62f9, 0x62fa, 0x62fb, 0x62fc, 0x62fd, 0x62fe, 0x62ff, - 0x6300, 0x6301, 0x6302, 0x6303, 0x6304, 0x6305, 0x6306, 0x6307, - 0x6308, 0x6309, 0x630a, 0x630b, 0x630c, 0x630d, 0x630e, 0x630f, - 0x6310, 0x6311, 0x6312, 0x6313, 0x6314, 0x6315, 0x6316, 0x6317, - 0x6318, 0x6319, 0x631a, 0x631b, 0x631c, 0x631d, 0x631e, 0x631f, - 0x6320, 0x6321, 0x6322, 0x6323, 0x6324, 0x6325, 0x6326, 0x6327, - 0x6328, 0x6329, 0x632a, 0x632b, 0x632c, 0x632d, 0x632e, 0x632f, - 0x6330, 0x6331, 0x6332, 0x6333, 0x6334, 0x6335, 0x6336, 0x6337, - 0x6338, 0x6339, 0x633a, 0x633b, 0x633c, 0x633d, 0x633e, 0x633f, - 0x6340, 0x6341, 0x6342, 0x6343, 0x6344, 0x6345, 0x6346, 0x6347, - 0x6348, 0x6349, 0x634a, 0x634b, 0x634c, 0x634d, 0x634e, 0x634f, - 0x6350, 0x6351, 0x6352, 0x6353, 0x6354, 0x6355, 0x6356, 0x6357, - 0x6358, 0x6359, 0x635a, 0x635b, 0x635c, 0x635d, 0x635e, 0x635f, - 0x6360, 0x6361, 0x6362, 0x6363, 0x6364, 0x6365, 0x6366, 0x6367, - 0x6368, 0x6369, 0x636a, 0x636b, 0x636c, 0x636d, 0x636e, 0x636f, - 0x6370, 0x6371, 0x6372, 0x6373, 0x6374, 0x6375, 0x6376, 0x6377, - 0x6378, 0x6379, 0x637a, 0x637b, 0x637c, 0x637d, 0x637e, 0x637f, - 0x6380, 0x6381, 0x6382, 0x6383, 0x6384, 0x6385, 0x6386, 0x6387, - 0x6388, 0x6389, 0x638a, 0x638b, 0x638c, 0x638d, 0x638e, 0x638f, - 0x6390, 0x6391, 0x6392, 0x6393, 0x6394, 0x6395, 0x6396, 0x6397, - 0x6398, 0x6399, 0x639a, 0x639b, 0x639c, 0x639d, 0x639e, 0x639f, - 0x63a0, 0x63a1, 0x63a2, 0x63a3, 0x63a4, 0x63a5, 0x63a6, 0x63a7, - 0x63a8, 0x63a9, 0x63aa, 0x63ab, 0x63ac, 0x63ad, 0x63ae, 0x63af, - 0x63b0, 0x63b1, 0x63b2, 0x63b3, 0x63b4, 0x63b5, 0x63b6, 0x63b7, - 0x63b8, 0x63b9, 0x63ba, 0x63bb, 0x63bc, 0x63bd, 0x63be, 0x63bf, - 0x63c0, 0x63c1, 0x63c2, 0x63c3, 0x63c4, 0x63c5, 0x63c6, 0x63c7, - 0x63c8, 0x63c9, 0x63ca, 0x63cb, 0x63cc, 0x63cd, 0x63ce, 0x63cf, - 0x63d0, 0x63d1, 0x63d2, 0x63d3, 0x63d4, 0x63d5, 0x63d6, 0x63d7, - 0x63d8, 0x63d9, 0x63da, 0x63db, 0x63dc, 0x63dd, 0x63de, 0x63df, - 0x63e0, 0x63e1, 0x63e2, 0x63e3, 0x63e4, 0x63e5, 0x63e6, 0x63e7, - 0x63e8, 0x63e9, 0x63ea, 0x63eb, 0x63ec, 0x63ed, 0x63ee, 0x63ef, - 0x63f0, 0x63f1, 0x63f2, 0x63f3, 0x63f4, 0x63f5, 0x63f6, 0x63f7, - 0x63f8, 0x63f9, 0x63fa, 0x63fb, 0x63fc, 0x63fd, 0x63fe, 0x63ff, - 0x6400, 0x6401, 0x6402, 0x6403, 0x6404, 0x6405, 0x6406, 0x6407, - 0x6408, 0x6409, 0x640a, 0x640b, 0x640c, 0x640d, 0x640e, 0x640f, - 0x6410, 0x6411, 0x6412, 0x6413, 0x6414, 0x6415, 0x6416, 0x6417, - 0x6418, 0x6419, 0x641a, 0x641b, 0x641c, 0x641d, 0x641e, 0x641f, - 0x6420, 0x6421, 0x6422, 0x6423, 0x6424, 0x6425, 0x6426, 0x6427, - 0x6428, 0x6429, 0x642a, 0x642b, 0x642c, 0x642d, 0x642e, 0x642f, - 0x6430, 0x6431, 0x6432, 0x6433, 0x6434, 0x6435, 0x6436, 0x6437, - 0x6438, 0x6439, 0x643a, 0x643b, 0x643c, 0x643d, 0x643e, 0x643f, - 0x6440, 0x6441, 0x6442, 0x6443, 0x6444, 0x6445, 0x6446, 0x6447, - 0x6448, 0x6449, 0x644a, 0x644b, 0x644c, 0x644d, 0x644e, 0x644f, - 0x6450, 0x6451, 0x6452, 0x6453, 0x6454, 0x6455, 0x6456, 0x6457, - 0x6458, 0x6459, 0x645a, 0x645b, 0x645c, 0x645d, 0x645e, 0x645f, - 0x6460, 0x6461, 0x6462, 0x6463, 0x6464, 0x6465, 0x6466, 0x6467, - 0x6468, 0x6469, 0x646a, 0x646b, 0x646c, 0x646d, 0x646e, 0x646f, - 0x6470, 0x6471, 0x6472, 0x6473, 0x6474, 0x6475, 0x6476, 0x6477, - 0x6478, 0x6479, 0x647a, 0x647b, 0x647c, 0x647d, 0x647e, 0x647f, - 0x6480, 0x6481, 0x6482, 0x6483, 0x6484, 0x6485, 0x6486, 0x6487, - 0x6488, 0x6489, 0x648a, 0x648b, 0x648c, 0x648d, 0x648e, 0x648f, - 0x6490, 0x6491, 0x6492, 0x6493, 0x6494, 0x6495, 0x6496, 0x6497, - 0x6498, 0x6499, 0x649a, 0x649b, 0x649c, 0x649d, 0x649e, 0x649f, - 0x64a0, 0x64a1, 0x64a2, 0x64a3, 0x64a4, 0x64a5, 0x64a6, 0x64a7, - 0x64a8, 0x64a9, 0x64aa, 0x64ab, 0x64ac, 0x64ad, 0x64ae, 0x64af, - 0x64b0, 0x64b1, 0x64b2, 0x64b3, 0x64b4, 0x64b5, 0x64b6, 0x64b7, - 0x64b8, 0x64b9, 0x64ba, 0x64bb, 0x64bc, 0x64bd, 0x64be, 0x64bf, - 0x64c0, 0x64c1, 0x64c2, 0x64c3, 0x64c4, 0x64c5, 0x64c6, 0x64c7, - 0x64c8, 0x64c9, 0x64ca, 0x64cb, 0x64cc, 0x64cd, 0x64ce, 0x64cf, - 0x64d0, 0x64d1, 0x64d2, 0x64d3, 0x64d4, 0x64d5, 0x64d6, 0x64d7, - 0x64d8, 0x64d9, 0x64da, 0x64db, 0x64dc, 0x64dd, 0x64de, 0x64df, - 0x64e0, 0x64e1, 0x64e2, 0x64e3, 0x64e4, 0x64e5, 0x64e6, 0x64e7, - 0x64e8, 0x64e9, 0x64ea, 0x64eb, 0x64ec, 0x64ed, 0x64ee, 0x64ef, - 0x64f0, 0x64f1, 0x64f2, 0x64f3, 0x64f4, 0x64f5, 0x64f6, 0x64f7, - 0x64f8, 0x64f9, 0x64fa, 0x64fb, 0x64fc, 0x64fd, 0x64fe, 0x64ff, - 0x6500, 0x6501, 0x6502, 0x6503, 0x6504, 0x6505, 0x6506, 0x6507, - 0x6508, 0x6509, 0x650a, 0x650b, 0x650c, 0x650d, 0x650e, 0x650f, - 0x6510, 0x6511, 0x6512, 0x6513, 0x6514, 0x6515, 0x6516, 0x6517, - 0x6518, 0x6519, 0x651a, 0x651b, 0x651c, 0x651d, 0x651e, 0x651f, - 0x6520, 0x6521, 0x6522, 0x6523, 0x6524, 0x6525, 0x6526, 0x6527, - 0x6528, 0x6529, 0x652a, 0x652b, 0x652c, 0x652d, 0x652e, 0x652f, - 0x6530, 0x6531, 0x6532, 0x6533, 0x6534, 0x6535, 0x6536, 0x6537, - 0x6538, 0x6539, 0x653a, 0x653b, 0x653c, 0x653d, 0x653e, 0x653f, - 0x6540, 0x6541, 0x6542, 0x6543, 0x6544, 0x6545, 0x6546, 0x6547, - 0x6548, 0x6549, 0x654a, 0x654b, 0x654c, 0x654d, 0x654e, 0x654f, - 0x6550, 0x6551, 0x6552, 0x6553, 0x6554, 0x6555, 0x6556, 0x6557, - 0x6558, 0x6559, 0x655a, 0x655b, 0x655c, 0x655d, 0x655e, 0x655f, - 0x6560, 0x6561, 0x6562, 0x6563, 0x6564, 0x6565, 0x6566, 0x6567, - 0x6568, 0x6569, 0x656a, 0x656b, 0x656c, 0x656d, 0x656e, 0x656f, - 0x6570, 0x6571, 0x6572, 0x6573, 0x6574, 0x6575, 0x6576, 0x6577, - 0x6578, 0x6579, 0x657a, 0x657b, 0x657c, 0x657d, 0x657e, 0x657f, - 0x6580, 0x6581, 0x6582, 0x6583, 0x6584, 0x6585, 0x6586, 0x6587, - 0x6588, 0x6589, 0x658a, 0x658b, 0x658c, 0x658d, 0x658e, 0x658f, - 0x6590, 0x6591, 0x6592, 0x6593, 0x6594, 0x6595, 0x6596, 0x6597, - 0x6598, 0x6599, 0x659a, 0x659b, 0x659c, 0x659d, 0x659e, 0x659f, - 0x65a0, 0x65a1, 0x65a2, 0x65a3, 0x65a4, 0x65a5, 0x65a6, 0x65a7, - 0x65a8, 0x65a9, 0x65aa, 0x65ab, 0x65ac, 0x65ad, 0x65ae, 0x65af, - 0x65b0, 0x65b1, 0x65b2, 0x65b3, 0x65b4, 0x65b5, 0x65b6, 0x65b7, - 0x65b8, 0x65b9, 0x65ba, 0x65bb, 0x65bc, 0x65bd, 0x65be, 0x65bf, - 0x65c0, 0x65c1, 0x65c2, 0x65c3, 0x65c4, 0x65c5, 0x65c6, 0x65c7, - 0x65c8, 0x65c9, 0x65ca, 0x65cb, 0x65cc, 0x65cd, 0x65ce, 0x65cf, - 0x65d0, 0x65d1, 0x65d2, 0x65d3, 0x65d4, 0x65d5, 0x65d6, 0x65d7, - 0x65d8, 0x65d9, 0x65da, 0x65db, 0x65dc, 0x65dd, 0x65de, 0x65df, - 0x65e0, 0x65e1, 0x65e2, 0x65e3, 0x65e4, 0x65e5, 0x65e6, 0x65e7, - 0x65e8, 0x65e9, 0x65ea, 0x65eb, 0x65ec, 0x65ed, 0x65ee, 0x65ef, - 0x65f0, 0x65f1, 0x65f2, 0x65f3, 0x65f4, 0x65f5, 0x65f6, 0x65f7, - 0x65f8, 0x65f9, 0x65fa, 0x65fb, 0x65fc, 0x65fd, 0x65fe, 0x65ff, - 0x6600, 0x6601, 0x6602, 0x6603, 0x6604, 0x6605, 0x6606, 0x6607, - 0x6608, 0x6609, 0x660a, 0x660b, 0x660c, 0x660d, 0x660e, 0x660f, - 0x6610, 0x6611, 0x6612, 0x6613, 0x6614, 0x6615, 0x6616, 0x6617, - 0x6618, 0x6619, 0x661a, 0x661b, 0x661c, 0x661d, 0x661e, 0x661f, - 0x6620, 0x6621, 0x6622, 0x6623, 0x6624, 0x6625, 0x6626, 0x6627, - 0x6628, 0x6629, 0x662a, 0x662b, 0x662c, 0x662d, 0x662e, 0x662f, - 0x6630, 0x6631, 0x6632, 0x6633, 0x6634, 0x6635, 0x6636, 0x6637, - 0x6638, 0x6639, 0x663a, 0x663b, 0x663c, 0x663d, 0x663e, 0x663f, - 0x6640, 0x6641, 0x6642, 0x6643, 0x6644, 0x6645, 0x6646, 0x6647, - 0x6648, 0x6649, 0x664a, 0x664b, 0x664c, 0x664d, 0x664e, 0x664f, - 0x6650, 0x6651, 0x6652, 0x6653, 0x6654, 0x6655, 0x6656, 0x6657, - 0x6658, 0x6659, 0x665a, 0x665b, 0x665c, 0x665d, 0x665e, 0x665f, - 0x6660, 0x6661, 0x6662, 0x6663, 0x6664, 0x6665, 0x6666, 0x6667, - 0x6668, 0x6669, 0x666a, 0x666b, 0x666c, 0x666d, 0x666e, 0x666f, - 0x6670, 0x6671, 0x6672, 0x6673, 0x6674, 0x6675, 0x6676, 0x6677, - 0x6678, 0x6679, 0x667a, 0x667b, 0x667c, 0x667d, 0x667e, 0x667f, - 0x6680, 0x6681, 0x6682, 0x6683, 0x6684, 0x6685, 0x6686, 0x6687, - 0x6688, 0x6689, 0x668a, 0x668b, 0x668c, 0x668d, 0x668e, 0x668f, - 0x6690, 0x6691, 0x6692, 0x6693, 0x6694, 0x6695, 0x6696, 0x6697, - 0x6698, 0x6699, 0x669a, 0x669b, 0x669c, 0x669d, 0x669e, 0x669f, - 0x66a0, 0x66a1, 0x66a2, 0x66a3, 0x66a4, 0x66a5, 0x66a6, 0x66a7, - 0x66a8, 0x66a9, 0x66aa, 0x66ab, 0x66ac, 0x66ad, 0x66ae, 0x66af, - 0x66b0, 0x66b1, 0x66b2, 0x66b3, 0x66b4, 0x66b5, 0x66b6, 0x66b7, - 0x66b8, 0x66b9, 0x66ba, 0x66bb, 0x66bc, 0x66bd, 0x66be, 0x66bf, - 0x66c0, 0x66c1, 0x66c2, 0x66c3, 0x66c4, 0x66c5, 0x66c6, 0x66c7, - 0x66c8, 0x66c9, 0x66ca, 0x66cb, 0x66cc, 0x66cd, 0x66ce, 0x66cf, - 0x66d0, 0x66d1, 0x66d2, 0x66d3, 0x66d4, 0x66d5, 0x66d6, 0x66d7, - 0x66d8, 0x66d9, 0x66da, 0x66db, 0x66dc, 0x66dd, 0x66de, 0x66df, - 0x66e0, 0x66e1, 0x66e2, 0x66e3, 0x66e4, 0x66e5, 0x66e6, 0x66e7, - 0x66e8, 0x66e9, 0x66ea, 0x66eb, 0x66ec, 0x66ed, 0x66ee, 0x66ef, - 0x66f0, 0x66f1, 0x66f2, 0x66f3, 0x66f4, 0x66f5, 0x66f6, 0x66f7, - 0x66f8, 0x66f9, 0x66fa, 0x66fb, 0x66fc, 0x66fd, 0x66fe, 0x66ff, - 0x6700, 0x6701, 0x6702, 0x6703, 0x6704, 0x6705, 0x6706, 0x6707, - 0x6708, 0x6709, 0x670a, 0x670b, 0x670c, 0x670d, 0x670e, 0x670f, - 0x6710, 0x6711, 0x6712, 0x6713, 0x6714, 0x6715, 0x6716, 0x6717, - 0x6718, 0x6719, 0x671a, 0x671b, 0x671c, 0x671d, 0x671e, 0x671f, - 0x6720, 0x6721, 0x6722, 0x6723, 0x6724, 0x6725, 0x6726, 0x6727, - 0x6728, 0x6729, 0x672a, 0x672b, 0x672c, 0x672d, 0x672e, 0x672f, - 0x6730, 0x6731, 0x6732, 0x6733, 0x6734, 0x6735, 0x6736, 0x6737, - 0x6738, 0x6739, 0x673a, 0x673b, 0x673c, 0x673d, 0x673e, 0x673f, - 0x6740, 0x6741, 0x6742, 0x6743, 0x6744, 0x6745, 0x6746, 0x6747, - 0x6748, 0x6749, 0x674a, 0x674b, 0x674c, 0x674d, 0x674e, 0x674f, - 0x6750, 0x6751, 0x6752, 0x6753, 0x6754, 0x6755, 0x6756, 0x6757, - 0x6758, 0x6759, 0x675a, 0x675b, 0x675c, 0x675d, 0x675e, 0x675f, - 0x6760, 0x6761, 0x6762, 0x6763, 0x6764, 0x6765, 0x6766, 0x6767, - 0x6768, 0x6769, 0x676a, 0x676b, 0x676c, 0x676d, 0x676e, 0x676f, - 0x6770, 0x6771, 0x6772, 0x6773, 0x6774, 0x6775, 0x6776, 0x6777, - 0x6778, 0x6779, 0x677a, 0x677b, 0x677c, 0x677d, 0x677e, 0x677f, - 0x6780, 0x6781, 0x6782, 0x6783, 0x6784, 0x6785, 0x6786, 0x6787, - 0x6788, 0x6789, 0x678a, 0x678b, 0x678c, 0x678d, 0x678e, 0x678f, - 0x6790, 0x6791, 0x6792, 0x6793, 0x6794, 0x6795, 0x6796, 0x6797, - 0x6798, 0x6799, 0x679a, 0x679b, 0x679c, 0x679d, 0x679e, 0x679f, - 0x67a0, 0x67a1, 0x67a2, 0x67a3, 0x67a4, 0x67a5, 0x67a6, 0x67a7, - 0x67a8, 0x67a9, 0x67aa, 0x67ab, 0x67ac, 0x67ad, 0x67ae, 0x67af, - 0x67b0, 0x67b1, 0x67b2, 0x67b3, 0x67b4, 0x67b5, 0x67b6, 0x67b7, - 0x67b8, 0x67b9, 0x67ba, 0x67bb, 0x67bc, 0x67bd, 0x67be, 0x67bf, - 0x67c0, 0x67c1, 0x67c2, 0x67c3, 0x67c4, 0x67c5, 0x67c6, 0x67c7, - 0x67c8, 0x67c9, 0x67ca, 0x67cb, 0x67cc, 0x67cd, 0x67ce, 0x67cf, - 0x67d0, 0x67d1, 0x67d2, 0x67d3, 0x67d4, 0x67d5, 0x67d6, 0x67d7, - 0x67d8, 0x67d9, 0x67da, 0x67db, 0x67dc, 0x67dd, 0x67de, 0x67df, - 0x67e0, 0x67e1, 0x67e2, 0x67e3, 0x67e4, 0x67e5, 0x67e6, 0x67e7, - 0x67e8, 0x67e9, 0x67ea, 0x67eb, 0x67ec, 0x67ed, 0x67ee, 0x67ef, - 0x67f0, 0x67f1, 0x67f2, 0x67f3, 0x67f4, 0x67f5, 0x67f6, 0x67f7, - 0x67f8, 0x67f9, 0x67fa, 0x67fb, 0x67fc, 0x67fd, 0x67fe, 0x67ff, - 0x6800, 0x6801, 0x6802, 0x6803, 0x6804, 0x6805, 0x6806, 0x6807, - 0x6808, 0x6809, 0x680a, 0x680b, 0x680c, 0x680d, 0x680e, 0x680f, - 0x6810, 0x6811, 0x6812, 0x6813, 0x6814, 0x6815, 0x6816, 0x6817, - 0x6818, 0x6819, 0x681a, 0x681b, 0x681c, 0x681d, 0x681e, 0x681f, - 0x6820, 0x6821, 0x6822, 0x6823, 0x6824, 0x6825, 0x6826, 0x6827, - 0x6828, 0x6829, 0x682a, 0x682b, 0x682c, 0x682d, 0x682e, 0x682f, - 0x6830, 0x6831, 0x6832, 0x6833, 0x6834, 0x6835, 0x6836, 0x6837, - 0x6838, 0x6839, 0x683a, 0x683b, 0x683c, 0x683d, 0x683e, 0x683f, - 0x6840, 0x6841, 0x6842, 0x6843, 0x6844, 0x6845, 0x6846, 0x6847, - 0x6848, 0x6849, 0x684a, 0x684b, 0x684c, 0x684d, 0x684e, 0x684f, - 0x6850, 0x6851, 0x6852, 0x6853, 0x6854, 0x6855, 0x6856, 0x6857, - 0x6858, 0x6859, 0x685a, 0x685b, 0x685c, 0x685d, 0x685e, 0x685f, - 0x6860, 0x6861, 0x6862, 0x6863, 0x6864, 0x6865, 0x6866, 0x6867, - 0x6868, 0x6869, 0x686a, 0x686b, 0x686c, 0x686d, 0x686e, 0x686f, - 0x6870, 0x6871, 0x6872, 0x6873, 0x6874, 0x6875, 0x6876, 0x6877, - 0x6878, 0x6879, 0x687a, 0x687b, 0x687c, 0x687d, 0x687e, 0x687f, - 0x6880, 0x6881, 0x6882, 0x6883, 0x6884, 0x6885, 0x6886, 0x6887, - 0x6888, 0x6889, 0x688a, 0x688b, 0x688c, 0x688d, 0x688e, 0x688f, - 0x6890, 0x6891, 0x6892, 0x6893, 0x6894, 0x6895, 0x6896, 0x6897, - 0x6898, 0x6899, 0x689a, 0x689b, 0x689c, 0x689d, 0x689e, 0x689f, - 0x68a0, 0x68a1, 0x68a2, 0x68a3, 0x68a4, 0x68a5, 0x68a6, 0x68a7, - 0x68a8, 0x68a9, 0x68aa, 0x68ab, 0x68ac, 0x68ad, 0x68ae, 0x68af, - 0x68b0, 0x68b1, 0x68b2, 0x68b3, 0x68b4, 0x68b5, 0x68b6, 0x68b7, - 0x68b8, 0x68b9, 0x68ba, 0x68bb, 0x68bc, 0x68bd, 0x68be, 0x68bf, - 0x68c0, 0x68c1, 0x68c2, 0x68c3, 0x68c4, 0x68c5, 0x68c6, 0x68c7, - 0x68c8, 0x68c9, 0x68ca, 0x68cb, 0x68cc, 0x68cd, 0x68ce, 0x68cf, - 0x68d0, 0x68d1, 0x68d2, 0x68d3, 0x68d4, 0x68d5, 0x68d6, 0x68d7, - 0x68d8, 0x68d9, 0x68da, 0x68db, 0x68dc, 0x68dd, 0x68de, 0x68df, - 0x68e0, 0x68e1, 0x68e2, 0x68e3, 0x68e4, 0x68e5, 0x68e6, 0x68e7, - 0x68e8, 0x68e9, 0x68ea, 0x68eb, 0x68ec, 0x68ed, 0x68ee, 0x68ef, - 0x68f0, 0x68f1, 0x68f2, 0x68f3, 0x68f4, 0x68f5, 0x68f6, 0x68f7, - 0x68f8, 0x68f9, 0x68fa, 0x68fb, 0x68fc, 0x68fd, 0x68fe, 0x68ff, - 0x6900, 0x6901, 0x6902, 0x6903, 0x6904, 0x6905, 0x6906, 0x6907, - 0x6908, 0x6909, 0x690a, 0x690b, 0x690c, 0x690d, 0x690e, 0x690f, - 0x6910, 0x6911, 0x6912, 0x6913, 0x6914, 0x6915, 0x6916, 0x6917, - 0x6918, 0x6919, 0x691a, 0x691b, 0x691c, 0x691d, 0x691e, 0x691f, - 0x6920, 0x6921, 0x6922, 0x6923, 0x6924, 0x6925, 0x6926, 0x6927, - 0x6928, 0x6929, 0x692a, 0x692b, 0x692c, 0x692d, 0x692e, 0x692f, - 0x6930, 0x6931, 0x6932, 0x6933, 0x6934, 0x6935, 0x6936, 0x6937, - 0x6938, 0x6939, 0x693a, 0x693b, 0x693c, 0x693d, 0x693e, 0x693f, - 0x6940, 0x6941, 0x6942, 0x6943, 0x6944, 0x6945, 0x6946, 0x6947, - 0x6948, 0x6949, 0x694a, 0x694b, 0x694c, 0x694d, 0x694e, 0x694f, - 0x6950, 0x6951, 0x6952, 0x6953, 0x6954, 0x6955, 0x6956, 0x6957, - 0x6958, 0x6959, 0x695a, 0x695b, 0x695c, 0x695d, 0x695e, 0x695f, - 0x6960, 0x6961, 0x6962, 0x6963, 0x6964, 0x6965, 0x6966, 0x6967, - 0x6968, 0x6969, 0x696a, 0x696b, 0x696c, 0x696d, 0x696e, 0x696f, - 0x6970, 0x6971, 0x6972, 0x6973, 0x6974, 0x6975, 0x6976, 0x6977, - 0x6978, 0x6979, 0x697a, 0x697b, 0x697c, 0x697d, 0x697e, 0x697f, - 0x6980, 0x6981, 0x6982, 0x6983, 0x6984, 0x6985, 0x6986, 0x6987, - 0x6988, 0x6989, 0x698a, 0x698b, 0x698c, 0x698d, 0x698e, 0x698f, - 0x6990, 0x6991, 0x6992, 0x6993, 0x6994, 0x6995, 0x6996, 0x6997, - 0x6998, 0x6999, 0x699a, 0x699b, 0x699c, 0x699d, 0x699e, 0x699f, - 0x69a0, 0x69a1, 0x69a2, 0x69a3, 0x69a4, 0x69a5, 0x69a6, 0x69a7, - 0x69a8, 0x69a9, 0x69aa, 0x69ab, 0x69ac, 0x69ad, 0x69ae, 0x69af, - 0x69b0, 0x69b1, 0x69b2, 0x69b3, 0x69b4, 0x69b5, 0x69b6, 0x69b7, - 0x69b8, 0x69b9, 0x69ba, 0x69bb, 0x69bc, 0x69bd, 0x69be, 0x69bf, - 0x69c0, 0x69c1, 0x69c2, 0x69c3, 0x69c4, 0x69c5, 0x69c6, 0x69c7, - 0x69c8, 0x69c9, 0x69ca, 0x69cb, 0x69cc, 0x69cd, 0x69ce, 0x69cf, - 0x69d0, 0x69d1, 0x69d2, 0x69d3, 0x69d4, 0x69d5, 0x69d6, 0x69d7, - 0x69d8, 0x69d9, 0x69da, 0x69db, 0x69dc, 0x69dd, 0x69de, 0x69df, - 0x69e0, 0x69e1, 0x69e2, 0x69e3, 0x69e4, 0x69e5, 0x69e6, 0x69e7, - 0x69e8, 0x69e9, 0x69ea, 0x69eb, 0x69ec, 0x69ed, 0x69ee, 0x69ef, - 0x69f0, 0x69f1, 0x69f2, 0x69f3, 0x69f4, 0x69f5, 0x69f6, 0x69f7, - 0x69f8, 0x69f9, 0x69fa, 0x69fb, 0x69fc, 0x69fd, 0x69fe, 0x69ff, - 0x6a00, 0x6a01, 0x6a02, 0x6a03, 0x6a04, 0x6a05, 0x6a06, 0x6a07, - 0x6a08, 0x6a09, 0x6a0a, 0x6a0b, 0x6a0c, 0x6a0d, 0x6a0e, 0x6a0f, - 0x6a10, 0x6a11, 0x6a12, 0x6a13, 0x6a14, 0x6a15, 0x6a16, 0x6a17, - 0x6a18, 0x6a19, 0x6a1a, 0x6a1b, 0x6a1c, 0x6a1d, 0x6a1e, 0x6a1f, - 0x6a20, 0x6a21, 0x6a22, 0x6a23, 0x6a24, 0x6a25, 0x6a26, 0x6a27, - 0x6a28, 0x6a29, 0x6a2a, 0x6a2b, 0x6a2c, 0x6a2d, 0x6a2e, 0x6a2f, - 0x6a30, 0x6a31, 0x6a32, 0x6a33, 0x6a34, 0x6a35, 0x6a36, 0x6a37, - 0x6a38, 0x6a39, 0x6a3a, 0x6a3b, 0x6a3c, 0x6a3d, 0x6a3e, 0x6a3f, - 0x6a40, 0x6a41, 0x6a42, 0x6a43, 0x6a44, 0x6a45, 0x6a46, 0x6a47, - 0x6a48, 0x6a49, 0x6a4a, 0x6a4b, 0x6a4c, 0x6a4d, 0x6a4e, 0x6a4f, - 0x6a50, 0x6a51, 0x6a52, 0x6a53, 0x6a54, 0x6a55, 0x6a56, 0x6a57, - 0x6a58, 0x6a59, 0x6a5a, 0x6a5b, 0x6a5c, 0x6a5d, 0x6a5e, 0x6a5f, - 0x6a60, 0x6a61, 0x6a62, 0x6a63, 0x6a64, 0x6a65, 0x6a66, 0x6a67, - 0x6a68, 0x6a69, 0x6a6a, 0x6a6b, 0x6a6c, 0x6a6d, 0x6a6e, 0x6a6f, - 0x6a70, 0x6a71, 0x6a72, 0x6a73, 0x6a74, 0x6a75, 0x6a76, 0x6a77, - 0x6a78, 0x6a79, 0x6a7a, 0x6a7b, 0x6a7c, 0x6a7d, 0x6a7e, 0x6a7f, - 0x6a80, 0x6a81, 0x6a82, 0x6a83, 0x6a84, 0x6a85, 0x6a86, 0x6a87, - 0x6a88, 0x6a89, 0x6a8a, 0x6a8b, 0x6a8c, 0x6a8d, 0x6a8e, 0x6a8f, - 0x6a90, 0x6a91, 0x6a92, 0x6a93, 0x6a94, 0x6a95, 0x6a96, 0x6a97, - 0x6a98, 0x6a99, 0x6a9a, 0x6a9b, 0x6a9c, 0x6a9d, 0x6a9e, 0x6a9f, - 0x6aa0, 0x6aa1, 0x6aa2, 0x6aa3, 0x6aa4, 0x6aa5, 0x6aa6, 0x6aa7, - 0x6aa8, 0x6aa9, 0x6aaa, 0x6aab, 0x6aac, 0x6aad, 0x6aae, 0x6aaf, - 0x6ab0, 0x6ab1, 0x6ab2, 0x6ab3, 0x6ab4, 0x6ab5, 0x6ab6, 0x6ab7, - 0x6ab8, 0x6ab9, 0x6aba, 0x6abb, 0x6abc, 0x6abd, 0x6abe, 0x6abf, - 0x6ac0, 0x6ac1, 0x6ac2, 0x6ac3, 0x6ac4, 0x6ac5, 0x6ac6, 0x6ac7, - 0x6ac8, 0x6ac9, 0x6aca, 0x6acb, 0x6acc, 0x6acd, 0x6ace, 0x6acf, - 0x6ad0, 0x6ad1, 0x6ad2, 0x6ad3, 0x6ad4, 0x6ad5, 0x6ad6, 0x6ad7, - 0x6ad8, 0x6ad9, 0x6ada, 0x6adb, 0x6adc, 0x6add, 0x6ade, 0x6adf, - 0x6ae0, 0x6ae1, 0x6ae2, 0x6ae3, 0x6ae4, 0x6ae5, 0x6ae6, 0x6ae7, - 0x6ae8, 0x6ae9, 0x6aea, 0x6aeb, 0x6aec, 0x6aed, 0x6aee, 0x6aef, - 0x6af0, 0x6af1, 0x6af2, 0x6af3, 0x6af4, 0x6af5, 0x6af6, 0x6af7, - 0x6af8, 0x6af9, 0x6afa, 0x6afb, 0x6afc, 0x6afd, 0x6afe, 0x6aff, - 0x6b00, 0x6b01, 0x6b02, 0x6b03, 0x6b04, 0x6b05, 0x6b06, 0x6b07, - 0x6b08, 0x6b09, 0x6b0a, 0x6b0b, 0x6b0c, 0x6b0d, 0x6b0e, 0x6b0f, - 0x6b10, 0x6b11, 0x6b12, 0x6b13, 0x6b14, 0x6b15, 0x6b16, 0x6b17, - 0x6b18, 0x6b19, 0x6b1a, 0x6b1b, 0x6b1c, 0x6b1d, 0x6b1e, 0x6b1f, - 0x6b20, 0x6b21, 0x6b22, 0x6b23, 0x6b24, 0x6b25, 0x6b26, 0x6b27, - 0x6b28, 0x6b29, 0x6b2a, 0x6b2b, 0x6b2c, 0x6b2d, 0x6b2e, 0x6b2f, - 0x6b30, 0x6b31, 0x6b32, 0x6b33, 0x6b34, 0x6b35, 0x6b36, 0x6b37, - 0x6b38, 0x6b39, 0x6b3a, 0x6b3b, 0x6b3c, 0x6b3d, 0x6b3e, 0x6b3f, - 0x6b40, 0x6b41, 0x6b42, 0x6b43, 0x6b44, 0x6b45, 0x6b46, 0x6b47, - 0x6b48, 0x6b49, 0x6b4a, 0x6b4b, 0x6b4c, 0x6b4d, 0x6b4e, 0x6b4f, - 0x6b50, 0x6b51, 0x6b52, 0x6b53, 0x6b54, 0x6b55, 0x6b56, 0x6b57, - 0x6b58, 0x6b59, 0x6b5a, 0x6b5b, 0x6b5c, 0x6b5d, 0x6b5e, 0x6b5f, - 0x6b60, 0x6b61, 0x6b62, 0x6b63, 0x6b64, 0x6b65, 0x6b66, 0x6b67, - 0x6b68, 0x6b69, 0x6b6a, 0x6b6b, 0x6b6c, 0x6b6d, 0x6b6e, 0x6b6f, - 0x6b70, 0x6b71, 0x6b72, 0x6b73, 0x6b74, 0x6b75, 0x6b76, 0x6b77, - 0x6b78, 0x6b79, 0x6b7a, 0x6b7b, 0x6b7c, 0x6b7d, 0x6b7e, 0x6b7f, - 0x6b80, 0x6b81, 0x6b82, 0x6b83, 0x6b84, 0x6b85, 0x6b86, 0x6b87, - 0x6b88, 0x6b89, 0x6b8a, 0x6b8b, 0x6b8c, 0x6b8d, 0x6b8e, 0x6b8f, - 0x6b90, 0x6b91, 0x6b92, 0x6b93, 0x6b94, 0x6b95, 0x6b96, 0x6b97, - 0x6b98, 0x6b99, 0x6b9a, 0x6b9b, 0x6b9c, 0x6b9d, 0x6b9e, 0x6b9f, - 0x6ba0, 0x6ba1, 0x6ba2, 0x6ba3, 0x6ba4, 0x6ba5, 0x6ba6, 0x6ba7, - 0x6ba8, 0x6ba9, 0x6baa, 0x6bab, 0x6bac, 0x6bad, 0x6bae, 0x6baf, - 0x6bb0, 0x6bb1, 0x6bb2, 0x6bb3, 0x6bb4, 0x6bb5, 0x6bb6, 0x6bb7, - 0x6bb8, 0x6bb9, 0x6bba, 0x6bbb, 0x6bbc, 0x6bbd, 0x6bbe, 0x6bbf, - 0x6bc0, 0x6bc1, 0x6bc2, 0x6bc3, 0x6bc4, 0x6bc5, 0x6bc6, 0x6bc7, - 0x6bc8, 0x6bc9, 0x6bca, 0x6bcb, 0x6bcc, 0x6bcd, 0x6bce, 0x6bcf, - 0x6bd0, 0x6bd1, 0x6bd2, 0x6bd3, 0x6bd4, 0x6bd5, 0x6bd6, 0x6bd7, - 0x6bd8, 0x6bd9, 0x6bda, 0x6bdb, 0x6bdc, 0x6bdd, 0x6bde, 0x6bdf, - 0x6be0, 0x6be1, 0x6be2, 0x6be3, 0x6be4, 0x6be5, 0x6be6, 0x6be7, - 0x6be8, 0x6be9, 0x6bea, 0x6beb, 0x6bec, 0x6bed, 0x6bee, 0x6bef, - 0x6bf0, 0x6bf1, 0x6bf2, 0x6bf3, 0x6bf4, 0x6bf5, 0x6bf6, 0x6bf7, - 0x6bf8, 0x6bf9, 0x6bfa, 0x6bfb, 0x6bfc, 0x6bfd, 0x6bfe, 0x6bff, - 0x6c00, 0x6c01, 0x6c02, 0x6c03, 0x6c04, 0x6c05, 0x6c06, 0x6c07, - 0x6c08, 0x6c09, 0x6c0a, 0x6c0b, 0x6c0c, 0x6c0d, 0x6c0e, 0x6c0f, - 0x6c10, 0x6c11, 0x6c12, 0x6c13, 0x6c14, 0x6c15, 0x6c16, 0x6c17, - 0x6c18, 0x6c19, 0x6c1a, 0x6c1b, 0x6c1c, 0x6c1d, 0x6c1e, 0x6c1f, - 0x6c20, 0x6c21, 0x6c22, 0x6c23, 0x6c24, 0x6c25, 0x6c26, 0x6c27, - 0x6c28, 0x6c29, 0x6c2a, 0x6c2b, 0x6c2c, 0x6c2d, 0x6c2e, 0x6c2f, - 0x6c30, 0x6c31, 0x6c32, 0x6c33, 0x6c34, 0x6c35, 0x6c36, 0x6c37, - 0x6c38, 0x6c39, 0x6c3a, 0x6c3b, 0x6c3c, 0x6c3d, 0x6c3e, 0x6c3f, - 0x6c40, 0x6c41, 0x6c42, 0x6c43, 0x6c44, 0x6c45, 0x6c46, 0x6c47, - 0x6c48, 0x6c49, 0x6c4a, 0x6c4b, 0x6c4c, 0x6c4d, 0x6c4e, 0x6c4f, - 0x6c50, 0x6c51, 0x6c52, 0x6c53, 0x6c54, 0x6c55, 0x6c56, 0x6c57, - 0x6c58, 0x6c59, 0x6c5a, 0x6c5b, 0x6c5c, 0x6c5d, 0x6c5e, 0x6c5f, - 0x6c60, 0x6c61, 0x6c62, 0x6c63, 0x6c64, 0x6c65, 0x6c66, 0x6c67, - 0x6c68, 0x6c69, 0x6c6a, 0x6c6b, 0x6c6c, 0x6c6d, 0x6c6e, 0x6c6f, - 0x6c70, 0x6c71, 0x6c72, 0x6c73, 0x6c74, 0x6c75, 0x6c76, 0x6c77, - 0x6c78, 0x6c79, 0x6c7a, 0x6c7b, 0x6c7c, 0x6c7d, 0x6c7e, 0x6c7f, - 0x6c80, 0x6c81, 0x6c82, 0x6c83, 0x6c84, 0x6c85, 0x6c86, 0x6c87, - 0x6c88, 0x6c89, 0x6c8a, 0x6c8b, 0x6c8c, 0x6c8d, 0x6c8e, 0x6c8f, - 0x6c90, 0x6c91, 0x6c92, 0x6c93, 0x6c94, 0x6c95, 0x6c96, 0x6c97, - 0x6c98, 0x6c99, 0x6c9a, 0x6c9b, 0x6c9c, 0x6c9d, 0x6c9e, 0x6c9f, - 0x6ca0, 0x6ca1, 0x6ca2, 0x6ca3, 0x6ca4, 0x6ca5, 0x6ca6, 0x6ca7, - 0x6ca8, 0x6ca9, 0x6caa, 0x6cab, 0x6cac, 0x6cad, 0x6cae, 0x6caf, - 0x6cb0, 0x6cb1, 0x6cb2, 0x6cb3, 0x6cb4, 0x6cb5, 0x6cb6, 0x6cb7, - 0x6cb8, 0x6cb9, 0x6cba, 0x6cbb, 0x6cbc, 0x6cbd, 0x6cbe, 0x6cbf, - 0x6cc0, 0x6cc1, 0x6cc2, 0x6cc3, 0x6cc4, 0x6cc5, 0x6cc6, 0x6cc7, - 0x6cc8, 0x6cc9, 0x6cca, 0x6ccb, 0x6ccc, 0x6ccd, 0x6cce, 0x6ccf, - 0x6cd0, 0x6cd1, 0x6cd2, 0x6cd3, 0x6cd4, 0x6cd5, 0x6cd6, 0x6cd7, - 0x6cd8, 0x6cd9, 0x6cda, 0x6cdb, 0x6cdc, 0x6cdd, 0x6cde, 0x6cdf, - 0x6ce0, 0x6ce1, 0x6ce2, 0x6ce3, 0x6ce4, 0x6ce5, 0x6ce6, 0x6ce7, - 0x6ce8, 0x6ce9, 0x6cea, 0x6ceb, 0x6cec, 0x6ced, 0x6cee, 0x6cef, - 0x6cf0, 0x6cf1, 0x6cf2, 0x6cf3, 0x6cf4, 0x6cf5, 0x6cf6, 0x6cf7, - 0x6cf8, 0x6cf9, 0x6cfa, 0x6cfb, 0x6cfc, 0x6cfd, 0x6cfe, 0x6cff, - 0x6d00, 0x6d01, 0x6d02, 0x6d03, 0x6d04, 0x6d05, 0x6d06, 0x6d07, - 0x6d08, 0x6d09, 0x6d0a, 0x6d0b, 0x6d0c, 0x6d0d, 0x6d0e, 0x6d0f, - 0x6d10, 0x6d11, 0x6d12, 0x6d13, 0x6d14, 0x6d15, 0x6d16, 0x6d17, - 0x6d18, 0x6d19, 0x6d1a, 0x6d1b, 0x6d1c, 0x6d1d, 0x6d1e, 0x6d1f, - 0x6d20, 0x6d21, 0x6d22, 0x6d23, 0x6d24, 0x6d25, 0x6d26, 0x6d27, - 0x6d28, 0x6d29, 0x6d2a, 0x6d2b, 0x6d2c, 0x6d2d, 0x6d2e, 0x6d2f, - 0x6d30, 0x6d31, 0x6d32, 0x6d33, 0x6d34, 0x6d35, 0x6d36, 0x6d37, - 0x6d38, 0x6d39, 0x6d3a, 0x6d3b, 0x6d3c, 0x6d3d, 0x6d3e, 0x6d3f, - 0x6d40, 0x6d41, 0x6d42, 0x6d43, 0x6d44, 0x6d45, 0x6d46, 0x6d47, - 0x6d48, 0x6d49, 0x6d4a, 0x6d4b, 0x6d4c, 0x6d4d, 0x6d4e, 0x6d4f, - 0x6d50, 0x6d51, 0x6d52, 0x6d53, 0x6d54, 0x6d55, 0x6d56, 0x6d57, - 0x6d58, 0x6d59, 0x6d5a, 0x6d5b, 0x6d5c, 0x6d5d, 0x6d5e, 0x6d5f, - 0x6d60, 0x6d61, 0x6d62, 0x6d63, 0x6d64, 0x6d65, 0x6d66, 0x6d67, - 0x6d68, 0x6d69, 0x6d6a, 0x6d6b, 0x6d6c, 0x6d6d, 0x6d6e, 0x6d6f, - 0x6d70, 0x6d71, 0x6d72, 0x6d73, 0x6d74, 0x6d75, 0x6d76, 0x6d77, - 0x6d78, 0x6d79, 0x6d7a, 0x6d7b, 0x6d7c, 0x6d7d, 0x6d7e, 0x6d7f, - 0x6d80, 0x6d81, 0x6d82, 0x6d83, 0x6d84, 0x6d85, 0x6d86, 0x6d87, - 0x6d88, 0x6d89, 0x6d8a, 0x6d8b, 0x6d8c, 0x6d8d, 0x6d8e, 0x6d8f, - 0x6d90, 0x6d91, 0x6d92, 0x6d93, 0x6d94, 0x6d95, 0x6d96, 0x6d97, - 0x6d98, 0x6d99, 0x6d9a, 0x6d9b, 0x6d9c, 0x6d9d, 0x6d9e, 0x6d9f, - 0x6da0, 0x6da1, 0x6da2, 0x6da3, 0x6da4, 0x6da5, 0x6da6, 0x6da7, - 0x6da8, 0x6da9, 0x6daa, 0x6dab, 0x6dac, 0x6dad, 0x6dae, 0x6daf, - 0x6db0, 0x6db1, 0x6db2, 0x6db3, 0x6db4, 0x6db5, 0x6db6, 0x6db7, - 0x6db8, 0x6db9, 0x6dba, 0x6dbb, 0x6dbc, 0x6dbd, 0x6dbe, 0x6dbf, - 0x6dc0, 0x6dc1, 0x6dc2, 0x6dc3, 0x6dc4, 0x6dc5, 0x6dc6, 0x6dc7, - 0x6dc8, 0x6dc9, 0x6dca, 0x6dcb, 0x6dcc, 0x6dcd, 0x6dce, 0x6dcf, - 0x6dd0, 0x6dd1, 0x6dd2, 0x6dd3, 0x6dd4, 0x6dd5, 0x6dd6, 0x6dd7, - 0x6dd8, 0x6dd9, 0x6dda, 0x6ddb, 0x6ddc, 0x6ddd, 0x6dde, 0x6ddf, - 0x6de0, 0x6de1, 0x6de2, 0x6de3, 0x6de4, 0x6de5, 0x6de6, 0x6de7, - 0x6de8, 0x6de9, 0x6dea, 0x6deb, 0x6dec, 0x6ded, 0x6dee, 0x6def, - 0x6df0, 0x6df1, 0x6df2, 0x6df3, 0x6df4, 0x6df5, 0x6df6, 0x6df7, - 0x6df8, 0x6df9, 0x6dfa, 0x6dfb, 0x6dfc, 0x6dfd, 0x6dfe, 0x6dff, - 0x6e00, 0x6e01, 0x6e02, 0x6e03, 0x6e04, 0x6e05, 0x6e06, 0x6e07, - 0x6e08, 0x6e09, 0x6e0a, 0x6e0b, 0x6e0c, 0x6e0d, 0x6e0e, 0x6e0f, - 0x6e10, 0x6e11, 0x6e12, 0x6e13, 0x6e14, 0x6e15, 0x6e16, 0x6e17, - 0x6e18, 0x6e19, 0x6e1a, 0x6e1b, 0x6e1c, 0x6e1d, 0x6e1e, 0x6e1f, - 0x6e20, 0x6e21, 0x6e22, 0x6e23, 0x6e24, 0x6e25, 0x6e26, 0x6e27, - 0x6e28, 0x6e29, 0x6e2a, 0x6e2b, 0x6e2c, 0x6e2d, 0x6e2e, 0x6e2f, - 0x6e30, 0x6e31, 0x6e32, 0x6e33, 0x6e34, 0x6e35, 0x6e36, 0x6e37, - 0x6e38, 0x6e39, 0x6e3a, 0x6e3b, 0x6e3c, 0x6e3d, 0x6e3e, 0x6e3f, - 0x6e40, 0x6e41, 0x6e42, 0x6e43, 0x6e44, 0x6e45, 0x6e46, 0x6e47, - 0x6e48, 0x6e49, 0x6e4a, 0x6e4b, 0x6e4c, 0x6e4d, 0x6e4e, 0x6e4f, - 0x6e50, 0x6e51, 0x6e52, 0x6e53, 0x6e54, 0x6e55, 0x6e56, 0x6e57, - 0x6e58, 0x6e59, 0x6e5a, 0x6e5b, 0x6e5c, 0x6e5d, 0x6e5e, 0x6e5f, - 0x6e60, 0x6e61, 0x6e62, 0x6e63, 0x6e64, 0x6e65, 0x6e66, 0x6e67, - 0x6e68, 0x6e69, 0x6e6a, 0x6e6b, 0x6e6c, 0x6e6d, 0x6e6e, 0x6e6f, - 0x6e70, 0x6e71, 0x6e72, 0x6e73, 0x6e74, 0x6e75, 0x6e76, 0x6e77, - 0x6e78, 0x6e79, 0x6e7a, 0x6e7b, 0x6e7c, 0x6e7d, 0x6e7e, 0x6e7f, - 0x6e80, 0x6e81, 0x6e82, 0x6e83, 0x6e84, 0x6e85, 0x6e86, 0x6e87, - 0x6e88, 0x6e89, 0x6e8a, 0x6e8b, 0x6e8c, 0x6e8d, 0x6e8e, 0x6e8f, - 0x6e90, 0x6e91, 0x6e92, 0x6e93, 0x6e94, 0x6e95, 0x6e96, 0x6e97, - 0x6e98, 0x6e99, 0x6e9a, 0x6e9b, 0x6e9c, 0x6e9d, 0x6e9e, 0x6e9f, - 0x6ea0, 0x6ea1, 0x6ea2, 0x6ea3, 0x6ea4, 0x6ea5, 0x6ea6, 0x6ea7, - 0x6ea8, 0x6ea9, 0x6eaa, 0x6eab, 0x6eac, 0x6ead, 0x6eae, 0x6eaf, - 0x6eb0, 0x6eb1, 0x6eb2, 0x6eb3, 0x6eb4, 0x6eb5, 0x6eb6, 0x6eb7, - 0x6eb8, 0x6eb9, 0x6eba, 0x6ebb, 0x6ebc, 0x6ebd, 0x6ebe, 0x6ebf, - 0x6ec0, 0x6ec1, 0x6ec2, 0x6ec3, 0x6ec4, 0x6ec5, 0x6ec6, 0x6ec7, - 0x6ec8, 0x6ec9, 0x6eca, 0x6ecb, 0x6ecc, 0x6ecd, 0x6ece, 0x6ecf, - 0x6ed0, 0x6ed1, 0x6ed2, 0x6ed3, 0x6ed4, 0x6ed5, 0x6ed6, 0x6ed7, - 0x6ed8, 0x6ed9, 0x6eda, 0x6edb, 0x6edc, 0x6edd, 0x6ede, 0x6edf, - 0x6ee0, 0x6ee1, 0x6ee2, 0x6ee3, 0x6ee4, 0x6ee5, 0x6ee6, 0x6ee7, - 0x6ee8, 0x6ee9, 0x6eea, 0x6eeb, 0x6eec, 0x6eed, 0x6eee, 0x6eef, - 0x6ef0, 0x6ef1, 0x6ef2, 0x6ef3, 0x6ef4, 0x6ef5, 0x6ef6, 0x6ef7, - 0x6ef8, 0x6ef9, 0x6efa, 0x6efb, 0x6efc, 0x6efd, 0x6efe, 0x6eff, - 0x6f00, 0x6f01, 0x6f02, 0x6f03, 0x6f04, 0x6f05, 0x6f06, 0x6f07, - 0x6f08, 0x6f09, 0x6f0a, 0x6f0b, 0x6f0c, 0x6f0d, 0x6f0e, 0x6f0f, - 0x6f10, 0x6f11, 0x6f12, 0x6f13, 0x6f14, 0x6f15, 0x6f16, 0x6f17, - 0x6f18, 0x6f19, 0x6f1a, 0x6f1b, 0x6f1c, 0x6f1d, 0x6f1e, 0x6f1f, - 0x6f20, 0x6f21, 0x6f22, 0x6f23, 0x6f24, 0x6f25, 0x6f26, 0x6f27, - 0x6f28, 0x6f29, 0x6f2a, 0x6f2b, 0x6f2c, 0x6f2d, 0x6f2e, 0x6f2f, - 0x6f30, 0x6f31, 0x6f32, 0x6f33, 0x6f34, 0x6f35, 0x6f36, 0x6f37, - 0x6f38, 0x6f39, 0x6f3a, 0x6f3b, 0x6f3c, 0x6f3d, 0x6f3e, 0x6f3f, - 0x6f40, 0x6f41, 0x6f42, 0x6f43, 0x6f44, 0x6f45, 0x6f46, 0x6f47, - 0x6f48, 0x6f49, 0x6f4a, 0x6f4b, 0x6f4c, 0x6f4d, 0x6f4e, 0x6f4f, - 0x6f50, 0x6f51, 0x6f52, 0x6f53, 0x6f54, 0x6f55, 0x6f56, 0x6f57, - 0x6f58, 0x6f59, 0x6f5a, 0x6f5b, 0x6f5c, 0x6f5d, 0x6f5e, 0x6f5f, - 0x6f60, 0x6f61, 0x6f62, 0x6f63, 0x6f64, 0x6f65, 0x6f66, 0x6f67, - 0x6f68, 0x6f69, 0x6f6a, 0x6f6b, 0x6f6c, 0x6f6d, 0x6f6e, 0x6f6f, - 0x6f70, 0x6f71, 0x6f72, 0x6f73, 0x6f74, 0x6f75, 0x6f76, 0x6f77, - 0x6f78, 0x6f79, 0x6f7a, 0x6f7b, 0x6f7c, 0x6f7d, 0x6f7e, 0x6f7f, - 0x6f80, 0x6f81, 0x6f82, 0x6f83, 0x6f84, 0x6f85, 0x6f86, 0x6f87, - 0x6f88, 0x6f89, 0x6f8a, 0x6f8b, 0x6f8c, 0x6f8d, 0x6f8e, 0x6f8f, - 0x6f90, 0x6f91, 0x6f92, 0x6f93, 0x6f94, 0x6f95, 0x6f96, 0x6f97, - 0x6f98, 0x6f99, 0x6f9a, 0x6f9b, 0x6f9c, 0x6f9d, 0x6f9e, 0x6f9f, - 0x6fa0, 0x6fa1, 0x6fa2, 0x6fa3, 0x6fa4, 0x6fa5, 0x6fa6, 0x6fa7, - 0x6fa8, 0x6fa9, 0x6faa, 0x6fab, 0x6fac, 0x6fad, 0x6fae, 0x6faf, - 0x6fb0, 0x6fb1, 0x6fb2, 0x6fb3, 0x6fb4, 0x6fb5, 0x6fb6, 0x6fb7, - 0x6fb8, 0x6fb9, 0x6fba, 0x6fbb, 0x6fbc, 0x6fbd, 0x6fbe, 0x6fbf, - 0x6fc0, 0x6fc1, 0x6fc2, 0x6fc3, 0x6fc4, 0x6fc5, 0x6fc6, 0x6fc7, - 0x6fc8, 0x6fc9, 0x6fca, 0x6fcb, 0x6fcc, 0x6fcd, 0x6fce, 0x6fcf, - 0x6fd0, 0x6fd1, 0x6fd2, 0x6fd3, 0x6fd4, 0x6fd5, 0x6fd6, 0x6fd7, - 0x6fd8, 0x6fd9, 0x6fda, 0x6fdb, 0x6fdc, 0x6fdd, 0x6fde, 0x6fdf, - 0x6fe0, 0x6fe1, 0x6fe2, 0x6fe3, 0x6fe4, 0x6fe5, 0x6fe6, 0x6fe7, - 0x6fe8, 0x6fe9, 0x6fea, 0x6feb, 0x6fec, 0x6fed, 0x6fee, 0x6fef, - 0x6ff0, 0x6ff1, 0x6ff2, 0x6ff3, 0x6ff4, 0x6ff5, 0x6ff6, 0x6ff7, - 0x6ff8, 0x6ff9, 0x6ffa, 0x6ffb, 0x6ffc, 0x6ffd, 0x6ffe, 0x6fff, - 0x7000, 0x7001, 0x7002, 0x7003, 0x7004, 0x7005, 0x7006, 0x7007, - 0x7008, 0x7009, 0x700a, 0x700b, 0x700c, 0x700d, 0x700e, 0x700f, - 0x7010, 0x7011, 0x7012, 0x7013, 0x7014, 0x7015, 0x7016, 0x7017, - 0x7018, 0x7019, 0x701a, 0x701b, 0x701c, 0x701d, 0x701e, 0x701f, - 0x7020, 0x7021, 0x7022, 0x7023, 0x7024, 0x7025, 0x7026, 0x7027, - 0x7028, 0x7029, 0x702a, 0x702b, 0x702c, 0x702d, 0x702e, 0x702f, - 0x7030, 0x7031, 0x7032, 0x7033, 0x7034, 0x7035, 0x7036, 0x7037, - 0x7038, 0x7039, 0x703a, 0x703b, 0x703c, 0x703d, 0x703e, 0x703f, - 0x7040, 0x7041, 0x7042, 0x7043, 0x7044, 0x7045, 0x7046, 0x7047, - 0x7048, 0x7049, 0x704a, 0x704b, 0x704c, 0x704d, 0x704e, 0x704f, - 0x7050, 0x7051, 0x7052, 0x7053, 0x7054, 0x7055, 0x7056, 0x7057, - 0x7058, 0x7059, 0x705a, 0x705b, 0x705c, 0x705d, 0x705e, 0x705f, - 0x7060, 0x7061, 0x7062, 0x7063, 0x7064, 0x7065, 0x7066, 0x7067, - 0x7068, 0x7069, 0x706a, 0x706b, 0x706c, 0x706d, 0x706e, 0x706f, - 0x7070, 0x7071, 0x7072, 0x7073, 0x7074, 0x7075, 0x7076, 0x7077, - 0x7078, 0x7079, 0x707a, 0x707b, 0x707c, 0x707d, 0x707e, 0x707f, - 0x7080, 0x7081, 0x7082, 0x7083, 0x7084, 0x7085, 0x7086, 0x7087, - 0x7088, 0x7089, 0x708a, 0x708b, 0x708c, 0x708d, 0x708e, 0x708f, - 0x7090, 0x7091, 0x7092, 0x7093, 0x7094, 0x7095, 0x7096, 0x7097, - 0x7098, 0x7099, 0x709a, 0x709b, 0x709c, 0x709d, 0x709e, 0x709f, - 0x70a0, 0x70a1, 0x70a2, 0x70a3, 0x70a4, 0x70a5, 0x70a6, 0x70a7, - 0x70a8, 0x70a9, 0x70aa, 0x70ab, 0x70ac, 0x70ad, 0x70ae, 0x70af, - 0x70b0, 0x70b1, 0x70b2, 0x70b3, 0x70b4, 0x70b5, 0x70b6, 0x70b7, - 0x70b8, 0x70b9, 0x70ba, 0x70bb, 0x70bc, 0x70bd, 0x70be, 0x70bf, - 0x70c0, 0x70c1, 0x70c2, 0x70c3, 0x70c4, 0x70c5, 0x70c6, 0x70c7, - 0x70c8, 0x70c9, 0x70ca, 0x70cb, 0x70cc, 0x70cd, 0x70ce, 0x70cf, - 0x70d0, 0x70d1, 0x70d2, 0x70d3, 0x70d4, 0x70d5, 0x70d6, 0x70d7, - 0x70d8, 0x70d9, 0x70da, 0x70db, 0x70dc, 0x70dd, 0x70de, 0x70df, - 0x70e0, 0x70e1, 0x70e2, 0x70e3, 0x70e4, 0x70e5, 0x70e6, 0x70e7, - 0x70e8, 0x70e9, 0x70ea, 0x70eb, 0x70ec, 0x70ed, 0x70ee, 0x70ef, - 0x70f0, 0x70f1, 0x70f2, 0x70f3, 0x70f4, 0x70f5, 0x70f6, 0x70f7, - 0x70f8, 0x70f9, 0x70fa, 0x70fb, 0x70fc, 0x70fd, 0x70fe, 0x70ff, - 0x7100, 0x7101, 0x7102, 0x7103, 0x7104, 0x7105, 0x7106, 0x7107, - 0x7108, 0x7109, 0x710a, 0x710b, 0x710c, 0x710d, 0x710e, 0x710f, - 0x7110, 0x7111, 0x7112, 0x7113, 0x7114, 0x7115, 0x7116, 0x7117, - 0x7118, 0x7119, 0x711a, 0x711b, 0x711c, 0x711d, 0x711e, 0x711f, - 0x7120, 0x7121, 0x7122, 0x7123, 0x7124, 0x7125, 0x7126, 0x7127, - 0x7128, 0x7129, 0x712a, 0x712b, 0x712c, 0x712d, 0x712e, 0x712f, - 0x7130, 0x7131, 0x7132, 0x7133, 0x7134, 0x7135, 0x7136, 0x7137, - 0x7138, 0x7139, 0x713a, 0x713b, 0x713c, 0x713d, 0x713e, 0x713f, - 0x7140, 0x7141, 0x7142, 0x7143, 0x7144, 0x7145, 0x7146, 0x7147, - 0x7148, 0x7149, 0x714a, 0x714b, 0x714c, 0x714d, 0x714e, 0x714f, - 0x7150, 0x7151, 0x7152, 0x7153, 0x7154, 0x7155, 0x7156, 0x7157, - 0x7158, 0x7159, 0x715a, 0x715b, 0x715c, 0x715d, 0x715e, 0x715f, - 0x7160, 0x7161, 0x7162, 0x7163, 0x7164, 0x7165, 0x7166, 0x7167, - 0x7168, 0x7169, 0x716a, 0x716b, 0x716c, 0x716d, 0x716e, 0x716f, - 0x7170, 0x7171, 0x7172, 0x7173, 0x7174, 0x7175, 0x7176, 0x7177, - 0x7178, 0x7179, 0x717a, 0x717b, 0x717c, 0x717d, 0x717e, 0x717f, - 0x7180, 0x7181, 0x7182, 0x7183, 0x7184, 0x7185, 0x7186, 0x7187, - 0x7188, 0x7189, 0x718a, 0x718b, 0x718c, 0x718d, 0x718e, 0x718f, - 0x7190, 0x7191, 0x7192, 0x7193, 0x7194, 0x7195, 0x7196, 0x7197, - 0x7198, 0x7199, 0x719a, 0x719b, 0x719c, 0x719d, 0x719e, 0x719f, - 0x71a0, 0x71a1, 0x71a2, 0x71a3, 0x71a4, 0x71a5, 0x71a6, 0x71a7, - 0x71a8, 0x71a9, 0x71aa, 0x71ab, 0x71ac, 0x71ad, 0x71ae, 0x71af, - 0x71b0, 0x71b1, 0x71b2, 0x71b3, 0x71b4, 0x71b5, 0x71b6, 0x71b7, - 0x71b8, 0x71b9, 0x71ba, 0x71bb, 0x71bc, 0x71bd, 0x71be, 0x71bf, - 0x71c0, 0x71c1, 0x71c2, 0x71c3, 0x71c4, 0x71c5, 0x71c6, 0x71c7, - 0x71c8, 0x71c9, 0x71ca, 0x71cb, 0x71cc, 0x71cd, 0x71ce, 0x71cf, - 0x71d0, 0x71d1, 0x71d2, 0x71d3, 0x71d4, 0x71d5, 0x71d6, 0x71d7, - 0x71d8, 0x71d9, 0x71da, 0x71db, 0x71dc, 0x71dd, 0x71de, 0x71df, - 0x71e0, 0x71e1, 0x71e2, 0x71e3, 0x71e4, 0x71e5, 0x71e6, 0x71e7, - 0x71e8, 0x71e9, 0x71ea, 0x71eb, 0x71ec, 0x71ed, 0x71ee, 0x71ef, - 0x71f0, 0x71f1, 0x71f2, 0x71f3, 0x71f4, 0x71f5, 0x71f6, 0x71f7, - 0x71f8, 0x71f9, 0x71fa, 0x71fb, 0x71fc, 0x71fd, 0x71fe, 0x71ff, - 0x7200, 0x7201, 0x7202, 0x7203, 0x7204, 0x7205, 0x7206, 0x7207, - 0x7208, 0x7209, 0x720a, 0x720b, 0x720c, 0x720d, 0x720e, 0x720f, - 0x7210, 0x7211, 0x7212, 0x7213, 0x7214, 0x7215, 0x7216, 0x7217, - 0x7218, 0x7219, 0x721a, 0x721b, 0x721c, 0x721d, 0x721e, 0x721f, - 0x7220, 0x7221, 0x7222, 0x7223, 0x7224, 0x7225, 0x7226, 0x7227, - 0x7228, 0x7229, 0x722a, 0x722b, 0x722c, 0x722d, 0x722e, 0x722f, - 0x7230, 0x7231, 0x7232, 0x7233, 0x7234, 0x7235, 0x7236, 0x7237, - 0x7238, 0x7239, 0x723a, 0x723b, 0x723c, 0x723d, 0x723e, 0x723f, - 0x7240, 0x7241, 0x7242, 0x7243, 0x7244, 0x7245, 0x7246, 0x7247, - 0x7248, 0x7249, 0x724a, 0x724b, 0x724c, 0x724d, 0x724e, 0x724f, - 0x7250, 0x7251, 0x7252, 0x7253, 0x7254, 0x7255, 0x7256, 0x7257, - 0x7258, 0x7259, 0x725a, 0x725b, 0x725c, 0x725d, 0x725e, 0x725f, - 0x7260, 0x7261, 0x7262, 0x7263, 0x7264, 0x7265, 0x7266, 0x7267, - 0x7268, 0x7269, 0x726a, 0x726b, 0x726c, 0x726d, 0x726e, 0x726f, - 0x7270, 0x7271, 0x7272, 0x7273, 0x7274, 0x7275, 0x7276, 0x7277, - 0x7278, 0x7279, 0x727a, 0x727b, 0x727c, 0x727d, 0x727e, 0x727f, - 0x7280, 0x7281, 0x7282, 0x7283, 0x7284, 0x7285, 0x7286, 0x7287, - 0x7288, 0x7289, 0x728a, 0x728b, 0x728c, 0x728d, 0x728e, 0x728f, - 0x7290, 0x7291, 0x7292, 0x7293, 0x7294, 0x7295, 0x7296, 0x7297, - 0x7298, 0x7299, 0x729a, 0x729b, 0x729c, 0x729d, 0x729e, 0x729f, - 0x72a0, 0x72a1, 0x72a2, 0x72a3, 0x72a4, 0x72a5, 0x72a6, 0x72a7, - 0x72a8, 0x72a9, 0x72aa, 0x72ab, 0x72ac, 0x72ad, 0x72ae, 0x72af, - 0x72b0, 0x72b1, 0x72b2, 0x72b3, 0x72b4, 0x72b5, 0x72b6, 0x72b7, - 0x72b8, 0x72b9, 0x72ba, 0x72bb, 0x72bc, 0x72bd, 0x72be, 0x72bf, - 0x72c0, 0x72c1, 0x72c2, 0x72c3, 0x72c4, 0x72c5, 0x72c6, 0x72c7, - 0x72c8, 0x72c9, 0x72ca, 0x72cb, 0x72cc, 0x72cd, 0x72ce, 0x72cf, - 0x72d0, 0x72d1, 0x72d2, 0x72d3, 0x72d4, 0x72d5, 0x72d6, 0x72d7, - 0x72d8, 0x72d9, 0x72da, 0x72db, 0x72dc, 0x72dd, 0x72de, 0x72df, - 0x72e0, 0x72e1, 0x72e2, 0x72e3, 0x72e4, 0x72e5, 0x72e6, 0x72e7, - 0x72e8, 0x72e9, 0x72ea, 0x72eb, 0x72ec, 0x72ed, 0x72ee, 0x72ef, - 0x72f0, 0x72f1, 0x72f2, 0x72f3, 0x72f4, 0x72f5, 0x72f6, 0x72f7, - 0x72f8, 0x72f9, 0x72fa, 0x72fb, 0x72fc, 0x72fd, 0x72fe, 0x72ff, - 0x7300, 0x7301, 0x7302, 0x7303, 0x7304, 0x7305, 0x7306, 0x7307, - 0x7308, 0x7309, 0x730a, 0x730b, 0x730c, 0x730d, 0x730e, 0x730f, - 0x7310, 0x7311, 0x7312, 0x7313, 0x7314, 0x7315, 0x7316, 0x7317, - 0x7318, 0x7319, 0x731a, 0x731b, 0x731c, 0x731d, 0x731e, 0x731f, - 0x7320, 0x7321, 0x7322, 0x7323, 0x7324, 0x7325, 0x7326, 0x7327, - 0x7328, 0x7329, 0x732a, 0x732b, 0x732c, 0x732d, 0x732e, 0x732f, - 0x7330, 0x7331, 0x7332, 0x7333, 0x7334, 0x7335, 0x7336, 0x7337, - 0x7338, 0x7339, 0x733a, 0x733b, 0x733c, 0x733d, 0x733e, 0x733f, - 0x7340, 0x7341, 0x7342, 0x7343, 0x7344, 0x7345, 0x7346, 0x7347, - 0x7348, 0x7349, 0x734a, 0x734b, 0x734c, 0x734d, 0x734e, 0x734f, - 0x7350, 0x7351, 0x7352, 0x7353, 0x7354, 0x7355, 0x7356, 0x7357, - 0x7358, 0x7359, 0x735a, 0x735b, 0x735c, 0x735d, 0x735e, 0x735f, - 0x7360, 0x7361, 0x7362, 0x7363, 0x7364, 0x7365, 0x7366, 0x7367, - 0x7368, 0x7369, 0x736a, 0x736b, 0x736c, 0x736d, 0x736e, 0x736f, - 0x7370, 0x7371, 0x7372, 0x7373, 0x7374, 0x7375, 0x7376, 0x7377, - 0x7378, 0x7379, 0x737a, 0x737b, 0x737c, 0x737d, 0x737e, 0x737f, - 0x7380, 0x7381, 0x7382, 0x7383, 0x7384, 0x7385, 0x7386, 0x7387, - 0x7388, 0x7389, 0x738a, 0x738b, 0x738c, 0x738d, 0x738e, 0x738f, - 0x7390, 0x7391, 0x7392, 0x7393, 0x7394, 0x7395, 0x7396, 0x7397, - 0x7398, 0x7399, 0x739a, 0x739b, 0x739c, 0x739d, 0x739e, 0x739f, - 0x73a0, 0x73a1, 0x73a2, 0x73a3, 0x73a4, 0x73a5, 0x73a6, 0x73a7, - 0x73a8, 0x73a9, 0x73aa, 0x73ab, 0x73ac, 0x73ad, 0x73ae, 0x73af, - 0x73b0, 0x73b1, 0x73b2, 0x73b3, 0x73b4, 0x73b5, 0x73b6, 0x73b7, - 0x73b8, 0x73b9, 0x73ba, 0x73bb, 0x73bc, 0x73bd, 0x73be, 0x73bf, - 0x73c0, 0x73c1, 0x73c2, 0x73c3, 0x73c4, 0x73c5, 0x73c6, 0x73c7, - 0x73c8, 0x73c9, 0x73ca, 0x73cb, 0x73cc, 0x73cd, 0x73ce, 0x73cf, - 0x73d0, 0x73d1, 0x73d2, 0x73d3, 0x73d4, 0x73d5, 0x73d6, 0x73d7, - 0x73d8, 0x73d9, 0x73da, 0x73db, 0x73dc, 0x73dd, 0x73de, 0x73df, - 0x73e0, 0x73e1, 0x73e2, 0x73e3, 0x73e4, 0x73e5, 0x73e6, 0x73e7, - 0x73e8, 0x73e9, 0x73ea, 0x73eb, 0x73ec, 0x73ed, 0x73ee, 0x73ef, - 0x73f0, 0x73f1, 0x73f2, 0x73f3, 0x73f4, 0x73f5, 0x73f6, 0x73f7, - 0x73f8, 0x73f9, 0x73fa, 0x73fb, 0x73fc, 0x73fd, 0x73fe, 0x73ff, - 0x7400, 0x7401, 0x7402, 0x7403, 0x7404, 0x7405, 0x7406, 0x7407, - 0x7408, 0x7409, 0x740a, 0x740b, 0x740c, 0x740d, 0x740e, 0x740f, - 0x7410, 0x7411, 0x7412, 0x7413, 0x7414, 0x7415, 0x7416, 0x7417, - 0x7418, 0x7419, 0x741a, 0x741b, 0x741c, 0x741d, 0x741e, 0x741f, - 0x7420, 0x7421, 0x7422, 0x7423, 0x7424, 0x7425, 0x7426, 0x7427, - 0x7428, 0x7429, 0x742a, 0x742b, 0x742c, 0x742d, 0x742e, 0x742f, - 0x7430, 0x7431, 0x7432, 0x7433, 0x7434, 0x7435, 0x7436, 0x7437, - 0x7438, 0x7439, 0x743a, 0x743b, 0x743c, 0x743d, 0x743e, 0x743f, - 0x7440, 0x7441, 0x7442, 0x7443, 0x7444, 0x7445, 0x7446, 0x7447, - 0x7448, 0x7449, 0x744a, 0x744b, 0x744c, 0x744d, 0x744e, 0x744f, - 0x7450, 0x7451, 0x7452, 0x7453, 0x7454, 0x7455, 0x7456, 0x7457, - 0x7458, 0x7459, 0x745a, 0x745b, 0x745c, 0x745d, 0x745e, 0x745f, - 0x7460, 0x7461, 0x7462, 0x7463, 0x7464, 0x7465, 0x7466, 0x7467, - 0x7468, 0x7469, 0x746a, 0x746b, 0x746c, 0x746d, 0x746e, 0x746f, - 0x7470, 0x7471, 0x7472, 0x7473, 0x7474, 0x7475, 0x7476, 0x7477, - 0x7478, 0x7479, 0x747a, 0x747b, 0x747c, 0x747d, 0x747e, 0x747f, - 0x7480, 0x7481, 0x7482, 0x7483, 0x7484, 0x7485, 0x7486, 0x7487, - 0x7488, 0x7489, 0x748a, 0x748b, 0x748c, 0x748d, 0x748e, 0x748f, - 0x7490, 0x7491, 0x7492, 0x7493, 0x7494, 0x7495, 0x7496, 0x7497, - 0x7498, 0x7499, 0x749a, 0x749b, 0x749c, 0x749d, 0x749e, 0x749f, - 0x74a0, 0x74a1, 0x74a2, 0x74a3, 0x74a4, 0x74a5, 0x74a6, 0x74a7, - 0x74a8, 0x74a9, 0x74aa, 0x74ab, 0x74ac, 0x74ad, 0x74ae, 0x74af, - 0x74b0, 0x74b1, 0x74b2, 0x74b3, 0x74b4, 0x74b5, 0x74b6, 0x74b7, - 0x74b8, 0x74b9, 0x74ba, 0x74bb, 0x74bc, 0x74bd, 0x74be, 0x74bf, - 0x74c0, 0x74c1, 0x74c2, 0x74c3, 0x74c4, 0x74c5, 0x74c6, 0x74c7, - 0x74c8, 0x74c9, 0x74ca, 0x74cb, 0x74cc, 0x74cd, 0x74ce, 0x74cf, - 0x74d0, 0x74d1, 0x74d2, 0x74d3, 0x74d4, 0x74d5, 0x74d6, 0x74d7, - 0x74d8, 0x74d9, 0x74da, 0x74db, 0x74dc, 0x74dd, 0x74de, 0x74df, - 0x74e0, 0x74e1, 0x74e2, 0x74e3, 0x74e4, 0x74e5, 0x74e6, 0x74e7, - 0x74e8, 0x74e9, 0x74ea, 0x74eb, 0x74ec, 0x74ed, 0x74ee, 0x74ef, - 0x74f0, 0x74f1, 0x74f2, 0x74f3, 0x74f4, 0x74f5, 0x74f6, 0x74f7, - 0x74f8, 0x74f9, 0x74fa, 0x74fb, 0x74fc, 0x74fd, 0x74fe, 0x74ff, - 0x7500, 0x7501, 0x7502, 0x7503, 0x7504, 0x7505, 0x7506, 0x7507, - 0x7508, 0x7509, 0x750a, 0x750b, 0x750c, 0x750d, 0x750e, 0x750f, - 0x7510, 0x7511, 0x7512, 0x7513, 0x7514, 0x7515, 0x7516, 0x7517, - 0x7518, 0x7519, 0x751a, 0x751b, 0x751c, 0x751d, 0x751e, 0x751f, - 0x7520, 0x7521, 0x7522, 0x7523, 0x7524, 0x7525, 0x7526, 0x7527, - 0x7528, 0x7529, 0x752a, 0x752b, 0x752c, 0x752d, 0x752e, 0x752f, - 0x7530, 0x7531, 0x7532, 0x7533, 0x7534, 0x7535, 0x7536, 0x7537, - 0x7538, 0x7539, 0x753a, 0x753b, 0x753c, 0x753d, 0x753e, 0x753f, - 0x7540, 0x7541, 0x7542, 0x7543, 0x7544, 0x7545, 0x7546, 0x7547, - 0x7548, 0x7549, 0x754a, 0x754b, 0x754c, 0x754d, 0x754e, 0x754f, - 0x7550, 0x7551, 0x7552, 0x7553, 0x7554, 0x7555, 0x7556, 0x7557, - 0x7558, 0x7559, 0x755a, 0x755b, 0x755c, 0x755d, 0x755e, 0x755f, - 0x7560, 0x7561, 0x7562, 0x7563, 0x7564, 0x7565, 0x7566, 0x7567, - 0x7568, 0x7569, 0x756a, 0x756b, 0x756c, 0x756d, 0x756e, 0x756f, - 0x7570, 0x7571, 0x7572, 0x7573, 0x7574, 0x7575, 0x7576, 0x7577, - 0x7578, 0x7579, 0x757a, 0x757b, 0x757c, 0x757d, 0x757e, 0x757f, - 0x7580, 0x7581, 0x7582, 0x7583, 0x7584, 0x7585, 0x7586, 0x7587, - 0x7588, 0x7589, 0x758a, 0x758b, 0x758c, 0x758d, 0x758e, 0x758f, - 0x7590, 0x7591, 0x7592, 0x7593, 0x7594, 0x7595, 0x7596, 0x7597, - 0x7598, 0x7599, 0x759a, 0x759b, 0x759c, 0x759d, 0x759e, 0x759f, - 0x75a0, 0x75a1, 0x75a2, 0x75a3, 0x75a4, 0x75a5, 0x75a6, 0x75a7, - 0x75a8, 0x75a9, 0x75aa, 0x75ab, 0x75ac, 0x75ad, 0x75ae, 0x75af, - 0x75b0, 0x75b1, 0x75b2, 0x75b3, 0x75b4, 0x75b5, 0x75b6, 0x75b7, - 0x75b8, 0x75b9, 0x75ba, 0x75bb, 0x75bc, 0x75bd, 0x75be, 0x75bf, - 0x75c0, 0x75c1, 0x75c2, 0x75c3, 0x75c4, 0x75c5, 0x75c6, 0x75c7, - 0x75c8, 0x75c9, 0x75ca, 0x75cb, 0x75cc, 0x75cd, 0x75ce, 0x75cf, - 0x75d0, 0x75d1, 0x75d2, 0x75d3, 0x75d4, 0x75d5, 0x75d6, 0x75d7, - 0x75d8, 0x75d9, 0x75da, 0x75db, 0x75dc, 0x75dd, 0x75de, 0x75df, - 0x75e0, 0x75e1, 0x75e2, 0x75e3, 0x75e4, 0x75e5, 0x75e6, 0x75e7, - 0x75e8, 0x75e9, 0x75ea, 0x75eb, 0x75ec, 0x75ed, 0x75ee, 0x75ef, - 0x75f0, 0x75f1, 0x75f2, 0x75f3, 0x75f4, 0x75f5, 0x75f6, 0x75f7, - 0x75f8, 0x75f9, 0x75fa, 0x75fb, 0x75fc, 0x75fd, 0x75fe, 0x75ff, - 0x7600, 0x7601, 0x7602, 0x7603, 0x7604, 0x7605, 0x7606, 0x7607, - 0x7608, 0x7609, 0x760a, 0x760b, 0x760c, 0x760d, 0x760e, 0x760f, - 0x7610, 0x7611, 0x7612, 0x7613, 0x7614, 0x7615, 0x7616, 0x7617, - 0x7618, 0x7619, 0x761a, 0x761b, 0x761c, 0x761d, 0x761e, 0x761f, - 0x7620, 0x7621, 0x7622, 0x7623, 0x7624, 0x7625, 0x7626, 0x7627, - 0x7628, 0x7629, 0x762a, 0x762b, 0x762c, 0x762d, 0x762e, 0x762f, - 0x7630, 0x7631, 0x7632, 0x7633, 0x7634, 0x7635, 0x7636, 0x7637, - 0x7638, 0x7639, 0x763a, 0x763b, 0x763c, 0x763d, 0x763e, 0x763f, - 0x7640, 0x7641, 0x7642, 0x7643, 0x7644, 0x7645, 0x7646, 0x7647, - 0x7648, 0x7649, 0x764a, 0x764b, 0x764c, 0x764d, 0x764e, 0x764f, - 0x7650, 0x7651, 0x7652, 0x7653, 0x7654, 0x7655, 0x7656, 0x7657, - 0x7658, 0x7659, 0x765a, 0x765b, 0x765c, 0x765d, 0x765e, 0x765f, - 0x7660, 0x7661, 0x7662, 0x7663, 0x7664, 0x7665, 0x7666, 0x7667, - 0x7668, 0x7669, 0x766a, 0x766b, 0x766c, 0x766d, 0x766e, 0x766f, - 0x7670, 0x7671, 0x7672, 0x7673, 0x7674, 0x7675, 0x7676, 0x7677, - 0x7678, 0x7679, 0x767a, 0x767b, 0x767c, 0x767d, 0x767e, 0x767f, - 0x7680, 0x7681, 0x7682, 0x7683, 0x7684, 0x7685, 0x7686, 0x7687, - 0x7688, 0x7689, 0x768a, 0x768b, 0x768c, 0x768d, 0x768e, 0x768f, - 0x7690, 0x7691, 0x7692, 0x7693, 0x7694, 0x7695, 0x7696, 0x7697, - 0x7698, 0x7699, 0x769a, 0x769b, 0x769c, 0x769d, 0x769e, 0x769f, - 0x76a0, 0x76a1, 0x76a2, 0x76a3, 0x76a4, 0x76a5, 0x76a6, 0x76a7, - 0x76a8, 0x76a9, 0x76aa, 0x76ab, 0x76ac, 0x76ad, 0x76ae, 0x76af, - 0x76b0, 0x76b1, 0x76b2, 0x76b3, 0x76b4, 0x76b5, 0x76b6, 0x76b7, - 0x76b8, 0x76b9, 0x76ba, 0x76bb, 0x76bc, 0x76bd, 0x76be, 0x76bf, - 0x76c0, 0x76c1, 0x76c2, 0x76c3, 0x76c4, 0x76c5, 0x76c6, 0x76c7, - 0x76c8, 0x76c9, 0x76ca, 0x76cb, 0x76cc, 0x76cd, 0x76ce, 0x76cf, - 0x76d0, 0x76d1, 0x76d2, 0x76d3, 0x76d4, 0x76d5, 0x76d6, 0x76d7, - 0x76d8, 0x76d9, 0x76da, 0x76db, 0x76dc, 0x76dd, 0x76de, 0x76df, - 0x76e0, 0x76e1, 0x76e2, 0x76e3, 0x76e4, 0x76e5, 0x76e6, 0x76e7, - 0x76e8, 0x76e9, 0x76ea, 0x76eb, 0x76ec, 0x76ed, 0x76ee, 0x76ef, - 0x76f0, 0x76f1, 0x76f2, 0x76f3, 0x76f4, 0x76f5, 0x76f6, 0x76f7, - 0x76f8, 0x76f9, 0x76fa, 0x76fb, 0x76fc, 0x76fd, 0x76fe, 0x76ff, - 0x7700, 0x7701, 0x7702, 0x7703, 0x7704, 0x7705, 0x7706, 0x7707, - 0x7708, 0x7709, 0x770a, 0x770b, 0x770c, 0x770d, 0x770e, 0x770f, - 0x7710, 0x7711, 0x7712, 0x7713, 0x7714, 0x7715, 0x7716, 0x7717, - 0x7718, 0x7719, 0x771a, 0x771b, 0x771c, 0x771d, 0x771e, 0x771f, - 0x7720, 0x7721, 0x7722, 0x7723, 0x7724, 0x7725, 0x7726, 0x7727, - 0x7728, 0x7729, 0x772a, 0x772b, 0x772c, 0x772d, 0x772e, 0x772f, - 0x7730, 0x7731, 0x7732, 0x7733, 0x7734, 0x7735, 0x7736, 0x7737, - 0x7738, 0x7739, 0x773a, 0x773b, 0x773c, 0x773d, 0x773e, 0x773f, - 0x7740, 0x7741, 0x7742, 0x7743, 0x7744, 0x7745, 0x7746, 0x7747, - 0x7748, 0x7749, 0x774a, 0x774b, 0x774c, 0x774d, 0x774e, 0x774f, - 0x7750, 0x7751, 0x7752, 0x7753, 0x7754, 0x7755, 0x7756, 0x7757, - 0x7758, 0x7759, 0x775a, 0x775b, 0x775c, 0x775d, 0x775e, 0x775f, - 0x7760, 0x7761, 0x7762, 0x7763, 0x7764, 0x7765, 0x7766, 0x7767, - 0x7768, 0x7769, 0x776a, 0x776b, 0x776c, 0x776d, 0x776e, 0x776f, - 0x7770, 0x7771, 0x7772, 0x7773, 0x7774, 0x7775, 0x7776, 0x7777, - 0x7778, 0x7779, 0x777a, 0x777b, 0x777c, 0x777d, 0x777e, 0x777f, - 0x7780, 0x7781, 0x7782, 0x7783, 0x7784, 0x7785, 0x7786, 0x7787, - 0x7788, 0x7789, 0x778a, 0x778b, 0x778c, 0x778d, 0x778e, 0x778f, - 0x7790, 0x7791, 0x7792, 0x7793, 0x7794, 0x7795, 0x7796, 0x7797, - 0x7798, 0x7799, 0x779a, 0x779b, 0x779c, 0x779d, 0x779e, 0x779f, - 0x77a0, 0x77a1, 0x77a2, 0x77a3, 0x77a4, 0x77a5, 0x77a6, 0x77a7, - 0x77a8, 0x77a9, 0x77aa, 0x77ab, 0x77ac, 0x77ad, 0x77ae, 0x77af, - 0x77b0, 0x77b1, 0x77b2, 0x77b3, 0x77b4, 0x77b5, 0x77b6, 0x77b7, - 0x77b8, 0x77b9, 0x77ba, 0x77bb, 0x77bc, 0x77bd, 0x77be, 0x77bf, - 0x77c0, 0x77c1, 0x77c2, 0x77c3, 0x77c4, 0x77c5, 0x77c6, 0x77c7, - 0x77c8, 0x77c9, 0x77ca, 0x77cb, 0x77cc, 0x77cd, 0x77ce, 0x77cf, - 0x77d0, 0x77d1, 0x77d2, 0x77d3, 0x77d4, 0x77d5, 0x77d6, 0x77d7, - 0x77d8, 0x77d9, 0x77da, 0x77db, 0x77dc, 0x77dd, 0x77de, 0x77df, - 0x77e0, 0x77e1, 0x77e2, 0x77e3, 0x77e4, 0x77e5, 0x77e6, 0x77e7, - 0x77e8, 0x77e9, 0x77ea, 0x77eb, 0x77ec, 0x77ed, 0x77ee, 0x77ef, - 0x77f0, 0x77f1, 0x77f2, 0x77f3, 0x77f4, 0x77f5, 0x77f6, 0x77f7, - 0x77f8, 0x77f9, 0x77fa, 0x77fb, 0x77fc, 0x77fd, 0x77fe, 0x77ff, - 0x7800, 0x7801, 0x7802, 0x7803, 0x7804, 0x7805, 0x7806, 0x7807, - 0x7808, 0x7809, 0x780a, 0x780b, 0x780c, 0x780d, 0x780e, 0x780f, - 0x7810, 0x7811, 0x7812, 0x7813, 0x7814, 0x7815, 0x7816, 0x7817, - 0x7818, 0x7819, 0x781a, 0x781b, 0x781c, 0x781d, 0x781e, 0x781f, - 0x7820, 0x7821, 0x7822, 0x7823, 0x7824, 0x7825, 0x7826, 0x7827, - 0x7828, 0x7829, 0x782a, 0x782b, 0x782c, 0x782d, 0x782e, 0x782f, - 0x7830, 0x7831, 0x7832, 0x7833, 0x7834, 0x7835, 0x7836, 0x7837, - 0x7838, 0x7839, 0x783a, 0x783b, 0x783c, 0x783d, 0x783e, 0x783f, - 0x7840, 0x7841, 0x7842, 0x7843, 0x7844, 0x7845, 0x7846, 0x7847, - 0x7848, 0x7849, 0x784a, 0x784b, 0x784c, 0x784d, 0x784e, 0x784f, - 0x7850, 0x7851, 0x7852, 0x7853, 0x7854, 0x7855, 0x7856, 0x7857, - 0x7858, 0x7859, 0x785a, 0x785b, 0x785c, 0x785d, 0x785e, 0x785f, - 0x7860, 0x7861, 0x7862, 0x7863, 0x7864, 0x7865, 0x7866, 0x7867, - 0x7868, 0x7869, 0x786a, 0x786b, 0x786c, 0x786d, 0x786e, 0x786f, - 0x7870, 0x7871, 0x7872, 0x7873, 0x7874, 0x7875, 0x7876, 0x7877, - 0x7878, 0x7879, 0x787a, 0x787b, 0x787c, 0x787d, 0x787e, 0x787f, - 0x7880, 0x7881, 0x7882, 0x7883, 0x7884, 0x7885, 0x7886, 0x7887, - 0x7888, 0x7889, 0x788a, 0x788b, 0x788c, 0x788d, 0x788e, 0x788f, - 0x7890, 0x7891, 0x7892, 0x7893, 0x7894, 0x7895, 0x7896, 0x7897, - 0x7898, 0x7899, 0x789a, 0x789b, 0x789c, 0x789d, 0x789e, 0x789f, - 0x78a0, 0x78a1, 0x78a2, 0x78a3, 0x78a4, 0x78a5, 0x78a6, 0x78a7, - 0x78a8, 0x78a9, 0x78aa, 0x78ab, 0x78ac, 0x78ad, 0x78ae, 0x78af, - 0x78b0, 0x78b1, 0x78b2, 0x78b3, 0x78b4, 0x78b5, 0x78b6, 0x78b7, - 0x78b8, 0x78b9, 0x78ba, 0x78bb, 0x78bc, 0x78bd, 0x78be, 0x78bf, - 0x78c0, 0x78c1, 0x78c2, 0x78c3, 0x78c4, 0x78c5, 0x78c6, 0x78c7, - 0x78c8, 0x78c9, 0x78ca, 0x78cb, 0x78cc, 0x78cd, 0x78ce, 0x78cf, - 0x78d0, 0x78d1, 0x78d2, 0x78d3, 0x78d4, 0x78d5, 0x78d6, 0x78d7, - 0x78d8, 0x78d9, 0x78da, 0x78db, 0x78dc, 0x78dd, 0x78de, 0x78df, - 0x78e0, 0x78e1, 0x78e2, 0x78e3, 0x78e4, 0x78e5, 0x78e6, 0x78e7, - 0x78e8, 0x78e9, 0x78ea, 0x78eb, 0x78ec, 0x78ed, 0x78ee, 0x78ef, - 0x78f0, 0x78f1, 0x78f2, 0x78f3, 0x78f4, 0x78f5, 0x78f6, 0x78f7, - 0x78f8, 0x78f9, 0x78fa, 0x78fb, 0x78fc, 0x78fd, 0x78fe, 0x78ff, - 0x7900, 0x7901, 0x7902, 0x7903, 0x7904, 0x7905, 0x7906, 0x7907, - 0x7908, 0x7909, 0x790a, 0x790b, 0x790c, 0x790d, 0x790e, 0x790f, - 0x7910, 0x7911, 0x7912, 0x7913, 0x7914, 0x7915, 0x7916, 0x7917, - 0x7918, 0x7919, 0x791a, 0x791b, 0x791c, 0x791d, 0x791e, 0x791f, - 0x7920, 0x7921, 0x7922, 0x7923, 0x7924, 0x7925, 0x7926, 0x7927, - 0x7928, 0x7929, 0x792a, 0x792b, 0x792c, 0x792d, 0x792e, 0x792f, - 0x7930, 0x7931, 0x7932, 0x7933, 0x7934, 0x7935, 0x7936, 0x7937, - 0x7938, 0x7939, 0x793a, 0x793b, 0x793c, 0x793d, 0x793e, 0x793f, - 0x7940, 0x7941, 0x7942, 0x7943, 0x7944, 0x7945, 0x7946, 0x7947, - 0x7948, 0x7949, 0x794a, 0x794b, 0x794c, 0x794d, 0x794e, 0x794f, - 0x7950, 0x7951, 0x7952, 0x7953, 0x7954, 0x7955, 0x7956, 0x7957, - 0x7958, 0x7959, 0x795a, 0x795b, 0x795c, 0x795d, 0x795e, 0x795f, - 0x7960, 0x7961, 0x7962, 0x7963, 0x7964, 0x7965, 0x7966, 0x7967, - 0x7968, 0x7969, 0x796a, 0x796b, 0x796c, 0x796d, 0x796e, 0x796f, - 0x7970, 0x7971, 0x7972, 0x7973, 0x7974, 0x7975, 0x7976, 0x7977, - 0x7978, 0x7979, 0x797a, 0x797b, 0x797c, 0x797d, 0x797e, 0x797f, - 0x7980, 0x7981, 0x7982, 0x7983, 0x7984, 0x7985, 0x7986, 0x7987, - 0x7988, 0x7989, 0x798a, 0x798b, 0x798c, 0x798d, 0x798e, 0x798f, - 0x7990, 0x7991, 0x7992, 0x7993, 0x7994, 0x7995, 0x7996, 0x7997, - 0x7998, 0x7999, 0x799a, 0x799b, 0x799c, 0x799d, 0x799e, 0x799f, - 0x79a0, 0x79a1, 0x79a2, 0x79a3, 0x79a4, 0x79a5, 0x79a6, 0x79a7, - 0x79a8, 0x79a9, 0x79aa, 0x79ab, 0x79ac, 0x79ad, 0x79ae, 0x79af, - 0x79b0, 0x79b1, 0x79b2, 0x79b3, 0x79b4, 0x79b5, 0x79b6, 0x79b7, - 0x79b8, 0x79b9, 0x79ba, 0x79bb, 0x79bc, 0x79bd, 0x79be, 0x79bf, - 0x79c0, 0x79c1, 0x79c2, 0x79c3, 0x79c4, 0x79c5, 0x79c6, 0x79c7, - 0x79c8, 0x79c9, 0x79ca, 0x79cb, 0x79cc, 0x79cd, 0x79ce, 0x79cf, - 0x79d0, 0x79d1, 0x79d2, 0x79d3, 0x79d4, 0x79d5, 0x79d6, 0x79d7, - 0x79d8, 0x79d9, 0x79da, 0x79db, 0x79dc, 0x79dd, 0x79de, 0x79df, - 0x79e0, 0x79e1, 0x79e2, 0x79e3, 0x79e4, 0x79e5, 0x79e6, 0x79e7, - 0x79e8, 0x79e9, 0x79ea, 0x79eb, 0x79ec, 0x79ed, 0x79ee, 0x79ef, - 0x79f0, 0x79f1, 0x79f2, 0x79f3, 0x79f4, 0x79f5, 0x79f6, 0x79f7, - 0x79f8, 0x79f9, 0x79fa, 0x79fb, 0x79fc, 0x79fd, 0x79fe, 0x79ff, - 0x7a00, 0x7a01, 0x7a02, 0x7a03, 0x7a04, 0x7a05, 0x7a06, 0x7a07, - 0x7a08, 0x7a09, 0x7a0a, 0x7a0b, 0x7a0c, 0x7a0d, 0x7a0e, 0x7a0f, - 0x7a10, 0x7a11, 0x7a12, 0x7a13, 0x7a14, 0x7a15, 0x7a16, 0x7a17, - 0x7a18, 0x7a19, 0x7a1a, 0x7a1b, 0x7a1c, 0x7a1d, 0x7a1e, 0x7a1f, - 0x7a20, 0x7a21, 0x7a22, 0x7a23, 0x7a24, 0x7a25, 0x7a26, 0x7a27, - 0x7a28, 0x7a29, 0x7a2a, 0x7a2b, 0x7a2c, 0x7a2d, 0x7a2e, 0x7a2f, - 0x7a30, 0x7a31, 0x7a32, 0x7a33, 0x7a34, 0x7a35, 0x7a36, 0x7a37, - 0x7a38, 0x7a39, 0x7a3a, 0x7a3b, 0x7a3c, 0x7a3d, 0x7a3e, 0x7a3f, - 0x7a40, 0x7a41, 0x7a42, 0x7a43, 0x7a44, 0x7a45, 0x7a46, 0x7a47, - 0x7a48, 0x7a49, 0x7a4a, 0x7a4b, 0x7a4c, 0x7a4d, 0x7a4e, 0x7a4f, - 0x7a50, 0x7a51, 0x7a52, 0x7a53, 0x7a54, 0x7a55, 0x7a56, 0x7a57, - 0x7a58, 0x7a59, 0x7a5a, 0x7a5b, 0x7a5c, 0x7a5d, 0x7a5e, 0x7a5f, - 0x7a60, 0x7a61, 0x7a62, 0x7a63, 0x7a64, 0x7a65, 0x7a66, 0x7a67, - 0x7a68, 0x7a69, 0x7a6a, 0x7a6b, 0x7a6c, 0x7a6d, 0x7a6e, 0x7a6f, - 0x7a70, 0x7a71, 0x7a72, 0x7a73, 0x7a74, 0x7a75, 0x7a76, 0x7a77, - 0x7a78, 0x7a79, 0x7a7a, 0x7a7b, 0x7a7c, 0x7a7d, 0x7a7e, 0x7a7f, - 0x7a80, 0x7a81, 0x7a82, 0x7a83, 0x7a84, 0x7a85, 0x7a86, 0x7a87, - 0x7a88, 0x7a89, 0x7a8a, 0x7a8b, 0x7a8c, 0x7a8d, 0x7a8e, 0x7a8f, - 0x7a90, 0x7a91, 0x7a92, 0x7a93, 0x7a94, 0x7a95, 0x7a96, 0x7a97, - 0x7a98, 0x7a99, 0x7a9a, 0x7a9b, 0x7a9c, 0x7a9d, 0x7a9e, 0x7a9f, - 0x7aa0, 0x7aa1, 0x7aa2, 0x7aa3, 0x7aa4, 0x7aa5, 0x7aa6, 0x7aa7, - 0x7aa8, 0x7aa9, 0x7aaa, 0x7aab, 0x7aac, 0x7aad, 0x7aae, 0x7aaf, - 0x7ab0, 0x7ab1, 0x7ab2, 0x7ab3, 0x7ab4, 0x7ab5, 0x7ab6, 0x7ab7, - 0x7ab8, 0x7ab9, 0x7aba, 0x7abb, 0x7abc, 0x7abd, 0x7abe, 0x7abf, - 0x7ac0, 0x7ac1, 0x7ac2, 0x7ac3, 0x7ac4, 0x7ac5, 0x7ac6, 0x7ac7, - 0x7ac8, 0x7ac9, 0x7aca, 0x7acb, 0x7acc, 0x7acd, 0x7ace, 0x7acf, - 0x7ad0, 0x7ad1, 0x7ad2, 0x7ad3, 0x7ad4, 0x7ad5, 0x7ad6, 0x7ad7, - 0x7ad8, 0x7ad9, 0x7ada, 0x7adb, 0x7adc, 0x7add, 0x7ade, 0x7adf, - 0x7ae0, 0x7ae1, 0x7ae2, 0x7ae3, 0x7ae4, 0x7ae5, 0x7ae6, 0x7ae7, - 0x7ae8, 0x7ae9, 0x7aea, 0x7aeb, 0x7aec, 0x7aed, 0x7aee, 0x7aef, - 0x7af0, 0x7af1, 0x7af2, 0x7af3, 0x7af4, 0x7af5, 0x7af6, 0x7af7, - 0x7af8, 0x7af9, 0x7afa, 0x7afb, 0x7afc, 0x7afd, 0x7afe, 0x7aff, - 0x7b00, 0x7b01, 0x7b02, 0x7b03, 0x7b04, 0x7b05, 0x7b06, 0x7b07, - 0x7b08, 0x7b09, 0x7b0a, 0x7b0b, 0x7b0c, 0x7b0d, 0x7b0e, 0x7b0f, - 0x7b10, 0x7b11, 0x7b12, 0x7b13, 0x7b14, 0x7b15, 0x7b16, 0x7b17, - 0x7b18, 0x7b19, 0x7b1a, 0x7b1b, 0x7b1c, 0x7b1d, 0x7b1e, 0x7b1f, - 0x7b20, 0x7b21, 0x7b22, 0x7b23, 0x7b24, 0x7b25, 0x7b26, 0x7b27, - 0x7b28, 0x7b29, 0x7b2a, 0x7b2b, 0x7b2c, 0x7b2d, 0x7b2e, 0x7b2f, - 0x7b30, 0x7b31, 0x7b32, 0x7b33, 0x7b34, 0x7b35, 0x7b36, 0x7b37, - 0x7b38, 0x7b39, 0x7b3a, 0x7b3b, 0x7b3c, 0x7b3d, 0x7b3e, 0x7b3f, - 0x7b40, 0x7b41, 0x7b42, 0x7b43, 0x7b44, 0x7b45, 0x7b46, 0x7b47, - 0x7b48, 0x7b49, 0x7b4a, 0x7b4b, 0x7b4c, 0x7b4d, 0x7b4e, 0x7b4f, - 0x7b50, 0x7b51, 0x7b52, 0x7b53, 0x7b54, 0x7b55, 0x7b56, 0x7b57, - 0x7b58, 0x7b59, 0x7b5a, 0x7b5b, 0x7b5c, 0x7b5d, 0x7b5e, 0x7b5f, - 0x7b60, 0x7b61, 0x7b62, 0x7b63, 0x7b64, 0x7b65, 0x7b66, 0x7b67, - 0x7b68, 0x7b69, 0x7b6a, 0x7b6b, 0x7b6c, 0x7b6d, 0x7b6e, 0x7b6f, - 0x7b70, 0x7b71, 0x7b72, 0x7b73, 0x7b74, 0x7b75, 0x7b76, 0x7b77, - 0x7b78, 0x7b79, 0x7b7a, 0x7b7b, 0x7b7c, 0x7b7d, 0x7b7e, 0x7b7f, - 0x7b80, 0x7b81, 0x7b82, 0x7b83, 0x7b84, 0x7b85, 0x7b86, 0x7b87, - 0x7b88, 0x7b89, 0x7b8a, 0x7b8b, 0x7b8c, 0x7b8d, 0x7b8e, 0x7b8f, - 0x7b90, 0x7b91, 0x7b92, 0x7b93, 0x7b94, 0x7b95, 0x7b96, 0x7b97, - 0x7b98, 0x7b99, 0x7b9a, 0x7b9b, 0x7b9c, 0x7b9d, 0x7b9e, 0x7b9f, - 0x7ba0, 0x7ba1, 0x7ba2, 0x7ba3, 0x7ba4, 0x7ba5, 0x7ba6, 0x7ba7, - 0x7ba8, 0x7ba9, 0x7baa, 0x7bab, 0x7bac, 0x7bad, 0x7bae, 0x7baf, - 0x7bb0, 0x7bb1, 0x7bb2, 0x7bb3, 0x7bb4, 0x7bb5, 0x7bb6, 0x7bb7, - 0x7bb8, 0x7bb9, 0x7bba, 0x7bbb, 0x7bbc, 0x7bbd, 0x7bbe, 0x7bbf, - 0x7bc0, 0x7bc1, 0x7bc2, 0x7bc3, 0x7bc4, 0x7bc5, 0x7bc6, 0x7bc7, - 0x7bc8, 0x7bc9, 0x7bca, 0x7bcb, 0x7bcc, 0x7bcd, 0x7bce, 0x7bcf, - 0x7bd0, 0x7bd1, 0x7bd2, 0x7bd3, 0x7bd4, 0x7bd5, 0x7bd6, 0x7bd7, - 0x7bd8, 0x7bd9, 0x7bda, 0x7bdb, 0x7bdc, 0x7bdd, 0x7bde, 0x7bdf, - 0x7be0, 0x7be1, 0x7be2, 0x7be3, 0x7be4, 0x7be5, 0x7be6, 0x7be7, - 0x7be8, 0x7be9, 0x7bea, 0x7beb, 0x7bec, 0x7bed, 0x7bee, 0x7bef, - 0x7bf0, 0x7bf1, 0x7bf2, 0x7bf3, 0x7bf4, 0x7bf5, 0x7bf6, 0x7bf7, - 0x7bf8, 0x7bf9, 0x7bfa, 0x7bfb, 0x7bfc, 0x7bfd, 0x7bfe, 0x7bff, - 0x7c00, 0x7c01, 0x7c02, 0x7c03, 0x7c04, 0x7c05, 0x7c06, 0x7c07, - 0x7c08, 0x7c09, 0x7c0a, 0x7c0b, 0x7c0c, 0x7c0d, 0x7c0e, 0x7c0f, - 0x7c10, 0x7c11, 0x7c12, 0x7c13, 0x7c14, 0x7c15, 0x7c16, 0x7c17, - 0x7c18, 0x7c19, 0x7c1a, 0x7c1b, 0x7c1c, 0x7c1d, 0x7c1e, 0x7c1f, - 0x7c20, 0x7c21, 0x7c22, 0x7c23, 0x7c24, 0x7c25, 0x7c26, 0x7c27, - 0x7c28, 0x7c29, 0x7c2a, 0x7c2b, 0x7c2c, 0x7c2d, 0x7c2e, 0x7c2f, - 0x7c30, 0x7c31, 0x7c32, 0x7c33, 0x7c34, 0x7c35, 0x7c36, 0x7c37, - 0x7c38, 0x7c39, 0x7c3a, 0x7c3b, 0x7c3c, 0x7c3d, 0x7c3e, 0x7c3f, - 0x7c40, 0x7c41, 0x7c42, 0x7c43, 0x7c44, 0x7c45, 0x7c46, 0x7c47, - 0x7c48, 0x7c49, 0x7c4a, 0x7c4b, 0x7c4c, 0x7c4d, 0x7c4e, 0x7c4f, - 0x7c50, 0x7c51, 0x7c52, 0x7c53, 0x7c54, 0x7c55, 0x7c56, 0x7c57, - 0x7c58, 0x7c59, 0x7c5a, 0x7c5b, 0x7c5c, 0x7c5d, 0x7c5e, 0x7c5f, - 0x7c60, 0x7c61, 0x7c62, 0x7c63, 0x7c64, 0x7c65, 0x7c66, 0x7c67, - 0x7c68, 0x7c69, 0x7c6a, 0x7c6b, 0x7c6c, 0x7c6d, 0x7c6e, 0x7c6f, - 0x7c70, 0x7c71, 0x7c72, 0x7c73, 0x7c74, 0x7c75, 0x7c76, 0x7c77, - 0x7c78, 0x7c79, 0x7c7a, 0x7c7b, 0x7c7c, 0x7c7d, 0x7c7e, 0x7c7f, - 0x7c80, 0x7c81, 0x7c82, 0x7c83, 0x7c84, 0x7c85, 0x7c86, 0x7c87, - 0x7c88, 0x7c89, 0x7c8a, 0x7c8b, 0x7c8c, 0x7c8d, 0x7c8e, 0x7c8f, - 0x7c90, 0x7c91, 0x7c92, 0x7c93, 0x7c94, 0x7c95, 0x7c96, 0x7c97, - 0x7c98, 0x7c99, 0x7c9a, 0x7c9b, 0x7c9c, 0x7c9d, 0x7c9e, 0x7c9f, - 0x7ca0, 0x7ca1, 0x7ca2, 0x7ca3, 0x7ca4, 0x7ca5, 0x7ca6, 0x7ca7, - 0x7ca8, 0x7ca9, 0x7caa, 0x7cab, 0x7cac, 0x7cad, 0x7cae, 0x7caf, - 0x7cb0, 0x7cb1, 0x7cb2, 0x7cb3, 0x7cb4, 0x7cb5, 0x7cb6, 0x7cb7, - 0x7cb8, 0x7cb9, 0x7cba, 0x7cbb, 0x7cbc, 0x7cbd, 0x7cbe, 0x7cbf, - 0x7cc0, 0x7cc1, 0x7cc2, 0x7cc3, 0x7cc4, 0x7cc5, 0x7cc6, 0x7cc7, - 0x7cc8, 0x7cc9, 0x7cca, 0x7ccb, 0x7ccc, 0x7ccd, 0x7cce, 0x7ccf, - 0x7cd0, 0x7cd1, 0x7cd2, 0x7cd3, 0x7cd4, 0x7cd5, 0x7cd6, 0x7cd7, - 0x7cd8, 0x7cd9, 0x7cda, 0x7cdb, 0x7cdc, 0x7cdd, 0x7cde, 0x7cdf, - 0x7ce0, 0x7ce1, 0x7ce2, 0x7ce3, 0x7ce4, 0x7ce5, 0x7ce6, 0x7ce7, - 0x7ce8, 0x7ce9, 0x7cea, 0x7ceb, 0x7cec, 0x7ced, 0x7cee, 0x7cef, - 0x7cf0, 0x7cf1, 0x7cf2, 0x7cf3, 0x7cf4, 0x7cf5, 0x7cf6, 0x7cf7, - 0x7cf8, 0x7cf9, 0x7cfa, 0x7cfb, 0x7cfc, 0x7cfd, 0x7cfe, 0x7cff, - 0x7d00, 0x7d01, 0x7d02, 0x7d03, 0x7d04, 0x7d05, 0x7d06, 0x7d07, - 0x7d08, 0x7d09, 0x7d0a, 0x7d0b, 0x7d0c, 0x7d0d, 0x7d0e, 0x7d0f, - 0x7d10, 0x7d11, 0x7d12, 0x7d13, 0x7d14, 0x7d15, 0x7d16, 0x7d17, - 0x7d18, 0x7d19, 0x7d1a, 0x7d1b, 0x7d1c, 0x7d1d, 0x7d1e, 0x7d1f, - 0x7d20, 0x7d21, 0x7d22, 0x7d23, 0x7d24, 0x7d25, 0x7d26, 0x7d27, - 0x7d28, 0x7d29, 0x7d2a, 0x7d2b, 0x7d2c, 0x7d2d, 0x7d2e, 0x7d2f, - 0x7d30, 0x7d31, 0x7d32, 0x7d33, 0x7d34, 0x7d35, 0x7d36, 0x7d37, - 0x7d38, 0x7d39, 0x7d3a, 0x7d3b, 0x7d3c, 0x7d3d, 0x7d3e, 0x7d3f, - 0x7d40, 0x7d41, 0x7d42, 0x7d43, 0x7d44, 0x7d45, 0x7d46, 0x7d47, - 0x7d48, 0x7d49, 0x7d4a, 0x7d4b, 0x7d4c, 0x7d4d, 0x7d4e, 0x7d4f, - 0x7d50, 0x7d51, 0x7d52, 0x7d53, 0x7d54, 0x7d55, 0x7d56, 0x7d57, - 0x7d58, 0x7d59, 0x7d5a, 0x7d5b, 0x7d5c, 0x7d5d, 0x7d5e, 0x7d5f, - 0x7d60, 0x7d61, 0x7d62, 0x7d63, 0x7d64, 0x7d65, 0x7d66, 0x7d67, - 0x7d68, 0x7d69, 0x7d6a, 0x7d6b, 0x7d6c, 0x7d6d, 0x7d6e, 0x7d6f, - 0x7d70, 0x7d71, 0x7d72, 0x7d73, 0x7d74, 0x7d75, 0x7d76, 0x7d77, - 0x7d78, 0x7d79, 0x7d7a, 0x7d7b, 0x7d7c, 0x7d7d, 0x7d7e, 0x7d7f, - 0x7d80, 0x7d81, 0x7d82, 0x7d83, 0x7d84, 0x7d85, 0x7d86, 0x7d87, - 0x7d88, 0x7d89, 0x7d8a, 0x7d8b, 0x7d8c, 0x7d8d, 0x7d8e, 0x7d8f, - 0x7d90, 0x7d91, 0x7d92, 0x7d93, 0x7d94, 0x7d95, 0x7d96, 0x7d97, - 0x7d98, 0x7d99, 0x7d9a, 0x7d9b, 0x7d9c, 0x7d9d, 0x7d9e, 0x7d9f, - 0x7da0, 0x7da1, 0x7da2, 0x7da3, 0x7da4, 0x7da5, 0x7da6, 0x7da7, - 0x7da8, 0x7da9, 0x7daa, 0x7dab, 0x7dac, 0x7dad, 0x7dae, 0x7daf, - 0x7db0, 0x7db1, 0x7db2, 0x7db3, 0x7db4, 0x7db5, 0x7db6, 0x7db7, - 0x7db8, 0x7db9, 0x7dba, 0x7dbb, 0x7dbc, 0x7dbd, 0x7dbe, 0x7dbf, - 0x7dc0, 0x7dc1, 0x7dc2, 0x7dc3, 0x7dc4, 0x7dc5, 0x7dc6, 0x7dc7, - 0x7dc8, 0x7dc9, 0x7dca, 0x7dcb, 0x7dcc, 0x7dcd, 0x7dce, 0x7dcf, - 0x7dd0, 0x7dd1, 0x7dd2, 0x7dd3, 0x7dd4, 0x7dd5, 0x7dd6, 0x7dd7, - 0x7dd8, 0x7dd9, 0x7dda, 0x7ddb, 0x7ddc, 0x7ddd, 0x7dde, 0x7ddf, - 0x7de0, 0x7de1, 0x7de2, 0x7de3, 0x7de4, 0x7de5, 0x7de6, 0x7de7, - 0x7de8, 0x7de9, 0x7dea, 0x7deb, 0x7dec, 0x7ded, 0x7dee, 0x7def, - 0x7df0, 0x7df1, 0x7df2, 0x7df3, 0x7df4, 0x7df5, 0x7df6, 0x7df7, - 0x7df8, 0x7df9, 0x7dfa, 0x7dfb, 0x7dfc, 0x7dfd, 0x7dfe, 0x7dff, - 0x7e00, 0x7e01, 0x7e02, 0x7e03, 0x7e04, 0x7e05, 0x7e06, 0x7e07, - 0x7e08, 0x7e09, 0x7e0a, 0x7e0b, 0x7e0c, 0x7e0d, 0x7e0e, 0x7e0f, - 0x7e10, 0x7e11, 0x7e12, 0x7e13, 0x7e14, 0x7e15, 0x7e16, 0x7e17, - 0x7e18, 0x7e19, 0x7e1a, 0x7e1b, 0x7e1c, 0x7e1d, 0x7e1e, 0x7e1f, - 0x7e20, 0x7e21, 0x7e22, 0x7e23, 0x7e24, 0x7e25, 0x7e26, 0x7e27, - 0x7e28, 0x7e29, 0x7e2a, 0x7e2b, 0x7e2c, 0x7e2d, 0x7e2e, 0x7e2f, - 0x7e30, 0x7e31, 0x7e32, 0x7e33, 0x7e34, 0x7e35, 0x7e36, 0x7e37, - 0x7e38, 0x7e39, 0x7e3a, 0x7e3b, 0x7e3c, 0x7e3d, 0x7e3e, 0x7e3f, - 0x7e40, 0x7e41, 0x7e42, 0x7e43, 0x7e44, 0x7e45, 0x7e46, 0x7e47, - 0x7e48, 0x7e49, 0x7e4a, 0x7e4b, 0x7e4c, 0x7e4d, 0x7e4e, 0x7e4f, - 0x7e50, 0x7e51, 0x7e52, 0x7e53, 0x7e54, 0x7e55, 0x7e56, 0x7e57, - 0x7e58, 0x7e59, 0x7e5a, 0x7e5b, 0x7e5c, 0x7e5d, 0x7e5e, 0x7e5f, - 0x7e60, 0x7e61, 0x7e62, 0x7e63, 0x7e64, 0x7e65, 0x7e66, 0x7e67, - 0x7e68, 0x7e69, 0x7e6a, 0x7e6b, 0x7e6c, 0x7e6d, 0x7e6e, 0x7e6f, - 0x7e70, 0x7e71, 0x7e72, 0x7e73, 0x7e74, 0x7e75, 0x7e76, 0x7e77, - 0x7e78, 0x7e79, 0x7e7a, 0x7e7b, 0x7e7c, 0x7e7d, 0x7e7e, 0x7e7f, - 0x7e80, 0x7e81, 0x7e82, 0x7e83, 0x7e84, 0x7e85, 0x7e86, 0x7e87, - 0x7e88, 0x7e89, 0x7e8a, 0x7e8b, 0x7e8c, 0x7e8d, 0x7e8e, 0x7e8f, - 0x7e90, 0x7e91, 0x7e92, 0x7e93, 0x7e94, 0x7e95, 0x7e96, 0x7e97, - 0x7e98, 0x7e99, 0x7e9a, 0x7e9b, 0x7e9c, 0x7e9d, 0x7e9e, 0x7e9f, - 0x7ea0, 0x7ea1, 0x7ea2, 0x7ea3, 0x7ea4, 0x7ea5, 0x7ea6, 0x7ea7, - 0x7ea8, 0x7ea9, 0x7eaa, 0x7eab, 0x7eac, 0x7ead, 0x7eae, 0x7eaf, - 0x7eb0, 0x7eb1, 0x7eb2, 0x7eb3, 0x7eb4, 0x7eb5, 0x7eb6, 0x7eb7, - 0x7eb8, 0x7eb9, 0x7eba, 0x7ebb, 0x7ebc, 0x7ebd, 0x7ebe, 0x7ebf, - 0x7ec0, 0x7ec1, 0x7ec2, 0x7ec3, 0x7ec4, 0x7ec5, 0x7ec6, 0x7ec7, - 0x7ec8, 0x7ec9, 0x7eca, 0x7ecb, 0x7ecc, 0x7ecd, 0x7ece, 0x7ecf, - 0x7ed0, 0x7ed1, 0x7ed2, 0x7ed3, 0x7ed4, 0x7ed5, 0x7ed6, 0x7ed7, - 0x7ed8, 0x7ed9, 0x7eda, 0x7edb, 0x7edc, 0x7edd, 0x7ede, 0x7edf, - 0x7ee0, 0x7ee1, 0x7ee2, 0x7ee3, 0x7ee4, 0x7ee5, 0x7ee6, 0x7ee7, - 0x7ee8, 0x7ee9, 0x7eea, 0x7eeb, 0x7eec, 0x7eed, 0x7eee, 0x7eef, - 0x7ef0, 0x7ef1, 0x7ef2, 0x7ef3, 0x7ef4, 0x7ef5, 0x7ef6, 0x7ef7, - 0x7ef8, 0x7ef9, 0x7efa, 0x7efb, 0x7efc, 0x7efd, 0x7efe, 0x7eff, - 0x7f00, 0x7f01, 0x7f02, 0x7f03, 0x7f04, 0x7f05, 0x7f06, 0x7f07, - 0x7f08, 0x7f09, 0x7f0a, 0x7f0b, 0x7f0c, 0x7f0d, 0x7f0e, 0x7f0f, - 0x7f10, 0x7f11, 0x7f12, 0x7f13, 0x7f14, 0x7f15, 0x7f16, 0x7f17, - 0x7f18, 0x7f19, 0x7f1a, 0x7f1b, 0x7f1c, 0x7f1d, 0x7f1e, 0x7f1f, - 0x7f20, 0x7f21, 0x7f22, 0x7f23, 0x7f24, 0x7f25, 0x7f26, 0x7f27, - 0x7f28, 0x7f29, 0x7f2a, 0x7f2b, 0x7f2c, 0x7f2d, 0x7f2e, 0x7f2f, - 0x7f30, 0x7f31, 0x7f32, 0x7f33, 0x7f34, 0x7f35, 0x7f36, 0x7f37, - 0x7f38, 0x7f39, 0x7f3a, 0x7f3b, 0x7f3c, 0x7f3d, 0x7f3e, 0x7f3f, - 0x7f40, 0x7f41, 0x7f42, 0x7f43, 0x7f44, 0x7f45, 0x7f46, 0x7f47, - 0x7f48, 0x7f49, 0x7f4a, 0x7f4b, 0x7f4c, 0x7f4d, 0x7f4e, 0x7f4f, - 0x7f50, 0x7f51, 0x7f52, 0x7f53, 0x7f54, 0x7f55, 0x7f56, 0x7f57, - 0x7f58, 0x7f59, 0x7f5a, 0x7f5b, 0x7f5c, 0x7f5d, 0x7f5e, 0x7f5f, - 0x7f60, 0x7f61, 0x7f62, 0x7f63, 0x7f64, 0x7f65, 0x7f66, 0x7f67, - 0x7f68, 0x7f69, 0x7f6a, 0x7f6b, 0x7f6c, 0x7f6d, 0x7f6e, 0x7f6f, - 0x7f70, 0x7f71, 0x7f72, 0x7f73, 0x7f74, 0x7f75, 0x7f76, 0x7f77, - 0x7f78, 0x7f79, 0x7f7a, 0x7f7b, 0x7f7c, 0x7f7d, 0x7f7e, 0x7f7f, - 0x7f80, 0x7f81, 0x7f82, 0x7f83, 0x7f84, 0x7f85, 0x7f86, 0x7f87, - 0x7f88, 0x7f89, 0x7f8a, 0x7f8b, 0x7f8c, 0x7f8d, 0x7f8e, 0x7f8f, - 0x7f90, 0x7f91, 0x7f92, 0x7f93, 0x7f94, 0x7f95, 0x7f96, 0x7f97, - 0x7f98, 0x7f99, 0x7f9a, 0x7f9b, 0x7f9c, 0x7f9d, 0x7f9e, 0x7f9f, - 0x7fa0, 0x7fa1, 0x7fa2, 0x7fa3, 0x7fa4, 0x7fa5, 0x7fa6, 0x7fa7, - 0x7fa8, 0x7fa9, 0x7faa, 0x7fab, 0x7fac, 0x7fad, 0x7fae, 0x7faf, - 0x7fb0, 0x7fb1, 0x7fb2, 0x7fb3, 0x7fb4, 0x7fb5, 0x7fb6, 0x7fb7, - 0x7fb8, 0x7fb9, 0x7fba, 0x7fbb, 0x7fbc, 0x7fbd, 0x7fbe, 0x7fbf, - 0x7fc0, 0x7fc1, 0x7fc2, 0x7fc3, 0x7fc4, 0x7fc5, 0x7fc6, 0x7fc7, - 0x7fc8, 0x7fc9, 0x7fca, 0x7fcb, 0x7fcc, 0x7fcd, 0x7fce, 0x7fcf, - 0x7fd0, 0x7fd1, 0x7fd2, 0x7fd3, 0x7fd4, 0x7fd5, 0x7fd6, 0x7fd7, - 0x7fd8, 0x7fd9, 0x7fda, 0x7fdb, 0x7fdc, 0x7fdd, 0x7fde, 0x7fdf, - 0x7fe0, 0x7fe1, 0x7fe2, 0x7fe3, 0x7fe4, 0x7fe5, 0x7fe6, 0x7fe7, - 0x7fe8, 0x7fe9, 0x7fea, 0x7feb, 0x7fec, 0x7fed, 0x7fee, 0x7fef, - 0x7ff0, 0x7ff1, 0x7ff2, 0x7ff3, 0x7ff4, 0x7ff5, 0x7ff6, 0x7ff7, - 0x7ff8, 0x7ff9, 0x7ffa, 0x7ffb, 0x7ffc, 0x7ffd, 0x7ffe, 0x7fff, - 0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007, - 0x8008, 0x8009, 0x800a, 0x800b, 0x800c, 0x800d, 0x800e, 0x800f, - 0x8010, 0x8011, 0x8012, 0x8013, 0x8014, 0x8015, 0x8016, 0x8017, - 0x8018, 0x8019, 0x801a, 0x801b, 0x801c, 0x801d, 0x801e, 0x801f, - 0x8020, 0x8021, 0x8022, 0x8023, 0x8024, 0x8025, 0x8026, 0x8027, - 0x8028, 0x8029, 0x802a, 0x802b, 0x802c, 0x802d, 0x802e, 0x802f, - 0x8030, 0x8031, 0x8032, 0x8033, 0x8034, 0x8035, 0x8036, 0x8037, - 0x8038, 0x8039, 0x803a, 0x803b, 0x803c, 0x803d, 0x803e, 0x803f, - 0x8040, 0x8041, 0x8042, 0x8043, 0x8044, 0x8045, 0x8046, 0x8047, - 0x8048, 0x8049, 0x804a, 0x804b, 0x804c, 0x804d, 0x804e, 0x804f, - 0x8050, 0x8051, 0x8052, 0x8053, 0x8054, 0x8055, 0x8056, 0x8057, - 0x8058, 0x8059, 0x805a, 0x805b, 0x805c, 0x805d, 0x805e, 0x805f, - 0x8060, 0x8061, 0x8062, 0x8063, 0x8064, 0x8065, 0x8066, 0x8067, - 0x8068, 0x8069, 0x806a, 0x806b, 0x806c, 0x806d, 0x806e, 0x806f, - 0x8070, 0x8071, 0x8072, 0x8073, 0x8074, 0x8075, 0x8076, 0x8077, - 0x8078, 0x8079, 0x807a, 0x807b, 0x807c, 0x807d, 0x807e, 0x807f, - 0x8080, 0x8081, 0x8082, 0x8083, 0x8084, 0x8085, 0x8086, 0x8087, - 0x8088, 0x8089, 0x808a, 0x808b, 0x808c, 0x808d, 0x808e, 0x808f, - 0x8090, 0x8091, 0x8092, 0x8093, 0x8094, 0x8095, 0x8096, 0x8097, - 0x8098, 0x8099, 0x809a, 0x809b, 0x809c, 0x809d, 0x809e, 0x809f, - 0x80a0, 0x80a1, 0x80a2, 0x80a3, 0x80a4, 0x80a5, 0x80a6, 0x80a7, - 0x80a8, 0x80a9, 0x80aa, 0x80ab, 0x80ac, 0x80ad, 0x80ae, 0x80af, - 0x80b0, 0x80b1, 0x80b2, 0x80b3, 0x80b4, 0x80b5, 0x80b6, 0x80b7, - 0x80b8, 0x80b9, 0x80ba, 0x80bb, 0x80bc, 0x80bd, 0x80be, 0x80bf, - 0x80c0, 0x80c1, 0x80c2, 0x80c3, 0x80c4, 0x80c5, 0x80c6, 0x80c7, - 0x80c8, 0x80c9, 0x80ca, 0x80cb, 0x80cc, 0x80cd, 0x80ce, 0x80cf, - 0x80d0, 0x80d1, 0x80d2, 0x80d3, 0x80d4, 0x80d5, 0x80d6, 0x80d7, - 0x80d8, 0x80d9, 0x80da, 0x80db, 0x80dc, 0x80dd, 0x80de, 0x80df, - 0x80e0, 0x80e1, 0x80e2, 0x80e3, 0x80e4, 0x80e5, 0x80e6, 0x80e7, - 0x80e8, 0x80e9, 0x80ea, 0x80eb, 0x80ec, 0x80ed, 0x80ee, 0x80ef, - 0x80f0, 0x80f1, 0x80f2, 0x80f3, 0x80f4, 0x80f5, 0x80f6, 0x80f7, - 0x80f8, 0x80f9, 0x80fa, 0x80fb, 0x80fc, 0x80fd, 0x80fe, 0x80ff, - 0x8100, 0x8101, 0x8102, 0x8103, 0x8104, 0x8105, 0x8106, 0x8107, - 0x8108, 0x8109, 0x810a, 0x810b, 0x810c, 0x810d, 0x810e, 0x810f, - 0x8110, 0x8111, 0x8112, 0x8113, 0x8114, 0x8115, 0x8116, 0x8117, - 0x8118, 0x8119, 0x811a, 0x811b, 0x811c, 0x811d, 0x811e, 0x811f, - 0x8120, 0x8121, 0x8122, 0x8123, 0x8124, 0x8125, 0x8126, 0x8127, - 0x8128, 0x8129, 0x812a, 0x812b, 0x812c, 0x812d, 0x812e, 0x812f, - 0x8130, 0x8131, 0x8132, 0x8133, 0x8134, 0x8135, 0x8136, 0x8137, - 0x8138, 0x8139, 0x813a, 0x813b, 0x813c, 0x813d, 0x813e, 0x813f, - 0x8140, 0x8141, 0x8142, 0x8143, 0x8144, 0x8145, 0x8146, 0x8147, - 0x8148, 0x8149, 0x814a, 0x814b, 0x814c, 0x814d, 0x814e, 0x814f, - 0x8150, 0x8151, 0x8152, 0x8153, 0x8154, 0x8155, 0x8156, 0x8157, - 0x8158, 0x8159, 0x815a, 0x815b, 0x815c, 0x815d, 0x815e, 0x815f, - 0x8160, 0x8161, 0x8162, 0x8163, 0x8164, 0x8165, 0x8166, 0x8167, - 0x8168, 0x8169, 0x816a, 0x816b, 0x816c, 0x816d, 0x816e, 0x816f, - 0x8170, 0x8171, 0x8172, 0x8173, 0x8174, 0x8175, 0x8176, 0x8177, - 0x8178, 0x8179, 0x817a, 0x817b, 0x817c, 0x817d, 0x817e, 0x817f, - 0x8180, 0x8181, 0x8182, 0x8183, 0x8184, 0x8185, 0x8186, 0x8187, - 0x8188, 0x8189, 0x818a, 0x818b, 0x818c, 0x818d, 0x818e, 0x818f, - 0x8190, 0x8191, 0x8192, 0x8193, 0x8194, 0x8195, 0x8196, 0x8197, - 0x8198, 0x8199, 0x819a, 0x819b, 0x819c, 0x819d, 0x819e, 0x819f, - 0x81a0, 0x81a1, 0x81a2, 0x81a3, 0x81a4, 0x81a5, 0x81a6, 0x81a7, - 0x81a8, 0x81a9, 0x81aa, 0x81ab, 0x81ac, 0x81ad, 0x81ae, 0x81af, - 0x81b0, 0x81b1, 0x81b2, 0x81b3, 0x81b4, 0x81b5, 0x81b6, 0x81b7, - 0x81b8, 0x81b9, 0x81ba, 0x81bb, 0x81bc, 0x81bd, 0x81be, 0x81bf, - 0x81c0, 0x81c1, 0x81c2, 0x81c3, 0x81c4, 0x81c5, 0x81c6, 0x81c7, - 0x81c8, 0x81c9, 0x81ca, 0x81cb, 0x81cc, 0x81cd, 0x81ce, 0x81cf, - 0x81d0, 0x81d1, 0x81d2, 0x81d3, 0x81d4, 0x81d5, 0x81d6, 0x81d7, - 0x81d8, 0x81d9, 0x81da, 0x81db, 0x81dc, 0x81dd, 0x81de, 0x81df, - 0x81e0, 0x81e1, 0x81e2, 0x81e3, 0x81e4, 0x81e5, 0x81e6, 0x81e7, - 0x81e8, 0x81e9, 0x81ea, 0x81eb, 0x81ec, 0x81ed, 0x81ee, 0x81ef, - 0x81f0, 0x81f1, 0x81f2, 0x81f3, 0x81f4, 0x81f5, 0x81f6, 0x81f7, - 0x81f8, 0x81f9, 0x81fa, 0x81fb, 0x81fc, 0x81fd, 0x81fe, 0x81ff, - 0x8200, 0x8201, 0x8202, 0x8203, 0x8204, 0x8205, 0x8206, 0x8207, - 0x8208, 0x8209, 0x820a, 0x820b, 0x820c, 0x820d, 0x820e, 0x820f, - 0x8210, 0x8211, 0x8212, 0x8213, 0x8214, 0x8215, 0x8216, 0x8217, - 0x8218, 0x8219, 0x821a, 0x821b, 0x821c, 0x821d, 0x821e, 0x821f, - 0x8220, 0x8221, 0x8222, 0x8223, 0x8224, 0x8225, 0x8226, 0x8227, - 0x8228, 0x8229, 0x822a, 0x822b, 0x822c, 0x822d, 0x822e, 0x822f, - 0x8230, 0x8231, 0x8232, 0x8233, 0x8234, 0x8235, 0x8236, 0x8237, - 0x8238, 0x8239, 0x823a, 0x823b, 0x823c, 0x823d, 0x823e, 0x823f, - 0x8240, 0x8241, 0x8242, 0x8243, 0x8244, 0x8245, 0x8246, 0x8247, - 0x8248, 0x8249, 0x824a, 0x824b, 0x824c, 0x824d, 0x824e, 0x824f, - 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255, 0x8256, 0x8257, - 0x8258, 0x8259, 0x825a, 0x825b, 0x825c, 0x825d, 0x825e, 0x825f, - 0x8260, 0x8261, 0x8262, 0x8263, 0x8264, 0x8265, 0x8266, 0x8267, - 0x8268, 0x8269, 0x826a, 0x826b, 0x826c, 0x826d, 0x826e, 0x826f, - 0x8270, 0x8271, 0x8272, 0x8273, 0x8274, 0x8275, 0x8276, 0x8277, - 0x8278, 0x8279, 0x827a, 0x827b, 0x827c, 0x827d, 0x827e, 0x827f, - 0x8280, 0x8281, 0x8282, 0x8283, 0x8284, 0x8285, 0x8286, 0x8287, - 0x8288, 0x8289, 0x828a, 0x828b, 0x828c, 0x828d, 0x828e, 0x828f, - 0x8290, 0x8291, 0x8292, 0x8293, 0x8294, 0x8295, 0x8296, 0x8297, - 0x8298, 0x8299, 0x829a, 0x829b, 0x829c, 0x829d, 0x829e, 0x829f, - 0x82a0, 0x82a1, 0x82a2, 0x82a3, 0x82a4, 0x82a5, 0x82a6, 0x82a7, - 0x82a8, 0x82a9, 0x82aa, 0x82ab, 0x82ac, 0x82ad, 0x82ae, 0x82af, - 0x82b0, 0x82b1, 0x82b2, 0x82b3, 0x82b4, 0x82b5, 0x82b6, 0x82b7, - 0x82b8, 0x82b9, 0x82ba, 0x82bb, 0x82bc, 0x82bd, 0x82be, 0x82bf, - 0x82c0, 0x82c1, 0x82c2, 0x82c3, 0x82c4, 0x82c5, 0x82c6, 0x82c7, - 0x82c8, 0x82c9, 0x82ca, 0x82cb, 0x82cc, 0x82cd, 0x82ce, 0x82cf, - 0x82d0, 0x82d1, 0x82d2, 0x82d3, 0x82d4, 0x82d5, 0x82d6, 0x82d7, - 0x82d8, 0x82d9, 0x82da, 0x82db, 0x82dc, 0x82dd, 0x82de, 0x82df, - 0x82e0, 0x82e1, 0x82e2, 0x82e3, 0x82e4, 0x82e5, 0x82e6, 0x82e7, - 0x82e8, 0x82e9, 0x82ea, 0x82eb, 0x82ec, 0x82ed, 0x82ee, 0x82ef, - 0x82f0, 0x82f1, 0x82f2, 0x82f3, 0x82f4, 0x82f5, 0x82f6, 0x82f7, - 0x82f8, 0x82f9, 0x82fa, 0x82fb, 0x82fc, 0x82fd, 0x82fe, 0x82ff, - 0x8300, 0x8301, 0x8302, 0x8303, 0x8304, 0x8305, 0x8306, 0x8307, - 0x8308, 0x8309, 0x830a, 0x830b, 0x830c, 0x830d, 0x830e, 0x830f, - 0x8310, 0x8311, 0x8312, 0x8313, 0x8314, 0x8315, 0x8316, 0x8317, - 0x8318, 0x8319, 0x831a, 0x831b, 0x831c, 0x831d, 0x831e, 0x831f, - 0x8320, 0x8321, 0x8322, 0x8323, 0x8324, 0x8325, 0x8326, 0x8327, - 0x8328, 0x8329, 0x832a, 0x832b, 0x832c, 0x832d, 0x832e, 0x832f, - 0x8330, 0x8331, 0x8332, 0x8333, 0x8334, 0x8335, 0x8336, 0x8337, - 0x8338, 0x8339, 0x833a, 0x833b, 0x833c, 0x833d, 0x833e, 0x833f, - 0x8340, 0x8341, 0x8342, 0x8343, 0x8344, 0x8345, 0x8346, 0x8347, - 0x8348, 0x8349, 0x834a, 0x834b, 0x834c, 0x834d, 0x834e, 0x834f, - 0x8350, 0x8351, 0x8352, 0x8353, 0x8354, 0x8355, 0x8356, 0x8357, - 0x8358, 0x8359, 0x835a, 0x835b, 0x835c, 0x835d, 0x835e, 0x835f, - 0x8360, 0x8361, 0x8362, 0x8363, 0x8364, 0x8365, 0x8366, 0x8367, - 0x8368, 0x8369, 0x836a, 0x836b, 0x836c, 0x836d, 0x836e, 0x836f, - 0x8370, 0x8371, 0x8372, 0x8373, 0x8374, 0x8375, 0x8376, 0x8377, - 0x8378, 0x8379, 0x837a, 0x837b, 0x837c, 0x837d, 0x837e, 0x837f, - 0x8380, 0x8381, 0x8382, 0x8383, 0x8384, 0x8385, 0x8386, 0x8387, - 0x8388, 0x8389, 0x838a, 0x838b, 0x838c, 0x838d, 0x838e, 0x838f, - 0x8390, 0x8391, 0x8392, 0x8393, 0x8394, 0x8395, 0x8396, 0x8397, - 0x8398, 0x8399, 0x839a, 0x839b, 0x839c, 0x839d, 0x839e, 0x839f, - 0x83a0, 0x83a1, 0x83a2, 0x83a3, 0x83a4, 0x83a5, 0x83a6, 0x83a7, - 0x83a8, 0x83a9, 0x83aa, 0x83ab, 0x83ac, 0x83ad, 0x83ae, 0x83af, - 0x83b0, 0x83b1, 0x83b2, 0x83b3, 0x83b4, 0x83b5, 0x83b6, 0x83b7, - 0x83b8, 0x83b9, 0x83ba, 0x83bb, 0x83bc, 0x83bd, 0x83be, 0x83bf, - 0x83c0, 0x83c1, 0x83c2, 0x83c3, 0x83c4, 0x83c5, 0x83c6, 0x83c7, - 0x83c8, 0x83c9, 0x83ca, 0x83cb, 0x83cc, 0x83cd, 0x83ce, 0x83cf, - 0x83d0, 0x83d1, 0x83d2, 0x83d3, 0x83d4, 0x83d5, 0x83d6, 0x83d7, - 0x83d8, 0x83d9, 0x83da, 0x83db, 0x83dc, 0x83dd, 0x83de, 0x83df, - 0x83e0, 0x83e1, 0x83e2, 0x83e3, 0x83e4, 0x83e5, 0x83e6, 0x83e7, - 0x83e8, 0x83e9, 0x83ea, 0x83eb, 0x83ec, 0x83ed, 0x83ee, 0x83ef, - 0x83f0, 0x83f1, 0x83f2, 0x83f3, 0x83f4, 0x83f5, 0x83f6, 0x83f7, - 0x83f8, 0x83f9, 0x83fa, 0x83fb, 0x83fc, 0x83fd, 0x83fe, 0x83ff, - 0x8400, 0x8401, 0x8402, 0x8403, 0x8404, 0x8405, 0x8406, 0x8407, - 0x8408, 0x8409, 0x840a, 0x840b, 0x840c, 0x840d, 0x840e, 0x840f, - 0x8410, 0x8411, 0x8412, 0x8413, 0x8414, 0x8415, 0x8416, 0x8417, - 0x8418, 0x8419, 0x841a, 0x841b, 0x841c, 0x841d, 0x841e, 0x841f, - 0x8420, 0x8421, 0x8422, 0x8423, 0x8424, 0x8425, 0x8426, 0x8427, - 0x8428, 0x8429, 0x842a, 0x842b, 0x842c, 0x842d, 0x842e, 0x842f, - 0x8430, 0x8431, 0x8432, 0x8433, 0x8434, 0x8435, 0x8436, 0x8437, - 0x8438, 0x8439, 0x843a, 0x843b, 0x843c, 0x843d, 0x843e, 0x843f, - 0x8440, 0x8441, 0x8442, 0x8443, 0x8444, 0x8445, 0x8446, 0x8447, - 0x8448, 0x8449, 0x844a, 0x844b, 0x844c, 0x844d, 0x844e, 0x844f, - 0x8450, 0x8451, 0x8452, 0x8453, 0x8454, 0x8455, 0x8456, 0x8457, - 0x8458, 0x8459, 0x845a, 0x845b, 0x845c, 0x845d, 0x845e, 0x845f, - 0x8460, 0x8461, 0x8462, 0x8463, 0x8464, 0x8465, 0x8466, 0x8467, - 0x8468, 0x8469, 0x846a, 0x846b, 0x846c, 0x846d, 0x846e, 0x846f, - 0x8470, 0x8471, 0x8472, 0x8473, 0x8474, 0x8475, 0x8476, 0x8477, - 0x8478, 0x8479, 0x847a, 0x847b, 0x847c, 0x847d, 0x847e, 0x847f, - 0x8480, 0x8481, 0x8482, 0x8483, 0x8484, 0x8485, 0x8486, 0x8487, - 0x8488, 0x8489, 0x848a, 0x848b, 0x848c, 0x848d, 0x848e, 0x848f, - 0x8490, 0x8491, 0x8492, 0x8493, 0x8494, 0x8495, 0x8496, 0x8497, - 0x8498, 0x8499, 0x849a, 0x849b, 0x849c, 0x849d, 0x849e, 0x849f, - 0x84a0, 0x84a1, 0x84a2, 0x84a3, 0x84a4, 0x84a5, 0x84a6, 0x84a7, - 0x84a8, 0x84a9, 0x84aa, 0x84ab, 0x84ac, 0x84ad, 0x84ae, 0x84af, - 0x84b0, 0x84b1, 0x84b2, 0x84b3, 0x84b4, 0x84b5, 0x84b6, 0x84b7, - 0x84b8, 0x84b9, 0x84ba, 0x84bb, 0x84bc, 0x84bd, 0x84be, 0x84bf, - 0x84c0, 0x84c1, 0x84c2, 0x84c3, 0x84c4, 0x84c5, 0x84c6, 0x84c7, - 0x84c8, 0x84c9, 0x84ca, 0x84cb, 0x84cc, 0x84cd, 0x84ce, 0x84cf, - 0x84d0, 0x84d1, 0x84d2, 0x84d3, 0x84d4, 0x84d5, 0x84d6, 0x84d7, - 0x84d8, 0x84d9, 0x84da, 0x84db, 0x84dc, 0x84dd, 0x84de, 0x84df, - 0x84e0, 0x84e1, 0x84e2, 0x84e3, 0x84e4, 0x84e5, 0x84e6, 0x84e7, - 0x84e8, 0x84e9, 0x84ea, 0x84eb, 0x84ec, 0x84ed, 0x84ee, 0x84ef, - 0x84f0, 0x84f1, 0x84f2, 0x84f3, 0x84f4, 0x84f5, 0x84f6, 0x84f7, - 0x84f8, 0x84f9, 0x84fa, 0x84fb, 0x84fc, 0x84fd, 0x84fe, 0x84ff, - 0x8500, 0x8501, 0x8502, 0x8503, 0x8504, 0x8505, 0x8506, 0x8507, - 0x8508, 0x8509, 0x850a, 0x850b, 0x850c, 0x850d, 0x850e, 0x850f, - 0x8510, 0x8511, 0x8512, 0x8513, 0x8514, 0x8515, 0x8516, 0x8517, - 0x8518, 0x8519, 0x851a, 0x851b, 0x851c, 0x851d, 0x851e, 0x851f, - 0x8520, 0x8521, 0x8522, 0x8523, 0x8524, 0x8525, 0x8526, 0x8527, - 0x8528, 0x8529, 0x852a, 0x852b, 0x852c, 0x852d, 0x852e, 0x852f, - 0x8530, 0x8531, 0x8532, 0x8533, 0x8534, 0x8535, 0x8536, 0x8537, - 0x8538, 0x8539, 0x853a, 0x853b, 0x853c, 0x853d, 0x853e, 0x853f, - 0x8540, 0x8541, 0x8542, 0x8543, 0x8544, 0x8545, 0x8546, 0x8547, - 0x8548, 0x8549, 0x854a, 0x854b, 0x854c, 0x854d, 0x854e, 0x854f, - 0x8550, 0x8551, 0x8552, 0x8553, 0x8554, 0x8555, 0x8556, 0x8557, - 0x8558, 0x8559, 0x855a, 0x855b, 0x855c, 0x855d, 0x855e, 0x855f, - 0x8560, 0x8561, 0x8562, 0x8563, 0x8564, 0x8565, 0x8566, 0x8567, - 0x8568, 0x8569, 0x856a, 0x856b, 0x856c, 0x856d, 0x856e, 0x856f, - 0x8570, 0x8571, 0x8572, 0x8573, 0x8574, 0x8575, 0x8576, 0x8577, - 0x8578, 0x8579, 0x857a, 0x857b, 0x857c, 0x857d, 0x857e, 0x857f, - 0x8580, 0x8581, 0x8582, 0x8583, 0x8584, 0x8585, 0x8586, 0x8587, - 0x8588, 0x8589, 0x858a, 0x858b, 0x858c, 0x858d, 0x858e, 0x858f, - 0x8590, 0x8591, 0x8592, 0x8593, 0x8594, 0x8595, 0x8596, 0x8597, - 0x8598, 0x8599, 0x859a, 0x859b, 0x859c, 0x859d, 0x859e, 0x859f, - 0x85a0, 0x85a1, 0x85a2, 0x85a3, 0x85a4, 0x85a5, 0x85a6, 0x85a7, - 0x85a8, 0x85a9, 0x85aa, 0x85ab, 0x85ac, 0x85ad, 0x85ae, 0x85af, - 0x85b0, 0x85b1, 0x85b2, 0x85b3, 0x85b4, 0x85b5, 0x85b6, 0x85b7, - 0x85b8, 0x85b9, 0x85ba, 0x85bb, 0x85bc, 0x85bd, 0x85be, 0x85bf, - 0x85c0, 0x85c1, 0x85c2, 0x85c3, 0x85c4, 0x85c5, 0x85c6, 0x85c7, - 0x85c8, 0x85c9, 0x85ca, 0x85cb, 0x85cc, 0x85cd, 0x85ce, 0x85cf, - 0x85d0, 0x85d1, 0x85d2, 0x85d3, 0x85d4, 0x85d5, 0x85d6, 0x85d7, - 0x85d8, 0x85d9, 0x85da, 0x85db, 0x85dc, 0x85dd, 0x85de, 0x85df, - 0x85e0, 0x85e1, 0x85e2, 0x85e3, 0x85e4, 0x85e5, 0x85e6, 0x85e7, - 0x85e8, 0x85e9, 0x85ea, 0x85eb, 0x85ec, 0x85ed, 0x85ee, 0x85ef, - 0x85f0, 0x85f1, 0x85f2, 0x85f3, 0x85f4, 0x85f5, 0x85f6, 0x85f7, - 0x85f8, 0x85f9, 0x85fa, 0x85fb, 0x85fc, 0x85fd, 0x85fe, 0x85ff, - 0x8600, 0x8601, 0x8602, 0x8603, 0x8604, 0x8605, 0x8606, 0x8607, - 0x8608, 0x8609, 0x860a, 0x860b, 0x860c, 0x860d, 0x860e, 0x860f, - 0x8610, 0x8611, 0x8612, 0x8613, 0x8614, 0x8615, 0x8616, 0x8617, - 0x8618, 0x8619, 0x861a, 0x861b, 0x861c, 0x861d, 0x861e, 0x861f, - 0x8620, 0x8621, 0x8622, 0x8623, 0x8624, 0x8625, 0x8626, 0x8627, - 0x8628, 0x8629, 0x862a, 0x862b, 0x862c, 0x862d, 0x862e, 0x862f, - 0x8630, 0x8631, 0x8632, 0x8633, 0x8634, 0x8635, 0x8636, 0x8637, - 0x8638, 0x8639, 0x863a, 0x863b, 0x863c, 0x863d, 0x863e, 0x863f, - 0x8640, 0x8641, 0x8642, 0x8643, 0x8644, 0x8645, 0x8646, 0x8647, - 0x8648, 0x8649, 0x864a, 0x864b, 0x864c, 0x864d, 0x864e, 0x864f, - 0x8650, 0x8651, 0x8652, 0x8653, 0x8654, 0x8655, 0x8656, 0x8657, - 0x8658, 0x8659, 0x865a, 0x865b, 0x865c, 0x865d, 0x865e, 0x865f, - 0x8660, 0x8661, 0x8662, 0x8663, 0x8664, 0x8665, 0x8666, 0x8667, - 0x8668, 0x8669, 0x866a, 0x866b, 0x866c, 0x866d, 0x866e, 0x866f, - 0x8670, 0x8671, 0x8672, 0x8673, 0x8674, 0x8675, 0x8676, 0x8677, - 0x8678, 0x8679, 0x867a, 0x867b, 0x867c, 0x867d, 0x867e, 0x867f, - 0x8680, 0x8681, 0x8682, 0x8683, 0x8684, 0x8685, 0x8686, 0x8687, - 0x8688, 0x8689, 0x868a, 0x868b, 0x868c, 0x868d, 0x868e, 0x868f, - 0x8690, 0x8691, 0x8692, 0x8693, 0x8694, 0x8695, 0x8696, 0x8697, - 0x8698, 0x8699, 0x869a, 0x869b, 0x869c, 0x869d, 0x869e, 0x869f, - 0x86a0, 0x86a1, 0x86a2, 0x86a3, 0x86a4, 0x86a5, 0x86a6, 0x86a7, - 0x86a8, 0x86a9, 0x86aa, 0x86ab, 0x86ac, 0x86ad, 0x86ae, 0x86af, - 0x86b0, 0x86b1, 0x86b2, 0x86b3, 0x86b4, 0x86b5, 0x86b6, 0x86b7, - 0x86b8, 0x86b9, 0x86ba, 0x86bb, 0x86bc, 0x86bd, 0x86be, 0x86bf, - 0x86c0, 0x86c1, 0x86c2, 0x86c3, 0x86c4, 0x86c5, 0x86c6, 0x86c7, - 0x86c8, 0x86c9, 0x86ca, 0x86cb, 0x86cc, 0x86cd, 0x86ce, 0x86cf, - 0x86d0, 0x86d1, 0x86d2, 0x86d3, 0x86d4, 0x86d5, 0x86d6, 0x86d7, - 0x86d8, 0x86d9, 0x86da, 0x86db, 0x86dc, 0x86dd, 0x86de, 0x86df, - 0x86e0, 0x86e1, 0x86e2, 0x86e3, 0x86e4, 0x86e5, 0x86e6, 0x86e7, - 0x86e8, 0x86e9, 0x86ea, 0x86eb, 0x86ec, 0x86ed, 0x86ee, 0x86ef, - 0x86f0, 0x86f1, 0x86f2, 0x86f3, 0x86f4, 0x86f5, 0x86f6, 0x86f7, - 0x86f8, 0x86f9, 0x86fa, 0x86fb, 0x86fc, 0x86fd, 0x86fe, 0x86ff, - 0x8700, 0x8701, 0x8702, 0x8703, 0x8704, 0x8705, 0x8706, 0x8707, - 0x8708, 0x8709, 0x870a, 0x870b, 0x870c, 0x870d, 0x870e, 0x870f, - 0x8710, 0x8711, 0x8712, 0x8713, 0x8714, 0x8715, 0x8716, 0x8717, - 0x8718, 0x8719, 0x871a, 0x871b, 0x871c, 0x871d, 0x871e, 0x871f, - 0x8720, 0x8721, 0x8722, 0x8723, 0x8724, 0x8725, 0x8726, 0x8727, - 0x8728, 0x8729, 0x872a, 0x872b, 0x872c, 0x872d, 0x872e, 0x872f, - 0x8730, 0x8731, 0x8732, 0x8733, 0x8734, 0x8735, 0x8736, 0x8737, - 0x8738, 0x8739, 0x873a, 0x873b, 0x873c, 0x873d, 0x873e, 0x873f, - 0x8740, 0x8741, 0x8742, 0x8743, 0x8744, 0x8745, 0x8746, 0x8747, - 0x8748, 0x8749, 0x874a, 0x874b, 0x874c, 0x874d, 0x874e, 0x874f, - 0x8750, 0x8751, 0x8752, 0x8753, 0x8754, 0x8755, 0x8756, 0x8757, - 0x8758, 0x8759, 0x875a, 0x875b, 0x875c, 0x875d, 0x875e, 0x875f, - 0x8760, 0x8761, 0x8762, 0x8763, 0x8764, 0x8765, 0x8766, 0x8767, - 0x8768, 0x8769, 0x876a, 0x876b, 0x876c, 0x876d, 0x876e, 0x876f, - 0x8770, 0x8771, 0x8772, 0x8773, 0x8774, 0x8775, 0x8776, 0x8777, - 0x8778, 0x8779, 0x877a, 0x877b, 0x877c, 0x877d, 0x877e, 0x877f, - 0x8780, 0x8781, 0x8782, 0x8783, 0x8784, 0x8785, 0x8786, 0x8787, - 0x8788, 0x8789, 0x878a, 0x878b, 0x878c, 0x878d, 0x878e, 0x878f, - 0x8790, 0x8791, 0x8792, 0x8793, 0x8794, 0x8795, 0x8796, 0x8797, - 0x8798, 0x8799, 0x879a, 0x879b, 0x879c, 0x879d, 0x879e, 0x879f, - 0x87a0, 0x87a1, 0x87a2, 0x87a3, 0x87a4, 0x87a5, 0x87a6, 0x87a7, - 0x87a8, 0x87a9, 0x87aa, 0x87ab, 0x87ac, 0x87ad, 0x87ae, 0x87af, - 0x87b0, 0x87b1, 0x87b2, 0x87b3, 0x87b4, 0x87b5, 0x87b6, 0x87b7, - 0x87b8, 0x87b9, 0x87ba, 0x87bb, 0x87bc, 0x87bd, 0x87be, 0x87bf, - 0x87c0, 0x87c1, 0x87c2, 0x87c3, 0x87c4, 0x87c5, 0x87c6, 0x87c7, - 0x87c8, 0x87c9, 0x87ca, 0x87cb, 0x87cc, 0x87cd, 0x87ce, 0x87cf, - 0x87d0, 0x87d1, 0x87d2, 0x87d3, 0x87d4, 0x87d5, 0x87d6, 0x87d7, - 0x87d8, 0x87d9, 0x87da, 0x87db, 0x87dc, 0x87dd, 0x87de, 0x87df, - 0x87e0, 0x87e1, 0x87e2, 0x87e3, 0x87e4, 0x87e5, 0x87e6, 0x87e7, - 0x87e8, 0x87e9, 0x87ea, 0x87eb, 0x87ec, 0x87ed, 0x87ee, 0x87ef, - 0x87f0, 0x87f1, 0x87f2, 0x87f3, 0x87f4, 0x87f5, 0x87f6, 0x87f7, - 0x87f8, 0x87f9, 0x87fa, 0x87fb, 0x87fc, 0x87fd, 0x87fe, 0x87ff, - 0x8800, 0x8801, 0x8802, 0x8803, 0x8804, 0x8805, 0x8806, 0x8807, - 0x8808, 0x8809, 0x880a, 0x880b, 0x880c, 0x880d, 0x880e, 0x880f, - 0x8810, 0x8811, 0x8812, 0x8813, 0x8814, 0x8815, 0x8816, 0x8817, - 0x8818, 0x8819, 0x881a, 0x881b, 0x881c, 0x881d, 0x881e, 0x881f, - 0x8820, 0x8821, 0x8822, 0x8823, 0x8824, 0x8825, 0x8826, 0x8827, - 0x8828, 0x8829, 0x882a, 0x882b, 0x882c, 0x882d, 0x882e, 0x882f, - 0x8830, 0x8831, 0x8832, 0x8833, 0x8834, 0x8835, 0x8836, 0x8837, - 0x8838, 0x8839, 0x883a, 0x883b, 0x883c, 0x883d, 0x883e, 0x883f, - 0x8840, 0x8841, 0x8842, 0x8843, 0x8844, 0x8845, 0x8846, 0x8847, - 0x8848, 0x8849, 0x884a, 0x884b, 0x884c, 0x884d, 0x884e, 0x884f, - 0x8850, 0x8851, 0x8852, 0x8853, 0x8854, 0x8855, 0x8856, 0x8857, - 0x8858, 0x8859, 0x885a, 0x885b, 0x885c, 0x885d, 0x885e, 0x885f, - 0x8860, 0x8861, 0x8862, 0x8863, 0x8864, 0x8865, 0x8866, 0x8867, - 0x8868, 0x8869, 0x886a, 0x886b, 0x886c, 0x886d, 0x886e, 0x886f, - 0x8870, 0x8871, 0x8872, 0x8873, 0x8874, 0x8875, 0x8876, 0x8877, - 0x8878, 0x8879, 0x887a, 0x887b, 0x887c, 0x887d, 0x887e, 0x887f, - 0x8880, 0x8881, 0x8882, 0x8883, 0x8884, 0x8885, 0x8886, 0x8887, - 0x8888, 0x8889, 0x888a, 0x888b, 0x888c, 0x888d, 0x888e, 0x888f, - 0x8890, 0x8891, 0x8892, 0x8893, 0x8894, 0x8895, 0x8896, 0x8897, - 0x8898, 0x8899, 0x889a, 0x889b, 0x889c, 0x889d, 0x889e, 0x889f, - 0x88a0, 0x88a1, 0x88a2, 0x88a3, 0x88a4, 0x88a5, 0x88a6, 0x88a7, - 0x88a8, 0x88a9, 0x88aa, 0x88ab, 0x88ac, 0x88ad, 0x88ae, 0x88af, - 0x88b0, 0x88b1, 0x88b2, 0x88b3, 0x88b4, 0x88b5, 0x88b6, 0x88b7, - 0x88b8, 0x88b9, 0x88ba, 0x88bb, 0x88bc, 0x88bd, 0x88be, 0x88bf, - 0x88c0, 0x88c1, 0x88c2, 0x88c3, 0x88c4, 0x88c5, 0x88c6, 0x88c7, - 0x88c8, 0x88c9, 0x88ca, 0x88cb, 0x88cc, 0x88cd, 0x88ce, 0x88cf, - 0x88d0, 0x88d1, 0x88d2, 0x88d3, 0x88d4, 0x88d5, 0x88d6, 0x88d7, - 0x88d8, 0x88d9, 0x88da, 0x88db, 0x88dc, 0x88dd, 0x88de, 0x88df, - 0x88e0, 0x88e1, 0x88e2, 0x88e3, 0x88e4, 0x88e5, 0x88e6, 0x88e7, - 0x88e8, 0x88e9, 0x88ea, 0x88eb, 0x88ec, 0x88ed, 0x88ee, 0x88ef, - 0x88f0, 0x88f1, 0x88f2, 0x88f3, 0x88f4, 0x88f5, 0x88f6, 0x88f7, - 0x88f8, 0x88f9, 0x88fa, 0x88fb, 0x88fc, 0x88fd, 0x88fe, 0x88ff, - 0x8900, 0x8901, 0x8902, 0x8903, 0x8904, 0x8905, 0x8906, 0x8907, - 0x8908, 0x8909, 0x890a, 0x890b, 0x890c, 0x890d, 0x890e, 0x890f, - 0x8910, 0x8911, 0x8912, 0x8913, 0x8914, 0x8915, 0x8916, 0x8917, - 0x8918, 0x8919, 0x891a, 0x891b, 0x891c, 0x891d, 0x891e, 0x891f, - 0x8920, 0x8921, 0x8922, 0x8923, 0x8924, 0x8925, 0x8926, 0x8927, - 0x8928, 0x8929, 0x892a, 0x892b, 0x892c, 0x892d, 0x892e, 0x892f, - 0x8930, 0x8931, 0x8932, 0x8933, 0x8934, 0x8935, 0x8936, 0x8937, - 0x8938, 0x8939, 0x893a, 0x893b, 0x893c, 0x893d, 0x893e, 0x893f, - 0x8940, 0x8941, 0x8942, 0x8943, 0x8944, 0x8945, 0x8946, 0x8947, - 0x8948, 0x8949, 0x894a, 0x894b, 0x894c, 0x894d, 0x894e, 0x894f, - 0x8950, 0x8951, 0x8952, 0x8953, 0x8954, 0x8955, 0x8956, 0x8957, - 0x8958, 0x8959, 0x895a, 0x895b, 0x895c, 0x895d, 0x895e, 0x895f, - 0x8960, 0x8961, 0x8962, 0x8963, 0x8964, 0x8965, 0x8966, 0x8967, - 0x8968, 0x8969, 0x896a, 0x896b, 0x896c, 0x896d, 0x896e, 0x896f, - 0x8970, 0x8971, 0x8972, 0x8973, 0x8974, 0x8975, 0x8976, 0x8977, - 0x8978, 0x8979, 0x897a, 0x897b, 0x897c, 0x897d, 0x897e, 0x897f, - 0x8980, 0x8981, 0x8982, 0x8983, 0x8984, 0x8985, 0x8986, 0x8987, - 0x8988, 0x8989, 0x898a, 0x898b, 0x898c, 0x898d, 0x898e, 0x898f, - 0x8990, 0x8991, 0x8992, 0x8993, 0x8994, 0x8995, 0x8996, 0x8997, - 0x8998, 0x8999, 0x899a, 0x899b, 0x899c, 0x899d, 0x899e, 0x899f, - 0x89a0, 0x89a1, 0x89a2, 0x89a3, 0x89a4, 0x89a5, 0x89a6, 0x89a7, - 0x89a8, 0x89a9, 0x89aa, 0x89ab, 0x89ac, 0x89ad, 0x89ae, 0x89af, - 0x89b0, 0x89b1, 0x89b2, 0x89b3, 0x89b4, 0x89b5, 0x89b6, 0x89b7, - 0x89b8, 0x89b9, 0x89ba, 0x89bb, 0x89bc, 0x89bd, 0x89be, 0x89bf, - 0x89c0, 0x89c1, 0x89c2, 0x89c3, 0x89c4, 0x89c5, 0x89c6, 0x89c7, - 0x89c8, 0x89c9, 0x89ca, 0x89cb, 0x89cc, 0x89cd, 0x89ce, 0x89cf, - 0x89d0, 0x89d1, 0x89d2, 0x89d3, 0x89d4, 0x89d5, 0x89d6, 0x89d7, - 0x89d8, 0x89d9, 0x89da, 0x89db, 0x89dc, 0x89dd, 0x89de, 0x89df, - 0x89e0, 0x89e1, 0x89e2, 0x89e3, 0x89e4, 0x89e5, 0x89e6, 0x89e7, - 0x89e8, 0x89e9, 0x89ea, 0x89eb, 0x89ec, 0x89ed, 0x89ee, 0x89ef, - 0x89f0, 0x89f1, 0x89f2, 0x89f3, 0x89f4, 0x89f5, 0x89f6, 0x89f7, - 0x89f8, 0x89f9, 0x89fa, 0x89fb, 0x89fc, 0x89fd, 0x89fe, 0x89ff, - 0x8a00, 0x8a01, 0x8a02, 0x8a03, 0x8a04, 0x8a05, 0x8a06, 0x8a07, - 0x8a08, 0x8a09, 0x8a0a, 0x8a0b, 0x8a0c, 0x8a0d, 0x8a0e, 0x8a0f, - 0x8a10, 0x8a11, 0x8a12, 0x8a13, 0x8a14, 0x8a15, 0x8a16, 0x8a17, - 0x8a18, 0x8a19, 0x8a1a, 0x8a1b, 0x8a1c, 0x8a1d, 0x8a1e, 0x8a1f, - 0x8a20, 0x8a21, 0x8a22, 0x8a23, 0x8a24, 0x8a25, 0x8a26, 0x8a27, - 0x8a28, 0x8a29, 0x8a2a, 0x8a2b, 0x8a2c, 0x8a2d, 0x8a2e, 0x8a2f, - 0x8a30, 0x8a31, 0x8a32, 0x8a33, 0x8a34, 0x8a35, 0x8a36, 0x8a37, - 0x8a38, 0x8a39, 0x8a3a, 0x8a3b, 0x8a3c, 0x8a3d, 0x8a3e, 0x8a3f, - 0x8a40, 0x8a41, 0x8a42, 0x8a43, 0x8a44, 0x8a45, 0x8a46, 0x8a47, - 0x8a48, 0x8a49, 0x8a4a, 0x8a4b, 0x8a4c, 0x8a4d, 0x8a4e, 0x8a4f, - 0x8a50, 0x8a51, 0x8a52, 0x8a53, 0x8a54, 0x8a55, 0x8a56, 0x8a57, - 0x8a58, 0x8a59, 0x8a5a, 0x8a5b, 0x8a5c, 0x8a5d, 0x8a5e, 0x8a5f, - 0x8a60, 0x8a61, 0x8a62, 0x8a63, 0x8a64, 0x8a65, 0x8a66, 0x8a67, - 0x8a68, 0x8a69, 0x8a6a, 0x8a6b, 0x8a6c, 0x8a6d, 0x8a6e, 0x8a6f, - 0x8a70, 0x8a71, 0x8a72, 0x8a73, 0x8a74, 0x8a75, 0x8a76, 0x8a77, - 0x8a78, 0x8a79, 0x8a7a, 0x8a7b, 0x8a7c, 0x8a7d, 0x8a7e, 0x8a7f, - 0x8a80, 0x8a81, 0x8a82, 0x8a83, 0x8a84, 0x8a85, 0x8a86, 0x8a87, - 0x8a88, 0x8a89, 0x8a8a, 0x8a8b, 0x8a8c, 0x8a8d, 0x8a8e, 0x8a8f, - 0x8a90, 0x8a91, 0x8a92, 0x8a93, 0x8a94, 0x8a95, 0x8a96, 0x8a97, - 0x8a98, 0x8a99, 0x8a9a, 0x8a9b, 0x8a9c, 0x8a9d, 0x8a9e, 0x8a9f, - 0x8aa0, 0x8aa1, 0x8aa2, 0x8aa3, 0x8aa4, 0x8aa5, 0x8aa6, 0x8aa7, - 0x8aa8, 0x8aa9, 0x8aaa, 0x8aab, 0x8aac, 0x8aad, 0x8aae, 0x8aaf, - 0x8ab0, 0x8ab1, 0x8ab2, 0x8ab3, 0x8ab4, 0x8ab5, 0x8ab6, 0x8ab7, - 0x8ab8, 0x8ab9, 0x8aba, 0x8abb, 0x8abc, 0x8abd, 0x8abe, 0x8abf, - 0x8ac0, 0x8ac1, 0x8ac2, 0x8ac3, 0x8ac4, 0x8ac5, 0x8ac6, 0x8ac7, - 0x8ac8, 0x8ac9, 0x8aca, 0x8acb, 0x8acc, 0x8acd, 0x8ace, 0x8acf, - 0x8ad0, 0x8ad1, 0x8ad2, 0x8ad3, 0x8ad4, 0x8ad5, 0x8ad6, 0x8ad7, - 0x8ad8, 0x8ad9, 0x8ada, 0x8adb, 0x8adc, 0x8add, 0x8ade, 0x8adf, - 0x8ae0, 0x8ae1, 0x8ae2, 0x8ae3, 0x8ae4, 0x8ae5, 0x8ae6, 0x8ae7, - 0x8ae8, 0x8ae9, 0x8aea, 0x8aeb, 0x8aec, 0x8aed, 0x8aee, 0x8aef, - 0x8af0, 0x8af1, 0x8af2, 0x8af3, 0x8af4, 0x8af5, 0x8af6, 0x8af7, - 0x8af8, 0x8af9, 0x8afa, 0x8afb, 0x8afc, 0x8afd, 0x8afe, 0x8aff, - 0x8b00, 0x8b01, 0x8b02, 0x8b03, 0x8b04, 0x8b05, 0x8b06, 0x8b07, - 0x8b08, 0x8b09, 0x8b0a, 0x8b0b, 0x8b0c, 0x8b0d, 0x8b0e, 0x8b0f, - 0x8b10, 0x8b11, 0x8b12, 0x8b13, 0x8b14, 0x8b15, 0x8b16, 0x8b17, - 0x8b18, 0x8b19, 0x8b1a, 0x8b1b, 0x8b1c, 0x8b1d, 0x8b1e, 0x8b1f, - 0x8b20, 0x8b21, 0x8b22, 0x8b23, 0x8b24, 0x8b25, 0x8b26, 0x8b27, - 0x8b28, 0x8b29, 0x8b2a, 0x8b2b, 0x8b2c, 0x8b2d, 0x8b2e, 0x8b2f, - 0x8b30, 0x8b31, 0x8b32, 0x8b33, 0x8b34, 0x8b35, 0x8b36, 0x8b37, - 0x8b38, 0x8b39, 0x8b3a, 0x8b3b, 0x8b3c, 0x8b3d, 0x8b3e, 0x8b3f, - 0x8b40, 0x8b41, 0x8b42, 0x8b43, 0x8b44, 0x8b45, 0x8b46, 0x8b47, - 0x8b48, 0x8b49, 0x8b4a, 0x8b4b, 0x8b4c, 0x8b4d, 0x8b4e, 0x8b4f, - 0x8b50, 0x8b51, 0x8b52, 0x8b53, 0x8b54, 0x8b55, 0x8b56, 0x8b57, - 0x8b58, 0x8b59, 0x8b5a, 0x8b5b, 0x8b5c, 0x8b5d, 0x8b5e, 0x8b5f, - 0x8b60, 0x8b61, 0x8b62, 0x8b63, 0x8b64, 0x8b65, 0x8b66, 0x8b67, - 0x8b68, 0x8b69, 0x8b6a, 0x8b6b, 0x8b6c, 0x8b6d, 0x8b6e, 0x8b6f, - 0x8b70, 0x8b71, 0x8b72, 0x8b73, 0x8b74, 0x8b75, 0x8b76, 0x8b77, - 0x8b78, 0x8b79, 0x8b7a, 0x8b7b, 0x8b7c, 0x8b7d, 0x8b7e, 0x8b7f, - 0x8b80, 0x8b81, 0x8b82, 0x8b83, 0x8b84, 0x8b85, 0x8b86, 0x8b87, - 0x8b88, 0x8b89, 0x8b8a, 0x8b8b, 0x8b8c, 0x8b8d, 0x8b8e, 0x8b8f, - 0x8b90, 0x8b91, 0x8b92, 0x8b93, 0x8b94, 0x8b95, 0x8b96, 0x8b97, - 0x8b98, 0x8b99, 0x8b9a, 0x8b9b, 0x8b9c, 0x8b9d, 0x8b9e, 0x8b9f, - 0x8ba0, 0x8ba1, 0x8ba2, 0x8ba3, 0x8ba4, 0x8ba5, 0x8ba6, 0x8ba7, - 0x8ba8, 0x8ba9, 0x8baa, 0x8bab, 0x8bac, 0x8bad, 0x8bae, 0x8baf, - 0x8bb0, 0x8bb1, 0x8bb2, 0x8bb3, 0x8bb4, 0x8bb5, 0x8bb6, 0x8bb7, - 0x8bb8, 0x8bb9, 0x8bba, 0x8bbb, 0x8bbc, 0x8bbd, 0x8bbe, 0x8bbf, - 0x8bc0, 0x8bc1, 0x8bc2, 0x8bc3, 0x8bc4, 0x8bc5, 0x8bc6, 0x8bc7, - 0x8bc8, 0x8bc9, 0x8bca, 0x8bcb, 0x8bcc, 0x8bcd, 0x8bce, 0x8bcf, - 0x8bd0, 0x8bd1, 0x8bd2, 0x8bd3, 0x8bd4, 0x8bd5, 0x8bd6, 0x8bd7, - 0x8bd8, 0x8bd9, 0x8bda, 0x8bdb, 0x8bdc, 0x8bdd, 0x8bde, 0x8bdf, - 0x8be0, 0x8be1, 0x8be2, 0x8be3, 0x8be4, 0x8be5, 0x8be6, 0x8be7, - 0x8be8, 0x8be9, 0x8bea, 0x8beb, 0x8bec, 0x8bed, 0x8bee, 0x8bef, - 0x8bf0, 0x8bf1, 0x8bf2, 0x8bf3, 0x8bf4, 0x8bf5, 0x8bf6, 0x8bf7, - 0x8bf8, 0x8bf9, 0x8bfa, 0x8bfb, 0x8bfc, 0x8bfd, 0x8bfe, 0x8bff, - 0x8c00, 0x8c01, 0x8c02, 0x8c03, 0x8c04, 0x8c05, 0x8c06, 0x8c07, - 0x8c08, 0x8c09, 0x8c0a, 0x8c0b, 0x8c0c, 0x8c0d, 0x8c0e, 0x8c0f, - 0x8c10, 0x8c11, 0x8c12, 0x8c13, 0x8c14, 0x8c15, 0x8c16, 0x8c17, - 0x8c18, 0x8c19, 0x8c1a, 0x8c1b, 0x8c1c, 0x8c1d, 0x8c1e, 0x8c1f, - 0x8c20, 0x8c21, 0x8c22, 0x8c23, 0x8c24, 0x8c25, 0x8c26, 0x8c27, - 0x8c28, 0x8c29, 0x8c2a, 0x8c2b, 0x8c2c, 0x8c2d, 0x8c2e, 0x8c2f, - 0x8c30, 0x8c31, 0x8c32, 0x8c33, 0x8c34, 0x8c35, 0x8c36, 0x8c37, - 0x8c38, 0x8c39, 0x8c3a, 0x8c3b, 0x8c3c, 0x8c3d, 0x8c3e, 0x8c3f, - 0x8c40, 0x8c41, 0x8c42, 0x8c43, 0x8c44, 0x8c45, 0x8c46, 0x8c47, - 0x8c48, 0x8c49, 0x8c4a, 0x8c4b, 0x8c4c, 0x8c4d, 0x8c4e, 0x8c4f, - 0x8c50, 0x8c51, 0x8c52, 0x8c53, 0x8c54, 0x8c55, 0x8c56, 0x8c57, - 0x8c58, 0x8c59, 0x8c5a, 0x8c5b, 0x8c5c, 0x8c5d, 0x8c5e, 0x8c5f, - 0x8c60, 0x8c61, 0x8c62, 0x8c63, 0x8c64, 0x8c65, 0x8c66, 0x8c67, - 0x8c68, 0x8c69, 0x8c6a, 0x8c6b, 0x8c6c, 0x8c6d, 0x8c6e, 0x8c6f, - 0x8c70, 0x8c71, 0x8c72, 0x8c73, 0x8c74, 0x8c75, 0x8c76, 0x8c77, - 0x8c78, 0x8c79, 0x8c7a, 0x8c7b, 0x8c7c, 0x8c7d, 0x8c7e, 0x8c7f, - 0x8c80, 0x8c81, 0x8c82, 0x8c83, 0x8c84, 0x8c85, 0x8c86, 0x8c87, - 0x8c88, 0x8c89, 0x8c8a, 0x8c8b, 0x8c8c, 0x8c8d, 0x8c8e, 0x8c8f, - 0x8c90, 0x8c91, 0x8c92, 0x8c93, 0x8c94, 0x8c95, 0x8c96, 0x8c97, - 0x8c98, 0x8c99, 0x8c9a, 0x8c9b, 0x8c9c, 0x8c9d, 0x8c9e, 0x8c9f, - 0x8ca0, 0x8ca1, 0x8ca2, 0x8ca3, 0x8ca4, 0x8ca5, 0x8ca6, 0x8ca7, - 0x8ca8, 0x8ca9, 0x8caa, 0x8cab, 0x8cac, 0x8cad, 0x8cae, 0x8caf, - 0x8cb0, 0x8cb1, 0x8cb2, 0x8cb3, 0x8cb4, 0x8cb5, 0x8cb6, 0x8cb7, - 0x8cb8, 0x8cb9, 0x8cba, 0x8cbb, 0x8cbc, 0x8cbd, 0x8cbe, 0x8cbf, - 0x8cc0, 0x8cc1, 0x8cc2, 0x8cc3, 0x8cc4, 0x8cc5, 0x8cc6, 0x8cc7, - 0x8cc8, 0x8cc9, 0x8cca, 0x8ccb, 0x8ccc, 0x8ccd, 0x8cce, 0x8ccf, - 0x8cd0, 0x8cd1, 0x8cd2, 0x8cd3, 0x8cd4, 0x8cd5, 0x8cd6, 0x8cd7, - 0x8cd8, 0x8cd9, 0x8cda, 0x8cdb, 0x8cdc, 0x8cdd, 0x8cde, 0x8cdf, - 0x8ce0, 0x8ce1, 0x8ce2, 0x8ce3, 0x8ce4, 0x8ce5, 0x8ce6, 0x8ce7, - 0x8ce8, 0x8ce9, 0x8cea, 0x8ceb, 0x8cec, 0x8ced, 0x8cee, 0x8cef, - 0x8cf0, 0x8cf1, 0x8cf2, 0x8cf3, 0x8cf4, 0x8cf5, 0x8cf6, 0x8cf7, - 0x8cf8, 0x8cf9, 0x8cfa, 0x8cfb, 0x8cfc, 0x8cfd, 0x8cfe, 0x8cff, - 0x8d00, 0x8d01, 0x8d02, 0x8d03, 0x8d04, 0x8d05, 0x8d06, 0x8d07, - 0x8d08, 0x8d09, 0x8d0a, 0x8d0b, 0x8d0c, 0x8d0d, 0x8d0e, 0x8d0f, - 0x8d10, 0x8d11, 0x8d12, 0x8d13, 0x8d14, 0x8d15, 0x8d16, 0x8d17, - 0x8d18, 0x8d19, 0x8d1a, 0x8d1b, 0x8d1c, 0x8d1d, 0x8d1e, 0x8d1f, - 0x8d20, 0x8d21, 0x8d22, 0x8d23, 0x8d24, 0x8d25, 0x8d26, 0x8d27, - 0x8d28, 0x8d29, 0x8d2a, 0x8d2b, 0x8d2c, 0x8d2d, 0x8d2e, 0x8d2f, - 0x8d30, 0x8d31, 0x8d32, 0x8d33, 0x8d34, 0x8d35, 0x8d36, 0x8d37, - 0x8d38, 0x8d39, 0x8d3a, 0x8d3b, 0x8d3c, 0x8d3d, 0x8d3e, 0x8d3f, - 0x8d40, 0x8d41, 0x8d42, 0x8d43, 0x8d44, 0x8d45, 0x8d46, 0x8d47, - 0x8d48, 0x8d49, 0x8d4a, 0x8d4b, 0x8d4c, 0x8d4d, 0x8d4e, 0x8d4f, - 0x8d50, 0x8d51, 0x8d52, 0x8d53, 0x8d54, 0x8d55, 0x8d56, 0x8d57, - 0x8d58, 0x8d59, 0x8d5a, 0x8d5b, 0x8d5c, 0x8d5d, 0x8d5e, 0x8d5f, - 0x8d60, 0x8d61, 0x8d62, 0x8d63, 0x8d64, 0x8d65, 0x8d66, 0x8d67, - 0x8d68, 0x8d69, 0x8d6a, 0x8d6b, 0x8d6c, 0x8d6d, 0x8d6e, 0x8d6f, - 0x8d70, 0x8d71, 0x8d72, 0x8d73, 0x8d74, 0x8d75, 0x8d76, 0x8d77, - 0x8d78, 0x8d79, 0x8d7a, 0x8d7b, 0x8d7c, 0x8d7d, 0x8d7e, 0x8d7f, - 0x8d80, 0x8d81, 0x8d82, 0x8d83, 0x8d84, 0x8d85, 0x8d86, 0x8d87, - 0x8d88, 0x8d89, 0x8d8a, 0x8d8b, 0x8d8c, 0x8d8d, 0x8d8e, 0x8d8f, - 0x8d90, 0x8d91, 0x8d92, 0x8d93, 0x8d94, 0x8d95, 0x8d96, 0x8d97, - 0x8d98, 0x8d99, 0x8d9a, 0x8d9b, 0x8d9c, 0x8d9d, 0x8d9e, 0x8d9f, - 0x8da0, 0x8da1, 0x8da2, 0x8da3, 0x8da4, 0x8da5, 0x8da6, 0x8da7, - 0x8da8, 0x8da9, 0x8daa, 0x8dab, 0x8dac, 0x8dad, 0x8dae, 0x8daf, - 0x8db0, 0x8db1, 0x8db2, 0x8db3, 0x8db4, 0x8db5, 0x8db6, 0x8db7, - 0x8db8, 0x8db9, 0x8dba, 0x8dbb, 0x8dbc, 0x8dbd, 0x8dbe, 0x8dbf, - 0x8dc0, 0x8dc1, 0x8dc2, 0x8dc3, 0x8dc4, 0x8dc5, 0x8dc6, 0x8dc7, - 0x8dc8, 0x8dc9, 0x8dca, 0x8dcb, 0x8dcc, 0x8dcd, 0x8dce, 0x8dcf, - 0x8dd0, 0x8dd1, 0x8dd2, 0x8dd3, 0x8dd4, 0x8dd5, 0x8dd6, 0x8dd7, - 0x8dd8, 0x8dd9, 0x8dda, 0x8ddb, 0x8ddc, 0x8ddd, 0x8dde, 0x8ddf, - 0x8de0, 0x8de1, 0x8de2, 0x8de3, 0x8de4, 0x8de5, 0x8de6, 0x8de7, - 0x8de8, 0x8de9, 0x8dea, 0x8deb, 0x8dec, 0x8ded, 0x8dee, 0x8def, - 0x8df0, 0x8df1, 0x8df2, 0x8df3, 0x8df4, 0x8df5, 0x8df6, 0x8df7, - 0x8df8, 0x8df9, 0x8dfa, 0x8dfb, 0x8dfc, 0x8dfd, 0x8dfe, 0x8dff, - 0x8e00, 0x8e01, 0x8e02, 0x8e03, 0x8e04, 0x8e05, 0x8e06, 0x8e07, - 0x8e08, 0x8e09, 0x8e0a, 0x8e0b, 0x8e0c, 0x8e0d, 0x8e0e, 0x8e0f, - 0x8e10, 0x8e11, 0x8e12, 0x8e13, 0x8e14, 0x8e15, 0x8e16, 0x8e17, - 0x8e18, 0x8e19, 0x8e1a, 0x8e1b, 0x8e1c, 0x8e1d, 0x8e1e, 0x8e1f, - 0x8e20, 0x8e21, 0x8e22, 0x8e23, 0x8e24, 0x8e25, 0x8e26, 0x8e27, - 0x8e28, 0x8e29, 0x8e2a, 0x8e2b, 0x8e2c, 0x8e2d, 0x8e2e, 0x8e2f, - 0x8e30, 0x8e31, 0x8e32, 0x8e33, 0x8e34, 0x8e35, 0x8e36, 0x8e37, - 0x8e38, 0x8e39, 0x8e3a, 0x8e3b, 0x8e3c, 0x8e3d, 0x8e3e, 0x8e3f, - 0x8e40, 0x8e41, 0x8e42, 0x8e43, 0x8e44, 0x8e45, 0x8e46, 0x8e47, - 0x8e48, 0x8e49, 0x8e4a, 0x8e4b, 0x8e4c, 0x8e4d, 0x8e4e, 0x8e4f, - 0x8e50, 0x8e51, 0x8e52, 0x8e53, 0x8e54, 0x8e55, 0x8e56, 0x8e57, - 0x8e58, 0x8e59, 0x8e5a, 0x8e5b, 0x8e5c, 0x8e5d, 0x8e5e, 0x8e5f, - 0x8e60, 0x8e61, 0x8e62, 0x8e63, 0x8e64, 0x8e65, 0x8e66, 0x8e67, - 0x8e68, 0x8e69, 0x8e6a, 0x8e6b, 0x8e6c, 0x8e6d, 0x8e6e, 0x8e6f, - 0x8e70, 0x8e71, 0x8e72, 0x8e73, 0x8e74, 0x8e75, 0x8e76, 0x8e77, - 0x8e78, 0x8e79, 0x8e7a, 0x8e7b, 0x8e7c, 0x8e7d, 0x8e7e, 0x8e7f, - 0x8e80, 0x8e81, 0x8e82, 0x8e83, 0x8e84, 0x8e85, 0x8e86, 0x8e87, - 0x8e88, 0x8e89, 0x8e8a, 0x8e8b, 0x8e8c, 0x8e8d, 0x8e8e, 0x8e8f, - 0x8e90, 0x8e91, 0x8e92, 0x8e93, 0x8e94, 0x8e95, 0x8e96, 0x8e97, - 0x8e98, 0x8e99, 0x8e9a, 0x8e9b, 0x8e9c, 0x8e9d, 0x8e9e, 0x8e9f, - 0x8ea0, 0x8ea1, 0x8ea2, 0x8ea3, 0x8ea4, 0x8ea5, 0x8ea6, 0x8ea7, - 0x8ea8, 0x8ea9, 0x8eaa, 0x8eab, 0x8eac, 0x8ead, 0x8eae, 0x8eaf, - 0x8eb0, 0x8eb1, 0x8eb2, 0x8eb3, 0x8eb4, 0x8eb5, 0x8eb6, 0x8eb7, - 0x8eb8, 0x8eb9, 0x8eba, 0x8ebb, 0x8ebc, 0x8ebd, 0x8ebe, 0x8ebf, - 0x8ec0, 0x8ec1, 0x8ec2, 0x8ec3, 0x8ec4, 0x8ec5, 0x8ec6, 0x8ec7, - 0x8ec8, 0x8ec9, 0x8eca, 0x8ecb, 0x8ecc, 0x8ecd, 0x8ece, 0x8ecf, - 0x8ed0, 0x8ed1, 0x8ed2, 0x8ed3, 0x8ed4, 0x8ed5, 0x8ed6, 0x8ed7, - 0x8ed8, 0x8ed9, 0x8eda, 0x8edb, 0x8edc, 0x8edd, 0x8ede, 0x8edf, - 0x8ee0, 0x8ee1, 0x8ee2, 0x8ee3, 0x8ee4, 0x8ee5, 0x8ee6, 0x8ee7, - 0x8ee8, 0x8ee9, 0x8eea, 0x8eeb, 0x8eec, 0x8eed, 0x8eee, 0x8eef, - 0x8ef0, 0x8ef1, 0x8ef2, 0x8ef3, 0x8ef4, 0x8ef5, 0x8ef6, 0x8ef7, - 0x8ef8, 0x8ef9, 0x8efa, 0x8efb, 0x8efc, 0x8efd, 0x8efe, 0x8eff, - 0x8f00, 0x8f01, 0x8f02, 0x8f03, 0x8f04, 0x8f05, 0x8f06, 0x8f07, - 0x8f08, 0x8f09, 0x8f0a, 0x8f0b, 0x8f0c, 0x8f0d, 0x8f0e, 0x8f0f, - 0x8f10, 0x8f11, 0x8f12, 0x8f13, 0x8f14, 0x8f15, 0x8f16, 0x8f17, - 0x8f18, 0x8f19, 0x8f1a, 0x8f1b, 0x8f1c, 0x8f1d, 0x8f1e, 0x8f1f, - 0x8f20, 0x8f21, 0x8f22, 0x8f23, 0x8f24, 0x8f25, 0x8f26, 0x8f27, - 0x8f28, 0x8f29, 0x8f2a, 0x8f2b, 0x8f2c, 0x8f2d, 0x8f2e, 0x8f2f, - 0x8f30, 0x8f31, 0x8f32, 0x8f33, 0x8f34, 0x8f35, 0x8f36, 0x8f37, - 0x8f38, 0x8f39, 0x8f3a, 0x8f3b, 0x8f3c, 0x8f3d, 0x8f3e, 0x8f3f, - 0x8f40, 0x8f41, 0x8f42, 0x8f43, 0x8f44, 0x8f45, 0x8f46, 0x8f47, - 0x8f48, 0x8f49, 0x8f4a, 0x8f4b, 0x8f4c, 0x8f4d, 0x8f4e, 0x8f4f, - 0x8f50, 0x8f51, 0x8f52, 0x8f53, 0x8f54, 0x8f55, 0x8f56, 0x8f57, - 0x8f58, 0x8f59, 0x8f5a, 0x8f5b, 0x8f5c, 0x8f5d, 0x8f5e, 0x8f5f, - 0x8f60, 0x8f61, 0x8f62, 0x8f63, 0x8f64, 0x8f65, 0x8f66, 0x8f67, - 0x8f68, 0x8f69, 0x8f6a, 0x8f6b, 0x8f6c, 0x8f6d, 0x8f6e, 0x8f6f, - 0x8f70, 0x8f71, 0x8f72, 0x8f73, 0x8f74, 0x8f75, 0x8f76, 0x8f77, - 0x8f78, 0x8f79, 0x8f7a, 0x8f7b, 0x8f7c, 0x8f7d, 0x8f7e, 0x8f7f, - 0x8f80, 0x8f81, 0x8f82, 0x8f83, 0x8f84, 0x8f85, 0x8f86, 0x8f87, - 0x8f88, 0x8f89, 0x8f8a, 0x8f8b, 0x8f8c, 0x8f8d, 0x8f8e, 0x8f8f, - 0x8f90, 0x8f91, 0x8f92, 0x8f93, 0x8f94, 0x8f95, 0x8f96, 0x8f97, - 0x8f98, 0x8f99, 0x8f9a, 0x8f9b, 0x8f9c, 0x8f9d, 0x8f9e, 0x8f9f, - 0x8fa0, 0x8fa1, 0x8fa2, 0x8fa3, 0x8fa4, 0x8fa5, 0x8fa6, 0x8fa7, - 0x8fa8, 0x8fa9, 0x8faa, 0x8fab, 0x8fac, 0x8fad, 0x8fae, 0x8faf, - 0x8fb0, 0x8fb1, 0x8fb2, 0x8fb3, 0x8fb4, 0x8fb5, 0x8fb6, 0x8fb7, - 0x8fb8, 0x8fb9, 0x8fba, 0x8fbb, 0x8fbc, 0x8fbd, 0x8fbe, 0x8fbf, - 0x8fc0, 0x8fc1, 0x8fc2, 0x8fc3, 0x8fc4, 0x8fc5, 0x8fc6, 0x8fc7, - 0x8fc8, 0x8fc9, 0x8fca, 0x8fcb, 0x8fcc, 0x8fcd, 0x8fce, 0x8fcf, - 0x8fd0, 0x8fd1, 0x8fd2, 0x8fd3, 0x8fd4, 0x8fd5, 0x8fd6, 0x8fd7, - 0x8fd8, 0x8fd9, 0x8fda, 0x8fdb, 0x8fdc, 0x8fdd, 0x8fde, 0x8fdf, - 0x8fe0, 0x8fe1, 0x8fe2, 0x8fe3, 0x8fe4, 0x8fe5, 0x8fe6, 0x8fe7, - 0x8fe8, 0x8fe9, 0x8fea, 0x8feb, 0x8fec, 0x8fed, 0x8fee, 0x8fef, - 0x8ff0, 0x8ff1, 0x8ff2, 0x8ff3, 0x8ff4, 0x8ff5, 0x8ff6, 0x8ff7, - 0x8ff8, 0x8ff9, 0x8ffa, 0x8ffb, 0x8ffc, 0x8ffd, 0x8ffe, 0x8fff, - 0x9000, 0x9001, 0x9002, 0x9003, 0x9004, 0x9005, 0x9006, 0x9007, - 0x9008, 0x9009, 0x900a, 0x900b, 0x900c, 0x900d, 0x900e, 0x900f, - 0x9010, 0x9011, 0x9012, 0x9013, 0x9014, 0x9015, 0x9016, 0x9017, - 0x9018, 0x9019, 0x901a, 0x901b, 0x901c, 0x901d, 0x901e, 0x901f, - 0x9020, 0x9021, 0x9022, 0x9023, 0x9024, 0x9025, 0x9026, 0x9027, - 0x9028, 0x9029, 0x902a, 0x902b, 0x902c, 0x902d, 0x902e, 0x902f, - 0x9030, 0x9031, 0x9032, 0x9033, 0x9034, 0x9035, 0x9036, 0x9037, - 0x9038, 0x9039, 0x903a, 0x903b, 0x903c, 0x903d, 0x903e, 0x903f, - 0x9040, 0x9041, 0x9042, 0x9043, 0x9044, 0x9045, 0x9046, 0x9047, - 0x9048, 0x9049, 0x904a, 0x904b, 0x904c, 0x904d, 0x904e, 0x904f, - 0x9050, 0x9051, 0x9052, 0x9053, 0x9054, 0x9055, 0x9056, 0x9057, - 0x9058, 0x9059, 0x905a, 0x905b, 0x905c, 0x905d, 0x905e, 0x905f, - 0x9060, 0x9061, 0x9062, 0x9063, 0x9064, 0x9065, 0x9066, 0x9067, - 0x9068, 0x9069, 0x906a, 0x906b, 0x906c, 0x906d, 0x906e, 0x906f, - 0x9070, 0x9071, 0x9072, 0x9073, 0x9074, 0x9075, 0x9076, 0x9077, - 0x9078, 0x9079, 0x907a, 0x907b, 0x907c, 0x907d, 0x907e, 0x907f, - 0x9080, 0x9081, 0x9082, 0x9083, 0x9084, 0x9085, 0x9086, 0x9087, - 0x9088, 0x9089, 0x908a, 0x908b, 0x908c, 0x908d, 0x908e, 0x908f, - 0x9090, 0x9091, 0x9092, 0x9093, 0x9094, 0x9095, 0x9096, 0x9097, - 0x9098, 0x9099, 0x909a, 0x909b, 0x909c, 0x909d, 0x909e, 0x909f, - 0x90a0, 0x90a1, 0x90a2, 0x90a3, 0x90a4, 0x90a5, 0x90a6, 0x90a7, - 0x90a8, 0x90a9, 0x90aa, 0x90ab, 0x90ac, 0x90ad, 0x90ae, 0x90af, - 0x90b0, 0x90b1, 0x90b2, 0x90b3, 0x90b4, 0x90b5, 0x90b6, 0x90b7, - 0x90b8, 0x90b9, 0x90ba, 0x90bb, 0x90bc, 0x90bd, 0x90be, 0x90bf, - 0x90c0, 0x90c1, 0x90c2, 0x90c3, 0x90c4, 0x90c5, 0x90c6, 0x90c7, - 0x90c8, 0x90c9, 0x90ca, 0x90cb, 0x90cc, 0x90cd, 0x90ce, 0x90cf, - 0x90d0, 0x90d1, 0x90d2, 0x90d3, 0x90d4, 0x90d5, 0x90d6, 0x90d7, - 0x90d8, 0x90d9, 0x90da, 0x90db, 0x90dc, 0x90dd, 0x90de, 0x90df, - 0x90e0, 0x90e1, 0x90e2, 0x90e3, 0x90e4, 0x90e5, 0x90e6, 0x90e7, - 0x90e8, 0x90e9, 0x90ea, 0x90eb, 0x90ec, 0x90ed, 0x90ee, 0x90ef, - 0x90f0, 0x90f1, 0x90f2, 0x90f3, 0x90f4, 0x90f5, 0x90f6, 0x90f7, - 0x90f8, 0x90f9, 0x90fa, 0x90fb, 0x90fc, 0x90fd, 0x90fe, 0x90ff, - 0x9100, 0x9101, 0x9102, 0x9103, 0x9104, 0x9105, 0x9106, 0x9107, - 0x9108, 0x9109, 0x910a, 0x910b, 0x910c, 0x910d, 0x910e, 0x910f, - 0x9110, 0x9111, 0x9112, 0x9113, 0x9114, 0x9115, 0x9116, 0x9117, - 0x9118, 0x9119, 0x911a, 0x911b, 0x911c, 0x911d, 0x911e, 0x911f, - 0x9120, 0x9121, 0x9122, 0x9123, 0x9124, 0x9125, 0x9126, 0x9127, - 0x9128, 0x9129, 0x912a, 0x912b, 0x912c, 0x912d, 0x912e, 0x912f, - 0x9130, 0x9131, 0x9132, 0x9133, 0x9134, 0x9135, 0x9136, 0x9137, - 0x9138, 0x9139, 0x913a, 0x913b, 0x913c, 0x913d, 0x913e, 0x913f, - 0x9140, 0x9141, 0x9142, 0x9143, 0x9144, 0x9145, 0x9146, 0x9147, - 0x9148, 0x9149, 0x914a, 0x914b, 0x914c, 0x914d, 0x914e, 0x914f, - 0x9150, 0x9151, 0x9152, 0x9153, 0x9154, 0x9155, 0x9156, 0x9157, - 0x9158, 0x9159, 0x915a, 0x915b, 0x915c, 0x915d, 0x915e, 0x915f, - 0x9160, 0x9161, 0x9162, 0x9163, 0x9164, 0x9165, 0x9166, 0x9167, - 0x9168, 0x9169, 0x916a, 0x916b, 0x916c, 0x916d, 0x916e, 0x916f, - 0x9170, 0x9171, 0x9172, 0x9173, 0x9174, 0x9175, 0x9176, 0x9177, - 0x9178, 0x9179, 0x917a, 0x917b, 0x917c, 0x917d, 0x917e, 0x917f, - 0x9180, 0x9181, 0x9182, 0x9183, 0x9184, 0x9185, 0x9186, 0x9187, - 0x9188, 0x9189, 0x918a, 0x918b, 0x918c, 0x918d, 0x918e, 0x918f, - 0x9190, 0x9191, 0x9192, 0x9193, 0x9194, 0x9195, 0x9196, 0x9197, - 0x9198, 0x9199, 0x919a, 0x919b, 0x919c, 0x919d, 0x919e, 0x919f, - 0x91a0, 0x91a1, 0x91a2, 0x91a3, 0x91a4, 0x91a5, 0x91a6, 0x91a7, - 0x91a8, 0x91a9, 0x91aa, 0x91ab, 0x91ac, 0x91ad, 0x91ae, 0x91af, - 0x91b0, 0x91b1, 0x91b2, 0x91b3, 0x91b4, 0x91b5, 0x91b6, 0x91b7, - 0x91b8, 0x91b9, 0x91ba, 0x91bb, 0x91bc, 0x91bd, 0x91be, 0x91bf, - 0x91c0, 0x91c1, 0x91c2, 0x91c3, 0x91c4, 0x91c5, 0x91c6, 0x91c7, - 0x91c8, 0x91c9, 0x91ca, 0x91cb, 0x91cc, 0x91cd, 0x91ce, 0x91cf, - 0x91d0, 0x91d1, 0x91d2, 0x91d3, 0x91d4, 0x91d5, 0x91d6, 0x91d7, - 0x91d8, 0x91d9, 0x91da, 0x91db, 0x91dc, 0x91dd, 0x91de, 0x91df, - 0x91e0, 0x91e1, 0x91e2, 0x91e3, 0x91e4, 0x91e5, 0x91e6, 0x91e7, - 0x91e8, 0x91e9, 0x91ea, 0x91eb, 0x91ec, 0x91ed, 0x91ee, 0x91ef, - 0x91f0, 0x91f1, 0x91f2, 0x91f3, 0x91f4, 0x91f5, 0x91f6, 0x91f7, - 0x91f8, 0x91f9, 0x91fa, 0x91fb, 0x91fc, 0x91fd, 0x91fe, 0x91ff, - 0x9200, 0x9201, 0x9202, 0x9203, 0x9204, 0x9205, 0x9206, 0x9207, - 0x9208, 0x9209, 0x920a, 0x920b, 0x920c, 0x920d, 0x920e, 0x920f, - 0x9210, 0x9211, 0x9212, 0x9213, 0x9214, 0x9215, 0x9216, 0x9217, - 0x9218, 0x9219, 0x921a, 0x921b, 0x921c, 0x921d, 0x921e, 0x921f, - 0x9220, 0x9221, 0x9222, 0x9223, 0x9224, 0x9225, 0x9226, 0x9227, - 0x9228, 0x9229, 0x922a, 0x922b, 0x922c, 0x922d, 0x922e, 0x922f, - 0x9230, 0x9231, 0x9232, 0x9233, 0x9234, 0x9235, 0x9236, 0x9237, - 0x9238, 0x9239, 0x923a, 0x923b, 0x923c, 0x923d, 0x923e, 0x923f, - 0x9240, 0x9241, 0x9242, 0x9243, 0x9244, 0x9245, 0x9246, 0x9247, - 0x9248, 0x9249, 0x924a, 0x924b, 0x924c, 0x924d, 0x924e, 0x924f, - 0x9250, 0x9251, 0x9252, 0x9253, 0x9254, 0x9255, 0x9256, 0x9257, - 0x9258, 0x9259, 0x925a, 0x925b, 0x925c, 0x925d, 0x925e, 0x925f, - 0x9260, 0x9261, 0x9262, 0x9263, 0x9264, 0x9265, 0x9266, 0x9267, - 0x9268, 0x9269, 0x926a, 0x926b, 0x926c, 0x926d, 0x926e, 0x926f, - 0x9270, 0x9271, 0x9272, 0x9273, 0x9274, 0x9275, 0x9276, 0x9277, - 0x9278, 0x9279, 0x927a, 0x927b, 0x927c, 0x927d, 0x927e, 0x927f, - 0x9280, 0x9281, 0x9282, 0x9283, 0x9284, 0x9285, 0x9286, 0x9287, - 0x9288, 0x9289, 0x928a, 0x928b, 0x928c, 0x928d, 0x928e, 0x928f, - 0x9290, 0x9291, 0x9292, 0x9293, 0x9294, 0x9295, 0x9296, 0x9297, - 0x9298, 0x9299, 0x929a, 0x929b, 0x929c, 0x929d, 0x929e, 0x929f, - 0x92a0, 0x92a1, 0x92a2, 0x92a3, 0x92a4, 0x92a5, 0x92a6, 0x92a7, - 0x92a8, 0x92a9, 0x92aa, 0x92ab, 0x92ac, 0x92ad, 0x92ae, 0x92af, - 0x92b0, 0x92b1, 0x92b2, 0x92b3, 0x92b4, 0x92b5, 0x92b6, 0x92b7, - 0x92b8, 0x92b9, 0x92ba, 0x92bb, 0x92bc, 0x92bd, 0x92be, 0x92bf, - 0x92c0, 0x92c1, 0x92c2, 0x92c3, 0x92c4, 0x92c5, 0x92c6, 0x92c7, - 0x92c8, 0x92c9, 0x92ca, 0x92cb, 0x92cc, 0x92cd, 0x92ce, 0x92cf, - 0x92d0, 0x92d1, 0x92d2, 0x92d3, 0x92d4, 0x92d5, 0x92d6, 0x92d7, - 0x92d8, 0x92d9, 0x92da, 0x92db, 0x92dc, 0x92dd, 0x92de, 0x92df, - 0x92e0, 0x92e1, 0x92e2, 0x92e3, 0x92e4, 0x92e5, 0x92e6, 0x92e7, - 0x92e8, 0x92e9, 0x92ea, 0x92eb, 0x92ec, 0x92ed, 0x92ee, 0x92ef, - 0x92f0, 0x92f1, 0x92f2, 0x92f3, 0x92f4, 0x92f5, 0x92f6, 0x92f7, - 0x92f8, 0x92f9, 0x92fa, 0x92fb, 0x92fc, 0x92fd, 0x92fe, 0x92ff, - 0x9300, 0x9301, 0x9302, 0x9303, 0x9304, 0x9305, 0x9306, 0x9307, - 0x9308, 0x9309, 0x930a, 0x930b, 0x930c, 0x930d, 0x930e, 0x930f, - 0x9310, 0x9311, 0x9312, 0x9313, 0x9314, 0x9315, 0x9316, 0x9317, - 0x9318, 0x9319, 0x931a, 0x931b, 0x931c, 0x931d, 0x931e, 0x931f, - 0x9320, 0x9321, 0x9322, 0x9323, 0x9324, 0x9325, 0x9326, 0x9327, - 0x9328, 0x9329, 0x932a, 0x932b, 0x932c, 0x932d, 0x932e, 0x932f, - 0x9330, 0x9331, 0x9332, 0x9333, 0x9334, 0x9335, 0x9336, 0x9337, - 0x9338, 0x9339, 0x933a, 0x933b, 0x933c, 0x933d, 0x933e, 0x933f, - 0x9340, 0x9341, 0x9342, 0x9343, 0x9344, 0x9345, 0x9346, 0x9347, - 0x9348, 0x9349, 0x934a, 0x934b, 0x934c, 0x934d, 0x934e, 0x934f, - 0x9350, 0x9351, 0x9352, 0x9353, 0x9354, 0x9355, 0x9356, 0x9357, - 0x9358, 0x9359, 0x935a, 0x935b, 0x935c, 0x935d, 0x935e, 0x935f, - 0x9360, 0x9361, 0x9362, 0x9363, 0x9364, 0x9365, 0x9366, 0x9367, - 0x9368, 0x9369, 0x936a, 0x936b, 0x936c, 0x936d, 0x936e, 0x936f, - 0x9370, 0x9371, 0x9372, 0x9373, 0x9374, 0x9375, 0x9376, 0x9377, - 0x9378, 0x9379, 0x937a, 0x937b, 0x937c, 0x937d, 0x937e, 0x937f, - 0x9380, 0x9381, 0x9382, 0x9383, 0x9384, 0x9385, 0x9386, 0x9387, - 0x9388, 0x9389, 0x938a, 0x938b, 0x938c, 0x938d, 0x938e, 0x938f, - 0x9390, 0x9391, 0x9392, 0x9393, 0x9394, 0x9395, 0x9396, 0x9397, - 0x9398, 0x9399, 0x939a, 0x939b, 0x939c, 0x939d, 0x939e, 0x939f, - 0x93a0, 0x93a1, 0x93a2, 0x93a3, 0x93a4, 0x93a5, 0x93a6, 0x93a7, - 0x93a8, 0x93a9, 0x93aa, 0x93ab, 0x93ac, 0x93ad, 0x93ae, 0x93af, - 0x93b0, 0x93b1, 0x93b2, 0x93b3, 0x93b4, 0x93b5, 0x93b6, 0x93b7, - 0x93b8, 0x93b9, 0x93ba, 0x93bb, 0x93bc, 0x93bd, 0x93be, 0x93bf, - 0x93c0, 0x93c1, 0x93c2, 0x93c3, 0x93c4, 0x93c5, 0x93c6, 0x93c7, - 0x93c8, 0x93c9, 0x93ca, 0x93cb, 0x93cc, 0x93cd, 0x93ce, 0x93cf, - 0x93d0, 0x93d1, 0x93d2, 0x93d3, 0x93d4, 0x93d5, 0x93d6, 0x93d7, - 0x93d8, 0x93d9, 0x93da, 0x93db, 0x93dc, 0x93dd, 0x93de, 0x93df, - 0x93e0, 0x93e1, 0x93e2, 0x93e3, 0x93e4, 0x93e5, 0x93e6, 0x93e7, - 0x93e8, 0x93e9, 0x93ea, 0x93eb, 0x93ec, 0x93ed, 0x93ee, 0x93ef, - 0x93f0, 0x93f1, 0x93f2, 0x93f3, 0x93f4, 0x93f5, 0x93f6, 0x93f7, - 0x93f8, 0x93f9, 0x93fa, 0x93fb, 0x93fc, 0x93fd, 0x93fe, 0x93ff, - 0x9400, 0x9401, 0x9402, 0x9403, 0x9404, 0x9405, 0x9406, 0x9407, - 0x9408, 0x9409, 0x940a, 0x940b, 0x940c, 0x940d, 0x940e, 0x940f, - 0x9410, 0x9411, 0x9412, 0x9413, 0x9414, 0x9415, 0x9416, 0x9417, - 0x9418, 0x9419, 0x941a, 0x941b, 0x941c, 0x941d, 0x941e, 0x941f, - 0x9420, 0x9421, 0x9422, 0x9423, 0x9424, 0x9425, 0x9426, 0x9427, - 0x9428, 0x9429, 0x942a, 0x942b, 0x942c, 0x942d, 0x942e, 0x942f, - 0x9430, 0x9431, 0x9432, 0x9433, 0x9434, 0x9435, 0x9436, 0x9437, - 0x9438, 0x9439, 0x943a, 0x943b, 0x943c, 0x943d, 0x943e, 0x943f, - 0x9440, 0x9441, 0x9442, 0x9443, 0x9444, 0x9445, 0x9446, 0x9447, - 0x9448, 0x9449, 0x944a, 0x944b, 0x944c, 0x944d, 0x944e, 0x944f, - 0x9450, 0x9451, 0x9452, 0x9453, 0x9454, 0x9455, 0x9456, 0x9457, - 0x9458, 0x9459, 0x945a, 0x945b, 0x945c, 0x945d, 0x945e, 0x945f, - 0x9460, 0x9461, 0x9462, 0x9463, 0x9464, 0x9465, 0x9466, 0x9467, - 0x9468, 0x9469, 0x946a, 0x946b, 0x946c, 0x946d, 0x946e, 0x946f, - 0x9470, 0x9471, 0x9472, 0x9473, 0x9474, 0x9475, 0x9476, 0x9477, - 0x9478, 0x9479, 0x947a, 0x947b, 0x947c, 0x947d, 0x947e, 0x947f, - 0x9480, 0x9481, 0x9482, 0x9483, 0x9484, 0x9485, 0x9486, 0x9487, - 0x9488, 0x9489, 0x948a, 0x948b, 0x948c, 0x948d, 0x948e, 0x948f, - 0x9490, 0x9491, 0x9492, 0x9493, 0x9494, 0x9495, 0x9496, 0x9497, - 0x9498, 0x9499, 0x949a, 0x949b, 0x949c, 0x949d, 0x949e, 0x949f, - 0x94a0, 0x94a1, 0x94a2, 0x94a3, 0x94a4, 0x94a5, 0x94a6, 0x94a7, - 0x94a8, 0x94a9, 0x94aa, 0x94ab, 0x94ac, 0x94ad, 0x94ae, 0x94af, - 0x94b0, 0x94b1, 0x94b2, 0x94b3, 0x94b4, 0x94b5, 0x94b6, 0x94b7, - 0x94b8, 0x94b9, 0x94ba, 0x94bb, 0x94bc, 0x94bd, 0x94be, 0x94bf, - 0x94c0, 0x94c1, 0x94c2, 0x94c3, 0x94c4, 0x94c5, 0x94c6, 0x94c7, - 0x94c8, 0x94c9, 0x94ca, 0x94cb, 0x94cc, 0x94cd, 0x94ce, 0x94cf, - 0x94d0, 0x94d1, 0x94d2, 0x94d3, 0x94d4, 0x94d5, 0x94d6, 0x94d7, - 0x94d8, 0x94d9, 0x94da, 0x94db, 0x94dc, 0x94dd, 0x94de, 0x94df, - 0x94e0, 0x94e1, 0x94e2, 0x94e3, 0x94e4, 0x94e5, 0x94e6, 0x94e7, - 0x94e8, 0x94e9, 0x94ea, 0x94eb, 0x94ec, 0x94ed, 0x94ee, 0x94ef, - 0x94f0, 0x94f1, 0x94f2, 0x94f3, 0x94f4, 0x94f5, 0x94f6, 0x94f7, - 0x94f8, 0x94f9, 0x94fa, 0x94fb, 0x94fc, 0x94fd, 0x94fe, 0x94ff, - 0x9500, 0x9501, 0x9502, 0x9503, 0x9504, 0x9505, 0x9506, 0x9507, - 0x9508, 0x9509, 0x950a, 0x950b, 0x950c, 0x950d, 0x950e, 0x950f, - 0x9510, 0x9511, 0x9512, 0x9513, 0x9514, 0x9515, 0x9516, 0x9517, - 0x9518, 0x9519, 0x951a, 0x951b, 0x951c, 0x951d, 0x951e, 0x951f, - 0x9520, 0x9521, 0x9522, 0x9523, 0x9524, 0x9525, 0x9526, 0x9527, - 0x9528, 0x9529, 0x952a, 0x952b, 0x952c, 0x952d, 0x952e, 0x952f, - 0x9530, 0x9531, 0x9532, 0x9533, 0x9534, 0x9535, 0x9536, 0x9537, - 0x9538, 0x9539, 0x953a, 0x953b, 0x953c, 0x953d, 0x953e, 0x953f, - 0x9540, 0x9541, 0x9542, 0x9543, 0x9544, 0x9545, 0x9546, 0x9547, - 0x9548, 0x9549, 0x954a, 0x954b, 0x954c, 0x954d, 0x954e, 0x954f, - 0x9550, 0x9551, 0x9552, 0x9553, 0x9554, 0x9555, 0x9556, 0x9557, - 0x9558, 0x9559, 0x955a, 0x955b, 0x955c, 0x955d, 0x955e, 0x955f, - 0x9560, 0x9561, 0x9562, 0x9563, 0x9564, 0x9565, 0x9566, 0x9567, - 0x9568, 0x9569, 0x956a, 0x956b, 0x956c, 0x956d, 0x956e, 0x956f, - 0x9570, 0x9571, 0x9572, 0x9573, 0x9574, 0x9575, 0x9576, 0x9577, - 0x9578, 0x9579, 0x957a, 0x957b, 0x957c, 0x957d, 0x957e, 0x957f, - 0x9580, 0x9581, 0x9582, 0x9583, 0x9584, 0x9585, 0x9586, 0x9587, - 0x9588, 0x9589, 0x958a, 0x958b, 0x958c, 0x958d, 0x958e, 0x958f, - 0x9590, 0x9591, 0x9592, 0x9593, 0x9594, 0x9595, 0x9596, 0x9597, - 0x9598, 0x9599, 0x959a, 0x959b, 0x959c, 0x959d, 0x959e, 0x959f, - 0x95a0, 0x95a1, 0x95a2, 0x95a3, 0x95a4, 0x95a5, 0x95a6, 0x95a7, - 0x95a8, 0x95a9, 0x95aa, 0x95ab, 0x95ac, 0x95ad, 0x95ae, 0x95af, - 0x95b0, 0x95b1, 0x95b2, 0x95b3, 0x95b4, 0x95b5, 0x95b6, 0x95b7, - 0x95b8, 0x95b9, 0x95ba, 0x95bb, 0x95bc, 0x95bd, 0x95be, 0x95bf, - 0x95c0, 0x95c1, 0x95c2, 0x95c3, 0x95c4, 0x95c5, 0x95c6, 0x95c7, - 0x95c8, 0x95c9, 0x95ca, 0x95cb, 0x95cc, 0x95cd, 0x95ce, 0x95cf, - 0x95d0, 0x95d1, 0x95d2, 0x95d3, 0x95d4, 0x95d5, 0x95d6, 0x95d7, - 0x95d8, 0x95d9, 0x95da, 0x95db, 0x95dc, 0x95dd, 0x95de, 0x95df, - 0x95e0, 0x95e1, 0x95e2, 0x95e3, 0x95e4, 0x95e5, 0x95e6, 0x95e7, - 0x95e8, 0x95e9, 0x95ea, 0x95eb, 0x95ec, 0x95ed, 0x95ee, 0x95ef, - 0x95f0, 0x95f1, 0x95f2, 0x95f3, 0x95f4, 0x95f5, 0x95f6, 0x95f7, - 0x95f8, 0x95f9, 0x95fa, 0x95fb, 0x95fc, 0x95fd, 0x95fe, 0x95ff, - 0x9600, 0x9601, 0x9602, 0x9603, 0x9604, 0x9605, 0x9606, 0x9607, - 0x9608, 0x9609, 0x960a, 0x960b, 0x960c, 0x960d, 0x960e, 0x960f, - 0x9610, 0x9611, 0x9612, 0x9613, 0x9614, 0x9615, 0x9616, 0x9617, - 0x9618, 0x9619, 0x961a, 0x961b, 0x961c, 0x961d, 0x961e, 0x961f, - 0x9620, 0x9621, 0x9622, 0x9623, 0x9624, 0x9625, 0x9626, 0x9627, - 0x9628, 0x9629, 0x962a, 0x962b, 0x962c, 0x962d, 0x962e, 0x962f, - 0x9630, 0x9631, 0x9632, 0x9633, 0x9634, 0x9635, 0x9636, 0x9637, - 0x9638, 0x9639, 0x963a, 0x963b, 0x963c, 0x963d, 0x963e, 0x963f, - 0x9640, 0x9641, 0x9642, 0x9643, 0x9644, 0x9645, 0x9646, 0x9647, - 0x9648, 0x9649, 0x964a, 0x964b, 0x964c, 0x964d, 0x964e, 0x964f, - 0x9650, 0x9651, 0x9652, 0x9653, 0x9654, 0x9655, 0x9656, 0x9657, - 0x9658, 0x9659, 0x965a, 0x965b, 0x965c, 0x965d, 0x965e, 0x965f, - 0x9660, 0x9661, 0x9662, 0x9663, 0x9664, 0x9665, 0x9666, 0x9667, - 0x9668, 0x9669, 0x966a, 0x966b, 0x966c, 0x966d, 0x966e, 0x966f, - 0x9670, 0x9671, 0x9672, 0x9673, 0x9674, 0x9675, 0x9676, 0x9677, - 0x9678, 0x9679, 0x967a, 0x967b, 0x967c, 0x967d, 0x967e, 0x967f, - 0x9680, 0x9681, 0x9682, 0x9683, 0x9684, 0x9685, 0x9686, 0x9687, - 0x9688, 0x9689, 0x968a, 0x968b, 0x968c, 0x968d, 0x968e, 0x968f, - 0x9690, 0x9691, 0x9692, 0x9693, 0x9694, 0x9695, 0x9696, 0x9697, - 0x9698, 0x9699, 0x969a, 0x969b, 0x969c, 0x969d, 0x969e, 0x969f, - 0x96a0, 0x96a1, 0x96a2, 0x96a3, 0x96a4, 0x96a5, 0x96a6, 0x96a7, - 0x96a8, 0x96a9, 0x96aa, 0x96ab, 0x96ac, 0x96ad, 0x96ae, 0x96af, - 0x96b0, 0x96b1, 0x96b2, 0x96b3, 0x96b4, 0x96b5, 0x96b6, 0x96b7, - 0x96b8, 0x96b9, 0x96ba, 0x96bb, 0x96bc, 0x96bd, 0x96be, 0x96bf, - 0x96c0, 0x96c1, 0x96c2, 0x96c3, 0x96c4, 0x96c5, 0x96c6, 0x96c7, - 0x96c8, 0x96c9, 0x96ca, 0x96cb, 0x96cc, 0x96cd, 0x96ce, 0x96cf, - 0x96d0, 0x96d1, 0x96d2, 0x96d3, 0x96d4, 0x96d5, 0x96d6, 0x96d7, - 0x96d8, 0x96d9, 0x96da, 0x96db, 0x96dc, 0x96dd, 0x96de, 0x96df, - 0x96e0, 0x96e1, 0x96e2, 0x96e3, 0x96e4, 0x96e5, 0x96e6, 0x96e7, - 0x96e8, 0x96e9, 0x96ea, 0x96eb, 0x96ec, 0x96ed, 0x96ee, 0x96ef, - 0x96f0, 0x96f1, 0x96f2, 0x96f3, 0x96f4, 0x96f5, 0x96f6, 0x96f7, - 0x96f8, 0x96f9, 0x96fa, 0x96fb, 0x96fc, 0x96fd, 0x96fe, 0x96ff, - 0x9700, 0x9701, 0x9702, 0x9703, 0x9704, 0x9705, 0x9706, 0x9707, - 0x9708, 0x9709, 0x970a, 0x970b, 0x970c, 0x970d, 0x970e, 0x970f, - 0x9710, 0x9711, 0x9712, 0x9713, 0x9714, 0x9715, 0x9716, 0x9717, - 0x9718, 0x9719, 0x971a, 0x971b, 0x971c, 0x971d, 0x971e, 0x971f, - 0x9720, 0x9721, 0x9722, 0x9723, 0x9724, 0x9725, 0x9726, 0x9727, - 0x9728, 0x9729, 0x972a, 0x972b, 0x972c, 0x972d, 0x972e, 0x972f, - 0x9730, 0x9731, 0x9732, 0x9733, 0x9734, 0x9735, 0x9736, 0x9737, - 0x9738, 0x9739, 0x973a, 0x973b, 0x973c, 0x973d, 0x973e, 0x973f, - 0x9740, 0x9741, 0x9742, 0x9743, 0x9744, 0x9745, 0x9746, 0x9747, - 0x9748, 0x9749, 0x974a, 0x974b, 0x974c, 0x974d, 0x974e, 0x974f, - 0x9750, 0x9751, 0x9752, 0x9753, 0x9754, 0x9755, 0x9756, 0x9757, - 0x9758, 0x9759, 0x975a, 0x975b, 0x975c, 0x975d, 0x975e, 0x975f, - 0x9760, 0x9761, 0x9762, 0x9763, 0x9764, 0x9765, 0x9766, 0x9767, - 0x9768, 0x9769, 0x976a, 0x976b, 0x976c, 0x976d, 0x976e, 0x976f, - 0x9770, 0x9771, 0x9772, 0x9773, 0x9774, 0x9775, 0x9776, 0x9777, - 0x9778, 0x9779, 0x977a, 0x977b, 0x977c, 0x977d, 0x977e, 0x977f, - 0x9780, 0x9781, 0x9782, 0x9783, 0x9784, 0x9785, 0x9786, 0x9787, - 0x9788, 0x9789, 0x978a, 0x978b, 0x978c, 0x978d, 0x978e, 0x978f, - 0x9790, 0x9791, 0x9792, 0x9793, 0x9794, 0x9795, 0x9796, 0x9797, - 0x9798, 0x9799, 0x979a, 0x979b, 0x979c, 0x979d, 0x979e, 0x979f, - 0x97a0, 0x97a1, 0x97a2, 0x97a3, 0x97a4, 0x97a5, 0x97a6, 0x97a7, - 0x97a8, 0x97a9, 0x97aa, 0x97ab, 0x97ac, 0x97ad, 0x97ae, 0x97af, - 0x97b0, 0x97b1, 0x97b2, 0x97b3, 0x97b4, 0x97b5, 0x97b6, 0x97b7, - 0x97b8, 0x97b9, 0x97ba, 0x97bb, 0x97bc, 0x97bd, 0x97be, 0x97bf, - 0x97c0, 0x97c1, 0x97c2, 0x97c3, 0x97c4, 0x97c5, 0x97c6, 0x97c7, - 0x97c8, 0x97c9, 0x97ca, 0x97cb, 0x97cc, 0x97cd, 0x97ce, 0x97cf, - 0x97d0, 0x97d1, 0x97d2, 0x97d3, 0x97d4, 0x97d5, 0x97d6, 0x97d7, - 0x97d8, 0x97d9, 0x97da, 0x97db, 0x97dc, 0x97dd, 0x97de, 0x97df, - 0x97e0, 0x97e1, 0x97e2, 0x97e3, 0x97e4, 0x97e5, 0x97e6, 0x97e7, - 0x97e8, 0x97e9, 0x97ea, 0x97eb, 0x97ec, 0x97ed, 0x97ee, 0x97ef, - 0x97f0, 0x97f1, 0x97f2, 0x97f3, 0x97f4, 0x97f5, 0x97f6, 0x97f7, - 0x97f8, 0x97f9, 0x97fa, 0x97fb, 0x97fc, 0x97fd, 0x97fe, 0x97ff, - 0x9800, 0x9801, 0x9802, 0x9803, 0x9804, 0x9805, 0x9806, 0x9807, - 0x9808, 0x9809, 0x980a, 0x980b, 0x980c, 0x980d, 0x980e, 0x980f, - 0x9810, 0x9811, 0x9812, 0x9813, 0x9814, 0x9815, 0x9816, 0x9817, - 0x9818, 0x9819, 0x981a, 0x981b, 0x981c, 0x981d, 0x981e, 0x981f, - 0x9820, 0x9821, 0x9822, 0x9823, 0x9824, 0x9825, 0x9826, 0x9827, - 0x9828, 0x9829, 0x982a, 0x982b, 0x982c, 0x982d, 0x982e, 0x982f, - 0x9830, 0x9831, 0x9832, 0x9833, 0x9834, 0x9835, 0x9836, 0x9837, - 0x9838, 0x9839, 0x983a, 0x983b, 0x983c, 0x983d, 0x983e, 0x983f, - 0x9840, 0x9841, 0x9842, 0x9843, 0x9844, 0x9845, 0x9846, 0x9847, - 0x9848, 0x9849, 0x984a, 0x984b, 0x984c, 0x984d, 0x984e, 0x984f, - 0x9850, 0x9851, 0x9852, 0x9853, 0x9854, 0x9855, 0x9856, 0x9857, - 0x9858, 0x9859, 0x985a, 0x985b, 0x985c, 0x985d, 0x985e, 0x985f, - 0x9860, 0x9861, 0x9862, 0x9863, 0x9864, 0x9865, 0x9866, 0x9867, - 0x9868, 0x9869, 0x986a, 0x986b, 0x986c, 0x986d, 0x986e, 0x986f, - 0x9870, 0x9871, 0x9872, 0x9873, 0x9874, 0x9875, 0x9876, 0x9877, - 0x9878, 0x9879, 0x987a, 0x987b, 0x987c, 0x987d, 0x987e, 0x987f, - 0x9880, 0x9881, 0x9882, 0x9883, 0x9884, 0x9885, 0x9886, 0x9887, - 0x9888, 0x9889, 0x988a, 0x988b, 0x988c, 0x988d, 0x988e, 0x988f, - 0x9890, 0x9891, 0x9892, 0x9893, 0x9894, 0x9895, 0x9896, 0x9897, - 0x9898, 0x9899, 0x989a, 0x989b, 0x989c, 0x989d, 0x989e, 0x989f, - 0x98a0, 0x98a1, 0x98a2, 0x98a3, 0x98a4, 0x98a5, 0x98a6, 0x98a7, - 0x98a8, 0x98a9, 0x98aa, 0x98ab, 0x98ac, 0x98ad, 0x98ae, 0x98af, - 0x98b0, 0x98b1, 0x98b2, 0x98b3, 0x98b4, 0x98b5, 0x98b6, 0x98b7, - 0x98b8, 0x98b9, 0x98ba, 0x98bb, 0x98bc, 0x98bd, 0x98be, 0x98bf, - 0x98c0, 0x98c1, 0x98c2, 0x98c3, 0x98c4, 0x98c5, 0x98c6, 0x98c7, - 0x98c8, 0x98c9, 0x98ca, 0x98cb, 0x98cc, 0x98cd, 0x98ce, 0x98cf, - 0x98d0, 0x98d1, 0x98d2, 0x98d3, 0x98d4, 0x98d5, 0x98d6, 0x98d7, - 0x98d8, 0x98d9, 0x98da, 0x98db, 0x98dc, 0x98dd, 0x98de, 0x98df, - 0x98e0, 0x98e1, 0x98e2, 0x98e3, 0x98e4, 0x98e5, 0x98e6, 0x98e7, - 0x98e8, 0x98e9, 0x98ea, 0x98eb, 0x98ec, 0x98ed, 0x98ee, 0x98ef, - 0x98f0, 0x98f1, 0x98f2, 0x98f3, 0x98f4, 0x98f5, 0x98f6, 0x98f7, - 0x98f8, 0x98f9, 0x98fa, 0x98fb, 0x98fc, 0x98fd, 0x98fe, 0x98ff, - 0x9900, 0x9901, 0x9902, 0x9903, 0x9904, 0x9905, 0x9906, 0x9907, - 0x9908, 0x9909, 0x990a, 0x990b, 0x990c, 0x990d, 0x990e, 0x990f, - 0x9910, 0x9911, 0x9912, 0x9913, 0x9914, 0x9915, 0x9916, 0x9917, - 0x9918, 0x9919, 0x991a, 0x991b, 0x991c, 0x991d, 0x991e, 0x991f, - 0x9920, 0x9921, 0x9922, 0x9923, 0x9924, 0x9925, 0x9926, 0x9927, - 0x9928, 0x9929, 0x992a, 0x992b, 0x992c, 0x992d, 0x992e, 0x992f, - 0x9930, 0x9931, 0x9932, 0x9933, 0x9934, 0x9935, 0x9936, 0x9937, - 0x9938, 0x9939, 0x993a, 0x993b, 0x993c, 0x993d, 0x993e, 0x993f, - 0x9940, 0x9941, 0x9942, 0x9943, 0x9944, 0x9945, 0x9946, 0x9947, - 0x9948, 0x9949, 0x994a, 0x994b, 0x994c, 0x994d, 0x994e, 0x994f, - 0x9950, 0x9951, 0x9952, 0x9953, 0x9954, 0x9955, 0x9956, 0x9957, - 0x9958, 0x9959, 0x995a, 0x995b, 0x995c, 0x995d, 0x995e, 0x995f, - 0x9960, 0x9961, 0x9962, 0x9963, 0x9964, 0x9965, 0x9966, 0x9967, - 0x9968, 0x9969, 0x996a, 0x996b, 0x996c, 0x996d, 0x996e, 0x996f, - 0x9970, 0x9971, 0x9972, 0x9973, 0x9974, 0x9975, 0x9976, 0x9977, - 0x9978, 0x9979, 0x997a, 0x997b, 0x997c, 0x997d, 0x997e, 0x997f, - 0x9980, 0x9981, 0x9982, 0x9983, 0x9984, 0x9985, 0x9986, 0x9987, - 0x9988, 0x9989, 0x998a, 0x998b, 0x998c, 0x998d, 0x998e, 0x998f, - 0x9990, 0x9991, 0x9992, 0x9993, 0x9994, 0x9995, 0x9996, 0x9997, - 0x9998, 0x9999, 0x999a, 0x999b, 0x999c, 0x999d, 0x999e, 0x999f, - 0x99a0, 0x99a1, 0x99a2, 0x99a3, 0x99a4, 0x99a5, 0x99a6, 0x99a7, - 0x99a8, 0x99a9, 0x99aa, 0x99ab, 0x99ac, 0x99ad, 0x99ae, 0x99af, - 0x99b0, 0x99b1, 0x99b2, 0x99b3, 0x99b4, 0x99b5, 0x99b6, 0x99b7, - 0x99b8, 0x99b9, 0x99ba, 0x99bb, 0x99bc, 0x99bd, 0x99be, 0x99bf, - 0x99c0, 0x99c1, 0x99c2, 0x99c3, 0x99c4, 0x99c5, 0x99c6, 0x99c7, - 0x99c8, 0x99c9, 0x99ca, 0x99cb, 0x99cc, 0x99cd, 0x99ce, 0x99cf, - 0x99d0, 0x99d1, 0x99d2, 0x99d3, 0x99d4, 0x99d5, 0x99d6, 0x99d7, - 0x99d8, 0x99d9, 0x99da, 0x99db, 0x99dc, 0x99dd, 0x99de, 0x99df, - 0x99e0, 0x99e1, 0x99e2, 0x99e3, 0x99e4, 0x99e5, 0x99e6, 0x99e7, - 0x99e8, 0x99e9, 0x99ea, 0x99eb, 0x99ec, 0x99ed, 0x99ee, 0x99ef, - 0x99f0, 0x99f1, 0x99f2, 0x99f3, 0x99f4, 0x99f5, 0x99f6, 0x99f7, - 0x99f8, 0x99f9, 0x99fa, 0x99fb, 0x99fc, 0x99fd, 0x99fe, 0x99ff, - 0x9a00, 0x9a01, 0x9a02, 0x9a03, 0x9a04, 0x9a05, 0x9a06, 0x9a07, - 0x9a08, 0x9a09, 0x9a0a, 0x9a0b, 0x9a0c, 0x9a0d, 0x9a0e, 0x9a0f, - 0x9a10, 0x9a11, 0x9a12, 0x9a13, 0x9a14, 0x9a15, 0x9a16, 0x9a17, - 0x9a18, 0x9a19, 0x9a1a, 0x9a1b, 0x9a1c, 0x9a1d, 0x9a1e, 0x9a1f, - 0x9a20, 0x9a21, 0x9a22, 0x9a23, 0x9a24, 0x9a25, 0x9a26, 0x9a27, - 0x9a28, 0x9a29, 0x9a2a, 0x9a2b, 0x9a2c, 0x9a2d, 0x9a2e, 0x9a2f, - 0x9a30, 0x9a31, 0x9a32, 0x9a33, 0x9a34, 0x9a35, 0x9a36, 0x9a37, - 0x9a38, 0x9a39, 0x9a3a, 0x9a3b, 0x9a3c, 0x9a3d, 0x9a3e, 0x9a3f, - 0x9a40, 0x9a41, 0x9a42, 0x9a43, 0x9a44, 0x9a45, 0x9a46, 0x9a47, - 0x9a48, 0x9a49, 0x9a4a, 0x9a4b, 0x9a4c, 0x9a4d, 0x9a4e, 0x9a4f, - 0x9a50, 0x9a51, 0x9a52, 0x9a53, 0x9a54, 0x9a55, 0x9a56, 0x9a57, - 0x9a58, 0x9a59, 0x9a5a, 0x9a5b, 0x9a5c, 0x9a5d, 0x9a5e, 0x9a5f, - 0x9a60, 0x9a61, 0x9a62, 0x9a63, 0x9a64, 0x9a65, 0x9a66, 0x9a67, - 0x9a68, 0x9a69, 0x9a6a, 0x9a6b, 0x9a6c, 0x9a6d, 0x9a6e, 0x9a6f, - 0x9a70, 0x9a71, 0x9a72, 0x9a73, 0x9a74, 0x9a75, 0x9a76, 0x9a77, - 0x9a78, 0x9a79, 0x9a7a, 0x9a7b, 0x9a7c, 0x9a7d, 0x9a7e, 0x9a7f, - 0x9a80, 0x9a81, 0x9a82, 0x9a83, 0x9a84, 0x9a85, 0x9a86, 0x9a87, - 0x9a88, 0x9a89, 0x9a8a, 0x9a8b, 0x9a8c, 0x9a8d, 0x9a8e, 0x9a8f, - 0x9a90, 0x9a91, 0x9a92, 0x9a93, 0x9a94, 0x9a95, 0x9a96, 0x9a97, - 0x9a98, 0x9a99, 0x9a9a, 0x9a9b, 0x9a9c, 0x9a9d, 0x9a9e, 0x9a9f, - 0x9aa0, 0x9aa1, 0x9aa2, 0x9aa3, 0x9aa4, 0x9aa5, 0x9aa6, 0x9aa7, - 0x9aa8, 0x9aa9, 0x9aaa, 0x9aab, 0x9aac, 0x9aad, 0x9aae, 0x9aaf, - 0x9ab0, 0x9ab1, 0x9ab2, 0x9ab3, 0x9ab4, 0x9ab5, 0x9ab6, 0x9ab7, - 0x9ab8, 0x9ab9, 0x9aba, 0x9abb, 0x9abc, 0x9abd, 0x9abe, 0x9abf, - 0x9ac0, 0x9ac1, 0x9ac2, 0x9ac3, 0x9ac4, 0x9ac5, 0x9ac6, 0x9ac7, - 0x9ac8, 0x9ac9, 0x9aca, 0x9acb, 0x9acc, 0x9acd, 0x9ace, 0x9acf, - 0x9ad0, 0x9ad1, 0x9ad2, 0x9ad3, 0x9ad4, 0x9ad5, 0x9ad6, 0x9ad7, - 0x9ad8, 0x9ad9, 0x9ada, 0x9adb, 0x9adc, 0x9add, 0x9ade, 0x9adf, - 0x9ae0, 0x9ae1, 0x9ae2, 0x9ae3, 0x9ae4, 0x9ae5, 0x9ae6, 0x9ae7, - 0x9ae8, 0x9ae9, 0x9aea, 0x9aeb, 0x9aec, 0x9aed, 0x9aee, 0x9aef, - 0x9af0, 0x9af1, 0x9af2, 0x9af3, 0x9af4, 0x9af5, 0x9af6, 0x9af7, - 0x9af8, 0x9af9, 0x9afa, 0x9afb, 0x9afc, 0x9afd, 0x9afe, 0x9aff, - 0x9b00, 0x9b01, 0x9b02, 0x9b03, 0x9b04, 0x9b05, 0x9b06, 0x9b07, - 0x9b08, 0x9b09, 0x9b0a, 0x9b0b, 0x9b0c, 0x9b0d, 0x9b0e, 0x9b0f, - 0x9b10, 0x9b11, 0x9b12, 0x9b13, 0x9b14, 0x9b15, 0x9b16, 0x9b17, - 0x9b18, 0x9b19, 0x9b1a, 0x9b1b, 0x9b1c, 0x9b1d, 0x9b1e, 0x9b1f, - 0x9b20, 0x9b21, 0x9b22, 0x9b23, 0x9b24, 0x9b25, 0x9b26, 0x9b27, - 0x9b28, 0x9b29, 0x9b2a, 0x9b2b, 0x9b2c, 0x9b2d, 0x9b2e, 0x9b2f, - 0x9b30, 0x9b31, 0x9b32, 0x9b33, 0x9b34, 0x9b35, 0x9b36, 0x9b37, - 0x9b38, 0x9b39, 0x9b3a, 0x9b3b, 0x9b3c, 0x9b3d, 0x9b3e, 0x9b3f, - 0x9b40, 0x9b41, 0x9b42, 0x9b43, 0x9b44, 0x9b45, 0x9b46, 0x9b47, - 0x9b48, 0x9b49, 0x9b4a, 0x9b4b, 0x9b4c, 0x9b4d, 0x9b4e, 0x9b4f, - 0x9b50, 0x9b51, 0x9b52, 0x9b53, 0x9b54, 0x9b55, 0x9b56, 0x9b57, - 0x9b58, 0x9b59, 0x9b5a, 0x9b5b, 0x9b5c, 0x9b5d, 0x9b5e, 0x9b5f, - 0x9b60, 0x9b61, 0x9b62, 0x9b63, 0x9b64, 0x9b65, 0x9b66, 0x9b67, - 0x9b68, 0x9b69, 0x9b6a, 0x9b6b, 0x9b6c, 0x9b6d, 0x9b6e, 0x9b6f, - 0x9b70, 0x9b71, 0x9b72, 0x9b73, 0x9b74, 0x9b75, 0x9b76, 0x9b77, - 0x9b78, 0x9b79, 0x9b7a, 0x9b7b, 0x9b7c, 0x9b7d, 0x9b7e, 0x9b7f, - 0x9b80, 0x9b81, 0x9b82, 0x9b83, 0x9b84, 0x9b85, 0x9b86, 0x9b87, - 0x9b88, 0x9b89, 0x9b8a, 0x9b8b, 0x9b8c, 0x9b8d, 0x9b8e, 0x9b8f, - 0x9b90, 0x9b91, 0x9b92, 0x9b93, 0x9b94, 0x9b95, 0x9b96, 0x9b97, - 0x9b98, 0x9b99, 0x9b9a, 0x9b9b, 0x9b9c, 0x9b9d, 0x9b9e, 0x9b9f, - 0x9ba0, 0x9ba1, 0x9ba2, 0x9ba3, 0x9ba4, 0x9ba5, 0x9ba6, 0x9ba7, - 0x9ba8, 0x9ba9, 0x9baa, 0x9bab, 0x9bac, 0x9bad, 0x9bae, 0x9baf, - 0x9bb0, 0x9bb1, 0x9bb2, 0x9bb3, 0x9bb4, 0x9bb5, 0x9bb6, 0x9bb7, - 0x9bb8, 0x9bb9, 0x9bba, 0x9bbb, 0x9bbc, 0x9bbd, 0x9bbe, 0x9bbf, - 0x9bc0, 0x9bc1, 0x9bc2, 0x9bc3, 0x9bc4, 0x9bc5, 0x9bc6, 0x9bc7, - 0x9bc8, 0x9bc9, 0x9bca, 0x9bcb, 0x9bcc, 0x9bcd, 0x9bce, 0x9bcf, - 0x9bd0, 0x9bd1, 0x9bd2, 0x9bd3, 0x9bd4, 0x9bd5, 0x9bd6, 0x9bd7, - 0x9bd8, 0x9bd9, 0x9bda, 0x9bdb, 0x9bdc, 0x9bdd, 0x9bde, 0x9bdf, - 0x9be0, 0x9be1, 0x9be2, 0x9be3, 0x9be4, 0x9be5, 0x9be6, 0x9be7, - 0x9be8, 0x9be9, 0x9bea, 0x9beb, 0x9bec, 0x9bed, 0x9bee, 0x9bef, - 0x9bf0, 0x9bf1, 0x9bf2, 0x9bf3, 0x9bf4, 0x9bf5, 0x9bf6, 0x9bf7, - 0x9bf8, 0x9bf9, 0x9bfa, 0x9bfb, 0x9bfc, 0x9bfd, 0x9bfe, 0x9bff, - 0x9c00, 0x9c01, 0x9c02, 0x9c03, 0x9c04, 0x9c05, 0x9c06, 0x9c07, - 0x9c08, 0x9c09, 0x9c0a, 0x9c0b, 0x9c0c, 0x9c0d, 0x9c0e, 0x9c0f, - 0x9c10, 0x9c11, 0x9c12, 0x9c13, 0x9c14, 0x9c15, 0x9c16, 0x9c17, - 0x9c18, 0x9c19, 0x9c1a, 0x9c1b, 0x9c1c, 0x9c1d, 0x9c1e, 0x9c1f, - 0x9c20, 0x9c21, 0x9c22, 0x9c23, 0x9c24, 0x9c25, 0x9c26, 0x9c27, - 0x9c28, 0x9c29, 0x9c2a, 0x9c2b, 0x9c2c, 0x9c2d, 0x9c2e, 0x9c2f, - 0x9c30, 0x9c31, 0x9c32, 0x9c33, 0x9c34, 0x9c35, 0x9c36, 0x9c37, - 0x9c38, 0x9c39, 0x9c3a, 0x9c3b, 0x9c3c, 0x9c3d, 0x9c3e, 0x9c3f, - 0x9c40, 0x9c41, 0x9c42, 0x9c43, 0x9c44, 0x9c45, 0x9c46, 0x9c47, - 0x9c48, 0x9c49, 0x9c4a, 0x9c4b, 0x9c4c, 0x9c4d, 0x9c4e, 0x9c4f, - 0x9c50, 0x9c51, 0x9c52, 0x9c53, 0x9c54, 0x9c55, 0x9c56, 0x9c57, - 0x9c58, 0x9c59, 0x9c5a, 0x9c5b, 0x9c5c, 0x9c5d, 0x9c5e, 0x9c5f, - 0x9c60, 0x9c61, 0x9c62, 0x9c63, 0x9c64, 0x9c65, 0x9c66, 0x9c67, - 0x9c68, 0x9c69, 0x9c6a, 0x9c6b, 0x9c6c, 0x9c6d, 0x9c6e, 0x9c6f, - 0x9c70, 0x9c71, 0x9c72, 0x9c73, 0x9c74, 0x9c75, 0x9c76, 0x9c77, - 0x9c78, 0x9c79, 0x9c7a, 0x9c7b, 0x9c7c, 0x9c7d, 0x9c7e, 0x9c7f, - 0x9c80, 0x9c81, 0x9c82, 0x9c83, 0x9c84, 0x9c85, 0x9c86, 0x9c87, - 0x9c88, 0x9c89, 0x9c8a, 0x9c8b, 0x9c8c, 0x9c8d, 0x9c8e, 0x9c8f, - 0x9c90, 0x9c91, 0x9c92, 0x9c93, 0x9c94, 0x9c95, 0x9c96, 0x9c97, - 0x9c98, 0x9c99, 0x9c9a, 0x9c9b, 0x9c9c, 0x9c9d, 0x9c9e, 0x9c9f, - 0x9ca0, 0x9ca1, 0x9ca2, 0x9ca3, 0x9ca4, 0x9ca5, 0x9ca6, 0x9ca7, - 0x9ca8, 0x9ca9, 0x9caa, 0x9cab, 0x9cac, 0x9cad, 0x9cae, 0x9caf, - 0x9cb0, 0x9cb1, 0x9cb2, 0x9cb3, 0x9cb4, 0x9cb5, 0x9cb6, 0x9cb7, - 0x9cb8, 0x9cb9, 0x9cba, 0x9cbb, 0x9cbc, 0x9cbd, 0x9cbe, 0x9cbf, - 0x9cc0, 0x9cc1, 0x9cc2, 0x9cc3, 0x9cc4, 0x9cc5, 0x9cc6, 0x9cc7, - 0x9cc8, 0x9cc9, 0x9cca, 0x9ccb, 0x9ccc, 0x9ccd, 0x9cce, 0x9ccf, - 0x9cd0, 0x9cd1, 0x9cd2, 0x9cd3, 0x9cd4, 0x9cd5, 0x9cd6, 0x9cd7, - 0x9cd8, 0x9cd9, 0x9cda, 0x9cdb, 0x9cdc, 0x9cdd, 0x9cde, 0x9cdf, - 0x9ce0, 0x9ce1, 0x9ce2, 0x9ce3, 0x9ce4, 0x9ce5, 0x9ce6, 0x9ce7, - 0x9ce8, 0x9ce9, 0x9cea, 0x9ceb, 0x9cec, 0x9ced, 0x9cee, 0x9cef, - 0x9cf0, 0x9cf1, 0x9cf2, 0x9cf3, 0x9cf4, 0x9cf5, 0x9cf6, 0x9cf7, - 0x9cf8, 0x9cf9, 0x9cfa, 0x9cfb, 0x9cfc, 0x9cfd, 0x9cfe, 0x9cff, - 0x9d00, 0x9d01, 0x9d02, 0x9d03, 0x9d04, 0x9d05, 0x9d06, 0x9d07, - 0x9d08, 0x9d09, 0x9d0a, 0x9d0b, 0x9d0c, 0x9d0d, 0x9d0e, 0x9d0f, - 0x9d10, 0x9d11, 0x9d12, 0x9d13, 0x9d14, 0x9d15, 0x9d16, 0x9d17, - 0x9d18, 0x9d19, 0x9d1a, 0x9d1b, 0x9d1c, 0x9d1d, 0x9d1e, 0x9d1f, - 0x9d20, 0x9d21, 0x9d22, 0x9d23, 0x9d24, 0x9d25, 0x9d26, 0x9d27, - 0x9d28, 0x9d29, 0x9d2a, 0x9d2b, 0x9d2c, 0x9d2d, 0x9d2e, 0x9d2f, - 0x9d30, 0x9d31, 0x9d32, 0x9d33, 0x9d34, 0x9d35, 0x9d36, 0x9d37, - 0x9d38, 0x9d39, 0x9d3a, 0x9d3b, 0x9d3c, 0x9d3d, 0x9d3e, 0x9d3f, - 0x9d40, 0x9d41, 0x9d42, 0x9d43, 0x9d44, 0x9d45, 0x9d46, 0x9d47, - 0x9d48, 0x9d49, 0x9d4a, 0x9d4b, 0x9d4c, 0x9d4d, 0x9d4e, 0x9d4f, - 0x9d50, 0x9d51, 0x9d52, 0x9d53, 0x9d54, 0x9d55, 0x9d56, 0x9d57, - 0x9d58, 0x9d59, 0x9d5a, 0x9d5b, 0x9d5c, 0x9d5d, 0x9d5e, 0x9d5f, - 0x9d60, 0x9d61, 0x9d62, 0x9d63, 0x9d64, 0x9d65, 0x9d66, 0x9d67, - 0x9d68, 0x9d69, 0x9d6a, 0x9d6b, 0x9d6c, 0x9d6d, 0x9d6e, 0x9d6f, - 0x9d70, 0x9d71, 0x9d72, 0x9d73, 0x9d74, 0x9d75, 0x9d76, 0x9d77, - 0x9d78, 0x9d79, 0x9d7a, 0x9d7b, 0x9d7c, 0x9d7d, 0x9d7e, 0x9d7f, - 0x9d80, 0x9d81, 0x9d82, 0x9d83, 0x9d84, 0x9d85, 0x9d86, 0x9d87, - 0x9d88, 0x9d89, 0x9d8a, 0x9d8b, 0x9d8c, 0x9d8d, 0x9d8e, 0x9d8f, - 0x9d90, 0x9d91, 0x9d92, 0x9d93, 0x9d94, 0x9d95, 0x9d96, 0x9d97, - 0x9d98, 0x9d99, 0x9d9a, 0x9d9b, 0x9d9c, 0x9d9d, 0x9d9e, 0x9d9f, - 0x9da0, 0x9da1, 0x9da2, 0x9da3, 0x9da4, 0x9da5, 0x9da6, 0x9da7, - 0x9da8, 0x9da9, 0x9daa, 0x9dab, 0x9dac, 0x9dad, 0x9dae, 0x9daf, - 0x9db0, 0x9db1, 0x9db2, 0x9db3, 0x9db4, 0x9db5, 0x9db6, 0x9db7, - 0x9db8, 0x9db9, 0x9dba, 0x9dbb, 0x9dbc, 0x9dbd, 0x9dbe, 0x9dbf, - 0x9dc0, 0x9dc1, 0x9dc2, 0x9dc3, 0x9dc4, 0x9dc5, 0x9dc6, 0x9dc7, - 0x9dc8, 0x9dc9, 0x9dca, 0x9dcb, 0x9dcc, 0x9dcd, 0x9dce, 0x9dcf, - 0x9dd0, 0x9dd1, 0x9dd2, 0x9dd3, 0x9dd4, 0x9dd5, 0x9dd6, 0x9dd7, - 0x9dd8, 0x9dd9, 0x9dda, 0x9ddb, 0x9ddc, 0x9ddd, 0x9dde, 0x9ddf, - 0x9de0, 0x9de1, 0x9de2, 0x9de3, 0x9de4, 0x9de5, 0x9de6, 0x9de7, - 0x9de8, 0x9de9, 0x9dea, 0x9deb, 0x9dec, 0x9ded, 0x9dee, 0x9def, - 0x9df0, 0x9df1, 0x9df2, 0x9df3, 0x9df4, 0x9df5, 0x9df6, 0x9df7, - 0x9df8, 0x9df9, 0x9dfa, 0x9dfb, 0x9dfc, 0x9dfd, 0x9dfe, 0x9dff, - 0x9e00, 0x9e01, 0x9e02, 0x9e03, 0x9e04, 0x9e05, 0x9e06, 0x9e07, - 0x9e08, 0x9e09, 0x9e0a, 0x9e0b, 0x9e0c, 0x9e0d, 0x9e0e, 0x9e0f, - 0x9e10, 0x9e11, 0x9e12, 0x9e13, 0x9e14, 0x9e15, 0x9e16, 0x9e17, - 0x9e18, 0x9e19, 0x9e1a, 0x9e1b, 0x9e1c, 0x9e1d, 0x9e1e, 0x9e1f, - 0x9e20, 0x9e21, 0x9e22, 0x9e23, 0x9e24, 0x9e25, 0x9e26, 0x9e27, - 0x9e28, 0x9e29, 0x9e2a, 0x9e2b, 0x9e2c, 0x9e2d, 0x9e2e, 0x9e2f, - 0x9e30, 0x9e31, 0x9e32, 0x9e33, 0x9e34, 0x9e35, 0x9e36, 0x9e37, - 0x9e38, 0x9e39, 0x9e3a, 0x9e3b, 0x9e3c, 0x9e3d, 0x9e3e, 0x9e3f, - 0x9e40, 0x9e41, 0x9e42, 0x9e43, 0x9e44, 0x9e45, 0x9e46, 0x9e47, - 0x9e48, 0x9e49, 0x9e4a, 0x9e4b, 0x9e4c, 0x9e4d, 0x9e4e, 0x9e4f, - 0x9e50, 0x9e51, 0x9e52, 0x9e53, 0x9e54, 0x9e55, 0x9e56, 0x9e57, - 0x9e58, 0x9e59, 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5d, 0x9e5e, 0x9e5f, - 0x9e60, 0x9e61, 0x9e62, 0x9e63, 0x9e64, 0x9e65, 0x9e66, 0x9e67, - 0x9e68, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, 0x9e6d, 0x9e6e, 0x9e6f, - 0x9e70, 0x9e71, 0x9e72, 0x9e73, 0x9e74, 0x9e75, 0x9e76, 0x9e77, - 0x9e78, 0x9e79, 0x9e7a, 0x9e7b, 0x9e7c, 0x9e7d, 0x9e7e, 0x9e7f, - 0x9e80, 0x9e81, 0x9e82, 0x9e83, 0x9e84, 0x9e85, 0x9e86, 0x9e87, - 0x9e88, 0x9e89, 0x9e8a, 0x9e8b, 0x9e8c, 0x9e8d, 0x9e8e, 0x9e8f, - 0x9e90, 0x9e91, 0x9e92, 0x9e93, 0x9e94, 0x9e95, 0x9e96, 0x9e97, - 0x9e98, 0x9e99, 0x9e9a, 0x9e9b, 0x9e9c, 0x9e9d, 0x9e9e, 0x9e9f, - 0x9ea0, 0x9ea1, 0x9ea2, 0x9ea3, 0x9ea4, 0x9ea5, 0x9ea6, 0x9ea7, - 0x9ea8, 0x9ea9, 0x9eaa, 0x9eab, 0x9eac, 0x9ead, 0x9eae, 0x9eaf, - 0x9eb0, 0x9eb1, 0x9eb2, 0x9eb3, 0x9eb4, 0x9eb5, 0x9eb6, 0x9eb7, - 0x9eb8, 0x9eb9, 0x9eba, 0x9ebb, 0x9ebc, 0x9ebd, 0x9ebe, 0x9ebf, - 0x9ec0, 0x9ec1, 0x9ec2, 0x9ec3, 0x9ec4, 0x9ec5, 0x9ec6, 0x9ec7, - 0x9ec8, 0x9ec9, 0x9eca, 0x9ecb, 0x9ecc, 0x9ecd, 0x9ece, 0x9ecf, - 0x9ed0, 0x9ed1, 0x9ed2, 0x9ed3, 0x9ed4, 0x9ed5, 0x9ed6, 0x9ed7, - 0x9ed8, 0x9ed9, 0x9eda, 0x9edb, 0x9edc, 0x9edd, 0x9ede, 0x9edf, - 0x9ee0, 0x9ee1, 0x9ee2, 0x9ee3, 0x9ee4, 0x9ee5, 0x9ee6, 0x9ee7, - 0x9ee8, 0x9ee9, 0x9eea, 0x9eeb, 0x9eec, 0x9eed, 0x9eee, 0x9eef, - 0x9ef0, 0x9ef1, 0x9ef2, 0x9ef3, 0x9ef4, 0x9ef5, 0x9ef6, 0x9ef7, - 0x9ef8, 0x9ef9, 0x9efa, 0x9efb, 0x9efc, 0x9efd, 0x9efe, 0x9eff, - 0x9f00, 0x9f01, 0x9f02, 0x9f03, 0x9f04, 0x9f05, 0x9f06, 0x9f07, - 0x9f08, 0x9f09, 0x9f0a, 0x9f0b, 0x9f0c, 0x9f0d, 0x9f0e, 0x9f0f, - 0x9f10, 0x9f11, 0x9f12, 0x9f13, 0x9f14, 0x9f15, 0x9f16, 0x9f17, - 0x9f18, 0x9f19, 0x9f1a, 0x9f1b, 0x9f1c, 0x9f1d, 0x9f1e, 0x9f1f, - 0x9f20, 0x9f21, 0x9f22, 0x9f23, 0x9f24, 0x9f25, 0x9f26, 0x9f27, - 0x9f28, 0x9f29, 0x9f2a, 0x9f2b, 0x9f2c, 0x9f2d, 0x9f2e, 0x9f2f, - 0x9f30, 0x9f31, 0x9f32, 0x9f33, 0x9f34, 0x9f35, 0x9f36, 0x9f37, - 0x9f38, 0x9f39, 0x9f3a, 0x9f3b, 0x9f3c, 0x9f3d, 0x9f3e, 0x9f3f, - 0x9f40, 0x9f41, 0x9f42, 0x9f43, 0x9f44, 0x9f45, 0x9f46, 0x9f47, - 0x9f48, 0x9f49, 0x9f4a, 0x9f4b, 0x9f4c, 0x9f4d, 0x9f4e, 0x9f4f, - 0x9f50, 0x9f51, 0x9f52, 0x9f53, 0x9f54, 0x9f55, 0x9f56, 0x9f57, - 0x9f58, 0x9f59, 0x9f5a, 0x9f5b, 0x9f5c, 0x9f5d, 0x9f5e, 0x9f5f, - 0x9f60, 0x9f61, 0x9f62, 0x9f63, 0x9f64, 0x9f65, 0x9f66, 0x9f67, - 0x9f68, 0x9f69, 0x9f6a, 0x9f6b, 0x9f6c, 0x9f6d, 0x9f6e, 0x9f6f, - 0x9f70, 0x9f71, 0x9f72, 0x9f73, 0x9f74, 0x9f75, 0x9f76, 0x9f77, - 0x9f78, 0x9f79, 0x9f7a, 0x9f7b, 0x9f7c, 0x9f7d, 0x9f7e, 0x9f7f, - 0x9f80, 0x9f81, 0x9f82, 0x9f83, 0x9f84, 0x9f85, 0x9f86, 0x9f87, - 0x9f88, 0x9f89, 0x9f8a, 0x9f8b, 0x9f8c, 0x9f8d, 0x9f8e, 0x9f8f, - 0x9f90, 0x9f91, 0x9f92, 0x9f93, 0x9f94, 0x9f95, 0x9f96, 0x9f97, - 0x9f98, 0x9f99, 0x9f9a, 0x9f9b, 0x9f9c, 0x9f9d, 0x9f9e, 0x9f9f, - 0x9fa0, 0x9fa1, 0x9fa2, 0x9fa3, 0x9fa4, 0x9fa5, 0x9fa6, 0x9fa7, - 0x9fa8, 0x9fa9, 0x9faa, 0x9fab, 0x9fac, 0x9fad, 0x9fae, 0x9faf, - 0x9fb0, 0x9fb1, 0x9fb2, 0x9fb3, 0x9fb4, 0x9fb5, 0x9fb6, 0x9fb7, - 0x9fb8, 0x9fb9, 0x9fba, 0x9fbb, 0x9fbc, 0x9fbd, 0x9fbe, 0x9fbf, - 0x9fc0, 0x9fc1, 0x9fc2, 0x9fc3, 0x9fc4, 0x9fc5, 0x9fc6, 0x9fc7, - 0x9fc8, 0x9fc9, 0x9fca, 0x9fcb, 0x9fcc, 0x9fcd, 0x9fce, 0x9fcf, - 0x9fd0, 0x9fd1, 0x9fd2, 0x9fd3, 0x9fd4, 0x9fd5, 0x9fd6, 0x9fd7, - 0x9fd8, 0x9fd9, 0x9fda, 0x9fdb, 0x9fdc, 0x9fdd, 0x9fde, 0x9fdf, - 0x9fe0, 0x9fe1, 0x9fe2, 0x9fe3, 0x9fe4, 0x9fe5, 0x9fe6, 0x9fe7, - 0x9fe8, 0x9fe9, 0x9fea, 0x9feb, 0x9fec, 0x9fed, 0x9fee, 0x9fef, - 0x9ff0, 0x9ff1, 0x9ff2, 0x9ff3, 0x9ff4, 0x9ff5, 0x9ff6, 0x9ff7, - 0x9ff8, 0x9ff9, 0x9ffa, 0x9ffb, 0x9ffc, 0x9ffd, 0x9ffe, 0x9fff, - 0xa000, 0xa001, 0xa002, 0xa003, 0xa004, 0xa005, 0xa006, 0xa007, - 0xa008, 0xa009, 0xa00a, 0xa00b, 0xa00c, 0xa00d, 0xa00e, 0xa00f, - 0xa010, 0xa011, 0xa012, 0xa013, 0xa014, 0xa015, 0xa016, 0xa017, - 0xa018, 0xa019, 0xa01a, 0xa01b, 0xa01c, 0xa01d, 0xa01e, 0xa01f, - 0xa020, 0xa021, 0xa022, 0xa023, 0xa024, 0xa025, 0xa026, 0xa027, - 0xa028, 0xa029, 0xa02a, 0xa02b, 0xa02c, 0xa02d, 0xa02e, 0xa02f, - 0xa030, 0xa031, 0xa032, 0xa033, 0xa034, 0xa035, 0xa036, 0xa037, - 0xa038, 0xa039, 0xa03a, 0xa03b, 0xa03c, 0xa03d, 0xa03e, 0xa03f, - 0xa040, 0xa041, 0xa042, 0xa043, 0xa044, 0xa045, 0xa046, 0xa047, - 0xa048, 0xa049, 0xa04a, 0xa04b, 0xa04c, 0xa04d, 0xa04e, 0xa04f, - 0xa050, 0xa051, 0xa052, 0xa053, 0xa054, 0xa055, 0xa056, 0xa057, - 0xa058, 0xa059, 0xa05a, 0xa05b, 0xa05c, 0xa05d, 0xa05e, 0xa05f, - 0xa060, 0xa061, 0xa062, 0xa063, 0xa064, 0xa065, 0xa066, 0xa067, - 0xa068, 0xa069, 0xa06a, 0xa06b, 0xa06c, 0xa06d, 0xa06e, 0xa06f, - 0xa070, 0xa071, 0xa072, 0xa073, 0xa074, 0xa075, 0xa076, 0xa077, - 0xa078, 0xa079, 0xa07a, 0xa07b, 0xa07c, 0xa07d, 0xa07e, 0xa07f, - 0xa080, 0xa081, 0xa082, 0xa083, 0xa084, 0xa085, 0xa086, 0xa087, - 0xa088, 0xa089, 0xa08a, 0xa08b, 0xa08c, 0xa08d, 0xa08e, 0xa08f, - 0xa090, 0xa091, 0xa092, 0xa093, 0xa094, 0xa095, 0xa096, 0xa097, - 0xa098, 0xa099, 0xa09a, 0xa09b, 0xa09c, 0xa09d, 0xa09e, 0xa09f, - 0xa0a0, 0xa0a1, 0xa0a2, 0xa0a3, 0xa0a4, 0xa0a5, 0xa0a6, 0xa0a7, - 0xa0a8, 0xa0a9, 0xa0aa, 0xa0ab, 0xa0ac, 0xa0ad, 0xa0ae, 0xa0af, - 0xa0b0, 0xa0b1, 0xa0b2, 0xa0b3, 0xa0b4, 0xa0b5, 0xa0b6, 0xa0b7, - 0xa0b8, 0xa0b9, 0xa0ba, 0xa0bb, 0xa0bc, 0xa0bd, 0xa0be, 0xa0bf, - 0xa0c0, 0xa0c1, 0xa0c2, 0xa0c3, 0xa0c4, 0xa0c5, 0xa0c6, 0xa0c7, - 0xa0c8, 0xa0c9, 0xa0ca, 0xa0cb, 0xa0cc, 0xa0cd, 0xa0ce, 0xa0cf, - 0xa0d0, 0xa0d1, 0xa0d2, 0xa0d3, 0xa0d4, 0xa0d5, 0xa0d6, 0xa0d7, - 0xa0d8, 0xa0d9, 0xa0da, 0xa0db, 0xa0dc, 0xa0dd, 0xa0de, 0xa0df, - 0xa0e0, 0xa0e1, 0xa0e2, 0xa0e3, 0xa0e4, 0xa0e5, 0xa0e6, 0xa0e7, - 0xa0e8, 0xa0e9, 0xa0ea, 0xa0eb, 0xa0ec, 0xa0ed, 0xa0ee, 0xa0ef, - 0xa0f0, 0xa0f1, 0xa0f2, 0xa0f3, 0xa0f4, 0xa0f5, 0xa0f6, 0xa0f7, - 0xa0f8, 0xa0f9, 0xa0fa, 0xa0fb, 0xa0fc, 0xa0fd, 0xa0fe, 0xa0ff, - 0xa100, 0xa101, 0xa102, 0xa103, 0xa104, 0xa105, 0xa106, 0xa107, - 0xa108, 0xa109, 0xa10a, 0xa10b, 0xa10c, 0xa10d, 0xa10e, 0xa10f, - 0xa110, 0xa111, 0xa112, 0xa113, 0xa114, 0xa115, 0xa116, 0xa117, - 0xa118, 0xa119, 0xa11a, 0xa11b, 0xa11c, 0xa11d, 0xa11e, 0xa11f, - 0xa120, 0xa121, 0xa122, 0xa123, 0xa124, 0xa125, 0xa126, 0xa127, - 0xa128, 0xa129, 0xa12a, 0xa12b, 0xa12c, 0xa12d, 0xa12e, 0xa12f, - 0xa130, 0xa131, 0xa132, 0xa133, 0xa134, 0xa135, 0xa136, 0xa137, - 0xa138, 0xa139, 0xa13a, 0xa13b, 0xa13c, 0xa13d, 0xa13e, 0xa13f, - 0xa140, 0xa141, 0xa142, 0xa143, 0xa144, 0xa145, 0xa146, 0xa147, - 0xa148, 0xa149, 0xa14a, 0xa14b, 0xa14c, 0xa14d, 0xa14e, 0xa14f, - 0xa150, 0xa151, 0xa152, 0xa153, 0xa154, 0xa155, 0xa156, 0xa157, - 0xa158, 0xa159, 0xa15a, 0xa15b, 0xa15c, 0xa15d, 0xa15e, 0xa15f, - 0xa160, 0xa161, 0xa162, 0xa163, 0xa164, 0xa165, 0xa166, 0xa167, - 0xa168, 0xa169, 0xa16a, 0xa16b, 0xa16c, 0xa16d, 0xa16e, 0xa16f, - 0xa170, 0xa171, 0xa172, 0xa173, 0xa174, 0xa175, 0xa176, 0xa177, - 0xa178, 0xa179, 0xa17a, 0xa17b, 0xa17c, 0xa17d, 0xa17e, 0xa17f, - 0xa180, 0xa181, 0xa182, 0xa183, 0xa184, 0xa185, 0xa186, 0xa187, - 0xa188, 0xa189, 0xa18a, 0xa18b, 0xa18c, 0xa18d, 0xa18e, 0xa18f, - 0xa190, 0xa191, 0xa192, 0xa193, 0xa194, 0xa195, 0xa196, 0xa197, - 0xa198, 0xa199, 0xa19a, 0xa19b, 0xa19c, 0xa19d, 0xa19e, 0xa19f, - 0xa1a0, 0xa1a1, 0xa1a2, 0xa1a3, 0xa1a4, 0xa1a5, 0xa1a6, 0xa1a7, - 0xa1a8, 0xa1a9, 0xa1aa, 0xa1ab, 0xa1ac, 0xa1ad, 0xa1ae, 0xa1af, - 0xa1b0, 0xa1b1, 0xa1b2, 0xa1b3, 0xa1b4, 0xa1b5, 0xa1b6, 0xa1b7, - 0xa1b8, 0xa1b9, 0xa1ba, 0xa1bb, 0xa1bc, 0xa1bd, 0xa1be, 0xa1bf, - 0xa1c0, 0xa1c1, 0xa1c2, 0xa1c3, 0xa1c4, 0xa1c5, 0xa1c6, 0xa1c7, - 0xa1c8, 0xa1c9, 0xa1ca, 0xa1cb, 0xa1cc, 0xa1cd, 0xa1ce, 0xa1cf, - 0xa1d0, 0xa1d1, 0xa1d2, 0xa1d3, 0xa1d4, 0xa1d5, 0xa1d6, 0xa1d7, - 0xa1d8, 0xa1d9, 0xa1da, 0xa1db, 0xa1dc, 0xa1dd, 0xa1de, 0xa1df, - 0xa1e0, 0xa1e1, 0xa1e2, 0xa1e3, 0xa1e4, 0xa1e5, 0xa1e6, 0xa1e7, - 0xa1e8, 0xa1e9, 0xa1ea, 0xa1eb, 0xa1ec, 0xa1ed, 0xa1ee, 0xa1ef, - 0xa1f0, 0xa1f1, 0xa1f2, 0xa1f3, 0xa1f4, 0xa1f5, 0xa1f6, 0xa1f7, - 0xa1f8, 0xa1f9, 0xa1fa, 0xa1fb, 0xa1fc, 0xa1fd, 0xa1fe, 0xa1ff, - 0xa200, 0xa201, 0xa202, 0xa203, 0xa204, 0xa205, 0xa206, 0xa207, - 0xa208, 0xa209, 0xa20a, 0xa20b, 0xa20c, 0xa20d, 0xa20e, 0xa20f, - 0xa210, 0xa211, 0xa212, 0xa213, 0xa214, 0xa215, 0xa216, 0xa217, - 0xa218, 0xa219, 0xa21a, 0xa21b, 0xa21c, 0xa21d, 0xa21e, 0xa21f, - 0xa220, 0xa221, 0xa222, 0xa223, 0xa224, 0xa225, 0xa226, 0xa227, - 0xa228, 0xa229, 0xa22a, 0xa22b, 0xa22c, 0xa22d, 0xa22e, 0xa22f, - 0xa230, 0xa231, 0xa232, 0xa233, 0xa234, 0xa235, 0xa236, 0xa237, - 0xa238, 0xa239, 0xa23a, 0xa23b, 0xa23c, 0xa23d, 0xa23e, 0xa23f, - 0xa240, 0xa241, 0xa242, 0xa243, 0xa244, 0xa245, 0xa246, 0xa247, - 0xa248, 0xa249, 0xa24a, 0xa24b, 0xa24c, 0xa24d, 0xa24e, 0xa24f, - 0xa250, 0xa251, 0xa252, 0xa253, 0xa254, 0xa255, 0xa256, 0xa257, - 0xa258, 0xa259, 0xa25a, 0xa25b, 0xa25c, 0xa25d, 0xa25e, 0xa25f, - 0xa260, 0xa261, 0xa262, 0xa263, 0xa264, 0xa265, 0xa266, 0xa267, - 0xa268, 0xa269, 0xa26a, 0xa26b, 0xa26c, 0xa26d, 0xa26e, 0xa26f, - 0xa270, 0xa271, 0xa272, 0xa273, 0xa274, 0xa275, 0xa276, 0xa277, - 0xa278, 0xa279, 0xa27a, 0xa27b, 0xa27c, 0xa27d, 0xa27e, 0xa27f, - 0xa280, 0xa281, 0xa282, 0xa283, 0xa284, 0xa285, 0xa286, 0xa287, - 0xa288, 0xa289, 0xa28a, 0xa28b, 0xa28c, 0xa28d, 0xa28e, 0xa28f, - 0xa290, 0xa291, 0xa292, 0xa293, 0xa294, 0xa295, 0xa296, 0xa297, - 0xa298, 0xa299, 0xa29a, 0xa29b, 0xa29c, 0xa29d, 0xa29e, 0xa29f, - 0xa2a0, 0xa2a1, 0xa2a2, 0xa2a3, 0xa2a4, 0xa2a5, 0xa2a6, 0xa2a7, - 0xa2a8, 0xa2a9, 0xa2aa, 0xa2ab, 0xa2ac, 0xa2ad, 0xa2ae, 0xa2af, - 0xa2b0, 0xa2b1, 0xa2b2, 0xa2b3, 0xa2b4, 0xa2b5, 0xa2b6, 0xa2b7, - 0xa2b8, 0xa2b9, 0xa2ba, 0xa2bb, 0xa2bc, 0xa2bd, 0xa2be, 0xa2bf, - 0xa2c0, 0xa2c1, 0xa2c2, 0xa2c3, 0xa2c4, 0xa2c5, 0xa2c6, 0xa2c7, - 0xa2c8, 0xa2c9, 0xa2ca, 0xa2cb, 0xa2cc, 0xa2cd, 0xa2ce, 0xa2cf, - 0xa2d0, 0xa2d1, 0xa2d2, 0xa2d3, 0xa2d4, 0xa2d5, 0xa2d6, 0xa2d7, - 0xa2d8, 0xa2d9, 0xa2da, 0xa2db, 0xa2dc, 0xa2dd, 0xa2de, 0xa2df, - 0xa2e0, 0xa2e1, 0xa2e2, 0xa2e3, 0xa2e4, 0xa2e5, 0xa2e6, 0xa2e7, - 0xa2e8, 0xa2e9, 0xa2ea, 0xa2eb, 0xa2ec, 0xa2ed, 0xa2ee, 0xa2ef, - 0xa2f0, 0xa2f1, 0xa2f2, 0xa2f3, 0xa2f4, 0xa2f5, 0xa2f6, 0xa2f7, - 0xa2f8, 0xa2f9, 0xa2fa, 0xa2fb, 0xa2fc, 0xa2fd, 0xa2fe, 0xa2ff, - 0xa300, 0xa301, 0xa302, 0xa303, 0xa304, 0xa305, 0xa306, 0xa307, - 0xa308, 0xa309, 0xa30a, 0xa30b, 0xa30c, 0xa30d, 0xa30e, 0xa30f, - 0xa310, 0xa311, 0xa312, 0xa313, 0xa314, 0xa315, 0xa316, 0xa317, - 0xa318, 0xa319, 0xa31a, 0xa31b, 0xa31c, 0xa31d, 0xa31e, 0xa31f, - 0xa320, 0xa321, 0xa322, 0xa323, 0xa324, 0xa325, 0xa326, 0xa327, - 0xa328, 0xa329, 0xa32a, 0xa32b, 0xa32c, 0xa32d, 0xa32e, 0xa32f, - 0xa330, 0xa331, 0xa332, 0xa333, 0xa334, 0xa335, 0xa336, 0xa337, - 0xa338, 0xa339, 0xa33a, 0xa33b, 0xa33c, 0xa33d, 0xa33e, 0xa33f, - 0xa340, 0xa341, 0xa342, 0xa343, 0xa344, 0xa345, 0xa346, 0xa347, - 0xa348, 0xa349, 0xa34a, 0xa34b, 0xa34c, 0xa34d, 0xa34e, 0xa34f, - 0xa350, 0xa351, 0xa352, 0xa353, 0xa354, 0xa355, 0xa356, 0xa357, - 0xa358, 0xa359, 0xa35a, 0xa35b, 0xa35c, 0xa35d, 0xa35e, 0xa35f, - 0xa360, 0xa361, 0xa362, 0xa363, 0xa364, 0xa365, 0xa366, 0xa367, - 0xa368, 0xa369, 0xa36a, 0xa36b, 0xa36c, 0xa36d, 0xa36e, 0xa36f, - 0xa370, 0xa371, 0xa372, 0xa373, 0xa374, 0xa375, 0xa376, 0xa377, - 0xa378, 0xa379, 0xa37a, 0xa37b, 0xa37c, 0xa37d, 0xa37e, 0xa37f, - 0xa380, 0xa381, 0xa382, 0xa383, 0xa384, 0xa385, 0xa386, 0xa387, - 0xa388, 0xa389, 0xa38a, 0xa38b, 0xa38c, 0xa38d, 0xa38e, 0xa38f, - 0xa390, 0xa391, 0xa392, 0xa393, 0xa394, 0xa395, 0xa396, 0xa397, - 0xa398, 0xa399, 0xa39a, 0xa39b, 0xa39c, 0xa39d, 0xa39e, 0xa39f, - 0xa3a0, 0xa3a1, 0xa3a2, 0xa3a3, 0xa3a4, 0xa3a5, 0xa3a6, 0xa3a7, - 0xa3a8, 0xa3a9, 0xa3aa, 0xa3ab, 0xa3ac, 0xa3ad, 0xa3ae, 0xa3af, - 0xa3b0, 0xa3b1, 0xa3b2, 0xa3b3, 0xa3b4, 0xa3b5, 0xa3b6, 0xa3b7, - 0xa3b8, 0xa3b9, 0xa3ba, 0xa3bb, 0xa3bc, 0xa3bd, 0xa3be, 0xa3bf, - 0xa3c0, 0xa3c1, 0xa3c2, 0xa3c3, 0xa3c4, 0xa3c5, 0xa3c6, 0xa3c7, - 0xa3c8, 0xa3c9, 0xa3ca, 0xa3cb, 0xa3cc, 0xa3cd, 0xa3ce, 0xa3cf, - 0xa3d0, 0xa3d1, 0xa3d2, 0xa3d3, 0xa3d4, 0xa3d5, 0xa3d6, 0xa3d7, - 0xa3d8, 0xa3d9, 0xa3da, 0xa3db, 0xa3dc, 0xa3dd, 0xa3de, 0xa3df, - 0xa3e0, 0xa3e1, 0xa3e2, 0xa3e3, 0xa3e4, 0xa3e5, 0xa3e6, 0xa3e7, - 0xa3e8, 0xa3e9, 0xa3ea, 0xa3eb, 0xa3ec, 0xa3ed, 0xa3ee, 0xa3ef, - 0xa3f0, 0xa3f1, 0xa3f2, 0xa3f3, 0xa3f4, 0xa3f5, 0xa3f6, 0xa3f7, - 0xa3f8, 0xa3f9, 0xa3fa, 0xa3fb, 0xa3fc, 0xa3fd, 0xa3fe, 0xa3ff, - 0xa400, 0xa401, 0xa402, 0xa403, 0xa404, 0xa405, 0xa406, 0xa407, - 0xa408, 0xa409, 0xa40a, 0xa40b, 0xa40c, 0xa40d, 0xa40e, 0xa40f, - 0xa410, 0xa411, 0xa412, 0xa413, 0xa414, 0xa415, 0xa416, 0xa417, - 0xa418, 0xa419, 0xa41a, 0xa41b, 0xa41c, 0xa41d, 0xa41e, 0xa41f, - 0xa420, 0xa421, 0xa422, 0xa423, 0xa424, 0xa425, 0xa426, 0xa427, - 0xa428, 0xa429, 0xa42a, 0xa42b, 0xa42c, 0xa42d, 0xa42e, 0xa42f, - 0xa430, 0xa431, 0xa432, 0xa433, 0xa434, 0xa435, 0xa436, 0xa437, - 0xa438, 0xa439, 0xa43a, 0xa43b, 0xa43c, 0xa43d, 0xa43e, 0xa43f, - 0xa440, 0xa441, 0xa442, 0xa443, 0xa444, 0xa445, 0xa446, 0xa447, - 0xa448, 0xa449, 0xa44a, 0xa44b, 0xa44c, 0xa44d, 0xa44e, 0xa44f, - 0xa450, 0xa451, 0xa452, 0xa453, 0xa454, 0xa455, 0xa456, 0xa457, - 0xa458, 0xa459, 0xa45a, 0xa45b, 0xa45c, 0xa45d, 0xa45e, 0xa45f, - 0xa460, 0xa461, 0xa462, 0xa463, 0xa464, 0xa465, 0xa466, 0xa467, - 0xa468, 0xa469, 0xa46a, 0xa46b, 0xa46c, 0xa46d, 0xa46e, 0xa46f, - 0xa470, 0xa471, 0xa472, 0xa473, 0xa474, 0xa475, 0xa476, 0xa477, - 0xa478, 0xa479, 0xa47a, 0xa47b, 0xa47c, 0xa47d, 0xa47e, 0xa47f, - 0xa480, 0xa481, 0xa482, 0xa483, 0xa484, 0xa485, 0xa486, 0xa487, - 0xa488, 0xa489, 0xa48a, 0xa48b, 0xa48c, 0xa48d, 0xa48e, 0xa48f, - 0xa490, 0xa491, 0xa492, 0xa493, 0xa494, 0xa495, 0xa496, 0xa497, - 0xa498, 0xa499, 0xa49a, 0xa49b, 0xa49c, 0xa49d, 0xa49e, 0xa49f, - 0xa4a0, 0xa4a1, 0xa4a2, 0xa4a3, 0xa4a4, 0xa4a5, 0xa4a6, 0xa4a7, - 0xa4a8, 0xa4a9, 0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4ae, 0xa4af, - 0xa4b0, 0xa4b1, 0xa4b2, 0xa4b3, 0xa4b4, 0xa4b5, 0xa4b6, 0xa4b7, - 0xa4b8, 0xa4b9, 0xa4ba, 0xa4bb, 0xa4bc, 0xa4bd, 0xa4be, 0xa4bf, - 0xa4c0, 0xa4c1, 0xa4c2, 0xa4c3, 0xa4c4, 0xa4c5, 0xa4c6, 0xa4c7, - 0xa4c8, 0xa4c9, 0xa4ca, 0xa4cb, 0xa4cc, 0xa4cd, 0xa4ce, 0xa4cf, - 0xa4d0, 0xa4d1, 0xa4d2, 0xa4d3, 0xa4d4, 0xa4d5, 0xa4d6, 0xa4d7, - 0xa4d8, 0xa4d9, 0xa4da, 0xa4db, 0xa4dc, 0xa4dd, 0xa4de, 0xa4df, - 0xa4e0, 0xa4e1, 0xa4e2, 0xa4e3, 0xa4e4, 0xa4e5, 0xa4e6, 0xa4e7, - 0xa4e8, 0xa4e9, 0xa4ea, 0xa4eb, 0xa4ec, 0xa4ed, 0xa4ee, 0xa4ef, - 0xa4f0, 0xa4f1, 0xa4f2, 0xa4f3, 0xa4f4, 0xa4f5, 0xa4f6, 0xa4f7, - 0xa4f8, 0xa4f9, 0xa4fa, 0xa4fb, 0xa4fc, 0xa4fd, 0xa4fe, 0xa4ff, - 0xa500, 0xa501, 0xa502, 0xa503, 0xa504, 0xa505, 0xa506, 0xa507, - 0xa508, 0xa509, 0xa50a, 0xa50b, 0xa50c, 0xa50d, 0xa50e, 0xa50f, - 0xa510, 0xa511, 0xa512, 0xa513, 0xa514, 0xa515, 0xa516, 0xa517, - 0xa518, 0xa519, 0xa51a, 0xa51b, 0xa51c, 0xa51d, 0xa51e, 0xa51f, - 0xa520, 0xa521, 0xa522, 0xa523, 0xa524, 0xa525, 0xa526, 0xa527, - 0xa528, 0xa529, 0xa52a, 0xa52b, 0xa52c, 0xa52d, 0xa52e, 0xa52f, - 0xa530, 0xa531, 0xa532, 0xa533, 0xa534, 0xa535, 0xa536, 0xa537, - 0xa538, 0xa539, 0xa53a, 0xa53b, 0xa53c, 0xa53d, 0xa53e, 0xa53f, - 0xa540, 0xa541, 0xa542, 0xa543, 0xa544, 0xa545, 0xa546, 0xa547, - 0xa548, 0xa549, 0xa54a, 0xa54b, 0xa54c, 0xa54d, 0xa54e, 0xa54f, - 0xa550, 0xa551, 0xa552, 0xa553, 0xa554, 0xa555, 0xa556, 0xa557, - 0xa558, 0xa559, 0xa55a, 0xa55b, 0xa55c, 0xa55d, 0xa55e, 0xa55f, - 0xa560, 0xa561, 0xa562, 0xa563, 0xa564, 0xa565, 0xa566, 0xa567, - 0xa568, 0xa569, 0xa56a, 0xa56b, 0xa56c, 0xa56d, 0xa56e, 0xa56f, - 0xa570, 0xa571, 0xa572, 0xa573, 0xa574, 0xa575, 0xa576, 0xa577, - 0xa578, 0xa579, 0xa57a, 0xa57b, 0xa57c, 0xa57d, 0xa57e, 0xa57f, - 0xa580, 0xa581, 0xa582, 0xa583, 0xa584, 0xa585, 0xa586, 0xa587, - 0xa588, 0xa589, 0xa58a, 0xa58b, 0xa58c, 0xa58d, 0xa58e, 0xa58f, - 0xa590, 0xa591, 0xa592, 0xa593, 0xa594, 0xa595, 0xa596, 0xa597, - 0xa598, 0xa599, 0xa59a, 0xa59b, 0xa59c, 0xa59d, 0xa59e, 0xa59f, - 0xa5a0, 0xa5a1, 0xa5a2, 0xa5a3, 0xa5a4, 0xa5a5, 0xa5a6, 0xa5a7, - 0xa5a8, 0xa5a9, 0xa5aa, 0xa5ab, 0xa5ac, 0xa5ad, 0xa5ae, 0xa5af, - 0xa5b0, 0xa5b1, 0xa5b2, 0xa5b3, 0xa5b4, 0xa5b5, 0xa5b6, 0xa5b7, - 0xa5b8, 0xa5b9, 0xa5ba, 0xa5bb, 0xa5bc, 0xa5bd, 0xa5be, 0xa5bf, - 0xa5c0, 0xa5c1, 0xa5c2, 0xa5c3, 0xa5c4, 0xa5c5, 0xa5c6, 0xa5c7, - 0xa5c8, 0xa5c9, 0xa5ca, 0xa5cb, 0xa5cc, 0xa5cd, 0xa5ce, 0xa5cf, - 0xa5d0, 0xa5d1, 0xa5d2, 0xa5d3, 0xa5d4, 0xa5d5, 0xa5d6, 0xa5d7, - 0xa5d8, 0xa5d9, 0xa5da, 0xa5db, 0xa5dc, 0xa5dd, 0xa5de, 0xa5df, - 0xa5e0, 0xa5e1, 0xa5e2, 0xa5e3, 0xa5e4, 0xa5e5, 0xa5e6, 0xa5e7, - 0xa5e8, 0xa5e9, 0xa5ea, 0xa5eb, 0xa5ec, 0xa5ed, 0xa5ee, 0xa5ef, - 0xa5f0, 0xa5f1, 0xa5f2, 0xa5f3, 0xa5f4, 0xa5f5, 0xa5f6, 0xa5f7, - 0xa5f8, 0xa5f9, 0xa5fa, 0xa5fb, 0xa5fc, 0xa5fd, 0xa5fe, 0xa5ff, - 0xa600, 0xa601, 0xa602, 0xa603, 0xa604, 0xa605, 0xa606, 0xa607, - 0xa608, 0xa609, 0xa60a, 0xa60b, 0xa60c, 0xa60d, 0xa60e, 0xa60f, - 0xa610, 0xa611, 0xa612, 0xa613, 0xa614, 0xa615, 0xa616, 0xa617, - 0xa618, 0xa619, 0xa61a, 0xa61b, 0xa61c, 0xa61d, 0xa61e, 0xa61f, - 0xa620, 0xa621, 0xa622, 0xa623, 0xa624, 0xa625, 0xa626, 0xa627, - 0xa628, 0xa629, 0xa62a, 0xa62b, 0xa62c, 0xa62d, 0xa62e, 0xa62f, - 0xa630, 0xa631, 0xa632, 0xa633, 0xa634, 0xa635, 0xa636, 0xa637, - 0xa638, 0xa639, 0xa63a, 0xa63b, 0xa63c, 0xa63d, 0xa63e, 0xa63f, - 0xa640, 0xa641, 0xa642, 0xa643, 0xa644, 0xa645, 0xa646, 0xa647, - 0xa648, 0xa649, 0xa64a, 0xa64b, 0xa64c, 0xa64d, 0xa64e, 0xa64f, - 0xa650, 0xa651, 0xa652, 0xa653, 0xa654, 0xa655, 0xa656, 0xa657, - 0xa658, 0xa659, 0xa65a, 0xa65b, 0xa65c, 0xa65d, 0xa65e, 0xa65f, - 0xa660, 0xa661, 0xa662, 0xa663, 0xa664, 0xa665, 0xa666, 0xa667, - 0xa668, 0xa669, 0xa66a, 0xa66b, 0xa66c, 0xa66d, 0xa66e, 0xa66f, - 0xa670, 0xa671, 0xa672, 0xa673, 0xa674, 0xa675, 0xa676, 0xa677, - 0xa678, 0xa679, 0xa67a, 0xa67b, 0xa67c, 0xa67d, 0xa67e, 0xa67f, - 0xa680, 0xa681, 0xa682, 0xa683, 0xa684, 0xa685, 0xa686, 0xa687, - 0xa688, 0xa689, 0xa68a, 0xa68b, 0xa68c, 0xa68d, 0xa68e, 0xa68f, - 0xa690, 0xa691, 0xa692, 0xa693, 0xa694, 0xa695, 0xa696, 0xa697, - 0xa698, 0xa699, 0xa69a, 0xa69b, 0xa69c, 0xa69d, 0xa69e, 0xa69f, - 0xa6a0, 0xa6a1, 0xa6a2, 0xa6a3, 0xa6a4, 0xa6a5, 0xa6a6, 0xa6a7, - 0xa6a8, 0xa6a9, 0xa6aa, 0xa6ab, 0xa6ac, 0xa6ad, 0xa6ae, 0xa6af, - 0xa6b0, 0xa6b1, 0xa6b2, 0xa6b3, 0xa6b4, 0xa6b5, 0xa6b6, 0xa6b7, - 0xa6b8, 0xa6b9, 0xa6ba, 0xa6bb, 0xa6bc, 0xa6bd, 0xa6be, 0xa6bf, - 0xa6c0, 0xa6c1, 0xa6c2, 0xa6c3, 0xa6c4, 0xa6c5, 0xa6c6, 0xa6c7, - 0xa6c8, 0xa6c9, 0xa6ca, 0xa6cb, 0xa6cc, 0xa6cd, 0xa6ce, 0xa6cf, - 0xa6d0, 0xa6d1, 0xa6d2, 0xa6d3, 0xa6d4, 0xa6d5, 0xa6d6, 0xa6d7, - 0xa6d8, 0xa6d9, 0xa6da, 0xa6db, 0xa6dc, 0xa6dd, 0xa6de, 0xa6df, - 0xa6e0, 0xa6e1, 0xa6e2, 0xa6e3, 0xa6e4, 0xa6e5, 0xa6e6, 0xa6e7, - 0xa6e8, 0xa6e9, 0xa6ea, 0xa6eb, 0xa6ec, 0xa6ed, 0xa6ee, 0xa6ef, - 0xa6f0, 0xa6f1, 0xa6f2, 0xa6f3, 0xa6f4, 0xa6f5, 0xa6f6, 0xa6f7, - 0xa6f8, 0xa6f9, 0xa6fa, 0xa6fb, 0xa6fc, 0xa6fd, 0xa6fe, 0xa6ff, - 0xa700, 0xa701, 0xa702, 0xa703, 0xa704, 0xa705, 0xa706, 0xa707, - 0xa708, 0xa709, 0xa70a, 0xa70b, 0xa70c, 0xa70d, 0xa70e, 0xa70f, - 0xa710, 0xa711, 0xa712, 0xa713, 0xa714, 0xa715, 0xa716, 0xa717, - 0xa718, 0xa719, 0xa71a, 0xa71b, 0xa71c, 0xa71d, 0xa71e, 0xa71f, - 0xa720, 0xa721, 0xa722, 0xa723, 0xa724, 0xa725, 0xa726, 0xa727, - 0xa728, 0xa729, 0xa72a, 0xa72b, 0xa72c, 0xa72d, 0xa72e, 0xa72f, - 0xa730, 0xa731, 0xa732, 0xa733, 0xa734, 0xa735, 0xa736, 0xa737, - 0xa738, 0xa739, 0xa73a, 0xa73b, 0xa73c, 0xa73d, 0xa73e, 0xa73f, - 0xa740, 0xa741, 0xa742, 0xa743, 0xa744, 0xa745, 0xa746, 0xa747, - 0xa748, 0xa749, 0xa74a, 0xa74b, 0xa74c, 0xa74d, 0xa74e, 0xa74f, - 0xa750, 0xa751, 0xa752, 0xa753, 0xa754, 0xa755, 0xa756, 0xa757, - 0xa758, 0xa759, 0xa75a, 0xa75b, 0xa75c, 0xa75d, 0xa75e, 0xa75f, - 0xa760, 0xa761, 0xa762, 0xa763, 0xa764, 0xa765, 0xa766, 0xa767, - 0xa768, 0xa769, 0xa76a, 0xa76b, 0xa76c, 0xa76d, 0xa76e, 0xa76f, - 0xa770, 0xa771, 0xa772, 0xa773, 0xa774, 0xa775, 0xa776, 0xa777, - 0xa778, 0xa779, 0xa77a, 0xa77b, 0xa77c, 0xa77d, 0xa77e, 0xa77f, - 0xa780, 0xa781, 0xa782, 0xa783, 0xa784, 0xa785, 0xa786, 0xa787, - 0xa788, 0xa789, 0xa78a, 0xa78b, 0xa78c, 0xa78d, 0xa78e, 0xa78f, - 0xa790, 0xa791, 0xa792, 0xa793, 0xa794, 0xa795, 0xa796, 0xa797, - 0xa798, 0xa799, 0xa79a, 0xa79b, 0xa79c, 0xa79d, 0xa79e, 0xa79f, - 0xa7a0, 0xa7a1, 0xa7a2, 0xa7a3, 0xa7a4, 0xa7a5, 0xa7a6, 0xa7a7, - 0xa7a8, 0xa7a9, 0xa7aa, 0xa7ab, 0xa7ac, 0xa7ad, 0xa7ae, 0xa7af, - 0xa7b0, 0xa7b1, 0xa7b2, 0xa7b3, 0xa7b4, 0xa7b5, 0xa7b6, 0xa7b7, - 0xa7b8, 0xa7b9, 0xa7ba, 0xa7bb, 0xa7bc, 0xa7bd, 0xa7be, 0xa7bf, - 0xa7c0, 0xa7c1, 0xa7c2, 0xa7c3, 0xa7c4, 0xa7c5, 0xa7c6, 0xa7c7, - 0xa7c8, 0xa7c9, 0xa7ca, 0xa7cb, 0xa7cc, 0xa7cd, 0xa7ce, 0xa7cf, - 0xa7d0, 0xa7d1, 0xa7d2, 0xa7d3, 0xa7d4, 0xa7d5, 0xa7d6, 0xa7d7, - 0xa7d8, 0xa7d9, 0xa7da, 0xa7db, 0xa7dc, 0xa7dd, 0xa7de, 0xa7df, - 0xa7e0, 0xa7e1, 0xa7e2, 0xa7e3, 0xa7e4, 0xa7e5, 0xa7e6, 0xa7e7, - 0xa7e8, 0xa7e9, 0xa7ea, 0xa7eb, 0xa7ec, 0xa7ed, 0xa7ee, 0xa7ef, - 0xa7f0, 0xa7f1, 0xa7f2, 0xa7f3, 0xa7f4, 0xa7f5, 0xa7f6, 0xa7f7, - 0xa7f8, 0xa7f9, 0xa7fa, 0xa7fb, 0xa7fc, 0xa7fd, 0xa7fe, 0xa7ff, - 0xa800, 0xa801, 0xa802, 0xa803, 0xa804, 0xa805, 0xa806, 0xa807, - 0xa808, 0xa809, 0xa80a, 0xa80b, 0xa80c, 0xa80d, 0xa80e, 0xa80f, - 0xa810, 0xa811, 0xa812, 0xa813, 0xa814, 0xa815, 0xa816, 0xa817, - 0xa818, 0xa819, 0xa81a, 0xa81b, 0xa81c, 0xa81d, 0xa81e, 0xa81f, - 0xa820, 0xa821, 0xa822, 0xa823, 0xa824, 0xa825, 0xa826, 0xa827, - 0xa828, 0xa829, 0xa82a, 0xa82b, 0xa82c, 0xa82d, 0xa82e, 0xa82f, - 0xa830, 0xa831, 0xa832, 0xa833, 0xa834, 0xa835, 0xa836, 0xa837, - 0xa838, 0xa839, 0xa83a, 0xa83b, 0xa83c, 0xa83d, 0xa83e, 0xa83f, - 0xa840, 0xa841, 0xa842, 0xa843, 0xa844, 0xa845, 0xa846, 0xa847, - 0xa848, 0xa849, 0xa84a, 0xa84b, 0xa84c, 0xa84d, 0xa84e, 0xa84f, - 0xa850, 0xa851, 0xa852, 0xa853, 0xa854, 0xa855, 0xa856, 0xa857, - 0xa858, 0xa859, 0xa85a, 0xa85b, 0xa85c, 0xa85d, 0xa85e, 0xa85f, - 0xa860, 0xa861, 0xa862, 0xa863, 0xa864, 0xa865, 0xa866, 0xa867, - 0xa868, 0xa869, 0xa86a, 0xa86b, 0xa86c, 0xa86d, 0xa86e, 0xa86f, - 0xa870, 0xa871, 0xa872, 0xa873, 0xa874, 0xa875, 0xa876, 0xa877, - 0xa878, 0xa879, 0xa87a, 0xa87b, 0xa87c, 0xa87d, 0xa87e, 0xa87f, - 0xa880, 0xa881, 0xa882, 0xa883, 0xa884, 0xa885, 0xa886, 0xa887, - 0xa888, 0xa889, 0xa88a, 0xa88b, 0xa88c, 0xa88d, 0xa88e, 0xa88f, - 0xa890, 0xa891, 0xa892, 0xa893, 0xa894, 0xa895, 0xa896, 0xa897, - 0xa898, 0xa899, 0xa89a, 0xa89b, 0xa89c, 0xa89d, 0xa89e, 0xa89f, - 0xa8a0, 0xa8a1, 0xa8a2, 0xa8a3, 0xa8a4, 0xa8a5, 0xa8a6, 0xa8a7, - 0xa8a8, 0xa8a9, 0xa8aa, 0xa8ab, 0xa8ac, 0xa8ad, 0xa8ae, 0xa8af, - 0xa8b0, 0xa8b1, 0xa8b2, 0xa8b3, 0xa8b4, 0xa8b5, 0xa8b6, 0xa8b7, - 0xa8b8, 0xa8b9, 0xa8ba, 0xa8bb, 0xa8bc, 0xa8bd, 0xa8be, 0xa8bf, - 0xa8c0, 0xa8c1, 0xa8c2, 0xa8c3, 0xa8c4, 0xa8c5, 0xa8c6, 0xa8c7, - 0xa8c8, 0xa8c9, 0xa8ca, 0xa8cb, 0xa8cc, 0xa8cd, 0xa8ce, 0xa8cf, - 0xa8d0, 0xa8d1, 0xa8d2, 0xa8d3, 0xa8d4, 0xa8d5, 0xa8d6, 0xa8d7, - 0xa8d8, 0xa8d9, 0xa8da, 0xa8db, 0xa8dc, 0xa8dd, 0xa8de, 0xa8df, - 0xa8e0, 0xa8e1, 0xa8e2, 0xa8e3, 0xa8e4, 0xa8e5, 0xa8e6, 0xa8e7, - 0xa8e8, 0xa8e9, 0xa8ea, 0xa8eb, 0xa8ec, 0xa8ed, 0xa8ee, 0xa8ef, - 0xa8f0, 0xa8f1, 0xa8f2, 0xa8f3, 0xa8f4, 0xa8f5, 0xa8f6, 0xa8f7, - 0xa8f8, 0xa8f9, 0xa8fa, 0xa8fb, 0xa8fc, 0xa8fd, 0xa8fe, 0xa8ff, - 0xa900, 0xa901, 0xa902, 0xa903, 0xa904, 0xa905, 0xa906, 0xa907, - 0xa908, 0xa909, 0xa90a, 0xa90b, 0xa90c, 0xa90d, 0xa90e, 0xa90f, - 0xa910, 0xa911, 0xa912, 0xa913, 0xa914, 0xa915, 0xa916, 0xa917, - 0xa918, 0xa919, 0xa91a, 0xa91b, 0xa91c, 0xa91d, 0xa91e, 0xa91f, - 0xa920, 0xa921, 0xa922, 0xa923, 0xa924, 0xa925, 0xa926, 0xa927, - 0xa928, 0xa929, 0xa92a, 0xa92b, 0xa92c, 0xa92d, 0xa92e, 0xa92f, - 0xa930, 0xa931, 0xa932, 0xa933, 0xa934, 0xa935, 0xa936, 0xa937, - 0xa938, 0xa939, 0xa93a, 0xa93b, 0xa93c, 0xa93d, 0xa93e, 0xa93f, - 0xa940, 0xa941, 0xa942, 0xa943, 0xa944, 0xa945, 0xa946, 0xa947, - 0xa948, 0xa949, 0xa94a, 0xa94b, 0xa94c, 0xa94d, 0xa94e, 0xa94f, - 0xa950, 0xa951, 0xa952, 0xa953, 0xa954, 0xa955, 0xa956, 0xa957, - 0xa958, 0xa959, 0xa95a, 0xa95b, 0xa95c, 0xa95d, 0xa95e, 0xa95f, - 0xa960, 0xa961, 0xa962, 0xa963, 0xa964, 0xa965, 0xa966, 0xa967, - 0xa968, 0xa969, 0xa96a, 0xa96b, 0xa96c, 0xa96d, 0xa96e, 0xa96f, - 0xa970, 0xa971, 0xa972, 0xa973, 0xa974, 0xa975, 0xa976, 0xa977, - 0xa978, 0xa979, 0xa97a, 0xa97b, 0xa97c, 0xa97d, 0xa97e, 0xa97f, - 0xa980, 0xa981, 0xa982, 0xa983, 0xa984, 0xa985, 0xa986, 0xa987, - 0xa988, 0xa989, 0xa98a, 0xa98b, 0xa98c, 0xa98d, 0xa98e, 0xa98f, - 0xa990, 0xa991, 0xa992, 0xa993, 0xa994, 0xa995, 0xa996, 0xa997, - 0xa998, 0xa999, 0xa99a, 0xa99b, 0xa99c, 0xa99d, 0xa99e, 0xa99f, - 0xa9a0, 0xa9a1, 0xa9a2, 0xa9a3, 0xa9a4, 0xa9a5, 0xa9a6, 0xa9a7, - 0xa9a8, 0xa9a9, 0xa9aa, 0xa9ab, 0xa9ac, 0xa9ad, 0xa9ae, 0xa9af, - 0xa9b0, 0xa9b1, 0xa9b2, 0xa9b3, 0xa9b4, 0xa9b5, 0xa9b6, 0xa9b7, - 0xa9b8, 0xa9b9, 0xa9ba, 0xa9bb, 0xa9bc, 0xa9bd, 0xa9be, 0xa9bf, - 0xa9c0, 0xa9c1, 0xa9c2, 0xa9c3, 0xa9c4, 0xa9c5, 0xa9c6, 0xa9c7, - 0xa9c8, 0xa9c9, 0xa9ca, 0xa9cb, 0xa9cc, 0xa9cd, 0xa9ce, 0xa9cf, - 0xa9d0, 0xa9d1, 0xa9d2, 0xa9d3, 0xa9d4, 0xa9d5, 0xa9d6, 0xa9d7, - 0xa9d8, 0xa9d9, 0xa9da, 0xa9db, 0xa9dc, 0xa9dd, 0xa9de, 0xa9df, - 0xa9e0, 0xa9e1, 0xa9e2, 0xa9e3, 0xa9e4, 0xa9e5, 0xa9e6, 0xa9e7, - 0xa9e8, 0xa9e9, 0xa9ea, 0xa9eb, 0xa9ec, 0xa9ed, 0xa9ee, 0xa9ef, - 0xa9f0, 0xa9f1, 0xa9f2, 0xa9f3, 0xa9f4, 0xa9f5, 0xa9f6, 0xa9f7, - 0xa9f8, 0xa9f9, 0xa9fa, 0xa9fb, 0xa9fc, 0xa9fd, 0xa9fe, 0xa9ff, - 0xaa00, 0xaa01, 0xaa02, 0xaa03, 0xaa04, 0xaa05, 0xaa06, 0xaa07, - 0xaa08, 0xaa09, 0xaa0a, 0xaa0b, 0xaa0c, 0xaa0d, 0xaa0e, 0xaa0f, - 0xaa10, 0xaa11, 0xaa12, 0xaa13, 0xaa14, 0xaa15, 0xaa16, 0xaa17, - 0xaa18, 0xaa19, 0xaa1a, 0xaa1b, 0xaa1c, 0xaa1d, 0xaa1e, 0xaa1f, - 0xaa20, 0xaa21, 0xaa22, 0xaa23, 0xaa24, 0xaa25, 0xaa26, 0xaa27, - 0xaa28, 0xaa29, 0xaa2a, 0xaa2b, 0xaa2c, 0xaa2d, 0xaa2e, 0xaa2f, - 0xaa30, 0xaa31, 0xaa32, 0xaa33, 0xaa34, 0xaa35, 0xaa36, 0xaa37, - 0xaa38, 0xaa39, 0xaa3a, 0xaa3b, 0xaa3c, 0xaa3d, 0xaa3e, 0xaa3f, - 0xaa40, 0xaa41, 0xaa42, 0xaa43, 0xaa44, 0xaa45, 0xaa46, 0xaa47, - 0xaa48, 0xaa49, 0xaa4a, 0xaa4b, 0xaa4c, 0xaa4d, 0xaa4e, 0xaa4f, - 0xaa50, 0xaa51, 0xaa52, 0xaa53, 0xaa54, 0xaa55, 0xaa56, 0xaa57, - 0xaa58, 0xaa59, 0xaa5a, 0xaa5b, 0xaa5c, 0xaa5d, 0xaa5e, 0xaa5f, - 0xaa60, 0xaa61, 0xaa62, 0xaa63, 0xaa64, 0xaa65, 0xaa66, 0xaa67, - 0xaa68, 0xaa69, 0xaa6a, 0xaa6b, 0xaa6c, 0xaa6d, 0xaa6e, 0xaa6f, - 0xaa70, 0xaa71, 0xaa72, 0xaa73, 0xaa74, 0xaa75, 0xaa76, 0xaa77, - 0xaa78, 0xaa79, 0xaa7a, 0xaa7b, 0xaa7c, 0xaa7d, 0xaa7e, 0xaa7f, - 0xaa80, 0xaa81, 0xaa82, 0xaa83, 0xaa84, 0xaa85, 0xaa86, 0xaa87, - 0xaa88, 0xaa89, 0xaa8a, 0xaa8b, 0xaa8c, 0xaa8d, 0xaa8e, 0xaa8f, - 0xaa90, 0xaa91, 0xaa92, 0xaa93, 0xaa94, 0xaa95, 0xaa96, 0xaa97, - 0xaa98, 0xaa99, 0xaa9a, 0xaa9b, 0xaa9c, 0xaa9d, 0xaa9e, 0xaa9f, - 0xaaa0, 0xaaa1, 0xaaa2, 0xaaa3, 0xaaa4, 0xaaa5, 0xaaa6, 0xaaa7, - 0xaaa8, 0xaaa9, 0xaaaa, 0xaaab, 0xaaac, 0xaaad, 0xaaae, 0xaaaf, - 0xaab0, 0xaab1, 0xaab2, 0xaab3, 0xaab4, 0xaab5, 0xaab6, 0xaab7, - 0xaab8, 0xaab9, 0xaaba, 0xaabb, 0xaabc, 0xaabd, 0xaabe, 0xaabf, - 0xaac0, 0xaac1, 0xaac2, 0xaac3, 0xaac4, 0xaac5, 0xaac6, 0xaac7, - 0xaac8, 0xaac9, 0xaaca, 0xaacb, 0xaacc, 0xaacd, 0xaace, 0xaacf, - 0xaad0, 0xaad1, 0xaad2, 0xaad3, 0xaad4, 0xaad5, 0xaad6, 0xaad7, - 0xaad8, 0xaad9, 0xaada, 0xaadb, 0xaadc, 0xaadd, 0xaade, 0xaadf, - 0xaae0, 0xaae1, 0xaae2, 0xaae3, 0xaae4, 0xaae5, 0xaae6, 0xaae7, - 0xaae8, 0xaae9, 0xaaea, 0xaaeb, 0xaaec, 0xaaed, 0xaaee, 0xaaef, - 0xaaf0, 0xaaf1, 0xaaf2, 0xaaf3, 0xaaf4, 0xaaf5, 0xaaf6, 0xaaf7, - 0xaaf8, 0xaaf9, 0xaafa, 0xaafb, 0xaafc, 0xaafd, 0xaafe, 0xaaff, - 0xab00, 0xab01, 0xab02, 0xab03, 0xab04, 0xab05, 0xab06, 0xab07, - 0xab08, 0xab09, 0xab0a, 0xab0b, 0xab0c, 0xab0d, 0xab0e, 0xab0f, - 0xab10, 0xab11, 0xab12, 0xab13, 0xab14, 0xab15, 0xab16, 0xab17, - 0xab18, 0xab19, 0xab1a, 0xab1b, 0xab1c, 0xab1d, 0xab1e, 0xab1f, - 0xab20, 0xab21, 0xab22, 0xab23, 0xab24, 0xab25, 0xab26, 0xab27, - 0xab28, 0xab29, 0xab2a, 0xab2b, 0xab2c, 0xab2d, 0xab2e, 0xab2f, - 0xab30, 0xab31, 0xab32, 0xab33, 0xab34, 0xab35, 0xab36, 0xab37, - 0xab38, 0xab39, 0xab3a, 0xab3b, 0xab3c, 0xab3d, 0xab3e, 0xab3f, - 0xab40, 0xab41, 0xab42, 0xab43, 0xab44, 0xab45, 0xab46, 0xab47, - 0xab48, 0xab49, 0xab4a, 0xab4b, 0xab4c, 0xab4d, 0xab4e, 0xab4f, - 0xab50, 0xab51, 0xab52, 0xab53, 0xab54, 0xab55, 0xab56, 0xab57, - 0xab58, 0xab59, 0xab5a, 0xab5b, 0xab5c, 0xab5d, 0xab5e, 0xab5f, - 0xab60, 0xab61, 0xab62, 0xab63, 0xab64, 0xab65, 0xab66, 0xab67, - 0xab68, 0xab69, 0xab6a, 0xab6b, 0xab6c, 0xab6d, 0xab6e, 0xab6f, - 0xab70, 0xab71, 0xab72, 0xab73, 0xab74, 0xab75, 0xab76, 0xab77, - 0xab78, 0xab79, 0xab7a, 0xab7b, 0xab7c, 0xab7d, 0xab7e, 0xab7f, - 0xab80, 0xab81, 0xab82, 0xab83, 0xab84, 0xab85, 0xab86, 0xab87, - 0xab88, 0xab89, 0xab8a, 0xab8b, 0xab8c, 0xab8d, 0xab8e, 0xab8f, - 0xab90, 0xab91, 0xab92, 0xab93, 0xab94, 0xab95, 0xab96, 0xab97, - 0xab98, 0xab99, 0xab9a, 0xab9b, 0xab9c, 0xab9d, 0xab9e, 0xab9f, - 0xaba0, 0xaba1, 0xaba2, 0xaba3, 0xaba4, 0xaba5, 0xaba6, 0xaba7, - 0xaba8, 0xaba9, 0xabaa, 0xabab, 0xabac, 0xabad, 0xabae, 0xabaf, - 0xabb0, 0xabb1, 0xabb2, 0xabb3, 0xabb4, 0xabb5, 0xabb6, 0xabb7, - 0xabb8, 0xabb9, 0xabba, 0xabbb, 0xabbc, 0xabbd, 0xabbe, 0xabbf, - 0xabc0, 0xabc1, 0xabc2, 0xabc3, 0xabc4, 0xabc5, 0xabc6, 0xabc7, - 0xabc8, 0xabc9, 0xabca, 0xabcb, 0xabcc, 0xabcd, 0xabce, 0xabcf, - 0xabd0, 0xabd1, 0xabd2, 0xabd3, 0xabd4, 0xabd5, 0xabd6, 0xabd7, - 0xabd8, 0xabd9, 0xabda, 0xabdb, 0xabdc, 0xabdd, 0xabde, 0xabdf, - 0xabe0, 0xabe1, 0xabe2, 0xabe3, 0xabe4, 0xabe5, 0xabe6, 0xabe7, - 0xabe8, 0xabe9, 0xabea, 0xabeb, 0xabec, 0xabed, 0xabee, 0xabef, - 0xabf0, 0xabf1, 0xabf2, 0xabf3, 0xabf4, 0xabf5, 0xabf6, 0xabf7, - 0xabf8, 0xabf9, 0xabfa, 0xabfb, 0xabfc, 0xabfd, 0xabfe, 0xabff, - 0xac00, 0xac01, 0xac02, 0xac03, 0xac04, 0xac05, 0xac06, 0xac07, - 0xac08, 0xac09, 0xac0a, 0xac0b, 0xac0c, 0xac0d, 0xac0e, 0xac0f, - 0xac10, 0xac11, 0xac12, 0xac13, 0xac14, 0xac15, 0xac16, 0xac17, - 0xac18, 0xac19, 0xac1a, 0xac1b, 0xac1c, 0xac1d, 0xac1e, 0xac1f, - 0xac20, 0xac21, 0xac22, 0xac23, 0xac24, 0xac25, 0xac26, 0xac27, - 0xac28, 0xac29, 0xac2a, 0xac2b, 0xac2c, 0xac2d, 0xac2e, 0xac2f, - 0xac30, 0xac31, 0xac32, 0xac33, 0xac34, 0xac35, 0xac36, 0xac37, - 0xac38, 0xac39, 0xac3a, 0xac3b, 0xac3c, 0xac3d, 0xac3e, 0xac3f, - 0xac40, 0xac41, 0xac42, 0xac43, 0xac44, 0xac45, 0xac46, 0xac47, - 0xac48, 0xac49, 0xac4a, 0xac4b, 0xac4c, 0xac4d, 0xac4e, 0xac4f, - 0xac50, 0xac51, 0xac52, 0xac53, 0xac54, 0xac55, 0xac56, 0xac57, - 0xac58, 0xac59, 0xac5a, 0xac5b, 0xac5c, 0xac5d, 0xac5e, 0xac5f, - 0xac60, 0xac61, 0xac62, 0xac63, 0xac64, 0xac65, 0xac66, 0xac67, - 0xac68, 0xac69, 0xac6a, 0xac6b, 0xac6c, 0xac6d, 0xac6e, 0xac6f, - 0xac70, 0xac71, 0xac72, 0xac73, 0xac74, 0xac75, 0xac76, 0xac77, - 0xac78, 0xac79, 0xac7a, 0xac7b, 0xac7c, 0xac7d, 0xac7e, 0xac7f, - 0xac80, 0xac81, 0xac82, 0xac83, 0xac84, 0xac85, 0xac86, 0xac87, - 0xac88, 0xac89, 0xac8a, 0xac8b, 0xac8c, 0xac8d, 0xac8e, 0xac8f, - 0xac90, 0xac91, 0xac92, 0xac93, 0xac94, 0xac95, 0xac96, 0xac97, - 0xac98, 0xac99, 0xac9a, 0xac9b, 0xac9c, 0xac9d, 0xac9e, 0xac9f, - 0xaca0, 0xaca1, 0xaca2, 0xaca3, 0xaca4, 0xaca5, 0xaca6, 0xaca7, - 0xaca8, 0xaca9, 0xacaa, 0xacab, 0xacac, 0xacad, 0xacae, 0xacaf, - 0xacb0, 0xacb1, 0xacb2, 0xacb3, 0xacb4, 0xacb5, 0xacb6, 0xacb7, - 0xacb8, 0xacb9, 0xacba, 0xacbb, 0xacbc, 0xacbd, 0xacbe, 0xacbf, - 0xacc0, 0xacc1, 0xacc2, 0xacc3, 0xacc4, 0xacc5, 0xacc6, 0xacc7, - 0xacc8, 0xacc9, 0xacca, 0xaccb, 0xaccc, 0xaccd, 0xacce, 0xaccf, - 0xacd0, 0xacd1, 0xacd2, 0xacd3, 0xacd4, 0xacd5, 0xacd6, 0xacd7, - 0xacd8, 0xacd9, 0xacda, 0xacdb, 0xacdc, 0xacdd, 0xacde, 0xacdf, - 0xace0, 0xace1, 0xace2, 0xace3, 0xace4, 0xace5, 0xace6, 0xace7, - 0xace8, 0xace9, 0xacea, 0xaceb, 0xacec, 0xaced, 0xacee, 0xacef, - 0xacf0, 0xacf1, 0xacf2, 0xacf3, 0xacf4, 0xacf5, 0xacf6, 0xacf7, - 0xacf8, 0xacf9, 0xacfa, 0xacfb, 0xacfc, 0xacfd, 0xacfe, 0xacff, - 0xad00, 0xad01, 0xad02, 0xad03, 0xad04, 0xad05, 0xad06, 0xad07, - 0xad08, 0xad09, 0xad0a, 0xad0b, 0xad0c, 0xad0d, 0xad0e, 0xad0f, - 0xad10, 0xad11, 0xad12, 0xad13, 0xad14, 0xad15, 0xad16, 0xad17, - 0xad18, 0xad19, 0xad1a, 0xad1b, 0xad1c, 0xad1d, 0xad1e, 0xad1f, - 0xad20, 0xad21, 0xad22, 0xad23, 0xad24, 0xad25, 0xad26, 0xad27, - 0xad28, 0xad29, 0xad2a, 0xad2b, 0xad2c, 0xad2d, 0xad2e, 0xad2f, - 0xad30, 0xad31, 0xad32, 0xad33, 0xad34, 0xad35, 0xad36, 0xad37, - 0xad38, 0xad39, 0xad3a, 0xad3b, 0xad3c, 0xad3d, 0xad3e, 0xad3f, - 0xad40, 0xad41, 0xad42, 0xad43, 0xad44, 0xad45, 0xad46, 0xad47, - 0xad48, 0xad49, 0xad4a, 0xad4b, 0xad4c, 0xad4d, 0xad4e, 0xad4f, - 0xad50, 0xad51, 0xad52, 0xad53, 0xad54, 0xad55, 0xad56, 0xad57, - 0xad58, 0xad59, 0xad5a, 0xad5b, 0xad5c, 0xad5d, 0xad5e, 0xad5f, - 0xad60, 0xad61, 0xad62, 0xad63, 0xad64, 0xad65, 0xad66, 0xad67, - 0xad68, 0xad69, 0xad6a, 0xad6b, 0xad6c, 0xad6d, 0xad6e, 0xad6f, - 0xad70, 0xad71, 0xad72, 0xad73, 0xad74, 0xad75, 0xad76, 0xad77, - 0xad78, 0xad79, 0xad7a, 0xad7b, 0xad7c, 0xad7d, 0xad7e, 0xad7f, - 0xad80, 0xad81, 0xad82, 0xad83, 0xad84, 0xad85, 0xad86, 0xad87, - 0xad88, 0xad89, 0xad8a, 0xad8b, 0xad8c, 0xad8d, 0xad8e, 0xad8f, - 0xad90, 0xad91, 0xad92, 0xad93, 0xad94, 0xad95, 0xad96, 0xad97, - 0xad98, 0xad99, 0xad9a, 0xad9b, 0xad9c, 0xad9d, 0xad9e, 0xad9f, - 0xada0, 0xada1, 0xada2, 0xada3, 0xada4, 0xada5, 0xada6, 0xada7, - 0xada8, 0xada9, 0xadaa, 0xadab, 0xadac, 0xadad, 0xadae, 0xadaf, - 0xadb0, 0xadb1, 0xadb2, 0xadb3, 0xadb4, 0xadb5, 0xadb6, 0xadb7, - 0xadb8, 0xadb9, 0xadba, 0xadbb, 0xadbc, 0xadbd, 0xadbe, 0xadbf, - 0xadc0, 0xadc1, 0xadc2, 0xadc3, 0xadc4, 0xadc5, 0xadc6, 0xadc7, - 0xadc8, 0xadc9, 0xadca, 0xadcb, 0xadcc, 0xadcd, 0xadce, 0xadcf, - 0xadd0, 0xadd1, 0xadd2, 0xadd3, 0xadd4, 0xadd5, 0xadd6, 0xadd7, - 0xadd8, 0xadd9, 0xadda, 0xaddb, 0xaddc, 0xaddd, 0xadde, 0xaddf, - 0xade0, 0xade1, 0xade2, 0xade3, 0xade4, 0xade5, 0xade6, 0xade7, - 0xade8, 0xade9, 0xadea, 0xadeb, 0xadec, 0xaded, 0xadee, 0xadef, - 0xadf0, 0xadf1, 0xadf2, 0xadf3, 0xadf4, 0xadf5, 0xadf6, 0xadf7, - 0xadf8, 0xadf9, 0xadfa, 0xadfb, 0xadfc, 0xadfd, 0xadfe, 0xadff, - 0xae00, 0xae01, 0xae02, 0xae03, 0xae04, 0xae05, 0xae06, 0xae07, - 0xae08, 0xae09, 0xae0a, 0xae0b, 0xae0c, 0xae0d, 0xae0e, 0xae0f, - 0xae10, 0xae11, 0xae12, 0xae13, 0xae14, 0xae15, 0xae16, 0xae17, - 0xae18, 0xae19, 0xae1a, 0xae1b, 0xae1c, 0xae1d, 0xae1e, 0xae1f, - 0xae20, 0xae21, 0xae22, 0xae23, 0xae24, 0xae25, 0xae26, 0xae27, - 0xae28, 0xae29, 0xae2a, 0xae2b, 0xae2c, 0xae2d, 0xae2e, 0xae2f, - 0xae30, 0xae31, 0xae32, 0xae33, 0xae34, 0xae35, 0xae36, 0xae37, - 0xae38, 0xae39, 0xae3a, 0xae3b, 0xae3c, 0xae3d, 0xae3e, 0xae3f, - 0xae40, 0xae41, 0xae42, 0xae43, 0xae44, 0xae45, 0xae46, 0xae47, - 0xae48, 0xae49, 0xae4a, 0xae4b, 0xae4c, 0xae4d, 0xae4e, 0xae4f, - 0xae50, 0xae51, 0xae52, 0xae53, 0xae54, 0xae55, 0xae56, 0xae57, - 0xae58, 0xae59, 0xae5a, 0xae5b, 0xae5c, 0xae5d, 0xae5e, 0xae5f, - 0xae60, 0xae61, 0xae62, 0xae63, 0xae64, 0xae65, 0xae66, 0xae67, - 0xae68, 0xae69, 0xae6a, 0xae6b, 0xae6c, 0xae6d, 0xae6e, 0xae6f, - 0xae70, 0xae71, 0xae72, 0xae73, 0xae74, 0xae75, 0xae76, 0xae77, - 0xae78, 0xae79, 0xae7a, 0xae7b, 0xae7c, 0xae7d, 0xae7e, 0xae7f, - 0xae80, 0xae81, 0xae82, 0xae83, 0xae84, 0xae85, 0xae86, 0xae87, - 0xae88, 0xae89, 0xae8a, 0xae8b, 0xae8c, 0xae8d, 0xae8e, 0xae8f, - 0xae90, 0xae91, 0xae92, 0xae93, 0xae94, 0xae95, 0xae96, 0xae97, - 0xae98, 0xae99, 0xae9a, 0xae9b, 0xae9c, 0xae9d, 0xae9e, 0xae9f, - 0xaea0, 0xaea1, 0xaea2, 0xaea3, 0xaea4, 0xaea5, 0xaea6, 0xaea7, - 0xaea8, 0xaea9, 0xaeaa, 0xaeab, 0xaeac, 0xaead, 0xaeae, 0xaeaf, - 0xaeb0, 0xaeb1, 0xaeb2, 0xaeb3, 0xaeb4, 0xaeb5, 0xaeb6, 0xaeb7, - 0xaeb8, 0xaeb9, 0xaeba, 0xaebb, 0xaebc, 0xaebd, 0xaebe, 0xaebf, - 0xaec0, 0xaec1, 0xaec2, 0xaec3, 0xaec4, 0xaec5, 0xaec6, 0xaec7, - 0xaec8, 0xaec9, 0xaeca, 0xaecb, 0xaecc, 0xaecd, 0xaece, 0xaecf, - 0xaed0, 0xaed1, 0xaed2, 0xaed3, 0xaed4, 0xaed5, 0xaed6, 0xaed7, - 0xaed8, 0xaed9, 0xaeda, 0xaedb, 0xaedc, 0xaedd, 0xaede, 0xaedf, - 0xaee0, 0xaee1, 0xaee2, 0xaee3, 0xaee4, 0xaee5, 0xaee6, 0xaee7, - 0xaee8, 0xaee9, 0xaeea, 0xaeeb, 0xaeec, 0xaeed, 0xaeee, 0xaeef, - 0xaef0, 0xaef1, 0xaef2, 0xaef3, 0xaef4, 0xaef5, 0xaef6, 0xaef7, - 0xaef8, 0xaef9, 0xaefa, 0xaefb, 0xaefc, 0xaefd, 0xaefe, 0xaeff, - 0xaf00, 0xaf01, 0xaf02, 0xaf03, 0xaf04, 0xaf05, 0xaf06, 0xaf07, - 0xaf08, 0xaf09, 0xaf0a, 0xaf0b, 0xaf0c, 0xaf0d, 0xaf0e, 0xaf0f, - 0xaf10, 0xaf11, 0xaf12, 0xaf13, 0xaf14, 0xaf15, 0xaf16, 0xaf17, - 0xaf18, 0xaf19, 0xaf1a, 0xaf1b, 0xaf1c, 0xaf1d, 0xaf1e, 0xaf1f, - 0xaf20, 0xaf21, 0xaf22, 0xaf23, 0xaf24, 0xaf25, 0xaf26, 0xaf27, - 0xaf28, 0xaf29, 0xaf2a, 0xaf2b, 0xaf2c, 0xaf2d, 0xaf2e, 0xaf2f, - 0xaf30, 0xaf31, 0xaf32, 0xaf33, 0xaf34, 0xaf35, 0xaf36, 0xaf37, - 0xaf38, 0xaf39, 0xaf3a, 0xaf3b, 0xaf3c, 0xaf3d, 0xaf3e, 0xaf3f, - 0xaf40, 0xaf41, 0xaf42, 0xaf43, 0xaf44, 0xaf45, 0xaf46, 0xaf47, - 0xaf48, 0xaf49, 0xaf4a, 0xaf4b, 0xaf4c, 0xaf4d, 0xaf4e, 0xaf4f, - 0xaf50, 0xaf51, 0xaf52, 0xaf53, 0xaf54, 0xaf55, 0xaf56, 0xaf57, - 0xaf58, 0xaf59, 0xaf5a, 0xaf5b, 0xaf5c, 0xaf5d, 0xaf5e, 0xaf5f, - 0xaf60, 0xaf61, 0xaf62, 0xaf63, 0xaf64, 0xaf65, 0xaf66, 0xaf67, - 0xaf68, 0xaf69, 0xaf6a, 0xaf6b, 0xaf6c, 0xaf6d, 0xaf6e, 0xaf6f, - 0xaf70, 0xaf71, 0xaf72, 0xaf73, 0xaf74, 0xaf75, 0xaf76, 0xaf77, - 0xaf78, 0xaf79, 0xaf7a, 0xaf7b, 0xaf7c, 0xaf7d, 0xaf7e, 0xaf7f, - 0xaf80, 0xaf81, 0xaf82, 0xaf83, 0xaf84, 0xaf85, 0xaf86, 0xaf87, - 0xaf88, 0xaf89, 0xaf8a, 0xaf8b, 0xaf8c, 0xaf8d, 0xaf8e, 0xaf8f, - 0xaf90, 0xaf91, 0xaf92, 0xaf93, 0xaf94, 0xaf95, 0xaf96, 0xaf97, - 0xaf98, 0xaf99, 0xaf9a, 0xaf9b, 0xaf9c, 0xaf9d, 0xaf9e, 0xaf9f, - 0xafa0, 0xafa1, 0xafa2, 0xafa3, 0xafa4, 0xafa5, 0xafa6, 0xafa7, - 0xafa8, 0xafa9, 0xafaa, 0xafab, 0xafac, 0xafad, 0xafae, 0xafaf, - 0xafb0, 0xafb1, 0xafb2, 0xafb3, 0xafb4, 0xafb5, 0xafb6, 0xafb7, - 0xafb8, 0xafb9, 0xafba, 0xafbb, 0xafbc, 0xafbd, 0xafbe, 0xafbf, - 0xafc0, 0xafc1, 0xafc2, 0xafc3, 0xafc4, 0xafc5, 0xafc6, 0xafc7, - 0xafc8, 0xafc9, 0xafca, 0xafcb, 0xafcc, 0xafcd, 0xafce, 0xafcf, - 0xafd0, 0xafd1, 0xafd2, 0xafd3, 0xafd4, 0xafd5, 0xafd6, 0xafd7, - 0xafd8, 0xafd9, 0xafda, 0xafdb, 0xafdc, 0xafdd, 0xafde, 0xafdf, - 0xafe0, 0xafe1, 0xafe2, 0xafe3, 0xafe4, 0xafe5, 0xafe6, 0xafe7, - 0xafe8, 0xafe9, 0xafea, 0xafeb, 0xafec, 0xafed, 0xafee, 0xafef, - 0xaff0, 0xaff1, 0xaff2, 0xaff3, 0xaff4, 0xaff5, 0xaff6, 0xaff7, - 0xaff8, 0xaff9, 0xaffa, 0xaffb, 0xaffc, 0xaffd, 0xaffe, 0xafff, - 0xb000, 0xb001, 0xb002, 0xb003, 0xb004, 0xb005, 0xb006, 0xb007, - 0xb008, 0xb009, 0xb00a, 0xb00b, 0xb00c, 0xb00d, 0xb00e, 0xb00f, - 0xb010, 0xb011, 0xb012, 0xb013, 0xb014, 0xb015, 0xb016, 0xb017, - 0xb018, 0xb019, 0xb01a, 0xb01b, 0xb01c, 0xb01d, 0xb01e, 0xb01f, - 0xb020, 0xb021, 0xb022, 0xb023, 0xb024, 0xb025, 0xb026, 0xb027, - 0xb028, 0xb029, 0xb02a, 0xb02b, 0xb02c, 0xb02d, 0xb02e, 0xb02f, - 0xb030, 0xb031, 0xb032, 0xb033, 0xb034, 0xb035, 0xb036, 0xb037, - 0xb038, 0xb039, 0xb03a, 0xb03b, 0xb03c, 0xb03d, 0xb03e, 0xb03f, - 0xb040, 0xb041, 0xb042, 0xb043, 0xb044, 0xb045, 0xb046, 0xb047, - 0xb048, 0xb049, 0xb04a, 0xb04b, 0xb04c, 0xb04d, 0xb04e, 0xb04f, - 0xb050, 0xb051, 0xb052, 0xb053, 0xb054, 0xb055, 0xb056, 0xb057, - 0xb058, 0xb059, 0xb05a, 0xb05b, 0xb05c, 0xb05d, 0xb05e, 0xb05f, - 0xb060, 0xb061, 0xb062, 0xb063, 0xb064, 0xb065, 0xb066, 0xb067, - 0xb068, 0xb069, 0xb06a, 0xb06b, 0xb06c, 0xb06d, 0xb06e, 0xb06f, - 0xb070, 0xb071, 0xb072, 0xb073, 0xb074, 0xb075, 0xb076, 0xb077, - 0xb078, 0xb079, 0xb07a, 0xb07b, 0xb07c, 0xb07d, 0xb07e, 0xb07f, - 0xb080, 0xb081, 0xb082, 0xb083, 0xb084, 0xb085, 0xb086, 0xb087, - 0xb088, 0xb089, 0xb08a, 0xb08b, 0xb08c, 0xb08d, 0xb08e, 0xb08f, - 0xb090, 0xb091, 0xb092, 0xb093, 0xb094, 0xb095, 0xb096, 0xb097, - 0xb098, 0xb099, 0xb09a, 0xb09b, 0xb09c, 0xb09d, 0xb09e, 0xb09f, - 0xb0a0, 0xb0a1, 0xb0a2, 0xb0a3, 0xb0a4, 0xb0a5, 0xb0a6, 0xb0a7, - 0xb0a8, 0xb0a9, 0xb0aa, 0xb0ab, 0xb0ac, 0xb0ad, 0xb0ae, 0xb0af, - 0xb0b0, 0xb0b1, 0xb0b2, 0xb0b3, 0xb0b4, 0xb0b5, 0xb0b6, 0xb0b7, - 0xb0b8, 0xb0b9, 0xb0ba, 0xb0bb, 0xb0bc, 0xb0bd, 0xb0be, 0xb0bf, - 0xb0c0, 0xb0c1, 0xb0c2, 0xb0c3, 0xb0c4, 0xb0c5, 0xb0c6, 0xb0c7, - 0xb0c8, 0xb0c9, 0xb0ca, 0xb0cb, 0xb0cc, 0xb0cd, 0xb0ce, 0xb0cf, - 0xb0d0, 0xb0d1, 0xb0d2, 0xb0d3, 0xb0d4, 0xb0d5, 0xb0d6, 0xb0d7, - 0xb0d8, 0xb0d9, 0xb0da, 0xb0db, 0xb0dc, 0xb0dd, 0xb0de, 0xb0df, - 0xb0e0, 0xb0e1, 0xb0e2, 0xb0e3, 0xb0e4, 0xb0e5, 0xb0e6, 0xb0e7, - 0xb0e8, 0xb0e9, 0xb0ea, 0xb0eb, 0xb0ec, 0xb0ed, 0xb0ee, 0xb0ef, - 0xb0f0, 0xb0f1, 0xb0f2, 0xb0f3, 0xb0f4, 0xb0f5, 0xb0f6, 0xb0f7, - 0xb0f8, 0xb0f9, 0xb0fa, 0xb0fb, 0xb0fc, 0xb0fd, 0xb0fe, 0xb0ff, - 0xb100, 0xb101, 0xb102, 0xb103, 0xb104, 0xb105, 0xb106, 0xb107, - 0xb108, 0xb109, 0xb10a, 0xb10b, 0xb10c, 0xb10d, 0xb10e, 0xb10f, - 0xb110, 0xb111, 0xb112, 0xb113, 0xb114, 0xb115, 0xb116, 0xb117, - 0xb118, 0xb119, 0xb11a, 0xb11b, 0xb11c, 0xb11d, 0xb11e, 0xb11f, - 0xb120, 0xb121, 0xb122, 0xb123, 0xb124, 0xb125, 0xb126, 0xb127, - 0xb128, 0xb129, 0xb12a, 0xb12b, 0xb12c, 0xb12d, 0xb12e, 0xb12f, - 0xb130, 0xb131, 0xb132, 0xb133, 0xb134, 0xb135, 0xb136, 0xb137, - 0xb138, 0xb139, 0xb13a, 0xb13b, 0xb13c, 0xb13d, 0xb13e, 0xb13f, - 0xb140, 0xb141, 0xb142, 0xb143, 0xb144, 0xb145, 0xb146, 0xb147, - 0xb148, 0xb149, 0xb14a, 0xb14b, 0xb14c, 0xb14d, 0xb14e, 0xb14f, - 0xb150, 0xb151, 0xb152, 0xb153, 0xb154, 0xb155, 0xb156, 0xb157, - 0xb158, 0xb159, 0xb15a, 0xb15b, 0xb15c, 0xb15d, 0xb15e, 0xb15f, - 0xb160, 0xb161, 0xb162, 0xb163, 0xb164, 0xb165, 0xb166, 0xb167, - 0xb168, 0xb169, 0xb16a, 0xb16b, 0xb16c, 0xb16d, 0xb16e, 0xb16f, - 0xb170, 0xb171, 0xb172, 0xb173, 0xb174, 0xb175, 0xb176, 0xb177, - 0xb178, 0xb179, 0xb17a, 0xb17b, 0xb17c, 0xb17d, 0xb17e, 0xb17f, - 0xb180, 0xb181, 0xb182, 0xb183, 0xb184, 0xb185, 0xb186, 0xb187, - 0xb188, 0xb189, 0xb18a, 0xb18b, 0xb18c, 0xb18d, 0xb18e, 0xb18f, - 0xb190, 0xb191, 0xb192, 0xb193, 0xb194, 0xb195, 0xb196, 0xb197, - 0xb198, 0xb199, 0xb19a, 0xb19b, 0xb19c, 0xb19d, 0xb19e, 0xb19f, - 0xb1a0, 0xb1a1, 0xb1a2, 0xb1a3, 0xb1a4, 0xb1a5, 0xb1a6, 0xb1a7, - 0xb1a8, 0xb1a9, 0xb1aa, 0xb1ab, 0xb1ac, 0xb1ad, 0xb1ae, 0xb1af, - 0xb1b0, 0xb1b1, 0xb1b2, 0xb1b3, 0xb1b4, 0xb1b5, 0xb1b6, 0xb1b7, - 0xb1b8, 0xb1b9, 0xb1ba, 0xb1bb, 0xb1bc, 0xb1bd, 0xb1be, 0xb1bf, - 0xb1c0, 0xb1c1, 0xb1c2, 0xb1c3, 0xb1c4, 0xb1c5, 0xb1c6, 0xb1c7, - 0xb1c8, 0xb1c9, 0xb1ca, 0xb1cb, 0xb1cc, 0xb1cd, 0xb1ce, 0xb1cf, - 0xb1d0, 0xb1d1, 0xb1d2, 0xb1d3, 0xb1d4, 0xb1d5, 0xb1d6, 0xb1d7, - 0xb1d8, 0xb1d9, 0xb1da, 0xb1db, 0xb1dc, 0xb1dd, 0xb1de, 0xb1df, - 0xb1e0, 0xb1e1, 0xb1e2, 0xb1e3, 0xb1e4, 0xb1e5, 0xb1e6, 0xb1e7, - 0xb1e8, 0xb1e9, 0xb1ea, 0xb1eb, 0xb1ec, 0xb1ed, 0xb1ee, 0xb1ef, - 0xb1f0, 0xb1f1, 0xb1f2, 0xb1f3, 0xb1f4, 0xb1f5, 0xb1f6, 0xb1f7, - 0xb1f8, 0xb1f9, 0xb1fa, 0xb1fb, 0xb1fc, 0xb1fd, 0xb1fe, 0xb1ff, - 0xb200, 0xb201, 0xb202, 0xb203, 0xb204, 0xb205, 0xb206, 0xb207, - 0xb208, 0xb209, 0xb20a, 0xb20b, 0xb20c, 0xb20d, 0xb20e, 0xb20f, - 0xb210, 0xb211, 0xb212, 0xb213, 0xb214, 0xb215, 0xb216, 0xb217, - 0xb218, 0xb219, 0xb21a, 0xb21b, 0xb21c, 0xb21d, 0xb21e, 0xb21f, - 0xb220, 0xb221, 0xb222, 0xb223, 0xb224, 0xb225, 0xb226, 0xb227, - 0xb228, 0xb229, 0xb22a, 0xb22b, 0xb22c, 0xb22d, 0xb22e, 0xb22f, - 0xb230, 0xb231, 0xb232, 0xb233, 0xb234, 0xb235, 0xb236, 0xb237, - 0xb238, 0xb239, 0xb23a, 0xb23b, 0xb23c, 0xb23d, 0xb23e, 0xb23f, - 0xb240, 0xb241, 0xb242, 0xb243, 0xb244, 0xb245, 0xb246, 0xb247, - 0xb248, 0xb249, 0xb24a, 0xb24b, 0xb24c, 0xb24d, 0xb24e, 0xb24f, - 0xb250, 0xb251, 0xb252, 0xb253, 0xb254, 0xb255, 0xb256, 0xb257, - 0xb258, 0xb259, 0xb25a, 0xb25b, 0xb25c, 0xb25d, 0xb25e, 0xb25f, - 0xb260, 0xb261, 0xb262, 0xb263, 0xb264, 0xb265, 0xb266, 0xb267, - 0xb268, 0xb269, 0xb26a, 0xb26b, 0xb26c, 0xb26d, 0xb26e, 0xb26f, - 0xb270, 0xb271, 0xb272, 0xb273, 0xb274, 0xb275, 0xb276, 0xb277, - 0xb278, 0xb279, 0xb27a, 0xb27b, 0xb27c, 0xb27d, 0xb27e, 0xb27f, - 0xb280, 0xb281, 0xb282, 0xb283, 0xb284, 0xb285, 0xb286, 0xb287, - 0xb288, 0xb289, 0xb28a, 0xb28b, 0xb28c, 0xb28d, 0xb28e, 0xb28f, - 0xb290, 0xb291, 0xb292, 0xb293, 0xb294, 0xb295, 0xb296, 0xb297, - 0xb298, 0xb299, 0xb29a, 0xb29b, 0xb29c, 0xb29d, 0xb29e, 0xb29f, - 0xb2a0, 0xb2a1, 0xb2a2, 0xb2a3, 0xb2a4, 0xb2a5, 0xb2a6, 0xb2a7, - 0xb2a8, 0xb2a9, 0xb2aa, 0xb2ab, 0xb2ac, 0xb2ad, 0xb2ae, 0xb2af, - 0xb2b0, 0xb2b1, 0xb2b2, 0xb2b3, 0xb2b4, 0xb2b5, 0xb2b6, 0xb2b7, - 0xb2b8, 0xb2b9, 0xb2ba, 0xb2bb, 0xb2bc, 0xb2bd, 0xb2be, 0xb2bf, - 0xb2c0, 0xb2c1, 0xb2c2, 0xb2c3, 0xb2c4, 0xb2c5, 0xb2c6, 0xb2c7, - 0xb2c8, 0xb2c9, 0xb2ca, 0xb2cb, 0xb2cc, 0xb2cd, 0xb2ce, 0xb2cf, - 0xb2d0, 0xb2d1, 0xb2d2, 0xb2d3, 0xb2d4, 0xb2d5, 0xb2d6, 0xb2d7, - 0xb2d8, 0xb2d9, 0xb2da, 0xb2db, 0xb2dc, 0xb2dd, 0xb2de, 0xb2df, - 0xb2e0, 0xb2e1, 0xb2e2, 0xb2e3, 0xb2e4, 0xb2e5, 0xb2e6, 0xb2e7, - 0xb2e8, 0xb2e9, 0xb2ea, 0xb2eb, 0xb2ec, 0xb2ed, 0xb2ee, 0xb2ef, - 0xb2f0, 0xb2f1, 0xb2f2, 0xb2f3, 0xb2f4, 0xb2f5, 0xb2f6, 0xb2f7, - 0xb2f8, 0xb2f9, 0xb2fa, 0xb2fb, 0xb2fc, 0xb2fd, 0xb2fe, 0xb2ff, - 0xb300, 0xb301, 0xb302, 0xb303, 0xb304, 0xb305, 0xb306, 0xb307, - 0xb308, 0xb309, 0xb30a, 0xb30b, 0xb30c, 0xb30d, 0xb30e, 0xb30f, - 0xb310, 0xb311, 0xb312, 0xb313, 0xb314, 0xb315, 0xb316, 0xb317, - 0xb318, 0xb319, 0xb31a, 0xb31b, 0xb31c, 0xb31d, 0xb31e, 0xb31f, - 0xb320, 0xb321, 0xb322, 0xb323, 0xb324, 0xb325, 0xb326, 0xb327, - 0xb328, 0xb329, 0xb32a, 0xb32b, 0xb32c, 0xb32d, 0xb32e, 0xb32f, - 0xb330, 0xb331, 0xb332, 0xb333, 0xb334, 0xb335, 0xb336, 0xb337, - 0xb338, 0xb339, 0xb33a, 0xb33b, 0xb33c, 0xb33d, 0xb33e, 0xb33f, - 0xb340, 0xb341, 0xb342, 0xb343, 0xb344, 0xb345, 0xb346, 0xb347, - 0xb348, 0xb349, 0xb34a, 0xb34b, 0xb34c, 0xb34d, 0xb34e, 0xb34f, - 0xb350, 0xb351, 0xb352, 0xb353, 0xb354, 0xb355, 0xb356, 0xb357, - 0xb358, 0xb359, 0xb35a, 0xb35b, 0xb35c, 0xb35d, 0xb35e, 0xb35f, - 0xb360, 0xb361, 0xb362, 0xb363, 0xb364, 0xb365, 0xb366, 0xb367, - 0xb368, 0xb369, 0xb36a, 0xb36b, 0xb36c, 0xb36d, 0xb36e, 0xb36f, - 0xb370, 0xb371, 0xb372, 0xb373, 0xb374, 0xb375, 0xb376, 0xb377, - 0xb378, 0xb379, 0xb37a, 0xb37b, 0xb37c, 0xb37d, 0xb37e, 0xb37f, - 0xb380, 0xb381, 0xb382, 0xb383, 0xb384, 0xb385, 0xb386, 0xb387, - 0xb388, 0xb389, 0xb38a, 0xb38b, 0xb38c, 0xb38d, 0xb38e, 0xb38f, - 0xb390, 0xb391, 0xb392, 0xb393, 0xb394, 0xb395, 0xb396, 0xb397, - 0xb398, 0xb399, 0xb39a, 0xb39b, 0xb39c, 0xb39d, 0xb39e, 0xb39f, - 0xb3a0, 0xb3a1, 0xb3a2, 0xb3a3, 0xb3a4, 0xb3a5, 0xb3a6, 0xb3a7, - 0xb3a8, 0xb3a9, 0xb3aa, 0xb3ab, 0xb3ac, 0xb3ad, 0xb3ae, 0xb3af, - 0xb3b0, 0xb3b1, 0xb3b2, 0xb3b3, 0xb3b4, 0xb3b5, 0xb3b6, 0xb3b7, - 0xb3b8, 0xb3b9, 0xb3ba, 0xb3bb, 0xb3bc, 0xb3bd, 0xb3be, 0xb3bf, - 0xb3c0, 0xb3c1, 0xb3c2, 0xb3c3, 0xb3c4, 0xb3c5, 0xb3c6, 0xb3c7, - 0xb3c8, 0xb3c9, 0xb3ca, 0xb3cb, 0xb3cc, 0xb3cd, 0xb3ce, 0xb3cf, - 0xb3d0, 0xb3d1, 0xb3d2, 0xb3d3, 0xb3d4, 0xb3d5, 0xb3d6, 0xb3d7, - 0xb3d8, 0xb3d9, 0xb3da, 0xb3db, 0xb3dc, 0xb3dd, 0xb3de, 0xb3df, - 0xb3e0, 0xb3e1, 0xb3e2, 0xb3e3, 0xb3e4, 0xb3e5, 0xb3e6, 0xb3e7, - 0xb3e8, 0xb3e9, 0xb3ea, 0xb3eb, 0xb3ec, 0xb3ed, 0xb3ee, 0xb3ef, - 0xb3f0, 0xb3f1, 0xb3f2, 0xb3f3, 0xb3f4, 0xb3f5, 0xb3f6, 0xb3f7, - 0xb3f8, 0xb3f9, 0xb3fa, 0xb3fb, 0xb3fc, 0xb3fd, 0xb3fe, 0xb3ff, - 0xb400, 0xb401, 0xb402, 0xb403, 0xb404, 0xb405, 0xb406, 0xb407, - 0xb408, 0xb409, 0xb40a, 0xb40b, 0xb40c, 0xb40d, 0xb40e, 0xb40f, - 0xb410, 0xb411, 0xb412, 0xb413, 0xb414, 0xb415, 0xb416, 0xb417, - 0xb418, 0xb419, 0xb41a, 0xb41b, 0xb41c, 0xb41d, 0xb41e, 0xb41f, - 0xb420, 0xb421, 0xb422, 0xb423, 0xb424, 0xb425, 0xb426, 0xb427, - 0xb428, 0xb429, 0xb42a, 0xb42b, 0xb42c, 0xb42d, 0xb42e, 0xb42f, - 0xb430, 0xb431, 0xb432, 0xb433, 0xb434, 0xb435, 0xb436, 0xb437, - 0xb438, 0xb439, 0xb43a, 0xb43b, 0xb43c, 0xb43d, 0xb43e, 0xb43f, - 0xb440, 0xb441, 0xb442, 0xb443, 0xb444, 0xb445, 0xb446, 0xb447, - 0xb448, 0xb449, 0xb44a, 0xb44b, 0xb44c, 0xb44d, 0xb44e, 0xb44f, - 0xb450, 0xb451, 0xb452, 0xb453, 0xb454, 0xb455, 0xb456, 0xb457, - 0xb458, 0xb459, 0xb45a, 0xb45b, 0xb45c, 0xb45d, 0xb45e, 0xb45f, - 0xb460, 0xb461, 0xb462, 0xb463, 0xb464, 0xb465, 0xb466, 0xb467, - 0xb468, 0xb469, 0xb46a, 0xb46b, 0xb46c, 0xb46d, 0xb46e, 0xb46f, - 0xb470, 0xb471, 0xb472, 0xb473, 0xb474, 0xb475, 0xb476, 0xb477, - 0xb478, 0xb479, 0xb47a, 0xb47b, 0xb47c, 0xb47d, 0xb47e, 0xb47f, - 0xb480, 0xb481, 0xb482, 0xb483, 0xb484, 0xb485, 0xb486, 0xb487, - 0xb488, 0xb489, 0xb48a, 0xb48b, 0xb48c, 0xb48d, 0xb48e, 0xb48f, - 0xb490, 0xb491, 0xb492, 0xb493, 0xb494, 0xb495, 0xb496, 0xb497, - 0xb498, 0xb499, 0xb49a, 0xb49b, 0xb49c, 0xb49d, 0xb49e, 0xb49f, - 0xb4a0, 0xb4a1, 0xb4a2, 0xb4a3, 0xb4a4, 0xb4a5, 0xb4a6, 0xb4a7, - 0xb4a8, 0xb4a9, 0xb4aa, 0xb4ab, 0xb4ac, 0xb4ad, 0xb4ae, 0xb4af, - 0xb4b0, 0xb4b1, 0xb4b2, 0xb4b3, 0xb4b4, 0xb4b5, 0xb4b6, 0xb4b7, - 0xb4b8, 0xb4b9, 0xb4ba, 0xb4bb, 0xb4bc, 0xb4bd, 0xb4be, 0xb4bf, - 0xb4c0, 0xb4c1, 0xb4c2, 0xb4c3, 0xb4c4, 0xb4c5, 0xb4c6, 0xb4c7, - 0xb4c8, 0xb4c9, 0xb4ca, 0xb4cb, 0xb4cc, 0xb4cd, 0xb4ce, 0xb4cf, - 0xb4d0, 0xb4d1, 0xb4d2, 0xb4d3, 0xb4d4, 0xb4d5, 0xb4d6, 0xb4d7, - 0xb4d8, 0xb4d9, 0xb4da, 0xb4db, 0xb4dc, 0xb4dd, 0xb4de, 0xb4df, - 0xb4e0, 0xb4e1, 0xb4e2, 0xb4e3, 0xb4e4, 0xb4e5, 0xb4e6, 0xb4e7, - 0xb4e8, 0xb4e9, 0xb4ea, 0xb4eb, 0xb4ec, 0xb4ed, 0xb4ee, 0xb4ef, - 0xb4f0, 0xb4f1, 0xb4f2, 0xb4f3, 0xb4f4, 0xb4f5, 0xb4f6, 0xb4f7, - 0xb4f8, 0xb4f9, 0xb4fa, 0xb4fb, 0xb4fc, 0xb4fd, 0xb4fe, 0xb4ff, - 0xb500, 0xb501, 0xb502, 0xb503, 0xb504, 0xb505, 0xb506, 0xb507, - 0xb508, 0xb509, 0xb50a, 0xb50b, 0xb50c, 0xb50d, 0xb50e, 0xb50f, - 0xb510, 0xb511, 0xb512, 0xb513, 0xb514, 0xb515, 0xb516, 0xb517, - 0xb518, 0xb519, 0xb51a, 0xb51b, 0xb51c, 0xb51d, 0xb51e, 0xb51f, - 0xb520, 0xb521, 0xb522, 0xb523, 0xb524, 0xb525, 0xb526, 0xb527, - 0xb528, 0xb529, 0xb52a, 0xb52b, 0xb52c, 0xb52d, 0xb52e, 0xb52f, - 0xb530, 0xb531, 0xb532, 0xb533, 0xb534, 0xb535, 0xb536, 0xb537, - 0xb538, 0xb539, 0xb53a, 0xb53b, 0xb53c, 0xb53d, 0xb53e, 0xb53f, - 0xb540, 0xb541, 0xb542, 0xb543, 0xb544, 0xb545, 0xb546, 0xb547, - 0xb548, 0xb549, 0xb54a, 0xb54b, 0xb54c, 0xb54d, 0xb54e, 0xb54f, - 0xb550, 0xb551, 0xb552, 0xb553, 0xb554, 0xb555, 0xb556, 0xb557, - 0xb558, 0xb559, 0xb55a, 0xb55b, 0xb55c, 0xb55d, 0xb55e, 0xb55f, - 0xb560, 0xb561, 0xb562, 0xb563, 0xb564, 0xb565, 0xb566, 0xb567, - 0xb568, 0xb569, 0xb56a, 0xb56b, 0xb56c, 0xb56d, 0xb56e, 0xb56f, - 0xb570, 0xb571, 0xb572, 0xb573, 0xb574, 0xb575, 0xb576, 0xb577, - 0xb578, 0xb579, 0xb57a, 0xb57b, 0xb57c, 0xb57d, 0xb57e, 0xb57f, - 0xb580, 0xb581, 0xb582, 0xb583, 0xb584, 0xb585, 0xb586, 0xb587, - 0xb588, 0xb589, 0xb58a, 0xb58b, 0xb58c, 0xb58d, 0xb58e, 0xb58f, - 0xb590, 0xb591, 0xb592, 0xb593, 0xb594, 0xb595, 0xb596, 0xb597, - 0xb598, 0xb599, 0xb59a, 0xb59b, 0xb59c, 0xb59d, 0xb59e, 0xb59f, - 0xb5a0, 0xb5a1, 0xb5a2, 0xb5a3, 0xb5a4, 0xb5a5, 0xb5a6, 0xb5a7, - 0xb5a8, 0xb5a9, 0xb5aa, 0xb5ab, 0xb5ac, 0xb5ad, 0xb5ae, 0xb5af, - 0xb5b0, 0xb5b1, 0xb5b2, 0xb5b3, 0xb5b4, 0xb5b5, 0xb5b6, 0xb5b7, - 0xb5b8, 0xb5b9, 0xb5ba, 0xb5bb, 0xb5bc, 0xb5bd, 0xb5be, 0xb5bf, - 0xb5c0, 0xb5c1, 0xb5c2, 0xb5c3, 0xb5c4, 0xb5c5, 0xb5c6, 0xb5c7, - 0xb5c8, 0xb5c9, 0xb5ca, 0xb5cb, 0xb5cc, 0xb5cd, 0xb5ce, 0xb5cf, - 0xb5d0, 0xb5d1, 0xb5d2, 0xb5d3, 0xb5d4, 0xb5d5, 0xb5d6, 0xb5d7, - 0xb5d8, 0xb5d9, 0xb5da, 0xb5db, 0xb5dc, 0xb5dd, 0xb5de, 0xb5df, - 0xb5e0, 0xb5e1, 0xb5e2, 0xb5e3, 0xb5e4, 0xb5e5, 0xb5e6, 0xb5e7, - 0xb5e8, 0xb5e9, 0xb5ea, 0xb5eb, 0xb5ec, 0xb5ed, 0xb5ee, 0xb5ef, - 0xb5f0, 0xb5f1, 0xb5f2, 0xb5f3, 0xb5f4, 0xb5f5, 0xb5f6, 0xb5f7, - 0xb5f8, 0xb5f9, 0xb5fa, 0xb5fb, 0xb5fc, 0xb5fd, 0xb5fe, 0xb5ff, - 0xb600, 0xb601, 0xb602, 0xb603, 0xb604, 0xb605, 0xb606, 0xb607, - 0xb608, 0xb609, 0xb60a, 0xb60b, 0xb60c, 0xb60d, 0xb60e, 0xb60f, - 0xb610, 0xb611, 0xb612, 0xb613, 0xb614, 0xb615, 0xb616, 0xb617, - 0xb618, 0xb619, 0xb61a, 0xb61b, 0xb61c, 0xb61d, 0xb61e, 0xb61f, - 0xb620, 0xb621, 0xb622, 0xb623, 0xb624, 0xb625, 0xb626, 0xb627, - 0xb628, 0xb629, 0xb62a, 0xb62b, 0xb62c, 0xb62d, 0xb62e, 0xb62f, - 0xb630, 0xb631, 0xb632, 0xb633, 0xb634, 0xb635, 0xb636, 0xb637, - 0xb638, 0xb639, 0xb63a, 0xb63b, 0xb63c, 0xb63d, 0xb63e, 0xb63f, - 0xb640, 0xb641, 0xb642, 0xb643, 0xb644, 0xb645, 0xb646, 0xb647, - 0xb648, 0xb649, 0xb64a, 0xb64b, 0xb64c, 0xb64d, 0xb64e, 0xb64f, - 0xb650, 0xb651, 0xb652, 0xb653, 0xb654, 0xb655, 0xb656, 0xb657, - 0xb658, 0xb659, 0xb65a, 0xb65b, 0xb65c, 0xb65d, 0xb65e, 0xb65f, - 0xb660, 0xb661, 0xb662, 0xb663, 0xb664, 0xb665, 0xb666, 0xb667, - 0xb668, 0xb669, 0xb66a, 0xb66b, 0xb66c, 0xb66d, 0xb66e, 0xb66f, - 0xb670, 0xb671, 0xb672, 0xb673, 0xb674, 0xb675, 0xb676, 0xb677, - 0xb678, 0xb679, 0xb67a, 0xb67b, 0xb67c, 0xb67d, 0xb67e, 0xb67f, - 0xb680, 0xb681, 0xb682, 0xb683, 0xb684, 0xb685, 0xb686, 0xb687, - 0xb688, 0xb689, 0xb68a, 0xb68b, 0xb68c, 0xb68d, 0xb68e, 0xb68f, - 0xb690, 0xb691, 0xb692, 0xb693, 0xb694, 0xb695, 0xb696, 0xb697, - 0xb698, 0xb699, 0xb69a, 0xb69b, 0xb69c, 0xb69d, 0xb69e, 0xb69f, - 0xb6a0, 0xb6a1, 0xb6a2, 0xb6a3, 0xb6a4, 0xb6a5, 0xb6a6, 0xb6a7, - 0xb6a8, 0xb6a9, 0xb6aa, 0xb6ab, 0xb6ac, 0xb6ad, 0xb6ae, 0xb6af, - 0xb6b0, 0xb6b1, 0xb6b2, 0xb6b3, 0xb6b4, 0xb6b5, 0xb6b6, 0xb6b7, - 0xb6b8, 0xb6b9, 0xb6ba, 0xb6bb, 0xb6bc, 0xb6bd, 0xb6be, 0xb6bf, - 0xb6c0, 0xb6c1, 0xb6c2, 0xb6c3, 0xb6c4, 0xb6c5, 0xb6c6, 0xb6c7, - 0xb6c8, 0xb6c9, 0xb6ca, 0xb6cb, 0xb6cc, 0xb6cd, 0xb6ce, 0xb6cf, - 0xb6d0, 0xb6d1, 0xb6d2, 0xb6d3, 0xb6d4, 0xb6d5, 0xb6d6, 0xb6d7, - 0xb6d8, 0xb6d9, 0xb6da, 0xb6db, 0xb6dc, 0xb6dd, 0xb6de, 0xb6df, - 0xb6e0, 0xb6e1, 0xb6e2, 0xb6e3, 0xb6e4, 0xb6e5, 0xb6e6, 0xb6e7, - 0xb6e8, 0xb6e9, 0xb6ea, 0xb6eb, 0xb6ec, 0xb6ed, 0xb6ee, 0xb6ef, - 0xb6f0, 0xb6f1, 0xb6f2, 0xb6f3, 0xb6f4, 0xb6f5, 0xb6f6, 0xb6f7, - 0xb6f8, 0xb6f9, 0xb6fa, 0xb6fb, 0xb6fc, 0xb6fd, 0xb6fe, 0xb6ff, - 0xb700, 0xb701, 0xb702, 0xb703, 0xb704, 0xb705, 0xb706, 0xb707, - 0xb708, 0xb709, 0xb70a, 0xb70b, 0xb70c, 0xb70d, 0xb70e, 0xb70f, - 0xb710, 0xb711, 0xb712, 0xb713, 0xb714, 0xb715, 0xb716, 0xb717, - 0xb718, 0xb719, 0xb71a, 0xb71b, 0xb71c, 0xb71d, 0xb71e, 0xb71f, - 0xb720, 0xb721, 0xb722, 0xb723, 0xb724, 0xb725, 0xb726, 0xb727, - 0xb728, 0xb729, 0xb72a, 0xb72b, 0xb72c, 0xb72d, 0xb72e, 0xb72f, - 0xb730, 0xb731, 0xb732, 0xb733, 0xb734, 0xb735, 0xb736, 0xb737, - 0xb738, 0xb739, 0xb73a, 0xb73b, 0xb73c, 0xb73d, 0xb73e, 0xb73f, - 0xb740, 0xb741, 0xb742, 0xb743, 0xb744, 0xb745, 0xb746, 0xb747, - 0xb748, 0xb749, 0xb74a, 0xb74b, 0xb74c, 0xb74d, 0xb74e, 0xb74f, - 0xb750, 0xb751, 0xb752, 0xb753, 0xb754, 0xb755, 0xb756, 0xb757, - 0xb758, 0xb759, 0xb75a, 0xb75b, 0xb75c, 0xb75d, 0xb75e, 0xb75f, - 0xb760, 0xb761, 0xb762, 0xb763, 0xb764, 0xb765, 0xb766, 0xb767, - 0xb768, 0xb769, 0xb76a, 0xb76b, 0xb76c, 0xb76d, 0xb76e, 0xb76f, - 0xb770, 0xb771, 0xb772, 0xb773, 0xb774, 0xb775, 0xb776, 0xb777, - 0xb778, 0xb779, 0xb77a, 0xb77b, 0xb77c, 0xb77d, 0xb77e, 0xb77f, - 0xb780, 0xb781, 0xb782, 0xb783, 0xb784, 0xb785, 0xb786, 0xb787, - 0xb788, 0xb789, 0xb78a, 0xb78b, 0xb78c, 0xb78d, 0xb78e, 0xb78f, - 0xb790, 0xb791, 0xb792, 0xb793, 0xb794, 0xb795, 0xb796, 0xb797, - 0xb798, 0xb799, 0xb79a, 0xb79b, 0xb79c, 0xb79d, 0xb79e, 0xb79f, - 0xb7a0, 0xb7a1, 0xb7a2, 0xb7a3, 0xb7a4, 0xb7a5, 0xb7a6, 0xb7a7, - 0xb7a8, 0xb7a9, 0xb7aa, 0xb7ab, 0xb7ac, 0xb7ad, 0xb7ae, 0xb7af, - 0xb7b0, 0xb7b1, 0xb7b2, 0xb7b3, 0xb7b4, 0xb7b5, 0xb7b6, 0xb7b7, - 0xb7b8, 0xb7b9, 0xb7ba, 0xb7bb, 0xb7bc, 0xb7bd, 0xb7be, 0xb7bf, - 0xb7c0, 0xb7c1, 0xb7c2, 0xb7c3, 0xb7c4, 0xb7c5, 0xb7c6, 0xb7c7, - 0xb7c8, 0xb7c9, 0xb7ca, 0xb7cb, 0xb7cc, 0xb7cd, 0xb7ce, 0xb7cf, - 0xb7d0, 0xb7d1, 0xb7d2, 0xb7d3, 0xb7d4, 0xb7d5, 0xb7d6, 0xb7d7, - 0xb7d8, 0xb7d9, 0xb7da, 0xb7db, 0xb7dc, 0xb7dd, 0xb7de, 0xb7df, - 0xb7e0, 0xb7e1, 0xb7e2, 0xb7e3, 0xb7e4, 0xb7e5, 0xb7e6, 0xb7e7, - 0xb7e8, 0xb7e9, 0xb7ea, 0xb7eb, 0xb7ec, 0xb7ed, 0xb7ee, 0xb7ef, - 0xb7f0, 0xb7f1, 0xb7f2, 0xb7f3, 0xb7f4, 0xb7f5, 0xb7f6, 0xb7f7, - 0xb7f8, 0xb7f9, 0xb7fa, 0xb7fb, 0xb7fc, 0xb7fd, 0xb7fe, 0xb7ff, - 0xb800, 0xb801, 0xb802, 0xb803, 0xb804, 0xb805, 0xb806, 0xb807, - 0xb808, 0xb809, 0xb80a, 0xb80b, 0xb80c, 0xb80d, 0xb80e, 0xb80f, - 0xb810, 0xb811, 0xb812, 0xb813, 0xb814, 0xb815, 0xb816, 0xb817, - 0xb818, 0xb819, 0xb81a, 0xb81b, 0xb81c, 0xb81d, 0xb81e, 0xb81f, - 0xb820, 0xb821, 0xb822, 0xb823, 0xb824, 0xb825, 0xb826, 0xb827, - 0xb828, 0xb829, 0xb82a, 0xb82b, 0xb82c, 0xb82d, 0xb82e, 0xb82f, - 0xb830, 0xb831, 0xb832, 0xb833, 0xb834, 0xb835, 0xb836, 0xb837, - 0xb838, 0xb839, 0xb83a, 0xb83b, 0xb83c, 0xb83d, 0xb83e, 0xb83f, - 0xb840, 0xb841, 0xb842, 0xb843, 0xb844, 0xb845, 0xb846, 0xb847, - 0xb848, 0xb849, 0xb84a, 0xb84b, 0xb84c, 0xb84d, 0xb84e, 0xb84f, - 0xb850, 0xb851, 0xb852, 0xb853, 0xb854, 0xb855, 0xb856, 0xb857, - 0xb858, 0xb859, 0xb85a, 0xb85b, 0xb85c, 0xb85d, 0xb85e, 0xb85f, - 0xb860, 0xb861, 0xb862, 0xb863, 0xb864, 0xb865, 0xb866, 0xb867, - 0xb868, 0xb869, 0xb86a, 0xb86b, 0xb86c, 0xb86d, 0xb86e, 0xb86f, - 0xb870, 0xb871, 0xb872, 0xb873, 0xb874, 0xb875, 0xb876, 0xb877, - 0xb878, 0xb879, 0xb87a, 0xb87b, 0xb87c, 0xb87d, 0xb87e, 0xb87f, - 0xb880, 0xb881, 0xb882, 0xb883, 0xb884, 0xb885, 0xb886, 0xb887, - 0xb888, 0xb889, 0xb88a, 0xb88b, 0xb88c, 0xb88d, 0xb88e, 0xb88f, - 0xb890, 0xb891, 0xb892, 0xb893, 0xb894, 0xb895, 0xb896, 0xb897, - 0xb898, 0xb899, 0xb89a, 0xb89b, 0xb89c, 0xb89d, 0xb89e, 0xb89f, - 0xb8a0, 0xb8a1, 0xb8a2, 0xb8a3, 0xb8a4, 0xb8a5, 0xb8a6, 0xb8a7, - 0xb8a8, 0xb8a9, 0xb8aa, 0xb8ab, 0xb8ac, 0xb8ad, 0xb8ae, 0xb8af, - 0xb8b0, 0xb8b1, 0xb8b2, 0xb8b3, 0xb8b4, 0xb8b5, 0xb8b6, 0xb8b7, - 0xb8b8, 0xb8b9, 0xb8ba, 0xb8bb, 0xb8bc, 0xb8bd, 0xb8be, 0xb8bf, - 0xb8c0, 0xb8c1, 0xb8c2, 0xb8c3, 0xb8c4, 0xb8c5, 0xb8c6, 0xb8c7, - 0xb8c8, 0xb8c9, 0xb8ca, 0xb8cb, 0xb8cc, 0xb8cd, 0xb8ce, 0xb8cf, - 0xb8d0, 0xb8d1, 0xb8d2, 0xb8d3, 0xb8d4, 0xb8d5, 0xb8d6, 0xb8d7, - 0xb8d8, 0xb8d9, 0xb8da, 0xb8db, 0xb8dc, 0xb8dd, 0xb8de, 0xb8df, - 0xb8e0, 0xb8e1, 0xb8e2, 0xb8e3, 0xb8e4, 0xb8e5, 0xb8e6, 0xb8e7, - 0xb8e8, 0xb8e9, 0xb8ea, 0xb8eb, 0xb8ec, 0xb8ed, 0xb8ee, 0xb8ef, - 0xb8f0, 0xb8f1, 0xb8f2, 0xb8f3, 0xb8f4, 0xb8f5, 0xb8f6, 0xb8f7, - 0xb8f8, 0xb8f9, 0xb8fa, 0xb8fb, 0xb8fc, 0xb8fd, 0xb8fe, 0xb8ff, - 0xb900, 0xb901, 0xb902, 0xb903, 0xb904, 0xb905, 0xb906, 0xb907, - 0xb908, 0xb909, 0xb90a, 0xb90b, 0xb90c, 0xb90d, 0xb90e, 0xb90f, - 0xb910, 0xb911, 0xb912, 0xb913, 0xb914, 0xb915, 0xb916, 0xb917, - 0xb918, 0xb919, 0xb91a, 0xb91b, 0xb91c, 0xb91d, 0xb91e, 0xb91f, - 0xb920, 0xb921, 0xb922, 0xb923, 0xb924, 0xb925, 0xb926, 0xb927, - 0xb928, 0xb929, 0xb92a, 0xb92b, 0xb92c, 0xb92d, 0xb92e, 0xb92f, - 0xb930, 0xb931, 0xb932, 0xb933, 0xb934, 0xb935, 0xb936, 0xb937, - 0xb938, 0xb939, 0xb93a, 0xb93b, 0xb93c, 0xb93d, 0xb93e, 0xb93f, - 0xb940, 0xb941, 0xb942, 0xb943, 0xb944, 0xb945, 0xb946, 0xb947, - 0xb948, 0xb949, 0xb94a, 0xb94b, 0xb94c, 0xb94d, 0xb94e, 0xb94f, - 0xb950, 0xb951, 0xb952, 0xb953, 0xb954, 0xb955, 0xb956, 0xb957, - 0xb958, 0xb959, 0xb95a, 0xb95b, 0xb95c, 0xb95d, 0xb95e, 0xb95f, - 0xb960, 0xb961, 0xb962, 0xb963, 0xb964, 0xb965, 0xb966, 0xb967, - 0xb968, 0xb969, 0xb96a, 0xb96b, 0xb96c, 0xb96d, 0xb96e, 0xb96f, - 0xb970, 0xb971, 0xb972, 0xb973, 0xb974, 0xb975, 0xb976, 0xb977, - 0xb978, 0xb979, 0xb97a, 0xb97b, 0xb97c, 0xb97d, 0xb97e, 0xb97f, - 0xb980, 0xb981, 0xb982, 0xb983, 0xb984, 0xb985, 0xb986, 0xb987, - 0xb988, 0xb989, 0xb98a, 0xb98b, 0xb98c, 0xb98d, 0xb98e, 0xb98f, - 0xb990, 0xb991, 0xb992, 0xb993, 0xb994, 0xb995, 0xb996, 0xb997, - 0xb998, 0xb999, 0xb99a, 0xb99b, 0xb99c, 0xb99d, 0xb99e, 0xb99f, - 0xb9a0, 0xb9a1, 0xb9a2, 0xb9a3, 0xb9a4, 0xb9a5, 0xb9a6, 0xb9a7, - 0xb9a8, 0xb9a9, 0xb9aa, 0xb9ab, 0xb9ac, 0xb9ad, 0xb9ae, 0xb9af, - 0xb9b0, 0xb9b1, 0xb9b2, 0xb9b3, 0xb9b4, 0xb9b5, 0xb9b6, 0xb9b7, - 0xb9b8, 0xb9b9, 0xb9ba, 0xb9bb, 0xb9bc, 0xb9bd, 0xb9be, 0xb9bf, - 0xb9c0, 0xb9c1, 0xb9c2, 0xb9c3, 0xb9c4, 0xb9c5, 0xb9c6, 0xb9c7, - 0xb9c8, 0xb9c9, 0xb9ca, 0xb9cb, 0xb9cc, 0xb9cd, 0xb9ce, 0xb9cf, - 0xb9d0, 0xb9d1, 0xb9d2, 0xb9d3, 0xb9d4, 0xb9d5, 0xb9d6, 0xb9d7, - 0xb9d8, 0xb9d9, 0xb9da, 0xb9db, 0xb9dc, 0xb9dd, 0xb9de, 0xb9df, - 0xb9e0, 0xb9e1, 0xb9e2, 0xb9e3, 0xb9e4, 0xb9e5, 0xb9e6, 0xb9e7, - 0xb9e8, 0xb9e9, 0xb9ea, 0xb9eb, 0xb9ec, 0xb9ed, 0xb9ee, 0xb9ef, - 0xb9f0, 0xb9f1, 0xb9f2, 0xb9f3, 0xb9f4, 0xb9f5, 0xb9f6, 0xb9f7, - 0xb9f8, 0xb9f9, 0xb9fa, 0xb9fb, 0xb9fc, 0xb9fd, 0xb9fe, 0xb9ff, - 0xba00, 0xba01, 0xba02, 0xba03, 0xba04, 0xba05, 0xba06, 0xba07, - 0xba08, 0xba09, 0xba0a, 0xba0b, 0xba0c, 0xba0d, 0xba0e, 0xba0f, - 0xba10, 0xba11, 0xba12, 0xba13, 0xba14, 0xba15, 0xba16, 0xba17, - 0xba18, 0xba19, 0xba1a, 0xba1b, 0xba1c, 0xba1d, 0xba1e, 0xba1f, - 0xba20, 0xba21, 0xba22, 0xba23, 0xba24, 0xba25, 0xba26, 0xba27, - 0xba28, 0xba29, 0xba2a, 0xba2b, 0xba2c, 0xba2d, 0xba2e, 0xba2f, - 0xba30, 0xba31, 0xba32, 0xba33, 0xba34, 0xba35, 0xba36, 0xba37, - 0xba38, 0xba39, 0xba3a, 0xba3b, 0xba3c, 0xba3d, 0xba3e, 0xba3f, - 0xba40, 0xba41, 0xba42, 0xba43, 0xba44, 0xba45, 0xba46, 0xba47, - 0xba48, 0xba49, 0xba4a, 0xba4b, 0xba4c, 0xba4d, 0xba4e, 0xba4f, - 0xba50, 0xba51, 0xba52, 0xba53, 0xba54, 0xba55, 0xba56, 0xba57, - 0xba58, 0xba59, 0xba5a, 0xba5b, 0xba5c, 0xba5d, 0xba5e, 0xba5f, - 0xba60, 0xba61, 0xba62, 0xba63, 0xba64, 0xba65, 0xba66, 0xba67, - 0xba68, 0xba69, 0xba6a, 0xba6b, 0xba6c, 0xba6d, 0xba6e, 0xba6f, - 0xba70, 0xba71, 0xba72, 0xba73, 0xba74, 0xba75, 0xba76, 0xba77, - 0xba78, 0xba79, 0xba7a, 0xba7b, 0xba7c, 0xba7d, 0xba7e, 0xba7f, - 0xba80, 0xba81, 0xba82, 0xba83, 0xba84, 0xba85, 0xba86, 0xba87, - 0xba88, 0xba89, 0xba8a, 0xba8b, 0xba8c, 0xba8d, 0xba8e, 0xba8f, - 0xba90, 0xba91, 0xba92, 0xba93, 0xba94, 0xba95, 0xba96, 0xba97, - 0xba98, 0xba99, 0xba9a, 0xba9b, 0xba9c, 0xba9d, 0xba9e, 0xba9f, - 0xbaa0, 0xbaa1, 0xbaa2, 0xbaa3, 0xbaa4, 0xbaa5, 0xbaa6, 0xbaa7, - 0xbaa8, 0xbaa9, 0xbaaa, 0xbaab, 0xbaac, 0xbaad, 0xbaae, 0xbaaf, - 0xbab0, 0xbab1, 0xbab2, 0xbab3, 0xbab4, 0xbab5, 0xbab6, 0xbab7, - 0xbab8, 0xbab9, 0xbaba, 0xbabb, 0xbabc, 0xbabd, 0xbabe, 0xbabf, - 0xbac0, 0xbac1, 0xbac2, 0xbac3, 0xbac4, 0xbac5, 0xbac6, 0xbac7, - 0xbac8, 0xbac9, 0xbaca, 0xbacb, 0xbacc, 0xbacd, 0xbace, 0xbacf, - 0xbad0, 0xbad1, 0xbad2, 0xbad3, 0xbad4, 0xbad5, 0xbad6, 0xbad7, - 0xbad8, 0xbad9, 0xbada, 0xbadb, 0xbadc, 0xbadd, 0xbade, 0xbadf, - 0xbae0, 0xbae1, 0xbae2, 0xbae3, 0xbae4, 0xbae5, 0xbae6, 0xbae7, - 0xbae8, 0xbae9, 0xbaea, 0xbaeb, 0xbaec, 0xbaed, 0xbaee, 0xbaef, - 0xbaf0, 0xbaf1, 0xbaf2, 0xbaf3, 0xbaf4, 0xbaf5, 0xbaf6, 0xbaf7, - 0xbaf8, 0xbaf9, 0xbafa, 0xbafb, 0xbafc, 0xbafd, 0xbafe, 0xbaff, - 0xbb00, 0xbb01, 0xbb02, 0xbb03, 0xbb04, 0xbb05, 0xbb06, 0xbb07, - 0xbb08, 0xbb09, 0xbb0a, 0xbb0b, 0xbb0c, 0xbb0d, 0xbb0e, 0xbb0f, - 0xbb10, 0xbb11, 0xbb12, 0xbb13, 0xbb14, 0xbb15, 0xbb16, 0xbb17, - 0xbb18, 0xbb19, 0xbb1a, 0xbb1b, 0xbb1c, 0xbb1d, 0xbb1e, 0xbb1f, - 0xbb20, 0xbb21, 0xbb22, 0xbb23, 0xbb24, 0xbb25, 0xbb26, 0xbb27, - 0xbb28, 0xbb29, 0xbb2a, 0xbb2b, 0xbb2c, 0xbb2d, 0xbb2e, 0xbb2f, - 0xbb30, 0xbb31, 0xbb32, 0xbb33, 0xbb34, 0xbb35, 0xbb36, 0xbb37, - 0xbb38, 0xbb39, 0xbb3a, 0xbb3b, 0xbb3c, 0xbb3d, 0xbb3e, 0xbb3f, - 0xbb40, 0xbb41, 0xbb42, 0xbb43, 0xbb44, 0xbb45, 0xbb46, 0xbb47, - 0xbb48, 0xbb49, 0xbb4a, 0xbb4b, 0xbb4c, 0xbb4d, 0xbb4e, 0xbb4f, - 0xbb50, 0xbb51, 0xbb52, 0xbb53, 0xbb54, 0xbb55, 0xbb56, 0xbb57, - 0xbb58, 0xbb59, 0xbb5a, 0xbb5b, 0xbb5c, 0xbb5d, 0xbb5e, 0xbb5f, - 0xbb60, 0xbb61, 0xbb62, 0xbb63, 0xbb64, 0xbb65, 0xbb66, 0xbb67, - 0xbb68, 0xbb69, 0xbb6a, 0xbb6b, 0xbb6c, 0xbb6d, 0xbb6e, 0xbb6f, - 0xbb70, 0xbb71, 0xbb72, 0xbb73, 0xbb74, 0xbb75, 0xbb76, 0xbb77, - 0xbb78, 0xbb79, 0xbb7a, 0xbb7b, 0xbb7c, 0xbb7d, 0xbb7e, 0xbb7f, - 0xbb80, 0xbb81, 0xbb82, 0xbb83, 0xbb84, 0xbb85, 0xbb86, 0xbb87, - 0xbb88, 0xbb89, 0xbb8a, 0xbb8b, 0xbb8c, 0xbb8d, 0xbb8e, 0xbb8f, - 0xbb90, 0xbb91, 0xbb92, 0xbb93, 0xbb94, 0xbb95, 0xbb96, 0xbb97, - 0xbb98, 0xbb99, 0xbb9a, 0xbb9b, 0xbb9c, 0xbb9d, 0xbb9e, 0xbb9f, - 0xbba0, 0xbba1, 0xbba2, 0xbba3, 0xbba4, 0xbba5, 0xbba6, 0xbba7, - 0xbba8, 0xbba9, 0xbbaa, 0xbbab, 0xbbac, 0xbbad, 0xbbae, 0xbbaf, - 0xbbb0, 0xbbb1, 0xbbb2, 0xbbb3, 0xbbb4, 0xbbb5, 0xbbb6, 0xbbb7, - 0xbbb8, 0xbbb9, 0xbbba, 0xbbbb, 0xbbbc, 0xbbbd, 0xbbbe, 0xbbbf, - 0xbbc0, 0xbbc1, 0xbbc2, 0xbbc3, 0xbbc4, 0xbbc5, 0xbbc6, 0xbbc7, - 0xbbc8, 0xbbc9, 0xbbca, 0xbbcb, 0xbbcc, 0xbbcd, 0xbbce, 0xbbcf, - 0xbbd0, 0xbbd1, 0xbbd2, 0xbbd3, 0xbbd4, 0xbbd5, 0xbbd6, 0xbbd7, - 0xbbd8, 0xbbd9, 0xbbda, 0xbbdb, 0xbbdc, 0xbbdd, 0xbbde, 0xbbdf, - 0xbbe0, 0xbbe1, 0xbbe2, 0xbbe3, 0xbbe4, 0xbbe5, 0xbbe6, 0xbbe7, - 0xbbe8, 0xbbe9, 0xbbea, 0xbbeb, 0xbbec, 0xbbed, 0xbbee, 0xbbef, - 0xbbf0, 0xbbf1, 0xbbf2, 0xbbf3, 0xbbf4, 0xbbf5, 0xbbf6, 0xbbf7, - 0xbbf8, 0xbbf9, 0xbbfa, 0xbbfb, 0xbbfc, 0xbbfd, 0xbbfe, 0xbbff, - 0xbc00, 0xbc01, 0xbc02, 0xbc03, 0xbc04, 0xbc05, 0xbc06, 0xbc07, - 0xbc08, 0xbc09, 0xbc0a, 0xbc0b, 0xbc0c, 0xbc0d, 0xbc0e, 0xbc0f, - 0xbc10, 0xbc11, 0xbc12, 0xbc13, 0xbc14, 0xbc15, 0xbc16, 0xbc17, - 0xbc18, 0xbc19, 0xbc1a, 0xbc1b, 0xbc1c, 0xbc1d, 0xbc1e, 0xbc1f, - 0xbc20, 0xbc21, 0xbc22, 0xbc23, 0xbc24, 0xbc25, 0xbc26, 0xbc27, - 0xbc28, 0xbc29, 0xbc2a, 0xbc2b, 0xbc2c, 0xbc2d, 0xbc2e, 0xbc2f, - 0xbc30, 0xbc31, 0xbc32, 0xbc33, 0xbc34, 0xbc35, 0xbc36, 0xbc37, - 0xbc38, 0xbc39, 0xbc3a, 0xbc3b, 0xbc3c, 0xbc3d, 0xbc3e, 0xbc3f, - 0xbc40, 0xbc41, 0xbc42, 0xbc43, 0xbc44, 0xbc45, 0xbc46, 0xbc47, - 0xbc48, 0xbc49, 0xbc4a, 0xbc4b, 0xbc4c, 0xbc4d, 0xbc4e, 0xbc4f, - 0xbc50, 0xbc51, 0xbc52, 0xbc53, 0xbc54, 0xbc55, 0xbc56, 0xbc57, - 0xbc58, 0xbc59, 0xbc5a, 0xbc5b, 0xbc5c, 0xbc5d, 0xbc5e, 0xbc5f, - 0xbc60, 0xbc61, 0xbc62, 0xbc63, 0xbc64, 0xbc65, 0xbc66, 0xbc67, - 0xbc68, 0xbc69, 0xbc6a, 0xbc6b, 0xbc6c, 0xbc6d, 0xbc6e, 0xbc6f, - 0xbc70, 0xbc71, 0xbc72, 0xbc73, 0xbc74, 0xbc75, 0xbc76, 0xbc77, - 0xbc78, 0xbc79, 0xbc7a, 0xbc7b, 0xbc7c, 0xbc7d, 0xbc7e, 0xbc7f, - 0xbc80, 0xbc81, 0xbc82, 0xbc83, 0xbc84, 0xbc85, 0xbc86, 0xbc87, - 0xbc88, 0xbc89, 0xbc8a, 0xbc8b, 0xbc8c, 0xbc8d, 0xbc8e, 0xbc8f, - 0xbc90, 0xbc91, 0xbc92, 0xbc93, 0xbc94, 0xbc95, 0xbc96, 0xbc97, - 0xbc98, 0xbc99, 0xbc9a, 0xbc9b, 0xbc9c, 0xbc9d, 0xbc9e, 0xbc9f, - 0xbca0, 0xbca1, 0xbca2, 0xbca3, 0xbca4, 0xbca5, 0xbca6, 0xbca7, - 0xbca8, 0xbca9, 0xbcaa, 0xbcab, 0xbcac, 0xbcad, 0xbcae, 0xbcaf, - 0xbcb0, 0xbcb1, 0xbcb2, 0xbcb3, 0xbcb4, 0xbcb5, 0xbcb6, 0xbcb7, - 0xbcb8, 0xbcb9, 0xbcba, 0xbcbb, 0xbcbc, 0xbcbd, 0xbcbe, 0xbcbf, - 0xbcc0, 0xbcc1, 0xbcc2, 0xbcc3, 0xbcc4, 0xbcc5, 0xbcc6, 0xbcc7, - 0xbcc8, 0xbcc9, 0xbcca, 0xbccb, 0xbccc, 0xbccd, 0xbcce, 0xbccf, - 0xbcd0, 0xbcd1, 0xbcd2, 0xbcd3, 0xbcd4, 0xbcd5, 0xbcd6, 0xbcd7, - 0xbcd8, 0xbcd9, 0xbcda, 0xbcdb, 0xbcdc, 0xbcdd, 0xbcde, 0xbcdf, - 0xbce0, 0xbce1, 0xbce2, 0xbce3, 0xbce4, 0xbce5, 0xbce6, 0xbce7, - 0xbce8, 0xbce9, 0xbcea, 0xbceb, 0xbcec, 0xbced, 0xbcee, 0xbcef, - 0xbcf0, 0xbcf1, 0xbcf2, 0xbcf3, 0xbcf4, 0xbcf5, 0xbcf6, 0xbcf7, - 0xbcf8, 0xbcf9, 0xbcfa, 0xbcfb, 0xbcfc, 0xbcfd, 0xbcfe, 0xbcff, - 0xbd00, 0xbd01, 0xbd02, 0xbd03, 0xbd04, 0xbd05, 0xbd06, 0xbd07, - 0xbd08, 0xbd09, 0xbd0a, 0xbd0b, 0xbd0c, 0xbd0d, 0xbd0e, 0xbd0f, - 0xbd10, 0xbd11, 0xbd12, 0xbd13, 0xbd14, 0xbd15, 0xbd16, 0xbd17, - 0xbd18, 0xbd19, 0xbd1a, 0xbd1b, 0xbd1c, 0xbd1d, 0xbd1e, 0xbd1f, - 0xbd20, 0xbd21, 0xbd22, 0xbd23, 0xbd24, 0xbd25, 0xbd26, 0xbd27, - 0xbd28, 0xbd29, 0xbd2a, 0xbd2b, 0xbd2c, 0xbd2d, 0xbd2e, 0xbd2f, - 0xbd30, 0xbd31, 0xbd32, 0xbd33, 0xbd34, 0xbd35, 0xbd36, 0xbd37, - 0xbd38, 0xbd39, 0xbd3a, 0xbd3b, 0xbd3c, 0xbd3d, 0xbd3e, 0xbd3f, - 0xbd40, 0xbd41, 0xbd42, 0xbd43, 0xbd44, 0xbd45, 0xbd46, 0xbd47, - 0xbd48, 0xbd49, 0xbd4a, 0xbd4b, 0xbd4c, 0xbd4d, 0xbd4e, 0xbd4f, - 0xbd50, 0xbd51, 0xbd52, 0xbd53, 0xbd54, 0xbd55, 0xbd56, 0xbd57, - 0xbd58, 0xbd59, 0xbd5a, 0xbd5b, 0xbd5c, 0xbd5d, 0xbd5e, 0xbd5f, - 0xbd60, 0xbd61, 0xbd62, 0xbd63, 0xbd64, 0xbd65, 0xbd66, 0xbd67, - 0xbd68, 0xbd69, 0xbd6a, 0xbd6b, 0xbd6c, 0xbd6d, 0xbd6e, 0xbd6f, - 0xbd70, 0xbd71, 0xbd72, 0xbd73, 0xbd74, 0xbd75, 0xbd76, 0xbd77, - 0xbd78, 0xbd79, 0xbd7a, 0xbd7b, 0xbd7c, 0xbd7d, 0xbd7e, 0xbd7f, - 0xbd80, 0xbd81, 0xbd82, 0xbd83, 0xbd84, 0xbd85, 0xbd86, 0xbd87, - 0xbd88, 0xbd89, 0xbd8a, 0xbd8b, 0xbd8c, 0xbd8d, 0xbd8e, 0xbd8f, - 0xbd90, 0xbd91, 0xbd92, 0xbd93, 0xbd94, 0xbd95, 0xbd96, 0xbd97, - 0xbd98, 0xbd99, 0xbd9a, 0xbd9b, 0xbd9c, 0xbd9d, 0xbd9e, 0xbd9f, - 0xbda0, 0xbda1, 0xbda2, 0xbda3, 0xbda4, 0xbda5, 0xbda6, 0xbda7, - 0xbda8, 0xbda9, 0xbdaa, 0xbdab, 0xbdac, 0xbdad, 0xbdae, 0xbdaf, - 0xbdb0, 0xbdb1, 0xbdb2, 0xbdb3, 0xbdb4, 0xbdb5, 0xbdb6, 0xbdb7, - 0xbdb8, 0xbdb9, 0xbdba, 0xbdbb, 0xbdbc, 0xbdbd, 0xbdbe, 0xbdbf, - 0xbdc0, 0xbdc1, 0xbdc2, 0xbdc3, 0xbdc4, 0xbdc5, 0xbdc6, 0xbdc7, - 0xbdc8, 0xbdc9, 0xbdca, 0xbdcb, 0xbdcc, 0xbdcd, 0xbdce, 0xbdcf, - 0xbdd0, 0xbdd1, 0xbdd2, 0xbdd3, 0xbdd4, 0xbdd5, 0xbdd6, 0xbdd7, - 0xbdd8, 0xbdd9, 0xbdda, 0xbddb, 0xbddc, 0xbddd, 0xbdde, 0xbddf, - 0xbde0, 0xbde1, 0xbde2, 0xbde3, 0xbde4, 0xbde5, 0xbde6, 0xbde7, - 0xbde8, 0xbde9, 0xbdea, 0xbdeb, 0xbdec, 0xbded, 0xbdee, 0xbdef, - 0xbdf0, 0xbdf1, 0xbdf2, 0xbdf3, 0xbdf4, 0xbdf5, 0xbdf6, 0xbdf7, - 0xbdf8, 0xbdf9, 0xbdfa, 0xbdfb, 0xbdfc, 0xbdfd, 0xbdfe, 0xbdff, - 0xbe00, 0xbe01, 0xbe02, 0xbe03, 0xbe04, 0xbe05, 0xbe06, 0xbe07, - 0xbe08, 0xbe09, 0xbe0a, 0xbe0b, 0xbe0c, 0xbe0d, 0xbe0e, 0xbe0f, - 0xbe10, 0xbe11, 0xbe12, 0xbe13, 0xbe14, 0xbe15, 0xbe16, 0xbe17, - 0xbe18, 0xbe19, 0xbe1a, 0xbe1b, 0xbe1c, 0xbe1d, 0xbe1e, 0xbe1f, - 0xbe20, 0xbe21, 0xbe22, 0xbe23, 0xbe24, 0xbe25, 0xbe26, 0xbe27, - 0xbe28, 0xbe29, 0xbe2a, 0xbe2b, 0xbe2c, 0xbe2d, 0xbe2e, 0xbe2f, - 0xbe30, 0xbe31, 0xbe32, 0xbe33, 0xbe34, 0xbe35, 0xbe36, 0xbe37, - 0xbe38, 0xbe39, 0xbe3a, 0xbe3b, 0xbe3c, 0xbe3d, 0xbe3e, 0xbe3f, - 0xbe40, 0xbe41, 0xbe42, 0xbe43, 0xbe44, 0xbe45, 0xbe46, 0xbe47, - 0xbe48, 0xbe49, 0xbe4a, 0xbe4b, 0xbe4c, 0xbe4d, 0xbe4e, 0xbe4f, - 0xbe50, 0xbe51, 0xbe52, 0xbe53, 0xbe54, 0xbe55, 0xbe56, 0xbe57, - 0xbe58, 0xbe59, 0xbe5a, 0xbe5b, 0xbe5c, 0xbe5d, 0xbe5e, 0xbe5f, - 0xbe60, 0xbe61, 0xbe62, 0xbe63, 0xbe64, 0xbe65, 0xbe66, 0xbe67, - 0xbe68, 0xbe69, 0xbe6a, 0xbe6b, 0xbe6c, 0xbe6d, 0xbe6e, 0xbe6f, - 0xbe70, 0xbe71, 0xbe72, 0xbe73, 0xbe74, 0xbe75, 0xbe76, 0xbe77, - 0xbe78, 0xbe79, 0xbe7a, 0xbe7b, 0xbe7c, 0xbe7d, 0xbe7e, 0xbe7f, - 0xbe80, 0xbe81, 0xbe82, 0xbe83, 0xbe84, 0xbe85, 0xbe86, 0xbe87, - 0xbe88, 0xbe89, 0xbe8a, 0xbe8b, 0xbe8c, 0xbe8d, 0xbe8e, 0xbe8f, - 0xbe90, 0xbe91, 0xbe92, 0xbe93, 0xbe94, 0xbe95, 0xbe96, 0xbe97, - 0xbe98, 0xbe99, 0xbe9a, 0xbe9b, 0xbe9c, 0xbe9d, 0xbe9e, 0xbe9f, - 0xbea0, 0xbea1, 0xbea2, 0xbea3, 0xbea4, 0xbea5, 0xbea6, 0xbea7, - 0xbea8, 0xbea9, 0xbeaa, 0xbeab, 0xbeac, 0xbead, 0xbeae, 0xbeaf, - 0xbeb0, 0xbeb1, 0xbeb2, 0xbeb3, 0xbeb4, 0xbeb5, 0xbeb6, 0xbeb7, - 0xbeb8, 0xbeb9, 0xbeba, 0xbebb, 0xbebc, 0xbebd, 0xbebe, 0xbebf, - 0xbec0, 0xbec1, 0xbec2, 0xbec3, 0xbec4, 0xbec5, 0xbec6, 0xbec7, - 0xbec8, 0xbec9, 0xbeca, 0xbecb, 0xbecc, 0xbecd, 0xbece, 0xbecf, - 0xbed0, 0xbed1, 0xbed2, 0xbed3, 0xbed4, 0xbed5, 0xbed6, 0xbed7, - 0xbed8, 0xbed9, 0xbeda, 0xbedb, 0xbedc, 0xbedd, 0xbede, 0xbedf, - 0xbee0, 0xbee1, 0xbee2, 0xbee3, 0xbee4, 0xbee5, 0xbee6, 0xbee7, - 0xbee8, 0xbee9, 0xbeea, 0xbeeb, 0xbeec, 0xbeed, 0xbeee, 0xbeef, - 0xbef0, 0xbef1, 0xbef2, 0xbef3, 0xbef4, 0xbef5, 0xbef6, 0xbef7, - 0xbef8, 0xbef9, 0xbefa, 0xbefb, 0xbefc, 0xbefd, 0xbefe, 0xbeff, - 0xbf00, 0xbf01, 0xbf02, 0xbf03, 0xbf04, 0xbf05, 0xbf06, 0xbf07, - 0xbf08, 0xbf09, 0xbf0a, 0xbf0b, 0xbf0c, 0xbf0d, 0xbf0e, 0xbf0f, - 0xbf10, 0xbf11, 0xbf12, 0xbf13, 0xbf14, 0xbf15, 0xbf16, 0xbf17, - 0xbf18, 0xbf19, 0xbf1a, 0xbf1b, 0xbf1c, 0xbf1d, 0xbf1e, 0xbf1f, - 0xbf20, 0xbf21, 0xbf22, 0xbf23, 0xbf24, 0xbf25, 0xbf26, 0xbf27, - 0xbf28, 0xbf29, 0xbf2a, 0xbf2b, 0xbf2c, 0xbf2d, 0xbf2e, 0xbf2f, - 0xbf30, 0xbf31, 0xbf32, 0xbf33, 0xbf34, 0xbf35, 0xbf36, 0xbf37, - 0xbf38, 0xbf39, 0xbf3a, 0xbf3b, 0xbf3c, 0xbf3d, 0xbf3e, 0xbf3f, - 0xbf40, 0xbf41, 0xbf42, 0xbf43, 0xbf44, 0xbf45, 0xbf46, 0xbf47, - 0xbf48, 0xbf49, 0xbf4a, 0xbf4b, 0xbf4c, 0xbf4d, 0xbf4e, 0xbf4f, - 0xbf50, 0xbf51, 0xbf52, 0xbf53, 0xbf54, 0xbf55, 0xbf56, 0xbf57, - 0xbf58, 0xbf59, 0xbf5a, 0xbf5b, 0xbf5c, 0xbf5d, 0xbf5e, 0xbf5f, - 0xbf60, 0xbf61, 0xbf62, 0xbf63, 0xbf64, 0xbf65, 0xbf66, 0xbf67, - 0xbf68, 0xbf69, 0xbf6a, 0xbf6b, 0xbf6c, 0xbf6d, 0xbf6e, 0xbf6f, - 0xbf70, 0xbf71, 0xbf72, 0xbf73, 0xbf74, 0xbf75, 0xbf76, 0xbf77, - 0xbf78, 0xbf79, 0xbf7a, 0xbf7b, 0xbf7c, 0xbf7d, 0xbf7e, 0xbf7f, - 0xbf80, 0xbf81, 0xbf82, 0xbf83, 0xbf84, 0xbf85, 0xbf86, 0xbf87, - 0xbf88, 0xbf89, 0xbf8a, 0xbf8b, 0xbf8c, 0xbf8d, 0xbf8e, 0xbf8f, - 0xbf90, 0xbf91, 0xbf92, 0xbf93, 0xbf94, 0xbf95, 0xbf96, 0xbf97, - 0xbf98, 0xbf99, 0xbf9a, 0xbf9b, 0xbf9c, 0xbf9d, 0xbf9e, 0xbf9f, - 0xbfa0, 0xbfa1, 0xbfa2, 0xbfa3, 0xbfa4, 0xbfa5, 0xbfa6, 0xbfa7, - 0xbfa8, 0xbfa9, 0xbfaa, 0xbfab, 0xbfac, 0xbfad, 0xbfae, 0xbfaf, - 0xbfb0, 0xbfb1, 0xbfb2, 0xbfb3, 0xbfb4, 0xbfb5, 0xbfb6, 0xbfb7, - 0xbfb8, 0xbfb9, 0xbfba, 0xbfbb, 0xbfbc, 0xbfbd, 0xbfbe, 0xbfbf, - 0xbfc0, 0xbfc1, 0xbfc2, 0xbfc3, 0xbfc4, 0xbfc5, 0xbfc6, 0xbfc7, - 0xbfc8, 0xbfc9, 0xbfca, 0xbfcb, 0xbfcc, 0xbfcd, 0xbfce, 0xbfcf, - 0xbfd0, 0xbfd1, 0xbfd2, 0xbfd3, 0xbfd4, 0xbfd5, 0xbfd6, 0xbfd7, - 0xbfd8, 0xbfd9, 0xbfda, 0xbfdb, 0xbfdc, 0xbfdd, 0xbfde, 0xbfdf, - 0xbfe0, 0xbfe1, 0xbfe2, 0xbfe3, 0xbfe4, 0xbfe5, 0xbfe6, 0xbfe7, - 0xbfe8, 0xbfe9, 0xbfea, 0xbfeb, 0xbfec, 0xbfed, 0xbfee, 0xbfef, - 0xbff0, 0xbff1, 0xbff2, 0xbff3, 0xbff4, 0xbff5, 0xbff6, 0xbff7, - 0xbff8, 0xbff9, 0xbffa, 0xbffb, 0xbffc, 0xbffd, 0xbffe, 0xbfff, - 0xc000, 0xc001, 0xc002, 0xc003, 0xc004, 0xc005, 0xc006, 0xc007, - 0xc008, 0xc009, 0xc00a, 0xc00b, 0xc00c, 0xc00d, 0xc00e, 0xc00f, - 0xc010, 0xc011, 0xc012, 0xc013, 0xc014, 0xc015, 0xc016, 0xc017, - 0xc018, 0xc019, 0xc01a, 0xc01b, 0xc01c, 0xc01d, 0xc01e, 0xc01f, - 0xc020, 0xc021, 0xc022, 0xc023, 0xc024, 0xc025, 0xc026, 0xc027, - 0xc028, 0xc029, 0xc02a, 0xc02b, 0xc02c, 0xc02d, 0xc02e, 0xc02f, - 0xc030, 0xc031, 0xc032, 0xc033, 0xc034, 0xc035, 0xc036, 0xc037, - 0xc038, 0xc039, 0xc03a, 0xc03b, 0xc03c, 0xc03d, 0xc03e, 0xc03f, - 0xc040, 0xc041, 0xc042, 0xc043, 0xc044, 0xc045, 0xc046, 0xc047, - 0xc048, 0xc049, 0xc04a, 0xc04b, 0xc04c, 0xc04d, 0xc04e, 0xc04f, - 0xc050, 0xc051, 0xc052, 0xc053, 0xc054, 0xc055, 0xc056, 0xc057, - 0xc058, 0xc059, 0xc05a, 0xc05b, 0xc05c, 0xc05d, 0xc05e, 0xc05f, - 0xc060, 0xc061, 0xc062, 0xc063, 0xc064, 0xc065, 0xc066, 0xc067, - 0xc068, 0xc069, 0xc06a, 0xc06b, 0xc06c, 0xc06d, 0xc06e, 0xc06f, - 0xc070, 0xc071, 0xc072, 0xc073, 0xc074, 0xc075, 0xc076, 0xc077, - 0xc078, 0xc079, 0xc07a, 0xc07b, 0xc07c, 0xc07d, 0xc07e, 0xc07f, - 0xc080, 0xc081, 0xc082, 0xc083, 0xc084, 0xc085, 0xc086, 0xc087, - 0xc088, 0xc089, 0xc08a, 0xc08b, 0xc08c, 0xc08d, 0xc08e, 0xc08f, - 0xc090, 0xc091, 0xc092, 0xc093, 0xc094, 0xc095, 0xc096, 0xc097, - 0xc098, 0xc099, 0xc09a, 0xc09b, 0xc09c, 0xc09d, 0xc09e, 0xc09f, - 0xc0a0, 0xc0a1, 0xc0a2, 0xc0a3, 0xc0a4, 0xc0a5, 0xc0a6, 0xc0a7, - 0xc0a8, 0xc0a9, 0xc0aa, 0xc0ab, 0xc0ac, 0xc0ad, 0xc0ae, 0xc0af, - 0xc0b0, 0xc0b1, 0xc0b2, 0xc0b3, 0xc0b4, 0xc0b5, 0xc0b6, 0xc0b7, - 0xc0b8, 0xc0b9, 0xc0ba, 0xc0bb, 0xc0bc, 0xc0bd, 0xc0be, 0xc0bf, - 0xc0c0, 0xc0c1, 0xc0c2, 0xc0c3, 0xc0c4, 0xc0c5, 0xc0c6, 0xc0c7, - 0xc0c8, 0xc0c9, 0xc0ca, 0xc0cb, 0xc0cc, 0xc0cd, 0xc0ce, 0xc0cf, - 0xc0d0, 0xc0d1, 0xc0d2, 0xc0d3, 0xc0d4, 0xc0d5, 0xc0d6, 0xc0d7, - 0xc0d8, 0xc0d9, 0xc0da, 0xc0db, 0xc0dc, 0xc0dd, 0xc0de, 0xc0df, - 0xc0e0, 0xc0e1, 0xc0e2, 0xc0e3, 0xc0e4, 0xc0e5, 0xc0e6, 0xc0e7, - 0xc0e8, 0xc0e9, 0xc0ea, 0xc0eb, 0xc0ec, 0xc0ed, 0xc0ee, 0xc0ef, - 0xc0f0, 0xc0f1, 0xc0f2, 0xc0f3, 0xc0f4, 0xc0f5, 0xc0f6, 0xc0f7, - 0xc0f8, 0xc0f9, 0xc0fa, 0xc0fb, 0xc0fc, 0xc0fd, 0xc0fe, 0xc0ff, - 0xc100, 0xc101, 0xc102, 0xc103, 0xc104, 0xc105, 0xc106, 0xc107, - 0xc108, 0xc109, 0xc10a, 0xc10b, 0xc10c, 0xc10d, 0xc10e, 0xc10f, - 0xc110, 0xc111, 0xc112, 0xc113, 0xc114, 0xc115, 0xc116, 0xc117, - 0xc118, 0xc119, 0xc11a, 0xc11b, 0xc11c, 0xc11d, 0xc11e, 0xc11f, - 0xc120, 0xc121, 0xc122, 0xc123, 0xc124, 0xc125, 0xc126, 0xc127, - 0xc128, 0xc129, 0xc12a, 0xc12b, 0xc12c, 0xc12d, 0xc12e, 0xc12f, - 0xc130, 0xc131, 0xc132, 0xc133, 0xc134, 0xc135, 0xc136, 0xc137, - 0xc138, 0xc139, 0xc13a, 0xc13b, 0xc13c, 0xc13d, 0xc13e, 0xc13f, - 0xc140, 0xc141, 0xc142, 0xc143, 0xc144, 0xc145, 0xc146, 0xc147, - 0xc148, 0xc149, 0xc14a, 0xc14b, 0xc14c, 0xc14d, 0xc14e, 0xc14f, - 0xc150, 0xc151, 0xc152, 0xc153, 0xc154, 0xc155, 0xc156, 0xc157, - 0xc158, 0xc159, 0xc15a, 0xc15b, 0xc15c, 0xc15d, 0xc15e, 0xc15f, - 0xc160, 0xc161, 0xc162, 0xc163, 0xc164, 0xc165, 0xc166, 0xc167, - 0xc168, 0xc169, 0xc16a, 0xc16b, 0xc16c, 0xc16d, 0xc16e, 0xc16f, - 0xc170, 0xc171, 0xc172, 0xc173, 0xc174, 0xc175, 0xc176, 0xc177, - 0xc178, 0xc179, 0xc17a, 0xc17b, 0xc17c, 0xc17d, 0xc17e, 0xc17f, - 0xc180, 0xc181, 0xc182, 0xc183, 0xc184, 0xc185, 0xc186, 0xc187, - 0xc188, 0xc189, 0xc18a, 0xc18b, 0xc18c, 0xc18d, 0xc18e, 0xc18f, - 0xc190, 0xc191, 0xc192, 0xc193, 0xc194, 0xc195, 0xc196, 0xc197, - 0xc198, 0xc199, 0xc19a, 0xc19b, 0xc19c, 0xc19d, 0xc19e, 0xc19f, - 0xc1a0, 0xc1a1, 0xc1a2, 0xc1a3, 0xc1a4, 0xc1a5, 0xc1a6, 0xc1a7, - 0xc1a8, 0xc1a9, 0xc1aa, 0xc1ab, 0xc1ac, 0xc1ad, 0xc1ae, 0xc1af, - 0xc1b0, 0xc1b1, 0xc1b2, 0xc1b3, 0xc1b4, 0xc1b5, 0xc1b6, 0xc1b7, - 0xc1b8, 0xc1b9, 0xc1ba, 0xc1bb, 0xc1bc, 0xc1bd, 0xc1be, 0xc1bf, - 0xc1c0, 0xc1c1, 0xc1c2, 0xc1c3, 0xc1c4, 0xc1c5, 0xc1c6, 0xc1c7, - 0xc1c8, 0xc1c9, 0xc1ca, 0xc1cb, 0xc1cc, 0xc1cd, 0xc1ce, 0xc1cf, - 0xc1d0, 0xc1d1, 0xc1d2, 0xc1d3, 0xc1d4, 0xc1d5, 0xc1d6, 0xc1d7, - 0xc1d8, 0xc1d9, 0xc1da, 0xc1db, 0xc1dc, 0xc1dd, 0xc1de, 0xc1df, - 0xc1e0, 0xc1e1, 0xc1e2, 0xc1e3, 0xc1e4, 0xc1e5, 0xc1e6, 0xc1e7, - 0xc1e8, 0xc1e9, 0xc1ea, 0xc1eb, 0xc1ec, 0xc1ed, 0xc1ee, 0xc1ef, - 0xc1f0, 0xc1f1, 0xc1f2, 0xc1f3, 0xc1f4, 0xc1f5, 0xc1f6, 0xc1f7, - 0xc1f8, 0xc1f9, 0xc1fa, 0xc1fb, 0xc1fc, 0xc1fd, 0xc1fe, 0xc1ff, - 0xc200, 0xc201, 0xc202, 0xc203, 0xc204, 0xc205, 0xc206, 0xc207, - 0xc208, 0xc209, 0xc20a, 0xc20b, 0xc20c, 0xc20d, 0xc20e, 0xc20f, - 0xc210, 0xc211, 0xc212, 0xc213, 0xc214, 0xc215, 0xc216, 0xc217, - 0xc218, 0xc219, 0xc21a, 0xc21b, 0xc21c, 0xc21d, 0xc21e, 0xc21f, - 0xc220, 0xc221, 0xc222, 0xc223, 0xc224, 0xc225, 0xc226, 0xc227, - 0xc228, 0xc229, 0xc22a, 0xc22b, 0xc22c, 0xc22d, 0xc22e, 0xc22f, - 0xc230, 0xc231, 0xc232, 0xc233, 0xc234, 0xc235, 0xc236, 0xc237, - 0xc238, 0xc239, 0xc23a, 0xc23b, 0xc23c, 0xc23d, 0xc23e, 0xc23f, - 0xc240, 0xc241, 0xc242, 0xc243, 0xc244, 0xc245, 0xc246, 0xc247, - 0xc248, 0xc249, 0xc24a, 0xc24b, 0xc24c, 0xc24d, 0xc24e, 0xc24f, - 0xc250, 0xc251, 0xc252, 0xc253, 0xc254, 0xc255, 0xc256, 0xc257, - 0xc258, 0xc259, 0xc25a, 0xc25b, 0xc25c, 0xc25d, 0xc25e, 0xc25f, - 0xc260, 0xc261, 0xc262, 0xc263, 0xc264, 0xc265, 0xc266, 0xc267, - 0xc268, 0xc269, 0xc26a, 0xc26b, 0xc26c, 0xc26d, 0xc26e, 0xc26f, - 0xc270, 0xc271, 0xc272, 0xc273, 0xc274, 0xc275, 0xc276, 0xc277, - 0xc278, 0xc279, 0xc27a, 0xc27b, 0xc27c, 0xc27d, 0xc27e, 0xc27f, - 0xc280, 0xc281, 0xc282, 0xc283, 0xc284, 0xc285, 0xc286, 0xc287, - 0xc288, 0xc289, 0xc28a, 0xc28b, 0xc28c, 0xc28d, 0xc28e, 0xc28f, - 0xc290, 0xc291, 0xc292, 0xc293, 0xc294, 0xc295, 0xc296, 0xc297, - 0xc298, 0xc299, 0xc29a, 0xc29b, 0xc29c, 0xc29d, 0xc29e, 0xc29f, - 0xc2a0, 0xc2a1, 0xc2a2, 0xc2a3, 0xc2a4, 0xc2a5, 0xc2a6, 0xc2a7, - 0xc2a8, 0xc2a9, 0xc2aa, 0xc2ab, 0xc2ac, 0xc2ad, 0xc2ae, 0xc2af, - 0xc2b0, 0xc2b1, 0xc2b2, 0xc2b3, 0xc2b4, 0xc2b5, 0xc2b6, 0xc2b7, - 0xc2b8, 0xc2b9, 0xc2ba, 0xc2bb, 0xc2bc, 0xc2bd, 0xc2be, 0xc2bf, - 0xc2c0, 0xc2c1, 0xc2c2, 0xc2c3, 0xc2c4, 0xc2c5, 0xc2c6, 0xc2c7, - 0xc2c8, 0xc2c9, 0xc2ca, 0xc2cb, 0xc2cc, 0xc2cd, 0xc2ce, 0xc2cf, - 0xc2d0, 0xc2d1, 0xc2d2, 0xc2d3, 0xc2d4, 0xc2d5, 0xc2d6, 0xc2d7, - 0xc2d8, 0xc2d9, 0xc2da, 0xc2db, 0xc2dc, 0xc2dd, 0xc2de, 0xc2df, - 0xc2e0, 0xc2e1, 0xc2e2, 0xc2e3, 0xc2e4, 0xc2e5, 0xc2e6, 0xc2e7, - 0xc2e8, 0xc2e9, 0xc2ea, 0xc2eb, 0xc2ec, 0xc2ed, 0xc2ee, 0xc2ef, - 0xc2f0, 0xc2f1, 0xc2f2, 0xc2f3, 0xc2f4, 0xc2f5, 0xc2f6, 0xc2f7, - 0xc2f8, 0xc2f9, 0xc2fa, 0xc2fb, 0xc2fc, 0xc2fd, 0xc2fe, 0xc2ff, - 0xc300, 0xc301, 0xc302, 0xc303, 0xc304, 0xc305, 0xc306, 0xc307, - 0xc308, 0xc309, 0xc30a, 0xc30b, 0xc30c, 0xc30d, 0xc30e, 0xc30f, - 0xc310, 0xc311, 0xc312, 0xc313, 0xc314, 0xc315, 0xc316, 0xc317, - 0xc318, 0xc319, 0xc31a, 0xc31b, 0xc31c, 0xc31d, 0xc31e, 0xc31f, - 0xc320, 0xc321, 0xc322, 0xc323, 0xc324, 0xc325, 0xc326, 0xc327, - 0xc328, 0xc329, 0xc32a, 0xc32b, 0xc32c, 0xc32d, 0xc32e, 0xc32f, - 0xc330, 0xc331, 0xc332, 0xc333, 0xc334, 0xc335, 0xc336, 0xc337, - 0xc338, 0xc339, 0xc33a, 0xc33b, 0xc33c, 0xc33d, 0xc33e, 0xc33f, - 0xc340, 0xc341, 0xc342, 0xc343, 0xc344, 0xc345, 0xc346, 0xc347, - 0xc348, 0xc349, 0xc34a, 0xc34b, 0xc34c, 0xc34d, 0xc34e, 0xc34f, - 0xc350, 0xc351, 0xc352, 0xc353, 0xc354, 0xc355, 0xc356, 0xc357, - 0xc358, 0xc359, 0xc35a, 0xc35b, 0xc35c, 0xc35d, 0xc35e, 0xc35f, - 0xc360, 0xc361, 0xc362, 0xc363, 0xc364, 0xc365, 0xc366, 0xc367, - 0xc368, 0xc369, 0xc36a, 0xc36b, 0xc36c, 0xc36d, 0xc36e, 0xc36f, - 0xc370, 0xc371, 0xc372, 0xc373, 0xc374, 0xc375, 0xc376, 0xc377, - 0xc378, 0xc379, 0xc37a, 0xc37b, 0xc37c, 0xc37d, 0xc37e, 0xc37f, - 0xc380, 0xc381, 0xc382, 0xc383, 0xc384, 0xc385, 0xc386, 0xc387, - 0xc388, 0xc389, 0xc38a, 0xc38b, 0xc38c, 0xc38d, 0xc38e, 0xc38f, - 0xc390, 0xc391, 0xc392, 0xc393, 0xc394, 0xc395, 0xc396, 0xc397, - 0xc398, 0xc399, 0xc39a, 0xc39b, 0xc39c, 0xc39d, 0xc39e, 0xc39f, - 0xc3a0, 0xc3a1, 0xc3a2, 0xc3a3, 0xc3a4, 0xc3a5, 0xc3a6, 0xc3a7, - 0xc3a8, 0xc3a9, 0xc3aa, 0xc3ab, 0xc3ac, 0xc3ad, 0xc3ae, 0xc3af, - 0xc3b0, 0xc3b1, 0xc3b2, 0xc3b3, 0xc3b4, 0xc3b5, 0xc3b6, 0xc3b7, - 0xc3b8, 0xc3b9, 0xc3ba, 0xc3bb, 0xc3bc, 0xc3bd, 0xc3be, 0xc3bf, - 0xc3c0, 0xc3c1, 0xc3c2, 0xc3c3, 0xc3c4, 0xc3c5, 0xc3c6, 0xc3c7, - 0xc3c8, 0xc3c9, 0xc3ca, 0xc3cb, 0xc3cc, 0xc3cd, 0xc3ce, 0xc3cf, - 0xc3d0, 0xc3d1, 0xc3d2, 0xc3d3, 0xc3d4, 0xc3d5, 0xc3d6, 0xc3d7, - 0xc3d8, 0xc3d9, 0xc3da, 0xc3db, 0xc3dc, 0xc3dd, 0xc3de, 0xc3df, - 0xc3e0, 0xc3e1, 0xc3e2, 0xc3e3, 0xc3e4, 0xc3e5, 0xc3e6, 0xc3e7, - 0xc3e8, 0xc3e9, 0xc3ea, 0xc3eb, 0xc3ec, 0xc3ed, 0xc3ee, 0xc3ef, - 0xc3f0, 0xc3f1, 0xc3f2, 0xc3f3, 0xc3f4, 0xc3f5, 0xc3f6, 0xc3f7, - 0xc3f8, 0xc3f9, 0xc3fa, 0xc3fb, 0xc3fc, 0xc3fd, 0xc3fe, 0xc3ff, - 0xc400, 0xc401, 0xc402, 0xc403, 0xc404, 0xc405, 0xc406, 0xc407, - 0xc408, 0xc409, 0xc40a, 0xc40b, 0xc40c, 0xc40d, 0xc40e, 0xc40f, - 0xc410, 0xc411, 0xc412, 0xc413, 0xc414, 0xc415, 0xc416, 0xc417, - 0xc418, 0xc419, 0xc41a, 0xc41b, 0xc41c, 0xc41d, 0xc41e, 0xc41f, - 0xc420, 0xc421, 0xc422, 0xc423, 0xc424, 0xc425, 0xc426, 0xc427, - 0xc428, 0xc429, 0xc42a, 0xc42b, 0xc42c, 0xc42d, 0xc42e, 0xc42f, - 0xc430, 0xc431, 0xc432, 0xc433, 0xc434, 0xc435, 0xc436, 0xc437, - 0xc438, 0xc439, 0xc43a, 0xc43b, 0xc43c, 0xc43d, 0xc43e, 0xc43f, - 0xc440, 0xc441, 0xc442, 0xc443, 0xc444, 0xc445, 0xc446, 0xc447, - 0xc448, 0xc449, 0xc44a, 0xc44b, 0xc44c, 0xc44d, 0xc44e, 0xc44f, - 0xc450, 0xc451, 0xc452, 0xc453, 0xc454, 0xc455, 0xc456, 0xc457, - 0xc458, 0xc459, 0xc45a, 0xc45b, 0xc45c, 0xc45d, 0xc45e, 0xc45f, - 0xc460, 0xc461, 0xc462, 0xc463, 0xc464, 0xc465, 0xc466, 0xc467, - 0xc468, 0xc469, 0xc46a, 0xc46b, 0xc46c, 0xc46d, 0xc46e, 0xc46f, - 0xc470, 0xc471, 0xc472, 0xc473, 0xc474, 0xc475, 0xc476, 0xc477, - 0xc478, 0xc479, 0xc47a, 0xc47b, 0xc47c, 0xc47d, 0xc47e, 0xc47f, - 0xc480, 0xc481, 0xc482, 0xc483, 0xc484, 0xc485, 0xc486, 0xc487, - 0xc488, 0xc489, 0xc48a, 0xc48b, 0xc48c, 0xc48d, 0xc48e, 0xc48f, - 0xc490, 0xc491, 0xc492, 0xc493, 0xc494, 0xc495, 0xc496, 0xc497, - 0xc498, 0xc499, 0xc49a, 0xc49b, 0xc49c, 0xc49d, 0xc49e, 0xc49f, - 0xc4a0, 0xc4a1, 0xc4a2, 0xc4a3, 0xc4a4, 0xc4a5, 0xc4a6, 0xc4a7, - 0xc4a8, 0xc4a9, 0xc4aa, 0xc4ab, 0xc4ac, 0xc4ad, 0xc4ae, 0xc4af, - 0xc4b0, 0xc4b1, 0xc4b2, 0xc4b3, 0xc4b4, 0xc4b5, 0xc4b6, 0xc4b7, - 0xc4b8, 0xc4b9, 0xc4ba, 0xc4bb, 0xc4bc, 0xc4bd, 0xc4be, 0xc4bf, - 0xc4c0, 0xc4c1, 0xc4c2, 0xc4c3, 0xc4c4, 0xc4c5, 0xc4c6, 0xc4c7, - 0xc4c8, 0xc4c9, 0xc4ca, 0xc4cb, 0xc4cc, 0xc4cd, 0xc4ce, 0xc4cf, - 0xc4d0, 0xc4d1, 0xc4d2, 0xc4d3, 0xc4d4, 0xc4d5, 0xc4d6, 0xc4d7, - 0xc4d8, 0xc4d9, 0xc4da, 0xc4db, 0xc4dc, 0xc4dd, 0xc4de, 0xc4df, - 0xc4e0, 0xc4e1, 0xc4e2, 0xc4e3, 0xc4e4, 0xc4e5, 0xc4e6, 0xc4e7, - 0xc4e8, 0xc4e9, 0xc4ea, 0xc4eb, 0xc4ec, 0xc4ed, 0xc4ee, 0xc4ef, - 0xc4f0, 0xc4f1, 0xc4f2, 0xc4f3, 0xc4f4, 0xc4f5, 0xc4f6, 0xc4f7, - 0xc4f8, 0xc4f9, 0xc4fa, 0xc4fb, 0xc4fc, 0xc4fd, 0xc4fe, 0xc4ff, - 0xc500, 0xc501, 0xc502, 0xc503, 0xc504, 0xc505, 0xc506, 0xc507, - 0xc508, 0xc509, 0xc50a, 0xc50b, 0xc50c, 0xc50d, 0xc50e, 0xc50f, - 0xc510, 0xc511, 0xc512, 0xc513, 0xc514, 0xc515, 0xc516, 0xc517, - 0xc518, 0xc519, 0xc51a, 0xc51b, 0xc51c, 0xc51d, 0xc51e, 0xc51f, - 0xc520, 0xc521, 0xc522, 0xc523, 0xc524, 0xc525, 0xc526, 0xc527, - 0xc528, 0xc529, 0xc52a, 0xc52b, 0xc52c, 0xc52d, 0xc52e, 0xc52f, - 0xc530, 0xc531, 0xc532, 0xc533, 0xc534, 0xc535, 0xc536, 0xc537, - 0xc538, 0xc539, 0xc53a, 0xc53b, 0xc53c, 0xc53d, 0xc53e, 0xc53f, - 0xc540, 0xc541, 0xc542, 0xc543, 0xc544, 0xc545, 0xc546, 0xc547, - 0xc548, 0xc549, 0xc54a, 0xc54b, 0xc54c, 0xc54d, 0xc54e, 0xc54f, - 0xc550, 0xc551, 0xc552, 0xc553, 0xc554, 0xc555, 0xc556, 0xc557, - 0xc558, 0xc559, 0xc55a, 0xc55b, 0xc55c, 0xc55d, 0xc55e, 0xc55f, - 0xc560, 0xc561, 0xc562, 0xc563, 0xc564, 0xc565, 0xc566, 0xc567, - 0xc568, 0xc569, 0xc56a, 0xc56b, 0xc56c, 0xc56d, 0xc56e, 0xc56f, - 0xc570, 0xc571, 0xc572, 0xc573, 0xc574, 0xc575, 0xc576, 0xc577, - 0xc578, 0xc579, 0xc57a, 0xc57b, 0xc57c, 0xc57d, 0xc57e, 0xc57f, - 0xc580, 0xc581, 0xc582, 0xc583, 0xc584, 0xc585, 0xc586, 0xc587, - 0xc588, 0xc589, 0xc58a, 0xc58b, 0xc58c, 0xc58d, 0xc58e, 0xc58f, - 0xc590, 0xc591, 0xc592, 0xc593, 0xc594, 0xc595, 0xc596, 0xc597, - 0xc598, 0xc599, 0xc59a, 0xc59b, 0xc59c, 0xc59d, 0xc59e, 0xc59f, - 0xc5a0, 0xc5a1, 0xc5a2, 0xc5a3, 0xc5a4, 0xc5a5, 0xc5a6, 0xc5a7, - 0xc5a8, 0xc5a9, 0xc5aa, 0xc5ab, 0xc5ac, 0xc5ad, 0xc5ae, 0xc5af, - 0xc5b0, 0xc5b1, 0xc5b2, 0xc5b3, 0xc5b4, 0xc5b5, 0xc5b6, 0xc5b7, - 0xc5b8, 0xc5b9, 0xc5ba, 0xc5bb, 0xc5bc, 0xc5bd, 0xc5be, 0xc5bf, - 0xc5c0, 0xc5c1, 0xc5c2, 0xc5c3, 0xc5c4, 0xc5c5, 0xc5c6, 0xc5c7, - 0xc5c8, 0xc5c9, 0xc5ca, 0xc5cb, 0xc5cc, 0xc5cd, 0xc5ce, 0xc5cf, - 0xc5d0, 0xc5d1, 0xc5d2, 0xc5d3, 0xc5d4, 0xc5d5, 0xc5d6, 0xc5d7, - 0xc5d8, 0xc5d9, 0xc5da, 0xc5db, 0xc5dc, 0xc5dd, 0xc5de, 0xc5df, - 0xc5e0, 0xc5e1, 0xc5e2, 0xc5e3, 0xc5e4, 0xc5e5, 0xc5e6, 0xc5e7, - 0xc5e8, 0xc5e9, 0xc5ea, 0xc5eb, 0xc5ec, 0xc5ed, 0xc5ee, 0xc5ef, - 0xc5f0, 0xc5f1, 0xc5f2, 0xc5f3, 0xc5f4, 0xc5f5, 0xc5f6, 0xc5f7, - 0xc5f8, 0xc5f9, 0xc5fa, 0xc5fb, 0xc5fc, 0xc5fd, 0xc5fe, 0xc5ff, - 0xc600, 0xc601, 0xc602, 0xc603, 0xc604, 0xc605, 0xc606, 0xc607, - 0xc608, 0xc609, 0xc60a, 0xc60b, 0xc60c, 0xc60d, 0xc60e, 0xc60f, - 0xc610, 0xc611, 0xc612, 0xc613, 0xc614, 0xc615, 0xc616, 0xc617, - 0xc618, 0xc619, 0xc61a, 0xc61b, 0xc61c, 0xc61d, 0xc61e, 0xc61f, - 0xc620, 0xc621, 0xc622, 0xc623, 0xc624, 0xc625, 0xc626, 0xc627, - 0xc628, 0xc629, 0xc62a, 0xc62b, 0xc62c, 0xc62d, 0xc62e, 0xc62f, - 0xc630, 0xc631, 0xc632, 0xc633, 0xc634, 0xc635, 0xc636, 0xc637, - 0xc638, 0xc639, 0xc63a, 0xc63b, 0xc63c, 0xc63d, 0xc63e, 0xc63f, - 0xc640, 0xc641, 0xc642, 0xc643, 0xc644, 0xc645, 0xc646, 0xc647, - 0xc648, 0xc649, 0xc64a, 0xc64b, 0xc64c, 0xc64d, 0xc64e, 0xc64f, - 0xc650, 0xc651, 0xc652, 0xc653, 0xc654, 0xc655, 0xc656, 0xc657, - 0xc658, 0xc659, 0xc65a, 0xc65b, 0xc65c, 0xc65d, 0xc65e, 0xc65f, - 0xc660, 0xc661, 0xc662, 0xc663, 0xc664, 0xc665, 0xc666, 0xc667, - 0xc668, 0xc669, 0xc66a, 0xc66b, 0xc66c, 0xc66d, 0xc66e, 0xc66f, - 0xc670, 0xc671, 0xc672, 0xc673, 0xc674, 0xc675, 0xc676, 0xc677, - 0xc678, 0xc679, 0xc67a, 0xc67b, 0xc67c, 0xc67d, 0xc67e, 0xc67f, - 0xc680, 0xc681, 0xc682, 0xc683, 0xc684, 0xc685, 0xc686, 0xc687, - 0xc688, 0xc689, 0xc68a, 0xc68b, 0xc68c, 0xc68d, 0xc68e, 0xc68f, - 0xc690, 0xc691, 0xc692, 0xc693, 0xc694, 0xc695, 0xc696, 0xc697, - 0xc698, 0xc699, 0xc69a, 0xc69b, 0xc69c, 0xc69d, 0xc69e, 0xc69f, - 0xc6a0, 0xc6a1, 0xc6a2, 0xc6a3, 0xc6a4, 0xc6a5, 0xc6a6, 0xc6a7, - 0xc6a8, 0xc6a9, 0xc6aa, 0xc6ab, 0xc6ac, 0xc6ad, 0xc6ae, 0xc6af, - 0xc6b0, 0xc6b1, 0xc6b2, 0xc6b3, 0xc6b4, 0xc6b5, 0xc6b6, 0xc6b7, - 0xc6b8, 0xc6b9, 0xc6ba, 0xc6bb, 0xc6bc, 0xc6bd, 0xc6be, 0xc6bf, - 0xc6c0, 0xc6c1, 0xc6c2, 0xc6c3, 0xc6c4, 0xc6c5, 0xc6c6, 0xc6c7, - 0xc6c8, 0xc6c9, 0xc6ca, 0xc6cb, 0xc6cc, 0xc6cd, 0xc6ce, 0xc6cf, - 0xc6d0, 0xc6d1, 0xc6d2, 0xc6d3, 0xc6d4, 0xc6d5, 0xc6d6, 0xc6d7, - 0xc6d8, 0xc6d9, 0xc6da, 0xc6db, 0xc6dc, 0xc6dd, 0xc6de, 0xc6df, - 0xc6e0, 0xc6e1, 0xc6e2, 0xc6e3, 0xc6e4, 0xc6e5, 0xc6e6, 0xc6e7, - 0xc6e8, 0xc6e9, 0xc6ea, 0xc6eb, 0xc6ec, 0xc6ed, 0xc6ee, 0xc6ef, - 0xc6f0, 0xc6f1, 0xc6f2, 0xc6f3, 0xc6f4, 0xc6f5, 0xc6f6, 0xc6f7, - 0xc6f8, 0xc6f9, 0xc6fa, 0xc6fb, 0xc6fc, 0xc6fd, 0xc6fe, 0xc6ff, - 0xc700, 0xc701, 0xc702, 0xc703, 0xc704, 0xc705, 0xc706, 0xc707, - 0xc708, 0xc709, 0xc70a, 0xc70b, 0xc70c, 0xc70d, 0xc70e, 0xc70f, - 0xc710, 0xc711, 0xc712, 0xc713, 0xc714, 0xc715, 0xc716, 0xc717, - 0xc718, 0xc719, 0xc71a, 0xc71b, 0xc71c, 0xc71d, 0xc71e, 0xc71f, - 0xc720, 0xc721, 0xc722, 0xc723, 0xc724, 0xc725, 0xc726, 0xc727, - 0xc728, 0xc729, 0xc72a, 0xc72b, 0xc72c, 0xc72d, 0xc72e, 0xc72f, - 0xc730, 0xc731, 0xc732, 0xc733, 0xc734, 0xc735, 0xc736, 0xc737, - 0xc738, 0xc739, 0xc73a, 0xc73b, 0xc73c, 0xc73d, 0xc73e, 0xc73f, - 0xc740, 0xc741, 0xc742, 0xc743, 0xc744, 0xc745, 0xc746, 0xc747, - 0xc748, 0xc749, 0xc74a, 0xc74b, 0xc74c, 0xc74d, 0xc74e, 0xc74f, - 0xc750, 0xc751, 0xc752, 0xc753, 0xc754, 0xc755, 0xc756, 0xc757, - 0xc758, 0xc759, 0xc75a, 0xc75b, 0xc75c, 0xc75d, 0xc75e, 0xc75f, - 0xc760, 0xc761, 0xc762, 0xc763, 0xc764, 0xc765, 0xc766, 0xc767, - 0xc768, 0xc769, 0xc76a, 0xc76b, 0xc76c, 0xc76d, 0xc76e, 0xc76f, - 0xc770, 0xc771, 0xc772, 0xc773, 0xc774, 0xc775, 0xc776, 0xc777, - 0xc778, 0xc779, 0xc77a, 0xc77b, 0xc77c, 0xc77d, 0xc77e, 0xc77f, - 0xc780, 0xc781, 0xc782, 0xc783, 0xc784, 0xc785, 0xc786, 0xc787, - 0xc788, 0xc789, 0xc78a, 0xc78b, 0xc78c, 0xc78d, 0xc78e, 0xc78f, - 0xc790, 0xc791, 0xc792, 0xc793, 0xc794, 0xc795, 0xc796, 0xc797, - 0xc798, 0xc799, 0xc79a, 0xc79b, 0xc79c, 0xc79d, 0xc79e, 0xc79f, - 0xc7a0, 0xc7a1, 0xc7a2, 0xc7a3, 0xc7a4, 0xc7a5, 0xc7a6, 0xc7a7, - 0xc7a8, 0xc7a9, 0xc7aa, 0xc7ab, 0xc7ac, 0xc7ad, 0xc7ae, 0xc7af, - 0xc7b0, 0xc7b1, 0xc7b2, 0xc7b3, 0xc7b4, 0xc7b5, 0xc7b6, 0xc7b7, - 0xc7b8, 0xc7b9, 0xc7ba, 0xc7bb, 0xc7bc, 0xc7bd, 0xc7be, 0xc7bf, - 0xc7c0, 0xc7c1, 0xc7c2, 0xc7c3, 0xc7c4, 0xc7c5, 0xc7c6, 0xc7c7, - 0xc7c8, 0xc7c9, 0xc7ca, 0xc7cb, 0xc7cc, 0xc7cd, 0xc7ce, 0xc7cf, - 0xc7d0, 0xc7d1, 0xc7d2, 0xc7d3, 0xc7d4, 0xc7d5, 0xc7d6, 0xc7d7, - 0xc7d8, 0xc7d9, 0xc7da, 0xc7db, 0xc7dc, 0xc7dd, 0xc7de, 0xc7df, - 0xc7e0, 0xc7e1, 0xc7e2, 0xc7e3, 0xc7e4, 0xc7e5, 0xc7e6, 0xc7e7, - 0xc7e8, 0xc7e9, 0xc7ea, 0xc7eb, 0xc7ec, 0xc7ed, 0xc7ee, 0xc7ef, - 0xc7f0, 0xc7f1, 0xc7f2, 0xc7f3, 0xc7f4, 0xc7f5, 0xc7f6, 0xc7f7, - 0xc7f8, 0xc7f9, 0xc7fa, 0xc7fb, 0xc7fc, 0xc7fd, 0xc7fe, 0xc7ff, - 0xc800, 0xc801, 0xc802, 0xc803, 0xc804, 0xc805, 0xc806, 0xc807, - 0xc808, 0xc809, 0xc80a, 0xc80b, 0xc80c, 0xc80d, 0xc80e, 0xc80f, - 0xc810, 0xc811, 0xc812, 0xc813, 0xc814, 0xc815, 0xc816, 0xc817, - 0xc818, 0xc819, 0xc81a, 0xc81b, 0xc81c, 0xc81d, 0xc81e, 0xc81f, - 0xc820, 0xc821, 0xc822, 0xc823, 0xc824, 0xc825, 0xc826, 0xc827, - 0xc828, 0xc829, 0xc82a, 0xc82b, 0xc82c, 0xc82d, 0xc82e, 0xc82f, - 0xc830, 0xc831, 0xc832, 0xc833, 0xc834, 0xc835, 0xc836, 0xc837, - 0xc838, 0xc839, 0xc83a, 0xc83b, 0xc83c, 0xc83d, 0xc83e, 0xc83f, - 0xc840, 0xc841, 0xc842, 0xc843, 0xc844, 0xc845, 0xc846, 0xc847, - 0xc848, 0xc849, 0xc84a, 0xc84b, 0xc84c, 0xc84d, 0xc84e, 0xc84f, - 0xc850, 0xc851, 0xc852, 0xc853, 0xc854, 0xc855, 0xc856, 0xc857, - 0xc858, 0xc859, 0xc85a, 0xc85b, 0xc85c, 0xc85d, 0xc85e, 0xc85f, - 0xc860, 0xc861, 0xc862, 0xc863, 0xc864, 0xc865, 0xc866, 0xc867, - 0xc868, 0xc869, 0xc86a, 0xc86b, 0xc86c, 0xc86d, 0xc86e, 0xc86f, - 0xc870, 0xc871, 0xc872, 0xc873, 0xc874, 0xc875, 0xc876, 0xc877, - 0xc878, 0xc879, 0xc87a, 0xc87b, 0xc87c, 0xc87d, 0xc87e, 0xc87f, - 0xc880, 0xc881, 0xc882, 0xc883, 0xc884, 0xc885, 0xc886, 0xc887, - 0xc888, 0xc889, 0xc88a, 0xc88b, 0xc88c, 0xc88d, 0xc88e, 0xc88f, - 0xc890, 0xc891, 0xc892, 0xc893, 0xc894, 0xc895, 0xc896, 0xc897, - 0xc898, 0xc899, 0xc89a, 0xc89b, 0xc89c, 0xc89d, 0xc89e, 0xc89f, - 0xc8a0, 0xc8a1, 0xc8a2, 0xc8a3, 0xc8a4, 0xc8a5, 0xc8a6, 0xc8a7, - 0xc8a8, 0xc8a9, 0xc8aa, 0xc8ab, 0xc8ac, 0xc8ad, 0xc8ae, 0xc8af, - 0xc8b0, 0xc8b1, 0xc8b2, 0xc8b3, 0xc8b4, 0xc8b5, 0xc8b6, 0xc8b7, - 0xc8b8, 0xc8b9, 0xc8ba, 0xc8bb, 0xc8bc, 0xc8bd, 0xc8be, 0xc8bf, - 0xc8c0, 0xc8c1, 0xc8c2, 0xc8c3, 0xc8c4, 0xc8c5, 0xc8c6, 0xc8c7, - 0xc8c8, 0xc8c9, 0xc8ca, 0xc8cb, 0xc8cc, 0xc8cd, 0xc8ce, 0xc8cf, - 0xc8d0, 0xc8d1, 0xc8d2, 0xc8d3, 0xc8d4, 0xc8d5, 0xc8d6, 0xc8d7, - 0xc8d8, 0xc8d9, 0xc8da, 0xc8db, 0xc8dc, 0xc8dd, 0xc8de, 0xc8df, - 0xc8e0, 0xc8e1, 0xc8e2, 0xc8e3, 0xc8e4, 0xc8e5, 0xc8e6, 0xc8e7, - 0xc8e8, 0xc8e9, 0xc8ea, 0xc8eb, 0xc8ec, 0xc8ed, 0xc8ee, 0xc8ef, - 0xc8f0, 0xc8f1, 0xc8f2, 0xc8f3, 0xc8f4, 0xc8f5, 0xc8f6, 0xc8f7, - 0xc8f8, 0xc8f9, 0xc8fa, 0xc8fb, 0xc8fc, 0xc8fd, 0xc8fe, 0xc8ff, - 0xc900, 0xc901, 0xc902, 0xc903, 0xc904, 0xc905, 0xc906, 0xc907, - 0xc908, 0xc909, 0xc90a, 0xc90b, 0xc90c, 0xc90d, 0xc90e, 0xc90f, - 0xc910, 0xc911, 0xc912, 0xc913, 0xc914, 0xc915, 0xc916, 0xc917, - 0xc918, 0xc919, 0xc91a, 0xc91b, 0xc91c, 0xc91d, 0xc91e, 0xc91f, - 0xc920, 0xc921, 0xc922, 0xc923, 0xc924, 0xc925, 0xc926, 0xc927, - 0xc928, 0xc929, 0xc92a, 0xc92b, 0xc92c, 0xc92d, 0xc92e, 0xc92f, - 0xc930, 0xc931, 0xc932, 0xc933, 0xc934, 0xc935, 0xc936, 0xc937, - 0xc938, 0xc939, 0xc93a, 0xc93b, 0xc93c, 0xc93d, 0xc93e, 0xc93f, - 0xc940, 0xc941, 0xc942, 0xc943, 0xc944, 0xc945, 0xc946, 0xc947, - 0xc948, 0xc949, 0xc94a, 0xc94b, 0xc94c, 0xc94d, 0xc94e, 0xc94f, - 0xc950, 0xc951, 0xc952, 0xc953, 0xc954, 0xc955, 0xc956, 0xc957, - 0xc958, 0xc959, 0xc95a, 0xc95b, 0xc95c, 0xc95d, 0xc95e, 0xc95f, - 0xc960, 0xc961, 0xc962, 0xc963, 0xc964, 0xc965, 0xc966, 0xc967, - 0xc968, 0xc969, 0xc96a, 0xc96b, 0xc96c, 0xc96d, 0xc96e, 0xc96f, - 0xc970, 0xc971, 0xc972, 0xc973, 0xc974, 0xc975, 0xc976, 0xc977, - 0xc978, 0xc979, 0xc97a, 0xc97b, 0xc97c, 0xc97d, 0xc97e, 0xc97f, - 0xc980, 0xc981, 0xc982, 0xc983, 0xc984, 0xc985, 0xc986, 0xc987, - 0xc988, 0xc989, 0xc98a, 0xc98b, 0xc98c, 0xc98d, 0xc98e, 0xc98f, - 0xc990, 0xc991, 0xc992, 0xc993, 0xc994, 0xc995, 0xc996, 0xc997, - 0xc998, 0xc999, 0xc99a, 0xc99b, 0xc99c, 0xc99d, 0xc99e, 0xc99f, - 0xc9a0, 0xc9a1, 0xc9a2, 0xc9a3, 0xc9a4, 0xc9a5, 0xc9a6, 0xc9a7, - 0xc9a8, 0xc9a9, 0xc9aa, 0xc9ab, 0xc9ac, 0xc9ad, 0xc9ae, 0xc9af, - 0xc9b0, 0xc9b1, 0xc9b2, 0xc9b3, 0xc9b4, 0xc9b5, 0xc9b6, 0xc9b7, - 0xc9b8, 0xc9b9, 0xc9ba, 0xc9bb, 0xc9bc, 0xc9bd, 0xc9be, 0xc9bf, - 0xc9c0, 0xc9c1, 0xc9c2, 0xc9c3, 0xc9c4, 0xc9c5, 0xc9c6, 0xc9c7, - 0xc9c8, 0xc9c9, 0xc9ca, 0xc9cb, 0xc9cc, 0xc9cd, 0xc9ce, 0xc9cf, - 0xc9d0, 0xc9d1, 0xc9d2, 0xc9d3, 0xc9d4, 0xc9d5, 0xc9d6, 0xc9d7, - 0xc9d8, 0xc9d9, 0xc9da, 0xc9db, 0xc9dc, 0xc9dd, 0xc9de, 0xc9df, - 0xc9e0, 0xc9e1, 0xc9e2, 0xc9e3, 0xc9e4, 0xc9e5, 0xc9e6, 0xc9e7, - 0xc9e8, 0xc9e9, 0xc9ea, 0xc9eb, 0xc9ec, 0xc9ed, 0xc9ee, 0xc9ef, - 0xc9f0, 0xc9f1, 0xc9f2, 0xc9f3, 0xc9f4, 0xc9f5, 0xc9f6, 0xc9f7, - 0xc9f8, 0xc9f9, 0xc9fa, 0xc9fb, 0xc9fc, 0xc9fd, 0xc9fe, 0xc9ff, - 0xca00, 0xca01, 0xca02, 0xca03, 0xca04, 0xca05, 0xca06, 0xca07, - 0xca08, 0xca09, 0xca0a, 0xca0b, 0xca0c, 0xca0d, 0xca0e, 0xca0f, - 0xca10, 0xca11, 0xca12, 0xca13, 0xca14, 0xca15, 0xca16, 0xca17, - 0xca18, 0xca19, 0xca1a, 0xca1b, 0xca1c, 0xca1d, 0xca1e, 0xca1f, - 0xca20, 0xca21, 0xca22, 0xca23, 0xca24, 0xca25, 0xca26, 0xca27, - 0xca28, 0xca29, 0xca2a, 0xca2b, 0xca2c, 0xca2d, 0xca2e, 0xca2f, - 0xca30, 0xca31, 0xca32, 0xca33, 0xca34, 0xca35, 0xca36, 0xca37, - 0xca38, 0xca39, 0xca3a, 0xca3b, 0xca3c, 0xca3d, 0xca3e, 0xca3f, - 0xca40, 0xca41, 0xca42, 0xca43, 0xca44, 0xca45, 0xca46, 0xca47, - 0xca48, 0xca49, 0xca4a, 0xca4b, 0xca4c, 0xca4d, 0xca4e, 0xca4f, - 0xca50, 0xca51, 0xca52, 0xca53, 0xca54, 0xca55, 0xca56, 0xca57, - 0xca58, 0xca59, 0xca5a, 0xca5b, 0xca5c, 0xca5d, 0xca5e, 0xca5f, - 0xca60, 0xca61, 0xca62, 0xca63, 0xca64, 0xca65, 0xca66, 0xca67, - 0xca68, 0xca69, 0xca6a, 0xca6b, 0xca6c, 0xca6d, 0xca6e, 0xca6f, - 0xca70, 0xca71, 0xca72, 0xca73, 0xca74, 0xca75, 0xca76, 0xca77, - 0xca78, 0xca79, 0xca7a, 0xca7b, 0xca7c, 0xca7d, 0xca7e, 0xca7f, - 0xca80, 0xca81, 0xca82, 0xca83, 0xca84, 0xca85, 0xca86, 0xca87, - 0xca88, 0xca89, 0xca8a, 0xca8b, 0xca8c, 0xca8d, 0xca8e, 0xca8f, - 0xca90, 0xca91, 0xca92, 0xca93, 0xca94, 0xca95, 0xca96, 0xca97, - 0xca98, 0xca99, 0xca9a, 0xca9b, 0xca9c, 0xca9d, 0xca9e, 0xca9f, - 0xcaa0, 0xcaa1, 0xcaa2, 0xcaa3, 0xcaa4, 0xcaa5, 0xcaa6, 0xcaa7, - 0xcaa8, 0xcaa9, 0xcaaa, 0xcaab, 0xcaac, 0xcaad, 0xcaae, 0xcaaf, - 0xcab0, 0xcab1, 0xcab2, 0xcab3, 0xcab4, 0xcab5, 0xcab6, 0xcab7, - 0xcab8, 0xcab9, 0xcaba, 0xcabb, 0xcabc, 0xcabd, 0xcabe, 0xcabf, - 0xcac0, 0xcac1, 0xcac2, 0xcac3, 0xcac4, 0xcac5, 0xcac6, 0xcac7, - 0xcac8, 0xcac9, 0xcaca, 0xcacb, 0xcacc, 0xcacd, 0xcace, 0xcacf, - 0xcad0, 0xcad1, 0xcad2, 0xcad3, 0xcad4, 0xcad5, 0xcad6, 0xcad7, - 0xcad8, 0xcad9, 0xcada, 0xcadb, 0xcadc, 0xcadd, 0xcade, 0xcadf, - 0xcae0, 0xcae1, 0xcae2, 0xcae3, 0xcae4, 0xcae5, 0xcae6, 0xcae7, - 0xcae8, 0xcae9, 0xcaea, 0xcaeb, 0xcaec, 0xcaed, 0xcaee, 0xcaef, - 0xcaf0, 0xcaf1, 0xcaf2, 0xcaf3, 0xcaf4, 0xcaf5, 0xcaf6, 0xcaf7, - 0xcaf8, 0xcaf9, 0xcafa, 0xcafb, 0xcafc, 0xcafd, 0xcafe, 0xcaff, - 0xcb00, 0xcb01, 0xcb02, 0xcb03, 0xcb04, 0xcb05, 0xcb06, 0xcb07, - 0xcb08, 0xcb09, 0xcb0a, 0xcb0b, 0xcb0c, 0xcb0d, 0xcb0e, 0xcb0f, - 0xcb10, 0xcb11, 0xcb12, 0xcb13, 0xcb14, 0xcb15, 0xcb16, 0xcb17, - 0xcb18, 0xcb19, 0xcb1a, 0xcb1b, 0xcb1c, 0xcb1d, 0xcb1e, 0xcb1f, - 0xcb20, 0xcb21, 0xcb22, 0xcb23, 0xcb24, 0xcb25, 0xcb26, 0xcb27, - 0xcb28, 0xcb29, 0xcb2a, 0xcb2b, 0xcb2c, 0xcb2d, 0xcb2e, 0xcb2f, - 0xcb30, 0xcb31, 0xcb32, 0xcb33, 0xcb34, 0xcb35, 0xcb36, 0xcb37, - 0xcb38, 0xcb39, 0xcb3a, 0xcb3b, 0xcb3c, 0xcb3d, 0xcb3e, 0xcb3f, - 0xcb40, 0xcb41, 0xcb42, 0xcb43, 0xcb44, 0xcb45, 0xcb46, 0xcb47, - 0xcb48, 0xcb49, 0xcb4a, 0xcb4b, 0xcb4c, 0xcb4d, 0xcb4e, 0xcb4f, - 0xcb50, 0xcb51, 0xcb52, 0xcb53, 0xcb54, 0xcb55, 0xcb56, 0xcb57, - 0xcb58, 0xcb59, 0xcb5a, 0xcb5b, 0xcb5c, 0xcb5d, 0xcb5e, 0xcb5f, - 0xcb60, 0xcb61, 0xcb62, 0xcb63, 0xcb64, 0xcb65, 0xcb66, 0xcb67, - 0xcb68, 0xcb69, 0xcb6a, 0xcb6b, 0xcb6c, 0xcb6d, 0xcb6e, 0xcb6f, - 0xcb70, 0xcb71, 0xcb72, 0xcb73, 0xcb74, 0xcb75, 0xcb76, 0xcb77, - 0xcb78, 0xcb79, 0xcb7a, 0xcb7b, 0xcb7c, 0xcb7d, 0xcb7e, 0xcb7f, - 0xcb80, 0xcb81, 0xcb82, 0xcb83, 0xcb84, 0xcb85, 0xcb86, 0xcb87, - 0xcb88, 0xcb89, 0xcb8a, 0xcb8b, 0xcb8c, 0xcb8d, 0xcb8e, 0xcb8f, - 0xcb90, 0xcb91, 0xcb92, 0xcb93, 0xcb94, 0xcb95, 0xcb96, 0xcb97, - 0xcb98, 0xcb99, 0xcb9a, 0xcb9b, 0xcb9c, 0xcb9d, 0xcb9e, 0xcb9f, - 0xcba0, 0xcba1, 0xcba2, 0xcba3, 0xcba4, 0xcba5, 0xcba6, 0xcba7, - 0xcba8, 0xcba9, 0xcbaa, 0xcbab, 0xcbac, 0xcbad, 0xcbae, 0xcbaf, - 0xcbb0, 0xcbb1, 0xcbb2, 0xcbb3, 0xcbb4, 0xcbb5, 0xcbb6, 0xcbb7, - 0xcbb8, 0xcbb9, 0xcbba, 0xcbbb, 0xcbbc, 0xcbbd, 0xcbbe, 0xcbbf, - 0xcbc0, 0xcbc1, 0xcbc2, 0xcbc3, 0xcbc4, 0xcbc5, 0xcbc6, 0xcbc7, - 0xcbc8, 0xcbc9, 0xcbca, 0xcbcb, 0xcbcc, 0xcbcd, 0xcbce, 0xcbcf, - 0xcbd0, 0xcbd1, 0xcbd2, 0xcbd3, 0xcbd4, 0xcbd5, 0xcbd6, 0xcbd7, - 0xcbd8, 0xcbd9, 0xcbda, 0xcbdb, 0xcbdc, 0xcbdd, 0xcbde, 0xcbdf, - 0xcbe0, 0xcbe1, 0xcbe2, 0xcbe3, 0xcbe4, 0xcbe5, 0xcbe6, 0xcbe7, - 0xcbe8, 0xcbe9, 0xcbea, 0xcbeb, 0xcbec, 0xcbed, 0xcbee, 0xcbef, - 0xcbf0, 0xcbf1, 0xcbf2, 0xcbf3, 0xcbf4, 0xcbf5, 0xcbf6, 0xcbf7, - 0xcbf8, 0xcbf9, 0xcbfa, 0xcbfb, 0xcbfc, 0xcbfd, 0xcbfe, 0xcbff, - 0xcc00, 0xcc01, 0xcc02, 0xcc03, 0xcc04, 0xcc05, 0xcc06, 0xcc07, - 0xcc08, 0xcc09, 0xcc0a, 0xcc0b, 0xcc0c, 0xcc0d, 0xcc0e, 0xcc0f, - 0xcc10, 0xcc11, 0xcc12, 0xcc13, 0xcc14, 0xcc15, 0xcc16, 0xcc17, - 0xcc18, 0xcc19, 0xcc1a, 0xcc1b, 0xcc1c, 0xcc1d, 0xcc1e, 0xcc1f, - 0xcc20, 0xcc21, 0xcc22, 0xcc23, 0xcc24, 0xcc25, 0xcc26, 0xcc27, - 0xcc28, 0xcc29, 0xcc2a, 0xcc2b, 0xcc2c, 0xcc2d, 0xcc2e, 0xcc2f, - 0xcc30, 0xcc31, 0xcc32, 0xcc33, 0xcc34, 0xcc35, 0xcc36, 0xcc37, - 0xcc38, 0xcc39, 0xcc3a, 0xcc3b, 0xcc3c, 0xcc3d, 0xcc3e, 0xcc3f, - 0xcc40, 0xcc41, 0xcc42, 0xcc43, 0xcc44, 0xcc45, 0xcc46, 0xcc47, - 0xcc48, 0xcc49, 0xcc4a, 0xcc4b, 0xcc4c, 0xcc4d, 0xcc4e, 0xcc4f, - 0xcc50, 0xcc51, 0xcc52, 0xcc53, 0xcc54, 0xcc55, 0xcc56, 0xcc57, - 0xcc58, 0xcc59, 0xcc5a, 0xcc5b, 0xcc5c, 0xcc5d, 0xcc5e, 0xcc5f, - 0xcc60, 0xcc61, 0xcc62, 0xcc63, 0xcc64, 0xcc65, 0xcc66, 0xcc67, - 0xcc68, 0xcc69, 0xcc6a, 0xcc6b, 0xcc6c, 0xcc6d, 0xcc6e, 0xcc6f, - 0xcc70, 0xcc71, 0xcc72, 0xcc73, 0xcc74, 0xcc75, 0xcc76, 0xcc77, - 0xcc78, 0xcc79, 0xcc7a, 0xcc7b, 0xcc7c, 0xcc7d, 0xcc7e, 0xcc7f, - 0xcc80, 0xcc81, 0xcc82, 0xcc83, 0xcc84, 0xcc85, 0xcc86, 0xcc87, - 0xcc88, 0xcc89, 0xcc8a, 0xcc8b, 0xcc8c, 0xcc8d, 0xcc8e, 0xcc8f, - 0xcc90, 0xcc91, 0xcc92, 0xcc93, 0xcc94, 0xcc95, 0xcc96, 0xcc97, - 0xcc98, 0xcc99, 0xcc9a, 0xcc9b, 0xcc9c, 0xcc9d, 0xcc9e, 0xcc9f, - 0xcca0, 0xcca1, 0xcca2, 0xcca3, 0xcca4, 0xcca5, 0xcca6, 0xcca7, - 0xcca8, 0xcca9, 0xccaa, 0xccab, 0xccac, 0xccad, 0xccae, 0xccaf, - 0xccb0, 0xccb1, 0xccb2, 0xccb3, 0xccb4, 0xccb5, 0xccb6, 0xccb7, - 0xccb8, 0xccb9, 0xccba, 0xccbb, 0xccbc, 0xccbd, 0xccbe, 0xccbf, - 0xccc0, 0xccc1, 0xccc2, 0xccc3, 0xccc4, 0xccc5, 0xccc6, 0xccc7, - 0xccc8, 0xccc9, 0xccca, 0xcccb, 0xcccc, 0xcccd, 0xccce, 0xcccf, - 0xccd0, 0xccd1, 0xccd2, 0xccd3, 0xccd4, 0xccd5, 0xccd6, 0xccd7, - 0xccd8, 0xccd9, 0xccda, 0xccdb, 0xccdc, 0xccdd, 0xccde, 0xccdf, - 0xcce0, 0xcce1, 0xcce2, 0xcce3, 0xcce4, 0xcce5, 0xcce6, 0xcce7, - 0xcce8, 0xcce9, 0xccea, 0xcceb, 0xccec, 0xcced, 0xccee, 0xccef, - 0xccf0, 0xccf1, 0xccf2, 0xccf3, 0xccf4, 0xccf5, 0xccf6, 0xccf7, - 0xccf8, 0xccf9, 0xccfa, 0xccfb, 0xccfc, 0xccfd, 0xccfe, 0xccff, - 0xcd00, 0xcd01, 0xcd02, 0xcd03, 0xcd04, 0xcd05, 0xcd06, 0xcd07, - 0xcd08, 0xcd09, 0xcd0a, 0xcd0b, 0xcd0c, 0xcd0d, 0xcd0e, 0xcd0f, - 0xcd10, 0xcd11, 0xcd12, 0xcd13, 0xcd14, 0xcd15, 0xcd16, 0xcd17, - 0xcd18, 0xcd19, 0xcd1a, 0xcd1b, 0xcd1c, 0xcd1d, 0xcd1e, 0xcd1f, - 0xcd20, 0xcd21, 0xcd22, 0xcd23, 0xcd24, 0xcd25, 0xcd26, 0xcd27, - 0xcd28, 0xcd29, 0xcd2a, 0xcd2b, 0xcd2c, 0xcd2d, 0xcd2e, 0xcd2f, - 0xcd30, 0xcd31, 0xcd32, 0xcd33, 0xcd34, 0xcd35, 0xcd36, 0xcd37, - 0xcd38, 0xcd39, 0xcd3a, 0xcd3b, 0xcd3c, 0xcd3d, 0xcd3e, 0xcd3f, - 0xcd40, 0xcd41, 0xcd42, 0xcd43, 0xcd44, 0xcd45, 0xcd46, 0xcd47, - 0xcd48, 0xcd49, 0xcd4a, 0xcd4b, 0xcd4c, 0xcd4d, 0xcd4e, 0xcd4f, - 0xcd50, 0xcd51, 0xcd52, 0xcd53, 0xcd54, 0xcd55, 0xcd56, 0xcd57, - 0xcd58, 0xcd59, 0xcd5a, 0xcd5b, 0xcd5c, 0xcd5d, 0xcd5e, 0xcd5f, - 0xcd60, 0xcd61, 0xcd62, 0xcd63, 0xcd64, 0xcd65, 0xcd66, 0xcd67, - 0xcd68, 0xcd69, 0xcd6a, 0xcd6b, 0xcd6c, 0xcd6d, 0xcd6e, 0xcd6f, - 0xcd70, 0xcd71, 0xcd72, 0xcd73, 0xcd74, 0xcd75, 0xcd76, 0xcd77, - 0xcd78, 0xcd79, 0xcd7a, 0xcd7b, 0xcd7c, 0xcd7d, 0xcd7e, 0xcd7f, - 0xcd80, 0xcd81, 0xcd82, 0xcd83, 0xcd84, 0xcd85, 0xcd86, 0xcd87, - 0xcd88, 0xcd89, 0xcd8a, 0xcd8b, 0xcd8c, 0xcd8d, 0xcd8e, 0xcd8f, - 0xcd90, 0xcd91, 0xcd92, 0xcd93, 0xcd94, 0xcd95, 0xcd96, 0xcd97, - 0xcd98, 0xcd99, 0xcd9a, 0xcd9b, 0xcd9c, 0xcd9d, 0xcd9e, 0xcd9f, - 0xcda0, 0xcda1, 0xcda2, 0xcda3, 0xcda4, 0xcda5, 0xcda6, 0xcda7, - 0xcda8, 0xcda9, 0xcdaa, 0xcdab, 0xcdac, 0xcdad, 0xcdae, 0xcdaf, - 0xcdb0, 0xcdb1, 0xcdb2, 0xcdb3, 0xcdb4, 0xcdb5, 0xcdb6, 0xcdb7, - 0xcdb8, 0xcdb9, 0xcdba, 0xcdbb, 0xcdbc, 0xcdbd, 0xcdbe, 0xcdbf, - 0xcdc0, 0xcdc1, 0xcdc2, 0xcdc3, 0xcdc4, 0xcdc5, 0xcdc6, 0xcdc7, - 0xcdc8, 0xcdc9, 0xcdca, 0xcdcb, 0xcdcc, 0xcdcd, 0xcdce, 0xcdcf, - 0xcdd0, 0xcdd1, 0xcdd2, 0xcdd3, 0xcdd4, 0xcdd5, 0xcdd6, 0xcdd7, - 0xcdd8, 0xcdd9, 0xcdda, 0xcddb, 0xcddc, 0xcddd, 0xcdde, 0xcddf, - 0xcde0, 0xcde1, 0xcde2, 0xcde3, 0xcde4, 0xcde5, 0xcde6, 0xcde7, - 0xcde8, 0xcde9, 0xcdea, 0xcdeb, 0xcdec, 0xcded, 0xcdee, 0xcdef, - 0xcdf0, 0xcdf1, 0xcdf2, 0xcdf3, 0xcdf4, 0xcdf5, 0xcdf6, 0xcdf7, - 0xcdf8, 0xcdf9, 0xcdfa, 0xcdfb, 0xcdfc, 0xcdfd, 0xcdfe, 0xcdff, - 0xce00, 0xce01, 0xce02, 0xce03, 0xce04, 0xce05, 0xce06, 0xce07, - 0xce08, 0xce09, 0xce0a, 0xce0b, 0xce0c, 0xce0d, 0xce0e, 0xce0f, - 0xce10, 0xce11, 0xce12, 0xce13, 0xce14, 0xce15, 0xce16, 0xce17, - 0xce18, 0xce19, 0xce1a, 0xce1b, 0xce1c, 0xce1d, 0xce1e, 0xce1f, - 0xce20, 0xce21, 0xce22, 0xce23, 0xce24, 0xce25, 0xce26, 0xce27, - 0xce28, 0xce29, 0xce2a, 0xce2b, 0xce2c, 0xce2d, 0xce2e, 0xce2f, - 0xce30, 0xce31, 0xce32, 0xce33, 0xce34, 0xce35, 0xce36, 0xce37, - 0xce38, 0xce39, 0xce3a, 0xce3b, 0xce3c, 0xce3d, 0xce3e, 0xce3f, - 0xce40, 0xce41, 0xce42, 0xce43, 0xce44, 0xce45, 0xce46, 0xce47, - 0xce48, 0xce49, 0xce4a, 0xce4b, 0xce4c, 0xce4d, 0xce4e, 0xce4f, - 0xce50, 0xce51, 0xce52, 0xce53, 0xce54, 0xce55, 0xce56, 0xce57, - 0xce58, 0xce59, 0xce5a, 0xce5b, 0xce5c, 0xce5d, 0xce5e, 0xce5f, - 0xce60, 0xce61, 0xce62, 0xce63, 0xce64, 0xce65, 0xce66, 0xce67, - 0xce68, 0xce69, 0xce6a, 0xce6b, 0xce6c, 0xce6d, 0xce6e, 0xce6f, - 0xce70, 0xce71, 0xce72, 0xce73, 0xce74, 0xce75, 0xce76, 0xce77, - 0xce78, 0xce79, 0xce7a, 0xce7b, 0xce7c, 0xce7d, 0xce7e, 0xce7f, - 0xce80, 0xce81, 0xce82, 0xce83, 0xce84, 0xce85, 0xce86, 0xce87, - 0xce88, 0xce89, 0xce8a, 0xce8b, 0xce8c, 0xce8d, 0xce8e, 0xce8f, - 0xce90, 0xce91, 0xce92, 0xce93, 0xce94, 0xce95, 0xce96, 0xce97, - 0xce98, 0xce99, 0xce9a, 0xce9b, 0xce9c, 0xce9d, 0xce9e, 0xce9f, - 0xcea0, 0xcea1, 0xcea2, 0xcea3, 0xcea4, 0xcea5, 0xcea6, 0xcea7, - 0xcea8, 0xcea9, 0xceaa, 0xceab, 0xceac, 0xcead, 0xceae, 0xceaf, - 0xceb0, 0xceb1, 0xceb2, 0xceb3, 0xceb4, 0xceb5, 0xceb6, 0xceb7, - 0xceb8, 0xceb9, 0xceba, 0xcebb, 0xcebc, 0xcebd, 0xcebe, 0xcebf, - 0xcec0, 0xcec1, 0xcec2, 0xcec3, 0xcec4, 0xcec5, 0xcec6, 0xcec7, - 0xcec8, 0xcec9, 0xceca, 0xcecb, 0xcecc, 0xcecd, 0xcece, 0xcecf, - 0xced0, 0xced1, 0xced2, 0xced3, 0xced4, 0xced5, 0xced6, 0xced7, - 0xced8, 0xced9, 0xceda, 0xcedb, 0xcedc, 0xcedd, 0xcede, 0xcedf, - 0xcee0, 0xcee1, 0xcee2, 0xcee3, 0xcee4, 0xcee5, 0xcee6, 0xcee7, - 0xcee8, 0xcee9, 0xceea, 0xceeb, 0xceec, 0xceed, 0xceee, 0xceef, - 0xcef0, 0xcef1, 0xcef2, 0xcef3, 0xcef4, 0xcef5, 0xcef6, 0xcef7, - 0xcef8, 0xcef9, 0xcefa, 0xcefb, 0xcefc, 0xcefd, 0xcefe, 0xceff, - 0xcf00, 0xcf01, 0xcf02, 0xcf03, 0xcf04, 0xcf05, 0xcf06, 0xcf07, - 0xcf08, 0xcf09, 0xcf0a, 0xcf0b, 0xcf0c, 0xcf0d, 0xcf0e, 0xcf0f, - 0xcf10, 0xcf11, 0xcf12, 0xcf13, 0xcf14, 0xcf15, 0xcf16, 0xcf17, - 0xcf18, 0xcf19, 0xcf1a, 0xcf1b, 0xcf1c, 0xcf1d, 0xcf1e, 0xcf1f, - 0xcf20, 0xcf21, 0xcf22, 0xcf23, 0xcf24, 0xcf25, 0xcf26, 0xcf27, - 0xcf28, 0xcf29, 0xcf2a, 0xcf2b, 0xcf2c, 0xcf2d, 0xcf2e, 0xcf2f, - 0xcf30, 0xcf31, 0xcf32, 0xcf33, 0xcf34, 0xcf35, 0xcf36, 0xcf37, - 0xcf38, 0xcf39, 0xcf3a, 0xcf3b, 0xcf3c, 0xcf3d, 0xcf3e, 0xcf3f, - 0xcf40, 0xcf41, 0xcf42, 0xcf43, 0xcf44, 0xcf45, 0xcf46, 0xcf47, - 0xcf48, 0xcf49, 0xcf4a, 0xcf4b, 0xcf4c, 0xcf4d, 0xcf4e, 0xcf4f, - 0xcf50, 0xcf51, 0xcf52, 0xcf53, 0xcf54, 0xcf55, 0xcf56, 0xcf57, - 0xcf58, 0xcf59, 0xcf5a, 0xcf5b, 0xcf5c, 0xcf5d, 0xcf5e, 0xcf5f, - 0xcf60, 0xcf61, 0xcf62, 0xcf63, 0xcf64, 0xcf65, 0xcf66, 0xcf67, - 0xcf68, 0xcf69, 0xcf6a, 0xcf6b, 0xcf6c, 0xcf6d, 0xcf6e, 0xcf6f, - 0xcf70, 0xcf71, 0xcf72, 0xcf73, 0xcf74, 0xcf75, 0xcf76, 0xcf77, - 0xcf78, 0xcf79, 0xcf7a, 0xcf7b, 0xcf7c, 0xcf7d, 0xcf7e, 0xcf7f, - 0xcf80, 0xcf81, 0xcf82, 0xcf83, 0xcf84, 0xcf85, 0xcf86, 0xcf87, - 0xcf88, 0xcf89, 0xcf8a, 0xcf8b, 0xcf8c, 0xcf8d, 0xcf8e, 0xcf8f, - 0xcf90, 0xcf91, 0xcf92, 0xcf93, 0xcf94, 0xcf95, 0xcf96, 0xcf97, - 0xcf98, 0xcf99, 0xcf9a, 0xcf9b, 0xcf9c, 0xcf9d, 0xcf9e, 0xcf9f, - 0xcfa0, 0xcfa1, 0xcfa2, 0xcfa3, 0xcfa4, 0xcfa5, 0xcfa6, 0xcfa7, - 0xcfa8, 0xcfa9, 0xcfaa, 0xcfab, 0xcfac, 0xcfad, 0xcfae, 0xcfaf, - 0xcfb0, 0xcfb1, 0xcfb2, 0xcfb3, 0xcfb4, 0xcfb5, 0xcfb6, 0xcfb7, - 0xcfb8, 0xcfb9, 0xcfba, 0xcfbb, 0xcfbc, 0xcfbd, 0xcfbe, 0xcfbf, - 0xcfc0, 0xcfc1, 0xcfc2, 0xcfc3, 0xcfc4, 0xcfc5, 0xcfc6, 0xcfc7, - 0xcfc8, 0xcfc9, 0xcfca, 0xcfcb, 0xcfcc, 0xcfcd, 0xcfce, 0xcfcf, - 0xcfd0, 0xcfd1, 0xcfd2, 0xcfd3, 0xcfd4, 0xcfd5, 0xcfd6, 0xcfd7, - 0xcfd8, 0xcfd9, 0xcfda, 0xcfdb, 0xcfdc, 0xcfdd, 0xcfde, 0xcfdf, - 0xcfe0, 0xcfe1, 0xcfe2, 0xcfe3, 0xcfe4, 0xcfe5, 0xcfe6, 0xcfe7, - 0xcfe8, 0xcfe9, 0xcfea, 0xcfeb, 0xcfec, 0xcfed, 0xcfee, 0xcfef, - 0xcff0, 0xcff1, 0xcff2, 0xcff3, 0xcff4, 0xcff5, 0xcff6, 0xcff7, - 0xcff8, 0xcff9, 0xcffa, 0xcffb, 0xcffc, 0xcffd, 0xcffe, 0xcfff, - 0xd000, 0xd001, 0xd002, 0xd003, 0xd004, 0xd005, 0xd006, 0xd007, - 0xd008, 0xd009, 0xd00a, 0xd00b, 0xd00c, 0xd00d, 0xd00e, 0xd00f, - 0xd010, 0xd011, 0xd012, 0xd013, 0xd014, 0xd015, 0xd016, 0xd017, - 0xd018, 0xd019, 0xd01a, 0xd01b, 0xd01c, 0xd01d, 0xd01e, 0xd01f, - 0xd020, 0xd021, 0xd022, 0xd023, 0xd024, 0xd025, 0xd026, 0xd027, - 0xd028, 0xd029, 0xd02a, 0xd02b, 0xd02c, 0xd02d, 0xd02e, 0xd02f, - 0xd030, 0xd031, 0xd032, 0xd033, 0xd034, 0xd035, 0xd036, 0xd037, - 0xd038, 0xd039, 0xd03a, 0xd03b, 0xd03c, 0xd03d, 0xd03e, 0xd03f, - 0xd040, 0xd041, 0xd042, 0xd043, 0xd044, 0xd045, 0xd046, 0xd047, - 0xd048, 0xd049, 0xd04a, 0xd04b, 0xd04c, 0xd04d, 0xd04e, 0xd04f, - 0xd050, 0xd051, 0xd052, 0xd053, 0xd054, 0xd055, 0xd056, 0xd057, - 0xd058, 0xd059, 0xd05a, 0xd05b, 0xd05c, 0xd05d, 0xd05e, 0xd05f, - 0xd060, 0xd061, 0xd062, 0xd063, 0xd064, 0xd065, 0xd066, 0xd067, - 0xd068, 0xd069, 0xd06a, 0xd06b, 0xd06c, 0xd06d, 0xd06e, 0xd06f, - 0xd070, 0xd071, 0xd072, 0xd073, 0xd074, 0xd075, 0xd076, 0xd077, - 0xd078, 0xd079, 0xd07a, 0xd07b, 0xd07c, 0xd07d, 0xd07e, 0xd07f, - 0xd080, 0xd081, 0xd082, 0xd083, 0xd084, 0xd085, 0xd086, 0xd087, - 0xd088, 0xd089, 0xd08a, 0xd08b, 0xd08c, 0xd08d, 0xd08e, 0xd08f, - 0xd090, 0xd091, 0xd092, 0xd093, 0xd094, 0xd095, 0xd096, 0xd097, - 0xd098, 0xd099, 0xd09a, 0xd09b, 0xd09c, 0xd09d, 0xd09e, 0xd09f, - 0xd0a0, 0xd0a1, 0xd0a2, 0xd0a3, 0xd0a4, 0xd0a5, 0xd0a6, 0xd0a7, - 0xd0a8, 0xd0a9, 0xd0aa, 0xd0ab, 0xd0ac, 0xd0ad, 0xd0ae, 0xd0af, - 0xd0b0, 0xd0b1, 0xd0b2, 0xd0b3, 0xd0b4, 0xd0b5, 0xd0b6, 0xd0b7, - 0xd0b8, 0xd0b9, 0xd0ba, 0xd0bb, 0xd0bc, 0xd0bd, 0xd0be, 0xd0bf, - 0xd0c0, 0xd0c1, 0xd0c2, 0xd0c3, 0xd0c4, 0xd0c5, 0xd0c6, 0xd0c7, - 0xd0c8, 0xd0c9, 0xd0ca, 0xd0cb, 0xd0cc, 0xd0cd, 0xd0ce, 0xd0cf, - 0xd0d0, 0xd0d1, 0xd0d2, 0xd0d3, 0xd0d4, 0xd0d5, 0xd0d6, 0xd0d7, - 0xd0d8, 0xd0d9, 0xd0da, 0xd0db, 0xd0dc, 0xd0dd, 0xd0de, 0xd0df, - 0xd0e0, 0xd0e1, 0xd0e2, 0xd0e3, 0xd0e4, 0xd0e5, 0xd0e6, 0xd0e7, - 0xd0e8, 0xd0e9, 0xd0ea, 0xd0eb, 0xd0ec, 0xd0ed, 0xd0ee, 0xd0ef, - 0xd0f0, 0xd0f1, 0xd0f2, 0xd0f3, 0xd0f4, 0xd0f5, 0xd0f6, 0xd0f7, - 0xd0f8, 0xd0f9, 0xd0fa, 0xd0fb, 0xd0fc, 0xd0fd, 0xd0fe, 0xd0ff, - 0xd100, 0xd101, 0xd102, 0xd103, 0xd104, 0xd105, 0xd106, 0xd107, - 0xd108, 0xd109, 0xd10a, 0xd10b, 0xd10c, 0xd10d, 0xd10e, 0xd10f, - 0xd110, 0xd111, 0xd112, 0xd113, 0xd114, 0xd115, 0xd116, 0xd117, - 0xd118, 0xd119, 0xd11a, 0xd11b, 0xd11c, 0xd11d, 0xd11e, 0xd11f, - 0xd120, 0xd121, 0xd122, 0xd123, 0xd124, 0xd125, 0xd126, 0xd127, - 0xd128, 0xd129, 0xd12a, 0xd12b, 0xd12c, 0xd12d, 0xd12e, 0xd12f, - 0xd130, 0xd131, 0xd132, 0xd133, 0xd134, 0xd135, 0xd136, 0xd137, - 0xd138, 0xd139, 0xd13a, 0xd13b, 0xd13c, 0xd13d, 0xd13e, 0xd13f, - 0xd140, 0xd141, 0xd142, 0xd143, 0xd144, 0xd145, 0xd146, 0xd147, - 0xd148, 0xd149, 0xd14a, 0xd14b, 0xd14c, 0xd14d, 0xd14e, 0xd14f, - 0xd150, 0xd151, 0xd152, 0xd153, 0xd154, 0xd155, 0xd156, 0xd157, - 0xd158, 0xd159, 0xd15a, 0xd15b, 0xd15c, 0xd15d, 0xd15e, 0xd15f, - 0xd160, 0xd161, 0xd162, 0xd163, 0xd164, 0xd165, 0xd166, 0xd167, - 0xd168, 0xd169, 0xd16a, 0xd16b, 0xd16c, 0xd16d, 0xd16e, 0xd16f, - 0xd170, 0xd171, 0xd172, 0xd173, 0xd174, 0xd175, 0xd176, 0xd177, - 0xd178, 0xd179, 0xd17a, 0xd17b, 0xd17c, 0xd17d, 0xd17e, 0xd17f, - 0xd180, 0xd181, 0xd182, 0xd183, 0xd184, 0xd185, 0xd186, 0xd187, - 0xd188, 0xd189, 0xd18a, 0xd18b, 0xd18c, 0xd18d, 0xd18e, 0xd18f, - 0xd190, 0xd191, 0xd192, 0xd193, 0xd194, 0xd195, 0xd196, 0xd197, - 0xd198, 0xd199, 0xd19a, 0xd19b, 0xd19c, 0xd19d, 0xd19e, 0xd19f, - 0xd1a0, 0xd1a1, 0xd1a2, 0xd1a3, 0xd1a4, 0xd1a5, 0xd1a6, 0xd1a7, - 0xd1a8, 0xd1a9, 0xd1aa, 0xd1ab, 0xd1ac, 0xd1ad, 0xd1ae, 0xd1af, - 0xd1b0, 0xd1b1, 0xd1b2, 0xd1b3, 0xd1b4, 0xd1b5, 0xd1b6, 0xd1b7, - 0xd1b8, 0xd1b9, 0xd1ba, 0xd1bb, 0xd1bc, 0xd1bd, 0xd1be, 0xd1bf, - 0xd1c0, 0xd1c1, 0xd1c2, 0xd1c3, 0xd1c4, 0xd1c5, 0xd1c6, 0xd1c7, - 0xd1c8, 0xd1c9, 0xd1ca, 0xd1cb, 0xd1cc, 0xd1cd, 0xd1ce, 0xd1cf, - 0xd1d0, 0xd1d1, 0xd1d2, 0xd1d3, 0xd1d4, 0xd1d5, 0xd1d6, 0xd1d7, - 0xd1d8, 0xd1d9, 0xd1da, 0xd1db, 0xd1dc, 0xd1dd, 0xd1de, 0xd1df, - 0xd1e0, 0xd1e1, 0xd1e2, 0xd1e3, 0xd1e4, 0xd1e5, 0xd1e6, 0xd1e7, - 0xd1e8, 0xd1e9, 0xd1ea, 0xd1eb, 0xd1ec, 0xd1ed, 0xd1ee, 0xd1ef, - 0xd1f0, 0xd1f1, 0xd1f2, 0xd1f3, 0xd1f4, 0xd1f5, 0xd1f6, 0xd1f7, - 0xd1f8, 0xd1f9, 0xd1fa, 0xd1fb, 0xd1fc, 0xd1fd, 0xd1fe, 0xd1ff, - 0xd200, 0xd201, 0xd202, 0xd203, 0xd204, 0xd205, 0xd206, 0xd207, - 0xd208, 0xd209, 0xd20a, 0xd20b, 0xd20c, 0xd20d, 0xd20e, 0xd20f, - 0xd210, 0xd211, 0xd212, 0xd213, 0xd214, 0xd215, 0xd216, 0xd217, - 0xd218, 0xd219, 0xd21a, 0xd21b, 0xd21c, 0xd21d, 0xd21e, 0xd21f, - 0xd220, 0xd221, 0xd222, 0xd223, 0xd224, 0xd225, 0xd226, 0xd227, - 0xd228, 0xd229, 0xd22a, 0xd22b, 0xd22c, 0xd22d, 0xd22e, 0xd22f, - 0xd230, 0xd231, 0xd232, 0xd233, 0xd234, 0xd235, 0xd236, 0xd237, - 0xd238, 0xd239, 0xd23a, 0xd23b, 0xd23c, 0xd23d, 0xd23e, 0xd23f, - 0xd240, 0xd241, 0xd242, 0xd243, 0xd244, 0xd245, 0xd246, 0xd247, - 0xd248, 0xd249, 0xd24a, 0xd24b, 0xd24c, 0xd24d, 0xd24e, 0xd24f, - 0xd250, 0xd251, 0xd252, 0xd253, 0xd254, 0xd255, 0xd256, 0xd257, - 0xd258, 0xd259, 0xd25a, 0xd25b, 0xd25c, 0xd25d, 0xd25e, 0xd25f, - 0xd260, 0xd261, 0xd262, 0xd263, 0xd264, 0xd265, 0xd266, 0xd267, - 0xd268, 0xd269, 0xd26a, 0xd26b, 0xd26c, 0xd26d, 0xd26e, 0xd26f, - 0xd270, 0xd271, 0xd272, 0xd273, 0xd274, 0xd275, 0xd276, 0xd277, - 0xd278, 0xd279, 0xd27a, 0xd27b, 0xd27c, 0xd27d, 0xd27e, 0xd27f, - 0xd280, 0xd281, 0xd282, 0xd283, 0xd284, 0xd285, 0xd286, 0xd287, - 0xd288, 0xd289, 0xd28a, 0xd28b, 0xd28c, 0xd28d, 0xd28e, 0xd28f, - 0xd290, 0xd291, 0xd292, 0xd293, 0xd294, 0xd295, 0xd296, 0xd297, - 0xd298, 0xd299, 0xd29a, 0xd29b, 0xd29c, 0xd29d, 0xd29e, 0xd29f, - 0xd2a0, 0xd2a1, 0xd2a2, 0xd2a3, 0xd2a4, 0xd2a5, 0xd2a6, 0xd2a7, - 0xd2a8, 0xd2a9, 0xd2aa, 0xd2ab, 0xd2ac, 0xd2ad, 0xd2ae, 0xd2af, - 0xd2b0, 0xd2b1, 0xd2b2, 0xd2b3, 0xd2b4, 0xd2b5, 0xd2b6, 0xd2b7, - 0xd2b8, 0xd2b9, 0xd2ba, 0xd2bb, 0xd2bc, 0xd2bd, 0xd2be, 0xd2bf, - 0xd2c0, 0xd2c1, 0xd2c2, 0xd2c3, 0xd2c4, 0xd2c5, 0xd2c6, 0xd2c7, - 0xd2c8, 0xd2c9, 0xd2ca, 0xd2cb, 0xd2cc, 0xd2cd, 0xd2ce, 0xd2cf, - 0xd2d0, 0xd2d1, 0xd2d2, 0xd2d3, 0xd2d4, 0xd2d5, 0xd2d6, 0xd2d7, - 0xd2d8, 0xd2d9, 0xd2da, 0xd2db, 0xd2dc, 0xd2dd, 0xd2de, 0xd2df, - 0xd2e0, 0xd2e1, 0xd2e2, 0xd2e3, 0xd2e4, 0xd2e5, 0xd2e6, 0xd2e7, - 0xd2e8, 0xd2e9, 0xd2ea, 0xd2eb, 0xd2ec, 0xd2ed, 0xd2ee, 0xd2ef, - 0xd2f0, 0xd2f1, 0xd2f2, 0xd2f3, 0xd2f4, 0xd2f5, 0xd2f6, 0xd2f7, - 0xd2f8, 0xd2f9, 0xd2fa, 0xd2fb, 0xd2fc, 0xd2fd, 0xd2fe, 0xd2ff, - 0xd300, 0xd301, 0xd302, 0xd303, 0xd304, 0xd305, 0xd306, 0xd307, - 0xd308, 0xd309, 0xd30a, 0xd30b, 0xd30c, 0xd30d, 0xd30e, 0xd30f, - 0xd310, 0xd311, 0xd312, 0xd313, 0xd314, 0xd315, 0xd316, 0xd317, - 0xd318, 0xd319, 0xd31a, 0xd31b, 0xd31c, 0xd31d, 0xd31e, 0xd31f, - 0xd320, 0xd321, 0xd322, 0xd323, 0xd324, 0xd325, 0xd326, 0xd327, - 0xd328, 0xd329, 0xd32a, 0xd32b, 0xd32c, 0xd32d, 0xd32e, 0xd32f, - 0xd330, 0xd331, 0xd332, 0xd333, 0xd334, 0xd335, 0xd336, 0xd337, - 0xd338, 0xd339, 0xd33a, 0xd33b, 0xd33c, 0xd33d, 0xd33e, 0xd33f, - 0xd340, 0xd341, 0xd342, 0xd343, 0xd344, 0xd345, 0xd346, 0xd347, - 0xd348, 0xd349, 0xd34a, 0xd34b, 0xd34c, 0xd34d, 0xd34e, 0xd34f, - 0xd350, 0xd351, 0xd352, 0xd353, 0xd354, 0xd355, 0xd356, 0xd357, - 0xd358, 0xd359, 0xd35a, 0xd35b, 0xd35c, 0xd35d, 0xd35e, 0xd35f, - 0xd360, 0xd361, 0xd362, 0xd363, 0xd364, 0xd365, 0xd366, 0xd367, - 0xd368, 0xd369, 0xd36a, 0xd36b, 0xd36c, 0xd36d, 0xd36e, 0xd36f, - 0xd370, 0xd371, 0xd372, 0xd373, 0xd374, 0xd375, 0xd376, 0xd377, - 0xd378, 0xd379, 0xd37a, 0xd37b, 0xd37c, 0xd37d, 0xd37e, 0xd37f, - 0xd380, 0xd381, 0xd382, 0xd383, 0xd384, 0xd385, 0xd386, 0xd387, - 0xd388, 0xd389, 0xd38a, 0xd38b, 0xd38c, 0xd38d, 0xd38e, 0xd38f, - 0xd390, 0xd391, 0xd392, 0xd393, 0xd394, 0xd395, 0xd396, 0xd397, - 0xd398, 0xd399, 0xd39a, 0xd39b, 0xd39c, 0xd39d, 0xd39e, 0xd39f, - 0xd3a0, 0xd3a1, 0xd3a2, 0xd3a3, 0xd3a4, 0xd3a5, 0xd3a6, 0xd3a7, - 0xd3a8, 0xd3a9, 0xd3aa, 0xd3ab, 0xd3ac, 0xd3ad, 0xd3ae, 0xd3af, - 0xd3b0, 0xd3b1, 0xd3b2, 0xd3b3, 0xd3b4, 0xd3b5, 0xd3b6, 0xd3b7, - 0xd3b8, 0xd3b9, 0xd3ba, 0xd3bb, 0xd3bc, 0xd3bd, 0xd3be, 0xd3bf, - 0xd3c0, 0xd3c1, 0xd3c2, 0xd3c3, 0xd3c4, 0xd3c5, 0xd3c6, 0xd3c7, - 0xd3c8, 0xd3c9, 0xd3ca, 0xd3cb, 0xd3cc, 0xd3cd, 0xd3ce, 0xd3cf, - 0xd3d0, 0xd3d1, 0xd3d2, 0xd3d3, 0xd3d4, 0xd3d5, 0xd3d6, 0xd3d7, - 0xd3d8, 0xd3d9, 0xd3da, 0xd3db, 0xd3dc, 0xd3dd, 0xd3de, 0xd3df, - 0xd3e0, 0xd3e1, 0xd3e2, 0xd3e3, 0xd3e4, 0xd3e5, 0xd3e6, 0xd3e7, - 0xd3e8, 0xd3e9, 0xd3ea, 0xd3eb, 0xd3ec, 0xd3ed, 0xd3ee, 0xd3ef, - 0xd3f0, 0xd3f1, 0xd3f2, 0xd3f3, 0xd3f4, 0xd3f5, 0xd3f6, 0xd3f7, - 0xd3f8, 0xd3f9, 0xd3fa, 0xd3fb, 0xd3fc, 0xd3fd, 0xd3fe, 0xd3ff, - 0xd400, 0xd401, 0xd402, 0xd403, 0xd404, 0xd405, 0xd406, 0xd407, - 0xd408, 0xd409, 0xd40a, 0xd40b, 0xd40c, 0xd40d, 0xd40e, 0xd40f, - 0xd410, 0xd411, 0xd412, 0xd413, 0xd414, 0xd415, 0xd416, 0xd417, - 0xd418, 0xd419, 0xd41a, 0xd41b, 0xd41c, 0xd41d, 0xd41e, 0xd41f, - 0xd420, 0xd421, 0xd422, 0xd423, 0xd424, 0xd425, 0xd426, 0xd427, - 0xd428, 0xd429, 0xd42a, 0xd42b, 0xd42c, 0xd42d, 0xd42e, 0xd42f, - 0xd430, 0xd431, 0xd432, 0xd433, 0xd434, 0xd435, 0xd436, 0xd437, - 0xd438, 0xd439, 0xd43a, 0xd43b, 0xd43c, 0xd43d, 0xd43e, 0xd43f, - 0xd440, 0xd441, 0xd442, 0xd443, 0xd444, 0xd445, 0xd446, 0xd447, - 0xd448, 0xd449, 0xd44a, 0xd44b, 0xd44c, 0xd44d, 0xd44e, 0xd44f, - 0xd450, 0xd451, 0xd452, 0xd453, 0xd454, 0xd455, 0xd456, 0xd457, - 0xd458, 0xd459, 0xd45a, 0xd45b, 0xd45c, 0xd45d, 0xd45e, 0xd45f, - 0xd460, 0xd461, 0xd462, 0xd463, 0xd464, 0xd465, 0xd466, 0xd467, - 0xd468, 0xd469, 0xd46a, 0xd46b, 0xd46c, 0xd46d, 0xd46e, 0xd46f, - 0xd470, 0xd471, 0xd472, 0xd473, 0xd474, 0xd475, 0xd476, 0xd477, - 0xd478, 0xd479, 0xd47a, 0xd47b, 0xd47c, 0xd47d, 0xd47e, 0xd47f, - 0xd480, 0xd481, 0xd482, 0xd483, 0xd484, 0xd485, 0xd486, 0xd487, - 0xd488, 0xd489, 0xd48a, 0xd48b, 0xd48c, 0xd48d, 0xd48e, 0xd48f, - 0xd490, 0xd491, 0xd492, 0xd493, 0xd494, 0xd495, 0xd496, 0xd497, - 0xd498, 0xd499, 0xd49a, 0xd49b, 0xd49c, 0xd49d, 0xd49e, 0xd49f, - 0xd4a0, 0xd4a1, 0xd4a2, 0xd4a3, 0xd4a4, 0xd4a5, 0xd4a6, 0xd4a7, - 0xd4a8, 0xd4a9, 0xd4aa, 0xd4ab, 0xd4ac, 0xd4ad, 0xd4ae, 0xd4af, - 0xd4b0, 0xd4b1, 0xd4b2, 0xd4b3, 0xd4b4, 0xd4b5, 0xd4b6, 0xd4b7, - 0xd4b8, 0xd4b9, 0xd4ba, 0xd4bb, 0xd4bc, 0xd4bd, 0xd4be, 0xd4bf, - 0xd4c0, 0xd4c1, 0xd4c2, 0xd4c3, 0xd4c4, 0xd4c5, 0xd4c6, 0xd4c7, - 0xd4c8, 0xd4c9, 0xd4ca, 0xd4cb, 0xd4cc, 0xd4cd, 0xd4ce, 0xd4cf, - 0xd4d0, 0xd4d1, 0xd4d2, 0xd4d3, 0xd4d4, 0xd4d5, 0xd4d6, 0xd4d7, - 0xd4d8, 0xd4d9, 0xd4da, 0xd4db, 0xd4dc, 0xd4dd, 0xd4de, 0xd4df, - 0xd4e0, 0xd4e1, 0xd4e2, 0xd4e3, 0xd4e4, 0xd4e5, 0xd4e6, 0xd4e7, - 0xd4e8, 0xd4e9, 0xd4ea, 0xd4eb, 0xd4ec, 0xd4ed, 0xd4ee, 0xd4ef, - 0xd4f0, 0xd4f1, 0xd4f2, 0xd4f3, 0xd4f4, 0xd4f5, 0xd4f6, 0xd4f7, - 0xd4f8, 0xd4f9, 0xd4fa, 0xd4fb, 0xd4fc, 0xd4fd, 0xd4fe, 0xd4ff, - 0xd500, 0xd501, 0xd502, 0xd503, 0xd504, 0xd505, 0xd506, 0xd507, - 0xd508, 0xd509, 0xd50a, 0xd50b, 0xd50c, 0xd50d, 0xd50e, 0xd50f, - 0xd510, 0xd511, 0xd512, 0xd513, 0xd514, 0xd515, 0xd516, 0xd517, - 0xd518, 0xd519, 0xd51a, 0xd51b, 0xd51c, 0xd51d, 0xd51e, 0xd51f, - 0xd520, 0xd521, 0xd522, 0xd523, 0xd524, 0xd525, 0xd526, 0xd527, - 0xd528, 0xd529, 0xd52a, 0xd52b, 0xd52c, 0xd52d, 0xd52e, 0xd52f, - 0xd530, 0xd531, 0xd532, 0xd533, 0xd534, 0xd535, 0xd536, 0xd537, - 0xd538, 0xd539, 0xd53a, 0xd53b, 0xd53c, 0xd53d, 0xd53e, 0xd53f, - 0xd540, 0xd541, 0xd542, 0xd543, 0xd544, 0xd545, 0xd546, 0xd547, - 0xd548, 0xd549, 0xd54a, 0xd54b, 0xd54c, 0xd54d, 0xd54e, 0xd54f, - 0xd550, 0xd551, 0xd552, 0xd553, 0xd554, 0xd555, 0xd556, 0xd557, - 0xd558, 0xd559, 0xd55a, 0xd55b, 0xd55c, 0xd55d, 0xd55e, 0xd55f, - 0xd560, 0xd561, 0xd562, 0xd563, 0xd564, 0xd565, 0xd566, 0xd567, - 0xd568, 0xd569, 0xd56a, 0xd56b, 0xd56c, 0xd56d, 0xd56e, 0xd56f, - 0xd570, 0xd571, 0xd572, 0xd573, 0xd574, 0xd575, 0xd576, 0xd577, - 0xd578, 0xd579, 0xd57a, 0xd57b, 0xd57c, 0xd57d, 0xd57e, 0xd57f, - 0xd580, 0xd581, 0xd582, 0xd583, 0xd584, 0xd585, 0xd586, 0xd587, - 0xd588, 0xd589, 0xd58a, 0xd58b, 0xd58c, 0xd58d, 0xd58e, 0xd58f, - 0xd590, 0xd591, 0xd592, 0xd593, 0xd594, 0xd595, 0xd596, 0xd597, - 0xd598, 0xd599, 0xd59a, 0xd59b, 0xd59c, 0xd59d, 0xd59e, 0xd59f, - 0xd5a0, 0xd5a1, 0xd5a2, 0xd5a3, 0xd5a4, 0xd5a5, 0xd5a6, 0xd5a7, - 0xd5a8, 0xd5a9, 0xd5aa, 0xd5ab, 0xd5ac, 0xd5ad, 0xd5ae, 0xd5af, - 0xd5b0, 0xd5b1, 0xd5b2, 0xd5b3, 0xd5b4, 0xd5b5, 0xd5b6, 0xd5b7, - 0xd5b8, 0xd5b9, 0xd5ba, 0xd5bb, 0xd5bc, 0xd5bd, 0xd5be, 0xd5bf, - 0xd5c0, 0xd5c1, 0xd5c2, 0xd5c3, 0xd5c4, 0xd5c5, 0xd5c6, 0xd5c7, - 0xd5c8, 0xd5c9, 0xd5ca, 0xd5cb, 0xd5cc, 0xd5cd, 0xd5ce, 0xd5cf, - 0xd5d0, 0xd5d1, 0xd5d2, 0xd5d3, 0xd5d4, 0xd5d5, 0xd5d6, 0xd5d7, - 0xd5d8, 0xd5d9, 0xd5da, 0xd5db, 0xd5dc, 0xd5dd, 0xd5de, 0xd5df, - 0xd5e0, 0xd5e1, 0xd5e2, 0xd5e3, 0xd5e4, 0xd5e5, 0xd5e6, 0xd5e7, - 0xd5e8, 0xd5e9, 0xd5ea, 0xd5eb, 0xd5ec, 0xd5ed, 0xd5ee, 0xd5ef, - 0xd5f0, 0xd5f1, 0xd5f2, 0xd5f3, 0xd5f4, 0xd5f5, 0xd5f6, 0xd5f7, - 0xd5f8, 0xd5f9, 0xd5fa, 0xd5fb, 0xd5fc, 0xd5fd, 0xd5fe, 0xd5ff, - 0xd600, 0xd601, 0xd602, 0xd603, 0xd604, 0xd605, 0xd606, 0xd607, - 0xd608, 0xd609, 0xd60a, 0xd60b, 0xd60c, 0xd60d, 0xd60e, 0xd60f, - 0xd610, 0xd611, 0xd612, 0xd613, 0xd614, 0xd615, 0xd616, 0xd617, - 0xd618, 0xd619, 0xd61a, 0xd61b, 0xd61c, 0xd61d, 0xd61e, 0xd61f, - 0xd620, 0xd621, 0xd622, 0xd623, 0xd624, 0xd625, 0xd626, 0xd627, - 0xd628, 0xd629, 0xd62a, 0xd62b, 0xd62c, 0xd62d, 0xd62e, 0xd62f, - 0xd630, 0xd631, 0xd632, 0xd633, 0xd634, 0xd635, 0xd636, 0xd637, - 0xd638, 0xd639, 0xd63a, 0xd63b, 0xd63c, 0xd63d, 0xd63e, 0xd63f, - 0xd640, 0xd641, 0xd642, 0xd643, 0xd644, 0xd645, 0xd646, 0xd647, - 0xd648, 0xd649, 0xd64a, 0xd64b, 0xd64c, 0xd64d, 0xd64e, 0xd64f, - 0xd650, 0xd651, 0xd652, 0xd653, 0xd654, 0xd655, 0xd656, 0xd657, - 0xd658, 0xd659, 0xd65a, 0xd65b, 0xd65c, 0xd65d, 0xd65e, 0xd65f, - 0xd660, 0xd661, 0xd662, 0xd663, 0xd664, 0xd665, 0xd666, 0xd667, - 0xd668, 0xd669, 0xd66a, 0xd66b, 0xd66c, 0xd66d, 0xd66e, 0xd66f, - 0xd670, 0xd671, 0xd672, 0xd673, 0xd674, 0xd675, 0xd676, 0xd677, - 0xd678, 0xd679, 0xd67a, 0xd67b, 0xd67c, 0xd67d, 0xd67e, 0xd67f, - 0xd680, 0xd681, 0xd682, 0xd683, 0xd684, 0xd685, 0xd686, 0xd687, - 0xd688, 0xd689, 0xd68a, 0xd68b, 0xd68c, 0xd68d, 0xd68e, 0xd68f, - 0xd690, 0xd691, 0xd692, 0xd693, 0xd694, 0xd695, 0xd696, 0xd697, - 0xd698, 0xd699, 0xd69a, 0xd69b, 0xd69c, 0xd69d, 0xd69e, 0xd69f, - 0xd6a0, 0xd6a1, 0xd6a2, 0xd6a3, 0xd6a4, 0xd6a5, 0xd6a6, 0xd6a7, - 0xd6a8, 0xd6a9, 0xd6aa, 0xd6ab, 0xd6ac, 0xd6ad, 0xd6ae, 0xd6af, - 0xd6b0, 0xd6b1, 0xd6b2, 0xd6b3, 0xd6b4, 0xd6b5, 0xd6b6, 0xd6b7, - 0xd6b8, 0xd6b9, 0xd6ba, 0xd6bb, 0xd6bc, 0xd6bd, 0xd6be, 0xd6bf, - 0xd6c0, 0xd6c1, 0xd6c2, 0xd6c3, 0xd6c4, 0xd6c5, 0xd6c6, 0xd6c7, - 0xd6c8, 0xd6c9, 0xd6ca, 0xd6cb, 0xd6cc, 0xd6cd, 0xd6ce, 0xd6cf, - 0xd6d0, 0xd6d1, 0xd6d2, 0xd6d3, 0xd6d4, 0xd6d5, 0xd6d6, 0xd6d7, - 0xd6d8, 0xd6d9, 0xd6da, 0xd6db, 0xd6dc, 0xd6dd, 0xd6de, 0xd6df, - 0xd6e0, 0xd6e1, 0xd6e2, 0xd6e3, 0xd6e4, 0xd6e5, 0xd6e6, 0xd6e7, - 0xd6e8, 0xd6e9, 0xd6ea, 0xd6eb, 0xd6ec, 0xd6ed, 0xd6ee, 0xd6ef, - 0xd6f0, 0xd6f1, 0xd6f2, 0xd6f3, 0xd6f4, 0xd6f5, 0xd6f6, 0xd6f7, - 0xd6f8, 0xd6f9, 0xd6fa, 0xd6fb, 0xd6fc, 0xd6fd, 0xd6fe, 0xd6ff, - 0xd700, 0xd701, 0xd702, 0xd703, 0xd704, 0xd705, 0xd706, 0xd707, - 0xd708, 0xd709, 0xd70a, 0xd70b, 0xd70c, 0xd70d, 0xd70e, 0xd70f, - 0xd710, 0xd711, 0xd712, 0xd713, 0xd714, 0xd715, 0xd716, 0xd717, - 0xd718, 0xd719, 0xd71a, 0xd71b, 0xd71c, 0xd71d, 0xd71e, 0xd71f, - 0xd720, 0xd721, 0xd722, 0xd723, 0xd724, 0xd725, 0xd726, 0xd727, - 0xd728, 0xd729, 0xd72a, 0xd72b, 0xd72c, 0xd72d, 0xd72e, 0xd72f, - 0xd730, 0xd731, 0xd732, 0xd733, 0xd734, 0xd735, 0xd736, 0xd737, - 0xd738, 0xd739, 0xd73a, 0xd73b, 0xd73c, 0xd73d, 0xd73e, 0xd73f, - 0xd740, 0xd741, 0xd742, 0xd743, 0xd744, 0xd745, 0xd746, 0xd747, - 0xd748, 0xd749, 0xd74a, 0xd74b, 0xd74c, 0xd74d, 0xd74e, 0xd74f, - 0xd750, 0xd751, 0xd752, 0xd753, 0xd754, 0xd755, 0xd756, 0xd757, - 0xd758, 0xd759, 0xd75a, 0xd75b, 0xd75c, 0xd75d, 0xd75e, 0xd75f, - 0xd760, 0xd761, 0xd762, 0xd763, 0xd764, 0xd765, 0xd766, 0xd767, - 0xd768, 0xd769, 0xd76a, 0xd76b, 0xd76c, 0xd76d, 0xd76e, 0xd76f, - 0xd770, 0xd771, 0xd772, 0xd773, 0xd774, 0xd775, 0xd776, 0xd777, - 0xd778, 0xd779, 0xd77a, 0xd77b, 0xd77c, 0xd77d, 0xd77e, 0xd77f, - 0xd780, 0xd781, 0xd782, 0xd783, 0xd784, 0xd785, 0xd786, 0xd787, - 0xd788, 0xd789, 0xd78a, 0xd78b, 0xd78c, 0xd78d, 0xd78e, 0xd78f, - 0xd790, 0xd791, 0xd792, 0xd793, 0xd794, 0xd795, 0xd796, 0xd797, - 0xd798, 0xd799, 0xd79a, 0xd79b, 0xd79c, 0xd79d, 0xd79e, 0xd79f, - 0xd7a0, 0xd7a1, 0xd7a2, 0xd7a3, 0xd7a4, 0xd7a5, 0xd7a6, 0xd7a7, - 0xd7a8, 0xd7a9, 0xd7aa, 0xd7ab, 0xd7ac, 0xd7ad, 0xd7ae, 0xd7af, - 0xd7b0, 0xd7b1, 0xd7b2, 0xd7b3, 0xd7b4, 0xd7b5, 0xd7b6, 0xd7b7, - 0xd7b8, 0xd7b9, 0xd7ba, 0xd7bb, 0xd7bc, 0xd7bd, 0xd7be, 0xd7bf, - 0xd7c0, 0xd7c1, 0xd7c2, 0xd7c3, 0xd7c4, 0xd7c5, 0xd7c6, 0xd7c7, - 0xd7c8, 0xd7c9, 0xd7ca, 0xd7cb, 0xd7cc, 0xd7cd, 0xd7ce, 0xd7cf, - 0xd7d0, 0xd7d1, 0xd7d2, 0xd7d3, 0xd7d4, 0xd7d5, 0xd7d6, 0xd7d7, - 0xd7d8, 0xd7d9, 0xd7da, 0xd7db, 0xd7dc, 0xd7dd, 0xd7de, 0xd7df, - 0xd7e0, 0xd7e1, 0xd7e2, 0xd7e3, 0xd7e4, 0xd7e5, 0xd7e6, 0xd7e7, - 0xd7e8, 0xd7e9, 0xd7ea, 0xd7eb, 0xd7ec, 0xd7ed, 0xd7ee, 0xd7ef, - 0xd7f0, 0xd7f1, 0xd7f2, 0xd7f3, 0xd7f4, 0xd7f5, 0xd7f6, 0xd7f7, - 0xd7f8, 0xd7f9, 0xd7fa, 0xd7fb, 0xd7fc, 0xd7fd, 0xd7fe, 0xd7ff, - 0xd800, 0xd801, 0xd802, 0xd803, 0xd804, 0xd805, 0xd806, 0xd807, - 0xd808, 0xd809, 0xd80a, 0xd80b, 0xd80c, 0xd80d, 0xd80e, 0xd80f, - 0xd810, 0xd811, 0xd812, 0xd813, 0xd814, 0xd815, 0xd816, 0xd817, - 0xd818, 0xd819, 0xd81a, 0xd81b, 0xd81c, 0xd81d, 0xd81e, 0xd81f, - 0xd820, 0xd821, 0xd822, 0xd823, 0xd824, 0xd825, 0xd826, 0xd827, - 0xd828, 0xd829, 0xd82a, 0xd82b, 0xd82c, 0xd82d, 0xd82e, 0xd82f, - 0xd830, 0xd831, 0xd832, 0xd833, 0xd834, 0xd835, 0xd836, 0xd837, - 0xd838, 0xd839, 0xd83a, 0xd83b, 0xd83c, 0xd83d, 0xd83e, 0xd83f, - 0xd840, 0xd841, 0xd842, 0xd843, 0xd844, 0xd845, 0xd846, 0xd847, - 0xd848, 0xd849, 0xd84a, 0xd84b, 0xd84c, 0xd84d, 0xd84e, 0xd84f, - 0xd850, 0xd851, 0xd852, 0xd853, 0xd854, 0xd855, 0xd856, 0xd857, - 0xd858, 0xd859, 0xd85a, 0xd85b, 0xd85c, 0xd85d, 0xd85e, 0xd85f, - 0xd860, 0xd861, 0xd862, 0xd863, 0xd864, 0xd865, 0xd866, 0xd867, - 0xd868, 0xd869, 0xd86a, 0xd86b, 0xd86c, 0xd86d, 0xd86e, 0xd86f, - 0xd870, 0xd871, 0xd872, 0xd873, 0xd874, 0xd875, 0xd876, 0xd877, - 0xd878, 0xd879, 0xd87a, 0xd87b, 0xd87c, 0xd87d, 0xd87e, 0xd87f, - 0xd880, 0xd881, 0xd882, 0xd883, 0xd884, 0xd885, 0xd886, 0xd887, - 0xd888, 0xd889, 0xd88a, 0xd88b, 0xd88c, 0xd88d, 0xd88e, 0xd88f, - 0xd890, 0xd891, 0xd892, 0xd893, 0xd894, 0xd895, 0xd896, 0xd897, - 0xd898, 0xd899, 0xd89a, 0xd89b, 0xd89c, 0xd89d, 0xd89e, 0xd89f, - 0xd8a0, 0xd8a1, 0xd8a2, 0xd8a3, 0xd8a4, 0xd8a5, 0xd8a6, 0xd8a7, - 0xd8a8, 0xd8a9, 0xd8aa, 0xd8ab, 0xd8ac, 0xd8ad, 0xd8ae, 0xd8af, - 0xd8b0, 0xd8b1, 0xd8b2, 0xd8b3, 0xd8b4, 0xd8b5, 0xd8b6, 0xd8b7, - 0xd8b8, 0xd8b9, 0xd8ba, 0xd8bb, 0xd8bc, 0xd8bd, 0xd8be, 0xd8bf, - 0xd8c0, 0xd8c1, 0xd8c2, 0xd8c3, 0xd8c4, 0xd8c5, 0xd8c6, 0xd8c7, - 0xd8c8, 0xd8c9, 0xd8ca, 0xd8cb, 0xd8cc, 0xd8cd, 0xd8ce, 0xd8cf, - 0xd8d0, 0xd8d1, 0xd8d2, 0xd8d3, 0xd8d4, 0xd8d5, 0xd8d6, 0xd8d7, - 0xd8d8, 0xd8d9, 0xd8da, 0xd8db, 0xd8dc, 0xd8dd, 0xd8de, 0xd8df, - 0xd8e0, 0xd8e1, 0xd8e2, 0xd8e3, 0xd8e4, 0xd8e5, 0xd8e6, 0xd8e7, - 0xd8e8, 0xd8e9, 0xd8ea, 0xd8eb, 0xd8ec, 0xd8ed, 0xd8ee, 0xd8ef, - 0xd8f0, 0xd8f1, 0xd8f2, 0xd8f3, 0xd8f4, 0xd8f5, 0xd8f6, 0xd8f7, - 0xd8f8, 0xd8f9, 0xd8fa, 0xd8fb, 0xd8fc, 0xd8fd, 0xd8fe, 0xd8ff, - 0xd900, 0xd901, 0xd902, 0xd903, 0xd904, 0xd905, 0xd906, 0xd907, - 0xd908, 0xd909, 0xd90a, 0xd90b, 0xd90c, 0xd90d, 0xd90e, 0xd90f, - 0xd910, 0xd911, 0xd912, 0xd913, 0xd914, 0xd915, 0xd916, 0xd917, - 0xd918, 0xd919, 0xd91a, 0xd91b, 0xd91c, 0xd91d, 0xd91e, 0xd91f, - 0xd920, 0xd921, 0xd922, 0xd923, 0xd924, 0xd925, 0xd926, 0xd927, - 0xd928, 0xd929, 0xd92a, 0xd92b, 0xd92c, 0xd92d, 0xd92e, 0xd92f, - 0xd930, 0xd931, 0xd932, 0xd933, 0xd934, 0xd935, 0xd936, 0xd937, - 0xd938, 0xd939, 0xd93a, 0xd93b, 0xd93c, 0xd93d, 0xd93e, 0xd93f, - 0xd940, 0xd941, 0xd942, 0xd943, 0xd944, 0xd945, 0xd946, 0xd947, - 0xd948, 0xd949, 0xd94a, 0xd94b, 0xd94c, 0xd94d, 0xd94e, 0xd94f, - 0xd950, 0xd951, 0xd952, 0xd953, 0xd954, 0xd955, 0xd956, 0xd957, - 0xd958, 0xd959, 0xd95a, 0xd95b, 0xd95c, 0xd95d, 0xd95e, 0xd95f, - 0xd960, 0xd961, 0xd962, 0xd963, 0xd964, 0xd965, 0xd966, 0xd967, - 0xd968, 0xd969, 0xd96a, 0xd96b, 0xd96c, 0xd96d, 0xd96e, 0xd96f, - 0xd970, 0xd971, 0xd972, 0xd973, 0xd974, 0xd975, 0xd976, 0xd977, - 0xd978, 0xd979, 0xd97a, 0xd97b, 0xd97c, 0xd97d, 0xd97e, 0xd97f, - 0xd980, 0xd981, 0xd982, 0xd983, 0xd984, 0xd985, 0xd986, 0xd987, - 0xd988, 0xd989, 0xd98a, 0xd98b, 0xd98c, 0xd98d, 0xd98e, 0xd98f, - 0xd990, 0xd991, 0xd992, 0xd993, 0xd994, 0xd995, 0xd996, 0xd997, - 0xd998, 0xd999, 0xd99a, 0xd99b, 0xd99c, 0xd99d, 0xd99e, 0xd99f, - 0xd9a0, 0xd9a1, 0xd9a2, 0xd9a3, 0xd9a4, 0xd9a5, 0xd9a6, 0xd9a7, - 0xd9a8, 0xd9a9, 0xd9aa, 0xd9ab, 0xd9ac, 0xd9ad, 0xd9ae, 0xd9af, - 0xd9b0, 0xd9b1, 0xd9b2, 0xd9b3, 0xd9b4, 0xd9b5, 0xd9b6, 0xd9b7, - 0xd9b8, 0xd9b9, 0xd9ba, 0xd9bb, 0xd9bc, 0xd9bd, 0xd9be, 0xd9bf, - 0xd9c0, 0xd9c1, 0xd9c2, 0xd9c3, 0xd9c4, 0xd9c5, 0xd9c6, 0xd9c7, - 0xd9c8, 0xd9c9, 0xd9ca, 0xd9cb, 0xd9cc, 0xd9cd, 0xd9ce, 0xd9cf, - 0xd9d0, 0xd9d1, 0xd9d2, 0xd9d3, 0xd9d4, 0xd9d5, 0xd9d6, 0xd9d7, - 0xd9d8, 0xd9d9, 0xd9da, 0xd9db, 0xd9dc, 0xd9dd, 0xd9de, 0xd9df, - 0xd9e0, 0xd9e1, 0xd9e2, 0xd9e3, 0xd9e4, 0xd9e5, 0xd9e6, 0xd9e7, - 0xd9e8, 0xd9e9, 0xd9ea, 0xd9eb, 0xd9ec, 0xd9ed, 0xd9ee, 0xd9ef, - 0xd9f0, 0xd9f1, 0xd9f2, 0xd9f3, 0xd9f4, 0xd9f5, 0xd9f6, 0xd9f7, - 0xd9f8, 0xd9f9, 0xd9fa, 0xd9fb, 0xd9fc, 0xd9fd, 0xd9fe, 0xd9ff, - 0xda00, 0xda01, 0xda02, 0xda03, 0xda04, 0xda05, 0xda06, 0xda07, - 0xda08, 0xda09, 0xda0a, 0xda0b, 0xda0c, 0xda0d, 0xda0e, 0xda0f, - 0xda10, 0xda11, 0xda12, 0xda13, 0xda14, 0xda15, 0xda16, 0xda17, - 0xda18, 0xda19, 0xda1a, 0xda1b, 0xda1c, 0xda1d, 0xda1e, 0xda1f, - 0xda20, 0xda21, 0xda22, 0xda23, 0xda24, 0xda25, 0xda26, 0xda27, - 0xda28, 0xda29, 0xda2a, 0xda2b, 0xda2c, 0xda2d, 0xda2e, 0xda2f, - 0xda30, 0xda31, 0xda32, 0xda33, 0xda34, 0xda35, 0xda36, 0xda37, - 0xda38, 0xda39, 0xda3a, 0xda3b, 0xda3c, 0xda3d, 0xda3e, 0xda3f, - 0xda40, 0xda41, 0xda42, 0xda43, 0xda44, 0xda45, 0xda46, 0xda47, - 0xda48, 0xda49, 0xda4a, 0xda4b, 0xda4c, 0xda4d, 0xda4e, 0xda4f, - 0xda50, 0xda51, 0xda52, 0xda53, 0xda54, 0xda55, 0xda56, 0xda57, - 0xda58, 0xda59, 0xda5a, 0xda5b, 0xda5c, 0xda5d, 0xda5e, 0xda5f, - 0xda60, 0xda61, 0xda62, 0xda63, 0xda64, 0xda65, 0xda66, 0xda67, - 0xda68, 0xda69, 0xda6a, 0xda6b, 0xda6c, 0xda6d, 0xda6e, 0xda6f, - 0xda70, 0xda71, 0xda72, 0xda73, 0xda74, 0xda75, 0xda76, 0xda77, - 0xda78, 0xda79, 0xda7a, 0xda7b, 0xda7c, 0xda7d, 0xda7e, 0xda7f, - 0xda80, 0xda81, 0xda82, 0xda83, 0xda84, 0xda85, 0xda86, 0xda87, - 0xda88, 0xda89, 0xda8a, 0xda8b, 0xda8c, 0xda8d, 0xda8e, 0xda8f, - 0xda90, 0xda91, 0xda92, 0xda93, 0xda94, 0xda95, 0xda96, 0xda97, - 0xda98, 0xda99, 0xda9a, 0xda9b, 0xda9c, 0xda9d, 0xda9e, 0xda9f, - 0xdaa0, 0xdaa1, 0xdaa2, 0xdaa3, 0xdaa4, 0xdaa5, 0xdaa6, 0xdaa7, - 0xdaa8, 0xdaa9, 0xdaaa, 0xdaab, 0xdaac, 0xdaad, 0xdaae, 0xdaaf, - 0xdab0, 0xdab1, 0xdab2, 0xdab3, 0xdab4, 0xdab5, 0xdab6, 0xdab7, - 0xdab8, 0xdab9, 0xdaba, 0xdabb, 0xdabc, 0xdabd, 0xdabe, 0xdabf, - 0xdac0, 0xdac1, 0xdac2, 0xdac3, 0xdac4, 0xdac5, 0xdac6, 0xdac7, - 0xdac8, 0xdac9, 0xdaca, 0xdacb, 0xdacc, 0xdacd, 0xdace, 0xdacf, - 0xdad0, 0xdad1, 0xdad2, 0xdad3, 0xdad4, 0xdad5, 0xdad6, 0xdad7, - 0xdad8, 0xdad9, 0xdada, 0xdadb, 0xdadc, 0xdadd, 0xdade, 0xdadf, - 0xdae0, 0xdae1, 0xdae2, 0xdae3, 0xdae4, 0xdae5, 0xdae6, 0xdae7, - 0xdae8, 0xdae9, 0xdaea, 0xdaeb, 0xdaec, 0xdaed, 0xdaee, 0xdaef, - 0xdaf0, 0xdaf1, 0xdaf2, 0xdaf3, 0xdaf4, 0xdaf5, 0xdaf6, 0xdaf7, - 0xdaf8, 0xdaf9, 0xdafa, 0xdafb, 0xdafc, 0xdafd, 0xdafe, 0xdaff, - 0xdb00, 0xdb01, 0xdb02, 0xdb03, 0xdb04, 0xdb05, 0xdb06, 0xdb07, - 0xdb08, 0xdb09, 0xdb0a, 0xdb0b, 0xdb0c, 0xdb0d, 0xdb0e, 0xdb0f, - 0xdb10, 0xdb11, 0xdb12, 0xdb13, 0xdb14, 0xdb15, 0xdb16, 0xdb17, - 0xdb18, 0xdb19, 0xdb1a, 0xdb1b, 0xdb1c, 0xdb1d, 0xdb1e, 0xdb1f, - 0xdb20, 0xdb21, 0xdb22, 0xdb23, 0xdb24, 0xdb25, 0xdb26, 0xdb27, - 0xdb28, 0xdb29, 0xdb2a, 0xdb2b, 0xdb2c, 0xdb2d, 0xdb2e, 0xdb2f, - 0xdb30, 0xdb31, 0xdb32, 0xdb33, 0xdb34, 0xdb35, 0xdb36, 0xdb37, - 0xdb38, 0xdb39, 0xdb3a, 0xdb3b, 0xdb3c, 0xdb3d, 0xdb3e, 0xdb3f, - 0xdb40, 0xdb41, 0xdb42, 0xdb43, 0xdb44, 0xdb45, 0xdb46, 0xdb47, - 0xdb48, 0xdb49, 0xdb4a, 0xdb4b, 0xdb4c, 0xdb4d, 0xdb4e, 0xdb4f, - 0xdb50, 0xdb51, 0xdb52, 0xdb53, 0xdb54, 0xdb55, 0xdb56, 0xdb57, - 0xdb58, 0xdb59, 0xdb5a, 0xdb5b, 0xdb5c, 0xdb5d, 0xdb5e, 0xdb5f, - 0xdb60, 0xdb61, 0xdb62, 0xdb63, 0xdb64, 0xdb65, 0xdb66, 0xdb67, - 0xdb68, 0xdb69, 0xdb6a, 0xdb6b, 0xdb6c, 0xdb6d, 0xdb6e, 0xdb6f, - 0xdb70, 0xdb71, 0xdb72, 0xdb73, 0xdb74, 0xdb75, 0xdb76, 0xdb77, - 0xdb78, 0xdb79, 0xdb7a, 0xdb7b, 0xdb7c, 0xdb7d, 0xdb7e, 0xdb7f, - 0xdb80, 0xdb81, 0xdb82, 0xdb83, 0xdb84, 0xdb85, 0xdb86, 0xdb87, - 0xdb88, 0xdb89, 0xdb8a, 0xdb8b, 0xdb8c, 0xdb8d, 0xdb8e, 0xdb8f, - 0xdb90, 0xdb91, 0xdb92, 0xdb93, 0xdb94, 0xdb95, 0xdb96, 0xdb97, - 0xdb98, 0xdb99, 0xdb9a, 0xdb9b, 0xdb9c, 0xdb9d, 0xdb9e, 0xdb9f, - 0xdba0, 0xdba1, 0xdba2, 0xdba3, 0xdba4, 0xdba5, 0xdba6, 0xdba7, - 0xdba8, 0xdba9, 0xdbaa, 0xdbab, 0xdbac, 0xdbad, 0xdbae, 0xdbaf, - 0xdbb0, 0xdbb1, 0xdbb2, 0xdbb3, 0xdbb4, 0xdbb5, 0xdbb6, 0xdbb7, - 0xdbb8, 0xdbb9, 0xdbba, 0xdbbb, 0xdbbc, 0xdbbd, 0xdbbe, 0xdbbf, - 0xdbc0, 0xdbc1, 0xdbc2, 0xdbc3, 0xdbc4, 0xdbc5, 0xdbc6, 0xdbc7, - 0xdbc8, 0xdbc9, 0xdbca, 0xdbcb, 0xdbcc, 0xdbcd, 0xdbce, 0xdbcf, - 0xdbd0, 0xdbd1, 0xdbd2, 0xdbd3, 0xdbd4, 0xdbd5, 0xdbd6, 0xdbd7, - 0xdbd8, 0xdbd9, 0xdbda, 0xdbdb, 0xdbdc, 0xdbdd, 0xdbde, 0xdbdf, - 0xdbe0, 0xdbe1, 0xdbe2, 0xdbe3, 0xdbe4, 0xdbe5, 0xdbe6, 0xdbe7, - 0xdbe8, 0xdbe9, 0xdbea, 0xdbeb, 0xdbec, 0xdbed, 0xdbee, 0xdbef, - 0xdbf0, 0xdbf1, 0xdbf2, 0xdbf3, 0xdbf4, 0xdbf5, 0xdbf6, 0xdbf7, - 0xdbf8, 0xdbf9, 0xdbfa, 0xdbfb, 0xdbfc, 0xdbfd, 0xdbfe, 0xdbff, - 0xdc00, 0xdc01, 0xdc02, 0xdc03, 0xdc04, 0xdc05, 0xdc06, 0xdc07, - 0xdc08, 0xdc09, 0xdc0a, 0xdc0b, 0xdc0c, 0xdc0d, 0xdc0e, 0xdc0f, - 0xdc10, 0xdc11, 0xdc12, 0xdc13, 0xdc14, 0xdc15, 0xdc16, 0xdc17, - 0xdc18, 0xdc19, 0xdc1a, 0xdc1b, 0xdc1c, 0xdc1d, 0xdc1e, 0xdc1f, - 0xdc20, 0xdc21, 0xdc22, 0xdc23, 0xdc24, 0xdc25, 0xdc26, 0xdc27, - 0xdc28, 0xdc29, 0xdc2a, 0xdc2b, 0xdc2c, 0xdc2d, 0xdc2e, 0xdc2f, - 0xdc30, 0xdc31, 0xdc32, 0xdc33, 0xdc34, 0xdc35, 0xdc36, 0xdc37, - 0xdc38, 0xdc39, 0xdc3a, 0xdc3b, 0xdc3c, 0xdc3d, 0xdc3e, 0xdc3f, - 0xdc40, 0xdc41, 0xdc42, 0xdc43, 0xdc44, 0xdc45, 0xdc46, 0xdc47, - 0xdc48, 0xdc49, 0xdc4a, 0xdc4b, 0xdc4c, 0xdc4d, 0xdc4e, 0xdc4f, - 0xdc50, 0xdc51, 0xdc52, 0xdc53, 0xdc54, 0xdc55, 0xdc56, 0xdc57, - 0xdc58, 0xdc59, 0xdc5a, 0xdc5b, 0xdc5c, 0xdc5d, 0xdc5e, 0xdc5f, - 0xdc60, 0xdc61, 0xdc62, 0xdc63, 0xdc64, 0xdc65, 0xdc66, 0xdc67, - 0xdc68, 0xdc69, 0xdc6a, 0xdc6b, 0xdc6c, 0xdc6d, 0xdc6e, 0xdc6f, - 0xdc70, 0xdc71, 0xdc72, 0xdc73, 0xdc74, 0xdc75, 0xdc76, 0xdc77, - 0xdc78, 0xdc79, 0xdc7a, 0xdc7b, 0xdc7c, 0xdc7d, 0xdc7e, 0xdc7f, - 0xdc80, 0xdc81, 0xdc82, 0xdc83, 0xdc84, 0xdc85, 0xdc86, 0xdc87, - 0xdc88, 0xdc89, 0xdc8a, 0xdc8b, 0xdc8c, 0xdc8d, 0xdc8e, 0xdc8f, - 0xdc90, 0xdc91, 0xdc92, 0xdc93, 0xdc94, 0xdc95, 0xdc96, 0xdc97, - 0xdc98, 0xdc99, 0xdc9a, 0xdc9b, 0xdc9c, 0xdc9d, 0xdc9e, 0xdc9f, - 0xdca0, 0xdca1, 0xdca2, 0xdca3, 0xdca4, 0xdca5, 0xdca6, 0xdca7, - 0xdca8, 0xdca9, 0xdcaa, 0xdcab, 0xdcac, 0xdcad, 0xdcae, 0xdcaf, - 0xdcb0, 0xdcb1, 0xdcb2, 0xdcb3, 0xdcb4, 0xdcb5, 0xdcb6, 0xdcb7, - 0xdcb8, 0xdcb9, 0xdcba, 0xdcbb, 0xdcbc, 0xdcbd, 0xdcbe, 0xdcbf, - 0xdcc0, 0xdcc1, 0xdcc2, 0xdcc3, 0xdcc4, 0xdcc5, 0xdcc6, 0xdcc7, - 0xdcc8, 0xdcc9, 0xdcca, 0xdccb, 0xdccc, 0xdccd, 0xdcce, 0xdccf, - 0xdcd0, 0xdcd1, 0xdcd2, 0xdcd3, 0xdcd4, 0xdcd5, 0xdcd6, 0xdcd7, - 0xdcd8, 0xdcd9, 0xdcda, 0xdcdb, 0xdcdc, 0xdcdd, 0xdcde, 0xdcdf, - 0xdce0, 0xdce1, 0xdce2, 0xdce3, 0xdce4, 0xdce5, 0xdce6, 0xdce7, - 0xdce8, 0xdce9, 0xdcea, 0xdceb, 0xdcec, 0xdced, 0xdcee, 0xdcef, - 0xdcf0, 0xdcf1, 0xdcf2, 0xdcf3, 0xdcf4, 0xdcf5, 0xdcf6, 0xdcf7, - 0xdcf8, 0xdcf9, 0xdcfa, 0xdcfb, 0xdcfc, 0xdcfd, 0xdcfe, 0xdcff, - 0xdd00, 0xdd01, 0xdd02, 0xdd03, 0xdd04, 0xdd05, 0xdd06, 0xdd07, - 0xdd08, 0xdd09, 0xdd0a, 0xdd0b, 0xdd0c, 0xdd0d, 0xdd0e, 0xdd0f, - 0xdd10, 0xdd11, 0xdd12, 0xdd13, 0xdd14, 0xdd15, 0xdd16, 0xdd17, - 0xdd18, 0xdd19, 0xdd1a, 0xdd1b, 0xdd1c, 0xdd1d, 0xdd1e, 0xdd1f, - 0xdd20, 0xdd21, 0xdd22, 0xdd23, 0xdd24, 0xdd25, 0xdd26, 0xdd27, - 0xdd28, 0xdd29, 0xdd2a, 0xdd2b, 0xdd2c, 0xdd2d, 0xdd2e, 0xdd2f, - 0xdd30, 0xdd31, 0xdd32, 0xdd33, 0xdd34, 0xdd35, 0xdd36, 0xdd37, - 0xdd38, 0xdd39, 0xdd3a, 0xdd3b, 0xdd3c, 0xdd3d, 0xdd3e, 0xdd3f, - 0xdd40, 0xdd41, 0xdd42, 0xdd43, 0xdd44, 0xdd45, 0xdd46, 0xdd47, - 0xdd48, 0xdd49, 0xdd4a, 0xdd4b, 0xdd4c, 0xdd4d, 0xdd4e, 0xdd4f, - 0xdd50, 0xdd51, 0xdd52, 0xdd53, 0xdd54, 0xdd55, 0xdd56, 0xdd57, - 0xdd58, 0xdd59, 0xdd5a, 0xdd5b, 0xdd5c, 0xdd5d, 0xdd5e, 0xdd5f, - 0xdd60, 0xdd61, 0xdd62, 0xdd63, 0xdd64, 0xdd65, 0xdd66, 0xdd67, - 0xdd68, 0xdd69, 0xdd6a, 0xdd6b, 0xdd6c, 0xdd6d, 0xdd6e, 0xdd6f, - 0xdd70, 0xdd71, 0xdd72, 0xdd73, 0xdd74, 0xdd75, 0xdd76, 0xdd77, - 0xdd78, 0xdd79, 0xdd7a, 0xdd7b, 0xdd7c, 0xdd7d, 0xdd7e, 0xdd7f, - 0xdd80, 0xdd81, 0xdd82, 0xdd83, 0xdd84, 0xdd85, 0xdd86, 0xdd87, - 0xdd88, 0xdd89, 0xdd8a, 0xdd8b, 0xdd8c, 0xdd8d, 0xdd8e, 0xdd8f, - 0xdd90, 0xdd91, 0xdd92, 0xdd93, 0xdd94, 0xdd95, 0xdd96, 0xdd97, - 0xdd98, 0xdd99, 0xdd9a, 0xdd9b, 0xdd9c, 0xdd9d, 0xdd9e, 0xdd9f, - 0xdda0, 0xdda1, 0xdda2, 0xdda3, 0xdda4, 0xdda5, 0xdda6, 0xdda7, - 0xdda8, 0xdda9, 0xddaa, 0xddab, 0xddac, 0xddad, 0xddae, 0xddaf, - 0xddb0, 0xddb1, 0xddb2, 0xddb3, 0xddb4, 0xddb5, 0xddb6, 0xddb7, - 0xddb8, 0xddb9, 0xddba, 0xddbb, 0xddbc, 0xddbd, 0xddbe, 0xddbf, - 0xddc0, 0xddc1, 0xddc2, 0xddc3, 0xddc4, 0xddc5, 0xddc6, 0xddc7, - 0xddc8, 0xddc9, 0xddca, 0xddcb, 0xddcc, 0xddcd, 0xddce, 0xddcf, - 0xddd0, 0xddd1, 0xddd2, 0xddd3, 0xddd4, 0xddd5, 0xddd6, 0xddd7, - 0xddd8, 0xddd9, 0xddda, 0xdddb, 0xdddc, 0xdddd, 0xddde, 0xdddf, - 0xdde0, 0xdde1, 0xdde2, 0xdde3, 0xdde4, 0xdde5, 0xdde6, 0xdde7, - 0xdde8, 0xdde9, 0xddea, 0xddeb, 0xddec, 0xdded, 0xddee, 0xddef, - 0xddf0, 0xddf1, 0xddf2, 0xddf3, 0xddf4, 0xddf5, 0xddf6, 0xddf7, - 0xddf8, 0xddf9, 0xddfa, 0xddfb, 0xddfc, 0xddfd, 0xddfe, 0xddff, - 0xde00, 0xde01, 0xde02, 0xde03, 0xde04, 0xde05, 0xde06, 0xde07, - 0xde08, 0xde09, 0xde0a, 0xde0b, 0xde0c, 0xde0d, 0xde0e, 0xde0f, - 0xde10, 0xde11, 0xde12, 0xde13, 0xde14, 0xde15, 0xde16, 0xde17, - 0xde18, 0xde19, 0xde1a, 0xde1b, 0xde1c, 0xde1d, 0xde1e, 0xde1f, - 0xde20, 0xde21, 0xde22, 0xde23, 0xde24, 0xde25, 0xde26, 0xde27, - 0xde28, 0xde29, 0xde2a, 0xde2b, 0xde2c, 0xde2d, 0xde2e, 0xde2f, - 0xde30, 0xde31, 0xde32, 0xde33, 0xde34, 0xde35, 0xde36, 0xde37, - 0xde38, 0xde39, 0xde3a, 0xde3b, 0xde3c, 0xde3d, 0xde3e, 0xde3f, - 0xde40, 0xde41, 0xde42, 0xde43, 0xde44, 0xde45, 0xde46, 0xde47, - 0xde48, 0xde49, 0xde4a, 0xde4b, 0xde4c, 0xde4d, 0xde4e, 0xde4f, - 0xde50, 0xde51, 0xde52, 0xde53, 0xde54, 0xde55, 0xde56, 0xde57, - 0xde58, 0xde59, 0xde5a, 0xde5b, 0xde5c, 0xde5d, 0xde5e, 0xde5f, - 0xde60, 0xde61, 0xde62, 0xde63, 0xde64, 0xde65, 0xde66, 0xde67, - 0xde68, 0xde69, 0xde6a, 0xde6b, 0xde6c, 0xde6d, 0xde6e, 0xde6f, - 0xde70, 0xde71, 0xde72, 0xde73, 0xde74, 0xde75, 0xde76, 0xde77, - 0xde78, 0xde79, 0xde7a, 0xde7b, 0xde7c, 0xde7d, 0xde7e, 0xde7f, - 0xde80, 0xde81, 0xde82, 0xde83, 0xde84, 0xde85, 0xde86, 0xde87, - 0xde88, 0xde89, 0xde8a, 0xde8b, 0xde8c, 0xde8d, 0xde8e, 0xde8f, - 0xde90, 0xde91, 0xde92, 0xde93, 0xde94, 0xde95, 0xde96, 0xde97, - 0xde98, 0xde99, 0xde9a, 0xde9b, 0xde9c, 0xde9d, 0xde9e, 0xde9f, - 0xdea0, 0xdea1, 0xdea2, 0xdea3, 0xdea4, 0xdea5, 0xdea6, 0xdea7, - 0xdea8, 0xdea9, 0xdeaa, 0xdeab, 0xdeac, 0xdead, 0xdeae, 0xdeaf, - 0xdeb0, 0xdeb1, 0xdeb2, 0xdeb3, 0xdeb4, 0xdeb5, 0xdeb6, 0xdeb7, - 0xdeb8, 0xdeb9, 0xdeba, 0xdebb, 0xdebc, 0xdebd, 0xdebe, 0xdebf, - 0xdec0, 0xdec1, 0xdec2, 0xdec3, 0xdec4, 0xdec5, 0xdec6, 0xdec7, - 0xdec8, 0xdec9, 0xdeca, 0xdecb, 0xdecc, 0xdecd, 0xdece, 0xdecf, - 0xded0, 0xded1, 0xded2, 0xded3, 0xded4, 0xded5, 0xded6, 0xded7, - 0xded8, 0xded9, 0xdeda, 0xdedb, 0xdedc, 0xdedd, 0xdede, 0xdedf, - 0xdee0, 0xdee1, 0xdee2, 0xdee3, 0xdee4, 0xdee5, 0xdee6, 0xdee7, - 0xdee8, 0xdee9, 0xdeea, 0xdeeb, 0xdeec, 0xdeed, 0xdeee, 0xdeef, - 0xdef0, 0xdef1, 0xdef2, 0xdef3, 0xdef4, 0xdef5, 0xdef6, 0xdef7, - 0xdef8, 0xdef9, 0xdefa, 0xdefb, 0xdefc, 0xdefd, 0xdefe, 0xdeff, - 0xdf00, 0xdf01, 0xdf02, 0xdf03, 0xdf04, 0xdf05, 0xdf06, 0xdf07, - 0xdf08, 0xdf09, 0xdf0a, 0xdf0b, 0xdf0c, 0xdf0d, 0xdf0e, 0xdf0f, - 0xdf10, 0xdf11, 0xdf12, 0xdf13, 0xdf14, 0xdf15, 0xdf16, 0xdf17, - 0xdf18, 0xdf19, 0xdf1a, 0xdf1b, 0xdf1c, 0xdf1d, 0xdf1e, 0xdf1f, - 0xdf20, 0xdf21, 0xdf22, 0xdf23, 0xdf24, 0xdf25, 0xdf26, 0xdf27, - 0xdf28, 0xdf29, 0xdf2a, 0xdf2b, 0xdf2c, 0xdf2d, 0xdf2e, 0xdf2f, - 0xdf30, 0xdf31, 0xdf32, 0xdf33, 0xdf34, 0xdf35, 0xdf36, 0xdf37, - 0xdf38, 0xdf39, 0xdf3a, 0xdf3b, 0xdf3c, 0xdf3d, 0xdf3e, 0xdf3f, - 0xdf40, 0xdf41, 0xdf42, 0xdf43, 0xdf44, 0xdf45, 0xdf46, 0xdf47, - 0xdf48, 0xdf49, 0xdf4a, 0xdf4b, 0xdf4c, 0xdf4d, 0xdf4e, 0xdf4f, - 0xdf50, 0xdf51, 0xdf52, 0xdf53, 0xdf54, 0xdf55, 0xdf56, 0xdf57, - 0xdf58, 0xdf59, 0xdf5a, 0xdf5b, 0xdf5c, 0xdf5d, 0xdf5e, 0xdf5f, - 0xdf60, 0xdf61, 0xdf62, 0xdf63, 0xdf64, 0xdf65, 0xdf66, 0xdf67, - 0xdf68, 0xdf69, 0xdf6a, 0xdf6b, 0xdf6c, 0xdf6d, 0xdf6e, 0xdf6f, - 0xdf70, 0xdf71, 0xdf72, 0xdf73, 0xdf74, 0xdf75, 0xdf76, 0xdf77, - 0xdf78, 0xdf79, 0xdf7a, 0xdf7b, 0xdf7c, 0xdf7d, 0xdf7e, 0xdf7f, - 0xdf80, 0xdf81, 0xdf82, 0xdf83, 0xdf84, 0xdf85, 0xdf86, 0xdf87, - 0xdf88, 0xdf89, 0xdf8a, 0xdf8b, 0xdf8c, 0xdf8d, 0xdf8e, 0xdf8f, - 0xdf90, 0xdf91, 0xdf92, 0xdf93, 0xdf94, 0xdf95, 0xdf96, 0xdf97, - 0xdf98, 0xdf99, 0xdf9a, 0xdf9b, 0xdf9c, 0xdf9d, 0xdf9e, 0xdf9f, - 0xdfa0, 0xdfa1, 0xdfa2, 0xdfa3, 0xdfa4, 0xdfa5, 0xdfa6, 0xdfa7, - 0xdfa8, 0xdfa9, 0xdfaa, 0xdfab, 0xdfac, 0xdfad, 0xdfae, 0xdfaf, - 0xdfb0, 0xdfb1, 0xdfb2, 0xdfb3, 0xdfb4, 0xdfb5, 0xdfb6, 0xdfb7, - 0xdfb8, 0xdfb9, 0xdfba, 0xdfbb, 0xdfbc, 0xdfbd, 0xdfbe, 0xdfbf, - 0xdfc0, 0xdfc1, 0xdfc2, 0xdfc3, 0xdfc4, 0xdfc5, 0xdfc6, 0xdfc7, - 0xdfc8, 0xdfc9, 0xdfca, 0xdfcb, 0xdfcc, 0xdfcd, 0xdfce, 0xdfcf, - 0xdfd0, 0xdfd1, 0xdfd2, 0xdfd3, 0xdfd4, 0xdfd5, 0xdfd6, 0xdfd7, - 0xdfd8, 0xdfd9, 0xdfda, 0xdfdb, 0xdfdc, 0xdfdd, 0xdfde, 0xdfdf, - 0xdfe0, 0xdfe1, 0xdfe2, 0xdfe3, 0xdfe4, 0xdfe5, 0xdfe6, 0xdfe7, - 0xdfe8, 0xdfe9, 0xdfea, 0xdfeb, 0xdfec, 0xdfed, 0xdfee, 0xdfef, - 0xdff0, 0xdff1, 0xdff2, 0xdff3, 0xdff4, 0xdff5, 0xdff6, 0xdff7, - 0xdff8, 0xdff9, 0xdffa, 0xdffb, 0xdffc, 0xdffd, 0xdffe, 0xdfff, - 0xe000, 0xe001, 0xe002, 0xe003, 0xe004, 0xe005, 0xe006, 0xe007, - 0xe008, 0xe009, 0xe00a, 0xe00b, 0xe00c, 0xe00d, 0xe00e, 0xe00f, - 0xe010, 0xe011, 0xe012, 0xe013, 0xe014, 0xe015, 0xe016, 0xe017, - 0xe018, 0xe019, 0xe01a, 0xe01b, 0xe01c, 0xe01d, 0xe01e, 0xe01f, - 0xe020, 0xe021, 0xe022, 0xe023, 0xe024, 0xe025, 0xe026, 0xe027, - 0xe028, 0xe029, 0xe02a, 0xe02b, 0xe02c, 0xe02d, 0xe02e, 0xe02f, - 0xe030, 0xe031, 0xe032, 0xe033, 0xe034, 0xe035, 0xe036, 0xe037, - 0xe038, 0xe039, 0xe03a, 0xe03b, 0xe03c, 0xe03d, 0xe03e, 0xe03f, - 0xe040, 0xe041, 0xe042, 0xe043, 0xe044, 0xe045, 0xe046, 0xe047, - 0xe048, 0xe049, 0xe04a, 0xe04b, 0xe04c, 0xe04d, 0xe04e, 0xe04f, - 0xe050, 0xe051, 0xe052, 0xe053, 0xe054, 0xe055, 0xe056, 0xe057, - 0xe058, 0xe059, 0xe05a, 0xe05b, 0xe05c, 0xe05d, 0xe05e, 0xe05f, - 0xe060, 0xe061, 0xe062, 0xe063, 0xe064, 0xe065, 0xe066, 0xe067, - 0xe068, 0xe069, 0xe06a, 0xe06b, 0xe06c, 0xe06d, 0xe06e, 0xe06f, - 0xe070, 0xe071, 0xe072, 0xe073, 0xe074, 0xe075, 0xe076, 0xe077, - 0xe078, 0xe079, 0xe07a, 0xe07b, 0xe07c, 0xe07d, 0xe07e, 0xe07f, - 0xe080, 0xe081, 0xe082, 0xe083, 0xe084, 0xe085, 0xe086, 0xe087, - 0xe088, 0xe089, 0xe08a, 0xe08b, 0xe08c, 0xe08d, 0xe08e, 0xe08f, - 0xe090, 0xe091, 0xe092, 0xe093, 0xe094, 0xe095, 0xe096, 0xe097, - 0xe098, 0xe099, 0xe09a, 0xe09b, 0xe09c, 0xe09d, 0xe09e, 0xe09f, - 0xe0a0, 0xe0a1, 0xe0a2, 0xe0a3, 0xe0a4, 0xe0a5, 0xe0a6, 0xe0a7, - 0xe0a8, 0xe0a9, 0xe0aa, 0xe0ab, 0xe0ac, 0xe0ad, 0xe0ae, 0xe0af, - 0xe0b0, 0xe0b1, 0xe0b2, 0xe0b3, 0xe0b4, 0xe0b5, 0xe0b6, 0xe0b7, - 0xe0b8, 0xe0b9, 0xe0ba, 0xe0bb, 0xe0bc, 0xe0bd, 0xe0be, 0xe0bf, - 0xe0c0, 0xe0c1, 0xe0c2, 0xe0c3, 0xe0c4, 0xe0c5, 0xe0c6, 0xe0c7, - 0xe0c8, 0xe0c9, 0xe0ca, 0xe0cb, 0xe0cc, 0xe0cd, 0xe0ce, 0xe0cf, - 0xe0d0, 0xe0d1, 0xe0d2, 0xe0d3, 0xe0d4, 0xe0d5, 0xe0d6, 0xe0d7, - 0xe0d8, 0xe0d9, 0xe0da, 0xe0db, 0xe0dc, 0xe0dd, 0xe0de, 0xe0df, - 0xe0e0, 0xe0e1, 0xe0e2, 0xe0e3, 0xe0e4, 0xe0e5, 0xe0e6, 0xe0e7, - 0xe0e8, 0xe0e9, 0xe0ea, 0xe0eb, 0xe0ec, 0xe0ed, 0xe0ee, 0xe0ef, - 0xe0f0, 0xe0f1, 0xe0f2, 0xe0f3, 0xe0f4, 0xe0f5, 0xe0f6, 0xe0f7, - 0xe0f8, 0xe0f9, 0xe0fa, 0xe0fb, 0xe0fc, 0xe0fd, 0xe0fe, 0xe0ff, - 0xe100, 0xe101, 0xe102, 0xe103, 0xe104, 0xe105, 0xe106, 0xe107, - 0xe108, 0xe109, 0xe10a, 0xe10b, 0xe10c, 0xe10d, 0xe10e, 0xe10f, - 0xe110, 0xe111, 0xe112, 0xe113, 0xe114, 0xe115, 0xe116, 0xe117, - 0xe118, 0xe119, 0xe11a, 0xe11b, 0xe11c, 0xe11d, 0xe11e, 0xe11f, - 0xe120, 0xe121, 0xe122, 0xe123, 0xe124, 0xe125, 0xe126, 0xe127, - 0xe128, 0xe129, 0xe12a, 0xe12b, 0xe12c, 0xe12d, 0xe12e, 0xe12f, - 0xe130, 0xe131, 0xe132, 0xe133, 0xe134, 0xe135, 0xe136, 0xe137, - 0xe138, 0xe139, 0xe13a, 0xe13b, 0xe13c, 0xe13d, 0xe13e, 0xe13f, - 0xe140, 0xe141, 0xe142, 0xe143, 0xe144, 0xe145, 0xe146, 0xe147, - 0xe148, 0xe149, 0xe14a, 0xe14b, 0xe14c, 0xe14d, 0xe14e, 0xe14f, - 0xe150, 0xe151, 0xe152, 0xe153, 0xe154, 0xe155, 0xe156, 0xe157, - 0xe158, 0xe159, 0xe15a, 0xe15b, 0xe15c, 0xe15d, 0xe15e, 0xe15f, - 0xe160, 0xe161, 0xe162, 0xe163, 0xe164, 0xe165, 0xe166, 0xe167, - 0xe168, 0xe169, 0xe16a, 0xe16b, 0xe16c, 0xe16d, 0xe16e, 0xe16f, - 0xe170, 0xe171, 0xe172, 0xe173, 0xe174, 0xe175, 0xe176, 0xe177, - 0xe178, 0xe179, 0xe17a, 0xe17b, 0xe17c, 0xe17d, 0xe17e, 0xe17f, - 0xe180, 0xe181, 0xe182, 0xe183, 0xe184, 0xe185, 0xe186, 0xe187, - 0xe188, 0xe189, 0xe18a, 0xe18b, 0xe18c, 0xe18d, 0xe18e, 0xe18f, - 0xe190, 0xe191, 0xe192, 0xe193, 0xe194, 0xe195, 0xe196, 0xe197, - 0xe198, 0xe199, 0xe19a, 0xe19b, 0xe19c, 0xe19d, 0xe19e, 0xe19f, - 0xe1a0, 0xe1a1, 0xe1a2, 0xe1a3, 0xe1a4, 0xe1a5, 0xe1a6, 0xe1a7, - 0xe1a8, 0xe1a9, 0xe1aa, 0xe1ab, 0xe1ac, 0xe1ad, 0xe1ae, 0xe1af, - 0xe1b0, 0xe1b1, 0xe1b2, 0xe1b3, 0xe1b4, 0xe1b5, 0xe1b6, 0xe1b7, - 0xe1b8, 0xe1b9, 0xe1ba, 0xe1bb, 0xe1bc, 0xe1bd, 0xe1be, 0xe1bf, - 0xe1c0, 0xe1c1, 0xe1c2, 0xe1c3, 0xe1c4, 0xe1c5, 0xe1c6, 0xe1c7, - 0xe1c8, 0xe1c9, 0xe1ca, 0xe1cb, 0xe1cc, 0xe1cd, 0xe1ce, 0xe1cf, - 0xe1d0, 0xe1d1, 0xe1d2, 0xe1d3, 0xe1d4, 0xe1d5, 0xe1d6, 0xe1d7, - 0xe1d8, 0xe1d9, 0xe1da, 0xe1db, 0xe1dc, 0xe1dd, 0xe1de, 0xe1df, - 0xe1e0, 0xe1e1, 0xe1e2, 0xe1e3, 0xe1e4, 0xe1e5, 0xe1e6, 0xe1e7, - 0xe1e8, 0xe1e9, 0xe1ea, 0xe1eb, 0xe1ec, 0xe1ed, 0xe1ee, 0xe1ef, - 0xe1f0, 0xe1f1, 0xe1f2, 0xe1f3, 0xe1f4, 0xe1f5, 0xe1f6, 0xe1f7, - 0xe1f8, 0xe1f9, 0xe1fa, 0xe1fb, 0xe1fc, 0xe1fd, 0xe1fe, 0xe1ff, - 0xe200, 0xe201, 0xe202, 0xe203, 0xe204, 0xe205, 0xe206, 0xe207, - 0xe208, 0xe209, 0xe20a, 0xe20b, 0xe20c, 0xe20d, 0xe20e, 0xe20f, - 0xe210, 0xe211, 0xe212, 0xe213, 0xe214, 0xe215, 0xe216, 0xe217, - 0xe218, 0xe219, 0xe21a, 0xe21b, 0xe21c, 0xe21d, 0xe21e, 0xe21f, - 0xe220, 0xe221, 0xe222, 0xe223, 0xe224, 0xe225, 0xe226, 0xe227, - 0xe228, 0xe229, 0xe22a, 0xe22b, 0xe22c, 0xe22d, 0xe22e, 0xe22f, - 0xe230, 0xe231, 0xe232, 0xe233, 0xe234, 0xe235, 0xe236, 0xe237, - 0xe238, 0xe239, 0xe23a, 0xe23b, 0xe23c, 0xe23d, 0xe23e, 0xe23f, - 0xe240, 0xe241, 0xe242, 0xe243, 0xe244, 0xe245, 0xe246, 0xe247, - 0xe248, 0xe249, 0xe24a, 0xe24b, 0xe24c, 0xe24d, 0xe24e, 0xe24f, - 0xe250, 0xe251, 0xe252, 0xe253, 0xe254, 0xe255, 0xe256, 0xe257, - 0xe258, 0xe259, 0xe25a, 0xe25b, 0xe25c, 0xe25d, 0xe25e, 0xe25f, - 0xe260, 0xe261, 0xe262, 0xe263, 0xe264, 0xe265, 0xe266, 0xe267, - 0xe268, 0xe269, 0xe26a, 0xe26b, 0xe26c, 0xe26d, 0xe26e, 0xe26f, - 0xe270, 0xe271, 0xe272, 0xe273, 0xe274, 0xe275, 0xe276, 0xe277, - 0xe278, 0xe279, 0xe27a, 0xe27b, 0xe27c, 0xe27d, 0xe27e, 0xe27f, - 0xe280, 0xe281, 0xe282, 0xe283, 0xe284, 0xe285, 0xe286, 0xe287, - 0xe288, 0xe289, 0xe28a, 0xe28b, 0xe28c, 0xe28d, 0xe28e, 0xe28f, - 0xe290, 0xe291, 0xe292, 0xe293, 0xe294, 0xe295, 0xe296, 0xe297, - 0xe298, 0xe299, 0xe29a, 0xe29b, 0xe29c, 0xe29d, 0xe29e, 0xe29f, - 0xe2a0, 0xe2a1, 0xe2a2, 0xe2a3, 0xe2a4, 0xe2a5, 0xe2a6, 0xe2a7, - 0xe2a8, 0xe2a9, 0xe2aa, 0xe2ab, 0xe2ac, 0xe2ad, 0xe2ae, 0xe2af, - 0xe2b0, 0xe2b1, 0xe2b2, 0xe2b3, 0xe2b4, 0xe2b5, 0xe2b6, 0xe2b7, - 0xe2b8, 0xe2b9, 0xe2ba, 0xe2bb, 0xe2bc, 0xe2bd, 0xe2be, 0xe2bf, - 0xe2c0, 0xe2c1, 0xe2c2, 0xe2c3, 0xe2c4, 0xe2c5, 0xe2c6, 0xe2c7, - 0xe2c8, 0xe2c9, 0xe2ca, 0xe2cb, 0xe2cc, 0xe2cd, 0xe2ce, 0xe2cf, - 0xe2d0, 0xe2d1, 0xe2d2, 0xe2d3, 0xe2d4, 0xe2d5, 0xe2d6, 0xe2d7, - 0xe2d8, 0xe2d9, 0xe2da, 0xe2db, 0xe2dc, 0xe2dd, 0xe2de, 0xe2df, - 0xe2e0, 0xe2e1, 0xe2e2, 0xe2e3, 0xe2e4, 0xe2e5, 0xe2e6, 0xe2e7, - 0xe2e8, 0xe2e9, 0xe2ea, 0xe2eb, 0xe2ec, 0xe2ed, 0xe2ee, 0xe2ef, - 0xe2f0, 0xe2f1, 0xe2f2, 0xe2f3, 0xe2f4, 0xe2f5, 0xe2f6, 0xe2f7, - 0xe2f8, 0xe2f9, 0xe2fa, 0xe2fb, 0xe2fc, 0xe2fd, 0xe2fe, 0xe2ff, - 0xe300, 0xe301, 0xe302, 0xe303, 0xe304, 0xe305, 0xe306, 0xe307, - 0xe308, 0xe309, 0xe30a, 0xe30b, 0xe30c, 0xe30d, 0xe30e, 0xe30f, - 0xe310, 0xe311, 0xe312, 0xe313, 0xe314, 0xe315, 0xe316, 0xe317, - 0xe318, 0xe319, 0xe31a, 0xe31b, 0xe31c, 0xe31d, 0xe31e, 0xe31f, - 0xe320, 0xe321, 0xe322, 0xe323, 0xe324, 0xe325, 0xe326, 0xe327, - 0xe328, 0xe329, 0xe32a, 0xe32b, 0xe32c, 0xe32d, 0xe32e, 0xe32f, - 0xe330, 0xe331, 0xe332, 0xe333, 0xe334, 0xe335, 0xe336, 0xe337, - 0xe338, 0xe339, 0xe33a, 0xe33b, 0xe33c, 0xe33d, 0xe33e, 0xe33f, - 0xe340, 0xe341, 0xe342, 0xe343, 0xe344, 0xe345, 0xe346, 0xe347, - 0xe348, 0xe349, 0xe34a, 0xe34b, 0xe34c, 0xe34d, 0xe34e, 0xe34f, - 0xe350, 0xe351, 0xe352, 0xe353, 0xe354, 0xe355, 0xe356, 0xe357, - 0xe358, 0xe359, 0xe35a, 0xe35b, 0xe35c, 0xe35d, 0xe35e, 0xe35f, - 0xe360, 0xe361, 0xe362, 0xe363, 0xe364, 0xe365, 0xe366, 0xe367, - 0xe368, 0xe369, 0xe36a, 0xe36b, 0xe36c, 0xe36d, 0xe36e, 0xe36f, - 0xe370, 0xe371, 0xe372, 0xe373, 0xe374, 0xe375, 0xe376, 0xe377, - 0xe378, 0xe379, 0xe37a, 0xe37b, 0xe37c, 0xe37d, 0xe37e, 0xe37f, - 0xe380, 0xe381, 0xe382, 0xe383, 0xe384, 0xe385, 0xe386, 0xe387, - 0xe388, 0xe389, 0xe38a, 0xe38b, 0xe38c, 0xe38d, 0xe38e, 0xe38f, - 0xe390, 0xe391, 0xe392, 0xe393, 0xe394, 0xe395, 0xe396, 0xe397, - 0xe398, 0xe399, 0xe39a, 0xe39b, 0xe39c, 0xe39d, 0xe39e, 0xe39f, - 0xe3a0, 0xe3a1, 0xe3a2, 0xe3a3, 0xe3a4, 0xe3a5, 0xe3a6, 0xe3a7, - 0xe3a8, 0xe3a9, 0xe3aa, 0xe3ab, 0xe3ac, 0xe3ad, 0xe3ae, 0xe3af, - 0xe3b0, 0xe3b1, 0xe3b2, 0xe3b3, 0xe3b4, 0xe3b5, 0xe3b6, 0xe3b7, - 0xe3b8, 0xe3b9, 0xe3ba, 0xe3bb, 0xe3bc, 0xe3bd, 0xe3be, 0xe3bf, - 0xe3c0, 0xe3c1, 0xe3c2, 0xe3c3, 0xe3c4, 0xe3c5, 0xe3c6, 0xe3c7, - 0xe3c8, 0xe3c9, 0xe3ca, 0xe3cb, 0xe3cc, 0xe3cd, 0xe3ce, 0xe3cf, - 0xe3d0, 0xe3d1, 0xe3d2, 0xe3d3, 0xe3d4, 0xe3d5, 0xe3d6, 0xe3d7, - 0xe3d8, 0xe3d9, 0xe3da, 0xe3db, 0xe3dc, 0xe3dd, 0xe3de, 0xe3df, - 0xe3e0, 0xe3e1, 0xe3e2, 0xe3e3, 0xe3e4, 0xe3e5, 0xe3e6, 0xe3e7, - 0xe3e8, 0xe3e9, 0xe3ea, 0xe3eb, 0xe3ec, 0xe3ed, 0xe3ee, 0xe3ef, - 0xe3f0, 0xe3f1, 0xe3f2, 0xe3f3, 0xe3f4, 0xe3f5, 0xe3f6, 0xe3f7, - 0xe3f8, 0xe3f9, 0xe3fa, 0xe3fb, 0xe3fc, 0xe3fd, 0xe3fe, 0xe3ff, - 0xe400, 0xe401, 0xe402, 0xe403, 0xe404, 0xe405, 0xe406, 0xe407, - 0xe408, 0xe409, 0xe40a, 0xe40b, 0xe40c, 0xe40d, 0xe40e, 0xe40f, - 0xe410, 0xe411, 0xe412, 0xe413, 0xe414, 0xe415, 0xe416, 0xe417, - 0xe418, 0xe419, 0xe41a, 0xe41b, 0xe41c, 0xe41d, 0xe41e, 0xe41f, - 0xe420, 0xe421, 0xe422, 0xe423, 0xe424, 0xe425, 0xe426, 0xe427, - 0xe428, 0xe429, 0xe42a, 0xe42b, 0xe42c, 0xe42d, 0xe42e, 0xe42f, - 0xe430, 0xe431, 0xe432, 0xe433, 0xe434, 0xe435, 0xe436, 0xe437, - 0xe438, 0xe439, 0xe43a, 0xe43b, 0xe43c, 0xe43d, 0xe43e, 0xe43f, - 0xe440, 0xe441, 0xe442, 0xe443, 0xe444, 0xe445, 0xe446, 0xe447, - 0xe448, 0xe449, 0xe44a, 0xe44b, 0xe44c, 0xe44d, 0xe44e, 0xe44f, - 0xe450, 0xe451, 0xe452, 0xe453, 0xe454, 0xe455, 0xe456, 0xe457, - 0xe458, 0xe459, 0xe45a, 0xe45b, 0xe45c, 0xe45d, 0xe45e, 0xe45f, - 0xe460, 0xe461, 0xe462, 0xe463, 0xe464, 0xe465, 0xe466, 0xe467, - 0xe468, 0xe469, 0xe46a, 0xe46b, 0xe46c, 0xe46d, 0xe46e, 0xe46f, - 0xe470, 0xe471, 0xe472, 0xe473, 0xe474, 0xe475, 0xe476, 0xe477, - 0xe478, 0xe479, 0xe47a, 0xe47b, 0xe47c, 0xe47d, 0xe47e, 0xe47f, - 0xe480, 0xe481, 0xe482, 0xe483, 0xe484, 0xe485, 0xe486, 0xe487, - 0xe488, 0xe489, 0xe48a, 0xe48b, 0xe48c, 0xe48d, 0xe48e, 0xe48f, - 0xe490, 0xe491, 0xe492, 0xe493, 0xe494, 0xe495, 0xe496, 0xe497, - 0xe498, 0xe499, 0xe49a, 0xe49b, 0xe49c, 0xe49d, 0xe49e, 0xe49f, - 0xe4a0, 0xe4a1, 0xe4a2, 0xe4a3, 0xe4a4, 0xe4a5, 0xe4a6, 0xe4a7, - 0xe4a8, 0xe4a9, 0xe4aa, 0xe4ab, 0xe4ac, 0xe4ad, 0xe4ae, 0xe4af, - 0xe4b0, 0xe4b1, 0xe4b2, 0xe4b3, 0xe4b4, 0xe4b5, 0xe4b6, 0xe4b7, - 0xe4b8, 0xe4b9, 0xe4ba, 0xe4bb, 0xe4bc, 0xe4bd, 0xe4be, 0xe4bf, - 0xe4c0, 0xe4c1, 0xe4c2, 0xe4c3, 0xe4c4, 0xe4c5, 0xe4c6, 0xe4c7, - 0xe4c8, 0xe4c9, 0xe4ca, 0xe4cb, 0xe4cc, 0xe4cd, 0xe4ce, 0xe4cf, - 0xe4d0, 0xe4d1, 0xe4d2, 0xe4d3, 0xe4d4, 0xe4d5, 0xe4d6, 0xe4d7, - 0xe4d8, 0xe4d9, 0xe4da, 0xe4db, 0xe4dc, 0xe4dd, 0xe4de, 0xe4df, - 0xe4e0, 0xe4e1, 0xe4e2, 0xe4e3, 0xe4e4, 0xe4e5, 0xe4e6, 0xe4e7, - 0xe4e8, 0xe4e9, 0xe4ea, 0xe4eb, 0xe4ec, 0xe4ed, 0xe4ee, 0xe4ef, - 0xe4f0, 0xe4f1, 0xe4f2, 0xe4f3, 0xe4f4, 0xe4f5, 0xe4f6, 0xe4f7, - 0xe4f8, 0xe4f9, 0xe4fa, 0xe4fb, 0xe4fc, 0xe4fd, 0xe4fe, 0xe4ff, - 0xe500, 0xe501, 0xe502, 0xe503, 0xe504, 0xe505, 0xe506, 0xe507, - 0xe508, 0xe509, 0xe50a, 0xe50b, 0xe50c, 0xe50d, 0xe50e, 0xe50f, - 0xe510, 0xe511, 0xe512, 0xe513, 0xe514, 0xe515, 0xe516, 0xe517, - 0xe518, 0xe519, 0xe51a, 0xe51b, 0xe51c, 0xe51d, 0xe51e, 0xe51f, - 0xe520, 0xe521, 0xe522, 0xe523, 0xe524, 0xe525, 0xe526, 0xe527, - 0xe528, 0xe529, 0xe52a, 0xe52b, 0xe52c, 0xe52d, 0xe52e, 0xe52f, - 0xe530, 0xe531, 0xe532, 0xe533, 0xe534, 0xe535, 0xe536, 0xe537, - 0xe538, 0xe539, 0xe53a, 0xe53b, 0xe53c, 0xe53d, 0xe53e, 0xe53f, - 0xe540, 0xe541, 0xe542, 0xe543, 0xe544, 0xe545, 0xe546, 0xe547, - 0xe548, 0xe549, 0xe54a, 0xe54b, 0xe54c, 0xe54d, 0xe54e, 0xe54f, - 0xe550, 0xe551, 0xe552, 0xe553, 0xe554, 0xe555, 0xe556, 0xe557, - 0xe558, 0xe559, 0xe55a, 0xe55b, 0xe55c, 0xe55d, 0xe55e, 0xe55f, - 0xe560, 0xe561, 0xe562, 0xe563, 0xe564, 0xe565, 0xe566, 0xe567, - 0xe568, 0xe569, 0xe56a, 0xe56b, 0xe56c, 0xe56d, 0xe56e, 0xe56f, - 0xe570, 0xe571, 0xe572, 0xe573, 0xe574, 0xe575, 0xe576, 0xe577, - 0xe578, 0xe579, 0xe57a, 0xe57b, 0xe57c, 0xe57d, 0xe57e, 0xe57f, - 0xe580, 0xe581, 0xe582, 0xe583, 0xe584, 0xe585, 0xe586, 0xe587, - 0xe588, 0xe589, 0xe58a, 0xe58b, 0xe58c, 0xe58d, 0xe58e, 0xe58f, - 0xe590, 0xe591, 0xe592, 0xe593, 0xe594, 0xe595, 0xe596, 0xe597, - 0xe598, 0xe599, 0xe59a, 0xe59b, 0xe59c, 0xe59d, 0xe59e, 0xe59f, - 0xe5a0, 0xe5a1, 0xe5a2, 0xe5a3, 0xe5a4, 0xe5a5, 0xe5a6, 0xe5a7, - 0xe5a8, 0xe5a9, 0xe5aa, 0xe5ab, 0xe5ac, 0xe5ad, 0xe5ae, 0xe5af, - 0xe5b0, 0xe5b1, 0xe5b2, 0xe5b3, 0xe5b4, 0xe5b5, 0xe5b6, 0xe5b7, - 0xe5b8, 0xe5b9, 0xe5ba, 0xe5bb, 0xe5bc, 0xe5bd, 0xe5be, 0xe5bf, - 0xe5c0, 0xe5c1, 0xe5c2, 0xe5c3, 0xe5c4, 0xe5c5, 0xe5c6, 0xe5c7, - 0xe5c8, 0xe5c9, 0xe5ca, 0xe5cb, 0xe5cc, 0xe5cd, 0xe5ce, 0xe5cf, - 0xe5d0, 0xe5d1, 0xe5d2, 0xe5d3, 0xe5d4, 0xe5d5, 0xe5d6, 0xe5d7, - 0xe5d8, 0xe5d9, 0xe5da, 0xe5db, 0xe5dc, 0xe5dd, 0xe5de, 0xe5df, - 0xe5e0, 0xe5e1, 0xe5e2, 0xe5e3, 0xe5e4, 0xe5e5, 0xe5e6, 0xe5e7, - 0xe5e8, 0xe5e9, 0xe5ea, 0xe5eb, 0xe5ec, 0xe5ed, 0xe5ee, 0xe5ef, - 0xe5f0, 0xe5f1, 0xe5f2, 0xe5f3, 0xe5f4, 0xe5f5, 0xe5f6, 0xe5f7, - 0xe5f8, 0xe5f9, 0xe5fa, 0xe5fb, 0xe5fc, 0xe5fd, 0xe5fe, 0xe5ff, - 0xe600, 0xe601, 0xe602, 0xe603, 0xe604, 0xe605, 0xe606, 0xe607, - 0xe608, 0xe609, 0xe60a, 0xe60b, 0xe60c, 0xe60d, 0xe60e, 0xe60f, - 0xe610, 0xe611, 0xe612, 0xe613, 0xe614, 0xe615, 0xe616, 0xe617, - 0xe618, 0xe619, 0xe61a, 0xe61b, 0xe61c, 0xe61d, 0xe61e, 0xe61f, - 0xe620, 0xe621, 0xe622, 0xe623, 0xe624, 0xe625, 0xe626, 0xe627, - 0xe628, 0xe629, 0xe62a, 0xe62b, 0xe62c, 0xe62d, 0xe62e, 0xe62f, - 0xe630, 0xe631, 0xe632, 0xe633, 0xe634, 0xe635, 0xe636, 0xe637, - 0xe638, 0xe639, 0xe63a, 0xe63b, 0xe63c, 0xe63d, 0xe63e, 0xe63f, - 0xe640, 0xe641, 0xe642, 0xe643, 0xe644, 0xe645, 0xe646, 0xe647, - 0xe648, 0xe649, 0xe64a, 0xe64b, 0xe64c, 0xe64d, 0xe64e, 0xe64f, - 0xe650, 0xe651, 0xe652, 0xe653, 0xe654, 0xe655, 0xe656, 0xe657, - 0xe658, 0xe659, 0xe65a, 0xe65b, 0xe65c, 0xe65d, 0xe65e, 0xe65f, - 0xe660, 0xe661, 0xe662, 0xe663, 0xe664, 0xe665, 0xe666, 0xe667, - 0xe668, 0xe669, 0xe66a, 0xe66b, 0xe66c, 0xe66d, 0xe66e, 0xe66f, - 0xe670, 0xe671, 0xe672, 0xe673, 0xe674, 0xe675, 0xe676, 0xe677, - 0xe678, 0xe679, 0xe67a, 0xe67b, 0xe67c, 0xe67d, 0xe67e, 0xe67f, - 0xe680, 0xe681, 0xe682, 0xe683, 0xe684, 0xe685, 0xe686, 0xe687, - 0xe688, 0xe689, 0xe68a, 0xe68b, 0xe68c, 0xe68d, 0xe68e, 0xe68f, - 0xe690, 0xe691, 0xe692, 0xe693, 0xe694, 0xe695, 0xe696, 0xe697, - 0xe698, 0xe699, 0xe69a, 0xe69b, 0xe69c, 0xe69d, 0xe69e, 0xe69f, - 0xe6a0, 0xe6a1, 0xe6a2, 0xe6a3, 0xe6a4, 0xe6a5, 0xe6a6, 0xe6a7, - 0xe6a8, 0xe6a9, 0xe6aa, 0xe6ab, 0xe6ac, 0xe6ad, 0xe6ae, 0xe6af, - 0xe6b0, 0xe6b1, 0xe6b2, 0xe6b3, 0xe6b4, 0xe6b5, 0xe6b6, 0xe6b7, - 0xe6b8, 0xe6b9, 0xe6ba, 0xe6bb, 0xe6bc, 0xe6bd, 0xe6be, 0xe6bf, - 0xe6c0, 0xe6c1, 0xe6c2, 0xe6c3, 0xe6c4, 0xe6c5, 0xe6c6, 0xe6c7, - 0xe6c8, 0xe6c9, 0xe6ca, 0xe6cb, 0xe6cc, 0xe6cd, 0xe6ce, 0xe6cf, - 0xe6d0, 0xe6d1, 0xe6d2, 0xe6d3, 0xe6d4, 0xe6d5, 0xe6d6, 0xe6d7, - 0xe6d8, 0xe6d9, 0xe6da, 0xe6db, 0xe6dc, 0xe6dd, 0xe6de, 0xe6df, - 0xe6e0, 0xe6e1, 0xe6e2, 0xe6e3, 0xe6e4, 0xe6e5, 0xe6e6, 0xe6e7, - 0xe6e8, 0xe6e9, 0xe6ea, 0xe6eb, 0xe6ec, 0xe6ed, 0xe6ee, 0xe6ef, - 0xe6f0, 0xe6f1, 0xe6f2, 0xe6f3, 0xe6f4, 0xe6f5, 0xe6f6, 0xe6f7, - 0xe6f8, 0xe6f9, 0xe6fa, 0xe6fb, 0xe6fc, 0xe6fd, 0xe6fe, 0xe6ff, - 0xe700, 0xe701, 0xe702, 0xe703, 0xe704, 0xe705, 0xe706, 0xe707, - 0xe708, 0xe709, 0xe70a, 0xe70b, 0xe70c, 0xe70d, 0xe70e, 0xe70f, - 0xe710, 0xe711, 0xe712, 0xe713, 0xe714, 0xe715, 0xe716, 0xe717, - 0xe718, 0xe719, 0xe71a, 0xe71b, 0xe71c, 0xe71d, 0xe71e, 0xe71f, - 0xe720, 0xe721, 0xe722, 0xe723, 0xe724, 0xe725, 0xe726, 0xe727, - 0xe728, 0xe729, 0xe72a, 0xe72b, 0xe72c, 0xe72d, 0xe72e, 0xe72f, - 0xe730, 0xe731, 0xe732, 0xe733, 0xe734, 0xe735, 0xe736, 0xe737, - 0xe738, 0xe739, 0xe73a, 0xe73b, 0xe73c, 0xe73d, 0xe73e, 0xe73f, - 0xe740, 0xe741, 0xe742, 0xe743, 0xe744, 0xe745, 0xe746, 0xe747, - 0xe748, 0xe749, 0xe74a, 0xe74b, 0xe74c, 0xe74d, 0xe74e, 0xe74f, - 0xe750, 0xe751, 0xe752, 0xe753, 0xe754, 0xe755, 0xe756, 0xe757, - 0xe758, 0xe759, 0xe75a, 0xe75b, 0xe75c, 0xe75d, 0xe75e, 0xe75f, - 0xe760, 0xe761, 0xe762, 0xe763, 0xe764, 0xe765, 0xe766, 0xe767, - 0xe768, 0xe769, 0xe76a, 0xe76b, 0xe76c, 0xe76d, 0xe76e, 0xe76f, - 0xe770, 0xe771, 0xe772, 0xe773, 0xe774, 0xe775, 0xe776, 0xe777, - 0xe778, 0xe779, 0xe77a, 0xe77b, 0xe77c, 0xe77d, 0xe77e, 0xe77f, - 0xe780, 0xe781, 0xe782, 0xe783, 0xe784, 0xe785, 0xe786, 0xe787, - 0xe788, 0xe789, 0xe78a, 0xe78b, 0xe78c, 0xe78d, 0xe78e, 0xe78f, - 0xe790, 0xe791, 0xe792, 0xe793, 0xe794, 0xe795, 0xe796, 0xe797, - 0xe798, 0xe799, 0xe79a, 0xe79b, 0xe79c, 0xe79d, 0xe79e, 0xe79f, - 0xe7a0, 0xe7a1, 0xe7a2, 0xe7a3, 0xe7a4, 0xe7a5, 0xe7a6, 0xe7a7, - 0xe7a8, 0xe7a9, 0xe7aa, 0xe7ab, 0xe7ac, 0xe7ad, 0xe7ae, 0xe7af, - 0xe7b0, 0xe7b1, 0xe7b2, 0xe7b3, 0xe7b4, 0xe7b5, 0xe7b6, 0xe7b7, - 0xe7b8, 0xe7b9, 0xe7ba, 0xe7bb, 0xe7bc, 0xe7bd, 0xe7be, 0xe7bf, - 0xe7c0, 0xe7c1, 0xe7c2, 0xe7c3, 0xe7c4, 0xe7c5, 0xe7c6, 0xe7c7, - 0xe7c8, 0xe7c9, 0xe7ca, 0xe7cb, 0xe7cc, 0xe7cd, 0xe7ce, 0xe7cf, - 0xe7d0, 0xe7d1, 0xe7d2, 0xe7d3, 0xe7d4, 0xe7d5, 0xe7d6, 0xe7d7, - 0xe7d8, 0xe7d9, 0xe7da, 0xe7db, 0xe7dc, 0xe7dd, 0xe7de, 0xe7df, - 0xe7e0, 0xe7e1, 0xe7e2, 0xe7e3, 0xe7e4, 0xe7e5, 0xe7e6, 0xe7e7, - 0xe7e8, 0xe7e9, 0xe7ea, 0xe7eb, 0xe7ec, 0xe7ed, 0xe7ee, 0xe7ef, - 0xe7f0, 0xe7f1, 0xe7f2, 0xe7f3, 0xe7f4, 0xe7f5, 0xe7f6, 0xe7f7, - 0xe7f8, 0xe7f9, 0xe7fa, 0xe7fb, 0xe7fc, 0xe7fd, 0xe7fe, 0xe7ff, - 0xe800, 0xe801, 0xe802, 0xe803, 0xe804, 0xe805, 0xe806, 0xe807, - 0xe808, 0xe809, 0xe80a, 0xe80b, 0xe80c, 0xe80d, 0xe80e, 0xe80f, - 0xe810, 0xe811, 0xe812, 0xe813, 0xe814, 0xe815, 0xe816, 0xe817, - 0xe818, 0xe819, 0xe81a, 0xe81b, 0xe81c, 0xe81d, 0xe81e, 0xe81f, - 0xe820, 0xe821, 0xe822, 0xe823, 0xe824, 0xe825, 0xe826, 0xe827, - 0xe828, 0xe829, 0xe82a, 0xe82b, 0xe82c, 0xe82d, 0xe82e, 0xe82f, - 0xe830, 0xe831, 0xe832, 0xe833, 0xe834, 0xe835, 0xe836, 0xe837, - 0xe838, 0xe839, 0xe83a, 0xe83b, 0xe83c, 0xe83d, 0xe83e, 0xe83f, - 0xe840, 0xe841, 0xe842, 0xe843, 0xe844, 0xe845, 0xe846, 0xe847, - 0xe848, 0xe849, 0xe84a, 0xe84b, 0xe84c, 0xe84d, 0xe84e, 0xe84f, - 0xe850, 0xe851, 0xe852, 0xe853, 0xe854, 0xe855, 0xe856, 0xe857, - 0xe858, 0xe859, 0xe85a, 0xe85b, 0xe85c, 0xe85d, 0xe85e, 0xe85f, - 0xe860, 0xe861, 0xe862, 0xe863, 0xe864, 0xe865, 0xe866, 0xe867, - 0xe868, 0xe869, 0xe86a, 0xe86b, 0xe86c, 0xe86d, 0xe86e, 0xe86f, - 0xe870, 0xe871, 0xe872, 0xe873, 0xe874, 0xe875, 0xe876, 0xe877, - 0xe878, 0xe879, 0xe87a, 0xe87b, 0xe87c, 0xe87d, 0xe87e, 0xe87f, - 0xe880, 0xe881, 0xe882, 0xe883, 0xe884, 0xe885, 0xe886, 0xe887, - 0xe888, 0xe889, 0xe88a, 0xe88b, 0xe88c, 0xe88d, 0xe88e, 0xe88f, - 0xe890, 0xe891, 0xe892, 0xe893, 0xe894, 0xe895, 0xe896, 0xe897, - 0xe898, 0xe899, 0xe89a, 0xe89b, 0xe89c, 0xe89d, 0xe89e, 0xe89f, - 0xe8a0, 0xe8a1, 0xe8a2, 0xe8a3, 0xe8a4, 0xe8a5, 0xe8a6, 0xe8a7, - 0xe8a8, 0xe8a9, 0xe8aa, 0xe8ab, 0xe8ac, 0xe8ad, 0xe8ae, 0xe8af, - 0xe8b0, 0xe8b1, 0xe8b2, 0xe8b3, 0xe8b4, 0xe8b5, 0xe8b6, 0xe8b7, - 0xe8b8, 0xe8b9, 0xe8ba, 0xe8bb, 0xe8bc, 0xe8bd, 0xe8be, 0xe8bf, - 0xe8c0, 0xe8c1, 0xe8c2, 0xe8c3, 0xe8c4, 0xe8c5, 0xe8c6, 0xe8c7, - 0xe8c8, 0xe8c9, 0xe8ca, 0xe8cb, 0xe8cc, 0xe8cd, 0xe8ce, 0xe8cf, - 0xe8d0, 0xe8d1, 0xe8d2, 0xe8d3, 0xe8d4, 0xe8d5, 0xe8d6, 0xe8d7, - 0xe8d8, 0xe8d9, 0xe8da, 0xe8db, 0xe8dc, 0xe8dd, 0xe8de, 0xe8df, - 0xe8e0, 0xe8e1, 0xe8e2, 0xe8e3, 0xe8e4, 0xe8e5, 0xe8e6, 0xe8e7, - 0xe8e8, 0xe8e9, 0xe8ea, 0xe8eb, 0xe8ec, 0xe8ed, 0xe8ee, 0xe8ef, - 0xe8f0, 0xe8f1, 0xe8f2, 0xe8f3, 0xe8f4, 0xe8f5, 0xe8f6, 0xe8f7, - 0xe8f8, 0xe8f9, 0xe8fa, 0xe8fb, 0xe8fc, 0xe8fd, 0xe8fe, 0xe8ff, - 0xe900, 0xe901, 0xe902, 0xe903, 0xe904, 0xe905, 0xe906, 0xe907, - 0xe908, 0xe909, 0xe90a, 0xe90b, 0xe90c, 0xe90d, 0xe90e, 0xe90f, - 0xe910, 0xe911, 0xe912, 0xe913, 0xe914, 0xe915, 0xe916, 0xe917, - 0xe918, 0xe919, 0xe91a, 0xe91b, 0xe91c, 0xe91d, 0xe91e, 0xe91f, - 0xe920, 0xe921, 0xe922, 0xe923, 0xe924, 0xe925, 0xe926, 0xe927, - 0xe928, 0xe929, 0xe92a, 0xe92b, 0xe92c, 0xe92d, 0xe92e, 0xe92f, - 0xe930, 0xe931, 0xe932, 0xe933, 0xe934, 0xe935, 0xe936, 0xe937, - 0xe938, 0xe939, 0xe93a, 0xe93b, 0xe93c, 0xe93d, 0xe93e, 0xe93f, - 0xe940, 0xe941, 0xe942, 0xe943, 0xe944, 0xe945, 0xe946, 0xe947, - 0xe948, 0xe949, 0xe94a, 0xe94b, 0xe94c, 0xe94d, 0xe94e, 0xe94f, - 0xe950, 0xe951, 0xe952, 0xe953, 0xe954, 0xe955, 0xe956, 0xe957, - 0xe958, 0xe959, 0xe95a, 0xe95b, 0xe95c, 0xe95d, 0xe95e, 0xe95f, - 0xe960, 0xe961, 0xe962, 0xe963, 0xe964, 0xe965, 0xe966, 0xe967, - 0xe968, 0xe969, 0xe96a, 0xe96b, 0xe96c, 0xe96d, 0xe96e, 0xe96f, - 0xe970, 0xe971, 0xe972, 0xe973, 0xe974, 0xe975, 0xe976, 0xe977, - 0xe978, 0xe979, 0xe97a, 0xe97b, 0xe97c, 0xe97d, 0xe97e, 0xe97f, - 0xe980, 0xe981, 0xe982, 0xe983, 0xe984, 0xe985, 0xe986, 0xe987, - 0xe988, 0xe989, 0xe98a, 0xe98b, 0xe98c, 0xe98d, 0xe98e, 0xe98f, - 0xe990, 0xe991, 0xe992, 0xe993, 0xe994, 0xe995, 0xe996, 0xe997, - 0xe998, 0xe999, 0xe99a, 0xe99b, 0xe99c, 0xe99d, 0xe99e, 0xe99f, - 0xe9a0, 0xe9a1, 0xe9a2, 0xe9a3, 0xe9a4, 0xe9a5, 0xe9a6, 0xe9a7, - 0xe9a8, 0xe9a9, 0xe9aa, 0xe9ab, 0xe9ac, 0xe9ad, 0xe9ae, 0xe9af, - 0xe9b0, 0xe9b1, 0xe9b2, 0xe9b3, 0xe9b4, 0xe9b5, 0xe9b6, 0xe9b7, - 0xe9b8, 0xe9b9, 0xe9ba, 0xe9bb, 0xe9bc, 0xe9bd, 0xe9be, 0xe9bf, - 0xe9c0, 0xe9c1, 0xe9c2, 0xe9c3, 0xe9c4, 0xe9c5, 0xe9c6, 0xe9c7, - 0xe9c8, 0xe9c9, 0xe9ca, 0xe9cb, 0xe9cc, 0xe9cd, 0xe9ce, 0xe9cf, - 0xe9d0, 0xe9d1, 0xe9d2, 0xe9d3, 0xe9d4, 0xe9d5, 0xe9d6, 0xe9d7, - 0xe9d8, 0xe9d9, 0xe9da, 0xe9db, 0xe9dc, 0xe9dd, 0xe9de, 0xe9df, - 0xe9e0, 0xe9e1, 0xe9e2, 0xe9e3, 0xe9e4, 0xe9e5, 0xe9e6, 0xe9e7, - 0xe9e8, 0xe9e9, 0xe9ea, 0xe9eb, 0xe9ec, 0xe9ed, 0xe9ee, 0xe9ef, - 0xe9f0, 0xe9f1, 0xe9f2, 0xe9f3, 0xe9f4, 0xe9f5, 0xe9f6, 0xe9f7, - 0xe9f8, 0xe9f9, 0xe9fa, 0xe9fb, 0xe9fc, 0xe9fd, 0xe9fe, 0xe9ff, - 0xea00, 0xea01, 0xea02, 0xea03, 0xea04, 0xea05, 0xea06, 0xea07, - 0xea08, 0xea09, 0xea0a, 0xea0b, 0xea0c, 0xea0d, 0xea0e, 0xea0f, - 0xea10, 0xea11, 0xea12, 0xea13, 0xea14, 0xea15, 0xea16, 0xea17, - 0xea18, 0xea19, 0xea1a, 0xea1b, 0xea1c, 0xea1d, 0xea1e, 0xea1f, - 0xea20, 0xea21, 0xea22, 0xea23, 0xea24, 0xea25, 0xea26, 0xea27, - 0xea28, 0xea29, 0xea2a, 0xea2b, 0xea2c, 0xea2d, 0xea2e, 0xea2f, - 0xea30, 0xea31, 0xea32, 0xea33, 0xea34, 0xea35, 0xea36, 0xea37, - 0xea38, 0xea39, 0xea3a, 0xea3b, 0xea3c, 0xea3d, 0xea3e, 0xea3f, - 0xea40, 0xea41, 0xea42, 0xea43, 0xea44, 0xea45, 0xea46, 0xea47, - 0xea48, 0xea49, 0xea4a, 0xea4b, 0xea4c, 0xea4d, 0xea4e, 0xea4f, - 0xea50, 0xea51, 0xea52, 0xea53, 0xea54, 0xea55, 0xea56, 0xea57, - 0xea58, 0xea59, 0xea5a, 0xea5b, 0xea5c, 0xea5d, 0xea5e, 0xea5f, - 0xea60, 0xea61, 0xea62, 0xea63, 0xea64, 0xea65, 0xea66, 0xea67, - 0xea68, 0xea69, 0xea6a, 0xea6b, 0xea6c, 0xea6d, 0xea6e, 0xea6f, - 0xea70, 0xea71, 0xea72, 0xea73, 0xea74, 0xea75, 0xea76, 0xea77, - 0xea78, 0xea79, 0xea7a, 0xea7b, 0xea7c, 0xea7d, 0xea7e, 0xea7f, - 0xea80, 0xea81, 0xea82, 0xea83, 0xea84, 0xea85, 0xea86, 0xea87, - 0xea88, 0xea89, 0xea8a, 0xea8b, 0xea8c, 0xea8d, 0xea8e, 0xea8f, - 0xea90, 0xea91, 0xea92, 0xea93, 0xea94, 0xea95, 0xea96, 0xea97, - 0xea98, 0xea99, 0xea9a, 0xea9b, 0xea9c, 0xea9d, 0xea9e, 0xea9f, - 0xeaa0, 0xeaa1, 0xeaa2, 0xeaa3, 0xeaa4, 0xeaa5, 0xeaa6, 0xeaa7, - 0xeaa8, 0xeaa9, 0xeaaa, 0xeaab, 0xeaac, 0xeaad, 0xeaae, 0xeaaf, - 0xeab0, 0xeab1, 0xeab2, 0xeab3, 0xeab4, 0xeab5, 0xeab6, 0xeab7, - 0xeab8, 0xeab9, 0xeaba, 0xeabb, 0xeabc, 0xeabd, 0xeabe, 0xeabf, - 0xeac0, 0xeac1, 0xeac2, 0xeac3, 0xeac4, 0xeac5, 0xeac6, 0xeac7, - 0xeac8, 0xeac9, 0xeaca, 0xeacb, 0xeacc, 0xeacd, 0xeace, 0xeacf, - 0xead0, 0xead1, 0xead2, 0xead3, 0xead4, 0xead5, 0xead6, 0xead7, - 0xead8, 0xead9, 0xeada, 0xeadb, 0xeadc, 0xeadd, 0xeade, 0xeadf, - 0xeae0, 0xeae1, 0xeae2, 0xeae3, 0xeae4, 0xeae5, 0xeae6, 0xeae7, - 0xeae8, 0xeae9, 0xeaea, 0xeaeb, 0xeaec, 0xeaed, 0xeaee, 0xeaef, - 0xeaf0, 0xeaf1, 0xeaf2, 0xeaf3, 0xeaf4, 0xeaf5, 0xeaf6, 0xeaf7, - 0xeaf8, 0xeaf9, 0xeafa, 0xeafb, 0xeafc, 0xeafd, 0xeafe, 0xeaff, - 0xeb00, 0xeb01, 0xeb02, 0xeb03, 0xeb04, 0xeb05, 0xeb06, 0xeb07, - 0xeb08, 0xeb09, 0xeb0a, 0xeb0b, 0xeb0c, 0xeb0d, 0xeb0e, 0xeb0f, - 0xeb10, 0xeb11, 0xeb12, 0xeb13, 0xeb14, 0xeb15, 0xeb16, 0xeb17, - 0xeb18, 0xeb19, 0xeb1a, 0xeb1b, 0xeb1c, 0xeb1d, 0xeb1e, 0xeb1f, - 0xeb20, 0xeb21, 0xeb22, 0xeb23, 0xeb24, 0xeb25, 0xeb26, 0xeb27, - 0xeb28, 0xeb29, 0xeb2a, 0xeb2b, 0xeb2c, 0xeb2d, 0xeb2e, 0xeb2f, - 0xeb30, 0xeb31, 0xeb32, 0xeb33, 0xeb34, 0xeb35, 0xeb36, 0xeb37, - 0xeb38, 0xeb39, 0xeb3a, 0xeb3b, 0xeb3c, 0xeb3d, 0xeb3e, 0xeb3f, - 0xeb40, 0xeb41, 0xeb42, 0xeb43, 0xeb44, 0xeb45, 0xeb46, 0xeb47, - 0xeb48, 0xeb49, 0xeb4a, 0xeb4b, 0xeb4c, 0xeb4d, 0xeb4e, 0xeb4f, - 0xeb50, 0xeb51, 0xeb52, 0xeb53, 0xeb54, 0xeb55, 0xeb56, 0xeb57, - 0xeb58, 0xeb59, 0xeb5a, 0xeb5b, 0xeb5c, 0xeb5d, 0xeb5e, 0xeb5f, - 0xeb60, 0xeb61, 0xeb62, 0xeb63, 0xeb64, 0xeb65, 0xeb66, 0xeb67, - 0xeb68, 0xeb69, 0xeb6a, 0xeb6b, 0xeb6c, 0xeb6d, 0xeb6e, 0xeb6f, - 0xeb70, 0xeb71, 0xeb72, 0xeb73, 0xeb74, 0xeb75, 0xeb76, 0xeb77, - 0xeb78, 0xeb79, 0xeb7a, 0xeb7b, 0xeb7c, 0xeb7d, 0xeb7e, 0xeb7f, - 0xeb80, 0xeb81, 0xeb82, 0xeb83, 0xeb84, 0xeb85, 0xeb86, 0xeb87, - 0xeb88, 0xeb89, 0xeb8a, 0xeb8b, 0xeb8c, 0xeb8d, 0xeb8e, 0xeb8f, - 0xeb90, 0xeb91, 0xeb92, 0xeb93, 0xeb94, 0xeb95, 0xeb96, 0xeb97, - 0xeb98, 0xeb99, 0xeb9a, 0xeb9b, 0xeb9c, 0xeb9d, 0xeb9e, 0xeb9f, - 0xeba0, 0xeba1, 0xeba2, 0xeba3, 0xeba4, 0xeba5, 0xeba6, 0xeba7, - 0xeba8, 0xeba9, 0xebaa, 0xebab, 0xebac, 0xebad, 0xebae, 0xebaf, - 0xebb0, 0xebb1, 0xebb2, 0xebb3, 0xebb4, 0xebb5, 0xebb6, 0xebb7, - 0xebb8, 0xebb9, 0xebba, 0xebbb, 0xebbc, 0xebbd, 0xebbe, 0xebbf, - 0xebc0, 0xebc1, 0xebc2, 0xebc3, 0xebc4, 0xebc5, 0xebc6, 0xebc7, - 0xebc8, 0xebc9, 0xebca, 0xebcb, 0xebcc, 0xebcd, 0xebce, 0xebcf, - 0xebd0, 0xebd1, 0xebd2, 0xebd3, 0xebd4, 0xebd5, 0xebd6, 0xebd7, - 0xebd8, 0xebd9, 0xebda, 0xebdb, 0xebdc, 0xebdd, 0xebde, 0xebdf, - 0xebe0, 0xebe1, 0xebe2, 0xebe3, 0xebe4, 0xebe5, 0xebe6, 0xebe7, - 0xebe8, 0xebe9, 0xebea, 0xebeb, 0xebec, 0xebed, 0xebee, 0xebef, - 0xebf0, 0xebf1, 0xebf2, 0xebf3, 0xebf4, 0xebf5, 0xebf6, 0xebf7, - 0xebf8, 0xebf9, 0xebfa, 0xebfb, 0xebfc, 0xebfd, 0xebfe, 0xebff, - 0xec00, 0xec01, 0xec02, 0xec03, 0xec04, 0xec05, 0xec06, 0xec07, - 0xec08, 0xec09, 0xec0a, 0xec0b, 0xec0c, 0xec0d, 0xec0e, 0xec0f, - 0xec10, 0xec11, 0xec12, 0xec13, 0xec14, 0xec15, 0xec16, 0xec17, - 0xec18, 0xec19, 0xec1a, 0xec1b, 0xec1c, 0xec1d, 0xec1e, 0xec1f, - 0xec20, 0xec21, 0xec22, 0xec23, 0xec24, 0xec25, 0xec26, 0xec27, - 0xec28, 0xec29, 0xec2a, 0xec2b, 0xec2c, 0xec2d, 0xec2e, 0xec2f, - 0xec30, 0xec31, 0xec32, 0xec33, 0xec34, 0xec35, 0xec36, 0xec37, - 0xec38, 0xec39, 0xec3a, 0xec3b, 0xec3c, 0xec3d, 0xec3e, 0xec3f, - 0xec40, 0xec41, 0xec42, 0xec43, 0xec44, 0xec45, 0xec46, 0xec47, - 0xec48, 0xec49, 0xec4a, 0xec4b, 0xec4c, 0xec4d, 0xec4e, 0xec4f, - 0xec50, 0xec51, 0xec52, 0xec53, 0xec54, 0xec55, 0xec56, 0xec57, - 0xec58, 0xec59, 0xec5a, 0xec5b, 0xec5c, 0xec5d, 0xec5e, 0xec5f, - 0xec60, 0xec61, 0xec62, 0xec63, 0xec64, 0xec65, 0xec66, 0xec67, - 0xec68, 0xec69, 0xec6a, 0xec6b, 0xec6c, 0xec6d, 0xec6e, 0xec6f, - 0xec70, 0xec71, 0xec72, 0xec73, 0xec74, 0xec75, 0xec76, 0xec77, - 0xec78, 0xec79, 0xec7a, 0xec7b, 0xec7c, 0xec7d, 0xec7e, 0xec7f, - 0xec80, 0xec81, 0xec82, 0xec83, 0xec84, 0xec85, 0xec86, 0xec87, - 0xec88, 0xec89, 0xec8a, 0xec8b, 0xec8c, 0xec8d, 0xec8e, 0xec8f, - 0xec90, 0xec91, 0xec92, 0xec93, 0xec94, 0xec95, 0xec96, 0xec97, - 0xec98, 0xec99, 0xec9a, 0xec9b, 0xec9c, 0xec9d, 0xec9e, 0xec9f, - 0xeca0, 0xeca1, 0xeca2, 0xeca3, 0xeca4, 0xeca5, 0xeca6, 0xeca7, - 0xeca8, 0xeca9, 0xecaa, 0xecab, 0xecac, 0xecad, 0xecae, 0xecaf, - 0xecb0, 0xecb1, 0xecb2, 0xecb3, 0xecb4, 0xecb5, 0xecb6, 0xecb7, - 0xecb8, 0xecb9, 0xecba, 0xecbb, 0xecbc, 0xecbd, 0xecbe, 0xecbf, - 0xecc0, 0xecc1, 0xecc2, 0xecc3, 0xecc4, 0xecc5, 0xecc6, 0xecc7, - 0xecc8, 0xecc9, 0xecca, 0xeccb, 0xeccc, 0xeccd, 0xecce, 0xeccf, - 0xecd0, 0xecd1, 0xecd2, 0xecd3, 0xecd4, 0xecd5, 0xecd6, 0xecd7, - 0xecd8, 0xecd9, 0xecda, 0xecdb, 0xecdc, 0xecdd, 0xecde, 0xecdf, - 0xece0, 0xece1, 0xece2, 0xece3, 0xece4, 0xece5, 0xece6, 0xece7, - 0xece8, 0xece9, 0xecea, 0xeceb, 0xecec, 0xeced, 0xecee, 0xecef, - 0xecf0, 0xecf1, 0xecf2, 0xecf3, 0xecf4, 0xecf5, 0xecf6, 0xecf7, - 0xecf8, 0xecf9, 0xecfa, 0xecfb, 0xecfc, 0xecfd, 0xecfe, 0xecff, - 0xed00, 0xed01, 0xed02, 0xed03, 0xed04, 0xed05, 0xed06, 0xed07, - 0xed08, 0xed09, 0xed0a, 0xed0b, 0xed0c, 0xed0d, 0xed0e, 0xed0f, - 0xed10, 0xed11, 0xed12, 0xed13, 0xed14, 0xed15, 0xed16, 0xed17, - 0xed18, 0xed19, 0xed1a, 0xed1b, 0xed1c, 0xed1d, 0xed1e, 0xed1f, - 0xed20, 0xed21, 0xed22, 0xed23, 0xed24, 0xed25, 0xed26, 0xed27, - 0xed28, 0xed29, 0xed2a, 0xed2b, 0xed2c, 0xed2d, 0xed2e, 0xed2f, - 0xed30, 0xed31, 0xed32, 0xed33, 0xed34, 0xed35, 0xed36, 0xed37, - 0xed38, 0xed39, 0xed3a, 0xed3b, 0xed3c, 0xed3d, 0xed3e, 0xed3f, - 0xed40, 0xed41, 0xed42, 0xed43, 0xed44, 0xed45, 0xed46, 0xed47, - 0xed48, 0xed49, 0xed4a, 0xed4b, 0xed4c, 0xed4d, 0xed4e, 0xed4f, - 0xed50, 0xed51, 0xed52, 0xed53, 0xed54, 0xed55, 0xed56, 0xed57, - 0xed58, 0xed59, 0xed5a, 0xed5b, 0xed5c, 0xed5d, 0xed5e, 0xed5f, - 0xed60, 0xed61, 0xed62, 0xed63, 0xed64, 0xed65, 0xed66, 0xed67, - 0xed68, 0xed69, 0xed6a, 0xed6b, 0xed6c, 0xed6d, 0xed6e, 0xed6f, - 0xed70, 0xed71, 0xed72, 0xed73, 0xed74, 0xed75, 0xed76, 0xed77, - 0xed78, 0xed79, 0xed7a, 0xed7b, 0xed7c, 0xed7d, 0xed7e, 0xed7f, - 0xed80, 0xed81, 0xed82, 0xed83, 0xed84, 0xed85, 0xed86, 0xed87, - 0xed88, 0xed89, 0xed8a, 0xed8b, 0xed8c, 0xed8d, 0xed8e, 0xed8f, - 0xed90, 0xed91, 0xed92, 0xed93, 0xed94, 0xed95, 0xed96, 0xed97, - 0xed98, 0xed99, 0xed9a, 0xed9b, 0xed9c, 0xed9d, 0xed9e, 0xed9f, - 0xeda0, 0xeda1, 0xeda2, 0xeda3, 0xeda4, 0xeda5, 0xeda6, 0xeda7, - 0xeda8, 0xeda9, 0xedaa, 0xedab, 0xedac, 0xedad, 0xedae, 0xedaf, - 0xedb0, 0xedb1, 0xedb2, 0xedb3, 0xedb4, 0xedb5, 0xedb6, 0xedb7, - 0xedb8, 0xedb9, 0xedba, 0xedbb, 0xedbc, 0xedbd, 0xedbe, 0xedbf, - 0xedc0, 0xedc1, 0xedc2, 0xedc3, 0xedc4, 0xedc5, 0xedc6, 0xedc7, - 0xedc8, 0xedc9, 0xedca, 0xedcb, 0xedcc, 0xedcd, 0xedce, 0xedcf, - 0xedd0, 0xedd1, 0xedd2, 0xedd3, 0xedd4, 0xedd5, 0xedd6, 0xedd7, - 0xedd8, 0xedd9, 0xedda, 0xeddb, 0xeddc, 0xeddd, 0xedde, 0xeddf, - 0xede0, 0xede1, 0xede2, 0xede3, 0xede4, 0xede5, 0xede6, 0xede7, - 0xede8, 0xede9, 0xedea, 0xedeb, 0xedec, 0xeded, 0xedee, 0xedef, - 0xedf0, 0xedf1, 0xedf2, 0xedf3, 0xedf4, 0xedf5, 0xedf6, 0xedf7, - 0xedf8, 0xedf9, 0xedfa, 0xedfb, 0xedfc, 0xedfd, 0xedfe, 0xedff, - 0xee00, 0xee01, 0xee02, 0xee03, 0xee04, 0xee05, 0xee06, 0xee07, - 0xee08, 0xee09, 0xee0a, 0xee0b, 0xee0c, 0xee0d, 0xee0e, 0xee0f, - 0xee10, 0xee11, 0xee12, 0xee13, 0xee14, 0xee15, 0xee16, 0xee17, - 0xee18, 0xee19, 0xee1a, 0xee1b, 0xee1c, 0xee1d, 0xee1e, 0xee1f, - 0xee20, 0xee21, 0xee22, 0xee23, 0xee24, 0xee25, 0xee26, 0xee27, - 0xee28, 0xee29, 0xee2a, 0xee2b, 0xee2c, 0xee2d, 0xee2e, 0xee2f, - 0xee30, 0xee31, 0xee32, 0xee33, 0xee34, 0xee35, 0xee36, 0xee37, - 0xee38, 0xee39, 0xee3a, 0xee3b, 0xee3c, 0xee3d, 0xee3e, 0xee3f, - 0xee40, 0xee41, 0xee42, 0xee43, 0xee44, 0xee45, 0xee46, 0xee47, - 0xee48, 0xee49, 0xee4a, 0xee4b, 0xee4c, 0xee4d, 0xee4e, 0xee4f, - 0xee50, 0xee51, 0xee52, 0xee53, 0xee54, 0xee55, 0xee56, 0xee57, - 0xee58, 0xee59, 0xee5a, 0xee5b, 0xee5c, 0xee5d, 0xee5e, 0xee5f, - 0xee60, 0xee61, 0xee62, 0xee63, 0xee64, 0xee65, 0xee66, 0xee67, - 0xee68, 0xee69, 0xee6a, 0xee6b, 0xee6c, 0xee6d, 0xee6e, 0xee6f, - 0xee70, 0xee71, 0xee72, 0xee73, 0xee74, 0xee75, 0xee76, 0xee77, - 0xee78, 0xee79, 0xee7a, 0xee7b, 0xee7c, 0xee7d, 0xee7e, 0xee7f, - 0xee80, 0xee81, 0xee82, 0xee83, 0xee84, 0xee85, 0xee86, 0xee87, - 0xee88, 0xee89, 0xee8a, 0xee8b, 0xee8c, 0xee8d, 0xee8e, 0xee8f, - 0xee90, 0xee91, 0xee92, 0xee93, 0xee94, 0xee95, 0xee96, 0xee97, - 0xee98, 0xee99, 0xee9a, 0xee9b, 0xee9c, 0xee9d, 0xee9e, 0xee9f, - 0xeea0, 0xeea1, 0xeea2, 0xeea3, 0xeea4, 0xeea5, 0xeea6, 0xeea7, - 0xeea8, 0xeea9, 0xeeaa, 0xeeab, 0xeeac, 0xeead, 0xeeae, 0xeeaf, - 0xeeb0, 0xeeb1, 0xeeb2, 0xeeb3, 0xeeb4, 0xeeb5, 0xeeb6, 0xeeb7, - 0xeeb8, 0xeeb9, 0xeeba, 0xeebb, 0xeebc, 0xeebd, 0xeebe, 0xeebf, - 0xeec0, 0xeec1, 0xeec2, 0xeec3, 0xeec4, 0xeec5, 0xeec6, 0xeec7, - 0xeec8, 0xeec9, 0xeeca, 0xeecb, 0xeecc, 0xeecd, 0xeece, 0xeecf, - 0xeed0, 0xeed1, 0xeed2, 0xeed3, 0xeed4, 0xeed5, 0xeed6, 0xeed7, - 0xeed8, 0xeed9, 0xeeda, 0xeedb, 0xeedc, 0xeedd, 0xeede, 0xeedf, - 0xeee0, 0xeee1, 0xeee2, 0xeee3, 0xeee4, 0xeee5, 0xeee6, 0xeee7, - 0xeee8, 0xeee9, 0xeeea, 0xeeeb, 0xeeec, 0xeeed, 0xeeee, 0xeeef, - 0xeef0, 0xeef1, 0xeef2, 0xeef3, 0xeef4, 0xeef5, 0xeef6, 0xeef7, - 0xeef8, 0xeef9, 0xeefa, 0xeefb, 0xeefc, 0xeefd, 0xeefe, 0xeeff, - 0xef00, 0xef01, 0xef02, 0xef03, 0xef04, 0xef05, 0xef06, 0xef07, - 0xef08, 0xef09, 0xef0a, 0xef0b, 0xef0c, 0xef0d, 0xef0e, 0xef0f, - 0xef10, 0xef11, 0xef12, 0xef13, 0xef14, 0xef15, 0xef16, 0xef17, - 0xef18, 0xef19, 0xef1a, 0xef1b, 0xef1c, 0xef1d, 0xef1e, 0xef1f, - 0xef20, 0xef21, 0xef22, 0xef23, 0xef24, 0xef25, 0xef26, 0xef27, - 0xef28, 0xef29, 0xef2a, 0xef2b, 0xef2c, 0xef2d, 0xef2e, 0xef2f, - 0xef30, 0xef31, 0xef32, 0xef33, 0xef34, 0xef35, 0xef36, 0xef37, - 0xef38, 0xef39, 0xef3a, 0xef3b, 0xef3c, 0xef3d, 0xef3e, 0xef3f, - 0xef40, 0xef41, 0xef42, 0xef43, 0xef44, 0xef45, 0xef46, 0xef47, - 0xef48, 0xef49, 0xef4a, 0xef4b, 0xef4c, 0xef4d, 0xef4e, 0xef4f, - 0xef50, 0xef51, 0xef52, 0xef53, 0xef54, 0xef55, 0xef56, 0xef57, - 0xef58, 0xef59, 0xef5a, 0xef5b, 0xef5c, 0xef5d, 0xef5e, 0xef5f, - 0xef60, 0xef61, 0xef62, 0xef63, 0xef64, 0xef65, 0xef66, 0xef67, - 0xef68, 0xef69, 0xef6a, 0xef6b, 0xef6c, 0xef6d, 0xef6e, 0xef6f, - 0xef70, 0xef71, 0xef72, 0xef73, 0xef74, 0xef75, 0xef76, 0xef77, - 0xef78, 0xef79, 0xef7a, 0xef7b, 0xef7c, 0xef7d, 0xef7e, 0xef7f, - 0xef80, 0xef81, 0xef82, 0xef83, 0xef84, 0xef85, 0xef86, 0xef87, - 0xef88, 0xef89, 0xef8a, 0xef8b, 0xef8c, 0xef8d, 0xef8e, 0xef8f, - 0xef90, 0xef91, 0xef92, 0xef93, 0xef94, 0xef95, 0xef96, 0xef97, - 0xef98, 0xef99, 0xef9a, 0xef9b, 0xef9c, 0xef9d, 0xef9e, 0xef9f, - 0xefa0, 0xefa1, 0xefa2, 0xefa3, 0xefa4, 0xefa5, 0xefa6, 0xefa7, - 0xefa8, 0xefa9, 0xefaa, 0xefab, 0xefac, 0xefad, 0xefae, 0xefaf, - 0xefb0, 0xefb1, 0xefb2, 0xefb3, 0xefb4, 0xefb5, 0xefb6, 0xefb7, - 0xefb8, 0xefb9, 0xefba, 0xefbb, 0xefbc, 0xefbd, 0xefbe, 0xefbf, - 0xefc0, 0xefc1, 0xefc2, 0xefc3, 0xefc4, 0xefc5, 0xefc6, 0xefc7, - 0xefc8, 0xefc9, 0xefca, 0xefcb, 0xefcc, 0xefcd, 0xefce, 0xefcf, - 0xefd0, 0xefd1, 0xefd2, 0xefd3, 0xefd4, 0xefd5, 0xefd6, 0xefd7, - 0xefd8, 0xefd9, 0xefda, 0xefdb, 0xefdc, 0xefdd, 0xefde, 0xefdf, - 0xefe0, 0xefe1, 0xefe2, 0xefe3, 0xefe4, 0xefe5, 0xefe6, 0xefe7, - 0xefe8, 0xefe9, 0xefea, 0xefeb, 0xefec, 0xefed, 0xefee, 0xefef, - 0xeff0, 0xeff1, 0xeff2, 0xeff3, 0xeff4, 0xeff5, 0xeff6, 0xeff7, - 0xeff8, 0xeff9, 0xeffa, 0xeffb, 0xeffc, 0xeffd, 0xeffe, 0xefff, - 0xf000, 0xf001, 0xf002, 0xf003, 0xf004, 0xf005, 0xf006, 0xf007, - 0xf008, 0xf009, 0xf00a, 0xf00b, 0xf00c, 0xf00d, 0xf00e, 0xf00f, - 0xf010, 0xf011, 0xf012, 0xf013, 0xf014, 0xf015, 0xf016, 0xf017, - 0xf018, 0xf019, 0xf01a, 0xf01b, 0xf01c, 0xf01d, 0xf01e, 0xf01f, - 0xf020, 0xf021, 0xf022, 0xf023, 0xf024, 0xf025, 0xf026, 0xf027, - 0xf028, 0xf029, 0xf02a, 0xf02b, 0xf02c, 0xf02d, 0xf02e, 0xf02f, - 0xf030, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036, 0xf037, - 0xf038, 0xf039, 0xf03a, 0xf03b, 0xf03c, 0xf03d, 0xf03e, 0xf03f, - 0xf040, 0xf041, 0xf042, 0xf043, 0xf044, 0xf045, 0xf046, 0xf047, - 0xf048, 0xf049, 0xf04a, 0xf04b, 0xf04c, 0xf04d, 0xf04e, 0xf04f, - 0xf050, 0xf051, 0xf052, 0xf053, 0xf054, 0xf055, 0xf056, 0xf057, - 0xf058, 0xf059, 0xf05a, 0xf05b, 0xf05c, 0xf05d, 0xf05e, 0xf05f, - 0xf060, 0xf061, 0xf062, 0xf063, 0xf064, 0xf065, 0xf066, 0xf067, - 0xf068, 0xf069, 0xf06a, 0xf06b, 0xf06c, 0xf06d, 0xf06e, 0xf06f, - 0xf070, 0xf071, 0xf072, 0xf073, 0xf074, 0xf075, 0xf076, 0xf077, - 0xf078, 0xf079, 0xf07a, 0xf07b, 0xf07c, 0xf07d, 0xf07e, 0xf07f, - 0xf080, 0xf081, 0xf082, 0xf083, 0xf084, 0xf085, 0xf086, 0xf087, - 0xf088, 0xf089, 0xf08a, 0xf08b, 0xf08c, 0xf08d, 0xf08e, 0xf08f, - 0xf090, 0xf091, 0xf092, 0xf093, 0xf094, 0xf095, 0xf096, 0xf097, - 0xf098, 0xf099, 0xf09a, 0xf09b, 0xf09c, 0xf09d, 0xf09e, 0xf09f, - 0xf0a0, 0xf0a1, 0xf0a2, 0xf0a3, 0xf0a4, 0xf0a5, 0xf0a6, 0xf0a7, - 0xf0a8, 0xf0a9, 0xf0aa, 0xf0ab, 0xf0ac, 0xf0ad, 0xf0ae, 0xf0af, - 0xf0b0, 0xf0b1, 0xf0b2, 0xf0b3, 0xf0b4, 0xf0b5, 0xf0b6, 0xf0b7, - 0xf0b8, 0xf0b9, 0xf0ba, 0xf0bb, 0xf0bc, 0xf0bd, 0xf0be, 0xf0bf, - 0xf0c0, 0xf0c1, 0xf0c2, 0xf0c3, 0xf0c4, 0xf0c5, 0xf0c6, 0xf0c7, - 0xf0c8, 0xf0c9, 0xf0ca, 0xf0cb, 0xf0cc, 0xf0cd, 0xf0ce, 0xf0cf, - 0xf0d0, 0xf0d1, 0xf0d2, 0xf0d3, 0xf0d4, 0xf0d5, 0xf0d6, 0xf0d7, - 0xf0d8, 0xf0d9, 0xf0da, 0xf0db, 0xf0dc, 0xf0dd, 0xf0de, 0xf0df, - 0xf0e0, 0xf0e1, 0xf0e2, 0xf0e3, 0xf0e4, 0xf0e5, 0xf0e6, 0xf0e7, - 0xf0e8, 0xf0e9, 0xf0ea, 0xf0eb, 0xf0ec, 0xf0ed, 0xf0ee, 0xf0ef, - 0xf0f0, 0xf0f1, 0xf0f2, 0xf0f3, 0xf0f4, 0xf0f5, 0xf0f6, 0xf0f7, - 0xf0f8, 0xf0f9, 0xf0fa, 0xf0fb, 0xf0fc, 0xf0fd, 0xf0fe, 0xf0ff, - 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, 0xf105, 0xf106, 0xf107, - 0xf108, 0xf109, 0xf10a, 0xf10b, 0xf10c, 0xf10d, 0xf10e, 0xf10f, - 0xf110, 0xf111, 0xf112, 0xf113, 0xf114, 0xf115, 0xf116, 0xf117, - 0xf118, 0xf119, 0xf11a, 0xf11b, 0xf11c, 0xf11d, 0xf11e, 0xf11f, - 0xf120, 0xf121, 0xf122, 0xf123, 0xf124, 0xf125, 0xf126, 0xf127, - 0xf128, 0xf129, 0xf12a, 0xf12b, 0xf12c, 0xf12d, 0xf12e, 0xf12f, - 0xf130, 0xf131, 0xf132, 0xf133, 0xf134, 0xf135, 0xf136, 0xf137, - 0xf138, 0xf139, 0xf13a, 0xf13b, 0xf13c, 0xf13d, 0xf13e, 0xf13f, - 0xf140, 0xf141, 0xf142, 0xf143, 0xf144, 0xf145, 0xf146, 0xf147, - 0xf148, 0xf149, 0xf14a, 0xf14b, 0xf14c, 0xf14d, 0xf14e, 0xf14f, - 0xf150, 0xf151, 0xf152, 0xf153, 0xf154, 0xf155, 0xf156, 0xf157, - 0xf158, 0xf159, 0xf15a, 0xf15b, 0xf15c, 0xf15d, 0xf15e, 0xf15f, - 0xf160, 0xf161, 0xf162, 0xf163, 0xf164, 0xf165, 0xf166, 0xf167, - 0xf168, 0xf169, 0xf16a, 0xf16b, 0xf16c, 0xf16d, 0xf16e, 0xf16f, - 0xf170, 0xf171, 0xf172, 0xf173, 0xf174, 0xf175, 0xf176, 0xf177, - 0xf178, 0xf179, 0xf17a, 0xf17b, 0xf17c, 0xf17d, 0xf17e, 0xf17f, - 0xf180, 0xf181, 0xf182, 0xf183, 0xf184, 0xf185, 0xf186, 0xf187, - 0xf188, 0xf189, 0xf18a, 0xf18b, 0xf18c, 0xf18d, 0xf18e, 0xf18f, - 0xf190, 0xf191, 0xf192, 0xf193, 0xf194, 0xf195, 0xf196, 0xf197, - 0xf198, 0xf199, 0xf19a, 0xf19b, 0xf19c, 0xf19d, 0xf19e, 0xf19f, - 0xf1a0, 0xf1a1, 0xf1a2, 0xf1a3, 0xf1a4, 0xf1a5, 0xf1a6, 0xf1a7, - 0xf1a8, 0xf1a9, 0xf1aa, 0xf1ab, 0xf1ac, 0xf1ad, 0xf1ae, 0xf1af, - 0xf1b0, 0xf1b1, 0xf1b2, 0xf1b3, 0xf1b4, 0xf1b5, 0xf1b6, 0xf1b7, - 0xf1b8, 0xf1b9, 0xf1ba, 0xf1bb, 0xf1bc, 0xf1bd, 0xf1be, 0xf1bf, - 0xf1c0, 0xf1c1, 0xf1c2, 0xf1c3, 0xf1c4, 0xf1c5, 0xf1c6, 0xf1c7, - 0xf1c8, 0xf1c9, 0xf1ca, 0xf1cb, 0xf1cc, 0xf1cd, 0xf1ce, 0xf1cf, - 0xf1d0, 0xf1d1, 0xf1d2, 0xf1d3, 0xf1d4, 0xf1d5, 0xf1d6, 0xf1d7, - 0xf1d8, 0xf1d9, 0xf1da, 0xf1db, 0xf1dc, 0xf1dd, 0xf1de, 0xf1df, - 0xf1e0, 0xf1e1, 0xf1e2, 0xf1e3, 0xf1e4, 0xf1e5, 0xf1e6, 0xf1e7, - 0xf1e8, 0xf1e9, 0xf1ea, 0xf1eb, 0xf1ec, 0xf1ed, 0xf1ee, 0xf1ef, - 0xf1f0, 0xf1f1, 0xf1f2, 0xf1f3, 0xf1f4, 0xf1f5, 0xf1f6, 0xf1f7, - 0xf1f8, 0xf1f9, 0xf1fa, 0xf1fb, 0xf1fc, 0xf1fd, 0xf1fe, 0xf1ff, - 0xf200, 0xf201, 0xf202, 0xf203, 0xf204, 0xf205, 0xf206, 0xf207, - 0xf208, 0xf209, 0xf20a, 0xf20b, 0xf20c, 0xf20d, 0xf20e, 0xf20f, - 0xf210, 0xf211, 0xf212, 0xf213, 0xf214, 0xf215, 0xf216, 0xf217, - 0xf218, 0xf219, 0xf21a, 0xf21b, 0xf21c, 0xf21d, 0xf21e, 0xf21f, - 0xf220, 0xf221, 0xf222, 0xf223, 0xf224, 0xf225, 0xf226, 0xf227, - 0xf228, 0xf229, 0xf22a, 0xf22b, 0xf22c, 0xf22d, 0xf22e, 0xf22f, - 0xf230, 0xf231, 0xf232, 0xf233, 0xf234, 0xf235, 0xf236, 0xf237, - 0xf238, 0xf239, 0xf23a, 0xf23b, 0xf23c, 0xf23d, 0xf23e, 0xf23f, - 0xf240, 0xf241, 0xf242, 0xf243, 0xf244, 0xf245, 0xf246, 0xf247, - 0xf248, 0xf249, 0xf24a, 0xf24b, 0xf24c, 0xf24d, 0xf24e, 0xf24f, - 0xf250, 0xf251, 0xf252, 0xf253, 0xf254, 0xf255, 0xf256, 0xf257, - 0xf258, 0xf259, 0xf25a, 0xf25b, 0xf25c, 0xf25d, 0xf25e, 0xf25f, - 0xf260, 0xf261, 0xf262, 0xf263, 0xf264, 0xf265, 0xf266, 0xf267, - 0xf268, 0xf269, 0xf26a, 0xf26b, 0xf26c, 0xf26d, 0xf26e, 0xf26f, - 0xf270, 0xf271, 0xf272, 0xf273, 0xf274, 0xf275, 0xf276, 0xf277, - 0xf278, 0xf279, 0xf27a, 0xf27b, 0xf27c, 0xf27d, 0xf27e, 0xf27f, - 0xf280, 0xf281, 0xf282, 0xf283, 0xf284, 0xf285, 0xf286, 0xf287, - 0xf288, 0xf289, 0xf28a, 0xf28b, 0xf28c, 0xf28d, 0xf28e, 0xf28f, - 0xf290, 0xf291, 0xf292, 0xf293, 0xf294, 0xf295, 0xf296, 0xf297, - 0xf298, 0xf299, 0xf29a, 0xf29b, 0xf29c, 0xf29d, 0xf29e, 0xf29f, - 0xf2a0, 0xf2a1, 0xf2a2, 0xf2a3, 0xf2a4, 0xf2a5, 0xf2a6, 0xf2a7, - 0xf2a8, 0xf2a9, 0xf2aa, 0xf2ab, 0xf2ac, 0xf2ad, 0xf2ae, 0xf2af, - 0xf2b0, 0xf2b1, 0xf2b2, 0xf2b3, 0xf2b4, 0xf2b5, 0xf2b6, 0xf2b7, - 0xf2b8, 0xf2b9, 0xf2ba, 0xf2bb, 0xf2bc, 0xf2bd, 0xf2be, 0xf2bf, - 0xf2c0, 0xf2c1, 0xf2c2, 0xf2c3, 0xf2c4, 0xf2c5, 0xf2c6, 0xf2c7, - 0xf2c8, 0xf2c9, 0xf2ca, 0xf2cb, 0xf2cc, 0xf2cd, 0xf2ce, 0xf2cf, - 0xf2d0, 0xf2d1, 0xf2d2, 0xf2d3, 0xf2d4, 0xf2d5, 0xf2d6, 0xf2d7, - 0xf2d8, 0xf2d9, 0xf2da, 0xf2db, 0xf2dc, 0xf2dd, 0xf2de, 0xf2df, - 0xf2e0, 0xf2e1, 0xf2e2, 0xf2e3, 0xf2e4, 0xf2e5, 0xf2e6, 0xf2e7, - 0xf2e8, 0xf2e9, 0xf2ea, 0xf2eb, 0xf2ec, 0xf2ed, 0xf2ee, 0xf2ef, - 0xf2f0, 0xf2f1, 0xf2f2, 0xf2f3, 0xf2f4, 0xf2f5, 0xf2f6, 0xf2f7, - 0xf2f8, 0xf2f9, 0xf2fa, 0xf2fb, 0xf2fc, 0xf2fd, 0xf2fe, 0xf2ff, - 0xf300, 0xf301, 0xf302, 0xf303, 0xf304, 0xf305, 0xf306, 0xf307, - 0xf308, 0xf309, 0xf30a, 0xf30b, 0xf30c, 0xf30d, 0xf30e, 0xf30f, - 0xf310, 0xf311, 0xf312, 0xf313, 0xf314, 0xf315, 0xf316, 0xf317, - 0xf318, 0xf319, 0xf31a, 0xf31b, 0xf31c, 0xf31d, 0xf31e, 0xf31f, - 0xf320, 0xf321, 0xf322, 0xf323, 0xf324, 0xf325, 0xf326, 0xf327, - 0xf328, 0xf329, 0xf32a, 0xf32b, 0xf32c, 0xf32d, 0xf32e, 0xf32f, - 0xf330, 0xf331, 0xf332, 0xf333, 0xf334, 0xf335, 0xf336, 0xf337, - 0xf338, 0xf339, 0xf33a, 0xf33b, 0xf33c, 0xf33d, 0xf33e, 0xf33f, - 0xf340, 0xf341, 0xf342, 0xf343, 0xf344, 0xf345, 0xf346, 0xf347, - 0xf348, 0xf349, 0xf34a, 0xf34b, 0xf34c, 0xf34d, 0xf34e, 0xf34f, - 0xf350, 0xf351, 0xf352, 0xf353, 0xf354, 0xf355, 0xf356, 0xf357, - 0xf358, 0xf359, 0xf35a, 0xf35b, 0xf35c, 0xf35d, 0xf35e, 0xf35f, - 0xf360, 0xf361, 0xf362, 0xf363, 0xf364, 0xf365, 0xf366, 0xf367, - 0xf368, 0xf369, 0xf36a, 0xf36b, 0xf36c, 0xf36d, 0xf36e, 0xf36f, - 0xf370, 0xf371, 0xf372, 0xf373, 0xf374, 0xf375, 0xf376, 0xf377, - 0xf378, 0xf379, 0xf37a, 0xf37b, 0xf37c, 0xf37d, 0xf37e, 0xf37f, - 0xf380, 0xf381, 0xf382, 0xf383, 0xf384, 0xf385, 0xf386, 0xf387, - 0xf388, 0xf389, 0xf38a, 0xf38b, 0xf38c, 0xf38d, 0xf38e, 0xf38f, - 0xf390, 0xf391, 0xf392, 0xf393, 0xf394, 0xf395, 0xf396, 0xf397, - 0xf398, 0xf399, 0xf39a, 0xf39b, 0xf39c, 0xf39d, 0xf39e, 0xf39f, - 0xf3a0, 0xf3a1, 0xf3a2, 0xf3a3, 0xf3a4, 0xf3a5, 0xf3a6, 0xf3a7, - 0xf3a8, 0xf3a9, 0xf3aa, 0xf3ab, 0xf3ac, 0xf3ad, 0xf3ae, 0xf3af, - 0xf3b0, 0xf3b1, 0xf3b2, 0xf3b3, 0xf3b4, 0xf3b5, 0xf3b6, 0xf3b7, - 0xf3b8, 0xf3b9, 0xf3ba, 0xf3bb, 0xf3bc, 0xf3bd, 0xf3be, 0xf3bf, - 0xf3c0, 0xf3c1, 0xf3c2, 0xf3c3, 0xf3c4, 0xf3c5, 0xf3c6, 0xf3c7, - 0xf3c8, 0xf3c9, 0xf3ca, 0xf3cb, 0xf3cc, 0xf3cd, 0xf3ce, 0xf3cf, - 0xf3d0, 0xf3d1, 0xf3d2, 0xf3d3, 0xf3d4, 0xf3d5, 0xf3d6, 0xf3d7, - 0xf3d8, 0xf3d9, 0xf3da, 0xf3db, 0xf3dc, 0xf3dd, 0xf3de, 0xf3df, - 0xf3e0, 0xf3e1, 0xf3e2, 0xf3e3, 0xf3e4, 0xf3e5, 0xf3e6, 0xf3e7, - 0xf3e8, 0xf3e9, 0xf3ea, 0xf3eb, 0xf3ec, 0xf3ed, 0xf3ee, 0xf3ef, - 0xf3f0, 0xf3f1, 0xf3f2, 0xf3f3, 0xf3f4, 0xf3f5, 0xf3f6, 0xf3f7, - 0xf3f8, 0xf3f9, 0xf3fa, 0xf3fb, 0xf3fc, 0xf3fd, 0xf3fe, 0xf3ff, - 0xf400, 0xf401, 0xf402, 0xf403, 0xf404, 0xf405, 0xf406, 0xf407, - 0xf408, 0xf409, 0xf40a, 0xf40b, 0xf40c, 0xf40d, 0xf40e, 0xf40f, - 0xf410, 0xf411, 0xf412, 0xf413, 0xf414, 0xf415, 0xf416, 0xf417, - 0xf418, 0xf419, 0xf41a, 0xf41b, 0xf41c, 0xf41d, 0xf41e, 0xf41f, - 0xf420, 0xf421, 0xf422, 0xf423, 0xf424, 0xf425, 0xf426, 0xf427, - 0xf428, 0xf429, 0xf42a, 0xf42b, 0xf42c, 0xf42d, 0xf42e, 0xf42f, - 0xf430, 0xf431, 0xf432, 0xf433, 0xf434, 0xf435, 0xf436, 0xf437, - 0xf438, 0xf439, 0xf43a, 0xf43b, 0xf43c, 0xf43d, 0xf43e, 0xf43f, - 0xf440, 0xf441, 0xf442, 0xf443, 0xf444, 0xf445, 0xf446, 0xf447, - 0xf448, 0xf449, 0xf44a, 0xf44b, 0xf44c, 0xf44d, 0xf44e, 0xf44f, - 0xf450, 0xf451, 0xf452, 0xf453, 0xf454, 0xf455, 0xf456, 0xf457, - 0xf458, 0xf459, 0xf45a, 0xf45b, 0xf45c, 0xf45d, 0xf45e, 0xf45f, - 0xf460, 0xf461, 0xf462, 0xf463, 0xf464, 0xf465, 0xf466, 0xf467, - 0xf468, 0xf469, 0xf46a, 0xf46b, 0xf46c, 0xf46d, 0xf46e, 0xf46f, - 0xf470, 0xf471, 0xf472, 0xf473, 0xf474, 0xf475, 0xf476, 0xf477, - 0xf478, 0xf479, 0xf47a, 0xf47b, 0xf47c, 0xf47d, 0xf47e, 0xf47f, - 0xf480, 0xf481, 0xf482, 0xf483, 0xf484, 0xf485, 0xf486, 0xf487, - 0xf488, 0xf489, 0xf48a, 0xf48b, 0xf48c, 0xf48d, 0xf48e, 0xf48f, - 0xf490, 0xf491, 0xf492, 0xf493, 0xf494, 0xf495, 0xf496, 0xf497, - 0xf498, 0xf499, 0xf49a, 0xf49b, 0xf49c, 0xf49d, 0xf49e, 0xf49f, - 0xf4a0, 0xf4a1, 0xf4a2, 0xf4a3, 0xf4a4, 0xf4a5, 0xf4a6, 0xf4a7, - 0xf4a8, 0xf4a9, 0xf4aa, 0xf4ab, 0xf4ac, 0xf4ad, 0xf4ae, 0xf4af, - 0xf4b0, 0xf4b1, 0xf4b2, 0xf4b3, 0xf4b4, 0xf4b5, 0xf4b6, 0xf4b7, - 0xf4b8, 0xf4b9, 0xf4ba, 0xf4bb, 0xf4bc, 0xf4bd, 0xf4be, 0xf4bf, - 0xf4c0, 0xf4c1, 0xf4c2, 0xf4c3, 0xf4c4, 0xf4c5, 0xf4c6, 0xf4c7, - 0xf4c8, 0xf4c9, 0xf4ca, 0xf4cb, 0xf4cc, 0xf4cd, 0xf4ce, 0xf4cf, - 0xf4d0, 0xf4d1, 0xf4d2, 0xf4d3, 0xf4d4, 0xf4d5, 0xf4d6, 0xf4d7, - 0xf4d8, 0xf4d9, 0xf4da, 0xf4db, 0xf4dc, 0xf4dd, 0xf4de, 0xf4df, - 0xf4e0, 0xf4e1, 0xf4e2, 0xf4e3, 0xf4e4, 0xf4e5, 0xf4e6, 0xf4e7, - 0xf4e8, 0xf4e9, 0xf4ea, 0xf4eb, 0xf4ec, 0xf4ed, 0xf4ee, 0xf4ef, - 0xf4f0, 0xf4f1, 0xf4f2, 0xf4f3, 0xf4f4, 0xf4f5, 0xf4f6, 0xf4f7, - 0xf4f8, 0xf4f9, 0xf4fa, 0xf4fb, 0xf4fc, 0xf4fd, 0xf4fe, 0xf4ff, - 0xf500, 0xf501, 0xf502, 0xf503, 0xf504, 0xf505, 0xf506, 0xf507, - 0xf508, 0xf509, 0xf50a, 0xf50b, 0xf50c, 0xf50d, 0xf50e, 0xf50f, - 0xf510, 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf516, 0xf517, - 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c, 0xf51d, 0xf51e, 0xf51f, - 0xf520, 0xf521, 0xf522, 0xf523, 0xf524, 0xf525, 0xf526, 0xf527, - 0xf528, 0xf529, 0xf52a, 0xf52b, 0xf52c, 0xf52d, 0xf52e, 0xf52f, - 0xf530, 0xf531, 0xf532, 0xf533, 0xf534, 0xf535, 0xf536, 0xf537, - 0xf538, 0xf539, 0xf53a, 0xf53b, 0xf53c, 0xf53d, 0xf53e, 0xf53f, - 0xf540, 0xf541, 0xf542, 0xf543, 0xf544, 0xf545, 0xf546, 0xf547, - 0xf548, 0xf549, 0xf54a, 0xf54b, 0xf54c, 0xf54d, 0xf54e, 0xf54f, - 0xf550, 0xf551, 0xf552, 0xf553, 0xf554, 0xf555, 0xf556, 0xf557, - 0xf558, 0xf559, 0xf55a, 0xf55b, 0xf55c, 0xf55d, 0xf55e, 0xf55f, - 0xf560, 0xf561, 0xf562, 0xf563, 0xf564, 0xf565, 0xf566, 0xf567, - 0xf568, 0xf569, 0xf56a, 0xf56b, 0xf56c, 0xf56d, 0xf56e, 0xf56f, - 0xf570, 0xf571, 0xf572, 0xf573, 0xf574, 0xf575, 0xf576, 0xf577, - 0xf578, 0xf579, 0xf57a, 0xf57b, 0xf57c, 0xf57d, 0xf57e, 0xf57f, - 0xf580, 0xf581, 0xf582, 0xf583, 0xf584, 0xf585, 0xf586, 0xf587, - 0xf588, 0xf589, 0xf58a, 0xf58b, 0xf58c, 0xf58d, 0xf58e, 0xf58f, - 0xf590, 0xf591, 0xf592, 0xf593, 0xf594, 0xf595, 0xf596, 0xf597, - 0xf598, 0xf599, 0xf59a, 0xf59b, 0xf59c, 0xf59d, 0xf59e, 0xf59f, - 0xf5a0, 0xf5a1, 0xf5a2, 0xf5a3, 0xf5a4, 0xf5a5, 0xf5a6, 0xf5a7, - 0xf5a8, 0xf5a9, 0xf5aa, 0xf5ab, 0xf5ac, 0xf5ad, 0xf5ae, 0xf5af, - 0xf5b0, 0xf5b1, 0xf5b2, 0xf5b3, 0xf5b4, 0xf5b5, 0xf5b6, 0xf5b7, - 0xf5b8, 0xf5b9, 0xf5ba, 0xf5bb, 0xf5bc, 0xf5bd, 0xf5be, 0xf5bf, - 0xf5c0, 0xf5c1, 0xf5c2, 0xf5c3, 0xf5c4, 0xf5c5, 0xf5c6, 0xf5c7, - 0xf5c8, 0xf5c9, 0xf5ca, 0xf5cb, 0xf5cc, 0xf5cd, 0xf5ce, 0xf5cf, - 0xf5d0, 0xf5d1, 0xf5d2, 0xf5d3, 0xf5d4, 0xf5d5, 0xf5d6, 0xf5d7, - 0xf5d8, 0xf5d9, 0xf5da, 0xf5db, 0xf5dc, 0xf5dd, 0xf5de, 0xf5df, - 0xf5e0, 0xf5e1, 0xf5e2, 0xf5e3, 0xf5e4, 0xf5e5, 0xf5e6, 0xf5e7, - 0xf5e8, 0xf5e9, 0xf5ea, 0xf5eb, 0xf5ec, 0xf5ed, 0xf5ee, 0xf5ef, - 0xf5f0, 0xf5f1, 0xf5f2, 0xf5f3, 0xf5f4, 0xf5f5, 0xf5f6, 0xf5f7, - 0xf5f8, 0xf5f9, 0xf5fa, 0xf5fb, 0xf5fc, 0xf5fd, 0xf5fe, 0xf5ff, - 0xf600, 0xf601, 0xf602, 0xf603, 0xf604, 0xf605, 0xf606, 0xf607, - 0xf608, 0xf609, 0xf60a, 0xf60b, 0xf60c, 0xf60d, 0xf60e, 0xf60f, - 0xf610, 0xf611, 0xf612, 0xf613, 0xf614, 0xf615, 0xf616, 0xf617, - 0xf618, 0xf619, 0xf61a, 0xf61b, 0xf61c, 0xf61d, 0xf61e, 0xf61f, - 0xf620, 0xf621, 0xf622, 0xf623, 0xf624, 0xf625, 0xf626, 0xf627, - 0xf628, 0xf629, 0xf62a, 0xf62b, 0xf62c, 0xf62d, 0xf62e, 0xf62f, - 0xf630, 0xf631, 0xf632, 0xf633, 0xf634, 0xf635, 0xf636, 0xf637, - 0xf638, 0xf639, 0xf63a, 0xf63b, 0xf63c, 0xf63d, 0xf63e, 0xf63f, - 0xf640, 0xf641, 0xf642, 0xf643, 0xf644, 0xf645, 0xf646, 0xf647, - 0xf648, 0xf649, 0xf64a, 0xf64b, 0xf64c, 0xf64d, 0xf64e, 0xf64f, - 0xf650, 0xf651, 0xf652, 0xf653, 0xf654, 0xf655, 0xf656, 0xf657, - 0xf658, 0xf659, 0xf65a, 0xf65b, 0xf65c, 0xf65d, 0xf65e, 0xf65f, - 0xf660, 0xf661, 0xf662, 0xf663, 0xf664, 0xf665, 0xf666, 0xf667, - 0xf668, 0xf669, 0xf66a, 0xf66b, 0xf66c, 0xf66d, 0xf66e, 0xf66f, - 0xf670, 0xf671, 0xf672, 0xf673, 0xf674, 0xf675, 0xf676, 0xf677, - 0xf678, 0xf679, 0xf67a, 0xf67b, 0xf67c, 0xf67d, 0xf67e, 0xf67f, - 0xf680, 0xf681, 0xf682, 0xf683, 0xf684, 0xf685, 0xf686, 0xf687, - 0xf688, 0xf689, 0xf68a, 0xf68b, 0xf68c, 0xf68d, 0xf68e, 0xf68f, - 0xf690, 0xf691, 0xf692, 0xf693, 0xf694, 0xf695, 0xf696, 0xf697, - 0xf698, 0xf699, 0xf69a, 0xf69b, 0xf69c, 0xf69d, 0xf69e, 0xf69f, - 0xf6a0, 0xf6a1, 0xf6a2, 0xf6a3, 0xf6a4, 0xf6a5, 0xf6a6, 0xf6a7, - 0xf6a8, 0xf6a9, 0xf6aa, 0xf6ab, 0xf6ac, 0xf6ad, 0xf6ae, 0xf6af, - 0xf6b0, 0xf6b1, 0xf6b2, 0xf6b3, 0xf6b4, 0xf6b5, 0xf6b6, 0xf6b7, - 0xf6b8, 0xf6b9, 0xf6ba, 0xf6bb, 0xf6bc, 0xf6bd, 0xf6be, 0xf6bf, - 0xf6c0, 0xf6c1, 0xf6c2, 0xf6c3, 0xf6c4, 0xf6c5, 0xf6c6, 0xf6c7, - 0xf6c8, 0xf6c9, 0xf6ca, 0xf6cb, 0xf6cc, 0xf6cd, 0xf6ce, 0xf6cf, - 0xf6d0, 0xf6d1, 0xf6d2, 0xf6d3, 0xf6d4, 0xf6d5, 0xf6d6, 0xf6d7, - 0xf6d8, 0xf6d9, 0xf6da, 0xf6db, 0xf6dc, 0xf6dd, 0xf6de, 0xf6df, - 0xf6e0, 0xf6e1, 0xf6e2, 0xf6e3, 0xf6e4, 0xf6e5, 0xf6e6, 0xf6e7, - 0xf6e8, 0xf6e9, 0xf6ea, 0xf6eb, 0xf6ec, 0xf6ed, 0xf6ee, 0xf6ef, - 0xf6f0, 0xf6f1, 0xf6f2, 0xf6f3, 0xf6f4, 0xf6f5, 0xf6f6, 0xf6f7, - 0xf6f8, 0xf6f9, 0xf6fa, 0xf6fb, 0xf6fc, 0xf6fd, 0xf6fe, 0xf6ff, - 0xf700, 0xf701, 0xf702, 0xf703, 0xf704, 0xf705, 0xf706, 0xf707, - 0xf708, 0xf709, 0xf70a, 0xf70b, 0xf70c, 0xf70d, 0xf70e, 0xf70f, - 0xf710, 0xf711, 0xf712, 0xf713, 0xf714, 0xf715, 0xf716, 0xf717, - 0xf718, 0xf719, 0xf71a, 0xf71b, 0xf71c, 0xf71d, 0xf71e, 0xf71f, - 0xf720, 0xf721, 0xf722, 0xf723, 0xf724, 0xf725, 0xf726, 0xf727, - 0xf728, 0xf729, 0xf72a, 0xf72b, 0xf72c, 0xf72d, 0xf72e, 0xf72f, - 0xf730, 0xf731, 0xf732, 0xf733, 0xf734, 0xf735, 0xf736, 0xf737, - 0xf738, 0xf739, 0xf73a, 0xf73b, 0xf73c, 0xf73d, 0xf73e, 0xf73f, - 0xf740, 0xf741, 0xf742, 0xf743, 0xf744, 0xf745, 0xf746, 0xf747, - 0xf748, 0xf749, 0xf74a, 0xf74b, 0xf74c, 0xf74d, 0xf74e, 0xf74f, - 0xf750, 0xf751, 0xf752, 0xf753, 0xf754, 0xf755, 0xf756, 0xf757, - 0xf758, 0xf759, 0xf75a, 0xf75b, 0xf75c, 0xf75d, 0xf75e, 0xf75f, - 0xf760, 0xf761, 0xf762, 0xf763, 0xf764, 0xf765, 0xf766, 0xf767, - 0xf768, 0xf769, 0xf76a, 0xf76b, 0xf76c, 0xf76d, 0xf76e, 0xf76f, - 0xf770, 0xf771, 0xf772, 0xf773, 0xf774, 0xf775, 0xf776, 0xf777, - 0xf778, 0xf779, 0xf77a, 0xf77b, 0xf77c, 0xf77d, 0xf77e, 0xf77f, - 0xf780, 0xf781, 0xf782, 0xf783, 0xf784, 0xf785, 0xf786, 0xf787, - 0xf788, 0xf789, 0xf78a, 0xf78b, 0xf78c, 0xf78d, 0xf78e, 0xf78f, - 0xf790, 0xf791, 0xf792, 0xf793, 0xf794, 0xf795, 0xf796, 0xf797, - 0xf798, 0xf799, 0xf79a, 0xf79b, 0xf79c, 0xf79d, 0xf79e, 0xf79f, - 0xf7a0, 0xf7a1, 0xf7a2, 0xf7a3, 0xf7a4, 0xf7a5, 0xf7a6, 0xf7a7, - 0xf7a8, 0xf7a9, 0xf7aa, 0xf7ab, 0xf7ac, 0xf7ad, 0xf7ae, 0xf7af, - 0xf7b0, 0xf7b1, 0xf7b2, 0xf7b3, 0xf7b4, 0xf7b5, 0xf7b6, 0xf7b7, - 0xf7b8, 0xf7b9, 0xf7ba, 0xf7bb, 0xf7bc, 0xf7bd, 0xf7be, 0xf7bf, - 0xf7c0, 0xf7c1, 0xf7c2, 0xf7c3, 0xf7c4, 0xf7c5, 0xf7c6, 0xf7c7, - 0xf7c8, 0xf7c9, 0xf7ca, 0xf7cb, 0xf7cc, 0xf7cd, 0xf7ce, 0xf7cf, - 0xf7d0, 0xf7d1, 0xf7d2, 0xf7d3, 0xf7d4, 0xf7d5, 0xf7d6, 0xf7d7, - 0xf7d8, 0xf7d9, 0xf7da, 0xf7db, 0xf7dc, 0xf7dd, 0xf7de, 0xf7df, - 0xf7e0, 0xf7e1, 0xf7e2, 0xf7e3, 0xf7e4, 0xf7e5, 0xf7e6, 0xf7e7, - 0xf7e8, 0xf7e9, 0xf7ea, 0xf7eb, 0xf7ec, 0xf7ed, 0xf7ee, 0xf7ef, - 0xf7f0, 0xf7f1, 0xf7f2, 0xf7f3, 0xf7f4, 0xf7f5, 0xf7f6, 0xf7f7, - 0xf7f8, 0xf7f9, 0xf7fa, 0xf7fb, 0xf7fc, 0xf7fd, 0xf7fe, 0xf7ff, - 0xf800, 0xf801, 0xf802, 0xf803, 0xf804, 0xf805, 0xf806, 0xf807, - 0xf808, 0xf809, 0xf80a, 0xf80b, 0xf80c, 0xf80d, 0xf80e, 0xf80f, - 0xf810, 0xf811, 0xf812, 0xf813, 0xf814, 0xf815, 0xf816, 0xf817, - 0xf818, 0xf819, 0xf81a, 0xf81b, 0xf81c, 0xf81d, 0xf81e, 0xf81f, - 0xf820, 0xf821, 0xf822, 0xf823, 0xf824, 0xf825, 0xf826, 0xf827, - 0xf828, 0xf829, 0xf82a, 0xf82b, 0xf82c, 0xf82d, 0xf82e, 0xf82f, - 0xf830, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836, 0xf837, - 0xf838, 0xf839, 0xf83a, 0xf83b, 0xf83c, 0xf83d, 0xf83e, 0xf83f, - 0xf840, 0xf841, 0xf842, 0xf843, 0xf844, 0xf845, 0xf846, 0xf847, - 0xf848, 0xf849, 0xf84a, 0xf84b, 0xf84c, 0xf84d, 0xf84e, 0xf84f, - 0xf850, 0xf851, 0xf852, 0xf853, 0xf854, 0xf855, 0xf856, 0xf857, - 0xf858, 0xf859, 0xf85a, 0xf85b, 0xf85c, 0xf85d, 0xf85e, 0xf85f, - 0xf860, 0xf861, 0xf862, 0xf863, 0xf864, 0xf865, 0xf866, 0xf867, - 0xf868, 0xf869, 0xf86a, 0xf86b, 0xf86c, 0xf86d, 0xf86e, 0xf86f, - 0xf870, 0xf871, 0xf872, 0xf873, 0xf874, 0xf875, 0xf876, 0xf877, - 0xf878, 0xf879, 0xf87a, 0xf87b, 0xf87c, 0xf87d, 0xf87e, 0xf87f, - 0xf880, 0xf881, 0xf882, 0xf883, 0xf884, 0xf885, 0xf886, 0xf887, - 0xf888, 0xf889, 0xf88a, 0xf88b, 0xf88c, 0xf88d, 0xf88e, 0xf88f, - 0xf890, 0xf891, 0xf892, 0xf893, 0xf894, 0xf895, 0xf896, 0xf897, - 0xf898, 0xf899, 0xf89a, 0xf89b, 0xf89c, 0xf89d, 0xf89e, 0xf89f, - 0xf8a0, 0xf8a1, 0xf8a2, 0xf8a3, 0xf8a4, 0xf8a5, 0xf8a6, 0xf8a7, - 0xf8a8, 0xf8a9, 0xf8aa, 0xf8ab, 0xf8ac, 0xf8ad, 0xf8ae, 0xf8af, - 0xf8b0, 0xf8b1, 0xf8b2, 0xf8b3, 0xf8b4, 0xf8b5, 0xf8b6, 0xf8b7, - 0xf8b8, 0xf8b9, 0xf8ba, 0xf8bb, 0xf8bc, 0xf8bd, 0xf8be, 0xf8bf, - 0xf8c0, 0xf8c1, 0xf8c2, 0xf8c3, 0xf8c4, 0xf8c5, 0xf8c6, 0xf8c7, - 0xf8c8, 0xf8c9, 0xf8ca, 0xf8cb, 0xf8cc, 0xf8cd, 0xf8ce, 0xf8cf, - 0xf8d0, 0xf8d1, 0xf8d2, 0xf8d3, 0xf8d4, 0xf8d5, 0xf8d6, 0xf8d7, - 0xf8d8, 0xf8d9, 0xf8da, 0xf8db, 0xf8dc, 0xf8dd, 0xf8de, 0xf8df, - 0xf8e0, 0xf8e1, 0xf8e2, 0xf8e3, 0xf8e4, 0xf8e5, 0xf8e6, 0xf8e7, - 0xf8e8, 0xf8e9, 0xf8ea, 0xf8eb, 0xf8ec, 0xf8ed, 0xf8ee, 0xf8ef, - 0xf8f0, 0xf8f1, 0xf8f2, 0xf8f3, 0xf8f4, 0xf8f5, 0xf8f6, 0xf8f7, - 0xf8f8, 0xf8f9, 0xf8fa, 0xf8fb, 0xf8fc, 0xf8fd, 0xf8fe, 0xf8ff, - 0xf900, 0xf901, 0xf902, 0xf903, 0xf904, 0xf905, 0xf906, 0xf907, - 0xf908, 0xf909, 0xf90a, 0xf90b, 0xf90c, 0xf90d, 0xf90e, 0xf90f, - 0xf910, 0xf911, 0xf912, 0xf913, 0xf914, 0xf915, 0xf916, 0xf917, - 0xf918, 0xf919, 0xf91a, 0xf91b, 0xf91c, 0xf91d, 0xf91e, 0xf91f, - 0xf920, 0xf921, 0xf922, 0xf923, 0xf924, 0xf925, 0xf926, 0xf927, - 0xf928, 0xf929, 0xf92a, 0xf92b, 0xf92c, 0xf92d, 0xf92e, 0xf92f, - 0xf930, 0xf931, 0xf932, 0xf933, 0xf934, 0xf935, 0xf936, 0xf937, - 0xf938, 0xf939, 0xf93a, 0xf93b, 0xf93c, 0xf93d, 0xf93e, 0xf93f, - 0xf940, 0xf941, 0xf942, 0xf943, 0xf944, 0xf945, 0xf946, 0xf947, - 0xf948, 0xf949, 0xf94a, 0xf94b, 0xf94c, 0xf94d, 0xf94e, 0xf94f, - 0xf950, 0xf951, 0xf952, 0xf953, 0xf954, 0xf955, 0xf956, 0xf957, - 0xf958, 0xf959, 0xf95a, 0xf95b, 0xf95c, 0xf95d, 0xf95e, 0xf95f, - 0xf960, 0xf961, 0xf962, 0xf963, 0xf964, 0xf965, 0xf966, 0xf967, - 0xf968, 0xf969, 0xf96a, 0xf96b, 0xf96c, 0xf96d, 0xf96e, 0xf96f, - 0xf970, 0xf971, 0xf972, 0xf973, 0xf974, 0xf975, 0xf976, 0xf977, - 0xf978, 0xf979, 0xf97a, 0xf97b, 0xf97c, 0xf97d, 0xf97e, 0xf97f, - 0xf980, 0xf981, 0xf982, 0xf983, 0xf984, 0xf985, 0xf986, 0xf987, - 0xf988, 0xf989, 0xf98a, 0xf98b, 0xf98c, 0xf98d, 0xf98e, 0xf98f, - 0xf990, 0xf991, 0xf992, 0xf993, 0xf994, 0xf995, 0xf996, 0xf997, - 0xf998, 0xf999, 0xf99a, 0xf99b, 0xf99c, 0xf99d, 0xf99e, 0xf99f, - 0xf9a0, 0xf9a1, 0xf9a2, 0xf9a3, 0xf9a4, 0xf9a5, 0xf9a6, 0xf9a7, - 0xf9a8, 0xf9a9, 0xf9aa, 0xf9ab, 0xf9ac, 0xf9ad, 0xf9ae, 0xf9af, - 0xf9b0, 0xf9b1, 0xf9b2, 0xf9b3, 0xf9b4, 0xf9b5, 0xf9b6, 0xf9b7, - 0xf9b8, 0xf9b9, 0xf9ba, 0xf9bb, 0xf9bc, 0xf9bd, 0xf9be, 0xf9bf, - 0xf9c0, 0xf9c1, 0xf9c2, 0xf9c3, 0xf9c4, 0xf9c5, 0xf9c6, 0xf9c7, - 0xf9c8, 0xf9c9, 0xf9ca, 0xf9cb, 0xf9cc, 0xf9cd, 0xf9ce, 0xf9cf, - 0xf9d0, 0xf9d1, 0xf9d2, 0xf9d3, 0xf9d4, 0xf9d5, 0xf9d6, 0xf9d7, - 0xf9d8, 0xf9d9, 0xf9da, 0xf9db, 0xf9dc, 0xf9dd, 0xf9de, 0xf9df, - 0xf9e0, 0xf9e1, 0xf9e2, 0xf9e3, 0xf9e4, 0xf9e5, 0xf9e6, 0xf9e7, - 0xf9e8, 0xf9e9, 0xf9ea, 0xf9eb, 0xf9ec, 0xf9ed, 0xf9ee, 0xf9ef, - 0xf9f0, 0xf9f1, 0xf9f2, 0xf9f3, 0xf9f4, 0xf9f5, 0xf9f6, 0xf9f7, - 0xf9f8, 0xf9f9, 0xf9fa, 0xf9fb, 0xf9fc, 0xf9fd, 0xf9fe, 0xf9ff, - 0xfa00, 0xfa01, 0xfa02, 0xfa03, 0xfa04, 0xfa05, 0xfa06, 0xfa07, - 0xfa08, 0xfa09, 0xfa0a, 0xfa0b, 0xfa0c, 0xfa0d, 0xfa0e, 0xfa0f, - 0xfa10, 0xfa11, 0xfa12, 0xfa13, 0xfa14, 0xfa15, 0xfa16, 0xfa17, - 0xfa18, 0xfa19, 0xfa1a, 0xfa1b, 0xfa1c, 0xfa1d, 0xfa1e, 0xfa1f, - 0xfa20, 0xfa21, 0xfa22, 0xfa23, 0xfa24, 0xfa25, 0xfa26, 0xfa27, - 0xfa28, 0xfa29, 0xfa2a, 0xfa2b, 0xfa2c, 0xfa2d, 0xfa2e, 0xfa2f, - 0xfa30, 0xfa31, 0xfa32, 0xfa33, 0xfa34, 0xfa35, 0xfa36, 0xfa37, - 0xfa38, 0xfa39, 0xfa3a, 0xfa3b, 0xfa3c, 0xfa3d, 0xfa3e, 0xfa3f, - 0xfa40, 0xfa41, 0xfa42, 0xfa43, 0xfa44, 0xfa45, 0xfa46, 0xfa47, - 0xfa48, 0xfa49, 0xfa4a, 0xfa4b, 0xfa4c, 0xfa4d, 0xfa4e, 0xfa4f, - 0xfa50, 0xfa51, 0xfa52, 0xfa53, 0xfa54, 0xfa55, 0xfa56, 0xfa57, - 0xfa58, 0xfa59, 0xfa5a, 0xfa5b, 0xfa5c, 0xfa5d, 0xfa5e, 0xfa5f, - 0xfa60, 0xfa61, 0xfa62, 0xfa63, 0xfa64, 0xfa65, 0xfa66, 0xfa67, - 0xfa68, 0xfa69, 0xfa6a, 0xfa6b, 0xfa6c, 0xfa6d, 0xfa6e, 0xfa6f, - 0xfa70, 0xfa71, 0xfa72, 0xfa73, 0xfa74, 0xfa75, 0xfa76, 0xfa77, - 0xfa78, 0xfa79, 0xfa7a, 0xfa7b, 0xfa7c, 0xfa7d, 0xfa7e, 0xfa7f, - 0xfa80, 0xfa81, 0xfa82, 0xfa83, 0xfa84, 0xfa85, 0xfa86, 0xfa87, - 0xfa88, 0xfa89, 0xfa8a, 0xfa8b, 0xfa8c, 0xfa8d, 0xfa8e, 0xfa8f, - 0xfa90, 0xfa91, 0xfa92, 0xfa93, 0xfa94, 0xfa95, 0xfa96, 0xfa97, - 0xfa98, 0xfa99, 0xfa9a, 0xfa9b, 0xfa9c, 0xfa9d, 0xfa9e, 0xfa9f, - 0xfaa0, 0xfaa1, 0xfaa2, 0xfaa3, 0xfaa4, 0xfaa5, 0xfaa6, 0xfaa7, - 0xfaa8, 0xfaa9, 0xfaaa, 0xfaab, 0xfaac, 0xfaad, 0xfaae, 0xfaaf, - 0xfab0, 0xfab1, 0xfab2, 0xfab3, 0xfab4, 0xfab5, 0xfab6, 0xfab7, - 0xfab8, 0xfab9, 0xfaba, 0xfabb, 0xfabc, 0xfabd, 0xfabe, 0xfabf, - 0xfac0, 0xfac1, 0xfac2, 0xfac3, 0xfac4, 0xfac5, 0xfac6, 0xfac7, - 0xfac8, 0xfac9, 0xfaca, 0xfacb, 0xfacc, 0xfacd, 0xface, 0xfacf, - 0xfad0, 0xfad1, 0xfad2, 0xfad3, 0xfad4, 0xfad5, 0xfad6, 0xfad7, - 0xfad8, 0xfad9, 0xfada, 0xfadb, 0xfadc, 0xfadd, 0xfade, 0xfadf, - 0xfae0, 0xfae1, 0xfae2, 0xfae3, 0xfae4, 0xfae5, 0xfae6, 0xfae7, - 0xfae8, 0xfae9, 0xfaea, 0xfaeb, 0xfaec, 0xfaed, 0xfaee, 0xfaef, - 0xfaf0, 0xfaf1, 0xfaf2, 0xfaf3, 0xfaf4, 0xfaf5, 0xfaf6, 0xfaf7, - 0xfaf8, 0xfaf9, 0xfafa, 0xfafb, 0xfafc, 0xfafd, 0xfafe, 0xfaff, - 0xfb00, 0xfb01, 0xfb02, 0xfb03, 0xfb04, 0xfb05, 0xfb06, 0xfb07, - 0xfb08, 0xfb09, 0xfb0a, 0xfb0b, 0xfb0c, 0xfb0d, 0xfb0e, 0xfb0f, - 0xfb10, 0xfb11, 0xfb12, 0xfb13, 0xfb14, 0xfb15, 0xfb16, 0xfb17, - 0xfb18, 0xfb19, 0xfb1a, 0xfb1b, 0xfb1c, 0xfb1d, 0xfb1e, 0xfb1f, - 0xfb20, 0xfb21, 0xfb22, 0xfb23, 0xfb24, 0xfb25, 0xfb26, 0xfb27, - 0xfb28, 0xfb29, 0xfb2a, 0xfb2b, 0xfb2c, 0xfb2d, 0xfb2e, 0xfb2f, - 0xfb30, 0xfb31, 0xfb32, 0xfb33, 0xfb34, 0xfb35, 0xfb36, 0xfb37, - 0xfb38, 0xfb39, 0xfb3a, 0xfb3b, 0xfb3c, 0xfb3d, 0xfb3e, 0xfb3f, - 0xfb40, 0xfb41, 0xfb42, 0xfb43, 0xfb44, 0xfb45, 0xfb46, 0xfb47, - 0xfb48, 0xfb49, 0xfb4a, 0xfb4b, 0xfb4c, 0xfb4d, 0xfb4e, 0xfb4f, - 0xfb50, 0xfb51, 0xfb52, 0xfb53, 0xfb54, 0xfb55, 0xfb56, 0xfb57, - 0xfb58, 0xfb59, 0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d, 0xfb5e, 0xfb5f, - 0xfb60, 0xfb61, 0xfb62, 0xfb63, 0xfb64, 0xfb65, 0xfb66, 0xfb67, - 0xfb68, 0xfb69, 0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d, 0xfb6e, 0xfb6f, - 0xfb70, 0xfb71, 0xfb72, 0xfb73, 0xfb74, 0xfb75, 0xfb76, 0xfb77, - 0xfb78, 0xfb79, 0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d, 0xfb7e, 0xfb7f, - 0xfb80, 0xfb81, 0xfb82, 0xfb83, 0xfb84, 0xfb85, 0xfb86, 0xfb87, - 0xfb88, 0xfb89, 0xfb8a, 0xfb8b, 0xfb8c, 0xfb8d, 0xfb8e, 0xfb8f, - 0xfb90, 0xfb91, 0xfb92, 0xfb93, 0xfb94, 0xfb95, 0xfb96, 0xfb97, - 0xfb98, 0xfb99, 0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d, 0xfb9e, 0xfb9f, - 0xfba0, 0xfba1, 0xfba2, 0xfba3, 0xfba4, 0xfba5, 0xfba6, 0xfba7, - 0xfba8, 0xfba9, 0xfbaa, 0xfbab, 0xfbac, 0xfbad, 0xfbae, 0xfbaf, - 0xfbb0, 0xfbb1, 0xfbb2, 0xfbb3, 0xfbb4, 0xfbb5, 0xfbb6, 0xfbb7, - 0xfbb8, 0xfbb9, 0xfbba, 0xfbbb, 0xfbbc, 0xfbbd, 0xfbbe, 0xfbbf, - 0xfbc0, 0xfbc1, 0xfbc2, 0xfbc3, 0xfbc4, 0xfbc5, 0xfbc6, 0xfbc7, - 0xfbc8, 0xfbc9, 0xfbca, 0xfbcb, 0xfbcc, 0xfbcd, 0xfbce, 0xfbcf, - 0xfbd0, 0xfbd1, 0xfbd2, 0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6, 0xfbd7, - 0xfbd8, 0xfbd9, 0xfbda, 0xfbdb, 0xfbdc, 0xfbdd, 0xfbde, 0xfbdf, - 0xfbe0, 0xfbe1, 0xfbe2, 0xfbe3, 0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7, - 0xfbe8, 0xfbe9, 0xfbea, 0xfbeb, 0xfbec, 0xfbed, 0xfbee, 0xfbef, - 0xfbf0, 0xfbf1, 0xfbf2, 0xfbf3, 0xfbf4, 0xfbf5, 0xfbf6, 0xfbf7, - 0xfbf8, 0xfbf9, 0xfbfa, 0xfbfb, 0xfbfc, 0xfbfd, 0xfbfe, 0xfbff, - 0xfc00, 0xfc01, 0xfc02, 0xfc03, 0xfc04, 0xfc05, 0xfc06, 0xfc07, - 0xfc08, 0xfc09, 0xfc0a, 0xfc0b, 0xfc0c, 0xfc0d, 0xfc0e, 0xfc0f, - 0xfc10, 0xfc11, 0xfc12, 0xfc13, 0xfc14, 0xfc15, 0xfc16, 0xfc17, - 0xfc18, 0xfc19, 0xfc1a, 0xfc1b, 0xfc1c, 0xfc1d, 0xfc1e, 0xfc1f, - 0xfc20, 0xfc21, 0xfc22, 0xfc23, 0xfc24, 0xfc25, 0xfc26, 0xfc27, - 0xfc28, 0xfc29, 0xfc2a, 0xfc2b, 0xfc2c, 0xfc2d, 0xfc2e, 0xfc2f, - 0xfc30, 0xfc31, 0xfc32, 0xfc33, 0xfc34, 0xfc35, 0xfc36, 0xfc37, - 0xfc38, 0xfc39, 0xfc3a, 0xfc3b, 0xfc3c, 0xfc3d, 0xfc3e, 0xfc3f, - 0xfc40, 0xfc41, 0xfc42, 0xfc43, 0xfc44, 0xfc45, 0xfc46, 0xfc47, - 0xfc48, 0xfc49, 0xfc4a, 0xfc4b, 0xfc4c, 0xfc4d, 0xfc4e, 0xfc4f, - 0xfc50, 0xfc51, 0xfc52, 0xfc53, 0xfc54, 0xfc55, 0xfc56, 0xfc57, - 0xfc58, 0xfc59, 0xfc5a, 0xfc5b, 0xfc5c, 0xfc5d, 0xfc5e, 0xfc5f, - 0xfc60, 0xfc61, 0xfc62, 0xfc63, 0xfc64, 0xfc65, 0xfc66, 0xfc67, - 0xfc68, 0xfc69, 0xfc6a, 0xfc6b, 0xfc6c, 0xfc6d, 0xfc6e, 0xfc6f, - 0xfc70, 0xfc71, 0xfc72, 0xfc73, 0xfc74, 0xfc75, 0xfc76, 0xfc77, - 0xfc78, 0xfc79, 0xfc7a, 0xfc7b, 0xfc7c, 0xfc7d, 0xfc7e, 0xfc7f, - 0xfc80, 0xfc81, 0xfc82, 0xfc83, 0xfc84, 0xfc85, 0xfc86, 0xfc87, - 0xfc88, 0xfc89, 0xfc8a, 0xfc8b, 0xfc8c, 0xfc8d, 0xfc8e, 0xfc8f, - 0xfc90, 0xfc91, 0xfc92, 0xfc93, 0xfc94, 0xfc95, 0xfc96, 0xfc97, - 0xfc98, 0xfc99, 0xfc9a, 0xfc9b, 0xfc9c, 0xfc9d, 0xfc9e, 0xfc9f, - 0xfca0, 0xfca1, 0xfca2, 0xfca3, 0xfca4, 0xfca5, 0xfca6, 0xfca7, - 0xfca8, 0xfca9, 0xfcaa, 0xfcab, 0xfcac, 0xfcad, 0xfcae, 0xfcaf, - 0xfcb0, 0xfcb1, 0xfcb2, 0xfcb3, 0xfcb4, 0xfcb5, 0xfcb6, 0xfcb7, - 0xfcb8, 0xfcb9, 0xfcba, 0xfcbb, 0xfcbc, 0xfcbd, 0xfcbe, 0xfcbf, - 0xfcc0, 0xfcc1, 0xfcc2, 0xfcc3, 0xfcc4, 0xfcc5, 0xfcc6, 0xfcc7, - 0xfcc8, 0xfcc9, 0xfcca, 0xfccb, 0xfccc, 0xfccd, 0xfcce, 0xfccf, - 0xfcd0, 0xfcd1, 0xfcd2, 0xfcd3, 0xfcd4, 0xfcd5, 0xfcd6, 0xfcd7, - 0xfcd8, 0xfcd9, 0xfcda, 0xfcdb, 0xfcdc, 0xfcdd, 0xfcde, 0xfcdf, - 0xfce0, 0xfce1, 0xfce2, 0xfce3, 0xfce4, 0xfce5, 0xfce6, 0xfce7, - 0xfce8, 0xfce9, 0xfcea, 0xfceb, 0xfcec, 0xfced, 0xfcee, 0xfcef, - 0xfcf0, 0xfcf1, 0xfcf2, 0xfcf3, 0xfcf4, 0xfcf5, 0xfcf6, 0xfcf7, - 0xfcf8, 0xfcf9, 0xfcfa, 0xfcfb, 0xfcfc, 0xfcfd, 0xfcfe, 0xfcff, - 0xfd00, 0xfd01, 0xfd02, 0xfd03, 0xfd04, 0xfd05, 0xfd06, 0xfd07, - 0xfd08, 0xfd09, 0xfd0a, 0xfd0b, 0xfd0c, 0xfd0d, 0xfd0e, 0xfd0f, - 0xfd10, 0xfd11, 0xfd12, 0xfd13, 0xfd14, 0xfd15, 0xfd16, 0xfd17, - 0xfd18, 0xfd19, 0xfd1a, 0xfd1b, 0xfd1c, 0xfd1d, 0xfd1e, 0xfd1f, - 0xfd20, 0xfd21, 0xfd22, 0xfd23, 0xfd24, 0xfd25, 0xfd26, 0xfd27, - 0xfd28, 0xfd29, 0xfd2a, 0xfd2b, 0xfd2c, 0xfd2d, 0xfd2e, 0xfd2f, - 0xfd30, 0xfd31, 0xfd32, 0xfd33, 0xfd34, 0xfd35, 0xfd36, 0xfd37, - 0xfd38, 0xfd39, 0xfd3a, 0xfd3b, 0xfd3c, 0xfd3d, 0xfd3e, 0xfd3f, - 0xfd40, 0xfd41, 0xfd42, 0xfd43, 0xfd44, 0xfd45, 0xfd46, 0xfd47, - 0xfd48, 0xfd49, 0xfd4a, 0xfd4b, 0xfd4c, 0xfd4d, 0xfd4e, 0xfd4f, - 0xfd50, 0xfd51, 0xfd52, 0xfd53, 0xfd54, 0xfd55, 0xfd56, 0xfd57, - 0xfd58, 0xfd59, 0xfd5a, 0xfd5b, 0xfd5c, 0xfd5d, 0xfd5e, 0xfd5f, - 0xfd60, 0xfd61, 0xfd62, 0xfd63, 0xfd64, 0xfd65, 0xfd66, 0xfd67, - 0xfd68, 0xfd69, 0xfd6a, 0xfd6b, 0xfd6c, 0xfd6d, 0xfd6e, 0xfd6f, - 0xfd70, 0xfd71, 0xfd72, 0xfd73, 0xfd74, 0xfd75, 0xfd76, 0xfd77, - 0xfd78, 0xfd79, 0xfd7a, 0xfd7b, 0xfd7c, 0xfd7d, 0xfd7e, 0xfd7f, - 0xfd80, 0xfd81, 0xfd82, 0xfd83, 0xfd84, 0xfd85, 0xfd86, 0xfd87, - 0xfd88, 0xfd89, 0xfd8a, 0xfd8b, 0xfd8c, 0xfd8d, 0xfd8e, 0xfd8f, - 0xfd90, 0xfd91, 0xfd92, 0xfd93, 0xfd94, 0xfd95, 0xfd96, 0xfd97, - 0xfd98, 0xfd99, 0xfd9a, 0xfd9b, 0xfd9c, 0xfd9d, 0xfd9e, 0xfd9f, - 0xfda0, 0xfda1, 0xfda2, 0xfda3, 0xfda4, 0xfda5, 0xfda6, 0xfda7, - 0xfda8, 0xfda9, 0xfdaa, 0xfdab, 0xfdac, 0xfdad, 0xfdae, 0xfdaf, - 0xfdb0, 0xfdb1, 0xfdb2, 0xfdb3, 0xfdb4, 0xfdb5, 0xfdb6, 0xfdb7, - 0xfdb8, 0xfdb9, 0xfdba, 0xfdbb, 0xfdbc, 0xfdbd, 0xfdbe, 0xfdbf, - 0xfdc0, 0xfdc1, 0xfdc2, 0xfdc3, 0xfdc4, 0xfdc5, 0xfdc6, 0xfdc7, - 0xfdc8, 0xfdc9, 0xfdca, 0xfdcb, 0xfdcc, 0xfdcd, 0xfdce, 0xfdcf, - 0xfdd0, 0xfdd1, 0xfdd2, 0xfdd3, 0xfdd4, 0xfdd5, 0xfdd6, 0xfdd7, - 0xfdd8, 0xfdd9, 0xfdda, 0xfddb, 0xfddc, 0xfddd, 0xfdde, 0xfddf, - 0xfde0, 0xfde1, 0xfde2, 0xfde3, 0xfde4, 0xfde5, 0xfde6, 0xfde7, - 0xfde8, 0xfde9, 0xfdea, 0xfdeb, 0xfdec, 0xfded, 0xfdee, 0xfdef, - 0xfdf0, 0xfdf1, 0xfdf2, 0xfdf3, 0xfdf4, 0xfdf5, 0xfdf6, 0xfdf7, - 0xfdf8, 0xfdf9, 0xfdfa, 0xfdfb, 0xfdfc, 0xfdfd, 0xfdfe, 0xfdff, - 0xfe00, 0xfe01, 0xfe02, 0xfe03, 0xfe04, 0xfe05, 0xfe06, 0xfe07, - 0xfe08, 0xfe09, 0xfe0a, 0xfe0b, 0xfe0c, 0xfe0d, 0xfe0e, 0xfe0f, - 0xfe10, 0xfe11, 0xfe12, 0xfe13, 0xfe14, 0xfe15, 0xfe16, 0xfe17, - 0xfe18, 0xfe19, 0xfe1a, 0xfe1b, 0xfe1c, 0xfe1d, 0xfe1e, 0xfe1f, - 0xfe20, 0xfe21, 0xfe22, 0xfe23, 0xfe24, 0xfe25, 0xfe26, 0xfe27, - 0xfe28, 0xfe29, 0xfe2a, 0xfe2b, 0xfe2c, 0xfe2d, 0xfe2e, 0xfe2f, - 0xfe30, 0xfe31, 0xfe32, 0xfe33, 0xfe34, 0xfe35, 0xfe36, 0xfe37, - 0xfe38, 0xfe39, 0xfe3a, 0xfe3b, 0xfe3c, 0xfe3d, 0xfe3e, 0xfe3f, - 0xfe40, 0xfe41, 0xfe42, 0xfe43, 0xfe44, 0xfe45, 0xfe46, 0xfe47, - 0xfe48, 0xfe49, 0xfe4a, 0xfe4b, 0xfe4c, 0xfe4d, 0xfe4e, 0xfe4f, - 0xfe50, 0xfe51, 0xfe52, 0xfe53, 0xfe54, 0xfe55, 0xfe56, 0xfe57, - 0xfe58, 0xfe59, 0xfe5a, 0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0xfe5f, - 0xfe60, 0xfe61, 0xfe62, 0xfe63, 0xfe64, 0xfe65, 0xfe66, 0xfe67, - 0xfe68, 0xfe69, 0xfe6a, 0xfe6b, 0xfe6c, 0xfe6d, 0xfe6e, 0xfe6f, - 0xfe70, 0xfe71, 0xfe72, 0xfe73, 0xfe74, 0xfe75, 0xfe76, 0xfe77, - 0xfe78, 0xfe79, 0xfe7a, 0xfe7b, 0xfe7c, 0xfe7d, 0xfe7e, 0xfe7f, - 0xfe80, 0xfe81, 0xfe82, 0xfe83, 0xfe84, 0xfe85, 0xfe86, 0xfe87, - 0xfe88, 0xfe89, 0xfe8a, 0xfe8b, 0xfe8c, 0xfe8d, 0xfe8e, 0xfe8f, - 0xfe90, 0xfe91, 0xfe92, 0xfe93, 0xfe94, 0xfe95, 0xfe96, 0xfe97, - 0xfe98, 0xfe99, 0xfe9a, 0xfe9b, 0xfe9c, 0xfe9d, 0xfe9e, 0xfe9f, - 0xfea0, 0xfea1, 0xfea2, 0xfea3, 0xfea4, 0xfea5, 0xfea6, 0xfea7, - 0xfea8, 0xfea9, 0xfeaa, 0xfeab, 0xfeac, 0xfead, 0xfeae, 0xfeaf, - 0xfeb0, 0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4, 0xfeb5, 0xfeb6, 0xfeb7, - 0xfeb8, 0xfeb9, 0xfeba, 0xfebb, 0xfebc, 0xfebd, 0xfebe, 0xfebf, - 0xfec0, 0xfec1, 0xfec2, 0xfec3, 0xfec4, 0xfec5, 0xfec6, 0xfec7, - 0xfec8, 0xfec9, 0xfeca, 0xfecb, 0xfecc, 0xfecd, 0xfece, 0xfecf, - 0xfed0, 0xfed1, 0xfed2, 0xfed3, 0xfed4, 0xfed5, 0xfed6, 0xfed7, - 0xfed8, 0xfed9, 0xfeda, 0xfedb, 0xfedc, 0xfedd, 0xfede, 0xfedf, - 0xfee0, 0xfee1, 0xfee2, 0xfee3, 0xfee4, 0xfee5, 0xfee6, 0xfee7, - 0xfee8, 0xfee9, 0xfeea, 0xfeeb, 0xfeec, 0xfeed, 0xfeee, 0xfeef, - 0xfef0, 0xfef1, 0xfef2, 0xfef3, 0xfef4, 0xfef5, 0xfef6, 0xfef7, - 0xfef8, 0xfef9, 0xfefa, 0xfefb, 0xfefc, 0xfefd, 0xfefe, 0xfeff, - 0xff00, 0xff01, 0xff02, 0xff03, 0xff04, 0xff05, 0xff06, 0xff07, - 0xff08, 0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, - 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, - 0xff18, 0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, - 0xff20, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, - 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, - 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, - 0xff38, 0xff39, 0xff3a, 0xff3b, 0xff3c, 0xff3d, 0xff3e, 0xff3f, - 0xff40, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, - 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, - 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, - 0xff58, 0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, 0xff5e, 0xff5f, - 0xff60, 0xff61, 0xff62, 0xff63, 0xff64, 0xff65, 0xff66, 0xff67, - 0xff68, 0xff69, 0xff6a, 0xff6b, 0xff6c, 0xff6d, 0xff6e, 0xff6f, - 0xff70, 0xff71, 0xff72, 0xff73, 0xff74, 0xff75, 0xff76, 0xff77, - 0xff78, 0xff79, 0xff7a, 0xff7b, 0xff7c, 0xff7d, 0xff7e, 0xff7f, - 0xff80, 0xff81, 0xff82, 0xff83, 0xff84, 0xff85, 0xff86, 0xff87, - 0xff88, 0xff89, 0xff8a, 0xff8b, 0xff8c, 0xff8d, 0xff8e, 0xff8f, - 0xff90, 0xff91, 0xff92, 0xff93, 0xff94, 0xff95, 0xff96, 0xff97, - 0xff98, 0xff99, 0xff9a, 0xff9b, 0xff9c, 0xff9d, 0xff9e, 0xff9f, - 0xffa0, 0xffa1, 0xffa2, 0xffa3, 0xffa4, 0xffa5, 0xffa6, 0xffa7, - 0xffa8, 0xffa9, 0xffaa, 0xffab, 0xffac, 0xffad, 0xffae, 0xffaf, - 0xffb0, 0xffb1, 0xffb2, 0xffb3, 0xffb4, 0xffb5, 0xffb6, 0xffb7, - 0xffb8, 0xffb9, 0xffba, 0xffbb, 0xffbc, 0xffbd, 0xffbe, 0xffbf, - 0xffc0, 0xffc1, 0xffc2, 0xffc3, 0xffc4, 0xffc5, 0xffc6, 0xffc7, - 0xffc8, 0xffc9, 0xffca, 0xffcb, 0xffcc, 0xffcd, 0xffce, 0xffcf, - 0xffd0, 0xffd1, 0xffd2, 0xffd3, 0xffd4, 0xffd5, 0xffd6, 0xffd7, - 0xffd8, 0xffd9, 0xffda, 0xffdb, 0xffdc, 0xffdd, 0xffde, 0xffdf, - 0xffe0, 0xffe1, 0xffe2, 0xffe3, 0xffe4, 0xffe5, 0xffe6, 0xffe7, - 0xffe8, 0xffe9, 0xffea, 0xffeb, 0xffec, 0xffed, 0xffee, 0xffef, - 0xfff0, 0xfff1, 0xfff2, 0xfff3, 0xfff4, 0xfff5, 0xfff6, 0xfff7, - 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc, 0xfffd, 0xfffe, 0xffff, -}; - - - -const unsigned short dwaCompressorToLinear[] = -{ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, - 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, - 0x0007, 0x0007, 0x0007, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0008, 0x0008, 0x0008, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, - 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, - 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, - 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, - 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, - 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, - 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, - 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, - 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, - 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x000a, 0x000a, - 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, - 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, - 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, - 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, - 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, - 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, - 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, - 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, - 0x000a, 0x000a, 0x000a, 0x000a, 0x000b, 0x000b, 0x000b, 0x000b, - 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, - 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, - 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, - 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, - 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, - 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, - 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, - 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000d, - 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, - 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, - 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, - 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, - 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, - 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, - 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, - 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000e, 0x000e, 0x000e, - 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, - 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, - 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, - 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, - 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, - 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, - 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000f, - 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, - 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, - 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, - 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, - 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, - 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, - 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0011, - 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, - 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, - 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, - 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, - 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, - 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, - 0x0011, 0x0011, 0x0011, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, - 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, - 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, - 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, - 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, - 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, - 0x0012, 0x0012, 0x0012, 0x0012, 0x0013, 0x0013, 0x0013, 0x0013, - 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, - 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, - 0x0013, 0x0013, 0x0013, 0x0013, 0x0014, 0x0014, 0x0014, 0x0014, - 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, - 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, - 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0015, 0x0015, 0x0015, - 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, - 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, - 0x0015, 0x0015, 0x0015, 0x0015, 0x0016, 0x0016, 0x0016, 0x0016, - 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, - 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, - 0x0016, 0x0016, 0x0016, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, - 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, - 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, - 0x0017, 0x0017, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0019, - 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, - 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, - 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x001a, 0x001a, 0x001a, - 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, - 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, - 0x001a, 0x001a, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, - 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, - 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001c, 0x001c, - 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, - 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, - 0x001c, 0x001c, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, - 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, - 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001e, 0x001e, - 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, - 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, - 0x001e, 0x001e, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, - 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, - 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0021, - 0x0021, 0x0021, 0x0021, 0x0021, 0x0021, 0x0021, 0x0021, 0x0021, - 0x0021, 0x0021, 0x0021, 0x0021, 0x0021, 0x0021, 0x0021, 0x0021, - 0x0021, 0x0021, 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, - 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, - 0x0022, 0x0022, 0x0022, 0x0022, 0x0023, 0x0023, 0x0023, 0x0023, - 0x0023, 0x0023, 0x0023, 0x0023, 0x0023, 0x0023, 0x0023, 0x0023, - 0x0023, 0x0023, 0x0023, 0x0023, 0x0023, 0x0023, 0x0024, 0x0024, - 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, - 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0025, - 0x0025, 0x0025, 0x0025, 0x0025, 0x0025, 0x0025, 0x0025, 0x0025, - 0x0025, 0x0025, 0x0025, 0x0025, 0x0025, 0x0025, 0x0025, 0x0025, - 0x0025, 0x0026, 0x0026, 0x0026, 0x0026, 0x0026, 0x0026, 0x0026, - 0x0026, 0x0026, 0x0026, 0x0026, 0x0026, 0x0026, 0x0026, 0x0026, - 0x0026, 0x0026, 0x0027, 0x0027, 0x0027, 0x0027, 0x0027, 0x0027, - 0x0027, 0x0027, 0x0027, 0x0027, 0x0027, 0x0027, 0x0027, 0x0027, - 0x0027, 0x0027, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, - 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, - 0x0028, 0x0028, 0x0028, 0x0029, 0x0029, 0x0029, 0x0029, 0x0029, - 0x0029, 0x0029, 0x0029, 0x0029, 0x0029, 0x0029, 0x0029, 0x0029, - 0x0029, 0x0029, 0x0029, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a, - 0x002a, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a, - 0x002a, 0x002a, 0x002a, 0x002b, 0x002b, 0x002b, 0x002b, 0x002b, - 0x002b, 0x002b, 0x002b, 0x002b, 0x002b, 0x002b, 0x002b, 0x002b, - 0x002b, 0x002b, 0x002b, 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, - 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, - 0x002c, 0x002c, 0x002c, 0x002d, 0x002d, 0x002d, 0x002d, 0x002d, - 0x002d, 0x002d, 0x002d, 0x002d, 0x002d, 0x002d, 0x002d, 0x002d, - 0x002d, 0x002d, 0x002d, 0x002e, 0x002e, 0x002e, 0x002e, 0x002e, - 0x002e, 0x002e, 0x002e, 0x002e, 0x002e, 0x002e, 0x002e, 0x002e, - 0x002e, 0x002e, 0x002f, 0x002f, 0x002f, 0x002f, 0x002f, 0x002f, - 0x002f, 0x002f, 0x002f, 0x002f, 0x002f, 0x002f, 0x002f, 0x002f, - 0x002f, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, - 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, - 0x0031, 0x0031, 0x0031, 0x0031, 0x0031, 0x0031, 0x0031, 0x0031, - 0x0031, 0x0031, 0x0031, 0x0031, 0x0031, 0x0031, 0x0031, 0x0032, - 0x0032, 0x0032, 0x0032, 0x0032, 0x0032, 0x0032, 0x0032, 0x0032, - 0x0032, 0x0032, 0x0032, 0x0032, 0x0032, 0x0032, 0x0033, 0x0033, - 0x0033, 0x0033, 0x0033, 0x0033, 0x0033, 0x0033, 0x0033, 0x0033, - 0x0033, 0x0033, 0x0033, 0x0033, 0x0034, 0x0034, 0x0034, 0x0034, - 0x0034, 0x0034, 0x0034, 0x0034, 0x0034, 0x0034, 0x0034, 0x0034, - 0x0034, 0x0034, 0x0034, 0x0035, 0x0035, 0x0035, 0x0035, 0x0035, - 0x0035, 0x0035, 0x0035, 0x0035, 0x0035, 0x0035, 0x0035, 0x0035, - 0x0035, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, - 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0037, - 0x0037, 0x0037, 0x0037, 0x0037, 0x0037, 0x0037, 0x0037, 0x0037, - 0x0037, 0x0037, 0x0037, 0x0037, 0x0037, 0x0038, 0x0038, 0x0038, - 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, - 0x0038, 0x0038, 0x0038, 0x0039, 0x0039, 0x0039, 0x0039, 0x0039, - 0x0039, 0x0039, 0x0039, 0x0039, 0x0039, 0x0039, 0x0039, 0x0039, - 0x003a, 0x003a, 0x003a, 0x003a, 0x003a, 0x003a, 0x003a, 0x003a, - 0x003a, 0x003a, 0x003a, 0x003a, 0x003a, 0x003a, 0x003b, 0x003b, - 0x003b, 0x003b, 0x003b, 0x003b, 0x003b, 0x003b, 0x003b, 0x003b, - 0x003b, 0x003b, 0x003b, 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, - 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, - 0x003d, 0x003d, 0x003d, 0x003d, 0x003d, 0x003d, 0x003d, 0x003d, - 0x003d, 0x003d, 0x003d, 0x003d, 0x003d, 0x003d, 0x003e, 0x003e, - 0x003e, 0x003e, 0x003e, 0x003e, 0x003e, 0x003e, 0x003e, 0x003e, - 0x003e, 0x003e, 0x003e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, - 0x0040, 0x0040, 0x0040, 0x0040, 0x0041, 0x0041, 0x0041, 0x0041, - 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, - 0x0041, 0x0042, 0x0042, 0x0042, 0x0042, 0x0042, 0x0042, 0x0042, - 0x0042, 0x0042, 0x0042, 0x0042, 0x0042, 0x0042, 0x0043, 0x0043, - 0x0043, 0x0043, 0x0043, 0x0043, 0x0043, 0x0043, 0x0043, 0x0043, - 0x0043, 0x0043, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, - 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0045, - 0x0045, 0x0045, 0x0045, 0x0045, 0x0045, 0x0045, 0x0045, 0x0045, - 0x0045, 0x0045, 0x0045, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, - 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0047, - 0x0047, 0x0047, 0x0047, 0x0047, 0x0047, 0x0047, 0x0047, 0x0047, - 0x0047, 0x0047, 0x0047, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, - 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0049, - 0x0049, 0x0049, 0x0049, 0x0049, 0x0049, 0x0049, 0x0049, 0x0049, - 0x0049, 0x0049, 0x0049, 0x004a, 0x004a, 0x004a, 0x004a, 0x004a, - 0x004a, 0x004a, 0x004a, 0x004a, 0x004a, 0x004a, 0x004a, 0x004b, - 0x004b, 0x004b, 0x004b, 0x004b, 0x004b, 0x004b, 0x004b, 0x004b, - 0x004b, 0x004b, 0x004b, 0x004c, 0x004c, 0x004c, 0x004c, 0x004c, - 0x004c, 0x004c, 0x004c, 0x004c, 0x004c, 0x004c, 0x004c, 0x004d, - 0x004d, 0x004d, 0x004d, 0x004d, 0x004d, 0x004d, 0x004d, 0x004d, - 0x004d, 0x004d, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, - 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004f, 0x004f, - 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, - 0x004f, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, - 0x0050, 0x0050, 0x0050, 0x0050, 0x0051, 0x0051, 0x0051, 0x0051, - 0x0051, 0x0051, 0x0051, 0x0051, 0x0051, 0x0051, 0x0051, 0x0051, - 0x0052, 0x0052, 0x0052, 0x0052, 0x0052, 0x0052, 0x0052, 0x0052, - 0x0052, 0x0052, 0x0052, 0x0053, 0x0053, 0x0053, 0x0053, 0x0053, - 0x0053, 0x0053, 0x0053, 0x0053, 0x0053, 0x0053, 0x0054, 0x0054, - 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, - 0x0054, 0x0055, 0x0055, 0x0055, 0x0055, 0x0055, 0x0056, 0x0056, - 0x0056, 0x0056, 0x0056, 0x0056, 0x0057, 0x0057, 0x0057, 0x0057, - 0x0057, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0059, - 0x0059, 0x0059, 0x0059, 0x0059, 0x005a, 0x005a, 0x005a, 0x005a, - 0x005a, 0x005b, 0x005b, 0x005b, 0x005b, 0x005b, 0x005b, 0x005c, - 0x005c, 0x005c, 0x005c, 0x005c, 0x005d, 0x005d, 0x005d, 0x005d, - 0x005d, 0x005e, 0x005e, 0x005e, 0x005e, 0x005e, 0x005f, 0x005f, - 0x005f, 0x005f, 0x005f, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, - 0x0060, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0062, 0x0062, - 0x0062, 0x0062, 0x0062, 0x0063, 0x0063, 0x0063, 0x0063, 0x0063, - 0x0064, 0x0064, 0x0064, 0x0064, 0x0064, 0x0065, 0x0065, 0x0065, - 0x0065, 0x0065, 0x0066, 0x0066, 0x0066, 0x0066, 0x0066, 0x0067, - 0x0067, 0x0067, 0x0067, 0x0067, 0x0068, 0x0068, 0x0068, 0x0068, - 0x0068, 0x0069, 0x0069, 0x0069, 0x0069, 0x0069, 0x006a, 0x006a, - 0x006a, 0x006a, 0x006b, 0x006b, 0x006b, 0x006b, 0x006b, 0x006c, - 0x006c, 0x006c, 0x006c, 0x006c, 0x006d, 0x006d, 0x006d, 0x006d, - 0x006d, 0x006e, 0x006e, 0x006e, 0x006e, 0x006e, 0x006f, 0x006f, - 0x006f, 0x006f, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0071, - 0x0071, 0x0071, 0x0071, 0x0071, 0x0072, 0x0072, 0x0072, 0x0072, - 0x0073, 0x0073, 0x0073, 0x0073, 0x0073, 0x0074, 0x0074, 0x0074, - 0x0074, 0x0074, 0x0075, 0x0075, 0x0075, 0x0075, 0x0076, 0x0076, - 0x0076, 0x0076, 0x0076, 0x0077, 0x0077, 0x0077, 0x0077, 0x0077, - 0x0078, 0x0078, 0x0078, 0x0078, 0x0079, 0x0079, 0x0079, 0x0079, - 0x0079, 0x007a, 0x007a, 0x007a, 0x007a, 0x007b, 0x007b, 0x007b, - 0x007b, 0x007b, 0x007c, 0x007c, 0x007c, 0x007c, 0x007d, 0x007d, - 0x007d, 0x007d, 0x007d, 0x007e, 0x007e, 0x007e, 0x007e, 0x007f, - 0x007f, 0x007f, 0x007f, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, - 0x0081, 0x0081, 0x0081, 0x0081, 0x0082, 0x0082, 0x0082, 0x0082, - 0x0082, 0x0083, 0x0083, 0x0083, 0x0083, 0x0084, 0x0084, 0x0084, - 0x0084, 0x0085, 0x0085, 0x0085, 0x0085, 0x0086, 0x0086, 0x0086, - 0x0086, 0x0086, 0x0087, 0x0087, 0x0087, 0x0087, 0x0088, 0x0088, - 0x0088, 0x0088, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x008a, - 0x008a, 0x008a, 0x008a, 0x008b, 0x008b, 0x008b, 0x008b, 0x008c, - 0x008c, 0x008c, 0x008c, 0x008d, 0x008d, 0x008d, 0x008d, 0x008e, - 0x008e, 0x008e, 0x008e, 0x008f, 0x008f, 0x008f, 0x008f, 0x008f, - 0x0090, 0x0090, 0x0090, 0x0090, 0x0091, 0x0091, 0x0091, 0x0091, - 0x0092, 0x0092, 0x0092, 0x0092, 0x0093, 0x0093, 0x0093, 0x0093, - 0x0094, 0x0094, 0x0094, 0x0094, 0x0095, 0x0095, 0x0095, 0x0095, - 0x0096, 0x0096, 0x0096, 0x0096, 0x0097, 0x0097, 0x0097, 0x0097, - 0x0098, 0x0098, 0x0098, 0x0098, 0x0099, 0x0099, 0x0099, 0x0099, - 0x009a, 0x009a, 0x009a, 0x009a, 0x009b, 0x009b, 0x009b, 0x009b, - 0x009c, 0x009c, 0x009c, 0x009c, 0x009d, 0x009d, 0x009d, 0x009d, - 0x009e, 0x009e, 0x009e, 0x009e, 0x009f, 0x009f, 0x009f, 0x009f, - 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a1, 0x00a1, 0x00a1, 0x00a2, - 0x00a2, 0x00a2, 0x00a2, 0x00a3, 0x00a3, 0x00a3, 0x00a3, 0x00a4, - 0x00a4, 0x00a4, 0x00a4, 0x00a5, 0x00a5, 0x00a5, 0x00a5, 0x00a6, - 0x00a6, 0x00a6, 0x00a6, 0x00a7, 0x00a7, 0x00a7, 0x00a8, 0x00a8, - 0x00a8, 0x00a8, 0x00a9, 0x00a9, 0x00a9, 0x00a9, 0x00aa, 0x00aa, - 0x00aa, 0x00aa, 0x00ab, 0x00ab, 0x00ab, 0x00ab, 0x00ac, 0x00ac, - 0x00ac, 0x00ad, 0x00ad, 0x00ad, 0x00ad, 0x00ae, 0x00ae, 0x00ae, - 0x00ae, 0x00af, 0x00af, 0x00af, 0x00b0, 0x00b0, 0x00b0, 0x00b0, - 0x00b1, 0x00b1, 0x00b1, 0x00b1, 0x00b2, 0x00b2, 0x00b2, 0x00b3, - 0x00b3, 0x00b3, 0x00b3, 0x00b4, 0x00b4, 0x00b4, 0x00b4, 0x00b5, - 0x00b5, 0x00b5, 0x00b6, 0x00b6, 0x00b6, 0x00b6, 0x00b7, 0x00b7, - 0x00b7, 0x00b7, 0x00b8, 0x00b8, 0x00b8, 0x00b9, 0x00b9, 0x00b9, - 0x00b9, 0x00ba, 0x00ba, 0x00ba, 0x00bb, 0x00bb, 0x00bb, 0x00bb, - 0x00bc, 0x00bc, 0x00bc, 0x00bc, 0x00bd, 0x00bd, 0x00bd, 0x00be, - 0x00be, 0x00be, 0x00be, 0x00bf, 0x00bf, 0x00bf, 0x00c0, 0x00c0, - 0x00c0, 0x00c0, 0x00c1, 0x00c1, 0x00c1, 0x00c2, 0x00c2, 0x00c2, - 0x00c2, 0x00c3, 0x00c3, 0x00c3, 0x00c4, 0x00c4, 0x00c4, 0x00c4, - 0x00c5, 0x00c5, 0x00c5, 0x00c6, 0x00c6, 0x00c6, 0x00c6, 0x00c7, - 0x00c7, 0x00c7, 0x00c8, 0x00c8, 0x00c8, 0x00c8, 0x00c9, 0x00c9, - 0x00c9, 0x00ca, 0x00ca, 0x00ca, 0x00cb, 0x00cb, 0x00cb, 0x00cb, - 0x00cc, 0x00cc, 0x00cc, 0x00cd, 0x00cd, 0x00cd, 0x00cd, 0x00ce, - 0x00ce, 0x00ce, 0x00cf, 0x00cf, 0x00cf, 0x00d0, 0x00d0, 0x00d0, - 0x00d0, 0x00d1, 0x00d1, 0x00d1, 0x00d2, 0x00d2, 0x00d2, 0x00d3, - 0x00d3, 0x00d3, 0x00d3, 0x00d4, 0x00d4, 0x00d4, 0x00d5, 0x00d5, - 0x00d5, 0x00d6, 0x00d6, 0x00d6, 0x00d6, 0x00d7, 0x00d7, 0x00d7, - 0x00d8, 0x00d8, 0x00d8, 0x00d9, 0x00d9, 0x00d9, 0x00d9, 0x00da, - 0x00da, 0x00da, 0x00db, 0x00db, 0x00db, 0x00dc, 0x00dc, 0x00dc, - 0x00dc, 0x00dd, 0x00dd, 0x00dd, 0x00de, 0x00de, 0x00de, 0x00df, - 0x00df, 0x00df, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e1, 0x00e1, - 0x00e1, 0x00e2, 0x00e2, 0x00e2, 0x00e3, 0x00e3, 0x00e3, 0x00e4, - 0x00e4, 0x00e4, 0x00e5, 0x00e5, 0x00e5, 0x00e5, 0x00e6, 0x00e6, - 0x00e6, 0x00e7, 0x00e7, 0x00e7, 0x00e8, 0x00e8, 0x00e8, 0x00e9, - 0x00e9, 0x00e9, 0x00ea, 0x00ea, 0x00ea, 0x00eb, 0x00eb, 0x00eb, - 0x00eb, 0x00ec, 0x00ec, 0x00ec, 0x00ed, 0x00ed, 0x00ed, 0x00ee, - 0x00ee, 0x00ee, 0x00ef, 0x00ef, 0x00ef, 0x00f0, 0x00f0, 0x00f0, - 0x00f1, 0x00f1, 0x00f1, 0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x00f3, - 0x00f3, 0x00f3, 0x00f4, 0x00f4, 0x00f4, 0x00f5, 0x00f5, 0x00f5, - 0x00f6, 0x00f6, 0x00f6, 0x00f7, 0x00f7, 0x00f7, 0x00f8, 0x00f8, - 0x00f8, 0x00f9, 0x00f9, 0x00f9, 0x00fa, 0x00fa, 0x00fa, 0x00fb, - 0x00fb, 0x00fb, 0x00fc, 0x00fc, 0x00fc, 0x00fd, 0x00fd, 0x00fd, - 0x00fe, 0x00fe, 0x00fe, 0x00ff, 0x00ff, 0x00ff, 0x0100, 0x0100, - 0x0100, 0x0101, 0x0101, 0x0101, 0x0102, 0x0102, 0x0102, 0x0103, - 0x0103, 0x0103, 0x0104, 0x0104, 0x0104, 0x0105, 0x0105, 0x0105, - 0x0106, 0x0106, 0x0106, 0x0107, 0x0107, 0x0107, 0x0108, 0x0108, - 0x0108, 0x0109, 0x0109, 0x0109, 0x010a, 0x010a, 0x010a, 0x010b, - 0x010b, 0x010b, 0x010c, 0x010c, 0x010c, 0x010d, 0x010d, 0x010d, - 0x010e, 0x010e, 0x010e, 0x010f, 0x010f, 0x010f, 0x0110, 0x0110, - 0x0110, 0x0111, 0x0111, 0x0112, 0x0112, 0x0112, 0x0113, 0x0113, - 0x0113, 0x0114, 0x0114, 0x0114, 0x0115, 0x0115, 0x0115, 0x0116, - 0x0116, 0x0116, 0x0117, 0x0117, 0x0117, 0x0118, 0x0118, 0x0118, - 0x0119, 0x0119, 0x0119, 0x011a, 0x011a, 0x011b, 0x011b, 0x011b, - 0x011c, 0x011c, 0x011c, 0x011d, 0x011d, 0x011d, 0x011e, 0x011e, - 0x011e, 0x011f, 0x011f, 0x011f, 0x0120, 0x0120, 0x0121, 0x0121, - 0x0121, 0x0122, 0x0122, 0x0122, 0x0123, 0x0123, 0x0123, 0x0124, - 0x0124, 0x0124, 0x0125, 0x0125, 0x0126, 0x0126, 0x0126, 0x0127, - 0x0127, 0x0127, 0x0128, 0x0128, 0x0128, 0x0129, 0x0129, 0x0129, - 0x012a, 0x012a, 0x012b, 0x012b, 0x012b, 0x012c, 0x012c, 0x012c, - 0x012d, 0x012d, 0x012d, 0x012e, 0x012e, 0x012f, 0x012f, 0x012f, - 0x0130, 0x0130, 0x0130, 0x0131, 0x0131, 0x0131, 0x0132, 0x0132, - 0x0133, 0x0133, 0x0133, 0x0134, 0x0134, 0x0134, 0x0135, 0x0135, - 0x0136, 0x0136, 0x0136, 0x0137, 0x0137, 0x0137, 0x0138, 0x0138, - 0x0138, 0x0139, 0x0139, 0x013a, 0x013a, 0x013a, 0x013b, 0x013b, - 0x013b, 0x013c, 0x013c, 0x013d, 0x013d, 0x013d, 0x013e, 0x013e, - 0x013e, 0x013f, 0x013f, 0x0140, 0x0140, 0x0140, 0x0141, 0x0141, - 0x0141, 0x0142, 0x0142, 0x0143, 0x0143, 0x0143, 0x0144, 0x0144, - 0x0144, 0x0145, 0x0145, 0x0146, 0x0146, 0x0146, 0x0147, 0x0147, - 0x0147, 0x0148, 0x0148, 0x0149, 0x0149, 0x0149, 0x014a, 0x014a, - 0x014b, 0x014b, 0x014b, 0x014c, 0x014c, 0x014c, 0x014d, 0x014d, - 0x014e, 0x014e, 0x014e, 0x014f, 0x014f, 0x0150, 0x0150, 0x0150, - 0x0151, 0x0151, 0x0151, 0x0152, 0x0152, 0x0153, 0x0153, 0x0153, - 0x0154, 0x0154, 0x0155, 0x0155, 0x0155, 0x0156, 0x0156, 0x0156, - 0x0157, 0x0157, 0x0158, 0x0158, 0x0158, 0x0159, 0x0159, 0x015a, - 0x015a, 0x015a, 0x015b, 0x015b, 0x015c, 0x015c, 0x015c, 0x015d, - 0x015d, 0x015e, 0x015e, 0x015e, 0x015f, 0x015f, 0x015f, 0x0160, - 0x0160, 0x0161, 0x0161, 0x0161, 0x0162, 0x0162, 0x0163, 0x0163, - 0x0163, 0x0164, 0x0164, 0x0165, 0x0165, 0x0165, 0x0166, 0x0166, - 0x0167, 0x0167, 0x0167, 0x0168, 0x0168, 0x0169, 0x0169, 0x0169, - 0x016a, 0x016a, 0x016b, 0x016b, 0x016b, 0x016c, 0x016c, 0x016d, - 0x016d, 0x016d, 0x016e, 0x016e, 0x016f, 0x016f, 0x016f, 0x0170, - 0x0170, 0x0171, 0x0171, 0x0172, 0x0172, 0x0172, 0x0173, 0x0173, - 0x0174, 0x0174, 0x0174, 0x0175, 0x0175, 0x0176, 0x0176, 0x0176, - 0x0177, 0x0177, 0x0178, 0x0178, 0x0178, 0x0179, 0x0179, 0x017a, - 0x017a, 0x017b, 0x017b, 0x017b, 0x017c, 0x017c, 0x017d, 0x017d, - 0x017d, 0x017e, 0x017e, 0x017f, 0x017f, 0x017f, 0x0180, 0x0180, - 0x0181, 0x0181, 0x0182, 0x0182, 0x0182, 0x0183, 0x0183, 0x0184, - 0x0184, 0x0185, 0x0186, 0x0187, 0x0187, 0x0188, 0x0189, 0x018a, - 0x018b, 0x018c, 0x018c, 0x018d, 0x018e, 0x018f, 0x0190, 0x0191, - 0x0191, 0x0192, 0x0193, 0x0194, 0x0195, 0x0196, 0x0197, 0x0197, - 0x0198, 0x0199, 0x019a, 0x019b, 0x019c, 0x019d, 0x019d, 0x019e, - 0x019f, 0x01a0, 0x01a1, 0x01a2, 0x01a3, 0x01a4, 0x01a4, 0x01a5, - 0x01a6, 0x01a7, 0x01a8, 0x01a9, 0x01aa, 0x01ab, 0x01ab, 0x01ac, - 0x01ad, 0x01ae, 0x01af, 0x01b0, 0x01b1, 0x01b2, 0x01b2, 0x01b3, - 0x01b4, 0x01b5, 0x01b6, 0x01b7, 0x01b8, 0x01b9, 0x01ba, 0x01ba, - 0x01bb, 0x01bc, 0x01bd, 0x01be, 0x01bf, 0x01c0, 0x01c1, 0x01c2, - 0x01c3, 0x01c3, 0x01c4, 0x01c5, 0x01c6, 0x01c7, 0x01c8, 0x01c9, - 0x01ca, 0x01cb, 0x01cc, 0x01cd, 0x01ce, 0x01ce, 0x01cf, 0x01d0, - 0x01d1, 0x01d2, 0x01d3, 0x01d4, 0x01d5, 0x01d6, 0x01d7, 0x01d8, - 0x01d9, 0x01da, 0x01da, 0x01db, 0x01dc, 0x01dd, 0x01de, 0x01df, - 0x01e0, 0x01e1, 0x01e2, 0x01e3, 0x01e4, 0x01e5, 0x01e6, 0x01e7, - 0x01e8, 0x01e9, 0x01e9, 0x01ea, 0x01eb, 0x01ec, 0x01ed, 0x01ee, - 0x01ef, 0x01f0, 0x01f1, 0x01f2, 0x01f3, 0x01f4, 0x01f5, 0x01f6, - 0x01f7, 0x01f8, 0x01f9, 0x01fa, 0x01fb, 0x01fc, 0x01fd, 0x01fe, - 0x01ff, 0x01ff, 0x0200, 0x0201, 0x0202, 0x0203, 0x0204, 0x0205, - 0x0206, 0x0207, 0x0208, 0x0209, 0x020a, 0x020b, 0x020c, 0x020d, - 0x020e, 0x020f, 0x0210, 0x0211, 0x0212, 0x0213, 0x0214, 0x0215, - 0x0216, 0x0217, 0x0218, 0x0219, 0x021a, 0x021b, 0x021c, 0x021d, - 0x021e, 0x021f, 0x0220, 0x0221, 0x0222, 0x0223, 0x0224, 0x0225, - 0x0226, 0x0227, 0x0228, 0x0229, 0x022a, 0x022b, 0x022c, 0x022d, - 0x022e, 0x022f, 0x0230, 0x0231, 0x0232, 0x0233, 0x0234, 0x0235, - 0x0236, 0x0237, 0x0238, 0x0239, 0x023a, 0x023b, 0x023c, 0x023e, - 0x023f, 0x0240, 0x0241, 0x0242, 0x0243, 0x0244, 0x0245, 0x0246, - 0x0247, 0x0248, 0x0249, 0x024a, 0x024b, 0x024c, 0x024d, 0x024e, - 0x024f, 0x0250, 0x0251, 0x0252, 0x0253, 0x0254, 0x0255, 0x0257, - 0x0258, 0x0259, 0x025a, 0x025b, 0x025c, 0x025d, 0x025e, 0x025f, - 0x0260, 0x0261, 0x0262, 0x0263, 0x0264, 0x0265, 0x0267, 0x0268, - 0x0269, 0x026a, 0x026b, 0x026c, 0x026d, 0x026e, 0x026f, 0x0270, - 0x0271, 0x0272, 0x0273, 0x0275, 0x0276, 0x0277, 0x0278, 0x0279, - 0x027a, 0x027b, 0x027c, 0x027d, 0x027e, 0x027f, 0x0281, 0x0282, - 0x0283, 0x0284, 0x0285, 0x0286, 0x0287, 0x0288, 0x0289, 0x028a, - 0x028c, 0x028d, 0x028e, 0x028f, 0x0290, 0x0291, 0x0292, 0x0293, - 0x0294, 0x0296, 0x0297, 0x0298, 0x0299, 0x029a, 0x029b, 0x029c, - 0x029d, 0x029e, 0x02a0, 0x02a1, 0x02a2, 0x02a3, 0x02a4, 0x02a5, - 0x02a6, 0x02a7, 0x02a9, 0x02aa, 0x02ab, 0x02ac, 0x02ad, 0x02ae, - 0x02af, 0x02b1, 0x02b2, 0x02b3, 0x02b4, 0x02b5, 0x02b6, 0x02b7, - 0x02b9, 0x02ba, 0x02bb, 0x02bc, 0x02bd, 0x02be, 0x02bf, 0x02c1, - 0x02c2, 0x02c3, 0x02c4, 0x02c5, 0x02c6, 0x02c8, 0x02c9, 0x02ca, - 0x02cb, 0x02cc, 0x02cd, 0x02cf, 0x02d0, 0x02d1, 0x02d2, 0x02d3, - 0x02d4, 0x02d6, 0x02d7, 0x02d8, 0x02d9, 0x02da, 0x02db, 0x02dd, - 0x02de, 0x02df, 0x02e0, 0x02e1, 0x02e3, 0x02e4, 0x02e5, 0x02e6, - 0x02e7, 0x02e8, 0x02ea, 0x02eb, 0x02ec, 0x02ed, 0x02ee, 0x02f0, - 0x02f1, 0x02f2, 0x02f3, 0x02f4, 0x02f6, 0x02f7, 0x02f8, 0x02f9, - 0x02fa, 0x02fc, 0x02fd, 0x02fe, 0x02ff, 0x0300, 0x0302, 0x0303, - 0x0304, 0x0305, 0x0307, 0x0308, 0x0309, 0x030a, 0x030b, 0x030d, - 0x030e, 0x030f, 0x0310, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, - 0x0318, 0x0319, 0x031a, 0x031b, 0x031d, 0x031e, 0x031f, 0x0320, - 0x0322, 0x0323, 0x0324, 0x0325, 0x0326, 0x0328, 0x0329, 0x032a, - 0x032b, 0x032d, 0x032e, 0x032f, 0x0330, 0x0332, 0x0333, 0x0334, - 0x0335, 0x0337, 0x0338, 0x0339, 0x033b, 0x033c, 0x033d, 0x033e, - 0x0340, 0x0341, 0x0342, 0x0343, 0x0345, 0x0346, 0x0347, 0x0348, - 0x034a, 0x034b, 0x034c, 0x034e, 0x034f, 0x0350, 0x0351, 0x0353, - 0x0354, 0x0355, 0x0356, 0x0358, 0x0359, 0x035a, 0x035c, 0x035d, - 0x035e, 0x035f, 0x0361, 0x0362, 0x0363, 0x0365, 0x0366, 0x0367, - 0x0369, 0x036a, 0x036b, 0x036c, 0x036e, 0x036f, 0x0370, 0x0372, - 0x0373, 0x0374, 0x0376, 0x0377, 0x0378, 0x0379, 0x037b, 0x037c, - 0x037d, 0x037f, 0x0380, 0x0381, 0x0383, 0x0384, 0x0385, 0x0387, - 0x0388, 0x0389, 0x038b, 0x038c, 0x038d, 0x038f, 0x0390, 0x0391, - 0x0393, 0x0394, 0x0395, 0x0397, 0x0398, 0x0399, 0x039b, 0x039c, - 0x039d, 0x039f, 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a7, - 0x03a8, 0x03a9, 0x03ab, 0x03ac, 0x03ad, 0x03af, 0x03b0, 0x03b1, - 0x03b3, 0x03b4, 0x03b6, 0x03b7, 0x03b8, 0x03ba, 0x03bb, 0x03bc, - 0x03be, 0x03bf, 0x03c0, 0x03c2, 0x03c3, 0x03c5, 0x03c6, 0x03c7, - 0x03c9, 0x03ca, 0x03cb, 0x03cd, 0x03ce, 0x03d0, 0x03d1, 0x03d2, - 0x03d4, 0x03d5, 0x03d6, 0x03d8, 0x03d9, 0x03db, 0x03dc, 0x03dd, - 0x03df, 0x03e0, 0x03e2, 0x03e3, 0x03e4, 0x03e6, 0x03e7, 0x03e8, - 0x03ea, 0x03eb, 0x03ed, 0x03ee, 0x03ef, 0x03f1, 0x03f2, 0x03f4, - 0x03f5, 0x03f7, 0x03f8, 0x03f9, 0x03fb, 0x03fc, 0x03fe, 0x03ff, - 0x0400, 0x0402, 0x0403, 0x0405, 0x0406, 0x0407, 0x0409, 0x040a, - 0x040c, 0x040d, 0x040f, 0x0410, 0x0411, 0x0413, 0x0414, 0x0416, - 0x0417, 0x0419, 0x041a, 0x041b, 0x041d, 0x041e, 0x0420, 0x0421, - 0x0423, 0x0424, 0x0426, 0x0427, 0x0428, 0x042a, 0x042b, 0x042d, - 0x042e, 0x0430, 0x0431, 0x0433, 0x0434, 0x0436, 0x0437, 0x0438, - 0x043a, 0x043b, 0x043d, 0x043e, 0x0440, 0x0441, 0x0443, 0x0444, - 0x0446, 0x0447, 0x0449, 0x044a, 0x044b, 0x044d, 0x044e, 0x0450, - 0x0451, 0x0453, 0x0454, 0x0456, 0x0457, 0x0459, 0x045a, 0x045c, - 0x045d, 0x045f, 0x0460, 0x0462, 0x0463, 0x0465, 0x0466, 0x0468, - 0x0469, 0x046b, 0x046c, 0x046e, 0x046f, 0x0471, 0x0472, 0x0474, - 0x0475, 0x0477, 0x0478, 0x047a, 0x047b, 0x047d, 0x047e, 0x0480, - 0x0481, 0x0483, 0x0484, 0x0486, 0x0487, 0x0489, 0x048a, 0x048c, - 0x048d, 0x048f, 0x0490, 0x0492, 0x0493, 0x0495, 0x0496, 0x0498, - 0x0499, 0x049b, 0x049c, 0x049e, 0x04a0, 0x04a1, 0x04a3, 0x04a4, - 0x04a6, 0x04a7, 0x04a9, 0x04aa, 0x04ac, 0x04ad, 0x04af, 0x04b0, - 0x04b2, 0x04b4, 0x04b5, 0x04b7, 0x04b8, 0x04ba, 0x04bb, 0x04bd, - 0x04be, 0x04c0, 0x04c2, 0x04c3, 0x04c5, 0x04c6, 0x04c8, 0x04c9, - 0x04cb, 0x04cc, 0x04ce, 0x04d0, 0x04d1, 0x04d3, 0x04d4, 0x04d6, - 0x04d7, 0x04d9, 0x04db, 0x04dc, 0x04de, 0x04df, 0x04e1, 0x04e2, - 0x04e4, 0x04e6, 0x04e7, 0x04e9, 0x04ea, 0x04ec, 0x04ed, 0x04ef, - 0x04f1, 0x04f2, 0x04f4, 0x04f5, 0x04f7, 0x04f9, 0x04fa, 0x04fc, - 0x04fd, 0x04ff, 0x0501, 0x0502, 0x0504, 0x0505, 0x0507, 0x0509, - 0x050a, 0x050c, 0x050d, 0x050f, 0x0511, 0x0512, 0x0514, 0x0515, - 0x0517, 0x0519, 0x051a, 0x051c, 0x051e, 0x051f, 0x0521, 0x0522, - 0x0524, 0x0526, 0x0527, 0x0529, 0x052b, 0x052c, 0x052e, 0x052f, - 0x0531, 0x0533, 0x0534, 0x0536, 0x0538, 0x0539, 0x053b, 0x053c, - 0x053e, 0x0540, 0x0541, 0x0543, 0x0545, 0x0546, 0x0548, 0x054a, - 0x054b, 0x054d, 0x054f, 0x0550, 0x0552, 0x0554, 0x0555, 0x0557, - 0x0559, 0x055a, 0x055c, 0x055e, 0x055f, 0x0561, 0x0562, 0x0564, - 0x0566, 0x0567, 0x0569, 0x056b, 0x056c, 0x056e, 0x0570, 0x0572, - 0x0573, 0x0575, 0x0577, 0x0578, 0x057a, 0x057c, 0x057d, 0x057f, - 0x0581, 0x0582, 0x0584, 0x0586, 0x0587, 0x0589, 0x058b, 0x058c, - 0x058e, 0x0590, 0x0592, 0x0593, 0x0595, 0x0597, 0x0598, 0x059a, - 0x059c, 0x059d, 0x059f, 0x05a1, 0x05a3, 0x05a4, 0x05a6, 0x05a8, - 0x05a9, 0x05ab, 0x05ad, 0x05af, 0x05b0, 0x05b2, 0x05b4, 0x05b5, - 0x05b7, 0x05b9, 0x05bb, 0x05bc, 0x05be, 0x05c0, 0x05c1, 0x05c3, - 0x05c5, 0x05c7, 0x05c8, 0x05ca, 0x05cc, 0x05ce, 0x05cf, 0x05d1, - 0x05d3, 0x05d4, 0x05d6, 0x05d8, 0x05da, 0x05db, 0x05dd, 0x05df, - 0x05e1, 0x05e2, 0x05e4, 0x05e6, 0x05e8, 0x05e9, 0x05eb, 0x05ed, - 0x05ef, 0x05f0, 0x05f2, 0x05f4, 0x05f6, 0x05f7, 0x05f9, 0x05fb, - 0x05fd, 0x05ff, 0x0600, 0x0602, 0x0604, 0x0606, 0x0607, 0x0609, - 0x060b, 0x060d, 0x060e, 0x0610, 0x0612, 0x0614, 0x0616, 0x0617, - 0x0619, 0x061b, 0x061d, 0x061e, 0x0620, 0x0622, 0x0624, 0x0626, - 0x0627, 0x0629, 0x062b, 0x062d, 0x062f, 0x0630, 0x0632, 0x0634, - 0x0636, 0x0638, 0x0639, 0x063b, 0x063d, 0x063f, 0x0641, 0x0642, - 0x0644, 0x0646, 0x0648, 0x064a, 0x064b, 0x064d, 0x064f, 0x0651, - 0x0653, 0x0654, 0x0656, 0x0658, 0x065a, 0x065c, 0x065e, 0x065f, - 0x0661, 0x0663, 0x0665, 0x0667, 0x0669, 0x066a, 0x066c, 0x066e, - 0x0670, 0x0672, 0x0674, 0x0675, 0x0677, 0x0679, 0x067b, 0x067d, - 0x067f, 0x0680, 0x0682, 0x0684, 0x0686, 0x0688, 0x068a, 0x068c, - 0x068d, 0x068f, 0x0691, 0x0693, 0x0695, 0x0697, 0x0699, 0x069a, - 0x069c, 0x069e, 0x06a0, 0x06a2, 0x06a4, 0x06a6, 0x06a7, 0x06a9, - 0x06ab, 0x06ad, 0x06af, 0x06b1, 0x06b3, 0x06b5, 0x06b6, 0x06b8, - 0x06ba, 0x06bc, 0x06be, 0x06c0, 0x06c2, 0x06c4, 0x06c5, 0x06c7, - 0x06c9, 0x06cb, 0x06cd, 0x06cf, 0x06d1, 0x06d3, 0x06d5, 0x06d6, - 0x06d8, 0x06da, 0x06dc, 0x06de, 0x06e0, 0x06e2, 0x06e4, 0x06e6, - 0x06e8, 0x06ea, 0x06eb, 0x06ed, 0x06ef, 0x06f1, 0x06f3, 0x06f5, - 0x06f7, 0x06fb, 0x06ff, 0x0702, 0x0706, 0x070a, 0x070e, 0x0712, - 0x0716, 0x071a, 0x071d, 0x0721, 0x0725, 0x0729, 0x072d, 0x0731, - 0x0735, 0x0739, 0x073d, 0x0740, 0x0744, 0x0748, 0x074c, 0x0750, - 0x0754, 0x0758, 0x075c, 0x0760, 0x0764, 0x0768, 0x076c, 0x0770, - 0x0774, 0x0778, 0x077c, 0x0780, 0x0784, 0x0788, 0x078c, 0x0790, - 0x0794, 0x0798, 0x079c, 0x07a0, 0x07a4, 0x07a8, 0x07ac, 0x07b0, - 0x07b4, 0x07b8, 0x07bc, 0x07c0, 0x07c4, 0x07c8, 0x07cc, 0x07d0, - 0x07d4, 0x07d9, 0x07dd, 0x07e1, 0x07e5, 0x07e9, 0x07ed, 0x07f1, - 0x07f5, 0x07f9, 0x07fe, 0x0801, 0x0803, 0x0805, 0x0807, 0x0809, - 0x080b, 0x080d, 0x080f, 0x0811, 0x0814, 0x0816, 0x0818, 0x081a, - 0x081c, 0x081e, 0x0820, 0x0822, 0x0824, 0x0826, 0x0828, 0x082b, - 0x082d, 0x082f, 0x0831, 0x0833, 0x0835, 0x0837, 0x0839, 0x083c, - 0x083e, 0x0840, 0x0842, 0x0844, 0x0846, 0x0848, 0x084b, 0x084d, - 0x084f, 0x0851, 0x0853, 0x0855, 0x0857, 0x085a, 0x085c, 0x085e, - 0x0860, 0x0862, 0x0864, 0x0867, 0x0869, 0x086b, 0x086d, 0x086f, - 0x0872, 0x0874, 0x0876, 0x0878, 0x087a, 0x087d, 0x087f, 0x0881, - 0x0883, 0x0885, 0x0888, 0x088a, 0x088c, 0x088e, 0x0890, 0x0893, - 0x0895, 0x0897, 0x0899, 0x089c, 0x089e, 0x08a0, 0x08a2, 0x08a4, - 0x08a7, 0x08a9, 0x08ab, 0x08ad, 0x08b0, 0x08b2, 0x08b4, 0x08b6, - 0x08b9, 0x08bb, 0x08bd, 0x08c0, 0x08c2, 0x08c4, 0x08c6, 0x08c9, - 0x08cb, 0x08cd, 0x08cf, 0x08d2, 0x08d4, 0x08d6, 0x08d9, 0x08db, - 0x08dd, 0x08e0, 0x08e2, 0x08e4, 0x08e6, 0x08e9, 0x08eb, 0x08ed, - 0x08f0, 0x08f2, 0x08f4, 0x08f7, 0x08f9, 0x08fb, 0x08fe, 0x0900, - 0x0902, 0x0905, 0x0907, 0x0909, 0x090c, 0x090e, 0x0910, 0x0913, - 0x0915, 0x0917, 0x091a, 0x091c, 0x091e, 0x0921, 0x0923, 0x0926, - 0x0928, 0x092a, 0x092d, 0x092f, 0x0931, 0x0934, 0x0936, 0x0939, - 0x093b, 0x093d, 0x0940, 0x0942, 0x0945, 0x0947, 0x0949, 0x094c, - 0x094e, 0x0951, 0x0953, 0x0955, 0x0958, 0x095a, 0x095d, 0x095f, - 0x0962, 0x0964, 0x0966, 0x0969, 0x096b, 0x096e, 0x0970, 0x0973, - 0x0975, 0x0977, 0x097a, 0x097c, 0x097f, 0x0981, 0x0984, 0x0986, - 0x0989, 0x098b, 0x098e, 0x0990, 0x0993, 0x0995, 0x0998, 0x099a, - 0x099c, 0x099f, 0x09a1, 0x09a4, 0x09a6, 0x09a9, 0x09ab, 0x09ae, - 0x09b0, 0x09b3, 0x09b5, 0x09b8, 0x09ba, 0x09bd, 0x09c0, 0x09c2, - 0x09c5, 0x09c7, 0x09ca, 0x09cc, 0x09cf, 0x09d1, 0x09d4, 0x09d6, - 0x09d9, 0x09db, 0x09de, 0x09e0, 0x09e3, 0x09e6, 0x09e8, 0x09eb, - 0x09ed, 0x09f0, 0x09f2, 0x09f5, 0x09f7, 0x09fa, 0x09fd, 0x09ff, - 0x0a02, 0x0a04, 0x0a07, 0x0a0a, 0x0a0c, 0x0a0f, 0x0a11, 0x0a14, - 0x0a16, 0x0a19, 0x0a1c, 0x0a1e, 0x0a21, 0x0a23, 0x0a26, 0x0a29, - 0x0a2b, 0x0a2e, 0x0a31, 0x0a33, 0x0a36, 0x0a38, 0x0a3b, 0x0a3e, - 0x0a40, 0x0a43, 0x0a46, 0x0a48, 0x0a4b, 0x0a4e, 0x0a50, 0x0a53, - 0x0a55, 0x0a58, 0x0a5b, 0x0a5d, 0x0a60, 0x0a63, 0x0a65, 0x0a68, - 0x0a6b, 0x0a6d, 0x0a70, 0x0a73, 0x0a76, 0x0a78, 0x0a7b, 0x0a7e, - 0x0a80, 0x0a83, 0x0a86, 0x0a88, 0x0a8b, 0x0a8e, 0x0a90, 0x0a93, - 0x0a96, 0x0a99, 0x0a9b, 0x0a9e, 0x0aa1, 0x0aa3, 0x0aa6, 0x0aa9, - 0x0aac, 0x0aae, 0x0ab1, 0x0ab4, 0x0ab7, 0x0ab9, 0x0abc, 0x0abf, - 0x0ac2, 0x0ac4, 0x0ac7, 0x0aca, 0x0acd, 0x0acf, 0x0ad2, 0x0ad5, - 0x0ad8, 0x0ada, 0x0add, 0x0ae0, 0x0ae3, 0x0ae5, 0x0ae8, 0x0aeb, - 0x0aee, 0x0af1, 0x0af3, 0x0af6, 0x0af9, 0x0afc, 0x0aff, 0x0b01, - 0x0b04, 0x0b07, 0x0b0a, 0x0b0d, 0x0b0f, 0x0b12, 0x0b15, 0x0b18, - 0x0b1b, 0x0b1e, 0x0b20, 0x0b23, 0x0b26, 0x0b29, 0x0b2c, 0x0b2f, - 0x0b31, 0x0b34, 0x0b37, 0x0b3a, 0x0b3d, 0x0b40, 0x0b43, 0x0b45, - 0x0b48, 0x0b4b, 0x0b4e, 0x0b51, 0x0b54, 0x0b57, 0x0b59, 0x0b5c, - 0x0b5f, 0x0b62, 0x0b65, 0x0b68, 0x0b6b, 0x0b6e, 0x0b71, 0x0b74, - 0x0b76, 0x0b79, 0x0b7c, 0x0b7f, 0x0b82, 0x0b85, 0x0b88, 0x0b8b, - 0x0b8e, 0x0b91, 0x0b94, 0x0b96, 0x0b99, 0x0b9c, 0x0b9f, 0x0ba2, - 0x0ba5, 0x0ba8, 0x0bab, 0x0bae, 0x0bb1, 0x0bb4, 0x0bb7, 0x0bba, - 0x0bbd, 0x0bc0, 0x0bc3, 0x0bc6, 0x0bc9, 0x0bcc, 0x0bcf, 0x0bd2, - 0x0bd5, 0x0bd7, 0x0bda, 0x0bdd, 0x0be0, 0x0be3, 0x0be6, 0x0be9, - 0x0bec, 0x0bef, 0x0bf2, 0x0bf5, 0x0bf8, 0x0bfb, 0x0bfe, 0x0c01, - 0x0c02, 0x0c04, 0x0c05, 0x0c07, 0x0c08, 0x0c0a, 0x0c0b, 0x0c0d, - 0x0c0e, 0x0c10, 0x0c11, 0x0c13, 0x0c14, 0x0c16, 0x0c17, 0x0c19, - 0x0c1b, 0x0c1c, 0x0c1e, 0x0c1f, 0x0c21, 0x0c22, 0x0c24, 0x0c25, - 0x0c27, 0x0c28, 0x0c2a, 0x0c2b, 0x0c2d, 0x0c2f, 0x0c30, 0x0c32, - 0x0c33, 0x0c35, 0x0c36, 0x0c38, 0x0c39, 0x0c3b, 0x0c3c, 0x0c3e, - 0x0c40, 0x0c41, 0x0c43, 0x0c44, 0x0c46, 0x0c47, 0x0c49, 0x0c4b, - 0x0c4c, 0x0c4e, 0x0c4f, 0x0c51, 0x0c52, 0x0c54, 0x0c56, 0x0c57, - 0x0c59, 0x0c5a, 0x0c5c, 0x0c5d, 0x0c5f, 0x0c61, 0x0c62, 0x0c64, - 0x0c65, 0x0c67, 0x0c69, 0x0c6a, 0x0c6c, 0x0c6d, 0x0c6f, 0x0c70, - 0x0c72, 0x0c74, 0x0c75, 0x0c77, 0x0c78, 0x0c7a, 0x0c7c, 0x0c7d, - 0x0c7f, 0x0c80, 0x0c82, 0x0c84, 0x0c85, 0x0c87, 0x0c89, 0x0c8a, - 0x0c8c, 0x0c8d, 0x0c8f, 0x0c91, 0x0c92, 0x0c94, 0x0c95, 0x0c97, - 0x0c99, 0x0c9a, 0x0c9c, 0x0c9e, 0x0c9f, 0x0ca1, 0x0ca3, 0x0ca4, - 0x0ca6, 0x0ca7, 0x0ca9, 0x0cab, 0x0cac, 0x0cae, 0x0cb0, 0x0cb1, - 0x0cb3, 0x0cb5, 0x0cb6, 0x0cb8, 0x0cba, 0x0cbb, 0x0cbd, 0x0cbe, - 0x0cc0, 0x0cc2, 0x0cc3, 0x0cc5, 0x0cc7, 0x0cc8, 0x0cca, 0x0ccc, - 0x0ccd, 0x0ccf, 0x0cd1, 0x0cd2, 0x0cd4, 0x0cd6, 0x0cd7, 0x0cd9, - 0x0cdb, 0x0cdc, 0x0cde, 0x0ce0, 0x0ce1, 0x0ce3, 0x0ce5, 0x0ce7, - 0x0ce8, 0x0cea, 0x0cec, 0x0ced, 0x0cef, 0x0cf1, 0x0cf2, 0x0cf4, - 0x0cf6, 0x0cf7, 0x0cf9, 0x0cfb, 0x0cfd, 0x0cfe, 0x0d00, 0x0d02, - 0x0d03, 0x0d05, 0x0d07, 0x0d08, 0x0d0a, 0x0d0c, 0x0d0e, 0x0d0f, - 0x0d11, 0x0d13, 0x0d14, 0x0d16, 0x0d18, 0x0d1a, 0x0d1b, 0x0d1d, - 0x0d1f, 0x0d20, 0x0d22, 0x0d24, 0x0d26, 0x0d27, 0x0d29, 0x0d2b, - 0x0d2d, 0x0d2e, 0x0d30, 0x0d32, 0x0d34, 0x0d35, 0x0d37, 0x0d39, - 0x0d3b, 0x0d3c, 0x0d3e, 0x0d40, 0x0d42, 0x0d43, 0x0d45, 0x0d47, - 0x0d49, 0x0d4a, 0x0d4c, 0x0d4e, 0x0d50, 0x0d51, 0x0d53, 0x0d55, - 0x0d57, 0x0d58, 0x0d5a, 0x0d5c, 0x0d5e, 0x0d5f, 0x0d61, 0x0d63, - 0x0d65, 0x0d67, 0x0d68, 0x0d6a, 0x0d6c, 0x0d6e, 0x0d6f, 0x0d71, - 0x0d73, 0x0d75, 0x0d77, 0x0d78, 0x0d7a, 0x0d7c, 0x0d7e, 0x0d7f, - 0x0d81, 0x0d83, 0x0d85, 0x0d87, 0x0d88, 0x0d8a, 0x0d8c, 0x0d8e, - 0x0d90, 0x0d91, 0x0d93, 0x0d95, 0x0d97, 0x0d99, 0x0d9b, 0x0d9c, - 0x0d9e, 0x0da0, 0x0da2, 0x0da4, 0x0da5, 0x0da7, 0x0da9, 0x0dab, - 0x0dad, 0x0daf, 0x0db0, 0x0db2, 0x0db4, 0x0db6, 0x0db8, 0x0dba, - 0x0dbb, 0x0dbd, 0x0dbf, 0x0dc1, 0x0dc3, 0x0dc5, 0x0dc6, 0x0dc8, - 0x0dca, 0x0dcc, 0x0dce, 0x0dd0, 0x0dd1, 0x0dd3, 0x0dd5, 0x0dd7, - 0x0dd9, 0x0ddb, 0x0ddd, 0x0dde, 0x0de0, 0x0de2, 0x0de4, 0x0de6, - 0x0de8, 0x0dea, 0x0deb, 0x0ded, 0x0def, 0x0df1, 0x0df3, 0x0df5, - 0x0df7, 0x0df9, 0x0dfa, 0x0dfc, 0x0dfe, 0x0e00, 0x0e02, 0x0e04, - 0x0e06, 0x0e08, 0x0e09, 0x0e0b, 0x0e0d, 0x0e0f, 0x0e11, 0x0e13, - 0x0e15, 0x0e17, 0x0e19, 0x0e1b, 0x0e1c, 0x0e1e, 0x0e20, 0x0e22, - 0x0e24, 0x0e26, 0x0e28, 0x0e2a, 0x0e2c, 0x0e2e, 0x0e2f, 0x0e31, - 0x0e33, 0x0e35, 0x0e37, 0x0e39, 0x0e3b, 0x0e3d, 0x0e3f, 0x0e41, - 0x0e43, 0x0e45, 0x0e47, 0x0e48, 0x0e4a, 0x0e4c, 0x0e4e, 0x0e50, - 0x0e52, 0x0e54, 0x0e56, 0x0e58, 0x0e5a, 0x0e5c, 0x0e5e, 0x0e60, - 0x0e62, 0x0e64, 0x0e66, 0x0e67, 0x0e69, 0x0e6b, 0x0e6d, 0x0e6f, - 0x0e71, 0x0e73, 0x0e75, 0x0e77, 0x0e79, 0x0e7b, 0x0e7d, 0x0e7f, - 0x0e81, 0x0e83, 0x0e85, 0x0e87, 0x0e89, 0x0e8b, 0x0e8d, 0x0e8f, - 0x0e91, 0x0e93, 0x0e95, 0x0e97, 0x0e99, 0x0e9b, 0x0e9d, 0x0e9f, - 0x0ea0, 0x0ea2, 0x0ea4, 0x0ea6, 0x0ea8, 0x0eaa, 0x0eac, 0x0eae, - 0x0eb0, 0x0eb2, 0x0eb4, 0x0eb6, 0x0eb8, 0x0eba, 0x0ebc, 0x0ebe, - 0x0ec0, 0x0ec2, 0x0ec4, 0x0ec6, 0x0ec8, 0x0eca, 0x0ecc, 0x0ece, - 0x0ed1, 0x0ed3, 0x0ed5, 0x0ed7, 0x0ed9, 0x0edb, 0x0edd, 0x0edf, - 0x0ee1, 0x0ee3, 0x0ee5, 0x0ee7, 0x0ee9, 0x0eeb, 0x0eed, 0x0eef, - 0x0ef1, 0x0ef3, 0x0ef5, 0x0ef7, 0x0ef9, 0x0efb, 0x0efd, 0x0eff, - 0x0f01, 0x0f03, 0x0f05, 0x0f07, 0x0f09, 0x0f0b, 0x0f0e, 0x0f10, - 0x0f12, 0x0f14, 0x0f16, 0x0f18, 0x0f1a, 0x0f1c, 0x0f1e, 0x0f20, - 0x0f22, 0x0f24, 0x0f26, 0x0f28, 0x0f2a, 0x0f2c, 0x0f2f, 0x0f31, - 0x0f33, 0x0f35, 0x0f37, 0x0f39, 0x0f3b, 0x0f3d, 0x0f3f, 0x0f41, - 0x0f43, 0x0f45, 0x0f48, 0x0f4a, 0x0f4c, 0x0f4e, 0x0f50, 0x0f52, - 0x0f54, 0x0f56, 0x0f58, 0x0f5a, 0x0f5d, 0x0f5f, 0x0f61, 0x0f63, - 0x0f65, 0x0f67, 0x0f69, 0x0f6b, 0x0f6d, 0x0f6f, 0x0f72, 0x0f74, - 0x0f76, 0x0f78, 0x0f7a, 0x0f7c, 0x0f7e, 0x0f80, 0x0f83, 0x0f85, - 0x0f87, 0x0f89, 0x0f8b, 0x0f8d, 0x0f8f, 0x0f91, 0x0f94, 0x0f96, - 0x0f98, 0x0f9a, 0x0f9c, 0x0f9e, 0x0fa0, 0x0fa3, 0x0fa5, 0x0fa7, - 0x0fa9, 0x0fab, 0x0fad, 0x0faf, 0x0fb2, 0x0fb4, 0x0fb6, 0x0fb8, - 0x0fba, 0x0fbc, 0x0fbf, 0x0fc1, 0x0fc3, 0x0fc5, 0x0fc7, 0x0fc9, - 0x0fcc, 0x0fce, 0x0fd0, 0x0fd2, 0x0fd4, 0x0fd6, 0x0fd9, 0x0fdb, - 0x0fdd, 0x0fdf, 0x0fe1, 0x0fe4, 0x0fe6, 0x0fe8, 0x0fea, 0x0fec, - 0x0fee, 0x0ff1, 0x0ff3, 0x0ff5, 0x0ff7, 0x0ff9, 0x0ffc, 0x0ffe, - 0x1000, 0x1002, 0x1004, 0x1007, 0x1009, 0x100b, 0x100d, 0x100f, - 0x1012, 0x1014, 0x1016, 0x1018, 0x101b, 0x101d, 0x101f, 0x1021, - 0x1024, 0x1026, 0x1028, 0x102a, 0x102d, 0x102f, 0x1031, 0x1033, - 0x1036, 0x1038, 0x103a, 0x103c, 0x103f, 0x1041, 0x1043, 0x1045, - 0x1048, 0x104a, 0x104c, 0x104f, 0x1051, 0x1053, 0x1055, 0x1058, - 0x105a, 0x105c, 0x105f, 0x1061, 0x1063, 0x1066, 0x1068, 0x106a, - 0x106d, 0x106f, 0x1071, 0x1074, 0x1076, 0x1078, 0x107b, 0x107d, - 0x107f, 0x1082, 0x1084, 0x1086, 0x1089, 0x108b, 0x108d, 0x1090, - 0x1092, 0x1094, 0x1097, 0x1099, 0x109c, 0x109e, 0x10a0, 0x10a3, - 0x10a5, 0x10a8, 0x10aa, 0x10ac, 0x10af, 0x10b1, 0x10b3, 0x10b6, - 0x10b8, 0x10bb, 0x10bd, 0x10c0, 0x10c2, 0x10c4, 0x10c7, 0x10c9, - 0x10cc, 0x10ce, 0x10d1, 0x10d3, 0x10d5, 0x10d8, 0x10da, 0x10dd, - 0x10df, 0x10e2, 0x10e4, 0x10e7, 0x10e9, 0x10eb, 0x10ee, 0x10f0, - 0x10f3, 0x10f5, 0x10f8, 0x10fa, 0x10fd, 0x10ff, 0x1102, 0x1104, - 0x1107, 0x1109, 0x110c, 0x110e, 0x1111, 0x1113, 0x1116, 0x1118, - 0x111b, 0x111d, 0x1120, 0x1122, 0x1125, 0x1127, 0x112a, 0x112c, - 0x112f, 0x1131, 0x1134, 0x1137, 0x1139, 0x113c, 0x113e, 0x1141, - 0x1143, 0x1146, 0x1148, 0x114b, 0x114d, 0x1150, 0x1153, 0x1155, - 0x1158, 0x115a, 0x115d, 0x1160, 0x1162, 0x1165, 0x1167, 0x116a, - 0x116c, 0x116f, 0x1172, 0x1174, 0x1177, 0x1179, 0x117c, 0x117f, - 0x1181, 0x1184, 0x1187, 0x1189, 0x118c, 0x118e, 0x1191, 0x1194, - 0x1196, 0x1199, 0x119c, 0x119e, 0x11a1, 0x11a4, 0x11a6, 0x11a9, - 0x11ac, 0x11ae, 0x11b1, 0x11b4, 0x11b6, 0x11b9, 0x11bc, 0x11be, - 0x11c1, 0x11c4, 0x11c6, 0x11c9, 0x11cc, 0x11ce, 0x11d1, 0x11d4, - 0x11d6, 0x11d9, 0x11dc, 0x11df, 0x11e1, 0x11e4, 0x11e7, 0x11e9, - 0x11ec, 0x11ef, 0x11f2, 0x11f4, 0x11f7, 0x11fa, 0x11fd, 0x11ff, - 0x1202, 0x1205, 0x1208, 0x120a, 0x120d, 0x1210, 0x1213, 0x1215, - 0x1218, 0x121b, 0x121e, 0x1220, 0x1223, 0x1226, 0x1229, 0x122c, - 0x122e, 0x1231, 0x1234, 0x1237, 0x123a, 0x123c, 0x123f, 0x1242, - 0x1245, 0x1248, 0x124a, 0x124d, 0x1250, 0x1253, 0x1256, 0x1259, - 0x125b, 0x125e, 0x1261, 0x1264, 0x1267, 0x126a, 0x126c, 0x126f, - 0x1272, 0x1275, 0x1278, 0x127b, 0x127e, 0x1280, 0x1283, 0x1286, - 0x1289, 0x128c, 0x128f, 0x1292, 0x1295, 0x1297, 0x129a, 0x129d, - 0x12a0, 0x12a3, 0x12a6, 0x12a9, 0x12ac, 0x12af, 0x12b2, 0x12b4, - 0x12b7, 0x12ba, 0x12bd, 0x12c0, 0x12c3, 0x12c6, 0x12c9, 0x12cc, - 0x12cf, 0x12d2, 0x12d5, 0x12d8, 0x12db, 0x12de, 0x12e1, 0x12e3, - 0x12e6, 0x12e9, 0x12ec, 0x12ef, 0x12f2, 0x12f5, 0x12f8, 0x12fb, - 0x12fe, 0x1301, 0x1304, 0x1307, 0x130a, 0x130d, 0x1310, 0x1313, - 0x1316, 0x1319, 0x131c, 0x131f, 0x1322, 0x1325, 0x1328, 0x132b, - 0x132e, 0x1331, 0x1334, 0x1337, 0x133a, 0x133d, 0x1341, 0x1344, - 0x1347, 0x134a, 0x134d, 0x1350, 0x1353, 0x1356, 0x1359, 0x135c, - 0x135f, 0x1362, 0x1365, 0x1368, 0x136b, 0x136e, 0x1372, 0x1375, - 0x1378, 0x137b, 0x137e, 0x1381, 0x1384, 0x1387, 0x138a, 0x138d, - 0x1391, 0x1394, 0x1397, 0x139a, 0x139d, 0x13a0, 0x13a3, 0x13a6, - 0x13aa, 0x13ad, 0x13b0, 0x13b3, 0x13b6, 0x13b9, 0x13bc, 0x13c0, - 0x13c3, 0x13c6, 0x13c9, 0x13cc, 0x13cf, 0x13d3, 0x13d6, 0x13d9, - 0x13dc, 0x13df, 0x13e2, 0x13e6, 0x13e9, 0x13ec, 0x13ef, 0x13f2, - 0x13f6, 0x13f9, 0x13fc, 0x13ff, 0x1401, 0x1403, 0x1404, 0x1406, - 0x1408, 0x1409, 0x140b, 0x140d, 0x140e, 0x1410, 0x1411, 0x1413, - 0x1415, 0x1416, 0x1418, 0x1419, 0x141b, 0x141d, 0x141e, 0x1420, - 0x1422, 0x1423, 0x1425, 0x1427, 0x1428, 0x142a, 0x142b, 0x142d, - 0x142f, 0x1430, 0x1432, 0x1434, 0x1435, 0x1437, 0x1439, 0x143a, - 0x143c, 0x143e, 0x143f, 0x1441, 0x1443, 0x1444, 0x1446, 0x1448, - 0x1449, 0x144b, 0x144d, 0x144e, 0x1450, 0x1452, 0x1453, 0x1455, - 0x1457, 0x1458, 0x145a, 0x145c, 0x145d, 0x145f, 0x1461, 0x1462, - 0x1464, 0x1466, 0x1467, 0x1469, 0x146b, 0x146d, 0x146e, 0x1470, - 0x1472, 0x1473, 0x1475, 0x1477, 0x1478, 0x147a, 0x147c, 0x147e, - 0x147f, 0x1481, 0x1483, 0x1484, 0x1486, 0x1488, 0x148a, 0x148b, - 0x148d, 0x148f, 0x1490, 0x1492, 0x1494, 0x1496, 0x1497, 0x1499, - 0x149b, 0x149d, 0x149e, 0x14a0, 0x14a2, 0x14a4, 0x14a5, 0x14a7, - 0x14a9, 0x14ab, 0x14ac, 0x14ae, 0x14b0, 0x14b2, 0x14b3, 0x14b5, - 0x14b7, 0x14b9, 0x14ba, 0x14bc, 0x14be, 0x14c0, 0x14c1, 0x14c3, - 0x14c5, 0x14c7, 0x14c8, 0x14ca, 0x14cc, 0x14ce, 0x14cf, 0x14d1, - 0x14d3, 0x14d5, 0x14d7, 0x14d8, 0x14da, 0x14dc, 0x14de, 0x14e0, - 0x14e1, 0x14e3, 0x14e5, 0x14e7, 0x14e8, 0x14ea, 0x14ec, 0x14ee, - 0x14f0, 0x14f1, 0x14f3, 0x14f5, 0x14f7, 0x14f9, 0x14fa, 0x14fc, - 0x14fe, 0x1500, 0x1502, 0x1504, 0x1505, 0x1507, 0x1509, 0x150b, - 0x150d, 0x150e, 0x1510, 0x1512, 0x1514, 0x1516, 0x1518, 0x1519, - 0x151b, 0x151d, 0x151f, 0x1521, 0x1523, 0x1524, 0x1526, 0x1528, - 0x152a, 0x152c, 0x152e, 0x1530, 0x1531, 0x1533, 0x1535, 0x1537, - 0x1539, 0x153b, 0x153d, 0x153e, 0x1540, 0x1542, 0x1544, 0x1546, - 0x1548, 0x154a, 0x154b, 0x154d, 0x154f, 0x1551, 0x1553, 0x1555, - 0x1557, 0x1559, 0x155a, 0x155c, 0x155e, 0x1560, 0x1562, 0x1564, - 0x1566, 0x1568, 0x156a, 0x156b, 0x156d, 0x156f, 0x1571, 0x1573, - 0x1575, 0x1577, 0x1579, 0x157b, 0x157d, 0x157e, 0x1580, 0x1582, - 0x1584, 0x1586, 0x1588, 0x158a, 0x158c, 0x158e, 0x1590, 0x1592, - 0x1594, 0x1595, 0x1597, 0x1599, 0x159b, 0x159d, 0x159f, 0x15a1, - 0x15a3, 0x15a5, 0x15a7, 0x15a9, 0x15ab, 0x15ad, 0x15af, 0x15b1, - 0x15b3, 0x15b4, 0x15b6, 0x15b8, 0x15ba, 0x15bc, 0x15be, 0x15c0, - 0x15c2, 0x15c4, 0x15c6, 0x15c8, 0x15ca, 0x15cc, 0x15ce, 0x15d0, - 0x15d2, 0x15d4, 0x15d6, 0x15d8, 0x15da, 0x15dc, 0x15de, 0x15e0, - 0x15e2, 0x15e4, 0x15e6, 0x15e8, 0x15ea, 0x15ec, 0x15ee, 0x15f0, - 0x15f2, 0x15f4, 0x15f6, 0x15f8, 0x15fa, 0x15fc, 0x15fe, 0x1600, - 0x1602, 0x1604, 0x1606, 0x1608, 0x160a, 0x160c, 0x160e, 0x1610, - 0x1612, 0x1614, 0x1616, 0x1618, 0x161a, 0x161c, 0x161e, 0x1620, - 0x1622, 0x1624, 0x1626, 0x1628, 0x162a, 0x162c, 0x162e, 0x1630, - 0x1632, 0x1634, 0x1636, 0x1638, 0x163a, 0x163c, 0x163e, 0x1640, - 0x1642, 0x1644, 0x1647, 0x1649, 0x164b, 0x164d, 0x164f, 0x1651, - 0x1653, 0x1655, 0x1657, 0x1659, 0x165b, 0x165d, 0x165f, 0x1661, - 0x1663, 0x1665, 0x1668, 0x166a, 0x166c, 0x166e, 0x1670, 0x1672, - 0x1674, 0x1676, 0x1678, 0x167a, 0x167c, 0x167e, 0x1681, 0x1683, - 0x1685, 0x1687, 0x1689, 0x168b, 0x168d, 0x168f, 0x1691, 0x1693, - 0x1696, 0x1698, 0x169a, 0x169c, 0x169e, 0x16a0, 0x16a2, 0x16a4, - 0x16a6, 0x16a9, 0x16ab, 0x16ad, 0x16af, 0x16b1, 0x16b3, 0x16b5, - 0x16b7, 0x16ba, 0x16bc, 0x16be, 0x16c0, 0x16c2, 0x16c4, 0x16c6, - 0x16c9, 0x16cb, 0x16cd, 0x16cf, 0x16d1, 0x16d3, 0x16d5, 0x16d8, - 0x16da, 0x16dc, 0x16de, 0x16e0, 0x16e2, 0x16e4, 0x16e7, 0x16e9, - 0x16eb, 0x16ed, 0x16ef, 0x16f1, 0x16f4, 0x16f6, 0x16f8, 0x16fa, - 0x16fc, 0x16ff, 0x1701, 0x1703, 0x1705, 0x1707, 0x1709, 0x170c, - 0x170e, 0x1710, 0x1712, 0x1714, 0x1717, 0x1719, 0x171b, 0x171d, - 0x171f, 0x1722, 0x1724, 0x1726, 0x1728, 0x172a, 0x172d, 0x172f, - 0x1731, 0x1733, 0x1735, 0x1738, 0x173a, 0x173c, 0x173e, 0x1740, - 0x1743, 0x1745, 0x1747, 0x1749, 0x174c, 0x174e, 0x1750, 0x1752, - 0x1755, 0x1757, 0x1759, 0x175b, 0x175d, 0x1760, 0x1762, 0x1764, - 0x1766, 0x1769, 0x176b, 0x176d, 0x176f, 0x1772, 0x1774, 0x1776, - 0x1778, 0x177b, 0x177d, 0x177f, 0x1781, 0x1784, 0x1786, 0x1788, - 0x178b, 0x178d, 0x178f, 0x1791, 0x1794, 0x1796, 0x1798, 0x179a, - 0x179d, 0x179f, 0x17a1, 0x17a4, 0x17a6, 0x17a8, 0x17aa, 0x17ad, - 0x17af, 0x17b1, 0x17b4, 0x17b6, 0x17b8, 0x17bb, 0x17bd, 0x17bf, - 0x17c1, 0x17c4, 0x17c6, 0x17c8, 0x17cb, 0x17cd, 0x17cf, 0x17d2, - 0x17d4, 0x17d6, 0x17d9, 0x17db, 0x17dd, 0x17e0, 0x17e2, 0x17e4, - 0x17e6, 0x17e9, 0x17eb, 0x17ed, 0x17f0, 0x17f2, 0x17f4, 0x17f7, - 0x17f9, 0x17fb, 0x17fe, 0x1800, 0x1801, 0x1802, 0x1804, 0x1805, - 0x1806, 0x1807, 0x1808, 0x1809, 0x180b, 0x180c, 0x180d, 0x180e, - 0x180f, 0x1811, 0x1812, 0x1813, 0x1814, 0x1815, 0x1816, 0x1818, - 0x1819, 0x181a, 0x181b, 0x181c, 0x181e, 0x181f, 0x1820, 0x1821, - 0x1822, 0x1824, 0x1825, 0x1826, 0x1827, 0x1828, 0x182a, 0x182b, - 0x182c, 0x182d, 0x182e, 0x1830, 0x1831, 0x1832, 0x1833, 0x1834, - 0x1836, 0x1837, 0x1838, 0x1839, 0x183a, 0x183c, 0x183d, 0x183e, - 0x183f, 0x1840, 0x1842, 0x1843, 0x1844, 0x1845, 0x1846, 0x1848, - 0x1849, 0x184a, 0x184b, 0x184d, 0x184e, 0x184f, 0x1850, 0x1851, - 0x1853, 0x1854, 0x1855, 0x1856, 0x1858, 0x1859, 0x185a, 0x185b, - 0x185c, 0x185e, 0x185f, 0x1860, 0x1861, 0x1863, 0x1864, 0x1865, - 0x1866, 0x1868, 0x1869, 0x186a, 0x186b, 0x186c, 0x186e, 0x186f, - 0x1870, 0x1871, 0x1873, 0x1874, 0x1875, 0x1876, 0x1878, 0x1879, - 0x187a, 0x187b, 0x187d, 0x187e, 0x187f, 0x1880, 0x1882, 0x1883, - 0x1884, 0x1885, 0x1887, 0x1888, 0x1889, 0x188a, 0x188c, 0x188d, - 0x188e, 0x188f, 0x1891, 0x1892, 0x1893, 0x1894, 0x1896, 0x1897, - 0x1898, 0x189b, 0x189d, 0x18a0, 0x18a2, 0x18a5, 0x18a7, 0x18aa, - 0x18ad, 0x18af, 0x18b2, 0x18b4, 0x18b7, 0x18b9, 0x18bc, 0x18bf, - 0x18c1, 0x18c4, 0x18c6, 0x18c9, 0x18cb, 0x18ce, 0x18d1, 0x18d3, - 0x18d6, 0x18d8, 0x18db, 0x18de, 0x18e0, 0x18e3, 0x18e5, 0x18e8, - 0x18eb, 0x18ed, 0x18f0, 0x18f3, 0x18f5, 0x18f8, 0x18fa, 0x18fd, - 0x1900, 0x1902, 0x1905, 0x1908, 0x190a, 0x190d, 0x1910, 0x1912, - 0x1915, 0x1918, 0x191a, 0x191d, 0x1920, 0x1922, 0x1925, 0x1928, - 0x192a, 0x192d, 0x1930, 0x1933, 0x1935, 0x1938, 0x193b, 0x193d, - 0x1940, 0x1943, 0x1946, 0x1948, 0x194b, 0x194e, 0x1950, 0x1953, - 0x1956, 0x1959, 0x195b, 0x195e, 0x1961, 0x1964, 0x1966, 0x1969, - 0x196c, 0x196f, 0x1972, 0x1974, 0x1977, 0x197a, 0x197d, 0x197f, - 0x1982, 0x1985, 0x1988, 0x198b, 0x198d, 0x1990, 0x1993, 0x1996, - 0x1999, 0x199b, 0x199e, 0x19a1, 0x19a4, 0x19a7, 0x19aa, 0x19ac, - 0x19af, 0x19b2, 0x19b5, 0x19b8, 0x19bb, 0x19bd, 0x19c0, 0x19c3, - 0x19c6, 0x19c9, 0x19cc, 0x19cf, 0x19d1, 0x19d4, 0x19d7, 0x19da, - 0x19dd, 0x19e0, 0x19e3, 0x19e6, 0x19e9, 0x19eb, 0x19ee, 0x19f1, - 0x19f4, 0x19f7, 0x19fa, 0x19fd, 0x1a00, 0x1a03, 0x1a06, 0x1a09, - 0x1a0c, 0x1a0f, 0x1a11, 0x1a14, 0x1a17, 0x1a1a, 0x1a1d, 0x1a20, - 0x1a23, 0x1a26, 0x1a29, 0x1a2c, 0x1a2f, 0x1a32, 0x1a35, 0x1a38, - 0x1a3b, 0x1a3e, 0x1a41, 0x1a44, 0x1a47, 0x1a4a, 0x1a4d, 0x1a50, - 0x1a53, 0x1a56, 0x1a59, 0x1a5c, 0x1a5f, 0x1a62, 0x1a65, 0x1a68, - 0x1a6b, 0x1a6e, 0x1a71, 0x1a74, 0x1a77, 0x1a7a, 0x1a7d, 0x1a80, - 0x1a83, 0x1a86, 0x1a8a, 0x1a8d, 0x1a90, 0x1a93, 0x1a96, 0x1a99, - 0x1a9c, 0x1a9f, 0x1aa2, 0x1aa5, 0x1aa8, 0x1aab, 0x1aaf, 0x1ab2, - 0x1ab5, 0x1ab8, 0x1abb, 0x1abe, 0x1ac1, 0x1ac4, 0x1ac7, 0x1acb, - 0x1ace, 0x1ad1, 0x1ad4, 0x1ad7, 0x1ada, 0x1add, 0x1ae1, 0x1ae4, - 0x1ae7, 0x1aea, 0x1aed, 0x1af0, 0x1af3, 0x1af7, 0x1afa, 0x1afd, - 0x1b00, 0x1b03, 0x1b07, 0x1b0a, 0x1b0d, 0x1b10, 0x1b13, 0x1b16, - 0x1b1a, 0x1b1d, 0x1b20, 0x1b23, 0x1b27, 0x1b2a, 0x1b2d, 0x1b30, - 0x1b33, 0x1b37, 0x1b3a, 0x1b3d, 0x1b40, 0x1b44, 0x1b47, 0x1b4a, - 0x1b4d, 0x1b51, 0x1b54, 0x1b57, 0x1b5a, 0x1b5e, 0x1b61, 0x1b64, - 0x1b67, 0x1b6b, 0x1b6e, 0x1b71, 0x1b75, 0x1b78, 0x1b7b, 0x1b7e, - 0x1b82, 0x1b85, 0x1b88, 0x1b8c, 0x1b8f, 0x1b92, 0x1b96, 0x1b99, - 0x1b9c, 0x1ba0, 0x1ba3, 0x1ba6, 0x1baa, 0x1bad, 0x1bb0, 0x1bb4, - 0x1bb7, 0x1bba, 0x1bbe, 0x1bc1, 0x1bc4, 0x1bc8, 0x1bcb, 0x1bcf, - 0x1bd2, 0x1bd5, 0x1bd9, 0x1bdc, 0x1be0, 0x1be3, 0x1be6, 0x1bea, - 0x1bed, 0x1bf0, 0x1bf4, 0x1bf7, 0x1bfb, 0x1bfe, 0x1c01, 0x1c02, - 0x1c04, 0x1c06, 0x1c08, 0x1c09, 0x1c0b, 0x1c0d, 0x1c0f, 0x1c10, - 0x1c12, 0x1c14, 0x1c15, 0x1c17, 0x1c19, 0x1c1b, 0x1c1c, 0x1c1e, - 0x1c20, 0x1c22, 0x1c23, 0x1c25, 0x1c27, 0x1c29, 0x1c2a, 0x1c2c, - 0x1c2e, 0x1c30, 0x1c31, 0x1c33, 0x1c35, 0x1c37, 0x1c38, 0x1c3a, - 0x1c3c, 0x1c3e, 0x1c3f, 0x1c41, 0x1c43, 0x1c45, 0x1c46, 0x1c48, - 0x1c4a, 0x1c4c, 0x1c4e, 0x1c4f, 0x1c51, 0x1c53, 0x1c55, 0x1c56, - 0x1c58, 0x1c5a, 0x1c5c, 0x1c5e, 0x1c5f, 0x1c61, 0x1c63, 0x1c65, - 0x1c67, 0x1c68, 0x1c6a, 0x1c6c, 0x1c6e, 0x1c70, 0x1c71, 0x1c73, - 0x1c75, 0x1c77, 0x1c79, 0x1c7b, 0x1c7c, 0x1c7e, 0x1c80, 0x1c82, - 0x1c84, 0x1c85, 0x1c87, 0x1c89, 0x1c8b, 0x1c8d, 0x1c8f, 0x1c90, - 0x1c92, 0x1c94, 0x1c96, 0x1c98, 0x1c9a, 0x1c9c, 0x1c9d, 0x1c9f, - 0x1ca1, 0x1ca3, 0x1ca5, 0x1ca7, 0x1ca8, 0x1caa, 0x1cac, 0x1cae, - 0x1cb0, 0x1cb2, 0x1cb4, 0x1cb6, 0x1cb7, 0x1cb9, 0x1cbb, 0x1cbd, - 0x1cbf, 0x1cc1, 0x1cc3, 0x1cc5, 0x1cc6, 0x1cc8, 0x1cca, 0x1ccc, - 0x1cce, 0x1cd0, 0x1cd2, 0x1cd4, 0x1cd6, 0x1cd7, 0x1cd9, 0x1cdb, - 0x1cdd, 0x1cdf, 0x1ce1, 0x1ce3, 0x1ce5, 0x1ce7, 0x1ce9, 0x1cea, - 0x1cec, 0x1cee, 0x1cf0, 0x1cf2, 0x1cf4, 0x1cf6, 0x1cf8, 0x1cfa, - 0x1cfc, 0x1cfe, 0x1d00, 0x1d02, 0x1d03, 0x1d05, 0x1d07, 0x1d09, - 0x1d0b, 0x1d0d, 0x1d0f, 0x1d11, 0x1d13, 0x1d15, 0x1d17, 0x1d19, - 0x1d1b, 0x1d1d, 0x1d1f, 0x1d21, 0x1d23, 0x1d25, 0x1d27, 0x1d29, - 0x1d2a, 0x1d2c, 0x1d2e, 0x1d30, 0x1d32, 0x1d34, 0x1d36, 0x1d38, - 0x1d3a, 0x1d3c, 0x1d3e, 0x1d40, 0x1d42, 0x1d44, 0x1d46, 0x1d48, - 0x1d4a, 0x1d4c, 0x1d4e, 0x1d50, 0x1d52, 0x1d54, 0x1d56, 0x1d58, - 0x1d5a, 0x1d5c, 0x1d5e, 0x1d60, 0x1d62, 0x1d64, 0x1d66, 0x1d68, - 0x1d6a, 0x1d6c, 0x1d6e, 0x1d70, 0x1d72, 0x1d74, 0x1d76, 0x1d78, - 0x1d7a, 0x1d7c, 0x1d7e, 0x1d80, 0x1d83, 0x1d85, 0x1d87, 0x1d89, - 0x1d8b, 0x1d8d, 0x1d8f, 0x1d91, 0x1d93, 0x1d95, 0x1d97, 0x1d99, - 0x1d9b, 0x1d9d, 0x1d9f, 0x1da1, 0x1da3, 0x1da5, 0x1da7, 0x1daa, - 0x1dac, 0x1dae, 0x1db0, 0x1db2, 0x1db4, 0x1db6, 0x1db8, 0x1dba, - 0x1dbc, 0x1dbe, 0x1dc0, 0x1dc2, 0x1dc5, 0x1dc7, 0x1dc9, 0x1dcb, - 0x1dcd, 0x1dcf, 0x1dd1, 0x1dd3, 0x1dd5, 0x1dd7, 0x1dd9, 0x1ddc, - 0x1dde, 0x1de0, 0x1de2, 0x1de4, 0x1de6, 0x1de8, 0x1dea, 0x1dec, - 0x1def, 0x1df1, 0x1df3, 0x1df5, 0x1df7, 0x1df9, 0x1dfb, 0x1dfd, - 0x1e00, 0x1e02, 0x1e04, 0x1e06, 0x1e08, 0x1e0a, 0x1e0c, 0x1e0f, - 0x1e11, 0x1e13, 0x1e15, 0x1e17, 0x1e19, 0x1e1b, 0x1e1e, 0x1e20, - 0x1e22, 0x1e24, 0x1e26, 0x1e28, 0x1e2b, 0x1e2d, 0x1e2f, 0x1e31, - 0x1e33, 0x1e35, 0x1e38, 0x1e3a, 0x1e3c, 0x1e3e, 0x1e40, 0x1e42, - 0x1e45, 0x1e47, 0x1e49, 0x1e4b, 0x1e4d, 0x1e50, 0x1e52, 0x1e54, - 0x1e56, 0x1e58, 0x1e5b, 0x1e5d, 0x1e5f, 0x1e61, 0x1e63, 0x1e66, - 0x1e68, 0x1e6a, 0x1e6c, 0x1e6e, 0x1e71, 0x1e73, 0x1e75, 0x1e77, - 0x1e7a, 0x1e7c, 0x1e7e, 0x1e80, 0x1e82, 0x1e85, 0x1e87, 0x1e89, - 0x1e8b, 0x1e8e, 0x1e90, 0x1e92, 0x1e94, 0x1e97, 0x1e99, 0x1e9b, - 0x1e9d, 0x1ea0, 0x1ea2, 0x1ea4, 0x1ea6, 0x1ea9, 0x1eab, 0x1ead, - 0x1eaf, 0x1eb2, 0x1eb4, 0x1eb6, 0x1eb8, 0x1ebb, 0x1ebd, 0x1ebf, - 0x1ec2, 0x1ec4, 0x1ec6, 0x1ec8, 0x1ecb, 0x1ecd, 0x1ecf, 0x1ed2, - 0x1ed4, 0x1ed6, 0x1ed8, 0x1edb, 0x1edd, 0x1edf, 0x1ee2, 0x1ee4, - 0x1ee6, 0x1ee8, 0x1eeb, 0x1eed, 0x1eef, 0x1ef2, 0x1ef4, 0x1ef6, - 0x1ef9, 0x1efb, 0x1efd, 0x1f00, 0x1f02, 0x1f04, 0x1f07, 0x1f09, - 0x1f0b, 0x1f0e, 0x1f10, 0x1f12, 0x1f15, 0x1f17, 0x1f19, 0x1f1c, - 0x1f1e, 0x1f20, 0x1f23, 0x1f25, 0x1f27, 0x1f2a, 0x1f2c, 0x1f2e, - 0x1f31, 0x1f33, 0x1f35, 0x1f38, 0x1f3a, 0x1f3c, 0x1f3f, 0x1f41, - 0x1f44, 0x1f46, 0x1f48, 0x1f4b, 0x1f4d, 0x1f4f, 0x1f52, 0x1f54, - 0x1f57, 0x1f59, 0x1f5b, 0x1f5e, 0x1f60, 0x1f62, 0x1f65, 0x1f67, - 0x1f6a, 0x1f6c, 0x1f6e, 0x1f71, 0x1f73, 0x1f76, 0x1f78, 0x1f7a, - 0x1f7d, 0x1f7f, 0x1f82, 0x1f84, 0x1f87, 0x1f89, 0x1f8b, 0x1f8e, - 0x1f90, 0x1f93, 0x1f95, 0x1f97, 0x1f9a, 0x1f9c, 0x1f9f, 0x1fa1, - 0x1fa4, 0x1fa6, 0x1fa8, 0x1fab, 0x1fad, 0x1fb0, 0x1fb2, 0x1fb5, - 0x1fb7, 0x1fba, 0x1fbc, 0x1fbe, 0x1fc1, 0x1fc3, 0x1fc6, 0x1fc8, - 0x1fcb, 0x1fcd, 0x1fd0, 0x1fd2, 0x1fd5, 0x1fd7, 0x1fda, 0x1fdc, - 0x1fde, 0x1fe1, 0x1fe3, 0x1fe6, 0x1fe8, 0x1feb, 0x1fed, 0x1ff0, - 0x1ff2, 0x1ff5, 0x1ff7, 0x1ffa, 0x1ffc, 0x1fff, 0x2001, 0x2002, - 0x2003, 0x2004, 0x2006, 0x2007, 0x2008, 0x2009, 0x200b, 0x200c, - 0x200d, 0x200e, 0x2010, 0x2011, 0x2012, 0x2013, 0x2015, 0x2016, - 0x2017, 0x2018, 0x201a, 0x201b, 0x201c, 0x201e, 0x201f, 0x2020, - 0x2021, 0x2023, 0x2024, 0x2025, 0x2026, 0x2028, 0x2029, 0x202a, - 0x202c, 0x202d, 0x202e, 0x202f, 0x2031, 0x2032, 0x2033, 0x2034, - 0x2036, 0x2037, 0x2038, 0x203a, 0x203b, 0x203c, 0x203d, 0x203f, - 0x2040, 0x2041, 0x2043, 0x2044, 0x2045, 0x2047, 0x2048, 0x2049, - 0x204a, 0x204c, 0x204d, 0x204e, 0x2050, 0x2051, 0x2052, 0x2054, - 0x2055, 0x2056, 0x2057, 0x2059, 0x205a, 0x205b, 0x205d, 0x205e, - 0x205f, 0x2061, 0x2062, 0x2063, 0x2065, 0x2066, 0x2067, 0x2068, - 0x206a, 0x206b, 0x206c, 0x206e, 0x206f, 0x2070, 0x2072, 0x2073, - 0x2074, 0x2076, 0x2077, 0x2078, 0x207a, 0x207b, 0x207c, 0x207e, - 0x207f, 0x2080, 0x2082, 0x2083, 0x2084, 0x2086, 0x2087, 0x2088, - 0x208a, 0x208b, 0x208c, 0x208e, 0x208f, 0x2090, 0x2092, 0x2093, - 0x2094, 0x2096, 0x2097, 0x2098, 0x209a, 0x209b, 0x209c, 0x209e, - 0x209f, 0x20a0, 0x20a2, 0x20a3, 0x20a5, 0x20a6, 0x20a7, 0x20a9, - 0x20aa, 0x20ab, 0x20ad, 0x20ae, 0x20af, 0x20b1, 0x20b2, 0x20b3, - 0x20b5, 0x20b6, 0x20b8, 0x20b9, 0x20ba, 0x20bc, 0x20bd, 0x20be, - 0x20c0, 0x20c1, 0x20c2, 0x20c4, 0x20c5, 0x20c7, 0x20c8, 0x20c9, - 0x20cb, 0x20cc, 0x20cd, 0x20cf, 0x20d0, 0x20d2, 0x20d3, 0x20d4, - 0x20d6, 0x20d7, 0x20d9, 0x20da, 0x20db, 0x20dd, 0x20de, 0x20df, - 0x20e1, 0x20e2, 0x20e4, 0x20e5, 0x20e6, 0x20e8, 0x20e9, 0x20eb, - 0x20ec, 0x20ed, 0x20ef, 0x20f0, 0x20f2, 0x20f3, 0x20f4, 0x20f6, - 0x20f7, 0x20f9, 0x20fa, 0x20fb, 0x20fd, 0x20fe, 0x2100, 0x2101, - 0x2102, 0x2104, 0x2105, 0x2107, 0x2108, 0x210a, 0x210b, 0x210c, - 0x210e, 0x210f, 0x2111, 0x2112, 0x2113, 0x2115, 0x2116, 0x2118, - 0x2119, 0x211b, 0x211c, 0x211d, 0x211f, 0x2120, 0x2122, 0x2123, - 0x2125, 0x2126, 0x2127, 0x2129, 0x212a, 0x212c, 0x212d, 0x212f, - 0x2130, 0x2131, 0x2133, 0x2134, 0x2136, 0x2137, 0x2139, 0x213a, - 0x213c, 0x213d, 0x213e, 0x2140, 0x2141, 0x2143, 0x2144, 0x2146, - 0x2147, 0x214a, 0x214d, 0x2150, 0x2153, 0x2156, 0x2159, 0x215c, - 0x215f, 0x2161, 0x2164, 0x2167, 0x216a, 0x216d, 0x2170, 0x2173, - 0x2176, 0x2179, 0x217c, 0x217f, 0x2182, 0x2185, 0x2188, 0x218b, - 0x218e, 0x2191, 0x2194, 0x2197, 0x219a, 0x219d, 0x21a0, 0x21a3, - 0x21a6, 0x21a9, 0x21ac, 0x21af, 0x21b2, 0x21b5, 0x21b8, 0x21bb, - 0x21be, 0x21c1, 0x21c4, 0x21c7, 0x21ca, 0x21cd, 0x21d0, 0x21d3, - 0x21d6, 0x21da, 0x21dd, 0x21e0, 0x21e3, 0x21e6, 0x21e9, 0x21ec, - 0x21ef, 0x21f2, 0x21f5, 0x21f8, 0x21fb, 0x21ff, 0x2202, 0x2205, - 0x2208, 0x220b, 0x220e, 0x2211, 0x2214, 0x2218, 0x221b, 0x221e, - 0x2221, 0x2224, 0x2227, 0x222b, 0x222e, 0x2231, 0x2234, 0x2237, - 0x223a, 0x223e, 0x2241, 0x2244, 0x2247, 0x224a, 0x224d, 0x2251, - 0x2254, 0x2257, 0x225a, 0x225e, 0x2261, 0x2264, 0x2267, 0x226a, - 0x226e, 0x2271, 0x2274, 0x2277, 0x227b, 0x227e, 0x2281, 0x2284, - 0x2288, 0x228b, 0x228e, 0x2291, 0x2295, 0x2298, 0x229b, 0x229f, - 0x22a2, 0x22a5, 0x22a8, 0x22ac, 0x22af, 0x22b2, 0x22b6, 0x22b9, - 0x22bc, 0x22c0, 0x22c3, 0x22c6, 0x22c9, 0x22cd, 0x22d0, 0x22d4, - 0x22d7, 0x22da, 0x22de, 0x22e1, 0x22e4, 0x22e8, 0x22eb, 0x22ee, - 0x22f2, 0x22f5, 0x22f8, 0x22fc, 0x22ff, 0x2303, 0x2306, 0x2309, - 0x230d, 0x2310, 0x2314, 0x2317, 0x231a, 0x231e, 0x2321, 0x2325, - 0x2328, 0x232c, 0x232f, 0x2332, 0x2336, 0x2339, 0x233d, 0x2340, - 0x2344, 0x2347, 0x234b, 0x234e, 0x2351, 0x2355, 0x2358, 0x235c, - 0x235f, 0x2363, 0x2366, 0x236a, 0x236d, 0x2371, 0x2374, 0x2378, - 0x237b, 0x237f, 0x2382, 0x2386, 0x2389, 0x238d, 0x2390, 0x2394, - 0x2398, 0x239b, 0x239f, 0x23a2, 0x23a6, 0x23a9, 0x23ad, 0x23b0, - 0x23b4, 0x23b8, 0x23bb, 0x23bf, 0x23c2, 0x23c6, 0x23c9, 0x23cd, - 0x23d1, 0x23d4, 0x23d8, 0x23db, 0x23df, 0x23e3, 0x23e6, 0x23ea, - 0x23ee, 0x23f1, 0x23f5, 0x23f8, 0x23fc, 0x2400, 0x2402, 0x2403, - 0x2405, 0x2407, 0x2409, 0x240b, 0x240d, 0x240e, 0x2410, 0x2412, - 0x2414, 0x2416, 0x2418, 0x241a, 0x241b, 0x241d, 0x241f, 0x2421, - 0x2423, 0x2425, 0x2426, 0x2428, 0x242a, 0x242c, 0x242e, 0x2430, - 0x2432, 0x2434, 0x2435, 0x2437, 0x2439, 0x243b, 0x243d, 0x243f, - 0x2441, 0x2443, 0x2444, 0x2446, 0x2448, 0x244a, 0x244c, 0x244e, - 0x2450, 0x2452, 0x2454, 0x2455, 0x2457, 0x2459, 0x245b, 0x245d, - 0x245f, 0x2461, 0x2463, 0x2465, 0x2467, 0x2469, 0x246b, 0x246c, - 0x246e, 0x2470, 0x2472, 0x2474, 0x2476, 0x2478, 0x247a, 0x247c, - 0x247e, 0x2480, 0x2482, 0x2484, 0x2486, 0x2488, 0x2489, 0x248b, - 0x248d, 0x248f, 0x2491, 0x2493, 0x2495, 0x2497, 0x2499, 0x249b, - 0x249d, 0x249f, 0x24a1, 0x24a3, 0x24a5, 0x24a7, 0x24a9, 0x24ab, - 0x24ad, 0x24af, 0x24b1, 0x24b3, 0x24b5, 0x24b7, 0x24b9, 0x24bb, - 0x24bd, 0x24bf, 0x24c1, 0x24c3, 0x24c5, 0x24c7, 0x24c9, 0x24cb, - 0x24cd, 0x24cf, 0x24d1, 0x24d3, 0x24d5, 0x24d7, 0x24d9, 0x24db, - 0x24dd, 0x24df, 0x24e1, 0x24e3, 0x24e5, 0x24e7, 0x24e9, 0x24eb, - 0x24ed, 0x24ef, 0x24f1, 0x24f3, 0x24f5, 0x24f7, 0x24fa, 0x24fc, - 0x24fe, 0x2500, 0x2502, 0x2504, 0x2506, 0x2508, 0x250a, 0x250c, - 0x250e, 0x2510, 0x2512, 0x2514, 0x2516, 0x2519, 0x251b, 0x251d, - 0x251f, 0x2521, 0x2523, 0x2525, 0x2527, 0x2529, 0x252b, 0x252d, - 0x252f, 0x2532, 0x2534, 0x2536, 0x2538, 0x253a, 0x253c, 0x253e, - 0x2540, 0x2542, 0x2545, 0x2547, 0x2549, 0x254b, 0x254d, 0x254f, - 0x2551, 0x2553, 0x2556, 0x2558, 0x255a, 0x255c, 0x255e, 0x2560, - 0x2562, 0x2564, 0x2567, 0x2569, 0x256b, 0x256d, 0x256f, 0x2571, - 0x2574, 0x2576, 0x2578, 0x257a, 0x257c, 0x257e, 0x2581, 0x2583, - 0x2585, 0x2587, 0x2589, 0x258b, 0x258e, 0x2590, 0x2592, 0x2594, - 0x2596, 0x2598, 0x259b, 0x259d, 0x259f, 0x25a1, 0x25a3, 0x25a6, - 0x25a8, 0x25aa, 0x25ac, 0x25ae, 0x25b1, 0x25b3, 0x25b5, 0x25b7, - 0x25b9, 0x25bc, 0x25be, 0x25c0, 0x25c2, 0x25c5, 0x25c7, 0x25c9, - 0x25cb, 0x25cd, 0x25d0, 0x25d2, 0x25d4, 0x25d6, 0x25d9, 0x25db, - 0x25dd, 0x25df, 0x25e2, 0x25e4, 0x25e6, 0x25e8, 0x25eb, 0x25ed, - 0x25ef, 0x25f1, 0x25f4, 0x25f6, 0x25f8, 0x25fa, 0x25fd, 0x25ff, - 0x2601, 0x2604, 0x2606, 0x2608, 0x260a, 0x260d, 0x260f, 0x2611, - 0x2614, 0x2616, 0x2618, 0x261a, 0x261d, 0x261f, 0x2621, 0x2624, - 0x2626, 0x2628, 0x262a, 0x262d, 0x262f, 0x2631, 0x2634, 0x2636, - 0x2638, 0x263b, 0x263d, 0x263f, 0x2642, 0x2644, 0x2646, 0x2649, - 0x264b, 0x264d, 0x2650, 0x2652, 0x2654, 0x2657, 0x2659, 0x265b, - 0x265e, 0x2660, 0x2662, 0x2665, 0x2667, 0x2669, 0x266c, 0x266e, - 0x2670, 0x2673, 0x2675, 0x2678, 0x267a, 0x267c, 0x267f, 0x2681, - 0x2683, 0x2686, 0x2688, 0x268b, 0x268d, 0x268f, 0x2692, 0x2694, - 0x2696, 0x2699, 0x269b, 0x269e, 0x26a0, 0x26a2, 0x26a5, 0x26a7, - 0x26aa, 0x26ac, 0x26ae, 0x26b1, 0x26b3, 0x26b6, 0x26b8, 0x26bb, - 0x26bd, 0x26bf, 0x26c2, 0x26c4, 0x26c7, 0x26c9, 0x26cc, 0x26ce, - 0x26d0, 0x26d3, 0x26d5, 0x26d8, 0x26da, 0x26dd, 0x26df, 0x26e1, - 0x26e4, 0x26e6, 0x26e9, 0x26eb, 0x26ee, 0x26f0, 0x26f3, 0x26f5, - 0x26f8, 0x26fa, 0x26fd, 0x26ff, 0x2701, 0x2704, 0x2706, 0x2709, - 0x270b, 0x270e, 0x2710, 0x2713, 0x2715, 0x2718, 0x271a, 0x271d, - 0x271f, 0x2722, 0x2724, 0x2727, 0x2729, 0x272c, 0x272e, 0x2731, - 0x2733, 0x2736, 0x2738, 0x273b, 0x273d, 0x2740, 0x2742, 0x2745, - 0x2747, 0x274a, 0x274c, 0x274f, 0x2752, 0x2754, 0x2757, 0x2759, - 0x275c, 0x275e, 0x2761, 0x2763, 0x2766, 0x2768, 0x276b, 0x276d, - 0x2770, 0x2773, 0x2775, 0x2778, 0x277a, 0x277d, 0x277f, 0x2782, - 0x2785, 0x2787, 0x278a, 0x278c, 0x278f, 0x2791, 0x2794, 0x2797, - 0x2799, 0x279c, 0x279e, 0x27a1, 0x27a4, 0x27a6, 0x27a9, 0x27ab, - 0x27ae, 0x27b0, 0x27b3, 0x27b6, 0x27b8, 0x27bb, 0x27be, 0x27c0, - 0x27c3, 0x27c5, 0x27c8, 0x27cb, 0x27cd, 0x27d0, 0x27d2, 0x27d5, - 0x27d8, 0x27da, 0x27dd, 0x27e0, 0x27e2, 0x27e5, 0x27e8, 0x27ea, - 0x27ed, 0x27ef, 0x27f2, 0x27f5, 0x27f7, 0x27fa, 0x27fd, 0x27ff, - 0x2801, 0x2802, 0x2804, 0x2805, 0x2806, 0x2808, 0x2809, 0x280a, - 0x280c, 0x280d, 0x280e, 0x2810, 0x2811, 0x2812, 0x2814, 0x2815, - 0x2816, 0x2818, 0x2819, 0x281a, 0x281c, 0x281d, 0x281e, 0x2820, - 0x2821, 0x2823, 0x2824, 0x2825, 0x2827, 0x2828, 0x2829, 0x282b, - 0x282c, 0x282d, 0x282f, 0x2830, 0x2831, 0x2833, 0x2834, 0x2836, - 0x2837, 0x2838, 0x283a, 0x283b, 0x283c, 0x283e, 0x283f, 0x2841, - 0x2842, 0x2843, 0x2845, 0x2846, 0x2847, 0x2849, 0x284a, 0x284c, - 0x284d, 0x284e, 0x2850, 0x2851, 0x2852, 0x2854, 0x2855, 0x2857, - 0x2858, 0x2859, 0x285b, 0x285c, 0x285e, 0x285f, 0x2860, 0x2862, - 0x2863, 0x2865, 0x2866, 0x2867, 0x2869, 0x286a, 0x286c, 0x286d, - 0x286e, 0x2870, 0x2871, 0x2873, 0x2874, 0x2875, 0x2877, 0x2878, - 0x287a, 0x287b, 0x287d, 0x287e, 0x287f, 0x2881, 0x2882, 0x2884, - 0x2885, 0x2886, 0x2888, 0x2889, 0x288b, 0x288c, 0x288e, 0x288f, - 0x2890, 0x2892, 0x2893, 0x2895, 0x2896, 0x2898, 0x2899, 0x289a, - 0x289c, 0x289d, 0x289f, 0x28a0, 0x28a2, 0x28a3, 0x28a4, 0x28a6, - 0x28a7, 0x28a9, 0x28aa, 0x28ac, 0x28ad, 0x28af, 0x28b0, 0x28b1, - 0x28b3, 0x28b4, 0x28b6, 0x28b7, 0x28b9, 0x28ba, 0x28bc, 0x28bd, - 0x28bf, 0x28c0, 0x28c2, 0x28c3, 0x28c4, 0x28c6, 0x28c7, 0x28c9, - 0x28ca, 0x28cc, 0x28cd, 0x28cf, 0x28d0, 0x28d2, 0x28d3, 0x28d5, - 0x28d6, 0x28d8, 0x28d9, 0x28da, 0x28dc, 0x28dd, 0x28df, 0x28e0, - 0x28e2, 0x28e3, 0x28e5, 0x28e6, 0x28e8, 0x28e9, 0x28eb, 0x28ec, - 0x28ee, 0x28ef, 0x28f1, 0x28f2, 0x28f4, 0x28f5, 0x28f7, 0x28f8, - 0x28fa, 0x28fb, 0x28fd, 0x28fe, 0x2900, 0x2901, 0x2903, 0x2904, - 0x2906, 0x2907, 0x2909, 0x290a, 0x290c, 0x290d, 0x290f, 0x2910, - 0x2912, 0x2913, 0x2915, 0x2916, 0x2918, 0x2919, 0x291b, 0x291c, - 0x291e, 0x291f, 0x2921, 0x2922, 0x2924, 0x2926, 0x2927, 0x2929, - 0x292a, 0x292c, 0x292d, 0x292f, 0x2930, 0x2932, 0x2933, 0x2935, - 0x2936, 0x2938, 0x2939, 0x293b, 0x293c, 0x293e, 0x2940, 0x2941, - 0x2943, 0x2944, 0x2946, 0x2947, 0x2949, 0x294a, 0x294c, 0x294d, - 0x294f, 0x2951, 0x2952, 0x2954, 0x2955, 0x2957, 0x2958, 0x295a, - 0x295b, 0x295d, 0x295f, 0x2960, 0x2962, 0x2963, 0x2965, 0x2966, - 0x2968, 0x296a, 0x296b, 0x296d, 0x296e, 0x2970, 0x2971, 0x2973, - 0x2975, 0x2976, 0x2978, 0x2979, 0x297b, 0x297c, 0x297e, 0x2980, - 0x2981, 0x2983, 0x2984, 0x2986, 0x2987, 0x2989, 0x298b, 0x298c, - 0x298e, 0x298f, 0x2991, 0x2993, 0x2994, 0x2996, 0x2997, 0x2999, - 0x299b, 0x299c, 0x299e, 0x299f, 0x29a1, 0x29a3, 0x29a4, 0x29a6, - 0x29a7, 0x29a9, 0x29ab, 0x29ac, 0x29ae, 0x29af, 0x29b1, 0x29b3, - 0x29b4, 0x29b6, 0x29b7, 0x29b9, 0x29bb, 0x29bc, 0x29be, 0x29c0, - 0x29c1, 0x29c3, 0x29c4, 0x29c6, 0x29c8, 0x29c9, 0x29cb, 0x29cd, - 0x29ce, 0x29d0, 0x29d1, 0x29d3, 0x29d5, 0x29d6, 0x29d8, 0x29da, - 0x29db, 0x29dd, 0x29df, 0x29e0, 0x29e2, 0x29e3, 0x29e5, 0x29e7, - 0x29e8, 0x29ea, 0x29ec, 0x29ed, 0x29ef, 0x29f1, 0x29f2, 0x29f4, - 0x29f6, 0x29f7, 0x29f9, 0x29fb, 0x29fc, 0x29fe, 0x29ff, 0x2a01, - 0x2a03, 0x2a04, 0x2a06, 0x2a08, 0x2a09, 0x2a0b, 0x2a0d, 0x2a0e, - 0x2a10, 0x2a13, 0x2a17, 0x2a1a, 0x2a1d, 0x2a21, 0x2a24, 0x2a28, - 0x2a2b, 0x2a2e, 0x2a32, 0x2a35, 0x2a38, 0x2a3c, 0x2a3f, 0x2a43, - 0x2a46, 0x2a49, 0x2a4d, 0x2a50, 0x2a54, 0x2a57, 0x2a5a, 0x2a5e, - 0x2a61, 0x2a65, 0x2a68, 0x2a6c, 0x2a6f, 0x2a72, 0x2a76, 0x2a79, - 0x2a7d, 0x2a80, 0x2a84, 0x2a87, 0x2a8b, 0x2a8e, 0x2a92, 0x2a95, - 0x2a99, 0x2a9c, 0x2aa0, 0x2aa3, 0x2aa7, 0x2aaa, 0x2aae, 0x2ab1, - 0x2ab5, 0x2ab8, 0x2abc, 0x2abf, 0x2ac3, 0x2ac6, 0x2aca, 0x2acd, - 0x2ad1, 0x2ad5, 0x2ad8, 0x2adc, 0x2adf, 0x2ae3, 0x2ae6, 0x2aea, - 0x2aee, 0x2af1, 0x2af5, 0x2af8, 0x2afc, 0x2b00, 0x2b03, 0x2b07, - 0x2b0a, 0x2b0e, 0x2b12, 0x2b15, 0x2b19, 0x2b1c, 0x2b20, 0x2b24, - 0x2b27, 0x2b2b, 0x2b2f, 0x2b32, 0x2b36, 0x2b3a, 0x2b3d, 0x2b41, - 0x2b45, 0x2b48, 0x2b4c, 0x2b50, 0x2b54, 0x2b57, 0x2b5b, 0x2b5f, - 0x2b62, 0x2b66, 0x2b6a, 0x2b6d, 0x2b71, 0x2b75, 0x2b79, 0x2b7c, - 0x2b80, 0x2b84, 0x2b88, 0x2b8b, 0x2b8f, 0x2b93, 0x2b97, 0x2b9a, - 0x2b9e, 0x2ba2, 0x2ba6, 0x2baa, 0x2bad, 0x2bb1, 0x2bb5, 0x2bb9, - 0x2bbd, 0x2bc0, 0x2bc4, 0x2bc8, 0x2bcc, 0x2bd0, 0x2bd4, 0x2bd7, - 0x2bdb, 0x2bdf, 0x2be3, 0x2be7, 0x2beb, 0x2bee, 0x2bf2, 0x2bf6, - 0x2bfa, 0x2bfe, 0x2c01, 0x2c03, 0x2c05, 0x2c07, 0x2c09, 0x2c0b, - 0x2c0d, 0x2c0f, 0x2c10, 0x2c12, 0x2c14, 0x2c16, 0x2c18, 0x2c1a, - 0x2c1c, 0x2c1e, 0x2c20, 0x2c22, 0x2c24, 0x2c26, 0x2c28, 0x2c2a, - 0x2c2c, 0x2c2e, 0x2c30, 0x2c32, 0x2c34, 0x2c36, 0x2c38, 0x2c3a, - 0x2c3c, 0x2c3e, 0x2c40, 0x2c42, 0x2c44, 0x2c46, 0x2c48, 0x2c4a, - 0x2c4c, 0x2c4e, 0x2c50, 0x2c52, 0x2c54, 0x2c56, 0x2c58, 0x2c5a, - 0x2c5c, 0x2c5e, 0x2c60, 0x2c62, 0x2c64, 0x2c66, 0x2c69, 0x2c6b, - 0x2c6d, 0x2c6f, 0x2c71, 0x2c73, 0x2c75, 0x2c77, 0x2c79, 0x2c7b, - 0x2c7d, 0x2c7f, 0x2c81, 0x2c83, 0x2c85, 0x2c87, 0x2c8a, 0x2c8c, - 0x2c8e, 0x2c90, 0x2c92, 0x2c94, 0x2c96, 0x2c98, 0x2c9a, 0x2c9c, - 0x2c9e, 0x2ca0, 0x2ca3, 0x2ca5, 0x2ca7, 0x2ca9, 0x2cab, 0x2cad, - 0x2caf, 0x2cb1, 0x2cb3, 0x2cb6, 0x2cb8, 0x2cba, 0x2cbc, 0x2cbe, - 0x2cc0, 0x2cc2, 0x2cc4, 0x2cc7, 0x2cc9, 0x2ccb, 0x2ccd, 0x2ccf, - 0x2cd1, 0x2cd3, 0x2cd6, 0x2cd8, 0x2cda, 0x2cdc, 0x2cde, 0x2ce0, - 0x2ce3, 0x2ce5, 0x2ce7, 0x2ce9, 0x2ceb, 0x2ced, 0x2cf0, 0x2cf2, - 0x2cf4, 0x2cf6, 0x2cf8, 0x2cfa, 0x2cfd, 0x2cff, 0x2d01, 0x2d03, - 0x2d05, 0x2d08, 0x2d0a, 0x2d0c, 0x2d0e, 0x2d10, 0x2d13, 0x2d15, - 0x2d17, 0x2d19, 0x2d1b, 0x2d1e, 0x2d20, 0x2d22, 0x2d24, 0x2d27, - 0x2d29, 0x2d2b, 0x2d2d, 0x2d2f, 0x2d32, 0x2d34, 0x2d36, 0x2d38, - 0x2d3b, 0x2d3d, 0x2d3f, 0x2d41, 0x2d44, 0x2d46, 0x2d48, 0x2d4a, - 0x2d4d, 0x2d4f, 0x2d51, 0x2d54, 0x2d56, 0x2d58, 0x2d5a, 0x2d5d, - 0x2d5f, 0x2d61, 0x2d63, 0x2d66, 0x2d68, 0x2d6a, 0x2d6d, 0x2d6f, - 0x2d71, 0x2d73, 0x2d76, 0x2d78, 0x2d7a, 0x2d7d, 0x2d7f, 0x2d81, - 0x2d84, 0x2d86, 0x2d88, 0x2d8b, 0x2d8d, 0x2d8f, 0x2d91, 0x2d94, - 0x2d96, 0x2d98, 0x2d9b, 0x2d9d, 0x2d9f, 0x2da2, 0x2da4, 0x2da6, - 0x2da9, 0x2dab, 0x2dae, 0x2db0, 0x2db2, 0x2db5, 0x2db7, 0x2db9, - 0x2dbc, 0x2dbe, 0x2dc0, 0x2dc3, 0x2dc5, 0x2dc7, 0x2dca, 0x2dcc, - 0x2dcf, 0x2dd1, 0x2dd3, 0x2dd6, 0x2dd8, 0x2dda, 0x2ddd, 0x2ddf, - 0x2de2, 0x2de4, 0x2de6, 0x2de9, 0x2deb, 0x2dee, 0x2df0, 0x2df2, - 0x2df5, 0x2df7, 0x2dfa, 0x2dfc, 0x2dff, 0x2e01, 0x2e03, 0x2e06, - 0x2e08, 0x2e0b, 0x2e0d, 0x2e10, 0x2e12, 0x2e14, 0x2e17, 0x2e19, - 0x2e1c, 0x2e1e, 0x2e21, 0x2e23, 0x2e25, 0x2e28, 0x2e2a, 0x2e2d, - 0x2e2f, 0x2e32, 0x2e34, 0x2e37, 0x2e39, 0x2e3c, 0x2e3e, 0x2e41, - 0x2e43, 0x2e46, 0x2e48, 0x2e4b, 0x2e4d, 0x2e4f, 0x2e52, 0x2e54, - 0x2e57, 0x2e59, 0x2e5c, 0x2e5e, 0x2e61, 0x2e63, 0x2e66, 0x2e68, - 0x2e6b, 0x2e6d, 0x2e70, 0x2e72, 0x2e75, 0x2e78, 0x2e7a, 0x2e7d, - 0x2e7f, 0x2e82, 0x2e84, 0x2e87, 0x2e89, 0x2e8c, 0x2e8e, 0x2e91, - 0x2e93, 0x2e96, 0x2e98, 0x2e9b, 0x2e9e, 0x2ea0, 0x2ea3, 0x2ea5, - 0x2ea8, 0x2eaa, 0x2ead, 0x2eaf, 0x2eb2, 0x2eb5, 0x2eb7, 0x2eba, - 0x2ebc, 0x2ebf, 0x2ec2, 0x2ec4, 0x2ec7, 0x2ec9, 0x2ecc, 0x2ece, - 0x2ed1, 0x2ed4, 0x2ed6, 0x2ed9, 0x2edb, 0x2ede, 0x2ee1, 0x2ee3, - 0x2ee6, 0x2ee8, 0x2eeb, 0x2eee, 0x2ef0, 0x2ef3, 0x2ef6, 0x2ef8, - 0x2efb, 0x2efd, 0x2f00, 0x2f03, 0x2f05, 0x2f08, 0x2f0b, 0x2f0d, - 0x2f10, 0x2f13, 0x2f15, 0x2f18, 0x2f1a, 0x2f1d, 0x2f20, 0x2f22, - 0x2f25, 0x2f28, 0x2f2a, 0x2f2d, 0x2f30, 0x2f32, 0x2f35, 0x2f38, - 0x2f3a, 0x2f3d, 0x2f40, 0x2f43, 0x2f45, 0x2f48, 0x2f4b, 0x2f4d, - 0x2f50, 0x2f53, 0x2f55, 0x2f58, 0x2f5b, 0x2f5d, 0x2f60, 0x2f63, - 0x2f66, 0x2f68, 0x2f6b, 0x2f6e, 0x2f70, 0x2f73, 0x2f76, 0x2f79, - 0x2f7b, 0x2f7e, 0x2f81, 0x2f84, 0x2f86, 0x2f89, 0x2f8c, 0x2f8f, - 0x2f91, 0x2f94, 0x2f97, 0x2f9a, 0x2f9c, 0x2f9f, 0x2fa2, 0x2fa5, - 0x2fa7, 0x2faa, 0x2fad, 0x2fb0, 0x2fb2, 0x2fb5, 0x2fb8, 0x2fbb, - 0x2fbd, 0x2fc0, 0x2fc3, 0x2fc6, 0x2fc9, 0x2fcb, 0x2fce, 0x2fd1, - 0x2fd4, 0x2fd7, 0x2fd9, 0x2fdc, 0x2fdf, 0x2fe2, 0x2fe5, 0x2fe7, - 0x2fea, 0x2fed, 0x2ff0, 0x2ff3, 0x2ff6, 0x2ff8, 0x2ffb, 0x2ffe, - 0x3000, 0x3002, 0x3003, 0x3005, 0x3006, 0x3007, 0x3009, 0x300a, - 0x300c, 0x300d, 0x300f, 0x3010, 0x3011, 0x3013, 0x3014, 0x3016, - 0x3017, 0x3019, 0x301a, 0x301b, 0x301d, 0x301e, 0x3020, 0x3021, - 0x3023, 0x3024, 0x3026, 0x3027, 0x3028, 0x302a, 0x302b, 0x302d, - 0x302e, 0x3030, 0x3031, 0x3033, 0x3034, 0x3036, 0x3037, 0x3038, - 0x303a, 0x303b, 0x303d, 0x303e, 0x3040, 0x3041, 0x3043, 0x3044, - 0x3046, 0x3047, 0x3049, 0x304a, 0x304b, 0x304d, 0x304e, 0x3050, - 0x3051, 0x3053, 0x3054, 0x3056, 0x3057, 0x3059, 0x305a, 0x305c, - 0x305d, 0x305f, 0x3060, 0x3062, 0x3063, 0x3065, 0x3066, 0x3068, - 0x3069, 0x306b, 0x306c, 0x306e, 0x306f, 0x3071, 0x3072, 0x3074, - 0x3075, 0x3077, 0x3078, 0x307a, 0x307b, 0x307d, 0x307e, 0x3080, - 0x3081, 0x3083, 0x3084, 0x3086, 0x3087, 0x3089, 0x308a, 0x308c, - 0x308d, 0x308f, 0x3090, 0x3092, 0x3093, 0x3095, 0x3096, 0x3098, - 0x3099, 0x309b, 0x309c, 0x309e, 0x30a0, 0x30a1, 0x30a3, 0x30a4, - 0x30a6, 0x30a7, 0x30a9, 0x30aa, 0x30ac, 0x30ad, 0x30af, 0x30b0, - 0x30b2, 0x30b4, 0x30b5, 0x30b7, 0x30b8, 0x30ba, 0x30bb, 0x30bd, - 0x30be, 0x30c0, 0x30c2, 0x30c3, 0x30c5, 0x30c6, 0x30c8, 0x30c9, - 0x30cb, 0x30cc, 0x30ce, 0x30d0, 0x30d1, 0x30d3, 0x30d4, 0x30d6, - 0x30d7, 0x30d9, 0x30db, 0x30dc, 0x30de, 0x30df, 0x30e1, 0x30e2, - 0x30e4, 0x30e6, 0x30e7, 0x30e9, 0x30ea, 0x30ec, 0x30ed, 0x30ef, - 0x30f1, 0x30f2, 0x30f4, 0x30f5, 0x30f7, 0x30f9, 0x30fa, 0x30fc, - 0x30fd, 0x30ff, 0x3101, 0x3102, 0x3104, 0x3105, 0x3107, 0x3109, - 0x310a, 0x310c, 0x310d, 0x310f, 0x3111, 0x3112, 0x3114, 0x3115, - 0x3117, 0x3119, 0x311a, 0x311c, 0x311e, 0x311f, 0x3121, 0x3122, - 0x3124, 0x3126, 0x3127, 0x3129, 0x312b, 0x312c, 0x312e, 0x312f, - 0x3131, 0x3133, 0x3134, 0x3136, 0x3138, 0x3139, 0x313b, 0x313c, - 0x313e, 0x3140, 0x3141, 0x3143, 0x3145, 0x3146, 0x3148, 0x314a, - 0x314b, 0x314d, 0x314f, 0x3150, 0x3152, 0x3154, 0x3155, 0x3157, - 0x3159, 0x315a, 0x315c, 0x315e, 0x315f, 0x3161, 0x3162, 0x3164, - 0x3166, 0x3167, 0x3169, 0x316b, 0x316c, 0x316e, 0x3170, 0x3172, - 0x3173, 0x3175, 0x3177, 0x3178, 0x317a, 0x317c, 0x317d, 0x317f, - 0x3181, 0x3182, 0x3184, 0x3186, 0x3187, 0x3189, 0x318b, 0x318c, - 0x318e, 0x3190, 0x3192, 0x3193, 0x3195, 0x3197, 0x3198, 0x319a, - 0x319c, 0x319d, 0x319f, 0x31a1, 0x31a3, 0x31a4, 0x31a6, 0x31a8, - 0x31a9, 0x31ab, 0x31ad, 0x31af, 0x31b0, 0x31b2, 0x31b4, 0x31b5, - 0x31b7, 0x31b9, 0x31bb, 0x31bc, 0x31be, 0x31c0, 0x31c1, 0x31c3, - 0x31c5, 0x31c7, 0x31c8, 0x31ca, 0x31cc, 0x31ce, 0x31cf, 0x31d1, - 0x31d3, 0x31d4, 0x31d6, 0x31d8, 0x31da, 0x31db, 0x31dd, 0x31df, - 0x31e1, 0x31e2, 0x31e4, 0x31e6, 0x31e8, 0x31e9, 0x31eb, 0x31ed, - 0x31ef, 0x31f0, 0x31f2, 0x31f4, 0x31f6, 0x31f7, 0x31f9, 0x31fb, - 0x31fd, 0x31ff, 0x3200, 0x3202, 0x3204, 0x3206, 0x3207, 0x3209, - 0x320b, 0x320d, 0x320e, 0x3210, 0x3212, 0x3214, 0x3216, 0x3217, - 0x3219, 0x321b, 0x321d, 0x321e, 0x3220, 0x3222, 0x3224, 0x3226, - 0x3227, 0x3229, 0x322b, 0x322d, 0x322f, 0x3230, 0x3232, 0x3234, - 0x3236, 0x3238, 0x3239, 0x323b, 0x323d, 0x323f, 0x3241, 0x3242, - 0x3244, 0x3246, 0x3248, 0x324a, 0x324b, 0x324d, 0x324f, 0x3251, - 0x3253, 0x3254, 0x3256, 0x3258, 0x325a, 0x325c, 0x325e, 0x325f, - 0x3261, 0x3263, 0x3265, 0x3267, 0x3269, 0x326a, 0x326c, 0x326e, - 0x3270, 0x3272, 0x3274, 0x3275, 0x3277, 0x3279, 0x327b, 0x327d, - 0x327f, 0x3280, 0x3282, 0x3284, 0x3286, 0x3288, 0x328a, 0x328c, - 0x328d, 0x328f, 0x3291, 0x3293, 0x3295, 0x3297, 0x3299, 0x329a, - 0x329c, 0x329e, 0x32a0, 0x32a2, 0x32a4, 0x32a6, 0x32a7, 0x32a9, - 0x32ab, 0x32ad, 0x32af, 0x32b1, 0x32b3, 0x32b5, 0x32b6, 0x32b8, - 0x32ba, 0x32bc, 0x32be, 0x32c0, 0x32c2, 0x32c4, 0x32c5, 0x32c7, - 0x32c9, 0x32cb, 0x32cd, 0x32cf, 0x32d1, 0x32d3, 0x32d5, 0x32d6, - 0x32d8, 0x32da, 0x32dc, 0x32de, 0x32e0, 0x32e2, 0x32e4, 0x32e6, - 0x32e8, 0x32ea, 0x32eb, 0x32ed, 0x32ef, 0x32f1, 0x32f3, 0x32f5, - 0x32f7, 0x32fb, 0x32ff, 0x3302, 0x3306, 0x330a, 0x330e, 0x3312, - 0x3316, 0x331a, 0x331d, 0x3321, 0x3325, 0x3329, 0x332d, 0x3331, - 0x3335, 0x3339, 0x333d, 0x3340, 0x3344, 0x3348, 0x334c, 0x3350, - 0x3354, 0x3358, 0x335c, 0x3360, 0x3364, 0x3368, 0x336c, 0x3370, - 0x3374, 0x3378, 0x337c, 0x3380, 0x3384, 0x3388, 0x338c, 0x3390, - 0x3394, 0x3398, 0x339c, 0x33a0, 0x33a4, 0x33a8, 0x33ac, 0x33b0, - 0x33b4, 0x33b8, 0x33bc, 0x33c0, 0x33c4, 0x33c8, 0x33cc, 0x33d0, - 0x33d4, 0x33d9, 0x33dd, 0x33e1, 0x33e5, 0x33e9, 0x33ed, 0x33f1, - 0x33f5, 0x33f9, 0x33fe, 0x3401, 0x3403, 0x3405, 0x3407, 0x3409, - 0x340b, 0x340d, 0x340f, 0x3411, 0x3414, 0x3416, 0x3418, 0x341a, - 0x341c, 0x341e, 0x3420, 0x3422, 0x3424, 0x3426, 0x3428, 0x342b, - 0x342d, 0x342f, 0x3431, 0x3433, 0x3435, 0x3437, 0x3439, 0x343c, - 0x343e, 0x3440, 0x3442, 0x3444, 0x3446, 0x3448, 0x344b, 0x344d, - 0x344f, 0x3451, 0x3453, 0x3455, 0x3457, 0x345a, 0x345c, 0x345e, - 0x3460, 0x3462, 0x3464, 0x3467, 0x3469, 0x346b, 0x346d, 0x346f, - 0x3472, 0x3474, 0x3476, 0x3478, 0x347a, 0x347d, 0x347f, 0x3481, - 0x3483, 0x3485, 0x3488, 0x348a, 0x348c, 0x348e, 0x3490, 0x3493, - 0x3495, 0x3497, 0x3499, 0x349c, 0x349e, 0x34a0, 0x34a2, 0x34a4, - 0x34a7, 0x34a9, 0x34ab, 0x34ad, 0x34b0, 0x34b2, 0x34b4, 0x34b6, - 0x34b9, 0x34bb, 0x34bd, 0x34c0, 0x34c2, 0x34c4, 0x34c6, 0x34c9, - 0x34cb, 0x34cd, 0x34cf, 0x34d2, 0x34d4, 0x34d6, 0x34d9, 0x34db, - 0x34dd, 0x34e0, 0x34e2, 0x34e4, 0x34e6, 0x34e9, 0x34eb, 0x34ed, - 0x34f0, 0x34f2, 0x34f4, 0x34f7, 0x34f9, 0x34fb, 0x34fe, 0x3500, - 0x3502, 0x3505, 0x3507, 0x3509, 0x350c, 0x350e, 0x3510, 0x3513, - 0x3515, 0x3517, 0x351a, 0x351c, 0x351e, 0x3521, 0x3523, 0x3526, - 0x3528, 0x352a, 0x352d, 0x352f, 0x3531, 0x3534, 0x3536, 0x3539, - 0x353b, 0x353d, 0x3540, 0x3542, 0x3545, 0x3547, 0x3549, 0x354c, - 0x354e, 0x3551, 0x3553, 0x3555, 0x3558, 0x355a, 0x355d, 0x355f, - 0x3562, 0x3564, 0x3566, 0x3569, 0x356b, 0x356e, 0x3570, 0x3573, - 0x3575, 0x3577, 0x357a, 0x357c, 0x357f, 0x3581, 0x3584, 0x3586, - 0x3589, 0x358b, 0x358e, 0x3590, 0x3593, 0x3595, 0x3598, 0x359a, - 0x359d, 0x359f, 0x35a1, 0x35a4, 0x35a6, 0x35a9, 0x35ab, 0x35ae, - 0x35b0, 0x35b3, 0x35b5, 0x35b8, 0x35ba, 0x35bd, 0x35c0, 0x35c2, - 0x35c5, 0x35c7, 0x35ca, 0x35cc, 0x35cf, 0x35d1, 0x35d4, 0x35d6, - 0x35d9, 0x35db, 0x35de, 0x35e0, 0x35e3, 0x35e6, 0x35e8, 0x35eb, - 0x35ed, 0x35f0, 0x35f2, 0x35f5, 0x35f7, 0x35fa, 0x35fd, 0x35ff, - 0x3602, 0x3604, 0x3607, 0x360a, 0x360c, 0x360f, 0x3611, 0x3614, - 0x3616, 0x3619, 0x361c, 0x361e, 0x3621, 0x3623, 0x3626, 0x3629, - 0x362b, 0x362e, 0x3631, 0x3633, 0x3636, 0x3638, 0x363b, 0x363e, - 0x3640, 0x3643, 0x3646, 0x3648, 0x364b, 0x364e, 0x3650, 0x3653, - 0x3655, 0x3658, 0x365b, 0x365d, 0x3660, 0x3663, 0x3665, 0x3668, - 0x366b, 0x366d, 0x3670, 0x3673, 0x3676, 0x3678, 0x367b, 0x367e, - 0x3680, 0x3683, 0x3686, 0x3688, 0x368b, 0x368e, 0x3690, 0x3693, - 0x3696, 0x3699, 0x369b, 0x369e, 0x36a1, 0x36a3, 0x36a6, 0x36a9, - 0x36ac, 0x36ae, 0x36b1, 0x36b4, 0x36b7, 0x36b9, 0x36bc, 0x36bf, - 0x36c2, 0x36c4, 0x36c7, 0x36ca, 0x36cd, 0x36cf, 0x36d2, 0x36d5, - 0x36d8, 0x36da, 0x36dd, 0x36e0, 0x36e3, 0x36e5, 0x36e8, 0x36eb, - 0x36ee, 0x36f1, 0x36f3, 0x36f6, 0x36f9, 0x36fc, 0x36ff, 0x3701, - 0x3704, 0x3707, 0x370a, 0x370d, 0x370f, 0x3712, 0x3715, 0x3718, - 0x371b, 0x371e, 0x3720, 0x3723, 0x3726, 0x3729, 0x372c, 0x372f, - 0x3731, 0x3734, 0x3737, 0x373a, 0x373d, 0x3740, 0x3743, 0x3745, - 0x3748, 0x374b, 0x374e, 0x3751, 0x3754, 0x3757, 0x3759, 0x375c, - 0x375f, 0x3762, 0x3765, 0x3768, 0x376b, 0x376e, 0x3771, 0x3774, - 0x3776, 0x3779, 0x377c, 0x377f, 0x3782, 0x3785, 0x3788, 0x378b, - 0x378e, 0x3791, 0x3794, 0x3796, 0x3799, 0x379c, 0x379f, 0x37a2, - 0x37a5, 0x37a8, 0x37ab, 0x37ae, 0x37b1, 0x37b4, 0x37b7, 0x37ba, - 0x37bd, 0x37c0, 0x37c3, 0x37c6, 0x37c9, 0x37cc, 0x37cf, 0x37d2, - 0x37d5, 0x37d7, 0x37da, 0x37dd, 0x37e0, 0x37e3, 0x37e6, 0x37e9, - 0x37ec, 0x37ef, 0x37f2, 0x37f5, 0x37f8, 0x37fb, 0x37fe, 0x3801, - 0x3802, 0x3804, 0x3805, 0x3807, 0x3808, 0x380a, 0x380b, 0x380d, - 0x380e, 0x3810, 0x3811, 0x3813, 0x3814, 0x3816, 0x3817, 0x3819, - 0x381b, 0x381c, 0x381e, 0x381f, 0x3821, 0x3822, 0x3824, 0x3825, - 0x3827, 0x3828, 0x382a, 0x382b, 0x382d, 0x382f, 0x3830, 0x3832, - 0x3833, 0x3835, 0x3836, 0x3838, 0x3839, 0x383b, 0x383c, 0x383e, - 0x3840, 0x3841, 0x3843, 0x3844, 0x3846, 0x3847, 0x3849, 0x384b, - 0x384c, 0x384e, 0x384f, 0x3851, 0x3852, 0x3854, 0x3856, 0x3857, - 0x3859, 0x385a, 0x385c, 0x385d, 0x385f, 0x3861, 0x3862, 0x3864, - 0x3865, 0x3867, 0x3869, 0x386a, 0x386c, 0x386d, 0x386f, 0x3870, - 0x3872, 0x3874, 0x3875, 0x3877, 0x3878, 0x387a, 0x387c, 0x387d, - 0x387f, 0x3880, 0x3882, 0x3884, 0x3885, 0x3887, 0x3889, 0x388a, - 0x388c, 0x388d, 0x388f, 0x3891, 0x3892, 0x3894, 0x3895, 0x3897, - 0x3899, 0x389a, 0x389c, 0x389e, 0x389f, 0x38a1, 0x38a3, 0x38a4, - 0x38a6, 0x38a7, 0x38a9, 0x38ab, 0x38ac, 0x38ae, 0x38b0, 0x38b1, - 0x38b3, 0x38b5, 0x38b6, 0x38b8, 0x38ba, 0x38bb, 0x38bd, 0x38be, - 0x38c0, 0x38c2, 0x38c3, 0x38c5, 0x38c7, 0x38c8, 0x38ca, 0x38cc, - 0x38cd, 0x38cf, 0x38d1, 0x38d2, 0x38d4, 0x38d6, 0x38d7, 0x38d9, - 0x38db, 0x38dc, 0x38de, 0x38e0, 0x38e1, 0x38e3, 0x38e5, 0x38e7, - 0x38e8, 0x38ea, 0x38ec, 0x38ed, 0x38ef, 0x38f1, 0x38f2, 0x38f4, - 0x38f6, 0x38f7, 0x38f9, 0x38fb, 0x38fd, 0x38fe, 0x3900, 0x3902, - 0x3903, 0x3905, 0x3907, 0x3908, 0x390a, 0x390c, 0x390e, 0x390f, - 0x3911, 0x3913, 0x3914, 0x3916, 0x3918, 0x391a, 0x391b, 0x391d, - 0x391f, 0x3920, 0x3922, 0x3924, 0x3926, 0x3927, 0x3929, 0x392b, - 0x392d, 0x392e, 0x3930, 0x3932, 0x3934, 0x3935, 0x3937, 0x3939, - 0x393b, 0x393c, 0x393e, 0x3940, 0x3942, 0x3943, 0x3945, 0x3947, - 0x3949, 0x394a, 0x394c, 0x394e, 0x3950, 0x3951, 0x3953, 0x3955, - 0x3957, 0x3958, 0x395a, 0x395c, 0x395e, 0x395f, 0x3961, 0x3963, - 0x3965, 0x3967, 0x3968, 0x396a, 0x396c, 0x396e, 0x396f, 0x3971, - 0x3973, 0x3975, 0x3977, 0x3978, 0x397a, 0x397c, 0x397e, 0x397f, - 0x3981, 0x3983, 0x3985, 0x3987, 0x3988, 0x398a, 0x398c, 0x398e, - 0x3990, 0x3991, 0x3993, 0x3995, 0x3997, 0x3999, 0x399b, 0x399c, - 0x399e, 0x39a0, 0x39a2, 0x39a4, 0x39a5, 0x39a7, 0x39a9, 0x39ab, - 0x39ad, 0x39af, 0x39b0, 0x39b2, 0x39b4, 0x39b6, 0x39b8, 0x39ba, - 0x39bb, 0x39bd, 0x39bf, 0x39c1, 0x39c3, 0x39c5, 0x39c6, 0x39c8, - 0x39ca, 0x39cc, 0x39ce, 0x39d0, 0x39d1, 0x39d3, 0x39d5, 0x39d7, - 0x39d9, 0x39db, 0x39dd, 0x39de, 0x39e0, 0x39e2, 0x39e4, 0x39e6, - 0x39e8, 0x39ea, 0x39eb, 0x39ed, 0x39ef, 0x39f1, 0x39f3, 0x39f5, - 0x39f7, 0x39f9, 0x39fa, 0x39fc, 0x39fe, 0x3a00, 0x3a02, 0x3a04, - 0x3a06, 0x3a08, 0x3a09, 0x3a0b, 0x3a0d, 0x3a0f, 0x3a11, 0x3a13, - 0x3a15, 0x3a17, 0x3a19, 0x3a1b, 0x3a1c, 0x3a1e, 0x3a20, 0x3a22, - 0x3a24, 0x3a26, 0x3a28, 0x3a2a, 0x3a2c, 0x3a2e, 0x3a2f, 0x3a31, - 0x3a33, 0x3a35, 0x3a37, 0x3a39, 0x3a3b, 0x3a3d, 0x3a3f, 0x3a41, - 0x3a43, 0x3a45, 0x3a47, 0x3a48, 0x3a4a, 0x3a4c, 0x3a4e, 0x3a50, - 0x3a52, 0x3a54, 0x3a56, 0x3a58, 0x3a5a, 0x3a5c, 0x3a5e, 0x3a60, - 0x3a62, 0x3a64, 0x3a66, 0x3a67, 0x3a69, 0x3a6b, 0x3a6d, 0x3a6f, - 0x3a71, 0x3a73, 0x3a75, 0x3a77, 0x3a79, 0x3a7b, 0x3a7d, 0x3a7f, - 0x3a81, 0x3a83, 0x3a85, 0x3a87, 0x3a89, 0x3a8b, 0x3a8d, 0x3a8f, - 0x3a91, 0x3a93, 0x3a95, 0x3a97, 0x3a99, 0x3a9b, 0x3a9d, 0x3a9f, - 0x3aa0, 0x3aa2, 0x3aa4, 0x3aa6, 0x3aa8, 0x3aaa, 0x3aac, 0x3aae, - 0x3ab0, 0x3ab2, 0x3ab4, 0x3ab6, 0x3ab8, 0x3aba, 0x3abc, 0x3abe, - 0x3ac0, 0x3ac2, 0x3ac4, 0x3ac6, 0x3ac8, 0x3aca, 0x3acc, 0x3ace, - 0x3ad1, 0x3ad3, 0x3ad5, 0x3ad7, 0x3ad9, 0x3adb, 0x3add, 0x3adf, - 0x3ae1, 0x3ae3, 0x3ae5, 0x3ae7, 0x3ae9, 0x3aeb, 0x3aed, 0x3aef, - 0x3af1, 0x3af3, 0x3af5, 0x3af7, 0x3af9, 0x3afb, 0x3afd, 0x3aff, - 0x3b01, 0x3b03, 0x3b05, 0x3b07, 0x3b09, 0x3b0b, 0x3b0e, 0x3b10, - 0x3b12, 0x3b14, 0x3b16, 0x3b18, 0x3b1a, 0x3b1c, 0x3b1e, 0x3b20, - 0x3b22, 0x3b24, 0x3b26, 0x3b28, 0x3b2a, 0x3b2c, 0x3b2f, 0x3b31, - 0x3b33, 0x3b35, 0x3b37, 0x3b39, 0x3b3b, 0x3b3d, 0x3b3f, 0x3b41, - 0x3b43, 0x3b45, 0x3b48, 0x3b4a, 0x3b4c, 0x3b4e, 0x3b50, 0x3b52, - 0x3b54, 0x3b56, 0x3b58, 0x3b5a, 0x3b5d, 0x3b5f, 0x3b61, 0x3b63, - 0x3b65, 0x3b67, 0x3b69, 0x3b6b, 0x3b6d, 0x3b6f, 0x3b72, 0x3b74, - 0x3b76, 0x3b78, 0x3b7a, 0x3b7c, 0x3b7e, 0x3b80, 0x3b83, 0x3b85, - 0x3b87, 0x3b89, 0x3b8b, 0x3b8d, 0x3b8f, 0x3b91, 0x3b94, 0x3b96, - 0x3b98, 0x3b9a, 0x3b9c, 0x3b9e, 0x3ba0, 0x3ba3, 0x3ba5, 0x3ba7, - 0x3ba9, 0x3bab, 0x3bad, 0x3baf, 0x3bb2, 0x3bb4, 0x3bb6, 0x3bb8, - 0x3bba, 0x3bbc, 0x3bbf, 0x3bc1, 0x3bc3, 0x3bc5, 0x3bc7, 0x3bc9, - 0x3bcc, 0x3bce, 0x3bd0, 0x3bd2, 0x3bd4, 0x3bd6, 0x3bd9, 0x3bdb, - 0x3bdd, 0x3bdf, 0x3be1, 0x3be4, 0x3be6, 0x3be8, 0x3bea, 0x3bec, - 0x3bee, 0x3bf1, 0x3bf3, 0x3bf5, 0x3bf7, 0x3bf9, 0x3bfc, 0x3bfe, - 0x3c00, 0x3c02, 0x3c04, 0x3c07, 0x3c09, 0x3c0b, 0x3c0d, 0x3c10, - 0x3c12, 0x3c14, 0x3c16, 0x3c18, 0x3c1b, 0x3c1d, 0x3c1f, 0x3c22, - 0x3c24, 0x3c26, 0x3c28, 0x3c2b, 0x3c2d, 0x3c2f, 0x3c32, 0x3c34, - 0x3c36, 0x3c39, 0x3c3b, 0x3c3d, 0x3c3f, 0x3c42, 0x3c44, 0x3c47, - 0x3c49, 0x3c4b, 0x3c4e, 0x3c50, 0x3c52, 0x3c55, 0x3c57, 0x3c59, - 0x3c5c, 0x3c5e, 0x3c61, 0x3c63, 0x3c66, 0x3c68, 0x3c6a, 0x3c6d, - 0x3c6f, 0x3c72, 0x3c74, 0x3c77, 0x3c79, 0x3c7b, 0x3c7e, 0x3c80, - 0x3c83, 0x3c85, 0x3c88, 0x3c8a, 0x3c8d, 0x3c8f, 0x3c92, 0x3c94, - 0x3c97, 0x3c99, 0x3c9c, 0x3c9f, 0x3ca1, 0x3ca4, 0x3ca6, 0x3ca9, - 0x3cab, 0x3cae, 0x3cb0, 0x3cb3, 0x3cb6, 0x3cb8, 0x3cbb, 0x3cbd, - 0x3cc0, 0x3cc3, 0x3cc5, 0x3cc8, 0x3ccb, 0x3ccd, 0x3cd0, 0x3cd2, - 0x3cd5, 0x3cd8, 0x3cda, 0x3cdd, 0x3ce0, 0x3ce2, 0x3ce5, 0x3ce8, - 0x3ceb, 0x3ced, 0x3cf0, 0x3cf3, 0x3cf5, 0x3cf8, 0x3cfb, 0x3cfe, - 0x3d00, 0x3d03, 0x3d06, 0x3d09, 0x3d0b, 0x3d0e, 0x3d11, 0x3d14, - 0x3d17, 0x3d19, 0x3d1c, 0x3d1f, 0x3d22, 0x3d25, 0x3d27, 0x3d2a, - 0x3d2d, 0x3d30, 0x3d33, 0x3d36, 0x3d39, 0x3d3b, 0x3d3e, 0x3d41, - 0x3d44, 0x3d47, 0x3d4a, 0x3d4d, 0x3d50, 0x3d53, 0x3d56, 0x3d59, - 0x3d5b, 0x3d5e, 0x3d61, 0x3d64, 0x3d67, 0x3d6a, 0x3d6d, 0x3d70, - 0x3d73, 0x3d76, 0x3d79, 0x3d7c, 0x3d7f, 0x3d82, 0x3d85, 0x3d88, - 0x3d8b, 0x3d8f, 0x3d92, 0x3d95, 0x3d98, 0x3d9b, 0x3d9e, 0x3da1, - 0x3da4, 0x3da7, 0x3daa, 0x3dad, 0x3db1, 0x3db4, 0x3db7, 0x3dba, - 0x3dbd, 0x3dc0, 0x3dc3, 0x3dc7, 0x3dca, 0x3dcd, 0x3dd0, 0x3dd3, - 0x3dd7, 0x3dda, 0x3ddd, 0x3de0, 0x3de3, 0x3de7, 0x3dea, 0x3ded, - 0x3df0, 0x3df4, 0x3df7, 0x3dfa, 0x3dfe, 0x3e01, 0x3e04, 0x3e08, - 0x3e0b, 0x3e0e, 0x3e12, 0x3e15, 0x3e18, 0x3e1c, 0x3e1f, 0x3e22, - 0x3e26, 0x3e29, 0x3e2c, 0x3e30, 0x3e33, 0x3e37, 0x3e3a, 0x3e3e, - 0x3e41, 0x3e44, 0x3e48, 0x3e4b, 0x3e4f, 0x3e52, 0x3e56, 0x3e59, - 0x3e5d, 0x3e60, 0x3e64, 0x3e67, 0x3e6b, 0x3e6e, 0x3e72, 0x3e75, - 0x3e79, 0x3e7c, 0x3e80, 0x3e84, 0x3e87, 0x3e8b, 0x3e8e, 0x3e92, - 0x3e96, 0x3e99, 0x3e9d, 0x3ea1, 0x3ea4, 0x3ea8, 0x3eac, 0x3eaf, - 0x3eb3, 0x3eb7, 0x3eba, 0x3ebe, 0x3ec2, 0x3ec5, 0x3ec9, 0x3ecd, - 0x3ed1, 0x3ed4, 0x3ed8, 0x3edc, 0x3ee0, 0x3ee3, 0x3ee7, 0x3eeb, - 0x3eef, 0x3ef3, 0x3ef6, 0x3efa, 0x3efe, 0x3f02, 0x3f06, 0x3f0a, - 0x3f0e, 0x3f12, 0x3f15, 0x3f19, 0x3f1d, 0x3f21, 0x3f25, 0x3f29, - 0x3f2d, 0x3f31, 0x3f35, 0x3f39, 0x3f3d, 0x3f41, 0x3f45, 0x3f49, - 0x3f4d, 0x3f51, 0x3f55, 0x3f59, 0x3f5d, 0x3f61, 0x3f65, 0x3f69, - 0x3f6d, 0x3f71, 0x3f75, 0x3f79, 0x3f7e, 0x3f82, 0x3f86, 0x3f8a, - 0x3f8e, 0x3f92, 0x3f96, 0x3f9b, 0x3f9f, 0x3fa3, 0x3fa7, 0x3fab, - 0x3fb0, 0x3fb4, 0x3fb8, 0x3fbc, 0x3fc1, 0x3fc5, 0x3fc9, 0x3fcd, - 0x3fd2, 0x3fd6, 0x3fda, 0x3fdf, 0x3fe3, 0x3fe7, 0x3fec, 0x3ff0, - 0x3ff4, 0x3ff9, 0x3ffd, 0x4001, 0x4003, 0x4005, 0x4007, 0x400a, - 0x400c, 0x400e, 0x4010, 0x4013, 0x4015, 0x4017, 0x4019, 0x401c, - 0x401e, 0x4020, 0x4022, 0x4025, 0x4027, 0x4029, 0x402c, 0x402e, - 0x4030, 0x4032, 0x4035, 0x4037, 0x4039, 0x403c, 0x403e, 0x4040, - 0x4043, 0x4045, 0x4047, 0x404a, 0x404c, 0x404e, 0x4051, 0x4053, - 0x4056, 0x4058, 0x405a, 0x405d, 0x405f, 0x4062, 0x4064, 0x4066, - 0x4069, 0x406b, 0x406e, 0x4070, 0x4073, 0x4075, 0x4077, 0x407a, - 0x407c, 0x407f, 0x4081, 0x4084, 0x4086, 0x4089, 0x408b, 0x408e, - 0x4090, 0x4093, 0x4095, 0x4098, 0x409a, 0x409d, 0x409f, 0x40a2, - 0x40a5, 0x40a7, 0x40aa, 0x40ac, 0x40af, 0x40b1, 0x40b4, 0x40b7, - 0x40b9, 0x40bc, 0x40be, 0x40c1, 0x40c4, 0x40c6, 0x40c9, 0x40cc, - 0x40ce, 0x40d1, 0x40d3, 0x40d6, 0x40d9, 0x40db, 0x40de, 0x40e1, - 0x40e3, 0x40e6, 0x40e9, 0x40ec, 0x40ee, 0x40f1, 0x40f4, 0x40f6, - 0x40f9, 0x40fc, 0x40ff, 0x4101, 0x4104, 0x4107, 0x410a, 0x410c, - 0x410f, 0x4112, 0x4115, 0x4118, 0x411a, 0x411d, 0x4120, 0x4123, - 0x4126, 0x4129, 0x412b, 0x412e, 0x4131, 0x4134, 0x4137, 0x413a, - 0x413d, 0x413f, 0x4142, 0x4145, 0x4148, 0x414b, 0x414e, 0x4151, - 0x4154, 0x4157, 0x415a, 0x415d, 0x4160, 0x4163, 0x4165, 0x4168, - 0x416b, 0x416e, 0x4171, 0x4174, 0x4177, 0x417a, 0x417d, 0x4180, - 0x4183, 0x4187, 0x418a, 0x418d, 0x4190, 0x4193, 0x4196, 0x4199, - 0x419c, 0x419f, 0x41a2, 0x41a5, 0x41a8, 0x41ab, 0x41af, 0x41b2, - 0x41b5, 0x41b8, 0x41bb, 0x41be, 0x41c1, 0x41c5, 0x41c8, 0x41cb, - 0x41ce, 0x41d1, 0x41d5, 0x41d8, 0x41db, 0x41de, 0x41e1, 0x41e5, - 0x41e8, 0x41eb, 0x41ee, 0x41f2, 0x41f5, 0x41f8, 0x41fc, 0x41ff, - 0x4202, 0x4205, 0x4209, 0x420c, 0x420f, 0x4213, 0x4216, 0x4219, - 0x421d, 0x4220, 0x4224, 0x4227, 0x422a, 0x422e, 0x4231, 0x4235, - 0x4238, 0x423b, 0x423f, 0x4242, 0x4246, 0x4249, 0x424d, 0x4250, - 0x4254, 0x4257, 0x425a, 0x425e, 0x4262, 0x4265, 0x4269, 0x426c, - 0x4270, 0x4273, 0x4277, 0x427a, 0x427e, 0x4281, 0x4285, 0x4289, - 0x428c, 0x4290, 0x4293, 0x4297, 0x429b, 0x429e, 0x42a2, 0x42a6, - 0x42a9, 0x42ad, 0x42b1, 0x42b4, 0x42b8, 0x42bc, 0x42bf, 0x42c3, - 0x42c7, 0x42cb, 0x42ce, 0x42d2, 0x42d6, 0x42da, 0x42dd, 0x42e1, - 0x42e5, 0x42e9, 0x42ec, 0x42f0, 0x42f4, 0x42f8, 0x42fc, 0x4300, - 0x4303, 0x4307, 0x430b, 0x430f, 0x4313, 0x4317, 0x431b, 0x431f, - 0x4323, 0x4327, 0x432a, 0x432e, 0x4332, 0x4336, 0x433a, 0x433e, - 0x4342, 0x4346, 0x434a, 0x434e, 0x4352, 0x4356, 0x435a, 0x435e, - 0x4362, 0x4367, 0x436b, 0x436f, 0x4373, 0x4377, 0x437b, 0x437f, - 0x4383, 0x4387, 0x438c, 0x4390, 0x4394, 0x4398, 0x439c, 0x43a0, - 0x43a5, 0x43a9, 0x43ad, 0x43b1, 0x43b5, 0x43ba, 0x43be, 0x43c2, - 0x43c6, 0x43cb, 0x43cf, 0x43d3, 0x43d8, 0x43dc, 0x43e0, 0x43e5, - 0x43e9, 0x43ed, 0x43f2, 0x43f6, 0x43fa, 0x43ff, 0x4402, 0x4404, - 0x4406, 0x4408, 0x440a, 0x440d, 0x440f, 0x4411, 0x4413, 0x4416, - 0x4418, 0x441a, 0x441c, 0x441f, 0x4421, 0x4423, 0x4426, 0x4428, - 0x442a, 0x442c, 0x442f, 0x4431, 0x4433, 0x4436, 0x4438, 0x443a, - 0x443d, 0x443f, 0x4441, 0x4444, 0x4446, 0x4448, 0x444b, 0x444d, - 0x444f, 0x4452, 0x4454, 0x4456, 0x4459, 0x445b, 0x445e, 0x4460, - 0x4462, 0x4465, 0x4467, 0x446a, 0x446c, 0x446f, 0x4471, 0x4473, - 0x4476, 0x4478, 0x447b, 0x447d, 0x4480, 0x4482, 0x4485, 0x4487, - 0x448a, 0x448c, 0x448f, 0x4491, 0x4494, 0x4496, 0x4499, 0x449b, - 0x449e, 0x44a0, 0x44a3, 0x44a6, 0x44a8, 0x44ab, 0x44ad, 0x44b0, - 0x44b2, 0x44b5, 0x44b8, 0x44ba, 0x44bd, 0x44bf, 0x44c2, 0x44c5, - 0x44c7, 0x44ca, 0x44cc, 0x44cf, 0x44d2, 0x44d4, 0x44d7, 0x44da, - 0x44dc, 0x44df, 0x44e2, 0x44e4, 0x44e7, 0x44ea, 0x44ed, 0x44ef, - 0x44f2, 0x44f5, 0x44f7, 0x44fa, 0x44fd, 0x4500, 0x4502, 0x4505, - 0x4508, 0x450b, 0x450d, 0x4510, 0x4513, 0x4516, 0x4519, 0x451b, - 0x451e, 0x4521, 0x4524, 0x4527, 0x452a, 0x452c, 0x452f, 0x4532, - 0x4535, 0x4538, 0x453b, 0x453e, 0x4540, 0x4543, 0x4546, 0x4549, - 0x454c, 0x454f, 0x4552, 0x4555, 0x4558, 0x455b, 0x455e, 0x4561, - 0x4564, 0x4567, 0x456a, 0x456d, 0x4570, 0x4573, 0x4576, 0x4579, - 0x457c, 0x457f, 0x4582, 0x4585, 0x4588, 0x458b, 0x458e, 0x4591, - 0x4594, 0x4597, 0x459a, 0x459d, 0x45a0, 0x45a3, 0x45a6, 0x45a9, - 0x45ad, 0x45b0, 0x45b3, 0x45b6, 0x45b9, 0x45bc, 0x45bf, 0x45c3, - 0x45c6, 0x45c9, 0x45cc, 0x45cf, 0x45d3, 0x45d6, 0x45d9, 0x45dc, - 0x45df, 0x45e3, 0x45e6, 0x45e9, 0x45ec, 0x45f0, 0x45f3, 0x45f6, - 0x45f9, 0x45fd, 0x4600, 0x4603, 0x4607, 0x460a, 0x460d, 0x4611, - 0x4614, 0x4617, 0x461b, 0x461e, 0x4621, 0x4625, 0x4628, 0x462c, - 0x462f, 0x4632, 0x4636, 0x4639, 0x463d, 0x4640, 0x4643, 0x4647, - 0x464a, 0x464e, 0x4651, 0x4655, 0x4658, 0x465c, 0x465f, 0x4663, - 0x4666, 0x466a, 0x466d, 0x4671, 0x4674, 0x4678, 0x467c, 0x467f, - 0x4683, 0x4686, 0x468a, 0x468e, 0x4691, 0x4695, 0x4698, 0x469c, - 0x46a0, 0x46a3, 0x46a7, 0x46ab, 0x46ae, 0x46b2, 0x46b6, 0x46b9, - 0x46bd, 0x46c1, 0x46c4, 0x46c8, 0x46cc, 0x46d0, 0x46d3, 0x46d7, - 0x46db, 0x46df, 0x46e2, 0x46e6, 0x46ea, 0x46ee, 0x46f2, 0x46f6, - 0x46f9, 0x46fd, 0x4701, 0x4705, 0x4709, 0x470d, 0x4711, 0x4714, - 0x4718, 0x471c, 0x4720, 0x4724, 0x4728, 0x472c, 0x4730, 0x4734, - 0x4738, 0x473c, 0x4740, 0x4744, 0x4748, 0x474c, 0x4750, 0x4754, - 0x4758, 0x475c, 0x4760, 0x4764, 0x4768, 0x476c, 0x4770, 0x4774, - 0x4778, 0x477d, 0x4781, 0x4785, 0x4789, 0x478d, 0x4791, 0x4795, - 0x479a, 0x479e, 0x47a2, 0x47a6, 0x47aa, 0x47af, 0x47b3, 0x47b7, - 0x47bb, 0x47c0, 0x47c4, 0x47c8, 0x47cc, 0x47d1, 0x47d5, 0x47d9, - 0x47de, 0x47e2, 0x47e6, 0x47eb, 0x47ef, 0x47f3, 0x47f8, 0x47fc, - 0x4800, 0x4802, 0x4805, 0x4807, 0x4809, 0x480b, 0x480e, 0x4810, - 0x4812, 0x4814, 0x4816, 0x4819, 0x481b, 0x481d, 0x4820, 0x4822, - 0x4824, 0x4826, 0x4829, 0x482b, 0x482d, 0x4830, 0x4832, 0x4834, - 0x4836, 0x4839, 0x483b, 0x483d, 0x4840, 0x4842, 0x4844, 0x4847, - 0x4849, 0x484c, 0x484e, 0x4850, 0x4853, 0x4855, 0x4857, 0x485a, - 0x485c, 0x485f, 0x4861, 0x4863, 0x4866, 0x4868, 0x486b, 0x486d, - 0x4870, 0x4872, 0x4874, 0x4877, 0x4879, 0x487c, 0x487e, 0x4881, - 0x4883, 0x4888, 0x488d, 0x4892, 0x4897, 0x489c, 0x48a1, 0x48a6, - 0x48ac, 0x48b1, 0x48b6, 0x48bb, 0x48c0, 0x48c6, 0x48cb, 0x48d0, - 0x48d5, 0x48db, 0x48e0, 0x48e5, 0x48eb, 0x48f0, 0x48f6, 0x48fb, - 0x4901, 0x4906, 0x490c, 0x4911, 0x4917, 0x491d, 0x4922, 0x4928, - 0x492d, 0x4933, 0x4939, 0x493f, 0x4944, 0x494a, 0x4950, 0x4956, - 0x495c, 0x4962, 0x4968, 0x496e, 0x4974, 0x497a, 0x4980, 0x4986, - 0x498c, 0x4992, 0x4998, 0x499e, 0x49a4, 0x49ab, 0x49b1, 0x49b7, - 0x49bd, 0x49c4, 0x49ca, 0x49d1, 0x49d7, 0x49dd, 0x49e4, 0x49ea, - 0x49f1, 0x49f7, 0x49fe, 0x4a05, 0x4a0b, 0x4a12, 0x4a19, 0x4a1f, - 0x4a26, 0x4a2d, 0x4a34, 0x4a3a, 0x4a41, 0x4a48, 0x4a4f, 0x4a56, - 0x4a5d, 0x4a64, 0x4a6b, 0x4a72, 0x4a79, 0x4a80, 0x4a88, 0x4a8f, - 0x4a96, 0x4a9d, 0x4aa5, 0x4aac, 0x4ab3, 0x4abb, 0x4ac2, 0x4aca, - 0x4ad1, 0x4ad9, 0x4ae0, 0x4ae8, 0x4aef, 0x4af7, 0x4aff, 0x4b06, - 0x4b0e, 0x4b16, 0x4b1e, 0x4b25, 0x4b2d, 0x4b35, 0x4b3d, 0x4b45, - 0x4b4d, 0x4b55, 0x4b5d, 0x4b65, 0x4b6e, 0x4b76, 0x4b7e, 0x4b86, - 0x4b8f, 0x4b97, 0x4b9f, 0x4ba8, 0x4bb0, 0x4bb9, 0x4bc1, 0x4bca, - 0x4bd2, 0x4bdb, 0x4be4, 0x4bec, 0x4bf5, 0x4bfe, 0x4c03, 0x4c08, - 0x4c0c, 0x4c11, 0x4c15, 0x4c1a, 0x4c1e, 0x4c23, 0x4c27, 0x4c2c, - 0x4c30, 0x4c35, 0x4c3a, 0x4c3e, 0x4c43, 0x4c48, 0x4c4c, 0x4c51, - 0x4c56, 0x4c5b, 0x4c5f, 0x4c64, 0x4c69, 0x4c6e, 0x4c73, 0x4c78, - 0x4c7d, 0x4c82, 0x4c87, 0x4c8c, 0x4c91, 0x4c96, 0x4c9b, 0x4ca0, - 0x4ca5, 0x4caa, 0x4caf, 0x4cb4, 0x4cb9, 0x4cbf, 0x4cc4, 0x4cc9, - 0x4cce, 0x4cd4, 0x4cd9, 0x4cde, 0x4ce4, 0x4ce9, 0x4cef, 0x4cf4, - 0x4cf9, 0x4cff, 0x4d04, 0x4d0a, 0x4d10, 0x4d15, 0x4d1b, 0x4d20, - 0x4d26, 0x4d2c, 0x4d31, 0x4d37, 0x4d3d, 0x4d43, 0x4d48, 0x4d4e, - 0x4d54, 0x4d5a, 0x4d60, 0x4d66, 0x4d6c, 0x4d72, 0x4d78, 0x4d7e, - 0x4d84, 0x4d8a, 0x4d90, 0x4d96, 0x4d9c, 0x4da2, 0x4da9, 0x4daf, - 0x4db5, 0x4dbb, 0x4dc2, 0x4dc8, 0x4dcf, 0x4dd5, 0x4ddb, 0x4de2, - 0x4de8, 0x4def, 0x4df5, 0x4dfc, 0x4e03, 0x4e09, 0x4e10, 0x4e16, - 0x4e1d, 0x4e24, 0x4e2b, 0x4e31, 0x4e38, 0x4e3f, 0x4e46, 0x4e4d, - 0x4e54, 0x4e5b, 0x4e62, 0x4e69, 0x4e70, 0x4e77, 0x4e7e, 0x4e85, - 0x4e8d, 0x4e94, 0x4e9b, 0x4ea2, 0x4eaa, 0x4eb1, 0x4eb8, 0x4ec0, - 0x4ec7, 0x4ecf, 0x4ed6, 0x4ede, 0x4ee5, 0x4eed, 0x4ef5, 0x4efc, - 0x4f04, 0x4f0c, 0x4f13, 0x4f1b, 0x4f23, 0x4f2b, 0x4f33, 0x4f3b, - 0x4f43, 0x4f4b, 0x4f53, 0x4f5b, 0x4f63, 0x4f6b, 0x4f73, 0x4f7b, - 0x4f84, 0x4f8c, 0x4f94, 0x4f9d, 0x4fa5, 0x4fad, 0x4fb6, 0x4fbe, - 0x4fc7, 0x4fd0, 0x4fd8, 0x4fe1, 0x4fe9, 0x4ff2, 0x4ffb, 0x5002, - 0x5006, 0x500b, 0x500f, 0x5014, 0x5018, 0x501d, 0x5021, 0x5026, - 0x502a, 0x502f, 0x5034, 0x5038, 0x503d, 0x5041, 0x5046, 0x504b, - 0x5050, 0x5054, 0x5059, 0x505e, 0x5063, 0x5068, 0x506c, 0x5071, - 0x5076, 0x507b, 0x5080, 0x5085, 0x508a, 0x508f, 0x5094, 0x5099, - 0x509e, 0x50a3, 0x50a8, 0x50ae, 0x50b3, 0x50b8, 0x50bd, 0x50c2, - 0x50c8, 0x50cd, 0x50d2, 0x50d7, 0x50dd, 0x50e2, 0x50e7, 0x50ed, - 0x50f2, 0x50f8, 0x50fd, 0x5103, 0x5108, 0x510e, 0x5113, 0x5119, - 0x511f, 0x5124, 0x512a, 0x5130, 0x5135, 0x513b, 0x5141, 0x5147, - 0x514c, 0x5152, 0x5158, 0x515e, 0x5164, 0x516a, 0x5170, 0x5176, - 0x517c, 0x5182, 0x5188, 0x518e, 0x5194, 0x519a, 0x51a1, 0x51a7, - 0x51ad, 0x51b3, 0x51ba, 0x51c0, 0x51c6, 0x51cd, 0x51d3, 0x51d9, - 0x51e0, 0x51e6, 0x51ed, 0x51f3, 0x51fa, 0x5200, 0x5207, 0x520e, - 0x5214, 0x521b, 0x5222, 0x5229, 0x522f, 0x5236, 0x523d, 0x5244, - 0x524b, 0x5252, 0x5259, 0x5260, 0x5267, 0x526e, 0x5275, 0x527c, - 0x5283, 0x528a, 0x5292, 0x5299, 0x52a0, 0x52a7, 0x52af, 0x52b6, - 0x52bd, 0x52c5, 0x52cc, 0x52d4, 0x52db, 0x52e3, 0x52ea, 0x52f2, - 0x52fa, 0x5301, 0x5309, 0x5311, 0x5319, 0x5321, 0x5328, 0x5330, - 0x5338, 0x5340, 0x5348, 0x5350, 0x5358, 0x5360, 0x5369, 0x5371, - 0x5379, 0x5381, 0x5389, 0x5392, 0x539a, 0x53a2, 0x53ab, 0x53b3, - 0x53bc, 0x53c4, 0x53cd, 0x53d5, 0x53de, 0x53e7, 0x53ef, 0x53f8, - 0x5401, 0x5405, 0x5409, 0x540e, 0x5412, 0x5417, 0x541b, 0x5420, - 0x5424, 0x5429, 0x542d, 0x5432, 0x5437, 0x543b, 0x5440, 0x5445, - 0x5449, 0x544e, 0x5453, 0x5458, 0x545c, 0x5461, 0x5466, 0x546b, - 0x5470, 0x5475, 0x547a, 0x547f, 0x5483, 0x5488, 0x548d, 0x5492, - 0x5498, 0x549d, 0x54a2, 0x54a7, 0x54ac, 0x54b1, 0x54b6, 0x54bb, - 0x54c1, 0x54c6, 0x54cb, 0x54d0, 0x54d6, 0x54db, 0x54e0, 0x54e6, - 0x54eb, 0x54f1, 0x54f6, 0x54fc, 0x5501, 0x5507, 0x550c, 0x5512, - 0x5517, 0x551d, 0x5522, 0x5528, 0x552e, 0x5534, 0x5539, 0x553f, - 0x5545, 0x554b, 0x5550, 0x5556, 0x555c, 0x5562, 0x5568, 0x556e, - 0x5574, 0x557a, 0x5580, 0x5586, 0x558c, 0x5592, 0x5598, 0x559f, - 0x55a5, 0x55ab, 0x55b1, 0x55b8, 0x55be, 0x55c4, 0x55cb, 0x55d1, - 0x55d7, 0x55de, 0x55e4, 0x55eb, 0x55f1, 0x55f8, 0x55fe, 0x5605, - 0x560c, 0x5612, 0x5619, 0x5620, 0x5626, 0x562d, 0x5634, 0x563b, - 0x5642, 0x5649, 0x5650, 0x5657, 0x565d, 0x5665, 0x566c, 0x5673, - 0x567a, 0x5681, 0x5688, 0x568f, 0x5696, 0x569e, 0x56a5, 0x56ac, - 0x56b4, 0x56bb, 0x56c3, 0x56ca, 0x56d1, 0x56d9, 0x56e1, 0x56e8, - 0x56f0, 0x56f7, 0x56ff, 0x5707, 0x570f, 0x5716, 0x571e, 0x5726, - 0x572e, 0x5736, 0x573e, 0x5746, 0x574e, 0x5756, 0x575e, 0x5766, - 0x576e, 0x5776, 0x577f, 0x5787, 0x578f, 0x5797, 0x57a0, 0x57a8, - 0x57b1, 0x57b9, 0x57c2, 0x57ca, 0x57d3, 0x57db, 0x57e4, 0x57ed, - 0x57f5, 0x57fe, 0x5804, 0x5808, 0x580c, 0x5811, 0x5815, 0x581a, - 0x581e, 0x5823, 0x5827, 0x582c, 0x5831, 0x5835, 0x583a, 0x583f, - 0x5843, 0x5848, 0x584d, 0x5851, 0x5856, 0x585b, 0x5860, 0x5865, - 0x5869, 0x586e, 0x5873, 0x5878, 0x587d, 0x5882, 0x5887, 0x588c, - 0x5891, 0x5896, 0x589b, 0x58a0, 0x58a5, 0x58aa, 0x58af, 0x58b5, - 0x58ba, 0x58bf, 0x58c4, 0x58c9, 0x58cf, 0x58d4, 0x58d9, 0x58df, - 0x58e4, 0x58e9, 0x58ef, 0x58f4, 0x58fa, 0x58ff, 0x5905, 0x590a, - 0x5910, 0x5915, 0x591b, 0x5921, 0x5926, 0x592c, 0x5932, 0x5937, - 0x593d, 0x5943, 0x5949, 0x594f, 0x5954, 0x595a, 0x5960, 0x5966, - 0x596c, 0x5972, 0x5978, 0x597e, 0x5984, 0x598a, 0x5990, 0x5996, - 0x599d, 0x59a3, 0x59a9, 0x59af, 0x59b6, 0x59bc, 0x59c2, 0x59c9, - 0x59cf, 0x59d5, 0x59dc, 0x59e2, 0x59e9, 0x59ef, 0x59f6, 0x59fc, - 0x5a03, 0x5a0a, 0x5a10, 0x5a17, 0x5a1e, 0x5a24, 0x5a2b, 0x5a32, - 0x5a39, 0x5a40, 0x5a46, 0x5a4d, 0x5a54, 0x5a5b, 0x5a62, 0x5a69, - 0x5a70, 0x5a78, 0x5a7f, 0x5a86, 0x5a8d, 0x5a94, 0x5a9b, 0x5aa3, - 0x5aaa, 0x5ab1, 0x5ab9, 0x5ac0, 0x5ac8, 0x5acf, 0x5ad7, 0x5ade, - 0x5ae6, 0x5aed, 0x5af5, 0x5afd, 0x5b04, 0x5b0c, 0x5b14, 0x5b1c, - 0x5b23, 0x5b2b, 0x5b33, 0x5b3b, 0x5b43, 0x5b4b, 0x5b53, 0x5b5b, - 0x5b63, 0x5b6c, 0x5b74, 0x5b7c, 0x5b84, 0x5b8c, 0x5b95, 0x5b9d, - 0x5ba6, 0x5bae, 0x5bb6, 0x5bbf, 0x5bc7, 0x5bd0, 0x5bd9, 0x5be1, - 0x5bea, 0x5bf3, 0x5bfb, 0x5c02, 0x5c07, 0x5c0b, 0x5c0f, 0x5c14, - 0x5c18, 0x5c1d, 0x5c21, 0x5c26, 0x5c2b, 0x5c2f, 0x5c34, 0x5c38, - 0x5c3d, 0x5c42, 0x5c46, 0x5c4b, 0x5c50, 0x5c55, 0x5c59, 0x5c5e, - 0x5c63, 0x5c68, 0x5c6d, 0x5c72, 0x5c77, 0x5c7b, 0x5c80, 0x5c85, - 0x5c8a, 0x5c8f, 0x5c94, 0x5c99, 0x5c9e, 0x5ca4, 0x5ca9, 0x5cae, - 0x5cb3, 0x5cb8, 0x5cbd, 0x5cc3, 0x5cc8, 0x5ccd, 0x5cd2, 0x5cd8, - 0x5cdd, 0x5ce2, 0x5ce8, 0x5ced, 0x5cf3, 0x5cf8, 0x5cfe, 0x5d03, - 0x5d09, 0x5d0e, 0x5d14, 0x5d19, 0x5d1f, 0x5d25, 0x5d2a, 0x5d30, - 0x5d36, 0x5d3b, 0x5d41, 0x5d47, 0x5d4d, 0x5d53, 0x5d58, 0x5d5e, - 0x5d64, 0x5d6a, 0x5d70, 0x5d76, 0x5d7c, 0x5d82, 0x5d88, 0x5d8e, - 0x5d95, 0x5d9b, 0x5da1, 0x5da7, 0x5dad, 0x5db4, 0x5dba, 0x5dc0, - 0x5dc7, 0x5dcd, 0x5dd3, 0x5dda, 0x5de0, 0x5de7, 0x5ded, 0x5df4, - 0x5dfa, 0x5e01, 0x5e07, 0x5e0e, 0x5e15, 0x5e1b, 0x5e22, 0x5e29, - 0x5e30, 0x5e37, 0x5e3d, 0x5e44, 0x5e4b, 0x5e52, 0x5e59, 0x5e60, - 0x5e67, 0x5e6e, 0x5e75, 0x5e7c, 0x5e84, 0x5e8b, 0x5e92, 0x5e99, - 0x5ea0, 0x5ea8, 0x5eaf, 0x5eb6, 0x5ebe, 0x5ec5, 0x5ecd, 0x5ed4, - 0x5edc, 0x5ee3, 0x5eeb, 0x5ef3, 0x5efa, 0x5f02, 0x5f0a, 0x5f11, - 0x5f19, 0x5f21, 0x5f29, 0x5f31, 0x5f39, 0x5f41, 0x5f49, 0x5f51, - 0x5f59, 0x5f61, 0x5f69, 0x5f71, 0x5f79, 0x5f82, 0x5f8a, 0x5f92, - 0x5f9b, 0x5fa3, 0x5fab, 0x5fb4, 0x5fbc, 0x5fc5, 0x5fcd, 0x5fd6, - 0x5fdf, 0x5fe7, 0x5ff0, 0x5ff9, 0x6001, 0x6005, 0x600a, 0x600e, - 0x6013, 0x6017, 0x601c, 0x6020, 0x6025, 0x6029, 0x602e, 0x6032, - 0x6037, 0x603c, 0x6040, 0x6045, 0x604a, 0x604e, 0x6053, 0x6058, - 0x605d, 0x6062, 0x6066, 0x606b, 0x6070, 0x6075, 0x607a, 0x607f, - 0x6084, 0x6089, 0x608e, 0x6093, 0x6098, 0x609d, 0x60a2, 0x60a7, - 0x60ac, 0x60b1, 0x60b7, 0x60bc, 0x60c1, 0x60c6, 0x60cb, 0x60d1, - 0x60d6, 0x60db, 0x60e1, 0x60e6, 0x60eb, 0x60f1, 0x60f6, 0x60fc, - 0x6101, 0x6107, 0x610c, 0x6112, 0x6118, 0x611d, 0x6123, 0x6128, - 0x612e, 0x6134, 0x613a, 0x613f, 0x6145, 0x614b, 0x6151, 0x6157, - 0x615d, 0x6162, 0x6168, 0x616e, 0x6174, 0x617a, 0x6180, 0x6186, - 0x618d, 0x6193, 0x6199, 0x619f, 0x61a5, 0x61ab, 0x61b2, 0x61b8, - 0x61be, 0x61cb, 0x61d8, 0x61e5, 0x61f2, 0x61ff, 0x620c, 0x6219, - 0x6227, 0x6234, 0x6242, 0x6250, 0x625e, 0x626c, 0x627a, 0x6288, - 0x6297, 0x62a5, 0x62b4, 0x62c3, 0x62d2, 0x62e1, 0x62f0, 0x62ff, - 0x630f, 0x631f, 0x632e, 0x633e, 0x634e, 0x635e, 0x636f, 0x637f, - 0x6390, 0x63a0, 0x63b1, 0x63c2, 0x63d3, 0x63e5, 0x63f6, 0x6404, - 0x640d, 0x6416, 0x641f, 0x6428, 0x6431, 0x643a, 0x6444, 0x644d, - 0x6456, 0x6460, 0x646a, 0x6473, 0x647d, 0x6487, 0x6491, 0x649b, - 0x64a5, 0x64b0, 0x64ba, 0x64c5, 0x64cf, 0x64da, 0x64e4, 0x64ef, - 0x64fa, 0x6505, 0x6510, 0x651b, 0x6527, 0x6532, 0x653e, 0x6549, - 0x6555, 0x6561, 0x656c, 0x6578, 0x6585, 0x6591, 0x659d, 0x65a9, - 0x65b6, 0x65c3, 0x65cf, 0x65dc, 0x65e9, 0x65f6, 0x6603, 0x6611, - 0x661e, 0x662b, 0x6639, 0x6647, 0x6655, 0x6663, 0x6671, 0x667f, - 0x668d, 0x669c, 0x66aa, 0x66b9, 0x66c8, 0x66d7, 0x66e6, 0x66f5, - 0x6705, 0x6714, 0x6724, 0x6734, 0x6744, 0x6754, 0x6764, 0x6774, - 0x6785, 0x6795, 0x67a6, 0x67b7, 0x67c8, 0x67d9, 0x67ea, 0x67fc, - 0x6807, 0x6810, 0x6819, 0x6822, 0x682b, 0x6834, 0x683d, 0x6847, - 0x6850, 0x685a, 0x6863, 0x686d, 0x6877, 0x6881, 0x688b, 0x6895, - 0x689f, 0x68a9, 0x68b3, 0x68be, 0x68c8, 0x68d3, 0x68dd, 0x68e8, - 0x68f3, 0x68fe, 0x6909, 0x6914, 0x691f, 0x692b, 0x6936, 0x6941, - 0x694d, 0x6959, 0x6965, 0x6971, 0x697d, 0x6989, 0x6995, 0x69a1, - 0x69ae, 0x69ba, 0x69c7, 0x69d4, 0x69e1, 0x69ee, 0x69fb, 0x6a08, - 0x6a15, 0x6a23, 0x6a30, 0x6a3e, 0x6a4c, 0x6a5a, 0x6a68, 0x6a76, - 0x6a84, 0x6a92, 0x6aa1, 0x6ab0, 0x6abe, 0x6acd, 0x6adc, 0x6aeb, - 0x6afb, 0x6b0a, 0x6b1a, 0x6b29, 0x6b39, 0x6b49, 0x6b59, 0x6b69, - 0x6b7a, 0x6b8a, 0x6b9b, 0x6bac, 0x6bbd, 0x6bce, 0x6bdf, 0x6bf0, - 0x6c01, 0x6c0a, 0x6c13, 0x6c1c, 0x6c25, 0x6c2e, 0x6c37, 0x6c41, - 0x6c4a, 0x6c53, 0x6c5d, 0x6c67, 0x6c70, 0x6c7a, 0x6c84, 0x6c8e, - 0x6c98, 0x6ca2, 0x6cac, 0x6cb7, 0x6cc1, 0x6ccc, 0x6cd6, 0x6ce1, - 0x6cec, 0x6cf7, 0x6d02, 0x6d0d, 0x6d18, 0x6d23, 0x6d2e, 0x6d3a, - 0x6d45, 0x6d51, 0x6d5d, 0x6d69, 0x6d75, 0x6d81, 0x6d8d, 0x6d99, - 0x6da5, 0x6db2, 0x6dbf, 0x6dcb, 0x6dd8, 0x6de5, 0x6df2, 0x6dff, - 0x6e0c, 0x6e1a, 0x6e27, 0x6e35, 0x6e43, 0x6e50, 0x6e5e, 0x6e6c, - 0x6e7b, 0x6e89, 0x6e97, 0x6ea6, 0x6eb5, 0x6ec3, 0x6ed2, 0x6ee1, - 0x6ef1, 0x6f00, 0x6f0f, 0x6f1f, 0x6f2f, 0x6f3f, 0x6f4f, 0x6f5f, - 0x6f6f, 0x6f7f, 0x6f90, 0x6fa1, 0x6fb2, 0x6fc3, 0x6fd4, 0x6fe5, - 0x6ff6, 0x7004, 0x700d, 0x7016, 0x701f, 0x7028, 0x7031, 0x703a, - 0x7044, 0x704d, 0x7057, 0x7060, 0x706a, 0x7074, 0x707e, 0x7087, - 0x7091, 0x709c, 0x70a6, 0x70b0, 0x70ba, 0x70c5, 0x70cf, 0x70da, - 0x70e5, 0x70f0, 0x70fa, 0x7105, 0x7111, 0x711c, 0x7127, 0x7132, - 0x713e, 0x7149, 0x7155, 0x7161, 0x716d, 0x7179, 0x7185, 0x7191, - 0x719d, 0x71aa, 0x71b6, 0x71c3, 0x71d0, 0x71dc, 0x71e9, 0x71f6, - 0x7204, 0x7211, 0x721e, 0x722c, 0x7239, 0x7247, 0x7255, 0x7263, - 0x7271, 0x727f, 0x728e, 0x729c, 0x72ab, 0x72ba, 0x72c8, 0x72d7, - 0x72e7, 0x72f6, 0x7305, 0x7315, 0x7324, 0x7334, 0x7344, 0x7354, - 0x7364, 0x7375, 0x7385, 0x7396, 0x73a6, 0x73b7, 0x73c8, 0x73da, - 0x73eb, 0x73fc, 0x7407, 0x7410, 0x7419, 0x7422, 0x742b, 0x7434, - 0x743e, 0x7447, 0x7450, 0x745a, 0x7464, 0x746d, 0x7477, 0x7481, - 0x748b, 0x7495, 0x749f, 0x74a9, 0x74b4, 0x74be, 0x74c8, 0x74d3, - 0x74de, 0x74e8, 0x74f3, 0x74fe, 0x7509, 0x7514, 0x7520, 0x752b, - 0x7536, 0x7542, 0x754d, 0x7559, 0x7565, 0x7571, 0x757d, 0x7589, - 0x7595, 0x75a2, 0x75ae, 0x75bb, 0x75c7, 0x75d4, 0x75e1, 0x75ee, - 0x75fb, 0x7608, 0x7616, 0x7623, 0x7631, 0x763e, 0x764c, 0x765a, - 0x7668, 0x7676, 0x7684, 0x7693, 0x76a1, 0x76b0, 0x76bf, 0x76ce, - 0x76dd, 0x76ec, 0x76fb, 0x770b, 0x771a, 0x772a, 0x773a, 0x774a, - 0x775a, 0x776a, 0x777a, 0x778b, 0x779b, 0x77ac, 0x77bd, 0x77ce, - 0x77e0, 0x77f1, 0x7801, 0x780a, 0x7813, 0x781c, 0x7825, 0x782e, - 0x7838, 0x7841, 0x784a, 0x7854, 0x785d, 0x7867, 0x7871, 0x787a, - 0x7884, 0x788e, 0x7898, 0x78a3, 0x78ad, 0x78b7, 0x78c2, 0x78cc, - 0x78d7, 0x78e1, 0x78ec, 0x78f7, 0x7902, 0x790d, 0x7918, 0x7923, - 0x792f, 0x793a, 0x7946, 0x7951, 0x795d, 0x7969, 0x7975, 0x7981, - 0x798d, 0x7999, 0x79a6, 0x79b2, 0x79bf, 0x79cc, 0x79d8, 0x79e5, - 0x79f2, 0x79ff, 0x7a0d, 0x7a1a, 0x7a28, 0x7a35, 0x7a43, 0x7a51, - 0x7a5f, 0x7a6d, 0x7a7b, 0x7a89, 0x7a98, 0x7aa6, 0x7ab5, 0x7ac4, - 0x7ad3, 0x7ae2, 0x7af1, 0x7b00, 0x7b10, 0x7b1f, 0x7b2f, 0x7b3f, - 0x7b4f, 0x7b5f, 0x7b70, 0x7b80, 0x7b91, 0x7ba1, 0x7bb2, 0x7bc3, - 0x7bd4, 0x7be6, 0x7bf7, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, - 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, 0x8004, - 0x8004, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, 0x8005, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, - 0x8006, 0x8006, 0x8006, 0x8006, 0x8006, 0x8007, 0x8007, 0x8007, - 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, - 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, - 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, - 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, - 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, - 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, - 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, - 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, - 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, - 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, 0x8007, - 0x8007, 0x8007, 0x8007, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, - 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, - 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, - 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, - 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, - 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, - 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, - 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, - 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, - 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, 0x8008, - 0x8008, 0x8008, 0x8008, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, - 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, - 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, - 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, - 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, - 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, - 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, - 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, - 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, - 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x8009, 0x800a, 0x800a, - 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, - 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, - 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, - 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, - 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, - 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, - 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, - 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, 0x800a, - 0x800a, 0x800a, 0x800a, 0x800a, 0x800b, 0x800b, 0x800b, 0x800b, - 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, - 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, - 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, - 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, - 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, - 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, - 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, - 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800b, 0x800c, - 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, - 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, - 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, - 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, - 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, - 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, - 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, - 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800c, 0x800d, - 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, - 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, - 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, - 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, - 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, - 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, - 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, - 0x800d, 0x800d, 0x800d, 0x800d, 0x800d, 0x800e, 0x800e, 0x800e, - 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, - 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, - 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, - 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, - 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, - 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, - 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800e, 0x800f, - 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, - 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, - 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, - 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, - 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, - 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, - 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, 0x800f, - 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, - 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, - 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, - 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, - 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, - 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, - 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8010, 0x8011, - 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, - 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, - 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, - 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, - 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, - 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, 0x8011, - 0x8011, 0x8011, 0x8011, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, - 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, - 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, - 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, - 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, - 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, 0x8012, - 0x8012, 0x8012, 0x8012, 0x8012, 0x8013, 0x8013, 0x8013, 0x8013, - 0x8013, 0x8013, 0x8013, 0x8013, 0x8013, 0x8013, 0x8013, 0x8013, - 0x8013, 0x8013, 0x8013, 0x8013, 0x8013, 0x8013, 0x8013, 0x8013, - 0x8013, 0x8013, 0x8013, 0x8013, 0x8014, 0x8014, 0x8014, 0x8014, - 0x8014, 0x8014, 0x8014, 0x8014, 0x8014, 0x8014, 0x8014, 0x8014, - 0x8014, 0x8014, 0x8014, 0x8014, 0x8014, 0x8014, 0x8014, 0x8014, - 0x8014, 0x8014, 0x8014, 0x8014, 0x8014, 0x8015, 0x8015, 0x8015, - 0x8015, 0x8015, 0x8015, 0x8015, 0x8015, 0x8015, 0x8015, 0x8015, - 0x8015, 0x8015, 0x8015, 0x8015, 0x8015, 0x8015, 0x8015, 0x8015, - 0x8015, 0x8015, 0x8015, 0x8015, 0x8016, 0x8016, 0x8016, 0x8016, - 0x8016, 0x8016, 0x8016, 0x8016, 0x8016, 0x8016, 0x8016, 0x8016, - 0x8016, 0x8016, 0x8016, 0x8016, 0x8016, 0x8016, 0x8016, 0x8016, - 0x8016, 0x8016, 0x8016, 0x8017, 0x8017, 0x8017, 0x8017, 0x8017, - 0x8017, 0x8017, 0x8017, 0x8017, 0x8017, 0x8017, 0x8017, 0x8017, - 0x8017, 0x8017, 0x8017, 0x8017, 0x8017, 0x8017, 0x8017, 0x8017, - 0x8017, 0x8017, 0x8018, 0x8018, 0x8018, 0x8018, 0x8018, 0x8018, - 0x8018, 0x8018, 0x8018, 0x8018, 0x8018, 0x8018, 0x8018, 0x8018, - 0x8018, 0x8018, 0x8018, 0x8018, 0x8018, 0x8018, 0x8018, 0x8019, - 0x8019, 0x8019, 0x8019, 0x8019, 0x8019, 0x8019, 0x8019, 0x8019, - 0x8019, 0x8019, 0x8019, 0x8019, 0x8019, 0x8019, 0x8019, 0x8019, - 0x8019, 0x8019, 0x8019, 0x8019, 0x8019, 0x801a, 0x801a, 0x801a, - 0x801a, 0x801a, 0x801a, 0x801a, 0x801a, 0x801a, 0x801a, 0x801a, - 0x801a, 0x801a, 0x801a, 0x801a, 0x801a, 0x801a, 0x801a, 0x801a, - 0x801a, 0x801a, 0x801b, 0x801b, 0x801b, 0x801b, 0x801b, 0x801b, - 0x801b, 0x801b, 0x801b, 0x801b, 0x801b, 0x801b, 0x801b, 0x801b, - 0x801b, 0x801b, 0x801b, 0x801b, 0x801b, 0x801b, 0x801c, 0x801c, - 0x801c, 0x801c, 0x801c, 0x801c, 0x801c, 0x801c, 0x801c, 0x801c, - 0x801c, 0x801c, 0x801c, 0x801c, 0x801c, 0x801c, 0x801c, 0x801c, - 0x801c, 0x801c, 0x801d, 0x801d, 0x801d, 0x801d, 0x801d, 0x801d, - 0x801d, 0x801d, 0x801d, 0x801d, 0x801d, 0x801d, 0x801d, 0x801d, - 0x801d, 0x801d, 0x801d, 0x801d, 0x801d, 0x801d, 0x801e, 0x801e, - 0x801e, 0x801e, 0x801e, 0x801e, 0x801e, 0x801e, 0x801e, 0x801e, - 0x801e, 0x801e, 0x801e, 0x801e, 0x801e, 0x801e, 0x801e, 0x801e, - 0x801e, 0x801e, 0x801f, 0x801f, 0x801f, 0x801f, 0x801f, 0x801f, - 0x801f, 0x801f, 0x801f, 0x801f, 0x801f, 0x801f, 0x801f, 0x801f, - 0x801f, 0x801f, 0x801f, 0x801f, 0x801f, 0x8020, 0x8020, 0x8020, - 0x8020, 0x8020, 0x8020, 0x8020, 0x8020, 0x8020, 0x8020, 0x8020, - 0x8020, 0x8020, 0x8020, 0x8020, 0x8020, 0x8020, 0x8020, 0x8021, - 0x8021, 0x8021, 0x8021, 0x8021, 0x8021, 0x8021, 0x8021, 0x8021, - 0x8021, 0x8021, 0x8021, 0x8021, 0x8021, 0x8021, 0x8021, 0x8021, - 0x8021, 0x8021, 0x8022, 0x8022, 0x8022, 0x8022, 0x8022, 0x8022, - 0x8022, 0x8022, 0x8022, 0x8022, 0x8022, 0x8022, 0x8022, 0x8022, - 0x8022, 0x8022, 0x8022, 0x8022, 0x8023, 0x8023, 0x8023, 0x8023, - 0x8023, 0x8023, 0x8023, 0x8023, 0x8023, 0x8023, 0x8023, 0x8023, - 0x8023, 0x8023, 0x8023, 0x8023, 0x8023, 0x8023, 0x8024, 0x8024, - 0x8024, 0x8024, 0x8024, 0x8024, 0x8024, 0x8024, 0x8024, 0x8024, - 0x8024, 0x8024, 0x8024, 0x8024, 0x8024, 0x8024, 0x8024, 0x8025, - 0x8025, 0x8025, 0x8025, 0x8025, 0x8025, 0x8025, 0x8025, 0x8025, - 0x8025, 0x8025, 0x8025, 0x8025, 0x8025, 0x8025, 0x8025, 0x8025, - 0x8025, 0x8026, 0x8026, 0x8026, 0x8026, 0x8026, 0x8026, 0x8026, - 0x8026, 0x8026, 0x8026, 0x8026, 0x8026, 0x8026, 0x8026, 0x8026, - 0x8026, 0x8026, 0x8027, 0x8027, 0x8027, 0x8027, 0x8027, 0x8027, - 0x8027, 0x8027, 0x8027, 0x8027, 0x8027, 0x8027, 0x8027, 0x8027, - 0x8027, 0x8027, 0x8028, 0x8028, 0x8028, 0x8028, 0x8028, 0x8028, - 0x8028, 0x8028, 0x8028, 0x8028, 0x8028, 0x8028, 0x8028, 0x8028, - 0x8028, 0x8028, 0x8028, 0x8029, 0x8029, 0x8029, 0x8029, 0x8029, - 0x8029, 0x8029, 0x8029, 0x8029, 0x8029, 0x8029, 0x8029, 0x8029, - 0x8029, 0x8029, 0x8029, 0x802a, 0x802a, 0x802a, 0x802a, 0x802a, - 0x802a, 0x802a, 0x802a, 0x802a, 0x802a, 0x802a, 0x802a, 0x802a, - 0x802a, 0x802a, 0x802a, 0x802b, 0x802b, 0x802b, 0x802b, 0x802b, - 0x802b, 0x802b, 0x802b, 0x802b, 0x802b, 0x802b, 0x802b, 0x802b, - 0x802b, 0x802b, 0x802b, 0x802c, 0x802c, 0x802c, 0x802c, 0x802c, - 0x802c, 0x802c, 0x802c, 0x802c, 0x802c, 0x802c, 0x802c, 0x802c, - 0x802c, 0x802c, 0x802c, 0x802d, 0x802d, 0x802d, 0x802d, 0x802d, - 0x802d, 0x802d, 0x802d, 0x802d, 0x802d, 0x802d, 0x802d, 0x802d, - 0x802d, 0x802d, 0x802d, 0x802e, 0x802e, 0x802e, 0x802e, 0x802e, - 0x802e, 0x802e, 0x802e, 0x802e, 0x802e, 0x802e, 0x802e, 0x802e, - 0x802e, 0x802e, 0x802f, 0x802f, 0x802f, 0x802f, 0x802f, 0x802f, - 0x802f, 0x802f, 0x802f, 0x802f, 0x802f, 0x802f, 0x802f, 0x802f, - 0x802f, 0x8030, 0x8030, 0x8030, 0x8030, 0x8030, 0x8030, 0x8030, - 0x8030, 0x8030, 0x8030, 0x8030, 0x8030, 0x8030, 0x8030, 0x8030, - 0x8031, 0x8031, 0x8031, 0x8031, 0x8031, 0x8031, 0x8031, 0x8031, - 0x8031, 0x8031, 0x8031, 0x8031, 0x8031, 0x8031, 0x8031, 0x8032, - 0x8032, 0x8032, 0x8032, 0x8032, 0x8032, 0x8032, 0x8032, 0x8032, - 0x8032, 0x8032, 0x8032, 0x8032, 0x8032, 0x8032, 0x8033, 0x8033, - 0x8033, 0x8033, 0x8033, 0x8033, 0x8033, 0x8033, 0x8033, 0x8033, - 0x8033, 0x8033, 0x8033, 0x8033, 0x8034, 0x8034, 0x8034, 0x8034, - 0x8034, 0x8034, 0x8034, 0x8034, 0x8034, 0x8034, 0x8034, 0x8034, - 0x8034, 0x8034, 0x8034, 0x8035, 0x8035, 0x8035, 0x8035, 0x8035, - 0x8035, 0x8035, 0x8035, 0x8035, 0x8035, 0x8035, 0x8035, 0x8035, - 0x8035, 0x8036, 0x8036, 0x8036, 0x8036, 0x8036, 0x8036, 0x8036, - 0x8036, 0x8036, 0x8036, 0x8036, 0x8036, 0x8036, 0x8036, 0x8037, - 0x8037, 0x8037, 0x8037, 0x8037, 0x8037, 0x8037, 0x8037, 0x8037, - 0x8037, 0x8037, 0x8037, 0x8037, 0x8037, 0x8038, 0x8038, 0x8038, - 0x8038, 0x8038, 0x8038, 0x8038, 0x8038, 0x8038, 0x8038, 0x8038, - 0x8038, 0x8038, 0x8038, 0x8039, 0x8039, 0x8039, 0x8039, 0x8039, - 0x8039, 0x8039, 0x8039, 0x8039, 0x8039, 0x8039, 0x8039, 0x8039, - 0x803a, 0x803a, 0x803a, 0x803a, 0x803a, 0x803a, 0x803a, 0x803a, - 0x803a, 0x803a, 0x803a, 0x803a, 0x803a, 0x803a, 0x803b, 0x803b, - 0x803b, 0x803b, 0x803b, 0x803b, 0x803b, 0x803b, 0x803b, 0x803b, - 0x803b, 0x803b, 0x803b, 0x803c, 0x803c, 0x803c, 0x803c, 0x803c, - 0x803c, 0x803c, 0x803c, 0x803c, 0x803c, 0x803c, 0x803c, 0x803c, - 0x803d, 0x803d, 0x803d, 0x803d, 0x803d, 0x803d, 0x803d, 0x803d, - 0x803d, 0x803d, 0x803d, 0x803d, 0x803d, 0x803d, 0x803e, 0x803e, - 0x803e, 0x803e, 0x803e, 0x803e, 0x803e, 0x803e, 0x803e, 0x803e, - 0x803e, 0x803e, 0x803e, 0x803f, 0x803f, 0x803f, 0x803f, 0x803f, - 0x803f, 0x803f, 0x803f, 0x803f, 0x803f, 0x803f, 0x803f, 0x803f, - 0x8040, 0x8040, 0x8040, 0x8040, 0x8040, 0x8040, 0x8040, 0x8040, - 0x8040, 0x8040, 0x8040, 0x8040, 0x8041, 0x8041, 0x8041, 0x8041, - 0x8041, 0x8041, 0x8041, 0x8041, 0x8041, 0x8041, 0x8041, 0x8041, - 0x8041, 0x8042, 0x8042, 0x8042, 0x8042, 0x8042, 0x8042, 0x8042, - 0x8042, 0x8042, 0x8042, 0x8042, 0x8042, 0x8042, 0x8043, 0x8043, - 0x8043, 0x8043, 0x8043, 0x8043, 0x8043, 0x8043, 0x8043, 0x8043, - 0x8043, 0x8043, 0x8044, 0x8044, 0x8044, 0x8044, 0x8044, 0x8044, - 0x8044, 0x8044, 0x8044, 0x8044, 0x8044, 0x8044, 0x8044, 0x8045, - 0x8045, 0x8045, 0x8045, 0x8045, 0x8045, 0x8045, 0x8045, 0x8045, - 0x8045, 0x8045, 0x8045, 0x8046, 0x8046, 0x8046, 0x8046, 0x8046, - 0x8046, 0x8046, 0x8046, 0x8046, 0x8046, 0x8046, 0x8046, 0x8047, - 0x8047, 0x8047, 0x8047, 0x8047, 0x8047, 0x8047, 0x8047, 0x8047, - 0x8047, 0x8047, 0x8047, 0x8048, 0x8048, 0x8048, 0x8048, 0x8048, - 0x8048, 0x8048, 0x8048, 0x8048, 0x8048, 0x8048, 0x8048, 0x8049, - 0x8049, 0x8049, 0x8049, 0x8049, 0x8049, 0x8049, 0x8049, 0x8049, - 0x8049, 0x8049, 0x8049, 0x804a, 0x804a, 0x804a, 0x804a, 0x804a, - 0x804a, 0x804a, 0x804a, 0x804a, 0x804a, 0x804a, 0x804a, 0x804b, - 0x804b, 0x804b, 0x804b, 0x804b, 0x804b, 0x804b, 0x804b, 0x804b, - 0x804b, 0x804b, 0x804b, 0x804c, 0x804c, 0x804c, 0x804c, 0x804c, - 0x804c, 0x804c, 0x804c, 0x804c, 0x804c, 0x804c, 0x804c, 0x804d, - 0x804d, 0x804d, 0x804d, 0x804d, 0x804d, 0x804d, 0x804d, 0x804d, - 0x804d, 0x804d, 0x804e, 0x804e, 0x804e, 0x804e, 0x804e, 0x804e, - 0x804e, 0x804e, 0x804e, 0x804e, 0x804e, 0x804e, 0x804f, 0x804f, - 0x804f, 0x804f, 0x804f, 0x804f, 0x804f, 0x804f, 0x804f, 0x804f, - 0x804f, 0x8050, 0x8050, 0x8050, 0x8050, 0x8050, 0x8050, 0x8050, - 0x8050, 0x8050, 0x8050, 0x8050, 0x8051, 0x8051, 0x8051, 0x8051, - 0x8051, 0x8051, 0x8051, 0x8051, 0x8051, 0x8051, 0x8051, 0x8051, - 0x8052, 0x8052, 0x8052, 0x8052, 0x8052, 0x8052, 0x8052, 0x8052, - 0x8052, 0x8052, 0x8052, 0x8053, 0x8053, 0x8053, 0x8053, 0x8053, - 0x8053, 0x8053, 0x8053, 0x8053, 0x8053, 0x8053, 0x8054, 0x8054, - 0x8054, 0x8054, 0x8054, 0x8054, 0x8054, 0x8054, 0x8054, 0x8054, - 0x8054, 0x8055, 0x8055, 0x8055, 0x8055, 0x8055, 0x8056, 0x8056, - 0x8056, 0x8056, 0x8056, 0x8056, 0x8057, 0x8057, 0x8057, 0x8057, - 0x8057, 0x8058, 0x8058, 0x8058, 0x8058, 0x8058, 0x8058, 0x8059, - 0x8059, 0x8059, 0x8059, 0x8059, 0x805a, 0x805a, 0x805a, 0x805a, - 0x805a, 0x805b, 0x805b, 0x805b, 0x805b, 0x805b, 0x805b, 0x805c, - 0x805c, 0x805c, 0x805c, 0x805c, 0x805d, 0x805d, 0x805d, 0x805d, - 0x805d, 0x805e, 0x805e, 0x805e, 0x805e, 0x805e, 0x805f, 0x805f, - 0x805f, 0x805f, 0x805f, 0x8060, 0x8060, 0x8060, 0x8060, 0x8060, - 0x8060, 0x8061, 0x8061, 0x8061, 0x8061, 0x8061, 0x8062, 0x8062, - 0x8062, 0x8062, 0x8062, 0x8063, 0x8063, 0x8063, 0x8063, 0x8063, - 0x8064, 0x8064, 0x8064, 0x8064, 0x8064, 0x8065, 0x8065, 0x8065, - 0x8065, 0x8065, 0x8066, 0x8066, 0x8066, 0x8066, 0x8066, 0x8067, - 0x8067, 0x8067, 0x8067, 0x8067, 0x8068, 0x8068, 0x8068, 0x8068, - 0x8068, 0x8069, 0x8069, 0x8069, 0x8069, 0x8069, 0x806a, 0x806a, - 0x806a, 0x806a, 0x806b, 0x806b, 0x806b, 0x806b, 0x806b, 0x806c, - 0x806c, 0x806c, 0x806c, 0x806c, 0x806d, 0x806d, 0x806d, 0x806d, - 0x806d, 0x806e, 0x806e, 0x806e, 0x806e, 0x806e, 0x806f, 0x806f, - 0x806f, 0x806f, 0x8070, 0x8070, 0x8070, 0x8070, 0x8070, 0x8071, - 0x8071, 0x8071, 0x8071, 0x8071, 0x8072, 0x8072, 0x8072, 0x8072, - 0x8073, 0x8073, 0x8073, 0x8073, 0x8073, 0x8074, 0x8074, 0x8074, - 0x8074, 0x8074, 0x8075, 0x8075, 0x8075, 0x8075, 0x8076, 0x8076, - 0x8076, 0x8076, 0x8076, 0x8077, 0x8077, 0x8077, 0x8077, 0x8077, - 0x8078, 0x8078, 0x8078, 0x8078, 0x8079, 0x8079, 0x8079, 0x8079, - 0x8079, 0x807a, 0x807a, 0x807a, 0x807a, 0x807b, 0x807b, 0x807b, - 0x807b, 0x807b, 0x807c, 0x807c, 0x807c, 0x807c, 0x807d, 0x807d, - 0x807d, 0x807d, 0x807d, 0x807e, 0x807e, 0x807e, 0x807e, 0x807f, - 0x807f, 0x807f, 0x807f, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, - 0x8081, 0x8081, 0x8081, 0x8081, 0x8082, 0x8082, 0x8082, 0x8082, - 0x8082, 0x8083, 0x8083, 0x8083, 0x8083, 0x8084, 0x8084, 0x8084, - 0x8084, 0x8085, 0x8085, 0x8085, 0x8085, 0x8086, 0x8086, 0x8086, - 0x8086, 0x8086, 0x8087, 0x8087, 0x8087, 0x8087, 0x8088, 0x8088, - 0x8088, 0x8088, 0x8089, 0x8089, 0x8089, 0x8089, 0x8089, 0x808a, - 0x808a, 0x808a, 0x808a, 0x808b, 0x808b, 0x808b, 0x808b, 0x808c, - 0x808c, 0x808c, 0x808c, 0x808d, 0x808d, 0x808d, 0x808d, 0x808e, - 0x808e, 0x808e, 0x808e, 0x808f, 0x808f, 0x808f, 0x808f, 0x808f, - 0x8090, 0x8090, 0x8090, 0x8090, 0x8091, 0x8091, 0x8091, 0x8091, - 0x8092, 0x8092, 0x8092, 0x8092, 0x8093, 0x8093, 0x8093, 0x8093, - 0x8094, 0x8094, 0x8094, 0x8094, 0x8095, 0x8095, 0x8095, 0x8095, - 0x8096, 0x8096, 0x8096, 0x8096, 0x8097, 0x8097, 0x8097, 0x8097, - 0x8098, 0x8098, 0x8098, 0x8098, 0x8099, 0x8099, 0x8099, 0x8099, - 0x809a, 0x809a, 0x809a, 0x809a, 0x809b, 0x809b, 0x809b, 0x809b, - 0x809c, 0x809c, 0x809c, 0x809c, 0x809d, 0x809d, 0x809d, 0x809d, - 0x809e, 0x809e, 0x809e, 0x809e, 0x809f, 0x809f, 0x809f, 0x809f, - 0x80a0, 0x80a0, 0x80a0, 0x80a0, 0x80a1, 0x80a1, 0x80a1, 0x80a2, - 0x80a2, 0x80a2, 0x80a2, 0x80a3, 0x80a3, 0x80a3, 0x80a3, 0x80a4, - 0x80a4, 0x80a4, 0x80a4, 0x80a5, 0x80a5, 0x80a5, 0x80a5, 0x80a6, - 0x80a6, 0x80a6, 0x80a6, 0x80a7, 0x80a7, 0x80a7, 0x80a8, 0x80a8, - 0x80a8, 0x80a8, 0x80a9, 0x80a9, 0x80a9, 0x80a9, 0x80aa, 0x80aa, - 0x80aa, 0x80aa, 0x80ab, 0x80ab, 0x80ab, 0x80ab, 0x80ac, 0x80ac, - 0x80ac, 0x80ad, 0x80ad, 0x80ad, 0x80ad, 0x80ae, 0x80ae, 0x80ae, - 0x80ae, 0x80af, 0x80af, 0x80af, 0x80b0, 0x80b0, 0x80b0, 0x80b0, - 0x80b1, 0x80b1, 0x80b1, 0x80b1, 0x80b2, 0x80b2, 0x80b2, 0x80b3, - 0x80b3, 0x80b3, 0x80b3, 0x80b4, 0x80b4, 0x80b4, 0x80b4, 0x80b5, - 0x80b5, 0x80b5, 0x80b6, 0x80b6, 0x80b6, 0x80b6, 0x80b7, 0x80b7, - 0x80b7, 0x80b7, 0x80b8, 0x80b8, 0x80b8, 0x80b9, 0x80b9, 0x80b9, - 0x80b9, 0x80ba, 0x80ba, 0x80ba, 0x80bb, 0x80bb, 0x80bb, 0x80bb, - 0x80bc, 0x80bc, 0x80bc, 0x80bc, 0x80bd, 0x80bd, 0x80bd, 0x80be, - 0x80be, 0x80be, 0x80be, 0x80bf, 0x80bf, 0x80bf, 0x80c0, 0x80c0, - 0x80c0, 0x80c0, 0x80c1, 0x80c1, 0x80c1, 0x80c2, 0x80c2, 0x80c2, - 0x80c2, 0x80c3, 0x80c3, 0x80c3, 0x80c4, 0x80c4, 0x80c4, 0x80c4, - 0x80c5, 0x80c5, 0x80c5, 0x80c6, 0x80c6, 0x80c6, 0x80c6, 0x80c7, - 0x80c7, 0x80c7, 0x80c8, 0x80c8, 0x80c8, 0x80c8, 0x80c9, 0x80c9, - 0x80c9, 0x80ca, 0x80ca, 0x80ca, 0x80cb, 0x80cb, 0x80cb, 0x80cb, - 0x80cc, 0x80cc, 0x80cc, 0x80cd, 0x80cd, 0x80cd, 0x80cd, 0x80ce, - 0x80ce, 0x80ce, 0x80cf, 0x80cf, 0x80cf, 0x80d0, 0x80d0, 0x80d0, - 0x80d0, 0x80d1, 0x80d1, 0x80d1, 0x80d2, 0x80d2, 0x80d2, 0x80d3, - 0x80d3, 0x80d3, 0x80d3, 0x80d4, 0x80d4, 0x80d4, 0x80d5, 0x80d5, - 0x80d5, 0x80d6, 0x80d6, 0x80d6, 0x80d6, 0x80d7, 0x80d7, 0x80d7, - 0x80d8, 0x80d8, 0x80d8, 0x80d9, 0x80d9, 0x80d9, 0x80d9, 0x80da, - 0x80da, 0x80da, 0x80db, 0x80db, 0x80db, 0x80dc, 0x80dc, 0x80dc, - 0x80dc, 0x80dd, 0x80dd, 0x80dd, 0x80de, 0x80de, 0x80de, 0x80df, - 0x80df, 0x80df, 0x80e0, 0x80e0, 0x80e0, 0x80e0, 0x80e1, 0x80e1, - 0x80e1, 0x80e2, 0x80e2, 0x80e2, 0x80e3, 0x80e3, 0x80e3, 0x80e4, - 0x80e4, 0x80e4, 0x80e5, 0x80e5, 0x80e5, 0x80e5, 0x80e6, 0x80e6, - 0x80e6, 0x80e7, 0x80e7, 0x80e7, 0x80e8, 0x80e8, 0x80e8, 0x80e9, - 0x80e9, 0x80e9, 0x80ea, 0x80ea, 0x80ea, 0x80eb, 0x80eb, 0x80eb, - 0x80eb, 0x80ec, 0x80ec, 0x80ec, 0x80ed, 0x80ed, 0x80ed, 0x80ee, - 0x80ee, 0x80ee, 0x80ef, 0x80ef, 0x80ef, 0x80f0, 0x80f0, 0x80f0, - 0x80f1, 0x80f1, 0x80f1, 0x80f2, 0x80f2, 0x80f2, 0x80f2, 0x80f3, - 0x80f3, 0x80f3, 0x80f4, 0x80f4, 0x80f4, 0x80f5, 0x80f5, 0x80f5, - 0x80f6, 0x80f6, 0x80f6, 0x80f7, 0x80f7, 0x80f7, 0x80f8, 0x80f8, - 0x80f8, 0x80f9, 0x80f9, 0x80f9, 0x80fa, 0x80fa, 0x80fa, 0x80fb, - 0x80fb, 0x80fb, 0x80fc, 0x80fc, 0x80fc, 0x80fd, 0x80fd, 0x80fd, - 0x80fe, 0x80fe, 0x80fe, 0x80ff, 0x80ff, 0x80ff, 0x8100, 0x8100, - 0x8100, 0x8101, 0x8101, 0x8101, 0x8102, 0x8102, 0x8102, 0x8103, - 0x8103, 0x8103, 0x8104, 0x8104, 0x8104, 0x8105, 0x8105, 0x8105, - 0x8106, 0x8106, 0x8106, 0x8107, 0x8107, 0x8107, 0x8108, 0x8108, - 0x8108, 0x8109, 0x8109, 0x8109, 0x810a, 0x810a, 0x810a, 0x810b, - 0x810b, 0x810b, 0x810c, 0x810c, 0x810c, 0x810d, 0x810d, 0x810d, - 0x810e, 0x810e, 0x810e, 0x810f, 0x810f, 0x810f, 0x8110, 0x8110, - 0x8110, 0x8111, 0x8111, 0x8112, 0x8112, 0x8112, 0x8113, 0x8113, - 0x8113, 0x8114, 0x8114, 0x8114, 0x8115, 0x8115, 0x8115, 0x8116, - 0x8116, 0x8116, 0x8117, 0x8117, 0x8117, 0x8118, 0x8118, 0x8118, - 0x8119, 0x8119, 0x8119, 0x811a, 0x811a, 0x811b, 0x811b, 0x811b, - 0x811c, 0x811c, 0x811c, 0x811d, 0x811d, 0x811d, 0x811e, 0x811e, - 0x811e, 0x811f, 0x811f, 0x811f, 0x8120, 0x8120, 0x8121, 0x8121, - 0x8121, 0x8122, 0x8122, 0x8122, 0x8123, 0x8123, 0x8123, 0x8124, - 0x8124, 0x8124, 0x8125, 0x8125, 0x8126, 0x8126, 0x8126, 0x8127, - 0x8127, 0x8127, 0x8128, 0x8128, 0x8128, 0x8129, 0x8129, 0x8129, - 0x812a, 0x812a, 0x812b, 0x812b, 0x812b, 0x812c, 0x812c, 0x812c, - 0x812d, 0x812d, 0x812d, 0x812e, 0x812e, 0x812f, 0x812f, 0x812f, - 0x8130, 0x8130, 0x8130, 0x8131, 0x8131, 0x8131, 0x8132, 0x8132, - 0x8133, 0x8133, 0x8133, 0x8134, 0x8134, 0x8134, 0x8135, 0x8135, - 0x8136, 0x8136, 0x8136, 0x8137, 0x8137, 0x8137, 0x8138, 0x8138, - 0x8138, 0x8139, 0x8139, 0x813a, 0x813a, 0x813a, 0x813b, 0x813b, - 0x813b, 0x813c, 0x813c, 0x813d, 0x813d, 0x813d, 0x813e, 0x813e, - 0x813e, 0x813f, 0x813f, 0x8140, 0x8140, 0x8140, 0x8141, 0x8141, - 0x8141, 0x8142, 0x8142, 0x8143, 0x8143, 0x8143, 0x8144, 0x8144, - 0x8144, 0x8145, 0x8145, 0x8146, 0x8146, 0x8146, 0x8147, 0x8147, - 0x8147, 0x8148, 0x8148, 0x8149, 0x8149, 0x8149, 0x814a, 0x814a, - 0x814b, 0x814b, 0x814b, 0x814c, 0x814c, 0x814c, 0x814d, 0x814d, - 0x814e, 0x814e, 0x814e, 0x814f, 0x814f, 0x8150, 0x8150, 0x8150, - 0x8151, 0x8151, 0x8151, 0x8152, 0x8152, 0x8153, 0x8153, 0x8153, - 0x8154, 0x8154, 0x8155, 0x8155, 0x8155, 0x8156, 0x8156, 0x8156, - 0x8157, 0x8157, 0x8158, 0x8158, 0x8158, 0x8159, 0x8159, 0x815a, - 0x815a, 0x815a, 0x815b, 0x815b, 0x815c, 0x815c, 0x815c, 0x815d, - 0x815d, 0x815e, 0x815e, 0x815e, 0x815f, 0x815f, 0x815f, 0x8160, - 0x8160, 0x8161, 0x8161, 0x8161, 0x8162, 0x8162, 0x8163, 0x8163, - 0x8163, 0x8164, 0x8164, 0x8165, 0x8165, 0x8165, 0x8166, 0x8166, - 0x8167, 0x8167, 0x8167, 0x8168, 0x8168, 0x8169, 0x8169, 0x8169, - 0x816a, 0x816a, 0x816b, 0x816b, 0x816b, 0x816c, 0x816c, 0x816d, - 0x816d, 0x816d, 0x816e, 0x816e, 0x816f, 0x816f, 0x816f, 0x8170, - 0x8170, 0x8171, 0x8171, 0x8172, 0x8172, 0x8172, 0x8173, 0x8173, - 0x8174, 0x8174, 0x8174, 0x8175, 0x8175, 0x8176, 0x8176, 0x8176, - 0x8177, 0x8177, 0x8178, 0x8178, 0x8178, 0x8179, 0x8179, 0x817a, - 0x817a, 0x817b, 0x817b, 0x817b, 0x817c, 0x817c, 0x817d, 0x817d, - 0x817d, 0x817e, 0x817e, 0x817f, 0x817f, 0x817f, 0x8180, 0x8180, - 0x8181, 0x8181, 0x8182, 0x8182, 0x8182, 0x8183, 0x8183, 0x8184, - 0x8184, 0x8185, 0x8186, 0x8187, 0x8187, 0x8188, 0x8189, 0x818a, - 0x818b, 0x818c, 0x818c, 0x818d, 0x818e, 0x818f, 0x8190, 0x8191, - 0x8191, 0x8192, 0x8193, 0x8194, 0x8195, 0x8196, 0x8197, 0x8197, - 0x8198, 0x8199, 0x819a, 0x819b, 0x819c, 0x819d, 0x819d, 0x819e, - 0x819f, 0x81a0, 0x81a1, 0x81a2, 0x81a3, 0x81a4, 0x81a4, 0x81a5, - 0x81a6, 0x81a7, 0x81a8, 0x81a9, 0x81aa, 0x81ab, 0x81ab, 0x81ac, - 0x81ad, 0x81ae, 0x81af, 0x81b0, 0x81b1, 0x81b2, 0x81b2, 0x81b3, - 0x81b4, 0x81b5, 0x81b6, 0x81b7, 0x81b8, 0x81b9, 0x81ba, 0x81ba, - 0x81bb, 0x81bc, 0x81bd, 0x81be, 0x81bf, 0x81c0, 0x81c1, 0x81c2, - 0x81c3, 0x81c3, 0x81c4, 0x81c5, 0x81c6, 0x81c7, 0x81c8, 0x81c9, - 0x81ca, 0x81cb, 0x81cc, 0x81cd, 0x81ce, 0x81ce, 0x81cf, 0x81d0, - 0x81d1, 0x81d2, 0x81d3, 0x81d4, 0x81d5, 0x81d6, 0x81d7, 0x81d8, - 0x81d9, 0x81da, 0x81da, 0x81db, 0x81dc, 0x81dd, 0x81de, 0x81df, - 0x81e0, 0x81e1, 0x81e2, 0x81e3, 0x81e4, 0x81e5, 0x81e6, 0x81e7, - 0x81e8, 0x81e9, 0x81e9, 0x81ea, 0x81eb, 0x81ec, 0x81ed, 0x81ee, - 0x81ef, 0x81f0, 0x81f1, 0x81f2, 0x81f3, 0x81f4, 0x81f5, 0x81f6, - 0x81f7, 0x81f8, 0x81f9, 0x81fa, 0x81fb, 0x81fc, 0x81fd, 0x81fe, - 0x81ff, 0x81ff, 0x8200, 0x8201, 0x8202, 0x8203, 0x8204, 0x8205, - 0x8206, 0x8207, 0x8208, 0x8209, 0x820a, 0x820b, 0x820c, 0x820d, - 0x820e, 0x820f, 0x8210, 0x8211, 0x8212, 0x8213, 0x8214, 0x8215, - 0x8216, 0x8217, 0x8218, 0x8219, 0x821a, 0x821b, 0x821c, 0x821d, - 0x821e, 0x821f, 0x8220, 0x8221, 0x8222, 0x8223, 0x8224, 0x8225, - 0x8226, 0x8227, 0x8228, 0x8229, 0x822a, 0x822b, 0x822c, 0x822d, - 0x822e, 0x822f, 0x8230, 0x8231, 0x8232, 0x8233, 0x8234, 0x8235, - 0x8236, 0x8237, 0x8238, 0x8239, 0x823a, 0x823b, 0x823c, 0x823e, - 0x823f, 0x8240, 0x8241, 0x8242, 0x8243, 0x8244, 0x8245, 0x8246, - 0x8247, 0x8248, 0x8249, 0x824a, 0x824b, 0x824c, 0x824d, 0x824e, - 0x824f, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255, 0x8257, - 0x8258, 0x8259, 0x825a, 0x825b, 0x825c, 0x825d, 0x825e, 0x825f, - 0x8260, 0x8261, 0x8262, 0x8263, 0x8264, 0x8265, 0x8267, 0x8268, - 0x8269, 0x826a, 0x826b, 0x826c, 0x826d, 0x826e, 0x826f, 0x8270, - 0x8271, 0x8272, 0x8273, 0x8275, 0x8276, 0x8277, 0x8278, 0x8279, - 0x827a, 0x827b, 0x827c, 0x827d, 0x827e, 0x827f, 0x8281, 0x8282, - 0x8283, 0x8284, 0x8285, 0x8286, 0x8287, 0x8288, 0x8289, 0x828a, - 0x828c, 0x828d, 0x828e, 0x828f, 0x8290, 0x8291, 0x8292, 0x8293, - 0x8294, 0x8296, 0x8297, 0x8298, 0x8299, 0x829a, 0x829b, 0x829c, - 0x829d, 0x829e, 0x82a0, 0x82a1, 0x82a2, 0x82a3, 0x82a4, 0x82a5, - 0x82a6, 0x82a7, 0x82a9, 0x82aa, 0x82ab, 0x82ac, 0x82ad, 0x82ae, - 0x82af, 0x82b1, 0x82b2, 0x82b3, 0x82b4, 0x82b5, 0x82b6, 0x82b7, - 0x82b9, 0x82ba, 0x82bb, 0x82bc, 0x82bd, 0x82be, 0x82bf, 0x82c1, - 0x82c2, 0x82c3, 0x82c4, 0x82c5, 0x82c6, 0x82c8, 0x82c9, 0x82ca, - 0x82cb, 0x82cc, 0x82cd, 0x82cf, 0x82d0, 0x82d1, 0x82d2, 0x82d3, - 0x82d4, 0x82d6, 0x82d7, 0x82d8, 0x82d9, 0x82da, 0x82db, 0x82dd, - 0x82de, 0x82df, 0x82e0, 0x82e1, 0x82e3, 0x82e4, 0x82e5, 0x82e6, - 0x82e7, 0x82e8, 0x82ea, 0x82eb, 0x82ec, 0x82ed, 0x82ee, 0x82f0, - 0x82f1, 0x82f2, 0x82f3, 0x82f4, 0x82f6, 0x82f7, 0x82f8, 0x82f9, - 0x82fa, 0x82fc, 0x82fd, 0x82fe, 0x82ff, 0x8300, 0x8302, 0x8303, - 0x8304, 0x8305, 0x8307, 0x8308, 0x8309, 0x830a, 0x830b, 0x830d, - 0x830e, 0x830f, 0x8310, 0x8312, 0x8313, 0x8314, 0x8315, 0x8316, - 0x8318, 0x8319, 0x831a, 0x831b, 0x831d, 0x831e, 0x831f, 0x8320, - 0x8322, 0x8323, 0x8324, 0x8325, 0x8326, 0x8328, 0x8329, 0x832a, - 0x832b, 0x832d, 0x832e, 0x832f, 0x8330, 0x8332, 0x8333, 0x8334, - 0x8335, 0x8337, 0x8338, 0x8339, 0x833b, 0x833c, 0x833d, 0x833e, - 0x8340, 0x8341, 0x8342, 0x8343, 0x8345, 0x8346, 0x8347, 0x8348, - 0x834a, 0x834b, 0x834c, 0x834e, 0x834f, 0x8350, 0x8351, 0x8353, - 0x8354, 0x8355, 0x8356, 0x8358, 0x8359, 0x835a, 0x835c, 0x835d, - 0x835e, 0x835f, 0x8361, 0x8362, 0x8363, 0x8365, 0x8366, 0x8367, - 0x8369, 0x836a, 0x836b, 0x836c, 0x836e, 0x836f, 0x8370, 0x8372, - 0x8373, 0x8374, 0x8376, 0x8377, 0x8378, 0x8379, 0x837b, 0x837c, - 0x837d, 0x837f, 0x8380, 0x8381, 0x8383, 0x8384, 0x8385, 0x8387, - 0x8388, 0x8389, 0x838b, 0x838c, 0x838d, 0x838f, 0x8390, 0x8391, - 0x8393, 0x8394, 0x8395, 0x8397, 0x8398, 0x8399, 0x839b, 0x839c, - 0x839d, 0x839f, 0x83a0, 0x83a1, 0x83a3, 0x83a4, 0x83a5, 0x83a7, - 0x83a8, 0x83a9, 0x83ab, 0x83ac, 0x83ad, 0x83af, 0x83b0, 0x83b1, - 0x83b3, 0x83b4, 0x83b6, 0x83b7, 0x83b8, 0x83ba, 0x83bb, 0x83bc, - 0x83be, 0x83bf, 0x83c0, 0x83c2, 0x83c3, 0x83c5, 0x83c6, 0x83c7, - 0x83c9, 0x83ca, 0x83cb, 0x83cd, 0x83ce, 0x83d0, 0x83d1, 0x83d2, - 0x83d4, 0x83d5, 0x83d6, 0x83d8, 0x83d9, 0x83db, 0x83dc, 0x83dd, - 0x83df, 0x83e0, 0x83e2, 0x83e3, 0x83e4, 0x83e6, 0x83e7, 0x83e8, - 0x83ea, 0x83eb, 0x83ed, 0x83ee, 0x83ef, 0x83f1, 0x83f2, 0x83f4, - 0x83f5, 0x83f7, 0x83f8, 0x83f9, 0x83fb, 0x83fc, 0x83fe, 0x83ff, - 0x8400, 0x8402, 0x8403, 0x8405, 0x8406, 0x8407, 0x8409, 0x840a, - 0x840c, 0x840d, 0x840f, 0x8410, 0x8411, 0x8413, 0x8414, 0x8416, - 0x8417, 0x8419, 0x841a, 0x841b, 0x841d, 0x841e, 0x8420, 0x8421, - 0x8423, 0x8424, 0x8426, 0x8427, 0x8428, 0x842a, 0x842b, 0x842d, - 0x842e, 0x8430, 0x8431, 0x8433, 0x8434, 0x8436, 0x8437, 0x8438, - 0x843a, 0x843b, 0x843d, 0x843e, 0x8440, 0x8441, 0x8443, 0x8444, - 0x8446, 0x8447, 0x8449, 0x844a, 0x844b, 0x844d, 0x844e, 0x8450, - 0x8451, 0x8453, 0x8454, 0x8456, 0x8457, 0x8459, 0x845a, 0x845c, - 0x845d, 0x845f, 0x8460, 0x8462, 0x8463, 0x8465, 0x8466, 0x8468, - 0x8469, 0x846b, 0x846c, 0x846e, 0x846f, 0x8471, 0x8472, 0x8474, - 0x8475, 0x8477, 0x8478, 0x847a, 0x847b, 0x847d, 0x847e, 0x8480, - 0x8481, 0x8483, 0x8484, 0x8486, 0x8487, 0x8489, 0x848a, 0x848c, - 0x848d, 0x848f, 0x8490, 0x8492, 0x8493, 0x8495, 0x8496, 0x8498, - 0x8499, 0x849b, 0x849c, 0x849e, 0x84a0, 0x84a1, 0x84a3, 0x84a4, - 0x84a6, 0x84a7, 0x84a9, 0x84aa, 0x84ac, 0x84ad, 0x84af, 0x84b0, - 0x84b2, 0x84b4, 0x84b5, 0x84b7, 0x84b8, 0x84ba, 0x84bb, 0x84bd, - 0x84be, 0x84c0, 0x84c2, 0x84c3, 0x84c5, 0x84c6, 0x84c8, 0x84c9, - 0x84cb, 0x84cc, 0x84ce, 0x84d0, 0x84d1, 0x84d3, 0x84d4, 0x84d6, - 0x84d7, 0x84d9, 0x84db, 0x84dc, 0x84de, 0x84df, 0x84e1, 0x84e2, - 0x84e4, 0x84e6, 0x84e7, 0x84e9, 0x84ea, 0x84ec, 0x84ed, 0x84ef, - 0x84f1, 0x84f2, 0x84f4, 0x84f5, 0x84f7, 0x84f9, 0x84fa, 0x84fc, - 0x84fd, 0x84ff, 0x8501, 0x8502, 0x8504, 0x8505, 0x8507, 0x8509, - 0x850a, 0x850c, 0x850d, 0x850f, 0x8511, 0x8512, 0x8514, 0x8515, - 0x8517, 0x8519, 0x851a, 0x851c, 0x851e, 0x851f, 0x8521, 0x8522, - 0x8524, 0x8526, 0x8527, 0x8529, 0x852b, 0x852c, 0x852e, 0x852f, - 0x8531, 0x8533, 0x8534, 0x8536, 0x8538, 0x8539, 0x853b, 0x853c, - 0x853e, 0x8540, 0x8541, 0x8543, 0x8545, 0x8546, 0x8548, 0x854a, - 0x854b, 0x854d, 0x854f, 0x8550, 0x8552, 0x8554, 0x8555, 0x8557, - 0x8559, 0x855a, 0x855c, 0x855e, 0x855f, 0x8561, 0x8562, 0x8564, - 0x8566, 0x8567, 0x8569, 0x856b, 0x856c, 0x856e, 0x8570, 0x8572, - 0x8573, 0x8575, 0x8577, 0x8578, 0x857a, 0x857c, 0x857d, 0x857f, - 0x8581, 0x8582, 0x8584, 0x8586, 0x8587, 0x8589, 0x858b, 0x858c, - 0x858e, 0x8590, 0x8592, 0x8593, 0x8595, 0x8597, 0x8598, 0x859a, - 0x859c, 0x859d, 0x859f, 0x85a1, 0x85a3, 0x85a4, 0x85a6, 0x85a8, - 0x85a9, 0x85ab, 0x85ad, 0x85af, 0x85b0, 0x85b2, 0x85b4, 0x85b5, - 0x85b7, 0x85b9, 0x85bb, 0x85bc, 0x85be, 0x85c0, 0x85c1, 0x85c3, - 0x85c5, 0x85c7, 0x85c8, 0x85ca, 0x85cc, 0x85ce, 0x85cf, 0x85d1, - 0x85d3, 0x85d4, 0x85d6, 0x85d8, 0x85da, 0x85db, 0x85dd, 0x85df, - 0x85e1, 0x85e2, 0x85e4, 0x85e6, 0x85e8, 0x85e9, 0x85eb, 0x85ed, - 0x85ef, 0x85f0, 0x85f2, 0x85f4, 0x85f6, 0x85f7, 0x85f9, 0x85fb, - 0x85fd, 0x85ff, 0x8600, 0x8602, 0x8604, 0x8606, 0x8607, 0x8609, - 0x860b, 0x860d, 0x860e, 0x8610, 0x8612, 0x8614, 0x8616, 0x8617, - 0x8619, 0x861b, 0x861d, 0x861e, 0x8620, 0x8622, 0x8624, 0x8626, - 0x8627, 0x8629, 0x862b, 0x862d, 0x862f, 0x8630, 0x8632, 0x8634, - 0x8636, 0x8638, 0x8639, 0x863b, 0x863d, 0x863f, 0x8641, 0x8642, - 0x8644, 0x8646, 0x8648, 0x864a, 0x864b, 0x864d, 0x864f, 0x8651, - 0x8653, 0x8654, 0x8656, 0x8658, 0x865a, 0x865c, 0x865e, 0x865f, - 0x8661, 0x8663, 0x8665, 0x8667, 0x8669, 0x866a, 0x866c, 0x866e, - 0x8670, 0x8672, 0x8674, 0x8675, 0x8677, 0x8679, 0x867b, 0x867d, - 0x867f, 0x8680, 0x8682, 0x8684, 0x8686, 0x8688, 0x868a, 0x868c, - 0x868d, 0x868f, 0x8691, 0x8693, 0x8695, 0x8697, 0x8699, 0x869a, - 0x869c, 0x869e, 0x86a0, 0x86a2, 0x86a4, 0x86a6, 0x86a7, 0x86a9, - 0x86ab, 0x86ad, 0x86af, 0x86b1, 0x86b3, 0x86b5, 0x86b6, 0x86b8, - 0x86ba, 0x86bc, 0x86be, 0x86c0, 0x86c2, 0x86c4, 0x86c5, 0x86c7, - 0x86c9, 0x86cb, 0x86cd, 0x86cf, 0x86d1, 0x86d3, 0x86d5, 0x86d6, - 0x86d8, 0x86da, 0x86dc, 0x86de, 0x86e0, 0x86e2, 0x86e4, 0x86e6, - 0x86e8, 0x86ea, 0x86eb, 0x86ed, 0x86ef, 0x86f1, 0x86f3, 0x86f5, - 0x86f7, 0x86fb, 0x86ff, 0x8702, 0x8706, 0x870a, 0x870e, 0x8712, - 0x8716, 0x871a, 0x871d, 0x8721, 0x8725, 0x8729, 0x872d, 0x8731, - 0x8735, 0x8739, 0x873d, 0x8740, 0x8744, 0x8748, 0x874c, 0x8750, - 0x8754, 0x8758, 0x875c, 0x8760, 0x8764, 0x8768, 0x876c, 0x8770, - 0x8774, 0x8778, 0x877c, 0x8780, 0x8784, 0x8788, 0x878c, 0x8790, - 0x8794, 0x8798, 0x879c, 0x87a0, 0x87a4, 0x87a8, 0x87ac, 0x87b0, - 0x87b4, 0x87b8, 0x87bc, 0x87c0, 0x87c4, 0x87c8, 0x87cc, 0x87d0, - 0x87d4, 0x87d9, 0x87dd, 0x87e1, 0x87e5, 0x87e9, 0x87ed, 0x87f1, - 0x87f5, 0x87f9, 0x87fe, 0x8801, 0x8803, 0x8805, 0x8807, 0x8809, - 0x880b, 0x880d, 0x880f, 0x8811, 0x8814, 0x8816, 0x8818, 0x881a, - 0x881c, 0x881e, 0x8820, 0x8822, 0x8824, 0x8826, 0x8828, 0x882b, - 0x882d, 0x882f, 0x8831, 0x8833, 0x8835, 0x8837, 0x8839, 0x883c, - 0x883e, 0x8840, 0x8842, 0x8844, 0x8846, 0x8848, 0x884b, 0x884d, - 0x884f, 0x8851, 0x8853, 0x8855, 0x8857, 0x885a, 0x885c, 0x885e, - 0x8860, 0x8862, 0x8864, 0x8867, 0x8869, 0x886b, 0x886d, 0x886f, - 0x8872, 0x8874, 0x8876, 0x8878, 0x887a, 0x887d, 0x887f, 0x8881, - 0x8883, 0x8885, 0x8888, 0x888a, 0x888c, 0x888e, 0x8890, 0x8893, - 0x8895, 0x8897, 0x8899, 0x889c, 0x889e, 0x88a0, 0x88a2, 0x88a4, - 0x88a7, 0x88a9, 0x88ab, 0x88ad, 0x88b0, 0x88b2, 0x88b4, 0x88b6, - 0x88b9, 0x88bb, 0x88bd, 0x88c0, 0x88c2, 0x88c4, 0x88c6, 0x88c9, - 0x88cb, 0x88cd, 0x88cf, 0x88d2, 0x88d4, 0x88d6, 0x88d9, 0x88db, - 0x88dd, 0x88e0, 0x88e2, 0x88e4, 0x88e6, 0x88e9, 0x88eb, 0x88ed, - 0x88f0, 0x88f2, 0x88f4, 0x88f7, 0x88f9, 0x88fb, 0x88fe, 0x8900, - 0x8902, 0x8905, 0x8907, 0x8909, 0x890c, 0x890e, 0x8910, 0x8913, - 0x8915, 0x8917, 0x891a, 0x891c, 0x891e, 0x8921, 0x8923, 0x8926, - 0x8928, 0x892a, 0x892d, 0x892f, 0x8931, 0x8934, 0x8936, 0x8939, - 0x893b, 0x893d, 0x8940, 0x8942, 0x8945, 0x8947, 0x8949, 0x894c, - 0x894e, 0x8951, 0x8953, 0x8955, 0x8958, 0x895a, 0x895d, 0x895f, - 0x8962, 0x8964, 0x8966, 0x8969, 0x896b, 0x896e, 0x8970, 0x8973, - 0x8975, 0x8977, 0x897a, 0x897c, 0x897f, 0x8981, 0x8984, 0x8986, - 0x8989, 0x898b, 0x898e, 0x8990, 0x8993, 0x8995, 0x8998, 0x899a, - 0x899c, 0x899f, 0x89a1, 0x89a4, 0x89a6, 0x89a9, 0x89ab, 0x89ae, - 0x89b0, 0x89b3, 0x89b5, 0x89b8, 0x89ba, 0x89bd, 0x89c0, 0x89c2, - 0x89c5, 0x89c7, 0x89ca, 0x89cc, 0x89cf, 0x89d1, 0x89d4, 0x89d6, - 0x89d9, 0x89db, 0x89de, 0x89e0, 0x89e3, 0x89e6, 0x89e8, 0x89eb, - 0x89ed, 0x89f0, 0x89f2, 0x89f5, 0x89f7, 0x89fa, 0x89fd, 0x89ff, - 0x8a02, 0x8a04, 0x8a07, 0x8a0a, 0x8a0c, 0x8a0f, 0x8a11, 0x8a14, - 0x8a16, 0x8a19, 0x8a1c, 0x8a1e, 0x8a21, 0x8a23, 0x8a26, 0x8a29, - 0x8a2b, 0x8a2e, 0x8a31, 0x8a33, 0x8a36, 0x8a38, 0x8a3b, 0x8a3e, - 0x8a40, 0x8a43, 0x8a46, 0x8a48, 0x8a4b, 0x8a4e, 0x8a50, 0x8a53, - 0x8a55, 0x8a58, 0x8a5b, 0x8a5d, 0x8a60, 0x8a63, 0x8a65, 0x8a68, - 0x8a6b, 0x8a6d, 0x8a70, 0x8a73, 0x8a76, 0x8a78, 0x8a7b, 0x8a7e, - 0x8a80, 0x8a83, 0x8a86, 0x8a88, 0x8a8b, 0x8a8e, 0x8a90, 0x8a93, - 0x8a96, 0x8a99, 0x8a9b, 0x8a9e, 0x8aa1, 0x8aa3, 0x8aa6, 0x8aa9, - 0x8aac, 0x8aae, 0x8ab1, 0x8ab4, 0x8ab7, 0x8ab9, 0x8abc, 0x8abf, - 0x8ac2, 0x8ac4, 0x8ac7, 0x8aca, 0x8acd, 0x8acf, 0x8ad2, 0x8ad5, - 0x8ad8, 0x8ada, 0x8add, 0x8ae0, 0x8ae3, 0x8ae5, 0x8ae8, 0x8aeb, - 0x8aee, 0x8af1, 0x8af3, 0x8af6, 0x8af9, 0x8afc, 0x8aff, 0x8b01, - 0x8b04, 0x8b07, 0x8b0a, 0x8b0d, 0x8b0f, 0x8b12, 0x8b15, 0x8b18, - 0x8b1b, 0x8b1e, 0x8b20, 0x8b23, 0x8b26, 0x8b29, 0x8b2c, 0x8b2f, - 0x8b31, 0x8b34, 0x8b37, 0x8b3a, 0x8b3d, 0x8b40, 0x8b43, 0x8b45, - 0x8b48, 0x8b4b, 0x8b4e, 0x8b51, 0x8b54, 0x8b57, 0x8b59, 0x8b5c, - 0x8b5f, 0x8b62, 0x8b65, 0x8b68, 0x8b6b, 0x8b6e, 0x8b71, 0x8b74, - 0x8b76, 0x8b79, 0x8b7c, 0x8b7f, 0x8b82, 0x8b85, 0x8b88, 0x8b8b, - 0x8b8e, 0x8b91, 0x8b94, 0x8b96, 0x8b99, 0x8b9c, 0x8b9f, 0x8ba2, - 0x8ba5, 0x8ba8, 0x8bab, 0x8bae, 0x8bb1, 0x8bb4, 0x8bb7, 0x8bba, - 0x8bbd, 0x8bc0, 0x8bc3, 0x8bc6, 0x8bc9, 0x8bcc, 0x8bcf, 0x8bd2, - 0x8bd5, 0x8bd7, 0x8bda, 0x8bdd, 0x8be0, 0x8be3, 0x8be6, 0x8be9, - 0x8bec, 0x8bef, 0x8bf2, 0x8bf5, 0x8bf8, 0x8bfb, 0x8bfe, 0x8c01, - 0x8c02, 0x8c04, 0x8c05, 0x8c07, 0x8c08, 0x8c0a, 0x8c0b, 0x8c0d, - 0x8c0e, 0x8c10, 0x8c11, 0x8c13, 0x8c14, 0x8c16, 0x8c17, 0x8c19, - 0x8c1b, 0x8c1c, 0x8c1e, 0x8c1f, 0x8c21, 0x8c22, 0x8c24, 0x8c25, - 0x8c27, 0x8c28, 0x8c2a, 0x8c2b, 0x8c2d, 0x8c2f, 0x8c30, 0x8c32, - 0x8c33, 0x8c35, 0x8c36, 0x8c38, 0x8c39, 0x8c3b, 0x8c3c, 0x8c3e, - 0x8c40, 0x8c41, 0x8c43, 0x8c44, 0x8c46, 0x8c47, 0x8c49, 0x8c4b, - 0x8c4c, 0x8c4e, 0x8c4f, 0x8c51, 0x8c52, 0x8c54, 0x8c56, 0x8c57, - 0x8c59, 0x8c5a, 0x8c5c, 0x8c5d, 0x8c5f, 0x8c61, 0x8c62, 0x8c64, - 0x8c65, 0x8c67, 0x8c69, 0x8c6a, 0x8c6c, 0x8c6d, 0x8c6f, 0x8c70, - 0x8c72, 0x8c74, 0x8c75, 0x8c77, 0x8c78, 0x8c7a, 0x8c7c, 0x8c7d, - 0x8c7f, 0x8c80, 0x8c82, 0x8c84, 0x8c85, 0x8c87, 0x8c89, 0x8c8a, - 0x8c8c, 0x8c8d, 0x8c8f, 0x8c91, 0x8c92, 0x8c94, 0x8c95, 0x8c97, - 0x8c99, 0x8c9a, 0x8c9c, 0x8c9e, 0x8c9f, 0x8ca1, 0x8ca3, 0x8ca4, - 0x8ca6, 0x8ca7, 0x8ca9, 0x8cab, 0x8cac, 0x8cae, 0x8cb0, 0x8cb1, - 0x8cb3, 0x8cb5, 0x8cb6, 0x8cb8, 0x8cba, 0x8cbb, 0x8cbd, 0x8cbe, - 0x8cc0, 0x8cc2, 0x8cc3, 0x8cc5, 0x8cc7, 0x8cc8, 0x8cca, 0x8ccc, - 0x8ccd, 0x8ccf, 0x8cd1, 0x8cd2, 0x8cd4, 0x8cd6, 0x8cd7, 0x8cd9, - 0x8cdb, 0x8cdc, 0x8cde, 0x8ce0, 0x8ce1, 0x8ce3, 0x8ce5, 0x8ce7, - 0x8ce8, 0x8cea, 0x8cec, 0x8ced, 0x8cef, 0x8cf1, 0x8cf2, 0x8cf4, - 0x8cf6, 0x8cf7, 0x8cf9, 0x8cfb, 0x8cfd, 0x8cfe, 0x8d00, 0x8d02, - 0x8d03, 0x8d05, 0x8d07, 0x8d08, 0x8d0a, 0x8d0c, 0x8d0e, 0x8d0f, - 0x8d11, 0x8d13, 0x8d14, 0x8d16, 0x8d18, 0x8d1a, 0x8d1b, 0x8d1d, - 0x8d1f, 0x8d20, 0x8d22, 0x8d24, 0x8d26, 0x8d27, 0x8d29, 0x8d2b, - 0x8d2d, 0x8d2e, 0x8d30, 0x8d32, 0x8d34, 0x8d35, 0x8d37, 0x8d39, - 0x8d3b, 0x8d3c, 0x8d3e, 0x8d40, 0x8d42, 0x8d43, 0x8d45, 0x8d47, - 0x8d49, 0x8d4a, 0x8d4c, 0x8d4e, 0x8d50, 0x8d51, 0x8d53, 0x8d55, - 0x8d57, 0x8d58, 0x8d5a, 0x8d5c, 0x8d5e, 0x8d5f, 0x8d61, 0x8d63, - 0x8d65, 0x8d67, 0x8d68, 0x8d6a, 0x8d6c, 0x8d6e, 0x8d6f, 0x8d71, - 0x8d73, 0x8d75, 0x8d77, 0x8d78, 0x8d7a, 0x8d7c, 0x8d7e, 0x8d7f, - 0x8d81, 0x8d83, 0x8d85, 0x8d87, 0x8d88, 0x8d8a, 0x8d8c, 0x8d8e, - 0x8d90, 0x8d91, 0x8d93, 0x8d95, 0x8d97, 0x8d99, 0x8d9b, 0x8d9c, - 0x8d9e, 0x8da0, 0x8da2, 0x8da4, 0x8da5, 0x8da7, 0x8da9, 0x8dab, - 0x8dad, 0x8daf, 0x8db0, 0x8db2, 0x8db4, 0x8db6, 0x8db8, 0x8dba, - 0x8dbb, 0x8dbd, 0x8dbf, 0x8dc1, 0x8dc3, 0x8dc5, 0x8dc6, 0x8dc8, - 0x8dca, 0x8dcc, 0x8dce, 0x8dd0, 0x8dd1, 0x8dd3, 0x8dd5, 0x8dd7, - 0x8dd9, 0x8ddb, 0x8ddd, 0x8dde, 0x8de0, 0x8de2, 0x8de4, 0x8de6, - 0x8de8, 0x8dea, 0x8deb, 0x8ded, 0x8def, 0x8df1, 0x8df3, 0x8df5, - 0x8df7, 0x8df9, 0x8dfa, 0x8dfc, 0x8dfe, 0x8e00, 0x8e02, 0x8e04, - 0x8e06, 0x8e08, 0x8e09, 0x8e0b, 0x8e0d, 0x8e0f, 0x8e11, 0x8e13, - 0x8e15, 0x8e17, 0x8e19, 0x8e1b, 0x8e1c, 0x8e1e, 0x8e20, 0x8e22, - 0x8e24, 0x8e26, 0x8e28, 0x8e2a, 0x8e2c, 0x8e2e, 0x8e2f, 0x8e31, - 0x8e33, 0x8e35, 0x8e37, 0x8e39, 0x8e3b, 0x8e3d, 0x8e3f, 0x8e41, - 0x8e43, 0x8e45, 0x8e47, 0x8e48, 0x8e4a, 0x8e4c, 0x8e4e, 0x8e50, - 0x8e52, 0x8e54, 0x8e56, 0x8e58, 0x8e5a, 0x8e5c, 0x8e5e, 0x8e60, - 0x8e62, 0x8e64, 0x8e66, 0x8e67, 0x8e69, 0x8e6b, 0x8e6d, 0x8e6f, - 0x8e71, 0x8e73, 0x8e75, 0x8e77, 0x8e79, 0x8e7b, 0x8e7d, 0x8e7f, - 0x8e81, 0x8e83, 0x8e85, 0x8e87, 0x8e89, 0x8e8b, 0x8e8d, 0x8e8f, - 0x8e91, 0x8e93, 0x8e95, 0x8e97, 0x8e99, 0x8e9b, 0x8e9d, 0x8e9f, - 0x8ea0, 0x8ea2, 0x8ea4, 0x8ea6, 0x8ea8, 0x8eaa, 0x8eac, 0x8eae, - 0x8eb0, 0x8eb2, 0x8eb4, 0x8eb6, 0x8eb8, 0x8eba, 0x8ebc, 0x8ebe, - 0x8ec0, 0x8ec2, 0x8ec4, 0x8ec6, 0x8ec8, 0x8eca, 0x8ecc, 0x8ece, - 0x8ed1, 0x8ed3, 0x8ed5, 0x8ed7, 0x8ed9, 0x8edb, 0x8edd, 0x8edf, - 0x8ee1, 0x8ee3, 0x8ee5, 0x8ee7, 0x8ee9, 0x8eeb, 0x8eed, 0x8eef, - 0x8ef1, 0x8ef3, 0x8ef5, 0x8ef7, 0x8ef9, 0x8efb, 0x8efd, 0x8eff, - 0x8f01, 0x8f03, 0x8f05, 0x8f07, 0x8f09, 0x8f0b, 0x8f0e, 0x8f10, - 0x8f12, 0x8f14, 0x8f16, 0x8f18, 0x8f1a, 0x8f1c, 0x8f1e, 0x8f20, - 0x8f22, 0x8f24, 0x8f26, 0x8f28, 0x8f2a, 0x8f2c, 0x8f2f, 0x8f31, - 0x8f33, 0x8f35, 0x8f37, 0x8f39, 0x8f3b, 0x8f3d, 0x8f3f, 0x8f41, - 0x8f43, 0x8f45, 0x8f48, 0x8f4a, 0x8f4c, 0x8f4e, 0x8f50, 0x8f52, - 0x8f54, 0x8f56, 0x8f58, 0x8f5a, 0x8f5d, 0x8f5f, 0x8f61, 0x8f63, - 0x8f65, 0x8f67, 0x8f69, 0x8f6b, 0x8f6d, 0x8f6f, 0x8f72, 0x8f74, - 0x8f76, 0x8f78, 0x8f7a, 0x8f7c, 0x8f7e, 0x8f80, 0x8f83, 0x8f85, - 0x8f87, 0x8f89, 0x8f8b, 0x8f8d, 0x8f8f, 0x8f91, 0x8f94, 0x8f96, - 0x8f98, 0x8f9a, 0x8f9c, 0x8f9e, 0x8fa0, 0x8fa3, 0x8fa5, 0x8fa7, - 0x8fa9, 0x8fab, 0x8fad, 0x8faf, 0x8fb2, 0x8fb4, 0x8fb6, 0x8fb8, - 0x8fba, 0x8fbc, 0x8fbf, 0x8fc1, 0x8fc3, 0x8fc5, 0x8fc7, 0x8fc9, - 0x8fcc, 0x8fce, 0x8fd0, 0x8fd2, 0x8fd4, 0x8fd6, 0x8fd9, 0x8fdb, - 0x8fdd, 0x8fdf, 0x8fe1, 0x8fe4, 0x8fe6, 0x8fe8, 0x8fea, 0x8fec, - 0x8fee, 0x8ff1, 0x8ff3, 0x8ff5, 0x8ff7, 0x8ff9, 0x8ffc, 0x8ffe, - 0x9000, 0x9002, 0x9004, 0x9007, 0x9009, 0x900b, 0x900d, 0x900f, - 0x9012, 0x9014, 0x9016, 0x9018, 0x901b, 0x901d, 0x901f, 0x9021, - 0x9024, 0x9026, 0x9028, 0x902a, 0x902d, 0x902f, 0x9031, 0x9033, - 0x9036, 0x9038, 0x903a, 0x903c, 0x903f, 0x9041, 0x9043, 0x9045, - 0x9048, 0x904a, 0x904c, 0x904f, 0x9051, 0x9053, 0x9055, 0x9058, - 0x905a, 0x905c, 0x905f, 0x9061, 0x9063, 0x9066, 0x9068, 0x906a, - 0x906d, 0x906f, 0x9071, 0x9074, 0x9076, 0x9078, 0x907b, 0x907d, - 0x907f, 0x9082, 0x9084, 0x9086, 0x9089, 0x908b, 0x908d, 0x9090, - 0x9092, 0x9094, 0x9097, 0x9099, 0x909c, 0x909e, 0x90a0, 0x90a3, - 0x90a5, 0x90a8, 0x90aa, 0x90ac, 0x90af, 0x90b1, 0x90b3, 0x90b6, - 0x90b8, 0x90bb, 0x90bd, 0x90c0, 0x90c2, 0x90c4, 0x90c7, 0x90c9, - 0x90cc, 0x90ce, 0x90d1, 0x90d3, 0x90d5, 0x90d8, 0x90da, 0x90dd, - 0x90df, 0x90e2, 0x90e4, 0x90e7, 0x90e9, 0x90eb, 0x90ee, 0x90f0, - 0x90f3, 0x90f5, 0x90f8, 0x90fa, 0x90fd, 0x90ff, 0x9102, 0x9104, - 0x9107, 0x9109, 0x910c, 0x910e, 0x9111, 0x9113, 0x9116, 0x9118, - 0x911b, 0x911d, 0x9120, 0x9122, 0x9125, 0x9127, 0x912a, 0x912c, - 0x912f, 0x9131, 0x9134, 0x9137, 0x9139, 0x913c, 0x913e, 0x9141, - 0x9143, 0x9146, 0x9148, 0x914b, 0x914d, 0x9150, 0x9153, 0x9155, - 0x9158, 0x915a, 0x915d, 0x9160, 0x9162, 0x9165, 0x9167, 0x916a, - 0x916c, 0x916f, 0x9172, 0x9174, 0x9177, 0x9179, 0x917c, 0x917f, - 0x9181, 0x9184, 0x9187, 0x9189, 0x918c, 0x918e, 0x9191, 0x9194, - 0x9196, 0x9199, 0x919c, 0x919e, 0x91a1, 0x91a4, 0x91a6, 0x91a9, - 0x91ac, 0x91ae, 0x91b1, 0x91b4, 0x91b6, 0x91b9, 0x91bc, 0x91be, - 0x91c1, 0x91c4, 0x91c6, 0x91c9, 0x91cc, 0x91ce, 0x91d1, 0x91d4, - 0x91d6, 0x91d9, 0x91dc, 0x91df, 0x91e1, 0x91e4, 0x91e7, 0x91e9, - 0x91ec, 0x91ef, 0x91f2, 0x91f4, 0x91f7, 0x91fa, 0x91fd, 0x91ff, - 0x9202, 0x9205, 0x9208, 0x920a, 0x920d, 0x9210, 0x9213, 0x9215, - 0x9218, 0x921b, 0x921e, 0x9220, 0x9223, 0x9226, 0x9229, 0x922c, - 0x922e, 0x9231, 0x9234, 0x9237, 0x923a, 0x923c, 0x923f, 0x9242, - 0x9245, 0x9248, 0x924a, 0x924d, 0x9250, 0x9253, 0x9256, 0x9259, - 0x925b, 0x925e, 0x9261, 0x9264, 0x9267, 0x926a, 0x926c, 0x926f, - 0x9272, 0x9275, 0x9278, 0x927b, 0x927e, 0x9280, 0x9283, 0x9286, - 0x9289, 0x928c, 0x928f, 0x9292, 0x9295, 0x9297, 0x929a, 0x929d, - 0x92a0, 0x92a3, 0x92a6, 0x92a9, 0x92ac, 0x92af, 0x92b2, 0x92b4, - 0x92b7, 0x92ba, 0x92bd, 0x92c0, 0x92c3, 0x92c6, 0x92c9, 0x92cc, - 0x92cf, 0x92d2, 0x92d5, 0x92d8, 0x92db, 0x92de, 0x92e1, 0x92e3, - 0x92e6, 0x92e9, 0x92ec, 0x92ef, 0x92f2, 0x92f5, 0x92f8, 0x92fb, - 0x92fe, 0x9301, 0x9304, 0x9307, 0x930a, 0x930d, 0x9310, 0x9313, - 0x9316, 0x9319, 0x931c, 0x931f, 0x9322, 0x9325, 0x9328, 0x932b, - 0x932e, 0x9331, 0x9334, 0x9337, 0x933a, 0x933d, 0x9341, 0x9344, - 0x9347, 0x934a, 0x934d, 0x9350, 0x9353, 0x9356, 0x9359, 0x935c, - 0x935f, 0x9362, 0x9365, 0x9368, 0x936b, 0x936e, 0x9372, 0x9375, - 0x9378, 0x937b, 0x937e, 0x9381, 0x9384, 0x9387, 0x938a, 0x938d, - 0x9391, 0x9394, 0x9397, 0x939a, 0x939d, 0x93a0, 0x93a3, 0x93a6, - 0x93aa, 0x93ad, 0x93b0, 0x93b3, 0x93b6, 0x93b9, 0x93bc, 0x93c0, - 0x93c3, 0x93c6, 0x93c9, 0x93cc, 0x93cf, 0x93d3, 0x93d6, 0x93d9, - 0x93dc, 0x93df, 0x93e2, 0x93e6, 0x93e9, 0x93ec, 0x93ef, 0x93f2, - 0x93f6, 0x93f9, 0x93fc, 0x93ff, 0x9401, 0x9403, 0x9404, 0x9406, - 0x9408, 0x9409, 0x940b, 0x940d, 0x940e, 0x9410, 0x9411, 0x9413, - 0x9415, 0x9416, 0x9418, 0x9419, 0x941b, 0x941d, 0x941e, 0x9420, - 0x9422, 0x9423, 0x9425, 0x9427, 0x9428, 0x942a, 0x942b, 0x942d, - 0x942f, 0x9430, 0x9432, 0x9434, 0x9435, 0x9437, 0x9439, 0x943a, - 0x943c, 0x943e, 0x943f, 0x9441, 0x9443, 0x9444, 0x9446, 0x9448, - 0x9449, 0x944b, 0x944d, 0x944e, 0x9450, 0x9452, 0x9453, 0x9455, - 0x9457, 0x9458, 0x945a, 0x945c, 0x945d, 0x945f, 0x9461, 0x9462, - 0x9464, 0x9466, 0x9467, 0x9469, 0x946b, 0x946d, 0x946e, 0x9470, - 0x9472, 0x9473, 0x9475, 0x9477, 0x9478, 0x947a, 0x947c, 0x947e, - 0x947f, 0x9481, 0x9483, 0x9484, 0x9486, 0x9488, 0x948a, 0x948b, - 0x948d, 0x948f, 0x9490, 0x9492, 0x9494, 0x9496, 0x9497, 0x9499, - 0x949b, 0x949d, 0x949e, 0x94a0, 0x94a2, 0x94a4, 0x94a5, 0x94a7, - 0x94a9, 0x94ab, 0x94ac, 0x94ae, 0x94b0, 0x94b2, 0x94b3, 0x94b5, - 0x94b7, 0x94b9, 0x94ba, 0x94bc, 0x94be, 0x94c0, 0x94c1, 0x94c3, - 0x94c5, 0x94c7, 0x94c8, 0x94ca, 0x94cc, 0x94ce, 0x94cf, 0x94d1, - 0x94d3, 0x94d5, 0x94d7, 0x94d8, 0x94da, 0x94dc, 0x94de, 0x94e0, - 0x94e1, 0x94e3, 0x94e5, 0x94e7, 0x94e8, 0x94ea, 0x94ec, 0x94ee, - 0x94f0, 0x94f1, 0x94f3, 0x94f5, 0x94f7, 0x94f9, 0x94fa, 0x94fc, - 0x94fe, 0x9500, 0x9502, 0x9504, 0x9505, 0x9507, 0x9509, 0x950b, - 0x950d, 0x950e, 0x9510, 0x9512, 0x9514, 0x9516, 0x9518, 0x9519, - 0x951b, 0x951d, 0x951f, 0x9521, 0x9523, 0x9524, 0x9526, 0x9528, - 0x952a, 0x952c, 0x952e, 0x9530, 0x9531, 0x9533, 0x9535, 0x9537, - 0x9539, 0x953b, 0x953d, 0x953e, 0x9540, 0x9542, 0x9544, 0x9546, - 0x9548, 0x954a, 0x954b, 0x954d, 0x954f, 0x9551, 0x9553, 0x9555, - 0x9557, 0x9559, 0x955a, 0x955c, 0x955e, 0x9560, 0x9562, 0x9564, - 0x9566, 0x9568, 0x956a, 0x956b, 0x956d, 0x956f, 0x9571, 0x9573, - 0x9575, 0x9577, 0x9579, 0x957b, 0x957d, 0x957e, 0x9580, 0x9582, - 0x9584, 0x9586, 0x9588, 0x958a, 0x958c, 0x958e, 0x9590, 0x9592, - 0x9594, 0x9595, 0x9597, 0x9599, 0x959b, 0x959d, 0x959f, 0x95a1, - 0x95a3, 0x95a5, 0x95a7, 0x95a9, 0x95ab, 0x95ad, 0x95af, 0x95b1, - 0x95b3, 0x95b4, 0x95b6, 0x95b8, 0x95ba, 0x95bc, 0x95be, 0x95c0, - 0x95c2, 0x95c4, 0x95c6, 0x95c8, 0x95ca, 0x95cc, 0x95ce, 0x95d0, - 0x95d2, 0x95d4, 0x95d6, 0x95d8, 0x95da, 0x95dc, 0x95de, 0x95e0, - 0x95e2, 0x95e4, 0x95e6, 0x95e8, 0x95ea, 0x95ec, 0x95ee, 0x95f0, - 0x95f2, 0x95f4, 0x95f6, 0x95f8, 0x95fa, 0x95fc, 0x95fe, 0x9600, - 0x9602, 0x9604, 0x9606, 0x9608, 0x960a, 0x960c, 0x960e, 0x9610, - 0x9612, 0x9614, 0x9616, 0x9618, 0x961a, 0x961c, 0x961e, 0x9620, - 0x9622, 0x9624, 0x9626, 0x9628, 0x962a, 0x962c, 0x962e, 0x9630, - 0x9632, 0x9634, 0x9636, 0x9638, 0x963a, 0x963c, 0x963e, 0x9640, - 0x9642, 0x9644, 0x9647, 0x9649, 0x964b, 0x964d, 0x964f, 0x9651, - 0x9653, 0x9655, 0x9657, 0x9659, 0x965b, 0x965d, 0x965f, 0x9661, - 0x9663, 0x9665, 0x9668, 0x966a, 0x966c, 0x966e, 0x9670, 0x9672, - 0x9674, 0x9676, 0x9678, 0x967a, 0x967c, 0x967e, 0x9681, 0x9683, - 0x9685, 0x9687, 0x9689, 0x968b, 0x968d, 0x968f, 0x9691, 0x9693, - 0x9696, 0x9698, 0x969a, 0x969c, 0x969e, 0x96a0, 0x96a2, 0x96a4, - 0x96a6, 0x96a9, 0x96ab, 0x96ad, 0x96af, 0x96b1, 0x96b3, 0x96b5, - 0x96b7, 0x96ba, 0x96bc, 0x96be, 0x96c0, 0x96c2, 0x96c4, 0x96c6, - 0x96c9, 0x96cb, 0x96cd, 0x96cf, 0x96d1, 0x96d3, 0x96d5, 0x96d8, - 0x96da, 0x96dc, 0x96de, 0x96e0, 0x96e2, 0x96e4, 0x96e7, 0x96e9, - 0x96eb, 0x96ed, 0x96ef, 0x96f1, 0x96f4, 0x96f6, 0x96f8, 0x96fa, - 0x96fc, 0x96ff, 0x9701, 0x9703, 0x9705, 0x9707, 0x9709, 0x970c, - 0x970e, 0x9710, 0x9712, 0x9714, 0x9717, 0x9719, 0x971b, 0x971d, - 0x971f, 0x9722, 0x9724, 0x9726, 0x9728, 0x972a, 0x972d, 0x972f, - 0x9731, 0x9733, 0x9735, 0x9738, 0x973a, 0x973c, 0x973e, 0x9740, - 0x9743, 0x9745, 0x9747, 0x9749, 0x974c, 0x974e, 0x9750, 0x9752, - 0x9755, 0x9757, 0x9759, 0x975b, 0x975d, 0x9760, 0x9762, 0x9764, - 0x9766, 0x9769, 0x976b, 0x976d, 0x976f, 0x9772, 0x9774, 0x9776, - 0x9778, 0x977b, 0x977d, 0x977f, 0x9781, 0x9784, 0x9786, 0x9788, - 0x978b, 0x978d, 0x978f, 0x9791, 0x9794, 0x9796, 0x9798, 0x979a, - 0x979d, 0x979f, 0x97a1, 0x97a4, 0x97a6, 0x97a8, 0x97aa, 0x97ad, - 0x97af, 0x97b1, 0x97b4, 0x97b6, 0x97b8, 0x97bb, 0x97bd, 0x97bf, - 0x97c1, 0x97c4, 0x97c6, 0x97c8, 0x97cb, 0x97cd, 0x97cf, 0x97d2, - 0x97d4, 0x97d6, 0x97d9, 0x97db, 0x97dd, 0x97e0, 0x97e2, 0x97e4, - 0x97e6, 0x97e9, 0x97eb, 0x97ed, 0x97f0, 0x97f2, 0x97f4, 0x97f7, - 0x97f9, 0x97fb, 0x97fe, 0x9800, 0x9801, 0x9802, 0x9804, 0x9805, - 0x9806, 0x9807, 0x9808, 0x9809, 0x980b, 0x980c, 0x980d, 0x980e, - 0x980f, 0x9811, 0x9812, 0x9813, 0x9814, 0x9815, 0x9816, 0x9818, - 0x9819, 0x981a, 0x981b, 0x981c, 0x981e, 0x981f, 0x9820, 0x9821, - 0x9822, 0x9824, 0x9825, 0x9826, 0x9827, 0x9828, 0x982a, 0x982b, - 0x982c, 0x982d, 0x982e, 0x9830, 0x9831, 0x9832, 0x9833, 0x9834, - 0x9836, 0x9837, 0x9838, 0x9839, 0x983a, 0x983c, 0x983d, 0x983e, - 0x983f, 0x9840, 0x9842, 0x9843, 0x9844, 0x9845, 0x9846, 0x9848, - 0x9849, 0x984a, 0x984b, 0x984d, 0x984e, 0x984f, 0x9850, 0x9851, - 0x9853, 0x9854, 0x9855, 0x9856, 0x9858, 0x9859, 0x985a, 0x985b, - 0x985c, 0x985e, 0x985f, 0x9860, 0x9861, 0x9863, 0x9864, 0x9865, - 0x9866, 0x9868, 0x9869, 0x986a, 0x986b, 0x986c, 0x986e, 0x986f, - 0x9870, 0x9871, 0x9873, 0x9874, 0x9875, 0x9876, 0x9878, 0x9879, - 0x987a, 0x987b, 0x987d, 0x987e, 0x987f, 0x9880, 0x9882, 0x9883, - 0x9884, 0x9885, 0x9887, 0x9888, 0x9889, 0x988a, 0x988c, 0x988d, - 0x988e, 0x988f, 0x9891, 0x9892, 0x9893, 0x9894, 0x9896, 0x9897, - 0x9898, 0x989b, 0x989d, 0x98a0, 0x98a2, 0x98a5, 0x98a7, 0x98aa, - 0x98ad, 0x98af, 0x98b2, 0x98b4, 0x98b7, 0x98b9, 0x98bc, 0x98bf, - 0x98c1, 0x98c4, 0x98c6, 0x98c9, 0x98cb, 0x98ce, 0x98d1, 0x98d3, - 0x98d6, 0x98d8, 0x98db, 0x98de, 0x98e0, 0x98e3, 0x98e5, 0x98e8, - 0x98eb, 0x98ed, 0x98f0, 0x98f3, 0x98f5, 0x98f8, 0x98fa, 0x98fd, - 0x9900, 0x9902, 0x9905, 0x9908, 0x990a, 0x990d, 0x9910, 0x9912, - 0x9915, 0x9918, 0x991a, 0x991d, 0x9920, 0x9922, 0x9925, 0x9928, - 0x992a, 0x992d, 0x9930, 0x9933, 0x9935, 0x9938, 0x993b, 0x993d, - 0x9940, 0x9943, 0x9946, 0x9948, 0x994b, 0x994e, 0x9950, 0x9953, - 0x9956, 0x9959, 0x995b, 0x995e, 0x9961, 0x9964, 0x9966, 0x9969, - 0x996c, 0x996f, 0x9972, 0x9974, 0x9977, 0x997a, 0x997d, 0x997f, - 0x9982, 0x9985, 0x9988, 0x998b, 0x998d, 0x9990, 0x9993, 0x9996, - 0x9999, 0x999b, 0x999e, 0x99a1, 0x99a4, 0x99a7, 0x99aa, 0x99ac, - 0x99af, 0x99b2, 0x99b5, 0x99b8, 0x99bb, 0x99bd, 0x99c0, 0x99c3, - 0x99c6, 0x99c9, 0x99cc, 0x99cf, 0x99d1, 0x99d4, 0x99d7, 0x99da, - 0x99dd, 0x99e0, 0x99e3, 0x99e6, 0x99e9, 0x99eb, 0x99ee, 0x99f1, - 0x99f4, 0x99f7, 0x99fa, 0x99fd, 0x9a00, 0x9a03, 0x9a06, 0x9a09, - 0x9a0c, 0x9a0f, 0x9a11, 0x9a14, 0x9a17, 0x9a1a, 0x9a1d, 0x9a20, - 0x9a23, 0x9a26, 0x9a29, 0x9a2c, 0x9a2f, 0x9a32, 0x9a35, 0x9a38, - 0x9a3b, 0x9a3e, 0x9a41, 0x9a44, 0x9a47, 0x9a4a, 0x9a4d, 0x9a50, - 0x9a53, 0x9a56, 0x9a59, 0x9a5c, 0x9a5f, 0x9a62, 0x9a65, 0x9a68, - 0x9a6b, 0x9a6e, 0x9a71, 0x9a74, 0x9a77, 0x9a7a, 0x9a7d, 0x9a80, - 0x9a83, 0x9a86, 0x9a8a, 0x9a8d, 0x9a90, 0x9a93, 0x9a96, 0x9a99, - 0x9a9c, 0x9a9f, 0x9aa2, 0x9aa5, 0x9aa8, 0x9aab, 0x9aaf, 0x9ab2, - 0x9ab5, 0x9ab8, 0x9abb, 0x9abe, 0x9ac1, 0x9ac4, 0x9ac7, 0x9acb, - 0x9ace, 0x9ad1, 0x9ad4, 0x9ad7, 0x9ada, 0x9add, 0x9ae1, 0x9ae4, - 0x9ae7, 0x9aea, 0x9aed, 0x9af0, 0x9af3, 0x9af7, 0x9afa, 0x9afd, - 0x9b00, 0x9b03, 0x9b07, 0x9b0a, 0x9b0d, 0x9b10, 0x9b13, 0x9b16, - 0x9b1a, 0x9b1d, 0x9b20, 0x9b23, 0x9b27, 0x9b2a, 0x9b2d, 0x9b30, - 0x9b33, 0x9b37, 0x9b3a, 0x9b3d, 0x9b40, 0x9b44, 0x9b47, 0x9b4a, - 0x9b4d, 0x9b51, 0x9b54, 0x9b57, 0x9b5a, 0x9b5e, 0x9b61, 0x9b64, - 0x9b67, 0x9b6b, 0x9b6e, 0x9b71, 0x9b75, 0x9b78, 0x9b7b, 0x9b7e, - 0x9b82, 0x9b85, 0x9b88, 0x9b8c, 0x9b8f, 0x9b92, 0x9b96, 0x9b99, - 0x9b9c, 0x9ba0, 0x9ba3, 0x9ba6, 0x9baa, 0x9bad, 0x9bb0, 0x9bb4, - 0x9bb7, 0x9bba, 0x9bbe, 0x9bc1, 0x9bc4, 0x9bc8, 0x9bcb, 0x9bcf, - 0x9bd2, 0x9bd5, 0x9bd9, 0x9bdc, 0x9be0, 0x9be3, 0x9be6, 0x9bea, - 0x9bed, 0x9bf0, 0x9bf4, 0x9bf7, 0x9bfb, 0x9bfe, 0x9c01, 0x9c02, - 0x9c04, 0x9c06, 0x9c08, 0x9c09, 0x9c0b, 0x9c0d, 0x9c0f, 0x9c10, - 0x9c12, 0x9c14, 0x9c15, 0x9c17, 0x9c19, 0x9c1b, 0x9c1c, 0x9c1e, - 0x9c20, 0x9c22, 0x9c23, 0x9c25, 0x9c27, 0x9c29, 0x9c2a, 0x9c2c, - 0x9c2e, 0x9c30, 0x9c31, 0x9c33, 0x9c35, 0x9c37, 0x9c38, 0x9c3a, - 0x9c3c, 0x9c3e, 0x9c3f, 0x9c41, 0x9c43, 0x9c45, 0x9c46, 0x9c48, - 0x9c4a, 0x9c4c, 0x9c4e, 0x9c4f, 0x9c51, 0x9c53, 0x9c55, 0x9c56, - 0x9c58, 0x9c5a, 0x9c5c, 0x9c5e, 0x9c5f, 0x9c61, 0x9c63, 0x9c65, - 0x9c67, 0x9c68, 0x9c6a, 0x9c6c, 0x9c6e, 0x9c70, 0x9c71, 0x9c73, - 0x9c75, 0x9c77, 0x9c79, 0x9c7b, 0x9c7c, 0x9c7e, 0x9c80, 0x9c82, - 0x9c84, 0x9c85, 0x9c87, 0x9c89, 0x9c8b, 0x9c8d, 0x9c8f, 0x9c90, - 0x9c92, 0x9c94, 0x9c96, 0x9c98, 0x9c9a, 0x9c9c, 0x9c9d, 0x9c9f, - 0x9ca1, 0x9ca3, 0x9ca5, 0x9ca7, 0x9ca8, 0x9caa, 0x9cac, 0x9cae, - 0x9cb0, 0x9cb2, 0x9cb4, 0x9cb6, 0x9cb7, 0x9cb9, 0x9cbb, 0x9cbd, - 0x9cbf, 0x9cc1, 0x9cc3, 0x9cc5, 0x9cc6, 0x9cc8, 0x9cca, 0x9ccc, - 0x9cce, 0x9cd0, 0x9cd2, 0x9cd4, 0x9cd6, 0x9cd7, 0x9cd9, 0x9cdb, - 0x9cdd, 0x9cdf, 0x9ce1, 0x9ce3, 0x9ce5, 0x9ce7, 0x9ce9, 0x9cea, - 0x9cec, 0x9cee, 0x9cf0, 0x9cf2, 0x9cf4, 0x9cf6, 0x9cf8, 0x9cfa, - 0x9cfc, 0x9cfe, 0x9d00, 0x9d02, 0x9d03, 0x9d05, 0x9d07, 0x9d09, - 0x9d0b, 0x9d0d, 0x9d0f, 0x9d11, 0x9d13, 0x9d15, 0x9d17, 0x9d19, - 0x9d1b, 0x9d1d, 0x9d1f, 0x9d21, 0x9d23, 0x9d25, 0x9d27, 0x9d29, - 0x9d2a, 0x9d2c, 0x9d2e, 0x9d30, 0x9d32, 0x9d34, 0x9d36, 0x9d38, - 0x9d3a, 0x9d3c, 0x9d3e, 0x9d40, 0x9d42, 0x9d44, 0x9d46, 0x9d48, - 0x9d4a, 0x9d4c, 0x9d4e, 0x9d50, 0x9d52, 0x9d54, 0x9d56, 0x9d58, - 0x9d5a, 0x9d5c, 0x9d5e, 0x9d60, 0x9d62, 0x9d64, 0x9d66, 0x9d68, - 0x9d6a, 0x9d6c, 0x9d6e, 0x9d70, 0x9d72, 0x9d74, 0x9d76, 0x9d78, - 0x9d7a, 0x9d7c, 0x9d7e, 0x9d80, 0x9d83, 0x9d85, 0x9d87, 0x9d89, - 0x9d8b, 0x9d8d, 0x9d8f, 0x9d91, 0x9d93, 0x9d95, 0x9d97, 0x9d99, - 0x9d9b, 0x9d9d, 0x9d9f, 0x9da1, 0x9da3, 0x9da5, 0x9da7, 0x9daa, - 0x9dac, 0x9dae, 0x9db0, 0x9db2, 0x9db4, 0x9db6, 0x9db8, 0x9dba, - 0x9dbc, 0x9dbe, 0x9dc0, 0x9dc2, 0x9dc5, 0x9dc7, 0x9dc9, 0x9dcb, - 0x9dcd, 0x9dcf, 0x9dd1, 0x9dd3, 0x9dd5, 0x9dd7, 0x9dd9, 0x9ddc, - 0x9dde, 0x9de0, 0x9de2, 0x9de4, 0x9de6, 0x9de8, 0x9dea, 0x9dec, - 0x9def, 0x9df1, 0x9df3, 0x9df5, 0x9df7, 0x9df9, 0x9dfb, 0x9dfd, - 0x9e00, 0x9e02, 0x9e04, 0x9e06, 0x9e08, 0x9e0a, 0x9e0c, 0x9e0f, - 0x9e11, 0x9e13, 0x9e15, 0x9e17, 0x9e19, 0x9e1b, 0x9e1e, 0x9e20, - 0x9e22, 0x9e24, 0x9e26, 0x9e28, 0x9e2b, 0x9e2d, 0x9e2f, 0x9e31, - 0x9e33, 0x9e35, 0x9e38, 0x9e3a, 0x9e3c, 0x9e3e, 0x9e40, 0x9e42, - 0x9e45, 0x9e47, 0x9e49, 0x9e4b, 0x9e4d, 0x9e50, 0x9e52, 0x9e54, - 0x9e56, 0x9e58, 0x9e5b, 0x9e5d, 0x9e5f, 0x9e61, 0x9e63, 0x9e66, - 0x9e68, 0x9e6a, 0x9e6c, 0x9e6e, 0x9e71, 0x9e73, 0x9e75, 0x9e77, - 0x9e7a, 0x9e7c, 0x9e7e, 0x9e80, 0x9e82, 0x9e85, 0x9e87, 0x9e89, - 0x9e8b, 0x9e8e, 0x9e90, 0x9e92, 0x9e94, 0x9e97, 0x9e99, 0x9e9b, - 0x9e9d, 0x9ea0, 0x9ea2, 0x9ea4, 0x9ea6, 0x9ea9, 0x9eab, 0x9ead, - 0x9eaf, 0x9eb2, 0x9eb4, 0x9eb6, 0x9eb8, 0x9ebb, 0x9ebd, 0x9ebf, - 0x9ec2, 0x9ec4, 0x9ec6, 0x9ec8, 0x9ecb, 0x9ecd, 0x9ecf, 0x9ed2, - 0x9ed4, 0x9ed6, 0x9ed8, 0x9edb, 0x9edd, 0x9edf, 0x9ee2, 0x9ee4, - 0x9ee6, 0x9ee8, 0x9eeb, 0x9eed, 0x9eef, 0x9ef2, 0x9ef4, 0x9ef6, - 0x9ef9, 0x9efb, 0x9efd, 0x9f00, 0x9f02, 0x9f04, 0x9f07, 0x9f09, - 0x9f0b, 0x9f0e, 0x9f10, 0x9f12, 0x9f15, 0x9f17, 0x9f19, 0x9f1c, - 0x9f1e, 0x9f20, 0x9f23, 0x9f25, 0x9f27, 0x9f2a, 0x9f2c, 0x9f2e, - 0x9f31, 0x9f33, 0x9f35, 0x9f38, 0x9f3a, 0x9f3c, 0x9f3f, 0x9f41, - 0x9f44, 0x9f46, 0x9f48, 0x9f4b, 0x9f4d, 0x9f4f, 0x9f52, 0x9f54, - 0x9f57, 0x9f59, 0x9f5b, 0x9f5e, 0x9f60, 0x9f62, 0x9f65, 0x9f67, - 0x9f6a, 0x9f6c, 0x9f6e, 0x9f71, 0x9f73, 0x9f76, 0x9f78, 0x9f7a, - 0x9f7d, 0x9f7f, 0x9f82, 0x9f84, 0x9f87, 0x9f89, 0x9f8b, 0x9f8e, - 0x9f90, 0x9f93, 0x9f95, 0x9f97, 0x9f9a, 0x9f9c, 0x9f9f, 0x9fa1, - 0x9fa4, 0x9fa6, 0x9fa8, 0x9fab, 0x9fad, 0x9fb0, 0x9fb2, 0x9fb5, - 0x9fb7, 0x9fba, 0x9fbc, 0x9fbe, 0x9fc1, 0x9fc3, 0x9fc6, 0x9fc8, - 0x9fcb, 0x9fcd, 0x9fd0, 0x9fd2, 0x9fd5, 0x9fd7, 0x9fda, 0x9fdc, - 0x9fde, 0x9fe1, 0x9fe3, 0x9fe6, 0x9fe8, 0x9feb, 0x9fed, 0x9ff0, - 0x9ff2, 0x9ff5, 0x9ff7, 0x9ffa, 0x9ffc, 0x9fff, 0xa001, 0xa002, - 0xa003, 0xa004, 0xa006, 0xa007, 0xa008, 0xa009, 0xa00b, 0xa00c, - 0xa00d, 0xa00e, 0xa010, 0xa011, 0xa012, 0xa013, 0xa015, 0xa016, - 0xa017, 0xa018, 0xa01a, 0xa01b, 0xa01c, 0xa01e, 0xa01f, 0xa020, - 0xa021, 0xa023, 0xa024, 0xa025, 0xa026, 0xa028, 0xa029, 0xa02a, - 0xa02c, 0xa02d, 0xa02e, 0xa02f, 0xa031, 0xa032, 0xa033, 0xa034, - 0xa036, 0xa037, 0xa038, 0xa03a, 0xa03b, 0xa03c, 0xa03d, 0xa03f, - 0xa040, 0xa041, 0xa043, 0xa044, 0xa045, 0xa047, 0xa048, 0xa049, - 0xa04a, 0xa04c, 0xa04d, 0xa04e, 0xa050, 0xa051, 0xa052, 0xa054, - 0xa055, 0xa056, 0xa057, 0xa059, 0xa05a, 0xa05b, 0xa05d, 0xa05e, - 0xa05f, 0xa061, 0xa062, 0xa063, 0xa065, 0xa066, 0xa067, 0xa068, - 0xa06a, 0xa06b, 0xa06c, 0xa06e, 0xa06f, 0xa070, 0xa072, 0xa073, - 0xa074, 0xa076, 0xa077, 0xa078, 0xa07a, 0xa07b, 0xa07c, 0xa07e, - 0xa07f, 0xa080, 0xa082, 0xa083, 0xa084, 0xa086, 0xa087, 0xa088, - 0xa08a, 0xa08b, 0xa08c, 0xa08e, 0xa08f, 0xa090, 0xa092, 0xa093, - 0xa094, 0xa096, 0xa097, 0xa098, 0xa09a, 0xa09b, 0xa09c, 0xa09e, - 0xa09f, 0xa0a0, 0xa0a2, 0xa0a3, 0xa0a5, 0xa0a6, 0xa0a7, 0xa0a9, - 0xa0aa, 0xa0ab, 0xa0ad, 0xa0ae, 0xa0af, 0xa0b1, 0xa0b2, 0xa0b3, - 0xa0b5, 0xa0b6, 0xa0b8, 0xa0b9, 0xa0ba, 0xa0bc, 0xa0bd, 0xa0be, - 0xa0c0, 0xa0c1, 0xa0c2, 0xa0c4, 0xa0c5, 0xa0c7, 0xa0c8, 0xa0c9, - 0xa0cb, 0xa0cc, 0xa0cd, 0xa0cf, 0xa0d0, 0xa0d2, 0xa0d3, 0xa0d4, - 0xa0d6, 0xa0d7, 0xa0d9, 0xa0da, 0xa0db, 0xa0dd, 0xa0de, 0xa0df, - 0xa0e1, 0xa0e2, 0xa0e4, 0xa0e5, 0xa0e6, 0xa0e8, 0xa0e9, 0xa0eb, - 0xa0ec, 0xa0ed, 0xa0ef, 0xa0f0, 0xa0f2, 0xa0f3, 0xa0f4, 0xa0f6, - 0xa0f7, 0xa0f9, 0xa0fa, 0xa0fb, 0xa0fd, 0xa0fe, 0xa100, 0xa101, - 0xa102, 0xa104, 0xa105, 0xa107, 0xa108, 0xa10a, 0xa10b, 0xa10c, - 0xa10e, 0xa10f, 0xa111, 0xa112, 0xa113, 0xa115, 0xa116, 0xa118, - 0xa119, 0xa11b, 0xa11c, 0xa11d, 0xa11f, 0xa120, 0xa122, 0xa123, - 0xa125, 0xa126, 0xa127, 0xa129, 0xa12a, 0xa12c, 0xa12d, 0xa12f, - 0xa130, 0xa131, 0xa133, 0xa134, 0xa136, 0xa137, 0xa139, 0xa13a, - 0xa13c, 0xa13d, 0xa13e, 0xa140, 0xa141, 0xa143, 0xa144, 0xa146, - 0xa147, 0xa14a, 0xa14d, 0xa150, 0xa153, 0xa156, 0xa159, 0xa15c, - 0xa15f, 0xa161, 0xa164, 0xa167, 0xa16a, 0xa16d, 0xa170, 0xa173, - 0xa176, 0xa179, 0xa17c, 0xa17f, 0xa182, 0xa185, 0xa188, 0xa18b, - 0xa18e, 0xa191, 0xa194, 0xa197, 0xa19a, 0xa19d, 0xa1a0, 0xa1a3, - 0xa1a6, 0xa1a9, 0xa1ac, 0xa1af, 0xa1b2, 0xa1b5, 0xa1b8, 0xa1bb, - 0xa1be, 0xa1c1, 0xa1c4, 0xa1c7, 0xa1ca, 0xa1cd, 0xa1d0, 0xa1d3, - 0xa1d6, 0xa1da, 0xa1dd, 0xa1e0, 0xa1e3, 0xa1e6, 0xa1e9, 0xa1ec, - 0xa1ef, 0xa1f2, 0xa1f5, 0xa1f8, 0xa1fb, 0xa1ff, 0xa202, 0xa205, - 0xa208, 0xa20b, 0xa20e, 0xa211, 0xa214, 0xa218, 0xa21b, 0xa21e, - 0xa221, 0xa224, 0xa227, 0xa22b, 0xa22e, 0xa231, 0xa234, 0xa237, - 0xa23a, 0xa23e, 0xa241, 0xa244, 0xa247, 0xa24a, 0xa24d, 0xa251, - 0xa254, 0xa257, 0xa25a, 0xa25e, 0xa261, 0xa264, 0xa267, 0xa26a, - 0xa26e, 0xa271, 0xa274, 0xa277, 0xa27b, 0xa27e, 0xa281, 0xa284, - 0xa288, 0xa28b, 0xa28e, 0xa291, 0xa295, 0xa298, 0xa29b, 0xa29f, - 0xa2a2, 0xa2a5, 0xa2a8, 0xa2ac, 0xa2af, 0xa2b2, 0xa2b6, 0xa2b9, - 0xa2bc, 0xa2c0, 0xa2c3, 0xa2c6, 0xa2c9, 0xa2cd, 0xa2d0, 0xa2d4, - 0xa2d7, 0xa2da, 0xa2de, 0xa2e1, 0xa2e4, 0xa2e8, 0xa2eb, 0xa2ee, - 0xa2f2, 0xa2f5, 0xa2f8, 0xa2fc, 0xa2ff, 0xa303, 0xa306, 0xa309, - 0xa30d, 0xa310, 0xa314, 0xa317, 0xa31a, 0xa31e, 0xa321, 0xa325, - 0xa328, 0xa32c, 0xa32f, 0xa332, 0xa336, 0xa339, 0xa33d, 0xa340, - 0xa344, 0xa347, 0xa34b, 0xa34e, 0xa351, 0xa355, 0xa358, 0xa35c, - 0xa35f, 0xa363, 0xa366, 0xa36a, 0xa36d, 0xa371, 0xa374, 0xa378, - 0xa37b, 0xa37f, 0xa382, 0xa386, 0xa389, 0xa38d, 0xa390, 0xa394, - 0xa398, 0xa39b, 0xa39f, 0xa3a2, 0xa3a6, 0xa3a9, 0xa3ad, 0xa3b0, - 0xa3b4, 0xa3b8, 0xa3bb, 0xa3bf, 0xa3c2, 0xa3c6, 0xa3c9, 0xa3cd, - 0xa3d1, 0xa3d4, 0xa3d8, 0xa3db, 0xa3df, 0xa3e3, 0xa3e6, 0xa3ea, - 0xa3ee, 0xa3f1, 0xa3f5, 0xa3f8, 0xa3fc, 0xa400, 0xa402, 0xa403, - 0xa405, 0xa407, 0xa409, 0xa40b, 0xa40d, 0xa40e, 0xa410, 0xa412, - 0xa414, 0xa416, 0xa418, 0xa41a, 0xa41b, 0xa41d, 0xa41f, 0xa421, - 0xa423, 0xa425, 0xa426, 0xa428, 0xa42a, 0xa42c, 0xa42e, 0xa430, - 0xa432, 0xa434, 0xa435, 0xa437, 0xa439, 0xa43b, 0xa43d, 0xa43f, - 0xa441, 0xa443, 0xa444, 0xa446, 0xa448, 0xa44a, 0xa44c, 0xa44e, - 0xa450, 0xa452, 0xa454, 0xa455, 0xa457, 0xa459, 0xa45b, 0xa45d, - 0xa45f, 0xa461, 0xa463, 0xa465, 0xa467, 0xa469, 0xa46b, 0xa46c, - 0xa46e, 0xa470, 0xa472, 0xa474, 0xa476, 0xa478, 0xa47a, 0xa47c, - 0xa47e, 0xa480, 0xa482, 0xa484, 0xa486, 0xa488, 0xa489, 0xa48b, - 0xa48d, 0xa48f, 0xa491, 0xa493, 0xa495, 0xa497, 0xa499, 0xa49b, - 0xa49d, 0xa49f, 0xa4a1, 0xa4a3, 0xa4a5, 0xa4a7, 0xa4a9, 0xa4ab, - 0xa4ad, 0xa4af, 0xa4b1, 0xa4b3, 0xa4b5, 0xa4b7, 0xa4b9, 0xa4bb, - 0xa4bd, 0xa4bf, 0xa4c1, 0xa4c3, 0xa4c5, 0xa4c7, 0xa4c9, 0xa4cb, - 0xa4cd, 0xa4cf, 0xa4d1, 0xa4d3, 0xa4d5, 0xa4d7, 0xa4d9, 0xa4db, - 0xa4dd, 0xa4df, 0xa4e1, 0xa4e3, 0xa4e5, 0xa4e7, 0xa4e9, 0xa4eb, - 0xa4ed, 0xa4ef, 0xa4f1, 0xa4f3, 0xa4f5, 0xa4f7, 0xa4fa, 0xa4fc, - 0xa4fe, 0xa500, 0xa502, 0xa504, 0xa506, 0xa508, 0xa50a, 0xa50c, - 0xa50e, 0xa510, 0xa512, 0xa514, 0xa516, 0xa519, 0xa51b, 0xa51d, - 0xa51f, 0xa521, 0xa523, 0xa525, 0xa527, 0xa529, 0xa52b, 0xa52d, - 0xa52f, 0xa532, 0xa534, 0xa536, 0xa538, 0xa53a, 0xa53c, 0xa53e, - 0xa540, 0xa542, 0xa545, 0xa547, 0xa549, 0xa54b, 0xa54d, 0xa54f, - 0xa551, 0xa553, 0xa556, 0xa558, 0xa55a, 0xa55c, 0xa55e, 0xa560, - 0xa562, 0xa564, 0xa567, 0xa569, 0xa56b, 0xa56d, 0xa56f, 0xa571, - 0xa574, 0xa576, 0xa578, 0xa57a, 0xa57c, 0xa57e, 0xa581, 0xa583, - 0xa585, 0xa587, 0xa589, 0xa58b, 0xa58e, 0xa590, 0xa592, 0xa594, - 0xa596, 0xa598, 0xa59b, 0xa59d, 0xa59f, 0xa5a1, 0xa5a3, 0xa5a6, - 0xa5a8, 0xa5aa, 0xa5ac, 0xa5ae, 0xa5b1, 0xa5b3, 0xa5b5, 0xa5b7, - 0xa5b9, 0xa5bc, 0xa5be, 0xa5c0, 0xa5c2, 0xa5c5, 0xa5c7, 0xa5c9, - 0xa5cb, 0xa5cd, 0xa5d0, 0xa5d2, 0xa5d4, 0xa5d6, 0xa5d9, 0xa5db, - 0xa5dd, 0xa5df, 0xa5e2, 0xa5e4, 0xa5e6, 0xa5e8, 0xa5eb, 0xa5ed, - 0xa5ef, 0xa5f1, 0xa5f4, 0xa5f6, 0xa5f8, 0xa5fa, 0xa5fd, 0xa5ff, - 0xa601, 0xa604, 0xa606, 0xa608, 0xa60a, 0xa60d, 0xa60f, 0xa611, - 0xa614, 0xa616, 0xa618, 0xa61a, 0xa61d, 0xa61f, 0xa621, 0xa624, - 0xa626, 0xa628, 0xa62a, 0xa62d, 0xa62f, 0xa631, 0xa634, 0xa636, - 0xa638, 0xa63b, 0xa63d, 0xa63f, 0xa642, 0xa644, 0xa646, 0xa649, - 0xa64b, 0xa64d, 0xa650, 0xa652, 0xa654, 0xa657, 0xa659, 0xa65b, - 0xa65e, 0xa660, 0xa662, 0xa665, 0xa667, 0xa669, 0xa66c, 0xa66e, - 0xa670, 0xa673, 0xa675, 0xa678, 0xa67a, 0xa67c, 0xa67f, 0xa681, - 0xa683, 0xa686, 0xa688, 0xa68b, 0xa68d, 0xa68f, 0xa692, 0xa694, - 0xa696, 0xa699, 0xa69b, 0xa69e, 0xa6a0, 0xa6a2, 0xa6a5, 0xa6a7, - 0xa6aa, 0xa6ac, 0xa6ae, 0xa6b1, 0xa6b3, 0xa6b6, 0xa6b8, 0xa6bb, - 0xa6bd, 0xa6bf, 0xa6c2, 0xa6c4, 0xa6c7, 0xa6c9, 0xa6cc, 0xa6ce, - 0xa6d0, 0xa6d3, 0xa6d5, 0xa6d8, 0xa6da, 0xa6dd, 0xa6df, 0xa6e1, - 0xa6e4, 0xa6e6, 0xa6e9, 0xa6eb, 0xa6ee, 0xa6f0, 0xa6f3, 0xa6f5, - 0xa6f8, 0xa6fa, 0xa6fd, 0xa6ff, 0xa701, 0xa704, 0xa706, 0xa709, - 0xa70b, 0xa70e, 0xa710, 0xa713, 0xa715, 0xa718, 0xa71a, 0xa71d, - 0xa71f, 0xa722, 0xa724, 0xa727, 0xa729, 0xa72c, 0xa72e, 0xa731, - 0xa733, 0xa736, 0xa738, 0xa73b, 0xa73d, 0xa740, 0xa742, 0xa745, - 0xa747, 0xa74a, 0xa74c, 0xa74f, 0xa752, 0xa754, 0xa757, 0xa759, - 0xa75c, 0xa75e, 0xa761, 0xa763, 0xa766, 0xa768, 0xa76b, 0xa76d, - 0xa770, 0xa773, 0xa775, 0xa778, 0xa77a, 0xa77d, 0xa77f, 0xa782, - 0xa785, 0xa787, 0xa78a, 0xa78c, 0xa78f, 0xa791, 0xa794, 0xa797, - 0xa799, 0xa79c, 0xa79e, 0xa7a1, 0xa7a4, 0xa7a6, 0xa7a9, 0xa7ab, - 0xa7ae, 0xa7b0, 0xa7b3, 0xa7b6, 0xa7b8, 0xa7bb, 0xa7be, 0xa7c0, - 0xa7c3, 0xa7c5, 0xa7c8, 0xa7cb, 0xa7cd, 0xa7d0, 0xa7d2, 0xa7d5, - 0xa7d8, 0xa7da, 0xa7dd, 0xa7e0, 0xa7e2, 0xa7e5, 0xa7e8, 0xa7ea, - 0xa7ed, 0xa7ef, 0xa7f2, 0xa7f5, 0xa7f7, 0xa7fa, 0xa7fd, 0xa7ff, - 0xa801, 0xa802, 0xa804, 0xa805, 0xa806, 0xa808, 0xa809, 0xa80a, - 0xa80c, 0xa80d, 0xa80e, 0xa810, 0xa811, 0xa812, 0xa814, 0xa815, - 0xa816, 0xa818, 0xa819, 0xa81a, 0xa81c, 0xa81d, 0xa81e, 0xa820, - 0xa821, 0xa823, 0xa824, 0xa825, 0xa827, 0xa828, 0xa829, 0xa82b, - 0xa82c, 0xa82d, 0xa82f, 0xa830, 0xa831, 0xa833, 0xa834, 0xa836, - 0xa837, 0xa838, 0xa83a, 0xa83b, 0xa83c, 0xa83e, 0xa83f, 0xa841, - 0xa842, 0xa843, 0xa845, 0xa846, 0xa847, 0xa849, 0xa84a, 0xa84c, - 0xa84d, 0xa84e, 0xa850, 0xa851, 0xa852, 0xa854, 0xa855, 0xa857, - 0xa858, 0xa859, 0xa85b, 0xa85c, 0xa85e, 0xa85f, 0xa860, 0xa862, - 0xa863, 0xa865, 0xa866, 0xa867, 0xa869, 0xa86a, 0xa86c, 0xa86d, - 0xa86e, 0xa870, 0xa871, 0xa873, 0xa874, 0xa875, 0xa877, 0xa878, - 0xa87a, 0xa87b, 0xa87d, 0xa87e, 0xa87f, 0xa881, 0xa882, 0xa884, - 0xa885, 0xa886, 0xa888, 0xa889, 0xa88b, 0xa88c, 0xa88e, 0xa88f, - 0xa890, 0xa892, 0xa893, 0xa895, 0xa896, 0xa898, 0xa899, 0xa89a, - 0xa89c, 0xa89d, 0xa89f, 0xa8a0, 0xa8a2, 0xa8a3, 0xa8a4, 0xa8a6, - 0xa8a7, 0xa8a9, 0xa8aa, 0xa8ac, 0xa8ad, 0xa8af, 0xa8b0, 0xa8b1, - 0xa8b3, 0xa8b4, 0xa8b6, 0xa8b7, 0xa8b9, 0xa8ba, 0xa8bc, 0xa8bd, - 0xa8bf, 0xa8c0, 0xa8c2, 0xa8c3, 0xa8c4, 0xa8c6, 0xa8c7, 0xa8c9, - 0xa8ca, 0xa8cc, 0xa8cd, 0xa8cf, 0xa8d0, 0xa8d2, 0xa8d3, 0xa8d5, - 0xa8d6, 0xa8d8, 0xa8d9, 0xa8da, 0xa8dc, 0xa8dd, 0xa8df, 0xa8e0, - 0xa8e2, 0xa8e3, 0xa8e5, 0xa8e6, 0xa8e8, 0xa8e9, 0xa8eb, 0xa8ec, - 0xa8ee, 0xa8ef, 0xa8f1, 0xa8f2, 0xa8f4, 0xa8f5, 0xa8f7, 0xa8f8, - 0xa8fa, 0xa8fb, 0xa8fd, 0xa8fe, 0xa900, 0xa901, 0xa903, 0xa904, - 0xa906, 0xa907, 0xa909, 0xa90a, 0xa90c, 0xa90d, 0xa90f, 0xa910, - 0xa912, 0xa913, 0xa915, 0xa916, 0xa918, 0xa919, 0xa91b, 0xa91c, - 0xa91e, 0xa91f, 0xa921, 0xa922, 0xa924, 0xa926, 0xa927, 0xa929, - 0xa92a, 0xa92c, 0xa92d, 0xa92f, 0xa930, 0xa932, 0xa933, 0xa935, - 0xa936, 0xa938, 0xa939, 0xa93b, 0xa93c, 0xa93e, 0xa940, 0xa941, - 0xa943, 0xa944, 0xa946, 0xa947, 0xa949, 0xa94a, 0xa94c, 0xa94d, - 0xa94f, 0xa951, 0xa952, 0xa954, 0xa955, 0xa957, 0xa958, 0xa95a, - 0xa95b, 0xa95d, 0xa95f, 0xa960, 0xa962, 0xa963, 0xa965, 0xa966, - 0xa968, 0xa96a, 0xa96b, 0xa96d, 0xa96e, 0xa970, 0xa971, 0xa973, - 0xa975, 0xa976, 0xa978, 0xa979, 0xa97b, 0xa97c, 0xa97e, 0xa980, - 0xa981, 0xa983, 0xa984, 0xa986, 0xa987, 0xa989, 0xa98b, 0xa98c, - 0xa98e, 0xa98f, 0xa991, 0xa993, 0xa994, 0xa996, 0xa997, 0xa999, - 0xa99b, 0xa99c, 0xa99e, 0xa99f, 0xa9a1, 0xa9a3, 0xa9a4, 0xa9a6, - 0xa9a7, 0xa9a9, 0xa9ab, 0xa9ac, 0xa9ae, 0xa9af, 0xa9b1, 0xa9b3, - 0xa9b4, 0xa9b6, 0xa9b7, 0xa9b9, 0xa9bb, 0xa9bc, 0xa9be, 0xa9c0, - 0xa9c1, 0xa9c3, 0xa9c4, 0xa9c6, 0xa9c8, 0xa9c9, 0xa9cb, 0xa9cd, - 0xa9ce, 0xa9d0, 0xa9d1, 0xa9d3, 0xa9d5, 0xa9d6, 0xa9d8, 0xa9da, - 0xa9db, 0xa9dd, 0xa9df, 0xa9e0, 0xa9e2, 0xa9e3, 0xa9e5, 0xa9e7, - 0xa9e8, 0xa9ea, 0xa9ec, 0xa9ed, 0xa9ef, 0xa9f1, 0xa9f2, 0xa9f4, - 0xa9f6, 0xa9f7, 0xa9f9, 0xa9fb, 0xa9fc, 0xa9fe, 0xa9ff, 0xaa01, - 0xaa03, 0xaa04, 0xaa06, 0xaa08, 0xaa09, 0xaa0b, 0xaa0d, 0xaa0e, - 0xaa10, 0xaa13, 0xaa17, 0xaa1a, 0xaa1d, 0xaa21, 0xaa24, 0xaa28, - 0xaa2b, 0xaa2e, 0xaa32, 0xaa35, 0xaa38, 0xaa3c, 0xaa3f, 0xaa43, - 0xaa46, 0xaa49, 0xaa4d, 0xaa50, 0xaa54, 0xaa57, 0xaa5a, 0xaa5e, - 0xaa61, 0xaa65, 0xaa68, 0xaa6c, 0xaa6f, 0xaa72, 0xaa76, 0xaa79, - 0xaa7d, 0xaa80, 0xaa84, 0xaa87, 0xaa8b, 0xaa8e, 0xaa92, 0xaa95, - 0xaa99, 0xaa9c, 0xaaa0, 0xaaa3, 0xaaa7, 0xaaaa, 0xaaae, 0xaab1, - 0xaab5, 0xaab8, 0xaabc, 0xaabf, 0xaac3, 0xaac6, 0xaaca, 0xaacd, - 0xaad1, 0xaad5, 0xaad8, 0xaadc, 0xaadf, 0xaae3, 0xaae6, 0xaaea, - 0xaaee, 0xaaf1, 0xaaf5, 0xaaf8, 0xaafc, 0xab00, 0xab03, 0xab07, - 0xab0a, 0xab0e, 0xab12, 0xab15, 0xab19, 0xab1c, 0xab20, 0xab24, - 0xab27, 0xab2b, 0xab2f, 0xab32, 0xab36, 0xab3a, 0xab3d, 0xab41, - 0xab45, 0xab48, 0xab4c, 0xab50, 0xab54, 0xab57, 0xab5b, 0xab5f, - 0xab62, 0xab66, 0xab6a, 0xab6d, 0xab71, 0xab75, 0xab79, 0xab7c, - 0xab80, 0xab84, 0xab88, 0xab8b, 0xab8f, 0xab93, 0xab97, 0xab9a, - 0xab9e, 0xaba2, 0xaba6, 0xabaa, 0xabad, 0xabb1, 0xabb5, 0xabb9, - 0xabbd, 0xabc0, 0xabc4, 0xabc8, 0xabcc, 0xabd0, 0xabd4, 0xabd7, - 0xabdb, 0xabdf, 0xabe3, 0xabe7, 0xabeb, 0xabee, 0xabf2, 0xabf6, - 0xabfa, 0xabfe, 0xac01, 0xac03, 0xac05, 0xac07, 0xac09, 0xac0b, - 0xac0d, 0xac0f, 0xac10, 0xac12, 0xac14, 0xac16, 0xac18, 0xac1a, - 0xac1c, 0xac1e, 0xac20, 0xac22, 0xac24, 0xac26, 0xac28, 0xac2a, - 0xac2c, 0xac2e, 0xac30, 0xac32, 0xac34, 0xac36, 0xac38, 0xac3a, - 0xac3c, 0xac3e, 0xac40, 0xac42, 0xac44, 0xac46, 0xac48, 0xac4a, - 0xac4c, 0xac4e, 0xac50, 0xac52, 0xac54, 0xac56, 0xac58, 0xac5a, - 0xac5c, 0xac5e, 0xac60, 0xac62, 0xac64, 0xac66, 0xac69, 0xac6b, - 0xac6d, 0xac6f, 0xac71, 0xac73, 0xac75, 0xac77, 0xac79, 0xac7b, - 0xac7d, 0xac7f, 0xac81, 0xac83, 0xac85, 0xac87, 0xac8a, 0xac8c, - 0xac8e, 0xac90, 0xac92, 0xac94, 0xac96, 0xac98, 0xac9a, 0xac9c, - 0xac9e, 0xaca0, 0xaca3, 0xaca5, 0xaca7, 0xaca9, 0xacab, 0xacad, - 0xacaf, 0xacb1, 0xacb3, 0xacb6, 0xacb8, 0xacba, 0xacbc, 0xacbe, - 0xacc0, 0xacc2, 0xacc4, 0xacc7, 0xacc9, 0xaccb, 0xaccd, 0xaccf, - 0xacd1, 0xacd3, 0xacd6, 0xacd8, 0xacda, 0xacdc, 0xacde, 0xace0, - 0xace3, 0xace5, 0xace7, 0xace9, 0xaceb, 0xaced, 0xacf0, 0xacf2, - 0xacf4, 0xacf6, 0xacf8, 0xacfa, 0xacfd, 0xacff, 0xad01, 0xad03, - 0xad05, 0xad08, 0xad0a, 0xad0c, 0xad0e, 0xad10, 0xad13, 0xad15, - 0xad17, 0xad19, 0xad1b, 0xad1e, 0xad20, 0xad22, 0xad24, 0xad27, - 0xad29, 0xad2b, 0xad2d, 0xad2f, 0xad32, 0xad34, 0xad36, 0xad38, - 0xad3b, 0xad3d, 0xad3f, 0xad41, 0xad44, 0xad46, 0xad48, 0xad4a, - 0xad4d, 0xad4f, 0xad51, 0xad54, 0xad56, 0xad58, 0xad5a, 0xad5d, - 0xad5f, 0xad61, 0xad63, 0xad66, 0xad68, 0xad6a, 0xad6d, 0xad6f, - 0xad71, 0xad73, 0xad76, 0xad78, 0xad7a, 0xad7d, 0xad7f, 0xad81, - 0xad84, 0xad86, 0xad88, 0xad8b, 0xad8d, 0xad8f, 0xad91, 0xad94, - 0xad96, 0xad98, 0xad9b, 0xad9d, 0xad9f, 0xada2, 0xada4, 0xada6, - 0xada9, 0xadab, 0xadae, 0xadb0, 0xadb2, 0xadb5, 0xadb7, 0xadb9, - 0xadbc, 0xadbe, 0xadc0, 0xadc3, 0xadc5, 0xadc7, 0xadca, 0xadcc, - 0xadcf, 0xadd1, 0xadd3, 0xadd6, 0xadd8, 0xadda, 0xaddd, 0xaddf, - 0xade2, 0xade4, 0xade6, 0xade9, 0xadeb, 0xadee, 0xadf0, 0xadf2, - 0xadf5, 0xadf7, 0xadfa, 0xadfc, 0xadff, 0xae01, 0xae03, 0xae06, - 0xae08, 0xae0b, 0xae0d, 0xae10, 0xae12, 0xae14, 0xae17, 0xae19, - 0xae1c, 0xae1e, 0xae21, 0xae23, 0xae25, 0xae28, 0xae2a, 0xae2d, - 0xae2f, 0xae32, 0xae34, 0xae37, 0xae39, 0xae3c, 0xae3e, 0xae41, - 0xae43, 0xae46, 0xae48, 0xae4b, 0xae4d, 0xae4f, 0xae52, 0xae54, - 0xae57, 0xae59, 0xae5c, 0xae5e, 0xae61, 0xae63, 0xae66, 0xae68, - 0xae6b, 0xae6d, 0xae70, 0xae72, 0xae75, 0xae78, 0xae7a, 0xae7d, - 0xae7f, 0xae82, 0xae84, 0xae87, 0xae89, 0xae8c, 0xae8e, 0xae91, - 0xae93, 0xae96, 0xae98, 0xae9b, 0xae9e, 0xaea0, 0xaea3, 0xaea5, - 0xaea8, 0xaeaa, 0xaead, 0xaeaf, 0xaeb2, 0xaeb5, 0xaeb7, 0xaeba, - 0xaebc, 0xaebf, 0xaec2, 0xaec4, 0xaec7, 0xaec9, 0xaecc, 0xaece, - 0xaed1, 0xaed4, 0xaed6, 0xaed9, 0xaedb, 0xaede, 0xaee1, 0xaee3, - 0xaee6, 0xaee8, 0xaeeb, 0xaeee, 0xaef0, 0xaef3, 0xaef6, 0xaef8, - 0xaefb, 0xaefd, 0xaf00, 0xaf03, 0xaf05, 0xaf08, 0xaf0b, 0xaf0d, - 0xaf10, 0xaf13, 0xaf15, 0xaf18, 0xaf1a, 0xaf1d, 0xaf20, 0xaf22, - 0xaf25, 0xaf28, 0xaf2a, 0xaf2d, 0xaf30, 0xaf32, 0xaf35, 0xaf38, - 0xaf3a, 0xaf3d, 0xaf40, 0xaf43, 0xaf45, 0xaf48, 0xaf4b, 0xaf4d, - 0xaf50, 0xaf53, 0xaf55, 0xaf58, 0xaf5b, 0xaf5d, 0xaf60, 0xaf63, - 0xaf66, 0xaf68, 0xaf6b, 0xaf6e, 0xaf70, 0xaf73, 0xaf76, 0xaf79, - 0xaf7b, 0xaf7e, 0xaf81, 0xaf84, 0xaf86, 0xaf89, 0xaf8c, 0xaf8f, - 0xaf91, 0xaf94, 0xaf97, 0xaf9a, 0xaf9c, 0xaf9f, 0xafa2, 0xafa5, - 0xafa7, 0xafaa, 0xafad, 0xafb0, 0xafb2, 0xafb5, 0xafb8, 0xafbb, - 0xafbd, 0xafc0, 0xafc3, 0xafc6, 0xafc9, 0xafcb, 0xafce, 0xafd1, - 0xafd4, 0xafd7, 0xafd9, 0xafdc, 0xafdf, 0xafe2, 0xafe5, 0xafe7, - 0xafea, 0xafed, 0xaff0, 0xaff3, 0xaff6, 0xaff8, 0xaffb, 0xaffe, - 0xb000, 0xb002, 0xb003, 0xb005, 0xb006, 0xb007, 0xb009, 0xb00a, - 0xb00c, 0xb00d, 0xb00f, 0xb010, 0xb011, 0xb013, 0xb014, 0xb016, - 0xb017, 0xb019, 0xb01a, 0xb01b, 0xb01d, 0xb01e, 0xb020, 0xb021, - 0xb023, 0xb024, 0xb026, 0xb027, 0xb028, 0xb02a, 0xb02b, 0xb02d, - 0xb02e, 0xb030, 0xb031, 0xb033, 0xb034, 0xb036, 0xb037, 0xb038, - 0xb03a, 0xb03b, 0xb03d, 0xb03e, 0xb040, 0xb041, 0xb043, 0xb044, - 0xb046, 0xb047, 0xb049, 0xb04a, 0xb04b, 0xb04d, 0xb04e, 0xb050, - 0xb051, 0xb053, 0xb054, 0xb056, 0xb057, 0xb059, 0xb05a, 0xb05c, - 0xb05d, 0xb05f, 0xb060, 0xb062, 0xb063, 0xb065, 0xb066, 0xb068, - 0xb069, 0xb06b, 0xb06c, 0xb06e, 0xb06f, 0xb071, 0xb072, 0xb074, - 0xb075, 0xb077, 0xb078, 0xb07a, 0xb07b, 0xb07d, 0xb07e, 0xb080, - 0xb081, 0xb083, 0xb084, 0xb086, 0xb087, 0xb089, 0xb08a, 0xb08c, - 0xb08d, 0xb08f, 0xb090, 0xb092, 0xb093, 0xb095, 0xb096, 0xb098, - 0xb099, 0xb09b, 0xb09c, 0xb09e, 0xb0a0, 0xb0a1, 0xb0a3, 0xb0a4, - 0xb0a6, 0xb0a7, 0xb0a9, 0xb0aa, 0xb0ac, 0xb0ad, 0xb0af, 0xb0b0, - 0xb0b2, 0xb0b4, 0xb0b5, 0xb0b7, 0xb0b8, 0xb0ba, 0xb0bb, 0xb0bd, - 0xb0be, 0xb0c0, 0xb0c2, 0xb0c3, 0xb0c5, 0xb0c6, 0xb0c8, 0xb0c9, - 0xb0cb, 0xb0cc, 0xb0ce, 0xb0d0, 0xb0d1, 0xb0d3, 0xb0d4, 0xb0d6, - 0xb0d7, 0xb0d9, 0xb0db, 0xb0dc, 0xb0de, 0xb0df, 0xb0e1, 0xb0e2, - 0xb0e4, 0xb0e6, 0xb0e7, 0xb0e9, 0xb0ea, 0xb0ec, 0xb0ed, 0xb0ef, - 0xb0f1, 0xb0f2, 0xb0f4, 0xb0f5, 0xb0f7, 0xb0f9, 0xb0fa, 0xb0fc, - 0xb0fd, 0xb0ff, 0xb101, 0xb102, 0xb104, 0xb105, 0xb107, 0xb109, - 0xb10a, 0xb10c, 0xb10d, 0xb10f, 0xb111, 0xb112, 0xb114, 0xb115, - 0xb117, 0xb119, 0xb11a, 0xb11c, 0xb11e, 0xb11f, 0xb121, 0xb122, - 0xb124, 0xb126, 0xb127, 0xb129, 0xb12b, 0xb12c, 0xb12e, 0xb12f, - 0xb131, 0xb133, 0xb134, 0xb136, 0xb138, 0xb139, 0xb13b, 0xb13c, - 0xb13e, 0xb140, 0xb141, 0xb143, 0xb145, 0xb146, 0xb148, 0xb14a, - 0xb14b, 0xb14d, 0xb14f, 0xb150, 0xb152, 0xb154, 0xb155, 0xb157, - 0xb159, 0xb15a, 0xb15c, 0xb15e, 0xb15f, 0xb161, 0xb162, 0xb164, - 0xb166, 0xb167, 0xb169, 0xb16b, 0xb16c, 0xb16e, 0xb170, 0xb172, - 0xb173, 0xb175, 0xb177, 0xb178, 0xb17a, 0xb17c, 0xb17d, 0xb17f, - 0xb181, 0xb182, 0xb184, 0xb186, 0xb187, 0xb189, 0xb18b, 0xb18c, - 0xb18e, 0xb190, 0xb192, 0xb193, 0xb195, 0xb197, 0xb198, 0xb19a, - 0xb19c, 0xb19d, 0xb19f, 0xb1a1, 0xb1a3, 0xb1a4, 0xb1a6, 0xb1a8, - 0xb1a9, 0xb1ab, 0xb1ad, 0xb1af, 0xb1b0, 0xb1b2, 0xb1b4, 0xb1b5, - 0xb1b7, 0xb1b9, 0xb1bb, 0xb1bc, 0xb1be, 0xb1c0, 0xb1c1, 0xb1c3, - 0xb1c5, 0xb1c7, 0xb1c8, 0xb1ca, 0xb1cc, 0xb1ce, 0xb1cf, 0xb1d1, - 0xb1d3, 0xb1d4, 0xb1d6, 0xb1d8, 0xb1da, 0xb1db, 0xb1dd, 0xb1df, - 0xb1e1, 0xb1e2, 0xb1e4, 0xb1e6, 0xb1e8, 0xb1e9, 0xb1eb, 0xb1ed, - 0xb1ef, 0xb1f0, 0xb1f2, 0xb1f4, 0xb1f6, 0xb1f7, 0xb1f9, 0xb1fb, - 0xb1fd, 0xb1ff, 0xb200, 0xb202, 0xb204, 0xb206, 0xb207, 0xb209, - 0xb20b, 0xb20d, 0xb20e, 0xb210, 0xb212, 0xb214, 0xb216, 0xb217, - 0xb219, 0xb21b, 0xb21d, 0xb21e, 0xb220, 0xb222, 0xb224, 0xb226, - 0xb227, 0xb229, 0xb22b, 0xb22d, 0xb22f, 0xb230, 0xb232, 0xb234, - 0xb236, 0xb238, 0xb239, 0xb23b, 0xb23d, 0xb23f, 0xb241, 0xb242, - 0xb244, 0xb246, 0xb248, 0xb24a, 0xb24b, 0xb24d, 0xb24f, 0xb251, - 0xb253, 0xb254, 0xb256, 0xb258, 0xb25a, 0xb25c, 0xb25e, 0xb25f, - 0xb261, 0xb263, 0xb265, 0xb267, 0xb269, 0xb26a, 0xb26c, 0xb26e, - 0xb270, 0xb272, 0xb274, 0xb275, 0xb277, 0xb279, 0xb27b, 0xb27d, - 0xb27f, 0xb280, 0xb282, 0xb284, 0xb286, 0xb288, 0xb28a, 0xb28c, - 0xb28d, 0xb28f, 0xb291, 0xb293, 0xb295, 0xb297, 0xb299, 0xb29a, - 0xb29c, 0xb29e, 0xb2a0, 0xb2a2, 0xb2a4, 0xb2a6, 0xb2a7, 0xb2a9, - 0xb2ab, 0xb2ad, 0xb2af, 0xb2b1, 0xb2b3, 0xb2b5, 0xb2b6, 0xb2b8, - 0xb2ba, 0xb2bc, 0xb2be, 0xb2c0, 0xb2c2, 0xb2c4, 0xb2c5, 0xb2c7, - 0xb2c9, 0xb2cb, 0xb2cd, 0xb2cf, 0xb2d1, 0xb2d3, 0xb2d5, 0xb2d6, - 0xb2d8, 0xb2da, 0xb2dc, 0xb2de, 0xb2e0, 0xb2e2, 0xb2e4, 0xb2e6, - 0xb2e8, 0xb2ea, 0xb2eb, 0xb2ed, 0xb2ef, 0xb2f1, 0xb2f3, 0xb2f5, - 0xb2f7, 0xb2fb, 0xb2ff, 0xb302, 0xb306, 0xb30a, 0xb30e, 0xb312, - 0xb316, 0xb31a, 0xb31d, 0xb321, 0xb325, 0xb329, 0xb32d, 0xb331, - 0xb335, 0xb339, 0xb33d, 0xb340, 0xb344, 0xb348, 0xb34c, 0xb350, - 0xb354, 0xb358, 0xb35c, 0xb360, 0xb364, 0xb368, 0xb36c, 0xb370, - 0xb374, 0xb378, 0xb37c, 0xb380, 0xb384, 0xb388, 0xb38c, 0xb390, - 0xb394, 0xb398, 0xb39c, 0xb3a0, 0xb3a4, 0xb3a8, 0xb3ac, 0xb3b0, - 0xb3b4, 0xb3b8, 0xb3bc, 0xb3c0, 0xb3c4, 0xb3c8, 0xb3cc, 0xb3d0, - 0xb3d4, 0xb3d9, 0xb3dd, 0xb3e1, 0xb3e5, 0xb3e9, 0xb3ed, 0xb3f1, - 0xb3f5, 0xb3f9, 0xb3fe, 0xb401, 0xb403, 0xb405, 0xb407, 0xb409, - 0xb40b, 0xb40d, 0xb40f, 0xb411, 0xb414, 0xb416, 0xb418, 0xb41a, - 0xb41c, 0xb41e, 0xb420, 0xb422, 0xb424, 0xb426, 0xb428, 0xb42b, - 0xb42d, 0xb42f, 0xb431, 0xb433, 0xb435, 0xb437, 0xb439, 0xb43c, - 0xb43e, 0xb440, 0xb442, 0xb444, 0xb446, 0xb448, 0xb44b, 0xb44d, - 0xb44f, 0xb451, 0xb453, 0xb455, 0xb457, 0xb45a, 0xb45c, 0xb45e, - 0xb460, 0xb462, 0xb464, 0xb467, 0xb469, 0xb46b, 0xb46d, 0xb46f, - 0xb472, 0xb474, 0xb476, 0xb478, 0xb47a, 0xb47d, 0xb47f, 0xb481, - 0xb483, 0xb485, 0xb488, 0xb48a, 0xb48c, 0xb48e, 0xb490, 0xb493, - 0xb495, 0xb497, 0xb499, 0xb49c, 0xb49e, 0xb4a0, 0xb4a2, 0xb4a4, - 0xb4a7, 0xb4a9, 0xb4ab, 0xb4ad, 0xb4b0, 0xb4b2, 0xb4b4, 0xb4b6, - 0xb4b9, 0xb4bb, 0xb4bd, 0xb4c0, 0xb4c2, 0xb4c4, 0xb4c6, 0xb4c9, - 0xb4cb, 0xb4cd, 0xb4cf, 0xb4d2, 0xb4d4, 0xb4d6, 0xb4d9, 0xb4db, - 0xb4dd, 0xb4e0, 0xb4e2, 0xb4e4, 0xb4e6, 0xb4e9, 0xb4eb, 0xb4ed, - 0xb4f0, 0xb4f2, 0xb4f4, 0xb4f7, 0xb4f9, 0xb4fb, 0xb4fe, 0xb500, - 0xb502, 0xb505, 0xb507, 0xb509, 0xb50c, 0xb50e, 0xb510, 0xb513, - 0xb515, 0xb517, 0xb51a, 0xb51c, 0xb51e, 0xb521, 0xb523, 0xb526, - 0xb528, 0xb52a, 0xb52d, 0xb52f, 0xb531, 0xb534, 0xb536, 0xb539, - 0xb53b, 0xb53d, 0xb540, 0xb542, 0xb545, 0xb547, 0xb549, 0xb54c, - 0xb54e, 0xb551, 0xb553, 0xb555, 0xb558, 0xb55a, 0xb55d, 0xb55f, - 0xb562, 0xb564, 0xb566, 0xb569, 0xb56b, 0xb56e, 0xb570, 0xb573, - 0xb575, 0xb577, 0xb57a, 0xb57c, 0xb57f, 0xb581, 0xb584, 0xb586, - 0xb589, 0xb58b, 0xb58e, 0xb590, 0xb593, 0xb595, 0xb598, 0xb59a, - 0xb59d, 0xb59f, 0xb5a1, 0xb5a4, 0xb5a6, 0xb5a9, 0xb5ab, 0xb5ae, - 0xb5b0, 0xb5b3, 0xb5b5, 0xb5b8, 0xb5ba, 0xb5bd, 0xb5c0, 0xb5c2, - 0xb5c5, 0xb5c7, 0xb5ca, 0xb5cc, 0xb5cf, 0xb5d1, 0xb5d4, 0xb5d6, - 0xb5d9, 0xb5db, 0xb5de, 0xb5e0, 0xb5e3, 0xb5e6, 0xb5e8, 0xb5eb, - 0xb5ed, 0xb5f0, 0xb5f2, 0xb5f5, 0xb5f7, 0xb5fa, 0xb5fd, 0xb5ff, - 0xb602, 0xb604, 0xb607, 0xb60a, 0xb60c, 0xb60f, 0xb611, 0xb614, - 0xb616, 0xb619, 0xb61c, 0xb61e, 0xb621, 0xb623, 0xb626, 0xb629, - 0xb62b, 0xb62e, 0xb631, 0xb633, 0xb636, 0xb638, 0xb63b, 0xb63e, - 0xb640, 0xb643, 0xb646, 0xb648, 0xb64b, 0xb64e, 0xb650, 0xb653, - 0xb655, 0xb658, 0xb65b, 0xb65d, 0xb660, 0xb663, 0xb665, 0xb668, - 0xb66b, 0xb66d, 0xb670, 0xb673, 0xb676, 0xb678, 0xb67b, 0xb67e, - 0xb680, 0xb683, 0xb686, 0xb688, 0xb68b, 0xb68e, 0xb690, 0xb693, - 0xb696, 0xb699, 0xb69b, 0xb69e, 0xb6a1, 0xb6a3, 0xb6a6, 0xb6a9, - 0xb6ac, 0xb6ae, 0xb6b1, 0xb6b4, 0xb6b7, 0xb6b9, 0xb6bc, 0xb6bf, - 0xb6c2, 0xb6c4, 0xb6c7, 0xb6ca, 0xb6cd, 0xb6cf, 0xb6d2, 0xb6d5, - 0xb6d8, 0xb6da, 0xb6dd, 0xb6e0, 0xb6e3, 0xb6e5, 0xb6e8, 0xb6eb, - 0xb6ee, 0xb6f1, 0xb6f3, 0xb6f6, 0xb6f9, 0xb6fc, 0xb6ff, 0xb701, - 0xb704, 0xb707, 0xb70a, 0xb70d, 0xb70f, 0xb712, 0xb715, 0xb718, - 0xb71b, 0xb71e, 0xb720, 0xb723, 0xb726, 0xb729, 0xb72c, 0xb72f, - 0xb731, 0xb734, 0xb737, 0xb73a, 0xb73d, 0xb740, 0xb743, 0xb745, - 0xb748, 0xb74b, 0xb74e, 0xb751, 0xb754, 0xb757, 0xb759, 0xb75c, - 0xb75f, 0xb762, 0xb765, 0xb768, 0xb76b, 0xb76e, 0xb771, 0xb774, - 0xb776, 0xb779, 0xb77c, 0xb77f, 0xb782, 0xb785, 0xb788, 0xb78b, - 0xb78e, 0xb791, 0xb794, 0xb796, 0xb799, 0xb79c, 0xb79f, 0xb7a2, - 0xb7a5, 0xb7a8, 0xb7ab, 0xb7ae, 0xb7b1, 0xb7b4, 0xb7b7, 0xb7ba, - 0xb7bd, 0xb7c0, 0xb7c3, 0xb7c6, 0xb7c9, 0xb7cc, 0xb7cf, 0xb7d2, - 0xb7d5, 0xb7d7, 0xb7da, 0xb7dd, 0xb7e0, 0xb7e3, 0xb7e6, 0xb7e9, - 0xb7ec, 0xb7ef, 0xb7f2, 0xb7f5, 0xb7f8, 0xb7fb, 0xb7fe, 0xb801, - 0xb802, 0xb804, 0xb805, 0xb807, 0xb808, 0xb80a, 0xb80b, 0xb80d, - 0xb80e, 0xb810, 0xb811, 0xb813, 0xb814, 0xb816, 0xb817, 0xb819, - 0xb81b, 0xb81c, 0xb81e, 0xb81f, 0xb821, 0xb822, 0xb824, 0xb825, - 0xb827, 0xb828, 0xb82a, 0xb82b, 0xb82d, 0xb82f, 0xb830, 0xb832, - 0xb833, 0xb835, 0xb836, 0xb838, 0xb839, 0xb83b, 0xb83c, 0xb83e, - 0xb840, 0xb841, 0xb843, 0xb844, 0xb846, 0xb847, 0xb849, 0xb84b, - 0xb84c, 0xb84e, 0xb84f, 0xb851, 0xb852, 0xb854, 0xb856, 0xb857, - 0xb859, 0xb85a, 0xb85c, 0xb85d, 0xb85f, 0xb861, 0xb862, 0xb864, - 0xb865, 0xb867, 0xb869, 0xb86a, 0xb86c, 0xb86d, 0xb86f, 0xb870, - 0xb872, 0xb874, 0xb875, 0xb877, 0xb878, 0xb87a, 0xb87c, 0xb87d, - 0xb87f, 0xb880, 0xb882, 0xb884, 0xb885, 0xb887, 0xb889, 0xb88a, - 0xb88c, 0xb88d, 0xb88f, 0xb891, 0xb892, 0xb894, 0xb895, 0xb897, - 0xb899, 0xb89a, 0xb89c, 0xb89e, 0xb89f, 0xb8a1, 0xb8a3, 0xb8a4, - 0xb8a6, 0xb8a7, 0xb8a9, 0xb8ab, 0xb8ac, 0xb8ae, 0xb8b0, 0xb8b1, - 0xb8b3, 0xb8b5, 0xb8b6, 0xb8b8, 0xb8ba, 0xb8bb, 0xb8bd, 0xb8be, - 0xb8c0, 0xb8c2, 0xb8c3, 0xb8c5, 0xb8c7, 0xb8c8, 0xb8ca, 0xb8cc, - 0xb8cd, 0xb8cf, 0xb8d1, 0xb8d2, 0xb8d4, 0xb8d6, 0xb8d7, 0xb8d9, - 0xb8db, 0xb8dc, 0xb8de, 0xb8e0, 0xb8e1, 0xb8e3, 0xb8e5, 0xb8e7, - 0xb8e8, 0xb8ea, 0xb8ec, 0xb8ed, 0xb8ef, 0xb8f1, 0xb8f2, 0xb8f4, - 0xb8f6, 0xb8f7, 0xb8f9, 0xb8fb, 0xb8fd, 0xb8fe, 0xb900, 0xb902, - 0xb903, 0xb905, 0xb907, 0xb908, 0xb90a, 0xb90c, 0xb90e, 0xb90f, - 0xb911, 0xb913, 0xb914, 0xb916, 0xb918, 0xb91a, 0xb91b, 0xb91d, - 0xb91f, 0xb920, 0xb922, 0xb924, 0xb926, 0xb927, 0xb929, 0xb92b, - 0xb92d, 0xb92e, 0xb930, 0xb932, 0xb934, 0xb935, 0xb937, 0xb939, - 0xb93b, 0xb93c, 0xb93e, 0xb940, 0xb942, 0xb943, 0xb945, 0xb947, - 0xb949, 0xb94a, 0xb94c, 0xb94e, 0xb950, 0xb951, 0xb953, 0xb955, - 0xb957, 0xb958, 0xb95a, 0xb95c, 0xb95e, 0xb95f, 0xb961, 0xb963, - 0xb965, 0xb967, 0xb968, 0xb96a, 0xb96c, 0xb96e, 0xb96f, 0xb971, - 0xb973, 0xb975, 0xb977, 0xb978, 0xb97a, 0xb97c, 0xb97e, 0xb97f, - 0xb981, 0xb983, 0xb985, 0xb987, 0xb988, 0xb98a, 0xb98c, 0xb98e, - 0xb990, 0xb991, 0xb993, 0xb995, 0xb997, 0xb999, 0xb99b, 0xb99c, - 0xb99e, 0xb9a0, 0xb9a2, 0xb9a4, 0xb9a5, 0xb9a7, 0xb9a9, 0xb9ab, - 0xb9ad, 0xb9af, 0xb9b0, 0xb9b2, 0xb9b4, 0xb9b6, 0xb9b8, 0xb9ba, - 0xb9bb, 0xb9bd, 0xb9bf, 0xb9c1, 0xb9c3, 0xb9c5, 0xb9c6, 0xb9c8, - 0xb9ca, 0xb9cc, 0xb9ce, 0xb9d0, 0xb9d1, 0xb9d3, 0xb9d5, 0xb9d7, - 0xb9d9, 0xb9db, 0xb9dd, 0xb9de, 0xb9e0, 0xb9e2, 0xb9e4, 0xb9e6, - 0xb9e8, 0xb9ea, 0xb9eb, 0xb9ed, 0xb9ef, 0xb9f1, 0xb9f3, 0xb9f5, - 0xb9f7, 0xb9f9, 0xb9fa, 0xb9fc, 0xb9fe, 0xba00, 0xba02, 0xba04, - 0xba06, 0xba08, 0xba09, 0xba0b, 0xba0d, 0xba0f, 0xba11, 0xba13, - 0xba15, 0xba17, 0xba19, 0xba1b, 0xba1c, 0xba1e, 0xba20, 0xba22, - 0xba24, 0xba26, 0xba28, 0xba2a, 0xba2c, 0xba2e, 0xba2f, 0xba31, - 0xba33, 0xba35, 0xba37, 0xba39, 0xba3b, 0xba3d, 0xba3f, 0xba41, - 0xba43, 0xba45, 0xba47, 0xba48, 0xba4a, 0xba4c, 0xba4e, 0xba50, - 0xba52, 0xba54, 0xba56, 0xba58, 0xba5a, 0xba5c, 0xba5e, 0xba60, - 0xba62, 0xba64, 0xba66, 0xba67, 0xba69, 0xba6b, 0xba6d, 0xba6f, - 0xba71, 0xba73, 0xba75, 0xba77, 0xba79, 0xba7b, 0xba7d, 0xba7f, - 0xba81, 0xba83, 0xba85, 0xba87, 0xba89, 0xba8b, 0xba8d, 0xba8f, - 0xba91, 0xba93, 0xba95, 0xba97, 0xba99, 0xba9b, 0xba9d, 0xba9f, - 0xbaa0, 0xbaa2, 0xbaa4, 0xbaa6, 0xbaa8, 0xbaaa, 0xbaac, 0xbaae, - 0xbab0, 0xbab2, 0xbab4, 0xbab6, 0xbab8, 0xbaba, 0xbabc, 0xbabe, - 0xbac0, 0xbac2, 0xbac4, 0xbac6, 0xbac8, 0xbaca, 0xbacc, 0xbace, - 0xbad1, 0xbad3, 0xbad5, 0xbad7, 0xbad9, 0xbadb, 0xbadd, 0xbadf, - 0xbae1, 0xbae3, 0xbae5, 0xbae7, 0xbae9, 0xbaeb, 0xbaed, 0xbaef, - 0xbaf1, 0xbaf3, 0xbaf5, 0xbaf7, 0xbaf9, 0xbafb, 0xbafd, 0xbaff, - 0xbb01, 0xbb03, 0xbb05, 0xbb07, 0xbb09, 0xbb0b, 0xbb0e, 0xbb10, - 0xbb12, 0xbb14, 0xbb16, 0xbb18, 0xbb1a, 0xbb1c, 0xbb1e, 0xbb20, - 0xbb22, 0xbb24, 0xbb26, 0xbb28, 0xbb2a, 0xbb2c, 0xbb2f, 0xbb31, - 0xbb33, 0xbb35, 0xbb37, 0xbb39, 0xbb3b, 0xbb3d, 0xbb3f, 0xbb41, - 0xbb43, 0xbb45, 0xbb48, 0xbb4a, 0xbb4c, 0xbb4e, 0xbb50, 0xbb52, - 0xbb54, 0xbb56, 0xbb58, 0xbb5a, 0xbb5d, 0xbb5f, 0xbb61, 0xbb63, - 0xbb65, 0xbb67, 0xbb69, 0xbb6b, 0xbb6d, 0xbb6f, 0xbb72, 0xbb74, - 0xbb76, 0xbb78, 0xbb7a, 0xbb7c, 0xbb7e, 0xbb80, 0xbb83, 0xbb85, - 0xbb87, 0xbb89, 0xbb8b, 0xbb8d, 0xbb8f, 0xbb91, 0xbb94, 0xbb96, - 0xbb98, 0xbb9a, 0xbb9c, 0xbb9e, 0xbba0, 0xbba3, 0xbba5, 0xbba7, - 0xbba9, 0xbbab, 0xbbad, 0xbbaf, 0xbbb2, 0xbbb4, 0xbbb6, 0xbbb8, - 0xbbba, 0xbbbc, 0xbbbf, 0xbbc1, 0xbbc3, 0xbbc5, 0xbbc7, 0xbbc9, - 0xbbcc, 0xbbce, 0xbbd0, 0xbbd2, 0xbbd4, 0xbbd6, 0xbbd9, 0xbbdb, - 0xbbdd, 0xbbdf, 0xbbe1, 0xbbe4, 0xbbe6, 0xbbe8, 0xbbea, 0xbbec, - 0xbbee, 0xbbf1, 0xbbf3, 0xbbf5, 0xbbf7, 0xbbf9, 0xbbfc, 0xbbfe, - 0xbc00, 0xbc02, 0xbc04, 0xbc07, 0xbc09, 0xbc0b, 0xbc0d, 0xbc10, - 0xbc12, 0xbc14, 0xbc16, 0xbc18, 0xbc1b, 0xbc1d, 0xbc1f, 0xbc22, - 0xbc24, 0xbc26, 0xbc28, 0xbc2b, 0xbc2d, 0xbc2f, 0xbc32, 0xbc34, - 0xbc36, 0xbc39, 0xbc3b, 0xbc3d, 0xbc3f, 0xbc42, 0xbc44, 0xbc47, - 0xbc49, 0xbc4b, 0xbc4e, 0xbc50, 0xbc52, 0xbc55, 0xbc57, 0xbc59, - 0xbc5c, 0xbc5e, 0xbc61, 0xbc63, 0xbc66, 0xbc68, 0xbc6a, 0xbc6d, - 0xbc6f, 0xbc72, 0xbc74, 0xbc77, 0xbc79, 0xbc7b, 0xbc7e, 0xbc80, - 0xbc83, 0xbc85, 0xbc88, 0xbc8a, 0xbc8d, 0xbc8f, 0xbc92, 0xbc94, - 0xbc97, 0xbc99, 0xbc9c, 0xbc9f, 0xbca1, 0xbca4, 0xbca6, 0xbca9, - 0xbcab, 0xbcae, 0xbcb0, 0xbcb3, 0xbcb6, 0xbcb8, 0xbcbb, 0xbcbd, - 0xbcc0, 0xbcc3, 0xbcc5, 0xbcc8, 0xbccb, 0xbccd, 0xbcd0, 0xbcd2, - 0xbcd5, 0xbcd8, 0xbcda, 0xbcdd, 0xbce0, 0xbce2, 0xbce5, 0xbce8, - 0xbceb, 0xbced, 0xbcf0, 0xbcf3, 0xbcf5, 0xbcf8, 0xbcfb, 0xbcfe, - 0xbd00, 0xbd03, 0xbd06, 0xbd09, 0xbd0b, 0xbd0e, 0xbd11, 0xbd14, - 0xbd17, 0xbd19, 0xbd1c, 0xbd1f, 0xbd22, 0xbd25, 0xbd27, 0xbd2a, - 0xbd2d, 0xbd30, 0xbd33, 0xbd36, 0xbd39, 0xbd3b, 0xbd3e, 0xbd41, - 0xbd44, 0xbd47, 0xbd4a, 0xbd4d, 0xbd50, 0xbd53, 0xbd56, 0xbd59, - 0xbd5b, 0xbd5e, 0xbd61, 0xbd64, 0xbd67, 0xbd6a, 0xbd6d, 0xbd70, - 0xbd73, 0xbd76, 0xbd79, 0xbd7c, 0xbd7f, 0xbd82, 0xbd85, 0xbd88, - 0xbd8b, 0xbd8f, 0xbd92, 0xbd95, 0xbd98, 0xbd9b, 0xbd9e, 0xbda1, - 0xbda4, 0xbda7, 0xbdaa, 0xbdad, 0xbdb1, 0xbdb4, 0xbdb7, 0xbdba, - 0xbdbd, 0xbdc0, 0xbdc3, 0xbdc7, 0xbdca, 0xbdcd, 0xbdd0, 0xbdd3, - 0xbdd7, 0xbdda, 0xbddd, 0xbde0, 0xbde3, 0xbde7, 0xbdea, 0xbded, - 0xbdf0, 0xbdf4, 0xbdf7, 0xbdfa, 0xbdfe, 0xbe01, 0xbe04, 0xbe08, - 0xbe0b, 0xbe0e, 0xbe12, 0xbe15, 0xbe18, 0xbe1c, 0xbe1f, 0xbe22, - 0xbe26, 0xbe29, 0xbe2c, 0xbe30, 0xbe33, 0xbe37, 0xbe3a, 0xbe3e, - 0xbe41, 0xbe44, 0xbe48, 0xbe4b, 0xbe4f, 0xbe52, 0xbe56, 0xbe59, - 0xbe5d, 0xbe60, 0xbe64, 0xbe67, 0xbe6b, 0xbe6e, 0xbe72, 0xbe75, - 0xbe79, 0xbe7c, 0xbe80, 0xbe84, 0xbe87, 0xbe8b, 0xbe8e, 0xbe92, - 0xbe96, 0xbe99, 0xbe9d, 0xbea1, 0xbea4, 0xbea8, 0xbeac, 0xbeaf, - 0xbeb3, 0xbeb7, 0xbeba, 0xbebe, 0xbec2, 0xbec5, 0xbec9, 0xbecd, - 0xbed1, 0xbed4, 0xbed8, 0xbedc, 0xbee0, 0xbee3, 0xbee7, 0xbeeb, - 0xbeef, 0xbef3, 0xbef6, 0xbefa, 0xbefe, 0xbf02, 0xbf06, 0xbf0a, - 0xbf0e, 0xbf12, 0xbf15, 0xbf19, 0xbf1d, 0xbf21, 0xbf25, 0xbf29, - 0xbf2d, 0xbf31, 0xbf35, 0xbf39, 0xbf3d, 0xbf41, 0xbf45, 0xbf49, - 0xbf4d, 0xbf51, 0xbf55, 0xbf59, 0xbf5d, 0xbf61, 0xbf65, 0xbf69, - 0xbf6d, 0xbf71, 0xbf75, 0xbf79, 0xbf7e, 0xbf82, 0xbf86, 0xbf8a, - 0xbf8e, 0xbf92, 0xbf96, 0xbf9b, 0xbf9f, 0xbfa3, 0xbfa7, 0xbfab, - 0xbfb0, 0xbfb4, 0xbfb8, 0xbfbc, 0xbfc1, 0xbfc5, 0xbfc9, 0xbfcd, - 0xbfd2, 0xbfd6, 0xbfda, 0xbfdf, 0xbfe3, 0xbfe7, 0xbfec, 0xbff0, - 0xbff4, 0xbff9, 0xbffd, 0xc001, 0xc003, 0xc005, 0xc007, 0xc00a, - 0xc00c, 0xc00e, 0xc010, 0xc013, 0xc015, 0xc017, 0xc019, 0xc01c, - 0xc01e, 0xc020, 0xc022, 0xc025, 0xc027, 0xc029, 0xc02c, 0xc02e, - 0xc030, 0xc032, 0xc035, 0xc037, 0xc039, 0xc03c, 0xc03e, 0xc040, - 0xc043, 0xc045, 0xc047, 0xc04a, 0xc04c, 0xc04e, 0xc051, 0xc053, - 0xc056, 0xc058, 0xc05a, 0xc05d, 0xc05f, 0xc062, 0xc064, 0xc066, - 0xc069, 0xc06b, 0xc06e, 0xc070, 0xc073, 0xc075, 0xc077, 0xc07a, - 0xc07c, 0xc07f, 0xc081, 0xc084, 0xc086, 0xc089, 0xc08b, 0xc08e, - 0xc090, 0xc093, 0xc095, 0xc098, 0xc09a, 0xc09d, 0xc09f, 0xc0a2, - 0xc0a5, 0xc0a7, 0xc0aa, 0xc0ac, 0xc0af, 0xc0b1, 0xc0b4, 0xc0b7, - 0xc0b9, 0xc0bc, 0xc0be, 0xc0c1, 0xc0c4, 0xc0c6, 0xc0c9, 0xc0cc, - 0xc0ce, 0xc0d1, 0xc0d3, 0xc0d6, 0xc0d9, 0xc0db, 0xc0de, 0xc0e1, - 0xc0e3, 0xc0e6, 0xc0e9, 0xc0ec, 0xc0ee, 0xc0f1, 0xc0f4, 0xc0f6, - 0xc0f9, 0xc0fc, 0xc0ff, 0xc101, 0xc104, 0xc107, 0xc10a, 0xc10c, - 0xc10f, 0xc112, 0xc115, 0xc118, 0xc11a, 0xc11d, 0xc120, 0xc123, - 0xc126, 0xc129, 0xc12b, 0xc12e, 0xc131, 0xc134, 0xc137, 0xc13a, - 0xc13d, 0xc13f, 0xc142, 0xc145, 0xc148, 0xc14b, 0xc14e, 0xc151, - 0xc154, 0xc157, 0xc15a, 0xc15d, 0xc160, 0xc163, 0xc165, 0xc168, - 0xc16b, 0xc16e, 0xc171, 0xc174, 0xc177, 0xc17a, 0xc17d, 0xc180, - 0xc183, 0xc187, 0xc18a, 0xc18d, 0xc190, 0xc193, 0xc196, 0xc199, - 0xc19c, 0xc19f, 0xc1a2, 0xc1a5, 0xc1a8, 0xc1ab, 0xc1af, 0xc1b2, - 0xc1b5, 0xc1b8, 0xc1bb, 0xc1be, 0xc1c1, 0xc1c5, 0xc1c8, 0xc1cb, - 0xc1ce, 0xc1d1, 0xc1d5, 0xc1d8, 0xc1db, 0xc1de, 0xc1e1, 0xc1e5, - 0xc1e8, 0xc1eb, 0xc1ee, 0xc1f2, 0xc1f5, 0xc1f8, 0xc1fc, 0xc1ff, - 0xc202, 0xc205, 0xc209, 0xc20c, 0xc20f, 0xc213, 0xc216, 0xc219, - 0xc21d, 0xc220, 0xc224, 0xc227, 0xc22a, 0xc22e, 0xc231, 0xc235, - 0xc238, 0xc23b, 0xc23f, 0xc242, 0xc246, 0xc249, 0xc24d, 0xc250, - 0xc254, 0xc257, 0xc25a, 0xc25e, 0xc262, 0xc265, 0xc269, 0xc26c, - 0xc270, 0xc273, 0xc277, 0xc27a, 0xc27e, 0xc281, 0xc285, 0xc289, - 0xc28c, 0xc290, 0xc293, 0xc297, 0xc29b, 0xc29e, 0xc2a2, 0xc2a6, - 0xc2a9, 0xc2ad, 0xc2b1, 0xc2b4, 0xc2b8, 0xc2bc, 0xc2bf, 0xc2c3, - 0xc2c7, 0xc2cb, 0xc2ce, 0xc2d2, 0xc2d6, 0xc2da, 0xc2dd, 0xc2e1, - 0xc2e5, 0xc2e9, 0xc2ec, 0xc2f0, 0xc2f4, 0xc2f8, 0xc2fc, 0xc300, - 0xc303, 0xc307, 0xc30b, 0xc30f, 0xc313, 0xc317, 0xc31b, 0xc31f, - 0xc323, 0xc327, 0xc32a, 0xc32e, 0xc332, 0xc336, 0xc33a, 0xc33e, - 0xc342, 0xc346, 0xc34a, 0xc34e, 0xc352, 0xc356, 0xc35a, 0xc35e, - 0xc362, 0xc367, 0xc36b, 0xc36f, 0xc373, 0xc377, 0xc37b, 0xc37f, - 0xc383, 0xc387, 0xc38c, 0xc390, 0xc394, 0xc398, 0xc39c, 0xc3a0, - 0xc3a5, 0xc3a9, 0xc3ad, 0xc3b1, 0xc3b5, 0xc3ba, 0xc3be, 0xc3c2, - 0xc3c6, 0xc3cb, 0xc3cf, 0xc3d3, 0xc3d8, 0xc3dc, 0xc3e0, 0xc3e5, - 0xc3e9, 0xc3ed, 0xc3f2, 0xc3f6, 0xc3fa, 0xc3ff, 0xc402, 0xc404, - 0xc406, 0xc408, 0xc40a, 0xc40d, 0xc40f, 0xc411, 0xc413, 0xc416, - 0xc418, 0xc41a, 0xc41c, 0xc41f, 0xc421, 0xc423, 0xc426, 0xc428, - 0xc42a, 0xc42c, 0xc42f, 0xc431, 0xc433, 0xc436, 0xc438, 0xc43a, - 0xc43d, 0xc43f, 0xc441, 0xc444, 0xc446, 0xc448, 0xc44b, 0xc44d, - 0xc44f, 0xc452, 0xc454, 0xc456, 0xc459, 0xc45b, 0xc45e, 0xc460, - 0xc462, 0xc465, 0xc467, 0xc46a, 0xc46c, 0xc46f, 0xc471, 0xc473, - 0xc476, 0xc478, 0xc47b, 0xc47d, 0xc480, 0xc482, 0xc485, 0xc487, - 0xc48a, 0xc48c, 0xc48f, 0xc491, 0xc494, 0xc496, 0xc499, 0xc49b, - 0xc49e, 0xc4a0, 0xc4a3, 0xc4a6, 0xc4a8, 0xc4ab, 0xc4ad, 0xc4b0, - 0xc4b2, 0xc4b5, 0xc4b8, 0xc4ba, 0xc4bd, 0xc4bf, 0xc4c2, 0xc4c5, - 0xc4c7, 0xc4ca, 0xc4cc, 0xc4cf, 0xc4d2, 0xc4d4, 0xc4d7, 0xc4da, - 0xc4dc, 0xc4df, 0xc4e2, 0xc4e4, 0xc4e7, 0xc4ea, 0xc4ed, 0xc4ef, - 0xc4f2, 0xc4f5, 0xc4f7, 0xc4fa, 0xc4fd, 0xc500, 0xc502, 0xc505, - 0xc508, 0xc50b, 0xc50d, 0xc510, 0xc513, 0xc516, 0xc519, 0xc51b, - 0xc51e, 0xc521, 0xc524, 0xc527, 0xc52a, 0xc52c, 0xc52f, 0xc532, - 0xc535, 0xc538, 0xc53b, 0xc53e, 0xc540, 0xc543, 0xc546, 0xc549, - 0xc54c, 0xc54f, 0xc552, 0xc555, 0xc558, 0xc55b, 0xc55e, 0xc561, - 0xc564, 0xc567, 0xc56a, 0xc56d, 0xc570, 0xc573, 0xc576, 0xc579, - 0xc57c, 0xc57f, 0xc582, 0xc585, 0xc588, 0xc58b, 0xc58e, 0xc591, - 0xc594, 0xc597, 0xc59a, 0xc59d, 0xc5a0, 0xc5a3, 0xc5a6, 0xc5a9, - 0xc5ad, 0xc5b0, 0xc5b3, 0xc5b6, 0xc5b9, 0xc5bc, 0xc5bf, 0xc5c3, - 0xc5c6, 0xc5c9, 0xc5cc, 0xc5cf, 0xc5d3, 0xc5d6, 0xc5d9, 0xc5dc, - 0xc5df, 0xc5e3, 0xc5e6, 0xc5e9, 0xc5ec, 0xc5f0, 0xc5f3, 0xc5f6, - 0xc5f9, 0xc5fd, 0xc600, 0xc603, 0xc607, 0xc60a, 0xc60d, 0xc611, - 0xc614, 0xc617, 0xc61b, 0xc61e, 0xc621, 0xc625, 0xc628, 0xc62c, - 0xc62f, 0xc632, 0xc636, 0xc639, 0xc63d, 0xc640, 0xc643, 0xc647, - 0xc64a, 0xc64e, 0xc651, 0xc655, 0xc658, 0xc65c, 0xc65f, 0xc663, - 0xc666, 0xc66a, 0xc66d, 0xc671, 0xc674, 0xc678, 0xc67c, 0xc67f, - 0xc683, 0xc686, 0xc68a, 0xc68e, 0xc691, 0xc695, 0xc698, 0xc69c, - 0xc6a0, 0xc6a3, 0xc6a7, 0xc6ab, 0xc6ae, 0xc6b2, 0xc6b6, 0xc6b9, - 0xc6bd, 0xc6c1, 0xc6c4, 0xc6c8, 0xc6cc, 0xc6d0, 0xc6d3, 0xc6d7, - 0xc6db, 0xc6df, 0xc6e2, 0xc6e6, 0xc6ea, 0xc6ee, 0xc6f2, 0xc6f6, - 0xc6f9, 0xc6fd, 0xc701, 0xc705, 0xc709, 0xc70d, 0xc711, 0xc714, - 0xc718, 0xc71c, 0xc720, 0xc724, 0xc728, 0xc72c, 0xc730, 0xc734, - 0xc738, 0xc73c, 0xc740, 0xc744, 0xc748, 0xc74c, 0xc750, 0xc754, - 0xc758, 0xc75c, 0xc760, 0xc764, 0xc768, 0xc76c, 0xc770, 0xc774, - 0xc778, 0xc77d, 0xc781, 0xc785, 0xc789, 0xc78d, 0xc791, 0xc795, - 0xc79a, 0xc79e, 0xc7a2, 0xc7a6, 0xc7aa, 0xc7af, 0xc7b3, 0xc7b7, - 0xc7bb, 0xc7c0, 0xc7c4, 0xc7c8, 0xc7cc, 0xc7d1, 0xc7d5, 0xc7d9, - 0xc7de, 0xc7e2, 0xc7e6, 0xc7eb, 0xc7ef, 0xc7f3, 0xc7f8, 0xc7fc, - 0xc800, 0xc802, 0xc805, 0xc807, 0xc809, 0xc80b, 0xc80e, 0xc810, - 0xc812, 0xc814, 0xc816, 0xc819, 0xc81b, 0xc81d, 0xc820, 0xc822, - 0xc824, 0xc826, 0xc829, 0xc82b, 0xc82d, 0xc830, 0xc832, 0xc834, - 0xc836, 0xc839, 0xc83b, 0xc83d, 0xc840, 0xc842, 0xc844, 0xc847, - 0xc849, 0xc84c, 0xc84e, 0xc850, 0xc853, 0xc855, 0xc857, 0xc85a, - 0xc85c, 0xc85f, 0xc861, 0xc863, 0xc866, 0xc868, 0xc86b, 0xc86d, - 0xc870, 0xc872, 0xc874, 0xc877, 0xc879, 0xc87c, 0xc87e, 0xc881, - 0xc883, 0xc888, 0xc88d, 0xc892, 0xc897, 0xc89c, 0xc8a1, 0xc8a6, - 0xc8ac, 0xc8b1, 0xc8b6, 0xc8bb, 0xc8c0, 0xc8c6, 0xc8cb, 0xc8d0, - 0xc8d5, 0xc8db, 0xc8e0, 0xc8e5, 0xc8eb, 0xc8f0, 0xc8f6, 0xc8fb, - 0xc901, 0xc906, 0xc90c, 0xc911, 0xc917, 0xc91d, 0xc922, 0xc928, - 0xc92d, 0xc933, 0xc939, 0xc93f, 0xc944, 0xc94a, 0xc950, 0xc956, - 0xc95c, 0xc962, 0xc968, 0xc96e, 0xc974, 0xc97a, 0xc980, 0xc986, - 0xc98c, 0xc992, 0xc998, 0xc99e, 0xc9a4, 0xc9ab, 0xc9b1, 0xc9b7, - 0xc9bd, 0xc9c4, 0xc9ca, 0xc9d1, 0xc9d7, 0xc9dd, 0xc9e4, 0xc9ea, - 0xc9f1, 0xc9f7, 0xc9fe, 0xca05, 0xca0b, 0xca12, 0xca19, 0xca1f, - 0xca26, 0xca2d, 0xca34, 0xca3a, 0xca41, 0xca48, 0xca4f, 0xca56, - 0xca5d, 0xca64, 0xca6b, 0xca72, 0xca79, 0xca80, 0xca88, 0xca8f, - 0xca96, 0xca9d, 0xcaa5, 0xcaac, 0xcab3, 0xcabb, 0xcac2, 0xcaca, - 0xcad1, 0xcad9, 0xcae0, 0xcae8, 0xcaef, 0xcaf7, 0xcaff, 0xcb06, - 0xcb0e, 0xcb16, 0xcb1e, 0xcb25, 0xcb2d, 0xcb35, 0xcb3d, 0xcb45, - 0xcb4d, 0xcb55, 0xcb5d, 0xcb65, 0xcb6e, 0xcb76, 0xcb7e, 0xcb86, - 0xcb8f, 0xcb97, 0xcb9f, 0xcba8, 0xcbb0, 0xcbb9, 0xcbc1, 0xcbca, - 0xcbd2, 0xcbdb, 0xcbe4, 0xcbec, 0xcbf5, 0xcbfe, 0xcc03, 0xcc08, - 0xcc0c, 0xcc11, 0xcc15, 0xcc1a, 0xcc1e, 0xcc23, 0xcc27, 0xcc2c, - 0xcc30, 0xcc35, 0xcc3a, 0xcc3e, 0xcc43, 0xcc48, 0xcc4c, 0xcc51, - 0xcc56, 0xcc5b, 0xcc5f, 0xcc64, 0xcc69, 0xcc6e, 0xcc73, 0xcc78, - 0xcc7d, 0xcc82, 0xcc87, 0xcc8c, 0xcc91, 0xcc96, 0xcc9b, 0xcca0, - 0xcca5, 0xccaa, 0xccaf, 0xccb4, 0xccb9, 0xccbf, 0xccc4, 0xccc9, - 0xccce, 0xccd4, 0xccd9, 0xccde, 0xcce4, 0xcce9, 0xccef, 0xccf4, - 0xccf9, 0xccff, 0xcd04, 0xcd0a, 0xcd10, 0xcd15, 0xcd1b, 0xcd20, - 0xcd26, 0xcd2c, 0xcd31, 0xcd37, 0xcd3d, 0xcd43, 0xcd48, 0xcd4e, - 0xcd54, 0xcd5a, 0xcd60, 0xcd66, 0xcd6c, 0xcd72, 0xcd78, 0xcd7e, - 0xcd84, 0xcd8a, 0xcd90, 0xcd96, 0xcd9c, 0xcda2, 0xcda9, 0xcdaf, - 0xcdb5, 0xcdbb, 0xcdc2, 0xcdc8, 0xcdcf, 0xcdd5, 0xcddb, 0xcde2, - 0xcde8, 0xcdef, 0xcdf5, 0xcdfc, 0xce03, 0xce09, 0xce10, 0xce16, - 0xce1d, 0xce24, 0xce2b, 0xce31, 0xce38, 0xce3f, 0xce46, 0xce4d, - 0xce54, 0xce5b, 0xce62, 0xce69, 0xce70, 0xce77, 0xce7e, 0xce85, - 0xce8d, 0xce94, 0xce9b, 0xcea2, 0xceaa, 0xceb1, 0xceb8, 0xcec0, - 0xcec7, 0xcecf, 0xced6, 0xcede, 0xcee5, 0xceed, 0xcef5, 0xcefc, - 0xcf04, 0xcf0c, 0xcf13, 0xcf1b, 0xcf23, 0xcf2b, 0xcf33, 0xcf3b, - 0xcf43, 0xcf4b, 0xcf53, 0xcf5b, 0xcf63, 0xcf6b, 0xcf73, 0xcf7b, - 0xcf84, 0xcf8c, 0xcf94, 0xcf9d, 0xcfa5, 0xcfad, 0xcfb6, 0xcfbe, - 0xcfc7, 0xcfd0, 0xcfd8, 0xcfe1, 0xcfe9, 0xcff2, 0xcffb, 0xd002, - 0xd006, 0xd00b, 0xd00f, 0xd014, 0xd018, 0xd01d, 0xd021, 0xd026, - 0xd02a, 0xd02f, 0xd034, 0xd038, 0xd03d, 0xd041, 0xd046, 0xd04b, - 0xd050, 0xd054, 0xd059, 0xd05e, 0xd063, 0xd068, 0xd06c, 0xd071, - 0xd076, 0xd07b, 0xd080, 0xd085, 0xd08a, 0xd08f, 0xd094, 0xd099, - 0xd09e, 0xd0a3, 0xd0a8, 0xd0ae, 0xd0b3, 0xd0b8, 0xd0bd, 0xd0c2, - 0xd0c8, 0xd0cd, 0xd0d2, 0xd0d7, 0xd0dd, 0xd0e2, 0xd0e7, 0xd0ed, - 0xd0f2, 0xd0f8, 0xd0fd, 0xd103, 0xd108, 0xd10e, 0xd113, 0xd119, - 0xd11f, 0xd124, 0xd12a, 0xd130, 0xd135, 0xd13b, 0xd141, 0xd147, - 0xd14c, 0xd152, 0xd158, 0xd15e, 0xd164, 0xd16a, 0xd170, 0xd176, - 0xd17c, 0xd182, 0xd188, 0xd18e, 0xd194, 0xd19a, 0xd1a1, 0xd1a7, - 0xd1ad, 0xd1b3, 0xd1ba, 0xd1c0, 0xd1c6, 0xd1cd, 0xd1d3, 0xd1d9, - 0xd1e0, 0xd1e6, 0xd1ed, 0xd1f3, 0xd1fa, 0xd200, 0xd207, 0xd20e, - 0xd214, 0xd21b, 0xd222, 0xd229, 0xd22f, 0xd236, 0xd23d, 0xd244, - 0xd24b, 0xd252, 0xd259, 0xd260, 0xd267, 0xd26e, 0xd275, 0xd27c, - 0xd283, 0xd28a, 0xd292, 0xd299, 0xd2a0, 0xd2a7, 0xd2af, 0xd2b6, - 0xd2bd, 0xd2c5, 0xd2cc, 0xd2d4, 0xd2db, 0xd2e3, 0xd2ea, 0xd2f2, - 0xd2fa, 0xd301, 0xd309, 0xd311, 0xd319, 0xd321, 0xd328, 0xd330, - 0xd338, 0xd340, 0xd348, 0xd350, 0xd358, 0xd360, 0xd369, 0xd371, - 0xd379, 0xd381, 0xd389, 0xd392, 0xd39a, 0xd3a2, 0xd3ab, 0xd3b3, - 0xd3bc, 0xd3c4, 0xd3cd, 0xd3d5, 0xd3de, 0xd3e7, 0xd3ef, 0xd3f8, - 0xd401, 0xd405, 0xd409, 0xd40e, 0xd412, 0xd417, 0xd41b, 0xd420, - 0xd424, 0xd429, 0xd42d, 0xd432, 0xd437, 0xd43b, 0xd440, 0xd445, - 0xd449, 0xd44e, 0xd453, 0xd458, 0xd45c, 0xd461, 0xd466, 0xd46b, - 0xd470, 0xd475, 0xd47a, 0xd47f, 0xd483, 0xd488, 0xd48d, 0xd492, - 0xd498, 0xd49d, 0xd4a2, 0xd4a7, 0xd4ac, 0xd4b1, 0xd4b6, 0xd4bb, - 0xd4c1, 0xd4c6, 0xd4cb, 0xd4d0, 0xd4d6, 0xd4db, 0xd4e0, 0xd4e6, - 0xd4eb, 0xd4f1, 0xd4f6, 0xd4fc, 0xd501, 0xd507, 0xd50c, 0xd512, - 0xd517, 0xd51d, 0xd522, 0xd528, 0xd52e, 0xd534, 0xd539, 0xd53f, - 0xd545, 0xd54b, 0xd550, 0xd556, 0xd55c, 0xd562, 0xd568, 0xd56e, - 0xd574, 0xd57a, 0xd580, 0xd586, 0xd58c, 0xd592, 0xd598, 0xd59f, - 0xd5a5, 0xd5ab, 0xd5b1, 0xd5b8, 0xd5be, 0xd5c4, 0xd5cb, 0xd5d1, - 0xd5d7, 0xd5de, 0xd5e4, 0xd5eb, 0xd5f1, 0xd5f8, 0xd5fe, 0xd605, - 0xd60c, 0xd612, 0xd619, 0xd620, 0xd626, 0xd62d, 0xd634, 0xd63b, - 0xd642, 0xd649, 0xd650, 0xd657, 0xd65d, 0xd665, 0xd66c, 0xd673, - 0xd67a, 0xd681, 0xd688, 0xd68f, 0xd696, 0xd69e, 0xd6a5, 0xd6ac, - 0xd6b4, 0xd6bb, 0xd6c3, 0xd6ca, 0xd6d1, 0xd6d9, 0xd6e1, 0xd6e8, - 0xd6f0, 0xd6f7, 0xd6ff, 0xd707, 0xd70f, 0xd716, 0xd71e, 0xd726, - 0xd72e, 0xd736, 0xd73e, 0xd746, 0xd74e, 0xd756, 0xd75e, 0xd766, - 0xd76e, 0xd776, 0xd77f, 0xd787, 0xd78f, 0xd797, 0xd7a0, 0xd7a8, - 0xd7b1, 0xd7b9, 0xd7c2, 0xd7ca, 0xd7d3, 0xd7db, 0xd7e4, 0xd7ed, - 0xd7f5, 0xd7fe, 0xd804, 0xd808, 0xd80c, 0xd811, 0xd815, 0xd81a, - 0xd81e, 0xd823, 0xd827, 0xd82c, 0xd831, 0xd835, 0xd83a, 0xd83f, - 0xd843, 0xd848, 0xd84d, 0xd851, 0xd856, 0xd85b, 0xd860, 0xd865, - 0xd869, 0xd86e, 0xd873, 0xd878, 0xd87d, 0xd882, 0xd887, 0xd88c, - 0xd891, 0xd896, 0xd89b, 0xd8a0, 0xd8a5, 0xd8aa, 0xd8af, 0xd8b5, - 0xd8ba, 0xd8bf, 0xd8c4, 0xd8c9, 0xd8cf, 0xd8d4, 0xd8d9, 0xd8df, - 0xd8e4, 0xd8e9, 0xd8ef, 0xd8f4, 0xd8fa, 0xd8ff, 0xd905, 0xd90a, - 0xd910, 0xd915, 0xd91b, 0xd921, 0xd926, 0xd92c, 0xd932, 0xd937, - 0xd93d, 0xd943, 0xd949, 0xd94f, 0xd954, 0xd95a, 0xd960, 0xd966, - 0xd96c, 0xd972, 0xd978, 0xd97e, 0xd984, 0xd98a, 0xd990, 0xd996, - 0xd99d, 0xd9a3, 0xd9a9, 0xd9af, 0xd9b6, 0xd9bc, 0xd9c2, 0xd9c9, - 0xd9cf, 0xd9d5, 0xd9dc, 0xd9e2, 0xd9e9, 0xd9ef, 0xd9f6, 0xd9fc, - 0xda03, 0xda0a, 0xda10, 0xda17, 0xda1e, 0xda24, 0xda2b, 0xda32, - 0xda39, 0xda40, 0xda46, 0xda4d, 0xda54, 0xda5b, 0xda62, 0xda69, - 0xda70, 0xda78, 0xda7f, 0xda86, 0xda8d, 0xda94, 0xda9b, 0xdaa3, - 0xdaaa, 0xdab1, 0xdab9, 0xdac0, 0xdac8, 0xdacf, 0xdad7, 0xdade, - 0xdae6, 0xdaed, 0xdaf5, 0xdafd, 0xdb04, 0xdb0c, 0xdb14, 0xdb1c, - 0xdb23, 0xdb2b, 0xdb33, 0xdb3b, 0xdb43, 0xdb4b, 0xdb53, 0xdb5b, - 0xdb63, 0xdb6c, 0xdb74, 0xdb7c, 0xdb84, 0xdb8c, 0xdb95, 0xdb9d, - 0xdba6, 0xdbae, 0xdbb6, 0xdbbf, 0xdbc7, 0xdbd0, 0xdbd9, 0xdbe1, - 0xdbea, 0xdbf3, 0xdbfb, 0xdc02, 0xdc07, 0xdc0b, 0xdc0f, 0xdc14, - 0xdc18, 0xdc1d, 0xdc21, 0xdc26, 0xdc2b, 0xdc2f, 0xdc34, 0xdc38, - 0xdc3d, 0xdc42, 0xdc46, 0xdc4b, 0xdc50, 0xdc55, 0xdc59, 0xdc5e, - 0xdc63, 0xdc68, 0xdc6d, 0xdc72, 0xdc77, 0xdc7b, 0xdc80, 0xdc85, - 0xdc8a, 0xdc8f, 0xdc94, 0xdc99, 0xdc9e, 0xdca4, 0xdca9, 0xdcae, - 0xdcb3, 0xdcb8, 0xdcbd, 0xdcc3, 0xdcc8, 0xdccd, 0xdcd2, 0xdcd8, - 0xdcdd, 0xdce2, 0xdce8, 0xdced, 0xdcf3, 0xdcf8, 0xdcfe, 0xdd03, - 0xdd09, 0xdd0e, 0xdd14, 0xdd19, 0xdd1f, 0xdd25, 0xdd2a, 0xdd30, - 0xdd36, 0xdd3b, 0xdd41, 0xdd47, 0xdd4d, 0xdd53, 0xdd58, 0xdd5e, - 0xdd64, 0xdd6a, 0xdd70, 0xdd76, 0xdd7c, 0xdd82, 0xdd88, 0xdd8e, - 0xdd95, 0xdd9b, 0xdda1, 0xdda7, 0xddad, 0xddb4, 0xddba, 0xddc0, - 0xddc7, 0xddcd, 0xddd3, 0xddda, 0xdde0, 0xdde7, 0xdded, 0xddf4, - 0xddfa, 0xde01, 0xde07, 0xde0e, 0xde15, 0xde1b, 0xde22, 0xde29, - 0xde30, 0xde37, 0xde3d, 0xde44, 0xde4b, 0xde52, 0xde59, 0xde60, - 0xde67, 0xde6e, 0xde75, 0xde7c, 0xde84, 0xde8b, 0xde92, 0xde99, - 0xdea0, 0xdea8, 0xdeaf, 0xdeb6, 0xdebe, 0xdec5, 0xdecd, 0xded4, - 0xdedc, 0xdee3, 0xdeeb, 0xdef3, 0xdefa, 0xdf02, 0xdf0a, 0xdf11, - 0xdf19, 0xdf21, 0xdf29, 0xdf31, 0xdf39, 0xdf41, 0xdf49, 0xdf51, - 0xdf59, 0xdf61, 0xdf69, 0xdf71, 0xdf79, 0xdf82, 0xdf8a, 0xdf92, - 0xdf9b, 0xdfa3, 0xdfab, 0xdfb4, 0xdfbc, 0xdfc5, 0xdfcd, 0xdfd6, - 0xdfdf, 0xdfe7, 0xdff0, 0xdff9, 0xe001, 0xe005, 0xe00a, 0xe00e, - 0xe013, 0xe017, 0xe01c, 0xe020, 0xe025, 0xe029, 0xe02e, 0xe032, - 0xe037, 0xe03c, 0xe040, 0xe045, 0xe04a, 0xe04e, 0xe053, 0xe058, - 0xe05d, 0xe062, 0xe066, 0xe06b, 0xe070, 0xe075, 0xe07a, 0xe07f, - 0xe084, 0xe089, 0xe08e, 0xe093, 0xe098, 0xe09d, 0xe0a2, 0xe0a7, - 0xe0ac, 0xe0b1, 0xe0b7, 0xe0bc, 0xe0c1, 0xe0c6, 0xe0cb, 0xe0d1, - 0xe0d6, 0xe0db, 0xe0e1, 0xe0e6, 0xe0eb, 0xe0f1, 0xe0f6, 0xe0fc, - 0xe101, 0xe107, 0xe10c, 0xe112, 0xe118, 0xe11d, 0xe123, 0xe128, - 0xe12e, 0xe134, 0xe13a, 0xe13f, 0xe145, 0xe14b, 0xe151, 0xe157, - 0xe15d, 0xe162, 0xe168, 0xe16e, 0xe174, 0xe17a, 0xe180, 0xe186, - 0xe18d, 0xe193, 0xe199, 0xe19f, 0xe1a5, 0xe1ab, 0xe1b2, 0xe1b8, - 0xe1be, 0xe1cb, 0xe1d8, 0xe1e5, 0xe1f2, 0xe1ff, 0xe20c, 0xe219, - 0xe227, 0xe234, 0xe242, 0xe250, 0xe25e, 0xe26c, 0xe27a, 0xe288, - 0xe297, 0xe2a5, 0xe2b4, 0xe2c3, 0xe2d2, 0xe2e1, 0xe2f0, 0xe2ff, - 0xe30f, 0xe31f, 0xe32e, 0xe33e, 0xe34e, 0xe35e, 0xe36f, 0xe37f, - 0xe390, 0xe3a0, 0xe3b1, 0xe3c2, 0xe3d3, 0xe3e5, 0xe3f6, 0xe404, - 0xe40d, 0xe416, 0xe41f, 0xe428, 0xe431, 0xe43a, 0xe444, 0xe44d, - 0xe456, 0xe460, 0xe46a, 0xe473, 0xe47d, 0xe487, 0xe491, 0xe49b, - 0xe4a5, 0xe4b0, 0xe4ba, 0xe4c5, 0xe4cf, 0xe4da, 0xe4e4, 0xe4ef, - 0xe4fa, 0xe505, 0xe510, 0xe51b, 0xe527, 0xe532, 0xe53e, 0xe549, - 0xe555, 0xe561, 0xe56c, 0xe578, 0xe585, 0xe591, 0xe59d, 0xe5a9, - 0xe5b6, 0xe5c3, 0xe5cf, 0xe5dc, 0xe5e9, 0xe5f6, 0xe603, 0xe611, - 0xe61e, 0xe62b, 0xe639, 0xe647, 0xe655, 0xe663, 0xe671, 0xe67f, - 0xe68d, 0xe69c, 0xe6aa, 0xe6b9, 0xe6c8, 0xe6d7, 0xe6e6, 0xe6f5, - 0xe705, 0xe714, 0xe724, 0xe734, 0xe744, 0xe754, 0xe764, 0xe774, - 0xe785, 0xe795, 0xe7a6, 0xe7b7, 0xe7c8, 0xe7d9, 0xe7ea, 0xe7fc, - 0xe807, 0xe810, 0xe819, 0xe822, 0xe82b, 0xe834, 0xe83d, 0xe847, - 0xe850, 0xe85a, 0xe863, 0xe86d, 0xe877, 0xe881, 0xe88b, 0xe895, - 0xe89f, 0xe8a9, 0xe8b3, 0xe8be, 0xe8c8, 0xe8d3, 0xe8dd, 0xe8e8, - 0xe8f3, 0xe8fe, 0xe909, 0xe914, 0xe91f, 0xe92b, 0xe936, 0xe941, - 0xe94d, 0xe959, 0xe965, 0xe971, 0xe97d, 0xe989, 0xe995, 0xe9a1, - 0xe9ae, 0xe9ba, 0xe9c7, 0xe9d4, 0xe9e1, 0xe9ee, 0xe9fb, 0xea08, - 0xea15, 0xea23, 0xea30, 0xea3e, 0xea4c, 0xea5a, 0xea68, 0xea76, - 0xea84, 0xea92, 0xeaa1, 0xeab0, 0xeabe, 0xeacd, 0xeadc, 0xeaeb, - 0xeafb, 0xeb0a, 0xeb1a, 0xeb29, 0xeb39, 0xeb49, 0xeb59, 0xeb69, - 0xeb7a, 0xeb8a, 0xeb9b, 0xebac, 0xebbd, 0xebce, 0xebdf, 0xebf0, - 0xec01, 0xec0a, 0xec13, 0xec1c, 0xec25, 0xec2e, 0xec37, 0xec41, - 0xec4a, 0xec53, 0xec5d, 0xec67, 0xec70, 0xec7a, 0xec84, 0xec8e, - 0xec98, 0xeca2, 0xecac, 0xecb7, 0xecc1, 0xeccc, 0xecd6, 0xece1, - 0xecec, 0xecf7, 0xed02, 0xed0d, 0xed18, 0xed23, 0xed2e, 0xed3a, - 0xed45, 0xed51, 0xed5d, 0xed69, 0xed75, 0xed81, 0xed8d, 0xed99, - 0xeda5, 0xedb2, 0xedbf, 0xedcb, 0xedd8, 0xede5, 0xedf2, 0xedff, - 0xee0c, 0xee1a, 0xee27, 0xee35, 0xee43, 0xee50, 0xee5e, 0xee6c, - 0xee7b, 0xee89, 0xee97, 0xeea6, 0xeeb5, 0xeec3, 0xeed2, 0xeee1, - 0xeef1, 0xef00, 0xef0f, 0xef1f, 0xef2f, 0xef3f, 0xef4f, 0xef5f, - 0xef6f, 0xef7f, 0xef90, 0xefa1, 0xefb2, 0xefc3, 0xefd4, 0xefe5, - 0xeff6, 0xf004, 0xf00d, 0xf016, 0xf01f, 0xf028, 0xf031, 0xf03a, - 0xf044, 0xf04d, 0xf057, 0xf060, 0xf06a, 0xf074, 0xf07e, 0xf087, - 0xf091, 0xf09c, 0xf0a6, 0xf0b0, 0xf0ba, 0xf0c5, 0xf0cf, 0xf0da, - 0xf0e5, 0xf0f0, 0xf0fa, 0xf105, 0xf111, 0xf11c, 0xf127, 0xf132, - 0xf13e, 0xf149, 0xf155, 0xf161, 0xf16d, 0xf179, 0xf185, 0xf191, - 0xf19d, 0xf1aa, 0xf1b6, 0xf1c3, 0xf1d0, 0xf1dc, 0xf1e9, 0xf1f6, - 0xf204, 0xf211, 0xf21e, 0xf22c, 0xf239, 0xf247, 0xf255, 0xf263, - 0xf271, 0xf27f, 0xf28e, 0xf29c, 0xf2ab, 0xf2ba, 0xf2c8, 0xf2d7, - 0xf2e7, 0xf2f6, 0xf305, 0xf315, 0xf324, 0xf334, 0xf344, 0xf354, - 0xf364, 0xf375, 0xf385, 0xf396, 0xf3a6, 0xf3b7, 0xf3c8, 0xf3da, - 0xf3eb, 0xf3fc, 0xf407, 0xf410, 0xf419, 0xf422, 0xf42b, 0xf434, - 0xf43e, 0xf447, 0xf450, 0xf45a, 0xf464, 0xf46d, 0xf477, 0xf481, - 0xf48b, 0xf495, 0xf49f, 0xf4a9, 0xf4b4, 0xf4be, 0xf4c8, 0xf4d3, - 0xf4de, 0xf4e8, 0xf4f3, 0xf4fe, 0xf509, 0xf514, 0xf520, 0xf52b, - 0xf536, 0xf542, 0xf54d, 0xf559, 0xf565, 0xf571, 0xf57d, 0xf589, - 0xf595, 0xf5a2, 0xf5ae, 0xf5bb, 0xf5c7, 0xf5d4, 0xf5e1, 0xf5ee, - 0xf5fb, 0xf608, 0xf616, 0xf623, 0xf631, 0xf63e, 0xf64c, 0xf65a, - 0xf668, 0xf676, 0xf684, 0xf693, 0xf6a1, 0xf6b0, 0xf6bf, 0xf6ce, - 0xf6dd, 0xf6ec, 0xf6fb, 0xf70b, 0xf71a, 0xf72a, 0xf73a, 0xf74a, - 0xf75a, 0xf76a, 0xf77a, 0xf78b, 0xf79b, 0xf7ac, 0xf7bd, 0xf7ce, - 0xf7e0, 0xf7f1, 0xf801, 0xf80a, 0xf813, 0xf81c, 0xf825, 0xf82e, - 0xf838, 0xf841, 0xf84a, 0xf854, 0xf85d, 0xf867, 0xf871, 0xf87a, - 0xf884, 0xf88e, 0xf898, 0xf8a3, 0xf8ad, 0xf8b7, 0xf8c2, 0xf8cc, - 0xf8d7, 0xf8e1, 0xf8ec, 0xf8f7, 0xf902, 0xf90d, 0xf918, 0xf923, - 0xf92f, 0xf93a, 0xf946, 0xf951, 0xf95d, 0xf969, 0xf975, 0xf981, - 0xf98d, 0xf999, 0xf9a6, 0xf9b2, 0xf9bf, 0xf9cc, 0xf9d8, 0xf9e5, - 0xf9f2, 0xf9ff, 0xfa0d, 0xfa1a, 0xfa28, 0xfa35, 0xfa43, 0xfa51, - 0xfa5f, 0xfa6d, 0xfa7b, 0xfa89, 0xfa98, 0xfaa6, 0xfab5, 0xfac4, - 0xfad3, 0xfae2, 0xfaf1, 0xfb00, 0xfb10, 0xfb1f, 0xfb2f, 0xfb3f, - 0xfb4f, 0xfb5f, 0xfb70, 0xfb80, 0xfb91, 0xfba1, 0xfbb2, 0xfbc3, - 0xfbd4, 0xfbe6, 0xfbf7, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -}; - - - -const unsigned short dwaCompressorToNonlinear[] = -{ - 0x0000, 0x1043, 0x11d7, 0x1305, 0x1400, 0x146d, 0x14cf, 0x1529, - 0x157b, 0x15c8, 0x1611, 0x1656, 0x1697, 0x16d6, 0x1712, 0x174b, - 0x1783, 0x17b9, 0x17ed, 0x1810, 0x1828, 0x1840, 0x1857, 0x186e, - 0x1884, 0x189a, 0x18af, 0x18c4, 0x18d8, 0x18ec, 0x18ff, 0x1913, - 0x1926, 0x1938, 0x194a, 0x195c, 0x196e, 0x197f, 0x1991, 0x19a2, - 0x19b2, 0x19c3, 0x19d3, 0x19e3, 0x19f3, 0x1a02, 0x1a12, 0x1a21, - 0x1a30, 0x1a3f, 0x1a4e, 0x1a5c, 0x1a6b, 0x1a79, 0x1a87, 0x1a95, - 0x1aa3, 0x1ab1, 0x1abe, 0x1acc, 0x1ad9, 0x1ae7, 0x1af4, 0x1b01, - 0x1b0d, 0x1b1a, 0x1b27, 0x1b33, 0x1b40, 0x1b4c, 0x1b59, 0x1b65, - 0x1b71, 0x1b7d, 0x1b89, 0x1b94, 0x1ba0, 0x1bac, 0x1bb7, 0x1bc3, - 0x1bce, 0x1bda, 0x1be5, 0x1bf0, 0x1bfb, 0x1c03, 0x1c09, 0x1c0e, - 0x1c13, 0x1c19, 0x1c1e, 0x1c23, 0x1c29, 0x1c2e, 0x1c33, 0x1c38, - 0x1c3d, 0x1c43, 0x1c48, 0x1c4d, 0x1c52, 0x1c57, 0x1c5c, 0x1c61, - 0x1c66, 0x1c6b, 0x1c6f, 0x1c74, 0x1c79, 0x1c7e, 0x1c83, 0x1c87, - 0x1c8c, 0x1c91, 0x1c96, 0x1c9a, 0x1c9f, 0x1ca4, 0x1ca8, 0x1cad, - 0x1cb1, 0x1cb6, 0x1cba, 0x1cbf, 0x1cc3, 0x1cc8, 0x1ccc, 0x1cd1, - 0x1cd5, 0x1cd9, 0x1cde, 0x1ce2, 0x1ce7, 0x1ceb, 0x1cef, 0x1cf3, - 0x1cf8, 0x1cfc, 0x1d00, 0x1d04, 0x1d09, 0x1d0d, 0x1d11, 0x1d15, - 0x1d19, 0x1d1d, 0x1d21, 0x1d25, 0x1d29, 0x1d2e, 0x1d32, 0x1d36, - 0x1d3a, 0x1d3e, 0x1d42, 0x1d46, 0x1d49, 0x1d4d, 0x1d51, 0x1d55, - 0x1d59, 0x1d5d, 0x1d61, 0x1d65, 0x1d69, 0x1d6c, 0x1d70, 0x1d74, - 0x1d78, 0x1d7c, 0x1d7f, 0x1d83, 0x1d87, 0x1d8b, 0x1d8e, 0x1d92, - 0x1d96, 0x1d99, 0x1d9d, 0x1da1, 0x1da4, 0x1da8, 0x1dac, 0x1daf, - 0x1db3, 0x1db7, 0x1dba, 0x1dbe, 0x1dc1, 0x1dc5, 0x1dc8, 0x1dcc, - 0x1dcf, 0x1dd3, 0x1dd6, 0x1dda, 0x1ddd, 0x1de1, 0x1de4, 0x1de8, - 0x1deb, 0x1def, 0x1df2, 0x1df6, 0x1df9, 0x1dfc, 0x1e00, 0x1e03, - 0x1e07, 0x1e0a, 0x1e0d, 0x1e11, 0x1e14, 0x1e17, 0x1e1b, 0x1e1e, - 0x1e21, 0x1e25, 0x1e28, 0x1e2b, 0x1e2e, 0x1e32, 0x1e35, 0x1e38, - 0x1e3b, 0x1e3f, 0x1e42, 0x1e45, 0x1e48, 0x1e4b, 0x1e4f, 0x1e52, - 0x1e55, 0x1e58, 0x1e5b, 0x1e5f, 0x1e62, 0x1e65, 0x1e68, 0x1e6b, - 0x1e6e, 0x1e71, 0x1e74, 0x1e78, 0x1e7b, 0x1e7e, 0x1e81, 0x1e84, - 0x1e87, 0x1e8a, 0x1e8d, 0x1e90, 0x1e93, 0x1e96, 0x1e99, 0x1e9c, - 0x1e9f, 0x1ea2, 0x1ea5, 0x1ea8, 0x1eab, 0x1eae, 0x1eb1, 0x1eb4, - 0x1eb7, 0x1eba, 0x1ebd, 0x1ec0, 0x1ec3, 0x1ec6, 0x1ec9, 0x1ecc, - 0x1ecf, 0x1ed2, 0x1ed4, 0x1ed7, 0x1eda, 0x1edd, 0x1ee0, 0x1ee3, - 0x1ee6, 0x1ee9, 0x1eeb, 0x1eee, 0x1ef1, 0x1ef4, 0x1ef7, 0x1efa, - 0x1efc, 0x1eff, 0x1f02, 0x1f05, 0x1f08, 0x1f0b, 0x1f0d, 0x1f10, - 0x1f13, 0x1f16, 0x1f18, 0x1f1b, 0x1f1e, 0x1f21, 0x1f23, 0x1f26, - 0x1f29, 0x1f2c, 0x1f2e, 0x1f31, 0x1f34, 0x1f37, 0x1f39, 0x1f3c, - 0x1f3f, 0x1f41, 0x1f44, 0x1f47, 0x1f4a, 0x1f4c, 0x1f4f, 0x1f52, - 0x1f54, 0x1f57, 0x1f5a, 0x1f5c, 0x1f5f, 0x1f61, 0x1f64, 0x1f67, - 0x1f69, 0x1f6c, 0x1f6f, 0x1f71, 0x1f74, 0x1f76, 0x1f79, 0x1f7c, - 0x1f7e, 0x1f81, 0x1f83, 0x1f86, 0x1f89, 0x1f8b, 0x1f8e, 0x1f90, - 0x1f93, 0x1f95, 0x1f98, 0x1f9b, 0x1f9d, 0x1fa0, 0x1fa2, 0x1fa5, - 0x1fa7, 0x1faa, 0x1fac, 0x1faf, 0x1fb1, 0x1fb4, 0x1fb6, 0x1fb9, - 0x1fbb, 0x1fbe, 0x1fc0, 0x1fc3, 0x1fc5, 0x1fc8, 0x1fca, 0x1fcd, - 0x1fcf, 0x1fd2, 0x1fd4, 0x1fd7, 0x1fd9, 0x1fdc, 0x1fde, 0x1fe0, - 0x1fe3, 0x1fe5, 0x1fe8, 0x1fea, 0x1fed, 0x1fef, 0x1ff1, 0x1ff4, - 0x1ff6, 0x1ff9, 0x1ffb, 0x1ffe, 0x2000, 0x2001, 0x2002, 0x2004, - 0x2005, 0x2006, 0x2007, 0x2008, 0x200a, 0x200b, 0x200c, 0x200d, - 0x200e, 0x200f, 0x2011, 0x2012, 0x2013, 0x2014, 0x2015, 0x2016, - 0x2018, 0x2019, 0x201a, 0x201b, 0x201c, 0x201d, 0x201f, 0x2020, - 0x2021, 0x2022, 0x2023, 0x2024, 0x2026, 0x2027, 0x2028, 0x2029, - 0x202a, 0x202b, 0x202c, 0x202e, 0x202f, 0x2030, 0x2031, 0x2032, - 0x2033, 0x2034, 0x2035, 0x2037, 0x2038, 0x2039, 0x203a, 0x203b, - 0x203c, 0x203d, 0x203e, 0x2040, 0x2041, 0x2042, 0x2043, 0x2044, - 0x2045, 0x2046, 0x2047, 0x2048, 0x204a, 0x204b, 0x204c, 0x204d, - 0x204e, 0x204f, 0x2050, 0x2051, 0x2052, 0x2053, 0x2055, 0x2056, - 0x2057, 0x2058, 0x2059, 0x205a, 0x205b, 0x205c, 0x205d, 0x205e, - 0x205f, 0x2060, 0x2062, 0x2063, 0x2064, 0x2065, 0x2066, 0x2067, - 0x2068, 0x2069, 0x206a, 0x206b, 0x206c, 0x206d, 0x206e, 0x206f, - 0x2070, 0x2072, 0x2073, 0x2074, 0x2075, 0x2076, 0x2077, 0x2078, - 0x2079, 0x207a, 0x207b, 0x207c, 0x207d, 0x207e, 0x207f, 0x2080, - 0x2081, 0x2082, 0x2083, 0x2084, 0x2085, 0x2086, 0x2087, 0x2089, - 0x208a, 0x208b, 0x208c, 0x208d, 0x208e, 0x208f, 0x2090, 0x2091, - 0x2092, 0x2093, 0x2094, 0x2095, 0x2096, 0x2097, 0x2098, 0x2099, - 0x209a, 0x209b, 0x209c, 0x209d, 0x209e, 0x209f, 0x20a0, 0x20a1, - 0x20a2, 0x20a3, 0x20a4, 0x20a5, 0x20a6, 0x20a7, 0x20a8, 0x20a9, - 0x20aa, 0x20ab, 0x20ac, 0x20ad, 0x20ae, 0x20af, 0x20b0, 0x20b1, - 0x20b2, 0x20b3, 0x20b4, 0x20b5, 0x20b6, 0x20b7, 0x20b8, 0x20b9, - 0x20ba, 0x20bb, 0x20bc, 0x20bd, 0x20be, 0x20bf, 0x20c0, 0x20c1, - 0x20c2, 0x20c3, 0x20c4, 0x20c5, 0x20c6, 0x20c7, 0x20c7, 0x20c8, - 0x20c9, 0x20ca, 0x20cb, 0x20cc, 0x20cd, 0x20ce, 0x20cf, 0x20d0, - 0x20d1, 0x20d2, 0x20d3, 0x20d4, 0x20d5, 0x20d6, 0x20d7, 0x20d8, - 0x20d9, 0x20da, 0x20db, 0x20dc, 0x20dd, 0x20de, 0x20de, 0x20df, - 0x20e0, 0x20e1, 0x20e2, 0x20e3, 0x20e4, 0x20e5, 0x20e6, 0x20e7, - 0x20e8, 0x20e9, 0x20ea, 0x20eb, 0x20ec, 0x20ed, 0x20ee, 0x20ee, - 0x20ef, 0x20f0, 0x20f1, 0x20f2, 0x20f3, 0x20f4, 0x20f5, 0x20f6, - 0x20f7, 0x20f8, 0x20f9, 0x20fa, 0x20fb, 0x20fb, 0x20fc, 0x20fd, - 0x20fe, 0x20ff, 0x2100, 0x2101, 0x2102, 0x2103, 0x2104, 0x2105, - 0x2106, 0x2106, 0x2107, 0x2108, 0x2109, 0x210a, 0x210b, 0x210c, - 0x210d, 0x210e, 0x210f, 0x2110, 0x2110, 0x2111, 0x2112, 0x2113, - 0x2114, 0x2115, 0x2116, 0x2117, 0x2118, 0x2119, 0x2119, 0x211a, - 0x211b, 0x211c, 0x211d, 0x211e, 0x211f, 0x2120, 0x2121, 0x2121, - 0x2122, 0x2123, 0x2124, 0x2125, 0x2126, 0x2127, 0x2128, 0x2129, - 0x2129, 0x212a, 0x212b, 0x212c, 0x212d, 0x212e, 0x212f, 0x2130, - 0x2130, 0x2131, 0x2132, 0x2133, 0x2134, 0x2135, 0x2136, 0x2137, - 0x2137, 0x2138, 0x2139, 0x213a, 0x213b, 0x213c, 0x213d, 0x213e, - 0x213e, 0x213f, 0x2140, 0x2141, 0x2142, 0x2143, 0x2144, 0x2144, - 0x2145, 0x2146, 0x2147, 0x2148, 0x2149, 0x214a, 0x214b, 0x214b, - 0x214c, 0x214d, 0x214e, 0x214f, 0x2150, 0x2151, 0x2151, 0x2152, - 0x2153, 0x2154, 0x2155, 0x2156, 0x2156, 0x2157, 0x2158, 0x2159, - 0x215a, 0x215b, 0x215c, 0x215c, 0x215d, 0x215e, 0x215f, 0x2160, - 0x2161, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2166, - 0x2167, 0x2168, 0x2169, 0x216a, 0x216b, 0x216b, 0x216c, 0x216d, - 0x216e, 0x216f, 0x2170, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, - 0x2175, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217a, 0x217a, - 0x217b, 0x217c, 0x217d, 0x217e, 0x217e, 0x217f, 0x2180, 0x2181, - 0x2182, 0x2183, 0x2183, 0x2184, 0x2185, 0x2186, 0x2187, 0x2187, - 0x2188, 0x2189, 0x218a, 0x218b, 0x218c, 0x218c, 0x218d, 0x218e, - 0x218f, 0x2190, 0x2190, 0x2191, 0x2192, 0x2193, 0x2194, 0x2194, - 0x2195, 0x2196, 0x2197, 0x2198, 0x2198, 0x2199, 0x219a, 0x219b, - 0x219c, 0x219c, 0x219d, 0x219e, 0x219f, 0x21a0, 0x21a0, 0x21a1, - 0x21a2, 0x21a3, 0x21a4, 0x21a4, 0x21a5, 0x21a6, 0x21a7, 0x21a8, - 0x21a8, 0x21a9, 0x21aa, 0x21ab, 0x21ac, 0x21ac, 0x21ad, 0x21ae, - 0x21af, 0x21af, 0x21b0, 0x21b1, 0x21b2, 0x21b3, 0x21b3, 0x21b4, - 0x21b5, 0x21b6, 0x21b7, 0x21b7, 0x21b8, 0x21b9, 0x21ba, 0x21ba, - 0x21bb, 0x21bc, 0x21bd, 0x21be, 0x21be, 0x21bf, 0x21c0, 0x21c1, - 0x21c1, 0x21c2, 0x21c3, 0x21c4, 0x21c5, 0x21c5, 0x21c6, 0x21c7, - 0x21c8, 0x21c8, 0x21c9, 0x21ca, 0x21cb, 0x21cb, 0x21cc, 0x21cd, - 0x21ce, 0x21cf, 0x21cf, 0x21d0, 0x21d1, 0x21d2, 0x21d2, 0x21d3, - 0x21d4, 0x21d5, 0x21d5, 0x21d6, 0x21d7, 0x21d8, 0x21d8, 0x21d9, - 0x21da, 0x21db, 0x21db, 0x21dc, 0x21dd, 0x21de, 0x21df, 0x21df, - 0x21e0, 0x21e1, 0x21e2, 0x21e2, 0x21e3, 0x21e4, 0x21e5, 0x21e5, - 0x21e6, 0x21e7, 0x21e8, 0x21e8, 0x21e9, 0x21ea, 0x21eb, 0x21eb, - 0x21ec, 0x21ed, 0x21ee, 0x21ee, 0x21ef, 0x21f0, 0x21f1, 0x21f1, - 0x21f2, 0x21f3, 0x21f4, 0x21f4, 0x21f5, 0x21f6, 0x21f7, 0x21f7, - 0x21f8, 0x21f9, 0x21f9, 0x21fa, 0x21fb, 0x21fc, 0x21fc, 0x21fd, - 0x21fe, 0x21ff, 0x21ff, 0x2200, 0x2201, 0x2202, 0x2202, 0x2203, - 0x2204, 0x2205, 0x2205, 0x2206, 0x2207, 0x2207, 0x2208, 0x2209, - 0x220a, 0x220a, 0x220b, 0x220c, 0x220d, 0x220d, 0x220e, 0x220f, - 0x2210, 0x2210, 0x2211, 0x2212, 0x2212, 0x2213, 0x2214, 0x2215, - 0x2215, 0x2216, 0x2217, 0x2218, 0x2218, 0x2219, 0x221a, 0x221a, - 0x221b, 0x221c, 0x221d, 0x221d, 0x221e, 0x221f, 0x221f, 0x2220, - 0x2221, 0x2222, 0x2222, 0x2223, 0x2224, 0x2224, 0x2225, 0x2226, - 0x2227, 0x2227, 0x2228, 0x2229, 0x222a, 0x222a, 0x222b, 0x222c, - 0x222c, 0x222d, 0x222e, 0x222e, 0x222f, 0x2230, 0x2231, 0x2231, - 0x2232, 0x2233, 0x2233, 0x2234, 0x2235, 0x2236, 0x2236, 0x2237, - 0x2238, 0x2238, 0x2239, 0x223a, 0x223b, 0x223b, 0x223c, 0x223d, - 0x223d, 0x223e, 0x223f, 0x223f, 0x2240, 0x2241, 0x2242, 0x2242, - 0x2243, 0x2244, 0x2244, 0x2245, 0x2246, 0x2246, 0x2247, 0x2248, - 0x2249, 0x2249, 0x224a, 0x224b, 0x224b, 0x224c, 0x224d, 0x224d, - 0x224e, 0x224f, 0x2250, 0x2250, 0x2251, 0x2252, 0x2252, 0x2253, - 0x2254, 0x2254, 0x2255, 0x2256, 0x2256, 0x2257, 0x2258, 0x2259, - 0x2259, 0x225a, 0x225b, 0x225b, 0x225c, 0x225d, 0x225d, 0x225e, - 0x225f, 0x225f, 0x2260, 0x2261, 0x2261, 0x2262, 0x2263, 0x2264, - 0x2264, 0x2265, 0x2266, 0x2266, 0x2267, 0x2268, 0x2268, 0x2269, - 0x226a, 0x226a, 0x226b, 0x226c, 0x226c, 0x226d, 0x226e, 0x226e, - 0x226f, 0x2270, 0x2270, 0x2271, 0x2272, 0x2272, 0x2273, 0x2274, - 0x2274, 0x2275, 0x2276, 0x2277, 0x2277, 0x2278, 0x2279, 0x2279, - 0x227a, 0x227b, 0x227b, 0x227c, 0x227d, 0x227d, 0x227e, 0x227f, - 0x227f, 0x2280, 0x2281, 0x2281, 0x2282, 0x2283, 0x2283, 0x2284, - 0x2285, 0x2285, 0x2286, 0x2287, 0x2287, 0x2288, 0x2289, 0x2289, - 0x228a, 0x228b, 0x228b, 0x228c, 0x228d, 0x228d, 0x228e, 0x228f, - 0x228f, 0x2290, 0x2291, 0x2291, 0x2292, 0x2293, 0x2293, 0x2294, - 0x2295, 0x2295, 0x2296, 0x2297, 0x2297, 0x2298, 0x2298, 0x2299, - 0x229a, 0x229a, 0x229b, 0x229c, 0x229c, 0x229d, 0x229e, 0x229e, - 0x229f, 0x22a0, 0x22a0, 0x22a1, 0x22a2, 0x22a2, 0x22a3, 0x22a4, - 0x22a4, 0x22a5, 0x22a6, 0x22a6, 0x22a7, 0x22a8, 0x22a8, 0x22a9, - 0x22aa, 0x22aa, 0x22ab, 0x22ab, 0x22ac, 0x22ad, 0x22ad, 0x22ae, - 0x22af, 0x22af, 0x22b0, 0x22b1, 0x22b1, 0x22b2, 0x22b3, 0x22b3, - 0x22b4, 0x22b5, 0x22b5, 0x22b6, 0x22b6, 0x22b7, 0x22b8, 0x22b8, - 0x22b9, 0x22ba, 0x22ba, 0x22bb, 0x22bc, 0x22bc, 0x22bd, 0x22be, - 0x22be, 0x22bf, 0x22bf, 0x22c0, 0x22c1, 0x22c1, 0x22c2, 0x22c3, - 0x22c3, 0x22c4, 0x22c5, 0x22c5, 0x22c6, 0x22c6, 0x22c7, 0x22c8, - 0x22c8, 0x22c9, 0x22ca, 0x22ca, 0x22cb, 0x22cc, 0x22cc, 0x22cd, - 0x22cd, 0x22ce, 0x22cf, 0x22cf, 0x22d0, 0x22d1, 0x22d1, 0x22d2, - 0x22d3, 0x22d3, 0x22d4, 0x22d4, 0x22d5, 0x22d6, 0x22d6, 0x22d7, - 0x22d8, 0x22d8, 0x22d9, 0x22d9, 0x22da, 0x22db, 0x22db, 0x22dc, - 0x22dd, 0x22dd, 0x22de, 0x22de, 0x22df, 0x22e0, 0x22e0, 0x22e1, - 0x22e2, 0x22e2, 0x22e3, 0x22e4, 0x22e4, 0x22e5, 0x22e5, 0x22e6, - 0x22e7, 0x22e7, 0x22e8, 0x22e8, 0x22e9, 0x22ea, 0x22ea, 0x22eb, - 0x22ec, 0x22ec, 0x22ed, 0x22ed, 0x22ee, 0x22ef, 0x22ef, 0x22f0, - 0x22f1, 0x22f1, 0x22f2, 0x22f2, 0x22f3, 0x22f4, 0x22f4, 0x22f5, - 0x22f6, 0x22f6, 0x22f7, 0x22f7, 0x22f8, 0x22f9, 0x22f9, 0x22fa, - 0x22fa, 0x22fb, 0x22fc, 0x22fc, 0x22fd, 0x22fe, 0x22fe, 0x22ff, - 0x22ff, 0x2300, 0x2301, 0x2301, 0x2302, 0x2302, 0x2303, 0x2304, - 0x2304, 0x2305, 0x2305, 0x2306, 0x2307, 0x2307, 0x2308, 0x2309, - 0x2309, 0x230a, 0x230a, 0x230b, 0x230c, 0x230c, 0x230d, 0x230d, - 0x230e, 0x230f, 0x230f, 0x2310, 0x2310, 0x2311, 0x2312, 0x2312, - 0x2313, 0x2313, 0x2314, 0x2315, 0x2315, 0x2316, 0x2316, 0x2317, - 0x2318, 0x2318, 0x2319, 0x2319, 0x231a, 0x231b, 0x231b, 0x231c, - 0x231d, 0x231d, 0x231e, 0x231e, 0x231f, 0x2320, 0x2320, 0x2321, - 0x2321, 0x2322, 0x2323, 0x2323, 0x2324, 0x2324, 0x2325, 0x2325, - 0x2326, 0x2327, 0x2327, 0x2328, 0x2328, 0x2329, 0x232a, 0x232a, - 0x232b, 0x232b, 0x232c, 0x232d, 0x232d, 0x232e, 0x232e, 0x232f, - 0x2330, 0x2330, 0x2331, 0x2331, 0x2332, 0x2333, 0x2333, 0x2334, - 0x2334, 0x2335, 0x2336, 0x2336, 0x2337, 0x2337, 0x2338, 0x2339, - 0x2339, 0x233a, 0x233a, 0x233b, 0x233b, 0x233c, 0x233d, 0x233d, - 0x233e, 0x233e, 0x233f, 0x2340, 0x2340, 0x2341, 0x2341, 0x2342, - 0x2343, 0x2343, 0x2344, 0x2344, 0x2345, 0x2345, 0x2346, 0x2347, - 0x2347, 0x2348, 0x2348, 0x2349, 0x234a, 0x234a, 0x234b, 0x234b, - 0x234c, 0x234c, 0x234d, 0x234e, 0x234e, 0x234f, 0x234f, 0x2350, - 0x2351, 0x2351, 0x2352, 0x2352, 0x2353, 0x2353, 0x2354, 0x2355, - 0x2355, 0x2356, 0x2356, 0x2357, 0x2357, 0x2358, 0x2359, 0x2359, - 0x235a, 0x235a, 0x235b, 0x235c, 0x235c, 0x235d, 0x235d, 0x235e, - 0x235e, 0x235f, 0x2360, 0x2360, 0x2361, 0x2361, 0x2362, 0x2362, - 0x2363, 0x2364, 0x2364, 0x2365, 0x2365, 0x2366, 0x2366, 0x2367, - 0x2368, 0x2368, 0x2369, 0x2369, 0x236a, 0x236a, 0x236b, 0x236c, - 0x236c, 0x236d, 0x236d, 0x236e, 0x236e, 0x236f, 0x2370, 0x2370, - 0x2371, 0x2371, 0x2372, 0x2372, 0x2373, 0x2374, 0x2374, 0x2375, - 0x2375, 0x2376, 0x2376, 0x2377, 0x2378, 0x2378, 0x2379, 0x2379, - 0x237a, 0x237a, 0x237b, 0x237c, 0x237c, 0x237d, 0x237d, 0x237e, - 0x237e, 0x237f, 0x237f, 0x2380, 0x2381, 0x2381, 0x2382, 0x2382, - 0x2383, 0x2383, 0x2384, 0x2385, 0x2385, 0x2386, 0x2386, 0x2387, - 0x2387, 0x2388, 0x2388, 0x2389, 0x238a, 0x238a, 0x238b, 0x238b, - 0x238c, 0x238c, 0x238d, 0x238e, 0x238e, 0x238f, 0x238f, 0x2390, - 0x2390, 0x2391, 0x2391, 0x2392, 0x2393, 0x2393, 0x2394, 0x2394, - 0x2395, 0x2395, 0x2396, 0x2396, 0x2397, 0x2398, 0x2398, 0x2399, - 0x2399, 0x239a, 0x239a, 0x239b, 0x239b, 0x239c, 0x239d, 0x239d, - 0x239e, 0x239e, 0x239f, 0x239f, 0x23a0, 0x23a0, 0x23a1, 0x23a2, - 0x23a2, 0x23a3, 0x23a3, 0x23a4, 0x23a4, 0x23a5, 0x23a5, 0x23a6, - 0x23a7, 0x23a7, 0x23a8, 0x23a8, 0x23a9, 0x23a9, 0x23aa, 0x23aa, - 0x23ab, 0x23ab, 0x23ac, 0x23ad, 0x23ad, 0x23ae, 0x23ae, 0x23af, - 0x23af, 0x23b0, 0x23b0, 0x23b1, 0x23b2, 0x23b2, 0x23b3, 0x23b3, - 0x23b4, 0x23b4, 0x23b5, 0x23b5, 0x23b6, 0x23b6, 0x23b7, 0x23b8, - 0x23b8, 0x23b9, 0x23b9, 0x23ba, 0x23ba, 0x23bb, 0x23bb, 0x23bc, - 0x23bc, 0x23bd, 0x23bd, 0x23be, 0x23bf, 0x23bf, 0x23c0, 0x23c0, - 0x23c1, 0x23c1, 0x23c2, 0x23c2, 0x23c3, 0x23c3, 0x23c4, 0x23c5, - 0x23c5, 0x23c6, 0x23c6, 0x23c7, 0x23c7, 0x23c8, 0x23c8, 0x23c9, - 0x23c9, 0x23ca, 0x23ca, 0x23cb, 0x23cc, 0x23cc, 0x23cd, 0x23cd, - 0x23ce, 0x23ce, 0x23cf, 0x23cf, 0x23d0, 0x23d0, 0x23d1, 0x23d1, - 0x23d2, 0x23d3, 0x23d3, 0x23d4, 0x23d4, 0x23d5, 0x23d5, 0x23d6, - 0x23d6, 0x23d7, 0x23d7, 0x23d8, 0x23d8, 0x23d9, 0x23da, 0x23da, - 0x23db, 0x23db, 0x23dc, 0x23dc, 0x23dd, 0x23dd, 0x23de, 0x23de, - 0x23df, 0x23df, 0x23e0, 0x23e0, 0x23e1, 0x23e2, 0x23e2, 0x23e3, - 0x23e3, 0x23e4, 0x23e4, 0x23e5, 0x23e5, 0x23e6, 0x23e6, 0x23e7, - 0x23e7, 0x23e8, 0x23e8, 0x23e9, 0x23e9, 0x23ea, 0x23eb, 0x23eb, - 0x23ec, 0x23ec, 0x23ed, 0x23ed, 0x23ee, 0x23ee, 0x23ef, 0x23ef, - 0x23f0, 0x23f0, 0x23f1, 0x23f1, 0x23f2, 0x23f2, 0x23f3, 0x23f3, - 0x23f4, 0x23f5, 0x23f5, 0x23f6, 0x23f6, 0x23f7, 0x23f7, 0x23f8, - 0x23f8, 0x23f9, 0x23f9, 0x23fa, 0x23fa, 0x23fb, 0x23fb, 0x23fc, - 0x23fc, 0x23fd, 0x23fd, 0x23fe, 0x23fe, 0x23ff, 0x2400, 0x2400, - 0x2400, 0x2401, 0x2401, 0x2401, 0x2401, 0x2402, 0x2402, 0x2402, - 0x2402, 0x2403, 0x2403, 0x2403, 0x2403, 0x2404, 0x2404, 0x2404, - 0x2404, 0x2405, 0x2405, 0x2405, 0x2405, 0x2406, 0x2406, 0x2406, - 0x2407, 0x2407, 0x2407, 0x2407, 0x2408, 0x2408, 0x2408, 0x2408, - 0x2409, 0x2409, 0x2409, 0x2409, 0x240a, 0x240a, 0x240a, 0x240a, - 0x240b, 0x240b, 0x240b, 0x240b, 0x240c, 0x240c, 0x240c, 0x240c, - 0x240d, 0x240d, 0x240d, 0x240d, 0x240e, 0x240e, 0x240e, 0x240f, - 0x240f, 0x240f, 0x240f, 0x2410, 0x2410, 0x2410, 0x2410, 0x2411, - 0x2411, 0x2411, 0x2411, 0x2412, 0x2412, 0x2412, 0x2412, 0x2413, - 0x2413, 0x2413, 0x2413, 0x2414, 0x2414, 0x2414, 0x2414, 0x2415, - 0x2415, 0x2415, 0x2415, 0x2416, 0x2416, 0x2416, 0x2416, 0x2417, - 0x2417, 0x2417, 0x2417, 0x2418, 0x2418, 0x2418, 0x2418, 0x2419, - 0x2419, 0x2419, 0x2419, 0x241a, 0x241a, 0x241a, 0x241b, 0x241b, - 0x241b, 0x241b, 0x241c, 0x241c, 0x241c, 0x241c, 0x241d, 0x241d, - 0x241d, 0x241d, 0x241e, 0x241e, 0x241e, 0x241e, 0x241f, 0x241f, - 0x241f, 0x241f, 0x2420, 0x2420, 0x2420, 0x2420, 0x2421, 0x2421, - 0x2421, 0x2421, 0x2422, 0x2422, 0x2422, 0x2422, 0x2423, 0x2423, - 0x2423, 0x2423, 0x2424, 0x2424, 0x2424, 0x2424, 0x2425, 0x2425, - 0x2425, 0x2425, 0x2426, 0x2426, 0x2426, 0x2426, 0x2427, 0x2427, - 0x2427, 0x2427, 0x2428, 0x2428, 0x2428, 0x2428, 0x2429, 0x2429, - 0x2429, 0x2429, 0x242a, 0x242a, 0x242a, 0x242a, 0x242b, 0x242b, - 0x242b, 0x242b, 0x242c, 0x242c, 0x242c, 0x242c, 0x242d, 0x242d, - 0x242d, 0x242d, 0x242e, 0x242e, 0x242e, 0x242e, 0x242f, 0x242f, - 0x242f, 0x242f, 0x2430, 0x2430, 0x2430, 0x2430, 0x2431, 0x2431, - 0x2431, 0x2431, 0x2431, 0x2432, 0x2432, 0x2432, 0x2432, 0x2433, - 0x2433, 0x2433, 0x2433, 0x2434, 0x2434, 0x2434, 0x2434, 0x2435, - 0x2435, 0x2435, 0x2435, 0x2436, 0x2436, 0x2436, 0x2436, 0x2437, - 0x2437, 0x2437, 0x2437, 0x2438, 0x2438, 0x2438, 0x2438, 0x2439, - 0x2439, 0x2439, 0x2439, 0x243a, 0x243a, 0x243a, 0x243a, 0x243b, - 0x243b, 0x243b, 0x243b, 0x243c, 0x243c, 0x243c, 0x243c, 0x243d, - 0x243d, 0x243d, 0x243d, 0x243e, 0x243e, 0x243e, 0x243e, 0x243e, - 0x243f, 0x243f, 0x243f, 0x243f, 0x2440, 0x2440, 0x2440, 0x2440, - 0x2441, 0x2441, 0x2441, 0x2441, 0x2442, 0x2442, 0x2442, 0x2442, - 0x2443, 0x2443, 0x2444, 0x2444, 0x2445, 0x2445, 0x2446, 0x2446, - 0x2446, 0x2447, 0x2447, 0x2448, 0x2448, 0x2449, 0x2449, 0x244a, - 0x244a, 0x244b, 0x244b, 0x244c, 0x244c, 0x244d, 0x244d, 0x244e, - 0x244e, 0x244f, 0x244f, 0x2450, 0x2450, 0x2451, 0x2451, 0x2451, - 0x2452, 0x2452, 0x2453, 0x2453, 0x2454, 0x2454, 0x2455, 0x2455, - 0x2456, 0x2456, 0x2457, 0x2457, 0x2458, 0x2458, 0x2459, 0x2459, - 0x245a, 0x245a, 0x245a, 0x245b, 0x245b, 0x245c, 0x245c, 0x245d, - 0x245d, 0x245e, 0x245e, 0x245f, 0x245f, 0x2460, 0x2460, 0x2461, - 0x2461, 0x2462, 0x2462, 0x2462, 0x2463, 0x2463, 0x2464, 0x2464, - 0x2465, 0x2465, 0x2466, 0x2466, 0x2467, 0x2467, 0x2468, 0x2468, - 0x2469, 0x2469, 0x2469, 0x246a, 0x246a, 0x246b, 0x246b, 0x246c, - 0x246c, 0x246d, 0x246d, 0x246e, 0x246e, 0x246f, 0x246f, 0x246f, - 0x2470, 0x2470, 0x2471, 0x2471, 0x2472, 0x2472, 0x2473, 0x2473, - 0x2474, 0x2474, 0x2475, 0x2475, 0x2475, 0x2476, 0x2476, 0x2477, - 0x2477, 0x2478, 0x2478, 0x2479, 0x2479, 0x247a, 0x247a, 0x247a, - 0x247b, 0x247b, 0x247c, 0x247c, 0x247d, 0x247d, 0x247e, 0x247e, - 0x247f, 0x247f, 0x247f, 0x2480, 0x2480, 0x2481, 0x2481, 0x2482, - 0x2482, 0x2483, 0x2483, 0x2484, 0x2484, 0x2484, 0x2485, 0x2485, - 0x2486, 0x2486, 0x2487, 0x2487, 0x2488, 0x2488, 0x2489, 0x2489, - 0x2489, 0x248a, 0x248a, 0x248b, 0x248b, 0x248c, 0x248c, 0x248d, - 0x248d, 0x248d, 0x248e, 0x248e, 0x248f, 0x248f, 0x2490, 0x2490, - 0x2491, 0x2491, 0x2491, 0x2492, 0x2492, 0x2493, 0x2493, 0x2494, - 0x2494, 0x2495, 0x2495, 0x2495, 0x2496, 0x2496, 0x2497, 0x2497, - 0x2498, 0x2498, 0x2499, 0x2499, 0x2499, 0x249a, 0x249a, 0x249b, - 0x249b, 0x249c, 0x249c, 0x249d, 0x249d, 0x249d, 0x249e, 0x249e, - 0x249f, 0x249f, 0x24a0, 0x24a0, 0x24a0, 0x24a1, 0x24a1, 0x24a2, - 0x24a2, 0x24a3, 0x24a3, 0x24a4, 0x24a4, 0x24a4, 0x24a5, 0x24a5, - 0x24a6, 0x24a6, 0x24a7, 0x24a7, 0x24a7, 0x24a8, 0x24a8, 0x24a9, - 0x24a9, 0x24aa, 0x24aa, 0x24ab, 0x24ab, 0x24ab, 0x24ac, 0x24ac, - 0x24ad, 0x24ad, 0x24ae, 0x24ae, 0x24ae, 0x24af, 0x24af, 0x24b0, - 0x24b0, 0x24b1, 0x24b1, 0x24b1, 0x24b2, 0x24b2, 0x24b3, 0x24b3, - 0x24b4, 0x24b4, 0x24b4, 0x24b5, 0x24b5, 0x24b6, 0x24b6, 0x24b7, - 0x24b7, 0x24b7, 0x24b8, 0x24b8, 0x24b9, 0x24b9, 0x24ba, 0x24ba, - 0x24ba, 0x24bb, 0x24bb, 0x24bc, 0x24bc, 0x24bd, 0x24bd, 0x24bd, - 0x24be, 0x24be, 0x24bf, 0x24bf, 0x24c0, 0x24c0, 0x24c0, 0x24c1, - 0x24c1, 0x24c2, 0x24c2, 0x24c3, 0x24c3, 0x24c3, 0x24c4, 0x24c4, - 0x24c5, 0x24c5, 0x24c5, 0x24c6, 0x24c6, 0x24c7, 0x24c7, 0x24c8, - 0x24c8, 0x24c8, 0x24c9, 0x24c9, 0x24ca, 0x24ca, 0x24cb, 0x24cb, - 0x24cb, 0x24cc, 0x24cc, 0x24cd, 0x24cd, 0x24cd, 0x24ce, 0x24ce, - 0x24cf, 0x24cf, 0x24d0, 0x24d0, 0x24d0, 0x24d1, 0x24d1, 0x24d2, - 0x24d2, 0x24d3, 0x24d3, 0x24d3, 0x24d4, 0x24d4, 0x24d5, 0x24d5, - 0x24d5, 0x24d6, 0x24d6, 0x24d7, 0x24d7, 0x24d8, 0x24d8, 0x24d8, - 0x24d9, 0x24d9, 0x24da, 0x24da, 0x24da, 0x24db, 0x24db, 0x24dc, - 0x24dc, 0x24dc, 0x24dd, 0x24dd, 0x24de, 0x24de, 0x24df, 0x24df, - 0x24df, 0x24e0, 0x24e0, 0x24e1, 0x24e1, 0x24e1, 0x24e2, 0x24e2, - 0x24e3, 0x24e3, 0x24e3, 0x24e4, 0x24e4, 0x24e5, 0x24e5, 0x24e6, - 0x24e6, 0x24e6, 0x24e7, 0x24e7, 0x24e8, 0x24e8, 0x24e8, 0x24e9, - 0x24e9, 0x24ea, 0x24ea, 0x24ea, 0x24eb, 0x24eb, 0x24ec, 0x24ec, - 0x24ec, 0x24ed, 0x24ed, 0x24ee, 0x24ee, 0x24ee, 0x24ef, 0x24ef, - 0x24f0, 0x24f0, 0x24f1, 0x24f1, 0x24f1, 0x24f2, 0x24f2, 0x24f3, - 0x24f3, 0x24f3, 0x24f4, 0x24f4, 0x24f5, 0x24f5, 0x24f5, 0x24f6, - 0x24f6, 0x24f7, 0x24f7, 0x24f7, 0x24f8, 0x24f8, 0x24f9, 0x24f9, - 0x24f9, 0x24fa, 0x24fa, 0x24fb, 0x24fb, 0x24fb, 0x24fc, 0x24fc, - 0x24fd, 0x24fd, 0x24fd, 0x24fe, 0x24fe, 0x24ff, 0x24ff, 0x24ff, - 0x2500, 0x2500, 0x2501, 0x2501, 0x2501, 0x2502, 0x2502, 0x2503, - 0x2503, 0x2503, 0x2504, 0x2504, 0x2505, 0x2505, 0x2505, 0x2506, - 0x2506, 0x2507, 0x2507, 0x2507, 0x2508, 0x2508, 0x2509, 0x2509, - 0x2509, 0x250a, 0x250a, 0x250b, 0x250b, 0x250b, 0x250c, 0x250c, - 0x250d, 0x250d, 0x250d, 0x250e, 0x250e, 0x250f, 0x250f, 0x250f, - 0x2510, 0x2510, 0x2510, 0x2511, 0x2511, 0x2512, 0x2512, 0x2512, - 0x2513, 0x2513, 0x2514, 0x2514, 0x2514, 0x2515, 0x2515, 0x2516, - 0x2516, 0x2516, 0x2517, 0x2517, 0x2518, 0x2518, 0x2518, 0x2519, - 0x2519, 0x2519, 0x251a, 0x251a, 0x251b, 0x251b, 0x251b, 0x251c, - 0x251c, 0x251d, 0x251d, 0x251d, 0x251e, 0x251e, 0x251f, 0x251f, - 0x251f, 0x2520, 0x2520, 0x2520, 0x2521, 0x2521, 0x2522, 0x2522, - 0x2522, 0x2523, 0x2523, 0x2524, 0x2524, 0x2524, 0x2525, 0x2525, - 0x2526, 0x2526, 0x2526, 0x2527, 0x2527, 0x2527, 0x2528, 0x2528, - 0x2529, 0x2529, 0x2529, 0x252a, 0x252a, 0x252b, 0x252b, 0x252b, - 0x252c, 0x252c, 0x252c, 0x252d, 0x252d, 0x252e, 0x252e, 0x252e, - 0x252f, 0x252f, 0x252f, 0x2530, 0x2530, 0x2531, 0x2531, 0x2531, - 0x2532, 0x2532, 0x2533, 0x2533, 0x2533, 0x2534, 0x2534, 0x2534, - 0x2535, 0x2535, 0x2536, 0x2536, 0x2536, 0x2537, 0x2537, 0x2537, - 0x2538, 0x2538, 0x2539, 0x2539, 0x2539, 0x253a, 0x253a, 0x253b, - 0x253b, 0x253b, 0x253c, 0x253c, 0x253c, 0x253d, 0x253d, 0x253e, - 0x253e, 0x253e, 0x253f, 0x253f, 0x253f, 0x2540, 0x2540, 0x2541, - 0x2541, 0x2541, 0x2542, 0x2542, 0x2542, 0x2543, 0x2543, 0x2544, - 0x2544, 0x2544, 0x2545, 0x2545, 0x2545, 0x2546, 0x2546, 0x2547, - 0x2547, 0x2547, 0x2548, 0x2548, 0x2548, 0x2549, 0x2549, 0x254a, - 0x254a, 0x254a, 0x254b, 0x254b, 0x254b, 0x254c, 0x254c, 0x254d, - 0x254d, 0x254d, 0x254e, 0x254e, 0x254e, 0x254f, 0x254f, 0x2550, - 0x2550, 0x2550, 0x2551, 0x2551, 0x2551, 0x2552, 0x2552, 0x2553, - 0x2553, 0x2553, 0x2554, 0x2554, 0x2554, 0x2555, 0x2555, 0x2555, - 0x2556, 0x2556, 0x2557, 0x2557, 0x2557, 0x2558, 0x2558, 0x2558, - 0x2559, 0x2559, 0x255a, 0x255a, 0x255a, 0x255b, 0x255b, 0x255b, - 0x255c, 0x255c, 0x255c, 0x255d, 0x255d, 0x255e, 0x255e, 0x255e, - 0x255f, 0x255f, 0x255f, 0x2560, 0x2560, 0x2561, 0x2561, 0x2561, - 0x2562, 0x2562, 0x2562, 0x2563, 0x2563, 0x2563, 0x2564, 0x2564, - 0x2565, 0x2565, 0x2565, 0x2566, 0x2566, 0x2566, 0x2567, 0x2567, - 0x2567, 0x2568, 0x2568, 0x2569, 0x2569, 0x2569, 0x256a, 0x256a, - 0x256a, 0x256b, 0x256b, 0x256b, 0x256c, 0x256c, 0x256d, 0x256d, - 0x256d, 0x256e, 0x256e, 0x256e, 0x256f, 0x256f, 0x256f, 0x2570, - 0x2570, 0x2570, 0x2571, 0x2571, 0x2572, 0x2572, 0x2572, 0x2573, - 0x2573, 0x2573, 0x2574, 0x2574, 0x2574, 0x2575, 0x2575, 0x2576, - 0x2576, 0x2576, 0x2577, 0x2577, 0x2577, 0x2578, 0x2578, 0x2578, - 0x2579, 0x2579, 0x2579, 0x257a, 0x257a, 0x257b, 0x257b, 0x257b, - 0x257c, 0x257c, 0x257c, 0x257d, 0x257d, 0x257d, 0x257e, 0x257e, - 0x257e, 0x257f, 0x257f, 0x2580, 0x2580, 0x2580, 0x2581, 0x2581, - 0x2581, 0x2582, 0x2582, 0x2582, 0x2583, 0x2583, 0x2583, 0x2584, - 0x2584, 0x2585, 0x2585, 0x2585, 0x2586, 0x2586, 0x2586, 0x2587, - 0x2587, 0x2587, 0x2588, 0x2588, 0x2588, 0x2589, 0x2589, 0x258a, - 0x258a, 0x258a, 0x258b, 0x258b, 0x258b, 0x258c, 0x258c, 0x258c, - 0x258d, 0x258d, 0x258d, 0x258e, 0x258e, 0x258e, 0x258f, 0x258f, - 0x258f, 0x2590, 0x2590, 0x2591, 0x2591, 0x2591, 0x2592, 0x2592, - 0x2592, 0x2593, 0x2593, 0x2593, 0x2594, 0x2594, 0x2594, 0x2595, - 0x2595, 0x2595, 0x2596, 0x2596, 0x2597, 0x2597, 0x2597, 0x2598, - 0x2598, 0x2598, 0x2599, 0x2599, 0x2599, 0x259a, 0x259a, 0x259a, - 0x259b, 0x259b, 0x259b, 0x259c, 0x259c, 0x259c, 0x259d, 0x259d, - 0x259d, 0x259e, 0x259e, 0x259f, 0x259f, 0x259f, 0x25a0, 0x25a0, - 0x25a0, 0x25a1, 0x25a1, 0x25a1, 0x25a2, 0x25a2, 0x25a2, 0x25a3, - 0x25a3, 0x25a3, 0x25a4, 0x25a4, 0x25a4, 0x25a5, 0x25a5, 0x25a5, - 0x25a6, 0x25a6, 0x25a6, 0x25a7, 0x25a7, 0x25a8, 0x25a8, 0x25a8, - 0x25a9, 0x25a9, 0x25a9, 0x25aa, 0x25aa, 0x25aa, 0x25ab, 0x25ab, - 0x25ab, 0x25ac, 0x25ac, 0x25ac, 0x25ad, 0x25ad, 0x25ad, 0x25ae, - 0x25ae, 0x25ae, 0x25af, 0x25af, 0x25af, 0x25b0, 0x25b0, 0x25b0, - 0x25b1, 0x25b1, 0x25b1, 0x25b2, 0x25b2, 0x25b2, 0x25b3, 0x25b3, - 0x25b4, 0x25b4, 0x25b4, 0x25b5, 0x25b5, 0x25b5, 0x25b6, 0x25b6, - 0x25b6, 0x25b7, 0x25b7, 0x25b7, 0x25b8, 0x25b8, 0x25b8, 0x25b9, - 0x25b9, 0x25b9, 0x25ba, 0x25ba, 0x25ba, 0x25bb, 0x25bb, 0x25bb, - 0x25bc, 0x25bc, 0x25bc, 0x25bd, 0x25bd, 0x25bd, 0x25be, 0x25be, - 0x25be, 0x25bf, 0x25bf, 0x25bf, 0x25c0, 0x25c0, 0x25c0, 0x25c1, - 0x25c1, 0x25c1, 0x25c2, 0x25c2, 0x25c2, 0x25c3, 0x25c3, 0x25c3, - 0x25c4, 0x25c4, 0x25c4, 0x25c5, 0x25c5, 0x25c5, 0x25c6, 0x25c6, - 0x25c6, 0x25c7, 0x25c7, 0x25c7, 0x25c8, 0x25c8, 0x25c8, 0x25c9, - 0x25c9, 0x25ca, 0x25ca, 0x25ca, 0x25cb, 0x25cb, 0x25cb, 0x25cc, - 0x25cc, 0x25cc, 0x25cd, 0x25cd, 0x25cd, 0x25ce, 0x25ce, 0x25ce, - 0x25cf, 0x25cf, 0x25cf, 0x25d0, 0x25d0, 0x25d0, 0x25d1, 0x25d1, - 0x25d1, 0x25d2, 0x25d2, 0x25d2, 0x25d3, 0x25d3, 0x25d3, 0x25d4, - 0x25d4, 0x25d4, 0x25d5, 0x25d5, 0x25d5, 0x25d6, 0x25d6, 0x25d6, - 0x25d7, 0x25d7, 0x25d8, 0x25d8, 0x25d9, 0x25da, 0x25da, 0x25db, - 0x25dc, 0x25dc, 0x25dd, 0x25de, 0x25de, 0x25df, 0x25e0, 0x25e0, - 0x25e1, 0x25e2, 0x25e2, 0x25e3, 0x25e4, 0x25e4, 0x25e5, 0x25e6, - 0x25e6, 0x25e7, 0x25e8, 0x25e8, 0x25e9, 0x25ea, 0x25ea, 0x25eb, - 0x25ec, 0x25ec, 0x25ed, 0x25ee, 0x25ee, 0x25ef, 0x25ef, 0x25f0, - 0x25f1, 0x25f1, 0x25f2, 0x25f3, 0x25f3, 0x25f4, 0x25f5, 0x25f5, - 0x25f6, 0x25f7, 0x25f7, 0x25f8, 0x25f9, 0x25f9, 0x25fa, 0x25fa, - 0x25fb, 0x25fc, 0x25fc, 0x25fd, 0x25fe, 0x25fe, 0x25ff, 0x2600, - 0x2600, 0x2601, 0x2602, 0x2602, 0x2603, 0x2603, 0x2604, 0x2605, - 0x2605, 0x2606, 0x2607, 0x2607, 0x2608, 0x2609, 0x2609, 0x260a, - 0x260a, 0x260b, 0x260c, 0x260c, 0x260d, 0x260e, 0x260e, 0x260f, - 0x2610, 0x2610, 0x2611, 0x2611, 0x2612, 0x2613, 0x2613, 0x2614, - 0x2615, 0x2615, 0x2616, 0x2617, 0x2617, 0x2618, 0x2618, 0x2619, - 0x261a, 0x261a, 0x261b, 0x261c, 0x261c, 0x261d, 0x261d, 0x261e, - 0x261f, 0x261f, 0x2620, 0x2621, 0x2621, 0x2622, 0x2622, 0x2623, - 0x2624, 0x2624, 0x2625, 0x2626, 0x2626, 0x2627, 0x2627, 0x2628, - 0x2629, 0x2629, 0x262a, 0x262b, 0x262b, 0x262c, 0x262c, 0x262d, - 0x262e, 0x262e, 0x262f, 0x2630, 0x2630, 0x2631, 0x2631, 0x2632, - 0x2633, 0x2633, 0x2634, 0x2634, 0x2635, 0x2636, 0x2636, 0x2637, - 0x2638, 0x2638, 0x2639, 0x2639, 0x263a, 0x263b, 0x263b, 0x263c, - 0x263c, 0x263d, 0x263e, 0x263e, 0x263f, 0x2640, 0x2640, 0x2641, - 0x2641, 0x2642, 0x2643, 0x2643, 0x2644, 0x2644, 0x2645, 0x2646, - 0x2646, 0x2647, 0x2647, 0x2648, 0x2649, 0x2649, 0x264a, 0x264a, - 0x264b, 0x264c, 0x264c, 0x264d, 0x264e, 0x264e, 0x264f, 0x264f, - 0x2650, 0x2651, 0x2651, 0x2652, 0x2652, 0x2653, 0x2654, 0x2654, - 0x2655, 0x2655, 0x2656, 0x2657, 0x2657, 0x2658, 0x2658, 0x2659, - 0x265a, 0x265a, 0x265b, 0x265b, 0x265c, 0x265d, 0x265d, 0x265e, - 0x265e, 0x265f, 0x2660, 0x2660, 0x2661, 0x2661, 0x2662, 0x2663, - 0x2663, 0x2664, 0x2664, 0x2665, 0x2666, 0x2666, 0x2667, 0x2667, - 0x2668, 0x2668, 0x2669, 0x266a, 0x266a, 0x266b, 0x266b, 0x266c, - 0x266d, 0x266d, 0x266e, 0x266e, 0x266f, 0x2670, 0x2670, 0x2671, - 0x2671, 0x2672, 0x2673, 0x2673, 0x2674, 0x2674, 0x2675, 0x2675, - 0x2676, 0x2677, 0x2677, 0x2678, 0x2678, 0x2679, 0x267a, 0x267a, - 0x267b, 0x267b, 0x267c, 0x267c, 0x267d, 0x267e, 0x267e, 0x267f, - 0x267f, 0x2680, 0x2681, 0x2681, 0x2682, 0x2682, 0x2683, 0x2683, - 0x2684, 0x2685, 0x2685, 0x2686, 0x2686, 0x2687, 0x2688, 0x2688, - 0x2689, 0x2689, 0x268a, 0x268a, 0x268b, 0x268c, 0x268c, 0x268d, - 0x268d, 0x268e, 0x268f, 0x268f, 0x2690, 0x2690, 0x2691, 0x2691, - 0x2692, 0x2693, 0x2693, 0x2694, 0x2694, 0x2695, 0x2695, 0x2696, - 0x2697, 0x2697, 0x2698, 0x2698, 0x2699, 0x2699, 0x269a, 0x269b, - 0x269b, 0x269c, 0x269c, 0x269d, 0x269d, 0x269e, 0x269f, 0x269f, - 0x26a0, 0x26a0, 0x26a1, 0x26a1, 0x26a2, 0x26a3, 0x26a3, 0x26a4, - 0x26a4, 0x26a5, 0x26a5, 0x26a6, 0x26a7, 0x26a7, 0x26a8, 0x26a8, - 0x26a9, 0x26a9, 0x26aa, 0x26aa, 0x26ab, 0x26ac, 0x26ac, 0x26ad, - 0x26ad, 0x26ae, 0x26ae, 0x26af, 0x26b0, 0x26b0, 0x26b1, 0x26b1, - 0x26b2, 0x26b2, 0x26b3, 0x26b4, 0x26b4, 0x26b5, 0x26b5, 0x26b6, - 0x26b6, 0x26b7, 0x26b7, 0x26b8, 0x26b9, 0x26b9, 0x26ba, 0x26ba, - 0x26bb, 0x26bb, 0x26bc, 0x26bc, 0x26bd, 0x26be, 0x26be, 0x26bf, - 0x26bf, 0x26c0, 0x26c0, 0x26c1, 0x26c2, 0x26c2, 0x26c3, 0x26c3, - 0x26c4, 0x26c4, 0x26c5, 0x26c5, 0x26c6, 0x26c7, 0x26c7, 0x26c8, - 0x26c8, 0x26c9, 0x26c9, 0x26ca, 0x26ca, 0x26cb, 0x26cb, 0x26cc, - 0x26cd, 0x26cd, 0x26ce, 0x26ce, 0x26cf, 0x26cf, 0x26d0, 0x26d0, - 0x26d1, 0x26d2, 0x26d2, 0x26d3, 0x26d3, 0x26d4, 0x26d4, 0x26d5, - 0x26d5, 0x26d6, 0x26d7, 0x26d7, 0x26d8, 0x26d8, 0x26d9, 0x26d9, - 0x26da, 0x26da, 0x26db, 0x26db, 0x26dc, 0x26dd, 0x26dd, 0x26de, - 0x26de, 0x26df, 0x26df, 0x26e0, 0x26e0, 0x26e1, 0x26e1, 0x26e2, - 0x26e3, 0x26e3, 0x26e4, 0x26e4, 0x26e5, 0x26e5, 0x26e6, 0x26e6, - 0x26e7, 0x26e7, 0x26e8, 0x26e9, 0x26e9, 0x26ea, 0x26ea, 0x26eb, - 0x26eb, 0x26ec, 0x26ec, 0x26ed, 0x26ed, 0x26ee, 0x26ee, 0x26ef, - 0x26f0, 0x26f0, 0x26f1, 0x26f1, 0x26f2, 0x26f2, 0x26f3, 0x26f3, - 0x26f4, 0x26f4, 0x26f5, 0x26f5, 0x26f6, 0x26f7, 0x26f7, 0x26f8, - 0x26f8, 0x26f9, 0x26f9, 0x26fa, 0x26fa, 0x26fb, 0x26fb, 0x26fc, - 0x26fc, 0x26fd, 0x26fe, 0x26fe, 0x26ff, 0x26ff, 0x2700, 0x2700, - 0x2701, 0x2701, 0x2702, 0x2702, 0x2703, 0x2703, 0x2704, 0x2704, - 0x2705, 0x2705, 0x2706, 0x2707, 0x2707, 0x2708, 0x2708, 0x2709, - 0x2709, 0x270a, 0x270a, 0x270b, 0x270b, 0x270c, 0x270c, 0x270d, - 0x270d, 0x270e, 0x270f, 0x270f, 0x2710, 0x2710, 0x2711, 0x2711, - 0x2712, 0x2712, 0x2713, 0x2713, 0x2714, 0x2714, 0x2715, 0x2715, - 0x2716, 0x2716, 0x2717, 0x2717, 0x2718, 0x2719, 0x2719, 0x271a, - 0x271a, 0x271b, 0x271b, 0x271c, 0x271c, 0x271d, 0x271d, 0x271e, - 0x271e, 0x271f, 0x271f, 0x2720, 0x2720, 0x2721, 0x2721, 0x2722, - 0x2722, 0x2723, 0x2723, 0x2724, 0x2725, 0x2725, 0x2726, 0x2726, - 0x2727, 0x2727, 0x2728, 0x2728, 0x2729, 0x2729, 0x272a, 0x272a, - 0x272b, 0x272b, 0x272c, 0x272c, 0x272d, 0x272d, 0x272e, 0x272e, - 0x272f, 0x272f, 0x2730, 0x2730, 0x2731, 0x2732, 0x2732, 0x2733, - 0x2733, 0x2734, 0x2734, 0x2735, 0x2735, 0x2736, 0x2736, 0x2737, - 0x2737, 0x2738, 0x2738, 0x2739, 0x2739, 0x273a, 0x273a, 0x273b, - 0x273b, 0x273c, 0x273c, 0x273d, 0x273d, 0x273e, 0x273e, 0x273f, - 0x273f, 0x2740, 0x2740, 0x2741, 0x2741, 0x2742, 0x2742, 0x2743, - 0x2743, 0x2744, 0x2744, 0x2745, 0x2746, 0x2746, 0x2747, 0x2747, - 0x2748, 0x2748, 0x2749, 0x2749, 0x274a, 0x274a, 0x274b, 0x274b, - 0x274c, 0x274c, 0x274d, 0x274d, 0x274e, 0x274e, 0x274f, 0x274f, - 0x2750, 0x2750, 0x2751, 0x2751, 0x2752, 0x2752, 0x2753, 0x2753, - 0x2754, 0x2754, 0x2755, 0x2755, 0x2756, 0x2756, 0x2757, 0x2757, - 0x2758, 0x2758, 0x2759, 0x2759, 0x275a, 0x275a, 0x275b, 0x275b, - 0x275c, 0x275c, 0x275d, 0x275d, 0x275e, 0x275e, 0x275f, 0x275f, - 0x2760, 0x2760, 0x2761, 0x2761, 0x2762, 0x2762, 0x2763, 0x2763, - 0x2764, 0x2764, 0x2765, 0x2765, 0x2766, 0x2766, 0x2767, 0x2767, - 0x2768, 0x2768, 0x2769, 0x2769, 0x276a, 0x276a, 0x276b, 0x276b, - 0x276c, 0x276c, 0x276d, 0x276d, 0x276e, 0x276e, 0x276f, 0x276f, - 0x2770, 0x2770, 0x2771, 0x2771, 0x2772, 0x2772, 0x2773, 0x2773, - 0x2774, 0x2774, 0x2775, 0x2775, 0x2776, 0x2776, 0x2777, 0x2777, - 0x2778, 0x2778, 0x2779, 0x2779, 0x277a, 0x277a, 0x277b, 0x277b, - 0x277c, 0x277c, 0x277d, 0x277d, 0x277e, 0x277e, 0x277f, 0x277f, - 0x2780, 0x2780, 0x2781, 0x2781, 0x2782, 0x2782, 0x2782, 0x2783, - 0x2783, 0x2784, 0x2784, 0x2785, 0x2785, 0x2786, 0x2786, 0x2787, - 0x2787, 0x2788, 0x2788, 0x2789, 0x2789, 0x278a, 0x278a, 0x278b, - 0x278b, 0x278c, 0x278c, 0x278d, 0x278d, 0x278e, 0x278e, 0x278f, - 0x278f, 0x2790, 0x2790, 0x2791, 0x2791, 0x2792, 0x2792, 0x2793, - 0x2793, 0x2794, 0x2794, 0x2795, 0x2795, 0x2796, 0x2796, 0x2796, - 0x2797, 0x2797, 0x2798, 0x2798, 0x2799, 0x2799, 0x279a, 0x279a, - 0x279b, 0x279b, 0x279c, 0x279c, 0x279d, 0x279d, 0x279e, 0x279e, - 0x279f, 0x279f, 0x27a0, 0x27a0, 0x27a1, 0x27a1, 0x27a2, 0x27a2, - 0x27a3, 0x27a3, 0x27a4, 0x27a4, 0x27a4, 0x27a5, 0x27a5, 0x27a6, - 0x27a6, 0x27a7, 0x27a7, 0x27a8, 0x27a8, 0x27a9, 0x27a9, 0x27aa, - 0x27aa, 0x27ab, 0x27ab, 0x27ac, 0x27ac, 0x27ad, 0x27ad, 0x27ae, - 0x27ae, 0x27af, 0x27af, 0x27af, 0x27b0, 0x27b0, 0x27b1, 0x27b1, - 0x27b2, 0x27b2, 0x27b3, 0x27b3, 0x27b4, 0x27b4, 0x27b5, 0x27b5, - 0x27b6, 0x27b6, 0x27b7, 0x27b7, 0x27b8, 0x27b8, 0x27b9, 0x27b9, - 0x27b9, 0x27ba, 0x27ba, 0x27bb, 0x27bb, 0x27bc, 0x27bc, 0x27bd, - 0x27bd, 0x27be, 0x27be, 0x27bf, 0x27bf, 0x27c0, 0x27c0, 0x27c1, - 0x27c1, 0x27c1, 0x27c2, 0x27c2, 0x27c3, 0x27c3, 0x27c4, 0x27c4, - 0x27c5, 0x27c5, 0x27c6, 0x27c6, 0x27c7, 0x27c7, 0x27c8, 0x27c8, - 0x27c9, 0x27c9, 0x27c9, 0x27ca, 0x27ca, 0x27cb, 0x27cb, 0x27cc, - 0x27cc, 0x27cd, 0x27cd, 0x27ce, 0x27ce, 0x27cf, 0x27cf, 0x27d0, - 0x27d0, 0x27d1, 0x27d1, 0x27d1, 0x27d2, 0x27d2, 0x27d3, 0x27d3, - 0x27d4, 0x27d4, 0x27d5, 0x27d5, 0x27d6, 0x27d6, 0x27d7, 0x27d7, - 0x27d8, 0x27d8, 0x27d8, 0x27d9, 0x27d9, 0x27da, 0x27da, 0x27db, - 0x27db, 0x27dc, 0x27dc, 0x27dd, 0x27dd, 0x27de, 0x27de, 0x27de, - 0x27df, 0x27df, 0x27e0, 0x27e0, 0x27e1, 0x27e1, 0x27e2, 0x27e2, - 0x27e3, 0x27e3, 0x27e4, 0x27e4, 0x27e5, 0x27e5, 0x27e5, 0x27e6, - 0x27e6, 0x27e7, 0x27e7, 0x27e8, 0x27e8, 0x27e9, 0x27e9, 0x27ea, - 0x27ea, 0x27eb, 0x27eb, 0x27eb, 0x27ec, 0x27ec, 0x27ed, 0x27ed, - 0x27ee, 0x27ee, 0x27ef, 0x27ef, 0x27f0, 0x27f0, 0x27f0, 0x27f1, - 0x27f1, 0x27f2, 0x27f2, 0x27f3, 0x27f3, 0x27f4, 0x27f4, 0x27f5, - 0x27f5, 0x27f6, 0x27f6, 0x27f6, 0x27f7, 0x27f7, 0x27f8, 0x27f8, - 0x27f9, 0x27f9, 0x27fa, 0x27fa, 0x27fb, 0x27fb, 0x27fb, 0x27fc, - 0x27fc, 0x27fd, 0x27fd, 0x27fe, 0x27fe, 0x27ff, 0x27ff, 0x2800, - 0x2800, 0x2800, 0x2801, 0x2801, 0x2802, 0x2802, 0x2803, 0x2803, - 0x2804, 0x2804, 0x2805, 0x2805, 0x2805, 0x2806, 0x2806, 0x2807, - 0x2807, 0x2808, 0x2808, 0x2809, 0x2809, 0x2809, 0x280a, 0x280a, - 0x280b, 0x280b, 0x280c, 0x280c, 0x280d, 0x280d, 0x280e, 0x280e, - 0x280e, 0x280f, 0x280f, 0x2810, 0x2810, 0x2811, 0x2811, 0x2812, - 0x2812, 0x2812, 0x2813, 0x2813, 0x2814, 0x2814, 0x2815, 0x2815, - 0x2816, 0x2816, 0x2816, 0x2817, 0x2817, 0x2818, 0x2818, 0x2819, - 0x2819, 0x281a, 0x281a, 0x281a, 0x281b, 0x281b, 0x281c, 0x281c, - 0x281d, 0x281d, 0x281d, 0x281e, 0x281e, 0x281f, 0x281f, 0x2820, - 0x2820, 0x2821, 0x2821, 0x2821, 0x2822, 0x2822, 0x2823, 0x2823, - 0x2824, 0x2824, 0x2824, 0x2825, 0x2825, 0x2826, 0x2826, 0x2827, - 0x2827, 0x2828, 0x2828, 0x2828, 0x2829, 0x2829, 0x282a, 0x282a, - 0x282b, 0x282b, 0x282b, 0x282c, 0x282c, 0x282d, 0x282d, 0x282e, - 0x282e, 0x282e, 0x282f, 0x282f, 0x2830, 0x2830, 0x2831, 0x2831, - 0x2831, 0x2832, 0x2832, 0x2833, 0x2833, 0x2834, 0x2834, 0x2834, - 0x2835, 0x2835, 0x2836, 0x2836, 0x2837, 0x2837, 0x2837, 0x2838, - 0x2838, 0x2839, 0x2839, 0x283a, 0x283a, 0x283a, 0x283b, 0x283b, - 0x283c, 0x283c, 0x283d, 0x283d, 0x283d, 0x283e, 0x283e, 0x283f, - 0x283f, 0x2840, 0x2840, 0x2840, 0x2841, 0x2841, 0x2842, 0x2842, - 0x2842, 0x2843, 0x2843, 0x2844, 0x2844, 0x2845, 0x2845, 0x2845, - 0x2846, 0x2846, 0x2847, 0x2847, 0x2848, 0x2848, 0x2848, 0x2849, - 0x2849, 0x284a, 0x284a, 0x284a, 0x284b, 0x284b, 0x284c, 0x284c, - 0x284d, 0x284d, 0x284d, 0x284e, 0x284e, 0x284f, 0x284f, 0x284f, - 0x2850, 0x2850, 0x2851, 0x2851, 0x2852, 0x2852, 0x2852, 0x2853, - 0x2853, 0x2854, 0x2854, 0x2854, 0x2855, 0x2855, 0x2856, 0x2856, - 0x2857, 0x2857, 0x2857, 0x2858, 0x2858, 0x2859, 0x2859, 0x2859, - 0x285a, 0x285a, 0x285b, 0x285b, 0x285b, 0x285c, 0x285c, 0x285d, - 0x285d, 0x285d, 0x285e, 0x285e, 0x285f, 0x285f, 0x2860, 0x2860, - 0x2860, 0x2861, 0x2861, 0x2862, 0x2862, 0x2862, 0x2863, 0x2863, - 0x2864, 0x2864, 0x2864, 0x2865, 0x2865, 0x2866, 0x2866, 0x2866, - 0x2867, 0x2867, 0x2868, 0x2868, 0x2868, 0x2869, 0x2869, 0x286a, - 0x286a, 0x286a, 0x286b, 0x286b, 0x286c, 0x286c, 0x286d, 0x286d, - 0x286d, 0x286e, 0x286e, 0x286f, 0x286f, 0x286f, 0x2870, 0x2870, - 0x2871, 0x2871, 0x2871, 0x2872, 0x2872, 0x2873, 0x2873, 0x2873, - 0x2874, 0x2874, 0x2875, 0x2875, 0x2875, 0x2876, 0x2876, 0x2877, - 0x2877, 0x2877, 0x2878, 0x2878, 0x2879, 0x2879, 0x2879, 0x287a, - 0x287a, 0x287b, 0x287b, 0x287b, 0x287c, 0x287c, 0x287c, 0x287d, - 0x287d, 0x287e, 0x287e, 0x287e, 0x287f, 0x287f, 0x2880, 0x2880, - 0x2880, 0x2881, 0x2881, 0x2882, 0x2882, 0x2882, 0x2883, 0x2883, - 0x2884, 0x2884, 0x2884, 0x2885, 0x2885, 0x2886, 0x2886, 0x2886, - 0x2887, 0x2887, 0x2888, 0x2888, 0x2888, 0x2889, 0x2889, 0x2889, - 0x288a, 0x288a, 0x288b, 0x288b, 0x288b, 0x288c, 0x288c, 0x288d, - 0x288d, 0x288d, 0x288e, 0x288e, 0x288f, 0x288f, 0x288f, 0x2890, - 0x2890, 0x2890, 0x2891, 0x2891, 0x2892, 0x2892, 0x2892, 0x2893, - 0x2893, 0x2894, 0x2894, 0x2894, 0x2895, 0x2895, 0x2896, 0x2896, - 0x2896, 0x2897, 0x2897, 0x2897, 0x2898, 0x2898, 0x2899, 0x2899, - 0x2899, 0x289a, 0x289a, 0x289b, 0x289b, 0x289b, 0x289c, 0x289c, - 0x289c, 0x289d, 0x289d, 0x289e, 0x289e, 0x289e, 0x289f, 0x289f, - 0x289f, 0x28a0, 0x28a0, 0x28a1, 0x28a1, 0x28a1, 0x28a2, 0x28a2, - 0x28a3, 0x28a3, 0x28a3, 0x28a4, 0x28a4, 0x28a4, 0x28a5, 0x28a5, - 0x28a6, 0x28a6, 0x28a6, 0x28a7, 0x28a7, 0x28a7, 0x28a8, 0x28a8, - 0x28a9, 0x28a9, 0x28a9, 0x28aa, 0x28aa, 0x28ab, 0x28ab, 0x28ab, - 0x28ac, 0x28ac, 0x28ac, 0x28ad, 0x28ad, 0x28ae, 0x28ae, 0x28ae, - 0x28af, 0x28af, 0x28af, 0x28b0, 0x28b0, 0x28b1, 0x28b1, 0x28b1, - 0x28b2, 0x28b2, 0x28b2, 0x28b3, 0x28b3, 0x28b4, 0x28b4, 0x28b4, - 0x28b5, 0x28b5, 0x28b5, 0x28b6, 0x28b6, 0x28b7, 0x28b7, 0x28b7, - 0x28b8, 0x28b8, 0x28b8, 0x28b9, 0x28b9, 0x28ba, 0x28ba, 0x28ba, - 0x28bb, 0x28bb, 0x28bb, 0x28bc, 0x28bc, 0x28bc, 0x28bd, 0x28bd, - 0x28be, 0x28be, 0x28be, 0x28bf, 0x28bf, 0x28bf, 0x28c0, 0x28c0, - 0x28c1, 0x28c1, 0x28c1, 0x28c2, 0x28c2, 0x28c2, 0x28c3, 0x28c3, - 0x28c4, 0x28c4, 0x28c4, 0x28c5, 0x28c5, 0x28c5, 0x28c6, 0x28c6, - 0x28c6, 0x28c7, 0x28c7, 0x28c8, 0x28c8, 0x28c8, 0x28c9, 0x28c9, - 0x28c9, 0x28ca, 0x28ca, 0x28ca, 0x28cb, 0x28cb, 0x28cc, 0x28cc, - 0x28cc, 0x28cd, 0x28cd, 0x28cd, 0x28ce, 0x28ce, 0x28cf, 0x28cf, - 0x28cf, 0x28d0, 0x28d0, 0x28d0, 0x28d1, 0x28d1, 0x28d1, 0x28d2, - 0x28d2, 0x28d3, 0x28d3, 0x28d3, 0x28d4, 0x28d4, 0x28d4, 0x28d5, - 0x28d5, 0x28d5, 0x28d6, 0x28d6, 0x28d6, 0x28d7, 0x28d7, 0x28d8, - 0x28d8, 0x28d8, 0x28d9, 0x28d9, 0x28d9, 0x28da, 0x28da, 0x28da, - 0x28db, 0x28db, 0x28dc, 0x28dc, 0x28dc, 0x28dd, 0x28dd, 0x28dd, - 0x28de, 0x28de, 0x28de, 0x28df, 0x28df, 0x28e0, 0x28e0, 0x28e0, - 0x28e1, 0x28e1, 0x28e1, 0x28e2, 0x28e2, 0x28e2, 0x28e3, 0x28e3, - 0x28e3, 0x28e4, 0x28e4, 0x28e5, 0x28e5, 0x28e5, 0x28e6, 0x28e6, - 0x28e6, 0x28e7, 0x28e7, 0x28e7, 0x28e8, 0x28e8, 0x28e8, 0x28e9, - 0x28e9, 0x28e9, 0x28ea, 0x28ea, 0x28eb, 0x28eb, 0x28eb, 0x28ec, - 0x28ec, 0x28ec, 0x28ed, 0x28ed, 0x28ed, 0x28ee, 0x28ee, 0x28ee, - 0x28ef, 0x28ef, 0x28f0, 0x28f0, 0x28f0, 0x28f1, 0x28f1, 0x28f1, - 0x28f2, 0x28f2, 0x28f2, 0x28f3, 0x28f3, 0x28f3, 0x28f4, 0x28f4, - 0x28f4, 0x28f5, 0x28f5, 0x28f6, 0x28f6, 0x28f6, 0x28f7, 0x28f7, - 0x28f7, 0x28f8, 0x28f8, 0x28f8, 0x28f9, 0x28f9, 0x28f9, 0x28fa, - 0x28fa, 0x28fa, 0x28fb, 0x28fb, 0x28fb, 0x28fc, 0x28fc, 0x28fd, - 0x28fd, 0x28fd, 0x28fe, 0x28fe, 0x28fe, 0x28ff, 0x28ff, 0x28ff, - 0x2900, 0x2900, 0x2900, 0x2901, 0x2901, 0x2901, 0x2902, 0x2902, - 0x2902, 0x2903, 0x2903, 0x2903, 0x2904, 0x2904, 0x2905, 0x2905, - 0x2905, 0x2906, 0x2906, 0x2906, 0x2907, 0x2907, 0x2907, 0x2908, - 0x2908, 0x2908, 0x2909, 0x2909, 0x2909, 0x290a, 0x290a, 0x290a, - 0x290b, 0x290b, 0x290b, 0x290c, 0x290c, 0x290c, 0x290d, 0x290d, - 0x290d, 0x290e, 0x290e, 0x290e, 0x290f, 0x290f, 0x2910, 0x2910, - 0x2910, 0x2911, 0x2911, 0x2911, 0x2912, 0x2912, 0x2912, 0x2913, - 0x2913, 0x2913, 0x2914, 0x2914, 0x2914, 0x2915, 0x2915, 0x2915, - 0x2916, 0x2916, 0x2916, 0x2917, 0x2917, 0x2917, 0x2918, 0x2918, - 0x2918, 0x2919, 0x2919, 0x2919, 0x291a, 0x291a, 0x291a, 0x291b, - 0x291b, 0x291b, 0x291c, 0x291c, 0x291c, 0x291d, 0x291d, 0x291d, - 0x291e, 0x291e, 0x291f, 0x291f, 0x291f, 0x2920, 0x2920, 0x2920, - 0x2921, 0x2921, 0x2921, 0x2922, 0x2922, 0x2922, 0x2923, 0x2923, - 0x2923, 0x2924, 0x2924, 0x2924, 0x2925, 0x2925, 0x2925, 0x2926, - 0x2926, 0x2926, 0x2927, 0x2927, 0x2927, 0x2928, 0x2928, 0x2928, - 0x2929, 0x2929, 0x2929, 0x292a, 0x292a, 0x292a, 0x292b, 0x292b, - 0x292b, 0x292c, 0x292c, 0x292c, 0x292d, 0x292d, 0x292d, 0x292e, - 0x292e, 0x292e, 0x292f, 0x292f, 0x292f, 0x2930, 0x2930, 0x2930, - 0x2931, 0x2931, 0x2931, 0x2932, 0x2932, 0x2932, 0x2933, 0x2933, - 0x2933, 0x2934, 0x2934, 0x2934, 0x2935, 0x2935, 0x2935, 0x2936, - 0x2936, 0x2936, 0x2937, 0x2937, 0x2937, 0x2938, 0x2938, 0x2938, - 0x2939, 0x2939, 0x2939, 0x293a, 0x293a, 0x293a, 0x293b, 0x293b, - 0x293b, 0x293c, 0x293c, 0x293c, 0x293d, 0x293d, 0x293d, 0x293e, - 0x293e, 0x293e, 0x293e, 0x293f, 0x293f, 0x293f, 0x2940, 0x2940, - 0x2940, 0x2941, 0x2941, 0x2941, 0x2942, 0x2942, 0x2942, 0x2943, - 0x2943, 0x2943, 0x2944, 0x2944, 0x2944, 0x2945, 0x2945, 0x2945, - 0x2946, 0x2946, 0x2946, 0x2947, 0x2947, 0x2947, 0x2948, 0x2948, - 0x2948, 0x2949, 0x2949, 0x2949, 0x294a, 0x294a, 0x294a, 0x294b, - 0x294b, 0x294b, 0x294c, 0x294c, 0x294c, 0x294d, 0x294d, 0x294d, - 0x294d, 0x294e, 0x294e, 0x294e, 0x294f, 0x294f, 0x294f, 0x2950, - 0x2950, 0x2950, 0x2951, 0x2951, 0x2951, 0x2952, 0x2952, 0x2952, - 0x2953, 0x2953, 0x2953, 0x2954, 0x2954, 0x2954, 0x2955, 0x2955, - 0x2955, 0x2956, 0x2956, 0x2956, 0x2957, 0x2957, 0x2957, 0x2958, - 0x2958, 0x2958, 0x2958, 0x2959, 0x2959, 0x2959, 0x295a, 0x295a, - 0x295a, 0x295b, 0x295b, 0x295b, 0x295c, 0x295c, 0x295c, 0x295d, - 0x295d, 0x295d, 0x295e, 0x295e, 0x295e, 0x295f, 0x295f, 0x295f, - 0x2960, 0x2960, 0x2960, 0x2960, 0x2961, 0x2961, 0x2961, 0x2962, - 0x2962, 0x2962, 0x2963, 0x2963, 0x2963, 0x2964, 0x2964, 0x2964, - 0x2965, 0x2965, 0x2965, 0x2966, 0x2966, 0x2966, 0x2967, 0x2967, - 0x2967, 0x2967, 0x2968, 0x2968, 0x2968, 0x2969, 0x2969, 0x2969, - 0x296a, 0x296a, 0x296a, 0x296b, 0x296b, 0x296b, 0x296c, 0x296c, - 0x296c, 0x296d, 0x296d, 0x296d, 0x296d, 0x296e, 0x296e, 0x296e, - 0x296f, 0x296f, 0x296f, 0x2970, 0x2970, 0x2970, 0x2971, 0x2971, - 0x2971, 0x2972, 0x2972, 0x2972, 0x2972, 0x2973, 0x2973, 0x2973, - 0x2974, 0x2974, 0x2974, 0x2975, 0x2975, 0x2975, 0x2976, 0x2976, - 0x2976, 0x2977, 0x2977, 0x2977, 0x2977, 0x2978, 0x2978, 0x2978, - 0x2979, 0x2979, 0x2979, 0x297a, 0x297a, 0x297a, 0x297b, 0x297b, - 0x297b, 0x297c, 0x297c, 0x297d, 0x297e, 0x297e, 0x297f, 0x2980, - 0x2980, 0x2981, 0x2981, 0x2982, 0x2983, 0x2983, 0x2984, 0x2985, - 0x2985, 0x2986, 0x2986, 0x2987, 0x2988, 0x2988, 0x2989, 0x2989, - 0x298a, 0x298b, 0x298b, 0x298c, 0x298d, 0x298d, 0x298e, 0x298e, - 0x298f, 0x2990, 0x2990, 0x2991, 0x2991, 0x2992, 0x2993, 0x2993, - 0x2994, 0x2995, 0x2995, 0x2996, 0x2996, 0x2997, 0x2998, 0x2998, - 0x2999, 0x2999, 0x299a, 0x299b, 0x299b, 0x299c, 0x299c, 0x299d, - 0x299e, 0x299e, 0x299f, 0x299f, 0x29a0, 0x29a1, 0x29a1, 0x29a2, - 0x29a2, 0x29a3, 0x29a4, 0x29a4, 0x29a5, 0x29a5, 0x29a6, 0x29a7, - 0x29a7, 0x29a8, 0x29a8, 0x29a9, 0x29aa, 0x29aa, 0x29ab, 0x29ab, - 0x29ac, 0x29ad, 0x29ad, 0x29ae, 0x29ae, 0x29af, 0x29b0, 0x29b0, - 0x29b1, 0x29b1, 0x29b2, 0x29b3, 0x29b3, 0x29b4, 0x29b4, 0x29b5, - 0x29b6, 0x29b6, 0x29b7, 0x29b7, 0x29b8, 0x29b9, 0x29b9, 0x29ba, - 0x29ba, 0x29bb, 0x29bb, 0x29bc, 0x29bd, 0x29bd, 0x29be, 0x29be, - 0x29bf, 0x29c0, 0x29c0, 0x29c1, 0x29c1, 0x29c2, 0x29c3, 0x29c3, - 0x29c4, 0x29c4, 0x29c5, 0x29c5, 0x29c6, 0x29c7, 0x29c7, 0x29c8, - 0x29c8, 0x29c9, 0x29ca, 0x29ca, 0x29cb, 0x29cb, 0x29cc, 0x29cc, - 0x29cd, 0x29ce, 0x29ce, 0x29cf, 0x29cf, 0x29d0, 0x29d1, 0x29d1, - 0x29d2, 0x29d2, 0x29d3, 0x29d3, 0x29d4, 0x29d5, 0x29d5, 0x29d6, - 0x29d6, 0x29d7, 0x29d8, 0x29d8, 0x29d9, 0x29d9, 0x29da, 0x29da, - 0x29db, 0x29dc, 0x29dc, 0x29dd, 0x29dd, 0x29de, 0x29de, 0x29df, - 0x29e0, 0x29e0, 0x29e1, 0x29e1, 0x29e2, 0x29e2, 0x29e3, 0x29e4, - 0x29e4, 0x29e5, 0x29e5, 0x29e6, 0x29e6, 0x29e7, 0x29e8, 0x29e8, - 0x29e9, 0x29e9, 0x29ea, 0x29ea, 0x29eb, 0x29ec, 0x29ec, 0x29ed, - 0x29ed, 0x29ee, 0x29ee, 0x29ef, 0x29f0, 0x29f0, 0x29f1, 0x29f1, - 0x29f2, 0x29f2, 0x29f3, 0x29f3, 0x29f4, 0x29f5, 0x29f5, 0x29f6, - 0x29f6, 0x29f7, 0x29f7, 0x29f8, 0x29f9, 0x29f9, 0x29fa, 0x29fa, - 0x29fb, 0x29fb, 0x29fc, 0x29fc, 0x29fd, 0x29fe, 0x29fe, 0x29ff, - 0x29ff, 0x2a00, 0x2a00, 0x2a01, 0x2a02, 0x2a02, 0x2a03, 0x2a03, - 0x2a04, 0x2a04, 0x2a05, 0x2a05, 0x2a06, 0x2a07, 0x2a07, 0x2a08, - 0x2a08, 0x2a09, 0x2a09, 0x2a0a, 0x2a0a, 0x2a0b, 0x2a0c, 0x2a0c, - 0x2a0d, 0x2a0d, 0x2a0e, 0x2a0e, 0x2a0f, 0x2a0f, 0x2a10, 0x2a10, - 0x2a11, 0x2a12, 0x2a12, 0x2a13, 0x2a13, 0x2a14, 0x2a14, 0x2a15, - 0x2a15, 0x2a16, 0x2a17, 0x2a17, 0x2a18, 0x2a18, 0x2a19, 0x2a19, - 0x2a1a, 0x2a1a, 0x2a1b, 0x2a1b, 0x2a1c, 0x2a1d, 0x2a1d, 0x2a1e, - 0x2a1e, 0x2a1f, 0x2a1f, 0x2a20, 0x2a20, 0x2a21, 0x2a21, 0x2a22, - 0x2a23, 0x2a23, 0x2a24, 0x2a24, 0x2a25, 0x2a25, 0x2a26, 0x2a26, - 0x2a27, 0x2a27, 0x2a28, 0x2a29, 0x2a29, 0x2a2a, 0x2a2a, 0x2a2b, - 0x2a2b, 0x2a2c, 0x2a2c, 0x2a2d, 0x2a2d, 0x2a2e, 0x2a2e, 0x2a2f, - 0x2a30, 0x2a30, 0x2a31, 0x2a31, 0x2a32, 0x2a32, 0x2a33, 0x2a33, - 0x2a34, 0x2a34, 0x2a35, 0x2a35, 0x2a36, 0x2a37, 0x2a37, 0x2a38, - 0x2a38, 0x2a39, 0x2a39, 0x2a3a, 0x2a3a, 0x2a3b, 0x2a3b, 0x2a3c, - 0x2a3c, 0x2a3d, 0x2a3d, 0x2a3e, 0x2a3f, 0x2a3f, 0x2a40, 0x2a40, - 0x2a41, 0x2a41, 0x2a42, 0x2a42, 0x2a43, 0x2a43, 0x2a44, 0x2a44, - 0x2a45, 0x2a45, 0x2a46, 0x2a47, 0x2a47, 0x2a48, 0x2a48, 0x2a49, - 0x2a49, 0x2a4a, 0x2a4a, 0x2a4b, 0x2a4b, 0x2a4c, 0x2a4c, 0x2a4d, - 0x2a4d, 0x2a4e, 0x2a4e, 0x2a4f, 0x2a50, 0x2a50, 0x2a51, 0x2a51, - 0x2a52, 0x2a52, 0x2a53, 0x2a53, 0x2a54, 0x2a54, 0x2a55, 0x2a55, - 0x2a56, 0x2a56, 0x2a57, 0x2a57, 0x2a58, 0x2a58, 0x2a59, 0x2a59, - 0x2a5a, 0x2a5b, 0x2a5b, 0x2a5c, 0x2a5c, 0x2a5d, 0x2a5d, 0x2a5e, - 0x2a5e, 0x2a5f, 0x2a5f, 0x2a60, 0x2a60, 0x2a61, 0x2a61, 0x2a62, - 0x2a62, 0x2a63, 0x2a63, 0x2a64, 0x2a64, 0x2a65, 0x2a65, 0x2a66, - 0x2a66, 0x2a67, 0x2a67, 0x2a68, 0x2a69, 0x2a69, 0x2a6a, 0x2a6a, - 0x2a6b, 0x2a6b, 0x2a6c, 0x2a6c, 0x2a6d, 0x2a6d, 0x2a6e, 0x2a6e, - 0x2a6f, 0x2a6f, 0x2a70, 0x2a70, 0x2a71, 0x2a71, 0x2a72, 0x2a72, - 0x2a73, 0x2a73, 0x2a74, 0x2a74, 0x2a75, 0x2a75, 0x2a76, 0x2a76, - 0x2a77, 0x2a77, 0x2a78, 0x2a78, 0x2a79, 0x2a79, 0x2a7a, 0x2a7a, - 0x2a7b, 0x2a7b, 0x2a7c, 0x2a7d, 0x2a7d, 0x2a7e, 0x2a7e, 0x2a7f, - 0x2a7f, 0x2a80, 0x2a80, 0x2a81, 0x2a81, 0x2a82, 0x2a82, 0x2a83, - 0x2a83, 0x2a84, 0x2a84, 0x2a85, 0x2a85, 0x2a86, 0x2a86, 0x2a87, - 0x2a87, 0x2a88, 0x2a88, 0x2a89, 0x2a89, 0x2a8a, 0x2a8a, 0x2a8b, - 0x2a8b, 0x2a8c, 0x2a8c, 0x2a8d, 0x2a8d, 0x2a8e, 0x2a8e, 0x2a8f, - 0x2a8f, 0x2a90, 0x2a90, 0x2a91, 0x2a91, 0x2a92, 0x2a92, 0x2a93, - 0x2a93, 0x2a94, 0x2a94, 0x2a95, 0x2a95, 0x2a96, 0x2a96, 0x2a97, - 0x2a97, 0x2a98, 0x2a98, 0x2a99, 0x2a99, 0x2a9a, 0x2a9a, 0x2a9b, - 0x2a9b, 0x2a9c, 0x2a9c, 0x2a9d, 0x2a9d, 0x2a9e, 0x2a9e, 0x2a9f, - 0x2a9f, 0x2aa0, 0x2aa0, 0x2aa1, 0x2aa1, 0x2aa2, 0x2aa2, 0x2aa3, - 0x2aa3, 0x2aa4, 0x2aa4, 0x2aa5, 0x2aa5, 0x2aa6, 0x2aa6, 0x2aa7, - 0x2aa7, 0x2aa8, 0x2aa8, 0x2aa9, 0x2aa9, 0x2aaa, 0x2aaa, 0x2aab, - 0x2aab, 0x2aac, 0x2aac, 0x2aad, 0x2aad, 0x2aae, 0x2aae, 0x2aaf, - 0x2aaf, 0x2aaf, 0x2ab0, 0x2ab0, 0x2ab1, 0x2ab1, 0x2ab2, 0x2ab2, - 0x2ab3, 0x2ab3, 0x2ab4, 0x2ab4, 0x2ab5, 0x2ab5, 0x2ab6, 0x2ab6, - 0x2ab7, 0x2ab7, 0x2ab8, 0x2ab8, 0x2ab9, 0x2ab9, 0x2aba, 0x2aba, - 0x2abb, 0x2abb, 0x2abc, 0x2abc, 0x2abd, 0x2abd, 0x2abe, 0x2abe, - 0x2abf, 0x2abf, 0x2ac0, 0x2ac0, 0x2ac1, 0x2ac1, 0x2ac2, 0x2ac2, - 0x2ac2, 0x2ac3, 0x2ac3, 0x2ac4, 0x2ac4, 0x2ac5, 0x2ac5, 0x2ac6, - 0x2ac6, 0x2ac7, 0x2ac7, 0x2ac8, 0x2ac8, 0x2ac9, 0x2ac9, 0x2aca, - 0x2aca, 0x2acb, 0x2acb, 0x2acc, 0x2acc, 0x2acd, 0x2acd, 0x2ace, - 0x2ace, 0x2acf, 0x2acf, 0x2ad0, 0x2ad0, 0x2ad0, 0x2ad1, 0x2ad1, - 0x2ad2, 0x2ad2, 0x2ad3, 0x2ad3, 0x2ad4, 0x2ad4, 0x2ad5, 0x2ad5, - 0x2ad6, 0x2ad6, 0x2ad7, 0x2ad7, 0x2ad8, 0x2ad8, 0x2ad9, 0x2ad9, - 0x2ada, 0x2ada, 0x2adb, 0x2adb, 0x2adb, 0x2adc, 0x2adc, 0x2add, - 0x2add, 0x2ade, 0x2ade, 0x2adf, 0x2adf, 0x2ae0, 0x2ae0, 0x2ae1, - 0x2ae1, 0x2ae2, 0x2ae2, 0x2ae3, 0x2ae3, 0x2ae4, 0x2ae4, 0x2ae4, - 0x2ae5, 0x2ae5, 0x2ae6, 0x2ae6, 0x2ae7, 0x2ae7, 0x2ae8, 0x2ae8, - 0x2ae9, 0x2ae9, 0x2aea, 0x2aea, 0x2aeb, 0x2aeb, 0x2aec, 0x2aec, - 0x2aed, 0x2aed, 0x2aed, 0x2aee, 0x2aee, 0x2aef, 0x2aef, 0x2af0, - 0x2af0, 0x2af1, 0x2af1, 0x2af2, 0x2af2, 0x2af3, 0x2af3, 0x2af4, - 0x2af4, 0x2af4, 0x2af5, 0x2af5, 0x2af6, 0x2af6, 0x2af7, 0x2af7, - 0x2af8, 0x2af8, 0x2af9, 0x2af9, 0x2afa, 0x2afa, 0x2afb, 0x2afb, - 0x2afb, 0x2afc, 0x2afc, 0x2afd, 0x2afd, 0x2afe, 0x2afe, 0x2aff, - 0x2aff, 0x2b00, 0x2b00, 0x2b01, 0x2b01, 0x2b02, 0x2b02, 0x2b02, - 0x2b03, 0x2b03, 0x2b04, 0x2b04, 0x2b05, 0x2b05, 0x2b06, 0x2b06, - 0x2b07, 0x2b07, 0x2b08, 0x2b08, 0x2b08, 0x2b09, 0x2b09, 0x2b0a, - 0x2b0a, 0x2b0b, 0x2b0b, 0x2b0c, 0x2b0c, 0x2b0d, 0x2b0d, 0x2b0e, - 0x2b0e, 0x2b0e, 0x2b0f, 0x2b0f, 0x2b10, 0x2b10, 0x2b11, 0x2b11, - 0x2b12, 0x2b12, 0x2b13, 0x2b13, 0x2b14, 0x2b14, 0x2b14, 0x2b15, - 0x2b15, 0x2b16, 0x2b16, 0x2b17, 0x2b17, 0x2b18, 0x2b18, 0x2b19, - 0x2b19, 0x2b19, 0x2b1a, 0x2b1a, 0x2b1b, 0x2b1b, 0x2b1c, 0x2b1c, - 0x2b1d, 0x2b1d, 0x2b1e, 0x2b1e, 0x2b1e, 0x2b1f, 0x2b1f, 0x2b20, - 0x2b20, 0x2b21, 0x2b21, 0x2b22, 0x2b22, 0x2b23, 0x2b23, 0x2b23, - 0x2b24, 0x2b24, 0x2b25, 0x2b25, 0x2b26, 0x2b26, 0x2b27, 0x2b27, - 0x2b28, 0x2b28, 0x2b28, 0x2b29, 0x2b29, 0x2b2a, 0x2b2a, 0x2b2b, - 0x2b2b, 0x2b2c, 0x2b2c, 0x2b2d, 0x2b2d, 0x2b2d, 0x2b2e, 0x2b2e, - 0x2b2f, 0x2b2f, 0x2b30, 0x2b30, 0x2b31, 0x2b31, 0x2b31, 0x2b32, - 0x2b32, 0x2b33, 0x2b33, 0x2b34, 0x2b34, 0x2b35, 0x2b35, 0x2b36, - 0x2b36, 0x2b36, 0x2b37, 0x2b37, 0x2b38, 0x2b38, 0x2b39, 0x2b39, - 0x2b3a, 0x2b3a, 0x2b3a, 0x2b3b, 0x2b3b, 0x2b3c, 0x2b3c, 0x2b3d, - 0x2b3d, 0x2b3e, 0x2b3e, 0x2b3e, 0x2b3f, 0x2b3f, 0x2b40, 0x2b40, - 0x2b41, 0x2b41, 0x2b42, 0x2b42, 0x2b42, 0x2b43, 0x2b43, 0x2b44, - 0x2b44, 0x2b45, 0x2b45, 0x2b46, 0x2b46, 0x2b46, 0x2b47, 0x2b47, - 0x2b48, 0x2b48, 0x2b49, 0x2b49, 0x2b4a, 0x2b4a, 0x2b4a, 0x2b4b, - 0x2b4b, 0x2b4c, 0x2b4c, 0x2b4d, 0x2b4d, 0x2b4e, 0x2b4e, 0x2b4e, - 0x2b4f, 0x2b4f, 0x2b50, 0x2b50, 0x2b51, 0x2b51, 0x2b52, 0x2b52, - 0x2b52, 0x2b53, 0x2b53, 0x2b54, 0x2b54, 0x2b55, 0x2b55, 0x2b55, - 0x2b56, 0x2b56, 0x2b57, 0x2b57, 0x2b58, 0x2b58, 0x2b59, 0x2b59, - 0x2b59, 0x2b5a, 0x2b5a, 0x2b5b, 0x2b5b, 0x2b5c, 0x2b5c, 0x2b5c, - 0x2b5d, 0x2b5d, 0x2b5e, 0x2b5e, 0x2b5f, 0x2b5f, 0x2b60, 0x2b60, - 0x2b60, 0x2b61, 0x2b61, 0x2b62, 0x2b62, 0x2b63, 0x2b63, 0x2b63, - 0x2b64, 0x2b64, 0x2b65, 0x2b65, 0x2b66, 0x2b66, 0x2b67, 0x2b67, - 0x2b67, 0x2b68, 0x2b68, 0x2b69, 0x2b69, 0x2b6a, 0x2b6a, 0x2b6a, - 0x2b6b, 0x2b6b, 0x2b6c, 0x2b6c, 0x2b6d, 0x2b6d, 0x2b6d, 0x2b6e, - 0x2b6e, 0x2b6f, 0x2b6f, 0x2b70, 0x2b70, 0x2b70, 0x2b71, 0x2b71, - 0x2b72, 0x2b72, 0x2b73, 0x2b73, 0x2b73, 0x2b74, 0x2b74, 0x2b75, - 0x2b75, 0x2b76, 0x2b76, 0x2b77, 0x2b77, 0x2b77, 0x2b78, 0x2b78, - 0x2b79, 0x2b79, 0x2b7a, 0x2b7a, 0x2b7a, 0x2b7b, 0x2b7b, 0x2b7c, - 0x2b7c, 0x2b7d, 0x2b7d, 0x2b7d, 0x2b7e, 0x2b7e, 0x2b7f, 0x2b7f, - 0x2b80, 0x2b80, 0x2b80, 0x2b81, 0x2b81, 0x2b82, 0x2b82, 0x2b83, - 0x2b83, 0x2b84, 0x2b85, 0x2b85, 0x2b86, 0x2b87, 0x2b88, 0x2b89, - 0x2b8a, 0x2b8b, 0x2b8b, 0x2b8c, 0x2b8d, 0x2b8e, 0x2b8f, 0x2b90, - 0x2b91, 0x2b91, 0x2b92, 0x2b93, 0x2b94, 0x2b95, 0x2b96, 0x2b96, - 0x2b97, 0x2b98, 0x2b99, 0x2b9a, 0x2b9b, 0x2b9b, 0x2b9c, 0x2b9d, - 0x2b9e, 0x2b9f, 0x2ba0, 0x2ba1, 0x2ba1, 0x2ba2, 0x2ba3, 0x2ba4, - 0x2ba5, 0x2ba6, 0x2ba6, 0x2ba7, 0x2ba8, 0x2ba9, 0x2baa, 0x2bab, - 0x2bab, 0x2bac, 0x2bad, 0x2bae, 0x2baf, 0x2bb0, 0x2bb0, 0x2bb1, - 0x2bb2, 0x2bb3, 0x2bb4, 0x2bb5, 0x2bb5, 0x2bb6, 0x2bb7, 0x2bb8, - 0x2bb9, 0x2bb9, 0x2bba, 0x2bbb, 0x2bbc, 0x2bbd, 0x2bbe, 0x2bbe, - 0x2bbf, 0x2bc0, 0x2bc1, 0x2bc2, 0x2bc3, 0x2bc3, 0x2bc4, 0x2bc5, - 0x2bc6, 0x2bc7, 0x2bc7, 0x2bc8, 0x2bc9, 0x2bca, 0x2bcb, 0x2bcc, - 0x2bcc, 0x2bcd, 0x2bce, 0x2bcf, 0x2bd0, 0x2bd0, 0x2bd1, 0x2bd2, - 0x2bd3, 0x2bd4, 0x2bd4, 0x2bd5, 0x2bd6, 0x2bd7, 0x2bd8, 0x2bd9, - 0x2bd9, 0x2bda, 0x2bdb, 0x2bdc, 0x2bdd, 0x2bdd, 0x2bde, 0x2bdf, - 0x2be0, 0x2be1, 0x2be1, 0x2be2, 0x2be3, 0x2be4, 0x2be5, 0x2be5, - 0x2be6, 0x2be7, 0x2be8, 0x2be9, 0x2be9, 0x2bea, 0x2beb, 0x2bec, - 0x2bed, 0x2bed, 0x2bee, 0x2bef, 0x2bf0, 0x2bf1, 0x2bf1, 0x2bf2, - 0x2bf3, 0x2bf4, 0x2bf5, 0x2bf5, 0x2bf6, 0x2bf7, 0x2bf8, 0x2bf9, - 0x2bf9, 0x2bfa, 0x2bfb, 0x2bfc, 0x2bfd, 0x2bfd, 0x2bfe, 0x2bff, - 0x2c00, 0x2c00, 0x2c01, 0x2c01, 0x2c01, 0x2c02, 0x2c02, 0x2c03, - 0x2c03, 0x2c03, 0x2c04, 0x2c04, 0x2c05, 0x2c05, 0x2c05, 0x2c06, - 0x2c06, 0x2c07, 0x2c07, 0x2c07, 0x2c08, 0x2c08, 0x2c09, 0x2c09, - 0x2c09, 0x2c0a, 0x2c0a, 0x2c0b, 0x2c0b, 0x2c0b, 0x2c0c, 0x2c0c, - 0x2c0c, 0x2c0d, 0x2c0d, 0x2c0e, 0x2c0e, 0x2c0e, 0x2c0f, 0x2c0f, - 0x2c10, 0x2c10, 0x2c10, 0x2c11, 0x2c11, 0x2c12, 0x2c12, 0x2c12, - 0x2c13, 0x2c13, 0x2c13, 0x2c14, 0x2c14, 0x2c15, 0x2c15, 0x2c15, - 0x2c16, 0x2c16, 0x2c17, 0x2c17, 0x2c17, 0x2c18, 0x2c18, 0x2c18, - 0x2c19, 0x2c19, 0x2c1a, 0x2c1a, 0x2c1a, 0x2c1b, 0x2c1b, 0x2c1c, - 0x2c1c, 0x2c1c, 0x2c1d, 0x2c1d, 0x2c1d, 0x2c1e, 0x2c1e, 0x2c1f, - 0x2c1f, 0x2c1f, 0x2c20, 0x2c20, 0x2c21, 0x2c21, 0x2c21, 0x2c22, - 0x2c22, 0x2c22, 0x2c23, 0x2c23, 0x2c24, 0x2c24, 0x2c24, 0x2c25, - 0x2c25, 0x2c25, 0x2c26, 0x2c26, 0x2c27, 0x2c27, 0x2c27, 0x2c28, - 0x2c28, 0x2c28, 0x2c29, 0x2c29, 0x2c2a, 0x2c2a, 0x2c2a, 0x2c2b, - 0x2c2b, 0x2c2b, 0x2c2c, 0x2c2c, 0x2c2d, 0x2c2d, 0x2c2d, 0x2c2e, - 0x2c2e, 0x2c2f, 0x2c2f, 0x2c2f, 0x2c30, 0x2c30, 0x2c30, 0x2c31, - 0x2c31, 0x2c32, 0x2c32, 0x2c32, 0x2c33, 0x2c33, 0x2c33, 0x2c34, - 0x2c34, 0x2c34, 0x2c35, 0x2c35, 0x2c36, 0x2c36, 0x2c36, 0x2c37, - 0x2c37, 0x2c37, 0x2c38, 0x2c38, 0x2c39, 0x2c39, 0x2c39, 0x2c3a, - 0x2c3a, 0x2c3a, 0x2c3b, 0x2c3b, 0x2c3c, 0x2c3c, 0x2c3c, 0x2c3d, - 0x2c3d, 0x2c3d, 0x2c3e, 0x2c3e, 0x2c3e, 0x2c3f, 0x2c3f, 0x2c40, - 0x2c40, 0x2c40, 0x2c41, 0x2c41, 0x2c41, 0x2c42, 0x2c42, 0x2c43, - 0x2c43, 0x2c43, 0x2c44, 0x2c44, 0x2c44, 0x2c45, 0x2c45, 0x2c45, - 0x2c46, 0x2c46, 0x2c47, 0x2c47, 0x2c47, 0x2c48, 0x2c48, 0x2c48, - 0x2c49, 0x2c49, 0x2c49, 0x2c4a, 0x2c4a, 0x2c4b, 0x2c4b, 0x2c4b, - 0x2c4c, 0x2c4c, 0x2c4c, 0x2c4d, 0x2c4d, 0x2c4d, 0x2c4e, 0x2c4e, - 0x2c4f, 0x2c4f, 0x2c4f, 0x2c50, 0x2c50, 0x2c50, 0x2c51, 0x2c51, - 0x2c51, 0x2c52, 0x2c52, 0x2c53, 0x2c53, 0x2c53, 0x2c54, 0x2c54, - 0x2c54, 0x2c55, 0x2c55, 0x2c55, 0x2c56, 0x2c56, 0x2c56, 0x2c57, - 0x2c57, 0x2c58, 0x2c58, 0x2c58, 0x2c59, 0x2c59, 0x2c59, 0x2c5a, - 0x2c5a, 0x2c5a, 0x2c5b, 0x2c5b, 0x2c5c, 0x2c5c, 0x2c5c, 0x2c5d, - 0x2c5d, 0x2c5d, 0x2c5e, 0x2c5e, 0x2c5e, 0x2c5f, 0x2c5f, 0x2c5f, - 0x2c60, 0x2c60, 0x2c60, 0x2c61, 0x2c61, 0x2c62, 0x2c62, 0x2c62, - 0x2c63, 0x2c63, 0x2c63, 0x2c64, 0x2c64, 0x2c64, 0x2c65, 0x2c65, - 0x2c65, 0x2c66, 0x2c66, 0x2c67, 0x2c67, 0x2c67, 0x2c68, 0x2c68, - 0x2c68, 0x2c69, 0x2c69, 0x2c69, 0x2c6a, 0x2c6a, 0x2c6a, 0x2c6b, - 0x2c6b, 0x2c6b, 0x2c6c, 0x2c6c, 0x2c6c, 0x2c6d, 0x2c6d, 0x2c6e, - 0x2c6e, 0x2c6e, 0x2c6f, 0x2c6f, 0x2c6f, 0x2c70, 0x2c70, 0x2c70, - 0x2c71, 0x2c71, 0x2c71, 0x2c72, 0x2c72, 0x2c72, 0x2c73, 0x2c73, - 0x2c73, 0x2c74, 0x2c74, 0x2c75, 0x2c75, 0x2c75, 0x2c76, 0x2c76, - 0x2c76, 0x2c77, 0x2c77, 0x2c77, 0x2c78, 0x2c78, 0x2c78, 0x2c79, - 0x2c79, 0x2c79, 0x2c7a, 0x2c7a, 0x2c7a, 0x2c7b, 0x2c7b, 0x2c7b, - 0x2c7c, 0x2c7c, 0x2c7c, 0x2c7d, 0x2c7d, 0x2c7e, 0x2c7e, 0x2c7e, - 0x2c7f, 0x2c7f, 0x2c7f, 0x2c80, 0x2c80, 0x2c80, 0x2c81, 0x2c81, - 0x2c81, 0x2c82, 0x2c82, 0x2c82, 0x2c83, 0x2c83, 0x2c83, 0x2c84, - 0x2c84, 0x2c84, 0x2c85, 0x2c85, 0x2c85, 0x2c86, 0x2c86, 0x2c86, - 0x2c87, 0x2c87, 0x2c87, 0x2c88, 0x2c88, 0x2c88, 0x2c89, 0x2c89, - 0x2c8a, 0x2c8a, 0x2c8a, 0x2c8b, 0x2c8b, 0x2c8b, 0x2c8c, 0x2c8c, - 0x2c8c, 0x2c8d, 0x2c8d, 0x2c8d, 0x2c8e, 0x2c8e, 0x2c8e, 0x2c8f, - 0x2c8f, 0x2c8f, 0x2c90, 0x2c90, 0x2c90, 0x2c91, 0x2c91, 0x2c91, - 0x2c92, 0x2c92, 0x2c92, 0x2c93, 0x2c93, 0x2c93, 0x2c94, 0x2c94, - 0x2c94, 0x2c95, 0x2c95, 0x2c95, 0x2c96, 0x2c96, 0x2c96, 0x2c97, - 0x2c97, 0x2c97, 0x2c98, 0x2c98, 0x2c98, 0x2c99, 0x2c99, 0x2c99, - 0x2c9a, 0x2c9a, 0x2c9a, 0x2c9b, 0x2c9b, 0x2c9b, 0x2c9c, 0x2c9c, - 0x2c9c, 0x2c9d, 0x2c9d, 0x2c9d, 0x2c9e, 0x2c9e, 0x2c9e, 0x2c9f, - 0x2c9f, 0x2c9f, 0x2ca0, 0x2ca0, 0x2ca0, 0x2ca1, 0x2ca1, 0x2ca1, - 0x2ca2, 0x2ca2, 0x2ca2, 0x2ca3, 0x2ca3, 0x2ca3, 0x2ca4, 0x2ca4, - 0x2ca4, 0x2ca5, 0x2ca5, 0x2ca5, 0x2ca6, 0x2ca6, 0x2ca6, 0x2ca7, - 0x2ca7, 0x2ca7, 0x2ca8, 0x2ca8, 0x2ca8, 0x2ca9, 0x2ca9, 0x2ca9, - 0x2caa, 0x2caa, 0x2caa, 0x2cab, 0x2cab, 0x2cab, 0x2cac, 0x2cac, - 0x2cac, 0x2cad, 0x2cad, 0x2cad, 0x2cae, 0x2cae, 0x2cae, 0x2caf, - 0x2caf, 0x2caf, 0x2cb0, 0x2cb0, 0x2cb0, 0x2cb1, 0x2cb1, 0x2cb1, - 0x2cb1, 0x2cb2, 0x2cb2, 0x2cb2, 0x2cb3, 0x2cb3, 0x2cb3, 0x2cb4, - 0x2cb4, 0x2cb4, 0x2cb5, 0x2cb5, 0x2cb5, 0x2cb6, 0x2cb6, 0x2cb6, - 0x2cb7, 0x2cb7, 0x2cb7, 0x2cb8, 0x2cb8, 0x2cb8, 0x2cb9, 0x2cb9, - 0x2cb9, 0x2cba, 0x2cba, 0x2cba, 0x2cbb, 0x2cbb, 0x2cbb, 0x2cbc, - 0x2cbc, 0x2cbc, 0x2cbd, 0x2cbd, 0x2cbd, 0x2cbe, 0x2cbe, 0x2cbe, - 0x2cbe, 0x2cbf, 0x2cbf, 0x2cbf, 0x2cc0, 0x2cc0, 0x2cc0, 0x2cc1, - 0x2cc1, 0x2cc1, 0x2cc2, 0x2cc2, 0x2cc2, 0x2cc3, 0x2cc3, 0x2cc3, - 0x2cc4, 0x2cc4, 0x2cc4, 0x2cc5, 0x2cc5, 0x2cc5, 0x2cc6, 0x2cc6, - 0x2cc6, 0x2cc7, 0x2cc7, 0x2cc7, 0x2cc7, 0x2cc8, 0x2cc8, 0x2cc8, - 0x2cc9, 0x2cc9, 0x2cc9, 0x2cca, 0x2cca, 0x2cca, 0x2ccb, 0x2ccb, - 0x2ccb, 0x2ccc, 0x2ccc, 0x2ccc, 0x2ccd, 0x2ccd, 0x2ccd, 0x2cce, - 0x2cce, 0x2cce, 0x2cce, 0x2ccf, 0x2ccf, 0x2ccf, 0x2cd0, 0x2cd0, - 0x2cd0, 0x2cd1, 0x2cd1, 0x2cd1, 0x2cd2, 0x2cd2, 0x2cd2, 0x2cd3, - 0x2cd3, 0x2cd3, 0x2cd4, 0x2cd4, 0x2cd4, 0x2cd4, 0x2cd5, 0x2cd5, - 0x2cd5, 0x2cd6, 0x2cd6, 0x2cd6, 0x2cd7, 0x2cd7, 0x2cd7, 0x2cd8, - 0x2cd8, 0x2cd8, 0x2cd9, 0x2cd9, 0x2cd9, 0x2cda, 0x2cda, 0x2cda, - 0x2cda, 0x2cdb, 0x2cdb, 0x2cdb, 0x2cdc, 0x2cdc, 0x2cdc, 0x2cdd, - 0x2cdd, 0x2cdd, 0x2cde, 0x2cde, 0x2cde, 0x2cdf, 0x2cdf, 0x2cdf, - 0x2cdf, 0x2ce0, 0x2ce0, 0x2ce0, 0x2ce1, 0x2ce1, 0x2ce1, 0x2ce2, - 0x2ce2, 0x2ce2, 0x2ce3, 0x2ce3, 0x2ce3, 0x2ce4, 0x2ce4, 0x2ce4, - 0x2ce4, 0x2ce5, 0x2ce5, 0x2ce5, 0x2ce6, 0x2ce6, 0x2ce6, 0x2ce7, - 0x2ce7, 0x2ce7, 0x2ce8, 0x2ce8, 0x2ce8, 0x2ce8, 0x2ce9, 0x2ce9, - 0x2ce9, 0x2cea, 0x2cea, 0x2cea, 0x2ceb, 0x2ceb, 0x2ceb, 0x2cec, - 0x2cec, 0x2cec, 0x2ced, 0x2ced, 0x2ced, 0x2ced, 0x2cee, 0x2cee, - 0x2cee, 0x2cef, 0x2cef, 0x2cef, 0x2cf0, 0x2cf0, 0x2cf0, 0x2cf1, - 0x2cf1, 0x2cf1, 0x2cf1, 0x2cf2, 0x2cf2, 0x2cf2, 0x2cf3, 0x2cf3, - 0x2cf3, 0x2cf4, 0x2cf4, 0x2cf4, 0x2cf4, 0x2cf5, 0x2cf5, 0x2cf5, - 0x2cf6, 0x2cf6, 0x2cf6, 0x2cf7, 0x2cf7, 0x2cf7, 0x2cf8, 0x2cf8, - 0x2cf8, 0x2cf8, 0x2cf9, 0x2cf9, 0x2cf9, 0x2cfa, 0x2cfa, 0x2cfa, - 0x2cfb, 0x2cfb, 0x2cfb, 0x2cfc, 0x2cfc, 0x2cfc, 0x2cfc, 0x2cfd, - 0x2cfd, 0x2cfd, 0x2cfe, 0x2cfe, 0x2cfe, 0x2cff, 0x2cff, 0x2cff, - 0x2cff, 0x2d00, 0x2d00, 0x2d00, 0x2d01, 0x2d01, 0x2d01, 0x2d02, - 0x2d02, 0x2d02, 0x2d02, 0x2d03, 0x2d03, 0x2d03, 0x2d04, 0x2d04, - 0x2d04, 0x2d05, 0x2d05, 0x2d05, 0x2d05, 0x2d06, 0x2d06, 0x2d06, - 0x2d07, 0x2d07, 0x2d07, 0x2d08, 0x2d08, 0x2d08, 0x2d09, 0x2d09, - 0x2d09, 0x2d09, 0x2d0a, 0x2d0a, 0x2d0a, 0x2d0b, 0x2d0b, 0x2d0b, - 0x2d0c, 0x2d0c, 0x2d0c, 0x2d0c, 0x2d0d, 0x2d0d, 0x2d0d, 0x2d0e, - 0x2d0e, 0x2d0e, 0x2d0e, 0x2d0f, 0x2d0f, 0x2d0f, 0x2d10, 0x2d10, - 0x2d10, 0x2d11, 0x2d11, 0x2d11, 0x2d11, 0x2d12, 0x2d12, 0x2d12, - 0x2d13, 0x2d13, 0x2d13, 0x2d14, 0x2d14, 0x2d14, 0x2d14, 0x2d15, - 0x2d15, 0x2d15, 0x2d16, 0x2d16, 0x2d16, 0x2d17, 0x2d17, 0x2d17, - 0x2d17, 0x2d18, 0x2d18, 0x2d18, 0x2d19, 0x2d19, 0x2d19, 0x2d19, - 0x2d1a, 0x2d1a, 0x2d1a, 0x2d1b, 0x2d1b, 0x2d1b, 0x2d1c, 0x2d1c, - 0x2d1c, 0x2d1c, 0x2d1d, 0x2d1d, 0x2d1d, 0x2d1e, 0x2d1e, 0x2d1e, - 0x2d1f, 0x2d1f, 0x2d1f, 0x2d1f, 0x2d20, 0x2d20, 0x2d20, 0x2d21, - 0x2d21, 0x2d21, 0x2d21, 0x2d22, 0x2d22, 0x2d22, 0x2d23, 0x2d23, - 0x2d23, 0x2d23, 0x2d24, 0x2d24, 0x2d24, 0x2d25, 0x2d25, 0x2d25, - 0x2d26, 0x2d26, 0x2d27, 0x2d27, 0x2d28, 0x2d28, 0x2d29, 0x2d2a, - 0x2d2a, 0x2d2b, 0x2d2b, 0x2d2c, 0x2d2d, 0x2d2d, 0x2d2e, 0x2d2e, - 0x2d2f, 0x2d2f, 0x2d30, 0x2d31, 0x2d31, 0x2d32, 0x2d32, 0x2d33, - 0x2d33, 0x2d34, 0x2d35, 0x2d35, 0x2d36, 0x2d36, 0x2d37, 0x2d38, - 0x2d38, 0x2d39, 0x2d39, 0x2d3a, 0x2d3a, 0x2d3b, 0x2d3c, 0x2d3c, - 0x2d3d, 0x2d3d, 0x2d3e, 0x2d3e, 0x2d3f, 0x2d40, 0x2d40, 0x2d41, - 0x2d41, 0x2d42, 0x2d42, 0x2d43, 0x2d44, 0x2d44, 0x2d45, 0x2d45, - 0x2d46, 0x2d46, 0x2d47, 0x2d48, 0x2d48, 0x2d49, 0x2d49, 0x2d4a, - 0x2d4a, 0x2d4b, 0x2d4b, 0x2d4c, 0x2d4d, 0x2d4d, 0x2d4e, 0x2d4e, - 0x2d4f, 0x2d4f, 0x2d50, 0x2d51, 0x2d51, 0x2d52, 0x2d52, 0x2d53, - 0x2d53, 0x2d54, 0x2d54, 0x2d55, 0x2d56, 0x2d56, 0x2d57, 0x2d57, - 0x2d58, 0x2d58, 0x2d59, 0x2d5a, 0x2d5a, 0x2d5b, 0x2d5b, 0x2d5c, - 0x2d5c, 0x2d5d, 0x2d5d, 0x2d5e, 0x2d5f, 0x2d5f, 0x2d60, 0x2d60, - 0x2d61, 0x2d61, 0x2d62, 0x2d62, 0x2d63, 0x2d64, 0x2d64, 0x2d65, - 0x2d65, 0x2d66, 0x2d66, 0x2d67, 0x2d67, 0x2d68, 0x2d69, 0x2d69, - 0x2d6a, 0x2d6a, 0x2d6b, 0x2d6b, 0x2d6c, 0x2d6c, 0x2d6d, 0x2d6d, - 0x2d6e, 0x2d6f, 0x2d6f, 0x2d70, 0x2d70, 0x2d71, 0x2d71, 0x2d72, - 0x2d72, 0x2d73, 0x2d73, 0x2d74, 0x2d75, 0x2d75, 0x2d76, 0x2d76, - 0x2d77, 0x2d77, 0x2d78, 0x2d78, 0x2d79, 0x2d79, 0x2d7a, 0x2d7b, - 0x2d7b, 0x2d7c, 0x2d7c, 0x2d7d, 0x2d7d, 0x2d7e, 0x2d7e, 0x2d7f, - 0x2d7f, 0x2d80, 0x2d81, 0x2d81, 0x2d82, 0x2d82, 0x2d83, 0x2d83, - 0x2d84, 0x2d84, 0x2d85, 0x2d85, 0x2d86, 0x2d86, 0x2d87, 0x2d88, - 0x2d88, 0x2d89, 0x2d89, 0x2d8a, 0x2d8a, 0x2d8b, 0x2d8b, 0x2d8c, - 0x2d8c, 0x2d8d, 0x2d8d, 0x2d8e, 0x2d8e, 0x2d8f, 0x2d90, 0x2d90, - 0x2d91, 0x2d91, 0x2d92, 0x2d92, 0x2d93, 0x2d93, 0x2d94, 0x2d94, - 0x2d95, 0x2d95, 0x2d96, 0x2d96, 0x2d97, 0x2d97, 0x2d98, 0x2d99, - 0x2d99, 0x2d9a, 0x2d9a, 0x2d9b, 0x2d9b, 0x2d9c, 0x2d9c, 0x2d9d, - 0x2d9d, 0x2d9e, 0x2d9e, 0x2d9f, 0x2d9f, 0x2da0, 0x2da0, 0x2da1, - 0x2da2, 0x2da2, 0x2da3, 0x2da3, 0x2da4, 0x2da4, 0x2da5, 0x2da5, - 0x2da6, 0x2da6, 0x2da7, 0x2da7, 0x2da8, 0x2da8, 0x2da9, 0x2da9, - 0x2daa, 0x2daa, 0x2dab, 0x2dab, 0x2dac, 0x2dac, 0x2dad, 0x2dae, - 0x2dae, 0x2daf, 0x2daf, 0x2db0, 0x2db0, 0x2db1, 0x2db1, 0x2db2, - 0x2db2, 0x2db3, 0x2db3, 0x2db4, 0x2db4, 0x2db5, 0x2db5, 0x2db6, - 0x2db6, 0x2db7, 0x2db7, 0x2db8, 0x2db8, 0x2db9, 0x2db9, 0x2dba, - 0x2dba, 0x2dbb, 0x2dbb, 0x2dbc, 0x2dbd, 0x2dbd, 0x2dbe, 0x2dbe, - 0x2dbf, 0x2dbf, 0x2dc0, 0x2dc0, 0x2dc1, 0x2dc1, 0x2dc2, 0x2dc2, - 0x2dc3, 0x2dc3, 0x2dc4, 0x2dc4, 0x2dc5, 0x2dc5, 0x2dc6, 0x2dc6, - 0x2dc7, 0x2dc7, 0x2dc8, 0x2dc8, 0x2dc9, 0x2dc9, 0x2dca, 0x2dca, - 0x2dcb, 0x2dcb, 0x2dcc, 0x2dcc, 0x2dcd, 0x2dcd, 0x2dce, 0x2dce, - 0x2dcf, 0x2dcf, 0x2dd0, 0x2dd0, 0x2dd1, 0x2dd1, 0x2dd2, 0x2dd2, - 0x2dd3, 0x2dd3, 0x2dd4, 0x2dd4, 0x2dd5, 0x2dd5, 0x2dd6, 0x2dd6, - 0x2dd7, 0x2dd7, 0x2dd8, 0x2dd8, 0x2dd9, 0x2dd9, 0x2dda, 0x2dda, - 0x2ddb, 0x2ddb, 0x2ddc, 0x2ddc, 0x2ddd, 0x2ddd, 0x2dde, 0x2dde, - 0x2ddf, 0x2ddf, 0x2de0, 0x2de0, 0x2de1, 0x2de1, 0x2de2, 0x2de2, - 0x2de3, 0x2de3, 0x2de4, 0x2de4, 0x2de5, 0x2de5, 0x2de6, 0x2de6, - 0x2de7, 0x2de7, 0x2de8, 0x2de8, 0x2de9, 0x2de9, 0x2dea, 0x2dea, - 0x2deb, 0x2deb, 0x2dec, 0x2dec, 0x2ded, 0x2ded, 0x2dee, 0x2dee, - 0x2def, 0x2def, 0x2df0, 0x2df0, 0x2df1, 0x2df1, 0x2df2, 0x2df2, - 0x2df3, 0x2df3, 0x2df4, 0x2df4, 0x2df5, 0x2df5, 0x2df6, 0x2df6, - 0x2df7, 0x2df7, 0x2df8, 0x2df8, 0x2df9, 0x2df9, 0x2dfa, 0x2dfa, - 0x2dfb, 0x2dfb, 0x2dfc, 0x2dfc, 0x2dfd, 0x2dfd, 0x2dfe, 0x2dfe, - 0x2dfe, 0x2dff, 0x2dff, 0x2e00, 0x2e00, 0x2e01, 0x2e01, 0x2e02, - 0x2e02, 0x2e03, 0x2e03, 0x2e04, 0x2e04, 0x2e05, 0x2e05, 0x2e06, - 0x2e06, 0x2e07, 0x2e07, 0x2e08, 0x2e08, 0x2e09, 0x2e09, 0x2e0a, - 0x2e0a, 0x2e0b, 0x2e0b, 0x2e0c, 0x2e0c, 0x2e0d, 0x2e0d, 0x2e0e, - 0x2e0e, 0x2e0e, 0x2e0f, 0x2e0f, 0x2e10, 0x2e10, 0x2e11, 0x2e11, - 0x2e12, 0x2e12, 0x2e13, 0x2e13, 0x2e14, 0x2e14, 0x2e15, 0x2e15, - 0x2e16, 0x2e16, 0x2e17, 0x2e17, 0x2e18, 0x2e18, 0x2e19, 0x2e19, - 0x2e19, 0x2e1a, 0x2e1a, 0x2e1b, 0x2e1b, 0x2e1c, 0x2e1c, 0x2e1d, - 0x2e1d, 0x2e1e, 0x2e1e, 0x2e1f, 0x2e1f, 0x2e20, 0x2e20, 0x2e21, - 0x2e21, 0x2e22, 0x2e22, 0x2e23, 0x2e23, 0x2e23, 0x2e24, 0x2e24, - 0x2e25, 0x2e25, 0x2e26, 0x2e26, 0x2e27, 0x2e27, 0x2e28, 0x2e28, - 0x2e29, 0x2e29, 0x2e2a, 0x2e2a, 0x2e2b, 0x2e2b, 0x2e2b, 0x2e2c, - 0x2e2c, 0x2e2d, 0x2e2d, 0x2e2e, 0x2e2e, 0x2e2f, 0x2e2f, 0x2e30, - 0x2e30, 0x2e31, 0x2e31, 0x2e32, 0x2e32, 0x2e33, 0x2e33, 0x2e33, - 0x2e34, 0x2e34, 0x2e35, 0x2e35, 0x2e36, 0x2e36, 0x2e37, 0x2e37, - 0x2e38, 0x2e38, 0x2e39, 0x2e39, 0x2e3a, 0x2e3a, 0x2e3a, 0x2e3b, - 0x2e3b, 0x2e3c, 0x2e3c, 0x2e3d, 0x2e3d, 0x2e3e, 0x2e3e, 0x2e3f, - 0x2e3f, 0x2e40, 0x2e40, 0x2e40, 0x2e41, 0x2e41, 0x2e42, 0x2e42, - 0x2e43, 0x2e43, 0x2e44, 0x2e44, 0x2e45, 0x2e45, 0x2e46, 0x2e46, - 0x2e47, 0x2e47, 0x2e47, 0x2e48, 0x2e48, 0x2e49, 0x2e49, 0x2e4a, - 0x2e4a, 0x2e4b, 0x2e4b, 0x2e4c, 0x2e4c, 0x2e4c, 0x2e4d, 0x2e4d, - 0x2e4e, 0x2e4e, 0x2e4f, 0x2e4f, 0x2e50, 0x2e50, 0x2e51, 0x2e51, - 0x2e52, 0x2e52, 0x2e52, 0x2e53, 0x2e53, 0x2e54, 0x2e54, 0x2e55, - 0x2e55, 0x2e56, 0x2e56, 0x2e57, 0x2e57, 0x2e57, 0x2e58, 0x2e58, - 0x2e59, 0x2e59, 0x2e5a, 0x2e5a, 0x2e5b, 0x2e5b, 0x2e5c, 0x2e5c, - 0x2e5c, 0x2e5d, 0x2e5d, 0x2e5e, 0x2e5e, 0x2e5f, 0x2e5f, 0x2e60, - 0x2e60, 0x2e61, 0x2e61, 0x2e61, 0x2e62, 0x2e62, 0x2e63, 0x2e63, - 0x2e64, 0x2e64, 0x2e65, 0x2e65, 0x2e65, 0x2e66, 0x2e66, 0x2e67, - 0x2e67, 0x2e68, 0x2e68, 0x2e69, 0x2e69, 0x2e6a, 0x2e6a, 0x2e6a, - 0x2e6b, 0x2e6b, 0x2e6c, 0x2e6c, 0x2e6d, 0x2e6d, 0x2e6e, 0x2e6e, - 0x2e6e, 0x2e6f, 0x2e6f, 0x2e70, 0x2e70, 0x2e71, 0x2e71, 0x2e72, - 0x2e72, 0x2e72, 0x2e73, 0x2e73, 0x2e74, 0x2e74, 0x2e75, 0x2e75, - 0x2e76, 0x2e76, 0x2e77, 0x2e77, 0x2e77, 0x2e78, 0x2e78, 0x2e79, - 0x2e79, 0x2e7a, 0x2e7a, 0x2e7b, 0x2e7b, 0x2e7b, 0x2e7c, 0x2e7c, - 0x2e7d, 0x2e7d, 0x2e7e, 0x2e7e, 0x2e7e, 0x2e7f, 0x2e7f, 0x2e80, - 0x2e80, 0x2e81, 0x2e81, 0x2e82, 0x2e82, 0x2e82, 0x2e83, 0x2e83, - 0x2e84, 0x2e84, 0x2e85, 0x2e85, 0x2e86, 0x2e86, 0x2e86, 0x2e87, - 0x2e87, 0x2e88, 0x2e88, 0x2e89, 0x2e89, 0x2e8a, 0x2e8a, 0x2e8a, - 0x2e8b, 0x2e8b, 0x2e8c, 0x2e8c, 0x2e8d, 0x2e8d, 0x2e8d, 0x2e8e, - 0x2e8e, 0x2e8f, 0x2e8f, 0x2e90, 0x2e90, 0x2e91, 0x2e91, 0x2e91, - 0x2e92, 0x2e92, 0x2e93, 0x2e93, 0x2e94, 0x2e94, 0x2e94, 0x2e95, - 0x2e95, 0x2e96, 0x2e96, 0x2e97, 0x2e97, 0x2e97, 0x2e98, 0x2e98, - 0x2e99, 0x2e99, 0x2e9a, 0x2e9a, 0x2e9b, 0x2e9b, 0x2e9b, 0x2e9c, - 0x2e9c, 0x2e9d, 0x2e9d, 0x2e9e, 0x2e9e, 0x2e9e, 0x2e9f, 0x2e9f, - 0x2ea0, 0x2ea0, 0x2ea1, 0x2ea1, 0x2ea1, 0x2ea2, 0x2ea2, 0x2ea3, - 0x2ea3, 0x2ea4, 0x2ea4, 0x2ea4, 0x2ea5, 0x2ea5, 0x2ea6, 0x2ea6, - 0x2ea7, 0x2ea7, 0x2ea7, 0x2ea8, 0x2ea8, 0x2ea9, 0x2ea9, 0x2eaa, - 0x2eaa, 0x2eaa, 0x2eab, 0x2eab, 0x2eac, 0x2eac, 0x2ead, 0x2ead, - 0x2ead, 0x2eae, 0x2eae, 0x2eaf, 0x2eaf, 0x2eb0, 0x2eb0, 0x2eb0, - 0x2eb1, 0x2eb1, 0x2eb2, 0x2eb2, 0x2eb3, 0x2eb3, 0x2eb3, 0x2eb4, - 0x2eb4, 0x2eb5, 0x2eb5, 0x2eb6, 0x2eb6, 0x2eb6, 0x2eb7, 0x2eb7, - 0x2eb8, 0x2eb8, 0x2eb9, 0x2eb9, 0x2eb9, 0x2eba, 0x2eba, 0x2ebb, - 0x2ebb, 0x2ebc, 0x2ebc, 0x2ebc, 0x2ebd, 0x2ebd, 0x2ebe, 0x2ebe, - 0x2ebe, 0x2ebf, 0x2ebf, 0x2ec0, 0x2ec0, 0x2ec1, 0x2ec1, 0x2ec1, - 0x2ec2, 0x2ec2, 0x2ec3, 0x2ec3, 0x2ec4, 0x2ec4, 0x2ec4, 0x2ec5, - 0x2ec5, 0x2ec6, 0x2ec6, 0x2ec7, 0x2ec7, 0x2ec7, 0x2ec8, 0x2ec8, - 0x2ec9, 0x2ec9, 0x2ec9, 0x2eca, 0x2eca, 0x2ecb, 0x2ecb, 0x2ecc, - 0x2ecc, 0x2ecc, 0x2ecd, 0x2ecd, 0x2ece, 0x2ece, 0x2ece, 0x2ecf, - 0x2ecf, 0x2ed0, 0x2ed0, 0x2ed1, 0x2ed1, 0x2ed1, 0x2ed2, 0x2ed2, - 0x2ed3, 0x2ed3, 0x2ed3, 0x2ed4, 0x2ed4, 0x2ed5, 0x2ed5, 0x2ed6, - 0x2ed6, 0x2ed6, 0x2ed7, 0x2ed7, 0x2ed8, 0x2ed8, 0x2ed8, 0x2ed9, - 0x2ed9, 0x2eda, 0x2eda, 0x2edb, 0x2edb, 0x2edb, 0x2edc, 0x2edc, - 0x2edd, 0x2edd, 0x2edd, 0x2ede, 0x2ede, 0x2edf, 0x2edf, 0x2ee0, - 0x2ee0, 0x2ee0, 0x2ee1, 0x2ee1, 0x2ee2, 0x2ee2, 0x2ee2, 0x2ee3, - 0x2ee3, 0x2ee4, 0x2ee4, 0x2ee4, 0x2ee5, 0x2ee5, 0x2ee6, 0x2ee6, - 0x2ee7, 0x2ee7, 0x2ee7, 0x2ee8, 0x2ee8, 0x2ee9, 0x2ee9, 0x2ee9, - 0x2eea, 0x2eea, 0x2eeb, 0x2eeb, 0x2eeb, 0x2eec, 0x2eec, 0x2eed, - 0x2eed, 0x2eee, 0x2eee, 0x2eee, 0x2eef, 0x2eef, 0x2ef0, 0x2ef0, - 0x2ef0, 0x2ef1, 0x2ef1, 0x2ef2, 0x2ef2, 0x2ef2, 0x2ef3, 0x2ef3, - 0x2ef4, 0x2ef4, 0x2ef4, 0x2ef5, 0x2ef5, 0x2ef6, 0x2ef6, 0x2ef6, - 0x2ef7, 0x2ef7, 0x2ef8, 0x2ef8, 0x2ef9, 0x2ef9, 0x2ef9, 0x2efa, - 0x2efa, 0x2efb, 0x2efb, 0x2efb, 0x2efc, 0x2efc, 0x2efd, 0x2efd, - 0x2efd, 0x2efe, 0x2efe, 0x2eff, 0x2eff, 0x2eff, 0x2f00, 0x2f00, - 0x2f01, 0x2f01, 0x2f01, 0x2f02, 0x2f02, 0x2f03, 0x2f03, 0x2f03, - 0x2f04, 0x2f04, 0x2f05, 0x2f05, 0x2f05, 0x2f06, 0x2f06, 0x2f07, - 0x2f07, 0x2f07, 0x2f08, 0x2f08, 0x2f09, 0x2f09, 0x2f09, 0x2f0a, - 0x2f0a, 0x2f0b, 0x2f0b, 0x2f0b, 0x2f0c, 0x2f0c, 0x2f0d, 0x2f0d, - 0x2f0d, 0x2f0e, 0x2f0f, 0x2f10, 0x2f11, 0x2f12, 0x2f12, 0x2f13, - 0x2f14, 0x2f15, 0x2f15, 0x2f16, 0x2f17, 0x2f18, 0x2f19, 0x2f19, - 0x2f1a, 0x2f1b, 0x2f1c, 0x2f1d, 0x2f1d, 0x2f1e, 0x2f1f, 0x2f20, - 0x2f21, 0x2f21, 0x2f22, 0x2f23, 0x2f24, 0x2f25, 0x2f25, 0x2f26, - 0x2f27, 0x2f28, 0x2f29, 0x2f29, 0x2f2a, 0x2f2b, 0x2f2c, 0x2f2c, - 0x2f2d, 0x2f2e, 0x2f2f, 0x2f30, 0x2f30, 0x2f31, 0x2f32, 0x2f33, - 0x2f33, 0x2f34, 0x2f35, 0x2f36, 0x2f37, 0x2f37, 0x2f38, 0x2f39, - 0x2f3a, 0x2f3b, 0x2f3b, 0x2f3c, 0x2f3d, 0x2f3e, 0x2f3e, 0x2f3f, - 0x2f40, 0x2f41, 0x2f41, 0x2f42, 0x2f43, 0x2f44, 0x2f45, 0x2f45, - 0x2f46, 0x2f47, 0x2f48, 0x2f48, 0x2f49, 0x2f4a, 0x2f4b, 0x2f4c, - 0x2f4c, 0x2f4d, 0x2f4e, 0x2f4f, 0x2f4f, 0x2f50, 0x2f51, 0x2f52, - 0x2f52, 0x2f53, 0x2f54, 0x2f55, 0x2f56, 0x2f56, 0x2f57, 0x2f58, - 0x2f59, 0x2f59, 0x2f5a, 0x2f5b, 0x2f5c, 0x2f5c, 0x2f5d, 0x2f5e, - 0x2f5f, 0x2f5f, 0x2f60, 0x2f61, 0x2f62, 0x2f62, 0x2f63, 0x2f64, - 0x2f65, 0x2f65, 0x2f66, 0x2f67, 0x2f68, 0x2f69, 0x2f69, 0x2f6a, - 0x2f6b, 0x2f6c, 0x2f6c, 0x2f6d, 0x2f6e, 0x2f6f, 0x2f6f, 0x2f70, - 0x2f71, 0x2f72, 0x2f72, 0x2f73, 0x2f74, 0x2f75, 0x2f75, 0x2f76, - 0x2f77, 0x2f78, 0x2f78, 0x2f79, 0x2f7a, 0x2f7b, 0x2f7b, 0x2f7c, - 0x2f7d, 0x2f7e, 0x2f7e, 0x2f7f, 0x2f80, 0x2f81, 0x2f81, 0x2f82, - 0x2f83, 0x2f83, 0x2f84, 0x2f85, 0x2f86, 0x2f86, 0x2f87, 0x2f88, - 0x2f89, 0x2f89, 0x2f8a, 0x2f8b, 0x2f8c, 0x2f8c, 0x2f8d, 0x2f8e, - 0x2f8f, 0x2f8f, 0x2f90, 0x2f91, 0x2f92, 0x2f92, 0x2f93, 0x2f94, - 0x2f94, 0x2f95, 0x2f96, 0x2f97, 0x2f97, 0x2f98, 0x2f99, 0x2f9a, - 0x2f9a, 0x2f9b, 0x2f9c, 0x2f9d, 0x2f9d, 0x2f9e, 0x2f9f, 0x2f9f, - 0x2fa0, 0x2fa1, 0x2fa2, 0x2fa2, 0x2fa3, 0x2fa4, 0x2fa5, 0x2fa5, - 0x2fa6, 0x2fa7, 0x2fa7, 0x2fa8, 0x2fa9, 0x2faa, 0x2faa, 0x2fab, - 0x2fac, 0x2fad, 0x2fad, 0x2fae, 0x2faf, 0x2faf, 0x2fb0, 0x2fb1, - 0x2fb2, 0x2fb2, 0x2fb3, 0x2fb4, 0x2fb4, 0x2fb5, 0x2fb6, 0x2fb7, - 0x2fb7, 0x2fb8, 0x2fb9, 0x2fba, 0x2fba, 0x2fbb, 0x2fbc, 0x2fbc, - 0x2fbd, 0x2fbe, 0x2fbf, 0x2fbf, 0x2fc0, 0x2fc1, 0x2fc1, 0x2fc2, - 0x2fc3, 0x2fc4, 0x2fc4, 0x2fc5, 0x2fc6, 0x2fc6, 0x2fc7, 0x2fc8, - 0x2fc9, 0x2fc9, 0x2fca, 0x2fcb, 0x2fcb, 0x2fcc, 0x2fcd, 0x2fce, - 0x2fce, 0x2fcf, 0x2fd0, 0x2fd0, 0x2fd1, 0x2fd2, 0x2fd2, 0x2fd3, - 0x2fd4, 0x2fd5, 0x2fd5, 0x2fd6, 0x2fd7, 0x2fd7, 0x2fd8, 0x2fd9, - 0x2fda, 0x2fda, 0x2fdb, 0x2fdc, 0x2fdc, 0x2fdd, 0x2fde, 0x2fde, - 0x2fdf, 0x2fe0, 0x2fe1, 0x2fe1, 0x2fe2, 0x2fe3, 0x2fe3, 0x2fe4, - 0x2fe5, 0x2fe5, 0x2fe6, 0x2fe7, 0x2fe8, 0x2fe8, 0x2fe9, 0x2fea, - 0x2fea, 0x2feb, 0x2fec, 0x2fec, 0x2fed, 0x2fee, 0x2fef, 0x2fef, - 0x2ff0, 0x2ff1, 0x2ff1, 0x2ff2, 0x2ff3, 0x2ff3, 0x2ff4, 0x2ff5, - 0x2ff6, 0x2ff6, 0x2ff7, 0x2ff8, 0x2ff8, 0x2ff9, 0x2ffa, 0x2ffa, - 0x2ffb, 0x2ffc, 0x2ffc, 0x2ffd, 0x2ffe, 0x2fff, 0x2fff, 0x3000, - 0x3000, 0x3001, 0x3001, 0x3001, 0x3002, 0x3002, 0x3002, 0x3003, - 0x3003, 0x3003, 0x3004, 0x3004, 0x3004, 0x3005, 0x3005, 0x3005, - 0x3006, 0x3006, 0x3006, 0x3007, 0x3007, 0x3007, 0x3008, 0x3008, - 0x3009, 0x3009, 0x3009, 0x300a, 0x300a, 0x300a, 0x300b, 0x300b, - 0x300b, 0x300c, 0x300c, 0x300c, 0x300d, 0x300d, 0x300d, 0x300e, - 0x300e, 0x300e, 0x300f, 0x300f, 0x300f, 0x3010, 0x3010, 0x3010, - 0x3011, 0x3011, 0x3011, 0x3012, 0x3012, 0x3012, 0x3013, 0x3013, - 0x3013, 0x3014, 0x3014, 0x3014, 0x3015, 0x3015, 0x3015, 0x3016, - 0x3016, 0x3016, 0x3017, 0x3017, 0x3017, 0x3018, 0x3018, 0x3018, - 0x3019, 0x3019, 0x3019, 0x301a, 0x301a, 0x301a, 0x301b, 0x301b, - 0x301b, 0x301c, 0x301c, 0x301c, 0x301d, 0x301d, 0x301d, 0x301e, - 0x301e, 0x301e, 0x301f, 0x301f, 0x301f, 0x3020, 0x3020, 0x3020, - 0x3021, 0x3021, 0x3021, 0x3022, 0x3022, 0x3022, 0x3023, 0x3023, - 0x3023, 0x3024, 0x3024, 0x3024, 0x3025, 0x3025, 0x3025, 0x3026, - 0x3026, 0x3026, 0x3027, 0x3027, 0x3027, 0x3028, 0x3028, 0x3028, - 0x3029, 0x3029, 0x3029, 0x302a, 0x302a, 0x302a, 0x302b, 0x302b, - 0x302b, 0x302c, 0x302c, 0x302c, 0x302d, 0x302d, 0x302d, 0x302e, - 0x302e, 0x302e, 0x302f, 0x302f, 0x302f, 0x3030, 0x3030, 0x3030, - 0x3031, 0x3031, 0x3031, 0x3031, 0x3032, 0x3032, 0x3032, 0x3033, - 0x3033, 0x3033, 0x3034, 0x3034, 0x3034, 0x3035, 0x3035, 0x3035, - 0x3036, 0x3036, 0x3036, 0x3037, 0x3037, 0x3037, 0x3038, 0x3038, - 0x3038, 0x3039, 0x3039, 0x3039, 0x303a, 0x303a, 0x303a, 0x303b, - 0x303b, 0x303b, 0x303c, 0x303c, 0x303c, 0x303c, 0x303d, 0x303d, - 0x303d, 0x303e, 0x303e, 0x303e, 0x303f, 0x303f, 0x303f, 0x3040, - 0x3040, 0x3040, 0x3041, 0x3041, 0x3041, 0x3042, 0x3042, 0x3042, - 0x3043, 0x3043, 0x3043, 0x3044, 0x3044, 0x3044, 0x3044, 0x3045, - 0x3045, 0x3045, 0x3046, 0x3046, 0x3046, 0x3047, 0x3047, 0x3047, - 0x3048, 0x3048, 0x3048, 0x3049, 0x3049, 0x3049, 0x304a, 0x304a, - 0x304a, 0x304b, 0x304b, 0x304b, 0x304b, 0x304c, 0x304c, 0x304c, - 0x304d, 0x304d, 0x304d, 0x304e, 0x304e, 0x304e, 0x304f, 0x304f, - 0x304f, 0x3050, 0x3050, 0x3050, 0x3051, 0x3051, 0x3051, 0x3051, - 0x3052, 0x3052, 0x3052, 0x3053, 0x3053, 0x3053, 0x3054, 0x3054, - 0x3054, 0x3055, 0x3055, 0x3055, 0x3056, 0x3056, 0x3056, 0x3056, - 0x3057, 0x3057, 0x3057, 0x3058, 0x3058, 0x3058, 0x3059, 0x3059, - 0x3059, 0x305a, 0x305a, 0x305a, 0x305b, 0x305b, 0x305b, 0x305b, - 0x305c, 0x305c, 0x305c, 0x305d, 0x305d, 0x305d, 0x305e, 0x305e, - 0x305e, 0x305f, 0x305f, 0x305f, 0x305f, 0x3060, 0x3060, 0x3060, - 0x3061, 0x3061, 0x3061, 0x3062, 0x3062, 0x3062, 0x3063, 0x3063, - 0x3063, 0x3064, 0x3064, 0x3064, 0x3064, 0x3065, 0x3065, 0x3065, - 0x3066, 0x3066, 0x3066, 0x3067, 0x3067, 0x3067, 0x3068, 0x3068, - 0x3068, 0x3068, 0x3069, 0x3069, 0x3069, 0x306a, 0x306a, 0x306a, - 0x306b, 0x306b, 0x306b, 0x306b, 0x306c, 0x306c, 0x306c, 0x306d, - 0x306d, 0x306d, 0x306e, 0x306e, 0x306e, 0x306f, 0x306f, 0x306f, - 0x306f, 0x3070, 0x3070, 0x3070, 0x3071, 0x3071, 0x3071, 0x3072, - 0x3072, 0x3072, 0x3072, 0x3073, 0x3073, 0x3073, 0x3074, 0x3074, - 0x3074, 0x3075, 0x3075, 0x3075, 0x3076, 0x3076, 0x3076, 0x3076, - 0x3077, 0x3077, 0x3077, 0x3078, 0x3078, 0x3078, 0x3079, 0x3079, - 0x3079, 0x3079, 0x307a, 0x307a, 0x307a, 0x307b, 0x307b, 0x307b, - 0x307c, 0x307c, 0x307c, 0x307c, 0x307d, 0x307d, 0x307d, 0x307e, - 0x307e, 0x307e, 0x307f, 0x307f, 0x307f, 0x307f, 0x3080, 0x3080, - 0x3080, 0x3081, 0x3081, 0x3081, 0x3082, 0x3082, 0x3082, 0x3082, - 0x3083, 0x3083, 0x3083, 0x3084, 0x3084, 0x3084, 0x3085, 0x3085, - 0x3085, 0x3085, 0x3086, 0x3086, 0x3086, 0x3087, 0x3087, 0x3087, - 0x3087, 0x3088, 0x3088, 0x3088, 0x3089, 0x3089, 0x3089, 0x308a, - 0x308a, 0x308a, 0x308a, 0x308b, 0x308b, 0x308b, 0x308c, 0x308c, - 0x308c, 0x308d, 0x308d, 0x308d, 0x308d, 0x308e, 0x308e, 0x308e, - 0x308f, 0x308f, 0x308f, 0x308f, 0x3090, 0x3090, 0x3090, 0x3091, - 0x3091, 0x3091, 0x3092, 0x3092, 0x3092, 0x3092, 0x3093, 0x3093, - 0x3093, 0x3094, 0x3094, 0x3094, 0x3094, 0x3095, 0x3095, 0x3095, - 0x3096, 0x3096, 0x3096, 0x3097, 0x3097, 0x3097, 0x3097, 0x3098, - 0x3098, 0x3098, 0x3099, 0x3099, 0x3099, 0x3099, 0x309a, 0x309a, - 0x309a, 0x309b, 0x309b, 0x309b, 0x309b, 0x309c, 0x309c, 0x309c, - 0x309d, 0x309d, 0x309d, 0x309e, 0x309e, 0x309e, 0x309e, 0x309f, - 0x309f, 0x309f, 0x30a0, 0x30a0, 0x30a0, 0x30a0, 0x30a1, 0x30a1, - 0x30a1, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a3, 0x30a3, 0x30a3, - 0x30a4, 0x30a4, 0x30a4, 0x30a4, 0x30a5, 0x30a5, 0x30a5, 0x30a6, - 0x30a6, 0x30a6, 0x30a6, 0x30a7, 0x30a7, 0x30a7, 0x30a8, 0x30a8, - 0x30a8, 0x30a8, 0x30a9, 0x30a9, 0x30a9, 0x30aa, 0x30aa, 0x30aa, - 0x30aa, 0x30ab, 0x30ab, 0x30ab, 0x30ac, 0x30ac, 0x30ac, 0x30ac, - 0x30ad, 0x30ad, 0x30ad, 0x30ae, 0x30ae, 0x30ae, 0x30ae, 0x30af, - 0x30af, 0x30af, 0x30b0, 0x30b0, 0x30b0, 0x30b0, 0x30b1, 0x30b1, - 0x30b1, 0x30b2, 0x30b2, 0x30b2, 0x30b2, 0x30b3, 0x30b3, 0x30b3, - 0x30b4, 0x30b4, 0x30b4, 0x30b4, 0x30b5, 0x30b5, 0x30b5, 0x30b6, - 0x30b6, 0x30b6, 0x30b6, 0x30b7, 0x30b7, 0x30b7, 0x30b8, 0x30b8, - 0x30b8, 0x30b8, 0x30b9, 0x30b9, 0x30b9, 0x30ba, 0x30ba, 0x30ba, - 0x30ba, 0x30bb, 0x30bb, 0x30bb, 0x30bc, 0x30bc, 0x30bc, 0x30bc, - 0x30bd, 0x30bd, 0x30bd, 0x30bd, 0x30be, 0x30be, 0x30be, 0x30bf, - 0x30bf, 0x30bf, 0x30bf, 0x30c0, 0x30c0, 0x30c0, 0x30c1, 0x30c1, - 0x30c1, 0x30c1, 0x30c2, 0x30c2, 0x30c2, 0x30c3, 0x30c3, 0x30c3, - 0x30c3, 0x30c4, 0x30c4, 0x30c4, 0x30c4, 0x30c5, 0x30c5, 0x30c5, - 0x30c6, 0x30c6, 0x30c6, 0x30c6, 0x30c7, 0x30c7, 0x30c7, 0x30c8, - 0x30c8, 0x30c8, 0x30c8, 0x30c9, 0x30c9, 0x30c9, 0x30c9, 0x30ca, - 0x30ca, 0x30ca, 0x30cb, 0x30cb, 0x30cb, 0x30cb, 0x30cc, 0x30cc, - 0x30cc, 0x30cd, 0x30cd, 0x30cd, 0x30cd, 0x30ce, 0x30ce, 0x30ce, - 0x30ce, 0x30cf, 0x30cf, 0x30cf, 0x30d0, 0x30d0, 0x30d0, 0x30d0, - 0x30d1, 0x30d1, 0x30d1, 0x30d2, 0x30d2, 0x30d2, 0x30d2, 0x30d3, - 0x30d3, 0x30d3, 0x30d3, 0x30d4, 0x30d4, 0x30d4, 0x30d5, 0x30d5, - 0x30d5, 0x30d6, 0x30d6, 0x30d7, 0x30d7, 0x30d8, 0x30d8, 0x30d9, - 0x30d9, 0x30da, 0x30db, 0x30db, 0x30dc, 0x30dc, 0x30dd, 0x30dd, - 0x30de, 0x30de, 0x30df, 0x30df, 0x30e0, 0x30e1, 0x30e1, 0x30e2, - 0x30e2, 0x30e3, 0x30e3, 0x30e4, 0x30e4, 0x30e5, 0x30e5, 0x30e6, - 0x30e7, 0x30e7, 0x30e8, 0x30e8, 0x30e9, 0x30e9, 0x30ea, 0x30ea, - 0x30eb, 0x30eb, 0x30ec, 0x30ec, 0x30ed, 0x30ee, 0x30ee, 0x30ef, - 0x30ef, 0x30f0, 0x30f0, 0x30f1, 0x30f1, 0x30f2, 0x30f2, 0x30f3, - 0x30f3, 0x30f4, 0x30f4, 0x30f5, 0x30f6, 0x30f6, 0x30f7, 0x30f7, - 0x30f8, 0x30f8, 0x30f9, 0x30f9, 0x30fa, 0x30fa, 0x30fb, 0x30fb, - 0x30fc, 0x30fc, 0x30fd, 0x30fd, 0x30fe, 0x30ff, 0x30ff, 0x3100, - 0x3100, 0x3101, 0x3101, 0x3102, 0x3102, 0x3103, 0x3103, 0x3104, - 0x3104, 0x3105, 0x3105, 0x3106, 0x3106, 0x3107, 0x3107, 0x3108, - 0x3109, 0x3109, 0x310a, 0x310a, 0x310b, 0x310b, 0x310c, 0x310c, - 0x310d, 0x310d, 0x310e, 0x310e, 0x310f, 0x310f, 0x3110, 0x3110, - 0x3111, 0x3111, 0x3112, 0x3112, 0x3113, 0x3113, 0x3114, 0x3114, - 0x3115, 0x3116, 0x3116, 0x3117, 0x3117, 0x3118, 0x3118, 0x3119, - 0x3119, 0x311a, 0x311a, 0x311b, 0x311b, 0x311c, 0x311c, 0x311d, - 0x311d, 0x311e, 0x311e, 0x311f, 0x311f, 0x3120, 0x3120, 0x3121, - 0x3121, 0x3122, 0x3122, 0x3123, 0x3123, 0x3124, 0x3124, 0x3125, - 0x3125, 0x3126, 0x3126, 0x3127, 0x3127, 0x3128, 0x3128, 0x3129, - 0x3129, 0x312a, 0x312a, 0x312b, 0x312c, 0x312c, 0x312d, 0x312d, - 0x312e, 0x312e, 0x312f, 0x312f, 0x3130, 0x3130, 0x3131, 0x3131, - 0x3132, 0x3132, 0x3133, 0x3133, 0x3134, 0x3134, 0x3135, 0x3135, - 0x3136, 0x3136, 0x3137, 0x3137, 0x3138, 0x3138, 0x3139, 0x3139, - 0x313a, 0x313a, 0x313b, 0x313b, 0x313c, 0x313c, 0x313d, 0x313d, - 0x313e, 0x313e, 0x313f, 0x313f, 0x3140, 0x3140, 0x3141, 0x3141, - 0x3142, 0x3142, 0x3143, 0x3143, 0x3144, 0x3144, 0x3145, 0x3145, - 0x3146, 0x3146, 0x3147, 0x3147, 0x3148, 0x3148, 0x3148, 0x3149, - 0x3149, 0x314a, 0x314a, 0x314b, 0x314b, 0x314c, 0x314c, 0x314d, - 0x314d, 0x314e, 0x314e, 0x314f, 0x314f, 0x3150, 0x3150, 0x3151, - 0x3151, 0x3152, 0x3152, 0x3153, 0x3153, 0x3154, 0x3154, 0x3155, - 0x3155, 0x3156, 0x3156, 0x3157, 0x3157, 0x3158, 0x3158, 0x3159, - 0x3159, 0x315a, 0x315a, 0x315b, 0x315b, 0x315c, 0x315c, 0x315d, - 0x315d, 0x315e, 0x315e, 0x315e, 0x315f, 0x315f, 0x3160, 0x3160, - 0x3161, 0x3161, 0x3162, 0x3162, 0x3163, 0x3163, 0x3164, 0x3164, - 0x3165, 0x3165, 0x3166, 0x3166, 0x3167, 0x3167, 0x3168, 0x3168, - 0x3169, 0x3169, 0x316a, 0x316a, 0x316b, 0x316b, 0x316b, 0x316c, - 0x316c, 0x316d, 0x316d, 0x316e, 0x316e, 0x316f, 0x316f, 0x3170, - 0x3170, 0x3171, 0x3171, 0x3172, 0x3172, 0x3173, 0x3173, 0x3174, - 0x3174, 0x3175, 0x3175, 0x3175, 0x3176, 0x3176, 0x3177, 0x3177, - 0x3178, 0x3178, 0x3179, 0x3179, 0x317a, 0x317a, 0x317b, 0x317b, - 0x317c, 0x317c, 0x317d, 0x317d, 0x317e, 0x317e, 0x317e, 0x317f, - 0x317f, 0x3180, 0x3180, 0x3181, 0x3181, 0x3182, 0x3182, 0x3183, - 0x3183, 0x3184, 0x3184, 0x3185, 0x3185, 0x3185, 0x3186, 0x3186, - 0x3187, 0x3187, 0x3188, 0x3188, 0x3189, 0x3189, 0x318a, 0x318a, - 0x318b, 0x318b, 0x318c, 0x318c, 0x318c, 0x318d, 0x318d, 0x318e, - 0x318e, 0x318f, 0x318f, 0x3190, 0x3190, 0x3191, 0x3191, 0x3192, - 0x3192, 0x3193, 0x3193, 0x3193, 0x3194, 0x3194, 0x3195, 0x3195, - 0x3196, 0x3196, 0x3197, 0x3197, 0x3198, 0x3198, 0x3199, 0x3199, - 0x3199, 0x319a, 0x319a, 0x319b, 0x319b, 0x319c, 0x319c, 0x319d, - 0x319d, 0x319e, 0x319e, 0x319f, 0x319f, 0x319f, 0x31a0, 0x31a0, - 0x31a1, 0x31a1, 0x31a2, 0x31a2, 0x31a3, 0x31a3, 0x31a4, 0x31a4, - 0x31a4, 0x31a5, 0x31a5, 0x31a6, 0x31a6, 0x31a7, 0x31a7, 0x31a8, - 0x31a8, 0x31a9, 0x31a9, 0x31a9, 0x31aa, 0x31aa, 0x31ab, 0x31ab, - 0x31ac, 0x31ac, 0x31ad, 0x31ad, 0x31ae, 0x31ae, 0x31ae, 0x31af, - 0x31af, 0x31b0, 0x31b0, 0x31b1, 0x31b1, 0x31b2, 0x31b2, 0x31b2, - 0x31b3, 0x31b3, 0x31b4, 0x31b4, 0x31b5, 0x31b5, 0x31b6, 0x31b6, - 0x31b7, 0x31b7, 0x31b7, 0x31b8, 0x31b8, 0x31b9, 0x31b9, 0x31ba, - 0x31ba, 0x31bb, 0x31bb, 0x31bb, 0x31bc, 0x31bc, 0x31bd, 0x31bd, - 0x31be, 0x31be, 0x31bf, 0x31bf, 0x31bf, 0x31c0, 0x31c0, 0x31c1, - 0x31c1, 0x31c2, 0x31c2, 0x31c3, 0x31c3, 0x31c4, 0x31c4, 0x31c4, - 0x31c5, 0x31c5, 0x31c6, 0x31c6, 0x31c7, 0x31c7, 0x31c7, 0x31c8, - 0x31c8, 0x31c9, 0x31c9, 0x31ca, 0x31ca, 0x31cb, 0x31cb, 0x31cb, - 0x31cc, 0x31cc, 0x31cd, 0x31cd, 0x31ce, 0x31ce, 0x31cf, 0x31cf, - 0x31cf, 0x31d0, 0x31d0, 0x31d1, 0x31d1, 0x31d2, 0x31d2, 0x31d3, - 0x31d3, 0x31d3, 0x31d4, 0x31d4, 0x31d5, 0x31d5, 0x31d6, 0x31d6, - 0x31d6, 0x31d7, 0x31d7, 0x31d8, 0x31d8, 0x31d9, 0x31d9, 0x31da, - 0x31da, 0x31da, 0x31db, 0x31db, 0x31dc, 0x31dc, 0x31dd, 0x31dd, - 0x31dd, 0x31de, 0x31de, 0x31df, 0x31df, 0x31e0, 0x31e0, 0x31e0, - 0x31e1, 0x31e1, 0x31e2, 0x31e2, 0x31e3, 0x31e3, 0x31e4, 0x31e4, - 0x31e4, 0x31e5, 0x31e5, 0x31e6, 0x31e6, 0x31e7, 0x31e7, 0x31e7, - 0x31e8, 0x31e8, 0x31e9, 0x31e9, 0x31ea, 0x31ea, 0x31ea, 0x31eb, - 0x31eb, 0x31ec, 0x31ec, 0x31ed, 0x31ed, 0x31ed, 0x31ee, 0x31ee, - 0x31ef, 0x31ef, 0x31f0, 0x31f0, 0x31f0, 0x31f1, 0x31f1, 0x31f2, - 0x31f2, 0x31f3, 0x31f3, 0x31f3, 0x31f4, 0x31f4, 0x31f5, 0x31f5, - 0x31f6, 0x31f6, 0x31f6, 0x31f7, 0x31f7, 0x31f8, 0x31f8, 0x31f9, - 0x31f9, 0x31f9, 0x31fa, 0x31fa, 0x31fb, 0x31fb, 0x31fc, 0x31fc, - 0x31fc, 0x31fd, 0x31fd, 0x31fe, 0x31fe, 0x31ff, 0x31ff, 0x31ff, - 0x3200, 0x3200, 0x3201, 0x3201, 0x3201, 0x3202, 0x3202, 0x3203, - 0x3203, 0x3204, 0x3204, 0x3204, 0x3205, 0x3205, 0x3206, 0x3206, - 0x3207, 0x3207, 0x3207, 0x3208, 0x3208, 0x3209, 0x3209, 0x320a, - 0x320a, 0x320a, 0x320b, 0x320b, 0x320c, 0x320c, 0x320c, 0x320d, - 0x320d, 0x320e, 0x320e, 0x320f, 0x320f, 0x320f, 0x3210, 0x3210, - 0x3211, 0x3211, 0x3211, 0x3212, 0x3212, 0x3213, 0x3213, 0x3214, - 0x3214, 0x3214, 0x3215, 0x3215, 0x3216, 0x3216, 0x3216, 0x3217, - 0x3217, 0x3218, 0x3218, 0x3219, 0x3219, 0x3219, 0x321a, 0x321a, - 0x321b, 0x321b, 0x321b, 0x321c, 0x321c, 0x321d, 0x321d, 0x321e, - 0x321e, 0x321e, 0x321f, 0x321f, 0x3220, 0x3220, 0x3220, 0x3221, - 0x3221, 0x3222, 0x3222, 0x3222, 0x3223, 0x3223, 0x3224, 0x3224, - 0x3225, 0x3225, 0x3225, 0x3226, 0x3226, 0x3227, 0x3227, 0x3227, - 0x3228, 0x3228, 0x3229, 0x3229, 0x3229, 0x322a, 0x322a, 0x322b, - 0x322b, 0x322c, 0x322c, 0x322c, 0x322d, 0x322d, 0x322e, 0x322e, - 0x322e, 0x322f, 0x322f, 0x3230, 0x3230, 0x3230, 0x3231, 0x3231, - 0x3232, 0x3232, 0x3232, 0x3233, 0x3233, 0x3234, 0x3234, 0x3235, - 0x3235, 0x3235, 0x3236, 0x3236, 0x3237, 0x3237, 0x3237, 0x3238, - 0x3238, 0x3239, 0x3239, 0x3239, 0x323a, 0x323a, 0x323b, 0x323b, - 0x323b, 0x323c, 0x323c, 0x323d, 0x323d, 0x323d, 0x323e, 0x323e, - 0x323f, 0x323f, 0x323f, 0x3240, 0x3240, 0x3241, 0x3241, 0x3241, - 0x3242, 0x3242, 0x3243, 0x3243, 0x3243, 0x3244, 0x3244, 0x3245, - 0x3245, 0x3245, 0x3246, 0x3246, 0x3247, 0x3247, 0x3247, 0x3248, - 0x3248, 0x3249, 0x3249, 0x3249, 0x324a, 0x324a, 0x324b, 0x324b, - 0x324b, 0x324c, 0x324c, 0x324d, 0x324d, 0x324d, 0x324e, 0x324e, - 0x324f, 0x324f, 0x324f, 0x3250, 0x3250, 0x3251, 0x3251, 0x3251, - 0x3252, 0x3252, 0x3253, 0x3253, 0x3253, 0x3254, 0x3254, 0x3255, - 0x3255, 0x3255, 0x3256, 0x3256, 0x3257, 0x3257, 0x3257, 0x3258, - 0x3258, 0x3259, 0x3259, 0x3259, 0x325a, 0x325a, 0x325b, 0x325b, - 0x325b, 0x325c, 0x325c, 0x325d, 0x325d, 0x325d, 0x325e, 0x325e, - 0x325f, 0x325f, 0x325f, 0x3260, 0x3260, 0x3261, 0x3261, 0x3261, - 0x3262, 0x3262, 0x3262, 0x3263, 0x3263, 0x3264, 0x3264, 0x3264, - 0x3265, 0x3265, 0x3266, 0x3266, 0x3266, 0x3267, 0x3267, 0x3268, - 0x3268, 0x3268, 0x3269, 0x3269, 0x326a, 0x326a, 0x326a, 0x326b, - 0x326b, 0x326b, 0x326c, 0x326c, 0x326d, 0x326d, 0x326d, 0x326e, - 0x326e, 0x326f, 0x326f, 0x326f, 0x3270, 0x3270, 0x3271, 0x3271, - 0x3271, 0x3272, 0x3272, 0x3273, 0x3273, 0x3273, 0x3274, 0x3274, - 0x3274, 0x3275, 0x3275, 0x3276, 0x3276, 0x3276, 0x3277, 0x3277, - 0x3278, 0x3278, 0x3278, 0x3279, 0x3279, 0x3279, 0x327a, 0x327a, - 0x327b, 0x327b, 0x327b, 0x327c, 0x327c, 0x327d, 0x327d, 0x327d, - 0x327e, 0x327e, 0x327f, 0x327f, 0x327f, 0x3280, 0x3280, 0x3280, - 0x3281, 0x3281, 0x3282, 0x3282, 0x3282, 0x3283, 0x3283, 0x3284, - 0x3284, 0x3284, 0x3285, 0x3285, 0x3285, 0x3286, 0x3286, 0x3287, - 0x3287, 0x3287, 0x3288, 0x3288, 0x3288, 0x3289, 0x3289, 0x328a, - 0x328a, 0x328a, 0x328b, 0x328b, 0x328c, 0x328c, 0x328c, 0x328d, - 0x328d, 0x328d, 0x328e, 0x328e, 0x328f, 0x328f, 0x328f, 0x3290, - 0x3290, 0x3290, 0x3291, 0x3291, 0x3292, 0x3292, 0x3292, 0x3293, - 0x3293, 0x3294, 0x3294, 0x3294, 0x3295, 0x3295, 0x3295, 0x3296, - 0x3296, 0x3297, 0x3297, 0x3297, 0x3298, 0x3298, 0x3298, 0x3299, - 0x3299, 0x329a, 0x329a, 0x329a, 0x329b, 0x329b, 0x329b, 0x329c, - 0x329c, 0x329d, 0x329d, 0x329d, 0x329e, 0x329e, 0x329e, 0x329f, - 0x329f, 0x32a0, 0x32a1, 0x32a1, 0x32a2, 0x32a3, 0x32a4, 0x32a4, - 0x32a5, 0x32a6, 0x32a7, 0x32a7, 0x32a8, 0x32a9, 0x32aa, 0x32aa, - 0x32ab, 0x32ac, 0x32ad, 0x32ad, 0x32ae, 0x32af, 0x32b0, 0x32b0, - 0x32b1, 0x32b2, 0x32b3, 0x32b3, 0x32b4, 0x32b5, 0x32b6, 0x32b6, - 0x32b7, 0x32b8, 0x32b9, 0x32b9, 0x32ba, 0x32bb, 0x32bc, 0x32bc, - 0x32bd, 0x32be, 0x32be, 0x32bf, 0x32c0, 0x32c1, 0x32c1, 0x32c2, - 0x32c3, 0x32c4, 0x32c4, 0x32c5, 0x32c6, 0x32c7, 0x32c7, 0x32c8, - 0x32c9, 0x32c9, 0x32ca, 0x32cb, 0x32cc, 0x32cc, 0x32cd, 0x32ce, - 0x32cf, 0x32cf, 0x32d0, 0x32d1, 0x32d2, 0x32d2, 0x32d3, 0x32d4, - 0x32d4, 0x32d5, 0x32d6, 0x32d7, 0x32d7, 0x32d8, 0x32d9, 0x32d9, - 0x32da, 0x32db, 0x32dc, 0x32dc, 0x32dd, 0x32de, 0x32df, 0x32df, - 0x32e0, 0x32e1, 0x32e1, 0x32e2, 0x32e3, 0x32e4, 0x32e4, 0x32e5, - 0x32e6, 0x32e6, 0x32e7, 0x32e8, 0x32e9, 0x32e9, 0x32ea, 0x32eb, - 0x32eb, 0x32ec, 0x32ed, 0x32ee, 0x32ee, 0x32ef, 0x32f0, 0x32f0, - 0x32f1, 0x32f2, 0x32f3, 0x32f3, 0x32f4, 0x32f5, 0x32f5, 0x32f6, - 0x32f7, 0x32f8, 0x32f8, 0x32f9, 0x32fa, 0x32fa, 0x32fb, 0x32fc, - 0x32fc, 0x32fd, 0x32fe, 0x32ff, 0x32ff, 0x3300, 0x3301, 0x3301, - 0x3302, 0x3303, 0x3304, 0x3304, 0x3305, 0x3306, 0x3306, 0x3307, - 0x3308, 0x3308, 0x3309, 0x330a, 0x330b, 0x330b, 0x330c, 0x330d, - 0x330d, 0x330e, 0x330f, 0x330f, 0x3310, 0x3311, 0x3311, 0x3312, - 0x3313, 0x3314, 0x3314, 0x3315, 0x3316, 0x3316, 0x3317, 0x3318, - 0x3318, 0x3319, 0x331a, 0x331b, 0x331b, 0x331c, 0x331d, 0x331d, - 0x331e, 0x331f, 0x331f, 0x3320, 0x3321, 0x3321, 0x3322, 0x3323, - 0x3323, 0x3324, 0x3325, 0x3326, 0x3326, 0x3327, 0x3328, 0x3328, - 0x3329, 0x332a, 0x332a, 0x332b, 0x332c, 0x332c, 0x332d, 0x332e, - 0x332e, 0x332f, 0x3330, 0x3330, 0x3331, 0x3332, 0x3333, 0x3333, - 0x3334, 0x3335, 0x3335, 0x3336, 0x3337, 0x3337, 0x3338, 0x3339, - 0x3339, 0x333a, 0x333b, 0x333b, 0x333c, 0x333d, 0x333d, 0x333e, - 0x333f, 0x333f, 0x3340, 0x3341, 0x3341, 0x3342, 0x3343, 0x3343, - 0x3344, 0x3345, 0x3345, 0x3346, 0x3347, 0x3347, 0x3348, 0x3349, - 0x334a, 0x334a, 0x334b, 0x334c, 0x334c, 0x334d, 0x334e, 0x334e, - 0x334f, 0x3350, 0x3350, 0x3351, 0x3352, 0x3352, 0x3353, 0x3354, - 0x3354, 0x3355, 0x3356, 0x3356, 0x3357, 0x3358, 0x3358, 0x3359, - 0x335a, 0x335a, 0x335b, 0x335c, 0x335c, 0x335d, 0x335e, 0x335e, - 0x335f, 0x335f, 0x3360, 0x3361, 0x3361, 0x3362, 0x3363, 0x3363, - 0x3364, 0x3365, 0x3365, 0x3366, 0x3367, 0x3367, 0x3368, 0x3369, - 0x3369, 0x336a, 0x336b, 0x336b, 0x336c, 0x336d, 0x336d, 0x336e, - 0x336f, 0x336f, 0x3370, 0x3371, 0x3371, 0x3372, 0x3373, 0x3373, - 0x3374, 0x3375, 0x3375, 0x3376, 0x3376, 0x3377, 0x3378, 0x3378, - 0x3379, 0x337a, 0x337a, 0x337b, 0x337c, 0x337c, 0x337d, 0x337e, - 0x337e, 0x337f, 0x3380, 0x3380, 0x3381, 0x3382, 0x3382, 0x3383, - 0x3383, 0x3384, 0x3385, 0x3385, 0x3386, 0x3387, 0x3387, 0x3388, - 0x3389, 0x3389, 0x338a, 0x338b, 0x338b, 0x338c, 0x338c, 0x338d, - 0x338e, 0x338e, 0x338f, 0x3390, 0x3390, 0x3391, 0x3392, 0x3392, - 0x3393, 0x3394, 0x3394, 0x3395, 0x3395, 0x3396, 0x3397, 0x3397, - 0x3398, 0x3399, 0x3399, 0x339a, 0x339b, 0x339b, 0x339c, 0x339c, - 0x339d, 0x339e, 0x339e, 0x339f, 0x33a0, 0x33a0, 0x33a1, 0x33a2, - 0x33a2, 0x33a3, 0x33a3, 0x33a4, 0x33a5, 0x33a5, 0x33a6, 0x33a7, - 0x33a7, 0x33a8, 0x33a9, 0x33a9, 0x33aa, 0x33aa, 0x33ab, 0x33ac, - 0x33ac, 0x33ad, 0x33ae, 0x33ae, 0x33af, 0x33af, 0x33b0, 0x33b1, - 0x33b1, 0x33b2, 0x33b3, 0x33b3, 0x33b4, 0x33b5, 0x33b5, 0x33b6, - 0x33b6, 0x33b7, 0x33b8, 0x33b8, 0x33b9, 0x33ba, 0x33ba, 0x33bb, - 0x33bb, 0x33bc, 0x33bd, 0x33bd, 0x33be, 0x33bf, 0x33bf, 0x33c0, - 0x33c0, 0x33c1, 0x33c2, 0x33c2, 0x33c3, 0x33c3, 0x33c4, 0x33c5, - 0x33c5, 0x33c6, 0x33c7, 0x33c7, 0x33c8, 0x33c8, 0x33c9, 0x33ca, - 0x33ca, 0x33cb, 0x33cc, 0x33cc, 0x33cd, 0x33cd, 0x33ce, 0x33cf, - 0x33cf, 0x33d0, 0x33d1, 0x33d1, 0x33d2, 0x33d2, 0x33d3, 0x33d4, - 0x33d4, 0x33d5, 0x33d5, 0x33d6, 0x33d7, 0x33d7, 0x33d8, 0x33d9, - 0x33d9, 0x33da, 0x33da, 0x33db, 0x33dc, 0x33dc, 0x33dd, 0x33dd, - 0x33de, 0x33df, 0x33df, 0x33e0, 0x33e0, 0x33e1, 0x33e2, 0x33e2, - 0x33e3, 0x33e4, 0x33e4, 0x33e5, 0x33e5, 0x33e6, 0x33e7, 0x33e7, - 0x33e8, 0x33e8, 0x33e9, 0x33ea, 0x33ea, 0x33eb, 0x33eb, 0x33ec, - 0x33ed, 0x33ed, 0x33ee, 0x33ee, 0x33ef, 0x33f0, 0x33f0, 0x33f1, - 0x33f1, 0x33f2, 0x33f3, 0x33f3, 0x33f4, 0x33f5, 0x33f5, 0x33f6, - 0x33f6, 0x33f7, 0x33f8, 0x33f8, 0x33f9, 0x33f9, 0x33fa, 0x33fb, - 0x33fb, 0x33fc, 0x33fc, 0x33fd, 0x33fe, 0x33fe, 0x33ff, 0x33ff, - 0x3400, 0x3400, 0x3401, 0x3401, 0x3401, 0x3401, 0x3402, 0x3402, - 0x3402, 0x3403, 0x3403, 0x3403, 0x3404, 0x3404, 0x3404, 0x3404, - 0x3405, 0x3405, 0x3405, 0x3406, 0x3406, 0x3406, 0x3407, 0x3407, - 0x3407, 0x3407, 0x3408, 0x3408, 0x3408, 0x3409, 0x3409, 0x3409, - 0x340a, 0x340a, 0x340a, 0x340a, 0x340b, 0x340b, 0x340b, 0x340c, - 0x340c, 0x340c, 0x340c, 0x340d, 0x340d, 0x340d, 0x340e, 0x340e, - 0x340e, 0x340f, 0x340f, 0x340f, 0x340f, 0x3410, 0x3410, 0x3410, - 0x3411, 0x3411, 0x3411, 0x3411, 0x3412, 0x3412, 0x3412, 0x3413, - 0x3413, 0x3413, 0x3414, 0x3414, 0x3414, 0x3414, 0x3415, 0x3415, - 0x3415, 0x3416, 0x3416, 0x3416, 0x3416, 0x3417, 0x3417, 0x3417, - 0x3418, 0x3418, 0x3418, 0x3419, 0x3419, 0x3419, 0x3419, 0x341a, - 0x341a, 0x341a, 0x341b, 0x341b, 0x341b, 0x341b, 0x341c, 0x341c, - 0x341c, 0x341d, 0x341d, 0x341d, 0x341d, 0x341e, 0x341e, 0x341e, - 0x341f, 0x341f, 0x341f, 0x341f, 0x3420, 0x3420, 0x3420, 0x3421, - 0x3421, 0x3421, 0x3422, 0x3422, 0x3422, 0x3422, 0x3423, 0x3423, - 0x3423, 0x3424, 0x3424, 0x3424, 0x3424, 0x3425, 0x3425, 0x3425, - 0x3426, 0x3426, 0x3426, 0x3426, 0x3427, 0x3427, 0x3427, 0x3428, - 0x3428, 0x3428, 0x3428, 0x3429, 0x3429, 0x3429, 0x342a, 0x342a, - 0x342a, 0x342a, 0x342b, 0x342b, 0x342b, 0x342c, 0x342c, 0x342c, - 0x342c, 0x342d, 0x342d, 0x342d, 0x342e, 0x342e, 0x342e, 0x342e, - 0x342f, 0x342f, 0x342f, 0x3430, 0x3430, 0x3430, 0x3430, 0x3431, - 0x3431, 0x3431, 0x3432, 0x3432, 0x3432, 0x3432, 0x3433, 0x3433, - 0x3433, 0x3433, 0x3434, 0x3434, 0x3434, 0x3435, 0x3435, 0x3435, - 0x3435, 0x3436, 0x3436, 0x3436, 0x3437, 0x3437, 0x3437, 0x3437, - 0x3438, 0x3438, 0x3438, 0x3439, 0x3439, 0x3439, 0x3439, 0x343a, - 0x343a, 0x343a, 0x343b, 0x343b, 0x343b, 0x343b, 0x343c, 0x343c, - 0x343c, 0x343c, 0x343d, 0x343d, 0x343d, 0x343e, 0x343e, 0x343e, - 0x343e, 0x343f, 0x343f, 0x343f, 0x3440, 0x3440, 0x3440, 0x3440, - 0x3441, 0x3441, 0x3441, 0x3442, 0x3442, 0x3442, 0x3442, 0x3443, - 0x3443, 0x3443, 0x3443, 0x3444, 0x3444, 0x3444, 0x3445, 0x3445, - 0x3445, 0x3445, 0x3446, 0x3446, 0x3446, 0x3447, 0x3447, 0x3447, - 0x3447, 0x3448, 0x3448, 0x3448, 0x3448, 0x3449, 0x3449, 0x3449, - 0x344a, 0x344a, 0x344a, 0x344a, 0x344b, 0x344b, 0x344b, 0x344b, - 0x344c, 0x344c, 0x344c, 0x344d, 0x344d, 0x344d, 0x344d, 0x344e, - 0x344e, 0x344e, 0x344f, 0x344f, 0x344f, 0x344f, 0x3450, 0x3450, - 0x3450, 0x3450, 0x3451, 0x3451, 0x3451, 0x3452, 0x3452, 0x3452, - 0x3452, 0x3453, 0x3453, 0x3453, 0x3453, 0x3454, 0x3454, 0x3454, - 0x3455, 0x3455, 0x3455, 0x3455, 0x3456, 0x3456, 0x3456, 0x3456, - 0x3457, 0x3457, 0x3457, 0x3458, 0x3458, 0x3458, 0x3458, 0x3459, - 0x3459, 0x3459, 0x3459, 0x345a, 0x345a, 0x345a, 0x345b, 0x345b, - 0x345b, 0x345b, 0x345c, 0x345c, 0x345c, 0x345c, 0x345d, 0x345d, - 0x345d, 0x345d, 0x345e, 0x345e, 0x345e, 0x345f, 0x345f, 0x345f, - 0x345f, 0x3460, 0x3460, 0x3460, 0x3460, 0x3461, 0x3461, 0x3461, - 0x3462, 0x3462, 0x3462, 0x3462, 0x3463, 0x3463, 0x3463, 0x3463, - 0x3464, 0x3464, 0x3464, 0x3464, 0x3465, 0x3465, 0x3465, 0x3466, - 0x3466, 0x3466, 0x3466, 0x3467, 0x3467, 0x3467, 0x3467, 0x3468, - 0x3468, 0x3468, 0x3468, 0x3469, 0x3469, 0x3469, 0x346a, 0x346a, - 0x346a, 0x346a, 0x346b, 0x346b, 0x346b, 0x346b, 0x346c, 0x346c, - 0x346c, 0x346c, 0x346d, 0x346d, 0x346d, 0x346e, 0x346e, 0x346e, - 0x346e, 0x346f, 0x346f, 0x346f, 0x346f, 0x3470, 0x3470, 0x3470, - 0x3470, 0x3471, 0x3471, 0x3471, 0x3472, 0x3472, 0x3472, 0x3472, - 0x3473, 0x3473, 0x3473, 0x3473, 0x3474, 0x3474, 0x3474, 0x3474, - 0x3475, 0x3475, 0x3475, 0x3475, 0x3476, 0x3476, 0x3476, 0x3477, - 0x3477, 0x3477, 0x3477, 0x3478, 0x3478, 0x3478, 0x3478, 0x3479, - 0x3479, 0x3479, 0x3479, 0x347a, 0x347a, 0x347a, 0x347a, 0x347b, - 0x347b, 0x347b, 0x347c, 0x347c, 0x347c, 0x347c, 0x347d, 0x347d, - 0x347d, 0x347d, 0x347e, 0x347e, 0x347e, 0x347e, 0x347f, 0x347f, - 0x347f, 0x347f, 0x3480, 0x3480, 0x3480, 0x3480, 0x3481, 0x3481, - 0x3481, 0x3482, 0x3482, 0x3482, 0x3482, 0x3483, 0x3483, 0x3483, - 0x3483, 0x3484, 0x3484, 0x3484, 0x3484, 0x3485, 0x3485, 0x3485, - 0x3485, 0x3486, 0x3486, 0x3486, 0x3486, 0x3487, 0x3487, 0x3487, - 0x3487, 0x3488, 0x3488, 0x3488, 0x3489, 0x3489, 0x3489, 0x3489, - 0x348a, 0x348a, 0x348b, 0x348b, 0x348c, 0x348c, 0x348d, 0x348d, - 0x348e, 0x348e, 0x348f, 0x348f, 0x3490, 0x3490, 0x3491, 0x3491, - 0x3492, 0x3492, 0x3493, 0x3493, 0x3494, 0x3494, 0x3495, 0x3495, - 0x3496, 0x3496, 0x3497, 0x3497, 0x3498, 0x3498, 0x3499, 0x3499, - 0x349a, 0x349a, 0x349b, 0x349b, 0x349c, 0x349c, 0x349d, 0x349d, - 0x349e, 0x349e, 0x349f, 0x349f, 0x34a0, 0x34a0, 0x34a1, 0x34a1, - 0x34a2, 0x34a2, 0x34a3, 0x34a3, 0x34a4, 0x34a4, 0x34a5, 0x34a5, - 0x34a6, 0x34a6, 0x34a7, 0x34a7, 0x34a8, 0x34a8, 0x34a9, 0x34a9, - 0x34aa, 0x34aa, 0x34ab, 0x34ab, 0x34ac, 0x34ac, 0x34ad, 0x34ad, - 0x34ae, 0x34ae, 0x34af, 0x34af, 0x34b0, 0x34b0, 0x34b1, 0x34b1, - 0x34b2, 0x34b2, 0x34b3, 0x34b3, 0x34b4, 0x34b4, 0x34b5, 0x34b5, - 0x34b6, 0x34b6, 0x34b7, 0x34b7, 0x34b8, 0x34b8, 0x34b9, 0x34b9, - 0x34ba, 0x34ba, 0x34bb, 0x34bb, 0x34bc, 0x34bc, 0x34bd, 0x34bd, - 0x34be, 0x34be, 0x34bf, 0x34bf, 0x34c0, 0x34c0, 0x34c1, 0x34c1, - 0x34c2, 0x34c2, 0x34c3, 0x34c3, 0x34c4, 0x34c4, 0x34c5, 0x34c5, - 0x34c6, 0x34c6, 0x34c7, 0x34c7, 0x34c7, 0x34c8, 0x34c8, 0x34c9, - 0x34c9, 0x34ca, 0x34ca, 0x34cb, 0x34cb, 0x34cc, 0x34cc, 0x34cd, - 0x34cd, 0x34ce, 0x34ce, 0x34cf, 0x34cf, 0x34d0, 0x34d0, 0x34d1, - 0x34d1, 0x34d2, 0x34d2, 0x34d3, 0x34d3, 0x34d4, 0x34d4, 0x34d4, - 0x34d5, 0x34d5, 0x34d6, 0x34d6, 0x34d7, 0x34d7, 0x34d8, 0x34d8, - 0x34d9, 0x34d9, 0x34da, 0x34da, 0x34db, 0x34db, 0x34dc, 0x34dc, - 0x34dd, 0x34dd, 0x34de, 0x34de, 0x34de, 0x34df, 0x34df, 0x34e0, - 0x34e0, 0x34e1, 0x34e1, 0x34e2, 0x34e2, 0x34e3, 0x34e3, 0x34e4, - 0x34e4, 0x34e5, 0x34e5, 0x34e6, 0x34e6, 0x34e6, 0x34e7, 0x34e7, - 0x34e8, 0x34e8, 0x34e9, 0x34e9, 0x34ea, 0x34ea, 0x34eb, 0x34eb, - 0x34ec, 0x34ec, 0x34ed, 0x34ed, 0x34ee, 0x34ee, 0x34ee, 0x34ef, - 0x34ef, 0x34f0, 0x34f0, 0x34f1, 0x34f1, 0x34f2, 0x34f2, 0x34f3, - 0x34f3, 0x34f4, 0x34f4, 0x34f5, 0x34f5, 0x34f5, 0x34f6, 0x34f6, - 0x34f7, 0x34f7, 0x34f8, 0x34f8, 0x34f9, 0x34f9, 0x34fa, 0x34fa, - 0x34fb, 0x34fb, 0x34fb, 0x34fc, 0x34fc, 0x34fd, 0x34fd, 0x34fe, - 0x34fe, 0x34ff, 0x34ff, 0x3500, 0x3500, 0x3500, 0x3501, 0x3501, - 0x3502, 0x3502, 0x3503, 0x3503, 0x3504, 0x3504, 0x3505, 0x3505, - 0x3506, 0x3506, 0x3506, 0x3507, 0x3507, 0x3508, 0x3508, 0x3509, - 0x3509, 0x350a, 0x350a, 0x350b, 0x350b, 0x350b, 0x350c, 0x350c, - 0x350d, 0x350d, 0x350e, 0x350e, 0x350f, 0x350f, 0x3510, 0x3510, - 0x3510, 0x3511, 0x3511, 0x3512, 0x3512, 0x3513, 0x3513, 0x3514, - 0x3514, 0x3514, 0x3515, 0x3515, 0x3516, 0x3516, 0x3517, 0x3517, - 0x3518, 0x3518, 0x3519, 0x3519, 0x3519, 0x351a, 0x351a, 0x351b, - 0x351b, 0x351c, 0x351c, 0x351d, 0x351d, 0x351d, 0x351e, 0x351e, - 0x351f, 0x351f, 0x3520, 0x3520, 0x3521, 0x3521, 0x3521, 0x3522, - 0x3522, 0x3523, 0x3523, 0x3524, 0x3524, 0x3525, 0x3525, 0x3525, - 0x3526, 0x3526, 0x3527, 0x3527, 0x3528, 0x3528, 0x3529, 0x3529, - 0x3529, 0x352a, 0x352a, 0x352b, 0x352b, 0x352c, 0x352c, 0x352d, - 0x352d, 0x352d, 0x352e, 0x352e, 0x352f, 0x352f, 0x3530, 0x3530, - 0x3530, 0x3531, 0x3531, 0x3532, 0x3532, 0x3533, 0x3533, 0x3534, - 0x3534, 0x3534, 0x3535, 0x3535, 0x3536, 0x3536, 0x3537, 0x3537, - 0x3537, 0x3538, 0x3538, 0x3539, 0x3539, 0x353a, 0x353a, 0x353b, - 0x353b, 0x353b, 0x353c, 0x353c, 0x353d, 0x353d, 0x353e, 0x353e, - 0x353e, 0x353f, 0x353f, 0x3540, 0x3540, 0x3541, 0x3541, 0x3541, - 0x3542, 0x3542, 0x3543, 0x3543, 0x3544, 0x3544, 0x3544, 0x3545, - 0x3545, 0x3546, 0x3546, 0x3547, 0x3547, 0x3548, 0x3548, 0x3548, - 0x3549, 0x3549, 0x354a, 0x354a, 0x354b, 0x354b, 0x354b, 0x354c, - 0x354c, 0x354d, 0x354d, 0x354e, 0x354e, 0x354e, 0x354f, 0x354f, - 0x3550, 0x3550, 0x3551, 0x3551, 0x3551, 0x3552, 0x3552, 0x3553, - 0x3553, 0x3553, 0x3554, 0x3554, 0x3555, 0x3555, 0x3556, 0x3556, - 0x3556, 0x3557, 0x3557, 0x3558, 0x3558, 0x3559, 0x3559, 0x3559, - 0x355a, 0x355a, 0x355b, 0x355b, 0x355c, 0x355c, 0x355c, 0x355d, - 0x355d, 0x355e, 0x355e, 0x355e, 0x355f, 0x355f, 0x3560, 0x3560, - 0x3561, 0x3561, 0x3561, 0x3562, 0x3562, 0x3563, 0x3563, 0x3564, - 0x3564, 0x3564, 0x3565, 0x3565, 0x3566, 0x3566, 0x3566, 0x3567, - 0x3567, 0x3568, 0x3568, 0x3569, 0x3569, 0x3569, 0x356a, 0x356a, - 0x356b, 0x356b, 0x356b, 0x356c, 0x356c, 0x356d, 0x356d, 0x356e, - 0x356e, 0x356e, 0x356f, 0x356f, 0x3570, 0x3570, 0x3570, 0x3571, - 0x3571, 0x3572, 0x3572, 0x3573, 0x3573, 0x3573, 0x3574, 0x3574, - 0x3575, 0x3575, 0x3575, 0x3576, 0x3576, 0x3577, 0x3577, 0x3577, - 0x3578, 0x3578, 0x3579, 0x3579, 0x357a, 0x357a, 0x357a, 0x357b, - 0x357b, 0x357c, 0x357c, 0x357c, 0x357d, 0x357d, 0x357e, 0x357e, - 0x357e, 0x357f, 0x357f, 0x3580, 0x3580, 0x3581, 0x3581, 0x3581, - 0x3582, 0x3582, 0x3583, 0x3583, 0x3583, 0x3584, 0x3584, 0x3585, - 0x3585, 0x3585, 0x3586, 0x3586, 0x3587, 0x3587, 0x3587, 0x3588, - 0x3588, 0x3589, 0x3589, 0x3589, 0x358a, 0x358a, 0x358b, 0x358b, - 0x358c, 0x358c, 0x358c, 0x358d, 0x358d, 0x358e, 0x358e, 0x358e, - 0x358f, 0x358f, 0x3590, 0x3590, 0x3590, 0x3591, 0x3591, 0x3592, - 0x3592, 0x3592, 0x3593, 0x3593, 0x3594, 0x3594, 0x3594, 0x3595, - 0x3595, 0x3596, 0x3596, 0x3596, 0x3597, 0x3597, 0x3598, 0x3598, - 0x3598, 0x3599, 0x3599, 0x359a, 0x359a, 0x359a, 0x359b, 0x359b, - 0x359c, 0x359c, 0x359c, 0x359d, 0x359d, 0x359e, 0x359e, 0x359e, - 0x359f, 0x359f, 0x35a0, 0x35a0, 0x35a0, 0x35a1, 0x35a1, 0x35a2, - 0x35a2, 0x35a2, 0x35a3, 0x35a3, 0x35a4, 0x35a4, 0x35a4, 0x35a5, - 0x35a5, 0x35a6, 0x35a6, 0x35a6, 0x35a7, 0x35a7, 0x35a8, 0x35a8, - 0x35a8, 0x35a9, 0x35a9, 0x35aa, 0x35aa, 0x35aa, 0x35ab, 0x35ab, - 0x35ac, 0x35ac, 0x35ac, 0x35ad, 0x35ad, 0x35ad, 0x35ae, 0x35ae, - 0x35af, 0x35af, 0x35af, 0x35b0, 0x35b0, 0x35b1, 0x35b1, 0x35b1, - 0x35b2, 0x35b2, 0x35b3, 0x35b3, 0x35b3, 0x35b4, 0x35b4, 0x35b5, - 0x35b5, 0x35b5, 0x35b6, 0x35b6, 0x35b7, 0x35b7, 0x35b7, 0x35b8, - 0x35b8, 0x35b8, 0x35b9, 0x35b9, 0x35ba, 0x35ba, 0x35ba, 0x35bb, - 0x35bb, 0x35bc, 0x35bc, 0x35bc, 0x35bd, 0x35bd, 0x35be, 0x35be, - 0x35be, 0x35bf, 0x35bf, 0x35bf, 0x35c0, 0x35c0, 0x35c1, 0x35c1, - 0x35c1, 0x35c2, 0x35c2, 0x35c3, 0x35c3, 0x35c3, 0x35c4, 0x35c4, - 0x35c5, 0x35c5, 0x35c5, 0x35c6, 0x35c6, 0x35c6, 0x35c7, 0x35c7, - 0x35c8, 0x35c8, 0x35c8, 0x35c9, 0x35c9, 0x35ca, 0x35ca, 0x35ca, - 0x35cb, 0x35cb, 0x35cb, 0x35cc, 0x35cc, 0x35cd, 0x35cd, 0x35cd, - 0x35ce, 0x35ce, 0x35cf, 0x35cf, 0x35cf, 0x35d0, 0x35d0, 0x35d0, - 0x35d1, 0x35d1, 0x35d2, 0x35d2, 0x35d2, 0x35d3, 0x35d3, 0x35d3, - 0x35d4, 0x35d4, 0x35d5, 0x35d5, 0x35d5, 0x35d6, 0x35d6, 0x35d7, - 0x35d7, 0x35d7, 0x35d8, 0x35d8, 0x35d8, 0x35d9, 0x35d9, 0x35da, - 0x35da, 0x35da, 0x35db, 0x35db, 0x35db, 0x35dc, 0x35dc, 0x35dd, - 0x35dd, 0x35dd, 0x35de, 0x35de, 0x35df, 0x35df, 0x35df, 0x35e0, - 0x35e0, 0x35e0, 0x35e1, 0x35e1, 0x35e2, 0x35e2, 0x35e2, 0x35e3, - 0x35e3, 0x35e3, 0x35e4, 0x35e4, 0x35e5, 0x35e5, 0x35e5, 0x35e6, - 0x35e6, 0x35e6, 0x35e7, 0x35e7, 0x35e8, 0x35e8, 0x35e8, 0x35e9, - 0x35e9, 0x35e9, 0x35ea, 0x35ea, 0x35eb, 0x35eb, 0x35eb, 0x35ec, - 0x35ec, 0x35ec, 0x35ed, 0x35ed, 0x35ee, 0x35ee, 0x35ee, 0x35ef, - 0x35ef, 0x35ef, 0x35f0, 0x35f0, 0x35f1, 0x35f1, 0x35f1, 0x35f2, - 0x35f2, 0x35f2, 0x35f3, 0x35f3, 0x35f4, 0x35f4, 0x35f4, 0x35f5, - 0x35f5, 0x35f5, 0x35f6, 0x35f6, 0x35f7, 0x35f7, 0x35f7, 0x35f8, - 0x35f8, 0x35f8, 0x35f9, 0x35f9, 0x35f9, 0x35fa, 0x35fa, 0x35fb, - 0x35fb, 0x35fb, 0x35fc, 0x35fc, 0x35fc, 0x35fd, 0x35fd, 0x35fe, - 0x35fe, 0x35fe, 0x35ff, 0x35ff, 0x35ff, 0x3600, 0x3600, 0x3601, - 0x3601, 0x3601, 0x3602, 0x3602, 0x3602, 0x3603, 0x3603, 0x3603, - 0x3604, 0x3604, 0x3605, 0x3605, 0x3605, 0x3606, 0x3606, 0x3606, - 0x3607, 0x3607, 0x3607, 0x3608, 0x3608, 0x3609, 0x3609, 0x3609, - 0x360a, 0x360a, 0x360a, 0x360b, 0x360b, 0x360c, 0x360c, 0x360c, - 0x360d, 0x360d, 0x360d, 0x360e, 0x360e, 0x360e, 0x360f, 0x360f, - 0x3610, 0x3610, 0x3610, 0x3611, 0x3611, 0x3611, 0x3612, 0x3612, - 0x3612, 0x3613, 0x3613, 0x3614, 0x3614, 0x3614, 0x3615, 0x3615, - 0x3615, 0x3616, 0x3616, 0x3616, 0x3617, 0x3617, 0x3618, 0x3618, - 0x3618, 0x3619, 0x3619, 0x3619, 0x361a, 0x361a, 0x361a, 0x361b, - 0x361b, 0x361c, 0x361c, 0x361c, 0x361d, 0x361d, 0x361d, 0x361e, - 0x361e, 0x361e, 0x361f, 0x361f, 0x361f, 0x3620, 0x3620, 0x3621, - 0x3621, 0x3621, 0x3622, 0x3622, 0x3622, 0x3623, 0x3623, 0x3623, - 0x3624, 0x3624, 0x3624, 0x3625, 0x3625, 0x3626, 0x3626, 0x3626, - 0x3627, 0x3627, 0x3627, 0x3628, 0x3628, 0x3628, 0x3629, 0x3629, - 0x362a, 0x362a, 0x362a, 0x362b, 0x362b, 0x362b, 0x362c, 0x362c, - 0x362c, 0x362d, 0x362d, 0x362d, 0x362e, 0x362e, 0x362e, 0x362f, - 0x362f, 0x3630, 0x3630, 0x3630, 0x3631, 0x3631, 0x3631, 0x3632, - 0x3632, 0x3632, 0x3633, 0x3633, 0x3633, 0x3634, 0x3634, 0x3635, - 0x3635, 0x3635, 0x3636, 0x3636, 0x3636, 0x3637, 0x3637, 0x3637, - 0x3638, 0x3638, 0x3639, 0x363a, 0x363b, 0x363b, 0x363c, 0x363d, - 0x363d, 0x363e, 0x363f, 0x363f, 0x3640, 0x3641, 0x3642, 0x3642, - 0x3643, 0x3644, 0x3644, 0x3645, 0x3646, 0x3646, 0x3647, 0x3648, - 0x3649, 0x3649, 0x364a, 0x364b, 0x364b, 0x364c, 0x364d, 0x364d, - 0x364e, 0x364f, 0x3650, 0x3650, 0x3651, 0x3652, 0x3652, 0x3653, - 0x3654, 0x3654, 0x3655, 0x3656, 0x3656, 0x3657, 0x3658, 0x3659, - 0x3659, 0x365a, 0x365b, 0x365b, 0x365c, 0x365d, 0x365d, 0x365e, - 0x365f, 0x365f, 0x3660, 0x3661, 0x3661, 0x3662, 0x3663, 0x3664, - 0x3664, 0x3665, 0x3666, 0x3666, 0x3667, 0x3668, 0x3668, 0x3669, - 0x366a, 0x366a, 0x366b, 0x366c, 0x366c, 0x366d, 0x366e, 0x366e, - 0x366f, 0x3670, 0x3670, 0x3671, 0x3672, 0x3672, 0x3673, 0x3674, - 0x3674, 0x3675, 0x3676, 0x3677, 0x3677, 0x3678, 0x3679, 0x3679, - 0x367a, 0x367b, 0x367b, 0x367c, 0x367d, 0x367d, 0x367e, 0x367f, - 0x367f, 0x3680, 0x3681, 0x3681, 0x3682, 0x3683, 0x3683, 0x3684, - 0x3685, 0x3685, 0x3686, 0x3687, 0x3687, 0x3688, 0x3689, 0x3689, - 0x368a, 0x368b, 0x368b, 0x368c, 0x368d, 0x368d, 0x368e, 0x368f, - 0x368f, 0x3690, 0x3691, 0x3691, 0x3692, 0x3693, 0x3693, 0x3694, - 0x3695, 0x3695, 0x3696, 0x3697, 0x3697, 0x3698, 0x3698, 0x3699, - 0x369a, 0x369a, 0x369b, 0x369c, 0x369c, 0x369d, 0x369e, 0x369e, - 0x369f, 0x36a0, 0x36a0, 0x36a1, 0x36a2, 0x36a2, 0x36a3, 0x36a4, - 0x36a4, 0x36a5, 0x36a6, 0x36a6, 0x36a7, 0x36a8, 0x36a8, 0x36a9, - 0x36aa, 0x36aa, 0x36ab, 0x36ab, 0x36ac, 0x36ad, 0x36ad, 0x36ae, - 0x36af, 0x36af, 0x36b0, 0x36b1, 0x36b1, 0x36b2, 0x36b3, 0x36b3, - 0x36b4, 0x36b5, 0x36b5, 0x36b6, 0x36b6, 0x36b7, 0x36b8, 0x36b8, - 0x36b9, 0x36ba, 0x36ba, 0x36bb, 0x36bc, 0x36bc, 0x36bd, 0x36be, - 0x36be, 0x36bf, 0x36bf, 0x36c0, 0x36c1, 0x36c1, 0x36c2, 0x36c3, - 0x36c3, 0x36c4, 0x36c5, 0x36c5, 0x36c6, 0x36c6, 0x36c7, 0x36c8, - 0x36c8, 0x36c9, 0x36ca, 0x36ca, 0x36cb, 0x36cc, 0x36cc, 0x36cd, - 0x36cd, 0x36ce, 0x36cf, 0x36cf, 0x36d0, 0x36d1, 0x36d1, 0x36d2, - 0x36d3, 0x36d3, 0x36d4, 0x36d4, 0x36d5, 0x36d6, 0x36d6, 0x36d7, - 0x36d8, 0x36d8, 0x36d9, 0x36d9, 0x36da, 0x36db, 0x36db, 0x36dc, - 0x36dd, 0x36dd, 0x36de, 0x36de, 0x36df, 0x36e0, 0x36e0, 0x36e1, - 0x36e2, 0x36e2, 0x36e3, 0x36e4, 0x36e4, 0x36e5, 0x36e5, 0x36e6, - 0x36e7, 0x36e7, 0x36e8, 0x36e8, 0x36e9, 0x36ea, 0x36ea, 0x36eb, - 0x36ec, 0x36ec, 0x36ed, 0x36ed, 0x36ee, 0x36ef, 0x36ef, 0x36f0, - 0x36f1, 0x36f1, 0x36f2, 0x36f2, 0x36f3, 0x36f4, 0x36f4, 0x36f5, - 0x36f6, 0x36f6, 0x36f7, 0x36f7, 0x36f8, 0x36f9, 0x36f9, 0x36fa, - 0x36fa, 0x36fb, 0x36fc, 0x36fc, 0x36fd, 0x36fe, 0x36fe, 0x36ff, - 0x36ff, 0x3700, 0x3701, 0x3701, 0x3702, 0x3702, 0x3703, 0x3704, - 0x3704, 0x3705, 0x3705, 0x3706, 0x3707, 0x3707, 0x3708, 0x3709, - 0x3709, 0x370a, 0x370a, 0x370b, 0x370c, 0x370c, 0x370d, 0x370d, - 0x370e, 0x370f, 0x370f, 0x3710, 0x3710, 0x3711, 0x3712, 0x3712, - 0x3713, 0x3713, 0x3714, 0x3715, 0x3715, 0x3716, 0x3716, 0x3717, - 0x3718, 0x3718, 0x3719, 0x3719, 0x371a, 0x371b, 0x371b, 0x371c, - 0x371d, 0x371d, 0x371e, 0x371e, 0x371f, 0x3720, 0x3720, 0x3721, - 0x3721, 0x3722, 0x3723, 0x3723, 0x3724, 0x3724, 0x3725, 0x3725, - 0x3726, 0x3727, 0x3727, 0x3728, 0x3728, 0x3729, 0x372a, 0x372a, - 0x372b, 0x372b, 0x372c, 0x372d, 0x372d, 0x372e, 0x372e, 0x372f, - 0x3730, 0x3730, 0x3731, 0x3731, 0x3732, 0x3733, 0x3733, 0x3734, - 0x3734, 0x3735, 0x3736, 0x3736, 0x3737, 0x3737, 0x3738, 0x3739, - 0x3739, 0x373a, 0x373a, 0x373b, 0x373b, 0x373c, 0x373d, 0x373d, - 0x373e, 0x373e, 0x373f, 0x3740, 0x3740, 0x3741, 0x3741, 0x3742, - 0x3743, 0x3743, 0x3744, 0x3744, 0x3745, 0x3745, 0x3746, 0x3747, - 0x3747, 0x3748, 0x3748, 0x3749, 0x374a, 0x374a, 0x374b, 0x374b, - 0x374c, 0x374c, 0x374d, 0x374e, 0x374e, 0x374f, 0x374f, 0x3750, - 0x3751, 0x3751, 0x3752, 0x3752, 0x3753, 0x3753, 0x3754, 0x3755, - 0x3755, 0x3756, 0x3756, 0x3757, 0x3757, 0x3758, 0x3759, 0x3759, - 0x375a, 0x375a, 0x375b, 0x375c, 0x375c, 0x375d, 0x375d, 0x375e, - 0x375e, 0x375f, 0x3760, 0x3760, 0x3761, 0x3761, 0x3762, 0x3762, - 0x3763, 0x3764, 0x3764, 0x3765, 0x3765, 0x3766, 0x3766, 0x3767, - 0x3768, 0x3768, 0x3769, 0x3769, 0x376a, 0x376a, 0x376b, 0x376c, - 0x376c, 0x376d, 0x376d, 0x376e, 0x376e, 0x376f, 0x3770, 0x3770, - 0x3771, 0x3771, 0x3772, 0x3772, 0x3773, 0x3774, 0x3774, 0x3775, - 0x3775, 0x3776, 0x3776, 0x3777, 0x3778, 0x3778, 0x3779, 0x3779, - 0x377a, 0x377a, 0x377b, 0x377c, 0x377c, 0x377d, 0x377d, 0x377e, - 0x377e, 0x377f, 0x377f, 0x3780, 0x3781, 0x3781, 0x3782, 0x3782, - 0x3783, 0x3783, 0x3784, 0x3785, 0x3785, 0x3786, 0x3786, 0x3787, - 0x3787, 0x3788, 0x3788, 0x3789, 0x378a, 0x378a, 0x378b, 0x378b, - 0x378c, 0x378c, 0x378d, 0x378e, 0x378e, 0x378f, 0x378f, 0x3790, - 0x3790, 0x3791, 0x3791, 0x3792, 0x3793, 0x3793, 0x3794, 0x3794, - 0x3795, 0x3795, 0x3796, 0x3796, 0x3797, 0x3798, 0x3798, 0x3799, - 0x3799, 0x379a, 0x379a, 0x379b, 0x379b, 0x379c, 0x379d, 0x379d, - 0x379e, 0x379e, 0x379f, 0x379f, 0x37a0, 0x37a0, 0x37a1, 0x37a2, - 0x37a2, 0x37a3, 0x37a3, 0x37a4, 0x37a4, 0x37a5, 0x37a5, 0x37a6, - 0x37a7, 0x37a7, 0x37a8, 0x37a8, 0x37a9, 0x37a9, 0x37aa, 0x37aa, - 0x37ab, 0x37ab, 0x37ac, 0x37ad, 0x37ad, 0x37ae, 0x37ae, 0x37af, - 0x37af, 0x37b0, 0x37b0, 0x37b1, 0x37b2, 0x37b2, 0x37b3, 0x37b3, - 0x37b4, 0x37b4, 0x37b5, 0x37b5, 0x37b6, 0x37b6, 0x37b7, 0x37b8, - 0x37b8, 0x37b9, 0x37b9, 0x37ba, 0x37ba, 0x37bb, 0x37bb, 0x37bc, - 0x37bc, 0x37bd, 0x37bd, 0x37be, 0x37bf, 0x37bf, 0x37c0, 0x37c0, - 0x37c1, 0x37c1, 0x37c2, 0x37c2, 0x37c3, 0x37c3, 0x37c4, 0x37c5, - 0x37c5, 0x37c6, 0x37c6, 0x37c7, 0x37c7, 0x37c8, 0x37c8, 0x37c9, - 0x37c9, 0x37ca, 0x37ca, 0x37cb, 0x37cc, 0x37cc, 0x37cd, 0x37cd, - 0x37ce, 0x37ce, 0x37cf, 0x37cf, 0x37d0, 0x37d0, 0x37d1, 0x37d1, - 0x37d2, 0x37d3, 0x37d3, 0x37d4, 0x37d4, 0x37d5, 0x37d5, 0x37d6, - 0x37d6, 0x37d7, 0x37d7, 0x37d8, 0x37d8, 0x37d9, 0x37da, 0x37da, - 0x37db, 0x37db, 0x37dc, 0x37dc, 0x37dd, 0x37dd, 0x37de, 0x37de, - 0x37df, 0x37df, 0x37e0, 0x37e0, 0x37e1, 0x37e2, 0x37e2, 0x37e3, - 0x37e3, 0x37e4, 0x37e4, 0x37e5, 0x37e5, 0x37e6, 0x37e6, 0x37e7, - 0x37e7, 0x37e8, 0x37e8, 0x37e9, 0x37e9, 0x37ea, 0x37eb, 0x37eb, - 0x37ec, 0x37ec, 0x37ed, 0x37ed, 0x37ee, 0x37ee, 0x37ef, 0x37ef, - 0x37f0, 0x37f0, 0x37f1, 0x37f1, 0x37f2, 0x37f2, 0x37f3, 0x37f3, - 0x37f4, 0x37f5, 0x37f5, 0x37f6, 0x37f6, 0x37f7, 0x37f7, 0x37f8, - 0x37f8, 0x37f9, 0x37f9, 0x37fa, 0x37fa, 0x37fb, 0x37fb, 0x37fc, - 0x37fc, 0x37fd, 0x37fd, 0x37fe, 0x37fe, 0x37ff, 0x3800, 0x3800, - 0x3800, 0x3801, 0x3801, 0x3801, 0x3801, 0x3802, 0x3802, 0x3802, - 0x3802, 0x3803, 0x3803, 0x3803, 0x3803, 0x3804, 0x3804, 0x3804, - 0x3804, 0x3805, 0x3805, 0x3805, 0x3805, 0x3806, 0x3806, 0x3806, - 0x3807, 0x3807, 0x3807, 0x3807, 0x3808, 0x3808, 0x3808, 0x3808, - 0x3809, 0x3809, 0x3809, 0x3809, 0x380a, 0x380a, 0x380a, 0x380a, - 0x380b, 0x380b, 0x380b, 0x380b, 0x380c, 0x380c, 0x380c, 0x380c, - 0x380d, 0x380d, 0x380d, 0x380d, 0x380e, 0x380e, 0x380e, 0x380f, - 0x380f, 0x380f, 0x380f, 0x3810, 0x3810, 0x3810, 0x3810, 0x3811, - 0x3811, 0x3811, 0x3811, 0x3812, 0x3812, 0x3812, 0x3812, 0x3813, - 0x3813, 0x3813, 0x3813, 0x3814, 0x3814, 0x3814, 0x3814, 0x3815, - 0x3815, 0x3815, 0x3815, 0x3816, 0x3816, 0x3816, 0x3816, 0x3817, - 0x3817, 0x3817, 0x3817, 0x3818, 0x3818, 0x3818, 0x3818, 0x3819, - 0x3819, 0x3819, 0x3819, 0x381a, 0x381a, 0x381a, 0x381b, 0x381b, - 0x381b, 0x381b, 0x381c, 0x381c, 0x381c, 0x381c, 0x381d, 0x381d, - 0x381d, 0x381d, 0x381e, 0x381e, 0x381e, 0x381e, 0x381f, 0x381f, - 0x381f, 0x381f, 0x3820, 0x3820, 0x3820, 0x3820, 0x3821, 0x3821, - 0x3821, 0x3821, 0x3822, 0x3822, 0x3822, 0x3822, 0x3823, 0x3823, - 0x3823, 0x3823, 0x3824, 0x3824, 0x3824, 0x3824, 0x3825, 0x3825, - 0x3825, 0x3825, 0x3826, 0x3826, 0x3826, 0x3826, 0x3827, 0x3827, - 0x3827, 0x3827, 0x3828, 0x3828, 0x3828, 0x3828, 0x3829, 0x3829, - 0x3829, 0x3829, 0x382a, 0x382a, 0x382a, 0x382a, 0x382b, 0x382b, - 0x382b, 0x382b, 0x382c, 0x382c, 0x382c, 0x382c, 0x382d, 0x382d, - 0x382d, 0x382d, 0x382e, 0x382e, 0x382e, 0x382e, 0x382f, 0x382f, - 0x382f, 0x382f, 0x3830, 0x3830, 0x3830, 0x3830, 0x3831, 0x3831, - 0x3831, 0x3831, 0x3831, 0x3832, 0x3832, 0x3832, 0x3832, 0x3833, - 0x3833, 0x3833, 0x3833, 0x3834, 0x3834, 0x3834, 0x3834, 0x3835, - 0x3835, 0x3835, 0x3835, 0x3836, 0x3836, 0x3836, 0x3836, 0x3837, - 0x3837, 0x3837, 0x3837, 0x3838, 0x3838, 0x3838, 0x3838, 0x3839, - 0x3839, 0x3839, 0x3839, 0x383a, 0x383a, 0x383a, 0x383a, 0x383b, - 0x383b, 0x383b, 0x383b, 0x383c, 0x383c, 0x383c, 0x383c, 0x383d, - 0x383d, 0x383d, 0x383d, 0x383e, 0x383e, 0x383e, 0x383e, 0x383e, - 0x383f, 0x383f, 0x383f, 0x383f, 0x3840, 0x3840, 0x3840, 0x3840, - 0x3841, 0x3841, 0x3841, 0x3841, 0x3842, 0x3842, 0x3842, 0x3842, - 0x3843, 0x3843, 0x3844, 0x3844, 0x3845, 0x3845, 0x3846, 0x3846, - 0x3846, 0x3847, 0x3847, 0x3848, 0x3848, 0x3849, 0x3849, 0x384a, - 0x384a, 0x384b, 0x384b, 0x384c, 0x384c, 0x384d, 0x384d, 0x384e, - 0x384e, 0x384f, 0x384f, 0x3850, 0x3850, 0x3851, 0x3851, 0x3851, - 0x3852, 0x3852, 0x3853, 0x3853, 0x3854, 0x3854, 0x3855, 0x3855, - 0x3856, 0x3856, 0x3857, 0x3857, 0x3858, 0x3858, 0x3859, 0x3859, - 0x385a, 0x385a, 0x385a, 0x385b, 0x385b, 0x385c, 0x385c, 0x385d, - 0x385d, 0x385e, 0x385e, 0x385f, 0x385f, 0x3860, 0x3860, 0x3861, - 0x3861, 0x3862, 0x3862, 0x3862, 0x3863, 0x3863, 0x3864, 0x3864, - 0x3865, 0x3865, 0x3866, 0x3866, 0x3867, 0x3867, 0x3868, 0x3868, - 0x3869, 0x3869, 0x3869, 0x386a, 0x386a, 0x386b, 0x386b, 0x386c, - 0x386c, 0x386d, 0x386d, 0x386e, 0x386e, 0x386f, 0x386f, 0x386f, - 0x3870, 0x3870, 0x3871, 0x3871, 0x3872, 0x3872, 0x3873, 0x3873, - 0x3874, 0x3874, 0x3875, 0x3875, 0x3875, 0x3876, 0x3876, 0x3877, - 0x3877, 0x3878, 0x3878, 0x3879, 0x3879, 0x387a, 0x387a, 0x387a, - 0x387b, 0x387b, 0x387c, 0x387c, 0x387d, 0x387d, 0x387e, 0x387e, - 0x387f, 0x387f, 0x387f, 0x3880, 0x3880, 0x3881, 0x3881, 0x3882, - 0x3882, 0x3883, 0x3883, 0x3884, 0x3884, 0x3884, 0x3885, 0x3885, - 0x3886, 0x3886, 0x3887, 0x3887, 0x3888, 0x3888, 0x3889, 0x3889, - 0x3889, 0x388a, 0x388a, 0x388b, 0x388b, 0x388c, 0x388c, 0x388d, - 0x388d, 0x388d, 0x388e, 0x388e, 0x388f, 0x388f, 0x3890, 0x3890, - 0x3891, 0x3891, 0x3891, 0x3892, 0x3892, 0x3893, 0x3893, 0x3894, - 0x3894, 0x3895, 0x3895, 0x3895, 0x3896, 0x3896, 0x3897, 0x3897, - 0x3898, 0x3898, 0x3899, 0x3899, 0x3899, 0x389a, 0x389a, 0x389b, - 0x389b, 0x389c, 0x389c, 0x389d, 0x389d, 0x389d, 0x389e, 0x389e, - 0x389f, 0x389f, 0x38a0, 0x38a0, 0x38a0, 0x38a1, 0x38a1, 0x38a2, - 0x38a2, 0x38a3, 0x38a3, 0x38a4, 0x38a4, 0x38a4, 0x38a5, 0x38a5, - 0x38a6, 0x38a6, 0x38a7, 0x38a7, 0x38a7, 0x38a8, 0x38a8, 0x38a9, - 0x38a9, 0x38aa, 0x38aa, 0x38ab, 0x38ab, 0x38ab, 0x38ac, 0x38ac, - 0x38ad, 0x38ad, 0x38ae, 0x38ae, 0x38ae, 0x38af, 0x38af, 0x38b0, - 0x38b0, 0x38b1, 0x38b1, 0x38b1, 0x38b2, 0x38b2, 0x38b3, 0x38b3, - 0x38b4, 0x38b4, 0x38b4, 0x38b5, 0x38b5, 0x38b6, 0x38b6, 0x38b7, - 0x38b7, 0x38b7, 0x38b8, 0x38b8, 0x38b9, 0x38b9, 0x38ba, 0x38ba, - 0x38ba, 0x38bb, 0x38bb, 0x38bc, 0x38bc, 0x38bd, 0x38bd, 0x38bd, - 0x38be, 0x38be, 0x38bf, 0x38bf, 0x38c0, 0x38c0, 0x38c0, 0x38c1, - 0x38c1, 0x38c2, 0x38c2, 0x38c3, 0x38c3, 0x38c3, 0x38c4, 0x38c4, - 0x38c5, 0x38c5, 0x38c5, 0x38c6, 0x38c6, 0x38c7, 0x38c7, 0x38c8, - 0x38c8, 0x38c8, 0x38c9, 0x38c9, 0x38ca, 0x38ca, 0x38cb, 0x38cb, - 0x38cb, 0x38cc, 0x38cc, 0x38cd, 0x38cd, 0x38cd, 0x38ce, 0x38ce, - 0x38cf, 0x38cf, 0x38d0, 0x38d0, 0x38d0, 0x38d1, 0x38d1, 0x38d2, - 0x38d2, 0x38d3, 0x38d3, 0x38d3, 0x38d4, 0x38d4, 0x38d5, 0x38d5, - 0x38d5, 0x38d6, 0x38d6, 0x38d7, 0x38d7, 0x38d8, 0x38d8, 0x38d8, - 0x38d9, 0x38d9, 0x38da, 0x38da, 0x38da, 0x38db, 0x38db, 0x38dc, - 0x38dc, 0x38dc, 0x38dd, 0x38dd, 0x38de, 0x38de, 0x38df, 0x38df, - 0x38df, 0x38e0, 0x38e0, 0x38e1, 0x38e1, 0x38e1, 0x38e2, 0x38e2, - 0x38e3, 0x38e3, 0x38e3, 0x38e4, 0x38e4, 0x38e5, 0x38e5, 0x38e6, - 0x38e6, 0x38e6, 0x38e7, 0x38e7, 0x38e8, 0x38e8, 0x38e8, 0x38e9, - 0x38e9, 0x38ea, 0x38ea, 0x38ea, 0x38eb, 0x38eb, 0x38ec, 0x38ec, - 0x38ec, 0x38ed, 0x38ed, 0x38ee, 0x38ee, 0x38ee, 0x38ef, 0x38ef, - 0x38f0, 0x38f0, 0x38f1, 0x38f1, 0x38f1, 0x38f2, 0x38f2, 0x38f3, - 0x38f3, 0x38f3, 0x38f4, 0x38f4, 0x38f5, 0x38f5, 0x38f5, 0x38f6, - 0x38f6, 0x38f7, 0x38f7, 0x38f7, 0x38f8, 0x38f8, 0x38f9, 0x38f9, - 0x38f9, 0x38fa, 0x38fa, 0x38fb, 0x38fb, 0x38fb, 0x38fc, 0x38fc, - 0x38fd, 0x38fd, 0x38fd, 0x38fe, 0x38fe, 0x38ff, 0x38ff, 0x38ff, - 0x3900, 0x3900, 0x3901, 0x3901, 0x3901, 0x3902, 0x3902, 0x3903, - 0x3903, 0x3903, 0x3904, 0x3904, 0x3905, 0x3905, 0x3905, 0x3906, - 0x3906, 0x3907, 0x3907, 0x3907, 0x3908, 0x3908, 0x3909, 0x3909, - 0x3909, 0x390a, 0x390a, 0x390b, 0x390b, 0x390b, 0x390c, 0x390c, - 0x390d, 0x390d, 0x390d, 0x390e, 0x390e, 0x390f, 0x390f, 0x390f, - 0x3910, 0x3910, 0x3910, 0x3911, 0x3911, 0x3912, 0x3912, 0x3912, - 0x3913, 0x3913, 0x3914, 0x3914, 0x3914, 0x3915, 0x3915, 0x3916, - 0x3916, 0x3916, 0x3917, 0x3917, 0x3918, 0x3918, 0x3918, 0x3919, - 0x3919, 0x3919, 0x391a, 0x391a, 0x391b, 0x391b, 0x391b, 0x391c, - 0x391c, 0x391d, 0x391d, 0x391d, 0x391e, 0x391e, 0x391f, 0x391f, - 0x391f, 0x3920, 0x3920, 0x3920, 0x3921, 0x3921, 0x3922, 0x3922, - 0x3922, 0x3923, 0x3923, 0x3924, 0x3924, 0x3924, 0x3925, 0x3925, - 0x3926, 0x3926, 0x3926, 0x3927, 0x3927, 0x3927, 0x3928, 0x3928, - 0x3929, 0x3929, 0x3929, 0x392a, 0x392a, 0x392b, 0x392b, 0x392b, - 0x392c, 0x392c, 0x392c, 0x392d, 0x392d, 0x392e, 0x392e, 0x392e, - 0x392f, 0x392f, 0x392f, 0x3930, 0x3930, 0x3931, 0x3931, 0x3931, - 0x3932, 0x3932, 0x3933, 0x3933, 0x3933, 0x3934, 0x3934, 0x3934, - 0x3935, 0x3935, 0x3936, 0x3936, 0x3936, 0x3937, 0x3937, 0x3937, - 0x3938, 0x3938, 0x3939, 0x3939, 0x3939, 0x393a, 0x393a, 0x393b, - 0x393b, 0x393b, 0x393c, 0x393c, 0x393c, 0x393d, 0x393d, 0x393e, - 0x393e, 0x393e, 0x393f, 0x393f, 0x393f, 0x3940, 0x3940, 0x3941, - 0x3941, 0x3941, 0x3942, 0x3942, 0x3942, 0x3943, 0x3943, 0x3944, - 0x3944, 0x3944, 0x3945, 0x3945, 0x3945, 0x3946, 0x3946, 0x3947, - 0x3947, 0x3947, 0x3948, 0x3948, 0x3948, 0x3949, 0x3949, 0x394a, - 0x394a, 0x394a, 0x394b, 0x394b, 0x394b, 0x394c, 0x394c, 0x394d, - 0x394d, 0x394d, 0x394e, 0x394e, 0x394e, 0x394f, 0x394f, 0x3950, - 0x3950, 0x3950, 0x3951, 0x3951, 0x3951, 0x3952, 0x3952, 0x3953, - 0x3953, 0x3953, 0x3954, 0x3954, 0x3954, 0x3955, 0x3955, 0x3955, - 0x3956, 0x3956, 0x3957, 0x3957, 0x3957, 0x3958, 0x3958, 0x3958, - 0x3959, 0x3959, 0x395a, 0x395a, 0x395a, 0x395b, 0x395b, 0x395b, - 0x395c, 0x395c, 0x395c, 0x395d, 0x395d, 0x395e, 0x395e, 0x395e, - 0x395f, 0x395f, 0x395f, 0x3960, 0x3960, 0x3961, 0x3961, 0x3961, - 0x3962, 0x3962, 0x3962, 0x3963, 0x3963, 0x3963, 0x3964, 0x3964, - 0x3965, 0x3965, 0x3965, 0x3966, 0x3966, 0x3966, 0x3967, 0x3967, - 0x3967, 0x3968, 0x3968, 0x3969, 0x3969, 0x3969, 0x396a, 0x396a, - 0x396a, 0x396b, 0x396b, 0x396b, 0x396c, 0x396c, 0x396d, 0x396d, - 0x396d, 0x396e, 0x396e, 0x396e, 0x396f, 0x396f, 0x396f, 0x3970, - 0x3970, 0x3970, 0x3971, 0x3971, 0x3972, 0x3972, 0x3972, 0x3973, - 0x3973, 0x3973, 0x3974, 0x3974, 0x3974, 0x3975, 0x3975, 0x3976, - 0x3976, 0x3976, 0x3977, 0x3977, 0x3977, 0x3978, 0x3978, 0x3978, - 0x3979, 0x3979, 0x3979, 0x397a, 0x397a, 0x397b, 0x397b, 0x397b, - 0x397c, 0x397c, 0x397c, 0x397d, 0x397d, 0x397d, 0x397e, 0x397e, - 0x397e, 0x397f, 0x397f, 0x3980, 0x3980, 0x3980, 0x3981, 0x3981, - 0x3981, 0x3982, 0x3982, 0x3982, 0x3983, 0x3983, 0x3983, 0x3984, - 0x3984, 0x3985, 0x3985, 0x3985, 0x3986, 0x3986, 0x3986, 0x3987, - 0x3987, 0x3987, 0x3988, 0x3988, 0x3988, 0x3989, 0x3989, 0x398a, - 0x398a, 0x398a, 0x398b, 0x398b, 0x398b, 0x398c, 0x398c, 0x398c, - 0x398d, 0x398d, 0x398d, 0x398e, 0x398e, 0x398e, 0x398f, 0x398f, - 0x398f, 0x3990, 0x3990, 0x3991, 0x3991, 0x3991, 0x3992, 0x3992, - 0x3992, 0x3993, 0x3993, 0x3993, 0x3994, 0x3994, 0x3994, 0x3995, - 0x3995, 0x3995, 0x3996, 0x3996, 0x3997, 0x3997, 0x3997, 0x3998, - 0x3998, 0x3998, 0x3999, 0x3999, 0x3999, 0x399a, 0x399a, 0x399a, - 0x399b, 0x399b, 0x399b, 0x399c, 0x399c, 0x399c, 0x399d, 0x399d, - 0x399d, 0x399e, 0x399e, 0x399f, 0x399f, 0x399f, 0x39a0, 0x39a0, - 0x39a0, 0x39a1, 0x39a1, 0x39a1, 0x39a2, 0x39a2, 0x39a2, 0x39a3, - 0x39a3, 0x39a3, 0x39a4, 0x39a4, 0x39a4, 0x39a5, 0x39a5, 0x39a5, - 0x39a6, 0x39a6, 0x39a6, 0x39a7, 0x39a7, 0x39a8, 0x39a8, 0x39a8, - 0x39a9, 0x39a9, 0x39a9, 0x39aa, 0x39aa, 0x39aa, 0x39ab, 0x39ab, - 0x39ab, 0x39ac, 0x39ac, 0x39ac, 0x39ad, 0x39ad, 0x39ad, 0x39ae, - 0x39ae, 0x39ae, 0x39af, 0x39af, 0x39af, 0x39b0, 0x39b0, 0x39b0, - 0x39b1, 0x39b1, 0x39b1, 0x39b2, 0x39b2, 0x39b2, 0x39b3, 0x39b3, - 0x39b4, 0x39b4, 0x39b4, 0x39b5, 0x39b5, 0x39b5, 0x39b6, 0x39b6, - 0x39b6, 0x39b7, 0x39b7, 0x39b7, 0x39b8, 0x39b8, 0x39b8, 0x39b9, - 0x39b9, 0x39b9, 0x39ba, 0x39ba, 0x39ba, 0x39bb, 0x39bb, 0x39bb, - 0x39bc, 0x39bc, 0x39bc, 0x39bd, 0x39bd, 0x39bd, 0x39be, 0x39be, - 0x39be, 0x39bf, 0x39bf, 0x39bf, 0x39c0, 0x39c0, 0x39c0, 0x39c1, - 0x39c1, 0x39c1, 0x39c2, 0x39c2, 0x39c2, 0x39c3, 0x39c3, 0x39c3, - 0x39c4, 0x39c4, 0x39c4, 0x39c5, 0x39c5, 0x39c5, 0x39c6, 0x39c6, - 0x39c6, 0x39c7, 0x39c7, 0x39c7, 0x39c8, 0x39c8, 0x39c8, 0x39c9, - 0x39c9, 0x39ca, 0x39ca, 0x39ca, 0x39cb, 0x39cb, 0x39cb, 0x39cc, - 0x39cc, 0x39cc, 0x39cd, 0x39cd, 0x39cd, 0x39ce, 0x39ce, 0x39ce, - 0x39cf, 0x39cf, 0x39cf, 0x39d0, 0x39d0, 0x39d0, 0x39d1, 0x39d1, - 0x39d1, 0x39d2, 0x39d2, 0x39d2, 0x39d3, 0x39d3, 0x39d3, 0x39d4, - 0x39d4, 0x39d4, 0x39d5, 0x39d5, 0x39d5, 0x39d6, 0x39d6, 0x39d6, - 0x39d7, 0x39d7, 0x39d8, 0x39d8, 0x39d9, 0x39da, 0x39da, 0x39db, - 0x39dc, 0x39dc, 0x39dd, 0x39de, 0x39de, 0x39df, 0x39e0, 0x39e0, - 0x39e1, 0x39e2, 0x39e2, 0x39e3, 0x39e4, 0x39e4, 0x39e5, 0x39e6, - 0x39e6, 0x39e7, 0x39e8, 0x39e8, 0x39e9, 0x39ea, 0x39ea, 0x39eb, - 0x39ec, 0x39ec, 0x39ed, 0x39ee, 0x39ee, 0x39ef, 0x39ef, 0x39f0, - 0x39f1, 0x39f1, 0x39f2, 0x39f3, 0x39f3, 0x39f4, 0x39f5, 0x39f5, - 0x39f6, 0x39f7, 0x39f7, 0x39f8, 0x39f9, 0x39f9, 0x39fa, 0x39fa, - 0x39fb, 0x39fc, 0x39fc, 0x39fd, 0x39fe, 0x39fe, 0x39ff, 0x3a00, - 0x3a00, 0x3a01, 0x3a02, 0x3a02, 0x3a03, 0x3a03, 0x3a04, 0x3a05, - 0x3a05, 0x3a06, 0x3a07, 0x3a07, 0x3a08, 0x3a09, 0x3a09, 0x3a0a, - 0x3a0a, 0x3a0b, 0x3a0c, 0x3a0c, 0x3a0d, 0x3a0e, 0x3a0e, 0x3a0f, - 0x3a10, 0x3a10, 0x3a11, 0x3a11, 0x3a12, 0x3a13, 0x3a13, 0x3a14, - 0x3a15, 0x3a15, 0x3a16, 0x3a17, 0x3a17, 0x3a18, 0x3a18, 0x3a19, - 0x3a1a, 0x3a1a, 0x3a1b, 0x3a1c, 0x3a1c, 0x3a1d, 0x3a1d, 0x3a1e, - 0x3a1f, 0x3a1f, 0x3a20, 0x3a21, 0x3a21, 0x3a22, 0x3a22, 0x3a23, - 0x3a24, 0x3a24, 0x3a25, 0x3a26, 0x3a26, 0x3a27, 0x3a27, 0x3a28, - 0x3a29, 0x3a29, 0x3a2a, 0x3a2b, 0x3a2b, 0x3a2c, 0x3a2c, 0x3a2d, - 0x3a2e, 0x3a2e, 0x3a2f, 0x3a30, 0x3a30, 0x3a31, 0x3a31, 0x3a32, - 0x3a33, 0x3a33, 0x3a34, 0x3a34, 0x3a35, 0x3a36, 0x3a36, 0x3a37, - 0x3a38, 0x3a38, 0x3a39, 0x3a39, 0x3a3a, 0x3a3b, 0x3a3b, 0x3a3c, - 0x3a3c, 0x3a3d, 0x3a3e, 0x3a3e, 0x3a3f, 0x3a40, 0x3a40, 0x3a41, - 0x3a41, 0x3a42, 0x3a43, 0x3a43, 0x3a44, 0x3a44, 0x3a45, 0x3a46, - 0x3a46, 0x3a47, 0x3a47, 0x3a48, 0x3a49, 0x3a49, 0x3a4a, 0x3a4a, - 0x3a4b, 0x3a4c, 0x3a4c, 0x3a4d, 0x3a4e, 0x3a4e, 0x3a4f, 0x3a4f, - 0x3a50, 0x3a51, 0x3a51, 0x3a52, 0x3a52, 0x3a53, 0x3a54, 0x3a54, - 0x3a55, 0x3a55, 0x3a56, 0x3a57, 0x3a57, 0x3a58, 0x3a58, 0x3a59, - 0x3a5a, 0x3a5a, 0x3a5b, 0x3a5b, 0x3a5c, 0x3a5d, 0x3a5d, 0x3a5e, - 0x3a5e, 0x3a5f, 0x3a60, 0x3a60, 0x3a61, 0x3a61, 0x3a62, 0x3a63, - 0x3a63, 0x3a64, 0x3a64, 0x3a65, 0x3a66, 0x3a66, 0x3a67, 0x3a67, - 0x3a68, 0x3a68, 0x3a69, 0x3a6a, 0x3a6a, 0x3a6b, 0x3a6b, 0x3a6c, - 0x3a6d, 0x3a6d, 0x3a6e, 0x3a6e, 0x3a6f, 0x3a70, 0x3a70, 0x3a71, - 0x3a71, 0x3a72, 0x3a73, 0x3a73, 0x3a74, 0x3a74, 0x3a75, 0x3a75, - 0x3a76, 0x3a77, 0x3a77, 0x3a78, 0x3a78, 0x3a79, 0x3a7a, 0x3a7a, - 0x3a7b, 0x3a7b, 0x3a7c, 0x3a7c, 0x3a7d, 0x3a7e, 0x3a7e, 0x3a7f, - 0x3a7f, 0x3a80, 0x3a81, 0x3a81, 0x3a82, 0x3a82, 0x3a83, 0x3a83, - 0x3a84, 0x3a85, 0x3a85, 0x3a86, 0x3a86, 0x3a87, 0x3a88, 0x3a88, - 0x3a89, 0x3a89, 0x3a8a, 0x3a8a, 0x3a8b, 0x3a8c, 0x3a8c, 0x3a8d, - 0x3a8d, 0x3a8e, 0x3a8f, 0x3a8f, 0x3a90, 0x3a90, 0x3a91, 0x3a91, - 0x3a92, 0x3a93, 0x3a93, 0x3a94, 0x3a94, 0x3a95, 0x3a95, 0x3a96, - 0x3a97, 0x3a97, 0x3a98, 0x3a98, 0x3a99, 0x3a99, 0x3a9a, 0x3a9b, - 0x3a9b, 0x3a9c, 0x3a9c, 0x3a9d, 0x3a9d, 0x3a9e, 0x3a9f, 0x3a9f, - 0x3aa0, 0x3aa0, 0x3aa1, 0x3aa1, 0x3aa2, 0x3aa3, 0x3aa3, 0x3aa4, - 0x3aa4, 0x3aa5, 0x3aa5, 0x3aa6, 0x3aa7, 0x3aa7, 0x3aa8, 0x3aa8, - 0x3aa9, 0x3aa9, 0x3aaa, 0x3aaa, 0x3aab, 0x3aac, 0x3aac, 0x3aad, - 0x3aad, 0x3aae, 0x3aae, 0x3aaf, 0x3ab0, 0x3ab0, 0x3ab1, 0x3ab1, - 0x3ab2, 0x3ab2, 0x3ab3, 0x3ab4, 0x3ab4, 0x3ab5, 0x3ab5, 0x3ab6, - 0x3ab6, 0x3ab7, 0x3ab7, 0x3ab8, 0x3ab9, 0x3ab9, 0x3aba, 0x3aba, - 0x3abb, 0x3abb, 0x3abc, 0x3abc, 0x3abd, 0x3abe, 0x3abe, 0x3abf, - 0x3abf, 0x3ac0, 0x3ac0, 0x3ac1, 0x3ac2, 0x3ac2, 0x3ac3, 0x3ac3, - 0x3ac4, 0x3ac4, 0x3ac5, 0x3ac5, 0x3ac6, 0x3ac7, 0x3ac7, 0x3ac8, - 0x3ac8, 0x3ac9, 0x3ac9, 0x3aca, 0x3aca, 0x3acb, 0x3acb, 0x3acc, - 0x3acd, 0x3acd, 0x3ace, 0x3ace, 0x3acf, 0x3acf, 0x3ad0, 0x3ad0, - 0x3ad1, 0x3ad2, 0x3ad2, 0x3ad3, 0x3ad3, 0x3ad4, 0x3ad4, 0x3ad5, - 0x3ad5, 0x3ad6, 0x3ad7, 0x3ad7, 0x3ad8, 0x3ad8, 0x3ad9, 0x3ad9, - 0x3ada, 0x3ada, 0x3adb, 0x3adb, 0x3adc, 0x3add, 0x3add, 0x3ade, - 0x3ade, 0x3adf, 0x3adf, 0x3ae0, 0x3ae0, 0x3ae1, 0x3ae1, 0x3ae2, - 0x3ae3, 0x3ae3, 0x3ae4, 0x3ae4, 0x3ae5, 0x3ae5, 0x3ae6, 0x3ae6, - 0x3ae7, 0x3ae7, 0x3ae8, 0x3ae9, 0x3ae9, 0x3aea, 0x3aea, 0x3aeb, - 0x3aeb, 0x3aec, 0x3aec, 0x3aed, 0x3aed, 0x3aee, 0x3aee, 0x3aef, - 0x3af0, 0x3af0, 0x3af1, 0x3af1, 0x3af2, 0x3af2, 0x3af3, 0x3af3, - 0x3af4, 0x3af4, 0x3af5, 0x3af5, 0x3af6, 0x3af7, 0x3af7, 0x3af8, - 0x3af8, 0x3af9, 0x3af9, 0x3afa, 0x3afa, 0x3afb, 0x3afb, 0x3afc, - 0x3afc, 0x3afd, 0x3afe, 0x3afe, 0x3aff, 0x3aff, 0x3b00, 0x3b00, - 0x3b01, 0x3b01, 0x3b02, 0x3b02, 0x3b03, 0x3b03, 0x3b04, 0x3b04, - 0x3b05, 0x3b05, 0x3b06, 0x3b07, 0x3b07, 0x3b08, 0x3b08, 0x3b09, - 0x3b09, 0x3b0a, 0x3b0a, 0x3b0b, 0x3b0b, 0x3b0c, 0x3b0c, 0x3b0d, - 0x3b0d, 0x3b0e, 0x3b0f, 0x3b0f, 0x3b10, 0x3b10, 0x3b11, 0x3b11, - 0x3b12, 0x3b12, 0x3b13, 0x3b13, 0x3b14, 0x3b14, 0x3b15, 0x3b15, - 0x3b16, 0x3b16, 0x3b17, 0x3b17, 0x3b18, 0x3b19, 0x3b19, 0x3b1a, - 0x3b1a, 0x3b1b, 0x3b1b, 0x3b1c, 0x3b1c, 0x3b1d, 0x3b1d, 0x3b1e, - 0x3b1e, 0x3b1f, 0x3b1f, 0x3b20, 0x3b20, 0x3b21, 0x3b21, 0x3b22, - 0x3b22, 0x3b23, 0x3b23, 0x3b24, 0x3b25, 0x3b25, 0x3b26, 0x3b26, - 0x3b27, 0x3b27, 0x3b28, 0x3b28, 0x3b29, 0x3b29, 0x3b2a, 0x3b2a, - 0x3b2b, 0x3b2b, 0x3b2c, 0x3b2c, 0x3b2d, 0x3b2d, 0x3b2e, 0x3b2e, - 0x3b2f, 0x3b2f, 0x3b30, 0x3b30, 0x3b31, 0x3b32, 0x3b32, 0x3b33, - 0x3b33, 0x3b34, 0x3b34, 0x3b35, 0x3b35, 0x3b36, 0x3b36, 0x3b37, - 0x3b37, 0x3b38, 0x3b38, 0x3b39, 0x3b39, 0x3b3a, 0x3b3a, 0x3b3b, - 0x3b3b, 0x3b3c, 0x3b3c, 0x3b3d, 0x3b3d, 0x3b3e, 0x3b3e, 0x3b3f, - 0x3b3f, 0x3b40, 0x3b40, 0x3b41, 0x3b41, 0x3b42, 0x3b42, 0x3b43, - 0x3b43, 0x3b44, 0x3b44, 0x3b45, 0x3b46, 0x3b46, 0x3b47, 0x3b47, - 0x3b48, 0x3b48, 0x3b49, 0x3b49, 0x3b4a, 0x3b4a, 0x3b4b, 0x3b4b, - 0x3b4c, 0x3b4c, 0x3b4d, 0x3b4d, 0x3b4e, 0x3b4e, 0x3b4f, 0x3b4f, - 0x3b50, 0x3b50, 0x3b51, 0x3b51, 0x3b52, 0x3b52, 0x3b53, 0x3b53, - 0x3b54, 0x3b54, 0x3b55, 0x3b55, 0x3b56, 0x3b56, 0x3b57, 0x3b57, - 0x3b58, 0x3b58, 0x3b59, 0x3b59, 0x3b5a, 0x3b5a, 0x3b5b, 0x3b5b, - 0x3b5c, 0x3b5c, 0x3b5d, 0x3b5d, 0x3b5e, 0x3b5e, 0x3b5f, 0x3b5f, - 0x3b60, 0x3b60, 0x3b61, 0x3b61, 0x3b62, 0x3b62, 0x3b63, 0x3b63, - 0x3b64, 0x3b64, 0x3b65, 0x3b65, 0x3b66, 0x3b66, 0x3b67, 0x3b67, - 0x3b68, 0x3b68, 0x3b69, 0x3b69, 0x3b6a, 0x3b6a, 0x3b6b, 0x3b6b, - 0x3b6c, 0x3b6c, 0x3b6d, 0x3b6d, 0x3b6e, 0x3b6e, 0x3b6f, 0x3b6f, - 0x3b70, 0x3b70, 0x3b71, 0x3b71, 0x3b72, 0x3b72, 0x3b73, 0x3b73, - 0x3b74, 0x3b74, 0x3b75, 0x3b75, 0x3b76, 0x3b76, 0x3b77, 0x3b77, - 0x3b78, 0x3b78, 0x3b79, 0x3b79, 0x3b7a, 0x3b7a, 0x3b7b, 0x3b7b, - 0x3b7c, 0x3b7c, 0x3b7d, 0x3b7d, 0x3b7e, 0x3b7e, 0x3b7f, 0x3b7f, - 0x3b80, 0x3b80, 0x3b81, 0x3b81, 0x3b82, 0x3b82, 0x3b82, 0x3b83, - 0x3b83, 0x3b84, 0x3b84, 0x3b85, 0x3b85, 0x3b86, 0x3b86, 0x3b87, - 0x3b87, 0x3b88, 0x3b88, 0x3b89, 0x3b89, 0x3b8a, 0x3b8a, 0x3b8b, - 0x3b8b, 0x3b8c, 0x3b8c, 0x3b8d, 0x3b8d, 0x3b8e, 0x3b8e, 0x3b8f, - 0x3b8f, 0x3b90, 0x3b90, 0x3b91, 0x3b91, 0x3b92, 0x3b92, 0x3b93, - 0x3b93, 0x3b94, 0x3b94, 0x3b95, 0x3b95, 0x3b96, 0x3b96, 0x3b96, - 0x3b97, 0x3b97, 0x3b98, 0x3b98, 0x3b99, 0x3b99, 0x3b9a, 0x3b9a, - 0x3b9b, 0x3b9b, 0x3b9c, 0x3b9c, 0x3b9d, 0x3b9d, 0x3b9e, 0x3b9e, - 0x3b9f, 0x3b9f, 0x3ba0, 0x3ba0, 0x3ba1, 0x3ba1, 0x3ba2, 0x3ba2, - 0x3ba3, 0x3ba3, 0x3ba4, 0x3ba4, 0x3ba4, 0x3ba5, 0x3ba5, 0x3ba6, - 0x3ba6, 0x3ba7, 0x3ba7, 0x3ba8, 0x3ba8, 0x3ba9, 0x3ba9, 0x3baa, - 0x3baa, 0x3bab, 0x3bab, 0x3bac, 0x3bac, 0x3bad, 0x3bad, 0x3bae, - 0x3bae, 0x3baf, 0x3baf, 0x3baf, 0x3bb0, 0x3bb0, 0x3bb1, 0x3bb1, - 0x3bb2, 0x3bb2, 0x3bb3, 0x3bb3, 0x3bb4, 0x3bb4, 0x3bb5, 0x3bb5, - 0x3bb6, 0x3bb6, 0x3bb7, 0x3bb7, 0x3bb8, 0x3bb8, 0x3bb9, 0x3bb9, - 0x3bb9, 0x3bba, 0x3bba, 0x3bbb, 0x3bbb, 0x3bbc, 0x3bbc, 0x3bbd, - 0x3bbd, 0x3bbe, 0x3bbe, 0x3bbf, 0x3bbf, 0x3bc0, 0x3bc0, 0x3bc1, - 0x3bc1, 0x3bc1, 0x3bc2, 0x3bc2, 0x3bc3, 0x3bc3, 0x3bc4, 0x3bc4, - 0x3bc5, 0x3bc5, 0x3bc6, 0x3bc6, 0x3bc7, 0x3bc7, 0x3bc8, 0x3bc8, - 0x3bc9, 0x3bc9, 0x3bc9, 0x3bca, 0x3bca, 0x3bcb, 0x3bcb, 0x3bcc, - 0x3bcc, 0x3bcd, 0x3bcd, 0x3bce, 0x3bce, 0x3bcf, 0x3bcf, 0x3bd0, - 0x3bd0, 0x3bd1, 0x3bd1, 0x3bd1, 0x3bd2, 0x3bd2, 0x3bd3, 0x3bd3, - 0x3bd4, 0x3bd4, 0x3bd5, 0x3bd5, 0x3bd6, 0x3bd6, 0x3bd7, 0x3bd7, - 0x3bd8, 0x3bd8, 0x3bd8, 0x3bd9, 0x3bd9, 0x3bda, 0x3bda, 0x3bdb, - 0x3bdb, 0x3bdc, 0x3bdc, 0x3bdd, 0x3bdd, 0x3bde, 0x3bde, 0x3bde, - 0x3bdf, 0x3bdf, 0x3be0, 0x3be0, 0x3be1, 0x3be1, 0x3be2, 0x3be2, - 0x3be3, 0x3be3, 0x3be4, 0x3be4, 0x3be5, 0x3be5, 0x3be5, 0x3be6, - 0x3be6, 0x3be7, 0x3be7, 0x3be8, 0x3be8, 0x3be9, 0x3be9, 0x3bea, - 0x3bea, 0x3beb, 0x3beb, 0x3beb, 0x3bec, 0x3bec, 0x3bed, 0x3bed, - 0x3bee, 0x3bee, 0x3bef, 0x3bef, 0x3bf0, 0x3bf0, 0x3bf0, 0x3bf1, - 0x3bf1, 0x3bf2, 0x3bf2, 0x3bf3, 0x3bf3, 0x3bf4, 0x3bf4, 0x3bf5, - 0x3bf5, 0x3bf6, 0x3bf6, 0x3bf6, 0x3bf7, 0x3bf7, 0x3bf8, 0x3bf8, - 0x3bf9, 0x3bf9, 0x3bfa, 0x3bfa, 0x3bfb, 0x3bfb, 0x3bfb, 0x3bfc, - 0x3bfc, 0x3bfd, 0x3bfd, 0x3bfe, 0x3bfe, 0x3bff, 0x3bff, 0x3c00, - 0x3c00, 0x3c00, 0x3c01, 0x3c01, 0x3c02, 0x3c02, 0x3c03, 0x3c03, - 0x3c04, 0x3c04, 0x3c05, 0x3c05, 0x3c05, 0x3c06, 0x3c06, 0x3c07, - 0x3c07, 0x3c08, 0x3c08, 0x3c09, 0x3c09, 0x3c09, 0x3c0a, 0x3c0a, - 0x3c0b, 0x3c0b, 0x3c0c, 0x3c0c, 0x3c0d, 0x3c0d, 0x3c0d, 0x3c0e, - 0x3c0e, 0x3c0f, 0x3c0f, 0x3c10, 0x3c10, 0x3c11, 0x3c11, 0x3c11, - 0x3c12, 0x3c12, 0x3c13, 0x3c13, 0x3c14, 0x3c14, 0x3c14, 0x3c15, - 0x3c15, 0x3c16, 0x3c16, 0x3c17, 0x3c17, 0x3c17, 0x3c18, 0x3c18, - 0x3c19, 0x3c19, 0x3c1a, 0x3c1a, 0x3c1b, 0x3c1b, 0x3c1b, 0x3c1c, - 0x3c1c, 0x3c1d, 0x3c1d, 0x3c1d, 0x3c1e, 0x3c1e, 0x3c1f, 0x3c1f, - 0x3c20, 0x3c20, 0x3c20, 0x3c21, 0x3c21, 0x3c22, 0x3c22, 0x3c23, - 0x3c23, 0x3c23, 0x3c24, 0x3c24, 0x3c25, 0x3c25, 0x3c26, 0x3c26, - 0x3c26, 0x3c27, 0x3c27, 0x3c28, 0x3c28, 0x3c28, 0x3c29, 0x3c29, - 0x3c2a, 0x3c2a, 0x3c2b, 0x3c2b, 0x3c2b, 0x3c2c, 0x3c2c, 0x3c2d, - 0x3c2d, 0x3c2d, 0x3c2e, 0x3c2e, 0x3c2f, 0x3c2f, 0x3c2f, 0x3c30, - 0x3c30, 0x3c31, 0x3c31, 0x3c32, 0x3c32, 0x3c32, 0x3c33, 0x3c33, - 0x3c34, 0x3c34, 0x3c34, 0x3c35, 0x3c35, 0x3c36, 0x3c36, 0x3c36, - 0x3c37, 0x3c37, 0x3c38, 0x3c38, 0x3c38, 0x3c39, 0x3c39, 0x3c3a, - 0x3c3a, 0x3c3a, 0x3c3b, 0x3c3b, 0x3c3c, 0x3c3c, 0x3c3c, 0x3c3d, - 0x3c3d, 0x3c3e, 0x3c3e, 0x3c3e, 0x3c3f, 0x3c3f, 0x3c40, 0x3c40, - 0x3c40, 0x3c41, 0x3c41, 0x3c42, 0x3c42, 0x3c42, 0x3c43, 0x3c43, - 0x3c44, 0x3c44, 0x3c44, 0x3c45, 0x3c45, 0x3c46, 0x3c46, 0x3c46, - 0x3c47, 0x3c47, 0x3c47, 0x3c48, 0x3c48, 0x3c49, 0x3c49, 0x3c49, - 0x3c4a, 0x3c4a, 0x3c4b, 0x3c4b, 0x3c4b, 0x3c4c, 0x3c4c, 0x3c4d, - 0x3c4d, 0x3c4d, 0x3c4e, 0x3c4e, 0x3c4e, 0x3c4f, 0x3c4f, 0x3c50, - 0x3c50, 0x3c50, 0x3c51, 0x3c51, 0x3c52, 0x3c52, 0x3c52, 0x3c53, - 0x3c53, 0x3c53, 0x3c54, 0x3c54, 0x3c55, 0x3c55, 0x3c55, 0x3c56, - 0x3c56, 0x3c56, 0x3c57, 0x3c57, 0x3c58, 0x3c58, 0x3c58, 0x3c59, - 0x3c59, 0x3c59, 0x3c5a, 0x3c5a, 0x3c5b, 0x3c5b, 0x3c5b, 0x3c5c, - 0x3c5c, 0x3c5c, 0x3c5d, 0x3c5d, 0x3c5e, 0x3c5e, 0x3c5e, 0x3c5f, - 0x3c5f, 0x3c5f, 0x3c60, 0x3c60, 0x3c61, 0x3c61, 0x3c61, 0x3c62, - 0x3c62, 0x3c62, 0x3c63, 0x3c63, 0x3c63, 0x3c64, 0x3c64, 0x3c65, - 0x3c65, 0x3c65, 0x3c66, 0x3c66, 0x3c66, 0x3c67, 0x3c67, 0x3c67, - 0x3c68, 0x3c68, 0x3c69, 0x3c69, 0x3c69, 0x3c6a, 0x3c6a, 0x3c6a, - 0x3c6b, 0x3c6b, 0x3c6b, 0x3c6c, 0x3c6c, 0x3c6d, 0x3c6d, 0x3c6d, - 0x3c6e, 0x3c6e, 0x3c6e, 0x3c6f, 0x3c6f, 0x3c6f, 0x3c70, 0x3c70, - 0x3c71, 0x3c71, 0x3c71, 0x3c72, 0x3c72, 0x3c72, 0x3c73, 0x3c73, - 0x3c73, 0x3c74, 0x3c74, 0x3c74, 0x3c75, 0x3c75, 0x3c75, 0x3c76, - 0x3c76, 0x3c77, 0x3c77, 0x3c77, 0x3c78, 0x3c78, 0x3c78, 0x3c79, - 0x3c79, 0x3c79, 0x3c7a, 0x3c7a, 0x3c7a, 0x3c7b, 0x3c7b, 0x3c7b, - 0x3c7c, 0x3c7c, 0x3c7c, 0x3c7d, 0x3c7d, 0x3c7e, 0x3c7e, 0x3c7e, - 0x3c7f, 0x3c7f, 0x3c7f, 0x3c80, 0x3c80, 0x3c80, 0x3c81, 0x3c81, - 0x3c81, 0x3c82, 0x3c82, 0x3c82, 0x3c83, 0x3c83, 0x3c83, 0x3c84, - 0x3c84, 0x3c84, 0x3c85, 0x3c85, 0x3c85, 0x3c86, 0x3c86, 0x3c86, - 0x3c87, 0x3c87, 0x3c87, 0x3c88, 0x3c88, 0x3c89, 0x3c89, 0x3c89, - 0x3c8a, 0x3c8a, 0x3c8a, 0x3c8b, 0x3c8b, 0x3c8b, 0x3c8c, 0x3c8c, - 0x3c8c, 0x3c8d, 0x3c8d, 0x3c8d, 0x3c8e, 0x3c8e, 0x3c8e, 0x3c8f, - 0x3c8f, 0x3c8f, 0x3c90, 0x3c90, 0x3c90, 0x3c91, 0x3c91, 0x3c91, - 0x3c92, 0x3c92, 0x3c92, 0x3c93, 0x3c93, 0x3c93, 0x3c94, 0x3c94, - 0x3c94, 0x3c95, 0x3c95, 0x3c95, 0x3c96, 0x3c96, 0x3c96, 0x3c97, - 0x3c97, 0x3c97, 0x3c98, 0x3c98, 0x3c98, 0x3c99, 0x3c99, 0x3c99, - 0x3c99, 0x3c9a, 0x3c9a, 0x3c9a, 0x3c9b, 0x3c9b, 0x3c9b, 0x3c9c, - 0x3c9c, 0x3c9c, 0x3c9d, 0x3c9d, 0x3c9d, 0x3c9e, 0x3c9e, 0x3c9e, - 0x3c9f, 0x3c9f, 0x3c9f, 0x3ca0, 0x3ca0, 0x3ca0, 0x3ca1, 0x3ca1, - 0x3ca1, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca3, 0x3ca3, 0x3ca3, 0x3ca4, - 0x3ca4, 0x3ca4, 0x3ca4, 0x3ca5, 0x3ca5, 0x3ca5, 0x3ca6, 0x3ca6, - 0x3ca6, 0x3ca7, 0x3ca7, 0x3ca7, 0x3ca8, 0x3ca8, 0x3ca8, 0x3ca9, - 0x3ca9, 0x3ca9, 0x3caa, 0x3caa, 0x3caa, 0x3caa, 0x3cab, 0x3cab, - 0x3cab, 0x3cac, 0x3cac, 0x3cac, 0x3cad, 0x3cad, 0x3cad, 0x3cae, - 0x3cae, 0x3cae, 0x3caf, 0x3caf, 0x3caf, 0x3cb0, 0x3cb0, 0x3cb0, - 0x3cb0, 0x3cb1, 0x3cb1, 0x3cb1, 0x3cb2, 0x3cb2, 0x3cb2, 0x3cb3, - 0x3cb3, 0x3cb3, 0x3cb4, 0x3cb4, 0x3cb4, 0x3cb4, 0x3cb5, 0x3cb5, - 0x3cb5, 0x3cb6, 0x3cb6, 0x3cb6, 0x3cb7, 0x3cb7, 0x3cb7, 0x3cb8, - 0x3cb8, 0x3cb8, 0x3cb8, 0x3cb9, 0x3cb9, 0x3cb9, 0x3cba, 0x3cba, - 0x3cba, 0x3cbb, 0x3cbb, 0x3cbb, 0x3cbc, 0x3cbc, 0x3cbc, 0x3cbc, - 0x3cbd, 0x3cbd, 0x3cbd, 0x3cbe, 0x3cbe, 0x3cbe, 0x3cbf, 0x3cbf, - 0x3cbf, 0x3cbf, 0x3cc0, 0x3cc0, 0x3cc0, 0x3cc1, 0x3cc1, 0x3cc1, - 0x3cc2, 0x3cc2, 0x3cc2, 0x3cc2, 0x3cc3, 0x3cc3, 0x3cc3, 0x3cc4, - 0x3cc4, 0x3cc4, 0x3cc5, 0x3cc5, 0x3cc5, 0x3cc5, 0x3cc6, 0x3cc6, - 0x3cc6, 0x3cc7, 0x3cc7, 0x3cc7, 0x3cc8, 0x3cc8, 0x3cc8, 0x3cc8, - 0x3cc9, 0x3cc9, 0x3cc9, 0x3cca, 0x3cca, 0x3cca, 0x3cca, 0x3ccb, - 0x3ccb, 0x3ccb, 0x3ccc, 0x3ccc, 0x3ccc, 0x3ccd, 0x3ccd, 0x3ccd, - 0x3ccd, 0x3cce, 0x3cce, 0x3cce, 0x3ccf, 0x3ccf, 0x3ccf, 0x3ccf, - 0x3cd0, 0x3cd0, 0x3cd0, 0x3cd1, 0x3cd1, 0x3cd1, 0x3cd1, 0x3cd2, - 0x3cd2, 0x3cd2, 0x3cd3, 0x3cd3, 0x3cd3, 0x3cd3, 0x3cd4, 0x3cd4, - 0x3cd4, 0x3cd5, 0x3cd5, 0x3cd5, 0x3cd6, 0x3cd6, 0x3cd6, 0x3cd6, - 0x3cd7, 0x3cd7, 0x3cd7, 0x3cd8, 0x3cd8, 0x3cd8, 0x3cd8, 0x3cd9, - 0x3cd9, 0x3cd9, 0x3cda, 0x3cda, 0x3cda, 0x3cda, 0x3cdb, 0x3cdb, - 0x3cdb, 0x3cdc, 0x3cdc, 0x3cdc, 0x3cdc, 0x3cdd, 0x3cdd, 0x3cdd, - 0x3cdd, 0x3cde, 0x3cde, 0x3cde, 0x3cdf, 0x3cdf, 0x3cdf, 0x3cdf, - 0x3ce0, 0x3ce0, 0x3ce0, 0x3ce1, 0x3ce1, 0x3ce1, 0x3ce1, 0x3ce2, - 0x3ce2, 0x3ce2, 0x3ce3, 0x3ce3, 0x3ce3, 0x3ce3, 0x3ce4, 0x3ce4, - 0x3ce4, 0x3ce4, 0x3ce5, 0x3ce5, 0x3ce5, 0x3ce6, 0x3ce6, 0x3ce6, - 0x3ce6, 0x3ce7, 0x3ce7, 0x3ce7, 0x3ce8, 0x3ce8, 0x3ce8, 0x3ce8, - 0x3ce9, 0x3ce9, 0x3ce9, 0x3ce9, 0x3cea, 0x3cea, 0x3cea, 0x3ceb, - 0x3ceb, 0x3ceb, 0x3ceb, 0x3cec, 0x3cec, 0x3cec, 0x3cec, 0x3ced, - 0x3ced, 0x3ced, 0x3cee, 0x3cee, 0x3cee, 0x3cee, 0x3cef, 0x3cef, - 0x3cef, 0x3cef, 0x3cf0, 0x3cf0, 0x3cf0, 0x3cf1, 0x3cf1, 0x3cf1, - 0x3cf1, 0x3cf2, 0x3cf2, 0x3cf2, 0x3cf2, 0x3cf3, 0x3cf3, 0x3cf3, - 0x3cf4, 0x3cf4, 0x3cf4, 0x3cf4, 0x3cf5, 0x3cf5, 0x3cf5, 0x3cf5, - 0x3cf6, 0x3cf6, 0x3cf6, 0x3cf7, 0x3cf7, 0x3cf7, 0x3cf7, 0x3cf8, - 0x3cf8, 0x3cf8, 0x3cf8, 0x3cf9, 0x3cf9, 0x3cf9, 0x3cf9, 0x3cfa, - 0x3cfa, 0x3cfa, 0x3cfa, 0x3cfb, 0x3cfb, 0x3cfb, 0x3cfc, 0x3cfc, - 0x3cfc, 0x3cfc, 0x3cfd, 0x3cfd, 0x3cfd, 0x3cfd, 0x3cfe, 0x3cfe, - 0x3cfe, 0x3cfe, 0x3cff, 0x3cff, 0x3cff, 0x3d00, 0x3d00, 0x3d00, - 0x3d00, 0x3d01, 0x3d01, 0x3d01, 0x3d01, 0x3d02, 0x3d02, 0x3d02, - 0x3d02, 0x3d03, 0x3d03, 0x3d03, 0x3d03, 0x3d04, 0x3d04, 0x3d04, - 0x3d04, 0x3d05, 0x3d05, 0x3d05, 0x3d06, 0x3d06, 0x3d06, 0x3d06, - 0x3d07, 0x3d07, 0x3d07, 0x3d07, 0x3d08, 0x3d08, 0x3d08, 0x3d08, - 0x3d09, 0x3d09, 0x3d09, 0x3d09, 0x3d0a, 0x3d0a, 0x3d0a, 0x3d0a, - 0x3d0b, 0x3d0b, 0x3d0b, 0x3d0b, 0x3d0c, 0x3d0c, 0x3d0c, 0x3d0c, - 0x3d0d, 0x3d0d, 0x3d0d, 0x3d0d, 0x3d0e, 0x3d0e, 0x3d0e, 0x3d0e, - 0x3d0f, 0x3d0f, 0x3d0f, 0x3d10, 0x3d10, 0x3d10, 0x3d10, 0x3d11, - 0x3d11, 0x3d11, 0x3d11, 0x3d12, 0x3d12, 0x3d12, 0x3d12, 0x3d13, - 0x3d13, 0x3d13, 0x3d13, 0x3d14, 0x3d14, 0x3d14, 0x3d14, 0x3d15, - 0x3d15, 0x3d15, 0x3d15, 0x3d16, 0x3d16, 0x3d16, 0x3d16, 0x3d17, - 0x3d17, 0x3d17, 0x3d17, 0x3d18, 0x3d18, 0x3d18, 0x3d18, 0x3d19, - 0x3d19, 0x3d19, 0x3d19, 0x3d1a, 0x3d1a, 0x3d1a, 0x3d1a, 0x3d1b, - 0x3d1b, 0x3d1b, 0x3d1b, 0x3d1c, 0x3d1c, 0x3d1c, 0x3d1c, 0x3d1d, - 0x3d1d, 0x3d1d, 0x3d1d, 0x3d1e, 0x3d1e, 0x3d1e, 0x3d1e, 0x3d1e, - 0x3d1f, 0x3d1f, 0x3d1f, 0x3d1f, 0x3d20, 0x3d20, 0x3d20, 0x3d20, - 0x3d21, 0x3d21, 0x3d21, 0x3d21, 0x3d22, 0x3d22, 0x3d22, 0x3d22, - 0x3d23, 0x3d23, 0x3d23, 0x3d23, 0x3d24, 0x3d24, 0x3d24, 0x3d24, - 0x3d25, 0x3d25, 0x3d25, 0x3d25, 0x3d26, 0x3d26, 0x3d26, 0x3d26, - 0x3d27, 0x3d27, 0x3d27, 0x3d27, 0x3d27, 0x3d28, 0x3d28, 0x3d28, - 0x3d28, 0x3d29, 0x3d29, 0x3d29, 0x3d29, 0x3d2a, 0x3d2a, 0x3d2a, - 0x3d2a, 0x3d2b, 0x3d2b, 0x3d2b, 0x3d2b, 0x3d2c, 0x3d2c, 0x3d2c, - 0x3d2c, 0x3d2d, 0x3d2d, 0x3d2d, 0x3d2d, 0x3d2d, 0x3d2e, 0x3d2e, - 0x3d2e, 0x3d2e, 0x3d2f, 0x3d2f, 0x3d2f, 0x3d2f, 0x3d30, 0x3d30, - 0x3d30, 0x3d30, 0x3d31, 0x3d31, 0x3d31, 0x3d31, 0x3d31, 0x3d32, - 0x3d32, 0x3d32, 0x3d32, 0x3d33, 0x3d33, 0x3d33, 0x3d33, 0x3d34, - 0x3d34, 0x3d34, 0x3d34, 0x3d35, 0x3d35, 0x3d35, 0x3d35, 0x3d35, - 0x3d36, 0x3d36, 0x3d36, 0x3d36, 0x3d37, 0x3d37, 0x3d37, 0x3d37, - 0x3d38, 0x3d38, 0x3d38, 0x3d38, 0x3d39, 0x3d39, 0x3d39, 0x3d39, - 0x3d39, 0x3d3a, 0x3d3a, 0x3d3a, 0x3d3a, 0x3d3b, 0x3d3b, 0x3d3b, - 0x3d3b, 0x3d3c, 0x3d3c, 0x3d3c, 0x3d3c, 0x3d3c, 0x3d3d, 0x3d3d, - 0x3d3d, 0x3d3d, 0x3d3e, 0x3d3e, 0x3d3e, 0x3d3e, 0x3d3f, 0x3d3f, - 0x3d3f, 0x3d3f, 0x3d3f, 0x3d40, 0x3d40, 0x3d40, 0x3d40, 0x3d41, - 0x3d41, 0x3d41, 0x3d41, 0x3d41, 0x3d42, 0x3d42, 0x3d42, 0x3d42, - 0x3d43, 0x3d43, 0x3d44, 0x3d44, 0x3d44, 0x3d45, 0x3d45, 0x3d46, - 0x3d46, 0x3d47, 0x3d47, 0x3d48, 0x3d48, 0x3d49, 0x3d49, 0x3d49, - 0x3d4a, 0x3d4a, 0x3d4b, 0x3d4b, 0x3d4c, 0x3d4c, 0x3d4d, 0x3d4d, - 0x3d4d, 0x3d4e, 0x3d4e, 0x3d4f, 0x3d4f, 0x3d50, 0x3d50, 0x3d51, - 0x3d51, 0x3d51, 0x3d52, 0x3d52, 0x3d53, 0x3d53, 0x3d54, 0x3d54, - 0x3d54, 0x3d55, 0x3d55, 0x3d56, 0x3d56, 0x3d57, 0x3d57, 0x3d58, - 0x3d58, 0x3d58, 0x3d59, 0x3d59, 0x3d5a, 0x3d5a, 0x3d5b, 0x3d5b, - 0x3d5b, 0x3d5c, 0x3d5c, 0x3d5d, 0x3d5d, 0x3d5e, 0x3d5e, 0x3d5e, - 0x3d5f, 0x3d5f, 0x3d60, 0x3d60, 0x3d61, 0x3d61, 0x3d61, 0x3d62, - 0x3d62, 0x3d63, 0x3d63, 0x3d64, 0x3d64, 0x3d64, 0x3d65, 0x3d65, - 0x3d66, 0x3d66, 0x3d66, 0x3d67, 0x3d67, 0x3d68, 0x3d68, 0x3d69, - 0x3d69, 0x3d69, 0x3d6a, 0x3d6a, 0x3d6b, 0x3d6b, 0x3d6c, 0x3d6c, - 0x3d6c, 0x3d6d, 0x3d6d, 0x3d6e, 0x3d6e, 0x3d6e, 0x3d6f, 0x3d6f, - 0x3d70, 0x3d70, 0x3d70, 0x3d71, 0x3d71, 0x3d72, 0x3d72, 0x3d73, - 0x3d73, 0x3d73, 0x3d74, 0x3d74, 0x3d75, 0x3d75, 0x3d75, 0x3d76, - 0x3d76, 0x3d77, 0x3d77, 0x3d77, 0x3d78, 0x3d78, 0x3d79, 0x3d79, - 0x3d79, 0x3d7a, 0x3d7a, 0x3d7b, 0x3d7b, 0x3d7b, 0x3d7c, 0x3d7c, - 0x3d7d, 0x3d7d, 0x3d7d, 0x3d7e, 0x3d7e, 0x3d7f, 0x3d7f, 0x3d7f, - 0x3d80, 0x3d80, 0x3d81, 0x3d81, 0x3d81, 0x3d82, 0x3d82, 0x3d83, - 0x3d83, 0x3d83, 0x3d84, 0x3d84, 0x3d85, 0x3d85, 0x3d85, 0x3d86, - 0x3d86, 0x3d87, 0x3d87, 0x3d87, 0x3d88, 0x3d88, 0x3d89, 0x3d89, - 0x3d89, 0x3d8a, 0x3d8a, 0x3d8b, 0x3d8b, 0x3d8b, 0x3d8c, 0x3d8c, - 0x3d8c, 0x3d8d, 0x3d8d, 0x3d8e, 0x3d8e, 0x3d8e, 0x3d8f, 0x3d8f, - 0x3d90, 0x3d90, 0x3d90, 0x3d91, 0x3d91, 0x3d91, 0x3d92, 0x3d92, - 0x3d93, 0x3d93, 0x3d93, 0x3d94, 0x3d94, 0x3d95, 0x3d95, 0x3d95, - 0x3d96, 0x3d96, 0x3d96, 0x3d97, 0x3d97, 0x3d98, 0x3d98, 0x3d98, - 0x3d99, 0x3d99, 0x3d99, 0x3d9a, 0x3d9a, 0x3d9b, 0x3d9b, 0x3d9b, - 0x3d9c, 0x3d9c, 0x3d9c, 0x3d9d, 0x3d9d, 0x3d9e, 0x3d9e, 0x3d9e, - 0x3d9f, 0x3d9f, 0x3d9f, 0x3da0, 0x3da0, 0x3da1, 0x3da1, 0x3da1, - 0x3da2, 0x3da2, 0x3da2, 0x3da3, 0x3da3, 0x3da4, 0x3da4, 0x3da4, - 0x3da5, 0x3da5, 0x3da5, 0x3da6, 0x3da6, 0x3da6, 0x3da7, 0x3da7, - 0x3da8, 0x3da8, 0x3da8, 0x3da9, 0x3da9, 0x3da9, 0x3daa, 0x3daa, - 0x3daa, 0x3dab, 0x3dab, 0x3dac, 0x3dac, 0x3dac, 0x3dad, 0x3dad, - 0x3dad, 0x3dae, 0x3dae, 0x3dae, 0x3daf, 0x3daf, 0x3db0, 0x3db0, - 0x3db0, 0x3db1, 0x3db1, 0x3db1, 0x3db2, 0x3db2, 0x3db2, 0x3db3, - 0x3db3, 0x3db3, 0x3db4, 0x3db4, 0x3db5, 0x3db5, 0x3db5, 0x3db6, - 0x3db6, 0x3db6, 0x3db7, 0x3db7, 0x3db7, 0x3db8, 0x3db8, 0x3db8, - 0x3db9, 0x3db9, 0x3dba, 0x3dba, 0x3dba, 0x3dbb, 0x3dbb, 0x3dbb, - 0x3dbc, 0x3dbc, 0x3dbc, 0x3dbd, 0x3dbd, 0x3dbd, 0x3dbe, 0x3dbe, - 0x3dbe, 0x3dbf, 0x3dbf, 0x3dbf, 0x3dc0, 0x3dc0, 0x3dc1, 0x3dc1, - 0x3dc1, 0x3dc2, 0x3dc2, 0x3dc2, 0x3dc3, 0x3dc3, 0x3dc3, 0x3dc4, - 0x3dc4, 0x3dc4, 0x3dc5, 0x3dc5, 0x3dc5, 0x3dc6, 0x3dc6, 0x3dc6, - 0x3dc7, 0x3dc7, 0x3dc7, 0x3dc8, 0x3dc8, 0x3dc8, 0x3dc9, 0x3dc9, - 0x3dc9, 0x3dca, 0x3dca, 0x3dca, 0x3dcb, 0x3dcb, 0x3dcb, 0x3dcc, - 0x3dcc, 0x3dcc, 0x3dcd, 0x3dcd, 0x3dce, 0x3dce, 0x3dce, 0x3dcf, - 0x3dcf, 0x3dcf, 0x3dd0, 0x3dd0, 0x3dd0, 0x3dd1, 0x3dd1, 0x3dd1, - 0x3dd2, 0x3dd2, 0x3dd2, 0x3dd3, 0x3dd3, 0x3dd3, 0x3dd4, 0x3dd4, - 0x3dd4, 0x3dd5, 0x3dd5, 0x3dd5, 0x3dd6, 0x3dd6, 0x3dd6, 0x3dd7, - 0x3dd7, 0x3dd7, 0x3dd8, 0x3dd8, 0x3dd8, 0x3dd9, 0x3dd9, 0x3dd9, - 0x3dd9, 0x3dda, 0x3dda, 0x3dda, 0x3ddb, 0x3ddb, 0x3ddb, 0x3ddc, - 0x3ddc, 0x3ddc, 0x3ddd, 0x3ddd, 0x3ddd, 0x3dde, 0x3dde, 0x3dde, - 0x3ddf, 0x3ddf, 0x3ddf, 0x3de0, 0x3de0, 0x3de0, 0x3de1, 0x3de1, - 0x3de1, 0x3de2, 0x3de2, 0x3de2, 0x3de3, 0x3de3, 0x3de3, 0x3de4, - 0x3de4, 0x3de4, 0x3de5, 0x3de5, 0x3de5, 0x3de5, 0x3de6, 0x3de6, - 0x3de6, 0x3de7, 0x3de7, 0x3de7, 0x3de8, 0x3de8, 0x3de8, 0x3de9, - 0x3de9, 0x3de9, 0x3dea, 0x3dea, 0x3dea, 0x3deb, 0x3deb, 0x3deb, - 0x3dec, 0x3dec, 0x3dec, 0x3dec, 0x3ded, 0x3ded, 0x3ded, 0x3dee, - 0x3dee, 0x3dee, 0x3def, 0x3def, 0x3def, 0x3df0, 0x3df0, 0x3df0, - 0x3df1, 0x3df1, 0x3df1, 0x3df2, 0x3df2, 0x3df2, 0x3df2, 0x3df3, - 0x3df3, 0x3df3, 0x3df4, 0x3df4, 0x3df4, 0x3df5, 0x3df5, 0x3df5, - 0x3df6, 0x3df6, 0x3df6, 0x3df6, 0x3df7, 0x3df7, 0x3df7, 0x3df8, - 0x3df8, 0x3df8, 0x3df9, 0x3df9, 0x3df9, 0x3dfa, 0x3dfa, 0x3dfa, - 0x3dfa, 0x3dfb, 0x3dfb, 0x3dfb, 0x3dfc, 0x3dfc, 0x3dfc, 0x3dfd, - 0x3dfd, 0x3dfd, 0x3dfe, 0x3dfe, 0x3dfe, 0x3dfe, 0x3dff, 0x3dff, - 0x3dff, 0x3e00, 0x3e00, 0x3e00, 0x3e01, 0x3e01, 0x3e01, 0x3e01, - 0x3e02, 0x3e02, 0x3e02, 0x3e03, 0x3e03, 0x3e03, 0x3e04, 0x3e04, - 0x3e04, 0x3e04, 0x3e05, 0x3e05, 0x3e05, 0x3e06, 0x3e06, 0x3e06, - 0x3e07, 0x3e07, 0x3e07, 0x3e07, 0x3e08, 0x3e08, 0x3e08, 0x3e09, - 0x3e09, 0x3e09, 0x3e0a, 0x3e0a, 0x3e0a, 0x3e0a, 0x3e0b, 0x3e0b, - 0x3e0b, 0x3e0c, 0x3e0c, 0x3e0c, 0x3e0c, 0x3e0d, 0x3e0d, 0x3e0d, - 0x3e0e, 0x3e0e, 0x3e0e, 0x3e0f, 0x3e0f, 0x3e0f, 0x3e0f, 0x3e10, - 0x3e10, 0x3e10, 0x3e11, 0x3e11, 0x3e11, 0x3e11, 0x3e12, 0x3e12, - 0x3e12, 0x3e13, 0x3e13, 0x3e13, 0x3e14, 0x3e14, 0x3e14, 0x3e14, - 0x3e15, 0x3e15, 0x3e15, 0x3e16, 0x3e16, 0x3e16, 0x3e16, 0x3e17, - 0x3e17, 0x3e17, 0x3e18, 0x3e18, 0x3e18, 0x3e18, 0x3e19, 0x3e19, - 0x3e19, 0x3e1a, 0x3e1a, 0x3e1a, 0x3e1a, 0x3e1b, 0x3e1b, 0x3e1b, - 0x3e1c, 0x3e1c, 0x3e1c, 0x3e1c, 0x3e1d, 0x3e1d, 0x3e1d, 0x3e1e, - 0x3e1e, 0x3e1e, 0x3e1e, 0x3e1f, 0x3e1f, 0x3e1f, 0x3e20, 0x3e20, - 0x3e20, 0x3e20, 0x3e21, 0x3e21, 0x3e21, 0x3e22, 0x3e22, 0x3e22, - 0x3e22, 0x3e23, 0x3e23, 0x3e23, 0x3e23, 0x3e24, 0x3e24, 0x3e24, - 0x3e25, 0x3e25, 0x3e25, 0x3e25, 0x3e26, 0x3e26, 0x3e26, 0x3e27, - 0x3e27, 0x3e27, 0x3e27, 0x3e28, 0x3e28, 0x3e28, 0x3e29, 0x3e29, - 0x3e29, 0x3e29, 0x3e2a, 0x3e2a, 0x3e2a, 0x3e2a, 0x3e2b, 0x3e2b, - 0x3e2b, 0x3e2c, 0x3e2c, 0x3e2c, 0x3e2c, 0x3e2d, 0x3e2d, 0x3e2d, - 0x3e2d, 0x3e2e, 0x3e2e, 0x3e2e, 0x3e2f, 0x3e2f, 0x3e2f, 0x3e2f, - 0x3e30, 0x3e30, 0x3e30, 0x3e30, 0x3e31, 0x3e31, 0x3e31, 0x3e32, - 0x3e32, 0x3e32, 0x3e32, 0x3e33, 0x3e33, 0x3e33, 0x3e33, 0x3e34, - 0x3e34, 0x3e34, 0x3e35, 0x3e35, 0x3e35, 0x3e35, 0x3e36, 0x3e36, - 0x3e36, 0x3e36, 0x3e37, 0x3e37, 0x3e37, 0x3e38, 0x3e38, 0x3e38, - 0x3e38, 0x3e39, 0x3e39, 0x3e39, 0x3e39, 0x3e3a, 0x3e3a, 0x3e3a, - 0x3e3a, 0x3e3b, 0x3e3b, 0x3e3b, 0x3e3c, 0x3e3c, 0x3e3c, 0x3e3c, - 0x3e3d, 0x3e3d, 0x3e3d, 0x3e3d, 0x3e3e, 0x3e3e, 0x3e3e, 0x3e3e, - 0x3e3f, 0x3e3f, 0x3e3f, 0x3e40, 0x3e40, 0x3e40, 0x3e40, 0x3e41, - 0x3e41, 0x3e41, 0x3e41, 0x3e42, 0x3e42, 0x3e42, 0x3e42, 0x3e43, - 0x3e43, 0x3e43, 0x3e43, 0x3e44, 0x3e44, 0x3e44, 0x3e44, 0x3e45, - 0x3e45, 0x3e45, 0x3e46, 0x3e46, 0x3e46, 0x3e46, 0x3e47, 0x3e47, - 0x3e47, 0x3e47, 0x3e48, 0x3e48, 0x3e48, 0x3e48, 0x3e49, 0x3e49, - 0x3e49, 0x3e49, 0x3e4a, 0x3e4a, 0x3e4a, 0x3e4a, 0x3e4b, 0x3e4b, - 0x3e4b, 0x3e4b, 0x3e4c, 0x3e4c, 0x3e4c, 0x3e4d, 0x3e4d, 0x3e4d, - 0x3e4d, 0x3e4e, 0x3e4e, 0x3e4e, 0x3e4e, 0x3e4f, 0x3e4f, 0x3e4f, - 0x3e4f, 0x3e50, 0x3e50, 0x3e50, 0x3e50, 0x3e51, 0x3e51, 0x3e51, - 0x3e51, 0x3e52, 0x3e52, 0x3e52, 0x3e52, 0x3e53, 0x3e53, 0x3e53, - 0x3e53, 0x3e54, 0x3e54, 0x3e54, 0x3e54, 0x3e55, 0x3e55, 0x3e55, - 0x3e55, 0x3e56, 0x3e56, 0x3e56, 0x3e56, 0x3e57, 0x3e57, 0x3e57, - 0x3e57, 0x3e58, 0x3e58, 0x3e58, 0x3e58, 0x3e59, 0x3e59, 0x3e59, - 0x3e59, 0x3e5a, 0x3e5a, 0x3e5a, 0x3e5a, 0x3e5b, 0x3e5b, 0x3e5b, - 0x3e5b, 0x3e5c, 0x3e5c, 0x3e5c, 0x3e5c, 0x3e5d, 0x3e5d, 0x3e5d, - 0x3e5d, 0x3e5e, 0x3e5e, 0x3e5e, 0x3e5e, 0x3e5f, 0x3e5f, 0x3e5f, - 0x3e5f, 0x3e60, 0x3e60, 0x3e60, 0x3e60, 0x3e61, 0x3e61, 0x3e61, - 0x3e61, 0x3e62, 0x3e62, 0x3e62, 0x3e62, 0x3e63, 0x3e63, 0x3e63, - 0x3e63, 0x3e64, 0x3e64, 0x3e64, 0x3e64, 0x3e65, 0x3e65, 0x3e65, - 0x3e65, 0x3e66, 0x3e66, 0x3e66, 0x3e66, 0x3e66, 0x3e67, 0x3e67, - 0x3e67, 0x3e67, 0x3e68, 0x3e68, 0x3e68, 0x3e68, 0x3e69, 0x3e69, - 0x3e69, 0x3e69, 0x3e6a, 0x3e6a, 0x3e6a, 0x3e6a, 0x3e6b, 0x3e6b, - 0x3e6b, 0x3e6b, 0x3e6c, 0x3e6c, 0x3e6c, 0x3e6c, 0x3e6d, 0x3e6d, - 0x3e6d, 0x3e6d, 0x3e6d, 0x3e6e, 0x3e6e, 0x3e6e, 0x3e6e, 0x3e6f, - 0x3e6f, 0x3e6f, 0x3e6f, 0x3e70, 0x3e70, 0x3e70, 0x3e70, 0x3e71, - 0x3e71, 0x3e71, 0x3e71, 0x3e72, 0x3e72, 0x3e72, 0x3e72, 0x3e72, - 0x3e73, 0x3e73, 0x3e73, 0x3e73, 0x3e74, 0x3e74, 0x3e74, 0x3e74, - 0x3e75, 0x3e75, 0x3e75, 0x3e75, 0x3e76, 0x3e76, 0x3e76, 0x3e76, - 0x3e76, 0x3e77, 0x3e77, 0x3e77, 0x3e77, 0x3e78, 0x3e78, 0x3e78, - 0x3e78, 0x3e79, 0x3e79, 0x3e79, 0x3e79, 0x3e7a, 0x3e7a, 0x3e7a, - 0x3e7a, 0x3e7a, 0x3e7b, 0x3e7b, 0x3e7b, 0x3e7b, 0x3e7c, 0x3e7c, - 0x3e7c, 0x3e7c, 0x3e7d, 0x3e7d, 0x3e7d, 0x3e7d, 0x3e7d, 0x3e7e, - 0x3e7e, 0x3e7e, 0x3e7e, 0x3e7f, 0x3e7f, 0x3e7f, 0x3e7f, 0x3e80, - 0x3e80, 0x3e80, 0x3e80, 0x3e80, 0x3e81, 0x3e81, 0x3e81, 0x3e81, - 0x3e82, 0x3e82, 0x3e82, 0x3e82, 0x3e83, 0x3e83, 0x3e83, 0x3e83, - 0x3e83, 0x3e84, 0x3e84, 0x3e84, 0x3e84, 0x3e85, 0x3e85, 0x3e85, - 0x3e85, 0x3e86, 0x3e86, 0x3e87, 0x3e87, 0x3e88, 0x3e88, 0x3e88, - 0x3e89, 0x3e89, 0x3e8a, 0x3e8a, 0x3e8b, 0x3e8b, 0x3e8c, 0x3e8c, - 0x3e8c, 0x3e8d, 0x3e8d, 0x3e8e, 0x3e8e, 0x3e8f, 0x3e8f, 0x3e90, - 0x3e90, 0x3e90, 0x3e91, 0x3e91, 0x3e92, 0x3e92, 0x3e93, 0x3e93, - 0x3e94, 0x3e94, 0x3e94, 0x3e95, 0x3e95, 0x3e96, 0x3e96, 0x3e97, - 0x3e97, 0x3e98, 0x3e98, 0x3e98, 0x3e99, 0x3e99, 0x3e9a, 0x3e9a, - 0x3e9b, 0x3e9b, 0x3e9b, 0x3e9c, 0x3e9c, 0x3e9d, 0x3e9d, 0x3e9e, - 0x3e9e, 0x3e9e, 0x3e9f, 0x3e9f, 0x3ea0, 0x3ea0, 0x3ea1, 0x3ea1, - 0x3ea1, 0x3ea2, 0x3ea2, 0x3ea3, 0x3ea3, 0x3ea4, 0x3ea4, 0x3ea4, - 0x3ea5, 0x3ea5, 0x3ea6, 0x3ea6, 0x3ea7, 0x3ea7, 0x3ea7, 0x3ea8, - 0x3ea8, 0x3ea9, 0x3ea9, 0x3eaa, 0x3eaa, 0x3eaa, 0x3eab, 0x3eab, - 0x3eac, 0x3eac, 0x3eac, 0x3ead, 0x3ead, 0x3eae, 0x3eae, 0x3eaf, - 0x3eaf, 0x3eaf, 0x3eb0, 0x3eb0, 0x3eb1, 0x3eb1, 0x3eb1, 0x3eb2, - 0x3eb2, 0x3eb3, 0x3eb3, 0x3eb4, 0x3eb4, 0x3eb4, 0x3eb5, 0x3eb5, - 0x3eb6, 0x3eb6, 0x3eb6, 0x3eb7, 0x3eb7, 0x3eb8, 0x3eb8, 0x3eb8, - 0x3eb9, 0x3eb9, 0x3eba, 0x3eba, 0x3eba, 0x3ebb, 0x3ebb, 0x3ebc, - 0x3ebc, 0x3ebc, 0x3ebd, 0x3ebd, 0x3ebe, 0x3ebe, 0x3ebe, 0x3ebf, - 0x3ebf, 0x3ec0, 0x3ec0, 0x3ec1, 0x3ec1, 0x3ec1, 0x3ec2, 0x3ec2, - 0x3ec2, 0x3ec3, 0x3ec3, 0x3ec4, 0x3ec4, 0x3ec4, 0x3ec5, 0x3ec5, - 0x3ec6, 0x3ec6, 0x3ec6, 0x3ec7, 0x3ec7, 0x3ec8, 0x3ec8, 0x3ec8, - 0x3ec9, 0x3ec9, 0x3eca, 0x3eca, 0x3eca, 0x3ecb, 0x3ecb, 0x3ecc, - 0x3ecc, 0x3ecc, 0x3ecd, 0x3ecd, 0x3ece, 0x3ece, 0x3ece, 0x3ecf, - 0x3ecf, 0x3ecf, 0x3ed0, 0x3ed0, 0x3ed1, 0x3ed1, 0x3ed1, 0x3ed2, - 0x3ed2, 0x3ed3, 0x3ed3, 0x3ed3, 0x3ed4, 0x3ed4, 0x3ed4, 0x3ed5, - 0x3ed5, 0x3ed6, 0x3ed6, 0x3ed6, 0x3ed7, 0x3ed7, 0x3ed8, 0x3ed8, - 0x3ed8, 0x3ed9, 0x3ed9, 0x3ed9, 0x3eda, 0x3eda, 0x3edb, 0x3edb, - 0x3edb, 0x3edc, 0x3edc, 0x3edc, 0x3edd, 0x3edd, 0x3ede, 0x3ede, - 0x3ede, 0x3edf, 0x3edf, 0x3edf, 0x3ee0, 0x3ee0, 0x3ee1, 0x3ee1, - 0x3ee1, 0x3ee2, 0x3ee2, 0x3ee2, 0x3ee3, 0x3ee3, 0x3ee4, 0x3ee4, - 0x3ee4, 0x3ee5, 0x3ee5, 0x3ee5, 0x3ee6, 0x3ee6, 0x3ee7, 0x3ee7, - 0x3ee7, 0x3ee8, 0x3ee8, 0x3ee8, 0x3ee9, 0x3ee9, 0x3ee9, 0x3eea, - 0x3eea, 0x3eeb, 0x3eeb, 0x3eeb, 0x3eec, 0x3eec, 0x3eec, 0x3eed, - 0x3eed, 0x3eed, 0x3eee, 0x3eee, 0x3eef, 0x3eef, 0x3eef, 0x3ef0, - 0x3ef0, 0x3ef0, 0x3ef1, 0x3ef1, 0x3ef1, 0x3ef2, 0x3ef2, 0x3ef3, - 0x3ef3, 0x3ef3, 0x3ef4, 0x3ef4, 0x3ef4, 0x3ef5, 0x3ef5, 0x3ef5, - 0x3ef6, 0x3ef6, 0x3ef6, 0x3ef7, 0x3ef7, 0x3ef8, 0x3ef8, 0x3ef8, - 0x3ef9, 0x3ef9, 0x3ef9, 0x3efa, 0x3efa, 0x3efa, 0x3efb, 0x3efb, - 0x3efb, 0x3efc, 0x3efc, 0x3efc, 0x3efd, 0x3efd, 0x3efe, 0x3efe, - 0x3efe, 0x3eff, 0x3eff, 0x3eff, 0x3f00, 0x3f00, 0x3f00, 0x3f01, - 0x3f01, 0x3f01, 0x3f02, 0x3f02, 0x3f02, 0x3f03, 0x3f03, 0x3f03, - 0x3f04, 0x3f04, 0x3f05, 0x3f05, 0x3f05, 0x3f06, 0x3f06, 0x3f06, - 0x3f07, 0x3f07, 0x3f07, 0x3f08, 0x3f08, 0x3f08, 0x3f09, 0x3f09, - 0x3f09, 0x3f0a, 0x3f0a, 0x3f0a, 0x3f0b, 0x3f0b, 0x3f0b, 0x3f0c, - 0x3f0c, 0x3f0c, 0x3f0d, 0x3f0d, 0x3f0d, 0x3f0e, 0x3f0e, 0x3f0e, - 0x3f0f, 0x3f0f, 0x3f0f, 0x3f10, 0x3f10, 0x3f10, 0x3f11, 0x3f11, - 0x3f11, 0x3f12, 0x3f12, 0x3f12, 0x3f13, 0x3f13, 0x3f13, 0x3f14, - 0x3f14, 0x3f14, 0x3f15, 0x3f15, 0x3f15, 0x3f16, 0x3f16, 0x3f16, - 0x3f17, 0x3f17, 0x3f17, 0x3f18, 0x3f18, 0x3f18, 0x3f19, 0x3f19, - 0x3f19, 0x3f1a, 0x3f1a, 0x3f1a, 0x3f1b, 0x3f1b, 0x3f1b, 0x3f1c, - 0x3f1c, 0x3f1c, 0x3f1d, 0x3f1d, 0x3f1d, 0x3f1e, 0x3f1e, 0x3f1e, - 0x3f1f, 0x3f1f, 0x3f1f, 0x3f20, 0x3f20, 0x3f20, 0x3f21, 0x3f21, - 0x3f21, 0x3f22, 0x3f22, 0x3f22, 0x3f23, 0x3f23, 0x3f23, 0x3f24, - 0x3f24, 0x3f24, 0x3f25, 0x3f25, 0x3f25, 0x3f26, 0x3f26, 0x3f26, - 0x3f27, 0x3f27, 0x3f27, 0x3f27, 0x3f28, 0x3f28, 0x3f28, 0x3f29, - 0x3f29, 0x3f29, 0x3f2a, 0x3f2a, 0x3f2a, 0x3f2b, 0x3f2b, 0x3f2b, - 0x3f2c, 0x3f2c, 0x3f2c, 0x3f2d, 0x3f2d, 0x3f2d, 0x3f2e, 0x3f2e, - 0x3f2e, 0x3f2e, 0x3f2f, 0x3f2f, 0x3f2f, 0x3f30, 0x3f30, 0x3f30, - 0x3f31, 0x3f31, 0x3f31, 0x3f32, 0x3f32, 0x3f32, 0x3f33, 0x3f33, - 0x3f33, 0x3f34, 0x3f34, 0x3f34, 0x3f34, 0x3f35, 0x3f35, 0x3f35, - 0x3f36, 0x3f36, 0x3f36, 0x3f37, 0x3f37, 0x3f37, 0x3f38, 0x3f38, - 0x3f38, 0x3f38, 0x3f39, 0x3f39, 0x3f39, 0x3f3a, 0x3f3a, 0x3f3a, - 0x3f3b, 0x3f3b, 0x3f3b, 0x3f3c, 0x3f3c, 0x3f3c, 0x3f3c, 0x3f3d, - 0x3f3d, 0x3f3d, 0x3f3e, 0x3f3e, 0x3f3e, 0x3f3f, 0x3f3f, 0x3f3f, - 0x3f40, 0x3f40, 0x3f40, 0x3f40, 0x3f41, 0x3f41, 0x3f41, 0x3f42, - 0x3f42, 0x3f42, 0x3f43, 0x3f43, 0x3f43, 0x3f43, 0x3f44, 0x3f44, - 0x3f44, 0x3f45, 0x3f45, 0x3f45, 0x3f46, 0x3f46, 0x3f46, 0x3f47, - 0x3f47, 0x3f47, 0x3f47, 0x3f48, 0x3f48, 0x3f48, 0x3f49, 0x3f49, - 0x3f49, 0x3f49, 0x3f4a, 0x3f4a, 0x3f4a, 0x3f4b, 0x3f4b, 0x3f4b, - 0x3f4c, 0x3f4c, 0x3f4c, 0x3f4c, 0x3f4d, 0x3f4d, 0x3f4d, 0x3f4e, - 0x3f4e, 0x3f4e, 0x3f4f, 0x3f4f, 0x3f4f, 0x3f4f, 0x3f50, 0x3f50, - 0x3f50, 0x3f51, 0x3f51, 0x3f51, 0x3f51, 0x3f52, 0x3f52, 0x3f52, - 0x3f53, 0x3f53, 0x3f53, 0x3f54, 0x3f54, 0x3f54, 0x3f54, 0x3f55, - 0x3f55, 0x3f55, 0x3f56, 0x3f56, 0x3f56, 0x3f56, 0x3f57, 0x3f57, - 0x3f57, 0x3f58, 0x3f58, 0x3f58, 0x3f58, 0x3f59, 0x3f59, 0x3f59, - 0x3f5a, 0x3f5a, 0x3f5a, 0x3f5a, 0x3f5b, 0x3f5b, 0x3f5b, 0x3f5c, - 0x3f5c, 0x3f5c, 0x3f5c, 0x3f5d, 0x3f5d, 0x3f5d, 0x3f5e, 0x3f5e, - 0x3f5e, 0x3f5e, 0x3f5f, 0x3f5f, 0x3f5f, 0x3f60, 0x3f60, 0x3f60, - 0x3f60, 0x3f61, 0x3f61, 0x3f61, 0x3f62, 0x3f62, 0x3f62, 0x3f62, - 0x3f63, 0x3f63, 0x3f63, 0x3f64, 0x3f64, 0x3f64, 0x3f64, 0x3f65, - 0x3f65, 0x3f65, 0x3f66, 0x3f66, 0x3f66, 0x3f66, 0x3f67, 0x3f67, - 0x3f67, 0x3f68, 0x3f68, 0x3f68, 0x3f68, 0x3f69, 0x3f69, 0x3f69, - 0x3f69, 0x3f6a, 0x3f6a, 0x3f6a, 0x3f6b, 0x3f6b, 0x3f6b, 0x3f6b, - 0x3f6c, 0x3f6c, 0x3f6c, 0x3f6d, 0x3f6d, 0x3f6d, 0x3f6d, 0x3f6e, - 0x3f6e, 0x3f6e, 0x3f6e, 0x3f6f, 0x3f6f, 0x3f6f, 0x3f70, 0x3f70, - 0x3f70, 0x3f70, 0x3f71, 0x3f71, 0x3f71, 0x3f71, 0x3f72, 0x3f72, - 0x3f72, 0x3f73, 0x3f73, 0x3f73, 0x3f73, 0x3f74, 0x3f74, 0x3f74, - 0x3f74, 0x3f75, 0x3f75, 0x3f75, 0x3f76, 0x3f76, 0x3f76, 0x3f76, - 0x3f77, 0x3f77, 0x3f77, 0x3f77, 0x3f78, 0x3f78, 0x3f78, 0x3f79, - 0x3f79, 0x3f79, 0x3f79, 0x3f7a, 0x3f7a, 0x3f7a, 0x3f7a, 0x3f7b, - 0x3f7b, 0x3f7b, 0x3f7b, 0x3f7c, 0x3f7c, 0x3f7c, 0x3f7d, 0x3f7d, - 0x3f7d, 0x3f7d, 0x3f7e, 0x3f7e, 0x3f7e, 0x3f7e, 0x3f7f, 0x3f7f, - 0x3f7f, 0x3f7f, 0x3f80, 0x3f80, 0x3f80, 0x3f81, 0x3f81, 0x3f81, - 0x3f81, 0x3f82, 0x3f82, 0x3f82, 0x3f82, 0x3f83, 0x3f83, 0x3f83, - 0x3f83, 0x3f84, 0x3f84, 0x3f84, 0x3f85, 0x3f85, 0x3f85, 0x3f85, - 0x3f86, 0x3f86, 0x3f86, 0x3f86, 0x3f87, 0x3f87, 0x3f87, 0x3f87, - 0x3f88, 0x3f88, 0x3f88, 0x3f88, 0x3f89, 0x3f89, 0x3f89, 0x3f89, - 0x3f8a, 0x3f8a, 0x3f8a, 0x3f8b, 0x3f8b, 0x3f8b, 0x3f8b, 0x3f8c, - 0x3f8c, 0x3f8c, 0x3f8c, 0x3f8d, 0x3f8d, 0x3f8d, 0x3f8d, 0x3f8e, - 0x3f8e, 0x3f8e, 0x3f8e, 0x3f8f, 0x3f8f, 0x3f8f, 0x3f8f, 0x3f90, - 0x3f90, 0x3f90, 0x3f90, 0x3f91, 0x3f91, 0x3f91, 0x3f91, 0x3f92, - 0x3f92, 0x3f92, 0x3f92, 0x3f93, 0x3f93, 0x3f93, 0x3f93, 0x3f94, - 0x3f94, 0x3f94, 0x3f95, 0x3f95, 0x3f95, 0x3f95, 0x3f96, 0x3f96, - 0x3f96, 0x3f96, 0x3f97, 0x3f97, 0x3f97, 0x3f97, 0x3f98, 0x3f98, - 0x3f98, 0x3f98, 0x3f99, 0x3f99, 0x3f99, 0x3f99, 0x3f9a, 0x3f9a, - 0x3f9a, 0x3f9a, 0x3f9b, 0x3f9b, 0x3f9b, 0x3f9b, 0x3f9c, 0x3f9c, - 0x3f9c, 0x3f9c, 0x3f9d, 0x3f9d, 0x3f9d, 0x3f9d, 0x3f9e, 0x3f9e, - 0x3f9e, 0x3f9e, 0x3f9f, 0x3f9f, 0x3f9f, 0x3f9f, 0x3fa0, 0x3fa0, - 0x3fa0, 0x3fa0, 0x3fa1, 0x3fa1, 0x3fa1, 0x3fa1, 0x3fa2, 0x3fa2, - 0x3fa2, 0x3fa2, 0x3fa3, 0x3fa3, 0x3fa3, 0x3fa3, 0x3fa3, 0x3fa4, - 0x3fa4, 0x3fa4, 0x3fa4, 0x3fa5, 0x3fa5, 0x3fa5, 0x3fa5, 0x3fa6, - 0x3fa6, 0x3fa6, 0x3fa6, 0x3fa7, 0x3fa7, 0x3fa7, 0x3fa7, 0x3fa8, - 0x3fa8, 0x3fa8, 0x3fa8, 0x3fa9, 0x3fa9, 0x3fa9, 0x3fa9, 0x3faa, - 0x3faa, 0x3faa, 0x3faa, 0x3fab, 0x3fab, 0x3fab, 0x3fab, 0x3fac, - 0x3fac, 0x3fac, 0x3fac, 0x3fad, 0x3fad, 0x3fad, 0x3fad, 0x3fad, - 0x3fae, 0x3fae, 0x3fae, 0x3fae, 0x3faf, 0x3faf, 0x3faf, 0x3faf, - 0x3fb0, 0x3fb0, 0x3fb0, 0x3fb0, 0x3fb1, 0x3fb1, 0x3fb1, 0x3fb1, - 0x3fb2, 0x3fb2, 0x3fb2, 0x3fb2, 0x3fb2, 0x3fb3, 0x3fb3, 0x3fb3, - 0x3fb3, 0x3fb4, 0x3fb4, 0x3fb4, 0x3fb4, 0x3fb5, 0x3fb5, 0x3fb5, - 0x3fb5, 0x3fb6, 0x3fb6, 0x3fb6, 0x3fb6, 0x3fb7, 0x3fb7, 0x3fb7, - 0x3fb7, 0x3fb7, 0x3fb8, 0x3fb8, 0x3fb8, 0x3fb8, 0x3fb9, 0x3fb9, - 0x3fb9, 0x3fb9, 0x3fba, 0x3fba, 0x3fba, 0x3fba, 0x3fbb, 0x3fbb, - 0x3fbb, 0x3fbb, 0x3fbb, 0x3fbc, 0x3fbc, 0x3fbc, 0x3fbc, 0x3fbd, - 0x3fbd, 0x3fbd, 0x3fbd, 0x3fbe, 0x3fbe, 0x3fbe, 0x3fbe, 0x3fbe, - 0x3fbf, 0x3fbf, 0x3fbf, 0x3fbf, 0x3fc0, 0x3fc0, 0x3fc0, 0x3fc0, - 0x3fc1, 0x3fc1, 0x3fc1, 0x3fc1, 0x3fc1, 0x3fc2, 0x3fc2, 0x3fc2, - 0x3fc2, 0x3fc3, 0x3fc3, 0x3fc3, 0x3fc3, 0x3fc4, 0x3fc4, 0x3fc4, - 0x3fc4, 0x3fc4, 0x3fc5, 0x3fc5, 0x3fc5, 0x3fc5, 0x3fc6, 0x3fc6, - 0x3fc6, 0x3fc6, 0x3fc7, 0x3fc7, 0x3fc7, 0x3fc7, 0x3fc7, 0x3fc8, - 0x3fc8, 0x3fc8, 0x3fc9, 0x3fc9, 0x3fca, 0x3fca, 0x3fcb, 0x3fcb, - 0x3fcc, 0x3fcc, 0x3fcc, 0x3fcd, 0x3fcd, 0x3fce, 0x3fce, 0x3fcf, - 0x3fcf, 0x3fd0, 0x3fd0, 0x3fd0, 0x3fd1, 0x3fd1, 0x3fd2, 0x3fd2, - 0x3fd3, 0x3fd3, 0x3fd4, 0x3fd4, 0x3fd4, 0x3fd5, 0x3fd5, 0x3fd6, - 0x3fd6, 0x3fd7, 0x3fd7, 0x3fd8, 0x3fd8, 0x3fd8, 0x3fd9, 0x3fd9, - 0x3fda, 0x3fda, 0x3fdb, 0x3fdb, 0x3fdb, 0x3fdc, 0x3fdc, 0x3fdd, - 0x3fdd, 0x3fde, 0x3fde, 0x3fdf, 0x3fdf, 0x3fdf, 0x3fe0, 0x3fe0, - 0x3fe1, 0x3fe1, 0x3fe2, 0x3fe2, 0x3fe2, 0x3fe3, 0x3fe3, 0x3fe4, - 0x3fe4, 0x3fe5, 0x3fe5, 0x3fe5, 0x3fe6, 0x3fe6, 0x3fe7, 0x3fe7, - 0x3fe8, 0x3fe8, 0x3fe8, 0x3fe9, 0x3fe9, 0x3fea, 0x3fea, 0x3fea, - 0x3feb, 0x3feb, 0x3fec, 0x3fec, 0x3fed, 0x3fed, 0x3fed, 0x3fee, - 0x3fee, 0x3fef, 0x3fef, 0x3ff0, 0x3ff0, 0x3ff0, 0x3ff1, 0x3ff1, - 0x3ff2, 0x3ff2, 0x3ff2, 0x3ff3, 0x3ff3, 0x3ff4, 0x3ff4, 0x3ff4, - 0x3ff5, 0x3ff5, 0x3ff6, 0x3ff6, 0x3ff7, 0x3ff7, 0x3ff7, 0x3ff8, - 0x3ff8, 0x3ff9, 0x3ff9, 0x3ff9, 0x3ffa, 0x3ffa, 0x3ffb, 0x3ffb, - 0x3ffb, 0x3ffc, 0x3ffc, 0x3ffd, 0x3ffd, 0x3ffd, 0x3ffe, 0x3ffe, - 0x3fff, 0x3fff, 0x4000, 0x4000, 0x4000, 0x4000, 0x4001, 0x4001, - 0x4001, 0x4001, 0x4001, 0x4002, 0x4002, 0x4002, 0x4002, 0x4002, - 0x4003, 0x4003, 0x4003, 0x4003, 0x4003, 0x4004, 0x4004, 0x4004, - 0x4004, 0x4004, 0x4005, 0x4005, 0x4005, 0x4005, 0x4005, 0x4006, - 0x4006, 0x4006, 0x4006, 0x4006, 0x4007, 0x4007, 0x4007, 0x4007, - 0x4007, 0x4007, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4009, - 0x4009, 0x4009, 0x4009, 0x4009, 0x400a, 0x400a, 0x400a, 0x400a, - 0x400a, 0x400b, 0x400b, 0x400b, 0x400b, 0x400b, 0x400c, 0x400c, - 0x400c, 0x400c, 0x400c, 0x400d, 0x400d, 0x400d, 0x400d, 0x400d, - 0x400d, 0x400e, 0x400e, 0x400e, 0x400e, 0x400e, 0x400f, 0x400f, - 0x400f, 0x400f, 0x400f, 0x4010, 0x4010, 0x4010, 0x4010, 0x4010, - 0x4010, 0x4011, 0x4011, 0x4011, 0x4011, 0x4011, 0x4012, 0x4012, - 0x4012, 0x4012, 0x4012, 0x4013, 0x4013, 0x4013, 0x4013, 0x4013, - 0x4013, 0x4014, 0x4014, 0x4014, 0x4014, 0x4014, 0x4015, 0x4015, - 0x4015, 0x4015, 0x4015, 0x4015, 0x4016, 0x4016, 0x4016, 0x4016, - 0x4016, 0x4017, 0x4017, 0x4017, 0x4017, 0x4017, 0x4018, 0x4018, - 0x4018, 0x4018, 0x4018, 0x4018, 0x4019, 0x4019, 0x4019, 0x4019, - 0x4019, 0x401a, 0x401a, 0x401a, 0x401a, 0x401a, 0x401a, 0x401b, - 0x401b, 0x401b, 0x401b, 0x401b, 0x401b, 0x401c, 0x401c, 0x401c, - 0x401c, 0x401c, 0x401d, 0x401d, 0x401d, 0x401d, 0x401d, 0x401d, - 0x401e, 0x401e, 0x401e, 0x401e, 0x401e, 0x401f, 0x401f, 0x401f, - 0x401f, 0x401f, 0x401f, 0x4020, 0x4020, 0x4020, 0x4020, 0x4020, - 0x4020, 0x4021, 0x4021, 0x4021, 0x4021, 0x4021, 0x4021, 0x4022, - 0x4022, 0x4022, 0x4022, 0x4022, 0x4023, 0x4023, 0x4023, 0x4023, - 0x4023, 0x4023, 0x4024, 0x4024, 0x4024, 0x4024, 0x4024, 0x4024, - 0x4025, 0x4025, 0x4025, 0x4025, 0x4025, 0x4025, 0x4026, 0x4026, - 0x4026, 0x4026, 0x4026, 0x4026, 0x4027, 0x4027, 0x4027, 0x4027, - 0x4027, 0x4028, 0x4028, 0x4028, 0x4028, 0x4028, 0x4028, 0x4029, - 0x4029, 0x4029, 0x4029, 0x4029, 0x4029, 0x402a, 0x402a, 0x402a, - 0x402a, 0x402a, 0x402a, 0x402b, 0x402b, 0x402b, 0x402b, 0x402b, - 0x402b, 0x402c, 0x402c, 0x402c, 0x402c, 0x402c, 0x402c, 0x402d, - 0x402d, 0x402d, 0x402d, 0x402d, 0x402d, 0x402e, 0x402e, 0x402e, - 0x402e, 0x402e, 0x402e, 0x402f, 0x402f, 0x402f, 0x402f, 0x402f, - 0x402f, 0x4030, 0x4030, 0x4030, 0x4030, 0x4030, 0x4030, 0x4031, - 0x4031, 0x4031, 0x4031, 0x4031, 0x4031, 0x4032, 0x4032, 0x4032, - 0x4032, 0x4032, 0x4032, 0x4032, 0x4033, 0x4033, 0x4033, 0x4033, - 0x4033, 0x4033, 0x4034, 0x4034, 0x4034, 0x4034, 0x4034, 0x4034, - 0x4035, 0x4035, 0x4035, 0x4035, 0x4035, 0x4035, 0x4036, 0x4036, - 0x4036, 0x4036, 0x4036, 0x4036, 0x4036, 0x4037, 0x4037, 0x4037, - 0x4037, 0x4037, 0x4037, 0x4038, 0x4038, 0x4038, 0x4038, 0x4038, - 0x4038, 0x4039, 0x4039, 0x4039, 0x4039, 0x4039, 0x4039, 0x403a, - 0x403a, 0x403a, 0x403a, 0x403a, 0x403a, 0x403a, 0x403b, 0x403b, - 0x403b, 0x403b, 0x403b, 0x403b, 0x403c, 0x403c, 0x403c, 0x403c, - 0x403c, 0x403c, 0x403c, 0x403d, 0x403d, 0x403d, 0x403d, 0x403d, - 0x403d, 0x403e, 0x403e, 0x403e, 0x403e, 0x403e, 0x403e, 0x403e, - 0x403f, 0x403f, 0x403f, 0x403f, 0x403f, 0x403f, 0x4040, 0x4040, - 0x4040, 0x4040, 0x4040, 0x4040, 0x4040, 0x4041, 0x4041, 0x4041, - 0x4041, 0x4041, 0x4041, 0x4042, 0x4042, 0x4042, 0x4042, 0x4042, - 0x4042, 0x4042, 0x4043, 0x4043, 0x4043, 0x4043, 0x4043, 0x4043, - 0x4044, 0x4044, 0x4044, 0x4044, 0x4044, 0x4044, 0x4044, 0x4045, - 0x4045, 0x4045, 0x4045, 0x4045, 0x4045, 0x4045, 0x4046, 0x4046, - 0x4046, 0x4046, 0x4046, 0x4046, 0x4047, 0x4047, 0x4047, 0x4047, - 0x4047, 0x4047, 0x4047, 0x4048, 0x4048, 0x4048, 0x4048, 0x4048, - 0x4048, 0x4048, 0x4049, 0x4049, 0x4049, 0x4049, 0x4049, 0x4049, - 0x4049, 0x404a, 0x404a, 0x404a, 0x404a, 0x404a, 0x404a, 0x404a, - 0x404b, 0x404b, 0x404b, 0x404b, 0x404b, 0x404b, 0x404c, 0x404c, - 0x404c, 0x404c, 0x404c, 0x404c, 0x404c, 0x404d, 0x404d, 0x404d, - 0x404d, 0x404d, 0x404d, 0x404d, 0x404e, 0x404e, 0x404e, 0x404e, - 0x404e, 0x404e, 0x404e, 0x404f, 0x404f, 0x404f, 0x404f, 0x404f, - 0x404f, 0x404f, 0x4050, 0x4050, 0x4050, 0x4050, 0x4050, 0x4050, - 0x4050, 0x4051, 0x4051, 0x4051, 0x4051, 0x4051, 0x4051, 0x4051, - 0x4052, 0x4052, 0x4052, 0x4052, 0x4052, 0x4052, 0x4052, 0x4053, - 0x4053, 0x4053, 0x4053, 0x4053, 0x4053, 0x4053, 0x4054, 0x4054, - 0x4054, 0x4054, 0x4054, 0x4054, 0x4054, 0x4055, 0x4055, 0x4055, - 0x4055, 0x4055, 0x4055, 0x4055, 0x4055, 0x4056, 0x4056, 0x4056, - 0x4056, 0x4056, 0x4056, 0x4056, 0x4057, 0x4057, 0x4057, 0x4057, - 0x4057, 0x4057, 0x4057, 0x4058, 0x4058, 0x4058, 0x4058, 0x4058, - 0x4058, 0x4058, 0x4059, 0x4059, 0x4059, 0x4059, 0x4059, 0x4059, - 0x4059, 0x405a, 0x405a, 0x405a, 0x405a, 0x405a, 0x405a, 0x405a, - 0x405a, 0x405b, 0x405b, 0x405b, 0x405b, 0x405b, 0x405b, 0x405b, - 0x405c, 0x405c, 0x405c, 0x405c, 0x405c, 0x405c, 0x405c, 0x405d, - 0x405d, 0x405d, 0x405d, 0x405d, 0x405d, 0x405d, 0x405d, 0x405e, - 0x405e, 0x405e, 0x405e, 0x405e, 0x405e, 0x405e, 0x405f, 0x405f, - 0x405f, 0x405f, 0x405f, 0x405f, 0x405f, 0x405f, 0x4060, 0x4060, - 0x4060, 0x4060, 0x4060, 0x4060, 0x4060, 0x4061, 0x4061, 0x4061, - 0x4061, 0x4061, 0x4061, 0x4061, 0x4061, 0x4062, 0x4062, 0x4062, - 0x4062, 0x4062, 0x4062, 0x4062, 0x4063, 0x4063, 0x4063, 0x4063, - 0x4063, 0x4063, 0x4063, 0x4063, 0x4064, 0x4064, 0x4064, 0x4064, - 0x4064, 0x4064, 0x4064, 0x4064, 0x4065, 0x4065, 0x4065, 0x4065, - 0x4065, 0x4065, 0x4065, 0x4066, 0x4066, 0x4066, 0x4066, 0x4066, - 0x4066, 0x4066, 0x4066, 0x4067, 0x4067, 0x4067, 0x4067, 0x4067, - 0x4067, 0x4067, 0x4067, 0x4068, 0x4068, 0x4068, 0x4068, 0x4068, - 0x4068, 0x4068, 0x4069, 0x4069, 0x4069, 0x4069, 0x4069, 0x4069, - 0x4069, 0x4069, 0x406a, 0x406a, 0x406a, 0x406a, 0x406a, 0x406a, - 0x406a, 0x406a, 0x406b, 0x406b, 0x406b, 0x406b, 0x406b, 0x406b, - 0x406b, 0x406b, 0x406c, 0x406c, 0x406c, 0x406c, 0x406c, 0x406c, - 0x406c, 0x406c, 0x406d, 0x406d, 0x406d, 0x406d, 0x406d, 0x406d, - 0x406d, 0x406d, 0x406e, 0x406e, 0x406e, 0x406e, 0x406e, 0x406e, - 0x406e, 0x406e, 0x406f, 0x406f, 0x406f, 0x406f, 0x406f, 0x406f, - 0x406f, 0x406f, 0x4070, 0x4070, 0x4070, 0x4070, 0x4070, 0x4070, - 0x4070, 0x4070, 0x4071, 0x4071, 0x4071, 0x4071, 0x4071, 0x4071, - 0x4071, 0x4071, 0x4072, 0x4072, 0x4072, 0x4072, 0x4072, 0x4072, - 0x4072, 0x4072, 0x4073, 0x4073, 0x4073, 0x4073, 0x4073, 0x4073, - 0x4073, 0x4073, 0x4074, 0x4074, 0x4074, 0x4074, 0x4074, 0x4074, - 0x4074, 0x4074, 0x4075, 0x4075, 0x4075, 0x4075, 0x4075, 0x4075, - 0x4075, 0x4075, 0x4076, 0x4076, 0x4076, 0x4076, 0x4076, 0x4076, - 0x4076, 0x4076, 0x4076, 0x4077, 0x4077, 0x4077, 0x4077, 0x4077, - 0x4077, 0x4077, 0x4077, 0x4078, 0x4078, 0x4078, 0x4078, 0x4078, - 0x4078, 0x4078, 0x4078, 0x4079, 0x4079, 0x4079, 0x4079, 0x4079, - 0x4079, 0x4079, 0x4079, 0x4079, 0x407a, 0x407a, 0x407a, 0x407a, - 0x407a, 0x407a, 0x407a, 0x407a, 0x407b, 0x407b, 0x407b, 0x407b, - 0x407b, 0x407b, 0x407b, 0x407b, 0x407c, 0x407c, 0x407c, 0x407c, - 0x407c, 0x407c, 0x407c, 0x407c, 0x407c, 0x407d, 0x407d, 0x407d, - 0x407d, 0x407d, 0x407d, 0x407d, 0x407d, 0x407e, 0x407e, 0x407e, - 0x407e, 0x407e, 0x407e, 0x407e, 0x407e, 0x407e, 0x407f, 0x407f, - 0x407f, 0x407f, 0x407f, 0x407f, 0x407f, 0x407f, 0x4080, 0x4080, - 0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4081, - 0x4081, 0x4081, 0x4081, 0x4081, 0x4081, 0x4081, 0x4081, 0x4081, - 0x4082, 0x4082, 0x4082, 0x4082, 0x4082, 0x4082, 0x4082, 0x4082, - 0x4083, 0x4083, 0x4083, 0x4083, 0x4083, 0x4083, 0x4083, 0x4083, - 0x4083, 0x4084, 0x4084, 0x4084, 0x4084, 0x4084, 0x4084, 0x4084, - 0x4084, 0x4084, 0x4085, 0x4085, 0x4085, 0x4085, 0x4085, 0x4085, - 0x4085, 0x4085, 0x4086, 0x4086, 0x4086, 0x4086, 0x4087, 0x4087, - 0x4087, 0x4087, 0x4088, 0x4088, 0x4088, 0x4088, 0x4088, 0x4089, - 0x4089, 0x4089, 0x4089, 0x408a, 0x408a, 0x408a, 0x408a, 0x408a, - 0x408b, 0x408b, 0x408b, 0x408b, 0x408c, 0x408c, 0x408c, 0x408c, - 0x408c, 0x408d, 0x408d, 0x408d, 0x408d, 0x408e, 0x408e, 0x408e, - 0x408e, 0x408e, 0x408f, 0x408f, 0x408f, 0x408f, 0x408f, 0x4090, - 0x4090, 0x4090, 0x4090, 0x4091, 0x4091, 0x4091, 0x4091, 0x4091, - 0x4092, 0x4092, 0x4092, 0x4092, 0x4093, 0x4093, 0x4093, 0x4093, - 0x4093, 0x4094, 0x4094, 0x4094, 0x4094, 0x4094, 0x4095, 0x4095, - 0x4095, 0x4095, 0x4095, 0x4096, 0x4096, 0x4096, 0x4096, 0x4097, - 0x4097, 0x4097, 0x4097, 0x4097, 0x4098, 0x4098, 0x4098, 0x4098, - 0x4098, 0x4099, 0x4099, 0x4099, 0x4099, 0x4099, 0x409a, 0x409a, - 0x409a, 0x409a, 0x409b, 0x409b, 0x409b, 0x409b, 0x409b, 0x409c, - 0x409c, 0x409c, 0x409c, 0x409c, 0x409d, 0x409d, 0x409d, 0x409d, - 0x409d, 0x409e, 0x409e, 0x409e, 0x409e, 0x409e, 0x409f, 0x409f, - 0x409f, 0x409f, 0x409f, 0x40a0, 0x40a0, 0x40a0, 0x40a0, 0x40a0, - 0x40a1, 0x40a1, 0x40a1, 0x40a1, 0x40a1, 0x40a2, 0x40a2, 0x40a2, - 0x40a2, 0x40a2, 0x40a3, 0x40a3, 0x40a3, 0x40a3, 0x40a3, 0x40a4, - 0x40a4, 0x40a4, 0x40a4, 0x40a4, 0x40a5, 0x40a5, 0x40a5, 0x40a5, - 0x40a5, 0x40a6, 0x40a6, 0x40a6, 0x40a6, 0x40a6, 0x40a7, 0x40a7, - 0x40a7, 0x40a7, 0x40a7, 0x40a8, 0x40a8, 0x40a8, 0x40a8, 0x40a8, - 0x40a9, 0x40a9, 0x40a9, 0x40a9, 0x40a9, 0x40aa, 0x40aa, 0x40aa, - 0x40aa, 0x40aa, 0x40ab, 0x40ab, 0x40ab, 0x40ab, 0x40ab, 0x40ac, - 0x40ac, 0x40ac, 0x40ac, 0x40ac, 0x40ac, 0x40ad, 0x40ad, 0x40ad, - 0x40ad, 0x40ad, 0x40ae, 0x40ae, 0x40ae, 0x40ae, 0x40ae, 0x40af, - 0x40af, 0x40af, 0x40af, 0x40af, 0x40b0, 0x40b0, 0x40b0, 0x40b0, - 0x40b0, 0x40b0, 0x40b1, 0x40b1, 0x40b1, 0x40b1, 0x40b1, 0x40b2, - 0x40b2, 0x40b2, 0x40b2, 0x40b2, 0x40b3, 0x40b3, 0x40b3, 0x40b3, - 0x40b3, 0x40b3, 0x40b4, 0x40b4, 0x40b4, 0x40b4, 0x40b4, 0x40b5, - 0x40b5, 0x40b5, 0x40b5, 0x40b5, 0x40b6, 0x40b6, 0x40b6, 0x40b6, - 0x40b6, 0x40b6, 0x40b7, 0x40b7, 0x40b7, 0x40b7, 0x40b7, 0x40b8, - 0x40b8, 0x40b8, 0x40b8, 0x40b8, 0x40b8, 0x40b9, 0x40b9, 0x40b9, - 0x40b9, 0x40b9, 0x40ba, 0x40ba, 0x40ba, 0x40ba, 0x40ba, 0x40ba, - 0x40bb, 0x40bb, 0x40bb, 0x40bb, 0x40bb, 0x40bc, 0x40bc, 0x40bc, - 0x40bc, 0x40bc, 0x40bc, 0x40bd, 0x40bd, 0x40bd, 0x40bd, 0x40bd, - 0x40be, 0x40be, 0x40be, 0x40be, 0x40be, 0x40be, 0x40bf, 0x40bf, - 0x40bf, 0x40bf, 0x40bf, 0x40bf, 0x40c0, 0x40c0, 0x40c0, 0x40c0, - 0x40c0, 0x40c1, 0x40c1, 0x40c1, 0x40c1, 0x40c1, 0x40c1, 0x40c2, - 0x40c2, 0x40c2, 0x40c2, 0x40c2, 0x40c2, 0x40c3, 0x40c3, 0x40c3, - 0x40c3, 0x40c3, 0x40c4, 0x40c4, 0x40c4, 0x40c4, 0x40c4, 0x40c4, - 0x40c5, 0x40c5, 0x40c5, 0x40c5, 0x40c5, 0x40c5, 0x40c6, 0x40c6, - 0x40c6, 0x40c6, 0x40c6, 0x40c6, 0x40c7, 0x40c7, 0x40c7, 0x40c7, - 0x40c7, 0x40c7, 0x40c8, 0x40c8, 0x40c8, 0x40c8, 0x40c8, 0x40c8, - 0x40c9, 0x40c9, 0x40c9, 0x40c9, 0x40c9, 0x40ca, 0x40ca, 0x40ca, - 0x40ca, 0x40ca, 0x40ca, 0x40cb, 0x40cb, 0x40cb, 0x40cb, 0x40cb, - 0x40cb, 0x40cc, 0x40cc, 0x40cc, 0x40cc, 0x40cc, 0x40cc, 0x40cd, - 0x40cd, 0x40cd, 0x40cd, 0x40cd, 0x40cd, 0x40ce, 0x40ce, 0x40ce, - 0x40ce, 0x40ce, 0x40ce, 0x40cf, 0x40cf, 0x40cf, 0x40cf, 0x40cf, - 0x40cf, 0x40d0, 0x40d0, 0x40d0, 0x40d0, 0x40d0, 0x40d0, 0x40d1, - 0x40d1, 0x40d1, 0x40d1, 0x40d1, 0x40d1, 0x40d2, 0x40d2, 0x40d2, - 0x40d2, 0x40d2, 0x40d2, 0x40d2, 0x40d3, 0x40d3, 0x40d3, 0x40d3, - 0x40d3, 0x40d3, 0x40d4, 0x40d4, 0x40d4, 0x40d4, 0x40d4, 0x40d4, - 0x40d5, 0x40d5, 0x40d5, 0x40d5, 0x40d5, 0x40d5, 0x40d6, 0x40d6, - 0x40d6, 0x40d6, 0x40d6, 0x40d6, 0x40d7, 0x40d7, 0x40d7, 0x40d7, - 0x40d7, 0x40d7, 0x40d7, 0x40d8, 0x40d8, 0x40d8, 0x40d8, 0x40d8, - 0x40d8, 0x40d9, 0x40d9, 0x40d9, 0x40d9, 0x40d9, 0x40d9, 0x40da, - 0x40da, 0x40da, 0x40da, 0x40da, 0x40da, 0x40db, 0x40db, 0x40db, - 0x40db, 0x40db, 0x40db, 0x40db, 0x40dc, 0x40dc, 0x40dc, 0x40dc, - 0x40dc, 0x40dc, 0x40dd, 0x40dd, 0x40dd, 0x40dd, 0x40dd, 0x40dd, - 0x40dd, 0x40de, 0x40de, 0x40de, 0x40de, 0x40de, 0x40de, 0x40df, - 0x40df, 0x40df, 0x40df, 0x40df, 0x40df, 0x40df, 0x40e0, 0x40e0, - 0x40e0, 0x40e0, 0x40e0, 0x40e0, 0x40e1, 0x40e1, 0x40e1, 0x40e1, - 0x40e1, 0x40e1, 0x40e1, 0x40e2, 0x40e2, 0x40e2, 0x40e2, 0x40e2, - 0x40e2, 0x40e3, 0x40e3, 0x40e3, 0x40e3, 0x40e3, 0x40e3, 0x40e3, - 0x40e4, 0x40e4, 0x40e4, 0x40e4, 0x40e4, 0x40e4, 0x40e5, 0x40e5, - 0x40e5, 0x40e5, 0x40e5, 0x40e5, 0x40e5, 0x40e6, 0x40e6, 0x40e6, - 0x40e6, 0x40e6, 0x40e6, 0x40e6, 0x40e7, 0x40e7, 0x40e7, 0x40e7, - 0x40e7, 0x40e7, 0x40e8, 0x40e8, 0x40e8, 0x40e8, 0x40e8, 0x40e8, - 0x40e8, 0x40e9, 0x40e9, 0x40e9, 0x40e9, 0x40e9, 0x40e9, 0x40e9, - 0x40ea, 0x40ea, 0x40ea, 0x40ea, 0x40ea, 0x40ea, 0x40ea, 0x40eb, - 0x40eb, 0x40eb, 0x40eb, 0x40eb, 0x40eb, 0x40ec, 0x40ec, 0x40ec, - 0x40ec, 0x40ec, 0x40ec, 0x40ec, 0x40ed, 0x40ed, 0x40ed, 0x40ed, - 0x40ed, 0x40ed, 0x40ed, 0x40ee, 0x40ee, 0x40ee, 0x40ee, 0x40ee, - 0x40ee, 0x40ee, 0x40ef, 0x40ef, 0x40ef, 0x40ef, 0x40ef, 0x40ef, - 0x40ef, 0x40f0, 0x40f0, 0x40f0, 0x40f0, 0x40f0, 0x40f0, 0x40f0, - 0x40f1, 0x40f1, 0x40f1, 0x40f1, 0x40f1, 0x40f1, 0x40f1, 0x40f2, - 0x40f2, 0x40f2, 0x40f2, 0x40f2, 0x40f2, 0x40f2, 0x40f3, 0x40f3, - 0x40f3, 0x40f3, 0x40f3, 0x40f3, 0x40f3, 0x40f4, 0x40f4, 0x40f4, - 0x40f4, 0x40f4, 0x40f4, 0x40f4, 0x40f5, 0x40f5, 0x40f5, 0x40f5, - 0x40f5, 0x40f5, 0x40f5, 0x40f6, 0x40f6, 0x40f6, 0x40f6, 0x40f6, - 0x40f6, 0x40f6, 0x40f7, 0x40f7, 0x40f7, 0x40f7, 0x40f7, 0x40f7, - 0x40f7, 0x40f8, 0x40f8, 0x40f8, 0x40f8, 0x40f8, 0x40f8, 0x40f8, - 0x40f8, 0x40f9, 0x40f9, 0x40f9, 0x40f9, 0x40f9, 0x40f9, 0x40f9, - 0x40fa, 0x40fa, 0x40fa, 0x40fa, 0x40fa, 0x40fa, 0x40fa, 0x40fb, - 0x40fb, 0x40fb, 0x40fb, 0x40fb, 0x40fb, 0x40fb, 0x40fc, 0x40fc, - 0x40fc, 0x40fc, 0x40fc, 0x40fc, 0x40fc, 0x40fc, 0x40fd, 0x40fd, - 0x40fd, 0x40fd, 0x40fd, 0x40fd, 0x40fd, 0x40fe, 0x40fe, 0x40fe, - 0x40fe, 0x40fe, 0x40fe, 0x40fe, 0x40fe, 0x40ff, 0x40ff, 0x40ff, - 0x40ff, 0x40ff, 0x40ff, 0x40ff, 0x4100, 0x4100, 0x4100, 0x4100, - 0x4100, 0x4100, 0x4100, 0x4101, 0x4101, 0x4101, 0x4101, 0x4101, - 0x4101, 0x4101, 0x4101, 0x4102, 0x4102, 0x4102, 0x4102, 0x4102, - 0x4102, 0x4102, 0x4103, 0x4103, 0x4103, 0x4103, 0x4103, 0x4103, - 0x4103, 0x4103, 0x4104, 0x4104, 0x4104, 0x4104, 0x4104, 0x4104, - 0x4104, 0x4104, 0x4105, 0x4105, 0x4105, 0x4105, 0x4105, 0x4105, - 0x4105, 0x4106, 0x4106, 0x4106, 0x4106, 0x4106, 0x4106, 0x4106, - 0x4106, 0x4107, 0x4107, 0x4107, 0x4107, 0x4107, 0x4107, 0x4107, - 0x4107, 0x4108, 0x4108, 0x4108, 0x4108, 0x4108, 0x4108, 0x4108, - 0x4109, 0x4109, 0x4109, 0x4109, 0x4109, 0x4109, 0x4109, 0x4109, - 0x410a, 0x410a, 0x410a, 0x410a, 0x410a, 0x410a, 0x410a, 0x410a, - 0x410b, 0x410b, 0x410b, 0x410b, 0x410b, 0x410b, 0x410b, 0x410b, - 0x410c, 0x410c, 0x410c, 0x410c, 0x410c, 0x410c, 0x410c, 0x410d, - 0x410d, 0x410d, 0x410d, 0x410d, 0x410d, 0x410d, 0x410d, 0x410e, - 0x410e, 0x410e, 0x410e, 0x410e, 0x410e, 0x410e, 0x410e, 0x410f, - 0x410f, 0x410f, 0x410f, 0x410f, 0x410f, 0x410f, 0x410f, 0x4110, - 0x4110, 0x4110, 0x4110, 0x4110, 0x4110, 0x4110, 0x4110, 0x4111, - 0x4111, 0x4111, 0x4111, 0x4111, 0x4111, 0x4111, 0x4111, 0x4112, - 0x4112, 0x4112, 0x4112, 0x4112, 0x4112, 0x4112, 0x4112, 0x4113, - 0x4113, 0x4113, 0x4113, 0x4113, 0x4113, 0x4113, 0x4113, 0x4114, - 0x4114, 0x4114, 0x4114, 0x4114, 0x4114, 0x4114, 0x4114, 0x4115, - 0x4115, 0x4115, 0x4115, 0x4115, 0x4115, 0x4115, 0x4115, 0x4115, - 0x4116, 0x4116, 0x4116, 0x4116, 0x4116, 0x4116, 0x4116, 0x4116, - 0x4117, 0x4117, 0x4117, 0x4117, 0x4117, 0x4117, 0x4117, 0x4117, - 0x4118, 0x4118, 0x4118, 0x4118, 0x4118, 0x4118, 0x4118, 0x4118, - 0x4119, 0x4119, 0x4119, 0x4119, 0x4119, 0x4119, 0x4119, 0x4119, - 0x4119, 0x411a, 0x411a, 0x411a, 0x411a, 0x411a, 0x411a, 0x411a, - 0x411a, 0x411b, 0x411b, 0x411b, 0x411b, 0x411b, 0x411b, 0x411b, - 0x411b, 0x411c, 0x411c, 0x411c, 0x411c, 0x411c, 0x411c, 0x411c, - 0x411c, 0x411c, 0x411d, 0x411d, 0x411d, 0x411d, 0x411d, 0x411d, - 0x411d, 0x411d, 0x411e, 0x411e, 0x411e, 0x411e, 0x411e, 0x411e, - 0x411e, 0x411e, 0x411e, 0x411f, 0x411f, 0x411f, 0x411f, 0x411f, - 0x411f, 0x411f, 0x411f, 0x4120, 0x4120, 0x4120, 0x4120, 0x4120, - 0x4120, 0x4120, 0x4120, 0x4120, 0x4121, 0x4121, 0x4121, 0x4121, - 0x4121, 0x4121, 0x4121, 0x4121, 0x4122, 0x4122, 0x4122, 0x4122, - 0x4122, 0x4122, 0x4122, 0x4122, 0x4122, 0x4123, 0x4123, 0x4123, - 0x4123, 0x4123, 0x4123, 0x4123, 0x4123, 0x4123, 0x4124, 0x4124, - 0x4124, 0x4124, 0x4124, 0x4124, 0x4124, 0x4124, 0x4125, 0x4125, - 0x4125, 0x4125, 0x4125, 0x4125, 0x4125, 0x4125, 0x4125, 0x4126, - 0x4126, 0x4126, 0x4126, 0x4126, 0x4126, 0x4126, 0x4126, 0x4126, - 0x4127, 0x4127, 0x4127, 0x4127, 0x4127, 0x4128, 0x4128, 0x4128, - 0x4128, 0x4129, 0x4129, 0x4129, 0x4129, 0x412a, 0x412a, 0x412a, - 0x412a, 0x412a, 0x412b, 0x412b, 0x412b, 0x412b, 0x412c, 0x412c, - 0x412c, 0x412c, 0x412c, 0x412d, 0x412d, 0x412d, 0x412d, 0x412e, - 0x412e, 0x412e, 0x412e, 0x412e, 0x412f, 0x412f, 0x412f, 0x412f, - 0x412f, 0x4130, 0x4130, 0x4130, 0x4130, 0x4131, 0x4131, 0x4131, - 0x4131, 0x4131, 0x4132, 0x4132, 0x4132, 0x4132, 0x4133, 0x4133, - 0x4133, 0x4133, 0x4133, 0x4134, 0x4134, 0x4134, 0x4134, 0x4134, - 0x4135, 0x4135, 0x4135, 0x4135, 0x4136, 0x4136, 0x4136, 0x4136, - 0x4136, 0x4137, 0x4137, 0x4137, 0x4137, 0x4137, 0x4138, 0x4138, - 0x4138, 0x4138, 0x4138, 0x4139, 0x4139, 0x4139, 0x4139, 0x413a, - 0x413a, 0x413a, 0x413a, 0x413a, 0x413b, 0x413b, 0x413b, 0x413b, - 0x413b, 0x413c, 0x413c, 0x413c, 0x413c, 0x413c, 0x413d, 0x413d, - 0x413d, 0x413d, 0x413d, 0x413e, 0x413e, 0x413e, 0x413e, 0x413f, - 0x413f, 0x413f, 0x413f, 0x413f, 0x4140, 0x4140, 0x4140, 0x4140, - 0x4140, 0x4141, 0x4141, 0x4141, 0x4141, 0x4141, 0x4142, 0x4142, - 0x4142, 0x4142, 0x4142, 0x4143, 0x4143, 0x4143, 0x4143, 0x4143, - 0x4144, 0x4144, 0x4144, 0x4144, 0x4144, 0x4145, 0x4145, 0x4145, - 0x4145, 0x4145, 0x4146, 0x4146, 0x4146, 0x4146, 0x4146, 0x4147, - 0x4147, 0x4147, 0x4147, 0x4147, 0x4148, 0x4148, 0x4148, 0x4148, - 0x4148, 0x4149, 0x4149, 0x4149, 0x4149, 0x4149, 0x414a, 0x414a, - 0x414a, 0x414a, 0x414a, 0x414b, 0x414b, 0x414b, 0x414b, 0x414b, - 0x414b, 0x414c, 0x414c, 0x414c, 0x414c, 0x414c, 0x414d, 0x414d, - 0x414d, 0x414d, 0x414d, 0x414e, 0x414e, 0x414e, 0x414e, 0x414e, - 0x414f, 0x414f, 0x414f, 0x414f, 0x414f, 0x4150, 0x4150, 0x4150, - 0x4150, 0x4150, 0x4150, 0x4151, 0x4151, 0x4151, 0x4151, 0x4151, - 0x4152, 0x4152, 0x4152, 0x4152, 0x4152, 0x4153, 0x4153, 0x4153, - 0x4153, 0x4153, 0x4153, 0x4154, 0x4154, 0x4154, 0x4154, 0x4154, - 0x4155, 0x4155, 0x4155, 0x4155, 0x4155, 0x4156, 0x4156, 0x4156, - 0x4156, 0x4156, 0x4156, 0x4157, 0x4157, 0x4157, 0x4157, 0x4157, - 0x4158, 0x4158, 0x4158, 0x4158, 0x4158, 0x4158, 0x4159, 0x4159, - 0x4159, 0x4159, 0x4159, 0x415a, 0x415a, 0x415a, 0x415a, 0x415a, - 0x415b, 0x415b, 0x415b, 0x415b, 0x415b, 0x415b, 0x415c, 0x415c, - 0x415c, 0x415c, 0x415c, 0x415c, 0x415d, 0x415d, 0x415d, 0x415d, - 0x415d, 0x415e, 0x415e, 0x415e, 0x415e, 0x415e, 0x415e, 0x415f, - 0x415f, 0x415f, 0x415f, 0x415f, 0x4160, 0x4160, 0x4160, 0x4160, - 0x4160, 0x4160, 0x4161, 0x4161, 0x4161, 0x4161, 0x4161, 0x4161, - 0x4162, 0x4162, 0x4162, 0x4162, 0x4162, 0x4163, 0x4163, 0x4163, - 0x4163, 0x4163, 0x4163, 0x4164, 0x4164, 0x4164, 0x4164, 0x4164, - 0x4164, 0x4165, 0x4165, 0x4165, 0x4165, 0x4165, 0x4166, 0x4166, - 0x4166, 0x4166, 0x4166, 0x4166, 0x4167, 0x4167, 0x4167, 0x4167, - 0x4167, 0x4167, 0x4168, 0x4168, 0x4168, 0x4168, 0x4168, 0x4168, - 0x4169, 0x4169, 0x4169, 0x4169, 0x4169, 0x4169, 0x416a, 0x416a, - 0x416a, 0x416a, 0x416a, 0x416a, 0x416b, 0x416b, 0x416b, 0x416b, - 0x416b, 0x416c, 0x416c, 0x416c, 0x416c, 0x416c, 0x416c, 0x416d, - 0x416d, 0x416d, 0x416d, 0x416d, 0x416d, 0x416e, 0x416e, 0x416e, - 0x416e, 0x416e, 0x416e, 0x416f, 0x416f, 0x416f, 0x416f, 0x416f, - 0x416f, 0x4170, 0x4170, 0x4170, 0x4170, 0x4170, 0x4170, 0x4171, - 0x4171, 0x4171, 0x4171, 0x4171, 0x4171, 0x4172, 0x4172, 0x4172, - 0x4172, 0x4172, 0x4172, 0x4172, 0x4173, 0x4173, 0x4173, 0x4173, - 0x4173, 0x4173, 0x4174, 0x4174, 0x4174, 0x4174, 0x4174, 0x4174, - 0x4175, 0x4175, 0x4175, 0x4175, 0x4175, 0x4175, 0x4176, 0x4176, - 0x4176, 0x4176, 0x4176, 0x4176, 0x4177, 0x4177, 0x4177, 0x4177, - 0x4177, 0x4177, 0x4178, 0x4178, 0x4178, 0x4178, 0x4178, 0x4178, - 0x4178, 0x4179, 0x4179, 0x4179, 0x4179, 0x4179, 0x4179, 0x417a, - 0x417a, 0x417a, 0x417a, 0x417a, 0x417a, 0x417b, 0x417b, 0x417b, - 0x417b, 0x417b, 0x417b, 0x417c, 0x417c, 0x417c, 0x417c, 0x417c, - 0x417c, 0x417c, 0x417d, 0x417d, 0x417d, 0x417d, 0x417d, 0x417d, - 0x417e, 0x417e, 0x417e, 0x417e, 0x417e, 0x417e, 0x417e, 0x417f, - 0x417f, 0x417f, 0x417f, 0x417f, 0x417f, 0x4180, 0x4180, 0x4180, - 0x4180, 0x4180, 0x4180, 0x4180, 0x4181, 0x4181, 0x4181, 0x4181, - 0x4181, 0x4181, 0x4182, 0x4182, 0x4182, 0x4182, 0x4182, 0x4182, - 0x4182, 0x4183, 0x4183, 0x4183, 0x4183, 0x4183, 0x4183, 0x4184, - 0x4184, 0x4184, 0x4184, 0x4184, 0x4184, 0x4184, 0x4185, 0x4185, - 0x4185, 0x4185, 0x4185, 0x4185, 0x4186, 0x4186, 0x4186, 0x4186, - 0x4186, 0x4186, 0x4186, 0x4187, 0x4187, 0x4187, 0x4187, 0x4187, - 0x4187, 0x4187, 0x4188, 0x4188, 0x4188, 0x4188, 0x4188, 0x4188, - 0x4189, 0x4189, 0x4189, 0x4189, 0x4189, 0x4189, 0x4189, 0x418a, - 0x418a, 0x418a, 0x418a, 0x418a, 0x418a, 0x418a, 0x418b, 0x418b, - 0x418b, 0x418b, 0x418b, 0x418b, 0x418c, 0x418c, 0x418c, 0x418c, - 0x418c, 0x418c, 0x418c, 0x418d, 0x418d, 0x418d, 0x418d, 0x418d, - 0x418d, 0x418d, 0x418e, 0x418e, 0x418e, 0x418e, 0x418e, 0x418e, - 0x418e, 0x418f, 0x418f, 0x418f, 0x418f, 0x418f, 0x418f, 0x418f, - 0x4190, 0x4190, 0x4190, 0x4190, 0x4190, 0x4190, 0x4190, 0x4191, - 0x4191, 0x4191, 0x4191, 0x4191, 0x4191, 0x4191, 0x4192, 0x4192, - 0x4192, 0x4192, 0x4192, 0x4192, 0x4192, 0x4193, 0x4193, 0x4193, - 0x4193, 0x4193, 0x4193, 0x4193, 0x4194, 0x4194, 0x4194, 0x4194, - 0x4194, 0x4194, 0x4194, 0x4195, 0x4195, 0x4195, 0x4195, 0x4195, - 0x4195, 0x4195, 0x4196, 0x4196, 0x4196, 0x4196, 0x4196, 0x4196, - 0x4196, 0x4197, 0x4197, 0x4197, 0x4197, 0x4197, 0x4197, 0x4197, - 0x4198, 0x4198, 0x4198, 0x4198, 0x4198, 0x4198, 0x4198, 0x4199, - 0x4199, 0x4199, 0x4199, 0x4199, 0x4199, 0x4199, 0x419a, 0x419a, - 0x419a, 0x419a, 0x419a, 0x419a, 0x419a, 0x419a, 0x419b, 0x419b, - 0x419b, 0x419b, 0x419b, 0x419b, 0x419b, 0x419c, 0x419c, 0x419c, - 0x419c, 0x419c, 0x419c, 0x419c, 0x419d, 0x419d, 0x419d, 0x419d, - 0x419d, 0x419d, 0x419d, 0x419d, 0x419e, 0x419e, 0x419e, 0x419e, - 0x419e, 0x419e, 0x419e, 0x419f, 0x419f, 0x419f, 0x419f, 0x419f, - 0x419f, 0x419f, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, - 0x41a0, 0x41a0, 0x41a1, 0x41a1, 0x41a1, 0x41a1, 0x41a1, 0x41a1, - 0x41a1, 0x41a2, 0x41a2, 0x41a2, 0x41a2, 0x41a2, 0x41a2, 0x41a2, - 0x41a2, 0x41a3, 0x41a3, 0x41a3, 0x41a3, 0x41a3, 0x41a3, 0x41a3, - 0x41a4, 0x41a4, 0x41a4, 0x41a4, 0x41a4, 0x41a4, 0x41a4, 0x41a4, - 0x41a5, 0x41a5, 0x41a5, 0x41a5, 0x41a5, 0x41a5, 0x41a5, 0x41a6, - 0x41a6, 0x41a6, 0x41a6, 0x41a6, 0x41a6, 0x41a6, 0x41a6, 0x41a7, - 0x41a7, 0x41a7, 0x41a7, 0x41a7, 0x41a7, 0x41a7, 0x41a8, 0x41a8, - 0x41a8, 0x41a8, 0x41a8, 0x41a8, 0x41a8, 0x41a8, 0x41a9, 0x41a9, - 0x41a9, 0x41a9, 0x41a9, 0x41a9, 0x41a9, 0x41a9, 0x41aa, 0x41aa, - 0x41aa, 0x41aa, 0x41aa, 0x41aa, 0x41aa, 0x41aa, 0x41ab, 0x41ab, - 0x41ab, 0x41ab, 0x41ab, 0x41ab, 0x41ab, 0x41ac, 0x41ac, 0x41ac, - 0x41ac, 0x41ac, 0x41ac, 0x41ac, 0x41ac, 0x41ad, 0x41ad, 0x41ad, - 0x41ad, 0x41ad, 0x41ad, 0x41ad, 0x41ad, 0x41ae, 0x41ae, 0x41ae, - 0x41ae, 0x41ae, 0x41ae, 0x41ae, 0x41ae, 0x41af, 0x41af, 0x41af, - 0x41af, 0x41af, 0x41af, 0x41af, 0x41af, 0x41b0, 0x41b0, 0x41b0, - 0x41b0, 0x41b0, 0x41b0, 0x41b0, 0x41b0, 0x41b1, 0x41b1, 0x41b1, - 0x41b1, 0x41b1, 0x41b1, 0x41b1, 0x41b1, 0x41b2, 0x41b2, 0x41b2, - 0x41b2, 0x41b2, 0x41b2, 0x41b2, 0x41b2, 0x41b3, 0x41b3, 0x41b3, - 0x41b3, 0x41b3, 0x41b3, 0x41b3, 0x41b3, 0x41b4, 0x41b4, 0x41b4, - 0x41b4, 0x41b4, 0x41b4, 0x41b4, 0x41b4, 0x41b5, 0x41b5, 0x41b5, - 0x41b5, 0x41b5, 0x41b5, 0x41b5, 0x41b5, 0x41b6, 0x41b6, 0x41b6, - 0x41b6, 0x41b6, 0x41b6, 0x41b6, 0x41b6, 0x41b7, 0x41b7, 0x41b7, - 0x41b7, 0x41b7, 0x41b7, 0x41b7, 0x41b7, 0x41b8, 0x41b8, 0x41b8, - 0x41b8, 0x41b8, 0x41b8, 0x41b8, 0x41b8, 0x41b9, 0x41b9, 0x41b9, - 0x41b9, 0x41b9, 0x41b9, 0x41b9, 0x41b9, 0x41b9, 0x41ba, 0x41ba, - 0x41ba, 0x41ba, 0x41ba, 0x41ba, 0x41ba, 0x41ba, 0x41bb, 0x41bb, - 0x41bb, 0x41bb, 0x41bb, 0x41bb, 0x41bb, 0x41bb, 0x41bc, 0x41bc, - 0x41bc, 0x41bc, 0x41bc, 0x41bc, 0x41bc, 0x41bc, 0x41bc, 0x41bd, - 0x41bd, 0x41bd, 0x41bd, 0x41bd, 0x41bd, 0x41bd, 0x41bd, 0x41be, - 0x41be, 0x41be, 0x41be, 0x41be, 0x41be, 0x41be, 0x41be, 0x41be, - 0x41bf, 0x41bf, 0x41bf, 0x41bf, 0x41bf, 0x41bf, 0x41bf, 0x41bf, - 0x41c0, 0x41c0, 0x41c0, 0x41c0, 0x41c0, 0x41c0, 0x41c0, 0x41c0, - 0x41c0, 0x41c1, 0x41c1, 0x41c1, 0x41c1, 0x41c1, 0x41c1, 0x41c1, - 0x41c1, 0x41c2, 0x41c2, 0x41c2, 0x41c2, 0x41c2, 0x41c2, 0x41c2, - 0x41c2, 0x41c2, 0x41c3, 0x41c3, 0x41c3, 0x41c3, 0x41c3, 0x41c3, - 0x41c3, 0x41c3, 0x41c4, 0x41c4, 0x41c4, 0x41c4, 0x41c4, 0x41c4, - 0x41c4, 0x41c4, 0x41c4, 0x41c5, 0x41c5, 0x41c5, 0x41c5, 0x41c5, - 0x41c5, 0x41c5, 0x41c5, 0x41c5, 0x41c6, 0x41c6, 0x41c6, 0x41c6, - 0x41c6, 0x41c6, 0x41c6, 0x41c6, 0x41c7, 0x41c7, 0x41c7, 0x41c7, - 0x41c7, 0x41c7, 0x41c7, 0x41c7, 0x41c7, 0x41c8, 0x41c8, 0x41c8, - 0x41c8, 0x41c8, 0x41c8, 0x41c9, 0x41c9, 0x41c9, 0x41c9, 0x41c9, - 0x41ca, 0x41ca, 0x41ca, 0x41ca, 0x41cb, 0x41cb, 0x41cb, 0x41cb, - 0x41cb, 0x41cc, 0x41cc, 0x41cc, 0x41cc, 0x41cd, 0x41cd, 0x41cd, - 0x41cd, 0x41cd, 0x41ce, 0x41ce, 0x41ce, 0x41ce, 0x41cf, 0x41cf, - 0x41cf, 0x41cf, 0x41cf, 0x41d0, 0x41d0, 0x41d0, 0x41d0, 0x41d1, - 0x41d1, 0x41d1, 0x41d1, 0x41d1, 0x41d2, 0x41d2, 0x41d2, 0x41d2, - 0x41d3, 0x41d3, 0x41d3, 0x41d3, 0x41d3, 0x41d4, 0x41d4, 0x41d4, - 0x41d4, 0x41d4, 0x41d5, 0x41d5, 0x41d5, 0x41d5, 0x41d6, 0x41d6, - 0x41d6, 0x41d6, 0x41d6, 0x41d7, 0x41d7, 0x41d7, 0x41d7, 0x41d7, - 0x41d8, 0x41d8, 0x41d8, 0x41d8, 0x41d9, 0x41d9, 0x41d9, 0x41d9, - 0x41d9, 0x41da, 0x41da, 0x41da, 0x41da, 0x41da, 0x41db, 0x41db, - 0x41db, 0x41db, 0x41db, 0x41dc, 0x41dc, 0x41dc, 0x41dc, 0x41dd, - 0x41dd, 0x41dd, 0x41dd, 0x41dd, 0x41de, 0x41de, 0x41de, 0x41de, - 0x41de, 0x41df, 0x41df, 0x41df, 0x41df, 0x41df, 0x41e0, 0x41e0, - 0x41e0, 0x41e0, 0x41e0, 0x41e1, 0x41e1, 0x41e1, 0x41e1, 0x41e1, - 0x41e2, 0x41e2, 0x41e2, 0x41e2, 0x41e2, 0x41e3, 0x41e3, 0x41e3, - 0x41e3, 0x41e3, 0x41e4, 0x41e4, 0x41e4, 0x41e4, 0x41e5, 0x41e5, - 0x41e5, 0x41e5, 0x41e5, 0x41e6, 0x41e6, 0x41e6, 0x41e6, 0x41e6, - 0x41e7, 0x41e7, 0x41e7, 0x41e7, 0x41e7, 0x41e8, 0x41e8, 0x41e8, - 0x41e8, 0x41e8, 0x41e8, 0x41e9, 0x41e9, 0x41e9, 0x41e9, 0x41e9, - 0x41ea, 0x41ea, 0x41ea, 0x41ea, 0x41ea, 0x41eb, 0x41eb, 0x41eb, - 0x41eb, 0x41eb, 0x41ec, 0x41ec, 0x41ec, 0x41ec, 0x41ec, 0x41ed, - 0x41ed, 0x41ed, 0x41ed, 0x41ed, 0x41ee, 0x41ee, 0x41ee, 0x41ee, - 0x41ee, 0x41ef, 0x41ef, 0x41ef, 0x41ef, 0x41ef, 0x41ef, 0x41f0, - 0x41f0, 0x41f0, 0x41f0, 0x41f0, 0x41f1, 0x41f1, 0x41f1, 0x41f1, - 0x41f1, 0x41f2, 0x41f2, 0x41f2, 0x41f2, 0x41f2, 0x41f3, 0x41f3, - 0x41f3, 0x41f3, 0x41f3, 0x41f3, 0x41f4, 0x41f4, 0x41f4, 0x41f4, - 0x41f4, 0x41f5, 0x41f5, 0x41f5, 0x41f5, 0x41f5, 0x41f6, 0x41f6, - 0x41f6, 0x41f6, 0x41f6, 0x41f6, 0x41f7, 0x41f7, 0x41f7, 0x41f7, - 0x41f7, 0x41f8, 0x41f8, 0x41f8, 0x41f8, 0x41f8, 0x41f9, 0x41f9, - 0x41f9, 0x41f9, 0x41f9, 0x41f9, 0x41fa, 0x41fa, 0x41fa, 0x41fa, - 0x41fa, 0x41fb, 0x41fb, 0x41fb, 0x41fb, 0x41fb, 0x41fb, 0x41fc, - 0x41fc, 0x41fc, 0x41fc, 0x41fc, 0x41fd, 0x41fd, 0x41fd, 0x41fd, - 0x41fd, 0x41fd, 0x41fe, 0x41fe, 0x41fe, 0x41fe, 0x41fe, 0x41ff, - 0x41ff, 0x41ff, 0x41ff, 0x41ff, 0x41ff, 0x4200, 0x4200, 0x4200, - 0x4200, 0x4200, 0x4200, 0x4201, 0x4201, 0x4201, 0x4201, 0x4201, - 0x4202, 0x4202, 0x4202, 0x4202, 0x4202, 0x4202, 0x4203, 0x4203, - 0x4203, 0x4203, 0x4203, 0x4204, 0x4204, 0x4204, 0x4204, 0x4204, - 0x4204, 0x4205, 0x4205, 0x4205, 0x4205, 0x4205, 0x4205, 0x4206, - 0x4206, 0x4206, 0x4206, 0x4206, 0x4206, 0x4207, 0x4207, 0x4207, - 0x4207, 0x4207, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, - 0x4209, 0x4209, 0x4209, 0x4209, 0x4209, 0x4209, 0x420a, 0x420a, - 0x420a, 0x420a, 0x420a, 0x420a, 0x420b, 0x420b, 0x420b, 0x420b, - 0x420b, 0x420b, 0x420c, 0x420c, 0x420c, 0x420c, 0x420c, 0x420c, - 0x420d, 0x420d, 0x420d, 0x420d, 0x420d, 0x420d, 0x420e, 0x420e, - 0x420e, 0x420e, 0x420e, 0x420f, 0x420f, 0x420f, 0x420f, 0x420f, - 0x420f, 0x4210, 0x4210, 0x4210, 0x4210, 0x4210, 0x4210, 0x4211, - 0x4211, 0x4211, 0x4211, 0x4211, 0x4211, 0x4212, 0x4212, 0x4212, - 0x4212, 0x4212, 0x4212, 0x4212, 0x4213, 0x4213, 0x4213, 0x4213, - 0x4213, 0x4213, 0x4214, 0x4214, 0x4214, 0x4214, 0x4214, 0x4214, - 0x4215, 0x4215, 0x4215, 0x4215, 0x4215, 0x4215, 0x4216, 0x4216, - 0x4216, 0x4216, 0x4216, 0x4216, 0x4217, 0x4217, 0x4217, 0x4217, - 0x4217, 0x4217, 0x4218, 0x4218, 0x4218, 0x4218, 0x4218, 0x4218, - 0x4219, 0x4219, 0x4219, 0x4219, 0x4219, 0x4219, 0x4219, 0x421a, - 0x421a, 0x421a, 0x421a, 0x421a, 0x421a, 0x421b, 0x421b, 0x421b, - 0x421b, 0x421b, 0x421b, 0x421c, 0x421c, 0x421c, 0x421c, 0x421c, - 0x421c, 0x421d, 0x421d, 0x421d, 0x421d, 0x421d, 0x421d, 0x421d, - 0x421e, 0x421e, 0x421e, 0x421e, 0x421e, 0x421e, 0x421f, 0x421f, - 0x421f, 0x421f, 0x421f, 0x421f, 0x421f, 0x4220, 0x4220, 0x4220, - 0x4220, 0x4220, 0x4220, 0x4221, 0x4221, 0x4221, 0x4221, 0x4221, - 0x4221, 0x4222, 0x4222, 0x4222, 0x4222, 0x4222, 0x4222, 0x4222, - 0x4223, 0x4223, 0x4223, 0x4223, 0x4223, 0x4223, 0x4224, 0x4224, - 0x4224, 0x4224, 0x4224, 0x4224, 0x4224, 0x4225, 0x4225, 0x4225, - 0x4225, 0x4225, 0x4225, 0x4225, 0x4226, 0x4226, 0x4226, 0x4226, - 0x4226, 0x4226, 0x4227, 0x4227, 0x4227, 0x4227, 0x4227, 0x4227, - 0x4227, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4229, - 0x4229, 0x4229, 0x4229, 0x4229, 0x4229, 0x4229, 0x422a, 0x422a, - 0x422a, 0x422a, 0x422a, 0x422a, 0x422a, 0x422b, 0x422b, 0x422b, - 0x422b, 0x422b, 0x422b, 0x422b, 0x422c, 0x422c, 0x422c, 0x422c, - 0x422c, 0x422c, 0x422d, 0x422d, 0x422d, 0x422d, 0x422d, 0x422d, - 0x422d, 0x422e, 0x422e, 0x422e, 0x422e, 0x422e, 0x422e, 0x422e, - 0x422f, 0x422f, 0x422f, 0x422f, 0x422f, 0x422f, 0x422f, 0x4230, - 0x4230, 0x4230, 0x4230, 0x4230, 0x4230, 0x4230, 0x4231, 0x4231, - 0x4231, 0x4231, 0x4231, 0x4231, 0x4231, 0x4232, 0x4232, 0x4232, - 0x4232, 0x4232, 0x4232, 0x4232, 0x4233, 0x4233, 0x4233, 0x4233, - 0x4233, 0x4233, 0x4234, 0x4234, 0x4234, 0x4234, 0x4234, 0x4234, - 0x4234, 0x4234, 0x4235, 0x4235, 0x4235, 0x4235, 0x4235, 0x4235, - 0x4235, 0x4236, 0x4236, 0x4236, 0x4236, 0x4236, 0x4236, 0x4236, - 0x4237, 0x4237, 0x4237, 0x4237, 0x4237, 0x4237, 0x4237, 0x4238, - 0x4238, 0x4238, 0x4238, 0x4238, 0x4238, 0x4238, 0x4239, 0x4239, - 0x4239, 0x4239, 0x4239, 0x4239, 0x4239, 0x423a, 0x423a, 0x423a, - 0x423a, 0x423a, 0x423a, 0x423a, 0x423b, 0x423b, 0x423b, 0x423b, - 0x423b, 0x423b, 0x423b, 0x423c, 0x423c, 0x423c, 0x423c, 0x423c, - 0x423c, 0x423c, 0x423c, 0x423d, 0x423d, 0x423d, 0x423d, 0x423d, - 0x423d, 0x423d, 0x423e, 0x423e, 0x423e, 0x423e, 0x423e, 0x423e, - 0x423e, 0x423f, 0x423f, 0x423f, 0x423f, 0x423f, 0x423f, 0x423f, - 0x423f, 0x4240, 0x4240, 0x4240, 0x4240, 0x4240, 0x4240, 0x4240, - 0x4241, 0x4241, 0x4241, 0x4241, 0x4241, 0x4241, 0x4241, 0x4242, - 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4243, - 0x4243, 0x4243, 0x4243, 0x4243, 0x4243, 0x4243, 0x4244, 0x4244, - 0x4244, 0x4244, 0x4244, 0x4244, 0x4244, 0x4244, 0x4245, 0x4245, - 0x4245, 0x4245, 0x4245, 0x4245, 0x4245, 0x4246, 0x4246, 0x4246, - 0x4246, 0x4246, 0x4246, 0x4246, 0x4246, 0x4247, 0x4247, 0x4247, - 0x4247, 0x4247, 0x4247, 0x4247, 0x4248, 0x4248, 0x4248, 0x4248, - 0x4248, 0x4248, 0x4248, 0x4248, 0x4249, 0x4249, 0x4249, 0x4249, - 0x4249, 0x4249, 0x4249, 0x4249, 0x424a, 0x424a, 0x424a, 0x424a, - 0x424a, 0x424a, 0x424a, 0x424b, 0x424b, 0x424b, 0x424b, 0x424b, - 0x424b, 0x424b, 0x424b, 0x424c, 0x424c, 0x424c, 0x424c, 0x424c, - 0x424c, 0x424c, 0x424c, 0x424d, 0x424d, 0x424d, 0x424d, 0x424d, - 0x424d, 0x424d, 0x424d, 0x424e, 0x424e, 0x424e, 0x424e, 0x424e, - 0x424e, 0x424e, 0x424e, 0x424f, 0x424f, 0x424f, 0x424f, 0x424f, - 0x424f, 0x424f, 0x4250, 0x4250, 0x4250, 0x4250, 0x4250, 0x4250, - 0x4250, 0x4250, 0x4251, 0x4251, 0x4251, 0x4251, 0x4251, 0x4251, - 0x4251, 0x4251, 0x4252, 0x4252, 0x4252, 0x4252, 0x4252, 0x4252, - 0x4252, 0x4252, 0x4253, 0x4253, 0x4253, 0x4253, 0x4253, 0x4253, - 0x4253, 0x4253, 0x4254, 0x4254, 0x4254, 0x4254, 0x4254, 0x4254, - 0x4254, 0x4254, 0x4255, 0x4255, 0x4255, 0x4255, 0x4255, 0x4255, - 0x4255, 0x4255, 0x4256, 0x4256, 0x4256, 0x4256, 0x4256, 0x4256, - 0x4256, 0x4256, 0x4257, 0x4257, 0x4257, 0x4257, 0x4257, 0x4257, - 0x4257, 0x4257, 0x4257, 0x4258, 0x4258, 0x4258, 0x4258, 0x4258, - 0x4258, 0x4258, 0x4258, 0x4259, 0x4259, 0x4259, 0x4259, 0x4259, - 0x4259, 0x4259, 0x4259, 0x425a, 0x425a, 0x425a, 0x425a, 0x425a, - 0x425a, 0x425a, 0x425a, 0x425b, 0x425b, 0x425b, 0x425b, 0x425b, - 0x425b, 0x425b, 0x425b, 0x425c, 0x425c, 0x425c, 0x425c, 0x425c, - 0x425c, 0x425c, 0x425c, 0x425c, 0x425d, 0x425d, 0x425d, 0x425d, - 0x425d, 0x425d, 0x425d, 0x425d, 0x425e, 0x425e, 0x425e, 0x425e, - 0x425e, 0x425e, 0x425e, 0x425e, 0x425f, 0x425f, 0x425f, 0x425f, - 0x425f, 0x425f, 0x425f, 0x425f, 0x425f, 0x4260, 0x4260, 0x4260, - 0x4260, 0x4260, 0x4260, 0x4260, 0x4260, 0x4261, 0x4261, 0x4261, - 0x4261, 0x4261, 0x4261, 0x4261, 0x4261, 0x4261, 0x4262, 0x4262, - 0x4262, 0x4262, 0x4262, 0x4262, 0x4262, 0x4262, 0x4263, 0x4263, - 0x4263, 0x4263, 0x4263, 0x4263, 0x4263, 0x4263, 0x4263, 0x4264, - 0x4264, 0x4264, 0x4264, 0x4264, 0x4264, 0x4264, 0x4264, 0x4264, - 0x4265, 0x4265, 0x4265, 0x4265, 0x4265, 0x4265, 0x4265, 0x4265, - 0x4266, 0x4266, 0x4266, 0x4266, 0x4266, 0x4266, 0x4266, 0x4266, - 0x4266, 0x4267, 0x4267, 0x4267, 0x4267, 0x4267, 0x4267, 0x4267, - 0x4267, 0x4267, 0x4268, 0x4268, 0x4268, 0x4268, 0x4268, 0x4268, - 0x4268, 0x4268, 0x4269, 0x4269, 0x4269, 0x4269, 0x4269, 0x4269, - 0x4269, 0x4269, 0x426a, 0x426a, 0x426a, 0x426a, 0x426b, 0x426b, - 0x426b, 0x426b, 0x426b, 0x426c, 0x426c, 0x426c, 0x426c, 0x426d, - 0x426d, 0x426d, 0x426d, 0x426d, 0x426e, 0x426e, 0x426e, 0x426e, - 0x426f, 0x426f, 0x426f, 0x426f, 0x426f, 0x4270, 0x4270, 0x4270, - 0x4270, 0x4271, 0x4271, 0x4271, 0x4271, 0x4271, 0x4272, 0x4272, - 0x4272, 0x4272, 0x4273, 0x4273, 0x4273, 0x4273, 0x4273, 0x4274, - 0x4274, 0x4274, 0x4274, 0x4275, 0x4275, 0x4275, 0x4275, 0x4275, - 0x4276, 0x4276, 0x4276, 0x4276, 0x4276, 0x4277, 0x4277, 0x4277, - 0x4277, 0x4278, 0x4278, 0x4278, 0x4278, 0x4278, 0x4279, 0x4279, - 0x4279, 0x4279, 0x4279, 0x427a, 0x427a, 0x427a, 0x427a, 0x427a, - 0x427b, 0x427b, 0x427b, 0x427b, 0x427c, 0x427c, 0x427c, 0x427c, - 0x427c, 0x427d, 0x427d, 0x427d, 0x427d, 0x427d, 0x427e, 0x427e, - 0x427e, 0x427e, 0x427e, 0x427f, 0x427f, 0x427f, 0x427f, 0x4280, - 0x4280, 0x4280, 0x4280, 0x4280, 0x4281, 0x4281, 0x4281, 0x4281, - 0x4281, 0x4282, 0x4282, 0x4282, 0x4282, 0x4282, 0x4283, 0x4283, - 0x4283, 0x4283, 0x4283, 0x4284, 0x4284, 0x4284, 0x4284, 0x4284, - 0x4285, 0x4285, 0x4285, 0x4285, 0x4285, 0x4286, 0x4286, 0x4286, - 0x4286, 0x4286, 0x4287, 0x4287, 0x4287, 0x4287, 0x4287, 0x4288, - 0x4288, 0x4288, 0x4288, 0x4288, 0x4289, 0x4289, 0x4289, 0x4289, - 0x4289, 0x428a, 0x428a, 0x428a, 0x428a, 0x428a, 0x428b, 0x428b, - 0x428b, 0x428b, 0x428b, 0x428c, 0x428c, 0x428c, 0x428c, 0x428c, - 0x428d, 0x428d, 0x428d, 0x428d, 0x428d, 0x428e, 0x428e, 0x428e, - 0x428e, 0x428e, 0x428e, 0x428f, 0x428f, 0x428f, 0x428f, 0x428f, - 0x4290, 0x4290, 0x4290, 0x4290, 0x4290, 0x4291, 0x4291, 0x4291, - 0x4291, 0x4291, 0x4292, 0x4292, 0x4292, 0x4292, 0x4292, 0x4293, - 0x4293, 0x4293, 0x4293, 0x4293, 0x4293, 0x4294, 0x4294, 0x4294, - 0x4294, 0x4294, 0x4295, 0x4295, 0x4295, 0x4295, 0x4295, 0x4296, - 0x4296, 0x4296, 0x4296, 0x4296, 0x4296, 0x4297, 0x4297, 0x4297, - 0x4297, 0x4297, 0x4298, 0x4298, 0x4298, 0x4298, 0x4298, 0x4299, - 0x4299, 0x4299, 0x4299, 0x4299, 0x4299, 0x429a, 0x429a, 0x429a, - 0x429a, 0x429a, 0x429b, 0x429b, 0x429b, 0x429b, 0x429b, 0x429b, - 0x429c, 0x429c, 0x429c, 0x429c, 0x429c, 0x429d, 0x429d, 0x429d, - 0x429d, 0x429d, 0x429d, 0x429e, 0x429e, 0x429e, 0x429e, 0x429e, - 0x429f, 0x429f, 0x429f, 0x429f, 0x429f, 0x429f, 0x42a0, 0x42a0, - 0x42a0, 0x42a0, 0x42a0, 0x42a1, 0x42a1, 0x42a1, 0x42a1, 0x42a1, - 0x42a1, 0x42a2, 0x42a2, 0x42a2, 0x42a2, 0x42a2, 0x42a3, 0x42a3, - 0x42a3, 0x42a3, 0x42a3, 0x42a3, 0x42a4, 0x42a4, 0x42a4, 0x42a4, - 0x42a4, 0x42a4, 0x42a5, 0x42a5, 0x42a5, 0x42a5, 0x42a5, 0x42a6, - 0x42a6, 0x42a6, 0x42a6, 0x42a6, 0x42a6, 0x42a7, 0x42a7, 0x42a7, - 0x42a7, 0x42a7, 0x42a7, 0x42a8, 0x42a8, 0x42a8, 0x42a8, 0x42a8, - 0x42a8, 0x42a9, 0x42a9, 0x42a9, 0x42a9, 0x42a9, 0x42aa, 0x42aa, - 0x42aa, 0x42aa, 0x42aa, 0x42aa, 0x42ab, 0x42ab, 0x42ab, 0x42ab, - 0x42ab, 0x42ab, 0x42ac, 0x42ac, 0x42ac, 0x42ac, 0x42ac, 0x42ac, - 0x42ad, 0x42ad, 0x42ad, 0x42ad, 0x42ad, 0x42ad, 0x42ae, 0x42ae, - 0x42ae, 0x42ae, 0x42ae, 0x42ae, 0x42af, 0x42af, 0x42af, 0x42af, - 0x42af, 0x42af, 0x42b0, 0x42b0, 0x42b0, 0x42b0, 0x42b0, 0x42b0, - 0x42b1, 0x42b1, 0x42b1, 0x42b1, 0x42b1, 0x42b1, 0x42b2, 0x42b2, - 0x42b2, 0x42b2, 0x42b2, 0x42b2, 0x42b3, 0x42b3, 0x42b3, 0x42b3, - 0x42b3, 0x42b3, 0x42b4, 0x42b4, 0x42b4, 0x42b4, 0x42b4, 0x42b4, - 0x42b5, 0x42b5, 0x42b5, 0x42b5, 0x42b5, 0x42b5, 0x42b6, 0x42b6, - 0x42b6, 0x42b6, 0x42b6, 0x42b6, 0x42b7, 0x42b7, 0x42b7, 0x42b7, - 0x42b7, 0x42b7, 0x42b8, 0x42b8, 0x42b8, 0x42b8, 0x42b8, 0x42b8, - 0x42b9, 0x42b9, 0x42b9, 0x42b9, 0x42b9, 0x42b9, 0x42ba, 0x42ba, - 0x42ba, 0x42ba, 0x42ba, 0x42ba, 0x42ba, 0x42bb, 0x42bb, 0x42bb, - 0x42bb, 0x42bb, 0x42bb, 0x42bc, 0x42bc, 0x42bc, 0x42bc, 0x42bc, - 0x42bc, 0x42bd, 0x42bd, 0x42bd, 0x42bd, 0x42bd, 0x42bd, 0x42bd, - 0x42be, 0x42be, 0x42be, 0x42be, 0x42be, 0x42be, 0x42bf, 0x42bf, - 0x42bf, 0x42bf, 0x42bf, 0x42bf, 0x42c0, 0x42c0, 0x42c0, 0x42c0, - 0x42c0, 0x42c0, 0x42c0, 0x42c1, 0x42c1, 0x42c1, 0x42c1, 0x42c1, - 0x42c1, 0x42c2, 0x42c2, 0x42c2, 0x42c2, 0x42c2, 0x42c2, 0x42c3, - 0x42c3, 0x42c3, 0x42c3, 0x42c3, 0x42c3, 0x42c3, 0x42c4, 0x42c4, - 0x42c4, 0x42c4, 0x42c4, 0x42c4, 0x42c5, 0x42c5, 0x42c5, 0x42c5, - 0x42c5, 0x42c5, 0x42c5, 0x42c6, 0x42c6, 0x42c6, 0x42c6, 0x42c6, - 0x42c6, 0x42c6, 0x42c7, 0x42c7, 0x42c7, 0x42c7, 0x42c7, 0x42c7, - 0x42c8, 0x42c8, 0x42c8, 0x42c8, 0x42c8, 0x42c8, 0x42c8, 0x42c9, - 0x42c9, 0x42c9, 0x42c9, 0x42c9, 0x42c9, 0x42ca, 0x42ca, 0x42ca, - 0x42ca, 0x42ca, 0x42ca, 0x42ca, 0x42cb, 0x42cb, 0x42cb, 0x42cb, - 0x42cb, 0x42cb, 0x42cb, 0x42cc, 0x42cc, 0x42cc, 0x42cc, 0x42cc, - 0x42cc, 0x42cd, 0x42cd, 0x42cd, 0x42cd, 0x42cd, 0x42cd, 0x42cd, - 0x42ce, 0x42ce, 0x42ce, 0x42ce, 0x42ce, 0x42ce, 0x42ce, 0x42cf, - 0x42cf, 0x42cf, 0x42cf, 0x42cf, 0x42cf, 0x42cf, 0x42d0, 0x42d0, - 0x42d0, 0x42d0, 0x42d0, 0x42d0, 0x42d0, 0x42d1, 0x42d1, 0x42d1, - 0x42d1, 0x42d1, 0x42d1, 0x42d1, 0x42d2, 0x42d2, 0x42d2, 0x42d2, - 0x42d2, 0x42d2, 0x42d3, 0x42d3, 0x42d3, 0x42d3, 0x42d3, 0x42d3, - 0x42d3, 0x42d4, 0x42d4, 0x42d4, 0x42d4, 0x42d4, 0x42d4, 0x42d4, - 0x42d5, 0x42d5, 0x42d5, 0x42d5, 0x42d5, 0x42d5, 0x42d5, 0x42d6, - 0x42d6, 0x42d6, 0x42d6, 0x42d6, 0x42d6, 0x42d6, 0x42d7, 0x42d7, - 0x42d7, 0x42d7, 0x42d7, 0x42d7, 0x42d7, 0x42d8, 0x42d8, 0x42d8, - 0x42d8, 0x42d8, 0x42d8, 0x42d8, 0x42d9, 0x42d9, 0x42d9, 0x42d9, - 0x42d9, 0x42d9, 0x42d9, 0x42d9, 0x42da, 0x42da, 0x42da, 0x42da, - 0x42da, 0x42da, 0x42da, 0x42db, 0x42db, 0x42db, 0x42db, 0x42db, - 0x42db, 0x42db, 0x42dc, 0x42dc, 0x42dc, 0x42dc, 0x42dc, 0x42dc, - 0x42dc, 0x42dd, 0x42dd, 0x42dd, 0x42dd, 0x42dd, 0x42dd, 0x42dd, - 0x42de, 0x42de, 0x42de, 0x42de, 0x42de, 0x42de, 0x42de, 0x42de, - 0x42df, 0x42df, 0x42df, 0x42df, 0x42df, 0x42df, 0x42df, 0x42e0, - 0x42e0, 0x42e0, 0x42e0, 0x42e0, 0x42e0, 0x42e0, 0x42e1, 0x42e1, - 0x42e1, 0x42e1, 0x42e1, 0x42e1, 0x42e1, 0x42e1, 0x42e2, 0x42e2, - 0x42e2, 0x42e2, 0x42e2, 0x42e2, 0x42e2, 0x42e3, 0x42e3, 0x42e3, - 0x42e3, 0x42e3, 0x42e3, 0x42e3, 0x42e4, 0x42e4, 0x42e4, 0x42e4, - 0x42e4, 0x42e4, 0x42e4, 0x42e4, 0x42e5, 0x42e5, 0x42e5, 0x42e5, - 0x42e5, 0x42e5, 0x42e5, 0x42e6, 0x42e6, 0x42e6, 0x42e6, 0x42e6, - 0x42e6, 0x42e6, 0x42e6, 0x42e7, 0x42e7, 0x42e7, 0x42e7, 0x42e7, - 0x42e7, 0x42e7, 0x42e8, 0x42e8, 0x42e8, 0x42e8, 0x42e8, 0x42e8, - 0x42e8, 0x42e8, 0x42e9, 0x42e9, 0x42e9, 0x42e9, 0x42e9, 0x42e9, - 0x42e9, 0x42e9, 0x42ea, 0x42ea, 0x42ea, 0x42ea, 0x42ea, 0x42ea, - 0x42ea, 0x42eb, 0x42eb, 0x42eb, 0x42eb, 0x42eb, 0x42eb, 0x42eb, - 0x42eb, 0x42ec, 0x42ec, 0x42ec, 0x42ec, 0x42ec, 0x42ec, 0x42ec, - 0x42ec, 0x42ed, 0x42ed, 0x42ed, 0x42ed, 0x42ed, 0x42ed, 0x42ed, - 0x42ee, 0x42ee, 0x42ee, 0x42ee, 0x42ee, 0x42ee, 0x42ee, 0x42ee, - 0x42ef, 0x42ef, 0x42ef, 0x42ef, 0x42ef, 0x42ef, 0x42ef, 0x42ef, - 0x42f0, 0x42f0, 0x42f0, 0x42f0, 0x42f0, 0x42f0, 0x42f0, 0x42f0, - 0x42f1, 0x42f1, 0x42f1, 0x42f1, 0x42f1, 0x42f1, 0x42f1, 0x42f1, - 0x42f2, 0x42f2, 0x42f2, 0x42f2, 0x42f2, 0x42f2, 0x42f2, 0x42f2, - 0x42f3, 0x42f3, 0x42f3, 0x42f3, 0x42f3, 0x42f3, 0x42f3, 0x42f3, - 0x42f4, 0x42f4, 0x42f4, 0x42f4, 0x42f4, 0x42f4, 0x42f4, 0x42f4, - 0x42f5, 0x42f5, 0x42f5, 0x42f5, 0x42f5, 0x42f5, 0x42f5, 0x42f5, - 0x42f6, 0x42f6, 0x42f6, 0x42f6, 0x42f6, 0x42f6, 0x42f6, 0x42f6, - 0x42f7, 0x42f7, 0x42f7, 0x42f7, 0x42f7, 0x42f7, 0x42f7, 0x42f7, - 0x42f8, 0x42f8, 0x42f8, 0x42f8, 0x42f8, 0x42f8, 0x42f8, 0x42f8, - 0x42f9, 0x42f9, 0x42f9, 0x42f9, 0x42f9, 0x42f9, 0x42f9, 0x42f9, - 0x42fa, 0x42fa, 0x42fa, 0x42fa, 0x42fa, 0x42fa, 0x42fa, 0x42fa, - 0x42fb, 0x42fb, 0x42fb, 0x42fb, 0x42fb, 0x42fb, 0x42fb, 0x42fb, - 0x42fb, 0x42fc, 0x42fc, 0x42fc, 0x42fc, 0x42fc, 0x42fc, 0x42fc, - 0x42fc, 0x42fd, 0x42fd, 0x42fd, 0x42fd, 0x42fd, 0x42fd, 0x42fd, - 0x42fd, 0x42fe, 0x42fe, 0x42fe, 0x42fe, 0x42fe, 0x42fe, 0x42fe, - 0x42fe, 0x42ff, 0x42ff, 0x42ff, 0x42ff, 0x42ff, 0x42ff, 0x42ff, - 0x42ff, 0x42ff, 0x4300, 0x4300, 0x4300, 0x4300, 0x4300, 0x4300, - 0x4300, 0x4300, 0x4301, 0x4301, 0x4301, 0x4301, 0x4301, 0x4301, - 0x4301, 0x4301, 0x4301, 0x4302, 0x4302, 0x4302, 0x4302, 0x4302, - 0x4302, 0x4302, 0x4302, 0x4303, 0x4303, 0x4303, 0x4303, 0x4303, - 0x4303, 0x4303, 0x4303, 0x4303, 0x4304, 0x4304, 0x4304, 0x4304, - 0x4304, 0x4304, 0x4304, 0x4304, 0x4305, 0x4305, 0x4305, 0x4305, - 0x4305, 0x4305, 0x4305, 0x4305, 0x4305, 0x4306, 0x4306, 0x4306, - 0x4306, 0x4306, 0x4306, 0x4306, 0x4306, 0x4307, 0x4307, 0x4307, - 0x4307, 0x4307, 0x4307, 0x4307, 0x4307, 0x4307, 0x4308, 0x4308, - 0x4308, 0x4308, 0x4308, 0x4308, 0x4308, 0x4308, 0x4308, 0x4309, - 0x4309, 0x4309, 0x4309, 0x4309, 0x4309, 0x4309, 0x4309, 0x4309, - 0x430a, 0x430a, 0x430a, 0x430a, 0x430a, 0x430a, 0x430a, 0x430a, - 0x430b, 0x430b, 0x430b, 0x430b, 0x430b, 0x430c, 0x430c, 0x430c, - 0x430c, 0x430d, 0x430d, 0x430d, 0x430d, 0x430d, 0x430e, 0x430e, - 0x430e, 0x430e, 0x430f, 0x430f, 0x430f, 0x430f, 0x430f, 0x4310, - 0x4310, 0x4310, 0x4310, 0x4311, 0x4311, 0x4311, 0x4311, 0x4311, - 0x4312, 0x4312, 0x4312, 0x4312, 0x4313, 0x4313, 0x4313, 0x4313, - 0x4313, 0x4314, 0x4314, 0x4314, 0x4314, 0x4315, 0x4315, 0x4315, - 0x4315, 0x4315, 0x4316, 0x4316, 0x4316, 0x4316, 0x4316, 0x4317, - 0x4317, 0x4317, 0x4317, 0x4318, 0x4318, 0x4318, 0x4318, 0x4318, - 0x4319, 0x4319, 0x4319, 0x4319, 0x4319, 0x431a, 0x431a, 0x431a, - 0x431a, 0x431b, 0x431b, 0x431b, 0x431b, 0x431b, 0x431c, 0x431c, - 0x431c, 0x431c, 0x431c, 0x431d, 0x431d, 0x431d, 0x431d, 0x431d, - 0x431e, 0x431e, 0x431e, 0x431e, 0x431f, 0x431f, 0x431f, 0x431f, - 0x431f, 0x4320, 0x4320, 0x4320, 0x4320, 0x4320, 0x4321, 0x4321, - 0x4321, 0x4321, 0x4321, 0x4322, 0x4322, 0x4322, 0x4322, 0x4322, - 0x4323, 0x4323, 0x4323, 0x4323, 0x4323, 0x4324, 0x4324, 0x4324, - 0x4324, 0x4325, 0x4325, 0x4325, 0x4325, 0x4325, 0x4326, 0x4326, - 0x4326, 0x4326, 0x4326, 0x4327, 0x4327, 0x4327, 0x4327, 0x4327, - 0x4328, 0x4328, 0x4328, 0x4328, 0x4328, 0x4329, 0x4329, 0x4329, - 0x4329, 0x4329, 0x432a, 0x432a, 0x432a, 0x432a, 0x432a, 0x432b, - 0x432b, 0x432b, 0x432b, 0x432b, 0x432c, 0x432c, 0x432c, 0x432c, - 0x432c, 0x432c, 0x432d, 0x432d, 0x432d, 0x432d, 0x432d, 0x432e, - 0x432e, 0x432e, 0x432e, 0x432e, 0x432f, 0x432f, 0x432f, 0x432f, - 0x432f, 0x4330, 0x4330, 0x4330, 0x4330, 0x4330, 0x4331, 0x4331, - 0x4331, 0x4331, 0x4331, 0x4332, 0x4332, 0x4332, 0x4332, 0x4332, - 0x4333, 0x4333, 0x4333, 0x4333, 0x4333, 0x4333, 0x4334, 0x4334, - 0x4334, 0x4334, 0x4334, 0x4335, 0x4335, 0x4335, 0x4335, 0x4335, - 0x4336, 0x4336, 0x4336, 0x4336, 0x4336, 0x4336, 0x4337, 0x4337, - 0x4337, 0x4337, 0x4337, 0x4338, 0x4338, 0x4338, 0x4338, 0x4338, - 0x4339, 0x4339, 0x4339, 0x4339, 0x4339, 0x4339, 0x433a, 0x433a, - 0x433a, 0x433a, 0x433a, 0x433b, 0x433b, 0x433b, 0x433b, 0x433b, - 0x433c, 0x433c, 0x433c, 0x433c, 0x433c, 0x433c, 0x433d, 0x433d, - 0x433d, 0x433d, 0x433d, 0x433e, 0x433e, 0x433e, 0x433e, 0x433e, - 0x433e, 0x433f, 0x433f, 0x433f, 0x433f, 0x433f, 0x4340, 0x4340, - 0x4340, 0x4340, 0x4340, 0x4340, 0x4341, 0x4341, 0x4341, 0x4341, - 0x4341, 0x4342, 0x4342, 0x4342, 0x4342, 0x4342, 0x4342, 0x4343, - 0x4343, 0x4343, 0x4343, 0x4343, 0x4343, 0x4344, 0x4344, 0x4344, - 0x4344, 0x4344, 0x4345, 0x4345, 0x4345, 0x4345, 0x4345, 0x4345, - 0x4346, 0x4346, 0x4346, 0x4346, 0x4346, 0x4346, 0x4347, 0x4347, - 0x4347, 0x4347, 0x4347, 0x4348, 0x4348, 0x4348, 0x4348, 0x4348, - 0x4348, 0x4349, 0x4349, 0x4349, 0x4349, 0x4349, 0x4349, 0x434a, - 0x434a, 0x434a, 0x434a, 0x434a, 0x434a, 0x434b, 0x434b, 0x434b, - 0x434b, 0x434b, 0x434c, 0x434c, 0x434c, 0x434c, 0x434c, 0x434c, - 0x434d, 0x434d, 0x434d, 0x434d, 0x434d, 0x434d, 0x434e, 0x434e, - 0x434e, 0x434e, 0x434e, 0x434e, 0x434f, 0x434f, 0x434f, 0x434f, - 0x434f, 0x434f, 0x4350, 0x4350, 0x4350, 0x4350, 0x4350, 0x4350, - 0x4351, 0x4351, 0x4351, 0x4351, 0x4351, 0x4351, 0x4352, 0x4352, - 0x4352, 0x4352, 0x4352, 0x4352, 0x4353, 0x4353, 0x4353, 0x4353, - 0x4353, 0x4353, 0x4354, 0x4354, 0x4354, 0x4354, 0x4354, 0x4354, - 0x4355, 0x4355, 0x4355, 0x4355, 0x4355, 0x4355, 0x4356, 0x4356, - 0x4356, 0x4356, 0x4356, 0x4356, 0x4357, 0x4357, 0x4357, 0x4357, - 0x4357, 0x4357, 0x4358, 0x4358, 0x4358, 0x4358, 0x4358, 0x4358, - 0x4359, 0x4359, 0x4359, 0x4359, 0x4359, 0x4359, 0x435a, 0x435a, - 0x435a, 0x435a, 0x435a, 0x435a, 0x435b, 0x435b, 0x435b, 0x435b, - 0x435b, 0x435b, 0x435b, 0x435c, 0x435c, 0x435c, 0x435c, 0x435c, - 0x435c, 0x435d, 0x435d, 0x435d, 0x435d, 0x435d, 0x435d, 0x435e, - 0x435e, 0x435e, 0x435e, 0x435e, 0x435e, 0x435e, 0x435f, 0x435f, - 0x435f, 0x435f, 0x435f, 0x435f, 0x4360, 0x4360, 0x4360, 0x4360, - 0x4360, 0x4360, 0x4361, 0x4361, 0x4361, 0x4361, 0x4361, 0x4361, - 0x4361, 0x4362, 0x4362, 0x4362, 0x4362, 0x4362, 0x4362, 0x4363, - 0x4363, 0x4363, 0x4363, 0x4363, 0x4363, 0x4364, 0x4364, 0x4364, - 0x4364, 0x4364, 0x4364, 0x4364, 0x4365, 0x4365, 0x4365, 0x4365, - 0x4365, 0x4365, 0x4366, 0x4366, 0x4366, 0x4366, 0x4366, 0x4366, - 0x4366, 0x4367, 0x4367, 0x4367, 0x4367, 0x4367, 0x4367, 0x4368, - 0x4368, 0x4368, 0x4368, 0x4368, 0x4368, 0x4368, 0x4369, 0x4369, - 0x4369, 0x4369, 0x4369, 0x4369, 0x4369, 0x436a, 0x436a, 0x436a, - 0x436a, 0x436a, 0x436a, 0x436b, 0x436b, 0x436b, 0x436b, 0x436b, - 0x436b, 0x436b, 0x436c, 0x436c, 0x436c, 0x436c, 0x436c, 0x436c, - 0x436c, 0x436d, 0x436d, 0x436d, 0x436d, 0x436d, 0x436d, 0x436e, - 0x436e, 0x436e, 0x436e, 0x436e, 0x436e, 0x436e, 0x436f, 0x436f, - 0x436f, 0x436f, 0x436f, 0x436f, 0x436f, 0x4370, 0x4370, 0x4370, - 0x4370, 0x4370, 0x4370, 0x4370, 0x4371, 0x4371, 0x4371, 0x4371, - 0x4371, 0x4371, 0x4372, 0x4372, 0x4372, 0x4372, 0x4372, 0x4372, - 0x4372, 0x4373, 0x4373, 0x4373, 0x4373, 0x4373, 0x4373, 0x4373, - 0x4374, 0x4374, 0x4374, 0x4374, 0x4374, 0x4374, 0x4374, 0x4375, - 0x4375, 0x4375, 0x4375, 0x4375, 0x4375, 0x4375, 0x4376, 0x4376, - 0x4376, 0x4376, 0x4376, 0x4376, 0x4376, 0x4377, 0x4377, 0x4377, - 0x4377, 0x4377, 0x4377, 0x4377, 0x4378, 0x4378, 0x4378, 0x4378, - 0x4378, 0x4378, 0x4378, 0x4379, 0x4379, 0x4379, 0x4379, 0x4379, - 0x4379, 0x4379, 0x437a, 0x437a, 0x437a, 0x437a, 0x437a, 0x437a, - 0x437a, 0x437b, 0x437b, 0x437b, 0x437b, 0x437b, 0x437b, 0x437b, - 0x437c, 0x437c, 0x437c, 0x437c, 0x437c, 0x437c, 0x437c, 0x437c, - 0x437d, 0x437d, 0x437d, 0x437d, 0x437d, 0x437d, 0x437d, 0x437e, - 0x437e, 0x437e, 0x437e, 0x437e, 0x437e, 0x437e, 0x437f, 0x437f, - 0x437f, 0x437f, 0x437f, 0x437f, 0x437f, 0x4380, 0x4380, 0x4380, - 0x4380, 0x4380, 0x4380, 0x4380, 0x4380, 0x4381, 0x4381, 0x4381, - 0x4381, 0x4381, 0x4381, 0x4381, 0x4382, 0x4382, 0x4382, 0x4382, - 0x4382, 0x4382, 0x4382, 0x4383, 0x4383, 0x4383, 0x4383, 0x4383, - 0x4383, 0x4383, 0x4383, 0x4384, 0x4384, 0x4384, 0x4384, 0x4384, - 0x4384, 0x4384, 0x4385, 0x4385, 0x4385, 0x4385, 0x4385, 0x4385, - 0x4385, 0x4385, 0x4386, 0x4386, 0x4386, 0x4386, 0x4386, 0x4386, - 0x4386, 0x4387, 0x4387, 0x4387, 0x4387, 0x4387, 0x4387, 0x4387, - 0x4387, 0x4388, 0x4388, 0x4388, 0x4388, 0x4388, 0x4388, 0x4388, - 0x4389, 0x4389, 0x4389, 0x4389, 0x4389, 0x4389, 0x4389, 0x4389, - 0x438a, 0x438a, 0x438a, 0x438a, 0x438a, 0x438a, 0x438a, 0x438b, - 0x438b, 0x438b, 0x438b, 0x438b, 0x438b, 0x438b, 0x438b, 0x438c, - 0x438c, 0x438c, 0x438c, 0x438c, 0x438c, 0x438c, 0x438c, 0x438d, - 0x438d, 0x438d, 0x438d, 0x438d, 0x438d, 0x438d, 0x438e, 0x438e, - 0x438e, 0x438e, 0x438e, 0x438e, 0x438e, 0x438e, 0x438f, 0x438f, - 0x438f, 0x438f, 0x438f, 0x438f, 0x438f, 0x438f, 0x4390, 0x4390, - 0x4390, 0x4390, 0x4390, 0x4390, 0x4390, 0x4390, 0x4391, 0x4391, - 0x4391, 0x4391, 0x4391, 0x4391, 0x4391, 0x4392, 0x4392, 0x4392, - 0x4392, 0x4392, 0x4392, 0x4392, 0x4392, 0x4393, 0x4393, 0x4393, - 0x4393, 0x4393, 0x4393, 0x4393, 0x4393, 0x4394, 0x4394, 0x4394, - 0x4394, 0x4394, 0x4394, 0x4394, 0x4394, 0x4395, 0x4395, 0x4395, - 0x4395, 0x4395, 0x4395, 0x4395, 0x4395, 0x4396, 0x4396, 0x4396, - 0x4396, 0x4396, 0x4396, 0x4396, 0x4396, 0x4397, 0x4397, 0x4397, - 0x4397, 0x4397, 0x4397, 0x4397, 0x4397, 0x4398, 0x4398, 0x4398, - 0x4398, 0x4398, 0x4398, 0x4398, 0x4398, 0x4399, 0x4399, 0x4399, - 0x4399, 0x4399, 0x4399, 0x4399, 0x4399, 0x439a, 0x439a, 0x439a, - 0x439a, 0x439a, 0x439a, 0x439a, 0x439a, 0x439a, 0x439b, 0x439b, - 0x439b, 0x439b, 0x439b, 0x439b, 0x439b, 0x439b, 0x439c, 0x439c, - 0x439c, 0x439c, 0x439c, 0x439c, 0x439c, 0x439c, 0x439d, 0x439d, - 0x439d, 0x439d, 0x439d, 0x439d, 0x439d, 0x439d, 0x439e, 0x439e, - 0x439e, 0x439e, 0x439e, 0x439e, 0x439e, 0x439e, 0x439e, 0x439f, - 0x439f, 0x439f, 0x439f, 0x439f, 0x439f, 0x439f, 0x439f, 0x43a0, - 0x43a0, 0x43a0, 0x43a0, 0x43a0, 0x43a0, 0x43a0, 0x43a0, 0x43a1, - 0x43a1, 0x43a1, 0x43a1, 0x43a1, 0x43a1, 0x43a1, 0x43a1, 0x43a1, - 0x43a2, 0x43a2, 0x43a2, 0x43a2, 0x43a2, 0x43a2, 0x43a2, 0x43a2, - 0x43a3, 0x43a3, 0x43a3, 0x43a3, 0x43a3, 0x43a3, 0x43a3, 0x43a3, - 0x43a3, 0x43a4, 0x43a4, 0x43a4, 0x43a4, 0x43a4, 0x43a4, 0x43a4, - 0x43a4, 0x43a5, 0x43a5, 0x43a5, 0x43a5, 0x43a5, 0x43a5, 0x43a5, - 0x43a5, 0x43a5, 0x43a6, 0x43a6, 0x43a6, 0x43a6, 0x43a6, 0x43a6, - 0x43a6, 0x43a6, 0x43a7, 0x43a7, 0x43a7, 0x43a7, 0x43a7, 0x43a7, - 0x43a7, 0x43a7, 0x43a7, 0x43a8, 0x43a8, 0x43a8, 0x43a8, 0x43a8, - 0x43a8, 0x43a8, 0x43a8, 0x43a9, 0x43a9, 0x43a9, 0x43a9, 0x43a9, - 0x43a9, 0x43a9, 0x43a9, 0x43a9, 0x43aa, 0x43aa, 0x43aa, 0x43aa, - 0x43aa, 0x43aa, 0x43aa, 0x43aa, 0x43aa, 0x43ab, 0x43ab, 0x43ab, - 0x43ab, 0x43ab, 0x43ab, 0x43ab, 0x43ab, 0x43ab, 0x43ac, 0x43ac, - 0x43ac, 0x43ac, 0x43ac, 0x43ad, 0x43ad, 0x43ad, 0x43ad, 0x43ad, - 0x43ae, 0x43ae, 0x43ae, 0x43ae, 0x43af, 0x43af, 0x43af, 0x43af, - 0x43af, 0x43b0, 0x43b0, 0x43b0, 0x43b0, 0x43b1, 0x43b1, 0x43b1, - 0x43b1, 0x43b1, 0x43b2, 0x43b2, 0x43b2, 0x43b2, 0x43b3, 0x43b3, - 0x43b3, 0x43b3, 0x43b3, 0x43b4, 0x43b4, 0x43b4, 0x43b4, 0x43b5, - 0x43b5, 0x43b5, 0x43b5, 0x43b5, 0x43b6, 0x43b6, 0x43b6, 0x43b6, - 0x43b6, 0x43b7, 0x43b7, 0x43b7, 0x43b7, 0x43b8, 0x43b8, 0x43b8, - 0x43b8, 0x43b8, 0x43b9, 0x43b9, 0x43b9, 0x43b9, 0x43ba, 0x43ba, - 0x43ba, 0x43ba, 0x43ba, 0x43bb, 0x43bb, 0x43bb, 0x43bb, 0x43bb, - 0x43bc, 0x43bc, 0x43bc, 0x43bc, 0x43bc, 0x43bd, 0x43bd, 0x43bd, - 0x43bd, 0x43be, 0x43be, 0x43be, 0x43be, 0x43be, 0x43bf, 0x43bf, - 0x43bf, 0x43bf, 0x43bf, 0x43c0, 0x43c0, 0x43c0, 0x43c0, 0x43c0, - 0x43c1, 0x43c1, 0x43c1, 0x43c1, 0x43c2, 0x43c2, 0x43c2, 0x43c2, - 0x43c2, 0x43c3, 0x43c3, 0x43c3, 0x43c3, 0x43c3, 0x43c4, 0x43c4, - 0x43c4, 0x43c4, 0x43c4, 0x43c5, 0x43c5, 0x43c5, 0x43c5, 0x43c5, - 0x43c6, 0x43c6, 0x43c6, 0x43c6, 0x43c6, 0x43c7, 0x43c7, 0x43c7, - 0x43c7, 0x43c7, 0x43c8, 0x43c8, 0x43c8, 0x43c8, 0x43c8, 0x43c9, - 0x43c9, 0x43c9, 0x43c9, 0x43c9, 0x43ca, 0x43ca, 0x43ca, 0x43ca, - 0x43ca, 0x43cb, 0x43cb, 0x43cb, 0x43cb, 0x43cb, 0x43cc, 0x43cc, - 0x43cc, 0x43cc, 0x43cc, 0x43cd, 0x43cd, 0x43cd, 0x43cd, 0x43cd, - 0x43ce, 0x43ce, 0x43ce, 0x43ce, 0x43ce, 0x43cf, 0x43cf, 0x43cf, - 0x43cf, 0x43cf, 0x43d0, 0x43d0, 0x43d0, 0x43d0, 0x43d0, 0x43d1, - 0x43d1, 0x43d1, 0x43d1, 0x43d1, 0x43d2, 0x43d2, 0x43d2, 0x43d2, - 0x43d2, 0x43d2, 0x43d3, 0x43d3, 0x43d3, 0x43d3, 0x43d3, 0x43d4, - 0x43d4, 0x43d4, 0x43d4, 0x43d4, 0x43d5, 0x43d5, 0x43d5, 0x43d5, - 0x43d5, 0x43d6, 0x43d6, 0x43d6, 0x43d6, 0x43d6, 0x43d6, 0x43d7, - 0x43d7, 0x43d7, 0x43d7, 0x43d7, 0x43d8, 0x43d8, 0x43d8, 0x43d8, - 0x43d8, 0x43d9, 0x43d9, 0x43d9, 0x43d9, 0x43d9, 0x43d9, 0x43da, - 0x43da, 0x43da, 0x43da, 0x43da, 0x43db, 0x43db, 0x43db, 0x43db, - 0x43db, 0x43dc, 0x43dc, 0x43dc, 0x43dc, 0x43dc, 0x43dc, 0x43dd, - 0x43dd, 0x43dd, 0x43dd, 0x43dd, 0x43de, 0x43de, 0x43de, 0x43de, - 0x43de, 0x43de, 0x43df, 0x43df, 0x43df, 0x43df, 0x43df, 0x43e0, - 0x43e0, 0x43e0, 0x43e0, 0x43e0, 0x43e0, 0x43e1, 0x43e1, 0x43e1, - 0x43e1, 0x43e1, 0x43e2, 0x43e2, 0x43e2, 0x43e2, 0x43e2, 0x43e2, - 0x43e3, 0x43e3, 0x43e3, 0x43e3, 0x43e3, 0x43e4, 0x43e4, 0x43e4, - 0x43e4, 0x43e4, 0x43e4, 0x43e5, 0x43e5, 0x43e5, 0x43e5, 0x43e5, - 0x43e6, 0x43e6, 0x43e6, 0x43e6, 0x43e6, 0x43e6, 0x43e7, 0x43e7, - 0x43e7, 0x43e7, 0x43e7, 0x43e7, 0x43e8, 0x43e8, 0x43e8, 0x43e8, - 0x43e8, 0x43e9, 0x43e9, 0x43e9, 0x43e9, 0x43e9, 0x43e9, 0x43ea, - 0x43ea, 0x43ea, 0x43ea, 0x43ea, 0x43ea, 0x43eb, 0x43eb, 0x43eb, - 0x43eb, 0x43eb, 0x43eb, 0x43ec, 0x43ec, 0x43ec, 0x43ec, 0x43ec, - 0x43ec, 0x43ed, 0x43ed, 0x43ed, 0x43ed, 0x43ed, 0x43ee, 0x43ee, - 0x43ee, 0x43ee, 0x43ee, 0x43ee, 0x43ef, 0x43ef, 0x43ef, 0x43ef, - 0x43ef, 0x43ef, 0x43f0, 0x43f0, 0x43f0, 0x43f0, 0x43f0, 0x43f0, - 0x43f1, 0x43f1, 0x43f1, 0x43f1, 0x43f1, 0x43f1, 0x43f2, 0x43f2, - 0x43f2, 0x43f2, 0x43f2, 0x43f2, 0x43f3, 0x43f3, 0x43f3, 0x43f3, - 0x43f3, 0x43f3, 0x43f4, 0x43f4, 0x43f4, 0x43f4, 0x43f4, 0x43f4, - 0x43f5, 0x43f5, 0x43f5, 0x43f5, 0x43f5, 0x43f5, 0x43f6, 0x43f6, - 0x43f6, 0x43f6, 0x43f6, 0x43f6, 0x43f7, 0x43f7, 0x43f7, 0x43f7, - 0x43f7, 0x43f7, 0x43f8, 0x43f8, 0x43f8, 0x43f8, 0x43f8, 0x43f8, - 0x43f9, 0x43f9, 0x43f9, 0x43f9, 0x43f9, 0x43f9, 0x43fa, 0x43fa, - 0x43fa, 0x43fa, 0x43fa, 0x43fa, 0x43fb, 0x43fb, 0x43fb, 0x43fb, - 0x43fb, 0x43fb, 0x43fb, 0x43fc, 0x43fc, 0x43fc, 0x43fc, 0x43fc, - 0x43fc, 0x43fd, 0x43fd, 0x43fd, 0x43fd, 0x43fd, 0x43fd, 0x43fe, - 0x43fe, 0x43fe, 0x43fe, 0x43fe, 0x43fe, 0x43ff, 0x43ff, 0x43ff, - 0x43ff, 0x43ff, 0x43ff, 0x43ff, 0x4400, 0x4400, 0x4400, 0x4400, - 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x4401, 0x4401, 0x4401, - 0x4401, 0x4401, 0x4401, 0x4401, 0x4401, 0x4401, 0x4401, 0x4401, - 0x4401, 0x4401, 0x4402, 0x4402, 0x4402, 0x4402, 0x4402, 0x4402, - 0x4402, 0x4402, 0x4402, 0x4402, 0x4402, 0x4402, 0x4402, 0x4403, - 0x4403, 0x4403, 0x4403, 0x4403, 0x4403, 0x4403, 0x4403, 0x4403, - 0x4403, 0x4403, 0x4403, 0x4403, 0x4404, 0x4404, 0x4404, 0x4404, - 0x4404, 0x4404, 0x4404, 0x4404, 0x4404, 0x4404, 0x4404, 0x4404, - 0x4404, 0x4405, 0x4405, 0x4405, 0x4405, 0x4405, 0x4405, 0x4405, - 0x4405, 0x4405, 0x4405, 0x4405, 0x4405, 0x4405, 0x4406, 0x4406, - 0x4406, 0x4406, 0x4406, 0x4406, 0x4406, 0x4406, 0x4406, 0x4406, - 0x4406, 0x4406, 0x4406, 0x4407, 0x4407, 0x4407, 0x4407, 0x4407, - 0x4407, 0x4407, 0x4407, 0x4407, 0x4407, 0x4407, 0x4407, 0x4407, - 0x4407, 0x4408, 0x4408, 0x4408, 0x4408, 0x4408, 0x4408, 0x4408, - 0x4408, 0x4408, 0x4408, 0x4408, 0x4408, 0x4408, 0x4409, 0x4409, - 0x4409, 0x4409, 0x4409, 0x4409, 0x4409, 0x4409, 0x4409, 0x4409, - 0x4409, 0x4409, 0x4409, 0x4409, 0x440a, 0x440a, 0x440a, 0x440a, - 0x440a, 0x440a, 0x440a, 0x440a, 0x440a, 0x440a, 0x440a, 0x440a, - 0x440a, 0x440a, 0x440b, 0x440b, 0x440b, 0x440b, 0x440b, 0x440b, - 0x440b, 0x440b, 0x440b, 0x440b, 0x440b, 0x440b, 0x440b, 0x440c, - 0x440c, 0x440c, 0x440c, 0x440c, 0x440c, 0x440c, 0x440c, 0x440c, - 0x440c, 0x440c, 0x440c, 0x440c, 0x440c, 0x440d, 0x440d, 0x440d, - 0x440d, 0x440d, 0x440d, 0x440d, 0x440d, 0x440d, 0x440d, 0x440d, - 0x440d, 0x440d, 0x440d, 0x440d, 0x440e, 0x440e, 0x440e, 0x440e, - 0x440e, 0x440e, 0x440e, 0x440e, 0x440e, 0x440e, 0x440e, 0x440e, - 0x440e, 0x440e, 0x440f, 0x440f, 0x440f, 0x440f, 0x440f, 0x440f, - 0x440f, 0x440f, 0x440f, 0x440f, 0x440f, 0x440f, 0x440f, 0x440f, - 0x4410, 0x4410, 0x4410, 0x4410, 0x4410, 0x4410, 0x4410, 0x4410, - 0x4410, 0x4410, 0x4410, 0x4410, 0x4410, 0x4410, 0x4410, 0x4411, - 0x4411, 0x4411, 0x4411, 0x4411, 0x4411, 0x4411, 0x4411, 0x4411, - 0x4411, 0x4411, 0x4411, 0x4411, 0x4411, 0x4412, 0x4412, 0x4412, - 0x4412, 0x4412, 0x4412, 0x4412, 0x4412, 0x4412, 0x4412, 0x4412, - 0x4412, 0x4412, 0x4412, 0x4412, 0x4413, 0x4413, 0x4413, 0x4413, - 0x4413, 0x4413, 0x4413, 0x4413, 0x4413, 0x4413, 0x4413, 0x4413, - 0x4413, 0x4413, 0x4413, 0x4414, 0x4414, 0x4414, 0x4414, 0x4414, - 0x4414, 0x4414, 0x4414, 0x4414, 0x4414, 0x4414, 0x4414, 0x4414, - 0x4414, 0x4414, 0x4415, 0x4415, 0x4415, 0x4415, 0x4415, 0x4415, - 0x4415, 0x4415, 0x4415, 0x4415, 0x4415, 0x4415, 0x4415, 0x4415, - 0x4415, 0x4416, 0x4416, 0x4416, 0x4416, 0x4416, 0x4416, 0x4416, - 0x4416, 0x4416, 0x4416, 0x4416, 0x4416, 0x4416, 0x4416, 0x4416, - 0x4417, 0x4417, 0x4417, 0x4417, 0x4417, 0x4417, 0x4417, 0x4417, - 0x4417, 0x4417, 0x4417, 0x4417, 0x4417, 0x4417, 0x4417, 0x4417, - 0x4418, 0x4418, 0x4418, 0x4418, 0x4418, 0x4418, 0x4418, 0x4418, - 0x4418, 0x4418, 0x4418, 0x4418, 0x4418, 0x4418, 0x4418, 0x4419, - 0x4419, 0x4419, 0x4419, 0x4419, 0x4419, 0x4419, 0x4419, 0x4419, - 0x4419, 0x4419, 0x4419, 0x4419, 0x4419, 0x4419, 0x4419, 0x441a, - 0x441a, 0x441a, 0x441a, 0x441a, 0x441a, 0x441a, 0x441a, 0x441a, - 0x441a, 0x441a, 0x441a, 0x441a, 0x441a, 0x441a, 0x441a, 0x441b, - 0x441b, 0x441b, 0x441b, 0x441b, 0x441b, 0x441b, 0x441b, 0x441b, - 0x441b, 0x441b, 0x441b, 0x441b, 0x441b, 0x441b, 0x441b, 0x441c, - 0x441c, 0x441c, 0x441c, 0x441c, 0x441c, 0x441c, 0x441c, 0x441c, - 0x441c, 0x441c, 0x441c, 0x441c, 0x441c, 0x441c, 0x441c, 0x441d, - 0x441d, 0x441d, 0x441d, 0x441d, 0x441d, 0x441d, 0x441d, 0x441d, - 0x441d, 0x441d, 0x441d, 0x441d, 0x441d, 0x441d, 0x441d, 0x441e, - 0x441e, 0x441e, 0x441e, 0x441e, 0x441e, 0x441e, 0x441e, 0x441e, - 0x441e, 0x441e, 0x441e, 0x441e, 0x441e, 0x441e, 0x441e, 0x441f, - 0x441f, 0x441f, 0x441f, 0x441f, 0x441f, 0x441f, 0x441f, 0x441f, - 0x441f, 0x441f, 0x441f, 0x441f, 0x441f, 0x441f, 0x441f, 0x441f, - 0x4420, 0x4420, 0x4420, 0x4420, 0x4420, 0x4420, 0x4420, 0x4420, - 0x4420, 0x4420, 0x4420, 0x4420, 0x4420, 0x4420, 0x4420, 0x4420, - 0x4421, 0x4421, 0x4421, 0x4421, 0x4421, 0x4421, 0x4421, 0x4421, - 0x4421, 0x4421, 0x4421, 0x4421, 0x4421, 0x4421, 0x4421, 0x4421, - 0x4421, 0x4422, 0x4422, 0x4422, 0x4422, 0x4422, 0x4422, 0x4422, - 0x4422, 0x4422, 0x4422, 0x4422, 0x4422, 0x4422, 0x4422, 0x4422, - 0x4422, 0x4422, 0x4423, 0x4423, 0x4423, 0x4423, 0x4423, 0x4423, - 0x4423, 0x4423, 0x4423, 0x4423, 0x4423, 0x4423, 0x4423, 0x4423, - 0x4423, 0x4423, 0x4423, 0x4424, 0x4424, 0x4424, 0x4424, 0x4424, - 0x4424, 0x4424, 0x4424, 0x4424, 0x4424, 0x4424, 0x4424, 0x4424, - 0x4424, 0x4424, 0x4424, 0x4424, 0x4425, 0x4425, 0x4425, 0x4425, - 0x4425, 0x4425, 0x4425, 0x4425, 0x4425, 0x4425, 0x4425, 0x4425, - 0x4425, 0x4425, 0x4425, 0x4425, 0x4425, 0x4425, 0x4426, 0x4426, - 0x4426, 0x4426, 0x4426, 0x4426, 0x4426, 0x4426, 0x4426, 0x4426, - 0x4426, 0x4426, 0x4426, 0x4426, 0x4426, 0x4426, 0x4426, 0x4427, - 0x4427, 0x4427, 0x4427, 0x4427, 0x4427, 0x4427, 0x4427, 0x4427, - 0x4427, 0x4428, 0x4428, 0x4428, 0x4428, 0x4428, 0x4428, 0x4428, - 0x4428, 0x4428, 0x4429, 0x4429, 0x4429, 0x4429, 0x4429, 0x4429, - 0x4429, 0x4429, 0x4429, 0x442a, 0x442a, 0x442a, 0x442a, 0x442a, - 0x442a, 0x442a, 0x442a, 0x442a, 0x442b, 0x442b, 0x442b, 0x442b, - 0x442b, 0x442b, 0x442b, 0x442b, 0x442b, 0x442c, 0x442c, 0x442c, - 0x442c, 0x442c, 0x442c, 0x442c, 0x442c, 0x442c, 0x442d, 0x442d, - 0x442d, 0x442d, 0x442d, 0x442d, 0x442d, 0x442d, 0x442d, 0x442e, - 0x442e, 0x442e, 0x442e, 0x442e, 0x442e, 0x442e, 0x442e, 0x442e, - 0x442e, 0x442f, 0x442f, 0x442f, 0x442f, 0x442f, 0x442f, 0x442f, - 0x442f, 0x442f, 0x4430, 0x4430, 0x4430, 0x4430, 0x4430, 0x4430, - 0x4430, 0x4430, 0x4430, 0x4430, 0x4431, 0x4431, 0x4431, 0x4431, - 0x4431, 0x4431, 0x4431, 0x4431, 0x4431, 0x4432, 0x4432, 0x4432, - 0x4432, 0x4432, 0x4432, 0x4432, 0x4432, 0x4432, 0x4432, 0x4433, - 0x4433, 0x4433, 0x4433, 0x4433, 0x4433, 0x4433, 0x4433, 0x4433, - 0x4433, 0x4434, 0x4434, 0x4434, 0x4434, 0x4434, 0x4434, 0x4434, - 0x4434, 0x4434, 0x4434, 0x4435, 0x4435, 0x4435, 0x4435, 0x4435, - 0x4435, 0x4435, 0x4435, 0x4435, 0x4435, 0x4436, 0x4436, 0x4436, - 0x4436, 0x4436, 0x4436, 0x4436, 0x4436, 0x4436, 0x4436, 0x4437, - 0x4437, 0x4437, 0x4437, 0x4437, 0x4437, 0x4437, 0x4437, 0x4437, - 0x4437, 0x4438, 0x4438, 0x4438, 0x4438, 0x4438, 0x4438, 0x4438, - 0x4438, 0x4438, 0x4438, 0x4439, 0x4439, 0x4439, 0x4439, 0x4439, - 0x4439, 0x4439, 0x4439, 0x4439, 0x4439, 0x443a, 0x443a, 0x443a, - 0x443a, 0x443a, 0x443a, 0x443a, 0x443a, 0x443a, 0x443a, 0x443a, - 0x443b, 0x443b, 0x443b, 0x443b, 0x443b, 0x443b, 0x443b, 0x443b, - 0x443b, 0x443b, 0x443c, 0x443c, 0x443c, 0x443c, 0x443c, 0x443c, - 0x443c, 0x443c, 0x443c, 0x443c, 0x443c, 0x443d, 0x443d, 0x443d, - 0x443d, 0x443d, 0x443d, 0x443d, 0x443d, 0x443d, 0x443d, 0x443d, - 0x443e, 0x443e, 0x443e, 0x443e, 0x443e, 0x443e, 0x443e, 0x443e, - 0x443e, 0x443e, 0x443f, 0x443f, 0x443f, 0x443f, 0x443f, 0x443f, - 0x443f, 0x443f, 0x443f, 0x443f, 0x443f, 0x4440, 0x4440, 0x4440, - 0x4440, 0x4440, 0x4440, 0x4440, 0x4440, 0x4440, 0x4440, 0x4440, - 0x4441, 0x4441, 0x4441, 0x4441, 0x4441, 0x4441, 0x4441, 0x4441, - 0x4441, 0x4441, 0x4441, 0x4442, 0x4442, 0x4442, 0x4442, 0x4442, - 0x4442, 0x4442, 0x4442, 0x4442, 0x4442, 0x4442, 0x4443, 0x4443, - 0x4443, 0x4443, 0x4443, 0x4443, 0x4443, 0x4443, 0x4443, 0x4443, - 0x4443, 0x4443, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, - 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4445, 0x4445, 0x4445, - 0x4445, 0x4445, 0x4445, 0x4445, 0x4445, 0x4445, 0x4445, 0x4445, - 0x4446, 0x4446, 0x4446, 0x4446, 0x4446, 0x4446, 0x4446, 0x4446, - 0x4446, 0x4446, 0x4446, 0x4446, 0x4447, 0x4447, 0x4447, 0x4447, - 0x4447, 0x4447, 0x4447, 0x4447, 0x4447, 0x4447, 0x4447, 0x4448, - 0x4448, 0x4448, 0x4448, 0x4448, 0x4448, 0x4448, 0x4448, 0x4448, - 0x4448, 0x4448, 0x4448, 0x4449, 0x4449, 0x4449, 0x4449, 0x4449, - 0x4449, 0x4449, 0x4449, 0x4449, 0x4449, 0x4449, 0x4449, 0x444a, - 0x444a, 0x444a, 0x444a, 0x444a, 0x444a, 0x444a, 0x444a, 0x444a, - 0x444a, 0x444a, 0x444a, 0x444b, 0x444b, 0x444b, 0x444b, 0x444b, - 0x444b, 0x444b, 0x444b, 0x444b, 0x444b, 0x444b, 0x444b, 0x444c, - 0x444c, 0x444c, 0x444c, 0x444c, 0x444c, 0x444c, 0x444c, 0x444c, - 0x444c, 0x444c, 0x444c, 0x444d, 0x444d, 0x444d, 0x444d, 0x444d, - 0x444d, 0x444d, 0x444d, 0x444d, 0x444d, 0x444d, 0x444d, 0x444e, - 0x444e, 0x444e, 0x444e, 0x444e, 0x444e, 0x444e, 0x444e, 0x444e, - 0x444e, 0x444e, 0x444e, 0x444e, 0x444f, 0x444f, 0x444f, 0x444f, - 0x444f, 0x444f, 0x444f, 0x444f, 0x444f, 0x444f, 0x444f, 0x444f, - 0x4450, 0x4450, 0x4450, 0x4450, 0x4450, 0x4450, 0x4450, 0x4450, - 0x4450, 0x4450, 0x4450, 0x4450, 0x4450, 0x4451, 0x4451, 0x4451, - 0x4451, 0x4451, 0x4451, 0x4451, 0x4451, 0x4451, 0x4451, 0x4451, - 0x4451, 0x4452, 0x4452, 0x4452, 0x4452, 0x4452, 0x4452, 0x4452, - 0x4452, 0x4452, 0x4452, 0x4452, 0x4452, 0x4452, 0x4453, 0x4453, - 0x4453, 0x4453, 0x4453, 0x4453, 0x4453, 0x4453, 0x4453, 0x4453, - 0x4453, 0x4453, 0x4453, 0x4454, 0x4454, 0x4454, 0x4454, 0x4454, - 0x4454, 0x4454, 0x4454, 0x4454, 0x4454, 0x4454, 0x4454, 0x4454, - 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, - 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, 0x4456, 0x4456, 0x4456, - 0x4456, 0x4456, 0x4456, 0x4456, 0x4456, 0x4456, 0x4456, 0x4456, - 0x4456, 0x4456, 0x4457, 0x4457, 0x4457, 0x4457, 0x4457, 0x4457, - 0x4457, 0x4457, 0x4457, 0x4457, 0x4457, 0x4457, 0x4457, 0x4457, - 0x4458, 0x4458, 0x4458, 0x4458, 0x4458, 0x4458, 0x4458, 0x4458, - 0x4458, 0x4458, 0x4458, 0x4458, 0x4458, 0x4459, 0x4459, 0x4459, - 0x4459, 0x4459, 0x4459, 0x4459, 0x4459, 0x4459, 0x4459, 0x4459, - 0x4459, 0x4459, 0x4459, 0x445a, 0x445a, 0x445a, 0x445a, 0x445a, - 0x445a, 0x445a, 0x445a, 0x445a, 0x445a, 0x445a, 0x445a, 0x445a, - 0x445b, 0x445b, 0x445b, 0x445b, 0x445b, 0x445b, 0x445b, 0x445b, - 0x445b, 0x445b, 0x445b, 0x445b, 0x445b, 0x445b, 0x445c, 0x445c, - 0x445c, 0x445c, 0x445c, 0x445c, 0x445c, 0x445c, 0x445c, 0x445c, - 0x445c, 0x445c, 0x445c, 0x445c, 0x445d, 0x445d, 0x445d, 0x445d, - 0x445d, 0x445d, 0x445d, 0x445d, 0x445d, 0x445d, 0x445d, 0x445d, - 0x445d, 0x445d, 0x445e, 0x445e, 0x445e, 0x445e, 0x445e, 0x445e, - 0x445e, 0x445e, 0x445e, 0x445e, 0x445e, 0x445e, 0x445e, 0x445e, - 0x445f, 0x445f, 0x445f, 0x445f, 0x445f, 0x445f, 0x445f, 0x445f, - 0x445f, 0x445f, 0x445f, 0x445f, 0x445f, 0x445f, 0x445f, 0x4460, - 0x4460, 0x4460, 0x4460, 0x4460, 0x4460, 0x4460, 0x4460, 0x4460, - 0x4460, 0x4460, 0x4460, 0x4460, 0x4460, 0x4461, 0x4461, 0x4461, - 0x4461, 0x4461, 0x4461, 0x4461, 0x4461, 0x4461, 0x4461, 0x4461, - 0x4461, 0x4461, 0x4461, 0x4461, 0x4462, 0x4462, 0x4462, 0x4462, - 0x4462, 0x4462, 0x4462, 0x4462, 0x4462, 0x4462, 0x4462, 0x4462, - 0x4462, 0x4462, 0x4463, 0x4463, 0x4463, 0x4463, 0x4463, 0x4463, - 0x4463, 0x4463, 0x4463, 0x4463, 0x4463, 0x4463, 0x4463, 0x4463, - 0x4463, 0x4464, 0x4464, 0x4464, 0x4464, 0x4464, 0x4464, 0x4464, - 0x4464, 0x4464, 0x4464, 0x4464, 0x4464, 0x4464, 0x4464, 0x4464, - 0x4465, 0x4465, 0x4465, 0x4465, 0x4465, 0x4465, 0x4465, 0x4465, - 0x4465, 0x4465, 0x4465, 0x4465, 0x4465, 0x4465, 0x4465, 0x4466, - 0x4466, 0x4466, 0x4466, 0x4466, 0x4466, 0x4466, 0x4466, 0x4466, - 0x4466, 0x4466, 0x4466, 0x4466, 0x4466, 0x4466, 0x4467, 0x4467, - 0x4467, 0x4467, 0x4467, 0x4467, 0x4467, 0x4467, 0x4467, 0x4467, - 0x4467, 0x4467, 0x4467, 0x4467, 0x4467, 0x4467, 0x4468, 0x4468, - 0x4468, 0x4468, 0x4468, 0x4468, 0x4468, 0x4468, 0x4468, 0x4468, - 0x4468, 0x4468, 0x4468, 0x4468, 0x4468, 0x4469, 0x4469, 0x4469, - 0x4469, 0x4469, 0x4469, 0x4469, 0x4469, 0x4469, 0x4469, 0x4469, - 0x4469, 0x4469, 0x4469, 0x4469, 0x4469, 0x446a, 0x446a, 0x446a, - 0x446a, 0x446a, 0x446a, 0x446a, 0x446a, 0x446a, 0x446a, 0x446a, - 0x446a, 0x446a, 0x446a, 0x446a, 0x446b, 0x446b, 0x446b, 0x446b, - 0x446b, 0x446b, 0x446b, 0x446b, 0x446b, 0x446b, 0x446b, 0x446b, - 0x446b, 0x446b, 0x446b, 0x446b, 0x446c, 0x446c, 0x446c, 0x446c, - 0x446c, 0x446c, 0x446c, 0x446c, 0x446c, 0x446c, 0x446c, 0x446c, - 0x446c, 0x446c, 0x446c, 0x446c, 0x446d, 0x446d, 0x446d, 0x446d, - 0x446d, 0x446d, 0x446d, 0x446d, 0x446d, 0x446d, 0x446d, 0x446d, - 0x446d, 0x446d, 0x446d, 0x446d, 0x446e, 0x446e, 0x446e, 0x446e, - 0x446e, 0x446e, 0x446e, 0x446e, 0x446e, 0x446e, 0x446e, 0x446e, - 0x446e, 0x446e, 0x446e, 0x446e, 0x446e, 0x446f, 0x446f, 0x446f, - 0x446f, 0x446f, 0x446f, 0x446f, 0x446f, 0x446f, 0x446f, 0x446f, - 0x446f, 0x446f, 0x446f, 0x446f, 0x446f, 0x4470, 0x4470, 0x4470, - 0x4470, 0x4470, 0x4470, 0x4470, 0x4470, 0x4470, 0x4470, 0x4470, - 0x4470, 0x4470, 0x4470, 0x4470, 0x4470, 0x4471, 0x4471, 0x4471, - 0x4471, 0x4471, 0x4471, 0x4471, 0x4471, 0x4471, 0x4471, 0x4471, - 0x4471, 0x4471, 0x4471, 0x4471, 0x4471, 0x4471, 0x4472, 0x4472, - 0x4472, 0x4472, 0x4472, 0x4472, 0x4472, 0x4472, 0x4472, 0x4472, - 0x4472, 0x4472, 0x4472, 0x4472, 0x4472, 0x4472, 0x4472, 0x4473, - 0x4473, 0x4473, 0x4473, 0x4473, 0x4473, 0x4473, 0x4473, 0x4473, - 0x4473, 0x4473, 0x4473, 0x4473, 0x4473, 0x4473, 0x4473, 0x4473, - 0x4474, 0x4474, 0x4474, 0x4474, 0x4474, 0x4474, 0x4474, 0x4474, - 0x4474, 0x4474, 0x4474, 0x4474, 0x4474, 0x4474, 0x4474, 0x4474, - 0x4474, 0x4475, 0x4475, 0x4475, 0x4475, 0x4475, 0x4475, 0x4475, - 0x4475, 0x4475, 0x4475, 0x4475, 0x4475, 0x4475, 0x4475, 0x4475, - 0x4475, 0x4475, 0x4476, 0x4476, 0x4476, 0x4476, 0x4476, 0x4476, - 0x4476, 0x4476, 0x4476, 0x4476, 0x4476, 0x4476, 0x4476, 0x4476, - 0x4476, 0x4476, 0x4476, 0x4476, 0x4477, 0x4477, 0x4477, 0x4477, - 0x4477, 0x4477, 0x4477, 0x4477, 0x4477, 0x4477, 0x4477, 0x4477, - 0x4477, 0x4477, 0x4477, 0x4478, 0x4478, 0x4478, 0x4478, 0x4478, - 0x4478, 0x4478, 0x4478, 0x4478, 0x4479, 0x4479, 0x4479, 0x4479, - 0x4479, 0x4479, 0x4479, 0x4479, 0x4479, 0x447a, 0x447a, 0x447a, - 0x447a, 0x447a, 0x447a, 0x447a, 0x447a, 0x447a, 0x447b, 0x447b, - 0x447b, 0x447b, 0x447b, 0x447b, 0x447b, 0x447b, 0x447b, 0x447c, - 0x447c, 0x447c, 0x447c, 0x447c, 0x447c, 0x447c, 0x447c, 0x447c, - 0x447d, 0x447d, 0x447d, 0x447d, 0x447d, 0x447d, 0x447d, 0x447d, - 0x447d, 0x447e, 0x447e, 0x447e, 0x447e, 0x447e, 0x447e, 0x447e, - 0x447e, 0x447e, 0x447e, 0x447f, 0x447f, 0x447f, 0x447f, 0x447f, - 0x447f, 0x447f, 0x447f, 0x447f, 0x4480, 0x4480, 0x4480, 0x4480, - 0x4480, 0x4480, 0x4480, 0x4480, 0x4480, 0x4481, 0x4481, 0x4481, - 0x4481, 0x4481, 0x4481, 0x4481, 0x4481, 0x4481, 0x4481, 0x4482, - 0x4482, 0x4482, 0x4482, 0x4482, 0x4482, 0x4482, 0x4482, 0x4482, - 0x4482, 0x4483, 0x4483, 0x4483, 0x4483, 0x4483, 0x4483, 0x4483, - 0x4483, 0x4483, 0x4484, 0x4484, 0x4484, 0x4484, 0x4484, 0x4484, - 0x4484, 0x4484, 0x4484, 0x4484, 0x4485, 0x4485, 0x4485, 0x4485, - 0x4485, 0x4485, 0x4485, 0x4485, 0x4485, 0x4485, 0x4486, 0x4486, - 0x4486, 0x4486, 0x4486, 0x4486, 0x4486, 0x4486, 0x4486, 0x4486, - 0x4487, 0x4487, 0x4487, 0x4487, 0x4487, 0x4487, 0x4487, 0x4487, - 0x4487, 0x4487, 0x4488, 0x4488, 0x4488, 0x4488, 0x4488, 0x4488, - 0x4488, 0x4488, 0x4488, 0x4488, 0x4489, 0x4489, 0x4489, 0x4489, - 0x4489, 0x4489, 0x4489, 0x4489, 0x4489, 0x4489, 0x4489, 0x448a, - 0x448a, 0x448a, 0x448a, 0x448a, 0x448a, 0x448a, 0x448a, 0x448a, - 0x448a, 0x448b, 0x448b, 0x448b, 0x448b, 0x448b, 0x448b, 0x448b, - 0x448b, 0x448b, 0x448b, 0x448c, 0x448c, 0x448c, 0x448c, 0x448c, - 0x448c, 0x448c, 0x448c, 0x448c, 0x448c, 0x448c, 0x448d, 0x448d, - 0x448d, 0x448d, 0x448d, 0x448d, 0x448d, 0x448d, 0x448d, 0x448d, - 0x448d, 0x448e, 0x448e, 0x448e, 0x448e, 0x448e, 0x448e, 0x448e, - 0x448e, 0x448e, 0x448e, 0x448f, 0x448f, 0x448f, 0x448f, 0x448f, - 0x448f, 0x448f, 0x448f, 0x448f, 0x448f, 0x448f, 0x4490, 0x4490, - 0x4490, 0x4490, 0x4490, 0x4490, 0x4490, 0x4490, 0x4490, 0x4490, - 0x4490, 0x4491, 0x4491, 0x4491, 0x4491, 0x4491, 0x4491, 0x4491, - 0x4491, 0x4491, 0x4491, 0x4491, 0x4492, 0x4492, 0x4492, 0x4492, - 0x4492, 0x4492, 0x4492, 0x4492, 0x4492, 0x4492, 0x4492, 0x4493, - 0x4493, 0x4493, 0x4493, 0x4493, 0x4493, 0x4493, 0x4493, 0x4493, - 0x4493, 0x4493, 0x4494, 0x4494, 0x4494, 0x4494, 0x4494, 0x4494, - 0x4494, 0x4494, 0x4494, 0x4494, 0x4494, 0x4495, 0x4495, 0x4495, - 0x4495, 0x4495, 0x4495, 0x4495, 0x4495, 0x4495, 0x4495, 0x4495, - 0x4495, 0x4496, 0x4496, 0x4496, 0x4496, 0x4496, 0x4496, 0x4496, - 0x4496, 0x4496, 0x4496, 0x4496, 0x4497, 0x4497, 0x4497, 0x4497, - 0x4497, 0x4497, 0x4497, 0x4497, 0x4497, 0x4497, 0x4497, 0x4497, - 0x4498, 0x4498, 0x4498, 0x4498, 0x4498, 0x4498, 0x4498, 0x4498, - 0x4498, 0x4498, 0x4498, 0x4499, 0x4499, 0x4499, 0x4499, 0x4499, - 0x4499, 0x4499, 0x4499, 0x4499, 0x4499, 0x4499, 0x4499, 0x449a, - 0x449a, 0x449a, 0x449a, 0x449a, 0x449a, 0x449a, 0x449a, 0x449a, - 0x449a, 0x449a, 0x449a, 0x449b, 0x449b, 0x449b, 0x449b, 0x449b, - 0x449b, 0x449b, 0x449b, 0x449b, 0x449b, 0x449b, 0x449b, 0x449c, - 0x449c, 0x449c, 0x449c, 0x449c, 0x449c, 0x449c, 0x449c, 0x449c, - 0x449c, 0x449c, 0x449c, 0x449d, 0x449d, 0x449d, 0x449d, 0x449d, - 0x449d, 0x449d, 0x449d, 0x449d, 0x449d, 0x449d, 0x449d, 0x449e, - 0x449e, 0x449e, 0x449e, 0x449e, 0x449e, 0x449e, 0x449e, 0x449e, - 0x449e, 0x449e, 0x449e, 0x449e, 0x449f, 0x449f, 0x449f, 0x449f, - 0x449f, 0x449f, 0x449f, 0x449f, 0x449f, 0x449f, 0x449f, 0x449f, - 0x44a0, 0x44a0, 0x44a0, 0x44a0, 0x44a0, 0x44a0, 0x44a0, 0x44a0, - 0x44a0, 0x44a0, 0x44a0, 0x44a0, 0x44a1, 0x44a1, 0x44a1, 0x44a1, - 0x44a1, 0x44a1, 0x44a1, 0x44a1, 0x44a1, 0x44a1, 0x44a1, 0x44a1, - 0x44a1, 0x44a2, 0x44a2, 0x44a2, 0x44a2, 0x44a2, 0x44a2, 0x44a2, - 0x44a2, 0x44a2, 0x44a2, 0x44a2, 0x44a2, 0x44a2, 0x44a3, 0x44a3, - 0x44a3, 0x44a3, 0x44a3, 0x44a3, 0x44a3, 0x44a3, 0x44a3, 0x44a3, - 0x44a3, 0x44a3, 0x44a3, 0x44a4, 0x44a4, 0x44a4, 0x44a4, 0x44a4, - 0x44a4, 0x44a4, 0x44a4, 0x44a4, 0x44a4, 0x44a4, 0x44a4, 0x44a5, - 0x44a5, 0x44a5, 0x44a5, 0x44a5, 0x44a5, 0x44a5, 0x44a5, 0x44a5, - 0x44a5, 0x44a5, 0x44a5, 0x44a5, 0x44a5, 0x44a6, 0x44a6, 0x44a6, - 0x44a6, 0x44a6, 0x44a6, 0x44a6, 0x44a6, 0x44a6, 0x44a6, 0x44a6, - 0x44a6, 0x44a6, 0x44a7, 0x44a7, 0x44a7, 0x44a7, 0x44a7, 0x44a7, - 0x44a7, 0x44a7, 0x44a7, 0x44a7, 0x44a7, 0x44a7, 0x44a7, 0x44a8, - 0x44a8, 0x44a8, 0x44a8, 0x44a8, 0x44a8, 0x44a8, 0x44a8, 0x44a8, - 0x44a8, 0x44a8, 0x44a8, 0x44a8, 0x44a9, 0x44a9, 0x44a9, 0x44a9, - 0x44a9, 0x44a9, 0x44a9, 0x44a9, 0x44a9, 0x44a9, 0x44a9, 0x44a9, - 0x44a9, 0x44a9, 0x44aa, 0x44aa, 0x44aa, 0x44aa, 0x44aa, 0x44aa, - 0x44aa, 0x44aa, 0x44aa, 0x44aa, 0x44aa, 0x44aa, 0x44aa, 0x44ab, - 0x44ab, 0x44ab, 0x44ab, 0x44ab, 0x44ab, 0x44ab, 0x44ab, 0x44ab, - 0x44ab, 0x44ab, 0x44ab, 0x44ab, 0x44ab, 0x44ac, 0x44ac, 0x44ac, - 0x44ac, 0x44ac, 0x44ac, 0x44ac, 0x44ac, 0x44ac, 0x44ac, 0x44ac, - 0x44ac, 0x44ac, 0x44ac, 0x44ad, 0x44ad, 0x44ad, 0x44ad, 0x44ad, - 0x44ad, 0x44ad, 0x44ad, 0x44ad, 0x44ad, 0x44ad, 0x44ad, 0x44ad, - 0x44ad, 0x44ae, 0x44ae, 0x44ae, 0x44ae, 0x44ae, 0x44ae, 0x44ae, - 0x44ae, 0x44ae, 0x44ae, 0x44ae, 0x44ae, 0x44ae, 0x44ae, 0x44af, - 0x44af, 0x44af, 0x44af, 0x44af, 0x44af, 0x44af, 0x44af, 0x44af, - 0x44af, 0x44af, 0x44af, 0x44af, 0x44af, 0x44b0, 0x44b0, 0x44b0, - 0x44b0, 0x44b0, 0x44b0, 0x44b0, 0x44b0, 0x44b0, 0x44b0, 0x44b0, - 0x44b0, 0x44b0, 0x44b0, 0x44b0, 0x44b1, 0x44b1, 0x44b1, 0x44b1, - 0x44b1, 0x44b1, 0x44b1, 0x44b1, 0x44b1, 0x44b1, 0x44b1, 0x44b1, - 0x44b1, 0x44b1, 0x44b2, 0x44b2, 0x44b2, 0x44b2, 0x44b2, 0x44b2, - 0x44b2, 0x44b2, 0x44b2, 0x44b2, 0x44b2, 0x44b2, 0x44b2, 0x44b2, - 0x44b2, 0x44b3, 0x44b3, 0x44b3, 0x44b3, 0x44b3, 0x44b3, 0x44b3, - 0x44b3, 0x44b3, 0x44b3, 0x44b3, 0x44b3, 0x44b3, 0x44b3, 0x44b4, - 0x44b4, 0x44b4, 0x44b4, 0x44b4, 0x44b4, 0x44b4, 0x44b4, 0x44b4, - 0x44b4, 0x44b4, 0x44b4, 0x44b4, 0x44b4, 0x44b4, 0x44b5, 0x44b5, - 0x44b5, 0x44b5, 0x44b5, 0x44b5, 0x44b5, 0x44b5, 0x44b5, 0x44b5, - 0x44b5, 0x44b5, 0x44b5, 0x44b5, 0x44b5, 0x44b6, 0x44b6, 0x44b6, - 0x44b6, 0x44b6, 0x44b6, 0x44b6, 0x44b6, 0x44b6, 0x44b6, 0x44b6, - 0x44b6, 0x44b6, 0x44b6, 0x44b6, 0x44b7, 0x44b7, 0x44b7, 0x44b7, - 0x44b7, 0x44b7, 0x44b7, 0x44b7, 0x44b7, 0x44b7, 0x44b7, 0x44b7, - 0x44b7, 0x44b7, 0x44b7, 0x44b8, 0x44b8, 0x44b8, 0x44b8, 0x44b8, - 0x44b8, 0x44b8, 0x44b8, 0x44b8, 0x44b8, 0x44b8, 0x44b8, 0x44b8, - 0x44b8, 0x44b8, 0x44b8, 0x44b9, 0x44b9, 0x44b9, 0x44b9, 0x44b9, - 0x44b9, 0x44b9, 0x44b9, 0x44b9, 0x44b9, 0x44b9, 0x44b9, 0x44b9, - 0x44b9, 0x44b9, 0x44ba, 0x44ba, 0x44ba, 0x44ba, 0x44ba, 0x44ba, - 0x44ba, 0x44ba, 0x44ba, 0x44ba, 0x44ba, 0x44ba, 0x44ba, 0x44ba, - 0x44ba, 0x44ba, 0x44bb, 0x44bb, 0x44bb, 0x44bb, 0x44bb, 0x44bb, - 0x44bb, 0x44bb, 0x44bb, 0x44bb, 0x44bb, 0x44bb, 0x44bb, 0x44bb, - 0x44bb, 0x44bb, 0x44bc, 0x44bc, 0x44bc, 0x44bc, 0x44bc, 0x44bc, - 0x44bc, 0x44bc, 0x44bc, 0x44bc, 0x44bc, 0x44bc, 0x44bc, 0x44bc, - 0x44bc, 0x44bc, 0x44bd, 0x44bd, 0x44bd, 0x44bd, 0x44bd, 0x44bd, - 0x44bd, 0x44bd, 0x44bd, 0x44bd, 0x44bd, 0x44bd, 0x44bd, 0x44bd, - 0x44bd, 0x44bd, 0x44be, 0x44be, 0x44be, 0x44be, 0x44be, 0x44be, - 0x44be, 0x44be, 0x44be, 0x44be, 0x44be, 0x44be, 0x44be, 0x44be, - 0x44be, 0x44be, 0x44bf, 0x44bf, 0x44bf, 0x44bf, 0x44bf, 0x44bf, - 0x44bf, 0x44bf, 0x44bf, 0x44bf, 0x44bf, 0x44bf, 0x44bf, 0x44bf, - 0x44bf, 0x44bf, 0x44c0, 0x44c0, 0x44c0, 0x44c0, 0x44c0, 0x44c0, - 0x44c0, 0x44c0, 0x44c0, 0x44c0, 0x44c0, 0x44c0, 0x44c0, 0x44c0, - 0x44c0, 0x44c0, 0x44c0, 0x44c1, 0x44c1, 0x44c1, 0x44c1, 0x44c1, - 0x44c1, 0x44c1, 0x44c1, 0x44c1, 0x44c1, 0x44c1, 0x44c1, 0x44c1, - 0x44c1, 0x44c1, 0x44c1, 0x44c2, 0x44c2, 0x44c2, 0x44c2, 0x44c2, - 0x44c2, 0x44c2, 0x44c2, 0x44c2, 0x44c2, 0x44c2, 0x44c2, 0x44c2, - 0x44c2, 0x44c2, 0x44c2, 0x44c2, 0x44c3, 0x44c3, 0x44c3, 0x44c3, - 0x44c3, 0x44c3, 0x44c3, 0x44c3, 0x44c3, 0x44c3, 0x44c3, 0x44c3, - 0x44c3, 0x44c3, 0x44c3, 0x44c3, 0x44c3, 0x44c4, 0x44c4, 0x44c4, - 0x44c4, 0x44c4, 0x44c4, 0x44c4, 0x44c4, 0x44c4, 0x44c4, 0x44c4, - 0x44c4, 0x44c4, 0x44c4, 0x44c4, 0x44c4, 0x44c4, 0x44c5, 0x44c5, - 0x44c5, 0x44c5, 0x44c5, 0x44c5, 0x44c5, 0x44c5, 0x44c5, 0x44c5, - 0x44c5, 0x44c5, 0x44c5, 0x44c5, 0x44c5, 0x44c5, 0x44c5, 0x44c6, - 0x44c6, 0x44c6, 0x44c6, 0x44c6, 0x44c6, 0x44c6, 0x44c6, 0x44c6, - 0x44c6, 0x44c6, 0x44c6, 0x44c6, 0x44c6, 0x44c6, 0x44c6, 0x44c6, - 0x44c7, 0x44c7, 0x44c7, 0x44c7, 0x44c7, 0x44c7, 0x44c7, 0x44c7, - 0x44c7, 0x44c7, 0x44c7, 0x44c7, 0x44c7, 0x44c7, 0x44c7, 0x44c7, - 0x44c7, 0x44c7, 0x44c8, 0x44c8, 0x44c8, 0x44c8, 0x44c8, 0x44c8, - 0x44c8, 0x44c8, 0x44c8, 0x44c8, 0x44c8, 0x44c8, 0x44c9, 0x44c9, - 0x44c9, 0x44c9, 0x44c9, 0x44c9, 0x44c9, 0x44c9, 0x44c9, 0x44ca, - 0x44ca, 0x44ca, 0x44ca, 0x44ca, 0x44ca, 0x44ca, 0x44ca, 0x44ca, - 0x44cb, 0x44cb, 0x44cb, 0x44cb, 0x44cb, 0x44cb, 0x44cb, 0x44cb, - 0x44cb, 0x44cc, 0x44cc, 0x44cc, 0x44cc, 0x44cc, 0x44cc, 0x44cc, - 0x44cc, 0x44cc, 0x44cd, 0x44cd, 0x44cd, 0x44cd, 0x44cd, 0x44cd, - 0x44cd, 0x44cd, 0x44cd, 0x44ce, 0x44ce, 0x44ce, 0x44ce, 0x44ce, - 0x44ce, 0x44ce, 0x44ce, 0x44ce, 0x44cf, 0x44cf, 0x44cf, 0x44cf, - 0x44cf, 0x44cf, 0x44cf, 0x44cf, 0x44cf, 0x44cf, 0x44d0, 0x44d0, - 0x44d0, 0x44d0, 0x44d0, 0x44d0, 0x44d0, 0x44d0, 0x44d0, 0x44d1, - 0x44d1, 0x44d1, 0x44d1, 0x44d1, 0x44d1, 0x44d1, 0x44d1, 0x44d1, - 0x44d1, 0x44d2, 0x44d2, 0x44d2, 0x44d2, 0x44d2, 0x44d2, 0x44d2, - 0x44d2, 0x44d2, 0x44d3, 0x44d3, 0x44d3, 0x44d3, 0x44d3, 0x44d3, - 0x44d3, 0x44d3, 0x44d3, 0x44d3, 0x44d4, 0x44d4, 0x44d4, 0x44d4, - 0x44d4, 0x44d4, 0x44d4, 0x44d4, 0x44d4, 0x44d4, 0x44d5, 0x44d5, - 0x44d5, 0x44d5, 0x44d5, 0x44d5, 0x44d5, 0x44d5, 0x44d5, 0x44d5, - 0x44d6, 0x44d6, 0x44d6, 0x44d6, 0x44d6, 0x44d6, 0x44d6, 0x44d6, - 0x44d6, 0x44d6, 0x44d7, 0x44d7, 0x44d7, 0x44d7, 0x44d7, 0x44d7, - 0x44d7, 0x44d7, 0x44d7, 0x44d7, 0x44d8, 0x44d8, 0x44d8, 0x44d8, - 0x44d8, 0x44d8, 0x44d8, 0x44d8, 0x44d8, 0x44d8, 0x44d9, 0x44d9, - 0x44d9, 0x44d9, 0x44d9, 0x44d9, 0x44d9, 0x44d9, 0x44d9, 0x44d9, - 0x44da, 0x44da, 0x44da, 0x44da, 0x44da, 0x44da, 0x44da, 0x44da, - 0x44da, 0x44da, 0x44db, 0x44db, 0x44db, 0x44db, 0x44db, 0x44db, - 0x44db, 0x44db, 0x44db, 0x44db, 0x44db, 0x44dc, 0x44dc, 0x44dc, - 0x44dc, 0x44dc, 0x44dc, 0x44dc, 0x44dc, 0x44dc, 0x44dc, 0x44dd, - 0x44dd, 0x44dd, 0x44dd, 0x44dd, 0x44dd, 0x44dd, 0x44dd, 0x44dd, - 0x44dd, 0x44dd, 0x44de, 0x44de, 0x44de, 0x44de, 0x44de, 0x44de, - 0x44de, 0x44de, 0x44de, 0x44de, 0x44df, 0x44df, 0x44df, 0x44df, - 0x44df, 0x44df, 0x44df, 0x44df, 0x44df, 0x44df, 0x44df, 0x44e0, - 0x44e0, 0x44e0, 0x44e0, 0x44e0, 0x44e0, 0x44e0, 0x44e0, 0x44e0, - 0x44e0, 0x44e0, 0x44e1, 0x44e1, 0x44e1, 0x44e1, 0x44e1, 0x44e1, - 0x44e1, 0x44e1, 0x44e1, 0x44e1, 0x44e1, 0x44e2, 0x44e2, 0x44e2, - 0x44e2, 0x44e2, 0x44e2, 0x44e2, 0x44e2, 0x44e2, 0x44e2, 0x44e2, - 0x44e3, 0x44e3, 0x44e3, 0x44e3, 0x44e3, 0x44e3, 0x44e3, 0x44e3, - 0x44e3, 0x44e3, 0x44e3, 0x44e4, 0x44e4, 0x44e4, 0x44e4, 0x44e4, - 0x44e4, 0x44e4, 0x44e4, 0x44e4, 0x44e4, 0x44e4, 0x44e5, 0x44e5, - 0x44e5, 0x44e5, 0x44e5, 0x44e5, 0x44e5, 0x44e5, 0x44e5, 0x44e5, - 0x44e5, 0x44e6, 0x44e6, 0x44e6, 0x44e6, 0x44e6, 0x44e6, 0x44e6, - 0x44e6, 0x44e6, 0x44e6, 0x44e6, 0x44e6, 0x44e7, 0x44e7, 0x44e7, - 0x44e7, 0x44e7, 0x44e7, 0x44e7, 0x44e7, 0x44e7, 0x44e7, 0x44e7, - 0x44e8, 0x44e8, 0x44e8, 0x44e8, 0x44e8, 0x44e8, 0x44e8, 0x44e8, - 0x44e8, 0x44e8, 0x44e8, 0x44e8, 0x44e9, 0x44e9, 0x44e9, 0x44e9, - 0x44e9, 0x44e9, 0x44e9, 0x44e9, 0x44e9, 0x44e9, 0x44e9, 0x44ea, - 0x44ea, 0x44ea, 0x44ea, 0x44ea, 0x44ea, 0x44ea, 0x44ea, 0x44ea, - 0x44ea, 0x44ea, 0x44ea, 0x44eb, 0x44eb, 0x44eb, 0x44eb, 0x44eb, - 0x44eb, 0x44eb, 0x44eb, 0x44eb, 0x44eb, 0x44eb, 0x44eb, 0x44ec, - 0x44ec, 0x44ec, 0x44ec, 0x44ec, 0x44ec, 0x44ec, 0x44ec, 0x44ec, - 0x44ec, 0x44ec, 0x44ec, 0x44ed, 0x44ed, 0x44ed, 0x44ed, 0x44ed, - 0x44ed, 0x44ed, 0x44ed, 0x44ed, 0x44ed, 0x44ed, 0x44ed, 0x44ee, - 0x44ee, 0x44ee, 0x44ee, 0x44ee, 0x44ee, 0x44ee, 0x44ee, 0x44ee, - 0x44ee, 0x44ee, 0x44ee, 0x44ef, 0x44ef, 0x44ef, 0x44ef, 0x44ef, - 0x44ef, 0x44ef, 0x44ef, 0x44ef, 0x44ef, 0x44ef, 0x44ef, 0x44ef, - 0x44f0, 0x44f0, 0x44f0, 0x44f0, 0x44f0, 0x44f0, 0x44f0, 0x44f0, - 0x44f0, 0x44f0, 0x44f0, 0x44f0, 0x44f1, 0x44f1, 0x44f1, 0x44f1, - 0x44f1, 0x44f1, 0x44f1, 0x44f1, 0x44f1, 0x44f1, 0x44f1, 0x44f1, - 0x44f1, 0x44f2, 0x44f2, 0x44f2, 0x44f2, 0x44f2, 0x44f2, 0x44f2, - 0x44f2, 0x44f2, 0x44f2, 0x44f2, 0x44f2, 0x44f3, 0x44f3, 0x44f3, - 0x44f3, 0x44f3, 0x44f3, 0x44f3, 0x44f3, 0x44f3, 0x44f3, 0x44f3, - 0x44f3, 0x44f3, 0x44f4, 0x44f4, 0x44f4, 0x44f4, 0x44f4, 0x44f4, - 0x44f4, 0x44f4, 0x44f4, 0x44f4, 0x44f4, 0x44f4, 0x44f4, 0x44f5, - 0x44f5, 0x44f5, 0x44f5, 0x44f5, 0x44f5, 0x44f5, 0x44f5, 0x44f5, - 0x44f5, 0x44f5, 0x44f5, 0x44f5, 0x44f6, 0x44f6, 0x44f6, 0x44f6, - 0x44f6, 0x44f6, 0x44f6, 0x44f6, 0x44f6, 0x44f6, 0x44f6, 0x44f6, - 0x44f6, 0x44f7, 0x44f7, 0x44f7, 0x44f7, 0x44f7, 0x44f7, 0x44f7, - 0x44f7, 0x44f7, 0x44f7, 0x44f7, 0x44f7, 0x44f7, 0x44f8, 0x44f8, - 0x44f8, 0x44f8, 0x44f8, 0x44f8, 0x44f8, 0x44f8, 0x44f8, 0x44f8, - 0x44f8, 0x44f8, 0x44f8, 0x44f8, 0x44f9, 0x44f9, 0x44f9, 0x44f9, - 0x44f9, 0x44f9, 0x44f9, 0x44f9, 0x44f9, 0x44f9, 0x44f9, 0x44f9, - 0x44f9, 0x44fa, 0x44fa, 0x44fa, 0x44fa, 0x44fa, 0x44fa, 0x44fa, - 0x44fa, 0x44fa, 0x44fa, 0x44fa, 0x44fa, 0x44fa, 0x44fb, 0x44fb, - 0x44fb, 0x44fb, 0x44fb, 0x44fb, 0x44fb, 0x44fb, 0x44fb, 0x44fb, - 0x44fb, 0x44fb, 0x44fb, 0x44fb, 0x44fc, 0x44fc, 0x44fc, 0x44fc, - 0x44fc, 0x44fc, 0x44fc, 0x44fc, 0x44fc, 0x44fc, 0x44fc, 0x44fc, - 0x44fc, 0x44fc, 0x44fd, 0x44fd, 0x44fd, 0x44fd, 0x44fd, 0x44fd, - 0x44fd, 0x44fd, 0x44fd, 0x44fd, 0x44fd, 0x44fd, 0x44fd, 0x44fd, - 0x44fe, 0x44fe, 0x44fe, 0x44fe, 0x44fe, 0x44fe, 0x44fe, 0x44fe, - 0x44fe, 0x44fe, 0x44fe, 0x44fe, 0x44fe, 0x44fe, 0x44ff, 0x44ff, - 0x44ff, 0x44ff, 0x44ff, 0x44ff, 0x44ff, 0x44ff, 0x44ff, 0x44ff, - 0x44ff, 0x44ff, 0x44ff, 0x44ff, 0x4500, 0x4500, 0x4500, 0x4500, - 0x4500, 0x4500, 0x4500, 0x4500, 0x4500, 0x4500, 0x4500, 0x4500, - 0x4500, 0x4500, 0x4501, 0x4501, 0x4501, 0x4501, 0x4501, 0x4501, - 0x4501, 0x4501, 0x4501, 0x4501, 0x4501, 0x4501, 0x4501, 0x4501, - 0x4501, 0x4502, 0x4502, 0x4502, 0x4502, 0x4502, 0x4502, 0x4502, - 0x4502, 0x4502, 0x4502, 0x4502, 0x4502, 0x4502, 0x4502, 0x4503, - 0x4503, 0x4503, 0x4503, 0x4503, 0x4503, 0x4503, 0x4503, 0x4503, - 0x4503, 0x4503, 0x4503, 0x4503, 0x4503, 0x4503, 0x4504, 0x4504, - 0x4504, 0x4504, 0x4504, 0x4504, 0x4504, 0x4504, 0x4504, 0x4504, - 0x4504, 0x4504, 0x4504, 0x4504, 0x4505, 0x4505, 0x4505, 0x4505, - 0x4505, 0x4505, 0x4505, 0x4505, 0x4505, 0x4505, 0x4505, 0x4505, - 0x4505, 0x4505, 0x4505, 0x4506, 0x4506, 0x4506, 0x4506, 0x4506, - 0x4506, 0x4506, 0x4506, 0x4506, 0x4506, 0x4506, 0x4506, 0x4506, - 0x4506, 0x4506, 0x4507, 0x4507, 0x4507, 0x4507, 0x4507, 0x4507, - 0x4507, 0x4507, 0x4507, 0x4507, 0x4507, 0x4507, 0x4507, 0x4507, - 0x4507, 0x4508, 0x4508, 0x4508, 0x4508, 0x4508, 0x4508, 0x4508, - 0x4508, 0x4508, 0x4508, 0x4508, 0x4508, 0x4508, 0x4508, 0x4508, - 0x4508, 0x4509, 0x4509, 0x4509, 0x4509, 0x4509, 0x4509, 0x4509, - 0x4509, 0x4509, 0x4509, 0x4509, 0x4509, 0x4509, 0x4509, 0x4509, - 0x450a, 0x450a, 0x450a, 0x450a, 0x450a, 0x450a, 0x450a, 0x450a, - 0x450a, 0x450a, 0x450a, 0x450a, 0x450a, 0x450a, 0x450a, 0x450a, - 0x450b, 0x450b, 0x450b, 0x450b, 0x450b, 0x450b, 0x450b, 0x450b, - 0x450b, 0x450b, 0x450b, 0x450b, 0x450b, 0x450b, 0x450b, 0x450c, - 0x450c, 0x450c, 0x450c, 0x450c, 0x450c, 0x450c, 0x450c, 0x450c, - 0x450c, 0x450c, 0x450c, 0x450c, 0x450c, 0x450c, 0x450c, 0x450d, - 0x450d, 0x450d, 0x450d, 0x450d, 0x450d, 0x450d, 0x450d, 0x450d, - 0x450d, 0x450d, 0x450d, 0x450d, 0x450d, 0x450d, 0x450d, 0x450e, - 0x450e, 0x450e, 0x450e, 0x450e, 0x450e, 0x450e, 0x450e, 0x450e, - 0x450e, 0x450e, 0x450e, 0x450e, 0x450e, 0x450e, 0x450e, 0x450f, - 0x450f, 0x450f, 0x450f, 0x450f, 0x450f, 0x450f, 0x450f, 0x450f, - 0x450f, 0x450f, 0x450f, 0x450f, 0x450f, 0x450f, 0x450f, 0x4510, - 0x4510, 0x4510, 0x4510, 0x4510, 0x4510, 0x4510, 0x4510, 0x4510, - 0x4510, 0x4510, 0x4510, 0x4510, 0x4510, 0x4510, 0x4510, 0x4510, - 0x4511, 0x4511, 0x4511, 0x4511, 0x4511, 0x4511, 0x4511, 0x4511, - 0x4511, 0x4511, 0x4511, 0x4511, 0x4511, 0x4511, 0x4511, 0x4511, - 0x4512, 0x4512, 0x4512, 0x4512, 0x4512, 0x4512, 0x4512, 0x4512, - 0x4512, 0x4512, 0x4512, 0x4512, 0x4512, 0x4512, 0x4512, 0x4512, - 0x4512, 0x4513, 0x4513, 0x4513, 0x4513, 0x4513, 0x4513, 0x4513, - 0x4513, 0x4513, 0x4513, 0x4513, 0x4513, 0x4513, 0x4513, 0x4513, - 0x4513, 0x4513, 0x4514, 0x4514, 0x4514, 0x4514, 0x4514, 0x4514, - 0x4514, 0x4514, 0x4514, 0x4514, 0x4514, 0x4514, 0x4514, 0x4514, - 0x4514, 0x4514, 0x4514, 0x4515, 0x4515, 0x4515, 0x4515, 0x4515, - 0x4515, 0x4515, 0x4515, 0x4515, 0x4515, 0x4515, 0x4515, 0x4515, - 0x4515, 0x4515, 0x4515, 0x4515, 0x4516, 0x4516, 0x4516, 0x4516, - 0x4516, 0x4516, 0x4516, 0x4516, 0x4516, 0x4516, 0x4516, 0x4516, - 0x4516, 0x4516, 0x4516, 0x4516, 0x4516, 0x4517, 0x4517, 0x4517, - 0x4517, 0x4517, 0x4517, 0x4517, 0x4517, 0x4517, 0x4517, 0x4517, - 0x4517, 0x4517, 0x4517, 0x4517, 0x4517, 0x4517, 0x4518, 0x4518, - 0x4518, 0x4518, 0x4518, 0x4518, 0x4518, 0x4518, 0x4518, 0x4518, - 0x4518, 0x4518, 0x4518, 0x4518, 0x4518, 0x4518, 0x4518, 0x4518, - 0x4519, 0x4519, 0x4519, 0x4519, 0x4519, 0x4519, 0x4519, 0x4519, - 0x4519, 0x451a, 0x451a, 0x451a, 0x451a, 0x451a, 0x451a, 0x451a, - 0x451a, 0x451a, 0x451b, 0x451b, 0x451b, 0x451b, 0x451b, 0x451b, - 0x451b, 0x451b, 0x451b, 0x451c, 0x451c, 0x451c, 0x451c, 0x451c, - 0x451c, 0x451c, 0x451c, 0x451c, 0x451d, 0x451d, 0x451d, 0x451d, - 0x451d, 0x451d, 0x451d, 0x451d, 0x451d, 0x451e, 0x451e, 0x451e, - 0x451e, 0x451e, 0x451e, 0x451e, 0x451e, 0x451e, 0x451f, 0x451f, - 0x451f, 0x451f, 0x451f, 0x451f, 0x451f, 0x451f, 0x451f, 0x451f, - 0x4520, 0x4520, 0x4520, 0x4520, 0x4520, 0x4520, 0x4520, 0x4520, - 0x4520, 0x4521, 0x4521, 0x4521, 0x4521, 0x4521, 0x4521, 0x4521, - 0x4521, 0x4521, 0x4522, 0x4522, 0x4522, 0x4522, 0x4522, 0x4522, - 0x4522, 0x4522, 0x4522, 0x4522, 0x4523, 0x4523, 0x4523, 0x4523, - 0x4523, 0x4523, 0x4523, 0x4523, 0x4523, 0x4523, 0x4524, 0x4524, - 0x4524, 0x4524, 0x4524, 0x4524, 0x4524, 0x4524, 0x4524, 0x4525, - 0x4525, 0x4525, 0x4525, 0x4525, 0x4525, 0x4525, 0x4525, 0x4525, - 0x4525, 0x4526, 0x4526, 0x4526, 0x4526, 0x4526, 0x4526, 0x4526, - 0x4526, 0x4526, 0x4526, 0x4527, 0x4527, 0x4527, 0x4527, 0x4527, - 0x4527, 0x4527, 0x4527, 0x4527, 0x4527, 0x4528, 0x4528, 0x4528, - 0x4528, 0x4528, 0x4528, 0x4528, 0x4528, 0x4528, 0x4528, 0x4529, - 0x4529, 0x4529, 0x4529, 0x4529, 0x4529, 0x4529, 0x4529, 0x4529, - 0x4529, 0x452a, 0x452a, 0x452a, 0x452a, 0x452a, 0x452a, 0x452a, - 0x452a, 0x452a, 0x452a, 0x452b, 0x452b, 0x452b, 0x452b, 0x452b, - 0x452b, 0x452b, 0x452b, 0x452b, 0x452b, 0x452b, 0x452c, 0x452c, - 0x452c, 0x452c, 0x452c, 0x452c, 0x452c, 0x452c, 0x452c, 0x452c, - 0x452d, 0x452d, 0x452d, 0x452d, 0x452d, 0x452d, 0x452d, 0x452d, - 0x452d, 0x452d, 0x452d, 0x452e, 0x452e, 0x452e, 0x452e, 0x452e, - 0x452e, 0x452e, 0x452e, 0x452e, 0x452e, 0x452f, 0x452f, 0x452f, - 0x452f, 0x452f, 0x452f, 0x452f, 0x452f, 0x452f, 0x452f, 0x452f, - 0x4530, 0x4530, 0x4530, 0x4530, 0x4530, 0x4530, 0x4530, 0x4530, - 0x4530, 0x4530, 0x4530, 0x4531, 0x4531, 0x4531, 0x4531, 0x4531, - 0x4531, 0x4531, 0x4531, 0x4531, 0x4531, 0x4532, 0x4532, 0x4532, - 0x4532, 0x4532, 0x4532, 0x4532, 0x4532, 0x4532, 0x4532, 0x4532, - 0x4533, 0x4533, 0x4533, 0x4533, 0x4533, 0x4533, 0x4533, 0x4533, - 0x4533, 0x4533, 0x4533, 0x4534, 0x4534, 0x4534, 0x4534, 0x4534, - 0x4534, 0x4534, 0x4534, 0x4534, 0x4534, 0x4534, 0x4534, 0x4535, - 0x4535, 0x4535, 0x4535, 0x4535, 0x4535, 0x4535, 0x4535, 0x4535, - 0x4535, 0x4535, 0x4536, 0x4536, 0x4536, 0x4536, 0x4536, 0x4536, - 0x4536, 0x4536, 0x4536, 0x4536, 0x4536, 0x4537, 0x4537, 0x4537, - 0x4537, 0x4537, 0x4537, 0x4537, 0x4537, 0x4537, 0x4537, 0x4537, - 0x4537, 0x4538, 0x4538, 0x4538, 0x4538, 0x4538, 0x4538, 0x4538, - 0x4538, 0x4538, 0x4538, 0x4538, 0x4539, 0x4539, 0x4539, 0x4539, - 0x4539, 0x4539, 0x4539, 0x4539, 0x4539, 0x4539, 0x4539, 0x4539, - 0x453a, 0x453a, 0x453a, 0x453a, 0x453a, 0x453a, 0x453a, 0x453a, - 0x453a, 0x453a, 0x453a, 0x453b, 0x453b, 0x453b, 0x453b, 0x453b, - 0x453b, 0x453b, 0x453b, 0x453b, 0x453b, 0x453b, 0x453b, 0x453c, - 0x453c, 0x453c, 0x453c, 0x453c, 0x453c, 0x453c, 0x453c, 0x453c, - 0x453c, 0x453c, 0x453c, 0x453d, 0x453d, 0x453d, 0x453d, 0x453d, - 0x453d, 0x453d, 0x453d, 0x453d, 0x453d, 0x453d, 0x453d, 0x453e, - 0x453e, 0x453e, 0x453e, 0x453e, 0x453e, 0x453e, 0x453e, 0x453e, - 0x453e, 0x453e, 0x453e, 0x453f, 0x453f, 0x453f, 0x453f, 0x453f, - 0x453f, 0x453f, 0x453f, 0x453f, 0x453f, 0x453f, 0x453f, 0x453f, - 0x4540, 0x4540, 0x4540, 0x4540, 0x4540, 0x4540, 0x4540, 0x4540, - 0x4540, 0x4540, 0x4540, 0x4540, 0x4541, 0x4541, 0x4541, 0x4541, - 0x4541, 0x4541, 0x4541, 0x4541, 0x4541, 0x4541, 0x4541, 0x4541, - 0x4541, 0x4542, 0x4542, 0x4542, 0x4542, 0x4542, 0x4542, 0x4542, - 0x4542, 0x4542, 0x4542, 0x4542, 0x4542, 0x4543, 0x4543, 0x4543, - 0x4543, 0x4543, 0x4543, 0x4543, 0x4543, 0x4543, 0x4543, 0x4543, - 0x4543, 0x4543, 0x4544, 0x4544, 0x4544, 0x4544, 0x4544, 0x4544, - 0x4544, 0x4544, 0x4544, 0x4544, 0x4544, 0x4544, 0x4544, 0x4545, - 0x4545, 0x4545, 0x4545, 0x4545, 0x4545, 0x4545, 0x4545, 0x4545, - 0x4545, 0x4545, 0x4545, 0x4546, 0x4546, 0x4546, 0x4546, 0x4546, - 0x4546, 0x4546, 0x4546, 0x4546, 0x4546, 0x4546, 0x4546, 0x4546, - 0x4547, 0x4547, 0x4547, 0x4547, 0x4547, 0x4547, 0x4547, 0x4547, - 0x4547, 0x4547, 0x4547, 0x4547, 0x4547, 0x4547, 0x4548, 0x4548, - 0x4548, 0x4548, 0x4548, 0x4548, 0x4548, 0x4548, 0x4548, 0x4548, - 0x4548, 0x4548, 0x4548, 0x4549, 0x4549, 0x4549, 0x4549, 0x4549, - 0x4549, 0x4549, 0x4549, 0x4549, 0x4549, 0x4549, 0x4549, 0x4549, - 0x454a, 0x454a, 0x454a, 0x454a, 0x454a, 0x454a, 0x454a, 0x454a, - 0x454a, 0x454a, 0x454a, 0x454a, 0x454a, 0x454a, 0x454b, 0x454b, - 0x454b, 0x454b, 0x454b, 0x454b, 0x454b, 0x454b, 0x454b, 0x454b, - 0x454b, 0x454b, 0x454b, 0x454c, 0x454c, 0x454c, 0x454c, 0x454c, - 0x454c, 0x454c, 0x454c, 0x454c, 0x454c, 0x454c, 0x454c, 0x454c, - 0x454c, 0x454d, 0x454d, 0x454d, 0x454d, 0x454d, 0x454d, 0x454d, - 0x454d, 0x454d, 0x454d, 0x454d, 0x454d, 0x454d, 0x454d, 0x454e, - 0x454e, 0x454e, 0x454e, 0x454e, 0x454e, 0x454e, 0x454e, 0x454e, - 0x454e, 0x454e, 0x454e, 0x454e, 0x454e, 0x454f, 0x454f, 0x454f, - 0x454f, 0x454f, 0x454f, 0x454f, 0x454f, 0x454f, 0x454f, 0x454f, - 0x454f, 0x454f, 0x454f, 0x4550, 0x4550, 0x4550, 0x4550, 0x4550, - 0x4550, 0x4550, 0x4550, 0x4550, 0x4550, 0x4550, 0x4550, 0x4550, - 0x4550, 0x4551, 0x4551, 0x4551, 0x4551, 0x4551, 0x4551, 0x4551, - 0x4551, 0x4551, 0x4551, 0x4551, 0x4551, 0x4551, 0x4551, 0x4552, - 0x4552, 0x4552, 0x4552, 0x4552, 0x4552, 0x4552, 0x4552, 0x4552, - 0x4552, 0x4552, 0x4552, 0x4552, 0x4552, 0x4552, 0x4553, 0x4553, - 0x4553, 0x4553, 0x4553, 0x4553, 0x4553, 0x4553, 0x4553, 0x4553, - 0x4553, 0x4553, 0x4553, 0x4553, 0x4554, 0x4554, 0x4554, 0x4554, - 0x4554, 0x4554, 0x4554, 0x4554, 0x4554, 0x4554, 0x4554, 0x4554, - 0x4554, 0x4554, 0x4554, 0x4555, 0x4555, 0x4555, 0x4555, 0x4555, - 0x4555, 0x4555, 0x4555, 0x4555, 0x4555, 0x4555, 0x4555, 0x4555, - 0x4555, 0x4555, 0x4556, 0x4556, 0x4556, 0x4556, 0x4556, 0x4556, - 0x4556, 0x4556, 0x4556, 0x4556, 0x4556, 0x4556, 0x4556, 0x4556, - 0x4557, 0x4557, 0x4557, 0x4557, 0x4557, 0x4557, 0x4557, 0x4557, - 0x4557, 0x4557, 0x4557, 0x4557, 0x4557, 0x4557, 0x4557, 0x4557, - 0x4558, 0x4558, 0x4558, 0x4558, 0x4558, 0x4558, 0x4558, 0x4558, - 0x4558, 0x4558, 0x4558, 0x4558, 0x4558, 0x4558, 0x4558, 0x4559, - 0x4559, 0x4559, 0x4559, 0x4559, 0x4559, 0x4559, 0x4559, 0x4559, - 0x4559, 0x4559, 0x4559, 0x4559, 0x4559, 0x4559, 0x455a, 0x455a, - 0x455a, 0x455a, 0x455a, 0x455a, 0x455a, 0x455a, 0x455a, 0x455a, - 0x455a, 0x455a, 0x455a, 0x455a, 0x455a, 0x455b, 0x455b, 0x455b, - 0x455b, 0x455b, 0x455b, 0x455b, 0x455b, 0x455b, 0x455b, 0x455b, - 0x455b, 0x455b, 0x455b, 0x455b, 0x455b, 0x455c, 0x455c, 0x455c, - 0x455c, 0x455c, 0x455c, 0x455c, 0x455c, 0x455c, 0x455c, 0x455c, - 0x455c, 0x455c, 0x455c, 0x455c, 0x455c, 0x455d, 0x455d, 0x455d, - 0x455d, 0x455d, 0x455d, 0x455d, 0x455d, 0x455d, 0x455d, 0x455d, - 0x455d, 0x455d, 0x455d, 0x455d, 0x455d, 0x455e, 0x455e, 0x455e, - 0x455e, 0x455e, 0x455e, 0x455e, 0x455e, 0x455e, 0x455e, 0x455e, - 0x455e, 0x455e, 0x455e, 0x455e, 0x455e, 0x455f, 0x455f, 0x455f, - 0x455f, 0x455f, 0x455f, 0x455f, 0x455f, 0x455f, 0x455f, 0x455f, - 0x455f, 0x455f, 0x455f, 0x455f, 0x455f, 0x4560, 0x4560, 0x4560, - 0x4560, 0x4560, 0x4560, 0x4560, 0x4560, 0x4560, 0x4560, 0x4560, - 0x4560, 0x4560, 0x4560, 0x4560, 0x4560, 0x4561, 0x4561, 0x4561, - 0x4561, 0x4561, 0x4561, 0x4561, 0x4561, 0x4561, 0x4561, 0x4561, - 0x4561, 0x4561, 0x4561, 0x4561, 0x4561, 0x4562, 0x4562, 0x4562, - 0x4562, 0x4562, 0x4562, 0x4562, 0x4562, 0x4562, 0x4562, 0x4562, - 0x4562, 0x4562, 0x4562, 0x4562, 0x4562, 0x4562, 0x4563, 0x4563, - 0x4563, 0x4563, 0x4563, 0x4563, 0x4563, 0x4563, 0x4563, 0x4563, - 0x4563, 0x4563, 0x4563, 0x4563, 0x4563, 0x4563, 0x4563, 0x4564, - 0x4564, 0x4564, 0x4564, 0x4564, 0x4564, 0x4564, 0x4564, 0x4564, - 0x4564, 0x4564, 0x4564, 0x4564, 0x4564, 0x4564, 0x4564, 0x4565, - 0x4565, 0x4565, 0x4565, 0x4565, 0x4565, 0x4565, 0x4565, 0x4565, - 0x4565, 0x4565, 0x4565, 0x4565, 0x4565, 0x4565, 0x4565, 0x4565, - 0x4566, 0x4566, 0x4566, 0x4566, 0x4566, 0x4566, 0x4566, 0x4566, - 0x4566, 0x4566, 0x4566, 0x4566, 0x4566, 0x4566, 0x4566, 0x4566, - 0x4566, 0x4566, 0x4567, 0x4567, 0x4567, 0x4567, 0x4567, 0x4567, - 0x4567, 0x4567, 0x4567, 0x4567, 0x4567, 0x4567, 0x4567, 0x4567, - 0x4567, 0x4567, 0x4567, 0x4568, 0x4568, 0x4568, 0x4568, 0x4568, - 0x4568, 0x4568, 0x4568, 0x4568, 0x4568, 0x4568, 0x4568, 0x4568, - 0x4568, 0x4568, 0x4568, 0x4568, 0x4569, 0x4569, 0x4569, 0x4569, - 0x4569, 0x4569, 0x4569, 0x4569, 0x4569, 0x4569, 0x4569, 0x4569, - 0x4569, 0x4569, 0x4569, 0x456a, 0x456a, 0x456a, 0x456a, 0x456a, - 0x456a, 0x456a, 0x456a, 0x456a, 0x456b, 0x456b, 0x456b, 0x456b, - 0x456b, 0x456b, 0x456b, 0x456b, 0x456b, 0x456c, 0x456c, 0x456c, - 0x456c, 0x456c, 0x456c, 0x456c, 0x456c, 0x456c, 0x456d, 0x456d, - 0x456d, 0x456d, 0x456d, 0x456d, 0x456d, 0x456d, 0x456d, 0x456e, - 0x456e, 0x456e, 0x456e, 0x456e, 0x456e, 0x456e, 0x456e, 0x456e, - 0x456f, 0x456f, 0x456f, 0x456f, 0x456f, 0x456f, 0x456f, 0x456f, - 0x456f, 0x4570, 0x4570, 0x4570, 0x4570, 0x4570, 0x4570, 0x4570, - 0x4570, 0x4570, 0x4570, 0x4571, 0x4571, 0x4571, 0x4571, 0x4571, - 0x4571, 0x4571, 0x4571, 0x4571, 0x4572, 0x4572, 0x4572, 0x4572, - 0x4572, 0x4572, 0x4572, 0x4572, 0x4572, 0x4572, 0x4573, 0x4573, - 0x4573, 0x4573, 0x4573, 0x4573, 0x4573, 0x4573, 0x4573, 0x4574, - 0x4574, 0x4574, 0x4574, 0x4574, 0x4574, 0x4574, 0x4574, 0x4574, - 0x4574, 0x4575, 0x4575, 0x4575, 0x4575, 0x4575, 0x4575, 0x4575, - 0x4575, 0x4575, 0x4575, 0x4576, 0x4576, 0x4576, 0x4576, 0x4576, - 0x4576, 0x4576, 0x4576, 0x4576, 0x4577, 0x4577, 0x4577, 0x4577, - 0x4577, 0x4577, 0x4577, 0x4577, 0x4577, 0x4577, 0x4578, 0x4578, - 0x4578, 0x4578, 0x4578, 0x4578, 0x4578, 0x4578, 0x4578, 0x4578, - 0x4579, 0x4579, 0x4579, 0x4579, 0x4579, 0x4579, 0x4579, 0x4579, - 0x4579, 0x4579, 0x457a, 0x457a, 0x457a, 0x457a, 0x457a, 0x457a, - 0x457a, 0x457a, 0x457a, 0x457a, 0x457a, 0x457b, 0x457b, 0x457b, - 0x457b, 0x457b, 0x457b, 0x457b, 0x457b, 0x457b, 0x457b, 0x457c, - 0x457c, 0x457c, 0x457c, 0x457c, 0x457c, 0x457c, 0x457c, 0x457c, - 0x457c, 0x457d, 0x457d, 0x457d, 0x457d, 0x457d, 0x457d, 0x457d, - 0x457d, 0x457d, 0x457d, 0x457d, 0x457e, 0x457e, 0x457e, 0x457e, - 0x457e, 0x457e, 0x457e, 0x457e, 0x457e, 0x457e, 0x457f, 0x457f, - 0x457f, 0x457f, 0x457f, 0x457f, 0x457f, 0x457f, 0x457f, 0x457f, - 0x457f, 0x4580, 0x4580, 0x4580, 0x4580, 0x4580, 0x4580, 0x4580, - 0x4580, 0x4580, 0x4580, 0x4580, 0x4581, 0x4581, 0x4581, 0x4581, - 0x4581, 0x4581, 0x4581, 0x4581, 0x4581, 0x4581, 0x4582, 0x4582, - 0x4582, 0x4582, 0x4582, 0x4582, 0x4582, 0x4582, 0x4582, 0x4582, - 0x4582, 0x4583, 0x4583, 0x4583, 0x4583, 0x4583, 0x4583, 0x4583, - 0x4583, 0x4583, 0x4583, 0x4583, 0x4584, 0x4584, 0x4584, 0x4584, - 0x4584, 0x4584, 0x4584, 0x4584, 0x4584, 0x4584, 0x4584, 0x4585, - 0x4585, 0x4585, 0x4585, 0x4585, 0x4585, 0x4585, 0x4585, 0x4585, - 0x4585, 0x4585, 0x4586, 0x4586, 0x4586, 0x4586, 0x4586, 0x4586, - 0x4586, 0x4586, 0x4586, 0x4586, 0x4586, 0x4586, 0x4587, 0x4587, - 0x4587, 0x4587, 0x4587, 0x4587, 0x4587, 0x4587, 0x4587, 0x4587, - 0x4587, 0x4588, 0x4588, 0x4588, 0x4588, 0x4588, 0x4588, 0x4588, - 0x4588, 0x4588, 0x4588, 0x4588, 0x4588, 0x4589, 0x4589, 0x4589, - 0x4589, 0x4589, 0x4589, 0x4589, 0x4589, 0x4589, 0x4589, 0x4589, - 0x458a, 0x458a, 0x458a, 0x458a, 0x458a, 0x458a, 0x458a, 0x458a, - 0x458a, 0x458a, 0x458a, 0x458a, 0x458b, 0x458b, 0x458b, 0x458b, - 0x458b, 0x458b, 0x458b, 0x458b, 0x458b, 0x458b, 0x458b, 0x458b, - 0x458c, 0x458c, 0x458c, 0x458c, 0x458c, 0x458c, 0x458c, 0x458c, - 0x458c, 0x458c, 0x458c, 0x458d, 0x458d, 0x458d, 0x458d, 0x458d, - 0x458d, 0x458d, 0x458d, 0x458d, 0x458d, 0x458d, 0x458d, 0x458e, - 0x458e, 0x458e, 0x458e, 0x458e, 0x458e, 0x458e, 0x458e, 0x458e, - 0x458e, 0x458e, 0x458e, 0x458f, 0x458f, 0x458f, 0x458f, 0x458f, - 0x458f, 0x458f, 0x458f, 0x458f, 0x458f, 0x458f, 0x458f, 0x458f, - 0x4590, 0x4590, 0x4590, 0x4590, 0x4590, 0x4590, 0x4590, 0x4590, - 0x4590, 0x4590, 0x4590, 0x4590, 0x4591, 0x4591, 0x4591, 0x4591, - 0x4591, 0x4591, 0x4591, 0x4591, 0x4591, 0x4591, 0x4591, 0x4591, - 0x4592, 0x4592, 0x4592, 0x4592, 0x4592, 0x4592, 0x4592, 0x4592, - 0x4592, 0x4592, 0x4592, 0x4592, 0x4592, 0x4593, 0x4593, 0x4593, - 0x4593, 0x4593, 0x4593, 0x4593, 0x4593, 0x4593, 0x4593, 0x4593, - 0x4593, 0x4594, 0x4594, 0x4594, 0x4594, 0x4594, 0x4594, 0x4594, - 0x4594, 0x4594, 0x4594, 0x4594, 0x4594, 0x4594, 0x4595, 0x4595, - 0x4595, 0x4595, 0x4595, 0x4595, 0x4595, 0x4595, 0x4595, 0x4595, - 0x4595, 0x4595, 0x4595, 0x4596, 0x4596, 0x4596, 0x4596, 0x4596, - 0x4596, 0x4596, 0x4596, 0x4596, 0x4596, 0x4596, 0x4596, 0x4596, - 0x4597, 0x4597, 0x4597, 0x4597, 0x4597, 0x4597, 0x4597, 0x4597, - 0x4597, 0x4597, 0x4597, 0x4597, 0x4597, 0x4598, 0x4598, 0x4598, - 0x4598, 0x4598, 0x4598, 0x4598, 0x4598, 0x4598, 0x4598, 0x4598, - 0x4598, 0x4598, 0x4599, 0x4599, 0x4599, 0x4599, 0x4599, 0x4599, - 0x4599, 0x4599, 0x4599, 0x4599, 0x4599, 0x4599, 0x4599, 0x459a, - 0x459a, 0x459a, 0x459a, 0x459a, 0x459a, 0x459a, 0x459a, 0x459a, - 0x459a, 0x459a, 0x459a, 0x459a, 0x459a, 0x459b, 0x459b, 0x459b, - 0x459b, 0x459b, 0x459b, 0x459b, 0x459b, 0x459b, 0x459b, 0x459b, - 0x459b, 0x459b, 0x459c, 0x459c, 0x459c, 0x459c, 0x459c, 0x459c, - 0x459c, 0x459c, 0x459c, 0x459c, 0x459c, 0x459c, 0x459c, 0x459c, - 0x459d, 0x459d, 0x459d, 0x459d, 0x459d, 0x459d, 0x459d, 0x459d, - 0x459d, 0x459d, 0x459d, 0x459d, 0x459d, 0x459d, 0x459e, 0x459e, - 0x459e, 0x459e, 0x459e, 0x459e, 0x459e, 0x459e, 0x459e, 0x459e, - 0x459e, 0x459e, 0x459e, 0x459f, 0x459f, 0x459f, 0x459f, 0x459f, - 0x459f, 0x459f, 0x459f, 0x459f, 0x459f, 0x459f, 0x459f, 0x459f, - 0x459f, 0x45a0, 0x45a0, 0x45a0, 0x45a0, 0x45a0, 0x45a0, 0x45a0, - 0x45a0, 0x45a0, 0x45a0, 0x45a0, 0x45a0, 0x45a0, 0x45a0, 0x45a1, - 0x45a1, 0x45a1, 0x45a1, 0x45a1, 0x45a1, 0x45a1, 0x45a1, 0x45a1, - 0x45a1, 0x45a1, 0x45a1, 0x45a1, 0x45a1, 0x45a1, 0x45a2, 0x45a2, - 0x45a2, 0x45a2, 0x45a2, 0x45a2, 0x45a2, 0x45a2, 0x45a2, 0x45a2, - 0x45a2, 0x45a2, 0x45a2, 0x45a2, 0x45a3, 0x45a3, 0x45a3, 0x45a3, - 0x45a3, 0x45a3, 0x45a3, 0x45a3, 0x45a3, 0x45a3, 0x45a3, 0x45a3, - 0x45a3, 0x45a3, 0x45a3, 0x45a4, 0x45a4, 0x45a4, 0x45a4, 0x45a4, - 0x45a4, 0x45a4, 0x45a4, 0x45a4, 0x45a4, 0x45a4, 0x45a4, 0x45a4, - 0x45a4, 0x45a5, 0x45a5, 0x45a5, 0x45a5, 0x45a5, 0x45a5, 0x45a5, - 0x45a5, 0x45a5, 0x45a5, 0x45a5, 0x45a5, 0x45a5, 0x45a5, 0x45a5, - 0x45a6, 0x45a6, 0x45a6, 0x45a6, 0x45a6, 0x45a6, 0x45a6, 0x45a6, - 0x45a6, 0x45a6, 0x45a6, 0x45a6, 0x45a6, 0x45a6, 0x45a6, 0x45a7, - 0x45a7, 0x45a7, 0x45a7, 0x45a7, 0x45a7, 0x45a7, 0x45a7, 0x45a7, - 0x45a7, 0x45a7, 0x45a7, 0x45a7, 0x45a7, 0x45a7, 0x45a8, 0x45a8, - 0x45a8, 0x45a8, 0x45a8, 0x45a8, 0x45a8, 0x45a8, 0x45a8, 0x45a8, - 0x45a8, 0x45a8, 0x45a8, 0x45a8, 0x45a8, 0x45a9, 0x45a9, 0x45a9, - 0x45a9, 0x45a9, 0x45a9, 0x45a9, 0x45a9, 0x45a9, 0x45a9, 0x45a9, - 0x45a9, 0x45a9, 0x45a9, 0x45a9, 0x45aa, 0x45aa, 0x45aa, 0x45aa, - 0x45aa, 0x45aa, 0x45aa, 0x45aa, 0x45aa, 0x45aa, 0x45aa, 0x45aa, - 0x45aa, 0x45aa, 0x45aa, 0x45ab, 0x45ab, 0x45ab, 0x45ab, 0x45ab, - 0x45ab, 0x45ab, 0x45ab, 0x45ab, 0x45ab, 0x45ab, 0x45ab, 0x45ab, - 0x45ab, 0x45ab, 0x45ab, 0x45ac, 0x45ac, 0x45ac, 0x45ac, 0x45ac, - 0x45ac, 0x45ac, 0x45ac, 0x45ac, 0x45ac, 0x45ac, 0x45ac, 0x45ac, - 0x45ac, 0x45ac, 0x45ad, 0x45ad, 0x45ad, 0x45ad, 0x45ad, 0x45ad, - 0x45ad, 0x45ad, 0x45ad, 0x45ad, 0x45ad, 0x45ad, 0x45ad, 0x45ad, - 0x45ad, 0x45ad, 0x45ae, 0x45ae, 0x45ae, 0x45ae, 0x45ae, 0x45ae, - 0x45ae, 0x45ae, 0x45ae, 0x45ae, 0x45ae, 0x45ae, 0x45ae, 0x45ae, - 0x45ae, 0x45ae, 0x45af, 0x45af, 0x45af, 0x45af, 0x45af, 0x45af, - 0x45af, 0x45af, 0x45af, 0x45af, 0x45af, 0x45af, 0x45af, 0x45af, - 0x45af, 0x45af, 0x45b0, 0x45b0, 0x45b0, 0x45b0, 0x45b0, 0x45b0, - 0x45b0, 0x45b0, 0x45b0, 0x45b0, 0x45b0, 0x45b0, 0x45b0, 0x45b0, - 0x45b0, 0x45b0, 0x45b1, 0x45b1, 0x45b1, 0x45b1, 0x45b1, 0x45b1, - 0x45b1, 0x45b1, 0x45b1, 0x45b1, 0x45b1, 0x45b1, 0x45b1, 0x45b1, - 0x45b1, 0x45b1, 0x45b1, 0x45b2, 0x45b2, 0x45b2, 0x45b2, 0x45b2, - 0x45b2, 0x45b2, 0x45b2, 0x45b2, 0x45b2, 0x45b2, 0x45b2, 0x45b2, - 0x45b2, 0x45b2, 0x45b2, 0x45b3, 0x45b3, 0x45b3, 0x45b3, 0x45b3, - 0x45b3, 0x45b3, 0x45b3, 0x45b3, 0x45b3, 0x45b3, 0x45b3, 0x45b3, - 0x45b3, 0x45b3, 0x45b3, 0x45b3, 0x45b4, 0x45b4, 0x45b4, 0x45b4, - 0x45b4, 0x45b4, 0x45b4, 0x45b4, 0x45b4, 0x45b4, 0x45b4, 0x45b4, - 0x45b4, 0x45b4, 0x45b4, 0x45b4, 0x45b5, 0x45b5, 0x45b5, 0x45b5, - 0x45b5, 0x45b5, 0x45b5, 0x45b5, 0x45b5, 0x45b5, 0x45b5, 0x45b5, - 0x45b5, 0x45b5, 0x45b5, 0x45b5, 0x45b5, 0x45b6, 0x45b6, 0x45b6, - 0x45b6, 0x45b6, 0x45b6, 0x45b6, 0x45b6, 0x45b6, 0x45b6, 0x45b6, - 0x45b6, 0x45b6, 0x45b6, 0x45b6, 0x45b6, 0x45b6, 0x45b7, 0x45b7, - 0x45b7, 0x45b7, 0x45b7, 0x45b7, 0x45b7, 0x45b7, 0x45b7, 0x45b7, - 0x45b7, 0x45b7, 0x45b7, 0x45b7, 0x45b7, 0x45b7, 0x45b7, 0x45b8, - 0x45b8, 0x45b8, 0x45b8, 0x45b8, 0x45b8, 0x45b8, 0x45b8, 0x45b8, - 0x45b8, 0x45b8, 0x45b8, 0x45b8, 0x45b8, 0x45b8, 0x45b8, 0x45b8, - 0x45b8, 0x45b9, 0x45b9, 0x45b9, 0x45b9, 0x45b9, 0x45b9, 0x45b9, - 0x45b9, 0x45b9, 0x45b9, 0x45b9, 0x45b9, 0x45b9, 0x45b9, 0x45b9, - 0x45b9, 0x45b9, 0x45ba, 0x45ba, 0x45ba, 0x45ba, 0x45ba, 0x45ba, - 0x45ba, 0x45ba, 0x45ba, 0x45ba, 0x45ba, 0x45ba, 0x45bb, 0x45bb, - 0x45bb, 0x45bb, 0x45bb, 0x45bb, 0x45bb, 0x45bb, 0x45bb, 0x45bc, - 0x45bc, 0x45bc, 0x45bc, 0x45bc, 0x45bc, 0x45bc, 0x45bc, 0x45bc, - 0x45bd, 0x45bd, 0x45bd, 0x45bd, 0x45bd, 0x45bd, 0x45bd, 0x45bd, - 0x45bd, 0x45be, 0x45be, 0x45be, 0x45be, 0x45be, 0x45be, 0x45be, - 0x45be, 0x45be, 0x45bf, 0x45bf, 0x45bf, 0x45bf, 0x45bf, 0x45bf, - 0x45bf, 0x45bf, 0x45bf, 0x45c0, 0x45c0, 0x45c0, 0x45c0, 0x45c0, - 0x45c0, 0x45c0, 0x45c0, 0x45c0, 0x45c0, 0x45c1, 0x45c1, 0x45c1, - 0x45c1, 0x45c1, 0x45c1, 0x45c1, 0x45c1, 0x45c1, 0x45c2, 0x45c2, - 0x45c2, 0x45c2, 0x45c2, 0x45c2, 0x45c2, 0x45c2, 0x45c2, 0x45c3, - 0x45c3, 0x45c3, 0x45c3, 0x45c3, 0x45c3, 0x45c3, 0x45c3, 0x45c3, - 0x45c3, 0x45c4, 0x45c4, 0x45c4, 0x45c4, 0x45c4, 0x45c4, 0x45c4, - 0x45c4, 0x45c4, 0x45c4, 0x45c5, 0x45c5, 0x45c5, 0x45c5, 0x45c5, - 0x45c5, 0x45c5, 0x45c5, 0x45c5, 0x45c6, 0x45c6, 0x45c6, 0x45c6, - 0x45c6, 0x45c6, 0x45c6, 0x45c6, 0x45c6, 0x45c6, 0x45c7, 0x45c7, - 0x45c7, 0x45c7, 0x45c7, 0x45c7, 0x45c7, 0x45c7, 0x45c7, 0x45c7, - 0x45c8, 0x45c8, 0x45c8, 0x45c8, 0x45c8, 0x45c8, 0x45c8, 0x45c8, - 0x45c8, 0x45c8, 0x45c9, 0x45c9, 0x45c9, 0x45c9, 0x45c9, 0x45c9, - 0x45c9, 0x45c9, 0x45c9, 0x45c9, 0x45ca, 0x45ca, 0x45ca, 0x45ca, - 0x45ca, 0x45ca, 0x45ca, 0x45ca, 0x45ca, 0x45ca, 0x45cb, 0x45cb, - 0x45cb, 0x45cb, 0x45cb, 0x45cb, 0x45cb, 0x45cb, 0x45cb, 0x45cb, - 0x45cc, 0x45cc, 0x45cc, 0x45cc, 0x45cc, 0x45cc, 0x45cc, 0x45cc, - 0x45cc, 0x45cc, 0x45cd, 0x45cd, 0x45cd, 0x45cd, 0x45cd, 0x45cd, - 0x45cd, 0x45cd, 0x45cd, 0x45cd, 0x45cd, 0x45ce, 0x45ce, 0x45ce, - 0x45ce, 0x45ce, 0x45ce, 0x45ce, 0x45ce, 0x45ce, 0x45ce, 0x45cf, - 0x45cf, 0x45cf, 0x45cf, 0x45cf, 0x45cf, 0x45cf, 0x45cf, 0x45cf, - 0x45cf, 0x45cf, 0x45d0, 0x45d0, 0x45d0, 0x45d0, 0x45d0, 0x45d0, - 0x45d0, 0x45d0, 0x45d0, 0x45d0, 0x45d1, 0x45d1, 0x45d1, 0x45d1, - 0x45d1, 0x45d1, 0x45d1, 0x45d1, 0x45d1, 0x45d1, 0x45d1, 0x45d2, - 0x45d2, 0x45d2, 0x45d2, 0x45d2, 0x45d2, 0x45d2, 0x45d2, 0x45d2, - 0x45d2, 0x45d2, 0x45d3, 0x45d3, 0x45d3, 0x45d3, 0x45d3, 0x45d3, - 0x45d3, 0x45d3, 0x45d3, 0x45d3, 0x45d3, 0x45d4, 0x45d4, 0x45d4, - 0x45d4, 0x45d4, 0x45d4, 0x45d4, 0x45d4, 0x45d4, 0x45d4, 0x45d4, - 0x45d5, 0x45d5, 0x45d5, 0x45d5, 0x45d5, 0x45d5, 0x45d5, 0x45d5, - 0x45d5, 0x45d5, 0x45d5, 0x45d6, 0x45d6, 0x45d6, 0x45d6, 0x45d6, - 0x45d6, 0x45d6, 0x45d6, 0x45d6, 0x45d6, 0x45d6, 0x45d7, 0x45d7, - 0x45d7, 0x45d7, 0x45d7, 0x45d7, 0x45d7, 0x45d7, 0x45d7, 0x45d7, - 0x45d7, 0x45d7, 0x45d8, 0x45d8, 0x45d8, 0x45d8, 0x45d8, 0x45d8, - 0x45d8, 0x45d8, 0x45d8, 0x45d8, 0x45d8, 0x45d9, 0x45d9, 0x45d9, - 0x45d9, 0x45d9, 0x45d9, 0x45d9, 0x45d9, 0x45d9, 0x45d9, 0x45d9, - 0x45da, 0x45da, 0x45da, 0x45da, 0x45da, 0x45da, 0x45da, 0x45da, - 0x45da, 0x45da, 0x45da, 0x45da, 0x45db, 0x45db, 0x45db, 0x45db, - 0x45db, 0x45db, 0x45db, 0x45db, 0x45db, 0x45db, 0x45db, 0x45db, - 0x45dc, 0x45dc, 0x45dc, 0x45dc, 0x45dc, 0x45dc, 0x45dc, 0x45dc, - 0x45dc, 0x45dc, 0x45dc, 0x45dc, 0x45dd, 0x45dd, 0x45dd, 0x45dd, - 0x45dd, 0x45dd, 0x45dd, 0x45dd, 0x45dd, 0x45dd, 0x45dd, 0x45dd, - 0x45de, 0x45de, 0x45de, 0x45de, 0x45de, 0x45de, 0x45de, 0x45de, - 0x45de, 0x45de, 0x45de, 0x45de, 0x45df, 0x45df, 0x45df, 0x45df, - 0x45df, 0x45df, 0x45df, 0x45df, 0x45df, 0x45df, 0x45df, 0x45df, - 0x45e0, 0x45e0, 0x45e0, 0x45e0, 0x45e0, 0x45e0, 0x45e0, 0x45e0, - 0x45e0, 0x45e0, 0x45e0, 0x45e0, 0x45e1, 0x45e1, 0x45e1, 0x45e1, - 0x45e1, 0x45e1, 0x45e1, 0x45e1, 0x45e1, 0x45e1, 0x45e1, 0x45e1, - 0x45e2, 0x45e2, 0x45e2, 0x45e2, 0x45e2, 0x45e2, 0x45e2, 0x45e2, - 0x45e2, 0x45e2, 0x45e2, 0x45e2, 0x45e2, 0x45e3, 0x45e3, 0x45e3, - 0x45e3, 0x45e3, 0x45e3, 0x45e3, 0x45e3, 0x45e3, 0x45e3, 0x45e3, - 0x45e3, 0x45e4, 0x45e4, 0x45e4, 0x45e4, 0x45e4, 0x45e4, 0x45e4, - 0x45e4, 0x45e4, 0x45e4, 0x45e4, 0x45e4, 0x45e4, 0x45e5, 0x45e5, - 0x45e5, 0x45e5, 0x45e5, 0x45e5, 0x45e5, 0x45e5, 0x45e5, 0x45e5, - 0x45e5, 0x45e5, 0x45e6, 0x45e6, 0x45e6, 0x45e6, 0x45e6, 0x45e6, - 0x45e6, 0x45e6, 0x45e6, 0x45e6, 0x45e6, 0x45e6, 0x45e6, 0x45e7, - 0x45e7, 0x45e7, 0x45e7, 0x45e7, 0x45e7, 0x45e7, 0x45e7, 0x45e7, - 0x45e7, 0x45e7, 0x45e7, 0x45e7, 0x45e8, 0x45e8, 0x45e8, 0x45e8, - 0x45e8, 0x45e8, 0x45e8, 0x45e8, 0x45e8, 0x45e8, 0x45e8, 0x45e8, - 0x45e8, 0x45e9, 0x45e9, 0x45e9, 0x45e9, 0x45e9, 0x45e9, 0x45e9, - 0x45e9, 0x45e9, 0x45e9, 0x45e9, 0x45e9, 0x45e9, 0x45e9, 0x45ea, - 0x45ea, 0x45ea, 0x45ea, 0x45ea, 0x45ea, 0x45ea, 0x45ea, 0x45ea, - 0x45ea, 0x45ea, 0x45ea, 0x45ea, 0x45eb, 0x45eb, 0x45eb, 0x45eb, - 0x45eb, 0x45eb, 0x45eb, 0x45eb, 0x45eb, 0x45eb, 0x45eb, 0x45eb, - 0x45eb, 0x45ec, 0x45ec, 0x45ec, 0x45ec, 0x45ec, 0x45ec, 0x45ec, - 0x45ec, 0x45ec, 0x45ec, 0x45ec, 0x45ec, 0x45ec, 0x45ec, 0x45ed, - 0x45ed, 0x45ed, 0x45ed, 0x45ed, 0x45ed, 0x45ed, 0x45ed, 0x45ed, - 0x45ed, 0x45ed, 0x45ed, 0x45ed, 0x45ed, 0x45ee, 0x45ee, 0x45ee, - 0x45ee, 0x45ee, 0x45ee, 0x45ee, 0x45ee, 0x45ee, 0x45ee, 0x45ee, - 0x45ee, 0x45ee, 0x45ef, 0x45ef, 0x45ef, 0x45ef, 0x45ef, 0x45ef, - 0x45ef, 0x45ef, 0x45ef, 0x45ef, 0x45ef, 0x45ef, 0x45ef, 0x45ef, - 0x45f0, 0x45f0, 0x45f0, 0x45f0, 0x45f0, 0x45f0, 0x45f0, 0x45f0, - 0x45f0, 0x45f0, 0x45f0, 0x45f0, 0x45f0, 0x45f0, 0x45f1, 0x45f1, - 0x45f1, 0x45f1, 0x45f1, 0x45f1, 0x45f1, 0x45f1, 0x45f1, 0x45f1, - 0x45f1, 0x45f1, 0x45f1, 0x45f1, 0x45f2, 0x45f2, 0x45f2, 0x45f2, - 0x45f2, 0x45f2, 0x45f2, 0x45f2, 0x45f2, 0x45f2, 0x45f2, 0x45f2, - 0x45f2, 0x45f2, 0x45f2, 0x45f3, 0x45f3, 0x45f3, 0x45f3, 0x45f3, - 0x45f3, 0x45f3, 0x45f3, 0x45f3, 0x45f3, 0x45f3, 0x45f3, 0x45f3, - 0x45f3, 0x45f4, 0x45f4, 0x45f4, 0x45f4, 0x45f4, 0x45f4, 0x45f4, - 0x45f4, 0x45f4, 0x45f4, 0x45f4, 0x45f4, 0x45f4, 0x45f4, 0x45f5, - 0x45f5, 0x45f5, 0x45f5, 0x45f5, 0x45f5, 0x45f5, 0x45f5, 0x45f5, - 0x45f5, 0x45f5, 0x45f5, 0x45f5, 0x45f5, 0x45f5, 0x45f6, 0x45f6, - 0x45f6, 0x45f6, 0x45f6, 0x45f6, 0x45f6, 0x45f6, 0x45f6, 0x45f6, - 0x45f6, 0x45f6, 0x45f6, 0x45f6, 0x45f6, 0x45f7, 0x45f7, 0x45f7, - 0x45f7, 0x45f7, 0x45f7, 0x45f7, 0x45f7, 0x45f7, 0x45f7, 0x45f7, - 0x45f7, 0x45f7, 0x45f7, 0x45f7, 0x45f8, 0x45f8, 0x45f8, 0x45f8, - 0x45f8, 0x45f8, 0x45f8, 0x45f8, 0x45f8, 0x45f8, 0x45f8, 0x45f8, - 0x45f8, 0x45f8, 0x45f8, 0x45f9, 0x45f9, 0x45f9, 0x45f9, 0x45f9, - 0x45f9, 0x45f9, 0x45f9, 0x45f9, 0x45f9, 0x45f9, 0x45f9, 0x45f9, - 0x45f9, 0x45f9, 0x45fa, 0x45fa, 0x45fa, 0x45fa, 0x45fa, 0x45fa, - 0x45fa, 0x45fa, 0x45fa, 0x45fa, 0x45fa, 0x45fa, 0x45fa, 0x45fa, - 0x45fa, 0x45fb, 0x45fb, 0x45fb, 0x45fb, 0x45fb, 0x45fb, 0x45fb, - 0x45fb, 0x45fb, 0x45fb, 0x45fb, 0x45fb, 0x45fb, 0x45fb, 0x45fb, - 0x45fb, 0x45fc, 0x45fc, 0x45fc, 0x45fc, 0x45fc, 0x45fc, 0x45fc, - 0x45fc, 0x45fc, 0x45fc, 0x45fc, 0x45fc, 0x45fc, 0x45fc, 0x45fc, - 0x45fd, 0x45fd, 0x45fd, 0x45fd, 0x45fd, 0x45fd, 0x45fd, 0x45fd, - 0x45fd, 0x45fd, 0x45fd, 0x45fd, 0x45fd, 0x45fd, 0x45fd, 0x45fd, - 0x45fe, 0x45fe, 0x45fe, 0x45fe, 0x45fe, 0x45fe, 0x45fe, 0x45fe, - 0x45fe, 0x45fe, 0x45fe, 0x45fe, 0x45fe, 0x45fe, 0x45fe, 0x45fe, - 0x45ff, 0x45ff, 0x45ff, 0x45ff, 0x45ff, 0x45ff, 0x45ff, 0x45ff, - 0x45ff, 0x45ff, 0x45ff, 0x45ff, 0x45ff, 0x45ff, 0x45ff, 0x45ff, - 0x4600, 0x4600, 0x4600, 0x4600, 0x4600, 0x4600, 0x4600, 0x4600, - 0x4600, 0x4600, 0x4600, 0x4600, 0x4600, 0x4600, 0x4600, 0x4600, - 0x4601, 0x4601, 0x4601, 0x4601, 0x4601, 0x4601, 0x4601, 0x4601, - 0x4601, 0x4601, 0x4601, 0x4601, 0x4601, 0x4601, 0x4601, 0x4601, - 0x4602, 0x4602, 0x4602, 0x4602, 0x4602, 0x4602, 0x4602, 0x4602, - 0x4602, 0x4602, 0x4602, 0x4602, 0x4602, 0x4602, 0x4602, 0x4602, - 0x4603, 0x4603, 0x4603, 0x4603, 0x4603, 0x4603, 0x4603, 0x4603, - 0x4603, 0x4603, 0x4603, 0x4603, 0x4603, 0x4603, 0x4603, 0x4603, - 0x4603, 0x4604, 0x4604, 0x4604, 0x4604, 0x4604, 0x4604, 0x4604, - 0x4604, 0x4604, 0x4604, 0x4604, 0x4604, 0x4604, 0x4604, 0x4604, - 0x4604, 0x4605, 0x4605, 0x4605, 0x4605, 0x4605, 0x4605, 0x4605, - 0x4605, 0x4605, 0x4605, 0x4605, 0x4605, 0x4605, 0x4605, 0x4605, - 0x4605, 0x4605, 0x4606, 0x4606, 0x4606, 0x4606, 0x4606, 0x4606, - 0x4606, 0x4606, 0x4606, 0x4606, 0x4606, 0x4606, 0x4606, 0x4606, - 0x4606, 0x4606, 0x4606, 0x4607, 0x4607, 0x4607, 0x4607, 0x4607, - 0x4607, 0x4607, 0x4607, 0x4607, 0x4607, 0x4607, 0x4607, 0x4607, - 0x4607, 0x4607, 0x4607, 0x4607, 0x4608, 0x4608, 0x4608, 0x4608, - 0x4608, 0x4608, 0x4608, 0x4608, 0x4608, 0x4608, 0x4608, 0x4608, - 0x4608, 0x4608, 0x4608, 0x4608, 0x4608, 0x4609, 0x4609, 0x4609, - 0x4609, 0x4609, 0x4609, 0x4609, 0x4609, 0x4609, 0x4609, 0x4609, - 0x4609, 0x4609, 0x4609, 0x4609, 0x4609, 0x4609, 0x4609, 0x460a, - 0x460a, 0x460a, 0x460a, 0x460a, 0x460a, 0x460a, 0x460a, 0x460a, - 0x460a, 0x460a, 0x460a, 0x460a, 0x460a, 0x460a, 0x460a, 0x460a, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x9043, 0x91d7, 0x9305, 0x9400, 0x946d, 0x94cf, 0x9529, - 0x957b, 0x95c8, 0x9611, 0x9656, 0x9697, 0x96d6, 0x9712, 0x974b, - 0x9783, 0x97b9, 0x97ed, 0x9810, 0x9828, 0x9840, 0x9857, 0x986e, - 0x9884, 0x989a, 0x98af, 0x98c4, 0x98d8, 0x98ec, 0x98ff, 0x9913, - 0x9926, 0x9938, 0x994a, 0x995c, 0x996e, 0x997f, 0x9991, 0x99a2, - 0x99b2, 0x99c3, 0x99d3, 0x99e3, 0x99f3, 0x9a02, 0x9a12, 0x9a21, - 0x9a30, 0x9a3f, 0x9a4e, 0x9a5c, 0x9a6b, 0x9a79, 0x9a87, 0x9a95, - 0x9aa3, 0x9ab1, 0x9abe, 0x9acc, 0x9ad9, 0x9ae7, 0x9af4, 0x9b01, - 0x9b0d, 0x9b1a, 0x9b27, 0x9b33, 0x9b40, 0x9b4c, 0x9b59, 0x9b65, - 0x9b71, 0x9b7d, 0x9b89, 0x9b94, 0x9ba0, 0x9bac, 0x9bb7, 0x9bc3, - 0x9bce, 0x9bda, 0x9be5, 0x9bf0, 0x9bfb, 0x9c03, 0x9c09, 0x9c0e, - 0x9c13, 0x9c19, 0x9c1e, 0x9c23, 0x9c29, 0x9c2e, 0x9c33, 0x9c38, - 0x9c3d, 0x9c43, 0x9c48, 0x9c4d, 0x9c52, 0x9c57, 0x9c5c, 0x9c61, - 0x9c66, 0x9c6b, 0x9c6f, 0x9c74, 0x9c79, 0x9c7e, 0x9c83, 0x9c87, - 0x9c8c, 0x9c91, 0x9c96, 0x9c9a, 0x9c9f, 0x9ca4, 0x9ca8, 0x9cad, - 0x9cb1, 0x9cb6, 0x9cba, 0x9cbf, 0x9cc3, 0x9cc8, 0x9ccc, 0x9cd1, - 0x9cd5, 0x9cd9, 0x9cde, 0x9ce2, 0x9ce7, 0x9ceb, 0x9cef, 0x9cf3, - 0x9cf8, 0x9cfc, 0x9d00, 0x9d04, 0x9d09, 0x9d0d, 0x9d11, 0x9d15, - 0x9d19, 0x9d1d, 0x9d21, 0x9d25, 0x9d29, 0x9d2e, 0x9d32, 0x9d36, - 0x9d3a, 0x9d3e, 0x9d42, 0x9d46, 0x9d49, 0x9d4d, 0x9d51, 0x9d55, - 0x9d59, 0x9d5d, 0x9d61, 0x9d65, 0x9d69, 0x9d6c, 0x9d70, 0x9d74, - 0x9d78, 0x9d7c, 0x9d7f, 0x9d83, 0x9d87, 0x9d8b, 0x9d8e, 0x9d92, - 0x9d96, 0x9d99, 0x9d9d, 0x9da1, 0x9da4, 0x9da8, 0x9dac, 0x9daf, - 0x9db3, 0x9db7, 0x9dba, 0x9dbe, 0x9dc1, 0x9dc5, 0x9dc8, 0x9dcc, - 0x9dcf, 0x9dd3, 0x9dd6, 0x9dda, 0x9ddd, 0x9de1, 0x9de4, 0x9de8, - 0x9deb, 0x9def, 0x9df2, 0x9df6, 0x9df9, 0x9dfc, 0x9e00, 0x9e03, - 0x9e07, 0x9e0a, 0x9e0d, 0x9e11, 0x9e14, 0x9e17, 0x9e1b, 0x9e1e, - 0x9e21, 0x9e25, 0x9e28, 0x9e2b, 0x9e2e, 0x9e32, 0x9e35, 0x9e38, - 0x9e3b, 0x9e3f, 0x9e42, 0x9e45, 0x9e48, 0x9e4b, 0x9e4f, 0x9e52, - 0x9e55, 0x9e58, 0x9e5b, 0x9e5f, 0x9e62, 0x9e65, 0x9e68, 0x9e6b, - 0x9e6e, 0x9e71, 0x9e74, 0x9e78, 0x9e7b, 0x9e7e, 0x9e81, 0x9e84, - 0x9e87, 0x9e8a, 0x9e8d, 0x9e90, 0x9e93, 0x9e96, 0x9e99, 0x9e9c, - 0x9e9f, 0x9ea2, 0x9ea5, 0x9ea8, 0x9eab, 0x9eae, 0x9eb1, 0x9eb4, - 0x9eb7, 0x9eba, 0x9ebd, 0x9ec0, 0x9ec3, 0x9ec6, 0x9ec9, 0x9ecc, - 0x9ecf, 0x9ed2, 0x9ed4, 0x9ed7, 0x9eda, 0x9edd, 0x9ee0, 0x9ee3, - 0x9ee6, 0x9ee9, 0x9eeb, 0x9eee, 0x9ef1, 0x9ef4, 0x9ef7, 0x9efa, - 0x9efc, 0x9eff, 0x9f02, 0x9f05, 0x9f08, 0x9f0b, 0x9f0d, 0x9f10, - 0x9f13, 0x9f16, 0x9f18, 0x9f1b, 0x9f1e, 0x9f21, 0x9f23, 0x9f26, - 0x9f29, 0x9f2c, 0x9f2e, 0x9f31, 0x9f34, 0x9f37, 0x9f39, 0x9f3c, - 0x9f3f, 0x9f41, 0x9f44, 0x9f47, 0x9f4a, 0x9f4c, 0x9f4f, 0x9f52, - 0x9f54, 0x9f57, 0x9f5a, 0x9f5c, 0x9f5f, 0x9f61, 0x9f64, 0x9f67, - 0x9f69, 0x9f6c, 0x9f6f, 0x9f71, 0x9f74, 0x9f76, 0x9f79, 0x9f7c, - 0x9f7e, 0x9f81, 0x9f83, 0x9f86, 0x9f89, 0x9f8b, 0x9f8e, 0x9f90, - 0x9f93, 0x9f95, 0x9f98, 0x9f9b, 0x9f9d, 0x9fa0, 0x9fa2, 0x9fa5, - 0x9fa7, 0x9faa, 0x9fac, 0x9faf, 0x9fb1, 0x9fb4, 0x9fb6, 0x9fb9, - 0x9fbb, 0x9fbe, 0x9fc0, 0x9fc3, 0x9fc5, 0x9fc8, 0x9fca, 0x9fcd, - 0x9fcf, 0x9fd2, 0x9fd4, 0x9fd7, 0x9fd9, 0x9fdc, 0x9fde, 0x9fe0, - 0x9fe3, 0x9fe5, 0x9fe8, 0x9fea, 0x9fed, 0x9fef, 0x9ff1, 0x9ff4, - 0x9ff6, 0x9ff9, 0x9ffb, 0x9ffe, 0xa000, 0xa001, 0xa002, 0xa004, - 0xa005, 0xa006, 0xa007, 0xa008, 0xa00a, 0xa00b, 0xa00c, 0xa00d, - 0xa00e, 0xa00f, 0xa011, 0xa012, 0xa013, 0xa014, 0xa015, 0xa016, - 0xa018, 0xa019, 0xa01a, 0xa01b, 0xa01c, 0xa01d, 0xa01f, 0xa020, - 0xa021, 0xa022, 0xa023, 0xa024, 0xa026, 0xa027, 0xa028, 0xa029, - 0xa02a, 0xa02b, 0xa02c, 0xa02e, 0xa02f, 0xa030, 0xa031, 0xa032, - 0xa033, 0xa034, 0xa035, 0xa037, 0xa038, 0xa039, 0xa03a, 0xa03b, - 0xa03c, 0xa03d, 0xa03e, 0xa040, 0xa041, 0xa042, 0xa043, 0xa044, - 0xa045, 0xa046, 0xa047, 0xa048, 0xa04a, 0xa04b, 0xa04c, 0xa04d, - 0xa04e, 0xa04f, 0xa050, 0xa051, 0xa052, 0xa053, 0xa055, 0xa056, - 0xa057, 0xa058, 0xa059, 0xa05a, 0xa05b, 0xa05c, 0xa05d, 0xa05e, - 0xa05f, 0xa060, 0xa062, 0xa063, 0xa064, 0xa065, 0xa066, 0xa067, - 0xa068, 0xa069, 0xa06a, 0xa06b, 0xa06c, 0xa06d, 0xa06e, 0xa06f, - 0xa070, 0xa072, 0xa073, 0xa074, 0xa075, 0xa076, 0xa077, 0xa078, - 0xa079, 0xa07a, 0xa07b, 0xa07c, 0xa07d, 0xa07e, 0xa07f, 0xa080, - 0xa081, 0xa082, 0xa083, 0xa084, 0xa085, 0xa086, 0xa087, 0xa089, - 0xa08a, 0xa08b, 0xa08c, 0xa08d, 0xa08e, 0xa08f, 0xa090, 0xa091, - 0xa092, 0xa093, 0xa094, 0xa095, 0xa096, 0xa097, 0xa098, 0xa099, - 0xa09a, 0xa09b, 0xa09c, 0xa09d, 0xa09e, 0xa09f, 0xa0a0, 0xa0a1, - 0xa0a2, 0xa0a3, 0xa0a4, 0xa0a5, 0xa0a6, 0xa0a7, 0xa0a8, 0xa0a9, - 0xa0aa, 0xa0ab, 0xa0ac, 0xa0ad, 0xa0ae, 0xa0af, 0xa0b0, 0xa0b1, - 0xa0b2, 0xa0b3, 0xa0b4, 0xa0b5, 0xa0b6, 0xa0b7, 0xa0b8, 0xa0b9, - 0xa0ba, 0xa0bb, 0xa0bc, 0xa0bd, 0xa0be, 0xa0bf, 0xa0c0, 0xa0c1, - 0xa0c2, 0xa0c3, 0xa0c4, 0xa0c5, 0xa0c6, 0xa0c7, 0xa0c7, 0xa0c8, - 0xa0c9, 0xa0ca, 0xa0cb, 0xa0cc, 0xa0cd, 0xa0ce, 0xa0cf, 0xa0d0, - 0xa0d1, 0xa0d2, 0xa0d3, 0xa0d4, 0xa0d5, 0xa0d6, 0xa0d7, 0xa0d8, - 0xa0d9, 0xa0da, 0xa0db, 0xa0dc, 0xa0dd, 0xa0de, 0xa0de, 0xa0df, - 0xa0e0, 0xa0e1, 0xa0e2, 0xa0e3, 0xa0e4, 0xa0e5, 0xa0e6, 0xa0e7, - 0xa0e8, 0xa0e9, 0xa0ea, 0xa0eb, 0xa0ec, 0xa0ed, 0xa0ee, 0xa0ee, - 0xa0ef, 0xa0f0, 0xa0f1, 0xa0f2, 0xa0f3, 0xa0f4, 0xa0f5, 0xa0f6, - 0xa0f7, 0xa0f8, 0xa0f9, 0xa0fa, 0xa0fb, 0xa0fb, 0xa0fc, 0xa0fd, - 0xa0fe, 0xa0ff, 0xa100, 0xa101, 0xa102, 0xa103, 0xa104, 0xa105, - 0xa106, 0xa106, 0xa107, 0xa108, 0xa109, 0xa10a, 0xa10b, 0xa10c, - 0xa10d, 0xa10e, 0xa10f, 0xa110, 0xa110, 0xa111, 0xa112, 0xa113, - 0xa114, 0xa115, 0xa116, 0xa117, 0xa118, 0xa119, 0xa119, 0xa11a, - 0xa11b, 0xa11c, 0xa11d, 0xa11e, 0xa11f, 0xa120, 0xa121, 0xa121, - 0xa122, 0xa123, 0xa124, 0xa125, 0xa126, 0xa127, 0xa128, 0xa129, - 0xa129, 0xa12a, 0xa12b, 0xa12c, 0xa12d, 0xa12e, 0xa12f, 0xa130, - 0xa130, 0xa131, 0xa132, 0xa133, 0xa134, 0xa135, 0xa136, 0xa137, - 0xa137, 0xa138, 0xa139, 0xa13a, 0xa13b, 0xa13c, 0xa13d, 0xa13e, - 0xa13e, 0xa13f, 0xa140, 0xa141, 0xa142, 0xa143, 0xa144, 0xa144, - 0xa145, 0xa146, 0xa147, 0xa148, 0xa149, 0xa14a, 0xa14b, 0xa14b, - 0xa14c, 0xa14d, 0xa14e, 0xa14f, 0xa150, 0xa151, 0xa151, 0xa152, - 0xa153, 0xa154, 0xa155, 0xa156, 0xa156, 0xa157, 0xa158, 0xa159, - 0xa15a, 0xa15b, 0xa15c, 0xa15c, 0xa15d, 0xa15e, 0xa15f, 0xa160, - 0xa161, 0xa161, 0xa162, 0xa163, 0xa164, 0xa165, 0xa166, 0xa166, - 0xa167, 0xa168, 0xa169, 0xa16a, 0xa16b, 0xa16b, 0xa16c, 0xa16d, - 0xa16e, 0xa16f, 0xa170, 0xa170, 0xa171, 0xa172, 0xa173, 0xa174, - 0xa175, 0xa175, 0xa176, 0xa177, 0xa178, 0xa179, 0xa17a, 0xa17a, - 0xa17b, 0xa17c, 0xa17d, 0xa17e, 0xa17e, 0xa17f, 0xa180, 0xa181, - 0xa182, 0xa183, 0xa183, 0xa184, 0xa185, 0xa186, 0xa187, 0xa187, - 0xa188, 0xa189, 0xa18a, 0xa18b, 0xa18c, 0xa18c, 0xa18d, 0xa18e, - 0xa18f, 0xa190, 0xa190, 0xa191, 0xa192, 0xa193, 0xa194, 0xa194, - 0xa195, 0xa196, 0xa197, 0xa198, 0xa198, 0xa199, 0xa19a, 0xa19b, - 0xa19c, 0xa19c, 0xa19d, 0xa19e, 0xa19f, 0xa1a0, 0xa1a0, 0xa1a1, - 0xa1a2, 0xa1a3, 0xa1a4, 0xa1a4, 0xa1a5, 0xa1a6, 0xa1a7, 0xa1a8, - 0xa1a8, 0xa1a9, 0xa1aa, 0xa1ab, 0xa1ac, 0xa1ac, 0xa1ad, 0xa1ae, - 0xa1af, 0xa1af, 0xa1b0, 0xa1b1, 0xa1b2, 0xa1b3, 0xa1b3, 0xa1b4, - 0xa1b5, 0xa1b6, 0xa1b7, 0xa1b7, 0xa1b8, 0xa1b9, 0xa1ba, 0xa1ba, - 0xa1bb, 0xa1bc, 0xa1bd, 0xa1be, 0xa1be, 0xa1bf, 0xa1c0, 0xa1c1, - 0xa1c1, 0xa1c2, 0xa1c3, 0xa1c4, 0xa1c5, 0xa1c5, 0xa1c6, 0xa1c7, - 0xa1c8, 0xa1c8, 0xa1c9, 0xa1ca, 0xa1cb, 0xa1cb, 0xa1cc, 0xa1cd, - 0xa1ce, 0xa1cf, 0xa1cf, 0xa1d0, 0xa1d1, 0xa1d2, 0xa1d2, 0xa1d3, - 0xa1d4, 0xa1d5, 0xa1d5, 0xa1d6, 0xa1d7, 0xa1d8, 0xa1d8, 0xa1d9, - 0xa1da, 0xa1db, 0xa1db, 0xa1dc, 0xa1dd, 0xa1de, 0xa1df, 0xa1df, - 0xa1e0, 0xa1e1, 0xa1e2, 0xa1e2, 0xa1e3, 0xa1e4, 0xa1e5, 0xa1e5, - 0xa1e6, 0xa1e7, 0xa1e8, 0xa1e8, 0xa1e9, 0xa1ea, 0xa1eb, 0xa1eb, - 0xa1ec, 0xa1ed, 0xa1ee, 0xa1ee, 0xa1ef, 0xa1f0, 0xa1f1, 0xa1f1, - 0xa1f2, 0xa1f3, 0xa1f4, 0xa1f4, 0xa1f5, 0xa1f6, 0xa1f7, 0xa1f7, - 0xa1f8, 0xa1f9, 0xa1f9, 0xa1fa, 0xa1fb, 0xa1fc, 0xa1fc, 0xa1fd, - 0xa1fe, 0xa1ff, 0xa1ff, 0xa200, 0xa201, 0xa202, 0xa202, 0xa203, - 0xa204, 0xa205, 0xa205, 0xa206, 0xa207, 0xa207, 0xa208, 0xa209, - 0xa20a, 0xa20a, 0xa20b, 0xa20c, 0xa20d, 0xa20d, 0xa20e, 0xa20f, - 0xa210, 0xa210, 0xa211, 0xa212, 0xa212, 0xa213, 0xa214, 0xa215, - 0xa215, 0xa216, 0xa217, 0xa218, 0xa218, 0xa219, 0xa21a, 0xa21a, - 0xa21b, 0xa21c, 0xa21d, 0xa21d, 0xa21e, 0xa21f, 0xa21f, 0xa220, - 0xa221, 0xa222, 0xa222, 0xa223, 0xa224, 0xa224, 0xa225, 0xa226, - 0xa227, 0xa227, 0xa228, 0xa229, 0xa22a, 0xa22a, 0xa22b, 0xa22c, - 0xa22c, 0xa22d, 0xa22e, 0xa22e, 0xa22f, 0xa230, 0xa231, 0xa231, - 0xa232, 0xa233, 0xa233, 0xa234, 0xa235, 0xa236, 0xa236, 0xa237, - 0xa238, 0xa238, 0xa239, 0xa23a, 0xa23b, 0xa23b, 0xa23c, 0xa23d, - 0xa23d, 0xa23e, 0xa23f, 0xa23f, 0xa240, 0xa241, 0xa242, 0xa242, - 0xa243, 0xa244, 0xa244, 0xa245, 0xa246, 0xa246, 0xa247, 0xa248, - 0xa249, 0xa249, 0xa24a, 0xa24b, 0xa24b, 0xa24c, 0xa24d, 0xa24d, - 0xa24e, 0xa24f, 0xa250, 0xa250, 0xa251, 0xa252, 0xa252, 0xa253, - 0xa254, 0xa254, 0xa255, 0xa256, 0xa256, 0xa257, 0xa258, 0xa259, - 0xa259, 0xa25a, 0xa25b, 0xa25b, 0xa25c, 0xa25d, 0xa25d, 0xa25e, - 0xa25f, 0xa25f, 0xa260, 0xa261, 0xa261, 0xa262, 0xa263, 0xa264, - 0xa264, 0xa265, 0xa266, 0xa266, 0xa267, 0xa268, 0xa268, 0xa269, - 0xa26a, 0xa26a, 0xa26b, 0xa26c, 0xa26c, 0xa26d, 0xa26e, 0xa26e, - 0xa26f, 0xa270, 0xa270, 0xa271, 0xa272, 0xa272, 0xa273, 0xa274, - 0xa274, 0xa275, 0xa276, 0xa277, 0xa277, 0xa278, 0xa279, 0xa279, - 0xa27a, 0xa27b, 0xa27b, 0xa27c, 0xa27d, 0xa27d, 0xa27e, 0xa27f, - 0xa27f, 0xa280, 0xa281, 0xa281, 0xa282, 0xa283, 0xa283, 0xa284, - 0xa285, 0xa285, 0xa286, 0xa287, 0xa287, 0xa288, 0xa289, 0xa289, - 0xa28a, 0xa28b, 0xa28b, 0xa28c, 0xa28d, 0xa28d, 0xa28e, 0xa28f, - 0xa28f, 0xa290, 0xa291, 0xa291, 0xa292, 0xa293, 0xa293, 0xa294, - 0xa295, 0xa295, 0xa296, 0xa297, 0xa297, 0xa298, 0xa298, 0xa299, - 0xa29a, 0xa29a, 0xa29b, 0xa29c, 0xa29c, 0xa29d, 0xa29e, 0xa29e, - 0xa29f, 0xa2a0, 0xa2a0, 0xa2a1, 0xa2a2, 0xa2a2, 0xa2a3, 0xa2a4, - 0xa2a4, 0xa2a5, 0xa2a6, 0xa2a6, 0xa2a7, 0xa2a8, 0xa2a8, 0xa2a9, - 0xa2aa, 0xa2aa, 0xa2ab, 0xa2ab, 0xa2ac, 0xa2ad, 0xa2ad, 0xa2ae, - 0xa2af, 0xa2af, 0xa2b0, 0xa2b1, 0xa2b1, 0xa2b2, 0xa2b3, 0xa2b3, - 0xa2b4, 0xa2b5, 0xa2b5, 0xa2b6, 0xa2b6, 0xa2b7, 0xa2b8, 0xa2b8, - 0xa2b9, 0xa2ba, 0xa2ba, 0xa2bb, 0xa2bc, 0xa2bc, 0xa2bd, 0xa2be, - 0xa2be, 0xa2bf, 0xa2bf, 0xa2c0, 0xa2c1, 0xa2c1, 0xa2c2, 0xa2c3, - 0xa2c3, 0xa2c4, 0xa2c5, 0xa2c5, 0xa2c6, 0xa2c6, 0xa2c7, 0xa2c8, - 0xa2c8, 0xa2c9, 0xa2ca, 0xa2ca, 0xa2cb, 0xa2cc, 0xa2cc, 0xa2cd, - 0xa2cd, 0xa2ce, 0xa2cf, 0xa2cf, 0xa2d0, 0xa2d1, 0xa2d1, 0xa2d2, - 0xa2d3, 0xa2d3, 0xa2d4, 0xa2d4, 0xa2d5, 0xa2d6, 0xa2d6, 0xa2d7, - 0xa2d8, 0xa2d8, 0xa2d9, 0xa2d9, 0xa2da, 0xa2db, 0xa2db, 0xa2dc, - 0xa2dd, 0xa2dd, 0xa2de, 0xa2de, 0xa2df, 0xa2e0, 0xa2e0, 0xa2e1, - 0xa2e2, 0xa2e2, 0xa2e3, 0xa2e4, 0xa2e4, 0xa2e5, 0xa2e5, 0xa2e6, - 0xa2e7, 0xa2e7, 0xa2e8, 0xa2e8, 0xa2e9, 0xa2ea, 0xa2ea, 0xa2eb, - 0xa2ec, 0xa2ec, 0xa2ed, 0xa2ed, 0xa2ee, 0xa2ef, 0xa2ef, 0xa2f0, - 0xa2f1, 0xa2f1, 0xa2f2, 0xa2f2, 0xa2f3, 0xa2f4, 0xa2f4, 0xa2f5, - 0xa2f6, 0xa2f6, 0xa2f7, 0xa2f7, 0xa2f8, 0xa2f9, 0xa2f9, 0xa2fa, - 0xa2fa, 0xa2fb, 0xa2fc, 0xa2fc, 0xa2fd, 0xa2fe, 0xa2fe, 0xa2ff, - 0xa2ff, 0xa300, 0xa301, 0xa301, 0xa302, 0xa302, 0xa303, 0xa304, - 0xa304, 0xa305, 0xa305, 0xa306, 0xa307, 0xa307, 0xa308, 0xa309, - 0xa309, 0xa30a, 0xa30a, 0xa30b, 0xa30c, 0xa30c, 0xa30d, 0xa30d, - 0xa30e, 0xa30f, 0xa30f, 0xa310, 0xa310, 0xa311, 0xa312, 0xa312, - 0xa313, 0xa313, 0xa314, 0xa315, 0xa315, 0xa316, 0xa316, 0xa317, - 0xa318, 0xa318, 0xa319, 0xa319, 0xa31a, 0xa31b, 0xa31b, 0xa31c, - 0xa31d, 0xa31d, 0xa31e, 0xa31e, 0xa31f, 0xa320, 0xa320, 0xa321, - 0xa321, 0xa322, 0xa323, 0xa323, 0xa324, 0xa324, 0xa325, 0xa325, - 0xa326, 0xa327, 0xa327, 0xa328, 0xa328, 0xa329, 0xa32a, 0xa32a, - 0xa32b, 0xa32b, 0xa32c, 0xa32d, 0xa32d, 0xa32e, 0xa32e, 0xa32f, - 0xa330, 0xa330, 0xa331, 0xa331, 0xa332, 0xa333, 0xa333, 0xa334, - 0xa334, 0xa335, 0xa336, 0xa336, 0xa337, 0xa337, 0xa338, 0xa339, - 0xa339, 0xa33a, 0xa33a, 0xa33b, 0xa33b, 0xa33c, 0xa33d, 0xa33d, - 0xa33e, 0xa33e, 0xa33f, 0xa340, 0xa340, 0xa341, 0xa341, 0xa342, - 0xa343, 0xa343, 0xa344, 0xa344, 0xa345, 0xa345, 0xa346, 0xa347, - 0xa347, 0xa348, 0xa348, 0xa349, 0xa34a, 0xa34a, 0xa34b, 0xa34b, - 0xa34c, 0xa34c, 0xa34d, 0xa34e, 0xa34e, 0xa34f, 0xa34f, 0xa350, - 0xa351, 0xa351, 0xa352, 0xa352, 0xa353, 0xa353, 0xa354, 0xa355, - 0xa355, 0xa356, 0xa356, 0xa357, 0xa357, 0xa358, 0xa359, 0xa359, - 0xa35a, 0xa35a, 0xa35b, 0xa35c, 0xa35c, 0xa35d, 0xa35d, 0xa35e, - 0xa35e, 0xa35f, 0xa360, 0xa360, 0xa361, 0xa361, 0xa362, 0xa362, - 0xa363, 0xa364, 0xa364, 0xa365, 0xa365, 0xa366, 0xa366, 0xa367, - 0xa368, 0xa368, 0xa369, 0xa369, 0xa36a, 0xa36a, 0xa36b, 0xa36c, - 0xa36c, 0xa36d, 0xa36d, 0xa36e, 0xa36e, 0xa36f, 0xa370, 0xa370, - 0xa371, 0xa371, 0xa372, 0xa372, 0xa373, 0xa374, 0xa374, 0xa375, - 0xa375, 0xa376, 0xa376, 0xa377, 0xa378, 0xa378, 0xa379, 0xa379, - 0xa37a, 0xa37a, 0xa37b, 0xa37c, 0xa37c, 0xa37d, 0xa37d, 0xa37e, - 0xa37e, 0xa37f, 0xa37f, 0xa380, 0xa381, 0xa381, 0xa382, 0xa382, - 0xa383, 0xa383, 0xa384, 0xa385, 0xa385, 0xa386, 0xa386, 0xa387, - 0xa387, 0xa388, 0xa388, 0xa389, 0xa38a, 0xa38a, 0xa38b, 0xa38b, - 0xa38c, 0xa38c, 0xa38d, 0xa38e, 0xa38e, 0xa38f, 0xa38f, 0xa390, - 0xa390, 0xa391, 0xa391, 0xa392, 0xa393, 0xa393, 0xa394, 0xa394, - 0xa395, 0xa395, 0xa396, 0xa396, 0xa397, 0xa398, 0xa398, 0xa399, - 0xa399, 0xa39a, 0xa39a, 0xa39b, 0xa39b, 0xa39c, 0xa39d, 0xa39d, - 0xa39e, 0xa39e, 0xa39f, 0xa39f, 0xa3a0, 0xa3a0, 0xa3a1, 0xa3a2, - 0xa3a2, 0xa3a3, 0xa3a3, 0xa3a4, 0xa3a4, 0xa3a5, 0xa3a5, 0xa3a6, - 0xa3a7, 0xa3a7, 0xa3a8, 0xa3a8, 0xa3a9, 0xa3a9, 0xa3aa, 0xa3aa, - 0xa3ab, 0xa3ab, 0xa3ac, 0xa3ad, 0xa3ad, 0xa3ae, 0xa3ae, 0xa3af, - 0xa3af, 0xa3b0, 0xa3b0, 0xa3b1, 0xa3b2, 0xa3b2, 0xa3b3, 0xa3b3, - 0xa3b4, 0xa3b4, 0xa3b5, 0xa3b5, 0xa3b6, 0xa3b6, 0xa3b7, 0xa3b8, - 0xa3b8, 0xa3b9, 0xa3b9, 0xa3ba, 0xa3ba, 0xa3bb, 0xa3bb, 0xa3bc, - 0xa3bc, 0xa3bd, 0xa3bd, 0xa3be, 0xa3bf, 0xa3bf, 0xa3c0, 0xa3c0, - 0xa3c1, 0xa3c1, 0xa3c2, 0xa3c2, 0xa3c3, 0xa3c3, 0xa3c4, 0xa3c5, - 0xa3c5, 0xa3c6, 0xa3c6, 0xa3c7, 0xa3c7, 0xa3c8, 0xa3c8, 0xa3c9, - 0xa3c9, 0xa3ca, 0xa3ca, 0xa3cb, 0xa3cc, 0xa3cc, 0xa3cd, 0xa3cd, - 0xa3ce, 0xa3ce, 0xa3cf, 0xa3cf, 0xa3d0, 0xa3d0, 0xa3d1, 0xa3d1, - 0xa3d2, 0xa3d3, 0xa3d3, 0xa3d4, 0xa3d4, 0xa3d5, 0xa3d5, 0xa3d6, - 0xa3d6, 0xa3d7, 0xa3d7, 0xa3d8, 0xa3d8, 0xa3d9, 0xa3da, 0xa3da, - 0xa3db, 0xa3db, 0xa3dc, 0xa3dc, 0xa3dd, 0xa3dd, 0xa3de, 0xa3de, - 0xa3df, 0xa3df, 0xa3e0, 0xa3e0, 0xa3e1, 0xa3e2, 0xa3e2, 0xa3e3, - 0xa3e3, 0xa3e4, 0xa3e4, 0xa3e5, 0xa3e5, 0xa3e6, 0xa3e6, 0xa3e7, - 0xa3e7, 0xa3e8, 0xa3e8, 0xa3e9, 0xa3e9, 0xa3ea, 0xa3eb, 0xa3eb, - 0xa3ec, 0xa3ec, 0xa3ed, 0xa3ed, 0xa3ee, 0xa3ee, 0xa3ef, 0xa3ef, - 0xa3f0, 0xa3f0, 0xa3f1, 0xa3f1, 0xa3f2, 0xa3f2, 0xa3f3, 0xa3f3, - 0xa3f4, 0xa3f5, 0xa3f5, 0xa3f6, 0xa3f6, 0xa3f7, 0xa3f7, 0xa3f8, - 0xa3f8, 0xa3f9, 0xa3f9, 0xa3fa, 0xa3fa, 0xa3fb, 0xa3fb, 0xa3fc, - 0xa3fc, 0xa3fd, 0xa3fd, 0xa3fe, 0xa3fe, 0xa3ff, 0xa400, 0xa400, - 0xa400, 0xa401, 0xa401, 0xa401, 0xa401, 0xa402, 0xa402, 0xa402, - 0xa402, 0xa403, 0xa403, 0xa403, 0xa403, 0xa404, 0xa404, 0xa404, - 0xa404, 0xa405, 0xa405, 0xa405, 0xa405, 0xa406, 0xa406, 0xa406, - 0xa407, 0xa407, 0xa407, 0xa407, 0xa408, 0xa408, 0xa408, 0xa408, - 0xa409, 0xa409, 0xa409, 0xa409, 0xa40a, 0xa40a, 0xa40a, 0xa40a, - 0xa40b, 0xa40b, 0xa40b, 0xa40b, 0xa40c, 0xa40c, 0xa40c, 0xa40c, - 0xa40d, 0xa40d, 0xa40d, 0xa40d, 0xa40e, 0xa40e, 0xa40e, 0xa40f, - 0xa40f, 0xa40f, 0xa40f, 0xa410, 0xa410, 0xa410, 0xa410, 0xa411, - 0xa411, 0xa411, 0xa411, 0xa412, 0xa412, 0xa412, 0xa412, 0xa413, - 0xa413, 0xa413, 0xa413, 0xa414, 0xa414, 0xa414, 0xa414, 0xa415, - 0xa415, 0xa415, 0xa415, 0xa416, 0xa416, 0xa416, 0xa416, 0xa417, - 0xa417, 0xa417, 0xa417, 0xa418, 0xa418, 0xa418, 0xa418, 0xa419, - 0xa419, 0xa419, 0xa419, 0xa41a, 0xa41a, 0xa41a, 0xa41b, 0xa41b, - 0xa41b, 0xa41b, 0xa41c, 0xa41c, 0xa41c, 0xa41c, 0xa41d, 0xa41d, - 0xa41d, 0xa41d, 0xa41e, 0xa41e, 0xa41e, 0xa41e, 0xa41f, 0xa41f, - 0xa41f, 0xa41f, 0xa420, 0xa420, 0xa420, 0xa420, 0xa421, 0xa421, - 0xa421, 0xa421, 0xa422, 0xa422, 0xa422, 0xa422, 0xa423, 0xa423, - 0xa423, 0xa423, 0xa424, 0xa424, 0xa424, 0xa424, 0xa425, 0xa425, - 0xa425, 0xa425, 0xa426, 0xa426, 0xa426, 0xa426, 0xa427, 0xa427, - 0xa427, 0xa427, 0xa428, 0xa428, 0xa428, 0xa428, 0xa429, 0xa429, - 0xa429, 0xa429, 0xa42a, 0xa42a, 0xa42a, 0xa42a, 0xa42b, 0xa42b, - 0xa42b, 0xa42b, 0xa42c, 0xa42c, 0xa42c, 0xa42c, 0xa42d, 0xa42d, - 0xa42d, 0xa42d, 0xa42e, 0xa42e, 0xa42e, 0xa42e, 0xa42f, 0xa42f, - 0xa42f, 0xa42f, 0xa430, 0xa430, 0xa430, 0xa430, 0xa431, 0xa431, - 0xa431, 0xa431, 0xa431, 0xa432, 0xa432, 0xa432, 0xa432, 0xa433, - 0xa433, 0xa433, 0xa433, 0xa434, 0xa434, 0xa434, 0xa434, 0xa435, - 0xa435, 0xa435, 0xa435, 0xa436, 0xa436, 0xa436, 0xa436, 0xa437, - 0xa437, 0xa437, 0xa437, 0xa438, 0xa438, 0xa438, 0xa438, 0xa439, - 0xa439, 0xa439, 0xa439, 0xa43a, 0xa43a, 0xa43a, 0xa43a, 0xa43b, - 0xa43b, 0xa43b, 0xa43b, 0xa43c, 0xa43c, 0xa43c, 0xa43c, 0xa43d, - 0xa43d, 0xa43d, 0xa43d, 0xa43e, 0xa43e, 0xa43e, 0xa43e, 0xa43e, - 0xa43f, 0xa43f, 0xa43f, 0xa43f, 0xa440, 0xa440, 0xa440, 0xa440, - 0xa441, 0xa441, 0xa441, 0xa441, 0xa442, 0xa442, 0xa442, 0xa442, - 0xa443, 0xa443, 0xa444, 0xa444, 0xa445, 0xa445, 0xa446, 0xa446, - 0xa446, 0xa447, 0xa447, 0xa448, 0xa448, 0xa449, 0xa449, 0xa44a, - 0xa44a, 0xa44b, 0xa44b, 0xa44c, 0xa44c, 0xa44d, 0xa44d, 0xa44e, - 0xa44e, 0xa44f, 0xa44f, 0xa450, 0xa450, 0xa451, 0xa451, 0xa451, - 0xa452, 0xa452, 0xa453, 0xa453, 0xa454, 0xa454, 0xa455, 0xa455, - 0xa456, 0xa456, 0xa457, 0xa457, 0xa458, 0xa458, 0xa459, 0xa459, - 0xa45a, 0xa45a, 0xa45a, 0xa45b, 0xa45b, 0xa45c, 0xa45c, 0xa45d, - 0xa45d, 0xa45e, 0xa45e, 0xa45f, 0xa45f, 0xa460, 0xa460, 0xa461, - 0xa461, 0xa462, 0xa462, 0xa462, 0xa463, 0xa463, 0xa464, 0xa464, - 0xa465, 0xa465, 0xa466, 0xa466, 0xa467, 0xa467, 0xa468, 0xa468, - 0xa469, 0xa469, 0xa469, 0xa46a, 0xa46a, 0xa46b, 0xa46b, 0xa46c, - 0xa46c, 0xa46d, 0xa46d, 0xa46e, 0xa46e, 0xa46f, 0xa46f, 0xa46f, - 0xa470, 0xa470, 0xa471, 0xa471, 0xa472, 0xa472, 0xa473, 0xa473, - 0xa474, 0xa474, 0xa475, 0xa475, 0xa475, 0xa476, 0xa476, 0xa477, - 0xa477, 0xa478, 0xa478, 0xa479, 0xa479, 0xa47a, 0xa47a, 0xa47a, - 0xa47b, 0xa47b, 0xa47c, 0xa47c, 0xa47d, 0xa47d, 0xa47e, 0xa47e, - 0xa47f, 0xa47f, 0xa47f, 0xa480, 0xa480, 0xa481, 0xa481, 0xa482, - 0xa482, 0xa483, 0xa483, 0xa484, 0xa484, 0xa484, 0xa485, 0xa485, - 0xa486, 0xa486, 0xa487, 0xa487, 0xa488, 0xa488, 0xa489, 0xa489, - 0xa489, 0xa48a, 0xa48a, 0xa48b, 0xa48b, 0xa48c, 0xa48c, 0xa48d, - 0xa48d, 0xa48d, 0xa48e, 0xa48e, 0xa48f, 0xa48f, 0xa490, 0xa490, - 0xa491, 0xa491, 0xa491, 0xa492, 0xa492, 0xa493, 0xa493, 0xa494, - 0xa494, 0xa495, 0xa495, 0xa495, 0xa496, 0xa496, 0xa497, 0xa497, - 0xa498, 0xa498, 0xa499, 0xa499, 0xa499, 0xa49a, 0xa49a, 0xa49b, - 0xa49b, 0xa49c, 0xa49c, 0xa49d, 0xa49d, 0xa49d, 0xa49e, 0xa49e, - 0xa49f, 0xa49f, 0xa4a0, 0xa4a0, 0xa4a0, 0xa4a1, 0xa4a1, 0xa4a2, - 0xa4a2, 0xa4a3, 0xa4a3, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a5, 0xa4a5, - 0xa4a6, 0xa4a6, 0xa4a7, 0xa4a7, 0xa4a7, 0xa4a8, 0xa4a8, 0xa4a9, - 0xa4a9, 0xa4aa, 0xa4aa, 0xa4ab, 0xa4ab, 0xa4ab, 0xa4ac, 0xa4ac, - 0xa4ad, 0xa4ad, 0xa4ae, 0xa4ae, 0xa4ae, 0xa4af, 0xa4af, 0xa4b0, - 0xa4b0, 0xa4b1, 0xa4b1, 0xa4b1, 0xa4b2, 0xa4b2, 0xa4b3, 0xa4b3, - 0xa4b4, 0xa4b4, 0xa4b4, 0xa4b5, 0xa4b5, 0xa4b6, 0xa4b6, 0xa4b7, - 0xa4b7, 0xa4b7, 0xa4b8, 0xa4b8, 0xa4b9, 0xa4b9, 0xa4ba, 0xa4ba, - 0xa4ba, 0xa4bb, 0xa4bb, 0xa4bc, 0xa4bc, 0xa4bd, 0xa4bd, 0xa4bd, - 0xa4be, 0xa4be, 0xa4bf, 0xa4bf, 0xa4c0, 0xa4c0, 0xa4c0, 0xa4c1, - 0xa4c1, 0xa4c2, 0xa4c2, 0xa4c3, 0xa4c3, 0xa4c3, 0xa4c4, 0xa4c4, - 0xa4c5, 0xa4c5, 0xa4c5, 0xa4c6, 0xa4c6, 0xa4c7, 0xa4c7, 0xa4c8, - 0xa4c8, 0xa4c8, 0xa4c9, 0xa4c9, 0xa4ca, 0xa4ca, 0xa4cb, 0xa4cb, - 0xa4cb, 0xa4cc, 0xa4cc, 0xa4cd, 0xa4cd, 0xa4cd, 0xa4ce, 0xa4ce, - 0xa4cf, 0xa4cf, 0xa4d0, 0xa4d0, 0xa4d0, 0xa4d1, 0xa4d1, 0xa4d2, - 0xa4d2, 0xa4d3, 0xa4d3, 0xa4d3, 0xa4d4, 0xa4d4, 0xa4d5, 0xa4d5, - 0xa4d5, 0xa4d6, 0xa4d6, 0xa4d7, 0xa4d7, 0xa4d8, 0xa4d8, 0xa4d8, - 0xa4d9, 0xa4d9, 0xa4da, 0xa4da, 0xa4da, 0xa4db, 0xa4db, 0xa4dc, - 0xa4dc, 0xa4dc, 0xa4dd, 0xa4dd, 0xa4de, 0xa4de, 0xa4df, 0xa4df, - 0xa4df, 0xa4e0, 0xa4e0, 0xa4e1, 0xa4e1, 0xa4e1, 0xa4e2, 0xa4e2, - 0xa4e3, 0xa4e3, 0xa4e3, 0xa4e4, 0xa4e4, 0xa4e5, 0xa4e5, 0xa4e6, - 0xa4e6, 0xa4e6, 0xa4e7, 0xa4e7, 0xa4e8, 0xa4e8, 0xa4e8, 0xa4e9, - 0xa4e9, 0xa4ea, 0xa4ea, 0xa4ea, 0xa4eb, 0xa4eb, 0xa4ec, 0xa4ec, - 0xa4ec, 0xa4ed, 0xa4ed, 0xa4ee, 0xa4ee, 0xa4ee, 0xa4ef, 0xa4ef, - 0xa4f0, 0xa4f0, 0xa4f1, 0xa4f1, 0xa4f1, 0xa4f2, 0xa4f2, 0xa4f3, - 0xa4f3, 0xa4f3, 0xa4f4, 0xa4f4, 0xa4f5, 0xa4f5, 0xa4f5, 0xa4f6, - 0xa4f6, 0xa4f7, 0xa4f7, 0xa4f7, 0xa4f8, 0xa4f8, 0xa4f9, 0xa4f9, - 0xa4f9, 0xa4fa, 0xa4fa, 0xa4fb, 0xa4fb, 0xa4fb, 0xa4fc, 0xa4fc, - 0xa4fd, 0xa4fd, 0xa4fd, 0xa4fe, 0xa4fe, 0xa4ff, 0xa4ff, 0xa4ff, - 0xa500, 0xa500, 0xa501, 0xa501, 0xa501, 0xa502, 0xa502, 0xa503, - 0xa503, 0xa503, 0xa504, 0xa504, 0xa505, 0xa505, 0xa505, 0xa506, - 0xa506, 0xa507, 0xa507, 0xa507, 0xa508, 0xa508, 0xa509, 0xa509, - 0xa509, 0xa50a, 0xa50a, 0xa50b, 0xa50b, 0xa50b, 0xa50c, 0xa50c, - 0xa50d, 0xa50d, 0xa50d, 0xa50e, 0xa50e, 0xa50f, 0xa50f, 0xa50f, - 0xa510, 0xa510, 0xa510, 0xa511, 0xa511, 0xa512, 0xa512, 0xa512, - 0xa513, 0xa513, 0xa514, 0xa514, 0xa514, 0xa515, 0xa515, 0xa516, - 0xa516, 0xa516, 0xa517, 0xa517, 0xa518, 0xa518, 0xa518, 0xa519, - 0xa519, 0xa519, 0xa51a, 0xa51a, 0xa51b, 0xa51b, 0xa51b, 0xa51c, - 0xa51c, 0xa51d, 0xa51d, 0xa51d, 0xa51e, 0xa51e, 0xa51f, 0xa51f, - 0xa51f, 0xa520, 0xa520, 0xa520, 0xa521, 0xa521, 0xa522, 0xa522, - 0xa522, 0xa523, 0xa523, 0xa524, 0xa524, 0xa524, 0xa525, 0xa525, - 0xa526, 0xa526, 0xa526, 0xa527, 0xa527, 0xa527, 0xa528, 0xa528, - 0xa529, 0xa529, 0xa529, 0xa52a, 0xa52a, 0xa52b, 0xa52b, 0xa52b, - 0xa52c, 0xa52c, 0xa52c, 0xa52d, 0xa52d, 0xa52e, 0xa52e, 0xa52e, - 0xa52f, 0xa52f, 0xa52f, 0xa530, 0xa530, 0xa531, 0xa531, 0xa531, - 0xa532, 0xa532, 0xa533, 0xa533, 0xa533, 0xa534, 0xa534, 0xa534, - 0xa535, 0xa535, 0xa536, 0xa536, 0xa536, 0xa537, 0xa537, 0xa537, - 0xa538, 0xa538, 0xa539, 0xa539, 0xa539, 0xa53a, 0xa53a, 0xa53b, - 0xa53b, 0xa53b, 0xa53c, 0xa53c, 0xa53c, 0xa53d, 0xa53d, 0xa53e, - 0xa53e, 0xa53e, 0xa53f, 0xa53f, 0xa53f, 0xa540, 0xa540, 0xa541, - 0xa541, 0xa541, 0xa542, 0xa542, 0xa542, 0xa543, 0xa543, 0xa544, - 0xa544, 0xa544, 0xa545, 0xa545, 0xa545, 0xa546, 0xa546, 0xa547, - 0xa547, 0xa547, 0xa548, 0xa548, 0xa548, 0xa549, 0xa549, 0xa54a, - 0xa54a, 0xa54a, 0xa54b, 0xa54b, 0xa54b, 0xa54c, 0xa54c, 0xa54d, - 0xa54d, 0xa54d, 0xa54e, 0xa54e, 0xa54e, 0xa54f, 0xa54f, 0xa550, - 0xa550, 0xa550, 0xa551, 0xa551, 0xa551, 0xa552, 0xa552, 0xa553, - 0xa553, 0xa553, 0xa554, 0xa554, 0xa554, 0xa555, 0xa555, 0xa555, - 0xa556, 0xa556, 0xa557, 0xa557, 0xa557, 0xa558, 0xa558, 0xa558, - 0xa559, 0xa559, 0xa55a, 0xa55a, 0xa55a, 0xa55b, 0xa55b, 0xa55b, - 0xa55c, 0xa55c, 0xa55c, 0xa55d, 0xa55d, 0xa55e, 0xa55e, 0xa55e, - 0xa55f, 0xa55f, 0xa55f, 0xa560, 0xa560, 0xa561, 0xa561, 0xa561, - 0xa562, 0xa562, 0xa562, 0xa563, 0xa563, 0xa563, 0xa564, 0xa564, - 0xa565, 0xa565, 0xa565, 0xa566, 0xa566, 0xa566, 0xa567, 0xa567, - 0xa567, 0xa568, 0xa568, 0xa569, 0xa569, 0xa569, 0xa56a, 0xa56a, - 0xa56a, 0xa56b, 0xa56b, 0xa56b, 0xa56c, 0xa56c, 0xa56d, 0xa56d, - 0xa56d, 0xa56e, 0xa56e, 0xa56e, 0xa56f, 0xa56f, 0xa56f, 0xa570, - 0xa570, 0xa570, 0xa571, 0xa571, 0xa572, 0xa572, 0xa572, 0xa573, - 0xa573, 0xa573, 0xa574, 0xa574, 0xa574, 0xa575, 0xa575, 0xa576, - 0xa576, 0xa576, 0xa577, 0xa577, 0xa577, 0xa578, 0xa578, 0xa578, - 0xa579, 0xa579, 0xa579, 0xa57a, 0xa57a, 0xa57b, 0xa57b, 0xa57b, - 0xa57c, 0xa57c, 0xa57c, 0xa57d, 0xa57d, 0xa57d, 0xa57e, 0xa57e, - 0xa57e, 0xa57f, 0xa57f, 0xa580, 0xa580, 0xa580, 0xa581, 0xa581, - 0xa581, 0xa582, 0xa582, 0xa582, 0xa583, 0xa583, 0xa583, 0xa584, - 0xa584, 0xa585, 0xa585, 0xa585, 0xa586, 0xa586, 0xa586, 0xa587, - 0xa587, 0xa587, 0xa588, 0xa588, 0xa588, 0xa589, 0xa589, 0xa58a, - 0xa58a, 0xa58a, 0xa58b, 0xa58b, 0xa58b, 0xa58c, 0xa58c, 0xa58c, - 0xa58d, 0xa58d, 0xa58d, 0xa58e, 0xa58e, 0xa58e, 0xa58f, 0xa58f, - 0xa58f, 0xa590, 0xa590, 0xa591, 0xa591, 0xa591, 0xa592, 0xa592, - 0xa592, 0xa593, 0xa593, 0xa593, 0xa594, 0xa594, 0xa594, 0xa595, - 0xa595, 0xa595, 0xa596, 0xa596, 0xa597, 0xa597, 0xa597, 0xa598, - 0xa598, 0xa598, 0xa599, 0xa599, 0xa599, 0xa59a, 0xa59a, 0xa59a, - 0xa59b, 0xa59b, 0xa59b, 0xa59c, 0xa59c, 0xa59c, 0xa59d, 0xa59d, - 0xa59d, 0xa59e, 0xa59e, 0xa59f, 0xa59f, 0xa59f, 0xa5a0, 0xa5a0, - 0xa5a0, 0xa5a1, 0xa5a1, 0xa5a1, 0xa5a2, 0xa5a2, 0xa5a2, 0xa5a3, - 0xa5a3, 0xa5a3, 0xa5a4, 0xa5a4, 0xa5a4, 0xa5a5, 0xa5a5, 0xa5a5, - 0xa5a6, 0xa5a6, 0xa5a6, 0xa5a7, 0xa5a7, 0xa5a8, 0xa5a8, 0xa5a8, - 0xa5a9, 0xa5a9, 0xa5a9, 0xa5aa, 0xa5aa, 0xa5aa, 0xa5ab, 0xa5ab, - 0xa5ab, 0xa5ac, 0xa5ac, 0xa5ac, 0xa5ad, 0xa5ad, 0xa5ad, 0xa5ae, - 0xa5ae, 0xa5ae, 0xa5af, 0xa5af, 0xa5af, 0xa5b0, 0xa5b0, 0xa5b0, - 0xa5b1, 0xa5b1, 0xa5b1, 0xa5b2, 0xa5b2, 0xa5b2, 0xa5b3, 0xa5b3, - 0xa5b4, 0xa5b4, 0xa5b4, 0xa5b5, 0xa5b5, 0xa5b5, 0xa5b6, 0xa5b6, - 0xa5b6, 0xa5b7, 0xa5b7, 0xa5b7, 0xa5b8, 0xa5b8, 0xa5b8, 0xa5b9, - 0xa5b9, 0xa5b9, 0xa5ba, 0xa5ba, 0xa5ba, 0xa5bb, 0xa5bb, 0xa5bb, - 0xa5bc, 0xa5bc, 0xa5bc, 0xa5bd, 0xa5bd, 0xa5bd, 0xa5be, 0xa5be, - 0xa5be, 0xa5bf, 0xa5bf, 0xa5bf, 0xa5c0, 0xa5c0, 0xa5c0, 0xa5c1, - 0xa5c1, 0xa5c1, 0xa5c2, 0xa5c2, 0xa5c2, 0xa5c3, 0xa5c3, 0xa5c3, - 0xa5c4, 0xa5c4, 0xa5c4, 0xa5c5, 0xa5c5, 0xa5c5, 0xa5c6, 0xa5c6, - 0xa5c6, 0xa5c7, 0xa5c7, 0xa5c7, 0xa5c8, 0xa5c8, 0xa5c8, 0xa5c9, - 0xa5c9, 0xa5ca, 0xa5ca, 0xa5ca, 0xa5cb, 0xa5cb, 0xa5cb, 0xa5cc, - 0xa5cc, 0xa5cc, 0xa5cd, 0xa5cd, 0xa5cd, 0xa5ce, 0xa5ce, 0xa5ce, - 0xa5cf, 0xa5cf, 0xa5cf, 0xa5d0, 0xa5d0, 0xa5d0, 0xa5d1, 0xa5d1, - 0xa5d1, 0xa5d2, 0xa5d2, 0xa5d2, 0xa5d3, 0xa5d3, 0xa5d3, 0xa5d4, - 0xa5d4, 0xa5d4, 0xa5d5, 0xa5d5, 0xa5d5, 0xa5d6, 0xa5d6, 0xa5d6, - 0xa5d7, 0xa5d7, 0xa5d8, 0xa5d8, 0xa5d9, 0xa5da, 0xa5da, 0xa5db, - 0xa5dc, 0xa5dc, 0xa5dd, 0xa5de, 0xa5de, 0xa5df, 0xa5e0, 0xa5e0, - 0xa5e1, 0xa5e2, 0xa5e2, 0xa5e3, 0xa5e4, 0xa5e4, 0xa5e5, 0xa5e6, - 0xa5e6, 0xa5e7, 0xa5e8, 0xa5e8, 0xa5e9, 0xa5ea, 0xa5ea, 0xa5eb, - 0xa5ec, 0xa5ec, 0xa5ed, 0xa5ee, 0xa5ee, 0xa5ef, 0xa5ef, 0xa5f0, - 0xa5f1, 0xa5f1, 0xa5f2, 0xa5f3, 0xa5f3, 0xa5f4, 0xa5f5, 0xa5f5, - 0xa5f6, 0xa5f7, 0xa5f7, 0xa5f8, 0xa5f9, 0xa5f9, 0xa5fa, 0xa5fa, - 0xa5fb, 0xa5fc, 0xa5fc, 0xa5fd, 0xa5fe, 0xa5fe, 0xa5ff, 0xa600, - 0xa600, 0xa601, 0xa602, 0xa602, 0xa603, 0xa603, 0xa604, 0xa605, - 0xa605, 0xa606, 0xa607, 0xa607, 0xa608, 0xa609, 0xa609, 0xa60a, - 0xa60a, 0xa60b, 0xa60c, 0xa60c, 0xa60d, 0xa60e, 0xa60e, 0xa60f, - 0xa610, 0xa610, 0xa611, 0xa611, 0xa612, 0xa613, 0xa613, 0xa614, - 0xa615, 0xa615, 0xa616, 0xa617, 0xa617, 0xa618, 0xa618, 0xa619, - 0xa61a, 0xa61a, 0xa61b, 0xa61c, 0xa61c, 0xa61d, 0xa61d, 0xa61e, - 0xa61f, 0xa61f, 0xa620, 0xa621, 0xa621, 0xa622, 0xa622, 0xa623, - 0xa624, 0xa624, 0xa625, 0xa626, 0xa626, 0xa627, 0xa627, 0xa628, - 0xa629, 0xa629, 0xa62a, 0xa62b, 0xa62b, 0xa62c, 0xa62c, 0xa62d, - 0xa62e, 0xa62e, 0xa62f, 0xa630, 0xa630, 0xa631, 0xa631, 0xa632, - 0xa633, 0xa633, 0xa634, 0xa634, 0xa635, 0xa636, 0xa636, 0xa637, - 0xa638, 0xa638, 0xa639, 0xa639, 0xa63a, 0xa63b, 0xa63b, 0xa63c, - 0xa63c, 0xa63d, 0xa63e, 0xa63e, 0xa63f, 0xa640, 0xa640, 0xa641, - 0xa641, 0xa642, 0xa643, 0xa643, 0xa644, 0xa644, 0xa645, 0xa646, - 0xa646, 0xa647, 0xa647, 0xa648, 0xa649, 0xa649, 0xa64a, 0xa64a, - 0xa64b, 0xa64c, 0xa64c, 0xa64d, 0xa64e, 0xa64e, 0xa64f, 0xa64f, - 0xa650, 0xa651, 0xa651, 0xa652, 0xa652, 0xa653, 0xa654, 0xa654, - 0xa655, 0xa655, 0xa656, 0xa657, 0xa657, 0xa658, 0xa658, 0xa659, - 0xa65a, 0xa65a, 0xa65b, 0xa65b, 0xa65c, 0xa65d, 0xa65d, 0xa65e, - 0xa65e, 0xa65f, 0xa660, 0xa660, 0xa661, 0xa661, 0xa662, 0xa663, - 0xa663, 0xa664, 0xa664, 0xa665, 0xa666, 0xa666, 0xa667, 0xa667, - 0xa668, 0xa668, 0xa669, 0xa66a, 0xa66a, 0xa66b, 0xa66b, 0xa66c, - 0xa66d, 0xa66d, 0xa66e, 0xa66e, 0xa66f, 0xa670, 0xa670, 0xa671, - 0xa671, 0xa672, 0xa673, 0xa673, 0xa674, 0xa674, 0xa675, 0xa675, - 0xa676, 0xa677, 0xa677, 0xa678, 0xa678, 0xa679, 0xa67a, 0xa67a, - 0xa67b, 0xa67b, 0xa67c, 0xa67c, 0xa67d, 0xa67e, 0xa67e, 0xa67f, - 0xa67f, 0xa680, 0xa681, 0xa681, 0xa682, 0xa682, 0xa683, 0xa683, - 0xa684, 0xa685, 0xa685, 0xa686, 0xa686, 0xa687, 0xa688, 0xa688, - 0xa689, 0xa689, 0xa68a, 0xa68a, 0xa68b, 0xa68c, 0xa68c, 0xa68d, - 0xa68d, 0xa68e, 0xa68f, 0xa68f, 0xa690, 0xa690, 0xa691, 0xa691, - 0xa692, 0xa693, 0xa693, 0xa694, 0xa694, 0xa695, 0xa695, 0xa696, - 0xa697, 0xa697, 0xa698, 0xa698, 0xa699, 0xa699, 0xa69a, 0xa69b, - 0xa69b, 0xa69c, 0xa69c, 0xa69d, 0xa69d, 0xa69e, 0xa69f, 0xa69f, - 0xa6a0, 0xa6a0, 0xa6a1, 0xa6a1, 0xa6a2, 0xa6a3, 0xa6a3, 0xa6a4, - 0xa6a4, 0xa6a5, 0xa6a5, 0xa6a6, 0xa6a7, 0xa6a7, 0xa6a8, 0xa6a8, - 0xa6a9, 0xa6a9, 0xa6aa, 0xa6aa, 0xa6ab, 0xa6ac, 0xa6ac, 0xa6ad, - 0xa6ad, 0xa6ae, 0xa6ae, 0xa6af, 0xa6b0, 0xa6b0, 0xa6b1, 0xa6b1, - 0xa6b2, 0xa6b2, 0xa6b3, 0xa6b4, 0xa6b4, 0xa6b5, 0xa6b5, 0xa6b6, - 0xa6b6, 0xa6b7, 0xa6b7, 0xa6b8, 0xa6b9, 0xa6b9, 0xa6ba, 0xa6ba, - 0xa6bb, 0xa6bb, 0xa6bc, 0xa6bc, 0xa6bd, 0xa6be, 0xa6be, 0xa6bf, - 0xa6bf, 0xa6c0, 0xa6c0, 0xa6c1, 0xa6c2, 0xa6c2, 0xa6c3, 0xa6c3, - 0xa6c4, 0xa6c4, 0xa6c5, 0xa6c5, 0xa6c6, 0xa6c7, 0xa6c7, 0xa6c8, - 0xa6c8, 0xa6c9, 0xa6c9, 0xa6ca, 0xa6ca, 0xa6cb, 0xa6cb, 0xa6cc, - 0xa6cd, 0xa6cd, 0xa6ce, 0xa6ce, 0xa6cf, 0xa6cf, 0xa6d0, 0xa6d0, - 0xa6d1, 0xa6d2, 0xa6d2, 0xa6d3, 0xa6d3, 0xa6d4, 0xa6d4, 0xa6d5, - 0xa6d5, 0xa6d6, 0xa6d7, 0xa6d7, 0xa6d8, 0xa6d8, 0xa6d9, 0xa6d9, - 0xa6da, 0xa6da, 0xa6db, 0xa6db, 0xa6dc, 0xa6dd, 0xa6dd, 0xa6de, - 0xa6de, 0xa6df, 0xa6df, 0xa6e0, 0xa6e0, 0xa6e1, 0xa6e1, 0xa6e2, - 0xa6e3, 0xa6e3, 0xa6e4, 0xa6e4, 0xa6e5, 0xa6e5, 0xa6e6, 0xa6e6, - 0xa6e7, 0xa6e7, 0xa6e8, 0xa6e9, 0xa6e9, 0xa6ea, 0xa6ea, 0xa6eb, - 0xa6eb, 0xa6ec, 0xa6ec, 0xa6ed, 0xa6ed, 0xa6ee, 0xa6ee, 0xa6ef, - 0xa6f0, 0xa6f0, 0xa6f1, 0xa6f1, 0xa6f2, 0xa6f2, 0xa6f3, 0xa6f3, - 0xa6f4, 0xa6f4, 0xa6f5, 0xa6f5, 0xa6f6, 0xa6f7, 0xa6f7, 0xa6f8, - 0xa6f8, 0xa6f9, 0xa6f9, 0xa6fa, 0xa6fa, 0xa6fb, 0xa6fb, 0xa6fc, - 0xa6fc, 0xa6fd, 0xa6fe, 0xa6fe, 0xa6ff, 0xa6ff, 0xa700, 0xa700, - 0xa701, 0xa701, 0xa702, 0xa702, 0xa703, 0xa703, 0xa704, 0xa704, - 0xa705, 0xa705, 0xa706, 0xa707, 0xa707, 0xa708, 0xa708, 0xa709, - 0xa709, 0xa70a, 0xa70a, 0xa70b, 0xa70b, 0xa70c, 0xa70c, 0xa70d, - 0xa70d, 0xa70e, 0xa70f, 0xa70f, 0xa710, 0xa710, 0xa711, 0xa711, - 0xa712, 0xa712, 0xa713, 0xa713, 0xa714, 0xa714, 0xa715, 0xa715, - 0xa716, 0xa716, 0xa717, 0xa717, 0xa718, 0xa719, 0xa719, 0xa71a, - 0xa71a, 0xa71b, 0xa71b, 0xa71c, 0xa71c, 0xa71d, 0xa71d, 0xa71e, - 0xa71e, 0xa71f, 0xa71f, 0xa720, 0xa720, 0xa721, 0xa721, 0xa722, - 0xa722, 0xa723, 0xa723, 0xa724, 0xa725, 0xa725, 0xa726, 0xa726, - 0xa727, 0xa727, 0xa728, 0xa728, 0xa729, 0xa729, 0xa72a, 0xa72a, - 0xa72b, 0xa72b, 0xa72c, 0xa72c, 0xa72d, 0xa72d, 0xa72e, 0xa72e, - 0xa72f, 0xa72f, 0xa730, 0xa730, 0xa731, 0xa732, 0xa732, 0xa733, - 0xa733, 0xa734, 0xa734, 0xa735, 0xa735, 0xa736, 0xa736, 0xa737, - 0xa737, 0xa738, 0xa738, 0xa739, 0xa739, 0xa73a, 0xa73a, 0xa73b, - 0xa73b, 0xa73c, 0xa73c, 0xa73d, 0xa73d, 0xa73e, 0xa73e, 0xa73f, - 0xa73f, 0xa740, 0xa740, 0xa741, 0xa741, 0xa742, 0xa742, 0xa743, - 0xa743, 0xa744, 0xa744, 0xa745, 0xa746, 0xa746, 0xa747, 0xa747, - 0xa748, 0xa748, 0xa749, 0xa749, 0xa74a, 0xa74a, 0xa74b, 0xa74b, - 0xa74c, 0xa74c, 0xa74d, 0xa74d, 0xa74e, 0xa74e, 0xa74f, 0xa74f, - 0xa750, 0xa750, 0xa751, 0xa751, 0xa752, 0xa752, 0xa753, 0xa753, - 0xa754, 0xa754, 0xa755, 0xa755, 0xa756, 0xa756, 0xa757, 0xa757, - 0xa758, 0xa758, 0xa759, 0xa759, 0xa75a, 0xa75a, 0xa75b, 0xa75b, - 0xa75c, 0xa75c, 0xa75d, 0xa75d, 0xa75e, 0xa75e, 0xa75f, 0xa75f, - 0xa760, 0xa760, 0xa761, 0xa761, 0xa762, 0xa762, 0xa763, 0xa763, - 0xa764, 0xa764, 0xa765, 0xa765, 0xa766, 0xa766, 0xa767, 0xa767, - 0xa768, 0xa768, 0xa769, 0xa769, 0xa76a, 0xa76a, 0xa76b, 0xa76b, - 0xa76c, 0xa76c, 0xa76d, 0xa76d, 0xa76e, 0xa76e, 0xa76f, 0xa76f, - 0xa770, 0xa770, 0xa771, 0xa771, 0xa772, 0xa772, 0xa773, 0xa773, - 0xa774, 0xa774, 0xa775, 0xa775, 0xa776, 0xa776, 0xa777, 0xa777, - 0xa778, 0xa778, 0xa779, 0xa779, 0xa77a, 0xa77a, 0xa77b, 0xa77b, - 0xa77c, 0xa77c, 0xa77d, 0xa77d, 0xa77e, 0xa77e, 0xa77f, 0xa77f, - 0xa780, 0xa780, 0xa781, 0xa781, 0xa782, 0xa782, 0xa782, 0xa783, - 0xa783, 0xa784, 0xa784, 0xa785, 0xa785, 0xa786, 0xa786, 0xa787, - 0xa787, 0xa788, 0xa788, 0xa789, 0xa789, 0xa78a, 0xa78a, 0xa78b, - 0xa78b, 0xa78c, 0xa78c, 0xa78d, 0xa78d, 0xa78e, 0xa78e, 0xa78f, - 0xa78f, 0xa790, 0xa790, 0xa791, 0xa791, 0xa792, 0xa792, 0xa793, - 0xa793, 0xa794, 0xa794, 0xa795, 0xa795, 0xa796, 0xa796, 0xa796, - 0xa797, 0xa797, 0xa798, 0xa798, 0xa799, 0xa799, 0xa79a, 0xa79a, - 0xa79b, 0xa79b, 0xa79c, 0xa79c, 0xa79d, 0xa79d, 0xa79e, 0xa79e, - 0xa79f, 0xa79f, 0xa7a0, 0xa7a0, 0xa7a1, 0xa7a1, 0xa7a2, 0xa7a2, - 0xa7a3, 0xa7a3, 0xa7a4, 0xa7a4, 0xa7a4, 0xa7a5, 0xa7a5, 0xa7a6, - 0xa7a6, 0xa7a7, 0xa7a7, 0xa7a8, 0xa7a8, 0xa7a9, 0xa7a9, 0xa7aa, - 0xa7aa, 0xa7ab, 0xa7ab, 0xa7ac, 0xa7ac, 0xa7ad, 0xa7ad, 0xa7ae, - 0xa7ae, 0xa7af, 0xa7af, 0xa7af, 0xa7b0, 0xa7b0, 0xa7b1, 0xa7b1, - 0xa7b2, 0xa7b2, 0xa7b3, 0xa7b3, 0xa7b4, 0xa7b4, 0xa7b5, 0xa7b5, - 0xa7b6, 0xa7b6, 0xa7b7, 0xa7b7, 0xa7b8, 0xa7b8, 0xa7b9, 0xa7b9, - 0xa7b9, 0xa7ba, 0xa7ba, 0xa7bb, 0xa7bb, 0xa7bc, 0xa7bc, 0xa7bd, - 0xa7bd, 0xa7be, 0xa7be, 0xa7bf, 0xa7bf, 0xa7c0, 0xa7c0, 0xa7c1, - 0xa7c1, 0xa7c1, 0xa7c2, 0xa7c2, 0xa7c3, 0xa7c3, 0xa7c4, 0xa7c4, - 0xa7c5, 0xa7c5, 0xa7c6, 0xa7c6, 0xa7c7, 0xa7c7, 0xa7c8, 0xa7c8, - 0xa7c9, 0xa7c9, 0xa7c9, 0xa7ca, 0xa7ca, 0xa7cb, 0xa7cb, 0xa7cc, - 0xa7cc, 0xa7cd, 0xa7cd, 0xa7ce, 0xa7ce, 0xa7cf, 0xa7cf, 0xa7d0, - 0xa7d0, 0xa7d1, 0xa7d1, 0xa7d1, 0xa7d2, 0xa7d2, 0xa7d3, 0xa7d3, - 0xa7d4, 0xa7d4, 0xa7d5, 0xa7d5, 0xa7d6, 0xa7d6, 0xa7d7, 0xa7d7, - 0xa7d8, 0xa7d8, 0xa7d8, 0xa7d9, 0xa7d9, 0xa7da, 0xa7da, 0xa7db, - 0xa7db, 0xa7dc, 0xa7dc, 0xa7dd, 0xa7dd, 0xa7de, 0xa7de, 0xa7de, - 0xa7df, 0xa7df, 0xa7e0, 0xa7e0, 0xa7e1, 0xa7e1, 0xa7e2, 0xa7e2, - 0xa7e3, 0xa7e3, 0xa7e4, 0xa7e4, 0xa7e5, 0xa7e5, 0xa7e5, 0xa7e6, - 0xa7e6, 0xa7e7, 0xa7e7, 0xa7e8, 0xa7e8, 0xa7e9, 0xa7e9, 0xa7ea, - 0xa7ea, 0xa7eb, 0xa7eb, 0xa7eb, 0xa7ec, 0xa7ec, 0xa7ed, 0xa7ed, - 0xa7ee, 0xa7ee, 0xa7ef, 0xa7ef, 0xa7f0, 0xa7f0, 0xa7f0, 0xa7f1, - 0xa7f1, 0xa7f2, 0xa7f2, 0xa7f3, 0xa7f3, 0xa7f4, 0xa7f4, 0xa7f5, - 0xa7f5, 0xa7f6, 0xa7f6, 0xa7f6, 0xa7f7, 0xa7f7, 0xa7f8, 0xa7f8, - 0xa7f9, 0xa7f9, 0xa7fa, 0xa7fa, 0xa7fb, 0xa7fb, 0xa7fb, 0xa7fc, - 0xa7fc, 0xa7fd, 0xa7fd, 0xa7fe, 0xa7fe, 0xa7ff, 0xa7ff, 0xa800, - 0xa800, 0xa800, 0xa801, 0xa801, 0xa802, 0xa802, 0xa803, 0xa803, - 0xa804, 0xa804, 0xa805, 0xa805, 0xa805, 0xa806, 0xa806, 0xa807, - 0xa807, 0xa808, 0xa808, 0xa809, 0xa809, 0xa809, 0xa80a, 0xa80a, - 0xa80b, 0xa80b, 0xa80c, 0xa80c, 0xa80d, 0xa80d, 0xa80e, 0xa80e, - 0xa80e, 0xa80f, 0xa80f, 0xa810, 0xa810, 0xa811, 0xa811, 0xa812, - 0xa812, 0xa812, 0xa813, 0xa813, 0xa814, 0xa814, 0xa815, 0xa815, - 0xa816, 0xa816, 0xa816, 0xa817, 0xa817, 0xa818, 0xa818, 0xa819, - 0xa819, 0xa81a, 0xa81a, 0xa81a, 0xa81b, 0xa81b, 0xa81c, 0xa81c, - 0xa81d, 0xa81d, 0xa81d, 0xa81e, 0xa81e, 0xa81f, 0xa81f, 0xa820, - 0xa820, 0xa821, 0xa821, 0xa821, 0xa822, 0xa822, 0xa823, 0xa823, - 0xa824, 0xa824, 0xa824, 0xa825, 0xa825, 0xa826, 0xa826, 0xa827, - 0xa827, 0xa828, 0xa828, 0xa828, 0xa829, 0xa829, 0xa82a, 0xa82a, - 0xa82b, 0xa82b, 0xa82b, 0xa82c, 0xa82c, 0xa82d, 0xa82d, 0xa82e, - 0xa82e, 0xa82e, 0xa82f, 0xa82f, 0xa830, 0xa830, 0xa831, 0xa831, - 0xa831, 0xa832, 0xa832, 0xa833, 0xa833, 0xa834, 0xa834, 0xa834, - 0xa835, 0xa835, 0xa836, 0xa836, 0xa837, 0xa837, 0xa837, 0xa838, - 0xa838, 0xa839, 0xa839, 0xa83a, 0xa83a, 0xa83a, 0xa83b, 0xa83b, - 0xa83c, 0xa83c, 0xa83d, 0xa83d, 0xa83d, 0xa83e, 0xa83e, 0xa83f, - 0xa83f, 0xa840, 0xa840, 0xa840, 0xa841, 0xa841, 0xa842, 0xa842, - 0xa842, 0xa843, 0xa843, 0xa844, 0xa844, 0xa845, 0xa845, 0xa845, - 0xa846, 0xa846, 0xa847, 0xa847, 0xa848, 0xa848, 0xa848, 0xa849, - 0xa849, 0xa84a, 0xa84a, 0xa84a, 0xa84b, 0xa84b, 0xa84c, 0xa84c, - 0xa84d, 0xa84d, 0xa84d, 0xa84e, 0xa84e, 0xa84f, 0xa84f, 0xa84f, - 0xa850, 0xa850, 0xa851, 0xa851, 0xa852, 0xa852, 0xa852, 0xa853, - 0xa853, 0xa854, 0xa854, 0xa854, 0xa855, 0xa855, 0xa856, 0xa856, - 0xa857, 0xa857, 0xa857, 0xa858, 0xa858, 0xa859, 0xa859, 0xa859, - 0xa85a, 0xa85a, 0xa85b, 0xa85b, 0xa85b, 0xa85c, 0xa85c, 0xa85d, - 0xa85d, 0xa85d, 0xa85e, 0xa85e, 0xa85f, 0xa85f, 0xa860, 0xa860, - 0xa860, 0xa861, 0xa861, 0xa862, 0xa862, 0xa862, 0xa863, 0xa863, - 0xa864, 0xa864, 0xa864, 0xa865, 0xa865, 0xa866, 0xa866, 0xa866, - 0xa867, 0xa867, 0xa868, 0xa868, 0xa868, 0xa869, 0xa869, 0xa86a, - 0xa86a, 0xa86a, 0xa86b, 0xa86b, 0xa86c, 0xa86c, 0xa86d, 0xa86d, - 0xa86d, 0xa86e, 0xa86e, 0xa86f, 0xa86f, 0xa86f, 0xa870, 0xa870, - 0xa871, 0xa871, 0xa871, 0xa872, 0xa872, 0xa873, 0xa873, 0xa873, - 0xa874, 0xa874, 0xa875, 0xa875, 0xa875, 0xa876, 0xa876, 0xa877, - 0xa877, 0xa877, 0xa878, 0xa878, 0xa879, 0xa879, 0xa879, 0xa87a, - 0xa87a, 0xa87b, 0xa87b, 0xa87b, 0xa87c, 0xa87c, 0xa87c, 0xa87d, - 0xa87d, 0xa87e, 0xa87e, 0xa87e, 0xa87f, 0xa87f, 0xa880, 0xa880, - 0xa880, 0xa881, 0xa881, 0xa882, 0xa882, 0xa882, 0xa883, 0xa883, - 0xa884, 0xa884, 0xa884, 0xa885, 0xa885, 0xa886, 0xa886, 0xa886, - 0xa887, 0xa887, 0xa888, 0xa888, 0xa888, 0xa889, 0xa889, 0xa889, - 0xa88a, 0xa88a, 0xa88b, 0xa88b, 0xa88b, 0xa88c, 0xa88c, 0xa88d, - 0xa88d, 0xa88d, 0xa88e, 0xa88e, 0xa88f, 0xa88f, 0xa88f, 0xa890, - 0xa890, 0xa890, 0xa891, 0xa891, 0xa892, 0xa892, 0xa892, 0xa893, - 0xa893, 0xa894, 0xa894, 0xa894, 0xa895, 0xa895, 0xa896, 0xa896, - 0xa896, 0xa897, 0xa897, 0xa897, 0xa898, 0xa898, 0xa899, 0xa899, - 0xa899, 0xa89a, 0xa89a, 0xa89b, 0xa89b, 0xa89b, 0xa89c, 0xa89c, - 0xa89c, 0xa89d, 0xa89d, 0xa89e, 0xa89e, 0xa89e, 0xa89f, 0xa89f, - 0xa89f, 0xa8a0, 0xa8a0, 0xa8a1, 0xa8a1, 0xa8a1, 0xa8a2, 0xa8a2, - 0xa8a3, 0xa8a3, 0xa8a3, 0xa8a4, 0xa8a4, 0xa8a4, 0xa8a5, 0xa8a5, - 0xa8a6, 0xa8a6, 0xa8a6, 0xa8a7, 0xa8a7, 0xa8a7, 0xa8a8, 0xa8a8, - 0xa8a9, 0xa8a9, 0xa8a9, 0xa8aa, 0xa8aa, 0xa8ab, 0xa8ab, 0xa8ab, - 0xa8ac, 0xa8ac, 0xa8ac, 0xa8ad, 0xa8ad, 0xa8ae, 0xa8ae, 0xa8ae, - 0xa8af, 0xa8af, 0xa8af, 0xa8b0, 0xa8b0, 0xa8b1, 0xa8b1, 0xa8b1, - 0xa8b2, 0xa8b2, 0xa8b2, 0xa8b3, 0xa8b3, 0xa8b4, 0xa8b4, 0xa8b4, - 0xa8b5, 0xa8b5, 0xa8b5, 0xa8b6, 0xa8b6, 0xa8b7, 0xa8b7, 0xa8b7, - 0xa8b8, 0xa8b8, 0xa8b8, 0xa8b9, 0xa8b9, 0xa8ba, 0xa8ba, 0xa8ba, - 0xa8bb, 0xa8bb, 0xa8bb, 0xa8bc, 0xa8bc, 0xa8bc, 0xa8bd, 0xa8bd, - 0xa8be, 0xa8be, 0xa8be, 0xa8bf, 0xa8bf, 0xa8bf, 0xa8c0, 0xa8c0, - 0xa8c1, 0xa8c1, 0xa8c1, 0xa8c2, 0xa8c2, 0xa8c2, 0xa8c3, 0xa8c3, - 0xa8c4, 0xa8c4, 0xa8c4, 0xa8c5, 0xa8c5, 0xa8c5, 0xa8c6, 0xa8c6, - 0xa8c6, 0xa8c7, 0xa8c7, 0xa8c8, 0xa8c8, 0xa8c8, 0xa8c9, 0xa8c9, - 0xa8c9, 0xa8ca, 0xa8ca, 0xa8ca, 0xa8cb, 0xa8cb, 0xa8cc, 0xa8cc, - 0xa8cc, 0xa8cd, 0xa8cd, 0xa8cd, 0xa8ce, 0xa8ce, 0xa8cf, 0xa8cf, - 0xa8cf, 0xa8d0, 0xa8d0, 0xa8d0, 0xa8d1, 0xa8d1, 0xa8d1, 0xa8d2, - 0xa8d2, 0xa8d3, 0xa8d3, 0xa8d3, 0xa8d4, 0xa8d4, 0xa8d4, 0xa8d5, - 0xa8d5, 0xa8d5, 0xa8d6, 0xa8d6, 0xa8d6, 0xa8d7, 0xa8d7, 0xa8d8, - 0xa8d8, 0xa8d8, 0xa8d9, 0xa8d9, 0xa8d9, 0xa8da, 0xa8da, 0xa8da, - 0xa8db, 0xa8db, 0xa8dc, 0xa8dc, 0xa8dc, 0xa8dd, 0xa8dd, 0xa8dd, - 0xa8de, 0xa8de, 0xa8de, 0xa8df, 0xa8df, 0xa8e0, 0xa8e0, 0xa8e0, - 0xa8e1, 0xa8e1, 0xa8e1, 0xa8e2, 0xa8e2, 0xa8e2, 0xa8e3, 0xa8e3, - 0xa8e3, 0xa8e4, 0xa8e4, 0xa8e5, 0xa8e5, 0xa8e5, 0xa8e6, 0xa8e6, - 0xa8e6, 0xa8e7, 0xa8e7, 0xa8e7, 0xa8e8, 0xa8e8, 0xa8e8, 0xa8e9, - 0xa8e9, 0xa8e9, 0xa8ea, 0xa8ea, 0xa8eb, 0xa8eb, 0xa8eb, 0xa8ec, - 0xa8ec, 0xa8ec, 0xa8ed, 0xa8ed, 0xa8ed, 0xa8ee, 0xa8ee, 0xa8ee, - 0xa8ef, 0xa8ef, 0xa8f0, 0xa8f0, 0xa8f0, 0xa8f1, 0xa8f1, 0xa8f1, - 0xa8f2, 0xa8f2, 0xa8f2, 0xa8f3, 0xa8f3, 0xa8f3, 0xa8f4, 0xa8f4, - 0xa8f4, 0xa8f5, 0xa8f5, 0xa8f6, 0xa8f6, 0xa8f6, 0xa8f7, 0xa8f7, - 0xa8f7, 0xa8f8, 0xa8f8, 0xa8f8, 0xa8f9, 0xa8f9, 0xa8f9, 0xa8fa, - 0xa8fa, 0xa8fa, 0xa8fb, 0xa8fb, 0xa8fb, 0xa8fc, 0xa8fc, 0xa8fd, - 0xa8fd, 0xa8fd, 0xa8fe, 0xa8fe, 0xa8fe, 0xa8ff, 0xa8ff, 0xa8ff, - 0xa900, 0xa900, 0xa900, 0xa901, 0xa901, 0xa901, 0xa902, 0xa902, - 0xa902, 0xa903, 0xa903, 0xa903, 0xa904, 0xa904, 0xa905, 0xa905, - 0xa905, 0xa906, 0xa906, 0xa906, 0xa907, 0xa907, 0xa907, 0xa908, - 0xa908, 0xa908, 0xa909, 0xa909, 0xa909, 0xa90a, 0xa90a, 0xa90a, - 0xa90b, 0xa90b, 0xa90b, 0xa90c, 0xa90c, 0xa90c, 0xa90d, 0xa90d, - 0xa90d, 0xa90e, 0xa90e, 0xa90e, 0xa90f, 0xa90f, 0xa910, 0xa910, - 0xa910, 0xa911, 0xa911, 0xa911, 0xa912, 0xa912, 0xa912, 0xa913, - 0xa913, 0xa913, 0xa914, 0xa914, 0xa914, 0xa915, 0xa915, 0xa915, - 0xa916, 0xa916, 0xa916, 0xa917, 0xa917, 0xa917, 0xa918, 0xa918, - 0xa918, 0xa919, 0xa919, 0xa919, 0xa91a, 0xa91a, 0xa91a, 0xa91b, - 0xa91b, 0xa91b, 0xa91c, 0xa91c, 0xa91c, 0xa91d, 0xa91d, 0xa91d, - 0xa91e, 0xa91e, 0xa91f, 0xa91f, 0xa91f, 0xa920, 0xa920, 0xa920, - 0xa921, 0xa921, 0xa921, 0xa922, 0xa922, 0xa922, 0xa923, 0xa923, - 0xa923, 0xa924, 0xa924, 0xa924, 0xa925, 0xa925, 0xa925, 0xa926, - 0xa926, 0xa926, 0xa927, 0xa927, 0xa927, 0xa928, 0xa928, 0xa928, - 0xa929, 0xa929, 0xa929, 0xa92a, 0xa92a, 0xa92a, 0xa92b, 0xa92b, - 0xa92b, 0xa92c, 0xa92c, 0xa92c, 0xa92d, 0xa92d, 0xa92d, 0xa92e, - 0xa92e, 0xa92e, 0xa92f, 0xa92f, 0xa92f, 0xa930, 0xa930, 0xa930, - 0xa931, 0xa931, 0xa931, 0xa932, 0xa932, 0xa932, 0xa933, 0xa933, - 0xa933, 0xa934, 0xa934, 0xa934, 0xa935, 0xa935, 0xa935, 0xa936, - 0xa936, 0xa936, 0xa937, 0xa937, 0xa937, 0xa938, 0xa938, 0xa938, - 0xa939, 0xa939, 0xa939, 0xa93a, 0xa93a, 0xa93a, 0xa93b, 0xa93b, - 0xa93b, 0xa93c, 0xa93c, 0xa93c, 0xa93d, 0xa93d, 0xa93d, 0xa93e, - 0xa93e, 0xa93e, 0xa93e, 0xa93f, 0xa93f, 0xa93f, 0xa940, 0xa940, - 0xa940, 0xa941, 0xa941, 0xa941, 0xa942, 0xa942, 0xa942, 0xa943, - 0xa943, 0xa943, 0xa944, 0xa944, 0xa944, 0xa945, 0xa945, 0xa945, - 0xa946, 0xa946, 0xa946, 0xa947, 0xa947, 0xa947, 0xa948, 0xa948, - 0xa948, 0xa949, 0xa949, 0xa949, 0xa94a, 0xa94a, 0xa94a, 0xa94b, - 0xa94b, 0xa94b, 0xa94c, 0xa94c, 0xa94c, 0xa94d, 0xa94d, 0xa94d, - 0xa94d, 0xa94e, 0xa94e, 0xa94e, 0xa94f, 0xa94f, 0xa94f, 0xa950, - 0xa950, 0xa950, 0xa951, 0xa951, 0xa951, 0xa952, 0xa952, 0xa952, - 0xa953, 0xa953, 0xa953, 0xa954, 0xa954, 0xa954, 0xa955, 0xa955, - 0xa955, 0xa956, 0xa956, 0xa956, 0xa957, 0xa957, 0xa957, 0xa958, - 0xa958, 0xa958, 0xa958, 0xa959, 0xa959, 0xa959, 0xa95a, 0xa95a, - 0xa95a, 0xa95b, 0xa95b, 0xa95b, 0xa95c, 0xa95c, 0xa95c, 0xa95d, - 0xa95d, 0xa95d, 0xa95e, 0xa95e, 0xa95e, 0xa95f, 0xa95f, 0xa95f, - 0xa960, 0xa960, 0xa960, 0xa960, 0xa961, 0xa961, 0xa961, 0xa962, - 0xa962, 0xa962, 0xa963, 0xa963, 0xa963, 0xa964, 0xa964, 0xa964, - 0xa965, 0xa965, 0xa965, 0xa966, 0xa966, 0xa966, 0xa967, 0xa967, - 0xa967, 0xa967, 0xa968, 0xa968, 0xa968, 0xa969, 0xa969, 0xa969, - 0xa96a, 0xa96a, 0xa96a, 0xa96b, 0xa96b, 0xa96b, 0xa96c, 0xa96c, - 0xa96c, 0xa96d, 0xa96d, 0xa96d, 0xa96d, 0xa96e, 0xa96e, 0xa96e, - 0xa96f, 0xa96f, 0xa96f, 0xa970, 0xa970, 0xa970, 0xa971, 0xa971, - 0xa971, 0xa972, 0xa972, 0xa972, 0xa972, 0xa973, 0xa973, 0xa973, - 0xa974, 0xa974, 0xa974, 0xa975, 0xa975, 0xa975, 0xa976, 0xa976, - 0xa976, 0xa977, 0xa977, 0xa977, 0xa977, 0xa978, 0xa978, 0xa978, - 0xa979, 0xa979, 0xa979, 0xa97a, 0xa97a, 0xa97a, 0xa97b, 0xa97b, - 0xa97b, 0xa97c, 0xa97c, 0xa97d, 0xa97e, 0xa97e, 0xa97f, 0xa980, - 0xa980, 0xa981, 0xa981, 0xa982, 0xa983, 0xa983, 0xa984, 0xa985, - 0xa985, 0xa986, 0xa986, 0xa987, 0xa988, 0xa988, 0xa989, 0xa989, - 0xa98a, 0xa98b, 0xa98b, 0xa98c, 0xa98d, 0xa98d, 0xa98e, 0xa98e, - 0xa98f, 0xa990, 0xa990, 0xa991, 0xa991, 0xa992, 0xa993, 0xa993, - 0xa994, 0xa995, 0xa995, 0xa996, 0xa996, 0xa997, 0xa998, 0xa998, - 0xa999, 0xa999, 0xa99a, 0xa99b, 0xa99b, 0xa99c, 0xa99c, 0xa99d, - 0xa99e, 0xa99e, 0xa99f, 0xa99f, 0xa9a0, 0xa9a1, 0xa9a1, 0xa9a2, - 0xa9a2, 0xa9a3, 0xa9a4, 0xa9a4, 0xa9a5, 0xa9a5, 0xa9a6, 0xa9a7, - 0xa9a7, 0xa9a8, 0xa9a8, 0xa9a9, 0xa9aa, 0xa9aa, 0xa9ab, 0xa9ab, - 0xa9ac, 0xa9ad, 0xa9ad, 0xa9ae, 0xa9ae, 0xa9af, 0xa9b0, 0xa9b0, - 0xa9b1, 0xa9b1, 0xa9b2, 0xa9b3, 0xa9b3, 0xa9b4, 0xa9b4, 0xa9b5, - 0xa9b6, 0xa9b6, 0xa9b7, 0xa9b7, 0xa9b8, 0xa9b9, 0xa9b9, 0xa9ba, - 0xa9ba, 0xa9bb, 0xa9bb, 0xa9bc, 0xa9bd, 0xa9bd, 0xa9be, 0xa9be, - 0xa9bf, 0xa9c0, 0xa9c0, 0xa9c1, 0xa9c1, 0xa9c2, 0xa9c3, 0xa9c3, - 0xa9c4, 0xa9c4, 0xa9c5, 0xa9c5, 0xa9c6, 0xa9c7, 0xa9c7, 0xa9c8, - 0xa9c8, 0xa9c9, 0xa9ca, 0xa9ca, 0xa9cb, 0xa9cb, 0xa9cc, 0xa9cc, - 0xa9cd, 0xa9ce, 0xa9ce, 0xa9cf, 0xa9cf, 0xa9d0, 0xa9d1, 0xa9d1, - 0xa9d2, 0xa9d2, 0xa9d3, 0xa9d3, 0xa9d4, 0xa9d5, 0xa9d5, 0xa9d6, - 0xa9d6, 0xa9d7, 0xa9d8, 0xa9d8, 0xa9d9, 0xa9d9, 0xa9da, 0xa9da, - 0xa9db, 0xa9dc, 0xa9dc, 0xa9dd, 0xa9dd, 0xa9de, 0xa9de, 0xa9df, - 0xa9e0, 0xa9e0, 0xa9e1, 0xa9e1, 0xa9e2, 0xa9e2, 0xa9e3, 0xa9e4, - 0xa9e4, 0xa9e5, 0xa9e5, 0xa9e6, 0xa9e6, 0xa9e7, 0xa9e8, 0xa9e8, - 0xa9e9, 0xa9e9, 0xa9ea, 0xa9ea, 0xa9eb, 0xa9ec, 0xa9ec, 0xa9ed, - 0xa9ed, 0xa9ee, 0xa9ee, 0xa9ef, 0xa9f0, 0xa9f0, 0xa9f1, 0xa9f1, - 0xa9f2, 0xa9f2, 0xa9f3, 0xa9f3, 0xa9f4, 0xa9f5, 0xa9f5, 0xa9f6, - 0xa9f6, 0xa9f7, 0xa9f7, 0xa9f8, 0xa9f9, 0xa9f9, 0xa9fa, 0xa9fa, - 0xa9fb, 0xa9fb, 0xa9fc, 0xa9fc, 0xa9fd, 0xa9fe, 0xa9fe, 0xa9ff, - 0xa9ff, 0xaa00, 0xaa00, 0xaa01, 0xaa02, 0xaa02, 0xaa03, 0xaa03, - 0xaa04, 0xaa04, 0xaa05, 0xaa05, 0xaa06, 0xaa07, 0xaa07, 0xaa08, - 0xaa08, 0xaa09, 0xaa09, 0xaa0a, 0xaa0a, 0xaa0b, 0xaa0c, 0xaa0c, - 0xaa0d, 0xaa0d, 0xaa0e, 0xaa0e, 0xaa0f, 0xaa0f, 0xaa10, 0xaa10, - 0xaa11, 0xaa12, 0xaa12, 0xaa13, 0xaa13, 0xaa14, 0xaa14, 0xaa15, - 0xaa15, 0xaa16, 0xaa17, 0xaa17, 0xaa18, 0xaa18, 0xaa19, 0xaa19, - 0xaa1a, 0xaa1a, 0xaa1b, 0xaa1b, 0xaa1c, 0xaa1d, 0xaa1d, 0xaa1e, - 0xaa1e, 0xaa1f, 0xaa1f, 0xaa20, 0xaa20, 0xaa21, 0xaa21, 0xaa22, - 0xaa23, 0xaa23, 0xaa24, 0xaa24, 0xaa25, 0xaa25, 0xaa26, 0xaa26, - 0xaa27, 0xaa27, 0xaa28, 0xaa29, 0xaa29, 0xaa2a, 0xaa2a, 0xaa2b, - 0xaa2b, 0xaa2c, 0xaa2c, 0xaa2d, 0xaa2d, 0xaa2e, 0xaa2e, 0xaa2f, - 0xaa30, 0xaa30, 0xaa31, 0xaa31, 0xaa32, 0xaa32, 0xaa33, 0xaa33, - 0xaa34, 0xaa34, 0xaa35, 0xaa35, 0xaa36, 0xaa37, 0xaa37, 0xaa38, - 0xaa38, 0xaa39, 0xaa39, 0xaa3a, 0xaa3a, 0xaa3b, 0xaa3b, 0xaa3c, - 0xaa3c, 0xaa3d, 0xaa3d, 0xaa3e, 0xaa3f, 0xaa3f, 0xaa40, 0xaa40, - 0xaa41, 0xaa41, 0xaa42, 0xaa42, 0xaa43, 0xaa43, 0xaa44, 0xaa44, - 0xaa45, 0xaa45, 0xaa46, 0xaa47, 0xaa47, 0xaa48, 0xaa48, 0xaa49, - 0xaa49, 0xaa4a, 0xaa4a, 0xaa4b, 0xaa4b, 0xaa4c, 0xaa4c, 0xaa4d, - 0xaa4d, 0xaa4e, 0xaa4e, 0xaa4f, 0xaa50, 0xaa50, 0xaa51, 0xaa51, - 0xaa52, 0xaa52, 0xaa53, 0xaa53, 0xaa54, 0xaa54, 0xaa55, 0xaa55, - 0xaa56, 0xaa56, 0xaa57, 0xaa57, 0xaa58, 0xaa58, 0xaa59, 0xaa59, - 0xaa5a, 0xaa5b, 0xaa5b, 0xaa5c, 0xaa5c, 0xaa5d, 0xaa5d, 0xaa5e, - 0xaa5e, 0xaa5f, 0xaa5f, 0xaa60, 0xaa60, 0xaa61, 0xaa61, 0xaa62, - 0xaa62, 0xaa63, 0xaa63, 0xaa64, 0xaa64, 0xaa65, 0xaa65, 0xaa66, - 0xaa66, 0xaa67, 0xaa67, 0xaa68, 0xaa69, 0xaa69, 0xaa6a, 0xaa6a, - 0xaa6b, 0xaa6b, 0xaa6c, 0xaa6c, 0xaa6d, 0xaa6d, 0xaa6e, 0xaa6e, - 0xaa6f, 0xaa6f, 0xaa70, 0xaa70, 0xaa71, 0xaa71, 0xaa72, 0xaa72, - 0xaa73, 0xaa73, 0xaa74, 0xaa74, 0xaa75, 0xaa75, 0xaa76, 0xaa76, - 0xaa77, 0xaa77, 0xaa78, 0xaa78, 0xaa79, 0xaa79, 0xaa7a, 0xaa7a, - 0xaa7b, 0xaa7b, 0xaa7c, 0xaa7d, 0xaa7d, 0xaa7e, 0xaa7e, 0xaa7f, - 0xaa7f, 0xaa80, 0xaa80, 0xaa81, 0xaa81, 0xaa82, 0xaa82, 0xaa83, - 0xaa83, 0xaa84, 0xaa84, 0xaa85, 0xaa85, 0xaa86, 0xaa86, 0xaa87, - 0xaa87, 0xaa88, 0xaa88, 0xaa89, 0xaa89, 0xaa8a, 0xaa8a, 0xaa8b, - 0xaa8b, 0xaa8c, 0xaa8c, 0xaa8d, 0xaa8d, 0xaa8e, 0xaa8e, 0xaa8f, - 0xaa8f, 0xaa90, 0xaa90, 0xaa91, 0xaa91, 0xaa92, 0xaa92, 0xaa93, - 0xaa93, 0xaa94, 0xaa94, 0xaa95, 0xaa95, 0xaa96, 0xaa96, 0xaa97, - 0xaa97, 0xaa98, 0xaa98, 0xaa99, 0xaa99, 0xaa9a, 0xaa9a, 0xaa9b, - 0xaa9b, 0xaa9c, 0xaa9c, 0xaa9d, 0xaa9d, 0xaa9e, 0xaa9e, 0xaa9f, - 0xaa9f, 0xaaa0, 0xaaa0, 0xaaa1, 0xaaa1, 0xaaa2, 0xaaa2, 0xaaa3, - 0xaaa3, 0xaaa4, 0xaaa4, 0xaaa5, 0xaaa5, 0xaaa6, 0xaaa6, 0xaaa7, - 0xaaa7, 0xaaa8, 0xaaa8, 0xaaa9, 0xaaa9, 0xaaaa, 0xaaaa, 0xaaab, - 0xaaab, 0xaaac, 0xaaac, 0xaaad, 0xaaad, 0xaaae, 0xaaae, 0xaaaf, - 0xaaaf, 0xaaaf, 0xaab0, 0xaab0, 0xaab1, 0xaab1, 0xaab2, 0xaab2, - 0xaab3, 0xaab3, 0xaab4, 0xaab4, 0xaab5, 0xaab5, 0xaab6, 0xaab6, - 0xaab7, 0xaab7, 0xaab8, 0xaab8, 0xaab9, 0xaab9, 0xaaba, 0xaaba, - 0xaabb, 0xaabb, 0xaabc, 0xaabc, 0xaabd, 0xaabd, 0xaabe, 0xaabe, - 0xaabf, 0xaabf, 0xaac0, 0xaac0, 0xaac1, 0xaac1, 0xaac2, 0xaac2, - 0xaac2, 0xaac3, 0xaac3, 0xaac4, 0xaac4, 0xaac5, 0xaac5, 0xaac6, - 0xaac6, 0xaac7, 0xaac7, 0xaac8, 0xaac8, 0xaac9, 0xaac9, 0xaaca, - 0xaaca, 0xaacb, 0xaacb, 0xaacc, 0xaacc, 0xaacd, 0xaacd, 0xaace, - 0xaace, 0xaacf, 0xaacf, 0xaad0, 0xaad0, 0xaad0, 0xaad1, 0xaad1, - 0xaad2, 0xaad2, 0xaad3, 0xaad3, 0xaad4, 0xaad4, 0xaad5, 0xaad5, - 0xaad6, 0xaad6, 0xaad7, 0xaad7, 0xaad8, 0xaad8, 0xaad9, 0xaad9, - 0xaada, 0xaada, 0xaadb, 0xaadb, 0xaadb, 0xaadc, 0xaadc, 0xaadd, - 0xaadd, 0xaade, 0xaade, 0xaadf, 0xaadf, 0xaae0, 0xaae0, 0xaae1, - 0xaae1, 0xaae2, 0xaae2, 0xaae3, 0xaae3, 0xaae4, 0xaae4, 0xaae4, - 0xaae5, 0xaae5, 0xaae6, 0xaae6, 0xaae7, 0xaae7, 0xaae8, 0xaae8, - 0xaae9, 0xaae9, 0xaaea, 0xaaea, 0xaaeb, 0xaaeb, 0xaaec, 0xaaec, - 0xaaed, 0xaaed, 0xaaed, 0xaaee, 0xaaee, 0xaaef, 0xaaef, 0xaaf0, - 0xaaf0, 0xaaf1, 0xaaf1, 0xaaf2, 0xaaf2, 0xaaf3, 0xaaf3, 0xaaf4, - 0xaaf4, 0xaaf4, 0xaaf5, 0xaaf5, 0xaaf6, 0xaaf6, 0xaaf7, 0xaaf7, - 0xaaf8, 0xaaf8, 0xaaf9, 0xaaf9, 0xaafa, 0xaafa, 0xaafb, 0xaafb, - 0xaafb, 0xaafc, 0xaafc, 0xaafd, 0xaafd, 0xaafe, 0xaafe, 0xaaff, - 0xaaff, 0xab00, 0xab00, 0xab01, 0xab01, 0xab02, 0xab02, 0xab02, - 0xab03, 0xab03, 0xab04, 0xab04, 0xab05, 0xab05, 0xab06, 0xab06, - 0xab07, 0xab07, 0xab08, 0xab08, 0xab08, 0xab09, 0xab09, 0xab0a, - 0xab0a, 0xab0b, 0xab0b, 0xab0c, 0xab0c, 0xab0d, 0xab0d, 0xab0e, - 0xab0e, 0xab0e, 0xab0f, 0xab0f, 0xab10, 0xab10, 0xab11, 0xab11, - 0xab12, 0xab12, 0xab13, 0xab13, 0xab14, 0xab14, 0xab14, 0xab15, - 0xab15, 0xab16, 0xab16, 0xab17, 0xab17, 0xab18, 0xab18, 0xab19, - 0xab19, 0xab19, 0xab1a, 0xab1a, 0xab1b, 0xab1b, 0xab1c, 0xab1c, - 0xab1d, 0xab1d, 0xab1e, 0xab1e, 0xab1e, 0xab1f, 0xab1f, 0xab20, - 0xab20, 0xab21, 0xab21, 0xab22, 0xab22, 0xab23, 0xab23, 0xab23, - 0xab24, 0xab24, 0xab25, 0xab25, 0xab26, 0xab26, 0xab27, 0xab27, - 0xab28, 0xab28, 0xab28, 0xab29, 0xab29, 0xab2a, 0xab2a, 0xab2b, - 0xab2b, 0xab2c, 0xab2c, 0xab2d, 0xab2d, 0xab2d, 0xab2e, 0xab2e, - 0xab2f, 0xab2f, 0xab30, 0xab30, 0xab31, 0xab31, 0xab31, 0xab32, - 0xab32, 0xab33, 0xab33, 0xab34, 0xab34, 0xab35, 0xab35, 0xab36, - 0xab36, 0xab36, 0xab37, 0xab37, 0xab38, 0xab38, 0xab39, 0xab39, - 0xab3a, 0xab3a, 0xab3a, 0xab3b, 0xab3b, 0xab3c, 0xab3c, 0xab3d, - 0xab3d, 0xab3e, 0xab3e, 0xab3e, 0xab3f, 0xab3f, 0xab40, 0xab40, - 0xab41, 0xab41, 0xab42, 0xab42, 0xab42, 0xab43, 0xab43, 0xab44, - 0xab44, 0xab45, 0xab45, 0xab46, 0xab46, 0xab46, 0xab47, 0xab47, - 0xab48, 0xab48, 0xab49, 0xab49, 0xab4a, 0xab4a, 0xab4a, 0xab4b, - 0xab4b, 0xab4c, 0xab4c, 0xab4d, 0xab4d, 0xab4e, 0xab4e, 0xab4e, - 0xab4f, 0xab4f, 0xab50, 0xab50, 0xab51, 0xab51, 0xab52, 0xab52, - 0xab52, 0xab53, 0xab53, 0xab54, 0xab54, 0xab55, 0xab55, 0xab55, - 0xab56, 0xab56, 0xab57, 0xab57, 0xab58, 0xab58, 0xab59, 0xab59, - 0xab59, 0xab5a, 0xab5a, 0xab5b, 0xab5b, 0xab5c, 0xab5c, 0xab5c, - 0xab5d, 0xab5d, 0xab5e, 0xab5e, 0xab5f, 0xab5f, 0xab60, 0xab60, - 0xab60, 0xab61, 0xab61, 0xab62, 0xab62, 0xab63, 0xab63, 0xab63, - 0xab64, 0xab64, 0xab65, 0xab65, 0xab66, 0xab66, 0xab67, 0xab67, - 0xab67, 0xab68, 0xab68, 0xab69, 0xab69, 0xab6a, 0xab6a, 0xab6a, - 0xab6b, 0xab6b, 0xab6c, 0xab6c, 0xab6d, 0xab6d, 0xab6d, 0xab6e, - 0xab6e, 0xab6f, 0xab6f, 0xab70, 0xab70, 0xab70, 0xab71, 0xab71, - 0xab72, 0xab72, 0xab73, 0xab73, 0xab73, 0xab74, 0xab74, 0xab75, - 0xab75, 0xab76, 0xab76, 0xab77, 0xab77, 0xab77, 0xab78, 0xab78, - 0xab79, 0xab79, 0xab7a, 0xab7a, 0xab7a, 0xab7b, 0xab7b, 0xab7c, - 0xab7c, 0xab7d, 0xab7d, 0xab7d, 0xab7e, 0xab7e, 0xab7f, 0xab7f, - 0xab80, 0xab80, 0xab80, 0xab81, 0xab81, 0xab82, 0xab82, 0xab83, - 0xab83, 0xab84, 0xab85, 0xab85, 0xab86, 0xab87, 0xab88, 0xab89, - 0xab8a, 0xab8b, 0xab8b, 0xab8c, 0xab8d, 0xab8e, 0xab8f, 0xab90, - 0xab91, 0xab91, 0xab92, 0xab93, 0xab94, 0xab95, 0xab96, 0xab96, - 0xab97, 0xab98, 0xab99, 0xab9a, 0xab9b, 0xab9b, 0xab9c, 0xab9d, - 0xab9e, 0xab9f, 0xaba0, 0xaba1, 0xaba1, 0xaba2, 0xaba3, 0xaba4, - 0xaba5, 0xaba6, 0xaba6, 0xaba7, 0xaba8, 0xaba9, 0xabaa, 0xabab, - 0xabab, 0xabac, 0xabad, 0xabae, 0xabaf, 0xabb0, 0xabb0, 0xabb1, - 0xabb2, 0xabb3, 0xabb4, 0xabb5, 0xabb5, 0xabb6, 0xabb7, 0xabb8, - 0xabb9, 0xabb9, 0xabba, 0xabbb, 0xabbc, 0xabbd, 0xabbe, 0xabbe, - 0xabbf, 0xabc0, 0xabc1, 0xabc2, 0xabc3, 0xabc3, 0xabc4, 0xabc5, - 0xabc6, 0xabc7, 0xabc7, 0xabc8, 0xabc9, 0xabca, 0xabcb, 0xabcc, - 0xabcc, 0xabcd, 0xabce, 0xabcf, 0xabd0, 0xabd0, 0xabd1, 0xabd2, - 0xabd3, 0xabd4, 0xabd4, 0xabd5, 0xabd6, 0xabd7, 0xabd8, 0xabd9, - 0xabd9, 0xabda, 0xabdb, 0xabdc, 0xabdd, 0xabdd, 0xabde, 0xabdf, - 0xabe0, 0xabe1, 0xabe1, 0xabe2, 0xabe3, 0xabe4, 0xabe5, 0xabe5, - 0xabe6, 0xabe7, 0xabe8, 0xabe9, 0xabe9, 0xabea, 0xabeb, 0xabec, - 0xabed, 0xabed, 0xabee, 0xabef, 0xabf0, 0xabf1, 0xabf1, 0xabf2, - 0xabf3, 0xabf4, 0xabf5, 0xabf5, 0xabf6, 0xabf7, 0xabf8, 0xabf9, - 0xabf9, 0xabfa, 0xabfb, 0xabfc, 0xabfd, 0xabfd, 0xabfe, 0xabff, - 0xac00, 0xac00, 0xac01, 0xac01, 0xac01, 0xac02, 0xac02, 0xac03, - 0xac03, 0xac03, 0xac04, 0xac04, 0xac05, 0xac05, 0xac05, 0xac06, - 0xac06, 0xac07, 0xac07, 0xac07, 0xac08, 0xac08, 0xac09, 0xac09, - 0xac09, 0xac0a, 0xac0a, 0xac0b, 0xac0b, 0xac0b, 0xac0c, 0xac0c, - 0xac0c, 0xac0d, 0xac0d, 0xac0e, 0xac0e, 0xac0e, 0xac0f, 0xac0f, - 0xac10, 0xac10, 0xac10, 0xac11, 0xac11, 0xac12, 0xac12, 0xac12, - 0xac13, 0xac13, 0xac13, 0xac14, 0xac14, 0xac15, 0xac15, 0xac15, - 0xac16, 0xac16, 0xac17, 0xac17, 0xac17, 0xac18, 0xac18, 0xac18, - 0xac19, 0xac19, 0xac1a, 0xac1a, 0xac1a, 0xac1b, 0xac1b, 0xac1c, - 0xac1c, 0xac1c, 0xac1d, 0xac1d, 0xac1d, 0xac1e, 0xac1e, 0xac1f, - 0xac1f, 0xac1f, 0xac20, 0xac20, 0xac21, 0xac21, 0xac21, 0xac22, - 0xac22, 0xac22, 0xac23, 0xac23, 0xac24, 0xac24, 0xac24, 0xac25, - 0xac25, 0xac25, 0xac26, 0xac26, 0xac27, 0xac27, 0xac27, 0xac28, - 0xac28, 0xac28, 0xac29, 0xac29, 0xac2a, 0xac2a, 0xac2a, 0xac2b, - 0xac2b, 0xac2b, 0xac2c, 0xac2c, 0xac2d, 0xac2d, 0xac2d, 0xac2e, - 0xac2e, 0xac2f, 0xac2f, 0xac2f, 0xac30, 0xac30, 0xac30, 0xac31, - 0xac31, 0xac32, 0xac32, 0xac32, 0xac33, 0xac33, 0xac33, 0xac34, - 0xac34, 0xac34, 0xac35, 0xac35, 0xac36, 0xac36, 0xac36, 0xac37, - 0xac37, 0xac37, 0xac38, 0xac38, 0xac39, 0xac39, 0xac39, 0xac3a, - 0xac3a, 0xac3a, 0xac3b, 0xac3b, 0xac3c, 0xac3c, 0xac3c, 0xac3d, - 0xac3d, 0xac3d, 0xac3e, 0xac3e, 0xac3e, 0xac3f, 0xac3f, 0xac40, - 0xac40, 0xac40, 0xac41, 0xac41, 0xac41, 0xac42, 0xac42, 0xac43, - 0xac43, 0xac43, 0xac44, 0xac44, 0xac44, 0xac45, 0xac45, 0xac45, - 0xac46, 0xac46, 0xac47, 0xac47, 0xac47, 0xac48, 0xac48, 0xac48, - 0xac49, 0xac49, 0xac49, 0xac4a, 0xac4a, 0xac4b, 0xac4b, 0xac4b, - 0xac4c, 0xac4c, 0xac4c, 0xac4d, 0xac4d, 0xac4d, 0xac4e, 0xac4e, - 0xac4f, 0xac4f, 0xac4f, 0xac50, 0xac50, 0xac50, 0xac51, 0xac51, - 0xac51, 0xac52, 0xac52, 0xac53, 0xac53, 0xac53, 0xac54, 0xac54, - 0xac54, 0xac55, 0xac55, 0xac55, 0xac56, 0xac56, 0xac56, 0xac57, - 0xac57, 0xac58, 0xac58, 0xac58, 0xac59, 0xac59, 0xac59, 0xac5a, - 0xac5a, 0xac5a, 0xac5b, 0xac5b, 0xac5c, 0xac5c, 0xac5c, 0xac5d, - 0xac5d, 0xac5d, 0xac5e, 0xac5e, 0xac5e, 0xac5f, 0xac5f, 0xac5f, - 0xac60, 0xac60, 0xac60, 0xac61, 0xac61, 0xac62, 0xac62, 0xac62, - 0xac63, 0xac63, 0xac63, 0xac64, 0xac64, 0xac64, 0xac65, 0xac65, - 0xac65, 0xac66, 0xac66, 0xac67, 0xac67, 0xac67, 0xac68, 0xac68, - 0xac68, 0xac69, 0xac69, 0xac69, 0xac6a, 0xac6a, 0xac6a, 0xac6b, - 0xac6b, 0xac6b, 0xac6c, 0xac6c, 0xac6c, 0xac6d, 0xac6d, 0xac6e, - 0xac6e, 0xac6e, 0xac6f, 0xac6f, 0xac6f, 0xac70, 0xac70, 0xac70, - 0xac71, 0xac71, 0xac71, 0xac72, 0xac72, 0xac72, 0xac73, 0xac73, - 0xac73, 0xac74, 0xac74, 0xac75, 0xac75, 0xac75, 0xac76, 0xac76, - 0xac76, 0xac77, 0xac77, 0xac77, 0xac78, 0xac78, 0xac78, 0xac79, - 0xac79, 0xac79, 0xac7a, 0xac7a, 0xac7a, 0xac7b, 0xac7b, 0xac7b, - 0xac7c, 0xac7c, 0xac7c, 0xac7d, 0xac7d, 0xac7e, 0xac7e, 0xac7e, - 0xac7f, 0xac7f, 0xac7f, 0xac80, 0xac80, 0xac80, 0xac81, 0xac81, - 0xac81, 0xac82, 0xac82, 0xac82, 0xac83, 0xac83, 0xac83, 0xac84, - 0xac84, 0xac84, 0xac85, 0xac85, 0xac85, 0xac86, 0xac86, 0xac86, - 0xac87, 0xac87, 0xac87, 0xac88, 0xac88, 0xac88, 0xac89, 0xac89, - 0xac8a, 0xac8a, 0xac8a, 0xac8b, 0xac8b, 0xac8b, 0xac8c, 0xac8c, - 0xac8c, 0xac8d, 0xac8d, 0xac8d, 0xac8e, 0xac8e, 0xac8e, 0xac8f, - 0xac8f, 0xac8f, 0xac90, 0xac90, 0xac90, 0xac91, 0xac91, 0xac91, - 0xac92, 0xac92, 0xac92, 0xac93, 0xac93, 0xac93, 0xac94, 0xac94, - 0xac94, 0xac95, 0xac95, 0xac95, 0xac96, 0xac96, 0xac96, 0xac97, - 0xac97, 0xac97, 0xac98, 0xac98, 0xac98, 0xac99, 0xac99, 0xac99, - 0xac9a, 0xac9a, 0xac9a, 0xac9b, 0xac9b, 0xac9b, 0xac9c, 0xac9c, - 0xac9c, 0xac9d, 0xac9d, 0xac9d, 0xac9e, 0xac9e, 0xac9e, 0xac9f, - 0xac9f, 0xac9f, 0xaca0, 0xaca0, 0xaca0, 0xaca1, 0xaca1, 0xaca1, - 0xaca2, 0xaca2, 0xaca2, 0xaca3, 0xaca3, 0xaca3, 0xaca4, 0xaca4, - 0xaca4, 0xaca5, 0xaca5, 0xaca5, 0xaca6, 0xaca6, 0xaca6, 0xaca7, - 0xaca7, 0xaca7, 0xaca8, 0xaca8, 0xaca8, 0xaca9, 0xaca9, 0xaca9, - 0xacaa, 0xacaa, 0xacaa, 0xacab, 0xacab, 0xacab, 0xacac, 0xacac, - 0xacac, 0xacad, 0xacad, 0xacad, 0xacae, 0xacae, 0xacae, 0xacaf, - 0xacaf, 0xacaf, 0xacb0, 0xacb0, 0xacb0, 0xacb1, 0xacb1, 0xacb1, - 0xacb1, 0xacb2, 0xacb2, 0xacb2, 0xacb3, 0xacb3, 0xacb3, 0xacb4, - 0xacb4, 0xacb4, 0xacb5, 0xacb5, 0xacb5, 0xacb6, 0xacb6, 0xacb6, - 0xacb7, 0xacb7, 0xacb7, 0xacb8, 0xacb8, 0xacb8, 0xacb9, 0xacb9, - 0xacb9, 0xacba, 0xacba, 0xacba, 0xacbb, 0xacbb, 0xacbb, 0xacbc, - 0xacbc, 0xacbc, 0xacbd, 0xacbd, 0xacbd, 0xacbe, 0xacbe, 0xacbe, - 0xacbe, 0xacbf, 0xacbf, 0xacbf, 0xacc0, 0xacc0, 0xacc0, 0xacc1, - 0xacc1, 0xacc1, 0xacc2, 0xacc2, 0xacc2, 0xacc3, 0xacc3, 0xacc3, - 0xacc4, 0xacc4, 0xacc4, 0xacc5, 0xacc5, 0xacc5, 0xacc6, 0xacc6, - 0xacc6, 0xacc7, 0xacc7, 0xacc7, 0xacc7, 0xacc8, 0xacc8, 0xacc8, - 0xacc9, 0xacc9, 0xacc9, 0xacca, 0xacca, 0xacca, 0xaccb, 0xaccb, - 0xaccb, 0xaccc, 0xaccc, 0xaccc, 0xaccd, 0xaccd, 0xaccd, 0xacce, - 0xacce, 0xacce, 0xacce, 0xaccf, 0xaccf, 0xaccf, 0xacd0, 0xacd0, - 0xacd0, 0xacd1, 0xacd1, 0xacd1, 0xacd2, 0xacd2, 0xacd2, 0xacd3, - 0xacd3, 0xacd3, 0xacd4, 0xacd4, 0xacd4, 0xacd4, 0xacd5, 0xacd5, - 0xacd5, 0xacd6, 0xacd6, 0xacd6, 0xacd7, 0xacd7, 0xacd7, 0xacd8, - 0xacd8, 0xacd8, 0xacd9, 0xacd9, 0xacd9, 0xacda, 0xacda, 0xacda, - 0xacda, 0xacdb, 0xacdb, 0xacdb, 0xacdc, 0xacdc, 0xacdc, 0xacdd, - 0xacdd, 0xacdd, 0xacde, 0xacde, 0xacde, 0xacdf, 0xacdf, 0xacdf, - 0xacdf, 0xace0, 0xace0, 0xace0, 0xace1, 0xace1, 0xace1, 0xace2, - 0xace2, 0xace2, 0xace3, 0xace3, 0xace3, 0xace4, 0xace4, 0xace4, - 0xace4, 0xace5, 0xace5, 0xace5, 0xace6, 0xace6, 0xace6, 0xace7, - 0xace7, 0xace7, 0xace8, 0xace8, 0xace8, 0xace8, 0xace9, 0xace9, - 0xace9, 0xacea, 0xacea, 0xacea, 0xaceb, 0xaceb, 0xaceb, 0xacec, - 0xacec, 0xacec, 0xaced, 0xaced, 0xaced, 0xaced, 0xacee, 0xacee, - 0xacee, 0xacef, 0xacef, 0xacef, 0xacf0, 0xacf0, 0xacf0, 0xacf1, - 0xacf1, 0xacf1, 0xacf1, 0xacf2, 0xacf2, 0xacf2, 0xacf3, 0xacf3, - 0xacf3, 0xacf4, 0xacf4, 0xacf4, 0xacf4, 0xacf5, 0xacf5, 0xacf5, - 0xacf6, 0xacf6, 0xacf6, 0xacf7, 0xacf7, 0xacf7, 0xacf8, 0xacf8, - 0xacf8, 0xacf8, 0xacf9, 0xacf9, 0xacf9, 0xacfa, 0xacfa, 0xacfa, - 0xacfb, 0xacfb, 0xacfb, 0xacfc, 0xacfc, 0xacfc, 0xacfc, 0xacfd, - 0xacfd, 0xacfd, 0xacfe, 0xacfe, 0xacfe, 0xacff, 0xacff, 0xacff, - 0xacff, 0xad00, 0xad00, 0xad00, 0xad01, 0xad01, 0xad01, 0xad02, - 0xad02, 0xad02, 0xad02, 0xad03, 0xad03, 0xad03, 0xad04, 0xad04, - 0xad04, 0xad05, 0xad05, 0xad05, 0xad05, 0xad06, 0xad06, 0xad06, - 0xad07, 0xad07, 0xad07, 0xad08, 0xad08, 0xad08, 0xad09, 0xad09, - 0xad09, 0xad09, 0xad0a, 0xad0a, 0xad0a, 0xad0b, 0xad0b, 0xad0b, - 0xad0c, 0xad0c, 0xad0c, 0xad0c, 0xad0d, 0xad0d, 0xad0d, 0xad0e, - 0xad0e, 0xad0e, 0xad0e, 0xad0f, 0xad0f, 0xad0f, 0xad10, 0xad10, - 0xad10, 0xad11, 0xad11, 0xad11, 0xad11, 0xad12, 0xad12, 0xad12, - 0xad13, 0xad13, 0xad13, 0xad14, 0xad14, 0xad14, 0xad14, 0xad15, - 0xad15, 0xad15, 0xad16, 0xad16, 0xad16, 0xad17, 0xad17, 0xad17, - 0xad17, 0xad18, 0xad18, 0xad18, 0xad19, 0xad19, 0xad19, 0xad19, - 0xad1a, 0xad1a, 0xad1a, 0xad1b, 0xad1b, 0xad1b, 0xad1c, 0xad1c, - 0xad1c, 0xad1c, 0xad1d, 0xad1d, 0xad1d, 0xad1e, 0xad1e, 0xad1e, - 0xad1f, 0xad1f, 0xad1f, 0xad1f, 0xad20, 0xad20, 0xad20, 0xad21, - 0xad21, 0xad21, 0xad21, 0xad22, 0xad22, 0xad22, 0xad23, 0xad23, - 0xad23, 0xad23, 0xad24, 0xad24, 0xad24, 0xad25, 0xad25, 0xad25, - 0xad26, 0xad26, 0xad27, 0xad27, 0xad28, 0xad28, 0xad29, 0xad2a, - 0xad2a, 0xad2b, 0xad2b, 0xad2c, 0xad2d, 0xad2d, 0xad2e, 0xad2e, - 0xad2f, 0xad2f, 0xad30, 0xad31, 0xad31, 0xad32, 0xad32, 0xad33, - 0xad33, 0xad34, 0xad35, 0xad35, 0xad36, 0xad36, 0xad37, 0xad38, - 0xad38, 0xad39, 0xad39, 0xad3a, 0xad3a, 0xad3b, 0xad3c, 0xad3c, - 0xad3d, 0xad3d, 0xad3e, 0xad3e, 0xad3f, 0xad40, 0xad40, 0xad41, - 0xad41, 0xad42, 0xad42, 0xad43, 0xad44, 0xad44, 0xad45, 0xad45, - 0xad46, 0xad46, 0xad47, 0xad48, 0xad48, 0xad49, 0xad49, 0xad4a, - 0xad4a, 0xad4b, 0xad4b, 0xad4c, 0xad4d, 0xad4d, 0xad4e, 0xad4e, - 0xad4f, 0xad4f, 0xad50, 0xad51, 0xad51, 0xad52, 0xad52, 0xad53, - 0xad53, 0xad54, 0xad54, 0xad55, 0xad56, 0xad56, 0xad57, 0xad57, - 0xad58, 0xad58, 0xad59, 0xad5a, 0xad5a, 0xad5b, 0xad5b, 0xad5c, - 0xad5c, 0xad5d, 0xad5d, 0xad5e, 0xad5f, 0xad5f, 0xad60, 0xad60, - 0xad61, 0xad61, 0xad62, 0xad62, 0xad63, 0xad64, 0xad64, 0xad65, - 0xad65, 0xad66, 0xad66, 0xad67, 0xad67, 0xad68, 0xad69, 0xad69, - 0xad6a, 0xad6a, 0xad6b, 0xad6b, 0xad6c, 0xad6c, 0xad6d, 0xad6d, - 0xad6e, 0xad6f, 0xad6f, 0xad70, 0xad70, 0xad71, 0xad71, 0xad72, - 0xad72, 0xad73, 0xad73, 0xad74, 0xad75, 0xad75, 0xad76, 0xad76, - 0xad77, 0xad77, 0xad78, 0xad78, 0xad79, 0xad79, 0xad7a, 0xad7b, - 0xad7b, 0xad7c, 0xad7c, 0xad7d, 0xad7d, 0xad7e, 0xad7e, 0xad7f, - 0xad7f, 0xad80, 0xad81, 0xad81, 0xad82, 0xad82, 0xad83, 0xad83, - 0xad84, 0xad84, 0xad85, 0xad85, 0xad86, 0xad86, 0xad87, 0xad88, - 0xad88, 0xad89, 0xad89, 0xad8a, 0xad8a, 0xad8b, 0xad8b, 0xad8c, - 0xad8c, 0xad8d, 0xad8d, 0xad8e, 0xad8e, 0xad8f, 0xad90, 0xad90, - 0xad91, 0xad91, 0xad92, 0xad92, 0xad93, 0xad93, 0xad94, 0xad94, - 0xad95, 0xad95, 0xad96, 0xad96, 0xad97, 0xad97, 0xad98, 0xad99, - 0xad99, 0xad9a, 0xad9a, 0xad9b, 0xad9b, 0xad9c, 0xad9c, 0xad9d, - 0xad9d, 0xad9e, 0xad9e, 0xad9f, 0xad9f, 0xada0, 0xada0, 0xada1, - 0xada2, 0xada2, 0xada3, 0xada3, 0xada4, 0xada4, 0xada5, 0xada5, - 0xada6, 0xada6, 0xada7, 0xada7, 0xada8, 0xada8, 0xada9, 0xada9, - 0xadaa, 0xadaa, 0xadab, 0xadab, 0xadac, 0xadac, 0xadad, 0xadae, - 0xadae, 0xadaf, 0xadaf, 0xadb0, 0xadb0, 0xadb1, 0xadb1, 0xadb2, - 0xadb2, 0xadb3, 0xadb3, 0xadb4, 0xadb4, 0xadb5, 0xadb5, 0xadb6, - 0xadb6, 0xadb7, 0xadb7, 0xadb8, 0xadb8, 0xadb9, 0xadb9, 0xadba, - 0xadba, 0xadbb, 0xadbb, 0xadbc, 0xadbd, 0xadbd, 0xadbe, 0xadbe, - 0xadbf, 0xadbf, 0xadc0, 0xadc0, 0xadc1, 0xadc1, 0xadc2, 0xadc2, - 0xadc3, 0xadc3, 0xadc4, 0xadc4, 0xadc5, 0xadc5, 0xadc6, 0xadc6, - 0xadc7, 0xadc7, 0xadc8, 0xadc8, 0xadc9, 0xadc9, 0xadca, 0xadca, - 0xadcb, 0xadcb, 0xadcc, 0xadcc, 0xadcd, 0xadcd, 0xadce, 0xadce, - 0xadcf, 0xadcf, 0xadd0, 0xadd0, 0xadd1, 0xadd1, 0xadd2, 0xadd2, - 0xadd3, 0xadd3, 0xadd4, 0xadd4, 0xadd5, 0xadd5, 0xadd6, 0xadd6, - 0xadd7, 0xadd7, 0xadd8, 0xadd8, 0xadd9, 0xadd9, 0xadda, 0xadda, - 0xaddb, 0xaddb, 0xaddc, 0xaddc, 0xaddd, 0xaddd, 0xadde, 0xadde, - 0xaddf, 0xaddf, 0xade0, 0xade0, 0xade1, 0xade1, 0xade2, 0xade2, - 0xade3, 0xade3, 0xade4, 0xade4, 0xade5, 0xade5, 0xade6, 0xade6, - 0xade7, 0xade7, 0xade8, 0xade8, 0xade9, 0xade9, 0xadea, 0xadea, - 0xadeb, 0xadeb, 0xadec, 0xadec, 0xaded, 0xaded, 0xadee, 0xadee, - 0xadef, 0xadef, 0xadf0, 0xadf0, 0xadf1, 0xadf1, 0xadf2, 0xadf2, - 0xadf3, 0xadf3, 0xadf4, 0xadf4, 0xadf5, 0xadf5, 0xadf6, 0xadf6, - 0xadf7, 0xadf7, 0xadf8, 0xadf8, 0xadf9, 0xadf9, 0xadfa, 0xadfa, - 0xadfb, 0xadfb, 0xadfc, 0xadfc, 0xadfd, 0xadfd, 0xadfe, 0xadfe, - 0xadfe, 0xadff, 0xadff, 0xae00, 0xae00, 0xae01, 0xae01, 0xae02, - 0xae02, 0xae03, 0xae03, 0xae04, 0xae04, 0xae05, 0xae05, 0xae06, - 0xae06, 0xae07, 0xae07, 0xae08, 0xae08, 0xae09, 0xae09, 0xae0a, - 0xae0a, 0xae0b, 0xae0b, 0xae0c, 0xae0c, 0xae0d, 0xae0d, 0xae0e, - 0xae0e, 0xae0e, 0xae0f, 0xae0f, 0xae10, 0xae10, 0xae11, 0xae11, - 0xae12, 0xae12, 0xae13, 0xae13, 0xae14, 0xae14, 0xae15, 0xae15, - 0xae16, 0xae16, 0xae17, 0xae17, 0xae18, 0xae18, 0xae19, 0xae19, - 0xae19, 0xae1a, 0xae1a, 0xae1b, 0xae1b, 0xae1c, 0xae1c, 0xae1d, - 0xae1d, 0xae1e, 0xae1e, 0xae1f, 0xae1f, 0xae20, 0xae20, 0xae21, - 0xae21, 0xae22, 0xae22, 0xae23, 0xae23, 0xae23, 0xae24, 0xae24, - 0xae25, 0xae25, 0xae26, 0xae26, 0xae27, 0xae27, 0xae28, 0xae28, - 0xae29, 0xae29, 0xae2a, 0xae2a, 0xae2b, 0xae2b, 0xae2b, 0xae2c, - 0xae2c, 0xae2d, 0xae2d, 0xae2e, 0xae2e, 0xae2f, 0xae2f, 0xae30, - 0xae30, 0xae31, 0xae31, 0xae32, 0xae32, 0xae33, 0xae33, 0xae33, - 0xae34, 0xae34, 0xae35, 0xae35, 0xae36, 0xae36, 0xae37, 0xae37, - 0xae38, 0xae38, 0xae39, 0xae39, 0xae3a, 0xae3a, 0xae3a, 0xae3b, - 0xae3b, 0xae3c, 0xae3c, 0xae3d, 0xae3d, 0xae3e, 0xae3e, 0xae3f, - 0xae3f, 0xae40, 0xae40, 0xae40, 0xae41, 0xae41, 0xae42, 0xae42, - 0xae43, 0xae43, 0xae44, 0xae44, 0xae45, 0xae45, 0xae46, 0xae46, - 0xae47, 0xae47, 0xae47, 0xae48, 0xae48, 0xae49, 0xae49, 0xae4a, - 0xae4a, 0xae4b, 0xae4b, 0xae4c, 0xae4c, 0xae4c, 0xae4d, 0xae4d, - 0xae4e, 0xae4e, 0xae4f, 0xae4f, 0xae50, 0xae50, 0xae51, 0xae51, - 0xae52, 0xae52, 0xae52, 0xae53, 0xae53, 0xae54, 0xae54, 0xae55, - 0xae55, 0xae56, 0xae56, 0xae57, 0xae57, 0xae57, 0xae58, 0xae58, - 0xae59, 0xae59, 0xae5a, 0xae5a, 0xae5b, 0xae5b, 0xae5c, 0xae5c, - 0xae5c, 0xae5d, 0xae5d, 0xae5e, 0xae5e, 0xae5f, 0xae5f, 0xae60, - 0xae60, 0xae61, 0xae61, 0xae61, 0xae62, 0xae62, 0xae63, 0xae63, - 0xae64, 0xae64, 0xae65, 0xae65, 0xae65, 0xae66, 0xae66, 0xae67, - 0xae67, 0xae68, 0xae68, 0xae69, 0xae69, 0xae6a, 0xae6a, 0xae6a, - 0xae6b, 0xae6b, 0xae6c, 0xae6c, 0xae6d, 0xae6d, 0xae6e, 0xae6e, - 0xae6e, 0xae6f, 0xae6f, 0xae70, 0xae70, 0xae71, 0xae71, 0xae72, - 0xae72, 0xae72, 0xae73, 0xae73, 0xae74, 0xae74, 0xae75, 0xae75, - 0xae76, 0xae76, 0xae77, 0xae77, 0xae77, 0xae78, 0xae78, 0xae79, - 0xae79, 0xae7a, 0xae7a, 0xae7b, 0xae7b, 0xae7b, 0xae7c, 0xae7c, - 0xae7d, 0xae7d, 0xae7e, 0xae7e, 0xae7e, 0xae7f, 0xae7f, 0xae80, - 0xae80, 0xae81, 0xae81, 0xae82, 0xae82, 0xae82, 0xae83, 0xae83, - 0xae84, 0xae84, 0xae85, 0xae85, 0xae86, 0xae86, 0xae86, 0xae87, - 0xae87, 0xae88, 0xae88, 0xae89, 0xae89, 0xae8a, 0xae8a, 0xae8a, - 0xae8b, 0xae8b, 0xae8c, 0xae8c, 0xae8d, 0xae8d, 0xae8d, 0xae8e, - 0xae8e, 0xae8f, 0xae8f, 0xae90, 0xae90, 0xae91, 0xae91, 0xae91, - 0xae92, 0xae92, 0xae93, 0xae93, 0xae94, 0xae94, 0xae94, 0xae95, - 0xae95, 0xae96, 0xae96, 0xae97, 0xae97, 0xae97, 0xae98, 0xae98, - 0xae99, 0xae99, 0xae9a, 0xae9a, 0xae9b, 0xae9b, 0xae9b, 0xae9c, - 0xae9c, 0xae9d, 0xae9d, 0xae9e, 0xae9e, 0xae9e, 0xae9f, 0xae9f, - 0xaea0, 0xaea0, 0xaea1, 0xaea1, 0xaea1, 0xaea2, 0xaea2, 0xaea3, - 0xaea3, 0xaea4, 0xaea4, 0xaea4, 0xaea5, 0xaea5, 0xaea6, 0xaea6, - 0xaea7, 0xaea7, 0xaea7, 0xaea8, 0xaea8, 0xaea9, 0xaea9, 0xaeaa, - 0xaeaa, 0xaeaa, 0xaeab, 0xaeab, 0xaeac, 0xaeac, 0xaead, 0xaead, - 0xaead, 0xaeae, 0xaeae, 0xaeaf, 0xaeaf, 0xaeb0, 0xaeb0, 0xaeb0, - 0xaeb1, 0xaeb1, 0xaeb2, 0xaeb2, 0xaeb3, 0xaeb3, 0xaeb3, 0xaeb4, - 0xaeb4, 0xaeb5, 0xaeb5, 0xaeb6, 0xaeb6, 0xaeb6, 0xaeb7, 0xaeb7, - 0xaeb8, 0xaeb8, 0xaeb9, 0xaeb9, 0xaeb9, 0xaeba, 0xaeba, 0xaebb, - 0xaebb, 0xaebc, 0xaebc, 0xaebc, 0xaebd, 0xaebd, 0xaebe, 0xaebe, - 0xaebe, 0xaebf, 0xaebf, 0xaec0, 0xaec0, 0xaec1, 0xaec1, 0xaec1, - 0xaec2, 0xaec2, 0xaec3, 0xaec3, 0xaec4, 0xaec4, 0xaec4, 0xaec5, - 0xaec5, 0xaec6, 0xaec6, 0xaec7, 0xaec7, 0xaec7, 0xaec8, 0xaec8, - 0xaec9, 0xaec9, 0xaec9, 0xaeca, 0xaeca, 0xaecb, 0xaecb, 0xaecc, - 0xaecc, 0xaecc, 0xaecd, 0xaecd, 0xaece, 0xaece, 0xaece, 0xaecf, - 0xaecf, 0xaed0, 0xaed0, 0xaed1, 0xaed1, 0xaed1, 0xaed2, 0xaed2, - 0xaed3, 0xaed3, 0xaed3, 0xaed4, 0xaed4, 0xaed5, 0xaed5, 0xaed6, - 0xaed6, 0xaed6, 0xaed7, 0xaed7, 0xaed8, 0xaed8, 0xaed8, 0xaed9, - 0xaed9, 0xaeda, 0xaeda, 0xaedb, 0xaedb, 0xaedb, 0xaedc, 0xaedc, - 0xaedd, 0xaedd, 0xaedd, 0xaede, 0xaede, 0xaedf, 0xaedf, 0xaee0, - 0xaee0, 0xaee0, 0xaee1, 0xaee1, 0xaee2, 0xaee2, 0xaee2, 0xaee3, - 0xaee3, 0xaee4, 0xaee4, 0xaee4, 0xaee5, 0xaee5, 0xaee6, 0xaee6, - 0xaee7, 0xaee7, 0xaee7, 0xaee8, 0xaee8, 0xaee9, 0xaee9, 0xaee9, - 0xaeea, 0xaeea, 0xaeeb, 0xaeeb, 0xaeeb, 0xaeec, 0xaeec, 0xaeed, - 0xaeed, 0xaeee, 0xaeee, 0xaeee, 0xaeef, 0xaeef, 0xaef0, 0xaef0, - 0xaef0, 0xaef1, 0xaef1, 0xaef2, 0xaef2, 0xaef2, 0xaef3, 0xaef3, - 0xaef4, 0xaef4, 0xaef4, 0xaef5, 0xaef5, 0xaef6, 0xaef6, 0xaef6, - 0xaef7, 0xaef7, 0xaef8, 0xaef8, 0xaef9, 0xaef9, 0xaef9, 0xaefa, - 0xaefa, 0xaefb, 0xaefb, 0xaefb, 0xaefc, 0xaefc, 0xaefd, 0xaefd, - 0xaefd, 0xaefe, 0xaefe, 0xaeff, 0xaeff, 0xaeff, 0xaf00, 0xaf00, - 0xaf01, 0xaf01, 0xaf01, 0xaf02, 0xaf02, 0xaf03, 0xaf03, 0xaf03, - 0xaf04, 0xaf04, 0xaf05, 0xaf05, 0xaf05, 0xaf06, 0xaf06, 0xaf07, - 0xaf07, 0xaf07, 0xaf08, 0xaf08, 0xaf09, 0xaf09, 0xaf09, 0xaf0a, - 0xaf0a, 0xaf0b, 0xaf0b, 0xaf0b, 0xaf0c, 0xaf0c, 0xaf0d, 0xaf0d, - 0xaf0d, 0xaf0e, 0xaf0f, 0xaf10, 0xaf11, 0xaf12, 0xaf12, 0xaf13, - 0xaf14, 0xaf15, 0xaf15, 0xaf16, 0xaf17, 0xaf18, 0xaf19, 0xaf19, - 0xaf1a, 0xaf1b, 0xaf1c, 0xaf1d, 0xaf1d, 0xaf1e, 0xaf1f, 0xaf20, - 0xaf21, 0xaf21, 0xaf22, 0xaf23, 0xaf24, 0xaf25, 0xaf25, 0xaf26, - 0xaf27, 0xaf28, 0xaf29, 0xaf29, 0xaf2a, 0xaf2b, 0xaf2c, 0xaf2c, - 0xaf2d, 0xaf2e, 0xaf2f, 0xaf30, 0xaf30, 0xaf31, 0xaf32, 0xaf33, - 0xaf33, 0xaf34, 0xaf35, 0xaf36, 0xaf37, 0xaf37, 0xaf38, 0xaf39, - 0xaf3a, 0xaf3b, 0xaf3b, 0xaf3c, 0xaf3d, 0xaf3e, 0xaf3e, 0xaf3f, - 0xaf40, 0xaf41, 0xaf41, 0xaf42, 0xaf43, 0xaf44, 0xaf45, 0xaf45, - 0xaf46, 0xaf47, 0xaf48, 0xaf48, 0xaf49, 0xaf4a, 0xaf4b, 0xaf4c, - 0xaf4c, 0xaf4d, 0xaf4e, 0xaf4f, 0xaf4f, 0xaf50, 0xaf51, 0xaf52, - 0xaf52, 0xaf53, 0xaf54, 0xaf55, 0xaf56, 0xaf56, 0xaf57, 0xaf58, - 0xaf59, 0xaf59, 0xaf5a, 0xaf5b, 0xaf5c, 0xaf5c, 0xaf5d, 0xaf5e, - 0xaf5f, 0xaf5f, 0xaf60, 0xaf61, 0xaf62, 0xaf62, 0xaf63, 0xaf64, - 0xaf65, 0xaf65, 0xaf66, 0xaf67, 0xaf68, 0xaf69, 0xaf69, 0xaf6a, - 0xaf6b, 0xaf6c, 0xaf6c, 0xaf6d, 0xaf6e, 0xaf6f, 0xaf6f, 0xaf70, - 0xaf71, 0xaf72, 0xaf72, 0xaf73, 0xaf74, 0xaf75, 0xaf75, 0xaf76, - 0xaf77, 0xaf78, 0xaf78, 0xaf79, 0xaf7a, 0xaf7b, 0xaf7b, 0xaf7c, - 0xaf7d, 0xaf7e, 0xaf7e, 0xaf7f, 0xaf80, 0xaf81, 0xaf81, 0xaf82, - 0xaf83, 0xaf83, 0xaf84, 0xaf85, 0xaf86, 0xaf86, 0xaf87, 0xaf88, - 0xaf89, 0xaf89, 0xaf8a, 0xaf8b, 0xaf8c, 0xaf8c, 0xaf8d, 0xaf8e, - 0xaf8f, 0xaf8f, 0xaf90, 0xaf91, 0xaf92, 0xaf92, 0xaf93, 0xaf94, - 0xaf94, 0xaf95, 0xaf96, 0xaf97, 0xaf97, 0xaf98, 0xaf99, 0xaf9a, - 0xaf9a, 0xaf9b, 0xaf9c, 0xaf9d, 0xaf9d, 0xaf9e, 0xaf9f, 0xaf9f, - 0xafa0, 0xafa1, 0xafa2, 0xafa2, 0xafa3, 0xafa4, 0xafa5, 0xafa5, - 0xafa6, 0xafa7, 0xafa7, 0xafa8, 0xafa9, 0xafaa, 0xafaa, 0xafab, - 0xafac, 0xafad, 0xafad, 0xafae, 0xafaf, 0xafaf, 0xafb0, 0xafb1, - 0xafb2, 0xafb2, 0xafb3, 0xafb4, 0xafb4, 0xafb5, 0xafb6, 0xafb7, - 0xafb7, 0xafb8, 0xafb9, 0xafba, 0xafba, 0xafbb, 0xafbc, 0xafbc, - 0xafbd, 0xafbe, 0xafbf, 0xafbf, 0xafc0, 0xafc1, 0xafc1, 0xafc2, - 0xafc3, 0xafc4, 0xafc4, 0xafc5, 0xafc6, 0xafc6, 0xafc7, 0xafc8, - 0xafc9, 0xafc9, 0xafca, 0xafcb, 0xafcb, 0xafcc, 0xafcd, 0xafce, - 0xafce, 0xafcf, 0xafd0, 0xafd0, 0xafd1, 0xafd2, 0xafd2, 0xafd3, - 0xafd4, 0xafd5, 0xafd5, 0xafd6, 0xafd7, 0xafd7, 0xafd8, 0xafd9, - 0xafda, 0xafda, 0xafdb, 0xafdc, 0xafdc, 0xafdd, 0xafde, 0xafde, - 0xafdf, 0xafe0, 0xafe1, 0xafe1, 0xafe2, 0xafe3, 0xafe3, 0xafe4, - 0xafe5, 0xafe5, 0xafe6, 0xafe7, 0xafe8, 0xafe8, 0xafe9, 0xafea, - 0xafea, 0xafeb, 0xafec, 0xafec, 0xafed, 0xafee, 0xafef, 0xafef, - 0xaff0, 0xaff1, 0xaff1, 0xaff2, 0xaff3, 0xaff3, 0xaff4, 0xaff5, - 0xaff6, 0xaff6, 0xaff7, 0xaff8, 0xaff8, 0xaff9, 0xaffa, 0xaffa, - 0xaffb, 0xaffc, 0xaffc, 0xaffd, 0xaffe, 0xafff, 0xafff, 0xb000, - 0xb000, 0xb001, 0xb001, 0xb001, 0xb002, 0xb002, 0xb002, 0xb003, - 0xb003, 0xb003, 0xb004, 0xb004, 0xb004, 0xb005, 0xb005, 0xb005, - 0xb006, 0xb006, 0xb006, 0xb007, 0xb007, 0xb007, 0xb008, 0xb008, - 0xb009, 0xb009, 0xb009, 0xb00a, 0xb00a, 0xb00a, 0xb00b, 0xb00b, - 0xb00b, 0xb00c, 0xb00c, 0xb00c, 0xb00d, 0xb00d, 0xb00d, 0xb00e, - 0xb00e, 0xb00e, 0xb00f, 0xb00f, 0xb00f, 0xb010, 0xb010, 0xb010, - 0xb011, 0xb011, 0xb011, 0xb012, 0xb012, 0xb012, 0xb013, 0xb013, - 0xb013, 0xb014, 0xb014, 0xb014, 0xb015, 0xb015, 0xb015, 0xb016, - 0xb016, 0xb016, 0xb017, 0xb017, 0xb017, 0xb018, 0xb018, 0xb018, - 0xb019, 0xb019, 0xb019, 0xb01a, 0xb01a, 0xb01a, 0xb01b, 0xb01b, - 0xb01b, 0xb01c, 0xb01c, 0xb01c, 0xb01d, 0xb01d, 0xb01d, 0xb01e, - 0xb01e, 0xb01e, 0xb01f, 0xb01f, 0xb01f, 0xb020, 0xb020, 0xb020, - 0xb021, 0xb021, 0xb021, 0xb022, 0xb022, 0xb022, 0xb023, 0xb023, - 0xb023, 0xb024, 0xb024, 0xb024, 0xb025, 0xb025, 0xb025, 0xb026, - 0xb026, 0xb026, 0xb027, 0xb027, 0xb027, 0xb028, 0xb028, 0xb028, - 0xb029, 0xb029, 0xb029, 0xb02a, 0xb02a, 0xb02a, 0xb02b, 0xb02b, - 0xb02b, 0xb02c, 0xb02c, 0xb02c, 0xb02d, 0xb02d, 0xb02d, 0xb02e, - 0xb02e, 0xb02e, 0xb02f, 0xb02f, 0xb02f, 0xb030, 0xb030, 0xb030, - 0xb031, 0xb031, 0xb031, 0xb031, 0xb032, 0xb032, 0xb032, 0xb033, - 0xb033, 0xb033, 0xb034, 0xb034, 0xb034, 0xb035, 0xb035, 0xb035, - 0xb036, 0xb036, 0xb036, 0xb037, 0xb037, 0xb037, 0xb038, 0xb038, - 0xb038, 0xb039, 0xb039, 0xb039, 0xb03a, 0xb03a, 0xb03a, 0xb03b, - 0xb03b, 0xb03b, 0xb03c, 0xb03c, 0xb03c, 0xb03c, 0xb03d, 0xb03d, - 0xb03d, 0xb03e, 0xb03e, 0xb03e, 0xb03f, 0xb03f, 0xb03f, 0xb040, - 0xb040, 0xb040, 0xb041, 0xb041, 0xb041, 0xb042, 0xb042, 0xb042, - 0xb043, 0xb043, 0xb043, 0xb044, 0xb044, 0xb044, 0xb044, 0xb045, - 0xb045, 0xb045, 0xb046, 0xb046, 0xb046, 0xb047, 0xb047, 0xb047, - 0xb048, 0xb048, 0xb048, 0xb049, 0xb049, 0xb049, 0xb04a, 0xb04a, - 0xb04a, 0xb04b, 0xb04b, 0xb04b, 0xb04b, 0xb04c, 0xb04c, 0xb04c, - 0xb04d, 0xb04d, 0xb04d, 0xb04e, 0xb04e, 0xb04e, 0xb04f, 0xb04f, - 0xb04f, 0xb050, 0xb050, 0xb050, 0xb051, 0xb051, 0xb051, 0xb051, - 0xb052, 0xb052, 0xb052, 0xb053, 0xb053, 0xb053, 0xb054, 0xb054, - 0xb054, 0xb055, 0xb055, 0xb055, 0xb056, 0xb056, 0xb056, 0xb056, - 0xb057, 0xb057, 0xb057, 0xb058, 0xb058, 0xb058, 0xb059, 0xb059, - 0xb059, 0xb05a, 0xb05a, 0xb05a, 0xb05b, 0xb05b, 0xb05b, 0xb05b, - 0xb05c, 0xb05c, 0xb05c, 0xb05d, 0xb05d, 0xb05d, 0xb05e, 0xb05e, - 0xb05e, 0xb05f, 0xb05f, 0xb05f, 0xb05f, 0xb060, 0xb060, 0xb060, - 0xb061, 0xb061, 0xb061, 0xb062, 0xb062, 0xb062, 0xb063, 0xb063, - 0xb063, 0xb064, 0xb064, 0xb064, 0xb064, 0xb065, 0xb065, 0xb065, - 0xb066, 0xb066, 0xb066, 0xb067, 0xb067, 0xb067, 0xb068, 0xb068, - 0xb068, 0xb068, 0xb069, 0xb069, 0xb069, 0xb06a, 0xb06a, 0xb06a, - 0xb06b, 0xb06b, 0xb06b, 0xb06b, 0xb06c, 0xb06c, 0xb06c, 0xb06d, - 0xb06d, 0xb06d, 0xb06e, 0xb06e, 0xb06e, 0xb06f, 0xb06f, 0xb06f, - 0xb06f, 0xb070, 0xb070, 0xb070, 0xb071, 0xb071, 0xb071, 0xb072, - 0xb072, 0xb072, 0xb072, 0xb073, 0xb073, 0xb073, 0xb074, 0xb074, - 0xb074, 0xb075, 0xb075, 0xb075, 0xb076, 0xb076, 0xb076, 0xb076, - 0xb077, 0xb077, 0xb077, 0xb078, 0xb078, 0xb078, 0xb079, 0xb079, - 0xb079, 0xb079, 0xb07a, 0xb07a, 0xb07a, 0xb07b, 0xb07b, 0xb07b, - 0xb07c, 0xb07c, 0xb07c, 0xb07c, 0xb07d, 0xb07d, 0xb07d, 0xb07e, - 0xb07e, 0xb07e, 0xb07f, 0xb07f, 0xb07f, 0xb07f, 0xb080, 0xb080, - 0xb080, 0xb081, 0xb081, 0xb081, 0xb082, 0xb082, 0xb082, 0xb082, - 0xb083, 0xb083, 0xb083, 0xb084, 0xb084, 0xb084, 0xb085, 0xb085, - 0xb085, 0xb085, 0xb086, 0xb086, 0xb086, 0xb087, 0xb087, 0xb087, - 0xb087, 0xb088, 0xb088, 0xb088, 0xb089, 0xb089, 0xb089, 0xb08a, - 0xb08a, 0xb08a, 0xb08a, 0xb08b, 0xb08b, 0xb08b, 0xb08c, 0xb08c, - 0xb08c, 0xb08d, 0xb08d, 0xb08d, 0xb08d, 0xb08e, 0xb08e, 0xb08e, - 0xb08f, 0xb08f, 0xb08f, 0xb08f, 0xb090, 0xb090, 0xb090, 0xb091, - 0xb091, 0xb091, 0xb092, 0xb092, 0xb092, 0xb092, 0xb093, 0xb093, - 0xb093, 0xb094, 0xb094, 0xb094, 0xb094, 0xb095, 0xb095, 0xb095, - 0xb096, 0xb096, 0xb096, 0xb097, 0xb097, 0xb097, 0xb097, 0xb098, - 0xb098, 0xb098, 0xb099, 0xb099, 0xb099, 0xb099, 0xb09a, 0xb09a, - 0xb09a, 0xb09b, 0xb09b, 0xb09b, 0xb09b, 0xb09c, 0xb09c, 0xb09c, - 0xb09d, 0xb09d, 0xb09d, 0xb09e, 0xb09e, 0xb09e, 0xb09e, 0xb09f, - 0xb09f, 0xb09f, 0xb0a0, 0xb0a0, 0xb0a0, 0xb0a0, 0xb0a1, 0xb0a1, - 0xb0a1, 0xb0a2, 0xb0a2, 0xb0a2, 0xb0a2, 0xb0a3, 0xb0a3, 0xb0a3, - 0xb0a4, 0xb0a4, 0xb0a4, 0xb0a4, 0xb0a5, 0xb0a5, 0xb0a5, 0xb0a6, - 0xb0a6, 0xb0a6, 0xb0a6, 0xb0a7, 0xb0a7, 0xb0a7, 0xb0a8, 0xb0a8, - 0xb0a8, 0xb0a8, 0xb0a9, 0xb0a9, 0xb0a9, 0xb0aa, 0xb0aa, 0xb0aa, - 0xb0aa, 0xb0ab, 0xb0ab, 0xb0ab, 0xb0ac, 0xb0ac, 0xb0ac, 0xb0ac, - 0xb0ad, 0xb0ad, 0xb0ad, 0xb0ae, 0xb0ae, 0xb0ae, 0xb0ae, 0xb0af, - 0xb0af, 0xb0af, 0xb0b0, 0xb0b0, 0xb0b0, 0xb0b0, 0xb0b1, 0xb0b1, - 0xb0b1, 0xb0b2, 0xb0b2, 0xb0b2, 0xb0b2, 0xb0b3, 0xb0b3, 0xb0b3, - 0xb0b4, 0xb0b4, 0xb0b4, 0xb0b4, 0xb0b5, 0xb0b5, 0xb0b5, 0xb0b6, - 0xb0b6, 0xb0b6, 0xb0b6, 0xb0b7, 0xb0b7, 0xb0b7, 0xb0b8, 0xb0b8, - 0xb0b8, 0xb0b8, 0xb0b9, 0xb0b9, 0xb0b9, 0xb0ba, 0xb0ba, 0xb0ba, - 0xb0ba, 0xb0bb, 0xb0bb, 0xb0bb, 0xb0bc, 0xb0bc, 0xb0bc, 0xb0bc, - 0xb0bd, 0xb0bd, 0xb0bd, 0xb0bd, 0xb0be, 0xb0be, 0xb0be, 0xb0bf, - 0xb0bf, 0xb0bf, 0xb0bf, 0xb0c0, 0xb0c0, 0xb0c0, 0xb0c1, 0xb0c1, - 0xb0c1, 0xb0c1, 0xb0c2, 0xb0c2, 0xb0c2, 0xb0c3, 0xb0c3, 0xb0c3, - 0xb0c3, 0xb0c4, 0xb0c4, 0xb0c4, 0xb0c4, 0xb0c5, 0xb0c5, 0xb0c5, - 0xb0c6, 0xb0c6, 0xb0c6, 0xb0c6, 0xb0c7, 0xb0c7, 0xb0c7, 0xb0c8, - 0xb0c8, 0xb0c8, 0xb0c8, 0xb0c9, 0xb0c9, 0xb0c9, 0xb0c9, 0xb0ca, - 0xb0ca, 0xb0ca, 0xb0cb, 0xb0cb, 0xb0cb, 0xb0cb, 0xb0cc, 0xb0cc, - 0xb0cc, 0xb0cd, 0xb0cd, 0xb0cd, 0xb0cd, 0xb0ce, 0xb0ce, 0xb0ce, - 0xb0ce, 0xb0cf, 0xb0cf, 0xb0cf, 0xb0d0, 0xb0d0, 0xb0d0, 0xb0d0, - 0xb0d1, 0xb0d1, 0xb0d1, 0xb0d2, 0xb0d2, 0xb0d2, 0xb0d2, 0xb0d3, - 0xb0d3, 0xb0d3, 0xb0d3, 0xb0d4, 0xb0d4, 0xb0d4, 0xb0d5, 0xb0d5, - 0xb0d5, 0xb0d6, 0xb0d6, 0xb0d7, 0xb0d7, 0xb0d8, 0xb0d8, 0xb0d9, - 0xb0d9, 0xb0da, 0xb0db, 0xb0db, 0xb0dc, 0xb0dc, 0xb0dd, 0xb0dd, - 0xb0de, 0xb0de, 0xb0df, 0xb0df, 0xb0e0, 0xb0e1, 0xb0e1, 0xb0e2, - 0xb0e2, 0xb0e3, 0xb0e3, 0xb0e4, 0xb0e4, 0xb0e5, 0xb0e5, 0xb0e6, - 0xb0e7, 0xb0e7, 0xb0e8, 0xb0e8, 0xb0e9, 0xb0e9, 0xb0ea, 0xb0ea, - 0xb0eb, 0xb0eb, 0xb0ec, 0xb0ec, 0xb0ed, 0xb0ee, 0xb0ee, 0xb0ef, - 0xb0ef, 0xb0f0, 0xb0f0, 0xb0f1, 0xb0f1, 0xb0f2, 0xb0f2, 0xb0f3, - 0xb0f3, 0xb0f4, 0xb0f4, 0xb0f5, 0xb0f6, 0xb0f6, 0xb0f7, 0xb0f7, - 0xb0f8, 0xb0f8, 0xb0f9, 0xb0f9, 0xb0fa, 0xb0fa, 0xb0fb, 0xb0fb, - 0xb0fc, 0xb0fc, 0xb0fd, 0xb0fd, 0xb0fe, 0xb0ff, 0xb0ff, 0xb100, - 0xb100, 0xb101, 0xb101, 0xb102, 0xb102, 0xb103, 0xb103, 0xb104, - 0xb104, 0xb105, 0xb105, 0xb106, 0xb106, 0xb107, 0xb107, 0xb108, - 0xb109, 0xb109, 0xb10a, 0xb10a, 0xb10b, 0xb10b, 0xb10c, 0xb10c, - 0xb10d, 0xb10d, 0xb10e, 0xb10e, 0xb10f, 0xb10f, 0xb110, 0xb110, - 0xb111, 0xb111, 0xb112, 0xb112, 0xb113, 0xb113, 0xb114, 0xb114, - 0xb115, 0xb116, 0xb116, 0xb117, 0xb117, 0xb118, 0xb118, 0xb119, - 0xb119, 0xb11a, 0xb11a, 0xb11b, 0xb11b, 0xb11c, 0xb11c, 0xb11d, - 0xb11d, 0xb11e, 0xb11e, 0xb11f, 0xb11f, 0xb120, 0xb120, 0xb121, - 0xb121, 0xb122, 0xb122, 0xb123, 0xb123, 0xb124, 0xb124, 0xb125, - 0xb125, 0xb126, 0xb126, 0xb127, 0xb127, 0xb128, 0xb128, 0xb129, - 0xb129, 0xb12a, 0xb12a, 0xb12b, 0xb12c, 0xb12c, 0xb12d, 0xb12d, - 0xb12e, 0xb12e, 0xb12f, 0xb12f, 0xb130, 0xb130, 0xb131, 0xb131, - 0xb132, 0xb132, 0xb133, 0xb133, 0xb134, 0xb134, 0xb135, 0xb135, - 0xb136, 0xb136, 0xb137, 0xb137, 0xb138, 0xb138, 0xb139, 0xb139, - 0xb13a, 0xb13a, 0xb13b, 0xb13b, 0xb13c, 0xb13c, 0xb13d, 0xb13d, - 0xb13e, 0xb13e, 0xb13f, 0xb13f, 0xb140, 0xb140, 0xb141, 0xb141, - 0xb142, 0xb142, 0xb143, 0xb143, 0xb144, 0xb144, 0xb145, 0xb145, - 0xb146, 0xb146, 0xb147, 0xb147, 0xb148, 0xb148, 0xb148, 0xb149, - 0xb149, 0xb14a, 0xb14a, 0xb14b, 0xb14b, 0xb14c, 0xb14c, 0xb14d, - 0xb14d, 0xb14e, 0xb14e, 0xb14f, 0xb14f, 0xb150, 0xb150, 0xb151, - 0xb151, 0xb152, 0xb152, 0xb153, 0xb153, 0xb154, 0xb154, 0xb155, - 0xb155, 0xb156, 0xb156, 0xb157, 0xb157, 0xb158, 0xb158, 0xb159, - 0xb159, 0xb15a, 0xb15a, 0xb15b, 0xb15b, 0xb15c, 0xb15c, 0xb15d, - 0xb15d, 0xb15e, 0xb15e, 0xb15e, 0xb15f, 0xb15f, 0xb160, 0xb160, - 0xb161, 0xb161, 0xb162, 0xb162, 0xb163, 0xb163, 0xb164, 0xb164, - 0xb165, 0xb165, 0xb166, 0xb166, 0xb167, 0xb167, 0xb168, 0xb168, - 0xb169, 0xb169, 0xb16a, 0xb16a, 0xb16b, 0xb16b, 0xb16b, 0xb16c, - 0xb16c, 0xb16d, 0xb16d, 0xb16e, 0xb16e, 0xb16f, 0xb16f, 0xb170, - 0xb170, 0xb171, 0xb171, 0xb172, 0xb172, 0xb173, 0xb173, 0xb174, - 0xb174, 0xb175, 0xb175, 0xb175, 0xb176, 0xb176, 0xb177, 0xb177, - 0xb178, 0xb178, 0xb179, 0xb179, 0xb17a, 0xb17a, 0xb17b, 0xb17b, - 0xb17c, 0xb17c, 0xb17d, 0xb17d, 0xb17e, 0xb17e, 0xb17e, 0xb17f, - 0xb17f, 0xb180, 0xb180, 0xb181, 0xb181, 0xb182, 0xb182, 0xb183, - 0xb183, 0xb184, 0xb184, 0xb185, 0xb185, 0xb185, 0xb186, 0xb186, - 0xb187, 0xb187, 0xb188, 0xb188, 0xb189, 0xb189, 0xb18a, 0xb18a, - 0xb18b, 0xb18b, 0xb18c, 0xb18c, 0xb18c, 0xb18d, 0xb18d, 0xb18e, - 0xb18e, 0xb18f, 0xb18f, 0xb190, 0xb190, 0xb191, 0xb191, 0xb192, - 0xb192, 0xb193, 0xb193, 0xb193, 0xb194, 0xb194, 0xb195, 0xb195, - 0xb196, 0xb196, 0xb197, 0xb197, 0xb198, 0xb198, 0xb199, 0xb199, - 0xb199, 0xb19a, 0xb19a, 0xb19b, 0xb19b, 0xb19c, 0xb19c, 0xb19d, - 0xb19d, 0xb19e, 0xb19e, 0xb19f, 0xb19f, 0xb19f, 0xb1a0, 0xb1a0, - 0xb1a1, 0xb1a1, 0xb1a2, 0xb1a2, 0xb1a3, 0xb1a3, 0xb1a4, 0xb1a4, - 0xb1a4, 0xb1a5, 0xb1a5, 0xb1a6, 0xb1a6, 0xb1a7, 0xb1a7, 0xb1a8, - 0xb1a8, 0xb1a9, 0xb1a9, 0xb1a9, 0xb1aa, 0xb1aa, 0xb1ab, 0xb1ab, - 0xb1ac, 0xb1ac, 0xb1ad, 0xb1ad, 0xb1ae, 0xb1ae, 0xb1ae, 0xb1af, - 0xb1af, 0xb1b0, 0xb1b0, 0xb1b1, 0xb1b1, 0xb1b2, 0xb1b2, 0xb1b2, - 0xb1b3, 0xb1b3, 0xb1b4, 0xb1b4, 0xb1b5, 0xb1b5, 0xb1b6, 0xb1b6, - 0xb1b7, 0xb1b7, 0xb1b7, 0xb1b8, 0xb1b8, 0xb1b9, 0xb1b9, 0xb1ba, - 0xb1ba, 0xb1bb, 0xb1bb, 0xb1bb, 0xb1bc, 0xb1bc, 0xb1bd, 0xb1bd, - 0xb1be, 0xb1be, 0xb1bf, 0xb1bf, 0xb1bf, 0xb1c0, 0xb1c0, 0xb1c1, - 0xb1c1, 0xb1c2, 0xb1c2, 0xb1c3, 0xb1c3, 0xb1c4, 0xb1c4, 0xb1c4, - 0xb1c5, 0xb1c5, 0xb1c6, 0xb1c6, 0xb1c7, 0xb1c7, 0xb1c7, 0xb1c8, - 0xb1c8, 0xb1c9, 0xb1c9, 0xb1ca, 0xb1ca, 0xb1cb, 0xb1cb, 0xb1cb, - 0xb1cc, 0xb1cc, 0xb1cd, 0xb1cd, 0xb1ce, 0xb1ce, 0xb1cf, 0xb1cf, - 0xb1cf, 0xb1d0, 0xb1d0, 0xb1d1, 0xb1d1, 0xb1d2, 0xb1d2, 0xb1d3, - 0xb1d3, 0xb1d3, 0xb1d4, 0xb1d4, 0xb1d5, 0xb1d5, 0xb1d6, 0xb1d6, - 0xb1d6, 0xb1d7, 0xb1d7, 0xb1d8, 0xb1d8, 0xb1d9, 0xb1d9, 0xb1da, - 0xb1da, 0xb1da, 0xb1db, 0xb1db, 0xb1dc, 0xb1dc, 0xb1dd, 0xb1dd, - 0xb1dd, 0xb1de, 0xb1de, 0xb1df, 0xb1df, 0xb1e0, 0xb1e0, 0xb1e0, - 0xb1e1, 0xb1e1, 0xb1e2, 0xb1e2, 0xb1e3, 0xb1e3, 0xb1e4, 0xb1e4, - 0xb1e4, 0xb1e5, 0xb1e5, 0xb1e6, 0xb1e6, 0xb1e7, 0xb1e7, 0xb1e7, - 0xb1e8, 0xb1e8, 0xb1e9, 0xb1e9, 0xb1ea, 0xb1ea, 0xb1ea, 0xb1eb, - 0xb1eb, 0xb1ec, 0xb1ec, 0xb1ed, 0xb1ed, 0xb1ed, 0xb1ee, 0xb1ee, - 0xb1ef, 0xb1ef, 0xb1f0, 0xb1f0, 0xb1f0, 0xb1f1, 0xb1f1, 0xb1f2, - 0xb1f2, 0xb1f3, 0xb1f3, 0xb1f3, 0xb1f4, 0xb1f4, 0xb1f5, 0xb1f5, - 0xb1f6, 0xb1f6, 0xb1f6, 0xb1f7, 0xb1f7, 0xb1f8, 0xb1f8, 0xb1f9, - 0xb1f9, 0xb1f9, 0xb1fa, 0xb1fa, 0xb1fb, 0xb1fb, 0xb1fc, 0xb1fc, - 0xb1fc, 0xb1fd, 0xb1fd, 0xb1fe, 0xb1fe, 0xb1ff, 0xb1ff, 0xb1ff, - 0xb200, 0xb200, 0xb201, 0xb201, 0xb201, 0xb202, 0xb202, 0xb203, - 0xb203, 0xb204, 0xb204, 0xb204, 0xb205, 0xb205, 0xb206, 0xb206, - 0xb207, 0xb207, 0xb207, 0xb208, 0xb208, 0xb209, 0xb209, 0xb20a, - 0xb20a, 0xb20a, 0xb20b, 0xb20b, 0xb20c, 0xb20c, 0xb20c, 0xb20d, - 0xb20d, 0xb20e, 0xb20e, 0xb20f, 0xb20f, 0xb20f, 0xb210, 0xb210, - 0xb211, 0xb211, 0xb211, 0xb212, 0xb212, 0xb213, 0xb213, 0xb214, - 0xb214, 0xb214, 0xb215, 0xb215, 0xb216, 0xb216, 0xb216, 0xb217, - 0xb217, 0xb218, 0xb218, 0xb219, 0xb219, 0xb219, 0xb21a, 0xb21a, - 0xb21b, 0xb21b, 0xb21b, 0xb21c, 0xb21c, 0xb21d, 0xb21d, 0xb21e, - 0xb21e, 0xb21e, 0xb21f, 0xb21f, 0xb220, 0xb220, 0xb220, 0xb221, - 0xb221, 0xb222, 0xb222, 0xb222, 0xb223, 0xb223, 0xb224, 0xb224, - 0xb225, 0xb225, 0xb225, 0xb226, 0xb226, 0xb227, 0xb227, 0xb227, - 0xb228, 0xb228, 0xb229, 0xb229, 0xb229, 0xb22a, 0xb22a, 0xb22b, - 0xb22b, 0xb22c, 0xb22c, 0xb22c, 0xb22d, 0xb22d, 0xb22e, 0xb22e, - 0xb22e, 0xb22f, 0xb22f, 0xb230, 0xb230, 0xb230, 0xb231, 0xb231, - 0xb232, 0xb232, 0xb232, 0xb233, 0xb233, 0xb234, 0xb234, 0xb235, - 0xb235, 0xb235, 0xb236, 0xb236, 0xb237, 0xb237, 0xb237, 0xb238, - 0xb238, 0xb239, 0xb239, 0xb239, 0xb23a, 0xb23a, 0xb23b, 0xb23b, - 0xb23b, 0xb23c, 0xb23c, 0xb23d, 0xb23d, 0xb23d, 0xb23e, 0xb23e, - 0xb23f, 0xb23f, 0xb23f, 0xb240, 0xb240, 0xb241, 0xb241, 0xb241, - 0xb242, 0xb242, 0xb243, 0xb243, 0xb243, 0xb244, 0xb244, 0xb245, - 0xb245, 0xb245, 0xb246, 0xb246, 0xb247, 0xb247, 0xb247, 0xb248, - 0xb248, 0xb249, 0xb249, 0xb249, 0xb24a, 0xb24a, 0xb24b, 0xb24b, - 0xb24b, 0xb24c, 0xb24c, 0xb24d, 0xb24d, 0xb24d, 0xb24e, 0xb24e, - 0xb24f, 0xb24f, 0xb24f, 0xb250, 0xb250, 0xb251, 0xb251, 0xb251, - 0xb252, 0xb252, 0xb253, 0xb253, 0xb253, 0xb254, 0xb254, 0xb255, - 0xb255, 0xb255, 0xb256, 0xb256, 0xb257, 0xb257, 0xb257, 0xb258, - 0xb258, 0xb259, 0xb259, 0xb259, 0xb25a, 0xb25a, 0xb25b, 0xb25b, - 0xb25b, 0xb25c, 0xb25c, 0xb25d, 0xb25d, 0xb25d, 0xb25e, 0xb25e, - 0xb25f, 0xb25f, 0xb25f, 0xb260, 0xb260, 0xb261, 0xb261, 0xb261, - 0xb262, 0xb262, 0xb262, 0xb263, 0xb263, 0xb264, 0xb264, 0xb264, - 0xb265, 0xb265, 0xb266, 0xb266, 0xb266, 0xb267, 0xb267, 0xb268, - 0xb268, 0xb268, 0xb269, 0xb269, 0xb26a, 0xb26a, 0xb26a, 0xb26b, - 0xb26b, 0xb26b, 0xb26c, 0xb26c, 0xb26d, 0xb26d, 0xb26d, 0xb26e, - 0xb26e, 0xb26f, 0xb26f, 0xb26f, 0xb270, 0xb270, 0xb271, 0xb271, - 0xb271, 0xb272, 0xb272, 0xb273, 0xb273, 0xb273, 0xb274, 0xb274, - 0xb274, 0xb275, 0xb275, 0xb276, 0xb276, 0xb276, 0xb277, 0xb277, - 0xb278, 0xb278, 0xb278, 0xb279, 0xb279, 0xb279, 0xb27a, 0xb27a, - 0xb27b, 0xb27b, 0xb27b, 0xb27c, 0xb27c, 0xb27d, 0xb27d, 0xb27d, - 0xb27e, 0xb27e, 0xb27f, 0xb27f, 0xb27f, 0xb280, 0xb280, 0xb280, - 0xb281, 0xb281, 0xb282, 0xb282, 0xb282, 0xb283, 0xb283, 0xb284, - 0xb284, 0xb284, 0xb285, 0xb285, 0xb285, 0xb286, 0xb286, 0xb287, - 0xb287, 0xb287, 0xb288, 0xb288, 0xb288, 0xb289, 0xb289, 0xb28a, - 0xb28a, 0xb28a, 0xb28b, 0xb28b, 0xb28c, 0xb28c, 0xb28c, 0xb28d, - 0xb28d, 0xb28d, 0xb28e, 0xb28e, 0xb28f, 0xb28f, 0xb28f, 0xb290, - 0xb290, 0xb290, 0xb291, 0xb291, 0xb292, 0xb292, 0xb292, 0xb293, - 0xb293, 0xb294, 0xb294, 0xb294, 0xb295, 0xb295, 0xb295, 0xb296, - 0xb296, 0xb297, 0xb297, 0xb297, 0xb298, 0xb298, 0xb298, 0xb299, - 0xb299, 0xb29a, 0xb29a, 0xb29a, 0xb29b, 0xb29b, 0xb29b, 0xb29c, - 0xb29c, 0xb29d, 0xb29d, 0xb29d, 0xb29e, 0xb29e, 0xb29e, 0xb29f, - 0xb29f, 0xb2a0, 0xb2a1, 0xb2a1, 0xb2a2, 0xb2a3, 0xb2a4, 0xb2a4, - 0xb2a5, 0xb2a6, 0xb2a7, 0xb2a7, 0xb2a8, 0xb2a9, 0xb2aa, 0xb2aa, - 0xb2ab, 0xb2ac, 0xb2ad, 0xb2ad, 0xb2ae, 0xb2af, 0xb2b0, 0xb2b0, - 0xb2b1, 0xb2b2, 0xb2b3, 0xb2b3, 0xb2b4, 0xb2b5, 0xb2b6, 0xb2b6, - 0xb2b7, 0xb2b8, 0xb2b9, 0xb2b9, 0xb2ba, 0xb2bb, 0xb2bc, 0xb2bc, - 0xb2bd, 0xb2be, 0xb2be, 0xb2bf, 0xb2c0, 0xb2c1, 0xb2c1, 0xb2c2, - 0xb2c3, 0xb2c4, 0xb2c4, 0xb2c5, 0xb2c6, 0xb2c7, 0xb2c7, 0xb2c8, - 0xb2c9, 0xb2c9, 0xb2ca, 0xb2cb, 0xb2cc, 0xb2cc, 0xb2cd, 0xb2ce, - 0xb2cf, 0xb2cf, 0xb2d0, 0xb2d1, 0xb2d2, 0xb2d2, 0xb2d3, 0xb2d4, - 0xb2d4, 0xb2d5, 0xb2d6, 0xb2d7, 0xb2d7, 0xb2d8, 0xb2d9, 0xb2d9, - 0xb2da, 0xb2db, 0xb2dc, 0xb2dc, 0xb2dd, 0xb2de, 0xb2df, 0xb2df, - 0xb2e0, 0xb2e1, 0xb2e1, 0xb2e2, 0xb2e3, 0xb2e4, 0xb2e4, 0xb2e5, - 0xb2e6, 0xb2e6, 0xb2e7, 0xb2e8, 0xb2e9, 0xb2e9, 0xb2ea, 0xb2eb, - 0xb2eb, 0xb2ec, 0xb2ed, 0xb2ee, 0xb2ee, 0xb2ef, 0xb2f0, 0xb2f0, - 0xb2f1, 0xb2f2, 0xb2f3, 0xb2f3, 0xb2f4, 0xb2f5, 0xb2f5, 0xb2f6, - 0xb2f7, 0xb2f8, 0xb2f8, 0xb2f9, 0xb2fa, 0xb2fa, 0xb2fb, 0xb2fc, - 0xb2fc, 0xb2fd, 0xb2fe, 0xb2ff, 0xb2ff, 0xb300, 0xb301, 0xb301, - 0xb302, 0xb303, 0xb304, 0xb304, 0xb305, 0xb306, 0xb306, 0xb307, - 0xb308, 0xb308, 0xb309, 0xb30a, 0xb30b, 0xb30b, 0xb30c, 0xb30d, - 0xb30d, 0xb30e, 0xb30f, 0xb30f, 0xb310, 0xb311, 0xb311, 0xb312, - 0xb313, 0xb314, 0xb314, 0xb315, 0xb316, 0xb316, 0xb317, 0xb318, - 0xb318, 0xb319, 0xb31a, 0xb31b, 0xb31b, 0xb31c, 0xb31d, 0xb31d, - 0xb31e, 0xb31f, 0xb31f, 0xb320, 0xb321, 0xb321, 0xb322, 0xb323, - 0xb323, 0xb324, 0xb325, 0xb326, 0xb326, 0xb327, 0xb328, 0xb328, - 0xb329, 0xb32a, 0xb32a, 0xb32b, 0xb32c, 0xb32c, 0xb32d, 0xb32e, - 0xb32e, 0xb32f, 0xb330, 0xb330, 0xb331, 0xb332, 0xb333, 0xb333, - 0xb334, 0xb335, 0xb335, 0xb336, 0xb337, 0xb337, 0xb338, 0xb339, - 0xb339, 0xb33a, 0xb33b, 0xb33b, 0xb33c, 0xb33d, 0xb33d, 0xb33e, - 0xb33f, 0xb33f, 0xb340, 0xb341, 0xb341, 0xb342, 0xb343, 0xb343, - 0xb344, 0xb345, 0xb345, 0xb346, 0xb347, 0xb347, 0xb348, 0xb349, - 0xb34a, 0xb34a, 0xb34b, 0xb34c, 0xb34c, 0xb34d, 0xb34e, 0xb34e, - 0xb34f, 0xb350, 0xb350, 0xb351, 0xb352, 0xb352, 0xb353, 0xb354, - 0xb354, 0xb355, 0xb356, 0xb356, 0xb357, 0xb358, 0xb358, 0xb359, - 0xb35a, 0xb35a, 0xb35b, 0xb35c, 0xb35c, 0xb35d, 0xb35e, 0xb35e, - 0xb35f, 0xb35f, 0xb360, 0xb361, 0xb361, 0xb362, 0xb363, 0xb363, - 0xb364, 0xb365, 0xb365, 0xb366, 0xb367, 0xb367, 0xb368, 0xb369, - 0xb369, 0xb36a, 0xb36b, 0xb36b, 0xb36c, 0xb36d, 0xb36d, 0xb36e, - 0xb36f, 0xb36f, 0xb370, 0xb371, 0xb371, 0xb372, 0xb373, 0xb373, - 0xb374, 0xb375, 0xb375, 0xb376, 0xb376, 0xb377, 0xb378, 0xb378, - 0xb379, 0xb37a, 0xb37a, 0xb37b, 0xb37c, 0xb37c, 0xb37d, 0xb37e, - 0xb37e, 0xb37f, 0xb380, 0xb380, 0xb381, 0xb382, 0xb382, 0xb383, - 0xb383, 0xb384, 0xb385, 0xb385, 0xb386, 0xb387, 0xb387, 0xb388, - 0xb389, 0xb389, 0xb38a, 0xb38b, 0xb38b, 0xb38c, 0xb38c, 0xb38d, - 0xb38e, 0xb38e, 0xb38f, 0xb390, 0xb390, 0xb391, 0xb392, 0xb392, - 0xb393, 0xb394, 0xb394, 0xb395, 0xb395, 0xb396, 0xb397, 0xb397, - 0xb398, 0xb399, 0xb399, 0xb39a, 0xb39b, 0xb39b, 0xb39c, 0xb39c, - 0xb39d, 0xb39e, 0xb39e, 0xb39f, 0xb3a0, 0xb3a0, 0xb3a1, 0xb3a2, - 0xb3a2, 0xb3a3, 0xb3a3, 0xb3a4, 0xb3a5, 0xb3a5, 0xb3a6, 0xb3a7, - 0xb3a7, 0xb3a8, 0xb3a9, 0xb3a9, 0xb3aa, 0xb3aa, 0xb3ab, 0xb3ac, - 0xb3ac, 0xb3ad, 0xb3ae, 0xb3ae, 0xb3af, 0xb3af, 0xb3b0, 0xb3b1, - 0xb3b1, 0xb3b2, 0xb3b3, 0xb3b3, 0xb3b4, 0xb3b5, 0xb3b5, 0xb3b6, - 0xb3b6, 0xb3b7, 0xb3b8, 0xb3b8, 0xb3b9, 0xb3ba, 0xb3ba, 0xb3bb, - 0xb3bb, 0xb3bc, 0xb3bd, 0xb3bd, 0xb3be, 0xb3bf, 0xb3bf, 0xb3c0, - 0xb3c0, 0xb3c1, 0xb3c2, 0xb3c2, 0xb3c3, 0xb3c3, 0xb3c4, 0xb3c5, - 0xb3c5, 0xb3c6, 0xb3c7, 0xb3c7, 0xb3c8, 0xb3c8, 0xb3c9, 0xb3ca, - 0xb3ca, 0xb3cb, 0xb3cc, 0xb3cc, 0xb3cd, 0xb3cd, 0xb3ce, 0xb3cf, - 0xb3cf, 0xb3d0, 0xb3d1, 0xb3d1, 0xb3d2, 0xb3d2, 0xb3d3, 0xb3d4, - 0xb3d4, 0xb3d5, 0xb3d5, 0xb3d6, 0xb3d7, 0xb3d7, 0xb3d8, 0xb3d9, - 0xb3d9, 0xb3da, 0xb3da, 0xb3db, 0xb3dc, 0xb3dc, 0xb3dd, 0xb3dd, - 0xb3de, 0xb3df, 0xb3df, 0xb3e0, 0xb3e0, 0xb3e1, 0xb3e2, 0xb3e2, - 0xb3e3, 0xb3e4, 0xb3e4, 0xb3e5, 0xb3e5, 0xb3e6, 0xb3e7, 0xb3e7, - 0xb3e8, 0xb3e8, 0xb3e9, 0xb3ea, 0xb3ea, 0xb3eb, 0xb3eb, 0xb3ec, - 0xb3ed, 0xb3ed, 0xb3ee, 0xb3ee, 0xb3ef, 0xb3f0, 0xb3f0, 0xb3f1, - 0xb3f1, 0xb3f2, 0xb3f3, 0xb3f3, 0xb3f4, 0xb3f5, 0xb3f5, 0xb3f6, - 0xb3f6, 0xb3f7, 0xb3f8, 0xb3f8, 0xb3f9, 0xb3f9, 0xb3fa, 0xb3fb, - 0xb3fb, 0xb3fc, 0xb3fc, 0xb3fd, 0xb3fe, 0xb3fe, 0xb3ff, 0xb3ff, - 0xb400, 0xb400, 0xb401, 0xb401, 0xb401, 0xb401, 0xb402, 0xb402, - 0xb402, 0xb403, 0xb403, 0xb403, 0xb404, 0xb404, 0xb404, 0xb404, - 0xb405, 0xb405, 0xb405, 0xb406, 0xb406, 0xb406, 0xb407, 0xb407, - 0xb407, 0xb407, 0xb408, 0xb408, 0xb408, 0xb409, 0xb409, 0xb409, - 0xb40a, 0xb40a, 0xb40a, 0xb40a, 0xb40b, 0xb40b, 0xb40b, 0xb40c, - 0xb40c, 0xb40c, 0xb40c, 0xb40d, 0xb40d, 0xb40d, 0xb40e, 0xb40e, - 0xb40e, 0xb40f, 0xb40f, 0xb40f, 0xb40f, 0xb410, 0xb410, 0xb410, - 0xb411, 0xb411, 0xb411, 0xb411, 0xb412, 0xb412, 0xb412, 0xb413, - 0xb413, 0xb413, 0xb414, 0xb414, 0xb414, 0xb414, 0xb415, 0xb415, - 0xb415, 0xb416, 0xb416, 0xb416, 0xb416, 0xb417, 0xb417, 0xb417, - 0xb418, 0xb418, 0xb418, 0xb419, 0xb419, 0xb419, 0xb419, 0xb41a, - 0xb41a, 0xb41a, 0xb41b, 0xb41b, 0xb41b, 0xb41b, 0xb41c, 0xb41c, - 0xb41c, 0xb41d, 0xb41d, 0xb41d, 0xb41d, 0xb41e, 0xb41e, 0xb41e, - 0xb41f, 0xb41f, 0xb41f, 0xb41f, 0xb420, 0xb420, 0xb420, 0xb421, - 0xb421, 0xb421, 0xb422, 0xb422, 0xb422, 0xb422, 0xb423, 0xb423, - 0xb423, 0xb424, 0xb424, 0xb424, 0xb424, 0xb425, 0xb425, 0xb425, - 0xb426, 0xb426, 0xb426, 0xb426, 0xb427, 0xb427, 0xb427, 0xb428, - 0xb428, 0xb428, 0xb428, 0xb429, 0xb429, 0xb429, 0xb42a, 0xb42a, - 0xb42a, 0xb42a, 0xb42b, 0xb42b, 0xb42b, 0xb42c, 0xb42c, 0xb42c, - 0xb42c, 0xb42d, 0xb42d, 0xb42d, 0xb42e, 0xb42e, 0xb42e, 0xb42e, - 0xb42f, 0xb42f, 0xb42f, 0xb430, 0xb430, 0xb430, 0xb430, 0xb431, - 0xb431, 0xb431, 0xb432, 0xb432, 0xb432, 0xb432, 0xb433, 0xb433, - 0xb433, 0xb433, 0xb434, 0xb434, 0xb434, 0xb435, 0xb435, 0xb435, - 0xb435, 0xb436, 0xb436, 0xb436, 0xb437, 0xb437, 0xb437, 0xb437, - 0xb438, 0xb438, 0xb438, 0xb439, 0xb439, 0xb439, 0xb439, 0xb43a, - 0xb43a, 0xb43a, 0xb43b, 0xb43b, 0xb43b, 0xb43b, 0xb43c, 0xb43c, - 0xb43c, 0xb43c, 0xb43d, 0xb43d, 0xb43d, 0xb43e, 0xb43e, 0xb43e, - 0xb43e, 0xb43f, 0xb43f, 0xb43f, 0xb440, 0xb440, 0xb440, 0xb440, - 0xb441, 0xb441, 0xb441, 0xb442, 0xb442, 0xb442, 0xb442, 0xb443, - 0xb443, 0xb443, 0xb443, 0xb444, 0xb444, 0xb444, 0xb445, 0xb445, - 0xb445, 0xb445, 0xb446, 0xb446, 0xb446, 0xb447, 0xb447, 0xb447, - 0xb447, 0xb448, 0xb448, 0xb448, 0xb448, 0xb449, 0xb449, 0xb449, - 0xb44a, 0xb44a, 0xb44a, 0xb44a, 0xb44b, 0xb44b, 0xb44b, 0xb44b, - 0xb44c, 0xb44c, 0xb44c, 0xb44d, 0xb44d, 0xb44d, 0xb44d, 0xb44e, - 0xb44e, 0xb44e, 0xb44f, 0xb44f, 0xb44f, 0xb44f, 0xb450, 0xb450, - 0xb450, 0xb450, 0xb451, 0xb451, 0xb451, 0xb452, 0xb452, 0xb452, - 0xb452, 0xb453, 0xb453, 0xb453, 0xb453, 0xb454, 0xb454, 0xb454, - 0xb455, 0xb455, 0xb455, 0xb455, 0xb456, 0xb456, 0xb456, 0xb456, - 0xb457, 0xb457, 0xb457, 0xb458, 0xb458, 0xb458, 0xb458, 0xb459, - 0xb459, 0xb459, 0xb459, 0xb45a, 0xb45a, 0xb45a, 0xb45b, 0xb45b, - 0xb45b, 0xb45b, 0xb45c, 0xb45c, 0xb45c, 0xb45c, 0xb45d, 0xb45d, - 0xb45d, 0xb45d, 0xb45e, 0xb45e, 0xb45e, 0xb45f, 0xb45f, 0xb45f, - 0xb45f, 0xb460, 0xb460, 0xb460, 0xb460, 0xb461, 0xb461, 0xb461, - 0xb462, 0xb462, 0xb462, 0xb462, 0xb463, 0xb463, 0xb463, 0xb463, - 0xb464, 0xb464, 0xb464, 0xb464, 0xb465, 0xb465, 0xb465, 0xb466, - 0xb466, 0xb466, 0xb466, 0xb467, 0xb467, 0xb467, 0xb467, 0xb468, - 0xb468, 0xb468, 0xb468, 0xb469, 0xb469, 0xb469, 0xb46a, 0xb46a, - 0xb46a, 0xb46a, 0xb46b, 0xb46b, 0xb46b, 0xb46b, 0xb46c, 0xb46c, - 0xb46c, 0xb46c, 0xb46d, 0xb46d, 0xb46d, 0xb46e, 0xb46e, 0xb46e, - 0xb46e, 0xb46f, 0xb46f, 0xb46f, 0xb46f, 0xb470, 0xb470, 0xb470, - 0xb470, 0xb471, 0xb471, 0xb471, 0xb472, 0xb472, 0xb472, 0xb472, - 0xb473, 0xb473, 0xb473, 0xb473, 0xb474, 0xb474, 0xb474, 0xb474, - 0xb475, 0xb475, 0xb475, 0xb475, 0xb476, 0xb476, 0xb476, 0xb477, - 0xb477, 0xb477, 0xb477, 0xb478, 0xb478, 0xb478, 0xb478, 0xb479, - 0xb479, 0xb479, 0xb479, 0xb47a, 0xb47a, 0xb47a, 0xb47a, 0xb47b, - 0xb47b, 0xb47b, 0xb47c, 0xb47c, 0xb47c, 0xb47c, 0xb47d, 0xb47d, - 0xb47d, 0xb47d, 0xb47e, 0xb47e, 0xb47e, 0xb47e, 0xb47f, 0xb47f, - 0xb47f, 0xb47f, 0xb480, 0xb480, 0xb480, 0xb480, 0xb481, 0xb481, - 0xb481, 0xb482, 0xb482, 0xb482, 0xb482, 0xb483, 0xb483, 0xb483, - 0xb483, 0xb484, 0xb484, 0xb484, 0xb484, 0xb485, 0xb485, 0xb485, - 0xb485, 0xb486, 0xb486, 0xb486, 0xb486, 0xb487, 0xb487, 0xb487, - 0xb487, 0xb488, 0xb488, 0xb488, 0xb489, 0xb489, 0xb489, 0xb489, - 0xb48a, 0xb48a, 0xb48b, 0xb48b, 0xb48c, 0xb48c, 0xb48d, 0xb48d, - 0xb48e, 0xb48e, 0xb48f, 0xb48f, 0xb490, 0xb490, 0xb491, 0xb491, - 0xb492, 0xb492, 0xb493, 0xb493, 0xb494, 0xb494, 0xb495, 0xb495, - 0xb496, 0xb496, 0xb497, 0xb497, 0xb498, 0xb498, 0xb499, 0xb499, - 0xb49a, 0xb49a, 0xb49b, 0xb49b, 0xb49c, 0xb49c, 0xb49d, 0xb49d, - 0xb49e, 0xb49e, 0xb49f, 0xb49f, 0xb4a0, 0xb4a0, 0xb4a1, 0xb4a1, - 0xb4a2, 0xb4a2, 0xb4a3, 0xb4a3, 0xb4a4, 0xb4a4, 0xb4a5, 0xb4a5, - 0xb4a6, 0xb4a6, 0xb4a7, 0xb4a7, 0xb4a8, 0xb4a8, 0xb4a9, 0xb4a9, - 0xb4aa, 0xb4aa, 0xb4ab, 0xb4ab, 0xb4ac, 0xb4ac, 0xb4ad, 0xb4ad, - 0xb4ae, 0xb4ae, 0xb4af, 0xb4af, 0xb4b0, 0xb4b0, 0xb4b1, 0xb4b1, - 0xb4b2, 0xb4b2, 0xb4b3, 0xb4b3, 0xb4b4, 0xb4b4, 0xb4b5, 0xb4b5, - 0xb4b6, 0xb4b6, 0xb4b7, 0xb4b7, 0xb4b8, 0xb4b8, 0xb4b9, 0xb4b9, - 0xb4ba, 0xb4ba, 0xb4bb, 0xb4bb, 0xb4bc, 0xb4bc, 0xb4bd, 0xb4bd, - 0xb4be, 0xb4be, 0xb4bf, 0xb4bf, 0xb4c0, 0xb4c0, 0xb4c1, 0xb4c1, - 0xb4c2, 0xb4c2, 0xb4c3, 0xb4c3, 0xb4c4, 0xb4c4, 0xb4c5, 0xb4c5, - 0xb4c6, 0xb4c6, 0xb4c7, 0xb4c7, 0xb4c7, 0xb4c8, 0xb4c8, 0xb4c9, - 0xb4c9, 0xb4ca, 0xb4ca, 0xb4cb, 0xb4cb, 0xb4cc, 0xb4cc, 0xb4cd, - 0xb4cd, 0xb4ce, 0xb4ce, 0xb4cf, 0xb4cf, 0xb4d0, 0xb4d0, 0xb4d1, - 0xb4d1, 0xb4d2, 0xb4d2, 0xb4d3, 0xb4d3, 0xb4d4, 0xb4d4, 0xb4d4, - 0xb4d5, 0xb4d5, 0xb4d6, 0xb4d6, 0xb4d7, 0xb4d7, 0xb4d8, 0xb4d8, - 0xb4d9, 0xb4d9, 0xb4da, 0xb4da, 0xb4db, 0xb4db, 0xb4dc, 0xb4dc, - 0xb4dd, 0xb4dd, 0xb4de, 0xb4de, 0xb4de, 0xb4df, 0xb4df, 0xb4e0, - 0xb4e0, 0xb4e1, 0xb4e1, 0xb4e2, 0xb4e2, 0xb4e3, 0xb4e3, 0xb4e4, - 0xb4e4, 0xb4e5, 0xb4e5, 0xb4e6, 0xb4e6, 0xb4e6, 0xb4e7, 0xb4e7, - 0xb4e8, 0xb4e8, 0xb4e9, 0xb4e9, 0xb4ea, 0xb4ea, 0xb4eb, 0xb4eb, - 0xb4ec, 0xb4ec, 0xb4ed, 0xb4ed, 0xb4ee, 0xb4ee, 0xb4ee, 0xb4ef, - 0xb4ef, 0xb4f0, 0xb4f0, 0xb4f1, 0xb4f1, 0xb4f2, 0xb4f2, 0xb4f3, - 0xb4f3, 0xb4f4, 0xb4f4, 0xb4f5, 0xb4f5, 0xb4f5, 0xb4f6, 0xb4f6, - 0xb4f7, 0xb4f7, 0xb4f8, 0xb4f8, 0xb4f9, 0xb4f9, 0xb4fa, 0xb4fa, - 0xb4fb, 0xb4fb, 0xb4fb, 0xb4fc, 0xb4fc, 0xb4fd, 0xb4fd, 0xb4fe, - 0xb4fe, 0xb4ff, 0xb4ff, 0xb500, 0xb500, 0xb500, 0xb501, 0xb501, - 0xb502, 0xb502, 0xb503, 0xb503, 0xb504, 0xb504, 0xb505, 0xb505, - 0xb506, 0xb506, 0xb506, 0xb507, 0xb507, 0xb508, 0xb508, 0xb509, - 0xb509, 0xb50a, 0xb50a, 0xb50b, 0xb50b, 0xb50b, 0xb50c, 0xb50c, - 0xb50d, 0xb50d, 0xb50e, 0xb50e, 0xb50f, 0xb50f, 0xb510, 0xb510, - 0xb510, 0xb511, 0xb511, 0xb512, 0xb512, 0xb513, 0xb513, 0xb514, - 0xb514, 0xb514, 0xb515, 0xb515, 0xb516, 0xb516, 0xb517, 0xb517, - 0xb518, 0xb518, 0xb519, 0xb519, 0xb519, 0xb51a, 0xb51a, 0xb51b, - 0xb51b, 0xb51c, 0xb51c, 0xb51d, 0xb51d, 0xb51d, 0xb51e, 0xb51e, - 0xb51f, 0xb51f, 0xb520, 0xb520, 0xb521, 0xb521, 0xb521, 0xb522, - 0xb522, 0xb523, 0xb523, 0xb524, 0xb524, 0xb525, 0xb525, 0xb525, - 0xb526, 0xb526, 0xb527, 0xb527, 0xb528, 0xb528, 0xb529, 0xb529, - 0xb529, 0xb52a, 0xb52a, 0xb52b, 0xb52b, 0xb52c, 0xb52c, 0xb52d, - 0xb52d, 0xb52d, 0xb52e, 0xb52e, 0xb52f, 0xb52f, 0xb530, 0xb530, - 0xb530, 0xb531, 0xb531, 0xb532, 0xb532, 0xb533, 0xb533, 0xb534, - 0xb534, 0xb534, 0xb535, 0xb535, 0xb536, 0xb536, 0xb537, 0xb537, - 0xb537, 0xb538, 0xb538, 0xb539, 0xb539, 0xb53a, 0xb53a, 0xb53b, - 0xb53b, 0xb53b, 0xb53c, 0xb53c, 0xb53d, 0xb53d, 0xb53e, 0xb53e, - 0xb53e, 0xb53f, 0xb53f, 0xb540, 0xb540, 0xb541, 0xb541, 0xb541, - 0xb542, 0xb542, 0xb543, 0xb543, 0xb544, 0xb544, 0xb544, 0xb545, - 0xb545, 0xb546, 0xb546, 0xb547, 0xb547, 0xb548, 0xb548, 0xb548, - 0xb549, 0xb549, 0xb54a, 0xb54a, 0xb54b, 0xb54b, 0xb54b, 0xb54c, - 0xb54c, 0xb54d, 0xb54d, 0xb54e, 0xb54e, 0xb54e, 0xb54f, 0xb54f, - 0xb550, 0xb550, 0xb551, 0xb551, 0xb551, 0xb552, 0xb552, 0xb553, - 0xb553, 0xb553, 0xb554, 0xb554, 0xb555, 0xb555, 0xb556, 0xb556, - 0xb556, 0xb557, 0xb557, 0xb558, 0xb558, 0xb559, 0xb559, 0xb559, - 0xb55a, 0xb55a, 0xb55b, 0xb55b, 0xb55c, 0xb55c, 0xb55c, 0xb55d, - 0xb55d, 0xb55e, 0xb55e, 0xb55e, 0xb55f, 0xb55f, 0xb560, 0xb560, - 0xb561, 0xb561, 0xb561, 0xb562, 0xb562, 0xb563, 0xb563, 0xb564, - 0xb564, 0xb564, 0xb565, 0xb565, 0xb566, 0xb566, 0xb566, 0xb567, - 0xb567, 0xb568, 0xb568, 0xb569, 0xb569, 0xb569, 0xb56a, 0xb56a, - 0xb56b, 0xb56b, 0xb56b, 0xb56c, 0xb56c, 0xb56d, 0xb56d, 0xb56e, - 0xb56e, 0xb56e, 0xb56f, 0xb56f, 0xb570, 0xb570, 0xb570, 0xb571, - 0xb571, 0xb572, 0xb572, 0xb573, 0xb573, 0xb573, 0xb574, 0xb574, - 0xb575, 0xb575, 0xb575, 0xb576, 0xb576, 0xb577, 0xb577, 0xb577, - 0xb578, 0xb578, 0xb579, 0xb579, 0xb57a, 0xb57a, 0xb57a, 0xb57b, - 0xb57b, 0xb57c, 0xb57c, 0xb57c, 0xb57d, 0xb57d, 0xb57e, 0xb57e, - 0xb57e, 0xb57f, 0xb57f, 0xb580, 0xb580, 0xb581, 0xb581, 0xb581, - 0xb582, 0xb582, 0xb583, 0xb583, 0xb583, 0xb584, 0xb584, 0xb585, - 0xb585, 0xb585, 0xb586, 0xb586, 0xb587, 0xb587, 0xb587, 0xb588, - 0xb588, 0xb589, 0xb589, 0xb589, 0xb58a, 0xb58a, 0xb58b, 0xb58b, - 0xb58c, 0xb58c, 0xb58c, 0xb58d, 0xb58d, 0xb58e, 0xb58e, 0xb58e, - 0xb58f, 0xb58f, 0xb590, 0xb590, 0xb590, 0xb591, 0xb591, 0xb592, - 0xb592, 0xb592, 0xb593, 0xb593, 0xb594, 0xb594, 0xb594, 0xb595, - 0xb595, 0xb596, 0xb596, 0xb596, 0xb597, 0xb597, 0xb598, 0xb598, - 0xb598, 0xb599, 0xb599, 0xb59a, 0xb59a, 0xb59a, 0xb59b, 0xb59b, - 0xb59c, 0xb59c, 0xb59c, 0xb59d, 0xb59d, 0xb59e, 0xb59e, 0xb59e, - 0xb59f, 0xb59f, 0xb5a0, 0xb5a0, 0xb5a0, 0xb5a1, 0xb5a1, 0xb5a2, - 0xb5a2, 0xb5a2, 0xb5a3, 0xb5a3, 0xb5a4, 0xb5a4, 0xb5a4, 0xb5a5, - 0xb5a5, 0xb5a6, 0xb5a6, 0xb5a6, 0xb5a7, 0xb5a7, 0xb5a8, 0xb5a8, - 0xb5a8, 0xb5a9, 0xb5a9, 0xb5aa, 0xb5aa, 0xb5aa, 0xb5ab, 0xb5ab, - 0xb5ac, 0xb5ac, 0xb5ac, 0xb5ad, 0xb5ad, 0xb5ad, 0xb5ae, 0xb5ae, - 0xb5af, 0xb5af, 0xb5af, 0xb5b0, 0xb5b0, 0xb5b1, 0xb5b1, 0xb5b1, - 0xb5b2, 0xb5b2, 0xb5b3, 0xb5b3, 0xb5b3, 0xb5b4, 0xb5b4, 0xb5b5, - 0xb5b5, 0xb5b5, 0xb5b6, 0xb5b6, 0xb5b7, 0xb5b7, 0xb5b7, 0xb5b8, - 0xb5b8, 0xb5b8, 0xb5b9, 0xb5b9, 0xb5ba, 0xb5ba, 0xb5ba, 0xb5bb, - 0xb5bb, 0xb5bc, 0xb5bc, 0xb5bc, 0xb5bd, 0xb5bd, 0xb5be, 0xb5be, - 0xb5be, 0xb5bf, 0xb5bf, 0xb5bf, 0xb5c0, 0xb5c0, 0xb5c1, 0xb5c1, - 0xb5c1, 0xb5c2, 0xb5c2, 0xb5c3, 0xb5c3, 0xb5c3, 0xb5c4, 0xb5c4, - 0xb5c5, 0xb5c5, 0xb5c5, 0xb5c6, 0xb5c6, 0xb5c6, 0xb5c7, 0xb5c7, - 0xb5c8, 0xb5c8, 0xb5c8, 0xb5c9, 0xb5c9, 0xb5ca, 0xb5ca, 0xb5ca, - 0xb5cb, 0xb5cb, 0xb5cb, 0xb5cc, 0xb5cc, 0xb5cd, 0xb5cd, 0xb5cd, - 0xb5ce, 0xb5ce, 0xb5cf, 0xb5cf, 0xb5cf, 0xb5d0, 0xb5d0, 0xb5d0, - 0xb5d1, 0xb5d1, 0xb5d2, 0xb5d2, 0xb5d2, 0xb5d3, 0xb5d3, 0xb5d3, - 0xb5d4, 0xb5d4, 0xb5d5, 0xb5d5, 0xb5d5, 0xb5d6, 0xb5d6, 0xb5d7, - 0xb5d7, 0xb5d7, 0xb5d8, 0xb5d8, 0xb5d8, 0xb5d9, 0xb5d9, 0xb5da, - 0xb5da, 0xb5da, 0xb5db, 0xb5db, 0xb5db, 0xb5dc, 0xb5dc, 0xb5dd, - 0xb5dd, 0xb5dd, 0xb5de, 0xb5de, 0xb5df, 0xb5df, 0xb5df, 0xb5e0, - 0xb5e0, 0xb5e0, 0xb5e1, 0xb5e1, 0xb5e2, 0xb5e2, 0xb5e2, 0xb5e3, - 0xb5e3, 0xb5e3, 0xb5e4, 0xb5e4, 0xb5e5, 0xb5e5, 0xb5e5, 0xb5e6, - 0xb5e6, 0xb5e6, 0xb5e7, 0xb5e7, 0xb5e8, 0xb5e8, 0xb5e8, 0xb5e9, - 0xb5e9, 0xb5e9, 0xb5ea, 0xb5ea, 0xb5eb, 0xb5eb, 0xb5eb, 0xb5ec, - 0xb5ec, 0xb5ec, 0xb5ed, 0xb5ed, 0xb5ee, 0xb5ee, 0xb5ee, 0xb5ef, - 0xb5ef, 0xb5ef, 0xb5f0, 0xb5f0, 0xb5f1, 0xb5f1, 0xb5f1, 0xb5f2, - 0xb5f2, 0xb5f2, 0xb5f3, 0xb5f3, 0xb5f4, 0xb5f4, 0xb5f4, 0xb5f5, - 0xb5f5, 0xb5f5, 0xb5f6, 0xb5f6, 0xb5f7, 0xb5f7, 0xb5f7, 0xb5f8, - 0xb5f8, 0xb5f8, 0xb5f9, 0xb5f9, 0xb5f9, 0xb5fa, 0xb5fa, 0xb5fb, - 0xb5fb, 0xb5fb, 0xb5fc, 0xb5fc, 0xb5fc, 0xb5fd, 0xb5fd, 0xb5fe, - 0xb5fe, 0xb5fe, 0xb5ff, 0xb5ff, 0xb5ff, 0xb600, 0xb600, 0xb601, - 0xb601, 0xb601, 0xb602, 0xb602, 0xb602, 0xb603, 0xb603, 0xb603, - 0xb604, 0xb604, 0xb605, 0xb605, 0xb605, 0xb606, 0xb606, 0xb606, - 0xb607, 0xb607, 0xb607, 0xb608, 0xb608, 0xb609, 0xb609, 0xb609, - 0xb60a, 0xb60a, 0xb60a, 0xb60b, 0xb60b, 0xb60c, 0xb60c, 0xb60c, - 0xb60d, 0xb60d, 0xb60d, 0xb60e, 0xb60e, 0xb60e, 0xb60f, 0xb60f, - 0xb610, 0xb610, 0xb610, 0xb611, 0xb611, 0xb611, 0xb612, 0xb612, - 0xb612, 0xb613, 0xb613, 0xb614, 0xb614, 0xb614, 0xb615, 0xb615, - 0xb615, 0xb616, 0xb616, 0xb616, 0xb617, 0xb617, 0xb618, 0xb618, - 0xb618, 0xb619, 0xb619, 0xb619, 0xb61a, 0xb61a, 0xb61a, 0xb61b, - 0xb61b, 0xb61c, 0xb61c, 0xb61c, 0xb61d, 0xb61d, 0xb61d, 0xb61e, - 0xb61e, 0xb61e, 0xb61f, 0xb61f, 0xb61f, 0xb620, 0xb620, 0xb621, - 0xb621, 0xb621, 0xb622, 0xb622, 0xb622, 0xb623, 0xb623, 0xb623, - 0xb624, 0xb624, 0xb624, 0xb625, 0xb625, 0xb626, 0xb626, 0xb626, - 0xb627, 0xb627, 0xb627, 0xb628, 0xb628, 0xb628, 0xb629, 0xb629, - 0xb62a, 0xb62a, 0xb62a, 0xb62b, 0xb62b, 0xb62b, 0xb62c, 0xb62c, - 0xb62c, 0xb62d, 0xb62d, 0xb62d, 0xb62e, 0xb62e, 0xb62e, 0xb62f, - 0xb62f, 0xb630, 0xb630, 0xb630, 0xb631, 0xb631, 0xb631, 0xb632, - 0xb632, 0xb632, 0xb633, 0xb633, 0xb633, 0xb634, 0xb634, 0xb635, - 0xb635, 0xb635, 0xb636, 0xb636, 0xb636, 0xb637, 0xb637, 0xb637, - 0xb638, 0xb638, 0xb639, 0xb63a, 0xb63b, 0xb63b, 0xb63c, 0xb63d, - 0xb63d, 0xb63e, 0xb63f, 0xb63f, 0xb640, 0xb641, 0xb642, 0xb642, - 0xb643, 0xb644, 0xb644, 0xb645, 0xb646, 0xb646, 0xb647, 0xb648, - 0xb649, 0xb649, 0xb64a, 0xb64b, 0xb64b, 0xb64c, 0xb64d, 0xb64d, - 0xb64e, 0xb64f, 0xb650, 0xb650, 0xb651, 0xb652, 0xb652, 0xb653, - 0xb654, 0xb654, 0xb655, 0xb656, 0xb656, 0xb657, 0xb658, 0xb659, - 0xb659, 0xb65a, 0xb65b, 0xb65b, 0xb65c, 0xb65d, 0xb65d, 0xb65e, - 0xb65f, 0xb65f, 0xb660, 0xb661, 0xb661, 0xb662, 0xb663, 0xb664, - 0xb664, 0xb665, 0xb666, 0xb666, 0xb667, 0xb668, 0xb668, 0xb669, - 0xb66a, 0xb66a, 0xb66b, 0xb66c, 0xb66c, 0xb66d, 0xb66e, 0xb66e, - 0xb66f, 0xb670, 0xb670, 0xb671, 0xb672, 0xb672, 0xb673, 0xb674, - 0xb674, 0xb675, 0xb676, 0xb677, 0xb677, 0xb678, 0xb679, 0xb679, - 0xb67a, 0xb67b, 0xb67b, 0xb67c, 0xb67d, 0xb67d, 0xb67e, 0xb67f, - 0xb67f, 0xb680, 0xb681, 0xb681, 0xb682, 0xb683, 0xb683, 0xb684, - 0xb685, 0xb685, 0xb686, 0xb687, 0xb687, 0xb688, 0xb689, 0xb689, - 0xb68a, 0xb68b, 0xb68b, 0xb68c, 0xb68d, 0xb68d, 0xb68e, 0xb68f, - 0xb68f, 0xb690, 0xb691, 0xb691, 0xb692, 0xb693, 0xb693, 0xb694, - 0xb695, 0xb695, 0xb696, 0xb697, 0xb697, 0xb698, 0xb698, 0xb699, - 0xb69a, 0xb69a, 0xb69b, 0xb69c, 0xb69c, 0xb69d, 0xb69e, 0xb69e, - 0xb69f, 0xb6a0, 0xb6a0, 0xb6a1, 0xb6a2, 0xb6a2, 0xb6a3, 0xb6a4, - 0xb6a4, 0xb6a5, 0xb6a6, 0xb6a6, 0xb6a7, 0xb6a8, 0xb6a8, 0xb6a9, - 0xb6aa, 0xb6aa, 0xb6ab, 0xb6ab, 0xb6ac, 0xb6ad, 0xb6ad, 0xb6ae, - 0xb6af, 0xb6af, 0xb6b0, 0xb6b1, 0xb6b1, 0xb6b2, 0xb6b3, 0xb6b3, - 0xb6b4, 0xb6b5, 0xb6b5, 0xb6b6, 0xb6b6, 0xb6b7, 0xb6b8, 0xb6b8, - 0xb6b9, 0xb6ba, 0xb6ba, 0xb6bb, 0xb6bc, 0xb6bc, 0xb6bd, 0xb6be, - 0xb6be, 0xb6bf, 0xb6bf, 0xb6c0, 0xb6c1, 0xb6c1, 0xb6c2, 0xb6c3, - 0xb6c3, 0xb6c4, 0xb6c5, 0xb6c5, 0xb6c6, 0xb6c6, 0xb6c7, 0xb6c8, - 0xb6c8, 0xb6c9, 0xb6ca, 0xb6ca, 0xb6cb, 0xb6cc, 0xb6cc, 0xb6cd, - 0xb6cd, 0xb6ce, 0xb6cf, 0xb6cf, 0xb6d0, 0xb6d1, 0xb6d1, 0xb6d2, - 0xb6d3, 0xb6d3, 0xb6d4, 0xb6d4, 0xb6d5, 0xb6d6, 0xb6d6, 0xb6d7, - 0xb6d8, 0xb6d8, 0xb6d9, 0xb6d9, 0xb6da, 0xb6db, 0xb6db, 0xb6dc, - 0xb6dd, 0xb6dd, 0xb6de, 0xb6de, 0xb6df, 0xb6e0, 0xb6e0, 0xb6e1, - 0xb6e2, 0xb6e2, 0xb6e3, 0xb6e4, 0xb6e4, 0xb6e5, 0xb6e5, 0xb6e6, - 0xb6e7, 0xb6e7, 0xb6e8, 0xb6e8, 0xb6e9, 0xb6ea, 0xb6ea, 0xb6eb, - 0xb6ec, 0xb6ec, 0xb6ed, 0xb6ed, 0xb6ee, 0xb6ef, 0xb6ef, 0xb6f0, - 0xb6f1, 0xb6f1, 0xb6f2, 0xb6f2, 0xb6f3, 0xb6f4, 0xb6f4, 0xb6f5, - 0xb6f6, 0xb6f6, 0xb6f7, 0xb6f7, 0xb6f8, 0xb6f9, 0xb6f9, 0xb6fa, - 0xb6fa, 0xb6fb, 0xb6fc, 0xb6fc, 0xb6fd, 0xb6fe, 0xb6fe, 0xb6ff, - 0xb6ff, 0xb700, 0xb701, 0xb701, 0xb702, 0xb702, 0xb703, 0xb704, - 0xb704, 0xb705, 0xb705, 0xb706, 0xb707, 0xb707, 0xb708, 0xb709, - 0xb709, 0xb70a, 0xb70a, 0xb70b, 0xb70c, 0xb70c, 0xb70d, 0xb70d, - 0xb70e, 0xb70f, 0xb70f, 0xb710, 0xb710, 0xb711, 0xb712, 0xb712, - 0xb713, 0xb713, 0xb714, 0xb715, 0xb715, 0xb716, 0xb716, 0xb717, - 0xb718, 0xb718, 0xb719, 0xb719, 0xb71a, 0xb71b, 0xb71b, 0xb71c, - 0xb71d, 0xb71d, 0xb71e, 0xb71e, 0xb71f, 0xb720, 0xb720, 0xb721, - 0xb721, 0xb722, 0xb723, 0xb723, 0xb724, 0xb724, 0xb725, 0xb725, - 0xb726, 0xb727, 0xb727, 0xb728, 0xb728, 0xb729, 0xb72a, 0xb72a, - 0xb72b, 0xb72b, 0xb72c, 0xb72d, 0xb72d, 0xb72e, 0xb72e, 0xb72f, - 0xb730, 0xb730, 0xb731, 0xb731, 0xb732, 0xb733, 0xb733, 0xb734, - 0xb734, 0xb735, 0xb736, 0xb736, 0xb737, 0xb737, 0xb738, 0xb739, - 0xb739, 0xb73a, 0xb73a, 0xb73b, 0xb73b, 0xb73c, 0xb73d, 0xb73d, - 0xb73e, 0xb73e, 0xb73f, 0xb740, 0xb740, 0xb741, 0xb741, 0xb742, - 0xb743, 0xb743, 0xb744, 0xb744, 0xb745, 0xb745, 0xb746, 0xb747, - 0xb747, 0xb748, 0xb748, 0xb749, 0xb74a, 0xb74a, 0xb74b, 0xb74b, - 0xb74c, 0xb74c, 0xb74d, 0xb74e, 0xb74e, 0xb74f, 0xb74f, 0xb750, - 0xb751, 0xb751, 0xb752, 0xb752, 0xb753, 0xb753, 0xb754, 0xb755, - 0xb755, 0xb756, 0xb756, 0xb757, 0xb757, 0xb758, 0xb759, 0xb759, - 0xb75a, 0xb75a, 0xb75b, 0xb75c, 0xb75c, 0xb75d, 0xb75d, 0xb75e, - 0xb75e, 0xb75f, 0xb760, 0xb760, 0xb761, 0xb761, 0xb762, 0xb762, - 0xb763, 0xb764, 0xb764, 0xb765, 0xb765, 0xb766, 0xb766, 0xb767, - 0xb768, 0xb768, 0xb769, 0xb769, 0xb76a, 0xb76a, 0xb76b, 0xb76c, - 0xb76c, 0xb76d, 0xb76d, 0xb76e, 0xb76e, 0xb76f, 0xb770, 0xb770, - 0xb771, 0xb771, 0xb772, 0xb772, 0xb773, 0xb774, 0xb774, 0xb775, - 0xb775, 0xb776, 0xb776, 0xb777, 0xb778, 0xb778, 0xb779, 0xb779, - 0xb77a, 0xb77a, 0xb77b, 0xb77c, 0xb77c, 0xb77d, 0xb77d, 0xb77e, - 0xb77e, 0xb77f, 0xb77f, 0xb780, 0xb781, 0xb781, 0xb782, 0xb782, - 0xb783, 0xb783, 0xb784, 0xb785, 0xb785, 0xb786, 0xb786, 0xb787, - 0xb787, 0xb788, 0xb788, 0xb789, 0xb78a, 0xb78a, 0xb78b, 0xb78b, - 0xb78c, 0xb78c, 0xb78d, 0xb78e, 0xb78e, 0xb78f, 0xb78f, 0xb790, - 0xb790, 0xb791, 0xb791, 0xb792, 0xb793, 0xb793, 0xb794, 0xb794, - 0xb795, 0xb795, 0xb796, 0xb796, 0xb797, 0xb798, 0xb798, 0xb799, - 0xb799, 0xb79a, 0xb79a, 0xb79b, 0xb79b, 0xb79c, 0xb79d, 0xb79d, - 0xb79e, 0xb79e, 0xb79f, 0xb79f, 0xb7a0, 0xb7a0, 0xb7a1, 0xb7a2, - 0xb7a2, 0xb7a3, 0xb7a3, 0xb7a4, 0xb7a4, 0xb7a5, 0xb7a5, 0xb7a6, - 0xb7a7, 0xb7a7, 0xb7a8, 0xb7a8, 0xb7a9, 0xb7a9, 0xb7aa, 0xb7aa, - 0xb7ab, 0xb7ab, 0xb7ac, 0xb7ad, 0xb7ad, 0xb7ae, 0xb7ae, 0xb7af, - 0xb7af, 0xb7b0, 0xb7b0, 0xb7b1, 0xb7b2, 0xb7b2, 0xb7b3, 0xb7b3, - 0xb7b4, 0xb7b4, 0xb7b5, 0xb7b5, 0xb7b6, 0xb7b6, 0xb7b7, 0xb7b8, - 0xb7b8, 0xb7b9, 0xb7b9, 0xb7ba, 0xb7ba, 0xb7bb, 0xb7bb, 0xb7bc, - 0xb7bc, 0xb7bd, 0xb7bd, 0xb7be, 0xb7bf, 0xb7bf, 0xb7c0, 0xb7c0, - 0xb7c1, 0xb7c1, 0xb7c2, 0xb7c2, 0xb7c3, 0xb7c3, 0xb7c4, 0xb7c5, - 0xb7c5, 0xb7c6, 0xb7c6, 0xb7c7, 0xb7c7, 0xb7c8, 0xb7c8, 0xb7c9, - 0xb7c9, 0xb7ca, 0xb7ca, 0xb7cb, 0xb7cc, 0xb7cc, 0xb7cd, 0xb7cd, - 0xb7ce, 0xb7ce, 0xb7cf, 0xb7cf, 0xb7d0, 0xb7d0, 0xb7d1, 0xb7d1, - 0xb7d2, 0xb7d3, 0xb7d3, 0xb7d4, 0xb7d4, 0xb7d5, 0xb7d5, 0xb7d6, - 0xb7d6, 0xb7d7, 0xb7d7, 0xb7d8, 0xb7d8, 0xb7d9, 0xb7da, 0xb7da, - 0xb7db, 0xb7db, 0xb7dc, 0xb7dc, 0xb7dd, 0xb7dd, 0xb7de, 0xb7de, - 0xb7df, 0xb7df, 0xb7e0, 0xb7e0, 0xb7e1, 0xb7e2, 0xb7e2, 0xb7e3, - 0xb7e3, 0xb7e4, 0xb7e4, 0xb7e5, 0xb7e5, 0xb7e6, 0xb7e6, 0xb7e7, - 0xb7e7, 0xb7e8, 0xb7e8, 0xb7e9, 0xb7e9, 0xb7ea, 0xb7eb, 0xb7eb, - 0xb7ec, 0xb7ec, 0xb7ed, 0xb7ed, 0xb7ee, 0xb7ee, 0xb7ef, 0xb7ef, - 0xb7f0, 0xb7f0, 0xb7f1, 0xb7f1, 0xb7f2, 0xb7f2, 0xb7f3, 0xb7f3, - 0xb7f4, 0xb7f5, 0xb7f5, 0xb7f6, 0xb7f6, 0xb7f7, 0xb7f7, 0xb7f8, - 0xb7f8, 0xb7f9, 0xb7f9, 0xb7fa, 0xb7fa, 0xb7fb, 0xb7fb, 0xb7fc, - 0xb7fc, 0xb7fd, 0xb7fd, 0xb7fe, 0xb7fe, 0xb7ff, 0xb800, 0xb800, - 0xb800, 0xb801, 0xb801, 0xb801, 0xb801, 0xb802, 0xb802, 0xb802, - 0xb802, 0xb803, 0xb803, 0xb803, 0xb803, 0xb804, 0xb804, 0xb804, - 0xb804, 0xb805, 0xb805, 0xb805, 0xb805, 0xb806, 0xb806, 0xb806, - 0xb807, 0xb807, 0xb807, 0xb807, 0xb808, 0xb808, 0xb808, 0xb808, - 0xb809, 0xb809, 0xb809, 0xb809, 0xb80a, 0xb80a, 0xb80a, 0xb80a, - 0xb80b, 0xb80b, 0xb80b, 0xb80b, 0xb80c, 0xb80c, 0xb80c, 0xb80c, - 0xb80d, 0xb80d, 0xb80d, 0xb80d, 0xb80e, 0xb80e, 0xb80e, 0xb80f, - 0xb80f, 0xb80f, 0xb80f, 0xb810, 0xb810, 0xb810, 0xb810, 0xb811, - 0xb811, 0xb811, 0xb811, 0xb812, 0xb812, 0xb812, 0xb812, 0xb813, - 0xb813, 0xb813, 0xb813, 0xb814, 0xb814, 0xb814, 0xb814, 0xb815, - 0xb815, 0xb815, 0xb815, 0xb816, 0xb816, 0xb816, 0xb816, 0xb817, - 0xb817, 0xb817, 0xb817, 0xb818, 0xb818, 0xb818, 0xb818, 0xb819, - 0xb819, 0xb819, 0xb819, 0xb81a, 0xb81a, 0xb81a, 0xb81b, 0xb81b, - 0xb81b, 0xb81b, 0xb81c, 0xb81c, 0xb81c, 0xb81c, 0xb81d, 0xb81d, - 0xb81d, 0xb81d, 0xb81e, 0xb81e, 0xb81e, 0xb81e, 0xb81f, 0xb81f, - 0xb81f, 0xb81f, 0xb820, 0xb820, 0xb820, 0xb820, 0xb821, 0xb821, - 0xb821, 0xb821, 0xb822, 0xb822, 0xb822, 0xb822, 0xb823, 0xb823, - 0xb823, 0xb823, 0xb824, 0xb824, 0xb824, 0xb824, 0xb825, 0xb825, - 0xb825, 0xb825, 0xb826, 0xb826, 0xb826, 0xb826, 0xb827, 0xb827, - 0xb827, 0xb827, 0xb828, 0xb828, 0xb828, 0xb828, 0xb829, 0xb829, - 0xb829, 0xb829, 0xb82a, 0xb82a, 0xb82a, 0xb82a, 0xb82b, 0xb82b, - 0xb82b, 0xb82b, 0xb82c, 0xb82c, 0xb82c, 0xb82c, 0xb82d, 0xb82d, - 0xb82d, 0xb82d, 0xb82e, 0xb82e, 0xb82e, 0xb82e, 0xb82f, 0xb82f, - 0xb82f, 0xb82f, 0xb830, 0xb830, 0xb830, 0xb830, 0xb831, 0xb831, - 0xb831, 0xb831, 0xb831, 0xb832, 0xb832, 0xb832, 0xb832, 0xb833, - 0xb833, 0xb833, 0xb833, 0xb834, 0xb834, 0xb834, 0xb834, 0xb835, - 0xb835, 0xb835, 0xb835, 0xb836, 0xb836, 0xb836, 0xb836, 0xb837, - 0xb837, 0xb837, 0xb837, 0xb838, 0xb838, 0xb838, 0xb838, 0xb839, - 0xb839, 0xb839, 0xb839, 0xb83a, 0xb83a, 0xb83a, 0xb83a, 0xb83b, - 0xb83b, 0xb83b, 0xb83b, 0xb83c, 0xb83c, 0xb83c, 0xb83c, 0xb83d, - 0xb83d, 0xb83d, 0xb83d, 0xb83e, 0xb83e, 0xb83e, 0xb83e, 0xb83e, - 0xb83f, 0xb83f, 0xb83f, 0xb83f, 0xb840, 0xb840, 0xb840, 0xb840, - 0xb841, 0xb841, 0xb841, 0xb841, 0xb842, 0xb842, 0xb842, 0xb842, - 0xb843, 0xb843, 0xb844, 0xb844, 0xb845, 0xb845, 0xb846, 0xb846, - 0xb846, 0xb847, 0xb847, 0xb848, 0xb848, 0xb849, 0xb849, 0xb84a, - 0xb84a, 0xb84b, 0xb84b, 0xb84c, 0xb84c, 0xb84d, 0xb84d, 0xb84e, - 0xb84e, 0xb84f, 0xb84f, 0xb850, 0xb850, 0xb851, 0xb851, 0xb851, - 0xb852, 0xb852, 0xb853, 0xb853, 0xb854, 0xb854, 0xb855, 0xb855, - 0xb856, 0xb856, 0xb857, 0xb857, 0xb858, 0xb858, 0xb859, 0xb859, - 0xb85a, 0xb85a, 0xb85a, 0xb85b, 0xb85b, 0xb85c, 0xb85c, 0xb85d, - 0xb85d, 0xb85e, 0xb85e, 0xb85f, 0xb85f, 0xb860, 0xb860, 0xb861, - 0xb861, 0xb862, 0xb862, 0xb862, 0xb863, 0xb863, 0xb864, 0xb864, - 0xb865, 0xb865, 0xb866, 0xb866, 0xb867, 0xb867, 0xb868, 0xb868, - 0xb869, 0xb869, 0xb869, 0xb86a, 0xb86a, 0xb86b, 0xb86b, 0xb86c, - 0xb86c, 0xb86d, 0xb86d, 0xb86e, 0xb86e, 0xb86f, 0xb86f, 0xb86f, - 0xb870, 0xb870, 0xb871, 0xb871, 0xb872, 0xb872, 0xb873, 0xb873, - 0xb874, 0xb874, 0xb875, 0xb875, 0xb875, 0xb876, 0xb876, 0xb877, - 0xb877, 0xb878, 0xb878, 0xb879, 0xb879, 0xb87a, 0xb87a, 0xb87a, - 0xb87b, 0xb87b, 0xb87c, 0xb87c, 0xb87d, 0xb87d, 0xb87e, 0xb87e, - 0xb87f, 0xb87f, 0xb87f, 0xb880, 0xb880, 0xb881, 0xb881, 0xb882, - 0xb882, 0xb883, 0xb883, 0xb884, 0xb884, 0xb884, 0xb885, 0xb885, - 0xb886, 0xb886, 0xb887, 0xb887, 0xb888, 0xb888, 0xb889, 0xb889, - 0xb889, 0xb88a, 0xb88a, 0xb88b, 0xb88b, 0xb88c, 0xb88c, 0xb88d, - 0xb88d, 0xb88d, 0xb88e, 0xb88e, 0xb88f, 0xb88f, 0xb890, 0xb890, - 0xb891, 0xb891, 0xb891, 0xb892, 0xb892, 0xb893, 0xb893, 0xb894, - 0xb894, 0xb895, 0xb895, 0xb895, 0xb896, 0xb896, 0xb897, 0xb897, - 0xb898, 0xb898, 0xb899, 0xb899, 0xb899, 0xb89a, 0xb89a, 0xb89b, - 0xb89b, 0xb89c, 0xb89c, 0xb89d, 0xb89d, 0xb89d, 0xb89e, 0xb89e, - 0xb89f, 0xb89f, 0xb8a0, 0xb8a0, 0xb8a0, 0xb8a1, 0xb8a1, 0xb8a2, - 0xb8a2, 0xb8a3, 0xb8a3, 0xb8a4, 0xb8a4, 0xb8a4, 0xb8a5, 0xb8a5, - 0xb8a6, 0xb8a6, 0xb8a7, 0xb8a7, 0xb8a7, 0xb8a8, 0xb8a8, 0xb8a9, - 0xb8a9, 0xb8aa, 0xb8aa, 0xb8ab, 0xb8ab, 0xb8ab, 0xb8ac, 0xb8ac, - 0xb8ad, 0xb8ad, 0xb8ae, 0xb8ae, 0xb8ae, 0xb8af, 0xb8af, 0xb8b0, - 0xb8b0, 0xb8b1, 0xb8b1, 0xb8b1, 0xb8b2, 0xb8b2, 0xb8b3, 0xb8b3, - 0xb8b4, 0xb8b4, 0xb8b4, 0xb8b5, 0xb8b5, 0xb8b6, 0xb8b6, 0xb8b7, - 0xb8b7, 0xb8b7, 0xb8b8, 0xb8b8, 0xb8b9, 0xb8b9, 0xb8ba, 0xb8ba, - 0xb8ba, 0xb8bb, 0xb8bb, 0xb8bc, 0xb8bc, 0xb8bd, 0xb8bd, 0xb8bd, - 0xb8be, 0xb8be, 0xb8bf, 0xb8bf, 0xb8c0, 0xb8c0, 0xb8c0, 0xb8c1, - 0xb8c1, 0xb8c2, 0xb8c2, 0xb8c3, 0xb8c3, 0xb8c3, 0xb8c4, 0xb8c4, - 0xb8c5, 0xb8c5, 0xb8c5, 0xb8c6, 0xb8c6, 0xb8c7, 0xb8c7, 0xb8c8, - 0xb8c8, 0xb8c8, 0xb8c9, 0xb8c9, 0xb8ca, 0xb8ca, 0xb8cb, 0xb8cb, - 0xb8cb, 0xb8cc, 0xb8cc, 0xb8cd, 0xb8cd, 0xb8cd, 0xb8ce, 0xb8ce, - 0xb8cf, 0xb8cf, 0xb8d0, 0xb8d0, 0xb8d0, 0xb8d1, 0xb8d1, 0xb8d2, - 0xb8d2, 0xb8d3, 0xb8d3, 0xb8d3, 0xb8d4, 0xb8d4, 0xb8d5, 0xb8d5, - 0xb8d5, 0xb8d6, 0xb8d6, 0xb8d7, 0xb8d7, 0xb8d8, 0xb8d8, 0xb8d8, - 0xb8d9, 0xb8d9, 0xb8da, 0xb8da, 0xb8da, 0xb8db, 0xb8db, 0xb8dc, - 0xb8dc, 0xb8dc, 0xb8dd, 0xb8dd, 0xb8de, 0xb8de, 0xb8df, 0xb8df, - 0xb8df, 0xb8e0, 0xb8e0, 0xb8e1, 0xb8e1, 0xb8e1, 0xb8e2, 0xb8e2, - 0xb8e3, 0xb8e3, 0xb8e3, 0xb8e4, 0xb8e4, 0xb8e5, 0xb8e5, 0xb8e6, - 0xb8e6, 0xb8e6, 0xb8e7, 0xb8e7, 0xb8e8, 0xb8e8, 0xb8e8, 0xb8e9, - 0xb8e9, 0xb8ea, 0xb8ea, 0xb8ea, 0xb8eb, 0xb8eb, 0xb8ec, 0xb8ec, - 0xb8ec, 0xb8ed, 0xb8ed, 0xb8ee, 0xb8ee, 0xb8ee, 0xb8ef, 0xb8ef, - 0xb8f0, 0xb8f0, 0xb8f1, 0xb8f1, 0xb8f1, 0xb8f2, 0xb8f2, 0xb8f3, - 0xb8f3, 0xb8f3, 0xb8f4, 0xb8f4, 0xb8f5, 0xb8f5, 0xb8f5, 0xb8f6, - 0xb8f6, 0xb8f7, 0xb8f7, 0xb8f7, 0xb8f8, 0xb8f8, 0xb8f9, 0xb8f9, - 0xb8f9, 0xb8fa, 0xb8fa, 0xb8fb, 0xb8fb, 0xb8fb, 0xb8fc, 0xb8fc, - 0xb8fd, 0xb8fd, 0xb8fd, 0xb8fe, 0xb8fe, 0xb8ff, 0xb8ff, 0xb8ff, - 0xb900, 0xb900, 0xb901, 0xb901, 0xb901, 0xb902, 0xb902, 0xb903, - 0xb903, 0xb903, 0xb904, 0xb904, 0xb905, 0xb905, 0xb905, 0xb906, - 0xb906, 0xb907, 0xb907, 0xb907, 0xb908, 0xb908, 0xb909, 0xb909, - 0xb909, 0xb90a, 0xb90a, 0xb90b, 0xb90b, 0xb90b, 0xb90c, 0xb90c, - 0xb90d, 0xb90d, 0xb90d, 0xb90e, 0xb90e, 0xb90f, 0xb90f, 0xb90f, - 0xb910, 0xb910, 0xb910, 0xb911, 0xb911, 0xb912, 0xb912, 0xb912, - 0xb913, 0xb913, 0xb914, 0xb914, 0xb914, 0xb915, 0xb915, 0xb916, - 0xb916, 0xb916, 0xb917, 0xb917, 0xb918, 0xb918, 0xb918, 0xb919, - 0xb919, 0xb919, 0xb91a, 0xb91a, 0xb91b, 0xb91b, 0xb91b, 0xb91c, - 0xb91c, 0xb91d, 0xb91d, 0xb91d, 0xb91e, 0xb91e, 0xb91f, 0xb91f, - 0xb91f, 0xb920, 0xb920, 0xb920, 0xb921, 0xb921, 0xb922, 0xb922, - 0xb922, 0xb923, 0xb923, 0xb924, 0xb924, 0xb924, 0xb925, 0xb925, - 0xb926, 0xb926, 0xb926, 0xb927, 0xb927, 0xb927, 0xb928, 0xb928, - 0xb929, 0xb929, 0xb929, 0xb92a, 0xb92a, 0xb92b, 0xb92b, 0xb92b, - 0xb92c, 0xb92c, 0xb92c, 0xb92d, 0xb92d, 0xb92e, 0xb92e, 0xb92e, - 0xb92f, 0xb92f, 0xb92f, 0xb930, 0xb930, 0xb931, 0xb931, 0xb931, - 0xb932, 0xb932, 0xb933, 0xb933, 0xb933, 0xb934, 0xb934, 0xb934, - 0xb935, 0xb935, 0xb936, 0xb936, 0xb936, 0xb937, 0xb937, 0xb937, - 0xb938, 0xb938, 0xb939, 0xb939, 0xb939, 0xb93a, 0xb93a, 0xb93b, - 0xb93b, 0xb93b, 0xb93c, 0xb93c, 0xb93c, 0xb93d, 0xb93d, 0xb93e, - 0xb93e, 0xb93e, 0xb93f, 0xb93f, 0xb93f, 0xb940, 0xb940, 0xb941, - 0xb941, 0xb941, 0xb942, 0xb942, 0xb942, 0xb943, 0xb943, 0xb944, - 0xb944, 0xb944, 0xb945, 0xb945, 0xb945, 0xb946, 0xb946, 0xb947, - 0xb947, 0xb947, 0xb948, 0xb948, 0xb948, 0xb949, 0xb949, 0xb94a, - 0xb94a, 0xb94a, 0xb94b, 0xb94b, 0xb94b, 0xb94c, 0xb94c, 0xb94d, - 0xb94d, 0xb94d, 0xb94e, 0xb94e, 0xb94e, 0xb94f, 0xb94f, 0xb950, - 0xb950, 0xb950, 0xb951, 0xb951, 0xb951, 0xb952, 0xb952, 0xb953, - 0xb953, 0xb953, 0xb954, 0xb954, 0xb954, 0xb955, 0xb955, 0xb955, - 0xb956, 0xb956, 0xb957, 0xb957, 0xb957, 0xb958, 0xb958, 0xb958, - 0xb959, 0xb959, 0xb95a, 0xb95a, 0xb95a, 0xb95b, 0xb95b, 0xb95b, - 0xb95c, 0xb95c, 0xb95c, 0xb95d, 0xb95d, 0xb95e, 0xb95e, 0xb95e, - 0xb95f, 0xb95f, 0xb95f, 0xb960, 0xb960, 0xb961, 0xb961, 0xb961, - 0xb962, 0xb962, 0xb962, 0xb963, 0xb963, 0xb963, 0xb964, 0xb964, - 0xb965, 0xb965, 0xb965, 0xb966, 0xb966, 0xb966, 0xb967, 0xb967, - 0xb967, 0xb968, 0xb968, 0xb969, 0xb969, 0xb969, 0xb96a, 0xb96a, - 0xb96a, 0xb96b, 0xb96b, 0xb96b, 0xb96c, 0xb96c, 0xb96d, 0xb96d, - 0xb96d, 0xb96e, 0xb96e, 0xb96e, 0xb96f, 0xb96f, 0xb96f, 0xb970, - 0xb970, 0xb970, 0xb971, 0xb971, 0xb972, 0xb972, 0xb972, 0xb973, - 0xb973, 0xb973, 0xb974, 0xb974, 0xb974, 0xb975, 0xb975, 0xb976, - 0xb976, 0xb976, 0xb977, 0xb977, 0xb977, 0xb978, 0xb978, 0xb978, - 0xb979, 0xb979, 0xb979, 0xb97a, 0xb97a, 0xb97b, 0xb97b, 0xb97b, - 0xb97c, 0xb97c, 0xb97c, 0xb97d, 0xb97d, 0xb97d, 0xb97e, 0xb97e, - 0xb97e, 0xb97f, 0xb97f, 0xb980, 0xb980, 0xb980, 0xb981, 0xb981, - 0xb981, 0xb982, 0xb982, 0xb982, 0xb983, 0xb983, 0xb983, 0xb984, - 0xb984, 0xb985, 0xb985, 0xb985, 0xb986, 0xb986, 0xb986, 0xb987, - 0xb987, 0xb987, 0xb988, 0xb988, 0xb988, 0xb989, 0xb989, 0xb98a, - 0xb98a, 0xb98a, 0xb98b, 0xb98b, 0xb98b, 0xb98c, 0xb98c, 0xb98c, - 0xb98d, 0xb98d, 0xb98d, 0xb98e, 0xb98e, 0xb98e, 0xb98f, 0xb98f, - 0xb98f, 0xb990, 0xb990, 0xb991, 0xb991, 0xb991, 0xb992, 0xb992, - 0xb992, 0xb993, 0xb993, 0xb993, 0xb994, 0xb994, 0xb994, 0xb995, - 0xb995, 0xb995, 0xb996, 0xb996, 0xb997, 0xb997, 0xb997, 0xb998, - 0xb998, 0xb998, 0xb999, 0xb999, 0xb999, 0xb99a, 0xb99a, 0xb99a, - 0xb99b, 0xb99b, 0xb99b, 0xb99c, 0xb99c, 0xb99c, 0xb99d, 0xb99d, - 0xb99d, 0xb99e, 0xb99e, 0xb99f, 0xb99f, 0xb99f, 0xb9a0, 0xb9a0, - 0xb9a0, 0xb9a1, 0xb9a1, 0xb9a1, 0xb9a2, 0xb9a2, 0xb9a2, 0xb9a3, - 0xb9a3, 0xb9a3, 0xb9a4, 0xb9a4, 0xb9a4, 0xb9a5, 0xb9a5, 0xb9a5, - 0xb9a6, 0xb9a6, 0xb9a6, 0xb9a7, 0xb9a7, 0xb9a8, 0xb9a8, 0xb9a8, - 0xb9a9, 0xb9a9, 0xb9a9, 0xb9aa, 0xb9aa, 0xb9aa, 0xb9ab, 0xb9ab, - 0xb9ab, 0xb9ac, 0xb9ac, 0xb9ac, 0xb9ad, 0xb9ad, 0xb9ad, 0xb9ae, - 0xb9ae, 0xb9ae, 0xb9af, 0xb9af, 0xb9af, 0xb9b0, 0xb9b0, 0xb9b0, - 0xb9b1, 0xb9b1, 0xb9b1, 0xb9b2, 0xb9b2, 0xb9b2, 0xb9b3, 0xb9b3, - 0xb9b4, 0xb9b4, 0xb9b4, 0xb9b5, 0xb9b5, 0xb9b5, 0xb9b6, 0xb9b6, - 0xb9b6, 0xb9b7, 0xb9b7, 0xb9b7, 0xb9b8, 0xb9b8, 0xb9b8, 0xb9b9, - 0xb9b9, 0xb9b9, 0xb9ba, 0xb9ba, 0xb9ba, 0xb9bb, 0xb9bb, 0xb9bb, - 0xb9bc, 0xb9bc, 0xb9bc, 0xb9bd, 0xb9bd, 0xb9bd, 0xb9be, 0xb9be, - 0xb9be, 0xb9bf, 0xb9bf, 0xb9bf, 0xb9c0, 0xb9c0, 0xb9c0, 0xb9c1, - 0xb9c1, 0xb9c1, 0xb9c2, 0xb9c2, 0xb9c2, 0xb9c3, 0xb9c3, 0xb9c3, - 0xb9c4, 0xb9c4, 0xb9c4, 0xb9c5, 0xb9c5, 0xb9c5, 0xb9c6, 0xb9c6, - 0xb9c6, 0xb9c7, 0xb9c7, 0xb9c7, 0xb9c8, 0xb9c8, 0xb9c8, 0xb9c9, - 0xb9c9, 0xb9ca, 0xb9ca, 0xb9ca, 0xb9cb, 0xb9cb, 0xb9cb, 0xb9cc, - 0xb9cc, 0xb9cc, 0xb9cd, 0xb9cd, 0xb9cd, 0xb9ce, 0xb9ce, 0xb9ce, - 0xb9cf, 0xb9cf, 0xb9cf, 0xb9d0, 0xb9d0, 0xb9d0, 0xb9d1, 0xb9d1, - 0xb9d1, 0xb9d2, 0xb9d2, 0xb9d2, 0xb9d3, 0xb9d3, 0xb9d3, 0xb9d4, - 0xb9d4, 0xb9d4, 0xb9d5, 0xb9d5, 0xb9d5, 0xb9d6, 0xb9d6, 0xb9d6, - 0xb9d7, 0xb9d7, 0xb9d8, 0xb9d8, 0xb9d9, 0xb9da, 0xb9da, 0xb9db, - 0xb9dc, 0xb9dc, 0xb9dd, 0xb9de, 0xb9de, 0xb9df, 0xb9e0, 0xb9e0, - 0xb9e1, 0xb9e2, 0xb9e2, 0xb9e3, 0xb9e4, 0xb9e4, 0xb9e5, 0xb9e6, - 0xb9e6, 0xb9e7, 0xb9e8, 0xb9e8, 0xb9e9, 0xb9ea, 0xb9ea, 0xb9eb, - 0xb9ec, 0xb9ec, 0xb9ed, 0xb9ee, 0xb9ee, 0xb9ef, 0xb9ef, 0xb9f0, - 0xb9f1, 0xb9f1, 0xb9f2, 0xb9f3, 0xb9f3, 0xb9f4, 0xb9f5, 0xb9f5, - 0xb9f6, 0xb9f7, 0xb9f7, 0xb9f8, 0xb9f9, 0xb9f9, 0xb9fa, 0xb9fa, - 0xb9fb, 0xb9fc, 0xb9fc, 0xb9fd, 0xb9fe, 0xb9fe, 0xb9ff, 0xba00, - 0xba00, 0xba01, 0xba02, 0xba02, 0xba03, 0xba03, 0xba04, 0xba05, - 0xba05, 0xba06, 0xba07, 0xba07, 0xba08, 0xba09, 0xba09, 0xba0a, - 0xba0a, 0xba0b, 0xba0c, 0xba0c, 0xba0d, 0xba0e, 0xba0e, 0xba0f, - 0xba10, 0xba10, 0xba11, 0xba11, 0xba12, 0xba13, 0xba13, 0xba14, - 0xba15, 0xba15, 0xba16, 0xba17, 0xba17, 0xba18, 0xba18, 0xba19, - 0xba1a, 0xba1a, 0xba1b, 0xba1c, 0xba1c, 0xba1d, 0xba1d, 0xba1e, - 0xba1f, 0xba1f, 0xba20, 0xba21, 0xba21, 0xba22, 0xba22, 0xba23, - 0xba24, 0xba24, 0xba25, 0xba26, 0xba26, 0xba27, 0xba27, 0xba28, - 0xba29, 0xba29, 0xba2a, 0xba2b, 0xba2b, 0xba2c, 0xba2c, 0xba2d, - 0xba2e, 0xba2e, 0xba2f, 0xba30, 0xba30, 0xba31, 0xba31, 0xba32, - 0xba33, 0xba33, 0xba34, 0xba34, 0xba35, 0xba36, 0xba36, 0xba37, - 0xba38, 0xba38, 0xba39, 0xba39, 0xba3a, 0xba3b, 0xba3b, 0xba3c, - 0xba3c, 0xba3d, 0xba3e, 0xba3e, 0xba3f, 0xba40, 0xba40, 0xba41, - 0xba41, 0xba42, 0xba43, 0xba43, 0xba44, 0xba44, 0xba45, 0xba46, - 0xba46, 0xba47, 0xba47, 0xba48, 0xba49, 0xba49, 0xba4a, 0xba4a, - 0xba4b, 0xba4c, 0xba4c, 0xba4d, 0xba4e, 0xba4e, 0xba4f, 0xba4f, - 0xba50, 0xba51, 0xba51, 0xba52, 0xba52, 0xba53, 0xba54, 0xba54, - 0xba55, 0xba55, 0xba56, 0xba57, 0xba57, 0xba58, 0xba58, 0xba59, - 0xba5a, 0xba5a, 0xba5b, 0xba5b, 0xba5c, 0xba5d, 0xba5d, 0xba5e, - 0xba5e, 0xba5f, 0xba60, 0xba60, 0xba61, 0xba61, 0xba62, 0xba63, - 0xba63, 0xba64, 0xba64, 0xba65, 0xba66, 0xba66, 0xba67, 0xba67, - 0xba68, 0xba68, 0xba69, 0xba6a, 0xba6a, 0xba6b, 0xba6b, 0xba6c, - 0xba6d, 0xba6d, 0xba6e, 0xba6e, 0xba6f, 0xba70, 0xba70, 0xba71, - 0xba71, 0xba72, 0xba73, 0xba73, 0xba74, 0xba74, 0xba75, 0xba75, - 0xba76, 0xba77, 0xba77, 0xba78, 0xba78, 0xba79, 0xba7a, 0xba7a, - 0xba7b, 0xba7b, 0xba7c, 0xba7c, 0xba7d, 0xba7e, 0xba7e, 0xba7f, - 0xba7f, 0xba80, 0xba81, 0xba81, 0xba82, 0xba82, 0xba83, 0xba83, - 0xba84, 0xba85, 0xba85, 0xba86, 0xba86, 0xba87, 0xba88, 0xba88, - 0xba89, 0xba89, 0xba8a, 0xba8a, 0xba8b, 0xba8c, 0xba8c, 0xba8d, - 0xba8d, 0xba8e, 0xba8f, 0xba8f, 0xba90, 0xba90, 0xba91, 0xba91, - 0xba92, 0xba93, 0xba93, 0xba94, 0xba94, 0xba95, 0xba95, 0xba96, - 0xba97, 0xba97, 0xba98, 0xba98, 0xba99, 0xba99, 0xba9a, 0xba9b, - 0xba9b, 0xba9c, 0xba9c, 0xba9d, 0xba9d, 0xba9e, 0xba9f, 0xba9f, - 0xbaa0, 0xbaa0, 0xbaa1, 0xbaa1, 0xbaa2, 0xbaa3, 0xbaa3, 0xbaa4, - 0xbaa4, 0xbaa5, 0xbaa5, 0xbaa6, 0xbaa7, 0xbaa7, 0xbaa8, 0xbaa8, - 0xbaa9, 0xbaa9, 0xbaaa, 0xbaaa, 0xbaab, 0xbaac, 0xbaac, 0xbaad, - 0xbaad, 0xbaae, 0xbaae, 0xbaaf, 0xbab0, 0xbab0, 0xbab1, 0xbab1, - 0xbab2, 0xbab2, 0xbab3, 0xbab4, 0xbab4, 0xbab5, 0xbab5, 0xbab6, - 0xbab6, 0xbab7, 0xbab7, 0xbab8, 0xbab9, 0xbab9, 0xbaba, 0xbaba, - 0xbabb, 0xbabb, 0xbabc, 0xbabc, 0xbabd, 0xbabe, 0xbabe, 0xbabf, - 0xbabf, 0xbac0, 0xbac0, 0xbac1, 0xbac2, 0xbac2, 0xbac3, 0xbac3, - 0xbac4, 0xbac4, 0xbac5, 0xbac5, 0xbac6, 0xbac7, 0xbac7, 0xbac8, - 0xbac8, 0xbac9, 0xbac9, 0xbaca, 0xbaca, 0xbacb, 0xbacb, 0xbacc, - 0xbacd, 0xbacd, 0xbace, 0xbace, 0xbacf, 0xbacf, 0xbad0, 0xbad0, - 0xbad1, 0xbad2, 0xbad2, 0xbad3, 0xbad3, 0xbad4, 0xbad4, 0xbad5, - 0xbad5, 0xbad6, 0xbad7, 0xbad7, 0xbad8, 0xbad8, 0xbad9, 0xbad9, - 0xbada, 0xbada, 0xbadb, 0xbadb, 0xbadc, 0xbadd, 0xbadd, 0xbade, - 0xbade, 0xbadf, 0xbadf, 0xbae0, 0xbae0, 0xbae1, 0xbae1, 0xbae2, - 0xbae3, 0xbae3, 0xbae4, 0xbae4, 0xbae5, 0xbae5, 0xbae6, 0xbae6, - 0xbae7, 0xbae7, 0xbae8, 0xbae9, 0xbae9, 0xbaea, 0xbaea, 0xbaeb, - 0xbaeb, 0xbaec, 0xbaec, 0xbaed, 0xbaed, 0xbaee, 0xbaee, 0xbaef, - 0xbaf0, 0xbaf0, 0xbaf1, 0xbaf1, 0xbaf2, 0xbaf2, 0xbaf3, 0xbaf3, - 0xbaf4, 0xbaf4, 0xbaf5, 0xbaf5, 0xbaf6, 0xbaf7, 0xbaf7, 0xbaf8, - 0xbaf8, 0xbaf9, 0xbaf9, 0xbafa, 0xbafa, 0xbafb, 0xbafb, 0xbafc, - 0xbafc, 0xbafd, 0xbafe, 0xbafe, 0xbaff, 0xbaff, 0xbb00, 0xbb00, - 0xbb01, 0xbb01, 0xbb02, 0xbb02, 0xbb03, 0xbb03, 0xbb04, 0xbb04, - 0xbb05, 0xbb05, 0xbb06, 0xbb07, 0xbb07, 0xbb08, 0xbb08, 0xbb09, - 0xbb09, 0xbb0a, 0xbb0a, 0xbb0b, 0xbb0b, 0xbb0c, 0xbb0c, 0xbb0d, - 0xbb0d, 0xbb0e, 0xbb0f, 0xbb0f, 0xbb10, 0xbb10, 0xbb11, 0xbb11, - 0xbb12, 0xbb12, 0xbb13, 0xbb13, 0xbb14, 0xbb14, 0xbb15, 0xbb15, - 0xbb16, 0xbb16, 0xbb17, 0xbb17, 0xbb18, 0xbb19, 0xbb19, 0xbb1a, - 0xbb1a, 0xbb1b, 0xbb1b, 0xbb1c, 0xbb1c, 0xbb1d, 0xbb1d, 0xbb1e, - 0xbb1e, 0xbb1f, 0xbb1f, 0xbb20, 0xbb20, 0xbb21, 0xbb21, 0xbb22, - 0xbb22, 0xbb23, 0xbb23, 0xbb24, 0xbb25, 0xbb25, 0xbb26, 0xbb26, - 0xbb27, 0xbb27, 0xbb28, 0xbb28, 0xbb29, 0xbb29, 0xbb2a, 0xbb2a, - 0xbb2b, 0xbb2b, 0xbb2c, 0xbb2c, 0xbb2d, 0xbb2d, 0xbb2e, 0xbb2e, - 0xbb2f, 0xbb2f, 0xbb30, 0xbb30, 0xbb31, 0xbb32, 0xbb32, 0xbb33, - 0xbb33, 0xbb34, 0xbb34, 0xbb35, 0xbb35, 0xbb36, 0xbb36, 0xbb37, - 0xbb37, 0xbb38, 0xbb38, 0xbb39, 0xbb39, 0xbb3a, 0xbb3a, 0xbb3b, - 0xbb3b, 0xbb3c, 0xbb3c, 0xbb3d, 0xbb3d, 0xbb3e, 0xbb3e, 0xbb3f, - 0xbb3f, 0xbb40, 0xbb40, 0xbb41, 0xbb41, 0xbb42, 0xbb42, 0xbb43, - 0xbb43, 0xbb44, 0xbb44, 0xbb45, 0xbb46, 0xbb46, 0xbb47, 0xbb47, - 0xbb48, 0xbb48, 0xbb49, 0xbb49, 0xbb4a, 0xbb4a, 0xbb4b, 0xbb4b, - 0xbb4c, 0xbb4c, 0xbb4d, 0xbb4d, 0xbb4e, 0xbb4e, 0xbb4f, 0xbb4f, - 0xbb50, 0xbb50, 0xbb51, 0xbb51, 0xbb52, 0xbb52, 0xbb53, 0xbb53, - 0xbb54, 0xbb54, 0xbb55, 0xbb55, 0xbb56, 0xbb56, 0xbb57, 0xbb57, - 0xbb58, 0xbb58, 0xbb59, 0xbb59, 0xbb5a, 0xbb5a, 0xbb5b, 0xbb5b, - 0xbb5c, 0xbb5c, 0xbb5d, 0xbb5d, 0xbb5e, 0xbb5e, 0xbb5f, 0xbb5f, - 0xbb60, 0xbb60, 0xbb61, 0xbb61, 0xbb62, 0xbb62, 0xbb63, 0xbb63, - 0xbb64, 0xbb64, 0xbb65, 0xbb65, 0xbb66, 0xbb66, 0xbb67, 0xbb67, - 0xbb68, 0xbb68, 0xbb69, 0xbb69, 0xbb6a, 0xbb6a, 0xbb6b, 0xbb6b, - 0xbb6c, 0xbb6c, 0xbb6d, 0xbb6d, 0xbb6e, 0xbb6e, 0xbb6f, 0xbb6f, - 0xbb70, 0xbb70, 0xbb71, 0xbb71, 0xbb72, 0xbb72, 0xbb73, 0xbb73, - 0xbb74, 0xbb74, 0xbb75, 0xbb75, 0xbb76, 0xbb76, 0xbb77, 0xbb77, - 0xbb78, 0xbb78, 0xbb79, 0xbb79, 0xbb7a, 0xbb7a, 0xbb7b, 0xbb7b, - 0xbb7c, 0xbb7c, 0xbb7d, 0xbb7d, 0xbb7e, 0xbb7e, 0xbb7f, 0xbb7f, - 0xbb80, 0xbb80, 0xbb81, 0xbb81, 0xbb82, 0xbb82, 0xbb82, 0xbb83, - 0xbb83, 0xbb84, 0xbb84, 0xbb85, 0xbb85, 0xbb86, 0xbb86, 0xbb87, - 0xbb87, 0xbb88, 0xbb88, 0xbb89, 0xbb89, 0xbb8a, 0xbb8a, 0xbb8b, - 0xbb8b, 0xbb8c, 0xbb8c, 0xbb8d, 0xbb8d, 0xbb8e, 0xbb8e, 0xbb8f, - 0xbb8f, 0xbb90, 0xbb90, 0xbb91, 0xbb91, 0xbb92, 0xbb92, 0xbb93, - 0xbb93, 0xbb94, 0xbb94, 0xbb95, 0xbb95, 0xbb96, 0xbb96, 0xbb96, - 0xbb97, 0xbb97, 0xbb98, 0xbb98, 0xbb99, 0xbb99, 0xbb9a, 0xbb9a, - 0xbb9b, 0xbb9b, 0xbb9c, 0xbb9c, 0xbb9d, 0xbb9d, 0xbb9e, 0xbb9e, - 0xbb9f, 0xbb9f, 0xbba0, 0xbba0, 0xbba1, 0xbba1, 0xbba2, 0xbba2, - 0xbba3, 0xbba3, 0xbba4, 0xbba4, 0xbba4, 0xbba5, 0xbba5, 0xbba6, - 0xbba6, 0xbba7, 0xbba7, 0xbba8, 0xbba8, 0xbba9, 0xbba9, 0xbbaa, - 0xbbaa, 0xbbab, 0xbbab, 0xbbac, 0xbbac, 0xbbad, 0xbbad, 0xbbae, - 0xbbae, 0xbbaf, 0xbbaf, 0xbbaf, 0xbbb0, 0xbbb0, 0xbbb1, 0xbbb1, - 0xbbb2, 0xbbb2, 0xbbb3, 0xbbb3, 0xbbb4, 0xbbb4, 0xbbb5, 0xbbb5, - 0xbbb6, 0xbbb6, 0xbbb7, 0xbbb7, 0xbbb8, 0xbbb8, 0xbbb9, 0xbbb9, - 0xbbb9, 0xbbba, 0xbbba, 0xbbbb, 0xbbbb, 0xbbbc, 0xbbbc, 0xbbbd, - 0xbbbd, 0xbbbe, 0xbbbe, 0xbbbf, 0xbbbf, 0xbbc0, 0xbbc0, 0xbbc1, - 0xbbc1, 0xbbc1, 0xbbc2, 0xbbc2, 0xbbc3, 0xbbc3, 0xbbc4, 0xbbc4, - 0xbbc5, 0xbbc5, 0xbbc6, 0xbbc6, 0xbbc7, 0xbbc7, 0xbbc8, 0xbbc8, - 0xbbc9, 0xbbc9, 0xbbc9, 0xbbca, 0xbbca, 0xbbcb, 0xbbcb, 0xbbcc, - 0xbbcc, 0xbbcd, 0xbbcd, 0xbbce, 0xbbce, 0xbbcf, 0xbbcf, 0xbbd0, - 0xbbd0, 0xbbd1, 0xbbd1, 0xbbd1, 0xbbd2, 0xbbd2, 0xbbd3, 0xbbd3, - 0xbbd4, 0xbbd4, 0xbbd5, 0xbbd5, 0xbbd6, 0xbbd6, 0xbbd7, 0xbbd7, - 0xbbd8, 0xbbd8, 0xbbd8, 0xbbd9, 0xbbd9, 0xbbda, 0xbbda, 0xbbdb, - 0xbbdb, 0xbbdc, 0xbbdc, 0xbbdd, 0xbbdd, 0xbbde, 0xbbde, 0xbbde, - 0xbbdf, 0xbbdf, 0xbbe0, 0xbbe0, 0xbbe1, 0xbbe1, 0xbbe2, 0xbbe2, - 0xbbe3, 0xbbe3, 0xbbe4, 0xbbe4, 0xbbe5, 0xbbe5, 0xbbe5, 0xbbe6, - 0xbbe6, 0xbbe7, 0xbbe7, 0xbbe8, 0xbbe8, 0xbbe9, 0xbbe9, 0xbbea, - 0xbbea, 0xbbeb, 0xbbeb, 0xbbeb, 0xbbec, 0xbbec, 0xbbed, 0xbbed, - 0xbbee, 0xbbee, 0xbbef, 0xbbef, 0xbbf0, 0xbbf0, 0xbbf0, 0xbbf1, - 0xbbf1, 0xbbf2, 0xbbf2, 0xbbf3, 0xbbf3, 0xbbf4, 0xbbf4, 0xbbf5, - 0xbbf5, 0xbbf6, 0xbbf6, 0xbbf6, 0xbbf7, 0xbbf7, 0xbbf8, 0xbbf8, - 0xbbf9, 0xbbf9, 0xbbfa, 0xbbfa, 0xbbfb, 0xbbfb, 0xbbfb, 0xbbfc, - 0xbbfc, 0xbbfd, 0xbbfd, 0xbbfe, 0xbbfe, 0xbbff, 0xbbff, 0xbc00, - 0xbc00, 0xbc00, 0xbc01, 0xbc01, 0xbc02, 0xbc02, 0xbc03, 0xbc03, - 0xbc04, 0xbc04, 0xbc05, 0xbc05, 0xbc05, 0xbc06, 0xbc06, 0xbc07, - 0xbc07, 0xbc08, 0xbc08, 0xbc09, 0xbc09, 0xbc09, 0xbc0a, 0xbc0a, - 0xbc0b, 0xbc0b, 0xbc0c, 0xbc0c, 0xbc0d, 0xbc0d, 0xbc0d, 0xbc0e, - 0xbc0e, 0xbc0f, 0xbc0f, 0xbc10, 0xbc10, 0xbc11, 0xbc11, 0xbc11, - 0xbc12, 0xbc12, 0xbc13, 0xbc13, 0xbc14, 0xbc14, 0xbc14, 0xbc15, - 0xbc15, 0xbc16, 0xbc16, 0xbc17, 0xbc17, 0xbc17, 0xbc18, 0xbc18, - 0xbc19, 0xbc19, 0xbc1a, 0xbc1a, 0xbc1b, 0xbc1b, 0xbc1b, 0xbc1c, - 0xbc1c, 0xbc1d, 0xbc1d, 0xbc1d, 0xbc1e, 0xbc1e, 0xbc1f, 0xbc1f, - 0xbc20, 0xbc20, 0xbc20, 0xbc21, 0xbc21, 0xbc22, 0xbc22, 0xbc23, - 0xbc23, 0xbc23, 0xbc24, 0xbc24, 0xbc25, 0xbc25, 0xbc26, 0xbc26, - 0xbc26, 0xbc27, 0xbc27, 0xbc28, 0xbc28, 0xbc28, 0xbc29, 0xbc29, - 0xbc2a, 0xbc2a, 0xbc2b, 0xbc2b, 0xbc2b, 0xbc2c, 0xbc2c, 0xbc2d, - 0xbc2d, 0xbc2d, 0xbc2e, 0xbc2e, 0xbc2f, 0xbc2f, 0xbc2f, 0xbc30, - 0xbc30, 0xbc31, 0xbc31, 0xbc32, 0xbc32, 0xbc32, 0xbc33, 0xbc33, - 0xbc34, 0xbc34, 0xbc34, 0xbc35, 0xbc35, 0xbc36, 0xbc36, 0xbc36, - 0xbc37, 0xbc37, 0xbc38, 0xbc38, 0xbc38, 0xbc39, 0xbc39, 0xbc3a, - 0xbc3a, 0xbc3a, 0xbc3b, 0xbc3b, 0xbc3c, 0xbc3c, 0xbc3c, 0xbc3d, - 0xbc3d, 0xbc3e, 0xbc3e, 0xbc3e, 0xbc3f, 0xbc3f, 0xbc40, 0xbc40, - 0xbc40, 0xbc41, 0xbc41, 0xbc42, 0xbc42, 0xbc42, 0xbc43, 0xbc43, - 0xbc44, 0xbc44, 0xbc44, 0xbc45, 0xbc45, 0xbc46, 0xbc46, 0xbc46, - 0xbc47, 0xbc47, 0xbc47, 0xbc48, 0xbc48, 0xbc49, 0xbc49, 0xbc49, - 0xbc4a, 0xbc4a, 0xbc4b, 0xbc4b, 0xbc4b, 0xbc4c, 0xbc4c, 0xbc4d, - 0xbc4d, 0xbc4d, 0xbc4e, 0xbc4e, 0xbc4e, 0xbc4f, 0xbc4f, 0xbc50, - 0xbc50, 0xbc50, 0xbc51, 0xbc51, 0xbc52, 0xbc52, 0xbc52, 0xbc53, - 0xbc53, 0xbc53, 0xbc54, 0xbc54, 0xbc55, 0xbc55, 0xbc55, 0xbc56, - 0xbc56, 0xbc56, 0xbc57, 0xbc57, 0xbc58, 0xbc58, 0xbc58, 0xbc59, - 0xbc59, 0xbc59, 0xbc5a, 0xbc5a, 0xbc5b, 0xbc5b, 0xbc5b, 0xbc5c, - 0xbc5c, 0xbc5c, 0xbc5d, 0xbc5d, 0xbc5e, 0xbc5e, 0xbc5e, 0xbc5f, - 0xbc5f, 0xbc5f, 0xbc60, 0xbc60, 0xbc61, 0xbc61, 0xbc61, 0xbc62, - 0xbc62, 0xbc62, 0xbc63, 0xbc63, 0xbc63, 0xbc64, 0xbc64, 0xbc65, - 0xbc65, 0xbc65, 0xbc66, 0xbc66, 0xbc66, 0xbc67, 0xbc67, 0xbc67, - 0xbc68, 0xbc68, 0xbc69, 0xbc69, 0xbc69, 0xbc6a, 0xbc6a, 0xbc6a, - 0xbc6b, 0xbc6b, 0xbc6b, 0xbc6c, 0xbc6c, 0xbc6d, 0xbc6d, 0xbc6d, - 0xbc6e, 0xbc6e, 0xbc6e, 0xbc6f, 0xbc6f, 0xbc6f, 0xbc70, 0xbc70, - 0xbc71, 0xbc71, 0xbc71, 0xbc72, 0xbc72, 0xbc72, 0xbc73, 0xbc73, - 0xbc73, 0xbc74, 0xbc74, 0xbc74, 0xbc75, 0xbc75, 0xbc75, 0xbc76, - 0xbc76, 0xbc77, 0xbc77, 0xbc77, 0xbc78, 0xbc78, 0xbc78, 0xbc79, - 0xbc79, 0xbc79, 0xbc7a, 0xbc7a, 0xbc7a, 0xbc7b, 0xbc7b, 0xbc7b, - 0xbc7c, 0xbc7c, 0xbc7c, 0xbc7d, 0xbc7d, 0xbc7e, 0xbc7e, 0xbc7e, - 0xbc7f, 0xbc7f, 0xbc7f, 0xbc80, 0xbc80, 0xbc80, 0xbc81, 0xbc81, - 0xbc81, 0xbc82, 0xbc82, 0xbc82, 0xbc83, 0xbc83, 0xbc83, 0xbc84, - 0xbc84, 0xbc84, 0xbc85, 0xbc85, 0xbc85, 0xbc86, 0xbc86, 0xbc86, - 0xbc87, 0xbc87, 0xbc87, 0xbc88, 0xbc88, 0xbc89, 0xbc89, 0xbc89, - 0xbc8a, 0xbc8a, 0xbc8a, 0xbc8b, 0xbc8b, 0xbc8b, 0xbc8c, 0xbc8c, - 0xbc8c, 0xbc8d, 0xbc8d, 0xbc8d, 0xbc8e, 0xbc8e, 0xbc8e, 0xbc8f, - 0xbc8f, 0xbc8f, 0xbc90, 0xbc90, 0xbc90, 0xbc91, 0xbc91, 0xbc91, - 0xbc92, 0xbc92, 0xbc92, 0xbc93, 0xbc93, 0xbc93, 0xbc94, 0xbc94, - 0xbc94, 0xbc95, 0xbc95, 0xbc95, 0xbc96, 0xbc96, 0xbc96, 0xbc97, - 0xbc97, 0xbc97, 0xbc98, 0xbc98, 0xbc98, 0xbc99, 0xbc99, 0xbc99, - 0xbc99, 0xbc9a, 0xbc9a, 0xbc9a, 0xbc9b, 0xbc9b, 0xbc9b, 0xbc9c, - 0xbc9c, 0xbc9c, 0xbc9d, 0xbc9d, 0xbc9d, 0xbc9e, 0xbc9e, 0xbc9e, - 0xbc9f, 0xbc9f, 0xbc9f, 0xbca0, 0xbca0, 0xbca0, 0xbca1, 0xbca1, - 0xbca1, 0xbca2, 0xbca2, 0xbca2, 0xbca3, 0xbca3, 0xbca3, 0xbca4, - 0xbca4, 0xbca4, 0xbca4, 0xbca5, 0xbca5, 0xbca5, 0xbca6, 0xbca6, - 0xbca6, 0xbca7, 0xbca7, 0xbca7, 0xbca8, 0xbca8, 0xbca8, 0xbca9, - 0xbca9, 0xbca9, 0xbcaa, 0xbcaa, 0xbcaa, 0xbcaa, 0xbcab, 0xbcab, - 0xbcab, 0xbcac, 0xbcac, 0xbcac, 0xbcad, 0xbcad, 0xbcad, 0xbcae, - 0xbcae, 0xbcae, 0xbcaf, 0xbcaf, 0xbcaf, 0xbcb0, 0xbcb0, 0xbcb0, - 0xbcb0, 0xbcb1, 0xbcb1, 0xbcb1, 0xbcb2, 0xbcb2, 0xbcb2, 0xbcb3, - 0xbcb3, 0xbcb3, 0xbcb4, 0xbcb4, 0xbcb4, 0xbcb4, 0xbcb5, 0xbcb5, - 0xbcb5, 0xbcb6, 0xbcb6, 0xbcb6, 0xbcb7, 0xbcb7, 0xbcb7, 0xbcb8, - 0xbcb8, 0xbcb8, 0xbcb8, 0xbcb9, 0xbcb9, 0xbcb9, 0xbcba, 0xbcba, - 0xbcba, 0xbcbb, 0xbcbb, 0xbcbb, 0xbcbc, 0xbcbc, 0xbcbc, 0xbcbc, - 0xbcbd, 0xbcbd, 0xbcbd, 0xbcbe, 0xbcbe, 0xbcbe, 0xbcbf, 0xbcbf, - 0xbcbf, 0xbcbf, 0xbcc0, 0xbcc0, 0xbcc0, 0xbcc1, 0xbcc1, 0xbcc1, - 0xbcc2, 0xbcc2, 0xbcc2, 0xbcc2, 0xbcc3, 0xbcc3, 0xbcc3, 0xbcc4, - 0xbcc4, 0xbcc4, 0xbcc5, 0xbcc5, 0xbcc5, 0xbcc5, 0xbcc6, 0xbcc6, - 0xbcc6, 0xbcc7, 0xbcc7, 0xbcc7, 0xbcc8, 0xbcc8, 0xbcc8, 0xbcc8, - 0xbcc9, 0xbcc9, 0xbcc9, 0xbcca, 0xbcca, 0xbcca, 0xbcca, 0xbccb, - 0xbccb, 0xbccb, 0xbccc, 0xbccc, 0xbccc, 0xbccd, 0xbccd, 0xbccd, - 0xbccd, 0xbcce, 0xbcce, 0xbcce, 0xbccf, 0xbccf, 0xbccf, 0xbccf, - 0xbcd0, 0xbcd0, 0xbcd0, 0xbcd1, 0xbcd1, 0xbcd1, 0xbcd1, 0xbcd2, - 0xbcd2, 0xbcd2, 0xbcd3, 0xbcd3, 0xbcd3, 0xbcd3, 0xbcd4, 0xbcd4, - 0xbcd4, 0xbcd5, 0xbcd5, 0xbcd5, 0xbcd6, 0xbcd6, 0xbcd6, 0xbcd6, - 0xbcd7, 0xbcd7, 0xbcd7, 0xbcd8, 0xbcd8, 0xbcd8, 0xbcd8, 0xbcd9, - 0xbcd9, 0xbcd9, 0xbcda, 0xbcda, 0xbcda, 0xbcda, 0xbcdb, 0xbcdb, - 0xbcdb, 0xbcdc, 0xbcdc, 0xbcdc, 0xbcdc, 0xbcdd, 0xbcdd, 0xbcdd, - 0xbcdd, 0xbcde, 0xbcde, 0xbcde, 0xbcdf, 0xbcdf, 0xbcdf, 0xbcdf, - 0xbce0, 0xbce0, 0xbce0, 0xbce1, 0xbce1, 0xbce1, 0xbce1, 0xbce2, - 0xbce2, 0xbce2, 0xbce3, 0xbce3, 0xbce3, 0xbce3, 0xbce4, 0xbce4, - 0xbce4, 0xbce4, 0xbce5, 0xbce5, 0xbce5, 0xbce6, 0xbce6, 0xbce6, - 0xbce6, 0xbce7, 0xbce7, 0xbce7, 0xbce8, 0xbce8, 0xbce8, 0xbce8, - 0xbce9, 0xbce9, 0xbce9, 0xbce9, 0xbcea, 0xbcea, 0xbcea, 0xbceb, - 0xbceb, 0xbceb, 0xbceb, 0xbcec, 0xbcec, 0xbcec, 0xbcec, 0xbced, - 0xbced, 0xbced, 0xbcee, 0xbcee, 0xbcee, 0xbcee, 0xbcef, 0xbcef, - 0xbcef, 0xbcef, 0xbcf0, 0xbcf0, 0xbcf0, 0xbcf1, 0xbcf1, 0xbcf1, - 0xbcf1, 0xbcf2, 0xbcf2, 0xbcf2, 0xbcf2, 0xbcf3, 0xbcf3, 0xbcf3, - 0xbcf4, 0xbcf4, 0xbcf4, 0xbcf4, 0xbcf5, 0xbcf5, 0xbcf5, 0xbcf5, - 0xbcf6, 0xbcf6, 0xbcf6, 0xbcf7, 0xbcf7, 0xbcf7, 0xbcf7, 0xbcf8, - 0xbcf8, 0xbcf8, 0xbcf8, 0xbcf9, 0xbcf9, 0xbcf9, 0xbcf9, 0xbcfa, - 0xbcfa, 0xbcfa, 0xbcfa, 0xbcfb, 0xbcfb, 0xbcfb, 0xbcfc, 0xbcfc, - 0xbcfc, 0xbcfc, 0xbcfd, 0xbcfd, 0xbcfd, 0xbcfd, 0xbcfe, 0xbcfe, - 0xbcfe, 0xbcfe, 0xbcff, 0xbcff, 0xbcff, 0xbd00, 0xbd00, 0xbd00, - 0xbd00, 0xbd01, 0xbd01, 0xbd01, 0xbd01, 0xbd02, 0xbd02, 0xbd02, - 0xbd02, 0xbd03, 0xbd03, 0xbd03, 0xbd03, 0xbd04, 0xbd04, 0xbd04, - 0xbd04, 0xbd05, 0xbd05, 0xbd05, 0xbd06, 0xbd06, 0xbd06, 0xbd06, - 0xbd07, 0xbd07, 0xbd07, 0xbd07, 0xbd08, 0xbd08, 0xbd08, 0xbd08, - 0xbd09, 0xbd09, 0xbd09, 0xbd09, 0xbd0a, 0xbd0a, 0xbd0a, 0xbd0a, - 0xbd0b, 0xbd0b, 0xbd0b, 0xbd0b, 0xbd0c, 0xbd0c, 0xbd0c, 0xbd0c, - 0xbd0d, 0xbd0d, 0xbd0d, 0xbd0d, 0xbd0e, 0xbd0e, 0xbd0e, 0xbd0e, - 0xbd0f, 0xbd0f, 0xbd0f, 0xbd10, 0xbd10, 0xbd10, 0xbd10, 0xbd11, - 0xbd11, 0xbd11, 0xbd11, 0xbd12, 0xbd12, 0xbd12, 0xbd12, 0xbd13, - 0xbd13, 0xbd13, 0xbd13, 0xbd14, 0xbd14, 0xbd14, 0xbd14, 0xbd15, - 0xbd15, 0xbd15, 0xbd15, 0xbd16, 0xbd16, 0xbd16, 0xbd16, 0xbd17, - 0xbd17, 0xbd17, 0xbd17, 0xbd18, 0xbd18, 0xbd18, 0xbd18, 0xbd19, - 0xbd19, 0xbd19, 0xbd19, 0xbd1a, 0xbd1a, 0xbd1a, 0xbd1a, 0xbd1b, - 0xbd1b, 0xbd1b, 0xbd1b, 0xbd1c, 0xbd1c, 0xbd1c, 0xbd1c, 0xbd1d, - 0xbd1d, 0xbd1d, 0xbd1d, 0xbd1e, 0xbd1e, 0xbd1e, 0xbd1e, 0xbd1e, - 0xbd1f, 0xbd1f, 0xbd1f, 0xbd1f, 0xbd20, 0xbd20, 0xbd20, 0xbd20, - 0xbd21, 0xbd21, 0xbd21, 0xbd21, 0xbd22, 0xbd22, 0xbd22, 0xbd22, - 0xbd23, 0xbd23, 0xbd23, 0xbd23, 0xbd24, 0xbd24, 0xbd24, 0xbd24, - 0xbd25, 0xbd25, 0xbd25, 0xbd25, 0xbd26, 0xbd26, 0xbd26, 0xbd26, - 0xbd27, 0xbd27, 0xbd27, 0xbd27, 0xbd27, 0xbd28, 0xbd28, 0xbd28, - 0xbd28, 0xbd29, 0xbd29, 0xbd29, 0xbd29, 0xbd2a, 0xbd2a, 0xbd2a, - 0xbd2a, 0xbd2b, 0xbd2b, 0xbd2b, 0xbd2b, 0xbd2c, 0xbd2c, 0xbd2c, - 0xbd2c, 0xbd2d, 0xbd2d, 0xbd2d, 0xbd2d, 0xbd2d, 0xbd2e, 0xbd2e, - 0xbd2e, 0xbd2e, 0xbd2f, 0xbd2f, 0xbd2f, 0xbd2f, 0xbd30, 0xbd30, - 0xbd30, 0xbd30, 0xbd31, 0xbd31, 0xbd31, 0xbd31, 0xbd31, 0xbd32, - 0xbd32, 0xbd32, 0xbd32, 0xbd33, 0xbd33, 0xbd33, 0xbd33, 0xbd34, - 0xbd34, 0xbd34, 0xbd34, 0xbd35, 0xbd35, 0xbd35, 0xbd35, 0xbd35, - 0xbd36, 0xbd36, 0xbd36, 0xbd36, 0xbd37, 0xbd37, 0xbd37, 0xbd37, - 0xbd38, 0xbd38, 0xbd38, 0xbd38, 0xbd39, 0xbd39, 0xbd39, 0xbd39, - 0xbd39, 0xbd3a, 0xbd3a, 0xbd3a, 0xbd3a, 0xbd3b, 0xbd3b, 0xbd3b, - 0xbd3b, 0xbd3c, 0xbd3c, 0xbd3c, 0xbd3c, 0xbd3c, 0xbd3d, 0xbd3d, - 0xbd3d, 0xbd3d, 0xbd3e, 0xbd3e, 0xbd3e, 0xbd3e, 0xbd3f, 0xbd3f, - 0xbd3f, 0xbd3f, 0xbd3f, 0xbd40, 0xbd40, 0xbd40, 0xbd40, 0xbd41, - 0xbd41, 0xbd41, 0xbd41, 0xbd41, 0xbd42, 0xbd42, 0xbd42, 0xbd42, - 0xbd43, 0xbd43, 0xbd44, 0xbd44, 0xbd44, 0xbd45, 0xbd45, 0xbd46, - 0xbd46, 0xbd47, 0xbd47, 0xbd48, 0xbd48, 0xbd49, 0xbd49, 0xbd49, - 0xbd4a, 0xbd4a, 0xbd4b, 0xbd4b, 0xbd4c, 0xbd4c, 0xbd4d, 0xbd4d, - 0xbd4d, 0xbd4e, 0xbd4e, 0xbd4f, 0xbd4f, 0xbd50, 0xbd50, 0xbd51, - 0xbd51, 0xbd51, 0xbd52, 0xbd52, 0xbd53, 0xbd53, 0xbd54, 0xbd54, - 0xbd54, 0xbd55, 0xbd55, 0xbd56, 0xbd56, 0xbd57, 0xbd57, 0xbd58, - 0xbd58, 0xbd58, 0xbd59, 0xbd59, 0xbd5a, 0xbd5a, 0xbd5b, 0xbd5b, - 0xbd5b, 0xbd5c, 0xbd5c, 0xbd5d, 0xbd5d, 0xbd5e, 0xbd5e, 0xbd5e, - 0xbd5f, 0xbd5f, 0xbd60, 0xbd60, 0xbd61, 0xbd61, 0xbd61, 0xbd62, - 0xbd62, 0xbd63, 0xbd63, 0xbd64, 0xbd64, 0xbd64, 0xbd65, 0xbd65, - 0xbd66, 0xbd66, 0xbd66, 0xbd67, 0xbd67, 0xbd68, 0xbd68, 0xbd69, - 0xbd69, 0xbd69, 0xbd6a, 0xbd6a, 0xbd6b, 0xbd6b, 0xbd6c, 0xbd6c, - 0xbd6c, 0xbd6d, 0xbd6d, 0xbd6e, 0xbd6e, 0xbd6e, 0xbd6f, 0xbd6f, - 0xbd70, 0xbd70, 0xbd70, 0xbd71, 0xbd71, 0xbd72, 0xbd72, 0xbd73, - 0xbd73, 0xbd73, 0xbd74, 0xbd74, 0xbd75, 0xbd75, 0xbd75, 0xbd76, - 0xbd76, 0xbd77, 0xbd77, 0xbd77, 0xbd78, 0xbd78, 0xbd79, 0xbd79, - 0xbd79, 0xbd7a, 0xbd7a, 0xbd7b, 0xbd7b, 0xbd7b, 0xbd7c, 0xbd7c, - 0xbd7d, 0xbd7d, 0xbd7d, 0xbd7e, 0xbd7e, 0xbd7f, 0xbd7f, 0xbd7f, - 0xbd80, 0xbd80, 0xbd81, 0xbd81, 0xbd81, 0xbd82, 0xbd82, 0xbd83, - 0xbd83, 0xbd83, 0xbd84, 0xbd84, 0xbd85, 0xbd85, 0xbd85, 0xbd86, - 0xbd86, 0xbd87, 0xbd87, 0xbd87, 0xbd88, 0xbd88, 0xbd89, 0xbd89, - 0xbd89, 0xbd8a, 0xbd8a, 0xbd8b, 0xbd8b, 0xbd8b, 0xbd8c, 0xbd8c, - 0xbd8c, 0xbd8d, 0xbd8d, 0xbd8e, 0xbd8e, 0xbd8e, 0xbd8f, 0xbd8f, - 0xbd90, 0xbd90, 0xbd90, 0xbd91, 0xbd91, 0xbd91, 0xbd92, 0xbd92, - 0xbd93, 0xbd93, 0xbd93, 0xbd94, 0xbd94, 0xbd95, 0xbd95, 0xbd95, - 0xbd96, 0xbd96, 0xbd96, 0xbd97, 0xbd97, 0xbd98, 0xbd98, 0xbd98, - 0xbd99, 0xbd99, 0xbd99, 0xbd9a, 0xbd9a, 0xbd9b, 0xbd9b, 0xbd9b, - 0xbd9c, 0xbd9c, 0xbd9c, 0xbd9d, 0xbd9d, 0xbd9e, 0xbd9e, 0xbd9e, - 0xbd9f, 0xbd9f, 0xbd9f, 0xbda0, 0xbda0, 0xbda1, 0xbda1, 0xbda1, - 0xbda2, 0xbda2, 0xbda2, 0xbda3, 0xbda3, 0xbda4, 0xbda4, 0xbda4, - 0xbda5, 0xbda5, 0xbda5, 0xbda6, 0xbda6, 0xbda6, 0xbda7, 0xbda7, - 0xbda8, 0xbda8, 0xbda8, 0xbda9, 0xbda9, 0xbda9, 0xbdaa, 0xbdaa, - 0xbdaa, 0xbdab, 0xbdab, 0xbdac, 0xbdac, 0xbdac, 0xbdad, 0xbdad, - 0xbdad, 0xbdae, 0xbdae, 0xbdae, 0xbdaf, 0xbdaf, 0xbdb0, 0xbdb0, - 0xbdb0, 0xbdb1, 0xbdb1, 0xbdb1, 0xbdb2, 0xbdb2, 0xbdb2, 0xbdb3, - 0xbdb3, 0xbdb3, 0xbdb4, 0xbdb4, 0xbdb5, 0xbdb5, 0xbdb5, 0xbdb6, - 0xbdb6, 0xbdb6, 0xbdb7, 0xbdb7, 0xbdb7, 0xbdb8, 0xbdb8, 0xbdb8, - 0xbdb9, 0xbdb9, 0xbdba, 0xbdba, 0xbdba, 0xbdbb, 0xbdbb, 0xbdbb, - 0xbdbc, 0xbdbc, 0xbdbc, 0xbdbd, 0xbdbd, 0xbdbd, 0xbdbe, 0xbdbe, - 0xbdbe, 0xbdbf, 0xbdbf, 0xbdbf, 0xbdc0, 0xbdc0, 0xbdc1, 0xbdc1, - 0xbdc1, 0xbdc2, 0xbdc2, 0xbdc2, 0xbdc3, 0xbdc3, 0xbdc3, 0xbdc4, - 0xbdc4, 0xbdc4, 0xbdc5, 0xbdc5, 0xbdc5, 0xbdc6, 0xbdc6, 0xbdc6, - 0xbdc7, 0xbdc7, 0xbdc7, 0xbdc8, 0xbdc8, 0xbdc8, 0xbdc9, 0xbdc9, - 0xbdc9, 0xbdca, 0xbdca, 0xbdca, 0xbdcb, 0xbdcb, 0xbdcb, 0xbdcc, - 0xbdcc, 0xbdcc, 0xbdcd, 0xbdcd, 0xbdce, 0xbdce, 0xbdce, 0xbdcf, - 0xbdcf, 0xbdcf, 0xbdd0, 0xbdd0, 0xbdd0, 0xbdd1, 0xbdd1, 0xbdd1, - 0xbdd2, 0xbdd2, 0xbdd2, 0xbdd3, 0xbdd3, 0xbdd3, 0xbdd4, 0xbdd4, - 0xbdd4, 0xbdd5, 0xbdd5, 0xbdd5, 0xbdd6, 0xbdd6, 0xbdd6, 0xbdd7, - 0xbdd7, 0xbdd7, 0xbdd8, 0xbdd8, 0xbdd8, 0xbdd9, 0xbdd9, 0xbdd9, - 0xbdd9, 0xbdda, 0xbdda, 0xbdda, 0xbddb, 0xbddb, 0xbddb, 0xbddc, - 0xbddc, 0xbddc, 0xbddd, 0xbddd, 0xbddd, 0xbdde, 0xbdde, 0xbdde, - 0xbddf, 0xbddf, 0xbddf, 0xbde0, 0xbde0, 0xbde0, 0xbde1, 0xbde1, - 0xbde1, 0xbde2, 0xbde2, 0xbde2, 0xbde3, 0xbde3, 0xbde3, 0xbde4, - 0xbde4, 0xbde4, 0xbde5, 0xbde5, 0xbde5, 0xbde5, 0xbde6, 0xbde6, - 0xbde6, 0xbde7, 0xbde7, 0xbde7, 0xbde8, 0xbde8, 0xbde8, 0xbde9, - 0xbde9, 0xbde9, 0xbdea, 0xbdea, 0xbdea, 0xbdeb, 0xbdeb, 0xbdeb, - 0xbdec, 0xbdec, 0xbdec, 0xbdec, 0xbded, 0xbded, 0xbded, 0xbdee, - 0xbdee, 0xbdee, 0xbdef, 0xbdef, 0xbdef, 0xbdf0, 0xbdf0, 0xbdf0, - 0xbdf1, 0xbdf1, 0xbdf1, 0xbdf2, 0xbdf2, 0xbdf2, 0xbdf2, 0xbdf3, - 0xbdf3, 0xbdf3, 0xbdf4, 0xbdf4, 0xbdf4, 0xbdf5, 0xbdf5, 0xbdf5, - 0xbdf6, 0xbdf6, 0xbdf6, 0xbdf6, 0xbdf7, 0xbdf7, 0xbdf7, 0xbdf8, - 0xbdf8, 0xbdf8, 0xbdf9, 0xbdf9, 0xbdf9, 0xbdfa, 0xbdfa, 0xbdfa, - 0xbdfa, 0xbdfb, 0xbdfb, 0xbdfb, 0xbdfc, 0xbdfc, 0xbdfc, 0xbdfd, - 0xbdfd, 0xbdfd, 0xbdfe, 0xbdfe, 0xbdfe, 0xbdfe, 0xbdff, 0xbdff, - 0xbdff, 0xbe00, 0xbe00, 0xbe00, 0xbe01, 0xbe01, 0xbe01, 0xbe01, - 0xbe02, 0xbe02, 0xbe02, 0xbe03, 0xbe03, 0xbe03, 0xbe04, 0xbe04, - 0xbe04, 0xbe04, 0xbe05, 0xbe05, 0xbe05, 0xbe06, 0xbe06, 0xbe06, - 0xbe07, 0xbe07, 0xbe07, 0xbe07, 0xbe08, 0xbe08, 0xbe08, 0xbe09, - 0xbe09, 0xbe09, 0xbe0a, 0xbe0a, 0xbe0a, 0xbe0a, 0xbe0b, 0xbe0b, - 0xbe0b, 0xbe0c, 0xbe0c, 0xbe0c, 0xbe0c, 0xbe0d, 0xbe0d, 0xbe0d, - 0xbe0e, 0xbe0e, 0xbe0e, 0xbe0f, 0xbe0f, 0xbe0f, 0xbe0f, 0xbe10, - 0xbe10, 0xbe10, 0xbe11, 0xbe11, 0xbe11, 0xbe11, 0xbe12, 0xbe12, - 0xbe12, 0xbe13, 0xbe13, 0xbe13, 0xbe14, 0xbe14, 0xbe14, 0xbe14, - 0xbe15, 0xbe15, 0xbe15, 0xbe16, 0xbe16, 0xbe16, 0xbe16, 0xbe17, - 0xbe17, 0xbe17, 0xbe18, 0xbe18, 0xbe18, 0xbe18, 0xbe19, 0xbe19, - 0xbe19, 0xbe1a, 0xbe1a, 0xbe1a, 0xbe1a, 0xbe1b, 0xbe1b, 0xbe1b, - 0xbe1c, 0xbe1c, 0xbe1c, 0xbe1c, 0xbe1d, 0xbe1d, 0xbe1d, 0xbe1e, - 0xbe1e, 0xbe1e, 0xbe1e, 0xbe1f, 0xbe1f, 0xbe1f, 0xbe20, 0xbe20, - 0xbe20, 0xbe20, 0xbe21, 0xbe21, 0xbe21, 0xbe22, 0xbe22, 0xbe22, - 0xbe22, 0xbe23, 0xbe23, 0xbe23, 0xbe23, 0xbe24, 0xbe24, 0xbe24, - 0xbe25, 0xbe25, 0xbe25, 0xbe25, 0xbe26, 0xbe26, 0xbe26, 0xbe27, - 0xbe27, 0xbe27, 0xbe27, 0xbe28, 0xbe28, 0xbe28, 0xbe29, 0xbe29, - 0xbe29, 0xbe29, 0xbe2a, 0xbe2a, 0xbe2a, 0xbe2a, 0xbe2b, 0xbe2b, - 0xbe2b, 0xbe2c, 0xbe2c, 0xbe2c, 0xbe2c, 0xbe2d, 0xbe2d, 0xbe2d, - 0xbe2d, 0xbe2e, 0xbe2e, 0xbe2e, 0xbe2f, 0xbe2f, 0xbe2f, 0xbe2f, - 0xbe30, 0xbe30, 0xbe30, 0xbe30, 0xbe31, 0xbe31, 0xbe31, 0xbe32, - 0xbe32, 0xbe32, 0xbe32, 0xbe33, 0xbe33, 0xbe33, 0xbe33, 0xbe34, - 0xbe34, 0xbe34, 0xbe35, 0xbe35, 0xbe35, 0xbe35, 0xbe36, 0xbe36, - 0xbe36, 0xbe36, 0xbe37, 0xbe37, 0xbe37, 0xbe38, 0xbe38, 0xbe38, - 0xbe38, 0xbe39, 0xbe39, 0xbe39, 0xbe39, 0xbe3a, 0xbe3a, 0xbe3a, - 0xbe3a, 0xbe3b, 0xbe3b, 0xbe3b, 0xbe3c, 0xbe3c, 0xbe3c, 0xbe3c, - 0xbe3d, 0xbe3d, 0xbe3d, 0xbe3d, 0xbe3e, 0xbe3e, 0xbe3e, 0xbe3e, - 0xbe3f, 0xbe3f, 0xbe3f, 0xbe40, 0xbe40, 0xbe40, 0xbe40, 0xbe41, - 0xbe41, 0xbe41, 0xbe41, 0xbe42, 0xbe42, 0xbe42, 0xbe42, 0xbe43, - 0xbe43, 0xbe43, 0xbe43, 0xbe44, 0xbe44, 0xbe44, 0xbe44, 0xbe45, - 0xbe45, 0xbe45, 0xbe46, 0xbe46, 0xbe46, 0xbe46, 0xbe47, 0xbe47, - 0xbe47, 0xbe47, 0xbe48, 0xbe48, 0xbe48, 0xbe48, 0xbe49, 0xbe49, - 0xbe49, 0xbe49, 0xbe4a, 0xbe4a, 0xbe4a, 0xbe4a, 0xbe4b, 0xbe4b, - 0xbe4b, 0xbe4b, 0xbe4c, 0xbe4c, 0xbe4c, 0xbe4d, 0xbe4d, 0xbe4d, - 0xbe4d, 0xbe4e, 0xbe4e, 0xbe4e, 0xbe4e, 0xbe4f, 0xbe4f, 0xbe4f, - 0xbe4f, 0xbe50, 0xbe50, 0xbe50, 0xbe50, 0xbe51, 0xbe51, 0xbe51, - 0xbe51, 0xbe52, 0xbe52, 0xbe52, 0xbe52, 0xbe53, 0xbe53, 0xbe53, - 0xbe53, 0xbe54, 0xbe54, 0xbe54, 0xbe54, 0xbe55, 0xbe55, 0xbe55, - 0xbe55, 0xbe56, 0xbe56, 0xbe56, 0xbe56, 0xbe57, 0xbe57, 0xbe57, - 0xbe57, 0xbe58, 0xbe58, 0xbe58, 0xbe58, 0xbe59, 0xbe59, 0xbe59, - 0xbe59, 0xbe5a, 0xbe5a, 0xbe5a, 0xbe5a, 0xbe5b, 0xbe5b, 0xbe5b, - 0xbe5b, 0xbe5c, 0xbe5c, 0xbe5c, 0xbe5c, 0xbe5d, 0xbe5d, 0xbe5d, - 0xbe5d, 0xbe5e, 0xbe5e, 0xbe5e, 0xbe5e, 0xbe5f, 0xbe5f, 0xbe5f, - 0xbe5f, 0xbe60, 0xbe60, 0xbe60, 0xbe60, 0xbe61, 0xbe61, 0xbe61, - 0xbe61, 0xbe62, 0xbe62, 0xbe62, 0xbe62, 0xbe63, 0xbe63, 0xbe63, - 0xbe63, 0xbe64, 0xbe64, 0xbe64, 0xbe64, 0xbe65, 0xbe65, 0xbe65, - 0xbe65, 0xbe66, 0xbe66, 0xbe66, 0xbe66, 0xbe66, 0xbe67, 0xbe67, - 0xbe67, 0xbe67, 0xbe68, 0xbe68, 0xbe68, 0xbe68, 0xbe69, 0xbe69, - 0xbe69, 0xbe69, 0xbe6a, 0xbe6a, 0xbe6a, 0xbe6a, 0xbe6b, 0xbe6b, - 0xbe6b, 0xbe6b, 0xbe6c, 0xbe6c, 0xbe6c, 0xbe6c, 0xbe6d, 0xbe6d, - 0xbe6d, 0xbe6d, 0xbe6d, 0xbe6e, 0xbe6e, 0xbe6e, 0xbe6e, 0xbe6f, - 0xbe6f, 0xbe6f, 0xbe6f, 0xbe70, 0xbe70, 0xbe70, 0xbe70, 0xbe71, - 0xbe71, 0xbe71, 0xbe71, 0xbe72, 0xbe72, 0xbe72, 0xbe72, 0xbe72, - 0xbe73, 0xbe73, 0xbe73, 0xbe73, 0xbe74, 0xbe74, 0xbe74, 0xbe74, - 0xbe75, 0xbe75, 0xbe75, 0xbe75, 0xbe76, 0xbe76, 0xbe76, 0xbe76, - 0xbe76, 0xbe77, 0xbe77, 0xbe77, 0xbe77, 0xbe78, 0xbe78, 0xbe78, - 0xbe78, 0xbe79, 0xbe79, 0xbe79, 0xbe79, 0xbe7a, 0xbe7a, 0xbe7a, - 0xbe7a, 0xbe7a, 0xbe7b, 0xbe7b, 0xbe7b, 0xbe7b, 0xbe7c, 0xbe7c, - 0xbe7c, 0xbe7c, 0xbe7d, 0xbe7d, 0xbe7d, 0xbe7d, 0xbe7d, 0xbe7e, - 0xbe7e, 0xbe7e, 0xbe7e, 0xbe7f, 0xbe7f, 0xbe7f, 0xbe7f, 0xbe80, - 0xbe80, 0xbe80, 0xbe80, 0xbe80, 0xbe81, 0xbe81, 0xbe81, 0xbe81, - 0xbe82, 0xbe82, 0xbe82, 0xbe82, 0xbe83, 0xbe83, 0xbe83, 0xbe83, - 0xbe83, 0xbe84, 0xbe84, 0xbe84, 0xbe84, 0xbe85, 0xbe85, 0xbe85, - 0xbe85, 0xbe86, 0xbe86, 0xbe87, 0xbe87, 0xbe88, 0xbe88, 0xbe88, - 0xbe89, 0xbe89, 0xbe8a, 0xbe8a, 0xbe8b, 0xbe8b, 0xbe8c, 0xbe8c, - 0xbe8c, 0xbe8d, 0xbe8d, 0xbe8e, 0xbe8e, 0xbe8f, 0xbe8f, 0xbe90, - 0xbe90, 0xbe90, 0xbe91, 0xbe91, 0xbe92, 0xbe92, 0xbe93, 0xbe93, - 0xbe94, 0xbe94, 0xbe94, 0xbe95, 0xbe95, 0xbe96, 0xbe96, 0xbe97, - 0xbe97, 0xbe98, 0xbe98, 0xbe98, 0xbe99, 0xbe99, 0xbe9a, 0xbe9a, - 0xbe9b, 0xbe9b, 0xbe9b, 0xbe9c, 0xbe9c, 0xbe9d, 0xbe9d, 0xbe9e, - 0xbe9e, 0xbe9e, 0xbe9f, 0xbe9f, 0xbea0, 0xbea0, 0xbea1, 0xbea1, - 0xbea1, 0xbea2, 0xbea2, 0xbea3, 0xbea3, 0xbea4, 0xbea4, 0xbea4, - 0xbea5, 0xbea5, 0xbea6, 0xbea6, 0xbea7, 0xbea7, 0xbea7, 0xbea8, - 0xbea8, 0xbea9, 0xbea9, 0xbeaa, 0xbeaa, 0xbeaa, 0xbeab, 0xbeab, - 0xbeac, 0xbeac, 0xbeac, 0xbead, 0xbead, 0xbeae, 0xbeae, 0xbeaf, - 0xbeaf, 0xbeaf, 0xbeb0, 0xbeb0, 0xbeb1, 0xbeb1, 0xbeb1, 0xbeb2, - 0xbeb2, 0xbeb3, 0xbeb3, 0xbeb4, 0xbeb4, 0xbeb4, 0xbeb5, 0xbeb5, - 0xbeb6, 0xbeb6, 0xbeb6, 0xbeb7, 0xbeb7, 0xbeb8, 0xbeb8, 0xbeb8, - 0xbeb9, 0xbeb9, 0xbeba, 0xbeba, 0xbeba, 0xbebb, 0xbebb, 0xbebc, - 0xbebc, 0xbebc, 0xbebd, 0xbebd, 0xbebe, 0xbebe, 0xbebe, 0xbebf, - 0xbebf, 0xbec0, 0xbec0, 0xbec1, 0xbec1, 0xbec1, 0xbec2, 0xbec2, - 0xbec2, 0xbec3, 0xbec3, 0xbec4, 0xbec4, 0xbec4, 0xbec5, 0xbec5, - 0xbec6, 0xbec6, 0xbec6, 0xbec7, 0xbec7, 0xbec8, 0xbec8, 0xbec8, - 0xbec9, 0xbec9, 0xbeca, 0xbeca, 0xbeca, 0xbecb, 0xbecb, 0xbecc, - 0xbecc, 0xbecc, 0xbecd, 0xbecd, 0xbece, 0xbece, 0xbece, 0xbecf, - 0xbecf, 0xbecf, 0xbed0, 0xbed0, 0xbed1, 0xbed1, 0xbed1, 0xbed2, - 0xbed2, 0xbed3, 0xbed3, 0xbed3, 0xbed4, 0xbed4, 0xbed4, 0xbed5, - 0xbed5, 0xbed6, 0xbed6, 0xbed6, 0xbed7, 0xbed7, 0xbed8, 0xbed8, - 0xbed8, 0xbed9, 0xbed9, 0xbed9, 0xbeda, 0xbeda, 0xbedb, 0xbedb, - 0xbedb, 0xbedc, 0xbedc, 0xbedc, 0xbedd, 0xbedd, 0xbede, 0xbede, - 0xbede, 0xbedf, 0xbedf, 0xbedf, 0xbee0, 0xbee0, 0xbee1, 0xbee1, - 0xbee1, 0xbee2, 0xbee2, 0xbee2, 0xbee3, 0xbee3, 0xbee4, 0xbee4, - 0xbee4, 0xbee5, 0xbee5, 0xbee5, 0xbee6, 0xbee6, 0xbee7, 0xbee7, - 0xbee7, 0xbee8, 0xbee8, 0xbee8, 0xbee9, 0xbee9, 0xbee9, 0xbeea, - 0xbeea, 0xbeeb, 0xbeeb, 0xbeeb, 0xbeec, 0xbeec, 0xbeec, 0xbeed, - 0xbeed, 0xbeed, 0xbeee, 0xbeee, 0xbeef, 0xbeef, 0xbeef, 0xbef0, - 0xbef0, 0xbef0, 0xbef1, 0xbef1, 0xbef1, 0xbef2, 0xbef2, 0xbef3, - 0xbef3, 0xbef3, 0xbef4, 0xbef4, 0xbef4, 0xbef5, 0xbef5, 0xbef5, - 0xbef6, 0xbef6, 0xbef6, 0xbef7, 0xbef7, 0xbef8, 0xbef8, 0xbef8, - 0xbef9, 0xbef9, 0xbef9, 0xbefa, 0xbefa, 0xbefa, 0xbefb, 0xbefb, - 0xbefb, 0xbefc, 0xbefc, 0xbefc, 0xbefd, 0xbefd, 0xbefe, 0xbefe, - 0xbefe, 0xbeff, 0xbeff, 0xbeff, 0xbf00, 0xbf00, 0xbf00, 0xbf01, - 0xbf01, 0xbf01, 0xbf02, 0xbf02, 0xbf02, 0xbf03, 0xbf03, 0xbf03, - 0xbf04, 0xbf04, 0xbf05, 0xbf05, 0xbf05, 0xbf06, 0xbf06, 0xbf06, - 0xbf07, 0xbf07, 0xbf07, 0xbf08, 0xbf08, 0xbf08, 0xbf09, 0xbf09, - 0xbf09, 0xbf0a, 0xbf0a, 0xbf0a, 0xbf0b, 0xbf0b, 0xbf0b, 0xbf0c, - 0xbf0c, 0xbf0c, 0xbf0d, 0xbf0d, 0xbf0d, 0xbf0e, 0xbf0e, 0xbf0e, - 0xbf0f, 0xbf0f, 0xbf0f, 0xbf10, 0xbf10, 0xbf10, 0xbf11, 0xbf11, - 0xbf11, 0xbf12, 0xbf12, 0xbf12, 0xbf13, 0xbf13, 0xbf13, 0xbf14, - 0xbf14, 0xbf14, 0xbf15, 0xbf15, 0xbf15, 0xbf16, 0xbf16, 0xbf16, - 0xbf17, 0xbf17, 0xbf17, 0xbf18, 0xbf18, 0xbf18, 0xbf19, 0xbf19, - 0xbf19, 0xbf1a, 0xbf1a, 0xbf1a, 0xbf1b, 0xbf1b, 0xbf1b, 0xbf1c, - 0xbf1c, 0xbf1c, 0xbf1d, 0xbf1d, 0xbf1d, 0xbf1e, 0xbf1e, 0xbf1e, - 0xbf1f, 0xbf1f, 0xbf1f, 0xbf20, 0xbf20, 0xbf20, 0xbf21, 0xbf21, - 0xbf21, 0xbf22, 0xbf22, 0xbf22, 0xbf23, 0xbf23, 0xbf23, 0xbf24, - 0xbf24, 0xbf24, 0xbf25, 0xbf25, 0xbf25, 0xbf26, 0xbf26, 0xbf26, - 0xbf27, 0xbf27, 0xbf27, 0xbf27, 0xbf28, 0xbf28, 0xbf28, 0xbf29, - 0xbf29, 0xbf29, 0xbf2a, 0xbf2a, 0xbf2a, 0xbf2b, 0xbf2b, 0xbf2b, - 0xbf2c, 0xbf2c, 0xbf2c, 0xbf2d, 0xbf2d, 0xbf2d, 0xbf2e, 0xbf2e, - 0xbf2e, 0xbf2e, 0xbf2f, 0xbf2f, 0xbf2f, 0xbf30, 0xbf30, 0xbf30, - 0xbf31, 0xbf31, 0xbf31, 0xbf32, 0xbf32, 0xbf32, 0xbf33, 0xbf33, - 0xbf33, 0xbf34, 0xbf34, 0xbf34, 0xbf34, 0xbf35, 0xbf35, 0xbf35, - 0xbf36, 0xbf36, 0xbf36, 0xbf37, 0xbf37, 0xbf37, 0xbf38, 0xbf38, - 0xbf38, 0xbf38, 0xbf39, 0xbf39, 0xbf39, 0xbf3a, 0xbf3a, 0xbf3a, - 0xbf3b, 0xbf3b, 0xbf3b, 0xbf3c, 0xbf3c, 0xbf3c, 0xbf3c, 0xbf3d, - 0xbf3d, 0xbf3d, 0xbf3e, 0xbf3e, 0xbf3e, 0xbf3f, 0xbf3f, 0xbf3f, - 0xbf40, 0xbf40, 0xbf40, 0xbf40, 0xbf41, 0xbf41, 0xbf41, 0xbf42, - 0xbf42, 0xbf42, 0xbf43, 0xbf43, 0xbf43, 0xbf43, 0xbf44, 0xbf44, - 0xbf44, 0xbf45, 0xbf45, 0xbf45, 0xbf46, 0xbf46, 0xbf46, 0xbf47, - 0xbf47, 0xbf47, 0xbf47, 0xbf48, 0xbf48, 0xbf48, 0xbf49, 0xbf49, - 0xbf49, 0xbf49, 0xbf4a, 0xbf4a, 0xbf4a, 0xbf4b, 0xbf4b, 0xbf4b, - 0xbf4c, 0xbf4c, 0xbf4c, 0xbf4c, 0xbf4d, 0xbf4d, 0xbf4d, 0xbf4e, - 0xbf4e, 0xbf4e, 0xbf4f, 0xbf4f, 0xbf4f, 0xbf4f, 0xbf50, 0xbf50, - 0xbf50, 0xbf51, 0xbf51, 0xbf51, 0xbf51, 0xbf52, 0xbf52, 0xbf52, - 0xbf53, 0xbf53, 0xbf53, 0xbf54, 0xbf54, 0xbf54, 0xbf54, 0xbf55, - 0xbf55, 0xbf55, 0xbf56, 0xbf56, 0xbf56, 0xbf56, 0xbf57, 0xbf57, - 0xbf57, 0xbf58, 0xbf58, 0xbf58, 0xbf58, 0xbf59, 0xbf59, 0xbf59, - 0xbf5a, 0xbf5a, 0xbf5a, 0xbf5a, 0xbf5b, 0xbf5b, 0xbf5b, 0xbf5c, - 0xbf5c, 0xbf5c, 0xbf5c, 0xbf5d, 0xbf5d, 0xbf5d, 0xbf5e, 0xbf5e, - 0xbf5e, 0xbf5e, 0xbf5f, 0xbf5f, 0xbf5f, 0xbf60, 0xbf60, 0xbf60, - 0xbf60, 0xbf61, 0xbf61, 0xbf61, 0xbf62, 0xbf62, 0xbf62, 0xbf62, - 0xbf63, 0xbf63, 0xbf63, 0xbf64, 0xbf64, 0xbf64, 0xbf64, 0xbf65, - 0xbf65, 0xbf65, 0xbf66, 0xbf66, 0xbf66, 0xbf66, 0xbf67, 0xbf67, - 0xbf67, 0xbf68, 0xbf68, 0xbf68, 0xbf68, 0xbf69, 0xbf69, 0xbf69, - 0xbf69, 0xbf6a, 0xbf6a, 0xbf6a, 0xbf6b, 0xbf6b, 0xbf6b, 0xbf6b, - 0xbf6c, 0xbf6c, 0xbf6c, 0xbf6d, 0xbf6d, 0xbf6d, 0xbf6d, 0xbf6e, - 0xbf6e, 0xbf6e, 0xbf6e, 0xbf6f, 0xbf6f, 0xbf6f, 0xbf70, 0xbf70, - 0xbf70, 0xbf70, 0xbf71, 0xbf71, 0xbf71, 0xbf71, 0xbf72, 0xbf72, - 0xbf72, 0xbf73, 0xbf73, 0xbf73, 0xbf73, 0xbf74, 0xbf74, 0xbf74, - 0xbf74, 0xbf75, 0xbf75, 0xbf75, 0xbf76, 0xbf76, 0xbf76, 0xbf76, - 0xbf77, 0xbf77, 0xbf77, 0xbf77, 0xbf78, 0xbf78, 0xbf78, 0xbf79, - 0xbf79, 0xbf79, 0xbf79, 0xbf7a, 0xbf7a, 0xbf7a, 0xbf7a, 0xbf7b, - 0xbf7b, 0xbf7b, 0xbf7b, 0xbf7c, 0xbf7c, 0xbf7c, 0xbf7d, 0xbf7d, - 0xbf7d, 0xbf7d, 0xbf7e, 0xbf7e, 0xbf7e, 0xbf7e, 0xbf7f, 0xbf7f, - 0xbf7f, 0xbf7f, 0xbf80, 0xbf80, 0xbf80, 0xbf81, 0xbf81, 0xbf81, - 0xbf81, 0xbf82, 0xbf82, 0xbf82, 0xbf82, 0xbf83, 0xbf83, 0xbf83, - 0xbf83, 0xbf84, 0xbf84, 0xbf84, 0xbf85, 0xbf85, 0xbf85, 0xbf85, - 0xbf86, 0xbf86, 0xbf86, 0xbf86, 0xbf87, 0xbf87, 0xbf87, 0xbf87, - 0xbf88, 0xbf88, 0xbf88, 0xbf88, 0xbf89, 0xbf89, 0xbf89, 0xbf89, - 0xbf8a, 0xbf8a, 0xbf8a, 0xbf8b, 0xbf8b, 0xbf8b, 0xbf8b, 0xbf8c, - 0xbf8c, 0xbf8c, 0xbf8c, 0xbf8d, 0xbf8d, 0xbf8d, 0xbf8d, 0xbf8e, - 0xbf8e, 0xbf8e, 0xbf8e, 0xbf8f, 0xbf8f, 0xbf8f, 0xbf8f, 0xbf90, - 0xbf90, 0xbf90, 0xbf90, 0xbf91, 0xbf91, 0xbf91, 0xbf91, 0xbf92, - 0xbf92, 0xbf92, 0xbf92, 0xbf93, 0xbf93, 0xbf93, 0xbf93, 0xbf94, - 0xbf94, 0xbf94, 0xbf95, 0xbf95, 0xbf95, 0xbf95, 0xbf96, 0xbf96, - 0xbf96, 0xbf96, 0xbf97, 0xbf97, 0xbf97, 0xbf97, 0xbf98, 0xbf98, - 0xbf98, 0xbf98, 0xbf99, 0xbf99, 0xbf99, 0xbf99, 0xbf9a, 0xbf9a, - 0xbf9a, 0xbf9a, 0xbf9b, 0xbf9b, 0xbf9b, 0xbf9b, 0xbf9c, 0xbf9c, - 0xbf9c, 0xbf9c, 0xbf9d, 0xbf9d, 0xbf9d, 0xbf9d, 0xbf9e, 0xbf9e, - 0xbf9e, 0xbf9e, 0xbf9f, 0xbf9f, 0xbf9f, 0xbf9f, 0xbfa0, 0xbfa0, - 0xbfa0, 0xbfa0, 0xbfa1, 0xbfa1, 0xbfa1, 0xbfa1, 0xbfa2, 0xbfa2, - 0xbfa2, 0xbfa2, 0xbfa3, 0xbfa3, 0xbfa3, 0xbfa3, 0xbfa3, 0xbfa4, - 0xbfa4, 0xbfa4, 0xbfa4, 0xbfa5, 0xbfa5, 0xbfa5, 0xbfa5, 0xbfa6, - 0xbfa6, 0xbfa6, 0xbfa6, 0xbfa7, 0xbfa7, 0xbfa7, 0xbfa7, 0xbfa8, - 0xbfa8, 0xbfa8, 0xbfa8, 0xbfa9, 0xbfa9, 0xbfa9, 0xbfa9, 0xbfaa, - 0xbfaa, 0xbfaa, 0xbfaa, 0xbfab, 0xbfab, 0xbfab, 0xbfab, 0xbfac, - 0xbfac, 0xbfac, 0xbfac, 0xbfad, 0xbfad, 0xbfad, 0xbfad, 0xbfad, - 0xbfae, 0xbfae, 0xbfae, 0xbfae, 0xbfaf, 0xbfaf, 0xbfaf, 0xbfaf, - 0xbfb0, 0xbfb0, 0xbfb0, 0xbfb0, 0xbfb1, 0xbfb1, 0xbfb1, 0xbfb1, - 0xbfb2, 0xbfb2, 0xbfb2, 0xbfb2, 0xbfb2, 0xbfb3, 0xbfb3, 0xbfb3, - 0xbfb3, 0xbfb4, 0xbfb4, 0xbfb4, 0xbfb4, 0xbfb5, 0xbfb5, 0xbfb5, - 0xbfb5, 0xbfb6, 0xbfb6, 0xbfb6, 0xbfb6, 0xbfb7, 0xbfb7, 0xbfb7, - 0xbfb7, 0xbfb7, 0xbfb8, 0xbfb8, 0xbfb8, 0xbfb8, 0xbfb9, 0xbfb9, - 0xbfb9, 0xbfb9, 0xbfba, 0xbfba, 0xbfba, 0xbfba, 0xbfbb, 0xbfbb, - 0xbfbb, 0xbfbb, 0xbfbb, 0xbfbc, 0xbfbc, 0xbfbc, 0xbfbc, 0xbfbd, - 0xbfbd, 0xbfbd, 0xbfbd, 0xbfbe, 0xbfbe, 0xbfbe, 0xbfbe, 0xbfbe, - 0xbfbf, 0xbfbf, 0xbfbf, 0xbfbf, 0xbfc0, 0xbfc0, 0xbfc0, 0xbfc0, - 0xbfc1, 0xbfc1, 0xbfc1, 0xbfc1, 0xbfc1, 0xbfc2, 0xbfc2, 0xbfc2, - 0xbfc2, 0xbfc3, 0xbfc3, 0xbfc3, 0xbfc3, 0xbfc4, 0xbfc4, 0xbfc4, - 0xbfc4, 0xbfc4, 0xbfc5, 0xbfc5, 0xbfc5, 0xbfc5, 0xbfc6, 0xbfc6, - 0xbfc6, 0xbfc6, 0xbfc7, 0xbfc7, 0xbfc7, 0xbfc7, 0xbfc7, 0xbfc8, - 0xbfc8, 0xbfc8, 0xbfc9, 0xbfc9, 0xbfca, 0xbfca, 0xbfcb, 0xbfcb, - 0xbfcc, 0xbfcc, 0xbfcc, 0xbfcd, 0xbfcd, 0xbfce, 0xbfce, 0xbfcf, - 0xbfcf, 0xbfd0, 0xbfd0, 0xbfd0, 0xbfd1, 0xbfd1, 0xbfd2, 0xbfd2, - 0xbfd3, 0xbfd3, 0xbfd4, 0xbfd4, 0xbfd4, 0xbfd5, 0xbfd5, 0xbfd6, - 0xbfd6, 0xbfd7, 0xbfd7, 0xbfd8, 0xbfd8, 0xbfd8, 0xbfd9, 0xbfd9, - 0xbfda, 0xbfda, 0xbfdb, 0xbfdb, 0xbfdb, 0xbfdc, 0xbfdc, 0xbfdd, - 0xbfdd, 0xbfde, 0xbfde, 0xbfdf, 0xbfdf, 0xbfdf, 0xbfe0, 0xbfe0, - 0xbfe1, 0xbfe1, 0xbfe2, 0xbfe2, 0xbfe2, 0xbfe3, 0xbfe3, 0xbfe4, - 0xbfe4, 0xbfe5, 0xbfe5, 0xbfe5, 0xbfe6, 0xbfe6, 0xbfe7, 0xbfe7, - 0xbfe8, 0xbfe8, 0xbfe8, 0xbfe9, 0xbfe9, 0xbfea, 0xbfea, 0xbfea, - 0xbfeb, 0xbfeb, 0xbfec, 0xbfec, 0xbfed, 0xbfed, 0xbfed, 0xbfee, - 0xbfee, 0xbfef, 0xbfef, 0xbff0, 0xbff0, 0xbff0, 0xbff1, 0xbff1, - 0xbff2, 0xbff2, 0xbff2, 0xbff3, 0xbff3, 0xbff4, 0xbff4, 0xbff4, - 0xbff5, 0xbff5, 0xbff6, 0xbff6, 0xbff7, 0xbff7, 0xbff7, 0xbff8, - 0xbff8, 0xbff9, 0xbff9, 0xbff9, 0xbffa, 0xbffa, 0xbffb, 0xbffb, - 0xbffb, 0xbffc, 0xbffc, 0xbffd, 0xbffd, 0xbffd, 0xbffe, 0xbffe, - 0xbfff, 0xbfff, 0xc000, 0xc000, 0xc000, 0xc000, 0xc001, 0xc001, - 0xc001, 0xc001, 0xc001, 0xc002, 0xc002, 0xc002, 0xc002, 0xc002, - 0xc003, 0xc003, 0xc003, 0xc003, 0xc003, 0xc004, 0xc004, 0xc004, - 0xc004, 0xc004, 0xc005, 0xc005, 0xc005, 0xc005, 0xc005, 0xc006, - 0xc006, 0xc006, 0xc006, 0xc006, 0xc007, 0xc007, 0xc007, 0xc007, - 0xc007, 0xc007, 0xc008, 0xc008, 0xc008, 0xc008, 0xc008, 0xc009, - 0xc009, 0xc009, 0xc009, 0xc009, 0xc00a, 0xc00a, 0xc00a, 0xc00a, - 0xc00a, 0xc00b, 0xc00b, 0xc00b, 0xc00b, 0xc00b, 0xc00c, 0xc00c, - 0xc00c, 0xc00c, 0xc00c, 0xc00d, 0xc00d, 0xc00d, 0xc00d, 0xc00d, - 0xc00d, 0xc00e, 0xc00e, 0xc00e, 0xc00e, 0xc00e, 0xc00f, 0xc00f, - 0xc00f, 0xc00f, 0xc00f, 0xc010, 0xc010, 0xc010, 0xc010, 0xc010, - 0xc010, 0xc011, 0xc011, 0xc011, 0xc011, 0xc011, 0xc012, 0xc012, - 0xc012, 0xc012, 0xc012, 0xc013, 0xc013, 0xc013, 0xc013, 0xc013, - 0xc013, 0xc014, 0xc014, 0xc014, 0xc014, 0xc014, 0xc015, 0xc015, - 0xc015, 0xc015, 0xc015, 0xc015, 0xc016, 0xc016, 0xc016, 0xc016, - 0xc016, 0xc017, 0xc017, 0xc017, 0xc017, 0xc017, 0xc018, 0xc018, - 0xc018, 0xc018, 0xc018, 0xc018, 0xc019, 0xc019, 0xc019, 0xc019, - 0xc019, 0xc01a, 0xc01a, 0xc01a, 0xc01a, 0xc01a, 0xc01a, 0xc01b, - 0xc01b, 0xc01b, 0xc01b, 0xc01b, 0xc01b, 0xc01c, 0xc01c, 0xc01c, - 0xc01c, 0xc01c, 0xc01d, 0xc01d, 0xc01d, 0xc01d, 0xc01d, 0xc01d, - 0xc01e, 0xc01e, 0xc01e, 0xc01e, 0xc01e, 0xc01f, 0xc01f, 0xc01f, - 0xc01f, 0xc01f, 0xc01f, 0xc020, 0xc020, 0xc020, 0xc020, 0xc020, - 0xc020, 0xc021, 0xc021, 0xc021, 0xc021, 0xc021, 0xc021, 0xc022, - 0xc022, 0xc022, 0xc022, 0xc022, 0xc023, 0xc023, 0xc023, 0xc023, - 0xc023, 0xc023, 0xc024, 0xc024, 0xc024, 0xc024, 0xc024, 0xc024, - 0xc025, 0xc025, 0xc025, 0xc025, 0xc025, 0xc025, 0xc026, 0xc026, - 0xc026, 0xc026, 0xc026, 0xc026, 0xc027, 0xc027, 0xc027, 0xc027, - 0xc027, 0xc028, 0xc028, 0xc028, 0xc028, 0xc028, 0xc028, 0xc029, - 0xc029, 0xc029, 0xc029, 0xc029, 0xc029, 0xc02a, 0xc02a, 0xc02a, - 0xc02a, 0xc02a, 0xc02a, 0xc02b, 0xc02b, 0xc02b, 0xc02b, 0xc02b, - 0xc02b, 0xc02c, 0xc02c, 0xc02c, 0xc02c, 0xc02c, 0xc02c, 0xc02d, - 0xc02d, 0xc02d, 0xc02d, 0xc02d, 0xc02d, 0xc02e, 0xc02e, 0xc02e, - 0xc02e, 0xc02e, 0xc02e, 0xc02f, 0xc02f, 0xc02f, 0xc02f, 0xc02f, - 0xc02f, 0xc030, 0xc030, 0xc030, 0xc030, 0xc030, 0xc030, 0xc031, - 0xc031, 0xc031, 0xc031, 0xc031, 0xc031, 0xc032, 0xc032, 0xc032, - 0xc032, 0xc032, 0xc032, 0xc032, 0xc033, 0xc033, 0xc033, 0xc033, - 0xc033, 0xc033, 0xc034, 0xc034, 0xc034, 0xc034, 0xc034, 0xc034, - 0xc035, 0xc035, 0xc035, 0xc035, 0xc035, 0xc035, 0xc036, 0xc036, - 0xc036, 0xc036, 0xc036, 0xc036, 0xc036, 0xc037, 0xc037, 0xc037, - 0xc037, 0xc037, 0xc037, 0xc038, 0xc038, 0xc038, 0xc038, 0xc038, - 0xc038, 0xc039, 0xc039, 0xc039, 0xc039, 0xc039, 0xc039, 0xc03a, - 0xc03a, 0xc03a, 0xc03a, 0xc03a, 0xc03a, 0xc03a, 0xc03b, 0xc03b, - 0xc03b, 0xc03b, 0xc03b, 0xc03b, 0xc03c, 0xc03c, 0xc03c, 0xc03c, - 0xc03c, 0xc03c, 0xc03c, 0xc03d, 0xc03d, 0xc03d, 0xc03d, 0xc03d, - 0xc03d, 0xc03e, 0xc03e, 0xc03e, 0xc03e, 0xc03e, 0xc03e, 0xc03e, - 0xc03f, 0xc03f, 0xc03f, 0xc03f, 0xc03f, 0xc03f, 0xc040, 0xc040, - 0xc040, 0xc040, 0xc040, 0xc040, 0xc040, 0xc041, 0xc041, 0xc041, - 0xc041, 0xc041, 0xc041, 0xc042, 0xc042, 0xc042, 0xc042, 0xc042, - 0xc042, 0xc042, 0xc043, 0xc043, 0xc043, 0xc043, 0xc043, 0xc043, - 0xc044, 0xc044, 0xc044, 0xc044, 0xc044, 0xc044, 0xc044, 0xc045, - 0xc045, 0xc045, 0xc045, 0xc045, 0xc045, 0xc045, 0xc046, 0xc046, - 0xc046, 0xc046, 0xc046, 0xc046, 0xc047, 0xc047, 0xc047, 0xc047, - 0xc047, 0xc047, 0xc047, 0xc048, 0xc048, 0xc048, 0xc048, 0xc048, - 0xc048, 0xc048, 0xc049, 0xc049, 0xc049, 0xc049, 0xc049, 0xc049, - 0xc049, 0xc04a, 0xc04a, 0xc04a, 0xc04a, 0xc04a, 0xc04a, 0xc04a, - 0xc04b, 0xc04b, 0xc04b, 0xc04b, 0xc04b, 0xc04b, 0xc04c, 0xc04c, - 0xc04c, 0xc04c, 0xc04c, 0xc04c, 0xc04c, 0xc04d, 0xc04d, 0xc04d, - 0xc04d, 0xc04d, 0xc04d, 0xc04d, 0xc04e, 0xc04e, 0xc04e, 0xc04e, - 0xc04e, 0xc04e, 0xc04e, 0xc04f, 0xc04f, 0xc04f, 0xc04f, 0xc04f, - 0xc04f, 0xc04f, 0xc050, 0xc050, 0xc050, 0xc050, 0xc050, 0xc050, - 0xc050, 0xc051, 0xc051, 0xc051, 0xc051, 0xc051, 0xc051, 0xc051, - 0xc052, 0xc052, 0xc052, 0xc052, 0xc052, 0xc052, 0xc052, 0xc053, - 0xc053, 0xc053, 0xc053, 0xc053, 0xc053, 0xc053, 0xc054, 0xc054, - 0xc054, 0xc054, 0xc054, 0xc054, 0xc054, 0xc055, 0xc055, 0xc055, - 0xc055, 0xc055, 0xc055, 0xc055, 0xc055, 0xc056, 0xc056, 0xc056, - 0xc056, 0xc056, 0xc056, 0xc056, 0xc057, 0xc057, 0xc057, 0xc057, - 0xc057, 0xc057, 0xc057, 0xc058, 0xc058, 0xc058, 0xc058, 0xc058, - 0xc058, 0xc058, 0xc059, 0xc059, 0xc059, 0xc059, 0xc059, 0xc059, - 0xc059, 0xc05a, 0xc05a, 0xc05a, 0xc05a, 0xc05a, 0xc05a, 0xc05a, - 0xc05a, 0xc05b, 0xc05b, 0xc05b, 0xc05b, 0xc05b, 0xc05b, 0xc05b, - 0xc05c, 0xc05c, 0xc05c, 0xc05c, 0xc05c, 0xc05c, 0xc05c, 0xc05d, - 0xc05d, 0xc05d, 0xc05d, 0xc05d, 0xc05d, 0xc05d, 0xc05d, 0xc05e, - 0xc05e, 0xc05e, 0xc05e, 0xc05e, 0xc05e, 0xc05e, 0xc05f, 0xc05f, - 0xc05f, 0xc05f, 0xc05f, 0xc05f, 0xc05f, 0xc05f, 0xc060, 0xc060, - 0xc060, 0xc060, 0xc060, 0xc060, 0xc060, 0xc061, 0xc061, 0xc061, - 0xc061, 0xc061, 0xc061, 0xc061, 0xc061, 0xc062, 0xc062, 0xc062, - 0xc062, 0xc062, 0xc062, 0xc062, 0xc063, 0xc063, 0xc063, 0xc063, - 0xc063, 0xc063, 0xc063, 0xc063, 0xc064, 0xc064, 0xc064, 0xc064, - 0xc064, 0xc064, 0xc064, 0xc064, 0xc065, 0xc065, 0xc065, 0xc065, - 0xc065, 0xc065, 0xc065, 0xc066, 0xc066, 0xc066, 0xc066, 0xc066, - 0xc066, 0xc066, 0xc066, 0xc067, 0xc067, 0xc067, 0xc067, 0xc067, - 0xc067, 0xc067, 0xc067, 0xc068, 0xc068, 0xc068, 0xc068, 0xc068, - 0xc068, 0xc068, 0xc069, 0xc069, 0xc069, 0xc069, 0xc069, 0xc069, - 0xc069, 0xc069, 0xc06a, 0xc06a, 0xc06a, 0xc06a, 0xc06a, 0xc06a, - 0xc06a, 0xc06a, 0xc06b, 0xc06b, 0xc06b, 0xc06b, 0xc06b, 0xc06b, - 0xc06b, 0xc06b, 0xc06c, 0xc06c, 0xc06c, 0xc06c, 0xc06c, 0xc06c, - 0xc06c, 0xc06c, 0xc06d, 0xc06d, 0xc06d, 0xc06d, 0xc06d, 0xc06d, - 0xc06d, 0xc06d, 0xc06e, 0xc06e, 0xc06e, 0xc06e, 0xc06e, 0xc06e, - 0xc06e, 0xc06e, 0xc06f, 0xc06f, 0xc06f, 0xc06f, 0xc06f, 0xc06f, - 0xc06f, 0xc06f, 0xc070, 0xc070, 0xc070, 0xc070, 0xc070, 0xc070, - 0xc070, 0xc070, 0xc071, 0xc071, 0xc071, 0xc071, 0xc071, 0xc071, - 0xc071, 0xc071, 0xc072, 0xc072, 0xc072, 0xc072, 0xc072, 0xc072, - 0xc072, 0xc072, 0xc073, 0xc073, 0xc073, 0xc073, 0xc073, 0xc073, - 0xc073, 0xc073, 0xc074, 0xc074, 0xc074, 0xc074, 0xc074, 0xc074, - 0xc074, 0xc074, 0xc075, 0xc075, 0xc075, 0xc075, 0xc075, 0xc075, - 0xc075, 0xc075, 0xc076, 0xc076, 0xc076, 0xc076, 0xc076, 0xc076, - 0xc076, 0xc076, 0xc076, 0xc077, 0xc077, 0xc077, 0xc077, 0xc077, - 0xc077, 0xc077, 0xc077, 0xc078, 0xc078, 0xc078, 0xc078, 0xc078, - 0xc078, 0xc078, 0xc078, 0xc079, 0xc079, 0xc079, 0xc079, 0xc079, - 0xc079, 0xc079, 0xc079, 0xc079, 0xc07a, 0xc07a, 0xc07a, 0xc07a, - 0xc07a, 0xc07a, 0xc07a, 0xc07a, 0xc07b, 0xc07b, 0xc07b, 0xc07b, - 0xc07b, 0xc07b, 0xc07b, 0xc07b, 0xc07c, 0xc07c, 0xc07c, 0xc07c, - 0xc07c, 0xc07c, 0xc07c, 0xc07c, 0xc07c, 0xc07d, 0xc07d, 0xc07d, - 0xc07d, 0xc07d, 0xc07d, 0xc07d, 0xc07d, 0xc07e, 0xc07e, 0xc07e, - 0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc07e, 0xc07f, 0xc07f, - 0xc07f, 0xc07f, 0xc07f, 0xc07f, 0xc07f, 0xc07f, 0xc080, 0xc080, - 0xc080, 0xc080, 0xc080, 0xc080, 0xc080, 0xc080, 0xc080, 0xc081, - 0xc081, 0xc081, 0xc081, 0xc081, 0xc081, 0xc081, 0xc081, 0xc081, - 0xc082, 0xc082, 0xc082, 0xc082, 0xc082, 0xc082, 0xc082, 0xc082, - 0xc083, 0xc083, 0xc083, 0xc083, 0xc083, 0xc083, 0xc083, 0xc083, - 0xc083, 0xc084, 0xc084, 0xc084, 0xc084, 0xc084, 0xc084, 0xc084, - 0xc084, 0xc084, 0xc085, 0xc085, 0xc085, 0xc085, 0xc085, 0xc085, - 0xc085, 0xc085, 0xc086, 0xc086, 0xc086, 0xc086, 0xc087, 0xc087, - 0xc087, 0xc087, 0xc088, 0xc088, 0xc088, 0xc088, 0xc088, 0xc089, - 0xc089, 0xc089, 0xc089, 0xc08a, 0xc08a, 0xc08a, 0xc08a, 0xc08a, - 0xc08b, 0xc08b, 0xc08b, 0xc08b, 0xc08c, 0xc08c, 0xc08c, 0xc08c, - 0xc08c, 0xc08d, 0xc08d, 0xc08d, 0xc08d, 0xc08e, 0xc08e, 0xc08e, - 0xc08e, 0xc08e, 0xc08f, 0xc08f, 0xc08f, 0xc08f, 0xc08f, 0xc090, - 0xc090, 0xc090, 0xc090, 0xc091, 0xc091, 0xc091, 0xc091, 0xc091, - 0xc092, 0xc092, 0xc092, 0xc092, 0xc093, 0xc093, 0xc093, 0xc093, - 0xc093, 0xc094, 0xc094, 0xc094, 0xc094, 0xc094, 0xc095, 0xc095, - 0xc095, 0xc095, 0xc095, 0xc096, 0xc096, 0xc096, 0xc096, 0xc097, - 0xc097, 0xc097, 0xc097, 0xc097, 0xc098, 0xc098, 0xc098, 0xc098, - 0xc098, 0xc099, 0xc099, 0xc099, 0xc099, 0xc099, 0xc09a, 0xc09a, - 0xc09a, 0xc09a, 0xc09b, 0xc09b, 0xc09b, 0xc09b, 0xc09b, 0xc09c, - 0xc09c, 0xc09c, 0xc09c, 0xc09c, 0xc09d, 0xc09d, 0xc09d, 0xc09d, - 0xc09d, 0xc09e, 0xc09e, 0xc09e, 0xc09e, 0xc09e, 0xc09f, 0xc09f, - 0xc09f, 0xc09f, 0xc09f, 0xc0a0, 0xc0a0, 0xc0a0, 0xc0a0, 0xc0a0, - 0xc0a1, 0xc0a1, 0xc0a1, 0xc0a1, 0xc0a1, 0xc0a2, 0xc0a2, 0xc0a2, - 0xc0a2, 0xc0a2, 0xc0a3, 0xc0a3, 0xc0a3, 0xc0a3, 0xc0a3, 0xc0a4, - 0xc0a4, 0xc0a4, 0xc0a4, 0xc0a4, 0xc0a5, 0xc0a5, 0xc0a5, 0xc0a5, - 0xc0a5, 0xc0a6, 0xc0a6, 0xc0a6, 0xc0a6, 0xc0a6, 0xc0a7, 0xc0a7, - 0xc0a7, 0xc0a7, 0xc0a7, 0xc0a8, 0xc0a8, 0xc0a8, 0xc0a8, 0xc0a8, - 0xc0a9, 0xc0a9, 0xc0a9, 0xc0a9, 0xc0a9, 0xc0aa, 0xc0aa, 0xc0aa, - 0xc0aa, 0xc0aa, 0xc0ab, 0xc0ab, 0xc0ab, 0xc0ab, 0xc0ab, 0xc0ac, - 0xc0ac, 0xc0ac, 0xc0ac, 0xc0ac, 0xc0ac, 0xc0ad, 0xc0ad, 0xc0ad, - 0xc0ad, 0xc0ad, 0xc0ae, 0xc0ae, 0xc0ae, 0xc0ae, 0xc0ae, 0xc0af, - 0xc0af, 0xc0af, 0xc0af, 0xc0af, 0xc0b0, 0xc0b0, 0xc0b0, 0xc0b0, - 0xc0b0, 0xc0b0, 0xc0b1, 0xc0b1, 0xc0b1, 0xc0b1, 0xc0b1, 0xc0b2, - 0xc0b2, 0xc0b2, 0xc0b2, 0xc0b2, 0xc0b3, 0xc0b3, 0xc0b3, 0xc0b3, - 0xc0b3, 0xc0b3, 0xc0b4, 0xc0b4, 0xc0b4, 0xc0b4, 0xc0b4, 0xc0b5, - 0xc0b5, 0xc0b5, 0xc0b5, 0xc0b5, 0xc0b6, 0xc0b6, 0xc0b6, 0xc0b6, - 0xc0b6, 0xc0b6, 0xc0b7, 0xc0b7, 0xc0b7, 0xc0b7, 0xc0b7, 0xc0b8, - 0xc0b8, 0xc0b8, 0xc0b8, 0xc0b8, 0xc0b8, 0xc0b9, 0xc0b9, 0xc0b9, - 0xc0b9, 0xc0b9, 0xc0ba, 0xc0ba, 0xc0ba, 0xc0ba, 0xc0ba, 0xc0ba, - 0xc0bb, 0xc0bb, 0xc0bb, 0xc0bb, 0xc0bb, 0xc0bc, 0xc0bc, 0xc0bc, - 0xc0bc, 0xc0bc, 0xc0bc, 0xc0bd, 0xc0bd, 0xc0bd, 0xc0bd, 0xc0bd, - 0xc0be, 0xc0be, 0xc0be, 0xc0be, 0xc0be, 0xc0be, 0xc0bf, 0xc0bf, - 0xc0bf, 0xc0bf, 0xc0bf, 0xc0bf, 0xc0c0, 0xc0c0, 0xc0c0, 0xc0c0, - 0xc0c0, 0xc0c1, 0xc0c1, 0xc0c1, 0xc0c1, 0xc0c1, 0xc0c1, 0xc0c2, - 0xc0c2, 0xc0c2, 0xc0c2, 0xc0c2, 0xc0c2, 0xc0c3, 0xc0c3, 0xc0c3, - 0xc0c3, 0xc0c3, 0xc0c4, 0xc0c4, 0xc0c4, 0xc0c4, 0xc0c4, 0xc0c4, - 0xc0c5, 0xc0c5, 0xc0c5, 0xc0c5, 0xc0c5, 0xc0c5, 0xc0c6, 0xc0c6, - 0xc0c6, 0xc0c6, 0xc0c6, 0xc0c6, 0xc0c7, 0xc0c7, 0xc0c7, 0xc0c7, - 0xc0c7, 0xc0c7, 0xc0c8, 0xc0c8, 0xc0c8, 0xc0c8, 0xc0c8, 0xc0c8, - 0xc0c9, 0xc0c9, 0xc0c9, 0xc0c9, 0xc0c9, 0xc0ca, 0xc0ca, 0xc0ca, - 0xc0ca, 0xc0ca, 0xc0ca, 0xc0cb, 0xc0cb, 0xc0cb, 0xc0cb, 0xc0cb, - 0xc0cb, 0xc0cc, 0xc0cc, 0xc0cc, 0xc0cc, 0xc0cc, 0xc0cc, 0xc0cd, - 0xc0cd, 0xc0cd, 0xc0cd, 0xc0cd, 0xc0cd, 0xc0ce, 0xc0ce, 0xc0ce, - 0xc0ce, 0xc0ce, 0xc0ce, 0xc0cf, 0xc0cf, 0xc0cf, 0xc0cf, 0xc0cf, - 0xc0cf, 0xc0d0, 0xc0d0, 0xc0d0, 0xc0d0, 0xc0d0, 0xc0d0, 0xc0d1, - 0xc0d1, 0xc0d1, 0xc0d1, 0xc0d1, 0xc0d1, 0xc0d2, 0xc0d2, 0xc0d2, - 0xc0d2, 0xc0d2, 0xc0d2, 0xc0d2, 0xc0d3, 0xc0d3, 0xc0d3, 0xc0d3, - 0xc0d3, 0xc0d3, 0xc0d4, 0xc0d4, 0xc0d4, 0xc0d4, 0xc0d4, 0xc0d4, - 0xc0d5, 0xc0d5, 0xc0d5, 0xc0d5, 0xc0d5, 0xc0d5, 0xc0d6, 0xc0d6, - 0xc0d6, 0xc0d6, 0xc0d6, 0xc0d6, 0xc0d7, 0xc0d7, 0xc0d7, 0xc0d7, - 0xc0d7, 0xc0d7, 0xc0d7, 0xc0d8, 0xc0d8, 0xc0d8, 0xc0d8, 0xc0d8, - 0xc0d8, 0xc0d9, 0xc0d9, 0xc0d9, 0xc0d9, 0xc0d9, 0xc0d9, 0xc0da, - 0xc0da, 0xc0da, 0xc0da, 0xc0da, 0xc0da, 0xc0db, 0xc0db, 0xc0db, - 0xc0db, 0xc0db, 0xc0db, 0xc0db, 0xc0dc, 0xc0dc, 0xc0dc, 0xc0dc, - 0xc0dc, 0xc0dc, 0xc0dd, 0xc0dd, 0xc0dd, 0xc0dd, 0xc0dd, 0xc0dd, - 0xc0dd, 0xc0de, 0xc0de, 0xc0de, 0xc0de, 0xc0de, 0xc0de, 0xc0df, - 0xc0df, 0xc0df, 0xc0df, 0xc0df, 0xc0df, 0xc0df, 0xc0e0, 0xc0e0, - 0xc0e0, 0xc0e0, 0xc0e0, 0xc0e0, 0xc0e1, 0xc0e1, 0xc0e1, 0xc0e1, - 0xc0e1, 0xc0e1, 0xc0e1, 0xc0e2, 0xc0e2, 0xc0e2, 0xc0e2, 0xc0e2, - 0xc0e2, 0xc0e3, 0xc0e3, 0xc0e3, 0xc0e3, 0xc0e3, 0xc0e3, 0xc0e3, - 0xc0e4, 0xc0e4, 0xc0e4, 0xc0e4, 0xc0e4, 0xc0e4, 0xc0e5, 0xc0e5, - 0xc0e5, 0xc0e5, 0xc0e5, 0xc0e5, 0xc0e5, 0xc0e6, 0xc0e6, 0xc0e6, - 0xc0e6, 0xc0e6, 0xc0e6, 0xc0e6, 0xc0e7, 0xc0e7, 0xc0e7, 0xc0e7, - 0xc0e7, 0xc0e7, 0xc0e8, 0xc0e8, 0xc0e8, 0xc0e8, 0xc0e8, 0xc0e8, - 0xc0e8, 0xc0e9, 0xc0e9, 0xc0e9, 0xc0e9, 0xc0e9, 0xc0e9, 0xc0e9, - 0xc0ea, 0xc0ea, 0xc0ea, 0xc0ea, 0xc0ea, 0xc0ea, 0xc0ea, 0xc0eb, - 0xc0eb, 0xc0eb, 0xc0eb, 0xc0eb, 0xc0eb, 0xc0ec, 0xc0ec, 0xc0ec, - 0xc0ec, 0xc0ec, 0xc0ec, 0xc0ec, 0xc0ed, 0xc0ed, 0xc0ed, 0xc0ed, - 0xc0ed, 0xc0ed, 0xc0ed, 0xc0ee, 0xc0ee, 0xc0ee, 0xc0ee, 0xc0ee, - 0xc0ee, 0xc0ee, 0xc0ef, 0xc0ef, 0xc0ef, 0xc0ef, 0xc0ef, 0xc0ef, - 0xc0ef, 0xc0f0, 0xc0f0, 0xc0f0, 0xc0f0, 0xc0f0, 0xc0f0, 0xc0f0, - 0xc0f1, 0xc0f1, 0xc0f1, 0xc0f1, 0xc0f1, 0xc0f1, 0xc0f1, 0xc0f2, - 0xc0f2, 0xc0f2, 0xc0f2, 0xc0f2, 0xc0f2, 0xc0f2, 0xc0f3, 0xc0f3, - 0xc0f3, 0xc0f3, 0xc0f3, 0xc0f3, 0xc0f3, 0xc0f4, 0xc0f4, 0xc0f4, - 0xc0f4, 0xc0f4, 0xc0f4, 0xc0f4, 0xc0f5, 0xc0f5, 0xc0f5, 0xc0f5, - 0xc0f5, 0xc0f5, 0xc0f5, 0xc0f6, 0xc0f6, 0xc0f6, 0xc0f6, 0xc0f6, - 0xc0f6, 0xc0f6, 0xc0f7, 0xc0f7, 0xc0f7, 0xc0f7, 0xc0f7, 0xc0f7, - 0xc0f7, 0xc0f8, 0xc0f8, 0xc0f8, 0xc0f8, 0xc0f8, 0xc0f8, 0xc0f8, - 0xc0f8, 0xc0f9, 0xc0f9, 0xc0f9, 0xc0f9, 0xc0f9, 0xc0f9, 0xc0f9, - 0xc0fa, 0xc0fa, 0xc0fa, 0xc0fa, 0xc0fa, 0xc0fa, 0xc0fa, 0xc0fb, - 0xc0fb, 0xc0fb, 0xc0fb, 0xc0fb, 0xc0fb, 0xc0fb, 0xc0fc, 0xc0fc, - 0xc0fc, 0xc0fc, 0xc0fc, 0xc0fc, 0xc0fc, 0xc0fc, 0xc0fd, 0xc0fd, - 0xc0fd, 0xc0fd, 0xc0fd, 0xc0fd, 0xc0fd, 0xc0fe, 0xc0fe, 0xc0fe, - 0xc0fe, 0xc0fe, 0xc0fe, 0xc0fe, 0xc0fe, 0xc0ff, 0xc0ff, 0xc0ff, - 0xc0ff, 0xc0ff, 0xc0ff, 0xc0ff, 0xc100, 0xc100, 0xc100, 0xc100, - 0xc100, 0xc100, 0xc100, 0xc101, 0xc101, 0xc101, 0xc101, 0xc101, - 0xc101, 0xc101, 0xc101, 0xc102, 0xc102, 0xc102, 0xc102, 0xc102, - 0xc102, 0xc102, 0xc103, 0xc103, 0xc103, 0xc103, 0xc103, 0xc103, - 0xc103, 0xc103, 0xc104, 0xc104, 0xc104, 0xc104, 0xc104, 0xc104, - 0xc104, 0xc104, 0xc105, 0xc105, 0xc105, 0xc105, 0xc105, 0xc105, - 0xc105, 0xc106, 0xc106, 0xc106, 0xc106, 0xc106, 0xc106, 0xc106, - 0xc106, 0xc107, 0xc107, 0xc107, 0xc107, 0xc107, 0xc107, 0xc107, - 0xc107, 0xc108, 0xc108, 0xc108, 0xc108, 0xc108, 0xc108, 0xc108, - 0xc109, 0xc109, 0xc109, 0xc109, 0xc109, 0xc109, 0xc109, 0xc109, - 0xc10a, 0xc10a, 0xc10a, 0xc10a, 0xc10a, 0xc10a, 0xc10a, 0xc10a, - 0xc10b, 0xc10b, 0xc10b, 0xc10b, 0xc10b, 0xc10b, 0xc10b, 0xc10b, - 0xc10c, 0xc10c, 0xc10c, 0xc10c, 0xc10c, 0xc10c, 0xc10c, 0xc10d, - 0xc10d, 0xc10d, 0xc10d, 0xc10d, 0xc10d, 0xc10d, 0xc10d, 0xc10e, - 0xc10e, 0xc10e, 0xc10e, 0xc10e, 0xc10e, 0xc10e, 0xc10e, 0xc10f, - 0xc10f, 0xc10f, 0xc10f, 0xc10f, 0xc10f, 0xc10f, 0xc10f, 0xc110, - 0xc110, 0xc110, 0xc110, 0xc110, 0xc110, 0xc110, 0xc110, 0xc111, - 0xc111, 0xc111, 0xc111, 0xc111, 0xc111, 0xc111, 0xc111, 0xc112, - 0xc112, 0xc112, 0xc112, 0xc112, 0xc112, 0xc112, 0xc112, 0xc113, - 0xc113, 0xc113, 0xc113, 0xc113, 0xc113, 0xc113, 0xc113, 0xc114, - 0xc114, 0xc114, 0xc114, 0xc114, 0xc114, 0xc114, 0xc114, 0xc115, - 0xc115, 0xc115, 0xc115, 0xc115, 0xc115, 0xc115, 0xc115, 0xc115, - 0xc116, 0xc116, 0xc116, 0xc116, 0xc116, 0xc116, 0xc116, 0xc116, - 0xc117, 0xc117, 0xc117, 0xc117, 0xc117, 0xc117, 0xc117, 0xc117, - 0xc118, 0xc118, 0xc118, 0xc118, 0xc118, 0xc118, 0xc118, 0xc118, - 0xc119, 0xc119, 0xc119, 0xc119, 0xc119, 0xc119, 0xc119, 0xc119, - 0xc119, 0xc11a, 0xc11a, 0xc11a, 0xc11a, 0xc11a, 0xc11a, 0xc11a, - 0xc11a, 0xc11b, 0xc11b, 0xc11b, 0xc11b, 0xc11b, 0xc11b, 0xc11b, - 0xc11b, 0xc11c, 0xc11c, 0xc11c, 0xc11c, 0xc11c, 0xc11c, 0xc11c, - 0xc11c, 0xc11c, 0xc11d, 0xc11d, 0xc11d, 0xc11d, 0xc11d, 0xc11d, - 0xc11d, 0xc11d, 0xc11e, 0xc11e, 0xc11e, 0xc11e, 0xc11e, 0xc11e, - 0xc11e, 0xc11e, 0xc11e, 0xc11f, 0xc11f, 0xc11f, 0xc11f, 0xc11f, - 0xc11f, 0xc11f, 0xc11f, 0xc120, 0xc120, 0xc120, 0xc120, 0xc120, - 0xc120, 0xc120, 0xc120, 0xc120, 0xc121, 0xc121, 0xc121, 0xc121, - 0xc121, 0xc121, 0xc121, 0xc121, 0xc122, 0xc122, 0xc122, 0xc122, - 0xc122, 0xc122, 0xc122, 0xc122, 0xc122, 0xc123, 0xc123, 0xc123, - 0xc123, 0xc123, 0xc123, 0xc123, 0xc123, 0xc123, 0xc124, 0xc124, - 0xc124, 0xc124, 0xc124, 0xc124, 0xc124, 0xc124, 0xc125, 0xc125, - 0xc125, 0xc125, 0xc125, 0xc125, 0xc125, 0xc125, 0xc125, 0xc126, - 0xc126, 0xc126, 0xc126, 0xc126, 0xc126, 0xc126, 0xc126, 0xc126, - 0xc127, 0xc127, 0xc127, 0xc127, 0xc127, 0xc128, 0xc128, 0xc128, - 0xc128, 0xc129, 0xc129, 0xc129, 0xc129, 0xc12a, 0xc12a, 0xc12a, - 0xc12a, 0xc12a, 0xc12b, 0xc12b, 0xc12b, 0xc12b, 0xc12c, 0xc12c, - 0xc12c, 0xc12c, 0xc12c, 0xc12d, 0xc12d, 0xc12d, 0xc12d, 0xc12e, - 0xc12e, 0xc12e, 0xc12e, 0xc12e, 0xc12f, 0xc12f, 0xc12f, 0xc12f, - 0xc12f, 0xc130, 0xc130, 0xc130, 0xc130, 0xc131, 0xc131, 0xc131, - 0xc131, 0xc131, 0xc132, 0xc132, 0xc132, 0xc132, 0xc133, 0xc133, - 0xc133, 0xc133, 0xc133, 0xc134, 0xc134, 0xc134, 0xc134, 0xc134, - 0xc135, 0xc135, 0xc135, 0xc135, 0xc136, 0xc136, 0xc136, 0xc136, - 0xc136, 0xc137, 0xc137, 0xc137, 0xc137, 0xc137, 0xc138, 0xc138, - 0xc138, 0xc138, 0xc138, 0xc139, 0xc139, 0xc139, 0xc139, 0xc13a, - 0xc13a, 0xc13a, 0xc13a, 0xc13a, 0xc13b, 0xc13b, 0xc13b, 0xc13b, - 0xc13b, 0xc13c, 0xc13c, 0xc13c, 0xc13c, 0xc13c, 0xc13d, 0xc13d, - 0xc13d, 0xc13d, 0xc13d, 0xc13e, 0xc13e, 0xc13e, 0xc13e, 0xc13f, - 0xc13f, 0xc13f, 0xc13f, 0xc13f, 0xc140, 0xc140, 0xc140, 0xc140, - 0xc140, 0xc141, 0xc141, 0xc141, 0xc141, 0xc141, 0xc142, 0xc142, - 0xc142, 0xc142, 0xc142, 0xc143, 0xc143, 0xc143, 0xc143, 0xc143, - 0xc144, 0xc144, 0xc144, 0xc144, 0xc144, 0xc145, 0xc145, 0xc145, - 0xc145, 0xc145, 0xc146, 0xc146, 0xc146, 0xc146, 0xc146, 0xc147, - 0xc147, 0xc147, 0xc147, 0xc147, 0xc148, 0xc148, 0xc148, 0xc148, - 0xc148, 0xc149, 0xc149, 0xc149, 0xc149, 0xc149, 0xc14a, 0xc14a, - 0xc14a, 0xc14a, 0xc14a, 0xc14b, 0xc14b, 0xc14b, 0xc14b, 0xc14b, - 0xc14b, 0xc14c, 0xc14c, 0xc14c, 0xc14c, 0xc14c, 0xc14d, 0xc14d, - 0xc14d, 0xc14d, 0xc14d, 0xc14e, 0xc14e, 0xc14e, 0xc14e, 0xc14e, - 0xc14f, 0xc14f, 0xc14f, 0xc14f, 0xc14f, 0xc150, 0xc150, 0xc150, - 0xc150, 0xc150, 0xc150, 0xc151, 0xc151, 0xc151, 0xc151, 0xc151, - 0xc152, 0xc152, 0xc152, 0xc152, 0xc152, 0xc153, 0xc153, 0xc153, - 0xc153, 0xc153, 0xc153, 0xc154, 0xc154, 0xc154, 0xc154, 0xc154, - 0xc155, 0xc155, 0xc155, 0xc155, 0xc155, 0xc156, 0xc156, 0xc156, - 0xc156, 0xc156, 0xc156, 0xc157, 0xc157, 0xc157, 0xc157, 0xc157, - 0xc158, 0xc158, 0xc158, 0xc158, 0xc158, 0xc158, 0xc159, 0xc159, - 0xc159, 0xc159, 0xc159, 0xc15a, 0xc15a, 0xc15a, 0xc15a, 0xc15a, - 0xc15b, 0xc15b, 0xc15b, 0xc15b, 0xc15b, 0xc15b, 0xc15c, 0xc15c, - 0xc15c, 0xc15c, 0xc15c, 0xc15c, 0xc15d, 0xc15d, 0xc15d, 0xc15d, - 0xc15d, 0xc15e, 0xc15e, 0xc15e, 0xc15e, 0xc15e, 0xc15e, 0xc15f, - 0xc15f, 0xc15f, 0xc15f, 0xc15f, 0xc160, 0xc160, 0xc160, 0xc160, - 0xc160, 0xc160, 0xc161, 0xc161, 0xc161, 0xc161, 0xc161, 0xc161, - 0xc162, 0xc162, 0xc162, 0xc162, 0xc162, 0xc163, 0xc163, 0xc163, - 0xc163, 0xc163, 0xc163, 0xc164, 0xc164, 0xc164, 0xc164, 0xc164, - 0xc164, 0xc165, 0xc165, 0xc165, 0xc165, 0xc165, 0xc166, 0xc166, - 0xc166, 0xc166, 0xc166, 0xc166, 0xc167, 0xc167, 0xc167, 0xc167, - 0xc167, 0xc167, 0xc168, 0xc168, 0xc168, 0xc168, 0xc168, 0xc168, - 0xc169, 0xc169, 0xc169, 0xc169, 0xc169, 0xc169, 0xc16a, 0xc16a, - 0xc16a, 0xc16a, 0xc16a, 0xc16a, 0xc16b, 0xc16b, 0xc16b, 0xc16b, - 0xc16b, 0xc16c, 0xc16c, 0xc16c, 0xc16c, 0xc16c, 0xc16c, 0xc16d, - 0xc16d, 0xc16d, 0xc16d, 0xc16d, 0xc16d, 0xc16e, 0xc16e, 0xc16e, - 0xc16e, 0xc16e, 0xc16e, 0xc16f, 0xc16f, 0xc16f, 0xc16f, 0xc16f, - 0xc16f, 0xc170, 0xc170, 0xc170, 0xc170, 0xc170, 0xc170, 0xc171, - 0xc171, 0xc171, 0xc171, 0xc171, 0xc171, 0xc172, 0xc172, 0xc172, - 0xc172, 0xc172, 0xc172, 0xc172, 0xc173, 0xc173, 0xc173, 0xc173, - 0xc173, 0xc173, 0xc174, 0xc174, 0xc174, 0xc174, 0xc174, 0xc174, - 0xc175, 0xc175, 0xc175, 0xc175, 0xc175, 0xc175, 0xc176, 0xc176, - 0xc176, 0xc176, 0xc176, 0xc176, 0xc177, 0xc177, 0xc177, 0xc177, - 0xc177, 0xc177, 0xc178, 0xc178, 0xc178, 0xc178, 0xc178, 0xc178, - 0xc178, 0xc179, 0xc179, 0xc179, 0xc179, 0xc179, 0xc179, 0xc17a, - 0xc17a, 0xc17a, 0xc17a, 0xc17a, 0xc17a, 0xc17b, 0xc17b, 0xc17b, - 0xc17b, 0xc17b, 0xc17b, 0xc17c, 0xc17c, 0xc17c, 0xc17c, 0xc17c, - 0xc17c, 0xc17c, 0xc17d, 0xc17d, 0xc17d, 0xc17d, 0xc17d, 0xc17d, - 0xc17e, 0xc17e, 0xc17e, 0xc17e, 0xc17e, 0xc17e, 0xc17e, 0xc17f, - 0xc17f, 0xc17f, 0xc17f, 0xc17f, 0xc17f, 0xc180, 0xc180, 0xc180, - 0xc180, 0xc180, 0xc180, 0xc180, 0xc181, 0xc181, 0xc181, 0xc181, - 0xc181, 0xc181, 0xc182, 0xc182, 0xc182, 0xc182, 0xc182, 0xc182, - 0xc182, 0xc183, 0xc183, 0xc183, 0xc183, 0xc183, 0xc183, 0xc184, - 0xc184, 0xc184, 0xc184, 0xc184, 0xc184, 0xc184, 0xc185, 0xc185, - 0xc185, 0xc185, 0xc185, 0xc185, 0xc186, 0xc186, 0xc186, 0xc186, - 0xc186, 0xc186, 0xc186, 0xc187, 0xc187, 0xc187, 0xc187, 0xc187, - 0xc187, 0xc187, 0xc188, 0xc188, 0xc188, 0xc188, 0xc188, 0xc188, - 0xc189, 0xc189, 0xc189, 0xc189, 0xc189, 0xc189, 0xc189, 0xc18a, - 0xc18a, 0xc18a, 0xc18a, 0xc18a, 0xc18a, 0xc18a, 0xc18b, 0xc18b, - 0xc18b, 0xc18b, 0xc18b, 0xc18b, 0xc18c, 0xc18c, 0xc18c, 0xc18c, - 0xc18c, 0xc18c, 0xc18c, 0xc18d, 0xc18d, 0xc18d, 0xc18d, 0xc18d, - 0xc18d, 0xc18d, 0xc18e, 0xc18e, 0xc18e, 0xc18e, 0xc18e, 0xc18e, - 0xc18e, 0xc18f, 0xc18f, 0xc18f, 0xc18f, 0xc18f, 0xc18f, 0xc18f, - 0xc190, 0xc190, 0xc190, 0xc190, 0xc190, 0xc190, 0xc190, 0xc191, - 0xc191, 0xc191, 0xc191, 0xc191, 0xc191, 0xc191, 0xc192, 0xc192, - 0xc192, 0xc192, 0xc192, 0xc192, 0xc192, 0xc193, 0xc193, 0xc193, - 0xc193, 0xc193, 0xc193, 0xc193, 0xc194, 0xc194, 0xc194, 0xc194, - 0xc194, 0xc194, 0xc194, 0xc195, 0xc195, 0xc195, 0xc195, 0xc195, - 0xc195, 0xc195, 0xc196, 0xc196, 0xc196, 0xc196, 0xc196, 0xc196, - 0xc196, 0xc197, 0xc197, 0xc197, 0xc197, 0xc197, 0xc197, 0xc197, - 0xc198, 0xc198, 0xc198, 0xc198, 0xc198, 0xc198, 0xc198, 0xc199, - 0xc199, 0xc199, 0xc199, 0xc199, 0xc199, 0xc199, 0xc19a, 0xc19a, - 0xc19a, 0xc19a, 0xc19a, 0xc19a, 0xc19a, 0xc19a, 0xc19b, 0xc19b, - 0xc19b, 0xc19b, 0xc19b, 0xc19b, 0xc19b, 0xc19c, 0xc19c, 0xc19c, - 0xc19c, 0xc19c, 0xc19c, 0xc19c, 0xc19d, 0xc19d, 0xc19d, 0xc19d, - 0xc19d, 0xc19d, 0xc19d, 0xc19d, 0xc19e, 0xc19e, 0xc19e, 0xc19e, - 0xc19e, 0xc19e, 0xc19e, 0xc19f, 0xc19f, 0xc19f, 0xc19f, 0xc19f, - 0xc19f, 0xc19f, 0xc1a0, 0xc1a0, 0xc1a0, 0xc1a0, 0xc1a0, 0xc1a0, - 0xc1a0, 0xc1a0, 0xc1a1, 0xc1a1, 0xc1a1, 0xc1a1, 0xc1a1, 0xc1a1, - 0xc1a1, 0xc1a2, 0xc1a2, 0xc1a2, 0xc1a2, 0xc1a2, 0xc1a2, 0xc1a2, - 0xc1a2, 0xc1a3, 0xc1a3, 0xc1a3, 0xc1a3, 0xc1a3, 0xc1a3, 0xc1a3, - 0xc1a4, 0xc1a4, 0xc1a4, 0xc1a4, 0xc1a4, 0xc1a4, 0xc1a4, 0xc1a4, - 0xc1a5, 0xc1a5, 0xc1a5, 0xc1a5, 0xc1a5, 0xc1a5, 0xc1a5, 0xc1a6, - 0xc1a6, 0xc1a6, 0xc1a6, 0xc1a6, 0xc1a6, 0xc1a6, 0xc1a6, 0xc1a7, - 0xc1a7, 0xc1a7, 0xc1a7, 0xc1a7, 0xc1a7, 0xc1a7, 0xc1a8, 0xc1a8, - 0xc1a8, 0xc1a8, 0xc1a8, 0xc1a8, 0xc1a8, 0xc1a8, 0xc1a9, 0xc1a9, - 0xc1a9, 0xc1a9, 0xc1a9, 0xc1a9, 0xc1a9, 0xc1a9, 0xc1aa, 0xc1aa, - 0xc1aa, 0xc1aa, 0xc1aa, 0xc1aa, 0xc1aa, 0xc1aa, 0xc1ab, 0xc1ab, - 0xc1ab, 0xc1ab, 0xc1ab, 0xc1ab, 0xc1ab, 0xc1ac, 0xc1ac, 0xc1ac, - 0xc1ac, 0xc1ac, 0xc1ac, 0xc1ac, 0xc1ac, 0xc1ad, 0xc1ad, 0xc1ad, - 0xc1ad, 0xc1ad, 0xc1ad, 0xc1ad, 0xc1ad, 0xc1ae, 0xc1ae, 0xc1ae, - 0xc1ae, 0xc1ae, 0xc1ae, 0xc1ae, 0xc1ae, 0xc1af, 0xc1af, 0xc1af, - 0xc1af, 0xc1af, 0xc1af, 0xc1af, 0xc1af, 0xc1b0, 0xc1b0, 0xc1b0, - 0xc1b0, 0xc1b0, 0xc1b0, 0xc1b0, 0xc1b0, 0xc1b1, 0xc1b1, 0xc1b1, - 0xc1b1, 0xc1b1, 0xc1b1, 0xc1b1, 0xc1b1, 0xc1b2, 0xc1b2, 0xc1b2, - 0xc1b2, 0xc1b2, 0xc1b2, 0xc1b2, 0xc1b2, 0xc1b3, 0xc1b3, 0xc1b3, - 0xc1b3, 0xc1b3, 0xc1b3, 0xc1b3, 0xc1b3, 0xc1b4, 0xc1b4, 0xc1b4, - 0xc1b4, 0xc1b4, 0xc1b4, 0xc1b4, 0xc1b4, 0xc1b5, 0xc1b5, 0xc1b5, - 0xc1b5, 0xc1b5, 0xc1b5, 0xc1b5, 0xc1b5, 0xc1b6, 0xc1b6, 0xc1b6, - 0xc1b6, 0xc1b6, 0xc1b6, 0xc1b6, 0xc1b6, 0xc1b7, 0xc1b7, 0xc1b7, - 0xc1b7, 0xc1b7, 0xc1b7, 0xc1b7, 0xc1b7, 0xc1b8, 0xc1b8, 0xc1b8, - 0xc1b8, 0xc1b8, 0xc1b8, 0xc1b8, 0xc1b8, 0xc1b9, 0xc1b9, 0xc1b9, - 0xc1b9, 0xc1b9, 0xc1b9, 0xc1b9, 0xc1b9, 0xc1b9, 0xc1ba, 0xc1ba, - 0xc1ba, 0xc1ba, 0xc1ba, 0xc1ba, 0xc1ba, 0xc1ba, 0xc1bb, 0xc1bb, - 0xc1bb, 0xc1bb, 0xc1bb, 0xc1bb, 0xc1bb, 0xc1bb, 0xc1bc, 0xc1bc, - 0xc1bc, 0xc1bc, 0xc1bc, 0xc1bc, 0xc1bc, 0xc1bc, 0xc1bc, 0xc1bd, - 0xc1bd, 0xc1bd, 0xc1bd, 0xc1bd, 0xc1bd, 0xc1bd, 0xc1bd, 0xc1be, - 0xc1be, 0xc1be, 0xc1be, 0xc1be, 0xc1be, 0xc1be, 0xc1be, 0xc1be, - 0xc1bf, 0xc1bf, 0xc1bf, 0xc1bf, 0xc1bf, 0xc1bf, 0xc1bf, 0xc1bf, - 0xc1c0, 0xc1c0, 0xc1c0, 0xc1c0, 0xc1c0, 0xc1c0, 0xc1c0, 0xc1c0, - 0xc1c0, 0xc1c1, 0xc1c1, 0xc1c1, 0xc1c1, 0xc1c1, 0xc1c1, 0xc1c1, - 0xc1c1, 0xc1c2, 0xc1c2, 0xc1c2, 0xc1c2, 0xc1c2, 0xc1c2, 0xc1c2, - 0xc1c2, 0xc1c2, 0xc1c3, 0xc1c3, 0xc1c3, 0xc1c3, 0xc1c3, 0xc1c3, - 0xc1c3, 0xc1c3, 0xc1c4, 0xc1c4, 0xc1c4, 0xc1c4, 0xc1c4, 0xc1c4, - 0xc1c4, 0xc1c4, 0xc1c4, 0xc1c5, 0xc1c5, 0xc1c5, 0xc1c5, 0xc1c5, - 0xc1c5, 0xc1c5, 0xc1c5, 0xc1c5, 0xc1c6, 0xc1c6, 0xc1c6, 0xc1c6, - 0xc1c6, 0xc1c6, 0xc1c6, 0xc1c6, 0xc1c7, 0xc1c7, 0xc1c7, 0xc1c7, - 0xc1c7, 0xc1c7, 0xc1c7, 0xc1c7, 0xc1c7, 0xc1c8, 0xc1c8, 0xc1c8, - 0xc1c8, 0xc1c8, 0xc1c8, 0xc1c9, 0xc1c9, 0xc1c9, 0xc1c9, 0xc1c9, - 0xc1ca, 0xc1ca, 0xc1ca, 0xc1ca, 0xc1cb, 0xc1cb, 0xc1cb, 0xc1cb, - 0xc1cb, 0xc1cc, 0xc1cc, 0xc1cc, 0xc1cc, 0xc1cd, 0xc1cd, 0xc1cd, - 0xc1cd, 0xc1cd, 0xc1ce, 0xc1ce, 0xc1ce, 0xc1ce, 0xc1cf, 0xc1cf, - 0xc1cf, 0xc1cf, 0xc1cf, 0xc1d0, 0xc1d0, 0xc1d0, 0xc1d0, 0xc1d1, - 0xc1d1, 0xc1d1, 0xc1d1, 0xc1d1, 0xc1d2, 0xc1d2, 0xc1d2, 0xc1d2, - 0xc1d3, 0xc1d3, 0xc1d3, 0xc1d3, 0xc1d3, 0xc1d4, 0xc1d4, 0xc1d4, - 0xc1d4, 0xc1d4, 0xc1d5, 0xc1d5, 0xc1d5, 0xc1d5, 0xc1d6, 0xc1d6, - 0xc1d6, 0xc1d6, 0xc1d6, 0xc1d7, 0xc1d7, 0xc1d7, 0xc1d7, 0xc1d7, - 0xc1d8, 0xc1d8, 0xc1d8, 0xc1d8, 0xc1d9, 0xc1d9, 0xc1d9, 0xc1d9, - 0xc1d9, 0xc1da, 0xc1da, 0xc1da, 0xc1da, 0xc1da, 0xc1db, 0xc1db, - 0xc1db, 0xc1db, 0xc1db, 0xc1dc, 0xc1dc, 0xc1dc, 0xc1dc, 0xc1dd, - 0xc1dd, 0xc1dd, 0xc1dd, 0xc1dd, 0xc1de, 0xc1de, 0xc1de, 0xc1de, - 0xc1de, 0xc1df, 0xc1df, 0xc1df, 0xc1df, 0xc1df, 0xc1e0, 0xc1e0, - 0xc1e0, 0xc1e0, 0xc1e0, 0xc1e1, 0xc1e1, 0xc1e1, 0xc1e1, 0xc1e1, - 0xc1e2, 0xc1e2, 0xc1e2, 0xc1e2, 0xc1e2, 0xc1e3, 0xc1e3, 0xc1e3, - 0xc1e3, 0xc1e3, 0xc1e4, 0xc1e4, 0xc1e4, 0xc1e4, 0xc1e5, 0xc1e5, - 0xc1e5, 0xc1e5, 0xc1e5, 0xc1e6, 0xc1e6, 0xc1e6, 0xc1e6, 0xc1e6, - 0xc1e7, 0xc1e7, 0xc1e7, 0xc1e7, 0xc1e7, 0xc1e8, 0xc1e8, 0xc1e8, - 0xc1e8, 0xc1e8, 0xc1e8, 0xc1e9, 0xc1e9, 0xc1e9, 0xc1e9, 0xc1e9, - 0xc1ea, 0xc1ea, 0xc1ea, 0xc1ea, 0xc1ea, 0xc1eb, 0xc1eb, 0xc1eb, - 0xc1eb, 0xc1eb, 0xc1ec, 0xc1ec, 0xc1ec, 0xc1ec, 0xc1ec, 0xc1ed, - 0xc1ed, 0xc1ed, 0xc1ed, 0xc1ed, 0xc1ee, 0xc1ee, 0xc1ee, 0xc1ee, - 0xc1ee, 0xc1ef, 0xc1ef, 0xc1ef, 0xc1ef, 0xc1ef, 0xc1ef, 0xc1f0, - 0xc1f0, 0xc1f0, 0xc1f0, 0xc1f0, 0xc1f1, 0xc1f1, 0xc1f1, 0xc1f1, - 0xc1f1, 0xc1f2, 0xc1f2, 0xc1f2, 0xc1f2, 0xc1f2, 0xc1f3, 0xc1f3, - 0xc1f3, 0xc1f3, 0xc1f3, 0xc1f3, 0xc1f4, 0xc1f4, 0xc1f4, 0xc1f4, - 0xc1f4, 0xc1f5, 0xc1f5, 0xc1f5, 0xc1f5, 0xc1f5, 0xc1f6, 0xc1f6, - 0xc1f6, 0xc1f6, 0xc1f6, 0xc1f6, 0xc1f7, 0xc1f7, 0xc1f7, 0xc1f7, - 0xc1f7, 0xc1f8, 0xc1f8, 0xc1f8, 0xc1f8, 0xc1f8, 0xc1f9, 0xc1f9, - 0xc1f9, 0xc1f9, 0xc1f9, 0xc1f9, 0xc1fa, 0xc1fa, 0xc1fa, 0xc1fa, - 0xc1fa, 0xc1fb, 0xc1fb, 0xc1fb, 0xc1fb, 0xc1fb, 0xc1fb, 0xc1fc, - 0xc1fc, 0xc1fc, 0xc1fc, 0xc1fc, 0xc1fd, 0xc1fd, 0xc1fd, 0xc1fd, - 0xc1fd, 0xc1fd, 0xc1fe, 0xc1fe, 0xc1fe, 0xc1fe, 0xc1fe, 0xc1ff, - 0xc1ff, 0xc1ff, 0xc1ff, 0xc1ff, 0xc1ff, 0xc200, 0xc200, 0xc200, - 0xc200, 0xc200, 0xc200, 0xc201, 0xc201, 0xc201, 0xc201, 0xc201, - 0xc202, 0xc202, 0xc202, 0xc202, 0xc202, 0xc202, 0xc203, 0xc203, - 0xc203, 0xc203, 0xc203, 0xc204, 0xc204, 0xc204, 0xc204, 0xc204, - 0xc204, 0xc205, 0xc205, 0xc205, 0xc205, 0xc205, 0xc205, 0xc206, - 0xc206, 0xc206, 0xc206, 0xc206, 0xc206, 0xc207, 0xc207, 0xc207, - 0xc207, 0xc207, 0xc208, 0xc208, 0xc208, 0xc208, 0xc208, 0xc208, - 0xc209, 0xc209, 0xc209, 0xc209, 0xc209, 0xc209, 0xc20a, 0xc20a, - 0xc20a, 0xc20a, 0xc20a, 0xc20a, 0xc20b, 0xc20b, 0xc20b, 0xc20b, - 0xc20b, 0xc20b, 0xc20c, 0xc20c, 0xc20c, 0xc20c, 0xc20c, 0xc20c, - 0xc20d, 0xc20d, 0xc20d, 0xc20d, 0xc20d, 0xc20d, 0xc20e, 0xc20e, - 0xc20e, 0xc20e, 0xc20e, 0xc20f, 0xc20f, 0xc20f, 0xc20f, 0xc20f, - 0xc20f, 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0xc211, - 0xc211, 0xc211, 0xc211, 0xc211, 0xc211, 0xc212, 0xc212, 0xc212, - 0xc212, 0xc212, 0xc212, 0xc212, 0xc213, 0xc213, 0xc213, 0xc213, - 0xc213, 0xc213, 0xc214, 0xc214, 0xc214, 0xc214, 0xc214, 0xc214, - 0xc215, 0xc215, 0xc215, 0xc215, 0xc215, 0xc215, 0xc216, 0xc216, - 0xc216, 0xc216, 0xc216, 0xc216, 0xc217, 0xc217, 0xc217, 0xc217, - 0xc217, 0xc217, 0xc218, 0xc218, 0xc218, 0xc218, 0xc218, 0xc218, - 0xc219, 0xc219, 0xc219, 0xc219, 0xc219, 0xc219, 0xc219, 0xc21a, - 0xc21a, 0xc21a, 0xc21a, 0xc21a, 0xc21a, 0xc21b, 0xc21b, 0xc21b, - 0xc21b, 0xc21b, 0xc21b, 0xc21c, 0xc21c, 0xc21c, 0xc21c, 0xc21c, - 0xc21c, 0xc21d, 0xc21d, 0xc21d, 0xc21d, 0xc21d, 0xc21d, 0xc21d, - 0xc21e, 0xc21e, 0xc21e, 0xc21e, 0xc21e, 0xc21e, 0xc21f, 0xc21f, - 0xc21f, 0xc21f, 0xc21f, 0xc21f, 0xc21f, 0xc220, 0xc220, 0xc220, - 0xc220, 0xc220, 0xc220, 0xc221, 0xc221, 0xc221, 0xc221, 0xc221, - 0xc221, 0xc222, 0xc222, 0xc222, 0xc222, 0xc222, 0xc222, 0xc222, - 0xc223, 0xc223, 0xc223, 0xc223, 0xc223, 0xc223, 0xc224, 0xc224, - 0xc224, 0xc224, 0xc224, 0xc224, 0xc224, 0xc225, 0xc225, 0xc225, - 0xc225, 0xc225, 0xc225, 0xc225, 0xc226, 0xc226, 0xc226, 0xc226, - 0xc226, 0xc226, 0xc227, 0xc227, 0xc227, 0xc227, 0xc227, 0xc227, - 0xc227, 0xc228, 0xc228, 0xc228, 0xc228, 0xc228, 0xc228, 0xc229, - 0xc229, 0xc229, 0xc229, 0xc229, 0xc229, 0xc229, 0xc22a, 0xc22a, - 0xc22a, 0xc22a, 0xc22a, 0xc22a, 0xc22a, 0xc22b, 0xc22b, 0xc22b, - 0xc22b, 0xc22b, 0xc22b, 0xc22b, 0xc22c, 0xc22c, 0xc22c, 0xc22c, - 0xc22c, 0xc22c, 0xc22d, 0xc22d, 0xc22d, 0xc22d, 0xc22d, 0xc22d, - 0xc22d, 0xc22e, 0xc22e, 0xc22e, 0xc22e, 0xc22e, 0xc22e, 0xc22e, - 0xc22f, 0xc22f, 0xc22f, 0xc22f, 0xc22f, 0xc22f, 0xc22f, 0xc230, - 0xc230, 0xc230, 0xc230, 0xc230, 0xc230, 0xc230, 0xc231, 0xc231, - 0xc231, 0xc231, 0xc231, 0xc231, 0xc231, 0xc232, 0xc232, 0xc232, - 0xc232, 0xc232, 0xc232, 0xc232, 0xc233, 0xc233, 0xc233, 0xc233, - 0xc233, 0xc233, 0xc234, 0xc234, 0xc234, 0xc234, 0xc234, 0xc234, - 0xc234, 0xc234, 0xc235, 0xc235, 0xc235, 0xc235, 0xc235, 0xc235, - 0xc235, 0xc236, 0xc236, 0xc236, 0xc236, 0xc236, 0xc236, 0xc236, - 0xc237, 0xc237, 0xc237, 0xc237, 0xc237, 0xc237, 0xc237, 0xc238, - 0xc238, 0xc238, 0xc238, 0xc238, 0xc238, 0xc238, 0xc239, 0xc239, - 0xc239, 0xc239, 0xc239, 0xc239, 0xc239, 0xc23a, 0xc23a, 0xc23a, - 0xc23a, 0xc23a, 0xc23a, 0xc23a, 0xc23b, 0xc23b, 0xc23b, 0xc23b, - 0xc23b, 0xc23b, 0xc23b, 0xc23c, 0xc23c, 0xc23c, 0xc23c, 0xc23c, - 0xc23c, 0xc23c, 0xc23c, 0xc23d, 0xc23d, 0xc23d, 0xc23d, 0xc23d, - 0xc23d, 0xc23d, 0xc23e, 0xc23e, 0xc23e, 0xc23e, 0xc23e, 0xc23e, - 0xc23e, 0xc23f, 0xc23f, 0xc23f, 0xc23f, 0xc23f, 0xc23f, 0xc23f, - 0xc23f, 0xc240, 0xc240, 0xc240, 0xc240, 0xc240, 0xc240, 0xc240, - 0xc241, 0xc241, 0xc241, 0xc241, 0xc241, 0xc241, 0xc241, 0xc242, - 0xc242, 0xc242, 0xc242, 0xc242, 0xc242, 0xc242, 0xc242, 0xc243, - 0xc243, 0xc243, 0xc243, 0xc243, 0xc243, 0xc243, 0xc244, 0xc244, - 0xc244, 0xc244, 0xc244, 0xc244, 0xc244, 0xc244, 0xc245, 0xc245, - 0xc245, 0xc245, 0xc245, 0xc245, 0xc245, 0xc246, 0xc246, 0xc246, - 0xc246, 0xc246, 0xc246, 0xc246, 0xc246, 0xc247, 0xc247, 0xc247, - 0xc247, 0xc247, 0xc247, 0xc247, 0xc248, 0xc248, 0xc248, 0xc248, - 0xc248, 0xc248, 0xc248, 0xc248, 0xc249, 0xc249, 0xc249, 0xc249, - 0xc249, 0xc249, 0xc249, 0xc249, 0xc24a, 0xc24a, 0xc24a, 0xc24a, - 0xc24a, 0xc24a, 0xc24a, 0xc24b, 0xc24b, 0xc24b, 0xc24b, 0xc24b, - 0xc24b, 0xc24b, 0xc24b, 0xc24c, 0xc24c, 0xc24c, 0xc24c, 0xc24c, - 0xc24c, 0xc24c, 0xc24c, 0xc24d, 0xc24d, 0xc24d, 0xc24d, 0xc24d, - 0xc24d, 0xc24d, 0xc24d, 0xc24e, 0xc24e, 0xc24e, 0xc24e, 0xc24e, - 0xc24e, 0xc24e, 0xc24e, 0xc24f, 0xc24f, 0xc24f, 0xc24f, 0xc24f, - 0xc24f, 0xc24f, 0xc250, 0xc250, 0xc250, 0xc250, 0xc250, 0xc250, - 0xc250, 0xc250, 0xc251, 0xc251, 0xc251, 0xc251, 0xc251, 0xc251, - 0xc251, 0xc251, 0xc252, 0xc252, 0xc252, 0xc252, 0xc252, 0xc252, - 0xc252, 0xc252, 0xc253, 0xc253, 0xc253, 0xc253, 0xc253, 0xc253, - 0xc253, 0xc253, 0xc254, 0xc254, 0xc254, 0xc254, 0xc254, 0xc254, - 0xc254, 0xc254, 0xc255, 0xc255, 0xc255, 0xc255, 0xc255, 0xc255, - 0xc255, 0xc255, 0xc256, 0xc256, 0xc256, 0xc256, 0xc256, 0xc256, - 0xc256, 0xc256, 0xc257, 0xc257, 0xc257, 0xc257, 0xc257, 0xc257, - 0xc257, 0xc257, 0xc257, 0xc258, 0xc258, 0xc258, 0xc258, 0xc258, - 0xc258, 0xc258, 0xc258, 0xc259, 0xc259, 0xc259, 0xc259, 0xc259, - 0xc259, 0xc259, 0xc259, 0xc25a, 0xc25a, 0xc25a, 0xc25a, 0xc25a, - 0xc25a, 0xc25a, 0xc25a, 0xc25b, 0xc25b, 0xc25b, 0xc25b, 0xc25b, - 0xc25b, 0xc25b, 0xc25b, 0xc25c, 0xc25c, 0xc25c, 0xc25c, 0xc25c, - 0xc25c, 0xc25c, 0xc25c, 0xc25c, 0xc25d, 0xc25d, 0xc25d, 0xc25d, - 0xc25d, 0xc25d, 0xc25d, 0xc25d, 0xc25e, 0xc25e, 0xc25e, 0xc25e, - 0xc25e, 0xc25e, 0xc25e, 0xc25e, 0xc25f, 0xc25f, 0xc25f, 0xc25f, - 0xc25f, 0xc25f, 0xc25f, 0xc25f, 0xc25f, 0xc260, 0xc260, 0xc260, - 0xc260, 0xc260, 0xc260, 0xc260, 0xc260, 0xc261, 0xc261, 0xc261, - 0xc261, 0xc261, 0xc261, 0xc261, 0xc261, 0xc261, 0xc262, 0xc262, - 0xc262, 0xc262, 0xc262, 0xc262, 0xc262, 0xc262, 0xc263, 0xc263, - 0xc263, 0xc263, 0xc263, 0xc263, 0xc263, 0xc263, 0xc263, 0xc264, - 0xc264, 0xc264, 0xc264, 0xc264, 0xc264, 0xc264, 0xc264, 0xc264, - 0xc265, 0xc265, 0xc265, 0xc265, 0xc265, 0xc265, 0xc265, 0xc265, - 0xc266, 0xc266, 0xc266, 0xc266, 0xc266, 0xc266, 0xc266, 0xc266, - 0xc266, 0xc267, 0xc267, 0xc267, 0xc267, 0xc267, 0xc267, 0xc267, - 0xc267, 0xc267, 0xc268, 0xc268, 0xc268, 0xc268, 0xc268, 0xc268, - 0xc268, 0xc268, 0xc269, 0xc269, 0xc269, 0xc269, 0xc269, 0xc269, - 0xc269, 0xc269, 0xc26a, 0xc26a, 0xc26a, 0xc26a, 0xc26b, 0xc26b, - 0xc26b, 0xc26b, 0xc26b, 0xc26c, 0xc26c, 0xc26c, 0xc26c, 0xc26d, - 0xc26d, 0xc26d, 0xc26d, 0xc26d, 0xc26e, 0xc26e, 0xc26e, 0xc26e, - 0xc26f, 0xc26f, 0xc26f, 0xc26f, 0xc26f, 0xc270, 0xc270, 0xc270, - 0xc270, 0xc271, 0xc271, 0xc271, 0xc271, 0xc271, 0xc272, 0xc272, - 0xc272, 0xc272, 0xc273, 0xc273, 0xc273, 0xc273, 0xc273, 0xc274, - 0xc274, 0xc274, 0xc274, 0xc275, 0xc275, 0xc275, 0xc275, 0xc275, - 0xc276, 0xc276, 0xc276, 0xc276, 0xc276, 0xc277, 0xc277, 0xc277, - 0xc277, 0xc278, 0xc278, 0xc278, 0xc278, 0xc278, 0xc279, 0xc279, - 0xc279, 0xc279, 0xc279, 0xc27a, 0xc27a, 0xc27a, 0xc27a, 0xc27a, - 0xc27b, 0xc27b, 0xc27b, 0xc27b, 0xc27c, 0xc27c, 0xc27c, 0xc27c, - 0xc27c, 0xc27d, 0xc27d, 0xc27d, 0xc27d, 0xc27d, 0xc27e, 0xc27e, - 0xc27e, 0xc27e, 0xc27e, 0xc27f, 0xc27f, 0xc27f, 0xc27f, 0xc280, - 0xc280, 0xc280, 0xc280, 0xc280, 0xc281, 0xc281, 0xc281, 0xc281, - 0xc281, 0xc282, 0xc282, 0xc282, 0xc282, 0xc282, 0xc283, 0xc283, - 0xc283, 0xc283, 0xc283, 0xc284, 0xc284, 0xc284, 0xc284, 0xc284, - 0xc285, 0xc285, 0xc285, 0xc285, 0xc285, 0xc286, 0xc286, 0xc286, - 0xc286, 0xc286, 0xc287, 0xc287, 0xc287, 0xc287, 0xc287, 0xc288, - 0xc288, 0xc288, 0xc288, 0xc288, 0xc289, 0xc289, 0xc289, 0xc289, - 0xc289, 0xc28a, 0xc28a, 0xc28a, 0xc28a, 0xc28a, 0xc28b, 0xc28b, - 0xc28b, 0xc28b, 0xc28b, 0xc28c, 0xc28c, 0xc28c, 0xc28c, 0xc28c, - 0xc28d, 0xc28d, 0xc28d, 0xc28d, 0xc28d, 0xc28e, 0xc28e, 0xc28e, - 0xc28e, 0xc28e, 0xc28e, 0xc28f, 0xc28f, 0xc28f, 0xc28f, 0xc28f, - 0xc290, 0xc290, 0xc290, 0xc290, 0xc290, 0xc291, 0xc291, 0xc291, - 0xc291, 0xc291, 0xc292, 0xc292, 0xc292, 0xc292, 0xc292, 0xc293, - 0xc293, 0xc293, 0xc293, 0xc293, 0xc293, 0xc294, 0xc294, 0xc294, - 0xc294, 0xc294, 0xc295, 0xc295, 0xc295, 0xc295, 0xc295, 0xc296, - 0xc296, 0xc296, 0xc296, 0xc296, 0xc296, 0xc297, 0xc297, 0xc297, - 0xc297, 0xc297, 0xc298, 0xc298, 0xc298, 0xc298, 0xc298, 0xc299, - 0xc299, 0xc299, 0xc299, 0xc299, 0xc299, 0xc29a, 0xc29a, 0xc29a, - 0xc29a, 0xc29a, 0xc29b, 0xc29b, 0xc29b, 0xc29b, 0xc29b, 0xc29b, - 0xc29c, 0xc29c, 0xc29c, 0xc29c, 0xc29c, 0xc29d, 0xc29d, 0xc29d, - 0xc29d, 0xc29d, 0xc29d, 0xc29e, 0xc29e, 0xc29e, 0xc29e, 0xc29e, - 0xc29f, 0xc29f, 0xc29f, 0xc29f, 0xc29f, 0xc29f, 0xc2a0, 0xc2a0, - 0xc2a0, 0xc2a0, 0xc2a0, 0xc2a1, 0xc2a1, 0xc2a1, 0xc2a1, 0xc2a1, - 0xc2a1, 0xc2a2, 0xc2a2, 0xc2a2, 0xc2a2, 0xc2a2, 0xc2a3, 0xc2a3, - 0xc2a3, 0xc2a3, 0xc2a3, 0xc2a3, 0xc2a4, 0xc2a4, 0xc2a4, 0xc2a4, - 0xc2a4, 0xc2a4, 0xc2a5, 0xc2a5, 0xc2a5, 0xc2a5, 0xc2a5, 0xc2a6, - 0xc2a6, 0xc2a6, 0xc2a6, 0xc2a6, 0xc2a6, 0xc2a7, 0xc2a7, 0xc2a7, - 0xc2a7, 0xc2a7, 0xc2a7, 0xc2a8, 0xc2a8, 0xc2a8, 0xc2a8, 0xc2a8, - 0xc2a8, 0xc2a9, 0xc2a9, 0xc2a9, 0xc2a9, 0xc2a9, 0xc2aa, 0xc2aa, - 0xc2aa, 0xc2aa, 0xc2aa, 0xc2aa, 0xc2ab, 0xc2ab, 0xc2ab, 0xc2ab, - 0xc2ab, 0xc2ab, 0xc2ac, 0xc2ac, 0xc2ac, 0xc2ac, 0xc2ac, 0xc2ac, - 0xc2ad, 0xc2ad, 0xc2ad, 0xc2ad, 0xc2ad, 0xc2ad, 0xc2ae, 0xc2ae, - 0xc2ae, 0xc2ae, 0xc2ae, 0xc2ae, 0xc2af, 0xc2af, 0xc2af, 0xc2af, - 0xc2af, 0xc2af, 0xc2b0, 0xc2b0, 0xc2b0, 0xc2b0, 0xc2b0, 0xc2b0, - 0xc2b1, 0xc2b1, 0xc2b1, 0xc2b1, 0xc2b1, 0xc2b1, 0xc2b2, 0xc2b2, - 0xc2b2, 0xc2b2, 0xc2b2, 0xc2b2, 0xc2b3, 0xc2b3, 0xc2b3, 0xc2b3, - 0xc2b3, 0xc2b3, 0xc2b4, 0xc2b4, 0xc2b4, 0xc2b4, 0xc2b4, 0xc2b4, - 0xc2b5, 0xc2b5, 0xc2b5, 0xc2b5, 0xc2b5, 0xc2b5, 0xc2b6, 0xc2b6, - 0xc2b6, 0xc2b6, 0xc2b6, 0xc2b6, 0xc2b7, 0xc2b7, 0xc2b7, 0xc2b7, - 0xc2b7, 0xc2b7, 0xc2b8, 0xc2b8, 0xc2b8, 0xc2b8, 0xc2b8, 0xc2b8, - 0xc2b9, 0xc2b9, 0xc2b9, 0xc2b9, 0xc2b9, 0xc2b9, 0xc2ba, 0xc2ba, - 0xc2ba, 0xc2ba, 0xc2ba, 0xc2ba, 0xc2ba, 0xc2bb, 0xc2bb, 0xc2bb, - 0xc2bb, 0xc2bb, 0xc2bb, 0xc2bc, 0xc2bc, 0xc2bc, 0xc2bc, 0xc2bc, - 0xc2bc, 0xc2bd, 0xc2bd, 0xc2bd, 0xc2bd, 0xc2bd, 0xc2bd, 0xc2bd, - 0xc2be, 0xc2be, 0xc2be, 0xc2be, 0xc2be, 0xc2be, 0xc2bf, 0xc2bf, - 0xc2bf, 0xc2bf, 0xc2bf, 0xc2bf, 0xc2c0, 0xc2c0, 0xc2c0, 0xc2c0, - 0xc2c0, 0xc2c0, 0xc2c0, 0xc2c1, 0xc2c1, 0xc2c1, 0xc2c1, 0xc2c1, - 0xc2c1, 0xc2c2, 0xc2c2, 0xc2c2, 0xc2c2, 0xc2c2, 0xc2c2, 0xc2c3, - 0xc2c3, 0xc2c3, 0xc2c3, 0xc2c3, 0xc2c3, 0xc2c3, 0xc2c4, 0xc2c4, - 0xc2c4, 0xc2c4, 0xc2c4, 0xc2c4, 0xc2c5, 0xc2c5, 0xc2c5, 0xc2c5, - 0xc2c5, 0xc2c5, 0xc2c5, 0xc2c6, 0xc2c6, 0xc2c6, 0xc2c6, 0xc2c6, - 0xc2c6, 0xc2c6, 0xc2c7, 0xc2c7, 0xc2c7, 0xc2c7, 0xc2c7, 0xc2c7, - 0xc2c8, 0xc2c8, 0xc2c8, 0xc2c8, 0xc2c8, 0xc2c8, 0xc2c8, 0xc2c9, - 0xc2c9, 0xc2c9, 0xc2c9, 0xc2c9, 0xc2c9, 0xc2ca, 0xc2ca, 0xc2ca, - 0xc2ca, 0xc2ca, 0xc2ca, 0xc2ca, 0xc2cb, 0xc2cb, 0xc2cb, 0xc2cb, - 0xc2cb, 0xc2cb, 0xc2cb, 0xc2cc, 0xc2cc, 0xc2cc, 0xc2cc, 0xc2cc, - 0xc2cc, 0xc2cd, 0xc2cd, 0xc2cd, 0xc2cd, 0xc2cd, 0xc2cd, 0xc2cd, - 0xc2ce, 0xc2ce, 0xc2ce, 0xc2ce, 0xc2ce, 0xc2ce, 0xc2ce, 0xc2cf, - 0xc2cf, 0xc2cf, 0xc2cf, 0xc2cf, 0xc2cf, 0xc2cf, 0xc2d0, 0xc2d0, - 0xc2d0, 0xc2d0, 0xc2d0, 0xc2d0, 0xc2d0, 0xc2d1, 0xc2d1, 0xc2d1, - 0xc2d1, 0xc2d1, 0xc2d1, 0xc2d1, 0xc2d2, 0xc2d2, 0xc2d2, 0xc2d2, - 0xc2d2, 0xc2d2, 0xc2d3, 0xc2d3, 0xc2d3, 0xc2d3, 0xc2d3, 0xc2d3, - 0xc2d3, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, 0xc2d4, - 0xc2d5, 0xc2d5, 0xc2d5, 0xc2d5, 0xc2d5, 0xc2d5, 0xc2d5, 0xc2d6, - 0xc2d6, 0xc2d6, 0xc2d6, 0xc2d6, 0xc2d6, 0xc2d6, 0xc2d7, 0xc2d7, - 0xc2d7, 0xc2d7, 0xc2d7, 0xc2d7, 0xc2d7, 0xc2d8, 0xc2d8, 0xc2d8, - 0xc2d8, 0xc2d8, 0xc2d8, 0xc2d8, 0xc2d9, 0xc2d9, 0xc2d9, 0xc2d9, - 0xc2d9, 0xc2d9, 0xc2d9, 0xc2d9, 0xc2da, 0xc2da, 0xc2da, 0xc2da, - 0xc2da, 0xc2da, 0xc2da, 0xc2db, 0xc2db, 0xc2db, 0xc2db, 0xc2db, - 0xc2db, 0xc2db, 0xc2dc, 0xc2dc, 0xc2dc, 0xc2dc, 0xc2dc, 0xc2dc, - 0xc2dc, 0xc2dd, 0xc2dd, 0xc2dd, 0xc2dd, 0xc2dd, 0xc2dd, 0xc2dd, - 0xc2de, 0xc2de, 0xc2de, 0xc2de, 0xc2de, 0xc2de, 0xc2de, 0xc2de, - 0xc2df, 0xc2df, 0xc2df, 0xc2df, 0xc2df, 0xc2df, 0xc2df, 0xc2e0, - 0xc2e0, 0xc2e0, 0xc2e0, 0xc2e0, 0xc2e0, 0xc2e0, 0xc2e1, 0xc2e1, - 0xc2e1, 0xc2e1, 0xc2e1, 0xc2e1, 0xc2e1, 0xc2e1, 0xc2e2, 0xc2e2, - 0xc2e2, 0xc2e2, 0xc2e2, 0xc2e2, 0xc2e2, 0xc2e3, 0xc2e3, 0xc2e3, - 0xc2e3, 0xc2e3, 0xc2e3, 0xc2e3, 0xc2e4, 0xc2e4, 0xc2e4, 0xc2e4, - 0xc2e4, 0xc2e4, 0xc2e4, 0xc2e4, 0xc2e5, 0xc2e5, 0xc2e5, 0xc2e5, - 0xc2e5, 0xc2e5, 0xc2e5, 0xc2e6, 0xc2e6, 0xc2e6, 0xc2e6, 0xc2e6, - 0xc2e6, 0xc2e6, 0xc2e6, 0xc2e7, 0xc2e7, 0xc2e7, 0xc2e7, 0xc2e7, - 0xc2e7, 0xc2e7, 0xc2e8, 0xc2e8, 0xc2e8, 0xc2e8, 0xc2e8, 0xc2e8, - 0xc2e8, 0xc2e8, 0xc2e9, 0xc2e9, 0xc2e9, 0xc2e9, 0xc2e9, 0xc2e9, - 0xc2e9, 0xc2e9, 0xc2ea, 0xc2ea, 0xc2ea, 0xc2ea, 0xc2ea, 0xc2ea, - 0xc2ea, 0xc2eb, 0xc2eb, 0xc2eb, 0xc2eb, 0xc2eb, 0xc2eb, 0xc2eb, - 0xc2eb, 0xc2ec, 0xc2ec, 0xc2ec, 0xc2ec, 0xc2ec, 0xc2ec, 0xc2ec, - 0xc2ec, 0xc2ed, 0xc2ed, 0xc2ed, 0xc2ed, 0xc2ed, 0xc2ed, 0xc2ed, - 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, 0xc2ee, - 0xc2ef, 0xc2ef, 0xc2ef, 0xc2ef, 0xc2ef, 0xc2ef, 0xc2ef, 0xc2ef, - 0xc2f0, 0xc2f0, 0xc2f0, 0xc2f0, 0xc2f0, 0xc2f0, 0xc2f0, 0xc2f0, - 0xc2f1, 0xc2f1, 0xc2f1, 0xc2f1, 0xc2f1, 0xc2f1, 0xc2f1, 0xc2f1, - 0xc2f2, 0xc2f2, 0xc2f2, 0xc2f2, 0xc2f2, 0xc2f2, 0xc2f2, 0xc2f2, - 0xc2f3, 0xc2f3, 0xc2f3, 0xc2f3, 0xc2f3, 0xc2f3, 0xc2f3, 0xc2f3, - 0xc2f4, 0xc2f4, 0xc2f4, 0xc2f4, 0xc2f4, 0xc2f4, 0xc2f4, 0xc2f4, - 0xc2f5, 0xc2f5, 0xc2f5, 0xc2f5, 0xc2f5, 0xc2f5, 0xc2f5, 0xc2f5, - 0xc2f6, 0xc2f6, 0xc2f6, 0xc2f6, 0xc2f6, 0xc2f6, 0xc2f6, 0xc2f6, - 0xc2f7, 0xc2f7, 0xc2f7, 0xc2f7, 0xc2f7, 0xc2f7, 0xc2f7, 0xc2f7, - 0xc2f8, 0xc2f8, 0xc2f8, 0xc2f8, 0xc2f8, 0xc2f8, 0xc2f8, 0xc2f8, - 0xc2f9, 0xc2f9, 0xc2f9, 0xc2f9, 0xc2f9, 0xc2f9, 0xc2f9, 0xc2f9, - 0xc2fa, 0xc2fa, 0xc2fa, 0xc2fa, 0xc2fa, 0xc2fa, 0xc2fa, 0xc2fa, - 0xc2fb, 0xc2fb, 0xc2fb, 0xc2fb, 0xc2fb, 0xc2fb, 0xc2fb, 0xc2fb, - 0xc2fb, 0xc2fc, 0xc2fc, 0xc2fc, 0xc2fc, 0xc2fc, 0xc2fc, 0xc2fc, - 0xc2fc, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, 0xc2fd, - 0xc2fd, 0xc2fe, 0xc2fe, 0xc2fe, 0xc2fe, 0xc2fe, 0xc2fe, 0xc2fe, - 0xc2fe, 0xc2ff, 0xc2ff, 0xc2ff, 0xc2ff, 0xc2ff, 0xc2ff, 0xc2ff, - 0xc2ff, 0xc2ff, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc301, 0xc301, 0xc301, 0xc301, 0xc301, 0xc301, - 0xc301, 0xc301, 0xc301, 0xc302, 0xc302, 0xc302, 0xc302, 0xc302, - 0xc302, 0xc302, 0xc302, 0xc303, 0xc303, 0xc303, 0xc303, 0xc303, - 0xc303, 0xc303, 0xc303, 0xc303, 0xc304, 0xc304, 0xc304, 0xc304, - 0xc304, 0xc304, 0xc304, 0xc304, 0xc305, 0xc305, 0xc305, 0xc305, - 0xc305, 0xc305, 0xc305, 0xc305, 0xc305, 0xc306, 0xc306, 0xc306, - 0xc306, 0xc306, 0xc306, 0xc306, 0xc306, 0xc307, 0xc307, 0xc307, - 0xc307, 0xc307, 0xc307, 0xc307, 0xc307, 0xc307, 0xc308, 0xc308, - 0xc308, 0xc308, 0xc308, 0xc308, 0xc308, 0xc308, 0xc308, 0xc309, - 0xc309, 0xc309, 0xc309, 0xc309, 0xc309, 0xc309, 0xc309, 0xc309, - 0xc30a, 0xc30a, 0xc30a, 0xc30a, 0xc30a, 0xc30a, 0xc30a, 0xc30a, - 0xc30b, 0xc30b, 0xc30b, 0xc30b, 0xc30b, 0xc30c, 0xc30c, 0xc30c, - 0xc30c, 0xc30d, 0xc30d, 0xc30d, 0xc30d, 0xc30d, 0xc30e, 0xc30e, - 0xc30e, 0xc30e, 0xc30f, 0xc30f, 0xc30f, 0xc30f, 0xc30f, 0xc310, - 0xc310, 0xc310, 0xc310, 0xc311, 0xc311, 0xc311, 0xc311, 0xc311, - 0xc312, 0xc312, 0xc312, 0xc312, 0xc313, 0xc313, 0xc313, 0xc313, - 0xc313, 0xc314, 0xc314, 0xc314, 0xc314, 0xc315, 0xc315, 0xc315, - 0xc315, 0xc315, 0xc316, 0xc316, 0xc316, 0xc316, 0xc316, 0xc317, - 0xc317, 0xc317, 0xc317, 0xc318, 0xc318, 0xc318, 0xc318, 0xc318, - 0xc319, 0xc319, 0xc319, 0xc319, 0xc319, 0xc31a, 0xc31a, 0xc31a, - 0xc31a, 0xc31b, 0xc31b, 0xc31b, 0xc31b, 0xc31b, 0xc31c, 0xc31c, - 0xc31c, 0xc31c, 0xc31c, 0xc31d, 0xc31d, 0xc31d, 0xc31d, 0xc31d, - 0xc31e, 0xc31e, 0xc31e, 0xc31e, 0xc31f, 0xc31f, 0xc31f, 0xc31f, - 0xc31f, 0xc320, 0xc320, 0xc320, 0xc320, 0xc320, 0xc321, 0xc321, - 0xc321, 0xc321, 0xc321, 0xc322, 0xc322, 0xc322, 0xc322, 0xc322, - 0xc323, 0xc323, 0xc323, 0xc323, 0xc323, 0xc324, 0xc324, 0xc324, - 0xc324, 0xc325, 0xc325, 0xc325, 0xc325, 0xc325, 0xc326, 0xc326, - 0xc326, 0xc326, 0xc326, 0xc327, 0xc327, 0xc327, 0xc327, 0xc327, - 0xc328, 0xc328, 0xc328, 0xc328, 0xc328, 0xc329, 0xc329, 0xc329, - 0xc329, 0xc329, 0xc32a, 0xc32a, 0xc32a, 0xc32a, 0xc32a, 0xc32b, - 0xc32b, 0xc32b, 0xc32b, 0xc32b, 0xc32c, 0xc32c, 0xc32c, 0xc32c, - 0xc32c, 0xc32c, 0xc32d, 0xc32d, 0xc32d, 0xc32d, 0xc32d, 0xc32e, - 0xc32e, 0xc32e, 0xc32e, 0xc32e, 0xc32f, 0xc32f, 0xc32f, 0xc32f, - 0xc32f, 0xc330, 0xc330, 0xc330, 0xc330, 0xc330, 0xc331, 0xc331, - 0xc331, 0xc331, 0xc331, 0xc332, 0xc332, 0xc332, 0xc332, 0xc332, - 0xc333, 0xc333, 0xc333, 0xc333, 0xc333, 0xc333, 0xc334, 0xc334, - 0xc334, 0xc334, 0xc334, 0xc335, 0xc335, 0xc335, 0xc335, 0xc335, - 0xc336, 0xc336, 0xc336, 0xc336, 0xc336, 0xc336, 0xc337, 0xc337, - 0xc337, 0xc337, 0xc337, 0xc338, 0xc338, 0xc338, 0xc338, 0xc338, - 0xc339, 0xc339, 0xc339, 0xc339, 0xc339, 0xc339, 0xc33a, 0xc33a, - 0xc33a, 0xc33a, 0xc33a, 0xc33b, 0xc33b, 0xc33b, 0xc33b, 0xc33b, - 0xc33c, 0xc33c, 0xc33c, 0xc33c, 0xc33c, 0xc33c, 0xc33d, 0xc33d, - 0xc33d, 0xc33d, 0xc33d, 0xc33e, 0xc33e, 0xc33e, 0xc33e, 0xc33e, - 0xc33e, 0xc33f, 0xc33f, 0xc33f, 0xc33f, 0xc33f, 0xc340, 0xc340, - 0xc340, 0xc340, 0xc340, 0xc340, 0xc341, 0xc341, 0xc341, 0xc341, - 0xc341, 0xc342, 0xc342, 0xc342, 0xc342, 0xc342, 0xc342, 0xc343, - 0xc343, 0xc343, 0xc343, 0xc343, 0xc343, 0xc344, 0xc344, 0xc344, - 0xc344, 0xc344, 0xc345, 0xc345, 0xc345, 0xc345, 0xc345, 0xc345, - 0xc346, 0xc346, 0xc346, 0xc346, 0xc346, 0xc346, 0xc347, 0xc347, - 0xc347, 0xc347, 0xc347, 0xc348, 0xc348, 0xc348, 0xc348, 0xc348, - 0xc348, 0xc349, 0xc349, 0xc349, 0xc349, 0xc349, 0xc349, 0xc34a, - 0xc34a, 0xc34a, 0xc34a, 0xc34a, 0xc34a, 0xc34b, 0xc34b, 0xc34b, - 0xc34b, 0xc34b, 0xc34c, 0xc34c, 0xc34c, 0xc34c, 0xc34c, 0xc34c, - 0xc34d, 0xc34d, 0xc34d, 0xc34d, 0xc34d, 0xc34d, 0xc34e, 0xc34e, - 0xc34e, 0xc34e, 0xc34e, 0xc34e, 0xc34f, 0xc34f, 0xc34f, 0xc34f, - 0xc34f, 0xc34f, 0xc350, 0xc350, 0xc350, 0xc350, 0xc350, 0xc350, - 0xc351, 0xc351, 0xc351, 0xc351, 0xc351, 0xc351, 0xc352, 0xc352, - 0xc352, 0xc352, 0xc352, 0xc352, 0xc353, 0xc353, 0xc353, 0xc353, - 0xc353, 0xc353, 0xc354, 0xc354, 0xc354, 0xc354, 0xc354, 0xc354, - 0xc355, 0xc355, 0xc355, 0xc355, 0xc355, 0xc355, 0xc356, 0xc356, - 0xc356, 0xc356, 0xc356, 0xc356, 0xc357, 0xc357, 0xc357, 0xc357, - 0xc357, 0xc357, 0xc358, 0xc358, 0xc358, 0xc358, 0xc358, 0xc358, - 0xc359, 0xc359, 0xc359, 0xc359, 0xc359, 0xc359, 0xc35a, 0xc35a, - 0xc35a, 0xc35a, 0xc35a, 0xc35a, 0xc35b, 0xc35b, 0xc35b, 0xc35b, - 0xc35b, 0xc35b, 0xc35b, 0xc35c, 0xc35c, 0xc35c, 0xc35c, 0xc35c, - 0xc35c, 0xc35d, 0xc35d, 0xc35d, 0xc35d, 0xc35d, 0xc35d, 0xc35e, - 0xc35e, 0xc35e, 0xc35e, 0xc35e, 0xc35e, 0xc35e, 0xc35f, 0xc35f, - 0xc35f, 0xc35f, 0xc35f, 0xc35f, 0xc360, 0xc360, 0xc360, 0xc360, - 0xc360, 0xc360, 0xc361, 0xc361, 0xc361, 0xc361, 0xc361, 0xc361, - 0xc361, 0xc362, 0xc362, 0xc362, 0xc362, 0xc362, 0xc362, 0xc363, - 0xc363, 0xc363, 0xc363, 0xc363, 0xc363, 0xc364, 0xc364, 0xc364, - 0xc364, 0xc364, 0xc364, 0xc364, 0xc365, 0xc365, 0xc365, 0xc365, - 0xc365, 0xc365, 0xc366, 0xc366, 0xc366, 0xc366, 0xc366, 0xc366, - 0xc366, 0xc367, 0xc367, 0xc367, 0xc367, 0xc367, 0xc367, 0xc368, - 0xc368, 0xc368, 0xc368, 0xc368, 0xc368, 0xc368, 0xc369, 0xc369, - 0xc369, 0xc369, 0xc369, 0xc369, 0xc369, 0xc36a, 0xc36a, 0xc36a, - 0xc36a, 0xc36a, 0xc36a, 0xc36b, 0xc36b, 0xc36b, 0xc36b, 0xc36b, - 0xc36b, 0xc36b, 0xc36c, 0xc36c, 0xc36c, 0xc36c, 0xc36c, 0xc36c, - 0xc36c, 0xc36d, 0xc36d, 0xc36d, 0xc36d, 0xc36d, 0xc36d, 0xc36e, - 0xc36e, 0xc36e, 0xc36e, 0xc36e, 0xc36e, 0xc36e, 0xc36f, 0xc36f, - 0xc36f, 0xc36f, 0xc36f, 0xc36f, 0xc36f, 0xc370, 0xc370, 0xc370, - 0xc370, 0xc370, 0xc370, 0xc370, 0xc371, 0xc371, 0xc371, 0xc371, - 0xc371, 0xc371, 0xc372, 0xc372, 0xc372, 0xc372, 0xc372, 0xc372, - 0xc372, 0xc373, 0xc373, 0xc373, 0xc373, 0xc373, 0xc373, 0xc373, - 0xc374, 0xc374, 0xc374, 0xc374, 0xc374, 0xc374, 0xc374, 0xc375, - 0xc375, 0xc375, 0xc375, 0xc375, 0xc375, 0xc375, 0xc376, 0xc376, - 0xc376, 0xc376, 0xc376, 0xc376, 0xc376, 0xc377, 0xc377, 0xc377, - 0xc377, 0xc377, 0xc377, 0xc377, 0xc378, 0xc378, 0xc378, 0xc378, - 0xc378, 0xc378, 0xc378, 0xc379, 0xc379, 0xc379, 0xc379, 0xc379, - 0xc379, 0xc379, 0xc37a, 0xc37a, 0xc37a, 0xc37a, 0xc37a, 0xc37a, - 0xc37a, 0xc37b, 0xc37b, 0xc37b, 0xc37b, 0xc37b, 0xc37b, 0xc37b, - 0xc37c, 0xc37c, 0xc37c, 0xc37c, 0xc37c, 0xc37c, 0xc37c, 0xc37c, - 0xc37d, 0xc37d, 0xc37d, 0xc37d, 0xc37d, 0xc37d, 0xc37d, 0xc37e, - 0xc37e, 0xc37e, 0xc37e, 0xc37e, 0xc37e, 0xc37e, 0xc37f, 0xc37f, - 0xc37f, 0xc37f, 0xc37f, 0xc37f, 0xc37f, 0xc380, 0xc380, 0xc380, - 0xc380, 0xc380, 0xc380, 0xc380, 0xc380, 0xc381, 0xc381, 0xc381, - 0xc381, 0xc381, 0xc381, 0xc381, 0xc382, 0xc382, 0xc382, 0xc382, - 0xc382, 0xc382, 0xc382, 0xc383, 0xc383, 0xc383, 0xc383, 0xc383, - 0xc383, 0xc383, 0xc383, 0xc384, 0xc384, 0xc384, 0xc384, 0xc384, - 0xc384, 0xc384, 0xc385, 0xc385, 0xc385, 0xc385, 0xc385, 0xc385, - 0xc385, 0xc385, 0xc386, 0xc386, 0xc386, 0xc386, 0xc386, 0xc386, - 0xc386, 0xc387, 0xc387, 0xc387, 0xc387, 0xc387, 0xc387, 0xc387, - 0xc387, 0xc388, 0xc388, 0xc388, 0xc388, 0xc388, 0xc388, 0xc388, - 0xc389, 0xc389, 0xc389, 0xc389, 0xc389, 0xc389, 0xc389, 0xc389, - 0xc38a, 0xc38a, 0xc38a, 0xc38a, 0xc38a, 0xc38a, 0xc38a, 0xc38b, - 0xc38b, 0xc38b, 0xc38b, 0xc38b, 0xc38b, 0xc38b, 0xc38b, 0xc38c, - 0xc38c, 0xc38c, 0xc38c, 0xc38c, 0xc38c, 0xc38c, 0xc38c, 0xc38d, - 0xc38d, 0xc38d, 0xc38d, 0xc38d, 0xc38d, 0xc38d, 0xc38e, 0xc38e, - 0xc38e, 0xc38e, 0xc38e, 0xc38e, 0xc38e, 0xc38e, 0xc38f, 0xc38f, - 0xc38f, 0xc38f, 0xc38f, 0xc38f, 0xc38f, 0xc38f, 0xc390, 0xc390, - 0xc390, 0xc390, 0xc390, 0xc390, 0xc390, 0xc390, 0xc391, 0xc391, - 0xc391, 0xc391, 0xc391, 0xc391, 0xc391, 0xc392, 0xc392, 0xc392, - 0xc392, 0xc392, 0xc392, 0xc392, 0xc392, 0xc393, 0xc393, 0xc393, - 0xc393, 0xc393, 0xc393, 0xc393, 0xc393, 0xc394, 0xc394, 0xc394, - 0xc394, 0xc394, 0xc394, 0xc394, 0xc394, 0xc395, 0xc395, 0xc395, - 0xc395, 0xc395, 0xc395, 0xc395, 0xc395, 0xc396, 0xc396, 0xc396, - 0xc396, 0xc396, 0xc396, 0xc396, 0xc396, 0xc397, 0xc397, 0xc397, - 0xc397, 0xc397, 0xc397, 0xc397, 0xc397, 0xc398, 0xc398, 0xc398, - 0xc398, 0xc398, 0xc398, 0xc398, 0xc398, 0xc399, 0xc399, 0xc399, - 0xc399, 0xc399, 0xc399, 0xc399, 0xc399, 0xc39a, 0xc39a, 0xc39a, - 0xc39a, 0xc39a, 0xc39a, 0xc39a, 0xc39a, 0xc39a, 0xc39b, 0xc39b, - 0xc39b, 0xc39b, 0xc39b, 0xc39b, 0xc39b, 0xc39b, 0xc39c, 0xc39c, - 0xc39c, 0xc39c, 0xc39c, 0xc39c, 0xc39c, 0xc39c, 0xc39d, 0xc39d, - 0xc39d, 0xc39d, 0xc39d, 0xc39d, 0xc39d, 0xc39d, 0xc39e, 0xc39e, - 0xc39e, 0xc39e, 0xc39e, 0xc39e, 0xc39e, 0xc39e, 0xc39e, 0xc39f, - 0xc39f, 0xc39f, 0xc39f, 0xc39f, 0xc39f, 0xc39f, 0xc39f, 0xc3a0, - 0xc3a0, 0xc3a0, 0xc3a0, 0xc3a0, 0xc3a0, 0xc3a0, 0xc3a0, 0xc3a1, - 0xc3a1, 0xc3a1, 0xc3a1, 0xc3a1, 0xc3a1, 0xc3a1, 0xc3a1, 0xc3a1, - 0xc3a2, 0xc3a2, 0xc3a2, 0xc3a2, 0xc3a2, 0xc3a2, 0xc3a2, 0xc3a2, - 0xc3a3, 0xc3a3, 0xc3a3, 0xc3a3, 0xc3a3, 0xc3a3, 0xc3a3, 0xc3a3, - 0xc3a3, 0xc3a4, 0xc3a4, 0xc3a4, 0xc3a4, 0xc3a4, 0xc3a4, 0xc3a4, - 0xc3a4, 0xc3a5, 0xc3a5, 0xc3a5, 0xc3a5, 0xc3a5, 0xc3a5, 0xc3a5, - 0xc3a5, 0xc3a5, 0xc3a6, 0xc3a6, 0xc3a6, 0xc3a6, 0xc3a6, 0xc3a6, - 0xc3a6, 0xc3a6, 0xc3a7, 0xc3a7, 0xc3a7, 0xc3a7, 0xc3a7, 0xc3a7, - 0xc3a7, 0xc3a7, 0xc3a7, 0xc3a8, 0xc3a8, 0xc3a8, 0xc3a8, 0xc3a8, - 0xc3a8, 0xc3a8, 0xc3a8, 0xc3a9, 0xc3a9, 0xc3a9, 0xc3a9, 0xc3a9, - 0xc3a9, 0xc3a9, 0xc3a9, 0xc3a9, 0xc3aa, 0xc3aa, 0xc3aa, 0xc3aa, - 0xc3aa, 0xc3aa, 0xc3aa, 0xc3aa, 0xc3aa, 0xc3ab, 0xc3ab, 0xc3ab, - 0xc3ab, 0xc3ab, 0xc3ab, 0xc3ab, 0xc3ab, 0xc3ab, 0xc3ac, 0xc3ac, - 0xc3ac, 0xc3ac, 0xc3ac, 0xc3ad, 0xc3ad, 0xc3ad, 0xc3ad, 0xc3ad, - 0xc3ae, 0xc3ae, 0xc3ae, 0xc3ae, 0xc3af, 0xc3af, 0xc3af, 0xc3af, - 0xc3af, 0xc3b0, 0xc3b0, 0xc3b0, 0xc3b0, 0xc3b1, 0xc3b1, 0xc3b1, - 0xc3b1, 0xc3b1, 0xc3b2, 0xc3b2, 0xc3b2, 0xc3b2, 0xc3b3, 0xc3b3, - 0xc3b3, 0xc3b3, 0xc3b3, 0xc3b4, 0xc3b4, 0xc3b4, 0xc3b4, 0xc3b5, - 0xc3b5, 0xc3b5, 0xc3b5, 0xc3b5, 0xc3b6, 0xc3b6, 0xc3b6, 0xc3b6, - 0xc3b6, 0xc3b7, 0xc3b7, 0xc3b7, 0xc3b7, 0xc3b8, 0xc3b8, 0xc3b8, - 0xc3b8, 0xc3b8, 0xc3b9, 0xc3b9, 0xc3b9, 0xc3b9, 0xc3ba, 0xc3ba, - 0xc3ba, 0xc3ba, 0xc3ba, 0xc3bb, 0xc3bb, 0xc3bb, 0xc3bb, 0xc3bb, - 0xc3bc, 0xc3bc, 0xc3bc, 0xc3bc, 0xc3bc, 0xc3bd, 0xc3bd, 0xc3bd, - 0xc3bd, 0xc3be, 0xc3be, 0xc3be, 0xc3be, 0xc3be, 0xc3bf, 0xc3bf, - 0xc3bf, 0xc3bf, 0xc3bf, 0xc3c0, 0xc3c0, 0xc3c0, 0xc3c0, 0xc3c0, - 0xc3c1, 0xc3c1, 0xc3c1, 0xc3c1, 0xc3c2, 0xc3c2, 0xc3c2, 0xc3c2, - 0xc3c2, 0xc3c3, 0xc3c3, 0xc3c3, 0xc3c3, 0xc3c3, 0xc3c4, 0xc3c4, - 0xc3c4, 0xc3c4, 0xc3c4, 0xc3c5, 0xc3c5, 0xc3c5, 0xc3c5, 0xc3c5, - 0xc3c6, 0xc3c6, 0xc3c6, 0xc3c6, 0xc3c6, 0xc3c7, 0xc3c7, 0xc3c7, - 0xc3c7, 0xc3c7, 0xc3c8, 0xc3c8, 0xc3c8, 0xc3c8, 0xc3c8, 0xc3c9, - 0xc3c9, 0xc3c9, 0xc3c9, 0xc3c9, 0xc3ca, 0xc3ca, 0xc3ca, 0xc3ca, - 0xc3ca, 0xc3cb, 0xc3cb, 0xc3cb, 0xc3cb, 0xc3cb, 0xc3cc, 0xc3cc, - 0xc3cc, 0xc3cc, 0xc3cc, 0xc3cd, 0xc3cd, 0xc3cd, 0xc3cd, 0xc3cd, - 0xc3ce, 0xc3ce, 0xc3ce, 0xc3ce, 0xc3ce, 0xc3cf, 0xc3cf, 0xc3cf, - 0xc3cf, 0xc3cf, 0xc3d0, 0xc3d0, 0xc3d0, 0xc3d0, 0xc3d0, 0xc3d1, - 0xc3d1, 0xc3d1, 0xc3d1, 0xc3d1, 0xc3d2, 0xc3d2, 0xc3d2, 0xc3d2, - 0xc3d2, 0xc3d2, 0xc3d3, 0xc3d3, 0xc3d3, 0xc3d3, 0xc3d3, 0xc3d4, - 0xc3d4, 0xc3d4, 0xc3d4, 0xc3d4, 0xc3d5, 0xc3d5, 0xc3d5, 0xc3d5, - 0xc3d5, 0xc3d6, 0xc3d6, 0xc3d6, 0xc3d6, 0xc3d6, 0xc3d6, 0xc3d7, - 0xc3d7, 0xc3d7, 0xc3d7, 0xc3d7, 0xc3d8, 0xc3d8, 0xc3d8, 0xc3d8, - 0xc3d8, 0xc3d9, 0xc3d9, 0xc3d9, 0xc3d9, 0xc3d9, 0xc3d9, 0xc3da, - 0xc3da, 0xc3da, 0xc3da, 0xc3da, 0xc3db, 0xc3db, 0xc3db, 0xc3db, - 0xc3db, 0xc3dc, 0xc3dc, 0xc3dc, 0xc3dc, 0xc3dc, 0xc3dc, 0xc3dd, - 0xc3dd, 0xc3dd, 0xc3dd, 0xc3dd, 0xc3de, 0xc3de, 0xc3de, 0xc3de, - 0xc3de, 0xc3de, 0xc3df, 0xc3df, 0xc3df, 0xc3df, 0xc3df, 0xc3e0, - 0xc3e0, 0xc3e0, 0xc3e0, 0xc3e0, 0xc3e0, 0xc3e1, 0xc3e1, 0xc3e1, - 0xc3e1, 0xc3e1, 0xc3e2, 0xc3e2, 0xc3e2, 0xc3e2, 0xc3e2, 0xc3e2, - 0xc3e3, 0xc3e3, 0xc3e3, 0xc3e3, 0xc3e3, 0xc3e4, 0xc3e4, 0xc3e4, - 0xc3e4, 0xc3e4, 0xc3e4, 0xc3e5, 0xc3e5, 0xc3e5, 0xc3e5, 0xc3e5, - 0xc3e6, 0xc3e6, 0xc3e6, 0xc3e6, 0xc3e6, 0xc3e6, 0xc3e7, 0xc3e7, - 0xc3e7, 0xc3e7, 0xc3e7, 0xc3e7, 0xc3e8, 0xc3e8, 0xc3e8, 0xc3e8, - 0xc3e8, 0xc3e9, 0xc3e9, 0xc3e9, 0xc3e9, 0xc3e9, 0xc3e9, 0xc3ea, - 0xc3ea, 0xc3ea, 0xc3ea, 0xc3ea, 0xc3ea, 0xc3eb, 0xc3eb, 0xc3eb, - 0xc3eb, 0xc3eb, 0xc3eb, 0xc3ec, 0xc3ec, 0xc3ec, 0xc3ec, 0xc3ec, - 0xc3ec, 0xc3ed, 0xc3ed, 0xc3ed, 0xc3ed, 0xc3ed, 0xc3ee, 0xc3ee, - 0xc3ee, 0xc3ee, 0xc3ee, 0xc3ee, 0xc3ef, 0xc3ef, 0xc3ef, 0xc3ef, - 0xc3ef, 0xc3ef, 0xc3f0, 0xc3f0, 0xc3f0, 0xc3f0, 0xc3f0, 0xc3f0, - 0xc3f1, 0xc3f1, 0xc3f1, 0xc3f1, 0xc3f1, 0xc3f1, 0xc3f2, 0xc3f2, - 0xc3f2, 0xc3f2, 0xc3f2, 0xc3f2, 0xc3f3, 0xc3f3, 0xc3f3, 0xc3f3, - 0xc3f3, 0xc3f3, 0xc3f4, 0xc3f4, 0xc3f4, 0xc3f4, 0xc3f4, 0xc3f4, - 0xc3f5, 0xc3f5, 0xc3f5, 0xc3f5, 0xc3f5, 0xc3f5, 0xc3f6, 0xc3f6, - 0xc3f6, 0xc3f6, 0xc3f6, 0xc3f6, 0xc3f7, 0xc3f7, 0xc3f7, 0xc3f7, - 0xc3f7, 0xc3f7, 0xc3f8, 0xc3f8, 0xc3f8, 0xc3f8, 0xc3f8, 0xc3f8, - 0xc3f9, 0xc3f9, 0xc3f9, 0xc3f9, 0xc3f9, 0xc3f9, 0xc3fa, 0xc3fa, - 0xc3fa, 0xc3fa, 0xc3fa, 0xc3fa, 0xc3fb, 0xc3fb, 0xc3fb, 0xc3fb, - 0xc3fb, 0xc3fb, 0xc3fb, 0xc3fc, 0xc3fc, 0xc3fc, 0xc3fc, 0xc3fc, - 0xc3fc, 0xc3fd, 0xc3fd, 0xc3fd, 0xc3fd, 0xc3fd, 0xc3fd, 0xc3fe, - 0xc3fe, 0xc3fe, 0xc3fe, 0xc3fe, 0xc3fe, 0xc3ff, 0xc3ff, 0xc3ff, - 0xc3ff, 0xc3ff, 0xc3ff, 0xc3ff, 0xc400, 0xc400, 0xc400, 0xc400, - 0xc400, 0xc400, 0xc400, 0xc400, 0xc400, 0xc401, 0xc401, 0xc401, - 0xc401, 0xc401, 0xc401, 0xc401, 0xc401, 0xc401, 0xc401, 0xc401, - 0xc401, 0xc401, 0xc402, 0xc402, 0xc402, 0xc402, 0xc402, 0xc402, - 0xc402, 0xc402, 0xc402, 0xc402, 0xc402, 0xc402, 0xc402, 0xc403, - 0xc403, 0xc403, 0xc403, 0xc403, 0xc403, 0xc403, 0xc403, 0xc403, - 0xc403, 0xc403, 0xc403, 0xc403, 0xc404, 0xc404, 0xc404, 0xc404, - 0xc404, 0xc404, 0xc404, 0xc404, 0xc404, 0xc404, 0xc404, 0xc404, - 0xc404, 0xc405, 0xc405, 0xc405, 0xc405, 0xc405, 0xc405, 0xc405, - 0xc405, 0xc405, 0xc405, 0xc405, 0xc405, 0xc405, 0xc406, 0xc406, - 0xc406, 0xc406, 0xc406, 0xc406, 0xc406, 0xc406, 0xc406, 0xc406, - 0xc406, 0xc406, 0xc406, 0xc407, 0xc407, 0xc407, 0xc407, 0xc407, - 0xc407, 0xc407, 0xc407, 0xc407, 0xc407, 0xc407, 0xc407, 0xc407, - 0xc407, 0xc408, 0xc408, 0xc408, 0xc408, 0xc408, 0xc408, 0xc408, - 0xc408, 0xc408, 0xc408, 0xc408, 0xc408, 0xc408, 0xc409, 0xc409, - 0xc409, 0xc409, 0xc409, 0xc409, 0xc409, 0xc409, 0xc409, 0xc409, - 0xc409, 0xc409, 0xc409, 0xc409, 0xc40a, 0xc40a, 0xc40a, 0xc40a, - 0xc40a, 0xc40a, 0xc40a, 0xc40a, 0xc40a, 0xc40a, 0xc40a, 0xc40a, - 0xc40a, 0xc40a, 0xc40b, 0xc40b, 0xc40b, 0xc40b, 0xc40b, 0xc40b, - 0xc40b, 0xc40b, 0xc40b, 0xc40b, 0xc40b, 0xc40b, 0xc40b, 0xc40c, - 0xc40c, 0xc40c, 0xc40c, 0xc40c, 0xc40c, 0xc40c, 0xc40c, 0xc40c, - 0xc40c, 0xc40c, 0xc40c, 0xc40c, 0xc40c, 0xc40d, 0xc40d, 0xc40d, - 0xc40d, 0xc40d, 0xc40d, 0xc40d, 0xc40d, 0xc40d, 0xc40d, 0xc40d, - 0xc40d, 0xc40d, 0xc40d, 0xc40d, 0xc40e, 0xc40e, 0xc40e, 0xc40e, - 0xc40e, 0xc40e, 0xc40e, 0xc40e, 0xc40e, 0xc40e, 0xc40e, 0xc40e, - 0xc40e, 0xc40e, 0xc40f, 0xc40f, 0xc40f, 0xc40f, 0xc40f, 0xc40f, - 0xc40f, 0xc40f, 0xc40f, 0xc40f, 0xc40f, 0xc40f, 0xc40f, 0xc40f, - 0xc410, 0xc410, 0xc410, 0xc410, 0xc410, 0xc410, 0xc410, 0xc410, - 0xc410, 0xc410, 0xc410, 0xc410, 0xc410, 0xc410, 0xc410, 0xc411, - 0xc411, 0xc411, 0xc411, 0xc411, 0xc411, 0xc411, 0xc411, 0xc411, - 0xc411, 0xc411, 0xc411, 0xc411, 0xc411, 0xc412, 0xc412, 0xc412, - 0xc412, 0xc412, 0xc412, 0xc412, 0xc412, 0xc412, 0xc412, 0xc412, - 0xc412, 0xc412, 0xc412, 0xc412, 0xc413, 0xc413, 0xc413, 0xc413, - 0xc413, 0xc413, 0xc413, 0xc413, 0xc413, 0xc413, 0xc413, 0xc413, - 0xc413, 0xc413, 0xc413, 0xc414, 0xc414, 0xc414, 0xc414, 0xc414, - 0xc414, 0xc414, 0xc414, 0xc414, 0xc414, 0xc414, 0xc414, 0xc414, - 0xc414, 0xc414, 0xc415, 0xc415, 0xc415, 0xc415, 0xc415, 0xc415, - 0xc415, 0xc415, 0xc415, 0xc415, 0xc415, 0xc415, 0xc415, 0xc415, - 0xc415, 0xc416, 0xc416, 0xc416, 0xc416, 0xc416, 0xc416, 0xc416, - 0xc416, 0xc416, 0xc416, 0xc416, 0xc416, 0xc416, 0xc416, 0xc416, - 0xc417, 0xc417, 0xc417, 0xc417, 0xc417, 0xc417, 0xc417, 0xc417, - 0xc417, 0xc417, 0xc417, 0xc417, 0xc417, 0xc417, 0xc417, 0xc417, - 0xc418, 0xc418, 0xc418, 0xc418, 0xc418, 0xc418, 0xc418, 0xc418, - 0xc418, 0xc418, 0xc418, 0xc418, 0xc418, 0xc418, 0xc418, 0xc419, - 0xc419, 0xc419, 0xc419, 0xc419, 0xc419, 0xc419, 0xc419, 0xc419, - 0xc419, 0xc419, 0xc419, 0xc419, 0xc419, 0xc419, 0xc419, 0xc41a, - 0xc41a, 0xc41a, 0xc41a, 0xc41a, 0xc41a, 0xc41a, 0xc41a, 0xc41a, - 0xc41a, 0xc41a, 0xc41a, 0xc41a, 0xc41a, 0xc41a, 0xc41a, 0xc41b, - 0xc41b, 0xc41b, 0xc41b, 0xc41b, 0xc41b, 0xc41b, 0xc41b, 0xc41b, - 0xc41b, 0xc41b, 0xc41b, 0xc41b, 0xc41b, 0xc41b, 0xc41b, 0xc41c, - 0xc41c, 0xc41c, 0xc41c, 0xc41c, 0xc41c, 0xc41c, 0xc41c, 0xc41c, - 0xc41c, 0xc41c, 0xc41c, 0xc41c, 0xc41c, 0xc41c, 0xc41c, 0xc41d, - 0xc41d, 0xc41d, 0xc41d, 0xc41d, 0xc41d, 0xc41d, 0xc41d, 0xc41d, - 0xc41d, 0xc41d, 0xc41d, 0xc41d, 0xc41d, 0xc41d, 0xc41d, 0xc41e, - 0xc41e, 0xc41e, 0xc41e, 0xc41e, 0xc41e, 0xc41e, 0xc41e, 0xc41e, - 0xc41e, 0xc41e, 0xc41e, 0xc41e, 0xc41e, 0xc41e, 0xc41e, 0xc41f, - 0xc41f, 0xc41f, 0xc41f, 0xc41f, 0xc41f, 0xc41f, 0xc41f, 0xc41f, - 0xc41f, 0xc41f, 0xc41f, 0xc41f, 0xc41f, 0xc41f, 0xc41f, 0xc41f, - 0xc420, 0xc420, 0xc420, 0xc420, 0xc420, 0xc420, 0xc420, 0xc420, - 0xc420, 0xc420, 0xc420, 0xc420, 0xc420, 0xc420, 0xc420, 0xc420, - 0xc421, 0xc421, 0xc421, 0xc421, 0xc421, 0xc421, 0xc421, 0xc421, - 0xc421, 0xc421, 0xc421, 0xc421, 0xc421, 0xc421, 0xc421, 0xc421, - 0xc421, 0xc422, 0xc422, 0xc422, 0xc422, 0xc422, 0xc422, 0xc422, - 0xc422, 0xc422, 0xc422, 0xc422, 0xc422, 0xc422, 0xc422, 0xc422, - 0xc422, 0xc422, 0xc423, 0xc423, 0xc423, 0xc423, 0xc423, 0xc423, - 0xc423, 0xc423, 0xc423, 0xc423, 0xc423, 0xc423, 0xc423, 0xc423, - 0xc423, 0xc423, 0xc423, 0xc424, 0xc424, 0xc424, 0xc424, 0xc424, - 0xc424, 0xc424, 0xc424, 0xc424, 0xc424, 0xc424, 0xc424, 0xc424, - 0xc424, 0xc424, 0xc424, 0xc424, 0xc425, 0xc425, 0xc425, 0xc425, - 0xc425, 0xc425, 0xc425, 0xc425, 0xc425, 0xc425, 0xc425, 0xc425, - 0xc425, 0xc425, 0xc425, 0xc425, 0xc425, 0xc425, 0xc426, 0xc426, - 0xc426, 0xc426, 0xc426, 0xc426, 0xc426, 0xc426, 0xc426, 0xc426, - 0xc426, 0xc426, 0xc426, 0xc426, 0xc426, 0xc426, 0xc426, 0xc427, - 0xc427, 0xc427, 0xc427, 0xc427, 0xc427, 0xc427, 0xc427, 0xc427, - 0xc427, 0xc428, 0xc428, 0xc428, 0xc428, 0xc428, 0xc428, 0xc428, - 0xc428, 0xc428, 0xc429, 0xc429, 0xc429, 0xc429, 0xc429, 0xc429, - 0xc429, 0xc429, 0xc429, 0xc42a, 0xc42a, 0xc42a, 0xc42a, 0xc42a, - 0xc42a, 0xc42a, 0xc42a, 0xc42a, 0xc42b, 0xc42b, 0xc42b, 0xc42b, - 0xc42b, 0xc42b, 0xc42b, 0xc42b, 0xc42b, 0xc42c, 0xc42c, 0xc42c, - 0xc42c, 0xc42c, 0xc42c, 0xc42c, 0xc42c, 0xc42c, 0xc42d, 0xc42d, - 0xc42d, 0xc42d, 0xc42d, 0xc42d, 0xc42d, 0xc42d, 0xc42d, 0xc42e, - 0xc42e, 0xc42e, 0xc42e, 0xc42e, 0xc42e, 0xc42e, 0xc42e, 0xc42e, - 0xc42e, 0xc42f, 0xc42f, 0xc42f, 0xc42f, 0xc42f, 0xc42f, 0xc42f, - 0xc42f, 0xc42f, 0xc430, 0xc430, 0xc430, 0xc430, 0xc430, 0xc430, - 0xc430, 0xc430, 0xc430, 0xc430, 0xc431, 0xc431, 0xc431, 0xc431, - 0xc431, 0xc431, 0xc431, 0xc431, 0xc431, 0xc432, 0xc432, 0xc432, - 0xc432, 0xc432, 0xc432, 0xc432, 0xc432, 0xc432, 0xc432, 0xc433, - 0xc433, 0xc433, 0xc433, 0xc433, 0xc433, 0xc433, 0xc433, 0xc433, - 0xc433, 0xc434, 0xc434, 0xc434, 0xc434, 0xc434, 0xc434, 0xc434, - 0xc434, 0xc434, 0xc434, 0xc435, 0xc435, 0xc435, 0xc435, 0xc435, - 0xc435, 0xc435, 0xc435, 0xc435, 0xc435, 0xc436, 0xc436, 0xc436, - 0xc436, 0xc436, 0xc436, 0xc436, 0xc436, 0xc436, 0xc436, 0xc437, - 0xc437, 0xc437, 0xc437, 0xc437, 0xc437, 0xc437, 0xc437, 0xc437, - 0xc437, 0xc438, 0xc438, 0xc438, 0xc438, 0xc438, 0xc438, 0xc438, - 0xc438, 0xc438, 0xc438, 0xc439, 0xc439, 0xc439, 0xc439, 0xc439, - 0xc439, 0xc439, 0xc439, 0xc439, 0xc439, 0xc43a, 0xc43a, 0xc43a, - 0xc43a, 0xc43a, 0xc43a, 0xc43a, 0xc43a, 0xc43a, 0xc43a, 0xc43a, - 0xc43b, 0xc43b, 0xc43b, 0xc43b, 0xc43b, 0xc43b, 0xc43b, 0xc43b, - 0xc43b, 0xc43b, 0xc43c, 0xc43c, 0xc43c, 0xc43c, 0xc43c, 0xc43c, - 0xc43c, 0xc43c, 0xc43c, 0xc43c, 0xc43c, 0xc43d, 0xc43d, 0xc43d, - 0xc43d, 0xc43d, 0xc43d, 0xc43d, 0xc43d, 0xc43d, 0xc43d, 0xc43d, - 0xc43e, 0xc43e, 0xc43e, 0xc43e, 0xc43e, 0xc43e, 0xc43e, 0xc43e, - 0xc43e, 0xc43e, 0xc43f, 0xc43f, 0xc43f, 0xc43f, 0xc43f, 0xc43f, - 0xc43f, 0xc43f, 0xc43f, 0xc43f, 0xc43f, 0xc440, 0xc440, 0xc440, - 0xc440, 0xc440, 0xc440, 0xc440, 0xc440, 0xc440, 0xc440, 0xc440, - 0xc441, 0xc441, 0xc441, 0xc441, 0xc441, 0xc441, 0xc441, 0xc441, - 0xc441, 0xc441, 0xc441, 0xc442, 0xc442, 0xc442, 0xc442, 0xc442, - 0xc442, 0xc442, 0xc442, 0xc442, 0xc442, 0xc442, 0xc443, 0xc443, - 0xc443, 0xc443, 0xc443, 0xc443, 0xc443, 0xc443, 0xc443, 0xc443, - 0xc443, 0xc443, 0xc444, 0xc444, 0xc444, 0xc444, 0xc444, 0xc444, - 0xc444, 0xc444, 0xc444, 0xc444, 0xc444, 0xc445, 0xc445, 0xc445, - 0xc445, 0xc445, 0xc445, 0xc445, 0xc445, 0xc445, 0xc445, 0xc445, - 0xc446, 0xc446, 0xc446, 0xc446, 0xc446, 0xc446, 0xc446, 0xc446, - 0xc446, 0xc446, 0xc446, 0xc446, 0xc447, 0xc447, 0xc447, 0xc447, - 0xc447, 0xc447, 0xc447, 0xc447, 0xc447, 0xc447, 0xc447, 0xc448, - 0xc448, 0xc448, 0xc448, 0xc448, 0xc448, 0xc448, 0xc448, 0xc448, - 0xc448, 0xc448, 0xc448, 0xc449, 0xc449, 0xc449, 0xc449, 0xc449, - 0xc449, 0xc449, 0xc449, 0xc449, 0xc449, 0xc449, 0xc449, 0xc44a, - 0xc44a, 0xc44a, 0xc44a, 0xc44a, 0xc44a, 0xc44a, 0xc44a, 0xc44a, - 0xc44a, 0xc44a, 0xc44a, 0xc44b, 0xc44b, 0xc44b, 0xc44b, 0xc44b, - 0xc44b, 0xc44b, 0xc44b, 0xc44b, 0xc44b, 0xc44b, 0xc44b, 0xc44c, - 0xc44c, 0xc44c, 0xc44c, 0xc44c, 0xc44c, 0xc44c, 0xc44c, 0xc44c, - 0xc44c, 0xc44c, 0xc44c, 0xc44d, 0xc44d, 0xc44d, 0xc44d, 0xc44d, - 0xc44d, 0xc44d, 0xc44d, 0xc44d, 0xc44d, 0xc44d, 0xc44d, 0xc44e, - 0xc44e, 0xc44e, 0xc44e, 0xc44e, 0xc44e, 0xc44e, 0xc44e, 0xc44e, - 0xc44e, 0xc44e, 0xc44e, 0xc44e, 0xc44f, 0xc44f, 0xc44f, 0xc44f, - 0xc44f, 0xc44f, 0xc44f, 0xc44f, 0xc44f, 0xc44f, 0xc44f, 0xc44f, - 0xc450, 0xc450, 0xc450, 0xc450, 0xc450, 0xc450, 0xc450, 0xc450, - 0xc450, 0xc450, 0xc450, 0xc450, 0xc450, 0xc451, 0xc451, 0xc451, - 0xc451, 0xc451, 0xc451, 0xc451, 0xc451, 0xc451, 0xc451, 0xc451, - 0xc451, 0xc452, 0xc452, 0xc452, 0xc452, 0xc452, 0xc452, 0xc452, - 0xc452, 0xc452, 0xc452, 0xc452, 0xc452, 0xc452, 0xc453, 0xc453, - 0xc453, 0xc453, 0xc453, 0xc453, 0xc453, 0xc453, 0xc453, 0xc453, - 0xc453, 0xc453, 0xc453, 0xc454, 0xc454, 0xc454, 0xc454, 0xc454, - 0xc454, 0xc454, 0xc454, 0xc454, 0xc454, 0xc454, 0xc454, 0xc454, - 0xc455, 0xc455, 0xc455, 0xc455, 0xc455, 0xc455, 0xc455, 0xc455, - 0xc455, 0xc455, 0xc455, 0xc455, 0xc455, 0xc456, 0xc456, 0xc456, - 0xc456, 0xc456, 0xc456, 0xc456, 0xc456, 0xc456, 0xc456, 0xc456, - 0xc456, 0xc456, 0xc457, 0xc457, 0xc457, 0xc457, 0xc457, 0xc457, - 0xc457, 0xc457, 0xc457, 0xc457, 0xc457, 0xc457, 0xc457, 0xc457, - 0xc458, 0xc458, 0xc458, 0xc458, 0xc458, 0xc458, 0xc458, 0xc458, - 0xc458, 0xc458, 0xc458, 0xc458, 0xc458, 0xc459, 0xc459, 0xc459, - 0xc459, 0xc459, 0xc459, 0xc459, 0xc459, 0xc459, 0xc459, 0xc459, - 0xc459, 0xc459, 0xc459, 0xc45a, 0xc45a, 0xc45a, 0xc45a, 0xc45a, - 0xc45a, 0xc45a, 0xc45a, 0xc45a, 0xc45a, 0xc45a, 0xc45a, 0xc45a, - 0xc45b, 0xc45b, 0xc45b, 0xc45b, 0xc45b, 0xc45b, 0xc45b, 0xc45b, - 0xc45b, 0xc45b, 0xc45b, 0xc45b, 0xc45b, 0xc45b, 0xc45c, 0xc45c, - 0xc45c, 0xc45c, 0xc45c, 0xc45c, 0xc45c, 0xc45c, 0xc45c, 0xc45c, - 0xc45c, 0xc45c, 0xc45c, 0xc45c, 0xc45d, 0xc45d, 0xc45d, 0xc45d, - 0xc45d, 0xc45d, 0xc45d, 0xc45d, 0xc45d, 0xc45d, 0xc45d, 0xc45d, - 0xc45d, 0xc45d, 0xc45e, 0xc45e, 0xc45e, 0xc45e, 0xc45e, 0xc45e, - 0xc45e, 0xc45e, 0xc45e, 0xc45e, 0xc45e, 0xc45e, 0xc45e, 0xc45e, - 0xc45f, 0xc45f, 0xc45f, 0xc45f, 0xc45f, 0xc45f, 0xc45f, 0xc45f, - 0xc45f, 0xc45f, 0xc45f, 0xc45f, 0xc45f, 0xc45f, 0xc45f, 0xc460, - 0xc460, 0xc460, 0xc460, 0xc460, 0xc460, 0xc460, 0xc460, 0xc460, - 0xc460, 0xc460, 0xc460, 0xc460, 0xc460, 0xc461, 0xc461, 0xc461, - 0xc461, 0xc461, 0xc461, 0xc461, 0xc461, 0xc461, 0xc461, 0xc461, - 0xc461, 0xc461, 0xc461, 0xc461, 0xc462, 0xc462, 0xc462, 0xc462, - 0xc462, 0xc462, 0xc462, 0xc462, 0xc462, 0xc462, 0xc462, 0xc462, - 0xc462, 0xc462, 0xc463, 0xc463, 0xc463, 0xc463, 0xc463, 0xc463, - 0xc463, 0xc463, 0xc463, 0xc463, 0xc463, 0xc463, 0xc463, 0xc463, - 0xc463, 0xc464, 0xc464, 0xc464, 0xc464, 0xc464, 0xc464, 0xc464, - 0xc464, 0xc464, 0xc464, 0xc464, 0xc464, 0xc464, 0xc464, 0xc464, - 0xc465, 0xc465, 0xc465, 0xc465, 0xc465, 0xc465, 0xc465, 0xc465, - 0xc465, 0xc465, 0xc465, 0xc465, 0xc465, 0xc465, 0xc465, 0xc466, - 0xc466, 0xc466, 0xc466, 0xc466, 0xc466, 0xc466, 0xc466, 0xc466, - 0xc466, 0xc466, 0xc466, 0xc466, 0xc466, 0xc466, 0xc467, 0xc467, - 0xc467, 0xc467, 0xc467, 0xc467, 0xc467, 0xc467, 0xc467, 0xc467, - 0xc467, 0xc467, 0xc467, 0xc467, 0xc467, 0xc467, 0xc468, 0xc468, - 0xc468, 0xc468, 0xc468, 0xc468, 0xc468, 0xc468, 0xc468, 0xc468, - 0xc468, 0xc468, 0xc468, 0xc468, 0xc468, 0xc469, 0xc469, 0xc469, - 0xc469, 0xc469, 0xc469, 0xc469, 0xc469, 0xc469, 0xc469, 0xc469, - 0xc469, 0xc469, 0xc469, 0xc469, 0xc469, 0xc46a, 0xc46a, 0xc46a, - 0xc46a, 0xc46a, 0xc46a, 0xc46a, 0xc46a, 0xc46a, 0xc46a, 0xc46a, - 0xc46a, 0xc46a, 0xc46a, 0xc46a, 0xc46b, 0xc46b, 0xc46b, 0xc46b, - 0xc46b, 0xc46b, 0xc46b, 0xc46b, 0xc46b, 0xc46b, 0xc46b, 0xc46b, - 0xc46b, 0xc46b, 0xc46b, 0xc46b, 0xc46c, 0xc46c, 0xc46c, 0xc46c, - 0xc46c, 0xc46c, 0xc46c, 0xc46c, 0xc46c, 0xc46c, 0xc46c, 0xc46c, - 0xc46c, 0xc46c, 0xc46c, 0xc46c, 0xc46d, 0xc46d, 0xc46d, 0xc46d, - 0xc46d, 0xc46d, 0xc46d, 0xc46d, 0xc46d, 0xc46d, 0xc46d, 0xc46d, - 0xc46d, 0xc46d, 0xc46d, 0xc46d, 0xc46e, 0xc46e, 0xc46e, 0xc46e, - 0xc46e, 0xc46e, 0xc46e, 0xc46e, 0xc46e, 0xc46e, 0xc46e, 0xc46e, - 0xc46e, 0xc46e, 0xc46e, 0xc46e, 0xc46e, 0xc46f, 0xc46f, 0xc46f, - 0xc46f, 0xc46f, 0xc46f, 0xc46f, 0xc46f, 0xc46f, 0xc46f, 0xc46f, - 0xc46f, 0xc46f, 0xc46f, 0xc46f, 0xc46f, 0xc470, 0xc470, 0xc470, - 0xc470, 0xc470, 0xc470, 0xc470, 0xc470, 0xc470, 0xc470, 0xc470, - 0xc470, 0xc470, 0xc470, 0xc470, 0xc470, 0xc471, 0xc471, 0xc471, - 0xc471, 0xc471, 0xc471, 0xc471, 0xc471, 0xc471, 0xc471, 0xc471, - 0xc471, 0xc471, 0xc471, 0xc471, 0xc471, 0xc471, 0xc472, 0xc472, - 0xc472, 0xc472, 0xc472, 0xc472, 0xc472, 0xc472, 0xc472, 0xc472, - 0xc472, 0xc472, 0xc472, 0xc472, 0xc472, 0xc472, 0xc472, 0xc473, - 0xc473, 0xc473, 0xc473, 0xc473, 0xc473, 0xc473, 0xc473, 0xc473, - 0xc473, 0xc473, 0xc473, 0xc473, 0xc473, 0xc473, 0xc473, 0xc473, - 0xc474, 0xc474, 0xc474, 0xc474, 0xc474, 0xc474, 0xc474, 0xc474, - 0xc474, 0xc474, 0xc474, 0xc474, 0xc474, 0xc474, 0xc474, 0xc474, - 0xc474, 0xc475, 0xc475, 0xc475, 0xc475, 0xc475, 0xc475, 0xc475, - 0xc475, 0xc475, 0xc475, 0xc475, 0xc475, 0xc475, 0xc475, 0xc475, - 0xc475, 0xc475, 0xc476, 0xc476, 0xc476, 0xc476, 0xc476, 0xc476, - 0xc476, 0xc476, 0xc476, 0xc476, 0xc476, 0xc476, 0xc476, 0xc476, - 0xc476, 0xc476, 0xc476, 0xc476, 0xc477, 0xc477, 0xc477, 0xc477, - 0xc477, 0xc477, 0xc477, 0xc477, 0xc477, 0xc477, 0xc477, 0xc477, - 0xc477, 0xc477, 0xc477, 0xc478, 0xc478, 0xc478, 0xc478, 0xc478, - 0xc478, 0xc478, 0xc478, 0xc478, 0xc479, 0xc479, 0xc479, 0xc479, - 0xc479, 0xc479, 0xc479, 0xc479, 0xc479, 0xc47a, 0xc47a, 0xc47a, - 0xc47a, 0xc47a, 0xc47a, 0xc47a, 0xc47a, 0xc47a, 0xc47b, 0xc47b, - 0xc47b, 0xc47b, 0xc47b, 0xc47b, 0xc47b, 0xc47b, 0xc47b, 0xc47c, - 0xc47c, 0xc47c, 0xc47c, 0xc47c, 0xc47c, 0xc47c, 0xc47c, 0xc47c, - 0xc47d, 0xc47d, 0xc47d, 0xc47d, 0xc47d, 0xc47d, 0xc47d, 0xc47d, - 0xc47d, 0xc47e, 0xc47e, 0xc47e, 0xc47e, 0xc47e, 0xc47e, 0xc47e, - 0xc47e, 0xc47e, 0xc47e, 0xc47f, 0xc47f, 0xc47f, 0xc47f, 0xc47f, - 0xc47f, 0xc47f, 0xc47f, 0xc47f, 0xc480, 0xc480, 0xc480, 0xc480, - 0xc480, 0xc480, 0xc480, 0xc480, 0xc480, 0xc481, 0xc481, 0xc481, - 0xc481, 0xc481, 0xc481, 0xc481, 0xc481, 0xc481, 0xc481, 0xc482, - 0xc482, 0xc482, 0xc482, 0xc482, 0xc482, 0xc482, 0xc482, 0xc482, - 0xc482, 0xc483, 0xc483, 0xc483, 0xc483, 0xc483, 0xc483, 0xc483, - 0xc483, 0xc483, 0xc484, 0xc484, 0xc484, 0xc484, 0xc484, 0xc484, - 0xc484, 0xc484, 0xc484, 0xc484, 0xc485, 0xc485, 0xc485, 0xc485, - 0xc485, 0xc485, 0xc485, 0xc485, 0xc485, 0xc485, 0xc486, 0xc486, - 0xc486, 0xc486, 0xc486, 0xc486, 0xc486, 0xc486, 0xc486, 0xc486, - 0xc487, 0xc487, 0xc487, 0xc487, 0xc487, 0xc487, 0xc487, 0xc487, - 0xc487, 0xc487, 0xc488, 0xc488, 0xc488, 0xc488, 0xc488, 0xc488, - 0xc488, 0xc488, 0xc488, 0xc488, 0xc489, 0xc489, 0xc489, 0xc489, - 0xc489, 0xc489, 0xc489, 0xc489, 0xc489, 0xc489, 0xc489, 0xc48a, - 0xc48a, 0xc48a, 0xc48a, 0xc48a, 0xc48a, 0xc48a, 0xc48a, 0xc48a, - 0xc48a, 0xc48b, 0xc48b, 0xc48b, 0xc48b, 0xc48b, 0xc48b, 0xc48b, - 0xc48b, 0xc48b, 0xc48b, 0xc48c, 0xc48c, 0xc48c, 0xc48c, 0xc48c, - 0xc48c, 0xc48c, 0xc48c, 0xc48c, 0xc48c, 0xc48c, 0xc48d, 0xc48d, - 0xc48d, 0xc48d, 0xc48d, 0xc48d, 0xc48d, 0xc48d, 0xc48d, 0xc48d, - 0xc48d, 0xc48e, 0xc48e, 0xc48e, 0xc48e, 0xc48e, 0xc48e, 0xc48e, - 0xc48e, 0xc48e, 0xc48e, 0xc48f, 0xc48f, 0xc48f, 0xc48f, 0xc48f, - 0xc48f, 0xc48f, 0xc48f, 0xc48f, 0xc48f, 0xc48f, 0xc490, 0xc490, - 0xc490, 0xc490, 0xc490, 0xc490, 0xc490, 0xc490, 0xc490, 0xc490, - 0xc490, 0xc491, 0xc491, 0xc491, 0xc491, 0xc491, 0xc491, 0xc491, - 0xc491, 0xc491, 0xc491, 0xc491, 0xc492, 0xc492, 0xc492, 0xc492, - 0xc492, 0xc492, 0xc492, 0xc492, 0xc492, 0xc492, 0xc492, 0xc493, - 0xc493, 0xc493, 0xc493, 0xc493, 0xc493, 0xc493, 0xc493, 0xc493, - 0xc493, 0xc493, 0xc494, 0xc494, 0xc494, 0xc494, 0xc494, 0xc494, - 0xc494, 0xc494, 0xc494, 0xc494, 0xc494, 0xc495, 0xc495, 0xc495, - 0xc495, 0xc495, 0xc495, 0xc495, 0xc495, 0xc495, 0xc495, 0xc495, - 0xc495, 0xc496, 0xc496, 0xc496, 0xc496, 0xc496, 0xc496, 0xc496, - 0xc496, 0xc496, 0xc496, 0xc496, 0xc497, 0xc497, 0xc497, 0xc497, - 0xc497, 0xc497, 0xc497, 0xc497, 0xc497, 0xc497, 0xc497, 0xc497, - 0xc498, 0xc498, 0xc498, 0xc498, 0xc498, 0xc498, 0xc498, 0xc498, - 0xc498, 0xc498, 0xc498, 0xc499, 0xc499, 0xc499, 0xc499, 0xc499, - 0xc499, 0xc499, 0xc499, 0xc499, 0xc499, 0xc499, 0xc499, 0xc49a, - 0xc49a, 0xc49a, 0xc49a, 0xc49a, 0xc49a, 0xc49a, 0xc49a, 0xc49a, - 0xc49a, 0xc49a, 0xc49a, 0xc49b, 0xc49b, 0xc49b, 0xc49b, 0xc49b, - 0xc49b, 0xc49b, 0xc49b, 0xc49b, 0xc49b, 0xc49b, 0xc49b, 0xc49c, - 0xc49c, 0xc49c, 0xc49c, 0xc49c, 0xc49c, 0xc49c, 0xc49c, 0xc49c, - 0xc49c, 0xc49c, 0xc49c, 0xc49d, 0xc49d, 0xc49d, 0xc49d, 0xc49d, - 0xc49d, 0xc49d, 0xc49d, 0xc49d, 0xc49d, 0xc49d, 0xc49d, 0xc49e, - 0xc49e, 0xc49e, 0xc49e, 0xc49e, 0xc49e, 0xc49e, 0xc49e, 0xc49e, - 0xc49e, 0xc49e, 0xc49e, 0xc49e, 0xc49f, 0xc49f, 0xc49f, 0xc49f, - 0xc49f, 0xc49f, 0xc49f, 0xc49f, 0xc49f, 0xc49f, 0xc49f, 0xc49f, - 0xc4a0, 0xc4a0, 0xc4a0, 0xc4a0, 0xc4a0, 0xc4a0, 0xc4a0, 0xc4a0, - 0xc4a0, 0xc4a0, 0xc4a0, 0xc4a0, 0xc4a1, 0xc4a1, 0xc4a1, 0xc4a1, - 0xc4a1, 0xc4a1, 0xc4a1, 0xc4a1, 0xc4a1, 0xc4a1, 0xc4a1, 0xc4a1, - 0xc4a1, 0xc4a2, 0xc4a2, 0xc4a2, 0xc4a2, 0xc4a2, 0xc4a2, 0xc4a2, - 0xc4a2, 0xc4a2, 0xc4a2, 0xc4a2, 0xc4a2, 0xc4a2, 0xc4a3, 0xc4a3, - 0xc4a3, 0xc4a3, 0xc4a3, 0xc4a3, 0xc4a3, 0xc4a3, 0xc4a3, 0xc4a3, - 0xc4a3, 0xc4a3, 0xc4a3, 0xc4a4, 0xc4a4, 0xc4a4, 0xc4a4, 0xc4a4, - 0xc4a4, 0xc4a4, 0xc4a4, 0xc4a4, 0xc4a4, 0xc4a4, 0xc4a4, 0xc4a5, - 0xc4a5, 0xc4a5, 0xc4a5, 0xc4a5, 0xc4a5, 0xc4a5, 0xc4a5, 0xc4a5, - 0xc4a5, 0xc4a5, 0xc4a5, 0xc4a5, 0xc4a5, 0xc4a6, 0xc4a6, 0xc4a6, - 0xc4a6, 0xc4a6, 0xc4a6, 0xc4a6, 0xc4a6, 0xc4a6, 0xc4a6, 0xc4a6, - 0xc4a6, 0xc4a6, 0xc4a7, 0xc4a7, 0xc4a7, 0xc4a7, 0xc4a7, 0xc4a7, - 0xc4a7, 0xc4a7, 0xc4a7, 0xc4a7, 0xc4a7, 0xc4a7, 0xc4a7, 0xc4a8, - 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, - 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a8, 0xc4a9, 0xc4a9, 0xc4a9, 0xc4a9, - 0xc4a9, 0xc4a9, 0xc4a9, 0xc4a9, 0xc4a9, 0xc4a9, 0xc4a9, 0xc4a9, - 0xc4a9, 0xc4a9, 0xc4aa, 0xc4aa, 0xc4aa, 0xc4aa, 0xc4aa, 0xc4aa, - 0xc4aa, 0xc4aa, 0xc4aa, 0xc4aa, 0xc4aa, 0xc4aa, 0xc4aa, 0xc4ab, - 0xc4ab, 0xc4ab, 0xc4ab, 0xc4ab, 0xc4ab, 0xc4ab, 0xc4ab, 0xc4ab, - 0xc4ab, 0xc4ab, 0xc4ab, 0xc4ab, 0xc4ab, 0xc4ac, 0xc4ac, 0xc4ac, - 0xc4ac, 0xc4ac, 0xc4ac, 0xc4ac, 0xc4ac, 0xc4ac, 0xc4ac, 0xc4ac, - 0xc4ac, 0xc4ac, 0xc4ac, 0xc4ad, 0xc4ad, 0xc4ad, 0xc4ad, 0xc4ad, - 0xc4ad, 0xc4ad, 0xc4ad, 0xc4ad, 0xc4ad, 0xc4ad, 0xc4ad, 0xc4ad, - 0xc4ad, 0xc4ae, 0xc4ae, 0xc4ae, 0xc4ae, 0xc4ae, 0xc4ae, 0xc4ae, - 0xc4ae, 0xc4ae, 0xc4ae, 0xc4ae, 0xc4ae, 0xc4ae, 0xc4ae, 0xc4af, - 0xc4af, 0xc4af, 0xc4af, 0xc4af, 0xc4af, 0xc4af, 0xc4af, 0xc4af, - 0xc4af, 0xc4af, 0xc4af, 0xc4af, 0xc4af, 0xc4b0, 0xc4b0, 0xc4b0, - 0xc4b0, 0xc4b0, 0xc4b0, 0xc4b0, 0xc4b0, 0xc4b0, 0xc4b0, 0xc4b0, - 0xc4b0, 0xc4b0, 0xc4b0, 0xc4b0, 0xc4b1, 0xc4b1, 0xc4b1, 0xc4b1, - 0xc4b1, 0xc4b1, 0xc4b1, 0xc4b1, 0xc4b1, 0xc4b1, 0xc4b1, 0xc4b1, - 0xc4b1, 0xc4b1, 0xc4b2, 0xc4b2, 0xc4b2, 0xc4b2, 0xc4b2, 0xc4b2, - 0xc4b2, 0xc4b2, 0xc4b2, 0xc4b2, 0xc4b2, 0xc4b2, 0xc4b2, 0xc4b2, - 0xc4b2, 0xc4b3, 0xc4b3, 0xc4b3, 0xc4b3, 0xc4b3, 0xc4b3, 0xc4b3, - 0xc4b3, 0xc4b3, 0xc4b3, 0xc4b3, 0xc4b3, 0xc4b3, 0xc4b3, 0xc4b4, - 0xc4b4, 0xc4b4, 0xc4b4, 0xc4b4, 0xc4b4, 0xc4b4, 0xc4b4, 0xc4b4, - 0xc4b4, 0xc4b4, 0xc4b4, 0xc4b4, 0xc4b4, 0xc4b4, 0xc4b5, 0xc4b5, - 0xc4b5, 0xc4b5, 0xc4b5, 0xc4b5, 0xc4b5, 0xc4b5, 0xc4b5, 0xc4b5, - 0xc4b5, 0xc4b5, 0xc4b5, 0xc4b5, 0xc4b5, 0xc4b6, 0xc4b6, 0xc4b6, - 0xc4b6, 0xc4b6, 0xc4b6, 0xc4b6, 0xc4b6, 0xc4b6, 0xc4b6, 0xc4b6, - 0xc4b6, 0xc4b6, 0xc4b6, 0xc4b6, 0xc4b7, 0xc4b7, 0xc4b7, 0xc4b7, - 0xc4b7, 0xc4b7, 0xc4b7, 0xc4b7, 0xc4b7, 0xc4b7, 0xc4b7, 0xc4b7, - 0xc4b7, 0xc4b7, 0xc4b7, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, - 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b8, - 0xc4b8, 0xc4b8, 0xc4b8, 0xc4b9, 0xc4b9, 0xc4b9, 0xc4b9, 0xc4b9, - 0xc4b9, 0xc4b9, 0xc4b9, 0xc4b9, 0xc4b9, 0xc4b9, 0xc4b9, 0xc4b9, - 0xc4b9, 0xc4b9, 0xc4ba, 0xc4ba, 0xc4ba, 0xc4ba, 0xc4ba, 0xc4ba, - 0xc4ba, 0xc4ba, 0xc4ba, 0xc4ba, 0xc4ba, 0xc4ba, 0xc4ba, 0xc4ba, - 0xc4ba, 0xc4ba, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, - 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, 0xc4bb, - 0xc4bb, 0xc4bb, 0xc4bc, 0xc4bc, 0xc4bc, 0xc4bc, 0xc4bc, 0xc4bc, - 0xc4bc, 0xc4bc, 0xc4bc, 0xc4bc, 0xc4bc, 0xc4bc, 0xc4bc, 0xc4bc, - 0xc4bc, 0xc4bc, 0xc4bd, 0xc4bd, 0xc4bd, 0xc4bd, 0xc4bd, 0xc4bd, - 0xc4bd, 0xc4bd, 0xc4bd, 0xc4bd, 0xc4bd, 0xc4bd, 0xc4bd, 0xc4bd, - 0xc4bd, 0xc4bd, 0xc4be, 0xc4be, 0xc4be, 0xc4be, 0xc4be, 0xc4be, - 0xc4be, 0xc4be, 0xc4be, 0xc4be, 0xc4be, 0xc4be, 0xc4be, 0xc4be, - 0xc4be, 0xc4be, 0xc4bf, 0xc4bf, 0xc4bf, 0xc4bf, 0xc4bf, 0xc4bf, - 0xc4bf, 0xc4bf, 0xc4bf, 0xc4bf, 0xc4bf, 0xc4bf, 0xc4bf, 0xc4bf, - 0xc4bf, 0xc4bf, 0xc4c0, 0xc4c0, 0xc4c0, 0xc4c0, 0xc4c0, 0xc4c0, - 0xc4c0, 0xc4c0, 0xc4c0, 0xc4c0, 0xc4c0, 0xc4c0, 0xc4c0, 0xc4c0, - 0xc4c0, 0xc4c0, 0xc4c0, 0xc4c1, 0xc4c1, 0xc4c1, 0xc4c1, 0xc4c1, - 0xc4c1, 0xc4c1, 0xc4c1, 0xc4c1, 0xc4c1, 0xc4c1, 0xc4c1, 0xc4c1, - 0xc4c1, 0xc4c1, 0xc4c1, 0xc4c2, 0xc4c2, 0xc4c2, 0xc4c2, 0xc4c2, - 0xc4c2, 0xc4c2, 0xc4c2, 0xc4c2, 0xc4c2, 0xc4c2, 0xc4c2, 0xc4c2, - 0xc4c2, 0xc4c2, 0xc4c2, 0xc4c2, 0xc4c3, 0xc4c3, 0xc4c3, 0xc4c3, - 0xc4c3, 0xc4c3, 0xc4c3, 0xc4c3, 0xc4c3, 0xc4c3, 0xc4c3, 0xc4c3, - 0xc4c3, 0xc4c3, 0xc4c3, 0xc4c3, 0xc4c3, 0xc4c4, 0xc4c4, 0xc4c4, - 0xc4c4, 0xc4c4, 0xc4c4, 0xc4c4, 0xc4c4, 0xc4c4, 0xc4c4, 0xc4c4, - 0xc4c4, 0xc4c4, 0xc4c4, 0xc4c4, 0xc4c4, 0xc4c4, 0xc4c5, 0xc4c5, - 0xc4c5, 0xc4c5, 0xc4c5, 0xc4c5, 0xc4c5, 0xc4c5, 0xc4c5, 0xc4c5, - 0xc4c5, 0xc4c5, 0xc4c5, 0xc4c5, 0xc4c5, 0xc4c5, 0xc4c5, 0xc4c6, - 0xc4c6, 0xc4c6, 0xc4c6, 0xc4c6, 0xc4c6, 0xc4c6, 0xc4c6, 0xc4c6, - 0xc4c6, 0xc4c6, 0xc4c6, 0xc4c6, 0xc4c6, 0xc4c6, 0xc4c6, 0xc4c6, - 0xc4c7, 0xc4c7, 0xc4c7, 0xc4c7, 0xc4c7, 0xc4c7, 0xc4c7, 0xc4c7, - 0xc4c7, 0xc4c7, 0xc4c7, 0xc4c7, 0xc4c7, 0xc4c7, 0xc4c7, 0xc4c7, - 0xc4c7, 0xc4c7, 0xc4c8, 0xc4c8, 0xc4c8, 0xc4c8, 0xc4c8, 0xc4c8, - 0xc4c8, 0xc4c8, 0xc4c8, 0xc4c8, 0xc4c8, 0xc4c8, 0xc4c9, 0xc4c9, - 0xc4c9, 0xc4c9, 0xc4c9, 0xc4c9, 0xc4c9, 0xc4c9, 0xc4c9, 0xc4ca, - 0xc4ca, 0xc4ca, 0xc4ca, 0xc4ca, 0xc4ca, 0xc4ca, 0xc4ca, 0xc4ca, - 0xc4cb, 0xc4cb, 0xc4cb, 0xc4cb, 0xc4cb, 0xc4cb, 0xc4cb, 0xc4cb, - 0xc4cb, 0xc4cc, 0xc4cc, 0xc4cc, 0xc4cc, 0xc4cc, 0xc4cc, 0xc4cc, - 0xc4cc, 0xc4cc, 0xc4cd, 0xc4cd, 0xc4cd, 0xc4cd, 0xc4cd, 0xc4cd, - 0xc4cd, 0xc4cd, 0xc4cd, 0xc4ce, 0xc4ce, 0xc4ce, 0xc4ce, 0xc4ce, - 0xc4ce, 0xc4ce, 0xc4ce, 0xc4ce, 0xc4cf, 0xc4cf, 0xc4cf, 0xc4cf, - 0xc4cf, 0xc4cf, 0xc4cf, 0xc4cf, 0xc4cf, 0xc4cf, 0xc4d0, 0xc4d0, - 0xc4d0, 0xc4d0, 0xc4d0, 0xc4d0, 0xc4d0, 0xc4d0, 0xc4d0, 0xc4d1, - 0xc4d1, 0xc4d1, 0xc4d1, 0xc4d1, 0xc4d1, 0xc4d1, 0xc4d1, 0xc4d1, - 0xc4d1, 0xc4d2, 0xc4d2, 0xc4d2, 0xc4d2, 0xc4d2, 0xc4d2, 0xc4d2, - 0xc4d2, 0xc4d2, 0xc4d3, 0xc4d3, 0xc4d3, 0xc4d3, 0xc4d3, 0xc4d3, - 0xc4d3, 0xc4d3, 0xc4d3, 0xc4d3, 0xc4d4, 0xc4d4, 0xc4d4, 0xc4d4, - 0xc4d4, 0xc4d4, 0xc4d4, 0xc4d4, 0xc4d4, 0xc4d4, 0xc4d5, 0xc4d5, - 0xc4d5, 0xc4d5, 0xc4d5, 0xc4d5, 0xc4d5, 0xc4d5, 0xc4d5, 0xc4d5, - 0xc4d6, 0xc4d6, 0xc4d6, 0xc4d6, 0xc4d6, 0xc4d6, 0xc4d6, 0xc4d6, - 0xc4d6, 0xc4d6, 0xc4d7, 0xc4d7, 0xc4d7, 0xc4d7, 0xc4d7, 0xc4d7, - 0xc4d7, 0xc4d7, 0xc4d7, 0xc4d7, 0xc4d8, 0xc4d8, 0xc4d8, 0xc4d8, - 0xc4d8, 0xc4d8, 0xc4d8, 0xc4d8, 0xc4d8, 0xc4d8, 0xc4d9, 0xc4d9, - 0xc4d9, 0xc4d9, 0xc4d9, 0xc4d9, 0xc4d9, 0xc4d9, 0xc4d9, 0xc4d9, - 0xc4da, 0xc4da, 0xc4da, 0xc4da, 0xc4da, 0xc4da, 0xc4da, 0xc4da, - 0xc4da, 0xc4da, 0xc4db, 0xc4db, 0xc4db, 0xc4db, 0xc4db, 0xc4db, - 0xc4db, 0xc4db, 0xc4db, 0xc4db, 0xc4db, 0xc4dc, 0xc4dc, 0xc4dc, - 0xc4dc, 0xc4dc, 0xc4dc, 0xc4dc, 0xc4dc, 0xc4dc, 0xc4dc, 0xc4dd, - 0xc4dd, 0xc4dd, 0xc4dd, 0xc4dd, 0xc4dd, 0xc4dd, 0xc4dd, 0xc4dd, - 0xc4dd, 0xc4dd, 0xc4de, 0xc4de, 0xc4de, 0xc4de, 0xc4de, 0xc4de, - 0xc4de, 0xc4de, 0xc4de, 0xc4de, 0xc4df, 0xc4df, 0xc4df, 0xc4df, - 0xc4df, 0xc4df, 0xc4df, 0xc4df, 0xc4df, 0xc4df, 0xc4df, 0xc4e0, - 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e0, - 0xc4e0, 0xc4e0, 0xc4e1, 0xc4e1, 0xc4e1, 0xc4e1, 0xc4e1, 0xc4e1, - 0xc4e1, 0xc4e1, 0xc4e1, 0xc4e1, 0xc4e1, 0xc4e2, 0xc4e2, 0xc4e2, - 0xc4e2, 0xc4e2, 0xc4e2, 0xc4e2, 0xc4e2, 0xc4e2, 0xc4e2, 0xc4e2, - 0xc4e3, 0xc4e3, 0xc4e3, 0xc4e3, 0xc4e3, 0xc4e3, 0xc4e3, 0xc4e3, - 0xc4e3, 0xc4e3, 0xc4e3, 0xc4e4, 0xc4e4, 0xc4e4, 0xc4e4, 0xc4e4, - 0xc4e4, 0xc4e4, 0xc4e4, 0xc4e4, 0xc4e4, 0xc4e4, 0xc4e5, 0xc4e5, - 0xc4e5, 0xc4e5, 0xc4e5, 0xc4e5, 0xc4e5, 0xc4e5, 0xc4e5, 0xc4e5, - 0xc4e5, 0xc4e6, 0xc4e6, 0xc4e6, 0xc4e6, 0xc4e6, 0xc4e6, 0xc4e6, - 0xc4e6, 0xc4e6, 0xc4e6, 0xc4e6, 0xc4e6, 0xc4e7, 0xc4e7, 0xc4e7, - 0xc4e7, 0xc4e7, 0xc4e7, 0xc4e7, 0xc4e7, 0xc4e7, 0xc4e7, 0xc4e7, - 0xc4e8, 0xc4e8, 0xc4e8, 0xc4e8, 0xc4e8, 0xc4e8, 0xc4e8, 0xc4e8, - 0xc4e8, 0xc4e8, 0xc4e8, 0xc4e8, 0xc4e9, 0xc4e9, 0xc4e9, 0xc4e9, - 0xc4e9, 0xc4e9, 0xc4e9, 0xc4e9, 0xc4e9, 0xc4e9, 0xc4e9, 0xc4ea, - 0xc4ea, 0xc4ea, 0xc4ea, 0xc4ea, 0xc4ea, 0xc4ea, 0xc4ea, 0xc4ea, - 0xc4ea, 0xc4ea, 0xc4ea, 0xc4eb, 0xc4eb, 0xc4eb, 0xc4eb, 0xc4eb, - 0xc4eb, 0xc4eb, 0xc4eb, 0xc4eb, 0xc4eb, 0xc4eb, 0xc4eb, 0xc4ec, - 0xc4ec, 0xc4ec, 0xc4ec, 0xc4ec, 0xc4ec, 0xc4ec, 0xc4ec, 0xc4ec, - 0xc4ec, 0xc4ec, 0xc4ec, 0xc4ed, 0xc4ed, 0xc4ed, 0xc4ed, 0xc4ed, - 0xc4ed, 0xc4ed, 0xc4ed, 0xc4ed, 0xc4ed, 0xc4ed, 0xc4ed, 0xc4ee, - 0xc4ee, 0xc4ee, 0xc4ee, 0xc4ee, 0xc4ee, 0xc4ee, 0xc4ee, 0xc4ee, - 0xc4ee, 0xc4ee, 0xc4ee, 0xc4ef, 0xc4ef, 0xc4ef, 0xc4ef, 0xc4ef, - 0xc4ef, 0xc4ef, 0xc4ef, 0xc4ef, 0xc4ef, 0xc4ef, 0xc4ef, 0xc4ef, - 0xc4f0, 0xc4f0, 0xc4f0, 0xc4f0, 0xc4f0, 0xc4f0, 0xc4f0, 0xc4f0, - 0xc4f0, 0xc4f0, 0xc4f0, 0xc4f0, 0xc4f1, 0xc4f1, 0xc4f1, 0xc4f1, - 0xc4f1, 0xc4f1, 0xc4f1, 0xc4f1, 0xc4f1, 0xc4f1, 0xc4f1, 0xc4f1, - 0xc4f1, 0xc4f2, 0xc4f2, 0xc4f2, 0xc4f2, 0xc4f2, 0xc4f2, 0xc4f2, - 0xc4f2, 0xc4f2, 0xc4f2, 0xc4f2, 0xc4f2, 0xc4f3, 0xc4f3, 0xc4f3, - 0xc4f3, 0xc4f3, 0xc4f3, 0xc4f3, 0xc4f3, 0xc4f3, 0xc4f3, 0xc4f3, - 0xc4f3, 0xc4f3, 0xc4f4, 0xc4f4, 0xc4f4, 0xc4f4, 0xc4f4, 0xc4f4, - 0xc4f4, 0xc4f4, 0xc4f4, 0xc4f4, 0xc4f4, 0xc4f4, 0xc4f4, 0xc4f5, - 0xc4f5, 0xc4f5, 0xc4f5, 0xc4f5, 0xc4f5, 0xc4f5, 0xc4f5, 0xc4f5, - 0xc4f5, 0xc4f5, 0xc4f5, 0xc4f5, 0xc4f6, 0xc4f6, 0xc4f6, 0xc4f6, - 0xc4f6, 0xc4f6, 0xc4f6, 0xc4f6, 0xc4f6, 0xc4f6, 0xc4f6, 0xc4f6, - 0xc4f6, 0xc4f7, 0xc4f7, 0xc4f7, 0xc4f7, 0xc4f7, 0xc4f7, 0xc4f7, - 0xc4f7, 0xc4f7, 0xc4f7, 0xc4f7, 0xc4f7, 0xc4f7, 0xc4f8, 0xc4f8, - 0xc4f8, 0xc4f8, 0xc4f8, 0xc4f8, 0xc4f8, 0xc4f8, 0xc4f8, 0xc4f8, - 0xc4f8, 0xc4f8, 0xc4f8, 0xc4f8, 0xc4f9, 0xc4f9, 0xc4f9, 0xc4f9, - 0xc4f9, 0xc4f9, 0xc4f9, 0xc4f9, 0xc4f9, 0xc4f9, 0xc4f9, 0xc4f9, - 0xc4f9, 0xc4fa, 0xc4fa, 0xc4fa, 0xc4fa, 0xc4fa, 0xc4fa, 0xc4fa, - 0xc4fa, 0xc4fa, 0xc4fa, 0xc4fa, 0xc4fa, 0xc4fa, 0xc4fb, 0xc4fb, - 0xc4fb, 0xc4fb, 0xc4fb, 0xc4fb, 0xc4fb, 0xc4fb, 0xc4fb, 0xc4fb, - 0xc4fb, 0xc4fb, 0xc4fb, 0xc4fb, 0xc4fc, 0xc4fc, 0xc4fc, 0xc4fc, - 0xc4fc, 0xc4fc, 0xc4fc, 0xc4fc, 0xc4fc, 0xc4fc, 0xc4fc, 0xc4fc, - 0xc4fc, 0xc4fc, 0xc4fd, 0xc4fd, 0xc4fd, 0xc4fd, 0xc4fd, 0xc4fd, - 0xc4fd, 0xc4fd, 0xc4fd, 0xc4fd, 0xc4fd, 0xc4fd, 0xc4fd, 0xc4fd, - 0xc4fe, 0xc4fe, 0xc4fe, 0xc4fe, 0xc4fe, 0xc4fe, 0xc4fe, 0xc4fe, - 0xc4fe, 0xc4fe, 0xc4fe, 0xc4fe, 0xc4fe, 0xc4fe, 0xc4ff, 0xc4ff, - 0xc4ff, 0xc4ff, 0xc4ff, 0xc4ff, 0xc4ff, 0xc4ff, 0xc4ff, 0xc4ff, - 0xc4ff, 0xc4ff, 0xc4ff, 0xc4ff, 0xc500, 0xc500, 0xc500, 0xc500, - 0xc500, 0xc500, 0xc500, 0xc500, 0xc500, 0xc500, 0xc500, 0xc500, - 0xc500, 0xc500, 0xc501, 0xc501, 0xc501, 0xc501, 0xc501, 0xc501, - 0xc501, 0xc501, 0xc501, 0xc501, 0xc501, 0xc501, 0xc501, 0xc501, - 0xc501, 0xc502, 0xc502, 0xc502, 0xc502, 0xc502, 0xc502, 0xc502, - 0xc502, 0xc502, 0xc502, 0xc502, 0xc502, 0xc502, 0xc502, 0xc503, - 0xc503, 0xc503, 0xc503, 0xc503, 0xc503, 0xc503, 0xc503, 0xc503, - 0xc503, 0xc503, 0xc503, 0xc503, 0xc503, 0xc503, 0xc504, 0xc504, - 0xc504, 0xc504, 0xc504, 0xc504, 0xc504, 0xc504, 0xc504, 0xc504, - 0xc504, 0xc504, 0xc504, 0xc504, 0xc505, 0xc505, 0xc505, 0xc505, - 0xc505, 0xc505, 0xc505, 0xc505, 0xc505, 0xc505, 0xc505, 0xc505, - 0xc505, 0xc505, 0xc505, 0xc506, 0xc506, 0xc506, 0xc506, 0xc506, - 0xc506, 0xc506, 0xc506, 0xc506, 0xc506, 0xc506, 0xc506, 0xc506, - 0xc506, 0xc506, 0xc507, 0xc507, 0xc507, 0xc507, 0xc507, 0xc507, - 0xc507, 0xc507, 0xc507, 0xc507, 0xc507, 0xc507, 0xc507, 0xc507, - 0xc507, 0xc508, 0xc508, 0xc508, 0xc508, 0xc508, 0xc508, 0xc508, - 0xc508, 0xc508, 0xc508, 0xc508, 0xc508, 0xc508, 0xc508, 0xc508, - 0xc508, 0xc509, 0xc509, 0xc509, 0xc509, 0xc509, 0xc509, 0xc509, - 0xc509, 0xc509, 0xc509, 0xc509, 0xc509, 0xc509, 0xc509, 0xc509, - 0xc50a, 0xc50a, 0xc50a, 0xc50a, 0xc50a, 0xc50a, 0xc50a, 0xc50a, - 0xc50a, 0xc50a, 0xc50a, 0xc50a, 0xc50a, 0xc50a, 0xc50a, 0xc50a, - 0xc50b, 0xc50b, 0xc50b, 0xc50b, 0xc50b, 0xc50b, 0xc50b, 0xc50b, - 0xc50b, 0xc50b, 0xc50b, 0xc50b, 0xc50b, 0xc50b, 0xc50b, 0xc50c, - 0xc50c, 0xc50c, 0xc50c, 0xc50c, 0xc50c, 0xc50c, 0xc50c, 0xc50c, - 0xc50c, 0xc50c, 0xc50c, 0xc50c, 0xc50c, 0xc50c, 0xc50c, 0xc50d, - 0xc50d, 0xc50d, 0xc50d, 0xc50d, 0xc50d, 0xc50d, 0xc50d, 0xc50d, - 0xc50d, 0xc50d, 0xc50d, 0xc50d, 0xc50d, 0xc50d, 0xc50d, 0xc50e, - 0xc50e, 0xc50e, 0xc50e, 0xc50e, 0xc50e, 0xc50e, 0xc50e, 0xc50e, - 0xc50e, 0xc50e, 0xc50e, 0xc50e, 0xc50e, 0xc50e, 0xc50e, 0xc50f, - 0xc50f, 0xc50f, 0xc50f, 0xc50f, 0xc50f, 0xc50f, 0xc50f, 0xc50f, - 0xc50f, 0xc50f, 0xc50f, 0xc50f, 0xc50f, 0xc50f, 0xc50f, 0xc510, - 0xc510, 0xc510, 0xc510, 0xc510, 0xc510, 0xc510, 0xc510, 0xc510, - 0xc510, 0xc510, 0xc510, 0xc510, 0xc510, 0xc510, 0xc510, 0xc510, - 0xc511, 0xc511, 0xc511, 0xc511, 0xc511, 0xc511, 0xc511, 0xc511, - 0xc511, 0xc511, 0xc511, 0xc511, 0xc511, 0xc511, 0xc511, 0xc511, - 0xc512, 0xc512, 0xc512, 0xc512, 0xc512, 0xc512, 0xc512, 0xc512, - 0xc512, 0xc512, 0xc512, 0xc512, 0xc512, 0xc512, 0xc512, 0xc512, - 0xc512, 0xc513, 0xc513, 0xc513, 0xc513, 0xc513, 0xc513, 0xc513, - 0xc513, 0xc513, 0xc513, 0xc513, 0xc513, 0xc513, 0xc513, 0xc513, - 0xc513, 0xc513, 0xc514, 0xc514, 0xc514, 0xc514, 0xc514, 0xc514, - 0xc514, 0xc514, 0xc514, 0xc514, 0xc514, 0xc514, 0xc514, 0xc514, - 0xc514, 0xc514, 0xc514, 0xc515, 0xc515, 0xc515, 0xc515, 0xc515, - 0xc515, 0xc515, 0xc515, 0xc515, 0xc515, 0xc515, 0xc515, 0xc515, - 0xc515, 0xc515, 0xc515, 0xc515, 0xc516, 0xc516, 0xc516, 0xc516, - 0xc516, 0xc516, 0xc516, 0xc516, 0xc516, 0xc516, 0xc516, 0xc516, - 0xc516, 0xc516, 0xc516, 0xc516, 0xc516, 0xc517, 0xc517, 0xc517, - 0xc517, 0xc517, 0xc517, 0xc517, 0xc517, 0xc517, 0xc517, 0xc517, - 0xc517, 0xc517, 0xc517, 0xc517, 0xc517, 0xc517, 0xc518, 0xc518, - 0xc518, 0xc518, 0xc518, 0xc518, 0xc518, 0xc518, 0xc518, 0xc518, - 0xc518, 0xc518, 0xc518, 0xc518, 0xc518, 0xc518, 0xc518, 0xc518, - 0xc519, 0xc519, 0xc519, 0xc519, 0xc519, 0xc519, 0xc519, 0xc519, - 0xc519, 0xc51a, 0xc51a, 0xc51a, 0xc51a, 0xc51a, 0xc51a, 0xc51a, - 0xc51a, 0xc51a, 0xc51b, 0xc51b, 0xc51b, 0xc51b, 0xc51b, 0xc51b, - 0xc51b, 0xc51b, 0xc51b, 0xc51c, 0xc51c, 0xc51c, 0xc51c, 0xc51c, - 0xc51c, 0xc51c, 0xc51c, 0xc51c, 0xc51d, 0xc51d, 0xc51d, 0xc51d, - 0xc51d, 0xc51d, 0xc51d, 0xc51d, 0xc51d, 0xc51e, 0xc51e, 0xc51e, - 0xc51e, 0xc51e, 0xc51e, 0xc51e, 0xc51e, 0xc51e, 0xc51f, 0xc51f, - 0xc51f, 0xc51f, 0xc51f, 0xc51f, 0xc51f, 0xc51f, 0xc51f, 0xc51f, - 0xc520, 0xc520, 0xc520, 0xc520, 0xc520, 0xc520, 0xc520, 0xc520, - 0xc520, 0xc521, 0xc521, 0xc521, 0xc521, 0xc521, 0xc521, 0xc521, - 0xc521, 0xc521, 0xc522, 0xc522, 0xc522, 0xc522, 0xc522, 0xc522, - 0xc522, 0xc522, 0xc522, 0xc522, 0xc523, 0xc523, 0xc523, 0xc523, - 0xc523, 0xc523, 0xc523, 0xc523, 0xc523, 0xc523, 0xc524, 0xc524, - 0xc524, 0xc524, 0xc524, 0xc524, 0xc524, 0xc524, 0xc524, 0xc525, - 0xc525, 0xc525, 0xc525, 0xc525, 0xc525, 0xc525, 0xc525, 0xc525, - 0xc525, 0xc526, 0xc526, 0xc526, 0xc526, 0xc526, 0xc526, 0xc526, - 0xc526, 0xc526, 0xc526, 0xc527, 0xc527, 0xc527, 0xc527, 0xc527, - 0xc527, 0xc527, 0xc527, 0xc527, 0xc527, 0xc528, 0xc528, 0xc528, - 0xc528, 0xc528, 0xc528, 0xc528, 0xc528, 0xc528, 0xc528, 0xc529, - 0xc529, 0xc529, 0xc529, 0xc529, 0xc529, 0xc529, 0xc529, 0xc529, - 0xc529, 0xc52a, 0xc52a, 0xc52a, 0xc52a, 0xc52a, 0xc52a, 0xc52a, - 0xc52a, 0xc52a, 0xc52a, 0xc52b, 0xc52b, 0xc52b, 0xc52b, 0xc52b, - 0xc52b, 0xc52b, 0xc52b, 0xc52b, 0xc52b, 0xc52b, 0xc52c, 0xc52c, - 0xc52c, 0xc52c, 0xc52c, 0xc52c, 0xc52c, 0xc52c, 0xc52c, 0xc52c, - 0xc52d, 0xc52d, 0xc52d, 0xc52d, 0xc52d, 0xc52d, 0xc52d, 0xc52d, - 0xc52d, 0xc52d, 0xc52d, 0xc52e, 0xc52e, 0xc52e, 0xc52e, 0xc52e, - 0xc52e, 0xc52e, 0xc52e, 0xc52e, 0xc52e, 0xc52f, 0xc52f, 0xc52f, - 0xc52f, 0xc52f, 0xc52f, 0xc52f, 0xc52f, 0xc52f, 0xc52f, 0xc52f, - 0xc530, 0xc530, 0xc530, 0xc530, 0xc530, 0xc530, 0xc530, 0xc530, - 0xc530, 0xc530, 0xc530, 0xc531, 0xc531, 0xc531, 0xc531, 0xc531, - 0xc531, 0xc531, 0xc531, 0xc531, 0xc531, 0xc532, 0xc532, 0xc532, - 0xc532, 0xc532, 0xc532, 0xc532, 0xc532, 0xc532, 0xc532, 0xc532, - 0xc533, 0xc533, 0xc533, 0xc533, 0xc533, 0xc533, 0xc533, 0xc533, - 0xc533, 0xc533, 0xc533, 0xc534, 0xc534, 0xc534, 0xc534, 0xc534, - 0xc534, 0xc534, 0xc534, 0xc534, 0xc534, 0xc534, 0xc534, 0xc535, - 0xc535, 0xc535, 0xc535, 0xc535, 0xc535, 0xc535, 0xc535, 0xc535, - 0xc535, 0xc535, 0xc536, 0xc536, 0xc536, 0xc536, 0xc536, 0xc536, - 0xc536, 0xc536, 0xc536, 0xc536, 0xc536, 0xc537, 0xc537, 0xc537, - 0xc537, 0xc537, 0xc537, 0xc537, 0xc537, 0xc537, 0xc537, 0xc537, - 0xc537, 0xc538, 0xc538, 0xc538, 0xc538, 0xc538, 0xc538, 0xc538, - 0xc538, 0xc538, 0xc538, 0xc538, 0xc539, 0xc539, 0xc539, 0xc539, - 0xc539, 0xc539, 0xc539, 0xc539, 0xc539, 0xc539, 0xc539, 0xc539, - 0xc53a, 0xc53a, 0xc53a, 0xc53a, 0xc53a, 0xc53a, 0xc53a, 0xc53a, - 0xc53a, 0xc53a, 0xc53a, 0xc53b, 0xc53b, 0xc53b, 0xc53b, 0xc53b, - 0xc53b, 0xc53b, 0xc53b, 0xc53b, 0xc53b, 0xc53b, 0xc53b, 0xc53c, - 0xc53c, 0xc53c, 0xc53c, 0xc53c, 0xc53c, 0xc53c, 0xc53c, 0xc53c, - 0xc53c, 0xc53c, 0xc53c, 0xc53d, 0xc53d, 0xc53d, 0xc53d, 0xc53d, - 0xc53d, 0xc53d, 0xc53d, 0xc53d, 0xc53d, 0xc53d, 0xc53d, 0xc53e, - 0xc53e, 0xc53e, 0xc53e, 0xc53e, 0xc53e, 0xc53e, 0xc53e, 0xc53e, - 0xc53e, 0xc53e, 0xc53e, 0xc53f, 0xc53f, 0xc53f, 0xc53f, 0xc53f, - 0xc53f, 0xc53f, 0xc53f, 0xc53f, 0xc53f, 0xc53f, 0xc53f, 0xc53f, - 0xc540, 0xc540, 0xc540, 0xc540, 0xc540, 0xc540, 0xc540, 0xc540, - 0xc540, 0xc540, 0xc540, 0xc540, 0xc541, 0xc541, 0xc541, 0xc541, - 0xc541, 0xc541, 0xc541, 0xc541, 0xc541, 0xc541, 0xc541, 0xc541, - 0xc541, 0xc542, 0xc542, 0xc542, 0xc542, 0xc542, 0xc542, 0xc542, - 0xc542, 0xc542, 0xc542, 0xc542, 0xc542, 0xc543, 0xc543, 0xc543, - 0xc543, 0xc543, 0xc543, 0xc543, 0xc543, 0xc543, 0xc543, 0xc543, - 0xc543, 0xc543, 0xc544, 0xc544, 0xc544, 0xc544, 0xc544, 0xc544, - 0xc544, 0xc544, 0xc544, 0xc544, 0xc544, 0xc544, 0xc544, 0xc545, - 0xc545, 0xc545, 0xc545, 0xc545, 0xc545, 0xc545, 0xc545, 0xc545, - 0xc545, 0xc545, 0xc545, 0xc546, 0xc546, 0xc546, 0xc546, 0xc546, - 0xc546, 0xc546, 0xc546, 0xc546, 0xc546, 0xc546, 0xc546, 0xc546, - 0xc547, 0xc547, 0xc547, 0xc547, 0xc547, 0xc547, 0xc547, 0xc547, - 0xc547, 0xc547, 0xc547, 0xc547, 0xc547, 0xc547, 0xc548, 0xc548, - 0xc548, 0xc548, 0xc548, 0xc548, 0xc548, 0xc548, 0xc548, 0xc548, - 0xc548, 0xc548, 0xc548, 0xc549, 0xc549, 0xc549, 0xc549, 0xc549, - 0xc549, 0xc549, 0xc549, 0xc549, 0xc549, 0xc549, 0xc549, 0xc549, - 0xc54a, 0xc54a, 0xc54a, 0xc54a, 0xc54a, 0xc54a, 0xc54a, 0xc54a, - 0xc54a, 0xc54a, 0xc54a, 0xc54a, 0xc54a, 0xc54a, 0xc54b, 0xc54b, - 0xc54b, 0xc54b, 0xc54b, 0xc54b, 0xc54b, 0xc54b, 0xc54b, 0xc54b, - 0xc54b, 0xc54b, 0xc54b, 0xc54c, 0xc54c, 0xc54c, 0xc54c, 0xc54c, - 0xc54c, 0xc54c, 0xc54c, 0xc54c, 0xc54c, 0xc54c, 0xc54c, 0xc54c, - 0xc54c, 0xc54d, 0xc54d, 0xc54d, 0xc54d, 0xc54d, 0xc54d, 0xc54d, - 0xc54d, 0xc54d, 0xc54d, 0xc54d, 0xc54d, 0xc54d, 0xc54d, 0xc54e, - 0xc54e, 0xc54e, 0xc54e, 0xc54e, 0xc54e, 0xc54e, 0xc54e, 0xc54e, - 0xc54e, 0xc54e, 0xc54e, 0xc54e, 0xc54e, 0xc54f, 0xc54f, 0xc54f, - 0xc54f, 0xc54f, 0xc54f, 0xc54f, 0xc54f, 0xc54f, 0xc54f, 0xc54f, - 0xc54f, 0xc54f, 0xc54f, 0xc550, 0xc550, 0xc550, 0xc550, 0xc550, - 0xc550, 0xc550, 0xc550, 0xc550, 0xc550, 0xc550, 0xc550, 0xc550, - 0xc550, 0xc551, 0xc551, 0xc551, 0xc551, 0xc551, 0xc551, 0xc551, - 0xc551, 0xc551, 0xc551, 0xc551, 0xc551, 0xc551, 0xc551, 0xc552, - 0xc552, 0xc552, 0xc552, 0xc552, 0xc552, 0xc552, 0xc552, 0xc552, - 0xc552, 0xc552, 0xc552, 0xc552, 0xc552, 0xc552, 0xc553, 0xc553, - 0xc553, 0xc553, 0xc553, 0xc553, 0xc553, 0xc553, 0xc553, 0xc553, - 0xc553, 0xc553, 0xc553, 0xc553, 0xc554, 0xc554, 0xc554, 0xc554, - 0xc554, 0xc554, 0xc554, 0xc554, 0xc554, 0xc554, 0xc554, 0xc554, - 0xc554, 0xc554, 0xc554, 0xc555, 0xc555, 0xc555, 0xc555, 0xc555, - 0xc555, 0xc555, 0xc555, 0xc555, 0xc555, 0xc555, 0xc555, 0xc555, - 0xc555, 0xc555, 0xc556, 0xc556, 0xc556, 0xc556, 0xc556, 0xc556, - 0xc556, 0xc556, 0xc556, 0xc556, 0xc556, 0xc556, 0xc556, 0xc556, - 0xc557, 0xc557, 0xc557, 0xc557, 0xc557, 0xc557, 0xc557, 0xc557, - 0xc557, 0xc557, 0xc557, 0xc557, 0xc557, 0xc557, 0xc557, 0xc557, - 0xc558, 0xc558, 0xc558, 0xc558, 0xc558, 0xc558, 0xc558, 0xc558, - 0xc558, 0xc558, 0xc558, 0xc558, 0xc558, 0xc558, 0xc558, 0xc559, - 0xc559, 0xc559, 0xc559, 0xc559, 0xc559, 0xc559, 0xc559, 0xc559, - 0xc559, 0xc559, 0xc559, 0xc559, 0xc559, 0xc559, 0xc55a, 0xc55a, - 0xc55a, 0xc55a, 0xc55a, 0xc55a, 0xc55a, 0xc55a, 0xc55a, 0xc55a, - 0xc55a, 0xc55a, 0xc55a, 0xc55a, 0xc55a, 0xc55b, 0xc55b, 0xc55b, - 0xc55b, 0xc55b, 0xc55b, 0xc55b, 0xc55b, 0xc55b, 0xc55b, 0xc55b, - 0xc55b, 0xc55b, 0xc55b, 0xc55b, 0xc55b, 0xc55c, 0xc55c, 0xc55c, - 0xc55c, 0xc55c, 0xc55c, 0xc55c, 0xc55c, 0xc55c, 0xc55c, 0xc55c, - 0xc55c, 0xc55c, 0xc55c, 0xc55c, 0xc55c, 0xc55d, 0xc55d, 0xc55d, - 0xc55d, 0xc55d, 0xc55d, 0xc55d, 0xc55d, 0xc55d, 0xc55d, 0xc55d, - 0xc55d, 0xc55d, 0xc55d, 0xc55d, 0xc55d, 0xc55e, 0xc55e, 0xc55e, - 0xc55e, 0xc55e, 0xc55e, 0xc55e, 0xc55e, 0xc55e, 0xc55e, 0xc55e, - 0xc55e, 0xc55e, 0xc55e, 0xc55e, 0xc55e, 0xc55f, 0xc55f, 0xc55f, - 0xc55f, 0xc55f, 0xc55f, 0xc55f, 0xc55f, 0xc55f, 0xc55f, 0xc55f, - 0xc55f, 0xc55f, 0xc55f, 0xc55f, 0xc55f, 0xc560, 0xc560, 0xc560, - 0xc560, 0xc560, 0xc560, 0xc560, 0xc560, 0xc560, 0xc560, 0xc560, - 0xc560, 0xc560, 0xc560, 0xc560, 0xc560, 0xc561, 0xc561, 0xc561, - 0xc561, 0xc561, 0xc561, 0xc561, 0xc561, 0xc561, 0xc561, 0xc561, - 0xc561, 0xc561, 0xc561, 0xc561, 0xc561, 0xc562, 0xc562, 0xc562, - 0xc562, 0xc562, 0xc562, 0xc562, 0xc562, 0xc562, 0xc562, 0xc562, - 0xc562, 0xc562, 0xc562, 0xc562, 0xc562, 0xc562, 0xc563, 0xc563, - 0xc563, 0xc563, 0xc563, 0xc563, 0xc563, 0xc563, 0xc563, 0xc563, - 0xc563, 0xc563, 0xc563, 0xc563, 0xc563, 0xc563, 0xc563, 0xc564, - 0xc564, 0xc564, 0xc564, 0xc564, 0xc564, 0xc564, 0xc564, 0xc564, - 0xc564, 0xc564, 0xc564, 0xc564, 0xc564, 0xc564, 0xc564, 0xc565, - 0xc565, 0xc565, 0xc565, 0xc565, 0xc565, 0xc565, 0xc565, 0xc565, - 0xc565, 0xc565, 0xc565, 0xc565, 0xc565, 0xc565, 0xc565, 0xc565, - 0xc566, 0xc566, 0xc566, 0xc566, 0xc566, 0xc566, 0xc566, 0xc566, - 0xc566, 0xc566, 0xc566, 0xc566, 0xc566, 0xc566, 0xc566, 0xc566, - 0xc566, 0xc566, 0xc567, 0xc567, 0xc567, 0xc567, 0xc567, 0xc567, - 0xc567, 0xc567, 0xc567, 0xc567, 0xc567, 0xc567, 0xc567, 0xc567, - 0xc567, 0xc567, 0xc567, 0xc568, 0xc568, 0xc568, 0xc568, 0xc568, - 0xc568, 0xc568, 0xc568, 0xc568, 0xc568, 0xc568, 0xc568, 0xc568, - 0xc568, 0xc568, 0xc568, 0xc568, 0xc569, 0xc569, 0xc569, 0xc569, - 0xc569, 0xc569, 0xc569, 0xc569, 0xc569, 0xc569, 0xc569, 0xc569, - 0xc569, 0xc569, 0xc569, 0xc56a, 0xc56a, 0xc56a, 0xc56a, 0xc56a, - 0xc56a, 0xc56a, 0xc56a, 0xc56a, 0xc56b, 0xc56b, 0xc56b, 0xc56b, - 0xc56b, 0xc56b, 0xc56b, 0xc56b, 0xc56b, 0xc56c, 0xc56c, 0xc56c, - 0xc56c, 0xc56c, 0xc56c, 0xc56c, 0xc56c, 0xc56c, 0xc56d, 0xc56d, - 0xc56d, 0xc56d, 0xc56d, 0xc56d, 0xc56d, 0xc56d, 0xc56d, 0xc56e, - 0xc56e, 0xc56e, 0xc56e, 0xc56e, 0xc56e, 0xc56e, 0xc56e, 0xc56e, - 0xc56f, 0xc56f, 0xc56f, 0xc56f, 0xc56f, 0xc56f, 0xc56f, 0xc56f, - 0xc56f, 0xc570, 0xc570, 0xc570, 0xc570, 0xc570, 0xc570, 0xc570, - 0xc570, 0xc570, 0xc570, 0xc571, 0xc571, 0xc571, 0xc571, 0xc571, - 0xc571, 0xc571, 0xc571, 0xc571, 0xc572, 0xc572, 0xc572, 0xc572, - 0xc572, 0xc572, 0xc572, 0xc572, 0xc572, 0xc572, 0xc573, 0xc573, - 0xc573, 0xc573, 0xc573, 0xc573, 0xc573, 0xc573, 0xc573, 0xc574, - 0xc574, 0xc574, 0xc574, 0xc574, 0xc574, 0xc574, 0xc574, 0xc574, - 0xc574, 0xc575, 0xc575, 0xc575, 0xc575, 0xc575, 0xc575, 0xc575, - 0xc575, 0xc575, 0xc575, 0xc576, 0xc576, 0xc576, 0xc576, 0xc576, - 0xc576, 0xc576, 0xc576, 0xc576, 0xc577, 0xc577, 0xc577, 0xc577, - 0xc577, 0xc577, 0xc577, 0xc577, 0xc577, 0xc577, 0xc578, 0xc578, - 0xc578, 0xc578, 0xc578, 0xc578, 0xc578, 0xc578, 0xc578, 0xc578, - 0xc579, 0xc579, 0xc579, 0xc579, 0xc579, 0xc579, 0xc579, 0xc579, - 0xc579, 0xc579, 0xc57a, 0xc57a, 0xc57a, 0xc57a, 0xc57a, 0xc57a, - 0xc57a, 0xc57a, 0xc57a, 0xc57a, 0xc57a, 0xc57b, 0xc57b, 0xc57b, - 0xc57b, 0xc57b, 0xc57b, 0xc57b, 0xc57b, 0xc57b, 0xc57b, 0xc57c, - 0xc57c, 0xc57c, 0xc57c, 0xc57c, 0xc57c, 0xc57c, 0xc57c, 0xc57c, - 0xc57c, 0xc57d, 0xc57d, 0xc57d, 0xc57d, 0xc57d, 0xc57d, 0xc57d, - 0xc57d, 0xc57d, 0xc57d, 0xc57d, 0xc57e, 0xc57e, 0xc57e, 0xc57e, - 0xc57e, 0xc57e, 0xc57e, 0xc57e, 0xc57e, 0xc57e, 0xc57f, 0xc57f, - 0xc57f, 0xc57f, 0xc57f, 0xc57f, 0xc57f, 0xc57f, 0xc57f, 0xc57f, - 0xc57f, 0xc580, 0xc580, 0xc580, 0xc580, 0xc580, 0xc580, 0xc580, - 0xc580, 0xc580, 0xc580, 0xc580, 0xc581, 0xc581, 0xc581, 0xc581, - 0xc581, 0xc581, 0xc581, 0xc581, 0xc581, 0xc581, 0xc582, 0xc582, - 0xc582, 0xc582, 0xc582, 0xc582, 0xc582, 0xc582, 0xc582, 0xc582, - 0xc582, 0xc583, 0xc583, 0xc583, 0xc583, 0xc583, 0xc583, 0xc583, - 0xc583, 0xc583, 0xc583, 0xc583, 0xc584, 0xc584, 0xc584, 0xc584, - 0xc584, 0xc584, 0xc584, 0xc584, 0xc584, 0xc584, 0xc584, 0xc585, - 0xc585, 0xc585, 0xc585, 0xc585, 0xc585, 0xc585, 0xc585, 0xc585, - 0xc585, 0xc585, 0xc586, 0xc586, 0xc586, 0xc586, 0xc586, 0xc586, - 0xc586, 0xc586, 0xc586, 0xc586, 0xc586, 0xc586, 0xc587, 0xc587, - 0xc587, 0xc587, 0xc587, 0xc587, 0xc587, 0xc587, 0xc587, 0xc587, - 0xc587, 0xc588, 0xc588, 0xc588, 0xc588, 0xc588, 0xc588, 0xc588, - 0xc588, 0xc588, 0xc588, 0xc588, 0xc588, 0xc589, 0xc589, 0xc589, - 0xc589, 0xc589, 0xc589, 0xc589, 0xc589, 0xc589, 0xc589, 0xc589, - 0xc58a, 0xc58a, 0xc58a, 0xc58a, 0xc58a, 0xc58a, 0xc58a, 0xc58a, - 0xc58a, 0xc58a, 0xc58a, 0xc58a, 0xc58b, 0xc58b, 0xc58b, 0xc58b, - 0xc58b, 0xc58b, 0xc58b, 0xc58b, 0xc58b, 0xc58b, 0xc58b, 0xc58b, - 0xc58c, 0xc58c, 0xc58c, 0xc58c, 0xc58c, 0xc58c, 0xc58c, 0xc58c, - 0xc58c, 0xc58c, 0xc58c, 0xc58d, 0xc58d, 0xc58d, 0xc58d, 0xc58d, - 0xc58d, 0xc58d, 0xc58d, 0xc58d, 0xc58d, 0xc58d, 0xc58d, 0xc58e, - 0xc58e, 0xc58e, 0xc58e, 0xc58e, 0xc58e, 0xc58e, 0xc58e, 0xc58e, - 0xc58e, 0xc58e, 0xc58e, 0xc58f, 0xc58f, 0xc58f, 0xc58f, 0xc58f, - 0xc58f, 0xc58f, 0xc58f, 0xc58f, 0xc58f, 0xc58f, 0xc58f, 0xc58f, - 0xc590, 0xc590, 0xc590, 0xc590, 0xc590, 0xc590, 0xc590, 0xc590, - 0xc590, 0xc590, 0xc590, 0xc590, 0xc591, 0xc591, 0xc591, 0xc591, - 0xc591, 0xc591, 0xc591, 0xc591, 0xc591, 0xc591, 0xc591, 0xc591, - 0xc592, 0xc592, 0xc592, 0xc592, 0xc592, 0xc592, 0xc592, 0xc592, - 0xc592, 0xc592, 0xc592, 0xc592, 0xc592, 0xc593, 0xc593, 0xc593, - 0xc593, 0xc593, 0xc593, 0xc593, 0xc593, 0xc593, 0xc593, 0xc593, - 0xc593, 0xc594, 0xc594, 0xc594, 0xc594, 0xc594, 0xc594, 0xc594, - 0xc594, 0xc594, 0xc594, 0xc594, 0xc594, 0xc594, 0xc595, 0xc595, - 0xc595, 0xc595, 0xc595, 0xc595, 0xc595, 0xc595, 0xc595, 0xc595, - 0xc595, 0xc595, 0xc595, 0xc596, 0xc596, 0xc596, 0xc596, 0xc596, - 0xc596, 0xc596, 0xc596, 0xc596, 0xc596, 0xc596, 0xc596, 0xc596, - 0xc597, 0xc597, 0xc597, 0xc597, 0xc597, 0xc597, 0xc597, 0xc597, - 0xc597, 0xc597, 0xc597, 0xc597, 0xc597, 0xc598, 0xc598, 0xc598, - 0xc598, 0xc598, 0xc598, 0xc598, 0xc598, 0xc598, 0xc598, 0xc598, - 0xc598, 0xc598, 0xc599, 0xc599, 0xc599, 0xc599, 0xc599, 0xc599, - 0xc599, 0xc599, 0xc599, 0xc599, 0xc599, 0xc599, 0xc599, 0xc59a, - 0xc59a, 0xc59a, 0xc59a, 0xc59a, 0xc59a, 0xc59a, 0xc59a, 0xc59a, - 0xc59a, 0xc59a, 0xc59a, 0xc59a, 0xc59a, 0xc59b, 0xc59b, 0xc59b, - 0xc59b, 0xc59b, 0xc59b, 0xc59b, 0xc59b, 0xc59b, 0xc59b, 0xc59b, - 0xc59b, 0xc59b, 0xc59c, 0xc59c, 0xc59c, 0xc59c, 0xc59c, 0xc59c, - 0xc59c, 0xc59c, 0xc59c, 0xc59c, 0xc59c, 0xc59c, 0xc59c, 0xc59c, - 0xc59d, 0xc59d, 0xc59d, 0xc59d, 0xc59d, 0xc59d, 0xc59d, 0xc59d, - 0xc59d, 0xc59d, 0xc59d, 0xc59d, 0xc59d, 0xc59d, 0xc59e, 0xc59e, - 0xc59e, 0xc59e, 0xc59e, 0xc59e, 0xc59e, 0xc59e, 0xc59e, 0xc59e, - 0xc59e, 0xc59e, 0xc59e, 0xc59f, 0xc59f, 0xc59f, 0xc59f, 0xc59f, - 0xc59f, 0xc59f, 0xc59f, 0xc59f, 0xc59f, 0xc59f, 0xc59f, 0xc59f, - 0xc59f, 0xc5a0, 0xc5a0, 0xc5a0, 0xc5a0, 0xc5a0, 0xc5a0, 0xc5a0, - 0xc5a0, 0xc5a0, 0xc5a0, 0xc5a0, 0xc5a0, 0xc5a0, 0xc5a0, 0xc5a1, - 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, - 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a1, 0xc5a2, 0xc5a2, - 0xc5a2, 0xc5a2, 0xc5a2, 0xc5a2, 0xc5a2, 0xc5a2, 0xc5a2, 0xc5a2, - 0xc5a2, 0xc5a2, 0xc5a2, 0xc5a2, 0xc5a3, 0xc5a3, 0xc5a3, 0xc5a3, - 0xc5a3, 0xc5a3, 0xc5a3, 0xc5a3, 0xc5a3, 0xc5a3, 0xc5a3, 0xc5a3, - 0xc5a3, 0xc5a3, 0xc5a3, 0xc5a4, 0xc5a4, 0xc5a4, 0xc5a4, 0xc5a4, - 0xc5a4, 0xc5a4, 0xc5a4, 0xc5a4, 0xc5a4, 0xc5a4, 0xc5a4, 0xc5a4, - 0xc5a4, 0xc5a5, 0xc5a5, 0xc5a5, 0xc5a5, 0xc5a5, 0xc5a5, 0xc5a5, - 0xc5a5, 0xc5a5, 0xc5a5, 0xc5a5, 0xc5a5, 0xc5a5, 0xc5a5, 0xc5a5, - 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, - 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a6, 0xc5a7, - 0xc5a7, 0xc5a7, 0xc5a7, 0xc5a7, 0xc5a7, 0xc5a7, 0xc5a7, 0xc5a7, - 0xc5a7, 0xc5a7, 0xc5a7, 0xc5a7, 0xc5a7, 0xc5a7, 0xc5a8, 0xc5a8, - 0xc5a8, 0xc5a8, 0xc5a8, 0xc5a8, 0xc5a8, 0xc5a8, 0xc5a8, 0xc5a8, - 0xc5a8, 0xc5a8, 0xc5a8, 0xc5a8, 0xc5a8, 0xc5a9, 0xc5a9, 0xc5a9, - 0xc5a9, 0xc5a9, 0xc5a9, 0xc5a9, 0xc5a9, 0xc5a9, 0xc5a9, 0xc5a9, - 0xc5a9, 0xc5a9, 0xc5a9, 0xc5a9, 0xc5aa, 0xc5aa, 0xc5aa, 0xc5aa, - 0xc5aa, 0xc5aa, 0xc5aa, 0xc5aa, 0xc5aa, 0xc5aa, 0xc5aa, 0xc5aa, - 0xc5aa, 0xc5aa, 0xc5aa, 0xc5ab, 0xc5ab, 0xc5ab, 0xc5ab, 0xc5ab, - 0xc5ab, 0xc5ab, 0xc5ab, 0xc5ab, 0xc5ab, 0xc5ab, 0xc5ab, 0xc5ab, - 0xc5ab, 0xc5ab, 0xc5ab, 0xc5ac, 0xc5ac, 0xc5ac, 0xc5ac, 0xc5ac, - 0xc5ac, 0xc5ac, 0xc5ac, 0xc5ac, 0xc5ac, 0xc5ac, 0xc5ac, 0xc5ac, - 0xc5ac, 0xc5ac, 0xc5ad, 0xc5ad, 0xc5ad, 0xc5ad, 0xc5ad, 0xc5ad, - 0xc5ad, 0xc5ad, 0xc5ad, 0xc5ad, 0xc5ad, 0xc5ad, 0xc5ad, 0xc5ad, - 0xc5ad, 0xc5ad, 0xc5ae, 0xc5ae, 0xc5ae, 0xc5ae, 0xc5ae, 0xc5ae, - 0xc5ae, 0xc5ae, 0xc5ae, 0xc5ae, 0xc5ae, 0xc5ae, 0xc5ae, 0xc5ae, - 0xc5ae, 0xc5ae, 0xc5af, 0xc5af, 0xc5af, 0xc5af, 0xc5af, 0xc5af, - 0xc5af, 0xc5af, 0xc5af, 0xc5af, 0xc5af, 0xc5af, 0xc5af, 0xc5af, - 0xc5af, 0xc5af, 0xc5b0, 0xc5b0, 0xc5b0, 0xc5b0, 0xc5b0, 0xc5b0, - 0xc5b0, 0xc5b0, 0xc5b0, 0xc5b0, 0xc5b0, 0xc5b0, 0xc5b0, 0xc5b0, - 0xc5b0, 0xc5b0, 0xc5b1, 0xc5b1, 0xc5b1, 0xc5b1, 0xc5b1, 0xc5b1, - 0xc5b1, 0xc5b1, 0xc5b1, 0xc5b1, 0xc5b1, 0xc5b1, 0xc5b1, 0xc5b1, - 0xc5b1, 0xc5b1, 0xc5b1, 0xc5b2, 0xc5b2, 0xc5b2, 0xc5b2, 0xc5b2, - 0xc5b2, 0xc5b2, 0xc5b2, 0xc5b2, 0xc5b2, 0xc5b2, 0xc5b2, 0xc5b2, - 0xc5b2, 0xc5b2, 0xc5b2, 0xc5b3, 0xc5b3, 0xc5b3, 0xc5b3, 0xc5b3, - 0xc5b3, 0xc5b3, 0xc5b3, 0xc5b3, 0xc5b3, 0xc5b3, 0xc5b3, 0xc5b3, - 0xc5b3, 0xc5b3, 0xc5b3, 0xc5b3, 0xc5b4, 0xc5b4, 0xc5b4, 0xc5b4, - 0xc5b4, 0xc5b4, 0xc5b4, 0xc5b4, 0xc5b4, 0xc5b4, 0xc5b4, 0xc5b4, - 0xc5b4, 0xc5b4, 0xc5b4, 0xc5b4, 0xc5b5, 0xc5b5, 0xc5b5, 0xc5b5, - 0xc5b5, 0xc5b5, 0xc5b5, 0xc5b5, 0xc5b5, 0xc5b5, 0xc5b5, 0xc5b5, - 0xc5b5, 0xc5b5, 0xc5b5, 0xc5b5, 0xc5b5, 0xc5b6, 0xc5b6, 0xc5b6, - 0xc5b6, 0xc5b6, 0xc5b6, 0xc5b6, 0xc5b6, 0xc5b6, 0xc5b6, 0xc5b6, - 0xc5b6, 0xc5b6, 0xc5b6, 0xc5b6, 0xc5b6, 0xc5b6, 0xc5b7, 0xc5b7, - 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, - 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b7, 0xc5b8, - 0xc5b8, 0xc5b8, 0xc5b8, 0xc5b8, 0xc5b8, 0xc5b8, 0xc5b8, 0xc5b8, - 0xc5b8, 0xc5b8, 0xc5b8, 0xc5b8, 0xc5b8, 0xc5b8, 0xc5b8, 0xc5b8, - 0xc5b8, 0xc5b9, 0xc5b9, 0xc5b9, 0xc5b9, 0xc5b9, 0xc5b9, 0xc5b9, - 0xc5b9, 0xc5b9, 0xc5b9, 0xc5b9, 0xc5b9, 0xc5b9, 0xc5b9, 0xc5b9, - 0xc5b9, 0xc5b9, 0xc5ba, 0xc5ba, 0xc5ba, 0xc5ba, 0xc5ba, 0xc5ba, - 0xc5ba, 0xc5ba, 0xc5ba, 0xc5ba, 0xc5ba, 0xc5ba, 0xc5bb, 0xc5bb, - 0xc5bb, 0xc5bb, 0xc5bb, 0xc5bb, 0xc5bb, 0xc5bb, 0xc5bb, 0xc5bc, - 0xc5bc, 0xc5bc, 0xc5bc, 0xc5bc, 0xc5bc, 0xc5bc, 0xc5bc, 0xc5bc, - 0xc5bd, 0xc5bd, 0xc5bd, 0xc5bd, 0xc5bd, 0xc5bd, 0xc5bd, 0xc5bd, - 0xc5bd, 0xc5be, 0xc5be, 0xc5be, 0xc5be, 0xc5be, 0xc5be, 0xc5be, - 0xc5be, 0xc5be, 0xc5bf, 0xc5bf, 0xc5bf, 0xc5bf, 0xc5bf, 0xc5bf, - 0xc5bf, 0xc5bf, 0xc5bf, 0xc5c0, 0xc5c0, 0xc5c0, 0xc5c0, 0xc5c0, - 0xc5c0, 0xc5c0, 0xc5c0, 0xc5c0, 0xc5c0, 0xc5c1, 0xc5c1, 0xc5c1, - 0xc5c1, 0xc5c1, 0xc5c1, 0xc5c1, 0xc5c1, 0xc5c1, 0xc5c2, 0xc5c2, - 0xc5c2, 0xc5c2, 0xc5c2, 0xc5c2, 0xc5c2, 0xc5c2, 0xc5c2, 0xc5c3, - 0xc5c3, 0xc5c3, 0xc5c3, 0xc5c3, 0xc5c3, 0xc5c3, 0xc5c3, 0xc5c3, - 0xc5c3, 0xc5c4, 0xc5c4, 0xc5c4, 0xc5c4, 0xc5c4, 0xc5c4, 0xc5c4, - 0xc5c4, 0xc5c4, 0xc5c4, 0xc5c5, 0xc5c5, 0xc5c5, 0xc5c5, 0xc5c5, - 0xc5c5, 0xc5c5, 0xc5c5, 0xc5c5, 0xc5c6, 0xc5c6, 0xc5c6, 0xc5c6, - 0xc5c6, 0xc5c6, 0xc5c6, 0xc5c6, 0xc5c6, 0xc5c6, 0xc5c7, 0xc5c7, - 0xc5c7, 0xc5c7, 0xc5c7, 0xc5c7, 0xc5c7, 0xc5c7, 0xc5c7, 0xc5c7, - 0xc5c8, 0xc5c8, 0xc5c8, 0xc5c8, 0xc5c8, 0xc5c8, 0xc5c8, 0xc5c8, - 0xc5c8, 0xc5c8, 0xc5c9, 0xc5c9, 0xc5c9, 0xc5c9, 0xc5c9, 0xc5c9, - 0xc5c9, 0xc5c9, 0xc5c9, 0xc5c9, 0xc5ca, 0xc5ca, 0xc5ca, 0xc5ca, - 0xc5ca, 0xc5ca, 0xc5ca, 0xc5ca, 0xc5ca, 0xc5ca, 0xc5cb, 0xc5cb, - 0xc5cb, 0xc5cb, 0xc5cb, 0xc5cb, 0xc5cb, 0xc5cb, 0xc5cb, 0xc5cb, - 0xc5cc, 0xc5cc, 0xc5cc, 0xc5cc, 0xc5cc, 0xc5cc, 0xc5cc, 0xc5cc, - 0xc5cc, 0xc5cc, 0xc5cd, 0xc5cd, 0xc5cd, 0xc5cd, 0xc5cd, 0xc5cd, - 0xc5cd, 0xc5cd, 0xc5cd, 0xc5cd, 0xc5cd, 0xc5ce, 0xc5ce, 0xc5ce, - 0xc5ce, 0xc5ce, 0xc5ce, 0xc5ce, 0xc5ce, 0xc5ce, 0xc5ce, 0xc5cf, - 0xc5cf, 0xc5cf, 0xc5cf, 0xc5cf, 0xc5cf, 0xc5cf, 0xc5cf, 0xc5cf, - 0xc5cf, 0xc5cf, 0xc5d0, 0xc5d0, 0xc5d0, 0xc5d0, 0xc5d0, 0xc5d0, - 0xc5d0, 0xc5d0, 0xc5d0, 0xc5d0, 0xc5d1, 0xc5d1, 0xc5d1, 0xc5d1, - 0xc5d1, 0xc5d1, 0xc5d1, 0xc5d1, 0xc5d1, 0xc5d1, 0xc5d1, 0xc5d2, - 0xc5d2, 0xc5d2, 0xc5d2, 0xc5d2, 0xc5d2, 0xc5d2, 0xc5d2, 0xc5d2, - 0xc5d2, 0xc5d2, 0xc5d3, 0xc5d3, 0xc5d3, 0xc5d3, 0xc5d3, 0xc5d3, - 0xc5d3, 0xc5d3, 0xc5d3, 0xc5d3, 0xc5d3, 0xc5d4, 0xc5d4, 0xc5d4, - 0xc5d4, 0xc5d4, 0xc5d4, 0xc5d4, 0xc5d4, 0xc5d4, 0xc5d4, 0xc5d4, - 0xc5d5, 0xc5d5, 0xc5d5, 0xc5d5, 0xc5d5, 0xc5d5, 0xc5d5, 0xc5d5, - 0xc5d5, 0xc5d5, 0xc5d5, 0xc5d6, 0xc5d6, 0xc5d6, 0xc5d6, 0xc5d6, - 0xc5d6, 0xc5d6, 0xc5d6, 0xc5d6, 0xc5d6, 0xc5d6, 0xc5d7, 0xc5d7, - 0xc5d7, 0xc5d7, 0xc5d7, 0xc5d7, 0xc5d7, 0xc5d7, 0xc5d7, 0xc5d7, - 0xc5d7, 0xc5d7, 0xc5d8, 0xc5d8, 0xc5d8, 0xc5d8, 0xc5d8, 0xc5d8, - 0xc5d8, 0xc5d8, 0xc5d8, 0xc5d8, 0xc5d8, 0xc5d9, 0xc5d9, 0xc5d9, - 0xc5d9, 0xc5d9, 0xc5d9, 0xc5d9, 0xc5d9, 0xc5d9, 0xc5d9, 0xc5d9, - 0xc5da, 0xc5da, 0xc5da, 0xc5da, 0xc5da, 0xc5da, 0xc5da, 0xc5da, - 0xc5da, 0xc5da, 0xc5da, 0xc5da, 0xc5db, 0xc5db, 0xc5db, 0xc5db, - 0xc5db, 0xc5db, 0xc5db, 0xc5db, 0xc5db, 0xc5db, 0xc5db, 0xc5db, - 0xc5dc, 0xc5dc, 0xc5dc, 0xc5dc, 0xc5dc, 0xc5dc, 0xc5dc, 0xc5dc, - 0xc5dc, 0xc5dc, 0xc5dc, 0xc5dc, 0xc5dd, 0xc5dd, 0xc5dd, 0xc5dd, - 0xc5dd, 0xc5dd, 0xc5dd, 0xc5dd, 0xc5dd, 0xc5dd, 0xc5dd, 0xc5dd, - 0xc5de, 0xc5de, 0xc5de, 0xc5de, 0xc5de, 0xc5de, 0xc5de, 0xc5de, - 0xc5de, 0xc5de, 0xc5de, 0xc5de, 0xc5df, 0xc5df, 0xc5df, 0xc5df, - 0xc5df, 0xc5df, 0xc5df, 0xc5df, 0xc5df, 0xc5df, 0xc5df, 0xc5df, - 0xc5e0, 0xc5e0, 0xc5e0, 0xc5e0, 0xc5e0, 0xc5e0, 0xc5e0, 0xc5e0, - 0xc5e0, 0xc5e0, 0xc5e0, 0xc5e0, 0xc5e1, 0xc5e1, 0xc5e1, 0xc5e1, - 0xc5e1, 0xc5e1, 0xc5e1, 0xc5e1, 0xc5e1, 0xc5e1, 0xc5e1, 0xc5e1, - 0xc5e2, 0xc5e2, 0xc5e2, 0xc5e2, 0xc5e2, 0xc5e2, 0xc5e2, 0xc5e2, - 0xc5e2, 0xc5e2, 0xc5e2, 0xc5e2, 0xc5e2, 0xc5e3, 0xc5e3, 0xc5e3, - 0xc5e3, 0xc5e3, 0xc5e3, 0xc5e3, 0xc5e3, 0xc5e3, 0xc5e3, 0xc5e3, - 0xc5e3, 0xc5e4, 0xc5e4, 0xc5e4, 0xc5e4, 0xc5e4, 0xc5e4, 0xc5e4, - 0xc5e4, 0xc5e4, 0xc5e4, 0xc5e4, 0xc5e4, 0xc5e4, 0xc5e5, 0xc5e5, - 0xc5e5, 0xc5e5, 0xc5e5, 0xc5e5, 0xc5e5, 0xc5e5, 0xc5e5, 0xc5e5, - 0xc5e5, 0xc5e5, 0xc5e6, 0xc5e6, 0xc5e6, 0xc5e6, 0xc5e6, 0xc5e6, - 0xc5e6, 0xc5e6, 0xc5e6, 0xc5e6, 0xc5e6, 0xc5e6, 0xc5e6, 0xc5e7, - 0xc5e7, 0xc5e7, 0xc5e7, 0xc5e7, 0xc5e7, 0xc5e7, 0xc5e7, 0xc5e7, - 0xc5e7, 0xc5e7, 0xc5e7, 0xc5e7, 0xc5e8, 0xc5e8, 0xc5e8, 0xc5e8, - 0xc5e8, 0xc5e8, 0xc5e8, 0xc5e8, 0xc5e8, 0xc5e8, 0xc5e8, 0xc5e8, - 0xc5e8, 0xc5e9, 0xc5e9, 0xc5e9, 0xc5e9, 0xc5e9, 0xc5e9, 0xc5e9, - 0xc5e9, 0xc5e9, 0xc5e9, 0xc5e9, 0xc5e9, 0xc5e9, 0xc5e9, 0xc5ea, - 0xc5ea, 0xc5ea, 0xc5ea, 0xc5ea, 0xc5ea, 0xc5ea, 0xc5ea, 0xc5ea, - 0xc5ea, 0xc5ea, 0xc5ea, 0xc5ea, 0xc5eb, 0xc5eb, 0xc5eb, 0xc5eb, - 0xc5eb, 0xc5eb, 0xc5eb, 0xc5eb, 0xc5eb, 0xc5eb, 0xc5eb, 0xc5eb, - 0xc5eb, 0xc5ec, 0xc5ec, 0xc5ec, 0xc5ec, 0xc5ec, 0xc5ec, 0xc5ec, - 0xc5ec, 0xc5ec, 0xc5ec, 0xc5ec, 0xc5ec, 0xc5ec, 0xc5ec, 0xc5ed, - 0xc5ed, 0xc5ed, 0xc5ed, 0xc5ed, 0xc5ed, 0xc5ed, 0xc5ed, 0xc5ed, - 0xc5ed, 0xc5ed, 0xc5ed, 0xc5ed, 0xc5ed, 0xc5ee, 0xc5ee, 0xc5ee, - 0xc5ee, 0xc5ee, 0xc5ee, 0xc5ee, 0xc5ee, 0xc5ee, 0xc5ee, 0xc5ee, - 0xc5ee, 0xc5ee, 0xc5ef, 0xc5ef, 0xc5ef, 0xc5ef, 0xc5ef, 0xc5ef, - 0xc5ef, 0xc5ef, 0xc5ef, 0xc5ef, 0xc5ef, 0xc5ef, 0xc5ef, 0xc5ef, - 0xc5f0, 0xc5f0, 0xc5f0, 0xc5f0, 0xc5f0, 0xc5f0, 0xc5f0, 0xc5f0, - 0xc5f0, 0xc5f0, 0xc5f0, 0xc5f0, 0xc5f0, 0xc5f0, 0xc5f1, 0xc5f1, - 0xc5f1, 0xc5f1, 0xc5f1, 0xc5f1, 0xc5f1, 0xc5f1, 0xc5f1, 0xc5f1, - 0xc5f1, 0xc5f1, 0xc5f1, 0xc5f1, 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, - 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, - 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f3, 0xc5f3, 0xc5f3, 0xc5f3, 0xc5f3, - 0xc5f3, 0xc5f3, 0xc5f3, 0xc5f3, 0xc5f3, 0xc5f3, 0xc5f3, 0xc5f3, - 0xc5f3, 0xc5f4, 0xc5f4, 0xc5f4, 0xc5f4, 0xc5f4, 0xc5f4, 0xc5f4, - 0xc5f4, 0xc5f4, 0xc5f4, 0xc5f4, 0xc5f4, 0xc5f4, 0xc5f4, 0xc5f5, - 0xc5f5, 0xc5f5, 0xc5f5, 0xc5f5, 0xc5f5, 0xc5f5, 0xc5f5, 0xc5f5, - 0xc5f5, 0xc5f5, 0xc5f5, 0xc5f5, 0xc5f5, 0xc5f5, 0xc5f6, 0xc5f6, - 0xc5f6, 0xc5f6, 0xc5f6, 0xc5f6, 0xc5f6, 0xc5f6, 0xc5f6, 0xc5f6, - 0xc5f6, 0xc5f6, 0xc5f6, 0xc5f6, 0xc5f6, 0xc5f7, 0xc5f7, 0xc5f7, - 0xc5f7, 0xc5f7, 0xc5f7, 0xc5f7, 0xc5f7, 0xc5f7, 0xc5f7, 0xc5f7, - 0xc5f7, 0xc5f7, 0xc5f7, 0xc5f7, 0xc5f8, 0xc5f8, 0xc5f8, 0xc5f8, - 0xc5f8, 0xc5f8, 0xc5f8, 0xc5f8, 0xc5f8, 0xc5f8, 0xc5f8, 0xc5f8, - 0xc5f8, 0xc5f8, 0xc5f8, 0xc5f9, 0xc5f9, 0xc5f9, 0xc5f9, 0xc5f9, - 0xc5f9, 0xc5f9, 0xc5f9, 0xc5f9, 0xc5f9, 0xc5f9, 0xc5f9, 0xc5f9, - 0xc5f9, 0xc5f9, 0xc5fa, 0xc5fa, 0xc5fa, 0xc5fa, 0xc5fa, 0xc5fa, - 0xc5fa, 0xc5fa, 0xc5fa, 0xc5fa, 0xc5fa, 0xc5fa, 0xc5fa, 0xc5fa, - 0xc5fa, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, - 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, 0xc5fb, - 0xc5fb, 0xc5fc, 0xc5fc, 0xc5fc, 0xc5fc, 0xc5fc, 0xc5fc, 0xc5fc, - 0xc5fc, 0xc5fc, 0xc5fc, 0xc5fc, 0xc5fc, 0xc5fc, 0xc5fc, 0xc5fc, - 0xc5fd, 0xc5fd, 0xc5fd, 0xc5fd, 0xc5fd, 0xc5fd, 0xc5fd, 0xc5fd, - 0xc5fd, 0xc5fd, 0xc5fd, 0xc5fd, 0xc5fd, 0xc5fd, 0xc5fd, 0xc5fd, - 0xc5fe, 0xc5fe, 0xc5fe, 0xc5fe, 0xc5fe, 0xc5fe, 0xc5fe, 0xc5fe, - 0xc5fe, 0xc5fe, 0xc5fe, 0xc5fe, 0xc5fe, 0xc5fe, 0xc5fe, 0xc5fe, - 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, - 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, 0xc5ff, - 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, - 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, 0xc600, - 0xc601, 0xc601, 0xc601, 0xc601, 0xc601, 0xc601, 0xc601, 0xc601, - 0xc601, 0xc601, 0xc601, 0xc601, 0xc601, 0xc601, 0xc601, 0xc601, - 0xc602, 0xc602, 0xc602, 0xc602, 0xc602, 0xc602, 0xc602, 0xc602, - 0xc602, 0xc602, 0xc602, 0xc602, 0xc602, 0xc602, 0xc602, 0xc602, - 0xc603, 0xc603, 0xc603, 0xc603, 0xc603, 0xc603, 0xc603, 0xc603, - 0xc603, 0xc603, 0xc603, 0xc603, 0xc603, 0xc603, 0xc603, 0xc603, - 0xc603, 0xc604, 0xc604, 0xc604, 0xc604, 0xc604, 0xc604, 0xc604, - 0xc604, 0xc604, 0xc604, 0xc604, 0xc604, 0xc604, 0xc604, 0xc604, - 0xc604, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, - 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, 0xc605, - 0xc605, 0xc605, 0xc606, 0xc606, 0xc606, 0xc606, 0xc606, 0xc606, - 0xc606, 0xc606, 0xc606, 0xc606, 0xc606, 0xc606, 0xc606, 0xc606, - 0xc606, 0xc606, 0xc606, 0xc607, 0xc607, 0xc607, 0xc607, 0xc607, - 0xc607, 0xc607, 0xc607, 0xc607, 0xc607, 0xc607, 0xc607, 0xc607, - 0xc607, 0xc607, 0xc607, 0xc607, 0xc608, 0xc608, 0xc608, 0xc608, - 0xc608, 0xc608, 0xc608, 0xc608, 0xc608, 0xc608, 0xc608, 0xc608, - 0xc608, 0xc608, 0xc608, 0xc608, 0xc608, 0xc609, 0xc609, 0xc609, - 0xc609, 0xc609, 0xc609, 0xc609, 0xc609, 0xc609, 0xc609, 0xc609, - 0xc609, 0xc609, 0xc609, 0xc609, 0xc609, 0xc609, 0xc609, 0xc60a, - 0xc60a, 0xc60a, 0xc60a, 0xc60a, 0xc60a, 0xc60a, 0xc60a, 0xc60a, - 0xc60a, 0xc60a, 0xc60a, 0xc60a, 0xc60a, 0xc60a, 0xc60a, 0xc60a, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -}; - - - -static unsigned int closestDataOffset[] = { - 0, 0, 1, 2, 4, 5, 7, 9, - 12, 13, 15, 17, 20, 22, 25, 28, - 32, 33, 35, 37, 40, 42, 45, 48, - 52, 54, 57, 60, 64, 67, 71, 75, - 80, 81, 83, 85, 88, 90, 93, 96, - 100, 102, 105, 108, 112, 115, 119, 123, - 128, 130, 133, 136, 140, 143, 147, 151, - 156, 159, 163, 167, 172, 176, 181, 186, - 192, 193, 195, 197, 200, 202, 205, 208, - 212, 214, 217, 220, 224, 227, 231, 235, - 240, 242, 245, 248, 252, 255, 259, 263, - 268, 271, 275, 279, 284, 288, 293, 298, - 304, 306, 309, 312, 316, 319, 323, 327, - 332, 335, 339, 343, 348, 352, 357, 362, - 368, 371, 375, 379, 384, 388, 393, 398, - 404, 408, 413, 418, 424, 429, 435, 441, - 448, 449, 451, 453, 456, 458, 461, 464, - 468, 470, 473, 476, 480, 483, 487, 491, - 496, 498, 501, 504, 508, 511, 515, 519, - 524, 527, 531, 535, 540, 544, 549, 554, - 560, 562, 565, 568, 572, 575, 579, 583, - 588, 591, 595, 599, 604, 608, 613, 618, - 624, 627, 631, 635, 640, 644, 649, 654, - 660, 664, 669, 674, 680, 685, 691, 697, - 704, 706, 709, 712, 716, 719, 723, 727, - 732, 735, 739, 743, 748, 752, 757, 762, - 768, 771, 775, 779, 784, 788, 793, 798, - 804, 808, 813, 818, 824, 829, 835, 841, - 848, 851, 855, 859, 864, 868, 873, 878, - 884, 888, 893, 898, 904, 909, 915, 921, - 928, 932, 937, 942, 948, 953, 959, 965, - 972, 977, 983, 989, 996, 1002, 1009, 1016, - 1024, 1025, 1027, 1029, 1032, 1034, 1037, 1040, - 1044, 1046, 1049, 1052, 1056, 1059, 1063, 1067, - 1072, 1074, 1077, 1080, 1084, 1087, 1091, 1095, - 1100, 1103, 1107, 1111, 1116, 1120, 1125, 1130, - 1136, 1138, 1141, 1144, 1148, 1151, 1155, 1159, - 1164, 1167, 1171, 1175, 1180, 1184, 1189, 1194, - 1200, 1203, 1207, 1211, 1216, 1220, 1225, 1230, - 1236, 1240, 1245, 1250, 1256, 1261, 1267, 1273, - 1280, 1282, 1285, 1288, 1292, 1295, 1299, 1303, - 1308, 1311, 1315, 1319, 1324, 1328, 1333, 1338, - 1344, 1347, 1351, 1355, 1360, 1364, 1369, 1374, - 1380, 1384, 1389, 1394, 1400, 1405, 1411, 1417, - 1424, 1427, 1431, 1435, 1440, 1444, 1449, 1454, - 1460, 1464, 1469, 1474, 1480, 1485, 1491, 1497, - 1504, 1508, 1513, 1518, 1524, 1529, 1535, 1541, - 1548, 1553, 1559, 1565, 1572, 1578, 1585, 1592, - 1600, 1602, 1605, 1608, 1612, 1615, 1619, 1623, - 1628, 1631, 1635, 1639, 1644, 1648, 1653, 1658, - 1664, 1667, 1671, 1675, 1680, 1684, 1689, 1694, - 1700, 1704, 1709, 1714, 1720, 1725, 1731, 1737, - 1744, 1747, 1751, 1755, 1760, 1764, 1769, 1774, - 1780, 1784, 1789, 1794, 1800, 1805, 1811, 1817, - 1824, 1828, 1833, 1838, 1844, 1849, 1855, 1861, - 1868, 1873, 1879, 1885, 1892, 1898, 1905, 1912, - 1920, 1923, 1927, 1931, 1936, 1940, 1945, 1950, - 1956, 1960, 1965, 1970, 1976, 1981, 1987, 1993, - 2000, 2004, 2009, 2014, 2020, 2025, 2031, 2037, - 2044, 2049, 2055, 2061, 2068, 2074, 2081, 2088, - 2096, 2100, 2105, 2110, 2116, 2121, 2127, 2133, - 2140, 2145, 2151, 2157, 2164, 2170, 2177, 2184, - 2192, 2197, 2203, 2209, 2216, 2222, 2229, 2236, - 2244, 2250, 2257, 2264, 2272, 2279, 2287, 2295, - 2304, 2305, 2307, 2309, 2312, 2314, 2317, 2320, - 2324, 2326, 2329, 2332, 2336, 2339, 2343, 2347, - 2352, 2354, 2357, 2360, 2364, 2367, 2371, 2375, - 2380, 2383, 2387, 2391, 2396, 2400, 2405, 2410, - 2416, 2418, 2421, 2424, 2428, 2431, 2435, 2439, - 2444, 2447, 2451, 2455, 2460, 2464, 2469, 2474, - 2480, 2483, 2487, 2491, 2496, 2500, 2505, 2510, - 2516, 2520, 2525, 2530, 2536, 2541, 2547, 2553, - 2560, 2562, 2565, 2568, 2572, 2575, 2579, 2583, - 2588, 2591, 2595, 2599, 2604, 2608, 2613, 2618, - 2624, 2627, 2631, 2635, 2640, 2644, 2649, 2654, - 2660, 2664, 2669, 2674, 2680, 2685, 2691, 2697, - 2704, 2707, 2711, 2715, 2720, 2724, 2729, 2734, - 2740, 2744, 2749, 2754, 2760, 2765, 2771, 2777, - 2784, 2788, 2793, 2798, 2804, 2809, 2815, 2821, - 2828, 2833, 2839, 2845, 2852, 2858, 2865, 2872, - 2880, 2882, 2885, 2888, 2892, 2895, 2899, 2903, - 2908, 2911, 2915, 2919, 2924, 2928, 2933, 2938, - 2944, 2947, 2951, 2955, 2960, 2964, 2969, 2974, - 2980, 2984, 2989, 2994, 3000, 3005, 3011, 3017, - 3024, 3027, 3031, 3035, 3040, 3044, 3049, 3054, - 3060, 3064, 3069, 3074, 3080, 3085, 3091, 3097, - 3104, 3108, 3113, 3118, 3124, 3129, 3135, 3141, - 3148, 3153, 3159, 3165, 3172, 3178, 3185, 3192, - 3200, 3203, 3207, 3211, 3216, 3220, 3225, 3230, - 3236, 3240, 3245, 3250, 3256, 3261, 3267, 3273, - 3280, 3284, 3289, 3294, 3300, 3305, 3311, 3317, - 3324, 3329, 3335, 3341, 3348, 3354, 3361, 3368, - 3376, 3380, 3385, 3390, 3396, 3401, 3407, 3413, - 3420, 3425, 3431, 3437, 3444, 3450, 3457, 3464, - 3472, 3477, 3483, 3489, 3496, 3502, 3509, 3516, - 3524, 3530, 3537, 3544, 3552, 3559, 3567, 3575, - 3584, 3586, 3589, 3592, 3596, 3599, 3603, 3607, - 3612, 3615, 3619, 3623, 3628, 3632, 3637, 3642, - 3648, 3651, 3655, 3659, 3664, 3668, 3673, 3678, - 3684, 3688, 3693, 3698, 3704, 3709, 3715, 3721, - 3728, 3731, 3735, 3739, 3744, 3748, 3753, 3758, - 3764, 3768, 3773, 3778, 3784, 3789, 3795, 3801, - 3808, 3812, 3817, 3822, 3828, 3833, 3839, 3845, - 3852, 3857, 3863, 3869, 3876, 3882, 3889, 3896, - 3904, 3907, 3911, 3915, 3920, 3924, 3929, 3934, - 3940, 3944, 3949, 3954, 3960, 3965, 3971, 3977, - 3984, 3988, 3993, 3998, 4004, 4009, 4015, 4021, - 4028, 4033, 4039, 4045, 4052, 4058, 4065, 4072, - 4080, 4084, 4089, 4094, 4100, 4105, 4111, 4117, - 4124, 4129, 4135, 4141, 4148, 4154, 4161, 4168, - 4176, 4181, 4187, 4193, 4200, 4206, 4213, 4220, - 4228, 4234, 4241, 4248, 4256, 4263, 4271, 4279, - 4288, 4291, 4295, 4299, 4304, 4308, 4313, 4318, - 4324, 4328, 4333, 4338, 4344, 4349, 4355, 4361, - 4368, 4372, 4377, 4382, 4388, 4393, 4399, 4405, - 4412, 4417, 4423, 4429, 4436, 4442, 4449, 4456, - 4464, 4468, 4473, 4478, 4484, 4489, 4495, 4501, - 4508, 4513, 4519, 4525, 4532, 4538, 4545, 4552, - 4560, 4565, 4571, 4577, 4584, 4590, 4597, 4604, - 4612, 4618, 4625, 4632, 4640, 4647, 4655, 4663, - 4672, 4676, 4681, 4686, 4692, 4697, 4703, 4709, - 4716, 4721, 4727, 4733, 4740, 4746, 4753, 4760, - 4768, 4773, 4779, 4785, 4792, 4798, 4805, 4812, - 4820, 4826, 4833, 4840, 4848, 4855, 4863, 4871, - 4880, 4885, 4891, 4897, 4904, 4910, 4917, 4924, - 4932, 4938, 4945, 4952, 4960, 4967, 4975, 4983, - 4992, 4998, 5005, 5012, 5020, 5027, 5035, 5043, - 5052, 5059, 5067, 5075, 5084, 5092, 5101, 5110, - 5120, 5121, 5123, 5125, 5128, 5130, 5133, 5136, - 5140, 5142, 5145, 5148, 5152, 5155, 5159, 5163, - 5168, 5170, 5173, 5176, 5180, 5183, 5187, 5191, - 5196, 5199, 5203, 5207, 5212, 5216, 5221, 5226, - 5232, 5234, 5237, 5240, 5244, 5247, 5251, 5255, - 5260, 5263, 5267, 5271, 5276, 5280, 5285, 5290, - 5296, 5299, 5303, 5307, 5312, 5316, 5321, 5326, - 5332, 5336, 5341, 5346, 5352, 5357, 5363, 5369, - 5376, 5378, 5381, 5384, 5388, 5391, 5395, 5399, - 5404, 5407, 5411, 5415, 5420, 5424, 5429, 5434, - 5440, 5443, 5447, 5451, 5456, 5460, 5465, 5470, - 5476, 5480, 5485, 5490, 5496, 5501, 5507, 5513, - 5520, 5523, 5527, 5531, 5536, 5540, 5545, 5550, - 5556, 5560, 5565, 5570, 5576, 5581, 5587, 5593, - 5600, 5604, 5609, 5614, 5620, 5625, 5631, 5637, - 5644, 5649, 5655, 5661, 5668, 5674, 5681, 5688, - 5696, 5698, 5701, 5704, 5708, 5711, 5715, 5719, - 5724, 5727, 5731, 5735, 5740, 5744, 5749, 5754, - 5760, 5763, 5767, 5771, 5776, 5780, 5785, 5790, - 5796, 5800, 5805, 5810, 5816, 5821, 5827, 5833, - 5840, 5843, 5847, 5851, 5856, 5860, 5865, 5870, - 5876, 5880, 5885, 5890, 5896, 5901, 5907, 5913, - 5920, 5924, 5929, 5934, 5940, 5945, 5951, 5957, - 5964, 5969, 5975, 5981, 5988, 5994, 6001, 6008, - 6016, 6019, 6023, 6027, 6032, 6036, 6041, 6046, - 6052, 6056, 6061, 6066, 6072, 6077, 6083, 6089, - 6096, 6100, 6105, 6110, 6116, 6121, 6127, 6133, - 6140, 6145, 6151, 6157, 6164, 6170, 6177, 6184, - 6192, 6196, 6201, 6206, 6212, 6217, 6223, 6229, - 6236, 6241, 6247, 6253, 6260, 6266, 6273, 6280, - 6288, 6293, 6299, 6305, 6312, 6318, 6325, 6332, - 6340, 6346, 6353, 6360, 6368, 6375, 6383, 6391, - 6400, 6402, 6405, 6408, 6412, 6415, 6419, 6423, - 6428, 6431, 6435, 6439, 6444, 6448, 6453, 6458, - 6464, 6467, 6471, 6475, 6480, 6484, 6489, 6494, - 6500, 6504, 6509, 6514, 6520, 6525, 6531, 6537, - 6544, 6547, 6551, 6555, 6560, 6564, 6569, 6574, - 6580, 6584, 6589, 6594, 6600, 6605, 6611, 6617, - 6624, 6628, 6633, 6638, 6644, 6649, 6655, 6661, - 6668, 6673, 6679, 6685, 6692, 6698, 6705, 6712, - 6720, 6723, 6727, 6731, 6736, 6740, 6745, 6750, - 6756, 6760, 6765, 6770, 6776, 6781, 6787, 6793, - 6800, 6804, 6809, 6814, 6820, 6825, 6831, 6837, - 6844, 6849, 6855, 6861, 6868, 6874, 6881, 6888, - 6896, 6900, 6905, 6910, 6916, 6921, 6927, 6933, - 6940, 6945, 6951, 6957, 6964, 6970, 6977, 6984, - 6992, 6997, 7003, 7009, 7016, 7022, 7029, 7036, - 7044, 7050, 7057, 7064, 7072, 7079, 7087, 7095, - 7104, 7107, 7111, 7115, 7120, 7124, 7129, 7134, - 7140, 7144, 7149, 7154, 7160, 7165, 7171, 7177, - 7184, 7188, 7193, 7198, 7204, 7209, 7215, 7221, - 7228, 7233, 7239, 7245, 7252, 7258, 7265, 7272, - 7280, 7284, 7289, 7294, 7300, 7305, 7311, 7317, - 7324, 7329, 7335, 7341, 7348, 7354, 7361, 7368, - 7376, 7381, 7387, 7393, 7400, 7406, 7413, 7420, - 7428, 7434, 7441, 7448, 7456, 7463, 7471, 7479, - 7488, 7492, 7497, 7502, 7508, 7513, 7519, 7525, - 7532, 7537, 7543, 7549, 7556, 7562, 7569, 7576, - 7584, 7589, 7595, 7601, 7608, 7614, 7621, 7628, - 7636, 7642, 7649, 7656, 7664, 7671, 7679, 7687, - 7696, 7701, 7707, 7713, 7720, 7726, 7733, 7740, - 7748, 7754, 7761, 7768, 7776, 7783, 7791, 7799, - 7808, 7814, 7821, 7828, 7836, 7843, 7851, 7859, - 7868, 7875, 7883, 7891, 7900, 7908, 7917, 7926, - 7936, 7938, 7941, 7944, 7948, 7951, 7955, 7959, - 7964, 7967, 7971, 7975, 7980, 7984, 7989, 7994, - 8000, 8003, 8007, 8011, 8016, 8020, 8025, 8030, - 8036, 8040, 8045, 8050, 8056, 8061, 8067, 8073, - 8080, 8083, 8087, 8091, 8096, 8100, 8105, 8110, - 8116, 8120, 8125, 8130, 8136, 8141, 8147, 8153, - 8160, 8164, 8169, 8174, 8180, 8185, 8191, 8197, - 8204, 8209, 8215, 8221, 8228, 8234, 8241, 8248, - 8256, 8259, 8263, 8267, 8272, 8276, 8281, 8286, - 8292, 8296, 8301, 8306, 8312, 8317, 8323, 8329, - 8336, 8340, 8345, 8350, 8356, 8361, 8367, 8373, - 8380, 8385, 8391, 8397, 8404, 8410, 8417, 8424, - 8432, 8436, 8441, 8446, 8452, 8457, 8463, 8469, - 8476, 8481, 8487, 8493, 8500, 8506, 8513, 8520, - 8528, 8533, 8539, 8545, 8552, 8558, 8565, 8572, - 8580, 8586, 8593, 8600, 8608, 8615, 8623, 8631, - 8640, 8643, 8647, 8651, 8656, 8660, 8665, 8670, - 8676, 8680, 8685, 8690, 8696, 8701, 8707, 8713, - 8720, 8724, 8729, 8734, 8740, 8745, 8751, 8757, - 8764, 8769, 8775, 8781, 8788, 8794, 8801, 8808, - 8816, 8820, 8825, 8830, 8836, 8841, 8847, 8853, - 8860, 8865, 8871, 8877, 8884, 8890, 8897, 8904, - 8912, 8917, 8923, 8929, 8936, 8942, 8949, 8956, - 8964, 8970, 8977, 8984, 8992, 8999, 9007, 9015, - 9024, 9028, 9033, 9038, 9044, 9049, 9055, 9061, - 9068, 9073, 9079, 9085, 9092, 9098, 9105, 9112, - 9120, 9125, 9131, 9137, 9144, 9150, 9157, 9164, - 9172, 9178, 9185, 9192, 9200, 9207, 9215, 9223, - 9232, 9237, 9243, 9249, 9256, 9262, 9269, 9276, - 9284, 9290, 9297, 9304, 9312, 9319, 9327, 9335, - 9344, 9350, 9357, 9364, 9372, 9379, 9387, 9395, - 9404, 9411, 9419, 9427, 9436, 9444, 9453, 9462, - 9472, 9475, 9479, 9483, 9488, 9492, 9497, 9502, - 9508, 9512, 9517, 9522, 9528, 9533, 9539, 9545, - 9552, 9556, 9561, 9566, 9572, 9577, 9583, 9589, - 9596, 9601, 9607, 9613, 9620, 9626, 9633, 9640, - 9648, 9652, 9657, 9662, 9668, 9673, 9679, 9685, - 9692, 9697, 9703, 9709, 9716, 9722, 9729, 9736, - 9744, 9749, 9755, 9761, 9768, 9774, 9781, 9788, - 9796, 9802, 9809, 9816, 9824, 9831, 9839, 9847, - 9856, 9860, 9865, 9870, 9876, 9881, 9887, 9893, - 9900, 9905, 9911, 9917, 9924, 9930, 9937, 9944, - 9952, 9957, 9963, 9969, 9976, 9982, 9989, 9996, - 10004, 10010, 10017, 10024, 10032, 10039, 10047, 10055, - 10064, 10069, 10075, 10081, 10088, 10094, 10101, 10108, - 10116, 10122, 10129, 10136, 10144, 10151, 10159, 10167, - 10176, 10182, 10189, 10196, 10204, 10211, 10219, 10227, - 10236, 10243, 10251, 10259, 10268, 10276, 10285, 10294, - 10304, 10308, 10313, 10318, 10324, 10329, 10335, 10341, - 10348, 10353, 10359, 10365, 10372, 10378, 10385, 10392, - 10400, 10405, 10411, 10417, 10424, 10430, 10437, 10444, - 10452, 10458, 10465, 10472, 10480, 10487, 10495, 10503, - 10512, 10517, 10523, 10529, 10536, 10542, 10549, 10556, - 10564, 10570, 10577, 10584, 10592, 10599, 10607, 10615, - 10624, 10630, 10637, 10644, 10652, 10659, 10667, 10675, - 10684, 10691, 10699, 10707, 10716, 10724, 10733, 10742, - 10752, 10757, 10763, 10769, 10776, 10782, 10789, 10796, - 10804, 10810, 10817, 10824, 10832, 10839, 10847, 10855, - 10864, 10870, 10877, 10884, 10892, 10899, 10907, 10915, - 10924, 10931, 10939, 10947, 10956, 10964, 10973, 10982, - 10992, 10998, 11005, 11012, 11020, 11027, 11035, 11043, - 11052, 11059, 11067, 11075, 11084, 11092, 11101, 11110, - 11120, 11127, 11135, 11143, 11152, 11160, 11169, 11178, - 11188, 11196, 11205, 11214, 11224, 11233, 11243, 11253, - 11264, 11265, 11267, 11269, 11272, 11274, 11277, 11280, - 11284, 11286, 11289, 11292, 11296, 11299, 11303, 11307, - 11312, 11314, 11317, 11320, 11324, 11327, 11331, 11335, - 11340, 11343, 11347, 11351, 11356, 11360, 11365, 11370, - 11376, 11378, 11381, 11384, 11388, 11391, 11395, 11399, - 11404, 11407, 11411, 11415, 11420, 11424, 11429, 11434, - 11440, 11443, 11447, 11451, 11456, 11460, 11465, 11470, - 11476, 11480, 11485, 11490, 11496, 11501, 11507, 11513, - 11520, 11522, 11525, 11528, 11532, 11535, 11539, 11543, - 11548, 11551, 11555, 11559, 11564, 11568, 11573, 11578, - 11584, 11587, 11591, 11595, 11600, 11604, 11609, 11614, - 11620, 11624, 11629, 11634, 11640, 11645, 11651, 11657, - 11664, 11667, 11671, 11675, 11680, 11684, 11689, 11694, - 11700, 11704, 11709, 11714, 11720, 11725, 11731, 11737, - 11744, 11748, 11753, 11758, 11764, 11769, 11775, 11781, - 11788, 11793, 11799, 11805, 11812, 11818, 11825, 11832, - 11840, 11842, 11845, 11848, 11852, 11855, 11859, 11863, - 11868, 11871, 11875, 11879, 11884, 11888, 11893, 11898, - 11904, 11907, 11911, 11915, 11920, 11924, 11929, 11934, - 11940, 11944, 11949, 11954, 11960, 11965, 11971, 11977, - 11984, 11987, 11991, 11995, 12000, 12004, 12009, 12014, - 12020, 12024, 12029, 12034, 12040, 12045, 12051, 12057, - 12064, 12068, 12073, 12078, 12084, 12089, 12095, 12101, - 12108, 12113, 12119, 12125, 12132, 12138, 12145, 12152, - 12160, 12163, 12167, 12171, 12176, 12180, 12185, 12190, - 12196, 12200, 12205, 12210, 12216, 12221, 12227, 12233, - 12240, 12244, 12249, 12254, 12260, 12265, 12271, 12277, - 12284, 12289, 12295, 12301, 12308, 12314, 12321, 12328, - 12336, 12340, 12345, 12350, 12356, 12361, 12367, 12373, - 12380, 12385, 12391, 12397, 12404, 12410, 12417, 12424, - 12432, 12437, 12443, 12449, 12456, 12462, 12469, 12476, - 12484, 12490, 12497, 12504, 12512, 12519, 12527, 12535, - 12544, 12546, 12549, 12552, 12556, 12559, 12563, 12567, - 12572, 12575, 12579, 12583, 12588, 12592, 12597, 12602, - 12608, 12611, 12615, 12619, 12624, 12628, 12633, 12638, - 12644, 12648, 12653, 12658, 12664, 12669, 12675, 12681, - 12688, 12691, 12695, 12699, 12704, 12708, 12713, 12718, - 12724, 12728, 12733, 12738, 12744, 12749, 12755, 12761, - 12768, 12772, 12777, 12782, 12788, 12793, 12799, 12805, - 12812, 12817, 12823, 12829, 12836, 12842, 12849, 12856, - 12864, 12867, 12871, 12875, 12880, 12884, 12889, 12894, - 12900, 12904, 12909, 12914, 12920, 12925, 12931, 12937, - 12944, 12948, 12953, 12958, 12964, 12969, 12975, 12981, - 12988, 12993, 12999, 13005, 13012, 13018, 13025, 13032, - 13040, 13044, 13049, 13054, 13060, 13065, 13071, 13077, - 13084, 13089, 13095, 13101, 13108, 13114, 13121, 13128, - 13136, 13141, 13147, 13153, 13160, 13166, 13173, 13180, - 13188, 13194, 13201, 13208, 13216, 13223, 13231, 13239, - 13248, 13251, 13255, 13259, 13264, 13268, 13273, 13278, - 13284, 13288, 13293, 13298, 13304, 13309, 13315, 13321, - 13328, 13332, 13337, 13342, 13348, 13353, 13359, 13365, - 13372, 13377, 13383, 13389, 13396, 13402, 13409, 13416, - 13424, 13428, 13433, 13438, 13444, 13449, 13455, 13461, - 13468, 13473, 13479, 13485, 13492, 13498, 13505, 13512, - 13520, 13525, 13531, 13537, 13544, 13550, 13557, 13564, - 13572, 13578, 13585, 13592, 13600, 13607, 13615, 13623, - 13632, 13636, 13641, 13646, 13652, 13657, 13663, 13669, - 13676, 13681, 13687, 13693, 13700, 13706, 13713, 13720, - 13728, 13733, 13739, 13745, 13752, 13758, 13765, 13772, - 13780, 13786, 13793, 13800, 13808, 13815, 13823, 13831, - 13840, 13845, 13851, 13857, 13864, 13870, 13877, 13884, - 13892, 13898, 13905, 13912, 13920, 13927, 13935, 13943, - 13952, 13958, 13965, 13972, 13980, 13987, 13995, 14003, - 14012, 14019, 14027, 14035, 14044, 14052, 14061, 14070, - 14080, 14082, 14085, 14088, 14092, 14095, 14099, 14103, - 14108, 14111, 14115, 14119, 14124, 14128, 14133, 14138, - 14144, 14147, 14151, 14155, 14160, 14164, 14169, 14174, - 14180, 14184, 14189, 14194, 14200, 14205, 14211, 14217, - 14224, 14227, 14231, 14235, 14240, 14244, 14249, 14254, - 14260, 14264, 14269, 14274, 14280, 14285, 14291, 14297, - 14304, 14308, 14313, 14318, 14324, 14329, 14335, 14341, - 14348, 14353, 14359, 14365, 14372, 14378, 14385, 14392, - 14400, 14403, 14407, 14411, 14416, 14420, 14425, 14430, - 14436, 14440, 14445, 14450, 14456, 14461, 14467, 14473, - 14480, 14484, 14489, 14494, 14500, 14505, 14511, 14517, - 14524, 14529, 14535, 14541, 14548, 14554, 14561, 14568, - 14576, 14580, 14585, 14590, 14596, 14601, 14607, 14613, - 14620, 14625, 14631, 14637, 14644, 14650, 14657, 14664, - 14672, 14677, 14683, 14689, 14696, 14702, 14709, 14716, - 14724, 14730, 14737, 14744, 14752, 14759, 14767, 14775, - 14784, 14787, 14791, 14795, 14800, 14804, 14809, 14814, - 14820, 14824, 14829, 14834, 14840, 14845, 14851, 14857, - 14864, 14868, 14873, 14878, 14884, 14889, 14895, 14901, - 14908, 14913, 14919, 14925, 14932, 14938, 14945, 14952, - 14960, 14964, 14969, 14974, 14980, 14985, 14991, 14997, - 15004, 15009, 15015, 15021, 15028, 15034, 15041, 15048, - 15056, 15061, 15067, 15073, 15080, 15086, 15093, 15100, - 15108, 15114, 15121, 15128, 15136, 15143, 15151, 15159, - 15168, 15172, 15177, 15182, 15188, 15193, 15199, 15205, - 15212, 15217, 15223, 15229, 15236, 15242, 15249, 15256, - 15264, 15269, 15275, 15281, 15288, 15294, 15301, 15308, - 15316, 15322, 15329, 15336, 15344, 15351, 15359, 15367, - 15376, 15381, 15387, 15393, 15400, 15406, 15413, 15420, - 15428, 15434, 15441, 15448, 15456, 15463, 15471, 15479, - 15488, 15494, 15501, 15508, 15516, 15523, 15531, 15539, - 15548, 15555, 15563, 15571, 15580, 15588, 15597, 15606, - 15616, 15619, 15623, 15627, 15632, 15636, 15641, 15646, - 15652, 15656, 15661, 15666, 15672, 15677, 15683, 15689, - 15696, 15700, 15705, 15710, 15716, 15721, 15727, 15733, - 15740, 15745, 15751, 15757, 15764, 15770, 15777, 15784, - 15792, 15796, 15801, 15806, 15812, 15817, 15823, 15829, - 15836, 15841, 15847, 15853, 15860, 15866, 15873, 15880, - 15888, 15893, 15899, 15905, 15912, 15918, 15925, 15932, - 15940, 15946, 15953, 15960, 15968, 15975, 15983, 15991, - 16000, 16004, 16009, 16014, 16020, 16025, 16031, 16037, - 16044, 16049, 16055, 16061, 16068, 16074, 16081, 16088, - 16096, 16101, 16107, 16113, 16120, 16126, 16133, 16140, - 16148, 16154, 16161, 16168, 16176, 16183, 16191, 16199, - 16208, 16213, 16219, 16225, 16232, 16238, 16245, 16252, - 16260, 16266, 16273, 16280, 16288, 16295, 16303, 16311, - 16320, 16326, 16333, 16340, 16348, 16355, 16363, 16371, - 16380, 16387, 16395, 16403, 16412, 16420, 16429, 16438, - 16448, 16452, 16457, 16462, 16468, 16473, 16479, 16485, - 16492, 16497, 16503, 16509, 16516, 16522, 16529, 16536, - 16544, 16549, 16555, 16561, 16568, 16574, 16581, 16588, - 16596, 16602, 16609, 16616, 16624, 16631, 16639, 16647, - 16656, 16661, 16667, 16673, 16680, 16686, 16693, 16700, - 16708, 16714, 16721, 16728, 16736, 16743, 16751, 16759, - 16768, 16774, 16781, 16788, 16796, 16803, 16811, 16819, - 16828, 16835, 16843, 16851, 16860, 16868, 16877, 16886, - 16896, 16901, 16907, 16913, 16920, 16926, 16933, 16940, - 16948, 16954, 16961, 16968, 16976, 16983, 16991, 16999, - 17008, 17014, 17021, 17028, 17036, 17043, 17051, 17059, - 17068, 17075, 17083, 17091, 17100, 17108, 17117, 17126, - 17136, 17142, 17149, 17156, 17164, 17171, 17179, 17187, - 17196, 17203, 17211, 17219, 17228, 17236, 17245, 17254, - 17264, 17271, 17279, 17287, 17296, 17304, 17313, 17322, - 17332, 17340, 17349, 17358, 17368, 17377, 17387, 17397, - 17408, 17410, 17413, 17416, 17420, 17423, 17427, 17431, - 17436, 17439, 17443, 17447, 17452, 17456, 17461, 17466, - 17472, 17475, 17479, 17483, 17488, 17492, 17497, 17502, - 17508, 17512, 17517, 17522, 17528, 17533, 17539, 17545, - 17552, 17555, 17559, 17563, 17568, 17572, 17577, 17582, - 17588, 17592, 17597, 17602, 17608, 17613, 17619, 17625, - 17632, 17636, 17641, 17646, 17652, 17657, 17663, 17669, - 17676, 17681, 17687, 17693, 17700, 17706, 17713, 17720, - 17728, 17731, 17735, 17739, 17744, 17748, 17753, 17758, - 17764, 17768, 17773, 17778, 17784, 17789, 17795, 17801, - 17808, 17812, 17817, 17822, 17828, 17833, 17839, 17845, - 17852, 17857, 17863, 17869, 17876, 17882, 17889, 17896, - 17904, 17908, 17913, 17918, 17924, 17929, 17935, 17941, - 17948, 17953, 17959, 17965, 17972, 17978, 17985, 17992, - 18000, 18005, 18011, 18017, 18024, 18030, 18037, 18044, - 18052, 18058, 18065, 18072, 18080, 18087, 18095, 18103, - 18112, 18115, 18119, 18123, 18128, 18132, 18137, 18142, - 18148, 18152, 18157, 18162, 18168, 18173, 18179, 18185, - 18192, 18196, 18201, 18206, 18212, 18217, 18223, 18229, - 18236, 18241, 18247, 18253, 18260, 18266, 18273, 18280, - 18288, 18292, 18297, 18302, 18308, 18313, 18319, 18325, - 18332, 18337, 18343, 18349, 18356, 18362, 18369, 18376, - 18384, 18389, 18395, 18401, 18408, 18414, 18421, 18428, - 18436, 18442, 18449, 18456, 18464, 18471, 18479, 18487, - 18496, 18500, 18505, 18510, 18516, 18521, 18527, 18533, - 18540, 18545, 18551, 18557, 18564, 18570, 18577, 18584, - 18592, 18597, 18603, 18609, 18616, 18622, 18629, 18636, - 18644, 18650, 18657, 18664, 18672, 18679, 18687, 18695, - 18704, 18709, 18715, 18721, 18728, 18734, 18741, 18748, - 18756, 18762, 18769, 18776, 18784, 18791, 18799, 18807, - 18816, 18822, 18829, 18836, 18844, 18851, 18859, 18867, - 18876, 18883, 18891, 18899, 18908, 18916, 18925, 18934, - 18944, 18947, 18951, 18955, 18960, 18964, 18969, 18974, - 18980, 18984, 18989, 18994, 19000, 19005, 19011, 19017, - 19024, 19028, 19033, 19038, 19044, 19049, 19055, 19061, - 19068, 19073, 19079, 19085, 19092, 19098, 19105, 19112, - 19120, 19124, 19129, 19134, 19140, 19145, 19151, 19157, - 19164, 19169, 19175, 19181, 19188, 19194, 19201, 19208, - 19216, 19221, 19227, 19233, 19240, 19246, 19253, 19260, - 19268, 19274, 19281, 19288, 19296, 19303, 19311, 19319, - 19328, 19332, 19337, 19342, 19348, 19353, 19359, 19365, - 19372, 19377, 19383, 19389, 19396, 19402, 19409, 19416, - 19424, 19429, 19435, 19441, 19448, 19454, 19461, 19468, - 19476, 19482, 19489, 19496, 19504, 19511, 19519, 19527, - 19536, 19541, 19547, 19553, 19560, 19566, 19573, 19580, - 19588, 19594, 19601, 19608, 19616, 19623, 19631, 19639, - 19648, 19654, 19661, 19668, 19676, 19683, 19691, 19699, - 19708, 19715, 19723, 19731, 19740, 19748, 19757, 19766, - 19776, 19780, 19785, 19790, 19796, 19801, 19807, 19813, - 19820, 19825, 19831, 19837, 19844, 19850, 19857, 19864, - 19872, 19877, 19883, 19889, 19896, 19902, 19909, 19916, - 19924, 19930, 19937, 19944, 19952, 19959, 19967, 19975, - 19984, 19989, 19995, 20001, 20008, 20014, 20021, 20028, - 20036, 20042, 20049, 20056, 20064, 20071, 20079, 20087, - 20096, 20102, 20109, 20116, 20124, 20131, 20139, 20147, - 20156, 20163, 20171, 20179, 20188, 20196, 20205, 20214, - 20224, 20229, 20235, 20241, 20248, 20254, 20261, 20268, - 20276, 20282, 20289, 20296, 20304, 20311, 20319, 20327, - 20336, 20342, 20349, 20356, 20364, 20371, 20379, 20387, - 20396, 20403, 20411, 20419, 20428, 20436, 20445, 20454, - 20464, 20470, 20477, 20484, 20492, 20499, 20507, 20515, - 20524, 20531, 20539, 20547, 20556, 20564, 20573, 20582, - 20592, 20599, 20607, 20615, 20624, 20632, 20641, 20650, - 20660, 20668, 20677, 20686, 20696, 20705, 20715, 20725, - 20736, 20739, 20743, 20747, 20752, 20756, 20761, 20766, - 20772, 20776, 20781, 20786, 20792, 20797, 20803, 20809, - 20816, 20820, 20825, 20830, 20836, 20841, 20847, 20853, - 20860, 20865, 20871, 20877, 20884, 20890, 20897, 20904, - 20912, 20916, 20921, 20926, 20932, 20937, 20943, 20949, - 20956, 20961, 20967, 20973, 20980, 20986, 20993, 21000, - 21008, 21013, 21019, 21025, 21032, 21038, 21045, 21052, - 21060, 21066, 21073, 21080, 21088, 21095, 21103, 21111, - 21120, 21124, 21129, 21134, 21140, 21145, 21151, 21157, - 21164, 21169, 21175, 21181, 21188, 21194, 21201, 21208, - 21216, 21221, 21227, 21233, 21240, 21246, 21253, 21260, - 21268, 21274, 21281, 21288, 21296, 21303, 21311, 21319, - 21328, 21333, 21339, 21345, 21352, 21358, 21365, 21372, - 21380, 21386, 21393, 21400, 21408, 21415, 21423, 21431, - 21440, 21446, 21453, 21460, 21468, 21475, 21483, 21491, - 21500, 21507, 21515, 21523, 21532, 21540, 21549, 21558, - 21568, 21572, 21577, 21582, 21588, 21593, 21599, 21605, - 21612, 21617, 21623, 21629, 21636, 21642, 21649, 21656, - 21664, 21669, 21675, 21681, 21688, 21694, 21701, 21708, - 21716, 21722, 21729, 21736, 21744, 21751, 21759, 21767, - 21776, 21781, 21787, 21793, 21800, 21806, 21813, 21820, - 21828, 21834, 21841, 21848, 21856, 21863, 21871, 21879, - 21888, 21894, 21901, 21908, 21916, 21923, 21931, 21939, - 21948, 21955, 21963, 21971, 21980, 21988, 21997, 22006, - 22016, 22021, 22027, 22033, 22040, 22046, 22053, 22060, - 22068, 22074, 22081, 22088, 22096, 22103, 22111, 22119, - 22128, 22134, 22141, 22148, 22156, 22163, 22171, 22179, - 22188, 22195, 22203, 22211, 22220, 22228, 22237, 22246, - 22256, 22262, 22269, 22276, 22284, 22291, 22299, 22307, - 22316, 22323, 22331, 22339, 22348, 22356, 22365, 22374, - 22384, 22391, 22399, 22407, 22416, 22424, 22433, 22442, - 22452, 22460, 22469, 22478, 22488, 22497, 22507, 22517, - 22528, 22532, 22537, 22542, 22548, 22553, 22559, 22565, - 22572, 22577, 22583, 22589, 22596, 22602, 22609, 22616, - 22624, 22629, 22635, 22641, 22648, 22654, 22661, 22668, - 22676, 22682, 22689, 22696, 22704, 22711, 22719, 22727, - 22736, 22741, 22747, 22753, 22760, 22766, 22773, 22780, - 22788, 22794, 22801, 22808, 22816, 22823, 22831, 22839, - 22848, 22854, 22861, 22868, 22876, 22883, 22891, 22899, - 22908, 22915, 22923, 22931, 22940, 22948, 22957, 22966, - 22976, 22981, 22987, 22993, 23000, 23006, 23013, 23020, - 23028, 23034, 23041, 23048, 23056, 23063, 23071, 23079, - 23088, 23094, 23101, 23108, 23116, 23123, 23131, 23139, - 23148, 23155, 23163, 23171, 23180, 23188, 23197, 23206, - 23216, 23222, 23229, 23236, 23244, 23251, 23259, 23267, - 23276, 23283, 23291, 23299, 23308, 23316, 23325, 23334, - 23344, 23351, 23359, 23367, 23376, 23384, 23393, 23402, - 23412, 23420, 23429, 23438, 23448, 23457, 23467, 23477, - 23488, 23493, 23499, 23505, 23512, 23518, 23525, 23532, - 23540, 23546, 23553, 23560, 23568, 23575, 23583, 23591, - 23600, 23606, 23613, 23620, 23628, 23635, 23643, 23651, - 23660, 23667, 23675, 23683, 23692, 23700, 23709, 23718, - 23728, 23734, 23741, 23748, 23756, 23763, 23771, 23779, - 23788, 23795, 23803, 23811, 23820, 23828, 23837, 23846, - 23856, 23863, 23871, 23879, 23888, 23896, 23905, 23914, - 23924, 23932, 23941, 23950, 23960, 23969, 23979, 23989, - 24000, 24006, 24013, 24020, 24028, 24035, 24043, 24051, - 24060, 24067, 24075, 24083, 24092, 24100, 24109, 24118, - 24128, 24135, 24143, 24151, 24160, 24168, 24177, 24186, - 24196, 24204, 24213, 24222, 24232, 24241, 24251, 24261, - 24272, 24279, 24287, 24295, 24304, 24312, 24321, 24330, - 24340, 24348, 24357, 24366, 24376, 24385, 24395, 24405, - 24416, 24424, 24433, 24442, 24452, 24461, 24471, 24481, - 24492, 24501, 24511, 24521, 24532, 24542, 24553, 24564, - 24576, 24577, 24579, 24581, 24584, 24586, 24589, 24592, - 24596, 24598, 24601, 24604, 24608, 24611, 24615, 24619, - 24624, 24626, 24629, 24632, 24636, 24639, 24643, 24647, - 24652, 24655, 24659, 24663, 24668, 24672, 24677, 24682, - 24688, 24690, 24693, 24696, 24700, 24703, 24707, 24711, - 24716, 24719, 24723, 24727, 24732, 24736, 24741, 24746, - 24752, 24755, 24759, 24763, 24768, 24772, 24777, 24782, - 24788, 24792, 24797, 24802, 24808, 24813, 24819, 24825, - 24832, 24834, 24837, 24840, 24844, 24847, 24851, 24855, - 24860, 24863, 24867, 24871, 24876, 24880, 24885, 24890, - 24896, 24899, 24903, 24907, 24912, 24916, 24921, 24926, - 24932, 24936, 24941, 24946, 24952, 24957, 24963, 24969, - 24976, 24979, 24983, 24987, 24992, 24996, 25001, 25006, - 25012, 25016, 25021, 25026, 25032, 25037, 25043, 25049, - 25056, 25060, 25065, 25070, 25076, 25081, 25087, 25093, - 25100, 25105, 25111, 25117, 25124, 25130, 25137, 25144, - 25152, 25154, 25157, 25160, 25164, 25167, 25171, 25175, - 25180, 25183, 25187, 25191, 25196, 25200, 25205, 25210, - 25216, 25219, 25223, 25227, 25232, 25236, 25241, 25246, - 25252, 25256, 25261, 25266, 25272, 25277, 25283, 25289, - 25296, 25299, 25303, 25307, 25312, 25316, 25321, 25326, - 25332, 25336, 25341, 25346, 25352, 25357, 25363, 25369, - 25376, 25380, 25385, 25390, 25396, 25401, 25407, 25413, - 25420, 25425, 25431, 25437, 25444, 25450, 25457, 25464, - 25472, 25475, 25479, 25483, 25488, 25492, 25497, 25502, - 25508, 25512, 25517, 25522, 25528, 25533, 25539, 25545, - 25552, 25556, 25561, 25566, 25572, 25577, 25583, 25589, - 25596, 25601, 25607, 25613, 25620, 25626, 25633, 25640, - 25648, 25652, 25657, 25662, 25668, 25673, 25679, 25685, - 25692, 25697, 25703, 25709, 25716, 25722, 25729, 25736, - 25744, 25749, 25755, 25761, 25768, 25774, 25781, 25788, - 25796, 25802, 25809, 25816, 25824, 25831, 25839, 25847, - 25856, 25858, 25861, 25864, 25868, 25871, 25875, 25879, - 25884, 25887, 25891, 25895, 25900, 25904, 25909, 25914, - 25920, 25923, 25927, 25931, 25936, 25940, 25945, 25950, - 25956, 25960, 25965, 25970, 25976, 25981, 25987, 25993, - 26000, 26003, 26007, 26011, 26016, 26020, 26025, 26030, - 26036, 26040, 26045, 26050, 26056, 26061, 26067, 26073, - 26080, 26084, 26089, 26094, 26100, 26105, 26111, 26117, - 26124, 26129, 26135, 26141, 26148, 26154, 26161, 26168, - 26176, 26179, 26183, 26187, 26192, 26196, 26201, 26206, - 26212, 26216, 26221, 26226, 26232, 26237, 26243, 26249, - 26256, 26260, 26265, 26270, 26276, 26281, 26287, 26293, - 26300, 26305, 26311, 26317, 26324, 26330, 26337, 26344, - 26352, 26356, 26361, 26366, 26372, 26377, 26383, 26389, - 26396, 26401, 26407, 26413, 26420, 26426, 26433, 26440, - 26448, 26453, 26459, 26465, 26472, 26478, 26485, 26492, - 26500, 26506, 26513, 26520, 26528, 26535, 26543, 26551, - 26560, 26563, 26567, 26571, 26576, 26580, 26585, 26590, - 26596, 26600, 26605, 26610, 26616, 26621, 26627, 26633, - 26640, 26644, 26649, 26654, 26660, 26665, 26671, 26677, - 26684, 26689, 26695, 26701, 26708, 26714, 26721, 26728, - 26736, 26740, 26745, 26750, 26756, 26761, 26767, 26773, - 26780, 26785, 26791, 26797, 26804, 26810, 26817, 26824, - 26832, 26837, 26843, 26849, 26856, 26862, 26869, 26876, - 26884, 26890, 26897, 26904, 26912, 26919, 26927, 26935, - 26944, 26948, 26953, 26958, 26964, 26969, 26975, 26981, - 26988, 26993, 26999, 27005, 27012, 27018, 27025, 27032, - 27040, 27045, 27051, 27057, 27064, 27070, 27077, 27084, - 27092, 27098, 27105, 27112, 27120, 27127, 27135, 27143, - 27152, 27157, 27163, 27169, 27176, 27182, 27189, 27196, - 27204, 27210, 27217, 27224, 27232, 27239, 27247, 27255, - 27264, 27270, 27277, 27284, 27292, 27299, 27307, 27315, - 27324, 27331, 27339, 27347, 27356, 27364, 27373, 27382, - 27392, 27394, 27397, 27400, 27404, 27407, 27411, 27415, - 27420, 27423, 27427, 27431, 27436, 27440, 27445, 27450, - 27456, 27459, 27463, 27467, 27472, 27476, 27481, 27486, - 27492, 27496, 27501, 27506, 27512, 27517, 27523, 27529, - 27536, 27539, 27543, 27547, 27552, 27556, 27561, 27566, - 27572, 27576, 27581, 27586, 27592, 27597, 27603, 27609, - 27616, 27620, 27625, 27630, 27636, 27641, 27647, 27653, - 27660, 27665, 27671, 27677, 27684, 27690, 27697, 27704, - 27712, 27715, 27719, 27723, 27728, 27732, 27737, 27742, - 27748, 27752, 27757, 27762, 27768, 27773, 27779, 27785, - 27792, 27796, 27801, 27806, 27812, 27817, 27823, 27829, - 27836, 27841, 27847, 27853, 27860, 27866, 27873, 27880, - 27888, 27892, 27897, 27902, 27908, 27913, 27919, 27925, - 27932, 27937, 27943, 27949, 27956, 27962, 27969, 27976, - 27984, 27989, 27995, 28001, 28008, 28014, 28021, 28028, - 28036, 28042, 28049, 28056, 28064, 28071, 28079, 28087, - 28096, 28099, 28103, 28107, 28112, 28116, 28121, 28126, - 28132, 28136, 28141, 28146, 28152, 28157, 28163, 28169, - 28176, 28180, 28185, 28190, 28196, 28201, 28207, 28213, - 28220, 28225, 28231, 28237, 28244, 28250, 28257, 28264, - 28272, 28276, 28281, 28286, 28292, 28297, 28303, 28309, - 28316, 28321, 28327, 28333, 28340, 28346, 28353, 28360, - 28368, 28373, 28379, 28385, 28392, 28398, 28405, 28412, - 28420, 28426, 28433, 28440, 28448, 28455, 28463, 28471, - 28480, 28484, 28489, 28494, 28500, 28505, 28511, 28517, - 28524, 28529, 28535, 28541, 28548, 28554, 28561, 28568, - 28576, 28581, 28587, 28593, 28600, 28606, 28613, 28620, - 28628, 28634, 28641, 28648, 28656, 28663, 28671, 28679, - 28688, 28693, 28699, 28705, 28712, 28718, 28725, 28732, - 28740, 28746, 28753, 28760, 28768, 28775, 28783, 28791, - 28800, 28806, 28813, 28820, 28828, 28835, 28843, 28851, - 28860, 28867, 28875, 28883, 28892, 28900, 28909, 28918, - 28928, 28931, 28935, 28939, 28944, 28948, 28953, 28958, - 28964, 28968, 28973, 28978, 28984, 28989, 28995, 29001, - 29008, 29012, 29017, 29022, 29028, 29033, 29039, 29045, - 29052, 29057, 29063, 29069, 29076, 29082, 29089, 29096, - 29104, 29108, 29113, 29118, 29124, 29129, 29135, 29141, - 29148, 29153, 29159, 29165, 29172, 29178, 29185, 29192, - 29200, 29205, 29211, 29217, 29224, 29230, 29237, 29244, - 29252, 29258, 29265, 29272, 29280, 29287, 29295, 29303, - 29312, 29316, 29321, 29326, 29332, 29337, 29343, 29349, - 29356, 29361, 29367, 29373, 29380, 29386, 29393, 29400, - 29408, 29413, 29419, 29425, 29432, 29438, 29445, 29452, - 29460, 29466, 29473, 29480, 29488, 29495, 29503, 29511, - 29520, 29525, 29531, 29537, 29544, 29550, 29557, 29564, - 29572, 29578, 29585, 29592, 29600, 29607, 29615, 29623, - 29632, 29638, 29645, 29652, 29660, 29667, 29675, 29683, - 29692, 29699, 29707, 29715, 29724, 29732, 29741, 29750, - 29760, 29764, 29769, 29774, 29780, 29785, 29791, 29797, - 29804, 29809, 29815, 29821, 29828, 29834, 29841, 29848, - 29856, 29861, 29867, 29873, 29880, 29886, 29893, 29900, - 29908, 29914, 29921, 29928, 29936, 29943, 29951, 29959, - 29968, 29973, 29979, 29985, 29992, 29998, 30005, 30012, - 30020, 30026, 30033, 30040, 30048, 30055, 30063, 30071, - 30080, 30086, 30093, 30100, 30108, 30115, 30123, 30131, - 30140, 30147, 30155, 30163, 30172, 30180, 30189, 30198, - 30208, 30213, 30219, 30225, 30232, 30238, 30245, 30252, - 30260, 30266, 30273, 30280, 30288, 30295, 30303, 30311, - 30320, 30326, 30333, 30340, 30348, 30355, 30363, 30371, - 30380, 30387, 30395, 30403, 30412, 30420, 30429, 30438, - 30448, 30454, 30461, 30468, 30476, 30483, 30491, 30499, - 30508, 30515, 30523, 30531, 30540, 30548, 30557, 30566, - 30576, 30583, 30591, 30599, 30608, 30616, 30625, 30634, - 30644, 30652, 30661, 30670, 30680, 30689, 30699, 30709, - 30720, 30722, 30725, 30728, 30732, 30735, 30739, 30743, - 30748, 30751, 30755, 30759, 30764, 30768, 30773, 30778, - 30784, 30787, 30791, 30795, 30800, 30804, 30809, 30814, - 30820, 30824, 30829, 30834, 30840, 30845, 30851, 30857, - 30864, 30867, 30871, 30875, 30880, 30884, 30889, 30894, - 30900, 30904, 30909, 30914, 30920, 30925, 30931, 30937, - 30944, 30948, 30953, 30958, 30964, 30969, 30975, 30981, - 30988, 30993, 30999, 31005, 31012, 31018, 31025, 31032, - 31040, 31043, 31047, 31051, 31056, 31060, 31065, 31070, - 31076, 31080, 31085, 31090, 31096, 31101, 31107, 31113, - 31120, 31124, 31129, 31134, 31140, 31145, 31151, 31157, - 31164, 31169, 31175, 31181, 31188, 31194, 31201, 31208, - 31216, 31220, 31225, 31230, 31236, 31241, 31247, 31253, - 31260, 31265, 31271, 31277, 31284, 31290, 31297, 31304, - 31312, 31317, 31323, 31329, 31336, 31342, 31349, 31356, - 31364, 31370, 31377, 31384, 31392, 31399, 31407, 31415, - 31424, 31427, 31431, 31435, 31440, 31444, 31449, 31454, - 31460, 31464, 31469, 31474, 31480, 31485, 31491, 31497, - 31504, 31508, 31513, 31518, 31524, 31529, 31535, 31541, - 31548, 31553, 31559, 31565, 31572, 31578, 31585, 31592, - 31600, 31604, 31609, 31614, 31620, 31625, 31631, 31637, - 31644, 31649, 31655, 31661, 31668, 31674, 31681, 31688, - 31696, 31701, 31707, 31713, 31720, 31726, 31733, 31740, - 31748, 31754, 31761, 31768, 31776, 31783, 31791, 31799, - 31808, 31812, 31817, 31822, 31828, 31833, 31839, 31845, - 31852, 31857, 31863, 31869, 31876, 31882, 31889, 31896, - 31904, 31909, 31915, 31921, 31928, 31934, 31941, 31948, - 31956, 31962, 31969, 31976, 31984, 31991, 31999, 32007, - 32016, 32021, 32027, 32033, 32040, 32046, 32053, 32060, - 32068, 32074, 32081, 32088, 32096, 32103, 32111, 32119, - 32128, 32134, 32141, 32148, 32156, 32163, 32171, 32179, - 32188, 32195, 32203, 32211, 32220, 32228, 32237, 32246, - 32256, 32259, 32263, 32267, 32272, 32276, 32281, 32286, - 32292, 32296, 32301, 32306, 32312, 32317, 32323, 32329, - 32336, 32340, 32345, 32350, 32356, 32361, 32367, 32373, - 32380, 32385, 32391, 32397, 32404, 32410, 32417, 32424, - 32432, 32436, 32441, 32446, 32452, 32457, 32463, 32469, - 32476, 32481, 32487, 32493, 32500, 32506, 32513, 32520, - 32528, 32533, 32539, 32545, 32552, 32558, 32565, 32572, - 32580, 32586, 32593, 32600, 32608, 32615, 32623, 32631, - 32640, 32644, 32649, 32654, 32660, 32665, 32671, 32677, - 32684, 32689, 32695, 32701, 32708, 32714, 32721, 32728, - 32736, 32741, 32747, 32753, 32760, 32766, 32773, 32780, - 32788, 32794, 32801, 32808, 32816, 32823, 32831, 32839, - 32848, 32853, 32859, 32865, 32872, 32878, 32885, 32892, - 32900, 32906, 32913, 32920, 32928, 32935, 32943, 32951, - 32960, 32966, 32973, 32980, 32988, 32995, 33003, 33011, - 33020, 33027, 33035, 33043, 33052, 33060, 33069, 33078, - 33088, 33092, 33097, 33102, 33108, 33113, 33119, 33125, - 33132, 33137, 33143, 33149, 33156, 33162, 33169, 33176, - 33184, 33189, 33195, 33201, 33208, 33214, 33221, 33228, - 33236, 33242, 33249, 33256, 33264, 33271, 33279, 33287, - 33296, 33301, 33307, 33313, 33320, 33326, 33333, 33340, - 33348, 33354, 33361, 33368, 33376, 33383, 33391, 33399, - 33408, 33414, 33421, 33428, 33436, 33443, 33451, 33459, - 33468, 33475, 33483, 33491, 33500, 33508, 33517, 33526, - 33536, 33541, 33547, 33553, 33560, 33566, 33573, 33580, - 33588, 33594, 33601, 33608, 33616, 33623, 33631, 33639, - 33648, 33654, 33661, 33668, 33676, 33683, 33691, 33699, - 33708, 33715, 33723, 33731, 33740, 33748, 33757, 33766, - 33776, 33782, 33789, 33796, 33804, 33811, 33819, 33827, - 33836, 33843, 33851, 33859, 33868, 33876, 33885, 33894, - 33904, 33911, 33919, 33927, 33936, 33944, 33953, 33962, - 33972, 33980, 33989, 33998, 34008, 34017, 34027, 34037, - 34048, 34051, 34055, 34059, 34064, 34068, 34073, 34078, - 34084, 34088, 34093, 34098, 34104, 34109, 34115, 34121, - 34128, 34132, 34137, 34142, 34148, 34153, 34159, 34165, - 34172, 34177, 34183, 34189, 34196, 34202, 34209, 34216, - 34224, 34228, 34233, 34238, 34244, 34249, 34255, 34261, - 34268, 34273, 34279, 34285, 34292, 34298, 34305, 34312, - 34320, 34325, 34331, 34337, 34344, 34350, 34357, 34364, - 34372, 34378, 34385, 34392, 34400, 34407, 34415, 34423, - 34432, 34436, 34441, 34446, 34452, 34457, 34463, 34469, - 34476, 34481, 34487, 34493, 34500, 34506, 34513, 34520, - 34528, 34533, 34539, 34545, 34552, 34558, 34565, 34572, - 34580, 34586, 34593, 34600, 34608, 34615, 34623, 34631, - 34640, 34645, 34651, 34657, 34664, 34670, 34677, 34684, - 34692, 34698, 34705, 34712, 34720, 34727, 34735, 34743, - 34752, 34758, 34765, 34772, 34780, 34787, 34795, 34803, - 34812, 34819, 34827, 34835, 34844, 34852, 34861, 34870, - 34880, 34884, 34889, 34894, 34900, 34905, 34911, 34917, - 34924, 34929, 34935, 34941, 34948, 34954, 34961, 34968, - 34976, 34981, 34987, 34993, 35000, 35006, 35013, 35020, - 35028, 35034, 35041, 35048, 35056, 35063, 35071, 35079, - 35088, 35093, 35099, 35105, 35112, 35118, 35125, 35132, - 35140, 35146, 35153, 35160, 35168, 35175, 35183, 35191, - 35200, 35206, 35213, 35220, 35228, 35235, 35243, 35251, - 35260, 35267, 35275, 35283, 35292, 35300, 35309, 35318, - 35328, 35333, 35339, 35345, 35352, 35358, 35365, 35372, - 35380, 35386, 35393, 35400, 35408, 35415, 35423, 35431, - 35440, 35446, 35453, 35460, 35468, 35475, 35483, 35491, - 35500, 35507, 35515, 35523, 35532, 35540, 35549, 35558, - 35568, 35574, 35581, 35588, 35596, 35603, 35611, 35619, - 35628, 35635, 35643, 35651, 35660, 35668, 35677, 35686, - 35696, 35703, 35711, 35719, 35728, 35736, 35745, 35754, - 35764, 35772, 35781, 35790, 35800, 35809, 35819, 35829, - 35840, 35844, 35849, 35854, 35860, 35865, 35871, 35877, - 35884, 35889, 35895, 35901, 35908, 35914, 35921, 35928, - 35936, 35941, 35947, 35953, 35960, 35966, 35973, 35980, - 35988, 35994, 36001, 36008, 36016, 36023, 36031, 36039, - 36048, 36053, 36059, 36065, 36072, 36078, 36085, 36092, - 36100, 36106, 36113, 36120, 36128, 36135, 36143, 36151, - 36160, 36166, 36173, 36180, 36188, 36195, 36203, 36211, - 36220, 36227, 36235, 36243, 36252, 36260, 36269, 36278, - 36288, 36293, 36299, 36305, 36312, 36318, 36325, 36332, - 36340, 36346, 36353, 36360, 36368, 36375, 36383, 36391, - 36400, 36406, 36413, 36420, 36428, 36435, 36443, 36451, - 36460, 36467, 36475, 36483, 36492, 36500, 36509, 36518, - 36528, 36534, 36541, 36548, 36556, 36563, 36571, 36579, - 36588, 36595, 36603, 36611, 36620, 36628, 36637, 36646, - 36656, 36663, 36671, 36679, 36688, 36696, 36705, 36714, - 36724, 36732, 36741, 36750, 36760, 36769, 36779, 36789, - 36800, 36805, 36811, 36817, 36824, 36830, 36837, 36844, - 36852, 36858, 36865, 36872, 36880, 36887, 36895, 36903, - 36912, 36918, 36925, 36932, 36940, 36947, 36955, 36963, - 36972, 36979, 36987, 36995, 37004, 37012, 37021, 37030, - 37040, 37046, 37053, 37060, 37068, 37075, 37083, 37091, - 37100, 37107, 37115, 37123, 37132, 37140, 37149, 37158, - 37168, 37175, 37183, 37191, 37200, 37208, 37217, 37226, - 37236, 37244, 37253, 37262, 37272, 37281, 37291, 37301, - 37312, 37318, 37325, 37332, 37340, 37347, 37355, 37363, - 37372, 37379, 37387, 37395, 37404, 37412, 37421, 37430, - 37440, 37447, 37455, 37463, 37472, 37480, 37489, 37498, - 37508, 37516, 37525, 37534, 37544, 37553, 37563, 37573, - 37584, 37591, 37599, 37607, 37616, 37624, 37633, 37642, - 37652, 37660, 37669, 37678, 37688, 37697, 37707, 37717, - 37728, 37736, 37745, 37754, 37764, 37773, 37783, 37793, - 37804, 37813, 37823, 37833, 37844, 37854, 37865, 37876, - 37888, 37890, 37893, 37896, 37900, 37903, 37907, 37911, - 37916, 37919, 37923, 37927, 37932, 37936, 37941, 37946, - 37952, 37955, 37959, 37963, 37968, 37972, 37977, 37982, - 37988, 37992, 37997, 38002, 38008, 38013, 38019, 38025, - 38032, 38035, 38039, 38043, 38048, 38052, 38057, 38062, - 38068, 38072, 38077, 38082, 38088, 38093, 38099, 38105, - 38112, 38116, 38121, 38126, 38132, 38137, 38143, 38149, - 38156, 38161, 38167, 38173, 38180, 38186, 38193, 38200, - 38208, 38211, 38215, 38219, 38224, 38228, 38233, 38238, - 38244, 38248, 38253, 38258, 38264, 38269, 38275, 38281, - 38288, 38292, 38297, 38302, 38308, 38313, 38319, 38325, - 38332, 38337, 38343, 38349, 38356, 38362, 38369, 38376, - 38384, 38388, 38393, 38398, 38404, 38409, 38415, 38421, - 38428, 38433, 38439, 38445, 38452, 38458, 38465, 38472, - 38480, 38485, 38491, 38497, 38504, 38510, 38517, 38524, - 38532, 38538, 38545, 38552, 38560, 38567, 38575, 38583, - 38592, 38595, 38599, 38603, 38608, 38612, 38617, 38622, - 38628, 38632, 38637, 38642, 38648, 38653, 38659, 38665, - 38672, 38676, 38681, 38686, 38692, 38697, 38703, 38709, - 38716, 38721, 38727, 38733, 38740, 38746, 38753, 38760, - 38768, 38772, 38777, 38782, 38788, 38793, 38799, 38805, - 38812, 38817, 38823, 38829, 38836, 38842, 38849, 38856, - 38864, 38869, 38875, 38881, 38888, 38894, 38901, 38908, - 38916, 38922, 38929, 38936, 38944, 38951, 38959, 38967, - 38976, 38980, 38985, 38990, 38996, 39001, 39007, 39013, - 39020, 39025, 39031, 39037, 39044, 39050, 39057, 39064, - 39072, 39077, 39083, 39089, 39096, 39102, 39109, 39116, - 39124, 39130, 39137, 39144, 39152, 39159, 39167, 39175, - 39184, 39189, 39195, 39201, 39208, 39214, 39221, 39228, - 39236, 39242, 39249, 39256, 39264, 39271, 39279, 39287, - 39296, 39302, 39309, 39316, 39324, 39331, 39339, 39347, - 39356, 39363, 39371, 39379, 39388, 39396, 39405, 39414, - 39424, 39427, 39431, 39435, 39440, 39444, 39449, 39454, - 39460, 39464, 39469, 39474, 39480, 39485, 39491, 39497, - 39504, 39508, 39513, 39518, 39524, 39529, 39535, 39541, - 39548, 39553, 39559, 39565, 39572, 39578, 39585, 39592, - 39600, 39604, 39609, 39614, 39620, 39625, 39631, 39637, - 39644, 39649, 39655, 39661, 39668, 39674, 39681, 39688, - 39696, 39701, 39707, 39713, 39720, 39726, 39733, 39740, - 39748, 39754, 39761, 39768, 39776, 39783, 39791, 39799, - 39808, 39812, 39817, 39822, 39828, 39833, 39839, 39845, - 39852, 39857, 39863, 39869, 39876, 39882, 39889, 39896, - 39904, 39909, 39915, 39921, 39928, 39934, 39941, 39948, - 39956, 39962, 39969, 39976, 39984, 39991, 39999, 40007, - 40016, 40021, 40027, 40033, 40040, 40046, 40053, 40060, - 40068, 40074, 40081, 40088, 40096, 40103, 40111, 40119, - 40128, 40134, 40141, 40148, 40156, 40163, 40171, 40179, - 40188, 40195, 40203, 40211, 40220, 40228, 40237, 40246, - 40256, 40260, 40265, 40270, 40276, 40281, 40287, 40293, - 40300, 40305, 40311, 40317, 40324, 40330, 40337, 40344, - 40352, 40357, 40363, 40369, 40376, 40382, 40389, 40396, - 40404, 40410, 40417, 40424, 40432, 40439, 40447, 40455, - 40464, 40469, 40475, 40481, 40488, 40494, 40501, 40508, - 40516, 40522, 40529, 40536, 40544, 40551, 40559, 40567, - 40576, 40582, 40589, 40596, 40604, 40611, 40619, 40627, - 40636, 40643, 40651, 40659, 40668, 40676, 40685, 40694, - 40704, 40709, 40715, 40721, 40728, 40734, 40741, 40748, - 40756, 40762, 40769, 40776, 40784, 40791, 40799, 40807, - 40816, 40822, 40829, 40836, 40844, 40851, 40859, 40867, - 40876, 40883, 40891, 40899, 40908, 40916, 40925, 40934, - 40944, 40950, 40957, 40964, 40972, 40979, 40987, 40995, - 41004, 41011, 41019, 41027, 41036, 41044, 41053, 41062, - 41072, 41079, 41087, 41095, 41104, 41112, 41121, 41130, - 41140, 41148, 41157, 41166, 41176, 41185, 41195, 41205, - 41216, 41219, 41223, 41227, 41232, 41236, 41241, 41246, - 41252, 41256, 41261, 41266, 41272, 41277, 41283, 41289, - 41296, 41300, 41305, 41310, 41316, 41321, 41327, 41333, - 41340, 41345, 41351, 41357, 41364, 41370, 41377, 41384, - 41392, 41396, 41401, 41406, 41412, 41417, 41423, 41429, - 41436, 41441, 41447, 41453, 41460, 41466, 41473, 41480, - 41488, 41493, 41499, 41505, 41512, 41518, 41525, 41532, - 41540, 41546, 41553, 41560, 41568, 41575, 41583, 41591, - 41600, 41604, 41609, 41614, 41620, 41625, 41631, 41637, - 41644, 41649, 41655, 41661, 41668, 41674, 41681, 41688, - 41696, 41701, 41707, 41713, 41720, 41726, 41733, 41740, - 41748, 41754, 41761, 41768, 41776, 41783, 41791, 41799, - 41808, 41813, 41819, 41825, 41832, 41838, 41845, 41852, - 41860, 41866, 41873, 41880, 41888, 41895, 41903, 41911, - 41920, 41926, 41933, 41940, 41948, 41955, 41963, 41971, - 41980, 41987, 41995, 42003, 42012, 42020, 42029, 42038, - 42048, 42052, 42057, 42062, 42068, 42073, 42079, 42085, - 42092, 42097, 42103, 42109, 42116, 42122, 42129, 42136, - 42144, 42149, 42155, 42161, 42168, 42174, 42181, 42188, - 42196, 42202, 42209, 42216, 42224, 42231, 42239, 42247, - 42256, 42261, 42267, 42273, 42280, 42286, 42293, 42300, - 42308, 42314, 42321, 42328, 42336, 42343, 42351, 42359, - 42368, 42374, 42381, 42388, 42396, 42403, 42411, 42419, - 42428, 42435, 42443, 42451, 42460, 42468, 42477, 42486, - 42496, 42501, 42507, 42513, 42520, 42526, 42533, 42540, - 42548, 42554, 42561, 42568, 42576, 42583, 42591, 42599, - 42608, 42614, 42621, 42628, 42636, 42643, 42651, 42659, - 42668, 42675, 42683, 42691, 42700, 42708, 42717, 42726, - 42736, 42742, 42749, 42756, 42764, 42771, 42779, 42787, - 42796, 42803, 42811, 42819, 42828, 42836, 42845, 42854, - 42864, 42871, 42879, 42887, 42896, 42904, 42913, 42922, - 42932, 42940, 42949, 42958, 42968, 42977, 42987, 42997, - 43008, 43012, 43017, 43022, 43028, 43033, 43039, 43045, - 43052, 43057, 43063, 43069, 43076, 43082, 43089, 43096, - 43104, 43109, 43115, 43121, 43128, 43134, 43141, 43148, - 43156, 43162, 43169, 43176, 43184, 43191, 43199, 43207, - 43216, 43221, 43227, 43233, 43240, 43246, 43253, 43260, - 43268, 43274, 43281, 43288, 43296, 43303, 43311, 43319, - 43328, 43334, 43341, 43348, 43356, 43363, 43371, 43379, - 43388, 43395, 43403, 43411, 43420, 43428, 43437, 43446, - 43456, 43461, 43467, 43473, 43480, 43486, 43493, 43500, - 43508, 43514, 43521, 43528, 43536, 43543, 43551, 43559, - 43568, 43574, 43581, 43588, 43596, 43603, 43611, 43619, - 43628, 43635, 43643, 43651, 43660, 43668, 43677, 43686, - 43696, 43702, 43709, 43716, 43724, 43731, 43739, 43747, - 43756, 43763, 43771, 43779, 43788, 43796, 43805, 43814, - 43824, 43831, 43839, 43847, 43856, 43864, 43873, 43882, - 43892, 43900, 43909, 43918, 43928, 43937, 43947, 43957, - 43968, 43973, 43979, 43985, 43992, 43998, 44005, 44012, - 44020, 44026, 44033, 44040, 44048, 44055, 44063, 44071, - 44080, 44086, 44093, 44100, 44108, 44115, 44123, 44131, - 44140, 44147, 44155, 44163, 44172, 44180, 44189, 44198, - 44208, 44214, 44221, 44228, 44236, 44243, 44251, 44259, - 44268, 44275, 44283, 44291, 44300, 44308, 44317, 44326, - 44336, 44343, 44351, 44359, 44368, 44376, 44385, 44394, - 44404, 44412, 44421, 44430, 44440, 44449, 44459, 44469, - 44480, 44486, 44493, 44500, 44508, 44515, 44523, 44531, - 44540, 44547, 44555, 44563, 44572, 44580, 44589, 44598, - 44608, 44615, 44623, 44631, 44640, 44648, 44657, 44666, - 44676, 44684, 44693, 44702, 44712, 44721, 44731, 44741, - 44752, 44759, 44767, 44775, 44784, 44792, 44801, 44810, - 44820, 44828, 44837, 44846, 44856, 44865, 44875, 44885, - 44896, 44904, 44913, 44922, 44932, 44941, 44951, 44961, - 44972, 44981, 44991, 45001, 45012, 45022, 45033, 45044, - 45056, 45059, 45063, 45067, 45072, 45076, 45081, 45086, - 45092, 45096, 45101, 45106, 45112, 45117, 45123, 45129, - 45136, 45140, 45145, 45150, 45156, 45161, 45167, 45173, - 45180, 45185, 45191, 45197, 45204, 45210, 45217, 45224, - 45232, 45236, 45241, 45246, 45252, 45257, 45263, 45269, - 45276, 45281, 45287, 45293, 45300, 45306, 45313, 45320, - 45328, 45333, 45339, 45345, 45352, 45358, 45365, 45372, - 45380, 45386, 45393, 45400, 45408, 45415, 45423, 45431, - 45440, 45444, 45449, 45454, 45460, 45465, 45471, 45477, - 45484, 45489, 45495, 45501, 45508, 45514, 45521, 45528, - 45536, 45541, 45547, 45553, 45560, 45566, 45573, 45580, - 45588, 45594, 45601, 45608, 45616, 45623, 45631, 45639, - 45648, 45653, 45659, 45665, 45672, 45678, 45685, 45692, - 45700, 45706, 45713, 45720, 45728, 45735, 45743, 45751, - 45760, 45766, 45773, 45780, 45788, 45795, 45803, 45811, - 45820, 45827, 45835, 45843, 45852, 45860, 45869, 45878, - 45888, 45892, 45897, 45902, 45908, 45913, 45919, 45925, - 45932, 45937, 45943, 45949, 45956, 45962, 45969, 45976, - 45984, 45989, 45995, 46001, 46008, 46014, 46021, 46028, - 46036, 46042, 46049, 46056, 46064, 46071, 46079, 46087, - 46096, 46101, 46107, 46113, 46120, 46126, 46133, 46140, - 46148, 46154, 46161, 46168, 46176, 46183, 46191, 46199, - 46208, 46214, 46221, 46228, 46236, 46243, 46251, 46259, - 46268, 46275, 46283, 46291, 46300, 46308, 46317, 46326, - 46336, 46341, 46347, 46353, 46360, 46366, 46373, 46380, - 46388, 46394, 46401, 46408, 46416, 46423, 46431, 46439, - 46448, 46454, 46461, 46468, 46476, 46483, 46491, 46499, - 46508, 46515, 46523, 46531, 46540, 46548, 46557, 46566, - 46576, 46582, 46589, 46596, 46604, 46611, 46619, 46627, - 46636, 46643, 46651, 46659, 46668, 46676, 46685, 46694, - 46704, 46711, 46719, 46727, 46736, 46744, 46753, 46762, - 46772, 46780, 46789, 46798, 46808, 46817, 46827, 46837, - 46848, 46852, 46857, 46862, 46868, 46873, 46879, 46885, - 46892, 46897, 46903, 46909, 46916, 46922, 46929, 46936, - 46944, 46949, 46955, 46961, 46968, 46974, 46981, 46988, - 46996, 47002, 47009, 47016, 47024, 47031, 47039, 47047, - 47056, 47061, 47067, 47073, 47080, 47086, 47093, 47100, - 47108, 47114, 47121, 47128, 47136, 47143, 47151, 47159, - 47168, 47174, 47181, 47188, 47196, 47203, 47211, 47219, - 47228, 47235, 47243, 47251, 47260, 47268, 47277, 47286, - 47296, 47301, 47307, 47313, 47320, 47326, 47333, 47340, - 47348, 47354, 47361, 47368, 47376, 47383, 47391, 47399, - 47408, 47414, 47421, 47428, 47436, 47443, 47451, 47459, - 47468, 47475, 47483, 47491, 47500, 47508, 47517, 47526, - 47536, 47542, 47549, 47556, 47564, 47571, 47579, 47587, - 47596, 47603, 47611, 47619, 47628, 47636, 47645, 47654, - 47664, 47671, 47679, 47687, 47696, 47704, 47713, 47722, - 47732, 47740, 47749, 47758, 47768, 47777, 47787, 47797, - 47808, 47813, 47819, 47825, 47832, 47838, 47845, 47852, - 47860, 47866, 47873, 47880, 47888, 47895, 47903, 47911, - 47920, 47926, 47933, 47940, 47948, 47955, 47963, 47971, - 47980, 47987, 47995, 48003, 48012, 48020, 48029, 48038, - 48048, 48054, 48061, 48068, 48076, 48083, 48091, 48099, - 48108, 48115, 48123, 48131, 48140, 48148, 48157, 48166, - 48176, 48183, 48191, 48199, 48208, 48216, 48225, 48234, - 48244, 48252, 48261, 48270, 48280, 48289, 48299, 48309, - 48320, 48326, 48333, 48340, 48348, 48355, 48363, 48371, - 48380, 48387, 48395, 48403, 48412, 48420, 48429, 48438, - 48448, 48455, 48463, 48471, 48480, 48488, 48497, 48506, - 48516, 48524, 48533, 48542, 48552, 48561, 48571, 48581, - 48592, 48599, 48607, 48615, 48624, 48632, 48641, 48650, - 48660, 48668, 48677, 48686, 48696, 48705, 48715, 48725, - 48736, 48744, 48753, 48762, 48772, 48781, 48791, 48801, - 48812, 48821, 48831, 48841, 48852, 48862, 48873, 48884, - 48896, 48900, 48905, 48910, 48916, 48921, 48927, 48933, - 48940, 48945, 48951, 48957, 48964, 48970, 48977, 48984, - 48992, 48997, 49003, 49009, 49016, 49022, 49029, 49036, - 49044, 49050, 49057, 49064, 49072, 49079, 49087, 49095, - 49104, 49109, 49115, 49121, 49128, 49134, 49141, 49148, - 49156, 49162, 49169, 49176, 49184, 49191, 49199, 49207, - 49216, 49222, 49229, 49236, 49244, 49251, 49259, 49267, - 49276, 49283, 49291, 49299, 49308, 49316, 49325, 49334, - 49344, 49349, 49355, 49361, 49368, 49374, 49381, 49388, - 49396, 49402, 49409, 49416, 49424, 49431, 49439, 49447, - 49456, 49462, 49469, 49476, 49484, 49491, 49499, 49507, - 49516, 49523, 49531, 49539, 49548, 49556, 49565, 49574, - 49584, 49590, 49597, 49604, 49612, 49619, 49627, 49635, - 49644, 49651, 49659, 49667, 49676, 49684, 49693, 49702, - 49712, 49719, 49727, 49735, 49744, 49752, 49761, 49770, - 49780, 49788, 49797, 49806, 49816, 49825, 49835, 49845, - 49856, 49861, 49867, 49873, 49880, 49886, 49893, 49900, - 49908, 49914, 49921, 49928, 49936, 49943, 49951, 49959, - 49968, 49974, 49981, 49988, 49996, 50003, 50011, 50019, - 50028, 50035, 50043, 50051, 50060, 50068, 50077, 50086, - 50096, 50102, 50109, 50116, 50124, 50131, 50139, 50147, - 50156, 50163, 50171, 50179, 50188, 50196, 50205, 50214, - 50224, 50231, 50239, 50247, 50256, 50264, 50273, 50282, - 50292, 50300, 50309, 50318, 50328, 50337, 50347, 50357, - 50368, 50374, 50381, 50388, 50396, 50403, 50411, 50419, - 50428, 50435, 50443, 50451, 50460, 50468, 50477, 50486, - 50496, 50503, 50511, 50519, 50528, 50536, 50545, 50554, - 50564, 50572, 50581, 50590, 50600, 50609, 50619, 50629, - 50640, 50647, 50655, 50663, 50672, 50680, 50689, 50698, - 50708, 50716, 50725, 50734, 50744, 50753, 50763, 50773, - 50784, 50792, 50801, 50810, 50820, 50829, 50839, 50849, - 50860, 50869, 50879, 50889, 50900, 50910, 50921, 50932, - 50944, 50949, 50955, 50961, 50968, 50974, 50981, 50988, - 50996, 51002, 51009, 51016, 51024, 51031, 51039, 51047, - 51056, 51062, 51069, 51076, 51084, 51091, 51099, 51107, - 51116, 51123, 51131, 51139, 51148, 51156, 51165, 51174, - 51184, 51190, 51197, 51204, 51212, 51219, 51227, 51235, - 51244, 51251, 51259, 51267, 51276, 51284, 51293, 51302, - 51312, 51319, 51327, 51335, 51344, 51352, 51361, 51370, - 51380, 51388, 51397, 51406, 51416, 51425, 51435, 51445, - 51456, 51462, 51469, 51476, 51484, 51491, 51499, 51507, - 51516, 51523, 51531, 51539, 51548, 51556, 51565, 51574, - 51584, 51591, 51599, 51607, 51616, 51624, 51633, 51642, - 51652, 51660, 51669, 51678, 51688, 51697, 51707, 51717, - 51728, 51735, 51743, 51751, 51760, 51768, 51777, 51786, - 51796, 51804, 51813, 51822, 51832, 51841, 51851, 51861, - 51872, 51880, 51889, 51898, 51908, 51917, 51927, 51937, - 51948, 51957, 51967, 51977, 51988, 51998, 52009, 52020, - 52032, 52038, 52045, 52052, 52060, 52067, 52075, 52083, - 52092, 52099, 52107, 52115, 52124, 52132, 52141, 52150, - 52160, 52167, 52175, 52183, 52192, 52200, 52209, 52218, - 52228, 52236, 52245, 52254, 52264, 52273, 52283, 52293, - 52304, 52311, 52319, 52327, 52336, 52344, 52353, 52362, - 52372, 52380, 52389, 52398, 52408, 52417, 52427, 52437, - 52448, 52456, 52465, 52474, 52484, 52493, 52503, 52513, - 52524, 52533, 52543, 52553, 52564, 52574, 52585, 52596, - 52608, 52615, 52623, 52631, 52640, 52648, 52657, 52666, - 52676, 52684, 52693, 52702, 52712, 52721, 52731, 52741, - 52752, 52760, 52769, 52778, 52788, 52797, 52807, 52817, - 52828, 52837, 52847, 52857, 52868, 52878, 52889, 52900, - 52912, 52920, 52929, 52938, 52948, 52957, 52967, 52977, - 52988, 52997, 53007, 53017, 53028, 53038, 53049, 53060, - 53072, 53081, 53091, 53101, 53112, 53122, 53133, 53144, - 53156, 53166, 53177, 53188, 53200, 53211, 53223, 53235, - 53248, 53249, 53251, 53253, 53256, 53258, 53261, 53264, - 53268, 53270, 53273, 53276, 53280, 53283, 53287, 53291, - 53296, 53298, 53301, 53304, 53308, 53311, 53315, 53319, - 53324, 53327, 53331, 53335, 53340, 53344, 53349, 53354, - 53360, 53362, 53365, 53368, 53372, 53375, 53379, 53383, - 53388, 53391, 53395, 53399, 53404, 53408, 53413, 53418, - 53424, 53427, 53431, 53435, 53440, 53444, 53449, 53454, - 53460, 53464, 53469, 53474, 53480, 53485, 53491, 53497, - 53504, 53506, 53509, 53512, 53516, 53519, 53523, 53527, - 53532, 53535, 53539, 53543, 53548, 53552, 53557, 53562, - 53568, 53571, 53575, 53579, 53584, 53588, 53593, 53598, - 53604, 53608, 53613, 53618, 53624, 53629, 53635, 53641, - 53648, 53651, 53655, 53659, 53664, 53668, 53673, 53678, - 53684, 53688, 53693, 53698, 53704, 53709, 53715, 53721, - 53728, 53732, 53737, 53742, 53748, 53753, 53759, 53765, - 53772, 53777, 53783, 53789, 53796, 53802, 53809, 53816, - 53824, 53826, 53829, 53832, 53836, 53839, 53843, 53847, - 53852, 53855, 53859, 53863, 53868, 53872, 53877, 53882, - 53888, 53891, 53895, 53899, 53904, 53908, 53913, 53918, - 53924, 53928, 53933, 53938, 53944, 53949, 53955, 53961, - 53968, 53971, 53975, 53979, 53984, 53988, 53993, 53998, - 54004, 54008, 54013, 54018, 54024, 54029, 54035, 54041, - 54048, 54052, 54057, 54062, 54068, 54073, 54079, 54085, - 54092, 54097, 54103, 54109, 54116, 54122, 54129, 54136, - 54144, 54147, 54151, 54155, 54160, 54164, 54169, 54174, - 54180, 54184, 54189, 54194, 54200, 54205, 54211, 54217, - 54224, 54228, 54233, 54238, 54244, 54249, 54255, 54261, - 54268, 54273, 54279, 54285, 54292, 54298, 54305, 54312, - 54320, 54324, 54329, 54334, 54340, 54345, 54351, 54357, - 54364, 54369, 54375, 54381, 54388, 54394, 54401, 54408, - 54416, 54421, 54427, 54433, 54440, 54446, 54453, 54460, - 54468, 54474, 54481, 54488, 54496, 54503, 54511, 54519, - 54528, 54530, 54533, 54536, 54540, 54543, 54547, 54551, - 54556, 54559, 54563, 54567, 54572, 54576, 54581, 54586, - 54592, 54595, 54599, 54603, 54608, 54612, 54617, 54622, - 54628, 54632, 54637, 54642, 54648, 54653, 54659, 54665, - 54672, 54675, 54679, 54683, 54688, 54692, 54697, 54702, - 54708, 54712, 54717, 54722, 54728, 54733, 54739, 54745, - 54752, 54756, 54761, 54766, 54772, 54777, 54783, 54789, - 54796, 54801, 54807, 54813, 54820, 54826, 54833, 54840, - 54848, 54851, 54855, 54859, 54864, 54868, 54873, 54878, - 54884, 54888, 54893, 54898, 54904, 54909, 54915, 54921, - 54928, 54932, 54937, 54942, 54948, 54953, 54959, 54965, - 54972, 54977, 54983, 54989, 54996, 55002, 55009, 55016, - 55024, 55028, 55033, 55038, 55044, 55049, 55055, 55061, - 55068, 55073, 55079, 55085, 55092, 55098, 55105, 55112, - 55120, 55125, 55131, 55137, 55144, 55150, 55157, 55164, - 55172, 55178, 55185, 55192, 55200, 55207, 55215, 55223, - 55232, 55235, 55239, 55243, 55248, 55252, 55257, 55262, - 55268, 55272, 55277, 55282, 55288, 55293, 55299, 55305, - 55312, 55316, 55321, 55326, 55332, 55337, 55343, 55349, - 55356, 55361, 55367, 55373, 55380, 55386, 55393, 55400, - 55408, 55412, 55417, 55422, 55428, 55433, 55439, 55445, - 55452, 55457, 55463, 55469, 55476, 55482, 55489, 55496, - 55504, 55509, 55515, 55521, 55528, 55534, 55541, 55548, - 55556, 55562, 55569, 55576, 55584, 55591, 55599, 55607, - 55616, 55620, 55625, 55630, 55636, 55641, 55647, 55653, - 55660, 55665, 55671, 55677, 55684, 55690, 55697, 55704, - 55712, 55717, 55723, 55729, 55736, 55742, 55749, 55756, - 55764, 55770, 55777, 55784, 55792, 55799, 55807, 55815, - 55824, 55829, 55835, 55841, 55848, 55854, 55861, 55868, - 55876, 55882, 55889, 55896, 55904, 55911, 55919, 55927, - 55936, 55942, 55949, 55956, 55964, 55971, 55979, 55987, - 55996, 56003, 56011, 56019, 56028, 56036, 56045, 56054, - 56064, 56066, 56069, 56072, 56076, 56079, 56083, 56087, - 56092, 56095, 56099, 56103, 56108, 56112, 56117, 56122, - 56128, 56131, 56135, 56139, 56144, 56148, 56153, 56158, - 56164, 56168, 56173, 56178, 56184, 56189, 56195, 56201, - 56208, 56211, 56215, 56219, 56224, 56228, 56233, 56238, - 56244, 56248, 56253, 56258, 56264, 56269, 56275, 56281, - 56288, 56292, 56297, 56302, 56308, 56313, 56319, 56325, - 56332, 56337, 56343, 56349, 56356, 56362, 56369, 56376, - 56384, 56387, 56391, 56395, 56400, 56404, 56409, 56414, - 56420, 56424, 56429, 56434, 56440, 56445, 56451, 56457, - 56464, 56468, 56473, 56478, 56484, 56489, 56495, 56501, - 56508, 56513, 56519, 56525, 56532, 56538, 56545, 56552, - 56560, 56564, 56569, 56574, 56580, 56585, 56591, 56597, - 56604, 56609, 56615, 56621, 56628, 56634, 56641, 56648, - 56656, 56661, 56667, 56673, 56680, 56686, 56693, 56700, - 56708, 56714, 56721, 56728, 56736, 56743, 56751, 56759, - 56768, 56771, 56775, 56779, 56784, 56788, 56793, 56798, - 56804, 56808, 56813, 56818, 56824, 56829, 56835, 56841, - 56848, 56852, 56857, 56862, 56868, 56873, 56879, 56885, - 56892, 56897, 56903, 56909, 56916, 56922, 56929, 56936, - 56944, 56948, 56953, 56958, 56964, 56969, 56975, 56981, - 56988, 56993, 56999, 57005, 57012, 57018, 57025, 57032, - 57040, 57045, 57051, 57057, 57064, 57070, 57077, 57084, - 57092, 57098, 57105, 57112, 57120, 57127, 57135, 57143, - 57152, 57156, 57161, 57166, 57172, 57177, 57183, 57189, - 57196, 57201, 57207, 57213, 57220, 57226, 57233, 57240, - 57248, 57253, 57259, 57265, 57272, 57278, 57285, 57292, - 57300, 57306, 57313, 57320, 57328, 57335, 57343, 57351, - 57360, 57365, 57371, 57377, 57384, 57390, 57397, 57404, - 57412, 57418, 57425, 57432, 57440, 57447, 57455, 57463, - 57472, 57478, 57485, 57492, 57500, 57507, 57515, 57523, - 57532, 57539, 57547, 57555, 57564, 57572, 57581, 57590, - 57600, 57603, 57607, 57611, 57616, 57620, 57625, 57630, - 57636, 57640, 57645, 57650, 57656, 57661, 57667, 57673, - 57680, 57684, 57689, 57694, 57700, 57705, 57711, 57717, - 57724, 57729, 57735, 57741, 57748, 57754, 57761, 57768, - 57776, 57780, 57785, 57790, 57796, 57801, 57807, 57813, - 57820, 57825, 57831, 57837, 57844, 57850, 57857, 57864, - 57872, 57877, 57883, 57889, 57896, 57902, 57909, 57916, - 57924, 57930, 57937, 57944, 57952, 57959, 57967, 57975, - 57984, 57988, 57993, 57998, 58004, 58009, 58015, 58021, - 58028, 58033, 58039, 58045, 58052, 58058, 58065, 58072, - 58080, 58085, 58091, 58097, 58104, 58110, 58117, 58124, - 58132, 58138, 58145, 58152, 58160, 58167, 58175, 58183, - 58192, 58197, 58203, 58209, 58216, 58222, 58229, 58236, - 58244, 58250, 58257, 58264, 58272, 58279, 58287, 58295, - 58304, 58310, 58317, 58324, 58332, 58339, 58347, 58355, - 58364, 58371, 58379, 58387, 58396, 58404, 58413, 58422, - 58432, 58436, 58441, 58446, 58452, 58457, 58463, 58469, - 58476, 58481, 58487, 58493, 58500, 58506, 58513, 58520, - 58528, 58533, 58539, 58545, 58552, 58558, 58565, 58572, - 58580, 58586, 58593, 58600, 58608, 58615, 58623, 58631, - 58640, 58645, 58651, 58657, 58664, 58670, 58677, 58684, - 58692, 58698, 58705, 58712, 58720, 58727, 58735, 58743, - 58752, 58758, 58765, 58772, 58780, 58787, 58795, 58803, - 58812, 58819, 58827, 58835, 58844, 58852, 58861, 58870, - 58880, 58885, 58891, 58897, 58904, 58910, 58917, 58924, - 58932, 58938, 58945, 58952, 58960, 58967, 58975, 58983, - 58992, 58998, 59005, 59012, 59020, 59027, 59035, 59043, - 59052, 59059, 59067, 59075, 59084, 59092, 59101, 59110, - 59120, 59126, 59133, 59140, 59148, 59155, 59163, 59171, - 59180, 59187, 59195, 59203, 59212, 59220, 59229, 59238, - 59248, 59255, 59263, 59271, 59280, 59288, 59297, 59306, - 59316, 59324, 59333, 59342, 59352, 59361, 59371, 59381, - 59392, 59394, 59397, 59400, 59404, 59407, 59411, 59415, - 59420, 59423, 59427, 59431, 59436, 59440, 59445, 59450, - 59456, 59459, 59463, 59467, 59472, 59476, 59481, 59486, - 59492, 59496, 59501, 59506, 59512, 59517, 59523, 59529, - 59536, 59539, 59543, 59547, 59552, 59556, 59561, 59566, - 59572, 59576, 59581, 59586, 59592, 59597, 59603, 59609, - 59616, 59620, 59625, 59630, 59636, 59641, 59647, 59653, - 59660, 59665, 59671, 59677, 59684, 59690, 59697, 59704, - 59712, 59715, 59719, 59723, 59728, 59732, 59737, 59742, - 59748, 59752, 59757, 59762, 59768, 59773, 59779, 59785, - 59792, 59796, 59801, 59806, 59812, 59817, 59823, 59829, - 59836, 59841, 59847, 59853, 59860, 59866, 59873, 59880, - 59888, 59892, 59897, 59902, 59908, 59913, 59919, 59925, - 59932, 59937, 59943, 59949, 59956, 59962, 59969, 59976, - 59984, 59989, 59995, 60001, 60008, 60014, 60021, 60028, - 60036, 60042, 60049, 60056, 60064, 60071, 60079, 60087, - 60096, 60099, 60103, 60107, 60112, 60116, 60121, 60126, - 60132, 60136, 60141, 60146, 60152, 60157, 60163, 60169, - 60176, 60180, 60185, 60190, 60196, 60201, 60207, 60213, - 60220, 60225, 60231, 60237, 60244, 60250, 60257, 60264, - 60272, 60276, 60281, 60286, 60292, 60297, 60303, 60309, - 60316, 60321, 60327, 60333, 60340, 60346, 60353, 60360, - 60368, 60373, 60379, 60385, 60392, 60398, 60405, 60412, - 60420, 60426, 60433, 60440, 60448, 60455, 60463, 60471, - 60480, 60484, 60489, 60494, 60500, 60505, 60511, 60517, - 60524, 60529, 60535, 60541, 60548, 60554, 60561, 60568, - 60576, 60581, 60587, 60593, 60600, 60606, 60613, 60620, - 60628, 60634, 60641, 60648, 60656, 60663, 60671, 60679, - 60688, 60693, 60699, 60705, 60712, 60718, 60725, 60732, - 60740, 60746, 60753, 60760, 60768, 60775, 60783, 60791, - 60800, 60806, 60813, 60820, 60828, 60835, 60843, 60851, - 60860, 60867, 60875, 60883, 60892, 60900, 60909, 60918, - 60928, 60931, 60935, 60939, 60944, 60948, 60953, 60958, - 60964, 60968, 60973, 60978, 60984, 60989, 60995, 61001, - 61008, 61012, 61017, 61022, 61028, 61033, 61039, 61045, - 61052, 61057, 61063, 61069, 61076, 61082, 61089, 61096, - 61104, 61108, 61113, 61118, 61124, 61129, 61135, 61141, - 61148, 61153, 61159, 61165, 61172, 61178, 61185, 61192, - 61200, 61205, 61211, 61217, 61224, 61230, 61237, 61244, - 61252, 61258, 61265, 61272, 61280, 61287, 61295, 61303, - 61312, 61316, 61321, 61326, 61332, 61337, 61343, 61349, - 61356, 61361, 61367, 61373, 61380, 61386, 61393, 61400, - 61408, 61413, 61419, 61425, 61432, 61438, 61445, 61452, - 61460, 61466, 61473, 61480, 61488, 61495, 61503, 61511, - 61520, 61525, 61531, 61537, 61544, 61550, 61557, 61564, - 61572, 61578, 61585, 61592, 61600, 61607, 61615, 61623, - 61632, 61638, 61645, 61652, 61660, 61667, 61675, 61683, - 61692, 61699, 61707, 61715, 61724, 61732, 61741, 61750, - 61760, 61764, 61769, 61774, 61780, 61785, 61791, 61797, - 61804, 61809, 61815, 61821, 61828, 61834, 61841, 61848, - 61856, 61861, 61867, 61873, 61880, 61886, 61893, 61900, - 61908, 61914, 61921, 61928, 61936, 61943, 61951, 61959, - 61968, 61973, 61979, 61985, 61992, 61998, 62005, 62012, - 62020, 62026, 62033, 62040, 62048, 62055, 62063, 62071, - 62080, 62086, 62093, 62100, 62108, 62115, 62123, 62131, - 62140, 62147, 62155, 62163, 62172, 62180, 62189, 62198, - 62208, 62213, 62219, 62225, 62232, 62238, 62245, 62252, - 62260, 62266, 62273, 62280, 62288, 62295, 62303, 62311, - 62320, 62326, 62333, 62340, 62348, 62355, 62363, 62371, - 62380, 62387, 62395, 62403, 62412, 62420, 62429, 62438, - 62448, 62454, 62461, 62468, 62476, 62483, 62491, 62499, - 62508, 62515, 62523, 62531, 62540, 62548, 62557, 62566, - 62576, 62583, 62591, 62599, 62608, 62616, 62625, 62634, - 62644, 62652, 62661, 62670, 62680, 62689, 62699, 62709, - 62720, 62723, 62727, 62731, 62736, 62740, 62745, 62750, - 62756, 62760, 62765, 62770, 62776, 62781, 62787, 62793, - 62800, 62804, 62809, 62814, 62820, 62825, 62831, 62837, - 62844, 62849, 62855, 62861, 62868, 62874, 62881, 62888, - 62896, 62900, 62905, 62910, 62916, 62921, 62927, 62933, - 62940, 62945, 62951, 62957, 62964, 62970, 62977, 62984, - 62992, 62997, 63003, 63009, 63016, 63022, 63029, 63036, - 63044, 63050, 63057, 63064, 63072, 63079, 63087, 63095, - 63104, 63108, 63113, 63118, 63124, 63129, 63135, 63141, - 63148, 63153, 63159, 63165, 63172, 63178, 63185, 63192, - 63200, 63205, 63211, 63217, 63224, 63230, 63237, 63244, - 63252, 63258, 63265, 63272, 63280, 63287, 63295, 63303, - 63312, 63317, 63323, 63329, 63336, 63342, 63349, 63356, - 63364, 63370, 63377, 63384, 63392, 63399, 63407, 63415, - 63424, 63430, 63437, 63444, 63452, 63459, 63467, 63475, - 63484, 63491, 63499, 63507, 63516, 63524, 63533, 63542, - 63552, 63556, 63561, 63566, 63572, 63577, 63583, 63589, - 63596, 63601, 63607, 63613, 63620, 63626, 63633, 63640, - 63648, 63653, 63659, 63665, 63672, 63678, 63685, 63692, - 63700, 63706, 63713, 63720, 63728, 63735, 63743, 63751, - 63760, 63765, 63771, 63777, 63784, 63790, 63797, 63804, - 63812, 63818, 63825, 63832, 63840, 63847, 63855, 63863, - 63872, 63878, 63885, 63892, 63900, 63907, 63915, 63923, - 63932, 63939, 63947, 63955, 63964, 63972, 63981, 63990, - 64000, 64005, 64011, 64017, 64024, 64030, 64037, 64044, - 64052, 64058, 64065, 64072, 64080, 64087, 64095, 64103, - 64112, 64118, 64125, 64132, 64140, 64147, 64155, 64163, - 64172, 64179, 64187, 64195, 64204, 64212, 64221, 64230, - 64240, 64246, 64253, 64260, 64268, 64275, 64283, 64291, - 64300, 64307, 64315, 64323, 64332, 64340, 64349, 64358, - 64368, 64375, 64383, 64391, 64400, 64408, 64417, 64426, - 64436, 64444, 64453, 64462, 64472, 64481, 64491, 64501, - 64512, 64516, 64521, 64526, 64532, 64537, 64543, 64549, - 64556, 64561, 64567, 64573, 64580, 64586, 64593, 64600, - 64608, 64613, 64619, 64625, 64632, 64638, 64645, 64652, - 64660, 64666, 64673, 64680, 64688, 64695, 64703, 64711, - 64720, 64725, 64731, 64737, 64744, 64750, 64757, 64764, - 64772, 64778, 64785, 64792, 64800, 64807, 64815, 64823, - 64832, 64838, 64845, 64852, 64860, 64867, 64875, 64883, - 64892, 64899, 64907, 64915, 64924, 64932, 64941, 64950, - 64960, 64965, 64971, 64977, 64984, 64990, 64997, 65004, - 65012, 65018, 65025, 65032, 65040, 65047, 65055, 65063, - 65072, 65078, 65085, 65092, 65100, 65107, 65115, 65123, - 65132, 65139, 65147, 65155, 65164, 65172, 65181, 65190, - 65200, 65206, 65213, 65220, 65228, 65235, 65243, 65251, - 65260, 65267, 65275, 65283, 65292, 65300, 65309, 65318, - 65328, 65335, 65343, 65351, 65360, 65368, 65377, 65386, - 65396, 65404, 65413, 65422, 65432, 65441, 65451, 65461, - 65472, 65477, 65483, 65489, 65496, 65502, 65509, 65516, - 65524, 65530, 65537, 65544, 65552, 65559, 65567, 65575, - 65584, 65590, 65597, 65604, 65612, 65619, 65627, 65635, - 65644, 65651, 65659, 65667, 65676, 65684, 65693, 65702, - 65712, 65718, 65725, 65732, 65740, 65747, 65755, 65763, - 65772, 65779, 65787, 65795, 65804, 65812, 65821, 65830, - 65840, 65847, 65855, 65863, 65872, 65880, 65889, 65898, - 65908, 65916, 65925, 65934, 65944, 65953, 65963, 65973, - 65984, 65990, 65997, 66004, 66012, 66019, 66027, 66035, - 66044, 66051, 66059, 66067, 66076, 66084, 66093, 66102, - 66112, 66119, 66127, 66135, 66144, 66152, 66161, 66170, - 66180, 66188, 66197, 66206, 66216, 66225, 66235, 66245, - 66256, 66263, 66271, 66279, 66288, 66296, 66305, 66314, - 66324, 66332, 66341, 66350, 66360, 66369, 66379, 66389, - 66400, 66408, 66417, 66426, 66436, 66445, 66455, 66465, - 66476, 66485, 66495, 66505, 66516, 66526, 66537, 66548, - 66560, 66562, 66565, 66568, 66572, 66575, 66579, 66583, - 66588, 66591, 66595, 66599, 66604, 66608, 66613, 66618, - 66624, 66627, 66631, 66635, 66640, 66644, 66649, 66654, - 66660, 66664, 66669, 66674, 66680, 66685, 66691, 66697, - 66704, 66707, 66711, 66715, 66720, 66724, 66729, 66734, - 66740, 66744, 66749, 66754, 66760, 66765, 66771, 66777, - 66784, 66788, 66793, 66798, 66804, 66809, 66815, 66821, - 66828, 66833, 66839, 66845, 66852, 66858, 66865, 66872, - 66880, 66883, 66887, 66891, 66896, 66900, 66905, 66910, - 66916, 66920, 66925, 66930, 66936, 66941, 66947, 66953, - 66960, 66964, 66969, 66974, 66980, 66985, 66991, 66997, - 67004, 67009, 67015, 67021, 67028, 67034, 67041, 67048, - 67056, 67060, 67065, 67070, 67076, 67081, 67087, 67093, - 67100, 67105, 67111, 67117, 67124, 67130, 67137, 67144, - 67152, 67157, 67163, 67169, 67176, 67182, 67189, 67196, - 67204, 67210, 67217, 67224, 67232, 67239, 67247, 67255, - 67264, 67267, 67271, 67275, 67280, 67284, 67289, 67294, - 67300, 67304, 67309, 67314, 67320, 67325, 67331, 67337, - 67344, 67348, 67353, 67358, 67364, 67369, 67375, 67381, - 67388, 67393, 67399, 67405, 67412, 67418, 67425, 67432, - 67440, 67444, 67449, 67454, 67460, 67465, 67471, 67477, - 67484, 67489, 67495, 67501, 67508, 67514, 67521, 67528, - 67536, 67541, 67547, 67553, 67560, 67566, 67573, 67580, - 67588, 67594, 67601, 67608, 67616, 67623, 67631, 67639, - 67648, 67652, 67657, 67662, 67668, 67673, 67679, 67685, - 67692, 67697, 67703, 67709, 67716, 67722, 67729, 67736, - 67744, 67749, 67755, 67761, 67768, 67774, 67781, 67788, - 67796, 67802, 67809, 67816, 67824, 67831, 67839, 67847, - 67856, 67861, 67867, 67873, 67880, 67886, 67893, 67900, - 67908, 67914, 67921, 67928, 67936, 67943, 67951, 67959, - 67968, 67974, 67981, 67988, 67996, 68003, 68011, 68019, - 68028, 68035, 68043, 68051, 68060, 68068, 68077, 68086, - 68096, 68099, 68103, 68107, 68112, 68116, 68121, 68126, - 68132, 68136, 68141, 68146, 68152, 68157, 68163, 68169, - 68176, 68180, 68185, 68190, 68196, 68201, 68207, 68213, - 68220, 68225, 68231, 68237, 68244, 68250, 68257, 68264, - 68272, 68276, 68281, 68286, 68292, 68297, 68303, 68309, - 68316, 68321, 68327, 68333, 68340, 68346, 68353, 68360, - 68368, 68373, 68379, 68385, 68392, 68398, 68405, 68412, - 68420, 68426, 68433, 68440, 68448, 68455, 68463, 68471, - 68480, 68484, 68489, 68494, 68500, 68505, 68511, 68517, - 68524, 68529, 68535, 68541, 68548, 68554, 68561, 68568, - 68576, 68581, 68587, 68593, 68600, 68606, 68613, 68620, - 68628, 68634, 68641, 68648, 68656, 68663, 68671, 68679, - 68688, 68693, 68699, 68705, 68712, 68718, 68725, 68732, - 68740, 68746, 68753, 68760, 68768, 68775, 68783, 68791, - 68800, 68806, 68813, 68820, 68828, 68835, 68843, 68851, - 68860, 68867, 68875, 68883, 68892, 68900, 68909, 68918, - 68928, 68932, 68937, 68942, 68948, 68953, 68959, 68965, - 68972, 68977, 68983, 68989, 68996, 69002, 69009, 69016, - 69024, 69029, 69035, 69041, 69048, 69054, 69061, 69068, - 69076, 69082, 69089, 69096, 69104, 69111, 69119, 69127, - 69136, 69141, 69147, 69153, 69160, 69166, 69173, 69180, - 69188, 69194, 69201, 69208, 69216, 69223, 69231, 69239, - 69248, 69254, 69261, 69268, 69276, 69283, 69291, 69299, - 69308, 69315, 69323, 69331, 69340, 69348, 69357, 69366, - 69376, 69381, 69387, 69393, 69400, 69406, 69413, 69420, - 69428, 69434, 69441, 69448, 69456, 69463, 69471, 69479, - 69488, 69494, 69501, 69508, 69516, 69523, 69531, 69539, - 69548, 69555, 69563, 69571, 69580, 69588, 69597, 69606, - 69616, 69622, 69629, 69636, 69644, 69651, 69659, 69667, - 69676, 69683, 69691, 69699, 69708, 69716, 69725, 69734, - 69744, 69751, 69759, 69767, 69776, 69784, 69793, 69802, - 69812, 69820, 69829, 69838, 69848, 69857, 69867, 69877, - 69888, 69891, 69895, 69899, 69904, 69908, 69913, 69918, - 69924, 69928, 69933, 69938, 69944, 69949, 69955, 69961, - 69968, 69972, 69977, 69982, 69988, 69993, 69999, 70005, - 70012, 70017, 70023, 70029, 70036, 70042, 70049, 70056, - 70064, 70068, 70073, 70078, 70084, 70089, 70095, 70101, - 70108, 70113, 70119, 70125, 70132, 70138, 70145, 70152, - 70160, 70165, 70171, 70177, 70184, 70190, 70197, 70204, - 70212, 70218, 70225, 70232, 70240, 70247, 70255, 70263, - 70272, 70276, 70281, 70286, 70292, 70297, 70303, 70309, - 70316, 70321, 70327, 70333, 70340, 70346, 70353, 70360, - 70368, 70373, 70379, 70385, 70392, 70398, 70405, 70412, - 70420, 70426, 70433, 70440, 70448, 70455, 70463, 70471, - 70480, 70485, 70491, 70497, 70504, 70510, 70517, 70524, - 70532, 70538, 70545, 70552, 70560, 70567, 70575, 70583, - 70592, 70598, 70605, 70612, 70620, 70627, 70635, 70643, - 70652, 70659, 70667, 70675, 70684, 70692, 70701, 70710, - 70720, 70724, 70729, 70734, 70740, 70745, 70751, 70757, - 70764, 70769, 70775, 70781, 70788, 70794, 70801, 70808, - 70816, 70821, 70827, 70833, 70840, 70846, 70853, 70860, - 70868, 70874, 70881, 70888, 70896, 70903, 70911, 70919, - 70928, 70933, 70939, 70945, 70952, 70958, 70965, 70972, - 70980, 70986, 70993, 71000, 71008, 71015, 71023, 71031, - 71040, 71046, 71053, 71060, 71068, 71075, 71083, 71091, - 71100, 71107, 71115, 71123, 71132, 71140, 71149, 71158, - 71168, 71173, 71179, 71185, 71192, 71198, 71205, 71212, - 71220, 71226, 71233, 71240, 71248, 71255, 71263, 71271, - 71280, 71286, 71293, 71300, 71308, 71315, 71323, 71331, - 71340, 71347, 71355, 71363, 71372, 71380, 71389, 71398, - 71408, 71414, 71421, 71428, 71436, 71443, 71451, 71459, - 71468, 71475, 71483, 71491, 71500, 71508, 71517, 71526, - 71536, 71543, 71551, 71559, 71568, 71576, 71585, 71594, - 71604, 71612, 71621, 71630, 71640, 71649, 71659, 71669, - 71680, 71684, 71689, 71694, 71700, 71705, 71711, 71717, - 71724, 71729, 71735, 71741, 71748, 71754, 71761, 71768, - 71776, 71781, 71787, 71793, 71800, 71806, 71813, 71820, - 71828, 71834, 71841, 71848, 71856, 71863, 71871, 71879, - 71888, 71893, 71899, 71905, 71912, 71918, 71925, 71932, - 71940, 71946, 71953, 71960, 71968, 71975, 71983, 71991, - 72000, 72006, 72013, 72020, 72028, 72035, 72043, 72051, - 72060, 72067, 72075, 72083, 72092, 72100, 72109, 72118, - 72128, 72133, 72139, 72145, 72152, 72158, 72165, 72172, - 72180, 72186, 72193, 72200, 72208, 72215, 72223, 72231, - 72240, 72246, 72253, 72260, 72268, 72275, 72283, 72291, - 72300, 72307, 72315, 72323, 72332, 72340, 72349, 72358, - 72368, 72374, 72381, 72388, 72396, 72403, 72411, 72419, - 72428, 72435, 72443, 72451, 72460, 72468, 72477, 72486, - 72496, 72503, 72511, 72519, 72528, 72536, 72545, 72554, - 72564, 72572, 72581, 72590, 72600, 72609, 72619, 72629, - 72640, 72645, 72651, 72657, 72664, 72670, 72677, 72684, - 72692, 72698, 72705, 72712, 72720, 72727, 72735, 72743, - 72752, 72758, 72765, 72772, 72780, 72787, 72795, 72803, - 72812, 72819, 72827, 72835, 72844, 72852, 72861, 72870, - 72880, 72886, 72893, 72900, 72908, 72915, 72923, 72931, - 72940, 72947, 72955, 72963, 72972, 72980, 72989, 72998, - 73008, 73015, 73023, 73031, 73040, 73048, 73057, 73066, - 73076, 73084, 73093, 73102, 73112, 73121, 73131, 73141, - 73152, 73158, 73165, 73172, 73180, 73187, 73195, 73203, - 73212, 73219, 73227, 73235, 73244, 73252, 73261, 73270, - 73280, 73287, 73295, 73303, 73312, 73320, 73329, 73338, - 73348, 73356, 73365, 73374, 73384, 73393, 73403, 73413, - 73424, 73431, 73439, 73447, 73456, 73464, 73473, 73482, - 73492, 73500, 73509, 73518, 73528, 73537, 73547, 73557, - 73568, 73576, 73585, 73594, 73604, 73613, 73623, 73633, - 73644, 73653, 73663, 73673, 73684, 73694, 73705, 73716, - 73728, 73731, 73735, 73739, 73744, 73748, 73753, 73758, - 73764, 73768, 73773, 73778, 73784, 73789, 73795, 73801, - 73808, 73812, 73817, 73822, 73828, 73833, 73839, 73845, - 73852, 73857, 73863, 73869, 73876, 73882, 73889, 73896, - 73904, 73908, 73913, 73918, 73924, 73929, 73935, 73941, - 73948, 73953, 73959, 73965, 73972, 73978, 73985, 73992, - 74000, 74005, 74011, 74017, 74024, 74030, 74037, 74044, - 74052, 74058, 74065, 74072, 74080, 74087, 74095, 74103, - 74112, 74116, 74121, 74126, 74132, 74137, 74143, 74149, - 74156, 74161, 74167, 74173, 74180, 74186, 74193, 74200, - 74208, 74213, 74219, 74225, 74232, 74238, 74245, 74252, - 74260, 74266, 74273, 74280, 74288, 74295, 74303, 74311, - 74320, 74325, 74331, 74337, 74344, 74350, 74357, 74364, - 74372, 74378, 74385, 74392, 74400, 74407, 74415, 74423, - 74432, 74438, 74445, 74452, 74460, 74467, 74475, 74483, - 74492, 74499, 74507, 74515, 74524, 74532, 74541, 74550, - 74560, 74564, 74569, 74574, 74580, 74585, 74591, 74597, - 74604, 74609, 74615, 74621, 74628, 74634, 74641, 74648, - 74656, 74661, 74667, 74673, 74680, 74686, 74693, 74700, - 74708, 74714, 74721, 74728, 74736, 74743, 74751, 74759, - 74768, 74773, 74779, 74785, 74792, 74798, 74805, 74812, - 74820, 74826, 74833, 74840, 74848, 74855, 74863, 74871, - 74880, 74886, 74893, 74900, 74908, 74915, 74923, 74931, - 74940, 74947, 74955, 74963, 74972, 74980, 74989, 74998, - 75008, 75013, 75019, 75025, 75032, 75038, 75045, 75052, - 75060, 75066, 75073, 75080, 75088, 75095, 75103, 75111, - 75120, 75126, 75133, 75140, 75148, 75155, 75163, 75171, - 75180, 75187, 75195, 75203, 75212, 75220, 75229, 75238, - 75248, 75254, 75261, 75268, 75276, 75283, 75291, 75299, - 75308, 75315, 75323, 75331, 75340, 75348, 75357, 75366, - 75376, 75383, 75391, 75399, 75408, 75416, 75425, 75434, - 75444, 75452, 75461, 75470, 75480, 75489, 75499, 75509, - 75520, 75524, 75529, 75534, 75540, 75545, 75551, 75557, - 75564, 75569, 75575, 75581, 75588, 75594, 75601, 75608, - 75616, 75621, 75627, 75633, 75640, 75646, 75653, 75660, - 75668, 75674, 75681, 75688, 75696, 75703, 75711, 75719, - 75728, 75733, 75739, 75745, 75752, 75758, 75765, 75772, - 75780, 75786, 75793, 75800, 75808, 75815, 75823, 75831, - 75840, 75846, 75853, 75860, 75868, 75875, 75883, 75891, - 75900, 75907, 75915, 75923, 75932, 75940, 75949, 75958, - 75968, 75973, 75979, 75985, 75992, 75998, 76005, 76012, - 76020, 76026, 76033, 76040, 76048, 76055, 76063, 76071, - 76080, 76086, 76093, 76100, 76108, 76115, 76123, 76131, - 76140, 76147, 76155, 76163, 76172, 76180, 76189, 76198, - 76208, 76214, 76221, 76228, 76236, 76243, 76251, 76259, - 76268, 76275, 76283, 76291, 76300, 76308, 76317, 76326, - 76336, 76343, 76351, 76359, 76368, 76376, 76385, 76394, - 76404, 76412, 76421, 76430, 76440, 76449, 76459, 76469, - 76480, 76485, 76491, 76497, 76504, 76510, 76517, 76524, - 76532, 76538, 76545, 76552, 76560, 76567, 76575, 76583, - 76592, 76598, 76605, 76612, 76620, 76627, 76635, 76643, - 76652, 76659, 76667, 76675, 76684, 76692, 76701, 76710, - 76720, 76726, 76733, 76740, 76748, 76755, 76763, 76771, - 76780, 76787, 76795, 76803, 76812, 76820, 76829, 76838, - 76848, 76855, 76863, 76871, 76880, 76888, 76897, 76906, - 76916, 76924, 76933, 76942, 76952, 76961, 76971, 76981, - 76992, 76998, 77005, 77012, 77020, 77027, 77035, 77043, - 77052, 77059, 77067, 77075, 77084, 77092, 77101, 77110, - 77120, 77127, 77135, 77143, 77152, 77160, 77169, 77178, - 77188, 77196, 77205, 77214, 77224, 77233, 77243, 77253, - 77264, 77271, 77279, 77287, 77296, 77304, 77313, 77322, - 77332, 77340, 77349, 77358, 77368, 77377, 77387, 77397, - 77408, 77416, 77425, 77434, 77444, 77453, 77463, 77473, - 77484, 77493, 77503, 77513, 77524, 77534, 77545, 77556, - 77568, 77572, 77577, 77582, 77588, 77593, 77599, 77605, - 77612, 77617, 77623, 77629, 77636, 77642, 77649, 77656, - 77664, 77669, 77675, 77681, 77688, 77694, 77701, 77708, - 77716, 77722, 77729, 77736, 77744, 77751, 77759, 77767, - 77776, 77781, 77787, 77793, 77800, 77806, 77813, 77820, - 77828, 77834, 77841, 77848, 77856, 77863, 77871, 77879, - 77888, 77894, 77901, 77908, 77916, 77923, 77931, 77939, - 77948, 77955, 77963, 77971, 77980, 77988, 77997, 78006, - 78016, 78021, 78027, 78033, 78040, 78046, 78053, 78060, - 78068, 78074, 78081, 78088, 78096, 78103, 78111, 78119, - 78128, 78134, 78141, 78148, 78156, 78163, 78171, 78179, - 78188, 78195, 78203, 78211, 78220, 78228, 78237, 78246, - 78256, 78262, 78269, 78276, 78284, 78291, 78299, 78307, - 78316, 78323, 78331, 78339, 78348, 78356, 78365, 78374, - 78384, 78391, 78399, 78407, 78416, 78424, 78433, 78442, - 78452, 78460, 78469, 78478, 78488, 78497, 78507, 78517, - 78528, 78533, 78539, 78545, 78552, 78558, 78565, 78572, - 78580, 78586, 78593, 78600, 78608, 78615, 78623, 78631, - 78640, 78646, 78653, 78660, 78668, 78675, 78683, 78691, - 78700, 78707, 78715, 78723, 78732, 78740, 78749, 78758, - 78768, 78774, 78781, 78788, 78796, 78803, 78811, 78819, - 78828, 78835, 78843, 78851, 78860, 78868, 78877, 78886, - 78896, 78903, 78911, 78919, 78928, 78936, 78945, 78954, - 78964, 78972, 78981, 78990, 79000, 79009, 79019, 79029, - 79040, 79046, 79053, 79060, 79068, 79075, 79083, 79091, - 79100, 79107, 79115, 79123, 79132, 79140, 79149, 79158, - 79168, 79175, 79183, 79191, 79200, 79208, 79217, 79226, - 79236, 79244, 79253, 79262, 79272, 79281, 79291, 79301, - 79312, 79319, 79327, 79335, 79344, 79352, 79361, 79370, - 79380, 79388, 79397, 79406, 79416, 79425, 79435, 79445, - 79456, 79464, 79473, 79482, 79492, 79501, 79511, 79521, - 79532, 79541, 79551, 79561, 79572, 79582, 79593, 79604, - 79616, 79621, 79627, 79633, 79640, 79646, 79653, 79660, - 79668, 79674, 79681, 79688, 79696, 79703, 79711, 79719, - 79728, 79734, 79741, 79748, 79756, 79763, 79771, 79779, - 79788, 79795, 79803, 79811, 79820, 79828, 79837, 79846, - 79856, 79862, 79869, 79876, 79884, 79891, 79899, 79907, - 79916, 79923, 79931, 79939, 79948, 79956, 79965, 79974, - 79984, 79991, 79999, 80007, 80016, 80024, 80033, 80042, - 80052, 80060, 80069, 80078, 80088, 80097, 80107, 80117, - 80128, 80134, 80141, 80148, 80156, 80163, 80171, 80179, - 80188, 80195, 80203, 80211, 80220, 80228, 80237, 80246, - 80256, 80263, 80271, 80279, 80288, 80296, 80305, 80314, - 80324, 80332, 80341, 80350, 80360, 80369, 80379, 80389, - 80400, 80407, 80415, 80423, 80432, 80440, 80449, 80458, - 80468, 80476, 80485, 80494, 80504, 80513, 80523, 80533, - 80544, 80552, 80561, 80570, 80580, 80589, 80599, 80609, - 80620, 80629, 80639, 80649, 80660, 80670, 80681, 80692, - 80704, 80710, 80717, 80724, 80732, 80739, 80747, 80755, - 80764, 80771, 80779, 80787, 80796, 80804, 80813, 80822, - 80832, 80839, 80847, 80855, 80864, 80872, 80881, 80890, - 80900, 80908, 80917, 80926, 80936, 80945, 80955, 80965, - 80976, 80983, 80991, 80999, 81008, 81016, 81025, 81034, - 81044, 81052, 81061, 81070, 81080, 81089, 81099, 81109, - 81120, 81128, 81137, 81146, 81156, 81165, 81175, 81185, - 81196, 81205, 81215, 81225, 81236, 81246, 81257, 81268, - 81280, 81287, 81295, 81303, 81312, 81320, 81329, 81338, - 81348, 81356, 81365, 81374, 81384, 81393, 81403, 81413, - 81424, 81432, 81441, 81450, 81460, 81469, 81479, 81489, - 81500, 81509, 81519, 81529, 81540, 81550, 81561, 81572, - 81584, 81592, 81601, 81610, 81620, 81629, 81639, 81649, - 81660, 81669, 81679, 81689, 81700, 81710, 81721, 81732, - 81744, 81753, 81763, 81773, 81784, 81794, 81805, 81816, - 81828, 81838, 81849, 81860, 81872, 81883, 81895, 81907, - 81920, 81922, 81925, 81928, 81932, 81935, 81939, 81943, - 81948, 81951, 81955, 81959, 81964, 81968, 81973, 81978, - 81984, 81987, 81991, 81995, 82000, 82004, 82009, 82014, - 82020, 82024, 82029, 82034, 82040, 82045, 82051, 82057, - 82064, 82067, 82071, 82075, 82080, 82084, 82089, 82094, - 82100, 82104, 82109, 82114, 82120, 82125, 82131, 82137, - 82144, 82148, 82153, 82158, 82164, 82169, 82175, 82181, - 82188, 82193, 82199, 82205, 82212, 82218, 82225, 82232, - 82240, 82243, 82247, 82251, 82256, 82260, 82265, 82270, - 82276, 82280, 82285, 82290, 82296, 82301, 82307, 82313, - 82320, 82324, 82329, 82334, 82340, 82345, 82351, 82357, - 82364, 82369, 82375, 82381, 82388, 82394, 82401, 82408, - 82416, 82420, 82425, 82430, 82436, 82441, 82447, 82453, - 82460, 82465, 82471, 82477, 82484, 82490, 82497, 82504, - 82512, 82517, 82523, 82529, 82536, 82542, 82549, 82556, - 82564, 82570, 82577, 82584, 82592, 82599, 82607, 82615, - 82624, 82627, 82631, 82635, 82640, 82644, 82649, 82654, - 82660, 82664, 82669, 82674, 82680, 82685, 82691, 82697, - 82704, 82708, 82713, 82718, 82724, 82729, 82735, 82741, - 82748, 82753, 82759, 82765, 82772, 82778, 82785, 82792, - 82800, 82804, 82809, 82814, 82820, 82825, 82831, 82837, - 82844, 82849, 82855, 82861, 82868, 82874, 82881, 82888, - 82896, 82901, 82907, 82913, 82920, 82926, 82933, 82940, - 82948, 82954, 82961, 82968, 82976, 82983, 82991, 82999, - 83008, 83012, 83017, 83022, 83028, 83033, 83039, 83045, - 83052, 83057, 83063, 83069, 83076, 83082, 83089, 83096, - 83104, 83109, 83115, 83121, 83128, 83134, 83141, 83148, - 83156, 83162, 83169, 83176, 83184, 83191, 83199, 83207, - 83216, 83221, 83227, 83233, 83240, 83246, 83253, 83260, - 83268, 83274, 83281, 83288, 83296, 83303, 83311, 83319, - 83328, 83334, 83341, 83348, 83356, 83363, 83371, 83379, - 83388, 83395, 83403, 83411, 83420, 83428, 83437, 83446, - 83456, 83459, 83463, 83467, 83472, 83476, 83481, 83486, - 83492, 83496, 83501, 83506, 83512, 83517, 83523, 83529, - 83536, 83540, 83545, 83550, 83556, 83561, 83567, 83573, - 83580, 83585, 83591, 83597, 83604, 83610, 83617, 83624, - 83632, 83636, 83641, 83646, 83652, 83657, 83663, 83669, - 83676, 83681, 83687, 83693, 83700, 83706, 83713, 83720, - 83728, 83733, 83739, 83745, 83752, 83758, 83765, 83772, - 83780, 83786, 83793, 83800, 83808, 83815, 83823, 83831, - 83840, 83844, 83849, 83854, 83860, 83865, 83871, 83877, - 83884, 83889, 83895, 83901, 83908, 83914, 83921, 83928, - 83936, 83941, 83947, 83953, 83960, 83966, 83973, 83980, - 83988, 83994, 84001, 84008, 84016, 84023, 84031, 84039, - 84048, 84053, 84059, 84065, 84072, 84078, 84085, 84092, - 84100, 84106, 84113, 84120, 84128, 84135, 84143, 84151, - 84160, 84166, 84173, 84180, 84188, 84195, 84203, 84211, - 84220, 84227, 84235, 84243, 84252, 84260, 84269, 84278, - 84288, 84292, 84297, 84302, 84308, 84313, 84319, 84325, - 84332, 84337, 84343, 84349, 84356, 84362, 84369, 84376, - 84384, 84389, 84395, 84401, 84408, 84414, 84421, 84428, - 84436, 84442, 84449, 84456, 84464, 84471, 84479, 84487, - 84496, 84501, 84507, 84513, 84520, 84526, 84533, 84540, - 84548, 84554, 84561, 84568, 84576, 84583, 84591, 84599, - 84608, 84614, 84621, 84628, 84636, 84643, 84651, 84659, - 84668, 84675, 84683, 84691, 84700, 84708, 84717, 84726, - 84736, 84741, 84747, 84753, 84760, 84766, 84773, 84780, - 84788, 84794, 84801, 84808, 84816, 84823, 84831, 84839, - 84848, 84854, 84861, 84868, 84876, 84883, 84891, 84899, - 84908, 84915, 84923, 84931, 84940, 84948, 84957, 84966, - 84976, 84982, 84989, 84996, 85004, 85011, 85019, 85027, - 85036, 85043, 85051, 85059, 85068, 85076, 85085, 85094, - 85104, 85111, 85119, 85127, 85136, 85144, 85153, 85162, - 85172, 85180, 85189, 85198, 85208, 85217, 85227, 85237, - 85248, 85251, 85255, 85259, 85264, 85268, 85273, 85278, - 85284, 85288, 85293, 85298, 85304, 85309, 85315, 85321, - 85328, 85332, 85337, 85342, 85348, 85353, 85359, 85365, - 85372, 85377, 85383, 85389, 85396, 85402, 85409, 85416, - 85424, 85428, 85433, 85438, 85444, 85449, 85455, 85461, - 85468, 85473, 85479, 85485, 85492, 85498, 85505, 85512, - 85520, 85525, 85531, 85537, 85544, 85550, 85557, 85564, - 85572, 85578, 85585, 85592, 85600, 85607, 85615, 85623, - 85632, 85636, 85641, 85646, 85652, 85657, 85663, 85669, - 85676, 85681, 85687, 85693, 85700, 85706, 85713, 85720, - 85728, 85733, 85739, 85745, 85752, 85758, 85765, 85772, - 85780, 85786, 85793, 85800, 85808, 85815, 85823, 85831, - 85840, 85845, 85851, 85857, 85864, 85870, 85877, 85884, - 85892, 85898, 85905, 85912, 85920, 85927, 85935, 85943, - 85952, 85958, 85965, 85972, 85980, 85987, 85995, 86003, - 86012, 86019, 86027, 86035, 86044, 86052, 86061, 86070, - 86080, 86084, 86089, 86094, 86100, 86105, 86111, 86117, - 86124, 86129, 86135, 86141, 86148, 86154, 86161, 86168, - 86176, 86181, 86187, 86193, 86200, 86206, 86213, 86220, - 86228, 86234, 86241, 86248, 86256, 86263, 86271, 86279, - 86288, 86293, 86299, 86305, 86312, 86318, 86325, 86332, - 86340, 86346, 86353, 86360, 86368, 86375, 86383, 86391, - 86400, 86406, 86413, 86420, 86428, 86435, 86443, 86451, - 86460, 86467, 86475, 86483, 86492, 86500, 86509, 86518, - 86528, 86533, 86539, 86545, 86552, 86558, 86565, 86572, - 86580, 86586, 86593, 86600, 86608, 86615, 86623, 86631, - 86640, 86646, 86653, 86660, 86668, 86675, 86683, 86691, - 86700, 86707, 86715, 86723, 86732, 86740, 86749, 86758, - 86768, 86774, 86781, 86788, 86796, 86803, 86811, 86819, - 86828, 86835, 86843, 86851, 86860, 86868, 86877, 86886, - 86896, 86903, 86911, 86919, 86928, 86936, 86945, 86954, - 86964, 86972, 86981, 86990, 87000, 87009, 87019, 87029, - 87040, 87044, 87049, 87054, 87060, 87065, 87071, 87077, - 87084, 87089, 87095, 87101, 87108, 87114, 87121, 87128, - 87136, 87141, 87147, 87153, 87160, 87166, 87173, 87180, - 87188, 87194, 87201, 87208, 87216, 87223, 87231, 87239, - 87248, 87253, 87259, 87265, 87272, 87278, 87285, 87292, - 87300, 87306, 87313, 87320, 87328, 87335, 87343, 87351, - 87360, 87366, 87373, 87380, 87388, 87395, 87403, 87411, - 87420, 87427, 87435, 87443, 87452, 87460, 87469, 87478, - 87488, 87493, 87499, 87505, 87512, 87518, 87525, 87532, - 87540, 87546, 87553, 87560, 87568, 87575, 87583, 87591, - 87600, 87606, 87613, 87620, 87628, 87635, 87643, 87651, - 87660, 87667, 87675, 87683, 87692, 87700, 87709, 87718, - 87728, 87734, 87741, 87748, 87756, 87763, 87771, 87779, - 87788, 87795, 87803, 87811, 87820, 87828, 87837, 87846, - 87856, 87863, 87871, 87879, 87888, 87896, 87905, 87914, - 87924, 87932, 87941, 87950, 87960, 87969, 87979, 87989, - 88000, 88005, 88011, 88017, 88024, 88030, 88037, 88044, - 88052, 88058, 88065, 88072, 88080, 88087, 88095, 88103, - 88112, 88118, 88125, 88132, 88140, 88147, 88155, 88163, - 88172, 88179, 88187, 88195, 88204, 88212, 88221, 88230, - 88240, 88246, 88253, 88260, 88268, 88275, 88283, 88291, - 88300, 88307, 88315, 88323, 88332, 88340, 88349, 88358, - 88368, 88375, 88383, 88391, 88400, 88408, 88417, 88426, - 88436, 88444, 88453, 88462, 88472, 88481, 88491, 88501, - 88512, 88518, 88525, 88532, 88540, 88547, 88555, 88563, - 88572, 88579, 88587, 88595, 88604, 88612, 88621, 88630, - 88640, 88647, 88655, 88663, 88672, 88680, 88689, 88698, - 88708, 88716, 88725, 88734, 88744, 88753, 88763, 88773, - 88784, 88791, 88799, 88807, 88816, 88824, 88833, 88842, - 88852, 88860, 88869, 88878, 88888, 88897, 88907, 88917, - 88928, 88936, 88945, 88954, 88964, 88973, 88983, 88993, - 89004, 89013, 89023, 89033, 89044, 89054, 89065, 89076, - 89088, 89091, 89095, 89099, 89104, 89108, 89113, 89118, - 89124, 89128, 89133, 89138, 89144, 89149, 89155, 89161, - 89168, 89172, 89177, 89182, 89188, 89193, 89199, 89205, - 89212, 89217, 89223, 89229, 89236, 89242, 89249, 89256, - 89264, 89268, 89273, 89278, 89284, 89289, 89295, 89301, - 89308, 89313, 89319, 89325, 89332, 89338, 89345, 89352, - 89360, 89365, 89371, 89377, 89384, 89390, 89397, 89404, - 89412, 89418, 89425, 89432, 89440, 89447, 89455, 89463, - 89472, 89476, 89481, 89486, 89492, 89497, 89503, 89509, - 89516, 89521, 89527, 89533, 89540, 89546, 89553, 89560, - 89568, 89573, 89579, 89585, 89592, 89598, 89605, 89612, - 89620, 89626, 89633, 89640, 89648, 89655, 89663, 89671, - 89680, 89685, 89691, 89697, 89704, 89710, 89717, 89724, - 89732, 89738, 89745, 89752, 89760, 89767, 89775, 89783, - 89792, 89798, 89805, 89812, 89820, 89827, 89835, 89843, - 89852, 89859, 89867, 89875, 89884, 89892, 89901, 89910, - 89920, 89924, 89929, 89934, 89940, 89945, 89951, 89957, - 89964, 89969, 89975, 89981, 89988, 89994, 90001, 90008, - 90016, 90021, 90027, 90033, 90040, 90046, 90053, 90060, - 90068, 90074, 90081, 90088, 90096, 90103, 90111, 90119, - 90128, 90133, 90139, 90145, 90152, 90158, 90165, 90172, - 90180, 90186, 90193, 90200, 90208, 90215, 90223, 90231, - 90240, 90246, 90253, 90260, 90268, 90275, 90283, 90291, - 90300, 90307, 90315, 90323, 90332, 90340, 90349, 90358, - 90368, 90373, 90379, 90385, 90392, 90398, 90405, 90412, - 90420, 90426, 90433, 90440, 90448, 90455, 90463, 90471, - 90480, 90486, 90493, 90500, 90508, 90515, 90523, 90531, - 90540, 90547, 90555, 90563, 90572, 90580, 90589, 90598, - 90608, 90614, 90621, 90628, 90636, 90643, 90651, 90659, - 90668, 90675, 90683, 90691, 90700, 90708, 90717, 90726, - 90736, 90743, 90751, 90759, 90768, 90776, 90785, 90794, - 90804, 90812, 90821, 90830, 90840, 90849, 90859, 90869, - 90880, 90884, 90889, 90894, 90900, 90905, 90911, 90917, - 90924, 90929, 90935, 90941, 90948, 90954, 90961, 90968, - 90976, 90981, 90987, 90993, 91000, 91006, 91013, 91020, - 91028, 91034, 91041, 91048, 91056, 91063, 91071, 91079, - 91088, 91093, 91099, 91105, 91112, 91118, 91125, 91132, - 91140, 91146, 91153, 91160, 91168, 91175, 91183, 91191, - 91200, 91206, 91213, 91220, 91228, 91235, 91243, 91251, - 91260, 91267, 91275, 91283, 91292, 91300, 91309, 91318, - 91328, 91333, 91339, 91345, 91352, 91358, 91365, 91372, - 91380, 91386, 91393, 91400, 91408, 91415, 91423, 91431, - 91440, 91446, 91453, 91460, 91468, 91475, 91483, 91491, - 91500, 91507, 91515, 91523, 91532, 91540, 91549, 91558, - 91568, 91574, 91581, 91588, 91596, 91603, 91611, 91619, - 91628, 91635, 91643, 91651, 91660, 91668, 91677, 91686, - 91696, 91703, 91711, 91719, 91728, 91736, 91745, 91754, - 91764, 91772, 91781, 91790, 91800, 91809, 91819, 91829, - 91840, 91845, 91851, 91857, 91864, 91870, 91877, 91884, - 91892, 91898, 91905, 91912, 91920, 91927, 91935, 91943, - 91952, 91958, 91965, 91972, 91980, 91987, 91995, 92003, - 92012, 92019, 92027, 92035, 92044, 92052, 92061, 92070, - 92080, 92086, 92093, 92100, 92108, 92115, 92123, 92131, - 92140, 92147, 92155, 92163, 92172, 92180, 92189, 92198, - 92208, 92215, 92223, 92231, 92240, 92248, 92257, 92266, - 92276, 92284, 92293, 92302, 92312, 92321, 92331, 92341, - 92352, 92358, 92365, 92372, 92380, 92387, 92395, 92403, - 92412, 92419, 92427, 92435, 92444, 92452, 92461, 92470, - 92480, 92487, 92495, 92503, 92512, 92520, 92529, 92538, - 92548, 92556, 92565, 92574, 92584, 92593, 92603, 92613, - 92624, 92631, 92639, 92647, 92656, 92664, 92673, 92682, - 92692, 92700, 92709, 92718, 92728, 92737, 92747, 92757, - 92768, 92776, 92785, 92794, 92804, 92813, 92823, 92833, - 92844, 92853, 92863, 92873, 92884, 92894, 92905, 92916, - 92928, 92932, 92937, 92942, 92948, 92953, 92959, 92965, - 92972, 92977, 92983, 92989, 92996, 93002, 93009, 93016, - 93024, 93029, 93035, 93041, 93048, 93054, 93061, 93068, - 93076, 93082, 93089, 93096, 93104, 93111, 93119, 93127, - 93136, 93141, 93147, 93153, 93160, 93166, 93173, 93180, - 93188, 93194, 93201, 93208, 93216, 93223, 93231, 93239, - 93248, 93254, 93261, 93268, 93276, 93283, 93291, 93299, - 93308, 93315, 93323, 93331, 93340, 93348, 93357, 93366, - 93376, 93381, 93387, 93393, 93400, 93406, 93413, 93420, - 93428, 93434, 93441, 93448, 93456, 93463, 93471, 93479, - 93488, 93494, 93501, 93508, 93516, 93523, 93531, 93539, - 93548, 93555, 93563, 93571, 93580, 93588, 93597, 93606, - 93616, 93622, 93629, 93636, 93644, 93651, 93659, 93667, - 93676, 93683, 93691, 93699, 93708, 93716, 93725, 93734, - 93744, 93751, 93759, 93767, 93776, 93784, 93793, 93802, - 93812, 93820, 93829, 93838, 93848, 93857, 93867, 93877, - 93888, 93893, 93899, 93905, 93912, 93918, 93925, 93932, - 93940, 93946, 93953, 93960, 93968, 93975, 93983, 93991, - 94000, 94006, 94013, 94020, 94028, 94035, 94043, 94051, - 94060, 94067, 94075, 94083, 94092, 94100, 94109, 94118, - 94128, 94134, 94141, 94148, 94156, 94163, 94171, 94179, - 94188, 94195, 94203, 94211, 94220, 94228, 94237, 94246, - 94256, 94263, 94271, 94279, 94288, 94296, 94305, 94314, - 94324, 94332, 94341, 94350, 94360, 94369, 94379, 94389, - 94400, 94406, 94413, 94420, 94428, 94435, 94443, 94451, - 94460, 94467, 94475, 94483, 94492, 94500, 94509, 94518, - 94528, 94535, 94543, 94551, 94560, 94568, 94577, 94586, - 94596, 94604, 94613, 94622, 94632, 94641, 94651, 94661, - 94672, 94679, 94687, 94695, 94704, 94712, 94721, 94730, - 94740, 94748, 94757, 94766, 94776, 94785, 94795, 94805, - 94816, 94824, 94833, 94842, 94852, 94861, 94871, 94881, - 94892, 94901, 94911, 94921, 94932, 94942, 94953, 94964, - 94976, 94981, 94987, 94993, 95000, 95006, 95013, 95020, - 95028, 95034, 95041, 95048, 95056, 95063, 95071, 95079, - 95088, 95094, 95101, 95108, 95116, 95123, 95131, 95139, - 95148, 95155, 95163, 95171, 95180, 95188, 95197, 95206, - 95216, 95222, 95229, 95236, 95244, 95251, 95259, 95267, - 95276, 95283, 95291, 95299, 95308, 95316, 95325, 95334, - 95344, 95351, 95359, 95367, 95376, 95384, 95393, 95402, - 95412, 95420, 95429, 95438, 95448, 95457, 95467, 95477, - 95488, 95494, 95501, 95508, 95516, 95523, 95531, 95539, - 95548, 95555, 95563, 95571, 95580, 95588, 95597, 95606, - 95616, 95623, 95631, 95639, 95648, 95656, 95665, 95674, - 95684, 95692, 95701, 95710, 95720, 95729, 95739, 95749, - 95760, 95767, 95775, 95783, 95792, 95800, 95809, 95818, - 95828, 95836, 95845, 95854, 95864, 95873, 95883, 95893, - 95904, 95912, 95921, 95930, 95940, 95949, 95959, 95969, - 95980, 95989, 95999, 96009, 96020, 96030, 96041, 96052, - 96064, 96070, 96077, 96084, 96092, 96099, 96107, 96115, - 96124, 96131, 96139, 96147, 96156, 96164, 96173, 96182, - 96192, 96199, 96207, 96215, 96224, 96232, 96241, 96250, - 96260, 96268, 96277, 96286, 96296, 96305, 96315, 96325, - 96336, 96343, 96351, 96359, 96368, 96376, 96385, 96394, - 96404, 96412, 96421, 96430, 96440, 96449, 96459, 96469, - 96480, 96488, 96497, 96506, 96516, 96525, 96535, 96545, - 96556, 96565, 96575, 96585, 96596, 96606, 96617, 96628, - 96640, 96647, 96655, 96663, 96672, 96680, 96689, 96698, - 96708, 96716, 96725, 96734, 96744, 96753, 96763, 96773, - 96784, 96792, 96801, 96810, 96820, 96829, 96839, 96849, - 96860, 96869, 96879, 96889, 96900, 96910, 96921, 96932, - 96944, 96952, 96961, 96970, 96980, 96989, 96999, 97009, - 97020, 97029, 97039, 97049, 97060, 97070, 97081, 97092, - 97104, 97113, 97123, 97133, 97144, 97154, 97165, 97176, - 97188, 97198, 97209, 97220, 97232, 97243, 97255, 97267, - 97280, 97283, 97287, 97291, 97296, 97300, 97305, 97310, - 97316, 97320, 97325, 97330, 97336, 97341, 97347, 97353, - 97360, 97364, 97369, 97374, 97380, 97385, 97391, 97397, - 97404, 97409, 97415, 97421, 97428, 97434, 97441, 97448, - 97456, 97460, 97465, 97470, 97476, 97481, 97487, 97493, - 97500, 97505, 97511, 97517, 97524, 97530, 97537, 97544, - 97552, 97557, 97563, 97569, 97576, 97582, 97589, 97596, - 97604, 97610, 97617, 97624, 97632, 97639, 97647, 97655, - 97664, 97668, 97673, 97678, 97684, 97689, 97695, 97701, - 97708, 97713, 97719, 97725, 97732, 97738, 97745, 97752, - 97760, 97765, 97771, 97777, 97784, 97790, 97797, 97804, - 97812, 97818, 97825, 97832, 97840, 97847, 97855, 97863, - 97872, 97877, 97883, 97889, 97896, 97902, 97909, 97916, - 97924, 97930, 97937, 97944, 97952, 97959, 97967, 97975, - 97984, 97990, 97997, 98004, 98012, 98019, 98027, 98035, - 98044, 98051, 98059, 98067, 98076, 98084, 98093, 98102, - 98112, 98116, 98121, 98126, 98132, 98137, 98143, 98149, - 98156, 98161, 98167, 98173, 98180, 98186, 98193, 98200, - 98208, 98213, 98219, 98225, 98232, 98238, 98245, 98252, - 98260, 98266, 98273, 98280, 98288, 98295, 98303, 98311, - 98320, 98325, 98331, 98337, 98344, 98350, 98357, 98364, - 98372, 98378, 98385, 98392, 98400, 98407, 98415, 98423, - 98432, 98438, 98445, 98452, 98460, 98467, 98475, 98483, - 98492, 98499, 98507, 98515, 98524, 98532, 98541, 98550, - 98560, 98565, 98571, 98577, 98584, 98590, 98597, 98604, - 98612, 98618, 98625, 98632, 98640, 98647, 98655, 98663, - 98672, 98678, 98685, 98692, 98700, 98707, 98715, 98723, - 98732, 98739, 98747, 98755, 98764, 98772, 98781, 98790, - 98800, 98806, 98813, 98820, 98828, 98835, 98843, 98851, - 98860, 98867, 98875, 98883, 98892, 98900, 98909, 98918, - 98928, 98935, 98943, 98951, 98960, 98968, 98977, 98986, - 98996, 99004, 99013, 99022, 99032, 99041, 99051, 99061, - 99072, 99076, 99081, 99086, 99092, 99097, 99103, 99109, - 99116, 99121, 99127, 99133, 99140, 99146, 99153, 99160, - 99168, 99173, 99179, 99185, 99192, 99198, 99205, 99212, - 99220, 99226, 99233, 99240, 99248, 99255, 99263, 99271, - 99280, 99285, 99291, 99297, 99304, 99310, 99317, 99324, - 99332, 99338, 99345, 99352, 99360, 99367, 99375, 99383, - 99392, 99398, 99405, 99412, 99420, 99427, 99435, 99443, - 99452, 99459, 99467, 99475, 99484, 99492, 99501, 99510, - 99520, 99525, 99531, 99537, 99544, 99550, 99557, 99564, - 99572, 99578, 99585, 99592, 99600, 99607, 99615, 99623, - 99632, 99638, 99645, 99652, 99660, 99667, 99675, 99683, - 99692, 99699, 99707, 99715, 99724, 99732, 99741, 99750, - 99760, 99766, 99773, 99780, 99788, 99795, 99803, 99811, - 99820, 99827, 99835, 99843, 99852, 99860, 99869, 99878, - 99888, 99895, 99903, 99911, 99920, 99928, 99937, 99946, - 99956, 99964, 99973, 99982, 99992, 100001, 100011, 100021, - 100032, 100037, 100043, 100049, 100056, 100062, 100069, 100076, - 100084, 100090, 100097, 100104, 100112, 100119, 100127, 100135, - 100144, 100150, 100157, 100164, 100172, 100179, 100187, 100195, - 100204, 100211, 100219, 100227, 100236, 100244, 100253, 100262, - 100272, 100278, 100285, 100292, 100300, 100307, 100315, 100323, - 100332, 100339, 100347, 100355, 100364, 100372, 100381, 100390, - 100400, 100407, 100415, 100423, 100432, 100440, 100449, 100458, - 100468, 100476, 100485, 100494, 100504, 100513, 100523, 100533, - 100544, 100550, 100557, 100564, 100572, 100579, 100587, 100595, - 100604, 100611, 100619, 100627, 100636, 100644, 100653, 100662, - 100672, 100679, 100687, 100695, 100704, 100712, 100721, 100730, - 100740, 100748, 100757, 100766, 100776, 100785, 100795, 100805, - 100816, 100823, 100831, 100839, 100848, 100856, 100865, 100874, - 100884, 100892, 100901, 100910, 100920, 100929, 100939, 100949, - 100960, 100968, 100977, 100986, 100996, 101005, 101015, 101025, - 101036, 101045, 101055, 101065, 101076, 101086, 101097, 101108, - 101120, 101124, 101129, 101134, 101140, 101145, 101151, 101157, - 101164, 101169, 101175, 101181, 101188, 101194, 101201, 101208, - 101216, 101221, 101227, 101233, 101240, 101246, 101253, 101260, - 101268, 101274, 101281, 101288, 101296, 101303, 101311, 101319, - 101328, 101333, 101339, 101345, 101352, 101358, 101365, 101372, - 101380, 101386, 101393, 101400, 101408, 101415, 101423, 101431, - 101440, 101446, 101453, 101460, 101468, 101475, 101483, 101491, - 101500, 101507, 101515, 101523, 101532, 101540, 101549, 101558, - 101568, 101573, 101579, 101585, 101592, 101598, 101605, 101612, - 101620, 101626, 101633, 101640, 101648, 101655, 101663, 101671, - 101680, 101686, 101693, 101700, 101708, 101715, 101723, 101731, - 101740, 101747, 101755, 101763, 101772, 101780, 101789, 101798, - 101808, 101814, 101821, 101828, 101836, 101843, 101851, 101859, - 101868, 101875, 101883, 101891, 101900, 101908, 101917, 101926, - 101936, 101943, 101951, 101959, 101968, 101976, 101985, 101994, - 102004, 102012, 102021, 102030, 102040, 102049, 102059, 102069, - 102080, 102085, 102091, 102097, 102104, 102110, 102117, 102124, - 102132, 102138, 102145, 102152, 102160, 102167, 102175, 102183, - 102192, 102198, 102205, 102212, 102220, 102227, 102235, 102243, - 102252, 102259, 102267, 102275, 102284, 102292, 102301, 102310, - 102320, 102326, 102333, 102340, 102348, 102355, 102363, 102371, - 102380, 102387, 102395, 102403, 102412, 102420, 102429, 102438, - 102448, 102455, 102463, 102471, 102480, 102488, 102497, 102506, - 102516, 102524, 102533, 102542, 102552, 102561, 102571, 102581, - 102592, 102598, 102605, 102612, 102620, 102627, 102635, 102643, - 102652, 102659, 102667, 102675, 102684, 102692, 102701, 102710, - 102720, 102727, 102735, 102743, 102752, 102760, 102769, 102778, - 102788, 102796, 102805, 102814, 102824, 102833, 102843, 102853, - 102864, 102871, 102879, 102887, 102896, 102904, 102913, 102922, - 102932, 102940, 102949, 102958, 102968, 102977, 102987, 102997, - 103008, 103016, 103025, 103034, 103044, 103053, 103063, 103073, - 103084, 103093, 103103, 103113, 103124, 103134, 103145, 103156, - 103168, 103173, 103179, 103185, 103192, 103198, 103205, 103212, - 103220, 103226, 103233, 103240, 103248, 103255, 103263, 103271, - 103280, 103286, 103293, 103300, 103308, 103315, 103323, 103331, - 103340, 103347, 103355, 103363, 103372, 103380, 103389, 103398, - 103408, 103414, 103421, 103428, 103436, 103443, 103451, 103459, - 103468, 103475, 103483, 103491, 103500, 103508, 103517, 103526, - 103536, 103543, 103551, 103559, 103568, 103576, 103585, 103594, - 103604, 103612, 103621, 103630, 103640, 103649, 103659, 103669, - 103680, 103686, 103693, 103700, 103708, 103715, 103723, 103731, - 103740, 103747, 103755, 103763, 103772, 103780, 103789, 103798, - 103808, 103815, 103823, 103831, 103840, 103848, 103857, 103866, - 103876, 103884, 103893, 103902, 103912, 103921, 103931, 103941, - 103952, 103959, 103967, 103975, 103984, 103992, 104001, 104010, - 104020, 104028, 104037, 104046, 104056, 104065, 104075, 104085, - 104096, 104104, 104113, 104122, 104132, 104141, 104151, 104161, - 104172, 104181, 104191, 104201, 104212, 104222, 104233, 104244, - 104256, 104262, 104269, 104276, 104284, 104291, 104299, 104307, - 104316, 104323, 104331, 104339, 104348, 104356, 104365, 104374, - 104384, 104391, 104399, 104407, 104416, 104424, 104433, 104442, - 104452, 104460, 104469, 104478, 104488, 104497, 104507, 104517, - 104528, 104535, 104543, 104551, 104560, 104568, 104577, 104586, - 104596, 104604, 104613, 104622, 104632, 104641, 104651, 104661, - 104672, 104680, 104689, 104698, 104708, 104717, 104727, 104737, - 104748, 104757, 104767, 104777, 104788, 104798, 104809, 104820, - 104832, 104839, 104847, 104855, 104864, 104872, 104881, 104890, - 104900, 104908, 104917, 104926, 104936, 104945, 104955, 104965, - 104976, 104984, 104993, 105002, 105012, 105021, 105031, 105041, - 105052, 105061, 105071, 105081, 105092, 105102, 105113, 105124, - 105136, 105144, 105153, 105162, 105172, 105181, 105191, 105201, - 105212, 105221, 105231, 105241, 105252, 105262, 105273, 105284, - 105296, 105305, 105315, 105325, 105336, 105346, 105357, 105368, - 105380, 105390, 105401, 105412, 105424, 105435, 105447, 105459, - 105472, 105476, 105481, 105486, 105492, 105497, 105503, 105509, - 105516, 105521, 105527, 105533, 105540, 105546, 105553, 105560, - 105568, 105573, 105579, 105585, 105592, 105598, 105605, 105612, - 105620, 105626, 105633, 105640, 105648, 105655, 105663, 105671, - 105680, 105685, 105691, 105697, 105704, 105710, 105717, 105724, - 105732, 105738, 105745, 105752, 105760, 105767, 105775, 105783, - 105792, 105798, 105805, 105812, 105820, 105827, 105835, 105843, - 105852, 105859, 105867, 105875, 105884, 105892, 105901, 105910, - 105920, 105925, 105931, 105937, 105944, 105950, 105957, 105964, - 105972, 105978, 105985, 105992, 106000, 106007, 106015, 106023, - 106032, 106038, 106045, 106052, 106060, 106067, 106075, 106083, - 106092, 106099, 106107, 106115, 106124, 106132, 106141, 106150, - 106160, 106166, 106173, 106180, 106188, 106195, 106203, 106211, - 106220, 106227, 106235, 106243, 106252, 106260, 106269, 106278, - 106288, 106295, 106303, 106311, 106320, 106328, 106337, 106346, - 106356, 106364, 106373, 106382, 106392, 106401, 106411, 106421, - 106432, 106437, 106443, 106449, 106456, 106462, 106469, 106476, - 106484, 106490, 106497, 106504, 106512, 106519, 106527, 106535, - 106544, 106550, 106557, 106564, 106572, 106579, 106587, 106595, - 106604, 106611, 106619, 106627, 106636, 106644, 106653, 106662, - 106672, 106678, 106685, 106692, 106700, 106707, 106715, 106723, - 106732, 106739, 106747, 106755, 106764, 106772, 106781, 106790, - 106800, 106807, 106815, 106823, 106832, 106840, 106849, 106858, - 106868, 106876, 106885, 106894, 106904, 106913, 106923, 106933, - 106944, 106950, 106957, 106964, 106972, 106979, 106987, 106995, - 107004, 107011, 107019, 107027, 107036, 107044, 107053, 107062, - 107072, 107079, 107087, 107095, 107104, 107112, 107121, 107130, - 107140, 107148, 107157, 107166, 107176, 107185, 107195, 107205, - 107216, 107223, 107231, 107239, 107248, 107256, 107265, 107274, - 107284, 107292, 107301, 107310, 107320, 107329, 107339, 107349, - 107360, 107368, 107377, 107386, 107396, 107405, 107415, 107425, - 107436, 107445, 107455, 107465, 107476, 107486, 107497, 107508, - 107520, 107525, 107531, 107537, 107544, 107550, 107557, 107564, - 107572, 107578, 107585, 107592, 107600, 107607, 107615, 107623, - 107632, 107638, 107645, 107652, 107660, 107667, 107675, 107683, - 107692, 107699, 107707, 107715, 107724, 107732, 107741, 107750, - 107760, 107766, 107773, 107780, 107788, 107795, 107803, 107811, - 107820, 107827, 107835, 107843, 107852, 107860, 107869, 107878, - 107888, 107895, 107903, 107911, 107920, 107928, 107937, 107946, - 107956, 107964, 107973, 107982, 107992, 108001, 108011, 108021, - 108032, 108038, 108045, 108052, 108060, 108067, 108075, 108083, - 108092, 108099, 108107, 108115, 108124, 108132, 108141, 108150, - 108160, 108167, 108175, 108183, 108192, 108200, 108209, 108218, - 108228, 108236, 108245, 108254, 108264, 108273, 108283, 108293, - 108304, 108311, 108319, 108327, 108336, 108344, 108353, 108362, - 108372, 108380, 108389, 108398, 108408, 108417, 108427, 108437, - 108448, 108456, 108465, 108474, 108484, 108493, 108503, 108513, - 108524, 108533, 108543, 108553, 108564, 108574, 108585, 108596, - 108608, 108614, 108621, 108628, 108636, 108643, 108651, 108659, - 108668, 108675, 108683, 108691, 108700, 108708, 108717, 108726, - 108736, 108743, 108751, 108759, 108768, 108776, 108785, 108794, - 108804, 108812, 108821, 108830, 108840, 108849, 108859, 108869, - 108880, 108887, 108895, 108903, 108912, 108920, 108929, 108938, - 108948, 108956, 108965, 108974, 108984, 108993, 109003, 109013, - 109024, 109032, 109041, 109050, 109060, 109069, 109079, 109089, - 109100, 109109, 109119, 109129, 109140, 109150, 109161, 109172, - 109184, 109191, 109199, 109207, 109216, 109224, 109233, 109242, - 109252, 109260, 109269, 109278, 109288, 109297, 109307, 109317, - 109328, 109336, 109345, 109354, 109364, 109373, 109383, 109393, - 109404, 109413, 109423, 109433, 109444, 109454, 109465, 109476, - 109488, 109496, 109505, 109514, 109524, 109533, 109543, 109553, - 109564, 109573, 109583, 109593, 109604, 109614, 109625, 109636, - 109648, 109657, 109667, 109677, 109688, 109698, 109709, 109720, - 109732, 109742, 109753, 109764, 109776, 109787, 109799, 109811, - 109824, 109829, 109835, 109841, 109848, 109854, 109861, 109868, - 109876, 109882, 109889, 109896, 109904, 109911, 109919, 109927, - 109936, 109942, 109949, 109956, 109964, 109971, 109979, 109987, - 109996, 110003, 110011, 110019, 110028, 110036, 110045, 110054, - 110064, 110070, 110077, 110084, 110092, 110099, 110107, 110115, - 110124, 110131, 110139, 110147, 110156, 110164, 110173, 110182, - 110192, 110199, 110207, 110215, 110224, 110232, 110241, 110250, - 110260, 110268, 110277, 110286, 110296, 110305, 110315, 110325, - 110336, 110342, 110349, 110356, 110364, 110371, 110379, 110387, - 110396, 110403, 110411, 110419, 110428, 110436, 110445, 110454, - 110464, 110471, 110479, 110487, 110496, 110504, 110513, 110522, - 110532, 110540, 110549, 110558, 110568, 110577, 110587, 110597, - 110608, 110615, 110623, 110631, 110640, 110648, 110657, 110666, - 110676, 110684, 110693, 110702, 110712, 110721, 110731, 110741, - 110752, 110760, 110769, 110778, 110788, 110797, 110807, 110817, - 110828, 110837, 110847, 110857, 110868, 110878, 110889, 110900, - 110912, 110918, 110925, 110932, 110940, 110947, 110955, 110963, - 110972, 110979, 110987, 110995, 111004, 111012, 111021, 111030, - 111040, 111047, 111055, 111063, 111072, 111080, 111089, 111098, - 111108, 111116, 111125, 111134, 111144, 111153, 111163, 111173, - 111184, 111191, 111199, 111207, 111216, 111224, 111233, 111242, - 111252, 111260, 111269, 111278, 111288, 111297, 111307, 111317, - 111328, 111336, 111345, 111354, 111364, 111373, 111383, 111393, - 111404, 111413, 111423, 111433, 111444, 111454, 111465, 111476, - 111488, 111495, 111503, 111511, 111520, 111528, 111537, 111546, - 111556, 111564, 111573, 111582, 111592, 111601, 111611, 111621, - 111632, 111640, 111649, 111658, 111668, 111677, 111687, 111697, - 111708, 111717, 111727, 111737, 111748, 111758, 111769, 111780, - 111792, 111800, 111809, 111818, 111828, 111837, 111847, 111857, - 111868, 111877, 111887, 111897, 111908, 111918, 111929, 111940, - 111952, 111961, 111971, 111981, 111992, 112002, 112013, 112024, - 112036, 112046, 112057, 112068, 112080, 112091, 112103, 112115, - 112128, 112134, 112141, 112148, 112156, 112163, 112171, 112179, - 112188, 112195, 112203, 112211, 112220, 112228, 112237, 112246, - 112256, 112263, 112271, 112279, 112288, 112296, 112305, 112314, - 112324, 112332, 112341, 112350, 112360, 112369, 112379, 112389, - 112400, 112407, 112415, 112423, 112432, 112440, 112449, 112458, - 112468, 112476, 112485, 112494, 112504, 112513, 112523, 112533, - 112544, 112552, 112561, 112570, 112580, 112589, 112599, 112609, - 112620, 112629, 112639, 112649, 112660, 112670, 112681, 112692, - 112704, 112711, 112719, 112727, 112736, 112744, 112753, 112762, - 112772, 112780, 112789, 112798, 112808, 112817, 112827, 112837, - 112848, 112856, 112865, 112874, 112884, 112893, 112903, 112913, - 112924, 112933, 112943, 112953, 112964, 112974, 112985, 112996, - 113008, 113016, 113025, 113034, 113044, 113053, 113063, 113073, - 113084, 113093, 113103, 113113, 113124, 113134, 113145, 113156, - 113168, 113177, 113187, 113197, 113208, 113218, 113229, 113240, - 113252, 113262, 113273, 113284, 113296, 113307, 113319, 113331, - 113344, 113351, 113359, 113367, 113376, 113384, 113393, 113402, - 113412, 113420, 113429, 113438, 113448, 113457, 113467, 113477, - 113488, 113496, 113505, 113514, 113524, 113533, 113543, 113553, - 113564, 113573, 113583, 113593, 113604, 113614, 113625, 113636, - 113648, 113656, 113665, 113674, 113684, 113693, 113703, 113713, - 113724, 113733, 113743, 113753, 113764, 113774, 113785, 113796, - 113808, 113817, 113827, 113837, 113848, 113858, 113869, 113880, - 113892, 113902, 113913, 113924, 113936, 113947, 113959, 113971, - 113984, 113992, 114001, 114010, 114020, 114029, 114039, 114049, - 114060, 114069, 114079, 114089, 114100, 114110, 114121, 114132, - 114144, 114153, 114163, 114173, 114184, 114194, 114205, 114216, - 114228, 114238, 114249, 114260, 114272, 114283, 114295, 114307, - 114320, 114329, 114339, 114349, 114360, 114370, 114381, 114392, - 114404, 114414, 114425, 114436, 114448, 114459, 114471, 114483, - 114496, 114506, 114517, 114528, 114540, 114551, 114563, 114575, - 114588, 114599, 114611, 114623, 114636, 114648, 114661, 114674, - 114688, 114689, 114691, 114693, 114696, 114698, 114701, 114704, - 114708, 114710, 114713, 114716, 114720, 114723, 114727, 114731, - 114736, 114738, 114741, 114744, 114748, 114751, 114755, 114759, - 114764, 114767, 114771, 114775, 114780, 114784, 114789, 114794, - 114800, 114802, 114805, 114808, 114812, 114815, 114819, 114823, - 114828, 114831, 114835, 114839, 114844, 114848, 114853, 114858, - 114864, 114867, 114871, 114875, 114880, 114884, 114889, 114894, - 114900, 114904, 114909, 114914, 114920, 114925, 114931, 114937, - 114944, 114946, 114949, 114952, 114956, 114959, 114963, 114967, - 114972, 114975, 114979, 114983, 114988, 114992, 114997, 115002, - 115008, 115011, 115015, 115019, 115024, 115028, 115033, 115038, - 115044, 115048, 115053, 115058, 115064, 115069, 115075, 115081, - 115088, 115091, 115095, 115099, 115104, 115108, 115113, 115118, - 115124, 115128, 115133, 115138, 115144, 115149, 115155, 115161, - 115168, 115172, 115177, 115182, 115188, 115193, 115199, 115205, - 115212, 115217, 115223, 115229, 115236, 115242, 115249, 115256, - 115264, 115266, 115269, 115272, 115276, 115279, 115283, 115287, - 115292, 115295, 115299, 115303, 115308, 115312, 115317, 115322, - 115328, 115331, 115335, 115339, 115344, 115348, 115353, 115358, - 115364, 115368, 115373, 115378, 115384, 115389, 115395, 115401, - 115408, 115411, 115415, 115419, 115424, 115428, 115433, 115438, - 115444, 115448, 115453, 115458, 115464, 115469, 115475, 115481, - 115488, 115492, 115497, 115502, 115508, 115513, 115519, 115525, - 115532, 115537, 115543, 115549, 115556, 115562, 115569, 115576, - 115584, 115587, 115591, 115595, 115600, 115604, 115609, 115614, - 115620, 115624, 115629, 115634, 115640, 115645, 115651, 115657, - 115664, 115668, 115673, 115678, 115684, 115689, 115695, 115701, - 115708, 115713, 115719, 115725, 115732, 115738, 115745, 115752, - 115760, 115764, 115769, 115774, 115780, 115785, 115791, 115797, - 115804, 115809, 115815, 115821, 115828, 115834, 115841, 115848, - 115856, 115861, 115867, 115873, 115880, 115886, 115893, 115900, - 115908, 115914, 115921, 115928, 115936, 115943, 115951, 115959, - 115968, 115970, 115973, 115976, 115980, 115983, 115987, 115991, - 115996, 115999, 116003, 116007, 116012, 116016, 116021, 116026, - 116032, 116035, 116039, 116043, 116048, 116052, 116057, 116062, - 116068, 116072, 116077, 116082, 116088, 116093, 116099, 116105, - 116112, 116115, 116119, 116123, 116128, 116132, 116137, 116142, - 116148, 116152, 116157, 116162, 116168, 116173, 116179, 116185, - 116192, 116196, 116201, 116206, 116212, 116217, 116223, 116229, - 116236, 116241, 116247, 116253, 116260, 116266, 116273, 116280, - 116288, 116291, 116295, 116299, 116304, 116308, 116313, 116318, - 116324, 116328, 116333, 116338, 116344, 116349, 116355, 116361, - 116368, 116372, 116377, 116382, 116388, 116393, 116399, 116405, - 116412, 116417, 116423, 116429, 116436, 116442, 116449, 116456, - 116464, 116468, 116473, 116478, 116484, 116489, 116495, 116501, - 116508, 116513, 116519, 116525, 116532, 116538, 116545, 116552, - 116560, 116565, 116571, 116577, 116584, 116590, 116597, 116604, - 116612, 116618, 116625, 116632, 116640, 116647, 116655, 116663, - 116672, 116675, 116679, 116683, 116688, 116692, 116697, 116702, - 116708, 116712, 116717, 116722, 116728, 116733, 116739, 116745, - 116752, 116756, 116761, 116766, 116772, 116777, 116783, 116789, - 116796, 116801, 116807, 116813, 116820, 116826, 116833, 116840, - 116848, 116852, 116857, 116862, 116868, 116873, 116879, 116885, - 116892, 116897, 116903, 116909, 116916, 116922, 116929, 116936, - 116944, 116949, 116955, 116961, 116968, 116974, 116981, 116988, - 116996, 117002, 117009, 117016, 117024, 117031, 117039, 117047, - 117056, 117060, 117065, 117070, 117076, 117081, 117087, 117093, - 117100, 117105, 117111, 117117, 117124, 117130, 117137, 117144, - 117152, 117157, 117163, 117169, 117176, 117182, 117189, 117196, - 117204, 117210, 117217, 117224, 117232, 117239, 117247, 117255, - 117264, 117269, 117275, 117281, 117288, 117294, 117301, 117308, - 117316, 117322, 117329, 117336, 117344, 117351, 117359, 117367, - 117376, 117382, 117389, 117396, 117404, 117411, 117419, 117427, - 117436, 117443, 117451, 117459, 117468, 117476, 117485, 117494, - 117504, 117506, 117509, 117512, 117516, 117519, 117523, 117527, - 117532, 117535, 117539, 117543, 117548, 117552, 117557, 117562, - 117568, 117571, 117575, 117579, 117584, 117588, 117593, 117598, - 117604, 117608, 117613, 117618, 117624, 117629, 117635, 117641, - 117648, 117651, 117655, 117659, 117664, 117668, 117673, 117678, - 117684, 117688, 117693, 117698, 117704, 117709, 117715, 117721, - 117728, 117732, 117737, 117742, 117748, 117753, 117759, 117765, - 117772, 117777, 117783, 117789, 117796, 117802, 117809, 117816, - 117824, 117827, 117831, 117835, 117840, 117844, 117849, 117854, - 117860, 117864, 117869, 117874, 117880, 117885, 117891, 117897, - 117904, 117908, 117913, 117918, 117924, 117929, 117935, 117941, - 117948, 117953, 117959, 117965, 117972, 117978, 117985, 117992, - 118000, 118004, 118009, 118014, 118020, 118025, 118031, 118037, - 118044, 118049, 118055, 118061, 118068, 118074, 118081, 118088, - 118096, 118101, 118107, 118113, 118120, 118126, 118133, 118140, - 118148, 118154, 118161, 118168, 118176, 118183, 118191, 118199, - 118208, 118211, 118215, 118219, 118224, 118228, 118233, 118238, - 118244, 118248, 118253, 118258, 118264, 118269, 118275, 118281, - 118288, 118292, 118297, 118302, 118308, 118313, 118319, 118325, - 118332, 118337, 118343, 118349, 118356, 118362, 118369, 118376, - 118384, 118388, 118393, 118398, 118404, 118409, 118415, 118421, - 118428, 118433, 118439, 118445, 118452, 118458, 118465, 118472, - 118480, 118485, 118491, 118497, 118504, 118510, 118517, 118524, - 118532, 118538, 118545, 118552, 118560, 118567, 118575, 118583, - 118592, 118596, 118601, 118606, 118612, 118617, 118623, 118629, - 118636, 118641, 118647, 118653, 118660, 118666, 118673, 118680, - 118688, 118693, 118699, 118705, 118712, 118718, 118725, 118732, - 118740, 118746, 118753, 118760, 118768, 118775, 118783, 118791, - 118800, 118805, 118811, 118817, 118824, 118830, 118837, 118844, - 118852, 118858, 118865, 118872, 118880, 118887, 118895, 118903, - 118912, 118918, 118925, 118932, 118940, 118947, 118955, 118963, - 118972, 118979, 118987, 118995, 119004, 119012, 119021, 119030, - 119040, 119043, 119047, 119051, 119056, 119060, 119065, 119070, - 119076, 119080, 119085, 119090, 119096, 119101, 119107, 119113, - 119120, 119124, 119129, 119134, 119140, 119145, 119151, 119157, - 119164, 119169, 119175, 119181, 119188, 119194, 119201, 119208, - 119216, 119220, 119225, 119230, 119236, 119241, 119247, 119253, - 119260, 119265, 119271, 119277, 119284, 119290, 119297, 119304, - 119312, 119317, 119323, 119329, 119336, 119342, 119349, 119356, - 119364, 119370, 119377, 119384, 119392, 119399, 119407, 119415, - 119424, 119428, 119433, 119438, 119444, 119449, 119455, 119461, - 119468, 119473, 119479, 119485, 119492, 119498, 119505, 119512, - 119520, 119525, 119531, 119537, 119544, 119550, 119557, 119564, - 119572, 119578, 119585, 119592, 119600, 119607, 119615, 119623, - 119632, 119637, 119643, 119649, 119656, 119662, 119669, 119676, - 119684, 119690, 119697, 119704, 119712, 119719, 119727, 119735, - 119744, 119750, 119757, 119764, 119772, 119779, 119787, 119795, - 119804, 119811, 119819, 119827, 119836, 119844, 119853, 119862, - 119872, 119876, 119881, 119886, 119892, 119897, 119903, 119909, - 119916, 119921, 119927, 119933, 119940, 119946, 119953, 119960, - 119968, 119973, 119979, 119985, 119992, 119998, 120005, 120012, - 120020, 120026, 120033, 120040, 120048, 120055, 120063, 120071, - 120080, 120085, 120091, 120097, 120104, 120110, 120117, 120124, - 120132, 120138, 120145, 120152, 120160, 120167, 120175, 120183, - 120192, 120198, 120205, 120212, 120220, 120227, 120235, 120243, - 120252, 120259, 120267, 120275, 120284, 120292, 120301, 120310, - 120320, 120325, 120331, 120337, 120344, 120350, 120357, 120364, - 120372, 120378, 120385, 120392, 120400, 120407, 120415, 120423, - 120432, 120438, 120445, 120452, 120460, 120467, 120475, 120483, - 120492, 120499, 120507, 120515, 120524, 120532, 120541, 120550, - 120560, 120566, 120573, 120580, 120588, 120595, 120603, 120611, - 120620, 120627, 120635, 120643, 120652, 120660, 120669, 120678, - 120688, 120695, 120703, 120711, 120720, 120728, 120737, 120746, - 120756, 120764, 120773, 120782, 120792, 120801, 120811, 120821, - 120832, 120834, 120837, 120840, 120844, 120847, 120851, 120855, - 120860, 120863, 120867, 120871, 120876, 120880, 120885, 120890, - 120896, 120899, 120903, 120907, 120912, 120916, 120921, 120926, - 120932, 120936, 120941, 120946, 120952, 120957, 120963, 120969, - 120976, 120979, 120983, 120987, 120992, 120996, 121001, 121006, - 121012, 121016, 121021, 121026, 121032, 121037, 121043, 121049, - 121056, 121060, 121065, 121070, 121076, 121081, 121087, 121093, - 121100, 121105, 121111, 121117, 121124, 121130, 121137, 121144, - 121152, 121155, 121159, 121163, 121168, 121172, 121177, 121182, - 121188, 121192, 121197, 121202, 121208, 121213, 121219, 121225, - 121232, 121236, 121241, 121246, 121252, 121257, 121263, 121269, - 121276, 121281, 121287, 121293, 121300, 121306, 121313, 121320, - 121328, 121332, 121337, 121342, 121348, 121353, 121359, 121365, - 121372, 121377, 121383, 121389, 121396, 121402, 121409, 121416, - 121424, 121429, 121435, 121441, 121448, 121454, 121461, 121468, - 121476, 121482, 121489, 121496, 121504, 121511, 121519, 121527, - 121536, 121539, 121543, 121547, 121552, 121556, 121561, 121566, - 121572, 121576, 121581, 121586, 121592, 121597, 121603, 121609, - 121616, 121620, 121625, 121630, 121636, 121641, 121647, 121653, - 121660, 121665, 121671, 121677, 121684, 121690, 121697, 121704, - 121712, 121716, 121721, 121726, 121732, 121737, 121743, 121749, - 121756, 121761, 121767, 121773, 121780, 121786, 121793, 121800, - 121808, 121813, 121819, 121825, 121832, 121838, 121845, 121852, - 121860, 121866, 121873, 121880, 121888, 121895, 121903, 121911, - 121920, 121924, 121929, 121934, 121940, 121945, 121951, 121957, - 121964, 121969, 121975, 121981, 121988, 121994, 122001, 122008, - 122016, 122021, 122027, 122033, 122040, 122046, 122053, 122060, - 122068, 122074, 122081, 122088, 122096, 122103, 122111, 122119, - 122128, 122133, 122139, 122145, 122152, 122158, 122165, 122172, - 122180, 122186, 122193, 122200, 122208, 122215, 122223, 122231, - 122240, 122246, 122253, 122260, 122268, 122275, 122283, 122291, - 122300, 122307, 122315, 122323, 122332, 122340, 122349, 122358, - 122368, 122371, 122375, 122379, 122384, 122388, 122393, 122398, - 122404, 122408, 122413, 122418, 122424, 122429, 122435, 122441, - 122448, 122452, 122457, 122462, 122468, 122473, 122479, 122485, - 122492, 122497, 122503, 122509, 122516, 122522, 122529, 122536, - 122544, 122548, 122553, 122558, 122564, 122569, 122575, 122581, - 122588, 122593, 122599, 122605, 122612, 122618, 122625, 122632, - 122640, 122645, 122651, 122657, 122664, 122670, 122677, 122684, - 122692, 122698, 122705, 122712, 122720, 122727, 122735, 122743, - 122752, 122756, 122761, 122766, 122772, 122777, 122783, 122789, - 122796, 122801, 122807, 122813, 122820, 122826, 122833, 122840, - 122848, 122853, 122859, 122865, 122872, 122878, 122885, 122892, - 122900, 122906, 122913, 122920, 122928, 122935, 122943, 122951, - 122960, 122965, 122971, 122977, 122984, 122990, 122997, 123004, - 123012, 123018, 123025, 123032, 123040, 123047, 123055, 123063, - 123072, 123078, 123085, 123092, 123100, 123107, 123115, 123123, - 123132, 123139, 123147, 123155, 123164, 123172, 123181, 123190, - 123200, 123204, 123209, 123214, 123220, 123225, 123231, 123237, - 123244, 123249, 123255, 123261, 123268, 123274, 123281, 123288, - 123296, 123301, 123307, 123313, 123320, 123326, 123333, 123340, - 123348, 123354, 123361, 123368, 123376, 123383, 123391, 123399, - 123408, 123413, 123419, 123425, 123432, 123438, 123445, 123452, - 123460, 123466, 123473, 123480, 123488, 123495, 123503, 123511, - 123520, 123526, 123533, 123540, 123548, 123555, 123563, 123571, - 123580, 123587, 123595, 123603, 123612, 123620, 123629, 123638, - 123648, 123653, 123659, 123665, 123672, 123678, 123685, 123692, - 123700, 123706, 123713, 123720, 123728, 123735, 123743, 123751, - 123760, 123766, 123773, 123780, 123788, 123795, 123803, 123811, - 123820, 123827, 123835, 123843, 123852, 123860, 123869, 123878, - 123888, 123894, 123901, 123908, 123916, 123923, 123931, 123939, - 123948, 123955, 123963, 123971, 123980, 123988, 123997, 124006, - 124016, 124023, 124031, 124039, 124048, 124056, 124065, 124074, - 124084, 124092, 124101, 124110, 124120, 124129, 124139, 124149, - 124160, 124163, 124167, 124171, 124176, 124180, 124185, 124190, - 124196, 124200, 124205, 124210, 124216, 124221, 124227, 124233, - 124240, 124244, 124249, 124254, 124260, 124265, 124271, 124277, - 124284, 124289, 124295, 124301, 124308, 124314, 124321, 124328, - 124336, 124340, 124345, 124350, 124356, 124361, 124367, 124373, - 124380, 124385, 124391, 124397, 124404, 124410, 124417, 124424, - 124432, 124437, 124443, 124449, 124456, 124462, 124469, 124476, - 124484, 124490, 124497, 124504, 124512, 124519, 124527, 124535, - 124544, 124548, 124553, 124558, 124564, 124569, 124575, 124581, - 124588, 124593, 124599, 124605, 124612, 124618, 124625, 124632, - 124640, 124645, 124651, 124657, 124664, 124670, 124677, 124684, - 124692, 124698, 124705, 124712, 124720, 124727, 124735, 124743, - 124752, 124757, 124763, 124769, 124776, 124782, 124789, 124796, - 124804, 124810, 124817, 124824, 124832, 124839, 124847, 124855, - 124864, 124870, 124877, 124884, 124892, 124899, 124907, 124915, - 124924, 124931, 124939, 124947, 124956, 124964, 124973, 124982, - 124992, 124996, 125001, 125006, 125012, 125017, 125023, 125029, - 125036, 125041, 125047, 125053, 125060, 125066, 125073, 125080, - 125088, 125093, 125099, 125105, 125112, 125118, 125125, 125132, - 125140, 125146, 125153, 125160, 125168, 125175, 125183, 125191, - 125200, 125205, 125211, 125217, 125224, 125230, 125237, 125244, - 125252, 125258, 125265, 125272, 125280, 125287, 125295, 125303, - 125312, 125318, 125325, 125332, 125340, 125347, 125355, 125363, - 125372, 125379, 125387, 125395, 125404, 125412, 125421, 125430, - 125440, 125445, 125451, 125457, 125464, 125470, 125477, 125484, - 125492, 125498, 125505, 125512, 125520, 125527, 125535, 125543, - 125552, 125558, 125565, 125572, 125580, 125587, 125595, 125603, - 125612, 125619, 125627, 125635, 125644, 125652, 125661, 125670, - 125680, 125686, 125693, 125700, 125708, 125715, 125723, 125731, - 125740, 125747, 125755, 125763, 125772, 125780, 125789, 125798, - 125808, 125815, 125823, 125831, 125840, 125848, 125857, 125866, - 125876, 125884, 125893, 125902, 125912, 125921, 125931, 125941, - 125952, 125956, 125961, 125966, 125972, 125977, 125983, 125989, - 125996, 126001, 126007, 126013, 126020, 126026, 126033, 126040, - 126048, 126053, 126059, 126065, 126072, 126078, 126085, 126092, - 126100, 126106, 126113, 126120, 126128, 126135, 126143, 126151, - 126160, 126165, 126171, 126177, 126184, 126190, 126197, 126204, - 126212, 126218, 126225, 126232, 126240, 126247, 126255, 126263, - 126272, 126278, 126285, 126292, 126300, 126307, 126315, 126323, - 126332, 126339, 126347, 126355, 126364, 126372, 126381, 126390, - 126400, 126405, 126411, 126417, 126424, 126430, 126437, 126444, - 126452, 126458, 126465, 126472, 126480, 126487, 126495, 126503, - 126512, 126518, 126525, 126532, 126540, 126547, 126555, 126563, - 126572, 126579, 126587, 126595, 126604, 126612, 126621, 126630, - 126640, 126646, 126653, 126660, 126668, 126675, 126683, 126691, - 126700, 126707, 126715, 126723, 126732, 126740, 126749, 126758, - 126768, 126775, 126783, 126791, 126800, 126808, 126817, 126826, - 126836, 126844, 126853, 126862, 126872, 126881, 126891, 126901, - 126912, 126917, 126923, 126929, 126936, 126942, 126949, 126956, - 126964, 126970, 126977, 126984, 126992, 126999, 127007, 127015, - 127024, 127030, 127037, 127044, 127052, 127059, 127067, 127075, - 127084, 127091, 127099, 127107, 127116, 127124, 127133, 127142, - 127152, 127158, 127165, 127172, 127180, 127187, 127195, 127203, - 127212, 127219, 127227, 127235, 127244, 127252, 127261, 127270, - 127280, 127287, 127295, 127303, 127312, 127320, 127329, 127338, - 127348, 127356, 127365, 127374, 127384, 127393, 127403, 127413, - 127424, 127430, 127437, 127444, 127452, 127459, 127467, 127475, - 127484, 127491, 127499, 127507, 127516, 127524, 127533, 127542, - 127552, 127559, 127567, 127575, 127584, 127592, 127601, 127610, - 127620, 127628, 127637, 127646, 127656, 127665, 127675, 127685, - 127696, 127703, 127711, 127719, 127728, 127736, 127745, 127754, - 127764, 127772, 127781, 127790, 127800, 127809, 127819, 127829, - 127840, 127848, 127857, 127866, 127876, 127885, 127895, 127905, - 127916, 127925, 127935, 127945, 127956, 127966, 127977, 127988, - 128000, 128002, 128005, 128008, 128012, 128015, 128019, 128023, - 128028, 128031, 128035, 128039, 128044, 128048, 128053, 128058, - 128064, 128067, 128071, 128075, 128080, 128084, 128089, 128094, - 128100, 128104, 128109, 128114, 128120, 128125, 128131, 128137, - 128144, 128147, 128151, 128155, 128160, 128164, 128169, 128174, - 128180, 128184, 128189, 128194, 128200, 128205, 128211, 128217, - 128224, 128228, 128233, 128238, 128244, 128249, 128255, 128261, - 128268, 128273, 128279, 128285, 128292, 128298, 128305, 128312, - 128320, 128323, 128327, 128331, 128336, 128340, 128345, 128350, - 128356, 128360, 128365, 128370, 128376, 128381, 128387, 128393, - 128400, 128404, 128409, 128414, 128420, 128425, 128431, 128437, - 128444, 128449, 128455, 128461, 128468, 128474, 128481, 128488, - 128496, 128500, 128505, 128510, 128516, 128521, 128527, 128533, - 128540, 128545, 128551, 128557, 128564, 128570, 128577, 128584, - 128592, 128597, 128603, 128609, 128616, 128622, 128629, 128636, - 128644, 128650, 128657, 128664, 128672, 128679, 128687, 128695, - 128704, 128707, 128711, 128715, 128720, 128724, 128729, 128734, - 128740, 128744, 128749, 128754, 128760, 128765, 128771, 128777, - 128784, 128788, 128793, 128798, 128804, 128809, 128815, 128821, - 128828, 128833, 128839, 128845, 128852, 128858, 128865, 128872, - 128880, 128884, 128889, 128894, 128900, 128905, 128911, 128917, - 128924, 128929, 128935, 128941, 128948, 128954, 128961, 128968, - 128976, 128981, 128987, 128993, 129000, 129006, 129013, 129020, - 129028, 129034, 129041, 129048, 129056, 129063, 129071, 129079, - 129088, 129092, 129097, 129102, 129108, 129113, 129119, 129125, - 129132, 129137, 129143, 129149, 129156, 129162, 129169, 129176, - 129184, 129189, 129195, 129201, 129208, 129214, 129221, 129228, - 129236, 129242, 129249, 129256, 129264, 129271, 129279, 129287, - 129296, 129301, 129307, 129313, 129320, 129326, 129333, 129340, - 129348, 129354, 129361, 129368, 129376, 129383, 129391, 129399, - 129408, 129414, 129421, 129428, 129436, 129443, 129451, 129459, - 129468, 129475, 129483, 129491, 129500, 129508, 129517, 129526, - 129536, 129539, 129543, 129547, 129552, 129556, 129561, 129566, - 129572, 129576, 129581, 129586, 129592, 129597, 129603, 129609, - 129616, 129620, 129625, 129630, 129636, 129641, 129647, 129653, - 129660, 129665, 129671, 129677, 129684, 129690, 129697, 129704, - 129712, 129716, 129721, 129726, 129732, 129737, 129743, 129749, - 129756, 129761, 129767, 129773, 129780, 129786, 129793, 129800, - 129808, 129813, 129819, 129825, 129832, 129838, 129845, 129852, - 129860, 129866, 129873, 129880, 129888, 129895, 129903, 129911, - 129920, 129924, 129929, 129934, 129940, 129945, 129951, 129957, - 129964, 129969, 129975, 129981, 129988, 129994, 130001, 130008, - 130016, 130021, 130027, 130033, 130040, 130046, 130053, 130060, - 130068, 130074, 130081, 130088, 130096, 130103, 130111, 130119, - 130128, 130133, 130139, 130145, 130152, 130158, 130165, 130172, - 130180, 130186, 130193, 130200, 130208, 130215, 130223, 130231, - 130240, 130246, 130253, 130260, 130268, 130275, 130283, 130291, - 130300, 130307, 130315, 130323, 130332, 130340, 130349, 130358, - 130368, 130372, 130377, 130382, 130388, 130393, 130399, 130405, - 130412, 130417, 130423, 130429, 130436, 130442, 130449, 130456, - 130464, 130469, 130475, 130481, 130488, 130494, 130501, 130508, - 130516, 130522, 130529, 130536, 130544, 130551, 130559, 130567, - 130576, 130581, 130587, 130593, 130600, 130606, 130613, 130620, - 130628, 130634, 130641, 130648, 130656, 130663, 130671, 130679, - 130688, 130694, 130701, 130708, 130716, 130723, 130731, 130739, - 130748, 130755, 130763, 130771, 130780, 130788, 130797, 130806, - 130816, 130821, 130827, 130833, 130840, 130846, 130853, 130860, - 130868, 130874, 130881, 130888, 130896, 130903, 130911, 130919, - 130928, 130934, 130941, 130948, 130956, 130963, 130971, 130979, - 130988, 130995, 131003, 131011, 131020, 131028, 131037, 131046, - 131056, 131062, 131069, 131076, 131084, 131091, 131099, 131107, - 131116, 131123, 131131, 131139, 131148, 131156, 131165, 131174, - 131184, 131191, 131199, 131207, 131216, 131224, 131233, 131242, - 131252, 131260, 131269, 131278, 131288, 131297, 131307, 131317, - 131328, 131331, 131335, 131339, 131344, 131348, 131353, 131358, - 131364, 131368, 131373, 131378, 131384, 131389, 131395, 131401, - 131408, 131412, 131417, 131422, 131428, 131433, 131439, 131445, - 131452, 131457, 131463, 131469, 131476, 131482, 131489, 131496, - 131504, 131508, 131513, 131518, 131524, 131529, 131535, 131541, - 131548, 131553, 131559, 131565, 131572, 131578, 131585, 131592, - 131600, 131605, 131611, 131617, 131624, 131630, 131637, 131644, - 131652, 131658, 131665, 131672, 131680, 131687, 131695, 131703, - 131712, 131716, 131721, 131726, 131732, 131737, 131743, 131749, - 131756, 131761, 131767, 131773, 131780, 131786, 131793, 131800, - 131808, 131813, 131819, 131825, 131832, 131838, 131845, 131852, - 131860, 131866, 131873, 131880, 131888, 131895, 131903, 131911, - 131920, 131925, 131931, 131937, 131944, 131950, 131957, 131964, - 131972, 131978, 131985, 131992, 132000, 132007, 132015, 132023, - 132032, 132038, 132045, 132052, 132060, 132067, 132075, 132083, - 132092, 132099, 132107, 132115, 132124, 132132, 132141, 132150, - 132160, 132164, 132169, 132174, 132180, 132185, 132191, 132197, - 132204, 132209, 132215, 132221, 132228, 132234, 132241, 132248, - 132256, 132261, 132267, 132273, 132280, 132286, 132293, 132300, - 132308, 132314, 132321, 132328, 132336, 132343, 132351, 132359, - 132368, 132373, 132379, 132385, 132392, 132398, 132405, 132412, - 132420, 132426, 132433, 132440, 132448, 132455, 132463, 132471, - 132480, 132486, 132493, 132500, 132508, 132515, 132523, 132531, - 132540, 132547, 132555, 132563, 132572, 132580, 132589, 132598, - 132608, 132613, 132619, 132625, 132632, 132638, 132645, 132652, - 132660, 132666, 132673, 132680, 132688, 132695, 132703, 132711, - 132720, 132726, 132733, 132740, 132748, 132755, 132763, 132771, - 132780, 132787, 132795, 132803, 132812, 132820, 132829, 132838, - 132848, 132854, 132861, 132868, 132876, 132883, 132891, 132899, - 132908, 132915, 132923, 132931, 132940, 132948, 132957, 132966, - 132976, 132983, 132991, 132999, 133008, 133016, 133025, 133034, - 133044, 133052, 133061, 133070, 133080, 133089, 133099, 133109, - 133120, 133124, 133129, 133134, 133140, 133145, 133151, 133157, - 133164, 133169, 133175, 133181, 133188, 133194, 133201, 133208, - 133216, 133221, 133227, 133233, 133240, 133246, 133253, 133260, - 133268, 133274, 133281, 133288, 133296, 133303, 133311, 133319, - 133328, 133333, 133339, 133345, 133352, 133358, 133365, 133372, - 133380, 133386, 133393, 133400, 133408, 133415, 133423, 133431, - 133440, 133446, 133453, 133460, 133468, 133475, 133483, 133491, - 133500, 133507, 133515, 133523, 133532, 133540, 133549, 133558, - 133568, 133573, 133579, 133585, 133592, 133598, 133605, 133612, - 133620, 133626, 133633, 133640, 133648, 133655, 133663, 133671, - 133680, 133686, 133693, 133700, 133708, 133715, 133723, 133731, - 133740, 133747, 133755, 133763, 133772, 133780, 133789, 133798, - 133808, 133814, 133821, 133828, 133836, 133843, 133851, 133859, - 133868, 133875, 133883, 133891, 133900, 133908, 133917, 133926, - 133936, 133943, 133951, 133959, 133968, 133976, 133985, 133994, - 134004, 134012, 134021, 134030, 134040, 134049, 134059, 134069, - 134080, 134085, 134091, 134097, 134104, 134110, 134117, 134124, - 134132, 134138, 134145, 134152, 134160, 134167, 134175, 134183, - 134192, 134198, 134205, 134212, 134220, 134227, 134235, 134243, - 134252, 134259, 134267, 134275, 134284, 134292, 134301, 134310, - 134320, 134326, 134333, 134340, 134348, 134355, 134363, 134371, - 134380, 134387, 134395, 134403, 134412, 134420, 134429, 134438, - 134448, 134455, 134463, 134471, 134480, 134488, 134497, 134506, - 134516, 134524, 134533, 134542, 134552, 134561, 134571, 134581, - 134592, 134598, 134605, 134612, 134620, 134627, 134635, 134643, - 134652, 134659, 134667, 134675, 134684, 134692, 134701, 134710, - 134720, 134727, 134735, 134743, 134752, 134760, 134769, 134778, - 134788, 134796, 134805, 134814, 134824, 134833, 134843, 134853, - 134864, 134871, 134879, 134887, 134896, 134904, 134913, 134922, - 134932, 134940, 134949, 134958, 134968, 134977, 134987, 134997, - 135008, 135016, 135025, 135034, 135044, 135053, 135063, 135073, - 135084, 135093, 135103, 135113, 135124, 135134, 135145, 135156, - 135168, 135171, 135175, 135179, 135184, 135188, 135193, 135198, - 135204, 135208, 135213, 135218, 135224, 135229, 135235, 135241, - 135248, 135252, 135257, 135262, 135268, 135273, 135279, 135285, - 135292, 135297, 135303, 135309, 135316, 135322, 135329, 135336, - 135344, 135348, 135353, 135358, 135364, 135369, 135375, 135381, - 135388, 135393, 135399, 135405, 135412, 135418, 135425, 135432, - 135440, 135445, 135451, 135457, 135464, 135470, 135477, 135484, - 135492, 135498, 135505, 135512, 135520, 135527, 135535, 135543, - 135552, 135556, 135561, 135566, 135572, 135577, 135583, 135589, - 135596, 135601, 135607, 135613, 135620, 135626, 135633, 135640, - 135648, 135653, 135659, 135665, 135672, 135678, 135685, 135692, - 135700, 135706, 135713, 135720, 135728, 135735, 135743, 135751, - 135760, 135765, 135771, 135777, 135784, 135790, 135797, 135804, - 135812, 135818, 135825, 135832, 135840, 135847, 135855, 135863, - 135872, 135878, 135885, 135892, 135900, 135907, 135915, 135923, - 135932, 135939, 135947, 135955, 135964, 135972, 135981, 135990, - 136000, 136004, 136009, 136014, 136020, 136025, 136031, 136037, - 136044, 136049, 136055, 136061, 136068, 136074, 136081, 136088, - 136096, 136101, 136107, 136113, 136120, 136126, 136133, 136140, - 136148, 136154, 136161, 136168, 136176, 136183, 136191, 136199, - 136208, 136213, 136219, 136225, 136232, 136238, 136245, 136252, - 136260, 136266, 136273, 136280, 136288, 136295, 136303, 136311, - 136320, 136326, 136333, 136340, 136348, 136355, 136363, 136371, - 136380, 136387, 136395, 136403, 136412, 136420, 136429, 136438, - 136448, 136453, 136459, 136465, 136472, 136478, 136485, 136492, - 136500, 136506, 136513, 136520, 136528, 136535, 136543, 136551, - 136560, 136566, 136573, 136580, 136588, 136595, 136603, 136611, - 136620, 136627, 136635, 136643, 136652, 136660, 136669, 136678, - 136688, 136694, 136701, 136708, 136716, 136723, 136731, 136739, - 136748, 136755, 136763, 136771, 136780, 136788, 136797, 136806, - 136816, 136823, 136831, 136839, 136848, 136856, 136865, 136874, - 136884, 136892, 136901, 136910, 136920, 136929, 136939, 136949, - 136960, 136964, 136969, 136974, 136980, 136985, 136991, 136997, - 137004, 137009, 137015, 137021, 137028, 137034, 137041, 137048, - 137056, 137061, 137067, 137073, 137080, 137086, 137093, 137100, - 137108, 137114, 137121, 137128, 137136, 137143, 137151, 137159, - 137168, 137173, 137179, 137185, 137192, 137198, 137205, 137212, - 137220, 137226, 137233, 137240, 137248, 137255, 137263, 137271, - 137280, 137286, 137293, 137300, 137308, 137315, 137323, 137331, - 137340, 137347, 137355, 137363, 137372, 137380, 137389, 137398, - 137408, 137413, 137419, 137425, 137432, 137438, 137445, 137452, - 137460, 137466, 137473, 137480, 137488, 137495, 137503, 137511, - 137520, 137526, 137533, 137540, 137548, 137555, 137563, 137571, - 137580, 137587, 137595, 137603, 137612, 137620, 137629, 137638, - 137648, 137654, 137661, 137668, 137676, 137683, 137691, 137699, - 137708, 137715, 137723, 137731, 137740, 137748, 137757, 137766, - 137776, 137783, 137791, 137799, 137808, 137816, 137825, 137834, - 137844, 137852, 137861, 137870, 137880, 137889, 137899, 137909, - 137920, 137925, 137931, 137937, 137944, 137950, 137957, 137964, - 137972, 137978, 137985, 137992, 138000, 138007, 138015, 138023, - 138032, 138038, 138045, 138052, 138060, 138067, 138075, 138083, - 138092, 138099, 138107, 138115, 138124, 138132, 138141, 138150, - 138160, 138166, 138173, 138180, 138188, 138195, 138203, 138211, - 138220, 138227, 138235, 138243, 138252, 138260, 138269, 138278, - 138288, 138295, 138303, 138311, 138320, 138328, 138337, 138346, - 138356, 138364, 138373, 138382, 138392, 138401, 138411, 138421, - 138432, 138438, 138445, 138452, 138460, 138467, 138475, 138483, - 138492, 138499, 138507, 138515, 138524, 138532, 138541, 138550, - 138560, 138567, 138575, 138583, 138592, 138600, 138609, 138618, - 138628, 138636, 138645, 138654, 138664, 138673, 138683, 138693, - 138704, 138711, 138719, 138727, 138736, 138744, 138753, 138762, - 138772, 138780, 138789, 138798, 138808, 138817, 138827, 138837, - 138848, 138856, 138865, 138874, 138884, 138893, 138903, 138913, - 138924, 138933, 138943, 138953, 138964, 138974, 138985, 138996, - 139008, 139012, 139017, 139022, 139028, 139033, 139039, 139045, - 139052, 139057, 139063, 139069, 139076, 139082, 139089, 139096, - 139104, 139109, 139115, 139121, 139128, 139134, 139141, 139148, - 139156, 139162, 139169, 139176, 139184, 139191, 139199, 139207, - 139216, 139221, 139227, 139233, 139240, 139246, 139253, 139260, - 139268, 139274, 139281, 139288, 139296, 139303, 139311, 139319, - 139328, 139334, 139341, 139348, 139356, 139363, 139371, 139379, - 139388, 139395, 139403, 139411, 139420, 139428, 139437, 139446, - 139456, 139461, 139467, 139473, 139480, 139486, 139493, 139500, - 139508, 139514, 139521, 139528, 139536, 139543, 139551, 139559, - 139568, 139574, 139581, 139588, 139596, 139603, 139611, 139619, - 139628, 139635, 139643, 139651, 139660, 139668, 139677, 139686, - 139696, 139702, 139709, 139716, 139724, 139731, 139739, 139747, - 139756, 139763, 139771, 139779, 139788, 139796, 139805, 139814, - 139824, 139831, 139839, 139847, 139856, 139864, 139873, 139882, - 139892, 139900, 139909, 139918, 139928, 139937, 139947, 139957, - 139968, 139973, 139979, 139985, 139992, 139998, 140005, 140012, - 140020, 140026, 140033, 140040, 140048, 140055, 140063, 140071, - 140080, 140086, 140093, 140100, 140108, 140115, 140123, 140131, - 140140, 140147, 140155, 140163, 140172, 140180, 140189, 140198, - 140208, 140214, 140221, 140228, 140236, 140243, 140251, 140259, - 140268, 140275, 140283, 140291, 140300, 140308, 140317, 140326, - 140336, 140343, 140351, 140359, 140368, 140376, 140385, 140394, - 140404, 140412, 140421, 140430, 140440, 140449, 140459, 140469, - 140480, 140486, 140493, 140500, 140508, 140515, 140523, 140531, - 140540, 140547, 140555, 140563, 140572, 140580, 140589, 140598, - 140608, 140615, 140623, 140631, 140640, 140648, 140657, 140666, - 140676, 140684, 140693, 140702, 140712, 140721, 140731, 140741, - 140752, 140759, 140767, 140775, 140784, 140792, 140801, 140810, - 140820, 140828, 140837, 140846, 140856, 140865, 140875, 140885, - 140896, 140904, 140913, 140922, 140932, 140941, 140951, 140961, - 140972, 140981, 140991, 141001, 141012, 141022, 141033, 141044, - 141056, 141061, 141067, 141073, 141080, 141086, 141093, 141100, - 141108, 141114, 141121, 141128, 141136, 141143, 141151, 141159, - 141168, 141174, 141181, 141188, 141196, 141203, 141211, 141219, - 141228, 141235, 141243, 141251, 141260, 141268, 141277, 141286, - 141296, 141302, 141309, 141316, 141324, 141331, 141339, 141347, - 141356, 141363, 141371, 141379, 141388, 141396, 141405, 141414, - 141424, 141431, 141439, 141447, 141456, 141464, 141473, 141482, - 141492, 141500, 141509, 141518, 141528, 141537, 141547, 141557, - 141568, 141574, 141581, 141588, 141596, 141603, 141611, 141619, - 141628, 141635, 141643, 141651, 141660, 141668, 141677, 141686, - 141696, 141703, 141711, 141719, 141728, 141736, 141745, 141754, - 141764, 141772, 141781, 141790, 141800, 141809, 141819, 141829, - 141840, 141847, 141855, 141863, 141872, 141880, 141889, 141898, - 141908, 141916, 141925, 141934, 141944, 141953, 141963, 141973, - 141984, 141992, 142001, 142010, 142020, 142029, 142039, 142049, - 142060, 142069, 142079, 142089, 142100, 142110, 142121, 142132, - 142144, 142150, 142157, 142164, 142172, 142179, 142187, 142195, - 142204, 142211, 142219, 142227, 142236, 142244, 142253, 142262, - 142272, 142279, 142287, 142295, 142304, 142312, 142321, 142330, - 142340, 142348, 142357, 142366, 142376, 142385, 142395, 142405, - 142416, 142423, 142431, 142439, 142448, 142456, 142465, 142474, - 142484, 142492, 142501, 142510, 142520, 142529, 142539, 142549, - 142560, 142568, 142577, 142586, 142596, 142605, 142615, 142625, - 142636, 142645, 142655, 142665, 142676, 142686, 142697, 142708, - 142720, 142727, 142735, 142743, 142752, 142760, 142769, 142778, - 142788, 142796, 142805, 142814, 142824, 142833, 142843, 142853, - 142864, 142872, 142881, 142890, 142900, 142909, 142919, 142929, - 142940, 142949, 142959, 142969, 142980, 142990, 143001, 143012, - 143024, 143032, 143041, 143050, 143060, 143069, 143079, 143089, - 143100, 143109, 143119, 143129, 143140, 143150, 143161, 143172, - 143184, 143193, 143203, 143213, 143224, 143234, 143245, 143256, - 143268, 143278, 143289, 143300, 143312, 143323, 143335, 143347, - 143360, 143362, 143365, 143368, 143372, 143375, 143379, 143383, - 143388, 143391, 143395, 143399, 143404, 143408, 143413, 143418, - 143424, 143427, 143431, 143435, 143440, 143444, 143449, 143454, - 143460, 143464, 143469, 143474, 143480, 143485, 143491, 143497, - 143504, 143507, 143511, 143515, 143520, 143524, 143529, 143534, - 143540, 143544, 143549, 143554, 143560, 143565, 143571, 143577, - 143584, 143588, 143593, 143598, 143604, 143609, 143615, 143621, - 143628, 143633, 143639, 143645, 143652, 143658, 143665, 143672, - 143680, 143683, 143687, 143691, 143696, 143700, 143705, 143710, - 143716, 143720, 143725, 143730, 143736, 143741, 143747, 143753, - 143760, 143764, 143769, 143774, 143780, 143785, 143791, 143797, - 143804, 143809, 143815, 143821, 143828, 143834, 143841, 143848, - 143856, 143860, 143865, 143870, 143876, 143881, 143887, 143893, - 143900, 143905, 143911, 143917, 143924, 143930, 143937, 143944, - 143952, 143957, 143963, 143969, 143976, 143982, 143989, 143996, - 144004, 144010, 144017, 144024, 144032, 144039, 144047, 144055, - 144064, 144067, 144071, 144075, 144080, 144084, 144089, 144094, - 144100, 144104, 144109, 144114, 144120, 144125, 144131, 144137, - 144144, 144148, 144153, 144158, 144164, 144169, 144175, 144181, - 144188, 144193, 144199, 144205, 144212, 144218, 144225, 144232, - 144240, 144244, 144249, 144254, 144260, 144265, 144271, 144277, - 144284, 144289, 144295, 144301, 144308, 144314, 144321, 144328, - 144336, 144341, 144347, 144353, 144360, 144366, 144373, 144380, - 144388, 144394, 144401, 144408, 144416, 144423, 144431, 144439, - 144448, 144452, 144457, 144462, 144468, 144473, 144479, 144485, - 144492, 144497, 144503, 144509, 144516, 144522, 144529, 144536, - 144544, 144549, 144555, 144561, 144568, 144574, 144581, 144588, - 144596, 144602, 144609, 144616, 144624, 144631, 144639, 144647, - 144656, 144661, 144667, 144673, 144680, 144686, 144693, 144700, - 144708, 144714, 144721, 144728, 144736, 144743, 144751, 144759, - 144768, 144774, 144781, 144788, 144796, 144803, 144811, 144819, - 144828, 144835, 144843, 144851, 144860, 144868, 144877, 144886, - 144896, 144899, 144903, 144907, 144912, 144916, 144921, 144926, - 144932, 144936, 144941, 144946, 144952, 144957, 144963, 144969, - 144976, 144980, 144985, 144990, 144996, 145001, 145007, 145013, - 145020, 145025, 145031, 145037, 145044, 145050, 145057, 145064, - 145072, 145076, 145081, 145086, 145092, 145097, 145103, 145109, - 145116, 145121, 145127, 145133, 145140, 145146, 145153, 145160, - 145168, 145173, 145179, 145185, 145192, 145198, 145205, 145212, - 145220, 145226, 145233, 145240, 145248, 145255, 145263, 145271, - 145280, 145284, 145289, 145294, 145300, 145305, 145311, 145317, - 145324, 145329, 145335, 145341, 145348, 145354, 145361, 145368, - 145376, 145381, 145387, 145393, 145400, 145406, 145413, 145420, - 145428, 145434, 145441, 145448, 145456, 145463, 145471, 145479, - 145488, 145493, 145499, 145505, 145512, 145518, 145525, 145532, - 145540, 145546, 145553, 145560, 145568, 145575, 145583, 145591, - 145600, 145606, 145613, 145620, 145628, 145635, 145643, 145651, - 145660, 145667, 145675, 145683, 145692, 145700, 145709, 145718, - 145728, 145732, 145737, 145742, 145748, 145753, 145759, 145765, - 145772, 145777, 145783, 145789, 145796, 145802, 145809, 145816, - 145824, 145829, 145835, 145841, 145848, 145854, 145861, 145868, - 145876, 145882, 145889, 145896, 145904, 145911, 145919, 145927, - 145936, 145941, 145947, 145953, 145960, 145966, 145973, 145980, - 145988, 145994, 146001, 146008, 146016, 146023, 146031, 146039, - 146048, 146054, 146061, 146068, 146076, 146083, 146091, 146099, - 146108, 146115, 146123, 146131, 146140, 146148, 146157, 146166, - 146176, 146181, 146187, 146193, 146200, 146206, 146213, 146220, - 146228, 146234, 146241, 146248, 146256, 146263, 146271, 146279, - 146288, 146294, 146301, 146308, 146316, 146323, 146331, 146339, - 146348, 146355, 146363, 146371, 146380, 146388, 146397, 146406, - 146416, 146422, 146429, 146436, 146444, 146451, 146459, 146467, - 146476, 146483, 146491, 146499, 146508, 146516, 146525, 146534, - 146544, 146551, 146559, 146567, 146576, 146584, 146593, 146602, - 146612, 146620, 146629, 146638, 146648, 146657, 146667, 146677, - 146688, 146691, 146695, 146699, 146704, 146708, 146713, 146718, - 146724, 146728, 146733, 146738, 146744, 146749, 146755, 146761, - 146768, 146772, 146777, 146782, 146788, 146793, 146799, 146805, - 146812, 146817, 146823, 146829, 146836, 146842, 146849, 146856, - 146864, 146868, 146873, 146878, 146884, 146889, 146895, 146901, - 146908, 146913, 146919, 146925, 146932, 146938, 146945, 146952, - 146960, 146965, 146971, 146977, 146984, 146990, 146997, 147004, - 147012, 147018, 147025, 147032, 147040, 147047, 147055, 147063, - 147072, 147076, 147081, 147086, 147092, 147097, 147103, 147109, - 147116, 147121, 147127, 147133, 147140, 147146, 147153, 147160, - 147168, 147173, 147179, 147185, 147192, 147198, 147205, 147212, - 147220, 147226, 147233, 147240, 147248, 147255, 147263, 147271, - 147280, 147285, 147291, 147297, 147304, 147310, 147317, 147324, - 147332, 147338, 147345, 147352, 147360, 147367, 147375, 147383, - 147392, 147398, 147405, 147412, 147420, 147427, 147435, 147443, - 147452, 147459, 147467, 147475, 147484, 147492, 147501, 147510, - 147520, 147524, 147529, 147534, 147540, 147545, 147551, 147557, - 147564, 147569, 147575, 147581, 147588, 147594, 147601, 147608, - 147616, 147621, 147627, 147633, 147640, 147646, 147653, 147660, - 147668, 147674, 147681, 147688, 147696, 147703, 147711, 147719, - 147728, 147733, 147739, 147745, 147752, 147758, 147765, 147772, - 147780, 147786, 147793, 147800, 147808, 147815, 147823, 147831, - 147840, 147846, 147853, 147860, 147868, 147875, 147883, 147891, - 147900, 147907, 147915, 147923, 147932, 147940, 147949, 147958, - 147968, 147973, 147979, 147985, 147992, 147998, 148005, 148012, - 148020, 148026, 148033, 148040, 148048, 148055, 148063, 148071, - 148080, 148086, 148093, 148100, 148108, 148115, 148123, 148131, - 148140, 148147, 148155, 148163, 148172, 148180, 148189, 148198, - 148208, 148214, 148221, 148228, 148236, 148243, 148251, 148259, - 148268, 148275, 148283, 148291, 148300, 148308, 148317, 148326, - 148336, 148343, 148351, 148359, 148368, 148376, 148385, 148394, - 148404, 148412, 148421, 148430, 148440, 148449, 148459, 148469, - 148480, 148484, 148489, 148494, 148500, 148505, 148511, 148517, - 148524, 148529, 148535, 148541, 148548, 148554, 148561, 148568, - 148576, 148581, 148587, 148593, 148600, 148606, 148613, 148620, - 148628, 148634, 148641, 148648, 148656, 148663, 148671, 148679, - 148688, 148693, 148699, 148705, 148712, 148718, 148725, 148732, - 148740, 148746, 148753, 148760, 148768, 148775, 148783, 148791, - 148800, 148806, 148813, 148820, 148828, 148835, 148843, 148851, - 148860, 148867, 148875, 148883, 148892, 148900, 148909, 148918, - 148928, 148933, 148939, 148945, 148952, 148958, 148965, 148972, - 148980, 148986, 148993, 149000, 149008, 149015, 149023, 149031, - 149040, 149046, 149053, 149060, 149068, 149075, 149083, 149091, - 149100, 149107, 149115, 149123, 149132, 149140, 149149, 149158, - 149168, 149174, 149181, 149188, 149196, 149203, 149211, 149219, - 149228, 149235, 149243, 149251, 149260, 149268, 149277, 149286, - 149296, 149303, 149311, 149319, 149328, 149336, 149345, 149354, - 149364, 149372, 149381, 149390, 149400, 149409, 149419, 149429, - 149440, 149445, 149451, 149457, 149464, 149470, 149477, 149484, - 149492, 149498, 149505, 149512, 149520, 149527, 149535, 149543, - 149552, 149558, 149565, 149572, 149580, 149587, 149595, 149603, - 149612, 149619, 149627, 149635, 149644, 149652, 149661, 149670, - 149680, 149686, 149693, 149700, 149708, 149715, 149723, 149731, - 149740, 149747, 149755, 149763, 149772, 149780, 149789, 149798, - 149808, 149815, 149823, 149831, 149840, 149848, 149857, 149866, - 149876, 149884, 149893, 149902, 149912, 149921, 149931, 149941, - 149952, 149958, 149965, 149972, 149980, 149987, 149995, 150003, - 150012, 150019, 150027, 150035, 150044, 150052, 150061, 150070, - 150080, 150087, 150095, 150103, 150112, 150120, 150129, 150138, - 150148, 150156, 150165, 150174, 150184, 150193, 150203, 150213, - 150224, 150231, 150239, 150247, 150256, 150264, 150273, 150282, - 150292, 150300, 150309, 150318, 150328, 150337, 150347, 150357, - 150368, 150376, 150385, 150394, 150404, 150413, 150423, 150433, - 150444, 150453, 150463, 150473, 150484, 150494, 150505, 150516, - 150528, 150531, 150535, 150539, 150544, 150548, 150553, 150558, - 150564, 150568, 150573, 150578, 150584, 150589, 150595, 150601, - 150608, 150612, 150617, 150622, 150628, 150633, 150639, 150645, - 150652, 150657, 150663, 150669, 150676, 150682, 150689, 150696, - 150704, 150708, 150713, 150718, 150724, 150729, 150735, 150741, - 150748, 150753, 150759, 150765, 150772, 150778, 150785, 150792, - 150800, 150805, 150811, 150817, 150824, 150830, 150837, 150844, - 150852, 150858, 150865, 150872, 150880, 150887, 150895, 150903, - 150912, 150916, 150921, 150926, 150932, 150937, 150943, 150949, - 150956, 150961, 150967, 150973, 150980, 150986, 150993, 151000, - 151008, 151013, 151019, 151025, 151032, 151038, 151045, 151052, - 151060, 151066, 151073, 151080, 151088, 151095, 151103, 151111, - 151120, 151125, 151131, 151137, 151144, 151150, 151157, 151164, - 151172, 151178, 151185, 151192, 151200, 151207, 151215, 151223, - 151232, 151238, 151245, 151252, 151260, 151267, 151275, 151283, - 151292, 151299, 151307, 151315, 151324, 151332, 151341, 151350, - 151360, 151364, 151369, 151374, 151380, 151385, 151391, 151397, - 151404, 151409, 151415, 151421, 151428, 151434, 151441, 151448, - 151456, 151461, 151467, 151473, 151480, 151486, 151493, 151500, - 151508, 151514, 151521, 151528, 151536, 151543, 151551, 151559, - 151568, 151573, 151579, 151585, 151592, 151598, 151605, 151612, - 151620, 151626, 151633, 151640, 151648, 151655, 151663, 151671, - 151680, 151686, 151693, 151700, 151708, 151715, 151723, 151731, - 151740, 151747, 151755, 151763, 151772, 151780, 151789, 151798, - 151808, 151813, 151819, 151825, 151832, 151838, 151845, 151852, - 151860, 151866, 151873, 151880, 151888, 151895, 151903, 151911, - 151920, 151926, 151933, 151940, 151948, 151955, 151963, 151971, - 151980, 151987, 151995, 152003, 152012, 152020, 152029, 152038, - 152048, 152054, 152061, 152068, 152076, 152083, 152091, 152099, - 152108, 152115, 152123, 152131, 152140, 152148, 152157, 152166, - 152176, 152183, 152191, 152199, 152208, 152216, 152225, 152234, - 152244, 152252, 152261, 152270, 152280, 152289, 152299, 152309, - 152320, 152324, 152329, 152334, 152340, 152345, 152351, 152357, - 152364, 152369, 152375, 152381, 152388, 152394, 152401, 152408, - 152416, 152421, 152427, 152433, 152440, 152446, 152453, 152460, - 152468, 152474, 152481, 152488, 152496, 152503, 152511, 152519, - 152528, 152533, 152539, 152545, 152552, 152558, 152565, 152572, - 152580, 152586, 152593, 152600, 152608, 152615, 152623, 152631, - 152640, 152646, 152653, 152660, 152668, 152675, 152683, 152691, - 152700, 152707, 152715, 152723, 152732, 152740, 152749, 152758, - 152768, 152773, 152779, 152785, 152792, 152798, 152805, 152812, - 152820, 152826, 152833, 152840, 152848, 152855, 152863, 152871, - 152880, 152886, 152893, 152900, 152908, 152915, 152923, 152931, - 152940, 152947, 152955, 152963, 152972, 152980, 152989, 152998, - 153008, 153014, 153021, 153028, 153036, 153043, 153051, 153059, - 153068, 153075, 153083, 153091, 153100, 153108, 153117, 153126, - 153136, 153143, 153151, 153159, 153168, 153176, 153185, 153194, - 153204, 153212, 153221, 153230, 153240, 153249, 153259, 153269, - 153280, 153285, 153291, 153297, 153304, 153310, 153317, 153324, - 153332, 153338, 153345, 153352, 153360, 153367, 153375, 153383, - 153392, 153398, 153405, 153412, 153420, 153427, 153435, 153443, - 153452, 153459, 153467, 153475, 153484, 153492, 153501, 153510, - 153520, 153526, 153533, 153540, 153548, 153555, 153563, 153571, - 153580, 153587, 153595, 153603, 153612, 153620, 153629, 153638, - 153648, 153655, 153663, 153671, 153680, 153688, 153697, 153706, - 153716, 153724, 153733, 153742, 153752, 153761, 153771, 153781, - 153792, 153798, 153805, 153812, 153820, 153827, 153835, 153843, - 153852, 153859, 153867, 153875, 153884, 153892, 153901, 153910, - 153920, 153927, 153935, 153943, 153952, 153960, 153969, 153978, - 153988, 153996, 154005, 154014, 154024, 154033, 154043, 154053, - 154064, 154071, 154079, 154087, 154096, 154104, 154113, 154122, - 154132, 154140, 154149, 154158, 154168, 154177, 154187, 154197, - 154208, 154216, 154225, 154234, 154244, 154253, 154263, 154273, - 154284, 154293, 154303, 154313, 154324, 154334, 154345, 154356, - 154368, 154372, 154377, 154382, 154388, 154393, 154399, 154405, - 154412, 154417, 154423, 154429, 154436, 154442, 154449, 154456, - 154464, 154469, 154475, 154481, 154488, 154494, 154501, 154508, - 154516, 154522, 154529, 154536, 154544, 154551, 154559, 154567, - 154576, 154581, 154587, 154593, 154600, 154606, 154613, 154620, - 154628, 154634, 154641, 154648, 154656, 154663, 154671, 154679, - 154688, 154694, 154701, 154708, 154716, 154723, 154731, 154739, - 154748, 154755, 154763, 154771, 154780, 154788, 154797, 154806, - 154816, 154821, 154827, 154833, 154840, 154846, 154853, 154860, - 154868, 154874, 154881, 154888, 154896, 154903, 154911, 154919, - 154928, 154934, 154941, 154948, 154956, 154963, 154971, 154979, - 154988, 154995, 155003, 155011, 155020, 155028, 155037, 155046, - 155056, 155062, 155069, 155076, 155084, 155091, 155099, 155107, - 155116, 155123, 155131, 155139, 155148, 155156, 155165, 155174, - 155184, 155191, 155199, 155207, 155216, 155224, 155233, 155242, - 155252, 155260, 155269, 155278, 155288, 155297, 155307, 155317, - 155328, 155333, 155339, 155345, 155352, 155358, 155365, 155372, - 155380, 155386, 155393, 155400, 155408, 155415, 155423, 155431, - 155440, 155446, 155453, 155460, 155468, 155475, 155483, 155491, - 155500, 155507, 155515, 155523, 155532, 155540, 155549, 155558, - 155568, 155574, 155581, 155588, 155596, 155603, 155611, 155619, - 155628, 155635, 155643, 155651, 155660, 155668, 155677, 155686, - 155696, 155703, 155711, 155719, 155728, 155736, 155745, 155754, - 155764, 155772, 155781, 155790, 155800, 155809, 155819, 155829, - 155840, 155846, 155853, 155860, 155868, 155875, 155883, 155891, - 155900, 155907, 155915, 155923, 155932, 155940, 155949, 155958, - 155968, 155975, 155983, 155991, 156000, 156008, 156017, 156026, - 156036, 156044, 156053, 156062, 156072, 156081, 156091, 156101, - 156112, 156119, 156127, 156135, 156144, 156152, 156161, 156170, - 156180, 156188, 156197, 156206, 156216, 156225, 156235, 156245, - 156256, 156264, 156273, 156282, 156292, 156301, 156311, 156321, - 156332, 156341, 156351, 156361, 156372, 156382, 156393, 156404, - 156416, 156421, 156427, 156433, 156440, 156446, 156453, 156460, - 156468, 156474, 156481, 156488, 156496, 156503, 156511, 156519, - 156528, 156534, 156541, 156548, 156556, 156563, 156571, 156579, - 156588, 156595, 156603, 156611, 156620, 156628, 156637, 156646, - 156656, 156662, 156669, 156676, 156684, 156691, 156699, 156707, - 156716, 156723, 156731, 156739, 156748, 156756, 156765, 156774, - 156784, 156791, 156799, 156807, 156816, 156824, 156833, 156842, - 156852, 156860, 156869, 156878, 156888, 156897, 156907, 156917, - 156928, 156934, 156941, 156948, 156956, 156963, 156971, 156979, - 156988, 156995, 157003, 157011, 157020, 157028, 157037, 157046, - 157056, 157063, 157071, 157079, 157088, 157096, 157105, 157114, - 157124, 157132, 157141, 157150, 157160, 157169, 157179, 157189, - 157200, 157207, 157215, 157223, 157232, 157240, 157249, 157258, - 157268, 157276, 157285, 157294, 157304, 157313, 157323, 157333, - 157344, 157352, 157361, 157370, 157380, 157389, 157399, 157409, - 157420, 157429, 157439, 157449, 157460, 157470, 157481, 157492, - 157504, 157510, 157517, 157524, 157532, 157539, 157547, 157555, - 157564, 157571, 157579, 157587, 157596, 157604, 157613, 157622, - 157632, 157639, 157647, 157655, 157664, 157672, 157681, 157690, - 157700, 157708, 157717, 157726, 157736, 157745, 157755, 157765, - 157776, 157783, 157791, 157799, 157808, 157816, 157825, 157834, - 157844, 157852, 157861, 157870, 157880, 157889, 157899, 157909, - 157920, 157928, 157937, 157946, 157956, 157965, 157975, 157985, - 157996, 158005, 158015, 158025, 158036, 158046, 158057, 158068, - 158080, 158087, 158095, 158103, 158112, 158120, 158129, 158138, - 158148, 158156, 158165, 158174, 158184, 158193, 158203, 158213, - 158224, 158232, 158241, 158250, 158260, 158269, 158279, 158289, - 158300, 158309, 158319, 158329, 158340, 158350, 158361, 158372, - 158384, 158392, 158401, 158410, 158420, 158429, 158439, 158449, - 158460, 158469, 158479, 158489, 158500, 158510, 158521, 158532, - 158544, 158553, 158563, 158573, 158584, 158594, 158605, 158616, - 158628, 158638, 158649, 158660, 158672, 158683, 158695, 158707, - 158720, 158723, 158727, 158731, 158736, 158740, 158745, 158750, - 158756, 158760, 158765, 158770, 158776, 158781, 158787, 158793, - 158800, 158804, 158809, 158814, 158820, 158825, 158831, 158837, - 158844, 158849, 158855, 158861, 158868, 158874, 158881, 158888, - 158896, 158900, 158905, 158910, 158916, 158921, 158927, 158933, - 158940, 158945, 158951, 158957, 158964, 158970, 158977, 158984, - 158992, 158997, 159003, 159009, 159016, 159022, 159029, 159036, - 159044, 159050, 159057, 159064, 159072, 159079, 159087, 159095, - 159104, 159108, 159113, 159118, 159124, 159129, 159135, 159141, - 159148, 159153, 159159, 159165, 159172, 159178, 159185, 159192, - 159200, 159205, 159211, 159217, 159224, 159230, 159237, 159244, - 159252, 159258, 159265, 159272, 159280, 159287, 159295, 159303, - 159312, 159317, 159323, 159329, 159336, 159342, 159349, 159356, - 159364, 159370, 159377, 159384, 159392, 159399, 159407, 159415, - 159424, 159430, 159437, 159444, 159452, 159459, 159467, 159475, - 159484, 159491, 159499, 159507, 159516, 159524, 159533, 159542, - 159552, 159556, 159561, 159566, 159572, 159577, 159583, 159589, - 159596, 159601, 159607, 159613, 159620, 159626, 159633, 159640, - 159648, 159653, 159659, 159665, 159672, 159678, 159685, 159692, - 159700, 159706, 159713, 159720, 159728, 159735, 159743, 159751, - 159760, 159765, 159771, 159777, 159784, 159790, 159797, 159804, - 159812, 159818, 159825, 159832, 159840, 159847, 159855, 159863, - 159872, 159878, 159885, 159892, 159900, 159907, 159915, 159923, - 159932, 159939, 159947, 159955, 159964, 159972, 159981, 159990, - 160000, 160005, 160011, 160017, 160024, 160030, 160037, 160044, - 160052, 160058, 160065, 160072, 160080, 160087, 160095, 160103, - 160112, 160118, 160125, 160132, 160140, 160147, 160155, 160163, - 160172, 160179, 160187, 160195, 160204, 160212, 160221, 160230, - 160240, 160246, 160253, 160260, 160268, 160275, 160283, 160291, - 160300, 160307, 160315, 160323, 160332, 160340, 160349, 160358, - 160368, 160375, 160383, 160391, 160400, 160408, 160417, 160426, - 160436, 160444, 160453, 160462, 160472, 160481, 160491, 160501, - 160512, 160516, 160521, 160526, 160532, 160537, 160543, 160549, - 160556, 160561, 160567, 160573, 160580, 160586, 160593, 160600, - 160608, 160613, 160619, 160625, 160632, 160638, 160645, 160652, - 160660, 160666, 160673, 160680, 160688, 160695, 160703, 160711, - 160720, 160725, 160731, 160737, 160744, 160750, 160757, 160764, - 160772, 160778, 160785, 160792, 160800, 160807, 160815, 160823, - 160832, 160838, 160845, 160852, 160860, 160867, 160875, 160883, - 160892, 160899, 160907, 160915, 160924, 160932, 160941, 160950, - 160960, 160965, 160971, 160977, 160984, 160990, 160997, 161004, - 161012, 161018, 161025, 161032, 161040, 161047, 161055, 161063, - 161072, 161078, 161085, 161092, 161100, 161107, 161115, 161123, - 161132, 161139, 161147, 161155, 161164, 161172, 161181, 161190, - 161200, 161206, 161213, 161220, 161228, 161235, 161243, 161251, - 161260, 161267, 161275, 161283, 161292, 161300, 161309, 161318, - 161328, 161335, 161343, 161351, 161360, 161368, 161377, 161386, - 161396, 161404, 161413, 161422, 161432, 161441, 161451, 161461, - 161472, 161477, 161483, 161489, 161496, 161502, 161509, 161516, - 161524, 161530, 161537, 161544, 161552, 161559, 161567, 161575, - 161584, 161590, 161597, 161604, 161612, 161619, 161627, 161635, - 161644, 161651, 161659, 161667, 161676, 161684, 161693, 161702, - 161712, 161718, 161725, 161732, 161740, 161747, 161755, 161763, - 161772, 161779, 161787, 161795, 161804, 161812, 161821, 161830, - 161840, 161847, 161855, 161863, 161872, 161880, 161889, 161898, - 161908, 161916, 161925, 161934, 161944, 161953, 161963, 161973, - 161984, 161990, 161997, 162004, 162012, 162019, 162027, 162035, - 162044, 162051, 162059, 162067, 162076, 162084, 162093, 162102, - 162112, 162119, 162127, 162135, 162144, 162152, 162161, 162170, - 162180, 162188, 162197, 162206, 162216, 162225, 162235, 162245, - 162256, 162263, 162271, 162279, 162288, 162296, 162305, 162314, - 162324, 162332, 162341, 162350, 162360, 162369, 162379, 162389, - 162400, 162408, 162417, 162426, 162436, 162445, 162455, 162465, - 162476, 162485, 162495, 162505, 162516, 162526, 162537, 162548, - 162560, 162564, 162569, 162574, 162580, 162585, 162591, 162597, - 162604, 162609, 162615, 162621, 162628, 162634, 162641, 162648, - 162656, 162661, 162667, 162673, 162680, 162686, 162693, 162700, - 162708, 162714, 162721, 162728, 162736, 162743, 162751, 162759, - 162768, 162773, 162779, 162785, 162792, 162798, 162805, 162812, - 162820, 162826, 162833, 162840, 162848, 162855, 162863, 162871, - 162880, 162886, 162893, 162900, 162908, 162915, 162923, 162931, - 162940, 162947, 162955, 162963, 162972, 162980, 162989, 162998, - 163008, 163013, 163019, 163025, 163032, 163038, 163045, 163052, - 163060, 163066, 163073, 163080, 163088, 163095, 163103, 163111, - 163120, 163126, 163133, 163140, 163148, 163155, 163163, 163171, - 163180, 163187, 163195, 163203, 163212, 163220, 163229, 163238, - 163248, 163254, 163261, 163268, 163276, 163283, 163291, 163299, - 163308, 163315, 163323, 163331, 163340, 163348, 163357, 163366, - 163376, 163383, 163391, 163399, 163408, 163416, 163425, 163434, - 163444, 163452, 163461, 163470, 163480, 163489, 163499, 163509, - 163520, 163525, 163531, 163537, 163544, 163550, 163557, 163564, - 163572, 163578, 163585, 163592, 163600, 163607, 163615, 163623, - 163632, 163638, 163645, 163652, 163660, 163667, 163675, 163683, - 163692, 163699, 163707, 163715, 163724, 163732, 163741, 163750, - 163760, 163766, 163773, 163780, 163788, 163795, 163803, 163811, - 163820, 163827, 163835, 163843, 163852, 163860, 163869, 163878, - 163888, 163895, 163903, 163911, 163920, 163928, 163937, 163946, - 163956, 163964, 163973, 163982, 163992, 164001, 164011, 164021, - 164032, 164038, 164045, 164052, 164060, 164067, 164075, 164083, - 164092, 164099, 164107, 164115, 164124, 164132, 164141, 164150, - 164160, 164167, 164175, 164183, 164192, 164200, 164209, 164218, - 164228, 164236, 164245, 164254, 164264, 164273, 164283, 164293, - 164304, 164311, 164319, 164327, 164336, 164344, 164353, 164362, - 164372, 164380, 164389, 164398, 164408, 164417, 164427, 164437, - 164448, 164456, 164465, 164474, 164484, 164493, 164503, 164513, - 164524, 164533, 164543, 164553, 164564, 164574, 164585, 164596, - 164608, 164613, 164619, 164625, 164632, 164638, 164645, 164652, - 164660, 164666, 164673, 164680, 164688, 164695, 164703, 164711, - 164720, 164726, 164733, 164740, 164748, 164755, 164763, 164771, - 164780, 164787, 164795, 164803, 164812, 164820, 164829, 164838, - 164848, 164854, 164861, 164868, 164876, 164883, 164891, 164899, - 164908, 164915, 164923, 164931, 164940, 164948, 164957, 164966, - 164976, 164983, 164991, 164999, 165008, 165016, 165025, 165034, - 165044, 165052, 165061, 165070, 165080, 165089, 165099, 165109, - 165120, 165126, 165133, 165140, 165148, 165155, 165163, 165171, - 165180, 165187, 165195, 165203, 165212, 165220, 165229, 165238, - 165248, 165255, 165263, 165271, 165280, 165288, 165297, 165306, - 165316, 165324, 165333, 165342, 165352, 165361, 165371, 165381, - 165392, 165399, 165407, 165415, 165424, 165432, 165441, 165450, - 165460, 165468, 165477, 165486, 165496, 165505, 165515, 165525, - 165536, 165544, 165553, 165562, 165572, 165581, 165591, 165601, - 165612, 165621, 165631, 165641, 165652, 165662, 165673, 165684, - 165696, 165702, 165709, 165716, 165724, 165731, 165739, 165747, - 165756, 165763, 165771, 165779, 165788, 165796, 165805, 165814, - 165824, 165831, 165839, 165847, 165856, 165864, 165873, 165882, - 165892, 165900, 165909, 165918, 165928, 165937, 165947, 165957, - 165968, 165975, 165983, 165991, 166000, 166008, 166017, 166026, - 166036, 166044, 166053, 166062, 166072, 166081, 166091, 166101, - 166112, 166120, 166129, 166138, 166148, 166157, 166167, 166177, - 166188, 166197, 166207, 166217, 166228, 166238, 166249, 166260, - 166272, 166279, 166287, 166295, 166304, 166312, 166321, 166330, - 166340, 166348, 166357, 166366, 166376, 166385, 166395, 166405, - 166416, 166424, 166433, 166442, 166452, 166461, 166471, 166481, - 166492, 166501, 166511, 166521, 166532, 166542, 166553, 166564, - 166576, 166584, 166593, 166602, 166612, 166621, 166631, 166641, - 166652, 166661, 166671, 166681, 166692, 166702, 166713, 166724, - 166736, 166745, 166755, 166765, 166776, 166786, 166797, 166808, - 166820, 166830, 166841, 166852, 166864, 166875, 166887, 166899, - 166912, 166916, 166921, 166926, 166932, 166937, 166943, 166949, - 166956, 166961, 166967, 166973, 166980, 166986, 166993, 167000, - 167008, 167013, 167019, 167025, 167032, 167038, 167045, 167052, - 167060, 167066, 167073, 167080, 167088, 167095, 167103, 167111, - 167120, 167125, 167131, 167137, 167144, 167150, 167157, 167164, - 167172, 167178, 167185, 167192, 167200, 167207, 167215, 167223, - 167232, 167238, 167245, 167252, 167260, 167267, 167275, 167283, - 167292, 167299, 167307, 167315, 167324, 167332, 167341, 167350, - 167360, 167365, 167371, 167377, 167384, 167390, 167397, 167404, - 167412, 167418, 167425, 167432, 167440, 167447, 167455, 167463, - 167472, 167478, 167485, 167492, 167500, 167507, 167515, 167523, - 167532, 167539, 167547, 167555, 167564, 167572, 167581, 167590, - 167600, 167606, 167613, 167620, 167628, 167635, 167643, 167651, - 167660, 167667, 167675, 167683, 167692, 167700, 167709, 167718, - 167728, 167735, 167743, 167751, 167760, 167768, 167777, 167786, - 167796, 167804, 167813, 167822, 167832, 167841, 167851, 167861, - 167872, 167877, 167883, 167889, 167896, 167902, 167909, 167916, - 167924, 167930, 167937, 167944, 167952, 167959, 167967, 167975, - 167984, 167990, 167997, 168004, 168012, 168019, 168027, 168035, - 168044, 168051, 168059, 168067, 168076, 168084, 168093, 168102, - 168112, 168118, 168125, 168132, 168140, 168147, 168155, 168163, - 168172, 168179, 168187, 168195, 168204, 168212, 168221, 168230, - 168240, 168247, 168255, 168263, 168272, 168280, 168289, 168298, - 168308, 168316, 168325, 168334, 168344, 168353, 168363, 168373, - 168384, 168390, 168397, 168404, 168412, 168419, 168427, 168435, - 168444, 168451, 168459, 168467, 168476, 168484, 168493, 168502, - 168512, 168519, 168527, 168535, 168544, 168552, 168561, 168570, - 168580, 168588, 168597, 168606, 168616, 168625, 168635, 168645, - 168656, 168663, 168671, 168679, 168688, 168696, 168705, 168714, - 168724, 168732, 168741, 168750, 168760, 168769, 168779, 168789, - 168800, 168808, 168817, 168826, 168836, 168845, 168855, 168865, - 168876, 168885, 168895, 168905, 168916, 168926, 168937, 168948, - 168960, 168965, 168971, 168977, 168984, 168990, 168997, 169004, - 169012, 169018, 169025, 169032, 169040, 169047, 169055, 169063, - 169072, 169078, 169085, 169092, 169100, 169107, 169115, 169123, - 169132, 169139, 169147, 169155, 169164, 169172, 169181, 169190, - 169200, 169206, 169213, 169220, 169228, 169235, 169243, 169251, - 169260, 169267, 169275, 169283, 169292, 169300, 169309, 169318, - 169328, 169335, 169343, 169351, 169360, 169368, 169377, 169386, - 169396, 169404, 169413, 169422, 169432, 169441, 169451, 169461, - 169472, 169478, 169485, 169492, 169500, 169507, 169515, 169523, - 169532, 169539, 169547, 169555, 169564, 169572, 169581, 169590, - 169600, 169607, 169615, 169623, 169632, 169640, 169649, 169658, - 169668, 169676, 169685, 169694, 169704, 169713, 169723, 169733, - 169744, 169751, 169759, 169767, 169776, 169784, 169793, 169802, - 169812, 169820, 169829, 169838, 169848, 169857, 169867, 169877, - 169888, 169896, 169905, 169914, 169924, 169933, 169943, 169953, - 169964, 169973, 169983, 169993, 170004, 170014, 170025, 170036, - 170048, 170054, 170061, 170068, 170076, 170083, 170091, 170099, - 170108, 170115, 170123, 170131, 170140, 170148, 170157, 170166, - 170176, 170183, 170191, 170199, 170208, 170216, 170225, 170234, - 170244, 170252, 170261, 170270, 170280, 170289, 170299, 170309, - 170320, 170327, 170335, 170343, 170352, 170360, 170369, 170378, - 170388, 170396, 170405, 170414, 170424, 170433, 170443, 170453, - 170464, 170472, 170481, 170490, 170500, 170509, 170519, 170529, - 170540, 170549, 170559, 170569, 170580, 170590, 170601, 170612, - 170624, 170631, 170639, 170647, 170656, 170664, 170673, 170682, - 170692, 170700, 170709, 170718, 170728, 170737, 170747, 170757, - 170768, 170776, 170785, 170794, 170804, 170813, 170823, 170833, - 170844, 170853, 170863, 170873, 170884, 170894, 170905, 170916, - 170928, 170936, 170945, 170954, 170964, 170973, 170983, 170993, - 171004, 171013, 171023, 171033, 171044, 171054, 171065, 171076, - 171088, 171097, 171107, 171117, 171128, 171138, 171149, 171160, - 171172, 171182, 171193, 171204, 171216, 171227, 171239, 171251, - 171264, 171269, 171275, 171281, 171288, 171294, 171301, 171308, - 171316, 171322, 171329, 171336, 171344, 171351, 171359, 171367, - 171376, 171382, 171389, 171396, 171404, 171411, 171419, 171427, - 171436, 171443, 171451, 171459, 171468, 171476, 171485, 171494, - 171504, 171510, 171517, 171524, 171532, 171539, 171547, 171555, - 171564, 171571, 171579, 171587, 171596, 171604, 171613, 171622, - 171632, 171639, 171647, 171655, 171664, 171672, 171681, 171690, - 171700, 171708, 171717, 171726, 171736, 171745, 171755, 171765, - 171776, 171782, 171789, 171796, 171804, 171811, 171819, 171827, - 171836, 171843, 171851, 171859, 171868, 171876, 171885, 171894, - 171904, 171911, 171919, 171927, 171936, 171944, 171953, 171962, - 171972, 171980, 171989, 171998, 172008, 172017, 172027, 172037, - 172048, 172055, 172063, 172071, 172080, 172088, 172097, 172106, - 172116, 172124, 172133, 172142, 172152, 172161, 172171, 172181, - 172192, 172200, 172209, 172218, 172228, 172237, 172247, 172257, - 172268, 172277, 172287, 172297, 172308, 172318, 172329, 172340, - 172352, 172358, 172365, 172372, 172380, 172387, 172395, 172403, - 172412, 172419, 172427, 172435, 172444, 172452, 172461, 172470, - 172480, 172487, 172495, 172503, 172512, 172520, 172529, 172538, - 172548, 172556, 172565, 172574, 172584, 172593, 172603, 172613, - 172624, 172631, 172639, 172647, 172656, 172664, 172673, 172682, - 172692, 172700, 172709, 172718, 172728, 172737, 172747, 172757, - 172768, 172776, 172785, 172794, 172804, 172813, 172823, 172833, - 172844, 172853, 172863, 172873, 172884, 172894, 172905, 172916, - 172928, 172935, 172943, 172951, 172960, 172968, 172977, 172986, - 172996, 173004, 173013, 173022, 173032, 173041, 173051, 173061, - 173072, 173080, 173089, 173098, 173108, 173117, 173127, 173137, - 173148, 173157, 173167, 173177, 173188, 173198, 173209, 173220, - 173232, 173240, 173249, 173258, 173268, 173277, 173287, 173297, - 173308, 173317, 173327, 173337, 173348, 173358, 173369, 173380, - 173392, 173401, 173411, 173421, 173432, 173442, 173453, 173464, - 173476, 173486, 173497, 173508, 173520, 173531, 173543, 173555, - 173568, 173574, 173581, 173588, 173596, 173603, 173611, 173619, - 173628, 173635, 173643, 173651, 173660, 173668, 173677, 173686, - 173696, 173703, 173711, 173719, 173728, 173736, 173745, 173754, - 173764, 173772, 173781, 173790, 173800, 173809, 173819, 173829, - 173840, 173847, 173855, 173863, 173872, 173880, 173889, 173898, - 173908, 173916, 173925, 173934, 173944, 173953, 173963, 173973, - 173984, 173992, 174001, 174010, 174020, 174029, 174039, 174049, - 174060, 174069, 174079, 174089, 174100, 174110, 174121, 174132, - 174144, 174151, 174159, 174167, 174176, 174184, 174193, 174202, - 174212, 174220, 174229, 174238, 174248, 174257, 174267, 174277, - 174288, 174296, 174305, 174314, 174324, 174333, 174343, 174353, - 174364, 174373, 174383, 174393, 174404, 174414, 174425, 174436, - 174448, 174456, 174465, 174474, 174484, 174493, 174503, 174513, - 174524, 174533, 174543, 174553, 174564, 174574, 174585, 174596, - 174608, 174617, 174627, 174637, 174648, 174658, 174669, 174680, - 174692, 174702, 174713, 174724, 174736, 174747, 174759, 174771, - 174784, 174791, 174799, 174807, 174816, 174824, 174833, 174842, - 174852, 174860, 174869, 174878, 174888, 174897, 174907, 174917, - 174928, 174936, 174945, 174954, 174964, 174973, 174983, 174993, - 175004, 175013, 175023, 175033, 175044, 175054, 175065, 175076, - 175088, 175096, 175105, 175114, 175124, 175133, 175143, 175153, - 175164, 175173, 175183, 175193, 175204, 175214, 175225, 175236, - 175248, 175257, 175267, 175277, 175288, 175298, 175309, 175320, - 175332, 175342, 175353, 175364, 175376, 175387, 175399, 175411, - 175424, 175432, 175441, 175450, 175460, 175469, 175479, 175489, - 175500, 175509, 175519, 175529, 175540, 175550, 175561, 175572, - 175584, 175593, 175603, 175613, 175624, 175634, 175645, 175656, - 175668, 175678, 175689, 175700, 175712, 175723, 175735, 175747, - 175760, 175769, 175779, 175789, 175800, 175810, 175821, 175832, - 175844, 175854, 175865, 175876, 175888, 175899, 175911, 175923, - 175936, 175946, 175957, 175968, 175980, 175991, 176003, 176015, - 176028, 176039, 176051, 176063, 176076, 176088, 176101, 176114, - 176128, 176130, 176133, 176136, 176140, 176143, 176147, 176151, - 176156, 176159, 176163, 176167, 176172, 176176, 176181, 176186, - 176192, 176195, 176199, 176203, 176208, 176212, 176217, 176222, - 176228, 176232, 176237, 176242, 176248, 176253, 176259, 176265, - 176272, 176275, 176279, 176283, 176288, 176292, 176297, 176302, - 176308, 176312, 176317, 176322, 176328, 176333, 176339, 176345, - 176352, 176356, 176361, 176366, 176372, 176377, 176383, 176389, - 176396, 176401, 176407, 176413, 176420, 176426, 176433, 176440, - 176448, 176451, 176455, 176459, 176464, 176468, 176473, 176478, - 176484, 176488, 176493, 176498, 176504, 176509, 176515, 176521, - 176528, 176532, 176537, 176542, 176548, 176553, 176559, 176565, - 176572, 176577, 176583, 176589, 176596, 176602, 176609, 176616, - 176624, 176628, 176633, 176638, 176644, 176649, 176655, 176661, - 176668, 176673, 176679, 176685, 176692, 176698, 176705, 176712, - 176720, 176725, 176731, 176737, 176744, 176750, 176757, 176764, - 176772, 176778, 176785, 176792, 176800, 176807, 176815, 176823, - 176832, 176835, 176839, 176843, 176848, 176852, 176857, 176862, - 176868, 176872, 176877, 176882, 176888, 176893, 176899, 176905, - 176912, 176916, 176921, 176926, 176932, 176937, 176943, 176949, - 176956, 176961, 176967, 176973, 176980, 176986, 176993, 177000, - 177008, 177012, 177017, 177022, 177028, 177033, 177039, 177045, - 177052, 177057, 177063, 177069, 177076, 177082, 177089, 177096, - 177104, 177109, 177115, 177121, 177128, 177134, 177141, 177148, - 177156, 177162, 177169, 177176, 177184, 177191, 177199, 177207, - 177216, 177220, 177225, 177230, 177236, 177241, 177247, 177253, - 177260, 177265, 177271, 177277, 177284, 177290, 177297, 177304, - 177312, 177317, 177323, 177329, 177336, 177342, 177349, 177356, - 177364, 177370, 177377, 177384, 177392, 177399, 177407, 177415, - 177424, 177429, 177435, 177441, 177448, 177454, 177461, 177468, - 177476, 177482, 177489, 177496, 177504, 177511, 177519, 177527, - 177536, 177542, 177549, 177556, 177564, 177571, 177579, 177587, - 177596, 177603, 177611, 177619, 177628, 177636, 177645, 177654, - 177664, 177667, 177671, 177675, 177680, 177684, 177689, 177694, - 177700, 177704, 177709, 177714, 177720, 177725, 177731, 177737, - 177744, 177748, 177753, 177758, 177764, 177769, 177775, 177781, - 177788, 177793, 177799, 177805, 177812, 177818, 177825, 177832, - 177840, 177844, 177849, 177854, 177860, 177865, 177871, 177877, - 177884, 177889, 177895, 177901, 177908, 177914, 177921, 177928, - 177936, 177941, 177947, 177953, 177960, 177966, 177973, 177980, - 177988, 177994, 178001, 178008, 178016, 178023, 178031, 178039, - 178048, 178052, 178057, 178062, 178068, 178073, 178079, 178085, - 178092, 178097, 178103, 178109, 178116, 178122, 178129, 178136, - 178144, 178149, 178155, 178161, 178168, 178174, 178181, 178188, - 178196, 178202, 178209, 178216, 178224, 178231, 178239, 178247, - 178256, 178261, 178267, 178273, 178280, 178286, 178293, 178300, - 178308, 178314, 178321, 178328, 178336, 178343, 178351, 178359, - 178368, 178374, 178381, 178388, 178396, 178403, 178411, 178419, - 178428, 178435, 178443, 178451, 178460, 178468, 178477, 178486, - 178496, 178500, 178505, 178510, 178516, 178521, 178527, 178533, - 178540, 178545, 178551, 178557, 178564, 178570, 178577, 178584, - 178592, 178597, 178603, 178609, 178616, 178622, 178629, 178636, - 178644, 178650, 178657, 178664, 178672, 178679, 178687, 178695, - 178704, 178709, 178715, 178721, 178728, 178734, 178741, 178748, - 178756, 178762, 178769, 178776, 178784, 178791, 178799, 178807, - 178816, 178822, 178829, 178836, 178844, 178851, 178859, 178867, - 178876, 178883, 178891, 178899, 178908, 178916, 178925, 178934, - 178944, 178949, 178955, 178961, 178968, 178974, 178981, 178988, - 178996, 179002, 179009, 179016, 179024, 179031, 179039, 179047, - 179056, 179062, 179069, 179076, 179084, 179091, 179099, 179107, - 179116, 179123, 179131, 179139, 179148, 179156, 179165, 179174, - 179184, 179190, 179197, 179204, 179212, 179219, 179227, 179235, - 179244, 179251, 179259, 179267, 179276, 179284, 179293, 179302, - 179312, 179319, 179327, 179335, 179344, 179352, 179361, 179370, - 179380, 179388, 179397, 179406, 179416, 179425, 179435, 179445, - 179456, 179459, 179463, 179467, 179472, 179476, 179481, 179486, - 179492, 179496, 179501, 179506, 179512, 179517, 179523, 179529, - 179536, 179540, 179545, 179550, 179556, 179561, 179567, 179573, - 179580, 179585, 179591, 179597, 179604, 179610, 179617, 179624, - 179632, 179636, 179641, 179646, 179652, 179657, 179663, 179669, - 179676, 179681, 179687, 179693, 179700, 179706, 179713, 179720, - 179728, 179733, 179739, 179745, 179752, 179758, 179765, 179772, - 179780, 179786, 179793, 179800, 179808, 179815, 179823, 179831, - 179840, 179844, 179849, 179854, 179860, 179865, 179871, 179877, - 179884, 179889, 179895, 179901, 179908, 179914, 179921, 179928, - 179936, 179941, 179947, 179953, 179960, 179966, 179973, 179980, - 179988, 179994, 180001, 180008, 180016, 180023, 180031, 180039, - 180048, 180053, 180059, 180065, 180072, 180078, 180085, 180092, - 180100, 180106, 180113, 180120, 180128, 180135, 180143, 180151, - 180160, 180166, 180173, 180180, 180188, 180195, 180203, 180211, - 180220, 180227, 180235, 180243, 180252, 180260, 180269, 180278, - 180288, 180292, 180297, 180302, 180308, 180313, 180319, 180325, - 180332, 180337, 180343, 180349, 180356, 180362, 180369, 180376, - 180384, 180389, 180395, 180401, 180408, 180414, 180421, 180428, - 180436, 180442, 180449, 180456, 180464, 180471, 180479, 180487, - 180496, 180501, 180507, 180513, 180520, 180526, 180533, 180540, - 180548, 180554, 180561, 180568, 180576, 180583, 180591, 180599, - 180608, 180614, 180621, 180628, 180636, 180643, 180651, 180659, - 180668, 180675, 180683, 180691, 180700, 180708, 180717, 180726, - 180736, 180741, 180747, 180753, 180760, 180766, 180773, 180780, - 180788, 180794, 180801, 180808, 180816, 180823, 180831, 180839, - 180848, 180854, 180861, 180868, 180876, 180883, 180891, 180899, - 180908, 180915, 180923, 180931, 180940, 180948, 180957, 180966, - 180976, 180982, 180989, 180996, 181004, 181011, 181019, 181027, - 181036, 181043, 181051, 181059, 181068, 181076, 181085, 181094, - 181104, 181111, 181119, 181127, 181136, 181144, 181153, 181162, - 181172, 181180, 181189, 181198, 181208, 181217, 181227, 181237, - 181248, 181252, 181257, 181262, 181268, 181273, 181279, 181285, - 181292, 181297, 181303, 181309, 181316, 181322, 181329, 181336, - 181344, 181349, 181355, 181361, 181368, 181374, 181381, 181388, - 181396, 181402, 181409, 181416, 181424, 181431, 181439, 181447, - 181456, 181461, 181467, 181473, 181480, 181486, 181493, 181500, - 181508, 181514, 181521, 181528, 181536, 181543, 181551, 181559, - 181568, 181574, 181581, 181588, 181596, 181603, 181611, 181619, - 181628, 181635, 181643, 181651, 181660, 181668, 181677, 181686, - 181696, 181701, 181707, 181713, 181720, 181726, 181733, 181740, - 181748, 181754, 181761, 181768, 181776, 181783, 181791, 181799, - 181808, 181814, 181821, 181828, 181836, 181843, 181851, 181859, - 181868, 181875, 181883, 181891, 181900, 181908, 181917, 181926, - 181936, 181942, 181949, 181956, 181964, 181971, 181979, 181987, - 181996, 182003, 182011, 182019, 182028, 182036, 182045, 182054, - 182064, 182071, 182079, 182087, 182096, 182104, 182113, 182122, - 182132, 182140, 182149, 182158, 182168, 182177, 182187, 182197, - 182208, 182213, 182219, 182225, 182232, 182238, 182245, 182252, - 182260, 182266, 182273, 182280, 182288, 182295, 182303, 182311, - 182320, 182326, 182333, 182340, 182348, 182355, 182363, 182371, - 182380, 182387, 182395, 182403, 182412, 182420, 182429, 182438, - 182448, 182454, 182461, 182468, 182476, 182483, 182491, 182499, - 182508, 182515, 182523, 182531, 182540, 182548, 182557, 182566, - 182576, 182583, 182591, 182599, 182608, 182616, 182625, 182634, - 182644, 182652, 182661, 182670, 182680, 182689, 182699, 182709, - 182720, 182726, 182733, 182740, 182748, 182755, 182763, 182771, - 182780, 182787, 182795, 182803, 182812, 182820, 182829, 182838, - 182848, 182855, 182863, 182871, 182880, 182888, 182897, 182906, - 182916, 182924, 182933, 182942, 182952, 182961, 182971, 182981, - 182992, 182999, 183007, 183015, 183024, 183032, 183041, 183050, - 183060, 183068, 183077, 183086, 183096, 183105, 183115, 183125, - 183136, 183144, 183153, 183162, 183172, 183181, 183191, 183201, - 183212, 183221, 183231, 183241, 183252, 183262, 183273, 183284, - 183296, 183299, 183303, 183307, 183312, 183316, 183321, 183326, - 183332, 183336, 183341, 183346, 183352, 183357, 183363, 183369, - 183376, 183380, 183385, 183390, 183396, 183401, 183407, 183413, - 183420, 183425, 183431, 183437, 183444, 183450, 183457, 183464, - 183472, 183476, 183481, 183486, 183492, 183497, 183503, 183509, - 183516, 183521, 183527, 183533, 183540, 183546, 183553, 183560, - 183568, 183573, 183579, 183585, 183592, 183598, 183605, 183612, - 183620, 183626, 183633, 183640, 183648, 183655, 183663, 183671, - 183680, 183684, 183689, 183694, 183700, 183705, 183711, 183717, - 183724, 183729, 183735, 183741, 183748, 183754, 183761, 183768, - 183776, 183781, 183787, 183793, 183800, 183806, 183813, 183820, - 183828, 183834, 183841, 183848, 183856, 183863, 183871, 183879, - 183888, 183893, 183899, 183905, 183912, 183918, 183925, 183932, - 183940, 183946, 183953, 183960, 183968, 183975, 183983, 183991, - 184000, 184006, 184013, 184020, 184028, 184035, 184043, 184051, - 184060, 184067, 184075, 184083, 184092, 184100, 184109, 184118, - 184128, 184132, 184137, 184142, 184148, 184153, 184159, 184165, - 184172, 184177, 184183, 184189, 184196, 184202, 184209, 184216, - 184224, 184229, 184235, 184241, 184248, 184254, 184261, 184268, - 184276, 184282, 184289, 184296, 184304, 184311, 184319, 184327, - 184336, 184341, 184347, 184353, 184360, 184366, 184373, 184380, - 184388, 184394, 184401, 184408, 184416, 184423, 184431, 184439, - 184448, 184454, 184461, 184468, 184476, 184483, 184491, 184499, - 184508, 184515, 184523, 184531, 184540, 184548, 184557, 184566, - 184576, 184581, 184587, 184593, 184600, 184606, 184613, 184620, - 184628, 184634, 184641, 184648, 184656, 184663, 184671, 184679, - 184688, 184694, 184701, 184708, 184716, 184723, 184731, 184739, - 184748, 184755, 184763, 184771, 184780, 184788, 184797, 184806, - 184816, 184822, 184829, 184836, 184844, 184851, 184859, 184867, - 184876, 184883, 184891, 184899, 184908, 184916, 184925, 184934, - 184944, 184951, 184959, 184967, 184976, 184984, 184993, 185002, - 185012, 185020, 185029, 185038, 185048, 185057, 185067, 185077, - 185088, 185092, 185097, 185102, 185108, 185113, 185119, 185125, - 185132, 185137, 185143, 185149, 185156, 185162, 185169, 185176, - 185184, 185189, 185195, 185201, 185208, 185214, 185221, 185228, - 185236, 185242, 185249, 185256, 185264, 185271, 185279, 185287, - 185296, 185301, 185307, 185313, 185320, 185326, 185333, 185340, - 185348, 185354, 185361, 185368, 185376, 185383, 185391, 185399, - 185408, 185414, 185421, 185428, 185436, 185443, 185451, 185459, - 185468, 185475, 185483, 185491, 185500, 185508, 185517, 185526, - 185536, 185541, 185547, 185553, 185560, 185566, 185573, 185580, - 185588, 185594, 185601, 185608, 185616, 185623, 185631, 185639, - 185648, 185654, 185661, 185668, 185676, 185683, 185691, 185699, - 185708, 185715, 185723, 185731, 185740, 185748, 185757, 185766, - 185776, 185782, 185789, 185796, 185804, 185811, 185819, 185827, - 185836, 185843, 185851, 185859, 185868, 185876, 185885, 185894, - 185904, 185911, 185919, 185927, 185936, 185944, 185953, 185962, - 185972, 185980, 185989, 185998, 186008, 186017, 186027, 186037, - 186048, 186053, 186059, 186065, 186072, 186078, 186085, 186092, - 186100, 186106, 186113, 186120, 186128, 186135, 186143, 186151, - 186160, 186166, 186173, 186180, 186188, 186195, 186203, 186211, - 186220, 186227, 186235, 186243, 186252, 186260, 186269, 186278, - 186288, 186294, 186301, 186308, 186316, 186323, 186331, 186339, - 186348, 186355, 186363, 186371, 186380, 186388, 186397, 186406, - 186416, 186423, 186431, 186439, 186448, 186456, 186465, 186474, - 186484, 186492, 186501, 186510, 186520, 186529, 186539, 186549, - 186560, 186566, 186573, 186580, 186588, 186595, 186603, 186611, - 186620, 186627, 186635, 186643, 186652, 186660, 186669, 186678, - 186688, 186695, 186703, 186711, 186720, 186728, 186737, 186746, - 186756, 186764, 186773, 186782, 186792, 186801, 186811, 186821, - 186832, 186839, 186847, 186855, 186864, 186872, 186881, 186890, - 186900, 186908, 186917, 186926, 186936, 186945, 186955, 186965, - 186976, 186984, 186993, 187002, 187012, 187021, 187031, 187041, - 187052, 187061, 187071, 187081, 187092, 187102, 187113, 187124, - 187136, 187140, 187145, 187150, 187156, 187161, 187167, 187173, - 187180, 187185, 187191, 187197, 187204, 187210, 187217, 187224, - 187232, 187237, 187243, 187249, 187256, 187262, 187269, 187276, - 187284, 187290, 187297, 187304, 187312, 187319, 187327, 187335, - 187344, 187349, 187355, 187361, 187368, 187374, 187381, 187388, - 187396, 187402, 187409, 187416, 187424, 187431, 187439, 187447, - 187456, 187462, 187469, 187476, 187484, 187491, 187499, 187507, - 187516, 187523, 187531, 187539, 187548, 187556, 187565, 187574, - 187584, 187589, 187595, 187601, 187608, 187614, 187621, 187628, - 187636, 187642, 187649, 187656, 187664, 187671, 187679, 187687, - 187696, 187702, 187709, 187716, 187724, 187731, 187739, 187747, - 187756, 187763, 187771, 187779, 187788, 187796, 187805, 187814, - 187824, 187830, 187837, 187844, 187852, 187859, 187867, 187875, - 187884, 187891, 187899, 187907, 187916, 187924, 187933, 187942, - 187952, 187959, 187967, 187975, 187984, 187992, 188001, 188010, - 188020, 188028, 188037, 188046, 188056, 188065, 188075, 188085, - 188096, 188101, 188107, 188113, 188120, 188126, 188133, 188140, - 188148, 188154, 188161, 188168, 188176, 188183, 188191, 188199, - 188208, 188214, 188221, 188228, 188236, 188243, 188251, 188259, - 188268, 188275, 188283, 188291, 188300, 188308, 188317, 188326, - 188336, 188342, 188349, 188356, 188364, 188371, 188379, 188387, - 188396, 188403, 188411, 188419, 188428, 188436, 188445, 188454, - 188464, 188471, 188479, 188487, 188496, 188504, 188513, 188522, - 188532, 188540, 188549, 188558, 188568, 188577, 188587, 188597, - 188608, 188614, 188621, 188628, 188636, 188643, 188651, 188659, - 188668, 188675, 188683, 188691, 188700, 188708, 188717, 188726, - 188736, 188743, 188751, 188759, 188768, 188776, 188785, 188794, - 188804, 188812, 188821, 188830, 188840, 188849, 188859, 188869, - 188880, 188887, 188895, 188903, 188912, 188920, 188929, 188938, - 188948, 188956, 188965, 188974, 188984, 188993, 189003, 189013, - 189024, 189032, 189041, 189050, 189060, 189069, 189079, 189089, - 189100, 189109, 189119, 189129, 189140, 189150, 189161, 189172, - 189184, 189189, 189195, 189201, 189208, 189214, 189221, 189228, - 189236, 189242, 189249, 189256, 189264, 189271, 189279, 189287, - 189296, 189302, 189309, 189316, 189324, 189331, 189339, 189347, - 189356, 189363, 189371, 189379, 189388, 189396, 189405, 189414, - 189424, 189430, 189437, 189444, 189452, 189459, 189467, 189475, - 189484, 189491, 189499, 189507, 189516, 189524, 189533, 189542, - 189552, 189559, 189567, 189575, 189584, 189592, 189601, 189610, - 189620, 189628, 189637, 189646, 189656, 189665, 189675, 189685, - 189696, 189702, 189709, 189716, 189724, 189731, 189739, 189747, - 189756, 189763, 189771, 189779, 189788, 189796, 189805, 189814, - 189824, 189831, 189839, 189847, 189856, 189864, 189873, 189882, - 189892, 189900, 189909, 189918, 189928, 189937, 189947, 189957, - 189968, 189975, 189983, 189991, 190000, 190008, 190017, 190026, - 190036, 190044, 190053, 190062, 190072, 190081, 190091, 190101, - 190112, 190120, 190129, 190138, 190148, 190157, 190167, 190177, - 190188, 190197, 190207, 190217, 190228, 190238, 190249, 190260, - 190272, 190278, 190285, 190292, 190300, 190307, 190315, 190323, - 190332, 190339, 190347, 190355, 190364, 190372, 190381, 190390, - 190400, 190407, 190415, 190423, 190432, 190440, 190449, 190458, - 190468, 190476, 190485, 190494, 190504, 190513, 190523, 190533, - 190544, 190551, 190559, 190567, 190576, 190584, 190593, 190602, - 190612, 190620, 190629, 190638, 190648, 190657, 190667, 190677, - 190688, 190696, 190705, 190714, 190724, 190733, 190743, 190753, - 190764, 190773, 190783, 190793, 190804, 190814, 190825, 190836, - 190848, 190855, 190863, 190871, 190880, 190888, 190897, 190906, - 190916, 190924, 190933, 190942, 190952, 190961, 190971, 190981, - 190992, 191000, 191009, 191018, 191028, 191037, 191047, 191057, - 191068, 191077, 191087, 191097, 191108, 191118, 191129, 191140, - 191152, 191160, 191169, 191178, 191188, 191197, 191207, 191217, - 191228, 191237, 191247, 191257, 191268, 191278, 191289, 191300, - 191312, 191321, 191331, 191341, 191352, 191362, 191373, 191384, - 191396, 191406, 191417, 191428, 191440, 191451, 191463, 191475, - 191488, 191491, 191495, 191499, 191504, 191508, 191513, 191518, - 191524, 191528, 191533, 191538, 191544, 191549, 191555, 191561, - 191568, 191572, 191577, 191582, 191588, 191593, 191599, 191605, - 191612, 191617, 191623, 191629, 191636, 191642, 191649, 191656, - 191664, 191668, 191673, 191678, 191684, 191689, 191695, 191701, - 191708, 191713, 191719, 191725, 191732, 191738, 191745, 191752, - 191760, 191765, 191771, 191777, 191784, 191790, 191797, 191804, - 191812, 191818, 191825, 191832, 191840, 191847, 191855, 191863, - 191872, 191876, 191881, 191886, 191892, 191897, 191903, 191909, - 191916, 191921, 191927, 191933, 191940, 191946, 191953, 191960, - 191968, 191973, 191979, 191985, 191992, 191998, 192005, 192012, - 192020, 192026, 192033, 192040, 192048, 192055, 192063, 192071, - 192080, 192085, 192091, 192097, 192104, 192110, 192117, 192124, - 192132, 192138, 192145, 192152, 192160, 192167, 192175, 192183, - 192192, 192198, 192205, 192212, 192220, 192227, 192235, 192243, - 192252, 192259, 192267, 192275, 192284, 192292, 192301, 192310, - 192320, 192324, 192329, 192334, 192340, 192345, 192351, 192357, - 192364, 192369, 192375, 192381, 192388, 192394, 192401, 192408, - 192416, 192421, 192427, 192433, 192440, 192446, 192453, 192460, - 192468, 192474, 192481, 192488, 192496, 192503, 192511, 192519, - 192528, 192533, 192539, 192545, 192552, 192558, 192565, 192572, - 192580, 192586, 192593, 192600, 192608, 192615, 192623, 192631, - 192640, 192646, 192653, 192660, 192668, 192675, 192683, 192691, - 192700, 192707, 192715, 192723, 192732, 192740, 192749, 192758, - 192768, 192773, 192779, 192785, 192792, 192798, 192805, 192812, - 192820, 192826, 192833, 192840, 192848, 192855, 192863, 192871, - 192880, 192886, 192893, 192900, 192908, 192915, 192923, 192931, - 192940, 192947, 192955, 192963, 192972, 192980, 192989, 192998, - 193008, 193014, 193021, 193028, 193036, 193043, 193051, 193059, - 193068, 193075, 193083, 193091, 193100, 193108, 193117, 193126, - 193136, 193143, 193151, 193159, 193168, 193176, 193185, 193194, - 193204, 193212, 193221, 193230, 193240, 193249, 193259, 193269, - 193280, 193284, 193289, 193294, 193300, 193305, 193311, 193317, - 193324, 193329, 193335, 193341, 193348, 193354, 193361, 193368, - 193376, 193381, 193387, 193393, 193400, 193406, 193413, 193420, - 193428, 193434, 193441, 193448, 193456, 193463, 193471, 193479, - 193488, 193493, 193499, 193505, 193512, 193518, 193525, 193532, - 193540, 193546, 193553, 193560, 193568, 193575, 193583, 193591, - 193600, 193606, 193613, 193620, 193628, 193635, 193643, 193651, - 193660, 193667, 193675, 193683, 193692, 193700, 193709, 193718, - 193728, 193733, 193739, 193745, 193752, 193758, 193765, 193772, - 193780, 193786, 193793, 193800, 193808, 193815, 193823, 193831, - 193840, 193846, 193853, 193860, 193868, 193875, 193883, 193891, - 193900, 193907, 193915, 193923, 193932, 193940, 193949, 193958, - 193968, 193974, 193981, 193988, 193996, 194003, 194011, 194019, - 194028, 194035, 194043, 194051, 194060, 194068, 194077, 194086, - 194096, 194103, 194111, 194119, 194128, 194136, 194145, 194154, - 194164, 194172, 194181, 194190, 194200, 194209, 194219, 194229, - 194240, 194245, 194251, 194257, 194264, 194270, 194277, 194284, - 194292, 194298, 194305, 194312, 194320, 194327, 194335, 194343, - 194352, 194358, 194365, 194372, 194380, 194387, 194395, 194403, - 194412, 194419, 194427, 194435, 194444, 194452, 194461, 194470, - 194480, 194486, 194493, 194500, 194508, 194515, 194523, 194531, - 194540, 194547, 194555, 194563, 194572, 194580, 194589, 194598, - 194608, 194615, 194623, 194631, 194640, 194648, 194657, 194666, - 194676, 194684, 194693, 194702, 194712, 194721, 194731, 194741, - 194752, 194758, 194765, 194772, 194780, 194787, 194795, 194803, - 194812, 194819, 194827, 194835, 194844, 194852, 194861, 194870, - 194880, 194887, 194895, 194903, 194912, 194920, 194929, 194938, - 194948, 194956, 194965, 194974, 194984, 194993, 195003, 195013, - 195024, 195031, 195039, 195047, 195056, 195064, 195073, 195082, - 195092, 195100, 195109, 195118, 195128, 195137, 195147, 195157, - 195168, 195176, 195185, 195194, 195204, 195213, 195223, 195233, - 195244, 195253, 195263, 195273, 195284, 195294, 195305, 195316, - 195328, 195332, 195337, 195342, 195348, 195353, 195359, 195365, - 195372, 195377, 195383, 195389, 195396, 195402, 195409, 195416, - 195424, 195429, 195435, 195441, 195448, 195454, 195461, 195468, - 195476, 195482, 195489, 195496, 195504, 195511, 195519, 195527, - 195536, 195541, 195547, 195553, 195560, 195566, 195573, 195580, - 195588, 195594, 195601, 195608, 195616, 195623, 195631, 195639, - 195648, 195654, 195661, 195668, 195676, 195683, 195691, 195699, - 195708, 195715, 195723, 195731, 195740, 195748, 195757, 195766, - 195776, 195781, 195787, 195793, 195800, 195806, 195813, 195820, - 195828, 195834, 195841, 195848, 195856, 195863, 195871, 195879, - 195888, 195894, 195901, 195908, 195916, 195923, 195931, 195939, - 195948, 195955, 195963, 195971, 195980, 195988, 195997, 196006, - 196016, 196022, 196029, 196036, 196044, 196051, 196059, 196067, - 196076, 196083, 196091, 196099, 196108, 196116, 196125, 196134, - 196144, 196151, 196159, 196167, 196176, 196184, 196193, 196202, - 196212, 196220, 196229, 196238, 196248, 196257, 196267, 196277, - 196288, 196293, 196299, 196305, 196312, 196318, 196325, 196332, - 196340, 196346, 196353, 196360, 196368, 196375, 196383, 196391, - 196400, 196406, 196413, 196420, 196428, 196435, 196443, 196451, - 196460, 196467, 196475, 196483, 196492, 196500, 196509, 196518, - 196528, 196534, 196541, 196548, 196556, 196563, 196571, 196579, - 196588, 196595, 196603, 196611, 196620, 196628, 196637, 196646, - 196656, 196663, 196671, 196679, 196688, 196696, 196705, 196714, - 196724, 196732, 196741, 196750, 196760, 196769, 196779, 196789, - 196800, 196806, 196813, 196820, 196828, 196835, 196843, 196851, - 196860, 196867, 196875, 196883, 196892, 196900, 196909, 196918, - 196928, 196935, 196943, 196951, 196960, 196968, 196977, 196986, - 196996, 197004, 197013, 197022, 197032, 197041, 197051, 197061, - 197072, 197079, 197087, 197095, 197104, 197112, 197121, 197130, - 197140, 197148, 197157, 197166, 197176, 197185, 197195, 197205, - 197216, 197224, 197233, 197242, 197252, 197261, 197271, 197281, - 197292, 197301, 197311, 197321, 197332, 197342, 197353, 197364, - 197376, 197381, 197387, 197393, 197400, 197406, 197413, 197420, - 197428, 197434, 197441, 197448, 197456, 197463, 197471, 197479, - 197488, 197494, 197501, 197508, 197516, 197523, 197531, 197539, - 197548, 197555, 197563, 197571, 197580, 197588, 197597, 197606, - 197616, 197622, 197629, 197636, 197644, 197651, 197659, 197667, - 197676, 197683, 197691, 197699, 197708, 197716, 197725, 197734, - 197744, 197751, 197759, 197767, 197776, 197784, 197793, 197802, - 197812, 197820, 197829, 197838, 197848, 197857, 197867, 197877, - 197888, 197894, 197901, 197908, 197916, 197923, 197931, 197939, - 197948, 197955, 197963, 197971, 197980, 197988, 197997, 198006, - 198016, 198023, 198031, 198039, 198048, 198056, 198065, 198074, - 198084, 198092, 198101, 198110, 198120, 198129, 198139, 198149, - 198160, 198167, 198175, 198183, 198192, 198200, 198209, 198218, - 198228, 198236, 198245, 198254, 198264, 198273, 198283, 198293, - 198304, 198312, 198321, 198330, 198340, 198349, 198359, 198369, - 198380, 198389, 198399, 198409, 198420, 198430, 198441, 198452, - 198464, 198470, 198477, 198484, 198492, 198499, 198507, 198515, - 198524, 198531, 198539, 198547, 198556, 198564, 198573, 198582, - 198592, 198599, 198607, 198615, 198624, 198632, 198641, 198650, - 198660, 198668, 198677, 198686, 198696, 198705, 198715, 198725, - 198736, 198743, 198751, 198759, 198768, 198776, 198785, 198794, - 198804, 198812, 198821, 198830, 198840, 198849, 198859, 198869, - 198880, 198888, 198897, 198906, 198916, 198925, 198935, 198945, - 198956, 198965, 198975, 198985, 198996, 199006, 199017, 199028, - 199040, 199047, 199055, 199063, 199072, 199080, 199089, 199098, - 199108, 199116, 199125, 199134, 199144, 199153, 199163, 199173, - 199184, 199192, 199201, 199210, 199220, 199229, 199239, 199249, - 199260, 199269, 199279, 199289, 199300, 199310, 199321, 199332, - 199344, 199352, 199361, 199370, 199380, 199389, 199399, 199409, - 199420, 199429, 199439, 199449, 199460, 199470, 199481, 199492, - 199504, 199513, 199523, 199533, 199544, 199554, 199565, 199576, - 199588, 199598, 199609, 199620, 199632, 199643, 199655, 199667, - 199680, 199684, 199689, 199694, 199700, 199705, 199711, 199717, - 199724, 199729, 199735, 199741, 199748, 199754, 199761, 199768, - 199776, 199781, 199787, 199793, 199800, 199806, 199813, 199820, - 199828, 199834, 199841, 199848, 199856, 199863, 199871, 199879, - 199888, 199893, 199899, 199905, 199912, 199918, 199925, 199932, - 199940, 199946, 199953, 199960, 199968, 199975, 199983, 199991, - 200000, 200006, 200013, 200020, 200028, 200035, 200043, 200051, - 200060, 200067, 200075, 200083, 200092, 200100, 200109, 200118, - 200128, 200133, 200139, 200145, 200152, 200158, 200165, 200172, - 200180, 200186, 200193, 200200, 200208, 200215, 200223, 200231, - 200240, 200246, 200253, 200260, 200268, 200275, 200283, 200291, - 200300, 200307, 200315, 200323, 200332, 200340, 200349, 200358, - 200368, 200374, 200381, 200388, 200396, 200403, 200411, 200419, - 200428, 200435, 200443, 200451, 200460, 200468, 200477, 200486, - 200496, 200503, 200511, 200519, 200528, 200536, 200545, 200554, - 200564, 200572, 200581, 200590, 200600, 200609, 200619, 200629, - 200640, 200645, 200651, 200657, 200664, 200670, 200677, 200684, - 200692, 200698, 200705, 200712, 200720, 200727, 200735, 200743, - 200752, 200758, 200765, 200772, 200780, 200787, 200795, 200803, - 200812, 200819, 200827, 200835, 200844, 200852, 200861, 200870, - 200880, 200886, 200893, 200900, 200908, 200915, 200923, 200931, - 200940, 200947, 200955, 200963, 200972, 200980, 200989, 200998, - 201008, 201015, 201023, 201031, 201040, 201048, 201057, 201066, - 201076, 201084, 201093, 201102, 201112, 201121, 201131, 201141, - 201152, 201158, 201165, 201172, 201180, 201187, 201195, 201203, - 201212, 201219, 201227, 201235, 201244, 201252, 201261, 201270, - 201280, 201287, 201295, 201303, 201312, 201320, 201329, 201338, - 201348, 201356, 201365, 201374, 201384, 201393, 201403, 201413, - 201424, 201431, 201439, 201447, 201456, 201464, 201473, 201482, - 201492, 201500, 201509, 201518, 201528, 201537, 201547, 201557, - 201568, 201576, 201585, 201594, 201604, 201613, 201623, 201633, - 201644, 201653, 201663, 201673, 201684, 201694, 201705, 201716, - 201728, 201733, 201739, 201745, 201752, 201758, 201765, 201772, - 201780, 201786, 201793, 201800, 201808, 201815, 201823, 201831, - 201840, 201846, 201853, 201860, 201868, 201875, 201883, 201891, - 201900, 201907, 201915, 201923, 201932, 201940, 201949, 201958, - 201968, 201974, 201981, 201988, 201996, 202003, 202011, 202019, - 202028, 202035, 202043, 202051, 202060, 202068, 202077, 202086, - 202096, 202103, 202111, 202119, 202128, 202136, 202145, 202154, - 202164, 202172, 202181, 202190, 202200, 202209, 202219, 202229, - 202240, 202246, 202253, 202260, 202268, 202275, 202283, 202291, - 202300, 202307, 202315, 202323, 202332, 202340, 202349, 202358, - 202368, 202375, 202383, 202391, 202400, 202408, 202417, 202426, - 202436, 202444, 202453, 202462, 202472, 202481, 202491, 202501, - 202512, 202519, 202527, 202535, 202544, 202552, 202561, 202570, - 202580, 202588, 202597, 202606, 202616, 202625, 202635, 202645, - 202656, 202664, 202673, 202682, 202692, 202701, 202711, 202721, - 202732, 202741, 202751, 202761, 202772, 202782, 202793, 202804, - 202816, 202822, 202829, 202836, 202844, 202851, 202859, 202867, - 202876, 202883, 202891, 202899, 202908, 202916, 202925, 202934, - 202944, 202951, 202959, 202967, 202976, 202984, 202993, 203002, - 203012, 203020, 203029, 203038, 203048, 203057, 203067, 203077, - 203088, 203095, 203103, 203111, 203120, 203128, 203137, 203146, - 203156, 203164, 203173, 203182, 203192, 203201, 203211, 203221, - 203232, 203240, 203249, 203258, 203268, 203277, 203287, 203297, - 203308, 203317, 203327, 203337, 203348, 203358, 203369, 203380, - 203392, 203399, 203407, 203415, 203424, 203432, 203441, 203450, - 203460, 203468, 203477, 203486, 203496, 203505, 203515, 203525, - 203536, 203544, 203553, 203562, 203572, 203581, 203591, 203601, - 203612, 203621, 203631, 203641, 203652, 203662, 203673, 203684, - 203696, 203704, 203713, 203722, 203732, 203741, 203751, 203761, - 203772, 203781, 203791, 203801, 203812, 203822, 203833, 203844, - 203856, 203865, 203875, 203885, 203896, 203906, 203917, 203928, - 203940, 203950, 203961, 203972, 203984, 203995, 204007, 204019, - 204032, 204037, 204043, 204049, 204056, 204062, 204069, 204076, - 204084, 204090, 204097, 204104, 204112, 204119, 204127, 204135, - 204144, 204150, 204157, 204164, 204172, 204179, 204187, 204195, - 204204, 204211, 204219, 204227, 204236, 204244, 204253, 204262, - 204272, 204278, 204285, 204292, 204300, 204307, 204315, 204323, - 204332, 204339, 204347, 204355, 204364, 204372, 204381, 204390, - 204400, 204407, 204415, 204423, 204432, 204440, 204449, 204458, - 204468, 204476, 204485, 204494, 204504, 204513, 204523, 204533, - 204544, 204550, 204557, 204564, 204572, 204579, 204587, 204595, - 204604, 204611, 204619, 204627, 204636, 204644, 204653, 204662, - 204672, 204679, 204687, 204695, 204704, 204712, 204721, 204730, - 204740, 204748, 204757, 204766, 204776, 204785, 204795, 204805, - 204816, 204823, 204831, 204839, 204848, 204856, 204865, 204874, - 204884, 204892, 204901, 204910, 204920, 204929, 204939, 204949, - 204960, 204968, 204977, 204986, 204996, 205005, 205015, 205025, - 205036, 205045, 205055, 205065, 205076, 205086, 205097, 205108, - 205120, 205126, 205133, 205140, 205148, 205155, 205163, 205171, - 205180, 205187, 205195, 205203, 205212, 205220, 205229, 205238, - 205248, 205255, 205263, 205271, 205280, 205288, 205297, 205306, - 205316, 205324, 205333, 205342, 205352, 205361, 205371, 205381, - 205392, 205399, 205407, 205415, 205424, 205432, 205441, 205450, - 205460, 205468, 205477, 205486, 205496, 205505, 205515, 205525, - 205536, 205544, 205553, 205562, 205572, 205581, 205591, 205601, - 205612, 205621, 205631, 205641, 205652, 205662, 205673, 205684, - 205696, 205703, 205711, 205719, 205728, 205736, 205745, 205754, - 205764, 205772, 205781, 205790, 205800, 205809, 205819, 205829, - 205840, 205848, 205857, 205866, 205876, 205885, 205895, 205905, - 205916, 205925, 205935, 205945, 205956, 205966, 205977, 205988, - 206000, 206008, 206017, 206026, 206036, 206045, 206055, 206065, - 206076, 206085, 206095, 206105, 206116, 206126, 206137, 206148, - 206160, 206169, 206179, 206189, 206200, 206210, 206221, 206232, - 206244, 206254, 206265, 206276, 206288, 206299, 206311, 206323, - 206336, 206342, 206349, 206356, 206364, 206371, 206379, 206387, - 206396, 206403, 206411, 206419, 206428, 206436, 206445, 206454, - 206464, 206471, 206479, 206487, 206496, 206504, 206513, 206522, - 206532, 206540, 206549, 206558, 206568, 206577, 206587, 206597, - 206608, 206615, 206623, 206631, 206640, 206648, 206657, 206666, - 206676, 206684, 206693, 206702, 206712, 206721, 206731, 206741, - 206752, 206760, 206769, 206778, 206788, 206797, 206807, 206817, - 206828, 206837, 206847, 206857, 206868, 206878, 206889, 206900, - 206912, 206919, 206927, 206935, 206944, 206952, 206961, 206970, - 206980, 206988, 206997, 207006, 207016, 207025, 207035, 207045, - 207056, 207064, 207073, 207082, 207092, 207101, 207111, 207121, - 207132, 207141, 207151, 207161, 207172, 207182, 207193, 207204, - 207216, 207224, 207233, 207242, 207252, 207261, 207271, 207281, - 207292, 207301, 207311, 207321, 207332, 207342, 207353, 207364, - 207376, 207385, 207395, 207405, 207416, 207426, 207437, 207448, - 207460, 207470, 207481, 207492, 207504, 207515, 207527, 207539, - 207552, 207559, 207567, 207575, 207584, 207592, 207601, 207610, - 207620, 207628, 207637, 207646, 207656, 207665, 207675, 207685, - 207696, 207704, 207713, 207722, 207732, 207741, 207751, 207761, - 207772, 207781, 207791, 207801, 207812, 207822, 207833, 207844, - 207856, 207864, 207873, 207882, 207892, 207901, 207911, 207921, - 207932, 207941, 207951, 207961, 207972, 207982, 207993, 208004, - 208016, 208025, 208035, 208045, 208056, 208066, 208077, 208088, - 208100, 208110, 208121, 208132, 208144, 208155, 208167, 208179, - 208192, 208200, 208209, 208218, 208228, 208237, 208247, 208257, - 208268, 208277, 208287, 208297, 208308, 208318, 208329, 208340, - 208352, 208361, 208371, 208381, 208392, 208402, 208413, 208424, - 208436, 208446, 208457, 208468, 208480, 208491, 208503, 208515, - 208528, 208537, 208547, 208557, 208568, 208578, 208589, 208600, - 208612, 208622, 208633, 208644, 208656, 208667, 208679, 208691, - 208704, 208714, 208725, 208736, 208748, 208759, 208771, 208783, - 208796, 208807, 208819, 208831, 208844, 208856, 208869, 208882, - 208896, 208899, 208903, 208907, 208912, 208916, 208921, 208926, - 208932, 208936, 208941, 208946, 208952, 208957, 208963, 208969, - 208976, 208980, 208985, 208990, 208996, 209001, 209007, 209013, - 209020, 209025, 209031, 209037, 209044, 209050, 209057, 209064, - 209072, 209076, 209081, 209086, 209092, 209097, 209103, 209109, - 209116, 209121, 209127, 209133, 209140, 209146, 209153, 209160, - 209168, 209173, 209179, 209185, 209192, 209198, 209205, 209212, - 209220, 209226, 209233, 209240, 209248, 209255, 209263, 209271, - 209280, 209284, 209289, 209294, 209300, 209305, 209311, 209317, - 209324, 209329, 209335, 209341, 209348, 209354, 209361, 209368, - 209376, 209381, 209387, 209393, 209400, 209406, 209413, 209420, - 209428, 209434, 209441, 209448, 209456, 209463, 209471, 209479, - 209488, 209493, 209499, 209505, 209512, 209518, 209525, 209532, - 209540, 209546, 209553, 209560, 209568, 209575, 209583, 209591, - 209600, 209606, 209613, 209620, 209628, 209635, 209643, 209651, - 209660, 209667, 209675, 209683, 209692, 209700, 209709, 209718, - 209728, 209732, 209737, 209742, 209748, 209753, 209759, 209765, - 209772, 209777, 209783, 209789, 209796, 209802, 209809, 209816, - 209824, 209829, 209835, 209841, 209848, 209854, 209861, 209868, - 209876, 209882, 209889, 209896, 209904, 209911, 209919, 209927, - 209936, 209941, 209947, 209953, 209960, 209966, 209973, 209980, - 209988, 209994, 210001, 210008, 210016, 210023, 210031, 210039, - 210048, 210054, 210061, 210068, 210076, 210083, 210091, 210099, - 210108, 210115, 210123, 210131, 210140, 210148, 210157, 210166, - 210176, 210181, 210187, 210193, 210200, 210206, 210213, 210220, - 210228, 210234, 210241, 210248, 210256, 210263, 210271, 210279, - 210288, 210294, 210301, 210308, 210316, 210323, 210331, 210339, - 210348, 210355, 210363, 210371, 210380, 210388, 210397, 210406, - 210416, 210422, 210429, 210436, 210444, 210451, 210459, 210467, - 210476, 210483, 210491, 210499, 210508, 210516, 210525, 210534, - 210544, 210551, 210559, 210567, 210576, 210584, 210593, 210602, - 210612, 210620, 210629, 210638, 210648, 210657, 210667, 210677, - 210688, 210692, 210697, 210702, 210708, 210713, 210719, 210725, - 210732, 210737, 210743, 210749, 210756, 210762, 210769, 210776, - 210784, 210789, 210795, 210801, 210808, 210814, 210821, 210828, - 210836, 210842, 210849, 210856, 210864, 210871, 210879, 210887, - 210896, 210901, 210907, 210913, 210920, 210926, 210933, 210940, - 210948, 210954, 210961, 210968, 210976, 210983, 210991, 210999, - 211008, 211014, 211021, 211028, 211036, 211043, 211051, 211059, - 211068, 211075, 211083, 211091, 211100, 211108, 211117, 211126, - 211136, 211141, 211147, 211153, 211160, 211166, 211173, 211180, - 211188, 211194, 211201, 211208, 211216, 211223, 211231, 211239, - 211248, 211254, 211261, 211268, 211276, 211283, 211291, 211299, - 211308, 211315, 211323, 211331, 211340, 211348, 211357, 211366, - 211376, 211382, 211389, 211396, 211404, 211411, 211419, 211427, - 211436, 211443, 211451, 211459, 211468, 211476, 211485, 211494, - 211504, 211511, 211519, 211527, 211536, 211544, 211553, 211562, - 211572, 211580, 211589, 211598, 211608, 211617, 211627, 211637, - 211648, 211653, 211659, 211665, 211672, 211678, 211685, 211692, - 211700, 211706, 211713, 211720, 211728, 211735, 211743, 211751, - 211760, 211766, 211773, 211780, 211788, 211795, 211803, 211811, - 211820, 211827, 211835, 211843, 211852, 211860, 211869, 211878, - 211888, 211894, 211901, 211908, 211916, 211923, 211931, 211939, - 211948, 211955, 211963, 211971, 211980, 211988, 211997, 212006, - 212016, 212023, 212031, 212039, 212048, 212056, 212065, 212074, - 212084, 212092, 212101, 212110, 212120, 212129, 212139, 212149, - 212160, 212166, 212173, 212180, 212188, 212195, 212203, 212211, - 212220, 212227, 212235, 212243, 212252, 212260, 212269, 212278, - 212288, 212295, 212303, 212311, 212320, 212328, 212337, 212346, - 212356, 212364, 212373, 212382, 212392, 212401, 212411, 212421, - 212432, 212439, 212447, 212455, 212464, 212472, 212481, 212490, - 212500, 212508, 212517, 212526, 212536, 212545, 212555, 212565, - 212576, 212584, 212593, 212602, 212612, 212621, 212631, 212641, - 212652, 212661, 212671, 212681, 212692, 212702, 212713, 212724, - 212736, 212740, 212745, 212750, 212756, 212761, 212767, 212773, - 212780, 212785, 212791, 212797, 212804, 212810, 212817, 212824, - 212832, 212837, 212843, 212849, 212856, 212862, 212869, 212876, - 212884, 212890, 212897, 212904, 212912, 212919, 212927, 212935, - 212944, 212949, 212955, 212961, 212968, 212974, 212981, 212988, - 212996, 213002, 213009, 213016, 213024, 213031, 213039, 213047, - 213056, 213062, 213069, 213076, 213084, 213091, 213099, 213107, - 213116, 213123, 213131, 213139, 213148, 213156, 213165, 213174, - 213184, 213189, 213195, 213201, 213208, 213214, 213221, 213228, - 213236, 213242, 213249, 213256, 213264, 213271, 213279, 213287, - 213296, 213302, 213309, 213316, 213324, 213331, 213339, 213347, - 213356, 213363, 213371, 213379, 213388, 213396, 213405, 213414, - 213424, 213430, 213437, 213444, 213452, 213459, 213467, 213475, - 213484, 213491, 213499, 213507, 213516, 213524, 213533, 213542, - 213552, 213559, 213567, 213575, 213584, 213592, 213601, 213610, - 213620, 213628, 213637, 213646, 213656, 213665, 213675, 213685, - 213696, 213701, 213707, 213713, 213720, 213726, 213733, 213740, - 213748, 213754, 213761, 213768, 213776, 213783, 213791, 213799, - 213808, 213814, 213821, 213828, 213836, 213843, 213851, 213859, - 213868, 213875, 213883, 213891, 213900, 213908, 213917, 213926, - 213936, 213942, 213949, 213956, 213964, 213971, 213979, 213987, - 213996, 214003, 214011, 214019, 214028, 214036, 214045, 214054, - 214064, 214071, 214079, 214087, 214096, 214104, 214113, 214122, - 214132, 214140, 214149, 214158, 214168, 214177, 214187, 214197, - 214208, 214214, 214221, 214228, 214236, 214243, 214251, 214259, - 214268, 214275, 214283, 214291, 214300, 214308, 214317, 214326, - 214336, 214343, 214351, 214359, 214368, 214376, 214385, 214394, - 214404, 214412, 214421, 214430, 214440, 214449, 214459, 214469, - 214480, 214487, 214495, 214503, 214512, 214520, 214529, 214538, - 214548, 214556, 214565, 214574, 214584, 214593, 214603, 214613, - 214624, 214632, 214641, 214650, 214660, 214669, 214679, 214689, - 214700, 214709, 214719, 214729, 214740, 214750, 214761, 214772, - 214784, 214789, 214795, 214801, 214808, 214814, 214821, 214828, - 214836, 214842, 214849, 214856, 214864, 214871, 214879, 214887, - 214896, 214902, 214909, 214916, 214924, 214931, 214939, 214947, - 214956, 214963, 214971, 214979, 214988, 214996, 215005, 215014, - 215024, 215030, 215037, 215044, 215052, 215059, 215067, 215075, - 215084, 215091, 215099, 215107, 215116, 215124, 215133, 215142, - 215152, 215159, 215167, 215175, 215184, 215192, 215201, 215210, - 215220, 215228, 215237, 215246, 215256, 215265, 215275, 215285, - 215296, 215302, 215309, 215316, 215324, 215331, 215339, 215347, - 215356, 215363, 215371, 215379, 215388, 215396, 215405, 215414, - 215424, 215431, 215439, 215447, 215456, 215464, 215473, 215482, - 215492, 215500, 215509, 215518, 215528, 215537, 215547, 215557, - 215568, 215575, 215583, 215591, 215600, 215608, 215617, 215626, - 215636, 215644, 215653, 215662, 215672, 215681, 215691, 215701, - 215712, 215720, 215729, 215738, 215748, 215757, 215767, 215777, - 215788, 215797, 215807, 215817, 215828, 215838, 215849, 215860, - 215872, 215878, 215885, 215892, 215900, 215907, 215915, 215923, - 215932, 215939, 215947, 215955, 215964, 215972, 215981, 215990, - 216000, 216007, 216015, 216023, 216032, 216040, 216049, 216058, - 216068, 216076, 216085, 216094, 216104, 216113, 216123, 216133, - 216144, 216151, 216159, 216167, 216176, 216184, 216193, 216202, - 216212, 216220, 216229, 216238, 216248, 216257, 216267, 216277, - 216288, 216296, 216305, 216314, 216324, 216333, 216343, 216353, - 216364, 216373, 216383, 216393, 216404, 216414, 216425, 216436, - 216448, 216455, 216463, 216471, 216480, 216488, 216497, 216506, - 216516, 216524, 216533, 216542, 216552, 216561, 216571, 216581, - 216592, 216600, 216609, 216618, 216628, 216637, 216647, 216657, - 216668, 216677, 216687, 216697, 216708, 216718, 216729, 216740, - 216752, 216760, 216769, 216778, 216788, 216797, 216807, 216817, - 216828, 216837, 216847, 216857, 216868, 216878, 216889, 216900, - 216912, 216921, 216931, 216941, 216952, 216962, 216973, 216984, - 216996, 217006, 217017, 217028, 217040, 217051, 217063, 217075, - 217088, 217092, 217097, 217102, 217108, 217113, 217119, 217125, - 217132, 217137, 217143, 217149, 217156, 217162, 217169, 217176, - 217184, 217189, 217195, 217201, 217208, 217214, 217221, 217228, - 217236, 217242, 217249, 217256, 217264, 217271, 217279, 217287, - 217296, 217301, 217307, 217313, 217320, 217326, 217333, 217340, - 217348, 217354, 217361, 217368, 217376, 217383, 217391, 217399, - 217408, 217414, 217421, 217428, 217436, 217443, 217451, 217459, - 217468, 217475, 217483, 217491, 217500, 217508, 217517, 217526, - 217536, 217541, 217547, 217553, 217560, 217566, 217573, 217580, - 217588, 217594, 217601, 217608, 217616, 217623, 217631, 217639, - 217648, 217654, 217661, 217668, 217676, 217683, 217691, 217699, - 217708, 217715, 217723, 217731, 217740, 217748, 217757, 217766, - 217776, 217782, 217789, 217796, 217804, 217811, 217819, 217827, - 217836, 217843, 217851, 217859, 217868, 217876, 217885, 217894, - 217904, 217911, 217919, 217927, 217936, 217944, 217953, 217962, - 217972, 217980, 217989, 217998, 218008, 218017, 218027, 218037, - 218048, 218053, 218059, 218065, 218072, 218078, 218085, 218092, - 218100, 218106, 218113, 218120, 218128, 218135, 218143, 218151, - 218160, 218166, 218173, 218180, 218188, 218195, 218203, 218211, - 218220, 218227, 218235, 218243, 218252, 218260, 218269, 218278, - 218288, 218294, 218301, 218308, 218316, 218323, 218331, 218339, - 218348, 218355, 218363, 218371, 218380, 218388, 218397, 218406, - 218416, 218423, 218431, 218439, 218448, 218456, 218465, 218474, - 218484, 218492, 218501, 218510, 218520, 218529, 218539, 218549, - 218560, 218566, 218573, 218580, 218588, 218595, 218603, 218611, - 218620, 218627, 218635, 218643, 218652, 218660, 218669, 218678, - 218688, 218695, 218703, 218711, 218720, 218728, 218737, 218746, - 218756, 218764, 218773, 218782, 218792, 218801, 218811, 218821, - 218832, 218839, 218847, 218855, 218864, 218872, 218881, 218890, - 218900, 218908, 218917, 218926, 218936, 218945, 218955, 218965, - 218976, 218984, 218993, 219002, 219012, 219021, 219031, 219041, - 219052, 219061, 219071, 219081, 219092, 219102, 219113, 219124, - 219136, 219141, 219147, 219153, 219160, 219166, 219173, 219180, - 219188, 219194, 219201, 219208, 219216, 219223, 219231, 219239, - 219248, 219254, 219261, 219268, 219276, 219283, 219291, 219299, - 219308, 219315, 219323, 219331, 219340, 219348, 219357, 219366, - 219376, 219382, 219389, 219396, 219404, 219411, 219419, 219427, - 219436, 219443, 219451, 219459, 219468, 219476, 219485, 219494, - 219504, 219511, 219519, 219527, 219536, 219544, 219553, 219562, - 219572, 219580, 219589, 219598, 219608, 219617, 219627, 219637, - 219648, 219654, 219661, 219668, 219676, 219683, 219691, 219699, - 219708, 219715, 219723, 219731, 219740, 219748, 219757, 219766, - 219776, 219783, 219791, 219799, 219808, 219816, 219825, 219834, - 219844, 219852, 219861, 219870, 219880, 219889, 219899, 219909, - 219920, 219927, 219935, 219943, 219952, 219960, 219969, 219978, - 219988, 219996, 220005, 220014, 220024, 220033, 220043, 220053, - 220064, 220072, 220081, 220090, 220100, 220109, 220119, 220129, - 220140, 220149, 220159, 220169, 220180, 220190, 220201, 220212, - 220224, 220230, 220237, 220244, 220252, 220259, 220267, 220275, - 220284, 220291, 220299, 220307, 220316, 220324, 220333, 220342, - 220352, 220359, 220367, 220375, 220384, 220392, 220401, 220410, - 220420, 220428, 220437, 220446, 220456, 220465, 220475, 220485, - 220496, 220503, 220511, 220519, 220528, 220536, 220545, 220554, - 220564, 220572, 220581, 220590, 220600, 220609, 220619, 220629, - 220640, 220648, 220657, 220666, 220676, 220685, 220695, 220705, - 220716, 220725, 220735, 220745, 220756, 220766, 220777, 220788, - 220800, 220807, 220815, 220823, 220832, 220840, 220849, 220858, - 220868, 220876, 220885, 220894, 220904, 220913, 220923, 220933, - 220944, 220952, 220961, 220970, 220980, 220989, 220999, 221009, - 221020, 221029, 221039, 221049, 221060, 221070, 221081, 221092, - 221104, 221112, 221121, 221130, 221140, 221149, 221159, 221169, - 221180, 221189, 221199, 221209, 221220, 221230, 221241, 221252, - 221264, 221273, 221283, 221293, 221304, 221314, 221325, 221336, - 221348, 221358, 221369, 221380, 221392, 221403, 221415, 221427, - 221440, 221445, 221451, 221457, 221464, 221470, 221477, 221484, - 221492, 221498, 221505, 221512, 221520, 221527, 221535, 221543, - 221552, 221558, 221565, 221572, 221580, 221587, 221595, 221603, - 221612, 221619, 221627, 221635, 221644, 221652, 221661, 221670, - 221680, 221686, 221693, 221700, 221708, 221715, 221723, 221731, - 221740, 221747, 221755, 221763, 221772, 221780, 221789, 221798, - 221808, 221815, 221823, 221831, 221840, 221848, 221857, 221866, - 221876, 221884, 221893, 221902, 221912, 221921, 221931, 221941, - 221952, 221958, 221965, 221972, 221980, 221987, 221995, 222003, - 222012, 222019, 222027, 222035, 222044, 222052, 222061, 222070, - 222080, 222087, 222095, 222103, 222112, 222120, 222129, 222138, - 222148, 222156, 222165, 222174, 222184, 222193, 222203, 222213, - 222224, 222231, 222239, 222247, 222256, 222264, 222273, 222282, - 222292, 222300, 222309, 222318, 222328, 222337, 222347, 222357, - 222368, 222376, 222385, 222394, 222404, 222413, 222423, 222433, - 222444, 222453, 222463, 222473, 222484, 222494, 222505, 222516, - 222528, 222534, 222541, 222548, 222556, 222563, 222571, 222579, - 222588, 222595, 222603, 222611, 222620, 222628, 222637, 222646, - 222656, 222663, 222671, 222679, 222688, 222696, 222705, 222714, - 222724, 222732, 222741, 222750, 222760, 222769, 222779, 222789, - 222800, 222807, 222815, 222823, 222832, 222840, 222849, 222858, - 222868, 222876, 222885, 222894, 222904, 222913, 222923, 222933, - 222944, 222952, 222961, 222970, 222980, 222989, 222999, 223009, - 223020, 223029, 223039, 223049, 223060, 223070, 223081, 223092, - 223104, 223111, 223119, 223127, 223136, 223144, 223153, 223162, - 223172, 223180, 223189, 223198, 223208, 223217, 223227, 223237, - 223248, 223256, 223265, 223274, 223284, 223293, 223303, 223313, - 223324, 223333, 223343, 223353, 223364, 223374, 223385, 223396, - 223408, 223416, 223425, 223434, 223444, 223453, 223463, 223473, - 223484, 223493, 223503, 223513, 223524, 223534, 223545, 223556, - 223568, 223577, 223587, 223597, 223608, 223618, 223629, 223640, - 223652, 223662, 223673, 223684, 223696, 223707, 223719, 223731, - 223744, 223750, 223757, 223764, 223772, 223779, 223787, 223795, - 223804, 223811, 223819, 223827, 223836, 223844, 223853, 223862, - 223872, 223879, 223887, 223895, 223904, 223912, 223921, 223930, - 223940, 223948, 223957, 223966, 223976, 223985, 223995, 224005, - 224016, 224023, 224031, 224039, 224048, 224056, 224065, 224074, - 224084, 224092, 224101, 224110, 224120, 224129, 224139, 224149, - 224160, 224168, 224177, 224186, 224196, 224205, 224215, 224225, - 224236, 224245, 224255, 224265, 224276, 224286, 224297, 224308, - 224320, 224327, 224335, 224343, 224352, 224360, 224369, 224378, - 224388, 224396, 224405, 224414, 224424, 224433, 224443, 224453, - 224464, 224472, 224481, 224490, 224500, 224509, 224519, 224529, - 224540, 224549, 224559, 224569, 224580, 224590, 224601, 224612, - 224624, 224632, 224641, 224650, 224660, 224669, 224679, 224689, - 224700, 224709, 224719, 224729, 224740, 224750, 224761, 224772, - 224784, 224793, 224803, 224813, 224824, 224834, 224845, 224856, - 224868, 224878, 224889, 224900, 224912, 224923, 224935, 224947, - 224960, 224967, 224975, 224983, 224992, 225000, 225009, 225018, - 225028, 225036, 225045, 225054, 225064, 225073, 225083, 225093, - 225104, 225112, 225121, 225130, 225140, 225149, 225159, 225169, - 225180, 225189, 225199, 225209, 225220, 225230, 225241, 225252, - 225264, 225272, 225281, 225290, 225300, 225309, 225319, 225329, - 225340, 225349, 225359, 225369, 225380, 225390, 225401, 225412, - 225424, 225433, 225443, 225453, 225464, 225474, 225485, 225496, - 225508, 225518, 225529, 225540, 225552, 225563, 225575, 225587, - 225600, 225608, 225617, 225626, 225636, 225645, 225655, 225665, - 225676, 225685, 225695, 225705, 225716, 225726, 225737, 225748, - 225760, 225769, 225779, 225789, 225800, 225810, 225821, 225832, - 225844, 225854, 225865, 225876, 225888, 225899, 225911, 225923, - 225936, 225945, 225955, 225965, 225976, 225986, 225997, 226008, - 226020, 226030, 226041, 226052, 226064, 226075, 226087, 226099, - 226112, 226122, 226133, 226144, 226156, 226167, 226179, 226191, - 226204, 226215, 226227, 226239, 226252, 226264, 226277, 226290, - 226304, 226308, 226313, 226318, 226324, 226329, 226335, 226341, - 226348, 226353, 226359, 226365, 226372, 226378, 226385, 226392, - 226400, 226405, 226411, 226417, 226424, 226430, 226437, 226444, - 226452, 226458, 226465, 226472, 226480, 226487, 226495, 226503, - 226512, 226517, 226523, 226529, 226536, 226542, 226549, 226556, - 226564, 226570, 226577, 226584, 226592, 226599, 226607, 226615, - 226624, 226630, 226637, 226644, 226652, 226659, 226667, 226675, - 226684, 226691, 226699, 226707, 226716, 226724, 226733, 226742, - 226752, 226757, 226763, 226769, 226776, 226782, 226789, 226796, - 226804, 226810, 226817, 226824, 226832, 226839, 226847, 226855, - 226864, 226870, 226877, 226884, 226892, 226899, 226907, 226915, - 226924, 226931, 226939, 226947, 226956, 226964, 226973, 226982, - 226992, 226998, 227005, 227012, 227020, 227027, 227035, 227043, - 227052, 227059, 227067, 227075, 227084, 227092, 227101, 227110, - 227120, 227127, 227135, 227143, 227152, 227160, 227169, 227178, - 227188, 227196, 227205, 227214, 227224, 227233, 227243, 227253, - 227264, 227269, 227275, 227281, 227288, 227294, 227301, 227308, - 227316, 227322, 227329, 227336, 227344, 227351, 227359, 227367, - 227376, 227382, 227389, 227396, 227404, 227411, 227419, 227427, - 227436, 227443, 227451, 227459, 227468, 227476, 227485, 227494, - 227504, 227510, 227517, 227524, 227532, 227539, 227547, 227555, - 227564, 227571, 227579, 227587, 227596, 227604, 227613, 227622, - 227632, 227639, 227647, 227655, 227664, 227672, 227681, 227690, - 227700, 227708, 227717, 227726, 227736, 227745, 227755, 227765, - 227776, 227782, 227789, 227796, 227804, 227811, 227819, 227827, - 227836, 227843, 227851, 227859, 227868, 227876, 227885, 227894, - 227904, 227911, 227919, 227927, 227936, 227944, 227953, 227962, - 227972, 227980, 227989, 227998, 228008, 228017, 228027, 228037, - 228048, 228055, 228063, 228071, 228080, 228088, 228097, 228106, - 228116, 228124, 228133, 228142, 228152, 228161, 228171, 228181, - 228192, 228200, 228209, 228218, 228228, 228237, 228247, 228257, - 228268, 228277, 228287, 228297, 228308, 228318, 228329, 228340, - 228352, 228357, 228363, 228369, 228376, 228382, 228389, 228396, - 228404, 228410, 228417, 228424, 228432, 228439, 228447, 228455, - 228464, 228470, 228477, 228484, 228492, 228499, 228507, 228515, - 228524, 228531, 228539, 228547, 228556, 228564, 228573, 228582, - 228592, 228598, 228605, 228612, 228620, 228627, 228635, 228643, - 228652, 228659, 228667, 228675, 228684, 228692, 228701, 228710, - 228720, 228727, 228735, 228743, 228752, 228760, 228769, 228778, - 228788, 228796, 228805, 228814, 228824, 228833, 228843, 228853, - 228864, 228870, 228877, 228884, 228892, 228899, 228907, 228915, - 228924, 228931, 228939, 228947, 228956, 228964, 228973, 228982, - 228992, 228999, 229007, 229015, 229024, 229032, 229041, 229050, - 229060, 229068, 229077, 229086, 229096, 229105, 229115, 229125, - 229136, 229143, 229151, 229159, 229168, 229176, 229185, 229194, - 229204, 229212, 229221, 229230, 229240, 229249, 229259, 229269, - 229280, 229288, 229297, 229306, 229316, 229325, 229335, 229345, - 229356, 229365, 229375, 229385, 229396, 229406, 229417, 229428, - 229440, 229446, 229453, 229460, 229468, 229475, 229483, 229491, - 229500, 229507, 229515, 229523, 229532, 229540, 229549, 229558, - 229568, 229575, 229583, 229591, 229600, 229608, 229617, 229626, - 229636, 229644, 229653, 229662, 229672, 229681, 229691, 229701, - 229712, 229719, 229727, 229735, 229744, 229752, 229761, 229770, - 229780, 229788, 229797, 229806, 229816, 229825, 229835, 229845, - 229856, 229864, 229873, 229882, 229892, 229901, 229911, 229921, - 229932, 229941, 229951, 229961, 229972, 229982, 229993, 230004, - 230016, 230023, 230031, 230039, 230048, 230056, 230065, 230074, - 230084, 230092, 230101, 230110, 230120, 230129, 230139, 230149, - 230160, 230168, 230177, 230186, 230196, 230205, 230215, 230225, - 230236, 230245, 230255, 230265, 230276, 230286, 230297, 230308, - 230320, 230328, 230337, 230346, 230356, 230365, 230375, 230385, - 230396, 230405, 230415, 230425, 230436, 230446, 230457, 230468, - 230480, 230489, 230499, 230509, 230520, 230530, 230541, 230552, - 230564, 230574, 230585, 230596, 230608, 230619, 230631, 230643, - 230656, 230661, 230667, 230673, 230680, 230686, 230693, 230700, - 230708, 230714, 230721, 230728, 230736, 230743, 230751, 230759, - 230768, 230774, 230781, 230788, 230796, 230803, 230811, 230819, - 230828, 230835, 230843, 230851, 230860, 230868, 230877, 230886, - 230896, 230902, 230909, 230916, 230924, 230931, 230939, 230947, - 230956, 230963, 230971, 230979, 230988, 230996, 231005, 231014, - 231024, 231031, 231039, 231047, 231056, 231064, 231073, 231082, - 231092, 231100, 231109, 231118, 231128, 231137, 231147, 231157, - 231168, 231174, 231181, 231188, 231196, 231203, 231211, 231219, - 231228, 231235, 231243, 231251, 231260, 231268, 231277, 231286, - 231296, 231303, 231311, 231319, 231328, 231336, 231345, 231354, - 231364, 231372, 231381, 231390, 231400, 231409, 231419, 231429, - 231440, 231447, 231455, 231463, 231472, 231480, 231489, 231498, - 231508, 231516, 231525, 231534, 231544, 231553, 231563, 231573, - 231584, 231592, 231601, 231610, 231620, 231629, 231639, 231649, - 231660, 231669, 231679, 231689, 231700, 231710, 231721, 231732, - 231744, 231750, 231757, 231764, 231772, 231779, 231787, 231795, - 231804, 231811, 231819, 231827, 231836, 231844, 231853, 231862, - 231872, 231879, 231887, 231895, 231904, 231912, 231921, 231930, - 231940, 231948, 231957, 231966, 231976, 231985, 231995, 232005, - 232016, 232023, 232031, 232039, 232048, 232056, 232065, 232074, - 232084, 232092, 232101, 232110, 232120, 232129, 232139, 232149, - 232160, 232168, 232177, 232186, 232196, 232205, 232215, 232225, - 232236, 232245, 232255, 232265, 232276, 232286, 232297, 232308, - 232320, 232327, 232335, 232343, 232352, 232360, 232369, 232378, - 232388, 232396, 232405, 232414, 232424, 232433, 232443, 232453, - 232464, 232472, 232481, 232490, 232500, 232509, 232519, 232529, - 232540, 232549, 232559, 232569, 232580, 232590, 232601, 232612, - 232624, 232632, 232641, 232650, 232660, 232669, 232679, 232689, - 232700, 232709, 232719, 232729, 232740, 232750, 232761, 232772, - 232784, 232793, 232803, 232813, 232824, 232834, 232845, 232856, - 232868, 232878, 232889, 232900, 232912, 232923, 232935, 232947, - 232960, 232966, 232973, 232980, 232988, 232995, 233003, 233011, - 233020, 233027, 233035, 233043, 233052, 233060, 233069, 233078, - 233088, 233095, 233103, 233111, 233120, 233128, 233137, 233146, - 233156, 233164, 233173, 233182, 233192, 233201, 233211, 233221, - 233232, 233239, 233247, 233255, 233264, 233272, 233281, 233290, - 233300, 233308, 233317, 233326, 233336, 233345, 233355, 233365, - 233376, 233384, 233393, 233402, 233412, 233421, 233431, 233441, - 233452, 233461, 233471, 233481, 233492, 233502, 233513, 233524, - 233536, 233543, 233551, 233559, 233568, 233576, 233585, 233594, - 233604, 233612, 233621, 233630, 233640, 233649, 233659, 233669, - 233680, 233688, 233697, 233706, 233716, 233725, 233735, 233745, - 233756, 233765, 233775, 233785, 233796, 233806, 233817, 233828, - 233840, 233848, 233857, 233866, 233876, 233885, 233895, 233905, - 233916, 233925, 233935, 233945, 233956, 233966, 233977, 233988, - 234000, 234009, 234019, 234029, 234040, 234050, 234061, 234072, - 234084, 234094, 234105, 234116, 234128, 234139, 234151, 234163, - 234176, 234183, 234191, 234199, 234208, 234216, 234225, 234234, - 234244, 234252, 234261, 234270, 234280, 234289, 234299, 234309, - 234320, 234328, 234337, 234346, 234356, 234365, 234375, 234385, - 234396, 234405, 234415, 234425, 234436, 234446, 234457, 234468, - 234480, 234488, 234497, 234506, 234516, 234525, 234535, 234545, - 234556, 234565, 234575, 234585, 234596, 234606, 234617, 234628, - 234640, 234649, 234659, 234669, 234680, 234690, 234701, 234712, - 234724, 234734, 234745, 234756, 234768, 234779, 234791, 234803, - 234816, 234824, 234833, 234842, 234852, 234861, 234871, 234881, - 234892, 234901, 234911, 234921, 234932, 234942, 234953, 234964, - 234976, 234985, 234995, 235005, 235016, 235026, 235037, 235048, - 235060, 235070, 235081, 235092, 235104, 235115, 235127, 235139, - 235152, 235161, 235171, 235181, 235192, 235202, 235213, 235224, - 235236, 235246, 235257, 235268, 235280, 235291, 235303, 235315, - 235328, 235338, 235349, 235360, 235372, 235383, 235395, 235407, - 235420, 235431, 235443, 235455, 235468, 235480, 235493, 235506, - 235520, 235525, 235531, 235537, 235544, 235550, 235557, 235564, - 235572, 235578, 235585, 235592, 235600, 235607, 235615, 235623, - 235632, 235638, 235645, 235652, 235660, 235667, 235675, 235683, - 235692, 235699, 235707, 235715, 235724, 235732, 235741, 235750, - 235760, 235766, 235773, 235780, 235788, 235795, 235803, 235811, - 235820, 235827, 235835, 235843, 235852, 235860, 235869, 235878, - 235888, 235895, 235903, 235911, 235920, 235928, 235937, 235946, - 235956, 235964, 235973, 235982, 235992, 236001, 236011, 236021, - 236032, 236038, 236045, 236052, 236060, 236067, 236075, 236083, - 236092, 236099, 236107, 236115, 236124, 236132, 236141, 236150, - 236160, 236167, 236175, 236183, 236192, 236200, 236209, 236218, - 236228, 236236, 236245, 236254, 236264, 236273, 236283, 236293, - 236304, 236311, 236319, 236327, 236336, 236344, 236353, 236362, - 236372, 236380, 236389, 236398, 236408, 236417, 236427, 236437, - 236448, 236456, 236465, 236474, 236484, 236493, 236503, 236513, - 236524, 236533, 236543, 236553, 236564, 236574, 236585, 236596, - 236608, 236614, 236621, 236628, 236636, 236643, 236651, 236659, - 236668, 236675, 236683, 236691, 236700, 236708, 236717, 236726, - 236736, 236743, 236751, 236759, 236768, 236776, 236785, 236794, - 236804, 236812, 236821, 236830, 236840, 236849, 236859, 236869, - 236880, 236887, 236895, 236903, 236912, 236920, 236929, 236938, - 236948, 236956, 236965, 236974, 236984, 236993, 237003, 237013, - 237024, 237032, 237041, 237050, 237060, 237069, 237079, 237089, - 237100, 237109, 237119, 237129, 237140, 237150, 237161, 237172, - 237184, 237191, 237199, 237207, 237216, 237224, 237233, 237242, - 237252, 237260, 237269, 237278, 237288, 237297, 237307, 237317, - 237328, 237336, 237345, 237354, 237364, 237373, 237383, 237393, - 237404, 237413, 237423, 237433, 237444, 237454, 237465, 237476, - 237488, 237496, 237505, 237514, 237524, 237533, 237543, 237553, - 237564, 237573, 237583, 237593, 237604, 237614, 237625, 237636, - 237648, 237657, 237667, 237677, 237688, 237698, 237709, 237720, - 237732, 237742, 237753, 237764, 237776, 237787, 237799, 237811, - 237824, 237830, 237837, 237844, 237852, 237859, 237867, 237875, - 237884, 237891, 237899, 237907, 237916, 237924, 237933, 237942, - 237952, 237959, 237967, 237975, 237984, 237992, 238001, 238010, - 238020, 238028, 238037, 238046, 238056, 238065, 238075, 238085, - 238096, 238103, 238111, 238119, 238128, 238136, 238145, 238154, - 238164, 238172, 238181, 238190, 238200, 238209, 238219, 238229, - 238240, 238248, 238257, 238266, 238276, 238285, 238295, 238305, - 238316, 238325, 238335, 238345, 238356, 238366, 238377, 238388, - 238400, 238407, 238415, 238423, 238432, 238440, 238449, 238458, - 238468, 238476, 238485, 238494, 238504, 238513, 238523, 238533, - 238544, 238552, 238561, 238570, 238580, 238589, 238599, 238609, - 238620, 238629, 238639, 238649, 238660, 238670, 238681, 238692, - 238704, 238712, 238721, 238730, 238740, 238749, 238759, 238769, - 238780, 238789, 238799, 238809, 238820, 238830, 238841, 238852, - 238864, 238873, 238883, 238893, 238904, 238914, 238925, 238936, - 238948, 238958, 238969, 238980, 238992, 239003, 239015, 239027, - 239040, 239047, 239055, 239063, 239072, 239080, 239089, 239098, - 239108, 239116, 239125, 239134, 239144, 239153, 239163, 239173, - 239184, 239192, 239201, 239210, 239220, 239229, 239239, 239249, - 239260, 239269, 239279, 239289, 239300, 239310, 239321, 239332, - 239344, 239352, 239361, 239370, 239380, 239389, 239399, 239409, - 239420, 239429, 239439, 239449, 239460, 239470, 239481, 239492, - 239504, 239513, 239523, 239533, 239544, 239554, 239565, 239576, - 239588, 239598, 239609, 239620, 239632, 239643, 239655, 239667, - 239680, 239688, 239697, 239706, 239716, 239725, 239735, 239745, - 239756, 239765, 239775, 239785, 239796, 239806, 239817, 239828, - 239840, 239849, 239859, 239869, 239880, 239890, 239901, 239912, - 239924, 239934, 239945, 239956, 239968, 239979, 239991, 240003, - 240016, 240025, 240035, 240045, 240056, 240066, 240077, 240088, - 240100, 240110, 240121, 240132, 240144, 240155, 240167, 240179, - 240192, 240202, 240213, 240224, 240236, 240247, 240259, 240271, - 240284, 240295, 240307, 240319, 240332, 240344, 240357, 240370, - 240384, 240390, 240397, 240404, 240412, 240419, 240427, 240435, - 240444, 240451, 240459, 240467, 240476, 240484, 240493, 240502, - 240512, 240519, 240527, 240535, 240544, 240552, 240561, 240570, - 240580, 240588, 240597, 240606, 240616, 240625, 240635, 240645, - 240656, 240663, 240671, 240679, 240688, 240696, 240705, 240714, - 240724, 240732, 240741, 240750, 240760, 240769, 240779, 240789, - 240800, 240808, 240817, 240826, 240836, 240845, 240855, 240865, - 240876, 240885, 240895, 240905, 240916, 240926, 240937, 240948, - 240960, 240967, 240975, 240983, 240992, 241000, 241009, 241018, - 241028, 241036, 241045, 241054, 241064, 241073, 241083, 241093, - 241104, 241112, 241121, 241130, 241140, 241149, 241159, 241169, - 241180, 241189, 241199, 241209, 241220, 241230, 241241, 241252, - 241264, 241272, 241281, 241290, 241300, 241309, 241319, 241329, - 241340, 241349, 241359, 241369, 241380, 241390, 241401, 241412, - 241424, 241433, 241443, 241453, 241464, 241474, 241485, 241496, - 241508, 241518, 241529, 241540, 241552, 241563, 241575, 241587, - 241600, 241607, 241615, 241623, 241632, 241640, 241649, 241658, - 241668, 241676, 241685, 241694, 241704, 241713, 241723, 241733, - 241744, 241752, 241761, 241770, 241780, 241789, 241799, 241809, - 241820, 241829, 241839, 241849, 241860, 241870, 241881, 241892, - 241904, 241912, 241921, 241930, 241940, 241949, 241959, 241969, - 241980, 241989, 241999, 242009, 242020, 242030, 242041, 242052, - 242064, 242073, 242083, 242093, 242104, 242114, 242125, 242136, - 242148, 242158, 242169, 242180, 242192, 242203, 242215, 242227, - 242240, 242248, 242257, 242266, 242276, 242285, 242295, 242305, - 242316, 242325, 242335, 242345, 242356, 242366, 242377, 242388, - 242400, 242409, 242419, 242429, 242440, 242450, 242461, 242472, - 242484, 242494, 242505, 242516, 242528, 242539, 242551, 242563, - 242576, 242585, 242595, 242605, 242616, 242626, 242637, 242648, - 242660, 242670, 242681, 242692, 242704, 242715, 242727, 242739, - 242752, 242762, 242773, 242784, 242796, 242807, 242819, 242831, - 242844, 242855, 242867, 242879, 242892, 242904, 242917, 242930, - 242944, 242951, 242959, 242967, 242976, 242984, 242993, 243002, - 243012, 243020, 243029, 243038, 243048, 243057, 243067, 243077, - 243088, 243096, 243105, 243114, 243124, 243133, 243143, 243153, - 243164, 243173, 243183, 243193, 243204, 243214, 243225, 243236, - 243248, 243256, 243265, 243274, 243284, 243293, 243303, 243313, - 243324, 243333, 243343, 243353, 243364, 243374, 243385, 243396, - 243408, 243417, 243427, 243437, 243448, 243458, 243469, 243480, - 243492, 243502, 243513, 243524, 243536, 243547, 243559, 243571, - 243584, 243592, 243601, 243610, 243620, 243629, 243639, 243649, - 243660, 243669, 243679, 243689, 243700, 243710, 243721, 243732, - 243744, 243753, 243763, 243773, 243784, 243794, 243805, 243816, - 243828, 243838, 243849, 243860, 243872, 243883, 243895, 243907, - 243920, 243929, 243939, 243949, 243960, 243970, 243981, 243992, - 244004, 244014, 244025, 244036, 244048, 244059, 244071, 244083, - 244096, 244106, 244117, 244128, 244140, 244151, 244163, 244175, - 244188, 244199, 244211, 244223, 244236, 244248, 244261, 244274, - 244288, 244296, 244305, 244314, 244324, 244333, 244343, 244353, - 244364, 244373, 244383, 244393, 244404, 244414, 244425, 244436, - 244448, 244457, 244467, 244477, 244488, 244498, 244509, 244520, - 244532, 244542, 244553, 244564, 244576, 244587, 244599, 244611, - 244624, 244633, 244643, 244653, 244664, 244674, 244685, 244696, - 244708, 244718, 244729, 244740, 244752, 244763, 244775, 244787, - 244800, 244810, 244821, 244832, 244844, 244855, 244867, 244879, - 244892, 244903, 244915, 244927, 244940, 244952, 244965, 244978, - 244992, 245001, 245011, 245021, 245032, 245042, 245053, 245064, - 245076, 245086, 245097, 245108, 245120, 245131, 245143, 245155, - 245168, 245178, 245189, 245200, 245212, 245223, 245235, 245247, - 245260, 245271, 245283, 245295, 245308, 245320, 245333, 245346, - 245360, 245370, 245381, 245392, 245404, 245415, 245427, 245439, - 245452, 245463, 245475, 245487, 245500, 245512, 245525, 245538, - 245552, 245563, 245575, 245587, 245600, 245612, 245625, 245638, - 245652, 245664, 245677, 245690, 245704, 245717, 245731, 245745, - 245760, 245761, 245763, 245765, 245768, 245770, 245773, 245776, - 245780, 245782, 245785, 245788, 245792, 245795, 245799, 245803, - 245808, 245810, 245813, 245816, 245820, 245823, 245827, 245831, - 245836, 245839, 245843, 245847, 245852, 245856, 245861, 245866, - 245872, 245874, 245877, 245880, 245884, 245887, 245891, 245895, - 245900, 245903, 245907, 245911, 245916, 245920, 245925, 245930, - 245936, 245939, 245943, 245947, 245952, 245956, 245961, 245966, - 245972, 245976, 245981, 245986, 245992, 245997, 246003, 246009, - 246016, 246018, 246021, 246024, 246028, 246031, 246035, 246039, - 246044, 246047, 246051, 246055, 246060, 246064, 246069, 246074, - 246080, 246083, 246087, 246091, 246096, 246100, 246105, 246110, - 246116, 246120, 246125, 246130, 246136, 246141, 246147, 246153, - 246160, 246163, 246167, 246171, 246176, 246180, 246185, 246190, - 246196, 246200, 246205, 246210, 246216, 246221, 246227, 246233, - 246240, 246244, 246249, 246254, 246260, 246265, 246271, 246277, - 246284, 246289, 246295, 246301, 246308, 246314, 246321, 246328, - 246336, 246338, 246341, 246344, 246348, 246351, 246355, 246359, - 246364, 246367, 246371, 246375, 246380, 246384, 246389, 246394, - 246400, 246403, 246407, 246411, 246416, 246420, 246425, 246430, - 246436, 246440, 246445, 246450, 246456, 246461, 246467, 246473, - 246480, 246483, 246487, 246491, 246496, 246500, 246505, 246510, - 246516, 246520, 246525, 246530, 246536, 246541, 246547, 246553, - 246560, 246564, 246569, 246574, 246580, 246585, 246591, 246597, - 246604, 246609, 246615, 246621, 246628, 246634, 246641, 246648, - 246656, 246659, 246663, 246667, 246672, 246676, 246681, 246686, - 246692, 246696, 246701, 246706, 246712, 246717, 246723, 246729, - 246736, 246740, 246745, 246750, 246756, 246761, 246767, 246773, - 246780, 246785, 246791, 246797, 246804, 246810, 246817, 246824, - 246832, 246836, 246841, 246846, 246852, 246857, 246863, 246869, - 246876, 246881, 246887, 246893, 246900, 246906, 246913, 246920, - 246928, 246933, 246939, 246945, 246952, 246958, 246965, 246972, - 246980, 246986, 246993, 247000, 247008, 247015, 247023, 247031, - 247040, 247042, 247045, 247048, 247052, 247055, 247059, 247063, - 247068, 247071, 247075, 247079, 247084, 247088, 247093, 247098, - 247104, 247107, 247111, 247115, 247120, 247124, 247129, 247134, - 247140, 247144, 247149, 247154, 247160, 247165, 247171, 247177, - 247184, 247187, 247191, 247195, 247200, 247204, 247209, 247214, - 247220, 247224, 247229, 247234, 247240, 247245, 247251, 247257, - 247264, 247268, 247273, 247278, 247284, 247289, 247295, 247301, - 247308, 247313, 247319, 247325, 247332, 247338, 247345, 247352, - 247360, 247363, 247367, 247371, 247376, 247380, 247385, 247390, - 247396, 247400, 247405, 247410, 247416, 247421, 247427, 247433, - 247440, 247444, 247449, 247454, 247460, 247465, 247471, 247477, - 247484, 247489, 247495, 247501, 247508, 247514, 247521, 247528, - 247536, 247540, 247545, 247550, 247556, 247561, 247567, 247573, - 247580, 247585, 247591, 247597, 247604, 247610, 247617, 247624, - 247632, 247637, 247643, 247649, 247656, 247662, 247669, 247676, - 247684, 247690, 247697, 247704, 247712, 247719, 247727, 247735, - 247744, 247747, 247751, 247755, 247760, 247764, 247769, 247774, - 247780, 247784, 247789, 247794, 247800, 247805, 247811, 247817, - 247824, 247828, 247833, 247838, 247844, 247849, 247855, 247861, - 247868, 247873, 247879, 247885, 247892, 247898, 247905, 247912, - 247920, 247924, 247929, 247934, 247940, 247945, 247951, 247957, - 247964, 247969, 247975, 247981, 247988, 247994, 248001, 248008, - 248016, 248021, 248027, 248033, 248040, 248046, 248053, 248060, - 248068, 248074, 248081, 248088, 248096, 248103, 248111, 248119, - 248128, 248132, 248137, 248142, 248148, 248153, 248159, 248165, - 248172, 248177, 248183, 248189, 248196, 248202, 248209, 248216, - 248224, 248229, 248235, 248241, 248248, 248254, 248261, 248268, - 248276, 248282, 248289, 248296, 248304, 248311, 248319, 248327, - 248336, 248341, 248347, 248353, 248360, 248366, 248373, 248380, - 248388, 248394, 248401, 248408, 248416, 248423, 248431, 248439, - 248448, 248454, 248461, 248468, 248476, 248483, 248491, 248499, - 248508, 248515, 248523, 248531, 248540, 248548, 248557, 248566, - 248576, 248578, 248581, 248584, 248588, 248591, 248595, 248599, - 248604, 248607, 248611, 248615, 248620, 248624, 248629, 248634, - 248640, 248643, 248647, 248651, 248656, 248660, 248665, 248670, - 248676, 248680, 248685, 248690, 248696, 248701, 248707, 248713, - 248720, 248723, 248727, 248731, 248736, 248740, 248745, 248750, - 248756, 248760, 248765, 248770, 248776, 248781, 248787, 248793, - 248800, 248804, 248809, 248814, 248820, 248825, 248831, 248837, - 248844, 248849, 248855, 248861, 248868, 248874, 248881, 248888, - 248896, 248899, 248903, 248907, 248912, 248916, 248921, 248926, - 248932, 248936, 248941, 248946, 248952, 248957, 248963, 248969, - 248976, 248980, 248985, 248990, 248996, 249001, 249007, 249013, - 249020, 249025, 249031, 249037, 249044, 249050, 249057, 249064, - 249072, 249076, 249081, 249086, 249092, 249097, 249103, 249109, - 249116, 249121, 249127, 249133, 249140, 249146, 249153, 249160, - 249168, 249173, 249179, 249185, 249192, 249198, 249205, 249212, - 249220, 249226, 249233, 249240, 249248, 249255, 249263, 249271, - 249280, 249283, 249287, 249291, 249296, 249300, 249305, 249310, - 249316, 249320, 249325, 249330, 249336, 249341, 249347, 249353, - 249360, 249364, 249369, 249374, 249380, 249385, 249391, 249397, - 249404, 249409, 249415, 249421, 249428, 249434, 249441, 249448, - 249456, 249460, 249465, 249470, 249476, 249481, 249487, 249493, - 249500, 249505, 249511, 249517, 249524, 249530, 249537, 249544, - 249552, 249557, 249563, 249569, 249576, 249582, 249589, 249596, - 249604, 249610, 249617, 249624, 249632, 249639, 249647, 249655, - 249664, 249668, 249673, 249678, 249684, 249689, 249695, 249701, - 249708, 249713, 249719, 249725, 249732, 249738, 249745, 249752, - 249760, 249765, 249771, 249777, 249784, 249790, 249797, 249804, - 249812, 249818, 249825, 249832, 249840, 249847, 249855, 249863, - 249872, 249877, 249883, 249889, 249896, 249902, 249909, 249916, - 249924, 249930, 249937, 249944, 249952, 249959, 249967, 249975, - 249984, 249990, 249997, 250004, 250012, 250019, 250027, 250035, - 250044, 250051, 250059, 250067, 250076, 250084, 250093, 250102, - 250112, 250115, 250119, 250123, 250128, 250132, 250137, 250142, - 250148, 250152, 250157, 250162, 250168, 250173, 250179, 250185, - 250192, 250196, 250201, 250206, 250212, 250217, 250223, 250229, - 250236, 250241, 250247, 250253, 250260, 250266, 250273, 250280, - 250288, 250292, 250297, 250302, 250308, 250313, 250319, 250325, - 250332, 250337, 250343, 250349, 250356, 250362, 250369, 250376, - 250384, 250389, 250395, 250401, 250408, 250414, 250421, 250428, - 250436, 250442, 250449, 250456, 250464, 250471, 250479, 250487, - 250496, 250500, 250505, 250510, 250516, 250521, 250527, 250533, - 250540, 250545, 250551, 250557, 250564, 250570, 250577, 250584, - 250592, 250597, 250603, 250609, 250616, 250622, 250629, 250636, - 250644, 250650, 250657, 250664, 250672, 250679, 250687, 250695, - 250704, 250709, 250715, 250721, 250728, 250734, 250741, 250748, - 250756, 250762, 250769, 250776, 250784, 250791, 250799, 250807, - 250816, 250822, 250829, 250836, 250844, 250851, 250859, 250867, - 250876, 250883, 250891, 250899, 250908, 250916, 250925, 250934, - 250944, 250948, 250953, 250958, 250964, 250969, 250975, 250981, - 250988, 250993, 250999, 251005, 251012, 251018, 251025, 251032, - 251040, 251045, 251051, 251057, 251064, 251070, 251077, 251084, - 251092, 251098, 251105, 251112, 251120, 251127, 251135, 251143, - 251152, 251157, 251163, 251169, 251176, 251182, 251189, 251196, - 251204, 251210, 251217, 251224, 251232, 251239, 251247, 251255, - 251264, 251270, 251277, 251284, 251292, 251299, 251307, 251315, - 251324, 251331, 251339, 251347, 251356, 251364, 251373, 251382, - 251392, 251397, 251403, 251409, 251416, 251422, 251429, 251436, - 251444, 251450, 251457, 251464, 251472, 251479, 251487, 251495, - 251504, 251510, 251517, 251524, 251532, 251539, 251547, 251555, - 251564, 251571, 251579, 251587, 251596, 251604, 251613, 251622, - 251632, 251638, 251645, 251652, 251660, 251667, 251675, 251683, - 251692, 251699, 251707, 251715, 251724, 251732, 251741, 251750, - 251760, 251767, 251775, 251783, 251792, 251800, 251809, 251818, - 251828, 251836, 251845, 251854, 251864, 251873, 251883, 251893, - 251904, 251906, 251909, 251912, 251916, 251919, 251923, 251927, - 251932, 251935, 251939, 251943, 251948, 251952, 251957, 251962, - 251968, 251971, 251975, 251979, 251984, 251988, 251993, 251998, - 252004, 252008, 252013, 252018, 252024, 252029, 252035, 252041, - 252048, 252051, 252055, 252059, 252064, 252068, 252073, 252078, - 252084, 252088, 252093, 252098, 252104, 252109, 252115, 252121, - 252128, 252132, 252137, 252142, 252148, 252153, 252159, 252165, - 252172, 252177, 252183, 252189, 252196, 252202, 252209, 252216, - 252224, 252227, 252231, 252235, 252240, 252244, 252249, 252254, - 252260, 252264, 252269, 252274, 252280, 252285, 252291, 252297, - 252304, 252308, 252313, 252318, 252324, 252329, 252335, 252341, - 252348, 252353, 252359, 252365, 252372, 252378, 252385, 252392, - 252400, 252404, 252409, 252414, 252420, 252425, 252431, 252437, - 252444, 252449, 252455, 252461, 252468, 252474, 252481, 252488, - 252496, 252501, 252507, 252513, 252520, 252526, 252533, 252540, - 252548, 252554, 252561, 252568, 252576, 252583, 252591, 252599, - 252608, 252611, 252615, 252619, 252624, 252628, 252633, 252638, - 252644, 252648, 252653, 252658, 252664, 252669, 252675, 252681, - 252688, 252692, 252697, 252702, 252708, 252713, 252719, 252725, - 252732, 252737, 252743, 252749, 252756, 252762, 252769, 252776, - 252784, 252788, 252793, 252798, 252804, 252809, 252815, 252821, - 252828, 252833, 252839, 252845, 252852, 252858, 252865, 252872, - 252880, 252885, 252891, 252897, 252904, 252910, 252917, 252924, - 252932, 252938, 252945, 252952, 252960, 252967, 252975, 252983, - 252992, 252996, 253001, 253006, 253012, 253017, 253023, 253029, - 253036, 253041, 253047, 253053, 253060, 253066, 253073, 253080, - 253088, 253093, 253099, 253105, 253112, 253118, 253125, 253132, - 253140, 253146, 253153, 253160, 253168, 253175, 253183, 253191, - 253200, 253205, 253211, 253217, 253224, 253230, 253237, 253244, - 253252, 253258, 253265, 253272, 253280, 253287, 253295, 253303, - 253312, 253318, 253325, 253332, 253340, 253347, 253355, 253363, - 253372, 253379, 253387, 253395, 253404, 253412, 253421, 253430, - 253440, 253443, 253447, 253451, 253456, 253460, 253465, 253470, - 253476, 253480, 253485, 253490, 253496, 253501, 253507, 253513, - 253520, 253524, 253529, 253534, 253540, 253545, 253551, 253557, - 253564, 253569, 253575, 253581, 253588, 253594, 253601, 253608, - 253616, 253620, 253625, 253630, 253636, 253641, 253647, 253653, - 253660, 253665, 253671, 253677, 253684, 253690, 253697, 253704, - 253712, 253717, 253723, 253729, 253736, 253742, 253749, 253756, - 253764, 253770, 253777, 253784, 253792, 253799, 253807, 253815, - 253824, 253828, 253833, 253838, 253844, 253849, 253855, 253861, - 253868, 253873, 253879, 253885, 253892, 253898, 253905, 253912, - 253920, 253925, 253931, 253937, 253944, 253950, 253957, 253964, - 253972, 253978, 253985, 253992, 254000, 254007, 254015, 254023, - 254032, 254037, 254043, 254049, 254056, 254062, 254069, 254076, - 254084, 254090, 254097, 254104, 254112, 254119, 254127, 254135, - 254144, 254150, 254157, 254164, 254172, 254179, 254187, 254195, - 254204, 254211, 254219, 254227, 254236, 254244, 254253, 254262, - 254272, 254276, 254281, 254286, 254292, 254297, 254303, 254309, - 254316, 254321, 254327, 254333, 254340, 254346, 254353, 254360, - 254368, 254373, 254379, 254385, 254392, 254398, 254405, 254412, - 254420, 254426, 254433, 254440, 254448, 254455, 254463, 254471, - 254480, 254485, 254491, 254497, 254504, 254510, 254517, 254524, - 254532, 254538, 254545, 254552, 254560, 254567, 254575, 254583, - 254592, 254598, 254605, 254612, 254620, 254627, 254635, 254643, - 254652, 254659, 254667, 254675, 254684, 254692, 254701, 254710, - 254720, 254725, 254731, 254737, 254744, 254750, 254757, 254764, - 254772, 254778, 254785, 254792, 254800, 254807, 254815, 254823, - 254832, 254838, 254845, 254852, 254860, 254867, 254875, 254883, - 254892, 254899, 254907, 254915, 254924, 254932, 254941, 254950, - 254960, 254966, 254973, 254980, 254988, 254995, 255003, 255011, - 255020, 255027, 255035, 255043, 255052, 255060, 255069, 255078, - 255088, 255095, 255103, 255111, 255120, 255128, 255137, 255146, - 255156, 255164, 255173, 255182, 255192, 255201, 255211, 255221, - 255232, 255235, 255239, 255243, 255248, 255252, 255257, 255262, - 255268, 255272, 255277, 255282, 255288, 255293, 255299, 255305, - 255312, 255316, 255321, 255326, 255332, 255337, 255343, 255349, - 255356, 255361, 255367, 255373, 255380, 255386, 255393, 255400, - 255408, 255412, 255417, 255422, 255428, 255433, 255439, 255445, - 255452, 255457, 255463, 255469, 255476, 255482, 255489, 255496, - 255504, 255509, 255515, 255521, 255528, 255534, 255541, 255548, - 255556, 255562, 255569, 255576, 255584, 255591, 255599, 255607, - 255616, 255620, 255625, 255630, 255636, 255641, 255647, 255653, - 255660, 255665, 255671, 255677, 255684, 255690, 255697, 255704, - 255712, 255717, 255723, 255729, 255736, 255742, 255749, 255756, - 255764, 255770, 255777, 255784, 255792, 255799, 255807, 255815, - 255824, 255829, 255835, 255841, 255848, 255854, 255861, 255868, - 255876, 255882, 255889, 255896, 255904, 255911, 255919, 255927, - 255936, 255942, 255949, 255956, 255964, 255971, 255979, 255987, - 255996, 256003, 256011, 256019, 256028, 256036, 256045, 256054, - 256064, 256068, 256073, 256078, 256084, 256089, 256095, 256101, - 256108, 256113, 256119, 256125, 256132, 256138, 256145, 256152, - 256160, 256165, 256171, 256177, 256184, 256190, 256197, 256204, - 256212, 256218, 256225, 256232, 256240, 256247, 256255, 256263, - 256272, 256277, 256283, 256289, 256296, 256302, 256309, 256316, - 256324, 256330, 256337, 256344, 256352, 256359, 256367, 256375, - 256384, 256390, 256397, 256404, 256412, 256419, 256427, 256435, - 256444, 256451, 256459, 256467, 256476, 256484, 256493, 256502, - 256512, 256517, 256523, 256529, 256536, 256542, 256549, 256556, - 256564, 256570, 256577, 256584, 256592, 256599, 256607, 256615, - 256624, 256630, 256637, 256644, 256652, 256659, 256667, 256675, - 256684, 256691, 256699, 256707, 256716, 256724, 256733, 256742, - 256752, 256758, 256765, 256772, 256780, 256787, 256795, 256803, - 256812, 256819, 256827, 256835, 256844, 256852, 256861, 256870, - 256880, 256887, 256895, 256903, 256912, 256920, 256929, 256938, - 256948, 256956, 256965, 256974, 256984, 256993, 257003, 257013, - 257024, 257028, 257033, 257038, 257044, 257049, 257055, 257061, - 257068, 257073, 257079, 257085, 257092, 257098, 257105, 257112, - 257120, 257125, 257131, 257137, 257144, 257150, 257157, 257164, - 257172, 257178, 257185, 257192, 257200, 257207, 257215, 257223, - 257232, 257237, 257243, 257249, 257256, 257262, 257269, 257276, - 257284, 257290, 257297, 257304, 257312, 257319, 257327, 257335, - 257344, 257350, 257357, 257364, 257372, 257379, 257387, 257395, - 257404, 257411, 257419, 257427, 257436, 257444, 257453, 257462, - 257472, 257477, 257483, 257489, 257496, 257502, 257509, 257516, - 257524, 257530, 257537, 257544, 257552, 257559, 257567, 257575, - 257584, 257590, 257597, 257604, 257612, 257619, 257627, 257635, - 257644, 257651, 257659, 257667, 257676, 257684, 257693, 257702, - 257712, 257718, 257725, 257732, 257740, 257747, 257755, 257763, - 257772, 257779, 257787, 257795, 257804, 257812, 257821, 257830, - 257840, 257847, 257855, 257863, 257872, 257880, 257889, 257898, - 257908, 257916, 257925, 257934, 257944, 257953, 257963, 257973, - 257984, 257989, 257995, 258001, 258008, 258014, 258021, 258028, - 258036, 258042, 258049, 258056, 258064, 258071, 258079, 258087, - 258096, 258102, 258109, 258116, 258124, 258131, 258139, 258147, - 258156, 258163, 258171, 258179, 258188, 258196, 258205, 258214, - 258224, 258230, 258237, 258244, 258252, 258259, 258267, 258275, - 258284, 258291, 258299, 258307, 258316, 258324, 258333, 258342, - 258352, 258359, 258367, 258375, 258384, 258392, 258401, 258410, - 258420, 258428, 258437, 258446, 258456, 258465, 258475, 258485, - 258496, 258502, 258509, 258516, 258524, 258531, 258539, 258547, - 258556, 258563, 258571, 258579, 258588, 258596, 258605, 258614, - 258624, 258631, 258639, 258647, 258656, 258664, 258673, 258682, - 258692, 258700, 258709, 258718, 258728, 258737, 258747, 258757, - 258768, 258775, 258783, 258791, 258800, 258808, 258817, 258826, - 258836, 258844, 258853, 258862, 258872, 258881, 258891, 258901, - 258912, 258920, 258929, 258938, 258948, 258957, 258967, 258977, - 258988, 258997, 259007, 259017, 259028, 259038, 259049, 259060, - 259072, 259074, 259077, 259080, 259084, 259087, 259091, 259095, - 259100, 259103, 259107, 259111, 259116, 259120, 259125, 259130, - 259136, 259139, 259143, 259147, 259152, 259156, 259161, 259166, - 259172, 259176, 259181, 259186, 259192, 259197, 259203, 259209, - 259216, 259219, 259223, 259227, 259232, 259236, 259241, 259246, - 259252, 259256, 259261, 259266, 259272, 259277, 259283, 259289, - 259296, 259300, 259305, 259310, 259316, 259321, 259327, 259333, - 259340, 259345, 259351, 259357, 259364, 259370, 259377, 259384, - 259392, 259395, 259399, 259403, 259408, 259412, 259417, 259422, - 259428, 259432, 259437, 259442, 259448, 259453, 259459, 259465, - 259472, 259476, 259481, 259486, 259492, 259497, 259503, 259509, - 259516, 259521, 259527, 259533, 259540, 259546, 259553, 259560, - 259568, 259572, 259577, 259582, 259588, 259593, 259599, 259605, - 259612, 259617, 259623, 259629, 259636, 259642, 259649, 259656, - 259664, 259669, 259675, 259681, 259688, 259694, 259701, 259708, - 259716, 259722, 259729, 259736, 259744, 259751, 259759, 259767, - 259776, 259779, 259783, 259787, 259792, 259796, 259801, 259806, - 259812, 259816, 259821, 259826, 259832, 259837, 259843, 259849, - 259856, 259860, 259865, 259870, 259876, 259881, 259887, 259893, - 259900, 259905, 259911, 259917, 259924, 259930, 259937, 259944, - 259952, 259956, 259961, 259966, 259972, 259977, 259983, 259989, - 259996, 260001, 260007, 260013, 260020, 260026, 260033, 260040, - 260048, 260053, 260059, 260065, 260072, 260078, 260085, 260092, - 260100, 260106, 260113, 260120, 260128, 260135, 260143, 260151, - 260160, 260164, 260169, 260174, 260180, 260185, 260191, 260197, - 260204, 260209, 260215, 260221, 260228, 260234, 260241, 260248, - 260256, 260261, 260267, 260273, 260280, 260286, 260293, 260300, - 260308, 260314, 260321, 260328, 260336, 260343, 260351, 260359, - 260368, 260373, 260379, 260385, 260392, 260398, 260405, 260412, - 260420, 260426, 260433, 260440, 260448, 260455, 260463, 260471, - 260480, 260486, 260493, 260500, 260508, 260515, 260523, 260531, - 260540, 260547, 260555, 260563, 260572, 260580, 260589, 260598, - 260608, 260611, 260615, 260619, 260624, 260628, 260633, 260638, - 260644, 260648, 260653, 260658, 260664, 260669, 260675, 260681, - 260688, 260692, 260697, 260702, 260708, 260713, 260719, 260725, - 260732, 260737, 260743, 260749, 260756, 260762, 260769, 260776, - 260784, 260788, 260793, 260798, 260804, 260809, 260815, 260821, - 260828, 260833, 260839, 260845, 260852, 260858, 260865, 260872, - 260880, 260885, 260891, 260897, 260904, 260910, 260917, 260924, - 260932, 260938, 260945, 260952, 260960, 260967, 260975, 260983, - 260992, 260996, 261001, 261006, 261012, 261017, 261023, 261029, - 261036, 261041, 261047, 261053, 261060, 261066, 261073, 261080, - 261088, 261093, 261099, 261105, 261112, 261118, 261125, 261132, - 261140, 261146, 261153, 261160, 261168, 261175, 261183, 261191, - 261200, 261205, 261211, 261217, 261224, 261230, 261237, 261244, - 261252, 261258, 261265, 261272, 261280, 261287, 261295, 261303, - 261312, 261318, 261325, 261332, 261340, 261347, 261355, 261363, - 261372, 261379, 261387, 261395, 261404, 261412, 261421, 261430, - 261440, 261444, 261449, 261454, 261460, 261465, 261471, 261477, - 261484, 261489, 261495, 261501, 261508, 261514, 261521, 261528, - 261536, 261541, 261547, 261553, 261560, 261566, 261573, 261580, - 261588, 261594, 261601, 261608, 261616, 261623, 261631, 261639, - 261648, 261653, 261659, 261665, 261672, 261678, 261685, 261692, - 261700, 261706, 261713, 261720, 261728, 261735, 261743, 261751, - 261760, 261766, 261773, 261780, 261788, 261795, 261803, 261811, - 261820, 261827, 261835, 261843, 261852, 261860, 261869, 261878, - 261888, 261893, 261899, 261905, 261912, 261918, 261925, 261932, - 261940, 261946, 261953, 261960, 261968, 261975, 261983, 261991, - 262000, 262006, 262013, 262020, 262028, 262035, 262043, 262051, - 262060, 262067, 262075, 262083, 262092, 262100, 262109, 262118, - 262128, 262134, 262141, 262148, 262156, 262163, 262171, 262179, - 262188, 262195, 262203, 262211, 262220, 262228, 262237, 262246, - 262256, 262263, 262271, 262279, 262288, 262296, 262305, 262314, - 262324, 262332, 262341, 262350, 262360, 262369, 262379, 262389, - 262400, 262403, 262407, 262411, 262416, 262420, 262425, 262430, - 262436, 262440, 262445, 262450, 262456, 262461, 262467, 262473, - 262480, 262484, 262489, 262494, 262500, 262505, 262511, 262517, - 262524, 262529, 262535, 262541, 262548, 262554, 262561, 262568, - 262576, 262580, 262585, 262590, 262596, 262601, 262607, 262613, - 262620, 262625, 262631, 262637, 262644, 262650, 262657, 262664, - 262672, 262677, 262683, 262689, 262696, 262702, 262709, 262716, - 262724, 262730, 262737, 262744, 262752, 262759, 262767, 262775, - 262784, 262788, 262793, 262798, 262804, 262809, 262815, 262821, - 262828, 262833, 262839, 262845, 262852, 262858, 262865, 262872, - 262880, 262885, 262891, 262897, 262904, 262910, 262917, 262924, - 262932, 262938, 262945, 262952, 262960, 262967, 262975, 262983, - 262992, 262997, 263003, 263009, 263016, 263022, 263029, 263036, - 263044, 263050, 263057, 263064, 263072, 263079, 263087, 263095, - 263104, 263110, 263117, 263124, 263132, 263139, 263147, 263155, - 263164, 263171, 263179, 263187, 263196, 263204, 263213, 263222, - 263232, 263236, 263241, 263246, 263252, 263257, 263263, 263269, - 263276, 263281, 263287, 263293, 263300, 263306, 263313, 263320, - 263328, 263333, 263339, 263345, 263352, 263358, 263365, 263372, - 263380, 263386, 263393, 263400, 263408, 263415, 263423, 263431, - 263440, 263445, 263451, 263457, 263464, 263470, 263477, 263484, - 263492, 263498, 263505, 263512, 263520, 263527, 263535, 263543, - 263552, 263558, 263565, 263572, 263580, 263587, 263595, 263603, - 263612, 263619, 263627, 263635, 263644, 263652, 263661, 263670, - 263680, 263685, 263691, 263697, 263704, 263710, 263717, 263724, - 263732, 263738, 263745, 263752, 263760, 263767, 263775, 263783, - 263792, 263798, 263805, 263812, 263820, 263827, 263835, 263843, - 263852, 263859, 263867, 263875, 263884, 263892, 263901, 263910, - 263920, 263926, 263933, 263940, 263948, 263955, 263963, 263971, - 263980, 263987, 263995, 264003, 264012, 264020, 264029, 264038, - 264048, 264055, 264063, 264071, 264080, 264088, 264097, 264106, - 264116, 264124, 264133, 264142, 264152, 264161, 264171, 264181, - 264192, 264196, 264201, 264206, 264212, 264217, 264223, 264229, - 264236, 264241, 264247, 264253, 264260, 264266, 264273, 264280, - 264288, 264293, 264299, 264305, 264312, 264318, 264325, 264332, - 264340, 264346, 264353, 264360, 264368, 264375, 264383, 264391, - 264400, 264405, 264411, 264417, 264424, 264430, 264437, 264444, - 264452, 264458, 264465, 264472, 264480, 264487, 264495, 264503, - 264512, 264518, 264525, 264532, 264540, 264547, 264555, 264563, - 264572, 264579, 264587, 264595, 264604, 264612, 264621, 264630, - 264640, 264645, 264651, 264657, 264664, 264670, 264677, 264684, - 264692, 264698, 264705, 264712, 264720, 264727, 264735, 264743, - 264752, 264758, 264765, 264772, 264780, 264787, 264795, 264803, - 264812, 264819, 264827, 264835, 264844, 264852, 264861, 264870, - 264880, 264886, 264893, 264900, 264908, 264915, 264923, 264931, - 264940, 264947, 264955, 264963, 264972, 264980, 264989, 264998, - 265008, 265015, 265023, 265031, 265040, 265048, 265057, 265066, - 265076, 265084, 265093, 265102, 265112, 265121, 265131, 265141, - 265152, 265157, 265163, 265169, 265176, 265182, 265189, 265196, - 265204, 265210, 265217, 265224, 265232, 265239, 265247, 265255, - 265264, 265270, 265277, 265284, 265292, 265299, 265307, 265315, - 265324, 265331, 265339, 265347, 265356, 265364, 265373, 265382, - 265392, 265398, 265405, 265412, 265420, 265427, 265435, 265443, - 265452, 265459, 265467, 265475, 265484, 265492, 265501, 265510, - 265520, 265527, 265535, 265543, 265552, 265560, 265569, 265578, - 265588, 265596, 265605, 265614, 265624, 265633, 265643, 265653, - 265664, 265670, 265677, 265684, 265692, 265699, 265707, 265715, - 265724, 265731, 265739, 265747, 265756, 265764, 265773, 265782, - 265792, 265799, 265807, 265815, 265824, 265832, 265841, 265850, - 265860, 265868, 265877, 265886, 265896, 265905, 265915, 265925, - 265936, 265943, 265951, 265959, 265968, 265976, 265985, 265994, - 266004, 266012, 266021, 266030, 266040, 266049, 266059, 266069, - 266080, 266088, 266097, 266106, 266116, 266125, 266135, 266145, - 266156, 266165, 266175, 266185, 266196, 266206, 266217, 266228, - 266240, 266243, 266247, 266251, 266256, 266260, 266265, 266270, - 266276, 266280, 266285, 266290, 266296, 266301, 266307, 266313, - 266320, 266324, 266329, 266334, 266340, 266345, 266351, 266357, - 266364, 266369, 266375, 266381, 266388, 266394, 266401, 266408, - 266416, 266420, 266425, 266430, 266436, 266441, 266447, 266453, - 266460, 266465, 266471, 266477, 266484, 266490, 266497, 266504, - 266512, 266517, 266523, 266529, 266536, 266542, 266549, 266556, - 266564, 266570, 266577, 266584, 266592, 266599, 266607, 266615, - 266624, 266628, 266633, 266638, 266644, 266649, 266655, 266661, - 266668, 266673, 266679, 266685, 266692, 266698, 266705, 266712, - 266720, 266725, 266731, 266737, 266744, 266750, 266757, 266764, - 266772, 266778, 266785, 266792, 266800, 266807, 266815, 266823, - 266832, 266837, 266843, 266849, 266856, 266862, 266869, 266876, - 266884, 266890, 266897, 266904, 266912, 266919, 266927, 266935, - 266944, 266950, 266957, 266964, 266972, 266979, 266987, 266995, - 267004, 267011, 267019, 267027, 267036, 267044, 267053, 267062, - 267072, 267076, 267081, 267086, 267092, 267097, 267103, 267109, - 267116, 267121, 267127, 267133, 267140, 267146, 267153, 267160, - 267168, 267173, 267179, 267185, 267192, 267198, 267205, 267212, - 267220, 267226, 267233, 267240, 267248, 267255, 267263, 267271, - 267280, 267285, 267291, 267297, 267304, 267310, 267317, 267324, - 267332, 267338, 267345, 267352, 267360, 267367, 267375, 267383, - 267392, 267398, 267405, 267412, 267420, 267427, 267435, 267443, - 267452, 267459, 267467, 267475, 267484, 267492, 267501, 267510, - 267520, 267525, 267531, 267537, 267544, 267550, 267557, 267564, - 267572, 267578, 267585, 267592, 267600, 267607, 267615, 267623, - 267632, 267638, 267645, 267652, 267660, 267667, 267675, 267683, - 267692, 267699, 267707, 267715, 267724, 267732, 267741, 267750, - 267760, 267766, 267773, 267780, 267788, 267795, 267803, 267811, - 267820, 267827, 267835, 267843, 267852, 267860, 267869, 267878, - 267888, 267895, 267903, 267911, 267920, 267928, 267937, 267946, - 267956, 267964, 267973, 267982, 267992, 268001, 268011, 268021, - 268032, 268036, 268041, 268046, 268052, 268057, 268063, 268069, - 268076, 268081, 268087, 268093, 268100, 268106, 268113, 268120, - 268128, 268133, 268139, 268145, 268152, 268158, 268165, 268172, - 268180, 268186, 268193, 268200, 268208, 268215, 268223, 268231, - 268240, 268245, 268251, 268257, 268264, 268270, 268277, 268284, - 268292, 268298, 268305, 268312, 268320, 268327, 268335, 268343, - 268352, 268358, 268365, 268372, 268380, 268387, 268395, 268403, - 268412, 268419, 268427, 268435, 268444, 268452, 268461, 268470, - 268480, 268485, 268491, 268497, 268504, 268510, 268517, 268524, - 268532, 268538, 268545, 268552, 268560, 268567, 268575, 268583, - 268592, 268598, 268605, 268612, 268620, 268627, 268635, 268643, - 268652, 268659, 268667, 268675, 268684, 268692, 268701, 268710, - 268720, 268726, 268733, 268740, 268748, 268755, 268763, 268771, - 268780, 268787, 268795, 268803, 268812, 268820, 268829, 268838, - 268848, 268855, 268863, 268871, 268880, 268888, 268897, 268906, - 268916, 268924, 268933, 268942, 268952, 268961, 268971, 268981, - 268992, 268997, 269003, 269009, 269016, 269022, 269029, 269036, - 269044, 269050, 269057, 269064, 269072, 269079, 269087, 269095, - 269104, 269110, 269117, 269124, 269132, 269139, 269147, 269155, - 269164, 269171, 269179, 269187, 269196, 269204, 269213, 269222, - 269232, 269238, 269245, 269252, 269260, 269267, 269275, 269283, - 269292, 269299, 269307, 269315, 269324, 269332, 269341, 269350, - 269360, 269367, 269375, 269383, 269392, 269400, 269409, 269418, - 269428, 269436, 269445, 269454, 269464, 269473, 269483, 269493, - 269504, 269510, 269517, 269524, 269532, 269539, 269547, 269555, - 269564, 269571, 269579, 269587, 269596, 269604, 269613, 269622, - 269632, 269639, 269647, 269655, 269664, 269672, 269681, 269690, - 269700, 269708, 269717, 269726, 269736, 269745, 269755, 269765, - 269776, 269783, 269791, 269799, 269808, 269816, 269825, 269834, - 269844, 269852, 269861, 269870, 269880, 269889, 269899, 269909, - 269920, 269928, 269937, 269946, 269956, 269965, 269975, 269985, - 269996, 270005, 270015, 270025, 270036, 270046, 270057, 270068, - 270080, 270084, 270089, 270094, 270100, 270105, 270111, 270117, - 270124, 270129, 270135, 270141, 270148, 270154, 270161, 270168, - 270176, 270181, 270187, 270193, 270200, 270206, 270213, 270220, - 270228, 270234, 270241, 270248, 270256, 270263, 270271, 270279, - 270288, 270293, 270299, 270305, 270312, 270318, 270325, 270332, - 270340, 270346, 270353, 270360, 270368, 270375, 270383, 270391, - 270400, 270406, 270413, 270420, 270428, 270435, 270443, 270451, - 270460, 270467, 270475, 270483, 270492, 270500, 270509, 270518, - 270528, 270533, 270539, 270545, 270552, 270558, 270565, 270572, - 270580, 270586, 270593, 270600, 270608, 270615, 270623, 270631, - 270640, 270646, 270653, 270660, 270668, 270675, 270683, 270691, - 270700, 270707, 270715, 270723, 270732, 270740, 270749, 270758, - 270768, 270774, 270781, 270788, 270796, 270803, 270811, 270819, - 270828, 270835, 270843, 270851, 270860, 270868, 270877, 270886, - 270896, 270903, 270911, 270919, 270928, 270936, 270945, 270954, - 270964, 270972, 270981, 270990, 271000, 271009, 271019, 271029, - 271040, 271045, 271051, 271057, 271064, 271070, 271077, 271084, - 271092, 271098, 271105, 271112, 271120, 271127, 271135, 271143, - 271152, 271158, 271165, 271172, 271180, 271187, 271195, 271203, - 271212, 271219, 271227, 271235, 271244, 271252, 271261, 271270, - 271280, 271286, 271293, 271300, 271308, 271315, 271323, 271331, - 271340, 271347, 271355, 271363, 271372, 271380, 271389, 271398, - 271408, 271415, 271423, 271431, 271440, 271448, 271457, 271466, - 271476, 271484, 271493, 271502, 271512, 271521, 271531, 271541, - 271552, 271558, 271565, 271572, 271580, 271587, 271595, 271603, - 271612, 271619, 271627, 271635, 271644, 271652, 271661, 271670, - 271680, 271687, 271695, 271703, 271712, 271720, 271729, 271738, - 271748, 271756, 271765, 271774, 271784, 271793, 271803, 271813, - 271824, 271831, 271839, 271847, 271856, 271864, 271873, 271882, - 271892, 271900, 271909, 271918, 271928, 271937, 271947, 271957, - 271968, 271976, 271985, 271994, 272004, 272013, 272023, 272033, - 272044, 272053, 272063, 272073, 272084, 272094, 272105, 272116, - 272128, 272133, 272139, 272145, 272152, 272158, 272165, 272172, - 272180, 272186, 272193, 272200, 272208, 272215, 272223, 272231, - 272240, 272246, 272253, 272260, 272268, 272275, 272283, 272291, - 272300, 272307, 272315, 272323, 272332, 272340, 272349, 272358, - 272368, 272374, 272381, 272388, 272396, 272403, 272411, 272419, - 272428, 272435, 272443, 272451, 272460, 272468, 272477, 272486, - 272496, 272503, 272511, 272519, 272528, 272536, 272545, 272554, - 272564, 272572, 272581, 272590, 272600, 272609, 272619, 272629, - 272640, 272646, 272653, 272660, 272668, 272675, 272683, 272691, - 272700, 272707, 272715, 272723, 272732, 272740, 272749, 272758, - 272768, 272775, 272783, 272791, 272800, 272808, 272817, 272826, - 272836, 272844, 272853, 272862, 272872, 272881, 272891, 272901, - 272912, 272919, 272927, 272935, 272944, 272952, 272961, 272970, - 272980, 272988, 272997, 273006, 273016, 273025, 273035, 273045, - 273056, 273064, 273073, 273082, 273092, 273101, 273111, 273121, - 273132, 273141, 273151, 273161, 273172, 273182, 273193, 273204, - 273216, 273222, 273229, 273236, 273244, 273251, 273259, 273267, - 273276, 273283, 273291, 273299, 273308, 273316, 273325, 273334, - 273344, 273351, 273359, 273367, 273376, 273384, 273393, 273402, - 273412, 273420, 273429, 273438, 273448, 273457, 273467, 273477, - 273488, 273495, 273503, 273511, 273520, 273528, 273537, 273546, - 273556, 273564, 273573, 273582, 273592, 273601, 273611, 273621, - 273632, 273640, 273649, 273658, 273668, 273677, 273687, 273697, - 273708, 273717, 273727, 273737, 273748, 273758, 273769, 273780, - 273792, 273799, 273807, 273815, 273824, 273832, 273841, 273850, - 273860, 273868, 273877, 273886, 273896, 273905, 273915, 273925, - 273936, 273944, 273953, 273962, 273972, 273981, 273991, 274001, - 274012, 274021, 274031, 274041, 274052, 274062, 274073, 274084, - 274096, 274104, 274113, 274122, 274132, 274141, 274151, 274161, - 274172, 274181, 274191, 274201, 274212, 274222, 274233, 274244, - 274256, 274265, 274275, 274285, 274296, 274306, 274317, 274328, - 274340, 274350, 274361, 274372, 274384, 274395, 274407, 274419, - 274432, 274434, 274437, 274440, 274444, 274447, 274451, 274455, - 274460, 274463, 274467, 274471, 274476, 274480, 274485, 274490, - 274496, 274499, 274503, 274507, 274512, 274516, 274521, 274526, - 274532, 274536, 274541, 274546, 274552, 274557, 274563, 274569, - 274576, 274579, 274583, 274587, 274592, 274596, 274601, 274606, - 274612, 274616, 274621, 274626, 274632, 274637, 274643, 274649, - 274656, 274660, 274665, 274670, 274676, 274681, 274687, 274693, - 274700, 274705, 274711, 274717, 274724, 274730, 274737, 274744, - 274752, 274755, 274759, 274763, 274768, 274772, 274777, 274782, - 274788, 274792, 274797, 274802, 274808, 274813, 274819, 274825, - 274832, 274836, 274841, 274846, 274852, 274857, 274863, 274869, - 274876, 274881, 274887, 274893, 274900, 274906, 274913, 274920, - 274928, 274932, 274937, 274942, 274948, 274953, 274959, 274965, - 274972, 274977, 274983, 274989, 274996, 275002, 275009, 275016, - 275024, 275029, 275035, 275041, 275048, 275054, 275061, 275068, - 275076, 275082, 275089, 275096, 275104, 275111, 275119, 275127, - 275136, 275139, 275143, 275147, 275152, 275156, 275161, 275166, - 275172, 275176, 275181, 275186, 275192, 275197, 275203, 275209, - 275216, 275220, 275225, 275230, 275236, 275241, 275247, 275253, - 275260, 275265, 275271, 275277, 275284, 275290, 275297, 275304, - 275312, 275316, 275321, 275326, 275332, 275337, 275343, 275349, - 275356, 275361, 275367, 275373, 275380, 275386, 275393, 275400, - 275408, 275413, 275419, 275425, 275432, 275438, 275445, 275452, - 275460, 275466, 275473, 275480, 275488, 275495, 275503, 275511, - 275520, 275524, 275529, 275534, 275540, 275545, 275551, 275557, - 275564, 275569, 275575, 275581, 275588, 275594, 275601, 275608, - 275616, 275621, 275627, 275633, 275640, 275646, 275653, 275660, - 275668, 275674, 275681, 275688, 275696, 275703, 275711, 275719, - 275728, 275733, 275739, 275745, 275752, 275758, 275765, 275772, - 275780, 275786, 275793, 275800, 275808, 275815, 275823, 275831, - 275840, 275846, 275853, 275860, 275868, 275875, 275883, 275891, - 275900, 275907, 275915, 275923, 275932, 275940, 275949, 275958, - 275968, 275971, 275975, 275979, 275984, 275988, 275993, 275998, - 276004, 276008, 276013, 276018, 276024, 276029, 276035, 276041, - 276048, 276052, 276057, 276062, 276068, 276073, 276079, 276085, - 276092, 276097, 276103, 276109, 276116, 276122, 276129, 276136, - 276144, 276148, 276153, 276158, 276164, 276169, 276175, 276181, - 276188, 276193, 276199, 276205, 276212, 276218, 276225, 276232, - 276240, 276245, 276251, 276257, 276264, 276270, 276277, 276284, - 276292, 276298, 276305, 276312, 276320, 276327, 276335, 276343, - 276352, 276356, 276361, 276366, 276372, 276377, 276383, 276389, - 276396, 276401, 276407, 276413, 276420, 276426, 276433, 276440, - 276448, 276453, 276459, 276465, 276472, 276478, 276485, 276492, - 276500, 276506, 276513, 276520, 276528, 276535, 276543, 276551, - 276560, 276565, 276571, 276577, 276584, 276590, 276597, 276604, - 276612, 276618, 276625, 276632, 276640, 276647, 276655, 276663, - 276672, 276678, 276685, 276692, 276700, 276707, 276715, 276723, - 276732, 276739, 276747, 276755, 276764, 276772, 276781, 276790, - 276800, 276804, 276809, 276814, 276820, 276825, 276831, 276837, - 276844, 276849, 276855, 276861, 276868, 276874, 276881, 276888, - 276896, 276901, 276907, 276913, 276920, 276926, 276933, 276940, - 276948, 276954, 276961, 276968, 276976, 276983, 276991, 276999, - 277008, 277013, 277019, 277025, 277032, 277038, 277045, 277052, - 277060, 277066, 277073, 277080, 277088, 277095, 277103, 277111, - 277120, 277126, 277133, 277140, 277148, 277155, 277163, 277171, - 277180, 277187, 277195, 277203, 277212, 277220, 277229, 277238, - 277248, 277253, 277259, 277265, 277272, 277278, 277285, 277292, - 277300, 277306, 277313, 277320, 277328, 277335, 277343, 277351, - 277360, 277366, 277373, 277380, 277388, 277395, 277403, 277411, - 277420, 277427, 277435, 277443, 277452, 277460, 277469, 277478, - 277488, 277494, 277501, 277508, 277516, 277523, 277531, 277539, - 277548, 277555, 277563, 277571, 277580, 277588, 277597, 277606, - 277616, 277623, 277631, 277639, 277648, 277656, 277665, 277674, - 277684, 277692, 277701, 277710, 277720, 277729, 277739, 277749, - 277760, 277763, 277767, 277771, 277776, 277780, 277785, 277790, - 277796, 277800, 277805, 277810, 277816, 277821, 277827, 277833, - 277840, 277844, 277849, 277854, 277860, 277865, 277871, 277877, - 277884, 277889, 277895, 277901, 277908, 277914, 277921, 277928, - 277936, 277940, 277945, 277950, 277956, 277961, 277967, 277973, - 277980, 277985, 277991, 277997, 278004, 278010, 278017, 278024, - 278032, 278037, 278043, 278049, 278056, 278062, 278069, 278076, - 278084, 278090, 278097, 278104, 278112, 278119, 278127, 278135, - 278144, 278148, 278153, 278158, 278164, 278169, 278175, 278181, - 278188, 278193, 278199, 278205, 278212, 278218, 278225, 278232, - 278240, 278245, 278251, 278257, 278264, 278270, 278277, 278284, - 278292, 278298, 278305, 278312, 278320, 278327, 278335, 278343, - 278352, 278357, 278363, 278369, 278376, 278382, 278389, 278396, - 278404, 278410, 278417, 278424, 278432, 278439, 278447, 278455, - 278464, 278470, 278477, 278484, 278492, 278499, 278507, 278515, - 278524, 278531, 278539, 278547, 278556, 278564, 278573, 278582, - 278592, 278596, 278601, 278606, 278612, 278617, 278623, 278629, - 278636, 278641, 278647, 278653, 278660, 278666, 278673, 278680, - 278688, 278693, 278699, 278705, 278712, 278718, 278725, 278732, - 278740, 278746, 278753, 278760, 278768, 278775, 278783, 278791, - 278800, 278805, 278811, 278817, 278824, 278830, 278837, 278844, - 278852, 278858, 278865, 278872, 278880, 278887, 278895, 278903, - 278912, 278918, 278925, 278932, 278940, 278947, 278955, 278963, - 278972, 278979, 278987, 278995, 279004, 279012, 279021, 279030, - 279040, 279045, 279051, 279057, 279064, 279070, 279077, 279084, - 279092, 279098, 279105, 279112, 279120, 279127, 279135, 279143, - 279152, 279158, 279165, 279172, 279180, 279187, 279195, 279203, - 279212, 279219, 279227, 279235, 279244, 279252, 279261, 279270, - 279280, 279286, 279293, 279300, 279308, 279315, 279323, 279331, - 279340, 279347, 279355, 279363, 279372, 279380, 279389, 279398, - 279408, 279415, 279423, 279431, 279440, 279448, 279457, 279466, - 279476, 279484, 279493, 279502, 279512, 279521, 279531, 279541, - 279552, 279556, 279561, 279566, 279572, 279577, 279583, 279589, - 279596, 279601, 279607, 279613, 279620, 279626, 279633, 279640, - 279648, 279653, 279659, 279665, 279672, 279678, 279685, 279692, - 279700, 279706, 279713, 279720, 279728, 279735, 279743, 279751, - 279760, 279765, 279771, 279777, 279784, 279790, 279797, 279804, - 279812, 279818, 279825, 279832, 279840, 279847, 279855, 279863, - 279872, 279878, 279885, 279892, 279900, 279907, 279915, 279923, - 279932, 279939, 279947, 279955, 279964, 279972, 279981, 279990, - 280000, 280005, 280011, 280017, 280024, 280030, 280037, 280044, - 280052, 280058, 280065, 280072, 280080, 280087, 280095, 280103, - 280112, 280118, 280125, 280132, 280140, 280147, 280155, 280163, - 280172, 280179, 280187, 280195, 280204, 280212, 280221, 280230, - 280240, 280246, 280253, 280260, 280268, 280275, 280283, 280291, - 280300, 280307, 280315, 280323, 280332, 280340, 280349, 280358, - 280368, 280375, 280383, 280391, 280400, 280408, 280417, 280426, - 280436, 280444, 280453, 280462, 280472, 280481, 280491, 280501, - 280512, 280517, 280523, 280529, 280536, 280542, 280549, 280556, - 280564, 280570, 280577, 280584, 280592, 280599, 280607, 280615, - 280624, 280630, 280637, 280644, 280652, 280659, 280667, 280675, - 280684, 280691, 280699, 280707, 280716, 280724, 280733, 280742, - 280752, 280758, 280765, 280772, 280780, 280787, 280795, 280803, - 280812, 280819, 280827, 280835, 280844, 280852, 280861, 280870, - 280880, 280887, 280895, 280903, 280912, 280920, 280929, 280938, - 280948, 280956, 280965, 280974, 280984, 280993, 281003, 281013, - 281024, 281030, 281037, 281044, 281052, 281059, 281067, 281075, - 281084, 281091, 281099, 281107, 281116, 281124, 281133, 281142, - 281152, 281159, 281167, 281175, 281184, 281192, 281201, 281210, - 281220, 281228, 281237, 281246, 281256, 281265, 281275, 281285, - 281296, 281303, 281311, 281319, 281328, 281336, 281345, 281354, - 281364, 281372, 281381, 281390, 281400, 281409, 281419, 281429, - 281440, 281448, 281457, 281466, 281476, 281485, 281495, 281505, - 281516, 281525, 281535, 281545, 281556, 281566, 281577, 281588, - 281600, 281603, 281607, 281611, 281616, 281620, 281625, 281630, - 281636, 281640, 281645, 281650, 281656, 281661, 281667, 281673, - 281680, 281684, 281689, 281694, 281700, 281705, 281711, 281717, - 281724, 281729, 281735, 281741, 281748, 281754, 281761, 281768, - 281776, 281780, 281785, 281790, 281796, 281801, 281807, 281813, - 281820, 281825, 281831, 281837, 281844, 281850, 281857, 281864, - 281872, 281877, 281883, 281889, 281896, 281902, 281909, 281916, - 281924, 281930, 281937, 281944, 281952, 281959, 281967, 281975, - 281984, 281988, 281993, 281998, 282004, 282009, 282015, 282021, - 282028, 282033, 282039, 282045, 282052, 282058, 282065, 282072, - 282080, 282085, 282091, 282097, 282104, 282110, 282117, 282124, - 282132, 282138, 282145, 282152, 282160, 282167, 282175, 282183, - 282192, 282197, 282203, 282209, 282216, 282222, 282229, 282236, - 282244, 282250, 282257, 282264, 282272, 282279, 282287, 282295, - 282304, 282310, 282317, 282324, 282332, 282339, 282347, 282355, - 282364, 282371, 282379, 282387, 282396, 282404, 282413, 282422, - 282432, 282436, 282441, 282446, 282452, 282457, 282463, 282469, - 282476, 282481, 282487, 282493, 282500, 282506, 282513, 282520, - 282528, 282533, 282539, 282545, 282552, 282558, 282565, 282572, - 282580, 282586, 282593, 282600, 282608, 282615, 282623, 282631, - 282640, 282645, 282651, 282657, 282664, 282670, 282677, 282684, - 282692, 282698, 282705, 282712, 282720, 282727, 282735, 282743, - 282752, 282758, 282765, 282772, 282780, 282787, 282795, 282803, - 282812, 282819, 282827, 282835, 282844, 282852, 282861, 282870, - 282880, 282885, 282891, 282897, 282904, 282910, 282917, 282924, - 282932, 282938, 282945, 282952, 282960, 282967, 282975, 282983, - 282992, 282998, 283005, 283012, 283020, 283027, 283035, 283043, - 283052, 283059, 283067, 283075, 283084, 283092, 283101, 283110, - 283120, 283126, 283133, 283140, 283148, 283155, 283163, 283171, - 283180, 283187, 283195, 283203, 283212, 283220, 283229, 283238, - 283248, 283255, 283263, 283271, 283280, 283288, 283297, 283306, - 283316, 283324, 283333, 283342, 283352, 283361, 283371, 283381, - 283392, 283396, 283401, 283406, 283412, 283417, 283423, 283429, - 283436, 283441, 283447, 283453, 283460, 283466, 283473, 283480, - 283488, 283493, 283499, 283505, 283512, 283518, 283525, 283532, - 283540, 283546, 283553, 283560, 283568, 283575, 283583, 283591, - 283600, 283605, 283611, 283617, 283624, 283630, 283637, 283644, - 283652, 283658, 283665, 283672, 283680, 283687, 283695, 283703, - 283712, 283718, 283725, 283732, 283740, 283747, 283755, 283763, - 283772, 283779, 283787, 283795, 283804, 283812, 283821, 283830, - 283840, 283845, 283851, 283857, 283864, 283870, 283877, 283884, - 283892, 283898, 283905, 283912, 283920, 283927, 283935, 283943, - 283952, 283958, 283965, 283972, 283980, 283987, 283995, 284003, - 284012, 284019, 284027, 284035, 284044, 284052, 284061, 284070, - 284080, 284086, 284093, 284100, 284108, 284115, 284123, 284131, - 284140, 284147, 284155, 284163, 284172, 284180, 284189, 284198, - 284208, 284215, 284223, 284231, 284240, 284248, 284257, 284266, - 284276, 284284, 284293, 284302, 284312, 284321, 284331, 284341, - 284352, 284357, 284363, 284369, 284376, 284382, 284389, 284396, - 284404, 284410, 284417, 284424, 284432, 284439, 284447, 284455, - 284464, 284470, 284477, 284484, 284492, 284499, 284507, 284515, - 284524, 284531, 284539, 284547, 284556, 284564, 284573, 284582, - 284592, 284598, 284605, 284612, 284620, 284627, 284635, 284643, - 284652, 284659, 284667, 284675, 284684, 284692, 284701, 284710, - 284720, 284727, 284735, 284743, 284752, 284760, 284769, 284778, - 284788, 284796, 284805, 284814, 284824, 284833, 284843, 284853, - 284864, 284870, 284877, 284884, 284892, 284899, 284907, 284915, - 284924, 284931, 284939, 284947, 284956, 284964, 284973, 284982, - 284992, 284999, 285007, 285015, 285024, 285032, 285041, 285050, - 285060, 285068, 285077, 285086, 285096, 285105, 285115, 285125, - 285136, 285143, 285151, 285159, 285168, 285176, 285185, 285194, - 285204, 285212, 285221, 285230, 285240, 285249, 285259, 285269, - 285280, 285288, 285297, 285306, 285316, 285325, 285335, 285345, - 285356, 285365, 285375, 285385, 285396, 285406, 285417, 285428, - 285440, 285444, 285449, 285454, 285460, 285465, 285471, 285477, - 285484, 285489, 285495, 285501, 285508, 285514, 285521, 285528, - 285536, 285541, 285547, 285553, 285560, 285566, 285573, 285580, - 285588, 285594, 285601, 285608, 285616, 285623, 285631, 285639, - 285648, 285653, 285659, 285665, 285672, 285678, 285685, 285692, - 285700, 285706, 285713, 285720, 285728, 285735, 285743, 285751, - 285760, 285766, 285773, 285780, 285788, 285795, 285803, 285811, - 285820, 285827, 285835, 285843, 285852, 285860, 285869, 285878, - 285888, 285893, 285899, 285905, 285912, 285918, 285925, 285932, - 285940, 285946, 285953, 285960, 285968, 285975, 285983, 285991, - 286000, 286006, 286013, 286020, 286028, 286035, 286043, 286051, - 286060, 286067, 286075, 286083, 286092, 286100, 286109, 286118, - 286128, 286134, 286141, 286148, 286156, 286163, 286171, 286179, - 286188, 286195, 286203, 286211, 286220, 286228, 286237, 286246, - 286256, 286263, 286271, 286279, 286288, 286296, 286305, 286314, - 286324, 286332, 286341, 286350, 286360, 286369, 286379, 286389, - 286400, 286405, 286411, 286417, 286424, 286430, 286437, 286444, - 286452, 286458, 286465, 286472, 286480, 286487, 286495, 286503, - 286512, 286518, 286525, 286532, 286540, 286547, 286555, 286563, - 286572, 286579, 286587, 286595, 286604, 286612, 286621, 286630, - 286640, 286646, 286653, 286660, 286668, 286675, 286683, 286691, - 286700, 286707, 286715, 286723, 286732, 286740, 286749, 286758, - 286768, 286775, 286783, 286791, 286800, 286808, 286817, 286826, - 286836, 286844, 286853, 286862, 286872, 286881, 286891, 286901, - 286912, 286918, 286925, 286932, 286940, 286947, 286955, 286963, - 286972, 286979, 286987, 286995, 287004, 287012, 287021, 287030, - 287040, 287047, 287055, 287063, 287072, 287080, 287089, 287098, - 287108, 287116, 287125, 287134, 287144, 287153, 287163, 287173, - 287184, 287191, 287199, 287207, 287216, 287224, 287233, 287242, - 287252, 287260, 287269, 287278, 287288, 287297, 287307, 287317, - 287328, 287336, 287345, 287354, 287364, 287373, 287383, 287393, - 287404, 287413, 287423, 287433, 287444, 287454, 287465, 287476, - 287488, 287493, 287499, 287505, 287512, 287518, 287525, 287532, - 287540, 287546, 287553, 287560, 287568, 287575, 287583, 287591, - 287600, 287606, 287613, 287620, 287628, 287635, 287643, 287651, - 287660, 287667, 287675, 287683, 287692, 287700, 287709, 287718, - 287728, 287734, 287741, 287748, 287756, 287763, 287771, 287779, - 287788, 287795, 287803, 287811, 287820, 287828, 287837, 287846, - 287856, 287863, 287871, 287879, 287888, 287896, 287905, 287914, - 287924, 287932, 287941, 287950, 287960, 287969, 287979, 287989, - 288000, 288006, 288013, 288020, 288028, 288035, 288043, 288051, - 288060, 288067, 288075, 288083, 288092, 288100, 288109, 288118, - 288128, 288135, 288143, 288151, 288160, 288168, 288177, 288186, - 288196, 288204, 288213, 288222, 288232, 288241, 288251, 288261, - 288272, 288279, 288287, 288295, 288304, 288312, 288321, 288330, - 288340, 288348, 288357, 288366, 288376, 288385, 288395, 288405, - 288416, 288424, 288433, 288442, 288452, 288461, 288471, 288481, - 288492, 288501, 288511, 288521, 288532, 288542, 288553, 288564, - 288576, 288582, 288589, 288596, 288604, 288611, 288619, 288627, - 288636, 288643, 288651, 288659, 288668, 288676, 288685, 288694, - 288704, 288711, 288719, 288727, 288736, 288744, 288753, 288762, - 288772, 288780, 288789, 288798, 288808, 288817, 288827, 288837, - 288848, 288855, 288863, 288871, 288880, 288888, 288897, 288906, - 288916, 288924, 288933, 288942, 288952, 288961, 288971, 288981, - 288992, 289000, 289009, 289018, 289028, 289037, 289047, 289057, - 289068, 289077, 289087, 289097, 289108, 289118, 289129, 289140, - 289152, 289159, 289167, 289175, 289184, 289192, 289201, 289210, - 289220, 289228, 289237, 289246, 289256, 289265, 289275, 289285, - 289296, 289304, 289313, 289322, 289332, 289341, 289351, 289361, - 289372, 289381, 289391, 289401, 289412, 289422, 289433, 289444, - 289456, 289464, 289473, 289482, 289492, 289501, 289511, 289521, - 289532, 289541, 289551, 289561, 289572, 289582, 289593, 289604, - 289616, 289625, 289635, 289645, 289656, 289666, 289677, 289688, - 289700, 289710, 289721, 289732, 289744, 289755, 289767, 289779, - 289792, 289795, 289799, 289803, 289808, 289812, 289817, 289822, - 289828, 289832, 289837, 289842, 289848, 289853, 289859, 289865, - 289872, 289876, 289881, 289886, 289892, 289897, 289903, 289909, - 289916, 289921, 289927, 289933, 289940, 289946, 289953, 289960, - 289968, 289972, 289977, 289982, 289988, 289993, 289999, 290005, - 290012, 290017, 290023, 290029, 290036, 290042, 290049, 290056, - 290064, 290069, 290075, 290081, 290088, 290094, 290101, 290108, - 290116, 290122, 290129, 290136, 290144, 290151, 290159, 290167, - 290176, 290180, 290185, 290190, 290196, 290201, 290207, 290213, - 290220, 290225, 290231, 290237, 290244, 290250, 290257, 290264, - 290272, 290277, 290283, 290289, 290296, 290302, 290309, 290316, - 290324, 290330, 290337, 290344, 290352, 290359, 290367, 290375, - 290384, 290389, 290395, 290401, 290408, 290414, 290421, 290428, - 290436, 290442, 290449, 290456, 290464, 290471, 290479, 290487, - 290496, 290502, 290509, 290516, 290524, 290531, 290539, 290547, - 290556, 290563, 290571, 290579, 290588, 290596, 290605, 290614, - 290624, 290628, 290633, 290638, 290644, 290649, 290655, 290661, - 290668, 290673, 290679, 290685, 290692, 290698, 290705, 290712, - 290720, 290725, 290731, 290737, 290744, 290750, 290757, 290764, - 290772, 290778, 290785, 290792, 290800, 290807, 290815, 290823, - 290832, 290837, 290843, 290849, 290856, 290862, 290869, 290876, - 290884, 290890, 290897, 290904, 290912, 290919, 290927, 290935, - 290944, 290950, 290957, 290964, 290972, 290979, 290987, 290995, - 291004, 291011, 291019, 291027, 291036, 291044, 291053, 291062, - 291072, 291077, 291083, 291089, 291096, 291102, 291109, 291116, - 291124, 291130, 291137, 291144, 291152, 291159, 291167, 291175, - 291184, 291190, 291197, 291204, 291212, 291219, 291227, 291235, - 291244, 291251, 291259, 291267, 291276, 291284, 291293, 291302, - 291312, 291318, 291325, 291332, 291340, 291347, 291355, 291363, - 291372, 291379, 291387, 291395, 291404, 291412, 291421, 291430, - 291440, 291447, 291455, 291463, 291472, 291480, 291489, 291498, - 291508, 291516, 291525, 291534, 291544, 291553, 291563, 291573, - 291584, 291588, 291593, 291598, 291604, 291609, 291615, 291621, - 291628, 291633, 291639, 291645, 291652, 291658, 291665, 291672, - 291680, 291685, 291691, 291697, 291704, 291710, 291717, 291724, - 291732, 291738, 291745, 291752, 291760, 291767, 291775, 291783, - 291792, 291797, 291803, 291809, 291816, 291822, 291829, 291836, - 291844, 291850, 291857, 291864, 291872, 291879, 291887, 291895, - 291904, 291910, 291917, 291924, 291932, 291939, 291947, 291955, - 291964, 291971, 291979, 291987, 291996, 292004, 292013, 292022, - 292032, 292037, 292043, 292049, 292056, 292062, 292069, 292076, - 292084, 292090, 292097, 292104, 292112, 292119, 292127, 292135, - 292144, 292150, 292157, 292164, 292172, 292179, 292187, 292195, - 292204, 292211, 292219, 292227, 292236, 292244, 292253, 292262, - 292272, 292278, 292285, 292292, 292300, 292307, 292315, 292323, - 292332, 292339, 292347, 292355, 292364, 292372, 292381, 292390, - 292400, 292407, 292415, 292423, 292432, 292440, 292449, 292458, - 292468, 292476, 292485, 292494, 292504, 292513, 292523, 292533, - 292544, 292549, 292555, 292561, 292568, 292574, 292581, 292588, - 292596, 292602, 292609, 292616, 292624, 292631, 292639, 292647, - 292656, 292662, 292669, 292676, 292684, 292691, 292699, 292707, - 292716, 292723, 292731, 292739, 292748, 292756, 292765, 292774, - 292784, 292790, 292797, 292804, 292812, 292819, 292827, 292835, - 292844, 292851, 292859, 292867, 292876, 292884, 292893, 292902, - 292912, 292919, 292927, 292935, 292944, 292952, 292961, 292970, - 292980, 292988, 292997, 293006, 293016, 293025, 293035, 293045, - 293056, 293062, 293069, 293076, 293084, 293091, 293099, 293107, - 293116, 293123, 293131, 293139, 293148, 293156, 293165, 293174, - 293184, 293191, 293199, 293207, 293216, 293224, 293233, 293242, - 293252, 293260, 293269, 293278, 293288, 293297, 293307, 293317, - 293328, 293335, 293343, 293351, 293360, 293368, 293377, 293386, - 293396, 293404, 293413, 293422, 293432, 293441, 293451, 293461, - 293472, 293480, 293489, 293498, 293508, 293517, 293527, 293537, - 293548, 293557, 293567, 293577, 293588, 293598, 293609, 293620, - 293632, 293636, 293641, 293646, 293652, 293657, 293663, 293669, - 293676, 293681, 293687, 293693, 293700, 293706, 293713, 293720, - 293728, 293733, 293739, 293745, 293752, 293758, 293765, 293772, - 293780, 293786, 293793, 293800, 293808, 293815, 293823, 293831, - 293840, 293845, 293851, 293857, 293864, 293870, 293877, 293884, - 293892, 293898, 293905, 293912, 293920, 293927, 293935, 293943, - 293952, 293958, 293965, 293972, 293980, 293987, 293995, 294003, - 294012, 294019, 294027, 294035, 294044, 294052, 294061, 294070, - 294080, 294085, 294091, 294097, 294104, 294110, 294117, 294124, - 294132, 294138, 294145, 294152, 294160, 294167, 294175, 294183, - 294192, 294198, 294205, 294212, 294220, 294227, 294235, 294243, - 294252, 294259, 294267, 294275, 294284, 294292, 294301, 294310, - 294320, 294326, 294333, 294340, 294348, 294355, 294363, 294371, - 294380, 294387, 294395, 294403, 294412, 294420, 294429, 294438, - 294448, 294455, 294463, 294471, 294480, 294488, 294497, 294506, - 294516, 294524, 294533, 294542, 294552, 294561, 294571, 294581, - 294592, 294597, 294603, 294609, 294616, 294622, 294629, 294636, - 294644, 294650, 294657, 294664, 294672, 294679, 294687, 294695, - 294704, 294710, 294717, 294724, 294732, 294739, 294747, 294755, - 294764, 294771, 294779, 294787, 294796, 294804, 294813, 294822, - 294832, 294838, 294845, 294852, 294860, 294867, 294875, 294883, - 294892, 294899, 294907, 294915, 294924, 294932, 294941, 294950, - 294960, 294967, 294975, 294983, 294992, 295000, 295009, 295018, - 295028, 295036, 295045, 295054, 295064, 295073, 295083, 295093, - 295104, 295110, 295117, 295124, 295132, 295139, 295147, 295155, - 295164, 295171, 295179, 295187, 295196, 295204, 295213, 295222, - 295232, 295239, 295247, 295255, 295264, 295272, 295281, 295290, - 295300, 295308, 295317, 295326, 295336, 295345, 295355, 295365, - 295376, 295383, 295391, 295399, 295408, 295416, 295425, 295434, - 295444, 295452, 295461, 295470, 295480, 295489, 295499, 295509, - 295520, 295528, 295537, 295546, 295556, 295565, 295575, 295585, - 295596, 295605, 295615, 295625, 295636, 295646, 295657, 295668, - 295680, 295685, 295691, 295697, 295704, 295710, 295717, 295724, - 295732, 295738, 295745, 295752, 295760, 295767, 295775, 295783, - 295792, 295798, 295805, 295812, 295820, 295827, 295835, 295843, - 295852, 295859, 295867, 295875, 295884, 295892, 295901, 295910, - 295920, 295926, 295933, 295940, 295948, 295955, 295963, 295971, - 295980, 295987, 295995, 296003, 296012, 296020, 296029, 296038, - 296048, 296055, 296063, 296071, 296080, 296088, 296097, 296106, - 296116, 296124, 296133, 296142, 296152, 296161, 296171, 296181, - 296192, 296198, 296205, 296212, 296220, 296227, 296235, 296243, - 296252, 296259, 296267, 296275, 296284, 296292, 296301, 296310, - 296320, 296327, 296335, 296343, 296352, 296360, 296369, 296378, - 296388, 296396, 296405, 296414, 296424, 296433, 296443, 296453, - 296464, 296471, 296479, 296487, 296496, 296504, 296513, 296522, - 296532, 296540, 296549, 296558, 296568, 296577, 296587, 296597, - 296608, 296616, 296625, 296634, 296644, 296653, 296663, 296673, - 296684, 296693, 296703, 296713, 296724, 296734, 296745, 296756, - 296768, 296774, 296781, 296788, 296796, 296803, 296811, 296819, - 296828, 296835, 296843, 296851, 296860, 296868, 296877, 296886, - 296896, 296903, 296911, 296919, 296928, 296936, 296945, 296954, - 296964, 296972, 296981, 296990, 297000, 297009, 297019, 297029, - 297040, 297047, 297055, 297063, 297072, 297080, 297089, 297098, - 297108, 297116, 297125, 297134, 297144, 297153, 297163, 297173, - 297184, 297192, 297201, 297210, 297220, 297229, 297239, 297249, - 297260, 297269, 297279, 297289, 297300, 297310, 297321, 297332, - 297344, 297351, 297359, 297367, 297376, 297384, 297393, 297402, - 297412, 297420, 297429, 297438, 297448, 297457, 297467, 297477, - 297488, 297496, 297505, 297514, 297524, 297533, 297543, 297553, - 297564, 297573, 297583, 297593, 297604, 297614, 297625, 297636, - 297648, 297656, 297665, 297674, 297684, 297693, 297703, 297713, - 297724, 297733, 297743, 297753, 297764, 297774, 297785, 297796, - 297808, 297817, 297827, 297837, 297848, 297858, 297869, 297880, - 297892, 297902, 297913, 297924, 297936, 297947, 297959, 297971, - 297984, 297988, 297993, 297998, 298004, 298009, 298015, 298021, - 298028, 298033, 298039, 298045, 298052, 298058, 298065, 298072, - 298080, 298085, 298091, 298097, 298104, 298110, 298117, 298124, - 298132, 298138, 298145, 298152, 298160, 298167, 298175, 298183, - 298192, 298197, 298203, 298209, 298216, 298222, 298229, 298236, - 298244, 298250, 298257, 298264, 298272, 298279, 298287, 298295, - 298304, 298310, 298317, 298324, 298332, 298339, 298347, 298355, - 298364, 298371, 298379, 298387, 298396, 298404, 298413, 298422, - 298432, 298437, 298443, 298449, 298456, 298462, 298469, 298476, - 298484, 298490, 298497, 298504, 298512, 298519, 298527, 298535, - 298544, 298550, 298557, 298564, 298572, 298579, 298587, 298595, - 298604, 298611, 298619, 298627, 298636, 298644, 298653, 298662, - 298672, 298678, 298685, 298692, 298700, 298707, 298715, 298723, - 298732, 298739, 298747, 298755, 298764, 298772, 298781, 298790, - 298800, 298807, 298815, 298823, 298832, 298840, 298849, 298858, - 298868, 298876, 298885, 298894, 298904, 298913, 298923, 298933, - 298944, 298949, 298955, 298961, 298968, 298974, 298981, 298988, - 298996, 299002, 299009, 299016, 299024, 299031, 299039, 299047, - 299056, 299062, 299069, 299076, 299084, 299091, 299099, 299107, - 299116, 299123, 299131, 299139, 299148, 299156, 299165, 299174, - 299184, 299190, 299197, 299204, 299212, 299219, 299227, 299235, - 299244, 299251, 299259, 299267, 299276, 299284, 299293, 299302, - 299312, 299319, 299327, 299335, 299344, 299352, 299361, 299370, - 299380, 299388, 299397, 299406, 299416, 299425, 299435, 299445, - 299456, 299462, 299469, 299476, 299484, 299491, 299499, 299507, - 299516, 299523, 299531, 299539, 299548, 299556, 299565, 299574, - 299584, 299591, 299599, 299607, 299616, 299624, 299633, 299642, - 299652, 299660, 299669, 299678, 299688, 299697, 299707, 299717, - 299728, 299735, 299743, 299751, 299760, 299768, 299777, 299786, - 299796, 299804, 299813, 299822, 299832, 299841, 299851, 299861, - 299872, 299880, 299889, 299898, 299908, 299917, 299927, 299937, - 299948, 299957, 299967, 299977, 299988, 299998, 300009, 300020, - 300032, 300037, 300043, 300049, 300056, 300062, 300069, 300076, - 300084, 300090, 300097, 300104, 300112, 300119, 300127, 300135, - 300144, 300150, 300157, 300164, 300172, 300179, 300187, 300195, - 300204, 300211, 300219, 300227, 300236, 300244, 300253, 300262, - 300272, 300278, 300285, 300292, 300300, 300307, 300315, 300323, - 300332, 300339, 300347, 300355, 300364, 300372, 300381, 300390, - 300400, 300407, 300415, 300423, 300432, 300440, 300449, 300458, - 300468, 300476, 300485, 300494, 300504, 300513, 300523, 300533, - 300544, 300550, 300557, 300564, 300572, 300579, 300587, 300595, - 300604, 300611, 300619, 300627, 300636, 300644, 300653, 300662, - 300672, 300679, 300687, 300695, 300704, 300712, 300721, 300730, - 300740, 300748, 300757, 300766, 300776, 300785, 300795, 300805, - 300816, 300823, 300831, 300839, 300848, 300856, 300865, 300874, - 300884, 300892, 300901, 300910, 300920, 300929, 300939, 300949, - 300960, 300968, 300977, 300986, 300996, 301005, 301015, 301025, - 301036, 301045, 301055, 301065, 301076, 301086, 301097, 301108, - 301120, 301126, 301133, 301140, 301148, 301155, 301163, 301171, - 301180, 301187, 301195, 301203, 301212, 301220, 301229, 301238, - 301248, 301255, 301263, 301271, 301280, 301288, 301297, 301306, - 301316, 301324, 301333, 301342, 301352, 301361, 301371, 301381, - 301392, 301399, 301407, 301415, 301424, 301432, 301441, 301450, - 301460, 301468, 301477, 301486, 301496, 301505, 301515, 301525, - 301536, 301544, 301553, 301562, 301572, 301581, 301591, 301601, - 301612, 301621, 301631, 301641, 301652, 301662, 301673, 301684, - 301696, 301703, 301711, 301719, 301728, 301736, 301745, 301754, - 301764, 301772, 301781, 301790, 301800, 301809, 301819, 301829, - 301840, 301848, 301857, 301866, 301876, 301885, 301895, 301905, - 301916, 301925, 301935, 301945, 301956, 301966, 301977, 301988, - 302000, 302008, 302017, 302026, 302036, 302045, 302055, 302065, - 302076, 302085, 302095, 302105, 302116, 302126, 302137, 302148, - 302160, 302169, 302179, 302189, 302200, 302210, 302221, 302232, - 302244, 302254, 302265, 302276, 302288, 302299, 302311, 302323, - 302336, 302341, 302347, 302353, 302360, 302366, 302373, 302380, - 302388, 302394, 302401, 302408, 302416, 302423, 302431, 302439, - 302448, 302454, 302461, 302468, 302476, 302483, 302491, 302499, - 302508, 302515, 302523, 302531, 302540, 302548, 302557, 302566, - 302576, 302582, 302589, 302596, 302604, 302611, 302619, 302627, - 302636, 302643, 302651, 302659, 302668, 302676, 302685, 302694, - 302704, 302711, 302719, 302727, 302736, 302744, 302753, 302762, - 302772, 302780, 302789, 302798, 302808, 302817, 302827, 302837, - 302848, 302854, 302861, 302868, 302876, 302883, 302891, 302899, - 302908, 302915, 302923, 302931, 302940, 302948, 302957, 302966, - 302976, 302983, 302991, 302999, 303008, 303016, 303025, 303034, - 303044, 303052, 303061, 303070, 303080, 303089, 303099, 303109, - 303120, 303127, 303135, 303143, 303152, 303160, 303169, 303178, - 303188, 303196, 303205, 303214, 303224, 303233, 303243, 303253, - 303264, 303272, 303281, 303290, 303300, 303309, 303319, 303329, - 303340, 303349, 303359, 303369, 303380, 303390, 303401, 303412, - 303424, 303430, 303437, 303444, 303452, 303459, 303467, 303475, - 303484, 303491, 303499, 303507, 303516, 303524, 303533, 303542, - 303552, 303559, 303567, 303575, 303584, 303592, 303601, 303610, - 303620, 303628, 303637, 303646, 303656, 303665, 303675, 303685, - 303696, 303703, 303711, 303719, 303728, 303736, 303745, 303754, - 303764, 303772, 303781, 303790, 303800, 303809, 303819, 303829, - 303840, 303848, 303857, 303866, 303876, 303885, 303895, 303905, - 303916, 303925, 303935, 303945, 303956, 303966, 303977, 303988, - 304000, 304007, 304015, 304023, 304032, 304040, 304049, 304058, - 304068, 304076, 304085, 304094, 304104, 304113, 304123, 304133, - 304144, 304152, 304161, 304170, 304180, 304189, 304199, 304209, - 304220, 304229, 304239, 304249, 304260, 304270, 304281, 304292, - 304304, 304312, 304321, 304330, 304340, 304349, 304359, 304369, - 304380, 304389, 304399, 304409, 304420, 304430, 304441, 304452, - 304464, 304473, 304483, 304493, 304504, 304514, 304525, 304536, - 304548, 304558, 304569, 304580, 304592, 304603, 304615, 304627, - 304640, 304646, 304653, 304660, 304668, 304675, 304683, 304691, - 304700, 304707, 304715, 304723, 304732, 304740, 304749, 304758, - 304768, 304775, 304783, 304791, 304800, 304808, 304817, 304826, - 304836, 304844, 304853, 304862, 304872, 304881, 304891, 304901, - 304912, 304919, 304927, 304935, 304944, 304952, 304961, 304970, - 304980, 304988, 304997, 305006, 305016, 305025, 305035, 305045, - 305056, 305064, 305073, 305082, 305092, 305101, 305111, 305121, - 305132, 305141, 305151, 305161, 305172, 305182, 305193, 305204, - 305216, 305223, 305231, 305239, 305248, 305256, 305265, 305274, - 305284, 305292, 305301, 305310, 305320, 305329, 305339, 305349, - 305360, 305368, 305377, 305386, 305396, 305405, 305415, 305425, - 305436, 305445, 305455, 305465, 305476, 305486, 305497, 305508, - 305520, 305528, 305537, 305546, 305556, 305565, 305575, 305585, - 305596, 305605, 305615, 305625, 305636, 305646, 305657, 305668, - 305680, 305689, 305699, 305709, 305720, 305730, 305741, 305752, - 305764, 305774, 305785, 305796, 305808, 305819, 305831, 305843, - 305856, 305863, 305871, 305879, 305888, 305896, 305905, 305914, - 305924, 305932, 305941, 305950, 305960, 305969, 305979, 305989, - 306000, 306008, 306017, 306026, 306036, 306045, 306055, 306065, - 306076, 306085, 306095, 306105, 306116, 306126, 306137, 306148, - 306160, 306168, 306177, 306186, 306196, 306205, 306215, 306225, - 306236, 306245, 306255, 306265, 306276, 306286, 306297, 306308, - 306320, 306329, 306339, 306349, 306360, 306370, 306381, 306392, - 306404, 306414, 306425, 306436, 306448, 306459, 306471, 306483, - 306496, 306504, 306513, 306522, 306532, 306541, 306551, 306561, - 306572, 306581, 306591, 306601, 306612, 306622, 306633, 306644, - 306656, 306665, 306675, 306685, 306696, 306706, 306717, 306728, - 306740, 306750, 306761, 306772, 306784, 306795, 306807, 306819, - 306832, 306841, 306851, 306861, 306872, 306882, 306893, 306904, - 306916, 306926, 306937, 306948, 306960, 306971, 306983, 306995, - 307008, 307018, 307029, 307040, 307052, 307063, 307075, 307087, - 307100, 307111, 307123, 307135, 307148, 307160, 307173, 307186, - 307200, 307202, 307205, 307208, 307212, 307215, 307219, 307223, - 307228, 307231, 307235, 307239, 307244, 307248, 307253, 307258, - 307264, 307267, 307271, 307275, 307280, 307284, 307289, 307294, - 307300, 307304, 307309, 307314, 307320, 307325, 307331, 307337, - 307344, 307347, 307351, 307355, 307360, 307364, 307369, 307374, - 307380, 307384, 307389, 307394, 307400, 307405, 307411, 307417, - 307424, 307428, 307433, 307438, 307444, 307449, 307455, 307461, - 307468, 307473, 307479, 307485, 307492, 307498, 307505, 307512, - 307520, 307523, 307527, 307531, 307536, 307540, 307545, 307550, - 307556, 307560, 307565, 307570, 307576, 307581, 307587, 307593, - 307600, 307604, 307609, 307614, 307620, 307625, 307631, 307637, - 307644, 307649, 307655, 307661, 307668, 307674, 307681, 307688, - 307696, 307700, 307705, 307710, 307716, 307721, 307727, 307733, - 307740, 307745, 307751, 307757, 307764, 307770, 307777, 307784, - 307792, 307797, 307803, 307809, 307816, 307822, 307829, 307836, - 307844, 307850, 307857, 307864, 307872, 307879, 307887, 307895, - 307904, 307907, 307911, 307915, 307920, 307924, 307929, 307934, - 307940, 307944, 307949, 307954, 307960, 307965, 307971, 307977, - 307984, 307988, 307993, 307998, 308004, 308009, 308015, 308021, - 308028, 308033, 308039, 308045, 308052, 308058, 308065, 308072, - 308080, 308084, 308089, 308094, 308100, 308105, 308111, 308117, - 308124, 308129, 308135, 308141, 308148, 308154, 308161, 308168, - 308176, 308181, 308187, 308193, 308200, 308206, 308213, 308220, - 308228, 308234, 308241, 308248, 308256, 308263, 308271, 308279, - 308288, 308292, 308297, 308302, 308308, 308313, 308319, 308325, - 308332, 308337, 308343, 308349, 308356, 308362, 308369, 308376, - 308384, 308389, 308395, 308401, 308408, 308414, 308421, 308428, - 308436, 308442, 308449, 308456, 308464, 308471, 308479, 308487, - 308496, 308501, 308507, 308513, 308520, 308526, 308533, 308540, - 308548, 308554, 308561, 308568, 308576, 308583, 308591, 308599, - 308608, 308614, 308621, 308628, 308636, 308643, 308651, 308659, - 308668, 308675, 308683, 308691, 308700, 308708, 308717, 308726, - 308736, 308739, 308743, 308747, 308752, 308756, 308761, 308766, - 308772, 308776, 308781, 308786, 308792, 308797, 308803, 308809, - 308816, 308820, 308825, 308830, 308836, 308841, 308847, 308853, - 308860, 308865, 308871, 308877, 308884, 308890, 308897, 308904, - 308912, 308916, 308921, 308926, 308932, 308937, 308943, 308949, - 308956, 308961, 308967, 308973, 308980, 308986, 308993, 309000, - 309008, 309013, 309019, 309025, 309032, 309038, 309045, 309052, - 309060, 309066, 309073, 309080, 309088, 309095, 309103, 309111, - 309120, 309124, 309129, 309134, 309140, 309145, 309151, 309157, - 309164, 309169, 309175, 309181, 309188, 309194, 309201, 309208, - 309216, 309221, 309227, 309233, 309240, 309246, 309253, 309260, - 309268, 309274, 309281, 309288, 309296, 309303, 309311, 309319, - 309328, 309333, 309339, 309345, 309352, 309358, 309365, 309372, - 309380, 309386, 309393, 309400, 309408, 309415, 309423, 309431, - 309440, 309446, 309453, 309460, 309468, 309475, 309483, 309491, - 309500, 309507, 309515, 309523, 309532, 309540, 309549, 309558, - 309568, 309572, 309577, 309582, 309588, 309593, 309599, 309605, - 309612, 309617, 309623, 309629, 309636, 309642, 309649, 309656, - 309664, 309669, 309675, 309681, 309688, 309694, 309701, 309708, - 309716, 309722, 309729, 309736, 309744, 309751, 309759, 309767, - 309776, 309781, 309787, 309793, 309800, 309806, 309813, 309820, - 309828, 309834, 309841, 309848, 309856, 309863, 309871, 309879, - 309888, 309894, 309901, 309908, 309916, 309923, 309931, 309939, - 309948, 309955, 309963, 309971, 309980, 309988, 309997, 310006, - 310016, 310021, 310027, 310033, 310040, 310046, 310053, 310060, - 310068, 310074, 310081, 310088, 310096, 310103, 310111, 310119, - 310128, 310134, 310141, 310148, 310156, 310163, 310171, 310179, - 310188, 310195, 310203, 310211, 310220, 310228, 310237, 310246, - 310256, 310262, 310269, 310276, 310284, 310291, 310299, 310307, - 310316, 310323, 310331, 310339, 310348, 310356, 310365, 310374, - 310384, 310391, 310399, 310407, 310416, 310424, 310433, 310442, - 310452, 310460, 310469, 310478, 310488, 310497, 310507, 310517, - 310528, 310531, 310535, 310539, 310544, 310548, 310553, 310558, - 310564, 310568, 310573, 310578, 310584, 310589, 310595, 310601, - 310608, 310612, 310617, 310622, 310628, 310633, 310639, 310645, - 310652, 310657, 310663, 310669, 310676, 310682, 310689, 310696, - 310704, 310708, 310713, 310718, 310724, 310729, 310735, 310741, - 310748, 310753, 310759, 310765, 310772, 310778, 310785, 310792, - 310800, 310805, 310811, 310817, 310824, 310830, 310837, 310844, - 310852, 310858, 310865, 310872, 310880, 310887, 310895, 310903, - 310912, 310916, 310921, 310926, 310932, 310937, 310943, 310949, - 310956, 310961, 310967, 310973, 310980, 310986, 310993, 311000, - 311008, 311013, 311019, 311025, 311032, 311038, 311045, 311052, - 311060, 311066, 311073, 311080, 311088, 311095, 311103, 311111, - 311120, 311125, 311131, 311137, 311144, 311150, 311157, 311164, - 311172, 311178, 311185, 311192, 311200, 311207, 311215, 311223, - 311232, 311238, 311245, 311252, 311260, 311267, 311275, 311283, - 311292, 311299, 311307, 311315, 311324, 311332, 311341, 311350, - 311360, 311364, 311369, 311374, 311380, 311385, 311391, 311397, - 311404, 311409, 311415, 311421, 311428, 311434, 311441, 311448, - 311456, 311461, 311467, 311473, 311480, 311486, 311493, 311500, - 311508, 311514, 311521, 311528, 311536, 311543, 311551, 311559, - 311568, 311573, 311579, 311585, 311592, 311598, 311605, 311612, - 311620, 311626, 311633, 311640, 311648, 311655, 311663, 311671, - 311680, 311686, 311693, 311700, 311708, 311715, 311723, 311731, - 311740, 311747, 311755, 311763, 311772, 311780, 311789, 311798, - 311808, 311813, 311819, 311825, 311832, 311838, 311845, 311852, - 311860, 311866, 311873, 311880, 311888, 311895, 311903, 311911, - 311920, 311926, 311933, 311940, 311948, 311955, 311963, 311971, - 311980, 311987, 311995, 312003, 312012, 312020, 312029, 312038, - 312048, 312054, 312061, 312068, 312076, 312083, 312091, 312099, - 312108, 312115, 312123, 312131, 312140, 312148, 312157, 312166, - 312176, 312183, 312191, 312199, 312208, 312216, 312225, 312234, - 312244, 312252, 312261, 312270, 312280, 312289, 312299, 312309, - 312320, 312324, 312329, 312334, 312340, 312345, 312351, 312357, - 312364, 312369, 312375, 312381, 312388, 312394, 312401, 312408, - 312416, 312421, 312427, 312433, 312440, 312446, 312453, 312460, - 312468, 312474, 312481, 312488, 312496, 312503, 312511, 312519, - 312528, 312533, 312539, 312545, 312552, 312558, 312565, 312572, - 312580, 312586, 312593, 312600, 312608, 312615, 312623, 312631, - 312640, 312646, 312653, 312660, 312668, 312675, 312683, 312691, - 312700, 312707, 312715, 312723, 312732, 312740, 312749, 312758, - 312768, 312773, 312779, 312785, 312792, 312798, 312805, 312812, - 312820, 312826, 312833, 312840, 312848, 312855, 312863, 312871, - 312880, 312886, 312893, 312900, 312908, 312915, 312923, 312931, - 312940, 312947, 312955, 312963, 312972, 312980, 312989, 312998, - 313008, 313014, 313021, 313028, 313036, 313043, 313051, 313059, - 313068, 313075, 313083, 313091, 313100, 313108, 313117, 313126, - 313136, 313143, 313151, 313159, 313168, 313176, 313185, 313194, - 313204, 313212, 313221, 313230, 313240, 313249, 313259, 313269, - 313280, 313285, 313291, 313297, 313304, 313310, 313317, 313324, - 313332, 313338, 313345, 313352, 313360, 313367, 313375, 313383, - 313392, 313398, 313405, 313412, 313420, 313427, 313435, 313443, - 313452, 313459, 313467, 313475, 313484, 313492, 313501, 313510, - 313520, 313526, 313533, 313540, 313548, 313555, 313563, 313571, - 313580, 313587, 313595, 313603, 313612, 313620, 313629, 313638, - 313648, 313655, 313663, 313671, 313680, 313688, 313697, 313706, - 313716, 313724, 313733, 313742, 313752, 313761, 313771, 313781, - 313792, 313798, 313805, 313812, 313820, 313827, 313835, 313843, - 313852, 313859, 313867, 313875, 313884, 313892, 313901, 313910, - 313920, 313927, 313935, 313943, 313952, 313960, 313969, 313978, - 313988, 313996, 314005, 314014, 314024, 314033, 314043, 314053, - 314064, 314071, 314079, 314087, 314096, 314104, 314113, 314122, - 314132, 314140, 314149, 314158, 314168, 314177, 314187, 314197, - 314208, 314216, 314225, 314234, 314244, 314253, 314263, 314273, - 314284, 314293, 314303, 314313, 314324, 314334, 314345, 314356, - 314368, 314371, 314375, 314379, 314384, 314388, 314393, 314398, - 314404, 314408, 314413, 314418, 314424, 314429, 314435, 314441, - 314448, 314452, 314457, 314462, 314468, 314473, 314479, 314485, - 314492, 314497, 314503, 314509, 314516, 314522, 314529, 314536, - 314544, 314548, 314553, 314558, 314564, 314569, 314575, 314581, - 314588, 314593, 314599, 314605, 314612, 314618, 314625, 314632, - 314640, 314645, 314651, 314657, 314664, 314670, 314677, 314684, - 314692, 314698, 314705, 314712, 314720, 314727, 314735, 314743, - 314752, 314756, 314761, 314766, 314772, 314777, 314783, 314789, - 314796, 314801, 314807, 314813, 314820, 314826, 314833, 314840, - 314848, 314853, 314859, 314865, 314872, 314878, 314885, 314892, - 314900, 314906, 314913, 314920, 314928, 314935, 314943, 314951, - 314960, 314965, 314971, 314977, 314984, 314990, 314997, 315004, - 315012, 315018, 315025, 315032, 315040, 315047, 315055, 315063, - 315072, 315078, 315085, 315092, 315100, 315107, 315115, 315123, - 315132, 315139, 315147, 315155, 315164, 315172, 315181, 315190, - 315200, 315204, 315209, 315214, 315220, 315225, 315231, 315237, - 315244, 315249, 315255, 315261, 315268, 315274, 315281, 315288, - 315296, 315301, 315307, 315313, 315320, 315326, 315333, 315340, - 315348, 315354, 315361, 315368, 315376, 315383, 315391, 315399, - 315408, 315413, 315419, 315425, 315432, 315438, 315445, 315452, - 315460, 315466, 315473, 315480, 315488, 315495, 315503, 315511, - 315520, 315526, 315533, 315540, 315548, 315555, 315563, 315571, - 315580, 315587, 315595, 315603, 315612, 315620, 315629, 315638, - 315648, 315653, 315659, 315665, 315672, 315678, 315685, 315692, - 315700, 315706, 315713, 315720, 315728, 315735, 315743, 315751, - 315760, 315766, 315773, 315780, 315788, 315795, 315803, 315811, - 315820, 315827, 315835, 315843, 315852, 315860, 315869, 315878, - 315888, 315894, 315901, 315908, 315916, 315923, 315931, 315939, - 315948, 315955, 315963, 315971, 315980, 315988, 315997, 316006, - 316016, 316023, 316031, 316039, 316048, 316056, 316065, 316074, - 316084, 316092, 316101, 316110, 316120, 316129, 316139, 316149, - 316160, 316164, 316169, 316174, 316180, 316185, 316191, 316197, - 316204, 316209, 316215, 316221, 316228, 316234, 316241, 316248, - 316256, 316261, 316267, 316273, 316280, 316286, 316293, 316300, - 316308, 316314, 316321, 316328, 316336, 316343, 316351, 316359, - 316368, 316373, 316379, 316385, 316392, 316398, 316405, 316412, - 316420, 316426, 316433, 316440, 316448, 316455, 316463, 316471, - 316480, 316486, 316493, 316500, 316508, 316515, 316523, 316531, - 316540, 316547, 316555, 316563, 316572, 316580, 316589, 316598, - 316608, 316613, 316619, 316625, 316632, 316638, 316645, 316652, - 316660, 316666, 316673, 316680, 316688, 316695, 316703, 316711, - 316720, 316726, 316733, 316740, 316748, 316755, 316763, 316771, - 316780, 316787, 316795, 316803, 316812, 316820, 316829, 316838, - 316848, 316854, 316861, 316868, 316876, 316883, 316891, 316899, - 316908, 316915, 316923, 316931, 316940, 316948, 316957, 316966, - 316976, 316983, 316991, 316999, 317008, 317016, 317025, 317034, - 317044, 317052, 317061, 317070, 317080, 317089, 317099, 317109, - 317120, 317125, 317131, 317137, 317144, 317150, 317157, 317164, - 317172, 317178, 317185, 317192, 317200, 317207, 317215, 317223, - 317232, 317238, 317245, 317252, 317260, 317267, 317275, 317283, - 317292, 317299, 317307, 317315, 317324, 317332, 317341, 317350, - 317360, 317366, 317373, 317380, 317388, 317395, 317403, 317411, - 317420, 317427, 317435, 317443, 317452, 317460, 317469, 317478, - 317488, 317495, 317503, 317511, 317520, 317528, 317537, 317546, - 317556, 317564, 317573, 317582, 317592, 317601, 317611, 317621, - 317632, 317638, 317645, 317652, 317660, 317667, 317675, 317683, - 317692, 317699, 317707, 317715, 317724, 317732, 317741, 317750, - 317760, 317767, 317775, 317783, 317792, 317800, 317809, 317818, - 317828, 317836, 317845, 317854, 317864, 317873, 317883, 317893, - 317904, 317911, 317919, 317927, 317936, 317944, 317953, 317962, - 317972, 317980, 317989, 317998, 318008, 318017, 318027, 318037, - 318048, 318056, 318065, 318074, 318084, 318093, 318103, 318113, - 318124, 318133, 318143, 318153, 318164, 318174, 318185, 318196, - 318208, 318212, 318217, 318222, 318228, 318233, 318239, 318245, - 318252, 318257, 318263, 318269, 318276, 318282, 318289, 318296, - 318304, 318309, 318315, 318321, 318328, 318334, 318341, 318348, - 318356, 318362, 318369, 318376, 318384, 318391, 318399, 318407, - 318416, 318421, 318427, 318433, 318440, 318446, 318453, 318460, - 318468, 318474, 318481, 318488, 318496, 318503, 318511, 318519, - 318528, 318534, 318541, 318548, 318556, 318563, 318571, 318579, - 318588, 318595, 318603, 318611, 318620, 318628, 318637, 318646, - 318656, 318661, 318667, 318673, 318680, 318686, 318693, 318700, - 318708, 318714, 318721, 318728, 318736, 318743, 318751, 318759, - 318768, 318774, 318781, 318788, 318796, 318803, 318811, 318819, - 318828, 318835, 318843, 318851, 318860, 318868, 318877, 318886, - 318896, 318902, 318909, 318916, 318924, 318931, 318939, 318947, - 318956, 318963, 318971, 318979, 318988, 318996, 319005, 319014, - 319024, 319031, 319039, 319047, 319056, 319064, 319073, 319082, - 319092, 319100, 319109, 319118, 319128, 319137, 319147, 319157, - 319168, 319173, 319179, 319185, 319192, 319198, 319205, 319212, - 319220, 319226, 319233, 319240, 319248, 319255, 319263, 319271, - 319280, 319286, 319293, 319300, 319308, 319315, 319323, 319331, - 319340, 319347, 319355, 319363, 319372, 319380, 319389, 319398, - 319408, 319414, 319421, 319428, 319436, 319443, 319451, 319459, - 319468, 319475, 319483, 319491, 319500, 319508, 319517, 319526, - 319536, 319543, 319551, 319559, 319568, 319576, 319585, 319594, - 319604, 319612, 319621, 319630, 319640, 319649, 319659, 319669, - 319680, 319686, 319693, 319700, 319708, 319715, 319723, 319731, - 319740, 319747, 319755, 319763, 319772, 319780, 319789, 319798, - 319808, 319815, 319823, 319831, 319840, 319848, 319857, 319866, - 319876, 319884, 319893, 319902, 319912, 319921, 319931, 319941, - 319952, 319959, 319967, 319975, 319984, 319992, 320001, 320010, - 320020, 320028, 320037, 320046, 320056, 320065, 320075, 320085, - 320096, 320104, 320113, 320122, 320132, 320141, 320151, 320161, - 320172, 320181, 320191, 320201, 320212, 320222, 320233, 320244, - 320256, 320261, 320267, 320273, 320280, 320286, 320293, 320300, - 320308, 320314, 320321, 320328, 320336, 320343, 320351, 320359, - 320368, 320374, 320381, 320388, 320396, 320403, 320411, 320419, - 320428, 320435, 320443, 320451, 320460, 320468, 320477, 320486, - 320496, 320502, 320509, 320516, 320524, 320531, 320539, 320547, - 320556, 320563, 320571, 320579, 320588, 320596, 320605, 320614, - 320624, 320631, 320639, 320647, 320656, 320664, 320673, 320682, - 320692, 320700, 320709, 320718, 320728, 320737, 320747, 320757, - 320768, 320774, 320781, 320788, 320796, 320803, 320811, 320819, - 320828, 320835, 320843, 320851, 320860, 320868, 320877, 320886, - 320896, 320903, 320911, 320919, 320928, 320936, 320945, 320954, - 320964, 320972, 320981, 320990, 321000, 321009, 321019, 321029, - 321040, 321047, 321055, 321063, 321072, 321080, 321089, 321098, - 321108, 321116, 321125, 321134, 321144, 321153, 321163, 321173, - 321184, 321192, 321201, 321210, 321220, 321229, 321239, 321249, - 321260, 321269, 321279, 321289, 321300, 321310, 321321, 321332, - 321344, 321350, 321357, 321364, 321372, 321379, 321387, 321395, - 321404, 321411, 321419, 321427, 321436, 321444, 321453, 321462, - 321472, 321479, 321487, 321495, 321504, 321512, 321521, 321530, - 321540, 321548, 321557, 321566, 321576, 321585, 321595, 321605, - 321616, 321623, 321631, 321639, 321648, 321656, 321665, 321674, - 321684, 321692, 321701, 321710, 321720, 321729, 321739, 321749, - 321760, 321768, 321777, 321786, 321796, 321805, 321815, 321825, - 321836, 321845, 321855, 321865, 321876, 321886, 321897, 321908, - 321920, 321927, 321935, 321943, 321952, 321960, 321969, 321978, - 321988, 321996, 322005, 322014, 322024, 322033, 322043, 322053, - 322064, 322072, 322081, 322090, 322100, 322109, 322119, 322129, - 322140, 322149, 322159, 322169, 322180, 322190, 322201, 322212, - 322224, 322232, 322241, 322250, 322260, 322269, 322279, 322289, - 322300, 322309, 322319, 322329, 322340, 322350, 322361, 322372, - 322384, 322393, 322403, 322413, 322424, 322434, 322445, 322456, - 322468, 322478, 322489, 322500, 322512, 322523, 322535, 322547, - 322560, 322563, 322567, 322571, 322576, 322580, 322585, 322590, - 322596, 322600, 322605, 322610, 322616, 322621, 322627, 322633, - 322640, 322644, 322649, 322654, 322660, 322665, 322671, 322677, - 322684, 322689, 322695, 322701, 322708, 322714, 322721, 322728, - 322736, 322740, 322745, 322750, 322756, 322761, 322767, 322773, - 322780, 322785, 322791, 322797, 322804, 322810, 322817, 322824, - 322832, 322837, 322843, 322849, 322856, 322862, 322869, 322876, - 322884, 322890, 322897, 322904, 322912, 322919, 322927, 322935, - 322944, 322948, 322953, 322958, 322964, 322969, 322975, 322981, - 322988, 322993, 322999, 323005, 323012, 323018, 323025, 323032, - 323040, 323045, 323051, 323057, 323064, 323070, 323077, 323084, - 323092, 323098, 323105, 323112, 323120, 323127, 323135, 323143, - 323152, 323157, 323163, 323169, 323176, 323182, 323189, 323196, - 323204, 323210, 323217, 323224, 323232, 323239, 323247, 323255, - 323264, 323270, 323277, 323284, 323292, 323299, 323307, 323315, - 323324, 323331, 323339, 323347, 323356, 323364, 323373, 323382, - 323392, 323396, 323401, 323406, 323412, 323417, 323423, 323429, - 323436, 323441, 323447, 323453, 323460, 323466, 323473, 323480, - 323488, 323493, 323499, 323505, 323512, 323518, 323525, 323532, - 323540, 323546, 323553, 323560, 323568, 323575, 323583, 323591, - 323600, 323605, 323611, 323617, 323624, 323630, 323637, 323644, - 323652, 323658, 323665, 323672, 323680, 323687, 323695, 323703, - 323712, 323718, 323725, 323732, 323740, 323747, 323755, 323763, - 323772, 323779, 323787, 323795, 323804, 323812, 323821, 323830, - 323840, 323845, 323851, 323857, 323864, 323870, 323877, 323884, - 323892, 323898, 323905, 323912, 323920, 323927, 323935, 323943, - 323952, 323958, 323965, 323972, 323980, 323987, 323995, 324003, - 324012, 324019, 324027, 324035, 324044, 324052, 324061, 324070, - 324080, 324086, 324093, 324100, 324108, 324115, 324123, 324131, - 324140, 324147, 324155, 324163, 324172, 324180, 324189, 324198, - 324208, 324215, 324223, 324231, 324240, 324248, 324257, 324266, - 324276, 324284, 324293, 324302, 324312, 324321, 324331, 324341, - 324352, 324356, 324361, 324366, 324372, 324377, 324383, 324389, - 324396, 324401, 324407, 324413, 324420, 324426, 324433, 324440, - 324448, 324453, 324459, 324465, 324472, 324478, 324485, 324492, - 324500, 324506, 324513, 324520, 324528, 324535, 324543, 324551, - 324560, 324565, 324571, 324577, 324584, 324590, 324597, 324604, - 324612, 324618, 324625, 324632, 324640, 324647, 324655, 324663, - 324672, 324678, 324685, 324692, 324700, 324707, 324715, 324723, - 324732, 324739, 324747, 324755, 324764, 324772, 324781, 324790, - 324800, 324805, 324811, 324817, 324824, 324830, 324837, 324844, - 324852, 324858, 324865, 324872, 324880, 324887, 324895, 324903, - 324912, 324918, 324925, 324932, 324940, 324947, 324955, 324963, - 324972, 324979, 324987, 324995, 325004, 325012, 325021, 325030, - 325040, 325046, 325053, 325060, 325068, 325075, 325083, 325091, - 325100, 325107, 325115, 325123, 325132, 325140, 325149, 325158, - 325168, 325175, 325183, 325191, 325200, 325208, 325217, 325226, - 325236, 325244, 325253, 325262, 325272, 325281, 325291, 325301, - 325312, 325317, 325323, 325329, 325336, 325342, 325349, 325356, - 325364, 325370, 325377, 325384, 325392, 325399, 325407, 325415, - 325424, 325430, 325437, 325444, 325452, 325459, 325467, 325475, - 325484, 325491, 325499, 325507, 325516, 325524, 325533, 325542, - 325552, 325558, 325565, 325572, 325580, 325587, 325595, 325603, - 325612, 325619, 325627, 325635, 325644, 325652, 325661, 325670, - 325680, 325687, 325695, 325703, 325712, 325720, 325729, 325738, - 325748, 325756, 325765, 325774, 325784, 325793, 325803, 325813, - 325824, 325830, 325837, 325844, 325852, 325859, 325867, 325875, - 325884, 325891, 325899, 325907, 325916, 325924, 325933, 325942, - 325952, 325959, 325967, 325975, 325984, 325992, 326001, 326010, - 326020, 326028, 326037, 326046, 326056, 326065, 326075, 326085, - 326096, 326103, 326111, 326119, 326128, 326136, 326145, 326154, - 326164, 326172, 326181, 326190, 326200, 326209, 326219, 326229, - 326240, 326248, 326257, 326266, 326276, 326285, 326295, 326305, - 326316, 326325, 326335, 326345, 326356, 326366, 326377, 326388, - 326400, 326404, 326409, 326414, 326420, 326425, 326431, 326437, - 326444, 326449, 326455, 326461, 326468, 326474, 326481, 326488, - 326496, 326501, 326507, 326513, 326520, 326526, 326533, 326540, - 326548, 326554, 326561, 326568, 326576, 326583, 326591, 326599, - 326608, 326613, 326619, 326625, 326632, 326638, 326645, 326652, - 326660, 326666, 326673, 326680, 326688, 326695, 326703, 326711, - 326720, 326726, 326733, 326740, 326748, 326755, 326763, 326771, - 326780, 326787, 326795, 326803, 326812, 326820, 326829, 326838, - 326848, 326853, 326859, 326865, 326872, 326878, 326885, 326892, - 326900, 326906, 326913, 326920, 326928, 326935, 326943, 326951, - 326960, 326966, 326973, 326980, 326988, 326995, 327003, 327011, - 327020, 327027, 327035, 327043, 327052, 327060, 327069, 327078, - 327088, 327094, 327101, 327108, 327116, 327123, 327131, 327139, - 327148, 327155, 327163, 327171, 327180, 327188, 327197, 327206, - 327216, 327223, 327231, 327239, 327248, 327256, 327265, 327274, - 327284, 327292, 327301, 327310, 327320, 327329, 327339, 327349, - 327360, 327365, 327371, 327377, 327384, 327390, 327397, 327404, - 327412, 327418, 327425, 327432, 327440, 327447, 327455, 327463, - 327472, 327478, 327485, 327492, 327500, 327507, 327515, 327523, - 327532, 327539, 327547, 327555, 327564, 327572, 327581, 327590, - 327600, 327606, 327613, 327620, 327628, 327635, 327643, 327651, - 327660, 327667, 327675, 327683, 327692, 327700, 327709, 327718, - 327728, 327735, 327743, 327751, 327760, 327768, 327777, 327786, - 327796, 327804, 327813, 327822, 327832, 327841, 327851, 327861, - 327872, 327878, 327885, 327892, 327900, 327907, 327915, 327923, - 327932, 327939, 327947, 327955, 327964, 327972, 327981, 327990, - 328000, 328007, 328015, 328023, 328032, 328040, 328049, 328058, - 328068, 328076, 328085, 328094, 328104, 328113, 328123, 328133, - 328144, 328151, 328159, 328167, 328176, 328184, 328193, 328202, - 328212, 328220, 328229, 328238, 328248, 328257, 328267, 328277, - 328288, 328296, 328305, 328314, 328324, 328333, 328343, 328353, - 328364, 328373, 328383, 328393, 328404, 328414, 328425, 328436, - 328448, 328453, 328459, 328465, 328472, 328478, 328485, 328492, - 328500, 328506, 328513, 328520, 328528, 328535, 328543, 328551, - 328560, 328566, 328573, 328580, 328588, 328595, 328603, 328611, - 328620, 328627, 328635, 328643, 328652, 328660, 328669, 328678, - 328688, 328694, 328701, 328708, 328716, 328723, 328731, 328739, - 328748, 328755, 328763, 328771, 328780, 328788, 328797, 328806, - 328816, 328823, 328831, 328839, 328848, 328856, 328865, 328874, - 328884, 328892, 328901, 328910, 328920, 328929, 328939, 328949, - 328960, 328966, 328973, 328980, 328988, 328995, 329003, 329011, - 329020, 329027, 329035, 329043, 329052, 329060, 329069, 329078, - 329088, 329095, 329103, 329111, 329120, 329128, 329137, 329146, - 329156, 329164, 329173, 329182, 329192, 329201, 329211, 329221, - 329232, 329239, 329247, 329255, 329264, 329272, 329281, 329290, - 329300, 329308, 329317, 329326, 329336, 329345, 329355, 329365, - 329376, 329384, 329393, 329402, 329412, 329421, 329431, 329441, - 329452, 329461, 329471, 329481, 329492, 329502, 329513, 329524, - 329536, 329542, 329549, 329556, 329564, 329571, 329579, 329587, - 329596, 329603, 329611, 329619, 329628, 329636, 329645, 329654, - 329664, 329671, 329679, 329687, 329696, 329704, 329713, 329722, - 329732, 329740, 329749, 329758, 329768, 329777, 329787, 329797, - 329808, 329815, 329823, 329831, 329840, 329848, 329857, 329866, - 329876, 329884, 329893, 329902, 329912, 329921, 329931, 329941, - 329952, 329960, 329969, 329978, 329988, 329997, 330007, 330017, - 330028, 330037, 330047, 330057, 330068, 330078, 330089, 330100, - 330112, 330119, 330127, 330135, 330144, 330152, 330161, 330170, - 330180, 330188, 330197, 330206, 330216, 330225, 330235, 330245, - 330256, 330264, 330273, 330282, 330292, 330301, 330311, 330321, - 330332, 330341, 330351, 330361, 330372, 330382, 330393, 330404, - 330416, 330424, 330433, 330442, 330452, 330461, 330471, 330481, - 330492, 330501, 330511, 330521, 330532, 330542, 330553, 330564, - 330576, 330585, 330595, 330605, 330616, 330626, 330637, 330648, - 330660, 330670, 330681, 330692, 330704, 330715, 330727, 330739, - 330752, 330756, 330761, 330766, 330772, 330777, 330783, 330789, - 330796, 330801, 330807, 330813, 330820, 330826, 330833, 330840, - 330848, 330853, 330859, 330865, 330872, 330878, 330885, 330892, - 330900, 330906, 330913, 330920, 330928, 330935, 330943, 330951, - 330960, 330965, 330971, 330977, 330984, 330990, 330997, 331004, - 331012, 331018, 331025, 331032, 331040, 331047, 331055, 331063, - 331072, 331078, 331085, 331092, 331100, 331107, 331115, 331123, - 331132, 331139, 331147, 331155, 331164, 331172, 331181, 331190, - 331200, 331205, 331211, 331217, 331224, 331230, 331237, 331244, - 331252, 331258, 331265, 331272, 331280, 331287, 331295, 331303, - 331312, 331318, 331325, 331332, 331340, 331347, 331355, 331363, - 331372, 331379, 331387, 331395, 331404, 331412, 331421, 331430, - 331440, 331446, 331453, 331460, 331468, 331475, 331483, 331491, - 331500, 331507, 331515, 331523, 331532, 331540, 331549, 331558, - 331568, 331575, 331583, 331591, 331600, 331608, 331617, 331626, - 331636, 331644, 331653, 331662, 331672, 331681, 331691, 331701, - 331712, 331717, 331723, 331729, 331736, 331742, 331749, 331756, - 331764, 331770, 331777, 331784, 331792, 331799, 331807, 331815, - 331824, 331830, 331837, 331844, 331852, 331859, 331867, 331875, - 331884, 331891, 331899, 331907, 331916, 331924, 331933, 331942, - 331952, 331958, 331965, 331972, 331980, 331987, 331995, 332003, - 332012, 332019, 332027, 332035, 332044, 332052, 332061, 332070, - 332080, 332087, 332095, 332103, 332112, 332120, 332129, 332138, - 332148, 332156, 332165, 332174, 332184, 332193, 332203, 332213, - 332224, 332230, 332237, 332244, 332252, 332259, 332267, 332275, - 332284, 332291, 332299, 332307, 332316, 332324, 332333, 332342, - 332352, 332359, 332367, 332375, 332384, 332392, 332401, 332410, - 332420, 332428, 332437, 332446, 332456, 332465, 332475, 332485, - 332496, 332503, 332511, 332519, 332528, 332536, 332545, 332554, - 332564, 332572, 332581, 332590, 332600, 332609, 332619, 332629, - 332640, 332648, 332657, 332666, 332676, 332685, 332695, 332705, - 332716, 332725, 332735, 332745, 332756, 332766, 332777, 332788, - 332800, 332805, 332811, 332817, 332824, 332830, 332837, 332844, - 332852, 332858, 332865, 332872, 332880, 332887, 332895, 332903, - 332912, 332918, 332925, 332932, 332940, 332947, 332955, 332963, - 332972, 332979, 332987, 332995, 333004, 333012, 333021, 333030, - 333040, 333046, 333053, 333060, 333068, 333075, 333083, 333091, - 333100, 333107, 333115, 333123, 333132, 333140, 333149, 333158, - 333168, 333175, 333183, 333191, 333200, 333208, 333217, 333226, - 333236, 333244, 333253, 333262, 333272, 333281, 333291, 333301, - 333312, 333318, 333325, 333332, 333340, 333347, 333355, 333363, - 333372, 333379, 333387, 333395, 333404, 333412, 333421, 333430, - 333440, 333447, 333455, 333463, 333472, 333480, 333489, 333498, - 333508, 333516, 333525, 333534, 333544, 333553, 333563, 333573, - 333584, 333591, 333599, 333607, 333616, 333624, 333633, 333642, - 333652, 333660, 333669, 333678, 333688, 333697, 333707, 333717, - 333728, 333736, 333745, 333754, 333764, 333773, 333783, 333793, - 333804, 333813, 333823, 333833, 333844, 333854, 333865, 333876, - 333888, 333894, 333901, 333908, 333916, 333923, 333931, 333939, - 333948, 333955, 333963, 333971, 333980, 333988, 333997, 334006, - 334016, 334023, 334031, 334039, 334048, 334056, 334065, 334074, - 334084, 334092, 334101, 334110, 334120, 334129, 334139, 334149, - 334160, 334167, 334175, 334183, 334192, 334200, 334209, 334218, - 334228, 334236, 334245, 334254, 334264, 334273, 334283, 334293, - 334304, 334312, 334321, 334330, 334340, 334349, 334359, 334369, - 334380, 334389, 334399, 334409, 334420, 334430, 334441, 334452, - 334464, 334471, 334479, 334487, 334496, 334504, 334513, 334522, - 334532, 334540, 334549, 334558, 334568, 334577, 334587, 334597, - 334608, 334616, 334625, 334634, 334644, 334653, 334663, 334673, - 334684, 334693, 334703, 334713, 334724, 334734, 334745, 334756, - 334768, 334776, 334785, 334794, 334804, 334813, 334823, 334833, - 334844, 334853, 334863, 334873, 334884, 334894, 334905, 334916, - 334928, 334937, 334947, 334957, 334968, 334978, 334989, 335000, - 335012, 335022, 335033, 335044, 335056, 335067, 335079, 335091, - 335104, 335109, 335115, 335121, 335128, 335134, 335141, 335148, - 335156, 335162, 335169, 335176, 335184, 335191, 335199, 335207, - 335216, 335222, 335229, 335236, 335244, 335251, 335259, 335267, - 335276, 335283, 335291, 335299, 335308, 335316, 335325, 335334, - 335344, 335350, 335357, 335364, 335372, 335379, 335387, 335395, - 335404, 335411, 335419, 335427, 335436, 335444, 335453, 335462, - 335472, 335479, 335487, 335495, 335504, 335512, 335521, 335530, - 335540, 335548, 335557, 335566, 335576, 335585, 335595, 335605, - 335616, 335622, 335629, 335636, 335644, 335651, 335659, 335667, - 335676, 335683, 335691, 335699, 335708, 335716, 335725, 335734, - 335744, 335751, 335759, 335767, 335776, 335784, 335793, 335802, - 335812, 335820, 335829, 335838, 335848, 335857, 335867, 335877, - 335888, 335895, 335903, 335911, 335920, 335928, 335937, 335946, - 335956, 335964, 335973, 335982, 335992, 336001, 336011, 336021, - 336032, 336040, 336049, 336058, 336068, 336077, 336087, 336097, - 336108, 336117, 336127, 336137, 336148, 336158, 336169, 336180, - 336192, 336198, 336205, 336212, 336220, 336227, 336235, 336243, - 336252, 336259, 336267, 336275, 336284, 336292, 336301, 336310, - 336320, 336327, 336335, 336343, 336352, 336360, 336369, 336378, - 336388, 336396, 336405, 336414, 336424, 336433, 336443, 336453, - 336464, 336471, 336479, 336487, 336496, 336504, 336513, 336522, - 336532, 336540, 336549, 336558, 336568, 336577, 336587, 336597, - 336608, 336616, 336625, 336634, 336644, 336653, 336663, 336673, - 336684, 336693, 336703, 336713, 336724, 336734, 336745, 336756, - 336768, 336775, 336783, 336791, 336800, 336808, 336817, 336826, - 336836, 336844, 336853, 336862, 336872, 336881, 336891, 336901, - 336912, 336920, 336929, 336938, 336948, 336957, 336967, 336977, - 336988, 336997, 337007, 337017, 337028, 337038, 337049, 337060, - 337072, 337080, 337089, 337098, 337108, 337117, 337127, 337137, - 337148, 337157, 337167, 337177, 337188, 337198, 337209, 337220, - 337232, 337241, 337251, 337261, 337272, 337282, 337293, 337304, - 337316, 337326, 337337, 337348, 337360, 337371, 337383, 337395, - 337408, 337414, 337421, 337428, 337436, 337443, 337451, 337459, - 337468, 337475, 337483, 337491, 337500, 337508, 337517, 337526, - 337536, 337543, 337551, 337559, 337568, 337576, 337585, 337594, - 337604, 337612, 337621, 337630, 337640, 337649, 337659, 337669, - 337680, 337687, 337695, 337703, 337712, 337720, 337729, 337738, - 337748, 337756, 337765, 337774, 337784, 337793, 337803, 337813, - 337824, 337832, 337841, 337850, 337860, 337869, 337879, 337889, - 337900, 337909, 337919, 337929, 337940, 337950, 337961, 337972, - 337984, 337991, 337999, 338007, 338016, 338024, 338033, 338042, - 338052, 338060, 338069, 338078, 338088, 338097, 338107, 338117, - 338128, 338136, 338145, 338154, 338164, 338173, 338183, 338193, - 338204, 338213, 338223, 338233, 338244, 338254, 338265, 338276, - 338288, 338296, 338305, 338314, 338324, 338333, 338343, 338353, - 338364, 338373, 338383, 338393, 338404, 338414, 338425, 338436, - 338448, 338457, 338467, 338477, 338488, 338498, 338509, 338520, - 338532, 338542, 338553, 338564, 338576, 338587, 338599, 338611, - 338624, 338631, 338639, 338647, 338656, 338664, 338673, 338682, - 338692, 338700, 338709, 338718, 338728, 338737, 338747, 338757, - 338768, 338776, 338785, 338794, 338804, 338813, 338823, 338833, - 338844, 338853, 338863, 338873, 338884, 338894, 338905, 338916, - 338928, 338936, 338945, 338954, 338964, 338973, 338983, 338993, - 339004, 339013, 339023, 339033, 339044, 339054, 339065, 339076, - 339088, 339097, 339107, 339117, 339128, 339138, 339149, 339160, - 339172, 339182, 339193, 339204, 339216, 339227, 339239, 339251, - 339264, 339272, 339281, 339290, 339300, 339309, 339319, 339329, - 339340, 339349, 339359, 339369, 339380, 339390, 339401, 339412, - 339424, 339433, 339443, 339453, 339464, 339474, 339485, 339496, - 339508, 339518, 339529, 339540, 339552, 339563, 339575, 339587, - 339600, 339609, 339619, 339629, 339640, 339650, 339661, 339672, - 339684, 339694, 339705, 339716, 339728, 339739, 339751, 339763, - 339776, 339786, 339797, 339808, 339820, 339831, 339843, 339855, - 339868, 339879, 339891, 339903, 339916, 339928, 339941, 339954, - 339968, 339971, 339975, 339979, 339984, 339988, 339993, 339998, - 340004, 340008, 340013, 340018, 340024, 340029, 340035, 340041, - 340048, 340052, 340057, 340062, 340068, 340073, 340079, 340085, - 340092, 340097, 340103, 340109, 340116, 340122, 340129, 340136, - 340144, 340148, 340153, 340158, 340164, 340169, 340175, 340181, - 340188, 340193, 340199, 340205, 340212, 340218, 340225, 340232, - 340240, 340245, 340251, 340257, 340264, 340270, 340277, 340284, - 340292, 340298, 340305, 340312, 340320, 340327, 340335, 340343, - 340352, 340356, 340361, 340366, 340372, 340377, 340383, 340389, - 340396, 340401, 340407, 340413, 340420, 340426, 340433, 340440, - 340448, 340453, 340459, 340465, 340472, 340478, 340485, 340492, - 340500, 340506, 340513, 340520, 340528, 340535, 340543, 340551, - 340560, 340565, 340571, 340577, 340584, 340590, 340597, 340604, - 340612, 340618, 340625, 340632, 340640, 340647, 340655, 340663, - 340672, 340678, 340685, 340692, 340700, 340707, 340715, 340723, - 340732, 340739, 340747, 340755, 340764, 340772, 340781, 340790, - 340800, 340804, 340809, 340814, 340820, 340825, 340831, 340837, - 340844, 340849, 340855, 340861, 340868, 340874, 340881, 340888, - 340896, 340901, 340907, 340913, 340920, 340926, 340933, 340940, - 340948, 340954, 340961, 340968, 340976, 340983, 340991, 340999, - 341008, 341013, 341019, 341025, 341032, 341038, 341045, 341052, - 341060, 341066, 341073, 341080, 341088, 341095, 341103, 341111, - 341120, 341126, 341133, 341140, 341148, 341155, 341163, 341171, - 341180, 341187, 341195, 341203, 341212, 341220, 341229, 341238, - 341248, 341253, 341259, 341265, 341272, 341278, 341285, 341292, - 341300, 341306, 341313, 341320, 341328, 341335, 341343, 341351, - 341360, 341366, 341373, 341380, 341388, 341395, 341403, 341411, - 341420, 341427, 341435, 341443, 341452, 341460, 341469, 341478, - 341488, 341494, 341501, 341508, 341516, 341523, 341531, 341539, - 341548, 341555, 341563, 341571, 341580, 341588, 341597, 341606, - 341616, 341623, 341631, 341639, 341648, 341656, 341665, 341674, - 341684, 341692, 341701, 341710, 341720, 341729, 341739, 341749, - 341760, 341764, 341769, 341774, 341780, 341785, 341791, 341797, - 341804, 341809, 341815, 341821, 341828, 341834, 341841, 341848, - 341856, 341861, 341867, 341873, 341880, 341886, 341893, 341900, - 341908, 341914, 341921, 341928, 341936, 341943, 341951, 341959, - 341968, 341973, 341979, 341985, 341992, 341998, 342005, 342012, - 342020, 342026, 342033, 342040, 342048, 342055, 342063, 342071, - 342080, 342086, 342093, 342100, 342108, 342115, 342123, 342131, - 342140, 342147, 342155, 342163, 342172, 342180, 342189, 342198, - 342208, 342213, 342219, 342225, 342232, 342238, 342245, 342252, - 342260, 342266, 342273, 342280, 342288, 342295, 342303, 342311, - 342320, 342326, 342333, 342340, 342348, 342355, 342363, 342371, - 342380, 342387, 342395, 342403, 342412, 342420, 342429, 342438, - 342448, 342454, 342461, 342468, 342476, 342483, 342491, 342499, - 342508, 342515, 342523, 342531, 342540, 342548, 342557, 342566, - 342576, 342583, 342591, 342599, 342608, 342616, 342625, 342634, - 342644, 342652, 342661, 342670, 342680, 342689, 342699, 342709, - 342720, 342725, 342731, 342737, 342744, 342750, 342757, 342764, - 342772, 342778, 342785, 342792, 342800, 342807, 342815, 342823, - 342832, 342838, 342845, 342852, 342860, 342867, 342875, 342883, - 342892, 342899, 342907, 342915, 342924, 342932, 342941, 342950, - 342960, 342966, 342973, 342980, 342988, 342995, 343003, 343011, - 343020, 343027, 343035, 343043, 343052, 343060, 343069, 343078, - 343088, 343095, 343103, 343111, 343120, 343128, 343137, 343146, - 343156, 343164, 343173, 343182, 343192, 343201, 343211, 343221, - 343232, 343238, 343245, 343252, 343260, 343267, 343275, 343283, - 343292, 343299, 343307, 343315, 343324, 343332, 343341, 343350, - 343360, 343367, 343375, 343383, 343392, 343400, 343409, 343418, - 343428, 343436, 343445, 343454, 343464, 343473, 343483, 343493, - 343504, 343511, 343519, 343527, 343536, 343544, 343553, 343562, - 343572, 343580, 343589, 343598, 343608, 343617, 343627, 343637, - 343648, 343656, 343665, 343674, 343684, 343693, 343703, 343713, - 343724, 343733, 343743, 343753, 343764, 343774, 343785, 343796, - 343808, 343812, 343817, 343822, 343828, 343833, 343839, 343845, - 343852, 343857, 343863, 343869, 343876, 343882, 343889, 343896, - 343904, 343909, 343915, 343921, 343928, 343934, 343941, 343948, - 343956, 343962, 343969, 343976, 343984, 343991, 343999, 344007, - 344016, 344021, 344027, 344033, 344040, 344046, 344053, 344060, - 344068, 344074, 344081, 344088, 344096, 344103, 344111, 344119, - 344128, 344134, 344141, 344148, 344156, 344163, 344171, 344179, - 344188, 344195, 344203, 344211, 344220, 344228, 344237, 344246, - 344256, 344261, 344267, 344273, 344280, 344286, 344293, 344300, - 344308, 344314, 344321, 344328, 344336, 344343, 344351, 344359, - 344368, 344374, 344381, 344388, 344396, 344403, 344411, 344419, - 344428, 344435, 344443, 344451, 344460, 344468, 344477, 344486, - 344496, 344502, 344509, 344516, 344524, 344531, 344539, 344547, - 344556, 344563, 344571, 344579, 344588, 344596, 344605, 344614, - 344624, 344631, 344639, 344647, 344656, 344664, 344673, 344682, - 344692, 344700, 344709, 344718, 344728, 344737, 344747, 344757, - 344768, 344773, 344779, 344785, 344792, 344798, 344805, 344812, - 344820, 344826, 344833, 344840, 344848, 344855, 344863, 344871, - 344880, 344886, 344893, 344900, 344908, 344915, 344923, 344931, - 344940, 344947, 344955, 344963, 344972, 344980, 344989, 344998, - 345008, 345014, 345021, 345028, 345036, 345043, 345051, 345059, - 345068, 345075, 345083, 345091, 345100, 345108, 345117, 345126, - 345136, 345143, 345151, 345159, 345168, 345176, 345185, 345194, - 345204, 345212, 345221, 345230, 345240, 345249, 345259, 345269, - 345280, 345286, 345293, 345300, 345308, 345315, 345323, 345331, - 345340, 345347, 345355, 345363, 345372, 345380, 345389, 345398, - 345408, 345415, 345423, 345431, 345440, 345448, 345457, 345466, - 345476, 345484, 345493, 345502, 345512, 345521, 345531, 345541, - 345552, 345559, 345567, 345575, 345584, 345592, 345601, 345610, - 345620, 345628, 345637, 345646, 345656, 345665, 345675, 345685, - 345696, 345704, 345713, 345722, 345732, 345741, 345751, 345761, - 345772, 345781, 345791, 345801, 345812, 345822, 345833, 345844, - 345856, 345861, 345867, 345873, 345880, 345886, 345893, 345900, - 345908, 345914, 345921, 345928, 345936, 345943, 345951, 345959, - 345968, 345974, 345981, 345988, 345996, 346003, 346011, 346019, - 346028, 346035, 346043, 346051, 346060, 346068, 346077, 346086, - 346096, 346102, 346109, 346116, 346124, 346131, 346139, 346147, - 346156, 346163, 346171, 346179, 346188, 346196, 346205, 346214, - 346224, 346231, 346239, 346247, 346256, 346264, 346273, 346282, - 346292, 346300, 346309, 346318, 346328, 346337, 346347, 346357, - 346368, 346374, 346381, 346388, 346396, 346403, 346411, 346419, - 346428, 346435, 346443, 346451, 346460, 346468, 346477, 346486, - 346496, 346503, 346511, 346519, 346528, 346536, 346545, 346554, - 346564, 346572, 346581, 346590, 346600, 346609, 346619, 346629, - 346640, 346647, 346655, 346663, 346672, 346680, 346689, 346698, - 346708, 346716, 346725, 346734, 346744, 346753, 346763, 346773, - 346784, 346792, 346801, 346810, 346820, 346829, 346839, 346849, - 346860, 346869, 346879, 346889, 346900, 346910, 346921, 346932, - 346944, 346950, 346957, 346964, 346972, 346979, 346987, 346995, - 347004, 347011, 347019, 347027, 347036, 347044, 347053, 347062, - 347072, 347079, 347087, 347095, 347104, 347112, 347121, 347130, - 347140, 347148, 347157, 347166, 347176, 347185, 347195, 347205, - 347216, 347223, 347231, 347239, 347248, 347256, 347265, 347274, - 347284, 347292, 347301, 347310, 347320, 347329, 347339, 347349, - 347360, 347368, 347377, 347386, 347396, 347405, 347415, 347425, - 347436, 347445, 347455, 347465, 347476, 347486, 347497, 347508, - 347520, 347527, 347535, 347543, 347552, 347560, 347569, 347578, - 347588, 347596, 347605, 347614, 347624, 347633, 347643, 347653, - 347664, 347672, 347681, 347690, 347700, 347709, 347719, 347729, - 347740, 347749, 347759, 347769, 347780, 347790, 347801, 347812, - 347824, 347832, 347841, 347850, 347860, 347869, 347879, 347889, - 347900, 347909, 347919, 347929, 347940, 347950, 347961, 347972, - 347984, 347993, 348003, 348013, 348024, 348034, 348045, 348056, - 348068, 348078, 348089, 348100, 348112, 348123, 348135, 348147, - 348160, 348164, 348169, 348174, 348180, 348185, 348191, 348197, - 348204, 348209, 348215, 348221, 348228, 348234, 348241, 348248, - 348256, 348261, 348267, 348273, 348280, 348286, 348293, 348300, - 348308, 348314, 348321, 348328, 348336, 348343, 348351, 348359, - 348368, 348373, 348379, 348385, 348392, 348398, 348405, 348412, - 348420, 348426, 348433, 348440, 348448, 348455, 348463, 348471, - 348480, 348486, 348493, 348500, 348508, 348515, 348523, 348531, - 348540, 348547, 348555, 348563, 348572, 348580, 348589, 348598, - 348608, 348613, 348619, 348625, 348632, 348638, 348645, 348652, - 348660, 348666, 348673, 348680, 348688, 348695, 348703, 348711, - 348720, 348726, 348733, 348740, 348748, 348755, 348763, 348771, - 348780, 348787, 348795, 348803, 348812, 348820, 348829, 348838, - 348848, 348854, 348861, 348868, 348876, 348883, 348891, 348899, - 348908, 348915, 348923, 348931, 348940, 348948, 348957, 348966, - 348976, 348983, 348991, 348999, 349008, 349016, 349025, 349034, - 349044, 349052, 349061, 349070, 349080, 349089, 349099, 349109, - 349120, 349125, 349131, 349137, 349144, 349150, 349157, 349164, - 349172, 349178, 349185, 349192, 349200, 349207, 349215, 349223, - 349232, 349238, 349245, 349252, 349260, 349267, 349275, 349283, - 349292, 349299, 349307, 349315, 349324, 349332, 349341, 349350, - 349360, 349366, 349373, 349380, 349388, 349395, 349403, 349411, - 349420, 349427, 349435, 349443, 349452, 349460, 349469, 349478, - 349488, 349495, 349503, 349511, 349520, 349528, 349537, 349546, - 349556, 349564, 349573, 349582, 349592, 349601, 349611, 349621, - 349632, 349638, 349645, 349652, 349660, 349667, 349675, 349683, - 349692, 349699, 349707, 349715, 349724, 349732, 349741, 349750, - 349760, 349767, 349775, 349783, 349792, 349800, 349809, 349818, - 349828, 349836, 349845, 349854, 349864, 349873, 349883, 349893, - 349904, 349911, 349919, 349927, 349936, 349944, 349953, 349962, - 349972, 349980, 349989, 349998, 350008, 350017, 350027, 350037, - 350048, 350056, 350065, 350074, 350084, 350093, 350103, 350113, - 350124, 350133, 350143, 350153, 350164, 350174, 350185, 350196, - 350208, 350213, 350219, 350225, 350232, 350238, 350245, 350252, - 350260, 350266, 350273, 350280, 350288, 350295, 350303, 350311, - 350320, 350326, 350333, 350340, 350348, 350355, 350363, 350371, - 350380, 350387, 350395, 350403, 350412, 350420, 350429, 350438, - 350448, 350454, 350461, 350468, 350476, 350483, 350491, 350499, - 350508, 350515, 350523, 350531, 350540, 350548, 350557, 350566, - 350576, 350583, 350591, 350599, 350608, 350616, 350625, 350634, - 350644, 350652, 350661, 350670, 350680, 350689, 350699, 350709, - 350720, 350726, 350733, 350740, 350748, 350755, 350763, 350771, - 350780, 350787, 350795, 350803, 350812, 350820, 350829, 350838, - 350848, 350855, 350863, 350871, 350880, 350888, 350897, 350906, - 350916, 350924, 350933, 350942, 350952, 350961, 350971, 350981, - 350992, 350999, 351007, 351015, 351024, 351032, 351041, 351050, - 351060, 351068, 351077, 351086, 351096, 351105, 351115, 351125, - 351136, 351144, 351153, 351162, 351172, 351181, 351191, 351201, - 351212, 351221, 351231, 351241, 351252, 351262, 351273, 351284, - 351296, 351302, 351309, 351316, 351324, 351331, 351339, 351347, - 351356, 351363, 351371, 351379, 351388, 351396, 351405, 351414, - 351424, 351431, 351439, 351447, 351456, 351464, 351473, 351482, - 351492, 351500, 351509, 351518, 351528, 351537, 351547, 351557, - 351568, 351575, 351583, 351591, 351600, 351608, 351617, 351626, - 351636, 351644, 351653, 351662, 351672, 351681, 351691, 351701, - 351712, 351720, 351729, 351738, 351748, 351757, 351767, 351777, - 351788, 351797, 351807, 351817, 351828, 351838, 351849, 351860, - 351872, 351879, 351887, 351895, 351904, 351912, 351921, 351930, - 351940, 351948, 351957, 351966, 351976, 351985, 351995, 352005, - 352016, 352024, 352033, 352042, 352052, 352061, 352071, 352081, - 352092, 352101, 352111, 352121, 352132, 352142, 352153, 352164, - 352176, 352184, 352193, 352202, 352212, 352221, 352231, 352241, - 352252, 352261, 352271, 352281, 352292, 352302, 352313, 352324, - 352336, 352345, 352355, 352365, 352376, 352386, 352397, 352408, - 352420, 352430, 352441, 352452, 352464, 352475, 352487, 352499, - 352512, 352517, 352523, 352529, 352536, 352542, 352549, 352556, - 352564, 352570, 352577, 352584, 352592, 352599, 352607, 352615, - 352624, 352630, 352637, 352644, 352652, 352659, 352667, 352675, - 352684, 352691, 352699, 352707, 352716, 352724, 352733, 352742, - 352752, 352758, 352765, 352772, 352780, 352787, 352795, 352803, - 352812, 352819, 352827, 352835, 352844, 352852, 352861, 352870, - 352880, 352887, 352895, 352903, 352912, 352920, 352929, 352938, - 352948, 352956, 352965, 352974, 352984, 352993, 353003, 353013, - 353024, 353030, 353037, 353044, 353052, 353059, 353067, 353075, - 353084, 353091, 353099, 353107, 353116, 353124, 353133, 353142, - 353152, 353159, 353167, 353175, 353184, 353192, 353201, 353210, - 353220, 353228, 353237, 353246, 353256, 353265, 353275, 353285, - 353296, 353303, 353311, 353319, 353328, 353336, 353345, 353354, - 353364, 353372, 353381, 353390, 353400, 353409, 353419, 353429, - 353440, 353448, 353457, 353466, 353476, 353485, 353495, 353505, - 353516, 353525, 353535, 353545, 353556, 353566, 353577, 353588, - 353600, 353606, 353613, 353620, 353628, 353635, 353643, 353651, - 353660, 353667, 353675, 353683, 353692, 353700, 353709, 353718, - 353728, 353735, 353743, 353751, 353760, 353768, 353777, 353786, - 353796, 353804, 353813, 353822, 353832, 353841, 353851, 353861, - 353872, 353879, 353887, 353895, 353904, 353912, 353921, 353930, - 353940, 353948, 353957, 353966, 353976, 353985, 353995, 354005, - 354016, 354024, 354033, 354042, 354052, 354061, 354071, 354081, - 354092, 354101, 354111, 354121, 354132, 354142, 354153, 354164, - 354176, 354183, 354191, 354199, 354208, 354216, 354225, 354234, - 354244, 354252, 354261, 354270, 354280, 354289, 354299, 354309, - 354320, 354328, 354337, 354346, 354356, 354365, 354375, 354385, - 354396, 354405, 354415, 354425, 354436, 354446, 354457, 354468, - 354480, 354488, 354497, 354506, 354516, 354525, 354535, 354545, - 354556, 354565, 354575, 354585, 354596, 354606, 354617, 354628, - 354640, 354649, 354659, 354669, 354680, 354690, 354701, 354712, - 354724, 354734, 354745, 354756, 354768, 354779, 354791, 354803, - 354816, 354822, 354829, 354836, 354844, 354851, 354859, 354867, - 354876, 354883, 354891, 354899, 354908, 354916, 354925, 354934, - 354944, 354951, 354959, 354967, 354976, 354984, 354993, 355002, - 355012, 355020, 355029, 355038, 355048, 355057, 355067, 355077, - 355088, 355095, 355103, 355111, 355120, 355128, 355137, 355146, - 355156, 355164, 355173, 355182, 355192, 355201, 355211, 355221, - 355232, 355240, 355249, 355258, 355268, 355277, 355287, 355297, - 355308, 355317, 355327, 355337, 355348, 355358, 355369, 355380, - 355392, 355399, 355407, 355415, 355424, 355432, 355441, 355450, - 355460, 355468, 355477, 355486, 355496, 355505, 355515, 355525, - 355536, 355544, 355553, 355562, 355572, 355581, 355591, 355601, - 355612, 355621, 355631, 355641, 355652, 355662, 355673, 355684, - 355696, 355704, 355713, 355722, 355732, 355741, 355751, 355761, - 355772, 355781, 355791, 355801, 355812, 355822, 355833, 355844, - 355856, 355865, 355875, 355885, 355896, 355906, 355917, 355928, - 355940, 355950, 355961, 355972, 355984, 355995, 356007, 356019, - 356032, 356039, 356047, 356055, 356064, 356072, 356081, 356090, - 356100, 356108, 356117, 356126, 356136, 356145, 356155, 356165, - 356176, 356184, 356193, 356202, 356212, 356221, 356231, 356241, - 356252, 356261, 356271, 356281, 356292, 356302, 356313, 356324, - 356336, 356344, 356353, 356362, 356372, 356381, 356391, 356401, - 356412, 356421, 356431, 356441, 356452, 356462, 356473, 356484, - 356496, 356505, 356515, 356525, 356536, 356546, 356557, 356568, - 356580, 356590, 356601, 356612, 356624, 356635, 356647, 356659, - 356672, 356680, 356689, 356698, 356708, 356717, 356727, 356737, - 356748, 356757, 356767, 356777, 356788, 356798, 356809, 356820, - 356832, 356841, 356851, 356861, 356872, 356882, 356893, 356904, - 356916, 356926, 356937, 356948, 356960, 356971, 356983, 356995, - 357008, 357017, 357027, 357037, 357048, 357058, 357069, 357080, - 357092, 357102, 357113, 357124, 357136, 357147, 357159, 357171, - 357184, 357194, 357205, 357216, 357228, 357239, 357251, 357263, - 357276, 357287, 357299, 357311, 357324, 357336, 357349, 357362, - 357376, 357380, 357385, 357390, 357396, 357401, 357407, 357413, - 357420, 357425, 357431, 357437, 357444, 357450, 357457, 357464, - 357472, 357477, 357483, 357489, 357496, 357502, 357509, 357516, - 357524, 357530, 357537, 357544, 357552, 357559, 357567, 357575, - 357584, 357589, 357595, 357601, 357608, 357614, 357621, 357628, - 357636, 357642, 357649, 357656, 357664, 357671, 357679, 357687, - 357696, 357702, 357709, 357716, 357724, 357731, 357739, 357747, - 357756, 357763, 357771, 357779, 357788, 357796, 357805, 357814, - 357824, 357829, 357835, 357841, 357848, 357854, 357861, 357868, - 357876, 357882, 357889, 357896, 357904, 357911, 357919, 357927, - 357936, 357942, 357949, 357956, 357964, 357971, 357979, 357987, - 357996, 358003, 358011, 358019, 358028, 358036, 358045, 358054, - 358064, 358070, 358077, 358084, 358092, 358099, 358107, 358115, - 358124, 358131, 358139, 358147, 358156, 358164, 358173, 358182, - 358192, 358199, 358207, 358215, 358224, 358232, 358241, 358250, - 358260, 358268, 358277, 358286, 358296, 358305, 358315, 358325, - 358336, 358341, 358347, 358353, 358360, 358366, 358373, 358380, - 358388, 358394, 358401, 358408, 358416, 358423, 358431, 358439, - 358448, 358454, 358461, 358468, 358476, 358483, 358491, 358499, - 358508, 358515, 358523, 358531, 358540, 358548, 358557, 358566, - 358576, 358582, 358589, 358596, 358604, 358611, 358619, 358627, - 358636, 358643, 358651, 358659, 358668, 358676, 358685, 358694, - 358704, 358711, 358719, 358727, 358736, 358744, 358753, 358762, - 358772, 358780, 358789, 358798, 358808, 358817, 358827, 358837, - 358848, 358854, 358861, 358868, 358876, 358883, 358891, 358899, - 358908, 358915, 358923, 358931, 358940, 358948, 358957, 358966, - 358976, 358983, 358991, 358999, 359008, 359016, 359025, 359034, - 359044, 359052, 359061, 359070, 359080, 359089, 359099, 359109, - 359120, 359127, 359135, 359143, 359152, 359160, 359169, 359178, - 359188, 359196, 359205, 359214, 359224, 359233, 359243, 359253, - 359264, 359272, 359281, 359290, 359300, 359309, 359319, 359329, - 359340, 359349, 359359, 359369, 359380, 359390, 359401, 359412, - 359424, 359429, 359435, 359441, 359448, 359454, 359461, 359468, - 359476, 359482, 359489, 359496, 359504, 359511, 359519, 359527, - 359536, 359542, 359549, 359556, 359564, 359571, 359579, 359587, - 359596, 359603, 359611, 359619, 359628, 359636, 359645, 359654, - 359664, 359670, 359677, 359684, 359692, 359699, 359707, 359715, - 359724, 359731, 359739, 359747, 359756, 359764, 359773, 359782, - 359792, 359799, 359807, 359815, 359824, 359832, 359841, 359850, - 359860, 359868, 359877, 359886, 359896, 359905, 359915, 359925, - 359936, 359942, 359949, 359956, 359964, 359971, 359979, 359987, - 359996, 360003, 360011, 360019, 360028, 360036, 360045, 360054, - 360064, 360071, 360079, 360087, 360096, 360104, 360113, 360122, - 360132, 360140, 360149, 360158, 360168, 360177, 360187, 360197, - 360208, 360215, 360223, 360231, 360240, 360248, 360257, 360266, - 360276, 360284, 360293, 360302, 360312, 360321, 360331, 360341, - 360352, 360360, 360369, 360378, 360388, 360397, 360407, 360417, - 360428, 360437, 360447, 360457, 360468, 360478, 360489, 360500, - 360512, 360518, 360525, 360532, 360540, 360547, 360555, 360563, - 360572, 360579, 360587, 360595, 360604, 360612, 360621, 360630, - 360640, 360647, 360655, 360663, 360672, 360680, 360689, 360698, - 360708, 360716, 360725, 360734, 360744, 360753, 360763, 360773, - 360784, 360791, 360799, 360807, 360816, 360824, 360833, 360842, - 360852, 360860, 360869, 360878, 360888, 360897, 360907, 360917, - 360928, 360936, 360945, 360954, 360964, 360973, 360983, 360993, - 361004, 361013, 361023, 361033, 361044, 361054, 361065, 361076, - 361088, 361095, 361103, 361111, 361120, 361128, 361137, 361146, - 361156, 361164, 361173, 361182, 361192, 361201, 361211, 361221, - 361232, 361240, 361249, 361258, 361268, 361277, 361287, 361297, - 361308, 361317, 361327, 361337, 361348, 361358, 361369, 361380, - 361392, 361400, 361409, 361418, 361428, 361437, 361447, 361457, - 361468, 361477, 361487, 361497, 361508, 361518, 361529, 361540, - 361552, 361561, 361571, 361581, 361592, 361602, 361613, 361624, - 361636, 361646, 361657, 361668, 361680, 361691, 361703, 361715, - 361728, 361733, 361739, 361745, 361752, 361758, 361765, 361772, - 361780, 361786, 361793, 361800, 361808, 361815, 361823, 361831, - 361840, 361846, 361853, 361860, 361868, 361875, 361883, 361891, - 361900, 361907, 361915, 361923, 361932, 361940, 361949, 361958, - 361968, 361974, 361981, 361988, 361996, 362003, 362011, 362019, - 362028, 362035, 362043, 362051, 362060, 362068, 362077, 362086, - 362096, 362103, 362111, 362119, 362128, 362136, 362145, 362154, - 362164, 362172, 362181, 362190, 362200, 362209, 362219, 362229, - 362240, 362246, 362253, 362260, 362268, 362275, 362283, 362291, - 362300, 362307, 362315, 362323, 362332, 362340, 362349, 362358, - 362368, 362375, 362383, 362391, 362400, 362408, 362417, 362426, - 362436, 362444, 362453, 362462, 362472, 362481, 362491, 362501, - 362512, 362519, 362527, 362535, 362544, 362552, 362561, 362570, - 362580, 362588, 362597, 362606, 362616, 362625, 362635, 362645, - 362656, 362664, 362673, 362682, 362692, 362701, 362711, 362721, - 362732, 362741, 362751, 362761, 362772, 362782, 362793, 362804, - 362816, 362822, 362829, 362836, 362844, 362851, 362859, 362867, - 362876, 362883, 362891, 362899, 362908, 362916, 362925, 362934, - 362944, 362951, 362959, 362967, 362976, 362984, 362993, 363002, - 363012, 363020, 363029, 363038, 363048, 363057, 363067, 363077, - 363088, 363095, 363103, 363111, 363120, 363128, 363137, 363146, - 363156, 363164, 363173, 363182, 363192, 363201, 363211, 363221, - 363232, 363240, 363249, 363258, 363268, 363277, 363287, 363297, - 363308, 363317, 363327, 363337, 363348, 363358, 363369, 363380, - 363392, 363399, 363407, 363415, 363424, 363432, 363441, 363450, - 363460, 363468, 363477, 363486, 363496, 363505, 363515, 363525, - 363536, 363544, 363553, 363562, 363572, 363581, 363591, 363601, - 363612, 363621, 363631, 363641, 363652, 363662, 363673, 363684, - 363696, 363704, 363713, 363722, 363732, 363741, 363751, 363761, - 363772, 363781, 363791, 363801, 363812, 363822, 363833, 363844, - 363856, 363865, 363875, 363885, 363896, 363906, 363917, 363928, - 363940, 363950, 363961, 363972, 363984, 363995, 364007, 364019, - 364032, 364038, 364045, 364052, 364060, 364067, 364075, 364083, - 364092, 364099, 364107, 364115, 364124, 364132, 364141, 364150, - 364160, 364167, 364175, 364183, 364192, 364200, 364209, 364218, - 364228, 364236, 364245, 364254, 364264, 364273, 364283, 364293, - 364304, 364311, 364319, 364327, 364336, 364344, 364353, 364362, - 364372, 364380, 364389, 364398, 364408, 364417, 364427, 364437, - 364448, 364456, 364465, 364474, 364484, 364493, 364503, 364513, - 364524, 364533, 364543, 364553, 364564, 364574, 364585, 364596, - 364608, 364615, 364623, 364631, 364640, 364648, 364657, 364666, - 364676, 364684, 364693, 364702, 364712, 364721, 364731, 364741, - 364752, 364760, 364769, 364778, 364788, 364797, 364807, 364817, - 364828, 364837, 364847, 364857, 364868, 364878, 364889, 364900, - 364912, 364920, 364929, 364938, 364948, 364957, 364967, 364977, - 364988, 364997, 365007, 365017, 365028, 365038, 365049, 365060, - 365072, 365081, 365091, 365101, 365112, 365122, 365133, 365144, - 365156, 365166, 365177, 365188, 365200, 365211, 365223, 365235, - 365248, 365255, 365263, 365271, 365280, 365288, 365297, 365306, - 365316, 365324, 365333, 365342, 365352, 365361, 365371, 365381, - 365392, 365400, 365409, 365418, 365428, 365437, 365447, 365457, - 365468, 365477, 365487, 365497, 365508, 365518, 365529, 365540, - 365552, 365560, 365569, 365578, 365588, 365597, 365607, 365617, - 365628, 365637, 365647, 365657, 365668, 365678, 365689, 365700, - 365712, 365721, 365731, 365741, 365752, 365762, 365773, 365784, - 365796, 365806, 365817, 365828, 365840, 365851, 365863, 365875, - 365888, 365896, 365905, 365914, 365924, 365933, 365943, 365953, - 365964, 365973, 365983, 365993, 366004, 366014, 366025, 366036, - 366048, 366057, 366067, 366077, 366088, 366098, 366109, 366120, - 366132, 366142, 366153, 366164, 366176, 366187, 366199, 366211, - 366224, 366233, 366243, 366253, 366264, 366274, 366285, 366296, - 366308, 366318, 366329, 366340, 366352, 366363, 366375, 366387, - 366400, 366410, 366421, 366432, 366444, 366455, 366467, 366479, - 366492, 366503, 366515, 366527, 366540, 366552, 366565, 366578, - 366592, 366597, 366603, 366609, 366616, 366622, 366629, 366636, - 366644, 366650, 366657, 366664, 366672, 366679, 366687, 366695, - 366704, 366710, 366717, 366724, 366732, 366739, 366747, 366755, - 366764, 366771, 366779, 366787, 366796, 366804, 366813, 366822, - 366832, 366838, 366845, 366852, 366860, 366867, 366875, 366883, - 366892, 366899, 366907, 366915, 366924, 366932, 366941, 366950, - 366960, 366967, 366975, 366983, 366992, 367000, 367009, 367018, - 367028, 367036, 367045, 367054, 367064, 367073, 367083, 367093, - 367104, 367110, 367117, 367124, 367132, 367139, 367147, 367155, - 367164, 367171, 367179, 367187, 367196, 367204, 367213, 367222, - 367232, 367239, 367247, 367255, 367264, 367272, 367281, 367290, - 367300, 367308, 367317, 367326, 367336, 367345, 367355, 367365, - 367376, 367383, 367391, 367399, 367408, 367416, 367425, 367434, - 367444, 367452, 367461, 367470, 367480, 367489, 367499, 367509, - 367520, 367528, 367537, 367546, 367556, 367565, 367575, 367585, - 367596, 367605, 367615, 367625, 367636, 367646, 367657, 367668, - 367680, 367686, 367693, 367700, 367708, 367715, 367723, 367731, - 367740, 367747, 367755, 367763, 367772, 367780, 367789, 367798, - 367808, 367815, 367823, 367831, 367840, 367848, 367857, 367866, - 367876, 367884, 367893, 367902, 367912, 367921, 367931, 367941, - 367952, 367959, 367967, 367975, 367984, 367992, 368001, 368010, - 368020, 368028, 368037, 368046, 368056, 368065, 368075, 368085, - 368096, 368104, 368113, 368122, 368132, 368141, 368151, 368161, - 368172, 368181, 368191, 368201, 368212, 368222, 368233, 368244, - 368256, 368263, 368271, 368279, 368288, 368296, 368305, 368314, - 368324, 368332, 368341, 368350, 368360, 368369, 368379, 368389, - 368400, 368408, 368417, 368426, 368436, 368445, 368455, 368465, - 368476, 368485, 368495, 368505, 368516, 368526, 368537, 368548, - 368560, 368568, 368577, 368586, 368596, 368605, 368615, 368625, - 368636, 368645, 368655, 368665, 368676, 368686, 368697, 368708, - 368720, 368729, 368739, 368749, 368760, 368770, 368781, 368792, - 368804, 368814, 368825, 368836, 368848, 368859, 368871, 368883, - 368896, 368902, 368909, 368916, 368924, 368931, 368939, 368947, - 368956, 368963, 368971, 368979, 368988, 368996, 369005, 369014, - 369024, 369031, 369039, 369047, 369056, 369064, 369073, 369082, - 369092, 369100, 369109, 369118, 369128, 369137, 369147, 369157, - 369168, 369175, 369183, 369191, 369200, 369208, 369217, 369226, - 369236, 369244, 369253, 369262, 369272, 369281, 369291, 369301, - 369312, 369320, 369329, 369338, 369348, 369357, 369367, 369377, - 369388, 369397, 369407, 369417, 369428, 369438, 369449, 369460, - 369472, 369479, 369487, 369495, 369504, 369512, 369521, 369530, - 369540, 369548, 369557, 369566, 369576, 369585, 369595, 369605, - 369616, 369624, 369633, 369642, 369652, 369661, 369671, 369681, - 369692, 369701, 369711, 369721, 369732, 369742, 369753, 369764, - 369776, 369784, 369793, 369802, 369812, 369821, 369831, 369841, - 369852, 369861, 369871, 369881, 369892, 369902, 369913, 369924, - 369936, 369945, 369955, 369965, 369976, 369986, 369997, 370008, - 370020, 370030, 370041, 370052, 370064, 370075, 370087, 370099, - 370112, 370119, 370127, 370135, 370144, 370152, 370161, 370170, - 370180, 370188, 370197, 370206, 370216, 370225, 370235, 370245, - 370256, 370264, 370273, 370282, 370292, 370301, 370311, 370321, - 370332, 370341, 370351, 370361, 370372, 370382, 370393, 370404, - 370416, 370424, 370433, 370442, 370452, 370461, 370471, 370481, - 370492, 370501, 370511, 370521, 370532, 370542, 370553, 370564, - 370576, 370585, 370595, 370605, 370616, 370626, 370637, 370648, - 370660, 370670, 370681, 370692, 370704, 370715, 370727, 370739, - 370752, 370760, 370769, 370778, 370788, 370797, 370807, 370817, - 370828, 370837, 370847, 370857, 370868, 370878, 370889, 370900, - 370912, 370921, 370931, 370941, 370952, 370962, 370973, 370984, - 370996, 371006, 371017, 371028, 371040, 371051, 371063, 371075, - 371088, 371097, 371107, 371117, 371128, 371138, 371149, 371160, - 371172, 371182, 371193, 371204, 371216, 371227, 371239, 371251, - 371264, 371274, 371285, 371296, 371308, 371319, 371331, 371343, - 371356, 371367, 371379, 371391, 371404, 371416, 371429, 371442, - 371456, 371462, 371469, 371476, 371484, 371491, 371499, 371507, - 371516, 371523, 371531, 371539, 371548, 371556, 371565, 371574, - 371584, 371591, 371599, 371607, 371616, 371624, 371633, 371642, - 371652, 371660, 371669, 371678, 371688, 371697, 371707, 371717, - 371728, 371735, 371743, 371751, 371760, 371768, 371777, 371786, - 371796, 371804, 371813, 371822, 371832, 371841, 371851, 371861, - 371872, 371880, 371889, 371898, 371908, 371917, 371927, 371937, - 371948, 371957, 371967, 371977, 371988, 371998, 372009, 372020, - 372032, 372039, 372047, 372055, 372064, 372072, 372081, 372090, - 372100, 372108, 372117, 372126, 372136, 372145, 372155, 372165, - 372176, 372184, 372193, 372202, 372212, 372221, 372231, 372241, - 372252, 372261, 372271, 372281, 372292, 372302, 372313, 372324, - 372336, 372344, 372353, 372362, 372372, 372381, 372391, 372401, - 372412, 372421, 372431, 372441, 372452, 372462, 372473, 372484, - 372496, 372505, 372515, 372525, 372536, 372546, 372557, 372568, - 372580, 372590, 372601, 372612, 372624, 372635, 372647, 372659, - 372672, 372679, 372687, 372695, 372704, 372712, 372721, 372730, - 372740, 372748, 372757, 372766, 372776, 372785, 372795, 372805, - 372816, 372824, 372833, 372842, 372852, 372861, 372871, 372881, - 372892, 372901, 372911, 372921, 372932, 372942, 372953, 372964, - 372976, 372984, 372993, 373002, 373012, 373021, 373031, 373041, - 373052, 373061, 373071, 373081, 373092, 373102, 373113, 373124, - 373136, 373145, 373155, 373165, 373176, 373186, 373197, 373208, - 373220, 373230, 373241, 373252, 373264, 373275, 373287, 373299, - 373312, 373320, 373329, 373338, 373348, 373357, 373367, 373377, - 373388, 373397, 373407, 373417, 373428, 373438, 373449, 373460, - 373472, 373481, 373491, 373501, 373512, 373522, 373533, 373544, - 373556, 373566, 373577, 373588, 373600, 373611, 373623, 373635, - 373648, 373657, 373667, 373677, 373688, 373698, 373709, 373720, - 373732, 373742, 373753, 373764, 373776, 373787, 373799, 373811, - 373824, 373834, 373845, 373856, 373868, 373879, 373891, 373903, - 373916, 373927, 373939, 373951, 373964, 373976, 373989, 374002, - 374016, 374023, 374031, 374039, 374048, 374056, 374065, 374074, - 374084, 374092, 374101, 374110, 374120, 374129, 374139, 374149, - 374160, 374168, 374177, 374186, 374196, 374205, 374215, 374225, - 374236, 374245, 374255, 374265, 374276, 374286, 374297, 374308, - 374320, 374328, 374337, 374346, 374356, 374365, 374375, 374385, - 374396, 374405, 374415, 374425, 374436, 374446, 374457, 374468, - 374480, 374489, 374499, 374509, 374520, 374530, 374541, 374552, - 374564, 374574, 374585, 374596, 374608, 374619, 374631, 374643, - 374656, 374664, 374673, 374682, 374692, 374701, 374711, 374721, - 374732, 374741, 374751, 374761, 374772, 374782, 374793, 374804, - 374816, 374825, 374835, 374845, 374856, 374866, 374877, 374888, - 374900, 374910, 374921, 374932, 374944, 374955, 374967, 374979, - 374992, 375001, 375011, 375021, 375032, 375042, 375053, 375064, - 375076, 375086, 375097, 375108, 375120, 375131, 375143, 375155, - 375168, 375178, 375189, 375200, 375212, 375223, 375235, 375247, - 375260, 375271, 375283, 375295, 375308, 375320, 375333, 375346, - 375360, 375368, 375377, 375386, 375396, 375405, 375415, 375425, - 375436, 375445, 375455, 375465, 375476, 375486, 375497, 375508, - 375520, 375529, 375539, 375549, 375560, 375570, 375581, 375592, - 375604, 375614, 375625, 375636, 375648, 375659, 375671, 375683, - 375696, 375705, 375715, 375725, 375736, 375746, 375757, 375768, - 375780, 375790, 375801, 375812, 375824, 375835, 375847, 375859, - 375872, 375882, 375893, 375904, 375916, 375927, 375939, 375951, - 375964, 375975, 375987, 375999, 376012, 376024, 376037, 376050, - 376064, 376073, 376083, 376093, 376104, 376114, 376125, 376136, - 376148, 376158, 376169, 376180, 376192, 376203, 376215, 376227, - 376240, 376250, 376261, 376272, 376284, 376295, 376307, 376319, - 376332, 376343, 376355, 376367, 376380, 376392, 376405, 376418, - 376432, 376442, 376453, 376464, 376476, 376487, 376499, 376511, - 376524, 376535, 376547, 376559, 376572, 376584, 376597, 376610, - 376624, 376635, 376647, 376659, 376672, 376684, 376697, 376710, - 376724, 376736, 376749, 376762, 376776, 376789, 376803, 376817, - 376832, 376834, 376837, 376840, 376844, 376847, 376851, 376855, - 376860, 376863, 376867, 376871, 376876, 376880, 376885, 376890, - 376896, 376899, 376903, 376907, 376912, 376916, 376921, 376926, - 376932, 376936, 376941, 376946, 376952, 376957, 376963, 376969, - 376976, 376979, 376983, 376987, 376992, 376996, 377001, 377006, - 377012, 377016, 377021, 377026, 377032, 377037, 377043, 377049, - 377056, 377060, 377065, 377070, 377076, 377081, 377087, 377093, - 377100, 377105, 377111, 377117, 377124, 377130, 377137, 377144, - 377152, 377155, 377159, 377163, 377168, 377172, 377177, 377182, - 377188, 377192, 377197, 377202, 377208, 377213, 377219, 377225, - 377232, 377236, 377241, 377246, 377252, 377257, 377263, 377269, - 377276, 377281, 377287, 377293, 377300, 377306, 377313, 377320, - 377328, 377332, 377337, 377342, 377348, 377353, 377359, 377365, - 377372, 377377, 377383, 377389, 377396, 377402, 377409, 377416, - 377424, 377429, 377435, 377441, 377448, 377454, 377461, 377468, - 377476, 377482, 377489, 377496, 377504, 377511, 377519, 377527, - 377536, 377539, 377543, 377547, 377552, 377556, 377561, 377566, - 377572, 377576, 377581, 377586, 377592, 377597, 377603, 377609, - 377616, 377620, 377625, 377630, 377636, 377641, 377647, 377653, - 377660, 377665, 377671, 377677, 377684, 377690, 377697, 377704, - 377712, 377716, 377721, 377726, 377732, 377737, 377743, 377749, - 377756, 377761, 377767, 377773, 377780, 377786, 377793, 377800, - 377808, 377813, 377819, 377825, 377832, 377838, 377845, 377852, - 377860, 377866, 377873, 377880, 377888, 377895, 377903, 377911, - 377920, 377924, 377929, 377934, 377940, 377945, 377951, 377957, - 377964, 377969, 377975, 377981, 377988, 377994, 378001, 378008, - 378016, 378021, 378027, 378033, 378040, 378046, 378053, 378060, - 378068, 378074, 378081, 378088, 378096, 378103, 378111, 378119, - 378128, 378133, 378139, 378145, 378152, 378158, 378165, 378172, - 378180, 378186, 378193, 378200, 378208, 378215, 378223, 378231, - 378240, 378246, 378253, 378260, 378268, 378275, 378283, 378291, - 378300, 378307, 378315, 378323, 378332, 378340, 378349, 378358, - 378368, 378371, 378375, 378379, 378384, 378388, 378393, 378398, - 378404, 378408, 378413, 378418, 378424, 378429, 378435, 378441, - 378448, 378452, 378457, 378462, 378468, 378473, 378479, 378485, - 378492, 378497, 378503, 378509, 378516, 378522, 378529, 378536, - 378544, 378548, 378553, 378558, 378564, 378569, 378575, 378581, - 378588, 378593, 378599, 378605, 378612, 378618, 378625, 378632, - 378640, 378645, 378651, 378657, 378664, 378670, 378677, 378684, - 378692, 378698, 378705, 378712, 378720, 378727, 378735, 378743, - 378752, 378756, 378761, 378766, 378772, 378777, 378783, 378789, - 378796, 378801, 378807, 378813, 378820, 378826, 378833, 378840, - 378848, 378853, 378859, 378865, 378872, 378878, 378885, 378892, - 378900, 378906, 378913, 378920, 378928, 378935, 378943, 378951, - 378960, 378965, 378971, 378977, 378984, 378990, 378997, 379004, - 379012, 379018, 379025, 379032, 379040, 379047, 379055, 379063, - 379072, 379078, 379085, 379092, 379100, 379107, 379115, 379123, - 379132, 379139, 379147, 379155, 379164, 379172, 379181, 379190, - 379200, 379204, 379209, 379214, 379220, 379225, 379231, 379237, - 379244, 379249, 379255, 379261, 379268, 379274, 379281, 379288, - 379296, 379301, 379307, 379313, 379320, 379326, 379333, 379340, - 379348, 379354, 379361, 379368, 379376, 379383, 379391, 379399, - 379408, 379413, 379419, 379425, 379432, 379438, 379445, 379452, - 379460, 379466, 379473, 379480, 379488, 379495, 379503, 379511, - 379520, 379526, 379533, 379540, 379548, 379555, 379563, 379571, - 379580, 379587, 379595, 379603, 379612, 379620, 379629, 379638, - 379648, 379653, 379659, 379665, 379672, 379678, 379685, 379692, - 379700, 379706, 379713, 379720, 379728, 379735, 379743, 379751, - 379760, 379766, 379773, 379780, 379788, 379795, 379803, 379811, - 379820, 379827, 379835, 379843, 379852, 379860, 379869, 379878, - 379888, 379894, 379901, 379908, 379916, 379923, 379931, 379939, - 379948, 379955, 379963, 379971, 379980, 379988, 379997, 380006, - 380016, 380023, 380031, 380039, 380048, 380056, 380065, 380074, - 380084, 380092, 380101, 380110, 380120, 380129, 380139, 380149, - 380160, 380163, 380167, 380171, 380176, 380180, 380185, 380190, - 380196, 380200, 380205, 380210, 380216, 380221, 380227, 380233, - 380240, 380244, 380249, 380254, 380260, 380265, 380271, 380277, - 380284, 380289, 380295, 380301, 380308, 380314, 380321, 380328, - 380336, 380340, 380345, 380350, 380356, 380361, 380367, 380373, - 380380, 380385, 380391, 380397, 380404, 380410, 380417, 380424, - 380432, 380437, 380443, 380449, 380456, 380462, 380469, 380476, - 380484, 380490, 380497, 380504, 380512, 380519, 380527, 380535, - 380544, 380548, 380553, 380558, 380564, 380569, 380575, 380581, - 380588, 380593, 380599, 380605, 380612, 380618, 380625, 380632, - 380640, 380645, 380651, 380657, 380664, 380670, 380677, 380684, - 380692, 380698, 380705, 380712, 380720, 380727, 380735, 380743, - 380752, 380757, 380763, 380769, 380776, 380782, 380789, 380796, - 380804, 380810, 380817, 380824, 380832, 380839, 380847, 380855, - 380864, 380870, 380877, 380884, 380892, 380899, 380907, 380915, - 380924, 380931, 380939, 380947, 380956, 380964, 380973, 380982, - 380992, 380996, 381001, 381006, 381012, 381017, 381023, 381029, - 381036, 381041, 381047, 381053, 381060, 381066, 381073, 381080, - 381088, 381093, 381099, 381105, 381112, 381118, 381125, 381132, - 381140, 381146, 381153, 381160, 381168, 381175, 381183, 381191, - 381200, 381205, 381211, 381217, 381224, 381230, 381237, 381244, - 381252, 381258, 381265, 381272, 381280, 381287, 381295, 381303, - 381312, 381318, 381325, 381332, 381340, 381347, 381355, 381363, - 381372, 381379, 381387, 381395, 381404, 381412, 381421, 381430, - 381440, 381445, 381451, 381457, 381464, 381470, 381477, 381484, - 381492, 381498, 381505, 381512, 381520, 381527, 381535, 381543, - 381552, 381558, 381565, 381572, 381580, 381587, 381595, 381603, - 381612, 381619, 381627, 381635, 381644, 381652, 381661, 381670, - 381680, 381686, 381693, 381700, 381708, 381715, 381723, 381731, - 381740, 381747, 381755, 381763, 381772, 381780, 381789, 381798, - 381808, 381815, 381823, 381831, 381840, 381848, 381857, 381866, - 381876, 381884, 381893, 381902, 381912, 381921, 381931, 381941, - 381952, 381956, 381961, 381966, 381972, 381977, 381983, 381989, - 381996, 382001, 382007, 382013, 382020, 382026, 382033, 382040, - 382048, 382053, 382059, 382065, 382072, 382078, 382085, 382092, - 382100, 382106, 382113, 382120, 382128, 382135, 382143, 382151, - 382160, 382165, 382171, 382177, 382184, 382190, 382197, 382204, - 382212, 382218, 382225, 382232, 382240, 382247, 382255, 382263, - 382272, 382278, 382285, 382292, 382300, 382307, 382315, 382323, - 382332, 382339, 382347, 382355, 382364, 382372, 382381, 382390, - 382400, 382405, 382411, 382417, 382424, 382430, 382437, 382444, - 382452, 382458, 382465, 382472, 382480, 382487, 382495, 382503, - 382512, 382518, 382525, 382532, 382540, 382547, 382555, 382563, - 382572, 382579, 382587, 382595, 382604, 382612, 382621, 382630, - 382640, 382646, 382653, 382660, 382668, 382675, 382683, 382691, - 382700, 382707, 382715, 382723, 382732, 382740, 382749, 382758, - 382768, 382775, 382783, 382791, 382800, 382808, 382817, 382826, - 382836, 382844, 382853, 382862, 382872, 382881, 382891, 382901, - 382912, 382917, 382923, 382929, 382936, 382942, 382949, 382956, - 382964, 382970, 382977, 382984, 382992, 382999, 383007, 383015, - 383024, 383030, 383037, 383044, 383052, 383059, 383067, 383075, - 383084, 383091, 383099, 383107, 383116, 383124, 383133, 383142, - 383152, 383158, 383165, 383172, 383180, 383187, 383195, 383203, - 383212, 383219, 383227, 383235, 383244, 383252, 383261, 383270, - 383280, 383287, 383295, 383303, 383312, 383320, 383329, 383338, - 383348, 383356, 383365, 383374, 383384, 383393, 383403, 383413, - 383424, 383430, 383437, 383444, 383452, 383459, 383467, 383475, - 383484, 383491, 383499, 383507, 383516, 383524, 383533, 383542, - 383552, 383559, 383567, 383575, 383584, 383592, 383601, 383610, - 383620, 383628, 383637, 383646, 383656, 383665, 383675, 383685, - 383696, 383703, 383711, 383719, 383728, 383736, 383745, 383754, - 383764, 383772, 383781, 383790, 383800, 383809, 383819, 383829, - 383840, 383848, 383857, 383866, 383876, 383885, 383895, 383905, - 383916, 383925, 383935, 383945, 383956, 383966, 383977, 383988, - 384000, 384003, 384007, 384011, 384016, 384020, 384025, 384030, - 384036, 384040, 384045, 384050, 384056, 384061, 384067, 384073, - 384080, 384084, 384089, 384094, 384100, 384105, 384111, 384117, - 384124, 384129, 384135, 384141, 384148, 384154, 384161, 384168, - 384176, 384180, 384185, 384190, 384196, 384201, 384207, 384213, - 384220, 384225, 384231, 384237, 384244, 384250, 384257, 384264, - 384272, 384277, 384283, 384289, 384296, 384302, 384309, 384316, - 384324, 384330, 384337, 384344, 384352, 384359, 384367, 384375, - 384384, 384388, 384393, 384398, 384404, 384409, 384415, 384421, - 384428, 384433, 384439, 384445, 384452, 384458, 384465, 384472, - 384480, 384485, 384491, 384497, 384504, 384510, 384517, 384524, - 384532, 384538, 384545, 384552, 384560, 384567, 384575, 384583, - 384592, 384597, 384603, 384609, 384616, 384622, 384629, 384636, - 384644, 384650, 384657, 384664, 384672, 384679, 384687, 384695, - 384704, 384710, 384717, 384724, 384732, 384739, 384747, 384755, - 384764, 384771, 384779, 384787, 384796, 384804, 384813, 384822, - 384832, 384836, 384841, 384846, 384852, 384857, 384863, 384869, - 384876, 384881, 384887, 384893, 384900, 384906, 384913, 384920, - 384928, 384933, 384939, 384945, 384952, 384958, 384965, 384972, - 384980, 384986, 384993, 385000, 385008, 385015, 385023, 385031, - 385040, 385045, 385051, 385057, 385064, 385070, 385077, 385084, - 385092, 385098, 385105, 385112, 385120, 385127, 385135, 385143, - 385152, 385158, 385165, 385172, 385180, 385187, 385195, 385203, - 385212, 385219, 385227, 385235, 385244, 385252, 385261, 385270, - 385280, 385285, 385291, 385297, 385304, 385310, 385317, 385324, - 385332, 385338, 385345, 385352, 385360, 385367, 385375, 385383, - 385392, 385398, 385405, 385412, 385420, 385427, 385435, 385443, - 385452, 385459, 385467, 385475, 385484, 385492, 385501, 385510, - 385520, 385526, 385533, 385540, 385548, 385555, 385563, 385571, - 385580, 385587, 385595, 385603, 385612, 385620, 385629, 385638, - 385648, 385655, 385663, 385671, 385680, 385688, 385697, 385706, - 385716, 385724, 385733, 385742, 385752, 385761, 385771, 385781, - 385792, 385796, 385801, 385806, 385812, 385817, 385823, 385829, - 385836, 385841, 385847, 385853, 385860, 385866, 385873, 385880, - 385888, 385893, 385899, 385905, 385912, 385918, 385925, 385932, - 385940, 385946, 385953, 385960, 385968, 385975, 385983, 385991, - 386000, 386005, 386011, 386017, 386024, 386030, 386037, 386044, - 386052, 386058, 386065, 386072, 386080, 386087, 386095, 386103, - 386112, 386118, 386125, 386132, 386140, 386147, 386155, 386163, - 386172, 386179, 386187, 386195, 386204, 386212, 386221, 386230, - 386240, 386245, 386251, 386257, 386264, 386270, 386277, 386284, - 386292, 386298, 386305, 386312, 386320, 386327, 386335, 386343, - 386352, 386358, 386365, 386372, 386380, 386387, 386395, 386403, - 386412, 386419, 386427, 386435, 386444, 386452, 386461, 386470, - 386480, 386486, 386493, 386500, 386508, 386515, 386523, 386531, - 386540, 386547, 386555, 386563, 386572, 386580, 386589, 386598, - 386608, 386615, 386623, 386631, 386640, 386648, 386657, 386666, - 386676, 386684, 386693, 386702, 386712, 386721, 386731, 386741, - 386752, 386757, 386763, 386769, 386776, 386782, 386789, 386796, - 386804, 386810, 386817, 386824, 386832, 386839, 386847, 386855, - 386864, 386870, 386877, 386884, 386892, 386899, 386907, 386915, - 386924, 386931, 386939, 386947, 386956, 386964, 386973, 386982, - 386992, 386998, 387005, 387012, 387020, 387027, 387035, 387043, - 387052, 387059, 387067, 387075, 387084, 387092, 387101, 387110, - 387120, 387127, 387135, 387143, 387152, 387160, 387169, 387178, - 387188, 387196, 387205, 387214, 387224, 387233, 387243, 387253, - 387264, 387270, 387277, 387284, 387292, 387299, 387307, 387315, - 387324, 387331, 387339, 387347, 387356, 387364, 387373, 387382, - 387392, 387399, 387407, 387415, 387424, 387432, 387441, 387450, - 387460, 387468, 387477, 387486, 387496, 387505, 387515, 387525, - 387536, 387543, 387551, 387559, 387568, 387576, 387585, 387594, - 387604, 387612, 387621, 387630, 387640, 387649, 387659, 387669, - 387680, 387688, 387697, 387706, 387716, 387725, 387735, 387745, - 387756, 387765, 387775, 387785, 387796, 387806, 387817, 387828, - 387840, 387844, 387849, 387854, 387860, 387865, 387871, 387877, - 387884, 387889, 387895, 387901, 387908, 387914, 387921, 387928, - 387936, 387941, 387947, 387953, 387960, 387966, 387973, 387980, - 387988, 387994, 388001, 388008, 388016, 388023, 388031, 388039, - 388048, 388053, 388059, 388065, 388072, 388078, 388085, 388092, - 388100, 388106, 388113, 388120, 388128, 388135, 388143, 388151, - 388160, 388166, 388173, 388180, 388188, 388195, 388203, 388211, - 388220, 388227, 388235, 388243, 388252, 388260, 388269, 388278, - 388288, 388293, 388299, 388305, 388312, 388318, 388325, 388332, - 388340, 388346, 388353, 388360, 388368, 388375, 388383, 388391, - 388400, 388406, 388413, 388420, 388428, 388435, 388443, 388451, - 388460, 388467, 388475, 388483, 388492, 388500, 388509, 388518, - 388528, 388534, 388541, 388548, 388556, 388563, 388571, 388579, - 388588, 388595, 388603, 388611, 388620, 388628, 388637, 388646, - 388656, 388663, 388671, 388679, 388688, 388696, 388705, 388714, - 388724, 388732, 388741, 388750, 388760, 388769, 388779, 388789, - 388800, 388805, 388811, 388817, 388824, 388830, 388837, 388844, - 388852, 388858, 388865, 388872, 388880, 388887, 388895, 388903, - 388912, 388918, 388925, 388932, 388940, 388947, 388955, 388963, - 388972, 388979, 388987, 388995, 389004, 389012, 389021, 389030, - 389040, 389046, 389053, 389060, 389068, 389075, 389083, 389091, - 389100, 389107, 389115, 389123, 389132, 389140, 389149, 389158, - 389168, 389175, 389183, 389191, 389200, 389208, 389217, 389226, - 389236, 389244, 389253, 389262, 389272, 389281, 389291, 389301, - 389312, 389318, 389325, 389332, 389340, 389347, 389355, 389363, - 389372, 389379, 389387, 389395, 389404, 389412, 389421, 389430, - 389440, 389447, 389455, 389463, 389472, 389480, 389489, 389498, - 389508, 389516, 389525, 389534, 389544, 389553, 389563, 389573, - 389584, 389591, 389599, 389607, 389616, 389624, 389633, 389642, - 389652, 389660, 389669, 389678, 389688, 389697, 389707, 389717, - 389728, 389736, 389745, 389754, 389764, 389773, 389783, 389793, - 389804, 389813, 389823, 389833, 389844, 389854, 389865, 389876, - 389888, 389893, 389899, 389905, 389912, 389918, 389925, 389932, - 389940, 389946, 389953, 389960, 389968, 389975, 389983, 389991, - 390000, 390006, 390013, 390020, 390028, 390035, 390043, 390051, - 390060, 390067, 390075, 390083, 390092, 390100, 390109, 390118, - 390128, 390134, 390141, 390148, 390156, 390163, 390171, 390179, - 390188, 390195, 390203, 390211, 390220, 390228, 390237, 390246, - 390256, 390263, 390271, 390279, 390288, 390296, 390305, 390314, - 390324, 390332, 390341, 390350, 390360, 390369, 390379, 390389, - 390400, 390406, 390413, 390420, 390428, 390435, 390443, 390451, - 390460, 390467, 390475, 390483, 390492, 390500, 390509, 390518, - 390528, 390535, 390543, 390551, 390560, 390568, 390577, 390586, - 390596, 390604, 390613, 390622, 390632, 390641, 390651, 390661, - 390672, 390679, 390687, 390695, 390704, 390712, 390721, 390730, - 390740, 390748, 390757, 390766, 390776, 390785, 390795, 390805, - 390816, 390824, 390833, 390842, 390852, 390861, 390871, 390881, - 390892, 390901, 390911, 390921, 390932, 390942, 390953, 390964, - 390976, 390982, 390989, 390996, 391004, 391011, 391019, 391027, - 391036, 391043, 391051, 391059, 391068, 391076, 391085, 391094, - 391104, 391111, 391119, 391127, 391136, 391144, 391153, 391162, - 391172, 391180, 391189, 391198, 391208, 391217, 391227, 391237, - 391248, 391255, 391263, 391271, 391280, 391288, 391297, 391306, - 391316, 391324, 391333, 391342, 391352, 391361, 391371, 391381, - 391392, 391400, 391409, 391418, 391428, 391437, 391447, 391457, - 391468, 391477, 391487, 391497, 391508, 391518, 391529, 391540, - 391552, 391559, 391567, 391575, 391584, 391592, 391601, 391610, - 391620, 391628, 391637, 391646, 391656, 391665, 391675, 391685, - 391696, 391704, 391713, 391722, 391732, 391741, 391751, 391761, - 391772, 391781, 391791, 391801, 391812, 391822, 391833, 391844, - 391856, 391864, 391873, 391882, 391892, 391901, 391911, 391921, - 391932, 391941, 391951, 391961, 391972, 391982, 391993, 392004, - 392016, 392025, 392035, 392045, 392056, 392066, 392077, 392088, - 392100, 392110, 392121, 392132, 392144, 392155, 392167, 392179, - 392192, 392195, 392199, 392203, 392208, 392212, 392217, 392222, - 392228, 392232, 392237, 392242, 392248, 392253, 392259, 392265, - 392272, 392276, 392281, 392286, 392292, 392297, 392303, 392309, - 392316, 392321, 392327, 392333, 392340, 392346, 392353, 392360, - 392368, 392372, 392377, 392382, 392388, 392393, 392399, 392405, - 392412, 392417, 392423, 392429, 392436, 392442, 392449, 392456, - 392464, 392469, 392475, 392481, 392488, 392494, 392501, 392508, - 392516, 392522, 392529, 392536, 392544, 392551, 392559, 392567, - 392576, 392580, 392585, 392590, 392596, 392601, 392607, 392613, - 392620, 392625, 392631, 392637, 392644, 392650, 392657, 392664, - 392672, 392677, 392683, 392689, 392696, 392702, 392709, 392716, - 392724, 392730, 392737, 392744, 392752, 392759, 392767, 392775, - 392784, 392789, 392795, 392801, 392808, 392814, 392821, 392828, - 392836, 392842, 392849, 392856, 392864, 392871, 392879, 392887, - 392896, 392902, 392909, 392916, 392924, 392931, 392939, 392947, - 392956, 392963, 392971, 392979, 392988, 392996, 393005, 393014, - 393024, 393028, 393033, 393038, 393044, 393049, 393055, 393061, - 393068, 393073, 393079, 393085, 393092, 393098, 393105, 393112, - 393120, 393125, 393131, 393137, 393144, 393150, 393157, 393164, - 393172, 393178, 393185, 393192, 393200, 393207, 393215, 393223, - 393232, 393237, 393243, 393249, 393256, 393262, 393269, 393276, - 393284, 393290, 393297, 393304, 393312, 393319, 393327, 393335, - 393344, 393350, 393357, 393364, 393372, 393379, 393387, 393395, - 393404, 393411, 393419, 393427, 393436, 393444, 393453, 393462, - 393472, 393477, 393483, 393489, 393496, 393502, 393509, 393516, - 393524, 393530, 393537, 393544, 393552, 393559, 393567, 393575, - 393584, 393590, 393597, 393604, 393612, 393619, 393627, 393635, - 393644, 393651, 393659, 393667, 393676, 393684, 393693, 393702, - 393712, 393718, 393725, 393732, 393740, 393747, 393755, 393763, - 393772, 393779, 393787, 393795, 393804, 393812, 393821, 393830, - 393840, 393847, 393855, 393863, 393872, 393880, 393889, 393898, - 393908, 393916, 393925, 393934, 393944, 393953, 393963, 393973, - 393984, 393988, 393993, 393998, 394004, 394009, 394015, 394021, - 394028, 394033, 394039, 394045, 394052, 394058, 394065, 394072, - 394080, 394085, 394091, 394097, 394104, 394110, 394117, 394124, - 394132, 394138, 394145, 394152, 394160, 394167, 394175, 394183, - 394192, 394197, 394203, 394209, 394216, 394222, 394229, 394236, - 394244, 394250, 394257, 394264, 394272, 394279, 394287, 394295, - 394304, 394310, 394317, 394324, 394332, 394339, 394347, 394355, - 394364, 394371, 394379, 394387, 394396, 394404, 394413, 394422, - 394432, 394437, 394443, 394449, 394456, 394462, 394469, 394476, - 394484, 394490, 394497, 394504, 394512, 394519, 394527, 394535, - 394544, 394550, 394557, 394564, 394572, 394579, 394587, 394595, - 394604, 394611, 394619, 394627, 394636, 394644, 394653, 394662, - 394672, 394678, 394685, 394692, 394700, 394707, 394715, 394723, - 394732, 394739, 394747, 394755, 394764, 394772, 394781, 394790, - 394800, 394807, 394815, 394823, 394832, 394840, 394849, 394858, - 394868, 394876, 394885, 394894, 394904, 394913, 394923, 394933, - 394944, 394949, 394955, 394961, 394968, 394974, 394981, 394988, - 394996, 395002, 395009, 395016, 395024, 395031, 395039, 395047, - 395056, 395062, 395069, 395076, 395084, 395091, 395099, 395107, - 395116, 395123, 395131, 395139, 395148, 395156, 395165, 395174, - 395184, 395190, 395197, 395204, 395212, 395219, 395227, 395235, - 395244, 395251, 395259, 395267, 395276, 395284, 395293, 395302, - 395312, 395319, 395327, 395335, 395344, 395352, 395361, 395370, - 395380, 395388, 395397, 395406, 395416, 395425, 395435, 395445, - 395456, 395462, 395469, 395476, 395484, 395491, 395499, 395507, - 395516, 395523, 395531, 395539, 395548, 395556, 395565, 395574, - 395584, 395591, 395599, 395607, 395616, 395624, 395633, 395642, - 395652, 395660, 395669, 395678, 395688, 395697, 395707, 395717, - 395728, 395735, 395743, 395751, 395760, 395768, 395777, 395786, - 395796, 395804, 395813, 395822, 395832, 395841, 395851, 395861, - 395872, 395880, 395889, 395898, 395908, 395917, 395927, 395937, - 395948, 395957, 395967, 395977, 395988, 395998, 396009, 396020, - 396032, 396036, 396041, 396046, 396052, 396057, 396063, 396069, - 396076, 396081, 396087, 396093, 396100, 396106, 396113, 396120, - 396128, 396133, 396139, 396145, 396152, 396158, 396165, 396172, - 396180, 396186, 396193, 396200, 396208, 396215, 396223, 396231, - 396240, 396245, 396251, 396257, 396264, 396270, 396277, 396284, - 396292, 396298, 396305, 396312, 396320, 396327, 396335, 396343, - 396352, 396358, 396365, 396372, 396380, 396387, 396395, 396403, - 396412, 396419, 396427, 396435, 396444, 396452, 396461, 396470, - 396480, 396485, 396491, 396497, 396504, 396510, 396517, 396524, - 396532, 396538, 396545, 396552, 396560, 396567, 396575, 396583, - 396592, 396598, 396605, 396612, 396620, 396627, 396635, 396643, - 396652, 396659, 396667, 396675, 396684, 396692, 396701, 396710, - 396720, 396726, 396733, 396740, 396748, 396755, 396763, 396771, - 396780, 396787, 396795, 396803, 396812, 396820, 396829, 396838, - 396848, 396855, 396863, 396871, 396880, 396888, 396897, 396906, - 396916, 396924, 396933, 396942, 396952, 396961, 396971, 396981, - 396992, 396997, 397003, 397009, 397016, 397022, 397029, 397036, - 397044, 397050, 397057, 397064, 397072, 397079, 397087, 397095, - 397104, 397110, 397117, 397124, 397132, 397139, 397147, 397155, - 397164, 397171, 397179, 397187, 397196, 397204, 397213, 397222, - 397232, 397238, 397245, 397252, 397260, 397267, 397275, 397283, - 397292, 397299, 397307, 397315, 397324, 397332, 397341, 397350, - 397360, 397367, 397375, 397383, 397392, 397400, 397409, 397418, - 397428, 397436, 397445, 397454, 397464, 397473, 397483, 397493, - 397504, 397510, 397517, 397524, 397532, 397539, 397547, 397555, - 397564, 397571, 397579, 397587, 397596, 397604, 397613, 397622, - 397632, 397639, 397647, 397655, 397664, 397672, 397681, 397690, - 397700, 397708, 397717, 397726, 397736, 397745, 397755, 397765, - 397776, 397783, 397791, 397799, 397808, 397816, 397825, 397834, - 397844, 397852, 397861, 397870, 397880, 397889, 397899, 397909, - 397920, 397928, 397937, 397946, 397956, 397965, 397975, 397985, - 397996, 398005, 398015, 398025, 398036, 398046, 398057, 398068, - 398080, 398085, 398091, 398097, 398104, 398110, 398117, 398124, - 398132, 398138, 398145, 398152, 398160, 398167, 398175, 398183, - 398192, 398198, 398205, 398212, 398220, 398227, 398235, 398243, - 398252, 398259, 398267, 398275, 398284, 398292, 398301, 398310, - 398320, 398326, 398333, 398340, 398348, 398355, 398363, 398371, - 398380, 398387, 398395, 398403, 398412, 398420, 398429, 398438, - 398448, 398455, 398463, 398471, 398480, 398488, 398497, 398506, - 398516, 398524, 398533, 398542, 398552, 398561, 398571, 398581, - 398592, 398598, 398605, 398612, 398620, 398627, 398635, 398643, - 398652, 398659, 398667, 398675, 398684, 398692, 398701, 398710, - 398720, 398727, 398735, 398743, 398752, 398760, 398769, 398778, - 398788, 398796, 398805, 398814, 398824, 398833, 398843, 398853, - 398864, 398871, 398879, 398887, 398896, 398904, 398913, 398922, - 398932, 398940, 398949, 398958, 398968, 398977, 398987, 398997, - 399008, 399016, 399025, 399034, 399044, 399053, 399063, 399073, - 399084, 399093, 399103, 399113, 399124, 399134, 399145, 399156, - 399168, 399174, 399181, 399188, 399196, 399203, 399211, 399219, - 399228, 399235, 399243, 399251, 399260, 399268, 399277, 399286, - 399296, 399303, 399311, 399319, 399328, 399336, 399345, 399354, - 399364, 399372, 399381, 399390, 399400, 399409, 399419, 399429, - 399440, 399447, 399455, 399463, 399472, 399480, 399489, 399498, - 399508, 399516, 399525, 399534, 399544, 399553, 399563, 399573, - 399584, 399592, 399601, 399610, 399620, 399629, 399639, 399649, - 399660, 399669, 399679, 399689, 399700, 399710, 399721, 399732, - 399744, 399751, 399759, 399767, 399776, 399784, 399793, 399802, - 399812, 399820, 399829, 399838, 399848, 399857, 399867, 399877, - 399888, 399896, 399905, 399914, 399924, 399933, 399943, 399953, - 399964, 399973, 399983, 399993, 400004, 400014, 400025, 400036, - 400048, 400056, 400065, 400074, 400084, 400093, 400103, 400113, - 400124, 400133, 400143, 400153, 400164, 400174, 400185, 400196, - 400208, 400217, 400227, 400237, 400248, 400258, 400269, 400280, - 400292, 400302, 400313, 400324, 400336, 400347, 400359, 400371, - 400384, 400388, 400393, 400398, 400404, 400409, 400415, 400421, - 400428, 400433, 400439, 400445, 400452, 400458, 400465, 400472, - 400480, 400485, 400491, 400497, 400504, 400510, 400517, 400524, - 400532, 400538, 400545, 400552, 400560, 400567, 400575, 400583, - 400592, 400597, 400603, 400609, 400616, 400622, 400629, 400636, - 400644, 400650, 400657, 400664, 400672, 400679, 400687, 400695, - 400704, 400710, 400717, 400724, 400732, 400739, 400747, 400755, - 400764, 400771, 400779, 400787, 400796, 400804, 400813, 400822, - 400832, 400837, 400843, 400849, 400856, 400862, 400869, 400876, - 400884, 400890, 400897, 400904, 400912, 400919, 400927, 400935, - 400944, 400950, 400957, 400964, 400972, 400979, 400987, 400995, - 401004, 401011, 401019, 401027, 401036, 401044, 401053, 401062, - 401072, 401078, 401085, 401092, 401100, 401107, 401115, 401123, - 401132, 401139, 401147, 401155, 401164, 401172, 401181, 401190, - 401200, 401207, 401215, 401223, 401232, 401240, 401249, 401258, - 401268, 401276, 401285, 401294, 401304, 401313, 401323, 401333, - 401344, 401349, 401355, 401361, 401368, 401374, 401381, 401388, - 401396, 401402, 401409, 401416, 401424, 401431, 401439, 401447, - 401456, 401462, 401469, 401476, 401484, 401491, 401499, 401507, - 401516, 401523, 401531, 401539, 401548, 401556, 401565, 401574, - 401584, 401590, 401597, 401604, 401612, 401619, 401627, 401635, - 401644, 401651, 401659, 401667, 401676, 401684, 401693, 401702, - 401712, 401719, 401727, 401735, 401744, 401752, 401761, 401770, - 401780, 401788, 401797, 401806, 401816, 401825, 401835, 401845, - 401856, 401862, 401869, 401876, 401884, 401891, 401899, 401907, - 401916, 401923, 401931, 401939, 401948, 401956, 401965, 401974, - 401984, 401991, 401999, 402007, 402016, 402024, 402033, 402042, - 402052, 402060, 402069, 402078, 402088, 402097, 402107, 402117, - 402128, 402135, 402143, 402151, 402160, 402168, 402177, 402186, - 402196, 402204, 402213, 402222, 402232, 402241, 402251, 402261, - 402272, 402280, 402289, 402298, 402308, 402317, 402327, 402337, - 402348, 402357, 402367, 402377, 402388, 402398, 402409, 402420, - 402432, 402437, 402443, 402449, 402456, 402462, 402469, 402476, - 402484, 402490, 402497, 402504, 402512, 402519, 402527, 402535, - 402544, 402550, 402557, 402564, 402572, 402579, 402587, 402595, - 402604, 402611, 402619, 402627, 402636, 402644, 402653, 402662, - 402672, 402678, 402685, 402692, 402700, 402707, 402715, 402723, - 402732, 402739, 402747, 402755, 402764, 402772, 402781, 402790, - 402800, 402807, 402815, 402823, 402832, 402840, 402849, 402858, - 402868, 402876, 402885, 402894, 402904, 402913, 402923, 402933, - 402944, 402950, 402957, 402964, 402972, 402979, 402987, 402995, - 403004, 403011, 403019, 403027, 403036, 403044, 403053, 403062, - 403072, 403079, 403087, 403095, 403104, 403112, 403121, 403130, - 403140, 403148, 403157, 403166, 403176, 403185, 403195, 403205, - 403216, 403223, 403231, 403239, 403248, 403256, 403265, 403274, - 403284, 403292, 403301, 403310, 403320, 403329, 403339, 403349, - 403360, 403368, 403377, 403386, 403396, 403405, 403415, 403425, - 403436, 403445, 403455, 403465, 403476, 403486, 403497, 403508, - 403520, 403526, 403533, 403540, 403548, 403555, 403563, 403571, - 403580, 403587, 403595, 403603, 403612, 403620, 403629, 403638, - 403648, 403655, 403663, 403671, 403680, 403688, 403697, 403706, - 403716, 403724, 403733, 403742, 403752, 403761, 403771, 403781, - 403792, 403799, 403807, 403815, 403824, 403832, 403841, 403850, - 403860, 403868, 403877, 403886, 403896, 403905, 403915, 403925, - 403936, 403944, 403953, 403962, 403972, 403981, 403991, 404001, - 404012, 404021, 404031, 404041, 404052, 404062, 404073, 404084, - 404096, 404103, 404111, 404119, 404128, 404136, 404145, 404154, - 404164, 404172, 404181, 404190, 404200, 404209, 404219, 404229, - 404240, 404248, 404257, 404266, 404276, 404285, 404295, 404305, - 404316, 404325, 404335, 404345, 404356, 404366, 404377, 404388, - 404400, 404408, 404417, 404426, 404436, 404445, 404455, 404465, - 404476, 404485, 404495, 404505, 404516, 404526, 404537, 404548, - 404560, 404569, 404579, 404589, 404600, 404610, 404621, 404632, - 404644, 404654, 404665, 404676, 404688, 404699, 404711, 404723, - 404736, 404741, 404747, 404753, 404760, 404766, 404773, 404780, - 404788, 404794, 404801, 404808, 404816, 404823, 404831, 404839, - 404848, 404854, 404861, 404868, 404876, 404883, 404891, 404899, - 404908, 404915, 404923, 404931, 404940, 404948, 404957, 404966, - 404976, 404982, 404989, 404996, 405004, 405011, 405019, 405027, - 405036, 405043, 405051, 405059, 405068, 405076, 405085, 405094, - 405104, 405111, 405119, 405127, 405136, 405144, 405153, 405162, - 405172, 405180, 405189, 405198, 405208, 405217, 405227, 405237, - 405248, 405254, 405261, 405268, 405276, 405283, 405291, 405299, - 405308, 405315, 405323, 405331, 405340, 405348, 405357, 405366, - 405376, 405383, 405391, 405399, 405408, 405416, 405425, 405434, - 405444, 405452, 405461, 405470, 405480, 405489, 405499, 405509, - 405520, 405527, 405535, 405543, 405552, 405560, 405569, 405578, - 405588, 405596, 405605, 405614, 405624, 405633, 405643, 405653, - 405664, 405672, 405681, 405690, 405700, 405709, 405719, 405729, - 405740, 405749, 405759, 405769, 405780, 405790, 405801, 405812, - 405824, 405830, 405837, 405844, 405852, 405859, 405867, 405875, - 405884, 405891, 405899, 405907, 405916, 405924, 405933, 405942, - 405952, 405959, 405967, 405975, 405984, 405992, 406001, 406010, - 406020, 406028, 406037, 406046, 406056, 406065, 406075, 406085, - 406096, 406103, 406111, 406119, 406128, 406136, 406145, 406154, - 406164, 406172, 406181, 406190, 406200, 406209, 406219, 406229, - 406240, 406248, 406257, 406266, 406276, 406285, 406295, 406305, - 406316, 406325, 406335, 406345, 406356, 406366, 406377, 406388, - 406400, 406407, 406415, 406423, 406432, 406440, 406449, 406458, - 406468, 406476, 406485, 406494, 406504, 406513, 406523, 406533, - 406544, 406552, 406561, 406570, 406580, 406589, 406599, 406609, - 406620, 406629, 406639, 406649, 406660, 406670, 406681, 406692, - 406704, 406712, 406721, 406730, 406740, 406749, 406759, 406769, - 406780, 406789, 406799, 406809, 406820, 406830, 406841, 406852, - 406864, 406873, 406883, 406893, 406904, 406914, 406925, 406936, - 406948, 406958, 406969, 406980, 406992, 407003, 407015, 407027, - 407040, 407046, 407053, 407060, 407068, 407075, 407083, 407091, - 407100, 407107, 407115, 407123, 407132, 407140, 407149, 407158, - 407168, 407175, 407183, 407191, 407200, 407208, 407217, 407226, - 407236, 407244, 407253, 407262, 407272, 407281, 407291, 407301, - 407312, 407319, 407327, 407335, 407344, 407352, 407361, 407370, - 407380, 407388, 407397, 407406, 407416, 407425, 407435, 407445, - 407456, 407464, 407473, 407482, 407492, 407501, 407511, 407521, - 407532, 407541, 407551, 407561, 407572, 407582, 407593, 407604, - 407616, 407623, 407631, 407639, 407648, 407656, 407665, 407674, - 407684, 407692, 407701, 407710, 407720, 407729, 407739, 407749, - 407760, 407768, 407777, 407786, 407796, 407805, 407815, 407825, - 407836, 407845, 407855, 407865, 407876, 407886, 407897, 407908, - 407920, 407928, 407937, 407946, 407956, 407965, 407975, 407985, - 407996, 408005, 408015, 408025, 408036, 408046, 408057, 408068, - 408080, 408089, 408099, 408109, 408120, 408130, 408141, 408152, - 408164, 408174, 408185, 408196, 408208, 408219, 408231, 408243, - 408256, 408263, 408271, 408279, 408288, 408296, 408305, 408314, - 408324, 408332, 408341, 408350, 408360, 408369, 408379, 408389, - 408400, 408408, 408417, 408426, 408436, 408445, 408455, 408465, - 408476, 408485, 408495, 408505, 408516, 408526, 408537, 408548, - 408560, 408568, 408577, 408586, 408596, 408605, 408615, 408625, - 408636, 408645, 408655, 408665, 408676, 408686, 408697, 408708, - 408720, 408729, 408739, 408749, 408760, 408770, 408781, 408792, - 408804, 408814, 408825, 408836, 408848, 408859, 408871, 408883, - 408896, 408904, 408913, 408922, 408932, 408941, 408951, 408961, - 408972, 408981, 408991, 409001, 409012, 409022, 409033, 409044, - 409056, 409065, 409075, 409085, 409096, 409106, 409117, 409128, - 409140, 409150, 409161, 409172, 409184, 409195, 409207, 409219, - 409232, 409241, 409251, 409261, 409272, 409282, 409293, 409304, - 409316, 409326, 409337, 409348, 409360, 409371, 409383, 409395, - 409408, 409418, 409429, 409440, 409452, 409463, 409475, 409487, - 409500, 409511, 409523, 409535, 409548, 409560, 409573, 409586, - 409600, 409603, 409607, 409611, 409616, 409620, 409625, 409630, - 409636, 409640, 409645, 409650, 409656, 409661, 409667, 409673, - 409680, 409684, 409689, 409694, 409700, 409705, 409711, 409717, - 409724, 409729, 409735, 409741, 409748, 409754, 409761, 409768, - 409776, 409780, 409785, 409790, 409796, 409801, 409807, 409813, - 409820, 409825, 409831, 409837, 409844, 409850, 409857, 409864, - 409872, 409877, 409883, 409889, 409896, 409902, 409909, 409916, - 409924, 409930, 409937, 409944, 409952, 409959, 409967, 409975, - 409984, 409988, 409993, 409998, 410004, 410009, 410015, 410021, - 410028, 410033, 410039, 410045, 410052, 410058, 410065, 410072, - 410080, 410085, 410091, 410097, 410104, 410110, 410117, 410124, - 410132, 410138, 410145, 410152, 410160, 410167, 410175, 410183, - 410192, 410197, 410203, 410209, 410216, 410222, 410229, 410236, - 410244, 410250, 410257, 410264, 410272, 410279, 410287, 410295, - 410304, 410310, 410317, 410324, 410332, 410339, 410347, 410355, - 410364, 410371, 410379, 410387, 410396, 410404, 410413, 410422, - 410432, 410436, 410441, 410446, 410452, 410457, 410463, 410469, - 410476, 410481, 410487, 410493, 410500, 410506, 410513, 410520, - 410528, 410533, 410539, 410545, 410552, 410558, 410565, 410572, - 410580, 410586, 410593, 410600, 410608, 410615, 410623, 410631, - 410640, 410645, 410651, 410657, 410664, 410670, 410677, 410684, - 410692, 410698, 410705, 410712, 410720, 410727, 410735, 410743, - 410752, 410758, 410765, 410772, 410780, 410787, 410795, 410803, - 410812, 410819, 410827, 410835, 410844, 410852, 410861, 410870, - 410880, 410885, 410891, 410897, 410904, 410910, 410917, 410924, - 410932, 410938, 410945, 410952, 410960, 410967, 410975, 410983, - 410992, 410998, 411005, 411012, 411020, 411027, 411035, 411043, - 411052, 411059, 411067, 411075, 411084, 411092, 411101, 411110, - 411120, 411126, 411133, 411140, 411148, 411155, 411163, 411171, - 411180, 411187, 411195, 411203, 411212, 411220, 411229, 411238, - 411248, 411255, 411263, 411271, 411280, 411288, 411297, 411306, - 411316, 411324, 411333, 411342, 411352, 411361, 411371, 411381, - 411392, 411396, 411401, 411406, 411412, 411417, 411423, 411429, - 411436, 411441, 411447, 411453, 411460, 411466, 411473, 411480, - 411488, 411493, 411499, 411505, 411512, 411518, 411525, 411532, - 411540, 411546, 411553, 411560, 411568, 411575, 411583, 411591, - 411600, 411605, 411611, 411617, 411624, 411630, 411637, 411644, - 411652, 411658, 411665, 411672, 411680, 411687, 411695, 411703, - 411712, 411718, 411725, 411732, 411740, 411747, 411755, 411763, - 411772, 411779, 411787, 411795, 411804, 411812, 411821, 411830, - 411840, 411845, 411851, 411857, 411864, 411870, 411877, 411884, - 411892, 411898, 411905, 411912, 411920, 411927, 411935, 411943, - 411952, 411958, 411965, 411972, 411980, 411987, 411995, 412003, - 412012, 412019, 412027, 412035, 412044, 412052, 412061, 412070, - 412080, 412086, 412093, 412100, 412108, 412115, 412123, 412131, - 412140, 412147, 412155, 412163, 412172, 412180, 412189, 412198, - 412208, 412215, 412223, 412231, 412240, 412248, 412257, 412266, - 412276, 412284, 412293, 412302, 412312, 412321, 412331, 412341, - 412352, 412357, 412363, 412369, 412376, 412382, 412389, 412396, - 412404, 412410, 412417, 412424, 412432, 412439, 412447, 412455, - 412464, 412470, 412477, 412484, 412492, 412499, 412507, 412515, - 412524, 412531, 412539, 412547, 412556, 412564, 412573, 412582, - 412592, 412598, 412605, 412612, 412620, 412627, 412635, 412643, - 412652, 412659, 412667, 412675, 412684, 412692, 412701, 412710, - 412720, 412727, 412735, 412743, 412752, 412760, 412769, 412778, - 412788, 412796, 412805, 412814, 412824, 412833, 412843, 412853, - 412864, 412870, 412877, 412884, 412892, 412899, 412907, 412915, - 412924, 412931, 412939, 412947, 412956, 412964, 412973, 412982, - 412992, 412999, 413007, 413015, 413024, 413032, 413041, 413050, - 413060, 413068, 413077, 413086, 413096, 413105, 413115, 413125, - 413136, 413143, 413151, 413159, 413168, 413176, 413185, 413194, - 413204, 413212, 413221, 413230, 413240, 413249, 413259, 413269, - 413280, 413288, 413297, 413306, 413316, 413325, 413335, 413345, - 413356, 413365, 413375, 413385, 413396, 413406, 413417, 413428, - 413440, 413444, 413449, 413454, 413460, 413465, 413471, 413477, - 413484, 413489, 413495, 413501, 413508, 413514, 413521, 413528, - 413536, 413541, 413547, 413553, 413560, 413566, 413573, 413580, - 413588, 413594, 413601, 413608, 413616, 413623, 413631, 413639, - 413648, 413653, 413659, 413665, 413672, 413678, 413685, 413692, - 413700, 413706, 413713, 413720, 413728, 413735, 413743, 413751, - 413760, 413766, 413773, 413780, 413788, 413795, 413803, 413811, - 413820, 413827, 413835, 413843, 413852, 413860, 413869, 413878, - 413888, 413893, 413899, 413905, 413912, 413918, 413925, 413932, - 413940, 413946, 413953, 413960, 413968, 413975, 413983, 413991, - 414000, 414006, 414013, 414020, 414028, 414035, 414043, 414051, - 414060, 414067, 414075, 414083, 414092, 414100, 414109, 414118, - 414128, 414134, 414141, 414148, 414156, 414163, 414171, 414179, - 414188, 414195, 414203, 414211, 414220, 414228, 414237, 414246, - 414256, 414263, 414271, 414279, 414288, 414296, 414305, 414314, - 414324, 414332, 414341, 414350, 414360, 414369, 414379, 414389, - 414400, 414405, 414411, 414417, 414424, 414430, 414437, 414444, - 414452, 414458, 414465, 414472, 414480, 414487, 414495, 414503, - 414512, 414518, 414525, 414532, 414540, 414547, 414555, 414563, - 414572, 414579, 414587, 414595, 414604, 414612, 414621, 414630, - 414640, 414646, 414653, 414660, 414668, 414675, 414683, 414691, - 414700, 414707, 414715, 414723, 414732, 414740, 414749, 414758, - 414768, 414775, 414783, 414791, 414800, 414808, 414817, 414826, - 414836, 414844, 414853, 414862, 414872, 414881, 414891, 414901, - 414912, 414918, 414925, 414932, 414940, 414947, 414955, 414963, - 414972, 414979, 414987, 414995, 415004, 415012, 415021, 415030, - 415040, 415047, 415055, 415063, 415072, 415080, 415089, 415098, - 415108, 415116, 415125, 415134, 415144, 415153, 415163, 415173, - 415184, 415191, 415199, 415207, 415216, 415224, 415233, 415242, - 415252, 415260, 415269, 415278, 415288, 415297, 415307, 415317, - 415328, 415336, 415345, 415354, 415364, 415373, 415383, 415393, - 415404, 415413, 415423, 415433, 415444, 415454, 415465, 415476, - 415488, 415493, 415499, 415505, 415512, 415518, 415525, 415532, - 415540, 415546, 415553, 415560, 415568, 415575, 415583, 415591, - 415600, 415606, 415613, 415620, 415628, 415635, 415643, 415651, - 415660, 415667, 415675, 415683, 415692, 415700, 415709, 415718, - 415728, 415734, 415741, 415748, 415756, 415763, 415771, 415779, - 415788, 415795, 415803, 415811, 415820, 415828, 415837, 415846, - 415856, 415863, 415871, 415879, 415888, 415896, 415905, 415914, - 415924, 415932, 415941, 415950, 415960, 415969, 415979, 415989, - 416000, 416006, 416013, 416020, 416028, 416035, 416043, 416051, - 416060, 416067, 416075, 416083, 416092, 416100, 416109, 416118, - 416128, 416135, 416143, 416151, 416160, 416168, 416177, 416186, - 416196, 416204, 416213, 416222, 416232, 416241, 416251, 416261, - 416272, 416279, 416287, 416295, 416304, 416312, 416321, 416330, - 416340, 416348, 416357, 416366, 416376, 416385, 416395, 416405, - 416416, 416424, 416433, 416442, 416452, 416461, 416471, 416481, - 416492, 416501, 416511, 416521, 416532, 416542, 416553, 416564, - 416576, 416582, 416589, 416596, 416604, 416611, 416619, 416627, - 416636, 416643, 416651, 416659, 416668, 416676, 416685, 416694, - 416704, 416711, 416719, 416727, 416736, 416744, 416753, 416762, - 416772, 416780, 416789, 416798, 416808, 416817, 416827, 416837, - 416848, 416855, 416863, 416871, 416880, 416888, 416897, 416906, - 416916, 416924, 416933, 416942, 416952, 416961, 416971, 416981, - 416992, 417000, 417009, 417018, 417028, 417037, 417047, 417057, - 417068, 417077, 417087, 417097, 417108, 417118, 417129, 417140, - 417152, 417159, 417167, 417175, 417184, 417192, 417201, 417210, - 417220, 417228, 417237, 417246, 417256, 417265, 417275, 417285, - 417296, 417304, 417313, 417322, 417332, 417341, 417351, 417361, - 417372, 417381, 417391, 417401, 417412, 417422, 417433, 417444, - 417456, 417464, 417473, 417482, 417492, 417501, 417511, 417521, - 417532, 417541, 417551, 417561, 417572, 417582, 417593, 417604, - 417616, 417625, 417635, 417645, 417656, 417666, 417677, 417688, - 417700, 417710, 417721, 417732, 417744, 417755, 417767, 417779, - 417792, 417796, 417801, 417806, 417812, 417817, 417823, 417829, - 417836, 417841, 417847, 417853, 417860, 417866, 417873, 417880, - 417888, 417893, 417899, 417905, 417912, 417918, 417925, 417932, - 417940, 417946, 417953, 417960, 417968, 417975, 417983, 417991, - 418000, 418005, 418011, 418017, 418024, 418030, 418037, 418044, - 418052, 418058, 418065, 418072, 418080, 418087, 418095, 418103, - 418112, 418118, 418125, 418132, 418140, 418147, 418155, 418163, - 418172, 418179, 418187, 418195, 418204, 418212, 418221, 418230, - 418240, 418245, 418251, 418257, 418264, 418270, 418277, 418284, - 418292, 418298, 418305, 418312, 418320, 418327, 418335, 418343, - 418352, 418358, 418365, 418372, 418380, 418387, 418395, 418403, - 418412, 418419, 418427, 418435, 418444, 418452, 418461, 418470, - 418480, 418486, 418493, 418500, 418508, 418515, 418523, 418531, - 418540, 418547, 418555, 418563, 418572, 418580, 418589, 418598, - 418608, 418615, 418623, 418631, 418640, 418648, 418657, 418666, - 418676, 418684, 418693, 418702, 418712, 418721, 418731, 418741, - 418752, 418757, 418763, 418769, 418776, 418782, 418789, 418796, - 418804, 418810, 418817, 418824, 418832, 418839, 418847, 418855, - 418864, 418870, 418877, 418884, 418892, 418899, 418907, 418915, - 418924, 418931, 418939, 418947, 418956, 418964, 418973, 418982, - 418992, 418998, 419005, 419012, 419020, 419027, 419035, 419043, - 419052, 419059, 419067, 419075, 419084, 419092, 419101, 419110, - 419120, 419127, 419135, 419143, 419152, 419160, 419169, 419178, - 419188, 419196, 419205, 419214, 419224, 419233, 419243, 419253, - 419264, 419270, 419277, 419284, 419292, 419299, 419307, 419315, - 419324, 419331, 419339, 419347, 419356, 419364, 419373, 419382, - 419392, 419399, 419407, 419415, 419424, 419432, 419441, 419450, - 419460, 419468, 419477, 419486, 419496, 419505, 419515, 419525, - 419536, 419543, 419551, 419559, 419568, 419576, 419585, 419594, - 419604, 419612, 419621, 419630, 419640, 419649, 419659, 419669, - 419680, 419688, 419697, 419706, 419716, 419725, 419735, 419745, - 419756, 419765, 419775, 419785, 419796, 419806, 419817, 419828, - 419840, 419845, 419851, 419857, 419864, 419870, 419877, 419884, - 419892, 419898, 419905, 419912, 419920, 419927, 419935, 419943, - 419952, 419958, 419965, 419972, 419980, 419987, 419995, 420003, - 420012, 420019, 420027, 420035, 420044, 420052, 420061, 420070, - 420080, 420086, 420093, 420100, 420108, 420115, 420123, 420131, - 420140, 420147, 420155, 420163, 420172, 420180, 420189, 420198, - 420208, 420215, 420223, 420231, 420240, 420248, 420257, 420266, - 420276, 420284, 420293, 420302, 420312, 420321, 420331, 420341, - 420352, 420358, 420365, 420372, 420380, 420387, 420395, 420403, - 420412, 420419, 420427, 420435, 420444, 420452, 420461, 420470, - 420480, 420487, 420495, 420503, 420512, 420520, 420529, 420538, - 420548, 420556, 420565, 420574, 420584, 420593, 420603, 420613, - 420624, 420631, 420639, 420647, 420656, 420664, 420673, 420682, - 420692, 420700, 420709, 420718, 420728, 420737, 420747, 420757, - 420768, 420776, 420785, 420794, 420804, 420813, 420823, 420833, - 420844, 420853, 420863, 420873, 420884, 420894, 420905, 420916, - 420928, 420934, 420941, 420948, 420956, 420963, 420971, 420979, - 420988, 420995, 421003, 421011, 421020, 421028, 421037, 421046, - 421056, 421063, 421071, 421079, 421088, 421096, 421105, 421114, - 421124, 421132, 421141, 421150, 421160, 421169, 421179, 421189, - 421200, 421207, 421215, 421223, 421232, 421240, 421249, 421258, - 421268, 421276, 421285, 421294, 421304, 421313, 421323, 421333, - 421344, 421352, 421361, 421370, 421380, 421389, 421399, 421409, - 421420, 421429, 421439, 421449, 421460, 421470, 421481, 421492, - 421504, 421511, 421519, 421527, 421536, 421544, 421553, 421562, - 421572, 421580, 421589, 421598, 421608, 421617, 421627, 421637, - 421648, 421656, 421665, 421674, 421684, 421693, 421703, 421713, - 421724, 421733, 421743, 421753, 421764, 421774, 421785, 421796, - 421808, 421816, 421825, 421834, 421844, 421853, 421863, 421873, - 421884, 421893, 421903, 421913, 421924, 421934, 421945, 421956, - 421968, 421977, 421987, 421997, 422008, 422018, 422029, 422040, - 422052, 422062, 422073, 422084, 422096, 422107, 422119, 422131, - 422144, 422149, 422155, 422161, 422168, 422174, 422181, 422188, - 422196, 422202, 422209, 422216, 422224, 422231, 422239, 422247, - 422256, 422262, 422269, 422276, 422284, 422291, 422299, 422307, - 422316, 422323, 422331, 422339, 422348, 422356, 422365, 422374, - 422384, 422390, 422397, 422404, 422412, 422419, 422427, 422435, - 422444, 422451, 422459, 422467, 422476, 422484, 422493, 422502, - 422512, 422519, 422527, 422535, 422544, 422552, 422561, 422570, - 422580, 422588, 422597, 422606, 422616, 422625, 422635, 422645, - 422656, 422662, 422669, 422676, 422684, 422691, 422699, 422707, - 422716, 422723, 422731, 422739, 422748, 422756, 422765, 422774, - 422784, 422791, 422799, 422807, 422816, 422824, 422833, 422842, - 422852, 422860, 422869, 422878, 422888, 422897, 422907, 422917, - 422928, 422935, 422943, 422951, 422960, 422968, 422977, 422986, - 422996, 423004, 423013, 423022, 423032, 423041, 423051, 423061, - 423072, 423080, 423089, 423098, 423108, 423117, 423127, 423137, - 423148, 423157, 423167, 423177, 423188, 423198, 423209, 423220, - 423232, 423238, 423245, 423252, 423260, 423267, 423275, 423283, - 423292, 423299, 423307, 423315, 423324, 423332, 423341, 423350, - 423360, 423367, 423375, 423383, 423392, 423400, 423409, 423418, - 423428, 423436, 423445, 423454, 423464, 423473, 423483, 423493, - 423504, 423511, 423519, 423527, 423536, 423544, 423553, 423562, - 423572, 423580, 423589, 423598, 423608, 423617, 423627, 423637, - 423648, 423656, 423665, 423674, 423684, 423693, 423703, 423713, - 423724, 423733, 423743, 423753, 423764, 423774, 423785, 423796, - 423808, 423815, 423823, 423831, 423840, 423848, 423857, 423866, - 423876, 423884, 423893, 423902, 423912, 423921, 423931, 423941, - 423952, 423960, 423969, 423978, 423988, 423997, 424007, 424017, - 424028, 424037, 424047, 424057, 424068, 424078, 424089, 424100, - 424112, 424120, 424129, 424138, 424148, 424157, 424167, 424177, - 424188, 424197, 424207, 424217, 424228, 424238, 424249, 424260, - 424272, 424281, 424291, 424301, 424312, 424322, 424333, 424344, - 424356, 424366, 424377, 424388, 424400, 424411, 424423, 424435, - 424448, 424454, 424461, 424468, 424476, 424483, 424491, 424499, - 424508, 424515, 424523, 424531, 424540, 424548, 424557, 424566, - 424576, 424583, 424591, 424599, 424608, 424616, 424625, 424634, - 424644, 424652, 424661, 424670, 424680, 424689, 424699, 424709, - 424720, 424727, 424735, 424743, 424752, 424760, 424769, 424778, - 424788, 424796, 424805, 424814, 424824, 424833, 424843, 424853, - 424864, 424872, 424881, 424890, 424900, 424909, 424919, 424929, - 424940, 424949, 424959, 424969, 424980, 424990, 425001, 425012, - 425024, 425031, 425039, 425047, 425056, 425064, 425073, 425082, - 425092, 425100, 425109, 425118, 425128, 425137, 425147, 425157, - 425168, 425176, 425185, 425194, 425204, 425213, 425223, 425233, - 425244, 425253, 425263, 425273, 425284, 425294, 425305, 425316, - 425328, 425336, 425345, 425354, 425364, 425373, 425383, 425393, - 425404, 425413, 425423, 425433, 425444, 425454, 425465, 425476, - 425488, 425497, 425507, 425517, 425528, 425538, 425549, 425560, - 425572, 425582, 425593, 425604, 425616, 425627, 425639, 425651, - 425664, 425671, 425679, 425687, 425696, 425704, 425713, 425722, - 425732, 425740, 425749, 425758, 425768, 425777, 425787, 425797, - 425808, 425816, 425825, 425834, 425844, 425853, 425863, 425873, - 425884, 425893, 425903, 425913, 425924, 425934, 425945, 425956, - 425968, 425976, 425985, 425994, 426004, 426013, 426023, 426033, - 426044, 426053, 426063, 426073, 426084, 426094, 426105, 426116, - 426128, 426137, 426147, 426157, 426168, 426178, 426189, 426200, - 426212, 426222, 426233, 426244, 426256, 426267, 426279, 426291, - 426304, 426312, 426321, 426330, 426340, 426349, 426359, 426369, - 426380, 426389, 426399, 426409, 426420, 426430, 426441, 426452, - 426464, 426473, 426483, 426493, 426504, 426514, 426525, 426536, - 426548, 426558, 426569, 426580, 426592, 426603, 426615, 426627, - 426640, 426649, 426659, 426669, 426680, 426690, 426701, 426712, - 426724, 426734, 426745, 426756, 426768, 426779, 426791, 426803, - 426816, 426826, 426837, 426848, 426860, 426871, 426883, 426895, - 426908, 426919, 426931, 426943, 426956, 426968, 426981, 426994, - 427008, 427012, 427017, 427022, 427028, 427033, 427039, 427045, - 427052, 427057, 427063, 427069, 427076, 427082, 427089, 427096, - 427104, 427109, 427115, 427121, 427128, 427134, 427141, 427148, - 427156, 427162, 427169, 427176, 427184, 427191, 427199, 427207, - 427216, 427221, 427227, 427233, 427240, 427246, 427253, 427260, - 427268, 427274, 427281, 427288, 427296, 427303, 427311, 427319, - 427328, 427334, 427341, 427348, 427356, 427363, 427371, 427379, - 427388, 427395, 427403, 427411, 427420, 427428, 427437, 427446, - 427456, 427461, 427467, 427473, 427480, 427486, 427493, 427500, - 427508, 427514, 427521, 427528, 427536, 427543, 427551, 427559, - 427568, 427574, 427581, 427588, 427596, 427603, 427611, 427619, - 427628, 427635, 427643, 427651, 427660, 427668, 427677, 427686, - 427696, 427702, 427709, 427716, 427724, 427731, 427739, 427747, - 427756, 427763, 427771, 427779, 427788, 427796, 427805, 427814, - 427824, 427831, 427839, 427847, 427856, 427864, 427873, 427882, - 427892, 427900, 427909, 427918, 427928, 427937, 427947, 427957, - 427968, 427973, 427979, 427985, 427992, 427998, 428005, 428012, - 428020, 428026, 428033, 428040, 428048, 428055, 428063, 428071, - 428080, 428086, 428093, 428100, 428108, 428115, 428123, 428131, - 428140, 428147, 428155, 428163, 428172, 428180, 428189, 428198, - 428208, 428214, 428221, 428228, 428236, 428243, 428251, 428259, - 428268, 428275, 428283, 428291, 428300, 428308, 428317, 428326, - 428336, 428343, 428351, 428359, 428368, 428376, 428385, 428394, - 428404, 428412, 428421, 428430, 428440, 428449, 428459, 428469, - 428480, 428486, 428493, 428500, 428508, 428515, 428523, 428531, - 428540, 428547, 428555, 428563, 428572, 428580, 428589, 428598, - 428608, 428615, 428623, 428631, 428640, 428648, 428657, 428666, - 428676, 428684, 428693, 428702, 428712, 428721, 428731, 428741, - 428752, 428759, 428767, 428775, 428784, 428792, 428801, 428810, - 428820, 428828, 428837, 428846, 428856, 428865, 428875, 428885, - 428896, 428904, 428913, 428922, 428932, 428941, 428951, 428961, - 428972, 428981, 428991, 429001, 429012, 429022, 429033, 429044, - 429056, 429061, 429067, 429073, 429080, 429086, 429093, 429100, - 429108, 429114, 429121, 429128, 429136, 429143, 429151, 429159, - 429168, 429174, 429181, 429188, 429196, 429203, 429211, 429219, - 429228, 429235, 429243, 429251, 429260, 429268, 429277, 429286, - 429296, 429302, 429309, 429316, 429324, 429331, 429339, 429347, - 429356, 429363, 429371, 429379, 429388, 429396, 429405, 429414, - 429424, 429431, 429439, 429447, 429456, 429464, 429473, 429482, - 429492, 429500, 429509, 429518, 429528, 429537, 429547, 429557, - 429568, 429574, 429581, 429588, 429596, 429603, 429611, 429619, - 429628, 429635, 429643, 429651, 429660, 429668, 429677, 429686, - 429696, 429703, 429711, 429719, 429728, 429736, 429745, 429754, - 429764, 429772, 429781, 429790, 429800, 429809, 429819, 429829, - 429840, 429847, 429855, 429863, 429872, 429880, 429889, 429898, - 429908, 429916, 429925, 429934, 429944, 429953, 429963, 429973, - 429984, 429992, 430001, 430010, 430020, 430029, 430039, 430049, - 430060, 430069, 430079, 430089, 430100, 430110, 430121, 430132, - 430144, 430150, 430157, 430164, 430172, 430179, 430187, 430195, - 430204, 430211, 430219, 430227, 430236, 430244, 430253, 430262, - 430272, 430279, 430287, 430295, 430304, 430312, 430321, 430330, - 430340, 430348, 430357, 430366, 430376, 430385, 430395, 430405, - 430416, 430423, 430431, 430439, 430448, 430456, 430465, 430474, - 430484, 430492, 430501, 430510, 430520, 430529, 430539, 430549, - 430560, 430568, 430577, 430586, 430596, 430605, 430615, 430625, - 430636, 430645, 430655, 430665, 430676, 430686, 430697, 430708, - 430720, 430727, 430735, 430743, 430752, 430760, 430769, 430778, - 430788, 430796, 430805, 430814, 430824, 430833, 430843, 430853, - 430864, 430872, 430881, 430890, 430900, 430909, 430919, 430929, - 430940, 430949, 430959, 430969, 430980, 430990, 431001, 431012, - 431024, 431032, 431041, 431050, 431060, 431069, 431079, 431089, - 431100, 431109, 431119, 431129, 431140, 431150, 431161, 431172, - 431184, 431193, 431203, 431213, 431224, 431234, 431245, 431256, - 431268, 431278, 431289, 431300, 431312, 431323, 431335, 431347, - 431360, 431365, 431371, 431377, 431384, 431390, 431397, 431404, - 431412, 431418, 431425, 431432, 431440, 431447, 431455, 431463, - 431472, 431478, 431485, 431492, 431500, 431507, 431515, 431523, - 431532, 431539, 431547, 431555, 431564, 431572, 431581, 431590, - 431600, 431606, 431613, 431620, 431628, 431635, 431643, 431651, - 431660, 431667, 431675, 431683, 431692, 431700, 431709, 431718, - 431728, 431735, 431743, 431751, 431760, 431768, 431777, 431786, - 431796, 431804, 431813, 431822, 431832, 431841, 431851, 431861, - 431872, 431878, 431885, 431892, 431900, 431907, 431915, 431923, - 431932, 431939, 431947, 431955, 431964, 431972, 431981, 431990, - 432000, 432007, 432015, 432023, 432032, 432040, 432049, 432058, - 432068, 432076, 432085, 432094, 432104, 432113, 432123, 432133, - 432144, 432151, 432159, 432167, 432176, 432184, 432193, 432202, - 432212, 432220, 432229, 432238, 432248, 432257, 432267, 432277, - 432288, 432296, 432305, 432314, 432324, 432333, 432343, 432353, - 432364, 432373, 432383, 432393, 432404, 432414, 432425, 432436, - 432448, 432454, 432461, 432468, 432476, 432483, 432491, 432499, - 432508, 432515, 432523, 432531, 432540, 432548, 432557, 432566, - 432576, 432583, 432591, 432599, 432608, 432616, 432625, 432634, - 432644, 432652, 432661, 432670, 432680, 432689, 432699, 432709, - 432720, 432727, 432735, 432743, 432752, 432760, 432769, 432778, - 432788, 432796, 432805, 432814, 432824, 432833, 432843, 432853, - 432864, 432872, 432881, 432890, 432900, 432909, 432919, 432929, - 432940, 432949, 432959, 432969, 432980, 432990, 433001, 433012, - 433024, 433031, 433039, 433047, 433056, 433064, 433073, 433082, - 433092, 433100, 433109, 433118, 433128, 433137, 433147, 433157, - 433168, 433176, 433185, 433194, 433204, 433213, 433223, 433233, - 433244, 433253, 433263, 433273, 433284, 433294, 433305, 433316, - 433328, 433336, 433345, 433354, 433364, 433373, 433383, 433393, - 433404, 433413, 433423, 433433, 433444, 433454, 433465, 433476, - 433488, 433497, 433507, 433517, 433528, 433538, 433549, 433560, - 433572, 433582, 433593, 433604, 433616, 433627, 433639, 433651, - 433664, 433670, 433677, 433684, 433692, 433699, 433707, 433715, - 433724, 433731, 433739, 433747, 433756, 433764, 433773, 433782, - 433792, 433799, 433807, 433815, 433824, 433832, 433841, 433850, - 433860, 433868, 433877, 433886, 433896, 433905, 433915, 433925, - 433936, 433943, 433951, 433959, 433968, 433976, 433985, 433994, - 434004, 434012, 434021, 434030, 434040, 434049, 434059, 434069, - 434080, 434088, 434097, 434106, 434116, 434125, 434135, 434145, - 434156, 434165, 434175, 434185, 434196, 434206, 434217, 434228, - 434240, 434247, 434255, 434263, 434272, 434280, 434289, 434298, - 434308, 434316, 434325, 434334, 434344, 434353, 434363, 434373, - 434384, 434392, 434401, 434410, 434420, 434429, 434439, 434449, - 434460, 434469, 434479, 434489, 434500, 434510, 434521, 434532, - 434544, 434552, 434561, 434570, 434580, 434589, 434599, 434609, - 434620, 434629, 434639, 434649, 434660, 434670, 434681, 434692, - 434704, 434713, 434723, 434733, 434744, 434754, 434765, 434776, - 434788, 434798, 434809, 434820, 434832, 434843, 434855, 434867, - 434880, 434887, 434895, 434903, 434912, 434920, 434929, 434938, - 434948, 434956, 434965, 434974, 434984, 434993, 435003, 435013, - 435024, 435032, 435041, 435050, 435060, 435069, 435079, 435089, - 435100, 435109, 435119, 435129, 435140, 435150, 435161, 435172, - 435184, 435192, 435201, 435210, 435220, 435229, 435239, 435249, - 435260, 435269, 435279, 435289, 435300, 435310, 435321, 435332, - 435344, 435353, 435363, 435373, 435384, 435394, 435405, 435416, - 435428, 435438, 435449, 435460, 435472, 435483, 435495, 435507, - 435520, 435528, 435537, 435546, 435556, 435565, 435575, 435585, - 435596, 435605, 435615, 435625, 435636, 435646, 435657, 435668, - 435680, 435689, 435699, 435709, 435720, 435730, 435741, 435752, - 435764, 435774, 435785, 435796, 435808, 435819, 435831, 435843, - 435856, 435865, 435875, 435885, 435896, 435906, 435917, 435928, - 435940, 435950, 435961, 435972, 435984, 435995, 436007, 436019, - 436032, 436042, 436053, 436064, 436076, 436087, 436099, 436111, - 436124, 436135, 436147, 436159, 436172, 436184, 436197, 436210, - 436224, 436229, 436235, 436241, 436248, 436254, 436261, 436268, - 436276, 436282, 436289, 436296, 436304, 436311, 436319, 436327, - 436336, 436342, 436349, 436356, 436364, 436371, 436379, 436387, - 436396, 436403, 436411, 436419, 436428, 436436, 436445, 436454, - 436464, 436470, 436477, 436484, 436492, 436499, 436507, 436515, - 436524, 436531, 436539, 436547, 436556, 436564, 436573, 436582, - 436592, 436599, 436607, 436615, 436624, 436632, 436641, 436650, - 436660, 436668, 436677, 436686, 436696, 436705, 436715, 436725, - 436736, 436742, 436749, 436756, 436764, 436771, 436779, 436787, - 436796, 436803, 436811, 436819, 436828, 436836, 436845, 436854, - 436864, 436871, 436879, 436887, 436896, 436904, 436913, 436922, - 436932, 436940, 436949, 436958, 436968, 436977, 436987, 436997, - 437008, 437015, 437023, 437031, 437040, 437048, 437057, 437066, - 437076, 437084, 437093, 437102, 437112, 437121, 437131, 437141, - 437152, 437160, 437169, 437178, 437188, 437197, 437207, 437217, - 437228, 437237, 437247, 437257, 437268, 437278, 437289, 437300, - 437312, 437318, 437325, 437332, 437340, 437347, 437355, 437363, - 437372, 437379, 437387, 437395, 437404, 437412, 437421, 437430, - 437440, 437447, 437455, 437463, 437472, 437480, 437489, 437498, - 437508, 437516, 437525, 437534, 437544, 437553, 437563, 437573, - 437584, 437591, 437599, 437607, 437616, 437624, 437633, 437642, - 437652, 437660, 437669, 437678, 437688, 437697, 437707, 437717, - 437728, 437736, 437745, 437754, 437764, 437773, 437783, 437793, - 437804, 437813, 437823, 437833, 437844, 437854, 437865, 437876, - 437888, 437895, 437903, 437911, 437920, 437928, 437937, 437946, - 437956, 437964, 437973, 437982, 437992, 438001, 438011, 438021, - 438032, 438040, 438049, 438058, 438068, 438077, 438087, 438097, - 438108, 438117, 438127, 438137, 438148, 438158, 438169, 438180, - 438192, 438200, 438209, 438218, 438228, 438237, 438247, 438257, - 438268, 438277, 438287, 438297, 438308, 438318, 438329, 438340, - 438352, 438361, 438371, 438381, 438392, 438402, 438413, 438424, - 438436, 438446, 438457, 438468, 438480, 438491, 438503, 438515, - 438528, 438534, 438541, 438548, 438556, 438563, 438571, 438579, - 438588, 438595, 438603, 438611, 438620, 438628, 438637, 438646, - 438656, 438663, 438671, 438679, 438688, 438696, 438705, 438714, - 438724, 438732, 438741, 438750, 438760, 438769, 438779, 438789, - 438800, 438807, 438815, 438823, 438832, 438840, 438849, 438858, - 438868, 438876, 438885, 438894, 438904, 438913, 438923, 438933, - 438944, 438952, 438961, 438970, 438980, 438989, 438999, 439009, - 439020, 439029, 439039, 439049, 439060, 439070, 439081, 439092, - 439104, 439111, 439119, 439127, 439136, 439144, 439153, 439162, - 439172, 439180, 439189, 439198, 439208, 439217, 439227, 439237, - 439248, 439256, 439265, 439274, 439284, 439293, 439303, 439313, - 439324, 439333, 439343, 439353, 439364, 439374, 439385, 439396, - 439408, 439416, 439425, 439434, 439444, 439453, 439463, 439473, - 439484, 439493, 439503, 439513, 439524, 439534, 439545, 439556, - 439568, 439577, 439587, 439597, 439608, 439618, 439629, 439640, - 439652, 439662, 439673, 439684, 439696, 439707, 439719, 439731, - 439744, 439751, 439759, 439767, 439776, 439784, 439793, 439802, - 439812, 439820, 439829, 439838, 439848, 439857, 439867, 439877, - 439888, 439896, 439905, 439914, 439924, 439933, 439943, 439953, - 439964, 439973, 439983, 439993, 440004, 440014, 440025, 440036, - 440048, 440056, 440065, 440074, 440084, 440093, 440103, 440113, - 440124, 440133, 440143, 440153, 440164, 440174, 440185, 440196, - 440208, 440217, 440227, 440237, 440248, 440258, 440269, 440280, - 440292, 440302, 440313, 440324, 440336, 440347, 440359, 440371, - 440384, 440392, 440401, 440410, 440420, 440429, 440439, 440449, - 440460, 440469, 440479, 440489, 440500, 440510, 440521, 440532, - 440544, 440553, 440563, 440573, 440584, 440594, 440605, 440616, - 440628, 440638, 440649, 440660, 440672, 440683, 440695, 440707, - 440720, 440729, 440739, 440749, 440760, 440770, 440781, 440792, - 440804, 440814, 440825, 440836, 440848, 440859, 440871, 440883, - 440896, 440906, 440917, 440928, 440940, 440951, 440963, 440975, - 440988, 440999, 441011, 441023, 441036, 441048, 441061, 441074, - 441088, 441094, 441101, 441108, 441116, 441123, 441131, 441139, - 441148, 441155, 441163, 441171, 441180, 441188, 441197, 441206, - 441216, 441223, 441231, 441239, 441248, 441256, 441265, 441274, - 441284, 441292, 441301, 441310, 441320, 441329, 441339, 441349, - 441360, 441367, 441375, 441383, 441392, 441400, 441409, 441418, - 441428, 441436, 441445, 441454, 441464, 441473, 441483, 441493, - 441504, 441512, 441521, 441530, 441540, 441549, 441559, 441569, - 441580, 441589, 441599, 441609, 441620, 441630, 441641, 441652, - 441664, 441671, 441679, 441687, 441696, 441704, 441713, 441722, - 441732, 441740, 441749, 441758, 441768, 441777, 441787, 441797, - 441808, 441816, 441825, 441834, 441844, 441853, 441863, 441873, - 441884, 441893, 441903, 441913, 441924, 441934, 441945, 441956, - 441968, 441976, 441985, 441994, 442004, 442013, 442023, 442033, - 442044, 442053, 442063, 442073, 442084, 442094, 442105, 442116, - 442128, 442137, 442147, 442157, 442168, 442178, 442189, 442200, - 442212, 442222, 442233, 442244, 442256, 442267, 442279, 442291, - 442304, 442311, 442319, 442327, 442336, 442344, 442353, 442362, - 442372, 442380, 442389, 442398, 442408, 442417, 442427, 442437, - 442448, 442456, 442465, 442474, 442484, 442493, 442503, 442513, - 442524, 442533, 442543, 442553, 442564, 442574, 442585, 442596, - 442608, 442616, 442625, 442634, 442644, 442653, 442663, 442673, - 442684, 442693, 442703, 442713, 442724, 442734, 442745, 442756, - 442768, 442777, 442787, 442797, 442808, 442818, 442829, 442840, - 442852, 442862, 442873, 442884, 442896, 442907, 442919, 442931, - 442944, 442952, 442961, 442970, 442980, 442989, 442999, 443009, - 443020, 443029, 443039, 443049, 443060, 443070, 443081, 443092, - 443104, 443113, 443123, 443133, 443144, 443154, 443165, 443176, - 443188, 443198, 443209, 443220, 443232, 443243, 443255, 443267, - 443280, 443289, 443299, 443309, 443320, 443330, 443341, 443352, - 443364, 443374, 443385, 443396, 443408, 443419, 443431, 443443, - 443456, 443466, 443477, 443488, 443500, 443511, 443523, 443535, - 443548, 443559, 443571, 443583, 443596, 443608, 443621, 443634, - 443648, 443655, 443663, 443671, 443680, 443688, 443697, 443706, - 443716, 443724, 443733, 443742, 443752, 443761, 443771, 443781, - 443792, 443800, 443809, 443818, 443828, 443837, 443847, 443857, - 443868, 443877, 443887, 443897, 443908, 443918, 443929, 443940, - 443952, 443960, 443969, 443978, 443988, 443997, 444007, 444017, - 444028, 444037, 444047, 444057, 444068, 444078, 444089, 444100, - 444112, 444121, 444131, 444141, 444152, 444162, 444173, 444184, - 444196, 444206, 444217, 444228, 444240, 444251, 444263, 444275, - 444288, 444296, 444305, 444314, 444324, 444333, 444343, 444353, - 444364, 444373, 444383, 444393, 444404, 444414, 444425, 444436, - 444448, 444457, 444467, 444477, 444488, 444498, 444509, 444520, - 444532, 444542, 444553, 444564, 444576, 444587, 444599, 444611, - 444624, 444633, 444643, 444653, 444664, 444674, 444685, 444696, - 444708, 444718, 444729, 444740, 444752, 444763, 444775, 444787, - 444800, 444810, 444821, 444832, 444844, 444855, 444867, 444879, - 444892, 444903, 444915, 444927, 444940, 444952, 444965, 444978, - 444992, 445000, 445009, 445018, 445028, 445037, 445047, 445057, - 445068, 445077, 445087, 445097, 445108, 445118, 445129, 445140, - 445152, 445161, 445171, 445181, 445192, 445202, 445213, 445224, - 445236, 445246, 445257, 445268, 445280, 445291, 445303, 445315, - 445328, 445337, 445347, 445357, 445368, 445378, 445389, 445400, - 445412, 445422, 445433, 445444, 445456, 445467, 445479, 445491, - 445504, 445514, 445525, 445536, 445548, 445559, 445571, 445583, - 445596, 445607, 445619, 445631, 445644, 445656, 445669, 445682, - 445696, 445705, 445715, 445725, 445736, 445746, 445757, 445768, - 445780, 445790, 445801, 445812, 445824, 445835, 445847, 445859, - 445872, 445882, 445893, 445904, 445916, 445927, 445939, 445951, - 445964, 445975, 445987, 445999, 446012, 446024, 446037, 446050, - 446064, 446074, 446085, 446096, 446108, 446119, 446131, 446143, - 446156, 446167, 446179, 446191, 446204, 446216, 446229, 446242, - 446256, 446267, 446279, 446291, 446304, 446316, 446329, 446342, - 446356, 446368, 446381, 446394, 446408, 446421, 446435, 446449, - 446464, 446467, 446471, 446475, 446480, 446484, 446489, 446494, - 446500, 446504, 446509, 446514, 446520, 446525, 446531, 446537, - 446544, 446548, 446553, 446558, 446564, 446569, 446575, 446581, - 446588, 446593, 446599, 446605, 446612, 446618, 446625, 446632, - 446640, 446644, 446649, 446654, 446660, 446665, 446671, 446677, - 446684, 446689, 446695, 446701, 446708, 446714, 446721, 446728, - 446736, 446741, 446747, 446753, 446760, 446766, 446773, 446780, - 446788, 446794, 446801, 446808, 446816, 446823, 446831, 446839, - 446848, 446852, 446857, 446862, 446868, 446873, 446879, 446885, - 446892, 446897, 446903, 446909, 446916, 446922, 446929, 446936, - 446944, 446949, 446955, 446961, 446968, 446974, 446981, 446988, - 446996, 447002, 447009, 447016, 447024, 447031, 447039, 447047, - 447056, 447061, 447067, 447073, 447080, 447086, 447093, 447100, - 447108, 447114, 447121, 447128, 447136, 447143, 447151, 447159, - 447168, 447174, 447181, 447188, 447196, 447203, 447211, 447219, - 447228, 447235, 447243, 447251, 447260, 447268, 447277, 447286, - 447296, 447300, 447305, 447310, 447316, 447321, 447327, 447333, - 447340, 447345, 447351, 447357, 447364, 447370, 447377, 447384, - 447392, 447397, 447403, 447409, 447416, 447422, 447429, 447436, - 447444, 447450, 447457, 447464, 447472, 447479, 447487, 447495, - 447504, 447509, 447515, 447521, 447528, 447534, 447541, 447548, - 447556, 447562, 447569, 447576, 447584, 447591, 447599, 447607, - 447616, 447622, 447629, 447636, 447644, 447651, 447659, 447667, - 447676, 447683, 447691, 447699, 447708, 447716, 447725, 447734, - 447744, 447749, 447755, 447761, 447768, 447774, 447781, 447788, - 447796, 447802, 447809, 447816, 447824, 447831, 447839, 447847, - 447856, 447862, 447869, 447876, 447884, 447891, 447899, 447907, - 447916, 447923, 447931, 447939, 447948, 447956, 447965, 447974, - 447984, 447990, 447997, 448004, 448012, 448019, 448027, 448035, - 448044, 448051, 448059, 448067, 448076, 448084, 448093, 448102, - 448112, 448119, 448127, 448135, 448144, 448152, 448161, 448170, - 448180, 448188, 448197, 448206, 448216, 448225, 448235, 448245, - 448256, 448260, 448265, 448270, 448276, 448281, 448287, 448293, - 448300, 448305, 448311, 448317, 448324, 448330, 448337, 448344, - 448352, 448357, 448363, 448369, 448376, 448382, 448389, 448396, - 448404, 448410, 448417, 448424, 448432, 448439, 448447, 448455, - 448464, 448469, 448475, 448481, 448488, 448494, 448501, 448508, - 448516, 448522, 448529, 448536, 448544, 448551, 448559, 448567, - 448576, 448582, 448589, 448596, 448604, 448611, 448619, 448627, - 448636, 448643, 448651, 448659, 448668, 448676, 448685, 448694, - 448704, 448709, 448715, 448721, 448728, 448734, 448741, 448748, - 448756, 448762, 448769, 448776, 448784, 448791, 448799, 448807, - 448816, 448822, 448829, 448836, 448844, 448851, 448859, 448867, - 448876, 448883, 448891, 448899, 448908, 448916, 448925, 448934, - 448944, 448950, 448957, 448964, 448972, 448979, 448987, 448995, - 449004, 449011, 449019, 449027, 449036, 449044, 449053, 449062, - 449072, 449079, 449087, 449095, 449104, 449112, 449121, 449130, - 449140, 449148, 449157, 449166, 449176, 449185, 449195, 449205, - 449216, 449221, 449227, 449233, 449240, 449246, 449253, 449260, - 449268, 449274, 449281, 449288, 449296, 449303, 449311, 449319, - 449328, 449334, 449341, 449348, 449356, 449363, 449371, 449379, - 449388, 449395, 449403, 449411, 449420, 449428, 449437, 449446, - 449456, 449462, 449469, 449476, 449484, 449491, 449499, 449507, - 449516, 449523, 449531, 449539, 449548, 449556, 449565, 449574, - 449584, 449591, 449599, 449607, 449616, 449624, 449633, 449642, - 449652, 449660, 449669, 449678, 449688, 449697, 449707, 449717, - 449728, 449734, 449741, 449748, 449756, 449763, 449771, 449779, - 449788, 449795, 449803, 449811, 449820, 449828, 449837, 449846, - 449856, 449863, 449871, 449879, 449888, 449896, 449905, 449914, - 449924, 449932, 449941, 449950, 449960, 449969, 449979, 449989, - 450000, 450007, 450015, 450023, 450032, 450040, 450049, 450058, - 450068, 450076, 450085, 450094, 450104, 450113, 450123, 450133, - 450144, 450152, 450161, 450170, 450180, 450189, 450199, 450209, - 450220, 450229, 450239, 450249, 450260, 450270, 450281, 450292, - 450304, 450308, 450313, 450318, 450324, 450329, 450335, 450341, - 450348, 450353, 450359, 450365, 450372, 450378, 450385, 450392, - 450400, 450405, 450411, 450417, 450424, 450430, 450437, 450444, - 450452, 450458, 450465, 450472, 450480, 450487, 450495, 450503, - 450512, 450517, 450523, 450529, 450536, 450542, 450549, 450556, - 450564, 450570, 450577, 450584, 450592, 450599, 450607, 450615, - 450624, 450630, 450637, 450644, 450652, 450659, 450667, 450675, - 450684, 450691, 450699, 450707, 450716, 450724, 450733, 450742, - 450752, 450757, 450763, 450769, 450776, 450782, 450789, 450796, - 450804, 450810, 450817, 450824, 450832, 450839, 450847, 450855, - 450864, 450870, 450877, 450884, 450892, 450899, 450907, 450915, - 450924, 450931, 450939, 450947, 450956, 450964, 450973, 450982, - 450992, 450998, 451005, 451012, 451020, 451027, 451035, 451043, - 451052, 451059, 451067, 451075, 451084, 451092, 451101, 451110, - 451120, 451127, 451135, 451143, 451152, 451160, 451169, 451178, - 451188, 451196, 451205, 451214, 451224, 451233, 451243, 451253, - 451264, 451269, 451275, 451281, 451288, 451294, 451301, 451308, - 451316, 451322, 451329, 451336, 451344, 451351, 451359, 451367, - 451376, 451382, 451389, 451396, 451404, 451411, 451419, 451427, - 451436, 451443, 451451, 451459, 451468, 451476, 451485, 451494, - 451504, 451510, 451517, 451524, 451532, 451539, 451547, 451555, - 451564, 451571, 451579, 451587, 451596, 451604, 451613, 451622, - 451632, 451639, 451647, 451655, 451664, 451672, 451681, 451690, - 451700, 451708, 451717, 451726, 451736, 451745, 451755, 451765, - 451776, 451782, 451789, 451796, 451804, 451811, 451819, 451827, - 451836, 451843, 451851, 451859, 451868, 451876, 451885, 451894, - 451904, 451911, 451919, 451927, 451936, 451944, 451953, 451962, - 451972, 451980, 451989, 451998, 452008, 452017, 452027, 452037, - 452048, 452055, 452063, 452071, 452080, 452088, 452097, 452106, - 452116, 452124, 452133, 452142, 452152, 452161, 452171, 452181, - 452192, 452200, 452209, 452218, 452228, 452237, 452247, 452257, - 452268, 452277, 452287, 452297, 452308, 452318, 452329, 452340, - 452352, 452357, 452363, 452369, 452376, 452382, 452389, 452396, - 452404, 452410, 452417, 452424, 452432, 452439, 452447, 452455, - 452464, 452470, 452477, 452484, 452492, 452499, 452507, 452515, - 452524, 452531, 452539, 452547, 452556, 452564, 452573, 452582, - 452592, 452598, 452605, 452612, 452620, 452627, 452635, 452643, - 452652, 452659, 452667, 452675, 452684, 452692, 452701, 452710, - 452720, 452727, 452735, 452743, 452752, 452760, 452769, 452778, - 452788, 452796, 452805, 452814, 452824, 452833, 452843, 452853, - 452864, 452870, 452877, 452884, 452892, 452899, 452907, 452915, - 452924, 452931, 452939, 452947, 452956, 452964, 452973, 452982, - 452992, 452999, 453007, 453015, 453024, 453032, 453041, 453050, - 453060, 453068, 453077, 453086, 453096, 453105, 453115, 453125, - 453136, 453143, 453151, 453159, 453168, 453176, 453185, 453194, - 453204, 453212, 453221, 453230, 453240, 453249, 453259, 453269, - 453280, 453288, 453297, 453306, 453316, 453325, 453335, 453345, - 453356, 453365, 453375, 453385, 453396, 453406, 453417, 453428, - 453440, 453446, 453453, 453460, 453468, 453475, 453483, 453491, - 453500, 453507, 453515, 453523, 453532, 453540, 453549, 453558, - 453568, 453575, 453583, 453591, 453600, 453608, 453617, 453626, - 453636, 453644, 453653, 453662, 453672, 453681, 453691, 453701, - 453712, 453719, 453727, 453735, 453744, 453752, 453761, 453770, - 453780, 453788, 453797, 453806, 453816, 453825, 453835, 453845, - 453856, 453864, 453873, 453882, 453892, 453901, 453911, 453921, - 453932, 453941, 453951, 453961, 453972, 453982, 453993, 454004, - 454016, 454023, 454031, 454039, 454048, 454056, 454065, 454074, - 454084, 454092, 454101, 454110, 454120, 454129, 454139, 454149, - 454160, 454168, 454177, 454186, 454196, 454205, 454215, 454225, - 454236, 454245, 454255, 454265, 454276, 454286, 454297, 454308, - 454320, 454328, 454337, 454346, 454356, 454365, 454375, 454385, - 454396, 454405, 454415, 454425, 454436, 454446, 454457, 454468, - 454480, 454489, 454499, 454509, 454520, 454530, 454541, 454552, - 454564, 454574, 454585, 454596, 454608, 454619, 454631, 454643, - 454656, 454660, 454665, 454670, 454676, 454681, 454687, 454693, - 454700, 454705, 454711, 454717, 454724, 454730, 454737, 454744, - 454752, 454757, 454763, 454769, 454776, 454782, 454789, 454796, - 454804, 454810, 454817, 454824, 454832, 454839, 454847, 454855, - 454864, 454869, 454875, 454881, 454888, 454894, 454901, 454908, - 454916, 454922, 454929, 454936, 454944, 454951, 454959, 454967, - 454976, 454982, 454989, 454996, 455004, 455011, 455019, 455027, - 455036, 455043, 455051, 455059, 455068, 455076, 455085, 455094, - 455104, 455109, 455115, 455121, 455128, 455134, 455141, 455148, - 455156, 455162, 455169, 455176, 455184, 455191, 455199, 455207, - 455216, 455222, 455229, 455236, 455244, 455251, 455259, 455267, - 455276, 455283, 455291, 455299, 455308, 455316, 455325, 455334, - 455344, 455350, 455357, 455364, 455372, 455379, 455387, 455395, - 455404, 455411, 455419, 455427, 455436, 455444, 455453, 455462, - 455472, 455479, 455487, 455495, 455504, 455512, 455521, 455530, - 455540, 455548, 455557, 455566, 455576, 455585, 455595, 455605, - 455616, 455621, 455627, 455633, 455640, 455646, 455653, 455660, - 455668, 455674, 455681, 455688, 455696, 455703, 455711, 455719, - 455728, 455734, 455741, 455748, 455756, 455763, 455771, 455779, - 455788, 455795, 455803, 455811, 455820, 455828, 455837, 455846, - 455856, 455862, 455869, 455876, 455884, 455891, 455899, 455907, - 455916, 455923, 455931, 455939, 455948, 455956, 455965, 455974, - 455984, 455991, 455999, 456007, 456016, 456024, 456033, 456042, - 456052, 456060, 456069, 456078, 456088, 456097, 456107, 456117, - 456128, 456134, 456141, 456148, 456156, 456163, 456171, 456179, - 456188, 456195, 456203, 456211, 456220, 456228, 456237, 456246, - 456256, 456263, 456271, 456279, 456288, 456296, 456305, 456314, - 456324, 456332, 456341, 456350, 456360, 456369, 456379, 456389, - 456400, 456407, 456415, 456423, 456432, 456440, 456449, 456458, - 456468, 456476, 456485, 456494, 456504, 456513, 456523, 456533, - 456544, 456552, 456561, 456570, 456580, 456589, 456599, 456609, - 456620, 456629, 456639, 456649, 456660, 456670, 456681, 456692, - 456704, 456709, 456715, 456721, 456728, 456734, 456741, 456748, - 456756, 456762, 456769, 456776, 456784, 456791, 456799, 456807, - 456816, 456822, 456829, 456836, 456844, 456851, 456859, 456867, - 456876, 456883, 456891, 456899, 456908, 456916, 456925, 456934, - 456944, 456950, 456957, 456964, 456972, 456979, 456987, 456995, - 457004, 457011, 457019, 457027, 457036, 457044, 457053, 457062, - 457072, 457079, 457087, 457095, 457104, 457112, 457121, 457130, - 457140, 457148, 457157, 457166, 457176, 457185, 457195, 457205, - 457216, 457222, 457229, 457236, 457244, 457251, 457259, 457267, - 457276, 457283, 457291, 457299, 457308, 457316, 457325, 457334, - 457344, 457351, 457359, 457367, 457376, 457384, 457393, 457402, - 457412, 457420, 457429, 457438, 457448, 457457, 457467, 457477, - 457488, 457495, 457503, 457511, 457520, 457528, 457537, 457546, - 457556, 457564, 457573, 457582, 457592, 457601, 457611, 457621, - 457632, 457640, 457649, 457658, 457668, 457677, 457687, 457697, - 457708, 457717, 457727, 457737, 457748, 457758, 457769, 457780, - 457792, 457798, 457805, 457812, 457820, 457827, 457835, 457843, - 457852, 457859, 457867, 457875, 457884, 457892, 457901, 457910, - 457920, 457927, 457935, 457943, 457952, 457960, 457969, 457978, - 457988, 457996, 458005, 458014, 458024, 458033, 458043, 458053, - 458064, 458071, 458079, 458087, 458096, 458104, 458113, 458122, - 458132, 458140, 458149, 458158, 458168, 458177, 458187, 458197, - 458208, 458216, 458225, 458234, 458244, 458253, 458263, 458273, - 458284, 458293, 458303, 458313, 458324, 458334, 458345, 458356, - 458368, 458375, 458383, 458391, 458400, 458408, 458417, 458426, - 458436, 458444, 458453, 458462, 458472, 458481, 458491, 458501, - 458512, 458520, 458529, 458538, 458548, 458557, 458567, 458577, - 458588, 458597, 458607, 458617, 458628, 458638, 458649, 458660, - 458672, 458680, 458689, 458698, 458708, 458717, 458727, 458737, - 458748, 458757, 458767, 458777, 458788, 458798, 458809, 458820, - 458832, 458841, 458851, 458861, 458872, 458882, 458893, 458904, - 458916, 458926, 458937, 458948, 458960, 458971, 458983, 458995, - 459008, 459013, 459019, 459025, 459032, 459038, 459045, 459052, - 459060, 459066, 459073, 459080, 459088, 459095, 459103, 459111, - 459120, 459126, 459133, 459140, 459148, 459155, 459163, 459171, - 459180, 459187, 459195, 459203, 459212, 459220, 459229, 459238, - 459248, 459254, 459261, 459268, 459276, 459283, 459291, 459299, - 459308, 459315, 459323, 459331, 459340, 459348, 459357, 459366, - 459376, 459383, 459391, 459399, 459408, 459416, 459425, 459434, - 459444, 459452, 459461, 459470, 459480, 459489, 459499, 459509, - 459520, 459526, 459533, 459540, 459548, 459555, 459563, 459571, - 459580, 459587, 459595, 459603, 459612, 459620, 459629, 459638, - 459648, 459655, 459663, 459671, 459680, 459688, 459697, 459706, - 459716, 459724, 459733, 459742, 459752, 459761, 459771, 459781, - 459792, 459799, 459807, 459815, 459824, 459832, 459841, 459850, - 459860, 459868, 459877, 459886, 459896, 459905, 459915, 459925, - 459936, 459944, 459953, 459962, 459972, 459981, 459991, 460001, - 460012, 460021, 460031, 460041, 460052, 460062, 460073, 460084, - 460096, 460102, 460109, 460116, 460124, 460131, 460139, 460147, - 460156, 460163, 460171, 460179, 460188, 460196, 460205, 460214, - 460224, 460231, 460239, 460247, 460256, 460264, 460273, 460282, - 460292, 460300, 460309, 460318, 460328, 460337, 460347, 460357, - 460368, 460375, 460383, 460391, 460400, 460408, 460417, 460426, - 460436, 460444, 460453, 460462, 460472, 460481, 460491, 460501, - 460512, 460520, 460529, 460538, 460548, 460557, 460567, 460577, - 460588, 460597, 460607, 460617, 460628, 460638, 460649, 460660, - 460672, 460679, 460687, 460695, 460704, 460712, 460721, 460730, - 460740, 460748, 460757, 460766, 460776, 460785, 460795, 460805, - 460816, 460824, 460833, 460842, 460852, 460861, 460871, 460881, - 460892, 460901, 460911, 460921, 460932, 460942, 460953, 460964, - 460976, 460984, 460993, 461002, 461012, 461021, 461031, 461041, - 461052, 461061, 461071, 461081, 461092, 461102, 461113, 461124, - 461136, 461145, 461155, 461165, 461176, 461186, 461197, 461208, - 461220, 461230, 461241, 461252, 461264, 461275, 461287, 461299, - 461312, 461318, 461325, 461332, 461340, 461347, 461355, 461363, - 461372, 461379, 461387, 461395, 461404, 461412, 461421, 461430, - 461440, 461447, 461455, 461463, 461472, 461480, 461489, 461498, - 461508, 461516, 461525, 461534, 461544, 461553, 461563, 461573, - 461584, 461591, 461599, 461607, 461616, 461624, 461633, 461642, - 461652, 461660, 461669, 461678, 461688, 461697, 461707, 461717, - 461728, 461736, 461745, 461754, 461764, 461773, 461783, 461793, - 461804, 461813, 461823, 461833, 461844, 461854, 461865, 461876, - 461888, 461895, 461903, 461911, 461920, 461928, 461937, 461946, - 461956, 461964, 461973, 461982, 461992, 462001, 462011, 462021, - 462032, 462040, 462049, 462058, 462068, 462077, 462087, 462097, - 462108, 462117, 462127, 462137, 462148, 462158, 462169, 462180, - 462192, 462200, 462209, 462218, 462228, 462237, 462247, 462257, - 462268, 462277, 462287, 462297, 462308, 462318, 462329, 462340, - 462352, 462361, 462371, 462381, 462392, 462402, 462413, 462424, - 462436, 462446, 462457, 462468, 462480, 462491, 462503, 462515, - 462528, 462535, 462543, 462551, 462560, 462568, 462577, 462586, - 462596, 462604, 462613, 462622, 462632, 462641, 462651, 462661, - 462672, 462680, 462689, 462698, 462708, 462717, 462727, 462737, - 462748, 462757, 462767, 462777, 462788, 462798, 462809, 462820, - 462832, 462840, 462849, 462858, 462868, 462877, 462887, 462897, - 462908, 462917, 462927, 462937, 462948, 462958, 462969, 462980, - 462992, 463001, 463011, 463021, 463032, 463042, 463053, 463064, - 463076, 463086, 463097, 463108, 463120, 463131, 463143, 463155, - 463168, 463176, 463185, 463194, 463204, 463213, 463223, 463233, - 463244, 463253, 463263, 463273, 463284, 463294, 463305, 463316, - 463328, 463337, 463347, 463357, 463368, 463378, 463389, 463400, - 463412, 463422, 463433, 463444, 463456, 463467, 463479, 463491, - 463504, 463513, 463523, 463533, 463544, 463554, 463565, 463576, - 463588, 463598, 463609, 463620, 463632, 463643, 463655, 463667, - 463680, 463690, 463701, 463712, 463724, 463735, 463747, 463759, - 463772, 463783, 463795, 463807, 463820, 463832, 463845, 463858, - 463872, 463876, 463881, 463886, 463892, 463897, 463903, 463909, - 463916, 463921, 463927, 463933, 463940, 463946, 463953, 463960, - 463968, 463973, 463979, 463985, 463992, 463998, 464005, 464012, - 464020, 464026, 464033, 464040, 464048, 464055, 464063, 464071, - 464080, 464085, 464091, 464097, 464104, 464110, 464117, 464124, - 464132, 464138, 464145, 464152, 464160, 464167, 464175, 464183, - 464192, 464198, 464205, 464212, 464220, 464227, 464235, 464243, - 464252, 464259, 464267, 464275, 464284, 464292, 464301, 464310, - 464320, 464325, 464331, 464337, 464344, 464350, 464357, 464364, - 464372, 464378, 464385, 464392, 464400, 464407, 464415, 464423, - 464432, 464438, 464445, 464452, 464460, 464467, 464475, 464483, - 464492, 464499, 464507, 464515, 464524, 464532, 464541, 464550, - 464560, 464566, 464573, 464580, 464588, 464595, 464603, 464611, - 464620, 464627, 464635, 464643, 464652, 464660, 464669, 464678, - 464688, 464695, 464703, 464711, 464720, 464728, 464737, 464746, - 464756, 464764, 464773, 464782, 464792, 464801, 464811, 464821, - 464832, 464837, 464843, 464849, 464856, 464862, 464869, 464876, - 464884, 464890, 464897, 464904, 464912, 464919, 464927, 464935, - 464944, 464950, 464957, 464964, 464972, 464979, 464987, 464995, - 465004, 465011, 465019, 465027, 465036, 465044, 465053, 465062, - 465072, 465078, 465085, 465092, 465100, 465107, 465115, 465123, - 465132, 465139, 465147, 465155, 465164, 465172, 465181, 465190, - 465200, 465207, 465215, 465223, 465232, 465240, 465249, 465258, - 465268, 465276, 465285, 465294, 465304, 465313, 465323, 465333, - 465344, 465350, 465357, 465364, 465372, 465379, 465387, 465395, - 465404, 465411, 465419, 465427, 465436, 465444, 465453, 465462, - 465472, 465479, 465487, 465495, 465504, 465512, 465521, 465530, - 465540, 465548, 465557, 465566, 465576, 465585, 465595, 465605, - 465616, 465623, 465631, 465639, 465648, 465656, 465665, 465674, - 465684, 465692, 465701, 465710, 465720, 465729, 465739, 465749, - 465760, 465768, 465777, 465786, 465796, 465805, 465815, 465825, - 465836, 465845, 465855, 465865, 465876, 465886, 465897, 465908, - 465920, 465925, 465931, 465937, 465944, 465950, 465957, 465964, - 465972, 465978, 465985, 465992, 466000, 466007, 466015, 466023, - 466032, 466038, 466045, 466052, 466060, 466067, 466075, 466083, - 466092, 466099, 466107, 466115, 466124, 466132, 466141, 466150, - 466160, 466166, 466173, 466180, 466188, 466195, 466203, 466211, - 466220, 466227, 466235, 466243, 466252, 466260, 466269, 466278, - 466288, 466295, 466303, 466311, 466320, 466328, 466337, 466346, - 466356, 466364, 466373, 466382, 466392, 466401, 466411, 466421, - 466432, 466438, 466445, 466452, 466460, 466467, 466475, 466483, - 466492, 466499, 466507, 466515, 466524, 466532, 466541, 466550, - 466560, 466567, 466575, 466583, 466592, 466600, 466609, 466618, - 466628, 466636, 466645, 466654, 466664, 466673, 466683, 466693, - 466704, 466711, 466719, 466727, 466736, 466744, 466753, 466762, - 466772, 466780, 466789, 466798, 466808, 466817, 466827, 466837, - 466848, 466856, 466865, 466874, 466884, 466893, 466903, 466913, - 466924, 466933, 466943, 466953, 466964, 466974, 466985, 466996, - 467008, 467014, 467021, 467028, 467036, 467043, 467051, 467059, - 467068, 467075, 467083, 467091, 467100, 467108, 467117, 467126, - 467136, 467143, 467151, 467159, 467168, 467176, 467185, 467194, - 467204, 467212, 467221, 467230, 467240, 467249, 467259, 467269, - 467280, 467287, 467295, 467303, 467312, 467320, 467329, 467338, - 467348, 467356, 467365, 467374, 467384, 467393, 467403, 467413, - 467424, 467432, 467441, 467450, 467460, 467469, 467479, 467489, - 467500, 467509, 467519, 467529, 467540, 467550, 467561, 467572, - 467584, 467591, 467599, 467607, 467616, 467624, 467633, 467642, - 467652, 467660, 467669, 467678, 467688, 467697, 467707, 467717, - 467728, 467736, 467745, 467754, 467764, 467773, 467783, 467793, - 467804, 467813, 467823, 467833, 467844, 467854, 467865, 467876, - 467888, 467896, 467905, 467914, 467924, 467933, 467943, 467953, - 467964, 467973, 467983, 467993, 468004, 468014, 468025, 468036, - 468048, 468057, 468067, 468077, 468088, 468098, 468109, 468120, - 468132, 468142, 468153, 468164, 468176, 468187, 468199, 468211, - 468224, 468229, 468235, 468241, 468248, 468254, 468261, 468268, - 468276, 468282, 468289, 468296, 468304, 468311, 468319, 468327, - 468336, 468342, 468349, 468356, 468364, 468371, 468379, 468387, - 468396, 468403, 468411, 468419, 468428, 468436, 468445, 468454, - 468464, 468470, 468477, 468484, 468492, 468499, 468507, 468515, - 468524, 468531, 468539, 468547, 468556, 468564, 468573, 468582, - 468592, 468599, 468607, 468615, 468624, 468632, 468641, 468650, - 468660, 468668, 468677, 468686, 468696, 468705, 468715, 468725, - 468736, 468742, 468749, 468756, 468764, 468771, 468779, 468787, - 468796, 468803, 468811, 468819, 468828, 468836, 468845, 468854, - 468864, 468871, 468879, 468887, 468896, 468904, 468913, 468922, - 468932, 468940, 468949, 468958, 468968, 468977, 468987, 468997, - 469008, 469015, 469023, 469031, 469040, 469048, 469057, 469066, - 469076, 469084, 469093, 469102, 469112, 469121, 469131, 469141, - 469152, 469160, 469169, 469178, 469188, 469197, 469207, 469217, - 469228, 469237, 469247, 469257, 469268, 469278, 469289, 469300, - 469312, 469318, 469325, 469332, 469340, 469347, 469355, 469363, - 469372, 469379, 469387, 469395, 469404, 469412, 469421, 469430, - 469440, 469447, 469455, 469463, 469472, 469480, 469489, 469498, - 469508, 469516, 469525, 469534, 469544, 469553, 469563, 469573, - 469584, 469591, 469599, 469607, 469616, 469624, 469633, 469642, - 469652, 469660, 469669, 469678, 469688, 469697, 469707, 469717, - 469728, 469736, 469745, 469754, 469764, 469773, 469783, 469793, - 469804, 469813, 469823, 469833, 469844, 469854, 469865, 469876, - 469888, 469895, 469903, 469911, 469920, 469928, 469937, 469946, - 469956, 469964, 469973, 469982, 469992, 470001, 470011, 470021, - 470032, 470040, 470049, 470058, 470068, 470077, 470087, 470097, - 470108, 470117, 470127, 470137, 470148, 470158, 470169, 470180, - 470192, 470200, 470209, 470218, 470228, 470237, 470247, 470257, - 470268, 470277, 470287, 470297, 470308, 470318, 470329, 470340, - 470352, 470361, 470371, 470381, 470392, 470402, 470413, 470424, - 470436, 470446, 470457, 470468, 470480, 470491, 470503, 470515, - 470528, 470534, 470541, 470548, 470556, 470563, 470571, 470579, - 470588, 470595, 470603, 470611, 470620, 470628, 470637, 470646, - 470656, 470663, 470671, 470679, 470688, 470696, 470705, 470714, - 470724, 470732, 470741, 470750, 470760, 470769, 470779, 470789, - 470800, 470807, 470815, 470823, 470832, 470840, 470849, 470858, - 470868, 470876, 470885, 470894, 470904, 470913, 470923, 470933, - 470944, 470952, 470961, 470970, 470980, 470989, 470999, 471009, - 471020, 471029, 471039, 471049, 471060, 471070, 471081, 471092, - 471104, 471111, 471119, 471127, 471136, 471144, 471153, 471162, - 471172, 471180, 471189, 471198, 471208, 471217, 471227, 471237, - 471248, 471256, 471265, 471274, 471284, 471293, 471303, 471313, - 471324, 471333, 471343, 471353, 471364, 471374, 471385, 471396, - 471408, 471416, 471425, 471434, 471444, 471453, 471463, 471473, - 471484, 471493, 471503, 471513, 471524, 471534, 471545, 471556, - 471568, 471577, 471587, 471597, 471608, 471618, 471629, 471640, - 471652, 471662, 471673, 471684, 471696, 471707, 471719, 471731, - 471744, 471751, 471759, 471767, 471776, 471784, 471793, 471802, - 471812, 471820, 471829, 471838, 471848, 471857, 471867, 471877, - 471888, 471896, 471905, 471914, 471924, 471933, 471943, 471953, - 471964, 471973, 471983, 471993, 472004, 472014, 472025, 472036, - 472048, 472056, 472065, 472074, 472084, 472093, 472103, 472113, - 472124, 472133, 472143, 472153, 472164, 472174, 472185, 472196, - 472208, 472217, 472227, 472237, 472248, 472258, 472269, 472280, - 472292, 472302, 472313, 472324, 472336, 472347, 472359, 472371, - 472384, 472392, 472401, 472410, 472420, 472429, 472439, 472449, - 472460, 472469, 472479, 472489, 472500, 472510, 472521, 472532, - 472544, 472553, 472563, 472573, 472584, 472594, 472605, 472616, - 472628, 472638, 472649, 472660, 472672, 472683, 472695, 472707, - 472720, 472729, 472739, 472749, 472760, 472770, 472781, 472792, - 472804, 472814, 472825, 472836, 472848, 472859, 472871, 472883, - 472896, 472906, 472917, 472928, 472940, 472951, 472963, 472975, - 472988, 472999, 473011, 473023, 473036, 473048, 473061, 473074, - 473088, 473093, 473099, 473105, 473112, 473118, 473125, 473132, - 473140, 473146, 473153, 473160, 473168, 473175, 473183, 473191, - 473200, 473206, 473213, 473220, 473228, 473235, 473243, 473251, - 473260, 473267, 473275, 473283, 473292, 473300, 473309, 473318, - 473328, 473334, 473341, 473348, 473356, 473363, 473371, 473379, - 473388, 473395, 473403, 473411, 473420, 473428, 473437, 473446, - 473456, 473463, 473471, 473479, 473488, 473496, 473505, 473514, - 473524, 473532, 473541, 473550, 473560, 473569, 473579, 473589, - 473600, 473606, 473613, 473620, 473628, 473635, 473643, 473651, - 473660, 473667, 473675, 473683, 473692, 473700, 473709, 473718, - 473728, 473735, 473743, 473751, 473760, 473768, 473777, 473786, - 473796, 473804, 473813, 473822, 473832, 473841, 473851, 473861, - 473872, 473879, 473887, 473895, 473904, 473912, 473921, 473930, - 473940, 473948, 473957, 473966, 473976, 473985, 473995, 474005, - 474016, 474024, 474033, 474042, 474052, 474061, 474071, 474081, - 474092, 474101, 474111, 474121, 474132, 474142, 474153, 474164, - 474176, 474182, 474189, 474196, 474204, 474211, 474219, 474227, - 474236, 474243, 474251, 474259, 474268, 474276, 474285, 474294, - 474304, 474311, 474319, 474327, 474336, 474344, 474353, 474362, - 474372, 474380, 474389, 474398, 474408, 474417, 474427, 474437, - 474448, 474455, 474463, 474471, 474480, 474488, 474497, 474506, - 474516, 474524, 474533, 474542, 474552, 474561, 474571, 474581, - 474592, 474600, 474609, 474618, 474628, 474637, 474647, 474657, - 474668, 474677, 474687, 474697, 474708, 474718, 474729, 474740, - 474752, 474759, 474767, 474775, 474784, 474792, 474801, 474810, - 474820, 474828, 474837, 474846, 474856, 474865, 474875, 474885, - 474896, 474904, 474913, 474922, 474932, 474941, 474951, 474961, - 474972, 474981, 474991, 475001, 475012, 475022, 475033, 475044, - 475056, 475064, 475073, 475082, 475092, 475101, 475111, 475121, - 475132, 475141, 475151, 475161, 475172, 475182, 475193, 475204, - 475216, 475225, 475235, 475245, 475256, 475266, 475277, 475288, - 475300, 475310, 475321, 475332, 475344, 475355, 475367, 475379, - 475392, 475398, 475405, 475412, 475420, 475427, 475435, 475443, - 475452, 475459, 475467, 475475, 475484, 475492, 475501, 475510, - 475520, 475527, 475535, 475543, 475552, 475560, 475569, 475578, - 475588, 475596, 475605, 475614, 475624, 475633, 475643, 475653, - 475664, 475671, 475679, 475687, 475696, 475704, 475713, 475722, - 475732, 475740, 475749, 475758, 475768, 475777, 475787, 475797, - 475808, 475816, 475825, 475834, 475844, 475853, 475863, 475873, - 475884, 475893, 475903, 475913, 475924, 475934, 475945, 475956, - 475968, 475975, 475983, 475991, 476000, 476008, 476017, 476026, - 476036, 476044, 476053, 476062, 476072, 476081, 476091, 476101, - 476112, 476120, 476129, 476138, 476148, 476157, 476167, 476177, - 476188, 476197, 476207, 476217, 476228, 476238, 476249, 476260, - 476272, 476280, 476289, 476298, 476308, 476317, 476327, 476337, - 476348, 476357, 476367, 476377, 476388, 476398, 476409, 476420, - 476432, 476441, 476451, 476461, 476472, 476482, 476493, 476504, - 476516, 476526, 476537, 476548, 476560, 476571, 476583, 476595, - 476608, 476615, 476623, 476631, 476640, 476648, 476657, 476666, - 476676, 476684, 476693, 476702, 476712, 476721, 476731, 476741, - 476752, 476760, 476769, 476778, 476788, 476797, 476807, 476817, - 476828, 476837, 476847, 476857, 476868, 476878, 476889, 476900, - 476912, 476920, 476929, 476938, 476948, 476957, 476967, 476977, - 476988, 476997, 477007, 477017, 477028, 477038, 477049, 477060, - 477072, 477081, 477091, 477101, 477112, 477122, 477133, 477144, - 477156, 477166, 477177, 477188, 477200, 477211, 477223, 477235, - 477248, 477256, 477265, 477274, 477284, 477293, 477303, 477313, - 477324, 477333, 477343, 477353, 477364, 477374, 477385, 477396, - 477408, 477417, 477427, 477437, 477448, 477458, 477469, 477480, - 477492, 477502, 477513, 477524, 477536, 477547, 477559, 477571, - 477584, 477593, 477603, 477613, 477624, 477634, 477645, 477656, - 477668, 477678, 477689, 477700, 477712, 477723, 477735, 477747, - 477760, 477770, 477781, 477792, 477804, 477815, 477827, 477839, - 477852, 477863, 477875, 477887, 477900, 477912, 477925, 477938, - 477952, 477958, 477965, 477972, 477980, 477987, 477995, 478003, - 478012, 478019, 478027, 478035, 478044, 478052, 478061, 478070, - 478080, 478087, 478095, 478103, 478112, 478120, 478129, 478138, - 478148, 478156, 478165, 478174, 478184, 478193, 478203, 478213, - 478224, 478231, 478239, 478247, 478256, 478264, 478273, 478282, - 478292, 478300, 478309, 478318, 478328, 478337, 478347, 478357, - 478368, 478376, 478385, 478394, 478404, 478413, 478423, 478433, - 478444, 478453, 478463, 478473, 478484, 478494, 478505, 478516, - 478528, 478535, 478543, 478551, 478560, 478568, 478577, 478586, - 478596, 478604, 478613, 478622, 478632, 478641, 478651, 478661, - 478672, 478680, 478689, 478698, 478708, 478717, 478727, 478737, - 478748, 478757, 478767, 478777, 478788, 478798, 478809, 478820, - 478832, 478840, 478849, 478858, 478868, 478877, 478887, 478897, - 478908, 478917, 478927, 478937, 478948, 478958, 478969, 478980, - 478992, 479001, 479011, 479021, 479032, 479042, 479053, 479064, - 479076, 479086, 479097, 479108, 479120, 479131, 479143, 479155, - 479168, 479175, 479183, 479191, 479200, 479208, 479217, 479226, - 479236, 479244, 479253, 479262, 479272, 479281, 479291, 479301, - 479312, 479320, 479329, 479338, 479348, 479357, 479367, 479377, - 479388, 479397, 479407, 479417, 479428, 479438, 479449, 479460, - 479472, 479480, 479489, 479498, 479508, 479517, 479527, 479537, - 479548, 479557, 479567, 479577, 479588, 479598, 479609, 479620, - 479632, 479641, 479651, 479661, 479672, 479682, 479693, 479704, - 479716, 479726, 479737, 479748, 479760, 479771, 479783, 479795, - 479808, 479816, 479825, 479834, 479844, 479853, 479863, 479873, - 479884, 479893, 479903, 479913, 479924, 479934, 479945, 479956, - 479968, 479977, 479987, 479997, 480008, 480018, 480029, 480040, - 480052, 480062, 480073, 480084, 480096, 480107, 480119, 480131, - 480144, 480153, 480163, 480173, 480184, 480194, 480205, 480216, - 480228, 480238, 480249, 480260, 480272, 480283, 480295, 480307, - 480320, 480330, 480341, 480352, 480364, 480375, 480387, 480399, - 480412, 480423, 480435, 480447, 480460, 480472, 480485, 480498, - 480512, 480519, 480527, 480535, 480544, 480552, 480561, 480570, - 480580, 480588, 480597, 480606, 480616, 480625, 480635, 480645, - 480656, 480664, 480673, 480682, 480692, 480701, 480711, 480721, - 480732, 480741, 480751, 480761, 480772, 480782, 480793, 480804, - 480816, 480824, 480833, 480842, 480852, 480861, 480871, 480881, - 480892, 480901, 480911, 480921, 480932, 480942, 480953, 480964, - 480976, 480985, 480995, 481005, 481016, 481026, 481037, 481048, - 481060, 481070, 481081, 481092, 481104, 481115, 481127, 481139, - 481152, 481160, 481169, 481178, 481188, 481197, 481207, 481217, - 481228, 481237, 481247, 481257, 481268, 481278, 481289, 481300, - 481312, 481321, 481331, 481341, 481352, 481362, 481373, 481384, - 481396, 481406, 481417, 481428, 481440, 481451, 481463, 481475, - 481488, 481497, 481507, 481517, 481528, 481538, 481549, 481560, - 481572, 481582, 481593, 481604, 481616, 481627, 481639, 481651, - 481664, 481674, 481685, 481696, 481708, 481719, 481731, 481743, - 481756, 481767, 481779, 481791, 481804, 481816, 481829, 481842, - 481856, 481864, 481873, 481882, 481892, 481901, 481911, 481921, - 481932, 481941, 481951, 481961, 481972, 481982, 481993, 482004, - 482016, 482025, 482035, 482045, 482056, 482066, 482077, 482088, - 482100, 482110, 482121, 482132, 482144, 482155, 482167, 482179, - 482192, 482201, 482211, 482221, 482232, 482242, 482253, 482264, - 482276, 482286, 482297, 482308, 482320, 482331, 482343, 482355, - 482368, 482378, 482389, 482400, 482412, 482423, 482435, 482447, - 482460, 482471, 482483, 482495, 482508, 482520, 482533, 482546, - 482560, 482569, 482579, 482589, 482600, 482610, 482621, 482632, - 482644, 482654, 482665, 482676, 482688, 482699, 482711, 482723, - 482736, 482746, 482757, 482768, 482780, 482791, 482803, 482815, - 482828, 482839, 482851, 482863, 482876, 482888, 482901, 482914, - 482928, 482938, 482949, 482960, 482972, 482983, 482995, 483007, - 483020, 483031, 483043, 483055, 483068, 483080, 483093, 483106, - 483120, 483131, 483143, 483155, 483168, 483180, 483193, 483206, - 483220, 483232, 483245, 483258, 483272, 483285, 483299, 483313, - 483328, 483332, 483337, 483342, 483348, 483353, 483359, 483365, - 483372, 483377, 483383, 483389, 483396, 483402, 483409, 483416, - 483424, 483429, 483435, 483441, 483448, 483454, 483461, 483468, - 483476, 483482, 483489, 483496, 483504, 483511, 483519, 483527, - 483536, 483541, 483547, 483553, 483560, 483566, 483573, 483580, - 483588, 483594, 483601, 483608, 483616, 483623, 483631, 483639, - 483648, 483654, 483661, 483668, 483676, 483683, 483691, 483699, - 483708, 483715, 483723, 483731, 483740, 483748, 483757, 483766, - 483776, 483781, 483787, 483793, 483800, 483806, 483813, 483820, - 483828, 483834, 483841, 483848, 483856, 483863, 483871, 483879, - 483888, 483894, 483901, 483908, 483916, 483923, 483931, 483939, - 483948, 483955, 483963, 483971, 483980, 483988, 483997, 484006, - 484016, 484022, 484029, 484036, 484044, 484051, 484059, 484067, - 484076, 484083, 484091, 484099, 484108, 484116, 484125, 484134, - 484144, 484151, 484159, 484167, 484176, 484184, 484193, 484202, - 484212, 484220, 484229, 484238, 484248, 484257, 484267, 484277, - 484288, 484293, 484299, 484305, 484312, 484318, 484325, 484332, - 484340, 484346, 484353, 484360, 484368, 484375, 484383, 484391, - 484400, 484406, 484413, 484420, 484428, 484435, 484443, 484451, - 484460, 484467, 484475, 484483, 484492, 484500, 484509, 484518, - 484528, 484534, 484541, 484548, 484556, 484563, 484571, 484579, - 484588, 484595, 484603, 484611, 484620, 484628, 484637, 484646, - 484656, 484663, 484671, 484679, 484688, 484696, 484705, 484714, - 484724, 484732, 484741, 484750, 484760, 484769, 484779, 484789, - 484800, 484806, 484813, 484820, 484828, 484835, 484843, 484851, - 484860, 484867, 484875, 484883, 484892, 484900, 484909, 484918, - 484928, 484935, 484943, 484951, 484960, 484968, 484977, 484986, - 484996, 485004, 485013, 485022, 485032, 485041, 485051, 485061, - 485072, 485079, 485087, 485095, 485104, 485112, 485121, 485130, - 485140, 485148, 485157, 485166, 485176, 485185, 485195, 485205, - 485216, 485224, 485233, 485242, 485252, 485261, 485271, 485281, - 485292, 485301, 485311, 485321, 485332, 485342, 485353, 485364, - 485376, 485381, 485387, 485393, 485400, 485406, 485413, 485420, - 485428, 485434, 485441, 485448, 485456, 485463, 485471, 485479, - 485488, 485494, 485501, 485508, 485516, 485523, 485531, 485539, - 485548, 485555, 485563, 485571, 485580, 485588, 485597, 485606, - 485616, 485622, 485629, 485636, 485644, 485651, 485659, 485667, - 485676, 485683, 485691, 485699, 485708, 485716, 485725, 485734, - 485744, 485751, 485759, 485767, 485776, 485784, 485793, 485802, - 485812, 485820, 485829, 485838, 485848, 485857, 485867, 485877, - 485888, 485894, 485901, 485908, 485916, 485923, 485931, 485939, - 485948, 485955, 485963, 485971, 485980, 485988, 485997, 486006, - 486016, 486023, 486031, 486039, 486048, 486056, 486065, 486074, - 486084, 486092, 486101, 486110, 486120, 486129, 486139, 486149, - 486160, 486167, 486175, 486183, 486192, 486200, 486209, 486218, - 486228, 486236, 486245, 486254, 486264, 486273, 486283, 486293, - 486304, 486312, 486321, 486330, 486340, 486349, 486359, 486369, - 486380, 486389, 486399, 486409, 486420, 486430, 486441, 486452, - 486464, 486470, 486477, 486484, 486492, 486499, 486507, 486515, - 486524, 486531, 486539, 486547, 486556, 486564, 486573, 486582, - 486592, 486599, 486607, 486615, 486624, 486632, 486641, 486650, - 486660, 486668, 486677, 486686, 486696, 486705, 486715, 486725, - 486736, 486743, 486751, 486759, 486768, 486776, 486785, 486794, - 486804, 486812, 486821, 486830, 486840, 486849, 486859, 486869, - 486880, 486888, 486897, 486906, 486916, 486925, 486935, 486945, - 486956, 486965, 486975, 486985, 486996, 487006, 487017, 487028, - 487040, 487047, 487055, 487063, 487072, 487080, 487089, 487098, - 487108, 487116, 487125, 487134, 487144, 487153, 487163, 487173, - 487184, 487192, 487201, 487210, 487220, 487229, 487239, 487249, - 487260, 487269, 487279, 487289, 487300, 487310, 487321, 487332, - 487344, 487352, 487361, 487370, 487380, 487389, 487399, 487409, - 487420, 487429, 487439, 487449, 487460, 487470, 487481, 487492, - 487504, 487513, 487523, 487533, 487544, 487554, 487565, 487576, - 487588, 487598, 487609, 487620, 487632, 487643, 487655, 487667, - 487680, 487685, 487691, 487697, 487704, 487710, 487717, 487724, - 487732, 487738, 487745, 487752, 487760, 487767, 487775, 487783, - 487792, 487798, 487805, 487812, 487820, 487827, 487835, 487843, - 487852, 487859, 487867, 487875, 487884, 487892, 487901, 487910, - 487920, 487926, 487933, 487940, 487948, 487955, 487963, 487971, - 487980, 487987, 487995, 488003, 488012, 488020, 488029, 488038, - 488048, 488055, 488063, 488071, 488080, 488088, 488097, 488106, - 488116, 488124, 488133, 488142, 488152, 488161, 488171, 488181, - 488192, 488198, 488205, 488212, 488220, 488227, 488235, 488243, - 488252, 488259, 488267, 488275, 488284, 488292, 488301, 488310, - 488320, 488327, 488335, 488343, 488352, 488360, 488369, 488378, - 488388, 488396, 488405, 488414, 488424, 488433, 488443, 488453, - 488464, 488471, 488479, 488487, 488496, 488504, 488513, 488522, - 488532, 488540, 488549, 488558, 488568, 488577, 488587, 488597, - 488608, 488616, 488625, 488634, 488644, 488653, 488663, 488673, - 488684, 488693, 488703, 488713, 488724, 488734, 488745, 488756, - 488768, 488774, 488781, 488788, 488796, 488803, 488811, 488819, - 488828, 488835, 488843, 488851, 488860, 488868, 488877, 488886, - 488896, 488903, 488911, 488919, 488928, 488936, 488945, 488954, - 488964, 488972, 488981, 488990, 489000, 489009, 489019, 489029, - 489040, 489047, 489055, 489063, 489072, 489080, 489089, 489098, - 489108, 489116, 489125, 489134, 489144, 489153, 489163, 489173, - 489184, 489192, 489201, 489210, 489220, 489229, 489239, 489249, - 489260, 489269, 489279, 489289, 489300, 489310, 489321, 489332, - 489344, 489351, 489359, 489367, 489376, 489384, 489393, 489402, - 489412, 489420, 489429, 489438, 489448, 489457, 489467, 489477, - 489488, 489496, 489505, 489514, 489524, 489533, 489543, 489553, - 489564, 489573, 489583, 489593, 489604, 489614, 489625, 489636, - 489648, 489656, 489665, 489674, 489684, 489693, 489703, 489713, - 489724, 489733, 489743, 489753, 489764, 489774, 489785, 489796, - 489808, 489817, 489827, 489837, 489848, 489858, 489869, 489880, - 489892, 489902, 489913, 489924, 489936, 489947, 489959, 489971, - 489984, 489990, 489997, 490004, 490012, 490019, 490027, 490035, - 490044, 490051, 490059, 490067, 490076, 490084, 490093, 490102, - 490112, 490119, 490127, 490135, 490144, 490152, 490161, 490170, - 490180, 490188, 490197, 490206, 490216, 490225, 490235, 490245, - 490256, 490263, 490271, 490279, 490288, 490296, 490305, 490314, - 490324, 490332, 490341, 490350, 490360, 490369, 490379, 490389, - 490400, 490408, 490417, 490426, 490436, 490445, 490455, 490465, - 490476, 490485, 490495, 490505, 490516, 490526, 490537, 490548, - 490560, 490567, 490575, 490583, 490592, 490600, 490609, 490618, - 490628, 490636, 490645, 490654, 490664, 490673, 490683, 490693, - 490704, 490712, 490721, 490730, 490740, 490749, 490759, 490769, - 490780, 490789, 490799, 490809, 490820, 490830, 490841, 490852, - 490864, 490872, 490881, 490890, 490900, 490909, 490919, 490929, - 490940, 490949, 490959, 490969, 490980, 490990, 491001, 491012, - 491024, 491033, 491043, 491053, 491064, 491074, 491085, 491096, - 491108, 491118, 491129, 491140, 491152, 491163, 491175, 491187, - 491200, 491207, 491215, 491223, 491232, 491240, 491249, 491258, - 491268, 491276, 491285, 491294, 491304, 491313, 491323, 491333, - 491344, 491352, 491361, 491370, 491380, 491389, 491399, 491409, - 491420, 491429, 491439, 491449, 491460, 491470, 491481, 491492, - 491504, 491512, 491521, 491530, 491540, 491549, 491559, 491569, - 491580, 491589, 491599, 491609, 491620, 491630, 491641, 491652, - 491664, 491673, 491683, 491693, 491704, 491714, 491725, 491736, - 491748, 491758, 491769, 491780, 491792, 491803, 491815, 491827, - 491840, 491848, 491857, 491866, 491876, 491885, 491895, 491905, - 491916, 491925, 491935, 491945, 491956, 491966, 491977, 491988, - 492000, 492009, 492019, 492029, 492040, 492050, 492061, 492072, - 492084, 492094, 492105, 492116, 492128, 492139, 492151, 492163, - 492176, 492185, 492195, 492205, 492216, 492226, 492237, 492248, - 492260, 492270, 492281, 492292, 492304, 492315, 492327, 492339, - 492352, 492362, 492373, 492384, 492396, 492407, 492419, 492431, - 492444, 492455, 492467, 492479, 492492, 492504, 492517, 492530, - 492544, 492549, 492555, 492561, 492568, 492574, 492581, 492588, - 492596, 492602, 492609, 492616, 492624, 492631, 492639, 492647, - 492656, 492662, 492669, 492676, 492684, 492691, 492699, 492707, - 492716, 492723, 492731, 492739, 492748, 492756, 492765, 492774, - 492784, 492790, 492797, 492804, 492812, 492819, 492827, 492835, - 492844, 492851, 492859, 492867, 492876, 492884, 492893, 492902, - 492912, 492919, 492927, 492935, 492944, 492952, 492961, 492970, - 492980, 492988, 492997, 493006, 493016, 493025, 493035, 493045, - 493056, 493062, 493069, 493076, 493084, 493091, 493099, 493107, - 493116, 493123, 493131, 493139, 493148, 493156, 493165, 493174, - 493184, 493191, 493199, 493207, 493216, 493224, 493233, 493242, - 493252, 493260, 493269, 493278, 493288, 493297, 493307, 493317, - 493328, 493335, 493343, 493351, 493360, 493368, 493377, 493386, - 493396, 493404, 493413, 493422, 493432, 493441, 493451, 493461, - 493472, 493480, 493489, 493498, 493508, 493517, 493527, 493537, - 493548, 493557, 493567, 493577, 493588, 493598, 493609, 493620, - 493632, 493638, 493645, 493652, 493660, 493667, 493675, 493683, - 493692, 493699, 493707, 493715, 493724, 493732, 493741, 493750, - 493760, 493767, 493775, 493783, 493792, 493800, 493809, 493818, - 493828, 493836, 493845, 493854, 493864, 493873, 493883, 493893, - 493904, 493911, 493919, 493927, 493936, 493944, 493953, 493962, - 493972, 493980, 493989, 493998, 494008, 494017, 494027, 494037, - 494048, 494056, 494065, 494074, 494084, 494093, 494103, 494113, - 494124, 494133, 494143, 494153, 494164, 494174, 494185, 494196, - 494208, 494215, 494223, 494231, 494240, 494248, 494257, 494266, - 494276, 494284, 494293, 494302, 494312, 494321, 494331, 494341, - 494352, 494360, 494369, 494378, 494388, 494397, 494407, 494417, - 494428, 494437, 494447, 494457, 494468, 494478, 494489, 494500, - 494512, 494520, 494529, 494538, 494548, 494557, 494567, 494577, - 494588, 494597, 494607, 494617, 494628, 494638, 494649, 494660, - 494672, 494681, 494691, 494701, 494712, 494722, 494733, 494744, - 494756, 494766, 494777, 494788, 494800, 494811, 494823, 494835, - 494848, 494854, 494861, 494868, 494876, 494883, 494891, 494899, - 494908, 494915, 494923, 494931, 494940, 494948, 494957, 494966, - 494976, 494983, 494991, 494999, 495008, 495016, 495025, 495034, - 495044, 495052, 495061, 495070, 495080, 495089, 495099, 495109, - 495120, 495127, 495135, 495143, 495152, 495160, 495169, 495178, - 495188, 495196, 495205, 495214, 495224, 495233, 495243, 495253, - 495264, 495272, 495281, 495290, 495300, 495309, 495319, 495329, - 495340, 495349, 495359, 495369, 495380, 495390, 495401, 495412, - 495424, 495431, 495439, 495447, 495456, 495464, 495473, 495482, - 495492, 495500, 495509, 495518, 495528, 495537, 495547, 495557, - 495568, 495576, 495585, 495594, 495604, 495613, 495623, 495633, - 495644, 495653, 495663, 495673, 495684, 495694, 495705, 495716, - 495728, 495736, 495745, 495754, 495764, 495773, 495783, 495793, - 495804, 495813, 495823, 495833, 495844, 495854, 495865, 495876, - 495888, 495897, 495907, 495917, 495928, 495938, 495949, 495960, - 495972, 495982, 495993, 496004, 496016, 496027, 496039, 496051, - 496064, 496071, 496079, 496087, 496096, 496104, 496113, 496122, - 496132, 496140, 496149, 496158, 496168, 496177, 496187, 496197, - 496208, 496216, 496225, 496234, 496244, 496253, 496263, 496273, - 496284, 496293, 496303, 496313, 496324, 496334, 496345, 496356, - 496368, 496376, 496385, 496394, 496404, 496413, 496423, 496433, - 496444, 496453, 496463, 496473, 496484, 496494, 496505, 496516, - 496528, 496537, 496547, 496557, 496568, 496578, 496589, 496600, - 496612, 496622, 496633, 496644, 496656, 496667, 496679, 496691, - 496704, 496712, 496721, 496730, 496740, 496749, 496759, 496769, - 496780, 496789, 496799, 496809, 496820, 496830, 496841, 496852, - 496864, 496873, 496883, 496893, 496904, 496914, 496925, 496936, - 496948, 496958, 496969, 496980, 496992, 497003, 497015, 497027, - 497040, 497049, 497059, 497069, 497080, 497090, 497101, 497112, - 497124, 497134, 497145, 497156, 497168, 497179, 497191, 497203, - 497216, 497226, 497237, 497248, 497260, 497271, 497283, 497295, - 497308, 497319, 497331, 497343, 497356, 497368, 497381, 497394, - 497408, 497414, 497421, 497428, 497436, 497443, 497451, 497459, - 497468, 497475, 497483, 497491, 497500, 497508, 497517, 497526, - 497536, 497543, 497551, 497559, 497568, 497576, 497585, 497594, - 497604, 497612, 497621, 497630, 497640, 497649, 497659, 497669, - 497680, 497687, 497695, 497703, 497712, 497720, 497729, 497738, - 497748, 497756, 497765, 497774, 497784, 497793, 497803, 497813, - 497824, 497832, 497841, 497850, 497860, 497869, 497879, 497889, - 497900, 497909, 497919, 497929, 497940, 497950, 497961, 497972, - 497984, 497991, 497999, 498007, 498016, 498024, 498033, 498042, - 498052, 498060, 498069, 498078, 498088, 498097, 498107, 498117, - 498128, 498136, 498145, 498154, 498164, 498173, 498183, 498193, - 498204, 498213, 498223, 498233, 498244, 498254, 498265, 498276, - 498288, 498296, 498305, 498314, 498324, 498333, 498343, 498353, - 498364, 498373, 498383, 498393, 498404, 498414, 498425, 498436, - 498448, 498457, 498467, 498477, 498488, 498498, 498509, 498520, - 498532, 498542, 498553, 498564, 498576, 498587, 498599, 498611, - 498624, 498631, 498639, 498647, 498656, 498664, 498673, 498682, - 498692, 498700, 498709, 498718, 498728, 498737, 498747, 498757, - 498768, 498776, 498785, 498794, 498804, 498813, 498823, 498833, - 498844, 498853, 498863, 498873, 498884, 498894, 498905, 498916, - 498928, 498936, 498945, 498954, 498964, 498973, 498983, 498993, - 499004, 499013, 499023, 499033, 499044, 499054, 499065, 499076, - 499088, 499097, 499107, 499117, 499128, 499138, 499149, 499160, - 499172, 499182, 499193, 499204, 499216, 499227, 499239, 499251, - 499264, 499272, 499281, 499290, 499300, 499309, 499319, 499329, - 499340, 499349, 499359, 499369, 499380, 499390, 499401, 499412, - 499424, 499433, 499443, 499453, 499464, 499474, 499485, 499496, - 499508, 499518, 499529, 499540, 499552, 499563, 499575, 499587, - 499600, 499609, 499619, 499629, 499640, 499650, 499661, 499672, - 499684, 499694, 499705, 499716, 499728, 499739, 499751, 499763, - 499776, 499786, 499797, 499808, 499820, 499831, 499843, 499855, - 499868, 499879, 499891, 499903, 499916, 499928, 499941, 499954, - 499968, 499975, 499983, 499991, 500000, 500008, 500017, 500026, - 500036, 500044, 500053, 500062, 500072, 500081, 500091, 500101, - 500112, 500120, 500129, 500138, 500148, 500157, 500167, 500177, - 500188, 500197, 500207, 500217, 500228, 500238, 500249, 500260, - 500272, 500280, 500289, 500298, 500308, 500317, 500327, 500337, - 500348, 500357, 500367, 500377, 500388, 500398, 500409, 500420, - 500432, 500441, 500451, 500461, 500472, 500482, 500493, 500504, - 500516, 500526, 500537, 500548, 500560, 500571, 500583, 500595, - 500608, 500616, 500625, 500634, 500644, 500653, 500663, 500673, - 500684, 500693, 500703, 500713, 500724, 500734, 500745, 500756, - 500768, 500777, 500787, 500797, 500808, 500818, 500829, 500840, - 500852, 500862, 500873, 500884, 500896, 500907, 500919, 500931, - 500944, 500953, 500963, 500973, 500984, 500994, 501005, 501016, - 501028, 501038, 501049, 501060, 501072, 501083, 501095, 501107, - 501120, 501130, 501141, 501152, 501164, 501175, 501187, 501199, - 501212, 501223, 501235, 501247, 501260, 501272, 501285, 501298, - 501312, 501320, 501329, 501338, 501348, 501357, 501367, 501377, - 501388, 501397, 501407, 501417, 501428, 501438, 501449, 501460, - 501472, 501481, 501491, 501501, 501512, 501522, 501533, 501544, - 501556, 501566, 501577, 501588, 501600, 501611, 501623, 501635, - 501648, 501657, 501667, 501677, 501688, 501698, 501709, 501720, - 501732, 501742, 501753, 501764, 501776, 501787, 501799, 501811, - 501824, 501834, 501845, 501856, 501868, 501879, 501891, 501903, - 501916, 501927, 501939, 501951, 501964, 501976, 501989, 502002, - 502016, 502025, 502035, 502045, 502056, 502066, 502077, 502088, - 502100, 502110, 502121, 502132, 502144, 502155, 502167, 502179, - 502192, 502202, 502213, 502224, 502236, 502247, 502259, 502271, - 502284, 502295, 502307, 502319, 502332, 502344, 502357, 502370, - 502384, 502394, 502405, 502416, 502428, 502439, 502451, 502463, - 502476, 502487, 502499, 502511, 502524, 502536, 502549, 502562, - 502576, 502587, 502599, 502611, 502624, 502636, 502649, 502662, - 502676, 502688, 502701, 502714, 502728, 502741, 502755, 502769, - 502784, 502789, 502795, 502801, 502808, 502814, 502821, 502828, - 502836, 502842, 502849, 502856, 502864, 502871, 502879, 502887, - 502896, 502902, 502909, 502916, 502924, 502931, 502939, 502947, - 502956, 502963, 502971, 502979, 502988, 502996, 503005, 503014, - 503024, 503030, 503037, 503044, 503052, 503059, 503067, 503075, - 503084, 503091, 503099, 503107, 503116, 503124, 503133, 503142, - 503152, 503159, 503167, 503175, 503184, 503192, 503201, 503210, - 503220, 503228, 503237, 503246, 503256, 503265, 503275, 503285, - 503296, 503302, 503309, 503316, 503324, 503331, 503339, 503347, - 503356, 503363, 503371, 503379, 503388, 503396, 503405, 503414, - 503424, 503431, 503439, 503447, 503456, 503464, 503473, 503482, - 503492, 503500, 503509, 503518, 503528, 503537, 503547, 503557, - 503568, 503575, 503583, 503591, 503600, 503608, 503617, 503626, - 503636, 503644, 503653, 503662, 503672, 503681, 503691, 503701, - 503712, 503720, 503729, 503738, 503748, 503757, 503767, 503777, - 503788, 503797, 503807, 503817, 503828, 503838, 503849, 503860, - 503872, 503878, 503885, 503892, 503900, 503907, 503915, 503923, - 503932, 503939, 503947, 503955, 503964, 503972, 503981, 503990, - 504000, 504007, 504015, 504023, 504032, 504040, 504049, 504058, - 504068, 504076, 504085, 504094, 504104, 504113, 504123, 504133, - 504144, 504151, 504159, 504167, 504176, 504184, 504193, 504202, - 504212, 504220, 504229, 504238, 504248, 504257, 504267, 504277, - 504288, 504296, 504305, 504314, 504324, 504333, 504343, 504353, - 504364, 504373, 504383, 504393, 504404, 504414, 504425, 504436, - 504448, 504455, 504463, 504471, 504480, 504488, 504497, 504506, - 504516, 504524, 504533, 504542, 504552, 504561, 504571, 504581, - 504592, 504600, 504609, 504618, 504628, 504637, 504647, 504657, - 504668, 504677, 504687, 504697, 504708, 504718, 504729, 504740, - 504752, 504760, 504769, 504778, 504788, 504797, 504807, 504817, - 504828, 504837, 504847, 504857, 504868, 504878, 504889, 504900, - 504912, 504921, 504931, 504941, 504952, 504962, 504973, 504984, - 504996, 505006, 505017, 505028, 505040, 505051, 505063, 505075, - 505088, 505094, 505101, 505108, 505116, 505123, 505131, 505139, - 505148, 505155, 505163, 505171, 505180, 505188, 505197, 505206, - 505216, 505223, 505231, 505239, 505248, 505256, 505265, 505274, - 505284, 505292, 505301, 505310, 505320, 505329, 505339, 505349, - 505360, 505367, 505375, 505383, 505392, 505400, 505409, 505418, - 505428, 505436, 505445, 505454, 505464, 505473, 505483, 505493, - 505504, 505512, 505521, 505530, 505540, 505549, 505559, 505569, - 505580, 505589, 505599, 505609, 505620, 505630, 505641, 505652, - 505664, 505671, 505679, 505687, 505696, 505704, 505713, 505722, - 505732, 505740, 505749, 505758, 505768, 505777, 505787, 505797, - 505808, 505816, 505825, 505834, 505844, 505853, 505863, 505873, - 505884, 505893, 505903, 505913, 505924, 505934, 505945, 505956, - 505968, 505976, 505985, 505994, 506004, 506013, 506023, 506033, - 506044, 506053, 506063, 506073, 506084, 506094, 506105, 506116, - 506128, 506137, 506147, 506157, 506168, 506178, 506189, 506200, - 506212, 506222, 506233, 506244, 506256, 506267, 506279, 506291, - 506304, 506311, 506319, 506327, 506336, 506344, 506353, 506362, - 506372, 506380, 506389, 506398, 506408, 506417, 506427, 506437, - 506448, 506456, 506465, 506474, 506484, 506493, 506503, 506513, - 506524, 506533, 506543, 506553, 506564, 506574, 506585, 506596, - 506608, 506616, 506625, 506634, 506644, 506653, 506663, 506673, - 506684, 506693, 506703, 506713, 506724, 506734, 506745, 506756, - 506768, 506777, 506787, 506797, 506808, 506818, 506829, 506840, - 506852, 506862, 506873, 506884, 506896, 506907, 506919, 506931, - 506944, 506952, 506961, 506970, 506980, 506989, 506999, 507009, - 507020, 507029, 507039, 507049, 507060, 507070, 507081, 507092, - 507104, 507113, 507123, 507133, 507144, 507154, 507165, 507176, - 507188, 507198, 507209, 507220, 507232, 507243, 507255, 507267, - 507280, 507289, 507299, 507309, 507320, 507330, 507341, 507352, - 507364, 507374, 507385, 507396, 507408, 507419, 507431, 507443, - 507456, 507466, 507477, 507488, 507500, 507511, 507523, 507535, - 507548, 507559, 507571, 507583, 507596, 507608, 507621, 507634, - 507648, 507654, 507661, 507668, 507676, 507683, 507691, 507699, - 507708, 507715, 507723, 507731, 507740, 507748, 507757, 507766, - 507776, 507783, 507791, 507799, 507808, 507816, 507825, 507834, - 507844, 507852, 507861, 507870, 507880, 507889, 507899, 507909, - 507920, 507927, 507935, 507943, 507952, 507960, 507969, 507978, - 507988, 507996, 508005, 508014, 508024, 508033, 508043, 508053, - 508064, 508072, 508081, 508090, 508100, 508109, 508119, 508129, - 508140, 508149, 508159, 508169, 508180, 508190, 508201, 508212, - 508224, 508231, 508239, 508247, 508256, 508264, 508273, 508282, - 508292, 508300, 508309, 508318, 508328, 508337, 508347, 508357, - 508368, 508376, 508385, 508394, 508404, 508413, 508423, 508433, - 508444, 508453, 508463, 508473, 508484, 508494, 508505, 508516, - 508528, 508536, 508545, 508554, 508564, 508573, 508583, 508593, - 508604, 508613, 508623, 508633, 508644, 508654, 508665, 508676, - 508688, 508697, 508707, 508717, 508728, 508738, 508749, 508760, - 508772, 508782, 508793, 508804, 508816, 508827, 508839, 508851, - 508864, 508871, 508879, 508887, 508896, 508904, 508913, 508922, - 508932, 508940, 508949, 508958, 508968, 508977, 508987, 508997, - 509008, 509016, 509025, 509034, 509044, 509053, 509063, 509073, - 509084, 509093, 509103, 509113, 509124, 509134, 509145, 509156, - 509168, 509176, 509185, 509194, 509204, 509213, 509223, 509233, - 509244, 509253, 509263, 509273, 509284, 509294, 509305, 509316, - 509328, 509337, 509347, 509357, 509368, 509378, 509389, 509400, - 509412, 509422, 509433, 509444, 509456, 509467, 509479, 509491, - 509504, 509512, 509521, 509530, 509540, 509549, 509559, 509569, - 509580, 509589, 509599, 509609, 509620, 509630, 509641, 509652, - 509664, 509673, 509683, 509693, 509704, 509714, 509725, 509736, - 509748, 509758, 509769, 509780, 509792, 509803, 509815, 509827, - 509840, 509849, 509859, 509869, 509880, 509890, 509901, 509912, - 509924, 509934, 509945, 509956, 509968, 509979, 509991, 510003, - 510016, 510026, 510037, 510048, 510060, 510071, 510083, 510095, - 510108, 510119, 510131, 510143, 510156, 510168, 510181, 510194, - 510208, 510215, 510223, 510231, 510240, 510248, 510257, 510266, - 510276, 510284, 510293, 510302, 510312, 510321, 510331, 510341, - 510352, 510360, 510369, 510378, 510388, 510397, 510407, 510417, - 510428, 510437, 510447, 510457, 510468, 510478, 510489, 510500, - 510512, 510520, 510529, 510538, 510548, 510557, 510567, 510577, - 510588, 510597, 510607, 510617, 510628, 510638, 510649, 510660, - 510672, 510681, 510691, 510701, 510712, 510722, 510733, 510744, - 510756, 510766, 510777, 510788, 510800, 510811, 510823, 510835, - 510848, 510856, 510865, 510874, 510884, 510893, 510903, 510913, - 510924, 510933, 510943, 510953, 510964, 510974, 510985, 510996, - 511008, 511017, 511027, 511037, 511048, 511058, 511069, 511080, - 511092, 511102, 511113, 511124, 511136, 511147, 511159, 511171, - 511184, 511193, 511203, 511213, 511224, 511234, 511245, 511256, - 511268, 511278, 511289, 511300, 511312, 511323, 511335, 511347, - 511360, 511370, 511381, 511392, 511404, 511415, 511427, 511439, - 511452, 511463, 511475, 511487, 511500, 511512, 511525, 511538, - 511552, 511560, 511569, 511578, 511588, 511597, 511607, 511617, - 511628, 511637, 511647, 511657, 511668, 511678, 511689, 511700, - 511712, 511721, 511731, 511741, 511752, 511762, 511773, 511784, - 511796, 511806, 511817, 511828, 511840, 511851, 511863, 511875, - 511888, 511897, 511907, 511917, 511928, 511938, 511949, 511960, - 511972, 511982, 511993, 512004, 512016, 512027, 512039, 512051, - 512064, 512074, 512085, 512096, 512108, 512119, 512131, 512143, - 512156, 512167, 512179, 512191, 512204, 512216, 512229, 512242, - 512256, 512265, 512275, 512285, 512296, 512306, 512317, 512328, - 512340, 512350, 512361, 512372, 512384, 512395, 512407, 512419, - 512432, 512442, 512453, 512464, 512476, 512487, 512499, 512511, - 512524, 512535, 512547, 512559, 512572, 512584, 512597, 512610, - 512624, 512634, 512645, 512656, 512668, 512679, 512691, 512703, - 512716, 512727, 512739, 512751, 512764, 512776, 512789, 512802, - 512816, 512827, 512839, 512851, 512864, 512876, 512889, 512902, - 512916, 512928, 512941, 512954, 512968, 512981, 512995, 513009, - 513024, 513030, 513037, 513044, 513052, 513059, 513067, 513075, - 513084, 513091, 513099, 513107, 513116, 513124, 513133, 513142, - 513152, 513159, 513167, 513175, 513184, 513192, 513201, 513210, - 513220, 513228, 513237, 513246, 513256, 513265, 513275, 513285, - 513296, 513303, 513311, 513319, 513328, 513336, 513345, 513354, - 513364, 513372, 513381, 513390, 513400, 513409, 513419, 513429, - 513440, 513448, 513457, 513466, 513476, 513485, 513495, 513505, - 513516, 513525, 513535, 513545, 513556, 513566, 513577, 513588, - 513600, 513607, 513615, 513623, 513632, 513640, 513649, 513658, - 513668, 513676, 513685, 513694, 513704, 513713, 513723, 513733, - 513744, 513752, 513761, 513770, 513780, 513789, 513799, 513809, - 513820, 513829, 513839, 513849, 513860, 513870, 513881, 513892, - 513904, 513912, 513921, 513930, 513940, 513949, 513959, 513969, - 513980, 513989, 513999, 514009, 514020, 514030, 514041, 514052, - 514064, 514073, 514083, 514093, 514104, 514114, 514125, 514136, - 514148, 514158, 514169, 514180, 514192, 514203, 514215, 514227, - 514240, 514247, 514255, 514263, 514272, 514280, 514289, 514298, - 514308, 514316, 514325, 514334, 514344, 514353, 514363, 514373, - 514384, 514392, 514401, 514410, 514420, 514429, 514439, 514449, - 514460, 514469, 514479, 514489, 514500, 514510, 514521, 514532, - 514544, 514552, 514561, 514570, 514580, 514589, 514599, 514609, - 514620, 514629, 514639, 514649, 514660, 514670, 514681, 514692, - 514704, 514713, 514723, 514733, 514744, 514754, 514765, 514776, - 514788, 514798, 514809, 514820, 514832, 514843, 514855, 514867, - 514880, 514888, 514897, 514906, 514916, 514925, 514935, 514945, - 514956, 514965, 514975, 514985, 514996, 515006, 515017, 515028, - 515040, 515049, 515059, 515069, 515080, 515090, 515101, 515112, - 515124, 515134, 515145, 515156, 515168, 515179, 515191, 515203, - 515216, 515225, 515235, 515245, 515256, 515266, 515277, 515288, - 515300, 515310, 515321, 515332, 515344, 515355, 515367, 515379, - 515392, 515402, 515413, 515424, 515436, 515447, 515459, 515471, - 515484, 515495, 515507, 515519, 515532, 515544, 515557, 515570, - 515584, 515591, 515599, 515607, 515616, 515624, 515633, 515642, - 515652, 515660, 515669, 515678, 515688, 515697, 515707, 515717, - 515728, 515736, 515745, 515754, 515764, 515773, 515783, 515793, - 515804, 515813, 515823, 515833, 515844, 515854, 515865, 515876, - 515888, 515896, 515905, 515914, 515924, 515933, 515943, 515953, - 515964, 515973, 515983, 515993, 516004, 516014, 516025, 516036, - 516048, 516057, 516067, 516077, 516088, 516098, 516109, 516120, - 516132, 516142, 516153, 516164, 516176, 516187, 516199, 516211, - 516224, 516232, 516241, 516250, 516260, 516269, 516279, 516289, - 516300, 516309, 516319, 516329, 516340, 516350, 516361, 516372, - 516384, 516393, 516403, 516413, 516424, 516434, 516445, 516456, - 516468, 516478, 516489, 516500, 516512, 516523, 516535, 516547, - 516560, 516569, 516579, 516589, 516600, 516610, 516621, 516632, - 516644, 516654, 516665, 516676, 516688, 516699, 516711, 516723, - 516736, 516746, 516757, 516768, 516780, 516791, 516803, 516815, - 516828, 516839, 516851, 516863, 516876, 516888, 516901, 516914, - 516928, 516936, 516945, 516954, 516964, 516973, 516983, 516993, - 517004, 517013, 517023, 517033, 517044, 517054, 517065, 517076, - 517088, 517097, 517107, 517117, 517128, 517138, 517149, 517160, - 517172, 517182, 517193, 517204, 517216, 517227, 517239, 517251, - 517264, 517273, 517283, 517293, 517304, 517314, 517325, 517336, - 517348, 517358, 517369, 517380, 517392, 517403, 517415, 517427, - 517440, 517450, 517461, 517472, 517484, 517495, 517507, 517519, - 517532, 517543, 517555, 517567, 517580, 517592, 517605, 517618, - 517632, 517641, 517651, 517661, 517672, 517682, 517693, 517704, - 517716, 517726, 517737, 517748, 517760, 517771, 517783, 517795, - 517808, 517818, 517829, 517840, 517852, 517863, 517875, 517887, - 517900, 517911, 517923, 517935, 517948, 517960, 517973, 517986, - 518000, 518010, 518021, 518032, 518044, 518055, 518067, 518079, - 518092, 518103, 518115, 518127, 518140, 518152, 518165, 518178, - 518192, 518203, 518215, 518227, 518240, 518252, 518265, 518278, - 518292, 518304, 518317, 518330, 518344, 518357, 518371, 518385, - 518400, 518407, 518415, 518423, 518432, 518440, 518449, 518458, - 518468, 518476, 518485, 518494, 518504, 518513, 518523, 518533, - 518544, 518552, 518561, 518570, 518580, 518589, 518599, 518609, - 518620, 518629, 518639, 518649, 518660, 518670, 518681, 518692, - 518704, 518712, 518721, 518730, 518740, 518749, 518759, 518769, - 518780, 518789, 518799, 518809, 518820, 518830, 518841, 518852, - 518864, 518873, 518883, 518893, 518904, 518914, 518925, 518936, - 518948, 518958, 518969, 518980, 518992, 519003, 519015, 519027, - 519040, 519048, 519057, 519066, 519076, 519085, 519095, 519105, - 519116, 519125, 519135, 519145, 519156, 519166, 519177, 519188, - 519200, 519209, 519219, 519229, 519240, 519250, 519261, 519272, - 519284, 519294, 519305, 519316, 519328, 519339, 519351, 519363, - 519376, 519385, 519395, 519405, 519416, 519426, 519437, 519448, - 519460, 519470, 519481, 519492, 519504, 519515, 519527, 519539, - 519552, 519562, 519573, 519584, 519596, 519607, 519619, 519631, - 519644, 519655, 519667, 519679, 519692, 519704, 519717, 519730, - 519744, 519752, 519761, 519770, 519780, 519789, 519799, 519809, - 519820, 519829, 519839, 519849, 519860, 519870, 519881, 519892, - 519904, 519913, 519923, 519933, 519944, 519954, 519965, 519976, - 519988, 519998, 520009, 520020, 520032, 520043, 520055, 520067, - 520080, 520089, 520099, 520109, 520120, 520130, 520141, 520152, - 520164, 520174, 520185, 520196, 520208, 520219, 520231, 520243, - 520256, 520266, 520277, 520288, 520300, 520311, 520323, 520335, - 520348, 520359, 520371, 520383, 520396, 520408, 520421, 520434, - 520448, 520457, 520467, 520477, 520488, 520498, 520509, 520520, - 520532, 520542, 520553, 520564, 520576, 520587, 520599, 520611, - 520624, 520634, 520645, 520656, 520668, 520679, 520691, 520703, - 520716, 520727, 520739, 520751, 520764, 520776, 520789, 520802, - 520816, 520826, 520837, 520848, 520860, 520871, 520883, 520895, - 520908, 520919, 520931, 520943, 520956, 520968, 520981, 520994, - 521008, 521019, 521031, 521043, 521056, 521068, 521081, 521094, - 521108, 521120, 521133, 521146, 521160, 521173, 521187, 521201, - 521216, 521224, 521233, 521242, 521252, 521261, 521271, 521281, - 521292, 521301, 521311, 521321, 521332, 521342, 521353, 521364, - 521376, 521385, 521395, 521405, 521416, 521426, 521437, 521448, - 521460, 521470, 521481, 521492, 521504, 521515, 521527, 521539, - 521552, 521561, 521571, 521581, 521592, 521602, 521613, 521624, - 521636, 521646, 521657, 521668, 521680, 521691, 521703, 521715, - 521728, 521738, 521749, 521760, 521772, 521783, 521795, 521807, - 521820, 521831, 521843, 521855, 521868, 521880, 521893, 521906, - 521920, 521929, 521939, 521949, 521960, 521970, 521981, 521992, - 522004, 522014, 522025, 522036, 522048, 522059, 522071, 522083, - 522096, 522106, 522117, 522128, 522140, 522151, 522163, 522175, - 522188, 522199, 522211, 522223, 522236, 522248, 522261, 522274, - 522288, 522298, 522309, 522320, 522332, 522343, 522355, 522367, - 522380, 522391, 522403, 522415, 522428, 522440, 522453, 522466, - 522480, 522491, 522503, 522515, 522528, 522540, 522553, 522566, - 522580, 522592, 522605, 522618, 522632, 522645, 522659, 522673, - 522688, 522697, 522707, 522717, 522728, 522738, 522749, 522760, - 522772, 522782, 522793, 522804, 522816, 522827, 522839, 522851, - 522864, 522874, 522885, 522896, 522908, 522919, 522931, 522943, - 522956, 522967, 522979, 522991, 523004, 523016, 523029, 523042, - 523056, 523066, 523077, 523088, 523100, 523111, 523123, 523135, - 523148, 523159, 523171, 523183, 523196, 523208, 523221, 523234, - 523248, 523259, 523271, 523283, 523296, 523308, 523321, 523334, - 523348, 523360, 523373, 523386, 523400, 523413, 523427, 523441, - 523456, 523466, 523477, 523488, 523500, 523511, 523523, 523535, - 523548, 523559, 523571, 523583, 523596, 523608, 523621, 523634, - 523648, 523659, 523671, 523683, 523696, 523708, 523721, 523734, - 523748, 523760, 523773, 523786, 523800, 523813, 523827, 523841, - 523856, 523867, 523879, 523891, 523904, 523916, 523929, 523942, - 523956, 523968, 523981, 523994, 524008, 524021, 524035, 524049, - 524064, 524076, 524089, 524102, 524116, 524129, 524143, 524157, - 524172, 524185, 524199, 524213, 524228, 524242, 524257, 524272, -}; - - -static unsigned short closestData[] = { - 0, 0, 0, 2, 0, 0, 4, 0, - 4, 0, 8, 6, 0, 0, 8, 0, - 8, 0, 8, 10, 0, 8, 0, 16, - 12, 0, 16, 12, 0, 16, 17, 14, - 0, 0, 16, 0, 16, 0, 16, 18, - 0, 16, 0, 16, 20, 0, 16, 20, - 0, 16, 24, 22, 0, 16, 0, 32, - 24, 0, 32, 24, 0, 32, 24, 26, - 0, 32, 24, 0, 32, 33, 28, 0, - 32, 33, 28, 0, 32, 33, 28, 30, - 0, 0, 32, 0, 32, 0, 32, 34, - 0, 32, 0, 32, 36, 0, 32, 36, - 0, 32, 40, 38, 0, 32, 0, 32, - 40, 0, 32, 40, 0, 32, 40, 42, - 0, 32, 40, 0, 32, 48, 44, 0, - 32, 48, 44, 0, 32, 48, 49, 46, - 0, 32, 0, 64, 48, 0, 64, 48, - 0, 64, 48, 50, 0, 64, 48, 0, - 64, 48, 52, 0, 64, 48, 52, 0, - 64, 48, 56, 54, 0, 64, 48, 0, - 64, 65, 56, 0, 64, 65, 56, 0, - 64, 65, 56, 58, 0, 64, 65, 56, - 0, 64, 65, 56, 60, 0, 64, 65, - 67, 60, 0, 64, 65, 67, 60, 62, - 0, 0, 64, 0, 64, 0, 64, 66, - 0, 64, 0, 64, 68, 0, 64, 68, - 0, 64, 72, 70, 0, 64, 0, 64, - 72, 0, 64, 72, 0, 64, 72, 74, - 0, 64, 72, 0, 64, 80, 76, 0, - 64, 80, 76, 0, 64, 80, 81, 78, - 0, 64, 0, 64, 80, 0, 64, 80, - 0, 64, 80, 82, 0, 64, 80, 0, - 64, 80, 84, 0, 64, 80, 84, 0, - 64, 80, 88, 86, 0, 64, 80, 0, - 64, 96, 88, 0, 64, 96, 88, 0, - 64, 96, 88, 90, 0, 64, 96, 88, - 0, 64, 96, 97, 92, 0, 64, 96, - 97, 92, 0, 64, 96, 97, 92, 94, - 0, 64, 0, 128, 96, 0, 128, 96, - 0, 128, 96, 98, 0, 128, 96, 0, - 128, 96, 100, 0, 128, 96, 100, 0, - 128, 96, 104, 102, 0, 128, 96, 0, - 128, 96, 104, 0, 128, 96, 104, 0, - 128, 96, 104, 106, 0, 128, 96, 104, - 0, 128, 96, 112, 108, 0, 128, 96, - 112, 108, 0, 128, 96, 112, 113, 110, - 0, 128, 96, 0, 128, 129, 112, 0, - 128, 129, 112, 0, 128, 129, 112, 114, - 0, 128, 129, 112, 0, 128, 129, 112, - 116, 0, 128, 129, 112, 116, 0, 128, - 129, 112, 120, 118, 0, 128, 129, 112, - 0, 128, 129, 112, 120, 0, 128, 129, - 131, 120, 0, 128, 129, 131, 120, 122, - 0, 128, 129, 131, 120, 0, 128, 129, - 131, 120, 124, 0, 128, 129, 131, 120, - 124, 0, 128, 129, 131, 120, 124, 126, - 0, 0, 128, 0, 128, 0, 128, 130, - 0, 128, 0, 128, 132, 0, 128, 132, - 0, 128, 136, 134, 0, 128, 0, 128, - 136, 0, 128, 136, 0, 128, 136, 138, - 0, 128, 136, 0, 128, 144, 140, 0, - 128, 144, 140, 0, 128, 144, 145, 142, - 0, 128, 0, 128, 144, 0, 128, 144, - 0, 128, 144, 146, 0, 128, 144, 0, - 128, 144, 148, 0, 128, 144, 148, 0, - 128, 144, 152, 150, 0, 128, 144, 0, - 128, 160, 152, 0, 128, 160, 152, 0, - 128, 160, 152, 154, 0, 128, 160, 152, - 0, 128, 160, 161, 156, 0, 128, 160, - 161, 156, 0, 128, 160, 161, 156, 158, - 0, 128, 0, 128, 160, 0, 128, 160, - 0, 128, 160, 162, 0, 128, 160, 0, - 128, 160, 164, 0, 128, 160, 164, 0, - 128, 160, 168, 166, 0, 128, 160, 0, - 128, 160, 168, 0, 128, 160, 168, 0, - 128, 160, 168, 170, 0, 128, 160, 168, - 0, 128, 160, 176, 172, 0, 128, 160, - 176, 172, 0, 128, 160, 176, 177, 174, - 0, 128, 160, 0, 128, 192, 176, 0, - 128, 192, 176, 0, 128, 192, 176, 178, - 0, 128, 192, 176, 0, 128, 192, 176, - 180, 0, 128, 192, 176, 180, 0, 128, - 192, 176, 184, 182, 0, 128, 192, 176, - 0, 128, 192, 193, 184, 0, 128, 192, - 193, 184, 0, 128, 192, 193, 184, 186, - 0, 128, 192, 193, 184, 0, 128, 192, - 193, 184, 188, 0, 128, 192, 193, 195, - 188, 0, 128, 192, 193, 195, 188, 190, - 0, 128, 0, 256, 192, 0, 256, 192, - 0, 256, 192, 194, 0, 256, 192, 0, - 256, 192, 196, 0, 256, 192, 196, 0, - 256, 192, 200, 198, 0, 256, 192, 0, - 256, 192, 200, 0, 256, 192, 200, 0, - 256, 192, 200, 202, 0, 256, 192, 200, - 0, 256, 192, 208, 204, 0, 256, 192, - 208, 204, 0, 256, 192, 208, 209, 206, - 0, 256, 192, 0, 256, 192, 208, 0, - 256, 192, 208, 0, 256, 192, 208, 210, - 0, 256, 192, 208, 0, 256, 192, 208, - 212, 0, 256, 192, 208, 212, 0, 256, - 192, 208, 216, 214, 0, 256, 192, 208, - 0, 256, 192, 224, 216, 0, 256, 192, - 224, 216, 0, 256, 192, 224, 216, 218, - 0, 256, 192, 224, 216, 0, 256, 192, - 224, 225, 220, 0, 256, 192, 224, 225, - 220, 0, 256, 192, 224, 225, 220, 222, - 0, 256, 192, 0, 256, 257, 224, 0, - 256, 257, 224, 0, 256, 257, 224, 226, - 0, 256, 257, 224, 0, 256, 257, 224, - 228, 0, 256, 257, 224, 228, 0, 256, - 257, 224, 232, 230, 0, 256, 257, 224, - 0, 256, 257, 224, 232, 0, 256, 257, - 224, 232, 0, 256, 257, 224, 232, 234, - 0, 256, 257, 224, 232, 0, 256, 257, - 224, 240, 236, 0, 256, 257, 224, 240, - 236, 0, 256, 257, 224, 240, 241, 238, - 0, 256, 257, 224, 0, 256, 257, 224, - 240, 0, 256, 257, 259, 240, 0, 256, - 257, 259, 240, 242, 0, 256, 257, 259, - 240, 0, 256, 257, 259, 240, 244, 0, - 256, 257, 259, 240, 244, 0, 256, 257, - 259, 240, 248, 246, 0, 256, 257, 259, - 240, 0, 256, 257, 259, 240, 248, 0, - 256, 257, 259, 240, 248, 0, 256, 257, - 259, 240, 248, 250, 0, 256, 257, 259, - 263, 248, 0, 256, 257, 259, 263, 248, - 252, 0, 256, 257, 259, 263, 248, 252, - 0, 256, 257, 259, 263, 248, 252, 254, - 0, 0, 256, 0, 256, 0, 256, 258, - 0, 256, 0, 256, 260, 0, 256, 260, - 0, 256, 264, 262, 0, 256, 0, 256, - 264, 0, 256, 264, 0, 256, 264, 266, - 0, 256, 264, 0, 256, 272, 268, 0, - 256, 272, 268, 0, 256, 272, 273, 270, - 0, 256, 0, 256, 272, 0, 256, 272, - 0, 256, 272, 274, 0, 256, 272, 0, - 256, 272, 276, 0, 256, 272, 276, 0, - 256, 272, 280, 278, 0, 256, 272, 0, - 256, 288, 280, 0, 256, 288, 280, 0, - 256, 288, 280, 282, 0, 256, 288, 280, - 0, 256, 288, 289, 284, 0, 256, 288, - 289, 284, 0, 256, 288, 289, 284, 286, - 0, 256, 0, 256, 288, 0, 256, 288, - 0, 256, 288, 290, 0, 256, 288, 0, - 256, 288, 292, 0, 256, 288, 292, 0, - 256, 288, 296, 294, 0, 256, 288, 0, - 256, 288, 296, 0, 256, 288, 296, 0, - 256, 288, 296, 298, 0, 256, 288, 296, - 0, 256, 288, 304, 300, 0, 256, 288, - 304, 300, 0, 256, 288, 304, 305, 302, - 0, 256, 288, 0, 256, 320, 304, 0, - 256, 320, 304, 0, 256, 320, 304, 306, - 0, 256, 320, 304, 0, 256, 320, 304, - 308, 0, 256, 320, 304, 308, 0, 256, - 320, 304, 312, 310, 0, 256, 320, 304, - 0, 256, 320, 321, 312, 0, 256, 320, - 321, 312, 0, 256, 320, 321, 312, 314, - 0, 256, 320, 321, 312, 0, 256, 320, - 321, 312, 316, 0, 256, 320, 321, 323, - 316, 0, 256, 320, 321, 323, 316, 318, - 0, 256, 0, 256, 320, 0, 256, 320, - 0, 256, 320, 322, 0, 256, 320, 0, - 256, 320, 324, 0, 256, 320, 324, 0, - 256, 320, 328, 326, 0, 256, 320, 0, - 256, 320, 328, 0, 256, 320, 328, 0, - 256, 320, 328, 330, 0, 256, 320, 328, - 0, 256, 320, 336, 332, 0, 256, 320, - 336, 332, 0, 256, 320, 336, 337, 334, - 0, 256, 320, 0, 256, 320, 336, 0, - 256, 320, 336, 0, 256, 320, 336, 338, - 0, 256, 320, 336, 0, 256, 320, 336, - 340, 0, 256, 320, 336, 340, 0, 256, - 320, 336, 344, 342, 0, 256, 320, 336, - 0, 256, 320, 352, 344, 0, 256, 320, - 352, 344, 0, 256, 320, 352, 344, 346, - 0, 256, 320, 352, 344, 0, 256, 320, - 352, 353, 348, 0, 256, 320, 352, 353, - 348, 0, 256, 320, 352, 353, 348, 350, - 0, 256, 320, 0, 256, 384, 352, 0, - 256, 384, 352, 0, 256, 384, 352, 354, - 0, 256, 384, 352, 0, 256, 384, 352, - 356, 0, 256, 384, 352, 356, 0, 256, - 384, 352, 360, 358, 0, 256, 384, 352, - 0, 256, 384, 352, 360, 0, 256, 384, - 352, 360, 0, 256, 384, 352, 360, 362, - 0, 256, 384, 352, 360, 0, 256, 384, - 352, 368, 364, 0, 256, 384, 352, 368, - 364, 0, 256, 384, 352, 368, 369, 366, - 0, 256, 384, 352, 0, 256, 384, 385, - 368, 0, 256, 384, 385, 368, 0, 256, - 384, 385, 368, 370, 0, 256, 384, 385, - 368, 0, 256, 384, 385, 368, 372, 0, - 256, 384, 385, 368, 372, 0, 256, 384, - 385, 368, 376, 374, 0, 256, 384, 385, - 368, 0, 256, 384, 385, 368, 376, 0, - 256, 384, 385, 387, 376, 0, 256, 384, - 385, 387, 376, 378, 0, 256, 384, 385, - 387, 376, 0, 256, 384, 385, 387, 376, - 380, 0, 256, 384, 385, 387, 376, 380, - 0, 256, 384, 385, 387, 376, 380, 382, - 0, 256, 0, 512, 384, 0, 512, 384, - 0, 512, 384, 386, 0, 512, 384, 0, - 512, 384, 388, 0, 512, 384, 388, 0, - 512, 384, 392, 390, 0, 512, 384, 0, - 512, 384, 392, 0, 512, 384, 392, 0, - 512, 384, 392, 394, 0, 512, 384, 392, - 0, 512, 384, 400, 396, 0, 512, 384, - 400, 396, 0, 512, 384, 400, 401, 398, - 0, 512, 384, 0, 512, 384, 400, 0, - 512, 384, 400, 0, 512, 384, 400, 402, - 0, 512, 384, 400, 0, 512, 384, 400, - 404, 0, 512, 384, 400, 404, 0, 512, - 384, 400, 408, 406, 0, 512, 384, 400, - 0, 512, 384, 416, 408, 0, 512, 384, - 416, 408, 0, 512, 384, 416, 408, 410, - 0, 512, 384, 416, 408, 0, 512, 384, - 416, 417, 412, 0, 512, 384, 416, 417, - 412, 0, 512, 384, 416, 417, 412, 414, - 0, 512, 384, 0, 512, 384, 416, 0, - 512, 384, 416, 0, 512, 384, 416, 418, - 0, 512, 384, 416, 0, 512, 384, 416, - 420, 0, 512, 384, 416, 420, 0, 512, - 384, 416, 424, 422, 0, 512, 384, 416, - 0, 512, 384, 416, 424, 0, 512, 384, - 416, 424, 0, 512, 384, 416, 424, 426, - 0, 512, 384, 416, 424, 0, 512, 384, - 416, 432, 428, 0, 512, 384, 416, 432, - 428, 0, 512, 384, 416, 432, 433, 430, - 0, 512, 384, 416, 0, 512, 384, 448, - 432, 0, 512, 384, 448, 432, 0, 512, - 384, 448, 432, 434, 0, 512, 384, 448, - 432, 0, 512, 384, 448, 432, 436, 0, - 512, 384, 448, 432, 436, 0, 512, 384, - 448, 432, 440, 438, 0, 512, 384, 448, - 432, 0, 512, 384, 448, 449, 440, 0, - 512, 384, 448, 449, 440, 0, 512, 384, - 448, 449, 440, 442, 0, 512, 384, 448, - 449, 440, 0, 512, 384, 448, 449, 440, - 444, 0, 512, 384, 448, 449, 451, 444, - 0, 512, 384, 448, 449, 451, 444, 446, - 0, 512, 384, 0, 512, 513, 448, 0, - 512, 513, 448, 0, 512, 513, 448, 450, - 0, 512, 513, 448, 0, 512, 513, 448, - 452, 0, 512, 513, 448, 452, 0, 512, - 513, 448, 456, 454, 0, 512, 513, 448, - 0, 512, 513, 448, 456, 0, 512, 513, - 448, 456, 0, 512, 513, 448, 456, 458, - 0, 512, 513, 448, 456, 0, 512, 513, - 448, 464, 460, 0, 512, 513, 448, 464, - 460, 0, 512, 513, 448, 464, 465, 462, - 0, 512, 513, 448, 0, 512, 513, 448, - 464, 0, 512, 513, 448, 464, 0, 512, - 513, 448, 464, 466, 0, 512, 513, 448, - 464, 0, 512, 513, 448, 464, 468, 0, - 512, 513, 448, 464, 468, 0, 512, 513, - 448, 464, 472, 470, 0, 512, 513, 448, - 464, 0, 512, 513, 448, 480, 472, 0, - 512, 513, 448, 480, 472, 0, 512, 513, - 448, 480, 472, 474, 0, 512, 513, 448, - 480, 472, 0, 512, 513, 448, 480, 481, - 476, 0, 512, 513, 448, 480, 481, 476, - 0, 512, 513, 448, 480, 481, 476, 478, - 0, 512, 513, 448, 0, 512, 513, 448, - 480, 0, 512, 513, 515, 480, 0, 512, - 513, 515, 480, 482, 0, 512, 513, 515, - 480, 0, 512, 513, 515, 480, 484, 0, - 512, 513, 515, 480, 484, 0, 512, 513, - 515, 480, 488, 486, 0, 512, 513, 515, - 480, 0, 512, 513, 515, 480, 488, 0, - 512, 513, 515, 480, 488, 0, 512, 513, - 515, 480, 488, 490, 0, 512, 513, 515, - 480, 488, 0, 512, 513, 515, 480, 496, - 492, 0, 512, 513, 515, 480, 496, 492, - 0, 512, 513, 515, 480, 496, 497, 494, - 0, 512, 513, 515, 480, 0, 512, 513, - 515, 480, 496, 0, 512, 513, 515, 480, - 496, 0, 512, 513, 515, 480, 496, 498, - 0, 512, 513, 515, 519, 496, 0, 512, - 513, 515, 519, 496, 500, 0, 512, 513, - 515, 519, 496, 500, 0, 512, 513, 515, - 519, 496, 504, 502, 0, 512, 513, 515, - 519, 496, 0, 512, 513, 515, 519, 496, - 504, 0, 512, 513, 515, 519, 496, 504, - 0, 512, 513, 515, 519, 496, 504, 506, - 0, 512, 513, 515, 519, 496, 504, 0, - 512, 513, 515, 519, 496, 504, 508, 0, - 512, 513, 515, 519, 496, 504, 508, 0, - 512, 513, 515, 519, 496, 504, 508, 510, - 0, 0, 512, 0, 512, 0, 512, 514, - 0, 512, 0, 512, 516, 0, 512, 516, - 0, 512, 520, 518, 0, 512, 0, 512, - 520, 0, 512, 520, 0, 512, 520, 522, - 0, 512, 520, 0, 512, 528, 524, 0, - 512, 528, 524, 0, 512, 528, 529, 526, - 0, 512, 0, 512, 528, 0, 512, 528, - 0, 512, 528, 530, 0, 512, 528, 0, - 512, 528, 532, 0, 512, 528, 532, 0, - 512, 528, 536, 534, 0, 512, 528, 0, - 512, 544, 536, 0, 512, 544, 536, 0, - 512, 544, 536, 538, 0, 512, 544, 536, - 0, 512, 544, 545, 540, 0, 512, 544, - 545, 540, 0, 512, 544, 545, 540, 542, - 0, 512, 0, 512, 544, 0, 512, 544, - 0, 512, 544, 546, 0, 512, 544, 0, - 512, 544, 548, 0, 512, 544, 548, 0, - 512, 544, 552, 550, 0, 512, 544, 0, - 512, 544, 552, 0, 512, 544, 552, 0, - 512, 544, 552, 554, 0, 512, 544, 552, - 0, 512, 544, 560, 556, 0, 512, 544, - 560, 556, 0, 512, 544, 560, 561, 558, - 0, 512, 544, 0, 512, 576, 560, 0, - 512, 576, 560, 0, 512, 576, 560, 562, - 0, 512, 576, 560, 0, 512, 576, 560, - 564, 0, 512, 576, 560, 564, 0, 512, - 576, 560, 568, 566, 0, 512, 576, 560, - 0, 512, 576, 577, 568, 0, 512, 576, - 577, 568, 0, 512, 576, 577, 568, 570, - 0, 512, 576, 577, 568, 0, 512, 576, - 577, 568, 572, 0, 512, 576, 577, 579, - 572, 0, 512, 576, 577, 579, 572, 574, - 0, 512, 0, 512, 576, 0, 512, 576, - 0, 512, 576, 578, 0, 512, 576, 0, - 512, 576, 580, 0, 512, 576, 580, 0, - 512, 576, 584, 582, 0, 512, 576, 0, - 512, 576, 584, 0, 512, 576, 584, 0, - 512, 576, 584, 586, 0, 512, 576, 584, - 0, 512, 576, 592, 588, 0, 512, 576, - 592, 588, 0, 512, 576, 592, 593, 590, - 0, 512, 576, 0, 512, 576, 592, 0, - 512, 576, 592, 0, 512, 576, 592, 594, - 0, 512, 576, 592, 0, 512, 576, 592, - 596, 0, 512, 576, 592, 596, 0, 512, - 576, 592, 600, 598, 0, 512, 576, 592, - 0, 512, 576, 608, 600, 0, 512, 576, - 608, 600, 0, 512, 576, 608, 600, 602, - 0, 512, 576, 608, 600, 0, 512, 576, - 608, 609, 604, 0, 512, 576, 608, 609, - 604, 0, 512, 576, 608, 609, 604, 606, - 0, 512, 576, 0, 512, 640, 608, 0, - 512, 640, 608, 0, 512, 640, 608, 610, - 0, 512, 640, 608, 0, 512, 640, 608, - 612, 0, 512, 640, 608, 612, 0, 512, - 640, 608, 616, 614, 0, 512, 640, 608, - 0, 512, 640, 608, 616, 0, 512, 640, - 608, 616, 0, 512, 640, 608, 616, 618, - 0, 512, 640, 608, 616, 0, 512, 640, - 608, 624, 620, 0, 512, 640, 608, 624, - 620, 0, 512, 640, 608, 624, 625, 622, - 0, 512, 640, 608, 0, 512, 640, 641, - 624, 0, 512, 640, 641, 624, 0, 512, - 640, 641, 624, 626, 0, 512, 640, 641, - 624, 0, 512, 640, 641, 624, 628, 0, - 512, 640, 641, 624, 628, 0, 512, 640, - 641, 624, 632, 630, 0, 512, 640, 641, - 624, 0, 512, 640, 641, 624, 632, 0, - 512, 640, 641, 643, 632, 0, 512, 640, - 641, 643, 632, 634, 0, 512, 640, 641, - 643, 632, 0, 512, 640, 641, 643, 632, - 636, 0, 512, 640, 641, 643, 632, 636, - 0, 512, 640, 641, 643, 632, 636, 638, - 0, 512, 0, 512, 640, 0, 512, 640, - 0, 512, 640, 642, 0, 512, 640, 0, - 512, 640, 644, 0, 512, 640, 644, 0, - 512, 640, 648, 646, 0, 512, 640, 0, - 512, 640, 648, 0, 512, 640, 648, 0, - 512, 640, 648, 650, 0, 512, 640, 648, - 0, 512, 640, 656, 652, 0, 512, 640, - 656, 652, 0, 512, 640, 656, 657, 654, - 0, 512, 640, 0, 512, 640, 656, 0, - 512, 640, 656, 0, 512, 640, 656, 658, - 0, 512, 640, 656, 0, 512, 640, 656, - 660, 0, 512, 640, 656, 660, 0, 512, - 640, 656, 664, 662, 0, 512, 640, 656, - 0, 512, 640, 672, 664, 0, 512, 640, - 672, 664, 0, 512, 640, 672, 664, 666, - 0, 512, 640, 672, 664, 0, 512, 640, - 672, 673, 668, 0, 512, 640, 672, 673, - 668, 0, 512, 640, 672, 673, 668, 670, - 0, 512, 640, 0, 512, 640, 672, 0, - 512, 640, 672, 0, 512, 640, 672, 674, - 0, 512, 640, 672, 0, 512, 640, 672, - 676, 0, 512, 640, 672, 676, 0, 512, - 640, 672, 680, 678, 0, 512, 640, 672, - 0, 512, 640, 672, 680, 0, 512, 640, - 672, 680, 0, 512, 640, 672, 680, 682, - 0, 512, 640, 672, 680, 0, 512, 640, - 672, 688, 684, 0, 512, 640, 672, 688, - 684, 0, 512, 640, 672, 688, 689, 686, - 0, 512, 640, 672, 0, 512, 640, 704, - 688, 0, 512, 640, 704, 688, 0, 512, - 640, 704, 688, 690, 0, 512, 640, 704, - 688, 0, 512, 640, 704, 688, 692, 0, - 512, 640, 704, 688, 692, 0, 512, 640, - 704, 688, 696, 694, 0, 512, 640, 704, - 688, 0, 512, 640, 704, 705, 696, 0, - 512, 640, 704, 705, 696, 0, 512, 640, - 704, 705, 696, 698, 0, 512, 640, 704, - 705, 696, 0, 512, 640, 704, 705, 696, - 700, 0, 512, 640, 704, 705, 707, 700, - 0, 512, 640, 704, 705, 707, 700, 702, - 0, 512, 640, 0, 512, 768, 704, 0, - 512, 768, 704, 0, 512, 768, 704, 706, - 0, 512, 768, 704, 0, 512, 768, 704, - 708, 0, 512, 768, 704, 708, 0, 512, - 768, 704, 712, 710, 0, 512, 768, 704, - 0, 512, 768, 704, 712, 0, 512, 768, - 704, 712, 0, 512, 768, 704, 712, 714, - 0, 512, 768, 704, 712, 0, 512, 768, - 704, 720, 716, 0, 512, 768, 704, 720, - 716, 0, 512, 768, 704, 720, 721, 718, - 0, 512, 768, 704, 0, 512, 768, 704, - 720, 0, 512, 768, 704, 720, 0, 512, - 768, 704, 720, 722, 0, 512, 768, 704, - 720, 0, 512, 768, 704, 720, 724, 0, - 512, 768, 704, 720, 724, 0, 512, 768, - 704, 720, 728, 726, 0, 512, 768, 704, - 720, 0, 512, 768, 704, 736, 728, 0, - 512, 768, 704, 736, 728, 0, 512, 768, - 704, 736, 728, 730, 0, 512, 768, 704, - 736, 728, 0, 512, 768, 704, 736, 737, - 732, 0, 512, 768, 704, 736, 737, 732, - 0, 512, 768, 704, 736, 737, 732, 734, - 0, 512, 768, 704, 0, 512, 768, 769, - 736, 0, 512, 768, 769, 736, 0, 512, - 768, 769, 736, 738, 0, 512, 768, 769, - 736, 0, 512, 768, 769, 736, 740, 0, - 512, 768, 769, 736, 740, 0, 512, 768, - 769, 736, 744, 742, 0, 512, 768, 769, - 736, 0, 512, 768, 769, 736, 744, 0, - 512, 768, 769, 736, 744, 0, 512, 768, - 769, 736, 744, 746, 0, 512, 768, 769, - 736, 744, 0, 512, 768, 769, 736, 752, - 748, 0, 512, 768, 769, 736, 752, 748, - 0, 512, 768, 769, 736, 752, 753, 750, - 0, 512, 768, 769, 736, 0, 512, 768, - 769, 736, 752, 0, 512, 768, 769, 771, - 752, 0, 512, 768, 769, 771, 752, 754, - 0, 512, 768, 769, 771, 752, 0, 512, - 768, 769, 771, 752, 756, 0, 512, 768, - 769, 771, 752, 756, 0, 512, 768, 769, - 771, 752, 760, 758, 0, 512, 768, 769, - 771, 752, 0, 512, 768, 769, 771, 752, - 760, 0, 512, 768, 769, 771, 752, 760, - 0, 512, 768, 769, 771, 752, 760, 762, - 0, 512, 768, 769, 771, 775, 760, 0, - 512, 768, 769, 771, 775, 760, 764, 0, - 512, 768, 769, 771, 775, 760, 764, 0, - 512, 768, 769, 771, 775, 760, 764, 766, - 0, 512, 0, 1024, 768, 0, 1024, 768, - 0, 1024, 768, 770, 0, 1024, 768, 0, - 1024, 768, 772, 0, 1024, 768, 772, 0, - 1024, 768, 776, 774, 0, 1024, 768, 0, - 1024, 768, 776, 0, 1024, 768, 776, 0, - 1024, 768, 776, 778, 0, 1024, 768, 776, - 0, 1024, 768, 784, 780, 0, 1024, 768, - 784, 780, 0, 1024, 768, 784, 785, 782, - 0, 1024, 768, 0, 1024, 768, 784, 0, - 1024, 768, 784, 0, 1024, 768, 784, 786, - 0, 1024, 768, 784, 0, 1024, 768, 784, - 788, 0, 1024, 768, 784, 788, 0, 1024, - 768, 784, 792, 790, 0, 1024, 768, 784, - 0, 1024, 768, 800, 792, 0, 1024, 768, - 800, 792, 0, 1024, 768, 800, 792, 794, - 0, 1024, 768, 800, 792, 0, 1024, 768, - 800, 801, 796, 0, 1024, 768, 800, 801, - 796, 0, 1024, 768, 800, 801, 796, 798, - 0, 1024, 768, 0, 1024, 768, 800, 0, - 1024, 768, 800, 0, 1024, 768, 800, 802, - 0, 1024, 768, 800, 0, 1024, 768, 800, - 804, 0, 1024, 768, 800, 804, 0, 1024, - 768, 800, 808, 806, 0, 1024, 768, 800, - 0, 1024, 768, 800, 808, 0, 1024, 768, - 800, 808, 0, 1024, 768, 800, 808, 810, - 0, 1024, 768, 800, 808, 0, 1024, 768, - 800, 816, 812, 0, 1024, 768, 800, 816, - 812, 0, 1024, 768, 800, 816, 817, 814, - 0, 1024, 768, 800, 0, 1024, 768, 832, - 816, 0, 1024, 768, 832, 816, 0, 1024, - 768, 832, 816, 818, 0, 1024, 768, 832, - 816, 0, 1024, 768, 832, 816, 820, 0, - 1024, 768, 832, 816, 820, 0, 1024, 768, - 832, 816, 824, 822, 0, 1024, 768, 832, - 816, 0, 1024, 768, 832, 833, 824, 0, - 1024, 768, 832, 833, 824, 0, 1024, 768, - 832, 833, 824, 826, 0, 1024, 768, 832, - 833, 824, 0, 1024, 768, 832, 833, 824, - 828, 0, 1024, 768, 832, 833, 835, 828, - 0, 1024, 768, 832, 833, 835, 828, 830, - 0, 1024, 768, 0, 1024, 768, 832, 0, - 1024, 768, 832, 0, 1024, 768, 832, 834, - 0, 1024, 768, 832, 0, 1024, 768, 832, - 836, 0, 1024, 768, 832, 836, 0, 1024, - 768, 832, 840, 838, 0, 1024, 768, 832, - 0, 1024, 768, 832, 840, 0, 1024, 768, - 832, 840, 0, 1024, 768, 832, 840, 842, - 0, 1024, 768, 832, 840, 0, 1024, 768, - 832, 848, 844, 0, 1024, 768, 832, 848, - 844, 0, 1024, 768, 832, 848, 849, 846, - 0, 1024, 768, 832, 0, 1024, 768, 832, - 848, 0, 1024, 768, 832, 848, 0, 1024, - 768, 832, 848, 850, 0, 1024, 768, 832, - 848, 0, 1024, 768, 832, 848, 852, 0, - 1024, 768, 832, 848, 852, 0, 1024, 768, - 832, 848, 856, 854, 0, 1024, 768, 832, - 848, 0, 1024, 768, 832, 864, 856, 0, - 1024, 768, 832, 864, 856, 0, 1024, 768, - 832, 864, 856, 858, 0, 1024, 768, 832, - 864, 856, 0, 1024, 768, 832, 864, 865, - 860, 0, 1024, 768, 832, 864, 865, 860, - 0, 1024, 768, 832, 864, 865, 860, 862, - 0, 1024, 768, 832, 0, 1024, 768, 896, - 864, 0, 1024, 768, 896, 864, 0, 1024, - 768, 896, 864, 866, 0, 1024, 768, 896, - 864, 0, 1024, 768, 896, 864, 868, 0, - 1024, 768, 896, 864, 868, 0, 1024, 768, - 896, 864, 872, 870, 0, 1024, 768, 896, - 864, 0, 1024, 768, 896, 864, 872, 0, - 1024, 768, 896, 864, 872, 0, 1024, 768, - 896, 864, 872, 874, 0, 1024, 768, 896, - 864, 872, 0, 1024, 768, 896, 864, 880, - 876, 0, 1024, 768, 896, 864, 880, 876, - 0, 1024, 768, 896, 864, 880, 881, 878, - 0, 1024, 768, 896, 864, 0, 1024, 768, - 896, 897, 880, 0, 1024, 768, 896, 897, - 880, 0, 1024, 768, 896, 897, 880, 882, - 0, 1024, 768, 896, 897, 880, 0, 1024, - 768, 896, 897, 880, 884, 0, 1024, 768, - 896, 897, 880, 884, 0, 1024, 768, 896, - 897, 880, 888, 886, 0, 1024, 768, 896, - 897, 880, 0, 1024, 768, 896, 897, 880, - 888, 0, 1024, 768, 896, 897, 899, 888, - 0, 1024, 768, 896, 897, 899, 888, 890, - 0, 1024, 768, 896, 897, 899, 888, 0, - 1024, 768, 896, 897, 899, 888, 892, 0, - 1024, 768, 896, 897, 899, 888, 892, 0, - 1024, 768, 896, 897, 899, 888, 892, 894, - 0, 1024, 768, 0, 1024, 1025, 896, 0, - 1024, 1025, 896, 0, 1024, 1025, 896, 898, - 0, 1024, 1025, 896, 0, 1024, 1025, 896, - 900, 0, 1024, 1025, 896, 900, 0, 1024, - 1025, 896, 904, 902, 0, 1024, 1025, 896, - 0, 1024, 1025, 896, 904, 0, 1024, 1025, - 896, 904, 0, 1024, 1025, 896, 904, 906, - 0, 1024, 1025, 896, 904, 0, 1024, 1025, - 896, 912, 908, 0, 1024, 1025, 896, 912, - 908, 0, 1024, 1025, 896, 912, 913, 910, - 0, 1024, 1025, 896, 0, 1024, 1025, 896, - 912, 0, 1024, 1025, 896, 912, 0, 1024, - 1025, 896, 912, 914, 0, 1024, 1025, 896, - 912, 0, 1024, 1025, 896, 912, 916, 0, - 1024, 1025, 896, 912, 916, 0, 1024, 1025, - 896, 912, 920, 918, 0, 1024, 1025, 896, - 912, 0, 1024, 1025, 896, 928, 920, 0, - 1024, 1025, 896, 928, 920, 0, 1024, 1025, - 896, 928, 920, 922, 0, 1024, 1025, 896, - 928, 920, 0, 1024, 1025, 896, 928, 929, - 924, 0, 1024, 1025, 896, 928, 929, 924, - 0, 1024, 1025, 896, 928, 929, 924, 926, - 0, 1024, 1025, 896, 0, 1024, 1025, 896, - 928, 0, 1024, 1025, 896, 928, 0, 1024, - 1025, 896, 928, 930, 0, 1024, 1025, 896, - 928, 0, 1024, 1025, 896, 928, 932, 0, - 1024, 1025, 896, 928, 932, 0, 1024, 1025, - 896, 928, 936, 934, 0, 1024, 1025, 896, - 928, 0, 1024, 1025, 896, 928, 936, 0, - 1024, 1025, 896, 928, 936, 0, 1024, 1025, - 896, 928, 936, 938, 0, 1024, 1025, 896, - 928, 936, 0, 1024, 1025, 896, 928, 944, - 940, 0, 1024, 1025, 896, 928, 944, 940, - 0, 1024, 1025, 896, 928, 944, 945, 942, - 0, 1024, 1025, 896, 928, 0, 1024, 1025, - 896, 960, 944, 0, 1024, 1025, 896, 960, - 944, 0, 1024, 1025, 896, 960, 944, 946, - 0, 1024, 1025, 896, 960, 944, 0, 1024, - 1025, 896, 960, 944, 948, 0, 1024, 1025, - 896, 960, 944, 948, 0, 1024, 1025, 896, - 960, 944, 952, 950, 0, 1024, 1025, 896, - 960, 944, 0, 1024, 1025, 896, 960, 961, - 952, 0, 1024, 1025, 896, 960, 961, 952, - 0, 1024, 1025, 896, 960, 961, 952, 954, - 0, 1024, 1025, 896, 960, 961, 952, 0, - 1024, 1025, 896, 960, 961, 952, 956, 0, - 1024, 1025, 896, 960, 961, 963, 956, 0, - 1024, 1025, 896, 960, 961, 963, 956, 958, - 0, 1024, 1025, 896, 0, 1024, 1025, 896, - 960, 0, 1024, 1025, 1027, 960, 0, 1024, - 1025, 1027, 960, 962, 0, 1024, 1025, 1027, - 960, 0, 1024, 1025, 1027, 960, 964, 0, - 1024, 1025, 1027, 960, 964, 0, 1024, 1025, - 1027, 960, 968, 966, 0, 1024, 1025, 1027, - 960, 0, 1024, 1025, 1027, 960, 968, 0, - 1024, 1025, 1027, 960, 968, 0, 1024, 1025, - 1027, 960, 968, 970, 0, 1024, 1025, 1027, - 960, 968, 0, 1024, 1025, 1027, 960, 976, - 972, 0, 1024, 1025, 1027, 960, 976, 972, - 0, 1024, 1025, 1027, 960, 976, 977, 974, - 0, 1024, 1025, 1027, 960, 0, 1024, 1025, - 1027, 960, 976, 0, 1024, 1025, 1027, 960, - 976, 0, 1024, 1025, 1027, 960, 976, 978, - 0, 1024, 1025, 1027, 960, 976, 0, 1024, - 1025, 1027, 960, 976, 980, 0, 1024, 1025, - 1027, 960, 976, 980, 0, 1024, 1025, 1027, - 960, 976, 984, 982, 0, 1024, 1025, 1027, - 960, 976, 0, 1024, 1025, 1027, 960, 992, - 984, 0, 1024, 1025, 1027, 960, 992, 984, - 0, 1024, 1025, 1027, 960, 992, 984, 986, - 0, 1024, 1025, 1027, 960, 992, 984, 0, - 1024, 1025, 1027, 960, 992, 993, 988, 0, - 1024, 1025, 1027, 960, 992, 993, 988, 0, - 1024, 1025, 1027, 960, 992, 993, 988, 990, - 0, 1024, 1025, 1027, 960, 0, 1024, 1025, - 1027, 960, 992, 0, 1024, 1025, 1027, 960, - 992, 0, 1024, 1025, 1027, 960, 992, 994, - 0, 1024, 1025, 1027, 1031, 992, 0, 1024, - 1025, 1027, 1031, 992, 996, 0, 1024, 1025, - 1027, 1031, 992, 996, 0, 1024, 1025, 1027, - 1031, 992, 1000, 998, 0, 1024, 1025, 1027, - 1031, 992, 0, 1024, 1025, 1027, 1031, 992, - 1000, 0, 1024, 1025, 1027, 1031, 992, 1000, - 0, 1024, 1025, 1027, 1031, 992, 1000, 1002, - 0, 1024, 1025, 1027, 1031, 992, 1000, 0, - 1024, 1025, 1027, 1031, 992, 1008, 1004, 0, - 1024, 1025, 1027, 1031, 992, 1008, 1004, 0, - 1024, 1025, 1027, 1031, 992, 1008, 1009, 1006, - 0, 1024, 1025, 1027, 1031, 992, 0, 1024, - 1025, 1027, 1031, 992, 1008, 0, 1024, 1025, - 1027, 1031, 992, 1008, 0, 1024, 1025, 1027, - 1031, 992, 1008, 1010, 0, 1024, 1025, 1027, - 1031, 992, 1008, 0, 1024, 1025, 1027, 1031, - 992, 1008, 1012, 0, 1024, 1025, 1027, 1031, - 992, 1008, 1012, 0, 1024, 1025, 1027, 1031, - 992, 1008, 1016, 1014, 0, 1024, 1025, 1027, - 1031, 1039, 1008, 0, 1024, 1025, 1027, 1031, - 1039, 1008, 1016, 0, 1024, 1025, 1027, 1031, - 1039, 1008, 1016, 0, 1024, 1025, 1027, 1031, - 1039, 1008, 1016, 1018, 0, 1024, 1025, 1027, - 1031, 1039, 1008, 1016, 0, 1024, 1025, 1027, - 1031, 1039, 1008, 1016, 1020, 0, 1024, 1025, - 1027, 1031, 1039, 1008, 1016, 1020, 0, 1024, - 1025, 1027, 1031, 1039, 1008, 1016, 1020, 1022, - 0, 0, 1024, 0, 1024, 0, 1024, 1026, - 0, 1024, 0, 1024, 1028, 0, 1024, 1028, - 0, 1024, 1032, 1030, 0, 1024, 0, 1024, - 1032, 0, 1024, 1032, 0, 1024, 1032, 1034, - 0, 1024, 1032, 0, 1024, 1040, 1036, 0, - 1024, 1040, 1036, 0, 1024, 1040, 1041, 1038, - 0, 1024, 0, 1024, 1040, 0, 1024, 1040, - 0, 1024, 1040, 1042, 0, 1024, 1040, 0, - 1024, 1040, 1044, 0, 1024, 1040, 1044, 0, - 1024, 1040, 1048, 1046, 0, 1024, 1040, 0, - 1024, 1056, 1048, 0, 1024, 1056, 1048, 0, - 1024, 1056, 1048, 1050, 0, 1024, 1056, 1048, - 0, 1024, 1056, 1057, 1052, 0, 1024, 1056, - 1057, 1052, 0, 1024, 1056, 1057, 1052, 1054, - 0, 1024, 0, 1024, 1056, 0, 1024, 1056, - 0, 1024, 1056, 1058, 0, 1024, 1056, 0, - 1024, 1056, 1060, 0, 1024, 1056, 1060, 0, - 1024, 1056, 1064, 1062, 0, 1024, 1056, 0, - 1024, 1056, 1064, 0, 1024, 1056, 1064, 0, - 1024, 1056, 1064, 1066, 0, 1024, 1056, 1064, - 0, 1024, 1056, 1072, 1068, 0, 1024, 1056, - 1072, 1068, 0, 1024, 1056, 1072, 1073, 1070, - 0, 1024, 1056, 0, 1024, 1088, 1072, 0, - 1024, 1088, 1072, 0, 1024, 1088, 1072, 1074, - 0, 1024, 1088, 1072, 0, 1024, 1088, 1072, - 1076, 0, 1024, 1088, 1072, 1076, 0, 1024, - 1088, 1072, 1080, 1078, 0, 1024, 1088, 1072, - 0, 1024, 1088, 1089, 1080, 0, 1024, 1088, - 1089, 1080, 0, 1024, 1088, 1089, 1080, 1082, - 0, 1024, 1088, 1089, 1080, 0, 1024, 1088, - 1089, 1080, 1084, 0, 1024, 1088, 1089, 1091, - 1084, 0, 1024, 1088, 1089, 1091, 1084, 1086, - 0, 1024, 0, 1024, 1088, 0, 1024, 1088, - 0, 1024, 1088, 1090, 0, 1024, 1088, 0, - 1024, 1088, 1092, 0, 1024, 1088, 1092, 0, - 1024, 1088, 1096, 1094, 0, 1024, 1088, 0, - 1024, 1088, 1096, 0, 1024, 1088, 1096, 0, - 1024, 1088, 1096, 1098, 0, 1024, 1088, 1096, - 0, 1024, 1088, 1104, 1100, 0, 1024, 1088, - 1104, 1100, 0, 1024, 1088, 1104, 1105, 1102, - 0, 1024, 1088, 0, 1024, 1088, 1104, 0, - 1024, 1088, 1104, 0, 1024, 1088, 1104, 1106, - 0, 1024, 1088, 1104, 0, 1024, 1088, 1104, - 1108, 0, 1024, 1088, 1104, 1108, 0, 1024, - 1088, 1104, 1112, 1110, 0, 1024, 1088, 1104, - 0, 1024, 1088, 1120, 1112, 0, 1024, 1088, - 1120, 1112, 0, 1024, 1088, 1120, 1112, 1114, - 0, 1024, 1088, 1120, 1112, 0, 1024, 1088, - 1120, 1121, 1116, 0, 1024, 1088, 1120, 1121, - 1116, 0, 1024, 1088, 1120, 1121, 1116, 1118, - 0, 1024, 1088, 0, 1024, 1152, 1120, 0, - 1024, 1152, 1120, 0, 1024, 1152, 1120, 1122, - 0, 1024, 1152, 1120, 0, 1024, 1152, 1120, - 1124, 0, 1024, 1152, 1120, 1124, 0, 1024, - 1152, 1120, 1128, 1126, 0, 1024, 1152, 1120, - 0, 1024, 1152, 1120, 1128, 0, 1024, 1152, - 1120, 1128, 0, 1024, 1152, 1120, 1128, 1130, - 0, 1024, 1152, 1120, 1128, 0, 1024, 1152, - 1120, 1136, 1132, 0, 1024, 1152, 1120, 1136, - 1132, 0, 1024, 1152, 1120, 1136, 1137, 1134, - 0, 1024, 1152, 1120, 0, 1024, 1152, 1153, - 1136, 0, 1024, 1152, 1153, 1136, 0, 1024, - 1152, 1153, 1136, 1138, 0, 1024, 1152, 1153, - 1136, 0, 1024, 1152, 1153, 1136, 1140, 0, - 1024, 1152, 1153, 1136, 1140, 0, 1024, 1152, - 1153, 1136, 1144, 1142, 0, 1024, 1152, 1153, - 1136, 0, 1024, 1152, 1153, 1136, 1144, 0, - 1024, 1152, 1153, 1155, 1144, 0, 1024, 1152, - 1153, 1155, 1144, 1146, 0, 1024, 1152, 1153, - 1155, 1144, 0, 1024, 1152, 1153, 1155, 1144, - 1148, 0, 1024, 1152, 1153, 1155, 1144, 1148, - 0, 1024, 1152, 1153, 1155, 1144, 1148, 1150, - 0, 1024, 0, 1024, 1152, 0, 1024, 1152, - 0, 1024, 1152, 1154, 0, 1024, 1152, 0, - 1024, 1152, 1156, 0, 1024, 1152, 1156, 0, - 1024, 1152, 1160, 1158, 0, 1024, 1152, 0, - 1024, 1152, 1160, 0, 1024, 1152, 1160, 0, - 1024, 1152, 1160, 1162, 0, 1024, 1152, 1160, - 0, 1024, 1152, 1168, 1164, 0, 1024, 1152, - 1168, 1164, 0, 1024, 1152, 1168, 1169, 1166, - 0, 1024, 1152, 0, 1024, 1152, 1168, 0, - 1024, 1152, 1168, 0, 1024, 1152, 1168, 1170, - 0, 1024, 1152, 1168, 0, 1024, 1152, 1168, - 1172, 0, 1024, 1152, 1168, 1172, 0, 1024, - 1152, 1168, 1176, 1174, 0, 1024, 1152, 1168, - 0, 1024, 1152, 1184, 1176, 0, 1024, 1152, - 1184, 1176, 0, 1024, 1152, 1184, 1176, 1178, - 0, 1024, 1152, 1184, 1176, 0, 1024, 1152, - 1184, 1185, 1180, 0, 1024, 1152, 1184, 1185, - 1180, 0, 1024, 1152, 1184, 1185, 1180, 1182, - 0, 1024, 1152, 0, 1024, 1152, 1184, 0, - 1024, 1152, 1184, 0, 1024, 1152, 1184, 1186, - 0, 1024, 1152, 1184, 0, 1024, 1152, 1184, - 1188, 0, 1024, 1152, 1184, 1188, 0, 1024, - 1152, 1184, 1192, 1190, 0, 1024, 1152, 1184, - 0, 1024, 1152, 1184, 1192, 0, 1024, 1152, - 1184, 1192, 0, 1024, 1152, 1184, 1192, 1194, - 0, 1024, 1152, 1184, 1192, 0, 1024, 1152, - 1184, 1200, 1196, 0, 1024, 1152, 1184, 1200, - 1196, 0, 1024, 1152, 1184, 1200, 1201, 1198, - 0, 1024, 1152, 1184, 0, 1024, 1152, 1216, - 1200, 0, 1024, 1152, 1216, 1200, 0, 1024, - 1152, 1216, 1200, 1202, 0, 1024, 1152, 1216, - 1200, 0, 1024, 1152, 1216, 1200, 1204, 0, - 1024, 1152, 1216, 1200, 1204, 0, 1024, 1152, - 1216, 1200, 1208, 1206, 0, 1024, 1152, 1216, - 1200, 0, 1024, 1152, 1216, 1217, 1208, 0, - 1024, 1152, 1216, 1217, 1208, 0, 1024, 1152, - 1216, 1217, 1208, 1210, 0, 1024, 1152, 1216, - 1217, 1208, 0, 1024, 1152, 1216, 1217, 1208, - 1212, 0, 1024, 1152, 1216, 1217, 1219, 1212, - 0, 1024, 1152, 1216, 1217, 1219, 1212, 1214, - 0, 1024, 1152, 0, 1024, 1280, 1216, 0, - 1024, 1280, 1216, 0, 1024, 1280, 1216, 1218, - 0, 1024, 1280, 1216, 0, 1024, 1280, 1216, - 1220, 0, 1024, 1280, 1216, 1220, 0, 1024, - 1280, 1216, 1224, 1222, 0, 1024, 1280, 1216, - 0, 1024, 1280, 1216, 1224, 0, 1024, 1280, - 1216, 1224, 0, 1024, 1280, 1216, 1224, 1226, - 0, 1024, 1280, 1216, 1224, 0, 1024, 1280, - 1216, 1232, 1228, 0, 1024, 1280, 1216, 1232, - 1228, 0, 1024, 1280, 1216, 1232, 1233, 1230, - 0, 1024, 1280, 1216, 0, 1024, 1280, 1216, - 1232, 0, 1024, 1280, 1216, 1232, 0, 1024, - 1280, 1216, 1232, 1234, 0, 1024, 1280, 1216, - 1232, 0, 1024, 1280, 1216, 1232, 1236, 0, - 1024, 1280, 1216, 1232, 1236, 0, 1024, 1280, - 1216, 1232, 1240, 1238, 0, 1024, 1280, 1216, - 1232, 0, 1024, 1280, 1216, 1248, 1240, 0, - 1024, 1280, 1216, 1248, 1240, 0, 1024, 1280, - 1216, 1248, 1240, 1242, 0, 1024, 1280, 1216, - 1248, 1240, 0, 1024, 1280, 1216, 1248, 1249, - 1244, 0, 1024, 1280, 1216, 1248, 1249, 1244, - 0, 1024, 1280, 1216, 1248, 1249, 1244, 1246, - 0, 1024, 1280, 1216, 0, 1024, 1280, 1281, - 1248, 0, 1024, 1280, 1281, 1248, 0, 1024, - 1280, 1281, 1248, 1250, 0, 1024, 1280, 1281, - 1248, 0, 1024, 1280, 1281, 1248, 1252, 0, - 1024, 1280, 1281, 1248, 1252, 0, 1024, 1280, - 1281, 1248, 1256, 1254, 0, 1024, 1280, 1281, - 1248, 0, 1024, 1280, 1281, 1248, 1256, 0, - 1024, 1280, 1281, 1248, 1256, 0, 1024, 1280, - 1281, 1248, 1256, 1258, 0, 1024, 1280, 1281, - 1248, 1256, 0, 1024, 1280, 1281, 1248, 1264, - 1260, 0, 1024, 1280, 1281, 1248, 1264, 1260, - 0, 1024, 1280, 1281, 1248, 1264, 1265, 1262, - 0, 1024, 1280, 1281, 1248, 0, 1024, 1280, - 1281, 1248, 1264, 0, 1024, 1280, 1281, 1283, - 1264, 0, 1024, 1280, 1281, 1283, 1264, 1266, - 0, 1024, 1280, 1281, 1283, 1264, 0, 1024, - 1280, 1281, 1283, 1264, 1268, 0, 1024, 1280, - 1281, 1283, 1264, 1268, 0, 1024, 1280, 1281, - 1283, 1264, 1272, 1270, 0, 1024, 1280, 1281, - 1283, 1264, 0, 1024, 1280, 1281, 1283, 1264, - 1272, 0, 1024, 1280, 1281, 1283, 1264, 1272, - 0, 1024, 1280, 1281, 1283, 1264, 1272, 1274, - 0, 1024, 1280, 1281, 1283, 1287, 1272, 0, - 1024, 1280, 1281, 1283, 1287, 1272, 1276, 0, - 1024, 1280, 1281, 1283, 1287, 1272, 1276, 0, - 1024, 1280, 1281, 1283, 1287, 1272, 1276, 1278, - 0, 1024, 0, 1024, 1280, 0, 1024, 1280, - 0, 1024, 1280, 1282, 0, 1024, 1280, 0, - 1024, 1280, 1284, 0, 1024, 1280, 1284, 0, - 1024, 1280, 1288, 1286, 0, 1024, 1280, 0, - 1024, 1280, 1288, 0, 1024, 1280, 1288, 0, - 1024, 1280, 1288, 1290, 0, 1024, 1280, 1288, - 0, 1024, 1280, 1296, 1292, 0, 1024, 1280, - 1296, 1292, 0, 1024, 1280, 1296, 1297, 1294, - 0, 1024, 1280, 0, 1024, 1280, 1296, 0, - 1024, 1280, 1296, 0, 1024, 1280, 1296, 1298, - 0, 1024, 1280, 1296, 0, 1024, 1280, 1296, - 1300, 0, 1024, 1280, 1296, 1300, 0, 1024, - 1280, 1296, 1304, 1302, 0, 1024, 1280, 1296, - 0, 1024, 1280, 1312, 1304, 0, 1024, 1280, - 1312, 1304, 0, 1024, 1280, 1312, 1304, 1306, - 0, 1024, 1280, 1312, 1304, 0, 1024, 1280, - 1312, 1313, 1308, 0, 1024, 1280, 1312, 1313, - 1308, 0, 1024, 1280, 1312, 1313, 1308, 1310, - 0, 1024, 1280, 0, 1024, 1280, 1312, 0, - 1024, 1280, 1312, 0, 1024, 1280, 1312, 1314, - 0, 1024, 1280, 1312, 0, 1024, 1280, 1312, - 1316, 0, 1024, 1280, 1312, 1316, 0, 1024, - 1280, 1312, 1320, 1318, 0, 1024, 1280, 1312, - 0, 1024, 1280, 1312, 1320, 0, 1024, 1280, - 1312, 1320, 0, 1024, 1280, 1312, 1320, 1322, - 0, 1024, 1280, 1312, 1320, 0, 1024, 1280, - 1312, 1328, 1324, 0, 1024, 1280, 1312, 1328, - 1324, 0, 1024, 1280, 1312, 1328, 1329, 1326, - 0, 1024, 1280, 1312, 0, 1024, 1280, 1344, - 1328, 0, 1024, 1280, 1344, 1328, 0, 1024, - 1280, 1344, 1328, 1330, 0, 1024, 1280, 1344, - 1328, 0, 1024, 1280, 1344, 1328, 1332, 0, - 1024, 1280, 1344, 1328, 1332, 0, 1024, 1280, - 1344, 1328, 1336, 1334, 0, 1024, 1280, 1344, - 1328, 0, 1024, 1280, 1344, 1345, 1336, 0, - 1024, 1280, 1344, 1345, 1336, 0, 1024, 1280, - 1344, 1345, 1336, 1338, 0, 1024, 1280, 1344, - 1345, 1336, 0, 1024, 1280, 1344, 1345, 1336, - 1340, 0, 1024, 1280, 1344, 1345, 1347, 1340, - 0, 1024, 1280, 1344, 1345, 1347, 1340, 1342, - 0, 1024, 1280, 0, 1024, 1280, 1344, 0, - 1024, 1280, 1344, 0, 1024, 1280, 1344, 1346, - 0, 1024, 1280, 1344, 0, 1024, 1280, 1344, - 1348, 0, 1024, 1280, 1344, 1348, 0, 1024, - 1280, 1344, 1352, 1350, 0, 1024, 1280, 1344, - 0, 1024, 1280, 1344, 1352, 0, 1024, 1280, - 1344, 1352, 0, 1024, 1280, 1344, 1352, 1354, - 0, 1024, 1280, 1344, 1352, 0, 1024, 1280, - 1344, 1360, 1356, 0, 1024, 1280, 1344, 1360, - 1356, 0, 1024, 1280, 1344, 1360, 1361, 1358, - 0, 1024, 1280, 1344, 0, 1024, 1280, 1344, - 1360, 0, 1024, 1280, 1344, 1360, 0, 1024, - 1280, 1344, 1360, 1362, 0, 1024, 1280, 1344, - 1360, 0, 1024, 1280, 1344, 1360, 1364, 0, - 1024, 1280, 1344, 1360, 1364, 0, 1024, 1280, - 1344, 1360, 1368, 1366, 0, 1024, 1280, 1344, - 1360, 0, 1024, 1280, 1344, 1376, 1368, 0, - 1024, 1280, 1344, 1376, 1368, 0, 1024, 1280, - 1344, 1376, 1368, 1370, 0, 1024, 1280, 1344, - 1376, 1368, 0, 1024, 1280, 1344, 1376, 1377, - 1372, 0, 1024, 1280, 1344, 1376, 1377, 1372, - 0, 1024, 1280, 1344, 1376, 1377, 1372, 1374, - 0, 1024, 1280, 1344, 0, 1024, 1280, 1408, - 1376, 0, 1024, 1280, 1408, 1376, 0, 1024, - 1280, 1408, 1376, 1378, 0, 1024, 1280, 1408, - 1376, 0, 1024, 1280, 1408, 1376, 1380, 0, - 1024, 1280, 1408, 1376, 1380, 0, 1024, 1280, - 1408, 1376, 1384, 1382, 0, 1024, 1280, 1408, - 1376, 0, 1024, 1280, 1408, 1376, 1384, 0, - 1024, 1280, 1408, 1376, 1384, 0, 1024, 1280, - 1408, 1376, 1384, 1386, 0, 1024, 1280, 1408, - 1376, 1384, 0, 1024, 1280, 1408, 1376, 1392, - 1388, 0, 1024, 1280, 1408, 1376, 1392, 1388, - 0, 1024, 1280, 1408, 1376, 1392, 1393, 1390, - 0, 1024, 1280, 1408, 1376, 0, 1024, 1280, - 1408, 1409, 1392, 0, 1024, 1280, 1408, 1409, - 1392, 0, 1024, 1280, 1408, 1409, 1392, 1394, - 0, 1024, 1280, 1408, 1409, 1392, 0, 1024, - 1280, 1408, 1409, 1392, 1396, 0, 1024, 1280, - 1408, 1409, 1392, 1396, 0, 1024, 1280, 1408, - 1409, 1392, 1400, 1398, 0, 1024, 1280, 1408, - 1409, 1392, 0, 1024, 1280, 1408, 1409, 1392, - 1400, 0, 1024, 1280, 1408, 1409, 1411, 1400, - 0, 1024, 1280, 1408, 1409, 1411, 1400, 1402, - 0, 1024, 1280, 1408, 1409, 1411, 1400, 0, - 1024, 1280, 1408, 1409, 1411, 1400, 1404, 0, - 1024, 1280, 1408, 1409, 1411, 1400, 1404, 0, - 1024, 1280, 1408, 1409, 1411, 1400, 1404, 1406, - 0, 1024, 1280, 0, 1024, 1536, 1408, 0, - 1024, 1536, 1408, 0, 1024, 1536, 1408, 1410, - 0, 1024, 1536, 1408, 0, 1024, 1536, 1408, - 1412, 0, 1024, 1536, 1408, 1412, 0, 1024, - 1536, 1408, 1416, 1414, 0, 1024, 1536, 1408, - 0, 1024, 1536, 1408, 1416, 0, 1024, 1536, - 1408, 1416, 0, 1024, 1536, 1408, 1416, 1418, - 0, 1024, 1536, 1408, 1416, 0, 1024, 1536, - 1408, 1424, 1420, 0, 1024, 1536, 1408, 1424, - 1420, 0, 1024, 1536, 1408, 1424, 1425, 1422, - 0, 1024, 1536, 1408, 0, 1024, 1536, 1408, - 1424, 0, 1024, 1536, 1408, 1424, 0, 1024, - 1536, 1408, 1424, 1426, 0, 1024, 1536, 1408, - 1424, 0, 1024, 1536, 1408, 1424, 1428, 0, - 1024, 1536, 1408, 1424, 1428, 0, 1024, 1536, - 1408, 1424, 1432, 1430, 0, 1024, 1536, 1408, - 1424, 0, 1024, 1536, 1408, 1440, 1432, 0, - 1024, 1536, 1408, 1440, 1432, 0, 1024, 1536, - 1408, 1440, 1432, 1434, 0, 1024, 1536, 1408, - 1440, 1432, 0, 1024, 1536, 1408, 1440, 1441, - 1436, 0, 1024, 1536, 1408, 1440, 1441, 1436, - 0, 1024, 1536, 1408, 1440, 1441, 1436, 1438, - 0, 1024, 1536, 1408, 0, 1024, 1536, 1408, - 1440, 0, 1024, 1536, 1408, 1440, 0, 1024, - 1536, 1408, 1440, 1442, 0, 1024, 1536, 1408, - 1440, 0, 1024, 1536, 1408, 1440, 1444, 0, - 1024, 1536, 1408, 1440, 1444, 0, 1024, 1536, - 1408, 1440, 1448, 1446, 0, 1024, 1536, 1408, - 1440, 0, 1024, 1536, 1408, 1440, 1448, 0, - 1024, 1536, 1408, 1440, 1448, 0, 1024, 1536, - 1408, 1440, 1448, 1450, 0, 1024, 1536, 1408, - 1440, 1448, 0, 1024, 1536, 1408, 1440, 1456, - 1452, 0, 1024, 1536, 1408, 1440, 1456, 1452, - 0, 1024, 1536, 1408, 1440, 1456, 1457, 1454, - 0, 1024, 1536, 1408, 1440, 0, 1024, 1536, - 1408, 1472, 1456, 0, 1024, 1536, 1408, 1472, - 1456, 0, 1024, 1536, 1408, 1472, 1456, 1458, - 0, 1024, 1536, 1408, 1472, 1456, 0, 1024, - 1536, 1408, 1472, 1456, 1460, 0, 1024, 1536, - 1408, 1472, 1456, 1460, 0, 1024, 1536, 1408, - 1472, 1456, 1464, 1462, 0, 1024, 1536, 1408, - 1472, 1456, 0, 1024, 1536, 1408, 1472, 1473, - 1464, 0, 1024, 1536, 1408, 1472, 1473, 1464, - 0, 1024, 1536, 1408, 1472, 1473, 1464, 1466, - 0, 1024, 1536, 1408, 1472, 1473, 1464, 0, - 1024, 1536, 1408, 1472, 1473, 1464, 1468, 0, - 1024, 1536, 1408, 1472, 1473, 1475, 1468, 0, - 1024, 1536, 1408, 1472, 1473, 1475, 1468, 1470, - 0, 1024, 1536, 1408, 0, 1024, 1536, 1537, - 1472, 0, 1024, 1536, 1537, 1472, 0, 1024, - 1536, 1537, 1472, 1474, 0, 1024, 1536, 1537, - 1472, 0, 1024, 1536, 1537, 1472, 1476, 0, - 1024, 1536, 1537, 1472, 1476, 0, 1024, 1536, - 1537, 1472, 1480, 1478, 0, 1024, 1536, 1537, - 1472, 0, 1024, 1536, 1537, 1472, 1480, 0, - 1024, 1536, 1537, 1472, 1480, 0, 1024, 1536, - 1537, 1472, 1480, 1482, 0, 1024, 1536, 1537, - 1472, 1480, 0, 1024, 1536, 1537, 1472, 1488, - 1484, 0, 1024, 1536, 1537, 1472, 1488, 1484, - 0, 1024, 1536, 1537, 1472, 1488, 1489, 1486, - 0, 1024, 1536, 1537, 1472, 0, 1024, 1536, - 1537, 1472, 1488, 0, 1024, 1536, 1537, 1472, - 1488, 0, 1024, 1536, 1537, 1472, 1488, 1490, - 0, 1024, 1536, 1537, 1472, 1488, 0, 1024, - 1536, 1537, 1472, 1488, 1492, 0, 1024, 1536, - 1537, 1472, 1488, 1492, 0, 1024, 1536, 1537, - 1472, 1488, 1496, 1494, 0, 1024, 1536, 1537, - 1472, 1488, 0, 1024, 1536, 1537, 1472, 1504, - 1496, 0, 1024, 1536, 1537, 1472, 1504, 1496, - 0, 1024, 1536, 1537, 1472, 1504, 1496, 1498, - 0, 1024, 1536, 1537, 1472, 1504, 1496, 0, - 1024, 1536, 1537, 1472, 1504, 1505, 1500, 0, - 1024, 1536, 1537, 1472, 1504, 1505, 1500, 0, - 1024, 1536, 1537, 1472, 1504, 1505, 1500, 1502, - 0, 1024, 1536, 1537, 1472, 0, 1024, 1536, - 1537, 1472, 1504, 0, 1024, 1536, 1537, 1539, - 1504, 0, 1024, 1536, 1537, 1539, 1504, 1506, - 0, 1024, 1536, 1537, 1539, 1504, 0, 1024, - 1536, 1537, 1539, 1504, 1508, 0, 1024, 1536, - 1537, 1539, 1504, 1508, 0, 1024, 1536, 1537, - 1539, 1504, 1512, 1510, 0, 1024, 1536, 1537, - 1539, 1504, 0, 1024, 1536, 1537, 1539, 1504, - 1512, 0, 1024, 1536, 1537, 1539, 1504, 1512, - 0, 1024, 1536, 1537, 1539, 1504, 1512, 1514, - 0, 1024, 1536, 1537, 1539, 1504, 1512, 0, - 1024, 1536, 1537, 1539, 1504, 1520, 1516, 0, - 1024, 1536, 1537, 1539, 1504, 1520, 1516, 0, - 1024, 1536, 1537, 1539, 1504, 1520, 1521, 1518, - 0, 1024, 1536, 1537, 1539, 1504, 0, 1024, - 1536, 1537, 1539, 1504, 1520, 0, 1024, 1536, - 1537, 1539, 1504, 1520, 0, 1024, 1536, 1537, - 1539, 1504, 1520, 1522, 0, 1024, 1536, 1537, - 1539, 1543, 1520, 0, 1024, 1536, 1537, 1539, - 1543, 1520, 1524, 0, 1024, 1536, 1537, 1539, - 1543, 1520, 1524, 0, 1024, 1536, 1537, 1539, - 1543, 1520, 1528, 1526, 0, 1024, 1536, 1537, - 1539, 1543, 1520, 0, 1024, 1536, 1537, 1539, - 1543, 1520, 1528, 0, 1024, 1536, 1537, 1539, - 1543, 1520, 1528, 0, 1024, 1536, 1537, 1539, - 1543, 1520, 1528, 1530, 0, 1024, 1536, 1537, - 1539, 1543, 1520, 1528, 0, 1024, 1536, 1537, - 1539, 1543, 1520, 1528, 1532, 0, 1024, 1536, - 1537, 1539, 1543, 1520, 1528, 1532, 0, 1024, - 1536, 1537, 1539, 1543, 1520, 1528, 1532, 1534, - 0, 1024, 0, 2048, 1536, 0, 2048, 1536, - 0, 2048, 1536, 1538, 0, 2048, 1536, 0, - 2048, 1536, 1540, 0, 2048, 1536, 1540, 0, - 2048, 1536, 1544, 1542, 0, 2048, 1536, 0, - 2048, 1536, 1544, 0, 2048, 1536, 1544, 0, - 2048, 1536, 1544, 1546, 0, 2048, 1536, 1544, - 0, 2048, 1536, 1552, 1548, 0, 2048, 1536, - 1552, 1548, 0, 2048, 1536, 1552, 1553, 1550, - 0, 2048, 1536, 0, 2048, 1536, 1552, 0, - 2048, 1536, 1552, 0, 2048, 1536, 1552, 1554, - 0, 2048, 1536, 1552, 0, 2048, 1536, 1552, - 1556, 0, 2048, 1536, 1552, 1556, 0, 2048, - 1536, 1552, 1560, 1558, 0, 2048, 1536, 1552, - 0, 2048, 1536, 1568, 1560, 0, 2048, 1536, - 1568, 1560, 0, 2048, 1536, 1568, 1560, 1562, - 0, 2048, 1536, 1568, 1560, 0, 2048, 1536, - 1568, 1569, 1564, 0, 2048, 1536, 1568, 1569, - 1564, 0, 2048, 1536, 1568, 1569, 1564, 1566, - 0, 2048, 1536, 0, 2048, 1536, 1568, 0, - 2048, 1536, 1568, 0, 2048, 1536, 1568, 1570, - 0, 2048, 1536, 1568, 0, 2048, 1536, 1568, - 1572, 0, 2048, 1536, 1568, 1572, 0, 2048, - 1536, 1568, 1576, 1574, 0, 2048, 1536, 1568, - 0, 2048, 1536, 1568, 1576, 0, 2048, 1536, - 1568, 1576, 0, 2048, 1536, 1568, 1576, 1578, - 0, 2048, 1536, 1568, 1576, 0, 2048, 1536, - 1568, 1584, 1580, 0, 2048, 1536, 1568, 1584, - 1580, 0, 2048, 1536, 1568, 1584, 1585, 1582, - 0, 2048, 1536, 1568, 0, 2048, 1536, 1600, - 1584, 0, 2048, 1536, 1600, 1584, 0, 2048, - 1536, 1600, 1584, 1586, 0, 2048, 1536, 1600, - 1584, 0, 2048, 1536, 1600, 1584, 1588, 0, - 2048, 1536, 1600, 1584, 1588, 0, 2048, 1536, - 1600, 1584, 1592, 1590, 0, 2048, 1536, 1600, - 1584, 0, 2048, 1536, 1600, 1601, 1592, 0, - 2048, 1536, 1600, 1601, 1592, 0, 2048, 1536, - 1600, 1601, 1592, 1594, 0, 2048, 1536, 1600, - 1601, 1592, 0, 2048, 1536, 1600, 1601, 1592, - 1596, 0, 2048, 1536, 1600, 1601, 1603, 1596, - 0, 2048, 1536, 1600, 1601, 1603, 1596, 1598, - 0, 2048, 1536, 0, 2048, 1536, 1600, 0, - 2048, 1536, 1600, 0, 2048, 1536, 1600, 1602, - 0, 2048, 1536, 1600, 0, 2048, 1536, 1600, - 1604, 0, 2048, 1536, 1600, 1604, 0, 2048, - 1536, 1600, 1608, 1606, 0, 2048, 1536, 1600, - 0, 2048, 1536, 1600, 1608, 0, 2048, 1536, - 1600, 1608, 0, 2048, 1536, 1600, 1608, 1610, - 0, 2048, 1536, 1600, 1608, 0, 2048, 1536, - 1600, 1616, 1612, 0, 2048, 1536, 1600, 1616, - 1612, 0, 2048, 1536, 1600, 1616, 1617, 1614, - 0, 2048, 1536, 1600, 0, 2048, 1536, 1600, - 1616, 0, 2048, 1536, 1600, 1616, 0, 2048, - 1536, 1600, 1616, 1618, 0, 2048, 1536, 1600, - 1616, 0, 2048, 1536, 1600, 1616, 1620, 0, - 2048, 1536, 1600, 1616, 1620, 0, 2048, 1536, - 1600, 1616, 1624, 1622, 0, 2048, 1536, 1600, - 1616, 0, 2048, 1536, 1600, 1632, 1624, 0, - 2048, 1536, 1600, 1632, 1624, 0, 2048, 1536, - 1600, 1632, 1624, 1626, 0, 2048, 1536, 1600, - 1632, 1624, 0, 2048, 1536, 1600, 1632, 1633, - 1628, 0, 2048, 1536, 1600, 1632, 1633, 1628, - 0, 2048, 1536, 1600, 1632, 1633, 1628, 1630, - 0, 2048, 1536, 1600, 0, 2048, 1536, 1664, - 1632, 0, 2048, 1536, 1664, 1632, 0, 2048, - 1536, 1664, 1632, 1634, 0, 2048, 1536, 1664, - 1632, 0, 2048, 1536, 1664, 1632, 1636, 0, - 2048, 1536, 1664, 1632, 1636, 0, 2048, 1536, - 1664, 1632, 1640, 1638, 0, 2048, 1536, 1664, - 1632, 0, 2048, 1536, 1664, 1632, 1640, 0, - 2048, 1536, 1664, 1632, 1640, 0, 2048, 1536, - 1664, 1632, 1640, 1642, 0, 2048, 1536, 1664, - 1632, 1640, 0, 2048, 1536, 1664, 1632, 1648, - 1644, 0, 2048, 1536, 1664, 1632, 1648, 1644, - 0, 2048, 1536, 1664, 1632, 1648, 1649, 1646, - 0, 2048, 1536, 1664, 1632, 0, 2048, 1536, - 1664, 1665, 1648, 0, 2048, 1536, 1664, 1665, - 1648, 0, 2048, 1536, 1664, 1665, 1648, 1650, - 0, 2048, 1536, 1664, 1665, 1648, 0, 2048, - 1536, 1664, 1665, 1648, 1652, 0, 2048, 1536, - 1664, 1665, 1648, 1652, 0, 2048, 1536, 1664, - 1665, 1648, 1656, 1654, 0, 2048, 1536, 1664, - 1665, 1648, 0, 2048, 1536, 1664, 1665, 1648, - 1656, 0, 2048, 1536, 1664, 1665, 1667, 1656, - 0, 2048, 1536, 1664, 1665, 1667, 1656, 1658, - 0, 2048, 1536, 1664, 1665, 1667, 1656, 0, - 2048, 1536, 1664, 1665, 1667, 1656, 1660, 0, - 2048, 1536, 1664, 1665, 1667, 1656, 1660, 0, - 2048, 1536, 1664, 1665, 1667, 1656, 1660, 1662, - 0, 2048, 1536, 0, 2048, 1536, 1664, 0, - 2048, 1536, 1664, 0, 2048, 1536, 1664, 1666, - 0, 2048, 1536, 1664, 0, 2048, 1536, 1664, - 1668, 0, 2048, 1536, 1664, 1668, 0, 2048, - 1536, 1664, 1672, 1670, 0, 2048, 1536, 1664, - 0, 2048, 1536, 1664, 1672, 0, 2048, 1536, - 1664, 1672, 0, 2048, 1536, 1664, 1672, 1674, - 0, 2048, 1536, 1664, 1672, 0, 2048, 1536, - 1664, 1680, 1676, 0, 2048, 1536, 1664, 1680, - 1676, 0, 2048, 1536, 1664, 1680, 1681, 1678, - 0, 2048, 1536, 1664, 0, 2048, 1536, 1664, - 1680, 0, 2048, 1536, 1664, 1680, 0, 2048, - 1536, 1664, 1680, 1682, 0, 2048, 1536, 1664, - 1680, 0, 2048, 1536, 1664, 1680, 1684, 0, - 2048, 1536, 1664, 1680, 1684, 0, 2048, 1536, - 1664, 1680, 1688, 1686, 0, 2048, 1536, 1664, - 1680, 0, 2048, 1536, 1664, 1696, 1688, 0, - 2048, 1536, 1664, 1696, 1688, 0, 2048, 1536, - 1664, 1696, 1688, 1690, 0, 2048, 1536, 1664, - 1696, 1688, 0, 2048, 1536, 1664, 1696, 1697, - 1692, 0, 2048, 1536, 1664, 1696, 1697, 1692, - 0, 2048, 1536, 1664, 1696, 1697, 1692, 1694, - 0, 2048, 1536, 1664, 0, 2048, 1536, 1664, - 1696, 0, 2048, 1536, 1664, 1696, 0, 2048, - 1536, 1664, 1696, 1698, 0, 2048, 1536, 1664, - 1696, 0, 2048, 1536, 1664, 1696, 1700, 0, - 2048, 1536, 1664, 1696, 1700, 0, 2048, 1536, - 1664, 1696, 1704, 1702, 0, 2048, 1536, 1664, - 1696, 0, 2048, 1536, 1664, 1696, 1704, 0, - 2048, 1536, 1664, 1696, 1704, 0, 2048, 1536, - 1664, 1696, 1704, 1706, 0, 2048, 1536, 1664, - 1696, 1704, 0, 2048, 1536, 1664, 1696, 1712, - 1708, 0, 2048, 1536, 1664, 1696, 1712, 1708, - 0, 2048, 1536, 1664, 1696, 1712, 1713, 1710, - 0, 2048, 1536, 1664, 1696, 0, 2048, 1536, - 1664, 1728, 1712, 0, 2048, 1536, 1664, 1728, - 1712, 0, 2048, 1536, 1664, 1728, 1712, 1714, - 0, 2048, 1536, 1664, 1728, 1712, 0, 2048, - 1536, 1664, 1728, 1712, 1716, 0, 2048, 1536, - 1664, 1728, 1712, 1716, 0, 2048, 1536, 1664, - 1728, 1712, 1720, 1718, 0, 2048, 1536, 1664, - 1728, 1712, 0, 2048, 1536, 1664, 1728, 1729, - 1720, 0, 2048, 1536, 1664, 1728, 1729, 1720, - 0, 2048, 1536, 1664, 1728, 1729, 1720, 1722, - 0, 2048, 1536, 1664, 1728, 1729, 1720, 0, - 2048, 1536, 1664, 1728, 1729, 1720, 1724, 0, - 2048, 1536, 1664, 1728, 1729, 1731, 1724, 0, - 2048, 1536, 1664, 1728, 1729, 1731, 1724, 1726, - 0, 2048, 1536, 1664, 0, 2048, 1536, 1792, - 1728, 0, 2048, 1536, 1792, 1728, 0, 2048, - 1536, 1792, 1728, 1730, 0, 2048, 1536, 1792, - 1728, 0, 2048, 1536, 1792, 1728, 1732, 0, - 2048, 1536, 1792, 1728, 1732, 0, 2048, 1536, - 1792, 1728, 1736, 1734, 0, 2048, 1536, 1792, - 1728, 0, 2048, 1536, 1792, 1728, 1736, 0, - 2048, 1536, 1792, 1728, 1736, 0, 2048, 1536, - 1792, 1728, 1736, 1738, 0, 2048, 1536, 1792, - 1728, 1736, 0, 2048, 1536, 1792, 1728, 1744, - 1740, 0, 2048, 1536, 1792, 1728, 1744, 1740, - 0, 2048, 1536, 1792, 1728, 1744, 1745, 1742, - 0, 2048, 1536, 1792, 1728, 0, 2048, 1536, - 1792, 1728, 1744, 0, 2048, 1536, 1792, 1728, - 1744, 0, 2048, 1536, 1792, 1728, 1744, 1746, - 0, 2048, 1536, 1792, 1728, 1744, 0, 2048, - 1536, 1792, 1728, 1744, 1748, 0, 2048, 1536, - 1792, 1728, 1744, 1748, 0, 2048, 1536, 1792, - 1728, 1744, 1752, 1750, 0, 2048, 1536, 1792, - 1728, 1744, 0, 2048, 1536, 1792, 1728, 1760, - 1752, 0, 2048, 1536, 1792, 1728, 1760, 1752, - 0, 2048, 1536, 1792, 1728, 1760, 1752, 1754, - 0, 2048, 1536, 1792, 1728, 1760, 1752, 0, - 2048, 1536, 1792, 1728, 1760, 1761, 1756, 0, - 2048, 1536, 1792, 1728, 1760, 1761, 1756, 0, - 2048, 1536, 1792, 1728, 1760, 1761, 1756, 1758, - 0, 2048, 1536, 1792, 1728, 0, 2048, 1536, - 1792, 1793, 1760, 0, 2048, 1536, 1792, 1793, - 1760, 0, 2048, 1536, 1792, 1793, 1760, 1762, - 0, 2048, 1536, 1792, 1793, 1760, 0, 2048, - 1536, 1792, 1793, 1760, 1764, 0, 2048, 1536, - 1792, 1793, 1760, 1764, 0, 2048, 1536, 1792, - 1793, 1760, 1768, 1766, 0, 2048, 1536, 1792, - 1793, 1760, 0, 2048, 1536, 1792, 1793, 1760, - 1768, 0, 2048, 1536, 1792, 1793, 1760, 1768, - 0, 2048, 1536, 1792, 1793, 1760, 1768, 1770, - 0, 2048, 1536, 1792, 1793, 1760, 1768, 0, - 2048, 1536, 1792, 1793, 1760, 1776, 1772, 0, - 2048, 1536, 1792, 1793, 1760, 1776, 1772, 0, - 2048, 1536, 1792, 1793, 1760, 1776, 1777, 1774, - 0, 2048, 1536, 1792, 1793, 1760, 0, 2048, - 1536, 1792, 1793, 1760, 1776, 0, 2048, 1536, - 1792, 1793, 1795, 1776, 0, 2048, 1536, 1792, - 1793, 1795, 1776, 1778, 0, 2048, 1536, 1792, - 1793, 1795, 1776, 0, 2048, 1536, 1792, 1793, - 1795, 1776, 1780, 0, 2048, 1536, 1792, 1793, - 1795, 1776, 1780, 0, 2048, 1536, 1792, 1793, - 1795, 1776, 1784, 1782, 0, 2048, 1536, 1792, - 1793, 1795, 1776, 0, 2048, 1536, 1792, 1793, - 1795, 1776, 1784, 0, 2048, 1536, 1792, 1793, - 1795, 1776, 1784, 0, 2048, 1536, 1792, 1793, - 1795, 1776, 1784, 1786, 0, 2048, 1536, 1792, - 1793, 1795, 1799, 1784, 0, 2048, 1536, 1792, - 1793, 1795, 1799, 1784, 1788, 0, 2048, 1536, - 1792, 1793, 1795, 1799, 1784, 1788, 0, 2048, - 1536, 1792, 1793, 1795, 1799, 1784, 1788, 1790, - 0, 2048, 1536, 0, 2048, 1536, 1792, 0, - 2048, 2049, 1792, 0, 2048, 2049, 1792, 1794, - 0, 2048, 2049, 1792, 0, 2048, 2049, 1792, - 1796, 0, 2048, 2049, 1792, 1796, 0, 2048, - 2049, 1792, 1800, 1798, 0, 2048, 2049, 1792, - 0, 2048, 2049, 1792, 1800, 0, 2048, 2049, - 1792, 1800, 0, 2048, 2049, 1792, 1800, 1802, - 0, 2048, 2049, 1792, 1800, 0, 2048, 2049, - 1792, 1808, 1804, 0, 2048, 2049, 1792, 1808, - 1804, 0, 2048, 2049, 1792, 1808, 1809, 1806, - 0, 2048, 2049, 1792, 0, 2048, 2049, 1792, - 1808, 0, 2048, 2049, 1792, 1808, 0, 2048, - 2049, 1792, 1808, 1810, 0, 2048, 2049, 1792, - 1808, 0, 2048, 2049, 1792, 1808, 1812, 0, - 2048, 2049, 1792, 1808, 1812, 0, 2048, 2049, - 1792, 1808, 1816, 1814, 0, 2048, 2049, 1792, - 1808, 0, 2048, 2049, 1792, 1824, 1816, 0, - 2048, 2049, 1792, 1824, 1816, 0, 2048, 2049, - 1792, 1824, 1816, 1818, 0, 2048, 2049, 1792, - 1824, 1816, 0, 2048, 2049, 1792, 1824, 1825, - 1820, 0, 2048, 2049, 1792, 1824, 1825, 1820, - 0, 2048, 2049, 1792, 1824, 1825, 1820, 1822, - 0, 2048, 2049, 1792, 0, 2048, 2049, 1792, - 1824, 0, 2048, 2049, 1792, 1824, 0, 2048, - 2049, 1792, 1824, 1826, 0, 2048, 2049, 1792, - 1824, 0, 2048, 2049, 1792, 1824, 1828, 0, - 2048, 2049, 1792, 1824, 1828, 0, 2048, 2049, - 1792, 1824, 1832, 1830, 0, 2048, 2049, 1792, - 1824, 0, 2048, 2049, 1792, 1824, 1832, 0, - 2048, 2049, 1792, 1824, 1832, 0, 2048, 2049, - 1792, 1824, 1832, 1834, 0, 2048, 2049, 1792, - 1824, 1832, 0, 2048, 2049, 1792, 1824, 1840, - 1836, 0, 2048, 2049, 1792, 1824, 1840, 1836, - 0, 2048, 2049, 1792, 1824, 1840, 1841, 1838, - 0, 2048, 2049, 1792, 1824, 0, 2048, 2049, - 1792, 1856, 1840, 0, 2048, 2049, 1792, 1856, - 1840, 0, 2048, 2049, 1792, 1856, 1840, 1842, - 0, 2048, 2049, 1792, 1856, 1840, 0, 2048, - 2049, 1792, 1856, 1840, 1844, 0, 2048, 2049, - 1792, 1856, 1840, 1844, 0, 2048, 2049, 1792, - 1856, 1840, 1848, 1846, 0, 2048, 2049, 1792, - 1856, 1840, 0, 2048, 2049, 1792, 1856, 1857, - 1848, 0, 2048, 2049, 1792, 1856, 1857, 1848, - 0, 2048, 2049, 1792, 1856, 1857, 1848, 1850, - 0, 2048, 2049, 1792, 1856, 1857, 1848, 0, - 2048, 2049, 1792, 1856, 1857, 1848, 1852, 0, - 2048, 2049, 1792, 1856, 1857, 1859, 1852, 0, - 2048, 2049, 1792, 1856, 1857, 1859, 1852, 1854, - 0, 2048, 2049, 1792, 0, 2048, 2049, 1792, - 1856, 0, 2048, 2049, 1792, 1856, 0, 2048, - 2049, 1792, 1856, 1858, 0, 2048, 2049, 1792, - 1856, 0, 2048, 2049, 1792, 1856, 1860, 0, - 2048, 2049, 1792, 1856, 1860, 0, 2048, 2049, - 1792, 1856, 1864, 1862, 0, 2048, 2049, 1792, - 1856, 0, 2048, 2049, 1792, 1856, 1864, 0, - 2048, 2049, 1792, 1856, 1864, 0, 2048, 2049, - 1792, 1856, 1864, 1866, 0, 2048, 2049, 1792, - 1856, 1864, 0, 2048, 2049, 1792, 1856, 1872, - 1868, 0, 2048, 2049, 1792, 1856, 1872, 1868, - 0, 2048, 2049, 1792, 1856, 1872, 1873, 1870, - 0, 2048, 2049, 1792, 1856, 0, 2048, 2049, - 1792, 1856, 1872, 0, 2048, 2049, 1792, 1856, - 1872, 0, 2048, 2049, 1792, 1856, 1872, 1874, - 0, 2048, 2049, 1792, 1856, 1872, 0, 2048, - 2049, 1792, 1856, 1872, 1876, 0, 2048, 2049, - 1792, 1856, 1872, 1876, 0, 2048, 2049, 1792, - 1856, 1872, 1880, 1878, 0, 2048, 2049, 1792, - 1856, 1872, 0, 2048, 2049, 1792, 1856, 1888, - 1880, 0, 2048, 2049, 1792, 1856, 1888, 1880, - 0, 2048, 2049, 1792, 1856, 1888, 1880, 1882, - 0, 2048, 2049, 1792, 1856, 1888, 1880, 0, - 2048, 2049, 1792, 1856, 1888, 1889, 1884, 0, - 2048, 2049, 1792, 1856, 1888, 1889, 1884, 0, - 2048, 2049, 1792, 1856, 1888, 1889, 1884, 1886, - 0, 2048, 2049, 1792, 1856, 0, 2048, 2049, - 1792, 1920, 1888, 0, 2048, 2049, 1792, 1920, - 1888, 0, 2048, 2049, 1792, 1920, 1888, 1890, - 0, 2048, 2049, 1792, 1920, 1888, 0, 2048, - 2049, 1792, 1920, 1888, 1892, 0, 2048, 2049, - 1792, 1920, 1888, 1892, 0, 2048, 2049, 1792, - 1920, 1888, 1896, 1894, 0, 2048, 2049, 1792, - 1920, 1888, 0, 2048, 2049, 1792, 1920, 1888, - 1896, 0, 2048, 2049, 1792, 1920, 1888, 1896, - 0, 2048, 2049, 1792, 1920, 1888, 1896, 1898, - 0, 2048, 2049, 1792, 1920, 1888, 1896, 0, - 2048, 2049, 1792, 1920, 1888, 1904, 1900, 0, - 2048, 2049, 1792, 1920, 1888, 1904, 1900, 0, - 2048, 2049, 1792, 1920, 1888, 1904, 1905, 1902, - 0, 2048, 2049, 1792, 1920, 1888, 0, 2048, - 2049, 1792, 1920, 1921, 1904, 0, 2048, 2049, - 1792, 1920, 1921, 1904, 0, 2048, 2049, 1792, - 1920, 1921, 1904, 1906, 0, 2048, 2049, 1792, - 1920, 1921, 1904, 0, 2048, 2049, 1792, 1920, - 1921, 1904, 1908, 0, 2048, 2049, 1792, 1920, - 1921, 1904, 1908, 0, 2048, 2049, 1792, 1920, - 1921, 1904, 1912, 1910, 0, 2048, 2049, 1792, - 1920, 1921, 1904, 0, 2048, 2049, 1792, 1920, - 1921, 1904, 1912, 0, 2048, 2049, 1792, 1920, - 1921, 1923, 1912, 0, 2048, 2049, 1792, 1920, - 1921, 1923, 1912, 1914, 0, 2048, 2049, 1792, - 1920, 1921, 1923, 1912, 0, 2048, 2049, 1792, - 1920, 1921, 1923, 1912, 1916, 0, 2048, 2049, - 1792, 1920, 1921, 1923, 1912, 1916, 0, 2048, - 2049, 1792, 1920, 1921, 1923, 1912, 1916, 1918, - 0, 2048, 2049, 1792, 0, 2048, 2049, 1792, - 1920, 0, 2048, 2049, 1792, 1920, 0, 2048, - 2049, 1792, 1920, 1922, 0, 2048, 2049, 2051, - 1920, 0, 2048, 2049, 2051, 1920, 1924, 0, - 2048, 2049, 2051, 1920, 1924, 0, 2048, 2049, - 2051, 1920, 1928, 1926, 0, 2048, 2049, 2051, - 1920, 0, 2048, 2049, 2051, 1920, 1928, 0, - 2048, 2049, 2051, 1920, 1928, 0, 2048, 2049, - 2051, 1920, 1928, 1930, 0, 2048, 2049, 2051, - 1920, 1928, 0, 2048, 2049, 2051, 1920, 1936, - 1932, 0, 2048, 2049, 2051, 1920, 1936, 1932, - 0, 2048, 2049, 2051, 1920, 1936, 1937, 1934, - 0, 2048, 2049, 2051, 1920, 0, 2048, 2049, - 2051, 1920, 1936, 0, 2048, 2049, 2051, 1920, - 1936, 0, 2048, 2049, 2051, 1920, 1936, 1938, - 0, 2048, 2049, 2051, 1920, 1936, 0, 2048, - 2049, 2051, 1920, 1936, 1940, 0, 2048, 2049, - 2051, 1920, 1936, 1940, 0, 2048, 2049, 2051, - 1920, 1936, 1944, 1942, 0, 2048, 2049, 2051, - 1920, 1936, 0, 2048, 2049, 2051, 1920, 1952, - 1944, 0, 2048, 2049, 2051, 1920, 1952, 1944, - 0, 2048, 2049, 2051, 1920, 1952, 1944, 1946, - 0, 2048, 2049, 2051, 1920, 1952, 1944, 0, - 2048, 2049, 2051, 1920, 1952, 1953, 1948, 0, - 2048, 2049, 2051, 1920, 1952, 1953, 1948, 0, - 2048, 2049, 2051, 1920, 1952, 1953, 1948, 1950, - 0, 2048, 2049, 2051, 1920, 0, 2048, 2049, - 2051, 1920, 1952, 0, 2048, 2049, 2051, 1920, - 1952, 0, 2048, 2049, 2051, 1920, 1952, 1954, - 0, 2048, 2049, 2051, 1920, 1952, 0, 2048, - 2049, 2051, 1920, 1952, 1956, 0, 2048, 2049, - 2051, 1920, 1952, 1956, 0, 2048, 2049, 2051, - 1920, 1952, 1960, 1958, 0, 2048, 2049, 2051, - 1920, 1952, 0, 2048, 2049, 2051, 1920, 1952, - 1960, 0, 2048, 2049, 2051, 1920, 1952, 1960, - 0, 2048, 2049, 2051, 1920, 1952, 1960, 1962, - 0, 2048, 2049, 2051, 1920, 1952, 1960, 0, - 2048, 2049, 2051, 1920, 1952, 1968, 1964, 0, - 2048, 2049, 2051, 1920, 1952, 1968, 1964, 0, - 2048, 2049, 2051, 1920, 1952, 1968, 1969, 1966, - 0, 2048, 2049, 2051, 1920, 1952, 0, 2048, - 2049, 2051, 1920, 1984, 1968, 0, 2048, 2049, - 2051, 1920, 1984, 1968, 0, 2048, 2049, 2051, - 1920, 1984, 1968, 1970, 0, 2048, 2049, 2051, - 1920, 1984, 1968, 0, 2048, 2049, 2051, 1920, - 1984, 1968, 1972, 0, 2048, 2049, 2051, 1920, - 1984, 1968, 1972, 0, 2048, 2049, 2051, 1920, - 1984, 1968, 1976, 1974, 0, 2048, 2049, 2051, - 1920, 1984, 1968, 0, 2048, 2049, 2051, 1920, - 1984, 1985, 1976, 0, 2048, 2049, 2051, 1920, - 1984, 1985, 1976, 0, 2048, 2049, 2051, 1920, - 1984, 1985, 1976, 1978, 0, 2048, 2049, 2051, - 1920, 1984, 1985, 1976, 0, 2048, 2049, 2051, - 1920, 1984, 1985, 1976, 1980, 0, 2048, 2049, - 2051, 1920, 1984, 1985, 1987, 1980, 0, 2048, - 2049, 2051, 1920, 1984, 1985, 1987, 1980, 1982, - 0, 2048, 2049, 2051, 1920, 0, 2048, 2049, - 2051, 1920, 1984, 0, 2048, 2049, 2051, 1920, - 1984, 0, 2048, 2049, 2051, 1920, 1984, 1986, - 0, 2048, 2049, 2051, 1920, 1984, 0, 2048, - 2049, 2051, 1920, 1984, 1988, 0, 2048, 2049, - 2051, 1920, 1984, 1988, 0, 2048, 2049, 2051, - 1920, 1984, 1992, 1990, 0, 2048, 2049, 2051, - 2055, 1984, 0, 2048, 2049, 2051, 2055, 1984, - 1992, 0, 2048, 2049, 2051, 2055, 1984, 1992, - 0, 2048, 2049, 2051, 2055, 1984, 1992, 1994, - 0, 2048, 2049, 2051, 2055, 1984, 1992, 0, - 2048, 2049, 2051, 2055, 1984, 2000, 1996, 0, - 2048, 2049, 2051, 2055, 1984, 2000, 1996, 0, - 2048, 2049, 2051, 2055, 1984, 2000, 2001, 1998, - 0, 2048, 2049, 2051, 2055, 1984, 0, 2048, - 2049, 2051, 2055, 1984, 2000, 0, 2048, 2049, - 2051, 2055, 1984, 2000, 0, 2048, 2049, 2051, - 2055, 1984, 2000, 2002, 0, 2048, 2049, 2051, - 2055, 1984, 2000, 0, 2048, 2049, 2051, 2055, - 1984, 2000, 2004, 0, 2048, 2049, 2051, 2055, - 1984, 2000, 2004, 0, 2048, 2049, 2051, 2055, - 1984, 2000, 2008, 2006, 0, 2048, 2049, 2051, - 2055, 1984, 2000, 0, 2048, 2049, 2051, 2055, - 1984, 2016, 2008, 0, 2048, 2049, 2051, 2055, - 1984, 2016, 2008, 0, 2048, 2049, 2051, 2055, - 1984, 2016, 2008, 2010, 0, 2048, 2049, 2051, - 2055, 1984, 2016, 2008, 0, 2048, 2049, 2051, - 2055, 1984, 2016, 2017, 2012, 0, 2048, 2049, - 2051, 2055, 1984, 2016, 2017, 2012, 0, 2048, - 2049, 2051, 2055, 1984, 2016, 2017, 2012, 2014, - 0, 2048, 2049, 2051, 2055, 1984, 0, 2048, - 2049, 2051, 2055, 1984, 2016, 0, 2048, 2049, - 2051, 2055, 1984, 2016, 0, 2048, 2049, 2051, - 2055, 1984, 2016, 2018, 0, 2048, 2049, 2051, - 2055, 1984, 2016, 0, 2048, 2049, 2051, 2055, - 1984, 2016, 2020, 0, 2048, 2049, 2051, 2055, - 1984, 2016, 2020, 0, 2048, 2049, 2051, 2055, - 1984, 2016, 2024, 2022, 0, 2048, 2049, 2051, - 2055, 1984, 2016, 0, 2048, 2049, 2051, 2055, - 1984, 2016, 2024, 0, 2048, 2049, 2051, 2055, - 1984, 2016, 2024, 0, 2048, 2049, 2051, 2055, - 1984, 2016, 2024, 2026, 0, 2048, 2049, 2051, - 2055, 1984, 2016, 2024, 0, 2048, 2049, 2051, - 2055, 1984, 2016, 2032, 2028, 0, 2048, 2049, - 2051, 2055, 1984, 2016, 2032, 2028, 0, 2048, - 2049, 2051, 2055, 1984, 2016, 2032, 2033, 2030, - 0, 2048, 2049, 2051, 2055, 2063, 2016, 0, - 2048, 2049, 2051, 2055, 2063, 2016, 2032, 0, - 2048, 2049, 2051, 2055, 2063, 2016, 2032, 0, - 2048, 2049, 2051, 2055, 2063, 2016, 2032, 2034, - 0, 2048, 2049, 2051, 2055, 2063, 2016, 2032, - 0, 2048, 2049, 2051, 2055, 2063, 2016, 2032, - 2036, 0, 2048, 2049, 2051, 2055, 2063, 2016, - 2032, 2036, 0, 2048, 2049, 2051, 2055, 2063, - 2016, 2032, 2040, 2038, 0, 2048, 2049, 2051, - 2055, 2063, 2016, 2032, 0, 2048, 2049, 2051, - 2055, 2063, 2016, 2032, 2040, 0, 2048, 2049, - 2051, 2055, 2063, 2016, 2032, 2040, 0, 2048, - 2049, 2051, 2055, 2063, 2016, 2032, 2040, 2042, - 0, 2048, 2049, 2051, 2055, 2063, 2016, 2032, - 2040, 0, 2048, 2049, 2051, 2055, 2063, 2016, - 2032, 2040, 2044, 0, 2048, 2049, 2051, 2055, - 2063, 2016, 2032, 2040, 2044, 0, 2048, 2049, - 2051, 2055, 2063, 2016, 2032, 2040, 2044, 2046, - 0, 0, 2048, 0, 2048, 0, 2048, 2050, - 0, 2048, 0, 2048, 2052, 0, 2048, 2052, - 0, 2048, 2056, 2054, 0, 2048, 0, 2048, - 2056, 0, 2048, 2056, 0, 2048, 2056, 2058, - 0, 2048, 2056, 0, 2048, 2064, 2060, 0, - 2048, 2064, 2060, 0, 2048, 2064, 2065, 2062, - 0, 2048, 0, 2048, 2064, 0, 2048, 2064, - 0, 2048, 2064, 2066, 0, 2048, 2064, 0, - 2048, 2064, 2068, 0, 2048, 2064, 2068, 0, - 2048, 2064, 2072, 2070, 0, 2048, 2064, 0, - 2048, 2080, 2072, 0, 2048, 2080, 2072, 0, - 2048, 2080, 2072, 2074, 0, 2048, 2080, 2072, - 0, 2048, 2080, 2081, 2076, 0, 2048, 2080, - 2081, 2076, 0, 2048, 2080, 2081, 2076, 2078, - 0, 2048, 0, 2048, 2080, 0, 2048, 2080, - 0, 2048, 2080, 2082, 0, 2048, 2080, 0, - 2048, 2080, 2084, 0, 2048, 2080, 2084, 0, - 2048, 2080, 2088, 2086, 0, 2048, 2080, 0, - 2048, 2080, 2088, 0, 2048, 2080, 2088, 0, - 2048, 2080, 2088, 2090, 0, 2048, 2080, 2088, - 0, 2048, 2080, 2096, 2092, 0, 2048, 2080, - 2096, 2092, 0, 2048, 2080, 2096, 2097, 2094, - 0, 2048, 2080, 0, 2048, 2112, 2096, 0, - 2048, 2112, 2096, 0, 2048, 2112, 2096, 2098, - 0, 2048, 2112, 2096, 0, 2048, 2112, 2096, - 2100, 0, 2048, 2112, 2096, 2100, 0, 2048, - 2112, 2096, 2104, 2102, 0, 2048, 2112, 2096, - 0, 2048, 2112, 2113, 2104, 0, 2048, 2112, - 2113, 2104, 0, 2048, 2112, 2113, 2104, 2106, - 0, 2048, 2112, 2113, 2104, 0, 2048, 2112, - 2113, 2104, 2108, 0, 2048, 2112, 2113, 2115, - 2108, 0, 2048, 2112, 2113, 2115, 2108, 2110, - 0, 2048, 0, 2048, 2112, 0, 2048, 2112, - 0, 2048, 2112, 2114, 0, 2048, 2112, 0, - 2048, 2112, 2116, 0, 2048, 2112, 2116, 0, - 2048, 2112, 2120, 2118, 0, 2048, 2112, 0, - 2048, 2112, 2120, 0, 2048, 2112, 2120, 0, - 2048, 2112, 2120, 2122, 0, 2048, 2112, 2120, - 0, 2048, 2112, 2128, 2124, 0, 2048, 2112, - 2128, 2124, 0, 2048, 2112, 2128, 2129, 2126, - 0, 2048, 2112, 0, 2048, 2112, 2128, 0, - 2048, 2112, 2128, 0, 2048, 2112, 2128, 2130, - 0, 2048, 2112, 2128, 0, 2048, 2112, 2128, - 2132, 0, 2048, 2112, 2128, 2132, 0, 2048, - 2112, 2128, 2136, 2134, 0, 2048, 2112, 2128, - 0, 2048, 2112, 2144, 2136, 0, 2048, 2112, - 2144, 2136, 0, 2048, 2112, 2144, 2136, 2138, - 0, 2048, 2112, 2144, 2136, 0, 2048, 2112, - 2144, 2145, 2140, 0, 2048, 2112, 2144, 2145, - 2140, 0, 2048, 2112, 2144, 2145, 2140, 2142, - 0, 2048, 2112, 0, 2048, 2176, 2144, 0, - 2048, 2176, 2144, 0, 2048, 2176, 2144, 2146, - 0, 2048, 2176, 2144, 0, 2048, 2176, 2144, - 2148, 0, 2048, 2176, 2144, 2148, 0, 2048, - 2176, 2144, 2152, 2150, 0, 2048, 2176, 2144, - 0, 2048, 2176, 2144, 2152, 0, 2048, 2176, - 2144, 2152, 0, 2048, 2176, 2144, 2152, 2154, - 0, 2048, 2176, 2144, 2152, 0, 2048, 2176, - 2144, 2160, 2156, 0, 2048, 2176, 2144, 2160, - 2156, 0, 2048, 2176, 2144, 2160, 2161, 2158, - 0, 2048, 2176, 2144, 0, 2048, 2176, 2177, - 2160, 0, 2048, 2176, 2177, 2160, 0, 2048, - 2176, 2177, 2160, 2162, 0, 2048, 2176, 2177, - 2160, 0, 2048, 2176, 2177, 2160, 2164, 0, - 2048, 2176, 2177, 2160, 2164, 0, 2048, 2176, - 2177, 2160, 2168, 2166, 0, 2048, 2176, 2177, - 2160, 0, 2048, 2176, 2177, 2160, 2168, 0, - 2048, 2176, 2177, 2179, 2168, 0, 2048, 2176, - 2177, 2179, 2168, 2170, 0, 2048, 2176, 2177, - 2179, 2168, 0, 2048, 2176, 2177, 2179, 2168, - 2172, 0, 2048, 2176, 2177, 2179, 2168, 2172, - 0, 2048, 2176, 2177, 2179, 2168, 2172, 2174, - 0, 2048, 0, 2048, 2176, 0, 2048, 2176, - 0, 2048, 2176, 2178, 0, 2048, 2176, 0, - 2048, 2176, 2180, 0, 2048, 2176, 2180, 0, - 2048, 2176, 2184, 2182, 0, 2048, 2176, 0, - 2048, 2176, 2184, 0, 2048, 2176, 2184, 0, - 2048, 2176, 2184, 2186, 0, 2048, 2176, 2184, - 0, 2048, 2176, 2192, 2188, 0, 2048, 2176, - 2192, 2188, 0, 2048, 2176, 2192, 2193, 2190, - 0, 2048, 2176, 0, 2048, 2176, 2192, 0, - 2048, 2176, 2192, 0, 2048, 2176, 2192, 2194, - 0, 2048, 2176, 2192, 0, 2048, 2176, 2192, - 2196, 0, 2048, 2176, 2192, 2196, 0, 2048, - 2176, 2192, 2200, 2198, 0, 2048, 2176, 2192, - 0, 2048, 2176, 2208, 2200, 0, 2048, 2176, - 2208, 2200, 0, 2048, 2176, 2208, 2200, 2202, - 0, 2048, 2176, 2208, 2200, 0, 2048, 2176, - 2208, 2209, 2204, 0, 2048, 2176, 2208, 2209, - 2204, 0, 2048, 2176, 2208, 2209, 2204, 2206, - 0, 2048, 2176, 0, 2048, 2176, 2208, 0, - 2048, 2176, 2208, 0, 2048, 2176, 2208, 2210, - 0, 2048, 2176, 2208, 0, 2048, 2176, 2208, - 2212, 0, 2048, 2176, 2208, 2212, 0, 2048, - 2176, 2208, 2216, 2214, 0, 2048, 2176, 2208, - 0, 2048, 2176, 2208, 2216, 0, 2048, 2176, - 2208, 2216, 0, 2048, 2176, 2208, 2216, 2218, - 0, 2048, 2176, 2208, 2216, 0, 2048, 2176, - 2208, 2224, 2220, 0, 2048, 2176, 2208, 2224, - 2220, 0, 2048, 2176, 2208, 2224, 2225, 2222, - 0, 2048, 2176, 2208, 0, 2048, 2176, 2240, - 2224, 0, 2048, 2176, 2240, 2224, 0, 2048, - 2176, 2240, 2224, 2226, 0, 2048, 2176, 2240, - 2224, 0, 2048, 2176, 2240, 2224, 2228, 0, - 2048, 2176, 2240, 2224, 2228, 0, 2048, 2176, - 2240, 2224, 2232, 2230, 0, 2048, 2176, 2240, - 2224, 0, 2048, 2176, 2240, 2241, 2232, 0, - 2048, 2176, 2240, 2241, 2232, 0, 2048, 2176, - 2240, 2241, 2232, 2234, 0, 2048, 2176, 2240, - 2241, 2232, 0, 2048, 2176, 2240, 2241, 2232, - 2236, 0, 2048, 2176, 2240, 2241, 2243, 2236, - 0, 2048, 2176, 2240, 2241, 2243, 2236, 2238, - 0, 2048, 2176, 0, 2048, 2304, 2240, 0, - 2048, 2304, 2240, 0, 2048, 2304, 2240, 2242, - 0, 2048, 2304, 2240, 0, 2048, 2304, 2240, - 2244, 0, 2048, 2304, 2240, 2244, 0, 2048, - 2304, 2240, 2248, 2246, 0, 2048, 2304, 2240, - 0, 2048, 2304, 2240, 2248, 0, 2048, 2304, - 2240, 2248, 0, 2048, 2304, 2240, 2248, 2250, - 0, 2048, 2304, 2240, 2248, 0, 2048, 2304, - 2240, 2256, 2252, 0, 2048, 2304, 2240, 2256, - 2252, 0, 2048, 2304, 2240, 2256, 2257, 2254, - 0, 2048, 2304, 2240, 0, 2048, 2304, 2240, - 2256, 0, 2048, 2304, 2240, 2256, 0, 2048, - 2304, 2240, 2256, 2258, 0, 2048, 2304, 2240, - 2256, 0, 2048, 2304, 2240, 2256, 2260, 0, - 2048, 2304, 2240, 2256, 2260, 0, 2048, 2304, - 2240, 2256, 2264, 2262, 0, 2048, 2304, 2240, - 2256, 0, 2048, 2304, 2240, 2272, 2264, 0, - 2048, 2304, 2240, 2272, 2264, 0, 2048, 2304, - 2240, 2272, 2264, 2266, 0, 2048, 2304, 2240, - 2272, 2264, 0, 2048, 2304, 2240, 2272, 2273, - 2268, 0, 2048, 2304, 2240, 2272, 2273, 2268, - 0, 2048, 2304, 2240, 2272, 2273, 2268, 2270, - 0, 2048, 2304, 2240, 0, 2048, 2304, 2305, - 2272, 0, 2048, 2304, 2305, 2272, 0, 2048, - 2304, 2305, 2272, 2274, 0, 2048, 2304, 2305, - 2272, 0, 2048, 2304, 2305, 2272, 2276, 0, - 2048, 2304, 2305, 2272, 2276, 0, 2048, 2304, - 2305, 2272, 2280, 2278, 0, 2048, 2304, 2305, - 2272, 0, 2048, 2304, 2305, 2272, 2280, 0, - 2048, 2304, 2305, 2272, 2280, 0, 2048, 2304, - 2305, 2272, 2280, 2282, 0, 2048, 2304, 2305, - 2272, 2280, 0, 2048, 2304, 2305, 2272, 2288, - 2284, 0, 2048, 2304, 2305, 2272, 2288, 2284, - 0, 2048, 2304, 2305, 2272, 2288, 2289, 2286, - 0, 2048, 2304, 2305, 2272, 0, 2048, 2304, - 2305, 2272, 2288, 0, 2048, 2304, 2305, 2307, - 2288, 0, 2048, 2304, 2305, 2307, 2288, 2290, - 0, 2048, 2304, 2305, 2307, 2288, 0, 2048, - 2304, 2305, 2307, 2288, 2292, 0, 2048, 2304, - 2305, 2307, 2288, 2292, 0, 2048, 2304, 2305, - 2307, 2288, 2296, 2294, 0, 2048, 2304, 2305, - 2307, 2288, 0, 2048, 2304, 2305, 2307, 2288, - 2296, 0, 2048, 2304, 2305, 2307, 2288, 2296, - 0, 2048, 2304, 2305, 2307, 2288, 2296, 2298, - 0, 2048, 2304, 2305, 2307, 2311, 2296, 0, - 2048, 2304, 2305, 2307, 2311, 2296, 2300, 0, - 2048, 2304, 2305, 2307, 2311, 2296, 2300, 0, - 2048, 2304, 2305, 2307, 2311, 2296, 2300, 2302, - 0, 2048, 0, 2048, 2304, 0, 2048, 2304, - 0, 2048, 2304, 2306, 0, 2048, 2304, 0, - 2048, 2304, 2308, 0, 2048, 2304, 2308, 0, - 2048, 2304, 2312, 2310, 0, 2048, 2304, 0, - 2048, 2304, 2312, 0, 2048, 2304, 2312, 0, - 2048, 2304, 2312, 2314, 0, 2048, 2304, 2312, - 0, 2048, 2304, 2320, 2316, 0, 2048, 2304, - 2320, 2316, 0, 2048, 2304, 2320, 2321, 2318, - 0, 2048, 2304, 0, 2048, 2304, 2320, 0, - 2048, 2304, 2320, 0, 2048, 2304, 2320, 2322, - 0, 2048, 2304, 2320, 0, 2048, 2304, 2320, - 2324, 0, 2048, 2304, 2320, 2324, 0, 2048, - 2304, 2320, 2328, 2326, 0, 2048, 2304, 2320, - 0, 2048, 2304, 2336, 2328, 0, 2048, 2304, - 2336, 2328, 0, 2048, 2304, 2336, 2328, 2330, - 0, 2048, 2304, 2336, 2328, 0, 2048, 2304, - 2336, 2337, 2332, 0, 2048, 2304, 2336, 2337, - 2332, 0, 2048, 2304, 2336, 2337, 2332, 2334, - 0, 2048, 2304, 0, 2048, 2304, 2336, 0, - 2048, 2304, 2336, 0, 2048, 2304, 2336, 2338, - 0, 2048, 2304, 2336, 0, 2048, 2304, 2336, - 2340, 0, 2048, 2304, 2336, 2340, 0, 2048, - 2304, 2336, 2344, 2342, 0, 2048, 2304, 2336, - 0, 2048, 2304, 2336, 2344, 0, 2048, 2304, - 2336, 2344, 0, 2048, 2304, 2336, 2344, 2346, - 0, 2048, 2304, 2336, 2344, 0, 2048, 2304, - 2336, 2352, 2348, 0, 2048, 2304, 2336, 2352, - 2348, 0, 2048, 2304, 2336, 2352, 2353, 2350, - 0, 2048, 2304, 2336, 0, 2048, 2304, 2368, - 2352, 0, 2048, 2304, 2368, 2352, 0, 2048, - 2304, 2368, 2352, 2354, 0, 2048, 2304, 2368, - 2352, 0, 2048, 2304, 2368, 2352, 2356, 0, - 2048, 2304, 2368, 2352, 2356, 0, 2048, 2304, - 2368, 2352, 2360, 2358, 0, 2048, 2304, 2368, - 2352, 0, 2048, 2304, 2368, 2369, 2360, 0, - 2048, 2304, 2368, 2369, 2360, 0, 2048, 2304, - 2368, 2369, 2360, 2362, 0, 2048, 2304, 2368, - 2369, 2360, 0, 2048, 2304, 2368, 2369, 2360, - 2364, 0, 2048, 2304, 2368, 2369, 2371, 2364, - 0, 2048, 2304, 2368, 2369, 2371, 2364, 2366, - 0, 2048, 2304, 0, 2048, 2304, 2368, 0, - 2048, 2304, 2368, 0, 2048, 2304, 2368, 2370, - 0, 2048, 2304, 2368, 0, 2048, 2304, 2368, - 2372, 0, 2048, 2304, 2368, 2372, 0, 2048, - 2304, 2368, 2376, 2374, 0, 2048, 2304, 2368, - 0, 2048, 2304, 2368, 2376, 0, 2048, 2304, - 2368, 2376, 0, 2048, 2304, 2368, 2376, 2378, - 0, 2048, 2304, 2368, 2376, 0, 2048, 2304, - 2368, 2384, 2380, 0, 2048, 2304, 2368, 2384, - 2380, 0, 2048, 2304, 2368, 2384, 2385, 2382, - 0, 2048, 2304, 2368, 0, 2048, 2304, 2368, - 2384, 0, 2048, 2304, 2368, 2384, 0, 2048, - 2304, 2368, 2384, 2386, 0, 2048, 2304, 2368, - 2384, 0, 2048, 2304, 2368, 2384, 2388, 0, - 2048, 2304, 2368, 2384, 2388, 0, 2048, 2304, - 2368, 2384, 2392, 2390, 0, 2048, 2304, 2368, - 2384, 0, 2048, 2304, 2368, 2400, 2392, 0, - 2048, 2304, 2368, 2400, 2392, 0, 2048, 2304, - 2368, 2400, 2392, 2394, 0, 2048, 2304, 2368, - 2400, 2392, 0, 2048, 2304, 2368, 2400, 2401, - 2396, 0, 2048, 2304, 2368, 2400, 2401, 2396, - 0, 2048, 2304, 2368, 2400, 2401, 2396, 2398, - 0, 2048, 2304, 2368, 0, 2048, 2304, 2432, - 2400, 0, 2048, 2304, 2432, 2400, 0, 2048, - 2304, 2432, 2400, 2402, 0, 2048, 2304, 2432, - 2400, 0, 2048, 2304, 2432, 2400, 2404, 0, - 2048, 2304, 2432, 2400, 2404, 0, 2048, 2304, - 2432, 2400, 2408, 2406, 0, 2048, 2304, 2432, - 2400, 0, 2048, 2304, 2432, 2400, 2408, 0, - 2048, 2304, 2432, 2400, 2408, 0, 2048, 2304, - 2432, 2400, 2408, 2410, 0, 2048, 2304, 2432, - 2400, 2408, 0, 2048, 2304, 2432, 2400, 2416, - 2412, 0, 2048, 2304, 2432, 2400, 2416, 2412, - 0, 2048, 2304, 2432, 2400, 2416, 2417, 2414, - 0, 2048, 2304, 2432, 2400, 0, 2048, 2304, - 2432, 2433, 2416, 0, 2048, 2304, 2432, 2433, - 2416, 0, 2048, 2304, 2432, 2433, 2416, 2418, - 0, 2048, 2304, 2432, 2433, 2416, 0, 2048, - 2304, 2432, 2433, 2416, 2420, 0, 2048, 2304, - 2432, 2433, 2416, 2420, 0, 2048, 2304, 2432, - 2433, 2416, 2424, 2422, 0, 2048, 2304, 2432, - 2433, 2416, 0, 2048, 2304, 2432, 2433, 2416, - 2424, 0, 2048, 2304, 2432, 2433, 2435, 2424, - 0, 2048, 2304, 2432, 2433, 2435, 2424, 2426, - 0, 2048, 2304, 2432, 2433, 2435, 2424, 0, - 2048, 2304, 2432, 2433, 2435, 2424, 2428, 0, - 2048, 2304, 2432, 2433, 2435, 2424, 2428, 0, - 2048, 2304, 2432, 2433, 2435, 2424, 2428, 2430, - 0, 2048, 2304, 0, 2048, 2560, 2432, 0, - 2048, 2560, 2432, 0, 2048, 2560, 2432, 2434, - 0, 2048, 2560, 2432, 0, 2048, 2560, 2432, - 2436, 0, 2048, 2560, 2432, 2436, 0, 2048, - 2560, 2432, 2440, 2438, 0, 2048, 2560, 2432, - 0, 2048, 2560, 2432, 2440, 0, 2048, 2560, - 2432, 2440, 0, 2048, 2560, 2432, 2440, 2442, - 0, 2048, 2560, 2432, 2440, 0, 2048, 2560, - 2432, 2448, 2444, 0, 2048, 2560, 2432, 2448, - 2444, 0, 2048, 2560, 2432, 2448, 2449, 2446, - 0, 2048, 2560, 2432, 0, 2048, 2560, 2432, - 2448, 0, 2048, 2560, 2432, 2448, 0, 2048, - 2560, 2432, 2448, 2450, 0, 2048, 2560, 2432, - 2448, 0, 2048, 2560, 2432, 2448, 2452, 0, - 2048, 2560, 2432, 2448, 2452, 0, 2048, 2560, - 2432, 2448, 2456, 2454, 0, 2048, 2560, 2432, - 2448, 0, 2048, 2560, 2432, 2464, 2456, 0, - 2048, 2560, 2432, 2464, 2456, 0, 2048, 2560, - 2432, 2464, 2456, 2458, 0, 2048, 2560, 2432, - 2464, 2456, 0, 2048, 2560, 2432, 2464, 2465, - 2460, 0, 2048, 2560, 2432, 2464, 2465, 2460, - 0, 2048, 2560, 2432, 2464, 2465, 2460, 2462, - 0, 2048, 2560, 2432, 0, 2048, 2560, 2432, - 2464, 0, 2048, 2560, 2432, 2464, 0, 2048, - 2560, 2432, 2464, 2466, 0, 2048, 2560, 2432, - 2464, 0, 2048, 2560, 2432, 2464, 2468, 0, - 2048, 2560, 2432, 2464, 2468, 0, 2048, 2560, - 2432, 2464, 2472, 2470, 0, 2048, 2560, 2432, - 2464, 0, 2048, 2560, 2432, 2464, 2472, 0, - 2048, 2560, 2432, 2464, 2472, 0, 2048, 2560, - 2432, 2464, 2472, 2474, 0, 2048, 2560, 2432, - 2464, 2472, 0, 2048, 2560, 2432, 2464, 2480, - 2476, 0, 2048, 2560, 2432, 2464, 2480, 2476, - 0, 2048, 2560, 2432, 2464, 2480, 2481, 2478, - 0, 2048, 2560, 2432, 2464, 0, 2048, 2560, - 2432, 2496, 2480, 0, 2048, 2560, 2432, 2496, - 2480, 0, 2048, 2560, 2432, 2496, 2480, 2482, - 0, 2048, 2560, 2432, 2496, 2480, 0, 2048, - 2560, 2432, 2496, 2480, 2484, 0, 2048, 2560, - 2432, 2496, 2480, 2484, 0, 2048, 2560, 2432, - 2496, 2480, 2488, 2486, 0, 2048, 2560, 2432, - 2496, 2480, 0, 2048, 2560, 2432, 2496, 2497, - 2488, 0, 2048, 2560, 2432, 2496, 2497, 2488, - 0, 2048, 2560, 2432, 2496, 2497, 2488, 2490, - 0, 2048, 2560, 2432, 2496, 2497, 2488, 0, - 2048, 2560, 2432, 2496, 2497, 2488, 2492, 0, - 2048, 2560, 2432, 2496, 2497, 2499, 2492, 0, - 2048, 2560, 2432, 2496, 2497, 2499, 2492, 2494, - 0, 2048, 2560, 2432, 0, 2048, 2560, 2561, - 2496, 0, 2048, 2560, 2561, 2496, 0, 2048, - 2560, 2561, 2496, 2498, 0, 2048, 2560, 2561, - 2496, 0, 2048, 2560, 2561, 2496, 2500, 0, - 2048, 2560, 2561, 2496, 2500, 0, 2048, 2560, - 2561, 2496, 2504, 2502, 0, 2048, 2560, 2561, - 2496, 0, 2048, 2560, 2561, 2496, 2504, 0, - 2048, 2560, 2561, 2496, 2504, 0, 2048, 2560, - 2561, 2496, 2504, 2506, 0, 2048, 2560, 2561, - 2496, 2504, 0, 2048, 2560, 2561, 2496, 2512, - 2508, 0, 2048, 2560, 2561, 2496, 2512, 2508, - 0, 2048, 2560, 2561, 2496, 2512, 2513, 2510, - 0, 2048, 2560, 2561, 2496, 0, 2048, 2560, - 2561, 2496, 2512, 0, 2048, 2560, 2561, 2496, - 2512, 0, 2048, 2560, 2561, 2496, 2512, 2514, - 0, 2048, 2560, 2561, 2496, 2512, 0, 2048, - 2560, 2561, 2496, 2512, 2516, 0, 2048, 2560, - 2561, 2496, 2512, 2516, 0, 2048, 2560, 2561, - 2496, 2512, 2520, 2518, 0, 2048, 2560, 2561, - 2496, 2512, 0, 2048, 2560, 2561, 2496, 2528, - 2520, 0, 2048, 2560, 2561, 2496, 2528, 2520, - 0, 2048, 2560, 2561, 2496, 2528, 2520, 2522, - 0, 2048, 2560, 2561, 2496, 2528, 2520, 0, - 2048, 2560, 2561, 2496, 2528, 2529, 2524, 0, - 2048, 2560, 2561, 2496, 2528, 2529, 2524, 0, - 2048, 2560, 2561, 2496, 2528, 2529, 2524, 2526, - 0, 2048, 2560, 2561, 2496, 0, 2048, 2560, - 2561, 2496, 2528, 0, 2048, 2560, 2561, 2563, - 2528, 0, 2048, 2560, 2561, 2563, 2528, 2530, - 0, 2048, 2560, 2561, 2563, 2528, 0, 2048, - 2560, 2561, 2563, 2528, 2532, 0, 2048, 2560, - 2561, 2563, 2528, 2532, 0, 2048, 2560, 2561, - 2563, 2528, 2536, 2534, 0, 2048, 2560, 2561, - 2563, 2528, 0, 2048, 2560, 2561, 2563, 2528, - 2536, 0, 2048, 2560, 2561, 2563, 2528, 2536, - 0, 2048, 2560, 2561, 2563, 2528, 2536, 2538, - 0, 2048, 2560, 2561, 2563, 2528, 2536, 0, - 2048, 2560, 2561, 2563, 2528, 2544, 2540, 0, - 2048, 2560, 2561, 2563, 2528, 2544, 2540, 0, - 2048, 2560, 2561, 2563, 2528, 2544, 2545, 2542, - 0, 2048, 2560, 2561, 2563, 2528, 0, 2048, - 2560, 2561, 2563, 2528, 2544, 0, 2048, 2560, - 2561, 2563, 2528, 2544, 0, 2048, 2560, 2561, - 2563, 2528, 2544, 2546, 0, 2048, 2560, 2561, - 2563, 2567, 2544, 0, 2048, 2560, 2561, 2563, - 2567, 2544, 2548, 0, 2048, 2560, 2561, 2563, - 2567, 2544, 2548, 0, 2048, 2560, 2561, 2563, - 2567, 2544, 2552, 2550, 0, 2048, 2560, 2561, - 2563, 2567, 2544, 0, 2048, 2560, 2561, 2563, - 2567, 2544, 2552, 0, 2048, 2560, 2561, 2563, - 2567, 2544, 2552, 0, 2048, 2560, 2561, 2563, - 2567, 2544, 2552, 2554, 0, 2048, 2560, 2561, - 2563, 2567, 2544, 2552, 0, 2048, 2560, 2561, - 2563, 2567, 2544, 2552, 2556, 0, 2048, 2560, - 2561, 2563, 2567, 2544, 2552, 2556, 0, 2048, - 2560, 2561, 2563, 2567, 2544, 2552, 2556, 2558, - 0, 2048, 0, 2048, 2560, 0, 2048, 2560, - 0, 2048, 2560, 2562, 0, 2048, 2560, 0, - 2048, 2560, 2564, 0, 2048, 2560, 2564, 0, - 2048, 2560, 2568, 2566, 0, 2048, 2560, 0, - 2048, 2560, 2568, 0, 2048, 2560, 2568, 0, - 2048, 2560, 2568, 2570, 0, 2048, 2560, 2568, - 0, 2048, 2560, 2576, 2572, 0, 2048, 2560, - 2576, 2572, 0, 2048, 2560, 2576, 2577, 2574, - 0, 2048, 2560, 0, 2048, 2560, 2576, 0, - 2048, 2560, 2576, 0, 2048, 2560, 2576, 2578, - 0, 2048, 2560, 2576, 0, 2048, 2560, 2576, - 2580, 0, 2048, 2560, 2576, 2580, 0, 2048, - 2560, 2576, 2584, 2582, 0, 2048, 2560, 2576, - 0, 2048, 2560, 2592, 2584, 0, 2048, 2560, - 2592, 2584, 0, 2048, 2560, 2592, 2584, 2586, - 0, 2048, 2560, 2592, 2584, 0, 2048, 2560, - 2592, 2593, 2588, 0, 2048, 2560, 2592, 2593, - 2588, 0, 2048, 2560, 2592, 2593, 2588, 2590, - 0, 2048, 2560, 0, 2048, 2560, 2592, 0, - 2048, 2560, 2592, 0, 2048, 2560, 2592, 2594, - 0, 2048, 2560, 2592, 0, 2048, 2560, 2592, - 2596, 0, 2048, 2560, 2592, 2596, 0, 2048, - 2560, 2592, 2600, 2598, 0, 2048, 2560, 2592, - 0, 2048, 2560, 2592, 2600, 0, 2048, 2560, - 2592, 2600, 0, 2048, 2560, 2592, 2600, 2602, - 0, 2048, 2560, 2592, 2600, 0, 2048, 2560, - 2592, 2608, 2604, 0, 2048, 2560, 2592, 2608, - 2604, 0, 2048, 2560, 2592, 2608, 2609, 2606, - 0, 2048, 2560, 2592, 0, 2048, 2560, 2624, - 2608, 0, 2048, 2560, 2624, 2608, 0, 2048, - 2560, 2624, 2608, 2610, 0, 2048, 2560, 2624, - 2608, 0, 2048, 2560, 2624, 2608, 2612, 0, - 2048, 2560, 2624, 2608, 2612, 0, 2048, 2560, - 2624, 2608, 2616, 2614, 0, 2048, 2560, 2624, - 2608, 0, 2048, 2560, 2624, 2625, 2616, 0, - 2048, 2560, 2624, 2625, 2616, 0, 2048, 2560, - 2624, 2625, 2616, 2618, 0, 2048, 2560, 2624, - 2625, 2616, 0, 2048, 2560, 2624, 2625, 2616, - 2620, 0, 2048, 2560, 2624, 2625, 2627, 2620, - 0, 2048, 2560, 2624, 2625, 2627, 2620, 2622, - 0, 2048, 2560, 0, 2048, 2560, 2624, 0, - 2048, 2560, 2624, 0, 2048, 2560, 2624, 2626, - 0, 2048, 2560, 2624, 0, 2048, 2560, 2624, - 2628, 0, 2048, 2560, 2624, 2628, 0, 2048, - 2560, 2624, 2632, 2630, 0, 2048, 2560, 2624, - 0, 2048, 2560, 2624, 2632, 0, 2048, 2560, - 2624, 2632, 0, 2048, 2560, 2624, 2632, 2634, - 0, 2048, 2560, 2624, 2632, 0, 2048, 2560, - 2624, 2640, 2636, 0, 2048, 2560, 2624, 2640, - 2636, 0, 2048, 2560, 2624, 2640, 2641, 2638, - 0, 2048, 2560, 2624, 0, 2048, 2560, 2624, - 2640, 0, 2048, 2560, 2624, 2640, 0, 2048, - 2560, 2624, 2640, 2642, 0, 2048, 2560, 2624, - 2640, 0, 2048, 2560, 2624, 2640, 2644, 0, - 2048, 2560, 2624, 2640, 2644, 0, 2048, 2560, - 2624, 2640, 2648, 2646, 0, 2048, 2560, 2624, - 2640, 0, 2048, 2560, 2624, 2656, 2648, 0, - 2048, 2560, 2624, 2656, 2648, 0, 2048, 2560, - 2624, 2656, 2648, 2650, 0, 2048, 2560, 2624, - 2656, 2648, 0, 2048, 2560, 2624, 2656, 2657, - 2652, 0, 2048, 2560, 2624, 2656, 2657, 2652, - 0, 2048, 2560, 2624, 2656, 2657, 2652, 2654, - 0, 2048, 2560, 2624, 0, 2048, 2560, 2688, - 2656, 0, 2048, 2560, 2688, 2656, 0, 2048, - 2560, 2688, 2656, 2658, 0, 2048, 2560, 2688, - 2656, 0, 2048, 2560, 2688, 2656, 2660, 0, - 2048, 2560, 2688, 2656, 2660, 0, 2048, 2560, - 2688, 2656, 2664, 2662, 0, 2048, 2560, 2688, - 2656, 0, 2048, 2560, 2688, 2656, 2664, 0, - 2048, 2560, 2688, 2656, 2664, 0, 2048, 2560, - 2688, 2656, 2664, 2666, 0, 2048, 2560, 2688, - 2656, 2664, 0, 2048, 2560, 2688, 2656, 2672, - 2668, 0, 2048, 2560, 2688, 2656, 2672, 2668, - 0, 2048, 2560, 2688, 2656, 2672, 2673, 2670, - 0, 2048, 2560, 2688, 2656, 0, 2048, 2560, - 2688, 2689, 2672, 0, 2048, 2560, 2688, 2689, - 2672, 0, 2048, 2560, 2688, 2689, 2672, 2674, - 0, 2048, 2560, 2688, 2689, 2672, 0, 2048, - 2560, 2688, 2689, 2672, 2676, 0, 2048, 2560, - 2688, 2689, 2672, 2676, 0, 2048, 2560, 2688, - 2689, 2672, 2680, 2678, 0, 2048, 2560, 2688, - 2689, 2672, 0, 2048, 2560, 2688, 2689, 2672, - 2680, 0, 2048, 2560, 2688, 2689, 2691, 2680, - 0, 2048, 2560, 2688, 2689, 2691, 2680, 2682, - 0, 2048, 2560, 2688, 2689, 2691, 2680, 0, - 2048, 2560, 2688, 2689, 2691, 2680, 2684, 0, - 2048, 2560, 2688, 2689, 2691, 2680, 2684, 0, - 2048, 2560, 2688, 2689, 2691, 2680, 2684, 2686, - 0, 2048, 2560, 0, 2048, 2560, 2688, 0, - 2048, 2560, 2688, 0, 2048, 2560, 2688, 2690, - 0, 2048, 2560, 2688, 0, 2048, 2560, 2688, - 2692, 0, 2048, 2560, 2688, 2692, 0, 2048, - 2560, 2688, 2696, 2694, 0, 2048, 2560, 2688, - 0, 2048, 2560, 2688, 2696, 0, 2048, 2560, - 2688, 2696, 0, 2048, 2560, 2688, 2696, 2698, - 0, 2048, 2560, 2688, 2696, 0, 2048, 2560, - 2688, 2704, 2700, 0, 2048, 2560, 2688, 2704, - 2700, 0, 2048, 2560, 2688, 2704, 2705, 2702, - 0, 2048, 2560, 2688, 0, 2048, 2560, 2688, - 2704, 0, 2048, 2560, 2688, 2704, 0, 2048, - 2560, 2688, 2704, 2706, 0, 2048, 2560, 2688, - 2704, 0, 2048, 2560, 2688, 2704, 2708, 0, - 2048, 2560, 2688, 2704, 2708, 0, 2048, 2560, - 2688, 2704, 2712, 2710, 0, 2048, 2560, 2688, - 2704, 0, 2048, 2560, 2688, 2720, 2712, 0, - 2048, 2560, 2688, 2720, 2712, 0, 2048, 2560, - 2688, 2720, 2712, 2714, 0, 2048, 2560, 2688, - 2720, 2712, 0, 2048, 2560, 2688, 2720, 2721, - 2716, 0, 2048, 2560, 2688, 2720, 2721, 2716, - 0, 2048, 2560, 2688, 2720, 2721, 2716, 2718, - 0, 2048, 2560, 2688, 0, 2048, 2560, 2688, - 2720, 0, 2048, 2560, 2688, 2720, 0, 2048, - 2560, 2688, 2720, 2722, 0, 2048, 2560, 2688, - 2720, 0, 2048, 2560, 2688, 2720, 2724, 0, - 2048, 2560, 2688, 2720, 2724, 0, 2048, 2560, - 2688, 2720, 2728, 2726, 0, 2048, 2560, 2688, - 2720, 0, 2048, 2560, 2688, 2720, 2728, 0, - 2048, 2560, 2688, 2720, 2728, 0, 2048, 2560, - 2688, 2720, 2728, 2730, 0, 2048, 2560, 2688, - 2720, 2728, 0, 2048, 2560, 2688, 2720, 2736, - 2732, 0, 2048, 2560, 2688, 2720, 2736, 2732, - 0, 2048, 2560, 2688, 2720, 2736, 2737, 2734, - 0, 2048, 2560, 2688, 2720, 0, 2048, 2560, - 2688, 2752, 2736, 0, 2048, 2560, 2688, 2752, - 2736, 0, 2048, 2560, 2688, 2752, 2736, 2738, - 0, 2048, 2560, 2688, 2752, 2736, 0, 2048, - 2560, 2688, 2752, 2736, 2740, 0, 2048, 2560, - 2688, 2752, 2736, 2740, 0, 2048, 2560, 2688, - 2752, 2736, 2744, 2742, 0, 2048, 2560, 2688, - 2752, 2736, 0, 2048, 2560, 2688, 2752, 2753, - 2744, 0, 2048, 2560, 2688, 2752, 2753, 2744, - 0, 2048, 2560, 2688, 2752, 2753, 2744, 2746, - 0, 2048, 2560, 2688, 2752, 2753, 2744, 0, - 2048, 2560, 2688, 2752, 2753, 2744, 2748, 0, - 2048, 2560, 2688, 2752, 2753, 2755, 2748, 0, - 2048, 2560, 2688, 2752, 2753, 2755, 2748, 2750, - 0, 2048, 2560, 2688, 0, 2048, 2560, 2816, - 2752, 0, 2048, 2560, 2816, 2752, 0, 2048, - 2560, 2816, 2752, 2754, 0, 2048, 2560, 2816, - 2752, 0, 2048, 2560, 2816, 2752, 2756, 0, - 2048, 2560, 2816, 2752, 2756, 0, 2048, 2560, - 2816, 2752, 2760, 2758, 0, 2048, 2560, 2816, - 2752, 0, 2048, 2560, 2816, 2752, 2760, 0, - 2048, 2560, 2816, 2752, 2760, 0, 2048, 2560, - 2816, 2752, 2760, 2762, 0, 2048, 2560, 2816, - 2752, 2760, 0, 2048, 2560, 2816, 2752, 2768, - 2764, 0, 2048, 2560, 2816, 2752, 2768, 2764, - 0, 2048, 2560, 2816, 2752, 2768, 2769, 2766, - 0, 2048, 2560, 2816, 2752, 0, 2048, 2560, - 2816, 2752, 2768, 0, 2048, 2560, 2816, 2752, - 2768, 0, 2048, 2560, 2816, 2752, 2768, 2770, - 0, 2048, 2560, 2816, 2752, 2768, 0, 2048, - 2560, 2816, 2752, 2768, 2772, 0, 2048, 2560, - 2816, 2752, 2768, 2772, 0, 2048, 2560, 2816, - 2752, 2768, 2776, 2774, 0, 2048, 2560, 2816, - 2752, 2768, 0, 2048, 2560, 2816, 2752, 2784, - 2776, 0, 2048, 2560, 2816, 2752, 2784, 2776, - 0, 2048, 2560, 2816, 2752, 2784, 2776, 2778, - 0, 2048, 2560, 2816, 2752, 2784, 2776, 0, - 2048, 2560, 2816, 2752, 2784, 2785, 2780, 0, - 2048, 2560, 2816, 2752, 2784, 2785, 2780, 0, - 2048, 2560, 2816, 2752, 2784, 2785, 2780, 2782, - 0, 2048, 2560, 2816, 2752, 0, 2048, 2560, - 2816, 2817, 2784, 0, 2048, 2560, 2816, 2817, - 2784, 0, 2048, 2560, 2816, 2817, 2784, 2786, - 0, 2048, 2560, 2816, 2817, 2784, 0, 2048, - 2560, 2816, 2817, 2784, 2788, 0, 2048, 2560, - 2816, 2817, 2784, 2788, 0, 2048, 2560, 2816, - 2817, 2784, 2792, 2790, 0, 2048, 2560, 2816, - 2817, 2784, 0, 2048, 2560, 2816, 2817, 2784, - 2792, 0, 2048, 2560, 2816, 2817, 2784, 2792, - 0, 2048, 2560, 2816, 2817, 2784, 2792, 2794, - 0, 2048, 2560, 2816, 2817, 2784, 2792, 0, - 2048, 2560, 2816, 2817, 2784, 2800, 2796, 0, - 2048, 2560, 2816, 2817, 2784, 2800, 2796, 0, - 2048, 2560, 2816, 2817, 2784, 2800, 2801, 2798, - 0, 2048, 2560, 2816, 2817, 2784, 0, 2048, - 2560, 2816, 2817, 2784, 2800, 0, 2048, 2560, - 2816, 2817, 2819, 2800, 0, 2048, 2560, 2816, - 2817, 2819, 2800, 2802, 0, 2048, 2560, 2816, - 2817, 2819, 2800, 0, 2048, 2560, 2816, 2817, - 2819, 2800, 2804, 0, 2048, 2560, 2816, 2817, - 2819, 2800, 2804, 0, 2048, 2560, 2816, 2817, - 2819, 2800, 2808, 2806, 0, 2048, 2560, 2816, - 2817, 2819, 2800, 0, 2048, 2560, 2816, 2817, - 2819, 2800, 2808, 0, 2048, 2560, 2816, 2817, - 2819, 2800, 2808, 0, 2048, 2560, 2816, 2817, - 2819, 2800, 2808, 2810, 0, 2048, 2560, 2816, - 2817, 2819, 2823, 2808, 0, 2048, 2560, 2816, - 2817, 2819, 2823, 2808, 2812, 0, 2048, 2560, - 2816, 2817, 2819, 2823, 2808, 2812, 0, 2048, - 2560, 2816, 2817, 2819, 2823, 2808, 2812, 2814, - 0, 2048, 2560, 0, 2048, 3072, 2816, 0, - 2048, 3072, 2816, 0, 2048, 3072, 2816, 2818, - 0, 2048, 3072, 2816, 0, 2048, 3072, 2816, - 2820, 0, 2048, 3072, 2816, 2820, 0, 2048, - 3072, 2816, 2824, 2822, 0, 2048, 3072, 2816, - 0, 2048, 3072, 2816, 2824, 0, 2048, 3072, - 2816, 2824, 0, 2048, 3072, 2816, 2824, 2826, - 0, 2048, 3072, 2816, 2824, 0, 2048, 3072, - 2816, 2832, 2828, 0, 2048, 3072, 2816, 2832, - 2828, 0, 2048, 3072, 2816, 2832, 2833, 2830, - 0, 2048, 3072, 2816, 0, 2048, 3072, 2816, - 2832, 0, 2048, 3072, 2816, 2832, 0, 2048, - 3072, 2816, 2832, 2834, 0, 2048, 3072, 2816, - 2832, 0, 2048, 3072, 2816, 2832, 2836, 0, - 2048, 3072, 2816, 2832, 2836, 0, 2048, 3072, - 2816, 2832, 2840, 2838, 0, 2048, 3072, 2816, - 2832, 0, 2048, 3072, 2816, 2848, 2840, 0, - 2048, 3072, 2816, 2848, 2840, 0, 2048, 3072, - 2816, 2848, 2840, 2842, 0, 2048, 3072, 2816, - 2848, 2840, 0, 2048, 3072, 2816, 2848, 2849, - 2844, 0, 2048, 3072, 2816, 2848, 2849, 2844, - 0, 2048, 3072, 2816, 2848, 2849, 2844, 2846, - 0, 2048, 3072, 2816, 0, 2048, 3072, 2816, - 2848, 0, 2048, 3072, 2816, 2848, 0, 2048, - 3072, 2816, 2848, 2850, 0, 2048, 3072, 2816, - 2848, 0, 2048, 3072, 2816, 2848, 2852, 0, - 2048, 3072, 2816, 2848, 2852, 0, 2048, 3072, - 2816, 2848, 2856, 2854, 0, 2048, 3072, 2816, - 2848, 0, 2048, 3072, 2816, 2848, 2856, 0, - 2048, 3072, 2816, 2848, 2856, 0, 2048, 3072, - 2816, 2848, 2856, 2858, 0, 2048, 3072, 2816, - 2848, 2856, 0, 2048, 3072, 2816, 2848, 2864, - 2860, 0, 2048, 3072, 2816, 2848, 2864, 2860, - 0, 2048, 3072, 2816, 2848, 2864, 2865, 2862, - 0, 2048, 3072, 2816, 2848, 0, 2048, 3072, - 2816, 2880, 2864, 0, 2048, 3072, 2816, 2880, - 2864, 0, 2048, 3072, 2816, 2880, 2864, 2866, - 0, 2048, 3072, 2816, 2880, 2864, 0, 2048, - 3072, 2816, 2880, 2864, 2868, 0, 2048, 3072, - 2816, 2880, 2864, 2868, 0, 2048, 3072, 2816, - 2880, 2864, 2872, 2870, 0, 2048, 3072, 2816, - 2880, 2864, 0, 2048, 3072, 2816, 2880, 2881, - 2872, 0, 2048, 3072, 2816, 2880, 2881, 2872, - 0, 2048, 3072, 2816, 2880, 2881, 2872, 2874, - 0, 2048, 3072, 2816, 2880, 2881, 2872, 0, - 2048, 3072, 2816, 2880, 2881, 2872, 2876, 0, - 2048, 3072, 2816, 2880, 2881, 2883, 2876, 0, - 2048, 3072, 2816, 2880, 2881, 2883, 2876, 2878, - 0, 2048, 3072, 2816, 0, 2048, 3072, 2816, - 2880, 0, 2048, 3072, 2816, 2880, 0, 2048, - 3072, 2816, 2880, 2882, 0, 2048, 3072, 2816, - 2880, 0, 2048, 3072, 2816, 2880, 2884, 0, - 2048, 3072, 2816, 2880, 2884, 0, 2048, 3072, - 2816, 2880, 2888, 2886, 0, 2048, 3072, 2816, - 2880, 0, 2048, 3072, 2816, 2880, 2888, 0, - 2048, 3072, 2816, 2880, 2888, 0, 2048, 3072, - 2816, 2880, 2888, 2890, 0, 2048, 3072, 2816, - 2880, 2888, 0, 2048, 3072, 2816, 2880, 2896, - 2892, 0, 2048, 3072, 2816, 2880, 2896, 2892, - 0, 2048, 3072, 2816, 2880, 2896, 2897, 2894, - 0, 2048, 3072, 2816, 2880, 0, 2048, 3072, - 2816, 2880, 2896, 0, 2048, 3072, 2816, 2880, - 2896, 0, 2048, 3072, 2816, 2880, 2896, 2898, - 0, 2048, 3072, 2816, 2880, 2896, 0, 2048, - 3072, 2816, 2880, 2896, 2900, 0, 2048, 3072, - 2816, 2880, 2896, 2900, 0, 2048, 3072, 2816, - 2880, 2896, 2904, 2902, 0, 2048, 3072, 2816, - 2880, 2896, 0, 2048, 3072, 2816, 2880, 2912, - 2904, 0, 2048, 3072, 2816, 2880, 2912, 2904, - 0, 2048, 3072, 2816, 2880, 2912, 2904, 2906, - 0, 2048, 3072, 2816, 2880, 2912, 2904, 0, - 2048, 3072, 2816, 2880, 2912, 2913, 2908, 0, - 2048, 3072, 2816, 2880, 2912, 2913, 2908, 0, - 2048, 3072, 2816, 2880, 2912, 2913, 2908, 2910, - 0, 2048, 3072, 2816, 2880, 0, 2048, 3072, - 2816, 2944, 2912, 0, 2048, 3072, 2816, 2944, - 2912, 0, 2048, 3072, 2816, 2944, 2912, 2914, - 0, 2048, 3072, 2816, 2944, 2912, 0, 2048, - 3072, 2816, 2944, 2912, 2916, 0, 2048, 3072, - 2816, 2944, 2912, 2916, 0, 2048, 3072, 2816, - 2944, 2912, 2920, 2918, 0, 2048, 3072, 2816, - 2944, 2912, 0, 2048, 3072, 2816, 2944, 2912, - 2920, 0, 2048, 3072, 2816, 2944, 2912, 2920, - 0, 2048, 3072, 2816, 2944, 2912, 2920, 2922, - 0, 2048, 3072, 2816, 2944, 2912, 2920, 0, - 2048, 3072, 2816, 2944, 2912, 2928, 2924, 0, - 2048, 3072, 2816, 2944, 2912, 2928, 2924, 0, - 2048, 3072, 2816, 2944, 2912, 2928, 2929, 2926, - 0, 2048, 3072, 2816, 2944, 2912, 0, 2048, - 3072, 2816, 2944, 2945, 2928, 0, 2048, 3072, - 2816, 2944, 2945, 2928, 0, 2048, 3072, 2816, - 2944, 2945, 2928, 2930, 0, 2048, 3072, 2816, - 2944, 2945, 2928, 0, 2048, 3072, 2816, 2944, - 2945, 2928, 2932, 0, 2048, 3072, 2816, 2944, - 2945, 2928, 2932, 0, 2048, 3072, 2816, 2944, - 2945, 2928, 2936, 2934, 0, 2048, 3072, 2816, - 2944, 2945, 2928, 0, 2048, 3072, 2816, 2944, - 2945, 2928, 2936, 0, 2048, 3072, 2816, 2944, - 2945, 2947, 2936, 0, 2048, 3072, 2816, 2944, - 2945, 2947, 2936, 2938, 0, 2048, 3072, 2816, - 2944, 2945, 2947, 2936, 0, 2048, 3072, 2816, - 2944, 2945, 2947, 2936, 2940, 0, 2048, 3072, - 2816, 2944, 2945, 2947, 2936, 2940, 0, 2048, - 3072, 2816, 2944, 2945, 2947, 2936, 2940, 2942, - 0, 2048, 3072, 2816, 0, 2048, 3072, 2816, - 2944, 0, 2048, 3072, 3073, 2944, 0, 2048, - 3072, 3073, 2944, 2946, 0, 2048, 3072, 3073, - 2944, 0, 2048, 3072, 3073, 2944, 2948, 0, - 2048, 3072, 3073, 2944, 2948, 0, 2048, 3072, - 3073, 2944, 2952, 2950, 0, 2048, 3072, 3073, - 2944, 0, 2048, 3072, 3073, 2944, 2952, 0, - 2048, 3072, 3073, 2944, 2952, 0, 2048, 3072, - 3073, 2944, 2952, 2954, 0, 2048, 3072, 3073, - 2944, 2952, 0, 2048, 3072, 3073, 2944, 2960, - 2956, 0, 2048, 3072, 3073, 2944, 2960, 2956, - 0, 2048, 3072, 3073, 2944, 2960, 2961, 2958, - 0, 2048, 3072, 3073, 2944, 0, 2048, 3072, - 3073, 2944, 2960, 0, 2048, 3072, 3073, 2944, - 2960, 0, 2048, 3072, 3073, 2944, 2960, 2962, - 0, 2048, 3072, 3073, 2944, 2960, 0, 2048, - 3072, 3073, 2944, 2960, 2964, 0, 2048, 3072, - 3073, 2944, 2960, 2964, 0, 2048, 3072, 3073, - 2944, 2960, 2968, 2966, 0, 2048, 3072, 3073, - 2944, 2960, 0, 2048, 3072, 3073, 2944, 2976, - 2968, 0, 2048, 3072, 3073, 2944, 2976, 2968, - 0, 2048, 3072, 3073, 2944, 2976, 2968, 2970, - 0, 2048, 3072, 3073, 2944, 2976, 2968, 0, - 2048, 3072, 3073, 2944, 2976, 2977, 2972, 0, - 2048, 3072, 3073, 2944, 2976, 2977, 2972, 0, - 2048, 3072, 3073, 2944, 2976, 2977, 2972, 2974, - 0, 2048, 3072, 3073, 2944, 0, 2048, 3072, - 3073, 2944, 2976, 0, 2048, 3072, 3073, 2944, - 2976, 0, 2048, 3072, 3073, 2944, 2976, 2978, - 0, 2048, 3072, 3073, 2944, 2976, 0, 2048, - 3072, 3073, 2944, 2976, 2980, 0, 2048, 3072, - 3073, 2944, 2976, 2980, 0, 2048, 3072, 3073, - 2944, 2976, 2984, 2982, 0, 2048, 3072, 3073, - 2944, 2976, 0, 2048, 3072, 3073, 2944, 2976, - 2984, 0, 2048, 3072, 3073, 2944, 2976, 2984, - 0, 2048, 3072, 3073, 2944, 2976, 2984, 2986, - 0, 2048, 3072, 3073, 2944, 2976, 2984, 0, - 2048, 3072, 3073, 2944, 2976, 2992, 2988, 0, - 2048, 3072, 3073, 2944, 2976, 2992, 2988, 0, - 2048, 3072, 3073, 2944, 2976, 2992, 2993, 2990, - 0, 2048, 3072, 3073, 2944, 2976, 0, 2048, - 3072, 3073, 2944, 3008, 2992, 0, 2048, 3072, - 3073, 2944, 3008, 2992, 0, 2048, 3072, 3073, - 2944, 3008, 2992, 2994, 0, 2048, 3072, 3073, - 2944, 3008, 2992, 0, 2048, 3072, 3073, 2944, - 3008, 2992, 2996, 0, 2048, 3072, 3073, 2944, - 3008, 2992, 2996, 0, 2048, 3072, 3073, 2944, - 3008, 2992, 3000, 2998, 0, 2048, 3072, 3073, - 2944, 3008, 2992, 0, 2048, 3072, 3073, 2944, - 3008, 3009, 3000, 0, 2048, 3072, 3073, 2944, - 3008, 3009, 3000, 0, 2048, 3072, 3073, 2944, - 3008, 3009, 3000, 3002, 0, 2048, 3072, 3073, - 2944, 3008, 3009, 3000, 0, 2048, 3072, 3073, - 2944, 3008, 3009, 3000, 3004, 0, 2048, 3072, - 3073, 2944, 3008, 3009, 3011, 3004, 0, 2048, - 3072, 3073, 2944, 3008, 3009, 3011, 3004, 3006, - 0, 2048, 3072, 3073, 2944, 0, 2048, 3072, - 3073, 2944, 3008, 0, 2048, 3072, 3073, 2944, - 3008, 0, 2048, 3072, 3073, 2944, 3008, 3010, - 0, 2048, 3072, 3073, 3075, 3008, 0, 2048, - 3072, 3073, 3075, 3008, 3012, 0, 2048, 3072, - 3073, 3075, 3008, 3012, 0, 2048, 3072, 3073, - 3075, 3008, 3016, 3014, 0, 2048, 3072, 3073, - 3075, 3008, 0, 2048, 3072, 3073, 3075, 3008, - 3016, 0, 2048, 3072, 3073, 3075, 3008, 3016, - 0, 2048, 3072, 3073, 3075, 3008, 3016, 3018, - 0, 2048, 3072, 3073, 3075, 3008, 3016, 0, - 2048, 3072, 3073, 3075, 3008, 3024, 3020, 0, - 2048, 3072, 3073, 3075, 3008, 3024, 3020, 0, - 2048, 3072, 3073, 3075, 3008, 3024, 3025, 3022, - 0, 2048, 3072, 3073, 3075, 3008, 0, 2048, - 3072, 3073, 3075, 3008, 3024, 0, 2048, 3072, - 3073, 3075, 3008, 3024, 0, 2048, 3072, 3073, - 3075, 3008, 3024, 3026, 0, 2048, 3072, 3073, - 3075, 3008, 3024, 0, 2048, 3072, 3073, 3075, - 3008, 3024, 3028, 0, 2048, 3072, 3073, 3075, - 3008, 3024, 3028, 0, 2048, 3072, 3073, 3075, - 3008, 3024, 3032, 3030, 0, 2048, 3072, 3073, - 3075, 3008, 3024, 0, 2048, 3072, 3073, 3075, - 3008, 3040, 3032, 0, 2048, 3072, 3073, 3075, - 3008, 3040, 3032, 0, 2048, 3072, 3073, 3075, - 3008, 3040, 3032, 3034, 0, 2048, 3072, 3073, - 3075, 3008, 3040, 3032, 0, 2048, 3072, 3073, - 3075, 3008, 3040, 3041, 3036, 0, 2048, 3072, - 3073, 3075, 3008, 3040, 3041, 3036, 0, 2048, - 3072, 3073, 3075, 3008, 3040, 3041, 3036, 3038, - 0, 2048, 3072, 3073, 3075, 3008, 0, 2048, - 3072, 3073, 3075, 3008, 3040, 0, 2048, 3072, - 3073, 3075, 3008, 3040, 0, 2048, 3072, 3073, - 3075, 3008, 3040, 3042, 0, 2048, 3072, 3073, - 3075, 3008, 3040, 0, 2048, 3072, 3073, 3075, - 3008, 3040, 3044, 0, 2048, 3072, 3073, 3075, - 3008, 3040, 3044, 0, 2048, 3072, 3073, 3075, - 3008, 3040, 3048, 3046, 0, 2048, 3072, 3073, - 3075, 3079, 3040, 0, 2048, 3072, 3073, 3075, - 3079, 3040, 3048, 0, 2048, 3072, 3073, 3075, - 3079, 3040, 3048, 0, 2048, 3072, 3073, 3075, - 3079, 3040, 3048, 3050, 0, 2048, 3072, 3073, - 3075, 3079, 3040, 3048, 0, 2048, 3072, 3073, - 3075, 3079, 3040, 3056, 3052, 0, 2048, 3072, - 3073, 3075, 3079, 3040, 3056, 3052, 0, 2048, - 3072, 3073, 3075, 3079, 3040, 3056, 3057, 3054, - 0, 2048, 3072, 3073, 3075, 3079, 3040, 0, - 2048, 3072, 3073, 3075, 3079, 3040, 3056, 0, - 2048, 3072, 3073, 3075, 3079, 3040, 3056, 0, - 2048, 3072, 3073, 3075, 3079, 3040, 3056, 3058, - 0, 2048, 3072, 3073, 3075, 3079, 3040, 3056, - 0, 2048, 3072, 3073, 3075, 3079, 3040, 3056, - 3060, 0, 2048, 3072, 3073, 3075, 3079, 3040, - 3056, 3060, 0, 2048, 3072, 3073, 3075, 3079, - 3040, 3056, 3064, 3062, 0, 2048, 3072, 3073, - 3075, 3079, 3040, 3056, 0, 2048, 3072, 3073, - 3075, 3079, 3040, 3056, 3064, 0, 2048, 3072, - 3073, 3075, 3079, 3040, 3056, 3064, 0, 2048, - 3072, 3073, 3075, 3079, 3040, 3056, 3064, 3066, - 0, 2048, 3072, 3073, 3075, 3079, 3040, 3056, - 3064, 0, 2048, 3072, 3073, 3075, 3079, 3040, - 3056, 3064, 3068, 0, 2048, 3072, 3073, 3075, - 3079, 3040, 3056, 3064, 3068, 0, 2048, 3072, - 3073, 3075, 3079, 3040, 3056, 3064, 3068, 3070, - 0, 2048, 0, 2048, 3072, 0, 2048, 3072, - 0, 2048, 3072, 3074, 0, 2048, 3072, 0, - 2048, 3072, 3076, 0, 2048, 3072, 3076, 0, - 2048, 3072, 3080, 3078, 0, 2048, 3072, 0, - 2048, 3072, 3080, 0, 2048, 3072, 3080, 0, - 2048, 3072, 3080, 3082, 0, 2048, 3072, 3080, - 0, 2048, 3072, 3088, 3084, 0, 2048, 3072, - 3088, 3084, 0, 2048, 3072, 3088, 3089, 3086, - 0, 2048, 3072, 0, 2048, 3072, 3088, 0, - 2048, 3072, 3088, 0, 2048, 3072, 3088, 3090, - 0, 2048, 3072, 3088, 0, 2048, 3072, 3088, - 3092, 0, 2048, 3072, 3088, 3092, 0, 2048, - 3072, 3088, 3096, 3094, 0, 2048, 3072, 3088, - 0, 2048, 3072, 3104, 3096, 0, 2048, 3072, - 3104, 3096, 0, 2048, 3072, 3104, 3096, 3098, - 0, 2048, 3072, 3104, 3096, 0, 2048, 3072, - 3104, 3105, 3100, 0, 2048, 3072, 3104, 3105, - 3100, 0, 2048, 3072, 3104, 3105, 3100, 3102, - 0, 2048, 3072, 0, 2048, 3072, 3104, 0, - 2048, 3072, 3104, 0, 2048, 3072, 3104, 3106, - 0, 2048, 3072, 3104, 0, 2048, 3072, 3104, - 3108, 0, 2048, 3072, 3104, 3108, 0, 2048, - 3072, 3104, 3112, 3110, 0, 2048, 3072, 3104, - 0, 2048, 3072, 3104, 3112, 0, 2048, 3072, - 3104, 3112, 0, 2048, 3072, 3104, 3112, 3114, - 0, 2048, 3072, 3104, 3112, 0, 2048, 3072, - 3104, 3120, 3116, 0, 2048, 3072, 3104, 3120, - 3116, 0, 2048, 3072, 3104, 3120, 3121, 3118, - 0, 2048, 3072, 3104, 0, 2048, 3072, 3136, - 3120, 0, 2048, 3072, 3136, 3120, 0, 2048, - 3072, 3136, 3120, 3122, 0, 2048, 3072, 3136, - 3120, 0, 2048, 3072, 3136, 3120, 3124, 0, - 2048, 3072, 3136, 3120, 3124, 0, 2048, 3072, - 3136, 3120, 3128, 3126, 0, 2048, 3072, 3136, - 3120, 0, 2048, 3072, 3136, 3137, 3128, 0, - 2048, 3072, 3136, 3137, 3128, 0, 2048, 3072, - 3136, 3137, 3128, 3130, 0, 2048, 3072, 3136, - 3137, 3128, 0, 2048, 3072, 3136, 3137, 3128, - 3132, 0, 2048, 3072, 3136, 3137, 3139, 3132, - 0, 2048, 3072, 3136, 3137, 3139, 3132, 3134, - 0, 2048, 3072, 0, 2048, 3072, 3136, 0, - 2048, 3072, 3136, 0, 2048, 3072, 3136, 3138, - 0, 2048, 3072, 3136, 0, 2048, 3072, 3136, - 3140, 0, 2048, 3072, 3136, 3140, 0, 2048, - 3072, 3136, 3144, 3142, 0, 2048, 3072, 3136, - 0, 2048, 3072, 3136, 3144, 0, 2048, 3072, - 3136, 3144, 0, 2048, 3072, 3136, 3144, 3146, - 0, 2048, 3072, 3136, 3144, 0, 2048, 3072, - 3136, 3152, 3148, 0, 2048, 3072, 3136, 3152, - 3148, 0, 2048, 3072, 3136, 3152, 3153, 3150, - 0, 2048, 3072, 3136, 0, 2048, 3072, 3136, - 3152, 0, 2048, 3072, 3136, 3152, 0, 2048, - 3072, 3136, 3152, 3154, 0, 2048, 3072, 3136, - 3152, 0, 2048, 3072, 3136, 3152, 3156, 0, - 2048, 3072, 3136, 3152, 3156, 0, 2048, 3072, - 3136, 3152, 3160, 3158, 0, 2048, 3072, 3136, - 3152, 0, 2048, 3072, 3136, 3168, 3160, 0, - 2048, 3072, 3136, 3168, 3160, 0, 2048, 3072, - 3136, 3168, 3160, 3162, 0, 2048, 3072, 3136, - 3168, 3160, 0, 2048, 3072, 3136, 3168, 3169, - 3164, 0, 2048, 3072, 3136, 3168, 3169, 3164, - 0, 2048, 3072, 3136, 3168, 3169, 3164, 3166, - 0, 2048, 3072, 3136, 0, 2048, 3072, 3200, - 3168, 0, 2048, 3072, 3200, 3168, 0, 2048, - 3072, 3200, 3168, 3170, 0, 2048, 3072, 3200, - 3168, 0, 2048, 3072, 3200, 3168, 3172, 0, - 2048, 3072, 3200, 3168, 3172, 0, 2048, 3072, - 3200, 3168, 3176, 3174, 0, 2048, 3072, 3200, - 3168, 0, 2048, 3072, 3200, 3168, 3176, 0, - 2048, 3072, 3200, 3168, 3176, 0, 2048, 3072, - 3200, 3168, 3176, 3178, 0, 2048, 3072, 3200, - 3168, 3176, 0, 2048, 3072, 3200, 3168, 3184, - 3180, 0, 2048, 3072, 3200, 3168, 3184, 3180, - 0, 2048, 3072, 3200, 3168, 3184, 3185, 3182, - 0, 2048, 3072, 3200, 3168, 0, 2048, 3072, - 3200, 3201, 3184, 0, 2048, 3072, 3200, 3201, - 3184, 0, 2048, 3072, 3200, 3201, 3184, 3186, - 0, 2048, 3072, 3200, 3201, 3184, 0, 2048, - 3072, 3200, 3201, 3184, 3188, 0, 2048, 3072, - 3200, 3201, 3184, 3188, 0, 2048, 3072, 3200, - 3201, 3184, 3192, 3190, 0, 2048, 3072, 3200, - 3201, 3184, 0, 2048, 3072, 3200, 3201, 3184, - 3192, 0, 2048, 3072, 3200, 3201, 3203, 3192, - 0, 2048, 3072, 3200, 3201, 3203, 3192, 3194, - 0, 2048, 3072, 3200, 3201, 3203, 3192, 0, - 2048, 3072, 3200, 3201, 3203, 3192, 3196, 0, - 2048, 3072, 3200, 3201, 3203, 3192, 3196, 0, - 2048, 3072, 3200, 3201, 3203, 3192, 3196, 3198, - 0, 2048, 3072, 0, 2048, 3072, 3200, 0, - 2048, 3072, 3200, 0, 2048, 3072, 3200, 3202, - 0, 2048, 3072, 3200, 0, 2048, 3072, 3200, - 3204, 0, 2048, 3072, 3200, 3204, 0, 2048, - 3072, 3200, 3208, 3206, 0, 2048, 3072, 3200, - 0, 2048, 3072, 3200, 3208, 0, 2048, 3072, - 3200, 3208, 0, 2048, 3072, 3200, 3208, 3210, - 0, 2048, 3072, 3200, 3208, 0, 2048, 3072, - 3200, 3216, 3212, 0, 2048, 3072, 3200, 3216, - 3212, 0, 2048, 3072, 3200, 3216, 3217, 3214, - 0, 2048, 3072, 3200, 0, 2048, 3072, 3200, - 3216, 0, 2048, 3072, 3200, 3216, 0, 2048, - 3072, 3200, 3216, 3218, 0, 2048, 3072, 3200, - 3216, 0, 2048, 3072, 3200, 3216, 3220, 0, - 2048, 3072, 3200, 3216, 3220, 0, 2048, 3072, - 3200, 3216, 3224, 3222, 0, 2048, 3072, 3200, - 3216, 0, 2048, 3072, 3200, 3232, 3224, 0, - 2048, 3072, 3200, 3232, 3224, 0, 2048, 3072, - 3200, 3232, 3224, 3226, 0, 2048, 3072, 3200, - 3232, 3224, 0, 2048, 3072, 3200, 3232, 3233, - 3228, 0, 2048, 3072, 3200, 3232, 3233, 3228, - 0, 2048, 3072, 3200, 3232, 3233, 3228, 3230, - 0, 2048, 3072, 3200, 0, 2048, 3072, 3200, - 3232, 0, 2048, 3072, 3200, 3232, 0, 2048, - 3072, 3200, 3232, 3234, 0, 2048, 3072, 3200, - 3232, 0, 2048, 3072, 3200, 3232, 3236, 0, - 2048, 3072, 3200, 3232, 3236, 0, 2048, 3072, - 3200, 3232, 3240, 3238, 0, 2048, 3072, 3200, - 3232, 0, 2048, 3072, 3200, 3232, 3240, 0, - 2048, 3072, 3200, 3232, 3240, 0, 2048, 3072, - 3200, 3232, 3240, 3242, 0, 2048, 3072, 3200, - 3232, 3240, 0, 2048, 3072, 3200, 3232, 3248, - 3244, 0, 2048, 3072, 3200, 3232, 3248, 3244, - 0, 2048, 3072, 3200, 3232, 3248, 3249, 3246, - 0, 2048, 3072, 3200, 3232, 0, 2048, 3072, - 3200, 3264, 3248, 0, 2048, 3072, 3200, 3264, - 3248, 0, 2048, 3072, 3200, 3264, 3248, 3250, - 0, 2048, 3072, 3200, 3264, 3248, 0, 2048, - 3072, 3200, 3264, 3248, 3252, 0, 2048, 3072, - 3200, 3264, 3248, 3252, 0, 2048, 3072, 3200, - 3264, 3248, 3256, 3254, 0, 2048, 3072, 3200, - 3264, 3248, 0, 2048, 3072, 3200, 3264, 3265, - 3256, 0, 2048, 3072, 3200, 3264, 3265, 3256, - 0, 2048, 3072, 3200, 3264, 3265, 3256, 3258, - 0, 2048, 3072, 3200, 3264, 3265, 3256, 0, - 2048, 3072, 3200, 3264, 3265, 3256, 3260, 0, - 2048, 3072, 3200, 3264, 3265, 3267, 3260, 0, - 2048, 3072, 3200, 3264, 3265, 3267, 3260, 3262, - 0, 2048, 3072, 3200, 0, 2048, 3072, 3328, - 3264, 0, 2048, 3072, 3328, 3264, 0, 2048, - 3072, 3328, 3264, 3266, 0, 2048, 3072, 3328, - 3264, 0, 2048, 3072, 3328, 3264, 3268, 0, - 2048, 3072, 3328, 3264, 3268, 0, 2048, 3072, - 3328, 3264, 3272, 3270, 0, 2048, 3072, 3328, - 3264, 0, 2048, 3072, 3328, 3264, 3272, 0, - 2048, 3072, 3328, 3264, 3272, 0, 2048, 3072, - 3328, 3264, 3272, 3274, 0, 2048, 3072, 3328, - 3264, 3272, 0, 2048, 3072, 3328, 3264, 3280, - 3276, 0, 2048, 3072, 3328, 3264, 3280, 3276, - 0, 2048, 3072, 3328, 3264, 3280, 3281, 3278, - 0, 2048, 3072, 3328, 3264, 0, 2048, 3072, - 3328, 3264, 3280, 0, 2048, 3072, 3328, 3264, - 3280, 0, 2048, 3072, 3328, 3264, 3280, 3282, - 0, 2048, 3072, 3328, 3264, 3280, 0, 2048, - 3072, 3328, 3264, 3280, 3284, 0, 2048, 3072, - 3328, 3264, 3280, 3284, 0, 2048, 3072, 3328, - 3264, 3280, 3288, 3286, 0, 2048, 3072, 3328, - 3264, 3280, 0, 2048, 3072, 3328, 3264, 3296, - 3288, 0, 2048, 3072, 3328, 3264, 3296, 3288, - 0, 2048, 3072, 3328, 3264, 3296, 3288, 3290, - 0, 2048, 3072, 3328, 3264, 3296, 3288, 0, - 2048, 3072, 3328, 3264, 3296, 3297, 3292, 0, - 2048, 3072, 3328, 3264, 3296, 3297, 3292, 0, - 2048, 3072, 3328, 3264, 3296, 3297, 3292, 3294, - 0, 2048, 3072, 3328, 3264, 0, 2048, 3072, - 3328, 3329, 3296, 0, 2048, 3072, 3328, 3329, - 3296, 0, 2048, 3072, 3328, 3329, 3296, 3298, - 0, 2048, 3072, 3328, 3329, 3296, 0, 2048, - 3072, 3328, 3329, 3296, 3300, 0, 2048, 3072, - 3328, 3329, 3296, 3300, 0, 2048, 3072, 3328, - 3329, 3296, 3304, 3302, 0, 2048, 3072, 3328, - 3329, 3296, 0, 2048, 3072, 3328, 3329, 3296, - 3304, 0, 2048, 3072, 3328, 3329, 3296, 3304, - 0, 2048, 3072, 3328, 3329, 3296, 3304, 3306, - 0, 2048, 3072, 3328, 3329, 3296, 3304, 0, - 2048, 3072, 3328, 3329, 3296, 3312, 3308, 0, - 2048, 3072, 3328, 3329, 3296, 3312, 3308, 0, - 2048, 3072, 3328, 3329, 3296, 3312, 3313, 3310, - 0, 2048, 3072, 3328, 3329, 3296, 0, 2048, - 3072, 3328, 3329, 3296, 3312, 0, 2048, 3072, - 3328, 3329, 3331, 3312, 0, 2048, 3072, 3328, - 3329, 3331, 3312, 3314, 0, 2048, 3072, 3328, - 3329, 3331, 3312, 0, 2048, 3072, 3328, 3329, - 3331, 3312, 3316, 0, 2048, 3072, 3328, 3329, - 3331, 3312, 3316, 0, 2048, 3072, 3328, 3329, - 3331, 3312, 3320, 3318, 0, 2048, 3072, 3328, - 3329, 3331, 3312, 0, 2048, 3072, 3328, 3329, - 3331, 3312, 3320, 0, 2048, 3072, 3328, 3329, - 3331, 3312, 3320, 0, 2048, 3072, 3328, 3329, - 3331, 3312, 3320, 3322, 0, 2048, 3072, 3328, - 3329, 3331, 3335, 3320, 0, 2048, 3072, 3328, - 3329, 3331, 3335, 3320, 3324, 0, 2048, 3072, - 3328, 3329, 3331, 3335, 3320, 3324, 0, 2048, - 3072, 3328, 3329, 3331, 3335, 3320, 3324, 3326, - 0, 2048, 3072, 0, 4096, 3072, 3328, 0, - 4096, 3072, 3328, 0, 4096, 3072, 3328, 3330, - 0, 4096, 3072, 3328, 0, 4096, 3072, 3328, - 3332, 0, 4096, 3072, 3328, 3332, 0, 4096, - 3072, 3328, 3336, 3334, 0, 4096, 3072, 3328, - 0, 4096, 3072, 3328, 3336, 0, 4096, 3072, - 3328, 3336, 0, 4096, 3072, 3328, 3336, 3338, - 0, 4096, 3072, 3328, 3336, 0, 4096, 3072, - 3328, 3344, 3340, 0, 4096, 3072, 3328, 3344, - 3340, 0, 4096, 3072, 3328, 3344, 3345, 3342, - 0, 4096, 3072, 3328, 0, 4096, 3072, 3328, - 3344, 0, 4096, 3072, 3328, 3344, 0, 4096, - 3072, 3328, 3344, 3346, 0, 4096, 3072, 3328, - 3344, 0, 4096, 3072, 3328, 3344, 3348, 0, - 4096, 3072, 3328, 3344, 3348, 0, 4096, 3072, - 3328, 3344, 3352, 3350, 0, 4096, 3072, 3328, - 3344, 0, 4096, 3072, 3328, 3360, 3352, 0, - 4096, 3072, 3328, 3360, 3352, 0, 4096, 3072, - 3328, 3360, 3352, 3354, 0, 4096, 3072, 3328, - 3360, 3352, 0, 4096, 3072, 3328, 3360, 3361, - 3356, 0, 4096, 3072, 3328, 3360, 3361, 3356, - 0, 4096, 3072, 3328, 3360, 3361, 3356, 3358, - 0, 4096, 3072, 3328, 0, 4096, 3072, 3328, - 3360, 0, 4096, 3072, 3328, 3360, 0, 4096, - 3072, 3328, 3360, 3362, 0, 4096, 3072, 3328, - 3360, 0, 4096, 3072, 3328, 3360, 3364, 0, - 4096, 3072, 3328, 3360, 3364, 0, 4096, 3072, - 3328, 3360, 3368, 3366, 0, 4096, 3072, 3328, - 3360, 0, 4096, 3072, 3328, 3360, 3368, 0, - 4096, 3072, 3328, 3360, 3368, 0, 4096, 3072, - 3328, 3360, 3368, 3370, 0, 4096, 3072, 3328, - 3360, 3368, 0, 4096, 3072, 3328, 3360, 3376, - 3372, 0, 4096, 3072, 3328, 3360, 3376, 3372, - 0, 4096, 3072, 3328, 3360, 3376, 3377, 3374, - 0, 4096, 3072, 3328, 3360, 0, 4096, 3072, - 3328, 3392, 3376, 0, 4096, 3072, 3328, 3392, - 3376, 0, 4096, 3072, 3328, 3392, 3376, 3378, - 0, 4096, 3072, 3328, 3392, 3376, 0, 4096, - 3072, 3328, 3392, 3376, 3380, 0, 4096, 3072, - 3328, 3392, 3376, 3380, 0, 4096, 3072, 3328, - 3392, 3376, 3384, 3382, 0, 4096, 3072, 3328, - 3392, 3376, 0, 4096, 3072, 3328, 3392, 3393, - 3384, 0, 4096, 3072, 3328, 3392, 3393, 3384, - 0, 4096, 3072, 3328, 3392, 3393, 3384, 3386, - 0, 4096, 3072, 3328, 3392, 3393, 3384, 0, - 4096, 3072, 3328, 3392, 3393, 3384, 3388, 0, - 4096, 3072, 3328, 3392, 3393, 3395, 3388, 0, - 4096, 3072, 3328, 3392, 3393, 3395, 3388, 3390, - 0, 4096, 3072, 3328, 0, 4096, 3072, 3328, - 3392, 0, 4096, 3072, 3328, 3392, 0, 4096, - 3072, 3328, 3392, 3394, 0, 4096, 3072, 3328, - 3392, 0, 4096, 3072, 3328, 3392, 3396, 0, - 4096, 3072, 3328, 3392, 3396, 0, 4096, 3072, - 3328, 3392, 3400, 3398, 0, 4096, 3072, 3328, - 3392, 0, 4096, 3072, 3328, 3392, 3400, 0, - 4096, 3072, 3328, 3392, 3400, 0, 4096, 3072, - 3328, 3392, 3400, 3402, 0, 4096, 3072, 3328, - 3392, 3400, 0, 4096, 3072, 3328, 3392, 3408, - 3404, 0, 4096, 3072, 3328, 3392, 3408, 3404, - 0, 4096, 3072, 3328, 3392, 3408, 3409, 3406, - 0, 4096, 3072, 3328, 3392, 0, 4096, 3072, - 3328, 3392, 3408, 0, 4096, 3072, 3328, 3392, - 3408, 0, 4096, 3072, 3328, 3392, 3408, 3410, - 0, 4096, 3072, 3328, 3392, 3408, 0, 4096, - 3072, 3328, 3392, 3408, 3412, 0, 4096, 3072, - 3328, 3392, 3408, 3412, 0, 4096, 3072, 3328, - 3392, 3408, 3416, 3414, 0, 4096, 3072, 3328, - 3392, 3408, 0, 4096, 3072, 3328, 3392, 3424, - 3416, 0, 4096, 3072, 3328, 3392, 3424, 3416, - 0, 4096, 3072, 3328, 3392, 3424, 3416, 3418, - 0, 4096, 3072, 3328, 3392, 3424, 3416, 0, - 4096, 3072, 3328, 3392, 3424, 3425, 3420, 0, - 4096, 3072, 3328, 3392, 3424, 3425, 3420, 0, - 4096, 3072, 3328, 3392, 3424, 3425, 3420, 3422, - 0, 4096, 3072, 3328, 3392, 0, 4096, 3072, - 3328, 3456, 3424, 0, 4096, 3072, 3328, 3456, - 3424, 0, 4096, 3072, 3328, 3456, 3424, 3426, - 0, 4096, 3072, 3328, 3456, 3424, 0, 4096, - 3072, 3328, 3456, 3424, 3428, 0, 4096, 3072, - 3328, 3456, 3424, 3428, 0, 4096, 3072, 3328, - 3456, 3424, 3432, 3430, 0, 4096, 3072, 3328, - 3456, 3424, 0, 4096, 3072, 3328, 3456, 3424, - 3432, 0, 4096, 3072, 3328, 3456, 3424, 3432, - 0, 4096, 3072, 3328, 3456, 3424, 3432, 3434, - 0, 4096, 3072, 3328, 3456, 3424, 3432, 0, - 4096, 3072, 3328, 3456, 3424, 3440, 3436, 0, - 4096, 3072, 3328, 3456, 3424, 3440, 3436, 0, - 4096, 3072, 3328, 3456, 3424, 3440, 3441, 3438, - 0, 4096, 3072, 3328, 3456, 3424, 0, 4096, - 3072, 3328, 3456, 3457, 3440, 0, 4096, 3072, - 3328, 3456, 3457, 3440, 0, 4096, 3072, 3328, - 3456, 3457, 3440, 3442, 0, 4096, 3072, 3328, - 3456, 3457, 3440, 0, 4096, 3072, 3328, 3456, - 3457, 3440, 3444, 0, 4096, 3072, 3328, 3456, - 3457, 3440, 3444, 0, 4096, 3072, 3328, 3456, - 3457, 3440, 3448, 3446, 0, 4096, 3072, 3328, - 3456, 3457, 3440, 0, 4096, 3072, 3328, 3456, - 3457, 3440, 3448, 0, 4096, 3072, 3328, 3456, - 3457, 3459, 3448, 0, 4096, 3072, 3328, 3456, - 3457, 3459, 3448, 3450, 0, 4096, 3072, 3328, - 3456, 3457, 3459, 3448, 0, 4096, 3072, 3328, - 3456, 3457, 3459, 3448, 3452, 0, 4096, 3072, - 3328, 3456, 3457, 3459, 3448, 3452, 0, 4096, - 3072, 3328, 3456, 3457, 3459, 3448, 3452, 3454, - 0, 4096, 3072, 3328, 0, 4096, 3072, 3584, - 3456, 0, 4096, 3072, 3584, 3456, 0, 4096, - 3072, 3584, 3456, 3458, 0, 4096, 3072, 3584, - 3456, 0, 4096, 3072, 3584, 3456, 3460, 0, - 4096, 3072, 3584, 3456, 3460, 0, 4096, 3072, - 3584, 3456, 3464, 3462, 0, 4096, 3072, 3584, - 3456, 0, 4096, 3072, 3584, 3456, 3464, 0, - 4096, 3072, 3584, 3456, 3464, 0, 4096, 3072, - 3584, 3456, 3464, 3466, 0, 4096, 3072, 3584, - 3456, 3464, 0, 4096, 3072, 3584, 3456, 3472, - 3468, 0, 4096, 3072, 3584, 3456, 3472, 3468, - 0, 4096, 3072, 3584, 3456, 3472, 3473, 3470, - 0, 4096, 3072, 3584, 3456, 0, 4096, 3072, - 3584, 3456, 3472, 0, 4096, 3072, 3584, 3456, - 3472, 0, 4096, 3072, 3584, 3456, 3472, 3474, - 0, 4096, 3072, 3584, 3456, 3472, 0, 4096, - 3072, 3584, 3456, 3472, 3476, 0, 4096, 3072, - 3584, 3456, 3472, 3476, 0, 4096, 3072, 3584, - 3456, 3472, 3480, 3478, 0, 4096, 3072, 3584, - 3456, 3472, 0, 4096, 3072, 3584, 3456, 3488, - 3480, 0, 4096, 3072, 3584, 3456, 3488, 3480, - 0, 4096, 3072, 3584, 3456, 3488, 3480, 3482, - 0, 4096, 3072, 3584, 3456, 3488, 3480, 0, - 4096, 3072, 3584, 3456, 3488, 3489, 3484, 0, - 4096, 3072, 3584, 3456, 3488, 3489, 3484, 0, - 4096, 3072, 3584, 3456, 3488, 3489, 3484, 3486, - 0, 4096, 3072, 3584, 3456, 0, 4096, 3072, - 3584, 3456, 3488, 0, 4096, 3072, 3584, 3456, - 3488, 0, 4096, 3072, 3584, 3456, 3488, 3490, - 0, 4096, 3072, 3584, 3456, 3488, 0, 4096, - 3072, 3584, 3456, 3488, 3492, 0, 4096, 3072, - 3584, 3456, 3488, 3492, 0, 4096, 3072, 3584, - 3456, 3488, 3496, 3494, 0, 4096, 3072, 3584, - 3456, 3488, 0, 4096, 3072, 3584, 3456, 3488, - 3496, 0, 4096, 3072, 3584, 3456, 3488, 3496, - 0, 4096, 3072, 3584, 3456, 3488, 3496, 3498, - 0, 4096, 3072, 3584, 3456, 3488, 3496, 0, - 4096, 3072, 3584, 3456, 3488, 3504, 3500, 0, - 4096, 3072, 3584, 3456, 3488, 3504, 3500, 0, - 4096, 3072, 3584, 3456, 3488, 3504, 3505, 3502, - 0, 4096, 3072, 3584, 3456, 3488, 0, 4096, - 3072, 3584, 3456, 3520, 3504, 0, 4096, 3072, - 3584, 3456, 3520, 3504, 0, 4096, 3072, 3584, - 3456, 3520, 3504, 3506, 0, 4096, 3072, 3584, - 3456, 3520, 3504, 0, 4096, 3072, 3584, 3456, - 3520, 3504, 3508, 0, 4096, 3072, 3584, 3456, - 3520, 3504, 3508, 0, 4096, 3072, 3584, 3456, - 3520, 3504, 3512, 3510, 0, 4096, 3072, 3584, - 3456, 3520, 3504, 0, 4096, 3072, 3584, 3456, - 3520, 3521, 3512, 0, 4096, 3072, 3584, 3456, - 3520, 3521, 3512, 0, 4096, 3072, 3584, 3456, - 3520, 3521, 3512, 3514, 0, 4096, 3072, 3584, - 3456, 3520, 3521, 3512, 0, 4096, 3072, 3584, - 3456, 3520, 3521, 3512, 3516, 0, 4096, 3072, - 3584, 3456, 3520, 3521, 3523, 3516, 0, 4096, - 3072, 3584, 3456, 3520, 3521, 3523, 3516, 3518, - 0, 4096, 3072, 3584, 3456, 0, 4096, 3072, - 3584, 3585, 3520, 0, 4096, 3072, 3584, 3585, - 3520, 0, 4096, 3072, 3584, 3585, 3520, 3522, - 0, 4096, 3072, 3584, 3585, 3520, 0, 4096, - 3072, 3584, 3585, 3520, 3524, 0, 4096, 3072, - 3584, 3585, 3520, 3524, 0, 4096, 3072, 3584, - 3585, 3520, 3528, 3526, 0, 4096, 3072, 3584, - 3585, 3520, 0, 4096, 3072, 3584, 3585, 3520, - 3528, 0, 4096, 3072, 3584, 3585, 3520, 3528, - 0, 4096, 3072, 3584, 3585, 3520, 3528, 3530, - 0, 4096, 3072, 3584, 3585, 3520, 3528, 0, - 4096, 3072, 3584, 3585, 3520, 3536, 3532, 0, - 4096, 3072, 3584, 3585, 3520, 3536, 3532, 0, - 4096, 3072, 3584, 3585, 3520, 3536, 3537, 3534, - 0, 4096, 3072, 3584, 3585, 3520, 0, 4096, - 3072, 3584, 3585, 3520, 3536, 0, 4096, 3072, - 3584, 3585, 3520, 3536, 0, 4096, 3072, 3584, - 3585, 3520, 3536, 3538, 0, 4096, 3072, 3584, - 3585, 3520, 3536, 0, 4096, 3072, 3584, 3585, - 3520, 3536, 3540, 0, 4096, 3072, 3584, 3585, - 3520, 3536, 3540, 0, 4096, 3072, 3584, 3585, - 3520, 3536, 3544, 3542, 0, 4096, 3072, 3584, - 3585, 3520, 3536, 0, 4096, 3072, 3584, 3585, - 3520, 3552, 3544, 0, 4096, 3072, 3584, 3585, - 3520, 3552, 3544, 0, 4096, 3072, 3584, 3585, - 3520, 3552, 3544, 3546, 0, 4096, 3072, 3584, - 3585, 3520, 3552, 3544, 0, 4096, 3072, 3584, - 3585, 3520, 3552, 3553, 3548, 0, 4096, 3072, - 3584, 3585, 3520, 3552, 3553, 3548, 0, 4096, - 3072, 3584, 3585, 3520, 3552, 3553, 3548, 3550, - 0, 4096, 3072, 3584, 3585, 3520, 0, 4096, - 3072, 3584, 3585, 3520, 3552, 0, 4096, 3072, - 3584, 3585, 3587, 3552, 0, 4096, 3072, 3584, - 3585, 3587, 3552, 3554, 0, 4096, 3072, 3584, - 3585, 3587, 3552, 0, 4096, 3072, 3584, 3585, - 3587, 3552, 3556, 0, 4096, 3072, 3584, 3585, - 3587, 3552, 3556, 0, 4096, 3072, 3584, 3585, - 3587, 3552, 3560, 3558, 0, 4096, 3072, 3584, - 3585, 3587, 3552, 0, 4096, 3072, 3584, 3585, - 3587, 3552, 3560, 0, 4096, 3072, 3584, 3585, - 3587, 3552, 3560, 0, 4096, 3072, 3584, 3585, - 3587, 3552, 3560, 3562, 0, 4096, 3072, 3584, - 3585, 3587, 3552, 3560, 0, 4096, 3072, 3584, - 3585, 3587, 3552, 3568, 3564, 0, 4096, 3072, - 3584, 3585, 3587, 3552, 3568, 3564, 0, 4096, - 3072, 3584, 3585, 3587, 3552, 3568, 3569, 3566, - 0, 4096, 3072, 3584, 3585, 3587, 3552, 0, - 4096, 3072, 3584, 3585, 3587, 3552, 3568, 0, - 4096, 3072, 3584, 3585, 3587, 3552, 3568, 0, - 4096, 3072, 3584, 3585, 3587, 3552, 3568, 3570, - 0, 4096, 3072, 3584, 3585, 3587, 3591, 3568, - 0, 4096, 3072, 3584, 3585, 3587, 3591, 3568, - 3572, 0, 4096, 3072, 3584, 3585, 3587, 3591, - 3568, 3572, 0, 4096, 3072, 3584, 3585, 3587, - 3591, 3568, 3576, 3574, 0, 4096, 3072, 3584, - 3585, 3587, 3591, 3568, 0, 4096, 3072, 3584, - 3585, 3587, 3591, 3568, 3576, 0, 4096, 3072, - 3584, 3585, 3587, 3591, 3568, 3576, 0, 4096, - 3072, 3584, 3585, 3587, 3591, 3568, 3576, 3578, - 0, 4096, 3072, 3584, 3585, 3587, 3591, 3568, - 3576, 0, 4096, 3072, 3584, 3585, 3587, 3591, - 3568, 3576, 3580, 0, 4096, 3072, 3584, 3585, - 3587, 3591, 3568, 3576, 3580, 0, 4096, 3072, - 3584, 3585, 3587, 3591, 3568, 3576, 3580, 3582, - 0, 4096, 3072, 0, 4096, 3072, 3584, 0, - 4096, 4097, 3584, 0, 4096, 4097, 3584, 3586, - 0, 4096, 4097, 3584, 0, 4096, 4097, 3584, - 3588, 0, 4096, 4097, 3584, 3588, 0, 4096, - 4097, 3584, 3592, 3590, 0, 4096, 4097, 3584, - 0, 4096, 4097, 3584, 3592, 0, 4096, 4097, - 3584, 3592, 0, 4096, 4097, 3584, 3592, 3594, - 0, 4096, 4097, 3584, 3592, 0, 4096, 4097, - 3584, 3600, 3596, 0, 4096, 4097, 3584, 3600, - 3596, 0, 4096, 4097, 3584, 3600, 3601, 3598, - 0, 4096, 4097, 3584, 0, 4096, 4097, 3584, - 3600, 0, 4096, 4097, 3584, 3600, 0, 4096, - 4097, 3584, 3600, 3602, 0, 4096, 4097, 3584, - 3600, 0, 4096, 4097, 3584, 3600, 3604, 0, - 4096, 4097, 3584, 3600, 3604, 0, 4096, 4097, - 3584, 3600, 3608, 3606, 0, 4096, 4097, 3584, - 3600, 0, 4096, 4097, 3584, 3616, 3608, 0, - 4096, 4097, 3584, 3616, 3608, 0, 4096, 4097, - 3584, 3616, 3608, 3610, 0, 4096, 4097, 3584, - 3616, 3608, 0, 4096, 4097, 3584, 3616, 3617, - 3612, 0, 4096, 4097, 3584, 3616, 3617, 3612, - 0, 4096, 4097, 3584, 3616, 3617, 3612, 3614, - 0, 4096, 4097, 3584, 0, 4096, 4097, 3584, - 3616, 0, 4096, 4097, 3584, 3616, 0, 4096, - 4097, 3584, 3616, 3618, 0, 4096, 4097, 3584, - 3616, 0, 4096, 4097, 3584, 3616, 3620, 0, - 4096, 4097, 3584, 3616, 3620, 0, 4096, 4097, - 3584, 3616, 3624, 3622, 0, 4096, 4097, 3584, - 3616, 0, 4096, 4097, 3584, 3616, 3624, 0, - 4096, 4097, 3584, 3616, 3624, 0, 4096, 4097, - 3584, 3616, 3624, 3626, 0, 4096, 4097, 3584, - 3616, 3624, 0, 4096, 4097, 3584, 3616, 3632, - 3628, 0, 4096, 4097, 3584, 3616, 3632, 3628, - 0, 4096, 4097, 3584, 3616, 3632, 3633, 3630, - 0, 4096, 4097, 3584, 3616, 0, 4096, 4097, - 3584, 3648, 3632, 0, 4096, 4097, 3584, 3648, - 3632, 0, 4096, 4097, 3584, 3648, 3632, 3634, - 0, 4096, 4097, 3584, 3648, 3632, 0, 4096, - 4097, 3584, 3648, 3632, 3636, 0, 4096, 4097, - 3584, 3648, 3632, 3636, 0, 4096, 4097, 3584, - 3648, 3632, 3640, 3638, 0, 4096, 4097, 3584, - 3648, 3632, 0, 4096, 4097, 3584, 3648, 3649, - 3640, 0, 4096, 4097, 3584, 3648, 3649, 3640, - 0, 4096, 4097, 3584, 3648, 3649, 3640, 3642, - 0, 4096, 4097, 3584, 3648, 3649, 3640, 0, - 4096, 4097, 3584, 3648, 3649, 3640, 3644, 0, - 4096, 4097, 3584, 3648, 3649, 3651, 3644, 0, - 4096, 4097, 3584, 3648, 3649, 3651, 3644, 3646, - 0, 4096, 4097, 3584, 0, 4096, 4097, 3584, - 3648, 0, 4096, 4097, 3584, 3648, 0, 4096, - 4097, 3584, 3648, 3650, 0, 4096, 4097, 3584, - 3648, 0, 4096, 4097, 3584, 3648, 3652, 0, - 4096, 4097, 3584, 3648, 3652, 0, 4096, 4097, - 3584, 3648, 3656, 3654, 0, 4096, 4097, 3584, - 3648, 0, 4096, 4097, 3584, 3648, 3656, 0, - 4096, 4097, 3584, 3648, 3656, 0, 4096, 4097, - 3584, 3648, 3656, 3658, 0, 4096, 4097, 3584, - 3648, 3656, 0, 4096, 4097, 3584, 3648, 3664, - 3660, 0, 4096, 4097, 3584, 3648, 3664, 3660, - 0, 4096, 4097, 3584, 3648, 3664, 3665, 3662, - 0, 4096, 4097, 3584, 3648, 0, 4096, 4097, - 3584, 3648, 3664, 0, 4096, 4097, 3584, 3648, - 3664, 0, 4096, 4097, 3584, 3648, 3664, 3666, - 0, 4096, 4097, 3584, 3648, 3664, 0, 4096, - 4097, 3584, 3648, 3664, 3668, 0, 4096, 4097, - 3584, 3648, 3664, 3668, 0, 4096, 4097, 3584, - 3648, 3664, 3672, 3670, 0, 4096, 4097, 3584, - 3648, 3664, 0, 4096, 4097, 3584, 3648, 3680, - 3672, 0, 4096, 4097, 3584, 3648, 3680, 3672, - 0, 4096, 4097, 3584, 3648, 3680, 3672, 3674, - 0, 4096, 4097, 3584, 3648, 3680, 3672, 0, - 4096, 4097, 3584, 3648, 3680, 3681, 3676, 0, - 4096, 4097, 3584, 3648, 3680, 3681, 3676, 0, - 4096, 4097, 3584, 3648, 3680, 3681, 3676, 3678, - 0, 4096, 4097, 3584, 3648, 0, 4096, 4097, - 3584, 3712, 3680, 0, 4096, 4097, 3584, 3712, - 3680, 0, 4096, 4097, 3584, 3712, 3680, 3682, - 0, 4096, 4097, 3584, 3712, 3680, 0, 4096, - 4097, 3584, 3712, 3680, 3684, 0, 4096, 4097, - 3584, 3712, 3680, 3684, 0, 4096, 4097, 3584, - 3712, 3680, 3688, 3686, 0, 4096, 4097, 3584, - 3712, 3680, 0, 4096, 4097, 3584, 3712, 3680, - 3688, 0, 4096, 4097, 3584, 3712, 3680, 3688, - 0, 4096, 4097, 3584, 3712, 3680, 3688, 3690, - 0, 4096, 4097, 3584, 3712, 3680, 3688, 0, - 4096, 4097, 3584, 3712, 3680, 3696, 3692, 0, - 4096, 4097, 3584, 3712, 3680, 3696, 3692, 0, - 4096, 4097, 3584, 3712, 3680, 3696, 3697, 3694, - 0, 4096, 4097, 3584, 3712, 3680, 0, 4096, - 4097, 3584, 3712, 3713, 3696, 0, 4096, 4097, - 3584, 3712, 3713, 3696, 0, 4096, 4097, 3584, - 3712, 3713, 3696, 3698, 0, 4096, 4097, 3584, - 3712, 3713, 3696, 0, 4096, 4097, 3584, 3712, - 3713, 3696, 3700, 0, 4096, 4097, 3584, 3712, - 3713, 3696, 3700, 0, 4096, 4097, 3584, 3712, - 3713, 3696, 3704, 3702, 0, 4096, 4097, 3584, - 3712, 3713, 3696, 0, 4096, 4097, 3584, 3712, - 3713, 3696, 3704, 0, 4096, 4097, 3584, 3712, - 3713, 3715, 3704, 0, 4096, 4097, 3584, 3712, - 3713, 3715, 3704, 3706, 0, 4096, 4097, 3584, - 3712, 3713, 3715, 3704, 0, 4096, 4097, 3584, - 3712, 3713, 3715, 3704, 3708, 0, 4096, 4097, - 3584, 3712, 3713, 3715, 3704, 3708, 0, 4096, - 4097, 3584, 3712, 3713, 3715, 3704, 3708, 3710, - 0, 4096, 4097, 3584, 0, 4096, 4097, 3584, - 3712, 0, 4096, 4097, 3584, 3712, 0, 4096, - 4097, 3584, 3712, 3714, 0, 4096, 4097, 3584, - 3712, 0, 4096, 4097, 3584, 3712, 3716, 0, - 4096, 4097, 3584, 3712, 3716, 0, 4096, 4097, - 3584, 3712, 3720, 3718, 0, 4096, 4097, 3584, - 3712, 0, 4096, 4097, 3584, 3712, 3720, 0, - 4096, 4097, 3584, 3712, 3720, 0, 4096, 4097, - 3584, 3712, 3720, 3722, 0, 4096, 4097, 3584, - 3712, 3720, 0, 4096, 4097, 3584, 3712, 3728, - 3724, 0, 4096, 4097, 3584, 3712, 3728, 3724, - 0, 4096, 4097, 3584, 3712, 3728, 3729, 3726, - 0, 4096, 4097, 3584, 3712, 0, 4096, 4097, - 3584, 3712, 3728, 0, 4096, 4097, 3584, 3712, - 3728, 0, 4096, 4097, 3584, 3712, 3728, 3730, - 0, 4096, 4097, 3584, 3712, 3728, 0, 4096, - 4097, 3584, 3712, 3728, 3732, 0, 4096, 4097, - 3584, 3712, 3728, 3732, 0, 4096, 4097, 3584, - 3712, 3728, 3736, 3734, 0, 4096, 4097, 3584, - 3712, 3728, 0, 4096, 4097, 3584, 3712, 3744, - 3736, 0, 4096, 4097, 3584, 3712, 3744, 3736, - 0, 4096, 4097, 3584, 3712, 3744, 3736, 3738, - 0, 4096, 4097, 3584, 3712, 3744, 3736, 0, - 4096, 4097, 3584, 3712, 3744, 3745, 3740, 0, - 4096, 4097, 3584, 3712, 3744, 3745, 3740, 0, - 4096, 4097, 3584, 3712, 3744, 3745, 3740, 3742, - 0, 4096, 4097, 3584, 3712, 0, 4096, 4097, - 3584, 3712, 3744, 0, 4096, 4097, 3584, 3712, - 3744, 0, 4096, 4097, 3584, 3712, 3744, 3746, - 0, 4096, 4097, 3584, 3712, 3744, 0, 4096, - 4097, 3584, 3712, 3744, 3748, 0, 4096, 4097, - 3584, 3712, 3744, 3748, 0, 4096, 4097, 3584, - 3712, 3744, 3752, 3750, 0, 4096, 4097, 3584, - 3712, 3744, 0, 4096, 4097, 3584, 3712, 3744, - 3752, 0, 4096, 4097, 3584, 3712, 3744, 3752, - 0, 4096, 4097, 3584, 3712, 3744, 3752, 3754, - 0, 4096, 4097, 3584, 3712, 3744, 3752, 0, - 4096, 4097, 3584, 3712, 3744, 3760, 3756, 0, - 4096, 4097, 3584, 3712, 3744, 3760, 3756, 0, - 4096, 4097, 3584, 3712, 3744, 3760, 3761, 3758, - 0, 4096, 4097, 3584, 3712, 3744, 0, 4096, - 4097, 3584, 3712, 3776, 3760, 0, 4096, 4097, - 3584, 3712, 3776, 3760, 0, 4096, 4097, 3584, - 3712, 3776, 3760, 3762, 0, 4096, 4097, 3584, - 3712, 3776, 3760, 0, 4096, 4097, 3584, 3712, - 3776, 3760, 3764, 0, 4096, 4097, 3584, 3712, - 3776, 3760, 3764, 0, 4096, 4097, 3584, 3712, - 3776, 3760, 3768, 3766, 0, 4096, 4097, 3584, - 3712, 3776, 3760, 0, 4096, 4097, 3584, 3712, - 3776, 3777, 3768, 0, 4096, 4097, 3584, 3712, - 3776, 3777, 3768, 0, 4096, 4097, 3584, 3712, - 3776, 3777, 3768, 3770, 0, 4096, 4097, 3584, - 3712, 3776, 3777, 3768, 0, 4096, 4097, 3584, - 3712, 3776, 3777, 3768, 3772, 0, 4096, 4097, - 3584, 3712, 3776, 3777, 3779, 3772, 0, 4096, - 4097, 3584, 3712, 3776, 3777, 3779, 3772, 3774, - 0, 4096, 4097, 3584, 3712, 0, 4096, 4097, - 3584, 3840, 3776, 0, 4096, 4097, 3584, 3840, - 3776, 0, 4096, 4097, 3584, 3840, 3776, 3778, - 0, 4096, 4097, 3584, 3840, 3776, 0, 4096, - 4097, 3584, 3840, 3776, 3780, 0, 4096, 4097, - 3584, 3840, 3776, 3780, 0, 4096, 4097, 3584, - 3840, 3776, 3784, 3782, 0, 4096, 4097, 3584, - 3840, 3776, 0, 4096, 4097, 3584, 3840, 3776, - 3784, 0, 4096, 4097, 3584, 3840, 3776, 3784, - 0, 4096, 4097, 3584, 3840, 3776, 3784, 3786, - 0, 4096, 4097, 3584, 3840, 3776, 3784, 0, - 4096, 4097, 3584, 3840, 3776, 3792, 3788, 0, - 4096, 4097, 3584, 3840, 3776, 3792, 3788, 0, - 4096, 4097, 3584, 3840, 3776, 3792, 3793, 3790, - 0, 4096, 4097, 3584, 3840, 3776, 0, 4096, - 4097, 3584, 3840, 3776, 3792, 0, 4096, 4097, - 3584, 3840, 3776, 3792, 0, 4096, 4097, 3584, - 3840, 3776, 3792, 3794, 0, 4096, 4097, 3584, - 3840, 3776, 3792, 0, 4096, 4097, 3584, 3840, - 3776, 3792, 3796, 0, 4096, 4097, 3584, 3840, - 3776, 3792, 3796, 0, 4096, 4097, 3584, 3840, - 3776, 3792, 3800, 3798, 0, 4096, 4097, 3584, - 3840, 3776, 3792, 0, 4096, 4097, 3584, 3840, - 3776, 3808, 3800, 0, 4096, 4097, 3584, 3840, - 3776, 3808, 3800, 0, 4096, 4097, 3584, 3840, - 3776, 3808, 3800, 3802, 0, 4096, 4097, 3584, - 3840, 3776, 3808, 3800, 0, 4096, 4097, 3584, - 3840, 3776, 3808, 3809, 3804, 0, 4096, 4097, - 3584, 3840, 3776, 3808, 3809, 3804, 0, 4096, - 4097, 3584, 3840, 3776, 3808, 3809, 3804, 3806, - 0, 4096, 4097, 3584, 3840, 3776, 0, 4096, - 4097, 3584, 3840, 3841, 3808, 0, 4096, 4097, - 3584, 3840, 3841, 3808, 0, 4096, 4097, 3584, - 3840, 3841, 3808, 3810, 0, 4096, 4097, 3584, - 3840, 3841, 3808, 0, 4096, 4097, 3584, 3840, - 3841, 3808, 3812, 0, 4096, 4097, 3584, 3840, - 3841, 3808, 3812, 0, 4096, 4097, 3584, 3840, - 3841, 3808, 3816, 3814, 0, 4096, 4097, 3584, - 3840, 3841, 3808, 0, 4096, 4097, 3584, 3840, - 3841, 3808, 3816, 0, 4096, 4097, 3584, 3840, - 3841, 3808, 3816, 0, 4096, 4097, 3584, 3840, - 3841, 3808, 3816, 3818, 0, 4096, 4097, 3584, - 3840, 3841, 3808, 3816, 0, 4096, 4097, 3584, - 3840, 3841, 3808, 3824, 3820, 0, 4096, 4097, - 3584, 3840, 3841, 3808, 3824, 3820, 0, 4096, - 4097, 3584, 3840, 3841, 3808, 3824, 3825, 3822, - 0, 4096, 4097, 3584, 3840, 3841, 3808, 0, - 4096, 4097, 3584, 3840, 3841, 3808, 3824, 0, - 4096, 4097, 3584, 3840, 3841, 3843, 3824, 0, - 4096, 4097, 3584, 3840, 3841, 3843, 3824, 3826, - 0, 4096, 4097, 3584, 3840, 3841, 3843, 3824, - 0, 4096, 4097, 3584, 3840, 3841, 3843, 3824, - 3828, 0, 4096, 4097, 3584, 3840, 3841, 3843, - 3824, 3828, 0, 4096, 4097, 3584, 3840, 3841, - 3843, 3824, 3832, 3830, 0, 4096, 4097, 3584, - 3840, 3841, 3843, 3824, 0, 4096, 4097, 3584, - 3840, 3841, 3843, 3824, 3832, 0, 4096, 4097, - 3584, 3840, 3841, 3843, 3824, 3832, 0, 4096, - 4097, 3584, 3840, 3841, 3843, 3824, 3832, 3834, - 0, 4096, 4097, 3584, 3840, 3841, 3843, 3847, - 3832, 0, 4096, 4097, 3584, 3840, 3841, 3843, - 3847, 3832, 3836, 0, 4096, 4097, 3584, 3840, - 3841, 3843, 3847, 3832, 3836, 0, 4096, 4097, - 3584, 3840, 3841, 3843, 3847, 3832, 3836, 3838, - 0, 4096, 4097, 3584, 0, 4096, 4097, 3584, - 3840, 0, 4096, 4097, 3584, 3840, 0, 4096, - 4097, 3584, 3840, 3842, 0, 4096, 4097, 4099, - 3840, 0, 4096, 4097, 4099, 3840, 3844, 0, - 4096, 4097, 4099, 3840, 3844, 0, 4096, 4097, - 4099, 3840, 3848, 3846, 0, 4096, 4097, 4099, - 3840, 0, 4096, 4097, 4099, 3840, 3848, 0, - 4096, 4097, 4099, 3840, 3848, 0, 4096, 4097, - 4099, 3840, 3848, 3850, 0, 4096, 4097, 4099, - 3840, 3848, 0, 4096, 4097, 4099, 3840, 3856, - 3852, 0, 4096, 4097, 4099, 3840, 3856, 3852, - 0, 4096, 4097, 4099, 3840, 3856, 3857, 3854, - 0, 4096, 4097, 4099, 3840, 0, 4096, 4097, - 4099, 3840, 3856, 0, 4096, 4097, 4099, 3840, - 3856, 0, 4096, 4097, 4099, 3840, 3856, 3858, - 0, 4096, 4097, 4099, 3840, 3856, 0, 4096, - 4097, 4099, 3840, 3856, 3860, 0, 4096, 4097, - 4099, 3840, 3856, 3860, 0, 4096, 4097, 4099, - 3840, 3856, 3864, 3862, 0, 4096, 4097, 4099, - 3840, 3856, 0, 4096, 4097, 4099, 3840, 3872, - 3864, 0, 4096, 4097, 4099, 3840, 3872, 3864, - 0, 4096, 4097, 4099, 3840, 3872, 3864, 3866, - 0, 4096, 4097, 4099, 3840, 3872, 3864, 0, - 4096, 4097, 4099, 3840, 3872, 3873, 3868, 0, - 4096, 4097, 4099, 3840, 3872, 3873, 3868, 0, - 4096, 4097, 4099, 3840, 3872, 3873, 3868, 3870, - 0, 4096, 4097, 4099, 3840, 0, 4096, 4097, - 4099, 3840, 3872, 0, 4096, 4097, 4099, 3840, - 3872, 0, 4096, 4097, 4099, 3840, 3872, 3874, - 0, 4096, 4097, 4099, 3840, 3872, 0, 4096, - 4097, 4099, 3840, 3872, 3876, 0, 4096, 4097, - 4099, 3840, 3872, 3876, 0, 4096, 4097, 4099, - 3840, 3872, 3880, 3878, 0, 4096, 4097, 4099, - 3840, 3872, 0, 4096, 4097, 4099, 3840, 3872, - 3880, 0, 4096, 4097, 4099, 3840, 3872, 3880, - 0, 4096, 4097, 4099, 3840, 3872, 3880, 3882, - 0, 4096, 4097, 4099, 3840, 3872, 3880, 0, - 4096, 4097, 4099, 3840, 3872, 3888, 3884, 0, - 4096, 4097, 4099, 3840, 3872, 3888, 3884, 0, - 4096, 4097, 4099, 3840, 3872, 3888, 3889, 3886, - 0, 4096, 4097, 4099, 3840, 3872, 0, 4096, - 4097, 4099, 3840, 3904, 3888, 0, 4096, 4097, - 4099, 3840, 3904, 3888, 0, 4096, 4097, 4099, - 3840, 3904, 3888, 3890, 0, 4096, 4097, 4099, - 3840, 3904, 3888, 0, 4096, 4097, 4099, 3840, - 3904, 3888, 3892, 0, 4096, 4097, 4099, 3840, - 3904, 3888, 3892, 0, 4096, 4097, 4099, 3840, - 3904, 3888, 3896, 3894, 0, 4096, 4097, 4099, - 3840, 3904, 3888, 0, 4096, 4097, 4099, 3840, - 3904, 3905, 3896, 0, 4096, 4097, 4099, 3840, - 3904, 3905, 3896, 0, 4096, 4097, 4099, 3840, - 3904, 3905, 3896, 3898, 0, 4096, 4097, 4099, - 3840, 3904, 3905, 3896, 0, 4096, 4097, 4099, - 3840, 3904, 3905, 3896, 3900, 0, 4096, 4097, - 4099, 3840, 3904, 3905, 3907, 3900, 0, 4096, - 4097, 4099, 3840, 3904, 3905, 3907, 3900, 3902, - 0, 4096, 4097, 4099, 3840, 0, 4096, 4097, - 4099, 3840, 3904, 0, 4096, 4097, 4099, 3840, - 3904, 0, 4096, 4097, 4099, 3840, 3904, 3906, - 0, 4096, 4097, 4099, 3840, 3904, 0, 4096, - 4097, 4099, 3840, 3904, 3908, 0, 4096, 4097, - 4099, 3840, 3904, 3908, 0, 4096, 4097, 4099, - 3840, 3904, 3912, 3910, 0, 4096, 4097, 4099, - 3840, 3904, 0, 4096, 4097, 4099, 3840, 3904, - 3912, 0, 4096, 4097, 4099, 3840, 3904, 3912, - 0, 4096, 4097, 4099, 3840, 3904, 3912, 3914, - 0, 4096, 4097, 4099, 3840, 3904, 3912, 0, - 4096, 4097, 4099, 3840, 3904, 3920, 3916, 0, - 4096, 4097, 4099, 3840, 3904, 3920, 3916, 0, - 4096, 4097, 4099, 3840, 3904, 3920, 3921, 3918, - 0, 4096, 4097, 4099, 3840, 3904, 0, 4096, - 4097, 4099, 3840, 3904, 3920, 0, 4096, 4097, - 4099, 3840, 3904, 3920, 0, 4096, 4097, 4099, - 3840, 3904, 3920, 3922, 0, 4096, 4097, 4099, - 3840, 3904, 3920, 0, 4096, 4097, 4099, 3840, - 3904, 3920, 3924, 0, 4096, 4097, 4099, 3840, - 3904, 3920, 3924, 0, 4096, 4097, 4099, 3840, - 3904, 3920, 3928, 3926, 0, 4096, 4097, 4099, - 3840, 3904, 3920, 0, 4096, 4097, 4099, 3840, - 3904, 3936, 3928, 0, 4096, 4097, 4099, 3840, - 3904, 3936, 3928, 0, 4096, 4097, 4099, 3840, - 3904, 3936, 3928, 3930, 0, 4096, 4097, 4099, - 3840, 3904, 3936, 3928, 0, 4096, 4097, 4099, - 3840, 3904, 3936, 3937, 3932, 0, 4096, 4097, - 4099, 3840, 3904, 3936, 3937, 3932, 0, 4096, - 4097, 4099, 3840, 3904, 3936, 3937, 3932, 3934, - 0, 4096, 4097, 4099, 3840, 3904, 0, 4096, - 4097, 4099, 3840, 3968, 3936, 0, 4096, 4097, - 4099, 3840, 3968, 3936, 0, 4096, 4097, 4099, - 3840, 3968, 3936, 3938, 0, 4096, 4097, 4099, - 3840, 3968, 3936, 0, 4096, 4097, 4099, 3840, - 3968, 3936, 3940, 0, 4096, 4097, 4099, 3840, - 3968, 3936, 3940, 0, 4096, 4097, 4099, 3840, - 3968, 3936, 3944, 3942, 0, 4096, 4097, 4099, - 3840, 3968, 3936, 0, 4096, 4097, 4099, 3840, - 3968, 3936, 3944, 0, 4096, 4097, 4099, 3840, - 3968, 3936, 3944, 0, 4096, 4097, 4099, 3840, - 3968, 3936, 3944, 3946, 0, 4096, 4097, 4099, - 3840, 3968, 3936, 3944, 0, 4096, 4097, 4099, - 3840, 3968, 3936, 3952, 3948, 0, 4096, 4097, - 4099, 3840, 3968, 3936, 3952, 3948, 0, 4096, - 4097, 4099, 3840, 3968, 3936, 3952, 3953, 3950, - 0, 4096, 4097, 4099, 3840, 3968, 3936, 0, - 4096, 4097, 4099, 3840, 3968, 3969, 3952, 0, - 4096, 4097, 4099, 3840, 3968, 3969, 3952, 0, - 4096, 4097, 4099, 3840, 3968, 3969, 3952, 3954, - 0, 4096, 4097, 4099, 3840, 3968, 3969, 3952, - 0, 4096, 4097, 4099, 3840, 3968, 3969, 3952, - 3956, 0, 4096, 4097, 4099, 3840, 3968, 3969, - 3952, 3956, 0, 4096, 4097, 4099, 3840, 3968, - 3969, 3952, 3960, 3958, 0, 4096, 4097, 4099, - 3840, 3968, 3969, 3952, 0, 4096, 4097, 4099, - 3840, 3968, 3969, 3952, 3960, 0, 4096, 4097, - 4099, 3840, 3968, 3969, 3971, 3960, 0, 4096, - 4097, 4099, 3840, 3968, 3969, 3971, 3960, 3962, - 0, 4096, 4097, 4099, 3840, 3968, 3969, 3971, - 3960, 0, 4096, 4097, 4099, 3840, 3968, 3969, - 3971, 3960, 3964, 0, 4096, 4097, 4099, 3840, - 3968, 3969, 3971, 3960, 3964, 0, 4096, 4097, - 4099, 3840, 3968, 3969, 3971, 3960, 3964, 3966, - 0, 4096, 4097, 4099, 3840, 0, 4096, 4097, - 4099, 3840, 3968, 0, 4096, 4097, 4099, 3840, - 3968, 0, 4096, 4097, 4099, 3840, 3968, 3970, - 0, 4096, 4097, 4099, 3840, 3968, 0, 4096, - 4097, 4099, 3840, 3968, 3972, 0, 4096, 4097, - 4099, 3840, 3968, 3972, 0, 4096, 4097, 4099, - 3840, 3968, 3976, 3974, 0, 4096, 4097, 4099, - 4103, 3968, 0, 4096, 4097, 4099, 4103, 3968, - 3976, 0, 4096, 4097, 4099, 4103, 3968, 3976, - 0, 4096, 4097, 4099, 4103, 3968, 3976, 3978, - 0, 4096, 4097, 4099, 4103, 3968, 3976, 0, - 4096, 4097, 4099, 4103, 3968, 3984, 3980, 0, - 4096, 4097, 4099, 4103, 3968, 3984, 3980, 0, - 4096, 4097, 4099, 4103, 3968, 3984, 3985, 3982, - 0, 4096, 4097, 4099, 4103, 3968, 0, 4096, - 4097, 4099, 4103, 3968, 3984, 0, 4096, 4097, - 4099, 4103, 3968, 3984, 0, 4096, 4097, 4099, - 4103, 3968, 3984, 3986, 0, 4096, 4097, 4099, - 4103, 3968, 3984, 0, 4096, 4097, 4099, 4103, - 3968, 3984, 3988, 0, 4096, 4097, 4099, 4103, - 3968, 3984, 3988, 0, 4096, 4097, 4099, 4103, - 3968, 3984, 3992, 3990, 0, 4096, 4097, 4099, - 4103, 3968, 3984, 0, 4096, 4097, 4099, 4103, - 3968, 4000, 3992, 0, 4096, 4097, 4099, 4103, - 3968, 4000, 3992, 0, 4096, 4097, 4099, 4103, - 3968, 4000, 3992, 3994, 0, 4096, 4097, 4099, - 4103, 3968, 4000, 3992, 0, 4096, 4097, 4099, - 4103, 3968, 4000, 4001, 3996, 0, 4096, 4097, - 4099, 4103, 3968, 4000, 4001, 3996, 0, 4096, - 4097, 4099, 4103, 3968, 4000, 4001, 3996, 3998, - 0, 4096, 4097, 4099, 4103, 3968, 0, 4096, - 4097, 4099, 4103, 3968, 4000, 0, 4096, 4097, - 4099, 4103, 3968, 4000, 0, 4096, 4097, 4099, - 4103, 3968, 4000, 4002, 0, 4096, 4097, 4099, - 4103, 3968, 4000, 0, 4096, 4097, 4099, 4103, - 3968, 4000, 4004, 0, 4096, 4097, 4099, 4103, - 3968, 4000, 4004, 0, 4096, 4097, 4099, 4103, - 3968, 4000, 4008, 4006, 0, 4096, 4097, 4099, - 4103, 3968, 4000, 0, 4096, 4097, 4099, 4103, - 3968, 4000, 4008, 0, 4096, 4097, 4099, 4103, - 3968, 4000, 4008, 0, 4096, 4097, 4099, 4103, - 3968, 4000, 4008, 4010, 0, 4096, 4097, 4099, - 4103, 3968, 4000, 4008, 0, 4096, 4097, 4099, - 4103, 3968, 4000, 4016, 4012, 0, 4096, 4097, - 4099, 4103, 3968, 4000, 4016, 4012, 0, 4096, - 4097, 4099, 4103, 3968, 4000, 4016, 4017, 4014, - 0, 4096, 4097, 4099, 4103, 3968, 4000, 0, - 4096, 4097, 4099, 4103, 3968, 4032, 4016, 0, - 4096, 4097, 4099, 4103, 3968, 4032, 4016, 0, - 4096, 4097, 4099, 4103, 3968, 4032, 4016, 4018, - 0, 4096, 4097, 4099, 4103, 3968, 4032, 4016, - 0, 4096, 4097, 4099, 4103, 3968, 4032, 4016, - 4020, 0, 4096, 4097, 4099, 4103, 3968, 4032, - 4016, 4020, 0, 4096, 4097, 4099, 4103, 3968, - 4032, 4016, 4024, 4022, 0, 4096, 4097, 4099, - 4103, 3968, 4032, 4016, 0, 4096, 4097, 4099, - 4103, 3968, 4032, 4033, 4024, 0, 4096, 4097, - 4099, 4103, 3968, 4032, 4033, 4024, 0, 4096, - 4097, 4099, 4103, 3968, 4032, 4033, 4024, 4026, - 0, 4096, 4097, 4099, 4103, 3968, 4032, 4033, - 4024, 0, 4096, 4097, 4099, 4103, 3968, 4032, - 4033, 4024, 4028, 0, 4096, 4097, 4099, 4103, - 3968, 4032, 4033, 4035, 4028, 0, 4096, 4097, - 4099, 4103, 3968, 4032, 4033, 4035, 4028, 4030, - 0, 4096, 4097, 4099, 4103, 3968, 0, 4096, - 4097, 4099, 4103, 3968, 4032, 0, 4096, 4097, - 4099, 4103, 3968, 4032, 0, 4096, 4097, 4099, - 4103, 3968, 4032, 4034, 0, 4096, 4097, 4099, - 4103, 3968, 4032, 0, 4096, 4097, 4099, 4103, - 3968, 4032, 4036, 0, 4096, 4097, 4099, 4103, - 3968, 4032, 4036, 0, 4096, 4097, 4099, 4103, - 3968, 4032, 4040, 4038, 0, 4096, 4097, 4099, - 4103, 3968, 4032, 0, 4096, 4097, 4099, 4103, - 3968, 4032, 4040, 0, 4096, 4097, 4099, 4103, - 3968, 4032, 4040, 0, 4096, 4097, 4099, 4103, - 3968, 4032, 4040, 4042, 0, 4096, 4097, 4099, - 4103, 3968, 4032, 4040, 0, 4096, 4097, 4099, - 4103, 3968, 4032, 4048, 4044, 0, 4096, 4097, - 4099, 4103, 3968, 4032, 4048, 4044, 0, 4096, - 4097, 4099, 4103, 3968, 4032, 4048, 4049, 4046, - 0, 4096, 4097, 4099, 4103, 4111, 4032, 0, - 4096, 4097, 4099, 4103, 4111, 4032, 4048, 0, - 4096, 4097, 4099, 4103, 4111, 4032, 4048, 0, - 4096, 4097, 4099, 4103, 4111, 4032, 4048, 4050, - 0, 4096, 4097, 4099, 4103, 4111, 4032, 4048, - 0, 4096, 4097, 4099, 4103, 4111, 4032, 4048, - 4052, 0, 4096, 4097, 4099, 4103, 4111, 4032, - 4048, 4052, 0, 4096, 4097, 4099, 4103, 4111, - 4032, 4048, 4056, 4054, 0, 4096, 4097, 4099, - 4103, 4111, 4032, 4048, 0, 4096, 4097, 4099, - 4103, 4111, 4032, 4064, 4056, 0, 4096, 4097, - 4099, 4103, 4111, 4032, 4064, 4056, 0, 4096, - 4097, 4099, 4103, 4111, 4032, 4064, 4056, 4058, - 0, 4096, 4097, 4099, 4103, 4111, 4032, 4064, - 4056, 0, 4096, 4097, 4099, 4103, 4111, 4032, - 4064, 4065, 4060, 0, 4096, 4097, 4099, 4103, - 4111, 4032, 4064, 4065, 4060, 0, 4096, 4097, - 4099, 4103, 4111, 4032, 4064, 4065, 4060, 4062, - 0, 4096, 4097, 4099, 4103, 4111, 4032, 0, - 4096, 4097, 4099, 4103, 4111, 4032, 4064, 0, - 4096, 4097, 4099, 4103, 4111, 4032, 4064, 0, - 4096, 4097, 4099, 4103, 4111, 4032, 4064, 4066, - 0, 4096, 4097, 4099, 4103, 4111, 4032, 4064, - 0, 4096, 4097, 4099, 4103, 4111, 4032, 4064, - 4068, 0, 4096, 4097, 4099, 4103, 4111, 4032, - 4064, 4068, 0, 4096, 4097, 4099, 4103, 4111, - 4032, 4064, 4072, 4070, 0, 4096, 4097, 4099, - 4103, 4111, 4032, 4064, 0, 4096, 4097, 4099, - 4103, 4111, 4032, 4064, 4072, 0, 4096, 4097, - 4099, 4103, 4111, 4032, 4064, 4072, 0, 4096, - 4097, 4099, 4103, 4111, 4032, 4064, 4072, 4074, - 0, 4096, 4097, 4099, 4103, 4111, 4032, 4064, - 4072, 0, 4096, 4097, 4099, 4103, 4111, 4032, - 4064, 4080, 4076, 0, 4096, 4097, 4099, 4103, - 4111, 4032, 4064, 4080, 4076, 0, 4096, 4097, - 4099, 4103, 4111, 4032, 4064, 4080, 4081, 4078, - 0, 4096, 4097, 4099, 4103, 4111, 4032, 4064, - 0, 4096, 4097, 4099, 4103, 4111, 4032, 4064, - 4080, 0, 4096, 4097, 4099, 4103, 4111, 4032, - 4064, 4080, 0, 4096, 4097, 4099, 4103, 4111, - 4032, 4064, 4080, 4082, 0, 4096, 4097, 4099, - 4103, 4111, 4032, 4064, 4080, 0, 4096, 4097, - 4099, 4103, 4111, 4032, 4064, 4080, 4084, 0, - 4096, 4097, 4099, 4103, 4111, 4032, 4064, 4080, - 4084, 0, 4096, 4097, 4099, 4103, 4111, 4032, - 4064, 4080, 4088, 4086, 0, 4096, 4097, 4099, - 4103, 4111, 4032, 4064, 4080, 0, 4096, 4097, - 4099, 4103, 4111, 4032, 4064, 4080, 4088, 0, - 4096, 4097, 4099, 4103, 4111, 4032, 4064, 4080, - 4088, 0, 4096, 4097, 4099, 4103, 4111, 4032, - 4064, 4080, 4088, 4090, 0, 4096, 4097, 4099, - 4103, 4111, 4032, 4064, 4080, 4088, 0, 4096, - 4097, 4099, 4103, 4111, 4032, 4064, 4080, 4088, - 4092, 0, 4096, 4097, 4099, 4103, 4111, 4032, - 4064, 4080, 4088, 4092, 0, 4096, 4097, 4099, - 4103, 4111, 4032, 4064, 4080, 4088, 4092, 4094, - 0, 0, 4096, 0, 4096, 0, 4096, 4098, - 0, 4096, 0, 4096, 4100, 0, 4096, 4100, - 0, 4096, 4104, 4102, 0, 4096, 0, 4096, - 4104, 0, 4096, 4104, 0, 4096, 4104, 4106, - 0, 4096, 4104, 0, 4096, 4112, 4108, 0, - 4096, 4112, 4108, 0, 4096, 4112, 4113, 4110, - 0, 4096, 0, 4096, 4112, 0, 4096, 4112, - 0, 4096, 4112, 4114, 0, 4096, 4112, 0, - 4096, 4112, 4116, 0, 4096, 4112, 4116, 0, - 4096, 4112, 4120, 4118, 0, 4096, 4112, 0, - 4096, 4128, 4120, 0, 4096, 4128, 4120, 0, - 4096, 4128, 4120, 4122, 0, 4096, 4128, 4120, - 0, 4096, 4128, 4129, 4124, 0, 4096, 4128, - 4129, 4124, 0, 4096, 4128, 4129, 4124, 4126, - 0, 4096, 0, 4096, 4128, 0, 4096, 4128, - 0, 4096, 4128, 4130, 0, 4096, 4128, 0, - 4096, 4128, 4132, 0, 4096, 4128, 4132, 0, - 4096, 4128, 4136, 4134, 0, 4096, 4128, 0, - 4096, 4128, 4136, 0, 4096, 4128, 4136, 0, - 4096, 4128, 4136, 4138, 0, 4096, 4128, 4136, - 0, 4096, 4128, 4144, 4140, 0, 4096, 4128, - 4144, 4140, 0, 4096, 4128, 4144, 4145, 4142, - 0, 4096, 4128, 0, 4096, 4160, 4144, 0, - 4096, 4160, 4144, 0, 4096, 4160, 4144, 4146, - 0, 4096, 4160, 4144, 0, 4096, 4160, 4144, - 4148, 0, 4096, 4160, 4144, 4148, 0, 4096, - 4160, 4144, 4152, 4150, 0, 4096, 4160, 4144, - 0, 4096, 4160, 4161, 4152, 0, 4096, 4160, - 4161, 4152, 0, 4096, 4160, 4161, 4152, 4154, - 0, 4096, 4160, 4161, 4152, 0, 4096, 4160, - 4161, 4152, 4156, 0, 4096, 4160, 4161, 4163, - 4156, 0, 4096, 4160, 4161, 4163, 4156, 4158, - 0, 4096, 0, 4096, 4160, 0, 4096, 4160, - 0, 4096, 4160, 4162, 0, 4096, 4160, 0, - 4096, 4160, 4164, 0, 4096, 4160, 4164, 0, - 4096, 4160, 4168, 4166, 0, 4096, 4160, 0, - 4096, 4160, 4168, 0, 4096, 4160, 4168, 0, - 4096, 4160, 4168, 4170, 0, 4096, 4160, 4168, - 0, 4096, 4160, 4176, 4172, 0, 4096, 4160, - 4176, 4172, 0, 4096, 4160, 4176, 4177, 4174, - 0, 4096, 4160, 0, 4096, 4160, 4176, 0, - 4096, 4160, 4176, 0, 4096, 4160, 4176, 4178, - 0, 4096, 4160, 4176, 0, 4096, 4160, 4176, - 4180, 0, 4096, 4160, 4176, 4180, 0, 4096, - 4160, 4176, 4184, 4182, 0, 4096, 4160, 4176, - 0, 4096, 4160, 4192, 4184, 0, 4096, 4160, - 4192, 4184, 0, 4096, 4160, 4192, 4184, 4186, - 0, 4096, 4160, 4192, 4184, 0, 4096, 4160, - 4192, 4193, 4188, 0, 4096, 4160, 4192, 4193, - 4188, 0, 4096, 4160, 4192, 4193, 4188, 4190, - 0, 4096, 4160, 0, 4096, 4224, 4192, 0, - 4096, 4224, 4192, 0, 4096, 4224, 4192, 4194, - 0, 4096, 4224, 4192, 0, 4096, 4224, 4192, - 4196, 0, 4096, 4224, 4192, 4196, 0, 4096, - 4224, 4192, 4200, 4198, 0, 4096, 4224, 4192, - 0, 4096, 4224, 4192, 4200, 0, 4096, 4224, - 4192, 4200, 0, 4096, 4224, 4192, 4200, 4202, - 0, 4096, 4224, 4192, 4200, 0, 4096, 4224, - 4192, 4208, 4204, 0, 4096, 4224, 4192, 4208, - 4204, 0, 4096, 4224, 4192, 4208, 4209, 4206, - 0, 4096, 4224, 4192, 0, 4096, 4224, 4225, - 4208, 0, 4096, 4224, 4225, 4208, 0, 4096, - 4224, 4225, 4208, 4210, 0, 4096, 4224, 4225, - 4208, 0, 4096, 4224, 4225, 4208, 4212, 0, - 4096, 4224, 4225, 4208, 4212, 0, 4096, 4224, - 4225, 4208, 4216, 4214, 0, 4096, 4224, 4225, - 4208, 0, 4096, 4224, 4225, 4208, 4216, 0, - 4096, 4224, 4225, 4227, 4216, 0, 4096, 4224, - 4225, 4227, 4216, 4218, 0, 4096, 4224, 4225, - 4227, 4216, 0, 4096, 4224, 4225, 4227, 4216, - 4220, 0, 4096, 4224, 4225, 4227, 4216, 4220, - 0, 4096, 4224, 4225, 4227, 4216, 4220, 4222, - 0, 4096, 0, 4096, 4224, 0, 4096, 4224, - 0, 4096, 4224, 4226, 0, 4096, 4224, 0, - 4096, 4224, 4228, 0, 4096, 4224, 4228, 0, - 4096, 4224, 4232, 4230, 0, 4096, 4224, 0, - 4096, 4224, 4232, 0, 4096, 4224, 4232, 0, - 4096, 4224, 4232, 4234, 0, 4096, 4224, 4232, - 0, 4096, 4224, 4240, 4236, 0, 4096, 4224, - 4240, 4236, 0, 4096, 4224, 4240, 4241, 4238, - 0, 4096, 4224, 0, 4096, 4224, 4240, 0, - 4096, 4224, 4240, 0, 4096, 4224, 4240, 4242, - 0, 4096, 4224, 4240, 0, 4096, 4224, 4240, - 4244, 0, 4096, 4224, 4240, 4244, 0, 4096, - 4224, 4240, 4248, 4246, 0, 4096, 4224, 4240, - 0, 4096, 4224, 4256, 4248, 0, 4096, 4224, - 4256, 4248, 0, 4096, 4224, 4256, 4248, 4250, - 0, 4096, 4224, 4256, 4248, 0, 4096, 4224, - 4256, 4257, 4252, 0, 4096, 4224, 4256, 4257, - 4252, 0, 4096, 4224, 4256, 4257, 4252, 4254, - 0, 4096, 4224, 0, 4096, 4224, 4256, 0, - 4096, 4224, 4256, 0, 4096, 4224, 4256, 4258, - 0, 4096, 4224, 4256, 0, 4096, 4224, 4256, - 4260, 0, 4096, 4224, 4256, 4260, 0, 4096, - 4224, 4256, 4264, 4262, 0, 4096, 4224, 4256, - 0, 4096, 4224, 4256, 4264, 0, 4096, 4224, - 4256, 4264, 0, 4096, 4224, 4256, 4264, 4266, - 0, 4096, 4224, 4256, 4264, 0, 4096, 4224, - 4256, 4272, 4268, 0, 4096, 4224, 4256, 4272, - 4268, 0, 4096, 4224, 4256, 4272, 4273, 4270, - 0, 4096, 4224, 4256, 0, 4096, 4224, 4288, - 4272, 0, 4096, 4224, 4288, 4272, 0, 4096, - 4224, 4288, 4272, 4274, 0, 4096, 4224, 4288, - 4272, 0, 4096, 4224, 4288, 4272, 4276, 0, - 4096, 4224, 4288, 4272, 4276, 0, 4096, 4224, - 4288, 4272, 4280, 4278, 0, 4096, 4224, 4288, - 4272, 0, 4096, 4224, 4288, 4289, 4280, 0, - 4096, 4224, 4288, 4289, 4280, 0, 4096, 4224, - 4288, 4289, 4280, 4282, 0, 4096, 4224, 4288, - 4289, 4280, 0, 4096, 4224, 4288, 4289, 4280, - 4284, 0, 4096, 4224, 4288, 4289, 4291, 4284, - 0, 4096, 4224, 4288, 4289, 4291, 4284, 4286, - 0, 4096, 4224, 0, 4096, 4352, 4288, 0, - 4096, 4352, 4288, 0, 4096, 4352, 4288, 4290, - 0, 4096, 4352, 4288, 0, 4096, 4352, 4288, - 4292, 0, 4096, 4352, 4288, 4292, 0, 4096, - 4352, 4288, 4296, 4294, 0, 4096, 4352, 4288, - 0, 4096, 4352, 4288, 4296, 0, 4096, 4352, - 4288, 4296, 0, 4096, 4352, 4288, 4296, 4298, - 0, 4096, 4352, 4288, 4296, 0, 4096, 4352, - 4288, 4304, 4300, 0, 4096, 4352, 4288, 4304, - 4300, 0, 4096, 4352, 4288, 4304, 4305, 4302, - 0, 4096, 4352, 4288, 0, 4096, 4352, 4288, - 4304, 0, 4096, 4352, 4288, 4304, 0, 4096, - 4352, 4288, 4304, 4306, 0, 4096, 4352, 4288, - 4304, 0, 4096, 4352, 4288, 4304, 4308, 0, - 4096, 4352, 4288, 4304, 4308, 0, 4096, 4352, - 4288, 4304, 4312, 4310, 0, 4096, 4352, 4288, - 4304, 0, 4096, 4352, 4288, 4320, 4312, 0, - 4096, 4352, 4288, 4320, 4312, 0, 4096, 4352, - 4288, 4320, 4312, 4314, 0, 4096, 4352, 4288, - 4320, 4312, 0, 4096, 4352, 4288, 4320, 4321, - 4316, 0, 4096, 4352, 4288, 4320, 4321, 4316, - 0, 4096, 4352, 4288, 4320, 4321, 4316, 4318, - 0, 4096, 4352, 4288, 0, 4096, 4352, 4353, - 4320, 0, 4096, 4352, 4353, 4320, 0, 4096, - 4352, 4353, 4320, 4322, 0, 4096, 4352, 4353, - 4320, 0, 4096, 4352, 4353, 4320, 4324, 0, - 4096, 4352, 4353, 4320, 4324, 0, 4096, 4352, - 4353, 4320, 4328, 4326, 0, 4096, 4352, 4353, - 4320, 0, 4096, 4352, 4353, 4320, 4328, 0, - 4096, 4352, 4353, 4320, 4328, 0, 4096, 4352, - 4353, 4320, 4328, 4330, 0, 4096, 4352, 4353, - 4320, 4328, 0, 4096, 4352, 4353, 4320, 4336, - 4332, 0, 4096, 4352, 4353, 4320, 4336, 4332, - 0, 4096, 4352, 4353, 4320, 4336, 4337, 4334, - 0, 4096, 4352, 4353, 4320, 0, 4096, 4352, - 4353, 4320, 4336, 0, 4096, 4352, 4353, 4355, - 4336, 0, 4096, 4352, 4353, 4355, 4336, 4338, - 0, 4096, 4352, 4353, 4355, 4336, 0, 4096, - 4352, 4353, 4355, 4336, 4340, 0, 4096, 4352, - 4353, 4355, 4336, 4340, 0, 4096, 4352, 4353, - 4355, 4336, 4344, 4342, 0, 4096, 4352, 4353, - 4355, 4336, 0, 4096, 4352, 4353, 4355, 4336, - 4344, 0, 4096, 4352, 4353, 4355, 4336, 4344, - 0, 4096, 4352, 4353, 4355, 4336, 4344, 4346, - 0, 4096, 4352, 4353, 4355, 4359, 4344, 0, - 4096, 4352, 4353, 4355, 4359, 4344, 4348, 0, - 4096, 4352, 4353, 4355, 4359, 4344, 4348, 0, - 4096, 4352, 4353, 4355, 4359, 4344, 4348, 4350, - 0, 4096, 0, 4096, 4352, 0, 4096, 4352, - 0, 4096, 4352, 4354, 0, 4096, 4352, 0, - 4096, 4352, 4356, 0, 4096, 4352, 4356, 0, - 4096, 4352, 4360, 4358, 0, 4096, 4352, 0, - 4096, 4352, 4360, 0, 4096, 4352, 4360, 0, - 4096, 4352, 4360, 4362, 0, 4096, 4352, 4360, - 0, 4096, 4352, 4368, 4364, 0, 4096, 4352, - 4368, 4364, 0, 4096, 4352, 4368, 4369, 4366, - 0, 4096, 4352, 0, 4096, 4352, 4368, 0, - 4096, 4352, 4368, 0, 4096, 4352, 4368, 4370, - 0, 4096, 4352, 4368, 0, 4096, 4352, 4368, - 4372, 0, 4096, 4352, 4368, 4372, 0, 4096, - 4352, 4368, 4376, 4374, 0, 4096, 4352, 4368, - 0, 4096, 4352, 4384, 4376, 0, 4096, 4352, - 4384, 4376, 0, 4096, 4352, 4384, 4376, 4378, - 0, 4096, 4352, 4384, 4376, 0, 4096, 4352, - 4384, 4385, 4380, 0, 4096, 4352, 4384, 4385, - 4380, 0, 4096, 4352, 4384, 4385, 4380, 4382, - 0, 4096, 4352, 0, 4096, 4352, 4384, 0, - 4096, 4352, 4384, 0, 4096, 4352, 4384, 4386, - 0, 4096, 4352, 4384, 0, 4096, 4352, 4384, - 4388, 0, 4096, 4352, 4384, 4388, 0, 4096, - 4352, 4384, 4392, 4390, 0, 4096, 4352, 4384, - 0, 4096, 4352, 4384, 4392, 0, 4096, 4352, - 4384, 4392, 0, 4096, 4352, 4384, 4392, 4394, - 0, 4096, 4352, 4384, 4392, 0, 4096, 4352, - 4384, 4400, 4396, 0, 4096, 4352, 4384, 4400, - 4396, 0, 4096, 4352, 4384, 4400, 4401, 4398, - 0, 4096, 4352, 4384, 0, 4096, 4352, 4416, - 4400, 0, 4096, 4352, 4416, 4400, 0, 4096, - 4352, 4416, 4400, 4402, 0, 4096, 4352, 4416, - 4400, 0, 4096, 4352, 4416, 4400, 4404, 0, - 4096, 4352, 4416, 4400, 4404, 0, 4096, 4352, - 4416, 4400, 4408, 4406, 0, 4096, 4352, 4416, - 4400, 0, 4096, 4352, 4416, 4417, 4408, 0, - 4096, 4352, 4416, 4417, 4408, 0, 4096, 4352, - 4416, 4417, 4408, 4410, 0, 4096, 4352, 4416, - 4417, 4408, 0, 4096, 4352, 4416, 4417, 4408, - 4412, 0, 4096, 4352, 4416, 4417, 4419, 4412, - 0, 4096, 4352, 4416, 4417, 4419, 4412, 4414, - 0, 4096, 4352, 0, 4096, 4352, 4416, 0, - 4096, 4352, 4416, 0, 4096, 4352, 4416, 4418, - 0, 4096, 4352, 4416, 0, 4096, 4352, 4416, - 4420, 0, 4096, 4352, 4416, 4420, 0, 4096, - 4352, 4416, 4424, 4422, 0, 4096, 4352, 4416, - 0, 4096, 4352, 4416, 4424, 0, 4096, 4352, - 4416, 4424, 0, 4096, 4352, 4416, 4424, 4426, - 0, 4096, 4352, 4416, 4424, 0, 4096, 4352, - 4416, 4432, 4428, 0, 4096, 4352, 4416, 4432, - 4428, 0, 4096, 4352, 4416, 4432, 4433, 4430, - 0, 4096, 4352, 4416, 0, 4096, 4352, 4416, - 4432, 0, 4096, 4352, 4416, 4432, 0, 4096, - 4352, 4416, 4432, 4434, 0, 4096, 4352, 4416, - 4432, 0, 4096, 4352, 4416, 4432, 4436, 0, - 4096, 4352, 4416, 4432, 4436, 0, 4096, 4352, - 4416, 4432, 4440, 4438, 0, 4096, 4352, 4416, - 4432, 0, 4096, 4352, 4416, 4448, 4440, 0, - 4096, 4352, 4416, 4448, 4440, 0, 4096, 4352, - 4416, 4448, 4440, 4442, 0, 4096, 4352, 4416, - 4448, 4440, 0, 4096, 4352, 4416, 4448, 4449, - 4444, 0, 4096, 4352, 4416, 4448, 4449, 4444, - 0, 4096, 4352, 4416, 4448, 4449, 4444, 4446, - 0, 4096, 4352, 4416, 0, 4096, 4352, 4480, - 4448, 0, 4096, 4352, 4480, 4448, 0, 4096, - 4352, 4480, 4448, 4450, 0, 4096, 4352, 4480, - 4448, 0, 4096, 4352, 4480, 4448, 4452, 0, - 4096, 4352, 4480, 4448, 4452, 0, 4096, 4352, - 4480, 4448, 4456, 4454, 0, 4096, 4352, 4480, - 4448, 0, 4096, 4352, 4480, 4448, 4456, 0, - 4096, 4352, 4480, 4448, 4456, 0, 4096, 4352, - 4480, 4448, 4456, 4458, 0, 4096, 4352, 4480, - 4448, 4456, 0, 4096, 4352, 4480, 4448, 4464, - 4460, 0, 4096, 4352, 4480, 4448, 4464, 4460, - 0, 4096, 4352, 4480, 4448, 4464, 4465, 4462, - 0, 4096, 4352, 4480, 4448, 0, 4096, 4352, - 4480, 4481, 4464, 0, 4096, 4352, 4480, 4481, - 4464, 0, 4096, 4352, 4480, 4481, 4464, 4466, - 0, 4096, 4352, 4480, 4481, 4464, 0, 4096, - 4352, 4480, 4481, 4464, 4468, 0, 4096, 4352, - 4480, 4481, 4464, 4468, 0, 4096, 4352, 4480, - 4481, 4464, 4472, 4470, 0, 4096, 4352, 4480, - 4481, 4464, 0, 4096, 4352, 4480, 4481, 4464, - 4472, 0, 4096, 4352, 4480, 4481, 4483, 4472, - 0, 4096, 4352, 4480, 4481, 4483, 4472, 4474, - 0, 4096, 4352, 4480, 4481, 4483, 4472, 0, - 4096, 4352, 4480, 4481, 4483, 4472, 4476, 0, - 4096, 4352, 4480, 4481, 4483, 4472, 4476, 0, - 4096, 4352, 4480, 4481, 4483, 4472, 4476, 4478, - 0, 4096, 4352, 0, 4096, 4608, 4480, 0, - 4096, 4608, 4480, 0, 4096, 4608, 4480, 4482, - 0, 4096, 4608, 4480, 0, 4096, 4608, 4480, - 4484, 0, 4096, 4608, 4480, 4484, 0, 4096, - 4608, 4480, 4488, 4486, 0, 4096, 4608, 4480, - 0, 4096, 4608, 4480, 4488, 0, 4096, 4608, - 4480, 4488, 0, 4096, 4608, 4480, 4488, 4490, - 0, 4096, 4608, 4480, 4488, 0, 4096, 4608, - 4480, 4496, 4492, 0, 4096, 4608, 4480, 4496, - 4492, 0, 4096, 4608, 4480, 4496, 4497, 4494, - 0, 4096, 4608, 4480, 0, 4096, 4608, 4480, - 4496, 0, 4096, 4608, 4480, 4496, 0, 4096, - 4608, 4480, 4496, 4498, 0, 4096, 4608, 4480, - 4496, 0, 4096, 4608, 4480, 4496, 4500, 0, - 4096, 4608, 4480, 4496, 4500, 0, 4096, 4608, - 4480, 4496, 4504, 4502, 0, 4096, 4608, 4480, - 4496, 0, 4096, 4608, 4480, 4512, 4504, 0, - 4096, 4608, 4480, 4512, 4504, 0, 4096, 4608, - 4480, 4512, 4504, 4506, 0, 4096, 4608, 4480, - 4512, 4504, 0, 4096, 4608, 4480, 4512, 4513, - 4508, 0, 4096, 4608, 4480, 4512, 4513, 4508, - 0, 4096, 4608, 4480, 4512, 4513, 4508, 4510, - 0, 4096, 4608, 4480, 0, 4096, 4608, 4480, - 4512, 0, 4096, 4608, 4480, 4512, 0, 4096, - 4608, 4480, 4512, 4514, 0, 4096, 4608, 4480, - 4512, 0, 4096, 4608, 4480, 4512, 4516, 0, - 4096, 4608, 4480, 4512, 4516, 0, 4096, 4608, - 4480, 4512, 4520, 4518, 0, 4096, 4608, 4480, - 4512, 0, 4096, 4608, 4480, 4512, 4520, 0, - 4096, 4608, 4480, 4512, 4520, 0, 4096, 4608, - 4480, 4512, 4520, 4522, 0, 4096, 4608, 4480, - 4512, 4520, 0, 4096, 4608, 4480, 4512, 4528, - 4524, 0, 4096, 4608, 4480, 4512, 4528, 4524, - 0, 4096, 4608, 4480, 4512, 4528, 4529, 4526, - 0, 4096, 4608, 4480, 4512, 0, 4096, 4608, - 4480, 4544, 4528, 0, 4096, 4608, 4480, 4544, - 4528, 0, 4096, 4608, 4480, 4544, 4528, 4530, - 0, 4096, 4608, 4480, 4544, 4528, 0, 4096, - 4608, 4480, 4544, 4528, 4532, 0, 4096, 4608, - 4480, 4544, 4528, 4532, 0, 4096, 4608, 4480, - 4544, 4528, 4536, 4534, 0, 4096, 4608, 4480, - 4544, 4528, 0, 4096, 4608, 4480, 4544, 4545, - 4536, 0, 4096, 4608, 4480, 4544, 4545, 4536, - 0, 4096, 4608, 4480, 4544, 4545, 4536, 4538, - 0, 4096, 4608, 4480, 4544, 4545, 4536, 0, - 4096, 4608, 4480, 4544, 4545, 4536, 4540, 0, - 4096, 4608, 4480, 4544, 4545, 4547, 4540, 0, - 4096, 4608, 4480, 4544, 4545, 4547, 4540, 4542, - 0, 4096, 4608, 4480, 0, 4096, 4608, 4609, - 4544, 0, 4096, 4608, 4609, 4544, 0, 4096, - 4608, 4609, 4544, 4546, 0, 4096, 4608, 4609, - 4544, 0, 4096, 4608, 4609, 4544, 4548, 0, - 4096, 4608, 4609, 4544, 4548, 0, 4096, 4608, - 4609, 4544, 4552, 4550, 0, 4096, 4608, 4609, - 4544, 0, 4096, 4608, 4609, 4544, 4552, 0, - 4096, 4608, 4609, 4544, 4552, 0, 4096, 4608, - 4609, 4544, 4552, 4554, 0, 4096, 4608, 4609, - 4544, 4552, 0, 4096, 4608, 4609, 4544, 4560, - 4556, 0, 4096, 4608, 4609, 4544, 4560, 4556, - 0, 4096, 4608, 4609, 4544, 4560, 4561, 4558, - 0, 4096, 4608, 4609, 4544, 0, 4096, 4608, - 4609, 4544, 4560, 0, 4096, 4608, 4609, 4544, - 4560, 0, 4096, 4608, 4609, 4544, 4560, 4562, - 0, 4096, 4608, 4609, 4544, 4560, 0, 4096, - 4608, 4609, 4544, 4560, 4564, 0, 4096, 4608, - 4609, 4544, 4560, 4564, 0, 4096, 4608, 4609, - 4544, 4560, 4568, 4566, 0, 4096, 4608, 4609, - 4544, 4560, 0, 4096, 4608, 4609, 4544, 4576, - 4568, 0, 4096, 4608, 4609, 4544, 4576, 4568, - 0, 4096, 4608, 4609, 4544, 4576, 4568, 4570, - 0, 4096, 4608, 4609, 4544, 4576, 4568, 0, - 4096, 4608, 4609, 4544, 4576, 4577, 4572, 0, - 4096, 4608, 4609, 4544, 4576, 4577, 4572, 0, - 4096, 4608, 4609, 4544, 4576, 4577, 4572, 4574, - 0, 4096, 4608, 4609, 4544, 0, 4096, 4608, - 4609, 4544, 4576, 0, 4096, 4608, 4609, 4611, - 4576, 0, 4096, 4608, 4609, 4611, 4576, 4578, - 0, 4096, 4608, 4609, 4611, 4576, 0, 4096, - 4608, 4609, 4611, 4576, 4580, 0, 4096, 4608, - 4609, 4611, 4576, 4580, 0, 4096, 4608, 4609, - 4611, 4576, 4584, 4582, 0, 4096, 4608, 4609, - 4611, 4576, 0, 4096, 4608, 4609, 4611, 4576, - 4584, 0, 4096, 4608, 4609, 4611, 4576, 4584, - 0, 4096, 4608, 4609, 4611, 4576, 4584, 4586, - 0, 4096, 4608, 4609, 4611, 4576, 4584, 0, - 4096, 4608, 4609, 4611, 4576, 4592, 4588, 0, - 4096, 4608, 4609, 4611, 4576, 4592, 4588, 0, - 4096, 4608, 4609, 4611, 4576, 4592, 4593, 4590, - 0, 4096, 4608, 4609, 4611, 4576, 0, 4096, - 4608, 4609, 4611, 4576, 4592, 0, 4096, 4608, - 4609, 4611, 4576, 4592, 0, 4096, 4608, 4609, - 4611, 4576, 4592, 4594, 0, 4096, 4608, 4609, - 4611, 4615, 4592, 0, 4096, 4608, 4609, 4611, - 4615, 4592, 4596, 0, 4096, 4608, 4609, 4611, - 4615, 4592, 4596, 0, 4096, 4608, 4609, 4611, - 4615, 4592, 4600, 4598, 0, 4096, 4608, 4609, - 4611, 4615, 4592, 0, 4096, 4608, 4609, 4611, - 4615, 4592, 4600, 0, 4096, 4608, 4609, 4611, - 4615, 4592, 4600, 0, 4096, 4608, 4609, 4611, - 4615, 4592, 4600, 4602, 0, 4096, 4608, 4609, - 4611, 4615, 4592, 4600, 0, 4096, 4608, 4609, - 4611, 4615, 4592, 4600, 4604, 0, 4096, 4608, - 4609, 4611, 4615, 4592, 4600, 4604, 0, 4096, - 4608, 4609, 4611, 4615, 4592, 4600, 4604, 4606, - 0, 4096, 0, 4096, 4608, 0, 4096, 4608, - 0, 4096, 4608, 4610, 0, 4096, 4608, 0, - 4096, 4608, 4612, 0, 4096, 4608, 4612, 0, - 4096, 4608, 4616, 4614, 0, 4096, 4608, 0, - 4096, 4608, 4616, 0, 4096, 4608, 4616, 0, - 4096, 4608, 4616, 4618, 0, 4096, 4608, 4616, - 0, 4096, 4608, 4624, 4620, 0, 4096, 4608, - 4624, 4620, 0, 4096, 4608, 4624, 4625, 4622, - 0, 4096, 4608, 0, 4096, 4608, 4624, 0, - 4096, 4608, 4624, 0, 4096, 4608, 4624, 4626, - 0, 4096, 4608, 4624, 0, 4096, 4608, 4624, - 4628, 0, 4096, 4608, 4624, 4628, 0, 4096, - 4608, 4624, 4632, 4630, 0, 4096, 4608, 4624, - 0, 4096, 4608, 4640, 4632, 0, 4096, 4608, - 4640, 4632, 0, 4096, 4608, 4640, 4632, 4634, - 0, 4096, 4608, 4640, 4632, 0, 4096, 4608, - 4640, 4641, 4636, 0, 4096, 4608, 4640, 4641, - 4636, 0, 4096, 4608, 4640, 4641, 4636, 4638, - 0, 4096, 4608, 0, 4096, 4608, 4640, 0, - 4096, 4608, 4640, 0, 4096, 4608, 4640, 4642, - 0, 4096, 4608, 4640, 0, 4096, 4608, 4640, - 4644, 0, 4096, 4608, 4640, 4644, 0, 4096, - 4608, 4640, 4648, 4646, 0, 4096, 4608, 4640, - 0, 4096, 4608, 4640, 4648, 0, 4096, 4608, - 4640, 4648, 0, 4096, 4608, 4640, 4648, 4650, - 0, 4096, 4608, 4640, 4648, 0, 4096, 4608, - 4640, 4656, 4652, 0, 4096, 4608, 4640, 4656, - 4652, 0, 4096, 4608, 4640, 4656, 4657, 4654, - 0, 4096, 4608, 4640, 0, 4096, 4608, 4672, - 4656, 0, 4096, 4608, 4672, 4656, 0, 4096, - 4608, 4672, 4656, 4658, 0, 4096, 4608, 4672, - 4656, 0, 4096, 4608, 4672, 4656, 4660, 0, - 4096, 4608, 4672, 4656, 4660, 0, 4096, 4608, - 4672, 4656, 4664, 4662, 0, 4096, 4608, 4672, - 4656, 0, 4096, 4608, 4672, 4673, 4664, 0, - 4096, 4608, 4672, 4673, 4664, 0, 4096, 4608, - 4672, 4673, 4664, 4666, 0, 4096, 4608, 4672, - 4673, 4664, 0, 4096, 4608, 4672, 4673, 4664, - 4668, 0, 4096, 4608, 4672, 4673, 4675, 4668, - 0, 4096, 4608, 4672, 4673, 4675, 4668, 4670, - 0, 4096, 4608, 0, 4096, 4608, 4672, 0, - 4096, 4608, 4672, 0, 4096, 4608, 4672, 4674, - 0, 4096, 4608, 4672, 0, 4096, 4608, 4672, - 4676, 0, 4096, 4608, 4672, 4676, 0, 4096, - 4608, 4672, 4680, 4678, 0, 4096, 4608, 4672, - 0, 4096, 4608, 4672, 4680, 0, 4096, 4608, - 4672, 4680, 0, 4096, 4608, 4672, 4680, 4682, - 0, 4096, 4608, 4672, 4680, 0, 4096, 4608, - 4672, 4688, 4684, 0, 4096, 4608, 4672, 4688, - 4684, 0, 4096, 4608, 4672, 4688, 4689, 4686, - 0, 4096, 4608, 4672, 0, 4096, 4608, 4672, - 4688, 0, 4096, 4608, 4672, 4688, 0, 4096, - 4608, 4672, 4688, 4690, 0, 4096, 4608, 4672, - 4688, 0, 4096, 4608, 4672, 4688, 4692, 0, - 4096, 4608, 4672, 4688, 4692, 0, 4096, 4608, - 4672, 4688, 4696, 4694, 0, 4096, 4608, 4672, - 4688, 0, 4096, 4608, 4672, 4704, 4696, 0, - 4096, 4608, 4672, 4704, 4696, 0, 4096, 4608, - 4672, 4704, 4696, 4698, 0, 4096, 4608, 4672, - 4704, 4696, 0, 4096, 4608, 4672, 4704, 4705, - 4700, 0, 4096, 4608, 4672, 4704, 4705, 4700, - 0, 4096, 4608, 4672, 4704, 4705, 4700, 4702, - 0, 4096, 4608, 4672, 0, 4096, 4608, 4736, - 4704, 0, 4096, 4608, 4736, 4704, 0, 4096, - 4608, 4736, 4704, 4706, 0, 4096, 4608, 4736, - 4704, 0, 4096, 4608, 4736, 4704, 4708, 0, - 4096, 4608, 4736, 4704, 4708, 0, 4096, 4608, - 4736, 4704, 4712, 4710, 0, 4096, 4608, 4736, - 4704, 0, 4096, 4608, 4736, 4704, 4712, 0, - 4096, 4608, 4736, 4704, 4712, 0, 4096, 4608, - 4736, 4704, 4712, 4714, 0, 4096, 4608, 4736, - 4704, 4712, 0, 4096, 4608, 4736, 4704, 4720, - 4716, 0, 4096, 4608, 4736, 4704, 4720, 4716, - 0, 4096, 4608, 4736, 4704, 4720, 4721, 4718, - 0, 4096, 4608, 4736, 4704, 0, 4096, 4608, - 4736, 4737, 4720, 0, 4096, 4608, 4736, 4737, - 4720, 0, 4096, 4608, 4736, 4737, 4720, 4722, - 0, 4096, 4608, 4736, 4737, 4720, 0, 4096, - 4608, 4736, 4737, 4720, 4724, 0, 4096, 4608, - 4736, 4737, 4720, 4724, 0, 4096, 4608, 4736, - 4737, 4720, 4728, 4726, 0, 4096, 4608, 4736, - 4737, 4720, 0, 4096, 4608, 4736, 4737, 4720, - 4728, 0, 4096, 4608, 4736, 4737, 4739, 4728, - 0, 4096, 4608, 4736, 4737, 4739, 4728, 4730, - 0, 4096, 4608, 4736, 4737, 4739, 4728, 0, - 4096, 4608, 4736, 4737, 4739, 4728, 4732, 0, - 4096, 4608, 4736, 4737, 4739, 4728, 4732, 0, - 4096, 4608, 4736, 4737, 4739, 4728, 4732, 4734, - 0, 4096, 4608, 0, 4096, 4608, 4736, 0, - 4096, 4608, 4736, 0, 4096, 4608, 4736, 4738, - 0, 4096, 4608, 4736, 0, 4096, 4608, 4736, - 4740, 0, 4096, 4608, 4736, 4740, 0, 4096, - 4608, 4736, 4744, 4742, 0, 4096, 4608, 4736, - 0, 4096, 4608, 4736, 4744, 0, 4096, 4608, - 4736, 4744, 0, 4096, 4608, 4736, 4744, 4746, - 0, 4096, 4608, 4736, 4744, 0, 4096, 4608, - 4736, 4752, 4748, 0, 4096, 4608, 4736, 4752, - 4748, 0, 4096, 4608, 4736, 4752, 4753, 4750, - 0, 4096, 4608, 4736, 0, 4096, 4608, 4736, - 4752, 0, 4096, 4608, 4736, 4752, 0, 4096, - 4608, 4736, 4752, 4754, 0, 4096, 4608, 4736, - 4752, 0, 4096, 4608, 4736, 4752, 4756, 0, - 4096, 4608, 4736, 4752, 4756, 0, 4096, 4608, - 4736, 4752, 4760, 4758, 0, 4096, 4608, 4736, - 4752, 0, 4096, 4608, 4736, 4768, 4760, 0, - 4096, 4608, 4736, 4768, 4760, 0, 4096, 4608, - 4736, 4768, 4760, 4762, 0, 4096, 4608, 4736, - 4768, 4760, 0, 4096, 4608, 4736, 4768, 4769, - 4764, 0, 4096, 4608, 4736, 4768, 4769, 4764, - 0, 4096, 4608, 4736, 4768, 4769, 4764, 4766, - 0, 4096, 4608, 4736, 0, 4096, 4608, 4736, - 4768, 0, 4096, 4608, 4736, 4768, 0, 4096, - 4608, 4736, 4768, 4770, 0, 4096, 4608, 4736, - 4768, 0, 4096, 4608, 4736, 4768, 4772, 0, - 4096, 4608, 4736, 4768, 4772, 0, 4096, 4608, - 4736, 4768, 4776, 4774, 0, 4096, 4608, 4736, - 4768, 0, 4096, 4608, 4736, 4768, 4776, 0, - 4096, 4608, 4736, 4768, 4776, 0, 4096, 4608, - 4736, 4768, 4776, 4778, 0, 4096, 4608, 4736, - 4768, 4776, 0, 4096, 4608, 4736, 4768, 4784, - 4780, 0, 4096, 4608, 4736, 4768, 4784, 4780, - 0, 4096, 4608, 4736, 4768, 4784, 4785, 4782, - 0, 4096, 4608, 4736, 4768, 0, 4096, 4608, - 4736, 4800, 4784, 0, 4096, 4608, 4736, 4800, - 4784, 0, 4096, 4608, 4736, 4800, 4784, 4786, - 0, 4096, 4608, 4736, 4800, 4784, 0, 4096, - 4608, 4736, 4800, 4784, 4788, 0, 4096, 4608, - 4736, 4800, 4784, 4788, 0, 4096, 4608, 4736, - 4800, 4784, 4792, 4790, 0, 4096, 4608, 4736, - 4800, 4784, 0, 4096, 4608, 4736, 4800, 4801, - 4792, 0, 4096, 4608, 4736, 4800, 4801, 4792, - 0, 4096, 4608, 4736, 4800, 4801, 4792, 4794, - 0, 4096, 4608, 4736, 4800, 4801, 4792, 0, - 4096, 4608, 4736, 4800, 4801, 4792, 4796, 0, - 4096, 4608, 4736, 4800, 4801, 4803, 4796, 0, - 4096, 4608, 4736, 4800, 4801, 4803, 4796, 4798, - 0, 4096, 4608, 4736, 0, 4096, 4608, 4864, - 4800, 0, 4096, 4608, 4864, 4800, 0, 4096, - 4608, 4864, 4800, 4802, 0, 4096, 4608, 4864, - 4800, 0, 4096, 4608, 4864, 4800, 4804, 0, - 4096, 4608, 4864, 4800, 4804, 0, 4096, 4608, - 4864, 4800, 4808, 4806, 0, 4096, 4608, 4864, - 4800, 0, 4096, 4608, 4864, 4800, 4808, 0, - 4096, 4608, 4864, 4800, 4808, 0, 4096, 4608, - 4864, 4800, 4808, 4810, 0, 4096, 4608, 4864, - 4800, 4808, 0, 4096, 4608, 4864, 4800, 4816, - 4812, 0, 4096, 4608, 4864, 4800, 4816, 4812, - 0, 4096, 4608, 4864, 4800, 4816, 4817, 4814, - 0, 4096, 4608, 4864, 4800, 0, 4096, 4608, - 4864, 4800, 4816, 0, 4096, 4608, 4864, 4800, - 4816, 0, 4096, 4608, 4864, 4800, 4816, 4818, - 0, 4096, 4608, 4864, 4800, 4816, 0, 4096, - 4608, 4864, 4800, 4816, 4820, 0, 4096, 4608, - 4864, 4800, 4816, 4820, 0, 4096, 4608, 4864, - 4800, 4816, 4824, 4822, 0, 4096, 4608, 4864, - 4800, 4816, 0, 4096, 4608, 4864, 4800, 4832, - 4824, 0, 4096, 4608, 4864, 4800, 4832, 4824, - 0, 4096, 4608, 4864, 4800, 4832, 4824, 4826, - 0, 4096, 4608, 4864, 4800, 4832, 4824, 0, - 4096, 4608, 4864, 4800, 4832, 4833, 4828, 0, - 4096, 4608, 4864, 4800, 4832, 4833, 4828, 0, - 4096, 4608, 4864, 4800, 4832, 4833, 4828, 4830, - 0, 4096, 4608, 4864, 4800, 0, 4096, 4608, - 4864, 4865, 4832, 0, 4096, 4608, 4864, 4865, - 4832, 0, 4096, 4608, 4864, 4865, 4832, 4834, - 0, 4096, 4608, 4864, 4865, 4832, 0, 4096, - 4608, 4864, 4865, 4832, 4836, 0, 4096, 4608, - 4864, 4865, 4832, 4836, 0, 4096, 4608, 4864, - 4865, 4832, 4840, 4838, 0, 4096, 4608, 4864, - 4865, 4832, 0, 4096, 4608, 4864, 4865, 4832, - 4840, 0, 4096, 4608, 4864, 4865, 4832, 4840, - 0, 4096, 4608, 4864, 4865, 4832, 4840, 4842, - 0, 4096, 4608, 4864, 4865, 4832, 4840, 0, - 4096, 4608, 4864, 4865, 4832, 4848, 4844, 0, - 4096, 4608, 4864, 4865, 4832, 4848, 4844, 0, - 4096, 4608, 4864, 4865, 4832, 4848, 4849, 4846, - 0, 4096, 4608, 4864, 4865, 4832, 0, 4096, - 4608, 4864, 4865, 4832, 4848, 0, 4096, 4608, - 4864, 4865, 4867, 4848, 0, 4096, 4608, 4864, - 4865, 4867, 4848, 4850, 0, 4096, 4608, 4864, - 4865, 4867, 4848, 0, 4096, 4608, 4864, 4865, - 4867, 4848, 4852, 0, 4096, 4608, 4864, 4865, - 4867, 4848, 4852, 0, 4096, 4608, 4864, 4865, - 4867, 4848, 4856, 4854, 0, 4096, 4608, 4864, - 4865, 4867, 4848, 0, 4096, 4608, 4864, 4865, - 4867, 4848, 4856, 0, 4096, 4608, 4864, 4865, - 4867, 4848, 4856, 0, 4096, 4608, 4864, 4865, - 4867, 4848, 4856, 4858, 0, 4096, 4608, 4864, - 4865, 4867, 4871, 4856, 0, 4096, 4608, 4864, - 4865, 4867, 4871, 4856, 4860, 0, 4096, 4608, - 4864, 4865, 4867, 4871, 4856, 4860, 0, 4096, - 4608, 4864, 4865, 4867, 4871, 4856, 4860, 4862, - 0, 4096, 4608, 0, 4096, 5120, 4864, 0, - 4096, 5120, 4864, 0, 4096, 5120, 4864, 4866, - 0, 4096, 5120, 4864, 0, 4096, 5120, 4864, - 4868, 0, 4096, 5120, 4864, 4868, 0, 4096, - 5120, 4864, 4872, 4870, 0, 4096, 5120, 4864, - 0, 4096, 5120, 4864, 4872, 0, 4096, 5120, - 4864, 4872, 0, 4096, 5120, 4864, 4872, 4874, - 0, 4096, 5120, 4864, 4872, 0, 4096, 5120, - 4864, 4880, 4876, 0, 4096, 5120, 4864, 4880, - 4876, 0, 4096, 5120, 4864, 4880, 4881, 4878, - 0, 4096, 5120, 4864, 0, 4096, 5120, 4864, - 4880, 0, 4096, 5120, 4864, 4880, 0, 4096, - 5120, 4864, 4880, 4882, 0, 4096, 5120, 4864, - 4880, 0, 4096, 5120, 4864, 4880, 4884, 0, - 4096, 5120, 4864, 4880, 4884, 0, 4096, 5120, - 4864, 4880, 4888, 4886, 0, 4096, 5120, 4864, - 4880, 0, 4096, 5120, 4864, 4896, 4888, 0, - 4096, 5120, 4864, 4896, 4888, 0, 4096, 5120, - 4864, 4896, 4888, 4890, 0, 4096, 5120, 4864, - 4896, 4888, 0, 4096, 5120, 4864, 4896, 4897, - 4892, 0, 4096, 5120, 4864, 4896, 4897, 4892, - 0, 4096, 5120, 4864, 4896, 4897, 4892, 4894, - 0, 4096, 5120, 4864, 0, 4096, 5120, 4864, - 4896, 0, 4096, 5120, 4864, 4896, 0, 4096, - 5120, 4864, 4896, 4898, 0, 4096, 5120, 4864, - 4896, 0, 4096, 5120, 4864, 4896, 4900, 0, - 4096, 5120, 4864, 4896, 4900, 0, 4096, 5120, - 4864, 4896, 4904, 4902, 0, 4096, 5120, 4864, - 4896, 0, 4096, 5120, 4864, 4896, 4904, 0, - 4096, 5120, 4864, 4896, 4904, 0, 4096, 5120, - 4864, 4896, 4904, 4906, 0, 4096, 5120, 4864, - 4896, 4904, 0, 4096, 5120, 4864, 4896, 4912, - 4908, 0, 4096, 5120, 4864, 4896, 4912, 4908, - 0, 4096, 5120, 4864, 4896, 4912, 4913, 4910, - 0, 4096, 5120, 4864, 4896, 0, 4096, 5120, - 4864, 4928, 4912, 0, 4096, 5120, 4864, 4928, - 4912, 0, 4096, 5120, 4864, 4928, 4912, 4914, - 0, 4096, 5120, 4864, 4928, 4912, 0, 4096, - 5120, 4864, 4928, 4912, 4916, 0, 4096, 5120, - 4864, 4928, 4912, 4916, 0, 4096, 5120, 4864, - 4928, 4912, 4920, 4918, 0, 4096, 5120, 4864, - 4928, 4912, 0, 4096, 5120, 4864, 4928, 4929, - 4920, 0, 4096, 5120, 4864, 4928, 4929, 4920, - 0, 4096, 5120, 4864, 4928, 4929, 4920, 4922, - 0, 4096, 5120, 4864, 4928, 4929, 4920, 0, - 4096, 5120, 4864, 4928, 4929, 4920, 4924, 0, - 4096, 5120, 4864, 4928, 4929, 4931, 4924, 0, - 4096, 5120, 4864, 4928, 4929, 4931, 4924, 4926, - 0, 4096, 5120, 4864, 0, 4096, 5120, 4864, - 4928, 0, 4096, 5120, 4864, 4928, 0, 4096, - 5120, 4864, 4928, 4930, 0, 4096, 5120, 4864, - 4928, 0, 4096, 5120, 4864, 4928, 4932, 0, - 4096, 5120, 4864, 4928, 4932, 0, 4096, 5120, - 4864, 4928, 4936, 4934, 0, 4096, 5120, 4864, - 4928, 0, 4096, 5120, 4864, 4928, 4936, 0, - 4096, 5120, 4864, 4928, 4936, 0, 4096, 5120, - 4864, 4928, 4936, 4938, 0, 4096, 5120, 4864, - 4928, 4936, 0, 4096, 5120, 4864, 4928, 4944, - 4940, 0, 4096, 5120, 4864, 4928, 4944, 4940, - 0, 4096, 5120, 4864, 4928, 4944, 4945, 4942, - 0, 4096, 5120, 4864, 4928, 0, 4096, 5120, - 4864, 4928, 4944, 0, 4096, 5120, 4864, 4928, - 4944, 0, 4096, 5120, 4864, 4928, 4944, 4946, - 0, 4096, 5120, 4864, 4928, 4944, 0, 4096, - 5120, 4864, 4928, 4944, 4948, 0, 4096, 5120, - 4864, 4928, 4944, 4948, 0, 4096, 5120, 4864, - 4928, 4944, 4952, 4950, 0, 4096, 5120, 4864, - 4928, 4944, 0, 4096, 5120, 4864, 4928, 4960, - 4952, 0, 4096, 5120, 4864, 4928, 4960, 4952, - 0, 4096, 5120, 4864, 4928, 4960, 4952, 4954, - 0, 4096, 5120, 4864, 4928, 4960, 4952, 0, - 4096, 5120, 4864, 4928, 4960, 4961, 4956, 0, - 4096, 5120, 4864, 4928, 4960, 4961, 4956, 0, - 4096, 5120, 4864, 4928, 4960, 4961, 4956, 4958, - 0, 4096, 5120, 4864, 4928, 0, 4096, 5120, - 4864, 4992, 4960, 0, 4096, 5120, 4864, 4992, - 4960, 0, 4096, 5120, 4864, 4992, 4960, 4962, - 0, 4096, 5120, 4864, 4992, 4960, 0, 4096, - 5120, 4864, 4992, 4960, 4964, 0, 4096, 5120, - 4864, 4992, 4960, 4964, 0, 4096, 5120, 4864, - 4992, 4960, 4968, 4966, 0, 4096, 5120, 4864, - 4992, 4960, 0, 4096, 5120, 4864, 4992, 4960, - 4968, 0, 4096, 5120, 4864, 4992, 4960, 4968, - 0, 4096, 5120, 4864, 4992, 4960, 4968, 4970, - 0, 4096, 5120, 4864, 4992, 4960, 4968, 0, - 4096, 5120, 4864, 4992, 4960, 4976, 4972, 0, - 4096, 5120, 4864, 4992, 4960, 4976, 4972, 0, - 4096, 5120, 4864, 4992, 4960, 4976, 4977, 4974, - 0, 4096, 5120, 4864, 4992, 4960, 0, 4096, - 5120, 4864, 4992, 4993, 4976, 0, 4096, 5120, - 4864, 4992, 4993, 4976, 0, 4096, 5120, 4864, - 4992, 4993, 4976, 4978, 0, 4096, 5120, 4864, - 4992, 4993, 4976, 0, 4096, 5120, 4864, 4992, - 4993, 4976, 4980, 0, 4096, 5120, 4864, 4992, - 4993, 4976, 4980, 0, 4096, 5120, 4864, 4992, - 4993, 4976, 4984, 4982, 0, 4096, 5120, 4864, - 4992, 4993, 4976, 0, 4096, 5120, 4864, 4992, - 4993, 4976, 4984, 0, 4096, 5120, 4864, 4992, - 4993, 4995, 4984, 0, 4096, 5120, 4864, 4992, - 4993, 4995, 4984, 4986, 0, 4096, 5120, 4864, - 4992, 4993, 4995, 4984, 0, 4096, 5120, 4864, - 4992, 4993, 4995, 4984, 4988, 0, 4096, 5120, - 4864, 4992, 4993, 4995, 4984, 4988, 0, 4096, - 5120, 4864, 4992, 4993, 4995, 4984, 4988, 4990, - 0, 4096, 5120, 4864, 0, 4096, 5120, 4864, - 4992, 0, 4096, 5120, 5121, 4992, 0, 4096, - 5120, 5121, 4992, 4994, 0, 4096, 5120, 5121, - 4992, 0, 4096, 5120, 5121, 4992, 4996, 0, - 4096, 5120, 5121, 4992, 4996, 0, 4096, 5120, - 5121, 4992, 5000, 4998, 0, 4096, 5120, 5121, - 4992, 0, 4096, 5120, 5121, 4992, 5000, 0, - 4096, 5120, 5121, 4992, 5000, 0, 4096, 5120, - 5121, 4992, 5000, 5002, 0, 4096, 5120, 5121, - 4992, 5000, 0, 4096, 5120, 5121, 4992, 5008, - 5004, 0, 4096, 5120, 5121, 4992, 5008, 5004, - 0, 4096, 5120, 5121, 4992, 5008, 5009, 5006, - 0, 4096, 5120, 5121, 4992, 0, 4096, 5120, - 5121, 4992, 5008, 0, 4096, 5120, 5121, 4992, - 5008, 0, 4096, 5120, 5121, 4992, 5008, 5010, - 0, 4096, 5120, 5121, 4992, 5008, 0, 4096, - 5120, 5121, 4992, 5008, 5012, 0, 4096, 5120, - 5121, 4992, 5008, 5012, 0, 4096, 5120, 5121, - 4992, 5008, 5016, 5014, 0, 4096, 5120, 5121, - 4992, 5008, 0, 4096, 5120, 5121, 4992, 5024, - 5016, 0, 4096, 5120, 5121, 4992, 5024, 5016, - 0, 4096, 5120, 5121, 4992, 5024, 5016, 5018, - 0, 4096, 5120, 5121, 4992, 5024, 5016, 0, - 4096, 5120, 5121, 4992, 5024, 5025, 5020, 0, - 4096, 5120, 5121, 4992, 5024, 5025, 5020, 0, - 4096, 5120, 5121, 4992, 5024, 5025, 5020, 5022, - 0, 4096, 5120, 5121, 4992, 0, 4096, 5120, - 5121, 4992, 5024, 0, 4096, 5120, 5121, 4992, - 5024, 0, 4096, 5120, 5121, 4992, 5024, 5026, - 0, 4096, 5120, 5121, 4992, 5024, 0, 4096, - 5120, 5121, 4992, 5024, 5028, 0, 4096, 5120, - 5121, 4992, 5024, 5028, 0, 4096, 5120, 5121, - 4992, 5024, 5032, 5030, 0, 4096, 5120, 5121, - 4992, 5024, 0, 4096, 5120, 5121, 4992, 5024, - 5032, 0, 4096, 5120, 5121, 4992, 5024, 5032, - 0, 4096, 5120, 5121, 4992, 5024, 5032, 5034, - 0, 4096, 5120, 5121, 4992, 5024, 5032, 0, - 4096, 5120, 5121, 4992, 5024, 5040, 5036, 0, - 4096, 5120, 5121, 4992, 5024, 5040, 5036, 0, - 4096, 5120, 5121, 4992, 5024, 5040, 5041, 5038, - 0, 4096, 5120, 5121, 4992, 5024, 0, 4096, - 5120, 5121, 4992, 5056, 5040, 0, 4096, 5120, - 5121, 4992, 5056, 5040, 0, 4096, 5120, 5121, - 4992, 5056, 5040, 5042, 0, 4096, 5120, 5121, - 4992, 5056, 5040, 0, 4096, 5120, 5121, 4992, - 5056, 5040, 5044, 0, 4096, 5120, 5121, 4992, - 5056, 5040, 5044, 0, 4096, 5120, 5121, 4992, - 5056, 5040, 5048, 5046, 0, 4096, 5120, 5121, - 4992, 5056, 5040, 0, 4096, 5120, 5121, 4992, - 5056, 5057, 5048, 0, 4096, 5120, 5121, 4992, - 5056, 5057, 5048, 0, 4096, 5120, 5121, 4992, - 5056, 5057, 5048, 5050, 0, 4096, 5120, 5121, - 4992, 5056, 5057, 5048, 0, 4096, 5120, 5121, - 4992, 5056, 5057, 5048, 5052, 0, 4096, 5120, - 5121, 4992, 5056, 5057, 5059, 5052, 0, 4096, - 5120, 5121, 4992, 5056, 5057, 5059, 5052, 5054, - 0, 4096, 5120, 5121, 4992, 0, 4096, 5120, - 5121, 4992, 5056, 0, 4096, 5120, 5121, 4992, - 5056, 0, 4096, 5120, 5121, 4992, 5056, 5058, - 0, 4096, 5120, 5121, 5123, 5056, 0, 4096, - 5120, 5121, 5123, 5056, 5060, 0, 4096, 5120, - 5121, 5123, 5056, 5060, 0, 4096, 5120, 5121, - 5123, 5056, 5064, 5062, 0, 4096, 5120, 5121, - 5123, 5056, 0, 4096, 5120, 5121, 5123, 5056, - 5064, 0, 4096, 5120, 5121, 5123, 5056, 5064, - 0, 4096, 5120, 5121, 5123, 5056, 5064, 5066, - 0, 4096, 5120, 5121, 5123, 5056, 5064, 0, - 4096, 5120, 5121, 5123, 5056, 5072, 5068, 0, - 4096, 5120, 5121, 5123, 5056, 5072, 5068, 0, - 4096, 5120, 5121, 5123, 5056, 5072, 5073, 5070, - 0, 4096, 5120, 5121, 5123, 5056, 0, 4096, - 5120, 5121, 5123, 5056, 5072, 0, 4096, 5120, - 5121, 5123, 5056, 5072, 0, 4096, 5120, 5121, - 5123, 5056, 5072, 5074, 0, 4096, 5120, 5121, - 5123, 5056, 5072, 0, 4096, 5120, 5121, 5123, - 5056, 5072, 5076, 0, 4096, 5120, 5121, 5123, - 5056, 5072, 5076, 0, 4096, 5120, 5121, 5123, - 5056, 5072, 5080, 5078, 0, 4096, 5120, 5121, - 5123, 5056, 5072, 0, 4096, 5120, 5121, 5123, - 5056, 5088, 5080, 0, 4096, 5120, 5121, 5123, - 5056, 5088, 5080, 0, 4096, 5120, 5121, 5123, - 5056, 5088, 5080, 5082, 0, 4096, 5120, 5121, - 5123, 5056, 5088, 5080, 0, 4096, 5120, 5121, - 5123, 5056, 5088, 5089, 5084, 0, 4096, 5120, - 5121, 5123, 5056, 5088, 5089, 5084, 0, 4096, - 5120, 5121, 5123, 5056, 5088, 5089, 5084, 5086, - 0, 4096, 5120, 5121, 5123, 5056, 0, 4096, - 5120, 5121, 5123, 5056, 5088, 0, 4096, 5120, - 5121, 5123, 5056, 5088, 0, 4096, 5120, 5121, - 5123, 5056, 5088, 5090, 0, 4096, 5120, 5121, - 5123, 5056, 5088, 0, 4096, 5120, 5121, 5123, - 5056, 5088, 5092, 0, 4096, 5120, 5121, 5123, - 5056, 5088, 5092, 0, 4096, 5120, 5121, 5123, - 5056, 5088, 5096, 5094, 0, 4096, 5120, 5121, - 5123, 5127, 5088, 0, 4096, 5120, 5121, 5123, - 5127, 5088, 5096, 0, 4096, 5120, 5121, 5123, - 5127, 5088, 5096, 0, 4096, 5120, 5121, 5123, - 5127, 5088, 5096, 5098, 0, 4096, 5120, 5121, - 5123, 5127, 5088, 5096, 0, 4096, 5120, 5121, - 5123, 5127, 5088, 5104, 5100, 0, 4096, 5120, - 5121, 5123, 5127, 5088, 5104, 5100, 0, 4096, - 5120, 5121, 5123, 5127, 5088, 5104, 5105, 5102, - 0, 4096, 5120, 5121, 5123, 5127, 5088, 0, - 4096, 5120, 5121, 5123, 5127, 5088, 5104, 0, - 4096, 5120, 5121, 5123, 5127, 5088, 5104, 0, - 4096, 5120, 5121, 5123, 5127, 5088, 5104, 5106, - 0, 4096, 5120, 5121, 5123, 5127, 5088, 5104, - 0, 4096, 5120, 5121, 5123, 5127, 5088, 5104, - 5108, 0, 4096, 5120, 5121, 5123, 5127, 5088, - 5104, 5108, 0, 4096, 5120, 5121, 5123, 5127, - 5088, 5104, 5112, 5110, 0, 4096, 5120, 5121, - 5123, 5127, 5088, 5104, 0, 4096, 5120, 5121, - 5123, 5127, 5088, 5104, 5112, 0, 4096, 5120, - 5121, 5123, 5127, 5088, 5104, 5112, 0, 4096, - 5120, 5121, 5123, 5127, 5088, 5104, 5112, 5114, - 0, 4096, 5120, 5121, 5123, 5127, 5088, 5104, - 5112, 0, 4096, 5120, 5121, 5123, 5127, 5088, - 5104, 5112, 5116, 0, 4096, 5120, 5121, 5123, - 5127, 5088, 5104, 5112, 5116, 0, 4096, 5120, - 5121, 5123, 5127, 5088, 5104, 5112, 5116, 5118, - 0, 4096, 0, 4096, 5120, 0, 4096, 5120, - 0, 4096, 5120, 5122, 0, 4096, 5120, 0, - 4096, 5120, 5124, 0, 4096, 5120, 5124, 0, - 4096, 5120, 5128, 5126, 0, 4096, 5120, 0, - 4096, 5120, 5128, 0, 4096, 5120, 5128, 0, - 4096, 5120, 5128, 5130, 0, 4096, 5120, 5128, - 0, 4096, 5120, 5136, 5132, 0, 4096, 5120, - 5136, 5132, 0, 4096, 5120, 5136, 5137, 5134, - 0, 4096, 5120, 0, 4096, 5120, 5136, 0, - 4096, 5120, 5136, 0, 4096, 5120, 5136, 5138, - 0, 4096, 5120, 5136, 0, 4096, 5120, 5136, - 5140, 0, 4096, 5120, 5136, 5140, 0, 4096, - 5120, 5136, 5144, 5142, 0, 4096, 5120, 5136, - 0, 4096, 5120, 5152, 5144, 0, 4096, 5120, - 5152, 5144, 0, 4096, 5120, 5152, 5144, 5146, - 0, 4096, 5120, 5152, 5144, 0, 4096, 5120, - 5152, 5153, 5148, 0, 4096, 5120, 5152, 5153, - 5148, 0, 4096, 5120, 5152, 5153, 5148, 5150, - 0, 4096, 5120, 0, 4096, 5120, 5152, 0, - 4096, 5120, 5152, 0, 4096, 5120, 5152, 5154, - 0, 4096, 5120, 5152, 0, 4096, 5120, 5152, - 5156, 0, 4096, 5120, 5152, 5156, 0, 4096, - 5120, 5152, 5160, 5158, 0, 4096, 5120, 5152, - 0, 4096, 5120, 5152, 5160, 0, 4096, 5120, - 5152, 5160, 0, 4096, 5120, 5152, 5160, 5162, - 0, 4096, 5120, 5152, 5160, 0, 4096, 5120, - 5152, 5168, 5164, 0, 4096, 5120, 5152, 5168, - 5164, 0, 4096, 5120, 5152, 5168, 5169, 5166, - 0, 4096, 5120, 5152, 0, 4096, 5120, 5184, - 5168, 0, 4096, 5120, 5184, 5168, 0, 4096, - 5120, 5184, 5168, 5170, 0, 4096, 5120, 5184, - 5168, 0, 4096, 5120, 5184, 5168, 5172, 0, - 4096, 5120, 5184, 5168, 5172, 0, 4096, 5120, - 5184, 5168, 5176, 5174, 0, 4096, 5120, 5184, - 5168, 0, 4096, 5120, 5184, 5185, 5176, 0, - 4096, 5120, 5184, 5185, 5176, 0, 4096, 5120, - 5184, 5185, 5176, 5178, 0, 4096, 5120, 5184, - 5185, 5176, 0, 4096, 5120, 5184, 5185, 5176, - 5180, 0, 4096, 5120, 5184, 5185, 5187, 5180, - 0, 4096, 5120, 5184, 5185, 5187, 5180, 5182, - 0, 4096, 5120, 0, 4096, 5120, 5184, 0, - 4096, 5120, 5184, 0, 4096, 5120, 5184, 5186, - 0, 4096, 5120, 5184, 0, 4096, 5120, 5184, - 5188, 0, 4096, 5120, 5184, 5188, 0, 4096, - 5120, 5184, 5192, 5190, 0, 4096, 5120, 5184, - 0, 4096, 5120, 5184, 5192, 0, 4096, 5120, - 5184, 5192, 0, 4096, 5120, 5184, 5192, 5194, - 0, 4096, 5120, 5184, 5192, 0, 4096, 5120, - 5184, 5200, 5196, 0, 4096, 5120, 5184, 5200, - 5196, 0, 4096, 5120, 5184, 5200, 5201, 5198, - 0, 4096, 5120, 5184, 0, 4096, 5120, 5184, - 5200, 0, 4096, 5120, 5184, 5200, 0, 4096, - 5120, 5184, 5200, 5202, 0, 4096, 5120, 5184, - 5200, 0, 4096, 5120, 5184, 5200, 5204, 0, - 4096, 5120, 5184, 5200, 5204, 0, 4096, 5120, - 5184, 5200, 5208, 5206, 0, 4096, 5120, 5184, - 5200, 0, 4096, 5120, 5184, 5216, 5208, 0, - 4096, 5120, 5184, 5216, 5208, 0, 4096, 5120, - 5184, 5216, 5208, 5210, 0, 4096, 5120, 5184, - 5216, 5208, 0, 4096, 5120, 5184, 5216, 5217, - 5212, 0, 4096, 5120, 5184, 5216, 5217, 5212, - 0, 4096, 5120, 5184, 5216, 5217, 5212, 5214, - 0, 4096, 5120, 5184, 0, 4096, 5120, 5248, - 5216, 0, 4096, 5120, 5248, 5216, 0, 4096, - 5120, 5248, 5216, 5218, 0, 4096, 5120, 5248, - 5216, 0, 4096, 5120, 5248, 5216, 5220, 0, - 4096, 5120, 5248, 5216, 5220, 0, 4096, 5120, - 5248, 5216, 5224, 5222, 0, 4096, 5120, 5248, - 5216, 0, 4096, 5120, 5248, 5216, 5224, 0, - 4096, 5120, 5248, 5216, 5224, 0, 4096, 5120, - 5248, 5216, 5224, 5226, 0, 4096, 5120, 5248, - 5216, 5224, 0, 4096, 5120, 5248, 5216, 5232, - 5228, 0, 4096, 5120, 5248, 5216, 5232, 5228, - 0, 4096, 5120, 5248, 5216, 5232, 5233, 5230, - 0, 4096, 5120, 5248, 5216, 0, 4096, 5120, - 5248, 5249, 5232, 0, 4096, 5120, 5248, 5249, - 5232, 0, 4096, 5120, 5248, 5249, 5232, 5234, - 0, 4096, 5120, 5248, 5249, 5232, 0, 4096, - 5120, 5248, 5249, 5232, 5236, 0, 4096, 5120, - 5248, 5249, 5232, 5236, 0, 4096, 5120, 5248, - 5249, 5232, 5240, 5238, 0, 4096, 5120, 5248, - 5249, 5232, 0, 4096, 5120, 5248, 5249, 5232, - 5240, 0, 4096, 5120, 5248, 5249, 5251, 5240, - 0, 4096, 5120, 5248, 5249, 5251, 5240, 5242, - 0, 4096, 5120, 5248, 5249, 5251, 5240, 0, - 4096, 5120, 5248, 5249, 5251, 5240, 5244, 0, - 4096, 5120, 5248, 5249, 5251, 5240, 5244, 0, - 4096, 5120, 5248, 5249, 5251, 5240, 5244, 5246, - 0, 4096, 5120, 0, 4096, 5120, 5248, 0, - 4096, 5120, 5248, 0, 4096, 5120, 5248, 5250, - 0, 4096, 5120, 5248, 0, 4096, 5120, 5248, - 5252, 0, 4096, 5120, 5248, 5252, 0, 4096, - 5120, 5248, 5256, 5254, 0, 4096, 5120, 5248, - 0, 4096, 5120, 5248, 5256, 0, 4096, 5120, - 5248, 5256, 0, 4096, 5120, 5248, 5256, 5258, - 0, 4096, 5120, 5248, 5256, 0, 4096, 5120, - 5248, 5264, 5260, 0, 4096, 5120, 5248, 5264, - 5260, 0, 4096, 5120, 5248, 5264, 5265, 5262, - 0, 4096, 5120, 5248, 0, 4096, 5120, 5248, - 5264, 0, 4096, 5120, 5248, 5264, 0, 4096, - 5120, 5248, 5264, 5266, 0, 4096, 5120, 5248, - 5264, 0, 4096, 5120, 5248, 5264, 5268, 0, - 4096, 5120, 5248, 5264, 5268, 0, 4096, 5120, - 5248, 5264, 5272, 5270, 0, 4096, 5120, 5248, - 5264, 0, 4096, 5120, 5248, 5280, 5272, 0, - 4096, 5120, 5248, 5280, 5272, 0, 4096, 5120, - 5248, 5280, 5272, 5274, 0, 4096, 5120, 5248, - 5280, 5272, 0, 4096, 5120, 5248, 5280, 5281, - 5276, 0, 4096, 5120, 5248, 5280, 5281, 5276, - 0, 4096, 5120, 5248, 5280, 5281, 5276, 5278, - 0, 4096, 5120, 5248, 0, 4096, 5120, 5248, - 5280, 0, 4096, 5120, 5248, 5280, 0, 4096, - 5120, 5248, 5280, 5282, 0, 4096, 5120, 5248, - 5280, 0, 4096, 5120, 5248, 5280, 5284, 0, - 4096, 5120, 5248, 5280, 5284, 0, 4096, 5120, - 5248, 5280, 5288, 5286, 0, 4096, 5120, 5248, - 5280, 0, 4096, 5120, 5248, 5280, 5288, 0, - 4096, 5120, 5248, 5280, 5288, 0, 4096, 5120, - 5248, 5280, 5288, 5290, 0, 4096, 5120, 5248, - 5280, 5288, 0, 4096, 5120, 5248, 5280, 5296, - 5292, 0, 4096, 5120, 5248, 5280, 5296, 5292, - 0, 4096, 5120, 5248, 5280, 5296, 5297, 5294, - 0, 4096, 5120, 5248, 5280, 0, 4096, 5120, - 5248, 5312, 5296, 0, 4096, 5120, 5248, 5312, - 5296, 0, 4096, 5120, 5248, 5312, 5296, 5298, - 0, 4096, 5120, 5248, 5312, 5296, 0, 4096, - 5120, 5248, 5312, 5296, 5300, 0, 4096, 5120, - 5248, 5312, 5296, 5300, 0, 4096, 5120, 5248, - 5312, 5296, 5304, 5302, 0, 4096, 5120, 5248, - 5312, 5296, 0, 4096, 5120, 5248, 5312, 5313, - 5304, 0, 4096, 5120, 5248, 5312, 5313, 5304, - 0, 4096, 5120, 5248, 5312, 5313, 5304, 5306, - 0, 4096, 5120, 5248, 5312, 5313, 5304, 0, - 4096, 5120, 5248, 5312, 5313, 5304, 5308, 0, - 4096, 5120, 5248, 5312, 5313, 5315, 5308, 0, - 4096, 5120, 5248, 5312, 5313, 5315, 5308, 5310, - 0, 4096, 5120, 5248, 0, 4096, 5120, 5376, - 5312, 0, 4096, 5120, 5376, 5312, 0, 4096, - 5120, 5376, 5312, 5314, 0, 4096, 5120, 5376, - 5312, 0, 4096, 5120, 5376, 5312, 5316, 0, - 4096, 5120, 5376, 5312, 5316, 0, 4096, 5120, - 5376, 5312, 5320, 5318, 0, 4096, 5120, 5376, - 5312, 0, 4096, 5120, 5376, 5312, 5320, 0, - 4096, 5120, 5376, 5312, 5320, 0, 4096, 5120, - 5376, 5312, 5320, 5322, 0, 4096, 5120, 5376, - 5312, 5320, 0, 4096, 5120, 5376, 5312, 5328, - 5324, 0, 4096, 5120, 5376, 5312, 5328, 5324, - 0, 4096, 5120, 5376, 5312, 5328, 5329, 5326, - 0, 4096, 5120, 5376, 5312, 0, 4096, 5120, - 5376, 5312, 5328, 0, 4096, 5120, 5376, 5312, - 5328, 0, 4096, 5120, 5376, 5312, 5328, 5330, - 0, 4096, 5120, 5376, 5312, 5328, 0, 4096, - 5120, 5376, 5312, 5328, 5332, 0, 4096, 5120, - 5376, 5312, 5328, 5332, 0, 4096, 5120, 5376, - 5312, 5328, 5336, 5334, 0, 4096, 5120, 5376, - 5312, 5328, 0, 4096, 5120, 5376, 5312, 5344, - 5336, 0, 4096, 5120, 5376, 5312, 5344, 5336, - 0, 4096, 5120, 5376, 5312, 5344, 5336, 5338, - 0, 4096, 5120, 5376, 5312, 5344, 5336, 0, - 4096, 5120, 5376, 5312, 5344, 5345, 5340, 0, - 4096, 5120, 5376, 5312, 5344, 5345, 5340, 0, - 4096, 5120, 5376, 5312, 5344, 5345, 5340, 5342, - 0, 4096, 5120, 5376, 5312, 0, 4096, 5120, - 5376, 5377, 5344, 0, 4096, 5120, 5376, 5377, - 5344, 0, 4096, 5120, 5376, 5377, 5344, 5346, - 0, 4096, 5120, 5376, 5377, 5344, 0, 4096, - 5120, 5376, 5377, 5344, 5348, 0, 4096, 5120, - 5376, 5377, 5344, 5348, 0, 4096, 5120, 5376, - 5377, 5344, 5352, 5350, 0, 4096, 5120, 5376, - 5377, 5344, 0, 4096, 5120, 5376, 5377, 5344, - 5352, 0, 4096, 5120, 5376, 5377, 5344, 5352, - 0, 4096, 5120, 5376, 5377, 5344, 5352, 5354, - 0, 4096, 5120, 5376, 5377, 5344, 5352, 0, - 4096, 5120, 5376, 5377, 5344, 5360, 5356, 0, - 4096, 5120, 5376, 5377, 5344, 5360, 5356, 0, - 4096, 5120, 5376, 5377, 5344, 5360, 5361, 5358, - 0, 4096, 5120, 5376, 5377, 5344, 0, 4096, - 5120, 5376, 5377, 5344, 5360, 0, 4096, 5120, - 5376, 5377, 5379, 5360, 0, 4096, 5120, 5376, - 5377, 5379, 5360, 5362, 0, 4096, 5120, 5376, - 5377, 5379, 5360, 0, 4096, 5120, 5376, 5377, - 5379, 5360, 5364, 0, 4096, 5120, 5376, 5377, - 5379, 5360, 5364, 0, 4096, 5120, 5376, 5377, - 5379, 5360, 5368, 5366, 0, 4096, 5120, 5376, - 5377, 5379, 5360, 0, 4096, 5120, 5376, 5377, - 5379, 5360, 5368, 0, 4096, 5120, 5376, 5377, - 5379, 5360, 5368, 0, 4096, 5120, 5376, 5377, - 5379, 5360, 5368, 5370, 0, 4096, 5120, 5376, - 5377, 5379, 5383, 5368, 0, 4096, 5120, 5376, - 5377, 5379, 5383, 5368, 5372, 0, 4096, 5120, - 5376, 5377, 5379, 5383, 5368, 5372, 0, 4096, - 5120, 5376, 5377, 5379, 5383, 5368, 5372, 5374, - 0, 4096, 5120, 0, 4096, 5120, 5376, 0, - 4096, 5120, 5376, 0, 4096, 5120, 5376, 5378, - 0, 4096, 5120, 5376, 0, 4096, 5120, 5376, - 5380, 0, 4096, 5120, 5376, 5380, 0, 4096, - 5120, 5376, 5384, 5382, 0, 4096, 5120, 5376, - 0, 4096, 5120, 5376, 5384, 0, 4096, 5120, - 5376, 5384, 0, 4096, 5120, 5376, 5384, 5386, - 0, 4096, 5120, 5376, 5384, 0, 4096, 5120, - 5376, 5392, 5388, 0, 4096, 5120, 5376, 5392, - 5388, 0, 4096, 5120, 5376, 5392, 5393, 5390, - 0, 4096, 5120, 5376, 0, 4096, 5120, 5376, - 5392, 0, 4096, 5120, 5376, 5392, 0, 4096, - 5120, 5376, 5392, 5394, 0, 4096, 5120, 5376, - 5392, 0, 4096, 5120, 5376, 5392, 5396, 0, - 4096, 5120, 5376, 5392, 5396, 0, 4096, 5120, - 5376, 5392, 5400, 5398, 0, 4096, 5120, 5376, - 5392, 0, 4096, 5120, 5376, 5408, 5400, 0, - 4096, 5120, 5376, 5408, 5400, 0, 4096, 5120, - 5376, 5408, 5400, 5402, 0, 4096, 5120, 5376, - 5408, 5400, 0, 4096, 5120, 5376, 5408, 5409, - 5404, 0, 4096, 5120, 5376, 5408, 5409, 5404, - 0, 4096, 5120, 5376, 5408, 5409, 5404, 5406, - 0, 4096, 5120, 5376, 0, 4096, 5120, 5376, - 5408, 0, 4096, 5120, 5376, 5408, 0, 4096, - 5120, 5376, 5408, 5410, 0, 4096, 5120, 5376, - 5408, 0, 4096, 5120, 5376, 5408, 5412, 0, - 4096, 5120, 5376, 5408, 5412, 0, 4096, 5120, - 5376, 5408, 5416, 5414, 0, 4096, 5120, 5376, - 5408, 0, 4096, 5120, 5376, 5408, 5416, 0, - 4096, 5120, 5376, 5408, 5416, 0, 4096, 5120, - 5376, 5408, 5416, 5418, 0, 4096, 5120, 5376, - 5408, 5416, 0, 4096, 5120, 5376, 5408, 5424, - 5420, 0, 4096, 5120, 5376, 5408, 5424, 5420, - 0, 4096, 5120, 5376, 5408, 5424, 5425, 5422, - 0, 4096, 5120, 5376, 5408, 0, 4096, 5120, - 5376, 5440, 5424, 0, 4096, 5120, 5376, 5440, - 5424, 0, 4096, 5120, 5376, 5440, 5424, 5426, - 0, 4096, 5120, 5376, 5440, 5424, 0, 4096, - 5120, 5376, 5440, 5424, 5428, 0, 4096, 5120, - 5376, 5440, 5424, 5428, 0, 4096, 5120, 5376, - 5440, 5424, 5432, 5430, 0, 4096, 5120, 5376, - 5440, 5424, 0, 4096, 5120, 5376, 5440, 5441, - 5432, 0, 4096, 5120, 5376, 5440, 5441, 5432, - 0, 4096, 5120, 5376, 5440, 5441, 5432, 5434, - 0, 4096, 5120, 5376, 5440, 5441, 5432, 0, - 4096, 5120, 5376, 5440, 5441, 5432, 5436, 0, - 4096, 5120, 5376, 5440, 5441, 5443, 5436, 0, - 4096, 5120, 5376, 5440, 5441, 5443, 5436, 5438, - 0, 4096, 5120, 5376, 0, 4096, 5120, 5376, - 5440, 0, 4096, 5120, 5376, 5440, 0, 4096, - 5120, 5376, 5440, 5442, 0, 4096, 5120, 5376, - 5440, 0, 4096, 5120, 5376, 5440, 5444, 0, - 4096, 5120, 5376, 5440, 5444, 0, 4096, 5120, - 5376, 5440, 5448, 5446, 0, 4096, 5120, 5376, - 5440, 0, 4096, 5120, 5376, 5440, 5448, 0, - 4096, 5120, 5376, 5440, 5448, 0, 4096, 5120, - 5376, 5440, 5448, 5450, 0, 4096, 5120, 5376, - 5440, 5448, 0, 4096, 5120, 5376, 5440, 5456, - 5452, 0, 4096, 5120, 5376, 5440, 5456, 5452, - 0, 4096, 5120, 5376, 5440, 5456, 5457, 5454, - 0, 4096, 5120, 5376, 5440, 0, 4096, 5120, - 5376, 5440, 5456, 0, 4096, 5120, 5376, 5440, - 5456, 0, 4096, 5120, 5376, 5440, 5456, 5458, - 0, 4096, 5120, 5376, 5440, 5456, 0, 4096, - 5120, 5376, 5440, 5456, 5460, 0, 4096, 5120, - 5376, 5440, 5456, 5460, 0, 4096, 5120, 5376, - 5440, 5456, 5464, 5462, 0, 4096, 5120, 5376, - 5440, 5456, 0, 4096, 5120, 5376, 5440, 5472, - 5464, 0, 4096, 5120, 5376, 5440, 5472, 5464, - 0, 4096, 5120, 5376, 5440, 5472, 5464, 5466, - 0, 4096, 5120, 5376, 5440, 5472, 5464, 0, - 4096, 5120, 5376, 5440, 5472, 5473, 5468, 0, - 4096, 5120, 5376, 5440, 5472, 5473, 5468, 0, - 4096, 5120, 5376, 5440, 5472, 5473, 5468, 5470, - 0, 4096, 5120, 5376, 5440, 0, 4096, 5120, - 5376, 5504, 5472, 0, 4096, 5120, 5376, 5504, - 5472, 0, 4096, 5120, 5376, 5504, 5472, 5474, - 0, 4096, 5120, 5376, 5504, 5472, 0, 4096, - 5120, 5376, 5504, 5472, 5476, 0, 4096, 5120, - 5376, 5504, 5472, 5476, 0, 4096, 5120, 5376, - 5504, 5472, 5480, 5478, 0, 4096, 5120, 5376, - 5504, 5472, 0, 4096, 5120, 5376, 5504, 5472, - 5480, 0, 4096, 5120, 5376, 5504, 5472, 5480, - 0, 4096, 5120, 5376, 5504, 5472, 5480, 5482, - 0, 4096, 5120, 5376, 5504, 5472, 5480, 0, - 4096, 5120, 5376, 5504, 5472, 5488, 5484, 0, - 4096, 5120, 5376, 5504, 5472, 5488, 5484, 0, - 4096, 5120, 5376, 5504, 5472, 5488, 5489, 5486, - 0, 4096, 5120, 5376, 5504, 5472, 0, 4096, - 5120, 5376, 5504, 5505, 5488, 0, 4096, 5120, - 5376, 5504, 5505, 5488, 0, 4096, 5120, 5376, - 5504, 5505, 5488, 5490, 0, 4096, 5120, 5376, - 5504, 5505, 5488, 0, 4096, 5120, 5376, 5504, - 5505, 5488, 5492, 0, 4096, 5120, 5376, 5504, - 5505, 5488, 5492, 0, 4096, 5120, 5376, 5504, - 5505, 5488, 5496, 5494, 0, 4096, 5120, 5376, - 5504, 5505, 5488, 0, 4096, 5120, 5376, 5504, - 5505, 5488, 5496, 0, 4096, 5120, 5376, 5504, - 5505, 5507, 5496, 0, 4096, 5120, 5376, 5504, - 5505, 5507, 5496, 5498, 0, 4096, 5120, 5376, - 5504, 5505, 5507, 5496, 0, 4096, 5120, 5376, - 5504, 5505, 5507, 5496, 5500, 0, 4096, 5120, - 5376, 5504, 5505, 5507, 5496, 5500, 0, 4096, - 5120, 5376, 5504, 5505, 5507, 5496, 5500, 5502, - 0, 4096, 5120, 5376, 0, 4096, 5120, 5632, - 5504, 0, 4096, 5120, 5632, 5504, 0, 4096, - 5120, 5632, 5504, 5506, 0, 4096, 5120, 5632, - 5504, 0, 4096, 5120, 5632, 5504, 5508, 0, - 4096, 5120, 5632, 5504, 5508, 0, 4096, 5120, - 5632, 5504, 5512, 5510, 0, 4096, 5120, 5632, - 5504, 0, 4096, 5120, 5632, 5504, 5512, 0, - 4096, 5120, 5632, 5504, 5512, 0, 4096, 5120, - 5632, 5504, 5512, 5514, 0, 4096, 5120, 5632, - 5504, 5512, 0, 4096, 5120, 5632, 5504, 5520, - 5516, 0, 4096, 5120, 5632, 5504, 5520, 5516, - 0, 4096, 5120, 5632, 5504, 5520, 5521, 5518, - 0, 4096, 5120, 5632, 5504, 0, 4096, 5120, - 5632, 5504, 5520, 0, 4096, 5120, 5632, 5504, - 5520, 0, 4096, 5120, 5632, 5504, 5520, 5522, - 0, 4096, 5120, 5632, 5504, 5520, 0, 4096, - 5120, 5632, 5504, 5520, 5524, 0, 4096, 5120, - 5632, 5504, 5520, 5524, 0, 4096, 5120, 5632, - 5504, 5520, 5528, 5526, 0, 4096, 5120, 5632, - 5504, 5520, 0, 4096, 5120, 5632, 5504, 5536, - 5528, 0, 4096, 5120, 5632, 5504, 5536, 5528, - 0, 4096, 5120, 5632, 5504, 5536, 5528, 5530, - 0, 4096, 5120, 5632, 5504, 5536, 5528, 0, - 4096, 5120, 5632, 5504, 5536, 5537, 5532, 0, - 4096, 5120, 5632, 5504, 5536, 5537, 5532, 0, - 4096, 5120, 5632, 5504, 5536, 5537, 5532, 5534, - 0, 4096, 5120, 5632, 5504, 0, 4096, 5120, - 5632, 5504, 5536, 0, 4096, 5120, 5632, 5504, - 5536, 0, 4096, 5120, 5632, 5504, 5536, 5538, - 0, 4096, 5120, 5632, 5504, 5536, 0, 4096, - 5120, 5632, 5504, 5536, 5540, 0, 4096, 5120, - 5632, 5504, 5536, 5540, 0, 4096, 5120, 5632, - 5504, 5536, 5544, 5542, 0, 4096, 5120, 5632, - 5504, 5536, 0, 4096, 5120, 5632, 5504, 5536, - 5544, 0, 4096, 5120, 5632, 5504, 5536, 5544, - 0, 4096, 5120, 5632, 5504, 5536, 5544, 5546, - 0, 4096, 5120, 5632, 5504, 5536, 5544, 0, - 4096, 5120, 5632, 5504, 5536, 5552, 5548, 0, - 4096, 5120, 5632, 5504, 5536, 5552, 5548, 0, - 4096, 5120, 5632, 5504, 5536, 5552, 5553, 5550, - 0, 4096, 5120, 5632, 5504, 5536, 0, 4096, - 5120, 5632, 5504, 5568, 5552, 0, 4096, 5120, - 5632, 5504, 5568, 5552, 0, 4096, 5120, 5632, - 5504, 5568, 5552, 5554, 0, 4096, 5120, 5632, - 5504, 5568, 5552, 0, 4096, 5120, 5632, 5504, - 5568, 5552, 5556, 0, 4096, 5120, 5632, 5504, - 5568, 5552, 5556, 0, 4096, 5120, 5632, 5504, - 5568, 5552, 5560, 5558, 0, 4096, 5120, 5632, - 5504, 5568, 5552, 0, 4096, 5120, 5632, 5504, - 5568, 5569, 5560, 0, 4096, 5120, 5632, 5504, - 5568, 5569, 5560, 0, 4096, 5120, 5632, 5504, - 5568, 5569, 5560, 5562, 0, 4096, 5120, 5632, - 5504, 5568, 5569, 5560, 0, 4096, 5120, 5632, - 5504, 5568, 5569, 5560, 5564, 0, 4096, 5120, - 5632, 5504, 5568, 5569, 5571, 5564, 0, 4096, - 5120, 5632, 5504, 5568, 5569, 5571, 5564, 5566, - 0, 4096, 5120, 5632, 5504, 0, 4096, 5120, - 5632, 5633, 5568, 0, 4096, 5120, 5632, 5633, - 5568, 0, 4096, 5120, 5632, 5633, 5568, 5570, - 0, 4096, 5120, 5632, 5633, 5568, 0, 4096, - 5120, 5632, 5633, 5568, 5572, 0, 4096, 5120, - 5632, 5633, 5568, 5572, 0, 4096, 5120, 5632, - 5633, 5568, 5576, 5574, 0, 4096, 5120, 5632, - 5633, 5568, 0, 4096, 5120, 5632, 5633, 5568, - 5576, 0, 4096, 5120, 5632, 5633, 5568, 5576, - 0, 4096, 5120, 5632, 5633, 5568, 5576, 5578, - 0, 4096, 5120, 5632, 5633, 5568, 5576, 0, - 4096, 5120, 5632, 5633, 5568, 5584, 5580, 0, - 4096, 5120, 5632, 5633, 5568, 5584, 5580, 0, - 4096, 5120, 5632, 5633, 5568, 5584, 5585, 5582, - 0, 4096, 5120, 5632, 5633, 5568, 0, 4096, - 5120, 5632, 5633, 5568, 5584, 0, 4096, 5120, - 5632, 5633, 5568, 5584, 0, 4096, 5120, 5632, - 5633, 5568, 5584, 5586, 0, 4096, 5120, 5632, - 5633, 5568, 5584, 0, 4096, 5120, 5632, 5633, - 5568, 5584, 5588, 0, 4096, 5120, 5632, 5633, - 5568, 5584, 5588, 0, 4096, 5120, 5632, 5633, - 5568, 5584, 5592, 5590, 0, 4096, 5120, 5632, - 5633, 5568, 5584, 0, 4096, 5120, 5632, 5633, - 5568, 5600, 5592, 0, 4096, 5120, 5632, 5633, - 5568, 5600, 5592, 0, 4096, 5120, 5632, 5633, - 5568, 5600, 5592, 5594, 0, 4096, 5120, 5632, - 5633, 5568, 5600, 5592, 0, 4096, 5120, 5632, - 5633, 5568, 5600, 5601, 5596, 0, 4096, 5120, - 5632, 5633, 5568, 5600, 5601, 5596, 0, 4096, - 5120, 5632, 5633, 5568, 5600, 5601, 5596, 5598, - 0, 4096, 5120, 5632, 5633, 5568, 0, 4096, - 5120, 5632, 5633, 5568, 5600, 0, 4096, 5120, - 5632, 5633, 5635, 5600, 0, 4096, 5120, 5632, - 5633, 5635, 5600, 5602, 0, 4096, 5120, 5632, - 5633, 5635, 5600, 0, 4096, 5120, 5632, 5633, - 5635, 5600, 5604, 0, 4096, 5120, 5632, 5633, - 5635, 5600, 5604, 0, 4096, 5120, 5632, 5633, - 5635, 5600, 5608, 5606, 0, 4096, 5120, 5632, - 5633, 5635, 5600, 0, 4096, 5120, 5632, 5633, - 5635, 5600, 5608, 0, 4096, 5120, 5632, 5633, - 5635, 5600, 5608, 0, 4096, 5120, 5632, 5633, - 5635, 5600, 5608, 5610, 0, 4096, 5120, 5632, - 5633, 5635, 5600, 5608, 0, 4096, 5120, 5632, - 5633, 5635, 5600, 5616, 5612, 0, 4096, 5120, - 5632, 5633, 5635, 5600, 5616, 5612, 0, 4096, - 5120, 5632, 5633, 5635, 5600, 5616, 5617, 5614, - 0, 4096, 5120, 5632, 5633, 5635, 5600, 0, - 4096, 5120, 5632, 5633, 5635, 5600, 5616, 0, - 4096, 5120, 5632, 5633, 5635, 5600, 5616, 0, - 4096, 5120, 5632, 5633, 5635, 5600, 5616, 5618, - 0, 4096, 5120, 5632, 5633, 5635, 5639, 5616, - 0, 4096, 5120, 5632, 5633, 5635, 5639, 5616, - 5620, 0, 4096, 5120, 5632, 5633, 5635, 5639, - 5616, 5620, 0, 4096, 5120, 5632, 5633, 5635, - 5639, 5616, 5624, 5622, 0, 4096, 5120, 5632, - 5633, 5635, 5639, 5616, 0, 4096, 5120, 5632, - 5633, 5635, 5639, 5616, 5624, 0, 4096, 5120, - 5632, 5633, 5635, 5639, 5616, 5624, 0, 4096, - 5120, 5632, 5633, 5635, 5639, 5616, 5624, 5626, - 0, 4096, 5120, 5632, 5633, 5635, 5639, 5616, - 5624, 0, 4096, 5120, 5632, 5633, 5635, 5639, - 5616, 5624, 5628, 0, 4096, 5120, 5632, 5633, - 5635, 5639, 5616, 5624, 5628, 0, 4096, 5120, - 5632, 5633, 5635, 5639, 5616, 5624, 5628, 5630, - 0, 4096, 5120, 0, 4096, 6144, 5632, 0, - 4096, 6144, 5632, 0, 4096, 6144, 5632, 5634, - 0, 4096, 6144, 5632, 0, 4096, 6144, 5632, - 5636, 0, 4096, 6144, 5632, 5636, 0, 4096, - 6144, 5632, 5640, 5638, 0, 4096, 6144, 5632, - 0, 4096, 6144, 5632, 5640, 0, 4096, 6144, - 5632, 5640, 0, 4096, 6144, 5632, 5640, 5642, - 0, 4096, 6144, 5632, 5640, 0, 4096, 6144, - 5632, 5648, 5644, 0, 4096, 6144, 5632, 5648, - 5644, 0, 4096, 6144, 5632, 5648, 5649, 5646, - 0, 4096, 6144, 5632, 0, 4096, 6144, 5632, - 5648, 0, 4096, 6144, 5632, 5648, 0, 4096, - 6144, 5632, 5648, 5650, 0, 4096, 6144, 5632, - 5648, 0, 4096, 6144, 5632, 5648, 5652, 0, - 4096, 6144, 5632, 5648, 5652, 0, 4096, 6144, - 5632, 5648, 5656, 5654, 0, 4096, 6144, 5632, - 5648, 0, 4096, 6144, 5632, 5664, 5656, 0, - 4096, 6144, 5632, 5664, 5656, 0, 4096, 6144, - 5632, 5664, 5656, 5658, 0, 4096, 6144, 5632, - 5664, 5656, 0, 4096, 6144, 5632, 5664, 5665, - 5660, 0, 4096, 6144, 5632, 5664, 5665, 5660, - 0, 4096, 6144, 5632, 5664, 5665, 5660, 5662, - 0, 4096, 6144, 5632, 0, 4096, 6144, 5632, - 5664, 0, 4096, 6144, 5632, 5664, 0, 4096, - 6144, 5632, 5664, 5666, 0, 4096, 6144, 5632, - 5664, 0, 4096, 6144, 5632, 5664, 5668, 0, - 4096, 6144, 5632, 5664, 5668, 0, 4096, 6144, - 5632, 5664, 5672, 5670, 0, 4096, 6144, 5632, - 5664, 0, 4096, 6144, 5632, 5664, 5672, 0, - 4096, 6144, 5632, 5664, 5672, 0, 4096, 6144, - 5632, 5664, 5672, 5674, 0, 4096, 6144, 5632, - 5664, 5672, 0, 4096, 6144, 5632, 5664, 5680, - 5676, 0, 4096, 6144, 5632, 5664, 5680, 5676, - 0, 4096, 6144, 5632, 5664, 5680, 5681, 5678, - 0, 4096, 6144, 5632, 5664, 0, 4096, 6144, - 5632, 5696, 5680, 0, 4096, 6144, 5632, 5696, - 5680, 0, 4096, 6144, 5632, 5696, 5680, 5682, - 0, 4096, 6144, 5632, 5696, 5680, 0, 4096, - 6144, 5632, 5696, 5680, 5684, 0, 4096, 6144, - 5632, 5696, 5680, 5684, 0, 4096, 6144, 5632, - 5696, 5680, 5688, 5686, 0, 4096, 6144, 5632, - 5696, 5680, 0, 4096, 6144, 5632, 5696, 5697, - 5688, 0, 4096, 6144, 5632, 5696, 5697, 5688, - 0, 4096, 6144, 5632, 5696, 5697, 5688, 5690, - 0, 4096, 6144, 5632, 5696, 5697, 5688, 0, - 4096, 6144, 5632, 5696, 5697, 5688, 5692, 0, - 4096, 6144, 5632, 5696, 5697, 5699, 5692, 0, - 4096, 6144, 5632, 5696, 5697, 5699, 5692, 5694, - 0, 4096, 6144, 5632, 0, 4096, 6144, 5632, - 5696, 0, 4096, 6144, 5632, 5696, 0, 4096, - 6144, 5632, 5696, 5698, 0, 4096, 6144, 5632, - 5696, 0, 4096, 6144, 5632, 5696, 5700, 0, - 4096, 6144, 5632, 5696, 5700, 0, 4096, 6144, - 5632, 5696, 5704, 5702, 0, 4096, 6144, 5632, - 5696, 0, 4096, 6144, 5632, 5696, 5704, 0, - 4096, 6144, 5632, 5696, 5704, 0, 4096, 6144, - 5632, 5696, 5704, 5706, 0, 4096, 6144, 5632, - 5696, 5704, 0, 4096, 6144, 5632, 5696, 5712, - 5708, 0, 4096, 6144, 5632, 5696, 5712, 5708, - 0, 4096, 6144, 5632, 5696, 5712, 5713, 5710, - 0, 4096, 6144, 5632, 5696, 0, 4096, 6144, - 5632, 5696, 5712, 0, 4096, 6144, 5632, 5696, - 5712, 0, 4096, 6144, 5632, 5696, 5712, 5714, - 0, 4096, 6144, 5632, 5696, 5712, 0, 4096, - 6144, 5632, 5696, 5712, 5716, 0, 4096, 6144, - 5632, 5696, 5712, 5716, 0, 4096, 6144, 5632, - 5696, 5712, 5720, 5718, 0, 4096, 6144, 5632, - 5696, 5712, 0, 4096, 6144, 5632, 5696, 5728, - 5720, 0, 4096, 6144, 5632, 5696, 5728, 5720, - 0, 4096, 6144, 5632, 5696, 5728, 5720, 5722, - 0, 4096, 6144, 5632, 5696, 5728, 5720, 0, - 4096, 6144, 5632, 5696, 5728, 5729, 5724, 0, - 4096, 6144, 5632, 5696, 5728, 5729, 5724, 0, - 4096, 6144, 5632, 5696, 5728, 5729, 5724, 5726, - 0, 4096, 6144, 5632, 5696, 0, 4096, 6144, - 5632, 5760, 5728, 0, 4096, 6144, 5632, 5760, - 5728, 0, 4096, 6144, 5632, 5760, 5728, 5730, - 0, 4096, 6144, 5632, 5760, 5728, 0, 4096, - 6144, 5632, 5760, 5728, 5732, 0, 4096, 6144, - 5632, 5760, 5728, 5732, 0, 4096, 6144, 5632, - 5760, 5728, 5736, 5734, 0, 4096, 6144, 5632, - 5760, 5728, 0, 4096, 6144, 5632, 5760, 5728, - 5736, 0, 4096, 6144, 5632, 5760, 5728, 5736, - 0, 4096, 6144, 5632, 5760, 5728, 5736, 5738, - 0, 4096, 6144, 5632, 5760, 5728, 5736, 0, - 4096, 6144, 5632, 5760, 5728, 5744, 5740, 0, - 4096, 6144, 5632, 5760, 5728, 5744, 5740, 0, - 4096, 6144, 5632, 5760, 5728, 5744, 5745, 5742, - 0, 4096, 6144, 5632, 5760, 5728, 0, 4096, - 6144, 5632, 5760, 5761, 5744, 0, 4096, 6144, - 5632, 5760, 5761, 5744, 0, 4096, 6144, 5632, - 5760, 5761, 5744, 5746, 0, 4096, 6144, 5632, - 5760, 5761, 5744, 0, 4096, 6144, 5632, 5760, - 5761, 5744, 5748, 0, 4096, 6144, 5632, 5760, - 5761, 5744, 5748, 0, 4096, 6144, 5632, 5760, - 5761, 5744, 5752, 5750, 0, 4096, 6144, 5632, - 5760, 5761, 5744, 0, 4096, 6144, 5632, 5760, - 5761, 5744, 5752, 0, 4096, 6144, 5632, 5760, - 5761, 5763, 5752, 0, 4096, 6144, 5632, 5760, - 5761, 5763, 5752, 5754, 0, 4096, 6144, 5632, - 5760, 5761, 5763, 5752, 0, 4096, 6144, 5632, - 5760, 5761, 5763, 5752, 5756, 0, 4096, 6144, - 5632, 5760, 5761, 5763, 5752, 5756, 0, 4096, - 6144, 5632, 5760, 5761, 5763, 5752, 5756, 5758, - 0, 4096, 6144, 5632, 0, 4096, 6144, 5632, - 5760, 0, 4096, 6144, 5632, 5760, 0, 4096, - 6144, 5632, 5760, 5762, 0, 4096, 6144, 5632, - 5760, 0, 4096, 6144, 5632, 5760, 5764, 0, - 4096, 6144, 5632, 5760, 5764, 0, 4096, 6144, - 5632, 5760, 5768, 5766, 0, 4096, 6144, 5632, - 5760, 0, 4096, 6144, 5632, 5760, 5768, 0, - 4096, 6144, 5632, 5760, 5768, 0, 4096, 6144, - 5632, 5760, 5768, 5770, 0, 4096, 6144, 5632, - 5760, 5768, 0, 4096, 6144, 5632, 5760, 5776, - 5772, 0, 4096, 6144, 5632, 5760, 5776, 5772, - 0, 4096, 6144, 5632, 5760, 5776, 5777, 5774, - 0, 4096, 6144, 5632, 5760, 0, 4096, 6144, - 5632, 5760, 5776, 0, 4096, 6144, 5632, 5760, - 5776, 0, 4096, 6144, 5632, 5760, 5776, 5778, - 0, 4096, 6144, 5632, 5760, 5776, 0, 4096, - 6144, 5632, 5760, 5776, 5780, 0, 4096, 6144, - 5632, 5760, 5776, 5780, 0, 4096, 6144, 5632, - 5760, 5776, 5784, 5782, 0, 4096, 6144, 5632, - 5760, 5776, 0, 4096, 6144, 5632, 5760, 5792, - 5784, 0, 4096, 6144, 5632, 5760, 5792, 5784, - 0, 4096, 6144, 5632, 5760, 5792, 5784, 5786, - 0, 4096, 6144, 5632, 5760, 5792, 5784, 0, - 4096, 6144, 5632, 5760, 5792, 5793, 5788, 0, - 4096, 6144, 5632, 5760, 5792, 5793, 5788, 0, - 4096, 6144, 5632, 5760, 5792, 5793, 5788, 5790, - 0, 4096, 6144, 5632, 5760, 0, 4096, 6144, - 5632, 5760, 5792, 0, 4096, 6144, 5632, 5760, - 5792, 0, 4096, 6144, 5632, 5760, 5792, 5794, - 0, 4096, 6144, 5632, 5760, 5792, 0, 4096, - 6144, 5632, 5760, 5792, 5796, 0, 4096, 6144, - 5632, 5760, 5792, 5796, 0, 4096, 6144, 5632, - 5760, 5792, 5800, 5798, 0, 4096, 6144, 5632, - 5760, 5792, 0, 4096, 6144, 5632, 5760, 5792, - 5800, 0, 4096, 6144, 5632, 5760, 5792, 5800, - 0, 4096, 6144, 5632, 5760, 5792, 5800, 5802, - 0, 4096, 6144, 5632, 5760, 5792, 5800, 0, - 4096, 6144, 5632, 5760, 5792, 5808, 5804, 0, - 4096, 6144, 5632, 5760, 5792, 5808, 5804, 0, - 4096, 6144, 5632, 5760, 5792, 5808, 5809, 5806, - 0, 4096, 6144, 5632, 5760, 5792, 0, 4096, - 6144, 5632, 5760, 5824, 5808, 0, 4096, 6144, - 5632, 5760, 5824, 5808, 0, 4096, 6144, 5632, - 5760, 5824, 5808, 5810, 0, 4096, 6144, 5632, - 5760, 5824, 5808, 0, 4096, 6144, 5632, 5760, - 5824, 5808, 5812, 0, 4096, 6144, 5632, 5760, - 5824, 5808, 5812, 0, 4096, 6144, 5632, 5760, - 5824, 5808, 5816, 5814, 0, 4096, 6144, 5632, - 5760, 5824, 5808, 0, 4096, 6144, 5632, 5760, - 5824, 5825, 5816, 0, 4096, 6144, 5632, 5760, - 5824, 5825, 5816, 0, 4096, 6144, 5632, 5760, - 5824, 5825, 5816, 5818, 0, 4096, 6144, 5632, - 5760, 5824, 5825, 5816, 0, 4096, 6144, 5632, - 5760, 5824, 5825, 5816, 5820, 0, 4096, 6144, - 5632, 5760, 5824, 5825, 5827, 5820, 0, 4096, - 6144, 5632, 5760, 5824, 5825, 5827, 5820, 5822, - 0, 4096, 6144, 5632, 5760, 0, 4096, 6144, - 5632, 5888, 5824, 0, 4096, 6144, 5632, 5888, - 5824, 0, 4096, 6144, 5632, 5888, 5824, 5826, - 0, 4096, 6144, 5632, 5888, 5824, 0, 4096, - 6144, 5632, 5888, 5824, 5828, 0, 4096, 6144, - 5632, 5888, 5824, 5828, 0, 4096, 6144, 5632, - 5888, 5824, 5832, 5830, 0, 4096, 6144, 5632, - 5888, 5824, 0, 4096, 6144, 5632, 5888, 5824, - 5832, 0, 4096, 6144, 5632, 5888, 5824, 5832, - 0, 4096, 6144, 5632, 5888, 5824, 5832, 5834, - 0, 4096, 6144, 5632, 5888, 5824, 5832, 0, - 4096, 6144, 5632, 5888, 5824, 5840, 5836, 0, - 4096, 6144, 5632, 5888, 5824, 5840, 5836, 0, - 4096, 6144, 5632, 5888, 5824, 5840, 5841, 5838, - 0, 4096, 6144, 5632, 5888, 5824, 0, 4096, - 6144, 5632, 5888, 5824, 5840, 0, 4096, 6144, - 5632, 5888, 5824, 5840, 0, 4096, 6144, 5632, - 5888, 5824, 5840, 5842, 0, 4096, 6144, 5632, - 5888, 5824, 5840, 0, 4096, 6144, 5632, 5888, - 5824, 5840, 5844, 0, 4096, 6144, 5632, 5888, - 5824, 5840, 5844, 0, 4096, 6144, 5632, 5888, - 5824, 5840, 5848, 5846, 0, 4096, 6144, 5632, - 5888, 5824, 5840, 0, 4096, 6144, 5632, 5888, - 5824, 5856, 5848, 0, 4096, 6144, 5632, 5888, - 5824, 5856, 5848, 0, 4096, 6144, 5632, 5888, - 5824, 5856, 5848, 5850, 0, 4096, 6144, 5632, - 5888, 5824, 5856, 5848, 0, 4096, 6144, 5632, - 5888, 5824, 5856, 5857, 5852, 0, 4096, 6144, - 5632, 5888, 5824, 5856, 5857, 5852, 0, 4096, - 6144, 5632, 5888, 5824, 5856, 5857, 5852, 5854, - 0, 4096, 6144, 5632, 5888, 5824, 0, 4096, - 6144, 5632, 5888, 5889, 5856, 0, 4096, 6144, - 5632, 5888, 5889, 5856, 0, 4096, 6144, 5632, - 5888, 5889, 5856, 5858, 0, 4096, 6144, 5632, - 5888, 5889, 5856, 0, 4096, 6144, 5632, 5888, - 5889, 5856, 5860, 0, 4096, 6144, 5632, 5888, - 5889, 5856, 5860, 0, 4096, 6144, 5632, 5888, - 5889, 5856, 5864, 5862, 0, 4096, 6144, 5632, - 5888, 5889, 5856, 0, 4096, 6144, 5632, 5888, - 5889, 5856, 5864, 0, 4096, 6144, 5632, 5888, - 5889, 5856, 5864, 0, 4096, 6144, 5632, 5888, - 5889, 5856, 5864, 5866, 0, 4096, 6144, 5632, - 5888, 5889, 5856, 5864, 0, 4096, 6144, 5632, - 5888, 5889, 5856, 5872, 5868, 0, 4096, 6144, - 5632, 5888, 5889, 5856, 5872, 5868, 0, 4096, - 6144, 5632, 5888, 5889, 5856, 5872, 5873, 5870, - 0, 4096, 6144, 5632, 5888, 5889, 5856, 0, - 4096, 6144, 5632, 5888, 5889, 5856, 5872, 0, - 4096, 6144, 5632, 5888, 5889, 5891, 5872, 0, - 4096, 6144, 5632, 5888, 5889, 5891, 5872, 5874, - 0, 4096, 6144, 5632, 5888, 5889, 5891, 5872, - 0, 4096, 6144, 5632, 5888, 5889, 5891, 5872, - 5876, 0, 4096, 6144, 5632, 5888, 5889, 5891, - 5872, 5876, 0, 4096, 6144, 5632, 5888, 5889, - 5891, 5872, 5880, 5878, 0, 4096, 6144, 5632, - 5888, 5889, 5891, 5872, 0, 4096, 6144, 5632, - 5888, 5889, 5891, 5872, 5880, 0, 4096, 6144, - 5632, 5888, 5889, 5891, 5872, 5880, 0, 4096, - 6144, 5632, 5888, 5889, 5891, 5872, 5880, 5882, - 0, 4096, 6144, 5632, 5888, 5889, 5891, 5895, - 5880, 0, 4096, 6144, 5632, 5888, 5889, 5891, - 5895, 5880, 5884, 0, 4096, 6144, 5632, 5888, - 5889, 5891, 5895, 5880, 5884, 0, 4096, 6144, - 5632, 5888, 5889, 5891, 5895, 5880, 5884, 5886, - 0, 4096, 6144, 5632, 0, 4096, 6144, 5632, - 5888, 0, 4096, 6144, 6145, 5888, 0, 4096, - 6144, 6145, 5888, 5890, 0, 4096, 6144, 6145, - 5888, 0, 4096, 6144, 6145, 5888, 5892, 0, - 4096, 6144, 6145, 5888, 5892, 0, 4096, 6144, - 6145, 5888, 5896, 5894, 0, 4096, 6144, 6145, - 5888, 0, 4096, 6144, 6145, 5888, 5896, 0, - 4096, 6144, 6145, 5888, 5896, 0, 4096, 6144, - 6145, 5888, 5896, 5898, 0, 4096, 6144, 6145, - 5888, 5896, 0, 4096, 6144, 6145, 5888, 5904, - 5900, 0, 4096, 6144, 6145, 5888, 5904, 5900, - 0, 4096, 6144, 6145, 5888, 5904, 5905, 5902, - 0, 4096, 6144, 6145, 5888, 0, 4096, 6144, - 6145, 5888, 5904, 0, 4096, 6144, 6145, 5888, - 5904, 0, 4096, 6144, 6145, 5888, 5904, 5906, - 0, 4096, 6144, 6145, 5888, 5904, 0, 4096, - 6144, 6145, 5888, 5904, 5908, 0, 4096, 6144, - 6145, 5888, 5904, 5908, 0, 4096, 6144, 6145, - 5888, 5904, 5912, 5910, 0, 4096, 6144, 6145, - 5888, 5904, 0, 4096, 6144, 6145, 5888, 5920, - 5912, 0, 4096, 6144, 6145, 5888, 5920, 5912, - 0, 4096, 6144, 6145, 5888, 5920, 5912, 5914, - 0, 4096, 6144, 6145, 5888, 5920, 5912, 0, - 4096, 6144, 6145, 5888, 5920, 5921, 5916, 0, - 4096, 6144, 6145, 5888, 5920, 5921, 5916, 0, - 4096, 6144, 6145, 5888, 5920, 5921, 5916, 5918, - 0, 4096, 6144, 6145, 5888, 0, 4096, 6144, - 6145, 5888, 5920, 0, 4096, 6144, 6145, 5888, - 5920, 0, 4096, 6144, 6145, 5888, 5920, 5922, - 0, 4096, 6144, 6145, 5888, 5920, 0, 4096, - 6144, 6145, 5888, 5920, 5924, 0, 4096, 6144, - 6145, 5888, 5920, 5924, 0, 4096, 6144, 6145, - 5888, 5920, 5928, 5926, 0, 4096, 6144, 6145, - 5888, 5920, 0, 4096, 6144, 6145, 5888, 5920, - 5928, 0, 4096, 6144, 6145, 5888, 5920, 5928, - 0, 4096, 6144, 6145, 5888, 5920, 5928, 5930, - 0, 4096, 6144, 6145, 5888, 5920, 5928, 0, - 4096, 6144, 6145, 5888, 5920, 5936, 5932, 0, - 4096, 6144, 6145, 5888, 5920, 5936, 5932, 0, - 4096, 6144, 6145, 5888, 5920, 5936, 5937, 5934, - 0, 4096, 6144, 6145, 5888, 5920, 0, 4096, - 6144, 6145, 5888, 5952, 5936, 0, 4096, 6144, - 6145, 5888, 5952, 5936, 0, 4096, 6144, 6145, - 5888, 5952, 5936, 5938, 0, 4096, 6144, 6145, - 5888, 5952, 5936, 0, 4096, 6144, 6145, 5888, - 5952, 5936, 5940, 0, 4096, 6144, 6145, 5888, - 5952, 5936, 5940, 0, 4096, 6144, 6145, 5888, - 5952, 5936, 5944, 5942, 0, 4096, 6144, 6145, - 5888, 5952, 5936, 0, 4096, 6144, 6145, 5888, - 5952, 5953, 5944, 0, 4096, 6144, 6145, 5888, - 5952, 5953, 5944, 0, 4096, 6144, 6145, 5888, - 5952, 5953, 5944, 5946, 0, 4096, 6144, 6145, - 5888, 5952, 5953, 5944, 0, 4096, 6144, 6145, - 5888, 5952, 5953, 5944, 5948, 0, 4096, 6144, - 6145, 5888, 5952, 5953, 5955, 5948, 0, 4096, - 6144, 6145, 5888, 5952, 5953, 5955, 5948, 5950, - 0, 4096, 6144, 6145, 5888, 0, 4096, 6144, - 6145, 5888, 5952, 0, 4096, 6144, 6145, 5888, - 5952, 0, 4096, 6144, 6145, 5888, 5952, 5954, - 0, 4096, 6144, 6145, 5888, 5952, 0, 4096, - 6144, 6145, 5888, 5952, 5956, 0, 4096, 6144, - 6145, 5888, 5952, 5956, 0, 4096, 6144, 6145, - 5888, 5952, 5960, 5958, 0, 4096, 6144, 6145, - 5888, 5952, 0, 4096, 6144, 6145, 5888, 5952, - 5960, 0, 4096, 6144, 6145, 5888, 5952, 5960, - 0, 4096, 6144, 6145, 5888, 5952, 5960, 5962, - 0, 4096, 6144, 6145, 5888, 5952, 5960, 0, - 4096, 6144, 6145, 5888, 5952, 5968, 5964, 0, - 4096, 6144, 6145, 5888, 5952, 5968, 5964, 0, - 4096, 6144, 6145, 5888, 5952, 5968, 5969, 5966, - 0, 4096, 6144, 6145, 5888, 5952, 0, 4096, - 6144, 6145, 5888, 5952, 5968, 0, 4096, 6144, - 6145, 5888, 5952, 5968, 0, 4096, 6144, 6145, - 5888, 5952, 5968, 5970, 0, 4096, 6144, 6145, - 5888, 5952, 5968, 0, 4096, 6144, 6145, 5888, - 5952, 5968, 5972, 0, 4096, 6144, 6145, 5888, - 5952, 5968, 5972, 0, 4096, 6144, 6145, 5888, - 5952, 5968, 5976, 5974, 0, 4096, 6144, 6145, - 5888, 5952, 5968, 0, 4096, 6144, 6145, 5888, - 5952, 5984, 5976, 0, 4096, 6144, 6145, 5888, - 5952, 5984, 5976, 0, 4096, 6144, 6145, 5888, - 5952, 5984, 5976, 5978, 0, 4096, 6144, 6145, - 5888, 5952, 5984, 5976, 0, 4096, 6144, 6145, - 5888, 5952, 5984, 5985, 5980, 0, 4096, 6144, - 6145, 5888, 5952, 5984, 5985, 5980, 0, 4096, - 6144, 6145, 5888, 5952, 5984, 5985, 5980, 5982, - 0, 4096, 6144, 6145, 5888, 5952, 0, 4096, - 6144, 6145, 5888, 6016, 5984, 0, 4096, 6144, - 6145, 5888, 6016, 5984, 0, 4096, 6144, 6145, - 5888, 6016, 5984, 5986, 0, 4096, 6144, 6145, - 5888, 6016, 5984, 0, 4096, 6144, 6145, 5888, - 6016, 5984, 5988, 0, 4096, 6144, 6145, 5888, - 6016, 5984, 5988, 0, 4096, 6144, 6145, 5888, - 6016, 5984, 5992, 5990, 0, 4096, 6144, 6145, - 5888, 6016, 5984, 0, 4096, 6144, 6145, 5888, - 6016, 5984, 5992, 0, 4096, 6144, 6145, 5888, - 6016, 5984, 5992, 0, 4096, 6144, 6145, 5888, - 6016, 5984, 5992, 5994, 0, 4096, 6144, 6145, - 5888, 6016, 5984, 5992, 0, 4096, 6144, 6145, - 5888, 6016, 5984, 6000, 5996, 0, 4096, 6144, - 6145, 5888, 6016, 5984, 6000, 5996, 0, 4096, - 6144, 6145, 5888, 6016, 5984, 6000, 6001, 5998, - 0, 4096, 6144, 6145, 5888, 6016, 5984, 0, - 4096, 6144, 6145, 5888, 6016, 6017, 6000, 0, - 4096, 6144, 6145, 5888, 6016, 6017, 6000, 0, - 4096, 6144, 6145, 5888, 6016, 6017, 6000, 6002, - 0, 4096, 6144, 6145, 5888, 6016, 6017, 6000, - 0, 4096, 6144, 6145, 5888, 6016, 6017, 6000, - 6004, 0, 4096, 6144, 6145, 5888, 6016, 6017, - 6000, 6004, 0, 4096, 6144, 6145, 5888, 6016, - 6017, 6000, 6008, 6006, 0, 4096, 6144, 6145, - 5888, 6016, 6017, 6000, 0, 4096, 6144, 6145, - 5888, 6016, 6017, 6000, 6008, 0, 4096, 6144, - 6145, 5888, 6016, 6017, 6019, 6008, 0, 4096, - 6144, 6145, 5888, 6016, 6017, 6019, 6008, 6010, - 0, 4096, 6144, 6145, 5888, 6016, 6017, 6019, - 6008, 0, 4096, 6144, 6145, 5888, 6016, 6017, - 6019, 6008, 6012, 0, 4096, 6144, 6145, 5888, - 6016, 6017, 6019, 6008, 6012, 0, 4096, 6144, - 6145, 5888, 6016, 6017, 6019, 6008, 6012, 6014, - 0, 4096, 6144, 6145, 5888, 0, 4096, 6144, - 6145, 5888, 6016, 0, 4096, 6144, 6145, 5888, - 6016, 0, 4096, 6144, 6145, 5888, 6016, 6018, - 0, 4096, 6144, 6145, 6147, 6016, 0, 4096, - 6144, 6145, 6147, 6016, 6020, 0, 4096, 6144, - 6145, 6147, 6016, 6020, 0, 4096, 6144, 6145, - 6147, 6016, 6024, 6022, 0, 4096, 6144, 6145, - 6147, 6016, 0, 4096, 6144, 6145, 6147, 6016, - 6024, 0, 4096, 6144, 6145, 6147, 6016, 6024, - 0, 4096, 6144, 6145, 6147, 6016, 6024, 6026, - 0, 4096, 6144, 6145, 6147, 6016, 6024, 0, - 4096, 6144, 6145, 6147, 6016, 6032, 6028, 0, - 4096, 6144, 6145, 6147, 6016, 6032, 6028, 0, - 4096, 6144, 6145, 6147, 6016, 6032, 6033, 6030, - 0, 4096, 6144, 6145, 6147, 6016, 0, 4096, - 6144, 6145, 6147, 6016, 6032, 0, 4096, 6144, - 6145, 6147, 6016, 6032, 0, 4096, 6144, 6145, - 6147, 6016, 6032, 6034, 0, 4096, 6144, 6145, - 6147, 6016, 6032, 0, 4096, 6144, 6145, 6147, - 6016, 6032, 6036, 0, 4096, 6144, 6145, 6147, - 6016, 6032, 6036, 0, 4096, 6144, 6145, 6147, - 6016, 6032, 6040, 6038, 0, 4096, 6144, 6145, - 6147, 6016, 6032, 0, 4096, 6144, 6145, 6147, - 6016, 6048, 6040, 0, 4096, 6144, 6145, 6147, - 6016, 6048, 6040, 0, 4096, 6144, 6145, 6147, - 6016, 6048, 6040, 6042, 0, 4096, 6144, 6145, - 6147, 6016, 6048, 6040, 0, 4096, 6144, 6145, - 6147, 6016, 6048, 6049, 6044, 0, 4096, 6144, - 6145, 6147, 6016, 6048, 6049, 6044, 0, 4096, - 6144, 6145, 6147, 6016, 6048, 6049, 6044, 6046, - 0, 4096, 6144, 6145, 6147, 6016, 0, 4096, - 6144, 6145, 6147, 6016, 6048, 0, 4096, 6144, - 6145, 6147, 6016, 6048, 0, 4096, 6144, 6145, - 6147, 6016, 6048, 6050, 0, 4096, 6144, 6145, - 6147, 6016, 6048, 0, 4096, 6144, 6145, 6147, - 6016, 6048, 6052, 0, 4096, 6144, 6145, 6147, - 6016, 6048, 6052, 0, 4096, 6144, 6145, 6147, - 6016, 6048, 6056, 6054, 0, 4096, 6144, 6145, - 6147, 6016, 6048, 0, 4096, 6144, 6145, 6147, - 6016, 6048, 6056, 0, 4096, 6144, 6145, 6147, - 6016, 6048, 6056, 0, 4096, 6144, 6145, 6147, - 6016, 6048, 6056, 6058, 0, 4096, 6144, 6145, - 6147, 6016, 6048, 6056, 0, 4096, 6144, 6145, - 6147, 6016, 6048, 6064, 6060, 0, 4096, 6144, - 6145, 6147, 6016, 6048, 6064, 6060, 0, 4096, - 6144, 6145, 6147, 6016, 6048, 6064, 6065, 6062, - 0, 4096, 6144, 6145, 6147, 6016, 6048, 0, - 4096, 6144, 6145, 6147, 6016, 6080, 6064, 0, - 4096, 6144, 6145, 6147, 6016, 6080, 6064, 0, - 4096, 6144, 6145, 6147, 6016, 6080, 6064, 6066, - 0, 4096, 6144, 6145, 6147, 6016, 6080, 6064, - 0, 4096, 6144, 6145, 6147, 6016, 6080, 6064, - 6068, 0, 4096, 6144, 6145, 6147, 6016, 6080, - 6064, 6068, 0, 4096, 6144, 6145, 6147, 6016, - 6080, 6064, 6072, 6070, 0, 4096, 6144, 6145, - 6147, 6016, 6080, 6064, 0, 4096, 6144, 6145, - 6147, 6016, 6080, 6081, 6072, 0, 4096, 6144, - 6145, 6147, 6016, 6080, 6081, 6072, 0, 4096, - 6144, 6145, 6147, 6016, 6080, 6081, 6072, 6074, - 0, 4096, 6144, 6145, 6147, 6016, 6080, 6081, - 6072, 0, 4096, 6144, 6145, 6147, 6016, 6080, - 6081, 6072, 6076, 0, 4096, 6144, 6145, 6147, - 6016, 6080, 6081, 6083, 6076, 0, 4096, 6144, - 6145, 6147, 6016, 6080, 6081, 6083, 6076, 6078, - 0, 4096, 6144, 6145, 6147, 6016, 0, 4096, - 6144, 6145, 6147, 6016, 6080, 0, 4096, 6144, - 6145, 6147, 6016, 6080, 0, 4096, 6144, 6145, - 6147, 6016, 6080, 6082, 0, 4096, 6144, 6145, - 6147, 6016, 6080, 0, 4096, 6144, 6145, 6147, - 6016, 6080, 6084, 0, 4096, 6144, 6145, 6147, - 6016, 6080, 6084, 0, 4096, 6144, 6145, 6147, - 6016, 6080, 6088, 6086, 0, 4096, 6144, 6145, - 6147, 6151, 6080, 0, 4096, 6144, 6145, 6147, - 6151, 6080, 6088, 0, 4096, 6144, 6145, 6147, - 6151, 6080, 6088, 0, 4096, 6144, 6145, 6147, - 6151, 6080, 6088, 6090, 0, 4096, 6144, 6145, - 6147, 6151, 6080, 6088, 0, 4096, 6144, 6145, - 6147, 6151, 6080, 6096, 6092, 0, 4096, 6144, - 6145, 6147, 6151, 6080, 6096, 6092, 0, 4096, - 6144, 6145, 6147, 6151, 6080, 6096, 6097, 6094, - 0, 4096, 6144, 6145, 6147, 6151, 6080, 0, - 4096, 6144, 6145, 6147, 6151, 6080, 6096, 0, - 4096, 6144, 6145, 6147, 6151, 6080, 6096, 0, - 4096, 6144, 6145, 6147, 6151, 6080, 6096, 6098, - 0, 4096, 6144, 6145, 6147, 6151, 6080, 6096, - 0, 4096, 6144, 6145, 6147, 6151, 6080, 6096, - 6100, 0, 4096, 6144, 6145, 6147, 6151, 6080, - 6096, 6100, 0, 4096, 6144, 6145, 6147, 6151, - 6080, 6096, 6104, 6102, 0, 4096, 6144, 6145, - 6147, 6151, 6080, 6096, 0, 4096, 6144, 6145, - 6147, 6151, 6080, 6112, 6104, 0, 4096, 6144, - 6145, 6147, 6151, 6080, 6112, 6104, 0, 4096, - 6144, 6145, 6147, 6151, 6080, 6112, 6104, 6106, - 0, 4096, 6144, 6145, 6147, 6151, 6080, 6112, - 6104, 0, 4096, 6144, 6145, 6147, 6151, 6080, - 6112, 6113, 6108, 0, 4096, 6144, 6145, 6147, - 6151, 6080, 6112, 6113, 6108, 0, 4096, 6144, - 6145, 6147, 6151, 6080, 6112, 6113, 6108, 6110, - 0, 4096, 6144, 6145, 6147, 6151, 6080, 0, - 4096, 6144, 6145, 6147, 6151, 6080, 6112, 0, - 4096, 6144, 6145, 6147, 6151, 6080, 6112, 0, - 4096, 6144, 6145, 6147, 6151, 6080, 6112, 6114, - 0, 4096, 6144, 6145, 6147, 6151, 6080, 6112, - 0, 4096, 6144, 6145, 6147, 6151, 6080, 6112, - 6116, 0, 4096, 6144, 6145, 6147, 6151, 6080, - 6112, 6116, 0, 4096, 6144, 6145, 6147, 6151, - 6080, 6112, 6120, 6118, 0, 4096, 6144, 6145, - 6147, 6151, 6080, 6112, 0, 4096, 6144, 6145, - 6147, 6151, 6080, 6112, 6120, 0, 4096, 6144, - 6145, 6147, 6151, 6080, 6112, 6120, 0, 4096, - 6144, 6145, 6147, 6151, 6080, 6112, 6120, 6122, - 0, 4096, 6144, 6145, 6147, 6151, 6080, 6112, - 6120, 0, 4096, 6144, 6145, 6147, 6151, 6080, - 6112, 6128, 6124, 0, 4096, 6144, 6145, 6147, - 6151, 6080, 6112, 6128, 6124, 0, 4096, 6144, - 6145, 6147, 6151, 6080, 6112, 6128, 6129, 6126, - 0, 4096, 6144, 6145, 6147, 6151, 6159, 6112, - 0, 4096, 6144, 6145, 6147, 6151, 6159, 6112, - 6128, 0, 4096, 6144, 6145, 6147, 6151, 6159, - 6112, 6128, 0, 4096, 6144, 6145, 6147, 6151, - 6159, 6112, 6128, 6130, 0, 4096, 6144, 6145, - 6147, 6151, 6159, 6112, 6128, 0, 4096, 6144, - 6145, 6147, 6151, 6159, 6112, 6128, 6132, 0, - 4096, 6144, 6145, 6147, 6151, 6159, 6112, 6128, - 6132, 0, 4096, 6144, 6145, 6147, 6151, 6159, - 6112, 6128, 6136, 6134, 0, 4096, 6144, 6145, - 6147, 6151, 6159, 6112, 6128, 0, 4096, 6144, - 6145, 6147, 6151, 6159, 6112, 6128, 6136, 0, - 4096, 6144, 6145, 6147, 6151, 6159, 6112, 6128, - 6136, 0, 4096, 6144, 6145, 6147, 6151, 6159, - 6112, 6128, 6136, 6138, 0, 4096, 6144, 6145, - 6147, 6151, 6159, 6112, 6128, 6136, 0, 4096, - 6144, 6145, 6147, 6151, 6159, 6112, 6128, 6136, - 6140, 0, 4096, 6144, 6145, 6147, 6151, 6159, - 6112, 6128, 6136, 6140, 0, 4096, 6144, 6145, - 6147, 6151, 6159, 6112, 6128, 6136, 6140, 6142, - 0, 4096, 0, 4096, 6144, 0, 4096, 6144, - 0, 4096, 6144, 6146, 0, 4096, 6144, 0, - 4096, 6144, 6148, 0, 4096, 6144, 6148, 0, - 4096, 6144, 6152, 6150, 0, 4096, 6144, 0, - 4096, 6144, 6152, 0, 4096, 6144, 6152, 0, - 4096, 6144, 6152, 6154, 0, 4096, 6144, 6152, - 0, 4096, 6144, 6160, 6156, 0, 4096, 6144, - 6160, 6156, 0, 4096, 6144, 6160, 6161, 6158, - 0, 4096, 6144, 0, 4096, 6144, 6160, 0, - 4096, 6144, 6160, 0, 4096, 6144, 6160, 6162, - 0, 4096, 6144, 6160, 0, 4096, 6144, 6160, - 6164, 0, 4096, 6144, 6160, 6164, 0, 4096, - 6144, 6160, 6168, 6166, 0, 4096, 6144, 6160, - 0, 4096, 6144, 6176, 6168, 0, 4096, 6144, - 6176, 6168, 0, 4096, 6144, 6176, 6168, 6170, - 0, 4096, 6144, 6176, 6168, 0, 4096, 6144, - 6176, 6177, 6172, 0, 4096, 6144, 6176, 6177, - 6172, 0, 4096, 6144, 6176, 6177, 6172, 6174, - 0, 4096, 6144, 0, 4096, 6144, 6176, 0, - 4096, 6144, 6176, 0, 4096, 6144, 6176, 6178, - 0, 4096, 6144, 6176, 0, 4096, 6144, 6176, - 6180, 0, 4096, 6144, 6176, 6180, 0, 4096, - 6144, 6176, 6184, 6182, 0, 4096, 6144, 6176, - 0, 4096, 6144, 6176, 6184, 0, 4096, 6144, - 6176, 6184, 0, 4096, 6144, 6176, 6184, 6186, - 0, 4096, 6144, 6176, 6184, 0, 4096, 6144, - 6176, 6192, 6188, 0, 4096, 6144, 6176, 6192, - 6188, 0, 4096, 6144, 6176, 6192, 6193, 6190, - 0, 4096, 6144, 6176, 0, 4096, 6144, 6208, - 6192, 0, 4096, 6144, 6208, 6192, 0, 4096, - 6144, 6208, 6192, 6194, 0, 4096, 6144, 6208, - 6192, 0, 4096, 6144, 6208, 6192, 6196, 0, - 4096, 6144, 6208, 6192, 6196, 0, 4096, 6144, - 6208, 6192, 6200, 6198, 0, 4096, 6144, 6208, - 6192, 0, 4096, 6144, 6208, 6209, 6200, 0, - 4096, 6144, 6208, 6209, 6200, 0, 4096, 6144, - 6208, 6209, 6200, 6202, 0, 4096, 6144, 6208, - 6209, 6200, 0, 4096, 6144, 6208, 6209, 6200, - 6204, 0, 4096, 6144, 6208, 6209, 6211, 6204, - 0, 4096, 6144, 6208, 6209, 6211, 6204, 6206, - 0, 4096, 6144, 0, 4096, 6144, 6208, 0, - 4096, 6144, 6208, 0, 4096, 6144, 6208, 6210, - 0, 4096, 6144, 6208, 0, 4096, 6144, 6208, - 6212, 0, 4096, 6144, 6208, 6212, 0, 4096, - 6144, 6208, 6216, 6214, 0, 4096, 6144, 6208, - 0, 4096, 6144, 6208, 6216, 0, 4096, 6144, - 6208, 6216, 0, 4096, 6144, 6208, 6216, 6218, - 0, 4096, 6144, 6208, 6216, 0, 4096, 6144, - 6208, 6224, 6220, 0, 4096, 6144, 6208, 6224, - 6220, 0, 4096, 6144, 6208, 6224, 6225, 6222, - 0, 4096, 6144, 6208, 0, 4096, 6144, 6208, - 6224, 0, 4096, 6144, 6208, 6224, 0, 4096, - 6144, 6208, 6224, 6226, 0, 4096, 6144, 6208, - 6224, 0, 4096, 6144, 6208, 6224, 6228, 0, - 4096, 6144, 6208, 6224, 6228, 0, 4096, 6144, - 6208, 6224, 6232, 6230, 0, 4096, 6144, 6208, - 6224, 0, 4096, 6144, 6208, 6240, 6232, 0, - 4096, 6144, 6208, 6240, 6232, 0, 4096, 6144, - 6208, 6240, 6232, 6234, 0, 4096, 6144, 6208, - 6240, 6232, 0, 4096, 6144, 6208, 6240, 6241, - 6236, 0, 4096, 6144, 6208, 6240, 6241, 6236, - 0, 4096, 6144, 6208, 6240, 6241, 6236, 6238, - 0, 4096, 6144, 6208, 0, 4096, 6144, 6272, - 6240, 0, 4096, 6144, 6272, 6240, 0, 4096, - 6144, 6272, 6240, 6242, 0, 4096, 6144, 6272, - 6240, 0, 4096, 6144, 6272, 6240, 6244, 0, - 4096, 6144, 6272, 6240, 6244, 0, 4096, 6144, - 6272, 6240, 6248, 6246, 0, 4096, 6144, 6272, - 6240, 0, 4096, 6144, 6272, 6240, 6248, 0, - 4096, 6144, 6272, 6240, 6248, 0, 4096, 6144, - 6272, 6240, 6248, 6250, 0, 4096, 6144, 6272, - 6240, 6248, 0, 4096, 6144, 6272, 6240, 6256, - 6252, 0, 4096, 6144, 6272, 6240, 6256, 6252, - 0, 4096, 6144, 6272, 6240, 6256, 6257, 6254, - 0, 4096, 6144, 6272, 6240, 0, 4096, 6144, - 6272, 6273, 6256, 0, 4096, 6144, 6272, 6273, - 6256, 0, 4096, 6144, 6272, 6273, 6256, 6258, - 0, 4096, 6144, 6272, 6273, 6256, 0, 4096, - 6144, 6272, 6273, 6256, 6260, 0, 4096, 6144, - 6272, 6273, 6256, 6260, 0, 4096, 6144, 6272, - 6273, 6256, 6264, 6262, 0, 4096, 6144, 6272, - 6273, 6256, 0, 4096, 6144, 6272, 6273, 6256, - 6264, 0, 4096, 6144, 6272, 6273, 6275, 6264, - 0, 4096, 6144, 6272, 6273, 6275, 6264, 6266, - 0, 4096, 6144, 6272, 6273, 6275, 6264, 0, - 4096, 6144, 6272, 6273, 6275, 6264, 6268, 0, - 4096, 6144, 6272, 6273, 6275, 6264, 6268, 0, - 4096, 6144, 6272, 6273, 6275, 6264, 6268, 6270, - 0, 4096, 6144, 0, 4096, 6144, 6272, 0, - 4096, 6144, 6272, 0, 4096, 6144, 6272, 6274, - 0, 4096, 6144, 6272, 0, 4096, 6144, 6272, - 6276, 0, 4096, 6144, 6272, 6276, 0, 4096, - 6144, 6272, 6280, 6278, 0, 4096, 6144, 6272, - 0, 4096, 6144, 6272, 6280, 0, 4096, 6144, - 6272, 6280, 0, 4096, 6144, 6272, 6280, 6282, - 0, 4096, 6144, 6272, 6280, 0, 4096, 6144, - 6272, 6288, 6284, 0, 4096, 6144, 6272, 6288, - 6284, 0, 4096, 6144, 6272, 6288, 6289, 6286, - 0, 4096, 6144, 6272, 0, 4096, 6144, 6272, - 6288, 0, 4096, 6144, 6272, 6288, 0, 4096, - 6144, 6272, 6288, 6290, 0, 4096, 6144, 6272, - 6288, 0, 4096, 6144, 6272, 6288, 6292, 0, - 4096, 6144, 6272, 6288, 6292, 0, 4096, 6144, - 6272, 6288, 6296, 6294, 0, 4096, 6144, 6272, - 6288, 0, 4096, 6144, 6272, 6304, 6296, 0, - 4096, 6144, 6272, 6304, 6296, 0, 4096, 6144, - 6272, 6304, 6296, 6298, 0, 4096, 6144, 6272, - 6304, 6296, 0, 4096, 6144, 6272, 6304, 6305, - 6300, 0, 4096, 6144, 6272, 6304, 6305, 6300, - 0, 4096, 6144, 6272, 6304, 6305, 6300, 6302, - 0, 4096, 6144, 6272, 0, 4096, 6144, 6272, - 6304, 0, 4096, 6144, 6272, 6304, 0, 4096, - 6144, 6272, 6304, 6306, 0, 4096, 6144, 6272, - 6304, 0, 4096, 6144, 6272, 6304, 6308, 0, - 4096, 6144, 6272, 6304, 6308, 0, 4096, 6144, - 6272, 6304, 6312, 6310, 0, 4096, 6144, 6272, - 6304, 0, 4096, 6144, 6272, 6304, 6312, 0, - 4096, 6144, 6272, 6304, 6312, 0, 4096, 6144, - 6272, 6304, 6312, 6314, 0, 4096, 6144, 6272, - 6304, 6312, 0, 4096, 6144, 6272, 6304, 6320, - 6316, 0, 4096, 6144, 6272, 6304, 6320, 6316, - 0, 4096, 6144, 6272, 6304, 6320, 6321, 6318, - 0, 4096, 6144, 6272, 6304, 0, 4096, 6144, - 6272, 6336, 6320, 0, 4096, 6144, 6272, 6336, - 6320, 0, 4096, 6144, 6272, 6336, 6320, 6322, - 0, 4096, 6144, 6272, 6336, 6320, 0, 4096, - 6144, 6272, 6336, 6320, 6324, 0, 4096, 6144, - 6272, 6336, 6320, 6324, 0, 4096, 6144, 6272, - 6336, 6320, 6328, 6326, 0, 4096, 6144, 6272, - 6336, 6320, 0, 4096, 6144, 6272, 6336, 6337, - 6328, 0, 4096, 6144, 6272, 6336, 6337, 6328, - 0, 4096, 6144, 6272, 6336, 6337, 6328, 6330, - 0, 4096, 6144, 6272, 6336, 6337, 6328, 0, - 4096, 6144, 6272, 6336, 6337, 6328, 6332, 0, - 4096, 6144, 6272, 6336, 6337, 6339, 6332, 0, - 4096, 6144, 6272, 6336, 6337, 6339, 6332, 6334, - 0, 4096, 6144, 6272, 0, 4096, 6144, 6400, - 6336, 0, 4096, 6144, 6400, 6336, 0, 4096, - 6144, 6400, 6336, 6338, 0, 4096, 6144, 6400, - 6336, 0, 4096, 6144, 6400, 6336, 6340, 0, - 4096, 6144, 6400, 6336, 6340, 0, 4096, 6144, - 6400, 6336, 6344, 6342, 0, 4096, 6144, 6400, - 6336, 0, 4096, 6144, 6400, 6336, 6344, 0, - 4096, 6144, 6400, 6336, 6344, 0, 4096, 6144, - 6400, 6336, 6344, 6346, 0, 4096, 6144, 6400, - 6336, 6344, 0, 4096, 6144, 6400, 6336, 6352, - 6348, 0, 4096, 6144, 6400, 6336, 6352, 6348, - 0, 4096, 6144, 6400, 6336, 6352, 6353, 6350, - 0, 4096, 6144, 6400, 6336, 0, 4096, 6144, - 6400, 6336, 6352, 0, 4096, 6144, 6400, 6336, - 6352, 0, 4096, 6144, 6400, 6336, 6352, 6354, - 0, 4096, 6144, 6400, 6336, 6352, 0, 4096, - 6144, 6400, 6336, 6352, 6356, 0, 4096, 6144, - 6400, 6336, 6352, 6356, 0, 4096, 6144, 6400, - 6336, 6352, 6360, 6358, 0, 4096, 6144, 6400, - 6336, 6352, 0, 4096, 6144, 6400, 6336, 6368, - 6360, 0, 4096, 6144, 6400, 6336, 6368, 6360, - 0, 4096, 6144, 6400, 6336, 6368, 6360, 6362, - 0, 4096, 6144, 6400, 6336, 6368, 6360, 0, - 4096, 6144, 6400, 6336, 6368, 6369, 6364, 0, - 4096, 6144, 6400, 6336, 6368, 6369, 6364, 0, - 4096, 6144, 6400, 6336, 6368, 6369, 6364, 6366, - 0, 4096, 6144, 6400, 6336, 0, 4096, 6144, - 6400, 6401, 6368, 0, 4096, 6144, 6400, 6401, - 6368, 0, 4096, 6144, 6400, 6401, 6368, 6370, - 0, 4096, 6144, 6400, 6401, 6368, 0, 4096, - 6144, 6400, 6401, 6368, 6372, 0, 4096, 6144, - 6400, 6401, 6368, 6372, 0, 4096, 6144, 6400, - 6401, 6368, 6376, 6374, 0, 4096, 6144, 6400, - 6401, 6368, 0, 4096, 6144, 6400, 6401, 6368, - 6376, 0, 4096, 6144, 6400, 6401, 6368, 6376, - 0, 4096, 6144, 6400, 6401, 6368, 6376, 6378, - 0, 4096, 6144, 6400, 6401, 6368, 6376, 0, - 4096, 6144, 6400, 6401, 6368, 6384, 6380, 0, - 4096, 6144, 6400, 6401, 6368, 6384, 6380, 0, - 4096, 6144, 6400, 6401, 6368, 6384, 6385, 6382, - 0, 4096, 6144, 6400, 6401, 6368, 0, 4096, - 6144, 6400, 6401, 6368, 6384, 0, 4096, 6144, - 6400, 6401, 6403, 6384, 0, 4096, 6144, 6400, - 6401, 6403, 6384, 6386, 0, 4096, 6144, 6400, - 6401, 6403, 6384, 0, 4096, 6144, 6400, 6401, - 6403, 6384, 6388, 0, 4096, 6144, 6400, 6401, - 6403, 6384, 6388, 0, 4096, 6144, 6400, 6401, - 6403, 6384, 6392, 6390, 0, 4096, 6144, 6400, - 6401, 6403, 6384, 0, 4096, 6144, 6400, 6401, - 6403, 6384, 6392, 0, 4096, 6144, 6400, 6401, - 6403, 6384, 6392, 0, 4096, 6144, 6400, 6401, - 6403, 6384, 6392, 6394, 0, 4096, 6144, 6400, - 6401, 6403, 6407, 6392, 0, 4096, 6144, 6400, - 6401, 6403, 6407, 6392, 6396, 0, 4096, 6144, - 6400, 6401, 6403, 6407, 6392, 6396, 0, 4096, - 6144, 6400, 6401, 6403, 6407, 6392, 6396, 6398, - 0, 4096, 6144, 0, 4096, 6144, 6400, 0, - 4096, 6144, 6400, 0, 4096, 6144, 6400, 6402, - 0, 4096, 6144, 6400, 0, 4096, 6144, 6400, - 6404, 0, 4096, 6144, 6400, 6404, 0, 4096, - 6144, 6400, 6408, 6406, 0, 4096, 6144, 6400, - 0, 4096, 6144, 6400, 6408, 0, 4096, 6144, - 6400, 6408, 0, 4096, 6144, 6400, 6408, 6410, - 0, 4096, 6144, 6400, 6408, 0, 4096, 6144, - 6400, 6416, 6412, 0, 4096, 6144, 6400, 6416, - 6412, 0, 4096, 6144, 6400, 6416, 6417, 6414, - 0, 4096, 6144, 6400, 0, 4096, 6144, 6400, - 6416, 0, 4096, 6144, 6400, 6416, 0, 4096, - 6144, 6400, 6416, 6418, 0, 4096, 6144, 6400, - 6416, 0, 4096, 6144, 6400, 6416, 6420, 0, - 4096, 6144, 6400, 6416, 6420, 0, 4096, 6144, - 6400, 6416, 6424, 6422, 0, 4096, 6144, 6400, - 6416, 0, 4096, 6144, 6400, 6432, 6424, 0, - 4096, 6144, 6400, 6432, 6424, 0, 4096, 6144, - 6400, 6432, 6424, 6426, 0, 4096, 6144, 6400, - 6432, 6424, 0, 4096, 6144, 6400, 6432, 6433, - 6428, 0, 4096, 6144, 6400, 6432, 6433, 6428, - 0, 4096, 6144, 6400, 6432, 6433, 6428, 6430, - 0, 4096, 6144, 6400, 0, 4096, 6144, 6400, - 6432, 0, 4096, 6144, 6400, 6432, 0, 4096, - 6144, 6400, 6432, 6434, 0, 4096, 6144, 6400, - 6432, 0, 4096, 6144, 6400, 6432, 6436, 0, - 4096, 6144, 6400, 6432, 6436, 0, 4096, 6144, - 6400, 6432, 6440, 6438, 0, 4096, 6144, 6400, - 6432, 0, 4096, 6144, 6400, 6432, 6440, 0, - 4096, 6144, 6400, 6432, 6440, 0, 4096, 6144, - 6400, 6432, 6440, 6442, 0, 4096, 6144, 6400, - 6432, 6440, 0, 4096, 6144, 6400, 6432, 6448, - 6444, 0, 4096, 6144, 6400, 6432, 6448, 6444, - 0, 4096, 6144, 6400, 6432, 6448, 6449, 6446, - 0, 4096, 6144, 6400, 6432, 0, 4096, 6144, - 6400, 6464, 6448, 0, 4096, 6144, 6400, 6464, - 6448, 0, 4096, 6144, 6400, 6464, 6448, 6450, - 0, 4096, 6144, 6400, 6464, 6448, 0, 4096, - 6144, 6400, 6464, 6448, 6452, 0, 4096, 6144, - 6400, 6464, 6448, 6452, 0, 4096, 6144, 6400, - 6464, 6448, 6456, 6454, 0, 4096, 6144, 6400, - 6464, 6448, 0, 4096, 6144, 6400, 6464, 6465, - 6456, 0, 4096, 6144, 6400, 6464, 6465, 6456, - 0, 4096, 6144, 6400, 6464, 6465, 6456, 6458, - 0, 4096, 6144, 6400, 6464, 6465, 6456, 0, - 4096, 6144, 6400, 6464, 6465, 6456, 6460, 0, - 4096, 6144, 6400, 6464, 6465, 6467, 6460, 0, - 4096, 6144, 6400, 6464, 6465, 6467, 6460, 6462, - 0, 4096, 6144, 6400, 0, 4096, 6144, 6400, - 6464, 0, 4096, 6144, 6400, 6464, 0, 4096, - 6144, 6400, 6464, 6466, 0, 4096, 6144, 6400, - 6464, 0, 4096, 6144, 6400, 6464, 6468, 0, - 4096, 6144, 6400, 6464, 6468, 0, 4096, 6144, - 6400, 6464, 6472, 6470, 0, 4096, 6144, 6400, - 6464, 0, 4096, 6144, 6400, 6464, 6472, 0, - 4096, 6144, 6400, 6464, 6472, 0, 4096, 6144, - 6400, 6464, 6472, 6474, 0, 4096, 6144, 6400, - 6464, 6472, 0, 4096, 6144, 6400, 6464, 6480, - 6476, 0, 4096, 6144, 6400, 6464, 6480, 6476, - 0, 4096, 6144, 6400, 6464, 6480, 6481, 6478, - 0, 4096, 6144, 6400, 6464, 0, 4096, 6144, - 6400, 6464, 6480, 0, 4096, 6144, 6400, 6464, - 6480, 0, 4096, 6144, 6400, 6464, 6480, 6482, - 0, 4096, 6144, 6400, 6464, 6480, 0, 4096, - 6144, 6400, 6464, 6480, 6484, 0, 4096, 6144, - 6400, 6464, 6480, 6484, 0, 4096, 6144, 6400, - 6464, 6480, 6488, 6486, 0, 4096, 6144, 6400, - 6464, 6480, 0, 4096, 6144, 6400, 6464, 6496, - 6488, 0, 4096, 6144, 6400, 6464, 6496, 6488, - 0, 4096, 6144, 6400, 6464, 6496, 6488, 6490, - 0, 4096, 6144, 6400, 6464, 6496, 6488, 0, - 4096, 6144, 6400, 6464, 6496, 6497, 6492, 0, - 4096, 6144, 6400, 6464, 6496, 6497, 6492, 0, - 4096, 6144, 6400, 6464, 6496, 6497, 6492, 6494, - 0, 4096, 6144, 6400, 6464, 0, 4096, 6144, - 6400, 6528, 6496, 0, 4096, 6144, 6400, 6528, - 6496, 0, 4096, 6144, 6400, 6528, 6496, 6498, - 0, 4096, 6144, 6400, 6528, 6496, 0, 4096, - 6144, 6400, 6528, 6496, 6500, 0, 4096, 6144, - 6400, 6528, 6496, 6500, 0, 4096, 6144, 6400, - 6528, 6496, 6504, 6502, 0, 4096, 6144, 6400, - 6528, 6496, 0, 4096, 6144, 6400, 6528, 6496, - 6504, 0, 4096, 6144, 6400, 6528, 6496, 6504, - 0, 4096, 6144, 6400, 6528, 6496, 6504, 6506, - 0, 4096, 6144, 6400, 6528, 6496, 6504, 0, - 4096, 6144, 6400, 6528, 6496, 6512, 6508, 0, - 4096, 6144, 6400, 6528, 6496, 6512, 6508, 0, - 4096, 6144, 6400, 6528, 6496, 6512, 6513, 6510, - 0, 4096, 6144, 6400, 6528, 6496, 0, 4096, - 6144, 6400, 6528, 6529, 6512, 0, 4096, 6144, - 6400, 6528, 6529, 6512, 0, 4096, 6144, 6400, - 6528, 6529, 6512, 6514, 0, 4096, 6144, 6400, - 6528, 6529, 6512, 0, 4096, 6144, 6400, 6528, - 6529, 6512, 6516, 0, 4096, 6144, 6400, 6528, - 6529, 6512, 6516, 0, 4096, 6144, 6400, 6528, - 6529, 6512, 6520, 6518, 0, 4096, 6144, 6400, - 6528, 6529, 6512, 0, 4096, 6144, 6400, 6528, - 6529, 6512, 6520, 0, 4096, 6144, 6400, 6528, - 6529, 6531, 6520, 0, 4096, 6144, 6400, 6528, - 6529, 6531, 6520, 6522, 0, 4096, 6144, 6400, - 6528, 6529, 6531, 6520, 0, 4096, 6144, 6400, - 6528, 6529, 6531, 6520, 6524, 0, 4096, 6144, - 6400, 6528, 6529, 6531, 6520, 6524, 0, 4096, - 6144, 6400, 6528, 6529, 6531, 6520, 6524, 6526, - 0, 4096, 6144, 6400, 0, 4096, 6144, 6656, - 6528, 0, 4096, 6144, 6656, 6528, 0, 4096, - 6144, 6656, 6528, 6530, 0, 4096, 6144, 6656, - 6528, 0, 4096, 6144, 6656, 6528, 6532, 0, - 4096, 6144, 6656, 6528, 6532, 0, 4096, 6144, - 6656, 6528, 6536, 6534, 0, 4096, 6144, 6656, - 6528, 0, 4096, 6144, 6656, 6528, 6536, 0, - 4096, 6144, 6656, 6528, 6536, 0, 4096, 6144, - 6656, 6528, 6536, 6538, 0, 4096, 6144, 6656, - 6528, 6536, 0, 4096, 6144, 6656, 6528, 6544, - 6540, 0, 4096, 6144, 6656, 6528, 6544, 6540, - 0, 4096, 6144, 6656, 6528, 6544, 6545, 6542, - 0, 4096, 6144, 6656, 6528, 0, 4096, 6144, - 6656, 6528, 6544, 0, 4096, 6144, 6656, 6528, - 6544, 0, 4096, 6144, 6656, 6528, 6544, 6546, - 0, 4096, 6144, 6656, 6528, 6544, 0, 4096, - 6144, 6656, 6528, 6544, 6548, 0, 4096, 6144, - 6656, 6528, 6544, 6548, 0, 4096, 6144, 6656, - 6528, 6544, 6552, 6550, 0, 4096, 6144, 6656, - 6528, 6544, 0, 4096, 6144, 6656, 6528, 6560, - 6552, 0, 4096, 6144, 6656, 6528, 6560, 6552, - 0, 4096, 6144, 6656, 6528, 6560, 6552, 6554, - 0, 4096, 6144, 6656, 6528, 6560, 6552, 0, - 4096, 6144, 6656, 6528, 6560, 6561, 6556, 0, - 4096, 6144, 6656, 6528, 6560, 6561, 6556, 0, - 4096, 6144, 6656, 6528, 6560, 6561, 6556, 6558, - 0, 4096, 6144, 6656, 6528, 0, 4096, 6144, - 6656, 6528, 6560, 0, 4096, 6144, 6656, 6528, - 6560, 0, 4096, 6144, 6656, 6528, 6560, 6562, - 0, 4096, 6144, 6656, 6528, 6560, 0, 4096, - 6144, 6656, 6528, 6560, 6564, 0, 4096, 6144, - 6656, 6528, 6560, 6564, 0, 4096, 6144, 6656, - 6528, 6560, 6568, 6566, 0, 4096, 6144, 6656, - 6528, 6560, 0, 4096, 6144, 6656, 6528, 6560, - 6568, 0, 4096, 6144, 6656, 6528, 6560, 6568, - 0, 4096, 6144, 6656, 6528, 6560, 6568, 6570, - 0, 4096, 6144, 6656, 6528, 6560, 6568, 0, - 4096, 6144, 6656, 6528, 6560, 6576, 6572, 0, - 4096, 6144, 6656, 6528, 6560, 6576, 6572, 0, - 4096, 6144, 6656, 6528, 6560, 6576, 6577, 6574, - 0, 4096, 6144, 6656, 6528, 6560, 0, 4096, - 6144, 6656, 6528, 6592, 6576, 0, 4096, 6144, - 6656, 6528, 6592, 6576, 0, 4096, 6144, 6656, - 6528, 6592, 6576, 6578, 0, 4096, 6144, 6656, - 6528, 6592, 6576, 0, 4096, 6144, 6656, 6528, - 6592, 6576, 6580, 0, 4096, 6144, 6656, 6528, - 6592, 6576, 6580, 0, 4096, 6144, 6656, 6528, - 6592, 6576, 6584, 6582, 0, 4096, 6144, 6656, - 6528, 6592, 6576, 0, 4096, 6144, 6656, 6528, - 6592, 6593, 6584, 0, 4096, 6144, 6656, 6528, - 6592, 6593, 6584, 0, 4096, 6144, 6656, 6528, - 6592, 6593, 6584, 6586, 0, 4096, 6144, 6656, - 6528, 6592, 6593, 6584, 0, 4096, 6144, 6656, - 6528, 6592, 6593, 6584, 6588, 0, 4096, 6144, - 6656, 6528, 6592, 6593, 6595, 6588, 0, 4096, - 6144, 6656, 6528, 6592, 6593, 6595, 6588, 6590, - 0, 4096, 6144, 6656, 6528, 0, 4096, 6144, - 6656, 6657, 6592, 0, 4096, 6144, 6656, 6657, - 6592, 0, 4096, 6144, 6656, 6657, 6592, 6594, - 0, 4096, 6144, 6656, 6657, 6592, 0, 4096, - 6144, 6656, 6657, 6592, 6596, 0, 4096, 6144, - 6656, 6657, 6592, 6596, 0, 4096, 6144, 6656, - 6657, 6592, 6600, 6598, 0, 4096, 6144, 6656, - 6657, 6592, 0, 4096, 6144, 6656, 6657, 6592, - 6600, 0, 4096, 6144, 6656, 6657, 6592, 6600, - 0, 4096, 6144, 6656, 6657, 6592, 6600, 6602, - 0, 4096, 6144, 6656, 6657, 6592, 6600, 0, - 4096, 6144, 6656, 6657, 6592, 6608, 6604, 0, - 4096, 6144, 6656, 6657, 6592, 6608, 6604, 0, - 4096, 6144, 6656, 6657, 6592, 6608, 6609, 6606, - 0, 4096, 6144, 6656, 6657, 6592, 0, 4096, - 6144, 6656, 6657, 6592, 6608, 0, 4096, 6144, - 6656, 6657, 6592, 6608, 0, 4096, 6144, 6656, - 6657, 6592, 6608, 6610, 0, 4096, 6144, 6656, - 6657, 6592, 6608, 0, 4096, 6144, 6656, 6657, - 6592, 6608, 6612, 0, 4096, 6144, 6656, 6657, - 6592, 6608, 6612, 0, 4096, 6144, 6656, 6657, - 6592, 6608, 6616, 6614, 0, 4096, 6144, 6656, - 6657, 6592, 6608, 0, 4096, 6144, 6656, 6657, - 6592, 6624, 6616, 0, 4096, 6144, 6656, 6657, - 6592, 6624, 6616, 0, 4096, 6144, 6656, 6657, - 6592, 6624, 6616, 6618, 0, 4096, 6144, 6656, - 6657, 6592, 6624, 6616, 0, 4096, 6144, 6656, - 6657, 6592, 6624, 6625, 6620, 0, 4096, 6144, - 6656, 6657, 6592, 6624, 6625, 6620, 0, 4096, - 6144, 6656, 6657, 6592, 6624, 6625, 6620, 6622, - 0, 4096, 6144, 6656, 6657, 6592, 0, 4096, - 6144, 6656, 6657, 6592, 6624, 0, 4096, 6144, - 6656, 6657, 6659, 6624, 0, 4096, 6144, 6656, - 6657, 6659, 6624, 6626, 0, 4096, 6144, 6656, - 6657, 6659, 6624, 0, 4096, 6144, 6656, 6657, - 6659, 6624, 6628, 0, 4096, 6144, 6656, 6657, - 6659, 6624, 6628, 0, 4096, 6144, 6656, 6657, - 6659, 6624, 6632, 6630, 0, 4096, 6144, 6656, - 6657, 6659, 6624, 0, 4096, 6144, 6656, 6657, - 6659, 6624, 6632, 0, 4096, 6144, 6656, 6657, - 6659, 6624, 6632, 0, 4096, 6144, 6656, 6657, - 6659, 6624, 6632, 6634, 0, 4096, 6144, 6656, - 6657, 6659, 6624, 6632, 0, 4096, 6144, 6656, - 6657, 6659, 6624, 6640, 6636, 0, 4096, 6144, - 6656, 6657, 6659, 6624, 6640, 6636, 0, 4096, - 6144, 6656, 6657, 6659, 6624, 6640, 6641, 6638, - 0, 4096, 6144, 6656, 6657, 6659, 6624, 0, - 4096, 6144, 6656, 6657, 6659, 6624, 6640, 0, - 4096, 6144, 6656, 6657, 6659, 6624, 6640, 0, - 4096, 6144, 6656, 6657, 6659, 6624, 6640, 6642, - 0, 4096, 6144, 6656, 6657, 6659, 6663, 6640, - 0, 4096, 6144, 6656, 6657, 6659, 6663, 6640, - 6644, 0, 4096, 6144, 6656, 6657, 6659, 6663, - 6640, 6644, 0, 4096, 6144, 6656, 6657, 6659, - 6663, 6640, 6648, 6646, 0, 4096, 6144, 6656, - 6657, 6659, 6663, 6640, 0, 4096, 6144, 6656, - 6657, 6659, 6663, 6640, 6648, 0, 4096, 6144, - 6656, 6657, 6659, 6663, 6640, 6648, 0, 4096, - 6144, 6656, 6657, 6659, 6663, 6640, 6648, 6650, - 0, 4096, 6144, 6656, 6657, 6659, 6663, 6640, - 6648, 0, 4096, 6144, 6656, 6657, 6659, 6663, - 6640, 6648, 6652, 0, 4096, 6144, 6656, 6657, - 6659, 6663, 6640, 6648, 6652, 0, 4096, 6144, - 6656, 6657, 6659, 6663, 6640, 6648, 6652, 6654, - 0, 4096, 6144, 0, 4096, 6144, 6656, 0, - 4096, 6144, 6656, 0, 4096, 6144, 6656, 6658, - 0, 4096, 6144, 6656, 0, 4096, 6144, 6656, - 6660, 0, 4096, 6144, 6656, 6660, 0, 4096, - 6144, 6656, 6664, 6662, 0, 4096, 6144, 6656, - 0, 4096, 6144, 6656, 6664, 0, 4096, 6144, - 6656, 6664, 0, 4096, 6144, 6656, 6664, 6666, - 0, 4096, 6144, 6656, 6664, 0, 4096, 6144, - 6656, 6672, 6668, 0, 4096, 6144, 6656, 6672, - 6668, 0, 4096, 6144, 6656, 6672, 6673, 6670, - 0, 4096, 6144, 6656, 0, 4096, 6144, 6656, - 6672, 0, 4096, 6144, 6656, 6672, 0, 4096, - 6144, 6656, 6672, 6674, 0, 4096, 6144, 6656, - 6672, 0, 4096, 6144, 6656, 6672, 6676, 0, - 4096, 6144, 6656, 6672, 6676, 0, 4096, 6144, - 6656, 6672, 6680, 6678, 0, 4096, 6144, 6656, - 6672, 0, 4096, 6144, 6656, 6688, 6680, 0, - 4096, 6144, 6656, 6688, 6680, 0, 4096, 6144, - 6656, 6688, 6680, 6682, 0, 4096, 6144, 6656, - 6688, 6680, 0, 4096, 6144, 6656, 6688, 6689, - 6684, 0, 4096, 6144, 6656, 6688, 6689, 6684, - 0, 4096, 6144, 6656, 6688, 6689, 6684, 6686, - 0, 4096, 6144, 6656, 0, 4096, 6144, 6656, - 6688, 0, 4096, 6144, 6656, 6688, 0, 4096, - 6144, 6656, 6688, 6690, 0, 4096, 6144, 6656, - 6688, 0, 4096, 6144, 6656, 6688, 6692, 0, - 4096, 6144, 6656, 6688, 6692, 0, 4096, 6144, - 6656, 6688, 6696, 6694, 0, 4096, 6144, 6656, - 6688, 0, 4096, 6144, 6656, 6688, 6696, 0, - 4096, 6144, 6656, 6688, 6696, 0, 4096, 6144, - 6656, 6688, 6696, 6698, 0, 4096, 6144, 6656, - 6688, 6696, 0, 4096, 6144, 6656, 6688, 6704, - 6700, 0, 4096, 6144, 6656, 6688, 6704, 6700, - 0, 4096, 6144, 6656, 6688, 6704, 6705, 6702, - 0, 4096, 6144, 6656, 6688, 0, 4096, 6144, - 6656, 6720, 6704, 0, 4096, 6144, 6656, 6720, - 6704, 0, 4096, 6144, 6656, 6720, 6704, 6706, - 0, 4096, 6144, 6656, 6720, 6704, 0, 4096, - 6144, 6656, 6720, 6704, 6708, 0, 4096, 6144, - 6656, 6720, 6704, 6708, 0, 4096, 6144, 6656, - 6720, 6704, 6712, 6710, 0, 4096, 6144, 6656, - 6720, 6704, 0, 4096, 6144, 6656, 6720, 6721, - 6712, 0, 4096, 6144, 6656, 6720, 6721, 6712, - 0, 4096, 6144, 6656, 6720, 6721, 6712, 6714, - 0, 4096, 6144, 6656, 6720, 6721, 6712, 0, - 4096, 6144, 6656, 6720, 6721, 6712, 6716, 0, - 4096, 6144, 6656, 6720, 6721, 6723, 6716, 0, - 4096, 6144, 6656, 6720, 6721, 6723, 6716, 6718, - 0, 4096, 6144, 6656, 0, 4096, 6144, 6656, - 6720, 0, 4096, 6144, 6656, 6720, 0, 4096, - 6144, 6656, 6720, 6722, 0, 4096, 6144, 6656, - 6720, 0, 4096, 6144, 6656, 6720, 6724, 0, - 4096, 6144, 6656, 6720, 6724, 0, 4096, 6144, - 6656, 6720, 6728, 6726, 0, 4096, 6144, 6656, - 6720, 0, 4096, 6144, 6656, 6720, 6728, 0, - 4096, 6144, 6656, 6720, 6728, 0, 4096, 6144, - 6656, 6720, 6728, 6730, 0, 4096, 6144, 6656, - 6720, 6728, 0, 4096, 6144, 6656, 6720, 6736, - 6732, 0, 4096, 6144, 6656, 6720, 6736, 6732, - 0, 4096, 6144, 6656, 6720, 6736, 6737, 6734, - 0, 4096, 6144, 6656, 6720, 0, 4096, 6144, - 6656, 6720, 6736, 0, 4096, 6144, 6656, 6720, - 6736, 0, 4096, 6144, 6656, 6720, 6736, 6738, - 0, 4096, 6144, 6656, 6720, 6736, 0, 4096, - 6144, 6656, 6720, 6736, 6740, 0, 4096, 6144, - 6656, 6720, 6736, 6740, 0, 4096, 6144, 6656, - 6720, 6736, 6744, 6742, 0, 4096, 6144, 6656, - 6720, 6736, 0, 4096, 6144, 6656, 6720, 6752, - 6744, 0, 4096, 6144, 6656, 6720, 6752, 6744, - 0, 4096, 6144, 6656, 6720, 6752, 6744, 6746, - 0, 4096, 6144, 6656, 6720, 6752, 6744, 0, - 4096, 6144, 6656, 6720, 6752, 6753, 6748, 0, - 4096, 6144, 6656, 6720, 6752, 6753, 6748, 0, - 4096, 6144, 6656, 6720, 6752, 6753, 6748, 6750, - 0, 4096, 6144, 6656, 6720, 0, 4096, 6144, - 6656, 6784, 6752, 0, 4096, 6144, 6656, 6784, - 6752, 0, 4096, 6144, 6656, 6784, 6752, 6754, - 0, 4096, 6144, 6656, 6784, 6752, 0, 4096, - 6144, 6656, 6784, 6752, 6756, 0, 4096, 6144, - 6656, 6784, 6752, 6756, 0, 4096, 6144, 6656, - 6784, 6752, 6760, 6758, 0, 4096, 6144, 6656, - 6784, 6752, 0, 4096, 6144, 6656, 6784, 6752, - 6760, 0, 4096, 6144, 6656, 6784, 6752, 6760, - 0, 4096, 6144, 6656, 6784, 6752, 6760, 6762, - 0, 4096, 6144, 6656, 6784, 6752, 6760, 0, - 4096, 6144, 6656, 6784, 6752, 6768, 6764, 0, - 4096, 6144, 6656, 6784, 6752, 6768, 6764, 0, - 4096, 6144, 6656, 6784, 6752, 6768, 6769, 6766, - 0, 4096, 6144, 6656, 6784, 6752, 0, 4096, - 6144, 6656, 6784, 6785, 6768, 0, 4096, 6144, - 6656, 6784, 6785, 6768, 0, 4096, 6144, 6656, - 6784, 6785, 6768, 6770, 0, 4096, 6144, 6656, - 6784, 6785, 6768, 0, 4096, 6144, 6656, 6784, - 6785, 6768, 6772, 0, 4096, 6144, 6656, 6784, - 6785, 6768, 6772, 0, 4096, 6144, 6656, 6784, - 6785, 6768, 6776, 6774, 0, 4096, 6144, 6656, - 6784, 6785, 6768, 0, 4096, 6144, 6656, 6784, - 6785, 6768, 6776, 0, 4096, 6144, 6656, 6784, - 6785, 6787, 6776, 0, 4096, 6144, 6656, 6784, - 6785, 6787, 6776, 6778, 0, 4096, 6144, 6656, - 6784, 6785, 6787, 6776, 0, 4096, 6144, 6656, - 6784, 6785, 6787, 6776, 6780, 0, 4096, 6144, - 6656, 6784, 6785, 6787, 6776, 6780, 0, 4096, - 6144, 6656, 6784, 6785, 6787, 6776, 6780, 6782, - 0, 4096, 6144, 6656, 0, 4096, 6144, 6656, - 6784, 0, 4096, 6144, 6656, 6784, 0, 4096, - 6144, 6656, 6784, 6786, 0, 4096, 6144, 6656, - 6784, 0, 4096, 6144, 6656, 6784, 6788, 0, - 4096, 6144, 6656, 6784, 6788, 0, 4096, 6144, - 6656, 6784, 6792, 6790, 0, 4096, 6144, 6656, - 6784, 0, 4096, 6144, 6656, 6784, 6792, 0, - 4096, 6144, 6656, 6784, 6792, 0, 4096, 6144, - 6656, 6784, 6792, 6794, 0, 4096, 6144, 6656, - 6784, 6792, 0, 4096, 6144, 6656, 6784, 6800, - 6796, 0, 4096, 6144, 6656, 6784, 6800, 6796, - 0, 4096, 6144, 6656, 6784, 6800, 6801, 6798, - 0, 4096, 6144, 6656, 6784, 0, 4096, 6144, - 6656, 6784, 6800, 0, 4096, 6144, 6656, 6784, - 6800, 0, 4096, 6144, 6656, 6784, 6800, 6802, - 0, 4096, 6144, 6656, 6784, 6800, 0, 4096, - 6144, 6656, 6784, 6800, 6804, 0, 4096, 6144, - 6656, 6784, 6800, 6804, 0, 4096, 6144, 6656, - 6784, 6800, 6808, 6806, 0, 4096, 6144, 6656, - 6784, 6800, 0, 4096, 6144, 6656, 6784, 6816, - 6808, 0, 4096, 6144, 6656, 6784, 6816, 6808, - 0, 4096, 6144, 6656, 6784, 6816, 6808, 6810, - 0, 4096, 6144, 6656, 6784, 6816, 6808, 0, - 4096, 6144, 6656, 6784, 6816, 6817, 6812, 0, - 4096, 6144, 6656, 6784, 6816, 6817, 6812, 0, - 4096, 6144, 6656, 6784, 6816, 6817, 6812, 6814, - 0, 4096, 6144, 6656, 6784, 0, 4096, 6144, - 6656, 6784, 6816, 0, 4096, 6144, 6656, 6784, - 6816, 0, 4096, 6144, 6656, 6784, 6816, 6818, - 0, 4096, 6144, 6656, 6784, 6816, 0, 4096, - 6144, 6656, 6784, 6816, 6820, 0, 4096, 6144, - 6656, 6784, 6816, 6820, 0, 4096, 6144, 6656, - 6784, 6816, 6824, 6822, 0, 4096, 6144, 6656, - 6784, 6816, 0, 4096, 6144, 6656, 6784, 6816, - 6824, 0, 4096, 6144, 6656, 6784, 6816, 6824, - 0, 4096, 6144, 6656, 6784, 6816, 6824, 6826, - 0, 4096, 6144, 6656, 6784, 6816, 6824, 0, - 4096, 6144, 6656, 6784, 6816, 6832, 6828, 0, - 4096, 6144, 6656, 6784, 6816, 6832, 6828, 0, - 4096, 6144, 6656, 6784, 6816, 6832, 6833, 6830, - 0, 4096, 6144, 6656, 6784, 6816, 0, 4096, - 6144, 6656, 6784, 6848, 6832, 0, 4096, 6144, - 6656, 6784, 6848, 6832, 0, 4096, 6144, 6656, - 6784, 6848, 6832, 6834, 0, 4096, 6144, 6656, - 6784, 6848, 6832, 0, 4096, 6144, 6656, 6784, - 6848, 6832, 6836, 0, 4096, 6144, 6656, 6784, - 6848, 6832, 6836, 0, 4096, 6144, 6656, 6784, - 6848, 6832, 6840, 6838, 0, 4096, 6144, 6656, - 6784, 6848, 6832, 0, 4096, 6144, 6656, 6784, - 6848, 6849, 6840, 0, 4096, 6144, 6656, 6784, - 6848, 6849, 6840, 0, 4096, 6144, 6656, 6784, - 6848, 6849, 6840, 6842, 0, 4096, 6144, 6656, - 6784, 6848, 6849, 6840, 0, 4096, 6144, 6656, - 6784, 6848, 6849, 6840, 6844, 0, 4096, 6144, - 6656, 6784, 6848, 6849, 6851, 6844, 0, 4096, - 6144, 6656, 6784, 6848, 6849, 6851, 6844, 6846, - 0, 4096, 6144, 6656, 6784, 0, 4096, 6144, - 6656, 6912, 6848, 0, 4096, 6144, 6656, 6912, - 6848, 0, 4096, 6144, 6656, 6912, 6848, 6850, - 0, 4096, 6144, 6656, 6912, 6848, 0, 4096, - 6144, 6656, 6912, 6848, 6852, 0, 4096, 6144, - 6656, 6912, 6848, 6852, 0, 4096, 6144, 6656, - 6912, 6848, 6856, 6854, 0, 4096, 6144, 6656, - 6912, 6848, 0, 4096, 6144, 6656, 6912, 6848, - 6856, 0, 4096, 6144, 6656, 6912, 6848, 6856, - 0, 4096, 6144, 6656, 6912, 6848, 6856, 6858, - 0, 4096, 6144, 6656, 6912, 6848, 6856, 0, - 4096, 6144, 6656, 6912, 6848, 6864, 6860, 0, - 4096, 6144, 6656, 6912, 6848, 6864, 6860, 0, - 4096, 6144, 6656, 6912, 6848, 6864, 6865, 6862, - 0, 4096, 6144, 6656, 6912, 6848, 0, 4096, - 6144, 6656, 6912, 6848, 6864, 0, 4096, 6144, - 6656, 6912, 6848, 6864, 0, 4096, 6144, 6656, - 6912, 6848, 6864, 6866, 0, 4096, 6144, 6656, - 6912, 6848, 6864, 0, 4096, 6144, 6656, 6912, - 6848, 6864, 6868, 0, 4096, 6144, 6656, 6912, - 6848, 6864, 6868, 0, 4096, 6144, 6656, 6912, - 6848, 6864, 6872, 6870, 0, 4096, 6144, 6656, - 6912, 6848, 6864, 0, 4096, 6144, 6656, 6912, - 6848, 6880, 6872, 0, 4096, 6144, 6656, 6912, - 6848, 6880, 6872, 0, 4096, 6144, 6656, 6912, - 6848, 6880, 6872, 6874, 0, 4096, 6144, 6656, - 6912, 6848, 6880, 6872, 0, 4096, 6144, 6656, - 6912, 6848, 6880, 6881, 6876, 0, 4096, 6144, - 6656, 6912, 6848, 6880, 6881, 6876, 0, 4096, - 6144, 6656, 6912, 6848, 6880, 6881, 6876, 6878, - 0, 4096, 6144, 6656, 6912, 6848, 0, 4096, - 6144, 6656, 6912, 6913, 6880, 0, 4096, 6144, - 6656, 6912, 6913, 6880, 0, 4096, 6144, 6656, - 6912, 6913, 6880, 6882, 0, 4096, 6144, 6656, - 6912, 6913, 6880, 0, 4096, 6144, 6656, 6912, - 6913, 6880, 6884, 0, 4096, 6144, 6656, 6912, - 6913, 6880, 6884, 0, 4096, 6144, 6656, 6912, - 6913, 6880, 6888, 6886, 0, 4096, 6144, 6656, - 6912, 6913, 6880, 0, 4096, 6144, 6656, 6912, - 6913, 6880, 6888, 0, 4096, 6144, 6656, 6912, - 6913, 6880, 6888, 0, 4096, 6144, 6656, 6912, - 6913, 6880, 6888, 6890, 0, 4096, 6144, 6656, - 6912, 6913, 6880, 6888, 0, 4096, 6144, 6656, - 6912, 6913, 6880, 6896, 6892, 0, 4096, 6144, - 6656, 6912, 6913, 6880, 6896, 6892, 0, 4096, - 6144, 6656, 6912, 6913, 6880, 6896, 6897, 6894, - 0, 4096, 6144, 6656, 6912, 6913, 6880, 0, - 4096, 6144, 6656, 6912, 6913, 6880, 6896, 0, - 4096, 6144, 6656, 6912, 6913, 6915, 6896, 0, - 4096, 6144, 6656, 6912, 6913, 6915, 6896, 6898, - 0, 4096, 6144, 6656, 6912, 6913, 6915, 6896, - 0, 4096, 6144, 6656, 6912, 6913, 6915, 6896, - 6900, 0, 4096, 6144, 6656, 6912, 6913, 6915, - 6896, 6900, 0, 4096, 6144, 6656, 6912, 6913, - 6915, 6896, 6904, 6902, 0, 4096, 6144, 6656, - 6912, 6913, 6915, 6896, 0, 4096, 6144, 6656, - 6912, 6913, 6915, 6896, 6904, 0, 4096, 6144, - 6656, 6912, 6913, 6915, 6896, 6904, 0, 4096, - 6144, 6656, 6912, 6913, 6915, 6896, 6904, 6906, - 0, 4096, 6144, 6656, 6912, 6913, 6915, 6919, - 6904, 0, 4096, 6144, 6656, 6912, 6913, 6915, - 6919, 6904, 6908, 0, 4096, 6144, 6656, 6912, - 6913, 6915, 6919, 6904, 6908, 0, 4096, 6144, - 6656, 6912, 6913, 6915, 6919, 6904, 6908, 6910, - 0, 4096, 6144, 6656, 0, 4096, 6144, 7168, - 6912, 0, 4096, 6144, 7168, 6912, 0, 4096, - 6144, 7168, 6912, 6914, 0, 4096, 6144, 7168, - 6912, 0, 4096, 6144, 7168, 6912, 6916, 0, - 4096, 6144, 7168, 6912, 6916, 0, 4096, 6144, - 7168, 6912, 6920, 6918, 0, 4096, 6144, 7168, - 6912, 0, 4096, 6144, 7168, 6912, 6920, 0, - 4096, 6144, 7168, 6912, 6920, 0, 4096, 6144, - 7168, 6912, 6920, 6922, 0, 4096, 6144, 7168, - 6912, 6920, 0, 4096, 6144, 7168, 6912, 6928, - 6924, 0, 4096, 6144, 7168, 6912, 6928, 6924, - 0, 4096, 6144, 7168, 6912, 6928, 6929, 6926, - 0, 4096, 6144, 7168, 6912, 0, 4096, 6144, - 7168, 6912, 6928, 0, 4096, 6144, 7168, 6912, - 6928, 0, 4096, 6144, 7168, 6912, 6928, 6930, - 0, 4096, 6144, 7168, 6912, 6928, 0, 4096, - 6144, 7168, 6912, 6928, 6932, 0, 4096, 6144, - 7168, 6912, 6928, 6932, 0, 4096, 6144, 7168, - 6912, 6928, 6936, 6934, 0, 4096, 6144, 7168, - 6912, 6928, 0, 4096, 6144, 7168, 6912, 6944, - 6936, 0, 4096, 6144, 7168, 6912, 6944, 6936, - 0, 4096, 6144, 7168, 6912, 6944, 6936, 6938, - 0, 4096, 6144, 7168, 6912, 6944, 6936, 0, - 4096, 6144, 7168, 6912, 6944, 6945, 6940, 0, - 4096, 6144, 7168, 6912, 6944, 6945, 6940, 0, - 4096, 6144, 7168, 6912, 6944, 6945, 6940, 6942, - 0, 4096, 6144, 7168, 6912, 0, 4096, 6144, - 7168, 6912, 6944, 0, 4096, 6144, 7168, 6912, - 6944, 0, 4096, 6144, 7168, 6912, 6944, 6946, - 0, 4096, 6144, 7168, 6912, 6944, 0, 4096, - 6144, 7168, 6912, 6944, 6948, 0, 4096, 6144, - 7168, 6912, 6944, 6948, 0, 4096, 6144, 7168, - 6912, 6944, 6952, 6950, 0, 4096, 6144, 7168, - 6912, 6944, 0, 4096, 6144, 7168, 6912, 6944, - 6952, 0, 4096, 6144, 7168, 6912, 6944, 6952, - 0, 4096, 6144, 7168, 6912, 6944, 6952, 6954, - 0, 4096, 6144, 7168, 6912, 6944, 6952, 0, - 4096, 6144, 7168, 6912, 6944, 6960, 6956, 0, - 4096, 6144, 7168, 6912, 6944, 6960, 6956, 0, - 4096, 6144, 7168, 6912, 6944, 6960, 6961, 6958, - 0, 4096, 6144, 7168, 6912, 6944, 0, 4096, - 6144, 7168, 6912, 6976, 6960, 0, 4096, 6144, - 7168, 6912, 6976, 6960, 0, 4096, 6144, 7168, - 6912, 6976, 6960, 6962, 0, 4096, 6144, 7168, - 6912, 6976, 6960, 0, 4096, 6144, 7168, 6912, - 6976, 6960, 6964, 0, 4096, 6144, 7168, 6912, - 6976, 6960, 6964, 0, 4096, 6144, 7168, 6912, - 6976, 6960, 6968, 6966, 0, 4096, 6144, 7168, - 6912, 6976, 6960, 0, 4096, 6144, 7168, 6912, - 6976, 6977, 6968, 0, 4096, 6144, 7168, 6912, - 6976, 6977, 6968, 0, 4096, 6144, 7168, 6912, - 6976, 6977, 6968, 6970, 0, 4096, 6144, 7168, - 6912, 6976, 6977, 6968, 0, 4096, 6144, 7168, - 6912, 6976, 6977, 6968, 6972, 0, 4096, 6144, - 7168, 6912, 6976, 6977, 6979, 6972, 0, 4096, - 6144, 7168, 6912, 6976, 6977, 6979, 6972, 6974, - 0, 4096, 6144, 7168, 6912, 0, 4096, 6144, - 7168, 6912, 6976, 0, 4096, 6144, 7168, 6912, - 6976, 0, 4096, 6144, 7168, 6912, 6976, 6978, - 0, 4096, 6144, 7168, 6912, 6976, 0, 4096, - 6144, 7168, 6912, 6976, 6980, 0, 4096, 6144, - 7168, 6912, 6976, 6980, 0, 4096, 6144, 7168, - 6912, 6976, 6984, 6982, 0, 4096, 6144, 7168, - 6912, 6976, 0, 4096, 6144, 7168, 6912, 6976, - 6984, 0, 4096, 6144, 7168, 6912, 6976, 6984, - 0, 4096, 6144, 7168, 6912, 6976, 6984, 6986, - 0, 4096, 6144, 7168, 6912, 6976, 6984, 0, - 4096, 6144, 7168, 6912, 6976, 6992, 6988, 0, - 4096, 6144, 7168, 6912, 6976, 6992, 6988, 0, - 4096, 6144, 7168, 6912, 6976, 6992, 6993, 6990, - 0, 4096, 6144, 7168, 6912, 6976, 0, 4096, - 6144, 7168, 6912, 6976, 6992, 0, 4096, 6144, - 7168, 6912, 6976, 6992, 0, 4096, 6144, 7168, - 6912, 6976, 6992, 6994, 0, 4096, 6144, 7168, - 6912, 6976, 6992, 0, 4096, 6144, 7168, 6912, - 6976, 6992, 6996, 0, 4096, 6144, 7168, 6912, - 6976, 6992, 6996, 0, 4096, 6144, 7168, 6912, - 6976, 6992, 7000, 6998, 0, 4096, 6144, 7168, - 6912, 6976, 6992, 0, 4096, 6144, 7168, 6912, - 6976, 7008, 7000, 0, 4096, 6144, 7168, 6912, - 6976, 7008, 7000, 0, 4096, 6144, 7168, 6912, - 6976, 7008, 7000, 7002, 0, 4096, 6144, 7168, - 6912, 6976, 7008, 7000, 0, 4096, 6144, 7168, - 6912, 6976, 7008, 7009, 7004, 0, 4096, 6144, - 7168, 6912, 6976, 7008, 7009, 7004, 0, 4096, - 6144, 7168, 6912, 6976, 7008, 7009, 7004, 7006, - 0, 4096, 6144, 7168, 6912, 6976, 0, 4096, - 6144, 7168, 6912, 7040, 7008, 0, 4096, 6144, - 7168, 6912, 7040, 7008, 0, 4096, 6144, 7168, - 6912, 7040, 7008, 7010, 0, 4096, 6144, 7168, - 6912, 7040, 7008, 0, 4096, 6144, 7168, 6912, - 7040, 7008, 7012, 0, 4096, 6144, 7168, 6912, - 7040, 7008, 7012, 0, 4096, 6144, 7168, 6912, - 7040, 7008, 7016, 7014, 0, 4096, 6144, 7168, - 6912, 7040, 7008, 0, 4096, 6144, 7168, 6912, - 7040, 7008, 7016, 0, 4096, 6144, 7168, 6912, - 7040, 7008, 7016, 0, 4096, 6144, 7168, 6912, - 7040, 7008, 7016, 7018, 0, 4096, 6144, 7168, - 6912, 7040, 7008, 7016, 0, 4096, 6144, 7168, - 6912, 7040, 7008, 7024, 7020, 0, 4096, 6144, - 7168, 6912, 7040, 7008, 7024, 7020, 0, 4096, - 6144, 7168, 6912, 7040, 7008, 7024, 7025, 7022, - 0, 4096, 6144, 7168, 6912, 7040, 7008, 0, - 4096, 6144, 7168, 6912, 7040, 7041, 7024, 0, - 4096, 6144, 7168, 6912, 7040, 7041, 7024, 0, - 4096, 6144, 7168, 6912, 7040, 7041, 7024, 7026, - 0, 4096, 6144, 7168, 6912, 7040, 7041, 7024, - 0, 4096, 6144, 7168, 6912, 7040, 7041, 7024, - 7028, 0, 4096, 6144, 7168, 6912, 7040, 7041, - 7024, 7028, 0, 4096, 6144, 7168, 6912, 7040, - 7041, 7024, 7032, 7030, 0, 4096, 6144, 7168, - 6912, 7040, 7041, 7024, 0, 4096, 6144, 7168, - 6912, 7040, 7041, 7024, 7032, 0, 4096, 6144, - 7168, 6912, 7040, 7041, 7043, 7032, 0, 4096, - 6144, 7168, 6912, 7040, 7041, 7043, 7032, 7034, - 0, 4096, 6144, 7168, 6912, 7040, 7041, 7043, - 7032, 0, 4096, 6144, 7168, 6912, 7040, 7041, - 7043, 7032, 7036, 0, 4096, 6144, 7168, 6912, - 7040, 7041, 7043, 7032, 7036, 0, 4096, 6144, - 7168, 6912, 7040, 7041, 7043, 7032, 7036, 7038, - 0, 4096, 6144, 7168, 6912, 0, 4096, 6144, - 7168, 6912, 7040, 0, 4096, 6144, 7168, 7169, - 7040, 0, 4096, 6144, 7168, 7169, 7040, 7042, - 0, 4096, 6144, 7168, 7169, 7040, 0, 4096, - 6144, 7168, 7169, 7040, 7044, 0, 4096, 6144, - 7168, 7169, 7040, 7044, 0, 4096, 6144, 7168, - 7169, 7040, 7048, 7046, 0, 4096, 6144, 7168, - 7169, 7040, 0, 4096, 6144, 7168, 7169, 7040, - 7048, 0, 4096, 6144, 7168, 7169, 7040, 7048, - 0, 4096, 6144, 7168, 7169, 7040, 7048, 7050, - 0, 4096, 6144, 7168, 7169, 7040, 7048, 0, - 4096, 6144, 7168, 7169, 7040, 7056, 7052, 0, - 4096, 6144, 7168, 7169, 7040, 7056, 7052, 0, - 4096, 6144, 7168, 7169, 7040, 7056, 7057, 7054, - 0, 4096, 6144, 7168, 7169, 7040, 0, 4096, - 6144, 7168, 7169, 7040, 7056, 0, 4096, 6144, - 7168, 7169, 7040, 7056, 0, 4096, 6144, 7168, - 7169, 7040, 7056, 7058, 0, 4096, 6144, 7168, - 7169, 7040, 7056, 0, 4096, 6144, 7168, 7169, - 7040, 7056, 7060, 0, 4096, 6144, 7168, 7169, - 7040, 7056, 7060, 0, 4096, 6144, 7168, 7169, - 7040, 7056, 7064, 7062, 0, 4096, 6144, 7168, - 7169, 7040, 7056, 0, 4096, 6144, 7168, 7169, - 7040, 7072, 7064, 0, 4096, 6144, 7168, 7169, - 7040, 7072, 7064, 0, 4096, 6144, 7168, 7169, - 7040, 7072, 7064, 7066, 0, 4096, 6144, 7168, - 7169, 7040, 7072, 7064, 0, 4096, 6144, 7168, - 7169, 7040, 7072, 7073, 7068, 0, 4096, 6144, - 7168, 7169, 7040, 7072, 7073, 7068, 0, 4096, - 6144, 7168, 7169, 7040, 7072, 7073, 7068, 7070, - 0, 4096, 6144, 7168, 7169, 7040, 0, 4096, - 6144, 7168, 7169, 7040, 7072, 0, 4096, 6144, - 7168, 7169, 7040, 7072, 0, 4096, 6144, 7168, - 7169, 7040, 7072, 7074, 0, 4096, 6144, 7168, - 7169, 7040, 7072, 0, 4096, 6144, 7168, 7169, - 7040, 7072, 7076, 0, 4096, 6144, 7168, 7169, - 7040, 7072, 7076, 0, 4096, 6144, 7168, 7169, - 7040, 7072, 7080, 7078, 0, 4096, 6144, 7168, - 7169, 7040, 7072, 0, 4096, 6144, 7168, 7169, - 7040, 7072, 7080, 0, 4096, 6144, 7168, 7169, - 7040, 7072, 7080, 0, 4096, 6144, 7168, 7169, - 7040, 7072, 7080, 7082, 0, 4096, 6144, 7168, - 7169, 7040, 7072, 7080, 0, 4096, 6144, 7168, - 7169, 7040, 7072, 7088, 7084, 0, 4096, 6144, - 7168, 7169, 7040, 7072, 7088, 7084, 0, 4096, - 6144, 7168, 7169, 7040, 7072, 7088, 7089, 7086, - 0, 4096, 6144, 7168, 7169, 7040, 7072, 0, - 4096, 6144, 7168, 7169, 7040, 7104, 7088, 0, - 4096, 6144, 7168, 7169, 7040, 7104, 7088, 0, - 4096, 6144, 7168, 7169, 7040, 7104, 7088, 7090, - 0, 4096, 6144, 7168, 7169, 7040, 7104, 7088, - 0, 4096, 6144, 7168, 7169, 7040, 7104, 7088, - 7092, 0, 4096, 6144, 7168, 7169, 7040, 7104, - 7088, 7092, 0, 4096, 6144, 7168, 7169, 7040, - 7104, 7088, 7096, 7094, 0, 4096, 6144, 7168, - 7169, 7040, 7104, 7088, 0, 4096, 6144, 7168, - 7169, 7040, 7104, 7105, 7096, 0, 4096, 6144, - 7168, 7169, 7040, 7104, 7105, 7096, 0, 4096, - 6144, 7168, 7169, 7040, 7104, 7105, 7096, 7098, - 0, 4096, 6144, 7168, 7169, 7040, 7104, 7105, - 7096, 0, 4096, 6144, 7168, 7169, 7040, 7104, - 7105, 7096, 7100, 0, 4096, 6144, 7168, 7169, - 7040, 7104, 7105, 7107, 7100, 0, 4096, 6144, - 7168, 7169, 7040, 7104, 7105, 7107, 7100, 7102, - 0, 4096, 6144, 7168, 7169, 7040, 0, 4096, - 6144, 7168, 7169, 7040, 7104, 0, 4096, 6144, - 7168, 7169, 7040, 7104, 0, 4096, 6144, 7168, - 7169, 7040, 7104, 7106, 0, 4096, 6144, 7168, - 7169, 7171, 7104, 0, 4096, 6144, 7168, 7169, - 7171, 7104, 7108, 0, 4096, 6144, 7168, 7169, - 7171, 7104, 7108, 0, 4096, 6144, 7168, 7169, - 7171, 7104, 7112, 7110, 0, 4096, 6144, 7168, - 7169, 7171, 7104, 0, 4096, 6144, 7168, 7169, - 7171, 7104, 7112, 0, 4096, 6144, 7168, 7169, - 7171, 7104, 7112, 0, 4096, 6144, 7168, 7169, - 7171, 7104, 7112, 7114, 0, 4096, 6144, 7168, - 7169, 7171, 7104, 7112, 0, 4096, 6144, 7168, - 7169, 7171, 7104, 7120, 7116, 0, 4096, 6144, - 7168, 7169, 7171, 7104, 7120, 7116, 0, 4096, - 6144, 7168, 7169, 7171, 7104, 7120, 7121, 7118, - 0, 4096, 6144, 7168, 7169, 7171, 7104, 0, - 4096, 6144, 7168, 7169, 7171, 7104, 7120, 0, - 4096, 6144, 7168, 7169, 7171, 7104, 7120, 0, - 4096, 6144, 7168, 7169, 7171, 7104, 7120, 7122, - 0, 4096, 6144, 7168, 7169, 7171, 7104, 7120, - 0, 4096, 6144, 7168, 7169, 7171, 7104, 7120, - 7124, 0, 4096, 6144, 7168, 7169, 7171, 7104, - 7120, 7124, 0, 4096, 6144, 7168, 7169, 7171, - 7104, 7120, 7128, 7126, 0, 4096, 6144, 7168, - 7169, 7171, 7104, 7120, 0, 4096, 6144, 7168, - 7169, 7171, 7104, 7136, 7128, 0, 4096, 6144, - 7168, 7169, 7171, 7104, 7136, 7128, 0, 4096, - 6144, 7168, 7169, 7171, 7104, 7136, 7128, 7130, - 0, 4096, 6144, 7168, 7169, 7171, 7104, 7136, - 7128, 0, 4096, 6144, 7168, 7169, 7171, 7104, - 7136, 7137, 7132, 0, 4096, 6144, 7168, 7169, - 7171, 7104, 7136, 7137, 7132, 0, 4096, 6144, - 7168, 7169, 7171, 7104, 7136, 7137, 7132, 7134, - 0, 4096, 6144, 7168, 7169, 7171, 7104, 0, - 4096, 6144, 7168, 7169, 7171, 7104, 7136, 0, - 4096, 6144, 7168, 7169, 7171, 7104, 7136, 0, - 4096, 6144, 7168, 7169, 7171, 7104, 7136, 7138, - 0, 4096, 6144, 7168, 7169, 7171, 7104, 7136, - 0, 4096, 6144, 7168, 7169, 7171, 7104, 7136, - 7140, 0, 4096, 6144, 7168, 7169, 7171, 7104, - 7136, 7140, 0, 4096, 6144, 7168, 7169, 7171, - 7104, 7136, 7144, 7142, 0, 4096, 6144, 7168, - 7169, 7171, 7175, 7136, 0, 4096, 6144, 7168, - 7169, 7171, 7175, 7136, 7144, 0, 4096, 6144, - 7168, 7169, 7171, 7175, 7136, 7144, 0, 4096, - 6144, 7168, 7169, 7171, 7175, 7136, 7144, 7146, - 0, 4096, 6144, 7168, 7169, 7171, 7175, 7136, - 7144, 0, 4096, 6144, 7168, 7169, 7171, 7175, - 7136, 7152, 7148, 0, 4096, 6144, 7168, 7169, - 7171, 7175, 7136, 7152, 7148, 0, 4096, 6144, - 7168, 7169, 7171, 7175, 7136, 7152, 7153, 7150, - 0, 4096, 6144, 7168, 7169, 7171, 7175, 7136, - 0, 4096, 6144, 7168, 7169, 7171, 7175, 7136, - 7152, 0, 4096, 6144, 7168, 7169, 7171, 7175, - 7136, 7152, 0, 4096, 6144, 7168, 7169, 7171, - 7175, 7136, 7152, 7154, 0, 4096, 6144, 7168, - 7169, 7171, 7175, 7136, 7152, 0, 4096, 6144, - 7168, 7169, 7171, 7175, 7136, 7152, 7156, 0, - 4096, 6144, 7168, 7169, 7171, 7175, 7136, 7152, - 7156, 0, 4096, 6144, 7168, 7169, 7171, 7175, - 7136, 7152, 7160, 7158, 0, 4096, 6144, 7168, - 7169, 7171, 7175, 7136, 7152, 0, 4096, 6144, - 7168, 7169, 7171, 7175, 7136, 7152, 7160, 0, - 4096, 6144, 7168, 7169, 7171, 7175, 7136, 7152, - 7160, 0, 4096, 6144, 7168, 7169, 7171, 7175, - 7136, 7152, 7160, 7162, 0, 4096, 6144, 7168, - 7169, 7171, 7175, 7136, 7152, 7160, 0, 4096, - 6144, 7168, 7169, 7171, 7175, 7136, 7152, 7160, - 7164, 0, 4096, 6144, 7168, 7169, 7171, 7175, - 7136, 7152, 7160, 7164, 0, 4096, 6144, 7168, - 7169, 7171, 7175, 7136, 7152, 7160, 7164, 7166, - 0, 4096, 6144, 0, 4096, 6144, 7168, 0, - 4096, 6144, 7168, 0, 4096, 6144, 7168, 7170, - 0, 4096, 6144, 7168, 0, 4096, 6144, 7168, - 7172, 0, 4096, 6144, 7168, 7172, 0, 4096, - 6144, 7168, 7176, 7174, 0, 4096, 6144, 7168, - 0, 4096, 6144, 7168, 7176, 0, 4096, 6144, - 7168, 7176, 0, 4096, 6144, 7168, 7176, 7178, - 0, 4096, 6144, 7168, 7176, 0, 4096, 6144, - 7168, 7184, 7180, 0, 4096, 6144, 7168, 7184, - 7180, 0, 4096, 6144, 7168, 7184, 7185, 7182, - 0, 4096, 6144, 7168, 0, 4096, 6144, 7168, - 7184, 0, 4096, 6144, 7168, 7184, 0, 4096, - 6144, 7168, 7184, 7186, 0, 4096, 6144, 7168, - 7184, 0, 4096, 6144, 7168, 7184, 7188, 0, - 4096, 6144, 7168, 7184, 7188, 0, 4096, 6144, - 7168, 7184, 7192, 7190, 0, 4096, 6144, 7168, - 7184, 0, 4096, 6144, 7168, 7200, 7192, 0, - 4096, 6144, 7168, 7200, 7192, 0, 4096, 6144, - 7168, 7200, 7192, 7194, 0, 4096, 6144, 7168, - 7200, 7192, 0, 4096, 6144, 7168, 7200, 7201, - 7196, 0, 4096, 6144, 7168, 7200, 7201, 7196, - 0, 4096, 6144, 7168, 7200, 7201, 7196, 7198, - 0, 4096, 6144, 7168, 0, 4096, 6144, 7168, - 7200, 0, 4096, 6144, 7168, 7200, 0, 4096, - 6144, 7168, 7200, 7202, 0, 4096, 6144, 7168, - 7200, 0, 4096, 6144, 7168, 7200, 7204, 0, - 4096, 6144, 7168, 7200, 7204, 0, 4096, 6144, - 7168, 7200, 7208, 7206, 0, 4096, 6144, 7168, - 7200, 0, 4096, 6144, 7168, 7200, 7208, 0, - 4096, 6144, 7168, 7200, 7208, 0, 4096, 6144, - 7168, 7200, 7208, 7210, 0, 4096, 6144, 7168, - 7200, 7208, 0, 4096, 6144, 7168, 7200, 7216, - 7212, 0, 4096, 6144, 7168, 7200, 7216, 7212, - 0, 4096, 6144, 7168, 7200, 7216, 7217, 7214, - 0, 4096, 6144, 7168, 7200, 0, 4096, 6144, - 7168, 7232, 7216, 0, 4096, 6144, 7168, 7232, - 7216, 0, 4096, 6144, 7168, 7232, 7216, 7218, - 0, 4096, 6144, 7168, 7232, 7216, 0, 4096, - 6144, 7168, 7232, 7216, 7220, 0, 4096, 6144, - 7168, 7232, 7216, 7220, 0, 4096, 6144, 7168, - 7232, 7216, 7224, 7222, 0, 4096, 6144, 7168, - 7232, 7216, 0, 4096, 6144, 7168, 7232, 7233, - 7224, 0, 4096, 6144, 7168, 7232, 7233, 7224, - 0, 4096, 6144, 7168, 7232, 7233, 7224, 7226, - 0, 4096, 6144, 7168, 7232, 7233, 7224, 0, - 4096, 6144, 7168, 7232, 7233, 7224, 7228, 0, - 4096, 6144, 7168, 7232, 7233, 7235, 7228, 0, - 4096, 6144, 7168, 7232, 7233, 7235, 7228, 7230, - 0, 4096, 6144, 7168, 0, 8192, 6144, 7168, - 7232, 0, 8192, 6144, 7168, 7232, 0, 8192, - 6144, 7168, 7232, 7234, 0, 8192, 6144, 7168, - 7232, 0, 8192, 6144, 7168, 7232, 7236, 0, - 8192, 6144, 7168, 7232, 7236, 0, 8192, 6144, - 7168, 7232, 7240, 7238, 0, 8192, 6144, 7168, - 7232, 0, 8192, 6144, 7168, 7232, 7240, 0, - 8192, 6144, 7168, 7232, 7240, 0, 8192, 6144, - 7168, 7232, 7240, 7242, 0, 8192, 6144, 7168, - 7232, 7240, 0, 8192, 6144, 7168, 7232, 7248, - 7244, 0, 8192, 6144, 7168, 7232, 7248, 7244, - 0, 8192, 6144, 7168, 7232, 7248, 7249, 7246, - 0, 8192, 6144, 7168, 7232, 0, 8192, 6144, - 7168, 7232, 7248, 0, 8192, 6144, 7168, 7232, - 7248, 0, 8192, 6144, 7168, 7232, 7248, 7250, - 0, 8192, 6144, 7168, 7232, 7248, 0, 8192, - 6144, 7168, 7232, 7248, 7252, 0, 8192, 6144, - 7168, 7232, 7248, 7252, 0, 8192, 6144, 7168, - 7232, 7248, 7256, 7254, 0, 8192, 6144, 7168, - 7232, 7248, 0, 8192, 6144, 7168, 7232, 7264, - 7256, 0, 8192, 6144, 7168, 7232, 7264, 7256, - 0, 8192, 6144, 7168, 7232, 7264, 7256, 7258, - 0, 8192, 6144, 7168, 7232, 7264, 7256, 0, - 8192, 6144, 7168, 7232, 7264, 7265, 7260, 0, - 8192, 6144, 7168, 7232, 7264, 7265, 7260, 0, - 8192, 6144, 7168, 7232, 7264, 7265, 7260, 7262, - 0, 8192, 6144, 7168, 7232, 0, 8192, 6144, - 7168, 7296, 7264, 0, 8192, 6144, 7168, 7296, - 7264, 0, 8192, 6144, 7168, 7296, 7264, 7266, - 0, 8192, 6144, 7168, 7296, 7264, 0, 8192, - 6144, 7168, 7296, 7264, 7268, 0, 8192, 6144, - 7168, 7296, 7264, 7268, 0, 8192, 6144, 7168, - 7296, 7264, 7272, 7270, 0, 8192, 6144, 7168, - 7296, 7264, 0, 8192, 6144, 7168, 7296, 7264, - 7272, 0, 8192, 6144, 7168, 7296, 7264, 7272, - 0, 8192, 6144, 7168, 7296, 7264, 7272, 7274, - 0, 8192, 6144, 7168, 7296, 7264, 7272, 0, - 8192, 6144, 7168, 7296, 7264, 7280, 7276, 0, - 8192, 6144, 7168, 7296, 7264, 7280, 7276, 0, - 8192, 6144, 7168, 7296, 7264, 7280, 7281, 7278, - 0, 8192, 6144, 7168, 7296, 7264, 0, 8192, - 6144, 7168, 7296, 7297, 7280, 0, 8192, 6144, - 7168, 7296, 7297, 7280, 0, 8192, 6144, 7168, - 7296, 7297, 7280, 7282, 0, 8192, 6144, 7168, - 7296, 7297, 7280, 0, 8192, 6144, 7168, 7296, - 7297, 7280, 7284, 0, 8192, 6144, 7168, 7296, - 7297, 7280, 7284, 0, 8192, 6144, 7168, 7296, - 7297, 7280, 7288, 7286, 0, 8192, 6144, 7168, - 7296, 7297, 7280, 0, 8192, 6144, 7168, 7296, - 7297, 7280, 7288, 0, 8192, 6144, 7168, 7296, - 7297, 7299, 7288, 0, 8192, 6144, 7168, 7296, - 7297, 7299, 7288, 7290, 0, 8192, 6144, 7168, - 7296, 7297, 7299, 7288, 0, 8192, 6144, 7168, - 7296, 7297, 7299, 7288, 7292, 0, 8192, 6144, - 7168, 7296, 7297, 7299, 7288, 7292, 0, 8192, - 6144, 7168, 7296, 7297, 7299, 7288, 7292, 7294, - 0, 8192, 6144, 7168, 0, 8192, 6144, 7168, - 7296, 0, 8192, 6144, 7168, 7296, 0, 8192, - 6144, 7168, 7296, 7298, 0, 8192, 6144, 7168, - 7296, 0, 8192, 6144, 7168, 7296, 7300, 0, - 8192, 6144, 7168, 7296, 7300, 0, 8192, 6144, - 7168, 7296, 7304, 7302, 0, 8192, 6144, 7168, - 7296, 0, 8192, 6144, 7168, 7296, 7304, 0, - 8192, 6144, 7168, 7296, 7304, 0, 8192, 6144, - 7168, 7296, 7304, 7306, 0, 8192, 6144, 7168, - 7296, 7304, 0, 8192, 6144, 7168, 7296, 7312, - 7308, 0, 8192, 6144, 7168, 7296, 7312, 7308, - 0, 8192, 6144, 7168, 7296, 7312, 7313, 7310, - 0, 8192, 6144, 7168, 7296, 0, 8192, 6144, - 7168, 7296, 7312, 0, 8192, 6144, 7168, 7296, - 7312, 0, 8192, 6144, 7168, 7296, 7312, 7314, - 0, 8192, 6144, 7168, 7296, 7312, 0, 8192, - 6144, 7168, 7296, 7312, 7316, 0, 8192, 6144, - 7168, 7296, 7312, 7316, 0, 8192, 6144, 7168, - 7296, 7312, 7320, 7318, 0, 8192, 6144, 7168, - 7296, 7312, 0, 8192, 6144, 7168, 7296, 7328, - 7320, 0, 8192, 6144, 7168, 7296, 7328, 7320, - 0, 8192, 6144, 7168, 7296, 7328, 7320, 7322, - 0, 8192, 6144, 7168, 7296, 7328, 7320, 0, - 8192, 6144, 7168, 7296, 7328, 7329, 7324, 0, - 8192, 6144, 7168, 7296, 7328, 7329, 7324, 0, - 8192, 6144, 7168, 7296, 7328, 7329, 7324, 7326, - 0, 8192, 6144, 7168, 7296, 0, 8192, 6144, - 7168, 7296, 7328, 0, 8192, 6144, 7168, 7296, - 7328, 0, 8192, 6144, 7168, 7296, 7328, 7330, - 0, 8192, 6144, 7168, 7296, 7328, 0, 8192, - 6144, 7168, 7296, 7328, 7332, 0, 8192, 6144, - 7168, 7296, 7328, 7332, 0, 8192, 6144, 7168, - 7296, 7328, 7336, 7334, 0, 8192, 6144, 7168, - 7296, 7328, 0, 8192, 6144, 7168, 7296, 7328, - 7336, 0, 8192, 6144, 7168, 7296, 7328, 7336, - 0, 8192, 6144, 7168, 7296, 7328, 7336, 7338, - 0, 8192, 6144, 7168, 7296, 7328, 7336, 0, - 8192, 6144, 7168, 7296, 7328, 7344, 7340, 0, - 8192, 6144, 7168, 7296, 7328, 7344, 7340, 0, - 8192, 6144, 7168, 7296, 7328, 7344, 7345, 7342, - 0, 8192, 6144, 7168, 7296, 7328, 0, 8192, - 6144, 7168, 7296, 7360, 7344, 0, 8192, 6144, - 7168, 7296, 7360, 7344, 0, 8192, 6144, 7168, - 7296, 7360, 7344, 7346, 0, 8192, 6144, 7168, - 7296, 7360, 7344, 0, 8192, 6144, 7168, 7296, - 7360, 7344, 7348, 0, 8192, 6144, 7168, 7296, - 7360, 7344, 7348, 0, 8192, 6144, 7168, 7296, - 7360, 7344, 7352, 7350, 0, 8192, 6144, 7168, - 7296, 7360, 7344, 0, 8192, 6144, 7168, 7296, - 7360, 7361, 7352, 0, 8192, 6144, 7168, 7296, - 7360, 7361, 7352, 0, 8192, 6144, 7168, 7296, - 7360, 7361, 7352, 7354, 0, 8192, 6144, 7168, - 7296, 7360, 7361, 7352, 0, 8192, 6144, 7168, - 7296, 7360, 7361, 7352, 7356, 0, 8192, 6144, - 7168, 7296, 7360, 7361, 7363, 7356, 0, 8192, - 6144, 7168, 7296, 7360, 7361, 7363, 7356, 7358, - 0, 8192, 6144, 7168, 7296, 0, 8192, 6144, - 7168, 7424, 7360, 0, 8192, 6144, 7168, 7424, - 7360, 0, 8192, 6144, 7168, 7424, 7360, 7362, - 0, 8192, 6144, 7168, 7424, 7360, 0, 8192, - 6144, 7168, 7424, 7360, 7364, 0, 8192, 6144, - 7168, 7424, 7360, 7364, 0, 8192, 6144, 7168, - 7424, 7360, 7368, 7366, 0, 8192, 6144, 7168, - 7424, 7360, 0, 8192, 6144, 7168, 7424, 7360, - 7368, 0, 8192, 6144, 7168, 7424, 7360, 7368, - 0, 8192, 6144, 7168, 7424, 7360, 7368, 7370, - 0, 8192, 6144, 7168, 7424, 7360, 7368, 0, - 8192, 6144, 7168, 7424, 7360, 7376, 7372, 0, - 8192, 6144, 7168, 7424, 7360, 7376, 7372, 0, - 8192, 6144, 7168, 7424, 7360, 7376, 7377, 7374, - 0, 8192, 6144, 7168, 7424, 7360, 0, 8192, - 6144, 7168, 7424, 7360, 7376, 0, 8192, 6144, - 7168, 7424, 7360, 7376, 0, 8192, 6144, 7168, - 7424, 7360, 7376, 7378, 0, 8192, 6144, 7168, - 7424, 7360, 7376, 0, 8192, 6144, 7168, 7424, - 7360, 7376, 7380, 0, 8192, 6144, 7168, 7424, - 7360, 7376, 7380, 0, 8192, 6144, 7168, 7424, - 7360, 7376, 7384, 7382, 0, 8192, 6144, 7168, - 7424, 7360, 7376, 0, 8192, 6144, 7168, 7424, - 7360, 7392, 7384, 0, 8192, 6144, 7168, 7424, - 7360, 7392, 7384, 0, 8192, 6144, 7168, 7424, - 7360, 7392, 7384, 7386, 0, 8192, 6144, 7168, - 7424, 7360, 7392, 7384, 0, 8192, 6144, 7168, - 7424, 7360, 7392, 7393, 7388, 0, 8192, 6144, - 7168, 7424, 7360, 7392, 7393, 7388, 0, 8192, - 6144, 7168, 7424, 7360, 7392, 7393, 7388, 7390, - 0, 8192, 6144, 7168, 7424, 7360, 0, 8192, - 6144, 7168, 7424, 7425, 7392, 0, 8192, 6144, - 7168, 7424, 7425, 7392, 0, 8192, 6144, 7168, - 7424, 7425, 7392, 7394, 0, 8192, 6144, 7168, - 7424, 7425, 7392, 0, 8192, 6144, 7168, 7424, - 7425, 7392, 7396, 0, 8192, 6144, 7168, 7424, - 7425, 7392, 7396, 0, 8192, 6144, 7168, 7424, - 7425, 7392, 7400, 7398, 0, 8192, 6144, 7168, - 7424, 7425, 7392, 0, 8192, 6144, 7168, 7424, - 7425, 7392, 7400, 0, 8192, 6144, 7168, 7424, - 7425, 7392, 7400, 0, 8192, 6144, 7168, 7424, - 7425, 7392, 7400, 7402, 0, 8192, 6144, 7168, - 7424, 7425, 7392, 7400, 0, 8192, 6144, 7168, - 7424, 7425, 7392, 7408, 7404, 0, 8192, 6144, - 7168, 7424, 7425, 7392, 7408, 7404, 0, 8192, - 6144, 7168, 7424, 7425, 7392, 7408, 7409, 7406, - 0, 8192, 6144, 7168, 7424, 7425, 7392, 0, - 8192, 6144, 7168, 7424, 7425, 7392, 7408, 0, - 8192, 6144, 7168, 7424, 7425, 7427, 7408, 0, - 8192, 6144, 7168, 7424, 7425, 7427, 7408, 7410, - 0, 8192, 6144, 7168, 7424, 7425, 7427, 7408, - 0, 8192, 6144, 7168, 7424, 7425, 7427, 7408, - 7412, 0, 8192, 6144, 7168, 7424, 7425, 7427, - 7408, 7412, 0, 8192, 6144, 7168, 7424, 7425, - 7427, 7408, 7416, 7414, 0, 8192, 6144, 7168, - 7424, 7425, 7427, 7408, 0, 8192, 6144, 7168, - 7424, 7425, 7427, 7408, 7416, 0, 8192, 6144, - 7168, 7424, 7425, 7427, 7408, 7416, 0, 8192, - 6144, 7168, 7424, 7425, 7427, 7408, 7416, 7418, - 0, 8192, 6144, 7168, 7424, 7425, 7427, 7431, - 7416, 0, 8192, 6144, 7168, 7424, 7425, 7427, - 7431, 7416, 7420, 0, 8192, 6144, 7168, 7424, - 7425, 7427, 7431, 7416, 7420, 0, 8192, 6144, - 7168, 7424, 7425, 7427, 7431, 7416, 7420, 7422, - 0, 8192, 6144, 7168, 0, 8192, 6144, 7168, - 7424, 0, 8192, 8193, 7168, 7424, 0, 8192, - 8193, 7168, 7424, 7426, 0, 8192, 8193, 7168, - 7424, 0, 8192, 8193, 7168, 7424, 7428, 0, - 8192, 8193, 7168, 7424, 7428, 0, 8192, 8193, - 7168, 7424, 7432, 7430, 0, 8192, 8193, 7168, - 7424, 0, 8192, 8193, 7168, 7424, 7432, 0, - 8192, 8193, 7168, 7424, 7432, 0, 8192, 8193, - 7168, 7424, 7432, 7434, 0, 8192, 8193, 7168, - 7424, 7432, 0, 8192, 8193, 7168, 7424, 7440, - 7436, 0, 8192, 8193, 7168, 7424, 7440, 7436, - 0, 8192, 8193, 7168, 7424, 7440, 7441, 7438, - 0, 8192, 8193, 7168, 7424, 0, 8192, 8193, - 7168, 7424, 7440, 0, 8192, 8193, 7168, 7424, - 7440, 0, 8192, 8193, 7168, 7424, 7440, 7442, - 0, 8192, 8193, 7168, 7424, 7440, 0, 8192, - 8193, 7168, 7424, 7440, 7444, 0, 8192, 8193, - 7168, 7424, 7440, 7444, 0, 8192, 8193, 7168, - 7424, 7440, 7448, 7446, 0, 8192, 8193, 7168, - 7424, 7440, 0, 8192, 8193, 7168, 7424, 7456, - 7448, 0, 8192, 8193, 7168, 7424, 7456, 7448, - 0, 8192, 8193, 7168, 7424, 7456, 7448, 7450, - 0, 8192, 8193, 7168, 7424, 7456, 7448, 0, - 8192, 8193, 7168, 7424, 7456, 7457, 7452, 0, - 8192, 8193, 7168, 7424, 7456, 7457, 7452, 0, - 8192, 8193, 7168, 7424, 7456, 7457, 7452, 7454, - 0, 8192, 8193, 7168, 7424, 0, 8192, 8193, - 7168, 7424, 7456, 0, 8192, 8193, 7168, 7424, - 7456, 0, 8192, 8193, 7168, 7424, 7456, 7458, - 0, 8192, 8193, 7168, 7424, 7456, 0, 8192, - 8193, 7168, 7424, 7456, 7460, 0, 8192, 8193, - 7168, 7424, 7456, 7460, 0, 8192, 8193, 7168, - 7424, 7456, 7464, 7462, 0, 8192, 8193, 7168, - 7424, 7456, 0, 8192, 8193, 7168, 7424, 7456, - 7464, 0, 8192, 8193, 7168, 7424, 7456, 7464, - 0, 8192, 8193, 7168, 7424, 7456, 7464, 7466, - 0, 8192, 8193, 7168, 7424, 7456, 7464, 0, - 8192, 8193, 7168, 7424, 7456, 7472, 7468, 0, - 8192, 8193, 7168, 7424, 7456, 7472, 7468, 0, - 8192, 8193, 7168, 7424, 7456, 7472, 7473, 7470, - 0, 8192, 8193, 7168, 7424, 7456, 0, 8192, - 8193, 7168, 7424, 7488, 7472, 0, 8192, 8193, - 7168, 7424, 7488, 7472, 0, 8192, 8193, 7168, - 7424, 7488, 7472, 7474, 0, 8192, 8193, 7168, - 7424, 7488, 7472, 0, 8192, 8193, 7168, 7424, - 7488, 7472, 7476, 0, 8192, 8193, 7168, 7424, - 7488, 7472, 7476, 0, 8192, 8193, 7168, 7424, - 7488, 7472, 7480, 7478, 0, 8192, 8193, 7168, - 7424, 7488, 7472, 0, 8192, 8193, 7168, 7424, - 7488, 7489, 7480, 0, 8192, 8193, 7168, 7424, - 7488, 7489, 7480, 0, 8192, 8193, 7168, 7424, - 7488, 7489, 7480, 7482, 0, 8192, 8193, 7168, - 7424, 7488, 7489, 7480, 0, 8192, 8193, 7168, - 7424, 7488, 7489, 7480, 7484, 0, 8192, 8193, - 7168, 7424, 7488, 7489, 7491, 7484, 0, 8192, - 8193, 7168, 7424, 7488, 7489, 7491, 7484, 7486, - 0, 8192, 8193, 7168, 7424, 0, 8192, 8193, - 7168, 7424, 7488, 0, 8192, 8193, 7168, 7424, - 7488, 0, 8192, 8193, 7168, 7424, 7488, 7490, - 0, 8192, 8193, 7168, 7424, 7488, 0, 8192, - 8193, 7168, 7424, 7488, 7492, 0, 8192, 8193, - 7168, 7424, 7488, 7492, 0, 8192, 8193, 7168, - 7424, 7488, 7496, 7494, 0, 8192, 8193, 7168, - 7424, 7488, 0, 8192, 8193, 7168, 7424, 7488, - 7496, 0, 8192, 8193, 7168, 7424, 7488, 7496, - 0, 8192, 8193, 7168, 7424, 7488, 7496, 7498, - 0, 8192, 8193, 7168, 7424, 7488, 7496, 0, - 8192, 8193, 7168, 7424, 7488, 7504, 7500, 0, - 8192, 8193, 7168, 7424, 7488, 7504, 7500, 0, - 8192, 8193, 7168, 7424, 7488, 7504, 7505, 7502, - 0, 8192, 8193, 7168, 7424, 7488, 0, 8192, - 8193, 7168, 7424, 7488, 7504, 0, 8192, 8193, - 7168, 7424, 7488, 7504, 0, 8192, 8193, 7168, - 7424, 7488, 7504, 7506, 0, 8192, 8193, 7168, - 7424, 7488, 7504, 0, 8192, 8193, 7168, 7424, - 7488, 7504, 7508, 0, 8192, 8193, 7168, 7424, - 7488, 7504, 7508, 0, 8192, 8193, 7168, 7424, - 7488, 7504, 7512, 7510, 0, 8192, 8193, 7168, - 7424, 7488, 7504, 0, 8192, 8193, 7168, 7424, - 7488, 7520, 7512, 0, 8192, 8193, 7168, 7424, - 7488, 7520, 7512, 0, 8192, 8193, 7168, 7424, - 7488, 7520, 7512, 7514, 0, 8192, 8193, 7168, - 7424, 7488, 7520, 7512, 0, 8192, 8193, 7168, - 7424, 7488, 7520, 7521, 7516, 0, 8192, 8193, - 7168, 7424, 7488, 7520, 7521, 7516, 0, 8192, - 8193, 7168, 7424, 7488, 7520, 7521, 7516, 7518, - 0, 8192, 8193, 7168, 7424, 7488, 0, 8192, - 8193, 7168, 7424, 7552, 7520, 0, 8192, 8193, - 7168, 7424, 7552, 7520, 0, 8192, 8193, 7168, - 7424, 7552, 7520, 7522, 0, 8192, 8193, 7168, - 7424, 7552, 7520, 0, 8192, 8193, 7168, 7424, - 7552, 7520, 7524, 0, 8192, 8193, 7168, 7424, - 7552, 7520, 7524, 0, 8192, 8193, 7168, 7424, - 7552, 7520, 7528, 7526, 0, 8192, 8193, 7168, - 7424, 7552, 7520, 0, 8192, 8193, 7168, 7424, - 7552, 7520, 7528, 0, 8192, 8193, 7168, 7424, - 7552, 7520, 7528, 0, 8192, 8193, 7168, 7424, - 7552, 7520, 7528, 7530, 0, 8192, 8193, 7168, - 7424, 7552, 7520, 7528, 0, 8192, 8193, 7168, - 7424, 7552, 7520, 7536, 7532, 0, 8192, 8193, - 7168, 7424, 7552, 7520, 7536, 7532, 0, 8192, - 8193, 7168, 7424, 7552, 7520, 7536, 7537, 7534, - 0, 8192, 8193, 7168, 7424, 7552, 7520, 0, - 8192, 8193, 7168, 7424, 7552, 7553, 7536, 0, - 8192, 8193, 7168, 7424, 7552, 7553, 7536, 0, - 8192, 8193, 7168, 7424, 7552, 7553, 7536, 7538, - 0, 8192, 8193, 7168, 7424, 7552, 7553, 7536, - 0, 8192, 8193, 7168, 7424, 7552, 7553, 7536, - 7540, 0, 8192, 8193, 7168, 7424, 7552, 7553, - 7536, 7540, 0, 8192, 8193, 7168, 7424, 7552, - 7553, 7536, 7544, 7542, 0, 8192, 8193, 7168, - 7424, 7552, 7553, 7536, 0, 8192, 8193, 7168, - 7424, 7552, 7553, 7536, 7544, 0, 8192, 8193, - 7168, 7424, 7552, 7553, 7555, 7544, 0, 8192, - 8193, 7168, 7424, 7552, 7553, 7555, 7544, 7546, - 0, 8192, 8193, 7168, 7424, 7552, 7553, 7555, - 7544, 0, 8192, 8193, 7168, 7424, 7552, 7553, - 7555, 7544, 7548, 0, 8192, 8193, 7168, 7424, - 7552, 7553, 7555, 7544, 7548, 0, 8192, 8193, - 7168, 7424, 7552, 7553, 7555, 7544, 7548, 7550, - 0, 8192, 8193, 7168, 7424, 0, 8192, 8193, - 7168, 7680, 7552, 0, 8192, 8193, 7168, 7680, - 7552, 0, 8192, 8193, 7168, 7680, 7552, 7554, - 0, 8192, 8193, 7168, 7680, 7552, 0, 8192, - 8193, 7168, 7680, 7552, 7556, 0, 8192, 8193, - 7168, 7680, 7552, 7556, 0, 8192, 8193, 7168, - 7680, 7552, 7560, 7558, 0, 8192, 8193, 7168, - 7680, 7552, 0, 8192, 8193, 7168, 7680, 7552, - 7560, 0, 8192, 8193, 7168, 7680, 7552, 7560, - 0, 8192, 8193, 7168, 7680, 7552, 7560, 7562, - 0, 8192, 8193, 7168, 7680, 7552, 7560, 0, - 8192, 8193, 7168, 7680, 7552, 7568, 7564, 0, - 8192, 8193, 7168, 7680, 7552, 7568, 7564, 0, - 8192, 8193, 7168, 7680, 7552, 7568, 7569, 7566, - 0, 8192, 8193, 7168, 7680, 7552, 0, 8192, - 8193, 7168, 7680, 7552, 7568, 0, 8192, 8193, - 7168, 7680, 7552, 7568, 0, 8192, 8193, 7168, - 7680, 7552, 7568, 7570, 0, 8192, 8193, 7168, - 7680, 7552, 7568, 0, 8192, 8193, 7168, 7680, - 7552, 7568, 7572, 0, 8192, 8193, 7168, 7680, - 7552, 7568, 7572, 0, 8192, 8193, 7168, 7680, - 7552, 7568, 7576, 7574, 0, 8192, 8193, 7168, - 7680, 7552, 7568, 0, 8192, 8193, 7168, 7680, - 7552, 7584, 7576, 0, 8192, 8193, 7168, 7680, - 7552, 7584, 7576, 0, 8192, 8193, 7168, 7680, - 7552, 7584, 7576, 7578, 0, 8192, 8193, 7168, - 7680, 7552, 7584, 7576, 0, 8192, 8193, 7168, - 7680, 7552, 7584, 7585, 7580, 0, 8192, 8193, - 7168, 7680, 7552, 7584, 7585, 7580, 0, 8192, - 8193, 7168, 7680, 7552, 7584, 7585, 7580, 7582, - 0, 8192, 8193, 7168, 7680, 7552, 0, 8192, - 8193, 7168, 7680, 7552, 7584, 0, 8192, 8193, - 7168, 7680, 7552, 7584, 0, 8192, 8193, 7168, - 7680, 7552, 7584, 7586, 0, 8192, 8193, 7168, - 7680, 7552, 7584, 0, 8192, 8193, 7168, 7680, - 7552, 7584, 7588, 0, 8192, 8193, 7168, 7680, - 7552, 7584, 7588, 0, 8192, 8193, 7168, 7680, - 7552, 7584, 7592, 7590, 0, 8192, 8193, 7168, - 7680, 7552, 7584, 0, 8192, 8193, 7168, 7680, - 7552, 7584, 7592, 0, 8192, 8193, 7168, 7680, - 7552, 7584, 7592, 0, 8192, 8193, 7168, 7680, - 7552, 7584, 7592, 7594, 0, 8192, 8193, 7168, - 7680, 7552, 7584, 7592, 0, 8192, 8193, 7168, - 7680, 7552, 7584, 7600, 7596, 0, 8192, 8193, - 7168, 7680, 7552, 7584, 7600, 7596, 0, 8192, - 8193, 7168, 7680, 7552, 7584, 7600, 7601, 7598, - 0, 8192, 8193, 7168, 7680, 7552, 7584, 0, - 8192, 8193, 7168, 7680, 7552, 7616, 7600, 0, - 8192, 8193, 7168, 7680, 7552, 7616, 7600, 0, - 8192, 8193, 7168, 7680, 7552, 7616, 7600, 7602, - 0, 8192, 8193, 7168, 7680, 7552, 7616, 7600, - 0, 8192, 8193, 7168, 7680, 7552, 7616, 7600, - 7604, 0, 8192, 8193, 7168, 7680, 7552, 7616, - 7600, 7604, 0, 8192, 8193, 7168, 7680, 7552, - 7616, 7600, 7608, 7606, 0, 8192, 8193, 7168, - 7680, 7552, 7616, 7600, 0, 8192, 8193, 7168, - 7680, 7552, 7616, 7617, 7608, 0, 8192, 8193, - 7168, 7680, 7552, 7616, 7617, 7608, 0, 8192, - 8193, 7168, 7680, 7552, 7616, 7617, 7608, 7610, - 0, 8192, 8193, 7168, 7680, 7552, 7616, 7617, - 7608, 0, 8192, 8193, 7168, 7680, 7552, 7616, - 7617, 7608, 7612, 0, 8192, 8193, 7168, 7680, - 7552, 7616, 7617, 7619, 7612, 0, 8192, 8193, - 7168, 7680, 7552, 7616, 7617, 7619, 7612, 7614, - 0, 8192, 8193, 7168, 7680, 7552, 0, 8192, - 8193, 7168, 7680, 7681, 7616, 0, 8192, 8193, - 7168, 7680, 7681, 7616, 0, 8192, 8193, 7168, - 7680, 7681, 7616, 7618, 0, 8192, 8193, 7168, - 7680, 7681, 7616, 0, 8192, 8193, 7168, 7680, - 7681, 7616, 7620, 0, 8192, 8193, 7168, 7680, - 7681, 7616, 7620, 0, 8192, 8193, 7168, 7680, - 7681, 7616, 7624, 7622, 0, 8192, 8193, 7168, - 7680, 7681, 7616, 0, 8192, 8193, 7168, 7680, - 7681, 7616, 7624, 0, 8192, 8193, 7168, 7680, - 7681, 7616, 7624, 0, 8192, 8193, 7168, 7680, - 7681, 7616, 7624, 7626, 0, 8192, 8193, 7168, - 7680, 7681, 7616, 7624, 0, 8192, 8193, 7168, - 7680, 7681, 7616, 7632, 7628, 0, 8192, 8193, - 7168, 7680, 7681, 7616, 7632, 7628, 0, 8192, - 8193, 7168, 7680, 7681, 7616, 7632, 7633, 7630, - 0, 8192, 8193, 7168, 7680, 7681, 7616, 0, - 8192, 8193, 7168, 7680, 7681, 7616, 7632, 0, - 8192, 8193, 7168, 7680, 7681, 7616, 7632, 0, - 8192, 8193, 7168, 7680, 7681, 7616, 7632, 7634, - 0, 8192, 8193, 7168, 7680, 7681, 7616, 7632, - 0, 8192, 8193, 7168, 7680, 7681, 7616, 7632, - 7636, 0, 8192, 8193, 7168, 7680, 7681, 7616, - 7632, 7636, 0, 8192, 8193, 7168, 7680, 7681, - 7616, 7632, 7640, 7638, 0, 8192, 8193, 7168, - 7680, 7681, 7616, 7632, 0, 8192, 8193, 7168, - 7680, 7681, 7616, 7648, 7640, 0, 8192, 8193, - 7168, 7680, 7681, 7616, 7648, 7640, 0, 8192, - 8193, 7168, 7680, 7681, 7616, 7648, 7640, 7642, - 0, 8192, 8193, 7168, 7680, 7681, 7616, 7648, - 7640, 0, 8192, 8193, 7168, 7680, 7681, 7616, - 7648, 7649, 7644, 0, 8192, 8193, 7168, 7680, - 7681, 7616, 7648, 7649, 7644, 0, 8192, 8193, - 7168, 7680, 7681, 7616, 7648, 7649, 7644, 7646, - 0, 8192, 8193, 7168, 7680, 7681, 7616, 0, - 8192, 8193, 7168, 7680, 7681, 7616, 7648, 0, - 8192, 8193, 7168, 7680, 7681, 7683, 7648, 0, - 8192, 8193, 7168, 7680, 7681, 7683, 7648, 7650, - 0, 8192, 8193, 7168, 7680, 7681, 7683, 7648, - 0, 8192, 8193, 7168, 7680, 7681, 7683, 7648, - 7652, 0, 8192, 8193, 7168, 7680, 7681, 7683, - 7648, 7652, 0, 8192, 8193, 7168, 7680, 7681, - 7683, 7648, 7656, 7654, 0, 8192, 8193, 7168, - 7680, 7681, 7683, 7648, 0, 8192, 8193, 7168, - 7680, 7681, 7683, 7648, 7656, 0, 8192, 8193, - 7168, 7680, 7681, 7683, 7648, 7656, 0, 8192, - 8193, 7168, 7680, 7681, 7683, 7648, 7656, 7658, - 0, 8192, 8193, 7168, 7680, 7681, 7683, 7648, - 7656, 0, 8192, 8193, 7168, 7680, 7681, 7683, - 7648, 7664, 7660, 0, 8192, 8193, 7168, 7680, - 7681, 7683, 7648, 7664, 7660, 0, 8192, 8193, - 7168, 7680, 7681, 7683, 7648, 7664, 7665, 7662, - 0, 8192, 8193, 7168, 7680, 7681, 7683, 7648, - 0, 8192, 8193, 7168, 7680, 7681, 7683, 7648, - 7664, 0, 8192, 8193, 7168, 7680, 7681, 7683, - 7648, 7664, 0, 8192, 8193, 7168, 7680, 7681, - 7683, 7648, 7664, 7666, 0, 8192, 8193, 7168, - 7680, 7681, 7683, 7687, 7664, 0, 8192, 8193, - 7168, 7680, 7681, 7683, 7687, 7664, 7668, 0, - 8192, 8193, 7168, 7680, 7681, 7683, 7687, 7664, - 7668, 0, 8192, 8193, 7168, 7680, 7681, 7683, - 7687, 7664, 7672, 7670, 0, 8192, 8193, 7168, - 7680, 7681, 7683, 7687, 7664, 0, 8192, 8193, - 7168, 7680, 7681, 7683, 7687, 7664, 7672, 0, - 8192, 8193, 7168, 7680, 7681, 7683, 7687, 7664, - 7672, 0, 8192, 8193, 7168, 7680, 7681, 7683, - 7687, 7664, 7672, 7674, 0, 8192, 8193, 7168, - 7680, 7681, 7683, 7687, 7664, 7672, 0, 8192, - 8193, 7168, 7680, 7681, 7683, 7687, 7664, 7672, - 7676, 0, 8192, 8193, 7168, 7680, 7681, 7683, - 7687, 7664, 7672, 7676, 0, 8192, 8193, 7168, - 7680, 7681, 7683, 7687, 7664, 7672, 7676, 7678, - 0, 8192, 8193, 7168, 0, 8192, 8193, 7168, - 7680, 0, 8192, 8193, 7168, 7680, 0, 8192, - 8193, 7168, 7680, 7682, 0, 8192, 8193, 8195, - 7680, 0, 8192, 8193, 8195, 7680, 7684, 0, - 8192, 8193, 8195, 7680, 7684, 0, 8192, 8193, - 8195, 7680, 7688, 7686, 0, 8192, 8193, 8195, - 7680, 0, 8192, 8193, 8195, 7680, 7688, 0, - 8192, 8193, 8195, 7680, 7688, 0, 8192, 8193, - 8195, 7680, 7688, 7690, 0, 8192, 8193, 8195, - 7680, 7688, 0, 8192, 8193, 8195, 7680, 7696, - 7692, 0, 8192, 8193, 8195, 7680, 7696, 7692, - 0, 8192, 8193, 8195, 7680, 7696, 7697, 7694, - 0, 8192, 8193, 8195, 7680, 0, 8192, 8193, - 8195, 7680, 7696, 0, 8192, 8193, 8195, 7680, - 7696, 0, 8192, 8193, 8195, 7680, 7696, 7698, - 0, 8192, 8193, 8195, 7680, 7696, 0, 8192, - 8193, 8195, 7680, 7696, 7700, 0, 8192, 8193, - 8195, 7680, 7696, 7700, 0, 8192, 8193, 8195, - 7680, 7696, 7704, 7702, 0, 8192, 8193, 8195, - 7680, 7696, 0, 8192, 8193, 8195, 7680, 7712, - 7704, 0, 8192, 8193, 8195, 7680, 7712, 7704, - 0, 8192, 8193, 8195, 7680, 7712, 7704, 7706, - 0, 8192, 8193, 8195, 7680, 7712, 7704, 0, - 8192, 8193, 8195, 7680, 7712, 7713, 7708, 0, - 8192, 8193, 8195, 7680, 7712, 7713, 7708, 0, - 8192, 8193, 8195, 7680, 7712, 7713, 7708, 7710, - 0, 8192, 8193, 8195, 7680, 0, 8192, 8193, - 8195, 7680, 7712, 0, 8192, 8193, 8195, 7680, - 7712, 0, 8192, 8193, 8195, 7680, 7712, 7714, - 0, 8192, 8193, 8195, 7680, 7712, 0, 8192, - 8193, 8195, 7680, 7712, 7716, 0, 8192, 8193, - 8195, 7680, 7712, 7716, 0, 8192, 8193, 8195, - 7680, 7712, 7720, 7718, 0, 8192, 8193, 8195, - 7680, 7712, 0, 8192, 8193, 8195, 7680, 7712, - 7720, 0, 8192, 8193, 8195, 7680, 7712, 7720, - 0, 8192, 8193, 8195, 7680, 7712, 7720, 7722, - 0, 8192, 8193, 8195, 7680, 7712, 7720, 0, - 8192, 8193, 8195, 7680, 7712, 7728, 7724, 0, - 8192, 8193, 8195, 7680, 7712, 7728, 7724, 0, - 8192, 8193, 8195, 7680, 7712, 7728, 7729, 7726, - 0, 8192, 8193, 8195, 7680, 7712, 0, 8192, - 8193, 8195, 7680, 7744, 7728, 0, 8192, 8193, - 8195, 7680, 7744, 7728, 0, 8192, 8193, 8195, - 7680, 7744, 7728, 7730, 0, 8192, 8193, 8195, - 7680, 7744, 7728, 0, 8192, 8193, 8195, 7680, - 7744, 7728, 7732, 0, 8192, 8193, 8195, 7680, - 7744, 7728, 7732, 0, 8192, 8193, 8195, 7680, - 7744, 7728, 7736, 7734, 0, 8192, 8193, 8195, - 7680, 7744, 7728, 0, 8192, 8193, 8195, 7680, - 7744, 7745, 7736, 0, 8192, 8193, 8195, 7680, - 7744, 7745, 7736, 0, 8192, 8193, 8195, 7680, - 7744, 7745, 7736, 7738, 0, 8192, 8193, 8195, - 7680, 7744, 7745, 7736, 0, 8192, 8193, 8195, - 7680, 7744, 7745, 7736, 7740, 0, 8192, 8193, - 8195, 7680, 7744, 7745, 7747, 7740, 0, 8192, - 8193, 8195, 7680, 7744, 7745, 7747, 7740, 7742, - 0, 8192, 8193, 8195, 7680, 0, 8192, 8193, - 8195, 7680, 7744, 0, 8192, 8193, 8195, 7680, - 7744, 0, 8192, 8193, 8195, 7680, 7744, 7746, - 0, 8192, 8193, 8195, 7680, 7744, 0, 8192, - 8193, 8195, 7680, 7744, 7748, 0, 8192, 8193, - 8195, 7680, 7744, 7748, 0, 8192, 8193, 8195, - 7680, 7744, 7752, 7750, 0, 8192, 8193, 8195, - 7680, 7744, 0, 8192, 8193, 8195, 7680, 7744, - 7752, 0, 8192, 8193, 8195, 7680, 7744, 7752, - 0, 8192, 8193, 8195, 7680, 7744, 7752, 7754, - 0, 8192, 8193, 8195, 7680, 7744, 7752, 0, - 8192, 8193, 8195, 7680, 7744, 7760, 7756, 0, - 8192, 8193, 8195, 7680, 7744, 7760, 7756, 0, - 8192, 8193, 8195, 7680, 7744, 7760, 7761, 7758, - 0, 8192, 8193, 8195, 7680, 7744, 0, 8192, - 8193, 8195, 7680, 7744, 7760, 0, 8192, 8193, - 8195, 7680, 7744, 7760, 0, 8192, 8193, 8195, - 7680, 7744, 7760, 7762, 0, 8192, 8193, 8195, - 7680, 7744, 7760, 0, 8192, 8193, 8195, 7680, - 7744, 7760, 7764, 0, 8192, 8193, 8195, 7680, - 7744, 7760, 7764, 0, 8192, 8193, 8195, 7680, - 7744, 7760, 7768, 7766, 0, 8192, 8193, 8195, - 7680, 7744, 7760, 0, 8192, 8193, 8195, 7680, - 7744, 7776, 7768, 0, 8192, 8193, 8195, 7680, - 7744, 7776, 7768, 0, 8192, 8193, 8195, 7680, - 7744, 7776, 7768, 7770, 0, 8192, 8193, 8195, - 7680, 7744, 7776, 7768, 0, 8192, 8193, 8195, - 7680, 7744, 7776, 7777, 7772, 0, 8192, 8193, - 8195, 7680, 7744, 7776, 7777, 7772, 0, 8192, - 8193, 8195, 7680, 7744, 7776, 7777, 7772, 7774, - 0, 8192, 8193, 8195, 7680, 7744, 0, 8192, - 8193, 8195, 7680, 7808, 7776, 0, 8192, 8193, - 8195, 7680, 7808, 7776, 0, 8192, 8193, 8195, - 7680, 7808, 7776, 7778, 0, 8192, 8193, 8195, - 7680, 7808, 7776, 0, 8192, 8193, 8195, 7680, - 7808, 7776, 7780, 0, 8192, 8193, 8195, 7680, - 7808, 7776, 7780, 0, 8192, 8193, 8195, 7680, - 7808, 7776, 7784, 7782, 0, 8192, 8193, 8195, - 7680, 7808, 7776, 0, 8192, 8193, 8195, 7680, - 7808, 7776, 7784, 0, 8192, 8193, 8195, 7680, - 7808, 7776, 7784, 0, 8192, 8193, 8195, 7680, - 7808, 7776, 7784, 7786, 0, 8192, 8193, 8195, - 7680, 7808, 7776, 7784, 0, 8192, 8193, 8195, - 7680, 7808, 7776, 7792, 7788, 0, 8192, 8193, - 8195, 7680, 7808, 7776, 7792, 7788, 0, 8192, - 8193, 8195, 7680, 7808, 7776, 7792, 7793, 7790, - 0, 8192, 8193, 8195, 7680, 7808, 7776, 0, - 8192, 8193, 8195, 7680, 7808, 7809, 7792, 0, - 8192, 8193, 8195, 7680, 7808, 7809, 7792, 0, - 8192, 8193, 8195, 7680, 7808, 7809, 7792, 7794, - 0, 8192, 8193, 8195, 7680, 7808, 7809, 7792, - 0, 8192, 8193, 8195, 7680, 7808, 7809, 7792, - 7796, 0, 8192, 8193, 8195, 7680, 7808, 7809, - 7792, 7796, 0, 8192, 8193, 8195, 7680, 7808, - 7809, 7792, 7800, 7798, 0, 8192, 8193, 8195, - 7680, 7808, 7809, 7792, 0, 8192, 8193, 8195, - 7680, 7808, 7809, 7792, 7800, 0, 8192, 8193, - 8195, 7680, 7808, 7809, 7811, 7800, 0, 8192, - 8193, 8195, 7680, 7808, 7809, 7811, 7800, 7802, - 0, 8192, 8193, 8195, 7680, 7808, 7809, 7811, - 7800, 0, 8192, 8193, 8195, 7680, 7808, 7809, - 7811, 7800, 7804, 0, 8192, 8193, 8195, 7680, - 7808, 7809, 7811, 7800, 7804, 0, 8192, 8193, - 8195, 7680, 7808, 7809, 7811, 7800, 7804, 7806, - 0, 8192, 8193, 8195, 7680, 0, 8192, 8193, - 8195, 7680, 7808, 0, 8192, 8193, 8195, 7680, - 7808, 0, 8192, 8193, 8195, 7680, 7808, 7810, - 0, 8192, 8193, 8195, 7680, 7808, 0, 8192, - 8193, 8195, 7680, 7808, 7812, 0, 8192, 8193, - 8195, 7680, 7808, 7812, 0, 8192, 8193, 8195, - 7680, 7808, 7816, 7814, 0, 8192, 8193, 8195, - 7680, 7808, 0, 8192, 8193, 8195, 7680, 7808, - 7816, 0, 8192, 8193, 8195, 7680, 7808, 7816, - 0, 8192, 8193, 8195, 7680, 7808, 7816, 7818, - 0, 8192, 8193, 8195, 7680, 7808, 7816, 0, - 8192, 8193, 8195, 7680, 7808, 7824, 7820, 0, - 8192, 8193, 8195, 7680, 7808, 7824, 7820, 0, - 8192, 8193, 8195, 7680, 7808, 7824, 7825, 7822, - 0, 8192, 8193, 8195, 7680, 7808, 0, 8192, - 8193, 8195, 7680, 7808, 7824, 0, 8192, 8193, - 8195, 7680, 7808, 7824, 0, 8192, 8193, 8195, - 7680, 7808, 7824, 7826, 0, 8192, 8193, 8195, - 7680, 7808, 7824, 0, 8192, 8193, 8195, 7680, - 7808, 7824, 7828, 0, 8192, 8193, 8195, 7680, - 7808, 7824, 7828, 0, 8192, 8193, 8195, 7680, - 7808, 7824, 7832, 7830, 0, 8192, 8193, 8195, - 7680, 7808, 7824, 0, 8192, 8193, 8195, 7680, - 7808, 7840, 7832, 0, 8192, 8193, 8195, 7680, - 7808, 7840, 7832, 0, 8192, 8193, 8195, 7680, - 7808, 7840, 7832, 7834, 0, 8192, 8193, 8195, - 7680, 7808, 7840, 7832, 0, 8192, 8193, 8195, - 7680, 7808, 7840, 7841, 7836, 0, 8192, 8193, - 8195, 7680, 7808, 7840, 7841, 7836, 0, 8192, - 8193, 8195, 7680, 7808, 7840, 7841, 7836, 7838, - 0, 8192, 8193, 8195, 7680, 7808, 0, 8192, - 8193, 8195, 7680, 7808, 7840, 0, 8192, 8193, - 8195, 7680, 7808, 7840, 0, 8192, 8193, 8195, - 7680, 7808, 7840, 7842, 0, 8192, 8193, 8195, - 7680, 7808, 7840, 0, 8192, 8193, 8195, 7680, - 7808, 7840, 7844, 0, 8192, 8193, 8195, 7680, - 7808, 7840, 7844, 0, 8192, 8193, 8195, 7680, - 7808, 7840, 7848, 7846, 0, 8192, 8193, 8195, - 7680, 7808, 7840, 0, 8192, 8193, 8195, 7680, - 7808, 7840, 7848, 0, 8192, 8193, 8195, 7680, - 7808, 7840, 7848, 0, 8192, 8193, 8195, 7680, - 7808, 7840, 7848, 7850, 0, 8192, 8193, 8195, - 7680, 7808, 7840, 7848, 0, 8192, 8193, 8195, - 7680, 7808, 7840, 7856, 7852, 0, 8192, 8193, - 8195, 7680, 7808, 7840, 7856, 7852, 0, 8192, - 8193, 8195, 7680, 7808, 7840, 7856, 7857, 7854, - 0, 8192, 8193, 8195, 7680, 7808, 7840, 0, - 8192, 8193, 8195, 7680, 7808, 7872, 7856, 0, - 8192, 8193, 8195, 7680, 7808, 7872, 7856, 0, - 8192, 8193, 8195, 7680, 7808, 7872, 7856, 7858, - 0, 8192, 8193, 8195, 7680, 7808, 7872, 7856, - 0, 8192, 8193, 8195, 7680, 7808, 7872, 7856, - 7860, 0, 8192, 8193, 8195, 7680, 7808, 7872, - 7856, 7860, 0, 8192, 8193, 8195, 7680, 7808, - 7872, 7856, 7864, 7862, 0, 8192, 8193, 8195, - 7680, 7808, 7872, 7856, 0, 8192, 8193, 8195, - 7680, 7808, 7872, 7873, 7864, 0, 8192, 8193, - 8195, 7680, 7808, 7872, 7873, 7864, 0, 8192, - 8193, 8195, 7680, 7808, 7872, 7873, 7864, 7866, - 0, 8192, 8193, 8195, 7680, 7808, 7872, 7873, - 7864, 0, 8192, 8193, 8195, 7680, 7808, 7872, - 7873, 7864, 7868, 0, 8192, 8193, 8195, 7680, - 7808, 7872, 7873, 7875, 7868, 0, 8192, 8193, - 8195, 7680, 7808, 7872, 7873, 7875, 7868, 7870, - 0, 8192, 8193, 8195, 7680, 7808, 0, 8192, - 8193, 8195, 7680, 7936, 7872, 0, 8192, 8193, - 8195, 7680, 7936, 7872, 0, 8192, 8193, 8195, - 7680, 7936, 7872, 7874, 0, 8192, 8193, 8195, - 7680, 7936, 7872, 0, 8192, 8193, 8195, 7680, - 7936, 7872, 7876, 0, 8192, 8193, 8195, 7680, - 7936, 7872, 7876, 0, 8192, 8193, 8195, 7680, - 7936, 7872, 7880, 7878, 0, 8192, 8193, 8195, - 7680, 7936, 7872, 0, 8192, 8193, 8195, 7680, - 7936, 7872, 7880, 0, 8192, 8193, 8195, 7680, - 7936, 7872, 7880, 0, 8192, 8193, 8195, 7680, - 7936, 7872, 7880, 7882, 0, 8192, 8193, 8195, - 7680, 7936, 7872, 7880, 0, 8192, 8193, 8195, - 7680, 7936, 7872, 7888, 7884, 0, 8192, 8193, - 8195, 7680, 7936, 7872, 7888, 7884, 0, 8192, - 8193, 8195, 7680, 7936, 7872, 7888, 7889, 7886, - 0, 8192, 8193, 8195, 7680, 7936, 7872, 0, - 8192, 8193, 8195, 7680, 7936, 7872, 7888, 0, - 8192, 8193, 8195, 7680, 7936, 7872, 7888, 0, - 8192, 8193, 8195, 7680, 7936, 7872, 7888, 7890, - 0, 8192, 8193, 8195, 7680, 7936, 7872, 7888, - 0, 8192, 8193, 8195, 7680, 7936, 7872, 7888, - 7892, 0, 8192, 8193, 8195, 7680, 7936, 7872, - 7888, 7892, 0, 8192, 8193, 8195, 7680, 7936, - 7872, 7888, 7896, 7894, 0, 8192, 8193, 8195, - 7680, 7936, 7872, 7888, 0, 8192, 8193, 8195, - 7680, 7936, 7872, 7904, 7896, 0, 8192, 8193, - 8195, 7680, 7936, 7872, 7904, 7896, 0, 8192, - 8193, 8195, 7680, 7936, 7872, 7904, 7896, 7898, - 0, 8192, 8193, 8195, 7680, 7936, 7872, 7904, - 7896, 0, 8192, 8193, 8195, 7680, 7936, 7872, - 7904, 7905, 7900, 0, 8192, 8193, 8195, 7680, - 7936, 7872, 7904, 7905, 7900, 0, 8192, 8193, - 8195, 7680, 7936, 7872, 7904, 7905, 7900, 7902, - 0, 8192, 8193, 8195, 7680, 7936, 7872, 0, - 8192, 8193, 8195, 7680, 7936, 7937, 7904, 0, - 8192, 8193, 8195, 7680, 7936, 7937, 7904, 0, - 8192, 8193, 8195, 7680, 7936, 7937, 7904, 7906, - 0, 8192, 8193, 8195, 7680, 7936, 7937, 7904, - 0, 8192, 8193, 8195, 7680, 7936, 7937, 7904, - 7908, 0, 8192, 8193, 8195, 7680, 7936, 7937, - 7904, 7908, 0, 8192, 8193, 8195, 7680, 7936, - 7937, 7904, 7912, 7910, 0, 8192, 8193, 8195, - 7680, 7936, 7937, 7904, 0, 8192, 8193, 8195, - 7680, 7936, 7937, 7904, 7912, 0, 8192, 8193, - 8195, 7680, 7936, 7937, 7904, 7912, 0, 8192, - 8193, 8195, 7680, 7936, 7937, 7904, 7912, 7914, - 0, 8192, 8193, 8195, 7680, 7936, 7937, 7904, - 7912, 0, 8192, 8193, 8195, 7680, 7936, 7937, - 7904, 7920, 7916, 0, 8192, 8193, 8195, 7680, - 7936, 7937, 7904, 7920, 7916, 0, 8192, 8193, - 8195, 7680, 7936, 7937, 7904, 7920, 7921, 7918, - 0, 8192, 8193, 8195, 7680, 7936, 7937, 7904, - 0, 8192, 8193, 8195, 7680, 7936, 7937, 7904, - 7920, 0, 8192, 8193, 8195, 7680, 7936, 7937, - 7939, 7920, 0, 8192, 8193, 8195, 7680, 7936, - 7937, 7939, 7920, 7922, 0, 8192, 8193, 8195, - 7680, 7936, 7937, 7939, 7920, 0, 8192, 8193, - 8195, 7680, 7936, 7937, 7939, 7920, 7924, 0, - 8192, 8193, 8195, 7680, 7936, 7937, 7939, 7920, - 7924, 0, 8192, 8193, 8195, 7680, 7936, 7937, - 7939, 7920, 7928, 7926, 0, 8192, 8193, 8195, - 7680, 7936, 7937, 7939, 7920, 0, 8192, 8193, - 8195, 7680, 7936, 7937, 7939, 7920, 7928, 0, - 8192, 8193, 8195, 7680, 7936, 7937, 7939, 7920, - 7928, 0, 8192, 8193, 8195, 7680, 7936, 7937, - 7939, 7920, 7928, 7930, 0, 8192, 8193, 8195, - 7680, 7936, 7937, 7939, 7943, 7928, 0, 8192, - 8193, 8195, 7680, 7936, 7937, 7939, 7943, 7928, - 7932, 0, 8192, 8193, 8195, 7680, 7936, 7937, - 7939, 7943, 7928, 7932, 0, 8192, 8193, 8195, - 7680, 7936, 7937, 7939, 7943, 7928, 7932, 7934, - 0, 8192, 8193, 8195, 7680, 0, 8192, 8193, - 8195, 7680, 7936, 0, 8192, 8193, 8195, 7680, - 7936, 0, 8192, 8193, 8195, 7680, 7936, 7938, - 0, 8192, 8193, 8195, 7680, 7936, 0, 8192, - 8193, 8195, 7680, 7936, 7940, 0, 8192, 8193, - 8195, 7680, 7936, 7940, 0, 8192, 8193, 8195, - 7680, 7936, 7944, 7942, 0, 8192, 8193, 8195, - 8199, 7936, 0, 8192, 8193, 8195, 8199, 7936, - 7944, 0, 8192, 8193, 8195, 8199, 7936, 7944, - 0, 8192, 8193, 8195, 8199, 7936, 7944, 7946, - 0, 8192, 8193, 8195, 8199, 7936, 7944, 0, - 8192, 8193, 8195, 8199, 7936, 7952, 7948, 0, - 8192, 8193, 8195, 8199, 7936, 7952, 7948, 0, - 8192, 8193, 8195, 8199, 7936, 7952, 7953, 7950, - 0, 8192, 8193, 8195, 8199, 7936, 0, 8192, - 8193, 8195, 8199, 7936, 7952, 0, 8192, 8193, - 8195, 8199, 7936, 7952, 0, 8192, 8193, 8195, - 8199, 7936, 7952, 7954, 0, 8192, 8193, 8195, - 8199, 7936, 7952, 0, 8192, 8193, 8195, 8199, - 7936, 7952, 7956, 0, 8192, 8193, 8195, 8199, - 7936, 7952, 7956, 0, 8192, 8193, 8195, 8199, - 7936, 7952, 7960, 7958, 0, 8192, 8193, 8195, - 8199, 7936, 7952, 0, 8192, 8193, 8195, 8199, - 7936, 7968, 7960, 0, 8192, 8193, 8195, 8199, - 7936, 7968, 7960, 0, 8192, 8193, 8195, 8199, - 7936, 7968, 7960, 7962, 0, 8192, 8193, 8195, - 8199, 7936, 7968, 7960, 0, 8192, 8193, 8195, - 8199, 7936, 7968, 7969, 7964, 0, 8192, 8193, - 8195, 8199, 7936, 7968, 7969, 7964, 0, 8192, - 8193, 8195, 8199, 7936, 7968, 7969, 7964, 7966, - 0, 8192, 8193, 8195, 8199, 7936, 0, 8192, - 8193, 8195, 8199, 7936, 7968, 0, 8192, 8193, - 8195, 8199, 7936, 7968, 0, 8192, 8193, 8195, - 8199, 7936, 7968, 7970, 0, 8192, 8193, 8195, - 8199, 7936, 7968, 0, 8192, 8193, 8195, 8199, - 7936, 7968, 7972, 0, 8192, 8193, 8195, 8199, - 7936, 7968, 7972, 0, 8192, 8193, 8195, 8199, - 7936, 7968, 7976, 7974, 0, 8192, 8193, 8195, - 8199, 7936, 7968, 0, 8192, 8193, 8195, 8199, - 7936, 7968, 7976, 0, 8192, 8193, 8195, 8199, - 7936, 7968, 7976, 0, 8192, 8193, 8195, 8199, - 7936, 7968, 7976, 7978, 0, 8192, 8193, 8195, - 8199, 7936, 7968, 7976, 0, 8192, 8193, 8195, - 8199, 7936, 7968, 7984, 7980, 0, 8192, 8193, - 8195, 8199, 7936, 7968, 7984, 7980, 0, 8192, - 8193, 8195, 8199, 7936, 7968, 7984, 7985, 7982, - 0, 8192, 8193, 8195, 8199, 7936, 7968, 0, - 8192, 8193, 8195, 8199, 7936, 8000, 7984, 0, - 8192, 8193, 8195, 8199, 7936, 8000, 7984, 0, - 8192, 8193, 8195, 8199, 7936, 8000, 7984, 7986, - 0, 8192, 8193, 8195, 8199, 7936, 8000, 7984, - 0, 8192, 8193, 8195, 8199, 7936, 8000, 7984, - 7988, 0, 8192, 8193, 8195, 8199, 7936, 8000, - 7984, 7988, 0, 8192, 8193, 8195, 8199, 7936, - 8000, 7984, 7992, 7990, 0, 8192, 8193, 8195, - 8199, 7936, 8000, 7984, 0, 8192, 8193, 8195, - 8199, 7936, 8000, 8001, 7992, 0, 8192, 8193, - 8195, 8199, 7936, 8000, 8001, 7992, 0, 8192, - 8193, 8195, 8199, 7936, 8000, 8001, 7992, 7994, - 0, 8192, 8193, 8195, 8199, 7936, 8000, 8001, - 7992, 0, 8192, 8193, 8195, 8199, 7936, 8000, - 8001, 7992, 7996, 0, 8192, 8193, 8195, 8199, - 7936, 8000, 8001, 8003, 7996, 0, 8192, 8193, - 8195, 8199, 7936, 8000, 8001, 8003, 7996, 7998, - 0, 8192, 8193, 8195, 8199, 7936, 0, 8192, - 8193, 8195, 8199, 7936, 8000, 0, 8192, 8193, - 8195, 8199, 7936, 8000, 0, 8192, 8193, 8195, - 8199, 7936, 8000, 8002, 0, 8192, 8193, 8195, - 8199, 7936, 8000, 0, 8192, 8193, 8195, 8199, - 7936, 8000, 8004, 0, 8192, 8193, 8195, 8199, - 7936, 8000, 8004, 0, 8192, 8193, 8195, 8199, - 7936, 8000, 8008, 8006, 0, 8192, 8193, 8195, - 8199, 7936, 8000, 0, 8192, 8193, 8195, 8199, - 7936, 8000, 8008, 0, 8192, 8193, 8195, 8199, - 7936, 8000, 8008, 0, 8192, 8193, 8195, 8199, - 7936, 8000, 8008, 8010, 0, 8192, 8193, 8195, - 8199, 7936, 8000, 8008, 0, 8192, 8193, 8195, - 8199, 7936, 8000, 8016, 8012, 0, 8192, 8193, - 8195, 8199, 7936, 8000, 8016, 8012, 0, 8192, - 8193, 8195, 8199, 7936, 8000, 8016, 8017, 8014, - 0, 8192, 8193, 8195, 8199, 7936, 8000, 0, - 8192, 8193, 8195, 8199, 7936, 8000, 8016, 0, - 8192, 8193, 8195, 8199, 7936, 8000, 8016, 0, - 8192, 8193, 8195, 8199, 7936, 8000, 8016, 8018, - 0, 8192, 8193, 8195, 8199, 7936, 8000, 8016, - 0, 8192, 8193, 8195, 8199, 7936, 8000, 8016, - 8020, 0, 8192, 8193, 8195, 8199, 7936, 8000, - 8016, 8020, 0, 8192, 8193, 8195, 8199, 7936, - 8000, 8016, 8024, 8022, 0, 8192, 8193, 8195, - 8199, 7936, 8000, 8016, 0, 8192, 8193, 8195, - 8199, 7936, 8000, 8032, 8024, 0, 8192, 8193, - 8195, 8199, 7936, 8000, 8032, 8024, 0, 8192, - 8193, 8195, 8199, 7936, 8000, 8032, 8024, 8026, - 0, 8192, 8193, 8195, 8199, 7936, 8000, 8032, - 8024, 0, 8192, 8193, 8195, 8199, 7936, 8000, - 8032, 8033, 8028, 0, 8192, 8193, 8195, 8199, - 7936, 8000, 8032, 8033, 8028, 0, 8192, 8193, - 8195, 8199, 7936, 8000, 8032, 8033, 8028, 8030, - 0, 8192, 8193, 8195, 8199, 7936, 8000, 0, - 8192, 8193, 8195, 8199, 7936, 8064, 8032, 0, - 8192, 8193, 8195, 8199, 7936, 8064, 8032, 0, - 8192, 8193, 8195, 8199, 7936, 8064, 8032, 8034, - 0, 8192, 8193, 8195, 8199, 7936, 8064, 8032, - 0, 8192, 8193, 8195, 8199, 7936, 8064, 8032, - 8036, 0, 8192, 8193, 8195, 8199, 7936, 8064, - 8032, 8036, 0, 8192, 8193, 8195, 8199, 7936, - 8064, 8032, 8040, 8038, 0, 8192, 8193, 8195, - 8199, 7936, 8064, 8032, 0, 8192, 8193, 8195, - 8199, 7936, 8064, 8032, 8040, 0, 8192, 8193, - 8195, 8199, 7936, 8064, 8032, 8040, 0, 8192, - 8193, 8195, 8199, 7936, 8064, 8032, 8040, 8042, - 0, 8192, 8193, 8195, 8199, 7936, 8064, 8032, - 8040, 0, 8192, 8193, 8195, 8199, 7936, 8064, - 8032, 8048, 8044, 0, 8192, 8193, 8195, 8199, - 7936, 8064, 8032, 8048, 8044, 0, 8192, 8193, - 8195, 8199, 7936, 8064, 8032, 8048, 8049, 8046, - 0, 8192, 8193, 8195, 8199, 7936, 8064, 8032, - 0, 8192, 8193, 8195, 8199, 7936, 8064, 8065, - 8048, 0, 8192, 8193, 8195, 8199, 7936, 8064, - 8065, 8048, 0, 8192, 8193, 8195, 8199, 7936, - 8064, 8065, 8048, 8050, 0, 8192, 8193, 8195, - 8199, 7936, 8064, 8065, 8048, 0, 8192, 8193, - 8195, 8199, 7936, 8064, 8065, 8048, 8052, 0, - 8192, 8193, 8195, 8199, 7936, 8064, 8065, 8048, - 8052, 0, 8192, 8193, 8195, 8199, 7936, 8064, - 8065, 8048, 8056, 8054, 0, 8192, 8193, 8195, - 8199, 7936, 8064, 8065, 8048, 0, 8192, 8193, - 8195, 8199, 7936, 8064, 8065, 8048, 8056, 0, - 8192, 8193, 8195, 8199, 7936, 8064, 8065, 8067, - 8056, 0, 8192, 8193, 8195, 8199, 7936, 8064, - 8065, 8067, 8056, 8058, 0, 8192, 8193, 8195, - 8199, 7936, 8064, 8065, 8067, 8056, 0, 8192, - 8193, 8195, 8199, 7936, 8064, 8065, 8067, 8056, - 8060, 0, 8192, 8193, 8195, 8199, 7936, 8064, - 8065, 8067, 8056, 8060, 0, 8192, 8193, 8195, - 8199, 7936, 8064, 8065, 8067, 8056, 8060, 8062, - 0, 8192, 8193, 8195, 8199, 7936, 0, 8192, - 8193, 8195, 8199, 7936, 8064, 0, 8192, 8193, - 8195, 8199, 7936, 8064, 0, 8192, 8193, 8195, - 8199, 7936, 8064, 8066, 0, 8192, 8193, 8195, - 8199, 7936, 8064, 0, 8192, 8193, 8195, 8199, - 7936, 8064, 8068, 0, 8192, 8193, 8195, 8199, - 7936, 8064, 8068, 0, 8192, 8193, 8195, 8199, - 7936, 8064, 8072, 8070, 0, 8192, 8193, 8195, - 8199, 7936, 8064, 0, 8192, 8193, 8195, 8199, - 7936, 8064, 8072, 0, 8192, 8193, 8195, 8199, - 7936, 8064, 8072, 0, 8192, 8193, 8195, 8199, - 7936, 8064, 8072, 8074, 0, 8192, 8193, 8195, - 8199, 7936, 8064, 8072, 0, 8192, 8193, 8195, - 8199, 7936, 8064, 8080, 8076, 0, 8192, 8193, - 8195, 8199, 7936, 8064, 8080, 8076, 0, 8192, - 8193, 8195, 8199, 7936, 8064, 8080, 8081, 8078, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8080, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8080, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8080, 8082, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8080, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8080, - 8084, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8080, 8084, 0, 8192, 8193, 8195, 8199, 8207, - 8064, 8080, 8088, 8086, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8080, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8096, 8088, 0, 8192, 8193, - 8195, 8199, 8207, 8064, 8096, 8088, 0, 8192, - 8193, 8195, 8199, 8207, 8064, 8096, 8088, 8090, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8096, - 8088, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8096, 8097, 8092, 0, 8192, 8193, 8195, 8199, - 8207, 8064, 8096, 8097, 8092, 0, 8192, 8193, - 8195, 8199, 8207, 8064, 8096, 8097, 8092, 8094, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8096, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8096, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8096, 8098, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8096, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8096, - 8100, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8096, 8100, 0, 8192, 8193, 8195, 8199, 8207, - 8064, 8096, 8104, 8102, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8096, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8096, 8104, 0, 8192, 8193, - 8195, 8199, 8207, 8064, 8096, 8104, 0, 8192, - 8193, 8195, 8199, 8207, 8064, 8096, 8104, 8106, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8096, - 8104, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8096, 8112, 8108, 0, 8192, 8193, 8195, 8199, - 8207, 8064, 8096, 8112, 8108, 0, 8192, 8193, - 8195, 8199, 8207, 8064, 8096, 8112, 8113, 8110, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8096, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8128, - 8112, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8128, 8112, 0, 8192, 8193, 8195, 8199, 8207, - 8064, 8128, 8112, 8114, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8128, 8112, 0, 8192, 8193, - 8195, 8199, 8207, 8064, 8128, 8112, 8116, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8128, 8112, - 8116, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8128, 8112, 8120, 8118, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8128, 8112, 0, 8192, 8193, - 8195, 8199, 8207, 8064, 8128, 8129, 8120, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8128, 8129, - 8120, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8128, 8129, 8120, 8122, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8128, 8129, 8120, 0, 8192, - 8193, 8195, 8199, 8207, 8064, 8128, 8129, 8120, - 8124, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8128, 8129, 8131, 8124, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8128, 8129, 8131, 8124, 8126, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8128, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8128, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8128, 8130, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8128, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8128, - 8132, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8128, 8132, 0, 8192, 8193, 8195, 8199, 8207, - 8064, 8128, 8136, 8134, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8128, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8128, 8136, 0, 8192, 8193, - 8195, 8199, 8207, 8064, 8128, 8136, 0, 8192, - 8193, 8195, 8199, 8207, 8064, 8128, 8136, 8138, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8128, - 8136, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8128, 8144, 8140, 0, 8192, 8193, 8195, 8199, - 8207, 8064, 8128, 8144, 8140, 0, 8192, 8193, - 8195, 8199, 8207, 8064, 8128, 8144, 8145, 8142, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8128, - 0, 8192, 8193, 8195, 8199, 8207, 8064, 8128, - 8144, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8128, 8144, 0, 8192, 8193, 8195, 8199, 8207, - 8064, 8128, 8144, 8146, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8128, 8144, 0, 8192, 8193, - 8195, 8199, 8207, 8064, 8128, 8144, 8148, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8128, 8144, - 8148, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8128, 8144, 8152, 8150, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8128, 8144, 0, 8192, 8193, - 8195, 8199, 8207, 8064, 8128, 8160, 8152, 0, - 8192, 8193, 8195, 8199, 8207, 8064, 8128, 8160, - 8152, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8128, 8160, 8152, 8154, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8128, 8160, 8152, 0, 8192, - 8193, 8195, 8199, 8207, 8064, 8128, 8160, 8161, - 8156, 0, 8192, 8193, 8195, 8199, 8207, 8064, - 8128, 8160, 8161, 8156, 0, 8192, 8193, 8195, - 8199, 8207, 8064, 8128, 8160, 8161, 8156, 8158, - 0, 8192, 8193, 8195, 8199, 8207, 8223, 8128, - 0, 8192, 8193, 8195, 8199, 8207, 8223, 8128, - 8160, 0, 8192, 8193, 8195, 8199, 8207, 8223, - 8128, 8160, 0, 8192, 8193, 8195, 8199, 8207, - 8223, 8128, 8160, 8162, 0, 8192, 8193, 8195, - 8199, 8207, 8223, 8128, 8160, 0, 8192, 8193, - 8195, 8199, 8207, 8223, 8128, 8160, 8164, 0, - 8192, 8193, 8195, 8199, 8207, 8223, 8128, 8160, - 8164, 0, 8192, 8193, 8195, 8199, 8207, 8223, - 8128, 8160, 8168, 8166, 0, 8192, 8193, 8195, - 8199, 8207, 8223, 8128, 8160, 0, 8192, 8193, - 8195, 8199, 8207, 8223, 8128, 8160, 8168, 0, - 8192, 8193, 8195, 8199, 8207, 8223, 8128, 8160, - 8168, 0, 8192, 8193, 8195, 8199, 8207, 8223, - 8128, 8160, 8168, 8170, 0, 8192, 8193, 8195, - 8199, 8207, 8223, 8128, 8160, 8168, 0, 8192, - 8193, 8195, 8199, 8207, 8223, 8128, 8160, 8176, - 8172, 0, 8192, 8193, 8195, 8199, 8207, 8223, - 8128, 8160, 8176, 8172, 0, 8192, 8193, 8195, - 8199, 8207, 8223, 8128, 8160, 8176, 8177, 8174, - 0, 8192, 8193, 8195, 8199, 8207, 8223, 8128, - 8160, 0, 8192, 8193, 8195, 8199, 8207, 8223, - 8128, 8160, 8176, 0, 8192, 8193, 8195, 8199, - 8207, 8223, 8128, 8160, 8176, 0, 8192, 8193, - 8195, 8199, 8207, 8223, 8128, 8160, 8176, 8178, - 0, 8192, 8193, 8195, 8199, 8207, 8223, 8128, - 8160, 8176, 0, 8192, 8193, 8195, 8199, 8207, - 8223, 8128, 8160, 8176, 8180, 0, 8192, 8193, - 8195, 8199, 8207, 8223, 8128, 8160, 8176, 8180, - 0, 8192, 8193, 8195, 8199, 8207, 8223, 8128, - 8160, 8176, 8184, 8182, 0, 8192, 8193, 8195, - 8199, 8207, 8223, 8128, 8160, 8176, 0, 8192, - 8193, 8195, 8199, 8207, 8223, 8128, 8160, 8176, - 8184, 0, 8192, 8193, 8195, 8199, 8207, 8223, - 8128, 8160, 8176, 8184, 0, 8192, 8193, 8195, - 8199, 8207, 8223, 8128, 8160, 8176, 8184, 8186, - 0, 8192, 8193, 8195, 8199, 8207, 8223, 8128, - 8160, 8176, 8184, 0, 8192, 8193, 8195, 8199, - 8207, 8223, 8128, 8160, 8176, 8184, 8188, 0, - 8192, 8193, 8195, 8199, 8207, 8223, 8128, 8160, - 8176, 8184, 8188, 0, 8192, 8193, 8195, 8199, - 8207, 8223, 8128, 8160, 8176, 8184, 8188, 8190, - 0, 0, 8192, 0, 8192, 0, 8192, 8194, - 0, 8192, 0, 8192, 8196, 0, 8192, 8196, - 0, 8192, 8200, 8198, 0, 8192, 0, 8192, - 8200, 0, 8192, 8200, 0, 8192, 8200, 8202, - 0, 8192, 8200, 0, 8192, 8208, 8204, 0, - 8192, 8208, 8204, 0, 8192, 8208, 8209, 8206, - 0, 8192, 0, 8192, 8208, 0, 8192, 8208, - 0, 8192, 8208, 8210, 0, 8192, 8208, 0, - 8192, 8208, 8212, 0, 8192, 8208, 8212, 0, - 8192, 8208, 8216, 8214, 0, 8192, 8208, 0, - 8192, 8224, 8216, 0, 8192, 8224, 8216, 0, - 8192, 8224, 8216, 8218, 0, 8192, 8224, 8216, - 0, 8192, 8224, 8225, 8220, 0, 8192, 8224, - 8225, 8220, 0, 8192, 8224, 8225, 8220, 8222, - 0, 8192, 0, 8192, 8224, 0, 8192, 8224, - 0, 8192, 8224, 8226, 0, 8192, 8224, 0, - 8192, 8224, 8228, 0, 8192, 8224, 8228, 0, - 8192, 8224, 8232, 8230, 0, 8192, 8224, 0, - 8192, 8224, 8232, 0, 8192, 8224, 8232, 0, - 8192, 8224, 8232, 8234, 0, 8192, 8224, 8232, - 0, 8192, 8224, 8240, 8236, 0, 8192, 8224, - 8240, 8236, 0, 8192, 8224, 8240, 8241, 8238, - 0, 8192, 8224, 0, 8192, 8256, 8240, 0, - 8192, 8256, 8240, 0, 8192, 8256, 8240, 8242, - 0, 8192, 8256, 8240, 0, 8192, 8256, 8240, - 8244, 0, 8192, 8256, 8240, 8244, 0, 8192, - 8256, 8240, 8248, 8246, 0, 8192, 8256, 8240, - 0, 8192, 8256, 8257, 8248, 0, 8192, 8256, - 8257, 8248, 0, 8192, 8256, 8257, 8248, 8250, - 0, 8192, 8256, 8257, 8248, 0, 8192, 8256, - 8257, 8248, 8252, 0, 8192, 8256, 8257, 8259, - 8252, 0, 8192, 8256, 8257, 8259, 8252, 8254, - 0, 8192, 0, 8192, 8256, 0, 8192, 8256, - 0, 8192, 8256, 8258, 0, 8192, 8256, 0, - 8192, 8256, 8260, 0, 8192, 8256, 8260, 0, - 8192, 8256, 8264, 8262, 0, 8192, 8256, 0, - 8192, 8256, 8264, 0, 8192, 8256, 8264, 0, - 8192, 8256, 8264, 8266, 0, 8192, 8256, 8264, - 0, 8192, 8256, 8272, 8268, 0, 8192, 8256, - 8272, 8268, 0, 8192, 8256, 8272, 8273, 8270, - 0, 8192, 8256, 0, 8192, 8256, 8272, 0, - 8192, 8256, 8272, 0, 8192, 8256, 8272, 8274, - 0, 8192, 8256, 8272, 0, 8192, 8256, 8272, - 8276, 0, 8192, 8256, 8272, 8276, 0, 8192, - 8256, 8272, 8280, 8278, 0, 8192, 8256, 8272, - 0, 8192, 8256, 8288, 8280, 0, 8192, 8256, - 8288, 8280, 0, 8192, 8256, 8288, 8280, 8282, - 0, 8192, 8256, 8288, 8280, 0, 8192, 8256, - 8288, 8289, 8284, 0, 8192, 8256, 8288, 8289, - 8284, 0, 8192, 8256, 8288, 8289, 8284, 8286, - 0, 8192, 8256, 0, 8192, 8320, 8288, 0, - 8192, 8320, 8288, 0, 8192, 8320, 8288, 8290, - 0, 8192, 8320, 8288, 0, 8192, 8320, 8288, - 8292, 0, 8192, 8320, 8288, 8292, 0, 8192, - 8320, 8288, 8296, 8294, 0, 8192, 8320, 8288, - 0, 8192, 8320, 8288, 8296, 0, 8192, 8320, - 8288, 8296, 0, 8192, 8320, 8288, 8296, 8298, - 0, 8192, 8320, 8288, 8296, 0, 8192, 8320, - 8288, 8304, 8300, 0, 8192, 8320, 8288, 8304, - 8300, 0, 8192, 8320, 8288, 8304, 8305, 8302, - 0, 8192, 8320, 8288, 0, 8192, 8320, 8321, - 8304, 0, 8192, 8320, 8321, 8304, 0, 8192, - 8320, 8321, 8304, 8306, 0, 8192, 8320, 8321, - 8304, 0, 8192, 8320, 8321, 8304, 8308, 0, - 8192, 8320, 8321, 8304, 8308, 0, 8192, 8320, - 8321, 8304, 8312, 8310, 0, 8192, 8320, 8321, - 8304, 0, 8192, 8320, 8321, 8304, 8312, 0, - 8192, 8320, 8321, 8323, 8312, 0, 8192, 8320, - 8321, 8323, 8312, 8314, 0, 8192, 8320, 8321, - 8323, 8312, 0, 8192, 8320, 8321, 8323, 8312, - 8316, 0, 8192, 8320, 8321, 8323, 8312, 8316, - 0, 8192, 8320, 8321, 8323, 8312, 8316, 8318, - 0, 8192, 0, 8192, 8320, 0, 8192, 8320, - 0, 8192, 8320, 8322, 0, 8192, 8320, 0, - 8192, 8320, 8324, 0, 8192, 8320, 8324, 0, - 8192, 8320, 8328, 8326, 0, 8192, 8320, 0, - 8192, 8320, 8328, 0, 8192, 8320, 8328, 0, - 8192, 8320, 8328, 8330, 0, 8192, 8320, 8328, - 0, 8192, 8320, 8336, 8332, 0, 8192, 8320, - 8336, 8332, 0, 8192, 8320, 8336, 8337, 8334, - 0, 8192, 8320, 0, 8192, 8320, 8336, 0, - 8192, 8320, 8336, 0, 8192, 8320, 8336, 8338, - 0, 8192, 8320, 8336, 0, 8192, 8320, 8336, - 8340, 0, 8192, 8320, 8336, 8340, 0, 8192, - 8320, 8336, 8344, 8342, 0, 8192, 8320, 8336, - 0, 8192, 8320, 8352, 8344, 0, 8192, 8320, - 8352, 8344, 0, 8192, 8320, 8352, 8344, 8346, - 0, 8192, 8320, 8352, 8344, 0, 8192, 8320, - 8352, 8353, 8348, 0, 8192, 8320, 8352, 8353, - 8348, 0, 8192, 8320, 8352, 8353, 8348, 8350, - 0, 8192, 8320, 0, 8192, 8320, 8352, 0, - 8192, 8320, 8352, 0, 8192, 8320, 8352, 8354, - 0, 8192, 8320, 8352, 0, 8192, 8320, 8352, - 8356, 0, 8192, 8320, 8352, 8356, 0, 8192, - 8320, 8352, 8360, 8358, 0, 8192, 8320, 8352, - 0, 8192, 8320, 8352, 8360, 0, 8192, 8320, - 8352, 8360, 0, 8192, 8320, 8352, 8360, 8362, - 0, 8192, 8320, 8352, 8360, 0, 8192, 8320, - 8352, 8368, 8364, 0, 8192, 8320, 8352, 8368, - 8364, 0, 8192, 8320, 8352, 8368, 8369, 8366, - 0, 8192, 8320, 8352, 0, 8192, 8320, 8384, - 8368, 0, 8192, 8320, 8384, 8368, 0, 8192, - 8320, 8384, 8368, 8370, 0, 8192, 8320, 8384, - 8368, 0, 8192, 8320, 8384, 8368, 8372, 0, - 8192, 8320, 8384, 8368, 8372, 0, 8192, 8320, - 8384, 8368, 8376, 8374, 0, 8192, 8320, 8384, - 8368, 0, 8192, 8320, 8384, 8385, 8376, 0, - 8192, 8320, 8384, 8385, 8376, 0, 8192, 8320, - 8384, 8385, 8376, 8378, 0, 8192, 8320, 8384, - 8385, 8376, 0, 8192, 8320, 8384, 8385, 8376, - 8380, 0, 8192, 8320, 8384, 8385, 8387, 8380, - 0, 8192, 8320, 8384, 8385, 8387, 8380, 8382, - 0, 8192, 8320, 0, 8192, 8448, 8384, 0, - 8192, 8448, 8384, 0, 8192, 8448, 8384, 8386, - 0, 8192, 8448, 8384, 0, 8192, 8448, 8384, - 8388, 0, 8192, 8448, 8384, 8388, 0, 8192, - 8448, 8384, 8392, 8390, 0, 8192, 8448, 8384, - 0, 8192, 8448, 8384, 8392, 0, 8192, 8448, - 8384, 8392, 0, 8192, 8448, 8384, 8392, 8394, - 0, 8192, 8448, 8384, 8392, 0, 8192, 8448, - 8384, 8400, 8396, 0, 8192, 8448, 8384, 8400, - 8396, 0, 8192, 8448, 8384, 8400, 8401, 8398, - 0, 8192, 8448, 8384, 0, 8192, 8448, 8384, - 8400, 0, 8192, 8448, 8384, 8400, 0, 8192, - 8448, 8384, 8400, 8402, 0, 8192, 8448, 8384, - 8400, 0, 8192, 8448, 8384, 8400, 8404, 0, - 8192, 8448, 8384, 8400, 8404, 0, 8192, 8448, - 8384, 8400, 8408, 8406, 0, 8192, 8448, 8384, - 8400, 0, 8192, 8448, 8384, 8416, 8408, 0, - 8192, 8448, 8384, 8416, 8408, 0, 8192, 8448, - 8384, 8416, 8408, 8410, 0, 8192, 8448, 8384, - 8416, 8408, 0, 8192, 8448, 8384, 8416, 8417, - 8412, 0, 8192, 8448, 8384, 8416, 8417, 8412, - 0, 8192, 8448, 8384, 8416, 8417, 8412, 8414, - 0, 8192, 8448, 8384, 0, 8192, 8448, 8449, - 8416, 0, 8192, 8448, 8449, 8416, 0, 8192, - 8448, 8449, 8416, 8418, 0, 8192, 8448, 8449, - 8416, 0, 8192, 8448, 8449, 8416, 8420, 0, - 8192, 8448, 8449, 8416, 8420, 0, 8192, 8448, - 8449, 8416, 8424, 8422, 0, 8192, 8448, 8449, - 8416, 0, 8192, 8448, 8449, 8416, 8424, 0, - 8192, 8448, 8449, 8416, 8424, 0, 8192, 8448, - 8449, 8416, 8424, 8426, 0, 8192, 8448, 8449, - 8416, 8424, 0, 8192, 8448, 8449, 8416, 8432, - 8428, 0, 8192, 8448, 8449, 8416, 8432, 8428, - 0, 8192, 8448, 8449, 8416, 8432, 8433, 8430, - 0, 8192, 8448, 8449, 8416, 0, 8192, 8448, - 8449, 8416, 8432, 0, 8192, 8448, 8449, 8451, - 8432, 0, 8192, 8448, 8449, 8451, 8432, 8434, - 0, 8192, 8448, 8449, 8451, 8432, 0, 8192, - 8448, 8449, 8451, 8432, 8436, 0, 8192, 8448, - 8449, 8451, 8432, 8436, 0, 8192, 8448, 8449, - 8451, 8432, 8440, 8438, 0, 8192, 8448, 8449, - 8451, 8432, 0, 8192, 8448, 8449, 8451, 8432, - 8440, 0, 8192, 8448, 8449, 8451, 8432, 8440, - 0, 8192, 8448, 8449, 8451, 8432, 8440, 8442, - 0, 8192, 8448, 8449, 8451, 8455, 8440, 0, - 8192, 8448, 8449, 8451, 8455, 8440, 8444, 0, - 8192, 8448, 8449, 8451, 8455, 8440, 8444, 0, - 8192, 8448, 8449, 8451, 8455, 8440, 8444, 8446, - 0, 8192, 0, 8192, 8448, 0, 8192, 8448, - 0, 8192, 8448, 8450, 0, 8192, 8448, 0, - 8192, 8448, 8452, 0, 8192, 8448, 8452, 0, - 8192, 8448, 8456, 8454, 0, 8192, 8448, 0, - 8192, 8448, 8456, 0, 8192, 8448, 8456, 0, - 8192, 8448, 8456, 8458, 0, 8192, 8448, 8456, - 0, 8192, 8448, 8464, 8460, 0, 8192, 8448, - 8464, 8460, 0, 8192, 8448, 8464, 8465, 8462, - 0, 8192, 8448, 0, 8192, 8448, 8464, 0, - 8192, 8448, 8464, 0, 8192, 8448, 8464, 8466, - 0, 8192, 8448, 8464, 0, 8192, 8448, 8464, - 8468, 0, 8192, 8448, 8464, 8468, 0, 8192, - 8448, 8464, 8472, 8470, 0, 8192, 8448, 8464, - 0, 8192, 8448, 8480, 8472, 0, 8192, 8448, - 8480, 8472, 0, 8192, 8448, 8480, 8472, 8474, - 0, 8192, 8448, 8480, 8472, 0, 8192, 8448, - 8480, 8481, 8476, 0, 8192, 8448, 8480, 8481, - 8476, 0, 8192, 8448, 8480, 8481, 8476, 8478, - 0, 8192, 8448, 0, 8192, 8448, 8480, 0, - 8192, 8448, 8480, 0, 8192, 8448, 8480, 8482, - 0, 8192, 8448, 8480, 0, 8192, 8448, 8480, - 8484, 0, 8192, 8448, 8480, 8484, 0, 8192, - 8448, 8480, 8488, 8486, 0, 8192, 8448, 8480, - 0, 8192, 8448, 8480, 8488, 0, 8192, 8448, - 8480, 8488, 0, 8192, 8448, 8480, 8488, 8490, - 0, 8192, 8448, 8480, 8488, 0, 8192, 8448, - 8480, 8496, 8492, 0, 8192, 8448, 8480, 8496, - 8492, 0, 8192, 8448, 8480, 8496, 8497, 8494, - 0, 8192, 8448, 8480, 0, 8192, 8448, 8512, - 8496, 0, 8192, 8448, 8512, 8496, 0, 8192, - 8448, 8512, 8496, 8498, 0, 8192, 8448, 8512, - 8496, 0, 8192, 8448, 8512, 8496, 8500, 0, - 8192, 8448, 8512, 8496, 8500, 0, 8192, 8448, - 8512, 8496, 8504, 8502, 0, 8192, 8448, 8512, - 8496, 0, 8192, 8448, 8512, 8513, 8504, 0, - 8192, 8448, 8512, 8513, 8504, 0, 8192, 8448, - 8512, 8513, 8504, 8506, 0, 8192, 8448, 8512, - 8513, 8504, 0, 8192, 8448, 8512, 8513, 8504, - 8508, 0, 8192, 8448, 8512, 8513, 8515, 8508, - 0, 8192, 8448, 8512, 8513, 8515, 8508, 8510, - 0, 8192, 8448, 0, 8192, 8448, 8512, 0, - 8192, 8448, 8512, 0, 8192, 8448, 8512, 8514, - 0, 8192, 8448, 8512, 0, 8192, 8448, 8512, - 8516, 0, 8192, 8448, 8512, 8516, 0, 8192, - 8448, 8512, 8520, 8518, 0, 8192, 8448, 8512, - 0, 8192, 8448, 8512, 8520, 0, 8192, 8448, - 8512, 8520, 0, 8192, 8448, 8512, 8520, 8522, - 0, 8192, 8448, 8512, 8520, 0, 8192, 8448, - 8512, 8528, 8524, 0, 8192, 8448, 8512, 8528, - 8524, 0, 8192, 8448, 8512, 8528, 8529, 8526, - 0, 8192, 8448, 8512, 0, 8192, 8448, 8512, - 8528, 0, 8192, 8448, 8512, 8528, 0, 8192, - 8448, 8512, 8528, 8530, 0, 8192, 8448, 8512, - 8528, 0, 8192, 8448, 8512, 8528, 8532, 0, - 8192, 8448, 8512, 8528, 8532, 0, 8192, 8448, - 8512, 8528, 8536, 8534, 0, 8192, 8448, 8512, - 8528, 0, 8192, 8448, 8512, 8544, 8536, 0, - 8192, 8448, 8512, 8544, 8536, 0, 8192, 8448, - 8512, 8544, 8536, 8538, 0, 8192, 8448, 8512, - 8544, 8536, 0, 8192, 8448, 8512, 8544, 8545, - 8540, 0, 8192, 8448, 8512, 8544, 8545, 8540, - 0, 8192, 8448, 8512, 8544, 8545, 8540, 8542, - 0, 8192, 8448, 8512, 0, 8192, 8448, 8576, - 8544, 0, 8192, 8448, 8576, 8544, 0, 8192, - 8448, 8576, 8544, 8546, 0, 8192, 8448, 8576, - 8544, 0, 8192, 8448, 8576, 8544, 8548, 0, - 8192, 8448, 8576, 8544, 8548, 0, 8192, 8448, - 8576, 8544, 8552, 8550, 0, 8192, 8448, 8576, - 8544, 0, 8192, 8448, 8576, 8544, 8552, 0, - 8192, 8448, 8576, 8544, 8552, 0, 8192, 8448, - 8576, 8544, 8552, 8554, 0, 8192, 8448, 8576, - 8544, 8552, 0, 8192, 8448, 8576, 8544, 8560, - 8556, 0, 8192, 8448, 8576, 8544, 8560, 8556, - 0, 8192, 8448, 8576, 8544, 8560, 8561, 8558, - 0, 8192, 8448, 8576, 8544, 0, 8192, 8448, - 8576, 8577, 8560, 0, 8192, 8448, 8576, 8577, - 8560, 0, 8192, 8448, 8576, 8577, 8560, 8562, - 0, 8192, 8448, 8576, 8577, 8560, 0, 8192, - 8448, 8576, 8577, 8560, 8564, 0, 8192, 8448, - 8576, 8577, 8560, 8564, 0, 8192, 8448, 8576, - 8577, 8560, 8568, 8566, 0, 8192, 8448, 8576, - 8577, 8560, 0, 8192, 8448, 8576, 8577, 8560, - 8568, 0, 8192, 8448, 8576, 8577, 8579, 8568, - 0, 8192, 8448, 8576, 8577, 8579, 8568, 8570, - 0, 8192, 8448, 8576, 8577, 8579, 8568, 0, - 8192, 8448, 8576, 8577, 8579, 8568, 8572, 0, - 8192, 8448, 8576, 8577, 8579, 8568, 8572, 0, - 8192, 8448, 8576, 8577, 8579, 8568, 8572, 8574, - 0, 8192, 8448, 0, 8192, 8704, 8576, 0, - 8192, 8704, 8576, 0, 8192, 8704, 8576, 8578, - 0, 8192, 8704, 8576, 0, 8192, 8704, 8576, - 8580, 0, 8192, 8704, 8576, 8580, 0, 8192, - 8704, 8576, 8584, 8582, 0, 8192, 8704, 8576, - 0, 8192, 8704, 8576, 8584, 0, 8192, 8704, - 8576, 8584, 0, 8192, 8704, 8576, 8584, 8586, - 0, 8192, 8704, 8576, 8584, 0, 8192, 8704, - 8576, 8592, 8588, 0, 8192, 8704, 8576, 8592, - 8588, 0, 8192, 8704, 8576, 8592, 8593, 8590, - 0, 8192, 8704, 8576, 0, 8192, 8704, 8576, - 8592, 0, 8192, 8704, 8576, 8592, 0, 8192, - 8704, 8576, 8592, 8594, 0, 8192, 8704, 8576, - 8592, 0, 8192, 8704, 8576, 8592, 8596, 0, - 8192, 8704, 8576, 8592, 8596, 0, 8192, 8704, - 8576, 8592, 8600, 8598, 0, 8192, 8704, 8576, - 8592, 0, 8192, 8704, 8576, 8608, 8600, 0, - 8192, 8704, 8576, 8608, 8600, 0, 8192, 8704, - 8576, 8608, 8600, 8602, 0, 8192, 8704, 8576, - 8608, 8600, 0, 8192, 8704, 8576, 8608, 8609, - 8604, 0, 8192, 8704, 8576, 8608, 8609, 8604, - 0, 8192, 8704, 8576, 8608, 8609, 8604, 8606, - 0, 8192, 8704, 8576, 0, 8192, 8704, 8576, - 8608, 0, 8192, 8704, 8576, 8608, 0, 8192, - 8704, 8576, 8608, 8610, 0, 8192, 8704, 8576, - 8608, 0, 8192, 8704, 8576, 8608, 8612, 0, - 8192, 8704, 8576, 8608, 8612, 0, 8192, 8704, - 8576, 8608, 8616, 8614, 0, 8192, 8704, 8576, - 8608, 0, 8192, 8704, 8576, 8608, 8616, 0, - 8192, 8704, 8576, 8608, 8616, 0, 8192, 8704, - 8576, 8608, 8616, 8618, 0, 8192, 8704, 8576, - 8608, 8616, 0, 8192, 8704, 8576, 8608, 8624, - 8620, 0, 8192, 8704, 8576, 8608, 8624, 8620, - 0, 8192, 8704, 8576, 8608, 8624, 8625, 8622, - 0, 8192, 8704, 8576, 8608, 0, 8192, 8704, - 8576, 8640, 8624, 0, 8192, 8704, 8576, 8640, - 8624, 0, 8192, 8704, 8576, 8640, 8624, 8626, - 0, 8192, 8704, 8576, 8640, 8624, 0, 8192, - 8704, 8576, 8640, 8624, 8628, 0, 8192, 8704, - 8576, 8640, 8624, 8628, 0, 8192, 8704, 8576, - 8640, 8624, 8632, 8630, 0, 8192, 8704, 8576, - 8640, 8624, 0, 8192, 8704, 8576, 8640, 8641, - 8632, 0, 8192, 8704, 8576, 8640, 8641, 8632, - 0, 8192, 8704, 8576, 8640, 8641, 8632, 8634, - 0, 8192, 8704, 8576, 8640, 8641, 8632, 0, - 8192, 8704, 8576, 8640, 8641, 8632, 8636, 0, - 8192, 8704, 8576, 8640, 8641, 8643, 8636, 0, - 8192, 8704, 8576, 8640, 8641, 8643, 8636, 8638, - 0, 8192, 8704, 8576, 0, 8192, 8704, 8705, - 8640, 0, 8192, 8704, 8705, 8640, 0, 8192, - 8704, 8705, 8640, 8642, 0, 8192, 8704, 8705, - 8640, 0, 8192, 8704, 8705, 8640, 8644, 0, - 8192, 8704, 8705, 8640, 8644, 0, 8192, 8704, - 8705, 8640, 8648, 8646, 0, 8192, 8704, 8705, - 8640, 0, 8192, 8704, 8705, 8640, 8648, 0, - 8192, 8704, 8705, 8640, 8648, 0, 8192, 8704, - 8705, 8640, 8648, 8650, 0, 8192, 8704, 8705, - 8640, 8648, 0, 8192, 8704, 8705, 8640, 8656, - 8652, 0, 8192, 8704, 8705, 8640, 8656, 8652, - 0, 8192, 8704, 8705, 8640, 8656, 8657, 8654, - 0, 8192, 8704, 8705, 8640, 0, 8192, 8704, - 8705, 8640, 8656, 0, 8192, 8704, 8705, 8640, - 8656, 0, 8192, 8704, 8705, 8640, 8656, 8658, - 0, 8192, 8704, 8705, 8640, 8656, 0, 8192, - 8704, 8705, 8640, 8656, 8660, 0, 8192, 8704, - 8705, 8640, 8656, 8660, 0, 8192, 8704, 8705, - 8640, 8656, 8664, 8662, 0, 8192, 8704, 8705, - 8640, 8656, 0, 8192, 8704, 8705, 8640, 8672, - 8664, 0, 8192, 8704, 8705, 8640, 8672, 8664, - 0, 8192, 8704, 8705, 8640, 8672, 8664, 8666, - 0, 8192, 8704, 8705, 8640, 8672, 8664, 0, - 8192, 8704, 8705, 8640, 8672, 8673, 8668, 0, - 8192, 8704, 8705, 8640, 8672, 8673, 8668, 0, - 8192, 8704, 8705, 8640, 8672, 8673, 8668, 8670, - 0, 8192, 8704, 8705, 8640, 0, 8192, 8704, - 8705, 8640, 8672, 0, 8192, 8704, 8705, 8707, - 8672, 0, 8192, 8704, 8705, 8707, 8672, 8674, - 0, 8192, 8704, 8705, 8707, 8672, 0, 8192, - 8704, 8705, 8707, 8672, 8676, 0, 8192, 8704, - 8705, 8707, 8672, 8676, 0, 8192, 8704, 8705, - 8707, 8672, 8680, 8678, 0, 8192, 8704, 8705, - 8707, 8672, 0, 8192, 8704, 8705, 8707, 8672, - 8680, 0, 8192, 8704, 8705, 8707, 8672, 8680, - 0, 8192, 8704, 8705, 8707, 8672, 8680, 8682, - 0, 8192, 8704, 8705, 8707, 8672, 8680, 0, - 8192, 8704, 8705, 8707, 8672, 8688, 8684, 0, - 8192, 8704, 8705, 8707, 8672, 8688, 8684, 0, - 8192, 8704, 8705, 8707, 8672, 8688, 8689, 8686, - 0, 8192, 8704, 8705, 8707, 8672, 0, 8192, - 8704, 8705, 8707, 8672, 8688, 0, 8192, 8704, - 8705, 8707, 8672, 8688, 0, 8192, 8704, 8705, - 8707, 8672, 8688, 8690, 0, 8192, 8704, 8705, - 8707, 8711, 8688, 0, 8192, 8704, 8705, 8707, - 8711, 8688, 8692, 0, 8192, 8704, 8705, 8707, - 8711, 8688, 8692, 0, 8192, 8704, 8705, 8707, - 8711, 8688, 8696, 8694, 0, 8192, 8704, 8705, - 8707, 8711, 8688, 0, 8192, 8704, 8705, 8707, - 8711, 8688, 8696, 0, 8192, 8704, 8705, 8707, - 8711, 8688, 8696, 0, 8192, 8704, 8705, 8707, - 8711, 8688, 8696, 8698, 0, 8192, 8704, 8705, - 8707, 8711, 8688, 8696, 0, 8192, 8704, 8705, - 8707, 8711, 8688, 8696, 8700, 0, 8192, 8704, - 8705, 8707, 8711, 8688, 8696, 8700, 0, 8192, - 8704, 8705, 8707, 8711, 8688, 8696, 8700, 8702, - 0, 8192, 0, 8192, 8704, 0, 8192, 8704, - 0, 8192, 8704, 8706, 0, 8192, 8704, 0, - 8192, 8704, 8708, 0, 8192, 8704, 8708, 0, - 8192, 8704, 8712, 8710, 0, 8192, 8704, 0, - 8192, 8704, 8712, 0, 8192, 8704, 8712, 0, - 8192, 8704, 8712, 8714, 0, 8192, 8704, 8712, - 0, 8192, 8704, 8720, 8716, 0, 8192, 8704, - 8720, 8716, 0, 8192, 8704, 8720, 8721, 8718, - 0, 8192, 8704, 0, 8192, 8704, 8720, 0, - 8192, 8704, 8720, 0, 8192, 8704, 8720, 8722, - 0, 8192, 8704, 8720, 0, 8192, 8704, 8720, - 8724, 0, 8192, 8704, 8720, 8724, 0, 8192, - 8704, 8720, 8728, 8726, 0, 8192, 8704, 8720, - 0, 8192, 8704, 8736, 8728, 0, 8192, 8704, - 8736, 8728, 0, 8192, 8704, 8736, 8728, 8730, - 0, 8192, 8704, 8736, 8728, 0, 8192, 8704, - 8736, 8737, 8732, 0, 8192, 8704, 8736, 8737, - 8732, 0, 8192, 8704, 8736, 8737, 8732, 8734, - 0, 8192, 8704, 0, 8192, 8704, 8736, 0, - 8192, 8704, 8736, 0, 8192, 8704, 8736, 8738, - 0, 8192, 8704, 8736, 0, 8192, 8704, 8736, - 8740, 0, 8192, 8704, 8736, 8740, 0, 8192, - 8704, 8736, 8744, 8742, 0, 8192, 8704, 8736, - 0, 8192, 8704, 8736, 8744, 0, 8192, 8704, - 8736, 8744, 0, 8192, 8704, 8736, 8744, 8746, - 0, 8192, 8704, 8736, 8744, 0, 8192, 8704, - 8736, 8752, 8748, 0, 8192, 8704, 8736, 8752, - 8748, 0, 8192, 8704, 8736, 8752, 8753, 8750, - 0, 8192, 8704, 8736, 0, 8192, 8704, 8768, - 8752, 0, 8192, 8704, 8768, 8752, 0, 8192, - 8704, 8768, 8752, 8754, 0, 8192, 8704, 8768, - 8752, 0, 8192, 8704, 8768, 8752, 8756, 0, - 8192, 8704, 8768, 8752, 8756, 0, 8192, 8704, - 8768, 8752, 8760, 8758, 0, 8192, 8704, 8768, - 8752, 0, 8192, 8704, 8768, 8769, 8760, 0, - 8192, 8704, 8768, 8769, 8760, 0, 8192, 8704, - 8768, 8769, 8760, 8762, 0, 8192, 8704, 8768, - 8769, 8760, 0, 8192, 8704, 8768, 8769, 8760, - 8764, 0, 8192, 8704, 8768, 8769, 8771, 8764, - 0, 8192, 8704, 8768, 8769, 8771, 8764, 8766, - 0, 8192, 8704, 0, 8192, 8704, 8768, 0, - 8192, 8704, 8768, 0, 8192, 8704, 8768, 8770, - 0, 8192, 8704, 8768, 0, 8192, 8704, 8768, - 8772, 0, 8192, 8704, 8768, 8772, 0, 8192, - 8704, 8768, 8776, 8774, 0, 8192, 8704, 8768, - 0, 8192, 8704, 8768, 8776, 0, 8192, 8704, - 8768, 8776, 0, 8192, 8704, 8768, 8776, 8778, - 0, 8192, 8704, 8768, 8776, 0, 8192, 8704, - 8768, 8784, 8780, 0, 8192, 8704, 8768, 8784, - 8780, 0, 8192, 8704, 8768, 8784, 8785, 8782, - 0, 8192, 8704, 8768, 0, 8192, 8704, 8768, - 8784, 0, 8192, 8704, 8768, 8784, 0, 8192, - 8704, 8768, 8784, 8786, 0, 8192, 8704, 8768, - 8784, 0, 8192, 8704, 8768, 8784, 8788, 0, - 8192, 8704, 8768, 8784, 8788, 0, 8192, 8704, - 8768, 8784, 8792, 8790, 0, 8192, 8704, 8768, - 8784, 0, 8192, 8704, 8768, 8800, 8792, 0, - 8192, 8704, 8768, 8800, 8792, 0, 8192, 8704, - 8768, 8800, 8792, 8794, 0, 8192, 8704, 8768, - 8800, 8792, 0, 8192, 8704, 8768, 8800, 8801, - 8796, 0, 8192, 8704, 8768, 8800, 8801, 8796, - 0, 8192, 8704, 8768, 8800, 8801, 8796, 8798, - 0, 8192, 8704, 8768, 0, 8192, 8704, 8832, - 8800, 0, 8192, 8704, 8832, 8800, 0, 8192, - 8704, 8832, 8800, 8802, 0, 8192, 8704, 8832, - 8800, 0, 8192, 8704, 8832, 8800, 8804, 0, - 8192, 8704, 8832, 8800, 8804, 0, 8192, 8704, - 8832, 8800, 8808, 8806, 0, 8192, 8704, 8832, - 8800, 0, 8192, 8704, 8832, 8800, 8808, 0, - 8192, 8704, 8832, 8800, 8808, 0, 8192, 8704, - 8832, 8800, 8808, 8810, 0, 8192, 8704, 8832, - 8800, 8808, 0, 8192, 8704, 8832, 8800, 8816, - 8812, 0, 8192, 8704, 8832, 8800, 8816, 8812, - 0, 8192, 8704, 8832, 8800, 8816, 8817, 8814, - 0, 8192, 8704, 8832, 8800, 0, 8192, 8704, - 8832, 8833, 8816, 0, 8192, 8704, 8832, 8833, - 8816, 0, 8192, 8704, 8832, 8833, 8816, 8818, - 0, 8192, 8704, 8832, 8833, 8816, 0, 8192, - 8704, 8832, 8833, 8816, 8820, 0, 8192, 8704, - 8832, 8833, 8816, 8820, 0, 8192, 8704, 8832, - 8833, 8816, 8824, 8822, 0, 8192, 8704, 8832, - 8833, 8816, 0, 8192, 8704, 8832, 8833, 8816, - 8824, 0, 8192, 8704, 8832, 8833, 8835, 8824, - 0, 8192, 8704, 8832, 8833, 8835, 8824, 8826, - 0, 8192, 8704, 8832, 8833, 8835, 8824, 0, - 8192, 8704, 8832, 8833, 8835, 8824, 8828, 0, - 8192, 8704, 8832, 8833, 8835, 8824, 8828, 0, - 8192, 8704, 8832, 8833, 8835, 8824, 8828, 8830, - 0, 8192, 8704, 0, 8192, 8704, 8832, 0, - 8192, 8704, 8832, 0, 8192, 8704, 8832, 8834, - 0, 8192, 8704, 8832, 0, 8192, 8704, 8832, - 8836, 0, 8192, 8704, 8832, 8836, 0, 8192, - 8704, 8832, 8840, 8838, 0, 8192, 8704, 8832, - 0, 8192, 8704, 8832, 8840, 0, 8192, 8704, - 8832, 8840, 0, 8192, 8704, 8832, 8840, 8842, - 0, 8192, 8704, 8832, 8840, 0, 8192, 8704, - 8832, 8848, 8844, 0, 8192, 8704, 8832, 8848, - 8844, 0, 8192, 8704, 8832, 8848, 8849, 8846, - 0, 8192, 8704, 8832, 0, 8192, 8704, 8832, - 8848, 0, 8192, 8704, 8832, 8848, 0, 8192, - 8704, 8832, 8848, 8850, 0, 8192, 8704, 8832, - 8848, 0, 8192, 8704, 8832, 8848, 8852, 0, - 8192, 8704, 8832, 8848, 8852, 0, 8192, 8704, - 8832, 8848, 8856, 8854, 0, 8192, 8704, 8832, - 8848, 0, 8192, 8704, 8832, 8864, 8856, 0, - 8192, 8704, 8832, 8864, 8856, 0, 8192, 8704, - 8832, 8864, 8856, 8858, 0, 8192, 8704, 8832, - 8864, 8856, 0, 8192, 8704, 8832, 8864, 8865, - 8860, 0, 8192, 8704, 8832, 8864, 8865, 8860, - 0, 8192, 8704, 8832, 8864, 8865, 8860, 8862, - 0, 8192, 8704, 8832, 0, 8192, 8704, 8832, - 8864, 0, 8192, 8704, 8832, 8864, 0, 8192, - 8704, 8832, 8864, 8866, 0, 8192, 8704, 8832, - 8864, 0, 8192, 8704, 8832, 8864, 8868, 0, - 8192, 8704, 8832, 8864, 8868, 0, 8192, 8704, - 8832, 8864, 8872, 8870, 0, 8192, 8704, 8832, - 8864, 0, 8192, 8704, 8832, 8864, 8872, 0, - 8192, 8704, 8832, 8864, 8872, 0, 8192, 8704, - 8832, 8864, 8872, 8874, 0, 8192, 8704, 8832, - 8864, 8872, 0, 8192, 8704, 8832, 8864, 8880, - 8876, 0, 8192, 8704, 8832, 8864, 8880, 8876, - 0, 8192, 8704, 8832, 8864, 8880, 8881, 8878, - 0, 8192, 8704, 8832, 8864, 0, 8192, 8704, - 8832, 8896, 8880, 0, 8192, 8704, 8832, 8896, - 8880, 0, 8192, 8704, 8832, 8896, 8880, 8882, - 0, 8192, 8704, 8832, 8896, 8880, 0, 8192, - 8704, 8832, 8896, 8880, 8884, 0, 8192, 8704, - 8832, 8896, 8880, 8884, 0, 8192, 8704, 8832, - 8896, 8880, 8888, 8886, 0, 8192, 8704, 8832, - 8896, 8880, 0, 8192, 8704, 8832, 8896, 8897, - 8888, 0, 8192, 8704, 8832, 8896, 8897, 8888, - 0, 8192, 8704, 8832, 8896, 8897, 8888, 8890, - 0, 8192, 8704, 8832, 8896, 8897, 8888, 0, - 8192, 8704, 8832, 8896, 8897, 8888, 8892, 0, - 8192, 8704, 8832, 8896, 8897, 8899, 8892, 0, - 8192, 8704, 8832, 8896, 8897, 8899, 8892, 8894, - 0, 8192, 8704, 8832, 0, 8192, 8704, 8960, - 8896, 0, 8192, 8704, 8960, 8896, 0, 8192, - 8704, 8960, 8896, 8898, 0, 8192, 8704, 8960, - 8896, 0, 8192, 8704, 8960, 8896, 8900, 0, - 8192, 8704, 8960, 8896, 8900, 0, 8192, 8704, - 8960, 8896, 8904, 8902, 0, 8192, 8704, 8960, - 8896, 0, 8192, 8704, 8960, 8896, 8904, 0, - 8192, 8704, 8960, 8896, 8904, 0, 8192, 8704, - 8960, 8896, 8904, 8906, 0, 8192, 8704, 8960, - 8896, 8904, 0, 8192, 8704, 8960, 8896, 8912, - 8908, 0, 8192, 8704, 8960, 8896, 8912, 8908, - 0, 8192, 8704, 8960, 8896, 8912, 8913, 8910, - 0, 8192, 8704, 8960, 8896, 0, 8192, 8704, - 8960, 8896, 8912, 0, 8192, 8704, 8960, 8896, - 8912, 0, 8192, 8704, 8960, 8896, 8912, 8914, - 0, 8192, 8704, 8960, 8896, 8912, 0, 8192, - 8704, 8960, 8896, 8912, 8916, 0, 8192, 8704, - 8960, 8896, 8912, 8916, 0, 8192, 8704, 8960, - 8896, 8912, 8920, 8918, 0, 8192, 8704, 8960, - 8896, 8912, 0, 8192, 8704, 8960, 8896, 8928, - 8920, 0, 8192, 8704, 8960, 8896, 8928, 8920, - 0, 8192, 8704, 8960, 8896, 8928, 8920, 8922, - 0, 8192, 8704, 8960, 8896, 8928, 8920, 0, - 8192, 8704, 8960, 8896, 8928, 8929, 8924, 0, - 8192, 8704, 8960, 8896, 8928, 8929, 8924, 0, - 8192, 8704, 8960, 8896, 8928, 8929, 8924, 8926, - 0, 8192, 8704, 8960, 8896, 0, 8192, 8704, - 8960, 8961, 8928, 0, 8192, 8704, 8960, 8961, - 8928, 0, 8192, 8704, 8960, 8961, 8928, 8930, - 0, 8192, 8704, 8960, 8961, 8928, 0, 8192, - 8704, 8960, 8961, 8928, 8932, 0, 8192, 8704, - 8960, 8961, 8928, 8932, 0, 8192, 8704, 8960, - 8961, 8928, 8936, 8934, 0, 8192, 8704, 8960, - 8961, 8928, 0, 8192, 8704, 8960, 8961, 8928, - 8936, 0, 8192, 8704, 8960, 8961, 8928, 8936, - 0, 8192, 8704, 8960, 8961, 8928, 8936, 8938, - 0, 8192, 8704, 8960, 8961, 8928, 8936, 0, - 8192, 8704, 8960, 8961, 8928, 8944, 8940, 0, - 8192, 8704, 8960, 8961, 8928, 8944, 8940, 0, - 8192, 8704, 8960, 8961, 8928, 8944, 8945, 8942, - 0, 8192, 8704, 8960, 8961, 8928, 0, 8192, - 8704, 8960, 8961, 8928, 8944, 0, 8192, 8704, - 8960, 8961, 8963, 8944, 0, 8192, 8704, 8960, - 8961, 8963, 8944, 8946, 0, 8192, 8704, 8960, - 8961, 8963, 8944, 0, 8192, 8704, 8960, 8961, - 8963, 8944, 8948, 0, 8192, 8704, 8960, 8961, - 8963, 8944, 8948, 0, 8192, 8704, 8960, 8961, - 8963, 8944, 8952, 8950, 0, 8192, 8704, 8960, - 8961, 8963, 8944, 0, 8192, 8704, 8960, 8961, - 8963, 8944, 8952, 0, 8192, 8704, 8960, 8961, - 8963, 8944, 8952, 0, 8192, 8704, 8960, 8961, - 8963, 8944, 8952, 8954, 0, 8192, 8704, 8960, - 8961, 8963, 8967, 8952, 0, 8192, 8704, 8960, - 8961, 8963, 8967, 8952, 8956, 0, 8192, 8704, - 8960, 8961, 8963, 8967, 8952, 8956, 0, 8192, - 8704, 8960, 8961, 8963, 8967, 8952, 8956, 8958, - 0, 8192, 8704, 0, 8192, 9216, 8960, 0, - 8192, 9216, 8960, 0, 8192, 9216, 8960, 8962, - 0, 8192, 9216, 8960, 0, 8192, 9216, 8960, - 8964, 0, 8192, 9216, 8960, 8964, 0, 8192, - 9216, 8960, 8968, 8966, 0, 8192, 9216, 8960, - 0, 8192, 9216, 8960, 8968, 0, 8192, 9216, - 8960, 8968, 0, 8192, 9216, 8960, 8968, 8970, - 0, 8192, 9216, 8960, 8968, 0, 8192, 9216, - 8960, 8976, 8972, 0, 8192, 9216, 8960, 8976, - 8972, 0, 8192, 9216, 8960, 8976, 8977, 8974, - 0, 8192, 9216, 8960, 0, 8192, 9216, 8960, - 8976, 0, 8192, 9216, 8960, 8976, 0, 8192, - 9216, 8960, 8976, 8978, 0, 8192, 9216, 8960, - 8976, 0, 8192, 9216, 8960, 8976, 8980, 0, - 8192, 9216, 8960, 8976, 8980, 0, 8192, 9216, - 8960, 8976, 8984, 8982, 0, 8192, 9216, 8960, - 8976, 0, 8192, 9216, 8960, 8992, 8984, 0, - 8192, 9216, 8960, 8992, 8984, 0, 8192, 9216, - 8960, 8992, 8984, 8986, 0, 8192, 9216, 8960, - 8992, 8984, 0, 8192, 9216, 8960, 8992, 8993, - 8988, 0, 8192, 9216, 8960, 8992, 8993, 8988, - 0, 8192, 9216, 8960, 8992, 8993, 8988, 8990, - 0, 8192, 9216, 8960, 0, 8192, 9216, 8960, - 8992, 0, 8192, 9216, 8960, 8992, 0, 8192, - 9216, 8960, 8992, 8994, 0, 8192, 9216, 8960, - 8992, 0, 8192, 9216, 8960, 8992, 8996, 0, - 8192, 9216, 8960, 8992, 8996, 0, 8192, 9216, - 8960, 8992, 9000, 8998, 0, 8192, 9216, 8960, - 8992, 0, 8192, 9216, 8960, 8992, 9000, 0, - 8192, 9216, 8960, 8992, 9000, 0, 8192, 9216, - 8960, 8992, 9000, 9002, 0, 8192, 9216, 8960, - 8992, 9000, 0, 8192, 9216, 8960, 8992, 9008, - 9004, 0, 8192, 9216, 8960, 8992, 9008, 9004, - 0, 8192, 9216, 8960, 8992, 9008, 9009, 9006, - 0, 8192, 9216, 8960, 8992, 0, 8192, 9216, - 8960, 9024, 9008, 0, 8192, 9216, 8960, 9024, - 9008, 0, 8192, 9216, 8960, 9024, 9008, 9010, - 0, 8192, 9216, 8960, 9024, 9008, 0, 8192, - 9216, 8960, 9024, 9008, 9012, 0, 8192, 9216, - 8960, 9024, 9008, 9012, 0, 8192, 9216, 8960, - 9024, 9008, 9016, 9014, 0, 8192, 9216, 8960, - 9024, 9008, 0, 8192, 9216, 8960, 9024, 9025, - 9016, 0, 8192, 9216, 8960, 9024, 9025, 9016, - 0, 8192, 9216, 8960, 9024, 9025, 9016, 9018, - 0, 8192, 9216, 8960, 9024, 9025, 9016, 0, - 8192, 9216, 8960, 9024, 9025, 9016, 9020, 0, - 8192, 9216, 8960, 9024, 9025, 9027, 9020, 0, - 8192, 9216, 8960, 9024, 9025, 9027, 9020, 9022, - 0, 8192, 9216, 8960, 0, 8192, 9216, 8960, - 9024, 0, 8192, 9216, 8960, 9024, 0, 8192, - 9216, 8960, 9024, 9026, 0, 8192, 9216, 8960, - 9024, 0, 8192, 9216, 8960, 9024, 9028, 0, - 8192, 9216, 8960, 9024, 9028, 0, 8192, 9216, - 8960, 9024, 9032, 9030, 0, 8192, 9216, 8960, - 9024, 0, 8192, 9216, 8960, 9024, 9032, 0, - 8192, 9216, 8960, 9024, 9032, 0, 8192, 9216, - 8960, 9024, 9032, 9034, 0, 8192, 9216, 8960, - 9024, 9032, 0, 8192, 9216, 8960, 9024, 9040, - 9036, 0, 8192, 9216, 8960, 9024, 9040, 9036, - 0, 8192, 9216, 8960, 9024, 9040, 9041, 9038, - 0, 8192, 9216, 8960, 9024, 0, 8192, 9216, - 8960, 9024, 9040, 0, 8192, 9216, 8960, 9024, - 9040, 0, 8192, 9216, 8960, 9024, 9040, 9042, - 0, 8192, 9216, 8960, 9024, 9040, 0, 8192, - 9216, 8960, 9024, 9040, 9044, 0, 8192, 9216, - 8960, 9024, 9040, 9044, 0, 8192, 9216, 8960, - 9024, 9040, 9048, 9046, 0, 8192, 9216, 8960, - 9024, 9040, 0, 8192, 9216, 8960, 9024, 9056, - 9048, 0, 8192, 9216, 8960, 9024, 9056, 9048, - 0, 8192, 9216, 8960, 9024, 9056, 9048, 9050, - 0, 8192, 9216, 8960, 9024, 9056, 9048, 0, - 8192, 9216, 8960, 9024, 9056, 9057, 9052, 0, - 8192, 9216, 8960, 9024, 9056, 9057, 9052, 0, - 8192, 9216, 8960, 9024, 9056, 9057, 9052, 9054, - 0, 8192, 9216, 8960, 9024, 0, 8192, 9216, - 8960, 9088, 9056, 0, 8192, 9216, 8960, 9088, - 9056, 0, 8192, 9216, 8960, 9088, 9056, 9058, - 0, 8192, 9216, 8960, 9088, 9056, 0, 8192, - 9216, 8960, 9088, 9056, 9060, 0, 8192, 9216, - 8960, 9088, 9056, 9060, 0, 8192, 9216, 8960, - 9088, 9056, 9064, 9062, 0, 8192, 9216, 8960, - 9088, 9056, 0, 8192, 9216, 8960, 9088, 9056, - 9064, 0, 8192, 9216, 8960, 9088, 9056, 9064, - 0, 8192, 9216, 8960, 9088, 9056, 9064, 9066, - 0, 8192, 9216, 8960, 9088, 9056, 9064, 0, - 8192, 9216, 8960, 9088, 9056, 9072, 9068, 0, - 8192, 9216, 8960, 9088, 9056, 9072, 9068, 0, - 8192, 9216, 8960, 9088, 9056, 9072, 9073, 9070, - 0, 8192, 9216, 8960, 9088, 9056, 0, 8192, - 9216, 8960, 9088, 9089, 9072, 0, 8192, 9216, - 8960, 9088, 9089, 9072, 0, 8192, 9216, 8960, - 9088, 9089, 9072, 9074, 0, 8192, 9216, 8960, - 9088, 9089, 9072, 0, 8192, 9216, 8960, 9088, - 9089, 9072, 9076, 0, 8192, 9216, 8960, 9088, - 9089, 9072, 9076, 0, 8192, 9216, 8960, 9088, - 9089, 9072, 9080, 9078, 0, 8192, 9216, 8960, - 9088, 9089, 9072, 0, 8192, 9216, 8960, 9088, - 9089, 9072, 9080, 0, 8192, 9216, 8960, 9088, - 9089, 9091, 9080, 0, 8192, 9216, 8960, 9088, - 9089, 9091, 9080, 9082, 0, 8192, 9216, 8960, - 9088, 9089, 9091, 9080, 0, 8192, 9216, 8960, - 9088, 9089, 9091, 9080, 9084, 0, 8192, 9216, - 8960, 9088, 9089, 9091, 9080, 9084, 0, 8192, - 9216, 8960, 9088, 9089, 9091, 9080, 9084, 9086, - 0, 8192, 9216, 8960, 0, 8192, 9216, 8960, - 9088, 0, 8192, 9216, 9217, 9088, 0, 8192, - 9216, 9217, 9088, 9090, 0, 8192, 9216, 9217, - 9088, 0, 8192, 9216, 9217, 9088, 9092, 0, - 8192, 9216, 9217, 9088, 9092, 0, 8192, 9216, - 9217, 9088, 9096, 9094, 0, 8192, 9216, 9217, - 9088, 0, 8192, 9216, 9217, 9088, 9096, 0, - 8192, 9216, 9217, 9088, 9096, 0, 8192, 9216, - 9217, 9088, 9096, 9098, 0, 8192, 9216, 9217, - 9088, 9096, 0, 8192, 9216, 9217, 9088, 9104, - 9100, 0, 8192, 9216, 9217, 9088, 9104, 9100, - 0, 8192, 9216, 9217, 9088, 9104, 9105, 9102, - 0, 8192, 9216, 9217, 9088, 0, 8192, 9216, - 9217, 9088, 9104, 0, 8192, 9216, 9217, 9088, - 9104, 0, 8192, 9216, 9217, 9088, 9104, 9106, - 0, 8192, 9216, 9217, 9088, 9104, 0, 8192, - 9216, 9217, 9088, 9104, 9108, 0, 8192, 9216, - 9217, 9088, 9104, 9108, 0, 8192, 9216, 9217, - 9088, 9104, 9112, 9110, 0, 8192, 9216, 9217, - 9088, 9104, 0, 8192, 9216, 9217, 9088, 9120, - 9112, 0, 8192, 9216, 9217, 9088, 9120, 9112, - 0, 8192, 9216, 9217, 9088, 9120, 9112, 9114, - 0, 8192, 9216, 9217, 9088, 9120, 9112, 0, - 8192, 9216, 9217, 9088, 9120, 9121, 9116, 0, - 8192, 9216, 9217, 9088, 9120, 9121, 9116, 0, - 8192, 9216, 9217, 9088, 9120, 9121, 9116, 9118, - 0, 8192, 9216, 9217, 9088, 0, 8192, 9216, - 9217, 9088, 9120, 0, 8192, 9216, 9217, 9088, - 9120, 0, 8192, 9216, 9217, 9088, 9120, 9122, - 0, 8192, 9216, 9217, 9088, 9120, 0, 8192, - 9216, 9217, 9088, 9120, 9124, 0, 8192, 9216, - 9217, 9088, 9120, 9124, 0, 8192, 9216, 9217, - 9088, 9120, 9128, 9126, 0, 8192, 9216, 9217, - 9088, 9120, 0, 8192, 9216, 9217, 9088, 9120, - 9128, 0, 8192, 9216, 9217, 9088, 9120, 9128, - 0, 8192, 9216, 9217, 9088, 9120, 9128, 9130, - 0, 8192, 9216, 9217, 9088, 9120, 9128, 0, - 8192, 9216, 9217, 9088, 9120, 9136, 9132, 0, - 8192, 9216, 9217, 9088, 9120, 9136, 9132, 0, - 8192, 9216, 9217, 9088, 9120, 9136, 9137, 9134, - 0, 8192, 9216, 9217, 9088, 9120, 0, 8192, - 9216, 9217, 9088, 9152, 9136, 0, 8192, 9216, - 9217, 9088, 9152, 9136, 0, 8192, 9216, 9217, - 9088, 9152, 9136, 9138, 0, 8192, 9216, 9217, - 9088, 9152, 9136, 0, 8192, 9216, 9217, 9088, - 9152, 9136, 9140, 0, 8192, 9216, 9217, 9088, - 9152, 9136, 9140, 0, 8192, 9216, 9217, 9088, - 9152, 9136, 9144, 9142, 0, 8192, 9216, 9217, - 9088, 9152, 9136, 0, 8192, 9216, 9217, 9088, - 9152, 9153, 9144, 0, 8192, 9216, 9217, 9088, - 9152, 9153, 9144, 0, 8192, 9216, 9217, 9088, - 9152, 9153, 9144, 9146, 0, 8192, 9216, 9217, - 9088, 9152, 9153, 9144, 0, 8192, 9216, 9217, - 9088, 9152, 9153, 9144, 9148, 0, 8192, 9216, - 9217, 9088, 9152, 9153, 9155, 9148, 0, 8192, - 9216, 9217, 9088, 9152, 9153, 9155, 9148, 9150, - 0, 8192, 9216, 9217, 9088, 0, 8192, 9216, - 9217, 9088, 9152, 0, 8192, 9216, 9217, 9088, - 9152, 0, 8192, 9216, 9217, 9088, 9152, 9154, - 0, 8192, 9216, 9217, 9219, 9152, 0, 8192, - 9216, 9217, 9219, 9152, 9156, 0, 8192, 9216, - 9217, 9219, 9152, 9156, 0, 8192, 9216, 9217, - 9219, 9152, 9160, 9158, 0, 8192, 9216, 9217, - 9219, 9152, 0, 8192, 9216, 9217, 9219, 9152, - 9160, 0, 8192, 9216, 9217, 9219, 9152, 9160, - 0, 8192, 9216, 9217, 9219, 9152, 9160, 9162, - 0, 8192, 9216, 9217, 9219, 9152, 9160, 0, - 8192, 9216, 9217, 9219, 9152, 9168, 9164, 0, - 8192, 9216, 9217, 9219, 9152, 9168, 9164, 0, - 8192, 9216, 9217, 9219, 9152, 9168, 9169, 9166, - 0, 8192, 9216, 9217, 9219, 9152, 0, 8192, - 9216, 9217, 9219, 9152, 9168, 0, 8192, 9216, - 9217, 9219, 9152, 9168, 0, 8192, 9216, 9217, - 9219, 9152, 9168, 9170, 0, 8192, 9216, 9217, - 9219, 9152, 9168, 0, 8192, 9216, 9217, 9219, - 9152, 9168, 9172, 0, 8192, 9216, 9217, 9219, - 9152, 9168, 9172, 0, 8192, 9216, 9217, 9219, - 9152, 9168, 9176, 9174, 0, 8192, 9216, 9217, - 9219, 9152, 9168, 0, 8192, 9216, 9217, 9219, - 9152, 9184, 9176, 0, 8192, 9216, 9217, 9219, - 9152, 9184, 9176, 0, 8192, 9216, 9217, 9219, - 9152, 9184, 9176, 9178, 0, 8192, 9216, 9217, - 9219, 9152, 9184, 9176, 0, 8192, 9216, 9217, - 9219, 9152, 9184, 9185, 9180, 0, 8192, 9216, - 9217, 9219, 9152, 9184, 9185, 9180, 0, 8192, - 9216, 9217, 9219, 9152, 9184, 9185, 9180, 9182, - 0, 8192, 9216, 9217, 9219, 9152, 0, 8192, - 9216, 9217, 9219, 9152, 9184, 0, 8192, 9216, - 9217, 9219, 9152, 9184, 0, 8192, 9216, 9217, - 9219, 9152, 9184, 9186, 0, 8192, 9216, 9217, - 9219, 9152, 9184, 0, 8192, 9216, 9217, 9219, - 9152, 9184, 9188, 0, 8192, 9216, 9217, 9219, - 9152, 9184, 9188, 0, 8192, 9216, 9217, 9219, - 9152, 9184, 9192, 9190, 0, 8192, 9216, 9217, - 9219, 9223, 9184, 0, 8192, 9216, 9217, 9219, - 9223, 9184, 9192, 0, 8192, 9216, 9217, 9219, - 9223, 9184, 9192, 0, 8192, 9216, 9217, 9219, - 9223, 9184, 9192, 9194, 0, 8192, 9216, 9217, - 9219, 9223, 9184, 9192, 0, 8192, 9216, 9217, - 9219, 9223, 9184, 9200, 9196, 0, 8192, 9216, - 9217, 9219, 9223, 9184, 9200, 9196, 0, 8192, - 9216, 9217, 9219, 9223, 9184, 9200, 9201, 9198, - 0, 8192, 9216, 9217, 9219, 9223, 9184, 0, - 8192, 9216, 9217, 9219, 9223, 9184, 9200, 0, - 8192, 9216, 9217, 9219, 9223, 9184, 9200, 0, - 8192, 9216, 9217, 9219, 9223, 9184, 9200, 9202, - 0, 8192, 9216, 9217, 9219, 9223, 9184, 9200, - 0, 8192, 9216, 9217, 9219, 9223, 9184, 9200, - 9204, 0, 8192, 9216, 9217, 9219, 9223, 9184, - 9200, 9204, 0, 8192, 9216, 9217, 9219, 9223, - 9184, 9200, 9208, 9206, 0, 8192, 9216, 9217, - 9219, 9223, 9184, 9200, 0, 8192, 9216, 9217, - 9219, 9223, 9184, 9200, 9208, 0, 8192, 9216, - 9217, 9219, 9223, 9184, 9200, 9208, 0, 8192, - 9216, 9217, 9219, 9223, 9184, 9200, 9208, 9210, - 0, 8192, 9216, 9217, 9219, 9223, 9184, 9200, - 9208, 0, 8192, 9216, 9217, 9219, 9223, 9184, - 9200, 9208, 9212, 0, 8192, 9216, 9217, 9219, - 9223, 9184, 9200, 9208, 9212, 0, 8192, 9216, - 9217, 9219, 9223, 9184, 9200, 9208, 9212, 9214, - 0, 8192, 0, 8192, 9216, 0, 8192, 9216, - 0, 8192, 9216, 9218, 0, 8192, 9216, 0, - 8192, 9216, 9220, 0, 8192, 9216, 9220, 0, - 8192, 9216, 9224, 9222, 0, 8192, 9216, 0, - 8192, 9216, 9224, 0, 8192, 9216, 9224, 0, - 8192, 9216, 9224, 9226, 0, 8192, 9216, 9224, - 0, 8192, 9216, 9232, 9228, 0, 8192, 9216, - 9232, 9228, 0, 8192, 9216, 9232, 9233, 9230, - 0, 8192, 9216, 0, 8192, 9216, 9232, 0, - 8192, 9216, 9232, 0, 8192, 9216, 9232, 9234, - 0, 8192, 9216, 9232, 0, 8192, 9216, 9232, - 9236, 0, 8192, 9216, 9232, 9236, 0, 8192, - 9216, 9232, 9240, 9238, 0, 8192, 9216, 9232, - 0, 8192, 9216, 9248, 9240, 0, 8192, 9216, - 9248, 9240, 0, 8192, 9216, 9248, 9240, 9242, - 0, 8192, 9216, 9248, 9240, 0, 8192, 9216, - 9248, 9249, 9244, 0, 8192, 9216, 9248, 9249, - 9244, 0, 8192, 9216, 9248, 9249, 9244, 9246, - 0, 8192, 9216, 0, 8192, 9216, 9248, 0, - 8192, 9216, 9248, 0, 8192, 9216, 9248, 9250, - 0, 8192, 9216, 9248, 0, 8192, 9216, 9248, - 9252, 0, 8192, 9216, 9248, 9252, 0, 8192, - 9216, 9248, 9256, 9254, 0, 8192, 9216, 9248, - 0, 8192, 9216, 9248, 9256, 0, 8192, 9216, - 9248, 9256, 0, 8192, 9216, 9248, 9256, 9258, - 0, 8192, 9216, 9248, 9256, 0, 8192, 9216, - 9248, 9264, 9260, 0, 8192, 9216, 9248, 9264, - 9260, 0, 8192, 9216, 9248, 9264, 9265, 9262, - 0, 8192, 9216, 9248, 0, 8192, 9216, 9280, - 9264, 0, 8192, 9216, 9280, 9264, 0, 8192, - 9216, 9280, 9264, 9266, 0, 8192, 9216, 9280, - 9264, 0, 8192, 9216, 9280, 9264, 9268, 0, - 8192, 9216, 9280, 9264, 9268, 0, 8192, 9216, - 9280, 9264, 9272, 9270, 0, 8192, 9216, 9280, - 9264, 0, 8192, 9216, 9280, 9281, 9272, 0, - 8192, 9216, 9280, 9281, 9272, 0, 8192, 9216, - 9280, 9281, 9272, 9274, 0, 8192, 9216, 9280, - 9281, 9272, 0, 8192, 9216, 9280, 9281, 9272, - 9276, 0, 8192, 9216, 9280, 9281, 9283, 9276, - 0, 8192, 9216, 9280, 9281, 9283, 9276, 9278, - 0, 8192, 9216, 0, 8192, 9216, 9280, 0, - 8192, 9216, 9280, 0, 8192, 9216, 9280, 9282, - 0, 8192, 9216, 9280, 0, 8192, 9216, 9280, - 9284, 0, 8192, 9216, 9280, 9284, 0, 8192, - 9216, 9280, 9288, 9286, 0, 8192, 9216, 9280, - 0, 8192, 9216, 9280, 9288, 0, 8192, 9216, - 9280, 9288, 0, 8192, 9216, 9280, 9288, 9290, - 0, 8192, 9216, 9280, 9288, 0, 8192, 9216, - 9280, 9296, 9292, 0, 8192, 9216, 9280, 9296, - 9292, 0, 8192, 9216, 9280, 9296, 9297, 9294, - 0, 8192, 9216, 9280, 0, 8192, 9216, 9280, - 9296, 0, 8192, 9216, 9280, 9296, 0, 8192, - 9216, 9280, 9296, 9298, 0, 8192, 9216, 9280, - 9296, 0, 8192, 9216, 9280, 9296, 9300, 0, - 8192, 9216, 9280, 9296, 9300, 0, 8192, 9216, - 9280, 9296, 9304, 9302, 0, 8192, 9216, 9280, - 9296, 0, 8192, 9216, 9280, 9312, 9304, 0, - 8192, 9216, 9280, 9312, 9304, 0, 8192, 9216, - 9280, 9312, 9304, 9306, 0, 8192, 9216, 9280, - 9312, 9304, 0, 8192, 9216, 9280, 9312, 9313, - 9308, 0, 8192, 9216, 9280, 9312, 9313, 9308, - 0, 8192, 9216, 9280, 9312, 9313, 9308, 9310, - 0, 8192, 9216, 9280, 0, 8192, 9216, 9344, - 9312, 0, 8192, 9216, 9344, 9312, 0, 8192, - 9216, 9344, 9312, 9314, 0, 8192, 9216, 9344, - 9312, 0, 8192, 9216, 9344, 9312, 9316, 0, - 8192, 9216, 9344, 9312, 9316, 0, 8192, 9216, - 9344, 9312, 9320, 9318, 0, 8192, 9216, 9344, - 9312, 0, 8192, 9216, 9344, 9312, 9320, 0, - 8192, 9216, 9344, 9312, 9320, 0, 8192, 9216, - 9344, 9312, 9320, 9322, 0, 8192, 9216, 9344, - 9312, 9320, 0, 8192, 9216, 9344, 9312, 9328, - 9324, 0, 8192, 9216, 9344, 9312, 9328, 9324, - 0, 8192, 9216, 9344, 9312, 9328, 9329, 9326, - 0, 8192, 9216, 9344, 9312, 0, 8192, 9216, - 9344, 9345, 9328, 0, 8192, 9216, 9344, 9345, - 9328, 0, 8192, 9216, 9344, 9345, 9328, 9330, - 0, 8192, 9216, 9344, 9345, 9328, 0, 8192, - 9216, 9344, 9345, 9328, 9332, 0, 8192, 9216, - 9344, 9345, 9328, 9332, 0, 8192, 9216, 9344, - 9345, 9328, 9336, 9334, 0, 8192, 9216, 9344, - 9345, 9328, 0, 8192, 9216, 9344, 9345, 9328, - 9336, 0, 8192, 9216, 9344, 9345, 9347, 9336, - 0, 8192, 9216, 9344, 9345, 9347, 9336, 9338, - 0, 8192, 9216, 9344, 9345, 9347, 9336, 0, - 8192, 9216, 9344, 9345, 9347, 9336, 9340, 0, - 8192, 9216, 9344, 9345, 9347, 9336, 9340, 0, - 8192, 9216, 9344, 9345, 9347, 9336, 9340, 9342, - 0, 8192, 9216, 0, 8192, 9216, 9344, 0, - 8192, 9216, 9344, 0, 8192, 9216, 9344, 9346, - 0, 8192, 9216, 9344, 0, 8192, 9216, 9344, - 9348, 0, 8192, 9216, 9344, 9348, 0, 8192, - 9216, 9344, 9352, 9350, 0, 8192, 9216, 9344, - 0, 8192, 9216, 9344, 9352, 0, 8192, 9216, - 9344, 9352, 0, 8192, 9216, 9344, 9352, 9354, - 0, 8192, 9216, 9344, 9352, 0, 8192, 9216, - 9344, 9360, 9356, 0, 8192, 9216, 9344, 9360, - 9356, 0, 8192, 9216, 9344, 9360, 9361, 9358, - 0, 8192, 9216, 9344, 0, 8192, 9216, 9344, - 9360, 0, 8192, 9216, 9344, 9360, 0, 8192, - 9216, 9344, 9360, 9362, 0, 8192, 9216, 9344, - 9360, 0, 8192, 9216, 9344, 9360, 9364, 0, - 8192, 9216, 9344, 9360, 9364, 0, 8192, 9216, - 9344, 9360, 9368, 9366, 0, 8192, 9216, 9344, - 9360, 0, 8192, 9216, 9344, 9376, 9368, 0, - 8192, 9216, 9344, 9376, 9368, 0, 8192, 9216, - 9344, 9376, 9368, 9370, 0, 8192, 9216, 9344, - 9376, 9368, 0, 8192, 9216, 9344, 9376, 9377, - 9372, 0, 8192, 9216, 9344, 9376, 9377, 9372, - 0, 8192, 9216, 9344, 9376, 9377, 9372, 9374, - 0, 8192, 9216, 9344, 0, 8192, 9216, 9344, - 9376, 0, 8192, 9216, 9344, 9376, 0, 8192, - 9216, 9344, 9376, 9378, 0, 8192, 9216, 9344, - 9376, 0, 8192, 9216, 9344, 9376, 9380, 0, - 8192, 9216, 9344, 9376, 9380, 0, 8192, 9216, - 9344, 9376, 9384, 9382, 0, 8192, 9216, 9344, - 9376, 0, 8192, 9216, 9344, 9376, 9384, 0, - 8192, 9216, 9344, 9376, 9384, 0, 8192, 9216, - 9344, 9376, 9384, 9386, 0, 8192, 9216, 9344, - 9376, 9384, 0, 8192, 9216, 9344, 9376, 9392, - 9388, 0, 8192, 9216, 9344, 9376, 9392, 9388, - 0, 8192, 9216, 9344, 9376, 9392, 9393, 9390, - 0, 8192, 9216, 9344, 9376, 0, 8192, 9216, - 9344, 9408, 9392, 0, 8192, 9216, 9344, 9408, - 9392, 0, 8192, 9216, 9344, 9408, 9392, 9394, - 0, 8192, 9216, 9344, 9408, 9392, 0, 8192, - 9216, 9344, 9408, 9392, 9396, 0, 8192, 9216, - 9344, 9408, 9392, 9396, 0, 8192, 9216, 9344, - 9408, 9392, 9400, 9398, 0, 8192, 9216, 9344, - 9408, 9392, 0, 8192, 9216, 9344, 9408, 9409, - 9400, 0, 8192, 9216, 9344, 9408, 9409, 9400, - 0, 8192, 9216, 9344, 9408, 9409, 9400, 9402, - 0, 8192, 9216, 9344, 9408, 9409, 9400, 0, - 8192, 9216, 9344, 9408, 9409, 9400, 9404, 0, - 8192, 9216, 9344, 9408, 9409, 9411, 9404, 0, - 8192, 9216, 9344, 9408, 9409, 9411, 9404, 9406, - 0, 8192, 9216, 9344, 0, 8192, 9216, 9472, - 9408, 0, 8192, 9216, 9472, 9408, 0, 8192, - 9216, 9472, 9408, 9410, 0, 8192, 9216, 9472, - 9408, 0, 8192, 9216, 9472, 9408, 9412, 0, - 8192, 9216, 9472, 9408, 9412, 0, 8192, 9216, - 9472, 9408, 9416, 9414, 0, 8192, 9216, 9472, - 9408, 0, 8192, 9216, 9472, 9408, 9416, 0, - 8192, 9216, 9472, 9408, 9416, 0, 8192, 9216, - 9472, 9408, 9416, 9418, 0, 8192, 9216, 9472, - 9408, 9416, 0, 8192, 9216, 9472, 9408, 9424, - 9420, 0, 8192, 9216, 9472, 9408, 9424, 9420, - 0, 8192, 9216, 9472, 9408, 9424, 9425, 9422, - 0, 8192, 9216, 9472, 9408, 0, 8192, 9216, - 9472, 9408, 9424, 0, 8192, 9216, 9472, 9408, - 9424, 0, 8192, 9216, 9472, 9408, 9424, 9426, - 0, 8192, 9216, 9472, 9408, 9424, 0, 8192, - 9216, 9472, 9408, 9424, 9428, 0, 8192, 9216, - 9472, 9408, 9424, 9428, 0, 8192, 9216, 9472, - 9408, 9424, 9432, 9430, 0, 8192, 9216, 9472, - 9408, 9424, 0, 8192, 9216, 9472, 9408, 9440, - 9432, 0, 8192, 9216, 9472, 9408, 9440, 9432, - 0, 8192, 9216, 9472, 9408, 9440, 9432, 9434, - 0, 8192, 9216, 9472, 9408, 9440, 9432, 0, - 8192, 9216, 9472, 9408, 9440, 9441, 9436, 0, - 8192, 9216, 9472, 9408, 9440, 9441, 9436, 0, - 8192, 9216, 9472, 9408, 9440, 9441, 9436, 9438, - 0, 8192, 9216, 9472, 9408, 0, 8192, 9216, - 9472, 9473, 9440, 0, 8192, 9216, 9472, 9473, - 9440, 0, 8192, 9216, 9472, 9473, 9440, 9442, - 0, 8192, 9216, 9472, 9473, 9440, 0, 8192, - 9216, 9472, 9473, 9440, 9444, 0, 8192, 9216, - 9472, 9473, 9440, 9444, 0, 8192, 9216, 9472, - 9473, 9440, 9448, 9446, 0, 8192, 9216, 9472, - 9473, 9440, 0, 8192, 9216, 9472, 9473, 9440, - 9448, 0, 8192, 9216, 9472, 9473, 9440, 9448, - 0, 8192, 9216, 9472, 9473, 9440, 9448, 9450, - 0, 8192, 9216, 9472, 9473, 9440, 9448, 0, - 8192, 9216, 9472, 9473, 9440, 9456, 9452, 0, - 8192, 9216, 9472, 9473, 9440, 9456, 9452, 0, - 8192, 9216, 9472, 9473, 9440, 9456, 9457, 9454, - 0, 8192, 9216, 9472, 9473, 9440, 0, 8192, - 9216, 9472, 9473, 9440, 9456, 0, 8192, 9216, - 9472, 9473, 9475, 9456, 0, 8192, 9216, 9472, - 9473, 9475, 9456, 9458, 0, 8192, 9216, 9472, - 9473, 9475, 9456, 0, 8192, 9216, 9472, 9473, - 9475, 9456, 9460, 0, 8192, 9216, 9472, 9473, - 9475, 9456, 9460, 0, 8192, 9216, 9472, 9473, - 9475, 9456, 9464, 9462, 0, 8192, 9216, 9472, - 9473, 9475, 9456, 0, 8192, 9216, 9472, 9473, - 9475, 9456, 9464, 0, 8192, 9216, 9472, 9473, - 9475, 9456, 9464, 0, 8192, 9216, 9472, 9473, - 9475, 9456, 9464, 9466, 0, 8192, 9216, 9472, - 9473, 9475, 9479, 9464, 0, 8192, 9216, 9472, - 9473, 9475, 9479, 9464, 9468, 0, 8192, 9216, - 9472, 9473, 9475, 9479, 9464, 9468, 0, 8192, - 9216, 9472, 9473, 9475, 9479, 9464, 9468, 9470, - 0, 8192, 9216, 0, 8192, 9216, 9472, 0, - 8192, 9216, 9472, 0, 8192, 9216, 9472, 9474, - 0, 8192, 9216, 9472, 0, 8192, 9216, 9472, - 9476, 0, 8192, 9216, 9472, 9476, 0, 8192, - 9216, 9472, 9480, 9478, 0, 8192, 9216, 9472, - 0, 8192, 9216, 9472, 9480, 0, 8192, 9216, - 9472, 9480, 0, 8192, 9216, 9472, 9480, 9482, - 0, 8192, 9216, 9472, 9480, 0, 8192, 9216, - 9472, 9488, 9484, 0, 8192, 9216, 9472, 9488, - 9484, 0, 8192, 9216, 9472, 9488, 9489, 9486, - 0, 8192, 9216, 9472, 0, 8192, 9216, 9472, - 9488, 0, 8192, 9216, 9472, 9488, 0, 8192, - 9216, 9472, 9488, 9490, 0, 8192, 9216, 9472, - 9488, 0, 8192, 9216, 9472, 9488, 9492, 0, - 8192, 9216, 9472, 9488, 9492, 0, 8192, 9216, - 9472, 9488, 9496, 9494, 0, 8192, 9216, 9472, - 9488, 0, 8192, 9216, 9472, 9504, 9496, 0, - 8192, 9216, 9472, 9504, 9496, 0, 8192, 9216, - 9472, 9504, 9496, 9498, 0, 8192, 9216, 9472, - 9504, 9496, 0, 8192, 9216, 9472, 9504, 9505, - 9500, 0, 8192, 9216, 9472, 9504, 9505, 9500, - 0, 8192, 9216, 9472, 9504, 9505, 9500, 9502, - 0, 8192, 9216, 9472, 0, 8192, 9216, 9472, - 9504, 0, 8192, 9216, 9472, 9504, 0, 8192, - 9216, 9472, 9504, 9506, 0, 8192, 9216, 9472, - 9504, 0, 8192, 9216, 9472, 9504, 9508, 0, - 8192, 9216, 9472, 9504, 9508, 0, 8192, 9216, - 9472, 9504, 9512, 9510, 0, 8192, 9216, 9472, - 9504, 0, 8192, 9216, 9472, 9504, 9512, 0, - 8192, 9216, 9472, 9504, 9512, 0, 8192, 9216, - 9472, 9504, 9512, 9514, 0, 8192, 9216, 9472, - 9504, 9512, 0, 8192, 9216, 9472, 9504, 9520, - 9516, 0, 8192, 9216, 9472, 9504, 9520, 9516, - 0, 8192, 9216, 9472, 9504, 9520, 9521, 9518, - 0, 8192, 9216, 9472, 9504, 0, 8192, 9216, - 9472, 9536, 9520, 0, 8192, 9216, 9472, 9536, - 9520, 0, 8192, 9216, 9472, 9536, 9520, 9522, - 0, 8192, 9216, 9472, 9536, 9520, 0, 8192, - 9216, 9472, 9536, 9520, 9524, 0, 8192, 9216, - 9472, 9536, 9520, 9524, 0, 8192, 9216, 9472, - 9536, 9520, 9528, 9526, 0, 8192, 9216, 9472, - 9536, 9520, 0, 8192, 9216, 9472, 9536, 9537, - 9528, 0, 8192, 9216, 9472, 9536, 9537, 9528, - 0, 8192, 9216, 9472, 9536, 9537, 9528, 9530, - 0, 8192, 9216, 9472, 9536, 9537, 9528, 0, - 8192, 9216, 9472, 9536, 9537, 9528, 9532, 0, - 8192, 9216, 9472, 9536, 9537, 9539, 9532, 0, - 8192, 9216, 9472, 9536, 9537, 9539, 9532, 9534, - 0, 8192, 9216, 9472, 0, 8192, 9216, 9472, - 9536, 0, 8192, 9216, 9472, 9536, 0, 8192, - 9216, 9472, 9536, 9538, 0, 8192, 9216, 9472, - 9536, 0, 8192, 9216, 9472, 9536, 9540, 0, - 8192, 9216, 9472, 9536, 9540, 0, 8192, 9216, - 9472, 9536, 9544, 9542, 0, 8192, 9216, 9472, - 9536, 0, 8192, 9216, 9472, 9536, 9544, 0, - 8192, 9216, 9472, 9536, 9544, 0, 8192, 9216, - 9472, 9536, 9544, 9546, 0, 8192, 9216, 9472, - 9536, 9544, 0, 8192, 9216, 9472, 9536, 9552, - 9548, 0, 8192, 9216, 9472, 9536, 9552, 9548, - 0, 8192, 9216, 9472, 9536, 9552, 9553, 9550, - 0, 8192, 9216, 9472, 9536, 0, 8192, 9216, - 9472, 9536, 9552, 0, 8192, 9216, 9472, 9536, - 9552, 0, 8192, 9216, 9472, 9536, 9552, 9554, - 0, 8192, 9216, 9472, 9536, 9552, 0, 8192, - 9216, 9472, 9536, 9552, 9556, 0, 8192, 9216, - 9472, 9536, 9552, 9556, 0, 8192, 9216, 9472, - 9536, 9552, 9560, 9558, 0, 8192, 9216, 9472, - 9536, 9552, 0, 8192, 9216, 9472, 9536, 9568, - 9560, 0, 8192, 9216, 9472, 9536, 9568, 9560, - 0, 8192, 9216, 9472, 9536, 9568, 9560, 9562, - 0, 8192, 9216, 9472, 9536, 9568, 9560, 0, - 8192, 9216, 9472, 9536, 9568, 9569, 9564, 0, - 8192, 9216, 9472, 9536, 9568, 9569, 9564, 0, - 8192, 9216, 9472, 9536, 9568, 9569, 9564, 9566, - 0, 8192, 9216, 9472, 9536, 0, 8192, 9216, - 9472, 9600, 9568, 0, 8192, 9216, 9472, 9600, - 9568, 0, 8192, 9216, 9472, 9600, 9568, 9570, - 0, 8192, 9216, 9472, 9600, 9568, 0, 8192, - 9216, 9472, 9600, 9568, 9572, 0, 8192, 9216, - 9472, 9600, 9568, 9572, 0, 8192, 9216, 9472, - 9600, 9568, 9576, 9574, 0, 8192, 9216, 9472, - 9600, 9568, 0, 8192, 9216, 9472, 9600, 9568, - 9576, 0, 8192, 9216, 9472, 9600, 9568, 9576, - 0, 8192, 9216, 9472, 9600, 9568, 9576, 9578, - 0, 8192, 9216, 9472, 9600, 9568, 9576, 0, - 8192, 9216, 9472, 9600, 9568, 9584, 9580, 0, - 8192, 9216, 9472, 9600, 9568, 9584, 9580, 0, - 8192, 9216, 9472, 9600, 9568, 9584, 9585, 9582, - 0, 8192, 9216, 9472, 9600, 9568, 0, 8192, - 9216, 9472, 9600, 9601, 9584, 0, 8192, 9216, - 9472, 9600, 9601, 9584, 0, 8192, 9216, 9472, - 9600, 9601, 9584, 9586, 0, 8192, 9216, 9472, - 9600, 9601, 9584, 0, 8192, 9216, 9472, 9600, - 9601, 9584, 9588, 0, 8192, 9216, 9472, 9600, - 9601, 9584, 9588, 0, 8192, 9216, 9472, 9600, - 9601, 9584, 9592, 9590, 0, 8192, 9216, 9472, - 9600, 9601, 9584, 0, 8192, 9216, 9472, 9600, - 9601, 9584, 9592, 0, 8192, 9216, 9472, 9600, - 9601, 9603, 9592, 0, 8192, 9216, 9472, 9600, - 9601, 9603, 9592, 9594, 0, 8192, 9216, 9472, - 9600, 9601, 9603, 9592, 0, 8192, 9216, 9472, - 9600, 9601, 9603, 9592, 9596, 0, 8192, 9216, - 9472, 9600, 9601, 9603, 9592, 9596, 0, 8192, - 9216, 9472, 9600, 9601, 9603, 9592, 9596, 9598, - 0, 8192, 9216, 9472, 0, 8192, 9216, 9728, - 9600, 0, 8192, 9216, 9728, 9600, 0, 8192, - 9216, 9728, 9600, 9602, 0, 8192, 9216, 9728, - 9600, 0, 8192, 9216, 9728, 9600, 9604, 0, - 8192, 9216, 9728, 9600, 9604, 0, 8192, 9216, - 9728, 9600, 9608, 9606, 0, 8192, 9216, 9728, - 9600, 0, 8192, 9216, 9728, 9600, 9608, 0, - 8192, 9216, 9728, 9600, 9608, 0, 8192, 9216, - 9728, 9600, 9608, 9610, 0, 8192, 9216, 9728, - 9600, 9608, 0, 8192, 9216, 9728, 9600, 9616, - 9612, 0, 8192, 9216, 9728, 9600, 9616, 9612, - 0, 8192, 9216, 9728, 9600, 9616, 9617, 9614, - 0, 8192, 9216, 9728, 9600, 0, 8192, 9216, - 9728, 9600, 9616, 0, 8192, 9216, 9728, 9600, - 9616, 0, 8192, 9216, 9728, 9600, 9616, 9618, - 0, 8192, 9216, 9728, 9600, 9616, 0, 8192, - 9216, 9728, 9600, 9616, 9620, 0, 8192, 9216, - 9728, 9600, 9616, 9620, 0, 8192, 9216, 9728, - 9600, 9616, 9624, 9622, 0, 8192, 9216, 9728, - 9600, 9616, 0, 8192, 9216, 9728, 9600, 9632, - 9624, 0, 8192, 9216, 9728, 9600, 9632, 9624, - 0, 8192, 9216, 9728, 9600, 9632, 9624, 9626, - 0, 8192, 9216, 9728, 9600, 9632, 9624, 0, - 8192, 9216, 9728, 9600, 9632, 9633, 9628, 0, - 8192, 9216, 9728, 9600, 9632, 9633, 9628, 0, - 8192, 9216, 9728, 9600, 9632, 9633, 9628, 9630, - 0, 8192, 9216, 9728, 9600, 0, 8192, 9216, - 9728, 9600, 9632, 0, 8192, 9216, 9728, 9600, - 9632, 0, 8192, 9216, 9728, 9600, 9632, 9634, - 0, 8192, 9216, 9728, 9600, 9632, 0, 8192, - 9216, 9728, 9600, 9632, 9636, 0, 8192, 9216, - 9728, 9600, 9632, 9636, 0, 8192, 9216, 9728, - 9600, 9632, 9640, 9638, 0, 8192, 9216, 9728, - 9600, 9632, 0, 8192, 9216, 9728, 9600, 9632, - 9640, 0, 8192, 9216, 9728, 9600, 9632, 9640, - 0, 8192, 9216, 9728, 9600, 9632, 9640, 9642, - 0, 8192, 9216, 9728, 9600, 9632, 9640, 0, - 8192, 9216, 9728, 9600, 9632, 9648, 9644, 0, - 8192, 9216, 9728, 9600, 9632, 9648, 9644, 0, - 8192, 9216, 9728, 9600, 9632, 9648, 9649, 9646, - 0, 8192, 9216, 9728, 9600, 9632, 0, 8192, - 9216, 9728, 9600, 9664, 9648, 0, 8192, 9216, - 9728, 9600, 9664, 9648, 0, 8192, 9216, 9728, - 9600, 9664, 9648, 9650, 0, 8192, 9216, 9728, - 9600, 9664, 9648, 0, 8192, 9216, 9728, 9600, - 9664, 9648, 9652, 0, 8192, 9216, 9728, 9600, - 9664, 9648, 9652, 0, 8192, 9216, 9728, 9600, - 9664, 9648, 9656, 9654, 0, 8192, 9216, 9728, - 9600, 9664, 9648, 0, 8192, 9216, 9728, 9600, - 9664, 9665, 9656, 0, 8192, 9216, 9728, 9600, - 9664, 9665, 9656, 0, 8192, 9216, 9728, 9600, - 9664, 9665, 9656, 9658, 0, 8192, 9216, 9728, - 9600, 9664, 9665, 9656, 0, 8192, 9216, 9728, - 9600, 9664, 9665, 9656, 9660, 0, 8192, 9216, - 9728, 9600, 9664, 9665, 9667, 9660, 0, 8192, - 9216, 9728, 9600, 9664, 9665, 9667, 9660, 9662, - 0, 8192, 9216, 9728, 9600, 0, 8192, 9216, - 9728, 9729, 9664, 0, 8192, 9216, 9728, 9729, - 9664, 0, 8192, 9216, 9728, 9729, 9664, 9666, - 0, 8192, 9216, 9728, 9729, 9664, 0, 8192, - 9216, 9728, 9729, 9664, 9668, 0, 8192, 9216, - 9728, 9729, 9664, 9668, 0, 8192, 9216, 9728, - 9729, 9664, 9672, 9670, 0, 8192, 9216, 9728, - 9729, 9664, 0, 8192, 9216, 9728, 9729, 9664, - 9672, 0, 8192, 9216, 9728, 9729, 9664, 9672, - 0, 8192, 9216, 9728, 9729, 9664, 9672, 9674, - 0, 8192, 9216, 9728, 9729, 9664, 9672, 0, - 8192, 9216, 9728, 9729, 9664, 9680, 9676, 0, - 8192, 9216, 9728, 9729, 9664, 9680, 9676, 0, - 8192, 9216, 9728, 9729, 9664, 9680, 9681, 9678, - 0, 8192, 9216, 9728, 9729, 9664, 0, 8192, - 9216, 9728, 9729, 9664, 9680, 0, 8192, 9216, - 9728, 9729, 9664, 9680, 0, 8192, 9216, 9728, - 9729, 9664, 9680, 9682, 0, 8192, 9216, 9728, - 9729, 9664, 9680, 0, 8192, 9216, 9728, 9729, - 9664, 9680, 9684, 0, 8192, 9216, 9728, 9729, - 9664, 9680, 9684, 0, 8192, 9216, 9728, 9729, - 9664, 9680, 9688, 9686, 0, 8192, 9216, 9728, - 9729, 9664, 9680, 0, 8192, 9216, 9728, 9729, - 9664, 9696, 9688, 0, 8192, 9216, 9728, 9729, - 9664, 9696, 9688, 0, 8192, 9216, 9728, 9729, - 9664, 9696, 9688, 9690, 0, 8192, 9216, 9728, - 9729, 9664, 9696, 9688, 0, 8192, 9216, 9728, - 9729, 9664, 9696, 9697, 9692, 0, 8192, 9216, - 9728, 9729, 9664, 9696, 9697, 9692, 0, 8192, - 9216, 9728, 9729, 9664, 9696, 9697, 9692, 9694, - 0, 8192, 9216, 9728, 9729, 9664, 0, 8192, - 9216, 9728, 9729, 9664, 9696, 0, 8192, 9216, - 9728, 9729, 9731, 9696, 0, 8192, 9216, 9728, - 9729, 9731, 9696, 9698, 0, 8192, 9216, 9728, - 9729, 9731, 9696, 0, 8192, 9216, 9728, 9729, - 9731, 9696, 9700, 0, 8192, 9216, 9728, 9729, - 9731, 9696, 9700, 0, 8192, 9216, 9728, 9729, - 9731, 9696, 9704, 9702, 0, 8192, 9216, 9728, - 9729, 9731, 9696, 0, 8192, 9216, 9728, 9729, - 9731, 9696, 9704, 0, 8192, 9216, 9728, 9729, - 9731, 9696, 9704, 0, 8192, 9216, 9728, 9729, - 9731, 9696, 9704, 9706, 0, 8192, 9216, 9728, - 9729, 9731, 9696, 9704, 0, 8192, 9216, 9728, - 9729, 9731, 9696, 9712, 9708, 0, 8192, 9216, - 9728, 9729, 9731, 9696, 9712, 9708, 0, 8192, - 9216, 9728, 9729, 9731, 9696, 9712, 9713, 9710, - 0, 8192, 9216, 9728, 9729, 9731, 9696, 0, - 8192, 9216, 9728, 9729, 9731, 9696, 9712, 0, - 8192, 9216, 9728, 9729, 9731, 9696, 9712, 0, - 8192, 9216, 9728, 9729, 9731, 9696, 9712, 9714, - 0, 8192, 9216, 9728, 9729, 9731, 9735, 9712, - 0, 8192, 9216, 9728, 9729, 9731, 9735, 9712, - 9716, 0, 8192, 9216, 9728, 9729, 9731, 9735, - 9712, 9716, 0, 8192, 9216, 9728, 9729, 9731, - 9735, 9712, 9720, 9718, 0, 8192, 9216, 9728, - 9729, 9731, 9735, 9712, 0, 8192, 9216, 9728, - 9729, 9731, 9735, 9712, 9720, 0, 8192, 9216, - 9728, 9729, 9731, 9735, 9712, 9720, 0, 8192, - 9216, 9728, 9729, 9731, 9735, 9712, 9720, 9722, - 0, 8192, 9216, 9728, 9729, 9731, 9735, 9712, - 9720, 0, 8192, 9216, 9728, 9729, 9731, 9735, - 9712, 9720, 9724, 0, 8192, 9216, 9728, 9729, - 9731, 9735, 9712, 9720, 9724, 0, 8192, 9216, - 9728, 9729, 9731, 9735, 9712, 9720, 9724, 9726, - 0, 8192, 9216, 0, 8192, 10240, 9728, 0, - 8192, 10240, 9728, 0, 8192, 10240, 9728, 9730, - 0, 8192, 10240, 9728, 0, 8192, 10240, 9728, - 9732, 0, 8192, 10240, 9728, 9732, 0, 8192, - 10240, 9728, 9736, 9734, 0, 8192, 10240, 9728, - 0, 8192, 10240, 9728, 9736, 0, 8192, 10240, - 9728, 9736, 0, 8192, 10240, 9728, 9736, 9738, - 0, 8192, 10240, 9728, 9736, 0, 8192, 10240, - 9728, 9744, 9740, 0, 8192, 10240, 9728, 9744, - 9740, 0, 8192, 10240, 9728, 9744, 9745, 9742, - 0, 8192, 10240, 9728, 0, 8192, 10240, 9728, - 9744, 0, 8192, 10240, 9728, 9744, 0, 8192, - 10240, 9728, 9744, 9746, 0, 8192, 10240, 9728, - 9744, 0, 8192, 10240, 9728, 9744, 9748, 0, - 8192, 10240, 9728, 9744, 9748, 0, 8192, 10240, - 9728, 9744, 9752, 9750, 0, 8192, 10240, 9728, - 9744, 0, 8192, 10240, 9728, 9760, 9752, 0, - 8192, 10240, 9728, 9760, 9752, 0, 8192, 10240, - 9728, 9760, 9752, 9754, 0, 8192, 10240, 9728, - 9760, 9752, 0, 8192, 10240, 9728, 9760, 9761, - 9756, 0, 8192, 10240, 9728, 9760, 9761, 9756, - 0, 8192, 10240, 9728, 9760, 9761, 9756, 9758, - 0, 8192, 10240, 9728, 0, 8192, 10240, 9728, - 9760, 0, 8192, 10240, 9728, 9760, 0, 8192, - 10240, 9728, 9760, 9762, 0, 8192, 10240, 9728, - 9760, 0, 8192, 10240, 9728, 9760, 9764, 0, - 8192, 10240, 9728, 9760, 9764, 0, 8192, 10240, - 9728, 9760, 9768, 9766, 0, 8192, 10240, 9728, - 9760, 0, 8192, 10240, 9728, 9760, 9768, 0, - 8192, 10240, 9728, 9760, 9768, 0, 8192, 10240, - 9728, 9760, 9768, 9770, 0, 8192, 10240, 9728, - 9760, 9768, 0, 8192, 10240, 9728, 9760, 9776, - 9772, 0, 8192, 10240, 9728, 9760, 9776, 9772, - 0, 8192, 10240, 9728, 9760, 9776, 9777, 9774, - 0, 8192, 10240, 9728, 9760, 0, 8192, 10240, - 9728, 9792, 9776, 0, 8192, 10240, 9728, 9792, - 9776, 0, 8192, 10240, 9728, 9792, 9776, 9778, - 0, 8192, 10240, 9728, 9792, 9776, 0, 8192, - 10240, 9728, 9792, 9776, 9780, 0, 8192, 10240, - 9728, 9792, 9776, 9780, 0, 8192, 10240, 9728, - 9792, 9776, 9784, 9782, 0, 8192, 10240, 9728, - 9792, 9776, 0, 8192, 10240, 9728, 9792, 9793, - 9784, 0, 8192, 10240, 9728, 9792, 9793, 9784, - 0, 8192, 10240, 9728, 9792, 9793, 9784, 9786, - 0, 8192, 10240, 9728, 9792, 9793, 9784, 0, - 8192, 10240, 9728, 9792, 9793, 9784, 9788, 0, - 8192, 10240, 9728, 9792, 9793, 9795, 9788, 0, - 8192, 10240, 9728, 9792, 9793, 9795, 9788, 9790, - 0, 8192, 10240, 9728, 0, 8192, 10240, 9728, - 9792, 0, 8192, 10240, 9728, 9792, 0, 8192, - 10240, 9728, 9792, 9794, 0, 8192, 10240, 9728, - 9792, 0, 8192, 10240, 9728, 9792, 9796, 0, - 8192, 10240, 9728, 9792, 9796, 0, 8192, 10240, - 9728, 9792, 9800, 9798, 0, 8192, 10240, 9728, - 9792, 0, 8192, 10240, 9728, 9792, 9800, 0, - 8192, 10240, 9728, 9792, 9800, 0, 8192, 10240, - 9728, 9792, 9800, 9802, 0, 8192, 10240, 9728, - 9792, 9800, 0, 8192, 10240, 9728, 9792, 9808, - 9804, 0, 8192, 10240, 9728, 9792, 9808, 9804, - 0, 8192, 10240, 9728, 9792, 9808, 9809, 9806, - 0, 8192, 10240, 9728, 9792, 0, 8192, 10240, - 9728, 9792, 9808, 0, 8192, 10240, 9728, 9792, - 9808, 0, 8192, 10240, 9728, 9792, 9808, 9810, - 0, 8192, 10240, 9728, 9792, 9808, 0, 8192, - 10240, 9728, 9792, 9808, 9812, 0, 8192, 10240, - 9728, 9792, 9808, 9812, 0, 8192, 10240, 9728, - 9792, 9808, 9816, 9814, 0, 8192, 10240, 9728, - 9792, 9808, 0, 8192, 10240, 9728, 9792, 9824, - 9816, 0, 8192, 10240, 9728, 9792, 9824, 9816, - 0, 8192, 10240, 9728, 9792, 9824, 9816, 9818, - 0, 8192, 10240, 9728, 9792, 9824, 9816, 0, - 8192, 10240, 9728, 9792, 9824, 9825, 9820, 0, - 8192, 10240, 9728, 9792, 9824, 9825, 9820, 0, - 8192, 10240, 9728, 9792, 9824, 9825, 9820, 9822, - 0, 8192, 10240, 9728, 9792, 0, 8192, 10240, - 9728, 9856, 9824, 0, 8192, 10240, 9728, 9856, - 9824, 0, 8192, 10240, 9728, 9856, 9824, 9826, - 0, 8192, 10240, 9728, 9856, 9824, 0, 8192, - 10240, 9728, 9856, 9824, 9828, 0, 8192, 10240, - 9728, 9856, 9824, 9828, 0, 8192, 10240, 9728, - 9856, 9824, 9832, 9830, 0, 8192, 10240, 9728, - 9856, 9824, 0, 8192, 10240, 9728, 9856, 9824, - 9832, 0, 8192, 10240, 9728, 9856, 9824, 9832, - 0, 8192, 10240, 9728, 9856, 9824, 9832, 9834, - 0, 8192, 10240, 9728, 9856, 9824, 9832, 0, - 8192, 10240, 9728, 9856, 9824, 9840, 9836, 0, - 8192, 10240, 9728, 9856, 9824, 9840, 9836, 0, - 8192, 10240, 9728, 9856, 9824, 9840, 9841, 9838, - 0, 8192, 10240, 9728, 9856, 9824, 0, 8192, - 10240, 9728, 9856, 9857, 9840, 0, 8192, 10240, - 9728, 9856, 9857, 9840, 0, 8192, 10240, 9728, - 9856, 9857, 9840, 9842, 0, 8192, 10240, 9728, - 9856, 9857, 9840, 0, 8192, 10240, 9728, 9856, - 9857, 9840, 9844, 0, 8192, 10240, 9728, 9856, - 9857, 9840, 9844, 0, 8192, 10240, 9728, 9856, - 9857, 9840, 9848, 9846, 0, 8192, 10240, 9728, - 9856, 9857, 9840, 0, 8192, 10240, 9728, 9856, - 9857, 9840, 9848, 0, 8192, 10240, 9728, 9856, - 9857, 9859, 9848, 0, 8192, 10240, 9728, 9856, - 9857, 9859, 9848, 9850, 0, 8192, 10240, 9728, - 9856, 9857, 9859, 9848, 0, 8192, 10240, 9728, - 9856, 9857, 9859, 9848, 9852, 0, 8192, 10240, - 9728, 9856, 9857, 9859, 9848, 9852, 0, 8192, - 10240, 9728, 9856, 9857, 9859, 9848, 9852, 9854, - 0, 8192, 10240, 9728, 0, 8192, 10240, 9728, - 9856, 0, 8192, 10240, 9728, 9856, 0, 8192, - 10240, 9728, 9856, 9858, 0, 8192, 10240, 9728, - 9856, 0, 8192, 10240, 9728, 9856, 9860, 0, - 8192, 10240, 9728, 9856, 9860, 0, 8192, 10240, - 9728, 9856, 9864, 9862, 0, 8192, 10240, 9728, - 9856, 0, 8192, 10240, 9728, 9856, 9864, 0, - 8192, 10240, 9728, 9856, 9864, 0, 8192, 10240, - 9728, 9856, 9864, 9866, 0, 8192, 10240, 9728, - 9856, 9864, 0, 8192, 10240, 9728, 9856, 9872, - 9868, 0, 8192, 10240, 9728, 9856, 9872, 9868, - 0, 8192, 10240, 9728, 9856, 9872, 9873, 9870, - 0, 8192, 10240, 9728, 9856, 0, 8192, 10240, - 9728, 9856, 9872, 0, 8192, 10240, 9728, 9856, - 9872, 0, 8192, 10240, 9728, 9856, 9872, 9874, - 0, 8192, 10240, 9728, 9856, 9872, 0, 8192, - 10240, 9728, 9856, 9872, 9876, 0, 8192, 10240, - 9728, 9856, 9872, 9876, 0, 8192, 10240, 9728, - 9856, 9872, 9880, 9878, 0, 8192, 10240, 9728, - 9856, 9872, 0, 8192, 10240, 9728, 9856, 9888, - 9880, 0, 8192, 10240, 9728, 9856, 9888, 9880, - 0, 8192, 10240, 9728, 9856, 9888, 9880, 9882, - 0, 8192, 10240, 9728, 9856, 9888, 9880, 0, - 8192, 10240, 9728, 9856, 9888, 9889, 9884, 0, - 8192, 10240, 9728, 9856, 9888, 9889, 9884, 0, - 8192, 10240, 9728, 9856, 9888, 9889, 9884, 9886, - 0, 8192, 10240, 9728, 9856, 0, 8192, 10240, - 9728, 9856, 9888, 0, 8192, 10240, 9728, 9856, - 9888, 0, 8192, 10240, 9728, 9856, 9888, 9890, - 0, 8192, 10240, 9728, 9856, 9888, 0, 8192, - 10240, 9728, 9856, 9888, 9892, 0, 8192, 10240, - 9728, 9856, 9888, 9892, 0, 8192, 10240, 9728, - 9856, 9888, 9896, 9894, 0, 8192, 10240, 9728, - 9856, 9888, 0, 8192, 10240, 9728, 9856, 9888, - 9896, 0, 8192, 10240, 9728, 9856, 9888, 9896, - 0, 8192, 10240, 9728, 9856, 9888, 9896, 9898, - 0, 8192, 10240, 9728, 9856, 9888, 9896, 0, - 8192, 10240, 9728, 9856, 9888, 9904, 9900, 0, - 8192, 10240, 9728, 9856, 9888, 9904, 9900, 0, - 8192, 10240, 9728, 9856, 9888, 9904, 9905, 9902, - 0, 8192, 10240, 9728, 9856, 9888, 0, 8192, - 10240, 9728, 9856, 9920, 9904, 0, 8192, 10240, - 9728, 9856, 9920, 9904, 0, 8192, 10240, 9728, - 9856, 9920, 9904, 9906, 0, 8192, 10240, 9728, - 9856, 9920, 9904, 0, 8192, 10240, 9728, 9856, - 9920, 9904, 9908, 0, 8192, 10240, 9728, 9856, - 9920, 9904, 9908, 0, 8192, 10240, 9728, 9856, - 9920, 9904, 9912, 9910, 0, 8192, 10240, 9728, - 9856, 9920, 9904, 0, 8192, 10240, 9728, 9856, - 9920, 9921, 9912, 0, 8192, 10240, 9728, 9856, - 9920, 9921, 9912, 0, 8192, 10240, 9728, 9856, - 9920, 9921, 9912, 9914, 0, 8192, 10240, 9728, - 9856, 9920, 9921, 9912, 0, 8192, 10240, 9728, - 9856, 9920, 9921, 9912, 9916, 0, 8192, 10240, - 9728, 9856, 9920, 9921, 9923, 9916, 0, 8192, - 10240, 9728, 9856, 9920, 9921, 9923, 9916, 9918, - 0, 8192, 10240, 9728, 9856, 0, 8192, 10240, - 9728, 9984, 9920, 0, 8192, 10240, 9728, 9984, - 9920, 0, 8192, 10240, 9728, 9984, 9920, 9922, - 0, 8192, 10240, 9728, 9984, 9920, 0, 8192, - 10240, 9728, 9984, 9920, 9924, 0, 8192, 10240, - 9728, 9984, 9920, 9924, 0, 8192, 10240, 9728, - 9984, 9920, 9928, 9926, 0, 8192, 10240, 9728, - 9984, 9920, 0, 8192, 10240, 9728, 9984, 9920, - 9928, 0, 8192, 10240, 9728, 9984, 9920, 9928, - 0, 8192, 10240, 9728, 9984, 9920, 9928, 9930, - 0, 8192, 10240, 9728, 9984, 9920, 9928, 0, - 8192, 10240, 9728, 9984, 9920, 9936, 9932, 0, - 8192, 10240, 9728, 9984, 9920, 9936, 9932, 0, - 8192, 10240, 9728, 9984, 9920, 9936, 9937, 9934, - 0, 8192, 10240, 9728, 9984, 9920, 0, 8192, - 10240, 9728, 9984, 9920, 9936, 0, 8192, 10240, - 9728, 9984, 9920, 9936, 0, 8192, 10240, 9728, - 9984, 9920, 9936, 9938, 0, 8192, 10240, 9728, - 9984, 9920, 9936, 0, 8192, 10240, 9728, 9984, - 9920, 9936, 9940, 0, 8192, 10240, 9728, 9984, - 9920, 9936, 9940, 0, 8192, 10240, 9728, 9984, - 9920, 9936, 9944, 9942, 0, 8192, 10240, 9728, - 9984, 9920, 9936, 0, 8192, 10240, 9728, 9984, - 9920, 9952, 9944, 0, 8192, 10240, 9728, 9984, - 9920, 9952, 9944, 0, 8192, 10240, 9728, 9984, - 9920, 9952, 9944, 9946, 0, 8192, 10240, 9728, - 9984, 9920, 9952, 9944, 0, 8192, 10240, 9728, - 9984, 9920, 9952, 9953, 9948, 0, 8192, 10240, - 9728, 9984, 9920, 9952, 9953, 9948, 0, 8192, - 10240, 9728, 9984, 9920, 9952, 9953, 9948, 9950, - 0, 8192, 10240, 9728, 9984, 9920, 0, 8192, - 10240, 9728, 9984, 9985, 9952, 0, 8192, 10240, - 9728, 9984, 9985, 9952, 0, 8192, 10240, 9728, - 9984, 9985, 9952, 9954, 0, 8192, 10240, 9728, - 9984, 9985, 9952, 0, 8192, 10240, 9728, 9984, - 9985, 9952, 9956, 0, 8192, 10240, 9728, 9984, - 9985, 9952, 9956, 0, 8192, 10240, 9728, 9984, - 9985, 9952, 9960, 9958, 0, 8192, 10240, 9728, - 9984, 9985, 9952, 0, 8192, 10240, 9728, 9984, - 9985, 9952, 9960, 0, 8192, 10240, 9728, 9984, - 9985, 9952, 9960, 0, 8192, 10240, 9728, 9984, - 9985, 9952, 9960, 9962, 0, 8192, 10240, 9728, - 9984, 9985, 9952, 9960, 0, 8192, 10240, 9728, - 9984, 9985, 9952, 9968, 9964, 0, 8192, 10240, - 9728, 9984, 9985, 9952, 9968, 9964, 0, 8192, - 10240, 9728, 9984, 9985, 9952, 9968, 9969, 9966, - 0, 8192, 10240, 9728, 9984, 9985, 9952, 0, - 8192, 10240, 9728, 9984, 9985, 9952, 9968, 0, - 8192, 10240, 9728, 9984, 9985, 9987, 9968, 0, - 8192, 10240, 9728, 9984, 9985, 9987, 9968, 9970, - 0, 8192, 10240, 9728, 9984, 9985, 9987, 9968, - 0, 8192, 10240, 9728, 9984, 9985, 9987, 9968, - 9972, 0, 8192, 10240, 9728, 9984, 9985, 9987, - 9968, 9972, 0, 8192, 10240, 9728, 9984, 9985, - 9987, 9968, 9976, 9974, 0, 8192, 10240, 9728, - 9984, 9985, 9987, 9968, 0, 8192, 10240, 9728, - 9984, 9985, 9987, 9968, 9976, 0, 8192, 10240, - 9728, 9984, 9985, 9987, 9968, 9976, 0, 8192, - 10240, 9728, 9984, 9985, 9987, 9968, 9976, 9978, - 0, 8192, 10240, 9728, 9984, 9985, 9987, 9991, - 9976, 0, 8192, 10240, 9728, 9984, 9985, 9987, - 9991, 9976, 9980, 0, 8192, 10240, 9728, 9984, - 9985, 9987, 9991, 9976, 9980, 0, 8192, 10240, - 9728, 9984, 9985, 9987, 9991, 9976, 9980, 9982, - 0, 8192, 10240, 9728, 0, 8192, 10240, 9728, - 9984, 0, 8192, 10240, 10241, 9984, 0, 8192, - 10240, 10241, 9984, 9986, 0, 8192, 10240, 10241, - 9984, 0, 8192, 10240, 10241, 9984, 9988, 0, - 8192, 10240, 10241, 9984, 9988, 0, 8192, 10240, - 10241, 9984, 9992, 9990, 0, 8192, 10240, 10241, - 9984, 0, 8192, 10240, 10241, 9984, 9992, 0, - 8192, 10240, 10241, 9984, 9992, 0, 8192, 10240, - 10241, 9984, 9992, 9994, 0, 8192, 10240, 10241, - 9984, 9992, 0, 8192, 10240, 10241, 9984, 10000, - 9996, 0, 8192, 10240, 10241, 9984, 10000, 9996, - 0, 8192, 10240, 10241, 9984, 10000, 10001, 9998, - 0, 8192, 10240, 10241, 9984, 0, 8192, 10240, - 10241, 9984, 10000, 0, 8192, 10240, 10241, 9984, - 10000, 0, 8192, 10240, 10241, 9984, 10000, 10002, - 0, 8192, 10240, 10241, 9984, 10000, 0, 8192, - 10240, 10241, 9984, 10000, 10004, 0, 8192, 10240, - 10241, 9984, 10000, 10004, 0, 8192, 10240, 10241, - 9984, 10000, 10008, 10006, 0, 8192, 10240, 10241, - 9984, 10000, 0, 8192, 10240, 10241, 9984, 10016, - 10008, 0, 8192, 10240, 10241, 9984, 10016, 10008, - 0, 8192, 10240, 10241, 9984, 10016, 10008, 10010, - 0, 8192, 10240, 10241, 9984, 10016, 10008, 0, - 8192, 10240, 10241, 9984, 10016, 10017, 10012, 0, - 8192, 10240, 10241, 9984, 10016, 10017, 10012, 0, - 8192, 10240, 10241, 9984, 10016, 10017, 10012, 10014, - 0, 8192, 10240, 10241, 9984, 0, 8192, 10240, - 10241, 9984, 10016, 0, 8192, 10240, 10241, 9984, - 10016, 0, 8192, 10240, 10241, 9984, 10016, 10018, - 0, 8192, 10240, 10241, 9984, 10016, 0, 8192, - 10240, 10241, 9984, 10016, 10020, 0, 8192, 10240, - 10241, 9984, 10016, 10020, 0, 8192, 10240, 10241, - 9984, 10016, 10024, 10022, 0, 8192, 10240, 10241, - 9984, 10016, 0, 8192, 10240, 10241, 9984, 10016, - 10024, 0, 8192, 10240, 10241, 9984, 10016, 10024, - 0, 8192, 10240, 10241, 9984, 10016, 10024, 10026, - 0, 8192, 10240, 10241, 9984, 10016, 10024, 0, - 8192, 10240, 10241, 9984, 10016, 10032, 10028, 0, - 8192, 10240, 10241, 9984, 10016, 10032, 10028, 0, - 8192, 10240, 10241, 9984, 10016, 10032, 10033, 10030, - 0, 8192, 10240, 10241, 9984, 10016, 0, 8192, - 10240, 10241, 9984, 10048, 10032, 0, 8192, 10240, - 10241, 9984, 10048, 10032, 0, 8192, 10240, 10241, - 9984, 10048, 10032, 10034, 0, 8192, 10240, 10241, - 9984, 10048, 10032, 0, 8192, 10240, 10241, 9984, - 10048, 10032, 10036, 0, 8192, 10240, 10241, 9984, - 10048, 10032, 10036, 0, 8192, 10240, 10241, 9984, - 10048, 10032, 10040, 10038, 0, 8192, 10240, 10241, - 9984, 10048, 10032, 0, 8192, 10240, 10241, 9984, - 10048, 10049, 10040, 0, 8192, 10240, 10241, 9984, - 10048, 10049, 10040, 0, 8192, 10240, 10241, 9984, - 10048, 10049, 10040, 10042, 0, 8192, 10240, 10241, - 9984, 10048, 10049, 10040, 0, 8192, 10240, 10241, - 9984, 10048, 10049, 10040, 10044, 0, 8192, 10240, - 10241, 9984, 10048, 10049, 10051, 10044, 0, 8192, - 10240, 10241, 9984, 10048, 10049, 10051, 10044, 10046, - 0, 8192, 10240, 10241, 9984, 0, 8192, 10240, - 10241, 9984, 10048, 0, 8192, 10240, 10241, 9984, - 10048, 0, 8192, 10240, 10241, 9984, 10048, 10050, - 0, 8192, 10240, 10241, 9984, 10048, 0, 8192, - 10240, 10241, 9984, 10048, 10052, 0, 8192, 10240, - 10241, 9984, 10048, 10052, 0, 8192, 10240, 10241, - 9984, 10048, 10056, 10054, 0, 8192, 10240, 10241, - 9984, 10048, 0, 8192, 10240, 10241, 9984, 10048, - 10056, 0, 8192, 10240, 10241, 9984, 10048, 10056, - 0, 8192, 10240, 10241, 9984, 10048, 10056, 10058, - 0, 8192, 10240, 10241, 9984, 10048, 10056, 0, - 8192, 10240, 10241, 9984, 10048, 10064, 10060, 0, - 8192, 10240, 10241, 9984, 10048, 10064, 10060, 0, - 8192, 10240, 10241, 9984, 10048, 10064, 10065, 10062, - 0, 8192, 10240, 10241, 9984, 10048, 0, 8192, - 10240, 10241, 9984, 10048, 10064, 0, 8192, 10240, - 10241, 9984, 10048, 10064, 0, 8192, 10240, 10241, - 9984, 10048, 10064, 10066, 0, 8192, 10240, 10241, - 9984, 10048, 10064, 0, 8192, 10240, 10241, 9984, - 10048, 10064, 10068, 0, 8192, 10240, 10241, 9984, - 10048, 10064, 10068, 0, 8192, 10240, 10241, 9984, - 10048, 10064, 10072, 10070, 0, 8192, 10240, 10241, - 9984, 10048, 10064, 0, 8192, 10240, 10241, 9984, - 10048, 10080, 10072, 0, 8192, 10240, 10241, 9984, - 10048, 10080, 10072, 0, 8192, 10240, 10241, 9984, - 10048, 10080, 10072, 10074, 0, 8192, 10240, 10241, - 9984, 10048, 10080, 10072, 0, 8192, 10240, 10241, - 9984, 10048, 10080, 10081, 10076, 0, 8192, 10240, - 10241, 9984, 10048, 10080, 10081, 10076, 0, 8192, - 10240, 10241, 9984, 10048, 10080, 10081, 10076, 10078, - 0, 8192, 10240, 10241, 9984, 10048, 0, 8192, - 10240, 10241, 9984, 10112, 10080, 0, 8192, 10240, - 10241, 9984, 10112, 10080, 0, 8192, 10240, 10241, - 9984, 10112, 10080, 10082, 0, 8192, 10240, 10241, - 9984, 10112, 10080, 0, 8192, 10240, 10241, 9984, - 10112, 10080, 10084, 0, 8192, 10240, 10241, 9984, - 10112, 10080, 10084, 0, 8192, 10240, 10241, 9984, - 10112, 10080, 10088, 10086, 0, 8192, 10240, 10241, - 9984, 10112, 10080, 0, 8192, 10240, 10241, 9984, - 10112, 10080, 10088, 0, 8192, 10240, 10241, 9984, - 10112, 10080, 10088, 0, 8192, 10240, 10241, 9984, - 10112, 10080, 10088, 10090, 0, 8192, 10240, 10241, - 9984, 10112, 10080, 10088, 0, 8192, 10240, 10241, - 9984, 10112, 10080, 10096, 10092, 0, 8192, 10240, - 10241, 9984, 10112, 10080, 10096, 10092, 0, 8192, - 10240, 10241, 9984, 10112, 10080, 10096, 10097, 10094, - 0, 8192, 10240, 10241, 9984, 10112, 10080, 0, - 8192, 10240, 10241, 9984, 10112, 10113, 10096, 0, - 8192, 10240, 10241, 9984, 10112, 10113, 10096, 0, - 8192, 10240, 10241, 9984, 10112, 10113, 10096, 10098, - 0, 8192, 10240, 10241, 9984, 10112, 10113, 10096, - 0, 8192, 10240, 10241, 9984, 10112, 10113, 10096, - 10100, 0, 8192, 10240, 10241, 9984, 10112, 10113, - 10096, 10100, 0, 8192, 10240, 10241, 9984, 10112, - 10113, 10096, 10104, 10102, 0, 8192, 10240, 10241, - 9984, 10112, 10113, 10096, 0, 8192, 10240, 10241, - 9984, 10112, 10113, 10096, 10104, 0, 8192, 10240, - 10241, 9984, 10112, 10113, 10115, 10104, 0, 8192, - 10240, 10241, 9984, 10112, 10113, 10115, 10104, 10106, - 0, 8192, 10240, 10241, 9984, 10112, 10113, 10115, - 10104, 0, 8192, 10240, 10241, 9984, 10112, 10113, - 10115, 10104, 10108, 0, 8192, 10240, 10241, 9984, - 10112, 10113, 10115, 10104, 10108, 0, 8192, 10240, - 10241, 9984, 10112, 10113, 10115, 10104, 10108, 10110, - 0, 8192, 10240, 10241, 9984, 0, 8192, 10240, - 10241, 9984, 10112, 0, 8192, 10240, 10241, 9984, - 10112, 0, 8192, 10240, 10241, 9984, 10112, 10114, - 0, 8192, 10240, 10241, 10243, 10112, 0, 8192, - 10240, 10241, 10243, 10112, 10116, 0, 8192, 10240, - 10241, 10243, 10112, 10116, 0, 8192, 10240, 10241, - 10243, 10112, 10120, 10118, 0, 8192, 10240, 10241, - 10243, 10112, 0, 8192, 10240, 10241, 10243, 10112, - 10120, 0, 8192, 10240, 10241, 10243, 10112, 10120, - 0, 8192, 10240, 10241, 10243, 10112, 10120, 10122, - 0, 8192, 10240, 10241, 10243, 10112, 10120, 0, - 8192, 10240, 10241, 10243, 10112, 10128, 10124, 0, - 8192, 10240, 10241, 10243, 10112, 10128, 10124, 0, - 8192, 10240, 10241, 10243, 10112, 10128, 10129, 10126, - 0, 8192, 10240, 10241, 10243, 10112, 0, 8192, - 10240, 10241, 10243, 10112, 10128, 0, 8192, 10240, - 10241, 10243, 10112, 10128, 0, 8192, 10240, 10241, - 10243, 10112, 10128, 10130, 0, 8192, 10240, 10241, - 10243, 10112, 10128, 0, 8192, 10240, 10241, 10243, - 10112, 10128, 10132, 0, 8192, 10240, 10241, 10243, - 10112, 10128, 10132, 0, 8192, 10240, 10241, 10243, - 10112, 10128, 10136, 10134, 0, 8192, 10240, 10241, - 10243, 10112, 10128, 0, 8192, 10240, 10241, 10243, - 10112, 10144, 10136, 0, 8192, 10240, 10241, 10243, - 10112, 10144, 10136, 0, 8192, 10240, 10241, 10243, - 10112, 10144, 10136, 10138, 0, 8192, 10240, 10241, - 10243, 10112, 10144, 10136, 0, 8192, 10240, 10241, - 10243, 10112, 10144, 10145, 10140, 0, 8192, 10240, - 10241, 10243, 10112, 10144, 10145, 10140, 0, 8192, - 10240, 10241, 10243, 10112, 10144, 10145, 10140, 10142, - 0, 8192, 10240, 10241, 10243, 10112, 0, 8192, - 10240, 10241, 10243, 10112, 10144, 0, 8192, 10240, - 10241, 10243, 10112, 10144, 0, 8192, 10240, 10241, - 10243, 10112, 10144, 10146, 0, 8192, 10240, 10241, - 10243, 10112, 10144, 0, 8192, 10240, 10241, 10243, - 10112, 10144, 10148, 0, 8192, 10240, 10241, 10243, - 10112, 10144, 10148, 0, 8192, 10240, 10241, 10243, - 10112, 10144, 10152, 10150, 0, 8192, 10240, 10241, - 10243, 10112, 10144, 0, 8192, 10240, 10241, 10243, - 10112, 10144, 10152, 0, 8192, 10240, 10241, 10243, - 10112, 10144, 10152, 0, 8192, 10240, 10241, 10243, - 10112, 10144, 10152, 10154, 0, 8192, 10240, 10241, - 10243, 10112, 10144, 10152, 0, 8192, 10240, 10241, - 10243, 10112, 10144, 10160, 10156, 0, 8192, 10240, - 10241, 10243, 10112, 10144, 10160, 10156, 0, 8192, - 10240, 10241, 10243, 10112, 10144, 10160, 10161, 10158, - 0, 8192, 10240, 10241, 10243, 10112, 10144, 0, - 8192, 10240, 10241, 10243, 10112, 10176, 10160, 0, - 8192, 10240, 10241, 10243, 10112, 10176, 10160, 0, - 8192, 10240, 10241, 10243, 10112, 10176, 10160, 10162, - 0, 8192, 10240, 10241, 10243, 10112, 10176, 10160, - 0, 8192, 10240, 10241, 10243, 10112, 10176, 10160, - 10164, 0, 8192, 10240, 10241, 10243, 10112, 10176, - 10160, 10164, 0, 8192, 10240, 10241, 10243, 10112, - 10176, 10160, 10168, 10166, 0, 8192, 10240, 10241, - 10243, 10112, 10176, 10160, 0, 8192, 10240, 10241, - 10243, 10112, 10176, 10177, 10168, 0, 8192, 10240, - 10241, 10243, 10112, 10176, 10177, 10168, 0, 8192, - 10240, 10241, 10243, 10112, 10176, 10177, 10168, 10170, - 0, 8192, 10240, 10241, 10243, 10112, 10176, 10177, - 10168, 0, 8192, 10240, 10241, 10243, 10112, 10176, - 10177, 10168, 10172, 0, 8192, 10240, 10241, 10243, - 10112, 10176, 10177, 10179, 10172, 0, 8192, 10240, - 10241, 10243, 10112, 10176, 10177, 10179, 10172, 10174, - 0, 8192, 10240, 10241, 10243, 10112, 0, 8192, - 10240, 10241, 10243, 10112, 10176, 0, 8192, 10240, - 10241, 10243, 10112, 10176, 0, 8192, 10240, 10241, - 10243, 10112, 10176, 10178, 0, 8192, 10240, 10241, - 10243, 10112, 10176, 0, 8192, 10240, 10241, 10243, - 10112, 10176, 10180, 0, 8192, 10240, 10241, 10243, - 10112, 10176, 10180, 0, 8192, 10240, 10241, 10243, - 10112, 10176, 10184, 10182, 0, 8192, 10240, 10241, - 10243, 10247, 10176, 0, 8192, 10240, 10241, 10243, - 10247, 10176, 10184, 0, 8192, 10240, 10241, 10243, - 10247, 10176, 10184, 0, 8192, 10240, 10241, 10243, - 10247, 10176, 10184, 10186, 0, 8192, 10240, 10241, - 10243, 10247, 10176, 10184, 0, 8192, 10240, 10241, - 10243, 10247, 10176, 10192, 10188, 0, 8192, 10240, - 10241, 10243, 10247, 10176, 10192, 10188, 0, 8192, - 10240, 10241, 10243, 10247, 10176, 10192, 10193, 10190, - 0, 8192, 10240, 10241, 10243, 10247, 10176, 0, - 8192, 10240, 10241, 10243, 10247, 10176, 10192, 0, - 8192, 10240, 10241, 10243, 10247, 10176, 10192, 0, - 8192, 10240, 10241, 10243, 10247, 10176, 10192, 10194, - 0, 8192, 10240, 10241, 10243, 10247, 10176, 10192, - 0, 8192, 10240, 10241, 10243, 10247, 10176, 10192, - 10196, 0, 8192, 10240, 10241, 10243, 10247, 10176, - 10192, 10196, 0, 8192, 10240, 10241, 10243, 10247, - 10176, 10192, 10200, 10198, 0, 8192, 10240, 10241, - 10243, 10247, 10176, 10192, 0, 8192, 10240, 10241, - 10243, 10247, 10176, 10208, 10200, 0, 8192, 10240, - 10241, 10243, 10247, 10176, 10208, 10200, 0, 8192, - 10240, 10241, 10243, 10247, 10176, 10208, 10200, 10202, - 0, 8192, 10240, 10241, 10243, 10247, 10176, 10208, - 10200, 0, 8192, 10240, 10241, 10243, 10247, 10176, - 10208, 10209, 10204, 0, 8192, 10240, 10241, 10243, - 10247, 10176, 10208, 10209, 10204, 0, 8192, 10240, - 10241, 10243, 10247, 10176, 10208, 10209, 10204, 10206, - 0, 8192, 10240, 10241, 10243, 10247, 10176, 0, - 8192, 10240, 10241, 10243, 10247, 10176, 10208, 0, - 8192, 10240, 10241, 10243, 10247, 10176, 10208, 0, - 8192, 10240, 10241, 10243, 10247, 10176, 10208, 10210, - 0, 8192, 10240, 10241, 10243, 10247, 10176, 10208, - 0, 8192, 10240, 10241, 10243, 10247, 10176, 10208, - 10212, 0, 8192, 10240, 10241, 10243, 10247, 10176, - 10208, 10212, 0, 8192, 10240, 10241, 10243, 10247, - 10176, 10208, 10216, 10214, 0, 8192, 10240, 10241, - 10243, 10247, 10176, 10208, 0, 8192, 10240, 10241, - 10243, 10247, 10176, 10208, 10216, 0, 8192, 10240, - 10241, 10243, 10247, 10176, 10208, 10216, 0, 8192, - 10240, 10241, 10243, 10247, 10176, 10208, 10216, 10218, - 0, 8192, 10240, 10241, 10243, 10247, 10176, 10208, - 10216, 0, 8192, 10240, 10241, 10243, 10247, 10176, - 10208, 10224, 10220, 0, 8192, 10240, 10241, 10243, - 10247, 10176, 10208, 10224, 10220, 0, 8192, 10240, - 10241, 10243, 10247, 10176, 10208, 10224, 10225, 10222, - 0, 8192, 10240, 10241, 10243, 10247, 10255, 10208, - 0, 8192, 10240, 10241, 10243, 10247, 10255, 10208, - 10224, 0, 8192, 10240, 10241, 10243, 10247, 10255, - 10208, 10224, 0, 8192, 10240, 10241, 10243, 10247, - 10255, 10208, 10224, 10226, 0, 8192, 10240, 10241, - 10243, 10247, 10255, 10208, 10224, 0, 8192, 10240, - 10241, 10243, 10247, 10255, 10208, 10224, 10228, 0, - 8192, 10240, 10241, 10243, 10247, 10255, 10208, 10224, - 10228, 0, 8192, 10240, 10241, 10243, 10247, 10255, - 10208, 10224, 10232, 10230, 0, 8192, 10240, 10241, - 10243, 10247, 10255, 10208, 10224, 0, 8192, 10240, - 10241, 10243, 10247, 10255, 10208, 10224, 10232, 0, - 8192, 10240, 10241, 10243, 10247, 10255, 10208, 10224, - 10232, 0, 8192, 10240, 10241, 10243, 10247, 10255, - 10208, 10224, 10232, 10234, 0, 8192, 10240, 10241, - 10243, 10247, 10255, 10208, 10224, 10232, 0, 8192, - 10240, 10241, 10243, 10247, 10255, 10208, 10224, 10232, - 10236, 0, 8192, 10240, 10241, 10243, 10247, 10255, - 10208, 10224, 10232, 10236, 0, 8192, 10240, 10241, - 10243, 10247, 10255, 10208, 10224, 10232, 10236, 10238, - 0, 8192, 0, 8192, 10240, 0, 8192, 10240, - 0, 8192, 10240, 10242, 0, 8192, 10240, 0, - 8192, 10240, 10244, 0, 8192, 10240, 10244, 0, - 8192, 10240, 10248, 10246, 0, 8192, 10240, 0, - 8192, 10240, 10248, 0, 8192, 10240, 10248, 0, - 8192, 10240, 10248, 10250, 0, 8192, 10240, 10248, - 0, 8192, 10240, 10256, 10252, 0, 8192, 10240, - 10256, 10252, 0, 8192, 10240, 10256, 10257, 10254, - 0, 8192, 10240, 0, 8192, 10240, 10256, 0, - 8192, 10240, 10256, 0, 8192, 10240, 10256, 10258, - 0, 8192, 10240, 10256, 0, 8192, 10240, 10256, - 10260, 0, 8192, 10240, 10256, 10260, 0, 8192, - 10240, 10256, 10264, 10262, 0, 8192, 10240, 10256, - 0, 8192, 10240, 10272, 10264, 0, 8192, 10240, - 10272, 10264, 0, 8192, 10240, 10272, 10264, 10266, - 0, 8192, 10240, 10272, 10264, 0, 8192, 10240, - 10272, 10273, 10268, 0, 8192, 10240, 10272, 10273, - 10268, 0, 8192, 10240, 10272, 10273, 10268, 10270, - 0, 8192, 10240, 0, 8192, 10240, 10272, 0, - 8192, 10240, 10272, 0, 8192, 10240, 10272, 10274, - 0, 8192, 10240, 10272, 0, 8192, 10240, 10272, - 10276, 0, 8192, 10240, 10272, 10276, 0, 8192, - 10240, 10272, 10280, 10278, 0, 8192, 10240, 10272, - 0, 8192, 10240, 10272, 10280, 0, 8192, 10240, - 10272, 10280, 0, 8192, 10240, 10272, 10280, 10282, - 0, 8192, 10240, 10272, 10280, 0, 8192, 10240, - 10272, 10288, 10284, 0, 8192, 10240, 10272, 10288, - 10284, 0, 8192, 10240, 10272, 10288, 10289, 10286, - 0, 8192, 10240, 10272, 0, 8192, 10240, 10304, - 10288, 0, 8192, 10240, 10304, 10288, 0, 8192, - 10240, 10304, 10288, 10290, 0, 8192, 10240, 10304, - 10288, 0, 8192, 10240, 10304, 10288, 10292, 0, - 8192, 10240, 10304, 10288, 10292, 0, 8192, 10240, - 10304, 10288, 10296, 10294, 0, 8192, 10240, 10304, - 10288, 0, 8192, 10240, 10304, 10305, 10296, 0, - 8192, 10240, 10304, 10305, 10296, 0, 8192, 10240, - 10304, 10305, 10296, 10298, 0, 8192, 10240, 10304, - 10305, 10296, 0, 8192, 10240, 10304, 10305, 10296, - 10300, 0, 8192, 10240, 10304, 10305, 10307, 10300, - 0, 8192, 10240, 10304, 10305, 10307, 10300, 10302, - 0, 8192, 10240, 0, 8192, 10240, 10304, 0, - 8192, 10240, 10304, 0, 8192, 10240, 10304, 10306, - 0, 8192, 10240, 10304, 0, 8192, 10240, 10304, - 10308, 0, 8192, 10240, 10304, 10308, 0, 8192, - 10240, 10304, 10312, 10310, 0, 8192, 10240, 10304, - 0, 8192, 10240, 10304, 10312, 0, 8192, 10240, - 10304, 10312, 0, 8192, 10240, 10304, 10312, 10314, - 0, 8192, 10240, 10304, 10312, 0, 8192, 10240, - 10304, 10320, 10316, 0, 8192, 10240, 10304, 10320, - 10316, 0, 8192, 10240, 10304, 10320, 10321, 10318, - 0, 8192, 10240, 10304, 0, 8192, 10240, 10304, - 10320, 0, 8192, 10240, 10304, 10320, 0, 8192, - 10240, 10304, 10320, 10322, 0, 8192, 10240, 10304, - 10320, 0, 8192, 10240, 10304, 10320, 10324, 0, - 8192, 10240, 10304, 10320, 10324, 0, 8192, 10240, - 10304, 10320, 10328, 10326, 0, 8192, 10240, 10304, - 10320, 0, 8192, 10240, 10304, 10336, 10328, 0, - 8192, 10240, 10304, 10336, 10328, 0, 8192, 10240, - 10304, 10336, 10328, 10330, 0, 8192, 10240, 10304, - 10336, 10328, 0, 8192, 10240, 10304, 10336, 10337, - 10332, 0, 8192, 10240, 10304, 10336, 10337, 10332, - 0, 8192, 10240, 10304, 10336, 10337, 10332, 10334, - 0, 8192, 10240, 10304, 0, 8192, 10240, 10368, - 10336, 0, 8192, 10240, 10368, 10336, 0, 8192, - 10240, 10368, 10336, 10338, 0, 8192, 10240, 10368, - 10336, 0, 8192, 10240, 10368, 10336, 10340, 0, - 8192, 10240, 10368, 10336, 10340, 0, 8192, 10240, - 10368, 10336, 10344, 10342, 0, 8192, 10240, 10368, - 10336, 0, 8192, 10240, 10368, 10336, 10344, 0, - 8192, 10240, 10368, 10336, 10344, 0, 8192, 10240, - 10368, 10336, 10344, 10346, 0, 8192, 10240, 10368, - 10336, 10344, 0, 8192, 10240, 10368, 10336, 10352, - 10348, 0, 8192, 10240, 10368, 10336, 10352, 10348, - 0, 8192, 10240, 10368, 10336, 10352, 10353, 10350, - 0, 8192, 10240, 10368, 10336, 0, 8192, 10240, - 10368, 10369, 10352, 0, 8192, 10240, 10368, 10369, - 10352, 0, 8192, 10240, 10368, 10369, 10352, 10354, - 0, 8192, 10240, 10368, 10369, 10352, 0, 8192, - 10240, 10368, 10369, 10352, 10356, 0, 8192, 10240, - 10368, 10369, 10352, 10356, 0, 8192, 10240, 10368, - 10369, 10352, 10360, 10358, 0, 8192, 10240, 10368, - 10369, 10352, 0, 8192, 10240, 10368, 10369, 10352, - 10360, 0, 8192, 10240, 10368, 10369, 10371, 10360, - 0, 8192, 10240, 10368, 10369, 10371, 10360, 10362, - 0, 8192, 10240, 10368, 10369, 10371, 10360, 0, - 8192, 10240, 10368, 10369, 10371, 10360, 10364, 0, - 8192, 10240, 10368, 10369, 10371, 10360, 10364, 0, - 8192, 10240, 10368, 10369, 10371, 10360, 10364, 10366, - 0, 8192, 10240, 0, 8192, 10240, 10368, 0, - 8192, 10240, 10368, 0, 8192, 10240, 10368, 10370, - 0, 8192, 10240, 10368, 0, 8192, 10240, 10368, - 10372, 0, 8192, 10240, 10368, 10372, 0, 8192, - 10240, 10368, 10376, 10374, 0, 8192, 10240, 10368, - 0, 8192, 10240, 10368, 10376, 0, 8192, 10240, - 10368, 10376, 0, 8192, 10240, 10368, 10376, 10378, - 0, 8192, 10240, 10368, 10376, 0, 8192, 10240, - 10368, 10384, 10380, 0, 8192, 10240, 10368, 10384, - 10380, 0, 8192, 10240, 10368, 10384, 10385, 10382, - 0, 8192, 10240, 10368, 0, 8192, 10240, 10368, - 10384, 0, 8192, 10240, 10368, 10384, 0, 8192, - 10240, 10368, 10384, 10386, 0, 8192, 10240, 10368, - 10384, 0, 8192, 10240, 10368, 10384, 10388, 0, - 8192, 10240, 10368, 10384, 10388, 0, 8192, 10240, - 10368, 10384, 10392, 10390, 0, 8192, 10240, 10368, - 10384, 0, 8192, 10240, 10368, 10400, 10392, 0, - 8192, 10240, 10368, 10400, 10392, 0, 8192, 10240, - 10368, 10400, 10392, 10394, 0, 8192, 10240, 10368, - 10400, 10392, 0, 8192, 10240, 10368, 10400, 10401, - 10396, 0, 8192, 10240, 10368, 10400, 10401, 10396, - 0, 8192, 10240, 10368, 10400, 10401, 10396, 10398, - 0, 8192, 10240, 10368, 0, 8192, 10240, 10368, - 10400, 0, 8192, 10240, 10368, 10400, 0, 8192, - 10240, 10368, 10400, 10402, 0, 8192, 10240, 10368, - 10400, 0, 8192, 10240, 10368, 10400, 10404, 0, - 8192, 10240, 10368, 10400, 10404, 0, 8192, 10240, - 10368, 10400, 10408, 10406, 0, 8192, 10240, 10368, - 10400, 0, 8192, 10240, 10368, 10400, 10408, 0, - 8192, 10240, 10368, 10400, 10408, 0, 8192, 10240, - 10368, 10400, 10408, 10410, 0, 8192, 10240, 10368, - 10400, 10408, 0, 8192, 10240, 10368, 10400, 10416, - 10412, 0, 8192, 10240, 10368, 10400, 10416, 10412, - 0, 8192, 10240, 10368, 10400, 10416, 10417, 10414, - 0, 8192, 10240, 10368, 10400, 0, 8192, 10240, - 10368, 10432, 10416, 0, 8192, 10240, 10368, 10432, - 10416, 0, 8192, 10240, 10368, 10432, 10416, 10418, - 0, 8192, 10240, 10368, 10432, 10416, 0, 8192, - 10240, 10368, 10432, 10416, 10420, 0, 8192, 10240, - 10368, 10432, 10416, 10420, 0, 8192, 10240, 10368, - 10432, 10416, 10424, 10422, 0, 8192, 10240, 10368, - 10432, 10416, 0, 8192, 10240, 10368, 10432, 10433, - 10424, 0, 8192, 10240, 10368, 10432, 10433, 10424, - 0, 8192, 10240, 10368, 10432, 10433, 10424, 10426, - 0, 8192, 10240, 10368, 10432, 10433, 10424, 0, - 8192, 10240, 10368, 10432, 10433, 10424, 10428, 0, - 8192, 10240, 10368, 10432, 10433, 10435, 10428, 0, - 8192, 10240, 10368, 10432, 10433, 10435, 10428, 10430, - 0, 8192, 10240, 10368, 0, 8192, 10240, 10496, - 10432, 0, 8192, 10240, 10496, 10432, 0, 8192, - 10240, 10496, 10432, 10434, 0, 8192, 10240, 10496, - 10432, 0, 8192, 10240, 10496, 10432, 10436, 0, - 8192, 10240, 10496, 10432, 10436, 0, 8192, 10240, - 10496, 10432, 10440, 10438, 0, 8192, 10240, 10496, - 10432, 0, 8192, 10240, 10496, 10432, 10440, 0, - 8192, 10240, 10496, 10432, 10440, 0, 8192, 10240, - 10496, 10432, 10440, 10442, 0, 8192, 10240, 10496, - 10432, 10440, 0, 8192, 10240, 10496, 10432, 10448, - 10444, 0, 8192, 10240, 10496, 10432, 10448, 10444, - 0, 8192, 10240, 10496, 10432, 10448, 10449, 10446, - 0, 8192, 10240, 10496, 10432, 0, 8192, 10240, - 10496, 10432, 10448, 0, 8192, 10240, 10496, 10432, - 10448, 0, 8192, 10240, 10496, 10432, 10448, 10450, - 0, 8192, 10240, 10496, 10432, 10448, 0, 8192, - 10240, 10496, 10432, 10448, 10452, 0, 8192, 10240, - 10496, 10432, 10448, 10452, 0, 8192, 10240, 10496, - 10432, 10448, 10456, 10454, 0, 8192, 10240, 10496, - 10432, 10448, 0, 8192, 10240, 10496, 10432, 10464, - 10456, 0, 8192, 10240, 10496, 10432, 10464, 10456, - 0, 8192, 10240, 10496, 10432, 10464, 10456, 10458, - 0, 8192, 10240, 10496, 10432, 10464, 10456, 0, - 8192, 10240, 10496, 10432, 10464, 10465, 10460, 0, - 8192, 10240, 10496, 10432, 10464, 10465, 10460, 0, - 8192, 10240, 10496, 10432, 10464, 10465, 10460, 10462, - 0, 8192, 10240, 10496, 10432, 0, 8192, 10240, - 10496, 10497, 10464, 0, 8192, 10240, 10496, 10497, - 10464, 0, 8192, 10240, 10496, 10497, 10464, 10466, - 0, 8192, 10240, 10496, 10497, 10464, 0, 8192, - 10240, 10496, 10497, 10464, 10468, 0, 8192, 10240, - 10496, 10497, 10464, 10468, 0, 8192, 10240, 10496, - 10497, 10464, 10472, 10470, 0, 8192, 10240, 10496, - 10497, 10464, 0, 8192, 10240, 10496, 10497, 10464, - 10472, 0, 8192, 10240, 10496, 10497, 10464, 10472, - 0, 8192, 10240, 10496, 10497, 10464, 10472, 10474, - 0, 8192, 10240, 10496, 10497, 10464, 10472, 0, - 8192, 10240, 10496, 10497, 10464, 10480, 10476, 0, - 8192, 10240, 10496, 10497, 10464, 10480, 10476, 0, - 8192, 10240, 10496, 10497, 10464, 10480, 10481, 10478, - 0, 8192, 10240, 10496, 10497, 10464, 0, 8192, - 10240, 10496, 10497, 10464, 10480, 0, 8192, 10240, - 10496, 10497, 10499, 10480, 0, 8192, 10240, 10496, - 10497, 10499, 10480, 10482, 0, 8192, 10240, 10496, - 10497, 10499, 10480, 0, 8192, 10240, 10496, 10497, - 10499, 10480, 10484, 0, 8192, 10240, 10496, 10497, - 10499, 10480, 10484, 0, 8192, 10240, 10496, 10497, - 10499, 10480, 10488, 10486, 0, 8192, 10240, 10496, - 10497, 10499, 10480, 0, 8192, 10240, 10496, 10497, - 10499, 10480, 10488, 0, 8192, 10240, 10496, 10497, - 10499, 10480, 10488, 0, 8192, 10240, 10496, 10497, - 10499, 10480, 10488, 10490, 0, 8192, 10240, 10496, - 10497, 10499, 10503, 10488, 0, 8192, 10240, 10496, - 10497, 10499, 10503, 10488, 10492, 0, 8192, 10240, - 10496, 10497, 10499, 10503, 10488, 10492, 0, 8192, - 10240, 10496, 10497, 10499, 10503, 10488, 10492, 10494, - 0, 8192, 10240, 0, 8192, 10240, 10496, 0, - 8192, 10240, 10496, 0, 8192, 10240, 10496, 10498, - 0, 8192, 10240, 10496, 0, 8192, 10240, 10496, - 10500, 0, 8192, 10240, 10496, 10500, 0, 8192, - 10240, 10496, 10504, 10502, 0, 8192, 10240, 10496, - 0, 8192, 10240, 10496, 10504, 0, 8192, 10240, - 10496, 10504, 0, 8192, 10240, 10496, 10504, 10506, - 0, 8192, 10240, 10496, 10504, 0, 8192, 10240, - 10496, 10512, 10508, 0, 8192, 10240, 10496, 10512, - 10508, 0, 8192, 10240, 10496, 10512, 10513, 10510, - 0, 8192, 10240, 10496, 0, 8192, 10240, 10496, - 10512, 0, 8192, 10240, 10496, 10512, 0, 8192, - 10240, 10496, 10512, 10514, 0, 8192, 10240, 10496, - 10512, 0, 8192, 10240, 10496, 10512, 10516, 0, - 8192, 10240, 10496, 10512, 10516, 0, 8192, 10240, - 10496, 10512, 10520, 10518, 0, 8192, 10240, 10496, - 10512, 0, 8192, 10240, 10496, 10528, 10520, 0, - 8192, 10240, 10496, 10528, 10520, 0, 8192, 10240, - 10496, 10528, 10520, 10522, 0, 8192, 10240, 10496, - 10528, 10520, 0, 8192, 10240, 10496, 10528, 10529, - 10524, 0, 8192, 10240, 10496, 10528, 10529, 10524, - 0, 8192, 10240, 10496, 10528, 10529, 10524, 10526, - 0, 8192, 10240, 10496, 0, 8192, 10240, 10496, - 10528, 0, 8192, 10240, 10496, 10528, 0, 8192, - 10240, 10496, 10528, 10530, 0, 8192, 10240, 10496, - 10528, 0, 8192, 10240, 10496, 10528, 10532, 0, - 8192, 10240, 10496, 10528, 10532, 0, 8192, 10240, - 10496, 10528, 10536, 10534, 0, 8192, 10240, 10496, - 10528, 0, 8192, 10240, 10496, 10528, 10536, 0, - 8192, 10240, 10496, 10528, 10536, 0, 8192, 10240, - 10496, 10528, 10536, 10538, 0, 8192, 10240, 10496, - 10528, 10536, 0, 8192, 10240, 10496, 10528, 10544, - 10540, 0, 8192, 10240, 10496, 10528, 10544, 10540, - 0, 8192, 10240, 10496, 10528, 10544, 10545, 10542, - 0, 8192, 10240, 10496, 10528, 0, 8192, 10240, - 10496, 10560, 10544, 0, 8192, 10240, 10496, 10560, - 10544, 0, 8192, 10240, 10496, 10560, 10544, 10546, - 0, 8192, 10240, 10496, 10560, 10544, 0, 8192, - 10240, 10496, 10560, 10544, 10548, 0, 8192, 10240, - 10496, 10560, 10544, 10548, 0, 8192, 10240, 10496, - 10560, 10544, 10552, 10550, 0, 8192, 10240, 10496, - 10560, 10544, 0, 8192, 10240, 10496, 10560, 10561, - 10552, 0, 8192, 10240, 10496, 10560, 10561, 10552, - 0, 8192, 10240, 10496, 10560, 10561, 10552, 10554, - 0, 8192, 10240, 10496, 10560, 10561, 10552, 0, - 8192, 10240, 10496, 10560, 10561, 10552, 10556, 0, - 8192, 10240, 10496, 10560, 10561, 10563, 10556, 0, - 8192, 10240, 10496, 10560, 10561, 10563, 10556, 10558, - 0, 8192, 10240, 10496, 0, 8192, 10240, 10496, - 10560, 0, 8192, 10240, 10496, 10560, 0, 8192, - 10240, 10496, 10560, 10562, 0, 8192, 10240, 10496, - 10560, 0, 8192, 10240, 10496, 10560, 10564, 0, - 8192, 10240, 10496, 10560, 10564, 0, 8192, 10240, - 10496, 10560, 10568, 10566, 0, 8192, 10240, 10496, - 10560, 0, 8192, 10240, 10496, 10560, 10568, 0, - 8192, 10240, 10496, 10560, 10568, 0, 8192, 10240, - 10496, 10560, 10568, 10570, 0, 8192, 10240, 10496, - 10560, 10568, 0, 8192, 10240, 10496, 10560, 10576, - 10572, 0, 8192, 10240, 10496, 10560, 10576, 10572, - 0, 8192, 10240, 10496, 10560, 10576, 10577, 10574, - 0, 8192, 10240, 10496, 10560, 0, 8192, 10240, - 10496, 10560, 10576, 0, 8192, 10240, 10496, 10560, - 10576, 0, 8192, 10240, 10496, 10560, 10576, 10578, - 0, 8192, 10240, 10496, 10560, 10576, 0, 8192, - 10240, 10496, 10560, 10576, 10580, 0, 8192, 10240, - 10496, 10560, 10576, 10580, 0, 8192, 10240, 10496, - 10560, 10576, 10584, 10582, 0, 8192, 10240, 10496, - 10560, 10576, 0, 8192, 10240, 10496, 10560, 10592, - 10584, 0, 8192, 10240, 10496, 10560, 10592, 10584, - 0, 8192, 10240, 10496, 10560, 10592, 10584, 10586, - 0, 8192, 10240, 10496, 10560, 10592, 10584, 0, - 8192, 10240, 10496, 10560, 10592, 10593, 10588, 0, - 8192, 10240, 10496, 10560, 10592, 10593, 10588, 0, - 8192, 10240, 10496, 10560, 10592, 10593, 10588, 10590, - 0, 8192, 10240, 10496, 10560, 0, 8192, 10240, - 10496, 10624, 10592, 0, 8192, 10240, 10496, 10624, - 10592, 0, 8192, 10240, 10496, 10624, 10592, 10594, - 0, 8192, 10240, 10496, 10624, 10592, 0, 8192, - 10240, 10496, 10624, 10592, 10596, 0, 8192, 10240, - 10496, 10624, 10592, 10596, 0, 8192, 10240, 10496, - 10624, 10592, 10600, 10598, 0, 8192, 10240, 10496, - 10624, 10592, 0, 8192, 10240, 10496, 10624, 10592, - 10600, 0, 8192, 10240, 10496, 10624, 10592, 10600, - 0, 8192, 10240, 10496, 10624, 10592, 10600, 10602, - 0, 8192, 10240, 10496, 10624, 10592, 10600, 0, - 8192, 10240, 10496, 10624, 10592, 10608, 10604, 0, - 8192, 10240, 10496, 10624, 10592, 10608, 10604, 0, - 8192, 10240, 10496, 10624, 10592, 10608, 10609, 10606, - 0, 8192, 10240, 10496, 10624, 10592, 0, 8192, - 10240, 10496, 10624, 10625, 10608, 0, 8192, 10240, - 10496, 10624, 10625, 10608, 0, 8192, 10240, 10496, - 10624, 10625, 10608, 10610, 0, 8192, 10240, 10496, - 10624, 10625, 10608, 0, 8192, 10240, 10496, 10624, - 10625, 10608, 10612, 0, 8192, 10240, 10496, 10624, - 10625, 10608, 10612, 0, 8192, 10240, 10496, 10624, - 10625, 10608, 10616, 10614, 0, 8192, 10240, 10496, - 10624, 10625, 10608, 0, 8192, 10240, 10496, 10624, - 10625, 10608, 10616, 0, 8192, 10240, 10496, 10624, - 10625, 10627, 10616, 0, 8192, 10240, 10496, 10624, - 10625, 10627, 10616, 10618, 0, 8192, 10240, 10496, - 10624, 10625, 10627, 10616, 0, 8192, 10240, 10496, - 10624, 10625, 10627, 10616, 10620, 0, 8192, 10240, - 10496, 10624, 10625, 10627, 10616, 10620, 0, 8192, - 10240, 10496, 10624, 10625, 10627, 10616, 10620, 10622, - 0, 8192, 10240, 10496, 0, 8192, 10240, 10752, - 10624, 0, 8192, 10240, 10752, 10624, 0, 8192, - 10240, 10752, 10624, 10626, 0, 8192, 10240, 10752, - 10624, 0, 8192, 10240, 10752, 10624, 10628, 0, - 8192, 10240, 10752, 10624, 10628, 0, 8192, 10240, - 10752, 10624, 10632, 10630, 0, 8192, 10240, 10752, - 10624, 0, 8192, 10240, 10752, 10624, 10632, 0, - 8192, 10240, 10752, 10624, 10632, 0, 8192, 10240, - 10752, 10624, 10632, 10634, 0, 8192, 10240, 10752, - 10624, 10632, 0, 8192, 10240, 10752, 10624, 10640, - 10636, 0, 8192, 10240, 10752, 10624, 10640, 10636, - 0, 8192, 10240, 10752, 10624, 10640, 10641, 10638, - 0, 8192, 10240, 10752, 10624, 0, 8192, 10240, - 10752, 10624, 10640, 0, 8192, 10240, 10752, 10624, - 10640, 0, 8192, 10240, 10752, 10624, 10640, 10642, - 0, 8192, 10240, 10752, 10624, 10640, 0, 8192, - 10240, 10752, 10624, 10640, 10644, 0, 8192, 10240, - 10752, 10624, 10640, 10644, 0, 8192, 10240, 10752, - 10624, 10640, 10648, 10646, 0, 8192, 10240, 10752, - 10624, 10640, 0, 8192, 10240, 10752, 10624, 10656, - 10648, 0, 8192, 10240, 10752, 10624, 10656, 10648, - 0, 8192, 10240, 10752, 10624, 10656, 10648, 10650, - 0, 8192, 10240, 10752, 10624, 10656, 10648, 0, - 8192, 10240, 10752, 10624, 10656, 10657, 10652, 0, - 8192, 10240, 10752, 10624, 10656, 10657, 10652, 0, - 8192, 10240, 10752, 10624, 10656, 10657, 10652, 10654, - 0, 8192, 10240, 10752, 10624, 0, 8192, 10240, - 10752, 10624, 10656, 0, 8192, 10240, 10752, 10624, - 10656, 0, 8192, 10240, 10752, 10624, 10656, 10658, - 0, 8192, 10240, 10752, 10624, 10656, 0, 8192, - 10240, 10752, 10624, 10656, 10660, 0, 8192, 10240, - 10752, 10624, 10656, 10660, 0, 8192, 10240, 10752, - 10624, 10656, 10664, 10662, 0, 8192, 10240, 10752, - 10624, 10656, 0, 8192, 10240, 10752, 10624, 10656, - 10664, 0, 8192, 10240, 10752, 10624, 10656, 10664, - 0, 8192, 10240, 10752, 10624, 10656, 10664, 10666, - 0, 8192, 10240, 10752, 10624, 10656, 10664, 0, - 8192, 10240, 10752, 10624, 10656, 10672, 10668, 0, - 8192, 10240, 10752, 10624, 10656, 10672, 10668, 0, - 8192, 10240, 10752, 10624, 10656, 10672, 10673, 10670, - 0, 8192, 10240, 10752, 10624, 10656, 0, 8192, - 10240, 10752, 10624, 10688, 10672, 0, 8192, 10240, - 10752, 10624, 10688, 10672, 0, 8192, 10240, 10752, - 10624, 10688, 10672, 10674, 0, 8192, 10240, 10752, - 10624, 10688, 10672, 0, 8192, 10240, 10752, 10624, - 10688, 10672, 10676, 0, 8192, 10240, 10752, 10624, - 10688, 10672, 10676, 0, 8192, 10240, 10752, 10624, - 10688, 10672, 10680, 10678, 0, 8192, 10240, 10752, - 10624, 10688, 10672, 0, 8192, 10240, 10752, 10624, - 10688, 10689, 10680, 0, 8192, 10240, 10752, 10624, - 10688, 10689, 10680, 0, 8192, 10240, 10752, 10624, - 10688, 10689, 10680, 10682, 0, 8192, 10240, 10752, - 10624, 10688, 10689, 10680, 0, 8192, 10240, 10752, - 10624, 10688, 10689, 10680, 10684, 0, 8192, 10240, - 10752, 10624, 10688, 10689, 10691, 10684, 0, 8192, - 10240, 10752, 10624, 10688, 10689, 10691, 10684, 10686, - 0, 8192, 10240, 10752, 10624, 0, 8192, 10240, - 10752, 10753, 10688, 0, 8192, 10240, 10752, 10753, - 10688, 0, 8192, 10240, 10752, 10753, 10688, 10690, - 0, 8192, 10240, 10752, 10753, 10688, 0, 8192, - 10240, 10752, 10753, 10688, 10692, 0, 8192, 10240, - 10752, 10753, 10688, 10692, 0, 8192, 10240, 10752, - 10753, 10688, 10696, 10694, 0, 8192, 10240, 10752, - 10753, 10688, 0, 8192, 10240, 10752, 10753, 10688, - 10696, 0, 8192, 10240, 10752, 10753, 10688, 10696, - 0, 8192, 10240, 10752, 10753, 10688, 10696, 10698, - 0, 8192, 10240, 10752, 10753, 10688, 10696, 0, - 8192, 10240, 10752, 10753, 10688, 10704, 10700, 0, - 8192, 10240, 10752, 10753, 10688, 10704, 10700, 0, - 8192, 10240, 10752, 10753, 10688, 10704, 10705, 10702, - 0, 8192, 10240, 10752, 10753, 10688, 0, 8192, - 10240, 10752, 10753, 10688, 10704, 0, 8192, 10240, - 10752, 10753, 10688, 10704, 0, 8192, 10240, 10752, - 10753, 10688, 10704, 10706, 0, 8192, 10240, 10752, - 10753, 10688, 10704, 0, 8192, 10240, 10752, 10753, - 10688, 10704, 10708, 0, 8192, 10240, 10752, 10753, - 10688, 10704, 10708, 0, 8192, 10240, 10752, 10753, - 10688, 10704, 10712, 10710, 0, 8192, 10240, 10752, - 10753, 10688, 10704, 0, 8192, 10240, 10752, 10753, - 10688, 10720, 10712, 0, 8192, 10240, 10752, 10753, - 10688, 10720, 10712, 0, 8192, 10240, 10752, 10753, - 10688, 10720, 10712, 10714, 0, 8192, 10240, 10752, - 10753, 10688, 10720, 10712, 0, 8192, 10240, 10752, - 10753, 10688, 10720, 10721, 10716, 0, 8192, 10240, - 10752, 10753, 10688, 10720, 10721, 10716, 0, 8192, - 10240, 10752, 10753, 10688, 10720, 10721, 10716, 10718, - 0, 8192, 10240, 10752, 10753, 10688, 0, 8192, - 10240, 10752, 10753, 10688, 10720, 0, 8192, 10240, - 10752, 10753, 10755, 10720, 0, 8192, 10240, 10752, - 10753, 10755, 10720, 10722, 0, 8192, 10240, 10752, - 10753, 10755, 10720, 0, 8192, 10240, 10752, 10753, - 10755, 10720, 10724, 0, 8192, 10240, 10752, 10753, - 10755, 10720, 10724, 0, 8192, 10240, 10752, 10753, - 10755, 10720, 10728, 10726, 0, 8192, 10240, 10752, - 10753, 10755, 10720, 0, 8192, 10240, 10752, 10753, - 10755, 10720, 10728, 0, 8192, 10240, 10752, 10753, - 10755, 10720, 10728, 0, 8192, 10240, 10752, 10753, - 10755, 10720, 10728, 10730, 0, 8192, 10240, 10752, - 10753, 10755, 10720, 10728, 0, 8192, 10240, 10752, - 10753, 10755, 10720, 10736, 10732, 0, 8192, 10240, - 10752, 10753, 10755, 10720, 10736, 10732, 0, 8192, - 10240, 10752, 10753, 10755, 10720, 10736, 10737, 10734, - 0, 8192, 10240, 10752, 10753, 10755, 10720, 0, - 8192, 10240, 10752, 10753, 10755, 10720, 10736, 0, - 8192, 10240, 10752, 10753, 10755, 10720, 10736, 0, - 8192, 10240, 10752, 10753, 10755, 10720, 10736, 10738, - 0, 8192, 10240, 10752, 10753, 10755, 10759, 10736, - 0, 8192, 10240, 10752, 10753, 10755, 10759, 10736, - 10740, 0, 8192, 10240, 10752, 10753, 10755, 10759, - 10736, 10740, 0, 8192, 10240, 10752, 10753, 10755, - 10759, 10736, 10744, 10742, 0, 8192, 10240, 10752, - 10753, 10755, 10759, 10736, 0, 8192, 10240, 10752, - 10753, 10755, 10759, 10736, 10744, 0, 8192, 10240, - 10752, 10753, 10755, 10759, 10736, 10744, 0, 8192, - 10240, 10752, 10753, 10755, 10759, 10736, 10744, 10746, - 0, 8192, 10240, 10752, 10753, 10755, 10759, 10736, - 10744, 0, 8192, 10240, 10752, 10753, 10755, 10759, - 10736, 10744, 10748, 0, 8192, 10240, 10752, 10753, - 10755, 10759, 10736, 10744, 10748, 0, 8192, 10240, - 10752, 10753, 10755, 10759, 10736, 10744, 10748, 10750, - 0, 8192, 10240, 0, 8192, 10240, 10752, 0, - 8192, 10240, 10752, 0, 8192, 10240, 10752, 10754, - 0, 8192, 10240, 10752, 0, 8192, 10240, 10752, - 10756, 0, 8192, 10240, 10752, 10756, 0, 8192, - 10240, 10752, 10760, 10758, 0, 8192, 10240, 10752, - 0, 8192, 10240, 10752, 10760, 0, 8192, 10240, - 10752, 10760, 0, 8192, 10240, 10752, 10760, 10762, - 0, 8192, 10240, 10752, 10760, 0, 8192, 10240, - 10752, 10768, 10764, 0, 8192, 10240, 10752, 10768, - 10764, 0, 8192, 10240, 10752, 10768, 10769, 10766, - 0, 8192, 10240, 10752, 0, 8192, 10240, 10752, - 10768, 0, 8192, 10240, 10752, 10768, 0, 8192, - 10240, 10752, 10768, 10770, 0, 8192, 10240, 10752, - 10768, 0, 8192, 10240, 10752, 10768, 10772, 0, - 8192, 10240, 10752, 10768, 10772, 0, 8192, 10240, - 10752, 10768, 10776, 10774, 0, 8192, 10240, 10752, - 10768, 0, 8192, 10240, 10752, 10784, 10776, 0, - 8192, 10240, 10752, 10784, 10776, 0, 8192, 10240, - 10752, 10784, 10776, 10778, 0, 8192, 10240, 10752, - 10784, 10776, 0, 8192, 10240, 10752, 10784, 10785, - 10780, 0, 8192, 10240, 10752, 10784, 10785, 10780, - 0, 8192, 10240, 10752, 10784, 10785, 10780, 10782, - 0, 8192, 10240, 10752, 0, 8192, 10240, 10752, - 10784, 0, 8192, 10240, 10752, 10784, 0, 8192, - 10240, 10752, 10784, 10786, 0, 8192, 10240, 10752, - 10784, 0, 8192, 10240, 10752, 10784, 10788, 0, - 8192, 10240, 10752, 10784, 10788, 0, 8192, 10240, - 10752, 10784, 10792, 10790, 0, 8192, 10240, 10752, - 10784, 0, 8192, 10240, 10752, 10784, 10792, 0, - 8192, 10240, 10752, 10784, 10792, 0, 8192, 10240, - 10752, 10784, 10792, 10794, 0, 8192, 10240, 10752, - 10784, 10792, 0, 8192, 10240, 10752, 10784, 10800, - 10796, 0, 8192, 10240, 10752, 10784, 10800, 10796, - 0, 8192, 10240, 10752, 10784, 10800, 10801, 10798, - 0, 8192, 10240, 10752, 10784, 0, 8192, 10240, - 10752, 10816, 10800, 0, 8192, 10240, 10752, 10816, - 10800, 0, 8192, 10240, 10752, 10816, 10800, 10802, - 0, 8192, 10240, 10752, 10816, 10800, 0, 8192, - 10240, 10752, 10816, 10800, 10804, 0, 8192, 10240, - 10752, 10816, 10800, 10804, 0, 8192, 10240, 10752, - 10816, 10800, 10808, 10806, 0, 8192, 10240, 10752, - 10816, 10800, 0, 8192, 10240, 10752, 10816, 10817, - 10808, 0, 8192, 10240, 10752, 10816, 10817, 10808, - 0, 8192, 10240, 10752, 10816, 10817, 10808, 10810, - 0, 8192, 10240, 10752, 10816, 10817, 10808, 0, - 8192, 10240, 10752, 10816, 10817, 10808, 10812, 0, - 8192, 10240, 10752, 10816, 10817, 10819, 10812, 0, - 8192, 10240, 10752, 10816, 10817, 10819, 10812, 10814, - 0, 8192, 10240, 10752, 0, 8192, 10240, 10752, - 10816, 0, 8192, 10240, 10752, 10816, 0, 8192, - 10240, 10752, 10816, 10818, 0, 8192, 10240, 10752, - 10816, 0, 8192, 10240, 10752, 10816, 10820, 0, - 8192, 10240, 10752, 10816, 10820, 0, 8192, 10240, - 10752, 10816, 10824, 10822, 0, 8192, 10240, 10752, - 10816, 0, 8192, 10240, 10752, 10816, 10824, 0, - 8192, 10240, 10752, 10816, 10824, 0, 8192, 10240, - 10752, 10816, 10824, 10826, 0, 8192, 10240, 10752, - 10816, 10824, 0, 8192, 10240, 10752, 10816, 10832, - 10828, 0, 8192, 10240, 10752, 10816, 10832, 10828, - 0, 8192, 10240, 10752, 10816, 10832, 10833, 10830, - 0, 8192, 10240, 10752, 10816, 0, 8192, 10240, - 10752, 10816, 10832, 0, 8192, 10240, 10752, 10816, - 10832, 0, 8192, 10240, 10752, 10816, 10832, 10834, - 0, 8192, 10240, 10752, 10816, 10832, 0, 8192, - 10240, 10752, 10816, 10832, 10836, 0, 8192, 10240, - 10752, 10816, 10832, 10836, 0, 8192, 10240, 10752, - 10816, 10832, 10840, 10838, 0, 8192, 10240, 10752, - 10816, 10832, 0, 8192, 10240, 10752, 10816, 10848, - 10840, 0, 8192, 10240, 10752, 10816, 10848, 10840, - 0, 8192, 10240, 10752, 10816, 10848, 10840, 10842, - 0, 8192, 10240, 10752, 10816, 10848, 10840, 0, - 8192, 10240, 10752, 10816, 10848, 10849, 10844, 0, - 8192, 10240, 10752, 10816, 10848, 10849, 10844, 0, - 8192, 10240, 10752, 10816, 10848, 10849, 10844, 10846, - 0, 8192, 10240, 10752, 10816, 0, 8192, 10240, - 10752, 10880, 10848, 0, 8192, 10240, 10752, 10880, - 10848, 0, 8192, 10240, 10752, 10880, 10848, 10850, - 0, 8192, 10240, 10752, 10880, 10848, 0, 8192, - 10240, 10752, 10880, 10848, 10852, 0, 8192, 10240, - 10752, 10880, 10848, 10852, 0, 8192, 10240, 10752, - 10880, 10848, 10856, 10854, 0, 8192, 10240, 10752, - 10880, 10848, 0, 8192, 10240, 10752, 10880, 10848, - 10856, 0, 8192, 10240, 10752, 10880, 10848, 10856, - 0, 8192, 10240, 10752, 10880, 10848, 10856, 10858, - 0, 8192, 10240, 10752, 10880, 10848, 10856, 0, - 8192, 10240, 10752, 10880, 10848, 10864, 10860, 0, - 8192, 10240, 10752, 10880, 10848, 10864, 10860, 0, - 8192, 10240, 10752, 10880, 10848, 10864, 10865, 10862, - 0, 8192, 10240, 10752, 10880, 10848, 0, 8192, - 10240, 10752, 10880, 10881, 10864, 0, 8192, 10240, - 10752, 10880, 10881, 10864, 0, 8192, 10240, 10752, - 10880, 10881, 10864, 10866, 0, 8192, 10240, 10752, - 10880, 10881, 10864, 0, 8192, 10240, 10752, 10880, - 10881, 10864, 10868, 0, 8192, 10240, 10752, 10880, - 10881, 10864, 10868, 0, 8192, 10240, 10752, 10880, - 10881, 10864, 10872, 10870, 0, 8192, 10240, 10752, - 10880, 10881, 10864, 0, 8192, 10240, 10752, 10880, - 10881, 10864, 10872, 0, 8192, 10240, 10752, 10880, - 10881, 10883, 10872, 0, 8192, 10240, 10752, 10880, - 10881, 10883, 10872, 10874, 0, 8192, 10240, 10752, - 10880, 10881, 10883, 10872, 0, 8192, 10240, 10752, - 10880, 10881, 10883, 10872, 10876, 0, 8192, 10240, - 10752, 10880, 10881, 10883, 10872, 10876, 0, 8192, - 10240, 10752, 10880, 10881, 10883, 10872, 10876, 10878, - 0, 8192, 10240, 10752, 0, 8192, 10240, 10752, - 10880, 0, 8192, 10240, 10752, 10880, 0, 8192, - 10240, 10752, 10880, 10882, 0, 8192, 10240, 10752, - 10880, 0, 8192, 10240, 10752, 10880, 10884, 0, - 8192, 10240, 10752, 10880, 10884, 0, 8192, 10240, - 10752, 10880, 10888, 10886, 0, 8192, 10240, 10752, - 10880, 0, 8192, 10240, 10752, 10880, 10888, 0, - 8192, 10240, 10752, 10880, 10888, 0, 8192, 10240, - 10752, 10880, 10888, 10890, 0, 8192, 10240, 10752, - 10880, 10888, 0, 8192, 10240, 10752, 10880, 10896, - 10892, 0, 8192, 10240, 10752, 10880, 10896, 10892, - 0, 8192, 10240, 10752, 10880, 10896, 10897, 10894, - 0, 8192, 10240, 10752, 10880, 0, 8192, 10240, - 10752, 10880, 10896, 0, 8192, 10240, 10752, 10880, - 10896, 0, 8192, 10240, 10752, 10880, 10896, 10898, - 0, 8192, 10240, 10752, 10880, 10896, 0, 8192, - 10240, 10752, 10880, 10896, 10900, 0, 8192, 10240, - 10752, 10880, 10896, 10900, 0, 8192, 10240, 10752, - 10880, 10896, 10904, 10902, 0, 8192, 10240, 10752, - 10880, 10896, 0, 8192, 10240, 10752, 10880, 10912, - 10904, 0, 8192, 10240, 10752, 10880, 10912, 10904, - 0, 8192, 10240, 10752, 10880, 10912, 10904, 10906, - 0, 8192, 10240, 10752, 10880, 10912, 10904, 0, - 8192, 10240, 10752, 10880, 10912, 10913, 10908, 0, - 8192, 10240, 10752, 10880, 10912, 10913, 10908, 0, - 8192, 10240, 10752, 10880, 10912, 10913, 10908, 10910, - 0, 8192, 10240, 10752, 10880, 0, 8192, 10240, - 10752, 10880, 10912, 0, 8192, 10240, 10752, 10880, - 10912, 0, 8192, 10240, 10752, 10880, 10912, 10914, - 0, 8192, 10240, 10752, 10880, 10912, 0, 8192, - 10240, 10752, 10880, 10912, 10916, 0, 8192, 10240, - 10752, 10880, 10912, 10916, 0, 8192, 10240, 10752, - 10880, 10912, 10920, 10918, 0, 8192, 10240, 10752, - 10880, 10912, 0, 8192, 10240, 10752, 10880, 10912, - 10920, 0, 8192, 10240, 10752, 10880, 10912, 10920, - 0, 8192, 10240, 10752, 10880, 10912, 10920, 10922, - 0, 8192, 10240, 10752, 10880, 10912, 10920, 0, - 8192, 10240, 10752, 10880, 10912, 10928, 10924, 0, - 8192, 10240, 10752, 10880, 10912, 10928, 10924, 0, - 8192, 10240, 10752, 10880, 10912, 10928, 10929, 10926, - 0, 8192, 10240, 10752, 10880, 10912, 0, 8192, - 10240, 10752, 10880, 10944, 10928, 0, 8192, 10240, - 10752, 10880, 10944, 10928, 0, 8192, 10240, 10752, - 10880, 10944, 10928, 10930, 0, 8192, 10240, 10752, - 10880, 10944, 10928, 0, 8192, 10240, 10752, 10880, - 10944, 10928, 10932, 0, 8192, 10240, 10752, 10880, - 10944, 10928, 10932, 0, 8192, 10240, 10752, 10880, - 10944, 10928, 10936, 10934, 0, 8192, 10240, 10752, - 10880, 10944, 10928, 0, 8192, 10240, 10752, 10880, - 10944, 10945, 10936, 0, 8192, 10240, 10752, 10880, - 10944, 10945, 10936, 0, 8192, 10240, 10752, 10880, - 10944, 10945, 10936, 10938, 0, 8192, 10240, 10752, - 10880, 10944, 10945, 10936, 0, 8192, 10240, 10752, - 10880, 10944, 10945, 10936, 10940, 0, 8192, 10240, - 10752, 10880, 10944, 10945, 10947, 10940, 0, 8192, - 10240, 10752, 10880, 10944, 10945, 10947, 10940, 10942, - 0, 8192, 10240, 10752, 10880, 0, 8192, 10240, - 10752, 11008, 10944, 0, 8192, 10240, 10752, 11008, - 10944, 0, 8192, 10240, 10752, 11008, 10944, 10946, - 0, 8192, 10240, 10752, 11008, 10944, 0, 8192, - 10240, 10752, 11008, 10944, 10948, 0, 8192, 10240, - 10752, 11008, 10944, 10948, 0, 8192, 10240, 10752, - 11008, 10944, 10952, 10950, 0, 8192, 10240, 10752, - 11008, 10944, 0, 8192, 10240, 10752, 11008, 10944, - 10952, 0, 8192, 10240, 10752, 11008, 10944, 10952, - 0, 8192, 10240, 10752, 11008, 10944, 10952, 10954, - 0, 8192, 10240, 10752, 11008, 10944, 10952, 0, - 8192, 10240, 10752, 11008, 10944, 10960, 10956, 0, - 8192, 10240, 10752, 11008, 10944, 10960, 10956, 0, - 8192, 10240, 10752, 11008, 10944, 10960, 10961, 10958, - 0, 8192, 10240, 10752, 11008, 10944, 0, 8192, - 10240, 10752, 11008, 10944, 10960, 0, 8192, 10240, - 10752, 11008, 10944, 10960, 0, 8192, 10240, 10752, - 11008, 10944, 10960, 10962, 0, 8192, 10240, 10752, - 11008, 10944, 10960, 0, 8192, 10240, 10752, 11008, - 10944, 10960, 10964, 0, 8192, 10240, 10752, 11008, - 10944, 10960, 10964, 0, 8192, 10240, 10752, 11008, - 10944, 10960, 10968, 10966, 0, 8192, 10240, 10752, - 11008, 10944, 10960, 0, 8192, 10240, 10752, 11008, - 10944, 10976, 10968, 0, 8192, 10240, 10752, 11008, - 10944, 10976, 10968, 0, 8192, 10240, 10752, 11008, - 10944, 10976, 10968, 10970, 0, 8192, 10240, 10752, - 11008, 10944, 10976, 10968, 0, 8192, 10240, 10752, - 11008, 10944, 10976, 10977, 10972, 0, 8192, 10240, - 10752, 11008, 10944, 10976, 10977, 10972, 0, 8192, - 10240, 10752, 11008, 10944, 10976, 10977, 10972, 10974, - 0, 8192, 10240, 10752, 11008, 10944, 0, 8192, - 10240, 10752, 11008, 11009, 10976, 0, 8192, 10240, - 10752, 11008, 11009, 10976, 0, 8192, 10240, 10752, - 11008, 11009, 10976, 10978, 0, 8192, 10240, 10752, - 11008, 11009, 10976, 0, 8192, 10240, 10752, 11008, - 11009, 10976, 10980, 0, 8192, 10240, 10752, 11008, - 11009, 10976, 10980, 0, 8192, 10240, 10752, 11008, - 11009, 10976, 10984, 10982, 0, 8192, 10240, 10752, - 11008, 11009, 10976, 0, 8192, 10240, 10752, 11008, - 11009, 10976, 10984, 0, 8192, 10240, 10752, 11008, - 11009, 10976, 10984, 0, 8192, 10240, 10752, 11008, - 11009, 10976, 10984, 10986, 0, 8192, 10240, 10752, - 11008, 11009, 10976, 10984, 0, 8192, 10240, 10752, - 11008, 11009, 10976, 10992, 10988, 0, 8192, 10240, - 10752, 11008, 11009, 10976, 10992, 10988, 0, 8192, - 10240, 10752, 11008, 11009, 10976, 10992, 10993, 10990, - 0, 8192, 10240, 10752, 11008, 11009, 10976, 0, - 8192, 10240, 10752, 11008, 11009, 10976, 10992, 0, - 8192, 10240, 10752, 11008, 11009, 11011, 10992, 0, - 8192, 10240, 10752, 11008, 11009, 11011, 10992, 10994, - 0, 8192, 10240, 10752, 11008, 11009, 11011, 10992, - 0, 8192, 10240, 10752, 11008, 11009, 11011, 10992, - 10996, 0, 8192, 10240, 10752, 11008, 11009, 11011, - 10992, 10996, 0, 8192, 10240, 10752, 11008, 11009, - 11011, 10992, 11000, 10998, 0, 8192, 10240, 10752, - 11008, 11009, 11011, 10992, 0, 8192, 10240, 10752, - 11008, 11009, 11011, 10992, 11000, 0, 8192, 10240, - 10752, 11008, 11009, 11011, 10992, 11000, 0, 8192, - 10240, 10752, 11008, 11009, 11011, 10992, 11000, 11002, - 0, 8192, 10240, 10752, 11008, 11009, 11011, 11015, - 11000, 0, 8192, 10240, 10752, 11008, 11009, 11011, - 11015, 11000, 11004, 0, 8192, 10240, 10752, 11008, - 11009, 11011, 11015, 11000, 11004, 0, 8192, 10240, - 10752, 11008, 11009, 11011, 11015, 11000, 11004, 11006, - 0, 8192, 10240, 10752, 0, 8192, 10240, 11264, - 11008, 0, 8192, 10240, 11264, 11008, 0, 8192, - 10240, 11264, 11008, 11010, 0, 8192, 10240, 11264, - 11008, 0, 8192, 10240, 11264, 11008, 11012, 0, - 8192, 10240, 11264, 11008, 11012, 0, 8192, 10240, - 11264, 11008, 11016, 11014, 0, 8192, 10240, 11264, - 11008, 0, 8192, 10240, 11264, 11008, 11016, 0, - 8192, 10240, 11264, 11008, 11016, 0, 8192, 10240, - 11264, 11008, 11016, 11018, 0, 8192, 10240, 11264, - 11008, 11016, 0, 8192, 10240, 11264, 11008, 11024, - 11020, 0, 8192, 10240, 11264, 11008, 11024, 11020, - 0, 8192, 10240, 11264, 11008, 11024, 11025, 11022, - 0, 8192, 10240, 11264, 11008, 0, 8192, 10240, - 11264, 11008, 11024, 0, 8192, 10240, 11264, 11008, - 11024, 0, 8192, 10240, 11264, 11008, 11024, 11026, - 0, 8192, 10240, 11264, 11008, 11024, 0, 8192, - 10240, 11264, 11008, 11024, 11028, 0, 8192, 10240, - 11264, 11008, 11024, 11028, 0, 8192, 10240, 11264, - 11008, 11024, 11032, 11030, 0, 8192, 10240, 11264, - 11008, 11024, 0, 8192, 10240, 11264, 11008, 11040, - 11032, 0, 8192, 10240, 11264, 11008, 11040, 11032, - 0, 8192, 10240, 11264, 11008, 11040, 11032, 11034, - 0, 8192, 10240, 11264, 11008, 11040, 11032, 0, - 8192, 10240, 11264, 11008, 11040, 11041, 11036, 0, - 8192, 10240, 11264, 11008, 11040, 11041, 11036, 0, - 8192, 10240, 11264, 11008, 11040, 11041, 11036, 11038, - 0, 8192, 10240, 11264, 11008, 0, 8192, 10240, - 11264, 11008, 11040, 0, 8192, 10240, 11264, 11008, - 11040, 0, 8192, 10240, 11264, 11008, 11040, 11042, - 0, 8192, 10240, 11264, 11008, 11040, 0, 8192, - 10240, 11264, 11008, 11040, 11044, 0, 8192, 10240, - 11264, 11008, 11040, 11044, 0, 8192, 10240, 11264, - 11008, 11040, 11048, 11046, 0, 8192, 10240, 11264, - 11008, 11040, 0, 8192, 10240, 11264, 11008, 11040, - 11048, 0, 8192, 10240, 11264, 11008, 11040, 11048, - 0, 8192, 10240, 11264, 11008, 11040, 11048, 11050, - 0, 8192, 10240, 11264, 11008, 11040, 11048, 0, - 8192, 10240, 11264, 11008, 11040, 11056, 11052, 0, - 8192, 10240, 11264, 11008, 11040, 11056, 11052, 0, - 8192, 10240, 11264, 11008, 11040, 11056, 11057, 11054, - 0, 8192, 10240, 11264, 11008, 11040, 0, 8192, - 10240, 11264, 11008, 11072, 11056, 0, 8192, 10240, - 11264, 11008, 11072, 11056, 0, 8192, 10240, 11264, - 11008, 11072, 11056, 11058, 0, 8192, 10240, 11264, - 11008, 11072, 11056, 0, 8192, 10240, 11264, 11008, - 11072, 11056, 11060, 0, 8192, 10240, 11264, 11008, - 11072, 11056, 11060, 0, 8192, 10240, 11264, 11008, - 11072, 11056, 11064, 11062, 0, 8192, 10240, 11264, - 11008, 11072, 11056, 0, 8192, 10240, 11264, 11008, - 11072, 11073, 11064, 0, 8192, 10240, 11264, 11008, - 11072, 11073, 11064, 0, 8192, 10240, 11264, 11008, - 11072, 11073, 11064, 11066, 0, 8192, 10240, 11264, - 11008, 11072, 11073, 11064, 0, 8192, 10240, 11264, - 11008, 11072, 11073, 11064, 11068, 0, 8192, 10240, - 11264, 11008, 11072, 11073, 11075, 11068, 0, 8192, - 10240, 11264, 11008, 11072, 11073, 11075, 11068, 11070, - 0, 8192, 10240, 11264, 11008, 0, 8192, 10240, - 11264, 11008, 11072, 0, 8192, 10240, 11264, 11008, - 11072, 0, 8192, 10240, 11264, 11008, 11072, 11074, - 0, 8192, 10240, 11264, 11008, 11072, 0, 8192, - 10240, 11264, 11008, 11072, 11076, 0, 8192, 10240, - 11264, 11008, 11072, 11076, 0, 8192, 10240, 11264, - 11008, 11072, 11080, 11078, 0, 8192, 10240, 11264, - 11008, 11072, 0, 8192, 10240, 11264, 11008, 11072, - 11080, 0, 8192, 10240, 11264, 11008, 11072, 11080, - 0, 8192, 10240, 11264, 11008, 11072, 11080, 11082, - 0, 8192, 10240, 11264, 11008, 11072, 11080, 0, - 8192, 10240, 11264, 11008, 11072, 11088, 11084, 0, - 8192, 10240, 11264, 11008, 11072, 11088, 11084, 0, - 8192, 10240, 11264, 11008, 11072, 11088, 11089, 11086, - 0, 8192, 10240, 11264, 11008, 11072, 0, 8192, - 10240, 11264, 11008, 11072, 11088, 0, 8192, 10240, - 11264, 11008, 11072, 11088, 0, 8192, 10240, 11264, - 11008, 11072, 11088, 11090, 0, 8192, 10240, 11264, - 11008, 11072, 11088, 0, 8192, 10240, 11264, 11008, - 11072, 11088, 11092, 0, 8192, 10240, 11264, 11008, - 11072, 11088, 11092, 0, 8192, 10240, 11264, 11008, - 11072, 11088, 11096, 11094, 0, 8192, 10240, 11264, - 11008, 11072, 11088, 0, 8192, 10240, 11264, 11008, - 11072, 11104, 11096, 0, 8192, 10240, 11264, 11008, - 11072, 11104, 11096, 0, 8192, 10240, 11264, 11008, - 11072, 11104, 11096, 11098, 0, 8192, 10240, 11264, - 11008, 11072, 11104, 11096, 0, 8192, 10240, 11264, - 11008, 11072, 11104, 11105, 11100, 0, 8192, 10240, - 11264, 11008, 11072, 11104, 11105, 11100, 0, 8192, - 10240, 11264, 11008, 11072, 11104, 11105, 11100, 11102, - 0, 8192, 10240, 11264, 11008, 11072, 0, 8192, - 10240, 11264, 11008, 11136, 11104, 0, 8192, 10240, - 11264, 11008, 11136, 11104, 0, 8192, 10240, 11264, - 11008, 11136, 11104, 11106, 0, 8192, 10240, 11264, - 11008, 11136, 11104, 0, 8192, 10240, 11264, 11008, - 11136, 11104, 11108, 0, 8192, 10240, 11264, 11008, - 11136, 11104, 11108, 0, 8192, 10240, 11264, 11008, - 11136, 11104, 11112, 11110, 0, 8192, 10240, 11264, - 11008, 11136, 11104, 0, 8192, 10240, 11264, 11008, - 11136, 11104, 11112, 0, 8192, 10240, 11264, 11008, - 11136, 11104, 11112, 0, 8192, 10240, 11264, 11008, - 11136, 11104, 11112, 11114, 0, 8192, 10240, 11264, - 11008, 11136, 11104, 11112, 0, 8192, 10240, 11264, - 11008, 11136, 11104, 11120, 11116, 0, 8192, 10240, - 11264, 11008, 11136, 11104, 11120, 11116, 0, 8192, - 10240, 11264, 11008, 11136, 11104, 11120, 11121, 11118, - 0, 8192, 10240, 11264, 11008, 11136, 11104, 0, - 8192, 10240, 11264, 11008, 11136, 11137, 11120, 0, - 8192, 10240, 11264, 11008, 11136, 11137, 11120, 0, - 8192, 10240, 11264, 11008, 11136, 11137, 11120, 11122, - 0, 8192, 10240, 11264, 11008, 11136, 11137, 11120, - 0, 8192, 10240, 11264, 11008, 11136, 11137, 11120, - 11124, 0, 8192, 10240, 11264, 11008, 11136, 11137, - 11120, 11124, 0, 8192, 10240, 11264, 11008, 11136, - 11137, 11120, 11128, 11126, 0, 8192, 10240, 11264, - 11008, 11136, 11137, 11120, 0, 8192, 10240, 11264, - 11008, 11136, 11137, 11120, 11128, 0, 8192, 10240, - 11264, 11008, 11136, 11137, 11139, 11128, 0, 8192, - 10240, 11264, 11008, 11136, 11137, 11139, 11128, 11130, - 0, 8192, 10240, 11264, 11008, 11136, 11137, 11139, - 11128, 0, 8192, 10240, 11264, 11008, 11136, 11137, - 11139, 11128, 11132, 0, 8192, 10240, 11264, 11008, - 11136, 11137, 11139, 11128, 11132, 0, 8192, 10240, - 11264, 11008, 11136, 11137, 11139, 11128, 11132, 11134, - 0, 8192, 10240, 11264, 11008, 0, 8192, 10240, - 11264, 11008, 11136, 0, 8192, 10240, 11264, 11265, - 11136, 0, 8192, 10240, 11264, 11265, 11136, 11138, - 0, 8192, 10240, 11264, 11265, 11136, 0, 8192, - 10240, 11264, 11265, 11136, 11140, 0, 8192, 10240, - 11264, 11265, 11136, 11140, 0, 8192, 10240, 11264, - 11265, 11136, 11144, 11142, 0, 8192, 10240, 11264, - 11265, 11136, 0, 8192, 10240, 11264, 11265, 11136, - 11144, 0, 8192, 10240, 11264, 11265, 11136, 11144, - 0, 8192, 10240, 11264, 11265, 11136, 11144, 11146, - 0, 8192, 10240, 11264, 11265, 11136, 11144, 0, - 8192, 10240, 11264, 11265, 11136, 11152, 11148, 0, - 8192, 10240, 11264, 11265, 11136, 11152, 11148, 0, - 8192, 10240, 11264, 11265, 11136, 11152, 11153, 11150, - 0, 8192, 10240, 11264, 11265, 11136, 0, 8192, - 10240, 11264, 11265, 11136, 11152, 0, 8192, 10240, - 11264, 11265, 11136, 11152, 0, 8192, 10240, 11264, - 11265, 11136, 11152, 11154, 0, 8192, 10240, 11264, - 11265, 11136, 11152, 0, 8192, 10240, 11264, 11265, - 11136, 11152, 11156, 0, 8192, 10240, 11264, 11265, - 11136, 11152, 11156, 0, 8192, 10240, 11264, 11265, - 11136, 11152, 11160, 11158, 0, 8192, 10240, 11264, - 11265, 11136, 11152, 0, 8192, 10240, 11264, 11265, - 11136, 11168, 11160, 0, 8192, 10240, 11264, 11265, - 11136, 11168, 11160, 0, 8192, 10240, 11264, 11265, - 11136, 11168, 11160, 11162, 0, 8192, 10240, 11264, - 11265, 11136, 11168, 11160, 0, 8192, 10240, 11264, - 11265, 11136, 11168, 11169, 11164, 0, 8192, 10240, - 11264, 11265, 11136, 11168, 11169, 11164, 0, 8192, - 10240, 11264, 11265, 11136, 11168, 11169, 11164, 11166, - 0, 8192, 10240, 11264, 11265, 11136, 0, 8192, - 10240, 11264, 11265, 11136, 11168, 0, 8192, 10240, - 11264, 11265, 11136, 11168, 0, 8192, 10240, 11264, - 11265, 11136, 11168, 11170, 0, 8192, 10240, 11264, - 11265, 11136, 11168, 0, 8192, 10240, 11264, 11265, - 11136, 11168, 11172, 0, 8192, 10240, 11264, 11265, - 11136, 11168, 11172, 0, 8192, 10240, 11264, 11265, - 11136, 11168, 11176, 11174, 0, 8192, 10240, 11264, - 11265, 11136, 11168, 0, 8192, 10240, 11264, 11265, - 11136, 11168, 11176, 0, 8192, 10240, 11264, 11265, - 11136, 11168, 11176, 0, 8192, 10240, 11264, 11265, - 11136, 11168, 11176, 11178, 0, 8192, 10240, 11264, - 11265, 11136, 11168, 11176, 0, 8192, 10240, 11264, - 11265, 11136, 11168, 11184, 11180, 0, 8192, 10240, - 11264, 11265, 11136, 11168, 11184, 11180, 0, 8192, - 10240, 11264, 11265, 11136, 11168, 11184, 11185, 11182, - 0, 8192, 10240, 11264, 11265, 11136, 11168, 0, - 8192, 10240, 11264, 11265, 11136, 11200, 11184, 0, - 8192, 10240, 11264, 11265, 11136, 11200, 11184, 0, - 8192, 10240, 11264, 11265, 11136, 11200, 11184, 11186, - 0, 8192, 10240, 11264, 11265, 11136, 11200, 11184, - 0, 8192, 10240, 11264, 11265, 11136, 11200, 11184, - 11188, 0, 8192, 10240, 11264, 11265, 11136, 11200, - 11184, 11188, 0, 8192, 10240, 11264, 11265, 11136, - 11200, 11184, 11192, 11190, 0, 8192, 10240, 11264, - 11265, 11136, 11200, 11184, 0, 8192, 10240, 11264, - 11265, 11136, 11200, 11201, 11192, 0, 8192, 10240, - 11264, 11265, 11136, 11200, 11201, 11192, 0, 8192, - 10240, 11264, 11265, 11136, 11200, 11201, 11192, 11194, - 0, 8192, 10240, 11264, 11265, 11136, 11200, 11201, - 11192, 0, 8192, 10240, 11264, 11265, 11136, 11200, - 11201, 11192, 11196, 0, 8192, 10240, 11264, 11265, - 11136, 11200, 11201, 11203, 11196, 0, 8192, 10240, - 11264, 11265, 11136, 11200, 11201, 11203, 11196, 11198, - 0, 8192, 10240, 11264, 11265, 11136, 0, 8192, - 10240, 11264, 11265, 11136, 11200, 0, 8192, 10240, - 11264, 11265, 11136, 11200, 0, 8192, 10240, 11264, - 11265, 11136, 11200, 11202, 0, 8192, 10240, 11264, - 11265, 11267, 11200, 0, 8192, 10240, 11264, 11265, - 11267, 11200, 11204, 0, 8192, 10240, 11264, 11265, - 11267, 11200, 11204, 0, 8192, 10240, 11264, 11265, - 11267, 11200, 11208, 11206, 0, 8192, 10240, 11264, - 11265, 11267, 11200, 0, 8192, 10240, 11264, 11265, - 11267, 11200, 11208, 0, 8192, 10240, 11264, 11265, - 11267, 11200, 11208, 0, 8192, 10240, 11264, 11265, - 11267, 11200, 11208, 11210, 0, 8192, 10240, 11264, - 11265, 11267, 11200, 11208, 0, 8192, 10240, 11264, - 11265, 11267, 11200, 11216, 11212, 0, 8192, 10240, - 11264, 11265, 11267, 11200, 11216, 11212, 0, 8192, - 10240, 11264, 11265, 11267, 11200, 11216, 11217, 11214, - 0, 8192, 10240, 11264, 11265, 11267, 11200, 0, - 8192, 10240, 11264, 11265, 11267, 11200, 11216, 0, - 8192, 10240, 11264, 11265, 11267, 11200, 11216, 0, - 8192, 10240, 11264, 11265, 11267, 11200, 11216, 11218, - 0, 8192, 10240, 11264, 11265, 11267, 11200, 11216, - 0, 8192, 10240, 11264, 11265, 11267, 11200, 11216, - 11220, 0, 8192, 10240, 11264, 11265, 11267, 11200, - 11216, 11220, 0, 8192, 10240, 11264, 11265, 11267, - 11200, 11216, 11224, 11222, 0, 8192, 10240, 11264, - 11265, 11267, 11200, 11216, 0, 8192, 10240, 11264, - 11265, 11267, 11200, 11232, 11224, 0, 8192, 10240, - 11264, 11265, 11267, 11200, 11232, 11224, 0, 8192, - 10240, 11264, 11265, 11267, 11200, 11232, 11224, 11226, - 0, 8192, 10240, 11264, 11265, 11267, 11200, 11232, - 11224, 0, 8192, 10240, 11264, 11265, 11267, 11200, - 11232, 11233, 11228, 0, 8192, 10240, 11264, 11265, - 11267, 11200, 11232, 11233, 11228, 0, 8192, 10240, - 11264, 11265, 11267, 11200, 11232, 11233, 11228, 11230, - 0, 8192, 10240, 11264, 11265, 11267, 11200, 0, - 8192, 10240, 11264, 11265, 11267, 11200, 11232, 0, - 8192, 10240, 11264, 11265, 11267, 11200, 11232, 0, - 8192, 10240, 11264, 11265, 11267, 11200, 11232, 11234, - 0, 8192, 10240, 11264, 11265, 11267, 11200, 11232, - 0, 8192, 10240, 11264, 11265, 11267, 11200, 11232, - 11236, 0, 8192, 10240, 11264, 11265, 11267, 11200, - 11232, 11236, 0, 8192, 10240, 11264, 11265, 11267, - 11200, 11232, 11240, 11238, 0, 8192, 10240, 11264, - 11265, 11267, 11271, 11232, 0, 8192, 10240, 11264, - 11265, 11267, 11271, 11232, 11240, 0, 8192, 10240, - 11264, 11265, 11267, 11271, 11232, 11240, 0, 8192, - 10240, 11264, 11265, 11267, 11271, 11232, 11240, 11242, - 0, 8192, 10240, 11264, 11265, 11267, 11271, 11232, - 11240, 0, 8192, 10240, 11264, 11265, 11267, 11271, - 11232, 11248, 11244, 0, 8192, 10240, 11264, 11265, - 11267, 11271, 11232, 11248, 11244, 0, 8192, 10240, - 11264, 11265, 11267, 11271, 11232, 11248, 11249, 11246, - 0, 8192, 10240, 11264, 11265, 11267, 11271, 11232, - 0, 8192, 10240, 11264, 11265, 11267, 11271, 11232, - 11248, 0, 8192, 10240, 11264, 11265, 11267, 11271, - 11232, 11248, 0, 8192, 10240, 11264, 11265, 11267, - 11271, 11232, 11248, 11250, 0, 8192, 10240, 11264, - 11265, 11267, 11271, 11232, 11248, 0, 8192, 10240, - 11264, 11265, 11267, 11271, 11232, 11248, 11252, 0, - 8192, 10240, 11264, 11265, 11267, 11271, 11232, 11248, - 11252, 0, 8192, 10240, 11264, 11265, 11267, 11271, - 11232, 11248, 11256, 11254, 0, 8192, 10240, 11264, - 11265, 11267, 11271, 11232, 11248, 0, 8192, 10240, - 11264, 11265, 11267, 11271, 11232, 11248, 11256, 0, - 8192, 10240, 11264, 11265, 11267, 11271, 11232, 11248, - 11256, 0, 8192, 10240, 11264, 11265, 11267, 11271, - 11232, 11248, 11256, 11258, 0, 8192, 10240, 11264, - 11265, 11267, 11271, 11232, 11248, 11256, 0, 8192, - 10240, 11264, 11265, 11267, 11271, 11232, 11248, 11256, - 11260, 0, 8192, 10240, 11264, 11265, 11267, 11271, - 11232, 11248, 11256, 11260, 0, 8192, 10240, 11264, - 11265, 11267, 11271, 11232, 11248, 11256, 11260, 11262, - 0, 8192, 10240, 0, 8192, 10240, 11264, 0, - 8192, 10240, 11264, 0, 8192, 10240, 11264, 11266, - 0, 8192, 10240, 11264, 0, 8192, 10240, 11264, - 11268, 0, 8192, 10240, 11264, 11268, 0, 8192, - 10240, 11264, 11272, 11270, 0, 8192, 10240, 11264, - 0, 8192, 10240, 11264, 11272, 0, 8192, 10240, - 11264, 11272, 0, 8192, 10240, 11264, 11272, 11274, - 0, 8192, 10240, 11264, 11272, 0, 8192, 10240, - 11264, 11280, 11276, 0, 8192, 10240, 11264, 11280, - 11276, 0, 8192, 10240, 11264, 11280, 11281, 11278, - 0, 8192, 10240, 11264, 0, 8192, 10240, 11264, - 11280, 0, 8192, 10240, 11264, 11280, 0, 8192, - 10240, 11264, 11280, 11282, 0, 8192, 10240, 11264, - 11280, 0, 8192, 10240, 11264, 11280, 11284, 0, - 8192, 10240, 11264, 11280, 11284, 0, 8192, 10240, - 11264, 11280, 11288, 11286, 0, 8192, 10240, 11264, - 11280, 0, 8192, 10240, 11264, 11296, 11288, 0, - 8192, 10240, 11264, 11296, 11288, 0, 8192, 10240, - 11264, 11296, 11288, 11290, 0, 8192, 10240, 11264, - 11296, 11288, 0, 8192, 10240, 11264, 11296, 11297, - 11292, 0, 8192, 10240, 11264, 11296, 11297, 11292, - 0, 8192, 10240, 11264, 11296, 11297, 11292, 11294, - 0, 8192, 10240, 11264, 0, 8192, 10240, 11264, - 11296, 0, 8192, 10240, 11264, 11296, 0, 8192, - 10240, 11264, 11296, 11298, 0, 8192, 10240, 11264, - 11296, 0, 8192, 10240, 11264, 11296, 11300, 0, - 8192, 10240, 11264, 11296, 11300, 0, 8192, 10240, - 11264, 11296, 11304, 11302, 0, 8192, 10240, 11264, - 11296, 0, 8192, 10240, 11264, 11296, 11304, 0, - 8192, 10240, 11264, 11296, 11304, 0, 8192, 10240, - 11264, 11296, 11304, 11306, 0, 8192, 10240, 11264, - 11296, 11304, 0, 8192, 10240, 11264, 11296, 11312, - 11308, 0, 8192, 10240, 11264, 11296, 11312, 11308, - 0, 8192, 10240, 11264, 11296, 11312, 11313, 11310, - 0, 8192, 10240, 11264, 11296, 0, 8192, 10240, - 11264, 11328, 11312, 0, 8192, 10240, 11264, 11328, - 11312, 0, 8192, 10240, 11264, 11328, 11312, 11314, - 0, 8192, 10240, 11264, 11328, 11312, 0, 8192, - 10240, 11264, 11328, 11312, 11316, 0, 8192, 10240, - 11264, 11328, 11312, 11316, 0, 8192, 10240, 11264, - 11328, 11312, 11320, 11318, 0, 8192, 10240, 11264, - 11328, 11312, 0, 8192, 10240, 11264, 11328, 11329, - 11320, 0, 8192, 10240, 11264, 11328, 11329, 11320, - 0, 8192, 10240, 11264, 11328, 11329, 11320, 11322, - 0, 8192, 10240, 11264, 11328, 11329, 11320, 0, - 8192, 10240, 11264, 11328, 11329, 11320, 11324, 0, - 8192, 10240, 11264, 11328, 11329, 11331, 11324, 0, - 8192, 10240, 11264, 11328, 11329, 11331, 11324, 11326, - 0, 8192, 10240, 11264, 0, 8192, 10240, 11264, - 11328, 0, 8192, 10240, 11264, 11328, 0, 8192, - 10240, 11264, 11328, 11330, 0, 8192, 10240, 11264, - 11328, 0, 8192, 10240, 11264, 11328, 11332, 0, - 8192, 10240, 11264, 11328, 11332, 0, 8192, 10240, - 11264, 11328, 11336, 11334, 0, 8192, 10240, 11264, - 11328, 0, 8192, 10240, 11264, 11328, 11336, 0, - 8192, 10240, 11264, 11328, 11336, 0, 8192, 10240, - 11264, 11328, 11336, 11338, 0, 8192, 10240, 11264, - 11328, 11336, 0, 8192, 10240, 11264, 11328, 11344, - 11340, 0, 8192, 10240, 11264, 11328, 11344, 11340, - 0, 8192, 10240, 11264, 11328, 11344, 11345, 11342, - 0, 8192, 10240, 11264, 11328, 0, 8192, 10240, - 11264, 11328, 11344, 0, 8192, 10240, 11264, 11328, - 11344, 0, 8192, 10240, 11264, 11328, 11344, 11346, - 0, 8192, 10240, 11264, 11328, 11344, 0, 8192, - 10240, 11264, 11328, 11344, 11348, 0, 8192, 10240, - 11264, 11328, 11344, 11348, 0, 8192, 10240, 11264, - 11328, 11344, 11352, 11350, 0, 8192, 10240, 11264, - 11328, 11344, 0, 8192, 10240, 11264, 11328, 11360, - 11352, 0, 8192, 10240, 11264, 11328, 11360, 11352, - 0, 8192, 10240, 11264, 11328, 11360, 11352, 11354, - 0, 8192, 10240, 11264, 11328, 11360, 11352, 0, - 8192, 10240, 11264, 11328, 11360, 11361, 11356, 0, - 8192, 10240, 11264, 11328, 11360, 11361, 11356, 0, - 8192, 10240, 11264, 11328, 11360, 11361, 11356, 11358, - 0, 8192, 10240, 11264, 11328, 0, 8192, 10240, - 11264, 11392, 11360, 0, 8192, 10240, 11264, 11392, - 11360, 0, 8192, 10240, 11264, 11392, 11360, 11362, - 0, 8192, 10240, 11264, 11392, 11360, 0, 8192, - 10240, 11264, 11392, 11360, 11364, 0, 8192, 10240, - 11264, 11392, 11360, 11364, 0, 8192, 10240, 11264, - 11392, 11360, 11368, 11366, 0, 8192, 10240, 11264, - 11392, 11360, 0, 8192, 10240, 11264, 11392, 11360, - 11368, 0, 8192, 10240, 11264, 11392, 11360, 11368, - 0, 8192, 10240, 11264, 11392, 11360, 11368, 11370, - 0, 8192, 10240, 11264, 11392, 11360, 11368, 0, - 8192, 10240, 11264, 11392, 11360, 11376, 11372, 0, - 8192, 10240, 11264, 11392, 11360, 11376, 11372, 0, - 8192, 10240, 11264, 11392, 11360, 11376, 11377, 11374, - 0, 8192, 10240, 11264, 11392, 11360, 0, 8192, - 10240, 11264, 11392, 11393, 11376, 0, 8192, 10240, - 11264, 11392, 11393, 11376, 0, 8192, 10240, 11264, - 11392, 11393, 11376, 11378, 0, 8192, 10240, 11264, - 11392, 11393, 11376, 0, 8192, 10240, 11264, 11392, - 11393, 11376, 11380, 0, 8192, 10240, 11264, 11392, - 11393, 11376, 11380, 0, 8192, 10240, 11264, 11392, - 11393, 11376, 11384, 11382, 0, 8192, 10240, 11264, - 11392, 11393, 11376, 0, 8192, 10240, 11264, 11392, - 11393, 11376, 11384, 0, 8192, 10240, 11264, 11392, - 11393, 11395, 11384, 0, 8192, 10240, 11264, 11392, - 11393, 11395, 11384, 11386, 0, 8192, 10240, 11264, - 11392, 11393, 11395, 11384, 0, 8192, 10240, 11264, - 11392, 11393, 11395, 11384, 11388, 0, 8192, 10240, - 11264, 11392, 11393, 11395, 11384, 11388, 0, 8192, - 10240, 11264, 11392, 11393, 11395, 11384, 11388, 11390, - 0, 8192, 10240, 11264, 0, 8192, 10240, 11264, - 11392, 0, 8192, 10240, 11264, 11392, 0, 8192, - 10240, 11264, 11392, 11394, 0, 8192, 10240, 11264, - 11392, 0, 8192, 10240, 11264, 11392, 11396, 0, - 8192, 10240, 11264, 11392, 11396, 0, 8192, 10240, - 11264, 11392, 11400, 11398, 0, 8192, 10240, 11264, - 11392, 0, 8192, 10240, 11264, 11392, 11400, 0, - 8192, 10240, 11264, 11392, 11400, 0, 8192, 10240, - 11264, 11392, 11400, 11402, 0, 8192, 10240, 11264, - 11392, 11400, 0, 8192, 10240, 11264, 11392, 11408, - 11404, 0, 8192, 10240, 11264, 11392, 11408, 11404, - 0, 8192, 10240, 11264, 11392, 11408, 11409, 11406, - 0, 8192, 10240, 11264, 11392, 0, 8192, 10240, - 11264, 11392, 11408, 0, 8192, 10240, 11264, 11392, - 11408, 0, 8192, 10240, 11264, 11392, 11408, 11410, - 0, 8192, 10240, 11264, 11392, 11408, 0, 8192, - 10240, 11264, 11392, 11408, 11412, 0, 8192, 10240, - 11264, 11392, 11408, 11412, 0, 8192, 10240, 11264, - 11392, 11408, 11416, 11414, 0, 8192, 10240, 11264, - 11392, 11408, 0, 8192, 10240, 11264, 11392, 11424, - 11416, 0, 8192, 10240, 11264, 11392, 11424, 11416, - 0, 8192, 10240, 11264, 11392, 11424, 11416, 11418, - 0, 8192, 10240, 11264, 11392, 11424, 11416, 0, - 8192, 10240, 11264, 11392, 11424, 11425, 11420, 0, - 8192, 10240, 11264, 11392, 11424, 11425, 11420, 0, - 8192, 10240, 11264, 11392, 11424, 11425, 11420, 11422, - 0, 8192, 10240, 11264, 11392, 0, 8192, 10240, - 11264, 11392, 11424, 0, 8192, 10240, 11264, 11392, - 11424, 0, 8192, 10240, 11264, 11392, 11424, 11426, - 0, 8192, 10240, 11264, 11392, 11424, 0, 8192, - 10240, 11264, 11392, 11424, 11428, 0, 8192, 10240, - 11264, 11392, 11424, 11428, 0, 8192, 10240, 11264, - 11392, 11424, 11432, 11430, 0, 8192, 10240, 11264, - 11392, 11424, 0, 8192, 10240, 11264, 11392, 11424, - 11432, 0, 8192, 10240, 11264, 11392, 11424, 11432, - 0, 8192, 10240, 11264, 11392, 11424, 11432, 11434, - 0, 8192, 10240, 11264, 11392, 11424, 11432, 0, - 8192, 10240, 11264, 11392, 11424, 11440, 11436, 0, - 8192, 10240, 11264, 11392, 11424, 11440, 11436, 0, - 8192, 10240, 11264, 11392, 11424, 11440, 11441, 11438, - 0, 8192, 10240, 11264, 11392, 11424, 0, 8192, - 10240, 11264, 11392, 11456, 11440, 0, 8192, 10240, - 11264, 11392, 11456, 11440, 0, 8192, 10240, 11264, - 11392, 11456, 11440, 11442, 0, 8192, 10240, 11264, - 11392, 11456, 11440, 0, 8192, 10240, 11264, 11392, - 11456, 11440, 11444, 0, 8192, 10240, 11264, 11392, - 11456, 11440, 11444, 0, 8192, 10240, 11264, 11392, - 11456, 11440, 11448, 11446, 0, 8192, 10240, 11264, - 11392, 11456, 11440, 0, 8192, 10240, 11264, 11392, - 11456, 11457, 11448, 0, 8192, 10240, 11264, 11392, - 11456, 11457, 11448, 0, 8192, 10240, 11264, 11392, - 11456, 11457, 11448, 11450, 0, 8192, 10240, 11264, - 11392, 11456, 11457, 11448, 0, 8192, 10240, 11264, - 11392, 11456, 11457, 11448, 11452, 0, 8192, 10240, - 11264, 11392, 11456, 11457, 11459, 11452, 0, 8192, - 10240, 11264, 11392, 11456, 11457, 11459, 11452, 11454, - 0, 8192, 10240, 11264, 11392, 0, 8192, 10240, - 11264, 11520, 11456, 0, 8192, 10240, 11264, 11520, - 11456, 0, 8192, 10240, 11264, 11520, 11456, 11458, - 0, 8192, 10240, 11264, 11520, 11456, 0, 8192, - 10240, 11264, 11520, 11456, 11460, 0, 8192, 10240, - 11264, 11520, 11456, 11460, 0, 8192, 10240, 11264, - 11520, 11456, 11464, 11462, 0, 8192, 10240, 11264, - 11520, 11456, 0, 8192, 10240, 11264, 11520, 11456, - 11464, 0, 8192, 10240, 11264, 11520, 11456, 11464, - 0, 8192, 10240, 11264, 11520, 11456, 11464, 11466, - 0, 8192, 10240, 11264, 11520, 11456, 11464, 0, - 8192, 10240, 11264, 11520, 11456, 11472, 11468, 0, - 8192, 10240, 11264, 11520, 11456, 11472, 11468, 0, - 8192, 10240, 11264, 11520, 11456, 11472, 11473, 11470, - 0, 8192, 10240, 11264, 11520, 11456, 0, 8192, - 10240, 11264, 11520, 11456, 11472, 0, 8192, 10240, - 11264, 11520, 11456, 11472, 0, 8192, 10240, 11264, - 11520, 11456, 11472, 11474, 0, 8192, 10240, 11264, - 11520, 11456, 11472, 0, 8192, 10240, 11264, 11520, - 11456, 11472, 11476, 0, 8192, 10240, 11264, 11520, - 11456, 11472, 11476, 0, 8192, 10240, 11264, 11520, - 11456, 11472, 11480, 11478, 0, 8192, 10240, 11264, - 11520, 11456, 11472, 0, 8192, 10240, 11264, 11520, - 11456, 11488, 11480, 0, 8192, 10240, 11264, 11520, - 11456, 11488, 11480, 0, 8192, 10240, 11264, 11520, - 11456, 11488, 11480, 11482, 0, 8192, 10240, 11264, - 11520, 11456, 11488, 11480, 0, 8192, 10240, 11264, - 11520, 11456, 11488, 11489, 11484, 0, 8192, 10240, - 11264, 11520, 11456, 11488, 11489, 11484, 0, 8192, - 10240, 11264, 11520, 11456, 11488, 11489, 11484, 11486, - 0, 8192, 10240, 11264, 11520, 11456, 0, 8192, - 10240, 11264, 11520, 11521, 11488, 0, 8192, 10240, - 11264, 11520, 11521, 11488, 0, 8192, 10240, 11264, - 11520, 11521, 11488, 11490, 0, 8192, 10240, 11264, - 11520, 11521, 11488, 0, 8192, 10240, 11264, 11520, - 11521, 11488, 11492, 0, 8192, 10240, 11264, 11520, - 11521, 11488, 11492, 0, 8192, 10240, 11264, 11520, - 11521, 11488, 11496, 11494, 0, 8192, 10240, 11264, - 11520, 11521, 11488, 0, 8192, 10240, 11264, 11520, - 11521, 11488, 11496, 0, 8192, 10240, 11264, 11520, - 11521, 11488, 11496, 0, 8192, 10240, 11264, 11520, - 11521, 11488, 11496, 11498, 0, 8192, 10240, 11264, - 11520, 11521, 11488, 11496, 0, 8192, 10240, 11264, - 11520, 11521, 11488, 11504, 11500, 0, 8192, 10240, - 11264, 11520, 11521, 11488, 11504, 11500, 0, 8192, - 10240, 11264, 11520, 11521, 11488, 11504, 11505, 11502, - 0, 8192, 10240, 11264, 11520, 11521, 11488, 0, - 8192, 10240, 11264, 11520, 11521, 11488, 11504, 0, - 8192, 10240, 11264, 11520, 11521, 11523, 11504, 0, - 8192, 10240, 11264, 11520, 11521, 11523, 11504, 11506, - 0, 8192, 10240, 11264, 11520, 11521, 11523, 11504, - 0, 8192, 10240, 11264, 11520, 11521, 11523, 11504, - 11508, 0, 8192, 10240, 11264, 11520, 11521, 11523, - 11504, 11508, 0, 8192, 10240, 11264, 11520, 11521, - 11523, 11504, 11512, 11510, 0, 8192, 10240, 11264, - 11520, 11521, 11523, 11504, 0, 8192, 10240, 11264, - 11520, 11521, 11523, 11504, 11512, 0, 8192, 10240, - 11264, 11520, 11521, 11523, 11504, 11512, 0, 8192, - 10240, 11264, 11520, 11521, 11523, 11504, 11512, 11514, - 0, 8192, 10240, 11264, 11520, 11521, 11523, 11527, - 11512, 0, 8192, 10240, 11264, 11520, 11521, 11523, - 11527, 11512, 11516, 0, 8192, 10240, 11264, 11520, - 11521, 11523, 11527, 11512, 11516, 0, 8192, 10240, - 11264, 11520, 11521, 11523, 11527, 11512, 11516, 11518, - 0, 8192, 10240, 11264, 0, 8192, 12288, 11264, - 11520, 0, 8192, 12288, 11264, 11520, 0, 8192, - 12288, 11264, 11520, 11522, 0, 8192, 12288, 11264, - 11520, 0, 8192, 12288, 11264, 11520, 11524, 0, - 8192, 12288, 11264, 11520, 11524, 0, 8192, 12288, - 11264, 11520, 11528, 11526, 0, 8192, 12288, 11264, - 11520, 0, 8192, 12288, 11264, 11520, 11528, 0, - 8192, 12288, 11264, 11520, 11528, 0, 8192, 12288, - 11264, 11520, 11528, 11530, 0, 8192, 12288, 11264, - 11520, 11528, 0, 8192, 12288, 11264, 11520, 11536, - 11532, 0, 8192, 12288, 11264, 11520, 11536, 11532, - 0, 8192, 12288, 11264, 11520, 11536, 11537, 11534, - 0, 8192, 12288, 11264, 11520, 0, 8192, 12288, - 11264, 11520, 11536, 0, 8192, 12288, 11264, 11520, - 11536, 0, 8192, 12288, 11264, 11520, 11536, 11538, - 0, 8192, 12288, 11264, 11520, 11536, 0, 8192, - 12288, 11264, 11520, 11536, 11540, 0, 8192, 12288, - 11264, 11520, 11536, 11540, 0, 8192, 12288, 11264, - 11520, 11536, 11544, 11542, 0, 8192, 12288, 11264, - 11520, 11536, 0, 8192, 12288, 11264, 11520, 11552, - 11544, 0, 8192, 12288, 11264, 11520, 11552, 11544, - 0, 8192, 12288, 11264, 11520, 11552, 11544, 11546, - 0, 8192, 12288, 11264, 11520, 11552, 11544, 0, - 8192, 12288, 11264, 11520, 11552, 11553, 11548, 0, - 8192, 12288, 11264, 11520, 11552, 11553, 11548, 0, - 8192, 12288, 11264, 11520, 11552, 11553, 11548, 11550, - 0, 8192, 12288, 11264, 11520, 0, 8192, 12288, - 11264, 11520, 11552, 0, 8192, 12288, 11264, 11520, - 11552, 0, 8192, 12288, 11264, 11520, 11552, 11554, - 0, 8192, 12288, 11264, 11520, 11552, 0, 8192, - 12288, 11264, 11520, 11552, 11556, 0, 8192, 12288, - 11264, 11520, 11552, 11556, 0, 8192, 12288, 11264, - 11520, 11552, 11560, 11558, 0, 8192, 12288, 11264, - 11520, 11552, 0, 8192, 12288, 11264, 11520, 11552, - 11560, 0, 8192, 12288, 11264, 11520, 11552, 11560, - 0, 8192, 12288, 11264, 11520, 11552, 11560, 11562, - 0, 8192, 12288, 11264, 11520, 11552, 11560, 0, - 8192, 12288, 11264, 11520, 11552, 11568, 11564, 0, - 8192, 12288, 11264, 11520, 11552, 11568, 11564, 0, - 8192, 12288, 11264, 11520, 11552, 11568, 11569, 11566, - 0, 8192, 12288, 11264, 11520, 11552, 0, 8192, - 12288, 11264, 11520, 11584, 11568, 0, 8192, 12288, - 11264, 11520, 11584, 11568, 0, 8192, 12288, 11264, - 11520, 11584, 11568, 11570, 0, 8192, 12288, 11264, - 11520, 11584, 11568, 0, 8192, 12288, 11264, 11520, - 11584, 11568, 11572, 0, 8192, 12288, 11264, 11520, - 11584, 11568, 11572, 0, 8192, 12288, 11264, 11520, - 11584, 11568, 11576, 11574, 0, 8192, 12288, 11264, - 11520, 11584, 11568, 0, 8192, 12288, 11264, 11520, - 11584, 11585, 11576, 0, 8192, 12288, 11264, 11520, - 11584, 11585, 11576, 0, 8192, 12288, 11264, 11520, - 11584, 11585, 11576, 11578, 0, 8192, 12288, 11264, - 11520, 11584, 11585, 11576, 0, 8192, 12288, 11264, - 11520, 11584, 11585, 11576, 11580, 0, 8192, 12288, - 11264, 11520, 11584, 11585, 11587, 11580, 0, 8192, - 12288, 11264, 11520, 11584, 11585, 11587, 11580, 11582, - 0, 8192, 12288, 11264, 11520, 0, 8192, 12288, - 11264, 11520, 11584, 0, 8192, 12288, 11264, 11520, - 11584, 0, 8192, 12288, 11264, 11520, 11584, 11586, - 0, 8192, 12288, 11264, 11520, 11584, 0, 8192, - 12288, 11264, 11520, 11584, 11588, 0, 8192, 12288, - 11264, 11520, 11584, 11588, 0, 8192, 12288, 11264, - 11520, 11584, 11592, 11590, 0, 8192, 12288, 11264, - 11520, 11584, 0, 8192, 12288, 11264, 11520, 11584, - 11592, 0, 8192, 12288, 11264, 11520, 11584, 11592, - 0, 8192, 12288, 11264, 11520, 11584, 11592, 11594, - 0, 8192, 12288, 11264, 11520, 11584, 11592, 0, - 8192, 12288, 11264, 11520, 11584, 11600, 11596, 0, - 8192, 12288, 11264, 11520, 11584, 11600, 11596, 0, - 8192, 12288, 11264, 11520, 11584, 11600, 11601, 11598, - 0, 8192, 12288, 11264, 11520, 11584, 0, 8192, - 12288, 11264, 11520, 11584, 11600, 0, 8192, 12288, - 11264, 11520, 11584, 11600, 0, 8192, 12288, 11264, - 11520, 11584, 11600, 11602, 0, 8192, 12288, 11264, - 11520, 11584, 11600, 0, 8192, 12288, 11264, 11520, - 11584, 11600, 11604, 0, 8192, 12288, 11264, 11520, - 11584, 11600, 11604, 0, 8192, 12288, 11264, 11520, - 11584, 11600, 11608, 11606, 0, 8192, 12288, 11264, - 11520, 11584, 11600, 0, 8192, 12288, 11264, 11520, - 11584, 11616, 11608, 0, 8192, 12288, 11264, 11520, - 11584, 11616, 11608, 0, 8192, 12288, 11264, 11520, - 11584, 11616, 11608, 11610, 0, 8192, 12288, 11264, - 11520, 11584, 11616, 11608, 0, 8192, 12288, 11264, - 11520, 11584, 11616, 11617, 11612, 0, 8192, 12288, - 11264, 11520, 11584, 11616, 11617, 11612, 0, 8192, - 12288, 11264, 11520, 11584, 11616, 11617, 11612, 11614, - 0, 8192, 12288, 11264, 11520, 11584, 0, 8192, - 12288, 11264, 11520, 11648, 11616, 0, 8192, 12288, - 11264, 11520, 11648, 11616, 0, 8192, 12288, 11264, - 11520, 11648, 11616, 11618, 0, 8192, 12288, 11264, - 11520, 11648, 11616, 0, 8192, 12288, 11264, 11520, - 11648, 11616, 11620, 0, 8192, 12288, 11264, 11520, - 11648, 11616, 11620, 0, 8192, 12288, 11264, 11520, - 11648, 11616, 11624, 11622, 0, 8192, 12288, 11264, - 11520, 11648, 11616, 0, 8192, 12288, 11264, 11520, - 11648, 11616, 11624, 0, 8192, 12288, 11264, 11520, - 11648, 11616, 11624, 0, 8192, 12288, 11264, 11520, - 11648, 11616, 11624, 11626, 0, 8192, 12288, 11264, - 11520, 11648, 11616, 11624, 0, 8192, 12288, 11264, - 11520, 11648, 11616, 11632, 11628, 0, 8192, 12288, - 11264, 11520, 11648, 11616, 11632, 11628, 0, 8192, - 12288, 11264, 11520, 11648, 11616, 11632, 11633, 11630, - 0, 8192, 12288, 11264, 11520, 11648, 11616, 0, - 8192, 12288, 11264, 11520, 11648, 11649, 11632, 0, - 8192, 12288, 11264, 11520, 11648, 11649, 11632, 0, - 8192, 12288, 11264, 11520, 11648, 11649, 11632, 11634, - 0, 8192, 12288, 11264, 11520, 11648, 11649, 11632, - 0, 8192, 12288, 11264, 11520, 11648, 11649, 11632, - 11636, 0, 8192, 12288, 11264, 11520, 11648, 11649, - 11632, 11636, 0, 8192, 12288, 11264, 11520, 11648, - 11649, 11632, 11640, 11638, 0, 8192, 12288, 11264, - 11520, 11648, 11649, 11632, 0, 8192, 12288, 11264, - 11520, 11648, 11649, 11632, 11640, 0, 8192, 12288, - 11264, 11520, 11648, 11649, 11651, 11640, 0, 8192, - 12288, 11264, 11520, 11648, 11649, 11651, 11640, 11642, - 0, 8192, 12288, 11264, 11520, 11648, 11649, 11651, - 11640, 0, 8192, 12288, 11264, 11520, 11648, 11649, - 11651, 11640, 11644, 0, 8192, 12288, 11264, 11520, - 11648, 11649, 11651, 11640, 11644, 0, 8192, 12288, - 11264, 11520, 11648, 11649, 11651, 11640, 11644, 11646, - 0, 8192, 12288, 11264, 11520, 0, 8192, 12288, - 11264, 11776, 11648, 0, 8192, 12288, 11264, 11776, - 11648, 0, 8192, 12288, 11264, 11776, 11648, 11650, - 0, 8192, 12288, 11264, 11776, 11648, 0, 8192, - 12288, 11264, 11776, 11648, 11652, 0, 8192, 12288, - 11264, 11776, 11648, 11652, 0, 8192, 12288, 11264, - 11776, 11648, 11656, 11654, 0, 8192, 12288, 11264, - 11776, 11648, 0, 8192, 12288, 11264, 11776, 11648, - 11656, 0, 8192, 12288, 11264, 11776, 11648, 11656, - 0, 8192, 12288, 11264, 11776, 11648, 11656, 11658, - 0, 8192, 12288, 11264, 11776, 11648, 11656, 0, - 8192, 12288, 11264, 11776, 11648, 11664, 11660, 0, - 8192, 12288, 11264, 11776, 11648, 11664, 11660, 0, - 8192, 12288, 11264, 11776, 11648, 11664, 11665, 11662, - 0, 8192, 12288, 11264, 11776, 11648, 0, 8192, - 12288, 11264, 11776, 11648, 11664, 0, 8192, 12288, - 11264, 11776, 11648, 11664, 0, 8192, 12288, 11264, - 11776, 11648, 11664, 11666, 0, 8192, 12288, 11264, - 11776, 11648, 11664, 0, 8192, 12288, 11264, 11776, - 11648, 11664, 11668, 0, 8192, 12288, 11264, 11776, - 11648, 11664, 11668, 0, 8192, 12288, 11264, 11776, - 11648, 11664, 11672, 11670, 0, 8192, 12288, 11264, - 11776, 11648, 11664, 0, 8192, 12288, 11264, 11776, - 11648, 11680, 11672, 0, 8192, 12288, 11264, 11776, - 11648, 11680, 11672, 0, 8192, 12288, 11264, 11776, - 11648, 11680, 11672, 11674, 0, 8192, 12288, 11264, - 11776, 11648, 11680, 11672, 0, 8192, 12288, 11264, - 11776, 11648, 11680, 11681, 11676, 0, 8192, 12288, - 11264, 11776, 11648, 11680, 11681, 11676, 0, 8192, - 12288, 11264, 11776, 11648, 11680, 11681, 11676, 11678, - 0, 8192, 12288, 11264, 11776, 11648, 0, 8192, - 12288, 11264, 11776, 11648, 11680, 0, 8192, 12288, - 11264, 11776, 11648, 11680, 0, 8192, 12288, 11264, - 11776, 11648, 11680, 11682, 0, 8192, 12288, 11264, - 11776, 11648, 11680, 0, 8192, 12288, 11264, 11776, - 11648, 11680, 11684, 0, 8192, 12288, 11264, 11776, - 11648, 11680, 11684, 0, 8192, 12288, 11264, 11776, - 11648, 11680, 11688, 11686, 0, 8192, 12288, 11264, - 11776, 11648, 11680, 0, 8192, 12288, 11264, 11776, - 11648, 11680, 11688, 0, 8192, 12288, 11264, 11776, - 11648, 11680, 11688, 0, 8192, 12288, 11264, 11776, - 11648, 11680, 11688, 11690, 0, 8192, 12288, 11264, - 11776, 11648, 11680, 11688, 0, 8192, 12288, 11264, - 11776, 11648, 11680, 11696, 11692, 0, 8192, 12288, - 11264, 11776, 11648, 11680, 11696, 11692, 0, 8192, - 12288, 11264, 11776, 11648, 11680, 11696, 11697, 11694, - 0, 8192, 12288, 11264, 11776, 11648, 11680, 0, - 8192, 12288, 11264, 11776, 11648, 11712, 11696, 0, - 8192, 12288, 11264, 11776, 11648, 11712, 11696, 0, - 8192, 12288, 11264, 11776, 11648, 11712, 11696, 11698, - 0, 8192, 12288, 11264, 11776, 11648, 11712, 11696, - 0, 8192, 12288, 11264, 11776, 11648, 11712, 11696, - 11700, 0, 8192, 12288, 11264, 11776, 11648, 11712, - 11696, 11700, 0, 8192, 12288, 11264, 11776, 11648, - 11712, 11696, 11704, 11702, 0, 8192, 12288, 11264, - 11776, 11648, 11712, 11696, 0, 8192, 12288, 11264, - 11776, 11648, 11712, 11713, 11704, 0, 8192, 12288, - 11264, 11776, 11648, 11712, 11713, 11704, 0, 8192, - 12288, 11264, 11776, 11648, 11712, 11713, 11704, 11706, - 0, 8192, 12288, 11264, 11776, 11648, 11712, 11713, - 11704, 0, 8192, 12288, 11264, 11776, 11648, 11712, - 11713, 11704, 11708, 0, 8192, 12288, 11264, 11776, - 11648, 11712, 11713, 11715, 11708, 0, 8192, 12288, - 11264, 11776, 11648, 11712, 11713, 11715, 11708, 11710, - 0, 8192, 12288, 11264, 11776, 11648, 0, 8192, - 12288, 11264, 11776, 11777, 11712, 0, 8192, 12288, - 11264, 11776, 11777, 11712, 0, 8192, 12288, 11264, - 11776, 11777, 11712, 11714, 0, 8192, 12288, 11264, - 11776, 11777, 11712, 0, 8192, 12288, 11264, 11776, - 11777, 11712, 11716, 0, 8192, 12288, 11264, 11776, - 11777, 11712, 11716, 0, 8192, 12288, 11264, 11776, - 11777, 11712, 11720, 11718, 0, 8192, 12288, 11264, - 11776, 11777, 11712, 0, 8192, 12288, 11264, 11776, - 11777, 11712, 11720, 0, 8192, 12288, 11264, 11776, - 11777, 11712, 11720, 0, 8192, 12288, 11264, 11776, - 11777, 11712, 11720, 11722, 0, 8192, 12288, 11264, - 11776, 11777, 11712, 11720, 0, 8192, 12288, 11264, - 11776, 11777, 11712, 11728, 11724, 0, 8192, 12288, - 11264, 11776, 11777, 11712, 11728, 11724, 0, 8192, - 12288, 11264, 11776, 11777, 11712, 11728, 11729, 11726, - 0, 8192, 12288, 11264, 11776, 11777, 11712, 0, - 8192, 12288, 11264, 11776, 11777, 11712, 11728, 0, - 8192, 12288, 11264, 11776, 11777, 11712, 11728, 0, - 8192, 12288, 11264, 11776, 11777, 11712, 11728, 11730, - 0, 8192, 12288, 11264, 11776, 11777, 11712, 11728, - 0, 8192, 12288, 11264, 11776, 11777, 11712, 11728, - 11732, 0, 8192, 12288, 11264, 11776, 11777, 11712, - 11728, 11732, 0, 8192, 12288, 11264, 11776, 11777, - 11712, 11728, 11736, 11734, 0, 8192, 12288, 11264, - 11776, 11777, 11712, 11728, 0, 8192, 12288, 11264, - 11776, 11777, 11712, 11744, 11736, 0, 8192, 12288, - 11264, 11776, 11777, 11712, 11744, 11736, 0, 8192, - 12288, 11264, 11776, 11777, 11712, 11744, 11736, 11738, - 0, 8192, 12288, 11264, 11776, 11777, 11712, 11744, - 11736, 0, 8192, 12288, 11264, 11776, 11777, 11712, - 11744, 11745, 11740, 0, 8192, 12288, 11264, 11776, - 11777, 11712, 11744, 11745, 11740, 0, 8192, 12288, - 11264, 11776, 11777, 11712, 11744, 11745, 11740, 11742, - 0, 8192, 12288, 11264, 11776, 11777, 11712, 0, - 8192, 12288, 11264, 11776, 11777, 11712, 11744, 0, - 8192, 12288, 11264, 11776, 11777, 11779, 11744, 0, - 8192, 12288, 11264, 11776, 11777, 11779, 11744, 11746, - 0, 8192, 12288, 11264, 11776, 11777, 11779, 11744, - 0, 8192, 12288, 11264, 11776, 11777, 11779, 11744, - 11748, 0, 8192, 12288, 11264, 11776, 11777, 11779, - 11744, 11748, 0, 8192, 12288, 11264, 11776, 11777, - 11779, 11744, 11752, 11750, 0, 8192, 12288, 11264, - 11776, 11777, 11779, 11744, 0, 8192, 12288, 11264, - 11776, 11777, 11779, 11744, 11752, 0, 8192, 12288, - 11264, 11776, 11777, 11779, 11744, 11752, 0, 8192, - 12288, 11264, 11776, 11777, 11779, 11744, 11752, 11754, - 0, 8192, 12288, 11264, 11776, 11777, 11779, 11744, - 11752, 0, 8192, 12288, 11264, 11776, 11777, 11779, - 11744, 11760, 11756, 0, 8192, 12288, 11264, 11776, - 11777, 11779, 11744, 11760, 11756, 0, 8192, 12288, - 11264, 11776, 11777, 11779, 11744, 11760, 11761, 11758, - 0, 8192, 12288, 11264, 11776, 11777, 11779, 11744, - 0, 8192, 12288, 11264, 11776, 11777, 11779, 11744, - 11760, 0, 8192, 12288, 11264, 11776, 11777, 11779, - 11744, 11760, 0, 8192, 12288, 11264, 11776, 11777, - 11779, 11744, 11760, 11762, 0, 8192, 12288, 11264, - 11776, 11777, 11779, 11783, 11760, 0, 8192, 12288, - 11264, 11776, 11777, 11779, 11783, 11760, 11764, 0, - 8192, 12288, 11264, 11776, 11777, 11779, 11783, 11760, - 11764, 0, 8192, 12288, 11264, 11776, 11777, 11779, - 11783, 11760, 11768, 11766, 0, 8192, 12288, 11264, - 11776, 11777, 11779, 11783, 11760, 0, 8192, 12288, - 11264, 11776, 11777, 11779, 11783, 11760, 11768, 0, - 8192, 12288, 11264, 11776, 11777, 11779, 11783, 11760, - 11768, 0, 8192, 12288, 11264, 11776, 11777, 11779, - 11783, 11760, 11768, 11770, 0, 8192, 12288, 11264, - 11776, 11777, 11779, 11783, 11760, 11768, 0, 8192, - 12288, 11264, 11776, 11777, 11779, 11783, 11760, 11768, - 11772, 0, 8192, 12288, 11264, 11776, 11777, 11779, - 11783, 11760, 11768, 11772, 0, 8192, 12288, 11264, - 11776, 11777, 11779, 11783, 11760, 11768, 11772, 11774, - 0, 8192, 12288, 11264, 0, 8192, 12288, 11264, - 11776, 0, 8192, 12288, 12289, 11776, 0, 8192, - 12288, 12289, 11776, 11778, 0, 8192, 12288, 12289, - 11776, 0, 8192, 12288, 12289, 11776, 11780, 0, - 8192, 12288, 12289, 11776, 11780, 0, 8192, 12288, - 12289, 11776, 11784, 11782, 0, 8192, 12288, 12289, - 11776, 0, 8192, 12288, 12289, 11776, 11784, 0, - 8192, 12288, 12289, 11776, 11784, 0, 8192, 12288, - 12289, 11776, 11784, 11786, 0, 8192, 12288, 12289, - 11776, 11784, 0, 8192, 12288, 12289, 11776, 11792, - 11788, 0, 8192, 12288, 12289, 11776, 11792, 11788, - 0, 8192, 12288, 12289, 11776, 11792, 11793, 11790, - 0, 8192, 12288, 12289, 11776, 0, 8192, 12288, - 12289, 11776, 11792, 0, 8192, 12288, 12289, 11776, - 11792, 0, 8192, 12288, 12289, 11776, 11792, 11794, - 0, 8192, 12288, 12289, 11776, 11792, 0, 8192, - 12288, 12289, 11776, 11792, 11796, 0, 8192, 12288, - 12289, 11776, 11792, 11796, 0, 8192, 12288, 12289, - 11776, 11792, 11800, 11798, 0, 8192, 12288, 12289, - 11776, 11792, 0, 8192, 12288, 12289, 11776, 11808, - 11800, 0, 8192, 12288, 12289, 11776, 11808, 11800, - 0, 8192, 12288, 12289, 11776, 11808, 11800, 11802, - 0, 8192, 12288, 12289, 11776, 11808, 11800, 0, - 8192, 12288, 12289, 11776, 11808, 11809, 11804, 0, - 8192, 12288, 12289, 11776, 11808, 11809, 11804, 0, - 8192, 12288, 12289, 11776, 11808, 11809, 11804, 11806, - 0, 8192, 12288, 12289, 11776, 0, 8192, 12288, - 12289, 11776, 11808, 0, 8192, 12288, 12289, 11776, - 11808, 0, 8192, 12288, 12289, 11776, 11808, 11810, - 0, 8192, 12288, 12289, 11776, 11808, 0, 8192, - 12288, 12289, 11776, 11808, 11812, 0, 8192, 12288, - 12289, 11776, 11808, 11812, 0, 8192, 12288, 12289, - 11776, 11808, 11816, 11814, 0, 8192, 12288, 12289, - 11776, 11808, 0, 8192, 12288, 12289, 11776, 11808, - 11816, 0, 8192, 12288, 12289, 11776, 11808, 11816, - 0, 8192, 12288, 12289, 11776, 11808, 11816, 11818, - 0, 8192, 12288, 12289, 11776, 11808, 11816, 0, - 8192, 12288, 12289, 11776, 11808, 11824, 11820, 0, - 8192, 12288, 12289, 11776, 11808, 11824, 11820, 0, - 8192, 12288, 12289, 11776, 11808, 11824, 11825, 11822, - 0, 8192, 12288, 12289, 11776, 11808, 0, 8192, - 12288, 12289, 11776, 11840, 11824, 0, 8192, 12288, - 12289, 11776, 11840, 11824, 0, 8192, 12288, 12289, - 11776, 11840, 11824, 11826, 0, 8192, 12288, 12289, - 11776, 11840, 11824, 0, 8192, 12288, 12289, 11776, - 11840, 11824, 11828, 0, 8192, 12288, 12289, 11776, - 11840, 11824, 11828, 0, 8192, 12288, 12289, 11776, - 11840, 11824, 11832, 11830, 0, 8192, 12288, 12289, - 11776, 11840, 11824, 0, 8192, 12288, 12289, 11776, - 11840, 11841, 11832, 0, 8192, 12288, 12289, 11776, - 11840, 11841, 11832, 0, 8192, 12288, 12289, 11776, - 11840, 11841, 11832, 11834, 0, 8192, 12288, 12289, - 11776, 11840, 11841, 11832, 0, 8192, 12288, 12289, - 11776, 11840, 11841, 11832, 11836, 0, 8192, 12288, - 12289, 11776, 11840, 11841, 11843, 11836, 0, 8192, - 12288, 12289, 11776, 11840, 11841, 11843, 11836, 11838, - 0, 8192, 12288, 12289, 11776, 0, 8192, 12288, - 12289, 11776, 11840, 0, 8192, 12288, 12289, 11776, - 11840, 0, 8192, 12288, 12289, 11776, 11840, 11842, - 0, 8192, 12288, 12289, 11776, 11840, 0, 8192, - 12288, 12289, 11776, 11840, 11844, 0, 8192, 12288, - 12289, 11776, 11840, 11844, 0, 8192, 12288, 12289, - 11776, 11840, 11848, 11846, 0, 8192, 12288, 12289, - 11776, 11840, 0, 8192, 12288, 12289, 11776, 11840, - 11848, 0, 8192, 12288, 12289, 11776, 11840, 11848, - 0, 8192, 12288, 12289, 11776, 11840, 11848, 11850, - 0, 8192, 12288, 12289, 11776, 11840, 11848, 0, - 8192, 12288, 12289, 11776, 11840, 11856, 11852, 0, - 8192, 12288, 12289, 11776, 11840, 11856, 11852, 0, - 8192, 12288, 12289, 11776, 11840, 11856, 11857, 11854, - 0, 8192, 12288, 12289, 11776, 11840, 0, 8192, - 12288, 12289, 11776, 11840, 11856, 0, 8192, 12288, - 12289, 11776, 11840, 11856, 0, 8192, 12288, 12289, - 11776, 11840, 11856, 11858, 0, 8192, 12288, 12289, - 11776, 11840, 11856, 0, 8192, 12288, 12289, 11776, - 11840, 11856, 11860, 0, 8192, 12288, 12289, 11776, - 11840, 11856, 11860, 0, 8192, 12288, 12289, 11776, - 11840, 11856, 11864, 11862, 0, 8192, 12288, 12289, - 11776, 11840, 11856, 0, 8192, 12288, 12289, 11776, - 11840, 11872, 11864, 0, 8192, 12288, 12289, 11776, - 11840, 11872, 11864, 0, 8192, 12288, 12289, 11776, - 11840, 11872, 11864, 11866, 0, 8192, 12288, 12289, - 11776, 11840, 11872, 11864, 0, 8192, 12288, 12289, - 11776, 11840, 11872, 11873, 11868, 0, 8192, 12288, - 12289, 11776, 11840, 11872, 11873, 11868, 0, 8192, - 12288, 12289, 11776, 11840, 11872, 11873, 11868, 11870, - 0, 8192, 12288, 12289, 11776, 11840, 0, 8192, - 12288, 12289, 11776, 11904, 11872, 0, 8192, 12288, - 12289, 11776, 11904, 11872, 0, 8192, 12288, 12289, - 11776, 11904, 11872, 11874, 0, 8192, 12288, 12289, - 11776, 11904, 11872, 0, 8192, 12288, 12289, 11776, - 11904, 11872, 11876, 0, 8192, 12288, 12289, 11776, - 11904, 11872, 11876, 0, 8192, 12288, 12289, 11776, - 11904, 11872, 11880, 11878, 0, 8192, 12288, 12289, - 11776, 11904, 11872, 0, 8192, 12288, 12289, 11776, - 11904, 11872, 11880, 0, 8192, 12288, 12289, 11776, - 11904, 11872, 11880, 0, 8192, 12288, 12289, 11776, - 11904, 11872, 11880, 11882, 0, 8192, 12288, 12289, - 11776, 11904, 11872, 11880, 0, 8192, 12288, 12289, - 11776, 11904, 11872, 11888, 11884, 0, 8192, 12288, - 12289, 11776, 11904, 11872, 11888, 11884, 0, 8192, - 12288, 12289, 11776, 11904, 11872, 11888, 11889, 11886, - 0, 8192, 12288, 12289, 11776, 11904, 11872, 0, - 8192, 12288, 12289, 11776, 11904, 11905, 11888, 0, - 8192, 12288, 12289, 11776, 11904, 11905, 11888, 0, - 8192, 12288, 12289, 11776, 11904, 11905, 11888, 11890, - 0, 8192, 12288, 12289, 11776, 11904, 11905, 11888, - 0, 8192, 12288, 12289, 11776, 11904, 11905, 11888, - 11892, 0, 8192, 12288, 12289, 11776, 11904, 11905, - 11888, 11892, 0, 8192, 12288, 12289, 11776, 11904, - 11905, 11888, 11896, 11894, 0, 8192, 12288, 12289, - 11776, 11904, 11905, 11888, 0, 8192, 12288, 12289, - 11776, 11904, 11905, 11888, 11896, 0, 8192, 12288, - 12289, 11776, 11904, 11905, 11907, 11896, 0, 8192, - 12288, 12289, 11776, 11904, 11905, 11907, 11896, 11898, - 0, 8192, 12288, 12289, 11776, 11904, 11905, 11907, - 11896, 0, 8192, 12288, 12289, 11776, 11904, 11905, - 11907, 11896, 11900, 0, 8192, 12288, 12289, 11776, - 11904, 11905, 11907, 11896, 11900, 0, 8192, 12288, - 12289, 11776, 11904, 11905, 11907, 11896, 11900, 11902, - 0, 8192, 12288, 12289, 11776, 0, 8192, 12288, - 12289, 11776, 11904, 0, 8192, 12288, 12289, 11776, - 11904, 0, 8192, 12288, 12289, 11776, 11904, 11906, - 0, 8192, 12288, 12289, 11776, 11904, 0, 8192, - 12288, 12289, 11776, 11904, 11908, 0, 8192, 12288, - 12289, 11776, 11904, 11908, 0, 8192, 12288, 12289, - 11776, 11904, 11912, 11910, 0, 8192, 12288, 12289, - 11776, 11904, 0, 8192, 12288, 12289, 11776, 11904, - 11912, 0, 8192, 12288, 12289, 11776, 11904, 11912, - 0, 8192, 12288, 12289, 11776, 11904, 11912, 11914, - 0, 8192, 12288, 12289, 11776, 11904, 11912, 0, - 8192, 12288, 12289, 11776, 11904, 11920, 11916, 0, - 8192, 12288, 12289, 11776, 11904, 11920, 11916, 0, - 8192, 12288, 12289, 11776, 11904, 11920, 11921, 11918, - 0, 8192, 12288, 12289, 11776, 11904, 0, 8192, - 12288, 12289, 11776, 11904, 11920, 0, 8192, 12288, - 12289, 11776, 11904, 11920, 0, 8192, 12288, 12289, - 11776, 11904, 11920, 11922, 0, 8192, 12288, 12289, - 11776, 11904, 11920, 0, 8192, 12288, 12289, 11776, - 11904, 11920, 11924, 0, 8192, 12288, 12289, 11776, - 11904, 11920, 11924, 0, 8192, 12288, 12289, 11776, - 11904, 11920, 11928, 11926, 0, 8192, 12288, 12289, - 11776, 11904, 11920, 0, 8192, 12288, 12289, 11776, - 11904, 11936, 11928, 0, 8192, 12288, 12289, 11776, - 11904, 11936, 11928, 0, 8192, 12288, 12289, 11776, - 11904, 11936, 11928, 11930, 0, 8192, 12288, 12289, - 11776, 11904, 11936, 11928, 0, 8192, 12288, 12289, - 11776, 11904, 11936, 11937, 11932, 0, 8192, 12288, - 12289, 11776, 11904, 11936, 11937, 11932, 0, 8192, - 12288, 12289, 11776, 11904, 11936, 11937, 11932, 11934, - 0, 8192, 12288, 12289, 11776, 11904, 0, 8192, - 12288, 12289, 11776, 11904, 11936, 0, 8192, 12288, - 12289, 11776, 11904, 11936, 0, 8192, 12288, 12289, - 11776, 11904, 11936, 11938, 0, 8192, 12288, 12289, - 11776, 11904, 11936, 0, 8192, 12288, 12289, 11776, - 11904, 11936, 11940, 0, 8192, 12288, 12289, 11776, - 11904, 11936, 11940, 0, 8192, 12288, 12289, 11776, - 11904, 11936, 11944, 11942, 0, 8192, 12288, 12289, - 11776, 11904, 11936, 0, 8192, 12288, 12289, 11776, - 11904, 11936, 11944, 0, 8192, 12288, 12289, 11776, - 11904, 11936, 11944, 0, 8192, 12288, 12289, 11776, - 11904, 11936, 11944, 11946, 0, 8192, 12288, 12289, - 11776, 11904, 11936, 11944, 0, 8192, 12288, 12289, - 11776, 11904, 11936, 11952, 11948, 0, 8192, 12288, - 12289, 11776, 11904, 11936, 11952, 11948, 0, 8192, - 12288, 12289, 11776, 11904, 11936, 11952, 11953, 11950, - 0, 8192, 12288, 12289, 11776, 11904, 11936, 0, - 8192, 12288, 12289, 11776, 11904, 11968, 11952, 0, - 8192, 12288, 12289, 11776, 11904, 11968, 11952, 0, - 8192, 12288, 12289, 11776, 11904, 11968, 11952, 11954, - 0, 8192, 12288, 12289, 11776, 11904, 11968, 11952, - 0, 8192, 12288, 12289, 11776, 11904, 11968, 11952, - 11956, 0, 8192, 12288, 12289, 11776, 11904, 11968, - 11952, 11956, 0, 8192, 12288, 12289, 11776, 11904, - 11968, 11952, 11960, 11958, 0, 8192, 12288, 12289, - 11776, 11904, 11968, 11952, 0, 8192, 12288, 12289, - 11776, 11904, 11968, 11969, 11960, 0, 8192, 12288, - 12289, 11776, 11904, 11968, 11969, 11960, 0, 8192, - 12288, 12289, 11776, 11904, 11968, 11969, 11960, 11962, - 0, 8192, 12288, 12289, 11776, 11904, 11968, 11969, - 11960, 0, 8192, 12288, 12289, 11776, 11904, 11968, - 11969, 11960, 11964, 0, 8192, 12288, 12289, 11776, - 11904, 11968, 11969, 11971, 11964, 0, 8192, 12288, - 12289, 11776, 11904, 11968, 11969, 11971, 11964, 11966, - 0, 8192, 12288, 12289, 11776, 11904, 0, 8192, - 12288, 12289, 11776, 12032, 11968, 0, 8192, 12288, - 12289, 11776, 12032, 11968, 0, 8192, 12288, 12289, - 11776, 12032, 11968, 11970, 0, 8192, 12288, 12289, - 11776, 12032, 11968, 0, 8192, 12288, 12289, 11776, - 12032, 11968, 11972, 0, 8192, 12288, 12289, 11776, - 12032, 11968, 11972, 0, 8192, 12288, 12289, 11776, - 12032, 11968, 11976, 11974, 0, 8192, 12288, 12289, - 11776, 12032, 11968, 0, 8192, 12288, 12289, 11776, - 12032, 11968, 11976, 0, 8192, 12288, 12289, 11776, - 12032, 11968, 11976, 0, 8192, 12288, 12289, 11776, - 12032, 11968, 11976, 11978, 0, 8192, 12288, 12289, - 11776, 12032, 11968, 11976, 0, 8192, 12288, 12289, - 11776, 12032, 11968, 11984, 11980, 0, 8192, 12288, - 12289, 11776, 12032, 11968, 11984, 11980, 0, 8192, - 12288, 12289, 11776, 12032, 11968, 11984, 11985, 11982, - 0, 8192, 12288, 12289, 11776, 12032, 11968, 0, - 8192, 12288, 12289, 11776, 12032, 11968, 11984, 0, - 8192, 12288, 12289, 11776, 12032, 11968, 11984, 0, - 8192, 12288, 12289, 11776, 12032, 11968, 11984, 11986, - 0, 8192, 12288, 12289, 11776, 12032, 11968, 11984, - 0, 8192, 12288, 12289, 11776, 12032, 11968, 11984, - 11988, 0, 8192, 12288, 12289, 11776, 12032, 11968, - 11984, 11988, 0, 8192, 12288, 12289, 11776, 12032, - 11968, 11984, 11992, 11990, 0, 8192, 12288, 12289, - 11776, 12032, 11968, 11984, 0, 8192, 12288, 12289, - 11776, 12032, 11968, 12000, 11992, 0, 8192, 12288, - 12289, 11776, 12032, 11968, 12000, 11992, 0, 8192, - 12288, 12289, 11776, 12032, 11968, 12000, 11992, 11994, - 0, 8192, 12288, 12289, 11776, 12032, 11968, 12000, - 11992, 0, 8192, 12288, 12289, 11776, 12032, 11968, - 12000, 12001, 11996, 0, 8192, 12288, 12289, 11776, - 12032, 11968, 12000, 12001, 11996, 0, 8192, 12288, - 12289, 11776, 12032, 11968, 12000, 12001, 11996, 11998, - 0, 8192, 12288, 12289, 11776, 12032, 11968, 0, - 8192, 12288, 12289, 11776, 12032, 12033, 12000, 0, - 8192, 12288, 12289, 11776, 12032, 12033, 12000, 0, - 8192, 12288, 12289, 11776, 12032, 12033, 12000, 12002, - 0, 8192, 12288, 12289, 11776, 12032, 12033, 12000, - 0, 8192, 12288, 12289, 11776, 12032, 12033, 12000, - 12004, 0, 8192, 12288, 12289, 11776, 12032, 12033, - 12000, 12004, 0, 8192, 12288, 12289, 11776, 12032, - 12033, 12000, 12008, 12006, 0, 8192, 12288, 12289, - 11776, 12032, 12033, 12000, 0, 8192, 12288, 12289, - 11776, 12032, 12033, 12000, 12008, 0, 8192, 12288, - 12289, 11776, 12032, 12033, 12000, 12008, 0, 8192, - 12288, 12289, 11776, 12032, 12033, 12000, 12008, 12010, - 0, 8192, 12288, 12289, 11776, 12032, 12033, 12000, - 12008, 0, 8192, 12288, 12289, 11776, 12032, 12033, - 12000, 12016, 12012, 0, 8192, 12288, 12289, 11776, - 12032, 12033, 12000, 12016, 12012, 0, 8192, 12288, - 12289, 11776, 12032, 12033, 12000, 12016, 12017, 12014, - 0, 8192, 12288, 12289, 11776, 12032, 12033, 12000, - 0, 8192, 12288, 12289, 11776, 12032, 12033, 12000, - 12016, 0, 8192, 12288, 12289, 11776, 12032, 12033, - 12035, 12016, 0, 8192, 12288, 12289, 11776, 12032, - 12033, 12035, 12016, 12018, 0, 8192, 12288, 12289, - 11776, 12032, 12033, 12035, 12016, 0, 8192, 12288, - 12289, 11776, 12032, 12033, 12035, 12016, 12020, 0, - 8192, 12288, 12289, 11776, 12032, 12033, 12035, 12016, - 12020, 0, 8192, 12288, 12289, 11776, 12032, 12033, - 12035, 12016, 12024, 12022, 0, 8192, 12288, 12289, - 11776, 12032, 12033, 12035, 12016, 0, 8192, 12288, - 12289, 11776, 12032, 12033, 12035, 12016, 12024, 0, - 8192, 12288, 12289, 11776, 12032, 12033, 12035, 12016, - 12024, 0, 8192, 12288, 12289, 11776, 12032, 12033, - 12035, 12016, 12024, 12026, 0, 8192, 12288, 12289, - 11776, 12032, 12033, 12035, 12039, 12024, 0, 8192, - 12288, 12289, 11776, 12032, 12033, 12035, 12039, 12024, - 12028, 0, 8192, 12288, 12289, 11776, 12032, 12033, - 12035, 12039, 12024, 12028, 0, 8192, 12288, 12289, - 11776, 12032, 12033, 12035, 12039, 12024, 12028, 12030, - 0, 8192, 12288, 12289, 11776, 0, 8192, 12288, - 12289, 11776, 12032, 0, 8192, 12288, 12289, 11776, - 12032, 0, 8192, 12288, 12289, 11776, 12032, 12034, - 0, 8192, 12288, 12289, 12291, 12032, 0, 8192, - 12288, 12289, 12291, 12032, 12036, 0, 8192, 12288, - 12289, 12291, 12032, 12036, 0, 8192, 12288, 12289, - 12291, 12032, 12040, 12038, 0, 8192, 12288, 12289, - 12291, 12032, 0, 8192, 12288, 12289, 12291, 12032, - 12040, 0, 8192, 12288, 12289, 12291, 12032, 12040, - 0, 8192, 12288, 12289, 12291, 12032, 12040, 12042, - 0, 8192, 12288, 12289, 12291, 12032, 12040, 0, - 8192, 12288, 12289, 12291, 12032, 12048, 12044, 0, - 8192, 12288, 12289, 12291, 12032, 12048, 12044, 0, - 8192, 12288, 12289, 12291, 12032, 12048, 12049, 12046, - 0, 8192, 12288, 12289, 12291, 12032, 0, 8192, - 12288, 12289, 12291, 12032, 12048, 0, 8192, 12288, - 12289, 12291, 12032, 12048, 0, 8192, 12288, 12289, - 12291, 12032, 12048, 12050, 0, 8192, 12288, 12289, - 12291, 12032, 12048, 0, 8192, 12288, 12289, 12291, - 12032, 12048, 12052, 0, 8192, 12288, 12289, 12291, - 12032, 12048, 12052, 0, 8192, 12288, 12289, 12291, - 12032, 12048, 12056, 12054, 0, 8192, 12288, 12289, - 12291, 12032, 12048, 0, 8192, 12288, 12289, 12291, - 12032, 12064, 12056, 0, 8192, 12288, 12289, 12291, - 12032, 12064, 12056, 0, 8192, 12288, 12289, 12291, - 12032, 12064, 12056, 12058, 0, 8192, 12288, 12289, - 12291, 12032, 12064, 12056, 0, 8192, 12288, 12289, - 12291, 12032, 12064, 12065, 12060, 0, 8192, 12288, - 12289, 12291, 12032, 12064, 12065, 12060, 0, 8192, - 12288, 12289, 12291, 12032, 12064, 12065, 12060, 12062, - 0, 8192, 12288, 12289, 12291, 12032, 0, 8192, - 12288, 12289, 12291, 12032, 12064, 0, 8192, 12288, - 12289, 12291, 12032, 12064, 0, 8192, 12288, 12289, - 12291, 12032, 12064, 12066, 0, 8192, 12288, 12289, - 12291, 12032, 12064, 0, 8192, 12288, 12289, 12291, - 12032, 12064, 12068, 0, 8192, 12288, 12289, 12291, - 12032, 12064, 12068, 0, 8192, 12288, 12289, 12291, - 12032, 12064, 12072, 12070, 0, 8192, 12288, 12289, - 12291, 12032, 12064, 0, 8192, 12288, 12289, 12291, - 12032, 12064, 12072, 0, 8192, 12288, 12289, 12291, - 12032, 12064, 12072, 0, 8192, 12288, 12289, 12291, - 12032, 12064, 12072, 12074, 0, 8192, 12288, 12289, - 12291, 12032, 12064, 12072, 0, 8192, 12288, 12289, - 12291, 12032, 12064, 12080, 12076, 0, 8192, 12288, - 12289, 12291, 12032, 12064, 12080, 12076, 0, 8192, - 12288, 12289, 12291, 12032, 12064, 12080, 12081, 12078, - 0, 8192, 12288, 12289, 12291, 12032, 12064, 0, - 8192, 12288, 12289, 12291, 12032, 12096, 12080, 0, - 8192, 12288, 12289, 12291, 12032, 12096, 12080, 0, - 8192, 12288, 12289, 12291, 12032, 12096, 12080, 12082, - 0, 8192, 12288, 12289, 12291, 12032, 12096, 12080, - 0, 8192, 12288, 12289, 12291, 12032, 12096, 12080, - 12084, 0, 8192, 12288, 12289, 12291, 12032, 12096, - 12080, 12084, 0, 8192, 12288, 12289, 12291, 12032, - 12096, 12080, 12088, 12086, 0, 8192, 12288, 12289, - 12291, 12032, 12096, 12080, 0, 8192, 12288, 12289, - 12291, 12032, 12096, 12097, 12088, 0, 8192, 12288, - 12289, 12291, 12032, 12096, 12097, 12088, 0, 8192, - 12288, 12289, 12291, 12032, 12096, 12097, 12088, 12090, - 0, 8192, 12288, 12289, 12291, 12032, 12096, 12097, - 12088, 0, 8192, 12288, 12289, 12291, 12032, 12096, - 12097, 12088, 12092, 0, 8192, 12288, 12289, 12291, - 12032, 12096, 12097, 12099, 12092, 0, 8192, 12288, - 12289, 12291, 12032, 12096, 12097, 12099, 12092, 12094, - 0, 8192, 12288, 12289, 12291, 12032, 0, 8192, - 12288, 12289, 12291, 12032, 12096, 0, 8192, 12288, - 12289, 12291, 12032, 12096, 0, 8192, 12288, 12289, - 12291, 12032, 12096, 12098, 0, 8192, 12288, 12289, - 12291, 12032, 12096, 0, 8192, 12288, 12289, 12291, - 12032, 12096, 12100, 0, 8192, 12288, 12289, 12291, - 12032, 12096, 12100, 0, 8192, 12288, 12289, 12291, - 12032, 12096, 12104, 12102, 0, 8192, 12288, 12289, - 12291, 12032, 12096, 0, 8192, 12288, 12289, 12291, - 12032, 12096, 12104, 0, 8192, 12288, 12289, 12291, - 12032, 12096, 12104, 0, 8192, 12288, 12289, 12291, - 12032, 12096, 12104, 12106, 0, 8192, 12288, 12289, - 12291, 12032, 12096, 12104, 0, 8192, 12288, 12289, - 12291, 12032, 12096, 12112, 12108, 0, 8192, 12288, - 12289, 12291, 12032, 12096, 12112, 12108, 0, 8192, - 12288, 12289, 12291, 12032, 12096, 12112, 12113, 12110, - 0, 8192, 12288, 12289, 12291, 12032, 12096, 0, - 8192, 12288, 12289, 12291, 12032, 12096, 12112, 0, - 8192, 12288, 12289, 12291, 12032, 12096, 12112, 0, - 8192, 12288, 12289, 12291, 12032, 12096, 12112, 12114, - 0, 8192, 12288, 12289, 12291, 12032, 12096, 12112, - 0, 8192, 12288, 12289, 12291, 12032, 12096, 12112, - 12116, 0, 8192, 12288, 12289, 12291, 12032, 12096, - 12112, 12116, 0, 8192, 12288, 12289, 12291, 12032, - 12096, 12112, 12120, 12118, 0, 8192, 12288, 12289, - 12291, 12032, 12096, 12112, 0, 8192, 12288, 12289, - 12291, 12032, 12096, 12128, 12120, 0, 8192, 12288, - 12289, 12291, 12032, 12096, 12128, 12120, 0, 8192, - 12288, 12289, 12291, 12032, 12096, 12128, 12120, 12122, - 0, 8192, 12288, 12289, 12291, 12032, 12096, 12128, - 12120, 0, 8192, 12288, 12289, 12291, 12032, 12096, - 12128, 12129, 12124, 0, 8192, 12288, 12289, 12291, - 12032, 12096, 12128, 12129, 12124, 0, 8192, 12288, - 12289, 12291, 12032, 12096, 12128, 12129, 12124, 12126, - 0, 8192, 12288, 12289, 12291, 12032, 12096, 0, - 8192, 12288, 12289, 12291, 12032, 12160, 12128, 0, - 8192, 12288, 12289, 12291, 12032, 12160, 12128, 0, - 8192, 12288, 12289, 12291, 12032, 12160, 12128, 12130, - 0, 8192, 12288, 12289, 12291, 12032, 12160, 12128, - 0, 8192, 12288, 12289, 12291, 12032, 12160, 12128, - 12132, 0, 8192, 12288, 12289, 12291, 12032, 12160, - 12128, 12132, 0, 8192, 12288, 12289, 12291, 12032, - 12160, 12128, 12136, 12134, 0, 8192, 12288, 12289, - 12291, 12032, 12160, 12128, 0, 8192, 12288, 12289, - 12291, 12032, 12160, 12128, 12136, 0, 8192, 12288, - 12289, 12291, 12032, 12160, 12128, 12136, 0, 8192, - 12288, 12289, 12291, 12032, 12160, 12128, 12136, 12138, - 0, 8192, 12288, 12289, 12291, 12032, 12160, 12128, - 12136, 0, 8192, 12288, 12289, 12291, 12032, 12160, - 12128, 12144, 12140, 0, 8192, 12288, 12289, 12291, - 12032, 12160, 12128, 12144, 12140, 0, 8192, 12288, - 12289, 12291, 12032, 12160, 12128, 12144, 12145, 12142, - 0, 8192, 12288, 12289, 12291, 12032, 12160, 12128, - 0, 8192, 12288, 12289, 12291, 12032, 12160, 12161, - 12144, 0, 8192, 12288, 12289, 12291, 12032, 12160, - 12161, 12144, 0, 8192, 12288, 12289, 12291, 12032, - 12160, 12161, 12144, 12146, 0, 8192, 12288, 12289, - 12291, 12032, 12160, 12161, 12144, 0, 8192, 12288, - 12289, 12291, 12032, 12160, 12161, 12144, 12148, 0, - 8192, 12288, 12289, 12291, 12032, 12160, 12161, 12144, - 12148, 0, 8192, 12288, 12289, 12291, 12032, 12160, - 12161, 12144, 12152, 12150, 0, 8192, 12288, 12289, - 12291, 12032, 12160, 12161, 12144, 0, 8192, 12288, - 12289, 12291, 12032, 12160, 12161, 12144, 12152, 0, - 8192, 12288, 12289, 12291, 12032, 12160, 12161, 12163, - 12152, 0, 8192, 12288, 12289, 12291, 12032, 12160, - 12161, 12163, 12152, 12154, 0, 8192, 12288, 12289, - 12291, 12032, 12160, 12161, 12163, 12152, 0, 8192, - 12288, 12289, 12291, 12032, 12160, 12161, 12163, 12152, - 12156, 0, 8192, 12288, 12289, 12291, 12032, 12160, - 12161, 12163, 12152, 12156, 0, 8192, 12288, 12289, - 12291, 12032, 12160, 12161, 12163, 12152, 12156, 12158, - 0, 8192, 12288, 12289, 12291, 12032, 0, 8192, - 12288, 12289, 12291, 12032, 12160, 0, 8192, 12288, - 12289, 12291, 12032, 12160, 0, 8192, 12288, 12289, - 12291, 12032, 12160, 12162, 0, 8192, 12288, 12289, - 12291, 12032, 12160, 0, 8192, 12288, 12289, 12291, - 12032, 12160, 12164, 0, 8192, 12288, 12289, 12291, - 12032, 12160, 12164, 0, 8192, 12288, 12289, 12291, - 12032, 12160, 12168, 12166, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 0, 8192, 12288, 12289, 12291, - 12295, 12160, 12168, 0, 8192, 12288, 12289, 12291, - 12295, 12160, 12168, 0, 8192, 12288, 12289, 12291, - 12295, 12160, 12168, 12170, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12168, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12176, 12172, 0, 8192, 12288, - 12289, 12291, 12295, 12160, 12176, 12172, 0, 8192, - 12288, 12289, 12291, 12295, 12160, 12176, 12177, 12174, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 0, - 8192, 12288, 12289, 12291, 12295, 12160, 12176, 0, - 8192, 12288, 12289, 12291, 12295, 12160, 12176, 0, - 8192, 12288, 12289, 12291, 12295, 12160, 12176, 12178, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 12176, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 12176, - 12180, 0, 8192, 12288, 12289, 12291, 12295, 12160, - 12176, 12180, 0, 8192, 12288, 12289, 12291, 12295, - 12160, 12176, 12184, 12182, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12176, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12192, 12184, 0, 8192, 12288, - 12289, 12291, 12295, 12160, 12192, 12184, 0, 8192, - 12288, 12289, 12291, 12295, 12160, 12192, 12184, 12186, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 12192, - 12184, 0, 8192, 12288, 12289, 12291, 12295, 12160, - 12192, 12193, 12188, 0, 8192, 12288, 12289, 12291, - 12295, 12160, 12192, 12193, 12188, 0, 8192, 12288, - 12289, 12291, 12295, 12160, 12192, 12193, 12188, 12190, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 0, - 8192, 12288, 12289, 12291, 12295, 12160, 12192, 0, - 8192, 12288, 12289, 12291, 12295, 12160, 12192, 0, - 8192, 12288, 12289, 12291, 12295, 12160, 12192, 12194, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 12192, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 12192, - 12196, 0, 8192, 12288, 12289, 12291, 12295, 12160, - 12192, 12196, 0, 8192, 12288, 12289, 12291, 12295, - 12160, 12192, 12200, 12198, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12192, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12192, 12200, 0, 8192, 12288, - 12289, 12291, 12295, 12160, 12192, 12200, 0, 8192, - 12288, 12289, 12291, 12295, 12160, 12192, 12200, 12202, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 12192, - 12200, 0, 8192, 12288, 12289, 12291, 12295, 12160, - 12192, 12208, 12204, 0, 8192, 12288, 12289, 12291, - 12295, 12160, 12192, 12208, 12204, 0, 8192, 12288, - 12289, 12291, 12295, 12160, 12192, 12208, 12209, 12206, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 12192, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 12224, - 12208, 0, 8192, 12288, 12289, 12291, 12295, 12160, - 12224, 12208, 0, 8192, 12288, 12289, 12291, 12295, - 12160, 12224, 12208, 12210, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12224, 12208, 0, 8192, 12288, - 12289, 12291, 12295, 12160, 12224, 12208, 12212, 0, - 8192, 12288, 12289, 12291, 12295, 12160, 12224, 12208, - 12212, 0, 8192, 12288, 12289, 12291, 12295, 12160, - 12224, 12208, 12216, 12214, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12224, 12208, 0, 8192, 12288, - 12289, 12291, 12295, 12160, 12224, 12225, 12216, 0, - 8192, 12288, 12289, 12291, 12295, 12160, 12224, 12225, - 12216, 0, 8192, 12288, 12289, 12291, 12295, 12160, - 12224, 12225, 12216, 12218, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12224, 12225, 12216, 0, 8192, - 12288, 12289, 12291, 12295, 12160, 12224, 12225, 12216, - 12220, 0, 8192, 12288, 12289, 12291, 12295, 12160, - 12224, 12225, 12227, 12220, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12224, 12225, 12227, 12220, 12222, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 0, - 8192, 12288, 12289, 12291, 12295, 12160, 12224, 0, - 8192, 12288, 12289, 12291, 12295, 12160, 12224, 0, - 8192, 12288, 12289, 12291, 12295, 12160, 12224, 12226, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 12224, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 12224, - 12228, 0, 8192, 12288, 12289, 12291, 12295, 12160, - 12224, 12228, 0, 8192, 12288, 12289, 12291, 12295, - 12160, 12224, 12232, 12230, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12224, 0, 8192, 12288, 12289, - 12291, 12295, 12160, 12224, 12232, 0, 8192, 12288, - 12289, 12291, 12295, 12160, 12224, 12232, 0, 8192, - 12288, 12289, 12291, 12295, 12160, 12224, 12232, 12234, - 0, 8192, 12288, 12289, 12291, 12295, 12160, 12224, - 12232, 0, 8192, 12288, 12289, 12291, 12295, 12160, - 12224, 12240, 12236, 0, 8192, 12288, 12289, 12291, - 12295, 12160, 12224, 12240, 12236, 0, 8192, 12288, - 12289, 12291, 12295, 12160, 12224, 12240, 12241, 12238, - 0, 8192, 12288, 12289, 12291, 12295, 12303, 12224, - 0, 8192, 12288, 12289, 12291, 12295, 12303, 12224, - 12240, 0, 8192, 12288, 12289, 12291, 12295, 12303, - 12224, 12240, 0, 8192, 12288, 12289, 12291, 12295, - 12303, 12224, 12240, 12242, 0, 8192, 12288, 12289, - 12291, 12295, 12303, 12224, 12240, 0, 8192, 12288, - 12289, 12291, 12295, 12303, 12224, 12240, 12244, 0, - 8192, 12288, 12289, 12291, 12295, 12303, 12224, 12240, - 12244, 0, 8192, 12288, 12289, 12291, 12295, 12303, - 12224, 12240, 12248, 12246, 0, 8192, 12288, 12289, - 12291, 12295, 12303, 12224, 12240, 0, 8192, 12288, - 12289, 12291, 12295, 12303, 12224, 12256, 12248, 0, - 8192, 12288, 12289, 12291, 12295, 12303, 12224, 12256, - 12248, 0, 8192, 12288, 12289, 12291, 12295, 12303, - 12224, 12256, 12248, 12250, 0, 8192, 12288, 12289, - 12291, 12295, 12303, 12224, 12256, 12248, 0, 8192, - 12288, 12289, 12291, 12295, 12303, 12224, 12256, 12257, - 12252, 0, 8192, 12288, 12289, 12291, 12295, 12303, - 12224, 12256, 12257, 12252, 0, 8192, 12288, 12289, - 12291, 12295, 12303, 12224, 12256, 12257, 12252, 12254, - 0, 8192, 12288, 12289, 12291, 12295, 12303, 12224, - 0, 8192, 12288, 12289, 12291, 12295, 12303, 12224, - 12256, 0, 8192, 12288, 12289, 12291, 12295, 12303, - 12224, 12256, 0, 8192, 12288, 12289, 12291, 12295, - 12303, 12224, 12256, 12258, 0, 8192, 12288, 12289, - 12291, 12295, 12303, 12224, 12256, 0, 8192, 12288, - 12289, 12291, 12295, 12303, 12224, 12256, 12260, 0, - 8192, 12288, 12289, 12291, 12295, 12303, 12224, 12256, - 12260, 0, 8192, 12288, 12289, 12291, 12295, 12303, - 12224, 12256, 12264, 12262, 0, 8192, 12288, 12289, - 12291, 12295, 12303, 12224, 12256, 0, 8192, 12288, - 12289, 12291, 12295, 12303, 12224, 12256, 12264, 0, - 8192, 12288, 12289, 12291, 12295, 12303, 12224, 12256, - 12264, 0, 8192, 12288, 12289, 12291, 12295, 12303, - 12224, 12256, 12264, 12266, 0, 8192, 12288, 12289, - 12291, 12295, 12303, 12224, 12256, 12264, 0, 8192, - 12288, 12289, 12291, 12295, 12303, 12224, 12256, 12272, - 12268, 0, 8192, 12288, 12289, 12291, 12295, 12303, - 12224, 12256, 12272, 12268, 0, 8192, 12288, 12289, - 12291, 12295, 12303, 12224, 12256, 12272, 12273, 12270, - 0, 8192, 12288, 12289, 12291, 12295, 12303, 12224, - 12256, 0, 8192, 12288, 12289, 12291, 12295, 12303, - 12224, 12256, 12272, 0, 8192, 12288, 12289, 12291, - 12295, 12303, 12224, 12256, 12272, 0, 8192, 12288, - 12289, 12291, 12295, 12303, 12224, 12256, 12272, 12274, - 0, 8192, 12288, 12289, 12291, 12295, 12303, 12224, - 12256, 12272, 0, 8192, 12288, 12289, 12291, 12295, - 12303, 12224, 12256, 12272, 12276, 0, 8192, 12288, - 12289, 12291, 12295, 12303, 12224, 12256, 12272, 12276, - 0, 8192, 12288, 12289, 12291, 12295, 12303, 12224, - 12256, 12272, 12280, 12278, 0, 8192, 12288, 12289, - 12291, 12295, 12303, 12224, 12256, 12272, 0, 8192, - 12288, 12289, 12291, 12295, 12303, 12224, 12256, 12272, - 12280, 0, 8192, 12288, 12289, 12291, 12295, 12303, - 12224, 12256, 12272, 12280, 0, 8192, 12288, 12289, - 12291, 12295, 12303, 12224, 12256, 12272, 12280, 12282, - 0, 8192, 12288, 12289, 12291, 12295, 12303, 12224, - 12256, 12272, 12280, 0, 8192, 12288, 12289, 12291, - 12295, 12303, 12224, 12256, 12272, 12280, 12284, 0, - 8192, 12288, 12289, 12291, 12295, 12303, 12224, 12256, - 12272, 12280, 12284, 0, 8192, 12288, 12289, 12291, - 12295, 12303, 12224, 12256, 12272, 12280, 12284, 12286, - 0, 8192, 0, 8192, 12288, 0, 8192, 12288, - 0, 8192, 12288, 12290, 0, 8192, 12288, 0, - 8192, 12288, 12292, 0, 8192, 12288, 12292, 0, - 8192, 12288, 12296, 12294, 0, 8192, 12288, 0, - 8192, 12288, 12296, 0, 8192, 12288, 12296, 0, - 8192, 12288, 12296, 12298, 0, 8192, 12288, 12296, - 0, 8192, 12288, 12304, 12300, 0, 8192, 12288, - 12304, 12300, 0, 8192, 12288, 12304, 12305, 12302, - 0, 8192, 12288, 0, 8192, 12288, 12304, 0, - 8192, 12288, 12304, 0, 8192, 12288, 12304, 12306, - 0, 8192, 12288, 12304, 0, 8192, 12288, 12304, - 12308, 0, 8192, 12288, 12304, 12308, 0, 8192, - 12288, 12304, 12312, 12310, 0, 8192, 12288, 12304, - 0, 8192, 12288, 12320, 12312, 0, 8192, 12288, - 12320, 12312, 0, 8192, 12288, 12320, 12312, 12314, - 0, 8192, 12288, 12320, 12312, 0, 8192, 12288, - 12320, 12321, 12316, 0, 8192, 12288, 12320, 12321, - 12316, 0, 8192, 12288, 12320, 12321, 12316, 12318, - 0, 8192, 12288, 0, 8192, 12288, 12320, 0, - 8192, 12288, 12320, 0, 8192, 12288, 12320, 12322, - 0, 8192, 12288, 12320, 0, 8192, 12288, 12320, - 12324, 0, 8192, 12288, 12320, 12324, 0, 8192, - 12288, 12320, 12328, 12326, 0, 8192, 12288, 12320, - 0, 8192, 12288, 12320, 12328, 0, 8192, 12288, - 12320, 12328, 0, 8192, 12288, 12320, 12328, 12330, - 0, 8192, 12288, 12320, 12328, 0, 8192, 12288, - 12320, 12336, 12332, 0, 8192, 12288, 12320, 12336, - 12332, 0, 8192, 12288, 12320, 12336, 12337, 12334, - 0, 8192, 12288, 12320, 0, 8192, 12288, 12352, - 12336, 0, 8192, 12288, 12352, 12336, 0, 8192, - 12288, 12352, 12336, 12338, 0, 8192, 12288, 12352, - 12336, 0, 8192, 12288, 12352, 12336, 12340, 0, - 8192, 12288, 12352, 12336, 12340, 0, 8192, 12288, - 12352, 12336, 12344, 12342, 0, 8192, 12288, 12352, - 12336, 0, 8192, 12288, 12352, 12353, 12344, 0, - 8192, 12288, 12352, 12353, 12344, 0, 8192, 12288, - 12352, 12353, 12344, 12346, 0, 8192, 12288, 12352, - 12353, 12344, 0, 8192, 12288, 12352, 12353, 12344, - 12348, 0, 8192, 12288, 12352, 12353, 12355, 12348, - 0, 8192, 12288, 12352, 12353, 12355, 12348, 12350, - 0, 8192, 12288, 0, 8192, 12288, 12352, 0, - 8192, 12288, 12352, 0, 8192, 12288, 12352, 12354, - 0, 8192, 12288, 12352, 0, 8192, 12288, 12352, - 12356, 0, 8192, 12288, 12352, 12356, 0, 8192, - 12288, 12352, 12360, 12358, 0, 8192, 12288, 12352, - 0, 8192, 12288, 12352, 12360, 0, 8192, 12288, - 12352, 12360, 0, 8192, 12288, 12352, 12360, 12362, - 0, 8192, 12288, 12352, 12360, 0, 8192, 12288, - 12352, 12368, 12364, 0, 8192, 12288, 12352, 12368, - 12364, 0, 8192, 12288, 12352, 12368, 12369, 12366, - 0, 8192, 12288, 12352, 0, 8192, 12288, 12352, - 12368, 0, 8192, 12288, 12352, 12368, 0, 8192, - 12288, 12352, 12368, 12370, 0, 8192, 12288, 12352, - 12368, 0, 8192, 12288, 12352, 12368, 12372, 0, - 8192, 12288, 12352, 12368, 12372, 0, 8192, 12288, - 12352, 12368, 12376, 12374, 0, 8192, 12288, 12352, - 12368, 0, 8192, 12288, 12352, 12384, 12376, 0, - 8192, 12288, 12352, 12384, 12376, 0, 8192, 12288, - 12352, 12384, 12376, 12378, 0, 8192, 12288, 12352, - 12384, 12376, 0, 8192, 12288, 12352, 12384, 12385, - 12380, 0, 8192, 12288, 12352, 12384, 12385, 12380, - 0, 8192, 12288, 12352, 12384, 12385, 12380, 12382, - 0, 8192, 12288, 12352, 0, 8192, 12288, 12416, - 12384, 0, 8192, 12288, 12416, 12384, 0, 8192, - 12288, 12416, 12384, 12386, 0, 8192, 12288, 12416, - 12384, 0, 8192, 12288, 12416, 12384, 12388, 0, - 8192, 12288, 12416, 12384, 12388, 0, 8192, 12288, - 12416, 12384, 12392, 12390, 0, 8192, 12288, 12416, - 12384, 0, 8192, 12288, 12416, 12384, 12392, 0, - 8192, 12288, 12416, 12384, 12392, 0, 8192, 12288, - 12416, 12384, 12392, 12394, 0, 8192, 12288, 12416, - 12384, 12392, 0, 8192, 12288, 12416, 12384, 12400, - 12396, 0, 8192, 12288, 12416, 12384, 12400, 12396, - 0, 8192, 12288, 12416, 12384, 12400, 12401, 12398, - 0, 8192, 12288, 12416, 12384, 0, 8192, 12288, - 12416, 12417, 12400, 0, 8192, 12288, 12416, 12417, - 12400, 0, 8192, 12288, 12416, 12417, 12400, 12402, - 0, 8192, 12288, 12416, 12417, 12400, 0, 8192, - 12288, 12416, 12417, 12400, 12404, 0, 8192, 12288, - 12416, 12417, 12400, 12404, 0, 8192, 12288, 12416, - 12417, 12400, 12408, 12406, 0, 8192, 12288, 12416, - 12417, 12400, 0, 8192, 12288, 12416, 12417, 12400, - 12408, 0, 8192, 12288, 12416, 12417, 12419, 12408, - 0, 8192, 12288, 12416, 12417, 12419, 12408, 12410, - 0, 8192, 12288, 12416, 12417, 12419, 12408, 0, - 8192, 12288, 12416, 12417, 12419, 12408, 12412, 0, - 8192, 12288, 12416, 12417, 12419, 12408, 12412, 0, - 8192, 12288, 12416, 12417, 12419, 12408, 12412, 12414, - 0, 8192, 12288, 0, 8192, 12288, 12416, 0, - 8192, 12288, 12416, 0, 8192, 12288, 12416, 12418, - 0, 8192, 12288, 12416, 0, 8192, 12288, 12416, - 12420, 0, 8192, 12288, 12416, 12420, 0, 8192, - 12288, 12416, 12424, 12422, 0, 8192, 12288, 12416, - 0, 8192, 12288, 12416, 12424, 0, 8192, 12288, - 12416, 12424, 0, 8192, 12288, 12416, 12424, 12426, - 0, 8192, 12288, 12416, 12424, 0, 8192, 12288, - 12416, 12432, 12428, 0, 8192, 12288, 12416, 12432, - 12428, 0, 8192, 12288, 12416, 12432, 12433, 12430, - 0, 8192, 12288, 12416, 0, 8192, 12288, 12416, - 12432, 0, 8192, 12288, 12416, 12432, 0, 8192, - 12288, 12416, 12432, 12434, 0, 8192, 12288, 12416, - 12432, 0, 8192, 12288, 12416, 12432, 12436, 0, - 8192, 12288, 12416, 12432, 12436, 0, 8192, 12288, - 12416, 12432, 12440, 12438, 0, 8192, 12288, 12416, - 12432, 0, 8192, 12288, 12416, 12448, 12440, 0, - 8192, 12288, 12416, 12448, 12440, 0, 8192, 12288, - 12416, 12448, 12440, 12442, 0, 8192, 12288, 12416, - 12448, 12440, 0, 8192, 12288, 12416, 12448, 12449, - 12444, 0, 8192, 12288, 12416, 12448, 12449, 12444, - 0, 8192, 12288, 12416, 12448, 12449, 12444, 12446, - 0, 8192, 12288, 12416, 0, 8192, 12288, 12416, - 12448, 0, 8192, 12288, 12416, 12448, 0, 8192, - 12288, 12416, 12448, 12450, 0, 8192, 12288, 12416, - 12448, 0, 8192, 12288, 12416, 12448, 12452, 0, - 8192, 12288, 12416, 12448, 12452, 0, 8192, 12288, - 12416, 12448, 12456, 12454, 0, 8192, 12288, 12416, - 12448, 0, 8192, 12288, 12416, 12448, 12456, 0, - 8192, 12288, 12416, 12448, 12456, 0, 8192, 12288, - 12416, 12448, 12456, 12458, 0, 8192, 12288, 12416, - 12448, 12456, 0, 8192, 12288, 12416, 12448, 12464, - 12460, 0, 8192, 12288, 12416, 12448, 12464, 12460, - 0, 8192, 12288, 12416, 12448, 12464, 12465, 12462, - 0, 8192, 12288, 12416, 12448, 0, 8192, 12288, - 12416, 12480, 12464, 0, 8192, 12288, 12416, 12480, - 12464, 0, 8192, 12288, 12416, 12480, 12464, 12466, - 0, 8192, 12288, 12416, 12480, 12464, 0, 8192, - 12288, 12416, 12480, 12464, 12468, 0, 8192, 12288, - 12416, 12480, 12464, 12468, 0, 8192, 12288, 12416, - 12480, 12464, 12472, 12470, 0, 8192, 12288, 12416, - 12480, 12464, 0, 8192, 12288, 12416, 12480, 12481, - 12472, 0, 8192, 12288, 12416, 12480, 12481, 12472, - 0, 8192, 12288, 12416, 12480, 12481, 12472, 12474, - 0, 8192, 12288, 12416, 12480, 12481, 12472, 0, - 8192, 12288, 12416, 12480, 12481, 12472, 12476, 0, - 8192, 12288, 12416, 12480, 12481, 12483, 12476, 0, - 8192, 12288, 12416, 12480, 12481, 12483, 12476, 12478, - 0, 8192, 12288, 12416, 0, 8192, 12288, 12544, - 12480, 0, 8192, 12288, 12544, 12480, 0, 8192, - 12288, 12544, 12480, 12482, 0, 8192, 12288, 12544, - 12480, 0, 8192, 12288, 12544, 12480, 12484, 0, - 8192, 12288, 12544, 12480, 12484, 0, 8192, 12288, - 12544, 12480, 12488, 12486, 0, 8192, 12288, 12544, - 12480, 0, 8192, 12288, 12544, 12480, 12488, 0, - 8192, 12288, 12544, 12480, 12488, 0, 8192, 12288, - 12544, 12480, 12488, 12490, 0, 8192, 12288, 12544, - 12480, 12488, 0, 8192, 12288, 12544, 12480, 12496, - 12492, 0, 8192, 12288, 12544, 12480, 12496, 12492, - 0, 8192, 12288, 12544, 12480, 12496, 12497, 12494, - 0, 8192, 12288, 12544, 12480, 0, 8192, 12288, - 12544, 12480, 12496, 0, 8192, 12288, 12544, 12480, - 12496, 0, 8192, 12288, 12544, 12480, 12496, 12498, - 0, 8192, 12288, 12544, 12480, 12496, 0, 8192, - 12288, 12544, 12480, 12496, 12500, 0, 8192, 12288, - 12544, 12480, 12496, 12500, 0, 8192, 12288, 12544, - 12480, 12496, 12504, 12502, 0, 8192, 12288, 12544, - 12480, 12496, 0, 8192, 12288, 12544, 12480, 12512, - 12504, 0, 8192, 12288, 12544, 12480, 12512, 12504, - 0, 8192, 12288, 12544, 12480, 12512, 12504, 12506, - 0, 8192, 12288, 12544, 12480, 12512, 12504, 0, - 8192, 12288, 12544, 12480, 12512, 12513, 12508, 0, - 8192, 12288, 12544, 12480, 12512, 12513, 12508, 0, - 8192, 12288, 12544, 12480, 12512, 12513, 12508, 12510, - 0, 8192, 12288, 12544, 12480, 0, 8192, 12288, - 12544, 12545, 12512, 0, 8192, 12288, 12544, 12545, - 12512, 0, 8192, 12288, 12544, 12545, 12512, 12514, - 0, 8192, 12288, 12544, 12545, 12512, 0, 8192, - 12288, 12544, 12545, 12512, 12516, 0, 8192, 12288, - 12544, 12545, 12512, 12516, 0, 8192, 12288, 12544, - 12545, 12512, 12520, 12518, 0, 8192, 12288, 12544, - 12545, 12512, 0, 8192, 12288, 12544, 12545, 12512, - 12520, 0, 8192, 12288, 12544, 12545, 12512, 12520, - 0, 8192, 12288, 12544, 12545, 12512, 12520, 12522, - 0, 8192, 12288, 12544, 12545, 12512, 12520, 0, - 8192, 12288, 12544, 12545, 12512, 12528, 12524, 0, - 8192, 12288, 12544, 12545, 12512, 12528, 12524, 0, - 8192, 12288, 12544, 12545, 12512, 12528, 12529, 12526, - 0, 8192, 12288, 12544, 12545, 12512, 0, 8192, - 12288, 12544, 12545, 12512, 12528, 0, 8192, 12288, - 12544, 12545, 12547, 12528, 0, 8192, 12288, 12544, - 12545, 12547, 12528, 12530, 0, 8192, 12288, 12544, - 12545, 12547, 12528, 0, 8192, 12288, 12544, 12545, - 12547, 12528, 12532, 0, 8192, 12288, 12544, 12545, - 12547, 12528, 12532, 0, 8192, 12288, 12544, 12545, - 12547, 12528, 12536, 12534, 0, 8192, 12288, 12544, - 12545, 12547, 12528, 0, 8192, 12288, 12544, 12545, - 12547, 12528, 12536, 0, 8192, 12288, 12544, 12545, - 12547, 12528, 12536, 0, 8192, 12288, 12544, 12545, - 12547, 12528, 12536, 12538, 0, 8192, 12288, 12544, - 12545, 12547, 12551, 12536, 0, 8192, 12288, 12544, - 12545, 12547, 12551, 12536, 12540, 0, 8192, 12288, - 12544, 12545, 12547, 12551, 12536, 12540, 0, 8192, - 12288, 12544, 12545, 12547, 12551, 12536, 12540, 12542, - 0, 8192, 12288, 0, 8192, 12288, 12544, 0, - 8192, 12288, 12544, 0, 8192, 12288, 12544, 12546, - 0, 8192, 12288, 12544, 0, 8192, 12288, 12544, - 12548, 0, 8192, 12288, 12544, 12548, 0, 8192, - 12288, 12544, 12552, 12550, 0, 8192, 12288, 12544, - 0, 8192, 12288, 12544, 12552, 0, 8192, 12288, - 12544, 12552, 0, 8192, 12288, 12544, 12552, 12554, - 0, 8192, 12288, 12544, 12552, 0, 8192, 12288, - 12544, 12560, 12556, 0, 8192, 12288, 12544, 12560, - 12556, 0, 8192, 12288, 12544, 12560, 12561, 12558, - 0, 8192, 12288, 12544, 0, 8192, 12288, 12544, - 12560, 0, 8192, 12288, 12544, 12560, 0, 8192, - 12288, 12544, 12560, 12562, 0, 8192, 12288, 12544, - 12560, 0, 8192, 12288, 12544, 12560, 12564, 0, - 8192, 12288, 12544, 12560, 12564, 0, 8192, 12288, - 12544, 12560, 12568, 12566, 0, 8192, 12288, 12544, - 12560, 0, 8192, 12288, 12544, 12576, 12568, 0, - 8192, 12288, 12544, 12576, 12568, 0, 8192, 12288, - 12544, 12576, 12568, 12570, 0, 8192, 12288, 12544, - 12576, 12568, 0, 8192, 12288, 12544, 12576, 12577, - 12572, 0, 8192, 12288, 12544, 12576, 12577, 12572, - 0, 8192, 12288, 12544, 12576, 12577, 12572, 12574, - 0, 8192, 12288, 12544, 0, 8192, 12288, 12544, - 12576, 0, 8192, 12288, 12544, 12576, 0, 8192, - 12288, 12544, 12576, 12578, 0, 8192, 12288, 12544, - 12576, 0, 8192, 12288, 12544, 12576, 12580, 0, - 8192, 12288, 12544, 12576, 12580, 0, 8192, 12288, - 12544, 12576, 12584, 12582, 0, 8192, 12288, 12544, - 12576, 0, 8192, 12288, 12544, 12576, 12584, 0, - 8192, 12288, 12544, 12576, 12584, 0, 8192, 12288, - 12544, 12576, 12584, 12586, 0, 8192, 12288, 12544, - 12576, 12584, 0, 8192, 12288, 12544, 12576, 12592, - 12588, 0, 8192, 12288, 12544, 12576, 12592, 12588, - 0, 8192, 12288, 12544, 12576, 12592, 12593, 12590, - 0, 8192, 12288, 12544, 12576, 0, 8192, 12288, - 12544, 12608, 12592, 0, 8192, 12288, 12544, 12608, - 12592, 0, 8192, 12288, 12544, 12608, 12592, 12594, - 0, 8192, 12288, 12544, 12608, 12592, 0, 8192, - 12288, 12544, 12608, 12592, 12596, 0, 8192, 12288, - 12544, 12608, 12592, 12596, 0, 8192, 12288, 12544, - 12608, 12592, 12600, 12598, 0, 8192, 12288, 12544, - 12608, 12592, 0, 8192, 12288, 12544, 12608, 12609, - 12600, 0, 8192, 12288, 12544, 12608, 12609, 12600, - 0, 8192, 12288, 12544, 12608, 12609, 12600, 12602, - 0, 8192, 12288, 12544, 12608, 12609, 12600, 0, - 8192, 12288, 12544, 12608, 12609, 12600, 12604, 0, - 8192, 12288, 12544, 12608, 12609, 12611, 12604, 0, - 8192, 12288, 12544, 12608, 12609, 12611, 12604, 12606, - 0, 8192, 12288, 12544, 0, 8192, 12288, 12544, - 12608, 0, 8192, 12288, 12544, 12608, 0, 8192, - 12288, 12544, 12608, 12610, 0, 8192, 12288, 12544, - 12608, 0, 8192, 12288, 12544, 12608, 12612, 0, - 8192, 12288, 12544, 12608, 12612, 0, 8192, 12288, - 12544, 12608, 12616, 12614, 0, 8192, 12288, 12544, - 12608, 0, 8192, 12288, 12544, 12608, 12616, 0, - 8192, 12288, 12544, 12608, 12616, 0, 8192, 12288, - 12544, 12608, 12616, 12618, 0, 8192, 12288, 12544, - 12608, 12616, 0, 8192, 12288, 12544, 12608, 12624, - 12620, 0, 8192, 12288, 12544, 12608, 12624, 12620, - 0, 8192, 12288, 12544, 12608, 12624, 12625, 12622, - 0, 8192, 12288, 12544, 12608, 0, 8192, 12288, - 12544, 12608, 12624, 0, 8192, 12288, 12544, 12608, - 12624, 0, 8192, 12288, 12544, 12608, 12624, 12626, - 0, 8192, 12288, 12544, 12608, 12624, 0, 8192, - 12288, 12544, 12608, 12624, 12628, 0, 8192, 12288, - 12544, 12608, 12624, 12628, 0, 8192, 12288, 12544, - 12608, 12624, 12632, 12630, 0, 8192, 12288, 12544, - 12608, 12624, 0, 8192, 12288, 12544, 12608, 12640, - 12632, 0, 8192, 12288, 12544, 12608, 12640, 12632, - 0, 8192, 12288, 12544, 12608, 12640, 12632, 12634, - 0, 8192, 12288, 12544, 12608, 12640, 12632, 0, - 8192, 12288, 12544, 12608, 12640, 12641, 12636, 0, - 8192, 12288, 12544, 12608, 12640, 12641, 12636, 0, - 8192, 12288, 12544, 12608, 12640, 12641, 12636, 12638, - 0, 8192, 12288, 12544, 12608, 0, 8192, 12288, - 12544, 12672, 12640, 0, 8192, 12288, 12544, 12672, - 12640, 0, 8192, 12288, 12544, 12672, 12640, 12642, - 0, 8192, 12288, 12544, 12672, 12640, 0, 8192, - 12288, 12544, 12672, 12640, 12644, 0, 8192, 12288, - 12544, 12672, 12640, 12644, 0, 8192, 12288, 12544, - 12672, 12640, 12648, 12646, 0, 8192, 12288, 12544, - 12672, 12640, 0, 8192, 12288, 12544, 12672, 12640, - 12648, 0, 8192, 12288, 12544, 12672, 12640, 12648, - 0, 8192, 12288, 12544, 12672, 12640, 12648, 12650, - 0, 8192, 12288, 12544, 12672, 12640, 12648, 0, - 8192, 12288, 12544, 12672, 12640, 12656, 12652, 0, - 8192, 12288, 12544, 12672, 12640, 12656, 12652, 0, - 8192, 12288, 12544, 12672, 12640, 12656, 12657, 12654, - 0, 8192, 12288, 12544, 12672, 12640, 0, 8192, - 12288, 12544, 12672, 12673, 12656, 0, 8192, 12288, - 12544, 12672, 12673, 12656, 0, 8192, 12288, 12544, - 12672, 12673, 12656, 12658, 0, 8192, 12288, 12544, - 12672, 12673, 12656, 0, 8192, 12288, 12544, 12672, - 12673, 12656, 12660, 0, 8192, 12288, 12544, 12672, - 12673, 12656, 12660, 0, 8192, 12288, 12544, 12672, - 12673, 12656, 12664, 12662, 0, 8192, 12288, 12544, - 12672, 12673, 12656, 0, 8192, 12288, 12544, 12672, - 12673, 12656, 12664, 0, 8192, 12288, 12544, 12672, - 12673, 12675, 12664, 0, 8192, 12288, 12544, 12672, - 12673, 12675, 12664, 12666, 0, 8192, 12288, 12544, - 12672, 12673, 12675, 12664, 0, 8192, 12288, 12544, - 12672, 12673, 12675, 12664, 12668, 0, 8192, 12288, - 12544, 12672, 12673, 12675, 12664, 12668, 0, 8192, - 12288, 12544, 12672, 12673, 12675, 12664, 12668, 12670, - 0, 8192, 12288, 12544, 0, 8192, 12288, 12800, - 12672, 0, 8192, 12288, 12800, 12672, 0, 8192, - 12288, 12800, 12672, 12674, 0, 8192, 12288, 12800, - 12672, 0, 8192, 12288, 12800, 12672, 12676, 0, - 8192, 12288, 12800, 12672, 12676, 0, 8192, 12288, - 12800, 12672, 12680, 12678, 0, 8192, 12288, 12800, - 12672, 0, 8192, 12288, 12800, 12672, 12680, 0, - 8192, 12288, 12800, 12672, 12680, 0, 8192, 12288, - 12800, 12672, 12680, 12682, 0, 8192, 12288, 12800, - 12672, 12680, 0, 8192, 12288, 12800, 12672, 12688, - 12684, 0, 8192, 12288, 12800, 12672, 12688, 12684, - 0, 8192, 12288, 12800, 12672, 12688, 12689, 12686, - 0, 8192, 12288, 12800, 12672, 0, 8192, 12288, - 12800, 12672, 12688, 0, 8192, 12288, 12800, 12672, - 12688, 0, 8192, 12288, 12800, 12672, 12688, 12690, - 0, 8192, 12288, 12800, 12672, 12688, 0, 8192, - 12288, 12800, 12672, 12688, 12692, 0, 8192, 12288, - 12800, 12672, 12688, 12692, 0, 8192, 12288, 12800, - 12672, 12688, 12696, 12694, 0, 8192, 12288, 12800, - 12672, 12688, 0, 8192, 12288, 12800, 12672, 12704, - 12696, 0, 8192, 12288, 12800, 12672, 12704, 12696, - 0, 8192, 12288, 12800, 12672, 12704, 12696, 12698, - 0, 8192, 12288, 12800, 12672, 12704, 12696, 0, - 8192, 12288, 12800, 12672, 12704, 12705, 12700, 0, - 8192, 12288, 12800, 12672, 12704, 12705, 12700, 0, - 8192, 12288, 12800, 12672, 12704, 12705, 12700, 12702, - 0, 8192, 12288, 12800, 12672, 0, 8192, 12288, - 12800, 12672, 12704, 0, 8192, 12288, 12800, 12672, - 12704, 0, 8192, 12288, 12800, 12672, 12704, 12706, - 0, 8192, 12288, 12800, 12672, 12704, 0, 8192, - 12288, 12800, 12672, 12704, 12708, 0, 8192, 12288, - 12800, 12672, 12704, 12708, 0, 8192, 12288, 12800, - 12672, 12704, 12712, 12710, 0, 8192, 12288, 12800, - 12672, 12704, 0, 8192, 12288, 12800, 12672, 12704, - 12712, 0, 8192, 12288, 12800, 12672, 12704, 12712, - 0, 8192, 12288, 12800, 12672, 12704, 12712, 12714, - 0, 8192, 12288, 12800, 12672, 12704, 12712, 0, - 8192, 12288, 12800, 12672, 12704, 12720, 12716, 0, - 8192, 12288, 12800, 12672, 12704, 12720, 12716, 0, - 8192, 12288, 12800, 12672, 12704, 12720, 12721, 12718, - 0, 8192, 12288, 12800, 12672, 12704, 0, 8192, - 12288, 12800, 12672, 12736, 12720, 0, 8192, 12288, - 12800, 12672, 12736, 12720, 0, 8192, 12288, 12800, - 12672, 12736, 12720, 12722, 0, 8192, 12288, 12800, - 12672, 12736, 12720, 0, 8192, 12288, 12800, 12672, - 12736, 12720, 12724, 0, 8192, 12288, 12800, 12672, - 12736, 12720, 12724, 0, 8192, 12288, 12800, 12672, - 12736, 12720, 12728, 12726, 0, 8192, 12288, 12800, - 12672, 12736, 12720, 0, 8192, 12288, 12800, 12672, - 12736, 12737, 12728, 0, 8192, 12288, 12800, 12672, - 12736, 12737, 12728, 0, 8192, 12288, 12800, 12672, - 12736, 12737, 12728, 12730, 0, 8192, 12288, 12800, - 12672, 12736, 12737, 12728, 0, 8192, 12288, 12800, - 12672, 12736, 12737, 12728, 12732, 0, 8192, 12288, - 12800, 12672, 12736, 12737, 12739, 12732, 0, 8192, - 12288, 12800, 12672, 12736, 12737, 12739, 12732, 12734, - 0, 8192, 12288, 12800, 12672, 0, 8192, 12288, - 12800, 12801, 12736, 0, 8192, 12288, 12800, 12801, - 12736, 0, 8192, 12288, 12800, 12801, 12736, 12738, - 0, 8192, 12288, 12800, 12801, 12736, 0, 8192, - 12288, 12800, 12801, 12736, 12740, 0, 8192, 12288, - 12800, 12801, 12736, 12740, 0, 8192, 12288, 12800, - 12801, 12736, 12744, 12742, 0, 8192, 12288, 12800, - 12801, 12736, 0, 8192, 12288, 12800, 12801, 12736, - 12744, 0, 8192, 12288, 12800, 12801, 12736, 12744, - 0, 8192, 12288, 12800, 12801, 12736, 12744, 12746, - 0, 8192, 12288, 12800, 12801, 12736, 12744, 0, - 8192, 12288, 12800, 12801, 12736, 12752, 12748, 0, - 8192, 12288, 12800, 12801, 12736, 12752, 12748, 0, - 8192, 12288, 12800, 12801, 12736, 12752, 12753, 12750, - 0, 8192, 12288, 12800, 12801, 12736, 0, 8192, - 12288, 12800, 12801, 12736, 12752, 0, 8192, 12288, - 12800, 12801, 12736, 12752, 0, 8192, 12288, 12800, - 12801, 12736, 12752, 12754, 0, 8192, 12288, 12800, - 12801, 12736, 12752, 0, 8192, 12288, 12800, 12801, - 12736, 12752, 12756, 0, 8192, 12288, 12800, 12801, - 12736, 12752, 12756, 0, 8192, 12288, 12800, 12801, - 12736, 12752, 12760, 12758, 0, 8192, 12288, 12800, - 12801, 12736, 12752, 0, 8192, 12288, 12800, 12801, - 12736, 12768, 12760, 0, 8192, 12288, 12800, 12801, - 12736, 12768, 12760, 0, 8192, 12288, 12800, 12801, - 12736, 12768, 12760, 12762, 0, 8192, 12288, 12800, - 12801, 12736, 12768, 12760, 0, 8192, 12288, 12800, - 12801, 12736, 12768, 12769, 12764, 0, 8192, 12288, - 12800, 12801, 12736, 12768, 12769, 12764, 0, 8192, - 12288, 12800, 12801, 12736, 12768, 12769, 12764, 12766, - 0, 8192, 12288, 12800, 12801, 12736, 0, 8192, - 12288, 12800, 12801, 12736, 12768, 0, 8192, 12288, - 12800, 12801, 12803, 12768, 0, 8192, 12288, 12800, - 12801, 12803, 12768, 12770, 0, 8192, 12288, 12800, - 12801, 12803, 12768, 0, 8192, 12288, 12800, 12801, - 12803, 12768, 12772, 0, 8192, 12288, 12800, 12801, - 12803, 12768, 12772, 0, 8192, 12288, 12800, 12801, - 12803, 12768, 12776, 12774, 0, 8192, 12288, 12800, - 12801, 12803, 12768, 0, 8192, 12288, 12800, 12801, - 12803, 12768, 12776, 0, 8192, 12288, 12800, 12801, - 12803, 12768, 12776, 0, 8192, 12288, 12800, 12801, - 12803, 12768, 12776, 12778, 0, 8192, 12288, 12800, - 12801, 12803, 12768, 12776, 0, 8192, 12288, 12800, - 12801, 12803, 12768, 12784, 12780, 0, 8192, 12288, - 12800, 12801, 12803, 12768, 12784, 12780, 0, 8192, - 12288, 12800, 12801, 12803, 12768, 12784, 12785, 12782, - 0, 8192, 12288, 12800, 12801, 12803, 12768, 0, - 8192, 12288, 12800, 12801, 12803, 12768, 12784, 0, - 8192, 12288, 12800, 12801, 12803, 12768, 12784, 0, - 8192, 12288, 12800, 12801, 12803, 12768, 12784, 12786, - 0, 8192, 12288, 12800, 12801, 12803, 12807, 12784, - 0, 8192, 12288, 12800, 12801, 12803, 12807, 12784, - 12788, 0, 8192, 12288, 12800, 12801, 12803, 12807, - 12784, 12788, 0, 8192, 12288, 12800, 12801, 12803, - 12807, 12784, 12792, 12790, 0, 8192, 12288, 12800, - 12801, 12803, 12807, 12784, 0, 8192, 12288, 12800, - 12801, 12803, 12807, 12784, 12792, 0, 8192, 12288, - 12800, 12801, 12803, 12807, 12784, 12792, 0, 8192, - 12288, 12800, 12801, 12803, 12807, 12784, 12792, 12794, - 0, 8192, 12288, 12800, 12801, 12803, 12807, 12784, - 12792, 0, 8192, 12288, 12800, 12801, 12803, 12807, - 12784, 12792, 12796, 0, 8192, 12288, 12800, 12801, - 12803, 12807, 12784, 12792, 12796, 0, 8192, 12288, - 12800, 12801, 12803, 12807, 12784, 12792, 12796, 12798, - 0, 8192, 12288, 0, 8192, 12288, 12800, 0, - 8192, 12288, 12800, 0, 8192, 12288, 12800, 12802, - 0, 8192, 12288, 12800, 0, 8192, 12288, 12800, - 12804, 0, 8192, 12288, 12800, 12804, 0, 8192, - 12288, 12800, 12808, 12806, 0, 8192, 12288, 12800, - 0, 8192, 12288, 12800, 12808, 0, 8192, 12288, - 12800, 12808, 0, 8192, 12288, 12800, 12808, 12810, - 0, 8192, 12288, 12800, 12808, 0, 8192, 12288, - 12800, 12816, 12812, 0, 8192, 12288, 12800, 12816, - 12812, 0, 8192, 12288, 12800, 12816, 12817, 12814, - 0, 8192, 12288, 12800, 0, 8192, 12288, 12800, - 12816, 0, 8192, 12288, 12800, 12816, 0, 8192, - 12288, 12800, 12816, 12818, 0, 8192, 12288, 12800, - 12816, 0, 8192, 12288, 12800, 12816, 12820, 0, - 8192, 12288, 12800, 12816, 12820, 0, 8192, 12288, - 12800, 12816, 12824, 12822, 0, 8192, 12288, 12800, - 12816, 0, 8192, 12288, 12800, 12832, 12824, 0, - 8192, 12288, 12800, 12832, 12824, 0, 8192, 12288, - 12800, 12832, 12824, 12826, 0, 8192, 12288, 12800, - 12832, 12824, 0, 8192, 12288, 12800, 12832, 12833, - 12828, 0, 8192, 12288, 12800, 12832, 12833, 12828, - 0, 8192, 12288, 12800, 12832, 12833, 12828, 12830, - 0, 8192, 12288, 12800, 0, 8192, 12288, 12800, - 12832, 0, 8192, 12288, 12800, 12832, 0, 8192, - 12288, 12800, 12832, 12834, 0, 8192, 12288, 12800, - 12832, 0, 8192, 12288, 12800, 12832, 12836, 0, - 8192, 12288, 12800, 12832, 12836, 0, 8192, 12288, - 12800, 12832, 12840, 12838, 0, 8192, 12288, 12800, - 12832, 0, 8192, 12288, 12800, 12832, 12840, 0, - 8192, 12288, 12800, 12832, 12840, 0, 8192, 12288, - 12800, 12832, 12840, 12842, 0, 8192, 12288, 12800, - 12832, 12840, 0, 8192, 12288, 12800, 12832, 12848, - 12844, 0, 8192, 12288, 12800, 12832, 12848, 12844, - 0, 8192, 12288, 12800, 12832, 12848, 12849, 12846, - 0, 8192, 12288, 12800, 12832, 0, 8192, 12288, - 12800, 12864, 12848, 0, 8192, 12288, 12800, 12864, - 12848, 0, 8192, 12288, 12800, 12864, 12848, 12850, - 0, 8192, 12288, 12800, 12864, 12848, 0, 8192, - 12288, 12800, 12864, 12848, 12852, 0, 8192, 12288, - 12800, 12864, 12848, 12852, 0, 8192, 12288, 12800, - 12864, 12848, 12856, 12854, 0, 8192, 12288, 12800, - 12864, 12848, 0, 8192, 12288, 12800, 12864, 12865, - 12856, 0, 8192, 12288, 12800, 12864, 12865, 12856, - 0, 8192, 12288, 12800, 12864, 12865, 12856, 12858, - 0, 8192, 12288, 12800, 12864, 12865, 12856, 0, - 8192, 12288, 12800, 12864, 12865, 12856, 12860, 0, - 8192, 12288, 12800, 12864, 12865, 12867, 12860, 0, - 8192, 12288, 12800, 12864, 12865, 12867, 12860, 12862, - 0, 8192, 12288, 12800, 0, 8192, 12288, 12800, - 12864, 0, 8192, 12288, 12800, 12864, 0, 8192, - 12288, 12800, 12864, 12866, 0, 8192, 12288, 12800, - 12864, 0, 8192, 12288, 12800, 12864, 12868, 0, - 8192, 12288, 12800, 12864, 12868, 0, 8192, 12288, - 12800, 12864, 12872, 12870, 0, 8192, 12288, 12800, - 12864, 0, 8192, 12288, 12800, 12864, 12872, 0, - 8192, 12288, 12800, 12864, 12872, 0, 8192, 12288, - 12800, 12864, 12872, 12874, 0, 8192, 12288, 12800, - 12864, 12872, 0, 8192, 12288, 12800, 12864, 12880, - 12876, 0, 8192, 12288, 12800, 12864, 12880, 12876, - 0, 8192, 12288, 12800, 12864, 12880, 12881, 12878, - 0, 8192, 12288, 12800, 12864, 0, 8192, 12288, - 12800, 12864, 12880, 0, 8192, 12288, 12800, 12864, - 12880, 0, 8192, 12288, 12800, 12864, 12880, 12882, - 0, 8192, 12288, 12800, 12864, 12880, 0, 8192, - 12288, 12800, 12864, 12880, 12884, 0, 8192, 12288, - 12800, 12864, 12880, 12884, 0, 8192, 12288, 12800, - 12864, 12880, 12888, 12886, 0, 8192, 12288, 12800, - 12864, 12880, 0, 8192, 12288, 12800, 12864, 12896, - 12888, 0, 8192, 12288, 12800, 12864, 12896, 12888, - 0, 8192, 12288, 12800, 12864, 12896, 12888, 12890, - 0, 8192, 12288, 12800, 12864, 12896, 12888, 0, - 8192, 12288, 12800, 12864, 12896, 12897, 12892, 0, - 8192, 12288, 12800, 12864, 12896, 12897, 12892, 0, - 8192, 12288, 12800, 12864, 12896, 12897, 12892, 12894, - 0, 8192, 12288, 12800, 12864, 0, 8192, 12288, - 12800, 12928, 12896, 0, 8192, 12288, 12800, 12928, - 12896, 0, 8192, 12288, 12800, 12928, 12896, 12898, - 0, 8192, 12288, 12800, 12928, 12896, 0, 8192, - 12288, 12800, 12928, 12896, 12900, 0, 8192, 12288, - 12800, 12928, 12896, 12900, 0, 8192, 12288, 12800, - 12928, 12896, 12904, 12902, 0, 8192, 12288, 12800, - 12928, 12896, 0, 8192, 12288, 12800, 12928, 12896, - 12904, 0, 8192, 12288, 12800, 12928, 12896, 12904, - 0, 8192, 12288, 12800, 12928, 12896, 12904, 12906, - 0, 8192, 12288, 12800, 12928, 12896, 12904, 0, - 8192, 12288, 12800, 12928, 12896, 12912, 12908, 0, - 8192, 12288, 12800, 12928, 12896, 12912, 12908, 0, - 8192, 12288, 12800, 12928, 12896, 12912, 12913, 12910, - 0, 8192, 12288, 12800, 12928, 12896, 0, 8192, - 12288, 12800, 12928, 12929, 12912, 0, 8192, 12288, - 12800, 12928, 12929, 12912, 0, 8192, 12288, 12800, - 12928, 12929, 12912, 12914, 0, 8192, 12288, 12800, - 12928, 12929, 12912, 0, 8192, 12288, 12800, 12928, - 12929, 12912, 12916, 0, 8192, 12288, 12800, 12928, - 12929, 12912, 12916, 0, 8192, 12288, 12800, 12928, - 12929, 12912, 12920, 12918, 0, 8192, 12288, 12800, - 12928, 12929, 12912, 0, 8192, 12288, 12800, 12928, - 12929, 12912, 12920, 0, 8192, 12288, 12800, 12928, - 12929, 12931, 12920, 0, 8192, 12288, 12800, 12928, - 12929, 12931, 12920, 12922, 0, 8192, 12288, 12800, - 12928, 12929, 12931, 12920, 0, 8192, 12288, 12800, - 12928, 12929, 12931, 12920, 12924, 0, 8192, 12288, - 12800, 12928, 12929, 12931, 12920, 12924, 0, 8192, - 12288, 12800, 12928, 12929, 12931, 12920, 12924, 12926, - 0, 8192, 12288, 12800, 0, 8192, 12288, 12800, - 12928, 0, 8192, 12288, 12800, 12928, 0, 8192, - 12288, 12800, 12928, 12930, 0, 8192, 12288, 12800, - 12928, 0, 8192, 12288, 12800, 12928, 12932, 0, - 8192, 12288, 12800, 12928, 12932, 0, 8192, 12288, - 12800, 12928, 12936, 12934, 0, 8192, 12288, 12800, - 12928, 0, 8192, 12288, 12800, 12928, 12936, 0, - 8192, 12288, 12800, 12928, 12936, 0, 8192, 12288, - 12800, 12928, 12936, 12938, 0, 8192, 12288, 12800, - 12928, 12936, 0, 8192, 12288, 12800, 12928, 12944, - 12940, 0, 8192, 12288, 12800, 12928, 12944, 12940, - 0, 8192, 12288, 12800, 12928, 12944, 12945, 12942, - 0, 8192, 12288, 12800, 12928, 0, 8192, 12288, - 12800, 12928, 12944, 0, 8192, 12288, 12800, 12928, - 12944, 0, 8192, 12288, 12800, 12928, 12944, 12946, - 0, 8192, 12288, 12800, 12928, 12944, 0, 8192, - 12288, 12800, 12928, 12944, 12948, 0, 8192, 12288, - 12800, 12928, 12944, 12948, 0, 8192, 12288, 12800, - 12928, 12944, 12952, 12950, 0, 8192, 12288, 12800, - 12928, 12944, 0, 8192, 12288, 12800, 12928, 12960, - 12952, 0, 8192, 12288, 12800, 12928, 12960, 12952, - 0, 8192, 12288, 12800, 12928, 12960, 12952, 12954, - 0, 8192, 12288, 12800, 12928, 12960, 12952, 0, - 8192, 12288, 12800, 12928, 12960, 12961, 12956, 0, - 8192, 12288, 12800, 12928, 12960, 12961, 12956, 0, - 8192, 12288, 12800, 12928, 12960, 12961, 12956, 12958, - 0, 8192, 12288, 12800, 12928, 0, 8192, 12288, - 12800, 12928, 12960, 0, 8192, 12288, 12800, 12928, - 12960, 0, 8192, 12288, 12800, 12928, 12960, 12962, - 0, 8192, 12288, 12800, 12928, 12960, 0, 8192, - 12288, 12800, 12928, 12960, 12964, 0, 8192, 12288, - 12800, 12928, 12960, 12964, 0, 8192, 12288, 12800, - 12928, 12960, 12968, 12966, 0, 8192, 12288, 12800, - 12928, 12960, 0, 8192, 12288, 12800, 12928, 12960, - 12968, 0, 8192, 12288, 12800, 12928, 12960, 12968, - 0, 8192, 12288, 12800, 12928, 12960, 12968, 12970, - 0, 8192, 12288, 12800, 12928, 12960, 12968, 0, - 8192, 12288, 12800, 12928, 12960, 12976, 12972, 0, - 8192, 12288, 12800, 12928, 12960, 12976, 12972, 0, - 8192, 12288, 12800, 12928, 12960, 12976, 12977, 12974, - 0, 8192, 12288, 12800, 12928, 12960, 0, 8192, - 12288, 12800, 12928, 12992, 12976, 0, 8192, 12288, - 12800, 12928, 12992, 12976, 0, 8192, 12288, 12800, - 12928, 12992, 12976, 12978, 0, 8192, 12288, 12800, - 12928, 12992, 12976, 0, 8192, 12288, 12800, 12928, - 12992, 12976, 12980, 0, 8192, 12288, 12800, 12928, - 12992, 12976, 12980, 0, 8192, 12288, 12800, 12928, - 12992, 12976, 12984, 12982, 0, 8192, 12288, 12800, - 12928, 12992, 12976, 0, 8192, 12288, 12800, 12928, - 12992, 12993, 12984, 0, 8192, 12288, 12800, 12928, - 12992, 12993, 12984, 0, 8192, 12288, 12800, 12928, - 12992, 12993, 12984, 12986, 0, 8192, 12288, 12800, - 12928, 12992, 12993, 12984, 0, 8192, 12288, 12800, - 12928, 12992, 12993, 12984, 12988, 0, 8192, 12288, - 12800, 12928, 12992, 12993, 12995, 12988, 0, 8192, - 12288, 12800, 12928, 12992, 12993, 12995, 12988, 12990, - 0, 8192, 12288, 12800, 12928, 0, 8192, 12288, - 12800, 13056, 12992, 0, 8192, 12288, 12800, 13056, - 12992, 0, 8192, 12288, 12800, 13056, 12992, 12994, - 0, 8192, 12288, 12800, 13056, 12992, 0, 8192, - 12288, 12800, 13056, 12992, 12996, 0, 8192, 12288, - 12800, 13056, 12992, 12996, 0, 8192, 12288, 12800, - 13056, 12992, 13000, 12998, 0, 8192, 12288, 12800, - 13056, 12992, 0, 8192, 12288, 12800, 13056, 12992, - 13000, 0, 8192, 12288, 12800, 13056, 12992, 13000, - 0, 8192, 12288, 12800, 13056, 12992, 13000, 13002, - 0, 8192, 12288, 12800, 13056, 12992, 13000, 0, - 8192, 12288, 12800, 13056, 12992, 13008, 13004, 0, - 8192, 12288, 12800, 13056, 12992, 13008, 13004, 0, - 8192, 12288, 12800, 13056, 12992, 13008, 13009, 13006, - 0, 8192, 12288, 12800, 13056, 12992, 0, 8192, - 12288, 12800, 13056, 12992, 13008, 0, 8192, 12288, - 12800, 13056, 12992, 13008, 0, 8192, 12288, 12800, - 13056, 12992, 13008, 13010, 0, 8192, 12288, 12800, - 13056, 12992, 13008, 0, 8192, 12288, 12800, 13056, - 12992, 13008, 13012, 0, 8192, 12288, 12800, 13056, - 12992, 13008, 13012, 0, 8192, 12288, 12800, 13056, - 12992, 13008, 13016, 13014, 0, 8192, 12288, 12800, - 13056, 12992, 13008, 0, 8192, 12288, 12800, 13056, - 12992, 13024, 13016, 0, 8192, 12288, 12800, 13056, - 12992, 13024, 13016, 0, 8192, 12288, 12800, 13056, - 12992, 13024, 13016, 13018, 0, 8192, 12288, 12800, - 13056, 12992, 13024, 13016, 0, 8192, 12288, 12800, - 13056, 12992, 13024, 13025, 13020, 0, 8192, 12288, - 12800, 13056, 12992, 13024, 13025, 13020, 0, 8192, - 12288, 12800, 13056, 12992, 13024, 13025, 13020, 13022, - 0, 8192, 12288, 12800, 13056, 12992, 0, 8192, - 12288, 12800, 13056, 13057, 13024, 0, 8192, 12288, - 12800, 13056, 13057, 13024, 0, 8192, 12288, 12800, - 13056, 13057, 13024, 13026, 0, 8192, 12288, 12800, - 13056, 13057, 13024, 0, 8192, 12288, 12800, 13056, - 13057, 13024, 13028, 0, 8192, 12288, 12800, 13056, - 13057, 13024, 13028, 0, 8192, 12288, 12800, 13056, - 13057, 13024, 13032, 13030, 0, 8192, 12288, 12800, - 13056, 13057, 13024, 0, 8192, 12288, 12800, 13056, - 13057, 13024, 13032, 0, 8192, 12288, 12800, 13056, - 13057, 13024, 13032, 0, 8192, 12288, 12800, 13056, - 13057, 13024, 13032, 13034, 0, 8192, 12288, 12800, - 13056, 13057, 13024, 13032, 0, 8192, 12288, 12800, - 13056, 13057, 13024, 13040, 13036, 0, 8192, 12288, - 12800, 13056, 13057, 13024, 13040, 13036, 0, 8192, - 12288, 12800, 13056, 13057, 13024, 13040, 13041, 13038, - 0, 8192, 12288, 12800, 13056, 13057, 13024, 0, - 8192, 12288, 12800, 13056, 13057, 13024, 13040, 0, - 8192, 12288, 12800, 13056, 13057, 13059, 13040, 0, - 8192, 12288, 12800, 13056, 13057, 13059, 13040, 13042, - 0, 8192, 12288, 12800, 13056, 13057, 13059, 13040, - 0, 8192, 12288, 12800, 13056, 13057, 13059, 13040, - 13044, 0, 8192, 12288, 12800, 13056, 13057, 13059, - 13040, 13044, 0, 8192, 12288, 12800, 13056, 13057, - 13059, 13040, 13048, 13046, 0, 8192, 12288, 12800, - 13056, 13057, 13059, 13040, 0, 8192, 12288, 12800, - 13056, 13057, 13059, 13040, 13048, 0, 8192, 12288, - 12800, 13056, 13057, 13059, 13040, 13048, 0, 8192, - 12288, 12800, 13056, 13057, 13059, 13040, 13048, 13050, - 0, 8192, 12288, 12800, 13056, 13057, 13059, 13063, - 13048, 0, 8192, 12288, 12800, 13056, 13057, 13059, - 13063, 13048, 13052, 0, 8192, 12288, 12800, 13056, - 13057, 13059, 13063, 13048, 13052, 0, 8192, 12288, - 12800, 13056, 13057, 13059, 13063, 13048, 13052, 13054, - 0, 8192, 12288, 12800, 0, 8192, 12288, 13312, - 13056, 0, 8192, 12288, 13312, 13056, 0, 8192, - 12288, 13312, 13056, 13058, 0, 8192, 12288, 13312, - 13056, 0, 8192, 12288, 13312, 13056, 13060, 0, - 8192, 12288, 13312, 13056, 13060, 0, 8192, 12288, - 13312, 13056, 13064, 13062, 0, 8192, 12288, 13312, - 13056, 0, 8192, 12288, 13312, 13056, 13064, 0, - 8192, 12288, 13312, 13056, 13064, 0, 8192, 12288, - 13312, 13056, 13064, 13066, 0, 8192, 12288, 13312, - 13056, 13064, 0, 8192, 12288, 13312, 13056, 13072, - 13068, 0, 8192, 12288, 13312, 13056, 13072, 13068, - 0, 8192, 12288, 13312, 13056, 13072, 13073, 13070, - 0, 8192, 12288, 13312, 13056, 0, 8192, 12288, - 13312, 13056, 13072, 0, 8192, 12288, 13312, 13056, - 13072, 0, 8192, 12288, 13312, 13056, 13072, 13074, - 0, 8192, 12288, 13312, 13056, 13072, 0, 8192, - 12288, 13312, 13056, 13072, 13076, 0, 8192, 12288, - 13312, 13056, 13072, 13076, 0, 8192, 12288, 13312, - 13056, 13072, 13080, 13078, 0, 8192, 12288, 13312, - 13056, 13072, 0, 8192, 12288, 13312, 13056, 13088, - 13080, 0, 8192, 12288, 13312, 13056, 13088, 13080, - 0, 8192, 12288, 13312, 13056, 13088, 13080, 13082, - 0, 8192, 12288, 13312, 13056, 13088, 13080, 0, - 8192, 12288, 13312, 13056, 13088, 13089, 13084, 0, - 8192, 12288, 13312, 13056, 13088, 13089, 13084, 0, - 8192, 12288, 13312, 13056, 13088, 13089, 13084, 13086, - 0, 8192, 12288, 13312, 13056, 0, 8192, 12288, - 13312, 13056, 13088, 0, 8192, 12288, 13312, 13056, - 13088, 0, 8192, 12288, 13312, 13056, 13088, 13090, - 0, 8192, 12288, 13312, 13056, 13088, 0, 8192, - 12288, 13312, 13056, 13088, 13092, 0, 8192, 12288, - 13312, 13056, 13088, 13092, 0, 8192, 12288, 13312, - 13056, 13088, 13096, 13094, 0, 8192, 12288, 13312, - 13056, 13088, 0, 8192, 12288, 13312, 13056, 13088, - 13096, 0, 8192, 12288, 13312, 13056, 13088, 13096, - 0, 8192, 12288, 13312, 13056, 13088, 13096, 13098, - 0, 8192, 12288, 13312, 13056, 13088, 13096, 0, - 8192, 12288, 13312, 13056, 13088, 13104, 13100, 0, - 8192, 12288, 13312, 13056, 13088, 13104, 13100, 0, - 8192, 12288, 13312, 13056, 13088, 13104, 13105, 13102, - 0, 8192, 12288, 13312, 13056, 13088, 0, 8192, - 12288, 13312, 13056, 13120, 13104, 0, 8192, 12288, - 13312, 13056, 13120, 13104, 0, 8192, 12288, 13312, - 13056, 13120, 13104, 13106, 0, 8192, 12288, 13312, - 13056, 13120, 13104, 0, 8192, 12288, 13312, 13056, - 13120, 13104, 13108, 0, 8192, 12288, 13312, 13056, - 13120, 13104, 13108, 0, 8192, 12288, 13312, 13056, - 13120, 13104, 13112, 13110, 0, 8192, 12288, 13312, - 13056, 13120, 13104, 0, 8192, 12288, 13312, 13056, - 13120, 13121, 13112, 0, 8192, 12288, 13312, 13056, - 13120, 13121, 13112, 0, 8192, 12288, 13312, 13056, - 13120, 13121, 13112, 13114, 0, 8192, 12288, 13312, - 13056, 13120, 13121, 13112, 0, 8192, 12288, 13312, - 13056, 13120, 13121, 13112, 13116, 0, 8192, 12288, - 13312, 13056, 13120, 13121, 13123, 13116, 0, 8192, - 12288, 13312, 13056, 13120, 13121, 13123, 13116, 13118, - 0, 8192, 12288, 13312, 13056, 0, 8192, 12288, - 13312, 13056, 13120, 0, 8192, 12288, 13312, 13056, - 13120, 0, 8192, 12288, 13312, 13056, 13120, 13122, - 0, 8192, 12288, 13312, 13056, 13120, 0, 8192, - 12288, 13312, 13056, 13120, 13124, 0, 8192, 12288, - 13312, 13056, 13120, 13124, 0, 8192, 12288, 13312, - 13056, 13120, 13128, 13126, 0, 8192, 12288, 13312, - 13056, 13120, 0, 8192, 12288, 13312, 13056, 13120, - 13128, 0, 8192, 12288, 13312, 13056, 13120, 13128, - 0, 8192, 12288, 13312, 13056, 13120, 13128, 13130, - 0, 8192, 12288, 13312, 13056, 13120, 13128, 0, - 8192, 12288, 13312, 13056, 13120, 13136, 13132, 0, - 8192, 12288, 13312, 13056, 13120, 13136, 13132, 0, - 8192, 12288, 13312, 13056, 13120, 13136, 13137, 13134, - 0, 8192, 12288, 13312, 13056, 13120, 0, 8192, - 12288, 13312, 13056, 13120, 13136, 0, 8192, 12288, - 13312, 13056, 13120, 13136, 0, 8192, 12288, 13312, - 13056, 13120, 13136, 13138, 0, 8192, 12288, 13312, - 13056, 13120, 13136, 0, 8192, 12288, 13312, 13056, - 13120, 13136, 13140, 0, 8192, 12288, 13312, 13056, - 13120, 13136, 13140, 0, 8192, 12288, 13312, 13056, - 13120, 13136, 13144, 13142, 0, 8192, 12288, 13312, - 13056, 13120, 13136, 0, 8192, 12288, 13312, 13056, - 13120, 13152, 13144, 0, 8192, 12288, 13312, 13056, - 13120, 13152, 13144, 0, 8192, 12288, 13312, 13056, - 13120, 13152, 13144, 13146, 0, 8192, 12288, 13312, - 13056, 13120, 13152, 13144, 0, 8192, 12288, 13312, - 13056, 13120, 13152, 13153, 13148, 0, 8192, 12288, - 13312, 13056, 13120, 13152, 13153, 13148, 0, 8192, - 12288, 13312, 13056, 13120, 13152, 13153, 13148, 13150, - 0, 8192, 12288, 13312, 13056, 13120, 0, 8192, - 12288, 13312, 13056, 13184, 13152, 0, 8192, 12288, - 13312, 13056, 13184, 13152, 0, 8192, 12288, 13312, - 13056, 13184, 13152, 13154, 0, 8192, 12288, 13312, - 13056, 13184, 13152, 0, 8192, 12288, 13312, 13056, - 13184, 13152, 13156, 0, 8192, 12288, 13312, 13056, - 13184, 13152, 13156, 0, 8192, 12288, 13312, 13056, - 13184, 13152, 13160, 13158, 0, 8192, 12288, 13312, - 13056, 13184, 13152, 0, 8192, 12288, 13312, 13056, - 13184, 13152, 13160, 0, 8192, 12288, 13312, 13056, - 13184, 13152, 13160, 0, 8192, 12288, 13312, 13056, - 13184, 13152, 13160, 13162, 0, 8192, 12288, 13312, - 13056, 13184, 13152, 13160, 0, 8192, 12288, 13312, - 13056, 13184, 13152, 13168, 13164, 0, 8192, 12288, - 13312, 13056, 13184, 13152, 13168, 13164, 0, 8192, - 12288, 13312, 13056, 13184, 13152, 13168, 13169, 13166, - 0, 8192, 12288, 13312, 13056, 13184, 13152, 0, - 8192, 12288, 13312, 13056, 13184, 13185, 13168, 0, - 8192, 12288, 13312, 13056, 13184, 13185, 13168, 0, - 8192, 12288, 13312, 13056, 13184, 13185, 13168, 13170, - 0, 8192, 12288, 13312, 13056, 13184, 13185, 13168, - 0, 8192, 12288, 13312, 13056, 13184, 13185, 13168, - 13172, 0, 8192, 12288, 13312, 13056, 13184, 13185, - 13168, 13172, 0, 8192, 12288, 13312, 13056, 13184, - 13185, 13168, 13176, 13174, 0, 8192, 12288, 13312, - 13056, 13184, 13185, 13168, 0, 8192, 12288, 13312, - 13056, 13184, 13185, 13168, 13176, 0, 8192, 12288, - 13312, 13056, 13184, 13185, 13187, 13176, 0, 8192, - 12288, 13312, 13056, 13184, 13185, 13187, 13176, 13178, - 0, 8192, 12288, 13312, 13056, 13184, 13185, 13187, - 13176, 0, 8192, 12288, 13312, 13056, 13184, 13185, - 13187, 13176, 13180, 0, 8192, 12288, 13312, 13056, - 13184, 13185, 13187, 13176, 13180, 0, 8192, 12288, - 13312, 13056, 13184, 13185, 13187, 13176, 13180, 13182, - 0, 8192, 12288, 13312, 13056, 0, 8192, 12288, - 13312, 13056, 13184, 0, 8192, 12288, 13312, 13313, - 13184, 0, 8192, 12288, 13312, 13313, 13184, 13186, - 0, 8192, 12288, 13312, 13313, 13184, 0, 8192, - 12288, 13312, 13313, 13184, 13188, 0, 8192, 12288, - 13312, 13313, 13184, 13188, 0, 8192, 12288, 13312, - 13313, 13184, 13192, 13190, 0, 8192, 12288, 13312, - 13313, 13184, 0, 8192, 12288, 13312, 13313, 13184, - 13192, 0, 8192, 12288, 13312, 13313, 13184, 13192, - 0, 8192, 12288, 13312, 13313, 13184, 13192, 13194, - 0, 8192, 12288, 13312, 13313, 13184, 13192, 0, - 8192, 12288, 13312, 13313, 13184, 13200, 13196, 0, - 8192, 12288, 13312, 13313, 13184, 13200, 13196, 0, - 8192, 12288, 13312, 13313, 13184, 13200, 13201, 13198, - 0, 8192, 12288, 13312, 13313, 13184, 0, 8192, - 12288, 13312, 13313, 13184, 13200, 0, 8192, 12288, - 13312, 13313, 13184, 13200, 0, 8192, 12288, 13312, - 13313, 13184, 13200, 13202, 0, 8192, 12288, 13312, - 13313, 13184, 13200, 0, 8192, 12288, 13312, 13313, - 13184, 13200, 13204, 0, 8192, 12288, 13312, 13313, - 13184, 13200, 13204, 0, 8192, 12288, 13312, 13313, - 13184, 13200, 13208, 13206, 0, 8192, 12288, 13312, - 13313, 13184, 13200, 0, 8192, 12288, 13312, 13313, - 13184, 13216, 13208, 0, 8192, 12288, 13312, 13313, - 13184, 13216, 13208, 0, 8192, 12288, 13312, 13313, - 13184, 13216, 13208, 13210, 0, 8192, 12288, 13312, - 13313, 13184, 13216, 13208, 0, 8192, 12288, 13312, - 13313, 13184, 13216, 13217, 13212, 0, 8192, 12288, - 13312, 13313, 13184, 13216, 13217, 13212, 0, 8192, - 12288, 13312, 13313, 13184, 13216, 13217, 13212, 13214, - 0, 8192, 12288, 13312, 13313, 13184, 0, 8192, - 12288, 13312, 13313, 13184, 13216, 0, 8192, 12288, - 13312, 13313, 13184, 13216, 0, 8192, 12288, 13312, - 13313, 13184, 13216, 13218, 0, 8192, 12288, 13312, - 13313, 13184, 13216, 0, 8192, 12288, 13312, 13313, - 13184, 13216, 13220, 0, 8192, 12288, 13312, 13313, - 13184, 13216, 13220, 0, 8192, 12288, 13312, 13313, - 13184, 13216, 13224, 13222, 0, 8192, 12288, 13312, - 13313, 13184, 13216, 0, 8192, 12288, 13312, 13313, - 13184, 13216, 13224, 0, 8192, 12288, 13312, 13313, - 13184, 13216, 13224, 0, 8192, 12288, 13312, 13313, - 13184, 13216, 13224, 13226, 0, 8192, 12288, 13312, - 13313, 13184, 13216, 13224, 0, 8192, 12288, 13312, - 13313, 13184, 13216, 13232, 13228, 0, 8192, 12288, - 13312, 13313, 13184, 13216, 13232, 13228, 0, 8192, - 12288, 13312, 13313, 13184, 13216, 13232, 13233, 13230, - 0, 8192, 12288, 13312, 13313, 13184, 13216, 0, - 8192, 12288, 13312, 13313, 13184, 13248, 13232, 0, - 8192, 12288, 13312, 13313, 13184, 13248, 13232, 0, - 8192, 12288, 13312, 13313, 13184, 13248, 13232, 13234, - 0, 8192, 12288, 13312, 13313, 13184, 13248, 13232, - 0, 8192, 12288, 13312, 13313, 13184, 13248, 13232, - 13236, 0, 8192, 12288, 13312, 13313, 13184, 13248, - 13232, 13236, 0, 8192, 12288, 13312, 13313, 13184, - 13248, 13232, 13240, 13238, 0, 8192, 12288, 13312, - 13313, 13184, 13248, 13232, 0, 8192, 12288, 13312, - 13313, 13184, 13248, 13249, 13240, 0, 8192, 12288, - 13312, 13313, 13184, 13248, 13249, 13240, 0, 8192, - 12288, 13312, 13313, 13184, 13248, 13249, 13240, 13242, - 0, 8192, 12288, 13312, 13313, 13184, 13248, 13249, - 13240, 0, 8192, 12288, 13312, 13313, 13184, 13248, - 13249, 13240, 13244, 0, 8192, 12288, 13312, 13313, - 13184, 13248, 13249, 13251, 13244, 0, 8192, 12288, - 13312, 13313, 13184, 13248, 13249, 13251, 13244, 13246, - 0, 8192, 12288, 13312, 13313, 13184, 0, 8192, - 12288, 13312, 13313, 13184, 13248, 0, 8192, 12288, - 13312, 13313, 13184, 13248, 0, 8192, 12288, 13312, - 13313, 13184, 13248, 13250, 0, 8192, 12288, 13312, - 13313, 13315, 13248, 0, 8192, 12288, 13312, 13313, - 13315, 13248, 13252, 0, 8192, 12288, 13312, 13313, - 13315, 13248, 13252, 0, 8192, 12288, 13312, 13313, - 13315, 13248, 13256, 13254, 0, 8192, 12288, 13312, - 13313, 13315, 13248, 0, 8192, 12288, 13312, 13313, - 13315, 13248, 13256, 0, 8192, 12288, 13312, 13313, - 13315, 13248, 13256, 0, 8192, 12288, 13312, 13313, - 13315, 13248, 13256, 13258, 0, 8192, 12288, 13312, - 13313, 13315, 13248, 13256, 0, 8192, 12288, 13312, - 13313, 13315, 13248, 13264, 13260, 0, 8192, 12288, - 13312, 13313, 13315, 13248, 13264, 13260, 0, 8192, - 12288, 13312, 13313, 13315, 13248, 13264, 13265, 13262, - 0, 8192, 12288, 13312, 13313, 13315, 13248, 0, - 8192, 12288, 13312, 13313, 13315, 13248, 13264, 0, - 8192, 12288, 13312, 13313, 13315, 13248, 13264, 0, - 8192, 12288, 13312, 13313, 13315, 13248, 13264, 13266, - 0, 8192, 12288, 13312, 13313, 13315, 13248, 13264, - 0, 8192, 12288, 13312, 13313, 13315, 13248, 13264, - 13268, 0, 8192, 12288, 13312, 13313, 13315, 13248, - 13264, 13268, 0, 8192, 12288, 13312, 13313, 13315, - 13248, 13264, 13272, 13270, 0, 8192, 12288, 13312, - 13313, 13315, 13248, 13264, 0, 8192, 12288, 13312, - 13313, 13315, 13248, 13280, 13272, 0, 8192, 12288, - 13312, 13313, 13315, 13248, 13280, 13272, 0, 8192, - 12288, 13312, 13313, 13315, 13248, 13280, 13272, 13274, - 0, 8192, 12288, 13312, 13313, 13315, 13248, 13280, - 13272, 0, 8192, 12288, 13312, 13313, 13315, 13248, - 13280, 13281, 13276, 0, 8192, 12288, 13312, 13313, - 13315, 13248, 13280, 13281, 13276, 0, 8192, 12288, - 13312, 13313, 13315, 13248, 13280, 13281, 13276, 13278, - 0, 8192, 12288, 13312, 13313, 13315, 13248, 0, - 8192, 12288, 13312, 13313, 13315, 13248, 13280, 0, - 8192, 12288, 13312, 13313, 13315, 13248, 13280, 0, - 8192, 12288, 13312, 13313, 13315, 13248, 13280, 13282, - 0, 8192, 12288, 13312, 13313, 13315, 13248, 13280, - 0, 8192, 12288, 13312, 13313, 13315, 13248, 13280, - 13284, 0, 8192, 12288, 13312, 13313, 13315, 13248, - 13280, 13284, 0, 8192, 12288, 13312, 13313, 13315, - 13248, 13280, 13288, 13286, 0, 8192, 12288, 13312, - 13313, 13315, 13319, 13280, 0, 8192, 12288, 13312, - 13313, 13315, 13319, 13280, 13288, 0, 8192, 12288, - 13312, 13313, 13315, 13319, 13280, 13288, 0, 8192, - 12288, 13312, 13313, 13315, 13319, 13280, 13288, 13290, - 0, 8192, 12288, 13312, 13313, 13315, 13319, 13280, - 13288, 0, 8192, 12288, 13312, 13313, 13315, 13319, - 13280, 13296, 13292, 0, 8192, 12288, 13312, 13313, - 13315, 13319, 13280, 13296, 13292, 0, 8192, 12288, - 13312, 13313, 13315, 13319, 13280, 13296, 13297, 13294, - 0, 8192, 12288, 13312, 13313, 13315, 13319, 13280, - 0, 8192, 12288, 13312, 13313, 13315, 13319, 13280, - 13296, 0, 8192, 12288, 13312, 13313, 13315, 13319, - 13280, 13296, 0, 8192, 12288, 13312, 13313, 13315, - 13319, 13280, 13296, 13298, 0, 8192, 12288, 13312, - 13313, 13315, 13319, 13280, 13296, 0, 8192, 12288, - 13312, 13313, 13315, 13319, 13280, 13296, 13300, 0, - 8192, 12288, 13312, 13313, 13315, 13319, 13280, 13296, - 13300, 0, 8192, 12288, 13312, 13313, 13315, 13319, - 13280, 13296, 13304, 13302, 0, 8192, 12288, 13312, - 13313, 13315, 13319, 13280, 13296, 0, 8192, 12288, - 13312, 13313, 13315, 13319, 13280, 13296, 13304, 0, - 8192, 12288, 13312, 13313, 13315, 13319, 13280, 13296, - 13304, 0, 8192, 12288, 13312, 13313, 13315, 13319, - 13280, 13296, 13304, 13306, 0, 8192, 12288, 13312, - 13313, 13315, 13319, 13280, 13296, 13304, 0, 8192, - 12288, 13312, 13313, 13315, 13319, 13280, 13296, 13304, - 13308, 0, 8192, 12288, 13312, 13313, 13315, 13319, - 13280, 13296, 13304, 13308, 0, 8192, 12288, 13312, - 13313, 13315, 13319, 13280, 13296, 13304, 13308, 13310, - 0, 8192, 12288, 0, 8192, 12288, 13312, 0, - 8192, 12288, 13312, 0, 8192, 12288, 13312, 13314, - 0, 8192, 12288, 13312, 0, 8192, 12288, 13312, - 13316, 0, 8192, 12288, 13312, 13316, 0, 8192, - 12288, 13312, 13320, 13318, 0, 8192, 12288, 13312, - 0, 8192, 12288, 13312, 13320, 0, 8192, 12288, - 13312, 13320, 0, 8192, 12288, 13312, 13320, 13322, - 0, 8192, 12288, 13312, 13320, 0, 8192, 12288, - 13312, 13328, 13324, 0, 8192, 12288, 13312, 13328, - 13324, 0, 8192, 12288, 13312, 13328, 13329, 13326, - 0, 8192, 12288, 13312, 0, 8192, 12288, 13312, - 13328, 0, 8192, 12288, 13312, 13328, 0, 8192, - 12288, 13312, 13328, 13330, 0, 8192, 12288, 13312, - 13328, 0, 8192, 12288, 13312, 13328, 13332, 0, - 8192, 12288, 13312, 13328, 13332, 0, 8192, 12288, - 13312, 13328, 13336, 13334, 0, 8192, 12288, 13312, - 13328, 0, 8192, 12288, 13312, 13344, 13336, 0, - 8192, 12288, 13312, 13344, 13336, 0, 8192, 12288, - 13312, 13344, 13336, 13338, 0, 8192, 12288, 13312, - 13344, 13336, 0, 8192, 12288, 13312, 13344, 13345, - 13340, 0, 8192, 12288, 13312, 13344, 13345, 13340, - 0, 8192, 12288, 13312, 13344, 13345, 13340, 13342, - 0, 8192, 12288, 13312, 0, 8192, 12288, 13312, - 13344, 0, 8192, 12288, 13312, 13344, 0, 8192, - 12288, 13312, 13344, 13346, 0, 8192, 12288, 13312, - 13344, 0, 8192, 12288, 13312, 13344, 13348, 0, - 8192, 12288, 13312, 13344, 13348, 0, 8192, 12288, - 13312, 13344, 13352, 13350, 0, 8192, 12288, 13312, - 13344, 0, 8192, 12288, 13312, 13344, 13352, 0, - 8192, 12288, 13312, 13344, 13352, 0, 8192, 12288, - 13312, 13344, 13352, 13354, 0, 8192, 12288, 13312, - 13344, 13352, 0, 8192, 12288, 13312, 13344, 13360, - 13356, 0, 8192, 12288, 13312, 13344, 13360, 13356, - 0, 8192, 12288, 13312, 13344, 13360, 13361, 13358, - 0, 8192, 12288, 13312, 13344, 0, 8192, 12288, - 13312, 13376, 13360, 0, 8192, 12288, 13312, 13376, - 13360, 0, 8192, 12288, 13312, 13376, 13360, 13362, - 0, 8192, 12288, 13312, 13376, 13360, 0, 8192, - 12288, 13312, 13376, 13360, 13364, 0, 8192, 12288, - 13312, 13376, 13360, 13364, 0, 8192, 12288, 13312, - 13376, 13360, 13368, 13366, 0, 8192, 12288, 13312, - 13376, 13360, 0, 8192, 12288, 13312, 13376, 13377, - 13368, 0, 8192, 12288, 13312, 13376, 13377, 13368, - 0, 8192, 12288, 13312, 13376, 13377, 13368, 13370, - 0, 8192, 12288, 13312, 13376, 13377, 13368, 0, - 8192, 12288, 13312, 13376, 13377, 13368, 13372, 0, - 8192, 12288, 13312, 13376, 13377, 13379, 13372, 0, - 8192, 12288, 13312, 13376, 13377, 13379, 13372, 13374, - 0, 8192, 12288, 13312, 0, 8192, 12288, 13312, - 13376, 0, 8192, 12288, 13312, 13376, 0, 8192, - 12288, 13312, 13376, 13378, 0, 8192, 12288, 13312, - 13376, 0, 8192, 12288, 13312, 13376, 13380, 0, - 8192, 12288, 13312, 13376, 13380, 0, 8192, 12288, - 13312, 13376, 13384, 13382, 0, 8192, 12288, 13312, - 13376, 0, 8192, 12288, 13312, 13376, 13384, 0, - 8192, 12288, 13312, 13376, 13384, 0, 8192, 12288, - 13312, 13376, 13384, 13386, 0, 8192, 12288, 13312, - 13376, 13384, 0, 8192, 12288, 13312, 13376, 13392, - 13388, 0, 8192, 12288, 13312, 13376, 13392, 13388, - 0, 8192, 12288, 13312, 13376, 13392, 13393, 13390, - 0, 8192, 12288, 13312, 13376, 0, 8192, 12288, - 13312, 13376, 13392, 0, 8192, 12288, 13312, 13376, - 13392, 0, 8192, 12288, 13312, 13376, 13392, 13394, - 0, 8192, 12288, 13312, 13376, 13392, 0, 8192, - 12288, 13312, 13376, 13392, 13396, 0, 8192, 12288, - 13312, 13376, 13392, 13396, 0, 8192, 12288, 13312, - 13376, 13392, 13400, 13398, 0, 8192, 12288, 13312, - 13376, 13392, 0, 8192, 12288, 13312, 13376, 13408, - 13400, 0, 8192, 12288, 13312, 13376, 13408, 13400, - 0, 8192, 12288, 13312, 13376, 13408, 13400, 13402, - 0, 8192, 12288, 13312, 13376, 13408, 13400, 0, - 8192, 12288, 13312, 13376, 13408, 13409, 13404, 0, - 8192, 12288, 13312, 13376, 13408, 13409, 13404, 0, - 8192, 12288, 13312, 13376, 13408, 13409, 13404, 13406, - 0, 8192, 12288, 13312, 13376, 0, 8192, 12288, - 13312, 13440, 13408, 0, 8192, 12288, 13312, 13440, - 13408, 0, 8192, 12288, 13312, 13440, 13408, 13410, - 0, 8192, 12288, 13312, 13440, 13408, 0, 8192, - 12288, 13312, 13440, 13408, 13412, 0, 8192, 12288, - 13312, 13440, 13408, 13412, 0, 8192, 12288, 13312, - 13440, 13408, 13416, 13414, 0, 8192, 12288, 13312, - 13440, 13408, 0, 8192, 12288, 13312, 13440, 13408, - 13416, 0, 8192, 12288, 13312, 13440, 13408, 13416, - 0, 8192, 12288, 13312, 13440, 13408, 13416, 13418, - 0, 8192, 12288, 13312, 13440, 13408, 13416, 0, - 8192, 12288, 13312, 13440, 13408, 13424, 13420, 0, - 8192, 12288, 13312, 13440, 13408, 13424, 13420, 0, - 8192, 12288, 13312, 13440, 13408, 13424, 13425, 13422, - 0, 8192, 12288, 13312, 13440, 13408, 0, 8192, - 12288, 13312, 13440, 13441, 13424, 0, 8192, 12288, - 13312, 13440, 13441, 13424, 0, 8192, 12288, 13312, - 13440, 13441, 13424, 13426, 0, 8192, 12288, 13312, - 13440, 13441, 13424, 0, 8192, 12288, 13312, 13440, - 13441, 13424, 13428, 0, 8192, 12288, 13312, 13440, - 13441, 13424, 13428, 0, 8192, 12288, 13312, 13440, - 13441, 13424, 13432, 13430, 0, 8192, 12288, 13312, - 13440, 13441, 13424, 0, 8192, 12288, 13312, 13440, - 13441, 13424, 13432, 0, 8192, 12288, 13312, 13440, - 13441, 13443, 13432, 0, 8192, 12288, 13312, 13440, - 13441, 13443, 13432, 13434, 0, 8192, 12288, 13312, - 13440, 13441, 13443, 13432, 0, 8192, 12288, 13312, - 13440, 13441, 13443, 13432, 13436, 0, 8192, 12288, - 13312, 13440, 13441, 13443, 13432, 13436, 0, 8192, - 12288, 13312, 13440, 13441, 13443, 13432, 13436, 13438, - 0, 8192, 12288, 13312, 0, 8192, 12288, 13312, - 13440, 0, 8192, 12288, 13312, 13440, 0, 8192, - 12288, 13312, 13440, 13442, 0, 8192, 12288, 13312, - 13440, 0, 8192, 12288, 13312, 13440, 13444, 0, - 8192, 12288, 13312, 13440, 13444, 0, 8192, 12288, - 13312, 13440, 13448, 13446, 0, 8192, 12288, 13312, - 13440, 0, 8192, 12288, 13312, 13440, 13448, 0, - 8192, 12288, 13312, 13440, 13448, 0, 8192, 12288, - 13312, 13440, 13448, 13450, 0, 8192, 12288, 13312, - 13440, 13448, 0, 8192, 12288, 13312, 13440, 13456, - 13452, 0, 8192, 12288, 13312, 13440, 13456, 13452, - 0, 8192, 12288, 13312, 13440, 13456, 13457, 13454, - 0, 8192, 12288, 13312, 13440, 0, 8192, 12288, - 13312, 13440, 13456, 0, 8192, 12288, 13312, 13440, - 13456, 0, 8192, 12288, 13312, 13440, 13456, 13458, - 0, 8192, 12288, 13312, 13440, 13456, 0, 8192, - 12288, 13312, 13440, 13456, 13460, 0, 8192, 12288, - 13312, 13440, 13456, 13460, 0, 8192, 12288, 13312, - 13440, 13456, 13464, 13462, 0, 8192, 12288, 13312, - 13440, 13456, 0, 8192, 12288, 13312, 13440, 13472, - 13464, 0, 8192, 12288, 13312, 13440, 13472, 13464, - 0, 8192, 12288, 13312, 13440, 13472, 13464, 13466, - 0, 8192, 12288, 13312, 13440, 13472, 13464, 0, - 8192, 12288, 13312, 13440, 13472, 13473, 13468, 0, - 8192, 12288, 13312, 13440, 13472, 13473, 13468, 0, - 8192, 12288, 13312, 13440, 13472, 13473, 13468, 13470, - 0, 8192, 12288, 13312, 13440, 0, 8192, 12288, - 13312, 13440, 13472, 0, 8192, 12288, 13312, 13440, - 13472, 0, 8192, 12288, 13312, 13440, 13472, 13474, - 0, 8192, 12288, 13312, 13440, 13472, 0, 8192, - 12288, 13312, 13440, 13472, 13476, 0, 8192, 12288, - 13312, 13440, 13472, 13476, 0, 8192, 12288, 13312, - 13440, 13472, 13480, 13478, 0, 8192, 12288, 13312, - 13440, 13472, 0, 8192, 12288, 13312, 13440, 13472, - 13480, 0, 8192, 12288, 13312, 13440, 13472, 13480, - 0, 8192, 12288, 13312, 13440, 13472, 13480, 13482, - 0, 8192, 12288, 13312, 13440, 13472, 13480, 0, - 8192, 12288, 13312, 13440, 13472, 13488, 13484, 0, - 8192, 12288, 13312, 13440, 13472, 13488, 13484, 0, - 8192, 12288, 13312, 13440, 13472, 13488, 13489, 13486, - 0, 8192, 12288, 13312, 13440, 13472, 0, 8192, - 12288, 13312, 13440, 13504, 13488, 0, 8192, 12288, - 13312, 13440, 13504, 13488, 0, 8192, 12288, 13312, - 13440, 13504, 13488, 13490, 0, 8192, 12288, 13312, - 13440, 13504, 13488, 0, 8192, 12288, 13312, 13440, - 13504, 13488, 13492, 0, 8192, 12288, 13312, 13440, - 13504, 13488, 13492, 0, 8192, 12288, 13312, 13440, - 13504, 13488, 13496, 13494, 0, 8192, 12288, 13312, - 13440, 13504, 13488, 0, 8192, 12288, 13312, 13440, - 13504, 13505, 13496, 0, 8192, 12288, 13312, 13440, - 13504, 13505, 13496, 0, 8192, 12288, 13312, 13440, - 13504, 13505, 13496, 13498, 0, 8192, 12288, 13312, - 13440, 13504, 13505, 13496, 0, 8192, 12288, 13312, - 13440, 13504, 13505, 13496, 13500, 0, 8192, 12288, - 13312, 13440, 13504, 13505, 13507, 13500, 0, 8192, - 12288, 13312, 13440, 13504, 13505, 13507, 13500, 13502, - 0, 8192, 12288, 13312, 13440, 0, 8192, 12288, - 13312, 13568, 13504, 0, 8192, 12288, 13312, 13568, - 13504, 0, 8192, 12288, 13312, 13568, 13504, 13506, - 0, 8192, 12288, 13312, 13568, 13504, 0, 8192, - 12288, 13312, 13568, 13504, 13508, 0, 8192, 12288, - 13312, 13568, 13504, 13508, 0, 8192, 12288, 13312, - 13568, 13504, 13512, 13510, 0, 8192, 12288, 13312, - 13568, 13504, 0, 8192, 12288, 13312, 13568, 13504, - 13512, 0, 8192, 12288, 13312, 13568, 13504, 13512, - 0, 8192, 12288, 13312, 13568, 13504, 13512, 13514, - 0, 8192, 12288, 13312, 13568, 13504, 13512, 0, - 8192, 12288, 13312, 13568, 13504, 13520, 13516, 0, - 8192, 12288, 13312, 13568, 13504, 13520, 13516, 0, - 8192, 12288, 13312, 13568, 13504, 13520, 13521, 13518, - 0, 8192, 12288, 13312, 13568, 13504, 0, 8192, - 12288, 13312, 13568, 13504, 13520, 0, 8192, 12288, - 13312, 13568, 13504, 13520, 0, 8192, 12288, 13312, - 13568, 13504, 13520, 13522, 0, 8192, 12288, 13312, - 13568, 13504, 13520, 0, 8192, 12288, 13312, 13568, - 13504, 13520, 13524, 0, 8192, 12288, 13312, 13568, - 13504, 13520, 13524, 0, 8192, 12288, 13312, 13568, - 13504, 13520, 13528, 13526, 0, 8192, 12288, 13312, - 13568, 13504, 13520, 0, 8192, 12288, 13312, 13568, - 13504, 13536, 13528, 0, 8192, 12288, 13312, 13568, - 13504, 13536, 13528, 0, 8192, 12288, 13312, 13568, - 13504, 13536, 13528, 13530, 0, 8192, 12288, 13312, - 13568, 13504, 13536, 13528, 0, 8192, 12288, 13312, - 13568, 13504, 13536, 13537, 13532, 0, 8192, 12288, - 13312, 13568, 13504, 13536, 13537, 13532, 0, 8192, - 12288, 13312, 13568, 13504, 13536, 13537, 13532, 13534, - 0, 8192, 12288, 13312, 13568, 13504, 0, 8192, - 12288, 13312, 13568, 13569, 13536, 0, 8192, 12288, - 13312, 13568, 13569, 13536, 0, 8192, 12288, 13312, - 13568, 13569, 13536, 13538, 0, 8192, 12288, 13312, - 13568, 13569, 13536, 0, 8192, 12288, 13312, 13568, - 13569, 13536, 13540, 0, 8192, 12288, 13312, 13568, - 13569, 13536, 13540, 0, 8192, 12288, 13312, 13568, - 13569, 13536, 13544, 13542, 0, 8192, 12288, 13312, - 13568, 13569, 13536, 0, 8192, 12288, 13312, 13568, - 13569, 13536, 13544, 0, 8192, 12288, 13312, 13568, - 13569, 13536, 13544, 0, 8192, 12288, 13312, 13568, - 13569, 13536, 13544, 13546, 0, 8192, 12288, 13312, - 13568, 13569, 13536, 13544, 0, 8192, 12288, 13312, - 13568, 13569, 13536, 13552, 13548, 0, 8192, 12288, - 13312, 13568, 13569, 13536, 13552, 13548, 0, 8192, - 12288, 13312, 13568, 13569, 13536, 13552, 13553, 13550, - 0, 8192, 12288, 13312, 13568, 13569, 13536, 0, - 8192, 12288, 13312, 13568, 13569, 13536, 13552, 0, - 8192, 12288, 13312, 13568, 13569, 13571, 13552, 0, - 8192, 12288, 13312, 13568, 13569, 13571, 13552, 13554, - 0, 8192, 12288, 13312, 13568, 13569, 13571, 13552, - 0, 8192, 12288, 13312, 13568, 13569, 13571, 13552, - 13556, 0, 8192, 12288, 13312, 13568, 13569, 13571, - 13552, 13556, 0, 8192, 12288, 13312, 13568, 13569, - 13571, 13552, 13560, 13558, 0, 8192, 12288, 13312, - 13568, 13569, 13571, 13552, 0, 8192, 12288, 13312, - 13568, 13569, 13571, 13552, 13560, 0, 8192, 12288, - 13312, 13568, 13569, 13571, 13552, 13560, 0, 8192, - 12288, 13312, 13568, 13569, 13571, 13552, 13560, 13562, - 0, 8192, 12288, 13312, 13568, 13569, 13571, 13575, - 13560, 0, 8192, 12288, 13312, 13568, 13569, 13571, - 13575, 13560, 13564, 0, 8192, 12288, 13312, 13568, - 13569, 13571, 13575, 13560, 13564, 0, 8192, 12288, - 13312, 13568, 13569, 13571, 13575, 13560, 13564, 13566, - 0, 8192, 12288, 13312, 0, 8192, 12288, 13312, - 13568, 0, 8192, 12288, 13312, 13568, 0, 8192, - 12288, 13312, 13568, 13570, 0, 8192, 12288, 13312, - 13568, 0, 8192, 12288, 13312, 13568, 13572, 0, - 8192, 12288, 13312, 13568, 13572, 0, 8192, 12288, - 13312, 13568, 13576, 13574, 0, 8192, 12288, 13312, - 13568, 0, 8192, 12288, 13312, 13568, 13576, 0, - 8192, 12288, 13312, 13568, 13576, 0, 8192, 12288, - 13312, 13568, 13576, 13578, 0, 8192, 12288, 13312, - 13568, 13576, 0, 8192, 12288, 13312, 13568, 13584, - 13580, 0, 8192, 12288, 13312, 13568, 13584, 13580, - 0, 8192, 12288, 13312, 13568, 13584, 13585, 13582, - 0, 8192, 12288, 13312, 13568, 0, 8192, 12288, - 13312, 13568, 13584, 0, 8192, 12288, 13312, 13568, - 13584, 0, 8192, 12288, 13312, 13568, 13584, 13586, - 0, 8192, 12288, 13312, 13568, 13584, 0, 8192, - 12288, 13312, 13568, 13584, 13588, 0, 8192, 12288, - 13312, 13568, 13584, 13588, 0, 8192, 12288, 13312, - 13568, 13584, 13592, 13590, 0, 8192, 12288, 13312, - 13568, 13584, 0, 8192, 12288, 13312, 13568, 13600, - 13592, 0, 8192, 12288, 13312, 13568, 13600, 13592, - 0, 8192, 12288, 13312, 13568, 13600, 13592, 13594, - 0, 8192, 12288, 13312, 13568, 13600, 13592, 0, - 8192, 12288, 13312, 13568, 13600, 13601, 13596, 0, - 8192, 12288, 13312, 13568, 13600, 13601, 13596, 0, - 8192, 12288, 13312, 13568, 13600, 13601, 13596, 13598, - 0, 8192, 12288, 13312, 13568, 0, 8192, 12288, - 13312, 13568, 13600, 0, 8192, 12288, 13312, 13568, - 13600, 0, 8192, 12288, 13312, 13568, 13600, 13602, - 0, 8192, 12288, 13312, 13568, 13600, 0, 8192, - 12288, 13312, 13568, 13600, 13604, 0, 8192, 12288, - 13312, 13568, 13600, 13604, 0, 8192, 12288, 13312, - 13568, 13600, 13608, 13606, 0, 8192, 12288, 13312, - 13568, 13600, 0, 8192, 12288, 13312, 13568, 13600, - 13608, 0, 8192, 12288, 13312, 13568, 13600, 13608, - 0, 8192, 12288, 13312, 13568, 13600, 13608, 13610, - 0, 8192, 12288, 13312, 13568, 13600, 13608, 0, - 8192, 12288, 13312, 13568, 13600, 13616, 13612, 0, - 8192, 12288, 13312, 13568, 13600, 13616, 13612, 0, - 8192, 12288, 13312, 13568, 13600, 13616, 13617, 13614, - 0, 8192, 12288, 13312, 13568, 13600, 0, 8192, - 12288, 13312, 13568, 13632, 13616, 0, 8192, 12288, - 13312, 13568, 13632, 13616, 0, 8192, 12288, 13312, - 13568, 13632, 13616, 13618, 0, 8192, 12288, 13312, - 13568, 13632, 13616, 0, 8192, 12288, 13312, 13568, - 13632, 13616, 13620, 0, 8192, 12288, 13312, 13568, - 13632, 13616, 13620, 0, 8192, 12288, 13312, 13568, - 13632, 13616, 13624, 13622, 0, 8192, 12288, 13312, - 13568, 13632, 13616, 0, 8192, 12288, 13312, 13568, - 13632, 13633, 13624, 0, 8192, 12288, 13312, 13568, - 13632, 13633, 13624, 0, 8192, 12288, 13312, 13568, - 13632, 13633, 13624, 13626, 0, 8192, 12288, 13312, - 13568, 13632, 13633, 13624, 0, 8192, 12288, 13312, - 13568, 13632, 13633, 13624, 13628, 0, 8192, 12288, - 13312, 13568, 13632, 13633, 13635, 13628, 0, 8192, - 12288, 13312, 13568, 13632, 13633, 13635, 13628, 13630, - 0, 8192, 12288, 13312, 13568, 0, 8192, 12288, - 13312, 13568, 13632, 0, 8192, 12288, 13312, 13568, - 13632, 0, 8192, 12288, 13312, 13568, 13632, 13634, - 0, 8192, 12288, 13312, 13568, 13632, 0, 8192, - 12288, 13312, 13568, 13632, 13636, 0, 8192, 12288, - 13312, 13568, 13632, 13636, 0, 8192, 12288, 13312, - 13568, 13632, 13640, 13638, 0, 8192, 12288, 13312, - 13568, 13632, 0, 8192, 12288, 13312, 13568, 13632, - 13640, 0, 8192, 12288, 13312, 13568, 13632, 13640, - 0, 8192, 12288, 13312, 13568, 13632, 13640, 13642, - 0, 8192, 12288, 13312, 13568, 13632, 13640, 0, - 8192, 12288, 13312, 13568, 13632, 13648, 13644, 0, - 8192, 12288, 13312, 13568, 13632, 13648, 13644, 0, - 8192, 12288, 13312, 13568, 13632, 13648, 13649, 13646, - 0, 8192, 12288, 13312, 13568, 13632, 0, 8192, - 12288, 13312, 13568, 13632, 13648, 0, 8192, 12288, - 13312, 13568, 13632, 13648, 0, 8192, 12288, 13312, - 13568, 13632, 13648, 13650, 0, 8192, 12288, 13312, - 13568, 13632, 13648, 0, 8192, 12288, 13312, 13568, - 13632, 13648, 13652, 0, 8192, 12288, 13312, 13568, - 13632, 13648, 13652, 0, 8192, 12288, 13312, 13568, - 13632, 13648, 13656, 13654, 0, 8192, 12288, 13312, - 13568, 13632, 13648, 0, 8192, 12288, 13312, 13568, - 13632, 13664, 13656, 0, 8192, 12288, 13312, 13568, - 13632, 13664, 13656, 0, 8192, 12288, 13312, 13568, - 13632, 13664, 13656, 13658, 0, 8192, 12288, 13312, - 13568, 13632, 13664, 13656, 0, 8192, 12288, 13312, - 13568, 13632, 13664, 13665, 13660, 0, 8192, 12288, - 13312, 13568, 13632, 13664, 13665, 13660, 0, 8192, - 12288, 13312, 13568, 13632, 13664, 13665, 13660, 13662, - 0, 8192, 12288, 13312, 13568, 13632, 0, 8192, - 12288, 13312, 13568, 13696, 13664, 0, 8192, 12288, - 13312, 13568, 13696, 13664, 0, 8192, 12288, 13312, - 13568, 13696, 13664, 13666, 0, 8192, 12288, 13312, - 13568, 13696, 13664, 0, 8192, 12288, 13312, 13568, - 13696, 13664, 13668, 0, 8192, 12288, 13312, 13568, - 13696, 13664, 13668, 0, 8192, 12288, 13312, 13568, - 13696, 13664, 13672, 13670, 0, 8192, 12288, 13312, - 13568, 13696, 13664, 0, 8192, 12288, 13312, 13568, - 13696, 13664, 13672, 0, 8192, 12288, 13312, 13568, - 13696, 13664, 13672, 0, 8192, 12288, 13312, 13568, - 13696, 13664, 13672, 13674, 0, 8192, 12288, 13312, - 13568, 13696, 13664, 13672, 0, 8192, 12288, 13312, - 13568, 13696, 13664, 13680, 13676, 0, 8192, 12288, - 13312, 13568, 13696, 13664, 13680, 13676, 0, 8192, - 12288, 13312, 13568, 13696, 13664, 13680, 13681, 13678, - 0, 8192, 12288, 13312, 13568, 13696, 13664, 0, - 8192, 12288, 13312, 13568, 13696, 13697, 13680, 0, - 8192, 12288, 13312, 13568, 13696, 13697, 13680, 0, - 8192, 12288, 13312, 13568, 13696, 13697, 13680, 13682, - 0, 8192, 12288, 13312, 13568, 13696, 13697, 13680, - 0, 8192, 12288, 13312, 13568, 13696, 13697, 13680, - 13684, 0, 8192, 12288, 13312, 13568, 13696, 13697, - 13680, 13684, 0, 8192, 12288, 13312, 13568, 13696, - 13697, 13680, 13688, 13686, 0, 8192, 12288, 13312, - 13568, 13696, 13697, 13680, 0, 8192, 12288, 13312, - 13568, 13696, 13697, 13680, 13688, 0, 8192, 12288, - 13312, 13568, 13696, 13697, 13699, 13688, 0, 8192, - 12288, 13312, 13568, 13696, 13697, 13699, 13688, 13690, - 0, 8192, 12288, 13312, 13568, 13696, 13697, 13699, - 13688, 0, 8192, 12288, 13312, 13568, 13696, 13697, - 13699, 13688, 13692, 0, 8192, 12288, 13312, 13568, - 13696, 13697, 13699, 13688, 13692, 0, 8192, 12288, - 13312, 13568, 13696, 13697, 13699, 13688, 13692, 13694, - 0, 8192, 12288, 13312, 13568, 0, 8192, 12288, - 13312, 13824, 13696, 0, 8192, 12288, 13312, 13824, - 13696, 0, 8192, 12288, 13312, 13824, 13696, 13698, - 0, 8192, 12288, 13312, 13824, 13696, 0, 8192, - 12288, 13312, 13824, 13696, 13700, 0, 8192, 12288, - 13312, 13824, 13696, 13700, 0, 8192, 12288, 13312, - 13824, 13696, 13704, 13702, 0, 8192, 12288, 13312, - 13824, 13696, 0, 8192, 12288, 13312, 13824, 13696, - 13704, 0, 8192, 12288, 13312, 13824, 13696, 13704, - 0, 8192, 12288, 13312, 13824, 13696, 13704, 13706, - 0, 8192, 12288, 13312, 13824, 13696, 13704, 0, - 8192, 12288, 13312, 13824, 13696, 13712, 13708, 0, - 8192, 12288, 13312, 13824, 13696, 13712, 13708, 0, - 8192, 12288, 13312, 13824, 13696, 13712, 13713, 13710, - 0, 8192, 12288, 13312, 13824, 13696, 0, 8192, - 12288, 13312, 13824, 13696, 13712, 0, 8192, 12288, - 13312, 13824, 13696, 13712, 0, 8192, 12288, 13312, - 13824, 13696, 13712, 13714, 0, 8192, 12288, 13312, - 13824, 13696, 13712, 0, 8192, 12288, 13312, 13824, - 13696, 13712, 13716, 0, 8192, 12288, 13312, 13824, - 13696, 13712, 13716, 0, 8192, 12288, 13312, 13824, - 13696, 13712, 13720, 13718, 0, 8192, 12288, 13312, - 13824, 13696, 13712, 0, 8192, 12288, 13312, 13824, - 13696, 13728, 13720, 0, 8192, 12288, 13312, 13824, - 13696, 13728, 13720, 0, 8192, 12288, 13312, 13824, - 13696, 13728, 13720, 13722, 0, 8192, 12288, 13312, - 13824, 13696, 13728, 13720, 0, 8192, 12288, 13312, - 13824, 13696, 13728, 13729, 13724, 0, 8192, 12288, - 13312, 13824, 13696, 13728, 13729, 13724, 0, 8192, - 12288, 13312, 13824, 13696, 13728, 13729, 13724, 13726, - 0, 8192, 12288, 13312, 13824, 13696, 0, 8192, - 12288, 13312, 13824, 13696, 13728, 0, 8192, 12288, - 13312, 13824, 13696, 13728, 0, 8192, 12288, 13312, - 13824, 13696, 13728, 13730, 0, 8192, 12288, 13312, - 13824, 13696, 13728, 0, 8192, 12288, 13312, 13824, - 13696, 13728, 13732, 0, 8192, 12288, 13312, 13824, - 13696, 13728, 13732, 0, 8192, 12288, 13312, 13824, - 13696, 13728, 13736, 13734, 0, 8192, 12288, 13312, - 13824, 13696, 13728, 0, 8192, 12288, 13312, 13824, - 13696, 13728, 13736, 0, 8192, 12288, 13312, 13824, - 13696, 13728, 13736, 0, 8192, 12288, 13312, 13824, - 13696, 13728, 13736, 13738, 0, 8192, 12288, 13312, - 13824, 13696, 13728, 13736, 0, 8192, 12288, 13312, - 13824, 13696, 13728, 13744, 13740, 0, 8192, 12288, - 13312, 13824, 13696, 13728, 13744, 13740, 0, 8192, - 12288, 13312, 13824, 13696, 13728, 13744, 13745, 13742, - 0, 8192, 12288, 13312, 13824, 13696, 13728, 0, - 8192, 12288, 13312, 13824, 13696, 13760, 13744, 0, - 8192, 12288, 13312, 13824, 13696, 13760, 13744, 0, - 8192, 12288, 13312, 13824, 13696, 13760, 13744, 13746, - 0, 8192, 12288, 13312, 13824, 13696, 13760, 13744, - 0, 8192, 12288, 13312, 13824, 13696, 13760, 13744, - 13748, 0, 8192, 12288, 13312, 13824, 13696, 13760, - 13744, 13748, 0, 8192, 12288, 13312, 13824, 13696, - 13760, 13744, 13752, 13750, 0, 8192, 12288, 13312, - 13824, 13696, 13760, 13744, 0, 8192, 12288, 13312, - 13824, 13696, 13760, 13761, 13752, 0, 8192, 12288, - 13312, 13824, 13696, 13760, 13761, 13752, 0, 8192, - 12288, 13312, 13824, 13696, 13760, 13761, 13752, 13754, - 0, 8192, 12288, 13312, 13824, 13696, 13760, 13761, - 13752, 0, 8192, 12288, 13312, 13824, 13696, 13760, - 13761, 13752, 13756, 0, 8192, 12288, 13312, 13824, - 13696, 13760, 13761, 13763, 13756, 0, 8192, 12288, - 13312, 13824, 13696, 13760, 13761, 13763, 13756, 13758, - 0, 8192, 12288, 13312, 13824, 13696, 0, 8192, - 12288, 13312, 13824, 13825, 13760, 0, 8192, 12288, - 13312, 13824, 13825, 13760, 0, 8192, 12288, 13312, - 13824, 13825, 13760, 13762, 0, 8192, 12288, 13312, - 13824, 13825, 13760, 0, 8192, 12288, 13312, 13824, - 13825, 13760, 13764, 0, 8192, 12288, 13312, 13824, - 13825, 13760, 13764, 0, 8192, 12288, 13312, 13824, - 13825, 13760, 13768, 13766, 0, 8192, 12288, 13312, - 13824, 13825, 13760, 0, 8192, 12288, 13312, 13824, - 13825, 13760, 13768, 0, 8192, 12288, 13312, 13824, - 13825, 13760, 13768, 0, 8192, 12288, 13312, 13824, - 13825, 13760, 13768, 13770, 0, 8192, 12288, 13312, - 13824, 13825, 13760, 13768, 0, 8192, 12288, 13312, - 13824, 13825, 13760, 13776, 13772, 0, 8192, 12288, - 13312, 13824, 13825, 13760, 13776, 13772, 0, 8192, - 12288, 13312, 13824, 13825, 13760, 13776, 13777, 13774, - 0, 8192, 12288, 13312, 13824, 13825, 13760, 0, - 8192, 12288, 13312, 13824, 13825, 13760, 13776, 0, - 8192, 12288, 13312, 13824, 13825, 13760, 13776, 0, - 8192, 12288, 13312, 13824, 13825, 13760, 13776, 13778, - 0, 8192, 12288, 13312, 13824, 13825, 13760, 13776, - 0, 8192, 12288, 13312, 13824, 13825, 13760, 13776, - 13780, 0, 8192, 12288, 13312, 13824, 13825, 13760, - 13776, 13780, 0, 8192, 12288, 13312, 13824, 13825, - 13760, 13776, 13784, 13782, 0, 8192, 12288, 13312, - 13824, 13825, 13760, 13776, 0, 8192, 12288, 13312, - 13824, 13825, 13760, 13792, 13784, 0, 8192, 12288, - 13312, 13824, 13825, 13760, 13792, 13784, 0, 8192, - 12288, 13312, 13824, 13825, 13760, 13792, 13784, 13786, - 0, 8192, 12288, 13312, 13824, 13825, 13760, 13792, - 13784, 0, 8192, 12288, 13312, 13824, 13825, 13760, - 13792, 13793, 13788, 0, 8192, 12288, 13312, 13824, - 13825, 13760, 13792, 13793, 13788, 0, 8192, 12288, - 13312, 13824, 13825, 13760, 13792, 13793, 13788, 13790, - 0, 8192, 12288, 13312, 13824, 13825, 13760, 0, - 8192, 12288, 13312, 13824, 13825, 13760, 13792, 0, - 8192, 12288, 13312, 13824, 13825, 13827, 13792, 0, - 8192, 12288, 13312, 13824, 13825, 13827, 13792, 13794, - 0, 8192, 12288, 13312, 13824, 13825, 13827, 13792, - 0, 8192, 12288, 13312, 13824, 13825, 13827, 13792, - 13796, 0, 8192, 12288, 13312, 13824, 13825, 13827, - 13792, 13796, 0, 8192, 12288, 13312, 13824, 13825, - 13827, 13792, 13800, 13798, 0, 8192, 12288, 13312, - 13824, 13825, 13827, 13792, 0, 8192, 12288, 13312, - 13824, 13825, 13827, 13792, 13800, 0, 8192, 12288, - 13312, 13824, 13825, 13827, 13792, 13800, 0, 8192, - 12288, 13312, 13824, 13825, 13827, 13792, 13800, 13802, - 0, 8192, 12288, 13312, 13824, 13825, 13827, 13792, - 13800, 0, 8192, 12288, 13312, 13824, 13825, 13827, - 13792, 13808, 13804, 0, 8192, 12288, 13312, 13824, - 13825, 13827, 13792, 13808, 13804, 0, 8192, 12288, - 13312, 13824, 13825, 13827, 13792, 13808, 13809, 13806, - 0, 8192, 12288, 13312, 13824, 13825, 13827, 13792, - 0, 8192, 12288, 13312, 13824, 13825, 13827, 13792, - 13808, 0, 8192, 12288, 13312, 13824, 13825, 13827, - 13792, 13808, 0, 8192, 12288, 13312, 13824, 13825, - 13827, 13792, 13808, 13810, 0, 8192, 12288, 13312, - 13824, 13825, 13827, 13831, 13808, 0, 8192, 12288, - 13312, 13824, 13825, 13827, 13831, 13808, 13812, 0, - 8192, 12288, 13312, 13824, 13825, 13827, 13831, 13808, - 13812, 0, 8192, 12288, 13312, 13824, 13825, 13827, - 13831, 13808, 13816, 13814, 0, 8192, 12288, 13312, - 13824, 13825, 13827, 13831, 13808, 0, 8192, 12288, - 13312, 13824, 13825, 13827, 13831, 13808, 13816, 0, - 8192, 12288, 13312, 13824, 13825, 13827, 13831, 13808, - 13816, 0, 8192, 12288, 13312, 13824, 13825, 13827, - 13831, 13808, 13816, 13818, 0, 8192, 12288, 13312, - 13824, 13825, 13827, 13831, 13808, 13816, 0, 8192, - 12288, 13312, 13824, 13825, 13827, 13831, 13808, 13816, - 13820, 0, 8192, 12288, 13312, 13824, 13825, 13827, - 13831, 13808, 13816, 13820, 0, 8192, 12288, 13312, - 13824, 13825, 13827, 13831, 13808, 13816, 13820, 13822, - 0, 8192, 12288, 13312, 0, 8192, 12288, 14336, - 13824, 0, 8192, 12288, 14336, 13824, 0, 8192, - 12288, 14336, 13824, 13826, 0, 8192, 12288, 14336, - 13824, 0, 8192, 12288, 14336, 13824, 13828, 0, - 8192, 12288, 14336, 13824, 13828, 0, 8192, 12288, - 14336, 13824, 13832, 13830, 0, 8192, 12288, 14336, - 13824, 0, 8192, 12288, 14336, 13824, 13832, 0, - 8192, 12288, 14336, 13824, 13832, 0, 8192, 12288, - 14336, 13824, 13832, 13834, 0, 8192, 12288, 14336, - 13824, 13832, 0, 8192, 12288, 14336, 13824, 13840, - 13836, 0, 8192, 12288, 14336, 13824, 13840, 13836, - 0, 8192, 12288, 14336, 13824, 13840, 13841, 13838, - 0, 8192, 12288, 14336, 13824, 0, 8192, 12288, - 14336, 13824, 13840, 0, 8192, 12288, 14336, 13824, - 13840, 0, 8192, 12288, 14336, 13824, 13840, 13842, - 0, 8192, 12288, 14336, 13824, 13840, 0, 8192, - 12288, 14336, 13824, 13840, 13844, 0, 8192, 12288, - 14336, 13824, 13840, 13844, 0, 8192, 12288, 14336, - 13824, 13840, 13848, 13846, 0, 8192, 12288, 14336, - 13824, 13840, 0, 8192, 12288, 14336, 13824, 13856, - 13848, 0, 8192, 12288, 14336, 13824, 13856, 13848, - 0, 8192, 12288, 14336, 13824, 13856, 13848, 13850, - 0, 8192, 12288, 14336, 13824, 13856, 13848, 0, - 8192, 12288, 14336, 13824, 13856, 13857, 13852, 0, - 8192, 12288, 14336, 13824, 13856, 13857, 13852, 0, - 8192, 12288, 14336, 13824, 13856, 13857, 13852, 13854, - 0, 8192, 12288, 14336, 13824, 0, 8192, 12288, - 14336, 13824, 13856, 0, 8192, 12288, 14336, 13824, - 13856, 0, 8192, 12288, 14336, 13824, 13856, 13858, - 0, 8192, 12288, 14336, 13824, 13856, 0, 8192, - 12288, 14336, 13824, 13856, 13860, 0, 8192, 12288, - 14336, 13824, 13856, 13860, 0, 8192, 12288, 14336, - 13824, 13856, 13864, 13862, 0, 8192, 12288, 14336, - 13824, 13856, 0, 8192, 12288, 14336, 13824, 13856, - 13864, 0, 8192, 12288, 14336, 13824, 13856, 13864, - 0, 8192, 12288, 14336, 13824, 13856, 13864, 13866, - 0, 8192, 12288, 14336, 13824, 13856, 13864, 0, - 8192, 12288, 14336, 13824, 13856, 13872, 13868, 0, - 8192, 12288, 14336, 13824, 13856, 13872, 13868, 0, - 8192, 12288, 14336, 13824, 13856, 13872, 13873, 13870, - 0, 8192, 12288, 14336, 13824, 13856, 0, 8192, - 12288, 14336, 13824, 13888, 13872, 0, 8192, 12288, - 14336, 13824, 13888, 13872, 0, 8192, 12288, 14336, - 13824, 13888, 13872, 13874, 0, 8192, 12288, 14336, - 13824, 13888, 13872, 0, 8192, 12288, 14336, 13824, - 13888, 13872, 13876, 0, 8192, 12288, 14336, 13824, - 13888, 13872, 13876, 0, 8192, 12288, 14336, 13824, - 13888, 13872, 13880, 13878, 0, 8192, 12288, 14336, - 13824, 13888, 13872, 0, 8192, 12288, 14336, 13824, - 13888, 13889, 13880, 0, 8192, 12288, 14336, 13824, - 13888, 13889, 13880, 0, 8192, 12288, 14336, 13824, - 13888, 13889, 13880, 13882, 0, 8192, 12288, 14336, - 13824, 13888, 13889, 13880, 0, 8192, 12288, 14336, - 13824, 13888, 13889, 13880, 13884, 0, 8192, 12288, - 14336, 13824, 13888, 13889, 13891, 13884, 0, 8192, - 12288, 14336, 13824, 13888, 13889, 13891, 13884, 13886, - 0, 8192, 12288, 14336, 13824, 0, 8192, 12288, - 14336, 13824, 13888, 0, 8192, 12288, 14336, 13824, - 13888, 0, 8192, 12288, 14336, 13824, 13888, 13890, - 0, 8192, 12288, 14336, 13824, 13888, 0, 8192, - 12288, 14336, 13824, 13888, 13892, 0, 8192, 12288, - 14336, 13824, 13888, 13892, 0, 8192, 12288, 14336, - 13824, 13888, 13896, 13894, 0, 8192, 12288, 14336, - 13824, 13888, 0, 8192, 12288, 14336, 13824, 13888, - 13896, 0, 8192, 12288, 14336, 13824, 13888, 13896, - 0, 8192, 12288, 14336, 13824, 13888, 13896, 13898, - 0, 8192, 12288, 14336, 13824, 13888, 13896, 0, - 8192, 12288, 14336, 13824, 13888, 13904, 13900, 0, - 8192, 12288, 14336, 13824, 13888, 13904, 13900, 0, - 8192, 12288, 14336, 13824, 13888, 13904, 13905, 13902, - 0, 8192, 12288, 14336, 13824, 13888, 0, 8192, - 12288, 14336, 13824, 13888, 13904, 0, 8192, 12288, - 14336, 13824, 13888, 13904, 0, 8192, 12288, 14336, - 13824, 13888, 13904, 13906, 0, 8192, 12288, 14336, - 13824, 13888, 13904, 0, 8192, 12288, 14336, 13824, - 13888, 13904, 13908, 0, 8192, 12288, 14336, 13824, - 13888, 13904, 13908, 0, 8192, 12288, 14336, 13824, - 13888, 13904, 13912, 13910, 0, 8192, 12288, 14336, - 13824, 13888, 13904, 0, 8192, 12288, 14336, 13824, - 13888, 13920, 13912, 0, 8192, 12288, 14336, 13824, - 13888, 13920, 13912, 0, 8192, 12288, 14336, 13824, - 13888, 13920, 13912, 13914, 0, 8192, 12288, 14336, - 13824, 13888, 13920, 13912, 0, 8192, 12288, 14336, - 13824, 13888, 13920, 13921, 13916, 0, 8192, 12288, - 14336, 13824, 13888, 13920, 13921, 13916, 0, 8192, - 12288, 14336, 13824, 13888, 13920, 13921, 13916, 13918, - 0, 8192, 12288, 14336, 13824, 13888, 0, 8192, - 12288, 14336, 13824, 13952, 13920, 0, 8192, 12288, - 14336, 13824, 13952, 13920, 0, 8192, 12288, 14336, - 13824, 13952, 13920, 13922, 0, 8192, 12288, 14336, - 13824, 13952, 13920, 0, 8192, 12288, 14336, 13824, - 13952, 13920, 13924, 0, 8192, 12288, 14336, 13824, - 13952, 13920, 13924, 0, 8192, 12288, 14336, 13824, - 13952, 13920, 13928, 13926, 0, 8192, 12288, 14336, - 13824, 13952, 13920, 0, 8192, 12288, 14336, 13824, - 13952, 13920, 13928, 0, 8192, 12288, 14336, 13824, - 13952, 13920, 13928, 0, 8192, 12288, 14336, 13824, - 13952, 13920, 13928, 13930, 0, 8192, 12288, 14336, - 13824, 13952, 13920, 13928, 0, 8192, 12288, 14336, - 13824, 13952, 13920, 13936, 13932, 0, 8192, 12288, - 14336, 13824, 13952, 13920, 13936, 13932, 0, 8192, - 12288, 14336, 13824, 13952, 13920, 13936, 13937, 13934, - 0, 8192, 12288, 14336, 13824, 13952, 13920, 0, - 8192, 12288, 14336, 13824, 13952, 13953, 13936, 0, - 8192, 12288, 14336, 13824, 13952, 13953, 13936, 0, - 8192, 12288, 14336, 13824, 13952, 13953, 13936, 13938, - 0, 8192, 12288, 14336, 13824, 13952, 13953, 13936, - 0, 8192, 12288, 14336, 13824, 13952, 13953, 13936, - 13940, 0, 8192, 12288, 14336, 13824, 13952, 13953, - 13936, 13940, 0, 8192, 12288, 14336, 13824, 13952, - 13953, 13936, 13944, 13942, 0, 8192, 12288, 14336, - 13824, 13952, 13953, 13936, 0, 8192, 12288, 14336, - 13824, 13952, 13953, 13936, 13944, 0, 8192, 12288, - 14336, 13824, 13952, 13953, 13955, 13944, 0, 8192, - 12288, 14336, 13824, 13952, 13953, 13955, 13944, 13946, - 0, 8192, 12288, 14336, 13824, 13952, 13953, 13955, - 13944, 0, 8192, 12288, 14336, 13824, 13952, 13953, - 13955, 13944, 13948, 0, 8192, 12288, 14336, 13824, - 13952, 13953, 13955, 13944, 13948, 0, 8192, 12288, - 14336, 13824, 13952, 13953, 13955, 13944, 13948, 13950, - 0, 8192, 12288, 14336, 13824, 0, 8192, 12288, - 14336, 13824, 13952, 0, 8192, 12288, 14336, 13824, - 13952, 0, 8192, 12288, 14336, 13824, 13952, 13954, - 0, 8192, 12288, 14336, 13824, 13952, 0, 8192, - 12288, 14336, 13824, 13952, 13956, 0, 8192, 12288, - 14336, 13824, 13952, 13956, 0, 8192, 12288, 14336, - 13824, 13952, 13960, 13958, 0, 8192, 12288, 14336, - 13824, 13952, 0, 8192, 12288, 14336, 13824, 13952, - 13960, 0, 8192, 12288, 14336, 13824, 13952, 13960, - 0, 8192, 12288, 14336, 13824, 13952, 13960, 13962, - 0, 8192, 12288, 14336, 13824, 13952, 13960, 0, - 8192, 12288, 14336, 13824, 13952, 13968, 13964, 0, - 8192, 12288, 14336, 13824, 13952, 13968, 13964, 0, - 8192, 12288, 14336, 13824, 13952, 13968, 13969, 13966, - 0, 8192, 12288, 14336, 13824, 13952, 0, 8192, - 12288, 14336, 13824, 13952, 13968, 0, 8192, 12288, - 14336, 13824, 13952, 13968, 0, 8192, 12288, 14336, - 13824, 13952, 13968, 13970, 0, 8192, 12288, 14336, - 13824, 13952, 13968, 0, 8192, 12288, 14336, 13824, - 13952, 13968, 13972, 0, 8192, 12288, 14336, 13824, - 13952, 13968, 13972, 0, 8192, 12288, 14336, 13824, - 13952, 13968, 13976, 13974, 0, 8192, 12288, 14336, - 13824, 13952, 13968, 0, 8192, 12288, 14336, 13824, - 13952, 13984, 13976, 0, 8192, 12288, 14336, 13824, - 13952, 13984, 13976, 0, 8192, 12288, 14336, 13824, - 13952, 13984, 13976, 13978, 0, 8192, 12288, 14336, - 13824, 13952, 13984, 13976, 0, 8192, 12288, 14336, - 13824, 13952, 13984, 13985, 13980, 0, 8192, 12288, - 14336, 13824, 13952, 13984, 13985, 13980, 0, 8192, - 12288, 14336, 13824, 13952, 13984, 13985, 13980, 13982, - 0, 8192, 12288, 14336, 13824, 13952, 0, 8192, - 12288, 14336, 13824, 13952, 13984, 0, 8192, 12288, - 14336, 13824, 13952, 13984, 0, 8192, 12288, 14336, - 13824, 13952, 13984, 13986, 0, 8192, 12288, 14336, - 13824, 13952, 13984, 0, 8192, 12288, 14336, 13824, - 13952, 13984, 13988, 0, 8192, 12288, 14336, 13824, - 13952, 13984, 13988, 0, 8192, 12288, 14336, 13824, - 13952, 13984, 13992, 13990, 0, 8192, 12288, 14336, - 13824, 13952, 13984, 0, 8192, 12288, 14336, 13824, - 13952, 13984, 13992, 0, 8192, 12288, 14336, 13824, - 13952, 13984, 13992, 0, 8192, 12288, 14336, 13824, - 13952, 13984, 13992, 13994, 0, 8192, 12288, 14336, - 13824, 13952, 13984, 13992, 0, 8192, 12288, 14336, - 13824, 13952, 13984, 14000, 13996, 0, 8192, 12288, - 14336, 13824, 13952, 13984, 14000, 13996, 0, 8192, - 12288, 14336, 13824, 13952, 13984, 14000, 14001, 13998, - 0, 8192, 12288, 14336, 13824, 13952, 13984, 0, - 8192, 12288, 14336, 13824, 13952, 14016, 14000, 0, - 8192, 12288, 14336, 13824, 13952, 14016, 14000, 0, - 8192, 12288, 14336, 13824, 13952, 14016, 14000, 14002, - 0, 8192, 12288, 14336, 13824, 13952, 14016, 14000, - 0, 8192, 12288, 14336, 13824, 13952, 14016, 14000, - 14004, 0, 8192, 12288, 14336, 13824, 13952, 14016, - 14000, 14004, 0, 8192, 12288, 14336, 13824, 13952, - 14016, 14000, 14008, 14006, 0, 8192, 12288, 14336, - 13824, 13952, 14016, 14000, 0, 8192, 12288, 14336, - 13824, 13952, 14016, 14017, 14008, 0, 8192, 12288, - 14336, 13824, 13952, 14016, 14017, 14008, 0, 8192, - 12288, 14336, 13824, 13952, 14016, 14017, 14008, 14010, - 0, 8192, 12288, 14336, 13824, 13952, 14016, 14017, - 14008, 0, 8192, 12288, 14336, 13824, 13952, 14016, - 14017, 14008, 14012, 0, 8192, 12288, 14336, 13824, - 13952, 14016, 14017, 14019, 14012, 0, 8192, 12288, - 14336, 13824, 13952, 14016, 14017, 14019, 14012, 14014, - 0, 8192, 12288, 14336, 13824, 13952, 0, 8192, - 12288, 14336, 13824, 14080, 14016, 0, 8192, 12288, - 14336, 13824, 14080, 14016, 0, 8192, 12288, 14336, - 13824, 14080, 14016, 14018, 0, 8192, 12288, 14336, - 13824, 14080, 14016, 0, 8192, 12288, 14336, 13824, - 14080, 14016, 14020, 0, 8192, 12288, 14336, 13824, - 14080, 14016, 14020, 0, 8192, 12288, 14336, 13824, - 14080, 14016, 14024, 14022, 0, 8192, 12288, 14336, - 13824, 14080, 14016, 0, 8192, 12288, 14336, 13824, - 14080, 14016, 14024, 0, 8192, 12288, 14336, 13824, - 14080, 14016, 14024, 0, 8192, 12288, 14336, 13824, - 14080, 14016, 14024, 14026, 0, 8192, 12288, 14336, - 13824, 14080, 14016, 14024, 0, 8192, 12288, 14336, - 13824, 14080, 14016, 14032, 14028, 0, 8192, 12288, - 14336, 13824, 14080, 14016, 14032, 14028, 0, 8192, - 12288, 14336, 13824, 14080, 14016, 14032, 14033, 14030, - 0, 8192, 12288, 14336, 13824, 14080, 14016, 0, - 8192, 12288, 14336, 13824, 14080, 14016, 14032, 0, - 8192, 12288, 14336, 13824, 14080, 14016, 14032, 0, - 8192, 12288, 14336, 13824, 14080, 14016, 14032, 14034, - 0, 8192, 12288, 14336, 13824, 14080, 14016, 14032, - 0, 8192, 12288, 14336, 13824, 14080, 14016, 14032, - 14036, 0, 8192, 12288, 14336, 13824, 14080, 14016, - 14032, 14036, 0, 8192, 12288, 14336, 13824, 14080, - 14016, 14032, 14040, 14038, 0, 8192, 12288, 14336, - 13824, 14080, 14016, 14032, 0, 8192, 12288, 14336, - 13824, 14080, 14016, 14048, 14040, 0, 8192, 12288, - 14336, 13824, 14080, 14016, 14048, 14040, 0, 8192, - 12288, 14336, 13824, 14080, 14016, 14048, 14040, 14042, - 0, 8192, 12288, 14336, 13824, 14080, 14016, 14048, - 14040, 0, 8192, 12288, 14336, 13824, 14080, 14016, - 14048, 14049, 14044, 0, 8192, 12288, 14336, 13824, - 14080, 14016, 14048, 14049, 14044, 0, 8192, 12288, - 14336, 13824, 14080, 14016, 14048, 14049, 14044, 14046, - 0, 8192, 12288, 14336, 13824, 14080, 14016, 0, - 8192, 12288, 14336, 13824, 14080, 14081, 14048, 0, - 8192, 12288, 14336, 13824, 14080, 14081, 14048, 0, - 8192, 12288, 14336, 13824, 14080, 14081, 14048, 14050, - 0, 8192, 12288, 14336, 13824, 14080, 14081, 14048, - 0, 8192, 12288, 14336, 13824, 14080, 14081, 14048, - 14052, 0, 8192, 12288, 14336, 13824, 14080, 14081, - 14048, 14052, 0, 8192, 12288, 14336, 13824, 14080, - 14081, 14048, 14056, 14054, 0, 8192, 12288, 14336, - 13824, 14080, 14081, 14048, 0, 8192, 12288, 14336, - 13824, 14080, 14081, 14048, 14056, 0, 8192, 12288, - 14336, 13824, 14080, 14081, 14048, 14056, 0, 8192, - 12288, 14336, 13824, 14080, 14081, 14048, 14056, 14058, - 0, 8192, 12288, 14336, 13824, 14080, 14081, 14048, - 14056, 0, 8192, 12288, 14336, 13824, 14080, 14081, - 14048, 14064, 14060, 0, 8192, 12288, 14336, 13824, - 14080, 14081, 14048, 14064, 14060, 0, 8192, 12288, - 14336, 13824, 14080, 14081, 14048, 14064, 14065, 14062, - 0, 8192, 12288, 14336, 13824, 14080, 14081, 14048, - 0, 8192, 12288, 14336, 13824, 14080, 14081, 14048, - 14064, 0, 8192, 12288, 14336, 13824, 14080, 14081, - 14083, 14064, 0, 8192, 12288, 14336, 13824, 14080, - 14081, 14083, 14064, 14066, 0, 8192, 12288, 14336, - 13824, 14080, 14081, 14083, 14064, 0, 8192, 12288, - 14336, 13824, 14080, 14081, 14083, 14064, 14068, 0, - 8192, 12288, 14336, 13824, 14080, 14081, 14083, 14064, - 14068, 0, 8192, 12288, 14336, 13824, 14080, 14081, - 14083, 14064, 14072, 14070, 0, 8192, 12288, 14336, - 13824, 14080, 14081, 14083, 14064, 0, 8192, 12288, - 14336, 13824, 14080, 14081, 14083, 14064, 14072, 0, - 8192, 12288, 14336, 13824, 14080, 14081, 14083, 14064, - 14072, 0, 8192, 12288, 14336, 13824, 14080, 14081, - 14083, 14064, 14072, 14074, 0, 8192, 12288, 14336, - 13824, 14080, 14081, 14083, 14087, 14072, 0, 8192, - 12288, 14336, 13824, 14080, 14081, 14083, 14087, 14072, - 14076, 0, 8192, 12288, 14336, 13824, 14080, 14081, - 14083, 14087, 14072, 14076, 0, 8192, 12288, 14336, - 13824, 14080, 14081, 14083, 14087, 14072, 14076, 14078, - 0, 8192, 12288, 14336, 13824, 0, 8192, 12288, - 14336, 13824, 14080, 0, 8192, 12288, 14336, 14337, - 14080, 0, 8192, 12288, 14336, 14337, 14080, 14082, - 0, 8192, 12288, 14336, 14337, 14080, 0, 8192, - 12288, 14336, 14337, 14080, 14084, 0, 8192, 12288, - 14336, 14337, 14080, 14084, 0, 8192, 12288, 14336, - 14337, 14080, 14088, 14086, 0, 8192, 12288, 14336, - 14337, 14080, 0, 8192, 12288, 14336, 14337, 14080, - 14088, 0, 8192, 12288, 14336, 14337, 14080, 14088, - 0, 8192, 12288, 14336, 14337, 14080, 14088, 14090, - 0, 8192, 12288, 14336, 14337, 14080, 14088, 0, - 8192, 12288, 14336, 14337, 14080, 14096, 14092, 0, - 8192, 12288, 14336, 14337, 14080, 14096, 14092, 0, - 8192, 12288, 14336, 14337, 14080, 14096, 14097, 14094, - 0, 8192, 12288, 14336, 14337, 14080, 0, 8192, - 12288, 14336, 14337, 14080, 14096, 0, 8192, 12288, - 14336, 14337, 14080, 14096, 0, 8192, 12288, 14336, - 14337, 14080, 14096, 14098, 0, 8192, 12288, 14336, - 14337, 14080, 14096, 0, 8192, 12288, 14336, 14337, - 14080, 14096, 14100, 0, 8192, 12288, 14336, 14337, - 14080, 14096, 14100, 0, 8192, 12288, 14336, 14337, - 14080, 14096, 14104, 14102, 0, 8192, 12288, 14336, - 14337, 14080, 14096, 0, 8192, 12288, 14336, 14337, - 14080, 14112, 14104, 0, 8192, 12288, 14336, 14337, - 14080, 14112, 14104, 0, 8192, 12288, 14336, 14337, - 14080, 14112, 14104, 14106, 0, 8192, 12288, 14336, - 14337, 14080, 14112, 14104, 0, 8192, 12288, 14336, - 14337, 14080, 14112, 14113, 14108, 0, 8192, 12288, - 14336, 14337, 14080, 14112, 14113, 14108, 0, 8192, - 12288, 14336, 14337, 14080, 14112, 14113, 14108, 14110, - 0, 8192, 12288, 14336, 14337, 14080, 0, 8192, - 12288, 14336, 14337, 14080, 14112, 0, 8192, 12288, - 14336, 14337, 14080, 14112, 0, 8192, 12288, 14336, - 14337, 14080, 14112, 14114, 0, 8192, 12288, 14336, - 14337, 14080, 14112, 0, 8192, 12288, 14336, 14337, - 14080, 14112, 14116, 0, 8192, 12288, 14336, 14337, - 14080, 14112, 14116, 0, 8192, 12288, 14336, 14337, - 14080, 14112, 14120, 14118, 0, 8192, 12288, 14336, - 14337, 14080, 14112, 0, 8192, 12288, 14336, 14337, - 14080, 14112, 14120, 0, 8192, 12288, 14336, 14337, - 14080, 14112, 14120, 0, 8192, 12288, 14336, 14337, - 14080, 14112, 14120, 14122, 0, 8192, 12288, 14336, - 14337, 14080, 14112, 14120, 0, 8192, 12288, 14336, - 14337, 14080, 14112, 14128, 14124, 0, 8192, 12288, - 14336, 14337, 14080, 14112, 14128, 14124, 0, 8192, - 12288, 14336, 14337, 14080, 14112, 14128, 14129, 14126, - 0, 8192, 12288, 14336, 14337, 14080, 14112, 0, - 8192, 12288, 14336, 14337, 14080, 14144, 14128, 0, - 8192, 12288, 14336, 14337, 14080, 14144, 14128, 0, - 8192, 12288, 14336, 14337, 14080, 14144, 14128, 14130, - 0, 8192, 12288, 14336, 14337, 14080, 14144, 14128, - 0, 8192, 12288, 14336, 14337, 14080, 14144, 14128, - 14132, 0, 8192, 12288, 14336, 14337, 14080, 14144, - 14128, 14132, 0, 8192, 12288, 14336, 14337, 14080, - 14144, 14128, 14136, 14134, 0, 8192, 12288, 14336, - 14337, 14080, 14144, 14128, 0, 8192, 12288, 14336, - 14337, 14080, 14144, 14145, 14136, 0, 8192, 12288, - 14336, 14337, 14080, 14144, 14145, 14136, 0, 8192, - 12288, 14336, 14337, 14080, 14144, 14145, 14136, 14138, - 0, 8192, 12288, 14336, 14337, 14080, 14144, 14145, - 14136, 0, 8192, 12288, 14336, 14337, 14080, 14144, - 14145, 14136, 14140, 0, 8192, 12288, 14336, 14337, - 14080, 14144, 14145, 14147, 14140, 0, 8192, 12288, - 14336, 14337, 14080, 14144, 14145, 14147, 14140, 14142, - 0, 8192, 12288, 14336, 14337, 14080, 0, 8192, - 12288, 14336, 14337, 14080, 14144, 0, 8192, 12288, - 14336, 14337, 14080, 14144, 0, 8192, 12288, 14336, - 14337, 14080, 14144, 14146, 0, 8192, 12288, 14336, - 14337, 14080, 14144, 0, 8192, 12288, 14336, 14337, - 14080, 14144, 14148, 0, 8192, 12288, 14336, 14337, - 14080, 14144, 14148, 0, 8192, 12288, 14336, 14337, - 14080, 14144, 14152, 14150, 0, 8192, 12288, 14336, - 14337, 14080, 14144, 0, 8192, 12288, 14336, 14337, - 14080, 14144, 14152, 0, 8192, 12288, 14336, 14337, - 14080, 14144, 14152, 0, 8192, 12288, 14336, 14337, - 14080, 14144, 14152, 14154, 0, 8192, 12288, 14336, - 14337, 14080, 14144, 14152, 0, 8192, 12288, 14336, - 14337, 14080, 14144, 14160, 14156, 0, 8192, 12288, - 14336, 14337, 14080, 14144, 14160, 14156, 0, 8192, - 12288, 14336, 14337, 14080, 14144, 14160, 14161, 14158, - 0, 8192, 12288, 14336, 14337, 14080, 14144, 0, - 8192, 12288, 14336, 14337, 14080, 14144, 14160, 0, - 8192, 12288, 14336, 14337, 14080, 14144, 14160, 0, - 8192, 12288, 14336, 14337, 14080, 14144, 14160, 14162, - 0, 8192, 12288, 14336, 14337, 14080, 14144, 14160, - 0, 8192, 12288, 14336, 14337, 14080, 14144, 14160, - 14164, 0, 8192, 12288, 14336, 14337, 14080, 14144, - 14160, 14164, 0, 8192, 12288, 14336, 14337, 14080, - 14144, 14160, 14168, 14166, 0, 8192, 12288, 14336, - 14337, 14080, 14144, 14160, 0, 8192, 12288, 14336, - 14337, 14080, 14144, 14176, 14168, 0, 8192, 12288, - 14336, 14337, 14080, 14144, 14176, 14168, 0, 8192, - 12288, 14336, 14337, 14080, 14144, 14176, 14168, 14170, - 0, 8192, 12288, 14336, 14337, 14080, 14144, 14176, - 14168, 0, 8192, 12288, 14336, 14337, 14080, 14144, - 14176, 14177, 14172, 0, 8192, 12288, 14336, 14337, - 14080, 14144, 14176, 14177, 14172, 0, 8192, 12288, - 14336, 14337, 14080, 14144, 14176, 14177, 14172, 14174, - 0, 8192, 12288, 14336, 14337, 14080, 14144, 0, - 8192, 12288, 14336, 14337, 14080, 14208, 14176, 0, - 8192, 12288, 14336, 14337, 14080, 14208, 14176, 0, - 8192, 12288, 14336, 14337, 14080, 14208, 14176, 14178, - 0, 8192, 12288, 14336, 14337, 14080, 14208, 14176, - 0, 8192, 12288, 14336, 14337, 14080, 14208, 14176, - 14180, 0, 8192, 12288, 14336, 14337, 14080, 14208, - 14176, 14180, 0, 8192, 12288, 14336, 14337, 14080, - 14208, 14176, 14184, 14182, 0, 8192, 12288, 14336, - 14337, 14080, 14208, 14176, 0, 8192, 12288, 14336, - 14337, 14080, 14208, 14176, 14184, 0, 8192, 12288, - 14336, 14337, 14080, 14208, 14176, 14184, 0, 8192, - 12288, 14336, 14337, 14080, 14208, 14176, 14184, 14186, - 0, 8192, 12288, 14336, 14337, 14080, 14208, 14176, - 14184, 0, 8192, 12288, 14336, 14337, 14080, 14208, - 14176, 14192, 14188, 0, 8192, 12288, 14336, 14337, - 14080, 14208, 14176, 14192, 14188, 0, 8192, 12288, - 14336, 14337, 14080, 14208, 14176, 14192, 14193, 14190, - 0, 8192, 12288, 14336, 14337, 14080, 14208, 14176, - 0, 8192, 12288, 14336, 14337, 14080, 14208, 14209, - 14192, 0, 8192, 12288, 14336, 14337, 14080, 14208, - 14209, 14192, 0, 8192, 12288, 14336, 14337, 14080, - 14208, 14209, 14192, 14194, 0, 8192, 12288, 14336, - 14337, 14080, 14208, 14209, 14192, 0, 8192, 12288, - 14336, 14337, 14080, 14208, 14209, 14192, 14196, 0, - 8192, 12288, 14336, 14337, 14080, 14208, 14209, 14192, - 14196, 0, 8192, 12288, 14336, 14337, 14080, 14208, - 14209, 14192, 14200, 14198, 0, 8192, 12288, 14336, - 14337, 14080, 14208, 14209, 14192, 0, 8192, 12288, - 14336, 14337, 14080, 14208, 14209, 14192, 14200, 0, - 8192, 12288, 14336, 14337, 14080, 14208, 14209, 14211, - 14200, 0, 8192, 12288, 14336, 14337, 14080, 14208, - 14209, 14211, 14200, 14202, 0, 8192, 12288, 14336, - 14337, 14080, 14208, 14209, 14211, 14200, 0, 8192, - 12288, 14336, 14337, 14080, 14208, 14209, 14211, 14200, - 14204, 0, 8192, 12288, 14336, 14337, 14080, 14208, - 14209, 14211, 14200, 14204, 0, 8192, 12288, 14336, - 14337, 14080, 14208, 14209, 14211, 14200, 14204, 14206, - 0, 8192, 12288, 14336, 14337, 14080, 0, 8192, - 12288, 14336, 14337, 14080, 14208, 0, 8192, 12288, - 14336, 14337, 14080, 14208, 0, 8192, 12288, 14336, - 14337, 14080, 14208, 14210, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 0, 8192, 12288, 14336, 14337, - 14339, 14208, 14212, 0, 8192, 12288, 14336, 14337, - 14339, 14208, 14212, 0, 8192, 12288, 14336, 14337, - 14339, 14208, 14216, 14214, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 0, 8192, 12288, 14336, 14337, - 14339, 14208, 14216, 0, 8192, 12288, 14336, 14337, - 14339, 14208, 14216, 0, 8192, 12288, 14336, 14337, - 14339, 14208, 14216, 14218, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 14216, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 14224, 14220, 0, 8192, 12288, - 14336, 14337, 14339, 14208, 14224, 14220, 0, 8192, - 12288, 14336, 14337, 14339, 14208, 14224, 14225, 14222, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 0, - 8192, 12288, 14336, 14337, 14339, 14208, 14224, 0, - 8192, 12288, 14336, 14337, 14339, 14208, 14224, 0, - 8192, 12288, 14336, 14337, 14339, 14208, 14224, 14226, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 14224, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 14224, - 14228, 0, 8192, 12288, 14336, 14337, 14339, 14208, - 14224, 14228, 0, 8192, 12288, 14336, 14337, 14339, - 14208, 14224, 14232, 14230, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 14224, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 14240, 14232, 0, 8192, 12288, - 14336, 14337, 14339, 14208, 14240, 14232, 0, 8192, - 12288, 14336, 14337, 14339, 14208, 14240, 14232, 14234, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 14240, - 14232, 0, 8192, 12288, 14336, 14337, 14339, 14208, - 14240, 14241, 14236, 0, 8192, 12288, 14336, 14337, - 14339, 14208, 14240, 14241, 14236, 0, 8192, 12288, - 14336, 14337, 14339, 14208, 14240, 14241, 14236, 14238, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 0, - 8192, 12288, 14336, 14337, 14339, 14208, 14240, 0, - 8192, 12288, 14336, 14337, 14339, 14208, 14240, 0, - 8192, 12288, 14336, 14337, 14339, 14208, 14240, 14242, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 14240, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 14240, - 14244, 0, 8192, 12288, 14336, 14337, 14339, 14208, - 14240, 14244, 0, 8192, 12288, 14336, 14337, 14339, - 14208, 14240, 14248, 14246, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 14240, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 14240, 14248, 0, 8192, 12288, - 14336, 14337, 14339, 14208, 14240, 14248, 0, 8192, - 12288, 14336, 14337, 14339, 14208, 14240, 14248, 14250, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 14240, - 14248, 0, 8192, 12288, 14336, 14337, 14339, 14208, - 14240, 14256, 14252, 0, 8192, 12288, 14336, 14337, - 14339, 14208, 14240, 14256, 14252, 0, 8192, 12288, - 14336, 14337, 14339, 14208, 14240, 14256, 14257, 14254, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 14240, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 14272, - 14256, 0, 8192, 12288, 14336, 14337, 14339, 14208, - 14272, 14256, 0, 8192, 12288, 14336, 14337, 14339, - 14208, 14272, 14256, 14258, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 14272, 14256, 0, 8192, 12288, - 14336, 14337, 14339, 14208, 14272, 14256, 14260, 0, - 8192, 12288, 14336, 14337, 14339, 14208, 14272, 14256, - 14260, 0, 8192, 12288, 14336, 14337, 14339, 14208, - 14272, 14256, 14264, 14262, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 14272, 14256, 0, 8192, 12288, - 14336, 14337, 14339, 14208, 14272, 14273, 14264, 0, - 8192, 12288, 14336, 14337, 14339, 14208, 14272, 14273, - 14264, 0, 8192, 12288, 14336, 14337, 14339, 14208, - 14272, 14273, 14264, 14266, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 14272, 14273, 14264, 0, 8192, - 12288, 14336, 14337, 14339, 14208, 14272, 14273, 14264, - 14268, 0, 8192, 12288, 14336, 14337, 14339, 14208, - 14272, 14273, 14275, 14268, 0, 8192, 12288, 14336, - 14337, 14339, 14208, 14272, 14273, 14275, 14268, 14270, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 0, - 8192, 12288, 14336, 14337, 14339, 14208, 14272, 0, - 8192, 12288, 14336, 14337, 14339, 14208, 14272, 0, - 8192, 12288, 14336, 14337, 14339, 14208, 14272, 14274, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 14272, - 0, 8192, 12288, 14336, 14337, 14339, 14208, 14272, - 14276, 0, 8192, 12288, 14336, 14337, 14339, 14208, - 14272, 14276, 0, 8192, 12288, 14336, 14337, 14339, - 14208, 14272, 14280, 14278, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14272, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14272, 14280, 0, 8192, 12288, - 14336, 14337, 14339, 14343, 14272, 14280, 0, 8192, - 12288, 14336, 14337, 14339, 14343, 14272, 14280, 14282, - 0, 8192, 12288, 14336, 14337, 14339, 14343, 14272, - 14280, 0, 8192, 12288, 14336, 14337, 14339, 14343, - 14272, 14288, 14284, 0, 8192, 12288, 14336, 14337, - 14339, 14343, 14272, 14288, 14284, 0, 8192, 12288, - 14336, 14337, 14339, 14343, 14272, 14288, 14289, 14286, - 0, 8192, 12288, 14336, 14337, 14339, 14343, 14272, - 0, 8192, 12288, 14336, 14337, 14339, 14343, 14272, - 14288, 0, 8192, 12288, 14336, 14337, 14339, 14343, - 14272, 14288, 0, 8192, 12288, 14336, 14337, 14339, - 14343, 14272, 14288, 14290, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14272, 14288, 0, 8192, 12288, - 14336, 14337, 14339, 14343, 14272, 14288, 14292, 0, - 8192, 12288, 14336, 14337, 14339, 14343, 14272, 14288, - 14292, 0, 8192, 12288, 14336, 14337, 14339, 14343, - 14272, 14288, 14296, 14294, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14272, 14288, 0, 8192, 12288, - 14336, 14337, 14339, 14343, 14272, 14304, 14296, 0, - 8192, 12288, 14336, 14337, 14339, 14343, 14272, 14304, - 14296, 0, 8192, 12288, 14336, 14337, 14339, 14343, - 14272, 14304, 14296, 14298, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14272, 14304, 14296, 0, 8192, - 12288, 14336, 14337, 14339, 14343, 14272, 14304, 14305, - 14300, 0, 8192, 12288, 14336, 14337, 14339, 14343, - 14272, 14304, 14305, 14300, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14272, 14304, 14305, 14300, 14302, - 0, 8192, 12288, 14336, 14337, 14339, 14343, 14272, - 0, 8192, 12288, 14336, 14337, 14339, 14343, 14272, - 14304, 0, 8192, 12288, 14336, 14337, 14339, 14343, - 14272, 14304, 0, 8192, 12288, 14336, 14337, 14339, - 14343, 14272, 14304, 14306, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14272, 14304, 0, 8192, 12288, - 14336, 14337, 14339, 14343, 14272, 14304, 14308, 0, - 8192, 12288, 14336, 14337, 14339, 14343, 14272, 14304, - 14308, 0, 8192, 12288, 14336, 14337, 14339, 14343, - 14272, 14304, 14312, 14310, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14272, 14304, 0, 8192, 12288, - 14336, 14337, 14339, 14343, 14272, 14304, 14312, 0, - 8192, 12288, 14336, 14337, 14339, 14343, 14272, 14304, - 14312, 0, 8192, 12288, 14336, 14337, 14339, 14343, - 14272, 14304, 14312, 14314, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14272, 14304, 14312, 0, 8192, - 12288, 14336, 14337, 14339, 14343, 14272, 14304, 14320, - 14316, 0, 8192, 12288, 14336, 14337, 14339, 14343, - 14272, 14304, 14320, 14316, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14272, 14304, 14320, 14321, 14318, - 0, 8192, 12288, 14336, 14337, 14339, 14343, 14351, - 14304, 0, 8192, 12288, 14336, 14337, 14339, 14343, - 14351, 14304, 14320, 0, 8192, 12288, 14336, 14337, - 14339, 14343, 14351, 14304, 14320, 0, 8192, 12288, - 14336, 14337, 14339, 14343, 14351, 14304, 14320, 14322, - 0, 8192, 12288, 14336, 14337, 14339, 14343, 14351, - 14304, 14320, 0, 8192, 12288, 14336, 14337, 14339, - 14343, 14351, 14304, 14320, 14324, 0, 8192, 12288, - 14336, 14337, 14339, 14343, 14351, 14304, 14320, 14324, - 0, 8192, 12288, 14336, 14337, 14339, 14343, 14351, - 14304, 14320, 14328, 14326, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14351, 14304, 14320, 0, 8192, - 12288, 14336, 14337, 14339, 14343, 14351, 14304, 14320, - 14328, 0, 8192, 12288, 14336, 14337, 14339, 14343, - 14351, 14304, 14320, 14328, 0, 8192, 12288, 14336, - 14337, 14339, 14343, 14351, 14304, 14320, 14328, 14330, - 0, 8192, 12288, 14336, 14337, 14339, 14343, 14351, - 14304, 14320, 14328, 0, 8192, 12288, 14336, 14337, - 14339, 14343, 14351, 14304, 14320, 14328, 14332, 0, - 8192, 12288, 14336, 14337, 14339, 14343, 14351, 14304, - 14320, 14328, 14332, 0, 8192, 12288, 14336, 14337, - 14339, 14343, 14351, 14304, 14320, 14328, 14332, 14334, - 0, 8192, 12288, 0, 8192, 12288, 14336, 0, - 8192, 12288, 14336, 0, 8192, 12288, 14336, 14338, - 0, 8192, 12288, 14336, 0, 8192, 12288, 14336, - 14340, 0, 8192, 12288, 14336, 14340, 0, 8192, - 12288, 14336, 14344, 14342, 0, 8192, 12288, 14336, - 0, 8192, 12288, 14336, 14344, 0, 8192, 12288, - 14336, 14344, 0, 8192, 12288, 14336, 14344, 14346, - 0, 8192, 12288, 14336, 14344, 0, 8192, 12288, - 14336, 14352, 14348, 0, 8192, 12288, 14336, 14352, - 14348, 0, 8192, 12288, 14336, 14352, 14353, 14350, - 0, 8192, 12288, 14336, 0, 8192, 12288, 14336, - 14352, 0, 8192, 12288, 14336, 14352, 0, 8192, - 12288, 14336, 14352, 14354, 0, 8192, 12288, 14336, - 14352, 0, 8192, 12288, 14336, 14352, 14356, 0, - 8192, 12288, 14336, 14352, 14356, 0, 8192, 12288, - 14336, 14352, 14360, 14358, 0, 8192, 12288, 14336, - 14352, 0, 8192, 12288, 14336, 14368, 14360, 0, - 8192, 12288, 14336, 14368, 14360, 0, 8192, 12288, - 14336, 14368, 14360, 14362, 0, 8192, 12288, 14336, - 14368, 14360, 0, 8192, 12288, 14336, 14368, 14369, - 14364, 0, 8192, 12288, 14336, 14368, 14369, 14364, - 0, 8192, 12288, 14336, 14368, 14369, 14364, 14366, - 0, 8192, 12288, 14336, 0, 8192, 12288, 14336, - 14368, 0, 8192, 12288, 14336, 14368, 0, 8192, - 12288, 14336, 14368, 14370, 0, 8192, 12288, 14336, - 14368, 0, 8192, 12288, 14336, 14368, 14372, 0, - 8192, 12288, 14336, 14368, 14372, 0, 8192, 12288, - 14336, 14368, 14376, 14374, 0, 8192, 12288, 14336, - 14368, 0, 8192, 12288, 14336, 14368, 14376, 0, - 8192, 12288, 14336, 14368, 14376, 0, 8192, 12288, - 14336, 14368, 14376, 14378, 0, 8192, 12288, 14336, - 14368, 14376, 0, 8192, 12288, 14336, 14368, 14384, - 14380, 0, 8192, 12288, 14336, 14368, 14384, 14380, - 0, 8192, 12288, 14336, 14368, 14384, 14385, 14382, - 0, 8192, 12288, 14336, 14368, 0, 8192, 12288, - 14336, 14400, 14384, 0, 8192, 12288, 14336, 14400, - 14384, 0, 8192, 12288, 14336, 14400, 14384, 14386, - 0, 8192, 12288, 14336, 14400, 14384, 0, 8192, - 12288, 14336, 14400, 14384, 14388, 0, 8192, 12288, - 14336, 14400, 14384, 14388, 0, 8192, 12288, 14336, - 14400, 14384, 14392, 14390, 0, 8192, 12288, 14336, - 14400, 14384, 0, 8192, 12288, 14336, 14400, 14401, - 14392, 0, 8192, 12288, 14336, 14400, 14401, 14392, - 0, 8192, 12288, 14336, 14400, 14401, 14392, 14394, - 0, 8192, 12288, 14336, 14400, 14401, 14392, 0, - 8192, 12288, 14336, 14400, 14401, 14392, 14396, 0, - 8192, 12288, 14336, 14400, 14401, 14403, 14396, 0, - 8192, 12288, 14336, 14400, 14401, 14403, 14396, 14398, - 0, 8192, 12288, 14336, 0, 8192, 12288, 14336, - 14400, 0, 8192, 12288, 14336, 14400, 0, 8192, - 12288, 14336, 14400, 14402, 0, 8192, 12288, 14336, - 14400, 0, 8192, 12288, 14336, 14400, 14404, 0, - 8192, 12288, 14336, 14400, 14404, 0, 8192, 12288, - 14336, 14400, 14408, 14406, 0, 8192, 12288, 14336, - 14400, 0, 8192, 12288, 14336, 14400, 14408, 0, - 8192, 12288, 14336, 14400, 14408, 0, 8192, 12288, - 14336, 14400, 14408, 14410, 0, 8192, 12288, 14336, - 14400, 14408, 0, 8192, 12288, 14336, 14400, 14416, - 14412, 0, 8192, 12288, 14336, 14400, 14416, 14412, - 0, 8192, 12288, 14336, 14400, 14416, 14417, 14414, - 0, 8192, 12288, 14336, 14400, 0, 8192, 12288, - 14336, 14400, 14416, 0, 8192, 12288, 14336, 14400, - 14416, 0, 8192, 12288, 14336, 14400, 14416, 14418, - 0, 8192, 12288, 14336, 14400, 14416, 0, 8192, - 12288, 14336, 14400, 14416, 14420, 0, 8192, 12288, - 14336, 14400, 14416, 14420, 0, 8192, 12288, 14336, - 14400, 14416, 14424, 14422, 0, 8192, 12288, 14336, - 14400, 14416, 0, 8192, 12288, 14336, 14400, 14432, - 14424, 0, 8192, 12288, 14336, 14400, 14432, 14424, - 0, 8192, 12288, 14336, 14400, 14432, 14424, 14426, - 0, 8192, 12288, 14336, 14400, 14432, 14424, 0, - 8192, 12288, 14336, 14400, 14432, 14433, 14428, 0, - 8192, 12288, 14336, 14400, 14432, 14433, 14428, 0, - 8192, 12288, 14336, 14400, 14432, 14433, 14428, 14430, - 0, 8192, 12288, 14336, 14400, 0, 8192, 12288, - 14336, 14464, 14432, 0, 8192, 12288, 14336, 14464, - 14432, 0, 8192, 12288, 14336, 14464, 14432, 14434, - 0, 8192, 12288, 14336, 14464, 14432, 0, 8192, - 12288, 14336, 14464, 14432, 14436, 0, 8192, 12288, - 14336, 14464, 14432, 14436, 0, 8192, 12288, 14336, - 14464, 14432, 14440, 14438, 0, 8192, 12288, 14336, - 14464, 14432, 0, 8192, 12288, 14336, 14464, 14432, - 14440, 0, 8192, 12288, 14336, 14464, 14432, 14440, - 0, 8192, 12288, 14336, 14464, 14432, 14440, 14442, - 0, 8192, 12288, 14336, 14464, 14432, 14440, 0, - 8192, 12288, 14336, 14464, 14432, 14448, 14444, 0, - 8192, 12288, 14336, 14464, 14432, 14448, 14444, 0, - 8192, 12288, 14336, 14464, 14432, 14448, 14449, 14446, - 0, 8192, 12288, 14336, 14464, 14432, 0, 8192, - 12288, 14336, 14464, 14465, 14448, 0, 8192, 12288, - 14336, 14464, 14465, 14448, 0, 8192, 12288, 14336, - 14464, 14465, 14448, 14450, 0, 8192, 12288, 14336, - 14464, 14465, 14448, 0, 8192, 12288, 14336, 14464, - 14465, 14448, 14452, 0, 8192, 12288, 14336, 14464, - 14465, 14448, 14452, 0, 8192, 12288, 14336, 14464, - 14465, 14448, 14456, 14454, 0, 8192, 12288, 14336, - 14464, 14465, 14448, 0, 8192, 12288, 14336, 14464, - 14465, 14448, 14456, 0, 8192, 12288, 14336, 14464, - 14465, 14467, 14456, 0, 8192, 12288, 14336, 14464, - 14465, 14467, 14456, 14458, 0, 8192, 12288, 14336, - 14464, 14465, 14467, 14456, 0, 8192, 12288, 14336, - 14464, 14465, 14467, 14456, 14460, 0, 8192, 12288, - 14336, 14464, 14465, 14467, 14456, 14460, 0, 8192, - 12288, 14336, 14464, 14465, 14467, 14456, 14460, 14462, - 0, 8192, 12288, 14336, 0, 8192, 12288, 14336, - 14464, 0, 8192, 12288, 14336, 14464, 0, 8192, - 12288, 14336, 14464, 14466, 0, 8192, 12288, 14336, - 14464, 0, 8192, 12288, 14336, 14464, 14468, 0, - 8192, 12288, 14336, 14464, 14468, 0, 8192, 12288, - 14336, 14464, 14472, 14470, 0, 8192, 12288, 14336, - 14464, 0, 8192, 12288, 14336, 14464, 14472, 0, - 8192, 12288, 14336, 14464, 14472, 0, 8192, 12288, - 14336, 14464, 14472, 14474, 0, 8192, 12288, 14336, - 14464, 14472, 0, 8192, 12288, 14336, 14464, 14480, - 14476, 0, 8192, 12288, 14336, 14464, 14480, 14476, - 0, 8192, 12288, 14336, 14464, 14480, 14481, 14478, - 0, 8192, 12288, 14336, 14464, 0, 8192, 12288, - 14336, 14464, 14480, 0, 8192, 12288, 14336, 14464, - 14480, 0, 8192, 12288, 14336, 14464, 14480, 14482, - 0, 8192, 12288, 14336, 14464, 14480, 0, 8192, - 12288, 14336, 14464, 14480, 14484, 0, 8192, 12288, - 14336, 14464, 14480, 14484, 0, 8192, 12288, 14336, - 14464, 14480, 14488, 14486, 0, 8192, 12288, 14336, - 14464, 14480, 0, 8192, 12288, 14336, 14464, 14496, - 14488, 0, 8192, 12288, 14336, 14464, 14496, 14488, - 0, 8192, 12288, 14336, 14464, 14496, 14488, 14490, - 0, 8192, 12288, 14336, 14464, 14496, 14488, 0, - 8192, 12288, 14336, 14464, 14496, 14497, 14492, 0, - 8192, 12288, 14336, 14464, 14496, 14497, 14492, 0, - 8192, 12288, 14336, 14464, 14496, 14497, 14492, 14494, - 0, 8192, 12288, 14336, 14464, 0, 8192, 12288, - 14336, 14464, 14496, 0, 8192, 12288, 14336, 14464, - 14496, 0, 8192, 12288, 14336, 14464, 14496, 14498, - 0, 8192, 12288, 14336, 14464, 14496, 0, 8192, - 12288, 14336, 14464, 14496, 14500, 0, 8192, 12288, - 14336, 14464, 14496, 14500, 0, 8192, 12288, 14336, - 14464, 14496, 14504, 14502, 0, 8192, 12288, 14336, - 14464, 14496, 0, 8192, 12288, 14336, 14464, 14496, - 14504, 0, 8192, 12288, 14336, 14464, 14496, 14504, - 0, 8192, 12288, 14336, 14464, 14496, 14504, 14506, - 0, 8192, 12288, 14336, 14464, 14496, 14504, 0, - 8192, 12288, 14336, 14464, 14496, 14512, 14508, 0, - 8192, 12288, 14336, 14464, 14496, 14512, 14508, 0, - 8192, 12288, 14336, 14464, 14496, 14512, 14513, 14510, - 0, 8192, 12288, 14336, 14464, 14496, 0, 8192, - 12288, 14336, 14464, 14528, 14512, 0, 8192, 12288, - 14336, 14464, 14528, 14512, 0, 8192, 12288, 14336, - 14464, 14528, 14512, 14514, 0, 8192, 12288, 14336, - 14464, 14528, 14512, 0, 8192, 12288, 14336, 14464, - 14528, 14512, 14516, 0, 8192, 12288, 14336, 14464, - 14528, 14512, 14516, 0, 8192, 12288, 14336, 14464, - 14528, 14512, 14520, 14518, 0, 8192, 12288, 14336, - 14464, 14528, 14512, 0, 8192, 12288, 14336, 14464, - 14528, 14529, 14520, 0, 8192, 12288, 14336, 14464, - 14528, 14529, 14520, 0, 8192, 12288, 14336, 14464, - 14528, 14529, 14520, 14522, 0, 8192, 12288, 14336, - 14464, 14528, 14529, 14520, 0, 8192, 12288, 14336, - 14464, 14528, 14529, 14520, 14524, 0, 8192, 12288, - 14336, 14464, 14528, 14529, 14531, 14524, 0, 8192, - 12288, 14336, 14464, 14528, 14529, 14531, 14524, 14526, - 0, 8192, 12288, 14336, 14464, 0, 8192, 12288, - 14336, 14592, 14528, 0, 8192, 12288, 14336, 14592, - 14528, 0, 8192, 12288, 14336, 14592, 14528, 14530, - 0, 8192, 12288, 14336, 14592, 14528, 0, 8192, - 12288, 14336, 14592, 14528, 14532, 0, 8192, 12288, - 14336, 14592, 14528, 14532, 0, 8192, 12288, 14336, - 14592, 14528, 14536, 14534, 0, 8192, 12288, 14336, - 14592, 14528, 0, 8192, 12288, 14336, 14592, 14528, - 14536, 0, 8192, 12288, 14336, 14592, 14528, 14536, - 0, 8192, 12288, 14336, 14592, 14528, 14536, 14538, - 0, 8192, 12288, 14336, 14592, 14528, 14536, 0, - 8192, 12288, 14336, 14592, 14528, 14544, 14540, 0, - 8192, 12288, 14336, 14592, 14528, 14544, 14540, 0, - 8192, 12288, 14336, 14592, 14528, 14544, 14545, 14542, - 0, 8192, 12288, 14336, 14592, 14528, 0, 8192, - 12288, 14336, 14592, 14528, 14544, 0, 8192, 12288, - 14336, 14592, 14528, 14544, 0, 8192, 12288, 14336, - 14592, 14528, 14544, 14546, 0, 8192, 12288, 14336, - 14592, 14528, 14544, 0, 8192, 12288, 14336, 14592, - 14528, 14544, 14548, 0, 8192, 12288, 14336, 14592, - 14528, 14544, 14548, 0, 8192, 12288, 14336, 14592, - 14528, 14544, 14552, 14550, 0, 8192, 12288, 14336, - 14592, 14528, 14544, 0, 8192, 12288, 14336, 14592, - 14528, 14560, 14552, 0, 8192, 12288, 14336, 14592, - 14528, 14560, 14552, 0, 8192, 12288, 14336, 14592, - 14528, 14560, 14552, 14554, 0, 8192, 12288, 14336, - 14592, 14528, 14560, 14552, 0, 8192, 12288, 14336, - 14592, 14528, 14560, 14561, 14556, 0, 8192, 12288, - 14336, 14592, 14528, 14560, 14561, 14556, 0, 8192, - 12288, 14336, 14592, 14528, 14560, 14561, 14556, 14558, - 0, 8192, 12288, 14336, 14592, 14528, 0, 8192, - 12288, 14336, 14592, 14593, 14560, 0, 8192, 12288, - 14336, 14592, 14593, 14560, 0, 8192, 12288, 14336, - 14592, 14593, 14560, 14562, 0, 8192, 12288, 14336, - 14592, 14593, 14560, 0, 8192, 12288, 14336, 14592, - 14593, 14560, 14564, 0, 8192, 12288, 14336, 14592, - 14593, 14560, 14564, 0, 8192, 12288, 14336, 14592, - 14593, 14560, 14568, 14566, 0, 8192, 12288, 14336, - 14592, 14593, 14560, 0, 8192, 12288, 14336, 14592, - 14593, 14560, 14568, 0, 8192, 12288, 14336, 14592, - 14593, 14560, 14568, 0, 8192, 12288, 14336, 14592, - 14593, 14560, 14568, 14570, 0, 8192, 12288, 14336, - 14592, 14593, 14560, 14568, 0, 8192, 12288, 14336, - 14592, 14593, 14560, 14576, 14572, 0, 8192, 12288, - 14336, 14592, 14593, 14560, 14576, 14572, 0, 8192, - 12288, 14336, 14592, 14593, 14560, 14576, 14577, 14574, - 0, 8192, 12288, 14336, 14592, 14593, 14560, 0, - 8192, 12288, 14336, 14592, 14593, 14560, 14576, 0, - 8192, 12288, 14336, 14592, 14593, 14595, 14576, 0, - 8192, 12288, 14336, 14592, 14593, 14595, 14576, 14578, - 0, 8192, 12288, 14336, 14592, 14593, 14595, 14576, - 0, 8192, 12288, 14336, 14592, 14593, 14595, 14576, - 14580, 0, 8192, 12288, 14336, 14592, 14593, 14595, - 14576, 14580, 0, 8192, 12288, 14336, 14592, 14593, - 14595, 14576, 14584, 14582, 0, 8192, 12288, 14336, - 14592, 14593, 14595, 14576, 0, 8192, 12288, 14336, - 14592, 14593, 14595, 14576, 14584, 0, 8192, 12288, - 14336, 14592, 14593, 14595, 14576, 14584, 0, 8192, - 12288, 14336, 14592, 14593, 14595, 14576, 14584, 14586, - 0, 8192, 12288, 14336, 14592, 14593, 14595, 14599, - 14584, 0, 8192, 12288, 14336, 14592, 14593, 14595, - 14599, 14584, 14588, 0, 8192, 12288, 14336, 14592, - 14593, 14595, 14599, 14584, 14588, 0, 8192, 12288, - 14336, 14592, 14593, 14595, 14599, 14584, 14588, 14590, - 0, 8192, 12288, 14336, 0, 8192, 12288, 14336, - 14592, 0, 8192, 12288, 14336, 14592, 0, 8192, - 12288, 14336, 14592, 14594, 0, 8192, 12288, 14336, - 14592, 0, 8192, 12288, 14336, 14592, 14596, 0, - 8192, 12288, 14336, 14592, 14596, 0, 8192, 12288, - 14336, 14592, 14600, 14598, 0, 8192, 12288, 14336, - 14592, 0, 8192, 12288, 14336, 14592, 14600, 0, - 8192, 12288, 14336, 14592, 14600, 0, 8192, 12288, - 14336, 14592, 14600, 14602, 0, 8192, 12288, 14336, - 14592, 14600, 0, 8192, 12288, 14336, 14592, 14608, - 14604, 0, 8192, 12288, 14336, 14592, 14608, 14604, - 0, 8192, 12288, 14336, 14592, 14608, 14609, 14606, - 0, 8192, 12288, 14336, 14592, 0, 8192, 12288, - 14336, 14592, 14608, 0, 8192, 12288, 14336, 14592, - 14608, 0, 8192, 12288, 14336, 14592, 14608, 14610, - 0, 8192, 12288, 14336, 14592, 14608, 0, 8192, - 12288, 14336, 14592, 14608, 14612, 0, 8192, 12288, - 14336, 14592, 14608, 14612, 0, 8192, 12288, 14336, - 14592, 14608, 14616, 14614, 0, 8192, 12288, 14336, - 14592, 14608, 0, 8192, 12288, 14336, 14592, 14624, - 14616, 0, 8192, 12288, 14336, 14592, 14624, 14616, - 0, 8192, 12288, 14336, 14592, 14624, 14616, 14618, - 0, 8192, 12288, 14336, 14592, 14624, 14616, 0, - 8192, 12288, 14336, 14592, 14624, 14625, 14620, 0, - 8192, 12288, 14336, 14592, 14624, 14625, 14620, 0, - 8192, 12288, 14336, 14592, 14624, 14625, 14620, 14622, - 0, 8192, 12288, 14336, 14592, 0, 8192, 12288, - 14336, 14592, 14624, 0, 8192, 12288, 14336, 14592, - 14624, 0, 8192, 12288, 14336, 14592, 14624, 14626, - 0, 8192, 12288, 14336, 14592, 14624, 0, 8192, - 12288, 14336, 14592, 14624, 14628, 0, 8192, 12288, - 14336, 14592, 14624, 14628, 0, 8192, 12288, 14336, - 14592, 14624, 14632, 14630, 0, 8192, 12288, 14336, - 14592, 14624, 0, 8192, 12288, 14336, 14592, 14624, - 14632, 0, 8192, 12288, 14336, 14592, 14624, 14632, - 0, 8192, 12288, 14336, 14592, 14624, 14632, 14634, - 0, 8192, 12288, 14336, 14592, 14624, 14632, 0, - 8192, 12288, 14336, 14592, 14624, 14640, 14636, 0, - 8192, 12288, 14336, 14592, 14624, 14640, 14636, 0, - 8192, 12288, 14336, 14592, 14624, 14640, 14641, 14638, - 0, 8192, 12288, 14336, 14592, 14624, 0, 8192, - 12288, 14336, 14592, 14656, 14640, 0, 8192, 12288, - 14336, 14592, 14656, 14640, 0, 8192, 12288, 14336, - 14592, 14656, 14640, 14642, 0, 8192, 12288, 14336, - 14592, 14656, 14640, 0, 8192, 12288, 14336, 14592, - 14656, 14640, 14644, 0, 8192, 12288, 14336, 14592, - 14656, 14640, 14644, 0, 8192, 12288, 14336, 14592, - 14656, 14640, 14648, 14646, 0, 8192, 12288, 14336, - 14592, 14656, 14640, 0, 8192, 12288, 14336, 14592, - 14656, 14657, 14648, 0, 8192, 12288, 14336, 14592, - 14656, 14657, 14648, 0, 8192, 12288, 14336, 14592, - 14656, 14657, 14648, 14650, 0, 8192, 12288, 14336, - 14592, 14656, 14657, 14648, 0, 8192, 12288, 14336, - 14592, 14656, 14657, 14648, 14652, 0, 8192, 12288, - 14336, 14592, 14656, 14657, 14659, 14652, 0, 8192, - 12288, 14336, 14592, 14656, 14657, 14659, 14652, 14654, - 0, 8192, 12288, 14336, 14592, 0, 8192, 12288, - 14336, 14592, 14656, 0, 8192, 12288, 14336, 14592, - 14656, 0, 8192, 12288, 14336, 14592, 14656, 14658, - 0, 8192, 12288, 14336, 14592, 14656, 0, 8192, - 12288, 14336, 14592, 14656, 14660, 0, 8192, 12288, - 14336, 14592, 14656, 14660, 0, 8192, 12288, 14336, - 14592, 14656, 14664, 14662, 0, 8192, 12288, 14336, - 14592, 14656, 0, 8192, 12288, 14336, 14592, 14656, - 14664, 0, 8192, 12288, 14336, 14592, 14656, 14664, - 0, 8192, 12288, 14336, 14592, 14656, 14664, 14666, - 0, 8192, 12288, 14336, 14592, 14656, 14664, 0, - 8192, 12288, 14336, 14592, 14656, 14672, 14668, 0, - 8192, 12288, 14336, 14592, 14656, 14672, 14668, 0, - 8192, 12288, 14336, 14592, 14656, 14672, 14673, 14670, - 0, 8192, 12288, 14336, 14592, 14656, 0, 8192, - 12288, 14336, 14592, 14656, 14672, 0, 8192, 12288, - 14336, 14592, 14656, 14672, 0, 8192, 12288, 14336, - 14592, 14656, 14672, 14674, 0, 8192, 12288, 14336, - 14592, 14656, 14672, 0, 8192, 12288, 14336, 14592, - 14656, 14672, 14676, 0, 8192, 12288, 14336, 14592, - 14656, 14672, 14676, 0, 8192, 12288, 14336, 14592, - 14656, 14672, 14680, 14678, 0, 8192, 12288, 14336, - 14592, 14656, 14672, 0, 8192, 12288, 14336, 14592, - 14656, 14688, 14680, 0, 8192, 12288, 14336, 14592, - 14656, 14688, 14680, 0, 8192, 12288, 14336, 14592, - 14656, 14688, 14680, 14682, 0, 8192, 12288, 14336, - 14592, 14656, 14688, 14680, 0, 8192, 12288, 14336, - 14592, 14656, 14688, 14689, 14684, 0, 8192, 12288, - 14336, 14592, 14656, 14688, 14689, 14684, 0, 8192, - 12288, 14336, 14592, 14656, 14688, 14689, 14684, 14686, - 0, 8192, 12288, 14336, 14592, 14656, 0, 8192, - 12288, 14336, 14592, 14720, 14688, 0, 8192, 12288, - 14336, 14592, 14720, 14688, 0, 8192, 12288, 14336, - 14592, 14720, 14688, 14690, 0, 8192, 12288, 14336, - 14592, 14720, 14688, 0, 8192, 12288, 14336, 14592, - 14720, 14688, 14692, 0, 8192, 12288, 14336, 14592, - 14720, 14688, 14692, 0, 8192, 12288, 14336, 14592, - 14720, 14688, 14696, 14694, 0, 8192, 12288, 14336, - 14592, 14720, 14688, 0, 8192, 12288, 14336, 14592, - 14720, 14688, 14696, 0, 8192, 12288, 14336, 14592, - 14720, 14688, 14696, 0, 8192, 12288, 14336, 14592, - 14720, 14688, 14696, 14698, 0, 8192, 12288, 14336, - 14592, 14720, 14688, 14696, 0, 8192, 12288, 14336, - 14592, 14720, 14688, 14704, 14700, 0, 8192, 12288, - 14336, 14592, 14720, 14688, 14704, 14700, 0, 8192, - 12288, 14336, 14592, 14720, 14688, 14704, 14705, 14702, - 0, 8192, 12288, 14336, 14592, 14720, 14688, 0, - 8192, 12288, 14336, 14592, 14720, 14721, 14704, 0, - 8192, 12288, 14336, 14592, 14720, 14721, 14704, 0, - 8192, 12288, 14336, 14592, 14720, 14721, 14704, 14706, - 0, 8192, 12288, 14336, 14592, 14720, 14721, 14704, - 0, 8192, 12288, 14336, 14592, 14720, 14721, 14704, - 14708, 0, 8192, 12288, 14336, 14592, 14720, 14721, - 14704, 14708, 0, 8192, 12288, 14336, 14592, 14720, - 14721, 14704, 14712, 14710, 0, 8192, 12288, 14336, - 14592, 14720, 14721, 14704, 0, 8192, 12288, 14336, - 14592, 14720, 14721, 14704, 14712, 0, 8192, 12288, - 14336, 14592, 14720, 14721, 14723, 14712, 0, 8192, - 12288, 14336, 14592, 14720, 14721, 14723, 14712, 14714, - 0, 8192, 12288, 14336, 14592, 14720, 14721, 14723, - 14712, 0, 8192, 12288, 14336, 14592, 14720, 14721, - 14723, 14712, 14716, 0, 8192, 12288, 14336, 14592, - 14720, 14721, 14723, 14712, 14716, 0, 8192, 12288, - 14336, 14592, 14720, 14721, 14723, 14712, 14716, 14718, - 0, 8192, 12288, 14336, 14592, 0, 8192, 12288, - 14336, 14848, 14720, 0, 8192, 12288, 14336, 14848, - 14720, 0, 8192, 12288, 14336, 14848, 14720, 14722, - 0, 8192, 12288, 14336, 14848, 14720, 0, 8192, - 12288, 14336, 14848, 14720, 14724, 0, 8192, 12288, - 14336, 14848, 14720, 14724, 0, 8192, 12288, 14336, - 14848, 14720, 14728, 14726, 0, 8192, 12288, 14336, - 14848, 14720, 0, 8192, 12288, 14336, 14848, 14720, - 14728, 0, 8192, 12288, 14336, 14848, 14720, 14728, - 0, 8192, 12288, 14336, 14848, 14720, 14728, 14730, - 0, 8192, 12288, 14336, 14848, 14720, 14728, 0, - 8192, 12288, 14336, 14848, 14720, 14736, 14732, 0, - 8192, 12288, 14336, 14848, 14720, 14736, 14732, 0, - 8192, 12288, 14336, 14848, 14720, 14736, 14737, 14734, - 0, 8192, 12288, 14336, 14848, 14720, 0, 8192, - 12288, 14336, 14848, 14720, 14736, 0, 8192, 12288, - 14336, 14848, 14720, 14736, 0, 8192, 12288, 14336, - 14848, 14720, 14736, 14738, 0, 8192, 12288, 14336, - 14848, 14720, 14736, 0, 8192, 12288, 14336, 14848, - 14720, 14736, 14740, 0, 8192, 12288, 14336, 14848, - 14720, 14736, 14740, 0, 8192, 12288, 14336, 14848, - 14720, 14736, 14744, 14742, 0, 8192, 12288, 14336, - 14848, 14720, 14736, 0, 8192, 12288, 14336, 14848, - 14720, 14752, 14744, 0, 8192, 12288, 14336, 14848, - 14720, 14752, 14744, 0, 8192, 12288, 14336, 14848, - 14720, 14752, 14744, 14746, 0, 8192, 12288, 14336, - 14848, 14720, 14752, 14744, 0, 8192, 12288, 14336, - 14848, 14720, 14752, 14753, 14748, 0, 8192, 12288, - 14336, 14848, 14720, 14752, 14753, 14748, 0, 8192, - 12288, 14336, 14848, 14720, 14752, 14753, 14748, 14750, - 0, 8192, 12288, 14336, 14848, 14720, 0, 8192, - 12288, 14336, 14848, 14720, 14752, 0, 8192, 12288, - 14336, 14848, 14720, 14752, 0, 8192, 12288, 14336, - 14848, 14720, 14752, 14754, 0, 8192, 12288, 14336, - 14848, 14720, 14752, 0, 8192, 12288, 14336, 14848, - 14720, 14752, 14756, 0, 8192, 12288, 14336, 14848, - 14720, 14752, 14756, 0, 8192, 12288, 14336, 14848, - 14720, 14752, 14760, 14758, 0, 8192, 12288, 14336, - 14848, 14720, 14752, 0, 8192, 12288, 14336, 14848, - 14720, 14752, 14760, 0, 8192, 12288, 14336, 14848, - 14720, 14752, 14760, 0, 8192, 12288, 14336, 14848, - 14720, 14752, 14760, 14762, 0, 8192, 12288, 14336, - 14848, 14720, 14752, 14760, 0, 8192, 12288, 14336, - 14848, 14720, 14752, 14768, 14764, 0, 8192, 12288, - 14336, 14848, 14720, 14752, 14768, 14764, 0, 8192, - 12288, 14336, 14848, 14720, 14752, 14768, 14769, 14766, - 0, 8192, 12288, 14336, 14848, 14720, 14752, 0, - 8192, 12288, 14336, 14848, 14720, 14784, 14768, 0, - 8192, 12288, 14336, 14848, 14720, 14784, 14768, 0, - 8192, 12288, 14336, 14848, 14720, 14784, 14768, 14770, - 0, 8192, 12288, 14336, 14848, 14720, 14784, 14768, - 0, 8192, 12288, 14336, 14848, 14720, 14784, 14768, - 14772, 0, 8192, 12288, 14336, 14848, 14720, 14784, - 14768, 14772, 0, 8192, 12288, 14336, 14848, 14720, - 14784, 14768, 14776, 14774, 0, 8192, 12288, 14336, - 14848, 14720, 14784, 14768, 0, 8192, 12288, 14336, - 14848, 14720, 14784, 14785, 14776, 0, 8192, 12288, - 14336, 14848, 14720, 14784, 14785, 14776, 0, 8192, - 12288, 14336, 14848, 14720, 14784, 14785, 14776, 14778, - 0, 8192, 12288, 14336, 14848, 14720, 14784, 14785, - 14776, 0, 8192, 12288, 14336, 14848, 14720, 14784, - 14785, 14776, 14780, 0, 8192, 12288, 14336, 14848, - 14720, 14784, 14785, 14787, 14780, 0, 8192, 12288, - 14336, 14848, 14720, 14784, 14785, 14787, 14780, 14782, - 0, 8192, 12288, 14336, 14848, 14720, 0, 8192, - 12288, 14336, 14848, 14849, 14784, 0, 8192, 12288, - 14336, 14848, 14849, 14784, 0, 8192, 12288, 14336, - 14848, 14849, 14784, 14786, 0, 8192, 12288, 14336, - 14848, 14849, 14784, 0, 8192, 12288, 14336, 14848, - 14849, 14784, 14788, 0, 8192, 12288, 14336, 14848, - 14849, 14784, 14788, 0, 8192, 12288, 14336, 14848, - 14849, 14784, 14792, 14790, 0, 8192, 12288, 14336, - 14848, 14849, 14784, 0, 8192, 12288, 14336, 14848, - 14849, 14784, 14792, 0, 8192, 12288, 14336, 14848, - 14849, 14784, 14792, 0, 8192, 12288, 14336, 14848, - 14849, 14784, 14792, 14794, 0, 8192, 12288, 14336, - 14848, 14849, 14784, 14792, 0, 8192, 12288, 14336, - 14848, 14849, 14784, 14800, 14796, 0, 8192, 12288, - 14336, 14848, 14849, 14784, 14800, 14796, 0, 8192, - 12288, 14336, 14848, 14849, 14784, 14800, 14801, 14798, - 0, 8192, 12288, 14336, 14848, 14849, 14784, 0, - 8192, 12288, 14336, 14848, 14849, 14784, 14800, 0, - 8192, 12288, 14336, 14848, 14849, 14784, 14800, 0, - 8192, 12288, 14336, 14848, 14849, 14784, 14800, 14802, - 0, 8192, 12288, 14336, 14848, 14849, 14784, 14800, - 0, 8192, 12288, 14336, 14848, 14849, 14784, 14800, - 14804, 0, 8192, 12288, 14336, 14848, 14849, 14784, - 14800, 14804, 0, 8192, 12288, 14336, 14848, 14849, - 14784, 14800, 14808, 14806, 0, 8192, 12288, 14336, - 14848, 14849, 14784, 14800, 0, 8192, 12288, 14336, - 14848, 14849, 14784, 14816, 14808, 0, 8192, 12288, - 14336, 14848, 14849, 14784, 14816, 14808, 0, 8192, - 12288, 14336, 14848, 14849, 14784, 14816, 14808, 14810, - 0, 8192, 12288, 14336, 14848, 14849, 14784, 14816, - 14808, 0, 8192, 12288, 14336, 14848, 14849, 14784, - 14816, 14817, 14812, 0, 8192, 12288, 14336, 14848, - 14849, 14784, 14816, 14817, 14812, 0, 8192, 12288, - 14336, 14848, 14849, 14784, 14816, 14817, 14812, 14814, - 0, 8192, 12288, 14336, 14848, 14849, 14784, 0, - 8192, 12288, 14336, 14848, 14849, 14784, 14816, 0, - 8192, 12288, 14336, 14848, 14849, 14851, 14816, 0, - 8192, 12288, 14336, 14848, 14849, 14851, 14816, 14818, - 0, 8192, 12288, 14336, 14848, 14849, 14851, 14816, - 0, 8192, 12288, 14336, 14848, 14849, 14851, 14816, - 14820, 0, 8192, 12288, 14336, 14848, 14849, 14851, - 14816, 14820, 0, 8192, 12288, 14336, 14848, 14849, - 14851, 14816, 14824, 14822, 0, 8192, 12288, 14336, - 14848, 14849, 14851, 14816, 0, 8192, 12288, 14336, - 14848, 14849, 14851, 14816, 14824, 0, 8192, 12288, - 14336, 14848, 14849, 14851, 14816, 14824, 0, 8192, - 12288, 14336, 14848, 14849, 14851, 14816, 14824, 14826, - 0, 8192, 12288, 14336, 14848, 14849, 14851, 14816, - 14824, 0, 8192, 12288, 14336, 14848, 14849, 14851, - 14816, 14832, 14828, 0, 8192, 12288, 14336, 14848, - 14849, 14851, 14816, 14832, 14828, 0, 8192, 12288, - 14336, 14848, 14849, 14851, 14816, 14832, 14833, 14830, - 0, 8192, 12288, 14336, 14848, 14849, 14851, 14816, - 0, 8192, 12288, 14336, 14848, 14849, 14851, 14816, - 14832, 0, 8192, 12288, 14336, 14848, 14849, 14851, - 14816, 14832, 0, 8192, 12288, 14336, 14848, 14849, - 14851, 14816, 14832, 14834, 0, 8192, 12288, 14336, - 14848, 14849, 14851, 14855, 14832, 0, 8192, 12288, - 14336, 14848, 14849, 14851, 14855, 14832, 14836, 0, - 8192, 12288, 14336, 14848, 14849, 14851, 14855, 14832, - 14836, 0, 8192, 12288, 14336, 14848, 14849, 14851, - 14855, 14832, 14840, 14838, 0, 8192, 12288, 14336, - 14848, 14849, 14851, 14855, 14832, 0, 8192, 12288, - 14336, 14848, 14849, 14851, 14855, 14832, 14840, 0, - 8192, 12288, 14336, 14848, 14849, 14851, 14855, 14832, - 14840, 0, 8192, 12288, 14336, 14848, 14849, 14851, - 14855, 14832, 14840, 14842, 0, 8192, 12288, 14336, - 14848, 14849, 14851, 14855, 14832, 14840, 0, 8192, - 12288, 14336, 14848, 14849, 14851, 14855, 14832, 14840, - 14844, 0, 8192, 12288, 14336, 14848, 14849, 14851, - 14855, 14832, 14840, 14844, 0, 8192, 12288, 14336, - 14848, 14849, 14851, 14855, 14832, 14840, 14844, 14846, - 0, 8192, 12288, 14336, 0, 8192, 12288, 14336, - 14848, 0, 8192, 12288, 14336, 14848, 0, 8192, - 12288, 14336, 14848, 14850, 0, 8192, 12288, 14336, - 14848, 0, 8192, 12288, 14336, 14848, 14852, 0, - 8192, 12288, 14336, 14848, 14852, 0, 8192, 12288, - 14336, 14848, 14856, 14854, 0, 8192, 12288, 14336, - 14848, 0, 8192, 12288, 14336, 14848, 14856, 0, - 8192, 12288, 14336, 14848, 14856, 0, 8192, 12288, - 14336, 14848, 14856, 14858, 0, 8192, 12288, 14336, - 14848, 14856, 0, 8192, 12288, 14336, 14848, 14864, - 14860, 0, 8192, 12288, 14336, 14848, 14864, 14860, - 0, 8192, 12288, 14336, 14848, 14864, 14865, 14862, - 0, 8192, 12288, 14336, 14848, 0, 8192, 12288, - 14336, 14848, 14864, 0, 8192, 12288, 14336, 14848, - 14864, 0, 8192, 12288, 14336, 14848, 14864, 14866, - 0, 8192, 12288, 14336, 14848, 14864, 0, 8192, - 12288, 14336, 14848, 14864, 14868, 0, 8192, 12288, - 14336, 14848, 14864, 14868, 0, 8192, 12288, 14336, - 14848, 14864, 14872, 14870, 0, 8192, 12288, 14336, - 14848, 14864, 0, 8192, 12288, 14336, 14848, 14880, - 14872, 0, 8192, 12288, 14336, 14848, 14880, 14872, - 0, 8192, 12288, 14336, 14848, 14880, 14872, 14874, - 0, 8192, 12288, 14336, 14848, 14880, 14872, 0, - 8192, 12288, 14336, 14848, 14880, 14881, 14876, 0, - 8192, 12288, 14336, 14848, 14880, 14881, 14876, 0, - 8192, 12288, 14336, 14848, 14880, 14881, 14876, 14878, - 0, 8192, 12288, 14336, 14848, 0, 8192, 12288, - 14336, 14848, 14880, 0, 8192, 12288, 14336, 14848, - 14880, 0, 8192, 12288, 14336, 14848, 14880, 14882, - 0, 8192, 12288, 14336, 14848, 14880, 0, 8192, - 12288, 14336, 14848, 14880, 14884, 0, 8192, 12288, - 14336, 14848, 14880, 14884, 0, 8192, 12288, 14336, - 14848, 14880, 14888, 14886, 0, 8192, 12288, 14336, - 14848, 14880, 0, 8192, 12288, 14336, 14848, 14880, - 14888, 0, 8192, 12288, 14336, 14848, 14880, 14888, - 0, 8192, 12288, 14336, 14848, 14880, 14888, 14890, - 0, 8192, 12288, 14336, 14848, 14880, 14888, 0, - 8192, 12288, 14336, 14848, 14880, 14896, 14892, 0, - 8192, 12288, 14336, 14848, 14880, 14896, 14892, 0, - 8192, 12288, 14336, 14848, 14880, 14896, 14897, 14894, - 0, 8192, 12288, 14336, 14848, 14880, 0, 8192, - 12288, 14336, 14848, 14912, 14896, 0, 8192, 12288, - 14336, 14848, 14912, 14896, 0, 8192, 12288, 14336, - 14848, 14912, 14896, 14898, 0, 8192, 12288, 14336, - 14848, 14912, 14896, 0, 8192, 12288, 14336, 14848, - 14912, 14896, 14900, 0, 8192, 12288, 14336, 14848, - 14912, 14896, 14900, 0, 8192, 12288, 14336, 14848, - 14912, 14896, 14904, 14902, 0, 8192, 12288, 14336, - 14848, 14912, 14896, 0, 8192, 12288, 14336, 14848, - 14912, 14913, 14904, 0, 8192, 12288, 14336, 14848, - 14912, 14913, 14904, 0, 8192, 12288, 14336, 14848, - 14912, 14913, 14904, 14906, 0, 8192, 12288, 14336, - 14848, 14912, 14913, 14904, 0, 8192, 12288, 14336, - 14848, 14912, 14913, 14904, 14908, 0, 8192, 12288, - 14336, 14848, 14912, 14913, 14915, 14908, 0, 8192, - 12288, 14336, 14848, 14912, 14913, 14915, 14908, 14910, - 0, 8192, 12288, 14336, 14848, 0, 8192, 12288, - 14336, 14848, 14912, 0, 8192, 12288, 14336, 14848, - 14912, 0, 8192, 12288, 14336, 14848, 14912, 14914, - 0, 8192, 12288, 14336, 14848, 14912, 0, 8192, - 12288, 14336, 14848, 14912, 14916, 0, 8192, 12288, - 14336, 14848, 14912, 14916, 0, 8192, 12288, 14336, - 14848, 14912, 14920, 14918, 0, 8192, 12288, 14336, - 14848, 14912, 0, 8192, 12288, 14336, 14848, 14912, - 14920, 0, 8192, 12288, 14336, 14848, 14912, 14920, - 0, 8192, 12288, 14336, 14848, 14912, 14920, 14922, - 0, 8192, 12288, 14336, 14848, 14912, 14920, 0, - 8192, 12288, 14336, 14848, 14912, 14928, 14924, 0, - 8192, 12288, 14336, 14848, 14912, 14928, 14924, 0, - 8192, 12288, 14336, 14848, 14912, 14928, 14929, 14926, - 0, 8192, 12288, 14336, 14848, 14912, 0, 8192, - 12288, 14336, 14848, 14912, 14928, 0, 8192, 12288, - 14336, 14848, 14912, 14928, 0, 8192, 12288, 14336, - 14848, 14912, 14928, 14930, 0, 8192, 12288, 14336, - 14848, 14912, 14928, 0, 8192, 12288, 14336, 14848, - 14912, 14928, 14932, 0, 8192, 12288, 14336, 14848, - 14912, 14928, 14932, 0, 8192, 12288, 14336, 14848, - 14912, 14928, 14936, 14934, 0, 8192, 12288, 14336, - 14848, 14912, 14928, 0, 8192, 12288, 14336, 14848, - 14912, 14944, 14936, 0, 8192, 12288, 14336, 14848, - 14912, 14944, 14936, 0, 8192, 12288, 14336, 14848, - 14912, 14944, 14936, 14938, 0, 8192, 12288, 14336, - 14848, 14912, 14944, 14936, 0, 8192, 12288, 14336, - 14848, 14912, 14944, 14945, 14940, 0, 8192, 12288, - 14336, 14848, 14912, 14944, 14945, 14940, 0, 8192, - 12288, 14336, 14848, 14912, 14944, 14945, 14940, 14942, - 0, 8192, 12288, 14336, 14848, 14912, 0, 8192, - 12288, 14336, 14848, 14976, 14944, 0, 8192, 12288, - 14336, 14848, 14976, 14944, 0, 8192, 12288, 14336, - 14848, 14976, 14944, 14946, 0, 8192, 12288, 14336, - 14848, 14976, 14944, 0, 8192, 12288, 14336, 14848, - 14976, 14944, 14948, 0, 8192, 12288, 14336, 14848, - 14976, 14944, 14948, 0, 8192, 12288, 14336, 14848, - 14976, 14944, 14952, 14950, 0, 8192, 12288, 14336, - 14848, 14976, 14944, 0, 8192, 12288, 14336, 14848, - 14976, 14944, 14952, 0, 8192, 12288, 14336, 14848, - 14976, 14944, 14952, 0, 8192, 12288, 14336, 14848, - 14976, 14944, 14952, 14954, 0, 8192, 12288, 14336, - 14848, 14976, 14944, 14952, 0, 8192, 12288, 14336, - 14848, 14976, 14944, 14960, 14956, 0, 8192, 12288, - 14336, 14848, 14976, 14944, 14960, 14956, 0, 8192, - 12288, 14336, 14848, 14976, 14944, 14960, 14961, 14958, - 0, 8192, 12288, 14336, 14848, 14976, 14944, 0, - 8192, 12288, 14336, 14848, 14976, 14977, 14960, 0, - 8192, 12288, 14336, 14848, 14976, 14977, 14960, 0, - 8192, 12288, 14336, 14848, 14976, 14977, 14960, 14962, - 0, 8192, 12288, 14336, 14848, 14976, 14977, 14960, - 0, 8192, 12288, 14336, 14848, 14976, 14977, 14960, - 14964, 0, 8192, 12288, 14336, 14848, 14976, 14977, - 14960, 14964, 0, 8192, 12288, 14336, 14848, 14976, - 14977, 14960, 14968, 14966, 0, 8192, 12288, 14336, - 14848, 14976, 14977, 14960, 0, 8192, 12288, 14336, - 14848, 14976, 14977, 14960, 14968, 0, 8192, 12288, - 14336, 14848, 14976, 14977, 14979, 14968, 0, 8192, - 12288, 14336, 14848, 14976, 14977, 14979, 14968, 14970, - 0, 8192, 12288, 14336, 14848, 14976, 14977, 14979, - 14968, 0, 8192, 12288, 14336, 14848, 14976, 14977, - 14979, 14968, 14972, 0, 8192, 12288, 14336, 14848, - 14976, 14977, 14979, 14968, 14972, 0, 8192, 12288, - 14336, 14848, 14976, 14977, 14979, 14968, 14972, 14974, - 0, 8192, 12288, 14336, 14848, 0, 8192, 12288, - 14336, 14848, 14976, 0, 8192, 12288, 14336, 14848, - 14976, 0, 8192, 12288, 14336, 14848, 14976, 14978, - 0, 8192, 12288, 14336, 14848, 14976, 0, 8192, - 12288, 14336, 14848, 14976, 14980, 0, 8192, 12288, - 14336, 14848, 14976, 14980, 0, 8192, 12288, 14336, - 14848, 14976, 14984, 14982, 0, 8192, 12288, 14336, - 14848, 14976, 0, 8192, 12288, 14336, 14848, 14976, - 14984, 0, 8192, 12288, 14336, 14848, 14976, 14984, - 0, 8192, 12288, 14336, 14848, 14976, 14984, 14986, - 0, 8192, 12288, 14336, 14848, 14976, 14984, 0, - 8192, 12288, 14336, 14848, 14976, 14992, 14988, 0, - 8192, 12288, 14336, 14848, 14976, 14992, 14988, 0, - 8192, 12288, 14336, 14848, 14976, 14992, 14993, 14990, - 0, 8192, 12288, 14336, 14848, 14976, 0, 8192, - 12288, 14336, 14848, 14976, 14992, 0, 8192, 12288, - 14336, 14848, 14976, 14992, 0, 8192, 12288, 14336, - 14848, 14976, 14992, 14994, 0, 8192, 12288, 14336, - 14848, 14976, 14992, 0, 8192, 12288, 14336, 14848, - 14976, 14992, 14996, 0, 8192, 12288, 14336, 14848, - 14976, 14992, 14996, 0, 8192, 12288, 14336, 14848, - 14976, 14992, 15000, 14998, 0, 8192, 12288, 14336, - 14848, 14976, 14992, 0, 8192, 12288, 14336, 14848, - 14976, 15008, 15000, 0, 8192, 12288, 14336, 14848, - 14976, 15008, 15000, 0, 8192, 12288, 14336, 14848, - 14976, 15008, 15000, 15002, 0, 8192, 12288, 14336, - 14848, 14976, 15008, 15000, 0, 8192, 12288, 14336, - 14848, 14976, 15008, 15009, 15004, 0, 8192, 12288, - 14336, 14848, 14976, 15008, 15009, 15004, 0, 8192, - 12288, 14336, 14848, 14976, 15008, 15009, 15004, 15006, - 0, 8192, 12288, 14336, 14848, 14976, 0, 8192, - 12288, 14336, 14848, 14976, 15008, 0, 8192, 12288, - 14336, 14848, 14976, 15008, 0, 8192, 12288, 14336, - 14848, 14976, 15008, 15010, 0, 8192, 12288, 14336, - 14848, 14976, 15008, 0, 8192, 12288, 14336, 14848, - 14976, 15008, 15012, 0, 8192, 12288, 14336, 14848, - 14976, 15008, 15012, 0, 8192, 12288, 14336, 14848, - 14976, 15008, 15016, 15014, 0, 8192, 12288, 14336, - 14848, 14976, 15008, 0, 8192, 12288, 14336, 14848, - 14976, 15008, 15016, 0, 8192, 12288, 14336, 14848, - 14976, 15008, 15016, 0, 8192, 12288, 14336, 14848, - 14976, 15008, 15016, 15018, 0, 8192, 12288, 14336, - 14848, 14976, 15008, 15016, 0, 8192, 12288, 14336, - 14848, 14976, 15008, 15024, 15020, 0, 8192, 12288, - 14336, 14848, 14976, 15008, 15024, 15020, 0, 8192, - 12288, 14336, 14848, 14976, 15008, 15024, 15025, 15022, - 0, 8192, 12288, 14336, 14848, 14976, 15008, 0, - 8192, 12288, 14336, 14848, 14976, 15040, 15024, 0, - 8192, 12288, 14336, 14848, 14976, 15040, 15024, 0, - 8192, 12288, 14336, 14848, 14976, 15040, 15024, 15026, - 0, 8192, 12288, 14336, 14848, 14976, 15040, 15024, - 0, 8192, 12288, 14336, 14848, 14976, 15040, 15024, - 15028, 0, 8192, 12288, 14336, 14848, 14976, 15040, - 15024, 15028, 0, 8192, 12288, 14336, 14848, 14976, - 15040, 15024, 15032, 15030, 0, 8192, 12288, 14336, - 14848, 14976, 15040, 15024, 0, 8192, 12288, 14336, - 14848, 14976, 15040, 15041, 15032, 0, 8192, 12288, - 14336, 14848, 14976, 15040, 15041, 15032, 0, 8192, - 12288, 14336, 14848, 14976, 15040, 15041, 15032, 15034, - 0, 8192, 12288, 14336, 14848, 14976, 15040, 15041, - 15032, 0, 8192, 12288, 14336, 14848, 14976, 15040, - 15041, 15032, 15036, 0, 8192, 12288, 14336, 14848, - 14976, 15040, 15041, 15043, 15036, 0, 8192, 12288, - 14336, 14848, 14976, 15040, 15041, 15043, 15036, 15038, - 0, 8192, 12288, 14336, 14848, 14976, 0, 8192, - 12288, 14336, 14848, 15104, 15040, 0, 8192, 12288, - 14336, 14848, 15104, 15040, 0, 8192, 12288, 14336, - 14848, 15104, 15040, 15042, 0, 8192, 12288, 14336, - 14848, 15104, 15040, 0, 8192, 12288, 14336, 14848, - 15104, 15040, 15044, 0, 8192, 12288, 14336, 14848, - 15104, 15040, 15044, 0, 8192, 12288, 14336, 14848, - 15104, 15040, 15048, 15046, 0, 8192, 12288, 14336, - 14848, 15104, 15040, 0, 8192, 12288, 14336, 14848, - 15104, 15040, 15048, 0, 8192, 12288, 14336, 14848, - 15104, 15040, 15048, 0, 8192, 12288, 14336, 14848, - 15104, 15040, 15048, 15050, 0, 8192, 12288, 14336, - 14848, 15104, 15040, 15048, 0, 8192, 12288, 14336, - 14848, 15104, 15040, 15056, 15052, 0, 8192, 12288, - 14336, 14848, 15104, 15040, 15056, 15052, 0, 8192, - 12288, 14336, 14848, 15104, 15040, 15056, 15057, 15054, - 0, 8192, 12288, 14336, 14848, 15104, 15040, 0, - 8192, 12288, 14336, 14848, 15104, 15040, 15056, 0, - 8192, 12288, 14336, 14848, 15104, 15040, 15056, 0, - 8192, 12288, 14336, 14848, 15104, 15040, 15056, 15058, - 0, 8192, 12288, 14336, 14848, 15104, 15040, 15056, - 0, 8192, 12288, 14336, 14848, 15104, 15040, 15056, - 15060, 0, 8192, 12288, 14336, 14848, 15104, 15040, - 15056, 15060, 0, 8192, 12288, 14336, 14848, 15104, - 15040, 15056, 15064, 15062, 0, 8192, 12288, 14336, - 14848, 15104, 15040, 15056, 0, 8192, 12288, 14336, - 14848, 15104, 15040, 15072, 15064, 0, 8192, 12288, - 14336, 14848, 15104, 15040, 15072, 15064, 0, 8192, - 12288, 14336, 14848, 15104, 15040, 15072, 15064, 15066, - 0, 8192, 12288, 14336, 14848, 15104, 15040, 15072, - 15064, 0, 8192, 12288, 14336, 14848, 15104, 15040, - 15072, 15073, 15068, 0, 8192, 12288, 14336, 14848, - 15104, 15040, 15072, 15073, 15068, 0, 8192, 12288, - 14336, 14848, 15104, 15040, 15072, 15073, 15068, 15070, - 0, 8192, 12288, 14336, 14848, 15104, 15040, 0, - 8192, 12288, 14336, 14848, 15104, 15105, 15072, 0, - 8192, 12288, 14336, 14848, 15104, 15105, 15072, 0, - 8192, 12288, 14336, 14848, 15104, 15105, 15072, 15074, - 0, 8192, 12288, 14336, 14848, 15104, 15105, 15072, - 0, 8192, 12288, 14336, 14848, 15104, 15105, 15072, - 15076, 0, 8192, 12288, 14336, 14848, 15104, 15105, - 15072, 15076, 0, 8192, 12288, 14336, 14848, 15104, - 15105, 15072, 15080, 15078, 0, 8192, 12288, 14336, - 14848, 15104, 15105, 15072, 0, 8192, 12288, 14336, - 14848, 15104, 15105, 15072, 15080, 0, 8192, 12288, - 14336, 14848, 15104, 15105, 15072, 15080, 0, 8192, - 12288, 14336, 14848, 15104, 15105, 15072, 15080, 15082, - 0, 8192, 12288, 14336, 14848, 15104, 15105, 15072, - 15080, 0, 8192, 12288, 14336, 14848, 15104, 15105, - 15072, 15088, 15084, 0, 8192, 12288, 14336, 14848, - 15104, 15105, 15072, 15088, 15084, 0, 8192, 12288, - 14336, 14848, 15104, 15105, 15072, 15088, 15089, 15086, - 0, 8192, 12288, 14336, 14848, 15104, 15105, 15072, - 0, 8192, 12288, 14336, 14848, 15104, 15105, 15072, - 15088, 0, 8192, 12288, 14336, 14848, 15104, 15105, - 15107, 15088, 0, 8192, 12288, 14336, 14848, 15104, - 15105, 15107, 15088, 15090, 0, 8192, 12288, 14336, - 14848, 15104, 15105, 15107, 15088, 0, 8192, 12288, - 14336, 14848, 15104, 15105, 15107, 15088, 15092, 0, - 8192, 12288, 14336, 14848, 15104, 15105, 15107, 15088, - 15092, 0, 8192, 12288, 14336, 14848, 15104, 15105, - 15107, 15088, 15096, 15094, 0, 8192, 12288, 14336, - 14848, 15104, 15105, 15107, 15088, 0, 8192, 12288, - 14336, 14848, 15104, 15105, 15107, 15088, 15096, 0, - 8192, 12288, 14336, 14848, 15104, 15105, 15107, 15088, - 15096, 0, 8192, 12288, 14336, 14848, 15104, 15105, - 15107, 15088, 15096, 15098, 0, 8192, 12288, 14336, - 14848, 15104, 15105, 15107, 15111, 15096, 0, 8192, - 12288, 14336, 14848, 15104, 15105, 15107, 15111, 15096, - 15100, 0, 8192, 12288, 14336, 14848, 15104, 15105, - 15107, 15111, 15096, 15100, 0, 8192, 12288, 14336, - 14848, 15104, 15105, 15107, 15111, 15096, 15100, 15102, - 0, 8192, 12288, 14336, 14848, 0, 8192, 12288, - 14336, 15360, 15104, 0, 8192, 12288, 14336, 15360, - 15104, 0, 8192, 12288, 14336, 15360, 15104, 15106, - 0, 8192, 12288, 14336, 15360, 15104, 0, 8192, - 12288, 14336, 15360, 15104, 15108, 0, 8192, 12288, - 14336, 15360, 15104, 15108, 0, 8192, 12288, 14336, - 15360, 15104, 15112, 15110, 0, 8192, 12288, 14336, - 15360, 15104, 0, 8192, 12288, 14336, 15360, 15104, - 15112, 0, 8192, 12288, 14336, 15360, 15104, 15112, - 0, 8192, 12288, 14336, 15360, 15104, 15112, 15114, - 0, 8192, 12288, 14336, 15360, 15104, 15112, 0, - 8192, 12288, 14336, 15360, 15104, 15120, 15116, 0, - 8192, 12288, 14336, 15360, 15104, 15120, 15116, 0, - 8192, 12288, 14336, 15360, 15104, 15120, 15121, 15118, - 0, 8192, 12288, 14336, 15360, 15104, 0, 8192, - 12288, 14336, 15360, 15104, 15120, 0, 8192, 12288, - 14336, 15360, 15104, 15120, 0, 8192, 12288, 14336, - 15360, 15104, 15120, 15122, 0, 8192, 12288, 14336, - 15360, 15104, 15120, 0, 8192, 12288, 14336, 15360, - 15104, 15120, 15124, 0, 8192, 12288, 14336, 15360, - 15104, 15120, 15124, 0, 8192, 12288, 14336, 15360, - 15104, 15120, 15128, 15126, 0, 8192, 12288, 14336, - 15360, 15104, 15120, 0, 8192, 12288, 14336, 15360, - 15104, 15136, 15128, 0, 8192, 12288, 14336, 15360, - 15104, 15136, 15128, 0, 8192, 12288, 14336, 15360, - 15104, 15136, 15128, 15130, 0, 8192, 12288, 14336, - 15360, 15104, 15136, 15128, 0, 8192, 12288, 14336, - 15360, 15104, 15136, 15137, 15132, 0, 8192, 12288, - 14336, 15360, 15104, 15136, 15137, 15132, 0, 8192, - 12288, 14336, 15360, 15104, 15136, 15137, 15132, 15134, - 0, 8192, 12288, 14336, 15360, 15104, 0, 8192, - 12288, 14336, 15360, 15104, 15136, 0, 8192, 12288, - 14336, 15360, 15104, 15136, 0, 8192, 12288, 14336, - 15360, 15104, 15136, 15138, 0, 8192, 12288, 14336, - 15360, 15104, 15136, 0, 8192, 12288, 14336, 15360, - 15104, 15136, 15140, 0, 8192, 12288, 14336, 15360, - 15104, 15136, 15140, 0, 8192, 12288, 14336, 15360, - 15104, 15136, 15144, 15142, 0, 8192, 12288, 14336, - 15360, 15104, 15136, 0, 8192, 12288, 14336, 15360, - 15104, 15136, 15144, 0, 8192, 12288, 14336, 15360, - 15104, 15136, 15144, 0, 8192, 12288, 14336, 15360, - 15104, 15136, 15144, 15146, 0, 8192, 12288, 14336, - 15360, 15104, 15136, 15144, 0, 8192, 12288, 14336, - 15360, 15104, 15136, 15152, 15148, 0, 8192, 12288, - 14336, 15360, 15104, 15136, 15152, 15148, 0, 8192, - 12288, 14336, 15360, 15104, 15136, 15152, 15153, 15150, - 0, 8192, 12288, 14336, 15360, 15104, 15136, 0, - 8192, 12288, 14336, 15360, 15104, 15168, 15152, 0, - 8192, 12288, 14336, 15360, 15104, 15168, 15152, 0, - 8192, 12288, 14336, 15360, 15104, 15168, 15152, 15154, - 0, 8192, 12288, 14336, 15360, 15104, 15168, 15152, - 0, 8192, 12288, 14336, 15360, 15104, 15168, 15152, - 15156, 0, 8192, 12288, 14336, 15360, 15104, 15168, - 15152, 15156, 0, 8192, 12288, 14336, 15360, 15104, - 15168, 15152, 15160, 15158, 0, 8192, 12288, 14336, - 15360, 15104, 15168, 15152, 0, 8192, 12288, 14336, - 15360, 15104, 15168, 15169, 15160, 0, 8192, 12288, - 14336, 15360, 15104, 15168, 15169, 15160, 0, 8192, - 12288, 14336, 15360, 15104, 15168, 15169, 15160, 15162, - 0, 8192, 12288, 14336, 15360, 15104, 15168, 15169, - 15160, 0, 8192, 12288, 14336, 15360, 15104, 15168, - 15169, 15160, 15164, 0, 8192, 12288, 14336, 15360, - 15104, 15168, 15169, 15171, 15164, 0, 8192, 12288, - 14336, 15360, 15104, 15168, 15169, 15171, 15164, 15166, - 0, 8192, 12288, 14336, 15360, 15104, 0, 8192, - 12288, 14336, 15360, 15104, 15168, 0, 8192, 12288, - 14336, 15360, 15104, 15168, 0, 8192, 12288, 14336, - 15360, 15104, 15168, 15170, 0, 8192, 12288, 14336, - 15360, 15104, 15168, 0, 8192, 12288, 14336, 15360, - 15104, 15168, 15172, 0, 8192, 12288, 14336, 15360, - 15104, 15168, 15172, 0, 8192, 12288, 14336, 15360, - 15104, 15168, 15176, 15174, 0, 8192, 12288, 14336, - 15360, 15104, 15168, 0, 8192, 12288, 14336, 15360, - 15104, 15168, 15176, 0, 8192, 12288, 14336, 15360, - 15104, 15168, 15176, 0, 8192, 12288, 14336, 15360, - 15104, 15168, 15176, 15178, 0, 8192, 12288, 14336, - 15360, 15104, 15168, 15176, 0, 8192, 12288, 14336, - 15360, 15104, 15168, 15184, 15180, 0, 8192, 12288, - 14336, 15360, 15104, 15168, 15184, 15180, 0, 8192, - 12288, 14336, 15360, 15104, 15168, 15184, 15185, 15182, - 0, 8192, 12288, 14336, 15360, 15104, 15168, 0, - 8192, 12288, 14336, 15360, 15104, 15168, 15184, 0, - 8192, 12288, 14336, 15360, 15104, 15168, 15184, 0, - 8192, 12288, 14336, 15360, 15104, 15168, 15184, 15186, - 0, 8192, 12288, 14336, 15360, 15104, 15168, 15184, - 0, 8192, 12288, 14336, 15360, 15104, 15168, 15184, - 15188, 0, 8192, 12288, 14336, 15360, 15104, 15168, - 15184, 15188, 0, 8192, 12288, 14336, 15360, 15104, - 15168, 15184, 15192, 15190, 0, 8192, 12288, 14336, - 15360, 15104, 15168, 15184, 0, 8192, 12288, 14336, - 15360, 15104, 15168, 15200, 15192, 0, 8192, 12288, - 14336, 15360, 15104, 15168, 15200, 15192, 0, 8192, - 12288, 14336, 15360, 15104, 15168, 15200, 15192, 15194, - 0, 8192, 12288, 14336, 15360, 15104, 15168, 15200, - 15192, 0, 8192, 12288, 14336, 15360, 15104, 15168, - 15200, 15201, 15196, 0, 8192, 12288, 14336, 15360, - 15104, 15168, 15200, 15201, 15196, 0, 8192, 12288, - 14336, 15360, 15104, 15168, 15200, 15201, 15196, 15198, - 0, 8192, 12288, 14336, 15360, 15104, 15168, 0, - 8192, 12288, 14336, 15360, 15104, 15232, 15200, 0, - 8192, 12288, 14336, 15360, 15104, 15232, 15200, 0, - 8192, 12288, 14336, 15360, 15104, 15232, 15200, 15202, - 0, 8192, 12288, 14336, 15360, 15104, 15232, 15200, - 0, 8192, 12288, 14336, 15360, 15104, 15232, 15200, - 15204, 0, 8192, 12288, 14336, 15360, 15104, 15232, - 15200, 15204, 0, 8192, 12288, 14336, 15360, 15104, - 15232, 15200, 15208, 15206, 0, 8192, 12288, 14336, - 15360, 15104, 15232, 15200, 0, 8192, 12288, 14336, - 15360, 15104, 15232, 15200, 15208, 0, 8192, 12288, - 14336, 15360, 15104, 15232, 15200, 15208, 0, 8192, - 12288, 14336, 15360, 15104, 15232, 15200, 15208, 15210, - 0, 8192, 12288, 14336, 15360, 15104, 15232, 15200, - 15208, 0, 8192, 12288, 14336, 15360, 15104, 15232, - 15200, 15216, 15212, 0, 8192, 12288, 14336, 15360, - 15104, 15232, 15200, 15216, 15212, 0, 8192, 12288, - 14336, 15360, 15104, 15232, 15200, 15216, 15217, 15214, - 0, 8192, 12288, 14336, 15360, 15104, 15232, 15200, - 0, 8192, 12288, 14336, 15360, 15104, 15232, 15233, - 15216, 0, 8192, 12288, 14336, 15360, 15104, 15232, - 15233, 15216, 0, 8192, 12288, 14336, 15360, 15104, - 15232, 15233, 15216, 15218, 0, 8192, 12288, 14336, - 15360, 15104, 15232, 15233, 15216, 0, 8192, 12288, - 14336, 15360, 15104, 15232, 15233, 15216, 15220, 0, - 8192, 12288, 14336, 15360, 15104, 15232, 15233, 15216, - 15220, 0, 8192, 12288, 14336, 15360, 15104, 15232, - 15233, 15216, 15224, 15222, 0, 8192, 12288, 14336, - 15360, 15104, 15232, 15233, 15216, 0, 8192, 12288, - 14336, 15360, 15104, 15232, 15233, 15216, 15224, 0, - 8192, 12288, 14336, 15360, 15104, 15232, 15233, 15235, - 15224, 0, 8192, 12288, 14336, 15360, 15104, 15232, - 15233, 15235, 15224, 15226, 0, 8192, 12288, 14336, - 15360, 15104, 15232, 15233, 15235, 15224, 0, 8192, - 12288, 14336, 15360, 15104, 15232, 15233, 15235, 15224, - 15228, 0, 8192, 12288, 14336, 15360, 15104, 15232, - 15233, 15235, 15224, 15228, 0, 8192, 12288, 14336, - 15360, 15104, 15232, 15233, 15235, 15224, 15228, 15230, - 0, 8192, 12288, 14336, 15360, 15104, 0, 8192, - 12288, 14336, 15360, 15104, 15232, 0, 8192, 12288, - 14336, 15360, 15361, 15232, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 15234, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 0, 8192, 12288, 14336, 15360, - 15361, 15232, 15236, 0, 8192, 12288, 14336, 15360, - 15361, 15232, 15236, 0, 8192, 12288, 14336, 15360, - 15361, 15232, 15240, 15238, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 0, 8192, 12288, 14336, 15360, - 15361, 15232, 15240, 0, 8192, 12288, 14336, 15360, - 15361, 15232, 15240, 0, 8192, 12288, 14336, 15360, - 15361, 15232, 15240, 15242, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 15240, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 15248, 15244, 0, 8192, 12288, - 14336, 15360, 15361, 15232, 15248, 15244, 0, 8192, - 12288, 14336, 15360, 15361, 15232, 15248, 15249, 15246, - 0, 8192, 12288, 14336, 15360, 15361, 15232, 0, - 8192, 12288, 14336, 15360, 15361, 15232, 15248, 0, - 8192, 12288, 14336, 15360, 15361, 15232, 15248, 0, - 8192, 12288, 14336, 15360, 15361, 15232, 15248, 15250, - 0, 8192, 12288, 14336, 15360, 15361, 15232, 15248, - 0, 8192, 12288, 14336, 15360, 15361, 15232, 15248, - 15252, 0, 8192, 12288, 14336, 15360, 15361, 15232, - 15248, 15252, 0, 8192, 12288, 14336, 15360, 15361, - 15232, 15248, 15256, 15254, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 15248, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 15264, 15256, 0, 8192, 12288, - 14336, 15360, 15361, 15232, 15264, 15256, 0, 8192, - 12288, 14336, 15360, 15361, 15232, 15264, 15256, 15258, - 0, 8192, 12288, 14336, 15360, 15361, 15232, 15264, - 15256, 0, 8192, 12288, 14336, 15360, 15361, 15232, - 15264, 15265, 15260, 0, 8192, 12288, 14336, 15360, - 15361, 15232, 15264, 15265, 15260, 0, 8192, 12288, - 14336, 15360, 15361, 15232, 15264, 15265, 15260, 15262, - 0, 8192, 12288, 14336, 15360, 15361, 15232, 0, - 8192, 12288, 14336, 15360, 15361, 15232, 15264, 0, - 8192, 12288, 14336, 15360, 15361, 15232, 15264, 0, - 8192, 12288, 14336, 15360, 15361, 15232, 15264, 15266, - 0, 8192, 12288, 14336, 15360, 15361, 15232, 15264, - 0, 8192, 12288, 14336, 15360, 15361, 15232, 15264, - 15268, 0, 8192, 12288, 14336, 15360, 15361, 15232, - 15264, 15268, 0, 8192, 12288, 14336, 15360, 15361, - 15232, 15264, 15272, 15270, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 15264, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 15264, 15272, 0, 8192, 12288, - 14336, 15360, 15361, 15232, 15264, 15272, 0, 8192, - 12288, 14336, 15360, 15361, 15232, 15264, 15272, 15274, - 0, 8192, 12288, 14336, 15360, 15361, 15232, 15264, - 15272, 0, 8192, 12288, 14336, 15360, 15361, 15232, - 15264, 15280, 15276, 0, 8192, 12288, 14336, 15360, - 15361, 15232, 15264, 15280, 15276, 0, 8192, 12288, - 14336, 15360, 15361, 15232, 15264, 15280, 15281, 15278, - 0, 8192, 12288, 14336, 15360, 15361, 15232, 15264, - 0, 8192, 12288, 14336, 15360, 15361, 15232, 15296, - 15280, 0, 8192, 12288, 14336, 15360, 15361, 15232, - 15296, 15280, 0, 8192, 12288, 14336, 15360, 15361, - 15232, 15296, 15280, 15282, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 15296, 15280, 0, 8192, 12288, - 14336, 15360, 15361, 15232, 15296, 15280, 15284, 0, - 8192, 12288, 14336, 15360, 15361, 15232, 15296, 15280, - 15284, 0, 8192, 12288, 14336, 15360, 15361, 15232, - 15296, 15280, 15288, 15286, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 15296, 15280, 0, 8192, 12288, - 14336, 15360, 15361, 15232, 15296, 15297, 15288, 0, - 8192, 12288, 14336, 15360, 15361, 15232, 15296, 15297, - 15288, 0, 8192, 12288, 14336, 15360, 15361, 15232, - 15296, 15297, 15288, 15290, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 15296, 15297, 15288, 0, 8192, - 12288, 14336, 15360, 15361, 15232, 15296, 15297, 15288, - 15292, 0, 8192, 12288, 14336, 15360, 15361, 15232, - 15296, 15297, 15299, 15292, 0, 8192, 12288, 14336, - 15360, 15361, 15232, 15296, 15297, 15299, 15292, 15294, - 0, 8192, 12288, 14336, 15360, 15361, 15232, 0, - 8192, 12288, 14336, 15360, 15361, 15232, 15296, 0, - 8192, 12288, 14336, 15360, 15361, 15232, 15296, 0, - 8192, 12288, 14336, 15360, 15361, 15232, 15296, 15298, - 0, 8192, 12288, 14336, 15360, 15361, 15363, 15296, - 0, 8192, 12288, 14336, 15360, 15361, 15363, 15296, - 15300, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15296, 15300, 0, 8192, 12288, 14336, 15360, 15361, - 15363, 15296, 15304, 15302, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15296, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15296, 15304, 0, 8192, 12288, - 14336, 15360, 15361, 15363, 15296, 15304, 0, 8192, - 12288, 14336, 15360, 15361, 15363, 15296, 15304, 15306, - 0, 8192, 12288, 14336, 15360, 15361, 15363, 15296, - 15304, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15296, 15312, 15308, 0, 8192, 12288, 14336, 15360, - 15361, 15363, 15296, 15312, 15308, 0, 8192, 12288, - 14336, 15360, 15361, 15363, 15296, 15312, 15313, 15310, - 0, 8192, 12288, 14336, 15360, 15361, 15363, 15296, - 0, 8192, 12288, 14336, 15360, 15361, 15363, 15296, - 15312, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15296, 15312, 0, 8192, 12288, 14336, 15360, 15361, - 15363, 15296, 15312, 15314, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15296, 15312, 0, 8192, 12288, - 14336, 15360, 15361, 15363, 15296, 15312, 15316, 0, - 8192, 12288, 14336, 15360, 15361, 15363, 15296, 15312, - 15316, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15296, 15312, 15320, 15318, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15296, 15312, 0, 8192, 12288, - 14336, 15360, 15361, 15363, 15296, 15328, 15320, 0, - 8192, 12288, 14336, 15360, 15361, 15363, 15296, 15328, - 15320, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15296, 15328, 15320, 15322, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15296, 15328, 15320, 0, 8192, - 12288, 14336, 15360, 15361, 15363, 15296, 15328, 15329, - 15324, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15296, 15328, 15329, 15324, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15296, 15328, 15329, 15324, 15326, - 0, 8192, 12288, 14336, 15360, 15361, 15363, 15296, - 0, 8192, 12288, 14336, 15360, 15361, 15363, 15296, - 15328, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15296, 15328, 0, 8192, 12288, 14336, 15360, 15361, - 15363, 15296, 15328, 15330, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15296, 15328, 0, 8192, 12288, - 14336, 15360, 15361, 15363, 15296, 15328, 15332, 0, - 8192, 12288, 14336, 15360, 15361, 15363, 15296, 15328, - 15332, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15296, 15328, 15336, 15334, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15367, 15328, 0, 8192, 12288, - 14336, 15360, 15361, 15363, 15367, 15328, 15336, 0, - 8192, 12288, 14336, 15360, 15361, 15363, 15367, 15328, - 15336, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15367, 15328, 15336, 15338, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15367, 15328, 15336, 0, 8192, - 12288, 14336, 15360, 15361, 15363, 15367, 15328, 15344, - 15340, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15367, 15328, 15344, 15340, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15367, 15328, 15344, 15345, 15342, - 0, 8192, 12288, 14336, 15360, 15361, 15363, 15367, - 15328, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15367, 15328, 15344, 0, 8192, 12288, 14336, 15360, - 15361, 15363, 15367, 15328, 15344, 0, 8192, 12288, - 14336, 15360, 15361, 15363, 15367, 15328, 15344, 15346, - 0, 8192, 12288, 14336, 15360, 15361, 15363, 15367, - 15328, 15344, 0, 8192, 12288, 14336, 15360, 15361, - 15363, 15367, 15328, 15344, 15348, 0, 8192, 12288, - 14336, 15360, 15361, 15363, 15367, 15328, 15344, 15348, - 0, 8192, 12288, 14336, 15360, 15361, 15363, 15367, - 15328, 15344, 15352, 15350, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15367, 15328, 15344, 0, 8192, - 12288, 14336, 15360, 15361, 15363, 15367, 15328, 15344, - 15352, 0, 8192, 12288, 14336, 15360, 15361, 15363, - 15367, 15328, 15344, 15352, 0, 8192, 12288, 14336, - 15360, 15361, 15363, 15367, 15328, 15344, 15352, 15354, - 0, 8192, 12288, 14336, 15360, 15361, 15363, 15367, - 15328, 15344, 15352, 0, 8192, 12288, 14336, 15360, - 15361, 15363, 15367, 15328, 15344, 15352, 15356, 0, - 8192, 12288, 14336, 15360, 15361, 15363, 15367, 15328, - 15344, 15352, 15356, 0, 8192, 12288, 14336, 15360, - 15361, 15363, 15367, 15328, 15344, 15352, 15356, 15358, - 0, 8192, 12288, 14336, 0, 8192, 12288, 14336, - 15360, 0, 8192, 12288, 14336, 15360, 0, 8192, - 12288, 14336, 15360, 15362, 0, 8192, 12288, 14336, - 15360, 0, 16384, 12288, 14336, 15360, 15364, 0, - 16384, 12288, 14336, 15360, 15364, 0, 16384, 12288, - 14336, 15360, 15368, 15366, 0, 16384, 12288, 14336, - 15360, 0, 16384, 12288, 14336, 15360, 15368, 0, - 16384, 12288, 14336, 15360, 15368, 0, 16384, 12288, - 14336, 15360, 15368, 15370, 0, 16384, 12288, 14336, - 15360, 15368, 0, 16384, 12288, 14336, 15360, 15376, - 15372, 0, 16384, 12288, 14336, 15360, 15376, 15372, - 0, 16384, 12288, 14336, 15360, 15376, 15377, 15374, - 0, 16384, 12288, 14336, 15360, 0, 16384, 12288, - 14336, 15360, 15376, 0, 16384, 12288, 14336, 15360, - 15376, 0, 16384, 12288, 14336, 15360, 15376, 15378, - 0, 16384, 12288, 14336, 15360, 15376, 0, 16384, - 12288, 14336, 15360, 15376, 15380, 0, 16384, 12288, - 14336, 15360, 15376, 15380, 0, 16384, 12288, 14336, - 15360, 15376, 15384, 15382, 0, 16384, 12288, 14336, - 15360, 15376, 0, 16384, 12288, 14336, 15360, 15392, - 15384, 0, 16384, 12288, 14336, 15360, 15392, 15384, - 0, 16384, 12288, 14336, 15360, 15392, 15384, 15386, - 0, 16384, 12288, 14336, 15360, 15392, 15384, 0, - 16384, 12288, 14336, 15360, 15392, 15393, 15388, 0, - 16384, 12288, 14336, 15360, 15392, 15393, 15388, 0, - 16384, 12288, 14336, 15360, 15392, 15393, 15388, 15390, - 0, 16384, 12288, 14336, 15360, 0, 16384, 12288, - 14336, 15360, 15392, 0, 16384, 12288, 14336, 15360, - 15392, 0, 16384, 12288, 14336, 15360, 15392, 15394, - 0, 16384, 12288, 14336, 15360, 15392, 0, 16384, - 12288, 14336, 15360, 15392, 15396, 0, 16384, 12288, - 14336, 15360, 15392, 15396, 0, 16384, 12288, 14336, - 15360, 15392, 15400, 15398, 0, 16384, 12288, 14336, - 15360, 15392, 0, 16384, 12288, 14336, 15360, 15392, - 15400, 0, 16384, 12288, 14336, 15360, 15392, 15400, - 0, 16384, 12288, 14336, 15360, 15392, 15400, 15402, - 0, 16384, 12288, 14336, 15360, 15392, 15400, 0, - 16384, 12288, 14336, 15360, 15392, 15408, 15404, 0, - 16384, 12288, 14336, 15360, 15392, 15408, 15404, 0, - 16384, 12288, 14336, 15360, 15392, 15408, 15409, 15406, - 0, 16384, 12288, 14336, 15360, 15392, 0, 16384, - 12288, 14336, 15360, 15424, 15408, 0, 16384, 12288, - 14336, 15360, 15424, 15408, 0, 16384, 12288, 14336, - 15360, 15424, 15408, 15410, 0, 16384, 12288, 14336, - 15360, 15424, 15408, 0, 16384, 12288, 14336, 15360, - 15424, 15408, 15412, 0, 16384, 12288, 14336, 15360, - 15424, 15408, 15412, 0, 16384, 12288, 14336, 15360, - 15424, 15408, 15416, 15414, 0, 16384, 12288, 14336, - 15360, 15424, 15408, 0, 16384, 12288, 14336, 15360, - 15424, 15425, 15416, 0, 16384, 12288, 14336, 15360, - 15424, 15425, 15416, 0, 16384, 12288, 14336, 15360, - 15424, 15425, 15416, 15418, 0, 16384, 12288, 14336, - 15360, 15424, 15425, 15416, 0, 16384, 12288, 14336, - 15360, 15424, 15425, 15416, 15420, 0, 16384, 12288, - 14336, 15360, 15424, 15425, 15427, 15420, 0, 16384, - 12288, 14336, 15360, 15424, 15425, 15427, 15420, 15422, - 0, 16384, 12288, 14336, 15360, 0, 16384, 12288, - 14336, 15360, 15424, 0, 16384, 16385, 14336, 15360, - 15424, 0, 16384, 16385, 14336, 15360, 15424, 15426, - 0, 16384, 16385, 14336, 15360, 15424, 0, 16384, - 16385, 14336, 15360, 15424, 15428, 0, 16384, 16385, - 14336, 15360, 15424, 15428, 0, 16384, 16385, 14336, - 15360, 15424, 15432, 15430, 0, 16384, 16385, 14336, - 15360, 15424, 0, 16384, 16385, 14336, 15360, 15424, - 15432, 0, 16384, 16385, 14336, 15360, 15424, 15432, - 0, 16384, 16385, 14336, 15360, 15424, 15432, 15434, - 0, 16384, 16385, 14336, 15360, 15424, 15432, 0, - 16384, 16385, 14336, 15360, 15424, 15440, 15436, 0, - 16384, 16385, 14336, 15360, 15424, 15440, 15436, 0, - 16384, 16385, 14336, 15360, 15424, 15440, 15441, 15438, - 0, 16384, 16385, 14336, 15360, 15424, 0, 16384, - 16385, 14336, 15360, 15424, 15440, 0, 16384, 16385, - 14336, 15360, 15424, 15440, 0, 16384, 16385, 14336, - 15360, 15424, 15440, 15442, 0, 16384, 16385, 14336, - 15360, 15424, 15440, 0, 16384, 16385, 14336, 15360, - 15424, 15440, 15444, 0, 16384, 16385, 14336, 15360, - 15424, 15440, 15444, 0, 16384, 16385, 14336, 15360, - 15424, 15440, 15448, 15446, 0, 16384, 16385, 14336, - 15360, 15424, 15440, 0, 16384, 16385, 14336, 15360, - 15424, 15456, 15448, 0, 16384, 16385, 14336, 15360, - 15424, 15456, 15448, 0, 16384, 16385, 14336, 15360, - 15424, 15456, 15448, 15450, 0, 16384, 16385, 14336, - 15360, 15424, 15456, 15448, 0, 16384, 16385, 14336, - 15360, 15424, 15456, 15457, 15452, 0, 16384, 16385, - 14336, 15360, 15424, 15456, 15457, 15452, 0, 16384, - 16385, 14336, 15360, 15424, 15456, 15457, 15452, 15454, - 0, 16384, 16385, 14336, 15360, 15424, 0, 16384, - 16385, 14336, 15360, 15488, 15456, 0, 16384, 16385, - 14336, 15360, 15488, 15456, 0, 16384, 16385, 14336, - 15360, 15488, 15456, 15458, 0, 16384, 16385, 14336, - 15360, 15488, 15456, 0, 16384, 16385, 14336, 15360, - 15488, 15456, 15460, 0, 16384, 16385, 14336, 15360, - 15488, 15456, 15460, 0, 16384, 16385, 14336, 15360, - 15488, 15456, 15464, 15462, 0, 16384, 16385, 14336, - 15360, 15488, 15456, 0, 16384, 16385, 14336, 15360, - 15488, 15456, 15464, 0, 16384, 16385, 14336, 15360, - 15488, 15456, 15464, 0, 16384, 16385, 14336, 15360, - 15488, 15456, 15464, 15466, 0, 16384, 16385, 14336, - 15360, 15488, 15456, 15464, 0, 16384, 16385, 14336, - 15360, 15488, 15456, 15472, 15468, 0, 16384, 16385, - 14336, 15360, 15488, 15456, 15472, 15468, 0, 16384, - 16385, 14336, 15360, 15488, 15456, 15472, 15473, 15470, - 0, 16384, 16385, 14336, 15360, 15488, 15456, 0, - 16384, 16385, 14336, 15360, 15488, 15489, 15472, 0, - 16384, 16385, 14336, 15360, 15488, 15489, 15472, 0, - 16384, 16385, 14336, 15360, 15488, 15489, 15472, 15474, - 0, 16384, 16385, 14336, 15360, 15488, 15489, 15472, - 0, 16384, 16385, 14336, 15360, 15488, 15489, 15472, - 15476, 0, 16384, 16385, 14336, 15360, 15488, 15489, - 15472, 15476, 0, 16384, 16385, 14336, 15360, 15488, - 15489, 15472, 15480, 15478, 0, 16384, 16385, 14336, - 15360, 15488, 15489, 15472, 0, 16384, 16385, 14336, - 15360, 15488, 15489, 15472, 15480, 0, 16384, 16385, - 14336, 15360, 15488, 15489, 15491, 15480, 0, 16384, - 16385, 14336, 15360, 15488, 15489, 15491, 15480, 15482, - 0, 16384, 16385, 14336, 15360, 15488, 15489, 15491, - 15480, 0, 16384, 16385, 14336, 15360, 15488, 15489, - 15491, 15480, 15484, 0, 16384, 16385, 14336, 15360, - 15488, 15489, 15491, 15480, 15484, 0, 16384, 16385, - 14336, 15360, 15488, 15489, 15491, 15480, 15484, 15486, - 0, 16384, 16385, 14336, 15360, 0, 16384, 16385, - 14336, 15360, 15488, 0, 16384, 16385, 14336, 15360, - 15488, 0, 16384, 16385, 14336, 15360, 15488, 15490, - 0, 16384, 16385, 14336, 15360, 15488, 0, 16384, - 16385, 14336, 15360, 15488, 15492, 0, 16384, 16385, - 14336, 15360, 15488, 15492, 0, 16384, 16385, 14336, - 15360, 15488, 15496, 15494, 0, 16384, 16385, 14336, - 15360, 15488, 0, 16384, 16385, 14336, 15360, 15488, - 15496, 0, 16384, 16385, 14336, 15360, 15488, 15496, - 0, 16384, 16385, 14336, 15360, 15488, 15496, 15498, - 0, 16384, 16385, 14336, 15360, 15488, 15496, 0, - 16384, 16385, 14336, 15360, 15488, 15504, 15500, 0, - 16384, 16385, 14336, 15360, 15488, 15504, 15500, 0, - 16384, 16385, 14336, 15360, 15488, 15504, 15505, 15502, - 0, 16384, 16385, 14336, 15360, 15488, 0, 16384, - 16385, 14336, 15360, 15488, 15504, 0, 16384, 16385, - 14336, 15360, 15488, 15504, 0, 16384, 16385, 14336, - 15360, 15488, 15504, 15506, 0, 16384, 16385, 14336, - 15360, 15488, 15504, 0, 16384, 16385, 14336, 15360, - 15488, 15504, 15508, 0, 16384, 16385, 14336, 15360, - 15488, 15504, 15508, 0, 16384, 16385, 14336, 15360, - 15488, 15504, 15512, 15510, 0, 16384, 16385, 14336, - 15360, 15488, 15504, 0, 16384, 16385, 14336, 15360, - 15488, 15520, 15512, 0, 16384, 16385, 14336, 15360, - 15488, 15520, 15512, 0, 16384, 16385, 14336, 15360, - 15488, 15520, 15512, 15514, 0, 16384, 16385, 14336, - 15360, 15488, 15520, 15512, 0, 16384, 16385, 14336, - 15360, 15488, 15520, 15521, 15516, 0, 16384, 16385, - 14336, 15360, 15488, 15520, 15521, 15516, 0, 16384, - 16385, 14336, 15360, 15488, 15520, 15521, 15516, 15518, - 0, 16384, 16385, 14336, 15360, 15488, 0, 16384, - 16385, 14336, 15360, 15488, 15520, 0, 16384, 16385, - 14336, 15360, 15488, 15520, 0, 16384, 16385, 14336, - 15360, 15488, 15520, 15522, 0, 16384, 16385, 14336, - 15360, 15488, 15520, 0, 16384, 16385, 14336, 15360, - 15488, 15520, 15524, 0, 16384, 16385, 14336, 15360, - 15488, 15520, 15524, 0, 16384, 16385, 14336, 15360, - 15488, 15520, 15528, 15526, 0, 16384, 16385, 14336, - 15360, 15488, 15520, 0, 16384, 16385, 14336, 15360, - 15488, 15520, 15528, 0, 16384, 16385, 14336, 15360, - 15488, 15520, 15528, 0, 16384, 16385, 14336, 15360, - 15488, 15520, 15528, 15530, 0, 16384, 16385, 14336, - 15360, 15488, 15520, 15528, 0, 16384, 16385, 14336, - 15360, 15488, 15520, 15536, 15532, 0, 16384, 16385, - 14336, 15360, 15488, 15520, 15536, 15532, 0, 16384, - 16385, 14336, 15360, 15488, 15520, 15536, 15537, 15534, - 0, 16384, 16385, 14336, 15360, 15488, 15520, 0, - 16384, 16385, 14336, 15360, 15488, 15552, 15536, 0, - 16384, 16385, 14336, 15360, 15488, 15552, 15536, 0, - 16384, 16385, 14336, 15360, 15488, 15552, 15536, 15538, - 0, 16384, 16385, 14336, 15360, 15488, 15552, 15536, - 0, 16384, 16385, 14336, 15360, 15488, 15552, 15536, - 15540, 0, 16384, 16385, 14336, 15360, 15488, 15552, - 15536, 15540, 0, 16384, 16385, 14336, 15360, 15488, - 15552, 15536, 15544, 15542, 0, 16384, 16385, 14336, - 15360, 15488, 15552, 15536, 0, 16384, 16385, 14336, - 15360, 15488, 15552, 15553, 15544, 0, 16384, 16385, - 14336, 15360, 15488, 15552, 15553, 15544, 0, 16384, - 16385, 14336, 15360, 15488, 15552, 15553, 15544, 15546, - 0, 16384, 16385, 14336, 15360, 15488, 15552, 15553, - 15544, 0, 16384, 16385, 14336, 15360, 15488, 15552, - 15553, 15544, 15548, 0, 16384, 16385, 14336, 15360, - 15488, 15552, 15553, 15555, 15548, 0, 16384, 16385, - 14336, 15360, 15488, 15552, 15553, 15555, 15548, 15550, - 0, 16384, 16385, 14336, 15360, 15488, 0, 16384, - 16385, 14336, 15360, 15616, 15552, 0, 16384, 16385, - 14336, 15360, 15616, 15552, 0, 16384, 16385, 14336, - 15360, 15616, 15552, 15554, 0, 16384, 16385, 14336, - 15360, 15616, 15552, 0, 16384, 16385, 14336, 15360, - 15616, 15552, 15556, 0, 16384, 16385, 14336, 15360, - 15616, 15552, 15556, 0, 16384, 16385, 14336, 15360, - 15616, 15552, 15560, 15558, 0, 16384, 16385, 14336, - 15360, 15616, 15552, 0, 16384, 16385, 14336, 15360, - 15616, 15552, 15560, 0, 16384, 16385, 14336, 15360, - 15616, 15552, 15560, 0, 16384, 16385, 14336, 15360, - 15616, 15552, 15560, 15562, 0, 16384, 16385, 14336, - 15360, 15616, 15552, 15560, 0, 16384, 16385, 14336, - 15360, 15616, 15552, 15568, 15564, 0, 16384, 16385, - 14336, 15360, 15616, 15552, 15568, 15564, 0, 16384, - 16385, 14336, 15360, 15616, 15552, 15568, 15569, 15566, - 0, 16384, 16385, 14336, 15360, 15616, 15552, 0, - 16384, 16385, 14336, 15360, 15616, 15552, 15568, 0, - 16384, 16385, 14336, 15360, 15616, 15552, 15568, 0, - 16384, 16385, 14336, 15360, 15616, 15552, 15568, 15570, - 0, 16384, 16385, 14336, 15360, 15616, 15552, 15568, - 0, 16384, 16385, 14336, 15360, 15616, 15552, 15568, - 15572, 0, 16384, 16385, 14336, 15360, 15616, 15552, - 15568, 15572, 0, 16384, 16385, 14336, 15360, 15616, - 15552, 15568, 15576, 15574, 0, 16384, 16385, 14336, - 15360, 15616, 15552, 15568, 0, 16384, 16385, 14336, - 15360, 15616, 15552, 15584, 15576, 0, 16384, 16385, - 14336, 15360, 15616, 15552, 15584, 15576, 0, 16384, - 16385, 14336, 15360, 15616, 15552, 15584, 15576, 15578, - 0, 16384, 16385, 14336, 15360, 15616, 15552, 15584, - 15576, 0, 16384, 16385, 14336, 15360, 15616, 15552, - 15584, 15585, 15580, 0, 16384, 16385, 14336, 15360, - 15616, 15552, 15584, 15585, 15580, 0, 16384, 16385, - 14336, 15360, 15616, 15552, 15584, 15585, 15580, 15582, - 0, 16384, 16385, 14336, 15360, 15616, 15552, 0, - 16384, 16385, 14336, 15360, 15616, 15617, 15584, 0, - 16384, 16385, 14336, 15360, 15616, 15617, 15584, 0, - 16384, 16385, 14336, 15360, 15616, 15617, 15584, 15586, - 0, 16384, 16385, 14336, 15360, 15616, 15617, 15584, - 0, 16384, 16385, 14336, 15360, 15616, 15617, 15584, - 15588, 0, 16384, 16385, 14336, 15360, 15616, 15617, - 15584, 15588, 0, 16384, 16385, 14336, 15360, 15616, - 15617, 15584, 15592, 15590, 0, 16384, 16385, 14336, - 15360, 15616, 15617, 15584, 0, 16384, 16385, 14336, - 15360, 15616, 15617, 15584, 15592, 0, 16384, 16385, - 14336, 15360, 15616, 15617, 15584, 15592, 0, 16384, - 16385, 14336, 15360, 15616, 15617, 15584, 15592, 15594, - 0, 16384, 16385, 14336, 15360, 15616, 15617, 15584, - 15592, 0, 16384, 16385, 14336, 15360, 15616, 15617, - 15584, 15600, 15596, 0, 16384, 16385, 14336, 15360, - 15616, 15617, 15584, 15600, 15596, 0, 16384, 16385, - 14336, 15360, 15616, 15617, 15584, 15600, 15601, 15598, - 0, 16384, 16385, 14336, 15360, 15616, 15617, 15584, - 0, 16384, 16385, 14336, 15360, 15616, 15617, 15584, - 15600, 0, 16384, 16385, 14336, 15360, 15616, 15617, - 15619, 15600, 0, 16384, 16385, 14336, 15360, 15616, - 15617, 15619, 15600, 15602, 0, 16384, 16385, 14336, - 15360, 15616, 15617, 15619, 15600, 0, 16384, 16385, - 14336, 15360, 15616, 15617, 15619, 15600, 15604, 0, - 16384, 16385, 14336, 15360, 15616, 15617, 15619, 15600, - 15604, 0, 16384, 16385, 14336, 15360, 15616, 15617, - 15619, 15600, 15608, 15606, 0, 16384, 16385, 14336, - 15360, 15616, 15617, 15619, 15600, 0, 16384, 16385, - 14336, 15360, 15616, 15617, 15619, 15600, 15608, 0, - 16384, 16385, 14336, 15360, 15616, 15617, 15619, 15600, - 15608, 0, 16384, 16385, 14336, 15360, 15616, 15617, - 15619, 15600, 15608, 15610, 0, 16384, 16385, 14336, - 15360, 15616, 15617, 15619, 15623, 15608, 0, 16384, - 16385, 14336, 15360, 15616, 15617, 15619, 15623, 15608, - 15612, 0, 16384, 16385, 14336, 15360, 15616, 15617, - 15619, 15623, 15608, 15612, 0, 16384, 16385, 14336, - 15360, 15616, 15617, 15619, 15623, 15608, 15612, 15614, - 0, 16384, 16385, 14336, 15360, 0, 16384, 16385, - 14336, 15360, 15616, 0, 16384, 16385, 14336, 15360, - 15616, 0, 16384, 16385, 14336, 15360, 15616, 15618, - 0, 16384, 16385, 16387, 15360, 15616, 0, 16384, - 16385, 16387, 15360, 15616, 15620, 0, 16384, 16385, - 16387, 15360, 15616, 15620, 0, 16384, 16385, 16387, - 15360, 15616, 15624, 15622, 0, 16384, 16385, 16387, - 15360, 15616, 0, 16384, 16385, 16387, 15360, 15616, - 15624, 0, 16384, 16385, 16387, 15360, 15616, 15624, - 0, 16384, 16385, 16387, 15360, 15616, 15624, 15626, - 0, 16384, 16385, 16387, 15360, 15616, 15624, 0, - 16384, 16385, 16387, 15360, 15616, 15632, 15628, 0, - 16384, 16385, 16387, 15360, 15616, 15632, 15628, 0, - 16384, 16385, 16387, 15360, 15616, 15632, 15633, 15630, - 0, 16384, 16385, 16387, 15360, 15616, 0, 16384, - 16385, 16387, 15360, 15616, 15632, 0, 16384, 16385, - 16387, 15360, 15616, 15632, 0, 16384, 16385, 16387, - 15360, 15616, 15632, 15634, 0, 16384, 16385, 16387, - 15360, 15616, 15632, 0, 16384, 16385, 16387, 15360, - 15616, 15632, 15636, 0, 16384, 16385, 16387, 15360, - 15616, 15632, 15636, 0, 16384, 16385, 16387, 15360, - 15616, 15632, 15640, 15638, 0, 16384, 16385, 16387, - 15360, 15616, 15632, 0, 16384, 16385, 16387, 15360, - 15616, 15648, 15640, 0, 16384, 16385, 16387, 15360, - 15616, 15648, 15640, 0, 16384, 16385, 16387, 15360, - 15616, 15648, 15640, 15642, 0, 16384, 16385, 16387, - 15360, 15616, 15648, 15640, 0, 16384, 16385, 16387, - 15360, 15616, 15648, 15649, 15644, 0, 16384, 16385, - 16387, 15360, 15616, 15648, 15649, 15644, 0, 16384, - 16385, 16387, 15360, 15616, 15648, 15649, 15644, 15646, - 0, 16384, 16385, 16387, 15360, 15616, 0, 16384, - 16385, 16387, 15360, 15616, 15648, 0, 16384, 16385, - 16387, 15360, 15616, 15648, 0, 16384, 16385, 16387, - 15360, 15616, 15648, 15650, 0, 16384, 16385, 16387, - 15360, 15616, 15648, 0, 16384, 16385, 16387, 15360, - 15616, 15648, 15652, 0, 16384, 16385, 16387, 15360, - 15616, 15648, 15652, 0, 16384, 16385, 16387, 15360, - 15616, 15648, 15656, 15654, 0, 16384, 16385, 16387, - 15360, 15616, 15648, 0, 16384, 16385, 16387, 15360, - 15616, 15648, 15656, 0, 16384, 16385, 16387, 15360, - 15616, 15648, 15656, 0, 16384, 16385, 16387, 15360, - 15616, 15648, 15656, 15658, 0, 16384, 16385, 16387, - 15360, 15616, 15648, 15656, 0, 16384, 16385, 16387, - 15360, 15616, 15648, 15664, 15660, 0, 16384, 16385, - 16387, 15360, 15616, 15648, 15664, 15660, 0, 16384, - 16385, 16387, 15360, 15616, 15648, 15664, 15665, 15662, - 0, 16384, 16385, 16387, 15360, 15616, 15648, 0, - 16384, 16385, 16387, 15360, 15616, 15680, 15664, 0, - 16384, 16385, 16387, 15360, 15616, 15680, 15664, 0, - 16384, 16385, 16387, 15360, 15616, 15680, 15664, 15666, - 0, 16384, 16385, 16387, 15360, 15616, 15680, 15664, - 0, 16384, 16385, 16387, 15360, 15616, 15680, 15664, - 15668, 0, 16384, 16385, 16387, 15360, 15616, 15680, - 15664, 15668, 0, 16384, 16385, 16387, 15360, 15616, - 15680, 15664, 15672, 15670, 0, 16384, 16385, 16387, - 15360, 15616, 15680, 15664, 0, 16384, 16385, 16387, - 15360, 15616, 15680, 15681, 15672, 0, 16384, 16385, - 16387, 15360, 15616, 15680, 15681, 15672, 0, 16384, - 16385, 16387, 15360, 15616, 15680, 15681, 15672, 15674, - 0, 16384, 16385, 16387, 15360, 15616, 15680, 15681, - 15672, 0, 16384, 16385, 16387, 15360, 15616, 15680, - 15681, 15672, 15676, 0, 16384, 16385, 16387, 15360, - 15616, 15680, 15681, 15683, 15676, 0, 16384, 16385, - 16387, 15360, 15616, 15680, 15681, 15683, 15676, 15678, - 0, 16384, 16385, 16387, 15360, 15616, 0, 16384, - 16385, 16387, 15360, 15616, 15680, 0, 16384, 16385, - 16387, 15360, 15616, 15680, 0, 16384, 16385, 16387, - 15360, 15616, 15680, 15682, 0, 16384, 16385, 16387, - 15360, 15616, 15680, 0, 16384, 16385, 16387, 15360, - 15616, 15680, 15684, 0, 16384, 16385, 16387, 15360, - 15616, 15680, 15684, 0, 16384, 16385, 16387, 15360, - 15616, 15680, 15688, 15686, 0, 16384, 16385, 16387, - 15360, 15616, 15680, 0, 16384, 16385, 16387, 15360, - 15616, 15680, 15688, 0, 16384, 16385, 16387, 15360, - 15616, 15680, 15688, 0, 16384, 16385, 16387, 15360, - 15616, 15680, 15688, 15690, 0, 16384, 16385, 16387, - 15360, 15616, 15680, 15688, 0, 16384, 16385, 16387, - 15360, 15616, 15680, 15696, 15692, 0, 16384, 16385, - 16387, 15360, 15616, 15680, 15696, 15692, 0, 16384, - 16385, 16387, 15360, 15616, 15680, 15696, 15697, 15694, - 0, 16384, 16385, 16387, 15360, 15616, 15680, 0, - 16384, 16385, 16387, 15360, 15616, 15680, 15696, 0, - 16384, 16385, 16387, 15360, 15616, 15680, 15696, 0, - 16384, 16385, 16387, 15360, 15616, 15680, 15696, 15698, - 0, 16384, 16385, 16387, 15360, 15616, 15680, 15696, - 0, 16384, 16385, 16387, 15360, 15616, 15680, 15696, - 15700, 0, 16384, 16385, 16387, 15360, 15616, 15680, - 15696, 15700, 0, 16384, 16385, 16387, 15360, 15616, - 15680, 15696, 15704, 15702, 0, 16384, 16385, 16387, - 15360, 15616, 15680, 15696, 0, 16384, 16385, 16387, - 15360, 15616, 15680, 15712, 15704, 0, 16384, 16385, - 16387, 15360, 15616, 15680, 15712, 15704, 0, 16384, - 16385, 16387, 15360, 15616, 15680, 15712, 15704, 15706, - 0, 16384, 16385, 16387, 15360, 15616, 15680, 15712, - 15704, 0, 16384, 16385, 16387, 15360, 15616, 15680, - 15712, 15713, 15708, 0, 16384, 16385, 16387, 15360, - 15616, 15680, 15712, 15713, 15708, 0, 16384, 16385, - 16387, 15360, 15616, 15680, 15712, 15713, 15708, 15710, - 0, 16384, 16385, 16387, 15360, 15616, 15680, 0, - 16384, 16385, 16387, 15360, 15616, 15744, 15712, 0, - 16384, 16385, 16387, 15360, 15616, 15744, 15712, 0, - 16384, 16385, 16387, 15360, 15616, 15744, 15712, 15714, - 0, 16384, 16385, 16387, 15360, 15616, 15744, 15712, - 0, 16384, 16385, 16387, 15360, 15616, 15744, 15712, - 15716, 0, 16384, 16385, 16387, 15360, 15616, 15744, - 15712, 15716, 0, 16384, 16385, 16387, 15360, 15616, - 15744, 15712, 15720, 15718, 0, 16384, 16385, 16387, - 15360, 15616, 15744, 15712, 0, 16384, 16385, 16387, - 15360, 15616, 15744, 15712, 15720, 0, 16384, 16385, - 16387, 15360, 15616, 15744, 15712, 15720, 0, 16384, - 16385, 16387, 15360, 15616, 15744, 15712, 15720, 15722, - 0, 16384, 16385, 16387, 15360, 15616, 15744, 15712, - 15720, 0, 16384, 16385, 16387, 15360, 15616, 15744, - 15712, 15728, 15724, 0, 16384, 16385, 16387, 15360, - 15616, 15744, 15712, 15728, 15724, 0, 16384, 16385, - 16387, 15360, 15616, 15744, 15712, 15728, 15729, 15726, - 0, 16384, 16385, 16387, 15360, 15616, 15744, 15712, - 0, 16384, 16385, 16387, 15360, 15616, 15744, 15745, - 15728, 0, 16384, 16385, 16387, 15360, 15616, 15744, - 15745, 15728, 0, 16384, 16385, 16387, 15360, 15616, - 15744, 15745, 15728, 15730, 0, 16384, 16385, 16387, - 15360, 15616, 15744, 15745, 15728, 0, 16384, 16385, - 16387, 15360, 15616, 15744, 15745, 15728, 15732, 0, - 16384, 16385, 16387, 15360, 15616, 15744, 15745, 15728, - 15732, 0, 16384, 16385, 16387, 15360, 15616, 15744, - 15745, 15728, 15736, 15734, 0, 16384, 16385, 16387, - 15360, 15616, 15744, 15745, 15728, 0, 16384, 16385, - 16387, 15360, 15616, 15744, 15745, 15728, 15736, 0, - 16384, 16385, 16387, 15360, 15616, 15744, 15745, 15747, - 15736, 0, 16384, 16385, 16387, 15360, 15616, 15744, - 15745, 15747, 15736, 15738, 0, 16384, 16385, 16387, - 15360, 15616, 15744, 15745, 15747, 15736, 0, 16384, - 16385, 16387, 15360, 15616, 15744, 15745, 15747, 15736, - 15740, 0, 16384, 16385, 16387, 15360, 15616, 15744, - 15745, 15747, 15736, 15740, 0, 16384, 16385, 16387, - 15360, 15616, 15744, 15745, 15747, 15736, 15740, 15742, - 0, 16384, 16385, 16387, 15360, 15616, 0, 16384, - 16385, 16387, 15360, 15872, 15744, 0, 16384, 16385, - 16387, 15360, 15872, 15744, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 15746, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 0, 16384, 16385, 16387, 15360, - 15872, 15744, 15748, 0, 16384, 16385, 16387, 15360, - 15872, 15744, 15748, 0, 16384, 16385, 16387, 15360, - 15872, 15744, 15752, 15750, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 0, 16384, 16385, 16387, 15360, - 15872, 15744, 15752, 0, 16384, 16385, 16387, 15360, - 15872, 15744, 15752, 0, 16384, 16385, 16387, 15360, - 15872, 15744, 15752, 15754, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 15752, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 15760, 15756, 0, 16384, 16385, - 16387, 15360, 15872, 15744, 15760, 15756, 0, 16384, - 16385, 16387, 15360, 15872, 15744, 15760, 15761, 15758, - 0, 16384, 16385, 16387, 15360, 15872, 15744, 0, - 16384, 16385, 16387, 15360, 15872, 15744, 15760, 0, - 16384, 16385, 16387, 15360, 15872, 15744, 15760, 0, - 16384, 16385, 16387, 15360, 15872, 15744, 15760, 15762, - 0, 16384, 16385, 16387, 15360, 15872, 15744, 15760, - 0, 16384, 16385, 16387, 15360, 15872, 15744, 15760, - 15764, 0, 16384, 16385, 16387, 15360, 15872, 15744, - 15760, 15764, 0, 16384, 16385, 16387, 15360, 15872, - 15744, 15760, 15768, 15766, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 15760, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 15776, 15768, 0, 16384, 16385, - 16387, 15360, 15872, 15744, 15776, 15768, 0, 16384, - 16385, 16387, 15360, 15872, 15744, 15776, 15768, 15770, - 0, 16384, 16385, 16387, 15360, 15872, 15744, 15776, - 15768, 0, 16384, 16385, 16387, 15360, 15872, 15744, - 15776, 15777, 15772, 0, 16384, 16385, 16387, 15360, - 15872, 15744, 15776, 15777, 15772, 0, 16384, 16385, - 16387, 15360, 15872, 15744, 15776, 15777, 15772, 15774, - 0, 16384, 16385, 16387, 15360, 15872, 15744, 0, - 16384, 16385, 16387, 15360, 15872, 15744, 15776, 0, - 16384, 16385, 16387, 15360, 15872, 15744, 15776, 0, - 16384, 16385, 16387, 15360, 15872, 15744, 15776, 15778, - 0, 16384, 16385, 16387, 15360, 15872, 15744, 15776, - 0, 16384, 16385, 16387, 15360, 15872, 15744, 15776, - 15780, 0, 16384, 16385, 16387, 15360, 15872, 15744, - 15776, 15780, 0, 16384, 16385, 16387, 15360, 15872, - 15744, 15776, 15784, 15782, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 15776, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 15776, 15784, 0, 16384, 16385, - 16387, 15360, 15872, 15744, 15776, 15784, 0, 16384, - 16385, 16387, 15360, 15872, 15744, 15776, 15784, 15786, - 0, 16384, 16385, 16387, 15360, 15872, 15744, 15776, - 15784, 0, 16384, 16385, 16387, 15360, 15872, 15744, - 15776, 15792, 15788, 0, 16384, 16385, 16387, 15360, - 15872, 15744, 15776, 15792, 15788, 0, 16384, 16385, - 16387, 15360, 15872, 15744, 15776, 15792, 15793, 15790, - 0, 16384, 16385, 16387, 15360, 15872, 15744, 15776, - 0, 16384, 16385, 16387, 15360, 15872, 15744, 15808, - 15792, 0, 16384, 16385, 16387, 15360, 15872, 15744, - 15808, 15792, 0, 16384, 16385, 16387, 15360, 15872, - 15744, 15808, 15792, 15794, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 15808, 15792, 0, 16384, 16385, - 16387, 15360, 15872, 15744, 15808, 15792, 15796, 0, - 16384, 16385, 16387, 15360, 15872, 15744, 15808, 15792, - 15796, 0, 16384, 16385, 16387, 15360, 15872, 15744, - 15808, 15792, 15800, 15798, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 15808, 15792, 0, 16384, 16385, - 16387, 15360, 15872, 15744, 15808, 15809, 15800, 0, - 16384, 16385, 16387, 15360, 15872, 15744, 15808, 15809, - 15800, 0, 16384, 16385, 16387, 15360, 15872, 15744, - 15808, 15809, 15800, 15802, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 15808, 15809, 15800, 0, 16384, - 16385, 16387, 15360, 15872, 15744, 15808, 15809, 15800, - 15804, 0, 16384, 16385, 16387, 15360, 15872, 15744, - 15808, 15809, 15811, 15804, 0, 16384, 16385, 16387, - 15360, 15872, 15744, 15808, 15809, 15811, 15804, 15806, - 0, 16384, 16385, 16387, 15360, 15872, 15744, 0, - 16384, 16385, 16387, 15360, 15872, 15873, 15808, 0, - 16384, 16385, 16387, 15360, 15872, 15873, 15808, 0, - 16384, 16385, 16387, 15360, 15872, 15873, 15808, 15810, - 0, 16384, 16385, 16387, 15360, 15872, 15873, 15808, - 0, 16384, 16385, 16387, 15360, 15872, 15873, 15808, - 15812, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15808, 15812, 0, 16384, 16385, 16387, 15360, 15872, - 15873, 15808, 15816, 15814, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15808, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15808, 15816, 0, 16384, 16385, - 16387, 15360, 15872, 15873, 15808, 15816, 0, 16384, - 16385, 16387, 15360, 15872, 15873, 15808, 15816, 15818, - 0, 16384, 16385, 16387, 15360, 15872, 15873, 15808, - 15816, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15808, 15824, 15820, 0, 16384, 16385, 16387, 15360, - 15872, 15873, 15808, 15824, 15820, 0, 16384, 16385, - 16387, 15360, 15872, 15873, 15808, 15824, 15825, 15822, - 0, 16384, 16385, 16387, 15360, 15872, 15873, 15808, - 0, 16384, 16385, 16387, 15360, 15872, 15873, 15808, - 15824, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15808, 15824, 0, 16384, 16385, 16387, 15360, 15872, - 15873, 15808, 15824, 15826, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15808, 15824, 0, 16384, 16385, - 16387, 15360, 15872, 15873, 15808, 15824, 15828, 0, - 16384, 16385, 16387, 15360, 15872, 15873, 15808, 15824, - 15828, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15808, 15824, 15832, 15830, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15808, 15824, 0, 16384, 16385, - 16387, 15360, 15872, 15873, 15808, 15840, 15832, 0, - 16384, 16385, 16387, 15360, 15872, 15873, 15808, 15840, - 15832, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15808, 15840, 15832, 15834, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15808, 15840, 15832, 0, 16384, - 16385, 16387, 15360, 15872, 15873, 15808, 15840, 15841, - 15836, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15808, 15840, 15841, 15836, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15808, 15840, 15841, 15836, 15838, - 0, 16384, 16385, 16387, 15360, 15872, 15873, 15808, - 0, 16384, 16385, 16387, 15360, 15872, 15873, 15808, - 15840, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15875, 15840, 0, 16384, 16385, 16387, 15360, 15872, - 15873, 15875, 15840, 15842, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15875, 15840, 0, 16384, 16385, - 16387, 15360, 15872, 15873, 15875, 15840, 15844, 0, - 16384, 16385, 16387, 15360, 15872, 15873, 15875, 15840, - 15844, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15875, 15840, 15848, 15846, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15875, 15840, 0, 16384, 16385, - 16387, 15360, 15872, 15873, 15875, 15840, 15848, 0, - 16384, 16385, 16387, 15360, 15872, 15873, 15875, 15840, - 15848, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15875, 15840, 15848, 15850, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15875, 15840, 15848, 0, 16384, - 16385, 16387, 15360, 15872, 15873, 15875, 15840, 15856, - 15852, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15875, 15840, 15856, 15852, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15875, 15840, 15856, 15857, 15854, - 0, 16384, 16385, 16387, 15360, 15872, 15873, 15875, - 15840, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15875, 15840, 15856, 0, 16384, 16385, 16387, 15360, - 15872, 15873, 15875, 15840, 15856, 0, 16384, 16385, - 16387, 15360, 15872, 15873, 15875, 15840, 15856, 15858, - 0, 16384, 16385, 16387, 15360, 15872, 15873, 15875, - 15879, 15856, 0, 16384, 16385, 16387, 15360, 15872, - 15873, 15875, 15879, 15856, 15860, 0, 16384, 16385, - 16387, 15360, 15872, 15873, 15875, 15879, 15856, 15860, - 0, 16384, 16385, 16387, 15360, 15872, 15873, 15875, - 15879, 15856, 15864, 15862, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15875, 15879, 15856, 0, 16384, - 16385, 16387, 15360, 15872, 15873, 15875, 15879, 15856, - 15864, 0, 16384, 16385, 16387, 15360, 15872, 15873, - 15875, 15879, 15856, 15864, 0, 16384, 16385, 16387, - 15360, 15872, 15873, 15875, 15879, 15856, 15864, 15866, - 0, 16384, 16385, 16387, 15360, 15872, 15873, 15875, - 15879, 15856, 15864, 0, 16384, 16385, 16387, 15360, - 15872, 15873, 15875, 15879, 15856, 15864, 15868, 0, - 16384, 16385, 16387, 15360, 15872, 15873, 15875, 15879, - 15856, 15864, 15868, 0, 16384, 16385, 16387, 15360, - 15872, 15873, 15875, 15879, 15856, 15864, 15868, 15870, - 0, 16384, 16385, 16387, 15360, 0, 16384, 16385, - 16387, 15360, 15872, 0, 16384, 16385, 16387, 15360, - 15872, 0, 16384, 16385, 16387, 15360, 15872, 15874, - 0, 16384, 16385, 16387, 15360, 15872, 0, 16384, - 16385, 16387, 15360, 15872, 15876, 0, 16384, 16385, - 16387, 15360, 15872, 15876, 0, 16384, 16385, 16387, - 15360, 15872, 15880, 15878, 0, 16384, 16385, 16387, - 16391, 15872, 0, 16384, 16385, 16387, 16391, 15872, - 15880, 0, 16384, 16385, 16387, 16391, 15872, 15880, - 0, 16384, 16385, 16387, 16391, 15872, 15880, 15882, - 0, 16384, 16385, 16387, 16391, 15872, 15880, 0, - 16384, 16385, 16387, 16391, 15872, 15888, 15884, 0, - 16384, 16385, 16387, 16391, 15872, 15888, 15884, 0, - 16384, 16385, 16387, 16391, 15872, 15888, 15889, 15886, - 0, 16384, 16385, 16387, 16391, 15872, 0, 16384, - 16385, 16387, 16391, 15872, 15888, 0, 16384, 16385, - 16387, 16391, 15872, 15888, 0, 16384, 16385, 16387, - 16391, 15872, 15888, 15890, 0, 16384, 16385, 16387, - 16391, 15872, 15888, 0, 16384, 16385, 16387, 16391, - 15872, 15888, 15892, 0, 16384, 16385, 16387, 16391, - 15872, 15888, 15892, 0, 16384, 16385, 16387, 16391, - 15872, 15888, 15896, 15894, 0, 16384, 16385, 16387, - 16391, 15872, 15888, 0, 16384, 16385, 16387, 16391, - 15872, 15904, 15896, 0, 16384, 16385, 16387, 16391, - 15872, 15904, 15896, 0, 16384, 16385, 16387, 16391, - 15872, 15904, 15896, 15898, 0, 16384, 16385, 16387, - 16391, 15872, 15904, 15896, 0, 16384, 16385, 16387, - 16391, 15872, 15904, 15905, 15900, 0, 16384, 16385, - 16387, 16391, 15872, 15904, 15905, 15900, 0, 16384, - 16385, 16387, 16391, 15872, 15904, 15905, 15900, 15902, - 0, 16384, 16385, 16387, 16391, 15872, 0, 16384, - 16385, 16387, 16391, 15872, 15904, 0, 16384, 16385, - 16387, 16391, 15872, 15904, 0, 16384, 16385, 16387, - 16391, 15872, 15904, 15906, 0, 16384, 16385, 16387, - 16391, 15872, 15904, 0, 16384, 16385, 16387, 16391, - 15872, 15904, 15908, 0, 16384, 16385, 16387, 16391, - 15872, 15904, 15908, 0, 16384, 16385, 16387, 16391, - 15872, 15904, 15912, 15910, 0, 16384, 16385, 16387, - 16391, 15872, 15904, 0, 16384, 16385, 16387, 16391, - 15872, 15904, 15912, 0, 16384, 16385, 16387, 16391, - 15872, 15904, 15912, 0, 16384, 16385, 16387, 16391, - 15872, 15904, 15912, 15914, 0, 16384, 16385, 16387, - 16391, 15872, 15904, 15912, 0, 16384, 16385, 16387, - 16391, 15872, 15904, 15920, 15916, 0, 16384, 16385, - 16387, 16391, 15872, 15904, 15920, 15916, 0, 16384, - 16385, 16387, 16391, 15872, 15904, 15920, 15921, 15918, - 0, 16384, 16385, 16387, 16391, 15872, 15904, 0, - 16384, 16385, 16387, 16391, 15872, 15936, 15920, 0, - 16384, 16385, 16387, 16391, 15872, 15936, 15920, 0, - 16384, 16385, 16387, 16391, 15872, 15936, 15920, 15922, - 0, 16384, 16385, 16387, 16391, 15872, 15936, 15920, - 0, 16384, 16385, 16387, 16391, 15872, 15936, 15920, - 15924, 0, 16384, 16385, 16387, 16391, 15872, 15936, - 15920, 15924, 0, 16384, 16385, 16387, 16391, 15872, - 15936, 15920, 15928, 15926, 0, 16384, 16385, 16387, - 16391, 15872, 15936, 15920, 0, 16384, 16385, 16387, - 16391, 15872, 15936, 15937, 15928, 0, 16384, 16385, - 16387, 16391, 15872, 15936, 15937, 15928, 0, 16384, - 16385, 16387, 16391, 15872, 15936, 15937, 15928, 15930, - 0, 16384, 16385, 16387, 16391, 15872, 15936, 15937, - 15928, 0, 16384, 16385, 16387, 16391, 15872, 15936, - 15937, 15928, 15932, 0, 16384, 16385, 16387, 16391, - 15872, 15936, 15937, 15939, 15932, 0, 16384, 16385, - 16387, 16391, 15872, 15936, 15937, 15939, 15932, 15934, - 0, 16384, 16385, 16387, 16391, 15872, 0, 16384, - 16385, 16387, 16391, 15872, 15936, 0, 16384, 16385, - 16387, 16391, 15872, 15936, 0, 16384, 16385, 16387, - 16391, 15872, 15936, 15938, 0, 16384, 16385, 16387, - 16391, 15872, 15936, 0, 16384, 16385, 16387, 16391, - 15872, 15936, 15940, 0, 16384, 16385, 16387, 16391, - 15872, 15936, 15940, 0, 16384, 16385, 16387, 16391, - 15872, 15936, 15944, 15942, 0, 16384, 16385, 16387, - 16391, 15872, 15936, 0, 16384, 16385, 16387, 16391, - 15872, 15936, 15944, 0, 16384, 16385, 16387, 16391, - 15872, 15936, 15944, 0, 16384, 16385, 16387, 16391, - 15872, 15936, 15944, 15946, 0, 16384, 16385, 16387, - 16391, 15872, 15936, 15944, 0, 16384, 16385, 16387, - 16391, 15872, 15936, 15952, 15948, 0, 16384, 16385, - 16387, 16391, 15872, 15936, 15952, 15948, 0, 16384, - 16385, 16387, 16391, 15872, 15936, 15952, 15953, 15950, - 0, 16384, 16385, 16387, 16391, 15872, 15936, 0, - 16384, 16385, 16387, 16391, 15872, 15936, 15952, 0, - 16384, 16385, 16387, 16391, 15872, 15936, 15952, 0, - 16384, 16385, 16387, 16391, 15872, 15936, 15952, 15954, - 0, 16384, 16385, 16387, 16391, 15872, 15936, 15952, - 0, 16384, 16385, 16387, 16391, 15872, 15936, 15952, - 15956, 0, 16384, 16385, 16387, 16391, 15872, 15936, - 15952, 15956, 0, 16384, 16385, 16387, 16391, 15872, - 15936, 15952, 15960, 15958, 0, 16384, 16385, 16387, - 16391, 15872, 15936, 15952, 0, 16384, 16385, 16387, - 16391, 15872, 15936, 15968, 15960, 0, 16384, 16385, - 16387, 16391, 15872, 15936, 15968, 15960, 0, 16384, - 16385, 16387, 16391, 15872, 15936, 15968, 15960, 15962, - 0, 16384, 16385, 16387, 16391, 15872, 15936, 15968, - 15960, 0, 16384, 16385, 16387, 16391, 15872, 15936, - 15968, 15969, 15964, 0, 16384, 16385, 16387, 16391, - 15872, 15936, 15968, 15969, 15964, 0, 16384, 16385, - 16387, 16391, 15872, 15936, 15968, 15969, 15964, 15966, - 0, 16384, 16385, 16387, 16391, 15872, 15936, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 15968, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 15968, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 15968, 15970, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 15968, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 15968, - 15972, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 15968, 15972, 0, 16384, 16385, 16387, 16391, 15872, - 16000, 15968, 15976, 15974, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 15968, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 15968, 15976, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 15968, 15976, 0, 16384, - 16385, 16387, 16391, 15872, 16000, 15968, 15976, 15978, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 15968, - 15976, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 15968, 15984, 15980, 0, 16384, 16385, 16387, 16391, - 15872, 16000, 15968, 15984, 15980, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 15968, 15984, 15985, 15982, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 15968, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 16001, - 15984, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16001, 15984, 0, 16384, 16385, 16387, 16391, 15872, - 16000, 16001, 15984, 15986, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16001, 15984, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 16001, 15984, 15988, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 16001, 15984, - 15988, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16001, 15984, 15992, 15990, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16001, 15984, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 16001, 15984, 15992, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 16001, 16003, - 15992, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16001, 16003, 15992, 15994, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16001, 16003, 15992, 0, 16384, - 16385, 16387, 16391, 15872, 16000, 16001, 16003, 15992, - 15996, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16001, 16003, 15992, 15996, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16001, 16003, 15992, 15996, 15998, - 0, 16384, 16385, 16387, 16391, 15872, 0, 16384, - 16385, 16387, 16391, 15872, 16000, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16002, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 0, 16384, 16385, 16387, 16391, - 15872, 16000, 16004, 0, 16384, 16385, 16387, 16391, - 15872, 16000, 16004, 0, 16384, 16385, 16387, 16391, - 15872, 16000, 16008, 16006, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 0, 16384, 16385, 16387, 16391, - 15872, 16000, 16008, 0, 16384, 16385, 16387, 16391, - 15872, 16000, 16008, 0, 16384, 16385, 16387, 16391, - 15872, 16000, 16008, 16010, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16008, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16016, 16012, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 16016, 16012, 0, 16384, - 16385, 16387, 16391, 15872, 16000, 16016, 16017, 16014, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 16016, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 16016, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 16016, 16018, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 16016, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 16016, - 16020, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16016, 16020, 0, 16384, 16385, 16387, 16391, 15872, - 16000, 16016, 16024, 16022, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16016, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16032, 16024, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 16032, 16024, 0, 16384, - 16385, 16387, 16391, 15872, 16000, 16032, 16024, 16026, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 16032, - 16024, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16032, 16033, 16028, 0, 16384, 16385, 16387, 16391, - 15872, 16000, 16032, 16033, 16028, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 16032, 16033, 16028, 16030, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 16032, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 16032, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 16032, 16034, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 16032, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 16032, - 16036, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16032, 16036, 0, 16384, 16385, 16387, 16391, 15872, - 16000, 16032, 16040, 16038, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16032, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16032, 16040, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 16032, 16040, 0, 16384, - 16385, 16387, 16391, 15872, 16000, 16032, 16040, 16042, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 16032, - 16040, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16032, 16048, 16044, 0, 16384, 16385, 16387, 16391, - 15872, 16000, 16032, 16048, 16044, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 16032, 16048, 16049, 16046, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 16032, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 16064, - 16048, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16064, 16048, 0, 16384, 16385, 16387, 16391, 15872, - 16000, 16064, 16048, 16050, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16064, 16048, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 16064, 16048, 16052, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 16064, 16048, - 16052, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16064, 16048, 16056, 16054, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16064, 16048, 0, 16384, 16385, - 16387, 16391, 15872, 16000, 16064, 16065, 16056, 0, - 16384, 16385, 16387, 16391, 15872, 16000, 16064, 16065, - 16056, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16064, 16065, 16056, 16058, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16064, 16065, 16056, 0, 16384, - 16385, 16387, 16391, 15872, 16000, 16064, 16065, 16056, - 16060, 0, 16384, 16385, 16387, 16391, 15872, 16000, - 16064, 16065, 16067, 16060, 0, 16384, 16385, 16387, - 16391, 15872, 16000, 16064, 16065, 16067, 16060, 16062, - 0, 16384, 16385, 16387, 16391, 15872, 16000, 0, - 16384, 16385, 16387, 16391, 15872, 16128, 16064, 0, - 16384, 16385, 16387, 16391, 15872, 16128, 16064, 0, - 16384, 16385, 16387, 16391, 15872, 16128, 16064, 16066, - 0, 16384, 16385, 16387, 16391, 15872, 16128, 16064, - 0, 16384, 16385, 16387, 16391, 15872, 16128, 16064, - 16068, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16064, 16068, 0, 16384, 16385, 16387, 16391, 15872, - 16128, 16064, 16072, 16070, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16064, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16064, 16072, 0, 16384, 16385, - 16387, 16391, 15872, 16128, 16064, 16072, 0, 16384, - 16385, 16387, 16391, 15872, 16128, 16064, 16072, 16074, - 0, 16384, 16385, 16387, 16391, 15872, 16128, 16064, - 16072, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16064, 16080, 16076, 0, 16384, 16385, 16387, 16391, - 15872, 16128, 16064, 16080, 16076, 0, 16384, 16385, - 16387, 16391, 15872, 16128, 16064, 16080, 16081, 16078, - 0, 16384, 16385, 16387, 16391, 15872, 16128, 16064, - 0, 16384, 16385, 16387, 16391, 15872, 16128, 16064, - 16080, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16064, 16080, 0, 16384, 16385, 16387, 16391, 15872, - 16128, 16064, 16080, 16082, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16064, 16080, 0, 16384, 16385, - 16387, 16391, 15872, 16128, 16064, 16080, 16084, 0, - 16384, 16385, 16387, 16391, 15872, 16128, 16064, 16080, - 16084, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16064, 16080, 16088, 16086, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16064, 16080, 0, 16384, 16385, - 16387, 16391, 15872, 16128, 16064, 16096, 16088, 0, - 16384, 16385, 16387, 16391, 15872, 16128, 16064, 16096, - 16088, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16064, 16096, 16088, 16090, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16064, 16096, 16088, 0, 16384, - 16385, 16387, 16391, 15872, 16128, 16064, 16096, 16097, - 16092, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16064, 16096, 16097, 16092, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16064, 16096, 16097, 16092, 16094, - 0, 16384, 16385, 16387, 16391, 15872, 16128, 16064, - 0, 16384, 16385, 16387, 16391, 15872, 16128, 16129, - 16096, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16129, 16096, 0, 16384, 16385, 16387, 16391, 15872, - 16128, 16129, 16096, 16098, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16129, 16096, 0, 16384, 16385, - 16387, 16391, 15872, 16128, 16129, 16096, 16100, 0, - 16384, 16385, 16387, 16391, 15872, 16128, 16129, 16096, - 16100, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16129, 16096, 16104, 16102, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16129, 16096, 0, 16384, 16385, - 16387, 16391, 15872, 16128, 16129, 16096, 16104, 0, - 16384, 16385, 16387, 16391, 15872, 16128, 16129, 16096, - 16104, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16129, 16096, 16104, 16106, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16129, 16096, 16104, 0, 16384, - 16385, 16387, 16391, 15872, 16128, 16129, 16096, 16112, - 16108, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16129, 16096, 16112, 16108, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16129, 16096, 16112, 16113, 16110, - 0, 16384, 16385, 16387, 16391, 15872, 16128, 16129, - 16096, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16129, 16096, 16112, 0, 16384, 16385, 16387, 16391, - 15872, 16128, 16129, 16131, 16112, 0, 16384, 16385, - 16387, 16391, 15872, 16128, 16129, 16131, 16112, 16114, - 0, 16384, 16385, 16387, 16391, 15872, 16128, 16129, - 16131, 16112, 0, 16384, 16385, 16387, 16391, 15872, - 16128, 16129, 16131, 16112, 16116, 0, 16384, 16385, - 16387, 16391, 15872, 16128, 16129, 16131, 16112, 16116, - 0, 16384, 16385, 16387, 16391, 15872, 16128, 16129, - 16131, 16112, 16120, 16118, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16129, 16131, 16112, 0, 16384, - 16385, 16387, 16391, 15872, 16128, 16129, 16131, 16112, - 16120, 0, 16384, 16385, 16387, 16391, 15872, 16128, - 16129, 16131, 16112, 16120, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16129, 16131, 16112, 16120, 16122, - 0, 16384, 16385, 16387, 16391, 15872, 16128, 16129, - 16131, 16135, 16120, 0, 16384, 16385, 16387, 16391, - 15872, 16128, 16129, 16131, 16135, 16120, 16124, 0, - 16384, 16385, 16387, 16391, 15872, 16128, 16129, 16131, - 16135, 16120, 16124, 0, 16384, 16385, 16387, 16391, - 15872, 16128, 16129, 16131, 16135, 16120, 16124, 16126, - 0, 16384, 16385, 16387, 16391, 15872, 0, 16384, - 16385, 16387, 16391, 15872, 16128, 0, 16384, 16385, - 16387, 16391, 15872, 16128, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16130, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 0, 16384, 16385, 16387, 16391, - 15872, 16128, 16132, 0, 16384, 16385, 16387, 16391, - 15872, 16128, 16132, 0, 16384, 16385, 16387, 16391, - 15872, 16128, 16136, 16134, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 0, 16384, 16385, 16387, 16391, - 15872, 16128, 16136, 0, 16384, 16385, 16387, 16391, - 15872, 16128, 16136, 0, 16384, 16385, 16387, 16391, - 15872, 16128, 16136, 16138, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16136, 0, 16384, 16385, 16387, - 16391, 15872, 16128, 16144, 16140, 0, 16384, 16385, - 16387, 16391, 15872, 16128, 16144, 16140, 0, 16384, - 16385, 16387, 16391, 15872, 16128, 16144, 16145, 16142, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16144, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16144, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16144, 16146, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16144, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16144, - 16148, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16144, 16148, 0, 16384, 16385, 16387, 16391, 16399, - 16128, 16144, 16152, 16150, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16144, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16160, 16152, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16160, 16152, 0, 16384, - 16385, 16387, 16391, 16399, 16128, 16160, 16152, 16154, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16160, - 16152, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16160, 16161, 16156, 0, 16384, 16385, 16387, 16391, - 16399, 16128, 16160, 16161, 16156, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16160, 16161, 16156, 16158, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16160, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16160, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16160, 16162, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16160, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16160, - 16164, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16160, 16164, 0, 16384, 16385, 16387, 16391, 16399, - 16128, 16160, 16168, 16166, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16160, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16160, 16168, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16160, 16168, 0, 16384, - 16385, 16387, 16391, 16399, 16128, 16160, 16168, 16170, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16160, - 16168, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16160, 16176, 16172, 0, 16384, 16385, 16387, 16391, - 16399, 16128, 16160, 16176, 16172, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16160, 16176, 16177, 16174, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16160, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16192, - 16176, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16192, 16176, 0, 16384, 16385, 16387, 16391, 16399, - 16128, 16192, 16176, 16178, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16192, 16176, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16192, 16176, 16180, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16192, 16176, - 16180, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16192, 16176, 16184, 16182, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16192, 16176, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16192, 16193, 16184, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16192, 16193, - 16184, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16192, 16193, 16184, 16186, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16192, 16193, 16184, 0, 16384, - 16385, 16387, 16391, 16399, 16128, 16192, 16193, 16184, - 16188, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16192, 16193, 16195, 16188, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16192, 16193, 16195, 16188, 16190, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16192, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16192, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16192, 16194, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16192, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16192, - 16196, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16192, 16196, 0, 16384, 16385, 16387, 16391, 16399, - 16128, 16192, 16200, 16198, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16192, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16192, 16200, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16192, 16200, 0, 16384, - 16385, 16387, 16391, 16399, 16128, 16192, 16200, 16202, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16192, - 16200, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16192, 16208, 16204, 0, 16384, 16385, 16387, 16391, - 16399, 16128, 16192, 16208, 16204, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16192, 16208, 16209, 16206, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16192, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16192, - 16208, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16192, 16208, 0, 16384, 16385, 16387, 16391, 16399, - 16128, 16192, 16208, 16210, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16192, 16208, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16192, 16208, 16212, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16192, 16208, - 16212, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16192, 16208, 16216, 16214, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16192, 16208, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16192, 16224, 16216, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16192, 16224, - 16216, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16192, 16224, 16216, 16218, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16192, 16224, 16216, 0, 16384, - 16385, 16387, 16391, 16399, 16128, 16192, 16224, 16225, - 16220, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16192, 16224, 16225, 16220, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16192, 16224, 16225, 16220, 16222, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16192, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16256, - 16224, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16224, 0, 16384, 16385, 16387, 16391, 16399, - 16128, 16256, 16224, 16226, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 16224, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16256, 16224, 16228, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16256, 16224, - 16228, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16224, 16232, 16230, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 16224, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16256, 16224, 16232, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16256, 16224, - 16232, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16224, 16232, 16234, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 16224, 16232, 0, 16384, - 16385, 16387, 16391, 16399, 16128, 16256, 16224, 16240, - 16236, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16224, 16240, 16236, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 16224, 16240, 16241, 16238, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16256, - 16224, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16257, 16240, 0, 16384, 16385, 16387, 16391, - 16399, 16128, 16256, 16257, 16240, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16256, 16257, 16240, 16242, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16256, - 16257, 16240, 0, 16384, 16385, 16387, 16391, 16399, - 16128, 16256, 16257, 16240, 16244, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16256, 16257, 16240, 16244, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16256, - 16257, 16240, 16248, 16246, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 16257, 16240, 0, 16384, - 16385, 16387, 16391, 16399, 16128, 16256, 16257, 16240, - 16248, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16257, 16259, 16248, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 16257, 16259, 16248, 16250, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16256, - 16257, 16259, 16248, 0, 16384, 16385, 16387, 16391, - 16399, 16128, 16256, 16257, 16259, 16248, 16252, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16256, 16257, - 16259, 16248, 16252, 0, 16384, 16385, 16387, 16391, - 16399, 16128, 16256, 16257, 16259, 16248, 16252, 16254, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16256, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16256, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16256, 16258, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16256, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16256, - 16260, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16260, 0, 16384, 16385, 16387, 16391, 16399, - 16128, 16256, 16264, 16262, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 16264, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16256, 16264, 0, 16384, - 16385, 16387, 16391, 16399, 16128, 16256, 16264, 16266, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16256, - 16264, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16272, 16268, 0, 16384, 16385, 16387, 16391, - 16399, 16128, 16256, 16272, 16268, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16256, 16272, 16273, 16270, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16256, - 0, 16384, 16385, 16387, 16391, 16399, 16128, 16256, - 16272, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16272, 0, 16384, 16385, 16387, 16391, 16399, - 16128, 16256, 16272, 16274, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 16272, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16256, 16272, 16276, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16256, 16272, - 16276, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16272, 16280, 16278, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 16272, 0, 16384, 16385, - 16387, 16391, 16399, 16128, 16256, 16288, 16280, 0, - 16384, 16385, 16387, 16391, 16399, 16128, 16256, 16288, - 16280, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16288, 16280, 16282, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 16288, 16280, 0, 16384, - 16385, 16387, 16391, 16399, 16128, 16256, 16288, 16289, - 16284, 0, 16384, 16385, 16387, 16391, 16399, 16128, - 16256, 16288, 16289, 16284, 0, 16384, 16385, 16387, - 16391, 16399, 16128, 16256, 16288, 16289, 16284, 16286, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16288, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16288, 0, 16384, 16385, 16387, 16391, 16399, - 16415, 16256, 16288, 16290, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16288, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16288, 16292, 0, - 16384, 16385, 16387, 16391, 16399, 16415, 16256, 16288, - 16292, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16288, 16296, 16294, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16288, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16288, 16296, 0, - 16384, 16385, 16387, 16391, 16399, 16415, 16256, 16288, - 16296, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16288, 16296, 16298, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16288, 16296, 0, 16384, - 16385, 16387, 16391, 16399, 16415, 16256, 16288, 16304, - 16300, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16288, 16304, 16300, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16288, 16304, 16305, 16302, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16288, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16320, 16304, 0, 16384, 16385, 16387, 16391, - 16399, 16415, 16256, 16320, 16304, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16320, 16304, 16306, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16304, 0, 16384, 16385, 16387, 16391, 16399, - 16415, 16256, 16320, 16304, 16308, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16320, 16304, 16308, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16304, 16312, 16310, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 16304, 0, 16384, - 16385, 16387, 16391, 16399, 16415, 16256, 16320, 16321, - 16312, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16320, 16321, 16312, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 16321, 16312, 16314, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16321, 16312, 0, 16384, 16385, 16387, 16391, - 16399, 16415, 16256, 16320, 16321, 16312, 16316, 0, - 16384, 16385, 16387, 16391, 16399, 16415, 16256, 16320, - 16321, 16323, 16316, 0, 16384, 16385, 16387, 16391, - 16399, 16415, 16256, 16320, 16321, 16323, 16316, 16318, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16320, 0, 16384, 16385, 16387, 16391, 16399, - 16415, 16256, 16320, 16322, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16320, 16324, 0, - 16384, 16385, 16387, 16391, 16399, 16415, 16256, 16320, - 16324, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16320, 16328, 16326, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16320, 16328, 0, - 16384, 16385, 16387, 16391, 16399, 16415, 16256, 16320, - 16328, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16320, 16328, 16330, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 16328, 0, 16384, - 16385, 16387, 16391, 16399, 16415, 16256, 16320, 16336, - 16332, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16320, 16336, 16332, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 16336, 16337, 16334, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16320, 16336, 0, 16384, 16385, 16387, 16391, - 16399, 16415, 16256, 16320, 16336, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16320, 16336, 16338, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16336, 0, 16384, 16385, 16387, 16391, 16399, - 16415, 16256, 16320, 16336, 16340, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16320, 16336, 16340, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16336, 16344, 16342, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 16336, 0, 16384, - 16385, 16387, 16391, 16399, 16415, 16256, 16320, 16352, - 16344, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16320, 16352, 16344, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 16352, 16344, 16346, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16352, 16344, 0, 16384, 16385, 16387, 16391, - 16399, 16415, 16256, 16320, 16352, 16353, 16348, 0, - 16384, 16385, 16387, 16391, 16399, 16415, 16256, 16320, - 16352, 16353, 16348, 0, 16384, 16385, 16387, 16391, - 16399, 16415, 16256, 16320, 16352, 16353, 16348, 16350, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16320, 16352, 0, 16384, 16385, 16387, 16391, - 16399, 16415, 16256, 16320, 16352, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16320, 16352, 16354, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16352, 0, 16384, 16385, 16387, 16391, 16399, - 16415, 16256, 16320, 16352, 16356, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16320, 16352, 16356, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16352, 16360, 16358, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 16352, 0, 16384, - 16385, 16387, 16391, 16399, 16415, 16256, 16320, 16352, - 16360, 0, 16384, 16385, 16387, 16391, 16399, 16415, - 16256, 16320, 16352, 16360, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 16352, 16360, 16362, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16352, 16360, 0, 16384, 16385, 16387, 16391, - 16399, 16415, 16256, 16320, 16352, 16368, 16364, 0, - 16384, 16385, 16387, 16391, 16399, 16415, 16256, 16320, - 16352, 16368, 16364, 0, 16384, 16385, 16387, 16391, - 16399, 16415, 16256, 16320, 16352, 16368, 16369, 16366, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16352, 0, 16384, 16385, 16387, 16391, 16399, - 16415, 16256, 16320, 16352, 16368, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16320, 16352, 16368, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16352, 16368, 16370, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 16352, 16368, 0, - 16384, 16385, 16387, 16391, 16399, 16415, 16256, 16320, - 16352, 16368, 16372, 0, 16384, 16385, 16387, 16391, - 16399, 16415, 16256, 16320, 16352, 16368, 16372, 0, - 16384, 16385, 16387, 16391, 16399, 16415, 16256, 16320, - 16352, 16368, 16376, 16374, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 16352, 16368, 0, - 16384, 16385, 16387, 16391, 16399, 16415, 16256, 16320, - 16352, 16368, 16376, 0, 16384, 16385, 16387, 16391, - 16399, 16415, 16256, 16320, 16352, 16368, 16376, 0, - 16384, 16385, 16387, 16391, 16399, 16415, 16256, 16320, - 16352, 16368, 16376, 16378, 0, 16384, 16385, 16387, - 16391, 16399, 16415, 16256, 16320, 16352, 16368, 16376, - 0, 16384, 16385, 16387, 16391, 16399, 16415, 16256, - 16320, 16352, 16368, 16376, 16380, 0, 16384, 16385, - 16387, 16391, 16399, 16415, 16256, 16320, 16352, 16368, - 16376, 16380, 0, 16384, 16385, 16387, 16391, 16399, - 16415, 16256, 16320, 16352, 16368, 16376, 16380, 16382, - 0, 0, 16384, 0, 16384, 0, 16384, 16386, - 0, 16384, 0, 16384, 16388, 0, 16384, 16388, - 0, 16384, 16392, 16390, 0, 16384, 0, 16384, - 16392, 0, 16384, 16392, 0, 16384, 16392, 16394, - 0, 16384, 16392, 0, 16384, 16400, 16396, 0, - 16384, 16400, 16396, 0, 16384, 16400, 16401, 16398, - 0, 16384, 0, 16384, 16400, 0, 16384, 16400, - 0, 16384, 16400, 16402, 0, 16384, 16400, 0, - 16384, 16400, 16404, 0, 16384, 16400, 16404, 0, - 16384, 16400, 16408, 16406, 0, 16384, 16400, 0, - 16384, 16416, 16408, 0, 16384, 16416, 16408, 0, - 16384, 16416, 16408, 16410, 0, 16384, 16416, 16408, - 0, 16384, 16416, 16417, 16412, 0, 16384, 16416, - 16417, 16412, 0, 16384, 16416, 16417, 16412, 16414, - 0, 16384, 0, 16384, 16416, 0, 16384, 16416, - 0, 16384, 16416, 16418, 0, 16384, 16416, 0, - 16384, 16416, 16420, 0, 16384, 16416, 16420, 0, - 16384, 16416, 16424, 16422, 0, 16384, 16416, 0, - 16384, 16416, 16424, 0, 16384, 16416, 16424, 0, - 16384, 16416, 16424, 16426, 0, 16384, 16416, 16424, - 0, 16384, 16416, 16432, 16428, 0, 16384, 16416, - 16432, 16428, 0, 16384, 16416, 16432, 16433, 16430, - 0, 16384, 16416, 0, 16384, 16448, 16432, 0, - 16384, 16448, 16432, 0, 16384, 16448, 16432, 16434, - 0, 16384, 16448, 16432, 0, 16384, 16448, 16432, - 16436, 0, 16384, 16448, 16432, 16436, 0, 16384, - 16448, 16432, 16440, 16438, 0, 16384, 16448, 16432, - 0, 16384, 16448, 16449, 16440, 0, 16384, 16448, - 16449, 16440, 0, 16384, 16448, 16449, 16440, 16442, - 0, 16384, 16448, 16449, 16440, 0, 16384, 16448, - 16449, 16440, 16444, 0, 16384, 16448, 16449, 16451, - 16444, 0, 16384, 16448, 16449, 16451, 16444, 16446, - 0, 16384, 0, 16384, 16448, 0, 16384, 16448, - 0, 16384, 16448, 16450, 0, 16384, 16448, 0, - 16384, 16448, 16452, 0, 16384, 16448, 16452, 0, - 16384, 16448, 16456, 16454, 0, 16384, 16448, 0, - 16384, 16448, 16456, 0, 16384, 16448, 16456, 0, - 16384, 16448, 16456, 16458, 0, 16384, 16448, 16456, - 0, 16384, 16448, 16464, 16460, 0, 16384, 16448, - 16464, 16460, 0, 16384, 16448, 16464, 16465, 16462, - 0, 16384, 16448, 0, 16384, 16448, 16464, 0, - 16384, 16448, 16464, 0, 16384, 16448, 16464, 16466, - 0, 16384, 16448, 16464, 0, 16384, 16448, 16464, - 16468, 0, 16384, 16448, 16464, 16468, 0, 16384, - 16448, 16464, 16472, 16470, 0, 16384, 16448, 16464, - 0, 16384, 16448, 16480, 16472, 0, 16384, 16448, - 16480, 16472, 0, 16384, 16448, 16480, 16472, 16474, - 0, 16384, 16448, 16480, 16472, 0, 16384, 16448, - 16480, 16481, 16476, 0, 16384, 16448, 16480, 16481, - 16476, 0, 16384, 16448, 16480, 16481, 16476, 16478, - 0, 16384, 16448, 0, 16384, 16512, 16480, 0, - 16384, 16512, 16480, 0, 16384, 16512, 16480, 16482, - 0, 16384, 16512, 16480, 0, 16384, 16512, 16480, - 16484, 0, 16384, 16512, 16480, 16484, 0, 16384, - 16512, 16480, 16488, 16486, 0, 16384, 16512, 16480, - 0, 16384, 16512, 16480, 16488, 0, 16384, 16512, - 16480, 16488, 0, 16384, 16512, 16480, 16488, 16490, - 0, 16384, 16512, 16480, 16488, 0, 16384, 16512, - 16480, 16496, 16492, 0, 16384, 16512, 16480, 16496, - 16492, 0, 16384, 16512, 16480, 16496, 16497, 16494, - 0, 16384, 16512, 16480, 0, 16384, 16512, 16513, - 16496, 0, 16384, 16512, 16513, 16496, 0, 16384, - 16512, 16513, 16496, 16498, 0, 16384, 16512, 16513, - 16496, 0, 16384, 16512, 16513, 16496, 16500, 0, - 16384, 16512, 16513, 16496, 16500, 0, 16384, 16512, - 16513, 16496, 16504, 16502, 0, 16384, 16512, 16513, - 16496, 0, 16384, 16512, 16513, 16496, 16504, 0, - 16384, 16512, 16513, 16515, 16504, 0, 16384, 16512, - 16513, 16515, 16504, 16506, 0, 16384, 16512, 16513, - 16515, 16504, 0, 16384, 16512, 16513, 16515, 16504, - 16508, 0, 16384, 16512, 16513, 16515, 16504, 16508, - 0, 16384, 16512, 16513, 16515, 16504, 16508, 16510, - 0, 16384, 0, 16384, 16512, 0, 16384, 16512, - 0, 16384, 16512, 16514, 0, 16384, 16512, 0, - 16384, 16512, 16516, 0, 16384, 16512, 16516, 0, - 16384, 16512, 16520, 16518, 0, 16384, 16512, 0, - 16384, 16512, 16520, 0, 16384, 16512, 16520, 0, - 16384, 16512, 16520, 16522, 0, 16384, 16512, 16520, - 0, 16384, 16512, 16528, 16524, 0, 16384, 16512, - 16528, 16524, 0, 16384, 16512, 16528, 16529, 16526, - 0, 16384, 16512, 0, 16384, 16512, 16528, 0, - 16384, 16512, 16528, 0, 16384, 16512, 16528, 16530, - 0, 16384, 16512, 16528, 0, 16384, 16512, 16528, - 16532, 0, 16384, 16512, 16528, 16532, 0, 16384, - 16512, 16528, 16536, 16534, 0, 16384, 16512, 16528, - 0, 16384, 16512, 16544, 16536, 0, 16384, 16512, - 16544, 16536, 0, 16384, 16512, 16544, 16536, 16538, - 0, 16384, 16512, 16544, 16536, 0, 16384, 16512, - 16544, 16545, 16540, 0, 16384, 16512, 16544, 16545, - 16540, 0, 16384, 16512, 16544, 16545, 16540, 16542, - 0, 16384, 16512, 0, 16384, 16512, 16544, 0, - 16384, 16512, 16544, 0, 16384, 16512, 16544, 16546, - 0, 16384, 16512, 16544, 0, 16384, 16512, 16544, - 16548, 0, 16384, 16512, 16544, 16548, 0, 16384, - 16512, 16544, 16552, 16550, 0, 16384, 16512, 16544, - 0, 16384, 16512, 16544, 16552, 0, 16384, 16512, - 16544, 16552, 0, 16384, 16512, 16544, 16552, 16554, - 0, 16384, 16512, 16544, 16552, 0, 16384, 16512, - 16544, 16560, 16556, 0, 16384, 16512, 16544, 16560, - 16556, 0, 16384, 16512, 16544, 16560, 16561, 16558, - 0, 16384, 16512, 16544, 0, 16384, 16512, 16576, - 16560, 0, 16384, 16512, 16576, 16560, 0, 16384, - 16512, 16576, 16560, 16562, 0, 16384, 16512, 16576, - 16560, 0, 16384, 16512, 16576, 16560, 16564, 0, - 16384, 16512, 16576, 16560, 16564, 0, 16384, 16512, - 16576, 16560, 16568, 16566, 0, 16384, 16512, 16576, - 16560, 0, 16384, 16512, 16576, 16577, 16568, 0, - 16384, 16512, 16576, 16577, 16568, 0, 16384, 16512, - 16576, 16577, 16568, 16570, 0, 16384, 16512, 16576, - 16577, 16568, 0, 16384, 16512, 16576, 16577, 16568, - 16572, 0, 16384, 16512, 16576, 16577, 16579, 16572, - 0, 16384, 16512, 16576, 16577, 16579, 16572, 16574, - 0, 16384, 16512, 0, 16384, 16640, 16576, 0, - 16384, 16640, 16576, 0, 16384, 16640, 16576, 16578, - 0, 16384, 16640, 16576, 0, 16384, 16640, 16576, - 16580, 0, 16384, 16640, 16576, 16580, 0, 16384, - 16640, 16576, 16584, 16582, 0, 16384, 16640, 16576, - 0, 16384, 16640, 16576, 16584, 0, 16384, 16640, - 16576, 16584, 0, 16384, 16640, 16576, 16584, 16586, - 0, 16384, 16640, 16576, 16584, 0, 16384, 16640, - 16576, 16592, 16588, 0, 16384, 16640, 16576, 16592, - 16588, 0, 16384, 16640, 16576, 16592, 16593, 16590, - 0, 16384, 16640, 16576, 0, 16384, 16640, 16576, - 16592, 0, 16384, 16640, 16576, 16592, 0, 16384, - 16640, 16576, 16592, 16594, 0, 16384, 16640, 16576, - 16592, 0, 16384, 16640, 16576, 16592, 16596, 0, - 16384, 16640, 16576, 16592, 16596, 0, 16384, 16640, - 16576, 16592, 16600, 16598, 0, 16384, 16640, 16576, - 16592, 0, 16384, 16640, 16576, 16608, 16600, 0, - 16384, 16640, 16576, 16608, 16600, 0, 16384, 16640, - 16576, 16608, 16600, 16602, 0, 16384, 16640, 16576, - 16608, 16600, 0, 16384, 16640, 16576, 16608, 16609, - 16604, 0, 16384, 16640, 16576, 16608, 16609, 16604, - 0, 16384, 16640, 16576, 16608, 16609, 16604, 16606, - 0, 16384, 16640, 16576, 0, 16384, 16640, 16641, - 16608, 0, 16384, 16640, 16641, 16608, 0, 16384, - 16640, 16641, 16608, 16610, 0, 16384, 16640, 16641, - 16608, 0, 16384, 16640, 16641, 16608, 16612, 0, - 16384, 16640, 16641, 16608, 16612, 0, 16384, 16640, - 16641, 16608, 16616, 16614, 0, 16384, 16640, 16641, - 16608, 0, 16384, 16640, 16641, 16608, 16616, 0, - 16384, 16640, 16641, 16608, 16616, 0, 16384, 16640, - 16641, 16608, 16616, 16618, 0, 16384, 16640, 16641, - 16608, 16616, 0, 16384, 16640, 16641, 16608, 16624, - 16620, 0, 16384, 16640, 16641, 16608, 16624, 16620, - 0, 16384, 16640, 16641, 16608, 16624, 16625, 16622, - 0, 16384, 16640, 16641, 16608, 0, 16384, 16640, - 16641, 16608, 16624, 0, 16384, 16640, 16641, 16643, - 16624, 0, 16384, 16640, 16641, 16643, 16624, 16626, - 0, 16384, 16640, 16641, 16643, 16624, 0, 16384, - 16640, 16641, 16643, 16624, 16628, 0, 16384, 16640, - 16641, 16643, 16624, 16628, 0, 16384, 16640, 16641, - 16643, 16624, 16632, 16630, 0, 16384, 16640, 16641, - 16643, 16624, 0, 16384, 16640, 16641, 16643, 16624, - 16632, 0, 16384, 16640, 16641, 16643, 16624, 16632, - 0, 16384, 16640, 16641, 16643, 16624, 16632, 16634, - 0, 16384, 16640, 16641, 16643, 16647, 16632, 0, - 16384, 16640, 16641, 16643, 16647, 16632, 16636, 0, - 16384, 16640, 16641, 16643, 16647, 16632, 16636, 0, - 16384, 16640, 16641, 16643, 16647, 16632, 16636, 16638, - 0, 16384, 0, 16384, 16640, 0, 16384, 16640, - 0, 16384, 16640, 16642, 0, 16384, 16640, 0, - 16384, 16640, 16644, 0, 16384, 16640, 16644, 0, - 16384, 16640, 16648, 16646, 0, 16384, 16640, 0, - 16384, 16640, 16648, 0, 16384, 16640, 16648, 0, - 16384, 16640, 16648, 16650, 0, 16384, 16640, 16648, - 0, 16384, 16640, 16656, 16652, 0, 16384, 16640, - 16656, 16652, 0, 16384, 16640, 16656, 16657, 16654, - 0, 16384, 16640, 0, 16384, 16640, 16656, 0, - 16384, 16640, 16656, 0, 16384, 16640, 16656, 16658, - 0, 16384, 16640, 16656, 0, 16384, 16640, 16656, - 16660, 0, 16384, 16640, 16656, 16660, 0, 16384, - 16640, 16656, 16664, 16662, 0, 16384, 16640, 16656, - 0, 16384, 16640, 16672, 16664, 0, 16384, 16640, - 16672, 16664, 0, 16384, 16640, 16672, 16664, 16666, - 0, 16384, 16640, 16672, 16664, 0, 16384, 16640, - 16672, 16673, 16668, 0, 16384, 16640, 16672, 16673, - 16668, 0, 16384, 16640, 16672, 16673, 16668, 16670, - 0, 16384, 16640, 0, 16384, 16640, 16672, 0, - 16384, 16640, 16672, 0, 16384, 16640, 16672, 16674, - 0, 16384, 16640, 16672, 0, 16384, 16640, 16672, - 16676, 0, 16384, 16640, 16672, 16676, 0, 16384, - 16640, 16672, 16680, 16678, 0, 16384, 16640, 16672, - 0, 16384, 16640, 16672, 16680, 0, 16384, 16640, - 16672, 16680, 0, 16384, 16640, 16672, 16680, 16682, - 0, 16384, 16640, 16672, 16680, 0, 16384, 16640, - 16672, 16688, 16684, 0, 16384, 16640, 16672, 16688, - 16684, 0, 16384, 16640, 16672, 16688, 16689, 16686, - 0, 16384, 16640, 16672, 0, 16384, 16640, 16704, - 16688, 0, 16384, 16640, 16704, 16688, 0, 16384, - 16640, 16704, 16688, 16690, 0, 16384, 16640, 16704, - 16688, 0, 16384, 16640, 16704, 16688, 16692, 0, - 16384, 16640, 16704, 16688, 16692, 0, 16384, 16640, - 16704, 16688, 16696, 16694, 0, 16384, 16640, 16704, - 16688, 0, 16384, 16640, 16704, 16705, 16696, 0, - 16384, 16640, 16704, 16705, 16696, 0, 16384, 16640, - 16704, 16705, 16696, 16698, 0, 16384, 16640, 16704, - 16705, 16696, 0, 16384, 16640, 16704, 16705, 16696, - 16700, 0, 16384, 16640, 16704, 16705, 16707, 16700, - 0, 16384, 16640, 16704, 16705, 16707, 16700, 16702, - 0, 16384, 16640, 0, 16384, 16640, 16704, 0, - 16384, 16640, 16704, 0, 16384, 16640, 16704, 16706, - 0, 16384, 16640, 16704, 0, 16384, 16640, 16704, - 16708, 0, 16384, 16640, 16704, 16708, 0, 16384, - 16640, 16704, 16712, 16710, 0, 16384, 16640, 16704, - 0, 16384, 16640, 16704, 16712, 0, 16384, 16640, - 16704, 16712, 0, 16384, 16640, 16704, 16712, 16714, - 0, 16384, 16640, 16704, 16712, 0, 16384, 16640, - 16704, 16720, 16716, 0, 16384, 16640, 16704, 16720, - 16716, 0, 16384, 16640, 16704, 16720, 16721, 16718, - 0, 16384, 16640, 16704, 0, 16384, 16640, 16704, - 16720, 0, 16384, 16640, 16704, 16720, 0, 16384, - 16640, 16704, 16720, 16722, 0, 16384, 16640, 16704, - 16720, 0, 16384, 16640, 16704, 16720, 16724, 0, - 16384, 16640, 16704, 16720, 16724, 0, 16384, 16640, - 16704, 16720, 16728, 16726, 0, 16384, 16640, 16704, - 16720, 0, 16384, 16640, 16704, 16736, 16728, 0, - 16384, 16640, 16704, 16736, 16728, 0, 16384, 16640, - 16704, 16736, 16728, 16730, 0, 16384, 16640, 16704, - 16736, 16728, 0, 16384, 16640, 16704, 16736, 16737, - 16732, 0, 16384, 16640, 16704, 16736, 16737, 16732, - 0, 16384, 16640, 16704, 16736, 16737, 16732, 16734, - 0, 16384, 16640, 16704, 0, 16384, 16640, 16768, - 16736, 0, 16384, 16640, 16768, 16736, 0, 16384, - 16640, 16768, 16736, 16738, 0, 16384, 16640, 16768, - 16736, 0, 16384, 16640, 16768, 16736, 16740, 0, - 16384, 16640, 16768, 16736, 16740, 0, 16384, 16640, - 16768, 16736, 16744, 16742, 0, 16384, 16640, 16768, - 16736, 0, 16384, 16640, 16768, 16736, 16744, 0, - 16384, 16640, 16768, 16736, 16744, 0, 16384, 16640, - 16768, 16736, 16744, 16746, 0, 16384, 16640, 16768, - 16736, 16744, 0, 16384, 16640, 16768, 16736, 16752, - 16748, 0, 16384, 16640, 16768, 16736, 16752, 16748, - 0, 16384, 16640, 16768, 16736, 16752, 16753, 16750, - 0, 16384, 16640, 16768, 16736, 0, 16384, 16640, - 16768, 16769, 16752, 0, 16384, 16640, 16768, 16769, - 16752, 0, 16384, 16640, 16768, 16769, 16752, 16754, - 0, 16384, 16640, 16768, 16769, 16752, 0, 16384, - 16640, 16768, 16769, 16752, 16756, 0, 16384, 16640, - 16768, 16769, 16752, 16756, 0, 16384, 16640, 16768, - 16769, 16752, 16760, 16758, 0, 16384, 16640, 16768, - 16769, 16752, 0, 16384, 16640, 16768, 16769, 16752, - 16760, 0, 16384, 16640, 16768, 16769, 16771, 16760, - 0, 16384, 16640, 16768, 16769, 16771, 16760, 16762, - 0, 16384, 16640, 16768, 16769, 16771, 16760, 0, - 16384, 16640, 16768, 16769, 16771, 16760, 16764, 0, - 16384, 16640, 16768, 16769, 16771, 16760, 16764, 0, - 16384, 16640, 16768, 16769, 16771, 16760, 16764, 16766, - 0, 16384, 16640, 0, 16384, 16896, 16768, 0, - 16384, 16896, 16768, 0, 16384, 16896, 16768, 16770, - 0, 16384, 16896, 16768, 0, 16384, 16896, 16768, - 16772, 0, 16384, 16896, 16768, 16772, 0, 16384, - 16896, 16768, 16776, 16774, 0, 16384, 16896, 16768, - 0, 16384, 16896, 16768, 16776, 0, 16384, 16896, - 16768, 16776, 0, 16384, 16896, 16768, 16776, 16778, - 0, 16384, 16896, 16768, 16776, 0, 16384, 16896, - 16768, 16784, 16780, 0, 16384, 16896, 16768, 16784, - 16780, 0, 16384, 16896, 16768, 16784, 16785, 16782, - 0, 16384, 16896, 16768, 0, 16384, 16896, 16768, - 16784, 0, 16384, 16896, 16768, 16784, 0, 16384, - 16896, 16768, 16784, 16786, 0, 16384, 16896, 16768, - 16784, 0, 16384, 16896, 16768, 16784, 16788, 0, - 16384, 16896, 16768, 16784, 16788, 0, 16384, 16896, - 16768, 16784, 16792, 16790, 0, 16384, 16896, 16768, - 16784, 0, 16384, 16896, 16768, 16800, 16792, 0, - 16384, 16896, 16768, 16800, 16792, 0, 16384, 16896, - 16768, 16800, 16792, 16794, 0, 16384, 16896, 16768, - 16800, 16792, 0, 16384, 16896, 16768, 16800, 16801, - 16796, 0, 16384, 16896, 16768, 16800, 16801, 16796, - 0, 16384, 16896, 16768, 16800, 16801, 16796, 16798, - 0, 16384, 16896, 16768, 0, 16384, 16896, 16768, - 16800, 0, 16384, 16896, 16768, 16800, 0, 16384, - 16896, 16768, 16800, 16802, 0, 16384, 16896, 16768, - 16800, 0, 16384, 16896, 16768, 16800, 16804, 0, - 16384, 16896, 16768, 16800, 16804, 0, 16384, 16896, - 16768, 16800, 16808, 16806, 0, 16384, 16896, 16768, - 16800, 0, 16384, 16896, 16768, 16800, 16808, 0, - 16384, 16896, 16768, 16800, 16808, 0, 16384, 16896, - 16768, 16800, 16808, 16810, 0, 16384, 16896, 16768, - 16800, 16808, 0, 16384, 16896, 16768, 16800, 16816, - 16812, 0, 16384, 16896, 16768, 16800, 16816, 16812, - 0, 16384, 16896, 16768, 16800, 16816, 16817, 16814, - 0, 16384, 16896, 16768, 16800, 0, 16384, 16896, - 16768, 16832, 16816, 0, 16384, 16896, 16768, 16832, - 16816, 0, 16384, 16896, 16768, 16832, 16816, 16818, - 0, 16384, 16896, 16768, 16832, 16816, 0, 16384, - 16896, 16768, 16832, 16816, 16820, 0, 16384, 16896, - 16768, 16832, 16816, 16820, 0, 16384, 16896, 16768, - 16832, 16816, 16824, 16822, 0, 16384, 16896, 16768, - 16832, 16816, 0, 16384, 16896, 16768, 16832, 16833, - 16824, 0, 16384, 16896, 16768, 16832, 16833, 16824, - 0, 16384, 16896, 16768, 16832, 16833, 16824, 16826, - 0, 16384, 16896, 16768, 16832, 16833, 16824, 0, - 16384, 16896, 16768, 16832, 16833, 16824, 16828, 0, - 16384, 16896, 16768, 16832, 16833, 16835, 16828, 0, - 16384, 16896, 16768, 16832, 16833, 16835, 16828, 16830, - 0, 16384, 16896, 16768, 0, 16384, 16896, 16897, - 16832, 0, 16384, 16896, 16897, 16832, 0, 16384, - 16896, 16897, 16832, 16834, 0, 16384, 16896, 16897, - 16832, 0, 16384, 16896, 16897, 16832, 16836, 0, - 16384, 16896, 16897, 16832, 16836, 0, 16384, 16896, - 16897, 16832, 16840, 16838, 0, 16384, 16896, 16897, - 16832, 0, 16384, 16896, 16897, 16832, 16840, 0, - 16384, 16896, 16897, 16832, 16840, 0, 16384, 16896, - 16897, 16832, 16840, 16842, 0, 16384, 16896, 16897, - 16832, 16840, 0, 16384, 16896, 16897, 16832, 16848, - 16844, 0, 16384, 16896, 16897, 16832, 16848, 16844, - 0, 16384, 16896, 16897, 16832, 16848, 16849, 16846, - 0, 16384, 16896, 16897, 16832, 0, 16384, 16896, - 16897, 16832, 16848, 0, 16384, 16896, 16897, 16832, - 16848, 0, 16384, 16896, 16897, 16832, 16848, 16850, - 0, 16384, 16896, 16897, 16832, 16848, 0, 16384, - 16896, 16897, 16832, 16848, 16852, 0, 16384, 16896, - 16897, 16832, 16848, 16852, 0, 16384, 16896, 16897, - 16832, 16848, 16856, 16854, 0, 16384, 16896, 16897, - 16832, 16848, 0, 16384, 16896, 16897, 16832, 16864, - 16856, 0, 16384, 16896, 16897, 16832, 16864, 16856, - 0, 16384, 16896, 16897, 16832, 16864, 16856, 16858, - 0, 16384, 16896, 16897, 16832, 16864, 16856, 0, - 16384, 16896, 16897, 16832, 16864, 16865, 16860, 0, - 16384, 16896, 16897, 16832, 16864, 16865, 16860, 0, - 16384, 16896, 16897, 16832, 16864, 16865, 16860, 16862, - 0, 16384, 16896, 16897, 16832, 0, 16384, 16896, - 16897, 16832, 16864, 0, 16384, 16896, 16897, 16899, - 16864, 0, 16384, 16896, 16897, 16899, 16864, 16866, - 0, 16384, 16896, 16897, 16899, 16864, 0, 16384, - 16896, 16897, 16899, 16864, 16868, 0, 16384, 16896, - 16897, 16899, 16864, 16868, 0, 16384, 16896, 16897, - 16899, 16864, 16872, 16870, 0, 16384, 16896, 16897, - 16899, 16864, 0, 16384, 16896, 16897, 16899, 16864, - 16872, 0, 16384, 16896, 16897, 16899, 16864, 16872, - 0, 16384, 16896, 16897, 16899, 16864, 16872, 16874, - 0, 16384, 16896, 16897, 16899, 16864, 16872, 0, - 16384, 16896, 16897, 16899, 16864, 16880, 16876, 0, - 16384, 16896, 16897, 16899, 16864, 16880, 16876, 0, - 16384, 16896, 16897, 16899, 16864, 16880, 16881, 16878, - 0, 16384, 16896, 16897, 16899, 16864, 0, 16384, - 16896, 16897, 16899, 16864, 16880, 0, 16384, 16896, - 16897, 16899, 16864, 16880, 0, 16384, 16896, 16897, - 16899, 16864, 16880, 16882, 0, 16384, 16896, 16897, - 16899, 16903, 16880, 0, 16384, 16896, 16897, 16899, - 16903, 16880, 16884, 0, 16384, 16896, 16897, 16899, - 16903, 16880, 16884, 0, 16384, 16896, 16897, 16899, - 16903, 16880, 16888, 16886, 0, 16384, 16896, 16897, - 16899, 16903, 16880, 0, 16384, 16896, 16897, 16899, - 16903, 16880, 16888, 0, 16384, 16896, 16897, 16899, - 16903, 16880, 16888, 0, 16384, 16896, 16897, 16899, - 16903, 16880, 16888, 16890, 0, 16384, 16896, 16897, - 16899, 16903, 16880, 16888, 0, 16384, 16896, 16897, - 16899, 16903, 16880, 16888, 16892, 0, 16384, 16896, - 16897, 16899, 16903, 16880, 16888, 16892, 0, 16384, - 16896, 16897, 16899, 16903, 16880, 16888, 16892, 16894, - 0, 16384, 0, 16384, 16896, 0, 16384, 16896, - 0, 16384, 16896, 16898, 0, 16384, 16896, 0, - 16384, 16896, 16900, 0, 16384, 16896, 16900, 0, - 16384, 16896, 16904, 16902, 0, 16384, 16896, 0, - 16384, 16896, 16904, 0, 16384, 16896, 16904, 0, - 16384, 16896, 16904, 16906, 0, 16384, 16896, 16904, - 0, 16384, 16896, 16912, 16908, 0, 16384, 16896, - 16912, 16908, 0, 16384, 16896, 16912, 16913, 16910, - 0, 16384, 16896, 0, 16384, 16896, 16912, 0, - 16384, 16896, 16912, 0, 16384, 16896, 16912, 16914, - 0, 16384, 16896, 16912, 0, 16384, 16896, 16912, - 16916, 0, 16384, 16896, 16912, 16916, 0, 16384, - 16896, 16912, 16920, 16918, 0, 16384, 16896, 16912, - 0, 16384, 16896, 16928, 16920, 0, 16384, 16896, - 16928, 16920, 0, 16384, 16896, 16928, 16920, 16922, - 0, 16384, 16896, 16928, 16920, 0, 16384, 16896, - 16928, 16929, 16924, 0, 16384, 16896, 16928, 16929, - 16924, 0, 16384, 16896, 16928, 16929, 16924, 16926, - 0, 16384, 16896, 0, 16384, 16896, 16928, 0, - 16384, 16896, 16928, 0, 16384, 16896, 16928, 16930, - 0, 16384, 16896, 16928, 0, 16384, 16896, 16928, - 16932, 0, 16384, 16896, 16928, 16932, 0, 16384, - 16896, 16928, 16936, 16934, 0, 16384, 16896, 16928, - 0, 16384, 16896, 16928, 16936, 0, 16384, 16896, - 16928, 16936, 0, 16384, 16896, 16928, 16936, 16938, - 0, 16384, 16896, 16928, 16936, 0, 16384, 16896, - 16928, 16944, 16940, 0, 16384, 16896, 16928, 16944, - 16940, 0, 16384, 16896, 16928, 16944, 16945, 16942, - 0, 16384, 16896, 16928, 0, 16384, 16896, 16960, - 16944, 0, 16384, 16896, 16960, 16944, 0, 16384, - 16896, 16960, 16944, 16946, 0, 16384, 16896, 16960, - 16944, 0, 16384, 16896, 16960, 16944, 16948, 0, - 16384, 16896, 16960, 16944, 16948, 0, 16384, 16896, - 16960, 16944, 16952, 16950, 0, 16384, 16896, 16960, - 16944, 0, 16384, 16896, 16960, 16961, 16952, 0, - 16384, 16896, 16960, 16961, 16952, 0, 16384, 16896, - 16960, 16961, 16952, 16954, 0, 16384, 16896, 16960, - 16961, 16952, 0, 16384, 16896, 16960, 16961, 16952, - 16956, 0, 16384, 16896, 16960, 16961, 16963, 16956, - 0, 16384, 16896, 16960, 16961, 16963, 16956, 16958, - 0, 16384, 16896, 0, 16384, 16896, 16960, 0, - 16384, 16896, 16960, 0, 16384, 16896, 16960, 16962, - 0, 16384, 16896, 16960, 0, 16384, 16896, 16960, - 16964, 0, 16384, 16896, 16960, 16964, 0, 16384, - 16896, 16960, 16968, 16966, 0, 16384, 16896, 16960, - 0, 16384, 16896, 16960, 16968, 0, 16384, 16896, - 16960, 16968, 0, 16384, 16896, 16960, 16968, 16970, - 0, 16384, 16896, 16960, 16968, 0, 16384, 16896, - 16960, 16976, 16972, 0, 16384, 16896, 16960, 16976, - 16972, 0, 16384, 16896, 16960, 16976, 16977, 16974, - 0, 16384, 16896, 16960, 0, 16384, 16896, 16960, - 16976, 0, 16384, 16896, 16960, 16976, 0, 16384, - 16896, 16960, 16976, 16978, 0, 16384, 16896, 16960, - 16976, 0, 16384, 16896, 16960, 16976, 16980, 0, - 16384, 16896, 16960, 16976, 16980, 0, 16384, 16896, - 16960, 16976, 16984, 16982, 0, 16384, 16896, 16960, - 16976, 0, 16384, 16896, 16960, 16992, 16984, 0, - 16384, 16896, 16960, 16992, 16984, 0, 16384, 16896, - 16960, 16992, 16984, 16986, 0, 16384, 16896, 16960, - 16992, 16984, 0, 16384, 16896, 16960, 16992, 16993, - 16988, 0, 16384, 16896, 16960, 16992, 16993, 16988, - 0, 16384, 16896, 16960, 16992, 16993, 16988, 16990, - 0, 16384, 16896, 16960, 0, 16384, 16896, 17024, - 16992, 0, 16384, 16896, 17024, 16992, 0, 16384, - 16896, 17024, 16992, 16994, 0, 16384, 16896, 17024, - 16992, 0, 16384, 16896, 17024, 16992, 16996, 0, - 16384, 16896, 17024, 16992, 16996, 0, 16384, 16896, - 17024, 16992, 17000, 16998, 0, 16384, 16896, 17024, - 16992, 0, 16384, 16896, 17024, 16992, 17000, 0, - 16384, 16896, 17024, 16992, 17000, 0, 16384, 16896, - 17024, 16992, 17000, 17002, 0, 16384, 16896, 17024, - 16992, 17000, 0, 16384, 16896, 17024, 16992, 17008, - 17004, 0, 16384, 16896, 17024, 16992, 17008, 17004, - 0, 16384, 16896, 17024, 16992, 17008, 17009, 17006, - 0, 16384, 16896, 17024, 16992, 0, 16384, 16896, - 17024, 17025, 17008, 0, 16384, 16896, 17024, 17025, - 17008, 0, 16384, 16896, 17024, 17025, 17008, 17010, - 0, 16384, 16896, 17024, 17025, 17008, 0, 16384, - 16896, 17024, 17025, 17008, 17012, 0, 16384, 16896, - 17024, 17025, 17008, 17012, 0, 16384, 16896, 17024, - 17025, 17008, 17016, 17014, 0, 16384, 16896, 17024, - 17025, 17008, 0, 16384, 16896, 17024, 17025, 17008, - 17016, 0, 16384, 16896, 17024, 17025, 17027, 17016, - 0, 16384, 16896, 17024, 17025, 17027, 17016, 17018, - 0, 16384, 16896, 17024, 17025, 17027, 17016, 0, - 16384, 16896, 17024, 17025, 17027, 17016, 17020, 0, - 16384, 16896, 17024, 17025, 17027, 17016, 17020, 0, - 16384, 16896, 17024, 17025, 17027, 17016, 17020, 17022, - 0, 16384, 16896, 0, 16384, 16896, 17024, 0, - 16384, 16896, 17024, 0, 16384, 16896, 17024, 17026, - 0, 16384, 16896, 17024, 0, 16384, 16896, 17024, - 17028, 0, 16384, 16896, 17024, 17028, 0, 16384, - 16896, 17024, 17032, 17030, 0, 16384, 16896, 17024, - 0, 16384, 16896, 17024, 17032, 0, 16384, 16896, - 17024, 17032, 0, 16384, 16896, 17024, 17032, 17034, - 0, 16384, 16896, 17024, 17032, 0, 16384, 16896, - 17024, 17040, 17036, 0, 16384, 16896, 17024, 17040, - 17036, 0, 16384, 16896, 17024, 17040, 17041, 17038, - 0, 16384, 16896, 17024, 0, 16384, 16896, 17024, - 17040, 0, 16384, 16896, 17024, 17040, 0, 16384, - 16896, 17024, 17040, 17042, 0, 16384, 16896, 17024, - 17040, 0, 16384, 16896, 17024, 17040, 17044, 0, - 16384, 16896, 17024, 17040, 17044, 0, 16384, 16896, - 17024, 17040, 17048, 17046, 0, 16384, 16896, 17024, - 17040, 0, 16384, 16896, 17024, 17056, 17048, 0, - 16384, 16896, 17024, 17056, 17048, 0, 16384, 16896, - 17024, 17056, 17048, 17050, 0, 16384, 16896, 17024, - 17056, 17048, 0, 16384, 16896, 17024, 17056, 17057, - 17052, 0, 16384, 16896, 17024, 17056, 17057, 17052, - 0, 16384, 16896, 17024, 17056, 17057, 17052, 17054, - 0, 16384, 16896, 17024, 0, 16384, 16896, 17024, - 17056, 0, 16384, 16896, 17024, 17056, 0, 16384, - 16896, 17024, 17056, 17058, 0, 16384, 16896, 17024, - 17056, 0, 16384, 16896, 17024, 17056, 17060, 0, - 16384, 16896, 17024, 17056, 17060, 0, 16384, 16896, - 17024, 17056, 17064, 17062, 0, 16384, 16896, 17024, - 17056, 0, 16384, 16896, 17024, 17056, 17064, 0, - 16384, 16896, 17024, 17056, 17064, 0, 16384, 16896, - 17024, 17056, 17064, 17066, 0, 16384, 16896, 17024, - 17056, 17064, 0, 16384, 16896, 17024, 17056, 17072, - 17068, 0, 16384, 16896, 17024, 17056, 17072, 17068, - 0, 16384, 16896, 17024, 17056, 17072, 17073, 17070, - 0, 16384, 16896, 17024, 17056, 0, 16384, 16896, - 17024, 17088, 17072, 0, 16384, 16896, 17024, 17088, - 17072, 0, 16384, 16896, 17024, 17088, 17072, 17074, - 0, 16384, 16896, 17024, 17088, 17072, 0, 16384, - 16896, 17024, 17088, 17072, 17076, 0, 16384, 16896, - 17024, 17088, 17072, 17076, 0, 16384, 16896, 17024, - 17088, 17072, 17080, 17078, 0, 16384, 16896, 17024, - 17088, 17072, 0, 16384, 16896, 17024, 17088, 17089, - 17080, 0, 16384, 16896, 17024, 17088, 17089, 17080, - 0, 16384, 16896, 17024, 17088, 17089, 17080, 17082, - 0, 16384, 16896, 17024, 17088, 17089, 17080, 0, - 16384, 16896, 17024, 17088, 17089, 17080, 17084, 0, - 16384, 16896, 17024, 17088, 17089, 17091, 17084, 0, - 16384, 16896, 17024, 17088, 17089, 17091, 17084, 17086, - 0, 16384, 16896, 17024, 0, 16384, 16896, 17152, - 17088, 0, 16384, 16896, 17152, 17088, 0, 16384, - 16896, 17152, 17088, 17090, 0, 16384, 16896, 17152, - 17088, 0, 16384, 16896, 17152, 17088, 17092, 0, - 16384, 16896, 17152, 17088, 17092, 0, 16384, 16896, - 17152, 17088, 17096, 17094, 0, 16384, 16896, 17152, - 17088, 0, 16384, 16896, 17152, 17088, 17096, 0, - 16384, 16896, 17152, 17088, 17096, 0, 16384, 16896, - 17152, 17088, 17096, 17098, 0, 16384, 16896, 17152, - 17088, 17096, 0, 16384, 16896, 17152, 17088, 17104, - 17100, 0, 16384, 16896, 17152, 17088, 17104, 17100, - 0, 16384, 16896, 17152, 17088, 17104, 17105, 17102, - 0, 16384, 16896, 17152, 17088, 0, 16384, 16896, - 17152, 17088, 17104, 0, 16384, 16896, 17152, 17088, - 17104, 0, 16384, 16896, 17152, 17088, 17104, 17106, - 0, 16384, 16896, 17152, 17088, 17104, 0, 16384, - 16896, 17152, 17088, 17104, 17108, 0, 16384, 16896, - 17152, 17088, 17104, 17108, 0, 16384, 16896, 17152, - 17088, 17104, 17112, 17110, 0, 16384, 16896, 17152, - 17088, 17104, 0, 16384, 16896, 17152, 17088, 17120, - 17112, 0, 16384, 16896, 17152, 17088, 17120, 17112, - 0, 16384, 16896, 17152, 17088, 17120, 17112, 17114, - 0, 16384, 16896, 17152, 17088, 17120, 17112, 0, - 16384, 16896, 17152, 17088, 17120, 17121, 17116, 0, - 16384, 16896, 17152, 17088, 17120, 17121, 17116, 0, - 16384, 16896, 17152, 17088, 17120, 17121, 17116, 17118, - 0, 16384, 16896, 17152, 17088, 0, 16384, 16896, - 17152, 17153, 17120, 0, 16384, 16896, 17152, 17153, - 17120, 0, 16384, 16896, 17152, 17153, 17120, 17122, - 0, 16384, 16896, 17152, 17153, 17120, 0, 16384, - 16896, 17152, 17153, 17120, 17124, 0, 16384, 16896, - 17152, 17153, 17120, 17124, 0, 16384, 16896, 17152, - 17153, 17120, 17128, 17126, 0, 16384, 16896, 17152, - 17153, 17120, 0, 16384, 16896, 17152, 17153, 17120, - 17128, 0, 16384, 16896, 17152, 17153, 17120, 17128, - 0, 16384, 16896, 17152, 17153, 17120, 17128, 17130, - 0, 16384, 16896, 17152, 17153, 17120, 17128, 0, - 16384, 16896, 17152, 17153, 17120, 17136, 17132, 0, - 16384, 16896, 17152, 17153, 17120, 17136, 17132, 0, - 16384, 16896, 17152, 17153, 17120, 17136, 17137, 17134, - 0, 16384, 16896, 17152, 17153, 17120, 0, 16384, - 16896, 17152, 17153, 17120, 17136, 0, 16384, 16896, - 17152, 17153, 17155, 17136, 0, 16384, 16896, 17152, - 17153, 17155, 17136, 17138, 0, 16384, 16896, 17152, - 17153, 17155, 17136, 0, 16384, 16896, 17152, 17153, - 17155, 17136, 17140, 0, 16384, 16896, 17152, 17153, - 17155, 17136, 17140, 0, 16384, 16896, 17152, 17153, - 17155, 17136, 17144, 17142, 0, 16384, 16896, 17152, - 17153, 17155, 17136, 0, 16384, 16896, 17152, 17153, - 17155, 17136, 17144, 0, 16384, 16896, 17152, 17153, - 17155, 17136, 17144, 0, 16384, 16896, 17152, 17153, - 17155, 17136, 17144, 17146, 0, 16384, 16896, 17152, - 17153, 17155, 17159, 17144, 0, 16384, 16896, 17152, - 17153, 17155, 17159, 17144, 17148, 0, 16384, 16896, - 17152, 17153, 17155, 17159, 17144, 17148, 0, 16384, - 16896, 17152, 17153, 17155, 17159, 17144, 17148, 17150, - 0, 16384, 16896, 0, 16384, 17408, 17152, 0, - 16384, 17408, 17152, 0, 16384, 17408, 17152, 17154, - 0, 16384, 17408, 17152, 0, 16384, 17408, 17152, - 17156, 0, 16384, 17408, 17152, 17156, 0, 16384, - 17408, 17152, 17160, 17158, 0, 16384, 17408, 17152, - 0, 16384, 17408, 17152, 17160, 0, 16384, 17408, - 17152, 17160, 0, 16384, 17408, 17152, 17160, 17162, - 0, 16384, 17408, 17152, 17160, 0, 16384, 17408, - 17152, 17168, 17164, 0, 16384, 17408, 17152, 17168, - 17164, 0, 16384, 17408, 17152, 17168, 17169, 17166, - 0, 16384, 17408, 17152, 0, 16384, 17408, 17152, - 17168, 0, 16384, 17408, 17152, 17168, 0, 16384, - 17408, 17152, 17168, 17170, 0, 16384, 17408, 17152, - 17168, 0, 16384, 17408, 17152, 17168, 17172, 0, - 16384, 17408, 17152, 17168, 17172, 0, 16384, 17408, - 17152, 17168, 17176, 17174, 0, 16384, 17408, 17152, - 17168, 0, 16384, 17408, 17152, 17184, 17176, 0, - 16384, 17408, 17152, 17184, 17176, 0, 16384, 17408, - 17152, 17184, 17176, 17178, 0, 16384, 17408, 17152, - 17184, 17176, 0, 16384, 17408, 17152, 17184, 17185, - 17180, 0, 16384, 17408, 17152, 17184, 17185, 17180, - 0, 16384, 17408, 17152, 17184, 17185, 17180, 17182, - 0, 16384, 17408, 17152, 0, 16384, 17408, 17152, - 17184, 0, 16384, 17408, 17152, 17184, 0, 16384, - 17408, 17152, 17184, 17186, 0, 16384, 17408, 17152, - 17184, 0, 16384, 17408, 17152, 17184, 17188, 0, - 16384, 17408, 17152, 17184, 17188, 0, 16384, 17408, - 17152, 17184, 17192, 17190, 0, 16384, 17408, 17152, - 17184, 0, 16384, 17408, 17152, 17184, 17192, 0, - 16384, 17408, 17152, 17184, 17192, 0, 16384, 17408, - 17152, 17184, 17192, 17194, 0, 16384, 17408, 17152, - 17184, 17192, 0, 16384, 17408, 17152, 17184, 17200, - 17196, 0, 16384, 17408, 17152, 17184, 17200, 17196, - 0, 16384, 17408, 17152, 17184, 17200, 17201, 17198, - 0, 16384, 17408, 17152, 17184, 0, 16384, 17408, - 17152, 17216, 17200, 0, 16384, 17408, 17152, 17216, - 17200, 0, 16384, 17408, 17152, 17216, 17200, 17202, - 0, 16384, 17408, 17152, 17216, 17200, 0, 16384, - 17408, 17152, 17216, 17200, 17204, 0, 16384, 17408, - 17152, 17216, 17200, 17204, 0, 16384, 17408, 17152, - 17216, 17200, 17208, 17206, 0, 16384, 17408, 17152, - 17216, 17200, 0, 16384, 17408, 17152, 17216, 17217, - 17208, 0, 16384, 17408, 17152, 17216, 17217, 17208, - 0, 16384, 17408, 17152, 17216, 17217, 17208, 17210, - 0, 16384, 17408, 17152, 17216, 17217, 17208, 0, - 16384, 17408, 17152, 17216, 17217, 17208, 17212, 0, - 16384, 17408, 17152, 17216, 17217, 17219, 17212, 0, - 16384, 17408, 17152, 17216, 17217, 17219, 17212, 17214, - 0, 16384, 17408, 17152, 0, 16384, 17408, 17152, - 17216, 0, 16384, 17408, 17152, 17216, 0, 16384, - 17408, 17152, 17216, 17218, 0, 16384, 17408, 17152, - 17216, 0, 16384, 17408, 17152, 17216, 17220, 0, - 16384, 17408, 17152, 17216, 17220, 0, 16384, 17408, - 17152, 17216, 17224, 17222, 0, 16384, 17408, 17152, - 17216, 0, 16384, 17408, 17152, 17216, 17224, 0, - 16384, 17408, 17152, 17216, 17224, 0, 16384, 17408, - 17152, 17216, 17224, 17226, 0, 16384, 17408, 17152, - 17216, 17224, 0, 16384, 17408, 17152, 17216, 17232, - 17228, 0, 16384, 17408, 17152, 17216, 17232, 17228, - 0, 16384, 17408, 17152, 17216, 17232, 17233, 17230, - 0, 16384, 17408, 17152, 17216, 0, 16384, 17408, - 17152, 17216, 17232, 0, 16384, 17408, 17152, 17216, - 17232, 0, 16384, 17408, 17152, 17216, 17232, 17234, - 0, 16384, 17408, 17152, 17216, 17232, 0, 16384, - 17408, 17152, 17216, 17232, 17236, 0, 16384, 17408, - 17152, 17216, 17232, 17236, 0, 16384, 17408, 17152, - 17216, 17232, 17240, 17238, 0, 16384, 17408, 17152, - 17216, 17232, 0, 16384, 17408, 17152, 17216, 17248, - 17240, 0, 16384, 17408, 17152, 17216, 17248, 17240, - 0, 16384, 17408, 17152, 17216, 17248, 17240, 17242, - 0, 16384, 17408, 17152, 17216, 17248, 17240, 0, - 16384, 17408, 17152, 17216, 17248, 17249, 17244, 0, - 16384, 17408, 17152, 17216, 17248, 17249, 17244, 0, - 16384, 17408, 17152, 17216, 17248, 17249, 17244, 17246, - 0, 16384, 17408, 17152, 17216, 0, 16384, 17408, - 17152, 17280, 17248, 0, 16384, 17408, 17152, 17280, - 17248, 0, 16384, 17408, 17152, 17280, 17248, 17250, - 0, 16384, 17408, 17152, 17280, 17248, 0, 16384, - 17408, 17152, 17280, 17248, 17252, 0, 16384, 17408, - 17152, 17280, 17248, 17252, 0, 16384, 17408, 17152, - 17280, 17248, 17256, 17254, 0, 16384, 17408, 17152, - 17280, 17248, 0, 16384, 17408, 17152, 17280, 17248, - 17256, 0, 16384, 17408, 17152, 17280, 17248, 17256, - 0, 16384, 17408, 17152, 17280, 17248, 17256, 17258, - 0, 16384, 17408, 17152, 17280, 17248, 17256, 0, - 16384, 17408, 17152, 17280, 17248, 17264, 17260, 0, - 16384, 17408, 17152, 17280, 17248, 17264, 17260, 0, - 16384, 17408, 17152, 17280, 17248, 17264, 17265, 17262, - 0, 16384, 17408, 17152, 17280, 17248, 0, 16384, - 17408, 17152, 17280, 17281, 17264, 0, 16384, 17408, - 17152, 17280, 17281, 17264, 0, 16384, 17408, 17152, - 17280, 17281, 17264, 17266, 0, 16384, 17408, 17152, - 17280, 17281, 17264, 0, 16384, 17408, 17152, 17280, - 17281, 17264, 17268, 0, 16384, 17408, 17152, 17280, - 17281, 17264, 17268, 0, 16384, 17408, 17152, 17280, - 17281, 17264, 17272, 17270, 0, 16384, 17408, 17152, - 17280, 17281, 17264, 0, 16384, 17408, 17152, 17280, - 17281, 17264, 17272, 0, 16384, 17408, 17152, 17280, - 17281, 17283, 17272, 0, 16384, 17408, 17152, 17280, - 17281, 17283, 17272, 17274, 0, 16384, 17408, 17152, - 17280, 17281, 17283, 17272, 0, 16384, 17408, 17152, - 17280, 17281, 17283, 17272, 17276, 0, 16384, 17408, - 17152, 17280, 17281, 17283, 17272, 17276, 0, 16384, - 17408, 17152, 17280, 17281, 17283, 17272, 17276, 17278, - 0, 16384, 17408, 17152, 0, 16384, 17408, 17152, - 17280, 0, 16384, 17408, 17409, 17280, 0, 16384, - 17408, 17409, 17280, 17282, 0, 16384, 17408, 17409, - 17280, 0, 16384, 17408, 17409, 17280, 17284, 0, - 16384, 17408, 17409, 17280, 17284, 0, 16384, 17408, - 17409, 17280, 17288, 17286, 0, 16384, 17408, 17409, - 17280, 0, 16384, 17408, 17409, 17280, 17288, 0, - 16384, 17408, 17409, 17280, 17288, 0, 16384, 17408, - 17409, 17280, 17288, 17290, 0, 16384, 17408, 17409, - 17280, 17288, 0, 16384, 17408, 17409, 17280, 17296, - 17292, 0, 16384, 17408, 17409, 17280, 17296, 17292, - 0, 16384, 17408, 17409, 17280, 17296, 17297, 17294, - 0, 16384, 17408, 17409, 17280, 0, 16384, 17408, - 17409, 17280, 17296, 0, 16384, 17408, 17409, 17280, - 17296, 0, 16384, 17408, 17409, 17280, 17296, 17298, - 0, 16384, 17408, 17409, 17280, 17296, 0, 16384, - 17408, 17409, 17280, 17296, 17300, 0, 16384, 17408, - 17409, 17280, 17296, 17300, 0, 16384, 17408, 17409, - 17280, 17296, 17304, 17302, 0, 16384, 17408, 17409, - 17280, 17296, 0, 16384, 17408, 17409, 17280, 17312, - 17304, 0, 16384, 17408, 17409, 17280, 17312, 17304, - 0, 16384, 17408, 17409, 17280, 17312, 17304, 17306, - 0, 16384, 17408, 17409, 17280, 17312, 17304, 0, - 16384, 17408, 17409, 17280, 17312, 17313, 17308, 0, - 16384, 17408, 17409, 17280, 17312, 17313, 17308, 0, - 16384, 17408, 17409, 17280, 17312, 17313, 17308, 17310, - 0, 16384, 17408, 17409, 17280, 0, 16384, 17408, - 17409, 17280, 17312, 0, 16384, 17408, 17409, 17280, - 17312, 0, 16384, 17408, 17409, 17280, 17312, 17314, - 0, 16384, 17408, 17409, 17280, 17312, 0, 16384, - 17408, 17409, 17280, 17312, 17316, 0, 16384, 17408, - 17409, 17280, 17312, 17316, 0, 16384, 17408, 17409, - 17280, 17312, 17320, 17318, 0, 16384, 17408, 17409, - 17280, 17312, 0, 16384, 17408, 17409, 17280, 17312, - 17320, 0, 16384, 17408, 17409, 17280, 17312, 17320, - 0, 16384, 17408, 17409, 17280, 17312, 17320, 17322, - 0, 16384, 17408, 17409, 17280, 17312, 17320, 0, - 16384, 17408, 17409, 17280, 17312, 17328, 17324, 0, - 16384, 17408, 17409, 17280, 17312, 17328, 17324, 0, - 16384, 17408, 17409, 17280, 17312, 17328, 17329, 17326, - 0, 16384, 17408, 17409, 17280, 17312, 0, 16384, - 17408, 17409, 17280, 17344, 17328, 0, 16384, 17408, - 17409, 17280, 17344, 17328, 0, 16384, 17408, 17409, - 17280, 17344, 17328, 17330, 0, 16384, 17408, 17409, - 17280, 17344, 17328, 0, 16384, 17408, 17409, 17280, - 17344, 17328, 17332, 0, 16384, 17408, 17409, 17280, - 17344, 17328, 17332, 0, 16384, 17408, 17409, 17280, - 17344, 17328, 17336, 17334, 0, 16384, 17408, 17409, - 17280, 17344, 17328, 0, 16384, 17408, 17409, 17280, - 17344, 17345, 17336, 0, 16384, 17408, 17409, 17280, - 17344, 17345, 17336, 0, 16384, 17408, 17409, 17280, - 17344, 17345, 17336, 17338, 0, 16384, 17408, 17409, - 17280, 17344, 17345, 17336, 0, 16384, 17408, 17409, - 17280, 17344, 17345, 17336, 17340, 0, 16384, 17408, - 17409, 17280, 17344, 17345, 17347, 17340, 0, 16384, - 17408, 17409, 17280, 17344, 17345, 17347, 17340, 17342, - 0, 16384, 17408, 17409, 17280, 0, 16384, 17408, - 17409, 17280, 17344, 0, 16384, 17408, 17409, 17280, - 17344, 0, 16384, 17408, 17409, 17280, 17344, 17346, - 0, 16384, 17408, 17409, 17411, 17344, 0, 16384, - 17408, 17409, 17411, 17344, 17348, 0, 16384, 17408, - 17409, 17411, 17344, 17348, 0, 16384, 17408, 17409, - 17411, 17344, 17352, 17350, 0, 16384, 17408, 17409, - 17411, 17344, 0, 16384, 17408, 17409, 17411, 17344, - 17352, 0, 16384, 17408, 17409, 17411, 17344, 17352, - 0, 16384, 17408, 17409, 17411, 17344, 17352, 17354, - 0, 16384, 17408, 17409, 17411, 17344, 17352, 0, - 16384, 17408, 17409, 17411, 17344, 17360, 17356, 0, - 16384, 17408, 17409, 17411, 17344, 17360, 17356, 0, - 16384, 17408, 17409, 17411, 17344, 17360, 17361, 17358, - 0, 16384, 17408, 17409, 17411, 17344, 0, 16384, - 17408, 17409, 17411, 17344, 17360, 0, 16384, 17408, - 17409, 17411, 17344, 17360, 0, 16384, 17408, 17409, - 17411, 17344, 17360, 17362, 0, 16384, 17408, 17409, - 17411, 17344, 17360, 0, 16384, 17408, 17409, 17411, - 17344, 17360, 17364, 0, 16384, 17408, 17409, 17411, - 17344, 17360, 17364, 0, 16384, 17408, 17409, 17411, - 17344, 17360, 17368, 17366, 0, 16384, 17408, 17409, - 17411, 17344, 17360, 0, 16384, 17408, 17409, 17411, - 17344, 17376, 17368, 0, 16384, 17408, 17409, 17411, - 17344, 17376, 17368, 0, 16384, 17408, 17409, 17411, - 17344, 17376, 17368, 17370, 0, 16384, 17408, 17409, - 17411, 17344, 17376, 17368, 0, 16384, 17408, 17409, - 17411, 17344, 17376, 17377, 17372, 0, 16384, 17408, - 17409, 17411, 17344, 17376, 17377, 17372, 0, 16384, - 17408, 17409, 17411, 17344, 17376, 17377, 17372, 17374, - 0, 16384, 17408, 17409, 17411, 17344, 0, 16384, - 17408, 17409, 17411, 17344, 17376, 0, 16384, 17408, - 17409, 17411, 17344, 17376, 0, 16384, 17408, 17409, - 17411, 17344, 17376, 17378, 0, 16384, 17408, 17409, - 17411, 17344, 17376, 0, 16384, 17408, 17409, 17411, - 17344, 17376, 17380, 0, 16384, 17408, 17409, 17411, - 17344, 17376, 17380, 0, 16384, 17408, 17409, 17411, - 17344, 17376, 17384, 17382, 0, 16384, 17408, 17409, - 17411, 17415, 17376, 0, 16384, 17408, 17409, 17411, - 17415, 17376, 17384, 0, 16384, 17408, 17409, 17411, - 17415, 17376, 17384, 0, 16384, 17408, 17409, 17411, - 17415, 17376, 17384, 17386, 0, 16384, 17408, 17409, - 17411, 17415, 17376, 17384, 0, 16384, 17408, 17409, - 17411, 17415, 17376, 17392, 17388, 0, 16384, 17408, - 17409, 17411, 17415, 17376, 17392, 17388, 0, 16384, - 17408, 17409, 17411, 17415, 17376, 17392, 17393, 17390, - 0, 16384, 17408, 17409, 17411, 17415, 17376, 0, - 16384, 17408, 17409, 17411, 17415, 17376, 17392, 0, - 16384, 17408, 17409, 17411, 17415, 17376, 17392, 0, - 16384, 17408, 17409, 17411, 17415, 17376, 17392, 17394, - 0, 16384, 17408, 17409, 17411, 17415, 17376, 17392, - 0, 16384, 17408, 17409, 17411, 17415, 17376, 17392, - 17396, 0, 16384, 17408, 17409, 17411, 17415, 17376, - 17392, 17396, 0, 16384, 17408, 17409, 17411, 17415, - 17376, 17392, 17400, 17398, 0, 16384, 17408, 17409, - 17411, 17415, 17376, 17392, 0, 16384, 17408, 17409, - 17411, 17415, 17376, 17392, 17400, 0, 16384, 17408, - 17409, 17411, 17415, 17376, 17392, 17400, 0, 16384, - 17408, 17409, 17411, 17415, 17376, 17392, 17400, 17402, - 0, 16384, 17408, 17409, 17411, 17415, 17376, 17392, - 17400, 0, 16384, 17408, 17409, 17411, 17415, 17376, - 17392, 17400, 17404, 0, 16384, 17408, 17409, 17411, - 17415, 17376, 17392, 17400, 17404, 0, 16384, 17408, - 17409, 17411, 17415, 17376, 17392, 17400, 17404, 17406, - 0, 16384, 0, 16384, 17408, 0, 16384, 17408, - 0, 16384, 17408, 17410, 0, 16384, 17408, 0, - 16384, 17408, 17412, 0, 16384, 17408, 17412, 0, - 16384, 17408, 17416, 17414, 0, 16384, 17408, 0, - 16384, 17408, 17416, 0, 16384, 17408, 17416, 0, - 16384, 17408, 17416, 17418, 0, 16384, 17408, 17416, - 0, 16384, 17408, 17424, 17420, 0, 16384, 17408, - 17424, 17420, 0, 16384, 17408, 17424, 17425, 17422, - 0, 16384, 17408, 0, 16384, 17408, 17424, 0, - 16384, 17408, 17424, 0, 16384, 17408, 17424, 17426, - 0, 16384, 17408, 17424, 0, 16384, 17408, 17424, - 17428, 0, 16384, 17408, 17424, 17428, 0, 16384, - 17408, 17424, 17432, 17430, 0, 16384, 17408, 17424, - 0, 16384, 17408, 17440, 17432, 0, 16384, 17408, - 17440, 17432, 0, 16384, 17408, 17440, 17432, 17434, - 0, 16384, 17408, 17440, 17432, 0, 16384, 17408, - 17440, 17441, 17436, 0, 16384, 17408, 17440, 17441, - 17436, 0, 16384, 17408, 17440, 17441, 17436, 17438, - 0, 16384, 17408, 0, 16384, 17408, 17440, 0, - 16384, 17408, 17440, 0, 16384, 17408, 17440, 17442, - 0, 16384, 17408, 17440, 0, 16384, 17408, 17440, - 17444, 0, 16384, 17408, 17440, 17444, 0, 16384, - 17408, 17440, 17448, 17446, 0, 16384, 17408, 17440, - 0, 16384, 17408, 17440, 17448, 0, 16384, 17408, - 17440, 17448, 0, 16384, 17408, 17440, 17448, 17450, - 0, 16384, 17408, 17440, 17448, 0, 16384, 17408, - 17440, 17456, 17452, 0, 16384, 17408, 17440, 17456, - 17452, 0, 16384, 17408, 17440, 17456, 17457, 17454, - 0, 16384, 17408, 17440, 0, 16384, 17408, 17472, - 17456, 0, 16384, 17408, 17472, 17456, 0, 16384, - 17408, 17472, 17456, 17458, 0, 16384, 17408, 17472, - 17456, 0, 16384, 17408, 17472, 17456, 17460, 0, - 16384, 17408, 17472, 17456, 17460, 0, 16384, 17408, - 17472, 17456, 17464, 17462, 0, 16384, 17408, 17472, - 17456, 0, 16384, 17408, 17472, 17473, 17464, 0, - 16384, 17408, 17472, 17473, 17464, 0, 16384, 17408, - 17472, 17473, 17464, 17466, 0, 16384, 17408, 17472, - 17473, 17464, 0, 16384, 17408, 17472, 17473, 17464, - 17468, 0, 16384, 17408, 17472, 17473, 17475, 17468, - 0, 16384, 17408, 17472, 17473, 17475, 17468, 17470, - 0, 16384, 17408, 0, 16384, 17408, 17472, 0, - 16384, 17408, 17472, 0, 16384, 17408, 17472, 17474, - 0, 16384, 17408, 17472, 0, 16384, 17408, 17472, - 17476, 0, 16384, 17408, 17472, 17476, 0, 16384, - 17408, 17472, 17480, 17478, 0, 16384, 17408, 17472, - 0, 16384, 17408, 17472, 17480, 0, 16384, 17408, - 17472, 17480, 0, 16384, 17408, 17472, 17480, 17482, - 0, 16384, 17408, 17472, 17480, 0, 16384, 17408, - 17472, 17488, 17484, 0, 16384, 17408, 17472, 17488, - 17484, 0, 16384, 17408, 17472, 17488, 17489, 17486, - 0, 16384, 17408, 17472, 0, 16384, 17408, 17472, - 17488, 0, 16384, 17408, 17472, 17488, 0, 16384, - 17408, 17472, 17488, 17490, 0, 16384, 17408, 17472, - 17488, 0, 16384, 17408, 17472, 17488, 17492, 0, - 16384, 17408, 17472, 17488, 17492, 0, 16384, 17408, - 17472, 17488, 17496, 17494, 0, 16384, 17408, 17472, - 17488, 0, 16384, 17408, 17472, 17504, 17496, 0, - 16384, 17408, 17472, 17504, 17496, 0, 16384, 17408, - 17472, 17504, 17496, 17498, 0, 16384, 17408, 17472, - 17504, 17496, 0, 16384, 17408, 17472, 17504, 17505, - 17500, 0, 16384, 17408, 17472, 17504, 17505, 17500, - 0, 16384, 17408, 17472, 17504, 17505, 17500, 17502, - 0, 16384, 17408, 17472, 0, 16384, 17408, 17536, - 17504, 0, 16384, 17408, 17536, 17504, 0, 16384, - 17408, 17536, 17504, 17506, 0, 16384, 17408, 17536, - 17504, 0, 16384, 17408, 17536, 17504, 17508, 0, - 16384, 17408, 17536, 17504, 17508, 0, 16384, 17408, - 17536, 17504, 17512, 17510, 0, 16384, 17408, 17536, - 17504, 0, 16384, 17408, 17536, 17504, 17512, 0, - 16384, 17408, 17536, 17504, 17512, 0, 16384, 17408, - 17536, 17504, 17512, 17514, 0, 16384, 17408, 17536, - 17504, 17512, 0, 16384, 17408, 17536, 17504, 17520, - 17516, 0, 16384, 17408, 17536, 17504, 17520, 17516, - 0, 16384, 17408, 17536, 17504, 17520, 17521, 17518, - 0, 16384, 17408, 17536, 17504, 0, 16384, 17408, - 17536, 17537, 17520, 0, 16384, 17408, 17536, 17537, - 17520, 0, 16384, 17408, 17536, 17537, 17520, 17522, - 0, 16384, 17408, 17536, 17537, 17520, 0, 16384, - 17408, 17536, 17537, 17520, 17524, 0, 16384, 17408, - 17536, 17537, 17520, 17524, 0, 16384, 17408, 17536, - 17537, 17520, 17528, 17526, 0, 16384, 17408, 17536, - 17537, 17520, 0, 16384, 17408, 17536, 17537, 17520, - 17528, 0, 16384, 17408, 17536, 17537, 17539, 17528, - 0, 16384, 17408, 17536, 17537, 17539, 17528, 17530, - 0, 16384, 17408, 17536, 17537, 17539, 17528, 0, - 16384, 17408, 17536, 17537, 17539, 17528, 17532, 0, - 16384, 17408, 17536, 17537, 17539, 17528, 17532, 0, - 16384, 17408, 17536, 17537, 17539, 17528, 17532, 17534, - 0, 16384, 17408, 0, 16384, 17408, 17536, 0, - 16384, 17408, 17536, 0, 16384, 17408, 17536, 17538, - 0, 16384, 17408, 17536, 0, 16384, 17408, 17536, - 17540, 0, 16384, 17408, 17536, 17540, 0, 16384, - 17408, 17536, 17544, 17542, 0, 16384, 17408, 17536, - 0, 16384, 17408, 17536, 17544, 0, 16384, 17408, - 17536, 17544, 0, 16384, 17408, 17536, 17544, 17546, - 0, 16384, 17408, 17536, 17544, 0, 16384, 17408, - 17536, 17552, 17548, 0, 16384, 17408, 17536, 17552, - 17548, 0, 16384, 17408, 17536, 17552, 17553, 17550, - 0, 16384, 17408, 17536, 0, 16384, 17408, 17536, - 17552, 0, 16384, 17408, 17536, 17552, 0, 16384, - 17408, 17536, 17552, 17554, 0, 16384, 17408, 17536, - 17552, 0, 16384, 17408, 17536, 17552, 17556, 0, - 16384, 17408, 17536, 17552, 17556, 0, 16384, 17408, - 17536, 17552, 17560, 17558, 0, 16384, 17408, 17536, - 17552, 0, 16384, 17408, 17536, 17568, 17560, 0, - 16384, 17408, 17536, 17568, 17560, 0, 16384, 17408, - 17536, 17568, 17560, 17562, 0, 16384, 17408, 17536, - 17568, 17560, 0, 16384, 17408, 17536, 17568, 17569, - 17564, 0, 16384, 17408, 17536, 17568, 17569, 17564, - 0, 16384, 17408, 17536, 17568, 17569, 17564, 17566, - 0, 16384, 17408, 17536, 0, 16384, 17408, 17536, - 17568, 0, 16384, 17408, 17536, 17568, 0, 16384, - 17408, 17536, 17568, 17570, 0, 16384, 17408, 17536, - 17568, 0, 16384, 17408, 17536, 17568, 17572, 0, - 16384, 17408, 17536, 17568, 17572, 0, 16384, 17408, - 17536, 17568, 17576, 17574, 0, 16384, 17408, 17536, - 17568, 0, 16384, 17408, 17536, 17568, 17576, 0, - 16384, 17408, 17536, 17568, 17576, 0, 16384, 17408, - 17536, 17568, 17576, 17578, 0, 16384, 17408, 17536, - 17568, 17576, 0, 16384, 17408, 17536, 17568, 17584, - 17580, 0, 16384, 17408, 17536, 17568, 17584, 17580, - 0, 16384, 17408, 17536, 17568, 17584, 17585, 17582, - 0, 16384, 17408, 17536, 17568, 0, 16384, 17408, - 17536, 17600, 17584, 0, 16384, 17408, 17536, 17600, - 17584, 0, 16384, 17408, 17536, 17600, 17584, 17586, - 0, 16384, 17408, 17536, 17600, 17584, 0, 16384, - 17408, 17536, 17600, 17584, 17588, 0, 16384, 17408, - 17536, 17600, 17584, 17588, 0, 16384, 17408, 17536, - 17600, 17584, 17592, 17590, 0, 16384, 17408, 17536, - 17600, 17584, 0, 16384, 17408, 17536, 17600, 17601, - 17592, 0, 16384, 17408, 17536, 17600, 17601, 17592, - 0, 16384, 17408, 17536, 17600, 17601, 17592, 17594, - 0, 16384, 17408, 17536, 17600, 17601, 17592, 0, - 16384, 17408, 17536, 17600, 17601, 17592, 17596, 0, - 16384, 17408, 17536, 17600, 17601, 17603, 17596, 0, - 16384, 17408, 17536, 17600, 17601, 17603, 17596, 17598, - 0, 16384, 17408, 17536, 0, 16384, 17408, 17664, - 17600, 0, 16384, 17408, 17664, 17600, 0, 16384, - 17408, 17664, 17600, 17602, 0, 16384, 17408, 17664, - 17600, 0, 16384, 17408, 17664, 17600, 17604, 0, - 16384, 17408, 17664, 17600, 17604, 0, 16384, 17408, - 17664, 17600, 17608, 17606, 0, 16384, 17408, 17664, - 17600, 0, 16384, 17408, 17664, 17600, 17608, 0, - 16384, 17408, 17664, 17600, 17608, 0, 16384, 17408, - 17664, 17600, 17608, 17610, 0, 16384, 17408, 17664, - 17600, 17608, 0, 16384, 17408, 17664, 17600, 17616, - 17612, 0, 16384, 17408, 17664, 17600, 17616, 17612, - 0, 16384, 17408, 17664, 17600, 17616, 17617, 17614, - 0, 16384, 17408, 17664, 17600, 0, 16384, 17408, - 17664, 17600, 17616, 0, 16384, 17408, 17664, 17600, - 17616, 0, 16384, 17408, 17664, 17600, 17616, 17618, - 0, 16384, 17408, 17664, 17600, 17616, 0, 16384, - 17408, 17664, 17600, 17616, 17620, 0, 16384, 17408, - 17664, 17600, 17616, 17620, 0, 16384, 17408, 17664, - 17600, 17616, 17624, 17622, 0, 16384, 17408, 17664, - 17600, 17616, 0, 16384, 17408, 17664, 17600, 17632, - 17624, 0, 16384, 17408, 17664, 17600, 17632, 17624, - 0, 16384, 17408, 17664, 17600, 17632, 17624, 17626, - 0, 16384, 17408, 17664, 17600, 17632, 17624, 0, - 16384, 17408, 17664, 17600, 17632, 17633, 17628, 0, - 16384, 17408, 17664, 17600, 17632, 17633, 17628, 0, - 16384, 17408, 17664, 17600, 17632, 17633, 17628, 17630, - 0, 16384, 17408, 17664, 17600, 0, 16384, 17408, - 17664, 17665, 17632, 0, 16384, 17408, 17664, 17665, - 17632, 0, 16384, 17408, 17664, 17665, 17632, 17634, - 0, 16384, 17408, 17664, 17665, 17632, 0, 16384, - 17408, 17664, 17665, 17632, 17636, 0, 16384, 17408, - 17664, 17665, 17632, 17636, 0, 16384, 17408, 17664, - 17665, 17632, 17640, 17638, 0, 16384, 17408, 17664, - 17665, 17632, 0, 16384, 17408, 17664, 17665, 17632, - 17640, 0, 16384, 17408, 17664, 17665, 17632, 17640, - 0, 16384, 17408, 17664, 17665, 17632, 17640, 17642, - 0, 16384, 17408, 17664, 17665, 17632, 17640, 0, - 16384, 17408, 17664, 17665, 17632, 17648, 17644, 0, - 16384, 17408, 17664, 17665, 17632, 17648, 17644, 0, - 16384, 17408, 17664, 17665, 17632, 17648, 17649, 17646, - 0, 16384, 17408, 17664, 17665, 17632, 0, 16384, - 17408, 17664, 17665, 17632, 17648, 0, 16384, 17408, - 17664, 17665, 17667, 17648, 0, 16384, 17408, 17664, - 17665, 17667, 17648, 17650, 0, 16384, 17408, 17664, - 17665, 17667, 17648, 0, 16384, 17408, 17664, 17665, - 17667, 17648, 17652, 0, 16384, 17408, 17664, 17665, - 17667, 17648, 17652, 0, 16384, 17408, 17664, 17665, - 17667, 17648, 17656, 17654, 0, 16384, 17408, 17664, - 17665, 17667, 17648, 0, 16384, 17408, 17664, 17665, - 17667, 17648, 17656, 0, 16384, 17408, 17664, 17665, - 17667, 17648, 17656, 0, 16384, 17408, 17664, 17665, - 17667, 17648, 17656, 17658, 0, 16384, 17408, 17664, - 17665, 17667, 17671, 17656, 0, 16384, 17408, 17664, - 17665, 17667, 17671, 17656, 17660, 0, 16384, 17408, - 17664, 17665, 17667, 17671, 17656, 17660, 0, 16384, - 17408, 17664, 17665, 17667, 17671, 17656, 17660, 17662, - 0, 16384, 17408, 0, 16384, 17408, 17664, 0, - 16384, 17408, 17664, 0, 16384, 17408, 17664, 17666, - 0, 16384, 17408, 17664, 0, 16384, 17408, 17664, - 17668, 0, 16384, 17408, 17664, 17668, 0, 16384, - 17408, 17664, 17672, 17670, 0, 16384, 17408, 17664, - 0, 16384, 17408, 17664, 17672, 0, 16384, 17408, - 17664, 17672, 0, 16384, 17408, 17664, 17672, 17674, - 0, 16384, 17408, 17664, 17672, 0, 16384, 17408, - 17664, 17680, 17676, 0, 16384, 17408, 17664, 17680, - 17676, 0, 16384, 17408, 17664, 17680, 17681, 17678, - 0, 16384, 17408, 17664, 0, 16384, 17408, 17664, - 17680, 0, 16384, 17408, 17664, 17680, 0, 16384, - 17408, 17664, 17680, 17682, 0, 16384, 17408, 17664, - 17680, 0, 16384, 17408, 17664, 17680, 17684, 0, - 16384, 17408, 17664, 17680, 17684, 0, 16384, 17408, - 17664, 17680, 17688, 17686, 0, 16384, 17408, 17664, - 17680, 0, 16384, 17408, 17664, 17696, 17688, 0, - 16384, 17408, 17664, 17696, 17688, 0, 16384, 17408, - 17664, 17696, 17688, 17690, 0, 16384, 17408, 17664, - 17696, 17688, 0, 16384, 17408, 17664, 17696, 17697, - 17692, 0, 16384, 17408, 17664, 17696, 17697, 17692, - 0, 16384, 17408, 17664, 17696, 17697, 17692, 17694, - 0, 16384, 17408, 17664, 0, 16384, 17408, 17664, - 17696, 0, 16384, 17408, 17664, 17696, 0, 16384, - 17408, 17664, 17696, 17698, 0, 16384, 17408, 17664, - 17696, 0, 16384, 17408, 17664, 17696, 17700, 0, - 16384, 17408, 17664, 17696, 17700, 0, 16384, 17408, - 17664, 17696, 17704, 17702, 0, 16384, 17408, 17664, - 17696, 0, 16384, 17408, 17664, 17696, 17704, 0, - 16384, 17408, 17664, 17696, 17704, 0, 16384, 17408, - 17664, 17696, 17704, 17706, 0, 16384, 17408, 17664, - 17696, 17704, 0, 16384, 17408, 17664, 17696, 17712, - 17708, 0, 16384, 17408, 17664, 17696, 17712, 17708, - 0, 16384, 17408, 17664, 17696, 17712, 17713, 17710, - 0, 16384, 17408, 17664, 17696, 0, 16384, 17408, - 17664, 17728, 17712, 0, 16384, 17408, 17664, 17728, - 17712, 0, 16384, 17408, 17664, 17728, 17712, 17714, - 0, 16384, 17408, 17664, 17728, 17712, 0, 16384, - 17408, 17664, 17728, 17712, 17716, 0, 16384, 17408, - 17664, 17728, 17712, 17716, 0, 16384, 17408, 17664, - 17728, 17712, 17720, 17718, 0, 16384, 17408, 17664, - 17728, 17712, 0, 16384, 17408, 17664, 17728, 17729, - 17720, 0, 16384, 17408, 17664, 17728, 17729, 17720, - 0, 16384, 17408, 17664, 17728, 17729, 17720, 17722, - 0, 16384, 17408, 17664, 17728, 17729, 17720, 0, - 16384, 17408, 17664, 17728, 17729, 17720, 17724, 0, - 16384, 17408, 17664, 17728, 17729, 17731, 17724, 0, - 16384, 17408, 17664, 17728, 17729, 17731, 17724, 17726, - 0, 16384, 17408, 17664, 0, 16384, 17408, 17664, - 17728, 0, 16384, 17408, 17664, 17728, 0, 16384, - 17408, 17664, 17728, 17730, 0, 16384, 17408, 17664, - 17728, 0, 16384, 17408, 17664, 17728, 17732, 0, - 16384, 17408, 17664, 17728, 17732, 0, 16384, 17408, - 17664, 17728, 17736, 17734, 0, 16384, 17408, 17664, - 17728, 0, 16384, 17408, 17664, 17728, 17736, 0, - 16384, 17408, 17664, 17728, 17736, 0, 16384, 17408, - 17664, 17728, 17736, 17738, 0, 16384, 17408, 17664, - 17728, 17736, 0, 16384, 17408, 17664, 17728, 17744, - 17740, 0, 16384, 17408, 17664, 17728, 17744, 17740, - 0, 16384, 17408, 17664, 17728, 17744, 17745, 17742, - 0, 16384, 17408, 17664, 17728, 0, 16384, 17408, - 17664, 17728, 17744, 0, 16384, 17408, 17664, 17728, - 17744, 0, 16384, 17408, 17664, 17728, 17744, 17746, - 0, 16384, 17408, 17664, 17728, 17744, 0, 16384, - 17408, 17664, 17728, 17744, 17748, 0, 16384, 17408, - 17664, 17728, 17744, 17748, 0, 16384, 17408, 17664, - 17728, 17744, 17752, 17750, 0, 16384, 17408, 17664, - 17728, 17744, 0, 16384, 17408, 17664, 17728, 17760, - 17752, 0, 16384, 17408, 17664, 17728, 17760, 17752, - 0, 16384, 17408, 17664, 17728, 17760, 17752, 17754, - 0, 16384, 17408, 17664, 17728, 17760, 17752, 0, - 16384, 17408, 17664, 17728, 17760, 17761, 17756, 0, - 16384, 17408, 17664, 17728, 17760, 17761, 17756, 0, - 16384, 17408, 17664, 17728, 17760, 17761, 17756, 17758, - 0, 16384, 17408, 17664, 17728, 0, 16384, 17408, - 17664, 17792, 17760, 0, 16384, 17408, 17664, 17792, - 17760, 0, 16384, 17408, 17664, 17792, 17760, 17762, - 0, 16384, 17408, 17664, 17792, 17760, 0, 16384, - 17408, 17664, 17792, 17760, 17764, 0, 16384, 17408, - 17664, 17792, 17760, 17764, 0, 16384, 17408, 17664, - 17792, 17760, 17768, 17766, 0, 16384, 17408, 17664, - 17792, 17760, 0, 16384, 17408, 17664, 17792, 17760, - 17768, 0, 16384, 17408, 17664, 17792, 17760, 17768, - 0, 16384, 17408, 17664, 17792, 17760, 17768, 17770, - 0, 16384, 17408, 17664, 17792, 17760, 17768, 0, - 16384, 17408, 17664, 17792, 17760, 17776, 17772, 0, - 16384, 17408, 17664, 17792, 17760, 17776, 17772, 0, - 16384, 17408, 17664, 17792, 17760, 17776, 17777, 17774, - 0, 16384, 17408, 17664, 17792, 17760, 0, 16384, - 17408, 17664, 17792, 17793, 17776, 0, 16384, 17408, - 17664, 17792, 17793, 17776, 0, 16384, 17408, 17664, - 17792, 17793, 17776, 17778, 0, 16384, 17408, 17664, - 17792, 17793, 17776, 0, 16384, 17408, 17664, 17792, - 17793, 17776, 17780, 0, 16384, 17408, 17664, 17792, - 17793, 17776, 17780, 0, 16384, 17408, 17664, 17792, - 17793, 17776, 17784, 17782, 0, 16384, 17408, 17664, - 17792, 17793, 17776, 0, 16384, 17408, 17664, 17792, - 17793, 17776, 17784, 0, 16384, 17408, 17664, 17792, - 17793, 17795, 17784, 0, 16384, 17408, 17664, 17792, - 17793, 17795, 17784, 17786, 0, 16384, 17408, 17664, - 17792, 17793, 17795, 17784, 0, 16384, 17408, 17664, - 17792, 17793, 17795, 17784, 17788, 0, 16384, 17408, - 17664, 17792, 17793, 17795, 17784, 17788, 0, 16384, - 17408, 17664, 17792, 17793, 17795, 17784, 17788, 17790, - 0, 16384, 17408, 17664, 0, 16384, 17408, 17920, - 17792, 0, 16384, 17408, 17920, 17792, 0, 16384, - 17408, 17920, 17792, 17794, 0, 16384, 17408, 17920, - 17792, 0, 16384, 17408, 17920, 17792, 17796, 0, - 16384, 17408, 17920, 17792, 17796, 0, 16384, 17408, - 17920, 17792, 17800, 17798, 0, 16384, 17408, 17920, - 17792, 0, 16384, 17408, 17920, 17792, 17800, 0, - 16384, 17408, 17920, 17792, 17800, 0, 16384, 17408, - 17920, 17792, 17800, 17802, 0, 16384, 17408, 17920, - 17792, 17800, 0, 16384, 17408, 17920, 17792, 17808, - 17804, 0, 16384, 17408, 17920, 17792, 17808, 17804, - 0, 16384, 17408, 17920, 17792, 17808, 17809, 17806, - 0, 16384, 17408, 17920, 17792, 0, 16384, 17408, - 17920, 17792, 17808, 0, 16384, 17408, 17920, 17792, - 17808, 0, 16384, 17408, 17920, 17792, 17808, 17810, - 0, 16384, 17408, 17920, 17792, 17808, 0, 16384, - 17408, 17920, 17792, 17808, 17812, 0, 16384, 17408, - 17920, 17792, 17808, 17812, 0, 16384, 17408, 17920, - 17792, 17808, 17816, 17814, 0, 16384, 17408, 17920, - 17792, 17808, 0, 16384, 17408, 17920, 17792, 17824, - 17816, 0, 16384, 17408, 17920, 17792, 17824, 17816, - 0, 16384, 17408, 17920, 17792, 17824, 17816, 17818, - 0, 16384, 17408, 17920, 17792, 17824, 17816, 0, - 16384, 17408, 17920, 17792, 17824, 17825, 17820, 0, - 16384, 17408, 17920, 17792, 17824, 17825, 17820, 0, - 16384, 17408, 17920, 17792, 17824, 17825, 17820, 17822, - 0, 16384, 17408, 17920, 17792, 0, 16384, 17408, - 17920, 17792, 17824, 0, 16384, 17408, 17920, 17792, - 17824, 0, 16384, 17408, 17920, 17792, 17824, 17826, - 0, 16384, 17408, 17920, 17792, 17824, 0, 16384, - 17408, 17920, 17792, 17824, 17828, 0, 16384, 17408, - 17920, 17792, 17824, 17828, 0, 16384, 17408, 17920, - 17792, 17824, 17832, 17830, 0, 16384, 17408, 17920, - 17792, 17824, 0, 16384, 17408, 17920, 17792, 17824, - 17832, 0, 16384, 17408, 17920, 17792, 17824, 17832, - 0, 16384, 17408, 17920, 17792, 17824, 17832, 17834, - 0, 16384, 17408, 17920, 17792, 17824, 17832, 0, - 16384, 17408, 17920, 17792, 17824, 17840, 17836, 0, - 16384, 17408, 17920, 17792, 17824, 17840, 17836, 0, - 16384, 17408, 17920, 17792, 17824, 17840, 17841, 17838, - 0, 16384, 17408, 17920, 17792, 17824, 0, 16384, - 17408, 17920, 17792, 17856, 17840, 0, 16384, 17408, - 17920, 17792, 17856, 17840, 0, 16384, 17408, 17920, - 17792, 17856, 17840, 17842, 0, 16384, 17408, 17920, - 17792, 17856, 17840, 0, 16384, 17408, 17920, 17792, - 17856, 17840, 17844, 0, 16384, 17408, 17920, 17792, - 17856, 17840, 17844, 0, 16384, 17408, 17920, 17792, - 17856, 17840, 17848, 17846, 0, 16384, 17408, 17920, - 17792, 17856, 17840, 0, 16384, 17408, 17920, 17792, - 17856, 17857, 17848, 0, 16384, 17408, 17920, 17792, - 17856, 17857, 17848, 0, 16384, 17408, 17920, 17792, - 17856, 17857, 17848, 17850, 0, 16384, 17408, 17920, - 17792, 17856, 17857, 17848, 0, 16384, 17408, 17920, - 17792, 17856, 17857, 17848, 17852, 0, 16384, 17408, - 17920, 17792, 17856, 17857, 17859, 17852, 0, 16384, - 17408, 17920, 17792, 17856, 17857, 17859, 17852, 17854, - 0, 16384, 17408, 17920, 17792, 0, 16384, 17408, - 17920, 17921, 17856, 0, 16384, 17408, 17920, 17921, - 17856, 0, 16384, 17408, 17920, 17921, 17856, 17858, - 0, 16384, 17408, 17920, 17921, 17856, 0, 16384, - 17408, 17920, 17921, 17856, 17860, 0, 16384, 17408, - 17920, 17921, 17856, 17860, 0, 16384, 17408, 17920, - 17921, 17856, 17864, 17862, 0, 16384, 17408, 17920, - 17921, 17856, 0, 16384, 17408, 17920, 17921, 17856, - 17864, 0, 16384, 17408, 17920, 17921, 17856, 17864, - 0, 16384, 17408, 17920, 17921, 17856, 17864, 17866, - 0, 16384, 17408, 17920, 17921, 17856, 17864, 0, - 16384, 17408, 17920, 17921, 17856, 17872, 17868, 0, - 16384, 17408, 17920, 17921, 17856, 17872, 17868, 0, - 16384, 17408, 17920, 17921, 17856, 17872, 17873, 17870, - 0, 16384, 17408, 17920, 17921, 17856, 0, 16384, - 17408, 17920, 17921, 17856, 17872, 0, 16384, 17408, - 17920, 17921, 17856, 17872, 0, 16384, 17408, 17920, - 17921, 17856, 17872, 17874, 0, 16384, 17408, 17920, - 17921, 17856, 17872, 0, 16384, 17408, 17920, 17921, - 17856, 17872, 17876, 0, 16384, 17408, 17920, 17921, - 17856, 17872, 17876, 0, 16384, 17408, 17920, 17921, - 17856, 17872, 17880, 17878, 0, 16384, 17408, 17920, - 17921, 17856, 17872, 0, 16384, 17408, 17920, 17921, - 17856, 17888, 17880, 0, 16384, 17408, 17920, 17921, - 17856, 17888, 17880, 0, 16384, 17408, 17920, 17921, - 17856, 17888, 17880, 17882, 0, 16384, 17408, 17920, - 17921, 17856, 17888, 17880, 0, 16384, 17408, 17920, - 17921, 17856, 17888, 17889, 17884, 0, 16384, 17408, - 17920, 17921, 17856, 17888, 17889, 17884, 0, 16384, - 17408, 17920, 17921, 17856, 17888, 17889, 17884, 17886, - 0, 16384, 17408, 17920, 17921, 17856, 0, 16384, - 17408, 17920, 17921, 17856, 17888, 0, 16384, 17408, - 17920, 17921, 17923, 17888, 0, 16384, 17408, 17920, - 17921, 17923, 17888, 17890, 0, 16384, 17408, 17920, - 17921, 17923, 17888, 0, 16384, 17408, 17920, 17921, - 17923, 17888, 17892, 0, 16384, 17408, 17920, 17921, - 17923, 17888, 17892, 0, 16384, 17408, 17920, 17921, - 17923, 17888, 17896, 17894, 0, 16384, 17408, 17920, - 17921, 17923, 17888, 0, 16384, 17408, 17920, 17921, - 17923, 17888, 17896, 0, 16384, 17408, 17920, 17921, - 17923, 17888, 17896, 0, 16384, 17408, 17920, 17921, - 17923, 17888, 17896, 17898, 0, 16384, 17408, 17920, - 17921, 17923, 17888, 17896, 0, 16384, 17408, 17920, - 17921, 17923, 17888, 17904, 17900, 0, 16384, 17408, - 17920, 17921, 17923, 17888, 17904, 17900, 0, 16384, - 17408, 17920, 17921, 17923, 17888, 17904, 17905, 17902, - 0, 16384, 17408, 17920, 17921, 17923, 17888, 0, - 16384, 17408, 17920, 17921, 17923, 17888, 17904, 0, - 16384, 17408, 17920, 17921, 17923, 17888, 17904, 0, - 16384, 17408, 17920, 17921, 17923, 17888, 17904, 17906, - 0, 16384, 17408, 17920, 17921, 17923, 17927, 17904, - 0, 16384, 17408, 17920, 17921, 17923, 17927, 17904, - 17908, 0, 16384, 17408, 17920, 17921, 17923, 17927, - 17904, 17908, 0, 16384, 17408, 17920, 17921, 17923, - 17927, 17904, 17912, 17910, 0, 16384, 17408, 17920, - 17921, 17923, 17927, 17904, 0, 16384, 17408, 17920, - 17921, 17923, 17927, 17904, 17912, 0, 16384, 17408, - 17920, 17921, 17923, 17927, 17904, 17912, 0, 16384, - 17408, 17920, 17921, 17923, 17927, 17904, 17912, 17914, - 0, 16384, 17408, 17920, 17921, 17923, 17927, 17904, - 17912, 0, 16384, 17408, 17920, 17921, 17923, 17927, - 17904, 17912, 17916, 0, 16384, 17408, 17920, 17921, - 17923, 17927, 17904, 17912, 17916, 0, 16384, 17408, - 17920, 17921, 17923, 17927, 17904, 17912, 17916, 17918, - 0, 16384, 17408, 0, 16384, 18432, 17920, 0, - 16384, 18432, 17920, 0, 16384, 18432, 17920, 17922, - 0, 16384, 18432, 17920, 0, 16384, 18432, 17920, - 17924, 0, 16384, 18432, 17920, 17924, 0, 16384, - 18432, 17920, 17928, 17926, 0, 16384, 18432, 17920, - 0, 16384, 18432, 17920, 17928, 0, 16384, 18432, - 17920, 17928, 0, 16384, 18432, 17920, 17928, 17930, - 0, 16384, 18432, 17920, 17928, 0, 16384, 18432, - 17920, 17936, 17932, 0, 16384, 18432, 17920, 17936, - 17932, 0, 16384, 18432, 17920, 17936, 17937, 17934, - 0, 16384, 18432, 17920, 0, 16384, 18432, 17920, - 17936, 0, 16384, 18432, 17920, 17936, 0, 16384, - 18432, 17920, 17936, 17938, 0, 16384, 18432, 17920, - 17936, 0, 16384, 18432, 17920, 17936, 17940, 0, - 16384, 18432, 17920, 17936, 17940, 0, 16384, 18432, - 17920, 17936, 17944, 17942, 0, 16384, 18432, 17920, - 17936, 0, 16384, 18432, 17920, 17952, 17944, 0, - 16384, 18432, 17920, 17952, 17944, 0, 16384, 18432, - 17920, 17952, 17944, 17946, 0, 16384, 18432, 17920, - 17952, 17944, 0, 16384, 18432, 17920, 17952, 17953, - 17948, 0, 16384, 18432, 17920, 17952, 17953, 17948, - 0, 16384, 18432, 17920, 17952, 17953, 17948, 17950, - 0, 16384, 18432, 17920, 0, 16384, 18432, 17920, - 17952, 0, 16384, 18432, 17920, 17952, 0, 16384, - 18432, 17920, 17952, 17954, 0, 16384, 18432, 17920, - 17952, 0, 16384, 18432, 17920, 17952, 17956, 0, - 16384, 18432, 17920, 17952, 17956, 0, 16384, 18432, - 17920, 17952, 17960, 17958, 0, 16384, 18432, 17920, - 17952, 0, 16384, 18432, 17920, 17952, 17960, 0, - 16384, 18432, 17920, 17952, 17960, 0, 16384, 18432, - 17920, 17952, 17960, 17962, 0, 16384, 18432, 17920, - 17952, 17960, 0, 16384, 18432, 17920, 17952, 17968, - 17964, 0, 16384, 18432, 17920, 17952, 17968, 17964, - 0, 16384, 18432, 17920, 17952, 17968, 17969, 17966, - 0, 16384, 18432, 17920, 17952, 0, 16384, 18432, - 17920, 17984, 17968, 0, 16384, 18432, 17920, 17984, - 17968, 0, 16384, 18432, 17920, 17984, 17968, 17970, - 0, 16384, 18432, 17920, 17984, 17968, 0, 16384, - 18432, 17920, 17984, 17968, 17972, 0, 16384, 18432, - 17920, 17984, 17968, 17972, 0, 16384, 18432, 17920, - 17984, 17968, 17976, 17974, 0, 16384, 18432, 17920, - 17984, 17968, 0, 16384, 18432, 17920, 17984, 17985, - 17976, 0, 16384, 18432, 17920, 17984, 17985, 17976, - 0, 16384, 18432, 17920, 17984, 17985, 17976, 17978, - 0, 16384, 18432, 17920, 17984, 17985, 17976, 0, - 16384, 18432, 17920, 17984, 17985, 17976, 17980, 0, - 16384, 18432, 17920, 17984, 17985, 17987, 17980, 0, - 16384, 18432, 17920, 17984, 17985, 17987, 17980, 17982, - 0, 16384, 18432, 17920, 0, 16384, 18432, 17920, - 17984, 0, 16384, 18432, 17920, 17984, 0, 16384, - 18432, 17920, 17984, 17986, 0, 16384, 18432, 17920, - 17984, 0, 16384, 18432, 17920, 17984, 17988, 0, - 16384, 18432, 17920, 17984, 17988, 0, 16384, 18432, - 17920, 17984, 17992, 17990, 0, 16384, 18432, 17920, - 17984, 0, 16384, 18432, 17920, 17984, 17992, 0, - 16384, 18432, 17920, 17984, 17992, 0, 16384, 18432, - 17920, 17984, 17992, 17994, 0, 16384, 18432, 17920, - 17984, 17992, 0, 16384, 18432, 17920, 17984, 18000, - 17996, 0, 16384, 18432, 17920, 17984, 18000, 17996, - 0, 16384, 18432, 17920, 17984, 18000, 18001, 17998, - 0, 16384, 18432, 17920, 17984, 0, 16384, 18432, - 17920, 17984, 18000, 0, 16384, 18432, 17920, 17984, - 18000, 0, 16384, 18432, 17920, 17984, 18000, 18002, - 0, 16384, 18432, 17920, 17984, 18000, 0, 16384, - 18432, 17920, 17984, 18000, 18004, 0, 16384, 18432, - 17920, 17984, 18000, 18004, 0, 16384, 18432, 17920, - 17984, 18000, 18008, 18006, 0, 16384, 18432, 17920, - 17984, 18000, 0, 16384, 18432, 17920, 17984, 18016, - 18008, 0, 16384, 18432, 17920, 17984, 18016, 18008, - 0, 16384, 18432, 17920, 17984, 18016, 18008, 18010, - 0, 16384, 18432, 17920, 17984, 18016, 18008, 0, - 16384, 18432, 17920, 17984, 18016, 18017, 18012, 0, - 16384, 18432, 17920, 17984, 18016, 18017, 18012, 0, - 16384, 18432, 17920, 17984, 18016, 18017, 18012, 18014, - 0, 16384, 18432, 17920, 17984, 0, 16384, 18432, - 17920, 18048, 18016, 0, 16384, 18432, 17920, 18048, - 18016, 0, 16384, 18432, 17920, 18048, 18016, 18018, - 0, 16384, 18432, 17920, 18048, 18016, 0, 16384, - 18432, 17920, 18048, 18016, 18020, 0, 16384, 18432, - 17920, 18048, 18016, 18020, 0, 16384, 18432, 17920, - 18048, 18016, 18024, 18022, 0, 16384, 18432, 17920, - 18048, 18016, 0, 16384, 18432, 17920, 18048, 18016, - 18024, 0, 16384, 18432, 17920, 18048, 18016, 18024, - 0, 16384, 18432, 17920, 18048, 18016, 18024, 18026, - 0, 16384, 18432, 17920, 18048, 18016, 18024, 0, - 16384, 18432, 17920, 18048, 18016, 18032, 18028, 0, - 16384, 18432, 17920, 18048, 18016, 18032, 18028, 0, - 16384, 18432, 17920, 18048, 18016, 18032, 18033, 18030, - 0, 16384, 18432, 17920, 18048, 18016, 0, 16384, - 18432, 17920, 18048, 18049, 18032, 0, 16384, 18432, - 17920, 18048, 18049, 18032, 0, 16384, 18432, 17920, - 18048, 18049, 18032, 18034, 0, 16384, 18432, 17920, - 18048, 18049, 18032, 0, 16384, 18432, 17920, 18048, - 18049, 18032, 18036, 0, 16384, 18432, 17920, 18048, - 18049, 18032, 18036, 0, 16384, 18432, 17920, 18048, - 18049, 18032, 18040, 18038, 0, 16384, 18432, 17920, - 18048, 18049, 18032, 0, 16384, 18432, 17920, 18048, - 18049, 18032, 18040, 0, 16384, 18432, 17920, 18048, - 18049, 18051, 18040, 0, 16384, 18432, 17920, 18048, - 18049, 18051, 18040, 18042, 0, 16384, 18432, 17920, - 18048, 18049, 18051, 18040, 0, 16384, 18432, 17920, - 18048, 18049, 18051, 18040, 18044, 0, 16384, 18432, - 17920, 18048, 18049, 18051, 18040, 18044, 0, 16384, - 18432, 17920, 18048, 18049, 18051, 18040, 18044, 18046, - 0, 16384, 18432, 17920, 0, 16384, 18432, 17920, - 18048, 0, 16384, 18432, 17920, 18048, 0, 16384, - 18432, 17920, 18048, 18050, 0, 16384, 18432, 17920, - 18048, 0, 16384, 18432, 17920, 18048, 18052, 0, - 16384, 18432, 17920, 18048, 18052, 0, 16384, 18432, - 17920, 18048, 18056, 18054, 0, 16384, 18432, 17920, - 18048, 0, 16384, 18432, 17920, 18048, 18056, 0, - 16384, 18432, 17920, 18048, 18056, 0, 16384, 18432, - 17920, 18048, 18056, 18058, 0, 16384, 18432, 17920, - 18048, 18056, 0, 16384, 18432, 17920, 18048, 18064, - 18060, 0, 16384, 18432, 17920, 18048, 18064, 18060, - 0, 16384, 18432, 17920, 18048, 18064, 18065, 18062, - 0, 16384, 18432, 17920, 18048, 0, 16384, 18432, - 17920, 18048, 18064, 0, 16384, 18432, 17920, 18048, - 18064, 0, 16384, 18432, 17920, 18048, 18064, 18066, - 0, 16384, 18432, 17920, 18048, 18064, 0, 16384, - 18432, 17920, 18048, 18064, 18068, 0, 16384, 18432, - 17920, 18048, 18064, 18068, 0, 16384, 18432, 17920, - 18048, 18064, 18072, 18070, 0, 16384, 18432, 17920, - 18048, 18064, 0, 16384, 18432, 17920, 18048, 18080, - 18072, 0, 16384, 18432, 17920, 18048, 18080, 18072, - 0, 16384, 18432, 17920, 18048, 18080, 18072, 18074, - 0, 16384, 18432, 17920, 18048, 18080, 18072, 0, - 16384, 18432, 17920, 18048, 18080, 18081, 18076, 0, - 16384, 18432, 17920, 18048, 18080, 18081, 18076, 0, - 16384, 18432, 17920, 18048, 18080, 18081, 18076, 18078, - 0, 16384, 18432, 17920, 18048, 0, 16384, 18432, - 17920, 18048, 18080, 0, 16384, 18432, 17920, 18048, - 18080, 0, 16384, 18432, 17920, 18048, 18080, 18082, - 0, 16384, 18432, 17920, 18048, 18080, 0, 16384, - 18432, 17920, 18048, 18080, 18084, 0, 16384, 18432, - 17920, 18048, 18080, 18084, 0, 16384, 18432, 17920, - 18048, 18080, 18088, 18086, 0, 16384, 18432, 17920, - 18048, 18080, 0, 16384, 18432, 17920, 18048, 18080, - 18088, 0, 16384, 18432, 17920, 18048, 18080, 18088, - 0, 16384, 18432, 17920, 18048, 18080, 18088, 18090, - 0, 16384, 18432, 17920, 18048, 18080, 18088, 0, - 16384, 18432, 17920, 18048, 18080, 18096, 18092, 0, - 16384, 18432, 17920, 18048, 18080, 18096, 18092, 0, - 16384, 18432, 17920, 18048, 18080, 18096, 18097, 18094, - 0, 16384, 18432, 17920, 18048, 18080, 0, 16384, - 18432, 17920, 18048, 18112, 18096, 0, 16384, 18432, - 17920, 18048, 18112, 18096, 0, 16384, 18432, 17920, - 18048, 18112, 18096, 18098, 0, 16384, 18432, 17920, - 18048, 18112, 18096, 0, 16384, 18432, 17920, 18048, - 18112, 18096, 18100, 0, 16384, 18432, 17920, 18048, - 18112, 18096, 18100, 0, 16384, 18432, 17920, 18048, - 18112, 18096, 18104, 18102, 0, 16384, 18432, 17920, - 18048, 18112, 18096, 0, 16384, 18432, 17920, 18048, - 18112, 18113, 18104, 0, 16384, 18432, 17920, 18048, - 18112, 18113, 18104, 0, 16384, 18432, 17920, 18048, - 18112, 18113, 18104, 18106, 0, 16384, 18432, 17920, - 18048, 18112, 18113, 18104, 0, 16384, 18432, 17920, - 18048, 18112, 18113, 18104, 18108, 0, 16384, 18432, - 17920, 18048, 18112, 18113, 18115, 18108, 0, 16384, - 18432, 17920, 18048, 18112, 18113, 18115, 18108, 18110, - 0, 16384, 18432, 17920, 18048, 0, 16384, 18432, - 17920, 18176, 18112, 0, 16384, 18432, 17920, 18176, - 18112, 0, 16384, 18432, 17920, 18176, 18112, 18114, - 0, 16384, 18432, 17920, 18176, 18112, 0, 16384, - 18432, 17920, 18176, 18112, 18116, 0, 16384, 18432, - 17920, 18176, 18112, 18116, 0, 16384, 18432, 17920, - 18176, 18112, 18120, 18118, 0, 16384, 18432, 17920, - 18176, 18112, 0, 16384, 18432, 17920, 18176, 18112, - 18120, 0, 16384, 18432, 17920, 18176, 18112, 18120, - 0, 16384, 18432, 17920, 18176, 18112, 18120, 18122, - 0, 16384, 18432, 17920, 18176, 18112, 18120, 0, - 16384, 18432, 17920, 18176, 18112, 18128, 18124, 0, - 16384, 18432, 17920, 18176, 18112, 18128, 18124, 0, - 16384, 18432, 17920, 18176, 18112, 18128, 18129, 18126, - 0, 16384, 18432, 17920, 18176, 18112, 0, 16384, - 18432, 17920, 18176, 18112, 18128, 0, 16384, 18432, - 17920, 18176, 18112, 18128, 0, 16384, 18432, 17920, - 18176, 18112, 18128, 18130, 0, 16384, 18432, 17920, - 18176, 18112, 18128, 0, 16384, 18432, 17920, 18176, - 18112, 18128, 18132, 0, 16384, 18432, 17920, 18176, - 18112, 18128, 18132, 0, 16384, 18432, 17920, 18176, - 18112, 18128, 18136, 18134, 0, 16384, 18432, 17920, - 18176, 18112, 18128, 0, 16384, 18432, 17920, 18176, - 18112, 18144, 18136, 0, 16384, 18432, 17920, 18176, - 18112, 18144, 18136, 0, 16384, 18432, 17920, 18176, - 18112, 18144, 18136, 18138, 0, 16384, 18432, 17920, - 18176, 18112, 18144, 18136, 0, 16384, 18432, 17920, - 18176, 18112, 18144, 18145, 18140, 0, 16384, 18432, - 17920, 18176, 18112, 18144, 18145, 18140, 0, 16384, - 18432, 17920, 18176, 18112, 18144, 18145, 18140, 18142, - 0, 16384, 18432, 17920, 18176, 18112, 0, 16384, - 18432, 17920, 18176, 18177, 18144, 0, 16384, 18432, - 17920, 18176, 18177, 18144, 0, 16384, 18432, 17920, - 18176, 18177, 18144, 18146, 0, 16384, 18432, 17920, - 18176, 18177, 18144, 0, 16384, 18432, 17920, 18176, - 18177, 18144, 18148, 0, 16384, 18432, 17920, 18176, - 18177, 18144, 18148, 0, 16384, 18432, 17920, 18176, - 18177, 18144, 18152, 18150, 0, 16384, 18432, 17920, - 18176, 18177, 18144, 0, 16384, 18432, 17920, 18176, - 18177, 18144, 18152, 0, 16384, 18432, 17920, 18176, - 18177, 18144, 18152, 0, 16384, 18432, 17920, 18176, - 18177, 18144, 18152, 18154, 0, 16384, 18432, 17920, - 18176, 18177, 18144, 18152, 0, 16384, 18432, 17920, - 18176, 18177, 18144, 18160, 18156, 0, 16384, 18432, - 17920, 18176, 18177, 18144, 18160, 18156, 0, 16384, - 18432, 17920, 18176, 18177, 18144, 18160, 18161, 18158, - 0, 16384, 18432, 17920, 18176, 18177, 18144, 0, - 16384, 18432, 17920, 18176, 18177, 18144, 18160, 0, - 16384, 18432, 17920, 18176, 18177, 18179, 18160, 0, - 16384, 18432, 17920, 18176, 18177, 18179, 18160, 18162, - 0, 16384, 18432, 17920, 18176, 18177, 18179, 18160, - 0, 16384, 18432, 17920, 18176, 18177, 18179, 18160, - 18164, 0, 16384, 18432, 17920, 18176, 18177, 18179, - 18160, 18164, 0, 16384, 18432, 17920, 18176, 18177, - 18179, 18160, 18168, 18166, 0, 16384, 18432, 17920, - 18176, 18177, 18179, 18160, 0, 16384, 18432, 17920, - 18176, 18177, 18179, 18160, 18168, 0, 16384, 18432, - 17920, 18176, 18177, 18179, 18160, 18168, 0, 16384, - 18432, 17920, 18176, 18177, 18179, 18160, 18168, 18170, - 0, 16384, 18432, 17920, 18176, 18177, 18179, 18183, - 18168, 0, 16384, 18432, 17920, 18176, 18177, 18179, - 18183, 18168, 18172, 0, 16384, 18432, 17920, 18176, - 18177, 18179, 18183, 18168, 18172, 0, 16384, 18432, - 17920, 18176, 18177, 18179, 18183, 18168, 18172, 18174, - 0, 16384, 18432, 17920, 0, 16384, 18432, 17920, - 18176, 0, 16384, 18432, 18433, 18176, 0, 16384, - 18432, 18433, 18176, 18178, 0, 16384, 18432, 18433, - 18176, 0, 16384, 18432, 18433, 18176, 18180, 0, - 16384, 18432, 18433, 18176, 18180, 0, 16384, 18432, - 18433, 18176, 18184, 18182, 0, 16384, 18432, 18433, - 18176, 0, 16384, 18432, 18433, 18176, 18184, 0, - 16384, 18432, 18433, 18176, 18184, 0, 16384, 18432, - 18433, 18176, 18184, 18186, 0, 16384, 18432, 18433, - 18176, 18184, 0, 16384, 18432, 18433, 18176, 18192, - 18188, 0, 16384, 18432, 18433, 18176, 18192, 18188, - 0, 16384, 18432, 18433, 18176, 18192, 18193, 18190, - 0, 16384, 18432, 18433, 18176, 0, 16384, 18432, - 18433, 18176, 18192, 0, 16384, 18432, 18433, 18176, - 18192, 0, 16384, 18432, 18433, 18176, 18192, 18194, - 0, 16384, 18432, 18433, 18176, 18192, 0, 16384, - 18432, 18433, 18176, 18192, 18196, 0, 16384, 18432, - 18433, 18176, 18192, 18196, 0, 16384, 18432, 18433, - 18176, 18192, 18200, 18198, 0, 16384, 18432, 18433, - 18176, 18192, 0, 16384, 18432, 18433, 18176, 18208, - 18200, 0, 16384, 18432, 18433, 18176, 18208, 18200, - 0, 16384, 18432, 18433, 18176, 18208, 18200, 18202, - 0, 16384, 18432, 18433, 18176, 18208, 18200, 0, - 16384, 18432, 18433, 18176, 18208, 18209, 18204, 0, - 16384, 18432, 18433, 18176, 18208, 18209, 18204, 0, - 16384, 18432, 18433, 18176, 18208, 18209, 18204, 18206, - 0, 16384, 18432, 18433, 18176, 0, 16384, 18432, - 18433, 18176, 18208, 0, 16384, 18432, 18433, 18176, - 18208, 0, 16384, 18432, 18433, 18176, 18208, 18210, - 0, 16384, 18432, 18433, 18176, 18208, 0, 16384, - 18432, 18433, 18176, 18208, 18212, 0, 16384, 18432, - 18433, 18176, 18208, 18212, 0, 16384, 18432, 18433, - 18176, 18208, 18216, 18214, 0, 16384, 18432, 18433, - 18176, 18208, 0, 16384, 18432, 18433, 18176, 18208, - 18216, 0, 16384, 18432, 18433, 18176, 18208, 18216, - 0, 16384, 18432, 18433, 18176, 18208, 18216, 18218, - 0, 16384, 18432, 18433, 18176, 18208, 18216, 0, - 16384, 18432, 18433, 18176, 18208, 18224, 18220, 0, - 16384, 18432, 18433, 18176, 18208, 18224, 18220, 0, - 16384, 18432, 18433, 18176, 18208, 18224, 18225, 18222, - 0, 16384, 18432, 18433, 18176, 18208, 0, 16384, - 18432, 18433, 18176, 18240, 18224, 0, 16384, 18432, - 18433, 18176, 18240, 18224, 0, 16384, 18432, 18433, - 18176, 18240, 18224, 18226, 0, 16384, 18432, 18433, - 18176, 18240, 18224, 0, 16384, 18432, 18433, 18176, - 18240, 18224, 18228, 0, 16384, 18432, 18433, 18176, - 18240, 18224, 18228, 0, 16384, 18432, 18433, 18176, - 18240, 18224, 18232, 18230, 0, 16384, 18432, 18433, - 18176, 18240, 18224, 0, 16384, 18432, 18433, 18176, - 18240, 18241, 18232, 0, 16384, 18432, 18433, 18176, - 18240, 18241, 18232, 0, 16384, 18432, 18433, 18176, - 18240, 18241, 18232, 18234, 0, 16384, 18432, 18433, - 18176, 18240, 18241, 18232, 0, 16384, 18432, 18433, - 18176, 18240, 18241, 18232, 18236, 0, 16384, 18432, - 18433, 18176, 18240, 18241, 18243, 18236, 0, 16384, - 18432, 18433, 18176, 18240, 18241, 18243, 18236, 18238, - 0, 16384, 18432, 18433, 18176, 0, 16384, 18432, - 18433, 18176, 18240, 0, 16384, 18432, 18433, 18176, - 18240, 0, 16384, 18432, 18433, 18176, 18240, 18242, - 0, 16384, 18432, 18433, 18176, 18240, 0, 16384, - 18432, 18433, 18176, 18240, 18244, 0, 16384, 18432, - 18433, 18176, 18240, 18244, 0, 16384, 18432, 18433, - 18176, 18240, 18248, 18246, 0, 16384, 18432, 18433, - 18176, 18240, 0, 16384, 18432, 18433, 18176, 18240, - 18248, 0, 16384, 18432, 18433, 18176, 18240, 18248, - 0, 16384, 18432, 18433, 18176, 18240, 18248, 18250, - 0, 16384, 18432, 18433, 18176, 18240, 18248, 0, - 16384, 18432, 18433, 18176, 18240, 18256, 18252, 0, - 16384, 18432, 18433, 18176, 18240, 18256, 18252, 0, - 16384, 18432, 18433, 18176, 18240, 18256, 18257, 18254, - 0, 16384, 18432, 18433, 18176, 18240, 0, 16384, - 18432, 18433, 18176, 18240, 18256, 0, 16384, 18432, - 18433, 18176, 18240, 18256, 0, 16384, 18432, 18433, - 18176, 18240, 18256, 18258, 0, 16384, 18432, 18433, - 18176, 18240, 18256, 0, 16384, 18432, 18433, 18176, - 18240, 18256, 18260, 0, 16384, 18432, 18433, 18176, - 18240, 18256, 18260, 0, 16384, 18432, 18433, 18176, - 18240, 18256, 18264, 18262, 0, 16384, 18432, 18433, - 18176, 18240, 18256, 0, 16384, 18432, 18433, 18176, - 18240, 18272, 18264, 0, 16384, 18432, 18433, 18176, - 18240, 18272, 18264, 0, 16384, 18432, 18433, 18176, - 18240, 18272, 18264, 18266, 0, 16384, 18432, 18433, - 18176, 18240, 18272, 18264, 0, 16384, 18432, 18433, - 18176, 18240, 18272, 18273, 18268, 0, 16384, 18432, - 18433, 18176, 18240, 18272, 18273, 18268, 0, 16384, - 18432, 18433, 18176, 18240, 18272, 18273, 18268, 18270, - 0, 16384, 18432, 18433, 18176, 18240, 0, 16384, - 18432, 18433, 18176, 18304, 18272, 0, 16384, 18432, - 18433, 18176, 18304, 18272, 0, 16384, 18432, 18433, - 18176, 18304, 18272, 18274, 0, 16384, 18432, 18433, - 18176, 18304, 18272, 0, 16384, 18432, 18433, 18176, - 18304, 18272, 18276, 0, 16384, 18432, 18433, 18176, - 18304, 18272, 18276, 0, 16384, 18432, 18433, 18176, - 18304, 18272, 18280, 18278, 0, 16384, 18432, 18433, - 18176, 18304, 18272, 0, 16384, 18432, 18433, 18176, - 18304, 18272, 18280, 0, 16384, 18432, 18433, 18176, - 18304, 18272, 18280, 0, 16384, 18432, 18433, 18176, - 18304, 18272, 18280, 18282, 0, 16384, 18432, 18433, - 18176, 18304, 18272, 18280, 0, 16384, 18432, 18433, - 18176, 18304, 18272, 18288, 18284, 0, 16384, 18432, - 18433, 18176, 18304, 18272, 18288, 18284, 0, 16384, - 18432, 18433, 18176, 18304, 18272, 18288, 18289, 18286, - 0, 16384, 18432, 18433, 18176, 18304, 18272, 0, - 16384, 18432, 18433, 18176, 18304, 18305, 18288, 0, - 16384, 18432, 18433, 18176, 18304, 18305, 18288, 0, - 16384, 18432, 18433, 18176, 18304, 18305, 18288, 18290, - 0, 16384, 18432, 18433, 18176, 18304, 18305, 18288, - 0, 16384, 18432, 18433, 18176, 18304, 18305, 18288, - 18292, 0, 16384, 18432, 18433, 18176, 18304, 18305, - 18288, 18292, 0, 16384, 18432, 18433, 18176, 18304, - 18305, 18288, 18296, 18294, 0, 16384, 18432, 18433, - 18176, 18304, 18305, 18288, 0, 16384, 18432, 18433, - 18176, 18304, 18305, 18288, 18296, 0, 16384, 18432, - 18433, 18176, 18304, 18305, 18307, 18296, 0, 16384, - 18432, 18433, 18176, 18304, 18305, 18307, 18296, 18298, - 0, 16384, 18432, 18433, 18176, 18304, 18305, 18307, - 18296, 0, 16384, 18432, 18433, 18176, 18304, 18305, - 18307, 18296, 18300, 0, 16384, 18432, 18433, 18176, - 18304, 18305, 18307, 18296, 18300, 0, 16384, 18432, - 18433, 18176, 18304, 18305, 18307, 18296, 18300, 18302, - 0, 16384, 18432, 18433, 18176, 0, 16384, 18432, - 18433, 18176, 18304, 0, 16384, 18432, 18433, 18176, - 18304, 0, 16384, 18432, 18433, 18176, 18304, 18306, - 0, 16384, 18432, 18433, 18435, 18304, 0, 16384, - 18432, 18433, 18435, 18304, 18308, 0, 16384, 18432, - 18433, 18435, 18304, 18308, 0, 16384, 18432, 18433, - 18435, 18304, 18312, 18310, 0, 16384, 18432, 18433, - 18435, 18304, 0, 16384, 18432, 18433, 18435, 18304, - 18312, 0, 16384, 18432, 18433, 18435, 18304, 18312, - 0, 16384, 18432, 18433, 18435, 18304, 18312, 18314, - 0, 16384, 18432, 18433, 18435, 18304, 18312, 0, - 16384, 18432, 18433, 18435, 18304, 18320, 18316, 0, - 16384, 18432, 18433, 18435, 18304, 18320, 18316, 0, - 16384, 18432, 18433, 18435, 18304, 18320, 18321, 18318, - 0, 16384, 18432, 18433, 18435, 18304, 0, 16384, - 18432, 18433, 18435, 18304, 18320, 0, 16384, 18432, - 18433, 18435, 18304, 18320, 0, 16384, 18432, 18433, - 18435, 18304, 18320, 18322, 0, 16384, 18432, 18433, - 18435, 18304, 18320, 0, 16384, 18432, 18433, 18435, - 18304, 18320, 18324, 0, 16384, 18432, 18433, 18435, - 18304, 18320, 18324, 0, 16384, 18432, 18433, 18435, - 18304, 18320, 18328, 18326, 0, 16384, 18432, 18433, - 18435, 18304, 18320, 0, 16384, 18432, 18433, 18435, - 18304, 18336, 18328, 0, 16384, 18432, 18433, 18435, - 18304, 18336, 18328, 0, 16384, 18432, 18433, 18435, - 18304, 18336, 18328, 18330, 0, 16384, 18432, 18433, - 18435, 18304, 18336, 18328, 0, 16384, 18432, 18433, - 18435, 18304, 18336, 18337, 18332, 0, 16384, 18432, - 18433, 18435, 18304, 18336, 18337, 18332, 0, 16384, - 18432, 18433, 18435, 18304, 18336, 18337, 18332, 18334, - 0, 16384, 18432, 18433, 18435, 18304, 0, 16384, - 18432, 18433, 18435, 18304, 18336, 0, 16384, 18432, - 18433, 18435, 18304, 18336, 0, 16384, 18432, 18433, - 18435, 18304, 18336, 18338, 0, 16384, 18432, 18433, - 18435, 18304, 18336, 0, 16384, 18432, 18433, 18435, - 18304, 18336, 18340, 0, 16384, 18432, 18433, 18435, - 18304, 18336, 18340, 0, 16384, 18432, 18433, 18435, - 18304, 18336, 18344, 18342, 0, 16384, 18432, 18433, - 18435, 18304, 18336, 0, 16384, 18432, 18433, 18435, - 18304, 18336, 18344, 0, 16384, 18432, 18433, 18435, - 18304, 18336, 18344, 0, 16384, 18432, 18433, 18435, - 18304, 18336, 18344, 18346, 0, 16384, 18432, 18433, - 18435, 18304, 18336, 18344, 0, 16384, 18432, 18433, - 18435, 18304, 18336, 18352, 18348, 0, 16384, 18432, - 18433, 18435, 18304, 18336, 18352, 18348, 0, 16384, - 18432, 18433, 18435, 18304, 18336, 18352, 18353, 18350, - 0, 16384, 18432, 18433, 18435, 18304, 18336, 0, - 16384, 18432, 18433, 18435, 18304, 18368, 18352, 0, - 16384, 18432, 18433, 18435, 18304, 18368, 18352, 0, - 16384, 18432, 18433, 18435, 18304, 18368, 18352, 18354, - 0, 16384, 18432, 18433, 18435, 18304, 18368, 18352, - 0, 16384, 18432, 18433, 18435, 18304, 18368, 18352, - 18356, 0, 16384, 18432, 18433, 18435, 18304, 18368, - 18352, 18356, 0, 16384, 18432, 18433, 18435, 18304, - 18368, 18352, 18360, 18358, 0, 16384, 18432, 18433, - 18435, 18304, 18368, 18352, 0, 16384, 18432, 18433, - 18435, 18304, 18368, 18369, 18360, 0, 16384, 18432, - 18433, 18435, 18304, 18368, 18369, 18360, 0, 16384, - 18432, 18433, 18435, 18304, 18368, 18369, 18360, 18362, - 0, 16384, 18432, 18433, 18435, 18304, 18368, 18369, - 18360, 0, 16384, 18432, 18433, 18435, 18304, 18368, - 18369, 18360, 18364, 0, 16384, 18432, 18433, 18435, - 18304, 18368, 18369, 18371, 18364, 0, 16384, 18432, - 18433, 18435, 18304, 18368, 18369, 18371, 18364, 18366, - 0, 16384, 18432, 18433, 18435, 18304, 0, 16384, - 18432, 18433, 18435, 18304, 18368, 0, 16384, 18432, - 18433, 18435, 18304, 18368, 0, 16384, 18432, 18433, - 18435, 18304, 18368, 18370, 0, 16384, 18432, 18433, - 18435, 18304, 18368, 0, 16384, 18432, 18433, 18435, - 18304, 18368, 18372, 0, 16384, 18432, 18433, 18435, - 18304, 18368, 18372, 0, 16384, 18432, 18433, 18435, - 18304, 18368, 18376, 18374, 0, 16384, 18432, 18433, - 18435, 18439, 18368, 0, 16384, 18432, 18433, 18435, - 18439, 18368, 18376, 0, 16384, 18432, 18433, 18435, - 18439, 18368, 18376, 0, 16384, 18432, 18433, 18435, - 18439, 18368, 18376, 18378, 0, 16384, 18432, 18433, - 18435, 18439, 18368, 18376, 0, 16384, 18432, 18433, - 18435, 18439, 18368, 18384, 18380, 0, 16384, 18432, - 18433, 18435, 18439, 18368, 18384, 18380, 0, 16384, - 18432, 18433, 18435, 18439, 18368, 18384, 18385, 18382, - 0, 16384, 18432, 18433, 18435, 18439, 18368, 0, - 16384, 18432, 18433, 18435, 18439, 18368, 18384, 0, - 16384, 18432, 18433, 18435, 18439, 18368, 18384, 0, - 16384, 18432, 18433, 18435, 18439, 18368, 18384, 18386, - 0, 16384, 18432, 18433, 18435, 18439, 18368, 18384, - 0, 16384, 18432, 18433, 18435, 18439, 18368, 18384, - 18388, 0, 16384, 18432, 18433, 18435, 18439, 18368, - 18384, 18388, 0, 16384, 18432, 18433, 18435, 18439, - 18368, 18384, 18392, 18390, 0, 16384, 18432, 18433, - 18435, 18439, 18368, 18384, 0, 16384, 18432, 18433, - 18435, 18439, 18368, 18400, 18392, 0, 16384, 18432, - 18433, 18435, 18439, 18368, 18400, 18392, 0, 16384, - 18432, 18433, 18435, 18439, 18368, 18400, 18392, 18394, - 0, 16384, 18432, 18433, 18435, 18439, 18368, 18400, - 18392, 0, 16384, 18432, 18433, 18435, 18439, 18368, - 18400, 18401, 18396, 0, 16384, 18432, 18433, 18435, - 18439, 18368, 18400, 18401, 18396, 0, 16384, 18432, - 18433, 18435, 18439, 18368, 18400, 18401, 18396, 18398, - 0, 16384, 18432, 18433, 18435, 18439, 18368, 0, - 16384, 18432, 18433, 18435, 18439, 18368, 18400, 0, - 16384, 18432, 18433, 18435, 18439, 18368, 18400, 0, - 16384, 18432, 18433, 18435, 18439, 18368, 18400, 18402, - 0, 16384, 18432, 18433, 18435, 18439, 18368, 18400, - 0, 16384, 18432, 18433, 18435, 18439, 18368, 18400, - 18404, 0, 16384, 18432, 18433, 18435, 18439, 18368, - 18400, 18404, 0, 16384, 18432, 18433, 18435, 18439, - 18368, 18400, 18408, 18406, 0, 16384, 18432, 18433, - 18435, 18439, 18368, 18400, 0, 16384, 18432, 18433, - 18435, 18439, 18368, 18400, 18408, 0, 16384, 18432, - 18433, 18435, 18439, 18368, 18400, 18408, 0, 16384, - 18432, 18433, 18435, 18439, 18368, 18400, 18408, 18410, - 0, 16384, 18432, 18433, 18435, 18439, 18368, 18400, - 18408, 0, 16384, 18432, 18433, 18435, 18439, 18368, - 18400, 18416, 18412, 0, 16384, 18432, 18433, 18435, - 18439, 18368, 18400, 18416, 18412, 0, 16384, 18432, - 18433, 18435, 18439, 18368, 18400, 18416, 18417, 18414, - 0, 16384, 18432, 18433, 18435, 18439, 18447, 18400, - 0, 16384, 18432, 18433, 18435, 18439, 18447, 18400, - 18416, 0, 16384, 18432, 18433, 18435, 18439, 18447, - 18400, 18416, 0, 16384, 18432, 18433, 18435, 18439, - 18447, 18400, 18416, 18418, 0, 16384, 18432, 18433, - 18435, 18439, 18447, 18400, 18416, 0, 16384, 18432, - 18433, 18435, 18439, 18447, 18400, 18416, 18420, 0, - 16384, 18432, 18433, 18435, 18439, 18447, 18400, 18416, - 18420, 0, 16384, 18432, 18433, 18435, 18439, 18447, - 18400, 18416, 18424, 18422, 0, 16384, 18432, 18433, - 18435, 18439, 18447, 18400, 18416, 0, 16384, 18432, - 18433, 18435, 18439, 18447, 18400, 18416, 18424, 0, - 16384, 18432, 18433, 18435, 18439, 18447, 18400, 18416, - 18424, 0, 16384, 18432, 18433, 18435, 18439, 18447, - 18400, 18416, 18424, 18426, 0, 16384, 18432, 18433, - 18435, 18439, 18447, 18400, 18416, 18424, 0, 16384, - 18432, 18433, 18435, 18439, 18447, 18400, 18416, 18424, - 18428, 0, 16384, 18432, 18433, 18435, 18439, 18447, - 18400, 18416, 18424, 18428, 0, 16384, 18432, 18433, - 18435, 18439, 18447, 18400, 18416, 18424, 18428, 18430, - 0, 16384, 0, 16384, 18432, 0, 16384, 18432, - 0, 16384, 18432, 18434, 0, 16384, 18432, 0, - 16384, 18432, 18436, 0, 16384, 18432, 18436, 0, - 16384, 18432, 18440, 18438, 0, 16384, 18432, 0, - 16384, 18432, 18440, 0, 16384, 18432, 18440, 0, - 16384, 18432, 18440, 18442, 0, 16384, 18432, 18440, - 0, 16384, 18432, 18448, 18444, 0, 16384, 18432, - 18448, 18444, 0, 16384, 18432, 18448, 18449, 18446, - 0, 16384, 18432, 0, 16384, 18432, 18448, 0, - 16384, 18432, 18448, 0, 16384, 18432, 18448, 18450, - 0, 16384, 18432, 18448, 0, 16384, 18432, 18448, - 18452, 0, 16384, 18432, 18448, 18452, 0, 16384, - 18432, 18448, 18456, 18454, 0, 16384, 18432, 18448, - 0, 16384, 18432, 18464, 18456, 0, 16384, 18432, - 18464, 18456, 0, 16384, 18432, 18464, 18456, 18458, - 0, 16384, 18432, 18464, 18456, 0, 16384, 18432, - 18464, 18465, 18460, 0, 16384, 18432, 18464, 18465, - 18460, 0, 16384, 18432, 18464, 18465, 18460, 18462, - 0, 16384, 18432, 0, 16384, 18432, 18464, 0, - 16384, 18432, 18464, 0, 16384, 18432, 18464, 18466, - 0, 16384, 18432, 18464, 0, 16384, 18432, 18464, - 18468, 0, 16384, 18432, 18464, 18468, 0, 16384, - 18432, 18464, 18472, 18470, 0, 16384, 18432, 18464, - 0, 16384, 18432, 18464, 18472, 0, 16384, 18432, - 18464, 18472, 0, 16384, 18432, 18464, 18472, 18474, - 0, 16384, 18432, 18464, 18472, 0, 16384, 18432, - 18464, 18480, 18476, 0, 16384, 18432, 18464, 18480, - 18476, 0, 16384, 18432, 18464, 18480, 18481, 18478, - 0, 16384, 18432, 18464, 0, 16384, 18432, 18496, - 18480, 0, 16384, 18432, 18496, 18480, 0, 16384, - 18432, 18496, 18480, 18482, 0, 16384, 18432, 18496, - 18480, 0, 16384, 18432, 18496, 18480, 18484, 0, - 16384, 18432, 18496, 18480, 18484, 0, 16384, 18432, - 18496, 18480, 18488, 18486, 0, 16384, 18432, 18496, - 18480, 0, 16384, 18432, 18496, 18497, 18488, 0, - 16384, 18432, 18496, 18497, 18488, 0, 16384, 18432, - 18496, 18497, 18488, 18490, 0, 16384, 18432, 18496, - 18497, 18488, 0, 16384, 18432, 18496, 18497, 18488, - 18492, 0, 16384, 18432, 18496, 18497, 18499, 18492, - 0, 16384, 18432, 18496, 18497, 18499, 18492, 18494, - 0, 16384, 18432, 0, 16384, 18432, 18496, 0, - 16384, 18432, 18496, 0, 16384, 18432, 18496, 18498, - 0, 16384, 18432, 18496, 0, 16384, 18432, 18496, - 18500, 0, 16384, 18432, 18496, 18500, 0, 16384, - 18432, 18496, 18504, 18502, 0, 16384, 18432, 18496, - 0, 16384, 18432, 18496, 18504, 0, 16384, 18432, - 18496, 18504, 0, 16384, 18432, 18496, 18504, 18506, - 0, 16384, 18432, 18496, 18504, 0, 16384, 18432, - 18496, 18512, 18508, 0, 16384, 18432, 18496, 18512, - 18508, 0, 16384, 18432, 18496, 18512, 18513, 18510, - 0, 16384, 18432, 18496, 0, 16384, 18432, 18496, - 18512, 0, 16384, 18432, 18496, 18512, 0, 16384, - 18432, 18496, 18512, 18514, 0, 16384, 18432, 18496, - 18512, 0, 16384, 18432, 18496, 18512, 18516, 0, - 16384, 18432, 18496, 18512, 18516, 0, 16384, 18432, - 18496, 18512, 18520, 18518, 0, 16384, 18432, 18496, - 18512, 0, 16384, 18432, 18496, 18528, 18520, 0, - 16384, 18432, 18496, 18528, 18520, 0, 16384, 18432, - 18496, 18528, 18520, 18522, 0, 16384, 18432, 18496, - 18528, 18520, 0, 16384, 18432, 18496, 18528, 18529, - 18524, 0, 16384, 18432, 18496, 18528, 18529, 18524, - 0, 16384, 18432, 18496, 18528, 18529, 18524, 18526, - 0, 16384, 18432, 18496, 0, 16384, 18432, 18560, - 18528, 0, 16384, 18432, 18560, 18528, 0, 16384, - 18432, 18560, 18528, 18530, 0, 16384, 18432, 18560, - 18528, 0, 16384, 18432, 18560, 18528, 18532, 0, - 16384, 18432, 18560, 18528, 18532, 0, 16384, 18432, - 18560, 18528, 18536, 18534, 0, 16384, 18432, 18560, - 18528, 0, 16384, 18432, 18560, 18528, 18536, 0, - 16384, 18432, 18560, 18528, 18536, 0, 16384, 18432, - 18560, 18528, 18536, 18538, 0, 16384, 18432, 18560, - 18528, 18536, 0, 16384, 18432, 18560, 18528, 18544, - 18540, 0, 16384, 18432, 18560, 18528, 18544, 18540, - 0, 16384, 18432, 18560, 18528, 18544, 18545, 18542, - 0, 16384, 18432, 18560, 18528, 0, 16384, 18432, - 18560, 18561, 18544, 0, 16384, 18432, 18560, 18561, - 18544, 0, 16384, 18432, 18560, 18561, 18544, 18546, - 0, 16384, 18432, 18560, 18561, 18544, 0, 16384, - 18432, 18560, 18561, 18544, 18548, 0, 16384, 18432, - 18560, 18561, 18544, 18548, 0, 16384, 18432, 18560, - 18561, 18544, 18552, 18550, 0, 16384, 18432, 18560, - 18561, 18544, 0, 16384, 18432, 18560, 18561, 18544, - 18552, 0, 16384, 18432, 18560, 18561, 18563, 18552, - 0, 16384, 18432, 18560, 18561, 18563, 18552, 18554, - 0, 16384, 18432, 18560, 18561, 18563, 18552, 0, - 16384, 18432, 18560, 18561, 18563, 18552, 18556, 0, - 16384, 18432, 18560, 18561, 18563, 18552, 18556, 0, - 16384, 18432, 18560, 18561, 18563, 18552, 18556, 18558, - 0, 16384, 18432, 0, 16384, 18432, 18560, 0, - 16384, 18432, 18560, 0, 16384, 18432, 18560, 18562, - 0, 16384, 18432, 18560, 0, 16384, 18432, 18560, - 18564, 0, 16384, 18432, 18560, 18564, 0, 16384, - 18432, 18560, 18568, 18566, 0, 16384, 18432, 18560, - 0, 16384, 18432, 18560, 18568, 0, 16384, 18432, - 18560, 18568, 0, 16384, 18432, 18560, 18568, 18570, - 0, 16384, 18432, 18560, 18568, 0, 16384, 18432, - 18560, 18576, 18572, 0, 16384, 18432, 18560, 18576, - 18572, 0, 16384, 18432, 18560, 18576, 18577, 18574, - 0, 16384, 18432, 18560, 0, 16384, 18432, 18560, - 18576, 0, 16384, 18432, 18560, 18576, 0, 16384, - 18432, 18560, 18576, 18578, 0, 16384, 18432, 18560, - 18576, 0, 16384, 18432, 18560, 18576, 18580, 0, - 16384, 18432, 18560, 18576, 18580, 0, 16384, 18432, - 18560, 18576, 18584, 18582, 0, 16384, 18432, 18560, - 18576, 0, 16384, 18432, 18560, 18592, 18584, 0, - 16384, 18432, 18560, 18592, 18584, 0, 16384, 18432, - 18560, 18592, 18584, 18586, 0, 16384, 18432, 18560, - 18592, 18584, 0, 16384, 18432, 18560, 18592, 18593, - 18588, 0, 16384, 18432, 18560, 18592, 18593, 18588, - 0, 16384, 18432, 18560, 18592, 18593, 18588, 18590, - 0, 16384, 18432, 18560, 0, 16384, 18432, 18560, - 18592, 0, 16384, 18432, 18560, 18592, 0, 16384, - 18432, 18560, 18592, 18594, 0, 16384, 18432, 18560, - 18592, 0, 16384, 18432, 18560, 18592, 18596, 0, - 16384, 18432, 18560, 18592, 18596, 0, 16384, 18432, - 18560, 18592, 18600, 18598, 0, 16384, 18432, 18560, - 18592, 0, 16384, 18432, 18560, 18592, 18600, 0, - 16384, 18432, 18560, 18592, 18600, 0, 16384, 18432, - 18560, 18592, 18600, 18602, 0, 16384, 18432, 18560, - 18592, 18600, 0, 16384, 18432, 18560, 18592, 18608, - 18604, 0, 16384, 18432, 18560, 18592, 18608, 18604, - 0, 16384, 18432, 18560, 18592, 18608, 18609, 18606, - 0, 16384, 18432, 18560, 18592, 0, 16384, 18432, - 18560, 18624, 18608, 0, 16384, 18432, 18560, 18624, - 18608, 0, 16384, 18432, 18560, 18624, 18608, 18610, - 0, 16384, 18432, 18560, 18624, 18608, 0, 16384, - 18432, 18560, 18624, 18608, 18612, 0, 16384, 18432, - 18560, 18624, 18608, 18612, 0, 16384, 18432, 18560, - 18624, 18608, 18616, 18614, 0, 16384, 18432, 18560, - 18624, 18608, 0, 16384, 18432, 18560, 18624, 18625, - 18616, 0, 16384, 18432, 18560, 18624, 18625, 18616, - 0, 16384, 18432, 18560, 18624, 18625, 18616, 18618, - 0, 16384, 18432, 18560, 18624, 18625, 18616, 0, - 16384, 18432, 18560, 18624, 18625, 18616, 18620, 0, - 16384, 18432, 18560, 18624, 18625, 18627, 18620, 0, - 16384, 18432, 18560, 18624, 18625, 18627, 18620, 18622, - 0, 16384, 18432, 18560, 0, 16384, 18432, 18688, - 18624, 0, 16384, 18432, 18688, 18624, 0, 16384, - 18432, 18688, 18624, 18626, 0, 16384, 18432, 18688, - 18624, 0, 16384, 18432, 18688, 18624, 18628, 0, - 16384, 18432, 18688, 18624, 18628, 0, 16384, 18432, - 18688, 18624, 18632, 18630, 0, 16384, 18432, 18688, - 18624, 0, 16384, 18432, 18688, 18624, 18632, 0, - 16384, 18432, 18688, 18624, 18632, 0, 16384, 18432, - 18688, 18624, 18632, 18634, 0, 16384, 18432, 18688, - 18624, 18632, 0, 16384, 18432, 18688, 18624, 18640, - 18636, 0, 16384, 18432, 18688, 18624, 18640, 18636, - 0, 16384, 18432, 18688, 18624, 18640, 18641, 18638, - 0, 16384, 18432, 18688, 18624, 0, 16384, 18432, - 18688, 18624, 18640, 0, 16384, 18432, 18688, 18624, - 18640, 0, 16384, 18432, 18688, 18624, 18640, 18642, - 0, 16384, 18432, 18688, 18624, 18640, 0, 16384, - 18432, 18688, 18624, 18640, 18644, 0, 16384, 18432, - 18688, 18624, 18640, 18644, 0, 16384, 18432, 18688, - 18624, 18640, 18648, 18646, 0, 16384, 18432, 18688, - 18624, 18640, 0, 16384, 18432, 18688, 18624, 18656, - 18648, 0, 16384, 18432, 18688, 18624, 18656, 18648, - 0, 16384, 18432, 18688, 18624, 18656, 18648, 18650, - 0, 16384, 18432, 18688, 18624, 18656, 18648, 0, - 16384, 18432, 18688, 18624, 18656, 18657, 18652, 0, - 16384, 18432, 18688, 18624, 18656, 18657, 18652, 0, - 16384, 18432, 18688, 18624, 18656, 18657, 18652, 18654, - 0, 16384, 18432, 18688, 18624, 0, 16384, 18432, - 18688, 18689, 18656, 0, 16384, 18432, 18688, 18689, - 18656, 0, 16384, 18432, 18688, 18689, 18656, 18658, - 0, 16384, 18432, 18688, 18689, 18656, 0, 16384, - 18432, 18688, 18689, 18656, 18660, 0, 16384, 18432, - 18688, 18689, 18656, 18660, 0, 16384, 18432, 18688, - 18689, 18656, 18664, 18662, 0, 16384, 18432, 18688, - 18689, 18656, 0, 16384, 18432, 18688, 18689, 18656, - 18664, 0, 16384, 18432, 18688, 18689, 18656, 18664, - 0, 16384, 18432, 18688, 18689, 18656, 18664, 18666, - 0, 16384, 18432, 18688, 18689, 18656, 18664, 0, - 16384, 18432, 18688, 18689, 18656, 18672, 18668, 0, - 16384, 18432, 18688, 18689, 18656, 18672, 18668, 0, - 16384, 18432, 18688, 18689, 18656, 18672, 18673, 18670, - 0, 16384, 18432, 18688, 18689, 18656, 0, 16384, - 18432, 18688, 18689, 18656, 18672, 0, 16384, 18432, - 18688, 18689, 18691, 18672, 0, 16384, 18432, 18688, - 18689, 18691, 18672, 18674, 0, 16384, 18432, 18688, - 18689, 18691, 18672, 0, 16384, 18432, 18688, 18689, - 18691, 18672, 18676, 0, 16384, 18432, 18688, 18689, - 18691, 18672, 18676, 0, 16384, 18432, 18688, 18689, - 18691, 18672, 18680, 18678, 0, 16384, 18432, 18688, - 18689, 18691, 18672, 0, 16384, 18432, 18688, 18689, - 18691, 18672, 18680, 0, 16384, 18432, 18688, 18689, - 18691, 18672, 18680, 0, 16384, 18432, 18688, 18689, - 18691, 18672, 18680, 18682, 0, 16384, 18432, 18688, - 18689, 18691, 18695, 18680, 0, 16384, 18432, 18688, - 18689, 18691, 18695, 18680, 18684, 0, 16384, 18432, - 18688, 18689, 18691, 18695, 18680, 18684, 0, 16384, - 18432, 18688, 18689, 18691, 18695, 18680, 18684, 18686, - 0, 16384, 18432, 0, 16384, 18432, 18688, 0, - 16384, 18432, 18688, 0, 16384, 18432, 18688, 18690, - 0, 16384, 18432, 18688, 0, 16384, 18432, 18688, - 18692, 0, 16384, 18432, 18688, 18692, 0, 16384, - 18432, 18688, 18696, 18694, 0, 16384, 18432, 18688, - 0, 16384, 18432, 18688, 18696, 0, 16384, 18432, - 18688, 18696, 0, 16384, 18432, 18688, 18696, 18698, - 0, 16384, 18432, 18688, 18696, 0, 16384, 18432, - 18688, 18704, 18700, 0, 16384, 18432, 18688, 18704, - 18700, 0, 16384, 18432, 18688, 18704, 18705, 18702, - 0, 16384, 18432, 18688, 0, 16384, 18432, 18688, - 18704, 0, 16384, 18432, 18688, 18704, 0, 16384, - 18432, 18688, 18704, 18706, 0, 16384, 18432, 18688, - 18704, 0, 16384, 18432, 18688, 18704, 18708, 0, - 16384, 18432, 18688, 18704, 18708, 0, 16384, 18432, - 18688, 18704, 18712, 18710, 0, 16384, 18432, 18688, - 18704, 0, 16384, 18432, 18688, 18720, 18712, 0, - 16384, 18432, 18688, 18720, 18712, 0, 16384, 18432, - 18688, 18720, 18712, 18714, 0, 16384, 18432, 18688, - 18720, 18712, 0, 16384, 18432, 18688, 18720, 18721, - 18716, 0, 16384, 18432, 18688, 18720, 18721, 18716, - 0, 16384, 18432, 18688, 18720, 18721, 18716, 18718, - 0, 16384, 18432, 18688, 0, 16384, 18432, 18688, - 18720, 0, 16384, 18432, 18688, 18720, 0, 16384, - 18432, 18688, 18720, 18722, 0, 16384, 18432, 18688, - 18720, 0, 16384, 18432, 18688, 18720, 18724, 0, - 16384, 18432, 18688, 18720, 18724, 0, 16384, 18432, - 18688, 18720, 18728, 18726, 0, 16384, 18432, 18688, - 18720, 0, 16384, 18432, 18688, 18720, 18728, 0, - 16384, 18432, 18688, 18720, 18728, 0, 16384, 18432, - 18688, 18720, 18728, 18730, 0, 16384, 18432, 18688, - 18720, 18728, 0, 16384, 18432, 18688, 18720, 18736, - 18732, 0, 16384, 18432, 18688, 18720, 18736, 18732, - 0, 16384, 18432, 18688, 18720, 18736, 18737, 18734, - 0, 16384, 18432, 18688, 18720, 0, 16384, 18432, - 18688, 18752, 18736, 0, 16384, 18432, 18688, 18752, - 18736, 0, 16384, 18432, 18688, 18752, 18736, 18738, - 0, 16384, 18432, 18688, 18752, 18736, 0, 16384, - 18432, 18688, 18752, 18736, 18740, 0, 16384, 18432, - 18688, 18752, 18736, 18740, 0, 16384, 18432, 18688, - 18752, 18736, 18744, 18742, 0, 16384, 18432, 18688, - 18752, 18736, 0, 16384, 18432, 18688, 18752, 18753, - 18744, 0, 16384, 18432, 18688, 18752, 18753, 18744, - 0, 16384, 18432, 18688, 18752, 18753, 18744, 18746, - 0, 16384, 18432, 18688, 18752, 18753, 18744, 0, - 16384, 18432, 18688, 18752, 18753, 18744, 18748, 0, - 16384, 18432, 18688, 18752, 18753, 18755, 18748, 0, - 16384, 18432, 18688, 18752, 18753, 18755, 18748, 18750, - 0, 16384, 18432, 18688, 0, 16384, 18432, 18688, - 18752, 0, 16384, 18432, 18688, 18752, 0, 16384, - 18432, 18688, 18752, 18754, 0, 16384, 18432, 18688, - 18752, 0, 16384, 18432, 18688, 18752, 18756, 0, - 16384, 18432, 18688, 18752, 18756, 0, 16384, 18432, - 18688, 18752, 18760, 18758, 0, 16384, 18432, 18688, - 18752, 0, 16384, 18432, 18688, 18752, 18760, 0, - 16384, 18432, 18688, 18752, 18760, 0, 16384, 18432, - 18688, 18752, 18760, 18762, 0, 16384, 18432, 18688, - 18752, 18760, 0, 16384, 18432, 18688, 18752, 18768, - 18764, 0, 16384, 18432, 18688, 18752, 18768, 18764, - 0, 16384, 18432, 18688, 18752, 18768, 18769, 18766, - 0, 16384, 18432, 18688, 18752, 0, 16384, 18432, - 18688, 18752, 18768, 0, 16384, 18432, 18688, 18752, - 18768, 0, 16384, 18432, 18688, 18752, 18768, 18770, - 0, 16384, 18432, 18688, 18752, 18768, 0, 16384, - 18432, 18688, 18752, 18768, 18772, 0, 16384, 18432, - 18688, 18752, 18768, 18772, 0, 16384, 18432, 18688, - 18752, 18768, 18776, 18774, 0, 16384, 18432, 18688, - 18752, 18768, 0, 16384, 18432, 18688, 18752, 18784, - 18776, 0, 16384, 18432, 18688, 18752, 18784, 18776, - 0, 16384, 18432, 18688, 18752, 18784, 18776, 18778, - 0, 16384, 18432, 18688, 18752, 18784, 18776, 0, - 16384, 18432, 18688, 18752, 18784, 18785, 18780, 0, - 16384, 18432, 18688, 18752, 18784, 18785, 18780, 0, - 16384, 18432, 18688, 18752, 18784, 18785, 18780, 18782, - 0, 16384, 18432, 18688, 18752, 0, 16384, 18432, - 18688, 18816, 18784, 0, 16384, 18432, 18688, 18816, - 18784, 0, 16384, 18432, 18688, 18816, 18784, 18786, - 0, 16384, 18432, 18688, 18816, 18784, 0, 16384, - 18432, 18688, 18816, 18784, 18788, 0, 16384, 18432, - 18688, 18816, 18784, 18788, 0, 16384, 18432, 18688, - 18816, 18784, 18792, 18790, 0, 16384, 18432, 18688, - 18816, 18784, 0, 16384, 18432, 18688, 18816, 18784, - 18792, 0, 16384, 18432, 18688, 18816, 18784, 18792, - 0, 16384, 18432, 18688, 18816, 18784, 18792, 18794, - 0, 16384, 18432, 18688, 18816, 18784, 18792, 0, - 16384, 18432, 18688, 18816, 18784, 18800, 18796, 0, - 16384, 18432, 18688, 18816, 18784, 18800, 18796, 0, - 16384, 18432, 18688, 18816, 18784, 18800, 18801, 18798, - 0, 16384, 18432, 18688, 18816, 18784, 0, 16384, - 18432, 18688, 18816, 18817, 18800, 0, 16384, 18432, - 18688, 18816, 18817, 18800, 0, 16384, 18432, 18688, - 18816, 18817, 18800, 18802, 0, 16384, 18432, 18688, - 18816, 18817, 18800, 0, 16384, 18432, 18688, 18816, - 18817, 18800, 18804, 0, 16384, 18432, 18688, 18816, - 18817, 18800, 18804, 0, 16384, 18432, 18688, 18816, - 18817, 18800, 18808, 18806, 0, 16384, 18432, 18688, - 18816, 18817, 18800, 0, 16384, 18432, 18688, 18816, - 18817, 18800, 18808, 0, 16384, 18432, 18688, 18816, - 18817, 18819, 18808, 0, 16384, 18432, 18688, 18816, - 18817, 18819, 18808, 18810, 0, 16384, 18432, 18688, - 18816, 18817, 18819, 18808, 0, 16384, 18432, 18688, - 18816, 18817, 18819, 18808, 18812, 0, 16384, 18432, - 18688, 18816, 18817, 18819, 18808, 18812, 0, 16384, - 18432, 18688, 18816, 18817, 18819, 18808, 18812, 18814, - 0, 16384, 18432, 18688, 0, 16384, 18432, 18944, - 18816, 0, 16384, 18432, 18944, 18816, 0, 16384, - 18432, 18944, 18816, 18818, 0, 16384, 18432, 18944, - 18816, 0, 16384, 18432, 18944, 18816, 18820, 0, - 16384, 18432, 18944, 18816, 18820, 0, 16384, 18432, - 18944, 18816, 18824, 18822, 0, 16384, 18432, 18944, - 18816, 0, 16384, 18432, 18944, 18816, 18824, 0, - 16384, 18432, 18944, 18816, 18824, 0, 16384, 18432, - 18944, 18816, 18824, 18826, 0, 16384, 18432, 18944, - 18816, 18824, 0, 16384, 18432, 18944, 18816, 18832, - 18828, 0, 16384, 18432, 18944, 18816, 18832, 18828, - 0, 16384, 18432, 18944, 18816, 18832, 18833, 18830, - 0, 16384, 18432, 18944, 18816, 0, 16384, 18432, - 18944, 18816, 18832, 0, 16384, 18432, 18944, 18816, - 18832, 0, 16384, 18432, 18944, 18816, 18832, 18834, - 0, 16384, 18432, 18944, 18816, 18832, 0, 16384, - 18432, 18944, 18816, 18832, 18836, 0, 16384, 18432, - 18944, 18816, 18832, 18836, 0, 16384, 18432, 18944, - 18816, 18832, 18840, 18838, 0, 16384, 18432, 18944, - 18816, 18832, 0, 16384, 18432, 18944, 18816, 18848, - 18840, 0, 16384, 18432, 18944, 18816, 18848, 18840, - 0, 16384, 18432, 18944, 18816, 18848, 18840, 18842, - 0, 16384, 18432, 18944, 18816, 18848, 18840, 0, - 16384, 18432, 18944, 18816, 18848, 18849, 18844, 0, - 16384, 18432, 18944, 18816, 18848, 18849, 18844, 0, - 16384, 18432, 18944, 18816, 18848, 18849, 18844, 18846, - 0, 16384, 18432, 18944, 18816, 0, 16384, 18432, - 18944, 18816, 18848, 0, 16384, 18432, 18944, 18816, - 18848, 0, 16384, 18432, 18944, 18816, 18848, 18850, - 0, 16384, 18432, 18944, 18816, 18848, 0, 16384, - 18432, 18944, 18816, 18848, 18852, 0, 16384, 18432, - 18944, 18816, 18848, 18852, 0, 16384, 18432, 18944, - 18816, 18848, 18856, 18854, 0, 16384, 18432, 18944, - 18816, 18848, 0, 16384, 18432, 18944, 18816, 18848, - 18856, 0, 16384, 18432, 18944, 18816, 18848, 18856, - 0, 16384, 18432, 18944, 18816, 18848, 18856, 18858, - 0, 16384, 18432, 18944, 18816, 18848, 18856, 0, - 16384, 18432, 18944, 18816, 18848, 18864, 18860, 0, - 16384, 18432, 18944, 18816, 18848, 18864, 18860, 0, - 16384, 18432, 18944, 18816, 18848, 18864, 18865, 18862, - 0, 16384, 18432, 18944, 18816, 18848, 0, 16384, - 18432, 18944, 18816, 18880, 18864, 0, 16384, 18432, - 18944, 18816, 18880, 18864, 0, 16384, 18432, 18944, - 18816, 18880, 18864, 18866, 0, 16384, 18432, 18944, - 18816, 18880, 18864, 0, 16384, 18432, 18944, 18816, - 18880, 18864, 18868, 0, 16384, 18432, 18944, 18816, - 18880, 18864, 18868, 0, 16384, 18432, 18944, 18816, - 18880, 18864, 18872, 18870, 0, 16384, 18432, 18944, - 18816, 18880, 18864, 0, 16384, 18432, 18944, 18816, - 18880, 18881, 18872, 0, 16384, 18432, 18944, 18816, - 18880, 18881, 18872, 0, 16384, 18432, 18944, 18816, - 18880, 18881, 18872, 18874, 0, 16384, 18432, 18944, - 18816, 18880, 18881, 18872, 0, 16384, 18432, 18944, - 18816, 18880, 18881, 18872, 18876, 0, 16384, 18432, - 18944, 18816, 18880, 18881, 18883, 18876, 0, 16384, - 18432, 18944, 18816, 18880, 18881, 18883, 18876, 18878, - 0, 16384, 18432, 18944, 18816, 0, 16384, 18432, - 18944, 18945, 18880, 0, 16384, 18432, 18944, 18945, - 18880, 0, 16384, 18432, 18944, 18945, 18880, 18882, - 0, 16384, 18432, 18944, 18945, 18880, 0, 16384, - 18432, 18944, 18945, 18880, 18884, 0, 16384, 18432, - 18944, 18945, 18880, 18884, 0, 16384, 18432, 18944, - 18945, 18880, 18888, 18886, 0, 16384, 18432, 18944, - 18945, 18880, 0, 16384, 18432, 18944, 18945, 18880, - 18888, 0, 16384, 18432, 18944, 18945, 18880, 18888, - 0, 16384, 18432, 18944, 18945, 18880, 18888, 18890, - 0, 16384, 18432, 18944, 18945, 18880, 18888, 0, - 16384, 18432, 18944, 18945, 18880, 18896, 18892, 0, - 16384, 18432, 18944, 18945, 18880, 18896, 18892, 0, - 16384, 18432, 18944, 18945, 18880, 18896, 18897, 18894, - 0, 16384, 18432, 18944, 18945, 18880, 0, 16384, - 18432, 18944, 18945, 18880, 18896, 0, 16384, 18432, - 18944, 18945, 18880, 18896, 0, 16384, 18432, 18944, - 18945, 18880, 18896, 18898, 0, 16384, 18432, 18944, - 18945, 18880, 18896, 0, 16384, 18432, 18944, 18945, - 18880, 18896, 18900, 0, 16384, 18432, 18944, 18945, - 18880, 18896, 18900, 0, 16384, 18432, 18944, 18945, - 18880, 18896, 18904, 18902, 0, 16384, 18432, 18944, - 18945, 18880, 18896, 0, 16384, 18432, 18944, 18945, - 18880, 18912, 18904, 0, 16384, 18432, 18944, 18945, - 18880, 18912, 18904, 0, 16384, 18432, 18944, 18945, - 18880, 18912, 18904, 18906, 0, 16384, 18432, 18944, - 18945, 18880, 18912, 18904, 0, 16384, 18432, 18944, - 18945, 18880, 18912, 18913, 18908, 0, 16384, 18432, - 18944, 18945, 18880, 18912, 18913, 18908, 0, 16384, - 18432, 18944, 18945, 18880, 18912, 18913, 18908, 18910, - 0, 16384, 18432, 18944, 18945, 18880, 0, 16384, - 18432, 18944, 18945, 18880, 18912, 0, 16384, 18432, - 18944, 18945, 18947, 18912, 0, 16384, 18432, 18944, - 18945, 18947, 18912, 18914, 0, 16384, 18432, 18944, - 18945, 18947, 18912, 0, 16384, 18432, 18944, 18945, - 18947, 18912, 18916, 0, 16384, 18432, 18944, 18945, - 18947, 18912, 18916, 0, 16384, 18432, 18944, 18945, - 18947, 18912, 18920, 18918, 0, 16384, 18432, 18944, - 18945, 18947, 18912, 0, 16384, 18432, 18944, 18945, - 18947, 18912, 18920, 0, 16384, 18432, 18944, 18945, - 18947, 18912, 18920, 0, 16384, 18432, 18944, 18945, - 18947, 18912, 18920, 18922, 0, 16384, 18432, 18944, - 18945, 18947, 18912, 18920, 0, 16384, 18432, 18944, - 18945, 18947, 18912, 18928, 18924, 0, 16384, 18432, - 18944, 18945, 18947, 18912, 18928, 18924, 0, 16384, - 18432, 18944, 18945, 18947, 18912, 18928, 18929, 18926, - 0, 16384, 18432, 18944, 18945, 18947, 18912, 0, - 16384, 18432, 18944, 18945, 18947, 18912, 18928, 0, - 16384, 18432, 18944, 18945, 18947, 18912, 18928, 0, - 16384, 18432, 18944, 18945, 18947, 18912, 18928, 18930, - 0, 16384, 18432, 18944, 18945, 18947, 18951, 18928, - 0, 16384, 18432, 18944, 18945, 18947, 18951, 18928, - 18932, 0, 16384, 18432, 18944, 18945, 18947, 18951, - 18928, 18932, 0, 16384, 18432, 18944, 18945, 18947, - 18951, 18928, 18936, 18934, 0, 16384, 18432, 18944, - 18945, 18947, 18951, 18928, 0, 16384, 18432, 18944, - 18945, 18947, 18951, 18928, 18936, 0, 16384, 18432, - 18944, 18945, 18947, 18951, 18928, 18936, 0, 16384, - 18432, 18944, 18945, 18947, 18951, 18928, 18936, 18938, - 0, 16384, 18432, 18944, 18945, 18947, 18951, 18928, - 18936, 0, 16384, 18432, 18944, 18945, 18947, 18951, - 18928, 18936, 18940, 0, 16384, 18432, 18944, 18945, - 18947, 18951, 18928, 18936, 18940, 0, 16384, 18432, - 18944, 18945, 18947, 18951, 18928, 18936, 18940, 18942, - 0, 16384, 18432, 0, 16384, 18432, 18944, 0, - 16384, 18432, 18944, 0, 16384, 18432, 18944, 18946, - 0, 16384, 18432, 18944, 0, 16384, 18432, 18944, - 18948, 0, 16384, 18432, 18944, 18948, 0, 16384, - 18432, 18944, 18952, 18950, 0, 16384, 18432, 18944, - 0, 16384, 18432, 18944, 18952, 0, 16384, 18432, - 18944, 18952, 0, 16384, 18432, 18944, 18952, 18954, - 0, 16384, 18432, 18944, 18952, 0, 16384, 18432, - 18944, 18960, 18956, 0, 16384, 18432, 18944, 18960, - 18956, 0, 16384, 18432, 18944, 18960, 18961, 18958, - 0, 16384, 18432, 18944, 0, 16384, 18432, 18944, - 18960, 0, 16384, 18432, 18944, 18960, 0, 16384, - 18432, 18944, 18960, 18962, 0, 16384, 18432, 18944, - 18960, 0, 16384, 18432, 18944, 18960, 18964, 0, - 16384, 18432, 18944, 18960, 18964, 0, 16384, 18432, - 18944, 18960, 18968, 18966, 0, 16384, 18432, 18944, - 18960, 0, 16384, 18432, 18944, 18976, 18968, 0, - 16384, 18432, 18944, 18976, 18968, 0, 16384, 18432, - 18944, 18976, 18968, 18970, 0, 16384, 18432, 18944, - 18976, 18968, 0, 16384, 18432, 18944, 18976, 18977, - 18972, 0, 16384, 18432, 18944, 18976, 18977, 18972, - 0, 16384, 18432, 18944, 18976, 18977, 18972, 18974, - 0, 16384, 18432, 18944, 0, 16384, 18432, 18944, - 18976, 0, 16384, 18432, 18944, 18976, 0, 16384, - 18432, 18944, 18976, 18978, 0, 16384, 18432, 18944, - 18976, 0, 16384, 18432, 18944, 18976, 18980, 0, - 16384, 18432, 18944, 18976, 18980, 0, 16384, 18432, - 18944, 18976, 18984, 18982, 0, 16384, 18432, 18944, - 18976, 0, 16384, 18432, 18944, 18976, 18984, 0, - 16384, 18432, 18944, 18976, 18984, 0, 16384, 18432, - 18944, 18976, 18984, 18986, 0, 16384, 18432, 18944, - 18976, 18984, 0, 16384, 18432, 18944, 18976, 18992, - 18988, 0, 16384, 18432, 18944, 18976, 18992, 18988, - 0, 16384, 18432, 18944, 18976, 18992, 18993, 18990, - 0, 16384, 18432, 18944, 18976, 0, 16384, 18432, - 18944, 19008, 18992, 0, 16384, 18432, 18944, 19008, - 18992, 0, 16384, 18432, 18944, 19008, 18992, 18994, - 0, 16384, 18432, 18944, 19008, 18992, 0, 16384, - 18432, 18944, 19008, 18992, 18996, 0, 16384, 18432, - 18944, 19008, 18992, 18996, 0, 16384, 18432, 18944, - 19008, 18992, 19000, 18998, 0, 16384, 18432, 18944, - 19008, 18992, 0, 16384, 18432, 18944, 19008, 19009, - 19000, 0, 16384, 18432, 18944, 19008, 19009, 19000, - 0, 16384, 18432, 18944, 19008, 19009, 19000, 19002, - 0, 16384, 18432, 18944, 19008, 19009, 19000, 0, - 16384, 18432, 18944, 19008, 19009, 19000, 19004, 0, - 16384, 18432, 18944, 19008, 19009, 19011, 19004, 0, - 16384, 18432, 18944, 19008, 19009, 19011, 19004, 19006, - 0, 16384, 18432, 18944, 0, 16384, 18432, 18944, - 19008, 0, 16384, 18432, 18944, 19008, 0, 16384, - 18432, 18944, 19008, 19010, 0, 16384, 18432, 18944, - 19008, 0, 16384, 18432, 18944, 19008, 19012, 0, - 16384, 18432, 18944, 19008, 19012, 0, 16384, 18432, - 18944, 19008, 19016, 19014, 0, 16384, 18432, 18944, - 19008, 0, 16384, 18432, 18944, 19008, 19016, 0, - 16384, 18432, 18944, 19008, 19016, 0, 16384, 18432, - 18944, 19008, 19016, 19018, 0, 16384, 18432, 18944, - 19008, 19016, 0, 16384, 18432, 18944, 19008, 19024, - 19020, 0, 16384, 18432, 18944, 19008, 19024, 19020, - 0, 16384, 18432, 18944, 19008, 19024, 19025, 19022, - 0, 16384, 18432, 18944, 19008, 0, 16384, 18432, - 18944, 19008, 19024, 0, 16384, 18432, 18944, 19008, - 19024, 0, 16384, 18432, 18944, 19008, 19024, 19026, - 0, 16384, 18432, 18944, 19008, 19024, 0, 16384, - 18432, 18944, 19008, 19024, 19028, 0, 16384, 18432, - 18944, 19008, 19024, 19028, 0, 16384, 18432, 18944, - 19008, 19024, 19032, 19030, 0, 16384, 18432, 18944, - 19008, 19024, 0, 16384, 18432, 18944, 19008, 19040, - 19032, 0, 16384, 18432, 18944, 19008, 19040, 19032, - 0, 16384, 18432, 18944, 19008, 19040, 19032, 19034, - 0, 16384, 18432, 18944, 19008, 19040, 19032, 0, - 16384, 18432, 18944, 19008, 19040, 19041, 19036, 0, - 16384, 18432, 18944, 19008, 19040, 19041, 19036, 0, - 16384, 18432, 18944, 19008, 19040, 19041, 19036, 19038, - 0, 16384, 18432, 18944, 19008, 0, 16384, 18432, - 18944, 19072, 19040, 0, 16384, 18432, 18944, 19072, - 19040, 0, 16384, 18432, 18944, 19072, 19040, 19042, - 0, 16384, 18432, 18944, 19072, 19040, 0, 16384, - 18432, 18944, 19072, 19040, 19044, 0, 16384, 18432, - 18944, 19072, 19040, 19044, 0, 16384, 18432, 18944, - 19072, 19040, 19048, 19046, 0, 16384, 18432, 18944, - 19072, 19040, 0, 16384, 18432, 18944, 19072, 19040, - 19048, 0, 16384, 18432, 18944, 19072, 19040, 19048, - 0, 16384, 18432, 18944, 19072, 19040, 19048, 19050, - 0, 16384, 18432, 18944, 19072, 19040, 19048, 0, - 16384, 18432, 18944, 19072, 19040, 19056, 19052, 0, - 16384, 18432, 18944, 19072, 19040, 19056, 19052, 0, - 16384, 18432, 18944, 19072, 19040, 19056, 19057, 19054, - 0, 16384, 18432, 18944, 19072, 19040, 0, 16384, - 18432, 18944, 19072, 19073, 19056, 0, 16384, 18432, - 18944, 19072, 19073, 19056, 0, 16384, 18432, 18944, - 19072, 19073, 19056, 19058, 0, 16384, 18432, 18944, - 19072, 19073, 19056, 0, 16384, 18432, 18944, 19072, - 19073, 19056, 19060, 0, 16384, 18432, 18944, 19072, - 19073, 19056, 19060, 0, 16384, 18432, 18944, 19072, - 19073, 19056, 19064, 19062, 0, 16384, 18432, 18944, - 19072, 19073, 19056, 0, 16384, 18432, 18944, 19072, - 19073, 19056, 19064, 0, 16384, 18432, 18944, 19072, - 19073, 19075, 19064, 0, 16384, 18432, 18944, 19072, - 19073, 19075, 19064, 19066, 0, 16384, 18432, 18944, - 19072, 19073, 19075, 19064, 0, 16384, 18432, 18944, - 19072, 19073, 19075, 19064, 19068, 0, 16384, 18432, - 18944, 19072, 19073, 19075, 19064, 19068, 0, 16384, - 18432, 18944, 19072, 19073, 19075, 19064, 19068, 19070, - 0, 16384, 18432, 18944, 0, 16384, 18432, 18944, - 19072, 0, 16384, 18432, 18944, 19072, 0, 16384, - 18432, 18944, 19072, 19074, 0, 16384, 18432, 18944, - 19072, 0, 16384, 18432, 18944, 19072, 19076, 0, - 16384, 18432, 18944, 19072, 19076, 0, 16384, 18432, - 18944, 19072, 19080, 19078, 0, 16384, 18432, 18944, - 19072, 0, 16384, 18432, 18944, 19072, 19080, 0, - 16384, 18432, 18944, 19072, 19080, 0, 16384, 18432, - 18944, 19072, 19080, 19082, 0, 16384, 18432, 18944, - 19072, 19080, 0, 16384, 18432, 18944, 19072, 19088, - 19084, 0, 16384, 18432, 18944, 19072, 19088, 19084, - 0, 16384, 18432, 18944, 19072, 19088, 19089, 19086, - 0, 16384, 18432, 18944, 19072, 0, 16384, 18432, - 18944, 19072, 19088, 0, 16384, 18432, 18944, 19072, - 19088, 0, 16384, 18432, 18944, 19072, 19088, 19090, - 0, 16384, 18432, 18944, 19072, 19088, 0, 16384, - 18432, 18944, 19072, 19088, 19092, 0, 16384, 18432, - 18944, 19072, 19088, 19092, 0, 16384, 18432, 18944, - 19072, 19088, 19096, 19094, 0, 16384, 18432, 18944, - 19072, 19088, 0, 16384, 18432, 18944, 19072, 19104, - 19096, 0, 16384, 18432, 18944, 19072, 19104, 19096, - 0, 16384, 18432, 18944, 19072, 19104, 19096, 19098, - 0, 16384, 18432, 18944, 19072, 19104, 19096, 0, - 16384, 18432, 18944, 19072, 19104, 19105, 19100, 0, - 16384, 18432, 18944, 19072, 19104, 19105, 19100, 0, - 16384, 18432, 18944, 19072, 19104, 19105, 19100, 19102, - 0, 16384, 18432, 18944, 19072, 0, 16384, 18432, - 18944, 19072, 19104, 0, 16384, 18432, 18944, 19072, - 19104, 0, 16384, 18432, 18944, 19072, 19104, 19106, - 0, 16384, 18432, 18944, 19072, 19104, 0, 16384, - 18432, 18944, 19072, 19104, 19108, 0, 16384, 18432, - 18944, 19072, 19104, 19108, 0, 16384, 18432, 18944, - 19072, 19104, 19112, 19110, 0, 16384, 18432, 18944, - 19072, 19104, 0, 16384, 18432, 18944, 19072, 19104, - 19112, 0, 16384, 18432, 18944, 19072, 19104, 19112, - 0, 16384, 18432, 18944, 19072, 19104, 19112, 19114, - 0, 16384, 18432, 18944, 19072, 19104, 19112, 0, - 16384, 18432, 18944, 19072, 19104, 19120, 19116, 0, - 16384, 18432, 18944, 19072, 19104, 19120, 19116, 0, - 16384, 18432, 18944, 19072, 19104, 19120, 19121, 19118, - 0, 16384, 18432, 18944, 19072, 19104, 0, 16384, - 18432, 18944, 19072, 19136, 19120, 0, 16384, 18432, - 18944, 19072, 19136, 19120, 0, 16384, 18432, 18944, - 19072, 19136, 19120, 19122, 0, 16384, 18432, 18944, - 19072, 19136, 19120, 0, 16384, 18432, 18944, 19072, - 19136, 19120, 19124, 0, 16384, 18432, 18944, 19072, - 19136, 19120, 19124, 0, 16384, 18432, 18944, 19072, - 19136, 19120, 19128, 19126, 0, 16384, 18432, 18944, - 19072, 19136, 19120, 0, 16384, 18432, 18944, 19072, - 19136, 19137, 19128, 0, 16384, 18432, 18944, 19072, - 19136, 19137, 19128, 0, 16384, 18432, 18944, 19072, - 19136, 19137, 19128, 19130, 0, 16384, 18432, 18944, - 19072, 19136, 19137, 19128, 0, 16384, 18432, 18944, - 19072, 19136, 19137, 19128, 19132, 0, 16384, 18432, - 18944, 19072, 19136, 19137, 19139, 19132, 0, 16384, - 18432, 18944, 19072, 19136, 19137, 19139, 19132, 19134, - 0, 16384, 18432, 18944, 19072, 0, 16384, 18432, - 18944, 19200, 19136, 0, 16384, 18432, 18944, 19200, - 19136, 0, 16384, 18432, 18944, 19200, 19136, 19138, - 0, 16384, 18432, 18944, 19200, 19136, 0, 16384, - 18432, 18944, 19200, 19136, 19140, 0, 16384, 18432, - 18944, 19200, 19136, 19140, 0, 16384, 18432, 18944, - 19200, 19136, 19144, 19142, 0, 16384, 18432, 18944, - 19200, 19136, 0, 16384, 18432, 18944, 19200, 19136, - 19144, 0, 16384, 18432, 18944, 19200, 19136, 19144, - 0, 16384, 18432, 18944, 19200, 19136, 19144, 19146, - 0, 16384, 18432, 18944, 19200, 19136, 19144, 0, - 16384, 18432, 18944, 19200, 19136, 19152, 19148, 0, - 16384, 18432, 18944, 19200, 19136, 19152, 19148, 0, - 16384, 18432, 18944, 19200, 19136, 19152, 19153, 19150, - 0, 16384, 18432, 18944, 19200, 19136, 0, 16384, - 18432, 18944, 19200, 19136, 19152, 0, 16384, 18432, - 18944, 19200, 19136, 19152, 0, 16384, 18432, 18944, - 19200, 19136, 19152, 19154, 0, 16384, 18432, 18944, - 19200, 19136, 19152, 0, 16384, 18432, 18944, 19200, - 19136, 19152, 19156, 0, 16384, 18432, 18944, 19200, - 19136, 19152, 19156, 0, 16384, 18432, 18944, 19200, - 19136, 19152, 19160, 19158, 0, 16384, 18432, 18944, - 19200, 19136, 19152, 0, 16384, 18432, 18944, 19200, - 19136, 19168, 19160, 0, 16384, 18432, 18944, 19200, - 19136, 19168, 19160, 0, 16384, 18432, 18944, 19200, - 19136, 19168, 19160, 19162, 0, 16384, 18432, 18944, - 19200, 19136, 19168, 19160, 0, 16384, 18432, 18944, - 19200, 19136, 19168, 19169, 19164, 0, 16384, 18432, - 18944, 19200, 19136, 19168, 19169, 19164, 0, 16384, - 18432, 18944, 19200, 19136, 19168, 19169, 19164, 19166, - 0, 16384, 18432, 18944, 19200, 19136, 0, 16384, - 18432, 18944, 19200, 19201, 19168, 0, 16384, 18432, - 18944, 19200, 19201, 19168, 0, 16384, 18432, 18944, - 19200, 19201, 19168, 19170, 0, 16384, 18432, 18944, - 19200, 19201, 19168, 0, 16384, 18432, 18944, 19200, - 19201, 19168, 19172, 0, 16384, 18432, 18944, 19200, - 19201, 19168, 19172, 0, 16384, 18432, 18944, 19200, - 19201, 19168, 19176, 19174, 0, 16384, 18432, 18944, - 19200, 19201, 19168, 0, 16384, 18432, 18944, 19200, - 19201, 19168, 19176, 0, 16384, 18432, 18944, 19200, - 19201, 19168, 19176, 0, 16384, 18432, 18944, 19200, - 19201, 19168, 19176, 19178, 0, 16384, 18432, 18944, - 19200, 19201, 19168, 19176, 0, 16384, 18432, 18944, - 19200, 19201, 19168, 19184, 19180, 0, 16384, 18432, - 18944, 19200, 19201, 19168, 19184, 19180, 0, 16384, - 18432, 18944, 19200, 19201, 19168, 19184, 19185, 19182, - 0, 16384, 18432, 18944, 19200, 19201, 19168, 0, - 16384, 18432, 18944, 19200, 19201, 19168, 19184, 0, - 16384, 18432, 18944, 19200, 19201, 19203, 19184, 0, - 16384, 18432, 18944, 19200, 19201, 19203, 19184, 19186, - 0, 16384, 18432, 18944, 19200, 19201, 19203, 19184, - 0, 16384, 18432, 18944, 19200, 19201, 19203, 19184, - 19188, 0, 16384, 18432, 18944, 19200, 19201, 19203, - 19184, 19188, 0, 16384, 18432, 18944, 19200, 19201, - 19203, 19184, 19192, 19190, 0, 16384, 18432, 18944, - 19200, 19201, 19203, 19184, 0, 16384, 18432, 18944, - 19200, 19201, 19203, 19184, 19192, 0, 16384, 18432, - 18944, 19200, 19201, 19203, 19184, 19192, 0, 16384, - 18432, 18944, 19200, 19201, 19203, 19184, 19192, 19194, - 0, 16384, 18432, 18944, 19200, 19201, 19203, 19207, - 19192, 0, 16384, 18432, 18944, 19200, 19201, 19203, - 19207, 19192, 19196, 0, 16384, 18432, 18944, 19200, - 19201, 19203, 19207, 19192, 19196, 0, 16384, 18432, - 18944, 19200, 19201, 19203, 19207, 19192, 19196, 19198, - 0, 16384, 18432, 18944, 0, 16384, 18432, 19456, - 19200, 0, 16384, 18432, 19456, 19200, 0, 16384, - 18432, 19456, 19200, 19202, 0, 16384, 18432, 19456, - 19200, 0, 16384, 18432, 19456, 19200, 19204, 0, - 16384, 18432, 19456, 19200, 19204, 0, 16384, 18432, - 19456, 19200, 19208, 19206, 0, 16384, 18432, 19456, - 19200, 0, 16384, 18432, 19456, 19200, 19208, 0, - 16384, 18432, 19456, 19200, 19208, 0, 16384, 18432, - 19456, 19200, 19208, 19210, 0, 16384, 18432, 19456, - 19200, 19208, 0, 16384, 18432, 19456, 19200, 19216, - 19212, 0, 16384, 18432, 19456, 19200, 19216, 19212, - 0, 16384, 18432, 19456, 19200, 19216, 19217, 19214, - 0, 16384, 18432, 19456, 19200, 0, 16384, 18432, - 19456, 19200, 19216, 0, 16384, 18432, 19456, 19200, - 19216, 0, 16384, 18432, 19456, 19200, 19216, 19218, - 0, 16384, 18432, 19456, 19200, 19216, 0, 16384, - 18432, 19456, 19200, 19216, 19220, 0, 16384, 18432, - 19456, 19200, 19216, 19220, 0, 16384, 18432, 19456, - 19200, 19216, 19224, 19222, 0, 16384, 18432, 19456, - 19200, 19216, 0, 16384, 18432, 19456, 19200, 19232, - 19224, 0, 16384, 18432, 19456, 19200, 19232, 19224, - 0, 16384, 18432, 19456, 19200, 19232, 19224, 19226, - 0, 16384, 18432, 19456, 19200, 19232, 19224, 0, - 16384, 18432, 19456, 19200, 19232, 19233, 19228, 0, - 16384, 18432, 19456, 19200, 19232, 19233, 19228, 0, - 16384, 18432, 19456, 19200, 19232, 19233, 19228, 19230, - 0, 16384, 18432, 19456, 19200, 0, 16384, 18432, - 19456, 19200, 19232, 0, 16384, 18432, 19456, 19200, - 19232, 0, 16384, 18432, 19456, 19200, 19232, 19234, - 0, 16384, 18432, 19456, 19200, 19232, 0, 16384, - 18432, 19456, 19200, 19232, 19236, 0, 16384, 18432, - 19456, 19200, 19232, 19236, 0, 16384, 18432, 19456, - 19200, 19232, 19240, 19238, 0, 16384, 18432, 19456, - 19200, 19232, 0, 16384, 18432, 19456, 19200, 19232, - 19240, 0, 16384, 18432, 19456, 19200, 19232, 19240, - 0, 16384, 18432, 19456, 19200, 19232, 19240, 19242, - 0, 16384, 18432, 19456, 19200, 19232, 19240, 0, - 16384, 18432, 19456, 19200, 19232, 19248, 19244, 0, - 16384, 18432, 19456, 19200, 19232, 19248, 19244, 0, - 16384, 18432, 19456, 19200, 19232, 19248, 19249, 19246, - 0, 16384, 18432, 19456, 19200, 19232, 0, 16384, - 18432, 19456, 19200, 19264, 19248, 0, 16384, 18432, - 19456, 19200, 19264, 19248, 0, 16384, 18432, 19456, - 19200, 19264, 19248, 19250, 0, 16384, 18432, 19456, - 19200, 19264, 19248, 0, 16384, 18432, 19456, 19200, - 19264, 19248, 19252, 0, 16384, 18432, 19456, 19200, - 19264, 19248, 19252, 0, 16384, 18432, 19456, 19200, - 19264, 19248, 19256, 19254, 0, 16384, 18432, 19456, - 19200, 19264, 19248, 0, 16384, 18432, 19456, 19200, - 19264, 19265, 19256, 0, 16384, 18432, 19456, 19200, - 19264, 19265, 19256, 0, 16384, 18432, 19456, 19200, - 19264, 19265, 19256, 19258, 0, 16384, 18432, 19456, - 19200, 19264, 19265, 19256, 0, 16384, 18432, 19456, - 19200, 19264, 19265, 19256, 19260, 0, 16384, 18432, - 19456, 19200, 19264, 19265, 19267, 19260, 0, 16384, - 18432, 19456, 19200, 19264, 19265, 19267, 19260, 19262, - 0, 16384, 18432, 19456, 19200, 0, 16384, 18432, - 19456, 19200, 19264, 0, 16384, 18432, 19456, 19200, - 19264, 0, 16384, 18432, 19456, 19200, 19264, 19266, - 0, 16384, 18432, 19456, 19200, 19264, 0, 16384, - 18432, 19456, 19200, 19264, 19268, 0, 16384, 18432, - 19456, 19200, 19264, 19268, 0, 16384, 18432, 19456, - 19200, 19264, 19272, 19270, 0, 16384, 18432, 19456, - 19200, 19264, 0, 16384, 18432, 19456, 19200, 19264, - 19272, 0, 16384, 18432, 19456, 19200, 19264, 19272, - 0, 16384, 18432, 19456, 19200, 19264, 19272, 19274, - 0, 16384, 18432, 19456, 19200, 19264, 19272, 0, - 16384, 18432, 19456, 19200, 19264, 19280, 19276, 0, - 16384, 18432, 19456, 19200, 19264, 19280, 19276, 0, - 16384, 18432, 19456, 19200, 19264, 19280, 19281, 19278, - 0, 16384, 18432, 19456, 19200, 19264, 0, 16384, - 18432, 19456, 19200, 19264, 19280, 0, 16384, 18432, - 19456, 19200, 19264, 19280, 0, 16384, 18432, 19456, - 19200, 19264, 19280, 19282, 0, 16384, 18432, 19456, - 19200, 19264, 19280, 0, 16384, 18432, 19456, 19200, - 19264, 19280, 19284, 0, 16384, 18432, 19456, 19200, - 19264, 19280, 19284, 0, 16384, 18432, 19456, 19200, - 19264, 19280, 19288, 19286, 0, 16384, 18432, 19456, - 19200, 19264, 19280, 0, 16384, 18432, 19456, 19200, - 19264, 19296, 19288, 0, 16384, 18432, 19456, 19200, - 19264, 19296, 19288, 0, 16384, 18432, 19456, 19200, - 19264, 19296, 19288, 19290, 0, 16384, 18432, 19456, - 19200, 19264, 19296, 19288, 0, 16384, 18432, 19456, - 19200, 19264, 19296, 19297, 19292, 0, 16384, 18432, - 19456, 19200, 19264, 19296, 19297, 19292, 0, 16384, - 18432, 19456, 19200, 19264, 19296, 19297, 19292, 19294, - 0, 16384, 18432, 19456, 19200, 19264, 0, 16384, - 18432, 19456, 19200, 19328, 19296, 0, 16384, 18432, - 19456, 19200, 19328, 19296, 0, 16384, 18432, 19456, - 19200, 19328, 19296, 19298, 0, 16384, 18432, 19456, - 19200, 19328, 19296, 0, 16384, 18432, 19456, 19200, - 19328, 19296, 19300, 0, 16384, 18432, 19456, 19200, - 19328, 19296, 19300, 0, 16384, 18432, 19456, 19200, - 19328, 19296, 19304, 19302, 0, 16384, 18432, 19456, - 19200, 19328, 19296, 0, 16384, 18432, 19456, 19200, - 19328, 19296, 19304, 0, 16384, 18432, 19456, 19200, - 19328, 19296, 19304, 0, 16384, 18432, 19456, 19200, - 19328, 19296, 19304, 19306, 0, 16384, 18432, 19456, - 19200, 19328, 19296, 19304, 0, 16384, 18432, 19456, - 19200, 19328, 19296, 19312, 19308, 0, 16384, 18432, - 19456, 19200, 19328, 19296, 19312, 19308, 0, 16384, - 18432, 19456, 19200, 19328, 19296, 19312, 19313, 19310, - 0, 16384, 18432, 19456, 19200, 19328, 19296, 0, - 16384, 18432, 19456, 19200, 19328, 19329, 19312, 0, - 16384, 18432, 19456, 19200, 19328, 19329, 19312, 0, - 16384, 18432, 19456, 19200, 19328, 19329, 19312, 19314, - 0, 16384, 18432, 19456, 19200, 19328, 19329, 19312, - 0, 16384, 18432, 19456, 19200, 19328, 19329, 19312, - 19316, 0, 16384, 18432, 19456, 19200, 19328, 19329, - 19312, 19316, 0, 16384, 18432, 19456, 19200, 19328, - 19329, 19312, 19320, 19318, 0, 16384, 18432, 19456, - 19200, 19328, 19329, 19312, 0, 16384, 18432, 19456, - 19200, 19328, 19329, 19312, 19320, 0, 16384, 18432, - 19456, 19200, 19328, 19329, 19331, 19320, 0, 16384, - 18432, 19456, 19200, 19328, 19329, 19331, 19320, 19322, - 0, 16384, 18432, 19456, 19200, 19328, 19329, 19331, - 19320, 0, 16384, 18432, 19456, 19200, 19328, 19329, - 19331, 19320, 19324, 0, 16384, 18432, 19456, 19200, - 19328, 19329, 19331, 19320, 19324, 0, 16384, 18432, - 19456, 19200, 19328, 19329, 19331, 19320, 19324, 19326, - 0, 16384, 18432, 19456, 19200, 0, 16384, 18432, - 19456, 19200, 19328, 0, 16384, 18432, 19456, 19457, - 19328, 0, 16384, 18432, 19456, 19457, 19328, 19330, - 0, 16384, 18432, 19456, 19457, 19328, 0, 16384, - 18432, 19456, 19457, 19328, 19332, 0, 16384, 18432, - 19456, 19457, 19328, 19332, 0, 16384, 18432, 19456, - 19457, 19328, 19336, 19334, 0, 16384, 18432, 19456, - 19457, 19328, 0, 16384, 18432, 19456, 19457, 19328, - 19336, 0, 16384, 18432, 19456, 19457, 19328, 19336, - 0, 16384, 18432, 19456, 19457, 19328, 19336, 19338, - 0, 16384, 18432, 19456, 19457, 19328, 19336, 0, - 16384, 18432, 19456, 19457, 19328, 19344, 19340, 0, - 16384, 18432, 19456, 19457, 19328, 19344, 19340, 0, - 16384, 18432, 19456, 19457, 19328, 19344, 19345, 19342, - 0, 16384, 18432, 19456, 19457, 19328, 0, 16384, - 18432, 19456, 19457, 19328, 19344, 0, 16384, 18432, - 19456, 19457, 19328, 19344, 0, 16384, 18432, 19456, - 19457, 19328, 19344, 19346, 0, 16384, 18432, 19456, - 19457, 19328, 19344, 0, 16384, 18432, 19456, 19457, - 19328, 19344, 19348, 0, 16384, 18432, 19456, 19457, - 19328, 19344, 19348, 0, 16384, 18432, 19456, 19457, - 19328, 19344, 19352, 19350, 0, 16384, 18432, 19456, - 19457, 19328, 19344, 0, 16384, 18432, 19456, 19457, - 19328, 19360, 19352, 0, 16384, 18432, 19456, 19457, - 19328, 19360, 19352, 0, 16384, 18432, 19456, 19457, - 19328, 19360, 19352, 19354, 0, 16384, 18432, 19456, - 19457, 19328, 19360, 19352, 0, 16384, 18432, 19456, - 19457, 19328, 19360, 19361, 19356, 0, 16384, 18432, - 19456, 19457, 19328, 19360, 19361, 19356, 0, 16384, - 18432, 19456, 19457, 19328, 19360, 19361, 19356, 19358, - 0, 16384, 18432, 19456, 19457, 19328, 0, 16384, - 18432, 19456, 19457, 19328, 19360, 0, 16384, 18432, - 19456, 19457, 19328, 19360, 0, 16384, 18432, 19456, - 19457, 19328, 19360, 19362, 0, 16384, 18432, 19456, - 19457, 19328, 19360, 0, 16384, 18432, 19456, 19457, - 19328, 19360, 19364, 0, 16384, 18432, 19456, 19457, - 19328, 19360, 19364, 0, 16384, 18432, 19456, 19457, - 19328, 19360, 19368, 19366, 0, 16384, 18432, 19456, - 19457, 19328, 19360, 0, 16384, 18432, 19456, 19457, - 19328, 19360, 19368, 0, 16384, 18432, 19456, 19457, - 19328, 19360, 19368, 0, 16384, 18432, 19456, 19457, - 19328, 19360, 19368, 19370, 0, 16384, 18432, 19456, - 19457, 19328, 19360, 19368, 0, 16384, 18432, 19456, - 19457, 19328, 19360, 19376, 19372, 0, 16384, 18432, - 19456, 19457, 19328, 19360, 19376, 19372, 0, 16384, - 18432, 19456, 19457, 19328, 19360, 19376, 19377, 19374, - 0, 16384, 18432, 19456, 19457, 19328, 19360, 0, - 16384, 18432, 19456, 19457, 19328, 19392, 19376, 0, - 16384, 18432, 19456, 19457, 19328, 19392, 19376, 0, - 16384, 18432, 19456, 19457, 19328, 19392, 19376, 19378, - 0, 16384, 18432, 19456, 19457, 19328, 19392, 19376, - 0, 16384, 18432, 19456, 19457, 19328, 19392, 19376, - 19380, 0, 16384, 18432, 19456, 19457, 19328, 19392, - 19376, 19380, 0, 16384, 18432, 19456, 19457, 19328, - 19392, 19376, 19384, 19382, 0, 16384, 18432, 19456, - 19457, 19328, 19392, 19376, 0, 16384, 18432, 19456, - 19457, 19328, 19392, 19393, 19384, 0, 16384, 18432, - 19456, 19457, 19328, 19392, 19393, 19384, 0, 16384, - 18432, 19456, 19457, 19328, 19392, 19393, 19384, 19386, - 0, 16384, 18432, 19456, 19457, 19328, 19392, 19393, - 19384, 0, 16384, 18432, 19456, 19457, 19328, 19392, - 19393, 19384, 19388, 0, 16384, 18432, 19456, 19457, - 19328, 19392, 19393, 19395, 19388, 0, 16384, 18432, - 19456, 19457, 19328, 19392, 19393, 19395, 19388, 19390, - 0, 16384, 18432, 19456, 19457, 19328, 0, 16384, - 18432, 19456, 19457, 19328, 19392, 0, 16384, 18432, - 19456, 19457, 19328, 19392, 0, 16384, 18432, 19456, - 19457, 19328, 19392, 19394, 0, 16384, 18432, 19456, - 19457, 19459, 19392, 0, 16384, 18432, 19456, 19457, - 19459, 19392, 19396, 0, 16384, 18432, 19456, 19457, - 19459, 19392, 19396, 0, 16384, 18432, 19456, 19457, - 19459, 19392, 19400, 19398, 0, 16384, 18432, 19456, - 19457, 19459, 19392, 0, 16384, 18432, 19456, 19457, - 19459, 19392, 19400, 0, 16384, 18432, 19456, 19457, - 19459, 19392, 19400, 0, 16384, 18432, 19456, 19457, - 19459, 19392, 19400, 19402, 0, 16384, 18432, 19456, - 19457, 19459, 19392, 19400, 0, 16384, 18432, 19456, - 19457, 19459, 19392, 19408, 19404, 0, 16384, 18432, - 19456, 19457, 19459, 19392, 19408, 19404, 0, 16384, - 18432, 19456, 19457, 19459, 19392, 19408, 19409, 19406, - 0, 16384, 18432, 19456, 19457, 19459, 19392, 0, - 16384, 18432, 19456, 19457, 19459, 19392, 19408, 0, - 16384, 18432, 19456, 19457, 19459, 19392, 19408, 0, - 16384, 18432, 19456, 19457, 19459, 19392, 19408, 19410, - 0, 16384, 18432, 19456, 19457, 19459, 19392, 19408, - 0, 16384, 18432, 19456, 19457, 19459, 19392, 19408, - 19412, 0, 16384, 18432, 19456, 19457, 19459, 19392, - 19408, 19412, 0, 16384, 18432, 19456, 19457, 19459, - 19392, 19408, 19416, 19414, 0, 16384, 18432, 19456, - 19457, 19459, 19392, 19408, 0, 16384, 18432, 19456, - 19457, 19459, 19392, 19424, 19416, 0, 16384, 18432, - 19456, 19457, 19459, 19392, 19424, 19416, 0, 16384, - 18432, 19456, 19457, 19459, 19392, 19424, 19416, 19418, - 0, 16384, 18432, 19456, 19457, 19459, 19392, 19424, - 19416, 0, 16384, 18432, 19456, 19457, 19459, 19392, - 19424, 19425, 19420, 0, 16384, 18432, 19456, 19457, - 19459, 19392, 19424, 19425, 19420, 0, 16384, 18432, - 19456, 19457, 19459, 19392, 19424, 19425, 19420, 19422, - 0, 16384, 18432, 19456, 19457, 19459, 19392, 0, - 16384, 18432, 19456, 19457, 19459, 19392, 19424, 0, - 16384, 18432, 19456, 19457, 19459, 19392, 19424, 0, - 16384, 18432, 19456, 19457, 19459, 19392, 19424, 19426, - 0, 16384, 18432, 19456, 19457, 19459, 19392, 19424, - 0, 16384, 18432, 19456, 19457, 19459, 19392, 19424, - 19428, 0, 16384, 18432, 19456, 19457, 19459, 19392, - 19424, 19428, 0, 16384, 18432, 19456, 19457, 19459, - 19392, 19424, 19432, 19430, 0, 16384, 18432, 19456, - 19457, 19459, 19463, 19424, 0, 16384, 18432, 19456, - 19457, 19459, 19463, 19424, 19432, 0, 16384, 18432, - 19456, 19457, 19459, 19463, 19424, 19432, 0, 16384, - 18432, 19456, 19457, 19459, 19463, 19424, 19432, 19434, - 0, 16384, 18432, 19456, 19457, 19459, 19463, 19424, - 19432, 0, 16384, 18432, 19456, 19457, 19459, 19463, - 19424, 19440, 19436, 0, 16384, 18432, 19456, 19457, - 19459, 19463, 19424, 19440, 19436, 0, 16384, 18432, - 19456, 19457, 19459, 19463, 19424, 19440, 19441, 19438, - 0, 16384, 18432, 19456, 19457, 19459, 19463, 19424, - 0, 16384, 18432, 19456, 19457, 19459, 19463, 19424, - 19440, 0, 16384, 18432, 19456, 19457, 19459, 19463, - 19424, 19440, 0, 16384, 18432, 19456, 19457, 19459, - 19463, 19424, 19440, 19442, 0, 16384, 18432, 19456, - 19457, 19459, 19463, 19424, 19440, 0, 16384, 18432, - 19456, 19457, 19459, 19463, 19424, 19440, 19444, 0, - 16384, 18432, 19456, 19457, 19459, 19463, 19424, 19440, - 19444, 0, 16384, 18432, 19456, 19457, 19459, 19463, - 19424, 19440, 19448, 19446, 0, 16384, 18432, 19456, - 19457, 19459, 19463, 19424, 19440, 0, 16384, 18432, - 19456, 19457, 19459, 19463, 19424, 19440, 19448, 0, - 16384, 18432, 19456, 19457, 19459, 19463, 19424, 19440, - 19448, 0, 16384, 18432, 19456, 19457, 19459, 19463, - 19424, 19440, 19448, 19450, 0, 16384, 18432, 19456, - 19457, 19459, 19463, 19424, 19440, 19448, 0, 16384, - 18432, 19456, 19457, 19459, 19463, 19424, 19440, 19448, - 19452, 0, 16384, 18432, 19456, 19457, 19459, 19463, - 19424, 19440, 19448, 19452, 0, 16384, 18432, 19456, - 19457, 19459, 19463, 19424, 19440, 19448, 19452, 19454, - 0, 16384, 18432, 0, 16384, 18432, 19456, 0, - 16384, 18432, 19456, 0, 16384, 18432, 19456, 19458, - 0, 16384, 18432, 19456, 0, 16384, 18432, 19456, - 19460, 0, 16384, 18432, 19456, 19460, 0, 16384, - 18432, 19456, 19464, 19462, 0, 16384, 18432, 19456, - 0, 16384, 18432, 19456, 19464, 0, 16384, 18432, - 19456, 19464, 0, 16384, 18432, 19456, 19464, 19466, - 0, 16384, 18432, 19456, 19464, 0, 16384, 18432, - 19456, 19472, 19468, 0, 16384, 18432, 19456, 19472, - 19468, 0, 16384, 18432, 19456, 19472, 19473, 19470, - 0, 16384, 18432, 19456, 0, 16384, 18432, 19456, - 19472, 0, 16384, 18432, 19456, 19472, 0, 16384, - 18432, 19456, 19472, 19474, 0, 16384, 18432, 19456, - 19472, 0, 16384, 18432, 19456, 19472, 19476, 0, - 16384, 18432, 19456, 19472, 19476, 0, 16384, 18432, - 19456, 19472, 19480, 19478, 0, 16384, 18432, 19456, - 19472, 0, 16384, 18432, 19456, 19488, 19480, 0, - 16384, 18432, 19456, 19488, 19480, 0, 16384, 18432, - 19456, 19488, 19480, 19482, 0, 16384, 18432, 19456, - 19488, 19480, 0, 16384, 18432, 19456, 19488, 19489, - 19484, 0, 16384, 18432, 19456, 19488, 19489, 19484, - 0, 16384, 18432, 19456, 19488, 19489, 19484, 19486, - 0, 16384, 18432, 19456, 0, 16384, 18432, 19456, - 19488, 0, 16384, 18432, 19456, 19488, 0, 16384, - 18432, 19456, 19488, 19490, 0, 16384, 18432, 19456, - 19488, 0, 16384, 18432, 19456, 19488, 19492, 0, - 16384, 18432, 19456, 19488, 19492, 0, 16384, 18432, - 19456, 19488, 19496, 19494, 0, 16384, 18432, 19456, - 19488, 0, 16384, 18432, 19456, 19488, 19496, 0, - 16384, 18432, 19456, 19488, 19496, 0, 16384, 18432, - 19456, 19488, 19496, 19498, 0, 16384, 18432, 19456, - 19488, 19496, 0, 16384, 18432, 19456, 19488, 19504, - 19500, 0, 16384, 18432, 19456, 19488, 19504, 19500, - 0, 16384, 18432, 19456, 19488, 19504, 19505, 19502, - 0, 16384, 18432, 19456, 19488, 0, 16384, 18432, - 19456, 19520, 19504, 0, 16384, 18432, 19456, 19520, - 19504, 0, 16384, 18432, 19456, 19520, 19504, 19506, - 0, 16384, 18432, 19456, 19520, 19504, 0, 16384, - 18432, 19456, 19520, 19504, 19508, 0, 16384, 18432, - 19456, 19520, 19504, 19508, 0, 16384, 18432, 19456, - 19520, 19504, 19512, 19510, 0, 16384, 18432, 19456, - 19520, 19504, 0, 16384, 18432, 19456, 19520, 19521, - 19512, 0, 16384, 18432, 19456, 19520, 19521, 19512, - 0, 16384, 18432, 19456, 19520, 19521, 19512, 19514, - 0, 16384, 18432, 19456, 19520, 19521, 19512, 0, - 16384, 18432, 19456, 19520, 19521, 19512, 19516, 0, - 16384, 18432, 19456, 19520, 19521, 19523, 19516, 0, - 16384, 18432, 19456, 19520, 19521, 19523, 19516, 19518, - 0, 16384, 18432, 19456, 0, 16384, 18432, 19456, - 19520, 0, 16384, 18432, 19456, 19520, 0, 16384, - 18432, 19456, 19520, 19522, 0, 16384, 18432, 19456, - 19520, 0, 16384, 18432, 19456, 19520, 19524, 0, - 16384, 18432, 19456, 19520, 19524, 0, 16384, 18432, - 19456, 19520, 19528, 19526, 0, 16384, 18432, 19456, - 19520, 0, 16384, 18432, 19456, 19520, 19528, 0, - 16384, 18432, 19456, 19520, 19528, 0, 16384, 18432, - 19456, 19520, 19528, 19530, 0, 16384, 18432, 19456, - 19520, 19528, 0, 16384, 18432, 19456, 19520, 19536, - 19532, 0, 16384, 18432, 19456, 19520, 19536, 19532, - 0, 16384, 18432, 19456, 19520, 19536, 19537, 19534, - 0, 16384, 18432, 19456, 19520, 0, 16384, 18432, - 19456, 19520, 19536, 0, 16384, 18432, 19456, 19520, - 19536, 0, 16384, 18432, 19456, 19520, 19536, 19538, - 0, 16384, 18432, 19456, 19520, 19536, 0, 16384, - 18432, 19456, 19520, 19536, 19540, 0, 16384, 18432, - 19456, 19520, 19536, 19540, 0, 16384, 18432, 19456, - 19520, 19536, 19544, 19542, 0, 16384, 18432, 19456, - 19520, 19536, 0, 16384, 18432, 19456, 19520, 19552, - 19544, 0, 16384, 18432, 19456, 19520, 19552, 19544, - 0, 16384, 18432, 19456, 19520, 19552, 19544, 19546, - 0, 16384, 18432, 19456, 19520, 19552, 19544, 0, - 16384, 18432, 19456, 19520, 19552, 19553, 19548, 0, - 16384, 18432, 19456, 19520, 19552, 19553, 19548, 0, - 16384, 18432, 19456, 19520, 19552, 19553, 19548, 19550, - 0, 16384, 18432, 19456, 19520, 0, 16384, 18432, - 19456, 19584, 19552, 0, 16384, 18432, 19456, 19584, - 19552, 0, 16384, 18432, 19456, 19584, 19552, 19554, - 0, 16384, 18432, 19456, 19584, 19552, 0, 16384, - 18432, 19456, 19584, 19552, 19556, 0, 16384, 18432, - 19456, 19584, 19552, 19556, 0, 16384, 18432, 19456, - 19584, 19552, 19560, 19558, 0, 16384, 18432, 19456, - 19584, 19552, 0, 16384, 18432, 19456, 19584, 19552, - 19560, 0, 16384, 18432, 19456, 19584, 19552, 19560, - 0, 16384, 18432, 19456, 19584, 19552, 19560, 19562, - 0, 16384, 18432, 19456, 19584, 19552, 19560, 0, - 16384, 18432, 19456, 19584, 19552, 19568, 19564, 0, - 16384, 18432, 19456, 19584, 19552, 19568, 19564, 0, - 16384, 18432, 19456, 19584, 19552, 19568, 19569, 19566, - 0, 16384, 18432, 19456, 19584, 19552, 0, 16384, - 18432, 19456, 19584, 19585, 19568, 0, 16384, 18432, - 19456, 19584, 19585, 19568, 0, 16384, 18432, 19456, - 19584, 19585, 19568, 19570, 0, 16384, 18432, 19456, - 19584, 19585, 19568, 0, 16384, 18432, 19456, 19584, - 19585, 19568, 19572, 0, 16384, 18432, 19456, 19584, - 19585, 19568, 19572, 0, 16384, 18432, 19456, 19584, - 19585, 19568, 19576, 19574, 0, 16384, 18432, 19456, - 19584, 19585, 19568, 0, 16384, 18432, 19456, 19584, - 19585, 19568, 19576, 0, 16384, 18432, 19456, 19584, - 19585, 19587, 19576, 0, 16384, 18432, 19456, 19584, - 19585, 19587, 19576, 19578, 0, 16384, 18432, 19456, - 19584, 19585, 19587, 19576, 0, 16384, 18432, 19456, - 19584, 19585, 19587, 19576, 19580, 0, 16384, 18432, - 19456, 19584, 19585, 19587, 19576, 19580, 0, 16384, - 18432, 19456, 19584, 19585, 19587, 19576, 19580, 19582, - 0, 16384, 18432, 19456, 0, 16384, 18432, 19456, - 19584, 0, 16384, 18432, 19456, 19584, 0, 16384, - 18432, 19456, 19584, 19586, 0, 16384, 18432, 19456, - 19584, 0, 16384, 18432, 19456, 19584, 19588, 0, - 16384, 18432, 19456, 19584, 19588, 0, 16384, 18432, - 19456, 19584, 19592, 19590, 0, 16384, 18432, 19456, - 19584, 0, 16384, 18432, 19456, 19584, 19592, 0, - 16384, 18432, 19456, 19584, 19592, 0, 16384, 18432, - 19456, 19584, 19592, 19594, 0, 16384, 18432, 19456, - 19584, 19592, 0, 16384, 18432, 19456, 19584, 19600, - 19596, 0, 16384, 18432, 19456, 19584, 19600, 19596, - 0, 16384, 18432, 19456, 19584, 19600, 19601, 19598, - 0, 16384, 18432, 19456, 19584, 0, 16384, 18432, - 19456, 19584, 19600, 0, 16384, 18432, 19456, 19584, - 19600, 0, 16384, 18432, 19456, 19584, 19600, 19602, - 0, 16384, 18432, 19456, 19584, 19600, 0, 16384, - 18432, 19456, 19584, 19600, 19604, 0, 16384, 18432, - 19456, 19584, 19600, 19604, 0, 16384, 18432, 19456, - 19584, 19600, 19608, 19606, 0, 16384, 18432, 19456, - 19584, 19600, 0, 16384, 18432, 19456, 19584, 19616, - 19608, 0, 16384, 18432, 19456, 19584, 19616, 19608, - 0, 16384, 18432, 19456, 19584, 19616, 19608, 19610, - 0, 16384, 18432, 19456, 19584, 19616, 19608, 0, - 16384, 18432, 19456, 19584, 19616, 19617, 19612, 0, - 16384, 18432, 19456, 19584, 19616, 19617, 19612, 0, - 16384, 18432, 19456, 19584, 19616, 19617, 19612, 19614, - 0, 16384, 18432, 19456, 19584, 0, 16384, 18432, - 19456, 19584, 19616, 0, 16384, 18432, 19456, 19584, - 19616, 0, 16384, 18432, 19456, 19584, 19616, 19618, - 0, 16384, 18432, 19456, 19584, 19616, 0, 16384, - 18432, 19456, 19584, 19616, 19620, 0, 16384, 18432, - 19456, 19584, 19616, 19620, 0, 16384, 18432, 19456, - 19584, 19616, 19624, 19622, 0, 16384, 18432, 19456, - 19584, 19616, 0, 16384, 18432, 19456, 19584, 19616, - 19624, 0, 16384, 18432, 19456, 19584, 19616, 19624, - 0, 16384, 18432, 19456, 19584, 19616, 19624, 19626, - 0, 16384, 18432, 19456, 19584, 19616, 19624, 0, - 16384, 18432, 19456, 19584, 19616, 19632, 19628, 0, - 16384, 18432, 19456, 19584, 19616, 19632, 19628, 0, - 16384, 18432, 19456, 19584, 19616, 19632, 19633, 19630, - 0, 16384, 18432, 19456, 19584, 19616, 0, 16384, - 18432, 19456, 19584, 19648, 19632, 0, 16384, 18432, - 19456, 19584, 19648, 19632, 0, 16384, 18432, 19456, - 19584, 19648, 19632, 19634, 0, 16384, 18432, 19456, - 19584, 19648, 19632, 0, 16384, 18432, 19456, 19584, - 19648, 19632, 19636, 0, 16384, 18432, 19456, 19584, - 19648, 19632, 19636, 0, 16384, 18432, 19456, 19584, - 19648, 19632, 19640, 19638, 0, 16384, 18432, 19456, - 19584, 19648, 19632, 0, 16384, 18432, 19456, 19584, - 19648, 19649, 19640, 0, 16384, 18432, 19456, 19584, - 19648, 19649, 19640, 0, 16384, 18432, 19456, 19584, - 19648, 19649, 19640, 19642, 0, 16384, 18432, 19456, - 19584, 19648, 19649, 19640, 0, 16384, 18432, 19456, - 19584, 19648, 19649, 19640, 19644, 0, 16384, 18432, - 19456, 19584, 19648, 19649, 19651, 19644, 0, 16384, - 18432, 19456, 19584, 19648, 19649, 19651, 19644, 19646, - 0, 16384, 18432, 19456, 19584, 0, 16384, 18432, - 19456, 19712, 19648, 0, 16384, 18432, 19456, 19712, - 19648, 0, 16384, 18432, 19456, 19712, 19648, 19650, - 0, 16384, 18432, 19456, 19712, 19648, 0, 16384, - 18432, 19456, 19712, 19648, 19652, 0, 16384, 18432, - 19456, 19712, 19648, 19652, 0, 16384, 18432, 19456, - 19712, 19648, 19656, 19654, 0, 16384, 18432, 19456, - 19712, 19648, 0, 16384, 18432, 19456, 19712, 19648, - 19656, 0, 16384, 18432, 19456, 19712, 19648, 19656, - 0, 16384, 18432, 19456, 19712, 19648, 19656, 19658, - 0, 16384, 18432, 19456, 19712, 19648, 19656, 0, - 16384, 18432, 19456, 19712, 19648, 19664, 19660, 0, - 16384, 18432, 19456, 19712, 19648, 19664, 19660, 0, - 16384, 18432, 19456, 19712, 19648, 19664, 19665, 19662, - 0, 16384, 18432, 19456, 19712, 19648, 0, 16384, - 18432, 19456, 19712, 19648, 19664, 0, 16384, 18432, - 19456, 19712, 19648, 19664, 0, 16384, 18432, 19456, - 19712, 19648, 19664, 19666, 0, 16384, 18432, 19456, - 19712, 19648, 19664, 0, 16384, 18432, 19456, 19712, - 19648, 19664, 19668, 0, 16384, 18432, 19456, 19712, - 19648, 19664, 19668, 0, 16384, 18432, 19456, 19712, - 19648, 19664, 19672, 19670, 0, 16384, 18432, 19456, - 19712, 19648, 19664, 0, 16384, 18432, 19456, 19712, - 19648, 19680, 19672, 0, 16384, 18432, 19456, 19712, - 19648, 19680, 19672, 0, 16384, 18432, 19456, 19712, - 19648, 19680, 19672, 19674, 0, 16384, 18432, 19456, - 19712, 19648, 19680, 19672, 0, 16384, 18432, 19456, - 19712, 19648, 19680, 19681, 19676, 0, 16384, 18432, - 19456, 19712, 19648, 19680, 19681, 19676, 0, 16384, - 18432, 19456, 19712, 19648, 19680, 19681, 19676, 19678, - 0, 16384, 18432, 19456, 19712, 19648, 0, 16384, - 18432, 19456, 19712, 19713, 19680, 0, 16384, 18432, - 19456, 19712, 19713, 19680, 0, 16384, 18432, 19456, - 19712, 19713, 19680, 19682, 0, 16384, 18432, 19456, - 19712, 19713, 19680, 0, 16384, 18432, 19456, 19712, - 19713, 19680, 19684, 0, 16384, 18432, 19456, 19712, - 19713, 19680, 19684, 0, 16384, 18432, 19456, 19712, - 19713, 19680, 19688, 19686, 0, 16384, 18432, 19456, - 19712, 19713, 19680, 0, 16384, 18432, 19456, 19712, - 19713, 19680, 19688, 0, 16384, 18432, 19456, 19712, - 19713, 19680, 19688, 0, 16384, 18432, 19456, 19712, - 19713, 19680, 19688, 19690, 0, 16384, 18432, 19456, - 19712, 19713, 19680, 19688, 0, 16384, 18432, 19456, - 19712, 19713, 19680, 19696, 19692, 0, 16384, 18432, - 19456, 19712, 19713, 19680, 19696, 19692, 0, 16384, - 18432, 19456, 19712, 19713, 19680, 19696, 19697, 19694, - 0, 16384, 18432, 19456, 19712, 19713, 19680, 0, - 16384, 18432, 19456, 19712, 19713, 19680, 19696, 0, - 16384, 18432, 19456, 19712, 19713, 19715, 19696, 0, - 16384, 18432, 19456, 19712, 19713, 19715, 19696, 19698, - 0, 16384, 18432, 19456, 19712, 19713, 19715, 19696, - 0, 16384, 18432, 19456, 19712, 19713, 19715, 19696, - 19700, 0, 16384, 18432, 19456, 19712, 19713, 19715, - 19696, 19700, 0, 16384, 18432, 19456, 19712, 19713, - 19715, 19696, 19704, 19702, 0, 16384, 18432, 19456, - 19712, 19713, 19715, 19696, 0, 16384, 18432, 19456, - 19712, 19713, 19715, 19696, 19704, 0, 16384, 18432, - 19456, 19712, 19713, 19715, 19696, 19704, 0, 16384, - 18432, 19456, 19712, 19713, 19715, 19696, 19704, 19706, - 0, 16384, 18432, 19456, 19712, 19713, 19715, 19719, - 19704, 0, 16384, 18432, 19456, 19712, 19713, 19715, - 19719, 19704, 19708, 0, 16384, 18432, 19456, 19712, - 19713, 19715, 19719, 19704, 19708, 0, 16384, 18432, - 19456, 19712, 19713, 19715, 19719, 19704, 19708, 19710, - 0, 16384, 18432, 19456, 0, 16384, 20480, 19456, - 19712, 0, 16384, 20480, 19456, 19712, 0, 16384, - 20480, 19456, 19712, 19714, 0, 16384, 20480, 19456, - 19712, 0, 16384, 20480, 19456, 19712, 19716, 0, - 16384, 20480, 19456, 19712, 19716, 0, 16384, 20480, - 19456, 19712, 19720, 19718, 0, 16384, 20480, 19456, - 19712, 0, 16384, 20480, 19456, 19712, 19720, 0, - 16384, 20480, 19456, 19712, 19720, 0, 16384, 20480, - 19456, 19712, 19720, 19722, 0, 16384, 20480, 19456, - 19712, 19720, 0, 16384, 20480, 19456, 19712, 19728, - 19724, 0, 16384, 20480, 19456, 19712, 19728, 19724, - 0, 16384, 20480, 19456, 19712, 19728, 19729, 19726, - 0, 16384, 20480, 19456, 19712, 0, 16384, 20480, - 19456, 19712, 19728, 0, 16384, 20480, 19456, 19712, - 19728, 0, 16384, 20480, 19456, 19712, 19728, 19730, - 0, 16384, 20480, 19456, 19712, 19728, 0, 16384, - 20480, 19456, 19712, 19728, 19732, 0, 16384, 20480, - 19456, 19712, 19728, 19732, 0, 16384, 20480, 19456, - 19712, 19728, 19736, 19734, 0, 16384, 20480, 19456, - 19712, 19728, 0, 16384, 20480, 19456, 19712, 19744, - 19736, 0, 16384, 20480, 19456, 19712, 19744, 19736, - 0, 16384, 20480, 19456, 19712, 19744, 19736, 19738, - 0, 16384, 20480, 19456, 19712, 19744, 19736, 0, - 16384, 20480, 19456, 19712, 19744, 19745, 19740, 0, - 16384, 20480, 19456, 19712, 19744, 19745, 19740, 0, - 16384, 20480, 19456, 19712, 19744, 19745, 19740, 19742, - 0, 16384, 20480, 19456, 19712, 0, 16384, 20480, - 19456, 19712, 19744, 0, 16384, 20480, 19456, 19712, - 19744, 0, 16384, 20480, 19456, 19712, 19744, 19746, - 0, 16384, 20480, 19456, 19712, 19744, 0, 16384, - 20480, 19456, 19712, 19744, 19748, 0, 16384, 20480, - 19456, 19712, 19744, 19748, 0, 16384, 20480, 19456, - 19712, 19744, 19752, 19750, 0, 16384, 20480, 19456, - 19712, 19744, 0, 16384, 20480, 19456, 19712, 19744, - 19752, 0, 16384, 20480, 19456, 19712, 19744, 19752, - 0, 16384, 20480, 19456, 19712, 19744, 19752, 19754, - 0, 16384, 20480, 19456, 19712, 19744, 19752, 0, - 16384, 20480, 19456, 19712, 19744, 19760, 19756, 0, - 16384, 20480, 19456, 19712, 19744, 19760, 19756, 0, - 16384, 20480, 19456, 19712, 19744, 19760, 19761, 19758, - 0, 16384, 20480, 19456, 19712, 19744, 0, 16384, - 20480, 19456, 19712, 19776, 19760, 0, 16384, 20480, - 19456, 19712, 19776, 19760, 0, 16384, 20480, 19456, - 19712, 19776, 19760, 19762, 0, 16384, 20480, 19456, - 19712, 19776, 19760, 0, 16384, 20480, 19456, 19712, - 19776, 19760, 19764, 0, 16384, 20480, 19456, 19712, - 19776, 19760, 19764, 0, 16384, 20480, 19456, 19712, - 19776, 19760, 19768, 19766, 0, 16384, 20480, 19456, - 19712, 19776, 19760, 0, 16384, 20480, 19456, 19712, - 19776, 19777, 19768, 0, 16384, 20480, 19456, 19712, - 19776, 19777, 19768, 0, 16384, 20480, 19456, 19712, - 19776, 19777, 19768, 19770, 0, 16384, 20480, 19456, - 19712, 19776, 19777, 19768, 0, 16384, 20480, 19456, - 19712, 19776, 19777, 19768, 19772, 0, 16384, 20480, - 19456, 19712, 19776, 19777, 19779, 19772, 0, 16384, - 20480, 19456, 19712, 19776, 19777, 19779, 19772, 19774, - 0, 16384, 20480, 19456, 19712, 0, 16384, 20480, - 19456, 19712, 19776, 0, 16384, 20480, 19456, 19712, - 19776, 0, 16384, 20480, 19456, 19712, 19776, 19778, - 0, 16384, 20480, 19456, 19712, 19776, 0, 16384, - 20480, 19456, 19712, 19776, 19780, 0, 16384, 20480, - 19456, 19712, 19776, 19780, 0, 16384, 20480, 19456, - 19712, 19776, 19784, 19782, 0, 16384, 20480, 19456, - 19712, 19776, 0, 16384, 20480, 19456, 19712, 19776, - 19784, 0, 16384, 20480, 19456, 19712, 19776, 19784, - 0, 16384, 20480, 19456, 19712, 19776, 19784, 19786, - 0, 16384, 20480, 19456, 19712, 19776, 19784, 0, - 16384, 20480, 19456, 19712, 19776, 19792, 19788, 0, - 16384, 20480, 19456, 19712, 19776, 19792, 19788, 0, - 16384, 20480, 19456, 19712, 19776, 19792, 19793, 19790, - 0, 16384, 20480, 19456, 19712, 19776, 0, 16384, - 20480, 19456, 19712, 19776, 19792, 0, 16384, 20480, - 19456, 19712, 19776, 19792, 0, 16384, 20480, 19456, - 19712, 19776, 19792, 19794, 0, 16384, 20480, 19456, - 19712, 19776, 19792, 0, 16384, 20480, 19456, 19712, - 19776, 19792, 19796, 0, 16384, 20480, 19456, 19712, - 19776, 19792, 19796, 0, 16384, 20480, 19456, 19712, - 19776, 19792, 19800, 19798, 0, 16384, 20480, 19456, - 19712, 19776, 19792, 0, 16384, 20480, 19456, 19712, - 19776, 19808, 19800, 0, 16384, 20480, 19456, 19712, - 19776, 19808, 19800, 0, 16384, 20480, 19456, 19712, - 19776, 19808, 19800, 19802, 0, 16384, 20480, 19456, - 19712, 19776, 19808, 19800, 0, 16384, 20480, 19456, - 19712, 19776, 19808, 19809, 19804, 0, 16384, 20480, - 19456, 19712, 19776, 19808, 19809, 19804, 0, 16384, - 20480, 19456, 19712, 19776, 19808, 19809, 19804, 19806, - 0, 16384, 20480, 19456, 19712, 19776, 0, 16384, - 20480, 19456, 19712, 19840, 19808, 0, 16384, 20480, - 19456, 19712, 19840, 19808, 0, 16384, 20480, 19456, - 19712, 19840, 19808, 19810, 0, 16384, 20480, 19456, - 19712, 19840, 19808, 0, 16384, 20480, 19456, 19712, - 19840, 19808, 19812, 0, 16384, 20480, 19456, 19712, - 19840, 19808, 19812, 0, 16384, 20480, 19456, 19712, - 19840, 19808, 19816, 19814, 0, 16384, 20480, 19456, - 19712, 19840, 19808, 0, 16384, 20480, 19456, 19712, - 19840, 19808, 19816, 0, 16384, 20480, 19456, 19712, - 19840, 19808, 19816, 0, 16384, 20480, 19456, 19712, - 19840, 19808, 19816, 19818, 0, 16384, 20480, 19456, - 19712, 19840, 19808, 19816, 0, 16384, 20480, 19456, - 19712, 19840, 19808, 19824, 19820, 0, 16384, 20480, - 19456, 19712, 19840, 19808, 19824, 19820, 0, 16384, - 20480, 19456, 19712, 19840, 19808, 19824, 19825, 19822, - 0, 16384, 20480, 19456, 19712, 19840, 19808, 0, - 16384, 20480, 19456, 19712, 19840, 19841, 19824, 0, - 16384, 20480, 19456, 19712, 19840, 19841, 19824, 0, - 16384, 20480, 19456, 19712, 19840, 19841, 19824, 19826, - 0, 16384, 20480, 19456, 19712, 19840, 19841, 19824, - 0, 16384, 20480, 19456, 19712, 19840, 19841, 19824, - 19828, 0, 16384, 20480, 19456, 19712, 19840, 19841, - 19824, 19828, 0, 16384, 20480, 19456, 19712, 19840, - 19841, 19824, 19832, 19830, 0, 16384, 20480, 19456, - 19712, 19840, 19841, 19824, 0, 16384, 20480, 19456, - 19712, 19840, 19841, 19824, 19832, 0, 16384, 20480, - 19456, 19712, 19840, 19841, 19843, 19832, 0, 16384, - 20480, 19456, 19712, 19840, 19841, 19843, 19832, 19834, - 0, 16384, 20480, 19456, 19712, 19840, 19841, 19843, - 19832, 0, 16384, 20480, 19456, 19712, 19840, 19841, - 19843, 19832, 19836, 0, 16384, 20480, 19456, 19712, - 19840, 19841, 19843, 19832, 19836, 0, 16384, 20480, - 19456, 19712, 19840, 19841, 19843, 19832, 19836, 19838, - 0, 16384, 20480, 19456, 19712, 0, 16384, 20480, - 19456, 19968, 19840, 0, 16384, 20480, 19456, 19968, - 19840, 0, 16384, 20480, 19456, 19968, 19840, 19842, - 0, 16384, 20480, 19456, 19968, 19840, 0, 16384, - 20480, 19456, 19968, 19840, 19844, 0, 16384, 20480, - 19456, 19968, 19840, 19844, 0, 16384, 20480, 19456, - 19968, 19840, 19848, 19846, 0, 16384, 20480, 19456, - 19968, 19840, 0, 16384, 20480, 19456, 19968, 19840, - 19848, 0, 16384, 20480, 19456, 19968, 19840, 19848, - 0, 16384, 20480, 19456, 19968, 19840, 19848, 19850, - 0, 16384, 20480, 19456, 19968, 19840, 19848, 0, - 16384, 20480, 19456, 19968, 19840, 19856, 19852, 0, - 16384, 20480, 19456, 19968, 19840, 19856, 19852, 0, - 16384, 20480, 19456, 19968, 19840, 19856, 19857, 19854, - 0, 16384, 20480, 19456, 19968, 19840, 0, 16384, - 20480, 19456, 19968, 19840, 19856, 0, 16384, 20480, - 19456, 19968, 19840, 19856, 0, 16384, 20480, 19456, - 19968, 19840, 19856, 19858, 0, 16384, 20480, 19456, - 19968, 19840, 19856, 0, 16384, 20480, 19456, 19968, - 19840, 19856, 19860, 0, 16384, 20480, 19456, 19968, - 19840, 19856, 19860, 0, 16384, 20480, 19456, 19968, - 19840, 19856, 19864, 19862, 0, 16384, 20480, 19456, - 19968, 19840, 19856, 0, 16384, 20480, 19456, 19968, - 19840, 19872, 19864, 0, 16384, 20480, 19456, 19968, - 19840, 19872, 19864, 0, 16384, 20480, 19456, 19968, - 19840, 19872, 19864, 19866, 0, 16384, 20480, 19456, - 19968, 19840, 19872, 19864, 0, 16384, 20480, 19456, - 19968, 19840, 19872, 19873, 19868, 0, 16384, 20480, - 19456, 19968, 19840, 19872, 19873, 19868, 0, 16384, - 20480, 19456, 19968, 19840, 19872, 19873, 19868, 19870, - 0, 16384, 20480, 19456, 19968, 19840, 0, 16384, - 20480, 19456, 19968, 19840, 19872, 0, 16384, 20480, - 19456, 19968, 19840, 19872, 0, 16384, 20480, 19456, - 19968, 19840, 19872, 19874, 0, 16384, 20480, 19456, - 19968, 19840, 19872, 0, 16384, 20480, 19456, 19968, - 19840, 19872, 19876, 0, 16384, 20480, 19456, 19968, - 19840, 19872, 19876, 0, 16384, 20480, 19456, 19968, - 19840, 19872, 19880, 19878, 0, 16384, 20480, 19456, - 19968, 19840, 19872, 0, 16384, 20480, 19456, 19968, - 19840, 19872, 19880, 0, 16384, 20480, 19456, 19968, - 19840, 19872, 19880, 0, 16384, 20480, 19456, 19968, - 19840, 19872, 19880, 19882, 0, 16384, 20480, 19456, - 19968, 19840, 19872, 19880, 0, 16384, 20480, 19456, - 19968, 19840, 19872, 19888, 19884, 0, 16384, 20480, - 19456, 19968, 19840, 19872, 19888, 19884, 0, 16384, - 20480, 19456, 19968, 19840, 19872, 19888, 19889, 19886, - 0, 16384, 20480, 19456, 19968, 19840, 19872, 0, - 16384, 20480, 19456, 19968, 19840, 19904, 19888, 0, - 16384, 20480, 19456, 19968, 19840, 19904, 19888, 0, - 16384, 20480, 19456, 19968, 19840, 19904, 19888, 19890, - 0, 16384, 20480, 19456, 19968, 19840, 19904, 19888, - 0, 16384, 20480, 19456, 19968, 19840, 19904, 19888, - 19892, 0, 16384, 20480, 19456, 19968, 19840, 19904, - 19888, 19892, 0, 16384, 20480, 19456, 19968, 19840, - 19904, 19888, 19896, 19894, 0, 16384, 20480, 19456, - 19968, 19840, 19904, 19888, 0, 16384, 20480, 19456, - 19968, 19840, 19904, 19905, 19896, 0, 16384, 20480, - 19456, 19968, 19840, 19904, 19905, 19896, 0, 16384, - 20480, 19456, 19968, 19840, 19904, 19905, 19896, 19898, - 0, 16384, 20480, 19456, 19968, 19840, 19904, 19905, - 19896, 0, 16384, 20480, 19456, 19968, 19840, 19904, - 19905, 19896, 19900, 0, 16384, 20480, 19456, 19968, - 19840, 19904, 19905, 19907, 19900, 0, 16384, 20480, - 19456, 19968, 19840, 19904, 19905, 19907, 19900, 19902, - 0, 16384, 20480, 19456, 19968, 19840, 0, 16384, - 20480, 19456, 19968, 19969, 19904, 0, 16384, 20480, - 19456, 19968, 19969, 19904, 0, 16384, 20480, 19456, - 19968, 19969, 19904, 19906, 0, 16384, 20480, 19456, - 19968, 19969, 19904, 0, 16384, 20480, 19456, 19968, - 19969, 19904, 19908, 0, 16384, 20480, 19456, 19968, - 19969, 19904, 19908, 0, 16384, 20480, 19456, 19968, - 19969, 19904, 19912, 19910, 0, 16384, 20480, 19456, - 19968, 19969, 19904, 0, 16384, 20480, 19456, 19968, - 19969, 19904, 19912, 0, 16384, 20480, 19456, 19968, - 19969, 19904, 19912, 0, 16384, 20480, 19456, 19968, - 19969, 19904, 19912, 19914, 0, 16384, 20480, 19456, - 19968, 19969, 19904, 19912, 0, 16384, 20480, 19456, - 19968, 19969, 19904, 19920, 19916, 0, 16384, 20480, - 19456, 19968, 19969, 19904, 19920, 19916, 0, 16384, - 20480, 19456, 19968, 19969, 19904, 19920, 19921, 19918, - 0, 16384, 20480, 19456, 19968, 19969, 19904, 0, - 16384, 20480, 19456, 19968, 19969, 19904, 19920, 0, - 16384, 20480, 19456, 19968, 19969, 19904, 19920, 0, - 16384, 20480, 19456, 19968, 19969, 19904, 19920, 19922, - 0, 16384, 20480, 19456, 19968, 19969, 19904, 19920, - 0, 16384, 20480, 19456, 19968, 19969, 19904, 19920, - 19924, 0, 16384, 20480, 19456, 19968, 19969, 19904, - 19920, 19924, 0, 16384, 20480, 19456, 19968, 19969, - 19904, 19920, 19928, 19926, 0, 16384, 20480, 19456, - 19968, 19969, 19904, 19920, 0, 16384, 20480, 19456, - 19968, 19969, 19904, 19936, 19928, 0, 16384, 20480, - 19456, 19968, 19969, 19904, 19936, 19928, 0, 16384, - 20480, 19456, 19968, 19969, 19904, 19936, 19928, 19930, - 0, 16384, 20480, 19456, 19968, 19969, 19904, 19936, - 19928, 0, 16384, 20480, 19456, 19968, 19969, 19904, - 19936, 19937, 19932, 0, 16384, 20480, 19456, 19968, - 19969, 19904, 19936, 19937, 19932, 0, 16384, 20480, - 19456, 19968, 19969, 19904, 19936, 19937, 19932, 19934, - 0, 16384, 20480, 19456, 19968, 19969, 19904, 0, - 16384, 20480, 19456, 19968, 19969, 19904, 19936, 0, - 16384, 20480, 19456, 19968, 19969, 19971, 19936, 0, - 16384, 20480, 19456, 19968, 19969, 19971, 19936, 19938, - 0, 16384, 20480, 19456, 19968, 19969, 19971, 19936, - 0, 16384, 20480, 19456, 19968, 19969, 19971, 19936, - 19940, 0, 16384, 20480, 19456, 19968, 19969, 19971, - 19936, 19940, 0, 16384, 20480, 19456, 19968, 19969, - 19971, 19936, 19944, 19942, 0, 16384, 20480, 19456, - 19968, 19969, 19971, 19936, 0, 16384, 20480, 19456, - 19968, 19969, 19971, 19936, 19944, 0, 16384, 20480, - 19456, 19968, 19969, 19971, 19936, 19944, 0, 16384, - 20480, 19456, 19968, 19969, 19971, 19936, 19944, 19946, - 0, 16384, 20480, 19456, 19968, 19969, 19971, 19936, - 19944, 0, 16384, 20480, 19456, 19968, 19969, 19971, - 19936, 19952, 19948, 0, 16384, 20480, 19456, 19968, - 19969, 19971, 19936, 19952, 19948, 0, 16384, 20480, - 19456, 19968, 19969, 19971, 19936, 19952, 19953, 19950, - 0, 16384, 20480, 19456, 19968, 19969, 19971, 19936, - 0, 16384, 20480, 19456, 19968, 19969, 19971, 19936, - 19952, 0, 16384, 20480, 19456, 19968, 19969, 19971, - 19936, 19952, 0, 16384, 20480, 19456, 19968, 19969, - 19971, 19936, 19952, 19954, 0, 16384, 20480, 19456, - 19968, 19969, 19971, 19975, 19952, 0, 16384, 20480, - 19456, 19968, 19969, 19971, 19975, 19952, 19956, 0, - 16384, 20480, 19456, 19968, 19969, 19971, 19975, 19952, - 19956, 0, 16384, 20480, 19456, 19968, 19969, 19971, - 19975, 19952, 19960, 19958, 0, 16384, 20480, 19456, - 19968, 19969, 19971, 19975, 19952, 0, 16384, 20480, - 19456, 19968, 19969, 19971, 19975, 19952, 19960, 0, - 16384, 20480, 19456, 19968, 19969, 19971, 19975, 19952, - 19960, 0, 16384, 20480, 19456, 19968, 19969, 19971, - 19975, 19952, 19960, 19962, 0, 16384, 20480, 19456, - 19968, 19969, 19971, 19975, 19952, 19960, 0, 16384, - 20480, 19456, 19968, 19969, 19971, 19975, 19952, 19960, - 19964, 0, 16384, 20480, 19456, 19968, 19969, 19971, - 19975, 19952, 19960, 19964, 0, 16384, 20480, 19456, - 19968, 19969, 19971, 19975, 19952, 19960, 19964, 19966, - 0, 16384, 20480, 19456, 0, 16384, 20480, 19456, - 19968, 0, 16384, 20480, 20481, 19968, 0, 16384, - 20480, 20481, 19968, 19970, 0, 16384, 20480, 20481, - 19968, 0, 16384, 20480, 20481, 19968, 19972, 0, - 16384, 20480, 20481, 19968, 19972, 0, 16384, 20480, - 20481, 19968, 19976, 19974, 0, 16384, 20480, 20481, - 19968, 0, 16384, 20480, 20481, 19968, 19976, 0, - 16384, 20480, 20481, 19968, 19976, 0, 16384, 20480, - 20481, 19968, 19976, 19978, 0, 16384, 20480, 20481, - 19968, 19976, 0, 16384, 20480, 20481, 19968, 19984, - 19980, 0, 16384, 20480, 20481, 19968, 19984, 19980, - 0, 16384, 20480, 20481, 19968, 19984, 19985, 19982, - 0, 16384, 20480, 20481, 19968, 0, 16384, 20480, - 20481, 19968, 19984, 0, 16384, 20480, 20481, 19968, - 19984, 0, 16384, 20480, 20481, 19968, 19984, 19986, - 0, 16384, 20480, 20481, 19968, 19984, 0, 16384, - 20480, 20481, 19968, 19984, 19988, 0, 16384, 20480, - 20481, 19968, 19984, 19988, 0, 16384, 20480, 20481, - 19968, 19984, 19992, 19990, 0, 16384, 20480, 20481, - 19968, 19984, 0, 16384, 20480, 20481, 19968, 20000, - 19992, 0, 16384, 20480, 20481, 19968, 20000, 19992, - 0, 16384, 20480, 20481, 19968, 20000, 19992, 19994, - 0, 16384, 20480, 20481, 19968, 20000, 19992, 0, - 16384, 20480, 20481, 19968, 20000, 20001, 19996, 0, - 16384, 20480, 20481, 19968, 20000, 20001, 19996, 0, - 16384, 20480, 20481, 19968, 20000, 20001, 19996, 19998, - 0, 16384, 20480, 20481, 19968, 0, 16384, 20480, - 20481, 19968, 20000, 0, 16384, 20480, 20481, 19968, - 20000, 0, 16384, 20480, 20481, 19968, 20000, 20002, - 0, 16384, 20480, 20481, 19968, 20000, 0, 16384, - 20480, 20481, 19968, 20000, 20004, 0, 16384, 20480, - 20481, 19968, 20000, 20004, 0, 16384, 20480, 20481, - 19968, 20000, 20008, 20006, 0, 16384, 20480, 20481, - 19968, 20000, 0, 16384, 20480, 20481, 19968, 20000, - 20008, 0, 16384, 20480, 20481, 19968, 20000, 20008, - 0, 16384, 20480, 20481, 19968, 20000, 20008, 20010, - 0, 16384, 20480, 20481, 19968, 20000, 20008, 0, - 16384, 20480, 20481, 19968, 20000, 20016, 20012, 0, - 16384, 20480, 20481, 19968, 20000, 20016, 20012, 0, - 16384, 20480, 20481, 19968, 20000, 20016, 20017, 20014, - 0, 16384, 20480, 20481, 19968, 20000, 0, 16384, - 20480, 20481, 19968, 20032, 20016, 0, 16384, 20480, - 20481, 19968, 20032, 20016, 0, 16384, 20480, 20481, - 19968, 20032, 20016, 20018, 0, 16384, 20480, 20481, - 19968, 20032, 20016, 0, 16384, 20480, 20481, 19968, - 20032, 20016, 20020, 0, 16384, 20480, 20481, 19968, - 20032, 20016, 20020, 0, 16384, 20480, 20481, 19968, - 20032, 20016, 20024, 20022, 0, 16384, 20480, 20481, - 19968, 20032, 20016, 0, 16384, 20480, 20481, 19968, - 20032, 20033, 20024, 0, 16384, 20480, 20481, 19968, - 20032, 20033, 20024, 0, 16384, 20480, 20481, 19968, - 20032, 20033, 20024, 20026, 0, 16384, 20480, 20481, - 19968, 20032, 20033, 20024, 0, 16384, 20480, 20481, - 19968, 20032, 20033, 20024, 20028, 0, 16384, 20480, - 20481, 19968, 20032, 20033, 20035, 20028, 0, 16384, - 20480, 20481, 19968, 20032, 20033, 20035, 20028, 20030, - 0, 16384, 20480, 20481, 19968, 0, 16384, 20480, - 20481, 19968, 20032, 0, 16384, 20480, 20481, 19968, - 20032, 0, 16384, 20480, 20481, 19968, 20032, 20034, - 0, 16384, 20480, 20481, 19968, 20032, 0, 16384, - 20480, 20481, 19968, 20032, 20036, 0, 16384, 20480, - 20481, 19968, 20032, 20036, 0, 16384, 20480, 20481, - 19968, 20032, 20040, 20038, 0, 16384, 20480, 20481, - 19968, 20032, 0, 16384, 20480, 20481, 19968, 20032, - 20040, 0, 16384, 20480, 20481, 19968, 20032, 20040, - 0, 16384, 20480, 20481, 19968, 20032, 20040, 20042, - 0, 16384, 20480, 20481, 19968, 20032, 20040, 0, - 16384, 20480, 20481, 19968, 20032, 20048, 20044, 0, - 16384, 20480, 20481, 19968, 20032, 20048, 20044, 0, - 16384, 20480, 20481, 19968, 20032, 20048, 20049, 20046, - 0, 16384, 20480, 20481, 19968, 20032, 0, 16384, - 20480, 20481, 19968, 20032, 20048, 0, 16384, 20480, - 20481, 19968, 20032, 20048, 0, 16384, 20480, 20481, - 19968, 20032, 20048, 20050, 0, 16384, 20480, 20481, - 19968, 20032, 20048, 0, 16384, 20480, 20481, 19968, - 20032, 20048, 20052, 0, 16384, 20480, 20481, 19968, - 20032, 20048, 20052, 0, 16384, 20480, 20481, 19968, - 20032, 20048, 20056, 20054, 0, 16384, 20480, 20481, - 19968, 20032, 20048, 0, 16384, 20480, 20481, 19968, - 20032, 20064, 20056, 0, 16384, 20480, 20481, 19968, - 20032, 20064, 20056, 0, 16384, 20480, 20481, 19968, - 20032, 20064, 20056, 20058, 0, 16384, 20480, 20481, - 19968, 20032, 20064, 20056, 0, 16384, 20480, 20481, - 19968, 20032, 20064, 20065, 20060, 0, 16384, 20480, - 20481, 19968, 20032, 20064, 20065, 20060, 0, 16384, - 20480, 20481, 19968, 20032, 20064, 20065, 20060, 20062, - 0, 16384, 20480, 20481, 19968, 20032, 0, 16384, - 20480, 20481, 19968, 20096, 20064, 0, 16384, 20480, - 20481, 19968, 20096, 20064, 0, 16384, 20480, 20481, - 19968, 20096, 20064, 20066, 0, 16384, 20480, 20481, - 19968, 20096, 20064, 0, 16384, 20480, 20481, 19968, - 20096, 20064, 20068, 0, 16384, 20480, 20481, 19968, - 20096, 20064, 20068, 0, 16384, 20480, 20481, 19968, - 20096, 20064, 20072, 20070, 0, 16384, 20480, 20481, - 19968, 20096, 20064, 0, 16384, 20480, 20481, 19968, - 20096, 20064, 20072, 0, 16384, 20480, 20481, 19968, - 20096, 20064, 20072, 0, 16384, 20480, 20481, 19968, - 20096, 20064, 20072, 20074, 0, 16384, 20480, 20481, - 19968, 20096, 20064, 20072, 0, 16384, 20480, 20481, - 19968, 20096, 20064, 20080, 20076, 0, 16384, 20480, - 20481, 19968, 20096, 20064, 20080, 20076, 0, 16384, - 20480, 20481, 19968, 20096, 20064, 20080, 20081, 20078, - 0, 16384, 20480, 20481, 19968, 20096, 20064, 0, - 16384, 20480, 20481, 19968, 20096, 20097, 20080, 0, - 16384, 20480, 20481, 19968, 20096, 20097, 20080, 0, - 16384, 20480, 20481, 19968, 20096, 20097, 20080, 20082, - 0, 16384, 20480, 20481, 19968, 20096, 20097, 20080, - 0, 16384, 20480, 20481, 19968, 20096, 20097, 20080, - 20084, 0, 16384, 20480, 20481, 19968, 20096, 20097, - 20080, 20084, 0, 16384, 20480, 20481, 19968, 20096, - 20097, 20080, 20088, 20086, 0, 16384, 20480, 20481, - 19968, 20096, 20097, 20080, 0, 16384, 20480, 20481, - 19968, 20096, 20097, 20080, 20088, 0, 16384, 20480, - 20481, 19968, 20096, 20097, 20099, 20088, 0, 16384, - 20480, 20481, 19968, 20096, 20097, 20099, 20088, 20090, - 0, 16384, 20480, 20481, 19968, 20096, 20097, 20099, - 20088, 0, 16384, 20480, 20481, 19968, 20096, 20097, - 20099, 20088, 20092, 0, 16384, 20480, 20481, 19968, - 20096, 20097, 20099, 20088, 20092, 0, 16384, 20480, - 20481, 19968, 20096, 20097, 20099, 20088, 20092, 20094, - 0, 16384, 20480, 20481, 19968, 0, 16384, 20480, - 20481, 19968, 20096, 0, 16384, 20480, 20481, 19968, - 20096, 0, 16384, 20480, 20481, 19968, 20096, 20098, - 0, 16384, 20480, 20481, 19968, 20096, 0, 16384, - 20480, 20481, 19968, 20096, 20100, 0, 16384, 20480, - 20481, 19968, 20096, 20100, 0, 16384, 20480, 20481, - 19968, 20096, 20104, 20102, 0, 16384, 20480, 20481, - 19968, 20096, 0, 16384, 20480, 20481, 19968, 20096, - 20104, 0, 16384, 20480, 20481, 19968, 20096, 20104, - 0, 16384, 20480, 20481, 19968, 20096, 20104, 20106, - 0, 16384, 20480, 20481, 19968, 20096, 20104, 0, - 16384, 20480, 20481, 19968, 20096, 20112, 20108, 0, - 16384, 20480, 20481, 19968, 20096, 20112, 20108, 0, - 16384, 20480, 20481, 19968, 20096, 20112, 20113, 20110, - 0, 16384, 20480, 20481, 19968, 20096, 0, 16384, - 20480, 20481, 19968, 20096, 20112, 0, 16384, 20480, - 20481, 19968, 20096, 20112, 0, 16384, 20480, 20481, - 19968, 20096, 20112, 20114, 0, 16384, 20480, 20481, - 19968, 20096, 20112, 0, 16384, 20480, 20481, 19968, - 20096, 20112, 20116, 0, 16384, 20480, 20481, 19968, - 20096, 20112, 20116, 0, 16384, 20480, 20481, 19968, - 20096, 20112, 20120, 20118, 0, 16384, 20480, 20481, - 19968, 20096, 20112, 0, 16384, 20480, 20481, 19968, - 20096, 20128, 20120, 0, 16384, 20480, 20481, 19968, - 20096, 20128, 20120, 0, 16384, 20480, 20481, 19968, - 20096, 20128, 20120, 20122, 0, 16384, 20480, 20481, - 19968, 20096, 20128, 20120, 0, 16384, 20480, 20481, - 19968, 20096, 20128, 20129, 20124, 0, 16384, 20480, - 20481, 19968, 20096, 20128, 20129, 20124, 0, 16384, - 20480, 20481, 19968, 20096, 20128, 20129, 20124, 20126, - 0, 16384, 20480, 20481, 19968, 20096, 0, 16384, - 20480, 20481, 19968, 20096, 20128, 0, 16384, 20480, - 20481, 19968, 20096, 20128, 0, 16384, 20480, 20481, - 19968, 20096, 20128, 20130, 0, 16384, 20480, 20481, - 19968, 20096, 20128, 0, 16384, 20480, 20481, 19968, - 20096, 20128, 20132, 0, 16384, 20480, 20481, 19968, - 20096, 20128, 20132, 0, 16384, 20480, 20481, 19968, - 20096, 20128, 20136, 20134, 0, 16384, 20480, 20481, - 19968, 20096, 20128, 0, 16384, 20480, 20481, 19968, - 20096, 20128, 20136, 0, 16384, 20480, 20481, 19968, - 20096, 20128, 20136, 0, 16384, 20480, 20481, 19968, - 20096, 20128, 20136, 20138, 0, 16384, 20480, 20481, - 19968, 20096, 20128, 20136, 0, 16384, 20480, 20481, - 19968, 20096, 20128, 20144, 20140, 0, 16384, 20480, - 20481, 19968, 20096, 20128, 20144, 20140, 0, 16384, - 20480, 20481, 19968, 20096, 20128, 20144, 20145, 20142, - 0, 16384, 20480, 20481, 19968, 20096, 20128, 0, - 16384, 20480, 20481, 19968, 20096, 20160, 20144, 0, - 16384, 20480, 20481, 19968, 20096, 20160, 20144, 0, - 16384, 20480, 20481, 19968, 20096, 20160, 20144, 20146, - 0, 16384, 20480, 20481, 19968, 20096, 20160, 20144, - 0, 16384, 20480, 20481, 19968, 20096, 20160, 20144, - 20148, 0, 16384, 20480, 20481, 19968, 20096, 20160, - 20144, 20148, 0, 16384, 20480, 20481, 19968, 20096, - 20160, 20144, 20152, 20150, 0, 16384, 20480, 20481, - 19968, 20096, 20160, 20144, 0, 16384, 20480, 20481, - 19968, 20096, 20160, 20161, 20152, 0, 16384, 20480, - 20481, 19968, 20096, 20160, 20161, 20152, 0, 16384, - 20480, 20481, 19968, 20096, 20160, 20161, 20152, 20154, - 0, 16384, 20480, 20481, 19968, 20096, 20160, 20161, - 20152, 0, 16384, 20480, 20481, 19968, 20096, 20160, - 20161, 20152, 20156, 0, 16384, 20480, 20481, 19968, - 20096, 20160, 20161, 20163, 20156, 0, 16384, 20480, - 20481, 19968, 20096, 20160, 20161, 20163, 20156, 20158, - 0, 16384, 20480, 20481, 19968, 20096, 0, 16384, - 20480, 20481, 19968, 20224, 20160, 0, 16384, 20480, - 20481, 19968, 20224, 20160, 0, 16384, 20480, 20481, - 19968, 20224, 20160, 20162, 0, 16384, 20480, 20481, - 19968, 20224, 20160, 0, 16384, 20480, 20481, 19968, - 20224, 20160, 20164, 0, 16384, 20480, 20481, 19968, - 20224, 20160, 20164, 0, 16384, 20480, 20481, 19968, - 20224, 20160, 20168, 20166, 0, 16384, 20480, 20481, - 19968, 20224, 20160, 0, 16384, 20480, 20481, 19968, - 20224, 20160, 20168, 0, 16384, 20480, 20481, 19968, - 20224, 20160, 20168, 0, 16384, 20480, 20481, 19968, - 20224, 20160, 20168, 20170, 0, 16384, 20480, 20481, - 19968, 20224, 20160, 20168, 0, 16384, 20480, 20481, - 19968, 20224, 20160, 20176, 20172, 0, 16384, 20480, - 20481, 19968, 20224, 20160, 20176, 20172, 0, 16384, - 20480, 20481, 19968, 20224, 20160, 20176, 20177, 20174, - 0, 16384, 20480, 20481, 19968, 20224, 20160, 0, - 16384, 20480, 20481, 19968, 20224, 20160, 20176, 0, - 16384, 20480, 20481, 19968, 20224, 20160, 20176, 0, - 16384, 20480, 20481, 19968, 20224, 20160, 20176, 20178, - 0, 16384, 20480, 20481, 19968, 20224, 20160, 20176, - 0, 16384, 20480, 20481, 19968, 20224, 20160, 20176, - 20180, 0, 16384, 20480, 20481, 19968, 20224, 20160, - 20176, 20180, 0, 16384, 20480, 20481, 19968, 20224, - 20160, 20176, 20184, 20182, 0, 16384, 20480, 20481, - 19968, 20224, 20160, 20176, 0, 16384, 20480, 20481, - 19968, 20224, 20160, 20192, 20184, 0, 16384, 20480, - 20481, 19968, 20224, 20160, 20192, 20184, 0, 16384, - 20480, 20481, 19968, 20224, 20160, 20192, 20184, 20186, - 0, 16384, 20480, 20481, 19968, 20224, 20160, 20192, - 20184, 0, 16384, 20480, 20481, 19968, 20224, 20160, - 20192, 20193, 20188, 0, 16384, 20480, 20481, 19968, - 20224, 20160, 20192, 20193, 20188, 0, 16384, 20480, - 20481, 19968, 20224, 20160, 20192, 20193, 20188, 20190, - 0, 16384, 20480, 20481, 19968, 20224, 20160, 0, - 16384, 20480, 20481, 19968, 20224, 20225, 20192, 0, - 16384, 20480, 20481, 19968, 20224, 20225, 20192, 0, - 16384, 20480, 20481, 19968, 20224, 20225, 20192, 20194, - 0, 16384, 20480, 20481, 19968, 20224, 20225, 20192, - 0, 16384, 20480, 20481, 19968, 20224, 20225, 20192, - 20196, 0, 16384, 20480, 20481, 19968, 20224, 20225, - 20192, 20196, 0, 16384, 20480, 20481, 19968, 20224, - 20225, 20192, 20200, 20198, 0, 16384, 20480, 20481, - 19968, 20224, 20225, 20192, 0, 16384, 20480, 20481, - 19968, 20224, 20225, 20192, 20200, 0, 16384, 20480, - 20481, 19968, 20224, 20225, 20192, 20200, 0, 16384, - 20480, 20481, 19968, 20224, 20225, 20192, 20200, 20202, - 0, 16384, 20480, 20481, 19968, 20224, 20225, 20192, - 20200, 0, 16384, 20480, 20481, 19968, 20224, 20225, - 20192, 20208, 20204, 0, 16384, 20480, 20481, 19968, - 20224, 20225, 20192, 20208, 20204, 0, 16384, 20480, - 20481, 19968, 20224, 20225, 20192, 20208, 20209, 20206, - 0, 16384, 20480, 20481, 19968, 20224, 20225, 20192, - 0, 16384, 20480, 20481, 19968, 20224, 20225, 20192, - 20208, 0, 16384, 20480, 20481, 19968, 20224, 20225, - 20227, 20208, 0, 16384, 20480, 20481, 19968, 20224, - 20225, 20227, 20208, 20210, 0, 16384, 20480, 20481, - 19968, 20224, 20225, 20227, 20208, 0, 16384, 20480, - 20481, 19968, 20224, 20225, 20227, 20208, 20212, 0, - 16384, 20480, 20481, 19968, 20224, 20225, 20227, 20208, - 20212, 0, 16384, 20480, 20481, 19968, 20224, 20225, - 20227, 20208, 20216, 20214, 0, 16384, 20480, 20481, - 19968, 20224, 20225, 20227, 20208, 0, 16384, 20480, - 20481, 19968, 20224, 20225, 20227, 20208, 20216, 0, - 16384, 20480, 20481, 19968, 20224, 20225, 20227, 20208, - 20216, 0, 16384, 20480, 20481, 19968, 20224, 20225, - 20227, 20208, 20216, 20218, 0, 16384, 20480, 20481, - 19968, 20224, 20225, 20227, 20231, 20216, 0, 16384, - 20480, 20481, 19968, 20224, 20225, 20227, 20231, 20216, - 20220, 0, 16384, 20480, 20481, 19968, 20224, 20225, - 20227, 20231, 20216, 20220, 0, 16384, 20480, 20481, - 19968, 20224, 20225, 20227, 20231, 20216, 20220, 20222, - 0, 16384, 20480, 20481, 19968, 0, 16384, 20480, - 20481, 19968, 20224, 0, 16384, 20480, 20481, 19968, - 20224, 0, 16384, 20480, 20481, 19968, 20224, 20226, - 0, 16384, 20480, 20481, 20483, 20224, 0, 16384, - 20480, 20481, 20483, 20224, 20228, 0, 16384, 20480, - 20481, 20483, 20224, 20228, 0, 16384, 20480, 20481, - 20483, 20224, 20232, 20230, 0, 16384, 20480, 20481, - 20483, 20224, 0, 16384, 20480, 20481, 20483, 20224, - 20232, 0, 16384, 20480, 20481, 20483, 20224, 20232, - 0, 16384, 20480, 20481, 20483, 20224, 20232, 20234, - 0, 16384, 20480, 20481, 20483, 20224, 20232, 0, - 16384, 20480, 20481, 20483, 20224, 20240, 20236, 0, - 16384, 20480, 20481, 20483, 20224, 20240, 20236, 0, - 16384, 20480, 20481, 20483, 20224, 20240, 20241, 20238, - 0, 16384, 20480, 20481, 20483, 20224, 0, 16384, - 20480, 20481, 20483, 20224, 20240, 0, 16384, 20480, - 20481, 20483, 20224, 20240, 0, 16384, 20480, 20481, - 20483, 20224, 20240, 20242, 0, 16384, 20480, 20481, - 20483, 20224, 20240, 0, 16384, 20480, 20481, 20483, - 20224, 20240, 20244, 0, 16384, 20480, 20481, 20483, - 20224, 20240, 20244, 0, 16384, 20480, 20481, 20483, - 20224, 20240, 20248, 20246, 0, 16384, 20480, 20481, - 20483, 20224, 20240, 0, 16384, 20480, 20481, 20483, - 20224, 20256, 20248, 0, 16384, 20480, 20481, 20483, - 20224, 20256, 20248, 0, 16384, 20480, 20481, 20483, - 20224, 20256, 20248, 20250, 0, 16384, 20480, 20481, - 20483, 20224, 20256, 20248, 0, 16384, 20480, 20481, - 20483, 20224, 20256, 20257, 20252, 0, 16384, 20480, - 20481, 20483, 20224, 20256, 20257, 20252, 0, 16384, - 20480, 20481, 20483, 20224, 20256, 20257, 20252, 20254, - 0, 16384, 20480, 20481, 20483, 20224, 0, 16384, - 20480, 20481, 20483, 20224, 20256, 0, 16384, 20480, - 20481, 20483, 20224, 20256, 0, 16384, 20480, 20481, - 20483, 20224, 20256, 20258, 0, 16384, 20480, 20481, - 20483, 20224, 20256, 0, 16384, 20480, 20481, 20483, - 20224, 20256, 20260, 0, 16384, 20480, 20481, 20483, - 20224, 20256, 20260, 0, 16384, 20480, 20481, 20483, - 20224, 20256, 20264, 20262, 0, 16384, 20480, 20481, - 20483, 20224, 20256, 0, 16384, 20480, 20481, 20483, - 20224, 20256, 20264, 0, 16384, 20480, 20481, 20483, - 20224, 20256, 20264, 0, 16384, 20480, 20481, 20483, - 20224, 20256, 20264, 20266, 0, 16384, 20480, 20481, - 20483, 20224, 20256, 20264, 0, 16384, 20480, 20481, - 20483, 20224, 20256, 20272, 20268, 0, 16384, 20480, - 20481, 20483, 20224, 20256, 20272, 20268, 0, 16384, - 20480, 20481, 20483, 20224, 20256, 20272, 20273, 20270, - 0, 16384, 20480, 20481, 20483, 20224, 20256, 0, - 16384, 20480, 20481, 20483, 20224, 20288, 20272, 0, - 16384, 20480, 20481, 20483, 20224, 20288, 20272, 0, - 16384, 20480, 20481, 20483, 20224, 20288, 20272, 20274, - 0, 16384, 20480, 20481, 20483, 20224, 20288, 20272, - 0, 16384, 20480, 20481, 20483, 20224, 20288, 20272, - 20276, 0, 16384, 20480, 20481, 20483, 20224, 20288, - 20272, 20276, 0, 16384, 20480, 20481, 20483, 20224, - 20288, 20272, 20280, 20278, 0, 16384, 20480, 20481, - 20483, 20224, 20288, 20272, 0, 16384, 20480, 20481, - 20483, 20224, 20288, 20289, 20280, 0, 16384, 20480, - 20481, 20483, 20224, 20288, 20289, 20280, 0, 16384, - 20480, 20481, 20483, 20224, 20288, 20289, 20280, 20282, - 0, 16384, 20480, 20481, 20483, 20224, 20288, 20289, - 20280, 0, 16384, 20480, 20481, 20483, 20224, 20288, - 20289, 20280, 20284, 0, 16384, 20480, 20481, 20483, - 20224, 20288, 20289, 20291, 20284, 0, 16384, 20480, - 20481, 20483, 20224, 20288, 20289, 20291, 20284, 20286, - 0, 16384, 20480, 20481, 20483, 20224, 0, 16384, - 20480, 20481, 20483, 20224, 20288, 0, 16384, 20480, - 20481, 20483, 20224, 20288, 0, 16384, 20480, 20481, - 20483, 20224, 20288, 20290, 0, 16384, 20480, 20481, - 20483, 20224, 20288, 0, 16384, 20480, 20481, 20483, - 20224, 20288, 20292, 0, 16384, 20480, 20481, 20483, - 20224, 20288, 20292, 0, 16384, 20480, 20481, 20483, - 20224, 20288, 20296, 20294, 0, 16384, 20480, 20481, - 20483, 20224, 20288, 0, 16384, 20480, 20481, 20483, - 20224, 20288, 20296, 0, 16384, 20480, 20481, 20483, - 20224, 20288, 20296, 0, 16384, 20480, 20481, 20483, - 20224, 20288, 20296, 20298, 0, 16384, 20480, 20481, - 20483, 20224, 20288, 20296, 0, 16384, 20480, 20481, - 20483, 20224, 20288, 20304, 20300, 0, 16384, 20480, - 20481, 20483, 20224, 20288, 20304, 20300, 0, 16384, - 20480, 20481, 20483, 20224, 20288, 20304, 20305, 20302, - 0, 16384, 20480, 20481, 20483, 20224, 20288, 0, - 16384, 20480, 20481, 20483, 20224, 20288, 20304, 0, - 16384, 20480, 20481, 20483, 20224, 20288, 20304, 0, - 16384, 20480, 20481, 20483, 20224, 20288, 20304, 20306, - 0, 16384, 20480, 20481, 20483, 20224, 20288, 20304, - 0, 16384, 20480, 20481, 20483, 20224, 20288, 20304, - 20308, 0, 16384, 20480, 20481, 20483, 20224, 20288, - 20304, 20308, 0, 16384, 20480, 20481, 20483, 20224, - 20288, 20304, 20312, 20310, 0, 16384, 20480, 20481, - 20483, 20224, 20288, 20304, 0, 16384, 20480, 20481, - 20483, 20224, 20288, 20320, 20312, 0, 16384, 20480, - 20481, 20483, 20224, 20288, 20320, 20312, 0, 16384, - 20480, 20481, 20483, 20224, 20288, 20320, 20312, 20314, - 0, 16384, 20480, 20481, 20483, 20224, 20288, 20320, - 20312, 0, 16384, 20480, 20481, 20483, 20224, 20288, - 20320, 20321, 20316, 0, 16384, 20480, 20481, 20483, - 20224, 20288, 20320, 20321, 20316, 0, 16384, 20480, - 20481, 20483, 20224, 20288, 20320, 20321, 20316, 20318, - 0, 16384, 20480, 20481, 20483, 20224, 20288, 0, - 16384, 20480, 20481, 20483, 20224, 20352, 20320, 0, - 16384, 20480, 20481, 20483, 20224, 20352, 20320, 0, - 16384, 20480, 20481, 20483, 20224, 20352, 20320, 20322, - 0, 16384, 20480, 20481, 20483, 20224, 20352, 20320, - 0, 16384, 20480, 20481, 20483, 20224, 20352, 20320, - 20324, 0, 16384, 20480, 20481, 20483, 20224, 20352, - 20320, 20324, 0, 16384, 20480, 20481, 20483, 20224, - 20352, 20320, 20328, 20326, 0, 16384, 20480, 20481, - 20483, 20224, 20352, 20320, 0, 16384, 20480, 20481, - 20483, 20224, 20352, 20320, 20328, 0, 16384, 20480, - 20481, 20483, 20224, 20352, 20320, 20328, 0, 16384, - 20480, 20481, 20483, 20224, 20352, 20320, 20328, 20330, - 0, 16384, 20480, 20481, 20483, 20224, 20352, 20320, - 20328, 0, 16384, 20480, 20481, 20483, 20224, 20352, - 20320, 20336, 20332, 0, 16384, 20480, 20481, 20483, - 20224, 20352, 20320, 20336, 20332, 0, 16384, 20480, - 20481, 20483, 20224, 20352, 20320, 20336, 20337, 20334, - 0, 16384, 20480, 20481, 20483, 20224, 20352, 20320, - 0, 16384, 20480, 20481, 20483, 20224, 20352, 20353, - 20336, 0, 16384, 20480, 20481, 20483, 20224, 20352, - 20353, 20336, 0, 16384, 20480, 20481, 20483, 20224, - 20352, 20353, 20336, 20338, 0, 16384, 20480, 20481, - 20483, 20224, 20352, 20353, 20336, 0, 16384, 20480, - 20481, 20483, 20224, 20352, 20353, 20336, 20340, 0, - 16384, 20480, 20481, 20483, 20224, 20352, 20353, 20336, - 20340, 0, 16384, 20480, 20481, 20483, 20224, 20352, - 20353, 20336, 20344, 20342, 0, 16384, 20480, 20481, - 20483, 20224, 20352, 20353, 20336, 0, 16384, 20480, - 20481, 20483, 20224, 20352, 20353, 20336, 20344, 0, - 16384, 20480, 20481, 20483, 20224, 20352, 20353, 20355, - 20344, 0, 16384, 20480, 20481, 20483, 20224, 20352, - 20353, 20355, 20344, 20346, 0, 16384, 20480, 20481, - 20483, 20224, 20352, 20353, 20355, 20344, 0, 16384, - 20480, 20481, 20483, 20224, 20352, 20353, 20355, 20344, - 20348, 0, 16384, 20480, 20481, 20483, 20224, 20352, - 20353, 20355, 20344, 20348, 0, 16384, 20480, 20481, - 20483, 20224, 20352, 20353, 20355, 20344, 20348, 20350, - 0, 16384, 20480, 20481, 20483, 20224, 0, 16384, - 20480, 20481, 20483, 20224, 20352, 0, 16384, 20480, - 20481, 20483, 20224, 20352, 0, 16384, 20480, 20481, - 20483, 20224, 20352, 20354, 0, 16384, 20480, 20481, - 20483, 20224, 20352, 0, 16384, 20480, 20481, 20483, - 20224, 20352, 20356, 0, 16384, 20480, 20481, 20483, - 20224, 20352, 20356, 0, 16384, 20480, 20481, 20483, - 20224, 20352, 20360, 20358, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 0, 16384, 20480, 20481, 20483, - 20487, 20352, 20360, 0, 16384, 20480, 20481, 20483, - 20487, 20352, 20360, 0, 16384, 20480, 20481, 20483, - 20487, 20352, 20360, 20362, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20360, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20368, 20364, 0, 16384, 20480, - 20481, 20483, 20487, 20352, 20368, 20364, 0, 16384, - 20480, 20481, 20483, 20487, 20352, 20368, 20369, 20366, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 0, - 16384, 20480, 20481, 20483, 20487, 20352, 20368, 0, - 16384, 20480, 20481, 20483, 20487, 20352, 20368, 0, - 16384, 20480, 20481, 20483, 20487, 20352, 20368, 20370, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 20368, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 20368, - 20372, 0, 16384, 20480, 20481, 20483, 20487, 20352, - 20368, 20372, 0, 16384, 20480, 20481, 20483, 20487, - 20352, 20368, 20376, 20374, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20368, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20384, 20376, 0, 16384, 20480, - 20481, 20483, 20487, 20352, 20384, 20376, 0, 16384, - 20480, 20481, 20483, 20487, 20352, 20384, 20376, 20378, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 20384, - 20376, 0, 16384, 20480, 20481, 20483, 20487, 20352, - 20384, 20385, 20380, 0, 16384, 20480, 20481, 20483, - 20487, 20352, 20384, 20385, 20380, 0, 16384, 20480, - 20481, 20483, 20487, 20352, 20384, 20385, 20380, 20382, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 0, - 16384, 20480, 20481, 20483, 20487, 20352, 20384, 0, - 16384, 20480, 20481, 20483, 20487, 20352, 20384, 0, - 16384, 20480, 20481, 20483, 20487, 20352, 20384, 20386, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 20384, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 20384, - 20388, 0, 16384, 20480, 20481, 20483, 20487, 20352, - 20384, 20388, 0, 16384, 20480, 20481, 20483, 20487, - 20352, 20384, 20392, 20390, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20384, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20384, 20392, 0, 16384, 20480, - 20481, 20483, 20487, 20352, 20384, 20392, 0, 16384, - 20480, 20481, 20483, 20487, 20352, 20384, 20392, 20394, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 20384, - 20392, 0, 16384, 20480, 20481, 20483, 20487, 20352, - 20384, 20400, 20396, 0, 16384, 20480, 20481, 20483, - 20487, 20352, 20384, 20400, 20396, 0, 16384, 20480, - 20481, 20483, 20487, 20352, 20384, 20400, 20401, 20398, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 20384, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 20416, - 20400, 0, 16384, 20480, 20481, 20483, 20487, 20352, - 20416, 20400, 0, 16384, 20480, 20481, 20483, 20487, - 20352, 20416, 20400, 20402, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20416, 20400, 0, 16384, 20480, - 20481, 20483, 20487, 20352, 20416, 20400, 20404, 0, - 16384, 20480, 20481, 20483, 20487, 20352, 20416, 20400, - 20404, 0, 16384, 20480, 20481, 20483, 20487, 20352, - 20416, 20400, 20408, 20406, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20416, 20400, 0, 16384, 20480, - 20481, 20483, 20487, 20352, 20416, 20417, 20408, 0, - 16384, 20480, 20481, 20483, 20487, 20352, 20416, 20417, - 20408, 0, 16384, 20480, 20481, 20483, 20487, 20352, - 20416, 20417, 20408, 20410, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20416, 20417, 20408, 0, 16384, - 20480, 20481, 20483, 20487, 20352, 20416, 20417, 20408, - 20412, 0, 16384, 20480, 20481, 20483, 20487, 20352, - 20416, 20417, 20419, 20412, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20416, 20417, 20419, 20412, 20414, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 0, - 16384, 20480, 20481, 20483, 20487, 20352, 20416, 0, - 16384, 20480, 20481, 20483, 20487, 20352, 20416, 0, - 16384, 20480, 20481, 20483, 20487, 20352, 20416, 20418, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 20416, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 20416, - 20420, 0, 16384, 20480, 20481, 20483, 20487, 20352, - 20416, 20420, 0, 16384, 20480, 20481, 20483, 20487, - 20352, 20416, 20424, 20422, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20416, 0, 16384, 20480, 20481, - 20483, 20487, 20352, 20416, 20424, 0, 16384, 20480, - 20481, 20483, 20487, 20352, 20416, 20424, 0, 16384, - 20480, 20481, 20483, 20487, 20352, 20416, 20424, 20426, - 0, 16384, 20480, 20481, 20483, 20487, 20352, 20416, - 20424, 0, 16384, 20480, 20481, 20483, 20487, 20352, - 20416, 20432, 20428, 0, 16384, 20480, 20481, 20483, - 20487, 20352, 20416, 20432, 20428, 0, 16384, 20480, - 20481, 20483, 20487, 20352, 20416, 20432, 20433, 20430, - 0, 16384, 20480, 20481, 20483, 20487, 20495, 20416, - 0, 16384, 20480, 20481, 20483, 20487, 20495, 20416, - 20432, 0, 16384, 20480, 20481, 20483, 20487, 20495, - 20416, 20432, 0, 16384, 20480, 20481, 20483, 20487, - 20495, 20416, 20432, 20434, 0, 16384, 20480, 20481, - 20483, 20487, 20495, 20416, 20432, 0, 16384, 20480, - 20481, 20483, 20487, 20495, 20416, 20432, 20436, 0, - 16384, 20480, 20481, 20483, 20487, 20495, 20416, 20432, - 20436, 0, 16384, 20480, 20481, 20483, 20487, 20495, - 20416, 20432, 20440, 20438, 0, 16384, 20480, 20481, - 20483, 20487, 20495, 20416, 20432, 0, 16384, 20480, - 20481, 20483, 20487, 20495, 20416, 20448, 20440, 0, - 16384, 20480, 20481, 20483, 20487, 20495, 20416, 20448, - 20440, 0, 16384, 20480, 20481, 20483, 20487, 20495, - 20416, 20448, 20440, 20442, 0, 16384, 20480, 20481, - 20483, 20487, 20495, 20416, 20448, 20440, 0, 16384, - 20480, 20481, 20483, 20487, 20495, 20416, 20448, 20449, - 20444, 0, 16384, 20480, 20481, 20483, 20487, 20495, - 20416, 20448, 20449, 20444, 0, 16384, 20480, 20481, - 20483, 20487, 20495, 20416, 20448, 20449, 20444, 20446, - 0, 16384, 20480, 20481, 20483, 20487, 20495, 20416, - 0, 16384, 20480, 20481, 20483, 20487, 20495, 20416, - 20448, 0, 16384, 20480, 20481, 20483, 20487, 20495, - 20416, 20448, 0, 16384, 20480, 20481, 20483, 20487, - 20495, 20416, 20448, 20450, 0, 16384, 20480, 20481, - 20483, 20487, 20495, 20416, 20448, 0, 16384, 20480, - 20481, 20483, 20487, 20495, 20416, 20448, 20452, 0, - 16384, 20480, 20481, 20483, 20487, 20495, 20416, 20448, - 20452, 0, 16384, 20480, 20481, 20483, 20487, 20495, - 20416, 20448, 20456, 20454, 0, 16384, 20480, 20481, - 20483, 20487, 20495, 20416, 20448, 0, 16384, 20480, - 20481, 20483, 20487, 20495, 20416, 20448, 20456, 0, - 16384, 20480, 20481, 20483, 20487, 20495, 20416, 20448, - 20456, 0, 16384, 20480, 20481, 20483, 20487, 20495, - 20416, 20448, 20456, 20458, 0, 16384, 20480, 20481, - 20483, 20487, 20495, 20416, 20448, 20456, 0, 16384, - 20480, 20481, 20483, 20487, 20495, 20416, 20448, 20464, - 20460, 0, 16384, 20480, 20481, 20483, 20487, 20495, - 20416, 20448, 20464, 20460, 0, 16384, 20480, 20481, - 20483, 20487, 20495, 20416, 20448, 20464, 20465, 20462, - 0, 16384, 20480, 20481, 20483, 20487, 20495, 20416, - 20448, 0, 16384, 20480, 20481, 20483, 20487, 20495, - 20416, 20448, 20464, 0, 16384, 20480, 20481, 20483, - 20487, 20495, 20416, 20448, 20464, 0, 16384, 20480, - 20481, 20483, 20487, 20495, 20416, 20448, 20464, 20466, - 0, 16384, 20480, 20481, 20483, 20487, 20495, 20416, - 20448, 20464, 0, 16384, 20480, 20481, 20483, 20487, - 20495, 20416, 20448, 20464, 20468, 0, 16384, 20480, - 20481, 20483, 20487, 20495, 20416, 20448, 20464, 20468, - 0, 16384, 20480, 20481, 20483, 20487, 20495, 20416, - 20448, 20464, 20472, 20470, 0, 16384, 20480, 20481, - 20483, 20487, 20495, 20416, 20448, 20464, 0, 16384, - 20480, 20481, 20483, 20487, 20495, 20416, 20448, 20464, - 20472, 0, 16384, 20480, 20481, 20483, 20487, 20495, - 20416, 20448, 20464, 20472, 0, 16384, 20480, 20481, - 20483, 20487, 20495, 20416, 20448, 20464, 20472, 20474, - 0, 16384, 20480, 20481, 20483, 20487, 20495, 20416, - 20448, 20464, 20472, 0, 16384, 20480, 20481, 20483, - 20487, 20495, 20416, 20448, 20464, 20472, 20476, 0, - 16384, 20480, 20481, 20483, 20487, 20495, 20416, 20448, - 20464, 20472, 20476, 0, 16384, 20480, 20481, 20483, - 20487, 20495, 20416, 20448, 20464, 20472, 20476, 20478, - 0, 16384, 0, 16384, 20480, 0, 16384, 20480, - 0, 16384, 20480, 20482, 0, 16384, 20480, 0, - 16384, 20480, 20484, 0, 16384, 20480, 20484, 0, - 16384, 20480, 20488, 20486, 0, 16384, 20480, 0, - 16384, 20480, 20488, 0, 16384, 20480, 20488, 0, - 16384, 20480, 20488, 20490, 0, 16384, 20480, 20488, - 0, 16384, 20480, 20496, 20492, 0, 16384, 20480, - 20496, 20492, 0, 16384, 20480, 20496, 20497, 20494, - 0, 16384, 20480, 0, 16384, 20480, 20496, 0, - 16384, 20480, 20496, 0, 16384, 20480, 20496, 20498, - 0, 16384, 20480, 20496, 0, 16384, 20480, 20496, - 20500, 0, 16384, 20480, 20496, 20500, 0, 16384, - 20480, 20496, 20504, 20502, 0, 16384, 20480, 20496, - 0, 16384, 20480, 20512, 20504, 0, 16384, 20480, - 20512, 20504, 0, 16384, 20480, 20512, 20504, 20506, - 0, 16384, 20480, 20512, 20504, 0, 16384, 20480, - 20512, 20513, 20508, 0, 16384, 20480, 20512, 20513, - 20508, 0, 16384, 20480, 20512, 20513, 20508, 20510, - 0, 16384, 20480, 0, 16384, 20480, 20512, 0, - 16384, 20480, 20512, 0, 16384, 20480, 20512, 20514, - 0, 16384, 20480, 20512, 0, 16384, 20480, 20512, - 20516, 0, 16384, 20480, 20512, 20516, 0, 16384, - 20480, 20512, 20520, 20518, 0, 16384, 20480, 20512, - 0, 16384, 20480, 20512, 20520, 0, 16384, 20480, - 20512, 20520, 0, 16384, 20480, 20512, 20520, 20522, - 0, 16384, 20480, 20512, 20520, 0, 16384, 20480, - 20512, 20528, 20524, 0, 16384, 20480, 20512, 20528, - 20524, 0, 16384, 20480, 20512, 20528, 20529, 20526, - 0, 16384, 20480, 20512, 0, 16384, 20480, 20544, - 20528, 0, 16384, 20480, 20544, 20528, 0, 16384, - 20480, 20544, 20528, 20530, 0, 16384, 20480, 20544, - 20528, 0, 16384, 20480, 20544, 20528, 20532, 0, - 16384, 20480, 20544, 20528, 20532, 0, 16384, 20480, - 20544, 20528, 20536, 20534, 0, 16384, 20480, 20544, - 20528, 0, 16384, 20480, 20544, 20545, 20536, 0, - 16384, 20480, 20544, 20545, 20536, 0, 16384, 20480, - 20544, 20545, 20536, 20538, 0, 16384, 20480, 20544, - 20545, 20536, 0, 16384, 20480, 20544, 20545, 20536, - 20540, 0, 16384, 20480, 20544, 20545, 20547, 20540, - 0, 16384, 20480, 20544, 20545, 20547, 20540, 20542, - 0, 16384, 20480, 0, 16384, 20480, 20544, 0, - 16384, 20480, 20544, 0, 16384, 20480, 20544, 20546, - 0, 16384, 20480, 20544, 0, 16384, 20480, 20544, - 20548, 0, 16384, 20480, 20544, 20548, 0, 16384, - 20480, 20544, 20552, 20550, 0, 16384, 20480, 20544, - 0, 16384, 20480, 20544, 20552, 0, 16384, 20480, - 20544, 20552, 0, 16384, 20480, 20544, 20552, 20554, - 0, 16384, 20480, 20544, 20552, 0, 16384, 20480, - 20544, 20560, 20556, 0, 16384, 20480, 20544, 20560, - 20556, 0, 16384, 20480, 20544, 20560, 20561, 20558, - 0, 16384, 20480, 20544, 0, 16384, 20480, 20544, - 20560, 0, 16384, 20480, 20544, 20560, 0, 16384, - 20480, 20544, 20560, 20562, 0, 16384, 20480, 20544, - 20560, 0, 16384, 20480, 20544, 20560, 20564, 0, - 16384, 20480, 20544, 20560, 20564, 0, 16384, 20480, - 20544, 20560, 20568, 20566, 0, 16384, 20480, 20544, - 20560, 0, 16384, 20480, 20544, 20576, 20568, 0, - 16384, 20480, 20544, 20576, 20568, 0, 16384, 20480, - 20544, 20576, 20568, 20570, 0, 16384, 20480, 20544, - 20576, 20568, 0, 16384, 20480, 20544, 20576, 20577, - 20572, 0, 16384, 20480, 20544, 20576, 20577, 20572, - 0, 16384, 20480, 20544, 20576, 20577, 20572, 20574, - 0, 16384, 20480, 20544, 0, 16384, 20480, 20608, - 20576, 0, 16384, 20480, 20608, 20576, 0, 16384, - 20480, 20608, 20576, 20578, 0, 16384, 20480, 20608, - 20576, 0, 16384, 20480, 20608, 20576, 20580, 0, - 16384, 20480, 20608, 20576, 20580, 0, 16384, 20480, - 20608, 20576, 20584, 20582, 0, 16384, 20480, 20608, - 20576, 0, 16384, 20480, 20608, 20576, 20584, 0, - 16384, 20480, 20608, 20576, 20584, 0, 16384, 20480, - 20608, 20576, 20584, 20586, 0, 16384, 20480, 20608, - 20576, 20584, 0, 16384, 20480, 20608, 20576, 20592, - 20588, 0, 16384, 20480, 20608, 20576, 20592, 20588, - 0, 16384, 20480, 20608, 20576, 20592, 20593, 20590, - 0, 16384, 20480, 20608, 20576, 0, 16384, 20480, - 20608, 20609, 20592, 0, 16384, 20480, 20608, 20609, - 20592, 0, 16384, 20480, 20608, 20609, 20592, 20594, - 0, 16384, 20480, 20608, 20609, 20592, 0, 16384, - 20480, 20608, 20609, 20592, 20596, 0, 16384, 20480, - 20608, 20609, 20592, 20596, 0, 16384, 20480, 20608, - 20609, 20592, 20600, 20598, 0, 16384, 20480, 20608, - 20609, 20592, 0, 16384, 20480, 20608, 20609, 20592, - 20600, 0, 16384, 20480, 20608, 20609, 20611, 20600, - 0, 16384, 20480, 20608, 20609, 20611, 20600, 20602, - 0, 16384, 20480, 20608, 20609, 20611, 20600, 0, - 16384, 20480, 20608, 20609, 20611, 20600, 20604, 0, - 16384, 20480, 20608, 20609, 20611, 20600, 20604, 0, - 16384, 20480, 20608, 20609, 20611, 20600, 20604, 20606, - 0, 16384, 20480, 0, 16384, 20480, 20608, 0, - 16384, 20480, 20608, 0, 16384, 20480, 20608, 20610, - 0, 16384, 20480, 20608, 0, 16384, 20480, 20608, - 20612, 0, 16384, 20480, 20608, 20612, 0, 16384, - 20480, 20608, 20616, 20614, 0, 16384, 20480, 20608, - 0, 16384, 20480, 20608, 20616, 0, 16384, 20480, - 20608, 20616, 0, 16384, 20480, 20608, 20616, 20618, - 0, 16384, 20480, 20608, 20616, 0, 16384, 20480, - 20608, 20624, 20620, 0, 16384, 20480, 20608, 20624, - 20620, 0, 16384, 20480, 20608, 20624, 20625, 20622, - 0, 16384, 20480, 20608, 0, 16384, 20480, 20608, - 20624, 0, 16384, 20480, 20608, 20624, 0, 16384, - 20480, 20608, 20624, 20626, 0, 16384, 20480, 20608, - 20624, 0, 16384, 20480, 20608, 20624, 20628, 0, - 16384, 20480, 20608, 20624, 20628, 0, 16384, 20480, - 20608, 20624, 20632, 20630, 0, 16384, 20480, 20608, - 20624, 0, 16384, 20480, 20608, 20640, 20632, 0, - 16384, 20480, 20608, 20640, 20632, 0, 16384, 20480, - 20608, 20640, 20632, 20634, 0, 16384, 20480, 20608, - 20640, 20632, 0, 16384, 20480, 20608, 20640, 20641, - 20636, 0, 16384, 20480, 20608, 20640, 20641, 20636, - 0, 16384, 20480, 20608, 20640, 20641, 20636, 20638, - 0, 16384, 20480, 20608, 0, 16384, 20480, 20608, - 20640, 0, 16384, 20480, 20608, 20640, 0, 16384, - 20480, 20608, 20640, 20642, 0, 16384, 20480, 20608, - 20640, 0, 16384, 20480, 20608, 20640, 20644, 0, - 16384, 20480, 20608, 20640, 20644, 0, 16384, 20480, - 20608, 20640, 20648, 20646, 0, 16384, 20480, 20608, - 20640, 0, 16384, 20480, 20608, 20640, 20648, 0, - 16384, 20480, 20608, 20640, 20648, 0, 16384, 20480, - 20608, 20640, 20648, 20650, 0, 16384, 20480, 20608, - 20640, 20648, 0, 16384, 20480, 20608, 20640, 20656, - 20652, 0, 16384, 20480, 20608, 20640, 20656, 20652, - 0, 16384, 20480, 20608, 20640, 20656, 20657, 20654, - 0, 16384, 20480, 20608, 20640, 0, 16384, 20480, - 20608, 20672, 20656, 0, 16384, 20480, 20608, 20672, - 20656, 0, 16384, 20480, 20608, 20672, 20656, 20658, - 0, 16384, 20480, 20608, 20672, 20656, 0, 16384, - 20480, 20608, 20672, 20656, 20660, 0, 16384, 20480, - 20608, 20672, 20656, 20660, 0, 16384, 20480, 20608, - 20672, 20656, 20664, 20662, 0, 16384, 20480, 20608, - 20672, 20656, 0, 16384, 20480, 20608, 20672, 20673, - 20664, 0, 16384, 20480, 20608, 20672, 20673, 20664, - 0, 16384, 20480, 20608, 20672, 20673, 20664, 20666, - 0, 16384, 20480, 20608, 20672, 20673, 20664, 0, - 16384, 20480, 20608, 20672, 20673, 20664, 20668, 0, - 16384, 20480, 20608, 20672, 20673, 20675, 20668, 0, - 16384, 20480, 20608, 20672, 20673, 20675, 20668, 20670, - 0, 16384, 20480, 20608, 0, 16384, 20480, 20736, - 20672, 0, 16384, 20480, 20736, 20672, 0, 16384, - 20480, 20736, 20672, 20674, 0, 16384, 20480, 20736, - 20672, 0, 16384, 20480, 20736, 20672, 20676, 0, - 16384, 20480, 20736, 20672, 20676, 0, 16384, 20480, - 20736, 20672, 20680, 20678, 0, 16384, 20480, 20736, - 20672, 0, 16384, 20480, 20736, 20672, 20680, 0, - 16384, 20480, 20736, 20672, 20680, 0, 16384, 20480, - 20736, 20672, 20680, 20682, 0, 16384, 20480, 20736, - 20672, 20680, 0, 16384, 20480, 20736, 20672, 20688, - 20684, 0, 16384, 20480, 20736, 20672, 20688, 20684, - 0, 16384, 20480, 20736, 20672, 20688, 20689, 20686, - 0, 16384, 20480, 20736, 20672, 0, 16384, 20480, - 20736, 20672, 20688, 0, 16384, 20480, 20736, 20672, - 20688, 0, 16384, 20480, 20736, 20672, 20688, 20690, - 0, 16384, 20480, 20736, 20672, 20688, 0, 16384, - 20480, 20736, 20672, 20688, 20692, 0, 16384, 20480, - 20736, 20672, 20688, 20692, 0, 16384, 20480, 20736, - 20672, 20688, 20696, 20694, 0, 16384, 20480, 20736, - 20672, 20688, 0, 16384, 20480, 20736, 20672, 20704, - 20696, 0, 16384, 20480, 20736, 20672, 20704, 20696, - 0, 16384, 20480, 20736, 20672, 20704, 20696, 20698, - 0, 16384, 20480, 20736, 20672, 20704, 20696, 0, - 16384, 20480, 20736, 20672, 20704, 20705, 20700, 0, - 16384, 20480, 20736, 20672, 20704, 20705, 20700, 0, - 16384, 20480, 20736, 20672, 20704, 20705, 20700, 20702, - 0, 16384, 20480, 20736, 20672, 0, 16384, 20480, - 20736, 20737, 20704, 0, 16384, 20480, 20736, 20737, - 20704, 0, 16384, 20480, 20736, 20737, 20704, 20706, - 0, 16384, 20480, 20736, 20737, 20704, 0, 16384, - 20480, 20736, 20737, 20704, 20708, 0, 16384, 20480, - 20736, 20737, 20704, 20708, 0, 16384, 20480, 20736, - 20737, 20704, 20712, 20710, 0, 16384, 20480, 20736, - 20737, 20704, 0, 16384, 20480, 20736, 20737, 20704, - 20712, 0, 16384, 20480, 20736, 20737, 20704, 20712, - 0, 16384, 20480, 20736, 20737, 20704, 20712, 20714, - 0, 16384, 20480, 20736, 20737, 20704, 20712, 0, - 16384, 20480, 20736, 20737, 20704, 20720, 20716, 0, - 16384, 20480, 20736, 20737, 20704, 20720, 20716, 0, - 16384, 20480, 20736, 20737, 20704, 20720, 20721, 20718, - 0, 16384, 20480, 20736, 20737, 20704, 0, 16384, - 20480, 20736, 20737, 20704, 20720, 0, 16384, 20480, - 20736, 20737, 20739, 20720, 0, 16384, 20480, 20736, - 20737, 20739, 20720, 20722, 0, 16384, 20480, 20736, - 20737, 20739, 20720, 0, 16384, 20480, 20736, 20737, - 20739, 20720, 20724, 0, 16384, 20480, 20736, 20737, - 20739, 20720, 20724, 0, 16384, 20480, 20736, 20737, - 20739, 20720, 20728, 20726, 0, 16384, 20480, 20736, - 20737, 20739, 20720, 0, 16384, 20480, 20736, 20737, - 20739, 20720, 20728, 0, 16384, 20480, 20736, 20737, - 20739, 20720, 20728, 0, 16384, 20480, 20736, 20737, - 20739, 20720, 20728, 20730, 0, 16384, 20480, 20736, - 20737, 20739, 20743, 20728, 0, 16384, 20480, 20736, - 20737, 20739, 20743, 20728, 20732, 0, 16384, 20480, - 20736, 20737, 20739, 20743, 20728, 20732, 0, 16384, - 20480, 20736, 20737, 20739, 20743, 20728, 20732, 20734, - 0, 16384, 20480, 0, 16384, 20480, 20736, 0, - 16384, 20480, 20736, 0, 16384, 20480, 20736, 20738, - 0, 16384, 20480, 20736, 0, 16384, 20480, 20736, - 20740, 0, 16384, 20480, 20736, 20740, 0, 16384, - 20480, 20736, 20744, 20742, 0, 16384, 20480, 20736, - 0, 16384, 20480, 20736, 20744, 0, 16384, 20480, - 20736, 20744, 0, 16384, 20480, 20736, 20744, 20746, - 0, 16384, 20480, 20736, 20744, 0, 16384, 20480, - 20736, 20752, 20748, 0, 16384, 20480, 20736, 20752, - 20748, 0, 16384, 20480, 20736, 20752, 20753, 20750, - 0, 16384, 20480, 20736, 0, 16384, 20480, 20736, - 20752, 0, 16384, 20480, 20736, 20752, 0, 16384, - 20480, 20736, 20752, 20754, 0, 16384, 20480, 20736, - 20752, 0, 16384, 20480, 20736, 20752, 20756, 0, - 16384, 20480, 20736, 20752, 20756, 0, 16384, 20480, - 20736, 20752, 20760, 20758, 0, 16384, 20480, 20736, - 20752, 0, 16384, 20480, 20736, 20768, 20760, 0, - 16384, 20480, 20736, 20768, 20760, 0, 16384, 20480, - 20736, 20768, 20760, 20762, 0, 16384, 20480, 20736, - 20768, 20760, 0, 16384, 20480, 20736, 20768, 20769, - 20764, 0, 16384, 20480, 20736, 20768, 20769, 20764, - 0, 16384, 20480, 20736, 20768, 20769, 20764, 20766, - 0, 16384, 20480, 20736, 0, 16384, 20480, 20736, - 20768, 0, 16384, 20480, 20736, 20768, 0, 16384, - 20480, 20736, 20768, 20770, 0, 16384, 20480, 20736, - 20768, 0, 16384, 20480, 20736, 20768, 20772, 0, - 16384, 20480, 20736, 20768, 20772, 0, 16384, 20480, - 20736, 20768, 20776, 20774, 0, 16384, 20480, 20736, - 20768, 0, 16384, 20480, 20736, 20768, 20776, 0, - 16384, 20480, 20736, 20768, 20776, 0, 16384, 20480, - 20736, 20768, 20776, 20778, 0, 16384, 20480, 20736, - 20768, 20776, 0, 16384, 20480, 20736, 20768, 20784, - 20780, 0, 16384, 20480, 20736, 20768, 20784, 20780, - 0, 16384, 20480, 20736, 20768, 20784, 20785, 20782, - 0, 16384, 20480, 20736, 20768, 0, 16384, 20480, - 20736, 20800, 20784, 0, 16384, 20480, 20736, 20800, - 20784, 0, 16384, 20480, 20736, 20800, 20784, 20786, - 0, 16384, 20480, 20736, 20800, 20784, 0, 16384, - 20480, 20736, 20800, 20784, 20788, 0, 16384, 20480, - 20736, 20800, 20784, 20788, 0, 16384, 20480, 20736, - 20800, 20784, 20792, 20790, 0, 16384, 20480, 20736, - 20800, 20784, 0, 16384, 20480, 20736, 20800, 20801, - 20792, 0, 16384, 20480, 20736, 20800, 20801, 20792, - 0, 16384, 20480, 20736, 20800, 20801, 20792, 20794, - 0, 16384, 20480, 20736, 20800, 20801, 20792, 0, - 16384, 20480, 20736, 20800, 20801, 20792, 20796, 0, - 16384, 20480, 20736, 20800, 20801, 20803, 20796, 0, - 16384, 20480, 20736, 20800, 20801, 20803, 20796, 20798, - 0, 16384, 20480, 20736, 0, 16384, 20480, 20736, - 20800, 0, 16384, 20480, 20736, 20800, 0, 16384, - 20480, 20736, 20800, 20802, 0, 16384, 20480, 20736, - 20800, 0, 16384, 20480, 20736, 20800, 20804, 0, - 16384, 20480, 20736, 20800, 20804, 0, 16384, 20480, - 20736, 20800, 20808, 20806, 0, 16384, 20480, 20736, - 20800, 0, 16384, 20480, 20736, 20800, 20808, 0, - 16384, 20480, 20736, 20800, 20808, 0, 16384, 20480, - 20736, 20800, 20808, 20810, 0, 16384, 20480, 20736, - 20800, 20808, 0, 16384, 20480, 20736, 20800, 20816, - 20812, 0, 16384, 20480, 20736, 20800, 20816, 20812, - 0, 16384, 20480, 20736, 20800, 20816, 20817, 20814, - 0, 16384, 20480, 20736, 20800, 0, 16384, 20480, - 20736, 20800, 20816, 0, 16384, 20480, 20736, 20800, - 20816, 0, 16384, 20480, 20736, 20800, 20816, 20818, - 0, 16384, 20480, 20736, 20800, 20816, 0, 16384, - 20480, 20736, 20800, 20816, 20820, 0, 16384, 20480, - 20736, 20800, 20816, 20820, 0, 16384, 20480, 20736, - 20800, 20816, 20824, 20822, 0, 16384, 20480, 20736, - 20800, 20816, 0, 16384, 20480, 20736, 20800, 20832, - 20824, 0, 16384, 20480, 20736, 20800, 20832, 20824, - 0, 16384, 20480, 20736, 20800, 20832, 20824, 20826, - 0, 16384, 20480, 20736, 20800, 20832, 20824, 0, - 16384, 20480, 20736, 20800, 20832, 20833, 20828, 0, - 16384, 20480, 20736, 20800, 20832, 20833, 20828, 0, - 16384, 20480, 20736, 20800, 20832, 20833, 20828, 20830, - 0, 16384, 20480, 20736, 20800, 0, 16384, 20480, - 20736, 20864, 20832, 0, 16384, 20480, 20736, 20864, - 20832, 0, 16384, 20480, 20736, 20864, 20832, 20834, - 0, 16384, 20480, 20736, 20864, 20832, 0, 16384, - 20480, 20736, 20864, 20832, 20836, 0, 16384, 20480, - 20736, 20864, 20832, 20836, 0, 16384, 20480, 20736, - 20864, 20832, 20840, 20838, 0, 16384, 20480, 20736, - 20864, 20832, 0, 16384, 20480, 20736, 20864, 20832, - 20840, 0, 16384, 20480, 20736, 20864, 20832, 20840, - 0, 16384, 20480, 20736, 20864, 20832, 20840, 20842, - 0, 16384, 20480, 20736, 20864, 20832, 20840, 0, - 16384, 20480, 20736, 20864, 20832, 20848, 20844, 0, - 16384, 20480, 20736, 20864, 20832, 20848, 20844, 0, - 16384, 20480, 20736, 20864, 20832, 20848, 20849, 20846, - 0, 16384, 20480, 20736, 20864, 20832, 0, 16384, - 20480, 20736, 20864, 20865, 20848, 0, 16384, 20480, - 20736, 20864, 20865, 20848, 0, 16384, 20480, 20736, - 20864, 20865, 20848, 20850, 0, 16384, 20480, 20736, - 20864, 20865, 20848, 0, 16384, 20480, 20736, 20864, - 20865, 20848, 20852, 0, 16384, 20480, 20736, 20864, - 20865, 20848, 20852, 0, 16384, 20480, 20736, 20864, - 20865, 20848, 20856, 20854, 0, 16384, 20480, 20736, - 20864, 20865, 20848, 0, 16384, 20480, 20736, 20864, - 20865, 20848, 20856, 0, 16384, 20480, 20736, 20864, - 20865, 20867, 20856, 0, 16384, 20480, 20736, 20864, - 20865, 20867, 20856, 20858, 0, 16384, 20480, 20736, - 20864, 20865, 20867, 20856, 0, 16384, 20480, 20736, - 20864, 20865, 20867, 20856, 20860, 0, 16384, 20480, - 20736, 20864, 20865, 20867, 20856, 20860, 0, 16384, - 20480, 20736, 20864, 20865, 20867, 20856, 20860, 20862, - 0, 16384, 20480, 20736, 0, 16384, 20480, 20992, - 20864, 0, 16384, 20480, 20992, 20864, 0, 16384, - 20480, 20992, 20864, 20866, 0, 16384, 20480, 20992, - 20864, 0, 16384, 20480, 20992, 20864, 20868, 0, - 16384, 20480, 20992, 20864, 20868, 0, 16384, 20480, - 20992, 20864, 20872, 20870, 0, 16384, 20480, 20992, - 20864, 0, 16384, 20480, 20992, 20864, 20872, 0, - 16384, 20480, 20992, 20864, 20872, 0, 16384, 20480, - 20992, 20864, 20872, 20874, 0, 16384, 20480, 20992, - 20864, 20872, 0, 16384, 20480, 20992, 20864, 20880, - 20876, 0, 16384, 20480, 20992, 20864, 20880, 20876, - 0, 16384, 20480, 20992, 20864, 20880, 20881, 20878, - 0, 16384, 20480, 20992, 20864, 0, 16384, 20480, - 20992, 20864, 20880, 0, 16384, 20480, 20992, 20864, - 20880, 0, 16384, 20480, 20992, 20864, 20880, 20882, - 0, 16384, 20480, 20992, 20864, 20880, 0, 16384, - 20480, 20992, 20864, 20880, 20884, 0, 16384, 20480, - 20992, 20864, 20880, 20884, 0, 16384, 20480, 20992, - 20864, 20880, 20888, 20886, 0, 16384, 20480, 20992, - 20864, 20880, 0, 16384, 20480, 20992, 20864, 20896, - 20888, 0, 16384, 20480, 20992, 20864, 20896, 20888, - 0, 16384, 20480, 20992, 20864, 20896, 20888, 20890, - 0, 16384, 20480, 20992, 20864, 20896, 20888, 0, - 16384, 20480, 20992, 20864, 20896, 20897, 20892, 0, - 16384, 20480, 20992, 20864, 20896, 20897, 20892, 0, - 16384, 20480, 20992, 20864, 20896, 20897, 20892, 20894, - 0, 16384, 20480, 20992, 20864, 0, 16384, 20480, - 20992, 20864, 20896, 0, 16384, 20480, 20992, 20864, - 20896, 0, 16384, 20480, 20992, 20864, 20896, 20898, - 0, 16384, 20480, 20992, 20864, 20896, 0, 16384, - 20480, 20992, 20864, 20896, 20900, 0, 16384, 20480, - 20992, 20864, 20896, 20900, 0, 16384, 20480, 20992, - 20864, 20896, 20904, 20902, 0, 16384, 20480, 20992, - 20864, 20896, 0, 16384, 20480, 20992, 20864, 20896, - 20904, 0, 16384, 20480, 20992, 20864, 20896, 20904, - 0, 16384, 20480, 20992, 20864, 20896, 20904, 20906, - 0, 16384, 20480, 20992, 20864, 20896, 20904, 0, - 16384, 20480, 20992, 20864, 20896, 20912, 20908, 0, - 16384, 20480, 20992, 20864, 20896, 20912, 20908, 0, - 16384, 20480, 20992, 20864, 20896, 20912, 20913, 20910, - 0, 16384, 20480, 20992, 20864, 20896, 0, 16384, - 20480, 20992, 20864, 20928, 20912, 0, 16384, 20480, - 20992, 20864, 20928, 20912, 0, 16384, 20480, 20992, - 20864, 20928, 20912, 20914, 0, 16384, 20480, 20992, - 20864, 20928, 20912, 0, 16384, 20480, 20992, 20864, - 20928, 20912, 20916, 0, 16384, 20480, 20992, 20864, - 20928, 20912, 20916, 0, 16384, 20480, 20992, 20864, - 20928, 20912, 20920, 20918, 0, 16384, 20480, 20992, - 20864, 20928, 20912, 0, 16384, 20480, 20992, 20864, - 20928, 20929, 20920, 0, 16384, 20480, 20992, 20864, - 20928, 20929, 20920, 0, 16384, 20480, 20992, 20864, - 20928, 20929, 20920, 20922, 0, 16384, 20480, 20992, - 20864, 20928, 20929, 20920, 0, 16384, 20480, 20992, - 20864, 20928, 20929, 20920, 20924, 0, 16384, 20480, - 20992, 20864, 20928, 20929, 20931, 20924, 0, 16384, - 20480, 20992, 20864, 20928, 20929, 20931, 20924, 20926, - 0, 16384, 20480, 20992, 20864, 0, 16384, 20480, - 20992, 20993, 20928, 0, 16384, 20480, 20992, 20993, - 20928, 0, 16384, 20480, 20992, 20993, 20928, 20930, - 0, 16384, 20480, 20992, 20993, 20928, 0, 16384, - 20480, 20992, 20993, 20928, 20932, 0, 16384, 20480, - 20992, 20993, 20928, 20932, 0, 16384, 20480, 20992, - 20993, 20928, 20936, 20934, 0, 16384, 20480, 20992, - 20993, 20928, 0, 16384, 20480, 20992, 20993, 20928, - 20936, 0, 16384, 20480, 20992, 20993, 20928, 20936, - 0, 16384, 20480, 20992, 20993, 20928, 20936, 20938, - 0, 16384, 20480, 20992, 20993, 20928, 20936, 0, - 16384, 20480, 20992, 20993, 20928, 20944, 20940, 0, - 16384, 20480, 20992, 20993, 20928, 20944, 20940, 0, - 16384, 20480, 20992, 20993, 20928, 20944, 20945, 20942, - 0, 16384, 20480, 20992, 20993, 20928, 0, 16384, - 20480, 20992, 20993, 20928, 20944, 0, 16384, 20480, - 20992, 20993, 20928, 20944, 0, 16384, 20480, 20992, - 20993, 20928, 20944, 20946, 0, 16384, 20480, 20992, - 20993, 20928, 20944, 0, 16384, 20480, 20992, 20993, - 20928, 20944, 20948, 0, 16384, 20480, 20992, 20993, - 20928, 20944, 20948, 0, 16384, 20480, 20992, 20993, - 20928, 20944, 20952, 20950, 0, 16384, 20480, 20992, - 20993, 20928, 20944, 0, 16384, 20480, 20992, 20993, - 20928, 20960, 20952, 0, 16384, 20480, 20992, 20993, - 20928, 20960, 20952, 0, 16384, 20480, 20992, 20993, - 20928, 20960, 20952, 20954, 0, 16384, 20480, 20992, - 20993, 20928, 20960, 20952, 0, 16384, 20480, 20992, - 20993, 20928, 20960, 20961, 20956, 0, 16384, 20480, - 20992, 20993, 20928, 20960, 20961, 20956, 0, 16384, - 20480, 20992, 20993, 20928, 20960, 20961, 20956, 20958, - 0, 16384, 20480, 20992, 20993, 20928, 0, 16384, - 20480, 20992, 20993, 20928, 20960, 0, 16384, 20480, - 20992, 20993, 20995, 20960, 0, 16384, 20480, 20992, - 20993, 20995, 20960, 20962, 0, 16384, 20480, 20992, - 20993, 20995, 20960, 0, 16384, 20480, 20992, 20993, - 20995, 20960, 20964, 0, 16384, 20480, 20992, 20993, - 20995, 20960, 20964, 0, 16384, 20480, 20992, 20993, - 20995, 20960, 20968, 20966, 0, 16384, 20480, 20992, - 20993, 20995, 20960, 0, 16384, 20480, 20992, 20993, - 20995, 20960, 20968, 0, 16384, 20480, 20992, 20993, - 20995, 20960, 20968, 0, 16384, 20480, 20992, 20993, - 20995, 20960, 20968, 20970, 0, 16384, 20480, 20992, - 20993, 20995, 20960, 20968, 0, 16384, 20480, 20992, - 20993, 20995, 20960, 20976, 20972, 0, 16384, 20480, - 20992, 20993, 20995, 20960, 20976, 20972, 0, 16384, - 20480, 20992, 20993, 20995, 20960, 20976, 20977, 20974, - 0, 16384, 20480, 20992, 20993, 20995, 20960, 0, - 16384, 20480, 20992, 20993, 20995, 20960, 20976, 0, - 16384, 20480, 20992, 20993, 20995, 20960, 20976, 0, - 16384, 20480, 20992, 20993, 20995, 20960, 20976, 20978, - 0, 16384, 20480, 20992, 20993, 20995, 20999, 20976, - 0, 16384, 20480, 20992, 20993, 20995, 20999, 20976, - 20980, 0, 16384, 20480, 20992, 20993, 20995, 20999, - 20976, 20980, 0, 16384, 20480, 20992, 20993, 20995, - 20999, 20976, 20984, 20982, 0, 16384, 20480, 20992, - 20993, 20995, 20999, 20976, 0, 16384, 20480, 20992, - 20993, 20995, 20999, 20976, 20984, 0, 16384, 20480, - 20992, 20993, 20995, 20999, 20976, 20984, 0, 16384, - 20480, 20992, 20993, 20995, 20999, 20976, 20984, 20986, - 0, 16384, 20480, 20992, 20993, 20995, 20999, 20976, - 20984, 0, 16384, 20480, 20992, 20993, 20995, 20999, - 20976, 20984, 20988, 0, 16384, 20480, 20992, 20993, - 20995, 20999, 20976, 20984, 20988, 0, 16384, 20480, - 20992, 20993, 20995, 20999, 20976, 20984, 20988, 20990, - 0, 16384, 20480, 0, 16384, 20480, 20992, 0, - 16384, 20480, 20992, 0, 16384, 20480, 20992, 20994, - 0, 16384, 20480, 20992, 0, 16384, 20480, 20992, - 20996, 0, 16384, 20480, 20992, 20996, 0, 16384, - 20480, 20992, 21000, 20998, 0, 16384, 20480, 20992, - 0, 16384, 20480, 20992, 21000, 0, 16384, 20480, - 20992, 21000, 0, 16384, 20480, 20992, 21000, 21002, - 0, 16384, 20480, 20992, 21000, 0, 16384, 20480, - 20992, 21008, 21004, 0, 16384, 20480, 20992, 21008, - 21004, 0, 16384, 20480, 20992, 21008, 21009, 21006, - 0, 16384, 20480, 20992, 0, 16384, 20480, 20992, - 21008, 0, 16384, 20480, 20992, 21008, 0, 16384, - 20480, 20992, 21008, 21010, 0, 16384, 20480, 20992, - 21008, 0, 16384, 20480, 20992, 21008, 21012, 0, - 16384, 20480, 20992, 21008, 21012, 0, 16384, 20480, - 20992, 21008, 21016, 21014, 0, 16384, 20480, 20992, - 21008, 0, 16384, 20480, 20992, 21024, 21016, 0, - 16384, 20480, 20992, 21024, 21016, 0, 16384, 20480, - 20992, 21024, 21016, 21018, 0, 16384, 20480, 20992, - 21024, 21016, 0, 16384, 20480, 20992, 21024, 21025, - 21020, 0, 16384, 20480, 20992, 21024, 21025, 21020, - 0, 16384, 20480, 20992, 21024, 21025, 21020, 21022, - 0, 16384, 20480, 20992, 0, 16384, 20480, 20992, - 21024, 0, 16384, 20480, 20992, 21024, 0, 16384, - 20480, 20992, 21024, 21026, 0, 16384, 20480, 20992, - 21024, 0, 16384, 20480, 20992, 21024, 21028, 0, - 16384, 20480, 20992, 21024, 21028, 0, 16384, 20480, - 20992, 21024, 21032, 21030, 0, 16384, 20480, 20992, - 21024, 0, 16384, 20480, 20992, 21024, 21032, 0, - 16384, 20480, 20992, 21024, 21032, 0, 16384, 20480, - 20992, 21024, 21032, 21034, 0, 16384, 20480, 20992, - 21024, 21032, 0, 16384, 20480, 20992, 21024, 21040, - 21036, 0, 16384, 20480, 20992, 21024, 21040, 21036, - 0, 16384, 20480, 20992, 21024, 21040, 21041, 21038, - 0, 16384, 20480, 20992, 21024, 0, 16384, 20480, - 20992, 21056, 21040, 0, 16384, 20480, 20992, 21056, - 21040, 0, 16384, 20480, 20992, 21056, 21040, 21042, - 0, 16384, 20480, 20992, 21056, 21040, 0, 16384, - 20480, 20992, 21056, 21040, 21044, 0, 16384, 20480, - 20992, 21056, 21040, 21044, 0, 16384, 20480, 20992, - 21056, 21040, 21048, 21046, 0, 16384, 20480, 20992, - 21056, 21040, 0, 16384, 20480, 20992, 21056, 21057, - 21048, 0, 16384, 20480, 20992, 21056, 21057, 21048, - 0, 16384, 20480, 20992, 21056, 21057, 21048, 21050, - 0, 16384, 20480, 20992, 21056, 21057, 21048, 0, - 16384, 20480, 20992, 21056, 21057, 21048, 21052, 0, - 16384, 20480, 20992, 21056, 21057, 21059, 21052, 0, - 16384, 20480, 20992, 21056, 21057, 21059, 21052, 21054, - 0, 16384, 20480, 20992, 0, 16384, 20480, 20992, - 21056, 0, 16384, 20480, 20992, 21056, 0, 16384, - 20480, 20992, 21056, 21058, 0, 16384, 20480, 20992, - 21056, 0, 16384, 20480, 20992, 21056, 21060, 0, - 16384, 20480, 20992, 21056, 21060, 0, 16384, 20480, - 20992, 21056, 21064, 21062, 0, 16384, 20480, 20992, - 21056, 0, 16384, 20480, 20992, 21056, 21064, 0, - 16384, 20480, 20992, 21056, 21064, 0, 16384, 20480, - 20992, 21056, 21064, 21066, 0, 16384, 20480, 20992, - 21056, 21064, 0, 16384, 20480, 20992, 21056, 21072, - 21068, 0, 16384, 20480, 20992, 21056, 21072, 21068, - 0, 16384, 20480, 20992, 21056, 21072, 21073, 21070, - 0, 16384, 20480, 20992, 21056, 0, 16384, 20480, - 20992, 21056, 21072, 0, 16384, 20480, 20992, 21056, - 21072, 0, 16384, 20480, 20992, 21056, 21072, 21074, - 0, 16384, 20480, 20992, 21056, 21072, 0, 16384, - 20480, 20992, 21056, 21072, 21076, 0, 16384, 20480, - 20992, 21056, 21072, 21076, 0, 16384, 20480, 20992, - 21056, 21072, 21080, 21078, 0, 16384, 20480, 20992, - 21056, 21072, 0, 16384, 20480, 20992, 21056, 21088, - 21080, 0, 16384, 20480, 20992, 21056, 21088, 21080, - 0, 16384, 20480, 20992, 21056, 21088, 21080, 21082, - 0, 16384, 20480, 20992, 21056, 21088, 21080, 0, - 16384, 20480, 20992, 21056, 21088, 21089, 21084, 0, - 16384, 20480, 20992, 21056, 21088, 21089, 21084, 0, - 16384, 20480, 20992, 21056, 21088, 21089, 21084, 21086, - 0, 16384, 20480, 20992, 21056, 0, 16384, 20480, - 20992, 21120, 21088, 0, 16384, 20480, 20992, 21120, - 21088, 0, 16384, 20480, 20992, 21120, 21088, 21090, - 0, 16384, 20480, 20992, 21120, 21088, 0, 16384, - 20480, 20992, 21120, 21088, 21092, 0, 16384, 20480, - 20992, 21120, 21088, 21092, 0, 16384, 20480, 20992, - 21120, 21088, 21096, 21094, 0, 16384, 20480, 20992, - 21120, 21088, 0, 16384, 20480, 20992, 21120, 21088, - 21096, 0, 16384, 20480, 20992, 21120, 21088, 21096, - 0, 16384, 20480, 20992, 21120, 21088, 21096, 21098, - 0, 16384, 20480, 20992, 21120, 21088, 21096, 0, - 16384, 20480, 20992, 21120, 21088, 21104, 21100, 0, - 16384, 20480, 20992, 21120, 21088, 21104, 21100, 0, - 16384, 20480, 20992, 21120, 21088, 21104, 21105, 21102, - 0, 16384, 20480, 20992, 21120, 21088, 0, 16384, - 20480, 20992, 21120, 21121, 21104, 0, 16384, 20480, - 20992, 21120, 21121, 21104, 0, 16384, 20480, 20992, - 21120, 21121, 21104, 21106, 0, 16384, 20480, 20992, - 21120, 21121, 21104, 0, 16384, 20480, 20992, 21120, - 21121, 21104, 21108, 0, 16384, 20480, 20992, 21120, - 21121, 21104, 21108, 0, 16384, 20480, 20992, 21120, - 21121, 21104, 21112, 21110, 0, 16384, 20480, 20992, - 21120, 21121, 21104, 0, 16384, 20480, 20992, 21120, - 21121, 21104, 21112, 0, 16384, 20480, 20992, 21120, - 21121, 21123, 21112, 0, 16384, 20480, 20992, 21120, - 21121, 21123, 21112, 21114, 0, 16384, 20480, 20992, - 21120, 21121, 21123, 21112, 0, 16384, 20480, 20992, - 21120, 21121, 21123, 21112, 21116, 0, 16384, 20480, - 20992, 21120, 21121, 21123, 21112, 21116, 0, 16384, - 20480, 20992, 21120, 21121, 21123, 21112, 21116, 21118, - 0, 16384, 20480, 20992, 0, 16384, 20480, 20992, - 21120, 0, 16384, 20480, 20992, 21120, 0, 16384, - 20480, 20992, 21120, 21122, 0, 16384, 20480, 20992, - 21120, 0, 16384, 20480, 20992, 21120, 21124, 0, - 16384, 20480, 20992, 21120, 21124, 0, 16384, 20480, - 20992, 21120, 21128, 21126, 0, 16384, 20480, 20992, - 21120, 0, 16384, 20480, 20992, 21120, 21128, 0, - 16384, 20480, 20992, 21120, 21128, 0, 16384, 20480, - 20992, 21120, 21128, 21130, 0, 16384, 20480, 20992, - 21120, 21128, 0, 16384, 20480, 20992, 21120, 21136, - 21132, 0, 16384, 20480, 20992, 21120, 21136, 21132, - 0, 16384, 20480, 20992, 21120, 21136, 21137, 21134, - 0, 16384, 20480, 20992, 21120, 0, 16384, 20480, - 20992, 21120, 21136, 0, 16384, 20480, 20992, 21120, - 21136, 0, 16384, 20480, 20992, 21120, 21136, 21138, - 0, 16384, 20480, 20992, 21120, 21136, 0, 16384, - 20480, 20992, 21120, 21136, 21140, 0, 16384, 20480, - 20992, 21120, 21136, 21140, 0, 16384, 20480, 20992, - 21120, 21136, 21144, 21142, 0, 16384, 20480, 20992, - 21120, 21136, 0, 16384, 20480, 20992, 21120, 21152, - 21144, 0, 16384, 20480, 20992, 21120, 21152, 21144, - 0, 16384, 20480, 20992, 21120, 21152, 21144, 21146, - 0, 16384, 20480, 20992, 21120, 21152, 21144, 0, - 16384, 20480, 20992, 21120, 21152, 21153, 21148, 0, - 16384, 20480, 20992, 21120, 21152, 21153, 21148, 0, - 16384, 20480, 20992, 21120, 21152, 21153, 21148, 21150, - 0, 16384, 20480, 20992, 21120, 0, 16384, 20480, - 20992, 21120, 21152, 0, 16384, 20480, 20992, 21120, - 21152, 0, 16384, 20480, 20992, 21120, 21152, 21154, - 0, 16384, 20480, 20992, 21120, 21152, 0, 16384, - 20480, 20992, 21120, 21152, 21156, 0, 16384, 20480, - 20992, 21120, 21152, 21156, 0, 16384, 20480, 20992, - 21120, 21152, 21160, 21158, 0, 16384, 20480, 20992, - 21120, 21152, 0, 16384, 20480, 20992, 21120, 21152, - 21160, 0, 16384, 20480, 20992, 21120, 21152, 21160, - 0, 16384, 20480, 20992, 21120, 21152, 21160, 21162, - 0, 16384, 20480, 20992, 21120, 21152, 21160, 0, - 16384, 20480, 20992, 21120, 21152, 21168, 21164, 0, - 16384, 20480, 20992, 21120, 21152, 21168, 21164, 0, - 16384, 20480, 20992, 21120, 21152, 21168, 21169, 21166, - 0, 16384, 20480, 20992, 21120, 21152, 0, 16384, - 20480, 20992, 21120, 21184, 21168, 0, 16384, 20480, - 20992, 21120, 21184, 21168, 0, 16384, 20480, 20992, - 21120, 21184, 21168, 21170, 0, 16384, 20480, 20992, - 21120, 21184, 21168, 0, 16384, 20480, 20992, 21120, - 21184, 21168, 21172, 0, 16384, 20480, 20992, 21120, - 21184, 21168, 21172, 0, 16384, 20480, 20992, 21120, - 21184, 21168, 21176, 21174, 0, 16384, 20480, 20992, - 21120, 21184, 21168, 0, 16384, 20480, 20992, 21120, - 21184, 21185, 21176, 0, 16384, 20480, 20992, 21120, - 21184, 21185, 21176, 0, 16384, 20480, 20992, 21120, - 21184, 21185, 21176, 21178, 0, 16384, 20480, 20992, - 21120, 21184, 21185, 21176, 0, 16384, 20480, 20992, - 21120, 21184, 21185, 21176, 21180, 0, 16384, 20480, - 20992, 21120, 21184, 21185, 21187, 21180, 0, 16384, - 20480, 20992, 21120, 21184, 21185, 21187, 21180, 21182, - 0, 16384, 20480, 20992, 21120, 0, 16384, 20480, - 20992, 21248, 21184, 0, 16384, 20480, 20992, 21248, - 21184, 0, 16384, 20480, 20992, 21248, 21184, 21186, - 0, 16384, 20480, 20992, 21248, 21184, 0, 16384, - 20480, 20992, 21248, 21184, 21188, 0, 16384, 20480, - 20992, 21248, 21184, 21188, 0, 16384, 20480, 20992, - 21248, 21184, 21192, 21190, 0, 16384, 20480, 20992, - 21248, 21184, 0, 16384, 20480, 20992, 21248, 21184, - 21192, 0, 16384, 20480, 20992, 21248, 21184, 21192, - 0, 16384, 20480, 20992, 21248, 21184, 21192, 21194, - 0, 16384, 20480, 20992, 21248, 21184, 21192, 0, - 16384, 20480, 20992, 21248, 21184, 21200, 21196, 0, - 16384, 20480, 20992, 21248, 21184, 21200, 21196, 0, - 16384, 20480, 20992, 21248, 21184, 21200, 21201, 21198, - 0, 16384, 20480, 20992, 21248, 21184, 0, 16384, - 20480, 20992, 21248, 21184, 21200, 0, 16384, 20480, - 20992, 21248, 21184, 21200, 0, 16384, 20480, 20992, - 21248, 21184, 21200, 21202, 0, 16384, 20480, 20992, - 21248, 21184, 21200, 0, 16384, 20480, 20992, 21248, - 21184, 21200, 21204, 0, 16384, 20480, 20992, 21248, - 21184, 21200, 21204, 0, 16384, 20480, 20992, 21248, - 21184, 21200, 21208, 21206, 0, 16384, 20480, 20992, - 21248, 21184, 21200, 0, 16384, 20480, 20992, 21248, - 21184, 21216, 21208, 0, 16384, 20480, 20992, 21248, - 21184, 21216, 21208, 0, 16384, 20480, 20992, 21248, - 21184, 21216, 21208, 21210, 0, 16384, 20480, 20992, - 21248, 21184, 21216, 21208, 0, 16384, 20480, 20992, - 21248, 21184, 21216, 21217, 21212, 0, 16384, 20480, - 20992, 21248, 21184, 21216, 21217, 21212, 0, 16384, - 20480, 20992, 21248, 21184, 21216, 21217, 21212, 21214, - 0, 16384, 20480, 20992, 21248, 21184, 0, 16384, - 20480, 20992, 21248, 21249, 21216, 0, 16384, 20480, - 20992, 21248, 21249, 21216, 0, 16384, 20480, 20992, - 21248, 21249, 21216, 21218, 0, 16384, 20480, 20992, - 21248, 21249, 21216, 0, 16384, 20480, 20992, 21248, - 21249, 21216, 21220, 0, 16384, 20480, 20992, 21248, - 21249, 21216, 21220, 0, 16384, 20480, 20992, 21248, - 21249, 21216, 21224, 21222, 0, 16384, 20480, 20992, - 21248, 21249, 21216, 0, 16384, 20480, 20992, 21248, - 21249, 21216, 21224, 0, 16384, 20480, 20992, 21248, - 21249, 21216, 21224, 0, 16384, 20480, 20992, 21248, - 21249, 21216, 21224, 21226, 0, 16384, 20480, 20992, - 21248, 21249, 21216, 21224, 0, 16384, 20480, 20992, - 21248, 21249, 21216, 21232, 21228, 0, 16384, 20480, - 20992, 21248, 21249, 21216, 21232, 21228, 0, 16384, - 20480, 20992, 21248, 21249, 21216, 21232, 21233, 21230, - 0, 16384, 20480, 20992, 21248, 21249, 21216, 0, - 16384, 20480, 20992, 21248, 21249, 21216, 21232, 0, - 16384, 20480, 20992, 21248, 21249, 21251, 21232, 0, - 16384, 20480, 20992, 21248, 21249, 21251, 21232, 21234, - 0, 16384, 20480, 20992, 21248, 21249, 21251, 21232, - 0, 16384, 20480, 20992, 21248, 21249, 21251, 21232, - 21236, 0, 16384, 20480, 20992, 21248, 21249, 21251, - 21232, 21236, 0, 16384, 20480, 20992, 21248, 21249, - 21251, 21232, 21240, 21238, 0, 16384, 20480, 20992, - 21248, 21249, 21251, 21232, 0, 16384, 20480, 20992, - 21248, 21249, 21251, 21232, 21240, 0, 16384, 20480, - 20992, 21248, 21249, 21251, 21232, 21240, 0, 16384, - 20480, 20992, 21248, 21249, 21251, 21232, 21240, 21242, - 0, 16384, 20480, 20992, 21248, 21249, 21251, 21255, - 21240, 0, 16384, 20480, 20992, 21248, 21249, 21251, - 21255, 21240, 21244, 0, 16384, 20480, 20992, 21248, - 21249, 21251, 21255, 21240, 21244, 0, 16384, 20480, - 20992, 21248, 21249, 21251, 21255, 21240, 21244, 21246, - 0, 16384, 20480, 20992, 0, 16384, 20480, 21504, - 21248, 0, 16384, 20480, 21504, 21248, 0, 16384, - 20480, 21504, 21248, 21250, 0, 16384, 20480, 21504, - 21248, 0, 16384, 20480, 21504, 21248, 21252, 0, - 16384, 20480, 21504, 21248, 21252, 0, 16384, 20480, - 21504, 21248, 21256, 21254, 0, 16384, 20480, 21504, - 21248, 0, 16384, 20480, 21504, 21248, 21256, 0, - 16384, 20480, 21504, 21248, 21256, 0, 16384, 20480, - 21504, 21248, 21256, 21258, 0, 16384, 20480, 21504, - 21248, 21256, 0, 16384, 20480, 21504, 21248, 21264, - 21260, 0, 16384, 20480, 21504, 21248, 21264, 21260, - 0, 16384, 20480, 21504, 21248, 21264, 21265, 21262, - 0, 16384, 20480, 21504, 21248, 0, 16384, 20480, - 21504, 21248, 21264, 0, 16384, 20480, 21504, 21248, - 21264, 0, 16384, 20480, 21504, 21248, 21264, 21266, - 0, 16384, 20480, 21504, 21248, 21264, 0, 16384, - 20480, 21504, 21248, 21264, 21268, 0, 16384, 20480, - 21504, 21248, 21264, 21268, 0, 16384, 20480, 21504, - 21248, 21264, 21272, 21270, 0, 16384, 20480, 21504, - 21248, 21264, 0, 16384, 20480, 21504, 21248, 21280, - 21272, 0, 16384, 20480, 21504, 21248, 21280, 21272, - 0, 16384, 20480, 21504, 21248, 21280, 21272, 21274, - 0, 16384, 20480, 21504, 21248, 21280, 21272, 0, - 16384, 20480, 21504, 21248, 21280, 21281, 21276, 0, - 16384, 20480, 21504, 21248, 21280, 21281, 21276, 0, - 16384, 20480, 21504, 21248, 21280, 21281, 21276, 21278, - 0, 16384, 20480, 21504, 21248, 0, 16384, 20480, - 21504, 21248, 21280, 0, 16384, 20480, 21504, 21248, - 21280, 0, 16384, 20480, 21504, 21248, 21280, 21282, - 0, 16384, 20480, 21504, 21248, 21280, 0, 16384, - 20480, 21504, 21248, 21280, 21284, 0, 16384, 20480, - 21504, 21248, 21280, 21284, 0, 16384, 20480, 21504, - 21248, 21280, 21288, 21286, 0, 16384, 20480, 21504, - 21248, 21280, 0, 16384, 20480, 21504, 21248, 21280, - 21288, 0, 16384, 20480, 21504, 21248, 21280, 21288, - 0, 16384, 20480, 21504, 21248, 21280, 21288, 21290, - 0, 16384, 20480, 21504, 21248, 21280, 21288, 0, - 16384, 20480, 21504, 21248, 21280, 21296, 21292, 0, - 16384, 20480, 21504, 21248, 21280, 21296, 21292, 0, - 16384, 20480, 21504, 21248, 21280, 21296, 21297, 21294, - 0, 16384, 20480, 21504, 21248, 21280, 0, 16384, - 20480, 21504, 21248, 21312, 21296, 0, 16384, 20480, - 21504, 21248, 21312, 21296, 0, 16384, 20480, 21504, - 21248, 21312, 21296, 21298, 0, 16384, 20480, 21504, - 21248, 21312, 21296, 0, 16384, 20480, 21504, 21248, - 21312, 21296, 21300, 0, 16384, 20480, 21504, 21248, - 21312, 21296, 21300, 0, 16384, 20480, 21504, 21248, - 21312, 21296, 21304, 21302, 0, 16384, 20480, 21504, - 21248, 21312, 21296, 0, 16384, 20480, 21504, 21248, - 21312, 21313, 21304, 0, 16384, 20480, 21504, 21248, - 21312, 21313, 21304, 0, 16384, 20480, 21504, 21248, - 21312, 21313, 21304, 21306, 0, 16384, 20480, 21504, - 21248, 21312, 21313, 21304, 0, 16384, 20480, 21504, - 21248, 21312, 21313, 21304, 21308, 0, 16384, 20480, - 21504, 21248, 21312, 21313, 21315, 21308, 0, 16384, - 20480, 21504, 21248, 21312, 21313, 21315, 21308, 21310, - 0, 16384, 20480, 21504, 21248, 0, 16384, 20480, - 21504, 21248, 21312, 0, 16384, 20480, 21504, 21248, - 21312, 0, 16384, 20480, 21504, 21248, 21312, 21314, - 0, 16384, 20480, 21504, 21248, 21312, 0, 16384, - 20480, 21504, 21248, 21312, 21316, 0, 16384, 20480, - 21504, 21248, 21312, 21316, 0, 16384, 20480, 21504, - 21248, 21312, 21320, 21318, 0, 16384, 20480, 21504, - 21248, 21312, 0, 16384, 20480, 21504, 21248, 21312, - 21320, 0, 16384, 20480, 21504, 21248, 21312, 21320, - 0, 16384, 20480, 21504, 21248, 21312, 21320, 21322, - 0, 16384, 20480, 21504, 21248, 21312, 21320, 0, - 16384, 20480, 21504, 21248, 21312, 21328, 21324, 0, - 16384, 20480, 21504, 21248, 21312, 21328, 21324, 0, - 16384, 20480, 21504, 21248, 21312, 21328, 21329, 21326, - 0, 16384, 20480, 21504, 21248, 21312, 0, 16384, - 20480, 21504, 21248, 21312, 21328, 0, 16384, 20480, - 21504, 21248, 21312, 21328, 0, 16384, 20480, 21504, - 21248, 21312, 21328, 21330, 0, 16384, 20480, 21504, - 21248, 21312, 21328, 0, 16384, 20480, 21504, 21248, - 21312, 21328, 21332, 0, 16384, 20480, 21504, 21248, - 21312, 21328, 21332, 0, 16384, 20480, 21504, 21248, - 21312, 21328, 21336, 21334, 0, 16384, 20480, 21504, - 21248, 21312, 21328, 0, 16384, 20480, 21504, 21248, - 21312, 21344, 21336, 0, 16384, 20480, 21504, 21248, - 21312, 21344, 21336, 0, 16384, 20480, 21504, 21248, - 21312, 21344, 21336, 21338, 0, 16384, 20480, 21504, - 21248, 21312, 21344, 21336, 0, 16384, 20480, 21504, - 21248, 21312, 21344, 21345, 21340, 0, 16384, 20480, - 21504, 21248, 21312, 21344, 21345, 21340, 0, 16384, - 20480, 21504, 21248, 21312, 21344, 21345, 21340, 21342, - 0, 16384, 20480, 21504, 21248, 21312, 0, 16384, - 20480, 21504, 21248, 21376, 21344, 0, 16384, 20480, - 21504, 21248, 21376, 21344, 0, 16384, 20480, 21504, - 21248, 21376, 21344, 21346, 0, 16384, 20480, 21504, - 21248, 21376, 21344, 0, 16384, 20480, 21504, 21248, - 21376, 21344, 21348, 0, 16384, 20480, 21504, 21248, - 21376, 21344, 21348, 0, 16384, 20480, 21504, 21248, - 21376, 21344, 21352, 21350, 0, 16384, 20480, 21504, - 21248, 21376, 21344, 0, 16384, 20480, 21504, 21248, - 21376, 21344, 21352, 0, 16384, 20480, 21504, 21248, - 21376, 21344, 21352, 0, 16384, 20480, 21504, 21248, - 21376, 21344, 21352, 21354, 0, 16384, 20480, 21504, - 21248, 21376, 21344, 21352, 0, 16384, 20480, 21504, - 21248, 21376, 21344, 21360, 21356, 0, 16384, 20480, - 21504, 21248, 21376, 21344, 21360, 21356, 0, 16384, - 20480, 21504, 21248, 21376, 21344, 21360, 21361, 21358, - 0, 16384, 20480, 21504, 21248, 21376, 21344, 0, - 16384, 20480, 21504, 21248, 21376, 21377, 21360, 0, - 16384, 20480, 21504, 21248, 21376, 21377, 21360, 0, - 16384, 20480, 21504, 21248, 21376, 21377, 21360, 21362, - 0, 16384, 20480, 21504, 21248, 21376, 21377, 21360, - 0, 16384, 20480, 21504, 21248, 21376, 21377, 21360, - 21364, 0, 16384, 20480, 21504, 21248, 21376, 21377, - 21360, 21364, 0, 16384, 20480, 21504, 21248, 21376, - 21377, 21360, 21368, 21366, 0, 16384, 20480, 21504, - 21248, 21376, 21377, 21360, 0, 16384, 20480, 21504, - 21248, 21376, 21377, 21360, 21368, 0, 16384, 20480, - 21504, 21248, 21376, 21377, 21379, 21368, 0, 16384, - 20480, 21504, 21248, 21376, 21377, 21379, 21368, 21370, - 0, 16384, 20480, 21504, 21248, 21376, 21377, 21379, - 21368, 0, 16384, 20480, 21504, 21248, 21376, 21377, - 21379, 21368, 21372, 0, 16384, 20480, 21504, 21248, - 21376, 21377, 21379, 21368, 21372, 0, 16384, 20480, - 21504, 21248, 21376, 21377, 21379, 21368, 21372, 21374, - 0, 16384, 20480, 21504, 21248, 0, 16384, 20480, - 21504, 21248, 21376, 0, 16384, 20480, 21504, 21505, - 21376, 0, 16384, 20480, 21504, 21505, 21376, 21378, - 0, 16384, 20480, 21504, 21505, 21376, 0, 16384, - 20480, 21504, 21505, 21376, 21380, 0, 16384, 20480, - 21504, 21505, 21376, 21380, 0, 16384, 20480, 21504, - 21505, 21376, 21384, 21382, 0, 16384, 20480, 21504, - 21505, 21376, 0, 16384, 20480, 21504, 21505, 21376, - 21384, 0, 16384, 20480, 21504, 21505, 21376, 21384, - 0, 16384, 20480, 21504, 21505, 21376, 21384, 21386, - 0, 16384, 20480, 21504, 21505, 21376, 21384, 0, - 16384, 20480, 21504, 21505, 21376, 21392, 21388, 0, - 16384, 20480, 21504, 21505, 21376, 21392, 21388, 0, - 16384, 20480, 21504, 21505, 21376, 21392, 21393, 21390, - 0, 16384, 20480, 21504, 21505, 21376, 0, 16384, - 20480, 21504, 21505, 21376, 21392, 0, 16384, 20480, - 21504, 21505, 21376, 21392, 0, 16384, 20480, 21504, - 21505, 21376, 21392, 21394, 0, 16384, 20480, 21504, - 21505, 21376, 21392, 0, 16384, 20480, 21504, 21505, - 21376, 21392, 21396, 0, 16384, 20480, 21504, 21505, - 21376, 21392, 21396, 0, 16384, 20480, 21504, 21505, - 21376, 21392, 21400, 21398, 0, 16384, 20480, 21504, - 21505, 21376, 21392, 0, 16384, 20480, 21504, 21505, - 21376, 21408, 21400, 0, 16384, 20480, 21504, 21505, - 21376, 21408, 21400, 0, 16384, 20480, 21504, 21505, - 21376, 21408, 21400, 21402, 0, 16384, 20480, 21504, - 21505, 21376, 21408, 21400, 0, 16384, 20480, 21504, - 21505, 21376, 21408, 21409, 21404, 0, 16384, 20480, - 21504, 21505, 21376, 21408, 21409, 21404, 0, 16384, - 20480, 21504, 21505, 21376, 21408, 21409, 21404, 21406, - 0, 16384, 20480, 21504, 21505, 21376, 0, 16384, - 20480, 21504, 21505, 21376, 21408, 0, 16384, 20480, - 21504, 21505, 21376, 21408, 0, 16384, 20480, 21504, - 21505, 21376, 21408, 21410, 0, 16384, 20480, 21504, - 21505, 21376, 21408, 0, 16384, 20480, 21504, 21505, - 21376, 21408, 21412, 0, 16384, 20480, 21504, 21505, - 21376, 21408, 21412, 0, 16384, 20480, 21504, 21505, - 21376, 21408, 21416, 21414, 0, 16384, 20480, 21504, - 21505, 21376, 21408, 0, 16384, 20480, 21504, 21505, - 21376, 21408, 21416, 0, 16384, 20480, 21504, 21505, - 21376, 21408, 21416, 0, 16384, 20480, 21504, 21505, - 21376, 21408, 21416, 21418, 0, 16384, 20480, 21504, - 21505, 21376, 21408, 21416, 0, 16384, 20480, 21504, - 21505, 21376, 21408, 21424, 21420, 0, 16384, 20480, - 21504, 21505, 21376, 21408, 21424, 21420, 0, 16384, - 20480, 21504, 21505, 21376, 21408, 21424, 21425, 21422, - 0, 16384, 20480, 21504, 21505, 21376, 21408, 0, - 16384, 20480, 21504, 21505, 21376, 21440, 21424, 0, - 16384, 20480, 21504, 21505, 21376, 21440, 21424, 0, - 16384, 20480, 21504, 21505, 21376, 21440, 21424, 21426, - 0, 16384, 20480, 21504, 21505, 21376, 21440, 21424, - 0, 16384, 20480, 21504, 21505, 21376, 21440, 21424, - 21428, 0, 16384, 20480, 21504, 21505, 21376, 21440, - 21424, 21428, 0, 16384, 20480, 21504, 21505, 21376, - 21440, 21424, 21432, 21430, 0, 16384, 20480, 21504, - 21505, 21376, 21440, 21424, 0, 16384, 20480, 21504, - 21505, 21376, 21440, 21441, 21432, 0, 16384, 20480, - 21504, 21505, 21376, 21440, 21441, 21432, 0, 16384, - 20480, 21504, 21505, 21376, 21440, 21441, 21432, 21434, - 0, 16384, 20480, 21504, 21505, 21376, 21440, 21441, - 21432, 0, 16384, 20480, 21504, 21505, 21376, 21440, - 21441, 21432, 21436, 0, 16384, 20480, 21504, 21505, - 21376, 21440, 21441, 21443, 21436, 0, 16384, 20480, - 21504, 21505, 21376, 21440, 21441, 21443, 21436, 21438, - 0, 16384, 20480, 21504, 21505, 21376, 0, 16384, - 20480, 21504, 21505, 21376, 21440, 0, 16384, 20480, - 21504, 21505, 21376, 21440, 0, 16384, 20480, 21504, - 21505, 21376, 21440, 21442, 0, 16384, 20480, 21504, - 21505, 21507, 21440, 0, 16384, 20480, 21504, 21505, - 21507, 21440, 21444, 0, 16384, 20480, 21504, 21505, - 21507, 21440, 21444, 0, 16384, 20480, 21504, 21505, - 21507, 21440, 21448, 21446, 0, 16384, 20480, 21504, - 21505, 21507, 21440, 0, 16384, 20480, 21504, 21505, - 21507, 21440, 21448, 0, 16384, 20480, 21504, 21505, - 21507, 21440, 21448, 0, 16384, 20480, 21504, 21505, - 21507, 21440, 21448, 21450, 0, 16384, 20480, 21504, - 21505, 21507, 21440, 21448, 0, 16384, 20480, 21504, - 21505, 21507, 21440, 21456, 21452, 0, 16384, 20480, - 21504, 21505, 21507, 21440, 21456, 21452, 0, 16384, - 20480, 21504, 21505, 21507, 21440, 21456, 21457, 21454, - 0, 16384, 20480, 21504, 21505, 21507, 21440, 0, - 16384, 20480, 21504, 21505, 21507, 21440, 21456, 0, - 16384, 20480, 21504, 21505, 21507, 21440, 21456, 0, - 16384, 20480, 21504, 21505, 21507, 21440, 21456, 21458, - 0, 16384, 20480, 21504, 21505, 21507, 21440, 21456, - 0, 16384, 20480, 21504, 21505, 21507, 21440, 21456, - 21460, 0, 16384, 20480, 21504, 21505, 21507, 21440, - 21456, 21460, 0, 16384, 20480, 21504, 21505, 21507, - 21440, 21456, 21464, 21462, 0, 16384, 20480, 21504, - 21505, 21507, 21440, 21456, 0, 16384, 20480, 21504, - 21505, 21507, 21440, 21472, 21464, 0, 16384, 20480, - 21504, 21505, 21507, 21440, 21472, 21464, 0, 16384, - 20480, 21504, 21505, 21507, 21440, 21472, 21464, 21466, - 0, 16384, 20480, 21504, 21505, 21507, 21440, 21472, - 21464, 0, 16384, 20480, 21504, 21505, 21507, 21440, - 21472, 21473, 21468, 0, 16384, 20480, 21504, 21505, - 21507, 21440, 21472, 21473, 21468, 0, 16384, 20480, - 21504, 21505, 21507, 21440, 21472, 21473, 21468, 21470, - 0, 16384, 20480, 21504, 21505, 21507, 21440, 0, - 16384, 20480, 21504, 21505, 21507, 21440, 21472, 0, - 16384, 20480, 21504, 21505, 21507, 21440, 21472, 0, - 16384, 20480, 21504, 21505, 21507, 21440, 21472, 21474, - 0, 16384, 20480, 21504, 21505, 21507, 21440, 21472, - 0, 16384, 20480, 21504, 21505, 21507, 21440, 21472, - 21476, 0, 16384, 20480, 21504, 21505, 21507, 21440, - 21472, 21476, 0, 16384, 20480, 21504, 21505, 21507, - 21440, 21472, 21480, 21478, 0, 16384, 20480, 21504, - 21505, 21507, 21511, 21472, 0, 16384, 20480, 21504, - 21505, 21507, 21511, 21472, 21480, 0, 16384, 20480, - 21504, 21505, 21507, 21511, 21472, 21480, 0, 16384, - 20480, 21504, 21505, 21507, 21511, 21472, 21480, 21482, - 0, 16384, 20480, 21504, 21505, 21507, 21511, 21472, - 21480, 0, 16384, 20480, 21504, 21505, 21507, 21511, - 21472, 21488, 21484, 0, 16384, 20480, 21504, 21505, - 21507, 21511, 21472, 21488, 21484, 0, 16384, 20480, - 21504, 21505, 21507, 21511, 21472, 21488, 21489, 21486, - 0, 16384, 20480, 21504, 21505, 21507, 21511, 21472, - 0, 16384, 20480, 21504, 21505, 21507, 21511, 21472, - 21488, 0, 16384, 20480, 21504, 21505, 21507, 21511, - 21472, 21488, 0, 16384, 20480, 21504, 21505, 21507, - 21511, 21472, 21488, 21490, 0, 16384, 20480, 21504, - 21505, 21507, 21511, 21472, 21488, 0, 16384, 20480, - 21504, 21505, 21507, 21511, 21472, 21488, 21492, 0, - 16384, 20480, 21504, 21505, 21507, 21511, 21472, 21488, - 21492, 0, 16384, 20480, 21504, 21505, 21507, 21511, - 21472, 21488, 21496, 21494, 0, 16384, 20480, 21504, - 21505, 21507, 21511, 21472, 21488, 0, 16384, 20480, - 21504, 21505, 21507, 21511, 21472, 21488, 21496, 0, - 16384, 20480, 21504, 21505, 21507, 21511, 21472, 21488, - 21496, 0, 16384, 20480, 21504, 21505, 21507, 21511, - 21472, 21488, 21496, 21498, 0, 16384, 20480, 21504, - 21505, 21507, 21511, 21472, 21488, 21496, 0, 16384, - 20480, 21504, 21505, 21507, 21511, 21472, 21488, 21496, - 21500, 0, 16384, 20480, 21504, 21505, 21507, 21511, - 21472, 21488, 21496, 21500, 0, 16384, 20480, 21504, - 21505, 21507, 21511, 21472, 21488, 21496, 21500, 21502, - 0, 16384, 20480, 0, 16384, 20480, 21504, 0, - 16384, 20480, 21504, 0, 16384, 20480, 21504, 21506, - 0, 16384, 20480, 21504, 0, 16384, 20480, 21504, - 21508, 0, 16384, 20480, 21504, 21508, 0, 16384, - 20480, 21504, 21512, 21510, 0, 16384, 20480, 21504, - 0, 16384, 20480, 21504, 21512, 0, 16384, 20480, - 21504, 21512, 0, 16384, 20480, 21504, 21512, 21514, - 0, 16384, 20480, 21504, 21512, 0, 16384, 20480, - 21504, 21520, 21516, 0, 16384, 20480, 21504, 21520, - 21516, 0, 16384, 20480, 21504, 21520, 21521, 21518, - 0, 16384, 20480, 21504, 0, 16384, 20480, 21504, - 21520, 0, 16384, 20480, 21504, 21520, 0, 16384, - 20480, 21504, 21520, 21522, 0, 16384, 20480, 21504, - 21520, 0, 16384, 20480, 21504, 21520, 21524, 0, - 16384, 20480, 21504, 21520, 21524, 0, 16384, 20480, - 21504, 21520, 21528, 21526, 0, 16384, 20480, 21504, - 21520, 0, 16384, 20480, 21504, 21536, 21528, 0, - 16384, 20480, 21504, 21536, 21528, 0, 16384, 20480, - 21504, 21536, 21528, 21530, 0, 16384, 20480, 21504, - 21536, 21528, 0, 16384, 20480, 21504, 21536, 21537, - 21532, 0, 16384, 20480, 21504, 21536, 21537, 21532, - 0, 16384, 20480, 21504, 21536, 21537, 21532, 21534, - 0, 16384, 20480, 21504, 0, 16384, 20480, 21504, - 21536, 0, 16384, 20480, 21504, 21536, 0, 16384, - 20480, 21504, 21536, 21538, 0, 16384, 20480, 21504, - 21536, 0, 16384, 20480, 21504, 21536, 21540, 0, - 16384, 20480, 21504, 21536, 21540, 0, 16384, 20480, - 21504, 21536, 21544, 21542, 0, 16384, 20480, 21504, - 21536, 0, 16384, 20480, 21504, 21536, 21544, 0, - 16384, 20480, 21504, 21536, 21544, 0, 16384, 20480, - 21504, 21536, 21544, 21546, 0, 16384, 20480, 21504, - 21536, 21544, 0, 16384, 20480, 21504, 21536, 21552, - 21548, 0, 16384, 20480, 21504, 21536, 21552, 21548, - 0, 16384, 20480, 21504, 21536, 21552, 21553, 21550, - 0, 16384, 20480, 21504, 21536, 0, 16384, 20480, - 21504, 21568, 21552, 0, 16384, 20480, 21504, 21568, - 21552, 0, 16384, 20480, 21504, 21568, 21552, 21554, - 0, 16384, 20480, 21504, 21568, 21552, 0, 16384, - 20480, 21504, 21568, 21552, 21556, 0, 16384, 20480, - 21504, 21568, 21552, 21556, 0, 16384, 20480, 21504, - 21568, 21552, 21560, 21558, 0, 16384, 20480, 21504, - 21568, 21552, 0, 16384, 20480, 21504, 21568, 21569, - 21560, 0, 16384, 20480, 21504, 21568, 21569, 21560, - 0, 16384, 20480, 21504, 21568, 21569, 21560, 21562, - 0, 16384, 20480, 21504, 21568, 21569, 21560, 0, - 16384, 20480, 21504, 21568, 21569, 21560, 21564, 0, - 16384, 20480, 21504, 21568, 21569, 21571, 21564, 0, - 16384, 20480, 21504, 21568, 21569, 21571, 21564, 21566, - 0, 16384, 20480, 21504, 0, 16384, 20480, 21504, - 21568, 0, 16384, 20480, 21504, 21568, 0, 16384, - 20480, 21504, 21568, 21570, 0, 16384, 20480, 21504, - 21568, 0, 16384, 20480, 21504, 21568, 21572, 0, - 16384, 20480, 21504, 21568, 21572, 0, 16384, 20480, - 21504, 21568, 21576, 21574, 0, 16384, 20480, 21504, - 21568, 0, 16384, 20480, 21504, 21568, 21576, 0, - 16384, 20480, 21504, 21568, 21576, 0, 16384, 20480, - 21504, 21568, 21576, 21578, 0, 16384, 20480, 21504, - 21568, 21576, 0, 16384, 20480, 21504, 21568, 21584, - 21580, 0, 16384, 20480, 21504, 21568, 21584, 21580, - 0, 16384, 20480, 21504, 21568, 21584, 21585, 21582, - 0, 16384, 20480, 21504, 21568, 0, 16384, 20480, - 21504, 21568, 21584, 0, 16384, 20480, 21504, 21568, - 21584, 0, 16384, 20480, 21504, 21568, 21584, 21586, - 0, 16384, 20480, 21504, 21568, 21584, 0, 16384, - 20480, 21504, 21568, 21584, 21588, 0, 16384, 20480, - 21504, 21568, 21584, 21588, 0, 16384, 20480, 21504, - 21568, 21584, 21592, 21590, 0, 16384, 20480, 21504, - 21568, 21584, 0, 16384, 20480, 21504, 21568, 21600, - 21592, 0, 16384, 20480, 21504, 21568, 21600, 21592, - 0, 16384, 20480, 21504, 21568, 21600, 21592, 21594, - 0, 16384, 20480, 21504, 21568, 21600, 21592, 0, - 16384, 20480, 21504, 21568, 21600, 21601, 21596, 0, - 16384, 20480, 21504, 21568, 21600, 21601, 21596, 0, - 16384, 20480, 21504, 21568, 21600, 21601, 21596, 21598, - 0, 16384, 20480, 21504, 21568, 0, 16384, 20480, - 21504, 21632, 21600, 0, 16384, 20480, 21504, 21632, - 21600, 0, 16384, 20480, 21504, 21632, 21600, 21602, - 0, 16384, 20480, 21504, 21632, 21600, 0, 16384, - 20480, 21504, 21632, 21600, 21604, 0, 16384, 20480, - 21504, 21632, 21600, 21604, 0, 16384, 20480, 21504, - 21632, 21600, 21608, 21606, 0, 16384, 20480, 21504, - 21632, 21600, 0, 16384, 20480, 21504, 21632, 21600, - 21608, 0, 16384, 20480, 21504, 21632, 21600, 21608, - 0, 16384, 20480, 21504, 21632, 21600, 21608, 21610, - 0, 16384, 20480, 21504, 21632, 21600, 21608, 0, - 16384, 20480, 21504, 21632, 21600, 21616, 21612, 0, - 16384, 20480, 21504, 21632, 21600, 21616, 21612, 0, - 16384, 20480, 21504, 21632, 21600, 21616, 21617, 21614, - 0, 16384, 20480, 21504, 21632, 21600, 0, 16384, - 20480, 21504, 21632, 21633, 21616, 0, 16384, 20480, - 21504, 21632, 21633, 21616, 0, 16384, 20480, 21504, - 21632, 21633, 21616, 21618, 0, 16384, 20480, 21504, - 21632, 21633, 21616, 0, 16384, 20480, 21504, 21632, - 21633, 21616, 21620, 0, 16384, 20480, 21504, 21632, - 21633, 21616, 21620, 0, 16384, 20480, 21504, 21632, - 21633, 21616, 21624, 21622, 0, 16384, 20480, 21504, - 21632, 21633, 21616, 0, 16384, 20480, 21504, 21632, - 21633, 21616, 21624, 0, 16384, 20480, 21504, 21632, - 21633, 21635, 21624, 0, 16384, 20480, 21504, 21632, - 21633, 21635, 21624, 21626, 0, 16384, 20480, 21504, - 21632, 21633, 21635, 21624, 0, 16384, 20480, 21504, - 21632, 21633, 21635, 21624, 21628, 0, 16384, 20480, - 21504, 21632, 21633, 21635, 21624, 21628, 0, 16384, - 20480, 21504, 21632, 21633, 21635, 21624, 21628, 21630, - 0, 16384, 20480, 21504, 0, 16384, 20480, 21504, - 21632, 0, 16384, 20480, 21504, 21632, 0, 16384, - 20480, 21504, 21632, 21634, 0, 16384, 20480, 21504, - 21632, 0, 16384, 20480, 21504, 21632, 21636, 0, - 16384, 20480, 21504, 21632, 21636, 0, 16384, 20480, - 21504, 21632, 21640, 21638, 0, 16384, 20480, 21504, - 21632, 0, 16384, 20480, 21504, 21632, 21640, 0, - 16384, 20480, 21504, 21632, 21640, 0, 16384, 20480, - 21504, 21632, 21640, 21642, 0, 16384, 20480, 21504, - 21632, 21640, 0, 16384, 20480, 21504, 21632, 21648, - 21644, 0, 16384, 20480, 21504, 21632, 21648, 21644, - 0, 16384, 20480, 21504, 21632, 21648, 21649, 21646, - 0, 16384, 20480, 21504, 21632, 0, 16384, 20480, - 21504, 21632, 21648, 0, 16384, 20480, 21504, 21632, - 21648, 0, 16384, 20480, 21504, 21632, 21648, 21650, - 0, 16384, 20480, 21504, 21632, 21648, 0, 16384, - 20480, 21504, 21632, 21648, 21652, 0, 16384, 20480, - 21504, 21632, 21648, 21652, 0, 16384, 20480, 21504, - 21632, 21648, 21656, 21654, 0, 16384, 20480, 21504, - 21632, 21648, 0, 16384, 20480, 21504, 21632, 21664, - 21656, 0, 16384, 20480, 21504, 21632, 21664, 21656, - 0, 16384, 20480, 21504, 21632, 21664, 21656, 21658, - 0, 16384, 20480, 21504, 21632, 21664, 21656, 0, - 16384, 20480, 21504, 21632, 21664, 21665, 21660, 0, - 16384, 20480, 21504, 21632, 21664, 21665, 21660, 0, - 16384, 20480, 21504, 21632, 21664, 21665, 21660, 21662, - 0, 16384, 20480, 21504, 21632, 0, 16384, 20480, - 21504, 21632, 21664, 0, 16384, 20480, 21504, 21632, - 21664, 0, 16384, 20480, 21504, 21632, 21664, 21666, - 0, 16384, 20480, 21504, 21632, 21664, 0, 16384, - 20480, 21504, 21632, 21664, 21668, 0, 16384, 20480, - 21504, 21632, 21664, 21668, 0, 16384, 20480, 21504, - 21632, 21664, 21672, 21670, 0, 16384, 20480, 21504, - 21632, 21664, 0, 16384, 20480, 21504, 21632, 21664, - 21672, 0, 16384, 20480, 21504, 21632, 21664, 21672, - 0, 16384, 20480, 21504, 21632, 21664, 21672, 21674, - 0, 16384, 20480, 21504, 21632, 21664, 21672, 0, - 16384, 20480, 21504, 21632, 21664, 21680, 21676, 0, - 16384, 20480, 21504, 21632, 21664, 21680, 21676, 0, - 16384, 20480, 21504, 21632, 21664, 21680, 21681, 21678, - 0, 16384, 20480, 21504, 21632, 21664, 0, 16384, - 20480, 21504, 21632, 21696, 21680, 0, 16384, 20480, - 21504, 21632, 21696, 21680, 0, 16384, 20480, 21504, - 21632, 21696, 21680, 21682, 0, 16384, 20480, 21504, - 21632, 21696, 21680, 0, 16384, 20480, 21504, 21632, - 21696, 21680, 21684, 0, 16384, 20480, 21504, 21632, - 21696, 21680, 21684, 0, 16384, 20480, 21504, 21632, - 21696, 21680, 21688, 21686, 0, 16384, 20480, 21504, - 21632, 21696, 21680, 0, 16384, 20480, 21504, 21632, - 21696, 21697, 21688, 0, 16384, 20480, 21504, 21632, - 21696, 21697, 21688, 0, 16384, 20480, 21504, 21632, - 21696, 21697, 21688, 21690, 0, 16384, 20480, 21504, - 21632, 21696, 21697, 21688, 0, 16384, 20480, 21504, - 21632, 21696, 21697, 21688, 21692, 0, 16384, 20480, - 21504, 21632, 21696, 21697, 21699, 21692, 0, 16384, - 20480, 21504, 21632, 21696, 21697, 21699, 21692, 21694, - 0, 16384, 20480, 21504, 21632, 0, 16384, 20480, - 21504, 21760, 21696, 0, 16384, 20480, 21504, 21760, - 21696, 0, 16384, 20480, 21504, 21760, 21696, 21698, - 0, 16384, 20480, 21504, 21760, 21696, 0, 16384, - 20480, 21504, 21760, 21696, 21700, 0, 16384, 20480, - 21504, 21760, 21696, 21700, 0, 16384, 20480, 21504, - 21760, 21696, 21704, 21702, 0, 16384, 20480, 21504, - 21760, 21696, 0, 16384, 20480, 21504, 21760, 21696, - 21704, 0, 16384, 20480, 21504, 21760, 21696, 21704, - 0, 16384, 20480, 21504, 21760, 21696, 21704, 21706, - 0, 16384, 20480, 21504, 21760, 21696, 21704, 0, - 16384, 20480, 21504, 21760, 21696, 21712, 21708, 0, - 16384, 20480, 21504, 21760, 21696, 21712, 21708, 0, - 16384, 20480, 21504, 21760, 21696, 21712, 21713, 21710, - 0, 16384, 20480, 21504, 21760, 21696, 0, 16384, - 20480, 21504, 21760, 21696, 21712, 0, 16384, 20480, - 21504, 21760, 21696, 21712, 0, 16384, 20480, 21504, - 21760, 21696, 21712, 21714, 0, 16384, 20480, 21504, - 21760, 21696, 21712, 0, 16384, 20480, 21504, 21760, - 21696, 21712, 21716, 0, 16384, 20480, 21504, 21760, - 21696, 21712, 21716, 0, 16384, 20480, 21504, 21760, - 21696, 21712, 21720, 21718, 0, 16384, 20480, 21504, - 21760, 21696, 21712, 0, 16384, 20480, 21504, 21760, - 21696, 21728, 21720, 0, 16384, 20480, 21504, 21760, - 21696, 21728, 21720, 0, 16384, 20480, 21504, 21760, - 21696, 21728, 21720, 21722, 0, 16384, 20480, 21504, - 21760, 21696, 21728, 21720, 0, 16384, 20480, 21504, - 21760, 21696, 21728, 21729, 21724, 0, 16384, 20480, - 21504, 21760, 21696, 21728, 21729, 21724, 0, 16384, - 20480, 21504, 21760, 21696, 21728, 21729, 21724, 21726, - 0, 16384, 20480, 21504, 21760, 21696, 0, 16384, - 20480, 21504, 21760, 21761, 21728, 0, 16384, 20480, - 21504, 21760, 21761, 21728, 0, 16384, 20480, 21504, - 21760, 21761, 21728, 21730, 0, 16384, 20480, 21504, - 21760, 21761, 21728, 0, 16384, 20480, 21504, 21760, - 21761, 21728, 21732, 0, 16384, 20480, 21504, 21760, - 21761, 21728, 21732, 0, 16384, 20480, 21504, 21760, - 21761, 21728, 21736, 21734, 0, 16384, 20480, 21504, - 21760, 21761, 21728, 0, 16384, 20480, 21504, 21760, - 21761, 21728, 21736, 0, 16384, 20480, 21504, 21760, - 21761, 21728, 21736, 0, 16384, 20480, 21504, 21760, - 21761, 21728, 21736, 21738, 0, 16384, 20480, 21504, - 21760, 21761, 21728, 21736, 0, 16384, 20480, 21504, - 21760, 21761, 21728, 21744, 21740, 0, 16384, 20480, - 21504, 21760, 21761, 21728, 21744, 21740, 0, 16384, - 20480, 21504, 21760, 21761, 21728, 21744, 21745, 21742, - 0, 16384, 20480, 21504, 21760, 21761, 21728, 0, - 16384, 20480, 21504, 21760, 21761, 21728, 21744, 0, - 16384, 20480, 21504, 21760, 21761, 21763, 21744, 0, - 16384, 20480, 21504, 21760, 21761, 21763, 21744, 21746, - 0, 16384, 20480, 21504, 21760, 21761, 21763, 21744, - 0, 16384, 20480, 21504, 21760, 21761, 21763, 21744, - 21748, 0, 16384, 20480, 21504, 21760, 21761, 21763, - 21744, 21748, 0, 16384, 20480, 21504, 21760, 21761, - 21763, 21744, 21752, 21750, 0, 16384, 20480, 21504, - 21760, 21761, 21763, 21744, 0, 16384, 20480, 21504, - 21760, 21761, 21763, 21744, 21752, 0, 16384, 20480, - 21504, 21760, 21761, 21763, 21744, 21752, 0, 16384, - 20480, 21504, 21760, 21761, 21763, 21744, 21752, 21754, - 0, 16384, 20480, 21504, 21760, 21761, 21763, 21767, - 21752, 0, 16384, 20480, 21504, 21760, 21761, 21763, - 21767, 21752, 21756, 0, 16384, 20480, 21504, 21760, - 21761, 21763, 21767, 21752, 21756, 0, 16384, 20480, - 21504, 21760, 21761, 21763, 21767, 21752, 21756, 21758, - 0, 16384, 20480, 21504, 0, 16384, 20480, 21504, - 21760, 0, 16384, 20480, 21504, 21760, 0, 16384, - 20480, 21504, 21760, 21762, 0, 16384, 20480, 21504, - 21760, 0, 16384, 20480, 21504, 21760, 21764, 0, - 16384, 20480, 21504, 21760, 21764, 0, 16384, 20480, - 21504, 21760, 21768, 21766, 0, 16384, 20480, 21504, - 21760, 0, 16384, 20480, 21504, 21760, 21768, 0, - 16384, 20480, 21504, 21760, 21768, 0, 16384, 20480, - 21504, 21760, 21768, 21770, 0, 16384, 20480, 21504, - 21760, 21768, 0, 16384, 20480, 21504, 21760, 21776, - 21772, 0, 16384, 20480, 21504, 21760, 21776, 21772, - 0, 16384, 20480, 21504, 21760, 21776, 21777, 21774, - 0, 16384, 20480, 21504, 21760, 0, 16384, 20480, - 21504, 21760, 21776, 0, 16384, 20480, 21504, 21760, - 21776, 0, 16384, 20480, 21504, 21760, 21776, 21778, - 0, 16384, 20480, 21504, 21760, 21776, 0, 16384, - 20480, 21504, 21760, 21776, 21780, 0, 16384, 20480, - 21504, 21760, 21776, 21780, 0, 16384, 20480, 21504, - 21760, 21776, 21784, 21782, 0, 16384, 20480, 21504, - 21760, 21776, 0, 16384, 20480, 21504, 21760, 21792, - 21784, 0, 16384, 20480, 21504, 21760, 21792, 21784, - 0, 16384, 20480, 21504, 21760, 21792, 21784, 21786, - 0, 16384, 20480, 21504, 21760, 21792, 21784, 0, - 16384, 20480, 21504, 21760, 21792, 21793, 21788, 0, - 16384, 20480, 21504, 21760, 21792, 21793, 21788, 0, - 16384, 20480, 21504, 21760, 21792, 21793, 21788, 21790, - 0, 16384, 20480, 21504, 21760, 0, 16384, 20480, - 21504, 21760, 21792, 0, 16384, 20480, 21504, 21760, - 21792, 0, 16384, 20480, 21504, 21760, 21792, 21794, - 0, 16384, 20480, 21504, 21760, 21792, 0, 16384, - 20480, 21504, 21760, 21792, 21796, 0, 16384, 20480, - 21504, 21760, 21792, 21796, 0, 16384, 20480, 21504, - 21760, 21792, 21800, 21798, 0, 16384, 20480, 21504, - 21760, 21792, 0, 16384, 20480, 21504, 21760, 21792, - 21800, 0, 16384, 20480, 21504, 21760, 21792, 21800, - 0, 16384, 20480, 21504, 21760, 21792, 21800, 21802, - 0, 16384, 20480, 21504, 21760, 21792, 21800, 0, - 16384, 20480, 21504, 21760, 21792, 21808, 21804, 0, - 16384, 20480, 21504, 21760, 21792, 21808, 21804, 0, - 16384, 20480, 21504, 21760, 21792, 21808, 21809, 21806, - 0, 16384, 20480, 21504, 21760, 21792, 0, 16384, - 20480, 21504, 21760, 21824, 21808, 0, 16384, 20480, - 21504, 21760, 21824, 21808, 0, 16384, 20480, 21504, - 21760, 21824, 21808, 21810, 0, 16384, 20480, 21504, - 21760, 21824, 21808, 0, 16384, 20480, 21504, 21760, - 21824, 21808, 21812, 0, 16384, 20480, 21504, 21760, - 21824, 21808, 21812, 0, 16384, 20480, 21504, 21760, - 21824, 21808, 21816, 21814, 0, 16384, 20480, 21504, - 21760, 21824, 21808, 0, 16384, 20480, 21504, 21760, - 21824, 21825, 21816, 0, 16384, 20480, 21504, 21760, - 21824, 21825, 21816, 0, 16384, 20480, 21504, 21760, - 21824, 21825, 21816, 21818, 0, 16384, 20480, 21504, - 21760, 21824, 21825, 21816, 0, 16384, 20480, 21504, - 21760, 21824, 21825, 21816, 21820, 0, 16384, 20480, - 21504, 21760, 21824, 21825, 21827, 21820, 0, 16384, - 20480, 21504, 21760, 21824, 21825, 21827, 21820, 21822, - 0, 16384, 20480, 21504, 21760, 0, 16384, 20480, - 21504, 21760, 21824, 0, 16384, 20480, 21504, 21760, - 21824, 0, 16384, 20480, 21504, 21760, 21824, 21826, - 0, 16384, 20480, 21504, 21760, 21824, 0, 16384, - 20480, 21504, 21760, 21824, 21828, 0, 16384, 20480, - 21504, 21760, 21824, 21828, 0, 16384, 20480, 21504, - 21760, 21824, 21832, 21830, 0, 16384, 20480, 21504, - 21760, 21824, 0, 16384, 20480, 21504, 21760, 21824, - 21832, 0, 16384, 20480, 21504, 21760, 21824, 21832, - 0, 16384, 20480, 21504, 21760, 21824, 21832, 21834, - 0, 16384, 20480, 21504, 21760, 21824, 21832, 0, - 16384, 20480, 21504, 21760, 21824, 21840, 21836, 0, - 16384, 20480, 21504, 21760, 21824, 21840, 21836, 0, - 16384, 20480, 21504, 21760, 21824, 21840, 21841, 21838, - 0, 16384, 20480, 21504, 21760, 21824, 0, 16384, - 20480, 21504, 21760, 21824, 21840, 0, 16384, 20480, - 21504, 21760, 21824, 21840, 0, 16384, 20480, 21504, - 21760, 21824, 21840, 21842, 0, 16384, 20480, 21504, - 21760, 21824, 21840, 0, 16384, 20480, 21504, 21760, - 21824, 21840, 21844, 0, 16384, 20480, 21504, 21760, - 21824, 21840, 21844, 0, 16384, 20480, 21504, 21760, - 21824, 21840, 21848, 21846, 0, 16384, 20480, 21504, - 21760, 21824, 21840, 0, 16384, 20480, 21504, 21760, - 21824, 21856, 21848, 0, 16384, 20480, 21504, 21760, - 21824, 21856, 21848, 0, 16384, 20480, 21504, 21760, - 21824, 21856, 21848, 21850, 0, 16384, 20480, 21504, - 21760, 21824, 21856, 21848, 0, 16384, 20480, 21504, - 21760, 21824, 21856, 21857, 21852, 0, 16384, 20480, - 21504, 21760, 21824, 21856, 21857, 21852, 0, 16384, - 20480, 21504, 21760, 21824, 21856, 21857, 21852, 21854, - 0, 16384, 20480, 21504, 21760, 21824, 0, 16384, - 20480, 21504, 21760, 21888, 21856, 0, 16384, 20480, - 21504, 21760, 21888, 21856, 0, 16384, 20480, 21504, - 21760, 21888, 21856, 21858, 0, 16384, 20480, 21504, - 21760, 21888, 21856, 0, 16384, 20480, 21504, 21760, - 21888, 21856, 21860, 0, 16384, 20480, 21504, 21760, - 21888, 21856, 21860, 0, 16384, 20480, 21504, 21760, - 21888, 21856, 21864, 21862, 0, 16384, 20480, 21504, - 21760, 21888, 21856, 0, 16384, 20480, 21504, 21760, - 21888, 21856, 21864, 0, 16384, 20480, 21504, 21760, - 21888, 21856, 21864, 0, 16384, 20480, 21504, 21760, - 21888, 21856, 21864, 21866, 0, 16384, 20480, 21504, - 21760, 21888, 21856, 21864, 0, 16384, 20480, 21504, - 21760, 21888, 21856, 21872, 21868, 0, 16384, 20480, - 21504, 21760, 21888, 21856, 21872, 21868, 0, 16384, - 20480, 21504, 21760, 21888, 21856, 21872, 21873, 21870, - 0, 16384, 20480, 21504, 21760, 21888, 21856, 0, - 16384, 20480, 21504, 21760, 21888, 21889, 21872, 0, - 16384, 20480, 21504, 21760, 21888, 21889, 21872, 0, - 16384, 20480, 21504, 21760, 21888, 21889, 21872, 21874, - 0, 16384, 20480, 21504, 21760, 21888, 21889, 21872, - 0, 16384, 20480, 21504, 21760, 21888, 21889, 21872, - 21876, 0, 16384, 20480, 21504, 21760, 21888, 21889, - 21872, 21876, 0, 16384, 20480, 21504, 21760, 21888, - 21889, 21872, 21880, 21878, 0, 16384, 20480, 21504, - 21760, 21888, 21889, 21872, 0, 16384, 20480, 21504, - 21760, 21888, 21889, 21872, 21880, 0, 16384, 20480, - 21504, 21760, 21888, 21889, 21891, 21880, 0, 16384, - 20480, 21504, 21760, 21888, 21889, 21891, 21880, 21882, - 0, 16384, 20480, 21504, 21760, 21888, 21889, 21891, - 21880, 0, 16384, 20480, 21504, 21760, 21888, 21889, - 21891, 21880, 21884, 0, 16384, 20480, 21504, 21760, - 21888, 21889, 21891, 21880, 21884, 0, 16384, 20480, - 21504, 21760, 21888, 21889, 21891, 21880, 21884, 21886, - 0, 16384, 20480, 21504, 21760, 0, 16384, 20480, - 21504, 22016, 21888, 0, 16384, 20480, 21504, 22016, - 21888, 0, 16384, 20480, 21504, 22016, 21888, 21890, - 0, 16384, 20480, 21504, 22016, 21888, 0, 16384, - 20480, 21504, 22016, 21888, 21892, 0, 16384, 20480, - 21504, 22016, 21888, 21892, 0, 16384, 20480, 21504, - 22016, 21888, 21896, 21894, 0, 16384, 20480, 21504, - 22016, 21888, 0, 16384, 20480, 21504, 22016, 21888, - 21896, 0, 16384, 20480, 21504, 22016, 21888, 21896, - 0, 16384, 20480, 21504, 22016, 21888, 21896, 21898, - 0, 16384, 20480, 21504, 22016, 21888, 21896, 0, - 16384, 20480, 21504, 22016, 21888, 21904, 21900, 0, - 16384, 20480, 21504, 22016, 21888, 21904, 21900, 0, - 16384, 20480, 21504, 22016, 21888, 21904, 21905, 21902, - 0, 16384, 20480, 21504, 22016, 21888, 0, 16384, - 20480, 21504, 22016, 21888, 21904, 0, 16384, 20480, - 21504, 22016, 21888, 21904, 0, 16384, 20480, 21504, - 22016, 21888, 21904, 21906, 0, 16384, 20480, 21504, - 22016, 21888, 21904, 0, 16384, 20480, 21504, 22016, - 21888, 21904, 21908, 0, 16384, 20480, 21504, 22016, - 21888, 21904, 21908, 0, 16384, 20480, 21504, 22016, - 21888, 21904, 21912, 21910, 0, 16384, 20480, 21504, - 22016, 21888, 21904, 0, 16384, 20480, 21504, 22016, - 21888, 21920, 21912, 0, 16384, 20480, 21504, 22016, - 21888, 21920, 21912, 0, 16384, 20480, 21504, 22016, - 21888, 21920, 21912, 21914, 0, 16384, 20480, 21504, - 22016, 21888, 21920, 21912, 0, 16384, 20480, 21504, - 22016, 21888, 21920, 21921, 21916, 0, 16384, 20480, - 21504, 22016, 21888, 21920, 21921, 21916, 0, 16384, - 20480, 21504, 22016, 21888, 21920, 21921, 21916, 21918, - 0, 16384, 20480, 21504, 22016, 21888, 0, 16384, - 20480, 21504, 22016, 21888, 21920, 0, 16384, 20480, - 21504, 22016, 21888, 21920, 0, 16384, 20480, 21504, - 22016, 21888, 21920, 21922, 0, 16384, 20480, 21504, - 22016, 21888, 21920, 0, 16384, 20480, 21504, 22016, - 21888, 21920, 21924, 0, 16384, 20480, 21504, 22016, - 21888, 21920, 21924, 0, 16384, 20480, 21504, 22016, - 21888, 21920, 21928, 21926, 0, 16384, 20480, 21504, - 22016, 21888, 21920, 0, 16384, 20480, 21504, 22016, - 21888, 21920, 21928, 0, 16384, 20480, 21504, 22016, - 21888, 21920, 21928, 0, 16384, 20480, 21504, 22016, - 21888, 21920, 21928, 21930, 0, 16384, 20480, 21504, - 22016, 21888, 21920, 21928, 0, 16384, 20480, 21504, - 22016, 21888, 21920, 21936, 21932, 0, 16384, 20480, - 21504, 22016, 21888, 21920, 21936, 21932, 0, 16384, - 20480, 21504, 22016, 21888, 21920, 21936, 21937, 21934, - 0, 16384, 20480, 21504, 22016, 21888, 21920, 0, - 16384, 20480, 21504, 22016, 21888, 21952, 21936, 0, - 16384, 20480, 21504, 22016, 21888, 21952, 21936, 0, - 16384, 20480, 21504, 22016, 21888, 21952, 21936, 21938, - 0, 16384, 20480, 21504, 22016, 21888, 21952, 21936, - 0, 16384, 20480, 21504, 22016, 21888, 21952, 21936, - 21940, 0, 16384, 20480, 21504, 22016, 21888, 21952, - 21936, 21940, 0, 16384, 20480, 21504, 22016, 21888, - 21952, 21936, 21944, 21942, 0, 16384, 20480, 21504, - 22016, 21888, 21952, 21936, 0, 16384, 20480, 21504, - 22016, 21888, 21952, 21953, 21944, 0, 16384, 20480, - 21504, 22016, 21888, 21952, 21953, 21944, 0, 16384, - 20480, 21504, 22016, 21888, 21952, 21953, 21944, 21946, - 0, 16384, 20480, 21504, 22016, 21888, 21952, 21953, - 21944, 0, 16384, 20480, 21504, 22016, 21888, 21952, - 21953, 21944, 21948, 0, 16384, 20480, 21504, 22016, - 21888, 21952, 21953, 21955, 21948, 0, 16384, 20480, - 21504, 22016, 21888, 21952, 21953, 21955, 21948, 21950, - 0, 16384, 20480, 21504, 22016, 21888, 0, 16384, - 20480, 21504, 22016, 22017, 21952, 0, 16384, 20480, - 21504, 22016, 22017, 21952, 0, 16384, 20480, 21504, - 22016, 22017, 21952, 21954, 0, 16384, 20480, 21504, - 22016, 22017, 21952, 0, 16384, 20480, 21504, 22016, - 22017, 21952, 21956, 0, 16384, 20480, 21504, 22016, - 22017, 21952, 21956, 0, 16384, 20480, 21504, 22016, - 22017, 21952, 21960, 21958, 0, 16384, 20480, 21504, - 22016, 22017, 21952, 0, 16384, 20480, 21504, 22016, - 22017, 21952, 21960, 0, 16384, 20480, 21504, 22016, - 22017, 21952, 21960, 0, 16384, 20480, 21504, 22016, - 22017, 21952, 21960, 21962, 0, 16384, 20480, 21504, - 22016, 22017, 21952, 21960, 0, 16384, 20480, 21504, - 22016, 22017, 21952, 21968, 21964, 0, 16384, 20480, - 21504, 22016, 22017, 21952, 21968, 21964, 0, 16384, - 20480, 21504, 22016, 22017, 21952, 21968, 21969, 21966, - 0, 16384, 20480, 21504, 22016, 22017, 21952, 0, - 16384, 20480, 21504, 22016, 22017, 21952, 21968, 0, - 16384, 20480, 21504, 22016, 22017, 21952, 21968, 0, - 16384, 20480, 21504, 22016, 22017, 21952, 21968, 21970, - 0, 16384, 20480, 21504, 22016, 22017, 21952, 21968, - 0, 16384, 20480, 21504, 22016, 22017, 21952, 21968, - 21972, 0, 16384, 20480, 21504, 22016, 22017, 21952, - 21968, 21972, 0, 16384, 20480, 21504, 22016, 22017, - 21952, 21968, 21976, 21974, 0, 16384, 20480, 21504, - 22016, 22017, 21952, 21968, 0, 16384, 20480, 21504, - 22016, 22017, 21952, 21984, 21976, 0, 16384, 20480, - 21504, 22016, 22017, 21952, 21984, 21976, 0, 16384, - 20480, 21504, 22016, 22017, 21952, 21984, 21976, 21978, - 0, 16384, 20480, 21504, 22016, 22017, 21952, 21984, - 21976, 0, 16384, 20480, 21504, 22016, 22017, 21952, - 21984, 21985, 21980, 0, 16384, 20480, 21504, 22016, - 22017, 21952, 21984, 21985, 21980, 0, 16384, 20480, - 21504, 22016, 22017, 21952, 21984, 21985, 21980, 21982, - 0, 16384, 20480, 21504, 22016, 22017, 21952, 0, - 16384, 20480, 21504, 22016, 22017, 21952, 21984, 0, - 16384, 20480, 21504, 22016, 22017, 22019, 21984, 0, - 16384, 20480, 21504, 22016, 22017, 22019, 21984, 21986, - 0, 16384, 20480, 21504, 22016, 22017, 22019, 21984, - 0, 16384, 20480, 21504, 22016, 22017, 22019, 21984, - 21988, 0, 16384, 20480, 21504, 22016, 22017, 22019, - 21984, 21988, 0, 16384, 20480, 21504, 22016, 22017, - 22019, 21984, 21992, 21990, 0, 16384, 20480, 21504, - 22016, 22017, 22019, 21984, 0, 16384, 20480, 21504, - 22016, 22017, 22019, 21984, 21992, 0, 16384, 20480, - 21504, 22016, 22017, 22019, 21984, 21992, 0, 16384, - 20480, 21504, 22016, 22017, 22019, 21984, 21992, 21994, - 0, 16384, 20480, 21504, 22016, 22017, 22019, 21984, - 21992, 0, 16384, 20480, 21504, 22016, 22017, 22019, - 21984, 22000, 21996, 0, 16384, 20480, 21504, 22016, - 22017, 22019, 21984, 22000, 21996, 0, 16384, 20480, - 21504, 22016, 22017, 22019, 21984, 22000, 22001, 21998, - 0, 16384, 20480, 21504, 22016, 22017, 22019, 21984, - 0, 16384, 20480, 21504, 22016, 22017, 22019, 21984, - 22000, 0, 16384, 20480, 21504, 22016, 22017, 22019, - 21984, 22000, 0, 16384, 20480, 21504, 22016, 22017, - 22019, 21984, 22000, 22002, 0, 16384, 20480, 21504, - 22016, 22017, 22019, 22023, 22000, 0, 16384, 20480, - 21504, 22016, 22017, 22019, 22023, 22000, 22004, 0, - 16384, 20480, 21504, 22016, 22017, 22019, 22023, 22000, - 22004, 0, 16384, 20480, 21504, 22016, 22017, 22019, - 22023, 22000, 22008, 22006, 0, 16384, 20480, 21504, - 22016, 22017, 22019, 22023, 22000, 0, 16384, 20480, - 21504, 22016, 22017, 22019, 22023, 22000, 22008, 0, - 16384, 20480, 21504, 22016, 22017, 22019, 22023, 22000, - 22008, 0, 16384, 20480, 21504, 22016, 22017, 22019, - 22023, 22000, 22008, 22010, 0, 16384, 20480, 21504, - 22016, 22017, 22019, 22023, 22000, 22008, 0, 16384, - 20480, 21504, 22016, 22017, 22019, 22023, 22000, 22008, - 22012, 0, 16384, 20480, 21504, 22016, 22017, 22019, - 22023, 22000, 22008, 22012, 0, 16384, 20480, 21504, - 22016, 22017, 22019, 22023, 22000, 22008, 22012, 22014, - 0, 16384, 20480, 21504, 0, 16384, 20480, 22528, - 22016, 0, 16384, 20480, 22528, 22016, 0, 16384, - 20480, 22528, 22016, 22018, 0, 16384, 20480, 22528, - 22016, 0, 16384, 20480, 22528, 22016, 22020, 0, - 16384, 20480, 22528, 22016, 22020, 0, 16384, 20480, - 22528, 22016, 22024, 22022, 0, 16384, 20480, 22528, - 22016, 0, 16384, 20480, 22528, 22016, 22024, 0, - 16384, 20480, 22528, 22016, 22024, 0, 16384, 20480, - 22528, 22016, 22024, 22026, 0, 16384, 20480, 22528, - 22016, 22024, 0, 16384, 20480, 22528, 22016, 22032, - 22028, 0, 16384, 20480, 22528, 22016, 22032, 22028, - 0, 16384, 20480, 22528, 22016, 22032, 22033, 22030, - 0, 16384, 20480, 22528, 22016, 0, 16384, 20480, - 22528, 22016, 22032, 0, 16384, 20480, 22528, 22016, - 22032, 0, 16384, 20480, 22528, 22016, 22032, 22034, - 0, 16384, 20480, 22528, 22016, 22032, 0, 16384, - 20480, 22528, 22016, 22032, 22036, 0, 16384, 20480, - 22528, 22016, 22032, 22036, 0, 16384, 20480, 22528, - 22016, 22032, 22040, 22038, 0, 16384, 20480, 22528, - 22016, 22032, 0, 16384, 20480, 22528, 22016, 22048, - 22040, 0, 16384, 20480, 22528, 22016, 22048, 22040, - 0, 16384, 20480, 22528, 22016, 22048, 22040, 22042, - 0, 16384, 20480, 22528, 22016, 22048, 22040, 0, - 16384, 20480, 22528, 22016, 22048, 22049, 22044, 0, - 16384, 20480, 22528, 22016, 22048, 22049, 22044, 0, - 16384, 20480, 22528, 22016, 22048, 22049, 22044, 22046, - 0, 16384, 20480, 22528, 22016, 0, 16384, 20480, - 22528, 22016, 22048, 0, 16384, 20480, 22528, 22016, - 22048, 0, 16384, 20480, 22528, 22016, 22048, 22050, - 0, 16384, 20480, 22528, 22016, 22048, 0, 16384, - 20480, 22528, 22016, 22048, 22052, 0, 16384, 20480, - 22528, 22016, 22048, 22052, 0, 16384, 20480, 22528, - 22016, 22048, 22056, 22054, 0, 16384, 20480, 22528, - 22016, 22048, 0, 16384, 20480, 22528, 22016, 22048, - 22056, 0, 16384, 20480, 22528, 22016, 22048, 22056, - 0, 16384, 20480, 22528, 22016, 22048, 22056, 22058, - 0, 16384, 20480, 22528, 22016, 22048, 22056, 0, - 16384, 20480, 22528, 22016, 22048, 22064, 22060, 0, - 16384, 20480, 22528, 22016, 22048, 22064, 22060, 0, - 16384, 20480, 22528, 22016, 22048, 22064, 22065, 22062, - 0, 16384, 20480, 22528, 22016, 22048, 0, 16384, - 20480, 22528, 22016, 22080, 22064, 0, 16384, 20480, - 22528, 22016, 22080, 22064, 0, 16384, 20480, 22528, - 22016, 22080, 22064, 22066, 0, 16384, 20480, 22528, - 22016, 22080, 22064, 0, 16384, 20480, 22528, 22016, - 22080, 22064, 22068, 0, 16384, 20480, 22528, 22016, - 22080, 22064, 22068, 0, 16384, 20480, 22528, 22016, - 22080, 22064, 22072, 22070, 0, 16384, 20480, 22528, - 22016, 22080, 22064, 0, 16384, 20480, 22528, 22016, - 22080, 22081, 22072, 0, 16384, 20480, 22528, 22016, - 22080, 22081, 22072, 0, 16384, 20480, 22528, 22016, - 22080, 22081, 22072, 22074, 0, 16384, 20480, 22528, - 22016, 22080, 22081, 22072, 0, 16384, 20480, 22528, - 22016, 22080, 22081, 22072, 22076, 0, 16384, 20480, - 22528, 22016, 22080, 22081, 22083, 22076, 0, 16384, - 20480, 22528, 22016, 22080, 22081, 22083, 22076, 22078, - 0, 16384, 20480, 22528, 22016, 0, 16384, 20480, - 22528, 22016, 22080, 0, 16384, 20480, 22528, 22016, - 22080, 0, 16384, 20480, 22528, 22016, 22080, 22082, - 0, 16384, 20480, 22528, 22016, 22080, 0, 16384, - 20480, 22528, 22016, 22080, 22084, 0, 16384, 20480, - 22528, 22016, 22080, 22084, 0, 16384, 20480, 22528, - 22016, 22080, 22088, 22086, 0, 16384, 20480, 22528, - 22016, 22080, 0, 16384, 20480, 22528, 22016, 22080, - 22088, 0, 16384, 20480, 22528, 22016, 22080, 22088, - 0, 16384, 20480, 22528, 22016, 22080, 22088, 22090, - 0, 16384, 20480, 22528, 22016, 22080, 22088, 0, - 16384, 20480, 22528, 22016, 22080, 22096, 22092, 0, - 16384, 20480, 22528, 22016, 22080, 22096, 22092, 0, - 16384, 20480, 22528, 22016, 22080, 22096, 22097, 22094, - 0, 16384, 20480, 22528, 22016, 22080, 0, 16384, - 20480, 22528, 22016, 22080, 22096, 0, 16384, 20480, - 22528, 22016, 22080, 22096, 0, 16384, 20480, 22528, - 22016, 22080, 22096, 22098, 0, 16384, 20480, 22528, - 22016, 22080, 22096, 0, 16384, 20480, 22528, 22016, - 22080, 22096, 22100, 0, 16384, 20480, 22528, 22016, - 22080, 22096, 22100, 0, 16384, 20480, 22528, 22016, - 22080, 22096, 22104, 22102, 0, 16384, 20480, 22528, - 22016, 22080, 22096, 0, 16384, 20480, 22528, 22016, - 22080, 22112, 22104, 0, 16384, 20480, 22528, 22016, - 22080, 22112, 22104, 0, 16384, 20480, 22528, 22016, - 22080, 22112, 22104, 22106, 0, 16384, 20480, 22528, - 22016, 22080, 22112, 22104, 0, 16384, 20480, 22528, - 22016, 22080, 22112, 22113, 22108, 0, 16384, 20480, - 22528, 22016, 22080, 22112, 22113, 22108, 0, 16384, - 20480, 22528, 22016, 22080, 22112, 22113, 22108, 22110, - 0, 16384, 20480, 22528, 22016, 22080, 0, 16384, - 20480, 22528, 22016, 22144, 22112, 0, 16384, 20480, - 22528, 22016, 22144, 22112, 0, 16384, 20480, 22528, - 22016, 22144, 22112, 22114, 0, 16384, 20480, 22528, - 22016, 22144, 22112, 0, 16384, 20480, 22528, 22016, - 22144, 22112, 22116, 0, 16384, 20480, 22528, 22016, - 22144, 22112, 22116, 0, 16384, 20480, 22528, 22016, - 22144, 22112, 22120, 22118, 0, 16384, 20480, 22528, - 22016, 22144, 22112, 0, 16384, 20480, 22528, 22016, - 22144, 22112, 22120, 0, 16384, 20480, 22528, 22016, - 22144, 22112, 22120, 0, 16384, 20480, 22528, 22016, - 22144, 22112, 22120, 22122, 0, 16384, 20480, 22528, - 22016, 22144, 22112, 22120, 0, 16384, 20480, 22528, - 22016, 22144, 22112, 22128, 22124, 0, 16384, 20480, - 22528, 22016, 22144, 22112, 22128, 22124, 0, 16384, - 20480, 22528, 22016, 22144, 22112, 22128, 22129, 22126, - 0, 16384, 20480, 22528, 22016, 22144, 22112, 0, - 16384, 20480, 22528, 22016, 22144, 22145, 22128, 0, - 16384, 20480, 22528, 22016, 22144, 22145, 22128, 0, - 16384, 20480, 22528, 22016, 22144, 22145, 22128, 22130, - 0, 16384, 20480, 22528, 22016, 22144, 22145, 22128, - 0, 16384, 20480, 22528, 22016, 22144, 22145, 22128, - 22132, 0, 16384, 20480, 22528, 22016, 22144, 22145, - 22128, 22132, 0, 16384, 20480, 22528, 22016, 22144, - 22145, 22128, 22136, 22134, 0, 16384, 20480, 22528, - 22016, 22144, 22145, 22128, 0, 16384, 20480, 22528, - 22016, 22144, 22145, 22128, 22136, 0, 16384, 20480, - 22528, 22016, 22144, 22145, 22147, 22136, 0, 16384, - 20480, 22528, 22016, 22144, 22145, 22147, 22136, 22138, - 0, 16384, 20480, 22528, 22016, 22144, 22145, 22147, - 22136, 0, 16384, 20480, 22528, 22016, 22144, 22145, - 22147, 22136, 22140, 0, 16384, 20480, 22528, 22016, - 22144, 22145, 22147, 22136, 22140, 0, 16384, 20480, - 22528, 22016, 22144, 22145, 22147, 22136, 22140, 22142, - 0, 16384, 20480, 22528, 22016, 0, 16384, 20480, - 22528, 22016, 22144, 0, 16384, 20480, 22528, 22016, - 22144, 0, 16384, 20480, 22528, 22016, 22144, 22146, - 0, 16384, 20480, 22528, 22016, 22144, 0, 16384, - 20480, 22528, 22016, 22144, 22148, 0, 16384, 20480, - 22528, 22016, 22144, 22148, 0, 16384, 20480, 22528, - 22016, 22144, 22152, 22150, 0, 16384, 20480, 22528, - 22016, 22144, 0, 16384, 20480, 22528, 22016, 22144, - 22152, 0, 16384, 20480, 22528, 22016, 22144, 22152, - 0, 16384, 20480, 22528, 22016, 22144, 22152, 22154, - 0, 16384, 20480, 22528, 22016, 22144, 22152, 0, - 16384, 20480, 22528, 22016, 22144, 22160, 22156, 0, - 16384, 20480, 22528, 22016, 22144, 22160, 22156, 0, - 16384, 20480, 22528, 22016, 22144, 22160, 22161, 22158, - 0, 16384, 20480, 22528, 22016, 22144, 0, 16384, - 20480, 22528, 22016, 22144, 22160, 0, 16384, 20480, - 22528, 22016, 22144, 22160, 0, 16384, 20480, 22528, - 22016, 22144, 22160, 22162, 0, 16384, 20480, 22528, - 22016, 22144, 22160, 0, 16384, 20480, 22528, 22016, - 22144, 22160, 22164, 0, 16384, 20480, 22528, 22016, - 22144, 22160, 22164, 0, 16384, 20480, 22528, 22016, - 22144, 22160, 22168, 22166, 0, 16384, 20480, 22528, - 22016, 22144, 22160, 0, 16384, 20480, 22528, 22016, - 22144, 22176, 22168, 0, 16384, 20480, 22528, 22016, - 22144, 22176, 22168, 0, 16384, 20480, 22528, 22016, - 22144, 22176, 22168, 22170, 0, 16384, 20480, 22528, - 22016, 22144, 22176, 22168, 0, 16384, 20480, 22528, - 22016, 22144, 22176, 22177, 22172, 0, 16384, 20480, - 22528, 22016, 22144, 22176, 22177, 22172, 0, 16384, - 20480, 22528, 22016, 22144, 22176, 22177, 22172, 22174, - 0, 16384, 20480, 22528, 22016, 22144, 0, 16384, - 20480, 22528, 22016, 22144, 22176, 0, 16384, 20480, - 22528, 22016, 22144, 22176, 0, 16384, 20480, 22528, - 22016, 22144, 22176, 22178, 0, 16384, 20480, 22528, - 22016, 22144, 22176, 0, 16384, 20480, 22528, 22016, - 22144, 22176, 22180, 0, 16384, 20480, 22528, 22016, - 22144, 22176, 22180, 0, 16384, 20480, 22528, 22016, - 22144, 22176, 22184, 22182, 0, 16384, 20480, 22528, - 22016, 22144, 22176, 0, 16384, 20480, 22528, 22016, - 22144, 22176, 22184, 0, 16384, 20480, 22528, 22016, - 22144, 22176, 22184, 0, 16384, 20480, 22528, 22016, - 22144, 22176, 22184, 22186, 0, 16384, 20480, 22528, - 22016, 22144, 22176, 22184, 0, 16384, 20480, 22528, - 22016, 22144, 22176, 22192, 22188, 0, 16384, 20480, - 22528, 22016, 22144, 22176, 22192, 22188, 0, 16384, - 20480, 22528, 22016, 22144, 22176, 22192, 22193, 22190, - 0, 16384, 20480, 22528, 22016, 22144, 22176, 0, - 16384, 20480, 22528, 22016, 22144, 22208, 22192, 0, - 16384, 20480, 22528, 22016, 22144, 22208, 22192, 0, - 16384, 20480, 22528, 22016, 22144, 22208, 22192, 22194, - 0, 16384, 20480, 22528, 22016, 22144, 22208, 22192, - 0, 16384, 20480, 22528, 22016, 22144, 22208, 22192, - 22196, 0, 16384, 20480, 22528, 22016, 22144, 22208, - 22192, 22196, 0, 16384, 20480, 22528, 22016, 22144, - 22208, 22192, 22200, 22198, 0, 16384, 20480, 22528, - 22016, 22144, 22208, 22192, 0, 16384, 20480, 22528, - 22016, 22144, 22208, 22209, 22200, 0, 16384, 20480, - 22528, 22016, 22144, 22208, 22209, 22200, 0, 16384, - 20480, 22528, 22016, 22144, 22208, 22209, 22200, 22202, - 0, 16384, 20480, 22528, 22016, 22144, 22208, 22209, - 22200, 0, 16384, 20480, 22528, 22016, 22144, 22208, - 22209, 22200, 22204, 0, 16384, 20480, 22528, 22016, - 22144, 22208, 22209, 22211, 22204, 0, 16384, 20480, - 22528, 22016, 22144, 22208, 22209, 22211, 22204, 22206, - 0, 16384, 20480, 22528, 22016, 22144, 0, 16384, - 20480, 22528, 22016, 22272, 22208, 0, 16384, 20480, - 22528, 22016, 22272, 22208, 0, 16384, 20480, 22528, - 22016, 22272, 22208, 22210, 0, 16384, 20480, 22528, - 22016, 22272, 22208, 0, 16384, 20480, 22528, 22016, - 22272, 22208, 22212, 0, 16384, 20480, 22528, 22016, - 22272, 22208, 22212, 0, 16384, 20480, 22528, 22016, - 22272, 22208, 22216, 22214, 0, 16384, 20480, 22528, - 22016, 22272, 22208, 0, 16384, 20480, 22528, 22016, - 22272, 22208, 22216, 0, 16384, 20480, 22528, 22016, - 22272, 22208, 22216, 0, 16384, 20480, 22528, 22016, - 22272, 22208, 22216, 22218, 0, 16384, 20480, 22528, - 22016, 22272, 22208, 22216, 0, 16384, 20480, 22528, - 22016, 22272, 22208, 22224, 22220, 0, 16384, 20480, - 22528, 22016, 22272, 22208, 22224, 22220, 0, 16384, - 20480, 22528, 22016, 22272, 22208, 22224, 22225, 22222, - 0, 16384, 20480, 22528, 22016, 22272, 22208, 0, - 16384, 20480, 22528, 22016, 22272, 22208, 22224, 0, - 16384, 20480, 22528, 22016, 22272, 22208, 22224, 0, - 16384, 20480, 22528, 22016, 22272, 22208, 22224, 22226, - 0, 16384, 20480, 22528, 22016, 22272, 22208, 22224, - 0, 16384, 20480, 22528, 22016, 22272, 22208, 22224, - 22228, 0, 16384, 20480, 22528, 22016, 22272, 22208, - 22224, 22228, 0, 16384, 20480, 22528, 22016, 22272, - 22208, 22224, 22232, 22230, 0, 16384, 20480, 22528, - 22016, 22272, 22208, 22224, 0, 16384, 20480, 22528, - 22016, 22272, 22208, 22240, 22232, 0, 16384, 20480, - 22528, 22016, 22272, 22208, 22240, 22232, 0, 16384, - 20480, 22528, 22016, 22272, 22208, 22240, 22232, 22234, - 0, 16384, 20480, 22528, 22016, 22272, 22208, 22240, - 22232, 0, 16384, 20480, 22528, 22016, 22272, 22208, - 22240, 22241, 22236, 0, 16384, 20480, 22528, 22016, - 22272, 22208, 22240, 22241, 22236, 0, 16384, 20480, - 22528, 22016, 22272, 22208, 22240, 22241, 22236, 22238, - 0, 16384, 20480, 22528, 22016, 22272, 22208, 0, - 16384, 20480, 22528, 22016, 22272, 22273, 22240, 0, - 16384, 20480, 22528, 22016, 22272, 22273, 22240, 0, - 16384, 20480, 22528, 22016, 22272, 22273, 22240, 22242, - 0, 16384, 20480, 22528, 22016, 22272, 22273, 22240, - 0, 16384, 20480, 22528, 22016, 22272, 22273, 22240, - 22244, 0, 16384, 20480, 22528, 22016, 22272, 22273, - 22240, 22244, 0, 16384, 20480, 22528, 22016, 22272, - 22273, 22240, 22248, 22246, 0, 16384, 20480, 22528, - 22016, 22272, 22273, 22240, 0, 16384, 20480, 22528, - 22016, 22272, 22273, 22240, 22248, 0, 16384, 20480, - 22528, 22016, 22272, 22273, 22240, 22248, 0, 16384, - 20480, 22528, 22016, 22272, 22273, 22240, 22248, 22250, - 0, 16384, 20480, 22528, 22016, 22272, 22273, 22240, - 22248, 0, 16384, 20480, 22528, 22016, 22272, 22273, - 22240, 22256, 22252, 0, 16384, 20480, 22528, 22016, - 22272, 22273, 22240, 22256, 22252, 0, 16384, 20480, - 22528, 22016, 22272, 22273, 22240, 22256, 22257, 22254, - 0, 16384, 20480, 22528, 22016, 22272, 22273, 22240, - 0, 16384, 20480, 22528, 22016, 22272, 22273, 22240, - 22256, 0, 16384, 20480, 22528, 22016, 22272, 22273, - 22275, 22256, 0, 16384, 20480, 22528, 22016, 22272, - 22273, 22275, 22256, 22258, 0, 16384, 20480, 22528, - 22016, 22272, 22273, 22275, 22256, 0, 16384, 20480, - 22528, 22016, 22272, 22273, 22275, 22256, 22260, 0, - 16384, 20480, 22528, 22016, 22272, 22273, 22275, 22256, - 22260, 0, 16384, 20480, 22528, 22016, 22272, 22273, - 22275, 22256, 22264, 22262, 0, 16384, 20480, 22528, - 22016, 22272, 22273, 22275, 22256, 0, 16384, 20480, - 22528, 22016, 22272, 22273, 22275, 22256, 22264, 0, - 16384, 20480, 22528, 22016, 22272, 22273, 22275, 22256, - 22264, 0, 16384, 20480, 22528, 22016, 22272, 22273, - 22275, 22256, 22264, 22266, 0, 16384, 20480, 22528, - 22016, 22272, 22273, 22275, 22279, 22264, 0, 16384, - 20480, 22528, 22016, 22272, 22273, 22275, 22279, 22264, - 22268, 0, 16384, 20480, 22528, 22016, 22272, 22273, - 22275, 22279, 22264, 22268, 0, 16384, 20480, 22528, - 22016, 22272, 22273, 22275, 22279, 22264, 22268, 22270, - 0, 16384, 20480, 22528, 22016, 0, 16384, 20480, - 22528, 22016, 22272, 0, 16384, 20480, 22528, 22529, - 22272, 0, 16384, 20480, 22528, 22529, 22272, 22274, - 0, 16384, 20480, 22528, 22529, 22272, 0, 16384, - 20480, 22528, 22529, 22272, 22276, 0, 16384, 20480, - 22528, 22529, 22272, 22276, 0, 16384, 20480, 22528, - 22529, 22272, 22280, 22278, 0, 16384, 20480, 22528, - 22529, 22272, 0, 16384, 20480, 22528, 22529, 22272, - 22280, 0, 16384, 20480, 22528, 22529, 22272, 22280, - 0, 16384, 20480, 22528, 22529, 22272, 22280, 22282, - 0, 16384, 20480, 22528, 22529, 22272, 22280, 0, - 16384, 20480, 22528, 22529, 22272, 22288, 22284, 0, - 16384, 20480, 22528, 22529, 22272, 22288, 22284, 0, - 16384, 20480, 22528, 22529, 22272, 22288, 22289, 22286, - 0, 16384, 20480, 22528, 22529, 22272, 0, 16384, - 20480, 22528, 22529, 22272, 22288, 0, 16384, 20480, - 22528, 22529, 22272, 22288, 0, 16384, 20480, 22528, - 22529, 22272, 22288, 22290, 0, 16384, 20480, 22528, - 22529, 22272, 22288, 0, 16384, 20480, 22528, 22529, - 22272, 22288, 22292, 0, 16384, 20480, 22528, 22529, - 22272, 22288, 22292, 0, 16384, 20480, 22528, 22529, - 22272, 22288, 22296, 22294, 0, 16384, 20480, 22528, - 22529, 22272, 22288, 0, 16384, 20480, 22528, 22529, - 22272, 22304, 22296, 0, 16384, 20480, 22528, 22529, - 22272, 22304, 22296, 0, 16384, 20480, 22528, 22529, - 22272, 22304, 22296, 22298, 0, 16384, 20480, 22528, - 22529, 22272, 22304, 22296, 0, 16384, 20480, 22528, - 22529, 22272, 22304, 22305, 22300, 0, 16384, 20480, - 22528, 22529, 22272, 22304, 22305, 22300, 0, 16384, - 20480, 22528, 22529, 22272, 22304, 22305, 22300, 22302, - 0, 16384, 20480, 22528, 22529, 22272, 0, 16384, - 20480, 22528, 22529, 22272, 22304, 0, 16384, 20480, - 22528, 22529, 22272, 22304, 0, 16384, 20480, 22528, - 22529, 22272, 22304, 22306, 0, 16384, 20480, 22528, - 22529, 22272, 22304, 0, 16384, 20480, 22528, 22529, - 22272, 22304, 22308, 0, 16384, 20480, 22528, 22529, - 22272, 22304, 22308, 0, 16384, 20480, 22528, 22529, - 22272, 22304, 22312, 22310, 0, 16384, 20480, 22528, - 22529, 22272, 22304, 0, 16384, 20480, 22528, 22529, - 22272, 22304, 22312, 0, 16384, 20480, 22528, 22529, - 22272, 22304, 22312, 0, 16384, 20480, 22528, 22529, - 22272, 22304, 22312, 22314, 0, 16384, 20480, 22528, - 22529, 22272, 22304, 22312, 0, 16384, 20480, 22528, - 22529, 22272, 22304, 22320, 22316, 0, 16384, 20480, - 22528, 22529, 22272, 22304, 22320, 22316, 0, 16384, - 20480, 22528, 22529, 22272, 22304, 22320, 22321, 22318, - 0, 16384, 20480, 22528, 22529, 22272, 22304, 0, - 16384, 20480, 22528, 22529, 22272, 22336, 22320, 0, - 16384, 20480, 22528, 22529, 22272, 22336, 22320, 0, - 16384, 20480, 22528, 22529, 22272, 22336, 22320, 22322, - 0, 16384, 20480, 22528, 22529, 22272, 22336, 22320, - 0, 16384, 20480, 22528, 22529, 22272, 22336, 22320, - 22324, 0, 16384, 20480, 22528, 22529, 22272, 22336, - 22320, 22324, 0, 16384, 20480, 22528, 22529, 22272, - 22336, 22320, 22328, 22326, 0, 16384, 20480, 22528, - 22529, 22272, 22336, 22320, 0, 16384, 20480, 22528, - 22529, 22272, 22336, 22337, 22328, 0, 16384, 20480, - 22528, 22529, 22272, 22336, 22337, 22328, 0, 16384, - 20480, 22528, 22529, 22272, 22336, 22337, 22328, 22330, - 0, 16384, 20480, 22528, 22529, 22272, 22336, 22337, - 22328, 0, 16384, 20480, 22528, 22529, 22272, 22336, - 22337, 22328, 22332, 0, 16384, 20480, 22528, 22529, - 22272, 22336, 22337, 22339, 22332, 0, 16384, 20480, - 22528, 22529, 22272, 22336, 22337, 22339, 22332, 22334, - 0, 16384, 20480, 22528, 22529, 22272, 0, 16384, - 20480, 22528, 22529, 22272, 22336, 0, 16384, 20480, - 22528, 22529, 22272, 22336, 0, 16384, 20480, 22528, - 22529, 22272, 22336, 22338, 0, 16384, 20480, 22528, - 22529, 22272, 22336, 0, 16384, 20480, 22528, 22529, - 22272, 22336, 22340, 0, 16384, 20480, 22528, 22529, - 22272, 22336, 22340, 0, 16384, 20480, 22528, 22529, - 22272, 22336, 22344, 22342, 0, 16384, 20480, 22528, - 22529, 22272, 22336, 0, 16384, 20480, 22528, 22529, - 22272, 22336, 22344, 0, 16384, 20480, 22528, 22529, - 22272, 22336, 22344, 0, 16384, 20480, 22528, 22529, - 22272, 22336, 22344, 22346, 0, 16384, 20480, 22528, - 22529, 22272, 22336, 22344, 0, 16384, 20480, 22528, - 22529, 22272, 22336, 22352, 22348, 0, 16384, 20480, - 22528, 22529, 22272, 22336, 22352, 22348, 0, 16384, - 20480, 22528, 22529, 22272, 22336, 22352, 22353, 22350, - 0, 16384, 20480, 22528, 22529, 22272, 22336, 0, - 16384, 20480, 22528, 22529, 22272, 22336, 22352, 0, - 16384, 20480, 22528, 22529, 22272, 22336, 22352, 0, - 16384, 20480, 22528, 22529, 22272, 22336, 22352, 22354, - 0, 16384, 20480, 22528, 22529, 22272, 22336, 22352, - 0, 16384, 20480, 22528, 22529, 22272, 22336, 22352, - 22356, 0, 16384, 20480, 22528, 22529, 22272, 22336, - 22352, 22356, 0, 16384, 20480, 22528, 22529, 22272, - 22336, 22352, 22360, 22358, 0, 16384, 20480, 22528, - 22529, 22272, 22336, 22352, 0, 16384, 20480, 22528, - 22529, 22272, 22336, 22368, 22360, 0, 16384, 20480, - 22528, 22529, 22272, 22336, 22368, 22360, 0, 16384, - 20480, 22528, 22529, 22272, 22336, 22368, 22360, 22362, - 0, 16384, 20480, 22528, 22529, 22272, 22336, 22368, - 22360, 0, 16384, 20480, 22528, 22529, 22272, 22336, - 22368, 22369, 22364, 0, 16384, 20480, 22528, 22529, - 22272, 22336, 22368, 22369, 22364, 0, 16384, 20480, - 22528, 22529, 22272, 22336, 22368, 22369, 22364, 22366, - 0, 16384, 20480, 22528, 22529, 22272, 22336, 0, - 16384, 20480, 22528, 22529, 22272, 22400, 22368, 0, - 16384, 20480, 22528, 22529, 22272, 22400, 22368, 0, - 16384, 20480, 22528, 22529, 22272, 22400, 22368, 22370, - 0, 16384, 20480, 22528, 22529, 22272, 22400, 22368, - 0, 16384, 20480, 22528, 22529, 22272, 22400, 22368, - 22372, 0, 16384, 20480, 22528, 22529, 22272, 22400, - 22368, 22372, 0, 16384, 20480, 22528, 22529, 22272, - 22400, 22368, 22376, 22374, 0, 16384, 20480, 22528, - 22529, 22272, 22400, 22368, 0, 16384, 20480, 22528, - 22529, 22272, 22400, 22368, 22376, 0, 16384, 20480, - 22528, 22529, 22272, 22400, 22368, 22376, 0, 16384, - 20480, 22528, 22529, 22272, 22400, 22368, 22376, 22378, - 0, 16384, 20480, 22528, 22529, 22272, 22400, 22368, - 22376, 0, 16384, 20480, 22528, 22529, 22272, 22400, - 22368, 22384, 22380, 0, 16384, 20480, 22528, 22529, - 22272, 22400, 22368, 22384, 22380, 0, 16384, 20480, - 22528, 22529, 22272, 22400, 22368, 22384, 22385, 22382, - 0, 16384, 20480, 22528, 22529, 22272, 22400, 22368, - 0, 16384, 20480, 22528, 22529, 22272, 22400, 22401, - 22384, 0, 16384, 20480, 22528, 22529, 22272, 22400, - 22401, 22384, 0, 16384, 20480, 22528, 22529, 22272, - 22400, 22401, 22384, 22386, 0, 16384, 20480, 22528, - 22529, 22272, 22400, 22401, 22384, 0, 16384, 20480, - 22528, 22529, 22272, 22400, 22401, 22384, 22388, 0, - 16384, 20480, 22528, 22529, 22272, 22400, 22401, 22384, - 22388, 0, 16384, 20480, 22528, 22529, 22272, 22400, - 22401, 22384, 22392, 22390, 0, 16384, 20480, 22528, - 22529, 22272, 22400, 22401, 22384, 0, 16384, 20480, - 22528, 22529, 22272, 22400, 22401, 22384, 22392, 0, - 16384, 20480, 22528, 22529, 22272, 22400, 22401, 22403, - 22392, 0, 16384, 20480, 22528, 22529, 22272, 22400, - 22401, 22403, 22392, 22394, 0, 16384, 20480, 22528, - 22529, 22272, 22400, 22401, 22403, 22392, 0, 16384, - 20480, 22528, 22529, 22272, 22400, 22401, 22403, 22392, - 22396, 0, 16384, 20480, 22528, 22529, 22272, 22400, - 22401, 22403, 22392, 22396, 0, 16384, 20480, 22528, - 22529, 22272, 22400, 22401, 22403, 22392, 22396, 22398, - 0, 16384, 20480, 22528, 22529, 22272, 0, 16384, - 20480, 22528, 22529, 22272, 22400, 0, 16384, 20480, - 22528, 22529, 22272, 22400, 0, 16384, 20480, 22528, - 22529, 22272, 22400, 22402, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 0, 16384, 20480, 22528, 22529, - 22531, 22400, 22404, 0, 16384, 20480, 22528, 22529, - 22531, 22400, 22404, 0, 16384, 20480, 22528, 22529, - 22531, 22400, 22408, 22406, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 0, 16384, 20480, 22528, 22529, - 22531, 22400, 22408, 0, 16384, 20480, 22528, 22529, - 22531, 22400, 22408, 0, 16384, 20480, 22528, 22529, - 22531, 22400, 22408, 22410, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 22408, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 22416, 22412, 0, 16384, 20480, - 22528, 22529, 22531, 22400, 22416, 22412, 0, 16384, - 20480, 22528, 22529, 22531, 22400, 22416, 22417, 22414, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 0, - 16384, 20480, 22528, 22529, 22531, 22400, 22416, 0, - 16384, 20480, 22528, 22529, 22531, 22400, 22416, 0, - 16384, 20480, 22528, 22529, 22531, 22400, 22416, 22418, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 22416, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 22416, - 22420, 0, 16384, 20480, 22528, 22529, 22531, 22400, - 22416, 22420, 0, 16384, 20480, 22528, 22529, 22531, - 22400, 22416, 22424, 22422, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 22416, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 22432, 22424, 0, 16384, 20480, - 22528, 22529, 22531, 22400, 22432, 22424, 0, 16384, - 20480, 22528, 22529, 22531, 22400, 22432, 22424, 22426, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 22432, - 22424, 0, 16384, 20480, 22528, 22529, 22531, 22400, - 22432, 22433, 22428, 0, 16384, 20480, 22528, 22529, - 22531, 22400, 22432, 22433, 22428, 0, 16384, 20480, - 22528, 22529, 22531, 22400, 22432, 22433, 22428, 22430, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 0, - 16384, 20480, 22528, 22529, 22531, 22400, 22432, 0, - 16384, 20480, 22528, 22529, 22531, 22400, 22432, 0, - 16384, 20480, 22528, 22529, 22531, 22400, 22432, 22434, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 22432, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 22432, - 22436, 0, 16384, 20480, 22528, 22529, 22531, 22400, - 22432, 22436, 0, 16384, 20480, 22528, 22529, 22531, - 22400, 22432, 22440, 22438, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 22432, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 22432, 22440, 0, 16384, 20480, - 22528, 22529, 22531, 22400, 22432, 22440, 0, 16384, - 20480, 22528, 22529, 22531, 22400, 22432, 22440, 22442, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 22432, - 22440, 0, 16384, 20480, 22528, 22529, 22531, 22400, - 22432, 22448, 22444, 0, 16384, 20480, 22528, 22529, - 22531, 22400, 22432, 22448, 22444, 0, 16384, 20480, - 22528, 22529, 22531, 22400, 22432, 22448, 22449, 22446, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 22432, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 22464, - 22448, 0, 16384, 20480, 22528, 22529, 22531, 22400, - 22464, 22448, 0, 16384, 20480, 22528, 22529, 22531, - 22400, 22464, 22448, 22450, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 22464, 22448, 0, 16384, 20480, - 22528, 22529, 22531, 22400, 22464, 22448, 22452, 0, - 16384, 20480, 22528, 22529, 22531, 22400, 22464, 22448, - 22452, 0, 16384, 20480, 22528, 22529, 22531, 22400, - 22464, 22448, 22456, 22454, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 22464, 22448, 0, 16384, 20480, - 22528, 22529, 22531, 22400, 22464, 22465, 22456, 0, - 16384, 20480, 22528, 22529, 22531, 22400, 22464, 22465, - 22456, 0, 16384, 20480, 22528, 22529, 22531, 22400, - 22464, 22465, 22456, 22458, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 22464, 22465, 22456, 0, 16384, - 20480, 22528, 22529, 22531, 22400, 22464, 22465, 22456, - 22460, 0, 16384, 20480, 22528, 22529, 22531, 22400, - 22464, 22465, 22467, 22460, 0, 16384, 20480, 22528, - 22529, 22531, 22400, 22464, 22465, 22467, 22460, 22462, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 0, - 16384, 20480, 22528, 22529, 22531, 22400, 22464, 0, - 16384, 20480, 22528, 22529, 22531, 22400, 22464, 0, - 16384, 20480, 22528, 22529, 22531, 22400, 22464, 22466, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 22464, - 0, 16384, 20480, 22528, 22529, 22531, 22400, 22464, - 22468, 0, 16384, 20480, 22528, 22529, 22531, 22400, - 22464, 22468, 0, 16384, 20480, 22528, 22529, 22531, - 22400, 22464, 22472, 22470, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22464, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22464, 22472, 0, 16384, 20480, - 22528, 22529, 22531, 22535, 22464, 22472, 0, 16384, - 20480, 22528, 22529, 22531, 22535, 22464, 22472, 22474, - 0, 16384, 20480, 22528, 22529, 22531, 22535, 22464, - 22472, 0, 16384, 20480, 22528, 22529, 22531, 22535, - 22464, 22480, 22476, 0, 16384, 20480, 22528, 22529, - 22531, 22535, 22464, 22480, 22476, 0, 16384, 20480, - 22528, 22529, 22531, 22535, 22464, 22480, 22481, 22478, - 0, 16384, 20480, 22528, 22529, 22531, 22535, 22464, - 0, 16384, 20480, 22528, 22529, 22531, 22535, 22464, - 22480, 0, 16384, 20480, 22528, 22529, 22531, 22535, - 22464, 22480, 0, 16384, 20480, 22528, 22529, 22531, - 22535, 22464, 22480, 22482, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22464, 22480, 0, 16384, 20480, - 22528, 22529, 22531, 22535, 22464, 22480, 22484, 0, - 16384, 20480, 22528, 22529, 22531, 22535, 22464, 22480, - 22484, 0, 16384, 20480, 22528, 22529, 22531, 22535, - 22464, 22480, 22488, 22486, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22464, 22480, 0, 16384, 20480, - 22528, 22529, 22531, 22535, 22464, 22496, 22488, 0, - 16384, 20480, 22528, 22529, 22531, 22535, 22464, 22496, - 22488, 0, 16384, 20480, 22528, 22529, 22531, 22535, - 22464, 22496, 22488, 22490, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22464, 22496, 22488, 0, 16384, - 20480, 22528, 22529, 22531, 22535, 22464, 22496, 22497, - 22492, 0, 16384, 20480, 22528, 22529, 22531, 22535, - 22464, 22496, 22497, 22492, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22464, 22496, 22497, 22492, 22494, - 0, 16384, 20480, 22528, 22529, 22531, 22535, 22464, - 0, 16384, 20480, 22528, 22529, 22531, 22535, 22464, - 22496, 0, 16384, 20480, 22528, 22529, 22531, 22535, - 22464, 22496, 0, 16384, 20480, 22528, 22529, 22531, - 22535, 22464, 22496, 22498, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22464, 22496, 0, 16384, 20480, - 22528, 22529, 22531, 22535, 22464, 22496, 22500, 0, - 16384, 20480, 22528, 22529, 22531, 22535, 22464, 22496, - 22500, 0, 16384, 20480, 22528, 22529, 22531, 22535, - 22464, 22496, 22504, 22502, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22464, 22496, 0, 16384, 20480, - 22528, 22529, 22531, 22535, 22464, 22496, 22504, 0, - 16384, 20480, 22528, 22529, 22531, 22535, 22464, 22496, - 22504, 0, 16384, 20480, 22528, 22529, 22531, 22535, - 22464, 22496, 22504, 22506, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22464, 22496, 22504, 0, 16384, - 20480, 22528, 22529, 22531, 22535, 22464, 22496, 22512, - 22508, 0, 16384, 20480, 22528, 22529, 22531, 22535, - 22464, 22496, 22512, 22508, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22464, 22496, 22512, 22513, 22510, - 0, 16384, 20480, 22528, 22529, 22531, 22535, 22543, - 22496, 0, 16384, 20480, 22528, 22529, 22531, 22535, - 22543, 22496, 22512, 0, 16384, 20480, 22528, 22529, - 22531, 22535, 22543, 22496, 22512, 0, 16384, 20480, - 22528, 22529, 22531, 22535, 22543, 22496, 22512, 22514, - 0, 16384, 20480, 22528, 22529, 22531, 22535, 22543, - 22496, 22512, 0, 16384, 20480, 22528, 22529, 22531, - 22535, 22543, 22496, 22512, 22516, 0, 16384, 20480, - 22528, 22529, 22531, 22535, 22543, 22496, 22512, 22516, - 0, 16384, 20480, 22528, 22529, 22531, 22535, 22543, - 22496, 22512, 22520, 22518, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22543, 22496, 22512, 0, 16384, - 20480, 22528, 22529, 22531, 22535, 22543, 22496, 22512, - 22520, 0, 16384, 20480, 22528, 22529, 22531, 22535, - 22543, 22496, 22512, 22520, 0, 16384, 20480, 22528, - 22529, 22531, 22535, 22543, 22496, 22512, 22520, 22522, - 0, 16384, 20480, 22528, 22529, 22531, 22535, 22543, - 22496, 22512, 22520, 0, 16384, 20480, 22528, 22529, - 22531, 22535, 22543, 22496, 22512, 22520, 22524, 0, - 16384, 20480, 22528, 22529, 22531, 22535, 22543, 22496, - 22512, 22520, 22524, 0, 16384, 20480, 22528, 22529, - 22531, 22535, 22543, 22496, 22512, 22520, 22524, 22526, - 0, 16384, 20480, 0, 16384, 20480, 22528, 0, - 16384, 20480, 22528, 0, 16384, 20480, 22528, 22530, - 0, 16384, 20480, 22528, 0, 16384, 20480, 22528, - 22532, 0, 16384, 20480, 22528, 22532, 0, 16384, - 20480, 22528, 22536, 22534, 0, 16384, 20480, 22528, - 0, 16384, 20480, 22528, 22536, 0, 16384, 20480, - 22528, 22536, 0, 16384, 20480, 22528, 22536, 22538, - 0, 16384, 20480, 22528, 22536, 0, 16384, 20480, - 22528, 22544, 22540, 0, 16384, 20480, 22528, 22544, - 22540, 0, 16384, 20480, 22528, 22544, 22545, 22542, - 0, 16384, 20480, 22528, 0, 16384, 20480, 22528, - 22544, 0, 16384, 20480, 22528, 22544, 0, 16384, - 20480, 22528, 22544, 22546, 0, 16384, 20480, 22528, - 22544, 0, 16384, 20480, 22528, 22544, 22548, 0, - 16384, 20480, 22528, 22544, 22548, 0, 16384, 20480, - 22528, 22544, 22552, 22550, 0, 16384, 20480, 22528, - 22544, 0, 16384, 20480, 22528, 22560, 22552, 0, - 16384, 20480, 22528, 22560, 22552, 0, 16384, 20480, - 22528, 22560, 22552, 22554, 0, 16384, 20480, 22528, - 22560, 22552, 0, 16384, 20480, 22528, 22560, 22561, - 22556, 0, 16384, 20480, 22528, 22560, 22561, 22556, - 0, 16384, 20480, 22528, 22560, 22561, 22556, 22558, - 0, 16384, 20480, 22528, 0, 16384, 20480, 22528, - 22560, 0, 16384, 20480, 22528, 22560, 0, 16384, - 20480, 22528, 22560, 22562, 0, 16384, 20480, 22528, - 22560, 0, 16384, 20480, 22528, 22560, 22564, 0, - 16384, 20480, 22528, 22560, 22564, 0, 16384, 20480, - 22528, 22560, 22568, 22566, 0, 16384, 20480, 22528, - 22560, 0, 16384, 20480, 22528, 22560, 22568, 0, - 16384, 20480, 22528, 22560, 22568, 0, 16384, 20480, - 22528, 22560, 22568, 22570, 0, 16384, 20480, 22528, - 22560, 22568, 0, 16384, 20480, 22528, 22560, 22576, - 22572, 0, 16384, 20480, 22528, 22560, 22576, 22572, - 0, 16384, 20480, 22528, 22560, 22576, 22577, 22574, - 0, 16384, 20480, 22528, 22560, 0, 16384, 20480, - 22528, 22592, 22576, 0, 16384, 20480, 22528, 22592, - 22576, 0, 16384, 20480, 22528, 22592, 22576, 22578, - 0, 16384, 20480, 22528, 22592, 22576, 0, 16384, - 20480, 22528, 22592, 22576, 22580, 0, 16384, 20480, - 22528, 22592, 22576, 22580, 0, 16384, 20480, 22528, - 22592, 22576, 22584, 22582, 0, 16384, 20480, 22528, - 22592, 22576, 0, 16384, 20480, 22528, 22592, 22593, - 22584, 0, 16384, 20480, 22528, 22592, 22593, 22584, - 0, 16384, 20480, 22528, 22592, 22593, 22584, 22586, - 0, 16384, 20480, 22528, 22592, 22593, 22584, 0, - 16384, 20480, 22528, 22592, 22593, 22584, 22588, 0, - 16384, 20480, 22528, 22592, 22593, 22595, 22588, 0, - 16384, 20480, 22528, 22592, 22593, 22595, 22588, 22590, - 0, 16384, 20480, 22528, 0, 16384, 20480, 22528, - 22592, 0, 16384, 20480, 22528, 22592, 0, 16384, - 20480, 22528, 22592, 22594, 0, 16384, 20480, 22528, - 22592, 0, 16384, 20480, 22528, 22592, 22596, 0, - 16384, 20480, 22528, 22592, 22596, 0, 16384, 20480, - 22528, 22592, 22600, 22598, 0, 16384, 20480, 22528, - 22592, 0, 16384, 20480, 22528, 22592, 22600, 0, - 16384, 20480, 22528, 22592, 22600, 0, 16384, 20480, - 22528, 22592, 22600, 22602, 0, 16384, 20480, 22528, - 22592, 22600, 0, 16384, 20480, 22528, 22592, 22608, - 22604, 0, 16384, 20480, 22528, 22592, 22608, 22604, - 0, 16384, 20480, 22528, 22592, 22608, 22609, 22606, - 0, 16384, 20480, 22528, 22592, 0, 16384, 20480, - 22528, 22592, 22608, 0, 16384, 20480, 22528, 22592, - 22608, 0, 16384, 20480, 22528, 22592, 22608, 22610, - 0, 16384, 20480, 22528, 22592, 22608, 0, 16384, - 20480, 22528, 22592, 22608, 22612, 0, 16384, 20480, - 22528, 22592, 22608, 22612, 0, 16384, 20480, 22528, - 22592, 22608, 22616, 22614, 0, 16384, 20480, 22528, - 22592, 22608, 0, 16384, 20480, 22528, 22592, 22624, - 22616, 0, 16384, 20480, 22528, 22592, 22624, 22616, - 0, 16384, 20480, 22528, 22592, 22624, 22616, 22618, - 0, 16384, 20480, 22528, 22592, 22624, 22616, 0, - 16384, 20480, 22528, 22592, 22624, 22625, 22620, 0, - 16384, 20480, 22528, 22592, 22624, 22625, 22620, 0, - 16384, 20480, 22528, 22592, 22624, 22625, 22620, 22622, - 0, 16384, 20480, 22528, 22592, 0, 16384, 20480, - 22528, 22656, 22624, 0, 16384, 20480, 22528, 22656, - 22624, 0, 16384, 20480, 22528, 22656, 22624, 22626, - 0, 16384, 20480, 22528, 22656, 22624, 0, 16384, - 20480, 22528, 22656, 22624, 22628, 0, 16384, 20480, - 22528, 22656, 22624, 22628, 0, 16384, 20480, 22528, - 22656, 22624, 22632, 22630, 0, 16384, 20480, 22528, - 22656, 22624, 0, 16384, 20480, 22528, 22656, 22624, - 22632, 0, 16384, 20480, 22528, 22656, 22624, 22632, - 0, 16384, 20480, 22528, 22656, 22624, 22632, 22634, - 0, 16384, 20480, 22528, 22656, 22624, 22632, 0, - 16384, 20480, 22528, 22656, 22624, 22640, 22636, 0, - 16384, 20480, 22528, 22656, 22624, 22640, 22636, 0, - 16384, 20480, 22528, 22656, 22624, 22640, 22641, 22638, - 0, 16384, 20480, 22528, 22656, 22624, 0, 16384, - 20480, 22528, 22656, 22657, 22640, 0, 16384, 20480, - 22528, 22656, 22657, 22640, 0, 16384, 20480, 22528, - 22656, 22657, 22640, 22642, 0, 16384, 20480, 22528, - 22656, 22657, 22640, 0, 16384, 20480, 22528, 22656, - 22657, 22640, 22644, 0, 16384, 20480, 22528, 22656, - 22657, 22640, 22644, 0, 16384, 20480, 22528, 22656, - 22657, 22640, 22648, 22646, 0, 16384, 20480, 22528, - 22656, 22657, 22640, 0, 16384, 20480, 22528, 22656, - 22657, 22640, 22648, 0, 16384, 20480, 22528, 22656, - 22657, 22659, 22648, 0, 16384, 20480, 22528, 22656, - 22657, 22659, 22648, 22650, 0, 16384, 20480, 22528, - 22656, 22657, 22659, 22648, 0, 16384, 20480, 22528, - 22656, 22657, 22659, 22648, 22652, 0, 16384, 20480, - 22528, 22656, 22657, 22659, 22648, 22652, 0, 16384, - 20480, 22528, 22656, 22657, 22659, 22648, 22652, 22654, - 0, 16384, 20480, 22528, 0, 16384, 20480, 22528, - 22656, 0, 16384, 20480, 22528, 22656, 0, 16384, - 20480, 22528, 22656, 22658, 0, 16384, 20480, 22528, - 22656, 0, 16384, 20480, 22528, 22656, 22660, 0, - 16384, 20480, 22528, 22656, 22660, 0, 16384, 20480, - 22528, 22656, 22664, 22662, 0, 16384, 20480, 22528, - 22656, 0, 16384, 20480, 22528, 22656, 22664, 0, - 16384, 20480, 22528, 22656, 22664, 0, 16384, 20480, - 22528, 22656, 22664, 22666, 0, 16384, 20480, 22528, - 22656, 22664, 0, 16384, 20480, 22528, 22656, 22672, - 22668, 0, 16384, 20480, 22528, 22656, 22672, 22668, - 0, 16384, 20480, 22528, 22656, 22672, 22673, 22670, - 0, 16384, 20480, 22528, 22656, 0, 16384, 20480, - 22528, 22656, 22672, 0, 16384, 20480, 22528, 22656, - 22672, 0, 16384, 20480, 22528, 22656, 22672, 22674, - 0, 16384, 20480, 22528, 22656, 22672, 0, 16384, - 20480, 22528, 22656, 22672, 22676, 0, 16384, 20480, - 22528, 22656, 22672, 22676, 0, 16384, 20480, 22528, - 22656, 22672, 22680, 22678, 0, 16384, 20480, 22528, - 22656, 22672, 0, 16384, 20480, 22528, 22656, 22688, - 22680, 0, 16384, 20480, 22528, 22656, 22688, 22680, - 0, 16384, 20480, 22528, 22656, 22688, 22680, 22682, - 0, 16384, 20480, 22528, 22656, 22688, 22680, 0, - 16384, 20480, 22528, 22656, 22688, 22689, 22684, 0, - 16384, 20480, 22528, 22656, 22688, 22689, 22684, 0, - 16384, 20480, 22528, 22656, 22688, 22689, 22684, 22686, - 0, 16384, 20480, 22528, 22656, 0, 16384, 20480, - 22528, 22656, 22688, 0, 16384, 20480, 22528, 22656, - 22688, 0, 16384, 20480, 22528, 22656, 22688, 22690, - 0, 16384, 20480, 22528, 22656, 22688, 0, 16384, - 20480, 22528, 22656, 22688, 22692, 0, 16384, 20480, - 22528, 22656, 22688, 22692, 0, 16384, 20480, 22528, - 22656, 22688, 22696, 22694, 0, 16384, 20480, 22528, - 22656, 22688, 0, 16384, 20480, 22528, 22656, 22688, - 22696, 0, 16384, 20480, 22528, 22656, 22688, 22696, - 0, 16384, 20480, 22528, 22656, 22688, 22696, 22698, - 0, 16384, 20480, 22528, 22656, 22688, 22696, 0, - 16384, 20480, 22528, 22656, 22688, 22704, 22700, 0, - 16384, 20480, 22528, 22656, 22688, 22704, 22700, 0, - 16384, 20480, 22528, 22656, 22688, 22704, 22705, 22702, - 0, 16384, 20480, 22528, 22656, 22688, 0, 16384, - 20480, 22528, 22656, 22720, 22704, 0, 16384, 20480, - 22528, 22656, 22720, 22704, 0, 16384, 20480, 22528, - 22656, 22720, 22704, 22706, 0, 16384, 20480, 22528, - 22656, 22720, 22704, 0, 16384, 20480, 22528, 22656, - 22720, 22704, 22708, 0, 16384, 20480, 22528, 22656, - 22720, 22704, 22708, 0, 16384, 20480, 22528, 22656, - 22720, 22704, 22712, 22710, 0, 16384, 20480, 22528, - 22656, 22720, 22704, 0, 16384, 20480, 22528, 22656, - 22720, 22721, 22712, 0, 16384, 20480, 22528, 22656, - 22720, 22721, 22712, 0, 16384, 20480, 22528, 22656, - 22720, 22721, 22712, 22714, 0, 16384, 20480, 22528, - 22656, 22720, 22721, 22712, 0, 16384, 20480, 22528, - 22656, 22720, 22721, 22712, 22716, 0, 16384, 20480, - 22528, 22656, 22720, 22721, 22723, 22716, 0, 16384, - 20480, 22528, 22656, 22720, 22721, 22723, 22716, 22718, - 0, 16384, 20480, 22528, 22656, 0, 16384, 20480, - 22528, 22784, 22720, 0, 16384, 20480, 22528, 22784, - 22720, 0, 16384, 20480, 22528, 22784, 22720, 22722, - 0, 16384, 20480, 22528, 22784, 22720, 0, 16384, - 20480, 22528, 22784, 22720, 22724, 0, 16384, 20480, - 22528, 22784, 22720, 22724, 0, 16384, 20480, 22528, - 22784, 22720, 22728, 22726, 0, 16384, 20480, 22528, - 22784, 22720, 0, 16384, 20480, 22528, 22784, 22720, - 22728, 0, 16384, 20480, 22528, 22784, 22720, 22728, - 0, 16384, 20480, 22528, 22784, 22720, 22728, 22730, - 0, 16384, 20480, 22528, 22784, 22720, 22728, 0, - 16384, 20480, 22528, 22784, 22720, 22736, 22732, 0, - 16384, 20480, 22528, 22784, 22720, 22736, 22732, 0, - 16384, 20480, 22528, 22784, 22720, 22736, 22737, 22734, - 0, 16384, 20480, 22528, 22784, 22720, 0, 16384, - 20480, 22528, 22784, 22720, 22736, 0, 16384, 20480, - 22528, 22784, 22720, 22736, 0, 16384, 20480, 22528, - 22784, 22720, 22736, 22738, 0, 16384, 20480, 22528, - 22784, 22720, 22736, 0, 16384, 20480, 22528, 22784, - 22720, 22736, 22740, 0, 16384, 20480, 22528, 22784, - 22720, 22736, 22740, 0, 16384, 20480, 22528, 22784, - 22720, 22736, 22744, 22742, 0, 16384, 20480, 22528, - 22784, 22720, 22736, 0, 16384, 20480, 22528, 22784, - 22720, 22752, 22744, 0, 16384, 20480, 22528, 22784, - 22720, 22752, 22744, 0, 16384, 20480, 22528, 22784, - 22720, 22752, 22744, 22746, 0, 16384, 20480, 22528, - 22784, 22720, 22752, 22744, 0, 16384, 20480, 22528, - 22784, 22720, 22752, 22753, 22748, 0, 16384, 20480, - 22528, 22784, 22720, 22752, 22753, 22748, 0, 16384, - 20480, 22528, 22784, 22720, 22752, 22753, 22748, 22750, - 0, 16384, 20480, 22528, 22784, 22720, 0, 16384, - 20480, 22528, 22784, 22785, 22752, 0, 16384, 20480, - 22528, 22784, 22785, 22752, 0, 16384, 20480, 22528, - 22784, 22785, 22752, 22754, 0, 16384, 20480, 22528, - 22784, 22785, 22752, 0, 16384, 20480, 22528, 22784, - 22785, 22752, 22756, 0, 16384, 20480, 22528, 22784, - 22785, 22752, 22756, 0, 16384, 20480, 22528, 22784, - 22785, 22752, 22760, 22758, 0, 16384, 20480, 22528, - 22784, 22785, 22752, 0, 16384, 20480, 22528, 22784, - 22785, 22752, 22760, 0, 16384, 20480, 22528, 22784, - 22785, 22752, 22760, 0, 16384, 20480, 22528, 22784, - 22785, 22752, 22760, 22762, 0, 16384, 20480, 22528, - 22784, 22785, 22752, 22760, 0, 16384, 20480, 22528, - 22784, 22785, 22752, 22768, 22764, 0, 16384, 20480, - 22528, 22784, 22785, 22752, 22768, 22764, 0, 16384, - 20480, 22528, 22784, 22785, 22752, 22768, 22769, 22766, - 0, 16384, 20480, 22528, 22784, 22785, 22752, 0, - 16384, 20480, 22528, 22784, 22785, 22752, 22768, 0, - 16384, 20480, 22528, 22784, 22785, 22787, 22768, 0, - 16384, 20480, 22528, 22784, 22785, 22787, 22768, 22770, - 0, 16384, 20480, 22528, 22784, 22785, 22787, 22768, - 0, 16384, 20480, 22528, 22784, 22785, 22787, 22768, - 22772, 0, 16384, 20480, 22528, 22784, 22785, 22787, - 22768, 22772, 0, 16384, 20480, 22528, 22784, 22785, - 22787, 22768, 22776, 22774, 0, 16384, 20480, 22528, - 22784, 22785, 22787, 22768, 0, 16384, 20480, 22528, - 22784, 22785, 22787, 22768, 22776, 0, 16384, 20480, - 22528, 22784, 22785, 22787, 22768, 22776, 0, 16384, - 20480, 22528, 22784, 22785, 22787, 22768, 22776, 22778, - 0, 16384, 20480, 22528, 22784, 22785, 22787, 22791, - 22776, 0, 16384, 20480, 22528, 22784, 22785, 22787, - 22791, 22776, 22780, 0, 16384, 20480, 22528, 22784, - 22785, 22787, 22791, 22776, 22780, 0, 16384, 20480, - 22528, 22784, 22785, 22787, 22791, 22776, 22780, 22782, - 0, 16384, 20480, 22528, 0, 16384, 20480, 22528, - 22784, 0, 16384, 20480, 22528, 22784, 0, 16384, - 20480, 22528, 22784, 22786, 0, 16384, 20480, 22528, - 22784, 0, 16384, 20480, 22528, 22784, 22788, 0, - 16384, 20480, 22528, 22784, 22788, 0, 16384, 20480, - 22528, 22784, 22792, 22790, 0, 16384, 20480, 22528, - 22784, 0, 16384, 20480, 22528, 22784, 22792, 0, - 16384, 20480, 22528, 22784, 22792, 0, 16384, 20480, - 22528, 22784, 22792, 22794, 0, 16384, 20480, 22528, - 22784, 22792, 0, 16384, 20480, 22528, 22784, 22800, - 22796, 0, 16384, 20480, 22528, 22784, 22800, 22796, - 0, 16384, 20480, 22528, 22784, 22800, 22801, 22798, - 0, 16384, 20480, 22528, 22784, 0, 16384, 20480, - 22528, 22784, 22800, 0, 16384, 20480, 22528, 22784, - 22800, 0, 16384, 20480, 22528, 22784, 22800, 22802, - 0, 16384, 20480, 22528, 22784, 22800, 0, 16384, - 20480, 22528, 22784, 22800, 22804, 0, 16384, 20480, - 22528, 22784, 22800, 22804, 0, 16384, 20480, 22528, - 22784, 22800, 22808, 22806, 0, 16384, 20480, 22528, - 22784, 22800, 0, 16384, 20480, 22528, 22784, 22816, - 22808, 0, 16384, 20480, 22528, 22784, 22816, 22808, - 0, 16384, 20480, 22528, 22784, 22816, 22808, 22810, - 0, 16384, 20480, 22528, 22784, 22816, 22808, 0, - 16384, 20480, 22528, 22784, 22816, 22817, 22812, 0, - 16384, 20480, 22528, 22784, 22816, 22817, 22812, 0, - 16384, 20480, 22528, 22784, 22816, 22817, 22812, 22814, - 0, 16384, 20480, 22528, 22784, 0, 16384, 20480, - 22528, 22784, 22816, 0, 16384, 20480, 22528, 22784, - 22816, 0, 16384, 20480, 22528, 22784, 22816, 22818, - 0, 16384, 20480, 22528, 22784, 22816, 0, 16384, - 20480, 22528, 22784, 22816, 22820, 0, 16384, 20480, - 22528, 22784, 22816, 22820, 0, 16384, 20480, 22528, - 22784, 22816, 22824, 22822, 0, 16384, 20480, 22528, - 22784, 22816, 0, 16384, 20480, 22528, 22784, 22816, - 22824, 0, 16384, 20480, 22528, 22784, 22816, 22824, - 0, 16384, 20480, 22528, 22784, 22816, 22824, 22826, - 0, 16384, 20480, 22528, 22784, 22816, 22824, 0, - 16384, 20480, 22528, 22784, 22816, 22832, 22828, 0, - 16384, 20480, 22528, 22784, 22816, 22832, 22828, 0, - 16384, 20480, 22528, 22784, 22816, 22832, 22833, 22830, - 0, 16384, 20480, 22528, 22784, 22816, 0, 16384, - 20480, 22528, 22784, 22848, 22832, 0, 16384, 20480, - 22528, 22784, 22848, 22832, 0, 16384, 20480, 22528, - 22784, 22848, 22832, 22834, 0, 16384, 20480, 22528, - 22784, 22848, 22832, 0, 16384, 20480, 22528, 22784, - 22848, 22832, 22836, 0, 16384, 20480, 22528, 22784, - 22848, 22832, 22836, 0, 16384, 20480, 22528, 22784, - 22848, 22832, 22840, 22838, 0, 16384, 20480, 22528, - 22784, 22848, 22832, 0, 16384, 20480, 22528, 22784, - 22848, 22849, 22840, 0, 16384, 20480, 22528, 22784, - 22848, 22849, 22840, 0, 16384, 20480, 22528, 22784, - 22848, 22849, 22840, 22842, 0, 16384, 20480, 22528, - 22784, 22848, 22849, 22840, 0, 16384, 20480, 22528, - 22784, 22848, 22849, 22840, 22844, 0, 16384, 20480, - 22528, 22784, 22848, 22849, 22851, 22844, 0, 16384, - 20480, 22528, 22784, 22848, 22849, 22851, 22844, 22846, - 0, 16384, 20480, 22528, 22784, 0, 16384, 20480, - 22528, 22784, 22848, 0, 16384, 20480, 22528, 22784, - 22848, 0, 16384, 20480, 22528, 22784, 22848, 22850, - 0, 16384, 20480, 22528, 22784, 22848, 0, 16384, - 20480, 22528, 22784, 22848, 22852, 0, 16384, 20480, - 22528, 22784, 22848, 22852, 0, 16384, 20480, 22528, - 22784, 22848, 22856, 22854, 0, 16384, 20480, 22528, - 22784, 22848, 0, 16384, 20480, 22528, 22784, 22848, - 22856, 0, 16384, 20480, 22528, 22784, 22848, 22856, - 0, 16384, 20480, 22528, 22784, 22848, 22856, 22858, - 0, 16384, 20480, 22528, 22784, 22848, 22856, 0, - 16384, 20480, 22528, 22784, 22848, 22864, 22860, 0, - 16384, 20480, 22528, 22784, 22848, 22864, 22860, 0, - 16384, 20480, 22528, 22784, 22848, 22864, 22865, 22862, - 0, 16384, 20480, 22528, 22784, 22848, 0, 16384, - 20480, 22528, 22784, 22848, 22864, 0, 16384, 20480, - 22528, 22784, 22848, 22864, 0, 16384, 20480, 22528, - 22784, 22848, 22864, 22866, 0, 16384, 20480, 22528, - 22784, 22848, 22864, 0, 16384, 20480, 22528, 22784, - 22848, 22864, 22868, 0, 16384, 20480, 22528, 22784, - 22848, 22864, 22868, 0, 16384, 20480, 22528, 22784, - 22848, 22864, 22872, 22870, 0, 16384, 20480, 22528, - 22784, 22848, 22864, 0, 16384, 20480, 22528, 22784, - 22848, 22880, 22872, 0, 16384, 20480, 22528, 22784, - 22848, 22880, 22872, 0, 16384, 20480, 22528, 22784, - 22848, 22880, 22872, 22874, 0, 16384, 20480, 22528, - 22784, 22848, 22880, 22872, 0, 16384, 20480, 22528, - 22784, 22848, 22880, 22881, 22876, 0, 16384, 20480, - 22528, 22784, 22848, 22880, 22881, 22876, 0, 16384, - 20480, 22528, 22784, 22848, 22880, 22881, 22876, 22878, - 0, 16384, 20480, 22528, 22784, 22848, 0, 16384, - 20480, 22528, 22784, 22912, 22880, 0, 16384, 20480, - 22528, 22784, 22912, 22880, 0, 16384, 20480, 22528, - 22784, 22912, 22880, 22882, 0, 16384, 20480, 22528, - 22784, 22912, 22880, 0, 16384, 20480, 22528, 22784, - 22912, 22880, 22884, 0, 16384, 20480, 22528, 22784, - 22912, 22880, 22884, 0, 16384, 20480, 22528, 22784, - 22912, 22880, 22888, 22886, 0, 16384, 20480, 22528, - 22784, 22912, 22880, 0, 16384, 20480, 22528, 22784, - 22912, 22880, 22888, 0, 16384, 20480, 22528, 22784, - 22912, 22880, 22888, 0, 16384, 20480, 22528, 22784, - 22912, 22880, 22888, 22890, 0, 16384, 20480, 22528, - 22784, 22912, 22880, 22888, 0, 16384, 20480, 22528, - 22784, 22912, 22880, 22896, 22892, 0, 16384, 20480, - 22528, 22784, 22912, 22880, 22896, 22892, 0, 16384, - 20480, 22528, 22784, 22912, 22880, 22896, 22897, 22894, - 0, 16384, 20480, 22528, 22784, 22912, 22880, 0, - 16384, 20480, 22528, 22784, 22912, 22913, 22896, 0, - 16384, 20480, 22528, 22784, 22912, 22913, 22896, 0, - 16384, 20480, 22528, 22784, 22912, 22913, 22896, 22898, - 0, 16384, 20480, 22528, 22784, 22912, 22913, 22896, - 0, 16384, 20480, 22528, 22784, 22912, 22913, 22896, - 22900, 0, 16384, 20480, 22528, 22784, 22912, 22913, - 22896, 22900, 0, 16384, 20480, 22528, 22784, 22912, - 22913, 22896, 22904, 22902, 0, 16384, 20480, 22528, - 22784, 22912, 22913, 22896, 0, 16384, 20480, 22528, - 22784, 22912, 22913, 22896, 22904, 0, 16384, 20480, - 22528, 22784, 22912, 22913, 22915, 22904, 0, 16384, - 20480, 22528, 22784, 22912, 22913, 22915, 22904, 22906, - 0, 16384, 20480, 22528, 22784, 22912, 22913, 22915, - 22904, 0, 16384, 20480, 22528, 22784, 22912, 22913, - 22915, 22904, 22908, 0, 16384, 20480, 22528, 22784, - 22912, 22913, 22915, 22904, 22908, 0, 16384, 20480, - 22528, 22784, 22912, 22913, 22915, 22904, 22908, 22910, - 0, 16384, 20480, 22528, 22784, 0, 16384, 20480, - 22528, 23040, 22912, 0, 16384, 20480, 22528, 23040, - 22912, 0, 16384, 20480, 22528, 23040, 22912, 22914, - 0, 16384, 20480, 22528, 23040, 22912, 0, 16384, - 20480, 22528, 23040, 22912, 22916, 0, 16384, 20480, - 22528, 23040, 22912, 22916, 0, 16384, 20480, 22528, - 23040, 22912, 22920, 22918, 0, 16384, 20480, 22528, - 23040, 22912, 0, 16384, 20480, 22528, 23040, 22912, - 22920, 0, 16384, 20480, 22528, 23040, 22912, 22920, - 0, 16384, 20480, 22528, 23040, 22912, 22920, 22922, - 0, 16384, 20480, 22528, 23040, 22912, 22920, 0, - 16384, 20480, 22528, 23040, 22912, 22928, 22924, 0, - 16384, 20480, 22528, 23040, 22912, 22928, 22924, 0, - 16384, 20480, 22528, 23040, 22912, 22928, 22929, 22926, - 0, 16384, 20480, 22528, 23040, 22912, 0, 16384, - 20480, 22528, 23040, 22912, 22928, 0, 16384, 20480, - 22528, 23040, 22912, 22928, 0, 16384, 20480, 22528, - 23040, 22912, 22928, 22930, 0, 16384, 20480, 22528, - 23040, 22912, 22928, 0, 16384, 20480, 22528, 23040, - 22912, 22928, 22932, 0, 16384, 20480, 22528, 23040, - 22912, 22928, 22932, 0, 16384, 20480, 22528, 23040, - 22912, 22928, 22936, 22934, 0, 16384, 20480, 22528, - 23040, 22912, 22928, 0, 16384, 20480, 22528, 23040, - 22912, 22944, 22936, 0, 16384, 20480, 22528, 23040, - 22912, 22944, 22936, 0, 16384, 20480, 22528, 23040, - 22912, 22944, 22936, 22938, 0, 16384, 20480, 22528, - 23040, 22912, 22944, 22936, 0, 16384, 20480, 22528, - 23040, 22912, 22944, 22945, 22940, 0, 16384, 20480, - 22528, 23040, 22912, 22944, 22945, 22940, 0, 16384, - 20480, 22528, 23040, 22912, 22944, 22945, 22940, 22942, - 0, 16384, 20480, 22528, 23040, 22912, 0, 16384, - 20480, 22528, 23040, 22912, 22944, 0, 16384, 20480, - 22528, 23040, 22912, 22944, 0, 16384, 20480, 22528, - 23040, 22912, 22944, 22946, 0, 16384, 20480, 22528, - 23040, 22912, 22944, 0, 16384, 20480, 22528, 23040, - 22912, 22944, 22948, 0, 16384, 20480, 22528, 23040, - 22912, 22944, 22948, 0, 16384, 20480, 22528, 23040, - 22912, 22944, 22952, 22950, 0, 16384, 20480, 22528, - 23040, 22912, 22944, 0, 16384, 20480, 22528, 23040, - 22912, 22944, 22952, 0, 16384, 20480, 22528, 23040, - 22912, 22944, 22952, 0, 16384, 20480, 22528, 23040, - 22912, 22944, 22952, 22954, 0, 16384, 20480, 22528, - 23040, 22912, 22944, 22952, 0, 16384, 20480, 22528, - 23040, 22912, 22944, 22960, 22956, 0, 16384, 20480, - 22528, 23040, 22912, 22944, 22960, 22956, 0, 16384, - 20480, 22528, 23040, 22912, 22944, 22960, 22961, 22958, - 0, 16384, 20480, 22528, 23040, 22912, 22944, 0, - 16384, 20480, 22528, 23040, 22912, 22976, 22960, 0, - 16384, 20480, 22528, 23040, 22912, 22976, 22960, 0, - 16384, 20480, 22528, 23040, 22912, 22976, 22960, 22962, - 0, 16384, 20480, 22528, 23040, 22912, 22976, 22960, - 0, 16384, 20480, 22528, 23040, 22912, 22976, 22960, - 22964, 0, 16384, 20480, 22528, 23040, 22912, 22976, - 22960, 22964, 0, 16384, 20480, 22528, 23040, 22912, - 22976, 22960, 22968, 22966, 0, 16384, 20480, 22528, - 23040, 22912, 22976, 22960, 0, 16384, 20480, 22528, - 23040, 22912, 22976, 22977, 22968, 0, 16384, 20480, - 22528, 23040, 22912, 22976, 22977, 22968, 0, 16384, - 20480, 22528, 23040, 22912, 22976, 22977, 22968, 22970, - 0, 16384, 20480, 22528, 23040, 22912, 22976, 22977, - 22968, 0, 16384, 20480, 22528, 23040, 22912, 22976, - 22977, 22968, 22972, 0, 16384, 20480, 22528, 23040, - 22912, 22976, 22977, 22979, 22972, 0, 16384, 20480, - 22528, 23040, 22912, 22976, 22977, 22979, 22972, 22974, - 0, 16384, 20480, 22528, 23040, 22912, 0, 16384, - 20480, 22528, 23040, 23041, 22976, 0, 16384, 20480, - 22528, 23040, 23041, 22976, 0, 16384, 20480, 22528, - 23040, 23041, 22976, 22978, 0, 16384, 20480, 22528, - 23040, 23041, 22976, 0, 16384, 20480, 22528, 23040, - 23041, 22976, 22980, 0, 16384, 20480, 22528, 23040, - 23041, 22976, 22980, 0, 16384, 20480, 22528, 23040, - 23041, 22976, 22984, 22982, 0, 16384, 20480, 22528, - 23040, 23041, 22976, 0, 16384, 20480, 22528, 23040, - 23041, 22976, 22984, 0, 16384, 20480, 22528, 23040, - 23041, 22976, 22984, 0, 16384, 20480, 22528, 23040, - 23041, 22976, 22984, 22986, 0, 16384, 20480, 22528, - 23040, 23041, 22976, 22984, 0, 16384, 20480, 22528, - 23040, 23041, 22976, 22992, 22988, 0, 16384, 20480, - 22528, 23040, 23041, 22976, 22992, 22988, 0, 16384, - 20480, 22528, 23040, 23041, 22976, 22992, 22993, 22990, - 0, 16384, 20480, 22528, 23040, 23041, 22976, 0, - 16384, 20480, 22528, 23040, 23041, 22976, 22992, 0, - 16384, 20480, 22528, 23040, 23041, 22976, 22992, 0, - 16384, 20480, 22528, 23040, 23041, 22976, 22992, 22994, - 0, 16384, 20480, 22528, 23040, 23041, 22976, 22992, - 0, 16384, 20480, 22528, 23040, 23041, 22976, 22992, - 22996, 0, 16384, 20480, 22528, 23040, 23041, 22976, - 22992, 22996, 0, 16384, 20480, 22528, 23040, 23041, - 22976, 22992, 23000, 22998, 0, 16384, 20480, 22528, - 23040, 23041, 22976, 22992, 0, 16384, 20480, 22528, - 23040, 23041, 22976, 23008, 23000, 0, 16384, 20480, - 22528, 23040, 23041, 22976, 23008, 23000, 0, 16384, - 20480, 22528, 23040, 23041, 22976, 23008, 23000, 23002, - 0, 16384, 20480, 22528, 23040, 23041, 22976, 23008, - 23000, 0, 16384, 20480, 22528, 23040, 23041, 22976, - 23008, 23009, 23004, 0, 16384, 20480, 22528, 23040, - 23041, 22976, 23008, 23009, 23004, 0, 16384, 20480, - 22528, 23040, 23041, 22976, 23008, 23009, 23004, 23006, - 0, 16384, 20480, 22528, 23040, 23041, 22976, 0, - 16384, 20480, 22528, 23040, 23041, 22976, 23008, 0, - 16384, 20480, 22528, 23040, 23041, 23043, 23008, 0, - 16384, 20480, 22528, 23040, 23041, 23043, 23008, 23010, - 0, 16384, 20480, 22528, 23040, 23041, 23043, 23008, - 0, 16384, 20480, 22528, 23040, 23041, 23043, 23008, - 23012, 0, 16384, 20480, 22528, 23040, 23041, 23043, - 23008, 23012, 0, 16384, 20480, 22528, 23040, 23041, - 23043, 23008, 23016, 23014, 0, 16384, 20480, 22528, - 23040, 23041, 23043, 23008, 0, 16384, 20480, 22528, - 23040, 23041, 23043, 23008, 23016, 0, 16384, 20480, - 22528, 23040, 23041, 23043, 23008, 23016, 0, 16384, - 20480, 22528, 23040, 23041, 23043, 23008, 23016, 23018, - 0, 16384, 20480, 22528, 23040, 23041, 23043, 23008, - 23016, 0, 16384, 20480, 22528, 23040, 23041, 23043, - 23008, 23024, 23020, 0, 16384, 20480, 22528, 23040, - 23041, 23043, 23008, 23024, 23020, 0, 16384, 20480, - 22528, 23040, 23041, 23043, 23008, 23024, 23025, 23022, - 0, 16384, 20480, 22528, 23040, 23041, 23043, 23008, - 0, 16384, 20480, 22528, 23040, 23041, 23043, 23008, - 23024, 0, 16384, 20480, 22528, 23040, 23041, 23043, - 23008, 23024, 0, 16384, 20480, 22528, 23040, 23041, - 23043, 23008, 23024, 23026, 0, 16384, 20480, 22528, - 23040, 23041, 23043, 23047, 23024, 0, 16384, 20480, - 22528, 23040, 23041, 23043, 23047, 23024, 23028, 0, - 16384, 20480, 22528, 23040, 23041, 23043, 23047, 23024, - 23028, 0, 16384, 20480, 22528, 23040, 23041, 23043, - 23047, 23024, 23032, 23030, 0, 16384, 20480, 22528, - 23040, 23041, 23043, 23047, 23024, 0, 16384, 20480, - 22528, 23040, 23041, 23043, 23047, 23024, 23032, 0, - 16384, 20480, 22528, 23040, 23041, 23043, 23047, 23024, - 23032, 0, 16384, 20480, 22528, 23040, 23041, 23043, - 23047, 23024, 23032, 23034, 0, 16384, 20480, 22528, - 23040, 23041, 23043, 23047, 23024, 23032, 0, 16384, - 20480, 22528, 23040, 23041, 23043, 23047, 23024, 23032, - 23036, 0, 16384, 20480, 22528, 23040, 23041, 23043, - 23047, 23024, 23032, 23036, 0, 16384, 20480, 22528, - 23040, 23041, 23043, 23047, 23024, 23032, 23036, 23038, - 0, 16384, 20480, 22528, 0, 16384, 20480, 22528, - 23040, 0, 16384, 20480, 22528, 23040, 0, 16384, - 20480, 22528, 23040, 23042, 0, 16384, 20480, 22528, - 23040, 0, 16384, 20480, 22528, 23040, 23044, 0, - 16384, 20480, 22528, 23040, 23044, 0, 16384, 20480, - 22528, 23040, 23048, 23046, 0, 16384, 20480, 22528, - 23040, 0, 16384, 20480, 22528, 23040, 23048, 0, - 16384, 20480, 22528, 23040, 23048, 0, 16384, 20480, - 22528, 23040, 23048, 23050, 0, 16384, 20480, 22528, - 23040, 23048, 0, 16384, 20480, 22528, 23040, 23056, - 23052, 0, 16384, 20480, 22528, 23040, 23056, 23052, - 0, 16384, 20480, 22528, 23040, 23056, 23057, 23054, - 0, 16384, 20480, 22528, 23040, 0, 16384, 20480, - 22528, 23040, 23056, 0, 16384, 20480, 22528, 23040, - 23056, 0, 16384, 20480, 22528, 23040, 23056, 23058, - 0, 16384, 20480, 22528, 23040, 23056, 0, 16384, - 20480, 22528, 23040, 23056, 23060, 0, 16384, 20480, - 22528, 23040, 23056, 23060, 0, 16384, 20480, 22528, - 23040, 23056, 23064, 23062, 0, 16384, 20480, 22528, - 23040, 23056, 0, 16384, 20480, 22528, 23040, 23072, - 23064, 0, 16384, 20480, 22528, 23040, 23072, 23064, - 0, 16384, 20480, 22528, 23040, 23072, 23064, 23066, - 0, 16384, 20480, 22528, 23040, 23072, 23064, 0, - 16384, 20480, 22528, 23040, 23072, 23073, 23068, 0, - 16384, 20480, 22528, 23040, 23072, 23073, 23068, 0, - 16384, 20480, 22528, 23040, 23072, 23073, 23068, 23070, - 0, 16384, 20480, 22528, 23040, 0, 16384, 20480, - 22528, 23040, 23072, 0, 16384, 20480, 22528, 23040, - 23072, 0, 16384, 20480, 22528, 23040, 23072, 23074, - 0, 16384, 20480, 22528, 23040, 23072, 0, 16384, - 20480, 22528, 23040, 23072, 23076, 0, 16384, 20480, - 22528, 23040, 23072, 23076, 0, 16384, 20480, 22528, - 23040, 23072, 23080, 23078, 0, 16384, 20480, 22528, - 23040, 23072, 0, 16384, 20480, 22528, 23040, 23072, - 23080, 0, 16384, 20480, 22528, 23040, 23072, 23080, - 0, 16384, 20480, 22528, 23040, 23072, 23080, 23082, - 0, 16384, 20480, 22528, 23040, 23072, 23080, 0, - 16384, 20480, 22528, 23040, 23072, 23088, 23084, 0, - 16384, 20480, 22528, 23040, 23072, 23088, 23084, 0, - 16384, 20480, 22528, 23040, 23072, 23088, 23089, 23086, - 0, 16384, 20480, 22528, 23040, 23072, 0, 16384, - 20480, 22528, 23040, 23104, 23088, 0, 16384, 20480, - 22528, 23040, 23104, 23088, 0, 16384, 20480, 22528, - 23040, 23104, 23088, 23090, 0, 16384, 20480, 22528, - 23040, 23104, 23088, 0, 16384, 20480, 22528, 23040, - 23104, 23088, 23092, 0, 16384, 20480, 22528, 23040, - 23104, 23088, 23092, 0, 16384, 20480, 22528, 23040, - 23104, 23088, 23096, 23094, 0, 16384, 20480, 22528, - 23040, 23104, 23088, 0, 16384, 20480, 22528, 23040, - 23104, 23105, 23096, 0, 16384, 20480, 22528, 23040, - 23104, 23105, 23096, 0, 16384, 20480, 22528, 23040, - 23104, 23105, 23096, 23098, 0, 16384, 20480, 22528, - 23040, 23104, 23105, 23096, 0, 16384, 20480, 22528, - 23040, 23104, 23105, 23096, 23100, 0, 16384, 20480, - 22528, 23040, 23104, 23105, 23107, 23100, 0, 16384, - 20480, 22528, 23040, 23104, 23105, 23107, 23100, 23102, - 0, 16384, 20480, 22528, 23040, 0, 16384, 20480, - 22528, 23040, 23104, 0, 16384, 20480, 22528, 23040, - 23104, 0, 16384, 20480, 22528, 23040, 23104, 23106, - 0, 16384, 20480, 22528, 23040, 23104, 0, 16384, - 20480, 22528, 23040, 23104, 23108, 0, 16384, 20480, - 22528, 23040, 23104, 23108, 0, 16384, 20480, 22528, - 23040, 23104, 23112, 23110, 0, 16384, 20480, 22528, - 23040, 23104, 0, 16384, 20480, 22528, 23040, 23104, - 23112, 0, 16384, 20480, 22528, 23040, 23104, 23112, - 0, 16384, 20480, 22528, 23040, 23104, 23112, 23114, - 0, 16384, 20480, 22528, 23040, 23104, 23112, 0, - 16384, 20480, 22528, 23040, 23104, 23120, 23116, 0, - 16384, 20480, 22528, 23040, 23104, 23120, 23116, 0, - 16384, 20480, 22528, 23040, 23104, 23120, 23121, 23118, - 0, 16384, 20480, 22528, 23040, 23104, 0, 16384, - 20480, 22528, 23040, 23104, 23120, 0, 16384, 20480, - 22528, 23040, 23104, 23120, 0, 16384, 20480, 22528, - 23040, 23104, 23120, 23122, 0, 16384, 20480, 22528, - 23040, 23104, 23120, 0, 16384, 20480, 22528, 23040, - 23104, 23120, 23124, 0, 16384, 20480, 22528, 23040, - 23104, 23120, 23124, 0, 16384, 20480, 22528, 23040, - 23104, 23120, 23128, 23126, 0, 16384, 20480, 22528, - 23040, 23104, 23120, 0, 16384, 20480, 22528, 23040, - 23104, 23136, 23128, 0, 16384, 20480, 22528, 23040, - 23104, 23136, 23128, 0, 16384, 20480, 22528, 23040, - 23104, 23136, 23128, 23130, 0, 16384, 20480, 22528, - 23040, 23104, 23136, 23128, 0, 16384, 20480, 22528, - 23040, 23104, 23136, 23137, 23132, 0, 16384, 20480, - 22528, 23040, 23104, 23136, 23137, 23132, 0, 16384, - 20480, 22528, 23040, 23104, 23136, 23137, 23132, 23134, - 0, 16384, 20480, 22528, 23040, 23104, 0, 16384, - 20480, 22528, 23040, 23168, 23136, 0, 16384, 20480, - 22528, 23040, 23168, 23136, 0, 16384, 20480, 22528, - 23040, 23168, 23136, 23138, 0, 16384, 20480, 22528, - 23040, 23168, 23136, 0, 16384, 20480, 22528, 23040, - 23168, 23136, 23140, 0, 16384, 20480, 22528, 23040, - 23168, 23136, 23140, 0, 16384, 20480, 22528, 23040, - 23168, 23136, 23144, 23142, 0, 16384, 20480, 22528, - 23040, 23168, 23136, 0, 16384, 20480, 22528, 23040, - 23168, 23136, 23144, 0, 16384, 20480, 22528, 23040, - 23168, 23136, 23144, 0, 16384, 20480, 22528, 23040, - 23168, 23136, 23144, 23146, 0, 16384, 20480, 22528, - 23040, 23168, 23136, 23144, 0, 16384, 20480, 22528, - 23040, 23168, 23136, 23152, 23148, 0, 16384, 20480, - 22528, 23040, 23168, 23136, 23152, 23148, 0, 16384, - 20480, 22528, 23040, 23168, 23136, 23152, 23153, 23150, - 0, 16384, 20480, 22528, 23040, 23168, 23136, 0, - 16384, 20480, 22528, 23040, 23168, 23169, 23152, 0, - 16384, 20480, 22528, 23040, 23168, 23169, 23152, 0, - 16384, 20480, 22528, 23040, 23168, 23169, 23152, 23154, - 0, 16384, 20480, 22528, 23040, 23168, 23169, 23152, - 0, 16384, 20480, 22528, 23040, 23168, 23169, 23152, - 23156, 0, 16384, 20480, 22528, 23040, 23168, 23169, - 23152, 23156, 0, 16384, 20480, 22528, 23040, 23168, - 23169, 23152, 23160, 23158, 0, 16384, 20480, 22528, - 23040, 23168, 23169, 23152, 0, 16384, 20480, 22528, - 23040, 23168, 23169, 23152, 23160, 0, 16384, 20480, - 22528, 23040, 23168, 23169, 23171, 23160, 0, 16384, - 20480, 22528, 23040, 23168, 23169, 23171, 23160, 23162, - 0, 16384, 20480, 22528, 23040, 23168, 23169, 23171, - 23160, 0, 16384, 20480, 22528, 23040, 23168, 23169, - 23171, 23160, 23164, 0, 16384, 20480, 22528, 23040, - 23168, 23169, 23171, 23160, 23164, 0, 16384, 20480, - 22528, 23040, 23168, 23169, 23171, 23160, 23164, 23166, - 0, 16384, 20480, 22528, 23040, 0, 16384, 20480, - 22528, 23040, 23168, 0, 16384, 20480, 22528, 23040, - 23168, 0, 16384, 20480, 22528, 23040, 23168, 23170, - 0, 16384, 20480, 22528, 23040, 23168, 0, 16384, - 20480, 22528, 23040, 23168, 23172, 0, 16384, 20480, - 22528, 23040, 23168, 23172, 0, 16384, 20480, 22528, - 23040, 23168, 23176, 23174, 0, 16384, 20480, 22528, - 23040, 23168, 0, 16384, 20480, 22528, 23040, 23168, - 23176, 0, 16384, 20480, 22528, 23040, 23168, 23176, - 0, 16384, 20480, 22528, 23040, 23168, 23176, 23178, - 0, 16384, 20480, 22528, 23040, 23168, 23176, 0, - 16384, 20480, 22528, 23040, 23168, 23184, 23180, 0, - 16384, 20480, 22528, 23040, 23168, 23184, 23180, 0, - 16384, 20480, 22528, 23040, 23168, 23184, 23185, 23182, - 0, 16384, 20480, 22528, 23040, 23168, 0, 16384, - 20480, 22528, 23040, 23168, 23184, 0, 16384, 20480, - 22528, 23040, 23168, 23184, 0, 16384, 20480, 22528, - 23040, 23168, 23184, 23186, 0, 16384, 20480, 22528, - 23040, 23168, 23184, 0, 16384, 20480, 22528, 23040, - 23168, 23184, 23188, 0, 16384, 20480, 22528, 23040, - 23168, 23184, 23188, 0, 16384, 20480, 22528, 23040, - 23168, 23184, 23192, 23190, 0, 16384, 20480, 22528, - 23040, 23168, 23184, 0, 16384, 20480, 22528, 23040, - 23168, 23200, 23192, 0, 16384, 20480, 22528, 23040, - 23168, 23200, 23192, 0, 16384, 20480, 22528, 23040, - 23168, 23200, 23192, 23194, 0, 16384, 20480, 22528, - 23040, 23168, 23200, 23192, 0, 16384, 20480, 22528, - 23040, 23168, 23200, 23201, 23196, 0, 16384, 20480, - 22528, 23040, 23168, 23200, 23201, 23196, 0, 16384, - 20480, 22528, 23040, 23168, 23200, 23201, 23196, 23198, - 0, 16384, 20480, 22528, 23040, 23168, 0, 16384, - 20480, 22528, 23040, 23168, 23200, 0, 16384, 20480, - 22528, 23040, 23168, 23200, 0, 16384, 20480, 22528, - 23040, 23168, 23200, 23202, 0, 16384, 20480, 22528, - 23040, 23168, 23200, 0, 16384, 20480, 22528, 23040, - 23168, 23200, 23204, 0, 16384, 20480, 22528, 23040, - 23168, 23200, 23204, 0, 16384, 20480, 22528, 23040, - 23168, 23200, 23208, 23206, 0, 16384, 20480, 22528, - 23040, 23168, 23200, 0, 16384, 20480, 22528, 23040, - 23168, 23200, 23208, 0, 16384, 20480, 22528, 23040, - 23168, 23200, 23208, 0, 16384, 20480, 22528, 23040, - 23168, 23200, 23208, 23210, 0, 16384, 20480, 22528, - 23040, 23168, 23200, 23208, 0, 16384, 20480, 22528, - 23040, 23168, 23200, 23216, 23212, 0, 16384, 20480, - 22528, 23040, 23168, 23200, 23216, 23212, 0, 16384, - 20480, 22528, 23040, 23168, 23200, 23216, 23217, 23214, - 0, 16384, 20480, 22528, 23040, 23168, 23200, 0, - 16384, 20480, 22528, 23040, 23168, 23232, 23216, 0, - 16384, 20480, 22528, 23040, 23168, 23232, 23216, 0, - 16384, 20480, 22528, 23040, 23168, 23232, 23216, 23218, - 0, 16384, 20480, 22528, 23040, 23168, 23232, 23216, - 0, 16384, 20480, 22528, 23040, 23168, 23232, 23216, - 23220, 0, 16384, 20480, 22528, 23040, 23168, 23232, - 23216, 23220, 0, 16384, 20480, 22528, 23040, 23168, - 23232, 23216, 23224, 23222, 0, 16384, 20480, 22528, - 23040, 23168, 23232, 23216, 0, 16384, 20480, 22528, - 23040, 23168, 23232, 23233, 23224, 0, 16384, 20480, - 22528, 23040, 23168, 23232, 23233, 23224, 0, 16384, - 20480, 22528, 23040, 23168, 23232, 23233, 23224, 23226, - 0, 16384, 20480, 22528, 23040, 23168, 23232, 23233, - 23224, 0, 16384, 20480, 22528, 23040, 23168, 23232, - 23233, 23224, 23228, 0, 16384, 20480, 22528, 23040, - 23168, 23232, 23233, 23235, 23228, 0, 16384, 20480, - 22528, 23040, 23168, 23232, 23233, 23235, 23228, 23230, - 0, 16384, 20480, 22528, 23040, 23168, 0, 16384, - 20480, 22528, 23040, 23296, 23232, 0, 16384, 20480, - 22528, 23040, 23296, 23232, 0, 16384, 20480, 22528, - 23040, 23296, 23232, 23234, 0, 16384, 20480, 22528, - 23040, 23296, 23232, 0, 16384, 20480, 22528, 23040, - 23296, 23232, 23236, 0, 16384, 20480, 22528, 23040, - 23296, 23232, 23236, 0, 16384, 20480, 22528, 23040, - 23296, 23232, 23240, 23238, 0, 16384, 20480, 22528, - 23040, 23296, 23232, 0, 16384, 20480, 22528, 23040, - 23296, 23232, 23240, 0, 16384, 20480, 22528, 23040, - 23296, 23232, 23240, 0, 16384, 20480, 22528, 23040, - 23296, 23232, 23240, 23242, 0, 16384, 20480, 22528, - 23040, 23296, 23232, 23240, 0, 16384, 20480, 22528, - 23040, 23296, 23232, 23248, 23244, 0, 16384, 20480, - 22528, 23040, 23296, 23232, 23248, 23244, 0, 16384, - 20480, 22528, 23040, 23296, 23232, 23248, 23249, 23246, - 0, 16384, 20480, 22528, 23040, 23296, 23232, 0, - 16384, 20480, 22528, 23040, 23296, 23232, 23248, 0, - 16384, 20480, 22528, 23040, 23296, 23232, 23248, 0, - 16384, 20480, 22528, 23040, 23296, 23232, 23248, 23250, - 0, 16384, 20480, 22528, 23040, 23296, 23232, 23248, - 0, 16384, 20480, 22528, 23040, 23296, 23232, 23248, - 23252, 0, 16384, 20480, 22528, 23040, 23296, 23232, - 23248, 23252, 0, 16384, 20480, 22528, 23040, 23296, - 23232, 23248, 23256, 23254, 0, 16384, 20480, 22528, - 23040, 23296, 23232, 23248, 0, 16384, 20480, 22528, - 23040, 23296, 23232, 23264, 23256, 0, 16384, 20480, - 22528, 23040, 23296, 23232, 23264, 23256, 0, 16384, - 20480, 22528, 23040, 23296, 23232, 23264, 23256, 23258, - 0, 16384, 20480, 22528, 23040, 23296, 23232, 23264, - 23256, 0, 16384, 20480, 22528, 23040, 23296, 23232, - 23264, 23265, 23260, 0, 16384, 20480, 22528, 23040, - 23296, 23232, 23264, 23265, 23260, 0, 16384, 20480, - 22528, 23040, 23296, 23232, 23264, 23265, 23260, 23262, - 0, 16384, 20480, 22528, 23040, 23296, 23232, 0, - 16384, 20480, 22528, 23040, 23296, 23297, 23264, 0, - 16384, 20480, 22528, 23040, 23296, 23297, 23264, 0, - 16384, 20480, 22528, 23040, 23296, 23297, 23264, 23266, - 0, 16384, 20480, 22528, 23040, 23296, 23297, 23264, - 0, 16384, 20480, 22528, 23040, 23296, 23297, 23264, - 23268, 0, 16384, 20480, 22528, 23040, 23296, 23297, - 23264, 23268, 0, 16384, 20480, 22528, 23040, 23296, - 23297, 23264, 23272, 23270, 0, 16384, 20480, 22528, - 23040, 23296, 23297, 23264, 0, 16384, 20480, 22528, - 23040, 23296, 23297, 23264, 23272, 0, 16384, 20480, - 22528, 23040, 23296, 23297, 23264, 23272, 0, 16384, - 20480, 22528, 23040, 23296, 23297, 23264, 23272, 23274, - 0, 16384, 20480, 22528, 23040, 23296, 23297, 23264, - 23272, 0, 16384, 20480, 22528, 23040, 23296, 23297, - 23264, 23280, 23276, 0, 16384, 20480, 22528, 23040, - 23296, 23297, 23264, 23280, 23276, 0, 16384, 20480, - 22528, 23040, 23296, 23297, 23264, 23280, 23281, 23278, - 0, 16384, 20480, 22528, 23040, 23296, 23297, 23264, - 0, 16384, 20480, 22528, 23040, 23296, 23297, 23264, - 23280, 0, 16384, 20480, 22528, 23040, 23296, 23297, - 23299, 23280, 0, 16384, 20480, 22528, 23040, 23296, - 23297, 23299, 23280, 23282, 0, 16384, 20480, 22528, - 23040, 23296, 23297, 23299, 23280, 0, 16384, 20480, - 22528, 23040, 23296, 23297, 23299, 23280, 23284, 0, - 16384, 20480, 22528, 23040, 23296, 23297, 23299, 23280, - 23284, 0, 16384, 20480, 22528, 23040, 23296, 23297, - 23299, 23280, 23288, 23286, 0, 16384, 20480, 22528, - 23040, 23296, 23297, 23299, 23280, 0, 16384, 20480, - 22528, 23040, 23296, 23297, 23299, 23280, 23288, 0, - 16384, 20480, 22528, 23040, 23296, 23297, 23299, 23280, - 23288, 0, 16384, 20480, 22528, 23040, 23296, 23297, - 23299, 23280, 23288, 23290, 0, 16384, 20480, 22528, - 23040, 23296, 23297, 23299, 23303, 23288, 0, 16384, - 20480, 22528, 23040, 23296, 23297, 23299, 23303, 23288, - 23292, 0, 16384, 20480, 22528, 23040, 23296, 23297, - 23299, 23303, 23288, 23292, 0, 16384, 20480, 22528, - 23040, 23296, 23297, 23299, 23303, 23288, 23292, 23294, - 0, 16384, 20480, 22528, 23040, 0, 16384, 20480, - 22528, 23552, 23296, 0, 16384, 20480, 22528, 23552, - 23296, 0, 16384, 20480, 22528, 23552, 23296, 23298, - 0, 16384, 20480, 22528, 23552, 23296, 0, 16384, - 20480, 22528, 23552, 23296, 23300, 0, 16384, 20480, - 22528, 23552, 23296, 23300, 0, 16384, 20480, 22528, - 23552, 23296, 23304, 23302, 0, 16384, 20480, 22528, - 23552, 23296, 0, 16384, 20480, 22528, 23552, 23296, - 23304, 0, 16384, 20480, 22528, 23552, 23296, 23304, - 0, 16384, 20480, 22528, 23552, 23296, 23304, 23306, - 0, 16384, 20480, 22528, 23552, 23296, 23304, 0, - 16384, 20480, 22528, 23552, 23296, 23312, 23308, 0, - 16384, 20480, 22528, 23552, 23296, 23312, 23308, 0, - 16384, 20480, 22528, 23552, 23296, 23312, 23313, 23310, - 0, 16384, 20480, 22528, 23552, 23296, 0, 16384, - 20480, 22528, 23552, 23296, 23312, 0, 16384, 20480, - 22528, 23552, 23296, 23312, 0, 16384, 20480, 22528, - 23552, 23296, 23312, 23314, 0, 16384, 20480, 22528, - 23552, 23296, 23312, 0, 16384, 20480, 22528, 23552, - 23296, 23312, 23316, 0, 16384, 20480, 22528, 23552, - 23296, 23312, 23316, 0, 16384, 20480, 22528, 23552, - 23296, 23312, 23320, 23318, 0, 16384, 20480, 22528, - 23552, 23296, 23312, 0, 16384, 20480, 22528, 23552, - 23296, 23328, 23320, 0, 16384, 20480, 22528, 23552, - 23296, 23328, 23320, 0, 16384, 20480, 22528, 23552, - 23296, 23328, 23320, 23322, 0, 16384, 20480, 22528, - 23552, 23296, 23328, 23320, 0, 16384, 20480, 22528, - 23552, 23296, 23328, 23329, 23324, 0, 16384, 20480, - 22528, 23552, 23296, 23328, 23329, 23324, 0, 16384, - 20480, 22528, 23552, 23296, 23328, 23329, 23324, 23326, - 0, 16384, 20480, 22528, 23552, 23296, 0, 16384, - 20480, 22528, 23552, 23296, 23328, 0, 16384, 20480, - 22528, 23552, 23296, 23328, 0, 16384, 20480, 22528, - 23552, 23296, 23328, 23330, 0, 16384, 20480, 22528, - 23552, 23296, 23328, 0, 16384, 20480, 22528, 23552, - 23296, 23328, 23332, 0, 16384, 20480, 22528, 23552, - 23296, 23328, 23332, 0, 16384, 20480, 22528, 23552, - 23296, 23328, 23336, 23334, 0, 16384, 20480, 22528, - 23552, 23296, 23328, 0, 16384, 20480, 22528, 23552, - 23296, 23328, 23336, 0, 16384, 20480, 22528, 23552, - 23296, 23328, 23336, 0, 16384, 20480, 22528, 23552, - 23296, 23328, 23336, 23338, 0, 16384, 20480, 22528, - 23552, 23296, 23328, 23336, 0, 16384, 20480, 22528, - 23552, 23296, 23328, 23344, 23340, 0, 16384, 20480, - 22528, 23552, 23296, 23328, 23344, 23340, 0, 16384, - 20480, 22528, 23552, 23296, 23328, 23344, 23345, 23342, - 0, 16384, 20480, 22528, 23552, 23296, 23328, 0, - 16384, 20480, 22528, 23552, 23296, 23360, 23344, 0, - 16384, 20480, 22528, 23552, 23296, 23360, 23344, 0, - 16384, 20480, 22528, 23552, 23296, 23360, 23344, 23346, - 0, 16384, 20480, 22528, 23552, 23296, 23360, 23344, - 0, 16384, 20480, 22528, 23552, 23296, 23360, 23344, - 23348, 0, 16384, 20480, 22528, 23552, 23296, 23360, - 23344, 23348, 0, 16384, 20480, 22528, 23552, 23296, - 23360, 23344, 23352, 23350, 0, 16384, 20480, 22528, - 23552, 23296, 23360, 23344, 0, 16384, 20480, 22528, - 23552, 23296, 23360, 23361, 23352, 0, 16384, 20480, - 22528, 23552, 23296, 23360, 23361, 23352, 0, 16384, - 20480, 22528, 23552, 23296, 23360, 23361, 23352, 23354, - 0, 16384, 20480, 22528, 23552, 23296, 23360, 23361, - 23352, 0, 16384, 20480, 22528, 23552, 23296, 23360, - 23361, 23352, 23356, 0, 16384, 20480, 22528, 23552, - 23296, 23360, 23361, 23363, 23356, 0, 16384, 20480, - 22528, 23552, 23296, 23360, 23361, 23363, 23356, 23358, - 0, 16384, 20480, 22528, 23552, 23296, 0, 16384, - 20480, 22528, 23552, 23296, 23360, 0, 16384, 20480, - 22528, 23552, 23296, 23360, 0, 16384, 20480, 22528, - 23552, 23296, 23360, 23362, 0, 16384, 20480, 22528, - 23552, 23296, 23360, 0, 16384, 20480, 22528, 23552, - 23296, 23360, 23364, 0, 16384, 20480, 22528, 23552, - 23296, 23360, 23364, 0, 16384, 20480, 22528, 23552, - 23296, 23360, 23368, 23366, 0, 16384, 20480, 22528, - 23552, 23296, 23360, 0, 16384, 20480, 22528, 23552, - 23296, 23360, 23368, 0, 16384, 20480, 22528, 23552, - 23296, 23360, 23368, 0, 16384, 20480, 22528, 23552, - 23296, 23360, 23368, 23370, 0, 16384, 20480, 22528, - 23552, 23296, 23360, 23368, 0, 16384, 20480, 22528, - 23552, 23296, 23360, 23376, 23372, 0, 16384, 20480, - 22528, 23552, 23296, 23360, 23376, 23372, 0, 16384, - 20480, 22528, 23552, 23296, 23360, 23376, 23377, 23374, - 0, 16384, 20480, 22528, 23552, 23296, 23360, 0, - 16384, 20480, 22528, 23552, 23296, 23360, 23376, 0, - 16384, 20480, 22528, 23552, 23296, 23360, 23376, 0, - 16384, 20480, 22528, 23552, 23296, 23360, 23376, 23378, - 0, 16384, 20480, 22528, 23552, 23296, 23360, 23376, - 0, 16384, 20480, 22528, 23552, 23296, 23360, 23376, - 23380, 0, 16384, 20480, 22528, 23552, 23296, 23360, - 23376, 23380, 0, 16384, 20480, 22528, 23552, 23296, - 23360, 23376, 23384, 23382, 0, 16384, 20480, 22528, - 23552, 23296, 23360, 23376, 0, 16384, 20480, 22528, - 23552, 23296, 23360, 23392, 23384, 0, 16384, 20480, - 22528, 23552, 23296, 23360, 23392, 23384, 0, 16384, - 20480, 22528, 23552, 23296, 23360, 23392, 23384, 23386, - 0, 16384, 20480, 22528, 23552, 23296, 23360, 23392, - 23384, 0, 16384, 20480, 22528, 23552, 23296, 23360, - 23392, 23393, 23388, 0, 16384, 20480, 22528, 23552, - 23296, 23360, 23392, 23393, 23388, 0, 16384, 20480, - 22528, 23552, 23296, 23360, 23392, 23393, 23388, 23390, - 0, 16384, 20480, 22528, 23552, 23296, 23360, 0, - 16384, 20480, 22528, 23552, 23296, 23424, 23392, 0, - 16384, 20480, 22528, 23552, 23296, 23424, 23392, 0, - 16384, 20480, 22528, 23552, 23296, 23424, 23392, 23394, - 0, 16384, 20480, 22528, 23552, 23296, 23424, 23392, - 0, 16384, 20480, 22528, 23552, 23296, 23424, 23392, - 23396, 0, 16384, 20480, 22528, 23552, 23296, 23424, - 23392, 23396, 0, 16384, 20480, 22528, 23552, 23296, - 23424, 23392, 23400, 23398, 0, 16384, 20480, 22528, - 23552, 23296, 23424, 23392, 0, 16384, 20480, 22528, - 23552, 23296, 23424, 23392, 23400, 0, 16384, 20480, - 22528, 23552, 23296, 23424, 23392, 23400, 0, 16384, - 20480, 22528, 23552, 23296, 23424, 23392, 23400, 23402, - 0, 16384, 20480, 22528, 23552, 23296, 23424, 23392, - 23400, 0, 16384, 20480, 22528, 23552, 23296, 23424, - 23392, 23408, 23404, 0, 16384, 20480, 22528, 23552, - 23296, 23424, 23392, 23408, 23404, 0, 16384, 20480, - 22528, 23552, 23296, 23424, 23392, 23408, 23409, 23406, - 0, 16384, 20480, 22528, 23552, 23296, 23424, 23392, - 0, 16384, 20480, 22528, 23552, 23296, 23424, 23425, - 23408, 0, 16384, 20480, 22528, 23552, 23296, 23424, - 23425, 23408, 0, 16384, 20480, 22528, 23552, 23296, - 23424, 23425, 23408, 23410, 0, 16384, 20480, 22528, - 23552, 23296, 23424, 23425, 23408, 0, 16384, 20480, - 22528, 23552, 23296, 23424, 23425, 23408, 23412, 0, - 16384, 20480, 22528, 23552, 23296, 23424, 23425, 23408, - 23412, 0, 16384, 20480, 22528, 23552, 23296, 23424, - 23425, 23408, 23416, 23414, 0, 16384, 20480, 22528, - 23552, 23296, 23424, 23425, 23408, 0, 16384, 20480, - 22528, 23552, 23296, 23424, 23425, 23408, 23416, 0, - 16384, 20480, 22528, 23552, 23296, 23424, 23425, 23427, - 23416, 0, 16384, 20480, 22528, 23552, 23296, 23424, - 23425, 23427, 23416, 23418, 0, 16384, 20480, 22528, - 23552, 23296, 23424, 23425, 23427, 23416, 0, 16384, - 20480, 22528, 23552, 23296, 23424, 23425, 23427, 23416, - 23420, 0, 16384, 20480, 22528, 23552, 23296, 23424, - 23425, 23427, 23416, 23420, 0, 16384, 20480, 22528, - 23552, 23296, 23424, 23425, 23427, 23416, 23420, 23422, - 0, 16384, 20480, 22528, 23552, 23296, 0, 16384, - 20480, 22528, 23552, 23296, 23424, 0, 16384, 20480, - 22528, 23552, 23553, 23424, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 23426, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 0, 16384, 20480, 22528, 23552, - 23553, 23424, 23428, 0, 16384, 20480, 22528, 23552, - 23553, 23424, 23428, 0, 16384, 20480, 22528, 23552, - 23553, 23424, 23432, 23430, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 0, 16384, 20480, 22528, 23552, - 23553, 23424, 23432, 0, 16384, 20480, 22528, 23552, - 23553, 23424, 23432, 0, 16384, 20480, 22528, 23552, - 23553, 23424, 23432, 23434, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 23432, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 23440, 23436, 0, 16384, 20480, - 22528, 23552, 23553, 23424, 23440, 23436, 0, 16384, - 20480, 22528, 23552, 23553, 23424, 23440, 23441, 23438, - 0, 16384, 20480, 22528, 23552, 23553, 23424, 0, - 16384, 20480, 22528, 23552, 23553, 23424, 23440, 0, - 16384, 20480, 22528, 23552, 23553, 23424, 23440, 0, - 16384, 20480, 22528, 23552, 23553, 23424, 23440, 23442, - 0, 16384, 20480, 22528, 23552, 23553, 23424, 23440, - 0, 16384, 20480, 22528, 23552, 23553, 23424, 23440, - 23444, 0, 16384, 20480, 22528, 23552, 23553, 23424, - 23440, 23444, 0, 16384, 20480, 22528, 23552, 23553, - 23424, 23440, 23448, 23446, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 23440, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 23456, 23448, 0, 16384, 20480, - 22528, 23552, 23553, 23424, 23456, 23448, 0, 16384, - 20480, 22528, 23552, 23553, 23424, 23456, 23448, 23450, - 0, 16384, 20480, 22528, 23552, 23553, 23424, 23456, - 23448, 0, 16384, 20480, 22528, 23552, 23553, 23424, - 23456, 23457, 23452, 0, 16384, 20480, 22528, 23552, - 23553, 23424, 23456, 23457, 23452, 0, 16384, 20480, - 22528, 23552, 23553, 23424, 23456, 23457, 23452, 23454, - 0, 16384, 20480, 22528, 23552, 23553, 23424, 0, - 16384, 20480, 22528, 23552, 23553, 23424, 23456, 0, - 16384, 20480, 22528, 23552, 23553, 23424, 23456, 0, - 16384, 20480, 22528, 23552, 23553, 23424, 23456, 23458, - 0, 16384, 20480, 22528, 23552, 23553, 23424, 23456, - 0, 16384, 20480, 22528, 23552, 23553, 23424, 23456, - 23460, 0, 16384, 20480, 22528, 23552, 23553, 23424, - 23456, 23460, 0, 16384, 20480, 22528, 23552, 23553, - 23424, 23456, 23464, 23462, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 23456, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 23456, 23464, 0, 16384, 20480, - 22528, 23552, 23553, 23424, 23456, 23464, 0, 16384, - 20480, 22528, 23552, 23553, 23424, 23456, 23464, 23466, - 0, 16384, 20480, 22528, 23552, 23553, 23424, 23456, - 23464, 0, 16384, 20480, 22528, 23552, 23553, 23424, - 23456, 23472, 23468, 0, 16384, 20480, 22528, 23552, - 23553, 23424, 23456, 23472, 23468, 0, 16384, 20480, - 22528, 23552, 23553, 23424, 23456, 23472, 23473, 23470, - 0, 16384, 20480, 22528, 23552, 23553, 23424, 23456, - 0, 16384, 20480, 22528, 23552, 23553, 23424, 23488, - 23472, 0, 16384, 20480, 22528, 23552, 23553, 23424, - 23488, 23472, 0, 16384, 20480, 22528, 23552, 23553, - 23424, 23488, 23472, 23474, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 23488, 23472, 0, 16384, 20480, - 22528, 23552, 23553, 23424, 23488, 23472, 23476, 0, - 16384, 20480, 22528, 23552, 23553, 23424, 23488, 23472, - 23476, 0, 16384, 20480, 22528, 23552, 23553, 23424, - 23488, 23472, 23480, 23478, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 23488, 23472, 0, 16384, 20480, - 22528, 23552, 23553, 23424, 23488, 23489, 23480, 0, - 16384, 20480, 22528, 23552, 23553, 23424, 23488, 23489, - 23480, 0, 16384, 20480, 22528, 23552, 23553, 23424, - 23488, 23489, 23480, 23482, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 23488, 23489, 23480, 0, 16384, - 20480, 22528, 23552, 23553, 23424, 23488, 23489, 23480, - 23484, 0, 16384, 20480, 22528, 23552, 23553, 23424, - 23488, 23489, 23491, 23484, 0, 16384, 20480, 22528, - 23552, 23553, 23424, 23488, 23489, 23491, 23484, 23486, - 0, 16384, 20480, 22528, 23552, 23553, 23424, 0, - 16384, 20480, 22528, 23552, 23553, 23424, 23488, 0, - 16384, 20480, 22528, 23552, 23553, 23424, 23488, 0, - 16384, 20480, 22528, 23552, 23553, 23424, 23488, 23490, - 0, 16384, 20480, 22528, 23552, 23553, 23555, 23488, - 0, 16384, 20480, 22528, 23552, 23553, 23555, 23488, - 23492, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23488, 23492, 0, 16384, 20480, 22528, 23552, 23553, - 23555, 23488, 23496, 23494, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23488, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23488, 23496, 0, 16384, 20480, - 22528, 23552, 23553, 23555, 23488, 23496, 0, 16384, - 20480, 22528, 23552, 23553, 23555, 23488, 23496, 23498, - 0, 16384, 20480, 22528, 23552, 23553, 23555, 23488, - 23496, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23488, 23504, 23500, 0, 16384, 20480, 22528, 23552, - 23553, 23555, 23488, 23504, 23500, 0, 16384, 20480, - 22528, 23552, 23553, 23555, 23488, 23504, 23505, 23502, - 0, 16384, 20480, 22528, 23552, 23553, 23555, 23488, - 0, 16384, 20480, 22528, 23552, 23553, 23555, 23488, - 23504, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23488, 23504, 0, 16384, 20480, 22528, 23552, 23553, - 23555, 23488, 23504, 23506, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23488, 23504, 0, 16384, 20480, - 22528, 23552, 23553, 23555, 23488, 23504, 23508, 0, - 16384, 20480, 22528, 23552, 23553, 23555, 23488, 23504, - 23508, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23488, 23504, 23512, 23510, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23488, 23504, 0, 16384, 20480, - 22528, 23552, 23553, 23555, 23488, 23520, 23512, 0, - 16384, 20480, 22528, 23552, 23553, 23555, 23488, 23520, - 23512, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23488, 23520, 23512, 23514, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23488, 23520, 23512, 0, 16384, - 20480, 22528, 23552, 23553, 23555, 23488, 23520, 23521, - 23516, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23488, 23520, 23521, 23516, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23488, 23520, 23521, 23516, 23518, - 0, 16384, 20480, 22528, 23552, 23553, 23555, 23488, - 0, 16384, 20480, 22528, 23552, 23553, 23555, 23488, - 23520, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23488, 23520, 0, 16384, 20480, 22528, 23552, 23553, - 23555, 23488, 23520, 23522, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23488, 23520, 0, 16384, 20480, - 22528, 23552, 23553, 23555, 23488, 23520, 23524, 0, - 16384, 20480, 22528, 23552, 23553, 23555, 23488, 23520, - 23524, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23488, 23520, 23528, 23526, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23559, 23520, 0, 16384, 20480, - 22528, 23552, 23553, 23555, 23559, 23520, 23528, 0, - 16384, 20480, 22528, 23552, 23553, 23555, 23559, 23520, - 23528, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23559, 23520, 23528, 23530, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23559, 23520, 23528, 0, 16384, - 20480, 22528, 23552, 23553, 23555, 23559, 23520, 23536, - 23532, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23559, 23520, 23536, 23532, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23559, 23520, 23536, 23537, 23534, - 0, 16384, 20480, 22528, 23552, 23553, 23555, 23559, - 23520, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23559, 23520, 23536, 0, 16384, 20480, 22528, 23552, - 23553, 23555, 23559, 23520, 23536, 0, 16384, 20480, - 22528, 23552, 23553, 23555, 23559, 23520, 23536, 23538, - 0, 16384, 20480, 22528, 23552, 23553, 23555, 23559, - 23520, 23536, 0, 16384, 20480, 22528, 23552, 23553, - 23555, 23559, 23520, 23536, 23540, 0, 16384, 20480, - 22528, 23552, 23553, 23555, 23559, 23520, 23536, 23540, - 0, 16384, 20480, 22528, 23552, 23553, 23555, 23559, - 23520, 23536, 23544, 23542, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23559, 23520, 23536, 0, 16384, - 20480, 22528, 23552, 23553, 23555, 23559, 23520, 23536, - 23544, 0, 16384, 20480, 22528, 23552, 23553, 23555, - 23559, 23520, 23536, 23544, 0, 16384, 20480, 22528, - 23552, 23553, 23555, 23559, 23520, 23536, 23544, 23546, - 0, 16384, 20480, 22528, 23552, 23553, 23555, 23559, - 23520, 23536, 23544, 0, 16384, 20480, 22528, 23552, - 23553, 23555, 23559, 23520, 23536, 23544, 23548, 0, - 16384, 20480, 22528, 23552, 23553, 23555, 23559, 23520, - 23536, 23544, 23548, 0, 16384, 20480, 22528, 23552, - 23553, 23555, 23559, 23520, 23536, 23544, 23548, 23550, - 0, 16384, 20480, 22528, 0, 16384, 20480, 22528, - 23552, 0, 16384, 20480, 22528, 23552, 0, 16384, - 20480, 22528, 23552, 23554, 0, 16384, 20480, 22528, - 23552, 0, 16384, 20480, 22528, 23552, 23556, 0, - 16384, 20480, 22528, 23552, 23556, 0, 16384, 20480, - 22528, 23552, 23560, 23558, 0, 16384, 20480, 22528, - 23552, 0, 16384, 20480, 22528, 23552, 23560, 0, - 16384, 20480, 22528, 23552, 23560, 0, 16384, 20480, - 22528, 23552, 23560, 23562, 0, 16384, 20480, 22528, - 23552, 23560, 0, 16384, 20480, 22528, 23552, 23568, - 23564, 0, 16384, 20480, 22528, 23552, 23568, 23564, - 0, 16384, 20480, 22528, 23552, 23568, 23569, 23566, - 0, 16384, 20480, 22528, 23552, 0, 16384, 20480, - 22528, 23552, 23568, 0, 16384, 20480, 22528, 23552, - 23568, 0, 16384, 20480, 22528, 23552, 23568, 23570, - 0, 16384, 20480, 22528, 23552, 23568, 0, 16384, - 20480, 22528, 23552, 23568, 23572, 0, 16384, 20480, - 22528, 23552, 23568, 23572, 0, 16384, 20480, 22528, - 23552, 23568, 23576, 23574, 0, 16384, 20480, 22528, - 23552, 23568, 0, 16384, 20480, 22528, 23552, 23584, - 23576, 0, 16384, 20480, 22528, 23552, 23584, 23576, - 0, 16384, 20480, 22528, 23552, 23584, 23576, 23578, - 0, 16384, 20480, 22528, 23552, 23584, 23576, 0, - 16384, 20480, 22528, 23552, 23584, 23585, 23580, 0, - 16384, 20480, 22528, 23552, 23584, 23585, 23580, 0, - 16384, 20480, 22528, 23552, 23584, 23585, 23580, 23582, - 0, 16384, 20480, 22528, 23552, 0, 16384, 20480, - 22528, 23552, 23584, 0, 16384, 20480, 22528, 23552, - 23584, 0, 16384, 20480, 22528, 23552, 23584, 23586, - 0, 16384, 20480, 22528, 23552, 23584, 0, 16384, - 20480, 22528, 23552, 23584, 23588, 0, 16384, 20480, - 22528, 23552, 23584, 23588, 0, 16384, 20480, 22528, - 23552, 23584, 23592, 23590, 0, 16384, 20480, 22528, - 23552, 23584, 0, 16384, 20480, 22528, 23552, 23584, - 23592, 0, 16384, 20480, 22528, 23552, 23584, 23592, - 0, 16384, 20480, 22528, 23552, 23584, 23592, 23594, - 0, 16384, 20480, 22528, 23552, 23584, 23592, 0, - 16384, 20480, 22528, 23552, 23584, 23600, 23596, 0, - 16384, 20480, 22528, 23552, 23584, 23600, 23596, 0, - 16384, 20480, 22528, 23552, 23584, 23600, 23601, 23598, - 0, 16384, 20480, 22528, 23552, 23584, 0, 16384, - 20480, 22528, 23552, 23616, 23600, 0, 16384, 20480, - 22528, 23552, 23616, 23600, 0, 16384, 20480, 22528, - 23552, 23616, 23600, 23602, 0, 16384, 20480, 22528, - 23552, 23616, 23600, 0, 16384, 20480, 22528, 23552, - 23616, 23600, 23604, 0, 16384, 20480, 22528, 23552, - 23616, 23600, 23604, 0, 16384, 20480, 22528, 23552, - 23616, 23600, 23608, 23606, 0, 16384, 20480, 22528, - 23552, 23616, 23600, 0, 16384, 20480, 22528, 23552, - 23616, 23617, 23608, 0, 16384, 20480, 22528, 23552, - 23616, 23617, 23608, 0, 16384, 20480, 22528, 23552, - 23616, 23617, 23608, 23610, 0, 16384, 20480, 22528, - 23552, 23616, 23617, 23608, 0, 16384, 20480, 22528, - 23552, 23616, 23617, 23608, 23612, 0, 16384, 20480, - 22528, 23552, 23616, 23617, 23619, 23612, 0, 16384, - 20480, 22528, 23552, 23616, 23617, 23619, 23612, 23614, - 0, 16384, 20480, 22528, 23552, 0, 16384, 24576, - 22528, 23552, 23616, 0, 16384, 24576, 22528, 23552, - 23616, 0, 16384, 24576, 22528, 23552, 23616, 23618, - 0, 16384, 24576, 22528, 23552, 23616, 0, 16384, - 24576, 22528, 23552, 23616, 23620, 0, 16384, 24576, - 22528, 23552, 23616, 23620, 0, 16384, 24576, 22528, - 23552, 23616, 23624, 23622, 0, 16384, 24576, 22528, - 23552, 23616, 0, 16384, 24576, 22528, 23552, 23616, - 23624, 0, 16384, 24576, 22528, 23552, 23616, 23624, - 0, 16384, 24576, 22528, 23552, 23616, 23624, 23626, - 0, 16384, 24576, 22528, 23552, 23616, 23624, 0, - 16384, 24576, 22528, 23552, 23616, 23632, 23628, 0, - 16384, 24576, 22528, 23552, 23616, 23632, 23628, 0, - 16384, 24576, 22528, 23552, 23616, 23632, 23633, 23630, - 0, 16384, 24576, 22528, 23552, 23616, 0, 16384, - 24576, 22528, 23552, 23616, 23632, 0, 16384, 24576, - 22528, 23552, 23616, 23632, 0, 16384, 24576, 22528, - 23552, 23616, 23632, 23634, 0, 16384, 24576, 22528, - 23552, 23616, 23632, 0, 16384, 24576, 22528, 23552, - 23616, 23632, 23636, 0, 16384, 24576, 22528, 23552, - 23616, 23632, 23636, 0, 16384, 24576, 22528, 23552, - 23616, 23632, 23640, 23638, 0, 16384, 24576, 22528, - 23552, 23616, 23632, 0, 16384, 24576, 22528, 23552, - 23616, 23648, 23640, 0, 16384, 24576, 22528, 23552, - 23616, 23648, 23640, 0, 16384, 24576, 22528, 23552, - 23616, 23648, 23640, 23642, 0, 16384, 24576, 22528, - 23552, 23616, 23648, 23640, 0, 16384, 24576, 22528, - 23552, 23616, 23648, 23649, 23644, 0, 16384, 24576, - 22528, 23552, 23616, 23648, 23649, 23644, 0, 16384, - 24576, 22528, 23552, 23616, 23648, 23649, 23644, 23646, - 0, 16384, 24576, 22528, 23552, 23616, 0, 16384, - 24576, 22528, 23552, 23680, 23648, 0, 16384, 24576, - 22528, 23552, 23680, 23648, 0, 16384, 24576, 22528, - 23552, 23680, 23648, 23650, 0, 16384, 24576, 22528, - 23552, 23680, 23648, 0, 16384, 24576, 22528, 23552, - 23680, 23648, 23652, 0, 16384, 24576, 22528, 23552, - 23680, 23648, 23652, 0, 16384, 24576, 22528, 23552, - 23680, 23648, 23656, 23654, 0, 16384, 24576, 22528, - 23552, 23680, 23648, 0, 16384, 24576, 22528, 23552, - 23680, 23648, 23656, 0, 16384, 24576, 22528, 23552, - 23680, 23648, 23656, 0, 16384, 24576, 22528, 23552, - 23680, 23648, 23656, 23658, 0, 16384, 24576, 22528, - 23552, 23680, 23648, 23656, 0, 16384, 24576, 22528, - 23552, 23680, 23648, 23664, 23660, 0, 16384, 24576, - 22528, 23552, 23680, 23648, 23664, 23660, 0, 16384, - 24576, 22528, 23552, 23680, 23648, 23664, 23665, 23662, - 0, 16384, 24576, 22528, 23552, 23680, 23648, 0, - 16384, 24576, 22528, 23552, 23680, 23681, 23664, 0, - 16384, 24576, 22528, 23552, 23680, 23681, 23664, 0, - 16384, 24576, 22528, 23552, 23680, 23681, 23664, 23666, - 0, 16384, 24576, 22528, 23552, 23680, 23681, 23664, - 0, 16384, 24576, 22528, 23552, 23680, 23681, 23664, - 23668, 0, 16384, 24576, 22528, 23552, 23680, 23681, - 23664, 23668, 0, 16384, 24576, 22528, 23552, 23680, - 23681, 23664, 23672, 23670, 0, 16384, 24576, 22528, - 23552, 23680, 23681, 23664, 0, 16384, 24576, 22528, - 23552, 23680, 23681, 23664, 23672, 0, 16384, 24576, - 22528, 23552, 23680, 23681, 23683, 23672, 0, 16384, - 24576, 22528, 23552, 23680, 23681, 23683, 23672, 23674, - 0, 16384, 24576, 22528, 23552, 23680, 23681, 23683, - 23672, 0, 16384, 24576, 22528, 23552, 23680, 23681, - 23683, 23672, 23676, 0, 16384, 24576, 22528, 23552, - 23680, 23681, 23683, 23672, 23676, 0, 16384, 24576, - 22528, 23552, 23680, 23681, 23683, 23672, 23676, 23678, - 0, 16384, 24576, 22528, 23552, 0, 16384, 24576, - 22528, 23552, 23680, 0, 16384, 24576, 22528, 23552, - 23680, 0, 16384, 24576, 22528, 23552, 23680, 23682, - 0, 16384, 24576, 22528, 23552, 23680, 0, 16384, - 24576, 22528, 23552, 23680, 23684, 0, 16384, 24576, - 22528, 23552, 23680, 23684, 0, 16384, 24576, 22528, - 23552, 23680, 23688, 23686, 0, 16384, 24576, 22528, - 23552, 23680, 0, 16384, 24576, 22528, 23552, 23680, - 23688, 0, 16384, 24576, 22528, 23552, 23680, 23688, - 0, 16384, 24576, 22528, 23552, 23680, 23688, 23690, - 0, 16384, 24576, 22528, 23552, 23680, 23688, 0, - 16384, 24576, 22528, 23552, 23680, 23696, 23692, 0, - 16384, 24576, 22528, 23552, 23680, 23696, 23692, 0, - 16384, 24576, 22528, 23552, 23680, 23696, 23697, 23694, - 0, 16384, 24576, 22528, 23552, 23680, 0, 16384, - 24576, 22528, 23552, 23680, 23696, 0, 16384, 24576, - 22528, 23552, 23680, 23696, 0, 16384, 24576, 22528, - 23552, 23680, 23696, 23698, 0, 16384, 24576, 22528, - 23552, 23680, 23696, 0, 16384, 24576, 22528, 23552, - 23680, 23696, 23700, 0, 16384, 24576, 22528, 23552, - 23680, 23696, 23700, 0, 16384, 24576, 22528, 23552, - 23680, 23696, 23704, 23702, 0, 16384, 24576, 22528, - 23552, 23680, 23696, 0, 16384, 24576, 22528, 23552, - 23680, 23712, 23704, 0, 16384, 24576, 22528, 23552, - 23680, 23712, 23704, 0, 16384, 24576, 22528, 23552, - 23680, 23712, 23704, 23706, 0, 16384, 24576, 22528, - 23552, 23680, 23712, 23704, 0, 16384, 24576, 22528, - 23552, 23680, 23712, 23713, 23708, 0, 16384, 24576, - 22528, 23552, 23680, 23712, 23713, 23708, 0, 16384, - 24576, 22528, 23552, 23680, 23712, 23713, 23708, 23710, - 0, 16384, 24576, 22528, 23552, 23680, 0, 16384, - 24576, 22528, 23552, 23680, 23712, 0, 16384, 24576, - 22528, 23552, 23680, 23712, 0, 16384, 24576, 22528, - 23552, 23680, 23712, 23714, 0, 16384, 24576, 22528, - 23552, 23680, 23712, 0, 16384, 24576, 22528, 23552, - 23680, 23712, 23716, 0, 16384, 24576, 22528, 23552, - 23680, 23712, 23716, 0, 16384, 24576, 22528, 23552, - 23680, 23712, 23720, 23718, 0, 16384, 24576, 22528, - 23552, 23680, 23712, 0, 16384, 24576, 22528, 23552, - 23680, 23712, 23720, 0, 16384, 24576, 22528, 23552, - 23680, 23712, 23720, 0, 16384, 24576, 22528, 23552, - 23680, 23712, 23720, 23722, 0, 16384, 24576, 22528, - 23552, 23680, 23712, 23720, 0, 16384, 24576, 22528, - 23552, 23680, 23712, 23728, 23724, 0, 16384, 24576, - 22528, 23552, 23680, 23712, 23728, 23724, 0, 16384, - 24576, 22528, 23552, 23680, 23712, 23728, 23729, 23726, - 0, 16384, 24576, 22528, 23552, 23680, 23712, 0, - 16384, 24576, 22528, 23552, 23680, 23744, 23728, 0, - 16384, 24576, 22528, 23552, 23680, 23744, 23728, 0, - 16384, 24576, 22528, 23552, 23680, 23744, 23728, 23730, - 0, 16384, 24576, 22528, 23552, 23680, 23744, 23728, - 0, 16384, 24576, 22528, 23552, 23680, 23744, 23728, - 23732, 0, 16384, 24576, 22528, 23552, 23680, 23744, - 23728, 23732, 0, 16384, 24576, 22528, 23552, 23680, - 23744, 23728, 23736, 23734, 0, 16384, 24576, 22528, - 23552, 23680, 23744, 23728, 0, 16384, 24576, 22528, - 23552, 23680, 23744, 23745, 23736, 0, 16384, 24576, - 22528, 23552, 23680, 23744, 23745, 23736, 0, 16384, - 24576, 22528, 23552, 23680, 23744, 23745, 23736, 23738, - 0, 16384, 24576, 22528, 23552, 23680, 23744, 23745, - 23736, 0, 16384, 24576, 22528, 23552, 23680, 23744, - 23745, 23736, 23740, 0, 16384, 24576, 22528, 23552, - 23680, 23744, 23745, 23747, 23740, 0, 16384, 24576, - 22528, 23552, 23680, 23744, 23745, 23747, 23740, 23742, - 0, 16384, 24576, 22528, 23552, 23680, 0, 16384, - 24576, 22528, 23552, 23808, 23744, 0, 16384, 24576, - 22528, 23552, 23808, 23744, 0, 16384, 24576, 22528, - 23552, 23808, 23744, 23746, 0, 16384, 24576, 22528, - 23552, 23808, 23744, 0, 16384, 24576, 22528, 23552, - 23808, 23744, 23748, 0, 16384, 24576, 22528, 23552, - 23808, 23744, 23748, 0, 16384, 24576, 22528, 23552, - 23808, 23744, 23752, 23750, 0, 16384, 24576, 22528, - 23552, 23808, 23744, 0, 16384, 24576, 22528, 23552, - 23808, 23744, 23752, 0, 16384, 24576, 22528, 23552, - 23808, 23744, 23752, 0, 16384, 24576, 22528, 23552, - 23808, 23744, 23752, 23754, 0, 16384, 24576, 22528, - 23552, 23808, 23744, 23752, 0, 16384, 24576, 22528, - 23552, 23808, 23744, 23760, 23756, 0, 16384, 24576, - 22528, 23552, 23808, 23744, 23760, 23756, 0, 16384, - 24576, 22528, 23552, 23808, 23744, 23760, 23761, 23758, - 0, 16384, 24576, 22528, 23552, 23808, 23744, 0, - 16384, 24576, 22528, 23552, 23808, 23744, 23760, 0, - 16384, 24576, 22528, 23552, 23808, 23744, 23760, 0, - 16384, 24576, 22528, 23552, 23808, 23744, 23760, 23762, - 0, 16384, 24576, 22528, 23552, 23808, 23744, 23760, - 0, 16384, 24576, 22528, 23552, 23808, 23744, 23760, - 23764, 0, 16384, 24576, 22528, 23552, 23808, 23744, - 23760, 23764, 0, 16384, 24576, 22528, 23552, 23808, - 23744, 23760, 23768, 23766, 0, 16384, 24576, 22528, - 23552, 23808, 23744, 23760, 0, 16384, 24576, 22528, - 23552, 23808, 23744, 23776, 23768, 0, 16384, 24576, - 22528, 23552, 23808, 23744, 23776, 23768, 0, 16384, - 24576, 22528, 23552, 23808, 23744, 23776, 23768, 23770, - 0, 16384, 24576, 22528, 23552, 23808, 23744, 23776, - 23768, 0, 16384, 24576, 22528, 23552, 23808, 23744, - 23776, 23777, 23772, 0, 16384, 24576, 22528, 23552, - 23808, 23744, 23776, 23777, 23772, 0, 16384, 24576, - 22528, 23552, 23808, 23744, 23776, 23777, 23772, 23774, - 0, 16384, 24576, 22528, 23552, 23808, 23744, 0, - 16384, 24576, 22528, 23552, 23808, 23809, 23776, 0, - 16384, 24576, 22528, 23552, 23808, 23809, 23776, 0, - 16384, 24576, 22528, 23552, 23808, 23809, 23776, 23778, - 0, 16384, 24576, 22528, 23552, 23808, 23809, 23776, - 0, 16384, 24576, 22528, 23552, 23808, 23809, 23776, - 23780, 0, 16384, 24576, 22528, 23552, 23808, 23809, - 23776, 23780, 0, 16384, 24576, 22528, 23552, 23808, - 23809, 23776, 23784, 23782, 0, 16384, 24576, 22528, - 23552, 23808, 23809, 23776, 0, 16384, 24576, 22528, - 23552, 23808, 23809, 23776, 23784, 0, 16384, 24576, - 22528, 23552, 23808, 23809, 23776, 23784, 0, 16384, - 24576, 22528, 23552, 23808, 23809, 23776, 23784, 23786, - 0, 16384, 24576, 22528, 23552, 23808, 23809, 23776, - 23784, 0, 16384, 24576, 22528, 23552, 23808, 23809, - 23776, 23792, 23788, 0, 16384, 24576, 22528, 23552, - 23808, 23809, 23776, 23792, 23788, 0, 16384, 24576, - 22528, 23552, 23808, 23809, 23776, 23792, 23793, 23790, - 0, 16384, 24576, 22528, 23552, 23808, 23809, 23776, - 0, 16384, 24576, 22528, 23552, 23808, 23809, 23776, - 23792, 0, 16384, 24576, 22528, 23552, 23808, 23809, - 23811, 23792, 0, 16384, 24576, 22528, 23552, 23808, - 23809, 23811, 23792, 23794, 0, 16384, 24576, 22528, - 23552, 23808, 23809, 23811, 23792, 0, 16384, 24576, - 22528, 23552, 23808, 23809, 23811, 23792, 23796, 0, - 16384, 24576, 22528, 23552, 23808, 23809, 23811, 23792, - 23796, 0, 16384, 24576, 22528, 23552, 23808, 23809, - 23811, 23792, 23800, 23798, 0, 16384, 24576, 22528, - 23552, 23808, 23809, 23811, 23792, 0, 16384, 24576, - 22528, 23552, 23808, 23809, 23811, 23792, 23800, 0, - 16384, 24576, 22528, 23552, 23808, 23809, 23811, 23792, - 23800, 0, 16384, 24576, 22528, 23552, 23808, 23809, - 23811, 23792, 23800, 23802, 0, 16384, 24576, 22528, - 23552, 23808, 23809, 23811, 23815, 23800, 0, 16384, - 24576, 22528, 23552, 23808, 23809, 23811, 23815, 23800, - 23804, 0, 16384, 24576, 22528, 23552, 23808, 23809, - 23811, 23815, 23800, 23804, 0, 16384, 24576, 22528, - 23552, 23808, 23809, 23811, 23815, 23800, 23804, 23806, - 0, 16384, 24576, 22528, 23552, 0, 16384, 24576, - 22528, 23552, 23808, 0, 16384, 24576, 24577, 23552, - 23808, 0, 16384, 24576, 24577, 23552, 23808, 23810, - 0, 16384, 24576, 24577, 23552, 23808, 0, 16384, - 24576, 24577, 23552, 23808, 23812, 0, 16384, 24576, - 24577, 23552, 23808, 23812, 0, 16384, 24576, 24577, - 23552, 23808, 23816, 23814, 0, 16384, 24576, 24577, - 23552, 23808, 0, 16384, 24576, 24577, 23552, 23808, - 23816, 0, 16384, 24576, 24577, 23552, 23808, 23816, - 0, 16384, 24576, 24577, 23552, 23808, 23816, 23818, - 0, 16384, 24576, 24577, 23552, 23808, 23816, 0, - 16384, 24576, 24577, 23552, 23808, 23824, 23820, 0, - 16384, 24576, 24577, 23552, 23808, 23824, 23820, 0, - 16384, 24576, 24577, 23552, 23808, 23824, 23825, 23822, - 0, 16384, 24576, 24577, 23552, 23808, 0, 16384, - 24576, 24577, 23552, 23808, 23824, 0, 16384, 24576, - 24577, 23552, 23808, 23824, 0, 16384, 24576, 24577, - 23552, 23808, 23824, 23826, 0, 16384, 24576, 24577, - 23552, 23808, 23824, 0, 16384, 24576, 24577, 23552, - 23808, 23824, 23828, 0, 16384, 24576, 24577, 23552, - 23808, 23824, 23828, 0, 16384, 24576, 24577, 23552, - 23808, 23824, 23832, 23830, 0, 16384, 24576, 24577, - 23552, 23808, 23824, 0, 16384, 24576, 24577, 23552, - 23808, 23840, 23832, 0, 16384, 24576, 24577, 23552, - 23808, 23840, 23832, 0, 16384, 24576, 24577, 23552, - 23808, 23840, 23832, 23834, 0, 16384, 24576, 24577, - 23552, 23808, 23840, 23832, 0, 16384, 24576, 24577, - 23552, 23808, 23840, 23841, 23836, 0, 16384, 24576, - 24577, 23552, 23808, 23840, 23841, 23836, 0, 16384, - 24576, 24577, 23552, 23808, 23840, 23841, 23836, 23838, - 0, 16384, 24576, 24577, 23552, 23808, 0, 16384, - 24576, 24577, 23552, 23808, 23840, 0, 16384, 24576, - 24577, 23552, 23808, 23840, 0, 16384, 24576, 24577, - 23552, 23808, 23840, 23842, 0, 16384, 24576, 24577, - 23552, 23808, 23840, 0, 16384, 24576, 24577, 23552, - 23808, 23840, 23844, 0, 16384, 24576, 24577, 23552, - 23808, 23840, 23844, 0, 16384, 24576, 24577, 23552, - 23808, 23840, 23848, 23846, 0, 16384, 24576, 24577, - 23552, 23808, 23840, 0, 16384, 24576, 24577, 23552, - 23808, 23840, 23848, 0, 16384, 24576, 24577, 23552, - 23808, 23840, 23848, 0, 16384, 24576, 24577, 23552, - 23808, 23840, 23848, 23850, 0, 16384, 24576, 24577, - 23552, 23808, 23840, 23848, 0, 16384, 24576, 24577, - 23552, 23808, 23840, 23856, 23852, 0, 16384, 24576, - 24577, 23552, 23808, 23840, 23856, 23852, 0, 16384, - 24576, 24577, 23552, 23808, 23840, 23856, 23857, 23854, - 0, 16384, 24576, 24577, 23552, 23808, 23840, 0, - 16384, 24576, 24577, 23552, 23808, 23872, 23856, 0, - 16384, 24576, 24577, 23552, 23808, 23872, 23856, 0, - 16384, 24576, 24577, 23552, 23808, 23872, 23856, 23858, - 0, 16384, 24576, 24577, 23552, 23808, 23872, 23856, - 0, 16384, 24576, 24577, 23552, 23808, 23872, 23856, - 23860, 0, 16384, 24576, 24577, 23552, 23808, 23872, - 23856, 23860, 0, 16384, 24576, 24577, 23552, 23808, - 23872, 23856, 23864, 23862, 0, 16384, 24576, 24577, - 23552, 23808, 23872, 23856, 0, 16384, 24576, 24577, - 23552, 23808, 23872, 23873, 23864, 0, 16384, 24576, - 24577, 23552, 23808, 23872, 23873, 23864, 0, 16384, - 24576, 24577, 23552, 23808, 23872, 23873, 23864, 23866, - 0, 16384, 24576, 24577, 23552, 23808, 23872, 23873, - 23864, 0, 16384, 24576, 24577, 23552, 23808, 23872, - 23873, 23864, 23868, 0, 16384, 24576, 24577, 23552, - 23808, 23872, 23873, 23875, 23868, 0, 16384, 24576, - 24577, 23552, 23808, 23872, 23873, 23875, 23868, 23870, - 0, 16384, 24576, 24577, 23552, 23808, 0, 16384, - 24576, 24577, 23552, 23808, 23872, 0, 16384, 24576, - 24577, 23552, 23808, 23872, 0, 16384, 24576, 24577, - 23552, 23808, 23872, 23874, 0, 16384, 24576, 24577, - 23552, 23808, 23872, 0, 16384, 24576, 24577, 23552, - 23808, 23872, 23876, 0, 16384, 24576, 24577, 23552, - 23808, 23872, 23876, 0, 16384, 24576, 24577, 23552, - 23808, 23872, 23880, 23878, 0, 16384, 24576, 24577, - 23552, 23808, 23872, 0, 16384, 24576, 24577, 23552, - 23808, 23872, 23880, 0, 16384, 24576, 24577, 23552, - 23808, 23872, 23880, 0, 16384, 24576, 24577, 23552, - 23808, 23872, 23880, 23882, 0, 16384, 24576, 24577, - 23552, 23808, 23872, 23880, 0, 16384, 24576, 24577, - 23552, 23808, 23872, 23888, 23884, 0, 16384, 24576, - 24577, 23552, 23808, 23872, 23888, 23884, 0, 16384, - 24576, 24577, 23552, 23808, 23872, 23888, 23889, 23886, - 0, 16384, 24576, 24577, 23552, 23808, 23872, 0, - 16384, 24576, 24577, 23552, 23808, 23872, 23888, 0, - 16384, 24576, 24577, 23552, 23808, 23872, 23888, 0, - 16384, 24576, 24577, 23552, 23808, 23872, 23888, 23890, - 0, 16384, 24576, 24577, 23552, 23808, 23872, 23888, - 0, 16384, 24576, 24577, 23552, 23808, 23872, 23888, - 23892, 0, 16384, 24576, 24577, 23552, 23808, 23872, - 23888, 23892, 0, 16384, 24576, 24577, 23552, 23808, - 23872, 23888, 23896, 23894, 0, 16384, 24576, 24577, - 23552, 23808, 23872, 23888, 0, 16384, 24576, 24577, - 23552, 23808, 23872, 23904, 23896, 0, 16384, 24576, - 24577, 23552, 23808, 23872, 23904, 23896, 0, 16384, - 24576, 24577, 23552, 23808, 23872, 23904, 23896, 23898, - 0, 16384, 24576, 24577, 23552, 23808, 23872, 23904, - 23896, 0, 16384, 24576, 24577, 23552, 23808, 23872, - 23904, 23905, 23900, 0, 16384, 24576, 24577, 23552, - 23808, 23872, 23904, 23905, 23900, 0, 16384, 24576, - 24577, 23552, 23808, 23872, 23904, 23905, 23900, 23902, - 0, 16384, 24576, 24577, 23552, 23808, 23872, 0, - 16384, 24576, 24577, 23552, 23808, 23936, 23904, 0, - 16384, 24576, 24577, 23552, 23808, 23936, 23904, 0, - 16384, 24576, 24577, 23552, 23808, 23936, 23904, 23906, - 0, 16384, 24576, 24577, 23552, 23808, 23936, 23904, - 0, 16384, 24576, 24577, 23552, 23808, 23936, 23904, - 23908, 0, 16384, 24576, 24577, 23552, 23808, 23936, - 23904, 23908, 0, 16384, 24576, 24577, 23552, 23808, - 23936, 23904, 23912, 23910, 0, 16384, 24576, 24577, - 23552, 23808, 23936, 23904, 0, 16384, 24576, 24577, - 23552, 23808, 23936, 23904, 23912, 0, 16384, 24576, - 24577, 23552, 23808, 23936, 23904, 23912, 0, 16384, - 24576, 24577, 23552, 23808, 23936, 23904, 23912, 23914, - 0, 16384, 24576, 24577, 23552, 23808, 23936, 23904, - 23912, 0, 16384, 24576, 24577, 23552, 23808, 23936, - 23904, 23920, 23916, 0, 16384, 24576, 24577, 23552, - 23808, 23936, 23904, 23920, 23916, 0, 16384, 24576, - 24577, 23552, 23808, 23936, 23904, 23920, 23921, 23918, - 0, 16384, 24576, 24577, 23552, 23808, 23936, 23904, - 0, 16384, 24576, 24577, 23552, 23808, 23936, 23937, - 23920, 0, 16384, 24576, 24577, 23552, 23808, 23936, - 23937, 23920, 0, 16384, 24576, 24577, 23552, 23808, - 23936, 23937, 23920, 23922, 0, 16384, 24576, 24577, - 23552, 23808, 23936, 23937, 23920, 0, 16384, 24576, - 24577, 23552, 23808, 23936, 23937, 23920, 23924, 0, - 16384, 24576, 24577, 23552, 23808, 23936, 23937, 23920, - 23924, 0, 16384, 24576, 24577, 23552, 23808, 23936, - 23937, 23920, 23928, 23926, 0, 16384, 24576, 24577, - 23552, 23808, 23936, 23937, 23920, 0, 16384, 24576, - 24577, 23552, 23808, 23936, 23937, 23920, 23928, 0, - 16384, 24576, 24577, 23552, 23808, 23936, 23937, 23939, - 23928, 0, 16384, 24576, 24577, 23552, 23808, 23936, - 23937, 23939, 23928, 23930, 0, 16384, 24576, 24577, - 23552, 23808, 23936, 23937, 23939, 23928, 0, 16384, - 24576, 24577, 23552, 23808, 23936, 23937, 23939, 23928, - 23932, 0, 16384, 24576, 24577, 23552, 23808, 23936, - 23937, 23939, 23928, 23932, 0, 16384, 24576, 24577, - 23552, 23808, 23936, 23937, 23939, 23928, 23932, 23934, - 0, 16384, 24576, 24577, 23552, 23808, 0, 16384, - 24576, 24577, 23552, 24064, 23936, 0, 16384, 24576, - 24577, 23552, 24064, 23936, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 23938, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 0, 16384, 24576, 24577, 23552, - 24064, 23936, 23940, 0, 16384, 24576, 24577, 23552, - 24064, 23936, 23940, 0, 16384, 24576, 24577, 23552, - 24064, 23936, 23944, 23942, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 0, 16384, 24576, 24577, 23552, - 24064, 23936, 23944, 0, 16384, 24576, 24577, 23552, - 24064, 23936, 23944, 0, 16384, 24576, 24577, 23552, - 24064, 23936, 23944, 23946, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 23944, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 23952, 23948, 0, 16384, 24576, - 24577, 23552, 24064, 23936, 23952, 23948, 0, 16384, - 24576, 24577, 23552, 24064, 23936, 23952, 23953, 23950, - 0, 16384, 24576, 24577, 23552, 24064, 23936, 0, - 16384, 24576, 24577, 23552, 24064, 23936, 23952, 0, - 16384, 24576, 24577, 23552, 24064, 23936, 23952, 0, - 16384, 24576, 24577, 23552, 24064, 23936, 23952, 23954, - 0, 16384, 24576, 24577, 23552, 24064, 23936, 23952, - 0, 16384, 24576, 24577, 23552, 24064, 23936, 23952, - 23956, 0, 16384, 24576, 24577, 23552, 24064, 23936, - 23952, 23956, 0, 16384, 24576, 24577, 23552, 24064, - 23936, 23952, 23960, 23958, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 23952, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 23968, 23960, 0, 16384, 24576, - 24577, 23552, 24064, 23936, 23968, 23960, 0, 16384, - 24576, 24577, 23552, 24064, 23936, 23968, 23960, 23962, - 0, 16384, 24576, 24577, 23552, 24064, 23936, 23968, - 23960, 0, 16384, 24576, 24577, 23552, 24064, 23936, - 23968, 23969, 23964, 0, 16384, 24576, 24577, 23552, - 24064, 23936, 23968, 23969, 23964, 0, 16384, 24576, - 24577, 23552, 24064, 23936, 23968, 23969, 23964, 23966, - 0, 16384, 24576, 24577, 23552, 24064, 23936, 0, - 16384, 24576, 24577, 23552, 24064, 23936, 23968, 0, - 16384, 24576, 24577, 23552, 24064, 23936, 23968, 0, - 16384, 24576, 24577, 23552, 24064, 23936, 23968, 23970, - 0, 16384, 24576, 24577, 23552, 24064, 23936, 23968, - 0, 16384, 24576, 24577, 23552, 24064, 23936, 23968, - 23972, 0, 16384, 24576, 24577, 23552, 24064, 23936, - 23968, 23972, 0, 16384, 24576, 24577, 23552, 24064, - 23936, 23968, 23976, 23974, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 23968, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 23968, 23976, 0, 16384, 24576, - 24577, 23552, 24064, 23936, 23968, 23976, 0, 16384, - 24576, 24577, 23552, 24064, 23936, 23968, 23976, 23978, - 0, 16384, 24576, 24577, 23552, 24064, 23936, 23968, - 23976, 0, 16384, 24576, 24577, 23552, 24064, 23936, - 23968, 23984, 23980, 0, 16384, 24576, 24577, 23552, - 24064, 23936, 23968, 23984, 23980, 0, 16384, 24576, - 24577, 23552, 24064, 23936, 23968, 23984, 23985, 23982, - 0, 16384, 24576, 24577, 23552, 24064, 23936, 23968, - 0, 16384, 24576, 24577, 23552, 24064, 23936, 24000, - 23984, 0, 16384, 24576, 24577, 23552, 24064, 23936, - 24000, 23984, 0, 16384, 24576, 24577, 23552, 24064, - 23936, 24000, 23984, 23986, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 24000, 23984, 0, 16384, 24576, - 24577, 23552, 24064, 23936, 24000, 23984, 23988, 0, - 16384, 24576, 24577, 23552, 24064, 23936, 24000, 23984, - 23988, 0, 16384, 24576, 24577, 23552, 24064, 23936, - 24000, 23984, 23992, 23990, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 24000, 23984, 0, 16384, 24576, - 24577, 23552, 24064, 23936, 24000, 24001, 23992, 0, - 16384, 24576, 24577, 23552, 24064, 23936, 24000, 24001, - 23992, 0, 16384, 24576, 24577, 23552, 24064, 23936, - 24000, 24001, 23992, 23994, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 24000, 24001, 23992, 0, 16384, - 24576, 24577, 23552, 24064, 23936, 24000, 24001, 23992, - 23996, 0, 16384, 24576, 24577, 23552, 24064, 23936, - 24000, 24001, 24003, 23996, 0, 16384, 24576, 24577, - 23552, 24064, 23936, 24000, 24001, 24003, 23996, 23998, - 0, 16384, 24576, 24577, 23552, 24064, 23936, 0, - 16384, 24576, 24577, 23552, 24064, 24065, 24000, 0, - 16384, 24576, 24577, 23552, 24064, 24065, 24000, 0, - 16384, 24576, 24577, 23552, 24064, 24065, 24000, 24002, - 0, 16384, 24576, 24577, 23552, 24064, 24065, 24000, - 0, 16384, 24576, 24577, 23552, 24064, 24065, 24000, - 24004, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24000, 24004, 0, 16384, 24576, 24577, 23552, 24064, - 24065, 24000, 24008, 24006, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24000, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24000, 24008, 0, 16384, 24576, - 24577, 23552, 24064, 24065, 24000, 24008, 0, 16384, - 24576, 24577, 23552, 24064, 24065, 24000, 24008, 24010, - 0, 16384, 24576, 24577, 23552, 24064, 24065, 24000, - 24008, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24000, 24016, 24012, 0, 16384, 24576, 24577, 23552, - 24064, 24065, 24000, 24016, 24012, 0, 16384, 24576, - 24577, 23552, 24064, 24065, 24000, 24016, 24017, 24014, - 0, 16384, 24576, 24577, 23552, 24064, 24065, 24000, - 0, 16384, 24576, 24577, 23552, 24064, 24065, 24000, - 24016, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24000, 24016, 0, 16384, 24576, 24577, 23552, 24064, - 24065, 24000, 24016, 24018, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24000, 24016, 0, 16384, 24576, - 24577, 23552, 24064, 24065, 24000, 24016, 24020, 0, - 16384, 24576, 24577, 23552, 24064, 24065, 24000, 24016, - 24020, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24000, 24016, 24024, 24022, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24000, 24016, 0, 16384, 24576, - 24577, 23552, 24064, 24065, 24000, 24032, 24024, 0, - 16384, 24576, 24577, 23552, 24064, 24065, 24000, 24032, - 24024, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24000, 24032, 24024, 24026, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24000, 24032, 24024, 0, 16384, - 24576, 24577, 23552, 24064, 24065, 24000, 24032, 24033, - 24028, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24000, 24032, 24033, 24028, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24000, 24032, 24033, 24028, 24030, - 0, 16384, 24576, 24577, 23552, 24064, 24065, 24000, - 0, 16384, 24576, 24577, 23552, 24064, 24065, 24000, - 24032, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24067, 24032, 0, 16384, 24576, 24577, 23552, 24064, - 24065, 24067, 24032, 24034, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24067, 24032, 0, 16384, 24576, - 24577, 23552, 24064, 24065, 24067, 24032, 24036, 0, - 16384, 24576, 24577, 23552, 24064, 24065, 24067, 24032, - 24036, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24067, 24032, 24040, 24038, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24067, 24032, 0, 16384, 24576, - 24577, 23552, 24064, 24065, 24067, 24032, 24040, 0, - 16384, 24576, 24577, 23552, 24064, 24065, 24067, 24032, - 24040, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24067, 24032, 24040, 24042, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24067, 24032, 24040, 0, 16384, - 24576, 24577, 23552, 24064, 24065, 24067, 24032, 24048, - 24044, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24067, 24032, 24048, 24044, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24067, 24032, 24048, 24049, 24046, - 0, 16384, 24576, 24577, 23552, 24064, 24065, 24067, - 24032, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24067, 24032, 24048, 0, 16384, 24576, 24577, 23552, - 24064, 24065, 24067, 24032, 24048, 0, 16384, 24576, - 24577, 23552, 24064, 24065, 24067, 24032, 24048, 24050, - 0, 16384, 24576, 24577, 23552, 24064, 24065, 24067, - 24071, 24048, 0, 16384, 24576, 24577, 23552, 24064, - 24065, 24067, 24071, 24048, 24052, 0, 16384, 24576, - 24577, 23552, 24064, 24065, 24067, 24071, 24048, 24052, - 0, 16384, 24576, 24577, 23552, 24064, 24065, 24067, - 24071, 24048, 24056, 24054, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24067, 24071, 24048, 0, 16384, - 24576, 24577, 23552, 24064, 24065, 24067, 24071, 24048, - 24056, 0, 16384, 24576, 24577, 23552, 24064, 24065, - 24067, 24071, 24048, 24056, 0, 16384, 24576, 24577, - 23552, 24064, 24065, 24067, 24071, 24048, 24056, 24058, - 0, 16384, 24576, 24577, 23552, 24064, 24065, 24067, - 24071, 24048, 24056, 0, 16384, 24576, 24577, 23552, - 24064, 24065, 24067, 24071, 24048, 24056, 24060, 0, - 16384, 24576, 24577, 23552, 24064, 24065, 24067, 24071, - 24048, 24056, 24060, 0, 16384, 24576, 24577, 23552, - 24064, 24065, 24067, 24071, 24048, 24056, 24060, 24062, - 0, 16384, 24576, 24577, 23552, 0, 16384, 24576, - 24577, 23552, 24064, 0, 16384, 24576, 24577, 23552, - 24064, 0, 16384, 24576, 24577, 23552, 24064, 24066, - 0, 16384, 24576, 24577, 24579, 24064, 0, 16384, - 24576, 24577, 24579, 24064, 24068, 0, 16384, 24576, - 24577, 24579, 24064, 24068, 0, 16384, 24576, 24577, - 24579, 24064, 24072, 24070, 0, 16384, 24576, 24577, - 24579, 24064, 0, 16384, 24576, 24577, 24579, 24064, - 24072, 0, 16384, 24576, 24577, 24579, 24064, 24072, - 0, 16384, 24576, 24577, 24579, 24064, 24072, 24074, - 0, 16384, 24576, 24577, 24579, 24064, 24072, 0, - 16384, 24576, 24577, 24579, 24064, 24080, 24076, 0, - 16384, 24576, 24577, 24579, 24064, 24080, 24076, 0, - 16384, 24576, 24577, 24579, 24064, 24080, 24081, 24078, - 0, 16384, 24576, 24577, 24579, 24064, 0, 16384, - 24576, 24577, 24579, 24064, 24080, 0, 16384, 24576, - 24577, 24579, 24064, 24080, 0, 16384, 24576, 24577, - 24579, 24064, 24080, 24082, 0, 16384, 24576, 24577, - 24579, 24064, 24080, 0, 16384, 24576, 24577, 24579, - 24064, 24080, 24084, 0, 16384, 24576, 24577, 24579, - 24064, 24080, 24084, 0, 16384, 24576, 24577, 24579, - 24064, 24080, 24088, 24086, 0, 16384, 24576, 24577, - 24579, 24064, 24080, 0, 16384, 24576, 24577, 24579, - 24064, 24096, 24088, 0, 16384, 24576, 24577, 24579, - 24064, 24096, 24088, 0, 16384, 24576, 24577, 24579, - 24064, 24096, 24088, 24090, 0, 16384, 24576, 24577, - 24579, 24064, 24096, 24088, 0, 16384, 24576, 24577, - 24579, 24064, 24096, 24097, 24092, 0, 16384, 24576, - 24577, 24579, 24064, 24096, 24097, 24092, 0, 16384, - 24576, 24577, 24579, 24064, 24096, 24097, 24092, 24094, - 0, 16384, 24576, 24577, 24579, 24064, 0, 16384, - 24576, 24577, 24579, 24064, 24096, 0, 16384, 24576, - 24577, 24579, 24064, 24096, 0, 16384, 24576, 24577, - 24579, 24064, 24096, 24098, 0, 16384, 24576, 24577, - 24579, 24064, 24096, 0, 16384, 24576, 24577, 24579, - 24064, 24096, 24100, 0, 16384, 24576, 24577, 24579, - 24064, 24096, 24100, 0, 16384, 24576, 24577, 24579, - 24064, 24096, 24104, 24102, 0, 16384, 24576, 24577, - 24579, 24064, 24096, 0, 16384, 24576, 24577, 24579, - 24064, 24096, 24104, 0, 16384, 24576, 24577, 24579, - 24064, 24096, 24104, 0, 16384, 24576, 24577, 24579, - 24064, 24096, 24104, 24106, 0, 16384, 24576, 24577, - 24579, 24064, 24096, 24104, 0, 16384, 24576, 24577, - 24579, 24064, 24096, 24112, 24108, 0, 16384, 24576, - 24577, 24579, 24064, 24096, 24112, 24108, 0, 16384, - 24576, 24577, 24579, 24064, 24096, 24112, 24113, 24110, - 0, 16384, 24576, 24577, 24579, 24064, 24096, 0, - 16384, 24576, 24577, 24579, 24064, 24128, 24112, 0, - 16384, 24576, 24577, 24579, 24064, 24128, 24112, 0, - 16384, 24576, 24577, 24579, 24064, 24128, 24112, 24114, - 0, 16384, 24576, 24577, 24579, 24064, 24128, 24112, - 0, 16384, 24576, 24577, 24579, 24064, 24128, 24112, - 24116, 0, 16384, 24576, 24577, 24579, 24064, 24128, - 24112, 24116, 0, 16384, 24576, 24577, 24579, 24064, - 24128, 24112, 24120, 24118, 0, 16384, 24576, 24577, - 24579, 24064, 24128, 24112, 0, 16384, 24576, 24577, - 24579, 24064, 24128, 24129, 24120, 0, 16384, 24576, - 24577, 24579, 24064, 24128, 24129, 24120, 0, 16384, - 24576, 24577, 24579, 24064, 24128, 24129, 24120, 24122, - 0, 16384, 24576, 24577, 24579, 24064, 24128, 24129, - 24120, 0, 16384, 24576, 24577, 24579, 24064, 24128, - 24129, 24120, 24124, 0, 16384, 24576, 24577, 24579, - 24064, 24128, 24129, 24131, 24124, 0, 16384, 24576, - 24577, 24579, 24064, 24128, 24129, 24131, 24124, 24126, - 0, 16384, 24576, 24577, 24579, 24064, 0, 16384, - 24576, 24577, 24579, 24064, 24128, 0, 16384, 24576, - 24577, 24579, 24064, 24128, 0, 16384, 24576, 24577, - 24579, 24064, 24128, 24130, 0, 16384, 24576, 24577, - 24579, 24064, 24128, 0, 16384, 24576, 24577, 24579, - 24064, 24128, 24132, 0, 16384, 24576, 24577, 24579, - 24064, 24128, 24132, 0, 16384, 24576, 24577, 24579, - 24064, 24128, 24136, 24134, 0, 16384, 24576, 24577, - 24579, 24064, 24128, 0, 16384, 24576, 24577, 24579, - 24064, 24128, 24136, 0, 16384, 24576, 24577, 24579, - 24064, 24128, 24136, 0, 16384, 24576, 24577, 24579, - 24064, 24128, 24136, 24138, 0, 16384, 24576, 24577, - 24579, 24064, 24128, 24136, 0, 16384, 24576, 24577, - 24579, 24064, 24128, 24144, 24140, 0, 16384, 24576, - 24577, 24579, 24064, 24128, 24144, 24140, 0, 16384, - 24576, 24577, 24579, 24064, 24128, 24144, 24145, 24142, - 0, 16384, 24576, 24577, 24579, 24064, 24128, 0, - 16384, 24576, 24577, 24579, 24064, 24128, 24144, 0, - 16384, 24576, 24577, 24579, 24064, 24128, 24144, 0, - 16384, 24576, 24577, 24579, 24064, 24128, 24144, 24146, - 0, 16384, 24576, 24577, 24579, 24064, 24128, 24144, - 0, 16384, 24576, 24577, 24579, 24064, 24128, 24144, - 24148, 0, 16384, 24576, 24577, 24579, 24064, 24128, - 24144, 24148, 0, 16384, 24576, 24577, 24579, 24064, - 24128, 24144, 24152, 24150, 0, 16384, 24576, 24577, - 24579, 24064, 24128, 24144, 0, 16384, 24576, 24577, - 24579, 24064, 24128, 24160, 24152, 0, 16384, 24576, - 24577, 24579, 24064, 24128, 24160, 24152, 0, 16384, - 24576, 24577, 24579, 24064, 24128, 24160, 24152, 24154, - 0, 16384, 24576, 24577, 24579, 24064, 24128, 24160, - 24152, 0, 16384, 24576, 24577, 24579, 24064, 24128, - 24160, 24161, 24156, 0, 16384, 24576, 24577, 24579, - 24064, 24128, 24160, 24161, 24156, 0, 16384, 24576, - 24577, 24579, 24064, 24128, 24160, 24161, 24156, 24158, - 0, 16384, 24576, 24577, 24579, 24064, 24128, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24160, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24160, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24160, 24162, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24160, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24160, - 24164, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24160, 24164, 0, 16384, 24576, 24577, 24579, 24064, - 24192, 24160, 24168, 24166, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24160, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24160, 24168, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 24160, 24168, 0, 16384, - 24576, 24577, 24579, 24064, 24192, 24160, 24168, 24170, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24160, - 24168, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24160, 24176, 24172, 0, 16384, 24576, 24577, 24579, - 24064, 24192, 24160, 24176, 24172, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 24160, 24176, 24177, 24174, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24160, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24193, - 24176, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24193, 24176, 0, 16384, 24576, 24577, 24579, 24064, - 24192, 24193, 24176, 24178, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24193, 24176, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 24193, 24176, 24180, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24193, 24176, - 24180, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24193, 24176, 24184, 24182, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24193, 24176, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 24193, 24176, 24184, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24193, 24195, - 24184, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24193, 24195, 24184, 24186, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24193, 24195, 24184, 0, 16384, - 24576, 24577, 24579, 24064, 24192, 24193, 24195, 24184, - 24188, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24193, 24195, 24184, 24188, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24193, 24195, 24184, 24188, 24190, - 0, 16384, 24576, 24577, 24579, 24064, 0, 16384, - 24576, 24577, 24579, 24064, 24192, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24194, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 0, 16384, 24576, 24577, 24579, - 24064, 24192, 24196, 0, 16384, 24576, 24577, 24579, - 24064, 24192, 24196, 0, 16384, 24576, 24577, 24579, - 24064, 24192, 24200, 24198, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 0, 16384, 24576, 24577, 24579, - 24064, 24192, 24200, 0, 16384, 24576, 24577, 24579, - 24064, 24192, 24200, 0, 16384, 24576, 24577, 24579, - 24064, 24192, 24200, 24202, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24200, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24208, 24204, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 24208, 24204, 0, 16384, - 24576, 24577, 24579, 24064, 24192, 24208, 24209, 24206, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24208, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24208, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24208, 24210, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24208, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24208, - 24212, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24208, 24212, 0, 16384, 24576, 24577, 24579, 24064, - 24192, 24208, 24216, 24214, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24208, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24224, 24216, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 24224, 24216, 0, 16384, - 24576, 24577, 24579, 24064, 24192, 24224, 24216, 24218, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24224, - 24216, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24224, 24225, 24220, 0, 16384, 24576, 24577, 24579, - 24064, 24192, 24224, 24225, 24220, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 24224, 24225, 24220, 24222, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24224, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24224, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24224, 24226, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24224, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24224, - 24228, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24224, 24228, 0, 16384, 24576, 24577, 24579, 24064, - 24192, 24224, 24232, 24230, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24224, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24224, 24232, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 24224, 24232, 0, 16384, - 24576, 24577, 24579, 24064, 24192, 24224, 24232, 24234, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24224, - 24232, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24224, 24240, 24236, 0, 16384, 24576, 24577, 24579, - 24064, 24192, 24224, 24240, 24236, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 24224, 24240, 24241, 24238, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24224, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 24256, - 24240, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24256, 24240, 0, 16384, 24576, 24577, 24579, 24064, - 24192, 24256, 24240, 24242, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24256, 24240, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 24256, 24240, 24244, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24256, 24240, - 24244, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24256, 24240, 24248, 24246, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24256, 24240, 0, 16384, 24576, - 24577, 24579, 24064, 24192, 24256, 24257, 24248, 0, - 16384, 24576, 24577, 24579, 24064, 24192, 24256, 24257, - 24248, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24256, 24257, 24248, 24250, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24256, 24257, 24248, 0, 16384, - 24576, 24577, 24579, 24064, 24192, 24256, 24257, 24248, - 24252, 0, 16384, 24576, 24577, 24579, 24064, 24192, - 24256, 24257, 24259, 24252, 0, 16384, 24576, 24577, - 24579, 24064, 24192, 24256, 24257, 24259, 24252, 24254, - 0, 16384, 24576, 24577, 24579, 24064, 24192, 0, - 16384, 24576, 24577, 24579, 24064, 24320, 24256, 0, - 16384, 24576, 24577, 24579, 24064, 24320, 24256, 0, - 16384, 24576, 24577, 24579, 24064, 24320, 24256, 24258, - 0, 16384, 24576, 24577, 24579, 24064, 24320, 24256, - 0, 16384, 24576, 24577, 24579, 24064, 24320, 24256, - 24260, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24256, 24260, 0, 16384, 24576, 24577, 24579, 24064, - 24320, 24256, 24264, 24262, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24256, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24256, 24264, 0, 16384, 24576, - 24577, 24579, 24064, 24320, 24256, 24264, 0, 16384, - 24576, 24577, 24579, 24064, 24320, 24256, 24264, 24266, - 0, 16384, 24576, 24577, 24579, 24064, 24320, 24256, - 24264, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24256, 24272, 24268, 0, 16384, 24576, 24577, 24579, - 24064, 24320, 24256, 24272, 24268, 0, 16384, 24576, - 24577, 24579, 24064, 24320, 24256, 24272, 24273, 24270, - 0, 16384, 24576, 24577, 24579, 24064, 24320, 24256, - 0, 16384, 24576, 24577, 24579, 24064, 24320, 24256, - 24272, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24256, 24272, 0, 16384, 24576, 24577, 24579, 24064, - 24320, 24256, 24272, 24274, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24256, 24272, 0, 16384, 24576, - 24577, 24579, 24064, 24320, 24256, 24272, 24276, 0, - 16384, 24576, 24577, 24579, 24064, 24320, 24256, 24272, - 24276, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24256, 24272, 24280, 24278, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24256, 24272, 0, 16384, 24576, - 24577, 24579, 24064, 24320, 24256, 24288, 24280, 0, - 16384, 24576, 24577, 24579, 24064, 24320, 24256, 24288, - 24280, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24256, 24288, 24280, 24282, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24256, 24288, 24280, 0, 16384, - 24576, 24577, 24579, 24064, 24320, 24256, 24288, 24289, - 24284, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24256, 24288, 24289, 24284, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24256, 24288, 24289, 24284, 24286, - 0, 16384, 24576, 24577, 24579, 24064, 24320, 24256, - 0, 16384, 24576, 24577, 24579, 24064, 24320, 24321, - 24288, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24321, 24288, 0, 16384, 24576, 24577, 24579, 24064, - 24320, 24321, 24288, 24290, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24321, 24288, 0, 16384, 24576, - 24577, 24579, 24064, 24320, 24321, 24288, 24292, 0, - 16384, 24576, 24577, 24579, 24064, 24320, 24321, 24288, - 24292, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24321, 24288, 24296, 24294, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24321, 24288, 0, 16384, 24576, - 24577, 24579, 24064, 24320, 24321, 24288, 24296, 0, - 16384, 24576, 24577, 24579, 24064, 24320, 24321, 24288, - 24296, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24321, 24288, 24296, 24298, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24321, 24288, 24296, 0, 16384, - 24576, 24577, 24579, 24064, 24320, 24321, 24288, 24304, - 24300, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24321, 24288, 24304, 24300, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24321, 24288, 24304, 24305, 24302, - 0, 16384, 24576, 24577, 24579, 24064, 24320, 24321, - 24288, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24321, 24288, 24304, 0, 16384, 24576, 24577, 24579, - 24064, 24320, 24321, 24323, 24304, 0, 16384, 24576, - 24577, 24579, 24064, 24320, 24321, 24323, 24304, 24306, - 0, 16384, 24576, 24577, 24579, 24064, 24320, 24321, - 24323, 24304, 0, 16384, 24576, 24577, 24579, 24064, - 24320, 24321, 24323, 24304, 24308, 0, 16384, 24576, - 24577, 24579, 24064, 24320, 24321, 24323, 24304, 24308, - 0, 16384, 24576, 24577, 24579, 24064, 24320, 24321, - 24323, 24304, 24312, 24310, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24321, 24323, 24304, 0, 16384, - 24576, 24577, 24579, 24064, 24320, 24321, 24323, 24304, - 24312, 0, 16384, 24576, 24577, 24579, 24064, 24320, - 24321, 24323, 24304, 24312, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24321, 24323, 24304, 24312, 24314, - 0, 16384, 24576, 24577, 24579, 24064, 24320, 24321, - 24323, 24327, 24312, 0, 16384, 24576, 24577, 24579, - 24064, 24320, 24321, 24323, 24327, 24312, 24316, 0, - 16384, 24576, 24577, 24579, 24064, 24320, 24321, 24323, - 24327, 24312, 24316, 0, 16384, 24576, 24577, 24579, - 24064, 24320, 24321, 24323, 24327, 24312, 24316, 24318, - 0, 16384, 24576, 24577, 24579, 24064, 0, 16384, - 24576, 24577, 24579, 24064, 24320, 0, 16384, 24576, - 24577, 24579, 24064, 24320, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 24322, 0, 16384, 24576, 24577, - 24579, 24064, 24320, 0, 16384, 24576, 24577, 24579, - 24064, 24320, 24324, 0, 16384, 24576, 24577, 24579, - 24064, 24320, 24324, 0, 16384, 24576, 24577, 24579, - 24064, 24320, 24328, 24326, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 0, 16384, 24576, 24577, 24579, - 24583, 24320, 24328, 0, 16384, 24576, 24577, 24579, - 24583, 24320, 24328, 0, 16384, 24576, 24577, 24579, - 24583, 24320, 24328, 24330, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24328, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24336, 24332, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24336, 24332, 0, 16384, - 24576, 24577, 24579, 24583, 24320, 24336, 24337, 24334, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24336, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24336, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24336, 24338, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24336, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24336, - 24340, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24336, 24340, 0, 16384, 24576, 24577, 24579, 24583, - 24320, 24336, 24344, 24342, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24336, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24352, 24344, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24352, 24344, 0, 16384, - 24576, 24577, 24579, 24583, 24320, 24352, 24344, 24346, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24352, - 24344, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24352, 24353, 24348, 0, 16384, 24576, 24577, 24579, - 24583, 24320, 24352, 24353, 24348, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24352, 24353, 24348, 24350, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24352, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24352, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24352, 24354, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24352, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24352, - 24356, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24352, 24356, 0, 16384, 24576, 24577, 24579, 24583, - 24320, 24352, 24360, 24358, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24352, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24352, 24360, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24352, 24360, 0, 16384, - 24576, 24577, 24579, 24583, 24320, 24352, 24360, 24362, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24352, - 24360, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24352, 24368, 24364, 0, 16384, 24576, 24577, 24579, - 24583, 24320, 24352, 24368, 24364, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24352, 24368, 24369, 24366, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24352, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24384, - 24368, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24384, 24368, 0, 16384, 24576, 24577, 24579, 24583, - 24320, 24384, 24368, 24370, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24384, 24368, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24384, 24368, 24372, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24384, 24368, - 24372, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24384, 24368, 24376, 24374, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24384, 24368, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24384, 24385, 24376, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24384, 24385, - 24376, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24384, 24385, 24376, 24378, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24384, 24385, 24376, 0, 16384, - 24576, 24577, 24579, 24583, 24320, 24384, 24385, 24376, - 24380, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24384, 24385, 24387, 24380, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24384, 24385, 24387, 24380, 24382, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24384, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24384, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24384, 24386, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24384, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24384, - 24388, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24384, 24388, 0, 16384, 24576, 24577, 24579, 24583, - 24320, 24384, 24392, 24390, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24384, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24384, 24392, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24384, 24392, 0, 16384, - 24576, 24577, 24579, 24583, 24320, 24384, 24392, 24394, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24384, - 24392, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24384, 24400, 24396, 0, 16384, 24576, 24577, 24579, - 24583, 24320, 24384, 24400, 24396, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24384, 24400, 24401, 24398, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24384, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24384, - 24400, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24384, 24400, 0, 16384, 24576, 24577, 24579, 24583, - 24320, 24384, 24400, 24402, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24384, 24400, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24384, 24400, 24404, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24384, 24400, - 24404, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24384, 24400, 24408, 24406, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24384, 24400, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24384, 24416, 24408, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24384, 24416, - 24408, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24384, 24416, 24408, 24410, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24384, 24416, 24408, 0, 16384, - 24576, 24577, 24579, 24583, 24320, 24384, 24416, 24417, - 24412, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24384, 24416, 24417, 24412, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24384, 24416, 24417, 24412, 24414, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24384, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24448, - 24416, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24448, 24416, 0, 16384, 24576, 24577, 24579, 24583, - 24320, 24448, 24416, 24418, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24448, 24416, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24448, 24416, 24420, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24448, 24416, - 24420, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24448, 24416, 24424, 24422, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24448, 24416, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24448, 24416, 24424, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24448, 24416, - 24424, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24448, 24416, 24424, 24426, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24448, 24416, 24424, 0, 16384, - 24576, 24577, 24579, 24583, 24320, 24448, 24416, 24432, - 24428, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24448, 24416, 24432, 24428, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24448, 24416, 24432, 24433, 24430, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24448, - 24416, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24448, 24449, 24432, 0, 16384, 24576, 24577, 24579, - 24583, 24320, 24448, 24449, 24432, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24448, 24449, 24432, 24434, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24448, - 24449, 24432, 0, 16384, 24576, 24577, 24579, 24583, - 24320, 24448, 24449, 24432, 24436, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24448, 24449, 24432, 24436, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24448, - 24449, 24432, 24440, 24438, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24448, 24449, 24432, 0, 16384, - 24576, 24577, 24579, 24583, 24320, 24448, 24449, 24432, - 24440, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24448, 24449, 24451, 24440, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24448, 24449, 24451, 24440, 24442, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24448, - 24449, 24451, 24440, 0, 16384, 24576, 24577, 24579, - 24583, 24320, 24448, 24449, 24451, 24440, 24444, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24448, 24449, - 24451, 24440, 24444, 0, 16384, 24576, 24577, 24579, - 24583, 24320, 24448, 24449, 24451, 24440, 24444, 24446, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24448, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24448, 0, - 16384, 24576, 24577, 24579, 24583, 24320, 24448, 24450, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24448, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24448, - 24452, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24448, 24452, 0, 16384, 24576, 24577, 24579, 24583, - 24320, 24448, 24456, 24454, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24448, 0, 16384, 24576, 24577, - 24579, 24583, 24320, 24448, 24456, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24448, 24456, 0, 16384, - 24576, 24577, 24579, 24583, 24320, 24448, 24456, 24458, - 0, 16384, 24576, 24577, 24579, 24583, 24320, 24448, - 24456, 0, 16384, 24576, 24577, 24579, 24583, 24320, - 24448, 24464, 24460, 0, 16384, 24576, 24577, 24579, - 24583, 24320, 24448, 24464, 24460, 0, 16384, 24576, - 24577, 24579, 24583, 24320, 24448, 24464, 24465, 24462, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 24464, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24464, 0, 16384, 24576, 24577, 24579, 24583, - 24591, 24448, 24464, 24466, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24464, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24448, 24464, 24468, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24448, 24464, - 24468, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24464, 24472, 24470, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24464, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24448, 24480, 24472, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24448, 24480, - 24472, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24480, 24472, 24474, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24480, 24472, 0, 16384, - 24576, 24577, 24579, 24583, 24591, 24448, 24480, 24481, - 24476, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24480, 24481, 24476, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24480, 24481, 24476, 24478, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 24480, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24480, 0, 16384, 24576, 24577, 24579, 24583, - 24591, 24448, 24480, 24482, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24480, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24448, 24480, 24484, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24448, 24480, - 24484, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24480, 24488, 24486, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24480, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24448, 24480, 24488, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24448, 24480, - 24488, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24480, 24488, 24490, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24480, 24488, 0, 16384, - 24576, 24577, 24579, 24583, 24591, 24448, 24480, 24496, - 24492, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24480, 24496, 24492, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24480, 24496, 24497, 24494, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 24480, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24512, 24496, 0, 16384, 24576, 24577, 24579, - 24583, 24591, 24448, 24512, 24496, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24448, 24512, 24496, 24498, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 24512, 24496, 0, 16384, 24576, 24577, 24579, 24583, - 24591, 24448, 24512, 24496, 24500, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24448, 24512, 24496, 24500, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 24512, 24496, 24504, 24502, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24512, 24496, 0, 16384, - 24576, 24577, 24579, 24583, 24591, 24448, 24512, 24513, - 24504, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24512, 24513, 24504, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24512, 24513, 24504, 24506, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 24512, 24513, 24504, 0, 16384, 24576, 24577, 24579, - 24583, 24591, 24448, 24512, 24513, 24504, 24508, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24448, 24512, - 24513, 24515, 24508, 0, 16384, 24576, 24577, 24579, - 24583, 24591, 24448, 24512, 24513, 24515, 24508, 24510, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 24512, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24512, 0, 16384, 24576, 24577, 24579, 24583, - 24591, 24448, 24512, 24514, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24512, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24448, 24512, 24516, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24448, 24512, - 24516, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24512, 24520, 24518, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24512, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24448, 24512, 24520, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24448, 24512, - 24520, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24512, 24520, 24522, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24512, 24520, 0, 16384, - 24576, 24577, 24579, 24583, 24591, 24448, 24512, 24528, - 24524, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24512, 24528, 24524, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24512, 24528, 24529, 24526, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 24512, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24512, 24528, 0, 16384, 24576, 24577, 24579, - 24583, 24591, 24448, 24512, 24528, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24448, 24512, 24528, 24530, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 24512, 24528, 0, 16384, 24576, 24577, 24579, 24583, - 24591, 24448, 24512, 24528, 24532, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24448, 24512, 24528, 24532, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 24512, 24528, 24536, 24534, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24512, 24528, 0, 16384, - 24576, 24577, 24579, 24583, 24591, 24448, 24512, 24544, - 24536, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24448, 24512, 24544, 24536, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24448, 24512, 24544, 24536, 24538, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24448, - 24512, 24544, 24536, 0, 16384, 24576, 24577, 24579, - 24583, 24591, 24448, 24512, 24544, 24545, 24540, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24448, 24512, - 24544, 24545, 24540, 0, 16384, 24576, 24577, 24579, - 24583, 24591, 24448, 24512, 24544, 24545, 24540, 24542, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24607, - 24512, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24607, 24512, 24544, 0, 16384, 24576, 24577, 24579, - 24583, 24591, 24607, 24512, 24544, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24607, 24512, 24544, 24546, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24607, - 24512, 24544, 0, 16384, 24576, 24577, 24579, 24583, - 24591, 24607, 24512, 24544, 24548, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24607, 24512, 24544, 24548, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24607, - 24512, 24544, 24552, 24550, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24607, 24512, 24544, 0, 16384, - 24576, 24577, 24579, 24583, 24591, 24607, 24512, 24544, - 24552, 0, 16384, 24576, 24577, 24579, 24583, 24591, - 24607, 24512, 24544, 24552, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24607, 24512, 24544, 24552, 24554, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24607, - 24512, 24544, 24552, 0, 16384, 24576, 24577, 24579, - 24583, 24591, 24607, 24512, 24544, 24560, 24556, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24607, 24512, - 24544, 24560, 24556, 0, 16384, 24576, 24577, 24579, - 24583, 24591, 24607, 24512, 24544, 24560, 24561, 24558, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24607, - 24512, 24544, 0, 16384, 24576, 24577, 24579, 24583, - 24591, 24607, 24512, 24544, 24560, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24607, 24512, 24544, 24560, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24607, - 24512, 24544, 24560, 24562, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24607, 24512, 24544, 24560, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24607, 24512, - 24544, 24560, 24564, 0, 16384, 24576, 24577, 24579, - 24583, 24591, 24607, 24512, 24544, 24560, 24564, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24607, 24512, - 24544, 24560, 24568, 24566, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24607, 24512, 24544, 24560, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24607, 24512, - 24544, 24560, 24568, 0, 16384, 24576, 24577, 24579, - 24583, 24591, 24607, 24512, 24544, 24560, 24568, 0, - 16384, 24576, 24577, 24579, 24583, 24591, 24607, 24512, - 24544, 24560, 24568, 24570, 0, 16384, 24576, 24577, - 24579, 24583, 24591, 24607, 24512, 24544, 24560, 24568, - 0, 16384, 24576, 24577, 24579, 24583, 24591, 24607, - 24512, 24544, 24560, 24568, 24572, 0, 16384, 24576, - 24577, 24579, 24583, 24591, 24607, 24512, 24544, 24560, - 24568, 24572, 0, 16384, 24576, 24577, 24579, 24583, - 24591, 24607, 24512, 24544, 24560, 24568, 24572, 24574, - 0, 16384, 0, 16384, 24576, 0, 16384, 24576, - 0, 16384, 24576, 24578, 0, 16384, 24576, 0, - 16384, 24576, 24580, 0, 16384, 24576, 24580, 0, - 16384, 24576, 24584, 24582, 0, 16384, 24576, 0, - 16384, 24576, 24584, 0, 16384, 24576, 24584, 0, - 16384, 24576, 24584, 24586, 0, 16384, 24576, 24584, - 0, 16384, 24576, 24592, 24588, 0, 16384, 24576, - 24592, 24588, 0, 16384, 24576, 24592, 24593, 24590, - 0, 16384, 24576, 0, 16384, 24576, 24592, 0, - 16384, 24576, 24592, 0, 16384, 24576, 24592, 24594, - 0, 16384, 24576, 24592, 0, 16384, 24576, 24592, - 24596, 0, 16384, 24576, 24592, 24596, 0, 16384, - 24576, 24592, 24600, 24598, 0, 16384, 24576, 24592, - 0, 16384, 24576, 24608, 24600, 0, 16384, 24576, - 24608, 24600, 0, 16384, 24576, 24608, 24600, 24602, - 0, 16384, 24576, 24608, 24600, 0, 16384, 24576, - 24608, 24609, 24604, 0, 16384, 24576, 24608, 24609, - 24604, 0, 16384, 24576, 24608, 24609, 24604, 24606, - 0, 16384, 24576, 0, 16384, 24576, 24608, 0, - 16384, 24576, 24608, 0, 16384, 24576, 24608, 24610, - 0, 16384, 24576, 24608, 0, 16384, 24576, 24608, - 24612, 0, 16384, 24576, 24608, 24612, 0, 16384, - 24576, 24608, 24616, 24614, 0, 16384, 24576, 24608, - 0, 16384, 24576, 24608, 24616, 0, 16384, 24576, - 24608, 24616, 0, 16384, 24576, 24608, 24616, 24618, - 0, 16384, 24576, 24608, 24616, 0, 16384, 24576, - 24608, 24624, 24620, 0, 16384, 24576, 24608, 24624, - 24620, 0, 16384, 24576, 24608, 24624, 24625, 24622, - 0, 16384, 24576, 24608, 0, 16384, 24576, 24640, - 24624, 0, 16384, 24576, 24640, 24624, 0, 16384, - 24576, 24640, 24624, 24626, 0, 16384, 24576, 24640, - 24624, 0, 16384, 24576, 24640, 24624, 24628, 0, - 16384, 24576, 24640, 24624, 24628, 0, 16384, 24576, - 24640, 24624, 24632, 24630, 0, 16384, 24576, 24640, - 24624, 0, 16384, 24576, 24640, 24641, 24632, 0, - 16384, 24576, 24640, 24641, 24632, 0, 16384, 24576, - 24640, 24641, 24632, 24634, 0, 16384, 24576, 24640, - 24641, 24632, 0, 16384, 24576, 24640, 24641, 24632, - 24636, 0, 16384, 24576, 24640, 24641, 24643, 24636, - 0, 16384, 24576, 24640, 24641, 24643, 24636, 24638, - 0, 16384, 24576, 0, 16384, 24576, 24640, 0, - 16384, 24576, 24640, 0, 16384, 24576, 24640, 24642, - 0, 16384, 24576, 24640, 0, 16384, 24576, 24640, - 24644, 0, 16384, 24576, 24640, 24644, 0, 16384, - 24576, 24640, 24648, 24646, 0, 16384, 24576, 24640, - 0, 16384, 24576, 24640, 24648, 0, 16384, 24576, - 24640, 24648, 0, 16384, 24576, 24640, 24648, 24650, - 0, 16384, 24576, 24640, 24648, 0, 16384, 24576, - 24640, 24656, 24652, 0, 16384, 24576, 24640, 24656, - 24652, 0, 16384, 24576, 24640, 24656, 24657, 24654, - 0, 16384, 24576, 24640, 0, 16384, 24576, 24640, - 24656, 0, 16384, 24576, 24640, 24656, 0, 16384, - 24576, 24640, 24656, 24658, 0, 16384, 24576, 24640, - 24656, 0, 16384, 24576, 24640, 24656, 24660, 0, - 16384, 24576, 24640, 24656, 24660, 0, 16384, 24576, - 24640, 24656, 24664, 24662, 0, 16384, 24576, 24640, - 24656, 0, 16384, 24576, 24640, 24672, 24664, 0, - 16384, 24576, 24640, 24672, 24664, 0, 16384, 24576, - 24640, 24672, 24664, 24666, 0, 16384, 24576, 24640, - 24672, 24664, 0, 16384, 24576, 24640, 24672, 24673, - 24668, 0, 16384, 24576, 24640, 24672, 24673, 24668, - 0, 16384, 24576, 24640, 24672, 24673, 24668, 24670, - 0, 16384, 24576, 24640, 0, 16384, 24576, 24704, - 24672, 0, 16384, 24576, 24704, 24672, 0, 16384, - 24576, 24704, 24672, 24674, 0, 16384, 24576, 24704, - 24672, 0, 16384, 24576, 24704, 24672, 24676, 0, - 16384, 24576, 24704, 24672, 24676, 0, 16384, 24576, - 24704, 24672, 24680, 24678, 0, 16384, 24576, 24704, - 24672, 0, 16384, 24576, 24704, 24672, 24680, 0, - 16384, 24576, 24704, 24672, 24680, 0, 16384, 24576, - 24704, 24672, 24680, 24682, 0, 16384, 24576, 24704, - 24672, 24680, 0, 16384, 24576, 24704, 24672, 24688, - 24684, 0, 16384, 24576, 24704, 24672, 24688, 24684, - 0, 16384, 24576, 24704, 24672, 24688, 24689, 24686, - 0, 16384, 24576, 24704, 24672, 0, 16384, 24576, - 24704, 24705, 24688, 0, 16384, 24576, 24704, 24705, - 24688, 0, 16384, 24576, 24704, 24705, 24688, 24690, - 0, 16384, 24576, 24704, 24705, 24688, 0, 16384, - 24576, 24704, 24705, 24688, 24692, 0, 16384, 24576, - 24704, 24705, 24688, 24692, 0, 16384, 24576, 24704, - 24705, 24688, 24696, 24694, 0, 16384, 24576, 24704, - 24705, 24688, 0, 16384, 24576, 24704, 24705, 24688, - 24696, 0, 16384, 24576, 24704, 24705, 24707, 24696, - 0, 16384, 24576, 24704, 24705, 24707, 24696, 24698, - 0, 16384, 24576, 24704, 24705, 24707, 24696, 0, - 16384, 24576, 24704, 24705, 24707, 24696, 24700, 0, - 16384, 24576, 24704, 24705, 24707, 24696, 24700, 0, - 16384, 24576, 24704, 24705, 24707, 24696, 24700, 24702, - 0, 16384, 24576, 0, 16384, 24576, 24704, 0, - 16384, 24576, 24704, 0, 16384, 24576, 24704, 24706, - 0, 16384, 24576, 24704, 0, 16384, 24576, 24704, - 24708, 0, 16384, 24576, 24704, 24708, 0, 16384, - 24576, 24704, 24712, 24710, 0, 16384, 24576, 24704, - 0, 16384, 24576, 24704, 24712, 0, 16384, 24576, - 24704, 24712, 0, 16384, 24576, 24704, 24712, 24714, - 0, 16384, 24576, 24704, 24712, 0, 16384, 24576, - 24704, 24720, 24716, 0, 16384, 24576, 24704, 24720, - 24716, 0, 16384, 24576, 24704, 24720, 24721, 24718, - 0, 16384, 24576, 24704, 0, 16384, 24576, 24704, - 24720, 0, 16384, 24576, 24704, 24720, 0, 16384, - 24576, 24704, 24720, 24722, 0, 16384, 24576, 24704, - 24720, 0, 16384, 24576, 24704, 24720, 24724, 0, - 16384, 24576, 24704, 24720, 24724, 0, 16384, 24576, - 24704, 24720, 24728, 24726, 0, 16384, 24576, 24704, - 24720, 0, 16384, 24576, 24704, 24736, 24728, 0, - 16384, 24576, 24704, 24736, 24728, 0, 16384, 24576, - 24704, 24736, 24728, 24730, 0, 16384, 24576, 24704, - 24736, 24728, 0, 16384, 24576, 24704, 24736, 24737, - 24732, 0, 16384, 24576, 24704, 24736, 24737, 24732, - 0, 16384, 24576, 24704, 24736, 24737, 24732, 24734, - 0, 16384, 24576, 24704, 0, 16384, 24576, 24704, - 24736, 0, 16384, 24576, 24704, 24736, 0, 16384, - 24576, 24704, 24736, 24738, 0, 16384, 24576, 24704, - 24736, 0, 16384, 24576, 24704, 24736, 24740, 0, - 16384, 24576, 24704, 24736, 24740, 0, 16384, 24576, - 24704, 24736, 24744, 24742, 0, 16384, 24576, 24704, - 24736, 0, 16384, 24576, 24704, 24736, 24744, 0, - 16384, 24576, 24704, 24736, 24744, 0, 16384, 24576, - 24704, 24736, 24744, 24746, 0, 16384, 24576, 24704, - 24736, 24744, 0, 16384, 24576, 24704, 24736, 24752, - 24748, 0, 16384, 24576, 24704, 24736, 24752, 24748, - 0, 16384, 24576, 24704, 24736, 24752, 24753, 24750, - 0, 16384, 24576, 24704, 24736, 0, 16384, 24576, - 24704, 24768, 24752, 0, 16384, 24576, 24704, 24768, - 24752, 0, 16384, 24576, 24704, 24768, 24752, 24754, - 0, 16384, 24576, 24704, 24768, 24752, 0, 16384, - 24576, 24704, 24768, 24752, 24756, 0, 16384, 24576, - 24704, 24768, 24752, 24756, 0, 16384, 24576, 24704, - 24768, 24752, 24760, 24758, 0, 16384, 24576, 24704, - 24768, 24752, 0, 16384, 24576, 24704, 24768, 24769, - 24760, 0, 16384, 24576, 24704, 24768, 24769, 24760, - 0, 16384, 24576, 24704, 24768, 24769, 24760, 24762, - 0, 16384, 24576, 24704, 24768, 24769, 24760, 0, - 16384, 24576, 24704, 24768, 24769, 24760, 24764, 0, - 16384, 24576, 24704, 24768, 24769, 24771, 24764, 0, - 16384, 24576, 24704, 24768, 24769, 24771, 24764, 24766, - 0, 16384, 24576, 24704, 0, 16384, 24576, 24832, - 24768, 0, 16384, 24576, 24832, 24768, 0, 16384, - 24576, 24832, 24768, 24770, 0, 16384, 24576, 24832, - 24768, 0, 16384, 24576, 24832, 24768, 24772, 0, - 16384, 24576, 24832, 24768, 24772, 0, 16384, 24576, - 24832, 24768, 24776, 24774, 0, 16384, 24576, 24832, - 24768, 0, 16384, 24576, 24832, 24768, 24776, 0, - 16384, 24576, 24832, 24768, 24776, 0, 16384, 24576, - 24832, 24768, 24776, 24778, 0, 16384, 24576, 24832, - 24768, 24776, 0, 16384, 24576, 24832, 24768, 24784, - 24780, 0, 16384, 24576, 24832, 24768, 24784, 24780, - 0, 16384, 24576, 24832, 24768, 24784, 24785, 24782, - 0, 16384, 24576, 24832, 24768, 0, 16384, 24576, - 24832, 24768, 24784, 0, 16384, 24576, 24832, 24768, - 24784, 0, 16384, 24576, 24832, 24768, 24784, 24786, - 0, 16384, 24576, 24832, 24768, 24784, 0, 16384, - 24576, 24832, 24768, 24784, 24788, 0, 16384, 24576, - 24832, 24768, 24784, 24788, 0, 16384, 24576, 24832, - 24768, 24784, 24792, 24790, 0, 16384, 24576, 24832, - 24768, 24784, 0, 16384, 24576, 24832, 24768, 24800, - 24792, 0, 16384, 24576, 24832, 24768, 24800, 24792, - 0, 16384, 24576, 24832, 24768, 24800, 24792, 24794, - 0, 16384, 24576, 24832, 24768, 24800, 24792, 0, - 16384, 24576, 24832, 24768, 24800, 24801, 24796, 0, - 16384, 24576, 24832, 24768, 24800, 24801, 24796, 0, - 16384, 24576, 24832, 24768, 24800, 24801, 24796, 24798, - 0, 16384, 24576, 24832, 24768, 0, 16384, 24576, - 24832, 24833, 24800, 0, 16384, 24576, 24832, 24833, - 24800, 0, 16384, 24576, 24832, 24833, 24800, 24802, - 0, 16384, 24576, 24832, 24833, 24800, 0, 16384, - 24576, 24832, 24833, 24800, 24804, 0, 16384, 24576, - 24832, 24833, 24800, 24804, 0, 16384, 24576, 24832, - 24833, 24800, 24808, 24806, 0, 16384, 24576, 24832, - 24833, 24800, 0, 16384, 24576, 24832, 24833, 24800, - 24808, 0, 16384, 24576, 24832, 24833, 24800, 24808, - 0, 16384, 24576, 24832, 24833, 24800, 24808, 24810, - 0, 16384, 24576, 24832, 24833, 24800, 24808, 0, - 16384, 24576, 24832, 24833, 24800, 24816, 24812, 0, - 16384, 24576, 24832, 24833, 24800, 24816, 24812, 0, - 16384, 24576, 24832, 24833, 24800, 24816, 24817, 24814, - 0, 16384, 24576, 24832, 24833, 24800, 0, 16384, - 24576, 24832, 24833, 24800, 24816, 0, 16384, 24576, - 24832, 24833, 24835, 24816, 0, 16384, 24576, 24832, - 24833, 24835, 24816, 24818, 0, 16384, 24576, 24832, - 24833, 24835, 24816, 0, 16384, 24576, 24832, 24833, - 24835, 24816, 24820, 0, 16384, 24576, 24832, 24833, - 24835, 24816, 24820, 0, 16384, 24576, 24832, 24833, - 24835, 24816, 24824, 24822, 0, 16384, 24576, 24832, - 24833, 24835, 24816, 0, 16384, 24576, 24832, 24833, - 24835, 24816, 24824, 0, 16384, 24576, 24832, 24833, - 24835, 24816, 24824, 0, 16384, 24576, 24832, 24833, - 24835, 24816, 24824, 24826, 0, 16384, 24576, 24832, - 24833, 24835, 24839, 24824, 0, 16384, 24576, 24832, - 24833, 24835, 24839, 24824, 24828, 0, 16384, 24576, - 24832, 24833, 24835, 24839, 24824, 24828, 0, 16384, - 24576, 24832, 24833, 24835, 24839, 24824, 24828, 24830, - 0, 16384, 24576, 0, 16384, 24576, 24832, 0, - 16384, 24576, 24832, 0, 16384, 24576, 24832, 24834, - 0, 16384, 24576, 24832, 0, 16384, 24576, 24832, - 24836, 0, 16384, 24576, 24832, 24836, 0, 16384, - 24576, 24832, 24840, 24838, 0, 16384, 24576, 24832, - 0, 16384, 24576, 24832, 24840, 0, 16384, 24576, - 24832, 24840, 0, 16384, 24576, 24832, 24840, 24842, - 0, 16384, 24576, 24832, 24840, 0, 16384, 24576, - 24832, 24848, 24844, 0, 16384, 24576, 24832, 24848, - 24844, 0, 16384, 24576, 24832, 24848, 24849, 24846, - 0, 16384, 24576, 24832, 0, 16384, 24576, 24832, - 24848, 0, 16384, 24576, 24832, 24848, 0, 16384, - 24576, 24832, 24848, 24850, 0, 16384, 24576, 24832, - 24848, 0, 16384, 24576, 24832, 24848, 24852, 0, - 16384, 24576, 24832, 24848, 24852, 0, 16384, 24576, - 24832, 24848, 24856, 24854, 0, 16384, 24576, 24832, - 24848, 0, 16384, 24576, 24832, 24864, 24856, 0, - 16384, 24576, 24832, 24864, 24856, 0, 16384, 24576, - 24832, 24864, 24856, 24858, 0, 16384, 24576, 24832, - 24864, 24856, 0, 16384, 24576, 24832, 24864, 24865, - 24860, 0, 16384, 24576, 24832, 24864, 24865, 24860, - 0, 16384, 24576, 24832, 24864, 24865, 24860, 24862, - 0, 16384, 24576, 24832, 0, 16384, 24576, 24832, - 24864, 0, 16384, 24576, 24832, 24864, 0, 16384, - 24576, 24832, 24864, 24866, 0, 16384, 24576, 24832, - 24864, 0, 16384, 24576, 24832, 24864, 24868, 0, - 16384, 24576, 24832, 24864, 24868, 0, 16384, 24576, - 24832, 24864, 24872, 24870, 0, 16384, 24576, 24832, - 24864, 0, 16384, 24576, 24832, 24864, 24872, 0, - 16384, 24576, 24832, 24864, 24872, 0, 16384, 24576, - 24832, 24864, 24872, 24874, 0, 16384, 24576, 24832, - 24864, 24872, 0, 16384, 24576, 24832, 24864, 24880, - 24876, 0, 16384, 24576, 24832, 24864, 24880, 24876, - 0, 16384, 24576, 24832, 24864, 24880, 24881, 24878, - 0, 16384, 24576, 24832, 24864, 0, 16384, 24576, - 24832, 24896, 24880, 0, 16384, 24576, 24832, 24896, - 24880, 0, 16384, 24576, 24832, 24896, 24880, 24882, - 0, 16384, 24576, 24832, 24896, 24880, 0, 16384, - 24576, 24832, 24896, 24880, 24884, 0, 16384, 24576, - 24832, 24896, 24880, 24884, 0, 16384, 24576, 24832, - 24896, 24880, 24888, 24886, 0, 16384, 24576, 24832, - 24896, 24880, 0, 16384, 24576, 24832, 24896, 24897, - 24888, 0, 16384, 24576, 24832, 24896, 24897, 24888, - 0, 16384, 24576, 24832, 24896, 24897, 24888, 24890, - 0, 16384, 24576, 24832, 24896, 24897, 24888, 0, - 16384, 24576, 24832, 24896, 24897, 24888, 24892, 0, - 16384, 24576, 24832, 24896, 24897, 24899, 24892, 0, - 16384, 24576, 24832, 24896, 24897, 24899, 24892, 24894, - 0, 16384, 24576, 24832, 0, 16384, 24576, 24832, - 24896, 0, 16384, 24576, 24832, 24896, 0, 16384, - 24576, 24832, 24896, 24898, 0, 16384, 24576, 24832, - 24896, 0, 16384, 24576, 24832, 24896, 24900, 0, - 16384, 24576, 24832, 24896, 24900, 0, 16384, 24576, - 24832, 24896, 24904, 24902, 0, 16384, 24576, 24832, - 24896, 0, 16384, 24576, 24832, 24896, 24904, 0, - 16384, 24576, 24832, 24896, 24904, 0, 16384, 24576, - 24832, 24896, 24904, 24906, 0, 16384, 24576, 24832, - 24896, 24904, 0, 16384, 24576, 24832, 24896, 24912, - 24908, 0, 16384, 24576, 24832, 24896, 24912, 24908, - 0, 16384, 24576, 24832, 24896, 24912, 24913, 24910, - 0, 16384, 24576, 24832, 24896, 0, 16384, 24576, - 24832, 24896, 24912, 0, 16384, 24576, 24832, 24896, - 24912, 0, 16384, 24576, 24832, 24896, 24912, 24914, - 0, 16384, 24576, 24832, 24896, 24912, 0, 16384, - 24576, 24832, 24896, 24912, 24916, 0, 16384, 24576, - 24832, 24896, 24912, 24916, 0, 16384, 24576, 24832, - 24896, 24912, 24920, 24918, 0, 16384, 24576, 24832, - 24896, 24912, 0, 16384, 24576, 24832, 24896, 24928, - 24920, 0, 16384, 24576, 24832, 24896, 24928, 24920, - 0, 16384, 24576, 24832, 24896, 24928, 24920, 24922, - 0, 16384, 24576, 24832, 24896, 24928, 24920, 0, - 16384, 24576, 24832, 24896, 24928, 24929, 24924, 0, - 16384, 24576, 24832, 24896, 24928, 24929, 24924, 0, - 16384, 24576, 24832, 24896, 24928, 24929, 24924, 24926, - 0, 16384, 24576, 24832, 24896, 0, 16384, 24576, - 24832, 24960, 24928, 0, 16384, 24576, 24832, 24960, - 24928, 0, 16384, 24576, 24832, 24960, 24928, 24930, - 0, 16384, 24576, 24832, 24960, 24928, 0, 16384, - 24576, 24832, 24960, 24928, 24932, 0, 16384, 24576, - 24832, 24960, 24928, 24932, 0, 16384, 24576, 24832, - 24960, 24928, 24936, 24934, 0, 16384, 24576, 24832, - 24960, 24928, 0, 16384, 24576, 24832, 24960, 24928, - 24936, 0, 16384, 24576, 24832, 24960, 24928, 24936, - 0, 16384, 24576, 24832, 24960, 24928, 24936, 24938, - 0, 16384, 24576, 24832, 24960, 24928, 24936, 0, - 16384, 24576, 24832, 24960, 24928, 24944, 24940, 0, - 16384, 24576, 24832, 24960, 24928, 24944, 24940, 0, - 16384, 24576, 24832, 24960, 24928, 24944, 24945, 24942, - 0, 16384, 24576, 24832, 24960, 24928, 0, 16384, - 24576, 24832, 24960, 24961, 24944, 0, 16384, 24576, - 24832, 24960, 24961, 24944, 0, 16384, 24576, 24832, - 24960, 24961, 24944, 24946, 0, 16384, 24576, 24832, - 24960, 24961, 24944, 0, 16384, 24576, 24832, 24960, - 24961, 24944, 24948, 0, 16384, 24576, 24832, 24960, - 24961, 24944, 24948, 0, 16384, 24576, 24832, 24960, - 24961, 24944, 24952, 24950, 0, 16384, 24576, 24832, - 24960, 24961, 24944, 0, 16384, 24576, 24832, 24960, - 24961, 24944, 24952, 0, 16384, 24576, 24832, 24960, - 24961, 24963, 24952, 0, 16384, 24576, 24832, 24960, - 24961, 24963, 24952, 24954, 0, 16384, 24576, 24832, - 24960, 24961, 24963, 24952, 0, 16384, 24576, 24832, - 24960, 24961, 24963, 24952, 24956, 0, 16384, 24576, - 24832, 24960, 24961, 24963, 24952, 24956, 0, 16384, - 24576, 24832, 24960, 24961, 24963, 24952, 24956, 24958, - 0, 16384, 24576, 24832, 0, 16384, 24576, 25088, - 24960, 0, 16384, 24576, 25088, 24960, 0, 16384, - 24576, 25088, 24960, 24962, 0, 16384, 24576, 25088, - 24960, 0, 16384, 24576, 25088, 24960, 24964, 0, - 16384, 24576, 25088, 24960, 24964, 0, 16384, 24576, - 25088, 24960, 24968, 24966, 0, 16384, 24576, 25088, - 24960, 0, 16384, 24576, 25088, 24960, 24968, 0, - 16384, 24576, 25088, 24960, 24968, 0, 16384, 24576, - 25088, 24960, 24968, 24970, 0, 16384, 24576, 25088, - 24960, 24968, 0, 16384, 24576, 25088, 24960, 24976, - 24972, 0, 16384, 24576, 25088, 24960, 24976, 24972, - 0, 16384, 24576, 25088, 24960, 24976, 24977, 24974, - 0, 16384, 24576, 25088, 24960, 0, 16384, 24576, - 25088, 24960, 24976, 0, 16384, 24576, 25088, 24960, - 24976, 0, 16384, 24576, 25088, 24960, 24976, 24978, - 0, 16384, 24576, 25088, 24960, 24976, 0, 16384, - 24576, 25088, 24960, 24976, 24980, 0, 16384, 24576, - 25088, 24960, 24976, 24980, 0, 16384, 24576, 25088, - 24960, 24976, 24984, 24982, 0, 16384, 24576, 25088, - 24960, 24976, 0, 16384, 24576, 25088, 24960, 24992, - 24984, 0, 16384, 24576, 25088, 24960, 24992, 24984, - 0, 16384, 24576, 25088, 24960, 24992, 24984, 24986, - 0, 16384, 24576, 25088, 24960, 24992, 24984, 0, - 16384, 24576, 25088, 24960, 24992, 24993, 24988, 0, - 16384, 24576, 25088, 24960, 24992, 24993, 24988, 0, - 16384, 24576, 25088, 24960, 24992, 24993, 24988, 24990, - 0, 16384, 24576, 25088, 24960, 0, 16384, 24576, - 25088, 24960, 24992, 0, 16384, 24576, 25088, 24960, - 24992, 0, 16384, 24576, 25088, 24960, 24992, 24994, - 0, 16384, 24576, 25088, 24960, 24992, 0, 16384, - 24576, 25088, 24960, 24992, 24996, 0, 16384, 24576, - 25088, 24960, 24992, 24996, 0, 16384, 24576, 25088, - 24960, 24992, 25000, 24998, 0, 16384, 24576, 25088, - 24960, 24992, 0, 16384, 24576, 25088, 24960, 24992, - 25000, 0, 16384, 24576, 25088, 24960, 24992, 25000, - 0, 16384, 24576, 25088, 24960, 24992, 25000, 25002, - 0, 16384, 24576, 25088, 24960, 24992, 25000, 0, - 16384, 24576, 25088, 24960, 24992, 25008, 25004, 0, - 16384, 24576, 25088, 24960, 24992, 25008, 25004, 0, - 16384, 24576, 25088, 24960, 24992, 25008, 25009, 25006, - 0, 16384, 24576, 25088, 24960, 24992, 0, 16384, - 24576, 25088, 24960, 25024, 25008, 0, 16384, 24576, - 25088, 24960, 25024, 25008, 0, 16384, 24576, 25088, - 24960, 25024, 25008, 25010, 0, 16384, 24576, 25088, - 24960, 25024, 25008, 0, 16384, 24576, 25088, 24960, - 25024, 25008, 25012, 0, 16384, 24576, 25088, 24960, - 25024, 25008, 25012, 0, 16384, 24576, 25088, 24960, - 25024, 25008, 25016, 25014, 0, 16384, 24576, 25088, - 24960, 25024, 25008, 0, 16384, 24576, 25088, 24960, - 25024, 25025, 25016, 0, 16384, 24576, 25088, 24960, - 25024, 25025, 25016, 0, 16384, 24576, 25088, 24960, - 25024, 25025, 25016, 25018, 0, 16384, 24576, 25088, - 24960, 25024, 25025, 25016, 0, 16384, 24576, 25088, - 24960, 25024, 25025, 25016, 25020, 0, 16384, 24576, - 25088, 24960, 25024, 25025, 25027, 25020, 0, 16384, - 24576, 25088, 24960, 25024, 25025, 25027, 25020, 25022, - 0, 16384, 24576, 25088, 24960, 0, 16384, 24576, - 25088, 25089, 25024, 0, 16384, 24576, 25088, 25089, - 25024, 0, 16384, 24576, 25088, 25089, 25024, 25026, - 0, 16384, 24576, 25088, 25089, 25024, 0, 16384, - 24576, 25088, 25089, 25024, 25028, 0, 16384, 24576, - 25088, 25089, 25024, 25028, 0, 16384, 24576, 25088, - 25089, 25024, 25032, 25030, 0, 16384, 24576, 25088, - 25089, 25024, 0, 16384, 24576, 25088, 25089, 25024, - 25032, 0, 16384, 24576, 25088, 25089, 25024, 25032, - 0, 16384, 24576, 25088, 25089, 25024, 25032, 25034, - 0, 16384, 24576, 25088, 25089, 25024, 25032, 0, - 16384, 24576, 25088, 25089, 25024, 25040, 25036, 0, - 16384, 24576, 25088, 25089, 25024, 25040, 25036, 0, - 16384, 24576, 25088, 25089, 25024, 25040, 25041, 25038, - 0, 16384, 24576, 25088, 25089, 25024, 0, 16384, - 24576, 25088, 25089, 25024, 25040, 0, 16384, 24576, - 25088, 25089, 25024, 25040, 0, 16384, 24576, 25088, - 25089, 25024, 25040, 25042, 0, 16384, 24576, 25088, - 25089, 25024, 25040, 0, 16384, 24576, 25088, 25089, - 25024, 25040, 25044, 0, 16384, 24576, 25088, 25089, - 25024, 25040, 25044, 0, 16384, 24576, 25088, 25089, - 25024, 25040, 25048, 25046, 0, 16384, 24576, 25088, - 25089, 25024, 25040, 0, 16384, 24576, 25088, 25089, - 25024, 25056, 25048, 0, 16384, 24576, 25088, 25089, - 25024, 25056, 25048, 0, 16384, 24576, 25088, 25089, - 25024, 25056, 25048, 25050, 0, 16384, 24576, 25088, - 25089, 25024, 25056, 25048, 0, 16384, 24576, 25088, - 25089, 25024, 25056, 25057, 25052, 0, 16384, 24576, - 25088, 25089, 25024, 25056, 25057, 25052, 0, 16384, - 24576, 25088, 25089, 25024, 25056, 25057, 25052, 25054, - 0, 16384, 24576, 25088, 25089, 25024, 0, 16384, - 24576, 25088, 25089, 25024, 25056, 0, 16384, 24576, - 25088, 25089, 25091, 25056, 0, 16384, 24576, 25088, - 25089, 25091, 25056, 25058, 0, 16384, 24576, 25088, - 25089, 25091, 25056, 0, 16384, 24576, 25088, 25089, - 25091, 25056, 25060, 0, 16384, 24576, 25088, 25089, - 25091, 25056, 25060, 0, 16384, 24576, 25088, 25089, - 25091, 25056, 25064, 25062, 0, 16384, 24576, 25088, - 25089, 25091, 25056, 0, 16384, 24576, 25088, 25089, - 25091, 25056, 25064, 0, 16384, 24576, 25088, 25089, - 25091, 25056, 25064, 0, 16384, 24576, 25088, 25089, - 25091, 25056, 25064, 25066, 0, 16384, 24576, 25088, - 25089, 25091, 25056, 25064, 0, 16384, 24576, 25088, - 25089, 25091, 25056, 25072, 25068, 0, 16384, 24576, - 25088, 25089, 25091, 25056, 25072, 25068, 0, 16384, - 24576, 25088, 25089, 25091, 25056, 25072, 25073, 25070, - 0, 16384, 24576, 25088, 25089, 25091, 25056, 0, - 16384, 24576, 25088, 25089, 25091, 25056, 25072, 0, - 16384, 24576, 25088, 25089, 25091, 25056, 25072, 0, - 16384, 24576, 25088, 25089, 25091, 25056, 25072, 25074, - 0, 16384, 24576, 25088, 25089, 25091, 25095, 25072, - 0, 16384, 24576, 25088, 25089, 25091, 25095, 25072, - 25076, 0, 16384, 24576, 25088, 25089, 25091, 25095, - 25072, 25076, 0, 16384, 24576, 25088, 25089, 25091, - 25095, 25072, 25080, 25078, 0, 16384, 24576, 25088, - 25089, 25091, 25095, 25072, 0, 16384, 24576, 25088, - 25089, 25091, 25095, 25072, 25080, 0, 16384, 24576, - 25088, 25089, 25091, 25095, 25072, 25080, 0, 16384, - 24576, 25088, 25089, 25091, 25095, 25072, 25080, 25082, - 0, 16384, 24576, 25088, 25089, 25091, 25095, 25072, - 25080, 0, 16384, 24576, 25088, 25089, 25091, 25095, - 25072, 25080, 25084, 0, 16384, 24576, 25088, 25089, - 25091, 25095, 25072, 25080, 25084, 0, 16384, 24576, - 25088, 25089, 25091, 25095, 25072, 25080, 25084, 25086, - 0, 16384, 24576, 0, 16384, 24576, 25088, 0, - 16384, 24576, 25088, 0, 16384, 24576, 25088, 25090, - 0, 16384, 24576, 25088, 0, 16384, 24576, 25088, - 25092, 0, 16384, 24576, 25088, 25092, 0, 16384, - 24576, 25088, 25096, 25094, 0, 16384, 24576, 25088, - 0, 16384, 24576, 25088, 25096, 0, 16384, 24576, - 25088, 25096, 0, 16384, 24576, 25088, 25096, 25098, - 0, 16384, 24576, 25088, 25096, 0, 16384, 24576, - 25088, 25104, 25100, 0, 16384, 24576, 25088, 25104, - 25100, 0, 16384, 24576, 25088, 25104, 25105, 25102, - 0, 16384, 24576, 25088, 0, 16384, 24576, 25088, - 25104, 0, 16384, 24576, 25088, 25104, 0, 16384, - 24576, 25088, 25104, 25106, 0, 16384, 24576, 25088, - 25104, 0, 16384, 24576, 25088, 25104, 25108, 0, - 16384, 24576, 25088, 25104, 25108, 0, 16384, 24576, - 25088, 25104, 25112, 25110, 0, 16384, 24576, 25088, - 25104, 0, 16384, 24576, 25088, 25120, 25112, 0, - 16384, 24576, 25088, 25120, 25112, 0, 16384, 24576, - 25088, 25120, 25112, 25114, 0, 16384, 24576, 25088, - 25120, 25112, 0, 16384, 24576, 25088, 25120, 25121, - 25116, 0, 16384, 24576, 25088, 25120, 25121, 25116, - 0, 16384, 24576, 25088, 25120, 25121, 25116, 25118, - 0, 16384, 24576, 25088, 0, 16384, 24576, 25088, - 25120, 0, 16384, 24576, 25088, 25120, 0, 16384, - 24576, 25088, 25120, 25122, 0, 16384, 24576, 25088, - 25120, 0, 16384, 24576, 25088, 25120, 25124, 0, - 16384, 24576, 25088, 25120, 25124, 0, 16384, 24576, - 25088, 25120, 25128, 25126, 0, 16384, 24576, 25088, - 25120, 0, 16384, 24576, 25088, 25120, 25128, 0, - 16384, 24576, 25088, 25120, 25128, 0, 16384, 24576, - 25088, 25120, 25128, 25130, 0, 16384, 24576, 25088, - 25120, 25128, 0, 16384, 24576, 25088, 25120, 25136, - 25132, 0, 16384, 24576, 25088, 25120, 25136, 25132, - 0, 16384, 24576, 25088, 25120, 25136, 25137, 25134, - 0, 16384, 24576, 25088, 25120, 0, 16384, 24576, - 25088, 25152, 25136, 0, 16384, 24576, 25088, 25152, - 25136, 0, 16384, 24576, 25088, 25152, 25136, 25138, - 0, 16384, 24576, 25088, 25152, 25136, 0, 16384, - 24576, 25088, 25152, 25136, 25140, 0, 16384, 24576, - 25088, 25152, 25136, 25140, 0, 16384, 24576, 25088, - 25152, 25136, 25144, 25142, 0, 16384, 24576, 25088, - 25152, 25136, 0, 16384, 24576, 25088, 25152, 25153, - 25144, 0, 16384, 24576, 25088, 25152, 25153, 25144, - 0, 16384, 24576, 25088, 25152, 25153, 25144, 25146, - 0, 16384, 24576, 25088, 25152, 25153, 25144, 0, - 16384, 24576, 25088, 25152, 25153, 25144, 25148, 0, - 16384, 24576, 25088, 25152, 25153, 25155, 25148, 0, - 16384, 24576, 25088, 25152, 25153, 25155, 25148, 25150, - 0, 16384, 24576, 25088, 0, 16384, 24576, 25088, - 25152, 0, 16384, 24576, 25088, 25152, 0, 16384, - 24576, 25088, 25152, 25154, 0, 16384, 24576, 25088, - 25152, 0, 16384, 24576, 25088, 25152, 25156, 0, - 16384, 24576, 25088, 25152, 25156, 0, 16384, 24576, - 25088, 25152, 25160, 25158, 0, 16384, 24576, 25088, - 25152, 0, 16384, 24576, 25088, 25152, 25160, 0, - 16384, 24576, 25088, 25152, 25160, 0, 16384, 24576, - 25088, 25152, 25160, 25162, 0, 16384, 24576, 25088, - 25152, 25160, 0, 16384, 24576, 25088, 25152, 25168, - 25164, 0, 16384, 24576, 25088, 25152, 25168, 25164, - 0, 16384, 24576, 25088, 25152, 25168, 25169, 25166, - 0, 16384, 24576, 25088, 25152, 0, 16384, 24576, - 25088, 25152, 25168, 0, 16384, 24576, 25088, 25152, - 25168, 0, 16384, 24576, 25088, 25152, 25168, 25170, - 0, 16384, 24576, 25088, 25152, 25168, 0, 16384, - 24576, 25088, 25152, 25168, 25172, 0, 16384, 24576, - 25088, 25152, 25168, 25172, 0, 16384, 24576, 25088, - 25152, 25168, 25176, 25174, 0, 16384, 24576, 25088, - 25152, 25168, 0, 16384, 24576, 25088, 25152, 25184, - 25176, 0, 16384, 24576, 25088, 25152, 25184, 25176, - 0, 16384, 24576, 25088, 25152, 25184, 25176, 25178, - 0, 16384, 24576, 25088, 25152, 25184, 25176, 0, - 16384, 24576, 25088, 25152, 25184, 25185, 25180, 0, - 16384, 24576, 25088, 25152, 25184, 25185, 25180, 0, - 16384, 24576, 25088, 25152, 25184, 25185, 25180, 25182, - 0, 16384, 24576, 25088, 25152, 0, 16384, 24576, - 25088, 25216, 25184, 0, 16384, 24576, 25088, 25216, - 25184, 0, 16384, 24576, 25088, 25216, 25184, 25186, - 0, 16384, 24576, 25088, 25216, 25184, 0, 16384, - 24576, 25088, 25216, 25184, 25188, 0, 16384, 24576, - 25088, 25216, 25184, 25188, 0, 16384, 24576, 25088, - 25216, 25184, 25192, 25190, 0, 16384, 24576, 25088, - 25216, 25184, 0, 16384, 24576, 25088, 25216, 25184, - 25192, 0, 16384, 24576, 25088, 25216, 25184, 25192, - 0, 16384, 24576, 25088, 25216, 25184, 25192, 25194, - 0, 16384, 24576, 25088, 25216, 25184, 25192, 0, - 16384, 24576, 25088, 25216, 25184, 25200, 25196, 0, - 16384, 24576, 25088, 25216, 25184, 25200, 25196, 0, - 16384, 24576, 25088, 25216, 25184, 25200, 25201, 25198, - 0, 16384, 24576, 25088, 25216, 25184, 0, 16384, - 24576, 25088, 25216, 25217, 25200, 0, 16384, 24576, - 25088, 25216, 25217, 25200, 0, 16384, 24576, 25088, - 25216, 25217, 25200, 25202, 0, 16384, 24576, 25088, - 25216, 25217, 25200, 0, 16384, 24576, 25088, 25216, - 25217, 25200, 25204, 0, 16384, 24576, 25088, 25216, - 25217, 25200, 25204, 0, 16384, 24576, 25088, 25216, - 25217, 25200, 25208, 25206, 0, 16384, 24576, 25088, - 25216, 25217, 25200, 0, 16384, 24576, 25088, 25216, - 25217, 25200, 25208, 0, 16384, 24576, 25088, 25216, - 25217, 25219, 25208, 0, 16384, 24576, 25088, 25216, - 25217, 25219, 25208, 25210, 0, 16384, 24576, 25088, - 25216, 25217, 25219, 25208, 0, 16384, 24576, 25088, - 25216, 25217, 25219, 25208, 25212, 0, 16384, 24576, - 25088, 25216, 25217, 25219, 25208, 25212, 0, 16384, - 24576, 25088, 25216, 25217, 25219, 25208, 25212, 25214, - 0, 16384, 24576, 25088, 0, 16384, 24576, 25088, - 25216, 0, 16384, 24576, 25088, 25216, 0, 16384, - 24576, 25088, 25216, 25218, 0, 16384, 24576, 25088, - 25216, 0, 16384, 24576, 25088, 25216, 25220, 0, - 16384, 24576, 25088, 25216, 25220, 0, 16384, 24576, - 25088, 25216, 25224, 25222, 0, 16384, 24576, 25088, - 25216, 0, 16384, 24576, 25088, 25216, 25224, 0, - 16384, 24576, 25088, 25216, 25224, 0, 16384, 24576, - 25088, 25216, 25224, 25226, 0, 16384, 24576, 25088, - 25216, 25224, 0, 16384, 24576, 25088, 25216, 25232, - 25228, 0, 16384, 24576, 25088, 25216, 25232, 25228, - 0, 16384, 24576, 25088, 25216, 25232, 25233, 25230, - 0, 16384, 24576, 25088, 25216, 0, 16384, 24576, - 25088, 25216, 25232, 0, 16384, 24576, 25088, 25216, - 25232, 0, 16384, 24576, 25088, 25216, 25232, 25234, - 0, 16384, 24576, 25088, 25216, 25232, 0, 16384, - 24576, 25088, 25216, 25232, 25236, 0, 16384, 24576, - 25088, 25216, 25232, 25236, 0, 16384, 24576, 25088, - 25216, 25232, 25240, 25238, 0, 16384, 24576, 25088, - 25216, 25232, 0, 16384, 24576, 25088, 25216, 25248, - 25240, 0, 16384, 24576, 25088, 25216, 25248, 25240, - 0, 16384, 24576, 25088, 25216, 25248, 25240, 25242, - 0, 16384, 24576, 25088, 25216, 25248, 25240, 0, - 16384, 24576, 25088, 25216, 25248, 25249, 25244, 0, - 16384, 24576, 25088, 25216, 25248, 25249, 25244, 0, - 16384, 24576, 25088, 25216, 25248, 25249, 25244, 25246, - 0, 16384, 24576, 25088, 25216, 0, 16384, 24576, - 25088, 25216, 25248, 0, 16384, 24576, 25088, 25216, - 25248, 0, 16384, 24576, 25088, 25216, 25248, 25250, - 0, 16384, 24576, 25088, 25216, 25248, 0, 16384, - 24576, 25088, 25216, 25248, 25252, 0, 16384, 24576, - 25088, 25216, 25248, 25252, 0, 16384, 24576, 25088, - 25216, 25248, 25256, 25254, 0, 16384, 24576, 25088, - 25216, 25248, 0, 16384, 24576, 25088, 25216, 25248, - 25256, 0, 16384, 24576, 25088, 25216, 25248, 25256, - 0, 16384, 24576, 25088, 25216, 25248, 25256, 25258, - 0, 16384, 24576, 25088, 25216, 25248, 25256, 0, - 16384, 24576, 25088, 25216, 25248, 25264, 25260, 0, - 16384, 24576, 25088, 25216, 25248, 25264, 25260, 0, - 16384, 24576, 25088, 25216, 25248, 25264, 25265, 25262, - 0, 16384, 24576, 25088, 25216, 25248, 0, 16384, - 24576, 25088, 25216, 25280, 25264, 0, 16384, 24576, - 25088, 25216, 25280, 25264, 0, 16384, 24576, 25088, - 25216, 25280, 25264, 25266, 0, 16384, 24576, 25088, - 25216, 25280, 25264, 0, 16384, 24576, 25088, 25216, - 25280, 25264, 25268, 0, 16384, 24576, 25088, 25216, - 25280, 25264, 25268, 0, 16384, 24576, 25088, 25216, - 25280, 25264, 25272, 25270, 0, 16384, 24576, 25088, - 25216, 25280, 25264, 0, 16384, 24576, 25088, 25216, - 25280, 25281, 25272, 0, 16384, 24576, 25088, 25216, - 25280, 25281, 25272, 0, 16384, 24576, 25088, 25216, - 25280, 25281, 25272, 25274, 0, 16384, 24576, 25088, - 25216, 25280, 25281, 25272, 0, 16384, 24576, 25088, - 25216, 25280, 25281, 25272, 25276, 0, 16384, 24576, - 25088, 25216, 25280, 25281, 25283, 25276, 0, 16384, - 24576, 25088, 25216, 25280, 25281, 25283, 25276, 25278, - 0, 16384, 24576, 25088, 25216, 0, 16384, 24576, - 25088, 25344, 25280, 0, 16384, 24576, 25088, 25344, - 25280, 0, 16384, 24576, 25088, 25344, 25280, 25282, - 0, 16384, 24576, 25088, 25344, 25280, 0, 16384, - 24576, 25088, 25344, 25280, 25284, 0, 16384, 24576, - 25088, 25344, 25280, 25284, 0, 16384, 24576, 25088, - 25344, 25280, 25288, 25286, 0, 16384, 24576, 25088, - 25344, 25280, 0, 16384, 24576, 25088, 25344, 25280, - 25288, 0, 16384, 24576, 25088, 25344, 25280, 25288, - 0, 16384, 24576, 25088, 25344, 25280, 25288, 25290, - 0, 16384, 24576, 25088, 25344, 25280, 25288, 0, - 16384, 24576, 25088, 25344, 25280, 25296, 25292, 0, - 16384, 24576, 25088, 25344, 25280, 25296, 25292, 0, - 16384, 24576, 25088, 25344, 25280, 25296, 25297, 25294, - 0, 16384, 24576, 25088, 25344, 25280, 0, 16384, - 24576, 25088, 25344, 25280, 25296, 0, 16384, 24576, - 25088, 25344, 25280, 25296, 0, 16384, 24576, 25088, - 25344, 25280, 25296, 25298, 0, 16384, 24576, 25088, - 25344, 25280, 25296, 0, 16384, 24576, 25088, 25344, - 25280, 25296, 25300, 0, 16384, 24576, 25088, 25344, - 25280, 25296, 25300, 0, 16384, 24576, 25088, 25344, - 25280, 25296, 25304, 25302, 0, 16384, 24576, 25088, - 25344, 25280, 25296, 0, 16384, 24576, 25088, 25344, - 25280, 25312, 25304, 0, 16384, 24576, 25088, 25344, - 25280, 25312, 25304, 0, 16384, 24576, 25088, 25344, - 25280, 25312, 25304, 25306, 0, 16384, 24576, 25088, - 25344, 25280, 25312, 25304, 0, 16384, 24576, 25088, - 25344, 25280, 25312, 25313, 25308, 0, 16384, 24576, - 25088, 25344, 25280, 25312, 25313, 25308, 0, 16384, - 24576, 25088, 25344, 25280, 25312, 25313, 25308, 25310, - 0, 16384, 24576, 25088, 25344, 25280, 0, 16384, - 24576, 25088, 25344, 25345, 25312, 0, 16384, 24576, - 25088, 25344, 25345, 25312, 0, 16384, 24576, 25088, - 25344, 25345, 25312, 25314, 0, 16384, 24576, 25088, - 25344, 25345, 25312, 0, 16384, 24576, 25088, 25344, - 25345, 25312, 25316, 0, 16384, 24576, 25088, 25344, - 25345, 25312, 25316, 0, 16384, 24576, 25088, 25344, - 25345, 25312, 25320, 25318, 0, 16384, 24576, 25088, - 25344, 25345, 25312, 0, 16384, 24576, 25088, 25344, - 25345, 25312, 25320, 0, 16384, 24576, 25088, 25344, - 25345, 25312, 25320, 0, 16384, 24576, 25088, 25344, - 25345, 25312, 25320, 25322, 0, 16384, 24576, 25088, - 25344, 25345, 25312, 25320, 0, 16384, 24576, 25088, - 25344, 25345, 25312, 25328, 25324, 0, 16384, 24576, - 25088, 25344, 25345, 25312, 25328, 25324, 0, 16384, - 24576, 25088, 25344, 25345, 25312, 25328, 25329, 25326, - 0, 16384, 24576, 25088, 25344, 25345, 25312, 0, - 16384, 24576, 25088, 25344, 25345, 25312, 25328, 0, - 16384, 24576, 25088, 25344, 25345, 25347, 25328, 0, - 16384, 24576, 25088, 25344, 25345, 25347, 25328, 25330, - 0, 16384, 24576, 25088, 25344, 25345, 25347, 25328, - 0, 16384, 24576, 25088, 25344, 25345, 25347, 25328, - 25332, 0, 16384, 24576, 25088, 25344, 25345, 25347, - 25328, 25332, 0, 16384, 24576, 25088, 25344, 25345, - 25347, 25328, 25336, 25334, 0, 16384, 24576, 25088, - 25344, 25345, 25347, 25328, 0, 16384, 24576, 25088, - 25344, 25345, 25347, 25328, 25336, 0, 16384, 24576, - 25088, 25344, 25345, 25347, 25328, 25336, 0, 16384, - 24576, 25088, 25344, 25345, 25347, 25328, 25336, 25338, - 0, 16384, 24576, 25088, 25344, 25345, 25347, 25351, - 25336, 0, 16384, 24576, 25088, 25344, 25345, 25347, - 25351, 25336, 25340, 0, 16384, 24576, 25088, 25344, - 25345, 25347, 25351, 25336, 25340, 0, 16384, 24576, - 25088, 25344, 25345, 25347, 25351, 25336, 25340, 25342, - 0, 16384, 24576, 25088, 0, 16384, 24576, 25600, - 25344, 0, 16384, 24576, 25600, 25344, 0, 16384, - 24576, 25600, 25344, 25346, 0, 16384, 24576, 25600, - 25344, 0, 16384, 24576, 25600, 25344, 25348, 0, - 16384, 24576, 25600, 25344, 25348, 0, 16384, 24576, - 25600, 25344, 25352, 25350, 0, 16384, 24576, 25600, - 25344, 0, 16384, 24576, 25600, 25344, 25352, 0, - 16384, 24576, 25600, 25344, 25352, 0, 16384, 24576, - 25600, 25344, 25352, 25354, 0, 16384, 24576, 25600, - 25344, 25352, 0, 16384, 24576, 25600, 25344, 25360, - 25356, 0, 16384, 24576, 25600, 25344, 25360, 25356, - 0, 16384, 24576, 25600, 25344, 25360, 25361, 25358, - 0, 16384, 24576, 25600, 25344, 0, 16384, 24576, - 25600, 25344, 25360, 0, 16384, 24576, 25600, 25344, - 25360, 0, 16384, 24576, 25600, 25344, 25360, 25362, - 0, 16384, 24576, 25600, 25344, 25360, 0, 16384, - 24576, 25600, 25344, 25360, 25364, 0, 16384, 24576, - 25600, 25344, 25360, 25364, 0, 16384, 24576, 25600, - 25344, 25360, 25368, 25366, 0, 16384, 24576, 25600, - 25344, 25360, 0, 16384, 24576, 25600, 25344, 25376, - 25368, 0, 16384, 24576, 25600, 25344, 25376, 25368, - 0, 16384, 24576, 25600, 25344, 25376, 25368, 25370, - 0, 16384, 24576, 25600, 25344, 25376, 25368, 0, - 16384, 24576, 25600, 25344, 25376, 25377, 25372, 0, - 16384, 24576, 25600, 25344, 25376, 25377, 25372, 0, - 16384, 24576, 25600, 25344, 25376, 25377, 25372, 25374, - 0, 16384, 24576, 25600, 25344, 0, 16384, 24576, - 25600, 25344, 25376, 0, 16384, 24576, 25600, 25344, - 25376, 0, 16384, 24576, 25600, 25344, 25376, 25378, - 0, 16384, 24576, 25600, 25344, 25376, 0, 16384, - 24576, 25600, 25344, 25376, 25380, 0, 16384, 24576, - 25600, 25344, 25376, 25380, 0, 16384, 24576, 25600, - 25344, 25376, 25384, 25382, 0, 16384, 24576, 25600, - 25344, 25376, 0, 16384, 24576, 25600, 25344, 25376, - 25384, 0, 16384, 24576, 25600, 25344, 25376, 25384, - 0, 16384, 24576, 25600, 25344, 25376, 25384, 25386, - 0, 16384, 24576, 25600, 25344, 25376, 25384, 0, - 16384, 24576, 25600, 25344, 25376, 25392, 25388, 0, - 16384, 24576, 25600, 25344, 25376, 25392, 25388, 0, - 16384, 24576, 25600, 25344, 25376, 25392, 25393, 25390, - 0, 16384, 24576, 25600, 25344, 25376, 0, 16384, - 24576, 25600, 25344, 25408, 25392, 0, 16384, 24576, - 25600, 25344, 25408, 25392, 0, 16384, 24576, 25600, - 25344, 25408, 25392, 25394, 0, 16384, 24576, 25600, - 25344, 25408, 25392, 0, 16384, 24576, 25600, 25344, - 25408, 25392, 25396, 0, 16384, 24576, 25600, 25344, - 25408, 25392, 25396, 0, 16384, 24576, 25600, 25344, - 25408, 25392, 25400, 25398, 0, 16384, 24576, 25600, - 25344, 25408, 25392, 0, 16384, 24576, 25600, 25344, - 25408, 25409, 25400, 0, 16384, 24576, 25600, 25344, - 25408, 25409, 25400, 0, 16384, 24576, 25600, 25344, - 25408, 25409, 25400, 25402, 0, 16384, 24576, 25600, - 25344, 25408, 25409, 25400, 0, 16384, 24576, 25600, - 25344, 25408, 25409, 25400, 25404, 0, 16384, 24576, - 25600, 25344, 25408, 25409, 25411, 25404, 0, 16384, - 24576, 25600, 25344, 25408, 25409, 25411, 25404, 25406, - 0, 16384, 24576, 25600, 25344, 0, 16384, 24576, - 25600, 25344, 25408, 0, 16384, 24576, 25600, 25344, - 25408, 0, 16384, 24576, 25600, 25344, 25408, 25410, - 0, 16384, 24576, 25600, 25344, 25408, 0, 16384, - 24576, 25600, 25344, 25408, 25412, 0, 16384, 24576, - 25600, 25344, 25408, 25412, 0, 16384, 24576, 25600, - 25344, 25408, 25416, 25414, 0, 16384, 24576, 25600, - 25344, 25408, 0, 16384, 24576, 25600, 25344, 25408, - 25416, 0, 16384, 24576, 25600, 25344, 25408, 25416, - 0, 16384, 24576, 25600, 25344, 25408, 25416, 25418, - 0, 16384, 24576, 25600, 25344, 25408, 25416, 0, - 16384, 24576, 25600, 25344, 25408, 25424, 25420, 0, - 16384, 24576, 25600, 25344, 25408, 25424, 25420, 0, - 16384, 24576, 25600, 25344, 25408, 25424, 25425, 25422, - 0, 16384, 24576, 25600, 25344, 25408, 0, 16384, - 24576, 25600, 25344, 25408, 25424, 0, 16384, 24576, - 25600, 25344, 25408, 25424, 0, 16384, 24576, 25600, - 25344, 25408, 25424, 25426, 0, 16384, 24576, 25600, - 25344, 25408, 25424, 0, 16384, 24576, 25600, 25344, - 25408, 25424, 25428, 0, 16384, 24576, 25600, 25344, - 25408, 25424, 25428, 0, 16384, 24576, 25600, 25344, - 25408, 25424, 25432, 25430, 0, 16384, 24576, 25600, - 25344, 25408, 25424, 0, 16384, 24576, 25600, 25344, - 25408, 25440, 25432, 0, 16384, 24576, 25600, 25344, - 25408, 25440, 25432, 0, 16384, 24576, 25600, 25344, - 25408, 25440, 25432, 25434, 0, 16384, 24576, 25600, - 25344, 25408, 25440, 25432, 0, 16384, 24576, 25600, - 25344, 25408, 25440, 25441, 25436, 0, 16384, 24576, - 25600, 25344, 25408, 25440, 25441, 25436, 0, 16384, - 24576, 25600, 25344, 25408, 25440, 25441, 25436, 25438, - 0, 16384, 24576, 25600, 25344, 25408, 0, 16384, - 24576, 25600, 25344, 25472, 25440, 0, 16384, 24576, - 25600, 25344, 25472, 25440, 0, 16384, 24576, 25600, - 25344, 25472, 25440, 25442, 0, 16384, 24576, 25600, - 25344, 25472, 25440, 0, 16384, 24576, 25600, 25344, - 25472, 25440, 25444, 0, 16384, 24576, 25600, 25344, - 25472, 25440, 25444, 0, 16384, 24576, 25600, 25344, - 25472, 25440, 25448, 25446, 0, 16384, 24576, 25600, - 25344, 25472, 25440, 0, 16384, 24576, 25600, 25344, - 25472, 25440, 25448, 0, 16384, 24576, 25600, 25344, - 25472, 25440, 25448, 0, 16384, 24576, 25600, 25344, - 25472, 25440, 25448, 25450, 0, 16384, 24576, 25600, - 25344, 25472, 25440, 25448, 0, 16384, 24576, 25600, - 25344, 25472, 25440, 25456, 25452, 0, 16384, 24576, - 25600, 25344, 25472, 25440, 25456, 25452, 0, 16384, - 24576, 25600, 25344, 25472, 25440, 25456, 25457, 25454, - 0, 16384, 24576, 25600, 25344, 25472, 25440, 0, - 16384, 24576, 25600, 25344, 25472, 25473, 25456, 0, - 16384, 24576, 25600, 25344, 25472, 25473, 25456, 0, - 16384, 24576, 25600, 25344, 25472, 25473, 25456, 25458, - 0, 16384, 24576, 25600, 25344, 25472, 25473, 25456, - 0, 16384, 24576, 25600, 25344, 25472, 25473, 25456, - 25460, 0, 16384, 24576, 25600, 25344, 25472, 25473, - 25456, 25460, 0, 16384, 24576, 25600, 25344, 25472, - 25473, 25456, 25464, 25462, 0, 16384, 24576, 25600, - 25344, 25472, 25473, 25456, 0, 16384, 24576, 25600, - 25344, 25472, 25473, 25456, 25464, 0, 16384, 24576, - 25600, 25344, 25472, 25473, 25475, 25464, 0, 16384, - 24576, 25600, 25344, 25472, 25473, 25475, 25464, 25466, - 0, 16384, 24576, 25600, 25344, 25472, 25473, 25475, - 25464, 0, 16384, 24576, 25600, 25344, 25472, 25473, - 25475, 25464, 25468, 0, 16384, 24576, 25600, 25344, - 25472, 25473, 25475, 25464, 25468, 0, 16384, 24576, - 25600, 25344, 25472, 25473, 25475, 25464, 25468, 25470, - 0, 16384, 24576, 25600, 25344, 0, 16384, 24576, - 25600, 25344, 25472, 0, 16384, 24576, 25600, 25601, - 25472, 0, 16384, 24576, 25600, 25601, 25472, 25474, - 0, 16384, 24576, 25600, 25601, 25472, 0, 16384, - 24576, 25600, 25601, 25472, 25476, 0, 16384, 24576, - 25600, 25601, 25472, 25476, 0, 16384, 24576, 25600, - 25601, 25472, 25480, 25478, 0, 16384, 24576, 25600, - 25601, 25472, 0, 16384, 24576, 25600, 25601, 25472, - 25480, 0, 16384, 24576, 25600, 25601, 25472, 25480, - 0, 16384, 24576, 25600, 25601, 25472, 25480, 25482, - 0, 16384, 24576, 25600, 25601, 25472, 25480, 0, - 16384, 24576, 25600, 25601, 25472, 25488, 25484, 0, - 16384, 24576, 25600, 25601, 25472, 25488, 25484, 0, - 16384, 24576, 25600, 25601, 25472, 25488, 25489, 25486, - 0, 16384, 24576, 25600, 25601, 25472, 0, 16384, - 24576, 25600, 25601, 25472, 25488, 0, 16384, 24576, - 25600, 25601, 25472, 25488, 0, 16384, 24576, 25600, - 25601, 25472, 25488, 25490, 0, 16384, 24576, 25600, - 25601, 25472, 25488, 0, 16384, 24576, 25600, 25601, - 25472, 25488, 25492, 0, 16384, 24576, 25600, 25601, - 25472, 25488, 25492, 0, 16384, 24576, 25600, 25601, - 25472, 25488, 25496, 25494, 0, 16384, 24576, 25600, - 25601, 25472, 25488, 0, 16384, 24576, 25600, 25601, - 25472, 25504, 25496, 0, 16384, 24576, 25600, 25601, - 25472, 25504, 25496, 0, 16384, 24576, 25600, 25601, - 25472, 25504, 25496, 25498, 0, 16384, 24576, 25600, - 25601, 25472, 25504, 25496, 0, 16384, 24576, 25600, - 25601, 25472, 25504, 25505, 25500, 0, 16384, 24576, - 25600, 25601, 25472, 25504, 25505, 25500, 0, 16384, - 24576, 25600, 25601, 25472, 25504, 25505, 25500, 25502, - 0, 16384, 24576, 25600, 25601, 25472, 0, 16384, - 24576, 25600, 25601, 25472, 25504, 0, 16384, 24576, - 25600, 25601, 25472, 25504, 0, 16384, 24576, 25600, - 25601, 25472, 25504, 25506, 0, 16384, 24576, 25600, - 25601, 25472, 25504, 0, 16384, 24576, 25600, 25601, - 25472, 25504, 25508, 0, 16384, 24576, 25600, 25601, - 25472, 25504, 25508, 0, 16384, 24576, 25600, 25601, - 25472, 25504, 25512, 25510, 0, 16384, 24576, 25600, - 25601, 25472, 25504, 0, 16384, 24576, 25600, 25601, - 25472, 25504, 25512, 0, 16384, 24576, 25600, 25601, - 25472, 25504, 25512, 0, 16384, 24576, 25600, 25601, - 25472, 25504, 25512, 25514, 0, 16384, 24576, 25600, - 25601, 25472, 25504, 25512, 0, 16384, 24576, 25600, - 25601, 25472, 25504, 25520, 25516, 0, 16384, 24576, - 25600, 25601, 25472, 25504, 25520, 25516, 0, 16384, - 24576, 25600, 25601, 25472, 25504, 25520, 25521, 25518, - 0, 16384, 24576, 25600, 25601, 25472, 25504, 0, - 16384, 24576, 25600, 25601, 25472, 25536, 25520, 0, - 16384, 24576, 25600, 25601, 25472, 25536, 25520, 0, - 16384, 24576, 25600, 25601, 25472, 25536, 25520, 25522, - 0, 16384, 24576, 25600, 25601, 25472, 25536, 25520, - 0, 16384, 24576, 25600, 25601, 25472, 25536, 25520, - 25524, 0, 16384, 24576, 25600, 25601, 25472, 25536, - 25520, 25524, 0, 16384, 24576, 25600, 25601, 25472, - 25536, 25520, 25528, 25526, 0, 16384, 24576, 25600, - 25601, 25472, 25536, 25520, 0, 16384, 24576, 25600, - 25601, 25472, 25536, 25537, 25528, 0, 16384, 24576, - 25600, 25601, 25472, 25536, 25537, 25528, 0, 16384, - 24576, 25600, 25601, 25472, 25536, 25537, 25528, 25530, - 0, 16384, 24576, 25600, 25601, 25472, 25536, 25537, - 25528, 0, 16384, 24576, 25600, 25601, 25472, 25536, - 25537, 25528, 25532, 0, 16384, 24576, 25600, 25601, - 25472, 25536, 25537, 25539, 25532, 0, 16384, 24576, - 25600, 25601, 25472, 25536, 25537, 25539, 25532, 25534, - 0, 16384, 24576, 25600, 25601, 25472, 0, 16384, - 24576, 25600, 25601, 25472, 25536, 0, 16384, 24576, - 25600, 25601, 25472, 25536, 0, 16384, 24576, 25600, - 25601, 25472, 25536, 25538, 0, 16384, 24576, 25600, - 25601, 25603, 25536, 0, 16384, 24576, 25600, 25601, - 25603, 25536, 25540, 0, 16384, 24576, 25600, 25601, - 25603, 25536, 25540, 0, 16384, 24576, 25600, 25601, - 25603, 25536, 25544, 25542, 0, 16384, 24576, 25600, - 25601, 25603, 25536, 0, 16384, 24576, 25600, 25601, - 25603, 25536, 25544, 0, 16384, 24576, 25600, 25601, - 25603, 25536, 25544, 0, 16384, 24576, 25600, 25601, - 25603, 25536, 25544, 25546, 0, 16384, 24576, 25600, - 25601, 25603, 25536, 25544, 0, 16384, 24576, 25600, - 25601, 25603, 25536, 25552, 25548, 0, 16384, 24576, - 25600, 25601, 25603, 25536, 25552, 25548, 0, 16384, - 24576, 25600, 25601, 25603, 25536, 25552, 25553, 25550, - 0, 16384, 24576, 25600, 25601, 25603, 25536, 0, - 16384, 24576, 25600, 25601, 25603, 25536, 25552, 0, - 16384, 24576, 25600, 25601, 25603, 25536, 25552, 0, - 16384, 24576, 25600, 25601, 25603, 25536, 25552, 25554, - 0, 16384, 24576, 25600, 25601, 25603, 25536, 25552, - 0, 16384, 24576, 25600, 25601, 25603, 25536, 25552, - 25556, 0, 16384, 24576, 25600, 25601, 25603, 25536, - 25552, 25556, 0, 16384, 24576, 25600, 25601, 25603, - 25536, 25552, 25560, 25558, 0, 16384, 24576, 25600, - 25601, 25603, 25536, 25552, 0, 16384, 24576, 25600, - 25601, 25603, 25536, 25568, 25560, 0, 16384, 24576, - 25600, 25601, 25603, 25536, 25568, 25560, 0, 16384, - 24576, 25600, 25601, 25603, 25536, 25568, 25560, 25562, - 0, 16384, 24576, 25600, 25601, 25603, 25536, 25568, - 25560, 0, 16384, 24576, 25600, 25601, 25603, 25536, - 25568, 25569, 25564, 0, 16384, 24576, 25600, 25601, - 25603, 25536, 25568, 25569, 25564, 0, 16384, 24576, - 25600, 25601, 25603, 25536, 25568, 25569, 25564, 25566, - 0, 16384, 24576, 25600, 25601, 25603, 25536, 0, - 16384, 24576, 25600, 25601, 25603, 25536, 25568, 0, - 16384, 24576, 25600, 25601, 25603, 25536, 25568, 0, - 16384, 24576, 25600, 25601, 25603, 25536, 25568, 25570, - 0, 16384, 24576, 25600, 25601, 25603, 25536, 25568, - 0, 16384, 24576, 25600, 25601, 25603, 25536, 25568, - 25572, 0, 16384, 24576, 25600, 25601, 25603, 25536, - 25568, 25572, 0, 16384, 24576, 25600, 25601, 25603, - 25536, 25568, 25576, 25574, 0, 16384, 24576, 25600, - 25601, 25603, 25607, 25568, 0, 16384, 24576, 25600, - 25601, 25603, 25607, 25568, 25576, 0, 16384, 24576, - 25600, 25601, 25603, 25607, 25568, 25576, 0, 16384, - 24576, 25600, 25601, 25603, 25607, 25568, 25576, 25578, - 0, 16384, 24576, 25600, 25601, 25603, 25607, 25568, - 25576, 0, 16384, 24576, 25600, 25601, 25603, 25607, - 25568, 25584, 25580, 0, 16384, 24576, 25600, 25601, - 25603, 25607, 25568, 25584, 25580, 0, 16384, 24576, - 25600, 25601, 25603, 25607, 25568, 25584, 25585, 25582, - 0, 16384, 24576, 25600, 25601, 25603, 25607, 25568, - 0, 16384, 24576, 25600, 25601, 25603, 25607, 25568, - 25584, 0, 16384, 24576, 25600, 25601, 25603, 25607, - 25568, 25584, 0, 16384, 24576, 25600, 25601, 25603, - 25607, 25568, 25584, 25586, 0, 16384, 24576, 25600, - 25601, 25603, 25607, 25568, 25584, 0, 16384, 24576, - 25600, 25601, 25603, 25607, 25568, 25584, 25588, 0, - 16384, 24576, 25600, 25601, 25603, 25607, 25568, 25584, - 25588, 0, 16384, 24576, 25600, 25601, 25603, 25607, - 25568, 25584, 25592, 25590, 0, 16384, 24576, 25600, - 25601, 25603, 25607, 25568, 25584, 0, 16384, 24576, - 25600, 25601, 25603, 25607, 25568, 25584, 25592, 0, - 16384, 24576, 25600, 25601, 25603, 25607, 25568, 25584, - 25592, 0, 16384, 24576, 25600, 25601, 25603, 25607, - 25568, 25584, 25592, 25594, 0, 16384, 24576, 25600, - 25601, 25603, 25607, 25568, 25584, 25592, 0, 16384, - 24576, 25600, 25601, 25603, 25607, 25568, 25584, 25592, - 25596, 0, 16384, 24576, 25600, 25601, 25603, 25607, - 25568, 25584, 25592, 25596, 0, 16384, 24576, 25600, - 25601, 25603, 25607, 25568, 25584, 25592, 25596, 25598, - 0, 16384, 24576, 0, 16384, 24576, 25600, 0, - 16384, 24576, 25600, 0, 16384, 24576, 25600, 25602, - 0, 16384, 24576, 25600, 0, 16384, 24576, 25600, - 25604, 0, 16384, 24576, 25600, 25604, 0, 16384, - 24576, 25600, 25608, 25606, 0, 16384, 24576, 25600, - 0, 16384, 24576, 25600, 25608, 0, 16384, 24576, - 25600, 25608, 0, 16384, 24576, 25600, 25608, 25610, - 0, 16384, 24576, 25600, 25608, 0, 16384, 24576, - 25600, 25616, 25612, 0, 16384, 24576, 25600, 25616, - 25612, 0, 16384, 24576, 25600, 25616, 25617, 25614, - 0, 16384, 24576, 25600, 0, 16384, 24576, 25600, - 25616, 0, 16384, 24576, 25600, 25616, 0, 16384, - 24576, 25600, 25616, 25618, 0, 16384, 24576, 25600, - 25616, 0, 16384, 24576, 25600, 25616, 25620, 0, - 16384, 24576, 25600, 25616, 25620, 0, 16384, 24576, - 25600, 25616, 25624, 25622, 0, 16384, 24576, 25600, - 25616, 0, 16384, 24576, 25600, 25632, 25624, 0, - 16384, 24576, 25600, 25632, 25624, 0, 16384, 24576, - 25600, 25632, 25624, 25626, 0, 16384, 24576, 25600, - 25632, 25624, 0, 16384, 24576, 25600, 25632, 25633, - 25628, 0, 16384, 24576, 25600, 25632, 25633, 25628, - 0, 16384, 24576, 25600, 25632, 25633, 25628, 25630, - 0, 16384, 24576, 25600, 0, 16384, 24576, 25600, - 25632, 0, 16384, 24576, 25600, 25632, 0, 16384, - 24576, 25600, 25632, 25634, 0, 16384, 24576, 25600, - 25632, 0, 16384, 24576, 25600, 25632, 25636, 0, - 16384, 24576, 25600, 25632, 25636, 0, 16384, 24576, - 25600, 25632, 25640, 25638, 0, 16384, 24576, 25600, - 25632, 0, 16384, 24576, 25600, 25632, 25640, 0, - 16384, 24576, 25600, 25632, 25640, 0, 16384, 24576, - 25600, 25632, 25640, 25642, 0, 16384, 24576, 25600, - 25632, 25640, 0, 16384, 24576, 25600, 25632, 25648, - 25644, 0, 16384, 24576, 25600, 25632, 25648, 25644, - 0, 16384, 24576, 25600, 25632, 25648, 25649, 25646, - 0, 16384, 24576, 25600, 25632, 0, 16384, 24576, - 25600, 25664, 25648, 0, 16384, 24576, 25600, 25664, - 25648, 0, 16384, 24576, 25600, 25664, 25648, 25650, - 0, 16384, 24576, 25600, 25664, 25648, 0, 16384, - 24576, 25600, 25664, 25648, 25652, 0, 16384, 24576, - 25600, 25664, 25648, 25652, 0, 16384, 24576, 25600, - 25664, 25648, 25656, 25654, 0, 16384, 24576, 25600, - 25664, 25648, 0, 16384, 24576, 25600, 25664, 25665, - 25656, 0, 16384, 24576, 25600, 25664, 25665, 25656, - 0, 16384, 24576, 25600, 25664, 25665, 25656, 25658, - 0, 16384, 24576, 25600, 25664, 25665, 25656, 0, - 16384, 24576, 25600, 25664, 25665, 25656, 25660, 0, - 16384, 24576, 25600, 25664, 25665, 25667, 25660, 0, - 16384, 24576, 25600, 25664, 25665, 25667, 25660, 25662, - 0, 16384, 24576, 25600, 0, 16384, 24576, 25600, - 25664, 0, 16384, 24576, 25600, 25664, 0, 16384, - 24576, 25600, 25664, 25666, 0, 16384, 24576, 25600, - 25664, 0, 16384, 24576, 25600, 25664, 25668, 0, - 16384, 24576, 25600, 25664, 25668, 0, 16384, 24576, - 25600, 25664, 25672, 25670, 0, 16384, 24576, 25600, - 25664, 0, 16384, 24576, 25600, 25664, 25672, 0, - 16384, 24576, 25600, 25664, 25672, 0, 16384, 24576, - 25600, 25664, 25672, 25674, 0, 16384, 24576, 25600, - 25664, 25672, 0, 16384, 24576, 25600, 25664, 25680, - 25676, 0, 16384, 24576, 25600, 25664, 25680, 25676, - 0, 16384, 24576, 25600, 25664, 25680, 25681, 25678, - 0, 16384, 24576, 25600, 25664, 0, 16384, 24576, - 25600, 25664, 25680, 0, 16384, 24576, 25600, 25664, - 25680, 0, 16384, 24576, 25600, 25664, 25680, 25682, - 0, 16384, 24576, 25600, 25664, 25680, 0, 16384, - 24576, 25600, 25664, 25680, 25684, 0, 16384, 24576, - 25600, 25664, 25680, 25684, 0, 16384, 24576, 25600, - 25664, 25680, 25688, 25686, 0, 16384, 24576, 25600, - 25664, 25680, 0, 16384, 24576, 25600, 25664, 25696, - 25688, 0, 16384, 24576, 25600, 25664, 25696, 25688, - 0, 16384, 24576, 25600, 25664, 25696, 25688, 25690, - 0, 16384, 24576, 25600, 25664, 25696, 25688, 0, - 16384, 24576, 25600, 25664, 25696, 25697, 25692, 0, - 16384, 24576, 25600, 25664, 25696, 25697, 25692, 0, - 16384, 24576, 25600, 25664, 25696, 25697, 25692, 25694, - 0, 16384, 24576, 25600, 25664, 0, 16384, 24576, - 25600, 25728, 25696, 0, 16384, 24576, 25600, 25728, - 25696, 0, 16384, 24576, 25600, 25728, 25696, 25698, - 0, 16384, 24576, 25600, 25728, 25696, 0, 16384, - 24576, 25600, 25728, 25696, 25700, 0, 16384, 24576, - 25600, 25728, 25696, 25700, 0, 16384, 24576, 25600, - 25728, 25696, 25704, 25702, 0, 16384, 24576, 25600, - 25728, 25696, 0, 16384, 24576, 25600, 25728, 25696, - 25704, 0, 16384, 24576, 25600, 25728, 25696, 25704, - 0, 16384, 24576, 25600, 25728, 25696, 25704, 25706, - 0, 16384, 24576, 25600, 25728, 25696, 25704, 0, - 16384, 24576, 25600, 25728, 25696, 25712, 25708, 0, - 16384, 24576, 25600, 25728, 25696, 25712, 25708, 0, - 16384, 24576, 25600, 25728, 25696, 25712, 25713, 25710, - 0, 16384, 24576, 25600, 25728, 25696, 0, 16384, - 24576, 25600, 25728, 25729, 25712, 0, 16384, 24576, - 25600, 25728, 25729, 25712, 0, 16384, 24576, 25600, - 25728, 25729, 25712, 25714, 0, 16384, 24576, 25600, - 25728, 25729, 25712, 0, 16384, 24576, 25600, 25728, - 25729, 25712, 25716, 0, 16384, 24576, 25600, 25728, - 25729, 25712, 25716, 0, 16384, 24576, 25600, 25728, - 25729, 25712, 25720, 25718, 0, 16384, 24576, 25600, - 25728, 25729, 25712, 0, 16384, 24576, 25600, 25728, - 25729, 25712, 25720, 0, 16384, 24576, 25600, 25728, - 25729, 25731, 25720, 0, 16384, 24576, 25600, 25728, - 25729, 25731, 25720, 25722, 0, 16384, 24576, 25600, - 25728, 25729, 25731, 25720, 0, 16384, 24576, 25600, - 25728, 25729, 25731, 25720, 25724, 0, 16384, 24576, - 25600, 25728, 25729, 25731, 25720, 25724, 0, 16384, - 24576, 25600, 25728, 25729, 25731, 25720, 25724, 25726, - 0, 16384, 24576, 25600, 0, 16384, 24576, 25600, - 25728, 0, 16384, 24576, 25600, 25728, 0, 16384, - 24576, 25600, 25728, 25730, 0, 16384, 24576, 25600, - 25728, 0, 16384, 24576, 25600, 25728, 25732, 0, - 16384, 24576, 25600, 25728, 25732, 0, 16384, 24576, - 25600, 25728, 25736, 25734, 0, 16384, 24576, 25600, - 25728, 0, 16384, 24576, 25600, 25728, 25736, 0, - 16384, 24576, 25600, 25728, 25736, 0, 16384, 24576, - 25600, 25728, 25736, 25738, 0, 16384, 24576, 25600, - 25728, 25736, 0, 16384, 24576, 25600, 25728, 25744, - 25740, 0, 16384, 24576, 25600, 25728, 25744, 25740, - 0, 16384, 24576, 25600, 25728, 25744, 25745, 25742, - 0, 16384, 24576, 25600, 25728, 0, 16384, 24576, - 25600, 25728, 25744, 0, 16384, 24576, 25600, 25728, - 25744, 0, 16384, 24576, 25600, 25728, 25744, 25746, - 0, 16384, 24576, 25600, 25728, 25744, 0, 16384, - 24576, 25600, 25728, 25744, 25748, 0, 16384, 24576, - 25600, 25728, 25744, 25748, 0, 16384, 24576, 25600, - 25728, 25744, 25752, 25750, 0, 16384, 24576, 25600, - 25728, 25744, 0, 16384, 24576, 25600, 25728, 25760, - 25752, 0, 16384, 24576, 25600, 25728, 25760, 25752, - 0, 16384, 24576, 25600, 25728, 25760, 25752, 25754, - 0, 16384, 24576, 25600, 25728, 25760, 25752, 0, - 16384, 24576, 25600, 25728, 25760, 25761, 25756, 0, - 16384, 24576, 25600, 25728, 25760, 25761, 25756, 0, - 16384, 24576, 25600, 25728, 25760, 25761, 25756, 25758, - 0, 16384, 24576, 25600, 25728, 0, 16384, 24576, - 25600, 25728, 25760, 0, 16384, 24576, 25600, 25728, - 25760, 0, 16384, 24576, 25600, 25728, 25760, 25762, - 0, 16384, 24576, 25600, 25728, 25760, 0, 16384, - 24576, 25600, 25728, 25760, 25764, 0, 16384, 24576, - 25600, 25728, 25760, 25764, 0, 16384, 24576, 25600, - 25728, 25760, 25768, 25766, 0, 16384, 24576, 25600, - 25728, 25760, 0, 16384, 24576, 25600, 25728, 25760, - 25768, 0, 16384, 24576, 25600, 25728, 25760, 25768, - 0, 16384, 24576, 25600, 25728, 25760, 25768, 25770, - 0, 16384, 24576, 25600, 25728, 25760, 25768, 0, - 16384, 24576, 25600, 25728, 25760, 25776, 25772, 0, - 16384, 24576, 25600, 25728, 25760, 25776, 25772, 0, - 16384, 24576, 25600, 25728, 25760, 25776, 25777, 25774, - 0, 16384, 24576, 25600, 25728, 25760, 0, 16384, - 24576, 25600, 25728, 25792, 25776, 0, 16384, 24576, - 25600, 25728, 25792, 25776, 0, 16384, 24576, 25600, - 25728, 25792, 25776, 25778, 0, 16384, 24576, 25600, - 25728, 25792, 25776, 0, 16384, 24576, 25600, 25728, - 25792, 25776, 25780, 0, 16384, 24576, 25600, 25728, - 25792, 25776, 25780, 0, 16384, 24576, 25600, 25728, - 25792, 25776, 25784, 25782, 0, 16384, 24576, 25600, - 25728, 25792, 25776, 0, 16384, 24576, 25600, 25728, - 25792, 25793, 25784, 0, 16384, 24576, 25600, 25728, - 25792, 25793, 25784, 0, 16384, 24576, 25600, 25728, - 25792, 25793, 25784, 25786, 0, 16384, 24576, 25600, - 25728, 25792, 25793, 25784, 0, 16384, 24576, 25600, - 25728, 25792, 25793, 25784, 25788, 0, 16384, 24576, - 25600, 25728, 25792, 25793, 25795, 25788, 0, 16384, - 24576, 25600, 25728, 25792, 25793, 25795, 25788, 25790, - 0, 16384, 24576, 25600, 25728, 0, 16384, 24576, - 25600, 25856, 25792, 0, 16384, 24576, 25600, 25856, - 25792, 0, 16384, 24576, 25600, 25856, 25792, 25794, - 0, 16384, 24576, 25600, 25856, 25792, 0, 16384, - 24576, 25600, 25856, 25792, 25796, 0, 16384, 24576, - 25600, 25856, 25792, 25796, 0, 16384, 24576, 25600, - 25856, 25792, 25800, 25798, 0, 16384, 24576, 25600, - 25856, 25792, 0, 16384, 24576, 25600, 25856, 25792, - 25800, 0, 16384, 24576, 25600, 25856, 25792, 25800, - 0, 16384, 24576, 25600, 25856, 25792, 25800, 25802, - 0, 16384, 24576, 25600, 25856, 25792, 25800, 0, - 16384, 24576, 25600, 25856, 25792, 25808, 25804, 0, - 16384, 24576, 25600, 25856, 25792, 25808, 25804, 0, - 16384, 24576, 25600, 25856, 25792, 25808, 25809, 25806, - 0, 16384, 24576, 25600, 25856, 25792, 0, 16384, - 24576, 25600, 25856, 25792, 25808, 0, 16384, 24576, - 25600, 25856, 25792, 25808, 0, 16384, 24576, 25600, - 25856, 25792, 25808, 25810, 0, 16384, 24576, 25600, - 25856, 25792, 25808, 0, 16384, 24576, 25600, 25856, - 25792, 25808, 25812, 0, 16384, 24576, 25600, 25856, - 25792, 25808, 25812, 0, 16384, 24576, 25600, 25856, - 25792, 25808, 25816, 25814, 0, 16384, 24576, 25600, - 25856, 25792, 25808, 0, 16384, 24576, 25600, 25856, - 25792, 25824, 25816, 0, 16384, 24576, 25600, 25856, - 25792, 25824, 25816, 0, 16384, 24576, 25600, 25856, - 25792, 25824, 25816, 25818, 0, 16384, 24576, 25600, - 25856, 25792, 25824, 25816, 0, 16384, 24576, 25600, - 25856, 25792, 25824, 25825, 25820, 0, 16384, 24576, - 25600, 25856, 25792, 25824, 25825, 25820, 0, 16384, - 24576, 25600, 25856, 25792, 25824, 25825, 25820, 25822, - 0, 16384, 24576, 25600, 25856, 25792, 0, 16384, - 24576, 25600, 25856, 25857, 25824, 0, 16384, 24576, - 25600, 25856, 25857, 25824, 0, 16384, 24576, 25600, - 25856, 25857, 25824, 25826, 0, 16384, 24576, 25600, - 25856, 25857, 25824, 0, 16384, 24576, 25600, 25856, - 25857, 25824, 25828, 0, 16384, 24576, 25600, 25856, - 25857, 25824, 25828, 0, 16384, 24576, 25600, 25856, - 25857, 25824, 25832, 25830, 0, 16384, 24576, 25600, - 25856, 25857, 25824, 0, 16384, 24576, 25600, 25856, - 25857, 25824, 25832, 0, 16384, 24576, 25600, 25856, - 25857, 25824, 25832, 0, 16384, 24576, 25600, 25856, - 25857, 25824, 25832, 25834, 0, 16384, 24576, 25600, - 25856, 25857, 25824, 25832, 0, 16384, 24576, 25600, - 25856, 25857, 25824, 25840, 25836, 0, 16384, 24576, - 25600, 25856, 25857, 25824, 25840, 25836, 0, 16384, - 24576, 25600, 25856, 25857, 25824, 25840, 25841, 25838, - 0, 16384, 24576, 25600, 25856, 25857, 25824, 0, - 16384, 24576, 25600, 25856, 25857, 25824, 25840, 0, - 16384, 24576, 25600, 25856, 25857, 25859, 25840, 0, - 16384, 24576, 25600, 25856, 25857, 25859, 25840, 25842, - 0, 16384, 24576, 25600, 25856, 25857, 25859, 25840, - 0, 16384, 24576, 25600, 25856, 25857, 25859, 25840, - 25844, 0, 16384, 24576, 25600, 25856, 25857, 25859, - 25840, 25844, 0, 16384, 24576, 25600, 25856, 25857, - 25859, 25840, 25848, 25846, 0, 16384, 24576, 25600, - 25856, 25857, 25859, 25840, 0, 16384, 24576, 25600, - 25856, 25857, 25859, 25840, 25848, 0, 16384, 24576, - 25600, 25856, 25857, 25859, 25840, 25848, 0, 16384, - 24576, 25600, 25856, 25857, 25859, 25840, 25848, 25850, - 0, 16384, 24576, 25600, 25856, 25857, 25859, 25863, - 25848, 0, 16384, 24576, 25600, 25856, 25857, 25859, - 25863, 25848, 25852, 0, 16384, 24576, 25600, 25856, - 25857, 25859, 25863, 25848, 25852, 0, 16384, 24576, - 25600, 25856, 25857, 25859, 25863, 25848, 25852, 25854, - 0, 16384, 24576, 25600, 0, 16384, 24576, 25600, - 25856, 0, 16384, 24576, 25600, 25856, 0, 16384, - 24576, 25600, 25856, 25858, 0, 16384, 24576, 25600, - 25856, 0, 16384, 24576, 25600, 25856, 25860, 0, - 16384, 24576, 25600, 25856, 25860, 0, 16384, 24576, - 25600, 25856, 25864, 25862, 0, 16384, 24576, 25600, - 25856, 0, 16384, 24576, 25600, 25856, 25864, 0, - 16384, 24576, 25600, 25856, 25864, 0, 16384, 24576, - 25600, 25856, 25864, 25866, 0, 16384, 24576, 25600, - 25856, 25864, 0, 16384, 24576, 25600, 25856, 25872, - 25868, 0, 16384, 24576, 25600, 25856, 25872, 25868, - 0, 16384, 24576, 25600, 25856, 25872, 25873, 25870, - 0, 16384, 24576, 25600, 25856, 0, 16384, 24576, - 25600, 25856, 25872, 0, 16384, 24576, 25600, 25856, - 25872, 0, 16384, 24576, 25600, 25856, 25872, 25874, - 0, 16384, 24576, 25600, 25856, 25872, 0, 16384, - 24576, 25600, 25856, 25872, 25876, 0, 16384, 24576, - 25600, 25856, 25872, 25876, 0, 16384, 24576, 25600, - 25856, 25872, 25880, 25878, 0, 16384, 24576, 25600, - 25856, 25872, 0, 16384, 24576, 25600, 25856, 25888, - 25880, 0, 16384, 24576, 25600, 25856, 25888, 25880, - 0, 16384, 24576, 25600, 25856, 25888, 25880, 25882, - 0, 16384, 24576, 25600, 25856, 25888, 25880, 0, - 16384, 24576, 25600, 25856, 25888, 25889, 25884, 0, - 16384, 24576, 25600, 25856, 25888, 25889, 25884, 0, - 16384, 24576, 25600, 25856, 25888, 25889, 25884, 25886, - 0, 16384, 24576, 25600, 25856, 0, 16384, 24576, - 25600, 25856, 25888, 0, 16384, 24576, 25600, 25856, - 25888, 0, 16384, 24576, 25600, 25856, 25888, 25890, - 0, 16384, 24576, 25600, 25856, 25888, 0, 16384, - 24576, 25600, 25856, 25888, 25892, 0, 16384, 24576, - 25600, 25856, 25888, 25892, 0, 16384, 24576, 25600, - 25856, 25888, 25896, 25894, 0, 16384, 24576, 25600, - 25856, 25888, 0, 16384, 24576, 25600, 25856, 25888, - 25896, 0, 16384, 24576, 25600, 25856, 25888, 25896, - 0, 16384, 24576, 25600, 25856, 25888, 25896, 25898, - 0, 16384, 24576, 25600, 25856, 25888, 25896, 0, - 16384, 24576, 25600, 25856, 25888, 25904, 25900, 0, - 16384, 24576, 25600, 25856, 25888, 25904, 25900, 0, - 16384, 24576, 25600, 25856, 25888, 25904, 25905, 25902, - 0, 16384, 24576, 25600, 25856, 25888, 0, 16384, - 24576, 25600, 25856, 25920, 25904, 0, 16384, 24576, - 25600, 25856, 25920, 25904, 0, 16384, 24576, 25600, - 25856, 25920, 25904, 25906, 0, 16384, 24576, 25600, - 25856, 25920, 25904, 0, 16384, 24576, 25600, 25856, - 25920, 25904, 25908, 0, 16384, 24576, 25600, 25856, - 25920, 25904, 25908, 0, 16384, 24576, 25600, 25856, - 25920, 25904, 25912, 25910, 0, 16384, 24576, 25600, - 25856, 25920, 25904, 0, 16384, 24576, 25600, 25856, - 25920, 25921, 25912, 0, 16384, 24576, 25600, 25856, - 25920, 25921, 25912, 0, 16384, 24576, 25600, 25856, - 25920, 25921, 25912, 25914, 0, 16384, 24576, 25600, - 25856, 25920, 25921, 25912, 0, 16384, 24576, 25600, - 25856, 25920, 25921, 25912, 25916, 0, 16384, 24576, - 25600, 25856, 25920, 25921, 25923, 25916, 0, 16384, - 24576, 25600, 25856, 25920, 25921, 25923, 25916, 25918, - 0, 16384, 24576, 25600, 25856, 0, 16384, 24576, - 25600, 25856, 25920, 0, 16384, 24576, 25600, 25856, - 25920, 0, 16384, 24576, 25600, 25856, 25920, 25922, - 0, 16384, 24576, 25600, 25856, 25920, 0, 16384, - 24576, 25600, 25856, 25920, 25924, 0, 16384, 24576, - 25600, 25856, 25920, 25924, 0, 16384, 24576, 25600, - 25856, 25920, 25928, 25926, 0, 16384, 24576, 25600, - 25856, 25920, 0, 16384, 24576, 25600, 25856, 25920, - 25928, 0, 16384, 24576, 25600, 25856, 25920, 25928, - 0, 16384, 24576, 25600, 25856, 25920, 25928, 25930, - 0, 16384, 24576, 25600, 25856, 25920, 25928, 0, - 16384, 24576, 25600, 25856, 25920, 25936, 25932, 0, - 16384, 24576, 25600, 25856, 25920, 25936, 25932, 0, - 16384, 24576, 25600, 25856, 25920, 25936, 25937, 25934, - 0, 16384, 24576, 25600, 25856, 25920, 0, 16384, - 24576, 25600, 25856, 25920, 25936, 0, 16384, 24576, - 25600, 25856, 25920, 25936, 0, 16384, 24576, 25600, - 25856, 25920, 25936, 25938, 0, 16384, 24576, 25600, - 25856, 25920, 25936, 0, 16384, 24576, 25600, 25856, - 25920, 25936, 25940, 0, 16384, 24576, 25600, 25856, - 25920, 25936, 25940, 0, 16384, 24576, 25600, 25856, - 25920, 25936, 25944, 25942, 0, 16384, 24576, 25600, - 25856, 25920, 25936, 0, 16384, 24576, 25600, 25856, - 25920, 25952, 25944, 0, 16384, 24576, 25600, 25856, - 25920, 25952, 25944, 0, 16384, 24576, 25600, 25856, - 25920, 25952, 25944, 25946, 0, 16384, 24576, 25600, - 25856, 25920, 25952, 25944, 0, 16384, 24576, 25600, - 25856, 25920, 25952, 25953, 25948, 0, 16384, 24576, - 25600, 25856, 25920, 25952, 25953, 25948, 0, 16384, - 24576, 25600, 25856, 25920, 25952, 25953, 25948, 25950, - 0, 16384, 24576, 25600, 25856, 25920, 0, 16384, - 24576, 25600, 25856, 25984, 25952, 0, 16384, 24576, - 25600, 25856, 25984, 25952, 0, 16384, 24576, 25600, - 25856, 25984, 25952, 25954, 0, 16384, 24576, 25600, - 25856, 25984, 25952, 0, 16384, 24576, 25600, 25856, - 25984, 25952, 25956, 0, 16384, 24576, 25600, 25856, - 25984, 25952, 25956, 0, 16384, 24576, 25600, 25856, - 25984, 25952, 25960, 25958, 0, 16384, 24576, 25600, - 25856, 25984, 25952, 0, 16384, 24576, 25600, 25856, - 25984, 25952, 25960, 0, 16384, 24576, 25600, 25856, - 25984, 25952, 25960, 0, 16384, 24576, 25600, 25856, - 25984, 25952, 25960, 25962, 0, 16384, 24576, 25600, - 25856, 25984, 25952, 25960, 0, 16384, 24576, 25600, - 25856, 25984, 25952, 25968, 25964, 0, 16384, 24576, - 25600, 25856, 25984, 25952, 25968, 25964, 0, 16384, - 24576, 25600, 25856, 25984, 25952, 25968, 25969, 25966, - 0, 16384, 24576, 25600, 25856, 25984, 25952, 0, - 16384, 24576, 25600, 25856, 25984, 25985, 25968, 0, - 16384, 24576, 25600, 25856, 25984, 25985, 25968, 0, - 16384, 24576, 25600, 25856, 25984, 25985, 25968, 25970, - 0, 16384, 24576, 25600, 25856, 25984, 25985, 25968, - 0, 16384, 24576, 25600, 25856, 25984, 25985, 25968, - 25972, 0, 16384, 24576, 25600, 25856, 25984, 25985, - 25968, 25972, 0, 16384, 24576, 25600, 25856, 25984, - 25985, 25968, 25976, 25974, 0, 16384, 24576, 25600, - 25856, 25984, 25985, 25968, 0, 16384, 24576, 25600, - 25856, 25984, 25985, 25968, 25976, 0, 16384, 24576, - 25600, 25856, 25984, 25985, 25987, 25976, 0, 16384, - 24576, 25600, 25856, 25984, 25985, 25987, 25976, 25978, - 0, 16384, 24576, 25600, 25856, 25984, 25985, 25987, - 25976, 0, 16384, 24576, 25600, 25856, 25984, 25985, - 25987, 25976, 25980, 0, 16384, 24576, 25600, 25856, - 25984, 25985, 25987, 25976, 25980, 0, 16384, 24576, - 25600, 25856, 25984, 25985, 25987, 25976, 25980, 25982, - 0, 16384, 24576, 25600, 25856, 0, 16384, 24576, - 25600, 26112, 25984, 0, 16384, 24576, 25600, 26112, - 25984, 0, 16384, 24576, 25600, 26112, 25984, 25986, - 0, 16384, 24576, 25600, 26112, 25984, 0, 16384, - 24576, 25600, 26112, 25984, 25988, 0, 16384, 24576, - 25600, 26112, 25984, 25988, 0, 16384, 24576, 25600, - 26112, 25984, 25992, 25990, 0, 16384, 24576, 25600, - 26112, 25984, 0, 16384, 24576, 25600, 26112, 25984, - 25992, 0, 16384, 24576, 25600, 26112, 25984, 25992, - 0, 16384, 24576, 25600, 26112, 25984, 25992, 25994, - 0, 16384, 24576, 25600, 26112, 25984, 25992, 0, - 16384, 24576, 25600, 26112, 25984, 26000, 25996, 0, - 16384, 24576, 25600, 26112, 25984, 26000, 25996, 0, - 16384, 24576, 25600, 26112, 25984, 26000, 26001, 25998, - 0, 16384, 24576, 25600, 26112, 25984, 0, 16384, - 24576, 25600, 26112, 25984, 26000, 0, 16384, 24576, - 25600, 26112, 25984, 26000, 0, 16384, 24576, 25600, - 26112, 25984, 26000, 26002, 0, 16384, 24576, 25600, - 26112, 25984, 26000, 0, 16384, 24576, 25600, 26112, - 25984, 26000, 26004, 0, 16384, 24576, 25600, 26112, - 25984, 26000, 26004, 0, 16384, 24576, 25600, 26112, - 25984, 26000, 26008, 26006, 0, 16384, 24576, 25600, - 26112, 25984, 26000, 0, 16384, 24576, 25600, 26112, - 25984, 26016, 26008, 0, 16384, 24576, 25600, 26112, - 25984, 26016, 26008, 0, 16384, 24576, 25600, 26112, - 25984, 26016, 26008, 26010, 0, 16384, 24576, 25600, - 26112, 25984, 26016, 26008, 0, 16384, 24576, 25600, - 26112, 25984, 26016, 26017, 26012, 0, 16384, 24576, - 25600, 26112, 25984, 26016, 26017, 26012, 0, 16384, - 24576, 25600, 26112, 25984, 26016, 26017, 26012, 26014, - 0, 16384, 24576, 25600, 26112, 25984, 0, 16384, - 24576, 25600, 26112, 25984, 26016, 0, 16384, 24576, - 25600, 26112, 25984, 26016, 0, 16384, 24576, 25600, - 26112, 25984, 26016, 26018, 0, 16384, 24576, 25600, - 26112, 25984, 26016, 0, 16384, 24576, 25600, 26112, - 25984, 26016, 26020, 0, 16384, 24576, 25600, 26112, - 25984, 26016, 26020, 0, 16384, 24576, 25600, 26112, - 25984, 26016, 26024, 26022, 0, 16384, 24576, 25600, - 26112, 25984, 26016, 0, 16384, 24576, 25600, 26112, - 25984, 26016, 26024, 0, 16384, 24576, 25600, 26112, - 25984, 26016, 26024, 0, 16384, 24576, 25600, 26112, - 25984, 26016, 26024, 26026, 0, 16384, 24576, 25600, - 26112, 25984, 26016, 26024, 0, 16384, 24576, 25600, - 26112, 25984, 26016, 26032, 26028, 0, 16384, 24576, - 25600, 26112, 25984, 26016, 26032, 26028, 0, 16384, - 24576, 25600, 26112, 25984, 26016, 26032, 26033, 26030, - 0, 16384, 24576, 25600, 26112, 25984, 26016, 0, - 16384, 24576, 25600, 26112, 25984, 26048, 26032, 0, - 16384, 24576, 25600, 26112, 25984, 26048, 26032, 0, - 16384, 24576, 25600, 26112, 25984, 26048, 26032, 26034, - 0, 16384, 24576, 25600, 26112, 25984, 26048, 26032, - 0, 16384, 24576, 25600, 26112, 25984, 26048, 26032, - 26036, 0, 16384, 24576, 25600, 26112, 25984, 26048, - 26032, 26036, 0, 16384, 24576, 25600, 26112, 25984, - 26048, 26032, 26040, 26038, 0, 16384, 24576, 25600, - 26112, 25984, 26048, 26032, 0, 16384, 24576, 25600, - 26112, 25984, 26048, 26049, 26040, 0, 16384, 24576, - 25600, 26112, 25984, 26048, 26049, 26040, 0, 16384, - 24576, 25600, 26112, 25984, 26048, 26049, 26040, 26042, - 0, 16384, 24576, 25600, 26112, 25984, 26048, 26049, - 26040, 0, 16384, 24576, 25600, 26112, 25984, 26048, - 26049, 26040, 26044, 0, 16384, 24576, 25600, 26112, - 25984, 26048, 26049, 26051, 26044, 0, 16384, 24576, - 25600, 26112, 25984, 26048, 26049, 26051, 26044, 26046, - 0, 16384, 24576, 25600, 26112, 25984, 0, 16384, - 24576, 25600, 26112, 26113, 26048, 0, 16384, 24576, - 25600, 26112, 26113, 26048, 0, 16384, 24576, 25600, - 26112, 26113, 26048, 26050, 0, 16384, 24576, 25600, - 26112, 26113, 26048, 0, 16384, 24576, 25600, 26112, - 26113, 26048, 26052, 0, 16384, 24576, 25600, 26112, - 26113, 26048, 26052, 0, 16384, 24576, 25600, 26112, - 26113, 26048, 26056, 26054, 0, 16384, 24576, 25600, - 26112, 26113, 26048, 0, 16384, 24576, 25600, 26112, - 26113, 26048, 26056, 0, 16384, 24576, 25600, 26112, - 26113, 26048, 26056, 0, 16384, 24576, 25600, 26112, - 26113, 26048, 26056, 26058, 0, 16384, 24576, 25600, - 26112, 26113, 26048, 26056, 0, 16384, 24576, 25600, - 26112, 26113, 26048, 26064, 26060, 0, 16384, 24576, - 25600, 26112, 26113, 26048, 26064, 26060, 0, 16384, - 24576, 25600, 26112, 26113, 26048, 26064, 26065, 26062, - 0, 16384, 24576, 25600, 26112, 26113, 26048, 0, - 16384, 24576, 25600, 26112, 26113, 26048, 26064, 0, - 16384, 24576, 25600, 26112, 26113, 26048, 26064, 0, - 16384, 24576, 25600, 26112, 26113, 26048, 26064, 26066, - 0, 16384, 24576, 25600, 26112, 26113, 26048, 26064, - 0, 16384, 24576, 25600, 26112, 26113, 26048, 26064, - 26068, 0, 16384, 24576, 25600, 26112, 26113, 26048, - 26064, 26068, 0, 16384, 24576, 25600, 26112, 26113, - 26048, 26064, 26072, 26070, 0, 16384, 24576, 25600, - 26112, 26113, 26048, 26064, 0, 16384, 24576, 25600, - 26112, 26113, 26048, 26080, 26072, 0, 16384, 24576, - 25600, 26112, 26113, 26048, 26080, 26072, 0, 16384, - 24576, 25600, 26112, 26113, 26048, 26080, 26072, 26074, - 0, 16384, 24576, 25600, 26112, 26113, 26048, 26080, - 26072, 0, 16384, 24576, 25600, 26112, 26113, 26048, - 26080, 26081, 26076, 0, 16384, 24576, 25600, 26112, - 26113, 26048, 26080, 26081, 26076, 0, 16384, 24576, - 25600, 26112, 26113, 26048, 26080, 26081, 26076, 26078, - 0, 16384, 24576, 25600, 26112, 26113, 26048, 0, - 16384, 24576, 25600, 26112, 26113, 26048, 26080, 0, - 16384, 24576, 25600, 26112, 26113, 26115, 26080, 0, - 16384, 24576, 25600, 26112, 26113, 26115, 26080, 26082, - 0, 16384, 24576, 25600, 26112, 26113, 26115, 26080, - 0, 16384, 24576, 25600, 26112, 26113, 26115, 26080, - 26084, 0, 16384, 24576, 25600, 26112, 26113, 26115, - 26080, 26084, 0, 16384, 24576, 25600, 26112, 26113, - 26115, 26080, 26088, 26086, 0, 16384, 24576, 25600, - 26112, 26113, 26115, 26080, 0, 16384, 24576, 25600, - 26112, 26113, 26115, 26080, 26088, 0, 16384, 24576, - 25600, 26112, 26113, 26115, 26080, 26088, 0, 16384, - 24576, 25600, 26112, 26113, 26115, 26080, 26088, 26090, - 0, 16384, 24576, 25600, 26112, 26113, 26115, 26080, - 26088, 0, 16384, 24576, 25600, 26112, 26113, 26115, - 26080, 26096, 26092, 0, 16384, 24576, 25600, 26112, - 26113, 26115, 26080, 26096, 26092, 0, 16384, 24576, - 25600, 26112, 26113, 26115, 26080, 26096, 26097, 26094, - 0, 16384, 24576, 25600, 26112, 26113, 26115, 26080, - 0, 16384, 24576, 25600, 26112, 26113, 26115, 26080, - 26096, 0, 16384, 24576, 25600, 26112, 26113, 26115, - 26080, 26096, 0, 16384, 24576, 25600, 26112, 26113, - 26115, 26080, 26096, 26098, 0, 16384, 24576, 25600, - 26112, 26113, 26115, 26119, 26096, 0, 16384, 24576, - 25600, 26112, 26113, 26115, 26119, 26096, 26100, 0, - 16384, 24576, 25600, 26112, 26113, 26115, 26119, 26096, - 26100, 0, 16384, 24576, 25600, 26112, 26113, 26115, - 26119, 26096, 26104, 26102, 0, 16384, 24576, 25600, - 26112, 26113, 26115, 26119, 26096, 0, 16384, 24576, - 25600, 26112, 26113, 26115, 26119, 26096, 26104, 0, - 16384, 24576, 25600, 26112, 26113, 26115, 26119, 26096, - 26104, 0, 16384, 24576, 25600, 26112, 26113, 26115, - 26119, 26096, 26104, 26106, 0, 16384, 24576, 25600, - 26112, 26113, 26115, 26119, 26096, 26104, 0, 16384, - 24576, 25600, 26112, 26113, 26115, 26119, 26096, 26104, - 26108, 0, 16384, 24576, 25600, 26112, 26113, 26115, - 26119, 26096, 26104, 26108, 0, 16384, 24576, 25600, - 26112, 26113, 26115, 26119, 26096, 26104, 26108, 26110, - 0, 16384, 24576, 25600, 0, 16384, 24576, 26624, - 26112, 0, 16384, 24576, 26624, 26112, 0, 16384, - 24576, 26624, 26112, 26114, 0, 16384, 24576, 26624, - 26112, 0, 16384, 24576, 26624, 26112, 26116, 0, - 16384, 24576, 26624, 26112, 26116, 0, 16384, 24576, - 26624, 26112, 26120, 26118, 0, 16384, 24576, 26624, - 26112, 0, 16384, 24576, 26624, 26112, 26120, 0, - 16384, 24576, 26624, 26112, 26120, 0, 16384, 24576, - 26624, 26112, 26120, 26122, 0, 16384, 24576, 26624, - 26112, 26120, 0, 16384, 24576, 26624, 26112, 26128, - 26124, 0, 16384, 24576, 26624, 26112, 26128, 26124, - 0, 16384, 24576, 26624, 26112, 26128, 26129, 26126, - 0, 16384, 24576, 26624, 26112, 0, 16384, 24576, - 26624, 26112, 26128, 0, 16384, 24576, 26624, 26112, - 26128, 0, 16384, 24576, 26624, 26112, 26128, 26130, - 0, 16384, 24576, 26624, 26112, 26128, 0, 16384, - 24576, 26624, 26112, 26128, 26132, 0, 16384, 24576, - 26624, 26112, 26128, 26132, 0, 16384, 24576, 26624, - 26112, 26128, 26136, 26134, 0, 16384, 24576, 26624, - 26112, 26128, 0, 16384, 24576, 26624, 26112, 26144, - 26136, 0, 16384, 24576, 26624, 26112, 26144, 26136, - 0, 16384, 24576, 26624, 26112, 26144, 26136, 26138, - 0, 16384, 24576, 26624, 26112, 26144, 26136, 0, - 16384, 24576, 26624, 26112, 26144, 26145, 26140, 0, - 16384, 24576, 26624, 26112, 26144, 26145, 26140, 0, - 16384, 24576, 26624, 26112, 26144, 26145, 26140, 26142, - 0, 16384, 24576, 26624, 26112, 0, 16384, 24576, - 26624, 26112, 26144, 0, 16384, 24576, 26624, 26112, - 26144, 0, 16384, 24576, 26624, 26112, 26144, 26146, - 0, 16384, 24576, 26624, 26112, 26144, 0, 16384, - 24576, 26624, 26112, 26144, 26148, 0, 16384, 24576, - 26624, 26112, 26144, 26148, 0, 16384, 24576, 26624, - 26112, 26144, 26152, 26150, 0, 16384, 24576, 26624, - 26112, 26144, 0, 16384, 24576, 26624, 26112, 26144, - 26152, 0, 16384, 24576, 26624, 26112, 26144, 26152, - 0, 16384, 24576, 26624, 26112, 26144, 26152, 26154, - 0, 16384, 24576, 26624, 26112, 26144, 26152, 0, - 16384, 24576, 26624, 26112, 26144, 26160, 26156, 0, - 16384, 24576, 26624, 26112, 26144, 26160, 26156, 0, - 16384, 24576, 26624, 26112, 26144, 26160, 26161, 26158, - 0, 16384, 24576, 26624, 26112, 26144, 0, 16384, - 24576, 26624, 26112, 26176, 26160, 0, 16384, 24576, - 26624, 26112, 26176, 26160, 0, 16384, 24576, 26624, - 26112, 26176, 26160, 26162, 0, 16384, 24576, 26624, - 26112, 26176, 26160, 0, 16384, 24576, 26624, 26112, - 26176, 26160, 26164, 0, 16384, 24576, 26624, 26112, - 26176, 26160, 26164, 0, 16384, 24576, 26624, 26112, - 26176, 26160, 26168, 26166, 0, 16384, 24576, 26624, - 26112, 26176, 26160, 0, 16384, 24576, 26624, 26112, - 26176, 26177, 26168, 0, 16384, 24576, 26624, 26112, - 26176, 26177, 26168, 0, 16384, 24576, 26624, 26112, - 26176, 26177, 26168, 26170, 0, 16384, 24576, 26624, - 26112, 26176, 26177, 26168, 0, 16384, 24576, 26624, - 26112, 26176, 26177, 26168, 26172, 0, 16384, 24576, - 26624, 26112, 26176, 26177, 26179, 26172, 0, 16384, - 24576, 26624, 26112, 26176, 26177, 26179, 26172, 26174, - 0, 16384, 24576, 26624, 26112, 0, 16384, 24576, - 26624, 26112, 26176, 0, 16384, 24576, 26624, 26112, - 26176, 0, 16384, 24576, 26624, 26112, 26176, 26178, - 0, 16384, 24576, 26624, 26112, 26176, 0, 16384, - 24576, 26624, 26112, 26176, 26180, 0, 16384, 24576, - 26624, 26112, 26176, 26180, 0, 16384, 24576, 26624, - 26112, 26176, 26184, 26182, 0, 16384, 24576, 26624, - 26112, 26176, 0, 16384, 24576, 26624, 26112, 26176, - 26184, 0, 16384, 24576, 26624, 26112, 26176, 26184, - 0, 16384, 24576, 26624, 26112, 26176, 26184, 26186, - 0, 16384, 24576, 26624, 26112, 26176, 26184, 0, - 16384, 24576, 26624, 26112, 26176, 26192, 26188, 0, - 16384, 24576, 26624, 26112, 26176, 26192, 26188, 0, - 16384, 24576, 26624, 26112, 26176, 26192, 26193, 26190, - 0, 16384, 24576, 26624, 26112, 26176, 0, 16384, - 24576, 26624, 26112, 26176, 26192, 0, 16384, 24576, - 26624, 26112, 26176, 26192, 0, 16384, 24576, 26624, - 26112, 26176, 26192, 26194, 0, 16384, 24576, 26624, - 26112, 26176, 26192, 0, 16384, 24576, 26624, 26112, - 26176, 26192, 26196, 0, 16384, 24576, 26624, 26112, - 26176, 26192, 26196, 0, 16384, 24576, 26624, 26112, - 26176, 26192, 26200, 26198, 0, 16384, 24576, 26624, - 26112, 26176, 26192, 0, 16384, 24576, 26624, 26112, - 26176, 26208, 26200, 0, 16384, 24576, 26624, 26112, - 26176, 26208, 26200, 0, 16384, 24576, 26624, 26112, - 26176, 26208, 26200, 26202, 0, 16384, 24576, 26624, - 26112, 26176, 26208, 26200, 0, 16384, 24576, 26624, - 26112, 26176, 26208, 26209, 26204, 0, 16384, 24576, - 26624, 26112, 26176, 26208, 26209, 26204, 0, 16384, - 24576, 26624, 26112, 26176, 26208, 26209, 26204, 26206, - 0, 16384, 24576, 26624, 26112, 26176, 0, 16384, - 24576, 26624, 26112, 26240, 26208, 0, 16384, 24576, - 26624, 26112, 26240, 26208, 0, 16384, 24576, 26624, - 26112, 26240, 26208, 26210, 0, 16384, 24576, 26624, - 26112, 26240, 26208, 0, 16384, 24576, 26624, 26112, - 26240, 26208, 26212, 0, 16384, 24576, 26624, 26112, - 26240, 26208, 26212, 0, 16384, 24576, 26624, 26112, - 26240, 26208, 26216, 26214, 0, 16384, 24576, 26624, - 26112, 26240, 26208, 0, 16384, 24576, 26624, 26112, - 26240, 26208, 26216, 0, 16384, 24576, 26624, 26112, - 26240, 26208, 26216, 0, 16384, 24576, 26624, 26112, - 26240, 26208, 26216, 26218, 0, 16384, 24576, 26624, - 26112, 26240, 26208, 26216, 0, 16384, 24576, 26624, - 26112, 26240, 26208, 26224, 26220, 0, 16384, 24576, - 26624, 26112, 26240, 26208, 26224, 26220, 0, 16384, - 24576, 26624, 26112, 26240, 26208, 26224, 26225, 26222, - 0, 16384, 24576, 26624, 26112, 26240, 26208, 0, - 16384, 24576, 26624, 26112, 26240, 26241, 26224, 0, - 16384, 24576, 26624, 26112, 26240, 26241, 26224, 0, - 16384, 24576, 26624, 26112, 26240, 26241, 26224, 26226, - 0, 16384, 24576, 26624, 26112, 26240, 26241, 26224, - 0, 16384, 24576, 26624, 26112, 26240, 26241, 26224, - 26228, 0, 16384, 24576, 26624, 26112, 26240, 26241, - 26224, 26228, 0, 16384, 24576, 26624, 26112, 26240, - 26241, 26224, 26232, 26230, 0, 16384, 24576, 26624, - 26112, 26240, 26241, 26224, 0, 16384, 24576, 26624, - 26112, 26240, 26241, 26224, 26232, 0, 16384, 24576, - 26624, 26112, 26240, 26241, 26243, 26232, 0, 16384, - 24576, 26624, 26112, 26240, 26241, 26243, 26232, 26234, - 0, 16384, 24576, 26624, 26112, 26240, 26241, 26243, - 26232, 0, 16384, 24576, 26624, 26112, 26240, 26241, - 26243, 26232, 26236, 0, 16384, 24576, 26624, 26112, - 26240, 26241, 26243, 26232, 26236, 0, 16384, 24576, - 26624, 26112, 26240, 26241, 26243, 26232, 26236, 26238, - 0, 16384, 24576, 26624, 26112, 0, 16384, 24576, - 26624, 26112, 26240, 0, 16384, 24576, 26624, 26112, - 26240, 0, 16384, 24576, 26624, 26112, 26240, 26242, - 0, 16384, 24576, 26624, 26112, 26240, 0, 16384, - 24576, 26624, 26112, 26240, 26244, 0, 16384, 24576, - 26624, 26112, 26240, 26244, 0, 16384, 24576, 26624, - 26112, 26240, 26248, 26246, 0, 16384, 24576, 26624, - 26112, 26240, 0, 16384, 24576, 26624, 26112, 26240, - 26248, 0, 16384, 24576, 26624, 26112, 26240, 26248, - 0, 16384, 24576, 26624, 26112, 26240, 26248, 26250, - 0, 16384, 24576, 26624, 26112, 26240, 26248, 0, - 16384, 24576, 26624, 26112, 26240, 26256, 26252, 0, - 16384, 24576, 26624, 26112, 26240, 26256, 26252, 0, - 16384, 24576, 26624, 26112, 26240, 26256, 26257, 26254, - 0, 16384, 24576, 26624, 26112, 26240, 0, 16384, - 24576, 26624, 26112, 26240, 26256, 0, 16384, 24576, - 26624, 26112, 26240, 26256, 0, 16384, 24576, 26624, - 26112, 26240, 26256, 26258, 0, 16384, 24576, 26624, - 26112, 26240, 26256, 0, 16384, 24576, 26624, 26112, - 26240, 26256, 26260, 0, 16384, 24576, 26624, 26112, - 26240, 26256, 26260, 0, 16384, 24576, 26624, 26112, - 26240, 26256, 26264, 26262, 0, 16384, 24576, 26624, - 26112, 26240, 26256, 0, 16384, 24576, 26624, 26112, - 26240, 26272, 26264, 0, 16384, 24576, 26624, 26112, - 26240, 26272, 26264, 0, 16384, 24576, 26624, 26112, - 26240, 26272, 26264, 26266, 0, 16384, 24576, 26624, - 26112, 26240, 26272, 26264, 0, 16384, 24576, 26624, - 26112, 26240, 26272, 26273, 26268, 0, 16384, 24576, - 26624, 26112, 26240, 26272, 26273, 26268, 0, 16384, - 24576, 26624, 26112, 26240, 26272, 26273, 26268, 26270, - 0, 16384, 24576, 26624, 26112, 26240, 0, 16384, - 24576, 26624, 26112, 26240, 26272, 0, 16384, 24576, - 26624, 26112, 26240, 26272, 0, 16384, 24576, 26624, - 26112, 26240, 26272, 26274, 0, 16384, 24576, 26624, - 26112, 26240, 26272, 0, 16384, 24576, 26624, 26112, - 26240, 26272, 26276, 0, 16384, 24576, 26624, 26112, - 26240, 26272, 26276, 0, 16384, 24576, 26624, 26112, - 26240, 26272, 26280, 26278, 0, 16384, 24576, 26624, - 26112, 26240, 26272, 0, 16384, 24576, 26624, 26112, - 26240, 26272, 26280, 0, 16384, 24576, 26624, 26112, - 26240, 26272, 26280, 0, 16384, 24576, 26624, 26112, - 26240, 26272, 26280, 26282, 0, 16384, 24576, 26624, - 26112, 26240, 26272, 26280, 0, 16384, 24576, 26624, - 26112, 26240, 26272, 26288, 26284, 0, 16384, 24576, - 26624, 26112, 26240, 26272, 26288, 26284, 0, 16384, - 24576, 26624, 26112, 26240, 26272, 26288, 26289, 26286, - 0, 16384, 24576, 26624, 26112, 26240, 26272, 0, - 16384, 24576, 26624, 26112, 26240, 26304, 26288, 0, - 16384, 24576, 26624, 26112, 26240, 26304, 26288, 0, - 16384, 24576, 26624, 26112, 26240, 26304, 26288, 26290, - 0, 16384, 24576, 26624, 26112, 26240, 26304, 26288, - 0, 16384, 24576, 26624, 26112, 26240, 26304, 26288, - 26292, 0, 16384, 24576, 26624, 26112, 26240, 26304, - 26288, 26292, 0, 16384, 24576, 26624, 26112, 26240, - 26304, 26288, 26296, 26294, 0, 16384, 24576, 26624, - 26112, 26240, 26304, 26288, 0, 16384, 24576, 26624, - 26112, 26240, 26304, 26305, 26296, 0, 16384, 24576, - 26624, 26112, 26240, 26304, 26305, 26296, 0, 16384, - 24576, 26624, 26112, 26240, 26304, 26305, 26296, 26298, - 0, 16384, 24576, 26624, 26112, 26240, 26304, 26305, - 26296, 0, 16384, 24576, 26624, 26112, 26240, 26304, - 26305, 26296, 26300, 0, 16384, 24576, 26624, 26112, - 26240, 26304, 26305, 26307, 26300, 0, 16384, 24576, - 26624, 26112, 26240, 26304, 26305, 26307, 26300, 26302, - 0, 16384, 24576, 26624, 26112, 26240, 0, 16384, - 24576, 26624, 26112, 26368, 26304, 0, 16384, 24576, - 26624, 26112, 26368, 26304, 0, 16384, 24576, 26624, - 26112, 26368, 26304, 26306, 0, 16384, 24576, 26624, - 26112, 26368, 26304, 0, 16384, 24576, 26624, 26112, - 26368, 26304, 26308, 0, 16384, 24576, 26624, 26112, - 26368, 26304, 26308, 0, 16384, 24576, 26624, 26112, - 26368, 26304, 26312, 26310, 0, 16384, 24576, 26624, - 26112, 26368, 26304, 0, 16384, 24576, 26624, 26112, - 26368, 26304, 26312, 0, 16384, 24576, 26624, 26112, - 26368, 26304, 26312, 0, 16384, 24576, 26624, 26112, - 26368, 26304, 26312, 26314, 0, 16384, 24576, 26624, - 26112, 26368, 26304, 26312, 0, 16384, 24576, 26624, - 26112, 26368, 26304, 26320, 26316, 0, 16384, 24576, - 26624, 26112, 26368, 26304, 26320, 26316, 0, 16384, - 24576, 26624, 26112, 26368, 26304, 26320, 26321, 26318, - 0, 16384, 24576, 26624, 26112, 26368, 26304, 0, - 16384, 24576, 26624, 26112, 26368, 26304, 26320, 0, - 16384, 24576, 26624, 26112, 26368, 26304, 26320, 0, - 16384, 24576, 26624, 26112, 26368, 26304, 26320, 26322, - 0, 16384, 24576, 26624, 26112, 26368, 26304, 26320, - 0, 16384, 24576, 26624, 26112, 26368, 26304, 26320, - 26324, 0, 16384, 24576, 26624, 26112, 26368, 26304, - 26320, 26324, 0, 16384, 24576, 26624, 26112, 26368, - 26304, 26320, 26328, 26326, 0, 16384, 24576, 26624, - 26112, 26368, 26304, 26320, 0, 16384, 24576, 26624, - 26112, 26368, 26304, 26336, 26328, 0, 16384, 24576, - 26624, 26112, 26368, 26304, 26336, 26328, 0, 16384, - 24576, 26624, 26112, 26368, 26304, 26336, 26328, 26330, - 0, 16384, 24576, 26624, 26112, 26368, 26304, 26336, - 26328, 0, 16384, 24576, 26624, 26112, 26368, 26304, - 26336, 26337, 26332, 0, 16384, 24576, 26624, 26112, - 26368, 26304, 26336, 26337, 26332, 0, 16384, 24576, - 26624, 26112, 26368, 26304, 26336, 26337, 26332, 26334, - 0, 16384, 24576, 26624, 26112, 26368, 26304, 0, - 16384, 24576, 26624, 26112, 26368, 26369, 26336, 0, - 16384, 24576, 26624, 26112, 26368, 26369, 26336, 0, - 16384, 24576, 26624, 26112, 26368, 26369, 26336, 26338, - 0, 16384, 24576, 26624, 26112, 26368, 26369, 26336, - 0, 16384, 24576, 26624, 26112, 26368, 26369, 26336, - 26340, 0, 16384, 24576, 26624, 26112, 26368, 26369, - 26336, 26340, 0, 16384, 24576, 26624, 26112, 26368, - 26369, 26336, 26344, 26342, 0, 16384, 24576, 26624, - 26112, 26368, 26369, 26336, 0, 16384, 24576, 26624, - 26112, 26368, 26369, 26336, 26344, 0, 16384, 24576, - 26624, 26112, 26368, 26369, 26336, 26344, 0, 16384, - 24576, 26624, 26112, 26368, 26369, 26336, 26344, 26346, - 0, 16384, 24576, 26624, 26112, 26368, 26369, 26336, - 26344, 0, 16384, 24576, 26624, 26112, 26368, 26369, - 26336, 26352, 26348, 0, 16384, 24576, 26624, 26112, - 26368, 26369, 26336, 26352, 26348, 0, 16384, 24576, - 26624, 26112, 26368, 26369, 26336, 26352, 26353, 26350, - 0, 16384, 24576, 26624, 26112, 26368, 26369, 26336, - 0, 16384, 24576, 26624, 26112, 26368, 26369, 26336, - 26352, 0, 16384, 24576, 26624, 26112, 26368, 26369, - 26371, 26352, 0, 16384, 24576, 26624, 26112, 26368, - 26369, 26371, 26352, 26354, 0, 16384, 24576, 26624, - 26112, 26368, 26369, 26371, 26352, 0, 16384, 24576, - 26624, 26112, 26368, 26369, 26371, 26352, 26356, 0, - 16384, 24576, 26624, 26112, 26368, 26369, 26371, 26352, - 26356, 0, 16384, 24576, 26624, 26112, 26368, 26369, - 26371, 26352, 26360, 26358, 0, 16384, 24576, 26624, - 26112, 26368, 26369, 26371, 26352, 0, 16384, 24576, - 26624, 26112, 26368, 26369, 26371, 26352, 26360, 0, - 16384, 24576, 26624, 26112, 26368, 26369, 26371, 26352, - 26360, 0, 16384, 24576, 26624, 26112, 26368, 26369, - 26371, 26352, 26360, 26362, 0, 16384, 24576, 26624, - 26112, 26368, 26369, 26371, 26375, 26360, 0, 16384, - 24576, 26624, 26112, 26368, 26369, 26371, 26375, 26360, - 26364, 0, 16384, 24576, 26624, 26112, 26368, 26369, - 26371, 26375, 26360, 26364, 0, 16384, 24576, 26624, - 26112, 26368, 26369, 26371, 26375, 26360, 26364, 26366, - 0, 16384, 24576, 26624, 26112, 0, 16384, 24576, - 26624, 26112, 26368, 0, 16384, 24576, 26624, 26625, - 26368, 0, 16384, 24576, 26624, 26625, 26368, 26370, - 0, 16384, 24576, 26624, 26625, 26368, 0, 16384, - 24576, 26624, 26625, 26368, 26372, 0, 16384, 24576, - 26624, 26625, 26368, 26372, 0, 16384, 24576, 26624, - 26625, 26368, 26376, 26374, 0, 16384, 24576, 26624, - 26625, 26368, 0, 16384, 24576, 26624, 26625, 26368, - 26376, 0, 16384, 24576, 26624, 26625, 26368, 26376, - 0, 16384, 24576, 26624, 26625, 26368, 26376, 26378, - 0, 16384, 24576, 26624, 26625, 26368, 26376, 0, - 16384, 24576, 26624, 26625, 26368, 26384, 26380, 0, - 16384, 24576, 26624, 26625, 26368, 26384, 26380, 0, - 16384, 24576, 26624, 26625, 26368, 26384, 26385, 26382, - 0, 16384, 24576, 26624, 26625, 26368, 0, 16384, - 24576, 26624, 26625, 26368, 26384, 0, 16384, 24576, - 26624, 26625, 26368, 26384, 0, 16384, 24576, 26624, - 26625, 26368, 26384, 26386, 0, 16384, 24576, 26624, - 26625, 26368, 26384, 0, 16384, 24576, 26624, 26625, - 26368, 26384, 26388, 0, 16384, 24576, 26624, 26625, - 26368, 26384, 26388, 0, 16384, 24576, 26624, 26625, - 26368, 26384, 26392, 26390, 0, 16384, 24576, 26624, - 26625, 26368, 26384, 0, 16384, 24576, 26624, 26625, - 26368, 26400, 26392, 0, 16384, 24576, 26624, 26625, - 26368, 26400, 26392, 0, 16384, 24576, 26624, 26625, - 26368, 26400, 26392, 26394, 0, 16384, 24576, 26624, - 26625, 26368, 26400, 26392, 0, 16384, 24576, 26624, - 26625, 26368, 26400, 26401, 26396, 0, 16384, 24576, - 26624, 26625, 26368, 26400, 26401, 26396, 0, 16384, - 24576, 26624, 26625, 26368, 26400, 26401, 26396, 26398, - 0, 16384, 24576, 26624, 26625, 26368, 0, 16384, - 24576, 26624, 26625, 26368, 26400, 0, 16384, 24576, - 26624, 26625, 26368, 26400, 0, 16384, 24576, 26624, - 26625, 26368, 26400, 26402, 0, 16384, 24576, 26624, - 26625, 26368, 26400, 0, 16384, 24576, 26624, 26625, - 26368, 26400, 26404, 0, 16384, 24576, 26624, 26625, - 26368, 26400, 26404, 0, 16384, 24576, 26624, 26625, - 26368, 26400, 26408, 26406, 0, 16384, 24576, 26624, - 26625, 26368, 26400, 0, 16384, 24576, 26624, 26625, - 26368, 26400, 26408, 0, 16384, 24576, 26624, 26625, - 26368, 26400, 26408, 0, 16384, 24576, 26624, 26625, - 26368, 26400, 26408, 26410, 0, 16384, 24576, 26624, - 26625, 26368, 26400, 26408, 0, 16384, 24576, 26624, - 26625, 26368, 26400, 26416, 26412, 0, 16384, 24576, - 26624, 26625, 26368, 26400, 26416, 26412, 0, 16384, - 24576, 26624, 26625, 26368, 26400, 26416, 26417, 26414, - 0, 16384, 24576, 26624, 26625, 26368, 26400, 0, - 16384, 24576, 26624, 26625, 26368, 26432, 26416, 0, - 16384, 24576, 26624, 26625, 26368, 26432, 26416, 0, - 16384, 24576, 26624, 26625, 26368, 26432, 26416, 26418, - 0, 16384, 24576, 26624, 26625, 26368, 26432, 26416, - 0, 16384, 24576, 26624, 26625, 26368, 26432, 26416, - 26420, 0, 16384, 24576, 26624, 26625, 26368, 26432, - 26416, 26420, 0, 16384, 24576, 26624, 26625, 26368, - 26432, 26416, 26424, 26422, 0, 16384, 24576, 26624, - 26625, 26368, 26432, 26416, 0, 16384, 24576, 26624, - 26625, 26368, 26432, 26433, 26424, 0, 16384, 24576, - 26624, 26625, 26368, 26432, 26433, 26424, 0, 16384, - 24576, 26624, 26625, 26368, 26432, 26433, 26424, 26426, - 0, 16384, 24576, 26624, 26625, 26368, 26432, 26433, - 26424, 0, 16384, 24576, 26624, 26625, 26368, 26432, - 26433, 26424, 26428, 0, 16384, 24576, 26624, 26625, - 26368, 26432, 26433, 26435, 26428, 0, 16384, 24576, - 26624, 26625, 26368, 26432, 26433, 26435, 26428, 26430, - 0, 16384, 24576, 26624, 26625, 26368, 0, 16384, - 24576, 26624, 26625, 26368, 26432, 0, 16384, 24576, - 26624, 26625, 26368, 26432, 0, 16384, 24576, 26624, - 26625, 26368, 26432, 26434, 0, 16384, 24576, 26624, - 26625, 26368, 26432, 0, 16384, 24576, 26624, 26625, - 26368, 26432, 26436, 0, 16384, 24576, 26624, 26625, - 26368, 26432, 26436, 0, 16384, 24576, 26624, 26625, - 26368, 26432, 26440, 26438, 0, 16384, 24576, 26624, - 26625, 26368, 26432, 0, 16384, 24576, 26624, 26625, - 26368, 26432, 26440, 0, 16384, 24576, 26624, 26625, - 26368, 26432, 26440, 0, 16384, 24576, 26624, 26625, - 26368, 26432, 26440, 26442, 0, 16384, 24576, 26624, - 26625, 26368, 26432, 26440, 0, 16384, 24576, 26624, - 26625, 26368, 26432, 26448, 26444, 0, 16384, 24576, - 26624, 26625, 26368, 26432, 26448, 26444, 0, 16384, - 24576, 26624, 26625, 26368, 26432, 26448, 26449, 26446, - 0, 16384, 24576, 26624, 26625, 26368, 26432, 0, - 16384, 24576, 26624, 26625, 26368, 26432, 26448, 0, - 16384, 24576, 26624, 26625, 26368, 26432, 26448, 0, - 16384, 24576, 26624, 26625, 26368, 26432, 26448, 26450, - 0, 16384, 24576, 26624, 26625, 26368, 26432, 26448, - 0, 16384, 24576, 26624, 26625, 26368, 26432, 26448, - 26452, 0, 16384, 24576, 26624, 26625, 26368, 26432, - 26448, 26452, 0, 16384, 24576, 26624, 26625, 26368, - 26432, 26448, 26456, 26454, 0, 16384, 24576, 26624, - 26625, 26368, 26432, 26448, 0, 16384, 24576, 26624, - 26625, 26368, 26432, 26464, 26456, 0, 16384, 24576, - 26624, 26625, 26368, 26432, 26464, 26456, 0, 16384, - 24576, 26624, 26625, 26368, 26432, 26464, 26456, 26458, - 0, 16384, 24576, 26624, 26625, 26368, 26432, 26464, - 26456, 0, 16384, 24576, 26624, 26625, 26368, 26432, - 26464, 26465, 26460, 0, 16384, 24576, 26624, 26625, - 26368, 26432, 26464, 26465, 26460, 0, 16384, 24576, - 26624, 26625, 26368, 26432, 26464, 26465, 26460, 26462, - 0, 16384, 24576, 26624, 26625, 26368, 26432, 0, - 16384, 24576, 26624, 26625, 26368, 26496, 26464, 0, - 16384, 24576, 26624, 26625, 26368, 26496, 26464, 0, - 16384, 24576, 26624, 26625, 26368, 26496, 26464, 26466, - 0, 16384, 24576, 26624, 26625, 26368, 26496, 26464, - 0, 16384, 24576, 26624, 26625, 26368, 26496, 26464, - 26468, 0, 16384, 24576, 26624, 26625, 26368, 26496, - 26464, 26468, 0, 16384, 24576, 26624, 26625, 26368, - 26496, 26464, 26472, 26470, 0, 16384, 24576, 26624, - 26625, 26368, 26496, 26464, 0, 16384, 24576, 26624, - 26625, 26368, 26496, 26464, 26472, 0, 16384, 24576, - 26624, 26625, 26368, 26496, 26464, 26472, 0, 16384, - 24576, 26624, 26625, 26368, 26496, 26464, 26472, 26474, - 0, 16384, 24576, 26624, 26625, 26368, 26496, 26464, - 26472, 0, 16384, 24576, 26624, 26625, 26368, 26496, - 26464, 26480, 26476, 0, 16384, 24576, 26624, 26625, - 26368, 26496, 26464, 26480, 26476, 0, 16384, 24576, - 26624, 26625, 26368, 26496, 26464, 26480, 26481, 26478, - 0, 16384, 24576, 26624, 26625, 26368, 26496, 26464, - 0, 16384, 24576, 26624, 26625, 26368, 26496, 26497, - 26480, 0, 16384, 24576, 26624, 26625, 26368, 26496, - 26497, 26480, 0, 16384, 24576, 26624, 26625, 26368, - 26496, 26497, 26480, 26482, 0, 16384, 24576, 26624, - 26625, 26368, 26496, 26497, 26480, 0, 16384, 24576, - 26624, 26625, 26368, 26496, 26497, 26480, 26484, 0, - 16384, 24576, 26624, 26625, 26368, 26496, 26497, 26480, - 26484, 0, 16384, 24576, 26624, 26625, 26368, 26496, - 26497, 26480, 26488, 26486, 0, 16384, 24576, 26624, - 26625, 26368, 26496, 26497, 26480, 0, 16384, 24576, - 26624, 26625, 26368, 26496, 26497, 26480, 26488, 0, - 16384, 24576, 26624, 26625, 26368, 26496, 26497, 26499, - 26488, 0, 16384, 24576, 26624, 26625, 26368, 26496, - 26497, 26499, 26488, 26490, 0, 16384, 24576, 26624, - 26625, 26368, 26496, 26497, 26499, 26488, 0, 16384, - 24576, 26624, 26625, 26368, 26496, 26497, 26499, 26488, - 26492, 0, 16384, 24576, 26624, 26625, 26368, 26496, - 26497, 26499, 26488, 26492, 0, 16384, 24576, 26624, - 26625, 26368, 26496, 26497, 26499, 26488, 26492, 26494, - 0, 16384, 24576, 26624, 26625, 26368, 0, 16384, - 24576, 26624, 26625, 26368, 26496, 0, 16384, 24576, - 26624, 26625, 26368, 26496, 0, 16384, 24576, 26624, - 26625, 26368, 26496, 26498, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 0, 16384, 24576, 26624, 26625, - 26627, 26496, 26500, 0, 16384, 24576, 26624, 26625, - 26627, 26496, 26500, 0, 16384, 24576, 26624, 26625, - 26627, 26496, 26504, 26502, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 0, 16384, 24576, 26624, 26625, - 26627, 26496, 26504, 0, 16384, 24576, 26624, 26625, - 26627, 26496, 26504, 0, 16384, 24576, 26624, 26625, - 26627, 26496, 26504, 26506, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 26504, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 26512, 26508, 0, 16384, 24576, - 26624, 26625, 26627, 26496, 26512, 26508, 0, 16384, - 24576, 26624, 26625, 26627, 26496, 26512, 26513, 26510, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 0, - 16384, 24576, 26624, 26625, 26627, 26496, 26512, 0, - 16384, 24576, 26624, 26625, 26627, 26496, 26512, 0, - 16384, 24576, 26624, 26625, 26627, 26496, 26512, 26514, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 26512, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 26512, - 26516, 0, 16384, 24576, 26624, 26625, 26627, 26496, - 26512, 26516, 0, 16384, 24576, 26624, 26625, 26627, - 26496, 26512, 26520, 26518, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 26512, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 26528, 26520, 0, 16384, 24576, - 26624, 26625, 26627, 26496, 26528, 26520, 0, 16384, - 24576, 26624, 26625, 26627, 26496, 26528, 26520, 26522, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 26528, - 26520, 0, 16384, 24576, 26624, 26625, 26627, 26496, - 26528, 26529, 26524, 0, 16384, 24576, 26624, 26625, - 26627, 26496, 26528, 26529, 26524, 0, 16384, 24576, - 26624, 26625, 26627, 26496, 26528, 26529, 26524, 26526, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 0, - 16384, 24576, 26624, 26625, 26627, 26496, 26528, 0, - 16384, 24576, 26624, 26625, 26627, 26496, 26528, 0, - 16384, 24576, 26624, 26625, 26627, 26496, 26528, 26530, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 26528, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 26528, - 26532, 0, 16384, 24576, 26624, 26625, 26627, 26496, - 26528, 26532, 0, 16384, 24576, 26624, 26625, 26627, - 26496, 26528, 26536, 26534, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 26528, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 26528, 26536, 0, 16384, 24576, - 26624, 26625, 26627, 26496, 26528, 26536, 0, 16384, - 24576, 26624, 26625, 26627, 26496, 26528, 26536, 26538, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 26528, - 26536, 0, 16384, 24576, 26624, 26625, 26627, 26496, - 26528, 26544, 26540, 0, 16384, 24576, 26624, 26625, - 26627, 26496, 26528, 26544, 26540, 0, 16384, 24576, - 26624, 26625, 26627, 26496, 26528, 26544, 26545, 26542, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 26528, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 26560, - 26544, 0, 16384, 24576, 26624, 26625, 26627, 26496, - 26560, 26544, 0, 16384, 24576, 26624, 26625, 26627, - 26496, 26560, 26544, 26546, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 26560, 26544, 0, 16384, 24576, - 26624, 26625, 26627, 26496, 26560, 26544, 26548, 0, - 16384, 24576, 26624, 26625, 26627, 26496, 26560, 26544, - 26548, 0, 16384, 24576, 26624, 26625, 26627, 26496, - 26560, 26544, 26552, 26550, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 26560, 26544, 0, 16384, 24576, - 26624, 26625, 26627, 26496, 26560, 26561, 26552, 0, - 16384, 24576, 26624, 26625, 26627, 26496, 26560, 26561, - 26552, 0, 16384, 24576, 26624, 26625, 26627, 26496, - 26560, 26561, 26552, 26554, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 26560, 26561, 26552, 0, 16384, - 24576, 26624, 26625, 26627, 26496, 26560, 26561, 26552, - 26556, 0, 16384, 24576, 26624, 26625, 26627, 26496, - 26560, 26561, 26563, 26556, 0, 16384, 24576, 26624, - 26625, 26627, 26496, 26560, 26561, 26563, 26556, 26558, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 0, - 16384, 24576, 26624, 26625, 26627, 26496, 26560, 0, - 16384, 24576, 26624, 26625, 26627, 26496, 26560, 0, - 16384, 24576, 26624, 26625, 26627, 26496, 26560, 26562, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 26560, - 0, 16384, 24576, 26624, 26625, 26627, 26496, 26560, - 26564, 0, 16384, 24576, 26624, 26625, 26627, 26496, - 26560, 26564, 0, 16384, 24576, 26624, 26625, 26627, - 26496, 26560, 26568, 26566, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26560, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26560, 26568, 0, 16384, 24576, - 26624, 26625, 26627, 26631, 26560, 26568, 0, 16384, - 24576, 26624, 26625, 26627, 26631, 26560, 26568, 26570, - 0, 16384, 24576, 26624, 26625, 26627, 26631, 26560, - 26568, 0, 16384, 24576, 26624, 26625, 26627, 26631, - 26560, 26576, 26572, 0, 16384, 24576, 26624, 26625, - 26627, 26631, 26560, 26576, 26572, 0, 16384, 24576, - 26624, 26625, 26627, 26631, 26560, 26576, 26577, 26574, - 0, 16384, 24576, 26624, 26625, 26627, 26631, 26560, - 0, 16384, 24576, 26624, 26625, 26627, 26631, 26560, - 26576, 0, 16384, 24576, 26624, 26625, 26627, 26631, - 26560, 26576, 0, 16384, 24576, 26624, 26625, 26627, - 26631, 26560, 26576, 26578, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26560, 26576, 0, 16384, 24576, - 26624, 26625, 26627, 26631, 26560, 26576, 26580, 0, - 16384, 24576, 26624, 26625, 26627, 26631, 26560, 26576, - 26580, 0, 16384, 24576, 26624, 26625, 26627, 26631, - 26560, 26576, 26584, 26582, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26560, 26576, 0, 16384, 24576, - 26624, 26625, 26627, 26631, 26560, 26592, 26584, 0, - 16384, 24576, 26624, 26625, 26627, 26631, 26560, 26592, - 26584, 0, 16384, 24576, 26624, 26625, 26627, 26631, - 26560, 26592, 26584, 26586, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26560, 26592, 26584, 0, 16384, - 24576, 26624, 26625, 26627, 26631, 26560, 26592, 26593, - 26588, 0, 16384, 24576, 26624, 26625, 26627, 26631, - 26560, 26592, 26593, 26588, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26560, 26592, 26593, 26588, 26590, - 0, 16384, 24576, 26624, 26625, 26627, 26631, 26560, - 0, 16384, 24576, 26624, 26625, 26627, 26631, 26560, - 26592, 0, 16384, 24576, 26624, 26625, 26627, 26631, - 26560, 26592, 0, 16384, 24576, 26624, 26625, 26627, - 26631, 26560, 26592, 26594, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26560, 26592, 0, 16384, 24576, - 26624, 26625, 26627, 26631, 26560, 26592, 26596, 0, - 16384, 24576, 26624, 26625, 26627, 26631, 26560, 26592, - 26596, 0, 16384, 24576, 26624, 26625, 26627, 26631, - 26560, 26592, 26600, 26598, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26560, 26592, 0, 16384, 24576, - 26624, 26625, 26627, 26631, 26560, 26592, 26600, 0, - 16384, 24576, 26624, 26625, 26627, 26631, 26560, 26592, - 26600, 0, 16384, 24576, 26624, 26625, 26627, 26631, - 26560, 26592, 26600, 26602, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26560, 26592, 26600, 0, 16384, - 24576, 26624, 26625, 26627, 26631, 26560, 26592, 26608, - 26604, 0, 16384, 24576, 26624, 26625, 26627, 26631, - 26560, 26592, 26608, 26604, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26560, 26592, 26608, 26609, 26606, - 0, 16384, 24576, 26624, 26625, 26627, 26631, 26639, - 26592, 0, 16384, 24576, 26624, 26625, 26627, 26631, - 26639, 26592, 26608, 0, 16384, 24576, 26624, 26625, - 26627, 26631, 26639, 26592, 26608, 0, 16384, 24576, - 26624, 26625, 26627, 26631, 26639, 26592, 26608, 26610, - 0, 16384, 24576, 26624, 26625, 26627, 26631, 26639, - 26592, 26608, 0, 16384, 24576, 26624, 26625, 26627, - 26631, 26639, 26592, 26608, 26612, 0, 16384, 24576, - 26624, 26625, 26627, 26631, 26639, 26592, 26608, 26612, - 0, 16384, 24576, 26624, 26625, 26627, 26631, 26639, - 26592, 26608, 26616, 26614, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26639, 26592, 26608, 0, 16384, - 24576, 26624, 26625, 26627, 26631, 26639, 26592, 26608, - 26616, 0, 16384, 24576, 26624, 26625, 26627, 26631, - 26639, 26592, 26608, 26616, 0, 16384, 24576, 26624, - 26625, 26627, 26631, 26639, 26592, 26608, 26616, 26618, - 0, 16384, 24576, 26624, 26625, 26627, 26631, 26639, - 26592, 26608, 26616, 0, 16384, 24576, 26624, 26625, - 26627, 26631, 26639, 26592, 26608, 26616, 26620, 0, - 16384, 24576, 26624, 26625, 26627, 26631, 26639, 26592, - 26608, 26616, 26620, 0, 16384, 24576, 26624, 26625, - 26627, 26631, 26639, 26592, 26608, 26616, 26620, 26622, - 0, 16384, 24576, 0, 16384, 24576, 26624, 0, - 16384, 24576, 26624, 0, 16384, 24576, 26624, 26626, - 0, 16384, 24576, 26624, 0, 16384, 24576, 26624, - 26628, 0, 16384, 24576, 26624, 26628, 0, 16384, - 24576, 26624, 26632, 26630, 0, 16384, 24576, 26624, - 0, 16384, 24576, 26624, 26632, 0, 16384, 24576, - 26624, 26632, 0, 16384, 24576, 26624, 26632, 26634, - 0, 16384, 24576, 26624, 26632, 0, 16384, 24576, - 26624, 26640, 26636, 0, 16384, 24576, 26624, 26640, - 26636, 0, 16384, 24576, 26624, 26640, 26641, 26638, - 0, 16384, 24576, 26624, 0, 16384, 24576, 26624, - 26640, 0, 16384, 24576, 26624, 26640, 0, 16384, - 24576, 26624, 26640, 26642, 0, 16384, 24576, 26624, - 26640, 0, 16384, 24576, 26624, 26640, 26644, 0, - 16384, 24576, 26624, 26640, 26644, 0, 16384, 24576, - 26624, 26640, 26648, 26646, 0, 16384, 24576, 26624, - 26640, 0, 16384, 24576, 26624, 26656, 26648, 0, - 16384, 24576, 26624, 26656, 26648, 0, 16384, 24576, - 26624, 26656, 26648, 26650, 0, 16384, 24576, 26624, - 26656, 26648, 0, 16384, 24576, 26624, 26656, 26657, - 26652, 0, 16384, 24576, 26624, 26656, 26657, 26652, - 0, 16384, 24576, 26624, 26656, 26657, 26652, 26654, - 0, 16384, 24576, 26624, 0, 16384, 24576, 26624, - 26656, 0, 16384, 24576, 26624, 26656, 0, 16384, - 24576, 26624, 26656, 26658, 0, 16384, 24576, 26624, - 26656, 0, 16384, 24576, 26624, 26656, 26660, 0, - 16384, 24576, 26624, 26656, 26660, 0, 16384, 24576, - 26624, 26656, 26664, 26662, 0, 16384, 24576, 26624, - 26656, 0, 16384, 24576, 26624, 26656, 26664, 0, - 16384, 24576, 26624, 26656, 26664, 0, 16384, 24576, - 26624, 26656, 26664, 26666, 0, 16384, 24576, 26624, - 26656, 26664, 0, 16384, 24576, 26624, 26656, 26672, - 26668, 0, 16384, 24576, 26624, 26656, 26672, 26668, - 0, 16384, 24576, 26624, 26656, 26672, 26673, 26670, - 0, 16384, 24576, 26624, 26656, 0, 16384, 24576, - 26624, 26688, 26672, 0, 16384, 24576, 26624, 26688, - 26672, 0, 16384, 24576, 26624, 26688, 26672, 26674, - 0, 16384, 24576, 26624, 26688, 26672, 0, 16384, - 24576, 26624, 26688, 26672, 26676, 0, 16384, 24576, - 26624, 26688, 26672, 26676, 0, 16384, 24576, 26624, - 26688, 26672, 26680, 26678, 0, 16384, 24576, 26624, - 26688, 26672, 0, 16384, 24576, 26624, 26688, 26689, - 26680, 0, 16384, 24576, 26624, 26688, 26689, 26680, - 0, 16384, 24576, 26624, 26688, 26689, 26680, 26682, - 0, 16384, 24576, 26624, 26688, 26689, 26680, 0, - 16384, 24576, 26624, 26688, 26689, 26680, 26684, 0, - 16384, 24576, 26624, 26688, 26689, 26691, 26684, 0, - 16384, 24576, 26624, 26688, 26689, 26691, 26684, 26686, - 0, 16384, 24576, 26624, 0, 16384, 24576, 26624, - 26688, 0, 16384, 24576, 26624, 26688, 0, 16384, - 24576, 26624, 26688, 26690, 0, 16384, 24576, 26624, - 26688, 0, 16384, 24576, 26624, 26688, 26692, 0, - 16384, 24576, 26624, 26688, 26692, 0, 16384, 24576, - 26624, 26688, 26696, 26694, 0, 16384, 24576, 26624, - 26688, 0, 16384, 24576, 26624, 26688, 26696, 0, - 16384, 24576, 26624, 26688, 26696, 0, 16384, 24576, - 26624, 26688, 26696, 26698, 0, 16384, 24576, 26624, - 26688, 26696, 0, 16384, 24576, 26624, 26688, 26704, - 26700, 0, 16384, 24576, 26624, 26688, 26704, 26700, - 0, 16384, 24576, 26624, 26688, 26704, 26705, 26702, - 0, 16384, 24576, 26624, 26688, 0, 16384, 24576, - 26624, 26688, 26704, 0, 16384, 24576, 26624, 26688, - 26704, 0, 16384, 24576, 26624, 26688, 26704, 26706, - 0, 16384, 24576, 26624, 26688, 26704, 0, 16384, - 24576, 26624, 26688, 26704, 26708, 0, 16384, 24576, - 26624, 26688, 26704, 26708, 0, 16384, 24576, 26624, - 26688, 26704, 26712, 26710, 0, 16384, 24576, 26624, - 26688, 26704, 0, 16384, 24576, 26624, 26688, 26720, - 26712, 0, 16384, 24576, 26624, 26688, 26720, 26712, - 0, 16384, 24576, 26624, 26688, 26720, 26712, 26714, - 0, 16384, 24576, 26624, 26688, 26720, 26712, 0, - 16384, 24576, 26624, 26688, 26720, 26721, 26716, 0, - 16384, 24576, 26624, 26688, 26720, 26721, 26716, 0, - 16384, 24576, 26624, 26688, 26720, 26721, 26716, 26718, - 0, 16384, 24576, 26624, 26688, 0, 16384, 24576, - 26624, 26752, 26720, 0, 16384, 24576, 26624, 26752, - 26720, 0, 16384, 24576, 26624, 26752, 26720, 26722, - 0, 16384, 24576, 26624, 26752, 26720, 0, 16384, - 24576, 26624, 26752, 26720, 26724, 0, 16384, 24576, - 26624, 26752, 26720, 26724, 0, 16384, 24576, 26624, - 26752, 26720, 26728, 26726, 0, 16384, 24576, 26624, - 26752, 26720, 0, 16384, 24576, 26624, 26752, 26720, - 26728, 0, 16384, 24576, 26624, 26752, 26720, 26728, - 0, 16384, 24576, 26624, 26752, 26720, 26728, 26730, - 0, 16384, 24576, 26624, 26752, 26720, 26728, 0, - 16384, 24576, 26624, 26752, 26720, 26736, 26732, 0, - 16384, 24576, 26624, 26752, 26720, 26736, 26732, 0, - 16384, 24576, 26624, 26752, 26720, 26736, 26737, 26734, - 0, 16384, 24576, 26624, 26752, 26720, 0, 16384, - 24576, 26624, 26752, 26753, 26736, 0, 16384, 24576, - 26624, 26752, 26753, 26736, 0, 16384, 24576, 26624, - 26752, 26753, 26736, 26738, 0, 16384, 24576, 26624, - 26752, 26753, 26736, 0, 16384, 24576, 26624, 26752, - 26753, 26736, 26740, 0, 16384, 24576, 26624, 26752, - 26753, 26736, 26740, 0, 16384, 24576, 26624, 26752, - 26753, 26736, 26744, 26742, 0, 16384, 24576, 26624, - 26752, 26753, 26736, 0, 16384, 24576, 26624, 26752, - 26753, 26736, 26744, 0, 16384, 24576, 26624, 26752, - 26753, 26755, 26744, 0, 16384, 24576, 26624, 26752, - 26753, 26755, 26744, 26746, 0, 16384, 24576, 26624, - 26752, 26753, 26755, 26744, 0, 16384, 24576, 26624, - 26752, 26753, 26755, 26744, 26748, 0, 16384, 24576, - 26624, 26752, 26753, 26755, 26744, 26748, 0, 16384, - 24576, 26624, 26752, 26753, 26755, 26744, 26748, 26750, - 0, 16384, 24576, 26624, 0, 16384, 24576, 26624, - 26752, 0, 16384, 24576, 26624, 26752, 0, 16384, - 24576, 26624, 26752, 26754, 0, 16384, 24576, 26624, - 26752, 0, 16384, 24576, 26624, 26752, 26756, 0, - 16384, 24576, 26624, 26752, 26756, 0, 16384, 24576, - 26624, 26752, 26760, 26758, 0, 16384, 24576, 26624, - 26752, 0, 16384, 24576, 26624, 26752, 26760, 0, - 16384, 24576, 26624, 26752, 26760, 0, 16384, 24576, - 26624, 26752, 26760, 26762, 0, 16384, 24576, 26624, - 26752, 26760, 0, 16384, 24576, 26624, 26752, 26768, - 26764, 0, 16384, 24576, 26624, 26752, 26768, 26764, - 0, 16384, 24576, 26624, 26752, 26768, 26769, 26766, - 0, 16384, 24576, 26624, 26752, 0, 16384, 24576, - 26624, 26752, 26768, 0, 16384, 24576, 26624, 26752, - 26768, 0, 16384, 24576, 26624, 26752, 26768, 26770, - 0, 16384, 24576, 26624, 26752, 26768, 0, 16384, - 24576, 26624, 26752, 26768, 26772, 0, 16384, 24576, - 26624, 26752, 26768, 26772, 0, 16384, 24576, 26624, - 26752, 26768, 26776, 26774, 0, 16384, 24576, 26624, - 26752, 26768, 0, 16384, 24576, 26624, 26752, 26784, - 26776, 0, 16384, 24576, 26624, 26752, 26784, 26776, - 0, 16384, 24576, 26624, 26752, 26784, 26776, 26778, - 0, 16384, 24576, 26624, 26752, 26784, 26776, 0, - 16384, 24576, 26624, 26752, 26784, 26785, 26780, 0, - 16384, 24576, 26624, 26752, 26784, 26785, 26780, 0, - 16384, 24576, 26624, 26752, 26784, 26785, 26780, 26782, - 0, 16384, 24576, 26624, 26752, 0, 16384, 24576, - 26624, 26752, 26784, 0, 16384, 24576, 26624, 26752, - 26784, 0, 16384, 24576, 26624, 26752, 26784, 26786, - 0, 16384, 24576, 26624, 26752, 26784, 0, 16384, - 24576, 26624, 26752, 26784, 26788, 0, 16384, 24576, - 26624, 26752, 26784, 26788, 0, 16384, 24576, 26624, - 26752, 26784, 26792, 26790, 0, 16384, 24576, 26624, - 26752, 26784, 0, 16384, 24576, 26624, 26752, 26784, - 26792, 0, 16384, 24576, 26624, 26752, 26784, 26792, - 0, 16384, 24576, 26624, 26752, 26784, 26792, 26794, - 0, 16384, 24576, 26624, 26752, 26784, 26792, 0, - 16384, 24576, 26624, 26752, 26784, 26800, 26796, 0, - 16384, 24576, 26624, 26752, 26784, 26800, 26796, 0, - 16384, 24576, 26624, 26752, 26784, 26800, 26801, 26798, - 0, 16384, 24576, 26624, 26752, 26784, 0, 16384, - 24576, 26624, 26752, 26816, 26800, 0, 16384, 24576, - 26624, 26752, 26816, 26800, 0, 16384, 24576, 26624, - 26752, 26816, 26800, 26802, 0, 16384, 24576, 26624, - 26752, 26816, 26800, 0, 16384, 24576, 26624, 26752, - 26816, 26800, 26804, 0, 16384, 24576, 26624, 26752, - 26816, 26800, 26804, 0, 16384, 24576, 26624, 26752, - 26816, 26800, 26808, 26806, 0, 16384, 24576, 26624, - 26752, 26816, 26800, 0, 16384, 24576, 26624, 26752, - 26816, 26817, 26808, 0, 16384, 24576, 26624, 26752, - 26816, 26817, 26808, 0, 16384, 24576, 26624, 26752, - 26816, 26817, 26808, 26810, 0, 16384, 24576, 26624, - 26752, 26816, 26817, 26808, 0, 16384, 24576, 26624, - 26752, 26816, 26817, 26808, 26812, 0, 16384, 24576, - 26624, 26752, 26816, 26817, 26819, 26812, 0, 16384, - 24576, 26624, 26752, 26816, 26817, 26819, 26812, 26814, - 0, 16384, 24576, 26624, 26752, 0, 16384, 24576, - 26624, 26880, 26816, 0, 16384, 24576, 26624, 26880, - 26816, 0, 16384, 24576, 26624, 26880, 26816, 26818, - 0, 16384, 24576, 26624, 26880, 26816, 0, 16384, - 24576, 26624, 26880, 26816, 26820, 0, 16384, 24576, - 26624, 26880, 26816, 26820, 0, 16384, 24576, 26624, - 26880, 26816, 26824, 26822, 0, 16384, 24576, 26624, - 26880, 26816, 0, 16384, 24576, 26624, 26880, 26816, - 26824, 0, 16384, 24576, 26624, 26880, 26816, 26824, - 0, 16384, 24576, 26624, 26880, 26816, 26824, 26826, - 0, 16384, 24576, 26624, 26880, 26816, 26824, 0, - 16384, 24576, 26624, 26880, 26816, 26832, 26828, 0, - 16384, 24576, 26624, 26880, 26816, 26832, 26828, 0, - 16384, 24576, 26624, 26880, 26816, 26832, 26833, 26830, - 0, 16384, 24576, 26624, 26880, 26816, 0, 16384, - 24576, 26624, 26880, 26816, 26832, 0, 16384, 24576, - 26624, 26880, 26816, 26832, 0, 16384, 24576, 26624, - 26880, 26816, 26832, 26834, 0, 16384, 24576, 26624, - 26880, 26816, 26832, 0, 16384, 24576, 26624, 26880, - 26816, 26832, 26836, 0, 16384, 24576, 26624, 26880, - 26816, 26832, 26836, 0, 16384, 24576, 26624, 26880, - 26816, 26832, 26840, 26838, 0, 16384, 24576, 26624, - 26880, 26816, 26832, 0, 16384, 24576, 26624, 26880, - 26816, 26848, 26840, 0, 16384, 24576, 26624, 26880, - 26816, 26848, 26840, 0, 16384, 24576, 26624, 26880, - 26816, 26848, 26840, 26842, 0, 16384, 24576, 26624, - 26880, 26816, 26848, 26840, 0, 16384, 24576, 26624, - 26880, 26816, 26848, 26849, 26844, 0, 16384, 24576, - 26624, 26880, 26816, 26848, 26849, 26844, 0, 16384, - 24576, 26624, 26880, 26816, 26848, 26849, 26844, 26846, - 0, 16384, 24576, 26624, 26880, 26816, 0, 16384, - 24576, 26624, 26880, 26881, 26848, 0, 16384, 24576, - 26624, 26880, 26881, 26848, 0, 16384, 24576, 26624, - 26880, 26881, 26848, 26850, 0, 16384, 24576, 26624, - 26880, 26881, 26848, 0, 16384, 24576, 26624, 26880, - 26881, 26848, 26852, 0, 16384, 24576, 26624, 26880, - 26881, 26848, 26852, 0, 16384, 24576, 26624, 26880, - 26881, 26848, 26856, 26854, 0, 16384, 24576, 26624, - 26880, 26881, 26848, 0, 16384, 24576, 26624, 26880, - 26881, 26848, 26856, 0, 16384, 24576, 26624, 26880, - 26881, 26848, 26856, 0, 16384, 24576, 26624, 26880, - 26881, 26848, 26856, 26858, 0, 16384, 24576, 26624, - 26880, 26881, 26848, 26856, 0, 16384, 24576, 26624, - 26880, 26881, 26848, 26864, 26860, 0, 16384, 24576, - 26624, 26880, 26881, 26848, 26864, 26860, 0, 16384, - 24576, 26624, 26880, 26881, 26848, 26864, 26865, 26862, - 0, 16384, 24576, 26624, 26880, 26881, 26848, 0, - 16384, 24576, 26624, 26880, 26881, 26848, 26864, 0, - 16384, 24576, 26624, 26880, 26881, 26883, 26864, 0, - 16384, 24576, 26624, 26880, 26881, 26883, 26864, 26866, - 0, 16384, 24576, 26624, 26880, 26881, 26883, 26864, - 0, 16384, 24576, 26624, 26880, 26881, 26883, 26864, - 26868, 0, 16384, 24576, 26624, 26880, 26881, 26883, - 26864, 26868, 0, 16384, 24576, 26624, 26880, 26881, - 26883, 26864, 26872, 26870, 0, 16384, 24576, 26624, - 26880, 26881, 26883, 26864, 0, 16384, 24576, 26624, - 26880, 26881, 26883, 26864, 26872, 0, 16384, 24576, - 26624, 26880, 26881, 26883, 26864, 26872, 0, 16384, - 24576, 26624, 26880, 26881, 26883, 26864, 26872, 26874, - 0, 16384, 24576, 26624, 26880, 26881, 26883, 26887, - 26872, 0, 16384, 24576, 26624, 26880, 26881, 26883, - 26887, 26872, 26876, 0, 16384, 24576, 26624, 26880, - 26881, 26883, 26887, 26872, 26876, 0, 16384, 24576, - 26624, 26880, 26881, 26883, 26887, 26872, 26876, 26878, - 0, 16384, 24576, 26624, 0, 16384, 24576, 26624, - 26880, 0, 16384, 24576, 26624, 26880, 0, 16384, - 24576, 26624, 26880, 26882, 0, 16384, 24576, 26624, - 26880, 0, 16384, 24576, 26624, 26880, 26884, 0, - 16384, 24576, 26624, 26880, 26884, 0, 16384, 24576, - 26624, 26880, 26888, 26886, 0, 16384, 24576, 26624, - 26880, 0, 16384, 24576, 26624, 26880, 26888, 0, - 16384, 24576, 26624, 26880, 26888, 0, 16384, 24576, - 26624, 26880, 26888, 26890, 0, 16384, 24576, 26624, - 26880, 26888, 0, 16384, 24576, 26624, 26880, 26896, - 26892, 0, 16384, 24576, 26624, 26880, 26896, 26892, - 0, 16384, 24576, 26624, 26880, 26896, 26897, 26894, - 0, 16384, 24576, 26624, 26880, 0, 16384, 24576, - 26624, 26880, 26896, 0, 16384, 24576, 26624, 26880, - 26896, 0, 16384, 24576, 26624, 26880, 26896, 26898, - 0, 16384, 24576, 26624, 26880, 26896, 0, 16384, - 24576, 26624, 26880, 26896, 26900, 0, 16384, 24576, - 26624, 26880, 26896, 26900, 0, 16384, 24576, 26624, - 26880, 26896, 26904, 26902, 0, 16384, 24576, 26624, - 26880, 26896, 0, 16384, 24576, 26624, 26880, 26912, - 26904, 0, 16384, 24576, 26624, 26880, 26912, 26904, - 0, 16384, 24576, 26624, 26880, 26912, 26904, 26906, - 0, 16384, 24576, 26624, 26880, 26912, 26904, 0, - 16384, 24576, 26624, 26880, 26912, 26913, 26908, 0, - 16384, 24576, 26624, 26880, 26912, 26913, 26908, 0, - 16384, 24576, 26624, 26880, 26912, 26913, 26908, 26910, - 0, 16384, 24576, 26624, 26880, 0, 16384, 24576, - 26624, 26880, 26912, 0, 16384, 24576, 26624, 26880, - 26912, 0, 16384, 24576, 26624, 26880, 26912, 26914, - 0, 16384, 24576, 26624, 26880, 26912, 0, 16384, - 24576, 26624, 26880, 26912, 26916, 0, 16384, 24576, - 26624, 26880, 26912, 26916, 0, 16384, 24576, 26624, - 26880, 26912, 26920, 26918, 0, 16384, 24576, 26624, - 26880, 26912, 0, 16384, 24576, 26624, 26880, 26912, - 26920, 0, 16384, 24576, 26624, 26880, 26912, 26920, - 0, 16384, 24576, 26624, 26880, 26912, 26920, 26922, - 0, 16384, 24576, 26624, 26880, 26912, 26920, 0, - 16384, 24576, 26624, 26880, 26912, 26928, 26924, 0, - 16384, 24576, 26624, 26880, 26912, 26928, 26924, 0, - 16384, 24576, 26624, 26880, 26912, 26928, 26929, 26926, - 0, 16384, 24576, 26624, 26880, 26912, 0, 16384, - 24576, 26624, 26880, 26944, 26928, 0, 16384, 24576, - 26624, 26880, 26944, 26928, 0, 16384, 24576, 26624, - 26880, 26944, 26928, 26930, 0, 16384, 24576, 26624, - 26880, 26944, 26928, 0, 16384, 24576, 26624, 26880, - 26944, 26928, 26932, 0, 16384, 24576, 26624, 26880, - 26944, 26928, 26932, 0, 16384, 24576, 26624, 26880, - 26944, 26928, 26936, 26934, 0, 16384, 24576, 26624, - 26880, 26944, 26928, 0, 16384, 24576, 26624, 26880, - 26944, 26945, 26936, 0, 16384, 24576, 26624, 26880, - 26944, 26945, 26936, 0, 16384, 24576, 26624, 26880, - 26944, 26945, 26936, 26938, 0, 16384, 24576, 26624, - 26880, 26944, 26945, 26936, 0, 16384, 24576, 26624, - 26880, 26944, 26945, 26936, 26940, 0, 16384, 24576, - 26624, 26880, 26944, 26945, 26947, 26940, 0, 16384, - 24576, 26624, 26880, 26944, 26945, 26947, 26940, 26942, - 0, 16384, 24576, 26624, 26880, 0, 16384, 24576, - 26624, 26880, 26944, 0, 16384, 24576, 26624, 26880, - 26944, 0, 16384, 24576, 26624, 26880, 26944, 26946, - 0, 16384, 24576, 26624, 26880, 26944, 0, 16384, - 24576, 26624, 26880, 26944, 26948, 0, 16384, 24576, - 26624, 26880, 26944, 26948, 0, 16384, 24576, 26624, - 26880, 26944, 26952, 26950, 0, 16384, 24576, 26624, - 26880, 26944, 0, 16384, 24576, 26624, 26880, 26944, - 26952, 0, 16384, 24576, 26624, 26880, 26944, 26952, - 0, 16384, 24576, 26624, 26880, 26944, 26952, 26954, - 0, 16384, 24576, 26624, 26880, 26944, 26952, 0, - 16384, 24576, 26624, 26880, 26944, 26960, 26956, 0, - 16384, 24576, 26624, 26880, 26944, 26960, 26956, 0, - 16384, 24576, 26624, 26880, 26944, 26960, 26961, 26958, - 0, 16384, 24576, 26624, 26880, 26944, 0, 16384, - 24576, 26624, 26880, 26944, 26960, 0, 16384, 24576, - 26624, 26880, 26944, 26960, 0, 16384, 24576, 26624, - 26880, 26944, 26960, 26962, 0, 16384, 24576, 26624, - 26880, 26944, 26960, 0, 16384, 24576, 26624, 26880, - 26944, 26960, 26964, 0, 16384, 24576, 26624, 26880, - 26944, 26960, 26964, 0, 16384, 24576, 26624, 26880, - 26944, 26960, 26968, 26966, 0, 16384, 24576, 26624, - 26880, 26944, 26960, 0, 16384, 24576, 26624, 26880, - 26944, 26976, 26968, 0, 16384, 24576, 26624, 26880, - 26944, 26976, 26968, 0, 16384, 24576, 26624, 26880, - 26944, 26976, 26968, 26970, 0, 16384, 24576, 26624, - 26880, 26944, 26976, 26968, 0, 16384, 24576, 26624, - 26880, 26944, 26976, 26977, 26972, 0, 16384, 24576, - 26624, 26880, 26944, 26976, 26977, 26972, 0, 16384, - 24576, 26624, 26880, 26944, 26976, 26977, 26972, 26974, - 0, 16384, 24576, 26624, 26880, 26944, 0, 16384, - 24576, 26624, 26880, 27008, 26976, 0, 16384, 24576, - 26624, 26880, 27008, 26976, 0, 16384, 24576, 26624, - 26880, 27008, 26976, 26978, 0, 16384, 24576, 26624, - 26880, 27008, 26976, 0, 16384, 24576, 26624, 26880, - 27008, 26976, 26980, 0, 16384, 24576, 26624, 26880, - 27008, 26976, 26980, 0, 16384, 24576, 26624, 26880, - 27008, 26976, 26984, 26982, 0, 16384, 24576, 26624, - 26880, 27008, 26976, 0, 16384, 24576, 26624, 26880, - 27008, 26976, 26984, 0, 16384, 24576, 26624, 26880, - 27008, 26976, 26984, 0, 16384, 24576, 26624, 26880, - 27008, 26976, 26984, 26986, 0, 16384, 24576, 26624, - 26880, 27008, 26976, 26984, 0, 16384, 24576, 26624, - 26880, 27008, 26976, 26992, 26988, 0, 16384, 24576, - 26624, 26880, 27008, 26976, 26992, 26988, 0, 16384, - 24576, 26624, 26880, 27008, 26976, 26992, 26993, 26990, - 0, 16384, 24576, 26624, 26880, 27008, 26976, 0, - 16384, 24576, 26624, 26880, 27008, 27009, 26992, 0, - 16384, 24576, 26624, 26880, 27008, 27009, 26992, 0, - 16384, 24576, 26624, 26880, 27008, 27009, 26992, 26994, - 0, 16384, 24576, 26624, 26880, 27008, 27009, 26992, - 0, 16384, 24576, 26624, 26880, 27008, 27009, 26992, - 26996, 0, 16384, 24576, 26624, 26880, 27008, 27009, - 26992, 26996, 0, 16384, 24576, 26624, 26880, 27008, - 27009, 26992, 27000, 26998, 0, 16384, 24576, 26624, - 26880, 27008, 27009, 26992, 0, 16384, 24576, 26624, - 26880, 27008, 27009, 26992, 27000, 0, 16384, 24576, - 26624, 26880, 27008, 27009, 27011, 27000, 0, 16384, - 24576, 26624, 26880, 27008, 27009, 27011, 27000, 27002, - 0, 16384, 24576, 26624, 26880, 27008, 27009, 27011, - 27000, 0, 16384, 24576, 26624, 26880, 27008, 27009, - 27011, 27000, 27004, 0, 16384, 24576, 26624, 26880, - 27008, 27009, 27011, 27000, 27004, 0, 16384, 24576, - 26624, 26880, 27008, 27009, 27011, 27000, 27004, 27006, - 0, 16384, 24576, 26624, 26880, 0, 16384, 24576, - 26624, 27136, 27008, 0, 16384, 24576, 26624, 27136, - 27008, 0, 16384, 24576, 26624, 27136, 27008, 27010, - 0, 16384, 24576, 26624, 27136, 27008, 0, 16384, - 24576, 26624, 27136, 27008, 27012, 0, 16384, 24576, - 26624, 27136, 27008, 27012, 0, 16384, 24576, 26624, - 27136, 27008, 27016, 27014, 0, 16384, 24576, 26624, - 27136, 27008, 0, 16384, 24576, 26624, 27136, 27008, - 27016, 0, 16384, 24576, 26624, 27136, 27008, 27016, - 0, 16384, 24576, 26624, 27136, 27008, 27016, 27018, - 0, 16384, 24576, 26624, 27136, 27008, 27016, 0, - 16384, 24576, 26624, 27136, 27008, 27024, 27020, 0, - 16384, 24576, 26624, 27136, 27008, 27024, 27020, 0, - 16384, 24576, 26624, 27136, 27008, 27024, 27025, 27022, - 0, 16384, 24576, 26624, 27136, 27008, 0, 16384, - 24576, 26624, 27136, 27008, 27024, 0, 16384, 24576, - 26624, 27136, 27008, 27024, 0, 16384, 24576, 26624, - 27136, 27008, 27024, 27026, 0, 16384, 24576, 26624, - 27136, 27008, 27024, 0, 16384, 24576, 26624, 27136, - 27008, 27024, 27028, 0, 16384, 24576, 26624, 27136, - 27008, 27024, 27028, 0, 16384, 24576, 26624, 27136, - 27008, 27024, 27032, 27030, 0, 16384, 24576, 26624, - 27136, 27008, 27024, 0, 16384, 24576, 26624, 27136, - 27008, 27040, 27032, 0, 16384, 24576, 26624, 27136, - 27008, 27040, 27032, 0, 16384, 24576, 26624, 27136, - 27008, 27040, 27032, 27034, 0, 16384, 24576, 26624, - 27136, 27008, 27040, 27032, 0, 16384, 24576, 26624, - 27136, 27008, 27040, 27041, 27036, 0, 16384, 24576, - 26624, 27136, 27008, 27040, 27041, 27036, 0, 16384, - 24576, 26624, 27136, 27008, 27040, 27041, 27036, 27038, - 0, 16384, 24576, 26624, 27136, 27008, 0, 16384, - 24576, 26624, 27136, 27008, 27040, 0, 16384, 24576, - 26624, 27136, 27008, 27040, 0, 16384, 24576, 26624, - 27136, 27008, 27040, 27042, 0, 16384, 24576, 26624, - 27136, 27008, 27040, 0, 16384, 24576, 26624, 27136, - 27008, 27040, 27044, 0, 16384, 24576, 26624, 27136, - 27008, 27040, 27044, 0, 16384, 24576, 26624, 27136, - 27008, 27040, 27048, 27046, 0, 16384, 24576, 26624, - 27136, 27008, 27040, 0, 16384, 24576, 26624, 27136, - 27008, 27040, 27048, 0, 16384, 24576, 26624, 27136, - 27008, 27040, 27048, 0, 16384, 24576, 26624, 27136, - 27008, 27040, 27048, 27050, 0, 16384, 24576, 26624, - 27136, 27008, 27040, 27048, 0, 16384, 24576, 26624, - 27136, 27008, 27040, 27056, 27052, 0, 16384, 24576, - 26624, 27136, 27008, 27040, 27056, 27052, 0, 16384, - 24576, 26624, 27136, 27008, 27040, 27056, 27057, 27054, - 0, 16384, 24576, 26624, 27136, 27008, 27040, 0, - 16384, 24576, 26624, 27136, 27008, 27072, 27056, 0, - 16384, 24576, 26624, 27136, 27008, 27072, 27056, 0, - 16384, 24576, 26624, 27136, 27008, 27072, 27056, 27058, - 0, 16384, 24576, 26624, 27136, 27008, 27072, 27056, - 0, 16384, 24576, 26624, 27136, 27008, 27072, 27056, - 27060, 0, 16384, 24576, 26624, 27136, 27008, 27072, - 27056, 27060, 0, 16384, 24576, 26624, 27136, 27008, - 27072, 27056, 27064, 27062, 0, 16384, 24576, 26624, - 27136, 27008, 27072, 27056, 0, 16384, 24576, 26624, - 27136, 27008, 27072, 27073, 27064, 0, 16384, 24576, - 26624, 27136, 27008, 27072, 27073, 27064, 0, 16384, - 24576, 26624, 27136, 27008, 27072, 27073, 27064, 27066, - 0, 16384, 24576, 26624, 27136, 27008, 27072, 27073, - 27064, 0, 16384, 24576, 26624, 27136, 27008, 27072, - 27073, 27064, 27068, 0, 16384, 24576, 26624, 27136, - 27008, 27072, 27073, 27075, 27068, 0, 16384, 24576, - 26624, 27136, 27008, 27072, 27073, 27075, 27068, 27070, - 0, 16384, 24576, 26624, 27136, 27008, 0, 16384, - 24576, 26624, 27136, 27137, 27072, 0, 16384, 24576, - 26624, 27136, 27137, 27072, 0, 16384, 24576, 26624, - 27136, 27137, 27072, 27074, 0, 16384, 24576, 26624, - 27136, 27137, 27072, 0, 16384, 24576, 26624, 27136, - 27137, 27072, 27076, 0, 16384, 24576, 26624, 27136, - 27137, 27072, 27076, 0, 16384, 24576, 26624, 27136, - 27137, 27072, 27080, 27078, 0, 16384, 24576, 26624, - 27136, 27137, 27072, 0, 16384, 24576, 26624, 27136, - 27137, 27072, 27080, 0, 16384, 24576, 26624, 27136, - 27137, 27072, 27080, 0, 16384, 24576, 26624, 27136, - 27137, 27072, 27080, 27082, 0, 16384, 24576, 26624, - 27136, 27137, 27072, 27080, 0, 16384, 24576, 26624, - 27136, 27137, 27072, 27088, 27084, 0, 16384, 24576, - 26624, 27136, 27137, 27072, 27088, 27084, 0, 16384, - 24576, 26624, 27136, 27137, 27072, 27088, 27089, 27086, - 0, 16384, 24576, 26624, 27136, 27137, 27072, 0, - 16384, 24576, 26624, 27136, 27137, 27072, 27088, 0, - 16384, 24576, 26624, 27136, 27137, 27072, 27088, 0, - 16384, 24576, 26624, 27136, 27137, 27072, 27088, 27090, - 0, 16384, 24576, 26624, 27136, 27137, 27072, 27088, - 0, 16384, 24576, 26624, 27136, 27137, 27072, 27088, - 27092, 0, 16384, 24576, 26624, 27136, 27137, 27072, - 27088, 27092, 0, 16384, 24576, 26624, 27136, 27137, - 27072, 27088, 27096, 27094, 0, 16384, 24576, 26624, - 27136, 27137, 27072, 27088, 0, 16384, 24576, 26624, - 27136, 27137, 27072, 27104, 27096, 0, 16384, 24576, - 26624, 27136, 27137, 27072, 27104, 27096, 0, 16384, - 24576, 26624, 27136, 27137, 27072, 27104, 27096, 27098, - 0, 16384, 24576, 26624, 27136, 27137, 27072, 27104, - 27096, 0, 16384, 24576, 26624, 27136, 27137, 27072, - 27104, 27105, 27100, 0, 16384, 24576, 26624, 27136, - 27137, 27072, 27104, 27105, 27100, 0, 16384, 24576, - 26624, 27136, 27137, 27072, 27104, 27105, 27100, 27102, - 0, 16384, 24576, 26624, 27136, 27137, 27072, 0, - 16384, 24576, 26624, 27136, 27137, 27072, 27104, 0, - 16384, 24576, 26624, 27136, 27137, 27139, 27104, 0, - 16384, 24576, 26624, 27136, 27137, 27139, 27104, 27106, - 0, 16384, 24576, 26624, 27136, 27137, 27139, 27104, - 0, 16384, 24576, 26624, 27136, 27137, 27139, 27104, - 27108, 0, 16384, 24576, 26624, 27136, 27137, 27139, - 27104, 27108, 0, 16384, 24576, 26624, 27136, 27137, - 27139, 27104, 27112, 27110, 0, 16384, 24576, 26624, - 27136, 27137, 27139, 27104, 0, 16384, 24576, 26624, - 27136, 27137, 27139, 27104, 27112, 0, 16384, 24576, - 26624, 27136, 27137, 27139, 27104, 27112, 0, 16384, - 24576, 26624, 27136, 27137, 27139, 27104, 27112, 27114, - 0, 16384, 24576, 26624, 27136, 27137, 27139, 27104, - 27112, 0, 16384, 24576, 26624, 27136, 27137, 27139, - 27104, 27120, 27116, 0, 16384, 24576, 26624, 27136, - 27137, 27139, 27104, 27120, 27116, 0, 16384, 24576, - 26624, 27136, 27137, 27139, 27104, 27120, 27121, 27118, - 0, 16384, 24576, 26624, 27136, 27137, 27139, 27104, - 0, 16384, 24576, 26624, 27136, 27137, 27139, 27104, - 27120, 0, 16384, 24576, 26624, 27136, 27137, 27139, - 27104, 27120, 0, 16384, 24576, 26624, 27136, 27137, - 27139, 27104, 27120, 27122, 0, 16384, 24576, 26624, - 27136, 27137, 27139, 27143, 27120, 0, 16384, 24576, - 26624, 27136, 27137, 27139, 27143, 27120, 27124, 0, - 16384, 24576, 26624, 27136, 27137, 27139, 27143, 27120, - 27124, 0, 16384, 24576, 26624, 27136, 27137, 27139, - 27143, 27120, 27128, 27126, 0, 16384, 24576, 26624, - 27136, 27137, 27139, 27143, 27120, 0, 16384, 24576, - 26624, 27136, 27137, 27139, 27143, 27120, 27128, 0, - 16384, 24576, 26624, 27136, 27137, 27139, 27143, 27120, - 27128, 0, 16384, 24576, 26624, 27136, 27137, 27139, - 27143, 27120, 27128, 27130, 0, 16384, 24576, 26624, - 27136, 27137, 27139, 27143, 27120, 27128, 0, 16384, - 24576, 26624, 27136, 27137, 27139, 27143, 27120, 27128, - 27132, 0, 16384, 24576, 26624, 27136, 27137, 27139, - 27143, 27120, 27128, 27132, 0, 16384, 24576, 26624, - 27136, 27137, 27139, 27143, 27120, 27128, 27132, 27134, - 0, 16384, 24576, 26624, 0, 16384, 24576, 26624, - 27136, 0, 16384, 24576, 26624, 27136, 0, 16384, - 24576, 26624, 27136, 27138, 0, 16384, 24576, 26624, - 27136, 0, 16384, 24576, 26624, 27136, 27140, 0, - 16384, 24576, 26624, 27136, 27140, 0, 16384, 24576, - 26624, 27136, 27144, 27142, 0, 16384, 24576, 26624, - 27136, 0, 16384, 24576, 26624, 27136, 27144, 0, - 16384, 24576, 26624, 27136, 27144, 0, 16384, 24576, - 26624, 27136, 27144, 27146, 0, 16384, 24576, 26624, - 27136, 27144, 0, 16384, 24576, 26624, 27136, 27152, - 27148, 0, 16384, 24576, 26624, 27136, 27152, 27148, - 0, 16384, 24576, 26624, 27136, 27152, 27153, 27150, - 0, 16384, 24576, 26624, 27136, 0, 16384, 24576, - 26624, 27136, 27152, 0, 16384, 24576, 26624, 27136, - 27152, 0, 16384, 24576, 26624, 27136, 27152, 27154, - 0, 16384, 24576, 26624, 27136, 27152, 0, 16384, - 24576, 26624, 27136, 27152, 27156, 0, 16384, 24576, - 26624, 27136, 27152, 27156, 0, 16384, 24576, 26624, - 27136, 27152, 27160, 27158, 0, 16384, 24576, 26624, - 27136, 27152, 0, 16384, 24576, 26624, 27136, 27168, - 27160, 0, 16384, 24576, 26624, 27136, 27168, 27160, - 0, 16384, 24576, 26624, 27136, 27168, 27160, 27162, - 0, 16384, 24576, 26624, 27136, 27168, 27160, 0, - 16384, 24576, 26624, 27136, 27168, 27169, 27164, 0, - 16384, 24576, 26624, 27136, 27168, 27169, 27164, 0, - 16384, 24576, 26624, 27136, 27168, 27169, 27164, 27166, - 0, 16384, 24576, 26624, 27136, 0, 16384, 24576, - 26624, 27136, 27168, 0, 16384, 24576, 26624, 27136, - 27168, 0, 16384, 24576, 26624, 27136, 27168, 27170, - 0, 16384, 24576, 26624, 27136, 27168, 0, 16384, - 24576, 26624, 27136, 27168, 27172, 0, 16384, 24576, - 26624, 27136, 27168, 27172, 0, 16384, 24576, 26624, - 27136, 27168, 27176, 27174, 0, 16384, 24576, 26624, - 27136, 27168, 0, 16384, 24576, 26624, 27136, 27168, - 27176, 0, 16384, 24576, 26624, 27136, 27168, 27176, - 0, 16384, 24576, 26624, 27136, 27168, 27176, 27178, - 0, 16384, 24576, 26624, 27136, 27168, 27176, 0, - 16384, 24576, 26624, 27136, 27168, 27184, 27180, 0, - 16384, 24576, 26624, 27136, 27168, 27184, 27180, 0, - 16384, 24576, 26624, 27136, 27168, 27184, 27185, 27182, - 0, 16384, 24576, 26624, 27136, 27168, 0, 16384, - 24576, 26624, 27136, 27200, 27184, 0, 16384, 24576, - 26624, 27136, 27200, 27184, 0, 16384, 24576, 26624, - 27136, 27200, 27184, 27186, 0, 16384, 24576, 26624, - 27136, 27200, 27184, 0, 16384, 24576, 26624, 27136, - 27200, 27184, 27188, 0, 16384, 24576, 26624, 27136, - 27200, 27184, 27188, 0, 16384, 24576, 26624, 27136, - 27200, 27184, 27192, 27190, 0, 16384, 24576, 26624, - 27136, 27200, 27184, 0, 16384, 24576, 26624, 27136, - 27200, 27201, 27192, 0, 16384, 24576, 26624, 27136, - 27200, 27201, 27192, 0, 16384, 24576, 26624, 27136, - 27200, 27201, 27192, 27194, 0, 16384, 24576, 26624, - 27136, 27200, 27201, 27192, 0, 16384, 24576, 26624, - 27136, 27200, 27201, 27192, 27196, 0, 16384, 24576, - 26624, 27136, 27200, 27201, 27203, 27196, 0, 16384, - 24576, 26624, 27136, 27200, 27201, 27203, 27196, 27198, - 0, 16384, 24576, 26624, 27136, 0, 16384, 24576, - 26624, 27136, 27200, 0, 16384, 24576, 26624, 27136, - 27200, 0, 16384, 24576, 26624, 27136, 27200, 27202, - 0, 16384, 24576, 26624, 27136, 27200, 0, 16384, - 24576, 26624, 27136, 27200, 27204, 0, 16384, 24576, - 26624, 27136, 27200, 27204, 0, 16384, 24576, 26624, - 27136, 27200, 27208, 27206, 0, 16384, 24576, 26624, - 27136, 27200, 0, 16384, 24576, 26624, 27136, 27200, - 27208, 0, 16384, 24576, 26624, 27136, 27200, 27208, - 0, 16384, 24576, 26624, 27136, 27200, 27208, 27210, - 0, 16384, 24576, 26624, 27136, 27200, 27208, 0, - 16384, 24576, 26624, 27136, 27200, 27216, 27212, 0, - 16384, 24576, 26624, 27136, 27200, 27216, 27212, 0, - 16384, 24576, 26624, 27136, 27200, 27216, 27217, 27214, - 0, 16384, 24576, 26624, 27136, 27200, 0, 16384, - 24576, 26624, 27136, 27200, 27216, 0, 16384, 24576, - 26624, 27136, 27200, 27216, 0, 16384, 24576, 26624, - 27136, 27200, 27216, 27218, 0, 16384, 24576, 26624, - 27136, 27200, 27216, 0, 16384, 24576, 26624, 27136, - 27200, 27216, 27220, 0, 16384, 24576, 26624, 27136, - 27200, 27216, 27220, 0, 16384, 24576, 26624, 27136, - 27200, 27216, 27224, 27222, 0, 16384, 24576, 26624, - 27136, 27200, 27216, 0, 16384, 24576, 26624, 27136, - 27200, 27232, 27224, 0, 16384, 24576, 26624, 27136, - 27200, 27232, 27224, 0, 16384, 24576, 26624, 27136, - 27200, 27232, 27224, 27226, 0, 16384, 24576, 26624, - 27136, 27200, 27232, 27224, 0, 16384, 24576, 26624, - 27136, 27200, 27232, 27233, 27228, 0, 16384, 24576, - 26624, 27136, 27200, 27232, 27233, 27228, 0, 16384, - 24576, 26624, 27136, 27200, 27232, 27233, 27228, 27230, - 0, 16384, 24576, 26624, 27136, 27200, 0, 16384, - 24576, 26624, 27136, 27264, 27232, 0, 16384, 24576, - 26624, 27136, 27264, 27232, 0, 16384, 24576, 26624, - 27136, 27264, 27232, 27234, 0, 16384, 24576, 26624, - 27136, 27264, 27232, 0, 16384, 24576, 26624, 27136, - 27264, 27232, 27236, 0, 16384, 24576, 26624, 27136, - 27264, 27232, 27236, 0, 16384, 24576, 26624, 27136, - 27264, 27232, 27240, 27238, 0, 16384, 24576, 26624, - 27136, 27264, 27232, 0, 16384, 24576, 26624, 27136, - 27264, 27232, 27240, 0, 16384, 24576, 26624, 27136, - 27264, 27232, 27240, 0, 16384, 24576, 26624, 27136, - 27264, 27232, 27240, 27242, 0, 16384, 24576, 26624, - 27136, 27264, 27232, 27240, 0, 16384, 24576, 26624, - 27136, 27264, 27232, 27248, 27244, 0, 16384, 24576, - 26624, 27136, 27264, 27232, 27248, 27244, 0, 16384, - 24576, 26624, 27136, 27264, 27232, 27248, 27249, 27246, - 0, 16384, 24576, 26624, 27136, 27264, 27232, 0, - 16384, 24576, 26624, 27136, 27264, 27265, 27248, 0, - 16384, 24576, 26624, 27136, 27264, 27265, 27248, 0, - 16384, 24576, 26624, 27136, 27264, 27265, 27248, 27250, - 0, 16384, 24576, 26624, 27136, 27264, 27265, 27248, - 0, 16384, 24576, 26624, 27136, 27264, 27265, 27248, - 27252, 0, 16384, 24576, 26624, 27136, 27264, 27265, - 27248, 27252, 0, 16384, 24576, 26624, 27136, 27264, - 27265, 27248, 27256, 27254, 0, 16384, 24576, 26624, - 27136, 27264, 27265, 27248, 0, 16384, 24576, 26624, - 27136, 27264, 27265, 27248, 27256, 0, 16384, 24576, - 26624, 27136, 27264, 27265, 27267, 27256, 0, 16384, - 24576, 26624, 27136, 27264, 27265, 27267, 27256, 27258, - 0, 16384, 24576, 26624, 27136, 27264, 27265, 27267, - 27256, 0, 16384, 24576, 26624, 27136, 27264, 27265, - 27267, 27256, 27260, 0, 16384, 24576, 26624, 27136, - 27264, 27265, 27267, 27256, 27260, 0, 16384, 24576, - 26624, 27136, 27264, 27265, 27267, 27256, 27260, 27262, - 0, 16384, 24576, 26624, 27136, 0, 16384, 24576, - 26624, 27136, 27264, 0, 16384, 24576, 26624, 27136, - 27264, 0, 16384, 24576, 26624, 27136, 27264, 27266, - 0, 16384, 24576, 26624, 27136, 27264, 0, 16384, - 24576, 26624, 27136, 27264, 27268, 0, 16384, 24576, - 26624, 27136, 27264, 27268, 0, 16384, 24576, 26624, - 27136, 27264, 27272, 27270, 0, 16384, 24576, 26624, - 27136, 27264, 0, 16384, 24576, 26624, 27136, 27264, - 27272, 0, 16384, 24576, 26624, 27136, 27264, 27272, - 0, 16384, 24576, 26624, 27136, 27264, 27272, 27274, - 0, 16384, 24576, 26624, 27136, 27264, 27272, 0, - 16384, 24576, 26624, 27136, 27264, 27280, 27276, 0, - 16384, 24576, 26624, 27136, 27264, 27280, 27276, 0, - 16384, 24576, 26624, 27136, 27264, 27280, 27281, 27278, - 0, 16384, 24576, 26624, 27136, 27264, 0, 16384, - 24576, 26624, 27136, 27264, 27280, 0, 16384, 24576, - 26624, 27136, 27264, 27280, 0, 16384, 24576, 26624, - 27136, 27264, 27280, 27282, 0, 16384, 24576, 26624, - 27136, 27264, 27280, 0, 16384, 24576, 26624, 27136, - 27264, 27280, 27284, 0, 16384, 24576, 26624, 27136, - 27264, 27280, 27284, 0, 16384, 24576, 26624, 27136, - 27264, 27280, 27288, 27286, 0, 16384, 24576, 26624, - 27136, 27264, 27280, 0, 16384, 24576, 26624, 27136, - 27264, 27296, 27288, 0, 16384, 24576, 26624, 27136, - 27264, 27296, 27288, 0, 16384, 24576, 26624, 27136, - 27264, 27296, 27288, 27290, 0, 16384, 24576, 26624, - 27136, 27264, 27296, 27288, 0, 16384, 24576, 26624, - 27136, 27264, 27296, 27297, 27292, 0, 16384, 24576, - 26624, 27136, 27264, 27296, 27297, 27292, 0, 16384, - 24576, 26624, 27136, 27264, 27296, 27297, 27292, 27294, - 0, 16384, 24576, 26624, 27136, 27264, 0, 16384, - 24576, 26624, 27136, 27264, 27296, 0, 16384, 24576, - 26624, 27136, 27264, 27296, 0, 16384, 24576, 26624, - 27136, 27264, 27296, 27298, 0, 16384, 24576, 26624, - 27136, 27264, 27296, 0, 16384, 24576, 26624, 27136, - 27264, 27296, 27300, 0, 16384, 24576, 26624, 27136, - 27264, 27296, 27300, 0, 16384, 24576, 26624, 27136, - 27264, 27296, 27304, 27302, 0, 16384, 24576, 26624, - 27136, 27264, 27296, 0, 16384, 24576, 26624, 27136, - 27264, 27296, 27304, 0, 16384, 24576, 26624, 27136, - 27264, 27296, 27304, 0, 16384, 24576, 26624, 27136, - 27264, 27296, 27304, 27306, 0, 16384, 24576, 26624, - 27136, 27264, 27296, 27304, 0, 16384, 24576, 26624, - 27136, 27264, 27296, 27312, 27308, 0, 16384, 24576, - 26624, 27136, 27264, 27296, 27312, 27308, 0, 16384, - 24576, 26624, 27136, 27264, 27296, 27312, 27313, 27310, - 0, 16384, 24576, 26624, 27136, 27264, 27296, 0, - 16384, 24576, 26624, 27136, 27264, 27328, 27312, 0, - 16384, 24576, 26624, 27136, 27264, 27328, 27312, 0, - 16384, 24576, 26624, 27136, 27264, 27328, 27312, 27314, - 0, 16384, 24576, 26624, 27136, 27264, 27328, 27312, - 0, 16384, 24576, 26624, 27136, 27264, 27328, 27312, - 27316, 0, 16384, 24576, 26624, 27136, 27264, 27328, - 27312, 27316, 0, 16384, 24576, 26624, 27136, 27264, - 27328, 27312, 27320, 27318, 0, 16384, 24576, 26624, - 27136, 27264, 27328, 27312, 0, 16384, 24576, 26624, - 27136, 27264, 27328, 27329, 27320, 0, 16384, 24576, - 26624, 27136, 27264, 27328, 27329, 27320, 0, 16384, - 24576, 26624, 27136, 27264, 27328, 27329, 27320, 27322, - 0, 16384, 24576, 26624, 27136, 27264, 27328, 27329, - 27320, 0, 16384, 24576, 26624, 27136, 27264, 27328, - 27329, 27320, 27324, 0, 16384, 24576, 26624, 27136, - 27264, 27328, 27329, 27331, 27324, 0, 16384, 24576, - 26624, 27136, 27264, 27328, 27329, 27331, 27324, 27326, - 0, 16384, 24576, 26624, 27136, 27264, 0, 16384, - 24576, 26624, 27136, 27392, 27328, 0, 16384, 24576, - 26624, 27136, 27392, 27328, 0, 16384, 24576, 26624, - 27136, 27392, 27328, 27330, 0, 16384, 24576, 26624, - 27136, 27392, 27328, 0, 16384, 24576, 26624, 27136, - 27392, 27328, 27332, 0, 16384, 24576, 26624, 27136, - 27392, 27328, 27332, 0, 16384, 24576, 26624, 27136, - 27392, 27328, 27336, 27334, 0, 16384, 24576, 26624, - 27136, 27392, 27328, 0, 16384, 24576, 26624, 27136, - 27392, 27328, 27336, 0, 16384, 24576, 26624, 27136, - 27392, 27328, 27336, 0, 16384, 24576, 26624, 27136, - 27392, 27328, 27336, 27338, 0, 16384, 24576, 26624, - 27136, 27392, 27328, 27336, 0, 16384, 24576, 26624, - 27136, 27392, 27328, 27344, 27340, 0, 16384, 24576, - 26624, 27136, 27392, 27328, 27344, 27340, 0, 16384, - 24576, 26624, 27136, 27392, 27328, 27344, 27345, 27342, - 0, 16384, 24576, 26624, 27136, 27392, 27328, 0, - 16384, 24576, 26624, 27136, 27392, 27328, 27344, 0, - 16384, 24576, 26624, 27136, 27392, 27328, 27344, 0, - 16384, 24576, 26624, 27136, 27392, 27328, 27344, 27346, - 0, 16384, 24576, 26624, 27136, 27392, 27328, 27344, - 0, 16384, 24576, 26624, 27136, 27392, 27328, 27344, - 27348, 0, 16384, 24576, 26624, 27136, 27392, 27328, - 27344, 27348, 0, 16384, 24576, 26624, 27136, 27392, - 27328, 27344, 27352, 27350, 0, 16384, 24576, 26624, - 27136, 27392, 27328, 27344, 0, 16384, 24576, 26624, - 27136, 27392, 27328, 27360, 27352, 0, 16384, 24576, - 26624, 27136, 27392, 27328, 27360, 27352, 0, 16384, - 24576, 26624, 27136, 27392, 27328, 27360, 27352, 27354, - 0, 16384, 24576, 26624, 27136, 27392, 27328, 27360, - 27352, 0, 16384, 24576, 26624, 27136, 27392, 27328, - 27360, 27361, 27356, 0, 16384, 24576, 26624, 27136, - 27392, 27328, 27360, 27361, 27356, 0, 16384, 24576, - 26624, 27136, 27392, 27328, 27360, 27361, 27356, 27358, - 0, 16384, 24576, 26624, 27136, 27392, 27328, 0, - 16384, 24576, 26624, 27136, 27392, 27393, 27360, 0, - 16384, 24576, 26624, 27136, 27392, 27393, 27360, 0, - 16384, 24576, 26624, 27136, 27392, 27393, 27360, 27362, - 0, 16384, 24576, 26624, 27136, 27392, 27393, 27360, - 0, 16384, 24576, 26624, 27136, 27392, 27393, 27360, - 27364, 0, 16384, 24576, 26624, 27136, 27392, 27393, - 27360, 27364, 0, 16384, 24576, 26624, 27136, 27392, - 27393, 27360, 27368, 27366, 0, 16384, 24576, 26624, - 27136, 27392, 27393, 27360, 0, 16384, 24576, 26624, - 27136, 27392, 27393, 27360, 27368, 0, 16384, 24576, - 26624, 27136, 27392, 27393, 27360, 27368, 0, 16384, - 24576, 26624, 27136, 27392, 27393, 27360, 27368, 27370, - 0, 16384, 24576, 26624, 27136, 27392, 27393, 27360, - 27368, 0, 16384, 24576, 26624, 27136, 27392, 27393, - 27360, 27376, 27372, 0, 16384, 24576, 26624, 27136, - 27392, 27393, 27360, 27376, 27372, 0, 16384, 24576, - 26624, 27136, 27392, 27393, 27360, 27376, 27377, 27374, - 0, 16384, 24576, 26624, 27136, 27392, 27393, 27360, - 0, 16384, 24576, 26624, 27136, 27392, 27393, 27360, - 27376, 0, 16384, 24576, 26624, 27136, 27392, 27393, - 27395, 27376, 0, 16384, 24576, 26624, 27136, 27392, - 27393, 27395, 27376, 27378, 0, 16384, 24576, 26624, - 27136, 27392, 27393, 27395, 27376, 0, 16384, 24576, - 26624, 27136, 27392, 27393, 27395, 27376, 27380, 0, - 16384, 24576, 26624, 27136, 27392, 27393, 27395, 27376, - 27380, 0, 16384, 24576, 26624, 27136, 27392, 27393, - 27395, 27376, 27384, 27382, 0, 16384, 24576, 26624, - 27136, 27392, 27393, 27395, 27376, 0, 16384, 24576, - 26624, 27136, 27392, 27393, 27395, 27376, 27384, 0, - 16384, 24576, 26624, 27136, 27392, 27393, 27395, 27376, - 27384, 0, 16384, 24576, 26624, 27136, 27392, 27393, - 27395, 27376, 27384, 27386, 0, 16384, 24576, 26624, - 27136, 27392, 27393, 27395, 27399, 27384, 0, 16384, - 24576, 26624, 27136, 27392, 27393, 27395, 27399, 27384, - 27388, 0, 16384, 24576, 26624, 27136, 27392, 27393, - 27395, 27399, 27384, 27388, 0, 16384, 24576, 26624, - 27136, 27392, 27393, 27395, 27399, 27384, 27388, 27390, - 0, 16384, 24576, 26624, 27136, 0, 16384, 24576, - 26624, 27648, 27392, 0, 16384, 24576, 26624, 27648, - 27392, 0, 16384, 24576, 26624, 27648, 27392, 27394, - 0, 16384, 24576, 26624, 27648, 27392, 0, 16384, - 24576, 26624, 27648, 27392, 27396, 0, 16384, 24576, - 26624, 27648, 27392, 27396, 0, 16384, 24576, 26624, - 27648, 27392, 27400, 27398, 0, 16384, 24576, 26624, - 27648, 27392, 0, 16384, 24576, 26624, 27648, 27392, - 27400, 0, 16384, 24576, 26624, 27648, 27392, 27400, - 0, 16384, 24576, 26624, 27648, 27392, 27400, 27402, - 0, 16384, 24576, 26624, 27648, 27392, 27400, 0, - 16384, 24576, 26624, 27648, 27392, 27408, 27404, 0, - 16384, 24576, 26624, 27648, 27392, 27408, 27404, 0, - 16384, 24576, 26624, 27648, 27392, 27408, 27409, 27406, - 0, 16384, 24576, 26624, 27648, 27392, 0, 16384, - 24576, 26624, 27648, 27392, 27408, 0, 16384, 24576, - 26624, 27648, 27392, 27408, 0, 16384, 24576, 26624, - 27648, 27392, 27408, 27410, 0, 16384, 24576, 26624, - 27648, 27392, 27408, 0, 16384, 24576, 26624, 27648, - 27392, 27408, 27412, 0, 16384, 24576, 26624, 27648, - 27392, 27408, 27412, 0, 16384, 24576, 26624, 27648, - 27392, 27408, 27416, 27414, 0, 16384, 24576, 26624, - 27648, 27392, 27408, 0, 16384, 24576, 26624, 27648, - 27392, 27424, 27416, 0, 16384, 24576, 26624, 27648, - 27392, 27424, 27416, 0, 16384, 24576, 26624, 27648, - 27392, 27424, 27416, 27418, 0, 16384, 24576, 26624, - 27648, 27392, 27424, 27416, 0, 16384, 24576, 26624, - 27648, 27392, 27424, 27425, 27420, 0, 16384, 24576, - 26624, 27648, 27392, 27424, 27425, 27420, 0, 16384, - 24576, 26624, 27648, 27392, 27424, 27425, 27420, 27422, - 0, 16384, 24576, 26624, 27648, 27392, 0, 16384, - 24576, 26624, 27648, 27392, 27424, 0, 16384, 24576, - 26624, 27648, 27392, 27424, 0, 16384, 24576, 26624, - 27648, 27392, 27424, 27426, 0, 16384, 24576, 26624, - 27648, 27392, 27424, 0, 16384, 24576, 26624, 27648, - 27392, 27424, 27428, 0, 16384, 24576, 26624, 27648, - 27392, 27424, 27428, 0, 16384, 24576, 26624, 27648, - 27392, 27424, 27432, 27430, 0, 16384, 24576, 26624, - 27648, 27392, 27424, 0, 16384, 24576, 26624, 27648, - 27392, 27424, 27432, 0, 16384, 24576, 26624, 27648, - 27392, 27424, 27432, 0, 16384, 24576, 26624, 27648, - 27392, 27424, 27432, 27434, 0, 16384, 24576, 26624, - 27648, 27392, 27424, 27432, 0, 16384, 24576, 26624, - 27648, 27392, 27424, 27440, 27436, 0, 16384, 24576, - 26624, 27648, 27392, 27424, 27440, 27436, 0, 16384, - 24576, 26624, 27648, 27392, 27424, 27440, 27441, 27438, - 0, 16384, 24576, 26624, 27648, 27392, 27424, 0, - 16384, 24576, 26624, 27648, 27392, 27456, 27440, 0, - 16384, 24576, 26624, 27648, 27392, 27456, 27440, 0, - 16384, 24576, 26624, 27648, 27392, 27456, 27440, 27442, - 0, 16384, 24576, 26624, 27648, 27392, 27456, 27440, - 0, 16384, 24576, 26624, 27648, 27392, 27456, 27440, - 27444, 0, 16384, 24576, 26624, 27648, 27392, 27456, - 27440, 27444, 0, 16384, 24576, 26624, 27648, 27392, - 27456, 27440, 27448, 27446, 0, 16384, 24576, 26624, - 27648, 27392, 27456, 27440, 0, 16384, 24576, 26624, - 27648, 27392, 27456, 27457, 27448, 0, 16384, 24576, - 26624, 27648, 27392, 27456, 27457, 27448, 0, 16384, - 24576, 26624, 27648, 27392, 27456, 27457, 27448, 27450, - 0, 16384, 24576, 26624, 27648, 27392, 27456, 27457, - 27448, 0, 16384, 24576, 26624, 27648, 27392, 27456, - 27457, 27448, 27452, 0, 16384, 24576, 26624, 27648, - 27392, 27456, 27457, 27459, 27452, 0, 16384, 24576, - 26624, 27648, 27392, 27456, 27457, 27459, 27452, 27454, - 0, 16384, 24576, 26624, 27648, 27392, 0, 16384, - 24576, 26624, 27648, 27392, 27456, 0, 16384, 24576, - 26624, 27648, 27392, 27456, 0, 16384, 24576, 26624, - 27648, 27392, 27456, 27458, 0, 16384, 24576, 26624, - 27648, 27392, 27456, 0, 16384, 24576, 26624, 27648, - 27392, 27456, 27460, 0, 16384, 24576, 26624, 27648, - 27392, 27456, 27460, 0, 16384, 24576, 26624, 27648, - 27392, 27456, 27464, 27462, 0, 16384, 24576, 26624, - 27648, 27392, 27456, 0, 16384, 24576, 26624, 27648, - 27392, 27456, 27464, 0, 16384, 24576, 26624, 27648, - 27392, 27456, 27464, 0, 16384, 24576, 26624, 27648, - 27392, 27456, 27464, 27466, 0, 16384, 24576, 26624, - 27648, 27392, 27456, 27464, 0, 16384, 24576, 26624, - 27648, 27392, 27456, 27472, 27468, 0, 16384, 24576, - 26624, 27648, 27392, 27456, 27472, 27468, 0, 16384, - 24576, 26624, 27648, 27392, 27456, 27472, 27473, 27470, - 0, 16384, 24576, 26624, 27648, 27392, 27456, 0, - 16384, 24576, 26624, 27648, 27392, 27456, 27472, 0, - 16384, 24576, 26624, 27648, 27392, 27456, 27472, 0, - 16384, 24576, 26624, 27648, 27392, 27456, 27472, 27474, - 0, 16384, 24576, 26624, 27648, 27392, 27456, 27472, - 0, 16384, 24576, 26624, 27648, 27392, 27456, 27472, - 27476, 0, 16384, 24576, 26624, 27648, 27392, 27456, - 27472, 27476, 0, 16384, 24576, 26624, 27648, 27392, - 27456, 27472, 27480, 27478, 0, 16384, 24576, 26624, - 27648, 27392, 27456, 27472, 0, 16384, 24576, 26624, - 27648, 27392, 27456, 27488, 27480, 0, 16384, 24576, - 26624, 27648, 27392, 27456, 27488, 27480, 0, 16384, - 24576, 26624, 27648, 27392, 27456, 27488, 27480, 27482, - 0, 16384, 24576, 26624, 27648, 27392, 27456, 27488, - 27480, 0, 16384, 24576, 26624, 27648, 27392, 27456, - 27488, 27489, 27484, 0, 16384, 24576, 26624, 27648, - 27392, 27456, 27488, 27489, 27484, 0, 16384, 24576, - 26624, 27648, 27392, 27456, 27488, 27489, 27484, 27486, - 0, 16384, 24576, 26624, 27648, 27392, 27456, 0, - 16384, 24576, 26624, 27648, 27392, 27520, 27488, 0, - 16384, 24576, 26624, 27648, 27392, 27520, 27488, 0, - 16384, 24576, 26624, 27648, 27392, 27520, 27488, 27490, - 0, 16384, 24576, 26624, 27648, 27392, 27520, 27488, - 0, 16384, 24576, 26624, 27648, 27392, 27520, 27488, - 27492, 0, 16384, 24576, 26624, 27648, 27392, 27520, - 27488, 27492, 0, 16384, 24576, 26624, 27648, 27392, - 27520, 27488, 27496, 27494, 0, 16384, 24576, 26624, - 27648, 27392, 27520, 27488, 0, 16384, 24576, 26624, - 27648, 27392, 27520, 27488, 27496, 0, 16384, 24576, - 26624, 27648, 27392, 27520, 27488, 27496, 0, 16384, - 24576, 26624, 27648, 27392, 27520, 27488, 27496, 27498, - 0, 16384, 24576, 26624, 27648, 27392, 27520, 27488, - 27496, 0, 16384, 24576, 26624, 27648, 27392, 27520, - 27488, 27504, 27500, 0, 16384, 24576, 26624, 27648, - 27392, 27520, 27488, 27504, 27500, 0, 16384, 24576, - 26624, 27648, 27392, 27520, 27488, 27504, 27505, 27502, - 0, 16384, 24576, 26624, 27648, 27392, 27520, 27488, - 0, 16384, 24576, 26624, 27648, 27392, 27520, 27521, - 27504, 0, 16384, 24576, 26624, 27648, 27392, 27520, - 27521, 27504, 0, 16384, 24576, 26624, 27648, 27392, - 27520, 27521, 27504, 27506, 0, 16384, 24576, 26624, - 27648, 27392, 27520, 27521, 27504, 0, 16384, 24576, - 26624, 27648, 27392, 27520, 27521, 27504, 27508, 0, - 16384, 24576, 26624, 27648, 27392, 27520, 27521, 27504, - 27508, 0, 16384, 24576, 26624, 27648, 27392, 27520, - 27521, 27504, 27512, 27510, 0, 16384, 24576, 26624, - 27648, 27392, 27520, 27521, 27504, 0, 16384, 24576, - 26624, 27648, 27392, 27520, 27521, 27504, 27512, 0, - 16384, 24576, 26624, 27648, 27392, 27520, 27521, 27523, - 27512, 0, 16384, 24576, 26624, 27648, 27392, 27520, - 27521, 27523, 27512, 27514, 0, 16384, 24576, 26624, - 27648, 27392, 27520, 27521, 27523, 27512, 0, 16384, - 24576, 26624, 27648, 27392, 27520, 27521, 27523, 27512, - 27516, 0, 16384, 24576, 26624, 27648, 27392, 27520, - 27521, 27523, 27512, 27516, 0, 16384, 24576, 26624, - 27648, 27392, 27520, 27521, 27523, 27512, 27516, 27518, - 0, 16384, 24576, 26624, 27648, 27392, 0, 16384, - 24576, 26624, 27648, 27392, 27520, 0, 16384, 24576, - 26624, 27648, 27649, 27520, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 27522, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 0, 16384, 24576, 26624, 27648, - 27649, 27520, 27524, 0, 16384, 24576, 26624, 27648, - 27649, 27520, 27524, 0, 16384, 24576, 26624, 27648, - 27649, 27520, 27528, 27526, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 0, 16384, 24576, 26624, 27648, - 27649, 27520, 27528, 0, 16384, 24576, 26624, 27648, - 27649, 27520, 27528, 0, 16384, 24576, 26624, 27648, - 27649, 27520, 27528, 27530, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 27528, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 27536, 27532, 0, 16384, 24576, - 26624, 27648, 27649, 27520, 27536, 27532, 0, 16384, - 24576, 26624, 27648, 27649, 27520, 27536, 27537, 27534, - 0, 16384, 24576, 26624, 27648, 27649, 27520, 0, - 16384, 24576, 26624, 27648, 27649, 27520, 27536, 0, - 16384, 24576, 26624, 27648, 27649, 27520, 27536, 0, - 16384, 24576, 26624, 27648, 27649, 27520, 27536, 27538, - 0, 16384, 24576, 26624, 27648, 27649, 27520, 27536, - 0, 16384, 24576, 26624, 27648, 27649, 27520, 27536, - 27540, 0, 16384, 24576, 26624, 27648, 27649, 27520, - 27536, 27540, 0, 16384, 24576, 26624, 27648, 27649, - 27520, 27536, 27544, 27542, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 27536, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 27552, 27544, 0, 16384, 24576, - 26624, 27648, 27649, 27520, 27552, 27544, 0, 16384, - 24576, 26624, 27648, 27649, 27520, 27552, 27544, 27546, - 0, 16384, 24576, 26624, 27648, 27649, 27520, 27552, - 27544, 0, 16384, 24576, 26624, 27648, 27649, 27520, - 27552, 27553, 27548, 0, 16384, 24576, 26624, 27648, - 27649, 27520, 27552, 27553, 27548, 0, 16384, 24576, - 26624, 27648, 27649, 27520, 27552, 27553, 27548, 27550, - 0, 16384, 24576, 26624, 27648, 27649, 27520, 0, - 16384, 24576, 26624, 27648, 27649, 27520, 27552, 0, - 16384, 24576, 26624, 27648, 27649, 27520, 27552, 0, - 16384, 24576, 26624, 27648, 27649, 27520, 27552, 27554, - 0, 16384, 24576, 26624, 27648, 27649, 27520, 27552, - 0, 16384, 24576, 26624, 27648, 27649, 27520, 27552, - 27556, 0, 16384, 24576, 26624, 27648, 27649, 27520, - 27552, 27556, 0, 16384, 24576, 26624, 27648, 27649, - 27520, 27552, 27560, 27558, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 27552, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 27552, 27560, 0, 16384, 24576, - 26624, 27648, 27649, 27520, 27552, 27560, 0, 16384, - 24576, 26624, 27648, 27649, 27520, 27552, 27560, 27562, - 0, 16384, 24576, 26624, 27648, 27649, 27520, 27552, - 27560, 0, 16384, 24576, 26624, 27648, 27649, 27520, - 27552, 27568, 27564, 0, 16384, 24576, 26624, 27648, - 27649, 27520, 27552, 27568, 27564, 0, 16384, 24576, - 26624, 27648, 27649, 27520, 27552, 27568, 27569, 27566, - 0, 16384, 24576, 26624, 27648, 27649, 27520, 27552, - 0, 16384, 24576, 26624, 27648, 27649, 27520, 27584, - 27568, 0, 16384, 24576, 26624, 27648, 27649, 27520, - 27584, 27568, 0, 16384, 24576, 26624, 27648, 27649, - 27520, 27584, 27568, 27570, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 27584, 27568, 0, 16384, 24576, - 26624, 27648, 27649, 27520, 27584, 27568, 27572, 0, - 16384, 24576, 26624, 27648, 27649, 27520, 27584, 27568, - 27572, 0, 16384, 24576, 26624, 27648, 27649, 27520, - 27584, 27568, 27576, 27574, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 27584, 27568, 0, 16384, 24576, - 26624, 27648, 27649, 27520, 27584, 27585, 27576, 0, - 16384, 24576, 26624, 27648, 27649, 27520, 27584, 27585, - 27576, 0, 16384, 24576, 26624, 27648, 27649, 27520, - 27584, 27585, 27576, 27578, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 27584, 27585, 27576, 0, 16384, - 24576, 26624, 27648, 27649, 27520, 27584, 27585, 27576, - 27580, 0, 16384, 24576, 26624, 27648, 27649, 27520, - 27584, 27585, 27587, 27580, 0, 16384, 24576, 26624, - 27648, 27649, 27520, 27584, 27585, 27587, 27580, 27582, - 0, 16384, 24576, 26624, 27648, 27649, 27520, 0, - 16384, 24576, 26624, 27648, 27649, 27520, 27584, 0, - 16384, 24576, 26624, 27648, 27649, 27520, 27584, 0, - 16384, 24576, 26624, 27648, 27649, 27520, 27584, 27586, - 0, 16384, 24576, 26624, 27648, 27649, 27651, 27584, - 0, 16384, 24576, 26624, 27648, 27649, 27651, 27584, - 27588, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27584, 27588, 0, 16384, 24576, 26624, 27648, 27649, - 27651, 27584, 27592, 27590, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27584, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27584, 27592, 0, 16384, 24576, - 26624, 27648, 27649, 27651, 27584, 27592, 0, 16384, - 24576, 26624, 27648, 27649, 27651, 27584, 27592, 27594, - 0, 16384, 24576, 26624, 27648, 27649, 27651, 27584, - 27592, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27584, 27600, 27596, 0, 16384, 24576, 26624, 27648, - 27649, 27651, 27584, 27600, 27596, 0, 16384, 24576, - 26624, 27648, 27649, 27651, 27584, 27600, 27601, 27598, - 0, 16384, 24576, 26624, 27648, 27649, 27651, 27584, - 0, 16384, 24576, 26624, 27648, 27649, 27651, 27584, - 27600, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27584, 27600, 0, 16384, 24576, 26624, 27648, 27649, - 27651, 27584, 27600, 27602, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27584, 27600, 0, 16384, 24576, - 26624, 27648, 27649, 27651, 27584, 27600, 27604, 0, - 16384, 24576, 26624, 27648, 27649, 27651, 27584, 27600, - 27604, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27584, 27600, 27608, 27606, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27584, 27600, 0, 16384, 24576, - 26624, 27648, 27649, 27651, 27584, 27616, 27608, 0, - 16384, 24576, 26624, 27648, 27649, 27651, 27584, 27616, - 27608, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27584, 27616, 27608, 27610, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27584, 27616, 27608, 0, 16384, - 24576, 26624, 27648, 27649, 27651, 27584, 27616, 27617, - 27612, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27584, 27616, 27617, 27612, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27584, 27616, 27617, 27612, 27614, - 0, 16384, 24576, 26624, 27648, 27649, 27651, 27584, - 0, 16384, 24576, 26624, 27648, 27649, 27651, 27584, - 27616, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27584, 27616, 0, 16384, 24576, 26624, 27648, 27649, - 27651, 27584, 27616, 27618, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27584, 27616, 0, 16384, 24576, - 26624, 27648, 27649, 27651, 27584, 27616, 27620, 0, - 16384, 24576, 26624, 27648, 27649, 27651, 27584, 27616, - 27620, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27584, 27616, 27624, 27622, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27655, 27616, 0, 16384, 24576, - 26624, 27648, 27649, 27651, 27655, 27616, 27624, 0, - 16384, 24576, 26624, 27648, 27649, 27651, 27655, 27616, - 27624, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27655, 27616, 27624, 27626, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27655, 27616, 27624, 0, 16384, - 24576, 26624, 27648, 27649, 27651, 27655, 27616, 27632, - 27628, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27655, 27616, 27632, 27628, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27655, 27616, 27632, 27633, 27630, - 0, 16384, 24576, 26624, 27648, 27649, 27651, 27655, - 27616, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27655, 27616, 27632, 0, 16384, 24576, 26624, 27648, - 27649, 27651, 27655, 27616, 27632, 0, 16384, 24576, - 26624, 27648, 27649, 27651, 27655, 27616, 27632, 27634, - 0, 16384, 24576, 26624, 27648, 27649, 27651, 27655, - 27616, 27632, 0, 16384, 24576, 26624, 27648, 27649, - 27651, 27655, 27616, 27632, 27636, 0, 16384, 24576, - 26624, 27648, 27649, 27651, 27655, 27616, 27632, 27636, - 0, 16384, 24576, 26624, 27648, 27649, 27651, 27655, - 27616, 27632, 27640, 27638, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27655, 27616, 27632, 0, 16384, - 24576, 26624, 27648, 27649, 27651, 27655, 27616, 27632, - 27640, 0, 16384, 24576, 26624, 27648, 27649, 27651, - 27655, 27616, 27632, 27640, 0, 16384, 24576, 26624, - 27648, 27649, 27651, 27655, 27616, 27632, 27640, 27642, - 0, 16384, 24576, 26624, 27648, 27649, 27651, 27655, - 27616, 27632, 27640, 0, 16384, 24576, 26624, 27648, - 27649, 27651, 27655, 27616, 27632, 27640, 27644, 0, - 16384, 24576, 26624, 27648, 27649, 27651, 27655, 27616, - 27632, 27640, 27644, 0, 16384, 24576, 26624, 27648, - 27649, 27651, 27655, 27616, 27632, 27640, 27644, 27646, - 0, 16384, 24576, 26624, 0, 16384, 24576, 26624, - 27648, 0, 16384, 24576, 26624, 27648, 0, 16384, - 24576, 26624, 27648, 27650, 0, 16384, 24576, 26624, - 27648, 0, 16384, 24576, 26624, 27648, 27652, 0, - 16384, 24576, 26624, 27648, 27652, 0, 16384, 24576, - 26624, 27648, 27656, 27654, 0, 16384, 24576, 26624, - 27648, 0, 16384, 24576, 26624, 27648, 27656, 0, - 16384, 24576, 26624, 27648, 27656, 0, 16384, 24576, - 26624, 27648, 27656, 27658, 0, 16384, 24576, 26624, - 27648, 27656, 0, 16384, 24576, 26624, 27648, 27664, - 27660, 0, 16384, 24576, 26624, 27648, 27664, 27660, - 0, 16384, 24576, 26624, 27648, 27664, 27665, 27662, - 0, 16384, 24576, 26624, 27648, 0, 16384, 24576, - 26624, 27648, 27664, 0, 16384, 24576, 26624, 27648, - 27664, 0, 16384, 24576, 26624, 27648, 27664, 27666, - 0, 16384, 24576, 26624, 27648, 27664, 0, 16384, - 24576, 26624, 27648, 27664, 27668, 0, 16384, 24576, - 26624, 27648, 27664, 27668, 0, 16384, 24576, 26624, - 27648, 27664, 27672, 27670, 0, 16384, 24576, 26624, - 27648, 27664, 0, 16384, 24576, 26624, 27648, 27680, - 27672, 0, 16384, 24576, 26624, 27648, 27680, 27672, - 0, 16384, 24576, 26624, 27648, 27680, 27672, 27674, - 0, 16384, 24576, 26624, 27648, 27680, 27672, 0, - 16384, 24576, 26624, 27648, 27680, 27681, 27676, 0, - 16384, 24576, 26624, 27648, 27680, 27681, 27676, 0, - 16384, 24576, 26624, 27648, 27680, 27681, 27676, 27678, - 0, 16384, 24576, 26624, 27648, 0, 16384, 24576, - 26624, 27648, 27680, 0, 16384, 24576, 26624, 27648, - 27680, 0, 16384, 24576, 26624, 27648, 27680, 27682, - 0, 16384, 24576, 26624, 27648, 27680, 0, 16384, - 24576, 26624, 27648, 27680, 27684, 0, 16384, 24576, - 26624, 27648, 27680, 27684, 0, 16384, 24576, 26624, - 27648, 27680, 27688, 27686, 0, 16384, 24576, 26624, - 27648, 27680, 0, 16384, 24576, 26624, 27648, 27680, - 27688, 0, 16384, 24576, 26624, 27648, 27680, 27688, - 0, 16384, 24576, 26624, 27648, 27680, 27688, 27690, - 0, 16384, 24576, 26624, 27648, 27680, 27688, 0, - 16384, 24576, 26624, 27648, 27680, 27696, 27692, 0, - 16384, 24576, 26624, 27648, 27680, 27696, 27692, 0, - 16384, 24576, 26624, 27648, 27680, 27696, 27697, 27694, - 0, 16384, 24576, 26624, 27648, 27680, 0, 16384, - 24576, 26624, 27648, 27712, 27696, 0, 16384, 24576, - 26624, 27648, 27712, 27696, 0, 16384, 24576, 26624, - 27648, 27712, 27696, 27698, 0, 16384, 24576, 26624, - 27648, 27712, 27696, 0, 16384, 24576, 26624, 27648, - 27712, 27696, 27700, 0, 16384, 24576, 26624, 27648, - 27712, 27696, 27700, 0, 16384, 24576, 26624, 27648, - 27712, 27696, 27704, 27702, 0, 16384, 24576, 26624, - 27648, 27712, 27696, 0, 16384, 24576, 26624, 27648, - 27712, 27713, 27704, 0, 16384, 24576, 26624, 27648, - 27712, 27713, 27704, 0, 16384, 24576, 26624, 27648, - 27712, 27713, 27704, 27706, 0, 16384, 24576, 26624, - 27648, 27712, 27713, 27704, 0, 16384, 24576, 26624, - 27648, 27712, 27713, 27704, 27708, 0, 16384, 24576, - 26624, 27648, 27712, 27713, 27715, 27708, 0, 16384, - 24576, 26624, 27648, 27712, 27713, 27715, 27708, 27710, - 0, 16384, 24576, 26624, 27648, 0, 16384, 24576, - 26624, 27648, 27712, 0, 16384, 24576, 26624, 27648, - 27712, 0, 16384, 24576, 26624, 27648, 27712, 27714, - 0, 16384, 24576, 26624, 27648, 27712, 0, 16384, - 24576, 26624, 27648, 27712, 27716, 0, 16384, 24576, - 26624, 27648, 27712, 27716, 0, 16384, 24576, 26624, - 27648, 27712, 27720, 27718, 0, 16384, 24576, 26624, - 27648, 27712, 0, 16384, 24576, 26624, 27648, 27712, - 27720, 0, 16384, 24576, 26624, 27648, 27712, 27720, - 0, 16384, 24576, 26624, 27648, 27712, 27720, 27722, - 0, 16384, 24576, 26624, 27648, 27712, 27720, 0, - 16384, 24576, 26624, 27648, 27712, 27728, 27724, 0, - 16384, 24576, 26624, 27648, 27712, 27728, 27724, 0, - 16384, 24576, 26624, 27648, 27712, 27728, 27729, 27726, - 0, 16384, 24576, 26624, 27648, 27712, 0, 16384, - 24576, 26624, 27648, 27712, 27728, 0, 16384, 24576, - 26624, 27648, 27712, 27728, 0, 16384, 24576, 26624, - 27648, 27712, 27728, 27730, 0, 16384, 24576, 26624, - 27648, 27712, 27728, 0, 16384, 24576, 26624, 27648, - 27712, 27728, 27732, 0, 16384, 24576, 26624, 27648, - 27712, 27728, 27732, 0, 16384, 24576, 26624, 27648, - 27712, 27728, 27736, 27734, 0, 16384, 24576, 26624, - 27648, 27712, 27728, 0, 16384, 24576, 26624, 27648, - 27712, 27744, 27736, 0, 16384, 24576, 26624, 27648, - 27712, 27744, 27736, 0, 16384, 24576, 26624, 27648, - 27712, 27744, 27736, 27738, 0, 16384, 24576, 26624, - 27648, 27712, 27744, 27736, 0, 16384, 24576, 26624, - 27648, 27712, 27744, 27745, 27740, 0, 16384, 24576, - 26624, 27648, 27712, 27744, 27745, 27740, 0, 16384, - 24576, 26624, 27648, 27712, 27744, 27745, 27740, 27742, - 0, 16384, 24576, 26624, 27648, 27712, 0, 16384, - 24576, 26624, 27648, 27776, 27744, 0, 16384, 24576, - 26624, 27648, 27776, 27744, 0, 16384, 24576, 26624, - 27648, 27776, 27744, 27746, 0, 16384, 24576, 26624, - 27648, 27776, 27744, 0, 16384, 24576, 26624, 27648, - 27776, 27744, 27748, 0, 16384, 24576, 26624, 27648, - 27776, 27744, 27748, 0, 16384, 24576, 26624, 27648, - 27776, 27744, 27752, 27750, 0, 16384, 24576, 26624, - 27648, 27776, 27744, 0, 16384, 24576, 26624, 27648, - 27776, 27744, 27752, 0, 16384, 24576, 26624, 27648, - 27776, 27744, 27752, 0, 16384, 24576, 26624, 27648, - 27776, 27744, 27752, 27754, 0, 16384, 24576, 26624, - 27648, 27776, 27744, 27752, 0, 16384, 24576, 26624, - 27648, 27776, 27744, 27760, 27756, 0, 16384, 24576, - 26624, 27648, 27776, 27744, 27760, 27756, 0, 16384, - 24576, 26624, 27648, 27776, 27744, 27760, 27761, 27758, - 0, 16384, 24576, 26624, 27648, 27776, 27744, 0, - 16384, 24576, 26624, 27648, 27776, 27777, 27760, 0, - 16384, 24576, 26624, 27648, 27776, 27777, 27760, 0, - 16384, 24576, 26624, 27648, 27776, 27777, 27760, 27762, - 0, 16384, 24576, 26624, 27648, 27776, 27777, 27760, - 0, 16384, 24576, 26624, 27648, 27776, 27777, 27760, - 27764, 0, 16384, 24576, 26624, 27648, 27776, 27777, - 27760, 27764, 0, 16384, 24576, 26624, 27648, 27776, - 27777, 27760, 27768, 27766, 0, 16384, 24576, 26624, - 27648, 27776, 27777, 27760, 0, 16384, 24576, 26624, - 27648, 27776, 27777, 27760, 27768, 0, 16384, 24576, - 26624, 27648, 27776, 27777, 27779, 27768, 0, 16384, - 24576, 26624, 27648, 27776, 27777, 27779, 27768, 27770, - 0, 16384, 24576, 26624, 27648, 27776, 27777, 27779, - 27768, 0, 16384, 24576, 26624, 27648, 27776, 27777, - 27779, 27768, 27772, 0, 16384, 24576, 26624, 27648, - 27776, 27777, 27779, 27768, 27772, 0, 16384, 24576, - 26624, 27648, 27776, 27777, 27779, 27768, 27772, 27774, - 0, 16384, 24576, 26624, 27648, 0, 16384, 24576, - 26624, 27648, 27776, 0, 16384, 24576, 26624, 27648, - 27776, 0, 16384, 24576, 26624, 27648, 27776, 27778, - 0, 16384, 24576, 26624, 27648, 27776, 0, 16384, - 24576, 26624, 27648, 27776, 27780, 0, 16384, 24576, - 26624, 27648, 27776, 27780, 0, 16384, 24576, 26624, - 27648, 27776, 27784, 27782, 0, 16384, 24576, 26624, - 27648, 27776, 0, 16384, 24576, 26624, 27648, 27776, - 27784, 0, 16384, 24576, 26624, 27648, 27776, 27784, - 0, 16384, 24576, 26624, 27648, 27776, 27784, 27786, - 0, 16384, 24576, 26624, 27648, 27776, 27784, 0, - 16384, 24576, 26624, 27648, 27776, 27792, 27788, 0, - 16384, 24576, 26624, 27648, 27776, 27792, 27788, 0, - 16384, 24576, 26624, 27648, 27776, 27792, 27793, 27790, - 0, 16384, 24576, 26624, 27648, 27776, 0, 16384, - 24576, 26624, 27648, 27776, 27792, 0, 16384, 24576, - 26624, 27648, 27776, 27792, 0, 16384, 24576, 26624, - 27648, 27776, 27792, 27794, 0, 16384, 24576, 26624, - 27648, 27776, 27792, 0, 16384, 24576, 26624, 27648, - 27776, 27792, 27796, 0, 16384, 24576, 26624, 27648, - 27776, 27792, 27796, 0, 16384, 24576, 26624, 27648, - 27776, 27792, 27800, 27798, 0, 16384, 24576, 26624, - 27648, 27776, 27792, 0, 16384, 24576, 26624, 27648, - 27776, 27808, 27800, 0, 16384, 24576, 26624, 27648, - 27776, 27808, 27800, 0, 16384, 24576, 26624, 27648, - 27776, 27808, 27800, 27802, 0, 16384, 24576, 26624, - 27648, 27776, 27808, 27800, 0, 16384, 24576, 26624, - 27648, 27776, 27808, 27809, 27804, 0, 16384, 24576, - 26624, 27648, 27776, 27808, 27809, 27804, 0, 16384, - 24576, 26624, 27648, 27776, 27808, 27809, 27804, 27806, - 0, 16384, 24576, 26624, 27648, 27776, 0, 16384, - 24576, 26624, 27648, 27776, 27808, 0, 16384, 24576, - 26624, 27648, 27776, 27808, 0, 16384, 24576, 26624, - 27648, 27776, 27808, 27810, 0, 16384, 24576, 26624, - 27648, 27776, 27808, 0, 16384, 24576, 26624, 27648, - 27776, 27808, 27812, 0, 16384, 24576, 26624, 27648, - 27776, 27808, 27812, 0, 16384, 24576, 26624, 27648, - 27776, 27808, 27816, 27814, 0, 16384, 24576, 26624, - 27648, 27776, 27808, 0, 16384, 24576, 26624, 27648, - 27776, 27808, 27816, 0, 16384, 24576, 26624, 27648, - 27776, 27808, 27816, 0, 16384, 24576, 26624, 27648, - 27776, 27808, 27816, 27818, 0, 16384, 24576, 26624, - 27648, 27776, 27808, 27816, 0, 16384, 24576, 26624, - 27648, 27776, 27808, 27824, 27820, 0, 16384, 24576, - 26624, 27648, 27776, 27808, 27824, 27820, 0, 16384, - 24576, 26624, 27648, 27776, 27808, 27824, 27825, 27822, - 0, 16384, 24576, 26624, 27648, 27776, 27808, 0, - 16384, 24576, 26624, 27648, 27776, 27840, 27824, 0, - 16384, 24576, 26624, 27648, 27776, 27840, 27824, 0, - 16384, 24576, 26624, 27648, 27776, 27840, 27824, 27826, - 0, 16384, 24576, 26624, 27648, 27776, 27840, 27824, - 0, 16384, 24576, 26624, 27648, 27776, 27840, 27824, - 27828, 0, 16384, 24576, 26624, 27648, 27776, 27840, - 27824, 27828, 0, 16384, 24576, 26624, 27648, 27776, - 27840, 27824, 27832, 27830, 0, 16384, 24576, 26624, - 27648, 27776, 27840, 27824, 0, 16384, 24576, 26624, - 27648, 27776, 27840, 27841, 27832, 0, 16384, 24576, - 26624, 27648, 27776, 27840, 27841, 27832, 0, 16384, - 24576, 26624, 27648, 27776, 27840, 27841, 27832, 27834, - 0, 16384, 24576, 26624, 27648, 27776, 27840, 27841, - 27832, 0, 16384, 24576, 26624, 27648, 27776, 27840, - 27841, 27832, 27836, 0, 16384, 24576, 26624, 27648, - 27776, 27840, 27841, 27843, 27836, 0, 16384, 24576, - 26624, 27648, 27776, 27840, 27841, 27843, 27836, 27838, - 0, 16384, 24576, 26624, 27648, 27776, 0, 16384, - 24576, 26624, 27648, 27904, 27840, 0, 16384, 24576, - 26624, 27648, 27904, 27840, 0, 16384, 24576, 26624, - 27648, 27904, 27840, 27842, 0, 16384, 24576, 26624, - 27648, 27904, 27840, 0, 16384, 24576, 26624, 27648, - 27904, 27840, 27844, 0, 16384, 24576, 26624, 27648, - 27904, 27840, 27844, 0, 16384, 24576, 26624, 27648, - 27904, 27840, 27848, 27846, 0, 16384, 24576, 26624, - 27648, 27904, 27840, 0, 16384, 24576, 26624, 27648, - 27904, 27840, 27848, 0, 16384, 24576, 26624, 27648, - 27904, 27840, 27848, 0, 16384, 24576, 26624, 27648, - 27904, 27840, 27848, 27850, 0, 16384, 24576, 26624, - 27648, 27904, 27840, 27848, 0, 16384, 24576, 26624, - 27648, 27904, 27840, 27856, 27852, 0, 16384, 24576, - 26624, 27648, 27904, 27840, 27856, 27852, 0, 16384, - 24576, 26624, 27648, 27904, 27840, 27856, 27857, 27854, - 0, 16384, 24576, 26624, 27648, 27904, 27840, 0, - 16384, 24576, 26624, 27648, 27904, 27840, 27856, 0, - 16384, 24576, 26624, 27648, 27904, 27840, 27856, 0, - 16384, 24576, 26624, 27648, 27904, 27840, 27856, 27858, - 0, 16384, 24576, 26624, 27648, 27904, 27840, 27856, - 0, 16384, 24576, 26624, 27648, 27904, 27840, 27856, - 27860, 0, 16384, 24576, 26624, 27648, 27904, 27840, - 27856, 27860, 0, 16384, 24576, 26624, 27648, 27904, - 27840, 27856, 27864, 27862, 0, 16384, 24576, 26624, - 27648, 27904, 27840, 27856, 0, 16384, 24576, 26624, - 27648, 27904, 27840, 27872, 27864, 0, 16384, 24576, - 26624, 27648, 27904, 27840, 27872, 27864, 0, 16384, - 24576, 26624, 27648, 27904, 27840, 27872, 27864, 27866, - 0, 16384, 24576, 26624, 27648, 27904, 27840, 27872, - 27864, 0, 16384, 24576, 26624, 27648, 27904, 27840, - 27872, 27873, 27868, 0, 16384, 24576, 26624, 27648, - 27904, 27840, 27872, 27873, 27868, 0, 16384, 24576, - 26624, 27648, 27904, 27840, 27872, 27873, 27868, 27870, - 0, 16384, 24576, 26624, 27648, 27904, 27840, 0, - 16384, 24576, 26624, 27648, 27904, 27905, 27872, 0, - 16384, 24576, 26624, 27648, 27904, 27905, 27872, 0, - 16384, 24576, 26624, 27648, 27904, 27905, 27872, 27874, - 0, 16384, 24576, 26624, 27648, 27904, 27905, 27872, - 0, 16384, 24576, 26624, 27648, 27904, 27905, 27872, - 27876, 0, 16384, 24576, 26624, 27648, 27904, 27905, - 27872, 27876, 0, 16384, 24576, 26624, 27648, 27904, - 27905, 27872, 27880, 27878, 0, 16384, 24576, 26624, - 27648, 27904, 27905, 27872, 0, 16384, 24576, 26624, - 27648, 27904, 27905, 27872, 27880, 0, 16384, 24576, - 26624, 27648, 27904, 27905, 27872, 27880, 0, 16384, - 24576, 26624, 27648, 27904, 27905, 27872, 27880, 27882, - 0, 16384, 24576, 26624, 27648, 27904, 27905, 27872, - 27880, 0, 16384, 24576, 26624, 27648, 27904, 27905, - 27872, 27888, 27884, 0, 16384, 24576, 26624, 27648, - 27904, 27905, 27872, 27888, 27884, 0, 16384, 24576, - 26624, 27648, 27904, 27905, 27872, 27888, 27889, 27886, - 0, 16384, 24576, 26624, 27648, 27904, 27905, 27872, - 0, 16384, 24576, 26624, 27648, 27904, 27905, 27872, - 27888, 0, 16384, 24576, 26624, 27648, 27904, 27905, - 27907, 27888, 0, 16384, 24576, 26624, 27648, 27904, - 27905, 27907, 27888, 27890, 0, 16384, 24576, 26624, - 27648, 27904, 27905, 27907, 27888, 0, 16384, 24576, - 26624, 27648, 27904, 27905, 27907, 27888, 27892, 0, - 16384, 24576, 26624, 27648, 27904, 27905, 27907, 27888, - 27892, 0, 16384, 24576, 26624, 27648, 27904, 27905, - 27907, 27888, 27896, 27894, 0, 16384, 24576, 26624, - 27648, 27904, 27905, 27907, 27888, 0, 16384, 24576, - 26624, 27648, 27904, 27905, 27907, 27888, 27896, 0, - 16384, 24576, 26624, 27648, 27904, 27905, 27907, 27888, - 27896, 0, 16384, 24576, 26624, 27648, 27904, 27905, - 27907, 27888, 27896, 27898, 0, 16384, 24576, 26624, - 27648, 27904, 27905, 27907, 27911, 27896, 0, 16384, - 24576, 26624, 27648, 27904, 27905, 27907, 27911, 27896, - 27900, 0, 16384, 24576, 26624, 27648, 27904, 27905, - 27907, 27911, 27896, 27900, 0, 16384, 24576, 26624, - 27648, 27904, 27905, 27907, 27911, 27896, 27900, 27902, - 0, 16384, 24576, 26624, 27648, 0, 16384, 24576, - 28672, 27648, 27904, 0, 16384, 24576, 28672, 27648, - 27904, 0, 16384, 24576, 28672, 27648, 27904, 27906, - 0, 16384, 24576, 28672, 27648, 27904, 0, 16384, - 24576, 28672, 27648, 27904, 27908, 0, 16384, 24576, - 28672, 27648, 27904, 27908, 0, 16384, 24576, 28672, - 27648, 27904, 27912, 27910, 0, 16384, 24576, 28672, - 27648, 27904, 0, 16384, 24576, 28672, 27648, 27904, - 27912, 0, 16384, 24576, 28672, 27648, 27904, 27912, - 0, 16384, 24576, 28672, 27648, 27904, 27912, 27914, - 0, 16384, 24576, 28672, 27648, 27904, 27912, 0, - 16384, 24576, 28672, 27648, 27904, 27920, 27916, 0, - 16384, 24576, 28672, 27648, 27904, 27920, 27916, 0, - 16384, 24576, 28672, 27648, 27904, 27920, 27921, 27918, - 0, 16384, 24576, 28672, 27648, 27904, 0, 16384, - 24576, 28672, 27648, 27904, 27920, 0, 16384, 24576, - 28672, 27648, 27904, 27920, 0, 16384, 24576, 28672, - 27648, 27904, 27920, 27922, 0, 16384, 24576, 28672, - 27648, 27904, 27920, 0, 16384, 24576, 28672, 27648, - 27904, 27920, 27924, 0, 16384, 24576, 28672, 27648, - 27904, 27920, 27924, 0, 16384, 24576, 28672, 27648, - 27904, 27920, 27928, 27926, 0, 16384, 24576, 28672, - 27648, 27904, 27920, 0, 16384, 24576, 28672, 27648, - 27904, 27936, 27928, 0, 16384, 24576, 28672, 27648, - 27904, 27936, 27928, 0, 16384, 24576, 28672, 27648, - 27904, 27936, 27928, 27930, 0, 16384, 24576, 28672, - 27648, 27904, 27936, 27928, 0, 16384, 24576, 28672, - 27648, 27904, 27936, 27937, 27932, 0, 16384, 24576, - 28672, 27648, 27904, 27936, 27937, 27932, 0, 16384, - 24576, 28672, 27648, 27904, 27936, 27937, 27932, 27934, - 0, 16384, 24576, 28672, 27648, 27904, 0, 16384, - 24576, 28672, 27648, 27904, 27936, 0, 16384, 24576, - 28672, 27648, 27904, 27936, 0, 16384, 24576, 28672, - 27648, 27904, 27936, 27938, 0, 16384, 24576, 28672, - 27648, 27904, 27936, 0, 16384, 24576, 28672, 27648, - 27904, 27936, 27940, 0, 16384, 24576, 28672, 27648, - 27904, 27936, 27940, 0, 16384, 24576, 28672, 27648, - 27904, 27936, 27944, 27942, 0, 16384, 24576, 28672, - 27648, 27904, 27936, 0, 16384, 24576, 28672, 27648, - 27904, 27936, 27944, 0, 16384, 24576, 28672, 27648, - 27904, 27936, 27944, 0, 16384, 24576, 28672, 27648, - 27904, 27936, 27944, 27946, 0, 16384, 24576, 28672, - 27648, 27904, 27936, 27944, 0, 16384, 24576, 28672, - 27648, 27904, 27936, 27952, 27948, 0, 16384, 24576, - 28672, 27648, 27904, 27936, 27952, 27948, 0, 16384, - 24576, 28672, 27648, 27904, 27936, 27952, 27953, 27950, - 0, 16384, 24576, 28672, 27648, 27904, 27936, 0, - 16384, 24576, 28672, 27648, 27904, 27968, 27952, 0, - 16384, 24576, 28672, 27648, 27904, 27968, 27952, 0, - 16384, 24576, 28672, 27648, 27904, 27968, 27952, 27954, - 0, 16384, 24576, 28672, 27648, 27904, 27968, 27952, - 0, 16384, 24576, 28672, 27648, 27904, 27968, 27952, - 27956, 0, 16384, 24576, 28672, 27648, 27904, 27968, - 27952, 27956, 0, 16384, 24576, 28672, 27648, 27904, - 27968, 27952, 27960, 27958, 0, 16384, 24576, 28672, - 27648, 27904, 27968, 27952, 0, 16384, 24576, 28672, - 27648, 27904, 27968, 27969, 27960, 0, 16384, 24576, - 28672, 27648, 27904, 27968, 27969, 27960, 0, 16384, - 24576, 28672, 27648, 27904, 27968, 27969, 27960, 27962, - 0, 16384, 24576, 28672, 27648, 27904, 27968, 27969, - 27960, 0, 16384, 24576, 28672, 27648, 27904, 27968, - 27969, 27960, 27964, 0, 16384, 24576, 28672, 27648, - 27904, 27968, 27969, 27971, 27964, 0, 16384, 24576, - 28672, 27648, 27904, 27968, 27969, 27971, 27964, 27966, - 0, 16384, 24576, 28672, 27648, 27904, 0, 16384, - 24576, 28672, 27648, 27904, 27968, 0, 16384, 24576, - 28672, 27648, 27904, 27968, 0, 16384, 24576, 28672, - 27648, 27904, 27968, 27970, 0, 16384, 24576, 28672, - 27648, 27904, 27968, 0, 16384, 24576, 28672, 27648, - 27904, 27968, 27972, 0, 16384, 24576, 28672, 27648, - 27904, 27968, 27972, 0, 16384, 24576, 28672, 27648, - 27904, 27968, 27976, 27974, 0, 16384, 24576, 28672, - 27648, 27904, 27968, 0, 16384, 24576, 28672, 27648, - 27904, 27968, 27976, 0, 16384, 24576, 28672, 27648, - 27904, 27968, 27976, 0, 16384, 24576, 28672, 27648, - 27904, 27968, 27976, 27978, 0, 16384, 24576, 28672, - 27648, 27904, 27968, 27976, 0, 16384, 24576, 28672, - 27648, 27904, 27968, 27984, 27980, 0, 16384, 24576, - 28672, 27648, 27904, 27968, 27984, 27980, 0, 16384, - 24576, 28672, 27648, 27904, 27968, 27984, 27985, 27982, - 0, 16384, 24576, 28672, 27648, 27904, 27968, 0, - 16384, 24576, 28672, 27648, 27904, 27968, 27984, 0, - 16384, 24576, 28672, 27648, 27904, 27968, 27984, 0, - 16384, 24576, 28672, 27648, 27904, 27968, 27984, 27986, - 0, 16384, 24576, 28672, 27648, 27904, 27968, 27984, - 0, 16384, 24576, 28672, 27648, 27904, 27968, 27984, - 27988, 0, 16384, 24576, 28672, 27648, 27904, 27968, - 27984, 27988, 0, 16384, 24576, 28672, 27648, 27904, - 27968, 27984, 27992, 27990, 0, 16384, 24576, 28672, - 27648, 27904, 27968, 27984, 0, 16384, 24576, 28672, - 27648, 27904, 27968, 28000, 27992, 0, 16384, 24576, - 28672, 27648, 27904, 27968, 28000, 27992, 0, 16384, - 24576, 28672, 27648, 27904, 27968, 28000, 27992, 27994, - 0, 16384, 24576, 28672, 27648, 27904, 27968, 28000, - 27992, 0, 16384, 24576, 28672, 27648, 27904, 27968, - 28000, 28001, 27996, 0, 16384, 24576, 28672, 27648, - 27904, 27968, 28000, 28001, 27996, 0, 16384, 24576, - 28672, 27648, 27904, 27968, 28000, 28001, 27996, 27998, - 0, 16384, 24576, 28672, 27648, 27904, 27968, 0, - 16384, 24576, 28672, 27648, 27904, 28032, 28000, 0, - 16384, 24576, 28672, 27648, 27904, 28032, 28000, 0, - 16384, 24576, 28672, 27648, 27904, 28032, 28000, 28002, - 0, 16384, 24576, 28672, 27648, 27904, 28032, 28000, - 0, 16384, 24576, 28672, 27648, 27904, 28032, 28000, - 28004, 0, 16384, 24576, 28672, 27648, 27904, 28032, - 28000, 28004, 0, 16384, 24576, 28672, 27648, 27904, - 28032, 28000, 28008, 28006, 0, 16384, 24576, 28672, - 27648, 27904, 28032, 28000, 0, 16384, 24576, 28672, - 27648, 27904, 28032, 28000, 28008, 0, 16384, 24576, - 28672, 27648, 27904, 28032, 28000, 28008, 0, 16384, - 24576, 28672, 27648, 27904, 28032, 28000, 28008, 28010, - 0, 16384, 24576, 28672, 27648, 27904, 28032, 28000, - 28008, 0, 16384, 24576, 28672, 27648, 27904, 28032, - 28000, 28016, 28012, 0, 16384, 24576, 28672, 27648, - 27904, 28032, 28000, 28016, 28012, 0, 16384, 24576, - 28672, 27648, 27904, 28032, 28000, 28016, 28017, 28014, - 0, 16384, 24576, 28672, 27648, 27904, 28032, 28000, - 0, 16384, 24576, 28672, 27648, 27904, 28032, 28033, - 28016, 0, 16384, 24576, 28672, 27648, 27904, 28032, - 28033, 28016, 0, 16384, 24576, 28672, 27648, 27904, - 28032, 28033, 28016, 28018, 0, 16384, 24576, 28672, - 27648, 27904, 28032, 28033, 28016, 0, 16384, 24576, - 28672, 27648, 27904, 28032, 28033, 28016, 28020, 0, - 16384, 24576, 28672, 27648, 27904, 28032, 28033, 28016, - 28020, 0, 16384, 24576, 28672, 27648, 27904, 28032, - 28033, 28016, 28024, 28022, 0, 16384, 24576, 28672, - 27648, 27904, 28032, 28033, 28016, 0, 16384, 24576, - 28672, 27648, 27904, 28032, 28033, 28016, 28024, 0, - 16384, 24576, 28672, 27648, 27904, 28032, 28033, 28035, - 28024, 0, 16384, 24576, 28672, 27648, 27904, 28032, - 28033, 28035, 28024, 28026, 0, 16384, 24576, 28672, - 27648, 27904, 28032, 28033, 28035, 28024, 0, 16384, - 24576, 28672, 27648, 27904, 28032, 28033, 28035, 28024, - 28028, 0, 16384, 24576, 28672, 27648, 27904, 28032, - 28033, 28035, 28024, 28028, 0, 16384, 24576, 28672, - 27648, 27904, 28032, 28033, 28035, 28024, 28028, 28030, - 0, 16384, 24576, 28672, 27648, 27904, 0, 16384, - 24576, 28672, 27648, 28160, 28032, 0, 16384, 24576, - 28672, 27648, 28160, 28032, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 28034, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 0, 16384, 24576, 28672, 27648, - 28160, 28032, 28036, 0, 16384, 24576, 28672, 27648, - 28160, 28032, 28036, 0, 16384, 24576, 28672, 27648, - 28160, 28032, 28040, 28038, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 0, 16384, 24576, 28672, 27648, - 28160, 28032, 28040, 0, 16384, 24576, 28672, 27648, - 28160, 28032, 28040, 0, 16384, 24576, 28672, 27648, - 28160, 28032, 28040, 28042, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 28040, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 28048, 28044, 0, 16384, 24576, - 28672, 27648, 28160, 28032, 28048, 28044, 0, 16384, - 24576, 28672, 27648, 28160, 28032, 28048, 28049, 28046, - 0, 16384, 24576, 28672, 27648, 28160, 28032, 0, - 16384, 24576, 28672, 27648, 28160, 28032, 28048, 0, - 16384, 24576, 28672, 27648, 28160, 28032, 28048, 0, - 16384, 24576, 28672, 27648, 28160, 28032, 28048, 28050, - 0, 16384, 24576, 28672, 27648, 28160, 28032, 28048, - 0, 16384, 24576, 28672, 27648, 28160, 28032, 28048, - 28052, 0, 16384, 24576, 28672, 27648, 28160, 28032, - 28048, 28052, 0, 16384, 24576, 28672, 27648, 28160, - 28032, 28048, 28056, 28054, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 28048, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 28064, 28056, 0, 16384, 24576, - 28672, 27648, 28160, 28032, 28064, 28056, 0, 16384, - 24576, 28672, 27648, 28160, 28032, 28064, 28056, 28058, - 0, 16384, 24576, 28672, 27648, 28160, 28032, 28064, - 28056, 0, 16384, 24576, 28672, 27648, 28160, 28032, - 28064, 28065, 28060, 0, 16384, 24576, 28672, 27648, - 28160, 28032, 28064, 28065, 28060, 0, 16384, 24576, - 28672, 27648, 28160, 28032, 28064, 28065, 28060, 28062, - 0, 16384, 24576, 28672, 27648, 28160, 28032, 0, - 16384, 24576, 28672, 27648, 28160, 28032, 28064, 0, - 16384, 24576, 28672, 27648, 28160, 28032, 28064, 0, - 16384, 24576, 28672, 27648, 28160, 28032, 28064, 28066, - 0, 16384, 24576, 28672, 27648, 28160, 28032, 28064, - 0, 16384, 24576, 28672, 27648, 28160, 28032, 28064, - 28068, 0, 16384, 24576, 28672, 27648, 28160, 28032, - 28064, 28068, 0, 16384, 24576, 28672, 27648, 28160, - 28032, 28064, 28072, 28070, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 28064, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 28064, 28072, 0, 16384, 24576, - 28672, 27648, 28160, 28032, 28064, 28072, 0, 16384, - 24576, 28672, 27648, 28160, 28032, 28064, 28072, 28074, - 0, 16384, 24576, 28672, 27648, 28160, 28032, 28064, - 28072, 0, 16384, 24576, 28672, 27648, 28160, 28032, - 28064, 28080, 28076, 0, 16384, 24576, 28672, 27648, - 28160, 28032, 28064, 28080, 28076, 0, 16384, 24576, - 28672, 27648, 28160, 28032, 28064, 28080, 28081, 28078, - 0, 16384, 24576, 28672, 27648, 28160, 28032, 28064, - 0, 16384, 24576, 28672, 27648, 28160, 28032, 28096, - 28080, 0, 16384, 24576, 28672, 27648, 28160, 28032, - 28096, 28080, 0, 16384, 24576, 28672, 27648, 28160, - 28032, 28096, 28080, 28082, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 28096, 28080, 0, 16384, 24576, - 28672, 27648, 28160, 28032, 28096, 28080, 28084, 0, - 16384, 24576, 28672, 27648, 28160, 28032, 28096, 28080, - 28084, 0, 16384, 24576, 28672, 27648, 28160, 28032, - 28096, 28080, 28088, 28086, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 28096, 28080, 0, 16384, 24576, - 28672, 27648, 28160, 28032, 28096, 28097, 28088, 0, - 16384, 24576, 28672, 27648, 28160, 28032, 28096, 28097, - 28088, 0, 16384, 24576, 28672, 27648, 28160, 28032, - 28096, 28097, 28088, 28090, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 28096, 28097, 28088, 0, 16384, - 24576, 28672, 27648, 28160, 28032, 28096, 28097, 28088, - 28092, 0, 16384, 24576, 28672, 27648, 28160, 28032, - 28096, 28097, 28099, 28092, 0, 16384, 24576, 28672, - 27648, 28160, 28032, 28096, 28097, 28099, 28092, 28094, - 0, 16384, 24576, 28672, 27648, 28160, 28032, 0, - 16384, 24576, 28672, 27648, 28160, 28161, 28096, 0, - 16384, 24576, 28672, 27648, 28160, 28161, 28096, 0, - 16384, 24576, 28672, 27648, 28160, 28161, 28096, 28098, - 0, 16384, 24576, 28672, 27648, 28160, 28161, 28096, - 0, 16384, 24576, 28672, 27648, 28160, 28161, 28096, - 28100, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28096, 28100, 0, 16384, 24576, 28672, 27648, 28160, - 28161, 28096, 28104, 28102, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28096, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28096, 28104, 0, 16384, 24576, - 28672, 27648, 28160, 28161, 28096, 28104, 0, 16384, - 24576, 28672, 27648, 28160, 28161, 28096, 28104, 28106, - 0, 16384, 24576, 28672, 27648, 28160, 28161, 28096, - 28104, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28096, 28112, 28108, 0, 16384, 24576, 28672, 27648, - 28160, 28161, 28096, 28112, 28108, 0, 16384, 24576, - 28672, 27648, 28160, 28161, 28096, 28112, 28113, 28110, - 0, 16384, 24576, 28672, 27648, 28160, 28161, 28096, - 0, 16384, 24576, 28672, 27648, 28160, 28161, 28096, - 28112, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28096, 28112, 0, 16384, 24576, 28672, 27648, 28160, - 28161, 28096, 28112, 28114, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28096, 28112, 0, 16384, 24576, - 28672, 27648, 28160, 28161, 28096, 28112, 28116, 0, - 16384, 24576, 28672, 27648, 28160, 28161, 28096, 28112, - 28116, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28096, 28112, 28120, 28118, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28096, 28112, 0, 16384, 24576, - 28672, 27648, 28160, 28161, 28096, 28128, 28120, 0, - 16384, 24576, 28672, 27648, 28160, 28161, 28096, 28128, - 28120, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28096, 28128, 28120, 28122, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28096, 28128, 28120, 0, 16384, - 24576, 28672, 27648, 28160, 28161, 28096, 28128, 28129, - 28124, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28096, 28128, 28129, 28124, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28096, 28128, 28129, 28124, 28126, - 0, 16384, 24576, 28672, 27648, 28160, 28161, 28096, - 0, 16384, 24576, 28672, 27648, 28160, 28161, 28096, - 28128, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28163, 28128, 0, 16384, 24576, 28672, 27648, 28160, - 28161, 28163, 28128, 28130, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28163, 28128, 0, 16384, 24576, - 28672, 27648, 28160, 28161, 28163, 28128, 28132, 0, - 16384, 24576, 28672, 27648, 28160, 28161, 28163, 28128, - 28132, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28163, 28128, 28136, 28134, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28163, 28128, 0, 16384, 24576, - 28672, 27648, 28160, 28161, 28163, 28128, 28136, 0, - 16384, 24576, 28672, 27648, 28160, 28161, 28163, 28128, - 28136, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28163, 28128, 28136, 28138, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28163, 28128, 28136, 0, 16384, - 24576, 28672, 27648, 28160, 28161, 28163, 28128, 28144, - 28140, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28163, 28128, 28144, 28140, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28163, 28128, 28144, 28145, 28142, - 0, 16384, 24576, 28672, 27648, 28160, 28161, 28163, - 28128, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28163, 28128, 28144, 0, 16384, 24576, 28672, 27648, - 28160, 28161, 28163, 28128, 28144, 0, 16384, 24576, - 28672, 27648, 28160, 28161, 28163, 28128, 28144, 28146, - 0, 16384, 24576, 28672, 27648, 28160, 28161, 28163, - 28167, 28144, 0, 16384, 24576, 28672, 27648, 28160, - 28161, 28163, 28167, 28144, 28148, 0, 16384, 24576, - 28672, 27648, 28160, 28161, 28163, 28167, 28144, 28148, - 0, 16384, 24576, 28672, 27648, 28160, 28161, 28163, - 28167, 28144, 28152, 28150, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28163, 28167, 28144, 0, 16384, - 24576, 28672, 27648, 28160, 28161, 28163, 28167, 28144, - 28152, 0, 16384, 24576, 28672, 27648, 28160, 28161, - 28163, 28167, 28144, 28152, 0, 16384, 24576, 28672, - 27648, 28160, 28161, 28163, 28167, 28144, 28152, 28154, - 0, 16384, 24576, 28672, 27648, 28160, 28161, 28163, - 28167, 28144, 28152, 0, 16384, 24576, 28672, 27648, - 28160, 28161, 28163, 28167, 28144, 28152, 28156, 0, - 16384, 24576, 28672, 27648, 28160, 28161, 28163, 28167, - 28144, 28152, 28156, 0, 16384, 24576, 28672, 27648, - 28160, 28161, 28163, 28167, 28144, 28152, 28156, 28158, - 0, 16384, 24576, 28672, 27648, 0, 16384, 24576, - 28672, 27648, 28160, 0, 16384, 24576, 28672, 28673, - 28160, 0, 16384, 24576, 28672, 28673, 28160, 28162, - 0, 16384, 24576, 28672, 28673, 28160, 0, 16384, - 24576, 28672, 28673, 28160, 28164, 0, 16384, 24576, - 28672, 28673, 28160, 28164, 0, 16384, 24576, 28672, - 28673, 28160, 28168, 28166, 0, 16384, 24576, 28672, - 28673, 28160, 0, 16384, 24576, 28672, 28673, 28160, - 28168, 0, 16384, 24576, 28672, 28673, 28160, 28168, - 0, 16384, 24576, 28672, 28673, 28160, 28168, 28170, - 0, 16384, 24576, 28672, 28673, 28160, 28168, 0, - 16384, 24576, 28672, 28673, 28160, 28176, 28172, 0, - 16384, 24576, 28672, 28673, 28160, 28176, 28172, 0, - 16384, 24576, 28672, 28673, 28160, 28176, 28177, 28174, - 0, 16384, 24576, 28672, 28673, 28160, 0, 16384, - 24576, 28672, 28673, 28160, 28176, 0, 16384, 24576, - 28672, 28673, 28160, 28176, 0, 16384, 24576, 28672, - 28673, 28160, 28176, 28178, 0, 16384, 24576, 28672, - 28673, 28160, 28176, 0, 16384, 24576, 28672, 28673, - 28160, 28176, 28180, 0, 16384, 24576, 28672, 28673, - 28160, 28176, 28180, 0, 16384, 24576, 28672, 28673, - 28160, 28176, 28184, 28182, 0, 16384, 24576, 28672, - 28673, 28160, 28176, 0, 16384, 24576, 28672, 28673, - 28160, 28192, 28184, 0, 16384, 24576, 28672, 28673, - 28160, 28192, 28184, 0, 16384, 24576, 28672, 28673, - 28160, 28192, 28184, 28186, 0, 16384, 24576, 28672, - 28673, 28160, 28192, 28184, 0, 16384, 24576, 28672, - 28673, 28160, 28192, 28193, 28188, 0, 16384, 24576, - 28672, 28673, 28160, 28192, 28193, 28188, 0, 16384, - 24576, 28672, 28673, 28160, 28192, 28193, 28188, 28190, - 0, 16384, 24576, 28672, 28673, 28160, 0, 16384, - 24576, 28672, 28673, 28160, 28192, 0, 16384, 24576, - 28672, 28673, 28160, 28192, 0, 16384, 24576, 28672, - 28673, 28160, 28192, 28194, 0, 16384, 24576, 28672, - 28673, 28160, 28192, 0, 16384, 24576, 28672, 28673, - 28160, 28192, 28196, 0, 16384, 24576, 28672, 28673, - 28160, 28192, 28196, 0, 16384, 24576, 28672, 28673, - 28160, 28192, 28200, 28198, 0, 16384, 24576, 28672, - 28673, 28160, 28192, 0, 16384, 24576, 28672, 28673, - 28160, 28192, 28200, 0, 16384, 24576, 28672, 28673, - 28160, 28192, 28200, 0, 16384, 24576, 28672, 28673, - 28160, 28192, 28200, 28202, 0, 16384, 24576, 28672, - 28673, 28160, 28192, 28200, 0, 16384, 24576, 28672, - 28673, 28160, 28192, 28208, 28204, 0, 16384, 24576, - 28672, 28673, 28160, 28192, 28208, 28204, 0, 16384, - 24576, 28672, 28673, 28160, 28192, 28208, 28209, 28206, - 0, 16384, 24576, 28672, 28673, 28160, 28192, 0, - 16384, 24576, 28672, 28673, 28160, 28224, 28208, 0, - 16384, 24576, 28672, 28673, 28160, 28224, 28208, 0, - 16384, 24576, 28672, 28673, 28160, 28224, 28208, 28210, - 0, 16384, 24576, 28672, 28673, 28160, 28224, 28208, - 0, 16384, 24576, 28672, 28673, 28160, 28224, 28208, - 28212, 0, 16384, 24576, 28672, 28673, 28160, 28224, - 28208, 28212, 0, 16384, 24576, 28672, 28673, 28160, - 28224, 28208, 28216, 28214, 0, 16384, 24576, 28672, - 28673, 28160, 28224, 28208, 0, 16384, 24576, 28672, - 28673, 28160, 28224, 28225, 28216, 0, 16384, 24576, - 28672, 28673, 28160, 28224, 28225, 28216, 0, 16384, - 24576, 28672, 28673, 28160, 28224, 28225, 28216, 28218, - 0, 16384, 24576, 28672, 28673, 28160, 28224, 28225, - 28216, 0, 16384, 24576, 28672, 28673, 28160, 28224, - 28225, 28216, 28220, 0, 16384, 24576, 28672, 28673, - 28160, 28224, 28225, 28227, 28220, 0, 16384, 24576, - 28672, 28673, 28160, 28224, 28225, 28227, 28220, 28222, - 0, 16384, 24576, 28672, 28673, 28160, 0, 16384, - 24576, 28672, 28673, 28160, 28224, 0, 16384, 24576, - 28672, 28673, 28160, 28224, 0, 16384, 24576, 28672, - 28673, 28160, 28224, 28226, 0, 16384, 24576, 28672, - 28673, 28160, 28224, 0, 16384, 24576, 28672, 28673, - 28160, 28224, 28228, 0, 16384, 24576, 28672, 28673, - 28160, 28224, 28228, 0, 16384, 24576, 28672, 28673, - 28160, 28224, 28232, 28230, 0, 16384, 24576, 28672, - 28673, 28160, 28224, 0, 16384, 24576, 28672, 28673, - 28160, 28224, 28232, 0, 16384, 24576, 28672, 28673, - 28160, 28224, 28232, 0, 16384, 24576, 28672, 28673, - 28160, 28224, 28232, 28234, 0, 16384, 24576, 28672, - 28673, 28160, 28224, 28232, 0, 16384, 24576, 28672, - 28673, 28160, 28224, 28240, 28236, 0, 16384, 24576, - 28672, 28673, 28160, 28224, 28240, 28236, 0, 16384, - 24576, 28672, 28673, 28160, 28224, 28240, 28241, 28238, - 0, 16384, 24576, 28672, 28673, 28160, 28224, 0, - 16384, 24576, 28672, 28673, 28160, 28224, 28240, 0, - 16384, 24576, 28672, 28673, 28160, 28224, 28240, 0, - 16384, 24576, 28672, 28673, 28160, 28224, 28240, 28242, - 0, 16384, 24576, 28672, 28673, 28160, 28224, 28240, - 0, 16384, 24576, 28672, 28673, 28160, 28224, 28240, - 28244, 0, 16384, 24576, 28672, 28673, 28160, 28224, - 28240, 28244, 0, 16384, 24576, 28672, 28673, 28160, - 28224, 28240, 28248, 28246, 0, 16384, 24576, 28672, - 28673, 28160, 28224, 28240, 0, 16384, 24576, 28672, - 28673, 28160, 28224, 28256, 28248, 0, 16384, 24576, - 28672, 28673, 28160, 28224, 28256, 28248, 0, 16384, - 24576, 28672, 28673, 28160, 28224, 28256, 28248, 28250, - 0, 16384, 24576, 28672, 28673, 28160, 28224, 28256, - 28248, 0, 16384, 24576, 28672, 28673, 28160, 28224, - 28256, 28257, 28252, 0, 16384, 24576, 28672, 28673, - 28160, 28224, 28256, 28257, 28252, 0, 16384, 24576, - 28672, 28673, 28160, 28224, 28256, 28257, 28252, 28254, - 0, 16384, 24576, 28672, 28673, 28160, 28224, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28256, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28256, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28256, 28258, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28256, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28256, - 28260, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28256, 28260, 0, 16384, 24576, 28672, 28673, 28160, - 28288, 28256, 28264, 28262, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28256, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28256, 28264, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 28256, 28264, 0, 16384, - 24576, 28672, 28673, 28160, 28288, 28256, 28264, 28266, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28256, - 28264, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28256, 28272, 28268, 0, 16384, 24576, 28672, 28673, - 28160, 28288, 28256, 28272, 28268, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 28256, 28272, 28273, 28270, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28256, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28289, - 28272, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28289, 28272, 0, 16384, 24576, 28672, 28673, 28160, - 28288, 28289, 28272, 28274, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28289, 28272, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 28289, 28272, 28276, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28289, 28272, - 28276, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28289, 28272, 28280, 28278, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28289, 28272, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 28289, 28272, 28280, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28289, 28291, - 28280, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28289, 28291, 28280, 28282, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28289, 28291, 28280, 0, 16384, - 24576, 28672, 28673, 28160, 28288, 28289, 28291, 28280, - 28284, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28289, 28291, 28280, 28284, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28289, 28291, 28280, 28284, 28286, - 0, 16384, 24576, 28672, 28673, 28160, 0, 16384, - 24576, 28672, 28673, 28160, 28288, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28290, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 0, 16384, 24576, 28672, 28673, - 28160, 28288, 28292, 0, 16384, 24576, 28672, 28673, - 28160, 28288, 28292, 0, 16384, 24576, 28672, 28673, - 28160, 28288, 28296, 28294, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 0, 16384, 24576, 28672, 28673, - 28160, 28288, 28296, 0, 16384, 24576, 28672, 28673, - 28160, 28288, 28296, 0, 16384, 24576, 28672, 28673, - 28160, 28288, 28296, 28298, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28296, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28304, 28300, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 28304, 28300, 0, 16384, - 24576, 28672, 28673, 28160, 28288, 28304, 28305, 28302, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28304, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28304, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28304, 28306, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28304, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28304, - 28308, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28304, 28308, 0, 16384, 24576, 28672, 28673, 28160, - 28288, 28304, 28312, 28310, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28304, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28320, 28312, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 28320, 28312, 0, 16384, - 24576, 28672, 28673, 28160, 28288, 28320, 28312, 28314, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28320, - 28312, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28320, 28321, 28316, 0, 16384, 24576, 28672, 28673, - 28160, 28288, 28320, 28321, 28316, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 28320, 28321, 28316, 28318, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28320, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28320, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28320, 28322, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28320, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28320, - 28324, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28320, 28324, 0, 16384, 24576, 28672, 28673, 28160, - 28288, 28320, 28328, 28326, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28320, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28320, 28328, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 28320, 28328, 0, 16384, - 24576, 28672, 28673, 28160, 28288, 28320, 28328, 28330, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28320, - 28328, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28320, 28336, 28332, 0, 16384, 24576, 28672, 28673, - 28160, 28288, 28320, 28336, 28332, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 28320, 28336, 28337, 28334, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28320, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 28352, - 28336, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28352, 28336, 0, 16384, 24576, 28672, 28673, 28160, - 28288, 28352, 28336, 28338, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28352, 28336, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 28352, 28336, 28340, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28352, 28336, - 28340, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28352, 28336, 28344, 28342, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28352, 28336, 0, 16384, 24576, - 28672, 28673, 28160, 28288, 28352, 28353, 28344, 0, - 16384, 24576, 28672, 28673, 28160, 28288, 28352, 28353, - 28344, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28352, 28353, 28344, 28346, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28352, 28353, 28344, 0, 16384, - 24576, 28672, 28673, 28160, 28288, 28352, 28353, 28344, - 28348, 0, 16384, 24576, 28672, 28673, 28160, 28288, - 28352, 28353, 28355, 28348, 0, 16384, 24576, 28672, - 28673, 28160, 28288, 28352, 28353, 28355, 28348, 28350, - 0, 16384, 24576, 28672, 28673, 28160, 28288, 0, - 16384, 24576, 28672, 28673, 28160, 28416, 28352, 0, - 16384, 24576, 28672, 28673, 28160, 28416, 28352, 0, - 16384, 24576, 28672, 28673, 28160, 28416, 28352, 28354, - 0, 16384, 24576, 28672, 28673, 28160, 28416, 28352, - 0, 16384, 24576, 28672, 28673, 28160, 28416, 28352, - 28356, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28352, 28356, 0, 16384, 24576, 28672, 28673, 28160, - 28416, 28352, 28360, 28358, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28352, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28352, 28360, 0, 16384, 24576, - 28672, 28673, 28160, 28416, 28352, 28360, 0, 16384, - 24576, 28672, 28673, 28160, 28416, 28352, 28360, 28362, - 0, 16384, 24576, 28672, 28673, 28160, 28416, 28352, - 28360, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28352, 28368, 28364, 0, 16384, 24576, 28672, 28673, - 28160, 28416, 28352, 28368, 28364, 0, 16384, 24576, - 28672, 28673, 28160, 28416, 28352, 28368, 28369, 28366, - 0, 16384, 24576, 28672, 28673, 28160, 28416, 28352, - 0, 16384, 24576, 28672, 28673, 28160, 28416, 28352, - 28368, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28352, 28368, 0, 16384, 24576, 28672, 28673, 28160, - 28416, 28352, 28368, 28370, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28352, 28368, 0, 16384, 24576, - 28672, 28673, 28160, 28416, 28352, 28368, 28372, 0, - 16384, 24576, 28672, 28673, 28160, 28416, 28352, 28368, - 28372, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28352, 28368, 28376, 28374, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28352, 28368, 0, 16384, 24576, - 28672, 28673, 28160, 28416, 28352, 28384, 28376, 0, - 16384, 24576, 28672, 28673, 28160, 28416, 28352, 28384, - 28376, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28352, 28384, 28376, 28378, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28352, 28384, 28376, 0, 16384, - 24576, 28672, 28673, 28160, 28416, 28352, 28384, 28385, - 28380, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28352, 28384, 28385, 28380, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28352, 28384, 28385, 28380, 28382, - 0, 16384, 24576, 28672, 28673, 28160, 28416, 28352, - 0, 16384, 24576, 28672, 28673, 28160, 28416, 28417, - 28384, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28417, 28384, 0, 16384, 24576, 28672, 28673, 28160, - 28416, 28417, 28384, 28386, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28417, 28384, 0, 16384, 24576, - 28672, 28673, 28160, 28416, 28417, 28384, 28388, 0, - 16384, 24576, 28672, 28673, 28160, 28416, 28417, 28384, - 28388, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28417, 28384, 28392, 28390, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28417, 28384, 0, 16384, 24576, - 28672, 28673, 28160, 28416, 28417, 28384, 28392, 0, - 16384, 24576, 28672, 28673, 28160, 28416, 28417, 28384, - 28392, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28417, 28384, 28392, 28394, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28417, 28384, 28392, 0, 16384, - 24576, 28672, 28673, 28160, 28416, 28417, 28384, 28400, - 28396, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28417, 28384, 28400, 28396, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28417, 28384, 28400, 28401, 28398, - 0, 16384, 24576, 28672, 28673, 28160, 28416, 28417, - 28384, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28417, 28384, 28400, 0, 16384, 24576, 28672, 28673, - 28160, 28416, 28417, 28419, 28400, 0, 16384, 24576, - 28672, 28673, 28160, 28416, 28417, 28419, 28400, 28402, - 0, 16384, 24576, 28672, 28673, 28160, 28416, 28417, - 28419, 28400, 0, 16384, 24576, 28672, 28673, 28160, - 28416, 28417, 28419, 28400, 28404, 0, 16384, 24576, - 28672, 28673, 28160, 28416, 28417, 28419, 28400, 28404, - 0, 16384, 24576, 28672, 28673, 28160, 28416, 28417, - 28419, 28400, 28408, 28406, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28417, 28419, 28400, 0, 16384, - 24576, 28672, 28673, 28160, 28416, 28417, 28419, 28400, - 28408, 0, 16384, 24576, 28672, 28673, 28160, 28416, - 28417, 28419, 28400, 28408, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28417, 28419, 28400, 28408, 28410, - 0, 16384, 24576, 28672, 28673, 28160, 28416, 28417, - 28419, 28423, 28408, 0, 16384, 24576, 28672, 28673, - 28160, 28416, 28417, 28419, 28423, 28408, 28412, 0, - 16384, 24576, 28672, 28673, 28160, 28416, 28417, 28419, - 28423, 28408, 28412, 0, 16384, 24576, 28672, 28673, - 28160, 28416, 28417, 28419, 28423, 28408, 28412, 28414, - 0, 16384, 24576, 28672, 28673, 28160, 0, 16384, - 24576, 28672, 28673, 28160, 28416, 0, 16384, 24576, - 28672, 28673, 28160, 28416, 0, 16384, 24576, 28672, - 28673, 28160, 28416, 28418, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28420, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28420, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28424, 28422, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28424, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28424, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28424, 28426, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28424, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28432, 28428, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28432, 28428, 0, 16384, - 24576, 28672, 28673, 28675, 28416, 28432, 28433, 28430, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28432, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28432, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28432, 28434, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28432, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28432, - 28436, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28432, 28436, 0, 16384, 24576, 28672, 28673, 28675, - 28416, 28432, 28440, 28438, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28432, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28448, 28440, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28448, 28440, 0, 16384, - 24576, 28672, 28673, 28675, 28416, 28448, 28440, 28442, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28448, - 28440, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28448, 28449, 28444, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28448, 28449, 28444, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28448, 28449, 28444, 28446, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28448, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28448, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28448, 28450, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28448, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28448, - 28452, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28448, 28452, 0, 16384, 24576, 28672, 28673, 28675, - 28416, 28448, 28456, 28454, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28448, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28448, 28456, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28448, 28456, 0, 16384, - 24576, 28672, 28673, 28675, 28416, 28448, 28456, 28458, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28448, - 28456, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28448, 28464, 28460, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28448, 28464, 28460, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28448, 28464, 28465, 28462, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28448, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28480, - 28464, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28480, 28464, 0, 16384, 24576, 28672, 28673, 28675, - 28416, 28480, 28464, 28466, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28480, 28464, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28480, 28464, 28468, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28480, 28464, - 28468, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28480, 28464, 28472, 28470, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28480, 28464, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28480, 28481, 28472, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28480, 28481, - 28472, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28480, 28481, 28472, 28474, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28480, 28481, 28472, 0, 16384, - 24576, 28672, 28673, 28675, 28416, 28480, 28481, 28472, - 28476, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28480, 28481, 28483, 28476, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28480, 28481, 28483, 28476, 28478, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28480, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28480, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28480, 28482, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28480, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28480, - 28484, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28480, 28484, 0, 16384, 24576, 28672, 28673, 28675, - 28416, 28480, 28488, 28486, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28480, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28480, 28488, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28480, 28488, 0, 16384, - 24576, 28672, 28673, 28675, 28416, 28480, 28488, 28490, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28480, - 28488, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28480, 28496, 28492, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28480, 28496, 28492, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28480, 28496, 28497, 28494, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28480, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28480, - 28496, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28480, 28496, 0, 16384, 24576, 28672, 28673, 28675, - 28416, 28480, 28496, 28498, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28480, 28496, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28480, 28496, 28500, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28480, 28496, - 28500, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28480, 28496, 28504, 28502, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28480, 28496, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28480, 28512, 28504, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28480, 28512, - 28504, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28480, 28512, 28504, 28506, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28480, 28512, 28504, 0, 16384, - 24576, 28672, 28673, 28675, 28416, 28480, 28512, 28513, - 28508, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28480, 28512, 28513, 28508, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28480, 28512, 28513, 28508, 28510, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28480, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28544, - 28512, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28544, 28512, 0, 16384, 24576, 28672, 28673, 28675, - 28416, 28544, 28512, 28514, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28544, 28512, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28544, 28512, 28516, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28544, 28512, - 28516, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28544, 28512, 28520, 28518, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28544, 28512, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28544, 28512, 28520, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28544, 28512, - 28520, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28544, 28512, 28520, 28522, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28544, 28512, 28520, 0, 16384, - 24576, 28672, 28673, 28675, 28416, 28544, 28512, 28528, - 28524, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28544, 28512, 28528, 28524, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28544, 28512, 28528, 28529, 28526, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28544, - 28512, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28544, 28545, 28528, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28544, 28545, 28528, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28544, 28545, 28528, 28530, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28544, - 28545, 28528, 0, 16384, 24576, 28672, 28673, 28675, - 28416, 28544, 28545, 28528, 28532, 0, 16384, 24576, - 28672, 28673, 28675, 28416, 28544, 28545, 28528, 28532, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28544, - 28545, 28528, 28536, 28534, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28544, 28545, 28528, 0, 16384, - 24576, 28672, 28673, 28675, 28416, 28544, 28545, 28528, - 28536, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28544, 28545, 28547, 28536, 0, 16384, 24576, 28672, - 28673, 28675, 28416, 28544, 28545, 28547, 28536, 28538, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28544, - 28545, 28547, 28536, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28544, 28545, 28547, 28536, 28540, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28544, 28545, - 28547, 28536, 28540, 0, 16384, 24576, 28672, 28673, - 28675, 28416, 28544, 28545, 28547, 28536, 28540, 28542, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28544, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28544, 0, - 16384, 24576, 28672, 28673, 28675, 28416, 28544, 28546, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28544, - 0, 16384, 24576, 28672, 28673, 28675, 28416, 28544, - 28548, 0, 16384, 24576, 28672, 28673, 28675, 28416, - 28544, 28548, 0, 16384, 24576, 28672, 28673, 28675, - 28416, 28544, 28552, 28550, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28552, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28544, 28552, 0, 16384, - 24576, 28672, 28673, 28675, 28679, 28544, 28552, 28554, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28544, - 28552, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28560, 28556, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28544, 28560, 28556, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28544, 28560, 28561, 28558, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28544, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28544, - 28560, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28560, 0, 16384, 24576, 28672, 28673, 28675, - 28679, 28544, 28560, 28562, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28560, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28544, 28560, 28564, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28544, 28560, - 28564, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28560, 28568, 28566, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28560, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28544, 28576, 28568, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28544, 28576, - 28568, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28576, 28568, 28570, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28576, 28568, 0, 16384, - 24576, 28672, 28673, 28675, 28679, 28544, 28576, 28577, - 28572, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28576, 28577, 28572, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28576, 28577, 28572, 28574, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28544, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28544, - 28576, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28576, 0, 16384, 24576, 28672, 28673, 28675, - 28679, 28544, 28576, 28578, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28576, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28544, 28576, 28580, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28544, 28576, - 28580, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28576, 28584, 28582, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28576, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28544, 28576, 28584, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28544, 28576, - 28584, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28576, 28584, 28586, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28576, 28584, 0, 16384, - 24576, 28672, 28673, 28675, 28679, 28544, 28576, 28592, - 28588, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28576, 28592, 28588, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28576, 28592, 28593, 28590, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28544, - 28576, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28608, 28592, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28544, 28608, 28592, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28544, 28608, 28592, 28594, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28544, - 28608, 28592, 0, 16384, 24576, 28672, 28673, 28675, - 28679, 28544, 28608, 28592, 28596, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28544, 28608, 28592, 28596, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28544, - 28608, 28592, 28600, 28598, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28608, 28592, 0, 16384, - 24576, 28672, 28673, 28675, 28679, 28544, 28608, 28609, - 28600, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28608, 28609, 28600, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28608, 28609, 28600, 28602, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28544, - 28608, 28609, 28600, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28544, 28608, 28609, 28600, 28604, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28544, 28608, - 28609, 28611, 28604, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28544, 28608, 28609, 28611, 28604, 28606, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28544, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28544, - 28608, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28608, 0, 16384, 24576, 28672, 28673, 28675, - 28679, 28544, 28608, 28610, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28608, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28544, 28608, 28612, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28544, 28608, - 28612, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28608, 28616, 28614, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28608, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28544, 28608, 28616, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28544, 28608, - 28616, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28608, 28616, 28618, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28608, 28616, 0, 16384, - 24576, 28672, 28673, 28675, 28679, 28544, 28608, 28624, - 28620, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28544, 28608, 28624, 28620, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28544, 28608, 28624, 28625, 28622, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28687, - 28608, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28687, 28608, 28624, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28687, 28608, 28624, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28687, 28608, 28624, 28626, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28687, - 28608, 28624, 0, 16384, 24576, 28672, 28673, 28675, - 28679, 28687, 28608, 28624, 28628, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28687, 28608, 28624, 28628, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28687, - 28608, 28624, 28632, 28630, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28687, 28608, 28624, 0, 16384, - 24576, 28672, 28673, 28675, 28679, 28687, 28608, 28640, - 28632, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28687, 28608, 28640, 28632, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28687, 28608, 28640, 28632, 28634, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28687, - 28608, 28640, 28632, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28687, 28608, 28640, 28641, 28636, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28687, 28608, - 28640, 28641, 28636, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28687, 28608, 28640, 28641, 28636, 28638, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28687, - 28608, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28687, 28608, 28640, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28687, 28608, 28640, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28687, 28608, 28640, 28642, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28687, - 28608, 28640, 0, 16384, 24576, 28672, 28673, 28675, - 28679, 28687, 28608, 28640, 28644, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28687, 28608, 28640, 28644, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28687, - 28608, 28640, 28648, 28646, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28687, 28608, 28640, 0, 16384, - 24576, 28672, 28673, 28675, 28679, 28687, 28608, 28640, - 28648, 0, 16384, 24576, 28672, 28673, 28675, 28679, - 28687, 28608, 28640, 28648, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28687, 28608, 28640, 28648, 28650, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28687, - 28608, 28640, 28648, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28687, 28608, 28640, 28656, 28652, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28687, 28608, - 28640, 28656, 28652, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28687, 28608, 28640, 28656, 28657, 28654, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28687, - 28608, 28640, 0, 16384, 24576, 28672, 28673, 28675, - 28679, 28687, 28608, 28640, 28656, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28687, 28608, 28640, 28656, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28687, - 28608, 28640, 28656, 28658, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28687, 28608, 28640, 28656, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28687, 28608, - 28640, 28656, 28660, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28687, 28608, 28640, 28656, 28660, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28687, 28608, - 28640, 28656, 28664, 28662, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28687, 28608, 28640, 28656, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28687, 28608, - 28640, 28656, 28664, 0, 16384, 24576, 28672, 28673, - 28675, 28679, 28687, 28608, 28640, 28656, 28664, 0, - 16384, 24576, 28672, 28673, 28675, 28679, 28687, 28608, - 28640, 28656, 28664, 28666, 0, 16384, 24576, 28672, - 28673, 28675, 28679, 28687, 28608, 28640, 28656, 28664, - 0, 16384, 24576, 28672, 28673, 28675, 28679, 28687, - 28608, 28640, 28656, 28664, 28668, 0, 16384, 24576, - 28672, 28673, 28675, 28679, 28687, 28608, 28640, 28656, - 28664, 28668, 0, 16384, 24576, 28672, 28673, 28675, - 28679, 28687, 28608, 28640, 28656, 28664, 28668, 28670, - 0, 16384, 24576, 0, 16384, 24576, 28672, 0, - 16384, 24576, 28672, 0, 16384, 24576, 28672, 28674, - 0, 16384, 24576, 28672, 0, 16384, 24576, 28672, - 28676, 0, 16384, 24576, 28672, 28676, 0, 16384, - 24576, 28672, 28680, 28678, 0, 16384, 24576, 28672, - 0, 16384, 24576, 28672, 28680, 0, 16384, 24576, - 28672, 28680, 0, 16384, 24576, 28672, 28680, 28682, - 0, 16384, 24576, 28672, 28680, 0, 16384, 24576, - 28672, 28688, 28684, 0, 16384, 24576, 28672, 28688, - 28684, 0, 16384, 24576, 28672, 28688, 28689, 28686, - 0, 16384, 24576, 28672, 0, 16384, 24576, 28672, - 28688, 0, 16384, 24576, 28672, 28688, 0, 16384, - 24576, 28672, 28688, 28690, 0, 16384, 24576, 28672, - 28688, 0, 16384, 24576, 28672, 28688, 28692, 0, - 16384, 24576, 28672, 28688, 28692, 0, 16384, 24576, - 28672, 28688, 28696, 28694, 0, 16384, 24576, 28672, - 28688, 0, 16384, 24576, 28672, 28704, 28696, 0, - 16384, 24576, 28672, 28704, 28696, 0, 16384, 24576, - 28672, 28704, 28696, 28698, 0, 16384, 24576, 28672, - 28704, 28696, 0, 16384, 24576, 28672, 28704, 28705, - 28700, 0, 16384, 24576, 28672, 28704, 28705, 28700, - 0, 16384, 24576, 28672, 28704, 28705, 28700, 28702, - 0, 16384, 24576, 28672, 0, 16384, 24576, 28672, - 28704, 0, 16384, 24576, 28672, 28704, 0, 16384, - 24576, 28672, 28704, 28706, 0, 16384, 24576, 28672, - 28704, 0, 16384, 24576, 28672, 28704, 28708, 0, - 16384, 24576, 28672, 28704, 28708, 0, 16384, 24576, - 28672, 28704, 28712, 28710, 0, 16384, 24576, 28672, - 28704, 0, 16384, 24576, 28672, 28704, 28712, 0, - 16384, 24576, 28672, 28704, 28712, 0, 16384, 24576, - 28672, 28704, 28712, 28714, 0, 16384, 24576, 28672, - 28704, 28712, 0, 16384, 24576, 28672, 28704, 28720, - 28716, 0, 16384, 24576, 28672, 28704, 28720, 28716, - 0, 16384, 24576, 28672, 28704, 28720, 28721, 28718, - 0, 16384, 24576, 28672, 28704, 0, 16384, 24576, - 28672, 28736, 28720, 0, 16384, 24576, 28672, 28736, - 28720, 0, 16384, 24576, 28672, 28736, 28720, 28722, - 0, 16384, 24576, 28672, 28736, 28720, 0, 16384, - 24576, 28672, 28736, 28720, 28724, 0, 16384, 24576, - 28672, 28736, 28720, 28724, 0, 16384, 24576, 28672, - 28736, 28720, 28728, 28726, 0, 16384, 24576, 28672, - 28736, 28720, 0, 16384, 24576, 28672, 28736, 28737, - 28728, 0, 16384, 24576, 28672, 28736, 28737, 28728, - 0, 16384, 24576, 28672, 28736, 28737, 28728, 28730, - 0, 16384, 24576, 28672, 28736, 28737, 28728, 0, - 16384, 24576, 28672, 28736, 28737, 28728, 28732, 0, - 16384, 24576, 28672, 28736, 28737, 28739, 28732, 0, - 16384, 24576, 28672, 28736, 28737, 28739, 28732, 28734, - 0, 16384, 24576, 28672, 0, 16384, 24576, 28672, - 28736, 0, 16384, 24576, 28672, 28736, 0, 16384, - 24576, 28672, 28736, 28738, 0, 16384, 24576, 28672, - 28736, 0, 16384, 24576, 28672, 28736, 28740, 0, - 16384, 24576, 28672, 28736, 28740, 0, 16384, 24576, - 28672, 28736, 28744, 28742, 0, 16384, 24576, 28672, - 28736, 0, 16384, 24576, 28672, 28736, 28744, 0, - 16384, 24576, 28672, 28736, 28744, 0, 16384, 24576, - 28672, 28736, 28744, 28746, 0, 16384, 24576, 28672, - 28736, 28744, 0, 16384, 24576, 28672, 28736, 28752, - 28748, 0, 16384, 24576, 28672, 28736, 28752, 28748, - 0, 16384, 24576, 28672, 28736, 28752, 28753, 28750, - 0, 16384, 24576, 28672, 28736, 0, 16384, 24576, - 28672, 28736, 28752, 0, 16384, 24576, 28672, 28736, - 28752, 0, 16384, 24576, 28672, 28736, 28752, 28754, - 0, 16384, 24576, 28672, 28736, 28752, 0, 16384, - 24576, 28672, 28736, 28752, 28756, 0, 16384, 24576, - 28672, 28736, 28752, 28756, 0, 16384, 24576, 28672, - 28736, 28752, 28760, 28758, 0, 16384, 24576, 28672, - 28736, 28752, 0, 16384, 24576, 28672, 28736, 28768, - 28760, 0, 16384, 24576, 28672, 28736, 28768, 28760, - 0, 16384, 24576, 28672, 28736, 28768, 28760, 28762, - 0, 16384, 24576, 28672, 28736, 28768, 28760, 0, - 16384, 24576, 28672, 28736, 28768, 28769, 28764, 0, - 16384, 24576, 28672, 28736, 28768, 28769, 28764, 0, - 16384, 24576, 28672, 28736, 28768, 28769, 28764, 28766, - 0, 16384, 24576, 28672, 28736, 0, 16384, 24576, - 28672, 28800, 28768, 0, 16384, 24576, 28672, 28800, - 28768, 0, 16384, 24576, 28672, 28800, 28768, 28770, - 0, 16384, 24576, 28672, 28800, 28768, 0, 16384, - 24576, 28672, 28800, 28768, 28772, 0, 16384, 24576, - 28672, 28800, 28768, 28772, 0, 16384, 24576, 28672, - 28800, 28768, 28776, 28774, 0, 16384, 24576, 28672, - 28800, 28768, 0, 16384, 24576, 28672, 28800, 28768, - 28776, 0, 16384, 24576, 28672, 28800, 28768, 28776, - 0, 16384, 24576, 28672, 28800, 28768, 28776, 28778, - 0, 16384, 24576, 28672, 28800, 28768, 28776, 0, - 16384, 24576, 28672, 28800, 28768, 28784, 28780, 0, - 16384, 24576, 28672, 28800, 28768, 28784, 28780, 0, - 16384, 24576, 28672, 28800, 28768, 28784, 28785, 28782, - 0, 16384, 24576, 28672, 28800, 28768, 0, 16384, - 24576, 28672, 28800, 28801, 28784, 0, 16384, 24576, - 28672, 28800, 28801, 28784, 0, 16384, 24576, 28672, - 28800, 28801, 28784, 28786, 0, 16384, 24576, 28672, - 28800, 28801, 28784, 0, 16384, 24576, 28672, 28800, - 28801, 28784, 28788, 0, 16384, 24576, 28672, 28800, - 28801, 28784, 28788, 0, 16384, 24576, 28672, 28800, - 28801, 28784, 28792, 28790, 0, 16384, 24576, 28672, - 28800, 28801, 28784, 0, 16384, 24576, 28672, 28800, - 28801, 28784, 28792, 0, 16384, 24576, 28672, 28800, - 28801, 28803, 28792, 0, 16384, 24576, 28672, 28800, - 28801, 28803, 28792, 28794, 0, 16384, 24576, 28672, - 28800, 28801, 28803, 28792, 0, 16384, 24576, 28672, - 28800, 28801, 28803, 28792, 28796, 0, 16384, 24576, - 28672, 28800, 28801, 28803, 28792, 28796, 0, 16384, - 24576, 28672, 28800, 28801, 28803, 28792, 28796, 28798, - 0, 16384, 24576, 28672, 0, 16384, 24576, 28672, - 28800, 0, 16384, 24576, 28672, 28800, 0, 16384, - 24576, 28672, 28800, 28802, 0, 16384, 24576, 28672, - 28800, 0, 16384, 24576, 28672, 28800, 28804, 0, - 16384, 24576, 28672, 28800, 28804, 0, 16384, 24576, - 28672, 28800, 28808, 28806, 0, 16384, 24576, 28672, - 28800, 0, 16384, 24576, 28672, 28800, 28808, 0, - 16384, 24576, 28672, 28800, 28808, 0, 16384, 24576, - 28672, 28800, 28808, 28810, 0, 16384, 24576, 28672, - 28800, 28808, 0, 16384, 24576, 28672, 28800, 28816, - 28812, 0, 16384, 24576, 28672, 28800, 28816, 28812, - 0, 16384, 24576, 28672, 28800, 28816, 28817, 28814, - 0, 16384, 24576, 28672, 28800, 0, 16384, 24576, - 28672, 28800, 28816, 0, 16384, 24576, 28672, 28800, - 28816, 0, 16384, 24576, 28672, 28800, 28816, 28818, - 0, 16384, 24576, 28672, 28800, 28816, 0, 16384, - 24576, 28672, 28800, 28816, 28820, 0, 16384, 24576, - 28672, 28800, 28816, 28820, 0, 16384, 24576, 28672, - 28800, 28816, 28824, 28822, 0, 16384, 24576, 28672, - 28800, 28816, 0, 16384, 24576, 28672, 28800, 28832, - 28824, 0, 16384, 24576, 28672, 28800, 28832, 28824, - 0, 16384, 24576, 28672, 28800, 28832, 28824, 28826, - 0, 16384, 24576, 28672, 28800, 28832, 28824, 0, - 16384, 24576, 28672, 28800, 28832, 28833, 28828, 0, - 16384, 24576, 28672, 28800, 28832, 28833, 28828, 0, - 16384, 24576, 28672, 28800, 28832, 28833, 28828, 28830, - 0, 16384, 24576, 28672, 28800, 0, 16384, 24576, - 28672, 28800, 28832, 0, 16384, 24576, 28672, 28800, - 28832, 0, 16384, 24576, 28672, 28800, 28832, 28834, - 0, 16384, 24576, 28672, 28800, 28832, 0, 16384, - 24576, 28672, 28800, 28832, 28836, 0, 16384, 24576, - 28672, 28800, 28832, 28836, 0, 16384, 24576, 28672, - 28800, 28832, 28840, 28838, 0, 16384, 24576, 28672, - 28800, 28832, 0, 16384, 24576, 28672, 28800, 28832, - 28840, 0, 16384, 24576, 28672, 28800, 28832, 28840, - 0, 16384, 24576, 28672, 28800, 28832, 28840, 28842, - 0, 16384, 24576, 28672, 28800, 28832, 28840, 0, - 16384, 24576, 28672, 28800, 28832, 28848, 28844, 0, - 16384, 24576, 28672, 28800, 28832, 28848, 28844, 0, - 16384, 24576, 28672, 28800, 28832, 28848, 28849, 28846, - 0, 16384, 24576, 28672, 28800, 28832, 0, 16384, - 24576, 28672, 28800, 28864, 28848, 0, 16384, 24576, - 28672, 28800, 28864, 28848, 0, 16384, 24576, 28672, - 28800, 28864, 28848, 28850, 0, 16384, 24576, 28672, - 28800, 28864, 28848, 0, 16384, 24576, 28672, 28800, - 28864, 28848, 28852, 0, 16384, 24576, 28672, 28800, - 28864, 28848, 28852, 0, 16384, 24576, 28672, 28800, - 28864, 28848, 28856, 28854, 0, 16384, 24576, 28672, - 28800, 28864, 28848, 0, 16384, 24576, 28672, 28800, - 28864, 28865, 28856, 0, 16384, 24576, 28672, 28800, - 28864, 28865, 28856, 0, 16384, 24576, 28672, 28800, - 28864, 28865, 28856, 28858, 0, 16384, 24576, 28672, - 28800, 28864, 28865, 28856, 0, 16384, 24576, 28672, - 28800, 28864, 28865, 28856, 28860, 0, 16384, 24576, - 28672, 28800, 28864, 28865, 28867, 28860, 0, 16384, - 24576, 28672, 28800, 28864, 28865, 28867, 28860, 28862, - 0, 16384, 24576, 28672, 28800, 0, 16384, 24576, - 28672, 28928, 28864, 0, 16384, 24576, 28672, 28928, - 28864, 0, 16384, 24576, 28672, 28928, 28864, 28866, - 0, 16384, 24576, 28672, 28928, 28864, 0, 16384, - 24576, 28672, 28928, 28864, 28868, 0, 16384, 24576, - 28672, 28928, 28864, 28868, 0, 16384, 24576, 28672, - 28928, 28864, 28872, 28870, 0, 16384, 24576, 28672, - 28928, 28864, 0, 16384, 24576, 28672, 28928, 28864, - 28872, 0, 16384, 24576, 28672, 28928, 28864, 28872, - 0, 16384, 24576, 28672, 28928, 28864, 28872, 28874, - 0, 16384, 24576, 28672, 28928, 28864, 28872, 0, - 16384, 24576, 28672, 28928, 28864, 28880, 28876, 0, - 16384, 24576, 28672, 28928, 28864, 28880, 28876, 0, - 16384, 24576, 28672, 28928, 28864, 28880, 28881, 28878, - 0, 16384, 24576, 28672, 28928, 28864, 0, 16384, - 24576, 28672, 28928, 28864, 28880, 0, 16384, 24576, - 28672, 28928, 28864, 28880, 0, 16384, 24576, 28672, - 28928, 28864, 28880, 28882, 0, 16384, 24576, 28672, - 28928, 28864, 28880, 0, 16384, 24576, 28672, 28928, - 28864, 28880, 28884, 0, 16384, 24576, 28672, 28928, - 28864, 28880, 28884, 0, 16384, 24576, 28672, 28928, - 28864, 28880, 28888, 28886, 0, 16384, 24576, 28672, - 28928, 28864, 28880, 0, 16384, 24576, 28672, 28928, - 28864, 28896, 28888, 0, 16384, 24576, 28672, 28928, - 28864, 28896, 28888, 0, 16384, 24576, 28672, 28928, - 28864, 28896, 28888, 28890, 0, 16384, 24576, 28672, - 28928, 28864, 28896, 28888, 0, 16384, 24576, 28672, - 28928, 28864, 28896, 28897, 28892, 0, 16384, 24576, - 28672, 28928, 28864, 28896, 28897, 28892, 0, 16384, - 24576, 28672, 28928, 28864, 28896, 28897, 28892, 28894, - 0, 16384, 24576, 28672, 28928, 28864, 0, 16384, - 24576, 28672, 28928, 28929, 28896, 0, 16384, 24576, - 28672, 28928, 28929, 28896, 0, 16384, 24576, 28672, - 28928, 28929, 28896, 28898, 0, 16384, 24576, 28672, - 28928, 28929, 28896, 0, 16384, 24576, 28672, 28928, - 28929, 28896, 28900, 0, 16384, 24576, 28672, 28928, - 28929, 28896, 28900, 0, 16384, 24576, 28672, 28928, - 28929, 28896, 28904, 28902, 0, 16384, 24576, 28672, - 28928, 28929, 28896, 0, 16384, 24576, 28672, 28928, - 28929, 28896, 28904, 0, 16384, 24576, 28672, 28928, - 28929, 28896, 28904, 0, 16384, 24576, 28672, 28928, - 28929, 28896, 28904, 28906, 0, 16384, 24576, 28672, - 28928, 28929, 28896, 28904, 0, 16384, 24576, 28672, - 28928, 28929, 28896, 28912, 28908, 0, 16384, 24576, - 28672, 28928, 28929, 28896, 28912, 28908, 0, 16384, - 24576, 28672, 28928, 28929, 28896, 28912, 28913, 28910, - 0, 16384, 24576, 28672, 28928, 28929, 28896, 0, - 16384, 24576, 28672, 28928, 28929, 28896, 28912, 0, - 16384, 24576, 28672, 28928, 28929, 28931, 28912, 0, - 16384, 24576, 28672, 28928, 28929, 28931, 28912, 28914, - 0, 16384, 24576, 28672, 28928, 28929, 28931, 28912, - 0, 16384, 24576, 28672, 28928, 28929, 28931, 28912, - 28916, 0, 16384, 24576, 28672, 28928, 28929, 28931, - 28912, 28916, 0, 16384, 24576, 28672, 28928, 28929, - 28931, 28912, 28920, 28918, 0, 16384, 24576, 28672, - 28928, 28929, 28931, 28912, 0, 16384, 24576, 28672, - 28928, 28929, 28931, 28912, 28920, 0, 16384, 24576, - 28672, 28928, 28929, 28931, 28912, 28920, 0, 16384, - 24576, 28672, 28928, 28929, 28931, 28912, 28920, 28922, - 0, 16384, 24576, 28672, 28928, 28929, 28931, 28935, - 28920, 0, 16384, 24576, 28672, 28928, 28929, 28931, - 28935, 28920, 28924, 0, 16384, 24576, 28672, 28928, - 28929, 28931, 28935, 28920, 28924, 0, 16384, 24576, - 28672, 28928, 28929, 28931, 28935, 28920, 28924, 28926, - 0, 16384, 24576, 28672, 0, 16384, 24576, 28672, - 28928, 0, 16384, 24576, 28672, 28928, 0, 16384, - 24576, 28672, 28928, 28930, 0, 16384, 24576, 28672, - 28928, 0, 16384, 24576, 28672, 28928, 28932, 0, - 16384, 24576, 28672, 28928, 28932, 0, 16384, 24576, - 28672, 28928, 28936, 28934, 0, 16384, 24576, 28672, - 28928, 0, 16384, 24576, 28672, 28928, 28936, 0, - 16384, 24576, 28672, 28928, 28936, 0, 16384, 24576, - 28672, 28928, 28936, 28938, 0, 16384, 24576, 28672, - 28928, 28936, 0, 16384, 24576, 28672, 28928, 28944, - 28940, 0, 16384, 24576, 28672, 28928, 28944, 28940, - 0, 16384, 24576, 28672, 28928, 28944, 28945, 28942, - 0, 16384, 24576, 28672, 28928, 0, 16384, 24576, - 28672, 28928, 28944, 0, 16384, 24576, 28672, 28928, - 28944, 0, 16384, 24576, 28672, 28928, 28944, 28946, - 0, 16384, 24576, 28672, 28928, 28944, 0, 16384, - 24576, 28672, 28928, 28944, 28948, 0, 16384, 24576, - 28672, 28928, 28944, 28948, 0, 16384, 24576, 28672, - 28928, 28944, 28952, 28950, 0, 16384, 24576, 28672, - 28928, 28944, 0, 16384, 24576, 28672, 28928, 28960, - 28952, 0, 16384, 24576, 28672, 28928, 28960, 28952, - 0, 16384, 24576, 28672, 28928, 28960, 28952, 28954, - 0, 16384, 24576, 28672, 28928, 28960, 28952, 0, - 16384, 24576, 28672, 28928, 28960, 28961, 28956, 0, - 16384, 24576, 28672, 28928, 28960, 28961, 28956, 0, - 16384, 24576, 28672, 28928, 28960, 28961, 28956, 28958, - 0, 16384, 24576, 28672, 28928, 0, 16384, 24576, - 28672, 28928, 28960, 0, 16384, 24576, 28672, 28928, - 28960, 0, 16384, 24576, 28672, 28928, 28960, 28962, - 0, 16384, 24576, 28672, 28928, 28960, 0, 16384, - 24576, 28672, 28928, 28960, 28964, 0, 16384, 24576, - 28672, 28928, 28960, 28964, 0, 16384, 24576, 28672, - 28928, 28960, 28968, 28966, 0, 16384, 24576, 28672, - 28928, 28960, 0, 16384, 24576, 28672, 28928, 28960, - 28968, 0, 16384, 24576, 28672, 28928, 28960, 28968, - 0, 16384, 24576, 28672, 28928, 28960, 28968, 28970, - 0, 16384, 24576, 28672, 28928, 28960, 28968, 0, - 16384, 24576, 28672, 28928, 28960, 28976, 28972, 0, - 16384, 24576, 28672, 28928, 28960, 28976, 28972, 0, - 16384, 24576, 28672, 28928, 28960, 28976, 28977, 28974, - 0, 16384, 24576, 28672, 28928, 28960, 0, 16384, - 24576, 28672, 28928, 28992, 28976, 0, 16384, 24576, - 28672, 28928, 28992, 28976, 0, 16384, 24576, 28672, - 28928, 28992, 28976, 28978, 0, 16384, 24576, 28672, - 28928, 28992, 28976, 0, 16384, 24576, 28672, 28928, - 28992, 28976, 28980, 0, 16384, 24576, 28672, 28928, - 28992, 28976, 28980, 0, 16384, 24576, 28672, 28928, - 28992, 28976, 28984, 28982, 0, 16384, 24576, 28672, - 28928, 28992, 28976, 0, 16384, 24576, 28672, 28928, - 28992, 28993, 28984, 0, 16384, 24576, 28672, 28928, - 28992, 28993, 28984, 0, 16384, 24576, 28672, 28928, - 28992, 28993, 28984, 28986, 0, 16384, 24576, 28672, - 28928, 28992, 28993, 28984, 0, 16384, 24576, 28672, - 28928, 28992, 28993, 28984, 28988, 0, 16384, 24576, - 28672, 28928, 28992, 28993, 28995, 28988, 0, 16384, - 24576, 28672, 28928, 28992, 28993, 28995, 28988, 28990, - 0, 16384, 24576, 28672, 28928, 0, 16384, 24576, - 28672, 28928, 28992, 0, 16384, 24576, 28672, 28928, - 28992, 0, 16384, 24576, 28672, 28928, 28992, 28994, - 0, 16384, 24576, 28672, 28928, 28992, 0, 16384, - 24576, 28672, 28928, 28992, 28996, 0, 16384, 24576, - 28672, 28928, 28992, 28996, 0, 16384, 24576, 28672, - 28928, 28992, 29000, 28998, 0, 16384, 24576, 28672, - 28928, 28992, 0, 16384, 24576, 28672, 28928, 28992, - 29000, 0, 16384, 24576, 28672, 28928, 28992, 29000, - 0, 16384, 24576, 28672, 28928, 28992, 29000, 29002, - 0, 16384, 24576, 28672, 28928, 28992, 29000, 0, - 16384, 24576, 28672, 28928, 28992, 29008, 29004, 0, - 16384, 24576, 28672, 28928, 28992, 29008, 29004, 0, - 16384, 24576, 28672, 28928, 28992, 29008, 29009, 29006, - 0, 16384, 24576, 28672, 28928, 28992, 0, 16384, - 24576, 28672, 28928, 28992, 29008, 0, 16384, 24576, - 28672, 28928, 28992, 29008, 0, 16384, 24576, 28672, - 28928, 28992, 29008, 29010, 0, 16384, 24576, 28672, - 28928, 28992, 29008, 0, 16384, 24576, 28672, 28928, - 28992, 29008, 29012, 0, 16384, 24576, 28672, 28928, - 28992, 29008, 29012, 0, 16384, 24576, 28672, 28928, - 28992, 29008, 29016, 29014, 0, 16384, 24576, 28672, - 28928, 28992, 29008, 0, 16384, 24576, 28672, 28928, - 28992, 29024, 29016, 0, 16384, 24576, 28672, 28928, - 28992, 29024, 29016, 0, 16384, 24576, 28672, 28928, - 28992, 29024, 29016, 29018, 0, 16384, 24576, 28672, - 28928, 28992, 29024, 29016, 0, 16384, 24576, 28672, - 28928, 28992, 29024, 29025, 29020, 0, 16384, 24576, - 28672, 28928, 28992, 29024, 29025, 29020, 0, 16384, - 24576, 28672, 28928, 28992, 29024, 29025, 29020, 29022, - 0, 16384, 24576, 28672, 28928, 28992, 0, 16384, - 24576, 28672, 28928, 29056, 29024, 0, 16384, 24576, - 28672, 28928, 29056, 29024, 0, 16384, 24576, 28672, - 28928, 29056, 29024, 29026, 0, 16384, 24576, 28672, - 28928, 29056, 29024, 0, 16384, 24576, 28672, 28928, - 29056, 29024, 29028, 0, 16384, 24576, 28672, 28928, - 29056, 29024, 29028, 0, 16384, 24576, 28672, 28928, - 29056, 29024, 29032, 29030, 0, 16384, 24576, 28672, - 28928, 29056, 29024, 0, 16384, 24576, 28672, 28928, - 29056, 29024, 29032, 0, 16384, 24576, 28672, 28928, - 29056, 29024, 29032, 0, 16384, 24576, 28672, 28928, - 29056, 29024, 29032, 29034, 0, 16384, 24576, 28672, - 28928, 29056, 29024, 29032, 0, 16384, 24576, 28672, - 28928, 29056, 29024, 29040, 29036, 0, 16384, 24576, - 28672, 28928, 29056, 29024, 29040, 29036, 0, 16384, - 24576, 28672, 28928, 29056, 29024, 29040, 29041, 29038, - 0, 16384, 24576, 28672, 28928, 29056, 29024, 0, - 16384, 24576, 28672, 28928, 29056, 29057, 29040, 0, - 16384, 24576, 28672, 28928, 29056, 29057, 29040, 0, - 16384, 24576, 28672, 28928, 29056, 29057, 29040, 29042, - 0, 16384, 24576, 28672, 28928, 29056, 29057, 29040, - 0, 16384, 24576, 28672, 28928, 29056, 29057, 29040, - 29044, 0, 16384, 24576, 28672, 28928, 29056, 29057, - 29040, 29044, 0, 16384, 24576, 28672, 28928, 29056, - 29057, 29040, 29048, 29046, 0, 16384, 24576, 28672, - 28928, 29056, 29057, 29040, 0, 16384, 24576, 28672, - 28928, 29056, 29057, 29040, 29048, 0, 16384, 24576, - 28672, 28928, 29056, 29057, 29059, 29048, 0, 16384, - 24576, 28672, 28928, 29056, 29057, 29059, 29048, 29050, - 0, 16384, 24576, 28672, 28928, 29056, 29057, 29059, - 29048, 0, 16384, 24576, 28672, 28928, 29056, 29057, - 29059, 29048, 29052, 0, 16384, 24576, 28672, 28928, - 29056, 29057, 29059, 29048, 29052, 0, 16384, 24576, - 28672, 28928, 29056, 29057, 29059, 29048, 29052, 29054, - 0, 16384, 24576, 28672, 28928, 0, 16384, 24576, - 28672, 29184, 29056, 0, 16384, 24576, 28672, 29184, - 29056, 0, 16384, 24576, 28672, 29184, 29056, 29058, - 0, 16384, 24576, 28672, 29184, 29056, 0, 16384, - 24576, 28672, 29184, 29056, 29060, 0, 16384, 24576, - 28672, 29184, 29056, 29060, 0, 16384, 24576, 28672, - 29184, 29056, 29064, 29062, 0, 16384, 24576, 28672, - 29184, 29056, 0, 16384, 24576, 28672, 29184, 29056, - 29064, 0, 16384, 24576, 28672, 29184, 29056, 29064, - 0, 16384, 24576, 28672, 29184, 29056, 29064, 29066, - 0, 16384, 24576, 28672, 29184, 29056, 29064, 0, - 16384, 24576, 28672, 29184, 29056, 29072, 29068, 0, - 16384, 24576, 28672, 29184, 29056, 29072, 29068, 0, - 16384, 24576, 28672, 29184, 29056, 29072, 29073, 29070, - 0, 16384, 24576, 28672, 29184, 29056, 0, 16384, - 24576, 28672, 29184, 29056, 29072, 0, 16384, 24576, - 28672, 29184, 29056, 29072, 0, 16384, 24576, 28672, - 29184, 29056, 29072, 29074, 0, 16384, 24576, 28672, - 29184, 29056, 29072, 0, 16384, 24576, 28672, 29184, - 29056, 29072, 29076, 0, 16384, 24576, 28672, 29184, - 29056, 29072, 29076, 0, 16384, 24576, 28672, 29184, - 29056, 29072, 29080, 29078, 0, 16384, 24576, 28672, - 29184, 29056, 29072, 0, 16384, 24576, 28672, 29184, - 29056, 29088, 29080, 0, 16384, 24576, 28672, 29184, - 29056, 29088, 29080, 0, 16384, 24576, 28672, 29184, - 29056, 29088, 29080, 29082, 0, 16384, 24576, 28672, - 29184, 29056, 29088, 29080, 0, 16384, 24576, 28672, - 29184, 29056, 29088, 29089, 29084, 0, 16384, 24576, - 28672, 29184, 29056, 29088, 29089, 29084, 0, 16384, - 24576, 28672, 29184, 29056, 29088, 29089, 29084, 29086, - 0, 16384, 24576, 28672, 29184, 29056, 0, 16384, - 24576, 28672, 29184, 29056, 29088, 0, 16384, 24576, - 28672, 29184, 29056, 29088, 0, 16384, 24576, 28672, - 29184, 29056, 29088, 29090, 0, 16384, 24576, 28672, - 29184, 29056, 29088, 0, 16384, 24576, 28672, 29184, - 29056, 29088, 29092, 0, 16384, 24576, 28672, 29184, - 29056, 29088, 29092, 0, 16384, 24576, 28672, 29184, - 29056, 29088, 29096, 29094, 0, 16384, 24576, 28672, - 29184, 29056, 29088, 0, 16384, 24576, 28672, 29184, - 29056, 29088, 29096, 0, 16384, 24576, 28672, 29184, - 29056, 29088, 29096, 0, 16384, 24576, 28672, 29184, - 29056, 29088, 29096, 29098, 0, 16384, 24576, 28672, - 29184, 29056, 29088, 29096, 0, 16384, 24576, 28672, - 29184, 29056, 29088, 29104, 29100, 0, 16384, 24576, - 28672, 29184, 29056, 29088, 29104, 29100, 0, 16384, - 24576, 28672, 29184, 29056, 29088, 29104, 29105, 29102, - 0, 16384, 24576, 28672, 29184, 29056, 29088, 0, - 16384, 24576, 28672, 29184, 29056, 29120, 29104, 0, - 16384, 24576, 28672, 29184, 29056, 29120, 29104, 0, - 16384, 24576, 28672, 29184, 29056, 29120, 29104, 29106, - 0, 16384, 24576, 28672, 29184, 29056, 29120, 29104, - 0, 16384, 24576, 28672, 29184, 29056, 29120, 29104, - 29108, 0, 16384, 24576, 28672, 29184, 29056, 29120, - 29104, 29108, 0, 16384, 24576, 28672, 29184, 29056, - 29120, 29104, 29112, 29110, 0, 16384, 24576, 28672, - 29184, 29056, 29120, 29104, 0, 16384, 24576, 28672, - 29184, 29056, 29120, 29121, 29112, 0, 16384, 24576, - 28672, 29184, 29056, 29120, 29121, 29112, 0, 16384, - 24576, 28672, 29184, 29056, 29120, 29121, 29112, 29114, - 0, 16384, 24576, 28672, 29184, 29056, 29120, 29121, - 29112, 0, 16384, 24576, 28672, 29184, 29056, 29120, - 29121, 29112, 29116, 0, 16384, 24576, 28672, 29184, - 29056, 29120, 29121, 29123, 29116, 0, 16384, 24576, - 28672, 29184, 29056, 29120, 29121, 29123, 29116, 29118, - 0, 16384, 24576, 28672, 29184, 29056, 0, 16384, - 24576, 28672, 29184, 29185, 29120, 0, 16384, 24576, - 28672, 29184, 29185, 29120, 0, 16384, 24576, 28672, - 29184, 29185, 29120, 29122, 0, 16384, 24576, 28672, - 29184, 29185, 29120, 0, 16384, 24576, 28672, 29184, - 29185, 29120, 29124, 0, 16384, 24576, 28672, 29184, - 29185, 29120, 29124, 0, 16384, 24576, 28672, 29184, - 29185, 29120, 29128, 29126, 0, 16384, 24576, 28672, - 29184, 29185, 29120, 0, 16384, 24576, 28672, 29184, - 29185, 29120, 29128, 0, 16384, 24576, 28672, 29184, - 29185, 29120, 29128, 0, 16384, 24576, 28672, 29184, - 29185, 29120, 29128, 29130, 0, 16384, 24576, 28672, - 29184, 29185, 29120, 29128, 0, 16384, 24576, 28672, - 29184, 29185, 29120, 29136, 29132, 0, 16384, 24576, - 28672, 29184, 29185, 29120, 29136, 29132, 0, 16384, - 24576, 28672, 29184, 29185, 29120, 29136, 29137, 29134, - 0, 16384, 24576, 28672, 29184, 29185, 29120, 0, - 16384, 24576, 28672, 29184, 29185, 29120, 29136, 0, - 16384, 24576, 28672, 29184, 29185, 29120, 29136, 0, - 16384, 24576, 28672, 29184, 29185, 29120, 29136, 29138, - 0, 16384, 24576, 28672, 29184, 29185, 29120, 29136, - 0, 16384, 24576, 28672, 29184, 29185, 29120, 29136, - 29140, 0, 16384, 24576, 28672, 29184, 29185, 29120, - 29136, 29140, 0, 16384, 24576, 28672, 29184, 29185, - 29120, 29136, 29144, 29142, 0, 16384, 24576, 28672, - 29184, 29185, 29120, 29136, 0, 16384, 24576, 28672, - 29184, 29185, 29120, 29152, 29144, 0, 16384, 24576, - 28672, 29184, 29185, 29120, 29152, 29144, 0, 16384, - 24576, 28672, 29184, 29185, 29120, 29152, 29144, 29146, - 0, 16384, 24576, 28672, 29184, 29185, 29120, 29152, - 29144, 0, 16384, 24576, 28672, 29184, 29185, 29120, - 29152, 29153, 29148, 0, 16384, 24576, 28672, 29184, - 29185, 29120, 29152, 29153, 29148, 0, 16384, 24576, - 28672, 29184, 29185, 29120, 29152, 29153, 29148, 29150, - 0, 16384, 24576, 28672, 29184, 29185, 29120, 0, - 16384, 24576, 28672, 29184, 29185, 29120, 29152, 0, - 16384, 24576, 28672, 29184, 29185, 29187, 29152, 0, - 16384, 24576, 28672, 29184, 29185, 29187, 29152, 29154, - 0, 16384, 24576, 28672, 29184, 29185, 29187, 29152, - 0, 16384, 24576, 28672, 29184, 29185, 29187, 29152, - 29156, 0, 16384, 24576, 28672, 29184, 29185, 29187, - 29152, 29156, 0, 16384, 24576, 28672, 29184, 29185, - 29187, 29152, 29160, 29158, 0, 16384, 24576, 28672, - 29184, 29185, 29187, 29152, 0, 16384, 24576, 28672, - 29184, 29185, 29187, 29152, 29160, 0, 16384, 24576, - 28672, 29184, 29185, 29187, 29152, 29160, 0, 16384, - 24576, 28672, 29184, 29185, 29187, 29152, 29160, 29162, - 0, 16384, 24576, 28672, 29184, 29185, 29187, 29152, - 29160, 0, 16384, 24576, 28672, 29184, 29185, 29187, - 29152, 29168, 29164, 0, 16384, 24576, 28672, 29184, - 29185, 29187, 29152, 29168, 29164, 0, 16384, 24576, - 28672, 29184, 29185, 29187, 29152, 29168, 29169, 29166, - 0, 16384, 24576, 28672, 29184, 29185, 29187, 29152, - 0, 16384, 24576, 28672, 29184, 29185, 29187, 29152, - 29168, 0, 16384, 24576, 28672, 29184, 29185, 29187, - 29152, 29168, 0, 16384, 24576, 28672, 29184, 29185, - 29187, 29152, 29168, 29170, 0, 16384, 24576, 28672, - 29184, 29185, 29187, 29191, 29168, 0, 16384, 24576, - 28672, 29184, 29185, 29187, 29191, 29168, 29172, 0, - 16384, 24576, 28672, 29184, 29185, 29187, 29191, 29168, - 29172, 0, 16384, 24576, 28672, 29184, 29185, 29187, - 29191, 29168, 29176, 29174, 0, 16384, 24576, 28672, - 29184, 29185, 29187, 29191, 29168, 0, 16384, 24576, - 28672, 29184, 29185, 29187, 29191, 29168, 29176, 0, - 16384, 24576, 28672, 29184, 29185, 29187, 29191, 29168, - 29176, 0, 16384, 24576, 28672, 29184, 29185, 29187, - 29191, 29168, 29176, 29178, 0, 16384, 24576, 28672, - 29184, 29185, 29187, 29191, 29168, 29176, 0, 16384, - 24576, 28672, 29184, 29185, 29187, 29191, 29168, 29176, - 29180, 0, 16384, 24576, 28672, 29184, 29185, 29187, - 29191, 29168, 29176, 29180, 0, 16384, 24576, 28672, - 29184, 29185, 29187, 29191, 29168, 29176, 29180, 29182, - 0, 16384, 24576, 28672, 0, 16384, 24576, 28672, - 29184, 0, 16384, 24576, 28672, 29184, 0, 16384, - 24576, 28672, 29184, 29186, 0, 16384, 24576, 28672, - 29184, 0, 16384, 24576, 28672, 29184, 29188, 0, - 16384, 24576, 28672, 29184, 29188, 0, 16384, 24576, - 28672, 29184, 29192, 29190, 0, 16384, 24576, 28672, - 29184, 0, 16384, 24576, 28672, 29184, 29192, 0, - 16384, 24576, 28672, 29184, 29192, 0, 16384, 24576, - 28672, 29184, 29192, 29194, 0, 16384, 24576, 28672, - 29184, 29192, 0, 16384, 24576, 28672, 29184, 29200, - 29196, 0, 16384, 24576, 28672, 29184, 29200, 29196, - 0, 16384, 24576, 28672, 29184, 29200, 29201, 29198, - 0, 16384, 24576, 28672, 29184, 0, 16384, 24576, - 28672, 29184, 29200, 0, 16384, 24576, 28672, 29184, - 29200, 0, 16384, 24576, 28672, 29184, 29200, 29202, - 0, 16384, 24576, 28672, 29184, 29200, 0, 16384, - 24576, 28672, 29184, 29200, 29204, 0, 16384, 24576, - 28672, 29184, 29200, 29204, 0, 16384, 24576, 28672, - 29184, 29200, 29208, 29206, 0, 16384, 24576, 28672, - 29184, 29200, 0, 16384, 24576, 28672, 29184, 29216, - 29208, 0, 16384, 24576, 28672, 29184, 29216, 29208, - 0, 16384, 24576, 28672, 29184, 29216, 29208, 29210, - 0, 16384, 24576, 28672, 29184, 29216, 29208, 0, - 16384, 24576, 28672, 29184, 29216, 29217, 29212, 0, - 16384, 24576, 28672, 29184, 29216, 29217, 29212, 0, - 16384, 24576, 28672, 29184, 29216, 29217, 29212, 29214, - 0, 16384, 24576, 28672, 29184, 0, 16384, 24576, - 28672, 29184, 29216, 0, 16384, 24576, 28672, 29184, - 29216, 0, 16384, 24576, 28672, 29184, 29216, 29218, - 0, 16384, 24576, 28672, 29184, 29216, 0, 16384, - 24576, 28672, 29184, 29216, 29220, 0, 16384, 24576, - 28672, 29184, 29216, 29220, 0, 16384, 24576, 28672, - 29184, 29216, 29224, 29222, 0, 16384, 24576, 28672, - 29184, 29216, 0, 16384, 24576, 28672, 29184, 29216, - 29224, 0, 16384, 24576, 28672, 29184, 29216, 29224, - 0, 16384, 24576, 28672, 29184, 29216, 29224, 29226, - 0, 16384, 24576, 28672, 29184, 29216, 29224, 0, - 16384, 24576, 28672, 29184, 29216, 29232, 29228, 0, - 16384, 24576, 28672, 29184, 29216, 29232, 29228, 0, - 16384, 24576, 28672, 29184, 29216, 29232, 29233, 29230, - 0, 16384, 24576, 28672, 29184, 29216, 0, 16384, - 24576, 28672, 29184, 29248, 29232, 0, 16384, 24576, - 28672, 29184, 29248, 29232, 0, 16384, 24576, 28672, - 29184, 29248, 29232, 29234, 0, 16384, 24576, 28672, - 29184, 29248, 29232, 0, 16384, 24576, 28672, 29184, - 29248, 29232, 29236, 0, 16384, 24576, 28672, 29184, - 29248, 29232, 29236, 0, 16384, 24576, 28672, 29184, - 29248, 29232, 29240, 29238, 0, 16384, 24576, 28672, - 29184, 29248, 29232, 0, 16384, 24576, 28672, 29184, - 29248, 29249, 29240, 0, 16384, 24576, 28672, 29184, - 29248, 29249, 29240, 0, 16384, 24576, 28672, 29184, - 29248, 29249, 29240, 29242, 0, 16384, 24576, 28672, - 29184, 29248, 29249, 29240, 0, 16384, 24576, 28672, - 29184, 29248, 29249, 29240, 29244, 0, 16384, 24576, - 28672, 29184, 29248, 29249, 29251, 29244, 0, 16384, - 24576, 28672, 29184, 29248, 29249, 29251, 29244, 29246, - 0, 16384, 24576, 28672, 29184, 0, 16384, 24576, - 28672, 29184, 29248, 0, 16384, 24576, 28672, 29184, - 29248, 0, 16384, 24576, 28672, 29184, 29248, 29250, - 0, 16384, 24576, 28672, 29184, 29248, 0, 16384, - 24576, 28672, 29184, 29248, 29252, 0, 16384, 24576, - 28672, 29184, 29248, 29252, 0, 16384, 24576, 28672, - 29184, 29248, 29256, 29254, 0, 16384, 24576, 28672, - 29184, 29248, 0, 16384, 24576, 28672, 29184, 29248, - 29256, 0, 16384, 24576, 28672, 29184, 29248, 29256, - 0, 16384, 24576, 28672, 29184, 29248, 29256, 29258, - 0, 16384, 24576, 28672, 29184, 29248, 29256, 0, - 16384, 24576, 28672, 29184, 29248, 29264, 29260, 0, - 16384, 24576, 28672, 29184, 29248, 29264, 29260, 0, - 16384, 24576, 28672, 29184, 29248, 29264, 29265, 29262, - 0, 16384, 24576, 28672, 29184, 29248, 0, 16384, - 24576, 28672, 29184, 29248, 29264, 0, 16384, 24576, - 28672, 29184, 29248, 29264, 0, 16384, 24576, 28672, - 29184, 29248, 29264, 29266, 0, 16384, 24576, 28672, - 29184, 29248, 29264, 0, 16384, 24576, 28672, 29184, - 29248, 29264, 29268, 0, 16384, 24576, 28672, 29184, - 29248, 29264, 29268, 0, 16384, 24576, 28672, 29184, - 29248, 29264, 29272, 29270, 0, 16384, 24576, 28672, - 29184, 29248, 29264, 0, 16384, 24576, 28672, 29184, - 29248, 29280, 29272, 0, 16384, 24576, 28672, 29184, - 29248, 29280, 29272, 0, 16384, 24576, 28672, 29184, - 29248, 29280, 29272, 29274, 0, 16384, 24576, 28672, - 29184, 29248, 29280, 29272, 0, 16384, 24576, 28672, - 29184, 29248, 29280, 29281, 29276, 0, 16384, 24576, - 28672, 29184, 29248, 29280, 29281, 29276, 0, 16384, - 24576, 28672, 29184, 29248, 29280, 29281, 29276, 29278, - 0, 16384, 24576, 28672, 29184, 29248, 0, 16384, - 24576, 28672, 29184, 29312, 29280, 0, 16384, 24576, - 28672, 29184, 29312, 29280, 0, 16384, 24576, 28672, - 29184, 29312, 29280, 29282, 0, 16384, 24576, 28672, - 29184, 29312, 29280, 0, 16384, 24576, 28672, 29184, - 29312, 29280, 29284, 0, 16384, 24576, 28672, 29184, - 29312, 29280, 29284, 0, 16384, 24576, 28672, 29184, - 29312, 29280, 29288, 29286, 0, 16384, 24576, 28672, - 29184, 29312, 29280, 0, 16384, 24576, 28672, 29184, - 29312, 29280, 29288, 0, 16384, 24576, 28672, 29184, - 29312, 29280, 29288, 0, 16384, 24576, 28672, 29184, - 29312, 29280, 29288, 29290, 0, 16384, 24576, 28672, - 29184, 29312, 29280, 29288, 0, 16384, 24576, 28672, - 29184, 29312, 29280, 29296, 29292, 0, 16384, 24576, - 28672, 29184, 29312, 29280, 29296, 29292, 0, 16384, - 24576, 28672, 29184, 29312, 29280, 29296, 29297, 29294, - 0, 16384, 24576, 28672, 29184, 29312, 29280, 0, - 16384, 24576, 28672, 29184, 29312, 29313, 29296, 0, - 16384, 24576, 28672, 29184, 29312, 29313, 29296, 0, - 16384, 24576, 28672, 29184, 29312, 29313, 29296, 29298, - 0, 16384, 24576, 28672, 29184, 29312, 29313, 29296, - 0, 16384, 24576, 28672, 29184, 29312, 29313, 29296, - 29300, 0, 16384, 24576, 28672, 29184, 29312, 29313, - 29296, 29300, 0, 16384, 24576, 28672, 29184, 29312, - 29313, 29296, 29304, 29302, 0, 16384, 24576, 28672, - 29184, 29312, 29313, 29296, 0, 16384, 24576, 28672, - 29184, 29312, 29313, 29296, 29304, 0, 16384, 24576, - 28672, 29184, 29312, 29313, 29315, 29304, 0, 16384, - 24576, 28672, 29184, 29312, 29313, 29315, 29304, 29306, - 0, 16384, 24576, 28672, 29184, 29312, 29313, 29315, - 29304, 0, 16384, 24576, 28672, 29184, 29312, 29313, - 29315, 29304, 29308, 0, 16384, 24576, 28672, 29184, - 29312, 29313, 29315, 29304, 29308, 0, 16384, 24576, - 28672, 29184, 29312, 29313, 29315, 29304, 29308, 29310, - 0, 16384, 24576, 28672, 29184, 0, 16384, 24576, - 28672, 29184, 29312, 0, 16384, 24576, 28672, 29184, - 29312, 0, 16384, 24576, 28672, 29184, 29312, 29314, - 0, 16384, 24576, 28672, 29184, 29312, 0, 16384, - 24576, 28672, 29184, 29312, 29316, 0, 16384, 24576, - 28672, 29184, 29312, 29316, 0, 16384, 24576, 28672, - 29184, 29312, 29320, 29318, 0, 16384, 24576, 28672, - 29184, 29312, 0, 16384, 24576, 28672, 29184, 29312, - 29320, 0, 16384, 24576, 28672, 29184, 29312, 29320, - 0, 16384, 24576, 28672, 29184, 29312, 29320, 29322, - 0, 16384, 24576, 28672, 29184, 29312, 29320, 0, - 16384, 24576, 28672, 29184, 29312, 29328, 29324, 0, - 16384, 24576, 28672, 29184, 29312, 29328, 29324, 0, - 16384, 24576, 28672, 29184, 29312, 29328, 29329, 29326, - 0, 16384, 24576, 28672, 29184, 29312, 0, 16384, - 24576, 28672, 29184, 29312, 29328, 0, 16384, 24576, - 28672, 29184, 29312, 29328, 0, 16384, 24576, 28672, - 29184, 29312, 29328, 29330, 0, 16384, 24576, 28672, - 29184, 29312, 29328, 0, 16384, 24576, 28672, 29184, - 29312, 29328, 29332, 0, 16384, 24576, 28672, 29184, - 29312, 29328, 29332, 0, 16384, 24576, 28672, 29184, - 29312, 29328, 29336, 29334, 0, 16384, 24576, 28672, - 29184, 29312, 29328, 0, 16384, 24576, 28672, 29184, - 29312, 29344, 29336, 0, 16384, 24576, 28672, 29184, - 29312, 29344, 29336, 0, 16384, 24576, 28672, 29184, - 29312, 29344, 29336, 29338, 0, 16384, 24576, 28672, - 29184, 29312, 29344, 29336, 0, 16384, 24576, 28672, - 29184, 29312, 29344, 29345, 29340, 0, 16384, 24576, - 28672, 29184, 29312, 29344, 29345, 29340, 0, 16384, - 24576, 28672, 29184, 29312, 29344, 29345, 29340, 29342, - 0, 16384, 24576, 28672, 29184, 29312, 0, 16384, - 24576, 28672, 29184, 29312, 29344, 0, 16384, 24576, - 28672, 29184, 29312, 29344, 0, 16384, 24576, 28672, - 29184, 29312, 29344, 29346, 0, 16384, 24576, 28672, - 29184, 29312, 29344, 0, 16384, 24576, 28672, 29184, - 29312, 29344, 29348, 0, 16384, 24576, 28672, 29184, - 29312, 29344, 29348, 0, 16384, 24576, 28672, 29184, - 29312, 29344, 29352, 29350, 0, 16384, 24576, 28672, - 29184, 29312, 29344, 0, 16384, 24576, 28672, 29184, - 29312, 29344, 29352, 0, 16384, 24576, 28672, 29184, - 29312, 29344, 29352, 0, 16384, 24576, 28672, 29184, - 29312, 29344, 29352, 29354, 0, 16384, 24576, 28672, - 29184, 29312, 29344, 29352, 0, 16384, 24576, 28672, - 29184, 29312, 29344, 29360, 29356, 0, 16384, 24576, - 28672, 29184, 29312, 29344, 29360, 29356, 0, 16384, - 24576, 28672, 29184, 29312, 29344, 29360, 29361, 29358, - 0, 16384, 24576, 28672, 29184, 29312, 29344, 0, - 16384, 24576, 28672, 29184, 29312, 29376, 29360, 0, - 16384, 24576, 28672, 29184, 29312, 29376, 29360, 0, - 16384, 24576, 28672, 29184, 29312, 29376, 29360, 29362, - 0, 16384, 24576, 28672, 29184, 29312, 29376, 29360, - 0, 16384, 24576, 28672, 29184, 29312, 29376, 29360, - 29364, 0, 16384, 24576, 28672, 29184, 29312, 29376, - 29360, 29364, 0, 16384, 24576, 28672, 29184, 29312, - 29376, 29360, 29368, 29366, 0, 16384, 24576, 28672, - 29184, 29312, 29376, 29360, 0, 16384, 24576, 28672, - 29184, 29312, 29376, 29377, 29368, 0, 16384, 24576, - 28672, 29184, 29312, 29376, 29377, 29368, 0, 16384, - 24576, 28672, 29184, 29312, 29376, 29377, 29368, 29370, - 0, 16384, 24576, 28672, 29184, 29312, 29376, 29377, - 29368, 0, 16384, 24576, 28672, 29184, 29312, 29376, - 29377, 29368, 29372, 0, 16384, 24576, 28672, 29184, - 29312, 29376, 29377, 29379, 29372, 0, 16384, 24576, - 28672, 29184, 29312, 29376, 29377, 29379, 29372, 29374, - 0, 16384, 24576, 28672, 29184, 29312, 0, 16384, - 24576, 28672, 29184, 29440, 29376, 0, 16384, 24576, - 28672, 29184, 29440, 29376, 0, 16384, 24576, 28672, - 29184, 29440, 29376, 29378, 0, 16384, 24576, 28672, - 29184, 29440, 29376, 0, 16384, 24576, 28672, 29184, - 29440, 29376, 29380, 0, 16384, 24576, 28672, 29184, - 29440, 29376, 29380, 0, 16384, 24576, 28672, 29184, - 29440, 29376, 29384, 29382, 0, 16384, 24576, 28672, - 29184, 29440, 29376, 0, 16384, 24576, 28672, 29184, - 29440, 29376, 29384, 0, 16384, 24576, 28672, 29184, - 29440, 29376, 29384, 0, 16384, 24576, 28672, 29184, - 29440, 29376, 29384, 29386, 0, 16384, 24576, 28672, - 29184, 29440, 29376, 29384, 0, 16384, 24576, 28672, - 29184, 29440, 29376, 29392, 29388, 0, 16384, 24576, - 28672, 29184, 29440, 29376, 29392, 29388, 0, 16384, - 24576, 28672, 29184, 29440, 29376, 29392, 29393, 29390, - 0, 16384, 24576, 28672, 29184, 29440, 29376, 0, - 16384, 24576, 28672, 29184, 29440, 29376, 29392, 0, - 16384, 24576, 28672, 29184, 29440, 29376, 29392, 0, - 16384, 24576, 28672, 29184, 29440, 29376, 29392, 29394, - 0, 16384, 24576, 28672, 29184, 29440, 29376, 29392, - 0, 16384, 24576, 28672, 29184, 29440, 29376, 29392, - 29396, 0, 16384, 24576, 28672, 29184, 29440, 29376, - 29392, 29396, 0, 16384, 24576, 28672, 29184, 29440, - 29376, 29392, 29400, 29398, 0, 16384, 24576, 28672, - 29184, 29440, 29376, 29392, 0, 16384, 24576, 28672, - 29184, 29440, 29376, 29408, 29400, 0, 16384, 24576, - 28672, 29184, 29440, 29376, 29408, 29400, 0, 16384, - 24576, 28672, 29184, 29440, 29376, 29408, 29400, 29402, - 0, 16384, 24576, 28672, 29184, 29440, 29376, 29408, - 29400, 0, 16384, 24576, 28672, 29184, 29440, 29376, - 29408, 29409, 29404, 0, 16384, 24576, 28672, 29184, - 29440, 29376, 29408, 29409, 29404, 0, 16384, 24576, - 28672, 29184, 29440, 29376, 29408, 29409, 29404, 29406, - 0, 16384, 24576, 28672, 29184, 29440, 29376, 0, - 16384, 24576, 28672, 29184, 29440, 29441, 29408, 0, - 16384, 24576, 28672, 29184, 29440, 29441, 29408, 0, - 16384, 24576, 28672, 29184, 29440, 29441, 29408, 29410, - 0, 16384, 24576, 28672, 29184, 29440, 29441, 29408, - 0, 16384, 24576, 28672, 29184, 29440, 29441, 29408, - 29412, 0, 16384, 24576, 28672, 29184, 29440, 29441, - 29408, 29412, 0, 16384, 24576, 28672, 29184, 29440, - 29441, 29408, 29416, 29414, 0, 16384, 24576, 28672, - 29184, 29440, 29441, 29408, 0, 16384, 24576, 28672, - 29184, 29440, 29441, 29408, 29416, 0, 16384, 24576, - 28672, 29184, 29440, 29441, 29408, 29416, 0, 16384, - 24576, 28672, 29184, 29440, 29441, 29408, 29416, 29418, - 0, 16384, 24576, 28672, 29184, 29440, 29441, 29408, - 29416, 0, 16384, 24576, 28672, 29184, 29440, 29441, - 29408, 29424, 29420, 0, 16384, 24576, 28672, 29184, - 29440, 29441, 29408, 29424, 29420, 0, 16384, 24576, - 28672, 29184, 29440, 29441, 29408, 29424, 29425, 29422, - 0, 16384, 24576, 28672, 29184, 29440, 29441, 29408, - 0, 16384, 24576, 28672, 29184, 29440, 29441, 29408, - 29424, 0, 16384, 24576, 28672, 29184, 29440, 29441, - 29443, 29424, 0, 16384, 24576, 28672, 29184, 29440, - 29441, 29443, 29424, 29426, 0, 16384, 24576, 28672, - 29184, 29440, 29441, 29443, 29424, 0, 16384, 24576, - 28672, 29184, 29440, 29441, 29443, 29424, 29428, 0, - 16384, 24576, 28672, 29184, 29440, 29441, 29443, 29424, - 29428, 0, 16384, 24576, 28672, 29184, 29440, 29441, - 29443, 29424, 29432, 29430, 0, 16384, 24576, 28672, - 29184, 29440, 29441, 29443, 29424, 0, 16384, 24576, - 28672, 29184, 29440, 29441, 29443, 29424, 29432, 0, - 16384, 24576, 28672, 29184, 29440, 29441, 29443, 29424, - 29432, 0, 16384, 24576, 28672, 29184, 29440, 29441, - 29443, 29424, 29432, 29434, 0, 16384, 24576, 28672, - 29184, 29440, 29441, 29443, 29447, 29432, 0, 16384, - 24576, 28672, 29184, 29440, 29441, 29443, 29447, 29432, - 29436, 0, 16384, 24576, 28672, 29184, 29440, 29441, - 29443, 29447, 29432, 29436, 0, 16384, 24576, 28672, - 29184, 29440, 29441, 29443, 29447, 29432, 29436, 29438, - 0, 16384, 24576, 28672, 29184, 0, 16384, 24576, - 28672, 29696, 29440, 0, 16384, 24576, 28672, 29696, - 29440, 0, 16384, 24576, 28672, 29696, 29440, 29442, - 0, 16384, 24576, 28672, 29696, 29440, 0, 16384, - 24576, 28672, 29696, 29440, 29444, 0, 16384, 24576, - 28672, 29696, 29440, 29444, 0, 16384, 24576, 28672, - 29696, 29440, 29448, 29446, 0, 16384, 24576, 28672, - 29696, 29440, 0, 16384, 24576, 28672, 29696, 29440, - 29448, 0, 16384, 24576, 28672, 29696, 29440, 29448, - 0, 16384, 24576, 28672, 29696, 29440, 29448, 29450, - 0, 16384, 24576, 28672, 29696, 29440, 29448, 0, - 16384, 24576, 28672, 29696, 29440, 29456, 29452, 0, - 16384, 24576, 28672, 29696, 29440, 29456, 29452, 0, - 16384, 24576, 28672, 29696, 29440, 29456, 29457, 29454, - 0, 16384, 24576, 28672, 29696, 29440, 0, 16384, - 24576, 28672, 29696, 29440, 29456, 0, 16384, 24576, - 28672, 29696, 29440, 29456, 0, 16384, 24576, 28672, - 29696, 29440, 29456, 29458, 0, 16384, 24576, 28672, - 29696, 29440, 29456, 0, 16384, 24576, 28672, 29696, - 29440, 29456, 29460, 0, 16384, 24576, 28672, 29696, - 29440, 29456, 29460, 0, 16384, 24576, 28672, 29696, - 29440, 29456, 29464, 29462, 0, 16384, 24576, 28672, - 29696, 29440, 29456, 0, 16384, 24576, 28672, 29696, - 29440, 29472, 29464, 0, 16384, 24576, 28672, 29696, - 29440, 29472, 29464, 0, 16384, 24576, 28672, 29696, - 29440, 29472, 29464, 29466, 0, 16384, 24576, 28672, - 29696, 29440, 29472, 29464, 0, 16384, 24576, 28672, - 29696, 29440, 29472, 29473, 29468, 0, 16384, 24576, - 28672, 29696, 29440, 29472, 29473, 29468, 0, 16384, - 24576, 28672, 29696, 29440, 29472, 29473, 29468, 29470, - 0, 16384, 24576, 28672, 29696, 29440, 0, 16384, - 24576, 28672, 29696, 29440, 29472, 0, 16384, 24576, - 28672, 29696, 29440, 29472, 0, 16384, 24576, 28672, - 29696, 29440, 29472, 29474, 0, 16384, 24576, 28672, - 29696, 29440, 29472, 0, 16384, 24576, 28672, 29696, - 29440, 29472, 29476, 0, 16384, 24576, 28672, 29696, - 29440, 29472, 29476, 0, 16384, 24576, 28672, 29696, - 29440, 29472, 29480, 29478, 0, 16384, 24576, 28672, - 29696, 29440, 29472, 0, 16384, 24576, 28672, 29696, - 29440, 29472, 29480, 0, 16384, 24576, 28672, 29696, - 29440, 29472, 29480, 0, 16384, 24576, 28672, 29696, - 29440, 29472, 29480, 29482, 0, 16384, 24576, 28672, - 29696, 29440, 29472, 29480, 0, 16384, 24576, 28672, - 29696, 29440, 29472, 29488, 29484, 0, 16384, 24576, - 28672, 29696, 29440, 29472, 29488, 29484, 0, 16384, - 24576, 28672, 29696, 29440, 29472, 29488, 29489, 29486, - 0, 16384, 24576, 28672, 29696, 29440, 29472, 0, - 16384, 24576, 28672, 29696, 29440, 29504, 29488, 0, - 16384, 24576, 28672, 29696, 29440, 29504, 29488, 0, - 16384, 24576, 28672, 29696, 29440, 29504, 29488, 29490, - 0, 16384, 24576, 28672, 29696, 29440, 29504, 29488, - 0, 16384, 24576, 28672, 29696, 29440, 29504, 29488, - 29492, 0, 16384, 24576, 28672, 29696, 29440, 29504, - 29488, 29492, 0, 16384, 24576, 28672, 29696, 29440, - 29504, 29488, 29496, 29494, 0, 16384, 24576, 28672, - 29696, 29440, 29504, 29488, 0, 16384, 24576, 28672, - 29696, 29440, 29504, 29505, 29496, 0, 16384, 24576, - 28672, 29696, 29440, 29504, 29505, 29496, 0, 16384, - 24576, 28672, 29696, 29440, 29504, 29505, 29496, 29498, - 0, 16384, 24576, 28672, 29696, 29440, 29504, 29505, - 29496, 0, 16384, 24576, 28672, 29696, 29440, 29504, - 29505, 29496, 29500, 0, 16384, 24576, 28672, 29696, - 29440, 29504, 29505, 29507, 29500, 0, 16384, 24576, - 28672, 29696, 29440, 29504, 29505, 29507, 29500, 29502, - 0, 16384, 24576, 28672, 29696, 29440, 0, 16384, - 24576, 28672, 29696, 29440, 29504, 0, 16384, 24576, - 28672, 29696, 29440, 29504, 0, 16384, 24576, 28672, - 29696, 29440, 29504, 29506, 0, 16384, 24576, 28672, - 29696, 29440, 29504, 0, 16384, 24576, 28672, 29696, - 29440, 29504, 29508, 0, 16384, 24576, 28672, 29696, - 29440, 29504, 29508, 0, 16384, 24576, 28672, 29696, - 29440, 29504, 29512, 29510, 0, 16384, 24576, 28672, - 29696, 29440, 29504, 0, 16384, 24576, 28672, 29696, - 29440, 29504, 29512, 0, 16384, 24576, 28672, 29696, - 29440, 29504, 29512, 0, 16384, 24576, 28672, 29696, - 29440, 29504, 29512, 29514, 0, 16384, 24576, 28672, - 29696, 29440, 29504, 29512, 0, 16384, 24576, 28672, - 29696, 29440, 29504, 29520, 29516, 0, 16384, 24576, - 28672, 29696, 29440, 29504, 29520, 29516, 0, 16384, - 24576, 28672, 29696, 29440, 29504, 29520, 29521, 29518, - 0, 16384, 24576, 28672, 29696, 29440, 29504, 0, - 16384, 24576, 28672, 29696, 29440, 29504, 29520, 0, - 16384, 24576, 28672, 29696, 29440, 29504, 29520, 0, - 16384, 24576, 28672, 29696, 29440, 29504, 29520, 29522, - 0, 16384, 24576, 28672, 29696, 29440, 29504, 29520, - 0, 16384, 24576, 28672, 29696, 29440, 29504, 29520, - 29524, 0, 16384, 24576, 28672, 29696, 29440, 29504, - 29520, 29524, 0, 16384, 24576, 28672, 29696, 29440, - 29504, 29520, 29528, 29526, 0, 16384, 24576, 28672, - 29696, 29440, 29504, 29520, 0, 16384, 24576, 28672, - 29696, 29440, 29504, 29536, 29528, 0, 16384, 24576, - 28672, 29696, 29440, 29504, 29536, 29528, 0, 16384, - 24576, 28672, 29696, 29440, 29504, 29536, 29528, 29530, - 0, 16384, 24576, 28672, 29696, 29440, 29504, 29536, - 29528, 0, 16384, 24576, 28672, 29696, 29440, 29504, - 29536, 29537, 29532, 0, 16384, 24576, 28672, 29696, - 29440, 29504, 29536, 29537, 29532, 0, 16384, 24576, - 28672, 29696, 29440, 29504, 29536, 29537, 29532, 29534, - 0, 16384, 24576, 28672, 29696, 29440, 29504, 0, - 16384, 24576, 28672, 29696, 29440, 29568, 29536, 0, - 16384, 24576, 28672, 29696, 29440, 29568, 29536, 0, - 16384, 24576, 28672, 29696, 29440, 29568, 29536, 29538, - 0, 16384, 24576, 28672, 29696, 29440, 29568, 29536, - 0, 16384, 24576, 28672, 29696, 29440, 29568, 29536, - 29540, 0, 16384, 24576, 28672, 29696, 29440, 29568, - 29536, 29540, 0, 16384, 24576, 28672, 29696, 29440, - 29568, 29536, 29544, 29542, 0, 16384, 24576, 28672, - 29696, 29440, 29568, 29536, 0, 16384, 24576, 28672, - 29696, 29440, 29568, 29536, 29544, 0, 16384, 24576, - 28672, 29696, 29440, 29568, 29536, 29544, 0, 16384, - 24576, 28672, 29696, 29440, 29568, 29536, 29544, 29546, - 0, 16384, 24576, 28672, 29696, 29440, 29568, 29536, - 29544, 0, 16384, 24576, 28672, 29696, 29440, 29568, - 29536, 29552, 29548, 0, 16384, 24576, 28672, 29696, - 29440, 29568, 29536, 29552, 29548, 0, 16384, 24576, - 28672, 29696, 29440, 29568, 29536, 29552, 29553, 29550, - 0, 16384, 24576, 28672, 29696, 29440, 29568, 29536, - 0, 16384, 24576, 28672, 29696, 29440, 29568, 29569, - 29552, 0, 16384, 24576, 28672, 29696, 29440, 29568, - 29569, 29552, 0, 16384, 24576, 28672, 29696, 29440, - 29568, 29569, 29552, 29554, 0, 16384, 24576, 28672, - 29696, 29440, 29568, 29569, 29552, 0, 16384, 24576, - 28672, 29696, 29440, 29568, 29569, 29552, 29556, 0, - 16384, 24576, 28672, 29696, 29440, 29568, 29569, 29552, - 29556, 0, 16384, 24576, 28672, 29696, 29440, 29568, - 29569, 29552, 29560, 29558, 0, 16384, 24576, 28672, - 29696, 29440, 29568, 29569, 29552, 0, 16384, 24576, - 28672, 29696, 29440, 29568, 29569, 29552, 29560, 0, - 16384, 24576, 28672, 29696, 29440, 29568, 29569, 29571, - 29560, 0, 16384, 24576, 28672, 29696, 29440, 29568, - 29569, 29571, 29560, 29562, 0, 16384, 24576, 28672, - 29696, 29440, 29568, 29569, 29571, 29560, 0, 16384, - 24576, 28672, 29696, 29440, 29568, 29569, 29571, 29560, - 29564, 0, 16384, 24576, 28672, 29696, 29440, 29568, - 29569, 29571, 29560, 29564, 0, 16384, 24576, 28672, - 29696, 29440, 29568, 29569, 29571, 29560, 29564, 29566, - 0, 16384, 24576, 28672, 29696, 29440, 0, 16384, - 24576, 28672, 29696, 29440, 29568, 0, 16384, 24576, - 28672, 29696, 29697, 29568, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 29570, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 0, 16384, 24576, 28672, 29696, - 29697, 29568, 29572, 0, 16384, 24576, 28672, 29696, - 29697, 29568, 29572, 0, 16384, 24576, 28672, 29696, - 29697, 29568, 29576, 29574, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 0, 16384, 24576, 28672, 29696, - 29697, 29568, 29576, 0, 16384, 24576, 28672, 29696, - 29697, 29568, 29576, 0, 16384, 24576, 28672, 29696, - 29697, 29568, 29576, 29578, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 29576, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 29584, 29580, 0, 16384, 24576, - 28672, 29696, 29697, 29568, 29584, 29580, 0, 16384, - 24576, 28672, 29696, 29697, 29568, 29584, 29585, 29582, - 0, 16384, 24576, 28672, 29696, 29697, 29568, 0, - 16384, 24576, 28672, 29696, 29697, 29568, 29584, 0, - 16384, 24576, 28672, 29696, 29697, 29568, 29584, 0, - 16384, 24576, 28672, 29696, 29697, 29568, 29584, 29586, - 0, 16384, 24576, 28672, 29696, 29697, 29568, 29584, - 0, 16384, 24576, 28672, 29696, 29697, 29568, 29584, - 29588, 0, 16384, 24576, 28672, 29696, 29697, 29568, - 29584, 29588, 0, 16384, 24576, 28672, 29696, 29697, - 29568, 29584, 29592, 29590, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 29584, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 29600, 29592, 0, 16384, 24576, - 28672, 29696, 29697, 29568, 29600, 29592, 0, 16384, - 24576, 28672, 29696, 29697, 29568, 29600, 29592, 29594, - 0, 16384, 24576, 28672, 29696, 29697, 29568, 29600, - 29592, 0, 16384, 24576, 28672, 29696, 29697, 29568, - 29600, 29601, 29596, 0, 16384, 24576, 28672, 29696, - 29697, 29568, 29600, 29601, 29596, 0, 16384, 24576, - 28672, 29696, 29697, 29568, 29600, 29601, 29596, 29598, - 0, 16384, 24576, 28672, 29696, 29697, 29568, 0, - 16384, 24576, 28672, 29696, 29697, 29568, 29600, 0, - 16384, 24576, 28672, 29696, 29697, 29568, 29600, 0, - 16384, 24576, 28672, 29696, 29697, 29568, 29600, 29602, - 0, 16384, 24576, 28672, 29696, 29697, 29568, 29600, - 0, 16384, 24576, 28672, 29696, 29697, 29568, 29600, - 29604, 0, 16384, 24576, 28672, 29696, 29697, 29568, - 29600, 29604, 0, 16384, 24576, 28672, 29696, 29697, - 29568, 29600, 29608, 29606, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 29600, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 29600, 29608, 0, 16384, 24576, - 28672, 29696, 29697, 29568, 29600, 29608, 0, 16384, - 24576, 28672, 29696, 29697, 29568, 29600, 29608, 29610, - 0, 16384, 24576, 28672, 29696, 29697, 29568, 29600, - 29608, 0, 16384, 24576, 28672, 29696, 29697, 29568, - 29600, 29616, 29612, 0, 16384, 24576, 28672, 29696, - 29697, 29568, 29600, 29616, 29612, 0, 16384, 24576, - 28672, 29696, 29697, 29568, 29600, 29616, 29617, 29614, - 0, 16384, 24576, 28672, 29696, 29697, 29568, 29600, - 0, 16384, 24576, 28672, 29696, 29697, 29568, 29632, - 29616, 0, 16384, 24576, 28672, 29696, 29697, 29568, - 29632, 29616, 0, 16384, 24576, 28672, 29696, 29697, - 29568, 29632, 29616, 29618, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 29632, 29616, 0, 16384, 24576, - 28672, 29696, 29697, 29568, 29632, 29616, 29620, 0, - 16384, 24576, 28672, 29696, 29697, 29568, 29632, 29616, - 29620, 0, 16384, 24576, 28672, 29696, 29697, 29568, - 29632, 29616, 29624, 29622, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 29632, 29616, 0, 16384, 24576, - 28672, 29696, 29697, 29568, 29632, 29633, 29624, 0, - 16384, 24576, 28672, 29696, 29697, 29568, 29632, 29633, - 29624, 0, 16384, 24576, 28672, 29696, 29697, 29568, - 29632, 29633, 29624, 29626, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 29632, 29633, 29624, 0, 16384, - 24576, 28672, 29696, 29697, 29568, 29632, 29633, 29624, - 29628, 0, 16384, 24576, 28672, 29696, 29697, 29568, - 29632, 29633, 29635, 29628, 0, 16384, 24576, 28672, - 29696, 29697, 29568, 29632, 29633, 29635, 29628, 29630, - 0, 16384, 24576, 28672, 29696, 29697, 29568, 0, - 16384, 24576, 28672, 29696, 29697, 29568, 29632, 0, - 16384, 24576, 28672, 29696, 29697, 29568, 29632, 0, - 16384, 24576, 28672, 29696, 29697, 29568, 29632, 29634, - 0, 16384, 24576, 28672, 29696, 29697, 29699, 29632, - 0, 16384, 24576, 28672, 29696, 29697, 29699, 29632, - 29636, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29632, 29636, 0, 16384, 24576, 28672, 29696, 29697, - 29699, 29632, 29640, 29638, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29632, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29632, 29640, 0, 16384, 24576, - 28672, 29696, 29697, 29699, 29632, 29640, 0, 16384, - 24576, 28672, 29696, 29697, 29699, 29632, 29640, 29642, - 0, 16384, 24576, 28672, 29696, 29697, 29699, 29632, - 29640, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29632, 29648, 29644, 0, 16384, 24576, 28672, 29696, - 29697, 29699, 29632, 29648, 29644, 0, 16384, 24576, - 28672, 29696, 29697, 29699, 29632, 29648, 29649, 29646, - 0, 16384, 24576, 28672, 29696, 29697, 29699, 29632, - 0, 16384, 24576, 28672, 29696, 29697, 29699, 29632, - 29648, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29632, 29648, 0, 16384, 24576, 28672, 29696, 29697, - 29699, 29632, 29648, 29650, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29632, 29648, 0, 16384, 24576, - 28672, 29696, 29697, 29699, 29632, 29648, 29652, 0, - 16384, 24576, 28672, 29696, 29697, 29699, 29632, 29648, - 29652, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29632, 29648, 29656, 29654, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29632, 29648, 0, 16384, 24576, - 28672, 29696, 29697, 29699, 29632, 29664, 29656, 0, - 16384, 24576, 28672, 29696, 29697, 29699, 29632, 29664, - 29656, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29632, 29664, 29656, 29658, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29632, 29664, 29656, 0, 16384, - 24576, 28672, 29696, 29697, 29699, 29632, 29664, 29665, - 29660, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29632, 29664, 29665, 29660, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29632, 29664, 29665, 29660, 29662, - 0, 16384, 24576, 28672, 29696, 29697, 29699, 29632, - 0, 16384, 24576, 28672, 29696, 29697, 29699, 29632, - 29664, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29632, 29664, 0, 16384, 24576, 28672, 29696, 29697, - 29699, 29632, 29664, 29666, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29632, 29664, 0, 16384, 24576, - 28672, 29696, 29697, 29699, 29632, 29664, 29668, 0, - 16384, 24576, 28672, 29696, 29697, 29699, 29632, 29664, - 29668, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29632, 29664, 29672, 29670, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29703, 29664, 0, 16384, 24576, - 28672, 29696, 29697, 29699, 29703, 29664, 29672, 0, - 16384, 24576, 28672, 29696, 29697, 29699, 29703, 29664, - 29672, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29703, 29664, 29672, 29674, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29703, 29664, 29672, 0, 16384, - 24576, 28672, 29696, 29697, 29699, 29703, 29664, 29680, - 29676, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29703, 29664, 29680, 29676, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29703, 29664, 29680, 29681, 29678, - 0, 16384, 24576, 28672, 29696, 29697, 29699, 29703, - 29664, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29703, 29664, 29680, 0, 16384, 24576, 28672, 29696, - 29697, 29699, 29703, 29664, 29680, 0, 16384, 24576, - 28672, 29696, 29697, 29699, 29703, 29664, 29680, 29682, - 0, 16384, 24576, 28672, 29696, 29697, 29699, 29703, - 29664, 29680, 0, 16384, 24576, 28672, 29696, 29697, - 29699, 29703, 29664, 29680, 29684, 0, 16384, 24576, - 28672, 29696, 29697, 29699, 29703, 29664, 29680, 29684, - 0, 16384, 24576, 28672, 29696, 29697, 29699, 29703, - 29664, 29680, 29688, 29686, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29703, 29664, 29680, 0, 16384, - 24576, 28672, 29696, 29697, 29699, 29703, 29664, 29680, - 29688, 0, 16384, 24576, 28672, 29696, 29697, 29699, - 29703, 29664, 29680, 29688, 0, 16384, 24576, 28672, - 29696, 29697, 29699, 29703, 29664, 29680, 29688, 29690, - 0, 16384, 24576, 28672, 29696, 29697, 29699, 29703, - 29664, 29680, 29688, 0, 16384, 24576, 28672, 29696, - 29697, 29699, 29703, 29664, 29680, 29688, 29692, 0, - 16384, 24576, 28672, 29696, 29697, 29699, 29703, 29664, - 29680, 29688, 29692, 0, 16384, 24576, 28672, 29696, - 29697, 29699, 29703, 29664, 29680, 29688, 29692, 29694, - 0, 16384, 24576, 28672, 0, 16384, 24576, 28672, - 29696, 0, 16384, 24576, 28672, 29696, 0, 16384, - 24576, 28672, 29696, 29698, 0, 16384, 24576, 28672, - 29696, 0, 16384, 24576, 28672, 29696, 29700, 0, - 16384, 24576, 28672, 29696, 29700, 0, 16384, 24576, - 28672, 29696, 29704, 29702, 0, 16384, 24576, 28672, - 29696, 0, 16384, 24576, 28672, 29696, 29704, 0, - 16384, 24576, 28672, 29696, 29704, 0, 16384, 24576, - 28672, 29696, 29704, 29706, 0, 16384, 24576, 28672, - 29696, 29704, 0, 16384, 24576, 28672, 29696, 29712, - 29708, 0, 16384, 24576, 28672, 29696, 29712, 29708, - 0, 16384, 24576, 28672, 29696, 29712, 29713, 29710, - 0, 16384, 24576, 28672, 29696, 0, 16384, 24576, - 28672, 29696, 29712, 0, 16384, 24576, 28672, 29696, - 29712, 0, 16384, 24576, 28672, 29696, 29712, 29714, - 0, 16384, 24576, 28672, 29696, 29712, 0, 16384, - 24576, 28672, 29696, 29712, 29716, 0, 16384, 24576, - 28672, 29696, 29712, 29716, 0, 16384, 24576, 28672, - 29696, 29712, 29720, 29718, 0, 16384, 24576, 28672, - 29696, 29712, 0, 16384, 24576, 28672, 29696, 29728, - 29720, 0, 16384, 24576, 28672, 29696, 29728, 29720, - 0, 16384, 24576, 28672, 29696, 29728, 29720, 29722, - 0, 16384, 24576, 28672, 29696, 29728, 29720, 0, - 16384, 24576, 28672, 29696, 29728, 29729, 29724, 0, - 16384, 24576, 28672, 29696, 29728, 29729, 29724, 0, - 16384, 24576, 28672, 29696, 29728, 29729, 29724, 29726, - 0, 16384, 24576, 28672, 29696, 0, 16384, 24576, - 28672, 29696, 29728, 0, 16384, 24576, 28672, 29696, - 29728, 0, 16384, 24576, 28672, 29696, 29728, 29730, - 0, 16384, 24576, 28672, 29696, 29728, 0, 16384, - 24576, 28672, 29696, 29728, 29732, 0, 16384, 24576, - 28672, 29696, 29728, 29732, 0, 16384, 24576, 28672, - 29696, 29728, 29736, 29734, 0, 16384, 24576, 28672, - 29696, 29728, 0, 16384, 24576, 28672, 29696, 29728, - 29736, 0, 16384, 24576, 28672, 29696, 29728, 29736, - 0, 16384, 24576, 28672, 29696, 29728, 29736, 29738, - 0, 16384, 24576, 28672, 29696, 29728, 29736, 0, - 16384, 24576, 28672, 29696, 29728, 29744, 29740, 0, - 16384, 24576, 28672, 29696, 29728, 29744, 29740, 0, - 16384, 24576, 28672, 29696, 29728, 29744, 29745, 29742, - 0, 16384, 24576, 28672, 29696, 29728, 0, 16384, - 24576, 28672, 29696, 29760, 29744, 0, 16384, 24576, - 28672, 29696, 29760, 29744, 0, 16384, 24576, 28672, - 29696, 29760, 29744, 29746, 0, 16384, 24576, 28672, - 29696, 29760, 29744, 0, 16384, 24576, 28672, 29696, - 29760, 29744, 29748, 0, 16384, 24576, 28672, 29696, - 29760, 29744, 29748, 0, 16384, 24576, 28672, 29696, - 29760, 29744, 29752, 29750, 0, 16384, 24576, 28672, - 29696, 29760, 29744, 0, 16384, 24576, 28672, 29696, - 29760, 29761, 29752, 0, 16384, 24576, 28672, 29696, - 29760, 29761, 29752, 0, 16384, 24576, 28672, 29696, - 29760, 29761, 29752, 29754, 0, 16384, 24576, 28672, - 29696, 29760, 29761, 29752, 0, 16384, 24576, 28672, - 29696, 29760, 29761, 29752, 29756, 0, 16384, 24576, - 28672, 29696, 29760, 29761, 29763, 29756, 0, 16384, - 24576, 28672, 29696, 29760, 29761, 29763, 29756, 29758, - 0, 16384, 24576, 28672, 29696, 0, 16384, 24576, - 28672, 29696, 29760, 0, 16384, 24576, 28672, 29696, - 29760, 0, 16384, 24576, 28672, 29696, 29760, 29762, - 0, 16384, 24576, 28672, 29696, 29760, 0, 16384, - 24576, 28672, 29696, 29760, 29764, 0, 16384, 24576, - 28672, 29696, 29760, 29764, 0, 16384, 24576, 28672, - 29696, 29760, 29768, 29766, 0, 16384, 24576, 28672, - 29696, 29760, 0, 16384, 24576, 28672, 29696, 29760, - 29768, 0, 16384, 24576, 28672, 29696, 29760, 29768, - 0, 16384, 24576, 28672, 29696, 29760, 29768, 29770, - 0, 16384, 24576, 28672, 29696, 29760, 29768, 0, - 16384, 24576, 28672, 29696, 29760, 29776, 29772, 0, - 16384, 24576, 28672, 29696, 29760, 29776, 29772, 0, - 16384, 24576, 28672, 29696, 29760, 29776, 29777, 29774, - 0, 16384, 24576, 28672, 29696, 29760, 0, 16384, - 24576, 28672, 29696, 29760, 29776, 0, 16384, 24576, - 28672, 29696, 29760, 29776, 0, 16384, 24576, 28672, - 29696, 29760, 29776, 29778, 0, 16384, 24576, 28672, - 29696, 29760, 29776, 0, 16384, 24576, 28672, 29696, - 29760, 29776, 29780, 0, 16384, 24576, 28672, 29696, - 29760, 29776, 29780, 0, 16384, 24576, 28672, 29696, - 29760, 29776, 29784, 29782, 0, 16384, 24576, 28672, - 29696, 29760, 29776, 0, 16384, 24576, 28672, 29696, - 29760, 29792, 29784, 0, 16384, 24576, 28672, 29696, - 29760, 29792, 29784, 0, 16384, 24576, 28672, 29696, - 29760, 29792, 29784, 29786, 0, 16384, 24576, 28672, - 29696, 29760, 29792, 29784, 0, 16384, 24576, 28672, - 29696, 29760, 29792, 29793, 29788, 0, 16384, 24576, - 28672, 29696, 29760, 29792, 29793, 29788, 0, 16384, - 24576, 28672, 29696, 29760, 29792, 29793, 29788, 29790, - 0, 16384, 24576, 28672, 29696, 29760, 0, 16384, - 24576, 28672, 29696, 29824, 29792, 0, 16384, 24576, - 28672, 29696, 29824, 29792, 0, 16384, 24576, 28672, - 29696, 29824, 29792, 29794, 0, 16384, 24576, 28672, - 29696, 29824, 29792, 0, 16384, 24576, 28672, 29696, - 29824, 29792, 29796, 0, 16384, 24576, 28672, 29696, - 29824, 29792, 29796, 0, 16384, 24576, 28672, 29696, - 29824, 29792, 29800, 29798, 0, 16384, 24576, 28672, - 29696, 29824, 29792, 0, 16384, 24576, 28672, 29696, - 29824, 29792, 29800, 0, 16384, 24576, 28672, 29696, - 29824, 29792, 29800, 0, 16384, 24576, 28672, 29696, - 29824, 29792, 29800, 29802, 0, 16384, 24576, 28672, - 29696, 29824, 29792, 29800, 0, 16384, 24576, 28672, - 29696, 29824, 29792, 29808, 29804, 0, 16384, 24576, - 28672, 29696, 29824, 29792, 29808, 29804, 0, 16384, - 24576, 28672, 29696, 29824, 29792, 29808, 29809, 29806, - 0, 16384, 24576, 28672, 29696, 29824, 29792, 0, - 16384, 24576, 28672, 29696, 29824, 29825, 29808, 0, - 16384, 24576, 28672, 29696, 29824, 29825, 29808, 0, - 16384, 24576, 28672, 29696, 29824, 29825, 29808, 29810, - 0, 16384, 24576, 28672, 29696, 29824, 29825, 29808, - 0, 16384, 24576, 28672, 29696, 29824, 29825, 29808, - 29812, 0, 16384, 24576, 28672, 29696, 29824, 29825, - 29808, 29812, 0, 16384, 24576, 28672, 29696, 29824, - 29825, 29808, 29816, 29814, 0, 16384, 24576, 28672, - 29696, 29824, 29825, 29808, 0, 16384, 24576, 28672, - 29696, 29824, 29825, 29808, 29816, 0, 16384, 24576, - 28672, 29696, 29824, 29825, 29827, 29816, 0, 16384, - 24576, 28672, 29696, 29824, 29825, 29827, 29816, 29818, - 0, 16384, 24576, 28672, 29696, 29824, 29825, 29827, - 29816, 0, 16384, 24576, 28672, 29696, 29824, 29825, - 29827, 29816, 29820, 0, 16384, 24576, 28672, 29696, - 29824, 29825, 29827, 29816, 29820, 0, 16384, 24576, - 28672, 29696, 29824, 29825, 29827, 29816, 29820, 29822, - 0, 16384, 24576, 28672, 29696, 0, 16384, 24576, - 28672, 29696, 29824, 0, 16384, 24576, 28672, 29696, - 29824, 0, 16384, 24576, 28672, 29696, 29824, 29826, - 0, 16384, 24576, 28672, 29696, 29824, 0, 16384, - 24576, 28672, 29696, 29824, 29828, 0, 16384, 24576, - 28672, 29696, 29824, 29828, 0, 16384, 24576, 28672, - 29696, 29824, 29832, 29830, 0, 16384, 24576, 28672, - 29696, 29824, 0, 16384, 24576, 28672, 29696, 29824, - 29832, 0, 16384, 24576, 28672, 29696, 29824, 29832, - 0, 16384, 24576, 28672, 29696, 29824, 29832, 29834, - 0, 16384, 24576, 28672, 29696, 29824, 29832, 0, - 16384, 24576, 28672, 29696, 29824, 29840, 29836, 0, - 16384, 24576, 28672, 29696, 29824, 29840, 29836, 0, - 16384, 24576, 28672, 29696, 29824, 29840, 29841, 29838, - 0, 16384, 24576, 28672, 29696, 29824, 0, 16384, - 24576, 28672, 29696, 29824, 29840, 0, 16384, 24576, - 28672, 29696, 29824, 29840, 0, 16384, 24576, 28672, - 29696, 29824, 29840, 29842, 0, 16384, 24576, 28672, - 29696, 29824, 29840, 0, 16384, 24576, 28672, 29696, - 29824, 29840, 29844, 0, 16384, 24576, 28672, 29696, - 29824, 29840, 29844, 0, 16384, 24576, 28672, 29696, - 29824, 29840, 29848, 29846, 0, 16384, 24576, 28672, - 29696, 29824, 29840, 0, 16384, 24576, 28672, 29696, - 29824, 29856, 29848, 0, 16384, 24576, 28672, 29696, - 29824, 29856, 29848, 0, 16384, 24576, 28672, 29696, - 29824, 29856, 29848, 29850, 0, 16384, 24576, 28672, - 29696, 29824, 29856, 29848, 0, 16384, 24576, 28672, - 29696, 29824, 29856, 29857, 29852, 0, 16384, 24576, - 28672, 29696, 29824, 29856, 29857, 29852, 0, 16384, - 24576, 28672, 29696, 29824, 29856, 29857, 29852, 29854, - 0, 16384, 24576, 28672, 29696, 29824, 0, 16384, - 24576, 28672, 29696, 29824, 29856, 0, 16384, 24576, - 28672, 29696, 29824, 29856, 0, 16384, 24576, 28672, - 29696, 29824, 29856, 29858, 0, 16384, 24576, 28672, - 29696, 29824, 29856, 0, 16384, 24576, 28672, 29696, - 29824, 29856, 29860, 0, 16384, 24576, 28672, 29696, - 29824, 29856, 29860, 0, 16384, 24576, 28672, 29696, - 29824, 29856, 29864, 29862, 0, 16384, 24576, 28672, - 29696, 29824, 29856, 0, 16384, 24576, 28672, 29696, - 29824, 29856, 29864, 0, 16384, 24576, 28672, 29696, - 29824, 29856, 29864, 0, 16384, 24576, 28672, 29696, - 29824, 29856, 29864, 29866, 0, 16384, 24576, 28672, - 29696, 29824, 29856, 29864, 0, 16384, 24576, 28672, - 29696, 29824, 29856, 29872, 29868, 0, 16384, 24576, - 28672, 29696, 29824, 29856, 29872, 29868, 0, 16384, - 24576, 28672, 29696, 29824, 29856, 29872, 29873, 29870, - 0, 16384, 24576, 28672, 29696, 29824, 29856, 0, - 16384, 24576, 28672, 29696, 29824, 29888, 29872, 0, - 16384, 24576, 28672, 29696, 29824, 29888, 29872, 0, - 16384, 24576, 28672, 29696, 29824, 29888, 29872, 29874, - 0, 16384, 24576, 28672, 29696, 29824, 29888, 29872, - 0, 16384, 24576, 28672, 29696, 29824, 29888, 29872, - 29876, 0, 16384, 24576, 28672, 29696, 29824, 29888, - 29872, 29876, 0, 16384, 24576, 28672, 29696, 29824, - 29888, 29872, 29880, 29878, 0, 16384, 24576, 28672, - 29696, 29824, 29888, 29872, 0, 16384, 24576, 28672, - 29696, 29824, 29888, 29889, 29880, 0, 16384, 24576, - 28672, 29696, 29824, 29888, 29889, 29880, 0, 16384, - 24576, 28672, 29696, 29824, 29888, 29889, 29880, 29882, - 0, 16384, 24576, 28672, 29696, 29824, 29888, 29889, - 29880, 0, 16384, 24576, 28672, 29696, 29824, 29888, - 29889, 29880, 29884, 0, 16384, 24576, 28672, 29696, - 29824, 29888, 29889, 29891, 29884, 0, 16384, 24576, - 28672, 29696, 29824, 29888, 29889, 29891, 29884, 29886, - 0, 16384, 24576, 28672, 29696, 29824, 0, 16384, - 24576, 28672, 29696, 29952, 29888, 0, 16384, 24576, - 28672, 29696, 29952, 29888, 0, 16384, 24576, 28672, - 29696, 29952, 29888, 29890, 0, 16384, 24576, 28672, - 29696, 29952, 29888, 0, 16384, 24576, 28672, 29696, - 29952, 29888, 29892, 0, 16384, 24576, 28672, 29696, - 29952, 29888, 29892, 0, 16384, 24576, 28672, 29696, - 29952, 29888, 29896, 29894, 0, 16384, 24576, 28672, - 29696, 29952, 29888, 0, 16384, 24576, 28672, 29696, - 29952, 29888, 29896, 0, 16384, 24576, 28672, 29696, - 29952, 29888, 29896, 0, 16384, 24576, 28672, 29696, - 29952, 29888, 29896, 29898, 0, 16384, 24576, 28672, - 29696, 29952, 29888, 29896, 0, 16384, 24576, 28672, - 29696, 29952, 29888, 29904, 29900, 0, 16384, 24576, - 28672, 29696, 29952, 29888, 29904, 29900, 0, 16384, - 24576, 28672, 29696, 29952, 29888, 29904, 29905, 29902, - 0, 16384, 24576, 28672, 29696, 29952, 29888, 0, - 16384, 24576, 28672, 29696, 29952, 29888, 29904, 0, - 16384, 24576, 28672, 29696, 29952, 29888, 29904, 0, - 16384, 24576, 28672, 29696, 29952, 29888, 29904, 29906, - 0, 16384, 24576, 28672, 29696, 29952, 29888, 29904, - 0, 16384, 24576, 28672, 29696, 29952, 29888, 29904, - 29908, 0, 16384, 24576, 28672, 29696, 29952, 29888, - 29904, 29908, 0, 16384, 24576, 28672, 29696, 29952, - 29888, 29904, 29912, 29910, 0, 16384, 24576, 28672, - 29696, 29952, 29888, 29904, 0, 16384, 24576, 28672, - 29696, 29952, 29888, 29920, 29912, 0, 16384, 24576, - 28672, 29696, 29952, 29888, 29920, 29912, 0, 16384, - 24576, 28672, 29696, 29952, 29888, 29920, 29912, 29914, - 0, 16384, 24576, 28672, 29696, 29952, 29888, 29920, - 29912, 0, 16384, 24576, 28672, 29696, 29952, 29888, - 29920, 29921, 29916, 0, 16384, 24576, 28672, 29696, - 29952, 29888, 29920, 29921, 29916, 0, 16384, 24576, - 28672, 29696, 29952, 29888, 29920, 29921, 29916, 29918, - 0, 16384, 24576, 28672, 29696, 29952, 29888, 0, - 16384, 24576, 28672, 29696, 29952, 29953, 29920, 0, - 16384, 24576, 28672, 29696, 29952, 29953, 29920, 0, - 16384, 24576, 28672, 29696, 29952, 29953, 29920, 29922, - 0, 16384, 24576, 28672, 29696, 29952, 29953, 29920, - 0, 16384, 24576, 28672, 29696, 29952, 29953, 29920, - 29924, 0, 16384, 24576, 28672, 29696, 29952, 29953, - 29920, 29924, 0, 16384, 24576, 28672, 29696, 29952, - 29953, 29920, 29928, 29926, 0, 16384, 24576, 28672, - 29696, 29952, 29953, 29920, 0, 16384, 24576, 28672, - 29696, 29952, 29953, 29920, 29928, 0, 16384, 24576, - 28672, 29696, 29952, 29953, 29920, 29928, 0, 16384, - 24576, 28672, 29696, 29952, 29953, 29920, 29928, 29930, - 0, 16384, 24576, 28672, 29696, 29952, 29953, 29920, - 29928, 0, 16384, 24576, 28672, 29696, 29952, 29953, - 29920, 29936, 29932, 0, 16384, 24576, 28672, 29696, - 29952, 29953, 29920, 29936, 29932, 0, 16384, 24576, - 28672, 29696, 29952, 29953, 29920, 29936, 29937, 29934, - 0, 16384, 24576, 28672, 29696, 29952, 29953, 29920, - 0, 16384, 24576, 28672, 29696, 29952, 29953, 29920, - 29936, 0, 16384, 24576, 28672, 29696, 29952, 29953, - 29955, 29936, 0, 16384, 24576, 28672, 29696, 29952, - 29953, 29955, 29936, 29938, 0, 16384, 24576, 28672, - 29696, 29952, 29953, 29955, 29936, 0, 16384, 24576, - 28672, 29696, 29952, 29953, 29955, 29936, 29940, 0, - 16384, 24576, 28672, 29696, 29952, 29953, 29955, 29936, - 29940, 0, 16384, 24576, 28672, 29696, 29952, 29953, - 29955, 29936, 29944, 29942, 0, 16384, 24576, 28672, - 29696, 29952, 29953, 29955, 29936, 0, 16384, 24576, - 28672, 29696, 29952, 29953, 29955, 29936, 29944, 0, - 16384, 24576, 28672, 29696, 29952, 29953, 29955, 29936, - 29944, 0, 16384, 24576, 28672, 29696, 29952, 29953, - 29955, 29936, 29944, 29946, 0, 16384, 24576, 28672, - 29696, 29952, 29953, 29955, 29959, 29944, 0, 16384, - 24576, 28672, 29696, 29952, 29953, 29955, 29959, 29944, - 29948, 0, 16384, 24576, 28672, 29696, 29952, 29953, - 29955, 29959, 29944, 29948, 0, 16384, 24576, 28672, - 29696, 29952, 29953, 29955, 29959, 29944, 29948, 29950, - 0, 16384, 24576, 28672, 29696, 0, 16384, 24576, - 28672, 29696, 29952, 0, 16384, 24576, 28672, 29696, - 29952, 0, 16384, 24576, 28672, 29696, 29952, 29954, - 0, 16384, 24576, 28672, 29696, 29952, 0, 16384, - 24576, 28672, 29696, 29952, 29956, 0, 16384, 24576, - 28672, 29696, 29952, 29956, 0, 16384, 24576, 28672, - 29696, 29952, 29960, 29958, 0, 16384, 24576, 28672, - 29696, 29952, 0, 16384, 24576, 28672, 29696, 29952, - 29960, 0, 16384, 24576, 28672, 29696, 29952, 29960, - 0, 16384, 24576, 28672, 29696, 29952, 29960, 29962, - 0, 16384, 24576, 28672, 29696, 29952, 29960, 0, - 16384, 24576, 28672, 29696, 29952, 29968, 29964, 0, - 16384, 24576, 28672, 29696, 29952, 29968, 29964, 0, - 16384, 24576, 28672, 29696, 29952, 29968, 29969, 29966, - 0, 16384, 24576, 28672, 29696, 29952, 0, 16384, - 24576, 28672, 29696, 29952, 29968, 0, 16384, 24576, - 28672, 29696, 29952, 29968, 0, 16384, 24576, 28672, - 29696, 29952, 29968, 29970, 0, 16384, 24576, 28672, - 29696, 29952, 29968, 0, 16384, 24576, 28672, 29696, - 29952, 29968, 29972, 0, 16384, 24576, 28672, 29696, - 29952, 29968, 29972, 0, 16384, 24576, 28672, 29696, - 29952, 29968, 29976, 29974, 0, 16384, 24576, 28672, - 29696, 29952, 29968, 0, 16384, 24576, 28672, 29696, - 29952, 29984, 29976, 0, 16384, 24576, 28672, 29696, - 29952, 29984, 29976, 0, 16384, 24576, 28672, 29696, - 29952, 29984, 29976, 29978, 0, 16384, 24576, 28672, - 29696, 29952, 29984, 29976, 0, 16384, 24576, 28672, - 29696, 29952, 29984, 29985, 29980, 0, 16384, 24576, - 28672, 29696, 29952, 29984, 29985, 29980, 0, 16384, - 24576, 28672, 29696, 29952, 29984, 29985, 29980, 29982, - 0, 16384, 24576, 28672, 29696, 29952, 0, 16384, - 24576, 28672, 29696, 29952, 29984, 0, 16384, 24576, - 28672, 29696, 29952, 29984, 0, 16384, 24576, 28672, - 29696, 29952, 29984, 29986, 0, 16384, 24576, 28672, - 29696, 29952, 29984, 0, 16384, 24576, 28672, 29696, - 29952, 29984, 29988, 0, 16384, 24576, 28672, 29696, - 29952, 29984, 29988, 0, 16384, 24576, 28672, 29696, - 29952, 29984, 29992, 29990, 0, 16384, 24576, 28672, - 29696, 29952, 29984, 0, 16384, 24576, 28672, 29696, - 29952, 29984, 29992, 0, 16384, 24576, 28672, 29696, - 29952, 29984, 29992, 0, 16384, 24576, 28672, 29696, - 29952, 29984, 29992, 29994, 0, 16384, 24576, 28672, - 29696, 29952, 29984, 29992, 0, 16384, 24576, 28672, - 29696, 29952, 29984, 30000, 29996, 0, 16384, 24576, - 28672, 29696, 29952, 29984, 30000, 29996, 0, 16384, - 24576, 28672, 29696, 29952, 29984, 30000, 30001, 29998, - 0, 16384, 24576, 28672, 29696, 29952, 29984, 0, - 16384, 24576, 28672, 29696, 29952, 30016, 30000, 0, - 16384, 24576, 28672, 29696, 29952, 30016, 30000, 0, - 16384, 24576, 28672, 29696, 29952, 30016, 30000, 30002, - 0, 16384, 24576, 28672, 29696, 29952, 30016, 30000, - 0, 16384, 24576, 28672, 29696, 29952, 30016, 30000, - 30004, 0, 16384, 24576, 28672, 29696, 29952, 30016, - 30000, 30004, 0, 16384, 24576, 28672, 29696, 29952, - 30016, 30000, 30008, 30006, 0, 16384, 24576, 28672, - 29696, 29952, 30016, 30000, 0, 16384, 24576, 28672, - 29696, 29952, 30016, 30017, 30008, 0, 16384, 24576, - 28672, 29696, 29952, 30016, 30017, 30008, 0, 16384, - 24576, 28672, 29696, 29952, 30016, 30017, 30008, 30010, - 0, 16384, 24576, 28672, 29696, 29952, 30016, 30017, - 30008, 0, 16384, 24576, 28672, 29696, 29952, 30016, - 30017, 30008, 30012, 0, 16384, 24576, 28672, 29696, - 29952, 30016, 30017, 30019, 30012, 0, 16384, 24576, - 28672, 29696, 29952, 30016, 30017, 30019, 30012, 30014, - 0, 16384, 24576, 28672, 29696, 29952, 0, 16384, - 24576, 28672, 29696, 29952, 30016, 0, 16384, 24576, - 28672, 29696, 29952, 30016, 0, 16384, 24576, 28672, - 29696, 29952, 30016, 30018, 0, 16384, 24576, 28672, - 29696, 29952, 30016, 0, 16384, 24576, 28672, 29696, - 29952, 30016, 30020, 0, 16384, 24576, 28672, 29696, - 29952, 30016, 30020, 0, 16384, 24576, 28672, 29696, - 29952, 30016, 30024, 30022, 0, 16384, 24576, 28672, - 29696, 29952, 30016, 0, 16384, 24576, 28672, 29696, - 29952, 30016, 30024, 0, 16384, 24576, 28672, 29696, - 29952, 30016, 30024, 0, 16384, 24576, 28672, 29696, - 29952, 30016, 30024, 30026, 0, 16384, 24576, 28672, - 29696, 29952, 30016, 30024, 0, 16384, 24576, 28672, - 29696, 29952, 30016, 30032, 30028, 0, 16384, 24576, - 28672, 29696, 29952, 30016, 30032, 30028, 0, 16384, - 24576, 28672, 29696, 29952, 30016, 30032, 30033, 30030, - 0, 16384, 24576, 28672, 29696, 29952, 30016, 0, - 16384, 24576, 28672, 29696, 29952, 30016, 30032, 0, - 16384, 24576, 28672, 29696, 29952, 30016, 30032, 0, - 16384, 24576, 28672, 29696, 29952, 30016, 30032, 30034, - 0, 16384, 24576, 28672, 29696, 29952, 30016, 30032, - 0, 16384, 24576, 28672, 29696, 29952, 30016, 30032, - 30036, 0, 16384, 24576, 28672, 29696, 29952, 30016, - 30032, 30036, 0, 16384, 24576, 28672, 29696, 29952, - 30016, 30032, 30040, 30038, 0, 16384, 24576, 28672, - 29696, 29952, 30016, 30032, 0, 16384, 24576, 28672, - 29696, 29952, 30016, 30048, 30040, 0, 16384, 24576, - 28672, 29696, 29952, 30016, 30048, 30040, 0, 16384, - 24576, 28672, 29696, 29952, 30016, 30048, 30040, 30042, - 0, 16384, 24576, 28672, 29696, 29952, 30016, 30048, - 30040, 0, 16384, 24576, 28672, 29696, 29952, 30016, - 30048, 30049, 30044, 0, 16384, 24576, 28672, 29696, - 29952, 30016, 30048, 30049, 30044, 0, 16384, 24576, - 28672, 29696, 29952, 30016, 30048, 30049, 30044, 30046, - 0, 16384, 24576, 28672, 29696, 29952, 30016, 0, - 16384, 24576, 28672, 29696, 29952, 30080, 30048, 0, - 16384, 24576, 28672, 29696, 29952, 30080, 30048, 0, - 16384, 24576, 28672, 29696, 29952, 30080, 30048, 30050, - 0, 16384, 24576, 28672, 29696, 29952, 30080, 30048, - 0, 16384, 24576, 28672, 29696, 29952, 30080, 30048, - 30052, 0, 16384, 24576, 28672, 29696, 29952, 30080, - 30048, 30052, 0, 16384, 24576, 28672, 29696, 29952, - 30080, 30048, 30056, 30054, 0, 16384, 24576, 28672, - 29696, 29952, 30080, 30048, 0, 16384, 24576, 28672, - 29696, 29952, 30080, 30048, 30056, 0, 16384, 24576, - 28672, 29696, 29952, 30080, 30048, 30056, 0, 16384, - 24576, 28672, 29696, 29952, 30080, 30048, 30056, 30058, - 0, 16384, 24576, 28672, 29696, 29952, 30080, 30048, - 30056, 0, 16384, 24576, 28672, 29696, 29952, 30080, - 30048, 30064, 30060, 0, 16384, 24576, 28672, 29696, - 29952, 30080, 30048, 30064, 30060, 0, 16384, 24576, - 28672, 29696, 29952, 30080, 30048, 30064, 30065, 30062, - 0, 16384, 24576, 28672, 29696, 29952, 30080, 30048, - 0, 16384, 24576, 28672, 29696, 29952, 30080, 30081, - 30064, 0, 16384, 24576, 28672, 29696, 29952, 30080, - 30081, 30064, 0, 16384, 24576, 28672, 29696, 29952, - 30080, 30081, 30064, 30066, 0, 16384, 24576, 28672, - 29696, 29952, 30080, 30081, 30064, 0, 16384, 24576, - 28672, 29696, 29952, 30080, 30081, 30064, 30068, 0, - 16384, 24576, 28672, 29696, 29952, 30080, 30081, 30064, - 30068, 0, 16384, 24576, 28672, 29696, 29952, 30080, - 30081, 30064, 30072, 30070, 0, 16384, 24576, 28672, - 29696, 29952, 30080, 30081, 30064, 0, 16384, 24576, - 28672, 29696, 29952, 30080, 30081, 30064, 30072, 0, - 16384, 24576, 28672, 29696, 29952, 30080, 30081, 30083, - 30072, 0, 16384, 24576, 28672, 29696, 29952, 30080, - 30081, 30083, 30072, 30074, 0, 16384, 24576, 28672, - 29696, 29952, 30080, 30081, 30083, 30072, 0, 16384, - 24576, 28672, 29696, 29952, 30080, 30081, 30083, 30072, - 30076, 0, 16384, 24576, 28672, 29696, 29952, 30080, - 30081, 30083, 30072, 30076, 0, 16384, 24576, 28672, - 29696, 29952, 30080, 30081, 30083, 30072, 30076, 30078, - 0, 16384, 24576, 28672, 29696, 29952, 0, 16384, - 24576, 28672, 29696, 30208, 30080, 0, 16384, 24576, - 28672, 29696, 30208, 30080, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 30082, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 0, 16384, 24576, 28672, 29696, - 30208, 30080, 30084, 0, 16384, 24576, 28672, 29696, - 30208, 30080, 30084, 0, 16384, 24576, 28672, 29696, - 30208, 30080, 30088, 30086, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 0, 16384, 24576, 28672, 29696, - 30208, 30080, 30088, 0, 16384, 24576, 28672, 29696, - 30208, 30080, 30088, 0, 16384, 24576, 28672, 29696, - 30208, 30080, 30088, 30090, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 30088, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 30096, 30092, 0, 16384, 24576, - 28672, 29696, 30208, 30080, 30096, 30092, 0, 16384, - 24576, 28672, 29696, 30208, 30080, 30096, 30097, 30094, - 0, 16384, 24576, 28672, 29696, 30208, 30080, 0, - 16384, 24576, 28672, 29696, 30208, 30080, 30096, 0, - 16384, 24576, 28672, 29696, 30208, 30080, 30096, 0, - 16384, 24576, 28672, 29696, 30208, 30080, 30096, 30098, - 0, 16384, 24576, 28672, 29696, 30208, 30080, 30096, - 0, 16384, 24576, 28672, 29696, 30208, 30080, 30096, - 30100, 0, 16384, 24576, 28672, 29696, 30208, 30080, - 30096, 30100, 0, 16384, 24576, 28672, 29696, 30208, - 30080, 30096, 30104, 30102, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 30096, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 30112, 30104, 0, 16384, 24576, - 28672, 29696, 30208, 30080, 30112, 30104, 0, 16384, - 24576, 28672, 29696, 30208, 30080, 30112, 30104, 30106, - 0, 16384, 24576, 28672, 29696, 30208, 30080, 30112, - 30104, 0, 16384, 24576, 28672, 29696, 30208, 30080, - 30112, 30113, 30108, 0, 16384, 24576, 28672, 29696, - 30208, 30080, 30112, 30113, 30108, 0, 16384, 24576, - 28672, 29696, 30208, 30080, 30112, 30113, 30108, 30110, - 0, 16384, 24576, 28672, 29696, 30208, 30080, 0, - 16384, 24576, 28672, 29696, 30208, 30080, 30112, 0, - 16384, 24576, 28672, 29696, 30208, 30080, 30112, 0, - 16384, 24576, 28672, 29696, 30208, 30080, 30112, 30114, - 0, 16384, 24576, 28672, 29696, 30208, 30080, 30112, - 0, 16384, 24576, 28672, 29696, 30208, 30080, 30112, - 30116, 0, 16384, 24576, 28672, 29696, 30208, 30080, - 30112, 30116, 0, 16384, 24576, 28672, 29696, 30208, - 30080, 30112, 30120, 30118, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 30112, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 30112, 30120, 0, 16384, 24576, - 28672, 29696, 30208, 30080, 30112, 30120, 0, 16384, - 24576, 28672, 29696, 30208, 30080, 30112, 30120, 30122, - 0, 16384, 24576, 28672, 29696, 30208, 30080, 30112, - 30120, 0, 16384, 24576, 28672, 29696, 30208, 30080, - 30112, 30128, 30124, 0, 16384, 24576, 28672, 29696, - 30208, 30080, 30112, 30128, 30124, 0, 16384, 24576, - 28672, 29696, 30208, 30080, 30112, 30128, 30129, 30126, - 0, 16384, 24576, 28672, 29696, 30208, 30080, 30112, - 0, 16384, 24576, 28672, 29696, 30208, 30080, 30144, - 30128, 0, 16384, 24576, 28672, 29696, 30208, 30080, - 30144, 30128, 0, 16384, 24576, 28672, 29696, 30208, - 30080, 30144, 30128, 30130, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 30144, 30128, 0, 16384, 24576, - 28672, 29696, 30208, 30080, 30144, 30128, 30132, 0, - 16384, 24576, 28672, 29696, 30208, 30080, 30144, 30128, - 30132, 0, 16384, 24576, 28672, 29696, 30208, 30080, - 30144, 30128, 30136, 30134, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 30144, 30128, 0, 16384, 24576, - 28672, 29696, 30208, 30080, 30144, 30145, 30136, 0, - 16384, 24576, 28672, 29696, 30208, 30080, 30144, 30145, - 30136, 0, 16384, 24576, 28672, 29696, 30208, 30080, - 30144, 30145, 30136, 30138, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 30144, 30145, 30136, 0, 16384, - 24576, 28672, 29696, 30208, 30080, 30144, 30145, 30136, - 30140, 0, 16384, 24576, 28672, 29696, 30208, 30080, - 30144, 30145, 30147, 30140, 0, 16384, 24576, 28672, - 29696, 30208, 30080, 30144, 30145, 30147, 30140, 30142, - 0, 16384, 24576, 28672, 29696, 30208, 30080, 0, - 16384, 24576, 28672, 29696, 30208, 30209, 30144, 0, - 16384, 24576, 28672, 29696, 30208, 30209, 30144, 0, - 16384, 24576, 28672, 29696, 30208, 30209, 30144, 30146, - 0, 16384, 24576, 28672, 29696, 30208, 30209, 30144, - 0, 16384, 24576, 28672, 29696, 30208, 30209, 30144, - 30148, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30144, 30148, 0, 16384, 24576, 28672, 29696, 30208, - 30209, 30144, 30152, 30150, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30144, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30144, 30152, 0, 16384, 24576, - 28672, 29696, 30208, 30209, 30144, 30152, 0, 16384, - 24576, 28672, 29696, 30208, 30209, 30144, 30152, 30154, - 0, 16384, 24576, 28672, 29696, 30208, 30209, 30144, - 30152, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30144, 30160, 30156, 0, 16384, 24576, 28672, 29696, - 30208, 30209, 30144, 30160, 30156, 0, 16384, 24576, - 28672, 29696, 30208, 30209, 30144, 30160, 30161, 30158, - 0, 16384, 24576, 28672, 29696, 30208, 30209, 30144, - 0, 16384, 24576, 28672, 29696, 30208, 30209, 30144, - 30160, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30144, 30160, 0, 16384, 24576, 28672, 29696, 30208, - 30209, 30144, 30160, 30162, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30144, 30160, 0, 16384, 24576, - 28672, 29696, 30208, 30209, 30144, 30160, 30164, 0, - 16384, 24576, 28672, 29696, 30208, 30209, 30144, 30160, - 30164, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30144, 30160, 30168, 30166, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30144, 30160, 0, 16384, 24576, - 28672, 29696, 30208, 30209, 30144, 30176, 30168, 0, - 16384, 24576, 28672, 29696, 30208, 30209, 30144, 30176, - 30168, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30144, 30176, 30168, 30170, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30144, 30176, 30168, 0, 16384, - 24576, 28672, 29696, 30208, 30209, 30144, 30176, 30177, - 30172, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30144, 30176, 30177, 30172, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30144, 30176, 30177, 30172, 30174, - 0, 16384, 24576, 28672, 29696, 30208, 30209, 30144, - 0, 16384, 24576, 28672, 29696, 30208, 30209, 30144, - 30176, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30211, 30176, 0, 16384, 24576, 28672, 29696, 30208, - 30209, 30211, 30176, 30178, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30211, 30176, 0, 16384, 24576, - 28672, 29696, 30208, 30209, 30211, 30176, 30180, 0, - 16384, 24576, 28672, 29696, 30208, 30209, 30211, 30176, - 30180, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30211, 30176, 30184, 30182, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30211, 30176, 0, 16384, 24576, - 28672, 29696, 30208, 30209, 30211, 30176, 30184, 0, - 16384, 24576, 28672, 29696, 30208, 30209, 30211, 30176, - 30184, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30211, 30176, 30184, 30186, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30211, 30176, 30184, 0, 16384, - 24576, 28672, 29696, 30208, 30209, 30211, 30176, 30192, - 30188, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30211, 30176, 30192, 30188, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30211, 30176, 30192, 30193, 30190, - 0, 16384, 24576, 28672, 29696, 30208, 30209, 30211, - 30176, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30211, 30176, 30192, 0, 16384, 24576, 28672, 29696, - 30208, 30209, 30211, 30176, 30192, 0, 16384, 24576, - 28672, 29696, 30208, 30209, 30211, 30176, 30192, 30194, - 0, 16384, 24576, 28672, 29696, 30208, 30209, 30211, - 30215, 30192, 0, 16384, 24576, 28672, 29696, 30208, - 30209, 30211, 30215, 30192, 30196, 0, 16384, 24576, - 28672, 29696, 30208, 30209, 30211, 30215, 30192, 30196, - 0, 16384, 24576, 28672, 29696, 30208, 30209, 30211, - 30215, 30192, 30200, 30198, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30211, 30215, 30192, 0, 16384, - 24576, 28672, 29696, 30208, 30209, 30211, 30215, 30192, - 30200, 0, 16384, 24576, 28672, 29696, 30208, 30209, - 30211, 30215, 30192, 30200, 0, 16384, 24576, 28672, - 29696, 30208, 30209, 30211, 30215, 30192, 30200, 30202, - 0, 16384, 24576, 28672, 29696, 30208, 30209, 30211, - 30215, 30192, 30200, 0, 16384, 24576, 28672, 29696, - 30208, 30209, 30211, 30215, 30192, 30200, 30204, 0, - 16384, 24576, 28672, 29696, 30208, 30209, 30211, 30215, - 30192, 30200, 30204, 0, 16384, 24576, 28672, 29696, - 30208, 30209, 30211, 30215, 30192, 30200, 30204, 30206, - 0, 16384, 24576, 28672, 29696, 0, 16384, 24576, - 28672, 30720, 30208, 0, 16384, 24576, 28672, 30720, - 30208, 0, 16384, 24576, 28672, 30720, 30208, 30210, - 0, 16384, 24576, 28672, 30720, 30208, 0, 16384, - 24576, 28672, 30720, 30208, 30212, 0, 16384, 24576, - 28672, 30720, 30208, 30212, 0, 16384, 24576, 28672, - 30720, 30208, 30216, 30214, 0, 16384, 24576, 28672, - 30720, 30208, 0, 16384, 24576, 28672, 30720, 30208, - 30216, 0, 16384, 24576, 28672, 30720, 30208, 30216, - 0, 16384, 24576, 28672, 30720, 30208, 30216, 30218, - 0, 16384, 24576, 28672, 30720, 30208, 30216, 0, - 16384, 24576, 28672, 30720, 30208, 30224, 30220, 0, - 16384, 24576, 28672, 30720, 30208, 30224, 30220, 0, - 16384, 24576, 28672, 30720, 30208, 30224, 30225, 30222, - 0, 16384, 24576, 28672, 30720, 30208, 0, 16384, - 24576, 28672, 30720, 30208, 30224, 0, 16384, 24576, - 28672, 30720, 30208, 30224, 0, 16384, 24576, 28672, - 30720, 30208, 30224, 30226, 0, 16384, 24576, 28672, - 30720, 30208, 30224, 0, 16384, 24576, 28672, 30720, - 30208, 30224, 30228, 0, 16384, 24576, 28672, 30720, - 30208, 30224, 30228, 0, 16384, 24576, 28672, 30720, - 30208, 30224, 30232, 30230, 0, 16384, 24576, 28672, - 30720, 30208, 30224, 0, 16384, 24576, 28672, 30720, - 30208, 30240, 30232, 0, 16384, 24576, 28672, 30720, - 30208, 30240, 30232, 0, 16384, 24576, 28672, 30720, - 30208, 30240, 30232, 30234, 0, 16384, 24576, 28672, - 30720, 30208, 30240, 30232, 0, 16384, 24576, 28672, - 30720, 30208, 30240, 30241, 30236, 0, 16384, 24576, - 28672, 30720, 30208, 30240, 30241, 30236, 0, 16384, - 24576, 28672, 30720, 30208, 30240, 30241, 30236, 30238, - 0, 16384, 24576, 28672, 30720, 30208, 0, 16384, - 24576, 28672, 30720, 30208, 30240, 0, 16384, 24576, - 28672, 30720, 30208, 30240, 0, 16384, 24576, 28672, - 30720, 30208, 30240, 30242, 0, 16384, 24576, 28672, - 30720, 30208, 30240, 0, 16384, 24576, 28672, 30720, - 30208, 30240, 30244, 0, 16384, 24576, 28672, 30720, - 30208, 30240, 30244, 0, 16384, 24576, 28672, 30720, - 30208, 30240, 30248, 30246, 0, 16384, 24576, 28672, - 30720, 30208, 30240, 0, 16384, 24576, 28672, 30720, - 30208, 30240, 30248, 0, 16384, 24576, 28672, 30720, - 30208, 30240, 30248, 0, 16384, 24576, 28672, 30720, - 30208, 30240, 30248, 30250, 0, 16384, 24576, 28672, - 30720, 30208, 30240, 30248, 0, 16384, 24576, 28672, - 30720, 30208, 30240, 30256, 30252, 0, 16384, 24576, - 28672, 30720, 30208, 30240, 30256, 30252, 0, 16384, - 24576, 28672, 30720, 30208, 30240, 30256, 30257, 30254, - 0, 16384, 24576, 28672, 30720, 30208, 30240, 0, - 16384, 24576, 28672, 30720, 30208, 30272, 30256, 0, - 16384, 24576, 28672, 30720, 30208, 30272, 30256, 0, - 16384, 24576, 28672, 30720, 30208, 30272, 30256, 30258, - 0, 16384, 24576, 28672, 30720, 30208, 30272, 30256, - 0, 16384, 24576, 28672, 30720, 30208, 30272, 30256, - 30260, 0, 16384, 24576, 28672, 30720, 30208, 30272, - 30256, 30260, 0, 16384, 24576, 28672, 30720, 30208, - 30272, 30256, 30264, 30262, 0, 16384, 24576, 28672, - 30720, 30208, 30272, 30256, 0, 16384, 24576, 28672, - 30720, 30208, 30272, 30273, 30264, 0, 16384, 24576, - 28672, 30720, 30208, 30272, 30273, 30264, 0, 16384, - 24576, 28672, 30720, 30208, 30272, 30273, 30264, 30266, - 0, 16384, 24576, 28672, 30720, 30208, 30272, 30273, - 30264, 0, 16384, 24576, 28672, 30720, 30208, 30272, - 30273, 30264, 30268, 0, 16384, 24576, 28672, 30720, - 30208, 30272, 30273, 30275, 30268, 0, 16384, 24576, - 28672, 30720, 30208, 30272, 30273, 30275, 30268, 30270, - 0, 16384, 24576, 28672, 30720, 30208, 0, 16384, - 24576, 28672, 30720, 30208, 30272, 0, 16384, 24576, - 28672, 30720, 30208, 30272, 0, 16384, 24576, 28672, - 30720, 30208, 30272, 30274, 0, 16384, 24576, 28672, - 30720, 30208, 30272, 0, 16384, 24576, 28672, 30720, - 30208, 30272, 30276, 0, 16384, 24576, 28672, 30720, - 30208, 30272, 30276, 0, 16384, 24576, 28672, 30720, - 30208, 30272, 30280, 30278, 0, 16384, 24576, 28672, - 30720, 30208, 30272, 0, 16384, 24576, 28672, 30720, - 30208, 30272, 30280, 0, 16384, 24576, 28672, 30720, - 30208, 30272, 30280, 0, 16384, 24576, 28672, 30720, - 30208, 30272, 30280, 30282, 0, 16384, 24576, 28672, - 30720, 30208, 30272, 30280, 0, 16384, 24576, 28672, - 30720, 30208, 30272, 30288, 30284, 0, 16384, 24576, - 28672, 30720, 30208, 30272, 30288, 30284, 0, 16384, - 24576, 28672, 30720, 30208, 30272, 30288, 30289, 30286, - 0, 16384, 24576, 28672, 30720, 30208, 30272, 0, - 16384, 24576, 28672, 30720, 30208, 30272, 30288, 0, - 16384, 24576, 28672, 30720, 30208, 30272, 30288, 0, - 16384, 24576, 28672, 30720, 30208, 30272, 30288, 30290, - 0, 16384, 24576, 28672, 30720, 30208, 30272, 30288, - 0, 16384, 24576, 28672, 30720, 30208, 30272, 30288, - 30292, 0, 16384, 24576, 28672, 30720, 30208, 30272, - 30288, 30292, 0, 16384, 24576, 28672, 30720, 30208, - 30272, 30288, 30296, 30294, 0, 16384, 24576, 28672, - 30720, 30208, 30272, 30288, 0, 16384, 24576, 28672, - 30720, 30208, 30272, 30304, 30296, 0, 16384, 24576, - 28672, 30720, 30208, 30272, 30304, 30296, 0, 16384, - 24576, 28672, 30720, 30208, 30272, 30304, 30296, 30298, - 0, 16384, 24576, 28672, 30720, 30208, 30272, 30304, - 30296, 0, 16384, 24576, 28672, 30720, 30208, 30272, - 30304, 30305, 30300, 0, 16384, 24576, 28672, 30720, - 30208, 30272, 30304, 30305, 30300, 0, 16384, 24576, - 28672, 30720, 30208, 30272, 30304, 30305, 30300, 30302, - 0, 16384, 24576, 28672, 30720, 30208, 30272, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30304, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30304, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30304, 30306, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30304, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30304, - 30308, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30304, 30308, 0, 16384, 24576, 28672, 30720, 30208, - 30336, 30304, 30312, 30310, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30304, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30304, 30312, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 30304, 30312, 0, 16384, - 24576, 28672, 30720, 30208, 30336, 30304, 30312, 30314, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30304, - 30312, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30304, 30320, 30316, 0, 16384, 24576, 28672, 30720, - 30208, 30336, 30304, 30320, 30316, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 30304, 30320, 30321, 30318, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30304, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30337, - 30320, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30337, 30320, 0, 16384, 24576, 28672, 30720, 30208, - 30336, 30337, 30320, 30322, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30337, 30320, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 30337, 30320, 30324, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30337, 30320, - 30324, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30337, 30320, 30328, 30326, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30337, 30320, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 30337, 30320, 30328, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30337, 30339, - 30328, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30337, 30339, 30328, 30330, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30337, 30339, 30328, 0, 16384, - 24576, 28672, 30720, 30208, 30336, 30337, 30339, 30328, - 30332, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30337, 30339, 30328, 30332, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30337, 30339, 30328, 30332, 30334, - 0, 16384, 24576, 28672, 30720, 30208, 0, 16384, - 24576, 28672, 30720, 30208, 30336, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30338, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 0, 16384, 24576, 28672, 30720, - 30208, 30336, 30340, 0, 16384, 24576, 28672, 30720, - 30208, 30336, 30340, 0, 16384, 24576, 28672, 30720, - 30208, 30336, 30344, 30342, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 0, 16384, 24576, 28672, 30720, - 30208, 30336, 30344, 0, 16384, 24576, 28672, 30720, - 30208, 30336, 30344, 0, 16384, 24576, 28672, 30720, - 30208, 30336, 30344, 30346, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30344, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30352, 30348, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 30352, 30348, 0, 16384, - 24576, 28672, 30720, 30208, 30336, 30352, 30353, 30350, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30352, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30352, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30352, 30354, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30352, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30352, - 30356, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30352, 30356, 0, 16384, 24576, 28672, 30720, 30208, - 30336, 30352, 30360, 30358, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30352, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30368, 30360, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 30368, 30360, 0, 16384, - 24576, 28672, 30720, 30208, 30336, 30368, 30360, 30362, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30368, - 30360, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30368, 30369, 30364, 0, 16384, 24576, 28672, 30720, - 30208, 30336, 30368, 30369, 30364, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 30368, 30369, 30364, 30366, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30368, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30368, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30368, 30370, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30368, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30368, - 30372, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30368, 30372, 0, 16384, 24576, 28672, 30720, 30208, - 30336, 30368, 30376, 30374, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30368, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30368, 30376, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 30368, 30376, 0, 16384, - 24576, 28672, 30720, 30208, 30336, 30368, 30376, 30378, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30368, - 30376, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30368, 30384, 30380, 0, 16384, 24576, 28672, 30720, - 30208, 30336, 30368, 30384, 30380, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 30368, 30384, 30385, 30382, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30368, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 30400, - 30384, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30400, 30384, 0, 16384, 24576, 28672, 30720, 30208, - 30336, 30400, 30384, 30386, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30400, 30384, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 30400, 30384, 30388, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30400, 30384, - 30388, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30400, 30384, 30392, 30390, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30400, 30384, 0, 16384, 24576, - 28672, 30720, 30208, 30336, 30400, 30401, 30392, 0, - 16384, 24576, 28672, 30720, 30208, 30336, 30400, 30401, - 30392, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30400, 30401, 30392, 30394, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30400, 30401, 30392, 0, 16384, - 24576, 28672, 30720, 30208, 30336, 30400, 30401, 30392, - 30396, 0, 16384, 24576, 28672, 30720, 30208, 30336, - 30400, 30401, 30403, 30396, 0, 16384, 24576, 28672, - 30720, 30208, 30336, 30400, 30401, 30403, 30396, 30398, - 0, 16384, 24576, 28672, 30720, 30208, 30336, 0, - 16384, 24576, 28672, 30720, 30208, 30464, 30400, 0, - 16384, 24576, 28672, 30720, 30208, 30464, 30400, 0, - 16384, 24576, 28672, 30720, 30208, 30464, 30400, 30402, - 0, 16384, 24576, 28672, 30720, 30208, 30464, 30400, - 0, 16384, 24576, 28672, 30720, 30208, 30464, 30400, - 30404, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30400, 30404, 0, 16384, 24576, 28672, 30720, 30208, - 30464, 30400, 30408, 30406, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30400, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30400, 30408, 0, 16384, 24576, - 28672, 30720, 30208, 30464, 30400, 30408, 0, 16384, - 24576, 28672, 30720, 30208, 30464, 30400, 30408, 30410, - 0, 16384, 24576, 28672, 30720, 30208, 30464, 30400, - 30408, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30400, 30416, 30412, 0, 16384, 24576, 28672, 30720, - 30208, 30464, 30400, 30416, 30412, 0, 16384, 24576, - 28672, 30720, 30208, 30464, 30400, 30416, 30417, 30414, - 0, 16384, 24576, 28672, 30720, 30208, 30464, 30400, - 0, 16384, 24576, 28672, 30720, 30208, 30464, 30400, - 30416, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30400, 30416, 0, 16384, 24576, 28672, 30720, 30208, - 30464, 30400, 30416, 30418, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30400, 30416, 0, 16384, 24576, - 28672, 30720, 30208, 30464, 30400, 30416, 30420, 0, - 16384, 24576, 28672, 30720, 30208, 30464, 30400, 30416, - 30420, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30400, 30416, 30424, 30422, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30400, 30416, 0, 16384, 24576, - 28672, 30720, 30208, 30464, 30400, 30432, 30424, 0, - 16384, 24576, 28672, 30720, 30208, 30464, 30400, 30432, - 30424, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30400, 30432, 30424, 30426, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30400, 30432, 30424, 0, 16384, - 24576, 28672, 30720, 30208, 30464, 30400, 30432, 30433, - 30428, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30400, 30432, 30433, 30428, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30400, 30432, 30433, 30428, 30430, - 0, 16384, 24576, 28672, 30720, 30208, 30464, 30400, - 0, 16384, 24576, 28672, 30720, 30208, 30464, 30465, - 30432, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30465, 30432, 0, 16384, 24576, 28672, 30720, 30208, - 30464, 30465, 30432, 30434, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30465, 30432, 0, 16384, 24576, - 28672, 30720, 30208, 30464, 30465, 30432, 30436, 0, - 16384, 24576, 28672, 30720, 30208, 30464, 30465, 30432, - 30436, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30465, 30432, 30440, 30438, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30465, 30432, 0, 16384, 24576, - 28672, 30720, 30208, 30464, 30465, 30432, 30440, 0, - 16384, 24576, 28672, 30720, 30208, 30464, 30465, 30432, - 30440, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30465, 30432, 30440, 30442, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30465, 30432, 30440, 0, 16384, - 24576, 28672, 30720, 30208, 30464, 30465, 30432, 30448, - 30444, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30465, 30432, 30448, 30444, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30465, 30432, 30448, 30449, 30446, - 0, 16384, 24576, 28672, 30720, 30208, 30464, 30465, - 30432, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30465, 30432, 30448, 0, 16384, 24576, 28672, 30720, - 30208, 30464, 30465, 30467, 30448, 0, 16384, 24576, - 28672, 30720, 30208, 30464, 30465, 30467, 30448, 30450, - 0, 16384, 24576, 28672, 30720, 30208, 30464, 30465, - 30467, 30448, 0, 16384, 24576, 28672, 30720, 30208, - 30464, 30465, 30467, 30448, 30452, 0, 16384, 24576, - 28672, 30720, 30208, 30464, 30465, 30467, 30448, 30452, - 0, 16384, 24576, 28672, 30720, 30208, 30464, 30465, - 30467, 30448, 30456, 30454, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30465, 30467, 30448, 0, 16384, - 24576, 28672, 30720, 30208, 30464, 30465, 30467, 30448, - 30456, 0, 16384, 24576, 28672, 30720, 30208, 30464, - 30465, 30467, 30448, 30456, 0, 16384, 24576, 28672, - 30720, 30208, 30464, 30465, 30467, 30448, 30456, 30458, - 0, 16384, 24576, 28672, 30720, 30208, 30464, 30465, - 30467, 30471, 30456, 0, 16384, 24576, 28672, 30720, - 30208, 30464, 30465, 30467, 30471, 30456, 30460, 0, - 16384, 24576, 28672, 30720, 30208, 30464, 30465, 30467, - 30471, 30456, 30460, 0, 16384, 24576, 28672, 30720, - 30208, 30464, 30465, 30467, 30471, 30456, 30460, 30462, - 0, 16384, 24576, 28672, 30720, 30208, 0, 16384, - 24576, 28672, 30720, 30208, 30464, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30466, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30468, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30468, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30472, 30470, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30472, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30472, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30472, 30474, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30472, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30480, 30476, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30480, 30476, 0, 16384, - 24576, 28672, 30720, 30721, 30464, 30480, 30481, 30478, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30480, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30480, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30480, 30482, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30480, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30480, - 30484, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30480, 30484, 0, 16384, 24576, 28672, 30720, 30721, - 30464, 30480, 30488, 30486, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30480, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30496, 30488, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30496, 30488, 0, 16384, - 24576, 28672, 30720, 30721, 30464, 30496, 30488, 30490, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30496, - 30488, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30496, 30497, 30492, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30496, 30497, 30492, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30496, 30497, 30492, 30494, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30496, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30496, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30496, 30498, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30496, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30496, - 30500, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30496, 30500, 0, 16384, 24576, 28672, 30720, 30721, - 30464, 30496, 30504, 30502, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30496, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30496, 30504, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30496, 30504, 0, 16384, - 24576, 28672, 30720, 30721, 30464, 30496, 30504, 30506, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30496, - 30504, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30496, 30512, 30508, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30496, 30512, 30508, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30496, 30512, 30513, 30510, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30496, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30528, - 30512, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30528, 30512, 0, 16384, 24576, 28672, 30720, 30721, - 30464, 30528, 30512, 30514, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30528, 30512, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30528, 30512, 30516, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30528, 30512, - 30516, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30528, 30512, 30520, 30518, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30528, 30512, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30528, 30529, 30520, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30528, 30529, - 30520, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30528, 30529, 30520, 30522, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30528, 30529, 30520, 0, 16384, - 24576, 28672, 30720, 30721, 30464, 30528, 30529, 30520, - 30524, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30528, 30529, 30531, 30524, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30528, 30529, 30531, 30524, 30526, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30528, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30528, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30528, 30530, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30528, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30528, - 30532, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30528, 30532, 0, 16384, 24576, 28672, 30720, 30721, - 30464, 30528, 30536, 30534, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30528, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30528, 30536, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30528, 30536, 0, 16384, - 24576, 28672, 30720, 30721, 30464, 30528, 30536, 30538, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30528, - 30536, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30528, 30544, 30540, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30528, 30544, 30540, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30528, 30544, 30545, 30542, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30528, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30528, - 30544, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30528, 30544, 0, 16384, 24576, 28672, 30720, 30721, - 30464, 30528, 30544, 30546, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30528, 30544, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30528, 30544, 30548, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30528, 30544, - 30548, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30528, 30544, 30552, 30550, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30528, 30544, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30528, 30560, 30552, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30528, 30560, - 30552, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30528, 30560, 30552, 30554, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30528, 30560, 30552, 0, 16384, - 24576, 28672, 30720, 30721, 30464, 30528, 30560, 30561, - 30556, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30528, 30560, 30561, 30556, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30528, 30560, 30561, 30556, 30558, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30528, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30592, - 30560, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30592, 30560, 0, 16384, 24576, 28672, 30720, 30721, - 30464, 30592, 30560, 30562, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30592, 30560, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30592, 30560, 30564, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30592, 30560, - 30564, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30592, 30560, 30568, 30566, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30592, 30560, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30592, 30560, 30568, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30592, 30560, - 30568, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30592, 30560, 30568, 30570, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30592, 30560, 30568, 0, 16384, - 24576, 28672, 30720, 30721, 30464, 30592, 30560, 30576, - 30572, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30592, 30560, 30576, 30572, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30592, 30560, 30576, 30577, 30574, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30592, - 30560, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30592, 30593, 30576, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30592, 30593, 30576, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30592, 30593, 30576, 30578, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30592, - 30593, 30576, 0, 16384, 24576, 28672, 30720, 30721, - 30464, 30592, 30593, 30576, 30580, 0, 16384, 24576, - 28672, 30720, 30721, 30464, 30592, 30593, 30576, 30580, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30592, - 30593, 30576, 30584, 30582, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30592, 30593, 30576, 0, 16384, - 24576, 28672, 30720, 30721, 30464, 30592, 30593, 30576, - 30584, 0, 16384, 24576, 28672, 30720, 30721, 30464, - 30592, 30593, 30595, 30584, 0, 16384, 24576, 28672, - 30720, 30721, 30464, 30592, 30593, 30595, 30584, 30586, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 30592, - 30593, 30595, 30584, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30592, 30593, 30595, 30584, 30588, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30592, 30593, - 30595, 30584, 30588, 0, 16384, 24576, 28672, 30720, - 30721, 30464, 30592, 30593, 30595, 30584, 30588, 30590, - 0, 16384, 24576, 28672, 30720, 30721, 30464, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30592, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30592, 0, - 16384, 24576, 28672, 30720, 30721, 30464, 30592, 30594, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 30596, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30596, 0, 16384, 24576, 28672, 30720, 30721, - 30723, 30592, 30600, 30598, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30600, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30592, 30600, 0, 16384, - 24576, 28672, 30720, 30721, 30723, 30592, 30600, 30602, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 30600, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30608, 30604, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30592, 30608, 30604, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30592, 30608, 30609, 30606, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 30608, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30608, 0, 16384, 24576, 28672, 30720, 30721, - 30723, 30592, 30608, 30610, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30608, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30592, 30608, 30612, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30592, 30608, - 30612, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30608, 30616, 30614, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30608, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30592, 30624, 30616, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30592, 30624, - 30616, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30624, 30616, 30618, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30624, 30616, 0, 16384, - 24576, 28672, 30720, 30721, 30723, 30592, 30624, 30625, - 30620, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30624, 30625, 30620, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30624, 30625, 30620, 30622, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 30624, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30624, 0, 16384, 24576, 28672, 30720, 30721, - 30723, 30592, 30624, 30626, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30624, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30592, 30624, 30628, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30592, 30624, - 30628, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30624, 30632, 30630, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30624, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30592, 30624, 30632, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30592, 30624, - 30632, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30624, 30632, 30634, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30624, 30632, 0, 16384, - 24576, 28672, 30720, 30721, 30723, 30592, 30624, 30640, - 30636, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30624, 30640, 30636, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30624, 30640, 30641, 30638, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 30624, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30656, 30640, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30592, 30656, 30640, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30592, 30656, 30640, 30642, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 30656, 30640, 0, 16384, 24576, 28672, 30720, 30721, - 30723, 30592, 30656, 30640, 30644, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30592, 30656, 30640, 30644, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 30656, 30640, 30648, 30646, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30656, 30640, 0, 16384, - 24576, 28672, 30720, 30721, 30723, 30592, 30656, 30657, - 30648, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30656, 30657, 30648, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30656, 30657, 30648, 30650, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 30656, 30657, 30648, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30592, 30656, 30657, 30648, 30652, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30592, 30656, - 30657, 30659, 30652, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30592, 30656, 30657, 30659, 30652, 30654, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30592, - 30656, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30656, 0, 16384, 24576, 28672, 30720, 30721, - 30723, 30592, 30656, 30658, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30592, 30656, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30592, 30656, 30660, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30592, 30656, - 30660, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30592, 30656, 30664, 30662, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30727, 30656, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30727, 30656, 30664, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30727, 30656, - 30664, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30727, 30656, 30664, 30666, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30727, 30656, 30664, 0, 16384, - 24576, 28672, 30720, 30721, 30723, 30727, 30656, 30672, - 30668, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30727, 30656, 30672, 30668, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30727, 30656, 30672, 30673, 30670, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30727, - 30656, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30727, 30656, 30672, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30727, 30656, 30672, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30727, 30656, 30672, 30674, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30727, - 30656, 30672, 0, 16384, 24576, 28672, 30720, 30721, - 30723, 30727, 30656, 30672, 30676, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30727, 30656, 30672, 30676, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30727, - 30656, 30672, 30680, 30678, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30727, 30656, 30672, 0, 16384, - 24576, 28672, 30720, 30721, 30723, 30727, 30656, 30688, - 30680, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30727, 30656, 30688, 30680, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30727, 30656, 30688, 30680, 30682, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30727, - 30656, 30688, 30680, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30727, 30656, 30688, 30689, 30684, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30727, 30656, - 30688, 30689, 30684, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30727, 30656, 30688, 30689, 30684, 30686, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30727, - 30656, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30727, 30656, 30688, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30727, 30656, 30688, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30727, 30656, 30688, 30690, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30727, - 30656, 30688, 0, 16384, 24576, 28672, 30720, 30721, - 30723, 30727, 30656, 30688, 30692, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30727, 30656, 30688, 30692, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30727, - 30656, 30688, 30696, 30694, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30727, 30656, 30688, 0, 16384, - 24576, 28672, 30720, 30721, 30723, 30727, 30656, 30688, - 30696, 0, 16384, 24576, 28672, 30720, 30721, 30723, - 30727, 30656, 30688, 30696, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30727, 30656, 30688, 30696, 30698, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30727, - 30656, 30688, 30696, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30727, 30656, 30688, 30704, 30700, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30727, 30656, - 30688, 30704, 30700, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30727, 30656, 30688, 30704, 30705, 30702, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30727, - 30735, 30688, 0, 16384, 24576, 28672, 30720, 30721, - 30723, 30727, 30735, 30688, 30704, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30727, 30735, 30688, 30704, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30727, - 30735, 30688, 30704, 30706, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30727, 30735, 30688, 30704, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30727, 30735, - 30688, 30704, 30708, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30727, 30735, 30688, 30704, 30708, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30727, 30735, - 30688, 30704, 30712, 30710, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30727, 30735, 30688, 30704, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30727, 30735, - 30688, 30704, 30712, 0, 16384, 24576, 28672, 30720, - 30721, 30723, 30727, 30735, 30688, 30704, 30712, 0, - 16384, 24576, 28672, 30720, 30721, 30723, 30727, 30735, - 30688, 30704, 30712, 30714, 0, 16384, 24576, 28672, - 30720, 30721, 30723, 30727, 30735, 30688, 30704, 30712, - 0, 16384, 24576, 28672, 30720, 30721, 30723, 30727, - 30735, 30688, 30704, 30712, 30716, 0, 16384, 24576, - 28672, 30720, 30721, 30723, 30727, 30735, 30688, 30704, - 30712, 30716, 0, 16384, 24576, 28672, 30720, 30721, - 30723, 30727, 30735, 30688, 30704, 30712, 30716, 30718, - 0, 16384, 24576, 28672, 0, 16384, 24576, 28672, - 30720, 0, 16384, 24576, 28672, 30720, 0, 16384, - 24576, 28672, 30720, 30722, 0, 16384, 24576, 28672, - 30720, 0, 16384, 24576, 28672, 30720, 30724, 0, - 16384, 24576, 28672, 30720, 30724, 0, 16384, 24576, - 28672, 30720, 30728, 30726, 0, 16384, 24576, 28672, - 30720, 0, 16384, 24576, 28672, 30720, 30728, 0, - 16384, 24576, 28672, 30720, 30728, 0, 16384, 24576, - 28672, 30720, 30728, 30730, 0, 16384, 24576, 28672, - 30720, 30728, 0, 16384, 24576, 28672, 30720, 30736, - 30732, 0, 16384, 24576, 28672, 30720, 30736, 30732, - 0, 16384, 24576, 28672, 30720, 30736, 30737, 30734, - 0, 16384, 24576, 28672, 30720, 0, 16384, 24576, - 28672, 30720, 30736, 0, 16384, 24576, 28672, 30720, - 30736, 0, 16384, 24576, 28672, 30720, 30736, 30738, - 0, 16384, 24576, 28672, 30720, 30736, 0, 16384, - 24576, 28672, 30720, 30736, 30740, 0, 16384, 24576, - 28672, 30720, 30736, 30740, 0, 16384, 24576, 28672, - 30720, 30736, 30744, 30742, 0, 16384, 24576, 28672, - 30720, 30736, 0, 16384, 24576, 28672, 30720, 30752, - 30744, 0, 16384, 24576, 28672, 30720, 30752, 30744, - 0, 16384, 24576, 28672, 30720, 30752, 30744, 30746, - 0, 16384, 24576, 28672, 30720, 30752, 30744, 0, - 16384, 24576, 28672, 30720, 30752, 30753, 30748, 0, - 16384, 24576, 28672, 30720, 30752, 30753, 30748, 0, - 16384, 24576, 28672, 30720, 30752, 30753, 30748, 30750, - 0, 16384, 24576, 28672, 30720, 0, 16384, 24576, - 28672, 30720, 30752, 0, 16384, 24576, 28672, 30720, - 30752, 0, 16384, 24576, 28672, 30720, 30752, 30754, - 0, 16384, 24576, 28672, 30720, 30752, 0, 16384, - 24576, 28672, 30720, 30752, 30756, 0, 16384, 24576, - 28672, 30720, 30752, 30756, 0, 16384, 24576, 28672, - 30720, 30752, 30760, 30758, 0, 16384, 24576, 28672, - 30720, 30752, 0, 16384, 24576, 28672, 30720, 30752, - 30760, 0, 16384, 24576, 28672, 30720, 30752, 30760, - 0, 16384, 24576, 28672, 30720, 30752, 30760, 30762, - 0, 16384, 24576, 28672, 30720, 30752, 30760, 0, - 16384, 24576, 28672, 30720, 30752, 30768, 30764, 0, - 16384, 24576, 28672, 30720, 30752, 30768, 30764, 0, - 16384, 24576, 28672, 30720, 30752, 30768, 30769, 30766, - 0, 16384, 24576, 28672, 30720, 30752, 0, 16384, - 24576, 28672, 30720, 30784, 30768, 0, 16384, 24576, - 28672, 30720, 30784, 30768, 0, 16384, 24576, 28672, - 30720, 30784, 30768, 30770, 0, 16384, 24576, 28672, - 30720, 30784, 30768, 0, 16384, 24576, 28672, 30720, - 30784, 30768, 30772, 0, 16384, 24576, 28672, 30720, - 30784, 30768, 30772, 0, 16384, 24576, 28672, 30720, - 30784, 30768, 30776, 30774, 0, 16384, 24576, 28672, - 30720, 30784, 30768, 0, 16384, 24576, 28672, 30720, - 30784, 30785, 30776, 0, 16384, 24576, 28672, 30720, - 30784, 30785, 30776, 0, 16384, 24576, 28672, 30720, - 30784, 30785, 30776, 30778, 0, 16384, 24576, 28672, - 30720, 30784, 30785, 30776, 0, 16384, 24576, 28672, - 30720, 30784, 30785, 30776, 30780, 0, 16384, 24576, - 28672, 30720, 30784, 30785, 30787, 30780, 0, 16384, - 24576, 28672, 30720, 30784, 30785, 30787, 30780, 30782, - 0, 16384, 24576, 28672, 30720, 0, 16384, 24576, - 28672, 30720, 30784, 0, 16384, 24576, 28672, 30720, - 30784, 0, 16384, 24576, 28672, 30720, 30784, 30786, - 0, 16384, 24576, 28672, 30720, 30784, 0, 16384, - 24576, 28672, 30720, 30784, 30788, 0, 16384, 24576, - 28672, 30720, 30784, 30788, 0, 16384, 24576, 28672, - 30720, 30784, 30792, 30790, 0, 16384, 24576, 28672, - 30720, 30784, 0, 16384, 24576, 28672, 30720, 30784, - 30792, 0, 16384, 24576, 28672, 30720, 30784, 30792, - 0, 16384, 24576, 28672, 30720, 30784, 30792, 30794, - 0, 16384, 24576, 28672, 30720, 30784, 30792, 0, - 16384, 24576, 28672, 30720, 30784, 30800, 30796, 0, - 16384, 24576, 28672, 30720, 30784, 30800, 30796, 0, - 16384, 24576, 28672, 30720, 30784, 30800, 30801, 30798, - 0, 16384, 24576, 28672, 30720, 30784, 0, 16384, - 24576, 28672, 30720, 30784, 30800, 0, 16384, 24576, - 28672, 30720, 30784, 30800, 0, 16384, 24576, 28672, - 30720, 30784, 30800, 30802, 0, 16384, 24576, 28672, - 30720, 30784, 30800, 0, 16384, 24576, 28672, 30720, - 30784, 30800, 30804, 0, 16384, 24576, 28672, 30720, - 30784, 30800, 30804, 0, 16384, 24576, 28672, 30720, - 30784, 30800, 30808, 30806, 0, 16384, 24576, 28672, - 30720, 30784, 30800, 0, 16384, 24576, 28672, 30720, - 30784, 30816, 30808, 0, 16384, 24576, 28672, 30720, - 30784, 30816, 30808, 0, 16384, 24576, 28672, 30720, - 30784, 30816, 30808, 30810, 0, 16384, 24576, 28672, - 30720, 30784, 30816, 30808, 0, 16384, 24576, 28672, - 30720, 30784, 30816, 30817, 30812, 0, 16384, 24576, - 28672, 30720, 30784, 30816, 30817, 30812, 0, 16384, - 24576, 28672, 30720, 30784, 30816, 30817, 30812, 30814, - 0, 16384, 24576, 28672, 30720, 30784, 0, 16384, - 24576, 28672, 30720, 30848, 30816, 0, 16384, 24576, - 28672, 30720, 30848, 30816, 0, 16384, 24576, 28672, - 30720, 30848, 30816, 30818, 0, 16384, 24576, 28672, - 30720, 30848, 30816, 0, 16384, 24576, 28672, 30720, - 30848, 30816, 30820, 0, 16384, 24576, 28672, 30720, - 30848, 30816, 30820, 0, 16384, 24576, 28672, 30720, - 30848, 30816, 30824, 30822, 0, 16384, 24576, 28672, - 30720, 30848, 30816, 0, 16384, 24576, 28672, 30720, - 30848, 30816, 30824, 0, 16384, 24576, 28672, 30720, - 30848, 30816, 30824, 0, 16384, 24576, 28672, 30720, - 30848, 30816, 30824, 30826, 0, 16384, 24576, 28672, - 30720, 30848, 30816, 30824, 0, 16384, 24576, 28672, - 30720, 30848, 30816, 30832, 30828, 0, 16384, 24576, - 28672, 30720, 30848, 30816, 30832, 30828, 0, 16384, - 24576, 28672, 30720, 30848, 30816, 30832, 30833, 30830, - 0, 16384, 24576, 28672, 30720, 30848, 30816, 0, - 16384, 24576, 28672, 30720, 30848, 30849, 30832, 0, - 16384, 24576, 28672, 30720, 30848, 30849, 30832, 0, - 16384, 24576, 28672, 30720, 30848, 30849, 30832, 30834, - 0, 16384, 24576, 28672, 30720, 30848, 30849, 30832, - 0, 16384, 24576, 28672, 30720, 30848, 30849, 30832, - 30836, 0, 16384, 24576, 28672, 30720, 30848, 30849, - 30832, 30836, 0, 16384, 24576, 28672, 30720, 30848, - 30849, 30832, 30840, 30838, 0, 16384, 24576, 28672, - 30720, 30848, 30849, 30832, 0, 16384, 24576, 28672, - 30720, 30848, 30849, 30832, 30840, 0, 16384, 24576, - 28672, 30720, 30848, 30849, 30851, 30840, 0, 16384, - 24576, 28672, 30720, 30848, 30849, 30851, 30840, 30842, - 0, 16384, 24576, 28672, 30720, 30848, 30849, 30851, - 30840, 0, 16384, 24576, 28672, 30720, 30848, 30849, - 30851, 30840, 30844, 0, 16384, 24576, 28672, 30720, - 30848, 30849, 30851, 30840, 30844, 0, 16384, 24576, - 28672, 30720, 30848, 30849, 30851, 30840, 30844, 30846, - 0, 16384, 24576, 28672, 30720, 0, 16384, 24576, - 28672, 30720, 30848, 0, 16384, 24576, 28672, 30720, - 30848, 0, 16384, 24576, 28672, 30720, 30848, 30850, - 0, 16384, 24576, 28672, 30720, 30848, 0, 16384, - 24576, 28672, 30720, 30848, 30852, 0, 16384, 24576, - 28672, 30720, 30848, 30852, 0, 16384, 24576, 28672, - 30720, 30848, 30856, 30854, 0, 16384, 24576, 28672, - 30720, 30848, 0, 16384, 24576, 28672, 30720, 30848, - 30856, 0, 16384, 24576, 28672, 30720, 30848, 30856, - 0, 16384, 24576, 28672, 30720, 30848, 30856, 30858, - 0, 16384, 24576, 28672, 30720, 30848, 30856, 0, - 16384, 24576, 28672, 30720, 30848, 30864, 30860, 0, - 16384, 24576, 28672, 30720, 30848, 30864, 30860, 0, - 16384, 24576, 28672, 30720, 30848, 30864, 30865, 30862, - 0, 16384, 24576, 28672, 30720, 30848, 0, 16384, - 24576, 28672, 30720, 30848, 30864, 0, 16384, 24576, - 28672, 30720, 30848, 30864, 0, 16384, 24576, 28672, - 30720, 30848, 30864, 30866, 0, 16384, 24576, 28672, - 30720, 30848, 30864, 0, 16384, 24576, 28672, 30720, - 30848, 30864, 30868, 0, 16384, 24576, 28672, 30720, - 30848, 30864, 30868, 0, 16384, 24576, 28672, 30720, - 30848, 30864, 30872, 30870, 0, 16384, 24576, 28672, - 30720, 30848, 30864, 0, 16384, 24576, 28672, 30720, - 30848, 30880, 30872, 0, 16384, 24576, 28672, 30720, - 30848, 30880, 30872, 0, 16384, 24576, 28672, 30720, - 30848, 30880, 30872, 30874, 0, 16384, 24576, 28672, - 30720, 30848, 30880, 30872, 0, 16384, 24576, 28672, - 30720, 30848, 30880, 30881, 30876, 0, 16384, 24576, - 28672, 30720, 30848, 30880, 30881, 30876, 0, 16384, - 24576, 28672, 30720, 30848, 30880, 30881, 30876, 30878, - 0, 16384, 24576, 28672, 30720, 30848, 0, 16384, - 24576, 28672, 30720, 30848, 30880, 0, 16384, 24576, - 28672, 30720, 30848, 30880, 0, 16384, 24576, 28672, - 30720, 30848, 30880, 30882, 0, 16384, 24576, 28672, - 30720, 30848, 30880, 0, 16384, 24576, 28672, 30720, - 30848, 30880, 30884, 0, 16384, 24576, 28672, 30720, - 30848, 30880, 30884, 0, 16384, 24576, 28672, 30720, - 30848, 30880, 30888, 30886, 0, 16384, 24576, 28672, - 30720, 30848, 30880, 0, 16384, 24576, 28672, 30720, - 30848, 30880, 30888, 0, 16384, 24576, 28672, 30720, - 30848, 30880, 30888, 0, 16384, 24576, 28672, 30720, - 30848, 30880, 30888, 30890, 0, 16384, 24576, 28672, - 30720, 30848, 30880, 30888, 0, 16384, 24576, 28672, - 30720, 30848, 30880, 30896, 30892, 0, 16384, 24576, - 28672, 30720, 30848, 30880, 30896, 30892, 0, 16384, - 24576, 28672, 30720, 30848, 30880, 30896, 30897, 30894, - 0, 16384, 24576, 28672, 30720, 30848, 30880, 0, - 16384, 24576, 28672, 30720, 30848, 30912, 30896, 0, - 16384, 24576, 28672, 30720, 30848, 30912, 30896, 0, - 16384, 24576, 28672, 30720, 30848, 30912, 30896, 30898, - 0, 16384, 24576, 28672, 30720, 30848, 30912, 30896, - 0, 16384, 24576, 28672, 30720, 30848, 30912, 30896, - 30900, 0, 16384, 24576, 28672, 30720, 30848, 30912, - 30896, 30900, 0, 16384, 24576, 28672, 30720, 30848, - 30912, 30896, 30904, 30902, 0, 16384, 24576, 28672, - 30720, 30848, 30912, 30896, 0, 16384, 24576, 28672, - 30720, 30848, 30912, 30913, 30904, 0, 16384, 24576, - 28672, 30720, 30848, 30912, 30913, 30904, 0, 16384, - 24576, 28672, 30720, 30848, 30912, 30913, 30904, 30906, - 0, 16384, 24576, 28672, 30720, 30848, 30912, 30913, - 30904, 0, 16384, 24576, 28672, 30720, 30848, 30912, - 30913, 30904, 30908, 0, 16384, 24576, 28672, 30720, - 30848, 30912, 30913, 30915, 30908, 0, 16384, 24576, - 28672, 30720, 30848, 30912, 30913, 30915, 30908, 30910, - 0, 16384, 24576, 28672, 30720, 30848, 0, 16384, - 24576, 28672, 30720, 30976, 30912, 0, 16384, 24576, - 28672, 30720, 30976, 30912, 0, 16384, 24576, 28672, - 30720, 30976, 30912, 30914, 0, 16384, 24576, 28672, - 30720, 30976, 30912, 0, 16384, 24576, 28672, 30720, - 30976, 30912, 30916, 0, 16384, 24576, 28672, 30720, - 30976, 30912, 30916, 0, 16384, 24576, 28672, 30720, - 30976, 30912, 30920, 30918, 0, 16384, 24576, 28672, - 30720, 30976, 30912, 0, 16384, 24576, 28672, 30720, - 30976, 30912, 30920, 0, 16384, 24576, 28672, 30720, - 30976, 30912, 30920, 0, 16384, 24576, 28672, 30720, - 30976, 30912, 30920, 30922, 0, 16384, 24576, 28672, - 30720, 30976, 30912, 30920, 0, 16384, 24576, 28672, - 30720, 30976, 30912, 30928, 30924, 0, 16384, 24576, - 28672, 30720, 30976, 30912, 30928, 30924, 0, 16384, - 24576, 28672, 30720, 30976, 30912, 30928, 30929, 30926, - 0, 16384, 24576, 28672, 30720, 30976, 30912, 0, - 16384, 24576, 28672, 30720, 30976, 30912, 30928, 0, - 16384, 24576, 28672, 30720, 30976, 30912, 30928, 0, - 16384, 24576, 28672, 30720, 30976, 30912, 30928, 30930, - 0, 16384, 24576, 28672, 30720, 30976, 30912, 30928, - 0, 16384, 24576, 28672, 30720, 30976, 30912, 30928, - 30932, 0, 16384, 24576, 28672, 30720, 30976, 30912, - 30928, 30932, 0, 16384, 24576, 28672, 30720, 30976, - 30912, 30928, 30936, 30934, 0, 16384, 24576, 28672, - 30720, 30976, 30912, 30928, 0, 16384, 24576, 28672, - 30720, 30976, 30912, 30944, 30936, 0, 16384, 24576, - 28672, 30720, 30976, 30912, 30944, 30936, 0, 16384, - 24576, 28672, 30720, 30976, 30912, 30944, 30936, 30938, - 0, 16384, 24576, 28672, 30720, 30976, 30912, 30944, - 30936, 0, 16384, 24576, 28672, 30720, 30976, 30912, - 30944, 30945, 30940, 0, 16384, 24576, 28672, 30720, - 30976, 30912, 30944, 30945, 30940, 0, 16384, 24576, - 28672, 30720, 30976, 30912, 30944, 30945, 30940, 30942, - 0, 16384, 24576, 28672, 30720, 30976, 30912, 0, - 16384, 24576, 28672, 30720, 30976, 30977, 30944, 0, - 16384, 24576, 28672, 30720, 30976, 30977, 30944, 0, - 16384, 24576, 28672, 30720, 30976, 30977, 30944, 30946, - 0, 16384, 24576, 28672, 30720, 30976, 30977, 30944, - 0, 16384, 24576, 28672, 30720, 30976, 30977, 30944, - 30948, 0, 16384, 24576, 28672, 30720, 30976, 30977, - 30944, 30948, 0, 16384, 24576, 28672, 30720, 30976, - 30977, 30944, 30952, 30950, 0, 16384, 24576, 28672, - 30720, 30976, 30977, 30944, 0, 16384, 24576, 28672, - 30720, 30976, 30977, 30944, 30952, 0, 16384, 24576, - 28672, 30720, 30976, 30977, 30944, 30952, 0, 16384, - 24576, 28672, 30720, 30976, 30977, 30944, 30952, 30954, - 0, 16384, 24576, 28672, 30720, 30976, 30977, 30944, - 30952, 0, 16384, 24576, 28672, 30720, 30976, 30977, - 30944, 30960, 30956, 0, 16384, 24576, 28672, 30720, - 30976, 30977, 30944, 30960, 30956, 0, 16384, 24576, - 28672, 30720, 30976, 30977, 30944, 30960, 30961, 30958, - 0, 16384, 24576, 28672, 30720, 30976, 30977, 30944, - 0, 16384, 24576, 28672, 30720, 30976, 30977, 30944, - 30960, 0, 16384, 24576, 28672, 30720, 30976, 30977, - 30979, 30960, 0, 16384, 24576, 28672, 30720, 30976, - 30977, 30979, 30960, 30962, 0, 16384, 24576, 28672, - 30720, 30976, 30977, 30979, 30960, 0, 16384, 24576, - 28672, 30720, 30976, 30977, 30979, 30960, 30964, 0, - 16384, 24576, 28672, 30720, 30976, 30977, 30979, 30960, - 30964, 0, 16384, 24576, 28672, 30720, 30976, 30977, - 30979, 30960, 30968, 30966, 0, 16384, 24576, 28672, - 30720, 30976, 30977, 30979, 30960, 0, 16384, 24576, - 28672, 30720, 30976, 30977, 30979, 30960, 30968, 0, - 16384, 24576, 28672, 30720, 30976, 30977, 30979, 30960, - 30968, 0, 16384, 24576, 28672, 30720, 30976, 30977, - 30979, 30960, 30968, 30970, 0, 16384, 24576, 28672, - 30720, 30976, 30977, 30979, 30983, 30968, 0, 16384, - 24576, 28672, 30720, 30976, 30977, 30979, 30983, 30968, - 30972, 0, 16384, 24576, 28672, 30720, 30976, 30977, - 30979, 30983, 30968, 30972, 0, 16384, 24576, 28672, - 30720, 30976, 30977, 30979, 30983, 30968, 30972, 30974, - 0, 16384, 24576, 28672, 30720, 0, 16384, 24576, - 28672, 30720, 30976, 0, 16384, 24576, 28672, 30720, - 30976, 0, 16384, 24576, 28672, 30720, 30976, 30978, - 0, 16384, 24576, 28672, 30720, 30976, 0, 16384, - 24576, 28672, 30720, 30976, 30980, 0, 16384, 24576, - 28672, 30720, 30976, 30980, 0, 16384, 24576, 28672, - 30720, 30976, 30984, 30982, 0, 16384, 24576, 28672, - 30720, 30976, 0, 16384, 24576, 28672, 30720, 30976, - 30984, 0, 16384, 24576, 28672, 30720, 30976, 30984, - 0, 16384, 24576, 28672, 30720, 30976, 30984, 30986, - 0, 16384, 24576, 28672, 30720, 30976, 30984, 0, - 16384, 24576, 28672, 30720, 30976, 30992, 30988, 0, - 16384, 24576, 28672, 30720, 30976, 30992, 30988, 0, - 16384, 24576, 28672, 30720, 30976, 30992, 30993, 30990, - 0, 16384, 24576, 28672, 30720, 30976, 0, 16384, - 24576, 28672, 30720, 30976, 30992, 0, 16384, 24576, - 28672, 30720, 30976, 30992, 0, 16384, 24576, 28672, - 30720, 30976, 30992, 30994, 0, 16384, 24576, 28672, - 30720, 30976, 30992, 0, 16384, 24576, 28672, 30720, - 30976, 30992, 30996, 0, 16384, 24576, 28672, 30720, - 30976, 30992, 30996, 0, 16384, 24576, 28672, 30720, - 30976, 30992, 31000, 30998, 0, 16384, 24576, 28672, - 30720, 30976, 30992, 0, 16384, 24576, 28672, 30720, - 30976, 31008, 31000, 0, 16384, 24576, 28672, 30720, - 30976, 31008, 31000, 0, 16384, 24576, 28672, 30720, - 30976, 31008, 31000, 31002, 0, 16384, 24576, 28672, - 30720, 30976, 31008, 31000, 0, 16384, 24576, 28672, - 30720, 30976, 31008, 31009, 31004, 0, 16384, 24576, - 28672, 30720, 30976, 31008, 31009, 31004, 0, 16384, - 24576, 28672, 30720, 30976, 31008, 31009, 31004, 31006, - 0, 16384, 24576, 28672, 30720, 30976, 0, 16384, - 24576, 28672, 30720, 30976, 31008, 0, 16384, 24576, - 28672, 30720, 30976, 31008, 0, 16384, 24576, 28672, - 30720, 30976, 31008, 31010, 0, 16384, 24576, 28672, - 30720, 30976, 31008, 0, 16384, 24576, 28672, 30720, - 30976, 31008, 31012, 0, 16384, 24576, 28672, 30720, - 30976, 31008, 31012, 0, 16384, 24576, 28672, 30720, - 30976, 31008, 31016, 31014, 0, 16384, 24576, 28672, - 30720, 30976, 31008, 0, 16384, 24576, 28672, 30720, - 30976, 31008, 31016, 0, 16384, 24576, 28672, 30720, - 30976, 31008, 31016, 0, 16384, 24576, 28672, 30720, - 30976, 31008, 31016, 31018, 0, 16384, 24576, 28672, - 30720, 30976, 31008, 31016, 0, 16384, 24576, 28672, - 30720, 30976, 31008, 31024, 31020, 0, 16384, 24576, - 28672, 30720, 30976, 31008, 31024, 31020, 0, 16384, - 24576, 28672, 30720, 30976, 31008, 31024, 31025, 31022, - 0, 16384, 24576, 28672, 30720, 30976, 31008, 0, - 16384, 24576, 28672, 30720, 30976, 31040, 31024, 0, - 16384, 24576, 28672, 30720, 30976, 31040, 31024, 0, - 16384, 24576, 28672, 30720, 30976, 31040, 31024, 31026, - 0, 16384, 24576, 28672, 30720, 30976, 31040, 31024, - 0, 16384, 24576, 28672, 30720, 30976, 31040, 31024, - 31028, 0, 16384, 24576, 28672, 30720, 30976, 31040, - 31024, 31028, 0, 16384, 24576, 28672, 30720, 30976, - 31040, 31024, 31032, 31030, 0, 16384, 24576, 28672, - 30720, 30976, 31040, 31024, 0, 16384, 24576, 28672, - 30720, 30976, 31040, 31041, 31032, 0, 16384, 24576, - 28672, 30720, 30976, 31040, 31041, 31032, 0, 16384, - 24576, 28672, 30720, 30976, 31040, 31041, 31032, 31034, - 0, 16384, 24576, 28672, 30720, 30976, 31040, 31041, - 31032, 0, 16384, 24576, 28672, 30720, 30976, 31040, - 31041, 31032, 31036, 0, 16384, 24576, 28672, 30720, - 30976, 31040, 31041, 31043, 31036, 0, 16384, 24576, - 28672, 30720, 30976, 31040, 31041, 31043, 31036, 31038, - 0, 16384, 24576, 28672, 30720, 30976, 0, 16384, - 24576, 28672, 30720, 30976, 31040, 0, 16384, 24576, - 28672, 30720, 30976, 31040, 0, 16384, 24576, 28672, - 30720, 30976, 31040, 31042, 0, 16384, 24576, 28672, - 30720, 30976, 31040, 0, 16384, 24576, 28672, 30720, - 30976, 31040, 31044, 0, 16384, 24576, 28672, 30720, - 30976, 31040, 31044, 0, 16384, 24576, 28672, 30720, - 30976, 31040, 31048, 31046, 0, 16384, 24576, 28672, - 30720, 30976, 31040, 0, 16384, 24576, 28672, 30720, - 30976, 31040, 31048, 0, 16384, 24576, 28672, 30720, - 30976, 31040, 31048, 0, 16384, 24576, 28672, 30720, - 30976, 31040, 31048, 31050, 0, 16384, 24576, 28672, - 30720, 30976, 31040, 31048, 0, 16384, 24576, 28672, - 30720, 30976, 31040, 31056, 31052, 0, 16384, 24576, - 28672, 30720, 30976, 31040, 31056, 31052, 0, 16384, - 24576, 28672, 30720, 30976, 31040, 31056, 31057, 31054, - 0, 16384, 24576, 28672, 30720, 30976, 31040, 0, - 16384, 24576, 28672, 30720, 30976, 31040, 31056, 0, - 16384, 24576, 28672, 30720, 30976, 31040, 31056, 0, - 16384, 24576, 28672, 30720, 30976, 31040, 31056, 31058, - 0, 16384, 24576, 28672, 30720, 30976, 31040, 31056, - 0, 16384, 24576, 28672, 30720, 30976, 31040, 31056, - 31060, 0, 16384, 24576, 28672, 30720, 30976, 31040, - 31056, 31060, 0, 16384, 24576, 28672, 30720, 30976, - 31040, 31056, 31064, 31062, 0, 16384, 24576, 28672, - 30720, 30976, 31040, 31056, 0, 16384, 24576, 28672, - 30720, 30976, 31040, 31072, 31064, 0, 16384, 24576, - 28672, 30720, 30976, 31040, 31072, 31064, 0, 16384, - 24576, 28672, 30720, 30976, 31040, 31072, 31064, 31066, - 0, 16384, 24576, 28672, 30720, 30976, 31040, 31072, - 31064, 0, 16384, 24576, 28672, 30720, 30976, 31040, - 31072, 31073, 31068, 0, 16384, 24576, 28672, 30720, - 30976, 31040, 31072, 31073, 31068, 0, 16384, 24576, - 28672, 30720, 30976, 31040, 31072, 31073, 31068, 31070, - 0, 16384, 24576, 28672, 30720, 30976, 31040, 0, - 16384, 24576, 28672, 30720, 30976, 31104, 31072, 0, - 16384, 24576, 28672, 30720, 30976, 31104, 31072, 0, - 16384, 24576, 28672, 30720, 30976, 31104, 31072, 31074, - 0, 16384, 24576, 28672, 30720, 30976, 31104, 31072, - 0, 16384, 24576, 28672, 30720, 30976, 31104, 31072, - 31076, 0, 16384, 24576, 28672, 30720, 30976, 31104, - 31072, 31076, 0, 16384, 24576, 28672, 30720, 30976, - 31104, 31072, 31080, 31078, 0, 16384, 24576, 28672, - 30720, 30976, 31104, 31072, 0, 16384, 24576, 28672, - 30720, 30976, 31104, 31072, 31080, 0, 16384, 24576, - 28672, 30720, 30976, 31104, 31072, 31080, 0, 16384, - 24576, 28672, 30720, 30976, 31104, 31072, 31080, 31082, - 0, 16384, 24576, 28672, 30720, 30976, 31104, 31072, - 31080, 0, 16384, 24576, 28672, 30720, 30976, 31104, - 31072, 31088, 31084, 0, 16384, 24576, 28672, 30720, - 30976, 31104, 31072, 31088, 31084, 0, 16384, 24576, - 28672, 30720, 30976, 31104, 31072, 31088, 31089, 31086, - 0, 16384, 24576, 28672, 30720, 30976, 31104, 31072, - 0, 16384, 24576, 28672, 30720, 30976, 31104, 31105, - 31088, 0, 16384, 24576, 28672, 30720, 30976, 31104, - 31105, 31088, 0, 16384, 24576, 28672, 30720, 30976, - 31104, 31105, 31088, 31090, 0, 16384, 24576, 28672, - 30720, 30976, 31104, 31105, 31088, 0, 16384, 24576, - 28672, 30720, 30976, 31104, 31105, 31088, 31092, 0, - 16384, 24576, 28672, 30720, 30976, 31104, 31105, 31088, - 31092, 0, 16384, 24576, 28672, 30720, 30976, 31104, - 31105, 31088, 31096, 31094, 0, 16384, 24576, 28672, - 30720, 30976, 31104, 31105, 31088, 0, 16384, 24576, - 28672, 30720, 30976, 31104, 31105, 31088, 31096, 0, - 16384, 24576, 28672, 30720, 30976, 31104, 31105, 31107, - 31096, 0, 16384, 24576, 28672, 30720, 30976, 31104, - 31105, 31107, 31096, 31098, 0, 16384, 24576, 28672, - 30720, 30976, 31104, 31105, 31107, 31096, 0, 16384, - 24576, 28672, 30720, 30976, 31104, 31105, 31107, 31096, - 31100, 0, 16384, 24576, 28672, 30720, 30976, 31104, - 31105, 31107, 31096, 31100, 0, 16384, 24576, 28672, - 30720, 30976, 31104, 31105, 31107, 31096, 31100, 31102, - 0, 16384, 24576, 28672, 30720, 30976, 0, 16384, - 24576, 28672, 30720, 31232, 31104, 0, 16384, 24576, - 28672, 30720, 31232, 31104, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 31106, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 0, 16384, 24576, 28672, 30720, - 31232, 31104, 31108, 0, 16384, 24576, 28672, 30720, - 31232, 31104, 31108, 0, 16384, 24576, 28672, 30720, - 31232, 31104, 31112, 31110, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 0, 16384, 24576, 28672, 30720, - 31232, 31104, 31112, 0, 16384, 24576, 28672, 30720, - 31232, 31104, 31112, 0, 16384, 24576, 28672, 30720, - 31232, 31104, 31112, 31114, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 31112, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 31120, 31116, 0, 16384, 24576, - 28672, 30720, 31232, 31104, 31120, 31116, 0, 16384, - 24576, 28672, 30720, 31232, 31104, 31120, 31121, 31118, - 0, 16384, 24576, 28672, 30720, 31232, 31104, 0, - 16384, 24576, 28672, 30720, 31232, 31104, 31120, 0, - 16384, 24576, 28672, 30720, 31232, 31104, 31120, 0, - 16384, 24576, 28672, 30720, 31232, 31104, 31120, 31122, - 0, 16384, 24576, 28672, 30720, 31232, 31104, 31120, - 0, 16384, 24576, 28672, 30720, 31232, 31104, 31120, - 31124, 0, 16384, 24576, 28672, 30720, 31232, 31104, - 31120, 31124, 0, 16384, 24576, 28672, 30720, 31232, - 31104, 31120, 31128, 31126, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 31120, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 31136, 31128, 0, 16384, 24576, - 28672, 30720, 31232, 31104, 31136, 31128, 0, 16384, - 24576, 28672, 30720, 31232, 31104, 31136, 31128, 31130, - 0, 16384, 24576, 28672, 30720, 31232, 31104, 31136, - 31128, 0, 16384, 24576, 28672, 30720, 31232, 31104, - 31136, 31137, 31132, 0, 16384, 24576, 28672, 30720, - 31232, 31104, 31136, 31137, 31132, 0, 16384, 24576, - 28672, 30720, 31232, 31104, 31136, 31137, 31132, 31134, - 0, 16384, 24576, 28672, 30720, 31232, 31104, 0, - 16384, 24576, 28672, 30720, 31232, 31104, 31136, 0, - 16384, 24576, 28672, 30720, 31232, 31104, 31136, 0, - 16384, 24576, 28672, 30720, 31232, 31104, 31136, 31138, - 0, 16384, 24576, 28672, 30720, 31232, 31104, 31136, - 0, 16384, 24576, 28672, 30720, 31232, 31104, 31136, - 31140, 0, 16384, 24576, 28672, 30720, 31232, 31104, - 31136, 31140, 0, 16384, 24576, 28672, 30720, 31232, - 31104, 31136, 31144, 31142, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 31136, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 31136, 31144, 0, 16384, 24576, - 28672, 30720, 31232, 31104, 31136, 31144, 0, 16384, - 24576, 28672, 30720, 31232, 31104, 31136, 31144, 31146, - 0, 16384, 24576, 28672, 30720, 31232, 31104, 31136, - 31144, 0, 16384, 24576, 28672, 30720, 31232, 31104, - 31136, 31152, 31148, 0, 16384, 24576, 28672, 30720, - 31232, 31104, 31136, 31152, 31148, 0, 16384, 24576, - 28672, 30720, 31232, 31104, 31136, 31152, 31153, 31150, - 0, 16384, 24576, 28672, 30720, 31232, 31104, 31136, - 0, 16384, 24576, 28672, 30720, 31232, 31104, 31168, - 31152, 0, 16384, 24576, 28672, 30720, 31232, 31104, - 31168, 31152, 0, 16384, 24576, 28672, 30720, 31232, - 31104, 31168, 31152, 31154, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 31168, 31152, 0, 16384, 24576, - 28672, 30720, 31232, 31104, 31168, 31152, 31156, 0, - 16384, 24576, 28672, 30720, 31232, 31104, 31168, 31152, - 31156, 0, 16384, 24576, 28672, 30720, 31232, 31104, - 31168, 31152, 31160, 31158, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 31168, 31152, 0, 16384, 24576, - 28672, 30720, 31232, 31104, 31168, 31169, 31160, 0, - 16384, 24576, 28672, 30720, 31232, 31104, 31168, 31169, - 31160, 0, 16384, 24576, 28672, 30720, 31232, 31104, - 31168, 31169, 31160, 31162, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 31168, 31169, 31160, 0, 16384, - 24576, 28672, 30720, 31232, 31104, 31168, 31169, 31160, - 31164, 0, 16384, 24576, 28672, 30720, 31232, 31104, - 31168, 31169, 31171, 31164, 0, 16384, 24576, 28672, - 30720, 31232, 31104, 31168, 31169, 31171, 31164, 31166, - 0, 16384, 24576, 28672, 30720, 31232, 31104, 0, - 16384, 24576, 28672, 30720, 31232, 31233, 31168, 0, - 16384, 24576, 28672, 30720, 31232, 31233, 31168, 0, - 16384, 24576, 28672, 30720, 31232, 31233, 31168, 31170, - 0, 16384, 24576, 28672, 30720, 31232, 31233, 31168, - 0, 16384, 24576, 28672, 30720, 31232, 31233, 31168, - 31172, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31168, 31172, 0, 16384, 24576, 28672, 30720, 31232, - 31233, 31168, 31176, 31174, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31168, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31168, 31176, 0, 16384, 24576, - 28672, 30720, 31232, 31233, 31168, 31176, 0, 16384, - 24576, 28672, 30720, 31232, 31233, 31168, 31176, 31178, - 0, 16384, 24576, 28672, 30720, 31232, 31233, 31168, - 31176, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31168, 31184, 31180, 0, 16384, 24576, 28672, 30720, - 31232, 31233, 31168, 31184, 31180, 0, 16384, 24576, - 28672, 30720, 31232, 31233, 31168, 31184, 31185, 31182, - 0, 16384, 24576, 28672, 30720, 31232, 31233, 31168, - 0, 16384, 24576, 28672, 30720, 31232, 31233, 31168, - 31184, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31168, 31184, 0, 16384, 24576, 28672, 30720, 31232, - 31233, 31168, 31184, 31186, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31168, 31184, 0, 16384, 24576, - 28672, 30720, 31232, 31233, 31168, 31184, 31188, 0, - 16384, 24576, 28672, 30720, 31232, 31233, 31168, 31184, - 31188, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31168, 31184, 31192, 31190, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31168, 31184, 0, 16384, 24576, - 28672, 30720, 31232, 31233, 31168, 31200, 31192, 0, - 16384, 24576, 28672, 30720, 31232, 31233, 31168, 31200, - 31192, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31168, 31200, 31192, 31194, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31168, 31200, 31192, 0, 16384, - 24576, 28672, 30720, 31232, 31233, 31168, 31200, 31201, - 31196, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31168, 31200, 31201, 31196, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31168, 31200, 31201, 31196, 31198, - 0, 16384, 24576, 28672, 30720, 31232, 31233, 31168, - 0, 16384, 24576, 28672, 30720, 31232, 31233, 31168, - 31200, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31235, 31200, 0, 16384, 24576, 28672, 30720, 31232, - 31233, 31235, 31200, 31202, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31235, 31200, 0, 16384, 24576, - 28672, 30720, 31232, 31233, 31235, 31200, 31204, 0, - 16384, 24576, 28672, 30720, 31232, 31233, 31235, 31200, - 31204, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31235, 31200, 31208, 31206, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31235, 31200, 0, 16384, 24576, - 28672, 30720, 31232, 31233, 31235, 31200, 31208, 0, - 16384, 24576, 28672, 30720, 31232, 31233, 31235, 31200, - 31208, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31235, 31200, 31208, 31210, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31235, 31200, 31208, 0, 16384, - 24576, 28672, 30720, 31232, 31233, 31235, 31200, 31216, - 31212, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31235, 31200, 31216, 31212, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31235, 31200, 31216, 31217, 31214, - 0, 16384, 24576, 28672, 30720, 31232, 31233, 31235, - 31200, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31235, 31200, 31216, 0, 16384, 24576, 28672, 30720, - 31232, 31233, 31235, 31200, 31216, 0, 16384, 24576, - 28672, 30720, 31232, 31233, 31235, 31200, 31216, 31218, - 0, 16384, 24576, 28672, 30720, 31232, 31233, 31235, - 31239, 31216, 0, 16384, 24576, 28672, 30720, 31232, - 31233, 31235, 31239, 31216, 31220, 0, 16384, 24576, - 28672, 30720, 31232, 31233, 31235, 31239, 31216, 31220, - 0, 16384, 24576, 28672, 30720, 31232, 31233, 31235, - 31239, 31216, 31224, 31222, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31235, 31239, 31216, 0, 16384, - 24576, 28672, 30720, 31232, 31233, 31235, 31239, 31216, - 31224, 0, 16384, 24576, 28672, 30720, 31232, 31233, - 31235, 31239, 31216, 31224, 0, 16384, 24576, 28672, - 30720, 31232, 31233, 31235, 31239, 31216, 31224, 31226, - 0, 16384, 24576, 28672, 30720, 31232, 31233, 31235, - 31239, 31216, 31224, 0, 16384, 24576, 28672, 30720, - 31232, 31233, 31235, 31239, 31216, 31224, 31228, 0, - 16384, 24576, 28672, 30720, 31232, 31233, 31235, 31239, - 31216, 31224, 31228, 0, 16384, 24576, 28672, 30720, - 31232, 31233, 31235, 31239, 31216, 31224, 31228, 31230, - 0, 16384, 24576, 28672, 30720, 0, 16384, 24576, - 28672, 30720, 31232, 0, 16384, 24576, 28672, 30720, - 31232, 0, 16384, 24576, 28672, 30720, 31232, 31234, - 0, 16384, 24576, 28672, 30720, 31232, 0, 16384, - 24576, 28672, 30720, 31232, 31236, 0, 16384, 24576, - 28672, 30720, 31232, 31236, 0, 16384, 24576, 28672, - 30720, 31232, 31240, 31238, 0, 16384, 24576, 28672, - 30720, 31232, 0, 16384, 24576, 28672, 30720, 31232, - 31240, 0, 16384, 24576, 28672, 30720, 31232, 31240, - 0, 16384, 24576, 28672, 30720, 31232, 31240, 31242, - 0, 16384, 24576, 28672, 30720, 31232, 31240, 0, - 16384, 24576, 28672, 30720, 31232, 31248, 31244, 0, - 16384, 24576, 28672, 30720, 31232, 31248, 31244, 0, - 16384, 24576, 28672, 30720, 31232, 31248, 31249, 31246, - 0, 16384, 24576, 28672, 30720, 31232, 0, 16384, - 24576, 28672, 30720, 31232, 31248, 0, 16384, 24576, - 28672, 30720, 31232, 31248, 0, 16384, 24576, 28672, - 30720, 31232, 31248, 31250, 0, 16384, 24576, 28672, - 30720, 31232, 31248, 0, 16384, 24576, 28672, 30720, - 31232, 31248, 31252, 0, 16384, 24576, 28672, 30720, - 31232, 31248, 31252, 0, 16384, 24576, 28672, 30720, - 31232, 31248, 31256, 31254, 0, 16384, 24576, 28672, - 30720, 31232, 31248, 0, 16384, 24576, 28672, 30720, - 31232, 31264, 31256, 0, 16384, 24576, 28672, 30720, - 31232, 31264, 31256, 0, 16384, 24576, 28672, 30720, - 31232, 31264, 31256, 31258, 0, 16384, 24576, 28672, - 30720, 31232, 31264, 31256, 0, 16384, 24576, 28672, - 30720, 31232, 31264, 31265, 31260, 0, 16384, 24576, - 28672, 30720, 31232, 31264, 31265, 31260, 0, 16384, - 24576, 28672, 30720, 31232, 31264, 31265, 31260, 31262, - 0, 16384, 24576, 28672, 30720, 31232, 0, 16384, - 24576, 28672, 30720, 31232, 31264, 0, 16384, 24576, - 28672, 30720, 31232, 31264, 0, 16384, 24576, 28672, - 30720, 31232, 31264, 31266, 0, 16384, 24576, 28672, - 30720, 31232, 31264, 0, 16384, 24576, 28672, 30720, - 31232, 31264, 31268, 0, 16384, 24576, 28672, 30720, - 31232, 31264, 31268, 0, 16384, 24576, 28672, 30720, - 31232, 31264, 31272, 31270, 0, 16384, 24576, 28672, - 30720, 31232, 31264, 0, 16384, 24576, 28672, 30720, - 31232, 31264, 31272, 0, 16384, 24576, 28672, 30720, - 31232, 31264, 31272, 0, 16384, 24576, 28672, 30720, - 31232, 31264, 31272, 31274, 0, 16384, 24576, 28672, - 30720, 31232, 31264, 31272, 0, 16384, 24576, 28672, - 30720, 31232, 31264, 31280, 31276, 0, 16384, 24576, - 28672, 30720, 31232, 31264, 31280, 31276, 0, 16384, - 24576, 28672, 30720, 31232, 31264, 31280, 31281, 31278, - 0, 16384, 24576, 28672, 30720, 31232, 31264, 0, - 16384, 24576, 28672, 30720, 31232, 31296, 31280, 0, - 16384, 24576, 28672, 30720, 31232, 31296, 31280, 0, - 16384, 24576, 28672, 30720, 31232, 31296, 31280, 31282, - 0, 16384, 24576, 28672, 30720, 31232, 31296, 31280, - 0, 16384, 24576, 28672, 30720, 31232, 31296, 31280, - 31284, 0, 16384, 24576, 28672, 30720, 31232, 31296, - 31280, 31284, 0, 16384, 24576, 28672, 30720, 31232, - 31296, 31280, 31288, 31286, 0, 16384, 24576, 28672, - 30720, 31232, 31296, 31280, 0, 16384, 24576, 28672, - 30720, 31232, 31296, 31297, 31288, 0, 16384, 24576, - 28672, 30720, 31232, 31296, 31297, 31288, 0, 16384, - 24576, 28672, 30720, 31232, 31296, 31297, 31288, 31290, - 0, 16384, 24576, 28672, 30720, 31232, 31296, 31297, - 31288, 0, 16384, 24576, 28672, 30720, 31232, 31296, - 31297, 31288, 31292, 0, 16384, 24576, 28672, 30720, - 31232, 31296, 31297, 31299, 31292, 0, 16384, 24576, - 28672, 30720, 31232, 31296, 31297, 31299, 31292, 31294, - 0, 16384, 24576, 28672, 30720, 31232, 0, 16384, - 24576, 28672, 30720, 31232, 31296, 0, 16384, 24576, - 28672, 30720, 31232, 31296, 0, 16384, 24576, 28672, - 30720, 31232, 31296, 31298, 0, 16384, 24576, 28672, - 30720, 31232, 31296, 0, 16384, 24576, 28672, 30720, - 31232, 31296, 31300, 0, 16384, 24576, 28672, 30720, - 31232, 31296, 31300, 0, 16384, 24576, 28672, 30720, - 31232, 31296, 31304, 31302, 0, 16384, 24576, 28672, - 30720, 31232, 31296, 0, 16384, 24576, 28672, 30720, - 31232, 31296, 31304, 0, 16384, 24576, 28672, 30720, - 31232, 31296, 31304, 0, 16384, 24576, 28672, 30720, - 31232, 31296, 31304, 31306, 0, 16384, 24576, 28672, - 30720, 31232, 31296, 31304, 0, 16384, 24576, 28672, - 30720, 31232, 31296, 31312, 31308, 0, 16384, 24576, - 28672, 30720, 31232, 31296, 31312, 31308, 0, 16384, - 24576, 28672, 30720, 31232, 31296, 31312, 31313, 31310, - 0, 16384, 24576, 28672, 30720, 31232, 31296, 0, - 16384, 24576, 28672, 30720, 31232, 31296, 31312, 0, - 16384, 24576, 28672, 30720, 31232, 31296, 31312, 0, - 16384, 24576, 28672, 30720, 31232, 31296, 31312, 31314, - 0, 16384, 24576, 28672, 30720, 31232, 31296, 31312, - 0, 16384, 24576, 28672, 30720, 31232, 31296, 31312, - 31316, 0, 16384, 24576, 28672, 30720, 31232, 31296, - 31312, 31316, 0, 16384, 24576, 28672, 30720, 31232, - 31296, 31312, 31320, 31318, 0, 16384, 24576, 28672, - 30720, 31232, 31296, 31312, 0, 16384, 24576, 28672, - 30720, 31232, 31296, 31328, 31320, 0, 16384, 24576, - 28672, 30720, 31232, 31296, 31328, 31320, 0, 16384, - 24576, 28672, 30720, 31232, 31296, 31328, 31320, 31322, - 0, 16384, 24576, 28672, 30720, 31232, 31296, 31328, - 31320, 0, 16384, 24576, 28672, 30720, 31232, 31296, - 31328, 31329, 31324, 0, 16384, 24576, 28672, 30720, - 31232, 31296, 31328, 31329, 31324, 0, 16384, 24576, - 28672, 30720, 31232, 31296, 31328, 31329, 31324, 31326, - 0, 16384, 24576, 28672, 30720, 31232, 31296, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31328, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31328, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31328, 31330, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31328, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31328, - 31332, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31328, 31332, 0, 16384, 24576, 28672, 30720, 31232, - 31360, 31328, 31336, 31334, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31328, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31328, 31336, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 31328, 31336, 0, 16384, - 24576, 28672, 30720, 31232, 31360, 31328, 31336, 31338, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31328, - 31336, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31328, 31344, 31340, 0, 16384, 24576, 28672, 30720, - 31232, 31360, 31328, 31344, 31340, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 31328, 31344, 31345, 31342, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31328, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31361, - 31344, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31361, 31344, 0, 16384, 24576, 28672, 30720, 31232, - 31360, 31361, 31344, 31346, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31361, 31344, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 31361, 31344, 31348, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31361, 31344, - 31348, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31361, 31344, 31352, 31350, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31361, 31344, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 31361, 31344, 31352, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31361, 31363, - 31352, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31361, 31363, 31352, 31354, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31361, 31363, 31352, 0, 16384, - 24576, 28672, 30720, 31232, 31360, 31361, 31363, 31352, - 31356, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31361, 31363, 31352, 31356, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31361, 31363, 31352, 31356, 31358, - 0, 16384, 24576, 28672, 30720, 31232, 0, 16384, - 24576, 28672, 30720, 31232, 31360, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31362, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 0, 16384, 24576, 28672, 30720, - 31232, 31360, 31364, 0, 16384, 24576, 28672, 30720, - 31232, 31360, 31364, 0, 16384, 24576, 28672, 30720, - 31232, 31360, 31368, 31366, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 0, 16384, 24576, 28672, 30720, - 31232, 31360, 31368, 0, 16384, 24576, 28672, 30720, - 31232, 31360, 31368, 0, 16384, 24576, 28672, 30720, - 31232, 31360, 31368, 31370, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31368, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31376, 31372, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 31376, 31372, 0, 16384, - 24576, 28672, 30720, 31232, 31360, 31376, 31377, 31374, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31376, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31376, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31376, 31378, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31376, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31376, - 31380, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31376, 31380, 0, 16384, 24576, 28672, 30720, 31232, - 31360, 31376, 31384, 31382, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31376, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31392, 31384, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 31392, 31384, 0, 16384, - 24576, 28672, 30720, 31232, 31360, 31392, 31384, 31386, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31392, - 31384, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31392, 31393, 31388, 0, 16384, 24576, 28672, 30720, - 31232, 31360, 31392, 31393, 31388, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 31392, 31393, 31388, 31390, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31392, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31392, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31392, 31394, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31392, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31392, - 31396, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31392, 31396, 0, 16384, 24576, 28672, 30720, 31232, - 31360, 31392, 31400, 31398, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31392, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31392, 31400, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 31392, 31400, 0, 16384, - 24576, 28672, 30720, 31232, 31360, 31392, 31400, 31402, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31392, - 31400, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31392, 31408, 31404, 0, 16384, 24576, 28672, 30720, - 31232, 31360, 31392, 31408, 31404, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 31392, 31408, 31409, 31406, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31392, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 31424, - 31408, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31424, 31408, 0, 16384, 24576, 28672, 30720, 31232, - 31360, 31424, 31408, 31410, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31424, 31408, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 31424, 31408, 31412, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31424, 31408, - 31412, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31424, 31408, 31416, 31414, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31424, 31408, 0, 16384, 24576, - 28672, 30720, 31232, 31360, 31424, 31425, 31416, 0, - 16384, 24576, 28672, 30720, 31232, 31360, 31424, 31425, - 31416, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31424, 31425, 31416, 31418, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31424, 31425, 31416, 0, 16384, - 24576, 28672, 30720, 31232, 31360, 31424, 31425, 31416, - 31420, 0, 16384, 24576, 28672, 30720, 31232, 31360, - 31424, 31425, 31427, 31420, 0, 16384, 24576, 28672, - 30720, 31232, 31360, 31424, 31425, 31427, 31420, 31422, - 0, 16384, 24576, 28672, 30720, 31232, 31360, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31424, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31424, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31424, 31426, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31424, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31424, - 31428, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31424, 31428, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31424, 31432, 31430, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31424, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31424, 31432, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31424, 31432, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31424, 31432, 31434, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31424, - 31432, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31424, 31440, 31436, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31424, 31440, 31436, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31424, 31440, 31441, 31438, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31424, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31424, - 31440, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31424, 31440, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31424, 31440, 31442, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31424, 31440, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31424, 31440, 31444, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31424, 31440, - 31444, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31424, 31440, 31448, 31446, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31424, 31440, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31424, 31456, 31448, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31424, 31456, - 31448, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31424, 31456, 31448, 31450, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31424, 31456, 31448, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31424, 31456, 31457, - 31452, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31424, 31456, 31457, 31452, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31424, 31456, 31457, 31452, 31454, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31424, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31489, - 31456, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31489, 31456, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31489, 31456, 31458, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31489, 31456, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31489, 31456, 31460, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31489, 31456, - 31460, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31489, 31456, 31464, 31462, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31489, 31456, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31489, 31456, 31464, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31489, 31456, - 31464, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31489, 31456, 31464, 31466, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31489, 31456, 31464, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31489, 31456, 31472, - 31468, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31489, 31456, 31472, 31468, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31489, 31456, 31472, 31473, 31470, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31489, - 31456, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31489, 31456, 31472, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31489, 31491, 31472, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31489, 31491, 31472, 31474, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31489, - 31491, 31472, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31489, 31491, 31472, 31476, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31489, 31491, 31472, 31476, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31489, - 31491, 31472, 31480, 31478, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31489, 31491, 31472, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31489, 31491, 31472, - 31480, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31489, 31491, 31472, 31480, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31489, 31491, 31472, 31480, 31482, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31489, - 31491, 31495, 31480, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31489, 31491, 31495, 31480, 31484, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31489, 31491, - 31495, 31480, 31484, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31489, 31491, 31495, 31480, 31484, 31486, - 0, 16384, 24576, 28672, 30720, 31232, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31490, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31492, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31492, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31496, 31494, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31496, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31496, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31496, 31498, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31496, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31504, 31500, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31504, 31500, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31504, 31505, 31502, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31504, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31504, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31504, 31506, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31504, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31504, - 31508, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31504, 31508, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31504, 31512, 31510, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31504, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31520, 31512, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31520, 31512, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31520, 31512, 31514, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31520, - 31512, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31520, 31521, 31516, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31520, 31521, 31516, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31520, 31521, 31516, 31518, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31520, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31520, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31520, 31522, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31520, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31520, - 31524, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31520, 31524, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31520, 31528, 31526, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31520, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31520, 31528, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31520, 31528, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31520, 31528, 31530, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31520, - 31528, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31520, 31536, 31532, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31520, 31536, 31532, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31520, 31536, 31537, 31534, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31520, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31552, - 31536, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31552, 31536, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31552, 31536, 31538, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31552, 31536, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31552, 31536, 31540, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31552, 31536, - 31540, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31552, 31536, 31544, 31542, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31552, 31536, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31552, 31553, 31544, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31552, 31553, - 31544, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31552, 31553, 31544, 31546, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31552, 31553, 31544, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31552, 31553, 31544, - 31548, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31552, 31553, 31555, 31548, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31552, 31553, 31555, 31548, 31550, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31552, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31552, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31552, 31554, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31552, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31552, - 31556, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31552, 31556, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31552, 31560, 31558, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31552, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31552, 31560, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31552, 31560, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31552, 31560, 31562, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31552, - 31560, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31552, 31568, 31564, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31552, 31568, 31564, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31552, 31568, 31569, 31566, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31552, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31552, - 31568, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31552, 31568, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31552, 31568, 31570, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31552, 31568, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31552, 31568, 31572, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31552, 31568, - 31572, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31552, 31568, 31576, 31574, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31552, 31568, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31552, 31584, 31576, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31552, 31584, - 31576, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31552, 31584, 31576, 31578, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31552, 31584, 31576, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31552, 31584, 31585, - 31580, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31552, 31584, 31585, 31580, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31552, 31584, 31585, 31580, 31582, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31552, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31584, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31584, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31616, 31584, 31586, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31584, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31584, 31588, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31584, - 31588, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31584, 31592, 31590, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31584, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31584, 31592, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31584, - 31592, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31584, 31592, 31594, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31584, 31592, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31616, 31584, 31600, - 31596, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31584, 31600, 31596, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31584, 31600, 31601, 31598, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31584, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31617, 31600, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31617, 31600, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31617, 31600, 31602, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31617, 31600, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31616, 31617, 31600, 31604, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31617, 31600, 31604, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31617, 31600, 31608, 31606, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31617, 31600, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31616, 31617, 31600, - 31608, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31617, 31619, 31608, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31617, 31619, 31608, 31610, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31617, 31619, 31608, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31617, 31619, 31608, 31612, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31617, - 31619, 31608, 31612, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31617, 31619, 31608, 31612, 31614, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31618, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31620, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31620, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31616, 31624, 31622, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31624, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31624, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31616, 31624, 31626, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31624, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31632, 31628, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31632, 31628, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31632, 31633, 31630, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31632, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31632, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31616, 31632, 31634, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31632, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31632, 31636, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31632, - 31636, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31632, 31640, 31638, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31632, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31648, 31640, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31648, - 31640, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31648, 31640, 31642, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31648, 31640, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31616, 31648, 31649, - 31644, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31648, 31649, 31644, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31648, 31649, 31644, 31646, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31648, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31648, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31616, 31648, 31650, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31648, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31648, 31652, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31648, - 31652, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31648, 31656, 31654, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31648, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31648, 31656, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31648, - 31656, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31648, 31656, 31658, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31648, 31656, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31616, 31648, 31664, - 31660, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31648, 31664, 31660, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31648, 31664, 31665, 31662, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31648, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31680, 31664, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31680, 31664, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31680, 31664, 31666, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31664, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31616, 31680, 31664, 31668, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31680, 31664, 31668, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31664, 31672, 31670, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 31664, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31616, 31680, 31681, - 31672, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31680, 31681, 31672, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 31681, 31672, 31674, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31681, 31672, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31680, 31681, 31672, 31676, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31680, - 31681, 31683, 31676, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31680, 31681, 31683, 31676, 31678, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31680, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31616, 31680, 31682, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31680, 31684, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31680, - 31684, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31680, 31688, 31686, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31680, 31688, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31680, - 31688, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31680, 31688, 31690, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 31688, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31616, 31680, 31696, - 31692, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31680, 31696, 31692, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 31696, 31697, 31694, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31680, 31696, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31680, 31696, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31680, 31696, 31698, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31696, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31616, 31680, 31696, 31700, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31680, 31696, 31700, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31696, 31704, 31702, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 31696, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31616, 31680, 31712, - 31704, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31680, 31712, 31704, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 31712, 31704, 31706, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31712, 31704, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31680, 31712, 31713, 31708, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31680, - 31712, 31713, 31708, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31680, 31712, 31713, 31708, 31710, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31680, 31712, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31680, 31712, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31680, 31712, 31714, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31712, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31616, 31680, 31712, 31716, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31680, 31712, 31716, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31712, 31720, 31718, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 31712, 0, 16384, - 24576, 28672, 30720, 31232, 31488, 31616, 31680, 31712, - 31720, 0, 16384, 24576, 28672, 30720, 31232, 31488, - 31616, 31680, 31712, 31720, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 31712, 31720, 31722, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31712, 31720, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31680, 31712, 31728, 31724, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31680, - 31712, 31728, 31724, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31680, 31712, 31728, 31729, 31726, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31712, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31616, 31680, 31712, 31728, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31680, 31712, 31728, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31712, 31728, 31730, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 31712, 31728, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31680, - 31712, 31728, 31732, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31680, 31712, 31728, 31732, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31680, - 31712, 31728, 31736, 31734, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 31712, 31728, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31680, - 31712, 31728, 31736, 0, 16384, 24576, 28672, 30720, - 31232, 31488, 31616, 31680, 31712, 31728, 31736, 0, - 16384, 24576, 28672, 30720, 31232, 31488, 31616, 31680, - 31712, 31728, 31736, 31738, 0, 16384, 24576, 28672, - 30720, 31232, 31488, 31616, 31680, 31712, 31728, 31736, - 0, 16384, 24576, 28672, 30720, 31232, 31488, 31616, - 31680, 31712, 31728, 31736, 31740, 0, 16384, 24576, - 28672, 30720, 31232, 31488, 31616, 31680, 31712, 31728, - 31736, 31740, 0, 16384, 24576, 28672, 30720, 31232, - 31488, 31616, 31680, 31712, 31728, 31736, 31740, 31742, - 0, 1, 3, 7, 15, 0, 1, 3, - 7, 15, 31, 0, 1, 3, 7, 15, - 31, 0, 1, 3, 7, 15, 31, 63, - 0, 1, 3, 7, 15, 31, 0, 1, - 3, 7, 15, 31, 63, 0, 1, 3, - 7, 15, 31, 63, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 0, 1, 3, 7, 15, 31, - 63, 0, 1, 3, 7, 15, 31, 63, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 0, 1, - 3, 7, 15, 31, 63, 0, 1, 3, - 7, 15, 31, 63, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 0, 1, - 3, 7, 15, 31, 63, 0, 1, 3, - 7, 15, 31, 63, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 0, 1, - 3, 7, 15, 31, 63, 0, 1, 3, - 7, 15, 31, 63, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 0, 1, - 3, 7, 15, 31, 63, 0, 1, 3, - 7, 15, 31, 63, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 0, 1, - 3, 7, 15, 31, 63, 0, 1, 3, - 7, 15, 31, 63, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 0, 1, - 3, 7, 15, 31, 63, 0, 1, 3, - 7, 15, 31, 63, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 4095, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 2047, 4095, 8191, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 8191, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 8191, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 8191, 16383, - 0, 0, 32768, 0, 32768, 0, 32768, 32770, - 0, 32768, 0, 32768, 32772, 0, 32768, 32772, - 0, 32768, 32776, 32774, 0, 32768, 0, 32768, - 32776, 0, 32768, 32776, 0, 32768, 32776, 32778, - 0, 32768, 32776, 0, 32768, 32784, 32780, 0, - 32768, 32784, 32780, 0, 32768, 32784, 32785, 32782, - 0, 32768, 0, 32768, 32784, 0, 32768, 32784, - 0, 32768, 32784, 32786, 0, 32768, 32784, 0, - 32768, 32784, 32788, 0, 32768, 32784, 32788, 0, - 32768, 32784, 32792, 32790, 0, 32768, 32784, 0, - 32768, 32800, 32792, 0, 32768, 32800, 32792, 0, - 32768, 32800, 32792, 32794, 0, 32768, 32800, 32792, - 0, 32768, 32800, 32801, 32796, 0, 32768, 32800, - 32801, 32796, 0, 32768, 32800, 32801, 32796, 32798, - 0, 32768, 0, 32768, 32800, 0, 32768, 32800, - 0, 32768, 32800, 32802, 0, 32768, 32800, 0, - 32768, 32800, 32804, 0, 32768, 32800, 32804, 0, - 32768, 32800, 32808, 32806, 0, 32768, 32800, 0, - 32768, 32800, 32808, 0, 32768, 32800, 32808, 0, - 32768, 32800, 32808, 32810, 0, 32768, 32800, 32808, - 0, 32768, 32800, 32816, 32812, 0, 32768, 32800, - 32816, 32812, 0, 32768, 32800, 32816, 32817, 32814, - 0, 32768, 32800, 0, 32768, 32832, 32816, 0, - 32768, 32832, 32816, 0, 32768, 32832, 32816, 32818, - 0, 32768, 32832, 32816, 0, 32768, 32832, 32816, - 32820, 0, 32768, 32832, 32816, 32820, 0, 32768, - 32832, 32816, 32824, 32822, 0, 32768, 32832, 32816, - 0, 32768, 32832, 32833, 32824, 0, 32768, 32832, - 32833, 32824, 0, 32768, 32832, 32833, 32824, 32826, - 0, 32768, 32832, 32833, 32824, 0, 32768, 32832, - 32833, 32824, 32828, 0, 32768, 32832, 32833, 32835, - 32828, 0, 32768, 32832, 32833, 32835, 32828, 32830, - 0, 32768, 0, 32768, 32832, 0, 32768, 32832, - 0, 32768, 32832, 32834, 0, 32768, 32832, 0, - 32768, 32832, 32836, 0, 32768, 32832, 32836, 0, - 32768, 32832, 32840, 32838, 0, 32768, 32832, 0, - 32768, 32832, 32840, 0, 32768, 32832, 32840, 0, - 32768, 32832, 32840, 32842, 0, 32768, 32832, 32840, - 0, 32768, 32832, 32848, 32844, 0, 32768, 32832, - 32848, 32844, 0, 32768, 32832, 32848, 32849, 32846, - 0, 32768, 32832, 0, 32768, 32832, 32848, 0, - 32768, 32832, 32848, 0, 32768, 32832, 32848, 32850, - 0, 32768, 32832, 32848, 0, 32768, 32832, 32848, - 32852, 0, 32768, 32832, 32848, 32852, 0, 32768, - 32832, 32848, 32856, 32854, 0, 32768, 32832, 32848, - 0, 32768, 32832, 32864, 32856, 0, 32768, 32832, - 32864, 32856, 0, 32768, 32832, 32864, 32856, 32858, - 0, 32768, 32832, 32864, 32856, 0, 32768, 32832, - 32864, 32865, 32860, 0, 32768, 32832, 32864, 32865, - 32860, 0, 32768, 32832, 32864, 32865, 32860, 32862, - 0, 32768, 32832, 0, 32768, 32896, 32864, 0, - 32768, 32896, 32864, 0, 32768, 32896, 32864, 32866, - 0, 32768, 32896, 32864, 0, 32768, 32896, 32864, - 32868, 0, 32768, 32896, 32864, 32868, 0, 32768, - 32896, 32864, 32872, 32870, 0, 32768, 32896, 32864, - 0, 32768, 32896, 32864, 32872, 0, 32768, 32896, - 32864, 32872, 0, 32768, 32896, 32864, 32872, 32874, - 0, 32768, 32896, 32864, 32872, 0, 32768, 32896, - 32864, 32880, 32876, 0, 32768, 32896, 32864, 32880, - 32876, 0, 32768, 32896, 32864, 32880, 32881, 32878, - 0, 32768, 32896, 32864, 0, 32768, 32896, 32897, - 32880, 0, 32768, 32896, 32897, 32880, 0, 32768, - 32896, 32897, 32880, 32882, 0, 32768, 32896, 32897, - 32880, 0, 32768, 32896, 32897, 32880, 32884, 0, - 32768, 32896, 32897, 32880, 32884, 0, 32768, 32896, - 32897, 32880, 32888, 32886, 0, 32768, 32896, 32897, - 32880, 0, 32768, 32896, 32897, 32880, 32888, 0, - 32768, 32896, 32897, 32899, 32888, 0, 32768, 32896, - 32897, 32899, 32888, 32890, 0, 32768, 32896, 32897, - 32899, 32888, 0, 32768, 32896, 32897, 32899, 32888, - 32892, 0, 32768, 32896, 32897, 32899, 32888, 32892, - 0, 32768, 32896, 32897, 32899, 32888, 32892, 32894, - 0, 32768, 0, 32768, 32896, 0, 32768, 32896, - 0, 32768, 32896, 32898, 0, 32768, 32896, 0, - 32768, 32896, 32900, 0, 32768, 32896, 32900, 0, - 32768, 32896, 32904, 32902, 0, 32768, 32896, 0, - 32768, 32896, 32904, 0, 32768, 32896, 32904, 0, - 32768, 32896, 32904, 32906, 0, 32768, 32896, 32904, - 0, 32768, 32896, 32912, 32908, 0, 32768, 32896, - 32912, 32908, 0, 32768, 32896, 32912, 32913, 32910, - 0, 32768, 32896, 0, 32768, 32896, 32912, 0, - 32768, 32896, 32912, 0, 32768, 32896, 32912, 32914, - 0, 32768, 32896, 32912, 0, 32768, 32896, 32912, - 32916, 0, 32768, 32896, 32912, 32916, 0, 32768, - 32896, 32912, 32920, 32918, 0, 32768, 32896, 32912, - 0, 32768, 32896, 32928, 32920, 0, 32768, 32896, - 32928, 32920, 0, 32768, 32896, 32928, 32920, 32922, - 0, 32768, 32896, 32928, 32920, 0, 32768, 32896, - 32928, 32929, 32924, 0, 32768, 32896, 32928, 32929, - 32924, 0, 32768, 32896, 32928, 32929, 32924, 32926, - 0, 32768, 32896, 0, 32768, 32896, 32928, 0, - 32768, 32896, 32928, 0, 32768, 32896, 32928, 32930, - 0, 32768, 32896, 32928, 0, 32768, 32896, 32928, - 32932, 0, 32768, 32896, 32928, 32932, 0, 32768, - 32896, 32928, 32936, 32934, 0, 32768, 32896, 32928, - 0, 32768, 32896, 32928, 32936, 0, 32768, 32896, - 32928, 32936, 0, 32768, 32896, 32928, 32936, 32938, - 0, 32768, 32896, 32928, 32936, 0, 32768, 32896, - 32928, 32944, 32940, 0, 32768, 32896, 32928, 32944, - 32940, 0, 32768, 32896, 32928, 32944, 32945, 32942, - 0, 32768, 32896, 32928, 0, 32768, 32896, 32960, - 32944, 0, 32768, 32896, 32960, 32944, 0, 32768, - 32896, 32960, 32944, 32946, 0, 32768, 32896, 32960, - 32944, 0, 32768, 32896, 32960, 32944, 32948, 0, - 32768, 32896, 32960, 32944, 32948, 0, 32768, 32896, - 32960, 32944, 32952, 32950, 0, 32768, 32896, 32960, - 32944, 0, 32768, 32896, 32960, 32961, 32952, 0, - 32768, 32896, 32960, 32961, 32952, 0, 32768, 32896, - 32960, 32961, 32952, 32954, 0, 32768, 32896, 32960, - 32961, 32952, 0, 32768, 32896, 32960, 32961, 32952, - 32956, 0, 32768, 32896, 32960, 32961, 32963, 32956, - 0, 32768, 32896, 32960, 32961, 32963, 32956, 32958, - 0, 32768, 32896, 0, 32768, 33024, 32960, 0, - 32768, 33024, 32960, 0, 32768, 33024, 32960, 32962, - 0, 32768, 33024, 32960, 0, 32768, 33024, 32960, - 32964, 0, 32768, 33024, 32960, 32964, 0, 32768, - 33024, 32960, 32968, 32966, 0, 32768, 33024, 32960, - 0, 32768, 33024, 32960, 32968, 0, 32768, 33024, - 32960, 32968, 0, 32768, 33024, 32960, 32968, 32970, - 0, 32768, 33024, 32960, 32968, 0, 32768, 33024, - 32960, 32976, 32972, 0, 32768, 33024, 32960, 32976, - 32972, 0, 32768, 33024, 32960, 32976, 32977, 32974, - 0, 32768, 33024, 32960, 0, 32768, 33024, 32960, - 32976, 0, 32768, 33024, 32960, 32976, 0, 32768, - 33024, 32960, 32976, 32978, 0, 32768, 33024, 32960, - 32976, 0, 32768, 33024, 32960, 32976, 32980, 0, - 32768, 33024, 32960, 32976, 32980, 0, 32768, 33024, - 32960, 32976, 32984, 32982, 0, 32768, 33024, 32960, - 32976, 0, 32768, 33024, 32960, 32992, 32984, 0, - 32768, 33024, 32960, 32992, 32984, 0, 32768, 33024, - 32960, 32992, 32984, 32986, 0, 32768, 33024, 32960, - 32992, 32984, 0, 32768, 33024, 32960, 32992, 32993, - 32988, 0, 32768, 33024, 32960, 32992, 32993, 32988, - 0, 32768, 33024, 32960, 32992, 32993, 32988, 32990, - 0, 32768, 33024, 32960, 0, 32768, 33024, 33025, - 32992, 0, 32768, 33024, 33025, 32992, 0, 32768, - 33024, 33025, 32992, 32994, 0, 32768, 33024, 33025, - 32992, 0, 32768, 33024, 33025, 32992, 32996, 0, - 32768, 33024, 33025, 32992, 32996, 0, 32768, 33024, - 33025, 32992, 33000, 32998, 0, 32768, 33024, 33025, - 32992, 0, 32768, 33024, 33025, 32992, 33000, 0, - 32768, 33024, 33025, 32992, 33000, 0, 32768, 33024, - 33025, 32992, 33000, 33002, 0, 32768, 33024, 33025, - 32992, 33000, 0, 32768, 33024, 33025, 32992, 33008, - 33004, 0, 32768, 33024, 33025, 32992, 33008, 33004, - 0, 32768, 33024, 33025, 32992, 33008, 33009, 33006, - 0, 32768, 33024, 33025, 32992, 0, 32768, 33024, - 33025, 32992, 33008, 0, 32768, 33024, 33025, 33027, - 33008, 0, 32768, 33024, 33025, 33027, 33008, 33010, - 0, 32768, 33024, 33025, 33027, 33008, 0, 32768, - 33024, 33025, 33027, 33008, 33012, 0, 32768, 33024, - 33025, 33027, 33008, 33012, 0, 32768, 33024, 33025, - 33027, 33008, 33016, 33014, 0, 32768, 33024, 33025, - 33027, 33008, 0, 32768, 33024, 33025, 33027, 33008, - 33016, 0, 32768, 33024, 33025, 33027, 33008, 33016, - 0, 32768, 33024, 33025, 33027, 33008, 33016, 33018, - 0, 32768, 33024, 33025, 33027, 33031, 33016, 0, - 32768, 33024, 33025, 33027, 33031, 33016, 33020, 0, - 32768, 33024, 33025, 33027, 33031, 33016, 33020, 0, - 32768, 33024, 33025, 33027, 33031, 33016, 33020, 33022, - 0, 32768, 0, 32768, 33024, 0, 32768, 33024, - 0, 32768, 33024, 33026, 0, 32768, 33024, 0, - 32768, 33024, 33028, 0, 32768, 33024, 33028, 0, - 32768, 33024, 33032, 33030, 0, 32768, 33024, 0, - 32768, 33024, 33032, 0, 32768, 33024, 33032, 0, - 32768, 33024, 33032, 33034, 0, 32768, 33024, 33032, - 0, 32768, 33024, 33040, 33036, 0, 32768, 33024, - 33040, 33036, 0, 32768, 33024, 33040, 33041, 33038, - 0, 32768, 33024, 0, 32768, 33024, 33040, 0, - 32768, 33024, 33040, 0, 32768, 33024, 33040, 33042, - 0, 32768, 33024, 33040, 0, 32768, 33024, 33040, - 33044, 0, 32768, 33024, 33040, 33044, 0, 32768, - 33024, 33040, 33048, 33046, 0, 32768, 33024, 33040, - 0, 32768, 33024, 33056, 33048, 0, 32768, 33024, - 33056, 33048, 0, 32768, 33024, 33056, 33048, 33050, - 0, 32768, 33024, 33056, 33048, 0, 32768, 33024, - 33056, 33057, 33052, 0, 32768, 33024, 33056, 33057, - 33052, 0, 32768, 33024, 33056, 33057, 33052, 33054, - 0, 32768, 33024, 0, 32768, 33024, 33056, 0, - 32768, 33024, 33056, 0, 32768, 33024, 33056, 33058, - 0, 32768, 33024, 33056, 0, 32768, 33024, 33056, - 33060, 0, 32768, 33024, 33056, 33060, 0, 32768, - 33024, 33056, 33064, 33062, 0, 32768, 33024, 33056, - 0, 32768, 33024, 33056, 33064, 0, 32768, 33024, - 33056, 33064, 0, 32768, 33024, 33056, 33064, 33066, - 0, 32768, 33024, 33056, 33064, 0, 32768, 33024, - 33056, 33072, 33068, 0, 32768, 33024, 33056, 33072, - 33068, 0, 32768, 33024, 33056, 33072, 33073, 33070, - 0, 32768, 33024, 33056, 0, 32768, 33024, 33088, - 33072, 0, 32768, 33024, 33088, 33072, 0, 32768, - 33024, 33088, 33072, 33074, 0, 32768, 33024, 33088, - 33072, 0, 32768, 33024, 33088, 33072, 33076, 0, - 32768, 33024, 33088, 33072, 33076, 0, 32768, 33024, - 33088, 33072, 33080, 33078, 0, 32768, 33024, 33088, - 33072, 0, 32768, 33024, 33088, 33089, 33080, 0, - 32768, 33024, 33088, 33089, 33080, 0, 32768, 33024, - 33088, 33089, 33080, 33082, 0, 32768, 33024, 33088, - 33089, 33080, 0, 32768, 33024, 33088, 33089, 33080, - 33084, 0, 32768, 33024, 33088, 33089, 33091, 33084, - 0, 32768, 33024, 33088, 33089, 33091, 33084, 33086, - 0, 32768, 33024, 0, 32768, 33024, 33088, 0, - 32768, 33024, 33088, 0, 32768, 33024, 33088, 33090, - 0, 32768, 33024, 33088, 0, 32768, 33024, 33088, - 33092, 0, 32768, 33024, 33088, 33092, 0, 32768, - 33024, 33088, 33096, 33094, 0, 32768, 33024, 33088, - 0, 32768, 33024, 33088, 33096, 0, 32768, 33024, - 33088, 33096, 0, 32768, 33024, 33088, 33096, 33098, - 0, 32768, 33024, 33088, 33096, 0, 32768, 33024, - 33088, 33104, 33100, 0, 32768, 33024, 33088, 33104, - 33100, 0, 32768, 33024, 33088, 33104, 33105, 33102, - 0, 32768, 33024, 33088, 0, 32768, 33024, 33088, - 33104, 0, 32768, 33024, 33088, 33104, 0, 32768, - 33024, 33088, 33104, 33106, 0, 32768, 33024, 33088, - 33104, 0, 32768, 33024, 33088, 33104, 33108, 0, - 32768, 33024, 33088, 33104, 33108, 0, 32768, 33024, - 33088, 33104, 33112, 33110, 0, 32768, 33024, 33088, - 33104, 0, 32768, 33024, 33088, 33120, 33112, 0, - 32768, 33024, 33088, 33120, 33112, 0, 32768, 33024, - 33088, 33120, 33112, 33114, 0, 32768, 33024, 33088, - 33120, 33112, 0, 32768, 33024, 33088, 33120, 33121, - 33116, 0, 32768, 33024, 33088, 33120, 33121, 33116, - 0, 32768, 33024, 33088, 33120, 33121, 33116, 33118, - 0, 32768, 33024, 33088, 0, 32768, 33024, 33152, - 33120, 0, 32768, 33024, 33152, 33120, 0, 32768, - 33024, 33152, 33120, 33122, 0, 32768, 33024, 33152, - 33120, 0, 32768, 33024, 33152, 33120, 33124, 0, - 32768, 33024, 33152, 33120, 33124, 0, 32768, 33024, - 33152, 33120, 33128, 33126, 0, 32768, 33024, 33152, - 33120, 0, 32768, 33024, 33152, 33120, 33128, 0, - 32768, 33024, 33152, 33120, 33128, 0, 32768, 33024, - 33152, 33120, 33128, 33130, 0, 32768, 33024, 33152, - 33120, 33128, 0, 32768, 33024, 33152, 33120, 33136, - 33132, 0, 32768, 33024, 33152, 33120, 33136, 33132, - 0, 32768, 33024, 33152, 33120, 33136, 33137, 33134, - 0, 32768, 33024, 33152, 33120, 0, 32768, 33024, - 33152, 33153, 33136, 0, 32768, 33024, 33152, 33153, - 33136, 0, 32768, 33024, 33152, 33153, 33136, 33138, - 0, 32768, 33024, 33152, 33153, 33136, 0, 32768, - 33024, 33152, 33153, 33136, 33140, 0, 32768, 33024, - 33152, 33153, 33136, 33140, 0, 32768, 33024, 33152, - 33153, 33136, 33144, 33142, 0, 32768, 33024, 33152, - 33153, 33136, 0, 32768, 33024, 33152, 33153, 33136, - 33144, 0, 32768, 33024, 33152, 33153, 33155, 33144, - 0, 32768, 33024, 33152, 33153, 33155, 33144, 33146, - 0, 32768, 33024, 33152, 33153, 33155, 33144, 0, - 32768, 33024, 33152, 33153, 33155, 33144, 33148, 0, - 32768, 33024, 33152, 33153, 33155, 33144, 33148, 0, - 32768, 33024, 33152, 33153, 33155, 33144, 33148, 33150, - 0, 32768, 33024, 0, 32768, 33280, 33152, 0, - 32768, 33280, 33152, 0, 32768, 33280, 33152, 33154, - 0, 32768, 33280, 33152, 0, 32768, 33280, 33152, - 33156, 0, 32768, 33280, 33152, 33156, 0, 32768, - 33280, 33152, 33160, 33158, 0, 32768, 33280, 33152, - 0, 32768, 33280, 33152, 33160, 0, 32768, 33280, - 33152, 33160, 0, 32768, 33280, 33152, 33160, 33162, - 0, 32768, 33280, 33152, 33160, 0, 32768, 33280, - 33152, 33168, 33164, 0, 32768, 33280, 33152, 33168, - 33164, 0, 32768, 33280, 33152, 33168, 33169, 33166, - 0, 32768, 33280, 33152, 0, 32768, 33280, 33152, - 33168, 0, 32768, 33280, 33152, 33168, 0, 32768, - 33280, 33152, 33168, 33170, 0, 32768, 33280, 33152, - 33168, 0, 32768, 33280, 33152, 33168, 33172, 0, - 32768, 33280, 33152, 33168, 33172, 0, 32768, 33280, - 33152, 33168, 33176, 33174, 0, 32768, 33280, 33152, - 33168, 0, 32768, 33280, 33152, 33184, 33176, 0, - 32768, 33280, 33152, 33184, 33176, 0, 32768, 33280, - 33152, 33184, 33176, 33178, 0, 32768, 33280, 33152, - 33184, 33176, 0, 32768, 33280, 33152, 33184, 33185, - 33180, 0, 32768, 33280, 33152, 33184, 33185, 33180, - 0, 32768, 33280, 33152, 33184, 33185, 33180, 33182, - 0, 32768, 33280, 33152, 0, 32768, 33280, 33152, - 33184, 0, 32768, 33280, 33152, 33184, 0, 32768, - 33280, 33152, 33184, 33186, 0, 32768, 33280, 33152, - 33184, 0, 32768, 33280, 33152, 33184, 33188, 0, - 32768, 33280, 33152, 33184, 33188, 0, 32768, 33280, - 33152, 33184, 33192, 33190, 0, 32768, 33280, 33152, - 33184, 0, 32768, 33280, 33152, 33184, 33192, 0, - 32768, 33280, 33152, 33184, 33192, 0, 32768, 33280, - 33152, 33184, 33192, 33194, 0, 32768, 33280, 33152, - 33184, 33192, 0, 32768, 33280, 33152, 33184, 33200, - 33196, 0, 32768, 33280, 33152, 33184, 33200, 33196, - 0, 32768, 33280, 33152, 33184, 33200, 33201, 33198, - 0, 32768, 33280, 33152, 33184, 0, 32768, 33280, - 33152, 33216, 33200, 0, 32768, 33280, 33152, 33216, - 33200, 0, 32768, 33280, 33152, 33216, 33200, 33202, - 0, 32768, 33280, 33152, 33216, 33200, 0, 32768, - 33280, 33152, 33216, 33200, 33204, 0, 32768, 33280, - 33152, 33216, 33200, 33204, 0, 32768, 33280, 33152, - 33216, 33200, 33208, 33206, 0, 32768, 33280, 33152, - 33216, 33200, 0, 32768, 33280, 33152, 33216, 33217, - 33208, 0, 32768, 33280, 33152, 33216, 33217, 33208, - 0, 32768, 33280, 33152, 33216, 33217, 33208, 33210, - 0, 32768, 33280, 33152, 33216, 33217, 33208, 0, - 32768, 33280, 33152, 33216, 33217, 33208, 33212, 0, - 32768, 33280, 33152, 33216, 33217, 33219, 33212, 0, - 32768, 33280, 33152, 33216, 33217, 33219, 33212, 33214, - 0, 32768, 33280, 33152, 0, 32768, 33280, 33281, - 33216, 0, 32768, 33280, 33281, 33216, 0, 32768, - 33280, 33281, 33216, 33218, 0, 32768, 33280, 33281, - 33216, 0, 32768, 33280, 33281, 33216, 33220, 0, - 32768, 33280, 33281, 33216, 33220, 0, 32768, 33280, - 33281, 33216, 33224, 33222, 0, 32768, 33280, 33281, - 33216, 0, 32768, 33280, 33281, 33216, 33224, 0, - 32768, 33280, 33281, 33216, 33224, 0, 32768, 33280, - 33281, 33216, 33224, 33226, 0, 32768, 33280, 33281, - 33216, 33224, 0, 32768, 33280, 33281, 33216, 33232, - 33228, 0, 32768, 33280, 33281, 33216, 33232, 33228, - 0, 32768, 33280, 33281, 33216, 33232, 33233, 33230, - 0, 32768, 33280, 33281, 33216, 0, 32768, 33280, - 33281, 33216, 33232, 0, 32768, 33280, 33281, 33216, - 33232, 0, 32768, 33280, 33281, 33216, 33232, 33234, - 0, 32768, 33280, 33281, 33216, 33232, 0, 32768, - 33280, 33281, 33216, 33232, 33236, 0, 32768, 33280, - 33281, 33216, 33232, 33236, 0, 32768, 33280, 33281, - 33216, 33232, 33240, 33238, 0, 32768, 33280, 33281, - 33216, 33232, 0, 32768, 33280, 33281, 33216, 33248, - 33240, 0, 32768, 33280, 33281, 33216, 33248, 33240, - 0, 32768, 33280, 33281, 33216, 33248, 33240, 33242, - 0, 32768, 33280, 33281, 33216, 33248, 33240, 0, - 32768, 33280, 33281, 33216, 33248, 33249, 33244, 0, - 32768, 33280, 33281, 33216, 33248, 33249, 33244, 0, - 32768, 33280, 33281, 33216, 33248, 33249, 33244, 33246, - 0, 32768, 33280, 33281, 33216, 0, 32768, 33280, - 33281, 33216, 33248, 0, 32768, 33280, 33281, 33283, - 33248, 0, 32768, 33280, 33281, 33283, 33248, 33250, - 0, 32768, 33280, 33281, 33283, 33248, 0, 32768, - 33280, 33281, 33283, 33248, 33252, 0, 32768, 33280, - 33281, 33283, 33248, 33252, 0, 32768, 33280, 33281, - 33283, 33248, 33256, 33254, 0, 32768, 33280, 33281, - 33283, 33248, 0, 32768, 33280, 33281, 33283, 33248, - 33256, 0, 32768, 33280, 33281, 33283, 33248, 33256, - 0, 32768, 33280, 33281, 33283, 33248, 33256, 33258, - 0, 32768, 33280, 33281, 33283, 33248, 33256, 0, - 32768, 33280, 33281, 33283, 33248, 33264, 33260, 0, - 32768, 33280, 33281, 33283, 33248, 33264, 33260, 0, - 32768, 33280, 33281, 33283, 33248, 33264, 33265, 33262, - 0, 32768, 33280, 33281, 33283, 33248, 0, 32768, - 33280, 33281, 33283, 33248, 33264, 0, 32768, 33280, - 33281, 33283, 33248, 33264, 0, 32768, 33280, 33281, - 33283, 33248, 33264, 33266, 0, 32768, 33280, 33281, - 33283, 33287, 33264, 0, 32768, 33280, 33281, 33283, - 33287, 33264, 33268, 0, 32768, 33280, 33281, 33283, - 33287, 33264, 33268, 0, 32768, 33280, 33281, 33283, - 33287, 33264, 33272, 33270, 0, 32768, 33280, 33281, - 33283, 33287, 33264, 0, 32768, 33280, 33281, 33283, - 33287, 33264, 33272, 0, 32768, 33280, 33281, 33283, - 33287, 33264, 33272, 0, 32768, 33280, 33281, 33283, - 33287, 33264, 33272, 33274, 0, 32768, 33280, 33281, - 33283, 33287, 33264, 33272, 0, 32768, 33280, 33281, - 33283, 33287, 33264, 33272, 33276, 0, 32768, 33280, - 33281, 33283, 33287, 33264, 33272, 33276, 0, 32768, - 33280, 33281, 33283, 33287, 33264, 33272, 33276, 33278, - 0, 32768, 0, 32768, 33280, 0, 32768, 33280, - 0, 32768, 33280, 33282, 0, 32768, 33280, 0, - 32768, 33280, 33284, 0, 32768, 33280, 33284, 0, - 32768, 33280, 33288, 33286, 0, 32768, 33280, 0, - 32768, 33280, 33288, 0, 32768, 33280, 33288, 0, - 32768, 33280, 33288, 33290, 0, 32768, 33280, 33288, - 0, 32768, 33280, 33296, 33292, 0, 32768, 33280, - 33296, 33292, 0, 32768, 33280, 33296, 33297, 33294, - 0, 32768, 33280, 0, 32768, 33280, 33296, 0, - 32768, 33280, 33296, 0, 32768, 33280, 33296, 33298, - 0, 32768, 33280, 33296, 0, 32768, 33280, 33296, - 33300, 0, 32768, 33280, 33296, 33300, 0, 32768, - 33280, 33296, 33304, 33302, 0, 32768, 33280, 33296, - 0, 32768, 33280, 33312, 33304, 0, 32768, 33280, - 33312, 33304, 0, 32768, 33280, 33312, 33304, 33306, - 0, 32768, 33280, 33312, 33304, 0, 32768, 33280, - 33312, 33313, 33308, 0, 32768, 33280, 33312, 33313, - 33308, 0, 32768, 33280, 33312, 33313, 33308, 33310, - 0, 32768, 33280, 0, 32768, 33280, 33312, 0, - 32768, 33280, 33312, 0, 32768, 33280, 33312, 33314, - 0, 32768, 33280, 33312, 0, 32768, 33280, 33312, - 33316, 0, 32768, 33280, 33312, 33316, 0, 32768, - 33280, 33312, 33320, 33318, 0, 32768, 33280, 33312, - 0, 32768, 33280, 33312, 33320, 0, 32768, 33280, - 33312, 33320, 0, 32768, 33280, 33312, 33320, 33322, - 0, 32768, 33280, 33312, 33320, 0, 32768, 33280, - 33312, 33328, 33324, 0, 32768, 33280, 33312, 33328, - 33324, 0, 32768, 33280, 33312, 33328, 33329, 33326, - 0, 32768, 33280, 33312, 0, 32768, 33280, 33344, - 33328, 0, 32768, 33280, 33344, 33328, 0, 32768, - 33280, 33344, 33328, 33330, 0, 32768, 33280, 33344, - 33328, 0, 32768, 33280, 33344, 33328, 33332, 0, - 32768, 33280, 33344, 33328, 33332, 0, 32768, 33280, - 33344, 33328, 33336, 33334, 0, 32768, 33280, 33344, - 33328, 0, 32768, 33280, 33344, 33345, 33336, 0, - 32768, 33280, 33344, 33345, 33336, 0, 32768, 33280, - 33344, 33345, 33336, 33338, 0, 32768, 33280, 33344, - 33345, 33336, 0, 32768, 33280, 33344, 33345, 33336, - 33340, 0, 32768, 33280, 33344, 33345, 33347, 33340, - 0, 32768, 33280, 33344, 33345, 33347, 33340, 33342, - 0, 32768, 33280, 0, 32768, 33280, 33344, 0, - 32768, 33280, 33344, 0, 32768, 33280, 33344, 33346, - 0, 32768, 33280, 33344, 0, 32768, 33280, 33344, - 33348, 0, 32768, 33280, 33344, 33348, 0, 32768, - 33280, 33344, 33352, 33350, 0, 32768, 33280, 33344, - 0, 32768, 33280, 33344, 33352, 0, 32768, 33280, - 33344, 33352, 0, 32768, 33280, 33344, 33352, 33354, - 0, 32768, 33280, 33344, 33352, 0, 32768, 33280, - 33344, 33360, 33356, 0, 32768, 33280, 33344, 33360, - 33356, 0, 32768, 33280, 33344, 33360, 33361, 33358, - 0, 32768, 33280, 33344, 0, 32768, 33280, 33344, - 33360, 0, 32768, 33280, 33344, 33360, 0, 32768, - 33280, 33344, 33360, 33362, 0, 32768, 33280, 33344, - 33360, 0, 32768, 33280, 33344, 33360, 33364, 0, - 32768, 33280, 33344, 33360, 33364, 0, 32768, 33280, - 33344, 33360, 33368, 33366, 0, 32768, 33280, 33344, - 33360, 0, 32768, 33280, 33344, 33376, 33368, 0, - 32768, 33280, 33344, 33376, 33368, 0, 32768, 33280, - 33344, 33376, 33368, 33370, 0, 32768, 33280, 33344, - 33376, 33368, 0, 32768, 33280, 33344, 33376, 33377, - 33372, 0, 32768, 33280, 33344, 33376, 33377, 33372, - 0, 32768, 33280, 33344, 33376, 33377, 33372, 33374, - 0, 32768, 33280, 33344, 0, 32768, 33280, 33408, - 33376, 0, 32768, 33280, 33408, 33376, 0, 32768, - 33280, 33408, 33376, 33378, 0, 32768, 33280, 33408, - 33376, 0, 32768, 33280, 33408, 33376, 33380, 0, - 32768, 33280, 33408, 33376, 33380, 0, 32768, 33280, - 33408, 33376, 33384, 33382, 0, 32768, 33280, 33408, - 33376, 0, 32768, 33280, 33408, 33376, 33384, 0, - 32768, 33280, 33408, 33376, 33384, 0, 32768, 33280, - 33408, 33376, 33384, 33386, 0, 32768, 33280, 33408, - 33376, 33384, 0, 32768, 33280, 33408, 33376, 33392, - 33388, 0, 32768, 33280, 33408, 33376, 33392, 33388, - 0, 32768, 33280, 33408, 33376, 33392, 33393, 33390, - 0, 32768, 33280, 33408, 33376, 0, 32768, 33280, - 33408, 33409, 33392, 0, 32768, 33280, 33408, 33409, - 33392, 0, 32768, 33280, 33408, 33409, 33392, 33394, - 0, 32768, 33280, 33408, 33409, 33392, 0, 32768, - 33280, 33408, 33409, 33392, 33396, 0, 32768, 33280, - 33408, 33409, 33392, 33396, 0, 32768, 33280, 33408, - 33409, 33392, 33400, 33398, 0, 32768, 33280, 33408, - 33409, 33392, 0, 32768, 33280, 33408, 33409, 33392, - 33400, 0, 32768, 33280, 33408, 33409, 33411, 33400, - 0, 32768, 33280, 33408, 33409, 33411, 33400, 33402, - 0, 32768, 33280, 33408, 33409, 33411, 33400, 0, - 32768, 33280, 33408, 33409, 33411, 33400, 33404, 0, - 32768, 33280, 33408, 33409, 33411, 33400, 33404, 0, - 32768, 33280, 33408, 33409, 33411, 33400, 33404, 33406, - 0, 32768, 33280, 0, 32768, 33280, 33408, 0, - 32768, 33280, 33408, 0, 32768, 33280, 33408, 33410, - 0, 32768, 33280, 33408, 0, 32768, 33280, 33408, - 33412, 0, 32768, 33280, 33408, 33412, 0, 32768, - 33280, 33408, 33416, 33414, 0, 32768, 33280, 33408, - 0, 32768, 33280, 33408, 33416, 0, 32768, 33280, - 33408, 33416, 0, 32768, 33280, 33408, 33416, 33418, - 0, 32768, 33280, 33408, 33416, 0, 32768, 33280, - 33408, 33424, 33420, 0, 32768, 33280, 33408, 33424, - 33420, 0, 32768, 33280, 33408, 33424, 33425, 33422, - 0, 32768, 33280, 33408, 0, 32768, 33280, 33408, - 33424, 0, 32768, 33280, 33408, 33424, 0, 32768, - 33280, 33408, 33424, 33426, 0, 32768, 33280, 33408, - 33424, 0, 32768, 33280, 33408, 33424, 33428, 0, - 32768, 33280, 33408, 33424, 33428, 0, 32768, 33280, - 33408, 33424, 33432, 33430, 0, 32768, 33280, 33408, - 33424, 0, 32768, 33280, 33408, 33440, 33432, 0, - 32768, 33280, 33408, 33440, 33432, 0, 32768, 33280, - 33408, 33440, 33432, 33434, 0, 32768, 33280, 33408, - 33440, 33432, 0, 32768, 33280, 33408, 33440, 33441, - 33436, 0, 32768, 33280, 33408, 33440, 33441, 33436, - 0, 32768, 33280, 33408, 33440, 33441, 33436, 33438, - 0, 32768, 33280, 33408, 0, 32768, 33280, 33408, - 33440, 0, 32768, 33280, 33408, 33440, 0, 32768, - 33280, 33408, 33440, 33442, 0, 32768, 33280, 33408, - 33440, 0, 32768, 33280, 33408, 33440, 33444, 0, - 32768, 33280, 33408, 33440, 33444, 0, 32768, 33280, - 33408, 33440, 33448, 33446, 0, 32768, 33280, 33408, - 33440, 0, 32768, 33280, 33408, 33440, 33448, 0, - 32768, 33280, 33408, 33440, 33448, 0, 32768, 33280, - 33408, 33440, 33448, 33450, 0, 32768, 33280, 33408, - 33440, 33448, 0, 32768, 33280, 33408, 33440, 33456, - 33452, 0, 32768, 33280, 33408, 33440, 33456, 33452, - 0, 32768, 33280, 33408, 33440, 33456, 33457, 33454, - 0, 32768, 33280, 33408, 33440, 0, 32768, 33280, - 33408, 33472, 33456, 0, 32768, 33280, 33408, 33472, - 33456, 0, 32768, 33280, 33408, 33472, 33456, 33458, - 0, 32768, 33280, 33408, 33472, 33456, 0, 32768, - 33280, 33408, 33472, 33456, 33460, 0, 32768, 33280, - 33408, 33472, 33456, 33460, 0, 32768, 33280, 33408, - 33472, 33456, 33464, 33462, 0, 32768, 33280, 33408, - 33472, 33456, 0, 32768, 33280, 33408, 33472, 33473, - 33464, 0, 32768, 33280, 33408, 33472, 33473, 33464, - 0, 32768, 33280, 33408, 33472, 33473, 33464, 33466, - 0, 32768, 33280, 33408, 33472, 33473, 33464, 0, - 32768, 33280, 33408, 33472, 33473, 33464, 33468, 0, - 32768, 33280, 33408, 33472, 33473, 33475, 33468, 0, - 32768, 33280, 33408, 33472, 33473, 33475, 33468, 33470, - 0, 32768, 33280, 33408, 0, 32768, 33280, 33536, - 33472, 0, 32768, 33280, 33536, 33472, 0, 32768, - 33280, 33536, 33472, 33474, 0, 32768, 33280, 33536, - 33472, 0, 32768, 33280, 33536, 33472, 33476, 0, - 32768, 33280, 33536, 33472, 33476, 0, 32768, 33280, - 33536, 33472, 33480, 33478, 0, 32768, 33280, 33536, - 33472, 0, 32768, 33280, 33536, 33472, 33480, 0, - 32768, 33280, 33536, 33472, 33480, 0, 32768, 33280, - 33536, 33472, 33480, 33482, 0, 32768, 33280, 33536, - 33472, 33480, 0, 32768, 33280, 33536, 33472, 33488, - 33484, 0, 32768, 33280, 33536, 33472, 33488, 33484, - 0, 32768, 33280, 33536, 33472, 33488, 33489, 33486, - 0, 32768, 33280, 33536, 33472, 0, 32768, 33280, - 33536, 33472, 33488, 0, 32768, 33280, 33536, 33472, - 33488, 0, 32768, 33280, 33536, 33472, 33488, 33490, - 0, 32768, 33280, 33536, 33472, 33488, 0, 32768, - 33280, 33536, 33472, 33488, 33492, 0, 32768, 33280, - 33536, 33472, 33488, 33492, 0, 32768, 33280, 33536, - 33472, 33488, 33496, 33494, 0, 32768, 33280, 33536, - 33472, 33488, 0, 32768, 33280, 33536, 33472, 33504, - 33496, 0, 32768, 33280, 33536, 33472, 33504, 33496, - 0, 32768, 33280, 33536, 33472, 33504, 33496, 33498, - 0, 32768, 33280, 33536, 33472, 33504, 33496, 0, - 32768, 33280, 33536, 33472, 33504, 33505, 33500, 0, - 32768, 33280, 33536, 33472, 33504, 33505, 33500, 0, - 32768, 33280, 33536, 33472, 33504, 33505, 33500, 33502, - 0, 32768, 33280, 33536, 33472, 0, 32768, 33280, - 33536, 33537, 33504, 0, 32768, 33280, 33536, 33537, - 33504, 0, 32768, 33280, 33536, 33537, 33504, 33506, - 0, 32768, 33280, 33536, 33537, 33504, 0, 32768, - 33280, 33536, 33537, 33504, 33508, 0, 32768, 33280, - 33536, 33537, 33504, 33508, 0, 32768, 33280, 33536, - 33537, 33504, 33512, 33510, 0, 32768, 33280, 33536, - 33537, 33504, 0, 32768, 33280, 33536, 33537, 33504, - 33512, 0, 32768, 33280, 33536, 33537, 33504, 33512, - 0, 32768, 33280, 33536, 33537, 33504, 33512, 33514, - 0, 32768, 33280, 33536, 33537, 33504, 33512, 0, - 32768, 33280, 33536, 33537, 33504, 33520, 33516, 0, - 32768, 33280, 33536, 33537, 33504, 33520, 33516, 0, - 32768, 33280, 33536, 33537, 33504, 33520, 33521, 33518, - 0, 32768, 33280, 33536, 33537, 33504, 0, 32768, - 33280, 33536, 33537, 33504, 33520, 0, 32768, 33280, - 33536, 33537, 33539, 33520, 0, 32768, 33280, 33536, - 33537, 33539, 33520, 33522, 0, 32768, 33280, 33536, - 33537, 33539, 33520, 0, 32768, 33280, 33536, 33537, - 33539, 33520, 33524, 0, 32768, 33280, 33536, 33537, - 33539, 33520, 33524, 0, 32768, 33280, 33536, 33537, - 33539, 33520, 33528, 33526, 0, 32768, 33280, 33536, - 33537, 33539, 33520, 0, 32768, 33280, 33536, 33537, - 33539, 33520, 33528, 0, 32768, 33280, 33536, 33537, - 33539, 33520, 33528, 0, 32768, 33280, 33536, 33537, - 33539, 33520, 33528, 33530, 0, 32768, 33280, 33536, - 33537, 33539, 33543, 33528, 0, 32768, 33280, 33536, - 33537, 33539, 33543, 33528, 33532, 0, 32768, 33280, - 33536, 33537, 33539, 33543, 33528, 33532, 0, 32768, - 33280, 33536, 33537, 33539, 33543, 33528, 33532, 33534, - 0, 32768, 33280, 0, 32768, 33792, 33536, 0, - 32768, 33792, 33536, 0, 32768, 33792, 33536, 33538, - 0, 32768, 33792, 33536, 0, 32768, 33792, 33536, - 33540, 0, 32768, 33792, 33536, 33540, 0, 32768, - 33792, 33536, 33544, 33542, 0, 32768, 33792, 33536, - 0, 32768, 33792, 33536, 33544, 0, 32768, 33792, - 33536, 33544, 0, 32768, 33792, 33536, 33544, 33546, - 0, 32768, 33792, 33536, 33544, 0, 32768, 33792, - 33536, 33552, 33548, 0, 32768, 33792, 33536, 33552, - 33548, 0, 32768, 33792, 33536, 33552, 33553, 33550, - 0, 32768, 33792, 33536, 0, 32768, 33792, 33536, - 33552, 0, 32768, 33792, 33536, 33552, 0, 32768, - 33792, 33536, 33552, 33554, 0, 32768, 33792, 33536, - 33552, 0, 32768, 33792, 33536, 33552, 33556, 0, - 32768, 33792, 33536, 33552, 33556, 0, 32768, 33792, - 33536, 33552, 33560, 33558, 0, 32768, 33792, 33536, - 33552, 0, 32768, 33792, 33536, 33568, 33560, 0, - 32768, 33792, 33536, 33568, 33560, 0, 32768, 33792, - 33536, 33568, 33560, 33562, 0, 32768, 33792, 33536, - 33568, 33560, 0, 32768, 33792, 33536, 33568, 33569, - 33564, 0, 32768, 33792, 33536, 33568, 33569, 33564, - 0, 32768, 33792, 33536, 33568, 33569, 33564, 33566, - 0, 32768, 33792, 33536, 0, 32768, 33792, 33536, - 33568, 0, 32768, 33792, 33536, 33568, 0, 32768, - 33792, 33536, 33568, 33570, 0, 32768, 33792, 33536, - 33568, 0, 32768, 33792, 33536, 33568, 33572, 0, - 32768, 33792, 33536, 33568, 33572, 0, 32768, 33792, - 33536, 33568, 33576, 33574, 0, 32768, 33792, 33536, - 33568, 0, 32768, 33792, 33536, 33568, 33576, 0, - 32768, 33792, 33536, 33568, 33576, 0, 32768, 33792, - 33536, 33568, 33576, 33578, 0, 32768, 33792, 33536, - 33568, 33576, 0, 32768, 33792, 33536, 33568, 33584, - 33580, 0, 32768, 33792, 33536, 33568, 33584, 33580, - 0, 32768, 33792, 33536, 33568, 33584, 33585, 33582, - 0, 32768, 33792, 33536, 33568, 0, 32768, 33792, - 33536, 33600, 33584, 0, 32768, 33792, 33536, 33600, - 33584, 0, 32768, 33792, 33536, 33600, 33584, 33586, - 0, 32768, 33792, 33536, 33600, 33584, 0, 32768, - 33792, 33536, 33600, 33584, 33588, 0, 32768, 33792, - 33536, 33600, 33584, 33588, 0, 32768, 33792, 33536, - 33600, 33584, 33592, 33590, 0, 32768, 33792, 33536, - 33600, 33584, 0, 32768, 33792, 33536, 33600, 33601, - 33592, 0, 32768, 33792, 33536, 33600, 33601, 33592, - 0, 32768, 33792, 33536, 33600, 33601, 33592, 33594, - 0, 32768, 33792, 33536, 33600, 33601, 33592, 0, - 32768, 33792, 33536, 33600, 33601, 33592, 33596, 0, - 32768, 33792, 33536, 33600, 33601, 33603, 33596, 0, - 32768, 33792, 33536, 33600, 33601, 33603, 33596, 33598, - 0, 32768, 33792, 33536, 0, 32768, 33792, 33536, - 33600, 0, 32768, 33792, 33536, 33600, 0, 32768, - 33792, 33536, 33600, 33602, 0, 32768, 33792, 33536, - 33600, 0, 32768, 33792, 33536, 33600, 33604, 0, - 32768, 33792, 33536, 33600, 33604, 0, 32768, 33792, - 33536, 33600, 33608, 33606, 0, 32768, 33792, 33536, - 33600, 0, 32768, 33792, 33536, 33600, 33608, 0, - 32768, 33792, 33536, 33600, 33608, 0, 32768, 33792, - 33536, 33600, 33608, 33610, 0, 32768, 33792, 33536, - 33600, 33608, 0, 32768, 33792, 33536, 33600, 33616, - 33612, 0, 32768, 33792, 33536, 33600, 33616, 33612, - 0, 32768, 33792, 33536, 33600, 33616, 33617, 33614, - 0, 32768, 33792, 33536, 33600, 0, 32768, 33792, - 33536, 33600, 33616, 0, 32768, 33792, 33536, 33600, - 33616, 0, 32768, 33792, 33536, 33600, 33616, 33618, - 0, 32768, 33792, 33536, 33600, 33616, 0, 32768, - 33792, 33536, 33600, 33616, 33620, 0, 32768, 33792, - 33536, 33600, 33616, 33620, 0, 32768, 33792, 33536, - 33600, 33616, 33624, 33622, 0, 32768, 33792, 33536, - 33600, 33616, 0, 32768, 33792, 33536, 33600, 33632, - 33624, 0, 32768, 33792, 33536, 33600, 33632, 33624, - 0, 32768, 33792, 33536, 33600, 33632, 33624, 33626, - 0, 32768, 33792, 33536, 33600, 33632, 33624, 0, - 32768, 33792, 33536, 33600, 33632, 33633, 33628, 0, - 32768, 33792, 33536, 33600, 33632, 33633, 33628, 0, - 32768, 33792, 33536, 33600, 33632, 33633, 33628, 33630, - 0, 32768, 33792, 33536, 33600, 0, 32768, 33792, - 33536, 33664, 33632, 0, 32768, 33792, 33536, 33664, - 33632, 0, 32768, 33792, 33536, 33664, 33632, 33634, - 0, 32768, 33792, 33536, 33664, 33632, 0, 32768, - 33792, 33536, 33664, 33632, 33636, 0, 32768, 33792, - 33536, 33664, 33632, 33636, 0, 32768, 33792, 33536, - 33664, 33632, 33640, 33638, 0, 32768, 33792, 33536, - 33664, 33632, 0, 32768, 33792, 33536, 33664, 33632, - 33640, 0, 32768, 33792, 33536, 33664, 33632, 33640, - 0, 32768, 33792, 33536, 33664, 33632, 33640, 33642, - 0, 32768, 33792, 33536, 33664, 33632, 33640, 0, - 32768, 33792, 33536, 33664, 33632, 33648, 33644, 0, - 32768, 33792, 33536, 33664, 33632, 33648, 33644, 0, - 32768, 33792, 33536, 33664, 33632, 33648, 33649, 33646, - 0, 32768, 33792, 33536, 33664, 33632, 0, 32768, - 33792, 33536, 33664, 33665, 33648, 0, 32768, 33792, - 33536, 33664, 33665, 33648, 0, 32768, 33792, 33536, - 33664, 33665, 33648, 33650, 0, 32768, 33792, 33536, - 33664, 33665, 33648, 0, 32768, 33792, 33536, 33664, - 33665, 33648, 33652, 0, 32768, 33792, 33536, 33664, - 33665, 33648, 33652, 0, 32768, 33792, 33536, 33664, - 33665, 33648, 33656, 33654, 0, 32768, 33792, 33536, - 33664, 33665, 33648, 0, 32768, 33792, 33536, 33664, - 33665, 33648, 33656, 0, 32768, 33792, 33536, 33664, - 33665, 33667, 33656, 0, 32768, 33792, 33536, 33664, - 33665, 33667, 33656, 33658, 0, 32768, 33792, 33536, - 33664, 33665, 33667, 33656, 0, 32768, 33792, 33536, - 33664, 33665, 33667, 33656, 33660, 0, 32768, 33792, - 33536, 33664, 33665, 33667, 33656, 33660, 0, 32768, - 33792, 33536, 33664, 33665, 33667, 33656, 33660, 33662, - 0, 32768, 33792, 33536, 0, 32768, 33792, 33793, - 33664, 0, 32768, 33792, 33793, 33664, 0, 32768, - 33792, 33793, 33664, 33666, 0, 32768, 33792, 33793, - 33664, 0, 32768, 33792, 33793, 33664, 33668, 0, - 32768, 33792, 33793, 33664, 33668, 0, 32768, 33792, - 33793, 33664, 33672, 33670, 0, 32768, 33792, 33793, - 33664, 0, 32768, 33792, 33793, 33664, 33672, 0, - 32768, 33792, 33793, 33664, 33672, 0, 32768, 33792, - 33793, 33664, 33672, 33674, 0, 32768, 33792, 33793, - 33664, 33672, 0, 32768, 33792, 33793, 33664, 33680, - 33676, 0, 32768, 33792, 33793, 33664, 33680, 33676, - 0, 32768, 33792, 33793, 33664, 33680, 33681, 33678, - 0, 32768, 33792, 33793, 33664, 0, 32768, 33792, - 33793, 33664, 33680, 0, 32768, 33792, 33793, 33664, - 33680, 0, 32768, 33792, 33793, 33664, 33680, 33682, - 0, 32768, 33792, 33793, 33664, 33680, 0, 32768, - 33792, 33793, 33664, 33680, 33684, 0, 32768, 33792, - 33793, 33664, 33680, 33684, 0, 32768, 33792, 33793, - 33664, 33680, 33688, 33686, 0, 32768, 33792, 33793, - 33664, 33680, 0, 32768, 33792, 33793, 33664, 33696, - 33688, 0, 32768, 33792, 33793, 33664, 33696, 33688, - 0, 32768, 33792, 33793, 33664, 33696, 33688, 33690, - 0, 32768, 33792, 33793, 33664, 33696, 33688, 0, - 32768, 33792, 33793, 33664, 33696, 33697, 33692, 0, - 32768, 33792, 33793, 33664, 33696, 33697, 33692, 0, - 32768, 33792, 33793, 33664, 33696, 33697, 33692, 33694, - 0, 32768, 33792, 33793, 33664, 0, 32768, 33792, - 33793, 33664, 33696, 0, 32768, 33792, 33793, 33664, - 33696, 0, 32768, 33792, 33793, 33664, 33696, 33698, - 0, 32768, 33792, 33793, 33664, 33696, 0, 32768, - 33792, 33793, 33664, 33696, 33700, 0, 32768, 33792, - 33793, 33664, 33696, 33700, 0, 32768, 33792, 33793, - 33664, 33696, 33704, 33702, 0, 32768, 33792, 33793, - 33664, 33696, 0, 32768, 33792, 33793, 33664, 33696, - 33704, 0, 32768, 33792, 33793, 33664, 33696, 33704, - 0, 32768, 33792, 33793, 33664, 33696, 33704, 33706, - 0, 32768, 33792, 33793, 33664, 33696, 33704, 0, - 32768, 33792, 33793, 33664, 33696, 33712, 33708, 0, - 32768, 33792, 33793, 33664, 33696, 33712, 33708, 0, - 32768, 33792, 33793, 33664, 33696, 33712, 33713, 33710, - 0, 32768, 33792, 33793, 33664, 33696, 0, 32768, - 33792, 33793, 33664, 33728, 33712, 0, 32768, 33792, - 33793, 33664, 33728, 33712, 0, 32768, 33792, 33793, - 33664, 33728, 33712, 33714, 0, 32768, 33792, 33793, - 33664, 33728, 33712, 0, 32768, 33792, 33793, 33664, - 33728, 33712, 33716, 0, 32768, 33792, 33793, 33664, - 33728, 33712, 33716, 0, 32768, 33792, 33793, 33664, - 33728, 33712, 33720, 33718, 0, 32768, 33792, 33793, - 33664, 33728, 33712, 0, 32768, 33792, 33793, 33664, - 33728, 33729, 33720, 0, 32768, 33792, 33793, 33664, - 33728, 33729, 33720, 0, 32768, 33792, 33793, 33664, - 33728, 33729, 33720, 33722, 0, 32768, 33792, 33793, - 33664, 33728, 33729, 33720, 0, 32768, 33792, 33793, - 33664, 33728, 33729, 33720, 33724, 0, 32768, 33792, - 33793, 33664, 33728, 33729, 33731, 33724, 0, 32768, - 33792, 33793, 33664, 33728, 33729, 33731, 33724, 33726, - 0, 32768, 33792, 33793, 33664, 0, 32768, 33792, - 33793, 33664, 33728, 0, 32768, 33792, 33793, 33795, - 33728, 0, 32768, 33792, 33793, 33795, 33728, 33730, - 0, 32768, 33792, 33793, 33795, 33728, 0, 32768, - 33792, 33793, 33795, 33728, 33732, 0, 32768, 33792, - 33793, 33795, 33728, 33732, 0, 32768, 33792, 33793, - 33795, 33728, 33736, 33734, 0, 32768, 33792, 33793, - 33795, 33728, 0, 32768, 33792, 33793, 33795, 33728, - 33736, 0, 32768, 33792, 33793, 33795, 33728, 33736, - 0, 32768, 33792, 33793, 33795, 33728, 33736, 33738, - 0, 32768, 33792, 33793, 33795, 33728, 33736, 0, - 32768, 33792, 33793, 33795, 33728, 33744, 33740, 0, - 32768, 33792, 33793, 33795, 33728, 33744, 33740, 0, - 32768, 33792, 33793, 33795, 33728, 33744, 33745, 33742, - 0, 32768, 33792, 33793, 33795, 33728, 0, 32768, - 33792, 33793, 33795, 33728, 33744, 0, 32768, 33792, - 33793, 33795, 33728, 33744, 0, 32768, 33792, 33793, - 33795, 33728, 33744, 33746, 0, 32768, 33792, 33793, - 33795, 33728, 33744, 0, 32768, 33792, 33793, 33795, - 33728, 33744, 33748, 0, 32768, 33792, 33793, 33795, - 33728, 33744, 33748, 0, 32768, 33792, 33793, 33795, - 33728, 33744, 33752, 33750, 0, 32768, 33792, 33793, - 33795, 33728, 33744, 0, 32768, 33792, 33793, 33795, - 33728, 33760, 33752, 0, 32768, 33792, 33793, 33795, - 33728, 33760, 33752, 0, 32768, 33792, 33793, 33795, - 33728, 33760, 33752, 33754, 0, 32768, 33792, 33793, - 33795, 33728, 33760, 33752, 0, 32768, 33792, 33793, - 33795, 33728, 33760, 33761, 33756, 0, 32768, 33792, - 33793, 33795, 33728, 33760, 33761, 33756, 0, 32768, - 33792, 33793, 33795, 33728, 33760, 33761, 33756, 33758, - 0, 32768, 33792, 33793, 33795, 33728, 0, 32768, - 33792, 33793, 33795, 33728, 33760, 0, 32768, 33792, - 33793, 33795, 33728, 33760, 0, 32768, 33792, 33793, - 33795, 33728, 33760, 33762, 0, 32768, 33792, 33793, - 33795, 33799, 33760, 0, 32768, 33792, 33793, 33795, - 33799, 33760, 33764, 0, 32768, 33792, 33793, 33795, - 33799, 33760, 33764, 0, 32768, 33792, 33793, 33795, - 33799, 33760, 33768, 33766, 0, 32768, 33792, 33793, - 33795, 33799, 33760, 0, 32768, 33792, 33793, 33795, - 33799, 33760, 33768, 0, 32768, 33792, 33793, 33795, - 33799, 33760, 33768, 0, 32768, 33792, 33793, 33795, - 33799, 33760, 33768, 33770, 0, 32768, 33792, 33793, - 33795, 33799, 33760, 33768, 0, 32768, 33792, 33793, - 33795, 33799, 33760, 33776, 33772, 0, 32768, 33792, - 33793, 33795, 33799, 33760, 33776, 33772, 0, 32768, - 33792, 33793, 33795, 33799, 33760, 33776, 33777, 33774, - 0, 32768, 33792, 33793, 33795, 33799, 33760, 0, - 32768, 33792, 33793, 33795, 33799, 33760, 33776, 0, - 32768, 33792, 33793, 33795, 33799, 33760, 33776, 0, - 32768, 33792, 33793, 33795, 33799, 33760, 33776, 33778, - 0, 32768, 33792, 33793, 33795, 33799, 33760, 33776, - 0, 32768, 33792, 33793, 33795, 33799, 33760, 33776, - 33780, 0, 32768, 33792, 33793, 33795, 33799, 33760, - 33776, 33780, 0, 32768, 33792, 33793, 33795, 33799, - 33760, 33776, 33784, 33782, 0, 32768, 33792, 33793, - 33795, 33799, 33807, 33776, 0, 32768, 33792, 33793, - 33795, 33799, 33807, 33776, 33784, 0, 32768, 33792, - 33793, 33795, 33799, 33807, 33776, 33784, 0, 32768, - 33792, 33793, 33795, 33799, 33807, 33776, 33784, 33786, - 0, 32768, 33792, 33793, 33795, 33799, 33807, 33776, - 33784, 0, 32768, 33792, 33793, 33795, 33799, 33807, - 33776, 33784, 33788, 0, 32768, 33792, 33793, 33795, - 33799, 33807, 33776, 33784, 33788, 0, 32768, 33792, - 33793, 33795, 33799, 33807, 33776, 33784, 33788, 33790, - 0, 32768, 0, 32768, 33792, 0, 32768, 33792, - 0, 32768, 33792, 33794, 0, 32768, 33792, 0, - 32768, 33792, 33796, 0, 32768, 33792, 33796, 0, - 32768, 33792, 33800, 33798, 0, 32768, 33792, 0, - 32768, 33792, 33800, 0, 32768, 33792, 33800, 0, - 32768, 33792, 33800, 33802, 0, 32768, 33792, 33800, - 0, 32768, 33792, 33808, 33804, 0, 32768, 33792, - 33808, 33804, 0, 32768, 33792, 33808, 33809, 33806, - 0, 32768, 33792, 0, 32768, 33792, 33808, 0, - 32768, 33792, 33808, 0, 32768, 33792, 33808, 33810, - 0, 32768, 33792, 33808, 0, 32768, 33792, 33808, - 33812, 0, 32768, 33792, 33808, 33812, 0, 32768, - 33792, 33808, 33816, 33814, 0, 32768, 33792, 33808, - 0, 32768, 33792, 33824, 33816, 0, 32768, 33792, - 33824, 33816, 0, 32768, 33792, 33824, 33816, 33818, - 0, 32768, 33792, 33824, 33816, 0, 32768, 33792, - 33824, 33825, 33820, 0, 32768, 33792, 33824, 33825, - 33820, 0, 32768, 33792, 33824, 33825, 33820, 33822, - 0, 32768, 33792, 0, 32768, 33792, 33824, 0, - 32768, 33792, 33824, 0, 32768, 33792, 33824, 33826, - 0, 32768, 33792, 33824, 0, 32768, 33792, 33824, - 33828, 0, 32768, 33792, 33824, 33828, 0, 32768, - 33792, 33824, 33832, 33830, 0, 32768, 33792, 33824, - 0, 32768, 33792, 33824, 33832, 0, 32768, 33792, - 33824, 33832, 0, 32768, 33792, 33824, 33832, 33834, - 0, 32768, 33792, 33824, 33832, 0, 32768, 33792, - 33824, 33840, 33836, 0, 32768, 33792, 33824, 33840, - 33836, 0, 32768, 33792, 33824, 33840, 33841, 33838, - 0, 32768, 33792, 33824, 0, 32768, 33792, 33856, - 33840, 0, 32768, 33792, 33856, 33840, 0, 32768, - 33792, 33856, 33840, 33842, 0, 32768, 33792, 33856, - 33840, 0, 32768, 33792, 33856, 33840, 33844, 0, - 32768, 33792, 33856, 33840, 33844, 0, 32768, 33792, - 33856, 33840, 33848, 33846, 0, 32768, 33792, 33856, - 33840, 0, 32768, 33792, 33856, 33857, 33848, 0, - 32768, 33792, 33856, 33857, 33848, 0, 32768, 33792, - 33856, 33857, 33848, 33850, 0, 32768, 33792, 33856, - 33857, 33848, 0, 32768, 33792, 33856, 33857, 33848, - 33852, 0, 32768, 33792, 33856, 33857, 33859, 33852, - 0, 32768, 33792, 33856, 33857, 33859, 33852, 33854, - 0, 32768, 33792, 0, 32768, 33792, 33856, 0, - 32768, 33792, 33856, 0, 32768, 33792, 33856, 33858, - 0, 32768, 33792, 33856, 0, 32768, 33792, 33856, - 33860, 0, 32768, 33792, 33856, 33860, 0, 32768, - 33792, 33856, 33864, 33862, 0, 32768, 33792, 33856, - 0, 32768, 33792, 33856, 33864, 0, 32768, 33792, - 33856, 33864, 0, 32768, 33792, 33856, 33864, 33866, - 0, 32768, 33792, 33856, 33864, 0, 32768, 33792, - 33856, 33872, 33868, 0, 32768, 33792, 33856, 33872, - 33868, 0, 32768, 33792, 33856, 33872, 33873, 33870, - 0, 32768, 33792, 33856, 0, 32768, 33792, 33856, - 33872, 0, 32768, 33792, 33856, 33872, 0, 32768, - 33792, 33856, 33872, 33874, 0, 32768, 33792, 33856, - 33872, 0, 32768, 33792, 33856, 33872, 33876, 0, - 32768, 33792, 33856, 33872, 33876, 0, 32768, 33792, - 33856, 33872, 33880, 33878, 0, 32768, 33792, 33856, - 33872, 0, 32768, 33792, 33856, 33888, 33880, 0, - 32768, 33792, 33856, 33888, 33880, 0, 32768, 33792, - 33856, 33888, 33880, 33882, 0, 32768, 33792, 33856, - 33888, 33880, 0, 32768, 33792, 33856, 33888, 33889, - 33884, 0, 32768, 33792, 33856, 33888, 33889, 33884, - 0, 32768, 33792, 33856, 33888, 33889, 33884, 33886, - 0, 32768, 33792, 33856, 0, 32768, 33792, 33920, - 33888, 0, 32768, 33792, 33920, 33888, 0, 32768, - 33792, 33920, 33888, 33890, 0, 32768, 33792, 33920, - 33888, 0, 32768, 33792, 33920, 33888, 33892, 0, - 32768, 33792, 33920, 33888, 33892, 0, 32768, 33792, - 33920, 33888, 33896, 33894, 0, 32768, 33792, 33920, - 33888, 0, 32768, 33792, 33920, 33888, 33896, 0, - 32768, 33792, 33920, 33888, 33896, 0, 32768, 33792, - 33920, 33888, 33896, 33898, 0, 32768, 33792, 33920, - 33888, 33896, 0, 32768, 33792, 33920, 33888, 33904, - 33900, 0, 32768, 33792, 33920, 33888, 33904, 33900, - 0, 32768, 33792, 33920, 33888, 33904, 33905, 33902, - 0, 32768, 33792, 33920, 33888, 0, 32768, 33792, - 33920, 33921, 33904, 0, 32768, 33792, 33920, 33921, - 33904, 0, 32768, 33792, 33920, 33921, 33904, 33906, - 0, 32768, 33792, 33920, 33921, 33904, 0, 32768, - 33792, 33920, 33921, 33904, 33908, 0, 32768, 33792, - 33920, 33921, 33904, 33908, 0, 32768, 33792, 33920, - 33921, 33904, 33912, 33910, 0, 32768, 33792, 33920, - 33921, 33904, 0, 32768, 33792, 33920, 33921, 33904, - 33912, 0, 32768, 33792, 33920, 33921, 33923, 33912, - 0, 32768, 33792, 33920, 33921, 33923, 33912, 33914, - 0, 32768, 33792, 33920, 33921, 33923, 33912, 0, - 32768, 33792, 33920, 33921, 33923, 33912, 33916, 0, - 32768, 33792, 33920, 33921, 33923, 33912, 33916, 0, - 32768, 33792, 33920, 33921, 33923, 33912, 33916, 33918, - 0, 32768, 33792, 0, 32768, 33792, 33920, 0, - 32768, 33792, 33920, 0, 32768, 33792, 33920, 33922, - 0, 32768, 33792, 33920, 0, 32768, 33792, 33920, - 33924, 0, 32768, 33792, 33920, 33924, 0, 32768, - 33792, 33920, 33928, 33926, 0, 32768, 33792, 33920, - 0, 32768, 33792, 33920, 33928, 0, 32768, 33792, - 33920, 33928, 0, 32768, 33792, 33920, 33928, 33930, - 0, 32768, 33792, 33920, 33928, 0, 32768, 33792, - 33920, 33936, 33932, 0, 32768, 33792, 33920, 33936, - 33932, 0, 32768, 33792, 33920, 33936, 33937, 33934, - 0, 32768, 33792, 33920, 0, 32768, 33792, 33920, - 33936, 0, 32768, 33792, 33920, 33936, 0, 32768, - 33792, 33920, 33936, 33938, 0, 32768, 33792, 33920, - 33936, 0, 32768, 33792, 33920, 33936, 33940, 0, - 32768, 33792, 33920, 33936, 33940, 0, 32768, 33792, - 33920, 33936, 33944, 33942, 0, 32768, 33792, 33920, - 33936, 0, 32768, 33792, 33920, 33952, 33944, 0, - 32768, 33792, 33920, 33952, 33944, 0, 32768, 33792, - 33920, 33952, 33944, 33946, 0, 32768, 33792, 33920, - 33952, 33944, 0, 32768, 33792, 33920, 33952, 33953, - 33948, 0, 32768, 33792, 33920, 33952, 33953, 33948, - 0, 32768, 33792, 33920, 33952, 33953, 33948, 33950, - 0, 32768, 33792, 33920, 0, 32768, 33792, 33920, - 33952, 0, 32768, 33792, 33920, 33952, 0, 32768, - 33792, 33920, 33952, 33954, 0, 32768, 33792, 33920, - 33952, 0, 32768, 33792, 33920, 33952, 33956, 0, - 32768, 33792, 33920, 33952, 33956, 0, 32768, 33792, - 33920, 33952, 33960, 33958, 0, 32768, 33792, 33920, - 33952, 0, 32768, 33792, 33920, 33952, 33960, 0, - 32768, 33792, 33920, 33952, 33960, 0, 32768, 33792, - 33920, 33952, 33960, 33962, 0, 32768, 33792, 33920, - 33952, 33960, 0, 32768, 33792, 33920, 33952, 33968, - 33964, 0, 32768, 33792, 33920, 33952, 33968, 33964, - 0, 32768, 33792, 33920, 33952, 33968, 33969, 33966, - 0, 32768, 33792, 33920, 33952, 0, 32768, 33792, - 33920, 33984, 33968, 0, 32768, 33792, 33920, 33984, - 33968, 0, 32768, 33792, 33920, 33984, 33968, 33970, - 0, 32768, 33792, 33920, 33984, 33968, 0, 32768, - 33792, 33920, 33984, 33968, 33972, 0, 32768, 33792, - 33920, 33984, 33968, 33972, 0, 32768, 33792, 33920, - 33984, 33968, 33976, 33974, 0, 32768, 33792, 33920, - 33984, 33968, 0, 32768, 33792, 33920, 33984, 33985, - 33976, 0, 32768, 33792, 33920, 33984, 33985, 33976, - 0, 32768, 33792, 33920, 33984, 33985, 33976, 33978, - 0, 32768, 33792, 33920, 33984, 33985, 33976, 0, - 32768, 33792, 33920, 33984, 33985, 33976, 33980, 0, - 32768, 33792, 33920, 33984, 33985, 33987, 33980, 0, - 32768, 33792, 33920, 33984, 33985, 33987, 33980, 33982, - 0, 32768, 33792, 33920, 0, 32768, 33792, 34048, - 33984, 0, 32768, 33792, 34048, 33984, 0, 32768, - 33792, 34048, 33984, 33986, 0, 32768, 33792, 34048, - 33984, 0, 32768, 33792, 34048, 33984, 33988, 0, - 32768, 33792, 34048, 33984, 33988, 0, 32768, 33792, - 34048, 33984, 33992, 33990, 0, 32768, 33792, 34048, - 33984, 0, 32768, 33792, 34048, 33984, 33992, 0, - 32768, 33792, 34048, 33984, 33992, 0, 32768, 33792, - 34048, 33984, 33992, 33994, 0, 32768, 33792, 34048, - 33984, 33992, 0, 32768, 33792, 34048, 33984, 34000, - 33996, 0, 32768, 33792, 34048, 33984, 34000, 33996, - 0, 32768, 33792, 34048, 33984, 34000, 34001, 33998, - 0, 32768, 33792, 34048, 33984, 0, 32768, 33792, - 34048, 33984, 34000, 0, 32768, 33792, 34048, 33984, - 34000, 0, 32768, 33792, 34048, 33984, 34000, 34002, - 0, 32768, 33792, 34048, 33984, 34000, 0, 32768, - 33792, 34048, 33984, 34000, 34004, 0, 32768, 33792, - 34048, 33984, 34000, 34004, 0, 32768, 33792, 34048, - 33984, 34000, 34008, 34006, 0, 32768, 33792, 34048, - 33984, 34000, 0, 32768, 33792, 34048, 33984, 34016, - 34008, 0, 32768, 33792, 34048, 33984, 34016, 34008, - 0, 32768, 33792, 34048, 33984, 34016, 34008, 34010, - 0, 32768, 33792, 34048, 33984, 34016, 34008, 0, - 32768, 33792, 34048, 33984, 34016, 34017, 34012, 0, - 32768, 33792, 34048, 33984, 34016, 34017, 34012, 0, - 32768, 33792, 34048, 33984, 34016, 34017, 34012, 34014, - 0, 32768, 33792, 34048, 33984, 0, 32768, 33792, - 34048, 34049, 34016, 0, 32768, 33792, 34048, 34049, - 34016, 0, 32768, 33792, 34048, 34049, 34016, 34018, - 0, 32768, 33792, 34048, 34049, 34016, 0, 32768, - 33792, 34048, 34049, 34016, 34020, 0, 32768, 33792, - 34048, 34049, 34016, 34020, 0, 32768, 33792, 34048, - 34049, 34016, 34024, 34022, 0, 32768, 33792, 34048, - 34049, 34016, 0, 32768, 33792, 34048, 34049, 34016, - 34024, 0, 32768, 33792, 34048, 34049, 34016, 34024, - 0, 32768, 33792, 34048, 34049, 34016, 34024, 34026, - 0, 32768, 33792, 34048, 34049, 34016, 34024, 0, - 32768, 33792, 34048, 34049, 34016, 34032, 34028, 0, - 32768, 33792, 34048, 34049, 34016, 34032, 34028, 0, - 32768, 33792, 34048, 34049, 34016, 34032, 34033, 34030, - 0, 32768, 33792, 34048, 34049, 34016, 0, 32768, - 33792, 34048, 34049, 34016, 34032, 0, 32768, 33792, - 34048, 34049, 34051, 34032, 0, 32768, 33792, 34048, - 34049, 34051, 34032, 34034, 0, 32768, 33792, 34048, - 34049, 34051, 34032, 0, 32768, 33792, 34048, 34049, - 34051, 34032, 34036, 0, 32768, 33792, 34048, 34049, - 34051, 34032, 34036, 0, 32768, 33792, 34048, 34049, - 34051, 34032, 34040, 34038, 0, 32768, 33792, 34048, - 34049, 34051, 34032, 0, 32768, 33792, 34048, 34049, - 34051, 34032, 34040, 0, 32768, 33792, 34048, 34049, - 34051, 34032, 34040, 0, 32768, 33792, 34048, 34049, - 34051, 34032, 34040, 34042, 0, 32768, 33792, 34048, - 34049, 34051, 34055, 34040, 0, 32768, 33792, 34048, - 34049, 34051, 34055, 34040, 34044, 0, 32768, 33792, - 34048, 34049, 34051, 34055, 34040, 34044, 0, 32768, - 33792, 34048, 34049, 34051, 34055, 34040, 34044, 34046, - 0, 32768, 33792, 0, 32768, 33792, 34048, 0, - 32768, 33792, 34048, 0, 32768, 33792, 34048, 34050, - 0, 32768, 33792, 34048, 0, 32768, 33792, 34048, - 34052, 0, 32768, 33792, 34048, 34052, 0, 32768, - 33792, 34048, 34056, 34054, 0, 32768, 33792, 34048, - 0, 32768, 33792, 34048, 34056, 0, 32768, 33792, - 34048, 34056, 0, 32768, 33792, 34048, 34056, 34058, - 0, 32768, 33792, 34048, 34056, 0, 32768, 33792, - 34048, 34064, 34060, 0, 32768, 33792, 34048, 34064, - 34060, 0, 32768, 33792, 34048, 34064, 34065, 34062, - 0, 32768, 33792, 34048, 0, 32768, 33792, 34048, - 34064, 0, 32768, 33792, 34048, 34064, 0, 32768, - 33792, 34048, 34064, 34066, 0, 32768, 33792, 34048, - 34064, 0, 32768, 33792, 34048, 34064, 34068, 0, - 32768, 33792, 34048, 34064, 34068, 0, 32768, 33792, - 34048, 34064, 34072, 34070, 0, 32768, 33792, 34048, - 34064, 0, 32768, 33792, 34048, 34080, 34072, 0, - 32768, 33792, 34048, 34080, 34072, 0, 32768, 33792, - 34048, 34080, 34072, 34074, 0, 32768, 33792, 34048, - 34080, 34072, 0, 32768, 33792, 34048, 34080, 34081, - 34076, 0, 32768, 33792, 34048, 34080, 34081, 34076, - 0, 32768, 33792, 34048, 34080, 34081, 34076, 34078, - 0, 32768, 33792, 34048, 0, 32768, 33792, 34048, - 34080, 0, 32768, 33792, 34048, 34080, 0, 32768, - 33792, 34048, 34080, 34082, 0, 32768, 33792, 34048, - 34080, 0, 32768, 33792, 34048, 34080, 34084, 0, - 32768, 33792, 34048, 34080, 34084, 0, 32768, 33792, - 34048, 34080, 34088, 34086, 0, 32768, 33792, 34048, - 34080, 0, 32768, 33792, 34048, 34080, 34088, 0, - 32768, 33792, 34048, 34080, 34088, 0, 32768, 33792, - 34048, 34080, 34088, 34090, 0, 32768, 33792, 34048, - 34080, 34088, 0, 32768, 33792, 34048, 34080, 34096, - 34092, 0, 32768, 33792, 34048, 34080, 34096, 34092, - 0, 32768, 33792, 34048, 34080, 34096, 34097, 34094, - 0, 32768, 33792, 34048, 34080, 0, 32768, 33792, - 34048, 34112, 34096, 0, 32768, 33792, 34048, 34112, - 34096, 0, 32768, 33792, 34048, 34112, 34096, 34098, - 0, 32768, 33792, 34048, 34112, 34096, 0, 32768, - 33792, 34048, 34112, 34096, 34100, 0, 32768, 33792, - 34048, 34112, 34096, 34100, 0, 32768, 33792, 34048, - 34112, 34096, 34104, 34102, 0, 32768, 33792, 34048, - 34112, 34096, 0, 32768, 33792, 34048, 34112, 34113, - 34104, 0, 32768, 33792, 34048, 34112, 34113, 34104, - 0, 32768, 33792, 34048, 34112, 34113, 34104, 34106, - 0, 32768, 33792, 34048, 34112, 34113, 34104, 0, - 32768, 33792, 34048, 34112, 34113, 34104, 34108, 0, - 32768, 33792, 34048, 34112, 34113, 34115, 34108, 0, - 32768, 33792, 34048, 34112, 34113, 34115, 34108, 34110, - 0, 32768, 33792, 34048, 0, 32768, 33792, 34048, - 34112, 0, 32768, 33792, 34048, 34112, 0, 32768, - 33792, 34048, 34112, 34114, 0, 32768, 33792, 34048, - 34112, 0, 32768, 33792, 34048, 34112, 34116, 0, - 32768, 33792, 34048, 34112, 34116, 0, 32768, 33792, - 34048, 34112, 34120, 34118, 0, 32768, 33792, 34048, - 34112, 0, 32768, 33792, 34048, 34112, 34120, 0, - 32768, 33792, 34048, 34112, 34120, 0, 32768, 33792, - 34048, 34112, 34120, 34122, 0, 32768, 33792, 34048, - 34112, 34120, 0, 32768, 33792, 34048, 34112, 34128, - 34124, 0, 32768, 33792, 34048, 34112, 34128, 34124, - 0, 32768, 33792, 34048, 34112, 34128, 34129, 34126, - 0, 32768, 33792, 34048, 34112, 0, 32768, 33792, - 34048, 34112, 34128, 0, 32768, 33792, 34048, 34112, - 34128, 0, 32768, 33792, 34048, 34112, 34128, 34130, - 0, 32768, 33792, 34048, 34112, 34128, 0, 32768, - 33792, 34048, 34112, 34128, 34132, 0, 32768, 33792, - 34048, 34112, 34128, 34132, 0, 32768, 33792, 34048, - 34112, 34128, 34136, 34134, 0, 32768, 33792, 34048, - 34112, 34128, 0, 32768, 33792, 34048, 34112, 34144, - 34136, 0, 32768, 33792, 34048, 34112, 34144, 34136, - 0, 32768, 33792, 34048, 34112, 34144, 34136, 34138, - 0, 32768, 33792, 34048, 34112, 34144, 34136, 0, - 32768, 33792, 34048, 34112, 34144, 34145, 34140, 0, - 32768, 33792, 34048, 34112, 34144, 34145, 34140, 0, - 32768, 33792, 34048, 34112, 34144, 34145, 34140, 34142, - 0, 32768, 33792, 34048, 34112, 0, 32768, 33792, - 34048, 34176, 34144, 0, 32768, 33792, 34048, 34176, - 34144, 0, 32768, 33792, 34048, 34176, 34144, 34146, - 0, 32768, 33792, 34048, 34176, 34144, 0, 32768, - 33792, 34048, 34176, 34144, 34148, 0, 32768, 33792, - 34048, 34176, 34144, 34148, 0, 32768, 33792, 34048, - 34176, 34144, 34152, 34150, 0, 32768, 33792, 34048, - 34176, 34144, 0, 32768, 33792, 34048, 34176, 34144, - 34152, 0, 32768, 33792, 34048, 34176, 34144, 34152, - 0, 32768, 33792, 34048, 34176, 34144, 34152, 34154, - 0, 32768, 33792, 34048, 34176, 34144, 34152, 0, - 32768, 33792, 34048, 34176, 34144, 34160, 34156, 0, - 32768, 33792, 34048, 34176, 34144, 34160, 34156, 0, - 32768, 33792, 34048, 34176, 34144, 34160, 34161, 34158, - 0, 32768, 33792, 34048, 34176, 34144, 0, 32768, - 33792, 34048, 34176, 34177, 34160, 0, 32768, 33792, - 34048, 34176, 34177, 34160, 0, 32768, 33792, 34048, - 34176, 34177, 34160, 34162, 0, 32768, 33792, 34048, - 34176, 34177, 34160, 0, 32768, 33792, 34048, 34176, - 34177, 34160, 34164, 0, 32768, 33792, 34048, 34176, - 34177, 34160, 34164, 0, 32768, 33792, 34048, 34176, - 34177, 34160, 34168, 34166, 0, 32768, 33792, 34048, - 34176, 34177, 34160, 0, 32768, 33792, 34048, 34176, - 34177, 34160, 34168, 0, 32768, 33792, 34048, 34176, - 34177, 34179, 34168, 0, 32768, 33792, 34048, 34176, - 34177, 34179, 34168, 34170, 0, 32768, 33792, 34048, - 34176, 34177, 34179, 34168, 0, 32768, 33792, 34048, - 34176, 34177, 34179, 34168, 34172, 0, 32768, 33792, - 34048, 34176, 34177, 34179, 34168, 34172, 0, 32768, - 33792, 34048, 34176, 34177, 34179, 34168, 34172, 34174, - 0, 32768, 33792, 34048, 0, 32768, 33792, 34304, - 34176, 0, 32768, 33792, 34304, 34176, 0, 32768, - 33792, 34304, 34176, 34178, 0, 32768, 33792, 34304, - 34176, 0, 32768, 33792, 34304, 34176, 34180, 0, - 32768, 33792, 34304, 34176, 34180, 0, 32768, 33792, - 34304, 34176, 34184, 34182, 0, 32768, 33792, 34304, - 34176, 0, 32768, 33792, 34304, 34176, 34184, 0, - 32768, 33792, 34304, 34176, 34184, 0, 32768, 33792, - 34304, 34176, 34184, 34186, 0, 32768, 33792, 34304, - 34176, 34184, 0, 32768, 33792, 34304, 34176, 34192, - 34188, 0, 32768, 33792, 34304, 34176, 34192, 34188, - 0, 32768, 33792, 34304, 34176, 34192, 34193, 34190, - 0, 32768, 33792, 34304, 34176, 0, 32768, 33792, - 34304, 34176, 34192, 0, 32768, 33792, 34304, 34176, - 34192, 0, 32768, 33792, 34304, 34176, 34192, 34194, - 0, 32768, 33792, 34304, 34176, 34192, 0, 32768, - 33792, 34304, 34176, 34192, 34196, 0, 32768, 33792, - 34304, 34176, 34192, 34196, 0, 32768, 33792, 34304, - 34176, 34192, 34200, 34198, 0, 32768, 33792, 34304, - 34176, 34192, 0, 32768, 33792, 34304, 34176, 34208, - 34200, 0, 32768, 33792, 34304, 34176, 34208, 34200, - 0, 32768, 33792, 34304, 34176, 34208, 34200, 34202, - 0, 32768, 33792, 34304, 34176, 34208, 34200, 0, - 32768, 33792, 34304, 34176, 34208, 34209, 34204, 0, - 32768, 33792, 34304, 34176, 34208, 34209, 34204, 0, - 32768, 33792, 34304, 34176, 34208, 34209, 34204, 34206, - 0, 32768, 33792, 34304, 34176, 0, 32768, 33792, - 34304, 34176, 34208, 0, 32768, 33792, 34304, 34176, - 34208, 0, 32768, 33792, 34304, 34176, 34208, 34210, - 0, 32768, 33792, 34304, 34176, 34208, 0, 32768, - 33792, 34304, 34176, 34208, 34212, 0, 32768, 33792, - 34304, 34176, 34208, 34212, 0, 32768, 33792, 34304, - 34176, 34208, 34216, 34214, 0, 32768, 33792, 34304, - 34176, 34208, 0, 32768, 33792, 34304, 34176, 34208, - 34216, 0, 32768, 33792, 34304, 34176, 34208, 34216, - 0, 32768, 33792, 34304, 34176, 34208, 34216, 34218, - 0, 32768, 33792, 34304, 34176, 34208, 34216, 0, - 32768, 33792, 34304, 34176, 34208, 34224, 34220, 0, - 32768, 33792, 34304, 34176, 34208, 34224, 34220, 0, - 32768, 33792, 34304, 34176, 34208, 34224, 34225, 34222, - 0, 32768, 33792, 34304, 34176, 34208, 0, 32768, - 33792, 34304, 34176, 34240, 34224, 0, 32768, 33792, - 34304, 34176, 34240, 34224, 0, 32768, 33792, 34304, - 34176, 34240, 34224, 34226, 0, 32768, 33792, 34304, - 34176, 34240, 34224, 0, 32768, 33792, 34304, 34176, - 34240, 34224, 34228, 0, 32768, 33792, 34304, 34176, - 34240, 34224, 34228, 0, 32768, 33792, 34304, 34176, - 34240, 34224, 34232, 34230, 0, 32768, 33792, 34304, - 34176, 34240, 34224, 0, 32768, 33792, 34304, 34176, - 34240, 34241, 34232, 0, 32768, 33792, 34304, 34176, - 34240, 34241, 34232, 0, 32768, 33792, 34304, 34176, - 34240, 34241, 34232, 34234, 0, 32768, 33792, 34304, - 34176, 34240, 34241, 34232, 0, 32768, 33792, 34304, - 34176, 34240, 34241, 34232, 34236, 0, 32768, 33792, - 34304, 34176, 34240, 34241, 34243, 34236, 0, 32768, - 33792, 34304, 34176, 34240, 34241, 34243, 34236, 34238, - 0, 32768, 33792, 34304, 34176, 0, 32768, 33792, - 34304, 34305, 34240, 0, 32768, 33792, 34304, 34305, - 34240, 0, 32768, 33792, 34304, 34305, 34240, 34242, - 0, 32768, 33792, 34304, 34305, 34240, 0, 32768, - 33792, 34304, 34305, 34240, 34244, 0, 32768, 33792, - 34304, 34305, 34240, 34244, 0, 32768, 33792, 34304, - 34305, 34240, 34248, 34246, 0, 32768, 33792, 34304, - 34305, 34240, 0, 32768, 33792, 34304, 34305, 34240, - 34248, 0, 32768, 33792, 34304, 34305, 34240, 34248, - 0, 32768, 33792, 34304, 34305, 34240, 34248, 34250, - 0, 32768, 33792, 34304, 34305, 34240, 34248, 0, - 32768, 33792, 34304, 34305, 34240, 34256, 34252, 0, - 32768, 33792, 34304, 34305, 34240, 34256, 34252, 0, - 32768, 33792, 34304, 34305, 34240, 34256, 34257, 34254, - 0, 32768, 33792, 34304, 34305, 34240, 0, 32768, - 33792, 34304, 34305, 34240, 34256, 0, 32768, 33792, - 34304, 34305, 34240, 34256, 0, 32768, 33792, 34304, - 34305, 34240, 34256, 34258, 0, 32768, 33792, 34304, - 34305, 34240, 34256, 0, 32768, 33792, 34304, 34305, - 34240, 34256, 34260, 0, 32768, 33792, 34304, 34305, - 34240, 34256, 34260, 0, 32768, 33792, 34304, 34305, - 34240, 34256, 34264, 34262, 0, 32768, 33792, 34304, - 34305, 34240, 34256, 0, 32768, 33792, 34304, 34305, - 34240, 34272, 34264, 0, 32768, 33792, 34304, 34305, - 34240, 34272, 34264, 0, 32768, 33792, 34304, 34305, - 34240, 34272, 34264, 34266, 0, 32768, 33792, 34304, - 34305, 34240, 34272, 34264, 0, 32768, 33792, 34304, - 34305, 34240, 34272, 34273, 34268, 0, 32768, 33792, - 34304, 34305, 34240, 34272, 34273, 34268, 0, 32768, - 33792, 34304, 34305, 34240, 34272, 34273, 34268, 34270, - 0, 32768, 33792, 34304, 34305, 34240, 0, 32768, - 33792, 34304, 34305, 34240, 34272, 0, 32768, 33792, - 34304, 34305, 34307, 34272, 0, 32768, 33792, 34304, - 34305, 34307, 34272, 34274, 0, 32768, 33792, 34304, - 34305, 34307, 34272, 0, 32768, 33792, 34304, 34305, - 34307, 34272, 34276, 0, 32768, 33792, 34304, 34305, - 34307, 34272, 34276, 0, 32768, 33792, 34304, 34305, - 34307, 34272, 34280, 34278, 0, 32768, 33792, 34304, - 34305, 34307, 34272, 0, 32768, 33792, 34304, 34305, - 34307, 34272, 34280, 0, 32768, 33792, 34304, 34305, - 34307, 34272, 34280, 0, 32768, 33792, 34304, 34305, - 34307, 34272, 34280, 34282, 0, 32768, 33792, 34304, - 34305, 34307, 34272, 34280, 0, 32768, 33792, 34304, - 34305, 34307, 34272, 34288, 34284, 0, 32768, 33792, - 34304, 34305, 34307, 34272, 34288, 34284, 0, 32768, - 33792, 34304, 34305, 34307, 34272, 34288, 34289, 34286, - 0, 32768, 33792, 34304, 34305, 34307, 34272, 0, - 32768, 33792, 34304, 34305, 34307, 34272, 34288, 0, - 32768, 33792, 34304, 34305, 34307, 34272, 34288, 0, - 32768, 33792, 34304, 34305, 34307, 34272, 34288, 34290, - 0, 32768, 33792, 34304, 34305, 34307, 34311, 34288, - 0, 32768, 33792, 34304, 34305, 34307, 34311, 34288, - 34292, 0, 32768, 33792, 34304, 34305, 34307, 34311, - 34288, 34292, 0, 32768, 33792, 34304, 34305, 34307, - 34311, 34288, 34296, 34294, 0, 32768, 33792, 34304, - 34305, 34307, 34311, 34288, 0, 32768, 33792, 34304, - 34305, 34307, 34311, 34288, 34296, 0, 32768, 33792, - 34304, 34305, 34307, 34311, 34288, 34296, 0, 32768, - 33792, 34304, 34305, 34307, 34311, 34288, 34296, 34298, - 0, 32768, 33792, 34304, 34305, 34307, 34311, 34288, - 34296, 0, 32768, 33792, 34304, 34305, 34307, 34311, - 34288, 34296, 34300, 0, 32768, 33792, 34304, 34305, - 34307, 34311, 34288, 34296, 34300, 0, 32768, 33792, - 34304, 34305, 34307, 34311, 34288, 34296, 34300, 34302, - 0, 32768, 33792, 0, 32768, 34816, 34304, 0, - 32768, 34816, 34304, 0, 32768, 34816, 34304, 34306, - 0, 32768, 34816, 34304, 0, 32768, 34816, 34304, - 34308, 0, 32768, 34816, 34304, 34308, 0, 32768, - 34816, 34304, 34312, 34310, 0, 32768, 34816, 34304, - 0, 32768, 34816, 34304, 34312, 0, 32768, 34816, - 34304, 34312, 0, 32768, 34816, 34304, 34312, 34314, - 0, 32768, 34816, 34304, 34312, 0, 32768, 34816, - 34304, 34320, 34316, 0, 32768, 34816, 34304, 34320, - 34316, 0, 32768, 34816, 34304, 34320, 34321, 34318, - 0, 32768, 34816, 34304, 0, 32768, 34816, 34304, - 34320, 0, 32768, 34816, 34304, 34320, 0, 32768, - 34816, 34304, 34320, 34322, 0, 32768, 34816, 34304, - 34320, 0, 32768, 34816, 34304, 34320, 34324, 0, - 32768, 34816, 34304, 34320, 34324, 0, 32768, 34816, - 34304, 34320, 34328, 34326, 0, 32768, 34816, 34304, - 34320, 0, 32768, 34816, 34304, 34336, 34328, 0, - 32768, 34816, 34304, 34336, 34328, 0, 32768, 34816, - 34304, 34336, 34328, 34330, 0, 32768, 34816, 34304, - 34336, 34328, 0, 32768, 34816, 34304, 34336, 34337, - 34332, 0, 32768, 34816, 34304, 34336, 34337, 34332, - 0, 32768, 34816, 34304, 34336, 34337, 34332, 34334, - 0, 32768, 34816, 34304, 0, 32768, 34816, 34304, - 34336, 0, 32768, 34816, 34304, 34336, 0, 32768, - 34816, 34304, 34336, 34338, 0, 32768, 34816, 34304, - 34336, 0, 32768, 34816, 34304, 34336, 34340, 0, - 32768, 34816, 34304, 34336, 34340, 0, 32768, 34816, - 34304, 34336, 34344, 34342, 0, 32768, 34816, 34304, - 34336, 0, 32768, 34816, 34304, 34336, 34344, 0, - 32768, 34816, 34304, 34336, 34344, 0, 32768, 34816, - 34304, 34336, 34344, 34346, 0, 32768, 34816, 34304, - 34336, 34344, 0, 32768, 34816, 34304, 34336, 34352, - 34348, 0, 32768, 34816, 34304, 34336, 34352, 34348, - 0, 32768, 34816, 34304, 34336, 34352, 34353, 34350, - 0, 32768, 34816, 34304, 34336, 0, 32768, 34816, - 34304, 34368, 34352, 0, 32768, 34816, 34304, 34368, - 34352, 0, 32768, 34816, 34304, 34368, 34352, 34354, - 0, 32768, 34816, 34304, 34368, 34352, 0, 32768, - 34816, 34304, 34368, 34352, 34356, 0, 32768, 34816, - 34304, 34368, 34352, 34356, 0, 32768, 34816, 34304, - 34368, 34352, 34360, 34358, 0, 32768, 34816, 34304, - 34368, 34352, 0, 32768, 34816, 34304, 34368, 34369, - 34360, 0, 32768, 34816, 34304, 34368, 34369, 34360, - 0, 32768, 34816, 34304, 34368, 34369, 34360, 34362, - 0, 32768, 34816, 34304, 34368, 34369, 34360, 0, - 32768, 34816, 34304, 34368, 34369, 34360, 34364, 0, - 32768, 34816, 34304, 34368, 34369, 34371, 34364, 0, - 32768, 34816, 34304, 34368, 34369, 34371, 34364, 34366, - 0, 32768, 34816, 34304, 0, 32768, 34816, 34304, - 34368, 0, 32768, 34816, 34304, 34368, 0, 32768, - 34816, 34304, 34368, 34370, 0, 32768, 34816, 34304, - 34368, 0, 32768, 34816, 34304, 34368, 34372, 0, - 32768, 34816, 34304, 34368, 34372, 0, 32768, 34816, - 34304, 34368, 34376, 34374, 0, 32768, 34816, 34304, - 34368, 0, 32768, 34816, 34304, 34368, 34376, 0, - 32768, 34816, 34304, 34368, 34376, 0, 32768, 34816, - 34304, 34368, 34376, 34378, 0, 32768, 34816, 34304, - 34368, 34376, 0, 32768, 34816, 34304, 34368, 34384, - 34380, 0, 32768, 34816, 34304, 34368, 34384, 34380, - 0, 32768, 34816, 34304, 34368, 34384, 34385, 34382, - 0, 32768, 34816, 34304, 34368, 0, 32768, 34816, - 34304, 34368, 34384, 0, 32768, 34816, 34304, 34368, - 34384, 0, 32768, 34816, 34304, 34368, 34384, 34386, - 0, 32768, 34816, 34304, 34368, 34384, 0, 32768, - 34816, 34304, 34368, 34384, 34388, 0, 32768, 34816, - 34304, 34368, 34384, 34388, 0, 32768, 34816, 34304, - 34368, 34384, 34392, 34390, 0, 32768, 34816, 34304, - 34368, 34384, 0, 32768, 34816, 34304, 34368, 34400, - 34392, 0, 32768, 34816, 34304, 34368, 34400, 34392, - 0, 32768, 34816, 34304, 34368, 34400, 34392, 34394, - 0, 32768, 34816, 34304, 34368, 34400, 34392, 0, - 32768, 34816, 34304, 34368, 34400, 34401, 34396, 0, - 32768, 34816, 34304, 34368, 34400, 34401, 34396, 0, - 32768, 34816, 34304, 34368, 34400, 34401, 34396, 34398, - 0, 32768, 34816, 34304, 34368, 0, 32768, 34816, - 34304, 34432, 34400, 0, 32768, 34816, 34304, 34432, - 34400, 0, 32768, 34816, 34304, 34432, 34400, 34402, - 0, 32768, 34816, 34304, 34432, 34400, 0, 32768, - 34816, 34304, 34432, 34400, 34404, 0, 32768, 34816, - 34304, 34432, 34400, 34404, 0, 32768, 34816, 34304, - 34432, 34400, 34408, 34406, 0, 32768, 34816, 34304, - 34432, 34400, 0, 32768, 34816, 34304, 34432, 34400, - 34408, 0, 32768, 34816, 34304, 34432, 34400, 34408, - 0, 32768, 34816, 34304, 34432, 34400, 34408, 34410, - 0, 32768, 34816, 34304, 34432, 34400, 34408, 0, - 32768, 34816, 34304, 34432, 34400, 34416, 34412, 0, - 32768, 34816, 34304, 34432, 34400, 34416, 34412, 0, - 32768, 34816, 34304, 34432, 34400, 34416, 34417, 34414, - 0, 32768, 34816, 34304, 34432, 34400, 0, 32768, - 34816, 34304, 34432, 34433, 34416, 0, 32768, 34816, - 34304, 34432, 34433, 34416, 0, 32768, 34816, 34304, - 34432, 34433, 34416, 34418, 0, 32768, 34816, 34304, - 34432, 34433, 34416, 0, 32768, 34816, 34304, 34432, - 34433, 34416, 34420, 0, 32768, 34816, 34304, 34432, - 34433, 34416, 34420, 0, 32768, 34816, 34304, 34432, - 34433, 34416, 34424, 34422, 0, 32768, 34816, 34304, - 34432, 34433, 34416, 0, 32768, 34816, 34304, 34432, - 34433, 34416, 34424, 0, 32768, 34816, 34304, 34432, - 34433, 34435, 34424, 0, 32768, 34816, 34304, 34432, - 34433, 34435, 34424, 34426, 0, 32768, 34816, 34304, - 34432, 34433, 34435, 34424, 0, 32768, 34816, 34304, - 34432, 34433, 34435, 34424, 34428, 0, 32768, 34816, - 34304, 34432, 34433, 34435, 34424, 34428, 0, 32768, - 34816, 34304, 34432, 34433, 34435, 34424, 34428, 34430, - 0, 32768, 34816, 34304, 0, 32768, 34816, 34304, - 34432, 0, 32768, 34816, 34304, 34432, 0, 32768, - 34816, 34304, 34432, 34434, 0, 32768, 34816, 34304, - 34432, 0, 32768, 34816, 34304, 34432, 34436, 0, - 32768, 34816, 34304, 34432, 34436, 0, 32768, 34816, - 34304, 34432, 34440, 34438, 0, 32768, 34816, 34304, - 34432, 0, 32768, 34816, 34304, 34432, 34440, 0, - 32768, 34816, 34304, 34432, 34440, 0, 32768, 34816, - 34304, 34432, 34440, 34442, 0, 32768, 34816, 34304, - 34432, 34440, 0, 32768, 34816, 34304, 34432, 34448, - 34444, 0, 32768, 34816, 34304, 34432, 34448, 34444, - 0, 32768, 34816, 34304, 34432, 34448, 34449, 34446, - 0, 32768, 34816, 34304, 34432, 0, 32768, 34816, - 34304, 34432, 34448, 0, 32768, 34816, 34304, 34432, - 34448, 0, 32768, 34816, 34304, 34432, 34448, 34450, - 0, 32768, 34816, 34304, 34432, 34448, 0, 32768, - 34816, 34304, 34432, 34448, 34452, 0, 32768, 34816, - 34304, 34432, 34448, 34452, 0, 32768, 34816, 34304, - 34432, 34448, 34456, 34454, 0, 32768, 34816, 34304, - 34432, 34448, 0, 32768, 34816, 34304, 34432, 34464, - 34456, 0, 32768, 34816, 34304, 34432, 34464, 34456, - 0, 32768, 34816, 34304, 34432, 34464, 34456, 34458, - 0, 32768, 34816, 34304, 34432, 34464, 34456, 0, - 32768, 34816, 34304, 34432, 34464, 34465, 34460, 0, - 32768, 34816, 34304, 34432, 34464, 34465, 34460, 0, - 32768, 34816, 34304, 34432, 34464, 34465, 34460, 34462, - 0, 32768, 34816, 34304, 34432, 0, 32768, 34816, - 34304, 34432, 34464, 0, 32768, 34816, 34304, 34432, - 34464, 0, 32768, 34816, 34304, 34432, 34464, 34466, - 0, 32768, 34816, 34304, 34432, 34464, 0, 32768, - 34816, 34304, 34432, 34464, 34468, 0, 32768, 34816, - 34304, 34432, 34464, 34468, 0, 32768, 34816, 34304, - 34432, 34464, 34472, 34470, 0, 32768, 34816, 34304, - 34432, 34464, 0, 32768, 34816, 34304, 34432, 34464, - 34472, 0, 32768, 34816, 34304, 34432, 34464, 34472, - 0, 32768, 34816, 34304, 34432, 34464, 34472, 34474, - 0, 32768, 34816, 34304, 34432, 34464, 34472, 0, - 32768, 34816, 34304, 34432, 34464, 34480, 34476, 0, - 32768, 34816, 34304, 34432, 34464, 34480, 34476, 0, - 32768, 34816, 34304, 34432, 34464, 34480, 34481, 34478, - 0, 32768, 34816, 34304, 34432, 34464, 0, 32768, - 34816, 34304, 34432, 34496, 34480, 0, 32768, 34816, - 34304, 34432, 34496, 34480, 0, 32768, 34816, 34304, - 34432, 34496, 34480, 34482, 0, 32768, 34816, 34304, - 34432, 34496, 34480, 0, 32768, 34816, 34304, 34432, - 34496, 34480, 34484, 0, 32768, 34816, 34304, 34432, - 34496, 34480, 34484, 0, 32768, 34816, 34304, 34432, - 34496, 34480, 34488, 34486, 0, 32768, 34816, 34304, - 34432, 34496, 34480, 0, 32768, 34816, 34304, 34432, - 34496, 34497, 34488, 0, 32768, 34816, 34304, 34432, - 34496, 34497, 34488, 0, 32768, 34816, 34304, 34432, - 34496, 34497, 34488, 34490, 0, 32768, 34816, 34304, - 34432, 34496, 34497, 34488, 0, 32768, 34816, 34304, - 34432, 34496, 34497, 34488, 34492, 0, 32768, 34816, - 34304, 34432, 34496, 34497, 34499, 34492, 0, 32768, - 34816, 34304, 34432, 34496, 34497, 34499, 34492, 34494, - 0, 32768, 34816, 34304, 34432, 0, 32768, 34816, - 34304, 34560, 34496, 0, 32768, 34816, 34304, 34560, - 34496, 0, 32768, 34816, 34304, 34560, 34496, 34498, - 0, 32768, 34816, 34304, 34560, 34496, 0, 32768, - 34816, 34304, 34560, 34496, 34500, 0, 32768, 34816, - 34304, 34560, 34496, 34500, 0, 32768, 34816, 34304, - 34560, 34496, 34504, 34502, 0, 32768, 34816, 34304, - 34560, 34496, 0, 32768, 34816, 34304, 34560, 34496, - 34504, 0, 32768, 34816, 34304, 34560, 34496, 34504, - 0, 32768, 34816, 34304, 34560, 34496, 34504, 34506, - 0, 32768, 34816, 34304, 34560, 34496, 34504, 0, - 32768, 34816, 34304, 34560, 34496, 34512, 34508, 0, - 32768, 34816, 34304, 34560, 34496, 34512, 34508, 0, - 32768, 34816, 34304, 34560, 34496, 34512, 34513, 34510, - 0, 32768, 34816, 34304, 34560, 34496, 0, 32768, - 34816, 34304, 34560, 34496, 34512, 0, 32768, 34816, - 34304, 34560, 34496, 34512, 0, 32768, 34816, 34304, - 34560, 34496, 34512, 34514, 0, 32768, 34816, 34304, - 34560, 34496, 34512, 0, 32768, 34816, 34304, 34560, - 34496, 34512, 34516, 0, 32768, 34816, 34304, 34560, - 34496, 34512, 34516, 0, 32768, 34816, 34304, 34560, - 34496, 34512, 34520, 34518, 0, 32768, 34816, 34304, - 34560, 34496, 34512, 0, 32768, 34816, 34304, 34560, - 34496, 34528, 34520, 0, 32768, 34816, 34304, 34560, - 34496, 34528, 34520, 0, 32768, 34816, 34304, 34560, - 34496, 34528, 34520, 34522, 0, 32768, 34816, 34304, - 34560, 34496, 34528, 34520, 0, 32768, 34816, 34304, - 34560, 34496, 34528, 34529, 34524, 0, 32768, 34816, - 34304, 34560, 34496, 34528, 34529, 34524, 0, 32768, - 34816, 34304, 34560, 34496, 34528, 34529, 34524, 34526, - 0, 32768, 34816, 34304, 34560, 34496, 0, 32768, - 34816, 34304, 34560, 34561, 34528, 0, 32768, 34816, - 34304, 34560, 34561, 34528, 0, 32768, 34816, 34304, - 34560, 34561, 34528, 34530, 0, 32768, 34816, 34304, - 34560, 34561, 34528, 0, 32768, 34816, 34304, 34560, - 34561, 34528, 34532, 0, 32768, 34816, 34304, 34560, - 34561, 34528, 34532, 0, 32768, 34816, 34304, 34560, - 34561, 34528, 34536, 34534, 0, 32768, 34816, 34304, - 34560, 34561, 34528, 0, 32768, 34816, 34304, 34560, - 34561, 34528, 34536, 0, 32768, 34816, 34304, 34560, - 34561, 34528, 34536, 0, 32768, 34816, 34304, 34560, - 34561, 34528, 34536, 34538, 0, 32768, 34816, 34304, - 34560, 34561, 34528, 34536, 0, 32768, 34816, 34304, - 34560, 34561, 34528, 34544, 34540, 0, 32768, 34816, - 34304, 34560, 34561, 34528, 34544, 34540, 0, 32768, - 34816, 34304, 34560, 34561, 34528, 34544, 34545, 34542, - 0, 32768, 34816, 34304, 34560, 34561, 34528, 0, - 32768, 34816, 34304, 34560, 34561, 34528, 34544, 0, - 32768, 34816, 34304, 34560, 34561, 34563, 34544, 0, - 32768, 34816, 34304, 34560, 34561, 34563, 34544, 34546, - 0, 32768, 34816, 34304, 34560, 34561, 34563, 34544, - 0, 32768, 34816, 34304, 34560, 34561, 34563, 34544, - 34548, 0, 32768, 34816, 34304, 34560, 34561, 34563, - 34544, 34548, 0, 32768, 34816, 34304, 34560, 34561, - 34563, 34544, 34552, 34550, 0, 32768, 34816, 34304, - 34560, 34561, 34563, 34544, 0, 32768, 34816, 34304, - 34560, 34561, 34563, 34544, 34552, 0, 32768, 34816, - 34304, 34560, 34561, 34563, 34544, 34552, 0, 32768, - 34816, 34304, 34560, 34561, 34563, 34544, 34552, 34554, - 0, 32768, 34816, 34304, 34560, 34561, 34563, 34567, - 34552, 0, 32768, 34816, 34304, 34560, 34561, 34563, - 34567, 34552, 34556, 0, 32768, 34816, 34304, 34560, - 34561, 34563, 34567, 34552, 34556, 0, 32768, 34816, - 34304, 34560, 34561, 34563, 34567, 34552, 34556, 34558, - 0, 32768, 34816, 34304, 0, 32768, 34816, 34304, - 34560, 0, 32768, 34816, 34817, 34560, 0, 32768, - 34816, 34817, 34560, 34562, 0, 32768, 34816, 34817, - 34560, 0, 32768, 34816, 34817, 34560, 34564, 0, - 32768, 34816, 34817, 34560, 34564, 0, 32768, 34816, - 34817, 34560, 34568, 34566, 0, 32768, 34816, 34817, - 34560, 0, 32768, 34816, 34817, 34560, 34568, 0, - 32768, 34816, 34817, 34560, 34568, 0, 32768, 34816, - 34817, 34560, 34568, 34570, 0, 32768, 34816, 34817, - 34560, 34568, 0, 32768, 34816, 34817, 34560, 34576, - 34572, 0, 32768, 34816, 34817, 34560, 34576, 34572, - 0, 32768, 34816, 34817, 34560, 34576, 34577, 34574, - 0, 32768, 34816, 34817, 34560, 0, 32768, 34816, - 34817, 34560, 34576, 0, 32768, 34816, 34817, 34560, - 34576, 0, 32768, 34816, 34817, 34560, 34576, 34578, - 0, 32768, 34816, 34817, 34560, 34576, 0, 32768, - 34816, 34817, 34560, 34576, 34580, 0, 32768, 34816, - 34817, 34560, 34576, 34580, 0, 32768, 34816, 34817, - 34560, 34576, 34584, 34582, 0, 32768, 34816, 34817, - 34560, 34576, 0, 32768, 34816, 34817, 34560, 34592, - 34584, 0, 32768, 34816, 34817, 34560, 34592, 34584, - 0, 32768, 34816, 34817, 34560, 34592, 34584, 34586, - 0, 32768, 34816, 34817, 34560, 34592, 34584, 0, - 32768, 34816, 34817, 34560, 34592, 34593, 34588, 0, - 32768, 34816, 34817, 34560, 34592, 34593, 34588, 0, - 32768, 34816, 34817, 34560, 34592, 34593, 34588, 34590, - 0, 32768, 34816, 34817, 34560, 0, 32768, 34816, - 34817, 34560, 34592, 0, 32768, 34816, 34817, 34560, - 34592, 0, 32768, 34816, 34817, 34560, 34592, 34594, - 0, 32768, 34816, 34817, 34560, 34592, 0, 32768, - 34816, 34817, 34560, 34592, 34596, 0, 32768, 34816, - 34817, 34560, 34592, 34596, 0, 32768, 34816, 34817, - 34560, 34592, 34600, 34598, 0, 32768, 34816, 34817, - 34560, 34592, 0, 32768, 34816, 34817, 34560, 34592, - 34600, 0, 32768, 34816, 34817, 34560, 34592, 34600, - 0, 32768, 34816, 34817, 34560, 34592, 34600, 34602, - 0, 32768, 34816, 34817, 34560, 34592, 34600, 0, - 32768, 34816, 34817, 34560, 34592, 34608, 34604, 0, - 32768, 34816, 34817, 34560, 34592, 34608, 34604, 0, - 32768, 34816, 34817, 34560, 34592, 34608, 34609, 34606, - 0, 32768, 34816, 34817, 34560, 34592, 0, 32768, - 34816, 34817, 34560, 34624, 34608, 0, 32768, 34816, - 34817, 34560, 34624, 34608, 0, 32768, 34816, 34817, - 34560, 34624, 34608, 34610, 0, 32768, 34816, 34817, - 34560, 34624, 34608, 0, 32768, 34816, 34817, 34560, - 34624, 34608, 34612, 0, 32768, 34816, 34817, 34560, - 34624, 34608, 34612, 0, 32768, 34816, 34817, 34560, - 34624, 34608, 34616, 34614, 0, 32768, 34816, 34817, - 34560, 34624, 34608, 0, 32768, 34816, 34817, 34560, - 34624, 34625, 34616, 0, 32768, 34816, 34817, 34560, - 34624, 34625, 34616, 0, 32768, 34816, 34817, 34560, - 34624, 34625, 34616, 34618, 0, 32768, 34816, 34817, - 34560, 34624, 34625, 34616, 0, 32768, 34816, 34817, - 34560, 34624, 34625, 34616, 34620, 0, 32768, 34816, - 34817, 34560, 34624, 34625, 34627, 34620, 0, 32768, - 34816, 34817, 34560, 34624, 34625, 34627, 34620, 34622, - 0, 32768, 34816, 34817, 34560, 0, 32768, 34816, - 34817, 34560, 34624, 0, 32768, 34816, 34817, 34560, - 34624, 0, 32768, 34816, 34817, 34560, 34624, 34626, - 0, 32768, 34816, 34817, 34560, 34624, 0, 32768, - 34816, 34817, 34560, 34624, 34628, 0, 32768, 34816, - 34817, 34560, 34624, 34628, 0, 32768, 34816, 34817, - 34560, 34624, 34632, 34630, 0, 32768, 34816, 34817, - 34560, 34624, 0, 32768, 34816, 34817, 34560, 34624, - 34632, 0, 32768, 34816, 34817, 34560, 34624, 34632, - 0, 32768, 34816, 34817, 34560, 34624, 34632, 34634, - 0, 32768, 34816, 34817, 34560, 34624, 34632, 0, - 32768, 34816, 34817, 34560, 34624, 34640, 34636, 0, - 32768, 34816, 34817, 34560, 34624, 34640, 34636, 0, - 32768, 34816, 34817, 34560, 34624, 34640, 34641, 34638, - 0, 32768, 34816, 34817, 34560, 34624, 0, 32768, - 34816, 34817, 34560, 34624, 34640, 0, 32768, 34816, - 34817, 34560, 34624, 34640, 0, 32768, 34816, 34817, - 34560, 34624, 34640, 34642, 0, 32768, 34816, 34817, - 34560, 34624, 34640, 0, 32768, 34816, 34817, 34560, - 34624, 34640, 34644, 0, 32768, 34816, 34817, 34560, - 34624, 34640, 34644, 0, 32768, 34816, 34817, 34560, - 34624, 34640, 34648, 34646, 0, 32768, 34816, 34817, - 34560, 34624, 34640, 0, 32768, 34816, 34817, 34560, - 34624, 34656, 34648, 0, 32768, 34816, 34817, 34560, - 34624, 34656, 34648, 0, 32768, 34816, 34817, 34560, - 34624, 34656, 34648, 34650, 0, 32768, 34816, 34817, - 34560, 34624, 34656, 34648, 0, 32768, 34816, 34817, - 34560, 34624, 34656, 34657, 34652, 0, 32768, 34816, - 34817, 34560, 34624, 34656, 34657, 34652, 0, 32768, - 34816, 34817, 34560, 34624, 34656, 34657, 34652, 34654, - 0, 32768, 34816, 34817, 34560, 34624, 0, 32768, - 34816, 34817, 34560, 34688, 34656, 0, 32768, 34816, - 34817, 34560, 34688, 34656, 0, 32768, 34816, 34817, - 34560, 34688, 34656, 34658, 0, 32768, 34816, 34817, - 34560, 34688, 34656, 0, 32768, 34816, 34817, 34560, - 34688, 34656, 34660, 0, 32768, 34816, 34817, 34560, - 34688, 34656, 34660, 0, 32768, 34816, 34817, 34560, - 34688, 34656, 34664, 34662, 0, 32768, 34816, 34817, - 34560, 34688, 34656, 0, 32768, 34816, 34817, 34560, - 34688, 34656, 34664, 0, 32768, 34816, 34817, 34560, - 34688, 34656, 34664, 0, 32768, 34816, 34817, 34560, - 34688, 34656, 34664, 34666, 0, 32768, 34816, 34817, - 34560, 34688, 34656, 34664, 0, 32768, 34816, 34817, - 34560, 34688, 34656, 34672, 34668, 0, 32768, 34816, - 34817, 34560, 34688, 34656, 34672, 34668, 0, 32768, - 34816, 34817, 34560, 34688, 34656, 34672, 34673, 34670, - 0, 32768, 34816, 34817, 34560, 34688, 34656, 0, - 32768, 34816, 34817, 34560, 34688, 34689, 34672, 0, - 32768, 34816, 34817, 34560, 34688, 34689, 34672, 0, - 32768, 34816, 34817, 34560, 34688, 34689, 34672, 34674, - 0, 32768, 34816, 34817, 34560, 34688, 34689, 34672, - 0, 32768, 34816, 34817, 34560, 34688, 34689, 34672, - 34676, 0, 32768, 34816, 34817, 34560, 34688, 34689, - 34672, 34676, 0, 32768, 34816, 34817, 34560, 34688, - 34689, 34672, 34680, 34678, 0, 32768, 34816, 34817, - 34560, 34688, 34689, 34672, 0, 32768, 34816, 34817, - 34560, 34688, 34689, 34672, 34680, 0, 32768, 34816, - 34817, 34560, 34688, 34689, 34691, 34680, 0, 32768, - 34816, 34817, 34560, 34688, 34689, 34691, 34680, 34682, - 0, 32768, 34816, 34817, 34560, 34688, 34689, 34691, - 34680, 0, 32768, 34816, 34817, 34560, 34688, 34689, - 34691, 34680, 34684, 0, 32768, 34816, 34817, 34560, - 34688, 34689, 34691, 34680, 34684, 0, 32768, 34816, - 34817, 34560, 34688, 34689, 34691, 34680, 34684, 34686, - 0, 32768, 34816, 34817, 34560, 0, 32768, 34816, - 34817, 34560, 34688, 0, 32768, 34816, 34817, 34560, - 34688, 0, 32768, 34816, 34817, 34560, 34688, 34690, - 0, 32768, 34816, 34817, 34819, 34688, 0, 32768, - 34816, 34817, 34819, 34688, 34692, 0, 32768, 34816, - 34817, 34819, 34688, 34692, 0, 32768, 34816, 34817, - 34819, 34688, 34696, 34694, 0, 32768, 34816, 34817, - 34819, 34688, 0, 32768, 34816, 34817, 34819, 34688, - 34696, 0, 32768, 34816, 34817, 34819, 34688, 34696, - 0, 32768, 34816, 34817, 34819, 34688, 34696, 34698, - 0, 32768, 34816, 34817, 34819, 34688, 34696, 0, - 32768, 34816, 34817, 34819, 34688, 34704, 34700, 0, - 32768, 34816, 34817, 34819, 34688, 34704, 34700, 0, - 32768, 34816, 34817, 34819, 34688, 34704, 34705, 34702, - 0, 32768, 34816, 34817, 34819, 34688, 0, 32768, - 34816, 34817, 34819, 34688, 34704, 0, 32768, 34816, - 34817, 34819, 34688, 34704, 0, 32768, 34816, 34817, - 34819, 34688, 34704, 34706, 0, 32768, 34816, 34817, - 34819, 34688, 34704, 0, 32768, 34816, 34817, 34819, - 34688, 34704, 34708, 0, 32768, 34816, 34817, 34819, - 34688, 34704, 34708, 0, 32768, 34816, 34817, 34819, - 34688, 34704, 34712, 34710, 0, 32768, 34816, 34817, - 34819, 34688, 34704, 0, 32768, 34816, 34817, 34819, - 34688, 34720, 34712, 0, 32768, 34816, 34817, 34819, - 34688, 34720, 34712, 0, 32768, 34816, 34817, 34819, - 34688, 34720, 34712, 34714, 0, 32768, 34816, 34817, - 34819, 34688, 34720, 34712, 0, 32768, 34816, 34817, - 34819, 34688, 34720, 34721, 34716, 0, 32768, 34816, - 34817, 34819, 34688, 34720, 34721, 34716, 0, 32768, - 34816, 34817, 34819, 34688, 34720, 34721, 34716, 34718, - 0, 32768, 34816, 34817, 34819, 34688, 0, 32768, - 34816, 34817, 34819, 34688, 34720, 0, 32768, 34816, - 34817, 34819, 34688, 34720, 0, 32768, 34816, 34817, - 34819, 34688, 34720, 34722, 0, 32768, 34816, 34817, - 34819, 34688, 34720, 0, 32768, 34816, 34817, 34819, - 34688, 34720, 34724, 0, 32768, 34816, 34817, 34819, - 34688, 34720, 34724, 0, 32768, 34816, 34817, 34819, - 34688, 34720, 34728, 34726, 0, 32768, 34816, 34817, - 34819, 34688, 34720, 0, 32768, 34816, 34817, 34819, - 34688, 34720, 34728, 0, 32768, 34816, 34817, 34819, - 34688, 34720, 34728, 0, 32768, 34816, 34817, 34819, - 34688, 34720, 34728, 34730, 0, 32768, 34816, 34817, - 34819, 34688, 34720, 34728, 0, 32768, 34816, 34817, - 34819, 34688, 34720, 34736, 34732, 0, 32768, 34816, - 34817, 34819, 34688, 34720, 34736, 34732, 0, 32768, - 34816, 34817, 34819, 34688, 34720, 34736, 34737, 34734, - 0, 32768, 34816, 34817, 34819, 34688, 34720, 0, - 32768, 34816, 34817, 34819, 34688, 34752, 34736, 0, - 32768, 34816, 34817, 34819, 34688, 34752, 34736, 0, - 32768, 34816, 34817, 34819, 34688, 34752, 34736, 34738, - 0, 32768, 34816, 34817, 34819, 34688, 34752, 34736, - 0, 32768, 34816, 34817, 34819, 34688, 34752, 34736, - 34740, 0, 32768, 34816, 34817, 34819, 34688, 34752, - 34736, 34740, 0, 32768, 34816, 34817, 34819, 34688, - 34752, 34736, 34744, 34742, 0, 32768, 34816, 34817, - 34819, 34688, 34752, 34736, 0, 32768, 34816, 34817, - 34819, 34688, 34752, 34753, 34744, 0, 32768, 34816, - 34817, 34819, 34688, 34752, 34753, 34744, 0, 32768, - 34816, 34817, 34819, 34688, 34752, 34753, 34744, 34746, - 0, 32768, 34816, 34817, 34819, 34688, 34752, 34753, - 34744, 0, 32768, 34816, 34817, 34819, 34688, 34752, - 34753, 34744, 34748, 0, 32768, 34816, 34817, 34819, - 34688, 34752, 34753, 34755, 34748, 0, 32768, 34816, - 34817, 34819, 34688, 34752, 34753, 34755, 34748, 34750, - 0, 32768, 34816, 34817, 34819, 34688, 0, 32768, - 34816, 34817, 34819, 34688, 34752, 0, 32768, 34816, - 34817, 34819, 34688, 34752, 0, 32768, 34816, 34817, - 34819, 34688, 34752, 34754, 0, 32768, 34816, 34817, - 34819, 34688, 34752, 0, 32768, 34816, 34817, 34819, - 34688, 34752, 34756, 0, 32768, 34816, 34817, 34819, - 34688, 34752, 34756, 0, 32768, 34816, 34817, 34819, - 34688, 34752, 34760, 34758, 0, 32768, 34816, 34817, - 34819, 34823, 34752, 0, 32768, 34816, 34817, 34819, - 34823, 34752, 34760, 0, 32768, 34816, 34817, 34819, - 34823, 34752, 34760, 0, 32768, 34816, 34817, 34819, - 34823, 34752, 34760, 34762, 0, 32768, 34816, 34817, - 34819, 34823, 34752, 34760, 0, 32768, 34816, 34817, - 34819, 34823, 34752, 34768, 34764, 0, 32768, 34816, - 34817, 34819, 34823, 34752, 34768, 34764, 0, 32768, - 34816, 34817, 34819, 34823, 34752, 34768, 34769, 34766, - 0, 32768, 34816, 34817, 34819, 34823, 34752, 0, - 32768, 34816, 34817, 34819, 34823, 34752, 34768, 0, - 32768, 34816, 34817, 34819, 34823, 34752, 34768, 0, - 32768, 34816, 34817, 34819, 34823, 34752, 34768, 34770, - 0, 32768, 34816, 34817, 34819, 34823, 34752, 34768, - 0, 32768, 34816, 34817, 34819, 34823, 34752, 34768, - 34772, 0, 32768, 34816, 34817, 34819, 34823, 34752, - 34768, 34772, 0, 32768, 34816, 34817, 34819, 34823, - 34752, 34768, 34776, 34774, 0, 32768, 34816, 34817, - 34819, 34823, 34752, 34768, 0, 32768, 34816, 34817, - 34819, 34823, 34752, 34784, 34776, 0, 32768, 34816, - 34817, 34819, 34823, 34752, 34784, 34776, 0, 32768, - 34816, 34817, 34819, 34823, 34752, 34784, 34776, 34778, - 0, 32768, 34816, 34817, 34819, 34823, 34752, 34784, - 34776, 0, 32768, 34816, 34817, 34819, 34823, 34752, - 34784, 34785, 34780, 0, 32768, 34816, 34817, 34819, - 34823, 34752, 34784, 34785, 34780, 0, 32768, 34816, - 34817, 34819, 34823, 34752, 34784, 34785, 34780, 34782, - 0, 32768, 34816, 34817, 34819, 34823, 34752, 0, - 32768, 34816, 34817, 34819, 34823, 34752, 34784, 0, - 32768, 34816, 34817, 34819, 34823, 34752, 34784, 0, - 32768, 34816, 34817, 34819, 34823, 34752, 34784, 34786, - 0, 32768, 34816, 34817, 34819, 34823, 34752, 34784, - 0, 32768, 34816, 34817, 34819, 34823, 34752, 34784, - 34788, 0, 32768, 34816, 34817, 34819, 34823, 34752, - 34784, 34788, 0, 32768, 34816, 34817, 34819, 34823, - 34752, 34784, 34792, 34790, 0, 32768, 34816, 34817, - 34819, 34823, 34752, 34784, 0, 32768, 34816, 34817, - 34819, 34823, 34752, 34784, 34792, 0, 32768, 34816, - 34817, 34819, 34823, 34752, 34784, 34792, 0, 32768, - 34816, 34817, 34819, 34823, 34752, 34784, 34792, 34794, - 0, 32768, 34816, 34817, 34819, 34823, 34752, 34784, - 34792, 0, 32768, 34816, 34817, 34819, 34823, 34752, - 34784, 34800, 34796, 0, 32768, 34816, 34817, 34819, - 34823, 34752, 34784, 34800, 34796, 0, 32768, 34816, - 34817, 34819, 34823, 34752, 34784, 34800, 34801, 34798, - 0, 32768, 34816, 34817, 34819, 34823, 34831, 34784, - 0, 32768, 34816, 34817, 34819, 34823, 34831, 34784, - 34800, 0, 32768, 34816, 34817, 34819, 34823, 34831, - 34784, 34800, 0, 32768, 34816, 34817, 34819, 34823, - 34831, 34784, 34800, 34802, 0, 32768, 34816, 34817, - 34819, 34823, 34831, 34784, 34800, 0, 32768, 34816, - 34817, 34819, 34823, 34831, 34784, 34800, 34804, 0, - 32768, 34816, 34817, 34819, 34823, 34831, 34784, 34800, - 34804, 0, 32768, 34816, 34817, 34819, 34823, 34831, - 34784, 34800, 34808, 34806, 0, 32768, 34816, 34817, - 34819, 34823, 34831, 34784, 34800, 0, 32768, 34816, - 34817, 34819, 34823, 34831, 34784, 34800, 34808, 0, - 32768, 34816, 34817, 34819, 34823, 34831, 34784, 34800, - 34808, 0, 32768, 34816, 34817, 34819, 34823, 34831, - 34784, 34800, 34808, 34810, 0, 32768, 34816, 34817, - 34819, 34823, 34831, 34784, 34800, 34808, 0, 32768, - 34816, 34817, 34819, 34823, 34831, 34784, 34800, 34808, - 34812, 0, 32768, 34816, 34817, 34819, 34823, 34831, - 34784, 34800, 34808, 34812, 0, 32768, 34816, 34817, - 34819, 34823, 34831, 34784, 34800, 34808, 34812, 34814, - 0, 32768, 0, 32768, 34816, 0, 32768, 34816, - 0, 32768, 34816, 34818, 0, 32768, 34816, 0, - 32768, 34816, 34820, 0, 32768, 34816, 34820, 0, - 32768, 34816, 34824, 34822, 0, 32768, 34816, 0, - 32768, 34816, 34824, 0, 32768, 34816, 34824, 0, - 32768, 34816, 34824, 34826, 0, 32768, 34816, 34824, - 0, 32768, 34816, 34832, 34828, 0, 32768, 34816, - 34832, 34828, 0, 32768, 34816, 34832, 34833, 34830, - 0, 32768, 34816, 0, 32768, 34816, 34832, 0, - 32768, 34816, 34832, 0, 32768, 34816, 34832, 34834, - 0, 32768, 34816, 34832, 0, 32768, 34816, 34832, - 34836, 0, 32768, 34816, 34832, 34836, 0, 32768, - 34816, 34832, 34840, 34838, 0, 32768, 34816, 34832, - 0, 32768, 34816, 34848, 34840, 0, 32768, 34816, - 34848, 34840, 0, 32768, 34816, 34848, 34840, 34842, - 0, 32768, 34816, 34848, 34840, 0, 32768, 34816, - 34848, 34849, 34844, 0, 32768, 34816, 34848, 34849, - 34844, 0, 32768, 34816, 34848, 34849, 34844, 34846, - 0, 32768, 34816, 0, 32768, 34816, 34848, 0, - 32768, 34816, 34848, 0, 32768, 34816, 34848, 34850, - 0, 32768, 34816, 34848, 0, 32768, 34816, 34848, - 34852, 0, 32768, 34816, 34848, 34852, 0, 32768, - 34816, 34848, 34856, 34854, 0, 32768, 34816, 34848, - 0, 32768, 34816, 34848, 34856, 0, 32768, 34816, - 34848, 34856, 0, 32768, 34816, 34848, 34856, 34858, - 0, 32768, 34816, 34848, 34856, 0, 32768, 34816, - 34848, 34864, 34860, 0, 32768, 34816, 34848, 34864, - 34860, 0, 32768, 34816, 34848, 34864, 34865, 34862, - 0, 32768, 34816, 34848, 0, 32768, 34816, 34880, - 34864, 0, 32768, 34816, 34880, 34864, 0, 32768, - 34816, 34880, 34864, 34866, 0, 32768, 34816, 34880, - 34864, 0, 32768, 34816, 34880, 34864, 34868, 0, - 32768, 34816, 34880, 34864, 34868, 0, 32768, 34816, - 34880, 34864, 34872, 34870, 0, 32768, 34816, 34880, - 34864, 0, 32768, 34816, 34880, 34881, 34872, 0, - 32768, 34816, 34880, 34881, 34872, 0, 32768, 34816, - 34880, 34881, 34872, 34874, 0, 32768, 34816, 34880, - 34881, 34872, 0, 32768, 34816, 34880, 34881, 34872, - 34876, 0, 32768, 34816, 34880, 34881, 34883, 34876, - 0, 32768, 34816, 34880, 34881, 34883, 34876, 34878, - 0, 32768, 34816, 0, 32768, 34816, 34880, 0, - 32768, 34816, 34880, 0, 32768, 34816, 34880, 34882, - 0, 32768, 34816, 34880, 0, 32768, 34816, 34880, - 34884, 0, 32768, 34816, 34880, 34884, 0, 32768, - 34816, 34880, 34888, 34886, 0, 32768, 34816, 34880, - 0, 32768, 34816, 34880, 34888, 0, 32768, 34816, - 34880, 34888, 0, 32768, 34816, 34880, 34888, 34890, - 0, 32768, 34816, 34880, 34888, 0, 32768, 34816, - 34880, 34896, 34892, 0, 32768, 34816, 34880, 34896, - 34892, 0, 32768, 34816, 34880, 34896, 34897, 34894, - 0, 32768, 34816, 34880, 0, 32768, 34816, 34880, - 34896, 0, 32768, 34816, 34880, 34896, 0, 32768, - 34816, 34880, 34896, 34898, 0, 32768, 34816, 34880, - 34896, 0, 32768, 34816, 34880, 34896, 34900, 0, - 32768, 34816, 34880, 34896, 34900, 0, 32768, 34816, - 34880, 34896, 34904, 34902, 0, 32768, 34816, 34880, - 34896, 0, 32768, 34816, 34880, 34912, 34904, 0, - 32768, 34816, 34880, 34912, 34904, 0, 32768, 34816, - 34880, 34912, 34904, 34906, 0, 32768, 34816, 34880, - 34912, 34904, 0, 32768, 34816, 34880, 34912, 34913, - 34908, 0, 32768, 34816, 34880, 34912, 34913, 34908, - 0, 32768, 34816, 34880, 34912, 34913, 34908, 34910, - 0, 32768, 34816, 34880, 0, 32768, 34816, 34944, - 34912, 0, 32768, 34816, 34944, 34912, 0, 32768, - 34816, 34944, 34912, 34914, 0, 32768, 34816, 34944, - 34912, 0, 32768, 34816, 34944, 34912, 34916, 0, - 32768, 34816, 34944, 34912, 34916, 0, 32768, 34816, - 34944, 34912, 34920, 34918, 0, 32768, 34816, 34944, - 34912, 0, 32768, 34816, 34944, 34912, 34920, 0, - 32768, 34816, 34944, 34912, 34920, 0, 32768, 34816, - 34944, 34912, 34920, 34922, 0, 32768, 34816, 34944, - 34912, 34920, 0, 32768, 34816, 34944, 34912, 34928, - 34924, 0, 32768, 34816, 34944, 34912, 34928, 34924, - 0, 32768, 34816, 34944, 34912, 34928, 34929, 34926, - 0, 32768, 34816, 34944, 34912, 0, 32768, 34816, - 34944, 34945, 34928, 0, 32768, 34816, 34944, 34945, - 34928, 0, 32768, 34816, 34944, 34945, 34928, 34930, - 0, 32768, 34816, 34944, 34945, 34928, 0, 32768, - 34816, 34944, 34945, 34928, 34932, 0, 32768, 34816, - 34944, 34945, 34928, 34932, 0, 32768, 34816, 34944, - 34945, 34928, 34936, 34934, 0, 32768, 34816, 34944, - 34945, 34928, 0, 32768, 34816, 34944, 34945, 34928, - 34936, 0, 32768, 34816, 34944, 34945, 34947, 34936, - 0, 32768, 34816, 34944, 34945, 34947, 34936, 34938, - 0, 32768, 34816, 34944, 34945, 34947, 34936, 0, - 32768, 34816, 34944, 34945, 34947, 34936, 34940, 0, - 32768, 34816, 34944, 34945, 34947, 34936, 34940, 0, - 32768, 34816, 34944, 34945, 34947, 34936, 34940, 34942, - 0, 32768, 34816, 0, 32768, 34816, 34944, 0, - 32768, 34816, 34944, 0, 32768, 34816, 34944, 34946, - 0, 32768, 34816, 34944, 0, 32768, 34816, 34944, - 34948, 0, 32768, 34816, 34944, 34948, 0, 32768, - 34816, 34944, 34952, 34950, 0, 32768, 34816, 34944, - 0, 32768, 34816, 34944, 34952, 0, 32768, 34816, - 34944, 34952, 0, 32768, 34816, 34944, 34952, 34954, - 0, 32768, 34816, 34944, 34952, 0, 32768, 34816, - 34944, 34960, 34956, 0, 32768, 34816, 34944, 34960, - 34956, 0, 32768, 34816, 34944, 34960, 34961, 34958, - 0, 32768, 34816, 34944, 0, 32768, 34816, 34944, - 34960, 0, 32768, 34816, 34944, 34960, 0, 32768, - 34816, 34944, 34960, 34962, 0, 32768, 34816, 34944, - 34960, 0, 32768, 34816, 34944, 34960, 34964, 0, - 32768, 34816, 34944, 34960, 34964, 0, 32768, 34816, - 34944, 34960, 34968, 34966, 0, 32768, 34816, 34944, - 34960, 0, 32768, 34816, 34944, 34976, 34968, 0, - 32768, 34816, 34944, 34976, 34968, 0, 32768, 34816, - 34944, 34976, 34968, 34970, 0, 32768, 34816, 34944, - 34976, 34968, 0, 32768, 34816, 34944, 34976, 34977, - 34972, 0, 32768, 34816, 34944, 34976, 34977, 34972, - 0, 32768, 34816, 34944, 34976, 34977, 34972, 34974, - 0, 32768, 34816, 34944, 0, 32768, 34816, 34944, - 34976, 0, 32768, 34816, 34944, 34976, 0, 32768, - 34816, 34944, 34976, 34978, 0, 32768, 34816, 34944, - 34976, 0, 32768, 34816, 34944, 34976, 34980, 0, - 32768, 34816, 34944, 34976, 34980, 0, 32768, 34816, - 34944, 34976, 34984, 34982, 0, 32768, 34816, 34944, - 34976, 0, 32768, 34816, 34944, 34976, 34984, 0, - 32768, 34816, 34944, 34976, 34984, 0, 32768, 34816, - 34944, 34976, 34984, 34986, 0, 32768, 34816, 34944, - 34976, 34984, 0, 32768, 34816, 34944, 34976, 34992, - 34988, 0, 32768, 34816, 34944, 34976, 34992, 34988, - 0, 32768, 34816, 34944, 34976, 34992, 34993, 34990, - 0, 32768, 34816, 34944, 34976, 0, 32768, 34816, - 34944, 35008, 34992, 0, 32768, 34816, 34944, 35008, - 34992, 0, 32768, 34816, 34944, 35008, 34992, 34994, - 0, 32768, 34816, 34944, 35008, 34992, 0, 32768, - 34816, 34944, 35008, 34992, 34996, 0, 32768, 34816, - 34944, 35008, 34992, 34996, 0, 32768, 34816, 34944, - 35008, 34992, 35000, 34998, 0, 32768, 34816, 34944, - 35008, 34992, 0, 32768, 34816, 34944, 35008, 35009, - 35000, 0, 32768, 34816, 34944, 35008, 35009, 35000, - 0, 32768, 34816, 34944, 35008, 35009, 35000, 35002, - 0, 32768, 34816, 34944, 35008, 35009, 35000, 0, - 32768, 34816, 34944, 35008, 35009, 35000, 35004, 0, - 32768, 34816, 34944, 35008, 35009, 35011, 35004, 0, - 32768, 34816, 34944, 35008, 35009, 35011, 35004, 35006, - 0, 32768, 34816, 34944, 0, 32768, 34816, 35072, - 35008, 0, 32768, 34816, 35072, 35008, 0, 32768, - 34816, 35072, 35008, 35010, 0, 32768, 34816, 35072, - 35008, 0, 32768, 34816, 35072, 35008, 35012, 0, - 32768, 34816, 35072, 35008, 35012, 0, 32768, 34816, - 35072, 35008, 35016, 35014, 0, 32768, 34816, 35072, - 35008, 0, 32768, 34816, 35072, 35008, 35016, 0, - 32768, 34816, 35072, 35008, 35016, 0, 32768, 34816, - 35072, 35008, 35016, 35018, 0, 32768, 34816, 35072, - 35008, 35016, 0, 32768, 34816, 35072, 35008, 35024, - 35020, 0, 32768, 34816, 35072, 35008, 35024, 35020, - 0, 32768, 34816, 35072, 35008, 35024, 35025, 35022, - 0, 32768, 34816, 35072, 35008, 0, 32768, 34816, - 35072, 35008, 35024, 0, 32768, 34816, 35072, 35008, - 35024, 0, 32768, 34816, 35072, 35008, 35024, 35026, - 0, 32768, 34816, 35072, 35008, 35024, 0, 32768, - 34816, 35072, 35008, 35024, 35028, 0, 32768, 34816, - 35072, 35008, 35024, 35028, 0, 32768, 34816, 35072, - 35008, 35024, 35032, 35030, 0, 32768, 34816, 35072, - 35008, 35024, 0, 32768, 34816, 35072, 35008, 35040, - 35032, 0, 32768, 34816, 35072, 35008, 35040, 35032, - 0, 32768, 34816, 35072, 35008, 35040, 35032, 35034, - 0, 32768, 34816, 35072, 35008, 35040, 35032, 0, - 32768, 34816, 35072, 35008, 35040, 35041, 35036, 0, - 32768, 34816, 35072, 35008, 35040, 35041, 35036, 0, - 32768, 34816, 35072, 35008, 35040, 35041, 35036, 35038, - 0, 32768, 34816, 35072, 35008, 0, 32768, 34816, - 35072, 35073, 35040, 0, 32768, 34816, 35072, 35073, - 35040, 0, 32768, 34816, 35072, 35073, 35040, 35042, - 0, 32768, 34816, 35072, 35073, 35040, 0, 32768, - 34816, 35072, 35073, 35040, 35044, 0, 32768, 34816, - 35072, 35073, 35040, 35044, 0, 32768, 34816, 35072, - 35073, 35040, 35048, 35046, 0, 32768, 34816, 35072, - 35073, 35040, 0, 32768, 34816, 35072, 35073, 35040, - 35048, 0, 32768, 34816, 35072, 35073, 35040, 35048, - 0, 32768, 34816, 35072, 35073, 35040, 35048, 35050, - 0, 32768, 34816, 35072, 35073, 35040, 35048, 0, - 32768, 34816, 35072, 35073, 35040, 35056, 35052, 0, - 32768, 34816, 35072, 35073, 35040, 35056, 35052, 0, - 32768, 34816, 35072, 35073, 35040, 35056, 35057, 35054, - 0, 32768, 34816, 35072, 35073, 35040, 0, 32768, - 34816, 35072, 35073, 35040, 35056, 0, 32768, 34816, - 35072, 35073, 35075, 35056, 0, 32768, 34816, 35072, - 35073, 35075, 35056, 35058, 0, 32768, 34816, 35072, - 35073, 35075, 35056, 0, 32768, 34816, 35072, 35073, - 35075, 35056, 35060, 0, 32768, 34816, 35072, 35073, - 35075, 35056, 35060, 0, 32768, 34816, 35072, 35073, - 35075, 35056, 35064, 35062, 0, 32768, 34816, 35072, - 35073, 35075, 35056, 0, 32768, 34816, 35072, 35073, - 35075, 35056, 35064, 0, 32768, 34816, 35072, 35073, - 35075, 35056, 35064, 0, 32768, 34816, 35072, 35073, - 35075, 35056, 35064, 35066, 0, 32768, 34816, 35072, - 35073, 35075, 35079, 35064, 0, 32768, 34816, 35072, - 35073, 35075, 35079, 35064, 35068, 0, 32768, 34816, - 35072, 35073, 35075, 35079, 35064, 35068, 0, 32768, - 34816, 35072, 35073, 35075, 35079, 35064, 35068, 35070, - 0, 32768, 34816, 0, 32768, 34816, 35072, 0, - 32768, 34816, 35072, 0, 32768, 34816, 35072, 35074, - 0, 32768, 34816, 35072, 0, 32768, 34816, 35072, - 35076, 0, 32768, 34816, 35072, 35076, 0, 32768, - 34816, 35072, 35080, 35078, 0, 32768, 34816, 35072, - 0, 32768, 34816, 35072, 35080, 0, 32768, 34816, - 35072, 35080, 0, 32768, 34816, 35072, 35080, 35082, - 0, 32768, 34816, 35072, 35080, 0, 32768, 34816, - 35072, 35088, 35084, 0, 32768, 34816, 35072, 35088, - 35084, 0, 32768, 34816, 35072, 35088, 35089, 35086, - 0, 32768, 34816, 35072, 0, 32768, 34816, 35072, - 35088, 0, 32768, 34816, 35072, 35088, 0, 32768, - 34816, 35072, 35088, 35090, 0, 32768, 34816, 35072, - 35088, 0, 32768, 34816, 35072, 35088, 35092, 0, - 32768, 34816, 35072, 35088, 35092, 0, 32768, 34816, - 35072, 35088, 35096, 35094, 0, 32768, 34816, 35072, - 35088, 0, 32768, 34816, 35072, 35104, 35096, 0, - 32768, 34816, 35072, 35104, 35096, 0, 32768, 34816, - 35072, 35104, 35096, 35098, 0, 32768, 34816, 35072, - 35104, 35096, 0, 32768, 34816, 35072, 35104, 35105, - 35100, 0, 32768, 34816, 35072, 35104, 35105, 35100, - 0, 32768, 34816, 35072, 35104, 35105, 35100, 35102, - 0, 32768, 34816, 35072, 0, 32768, 34816, 35072, - 35104, 0, 32768, 34816, 35072, 35104, 0, 32768, - 34816, 35072, 35104, 35106, 0, 32768, 34816, 35072, - 35104, 0, 32768, 34816, 35072, 35104, 35108, 0, - 32768, 34816, 35072, 35104, 35108, 0, 32768, 34816, - 35072, 35104, 35112, 35110, 0, 32768, 34816, 35072, - 35104, 0, 32768, 34816, 35072, 35104, 35112, 0, - 32768, 34816, 35072, 35104, 35112, 0, 32768, 34816, - 35072, 35104, 35112, 35114, 0, 32768, 34816, 35072, - 35104, 35112, 0, 32768, 34816, 35072, 35104, 35120, - 35116, 0, 32768, 34816, 35072, 35104, 35120, 35116, - 0, 32768, 34816, 35072, 35104, 35120, 35121, 35118, - 0, 32768, 34816, 35072, 35104, 0, 32768, 34816, - 35072, 35136, 35120, 0, 32768, 34816, 35072, 35136, - 35120, 0, 32768, 34816, 35072, 35136, 35120, 35122, - 0, 32768, 34816, 35072, 35136, 35120, 0, 32768, - 34816, 35072, 35136, 35120, 35124, 0, 32768, 34816, - 35072, 35136, 35120, 35124, 0, 32768, 34816, 35072, - 35136, 35120, 35128, 35126, 0, 32768, 34816, 35072, - 35136, 35120, 0, 32768, 34816, 35072, 35136, 35137, - 35128, 0, 32768, 34816, 35072, 35136, 35137, 35128, - 0, 32768, 34816, 35072, 35136, 35137, 35128, 35130, - 0, 32768, 34816, 35072, 35136, 35137, 35128, 0, - 32768, 34816, 35072, 35136, 35137, 35128, 35132, 0, - 32768, 34816, 35072, 35136, 35137, 35139, 35132, 0, - 32768, 34816, 35072, 35136, 35137, 35139, 35132, 35134, - 0, 32768, 34816, 35072, 0, 32768, 34816, 35072, - 35136, 0, 32768, 34816, 35072, 35136, 0, 32768, - 34816, 35072, 35136, 35138, 0, 32768, 34816, 35072, - 35136, 0, 32768, 34816, 35072, 35136, 35140, 0, - 32768, 34816, 35072, 35136, 35140, 0, 32768, 34816, - 35072, 35136, 35144, 35142, 0, 32768, 34816, 35072, - 35136, 0, 32768, 34816, 35072, 35136, 35144, 0, - 32768, 34816, 35072, 35136, 35144, 0, 32768, 34816, - 35072, 35136, 35144, 35146, 0, 32768, 34816, 35072, - 35136, 35144, 0, 32768, 34816, 35072, 35136, 35152, - 35148, 0, 32768, 34816, 35072, 35136, 35152, 35148, - 0, 32768, 34816, 35072, 35136, 35152, 35153, 35150, - 0, 32768, 34816, 35072, 35136, 0, 32768, 34816, - 35072, 35136, 35152, 0, 32768, 34816, 35072, 35136, - 35152, 0, 32768, 34816, 35072, 35136, 35152, 35154, - 0, 32768, 34816, 35072, 35136, 35152, 0, 32768, - 34816, 35072, 35136, 35152, 35156, 0, 32768, 34816, - 35072, 35136, 35152, 35156, 0, 32768, 34816, 35072, - 35136, 35152, 35160, 35158, 0, 32768, 34816, 35072, - 35136, 35152, 0, 32768, 34816, 35072, 35136, 35168, - 35160, 0, 32768, 34816, 35072, 35136, 35168, 35160, - 0, 32768, 34816, 35072, 35136, 35168, 35160, 35162, - 0, 32768, 34816, 35072, 35136, 35168, 35160, 0, - 32768, 34816, 35072, 35136, 35168, 35169, 35164, 0, - 32768, 34816, 35072, 35136, 35168, 35169, 35164, 0, - 32768, 34816, 35072, 35136, 35168, 35169, 35164, 35166, - 0, 32768, 34816, 35072, 35136, 0, 32768, 34816, - 35072, 35200, 35168, 0, 32768, 34816, 35072, 35200, - 35168, 0, 32768, 34816, 35072, 35200, 35168, 35170, - 0, 32768, 34816, 35072, 35200, 35168, 0, 32768, - 34816, 35072, 35200, 35168, 35172, 0, 32768, 34816, - 35072, 35200, 35168, 35172, 0, 32768, 34816, 35072, - 35200, 35168, 35176, 35174, 0, 32768, 34816, 35072, - 35200, 35168, 0, 32768, 34816, 35072, 35200, 35168, - 35176, 0, 32768, 34816, 35072, 35200, 35168, 35176, - 0, 32768, 34816, 35072, 35200, 35168, 35176, 35178, - 0, 32768, 34816, 35072, 35200, 35168, 35176, 0, - 32768, 34816, 35072, 35200, 35168, 35184, 35180, 0, - 32768, 34816, 35072, 35200, 35168, 35184, 35180, 0, - 32768, 34816, 35072, 35200, 35168, 35184, 35185, 35182, - 0, 32768, 34816, 35072, 35200, 35168, 0, 32768, - 34816, 35072, 35200, 35201, 35184, 0, 32768, 34816, - 35072, 35200, 35201, 35184, 0, 32768, 34816, 35072, - 35200, 35201, 35184, 35186, 0, 32768, 34816, 35072, - 35200, 35201, 35184, 0, 32768, 34816, 35072, 35200, - 35201, 35184, 35188, 0, 32768, 34816, 35072, 35200, - 35201, 35184, 35188, 0, 32768, 34816, 35072, 35200, - 35201, 35184, 35192, 35190, 0, 32768, 34816, 35072, - 35200, 35201, 35184, 0, 32768, 34816, 35072, 35200, - 35201, 35184, 35192, 0, 32768, 34816, 35072, 35200, - 35201, 35203, 35192, 0, 32768, 34816, 35072, 35200, - 35201, 35203, 35192, 35194, 0, 32768, 34816, 35072, - 35200, 35201, 35203, 35192, 0, 32768, 34816, 35072, - 35200, 35201, 35203, 35192, 35196, 0, 32768, 34816, - 35072, 35200, 35201, 35203, 35192, 35196, 0, 32768, - 34816, 35072, 35200, 35201, 35203, 35192, 35196, 35198, - 0, 32768, 34816, 35072, 0, 32768, 34816, 35328, - 35200, 0, 32768, 34816, 35328, 35200, 0, 32768, - 34816, 35328, 35200, 35202, 0, 32768, 34816, 35328, - 35200, 0, 32768, 34816, 35328, 35200, 35204, 0, - 32768, 34816, 35328, 35200, 35204, 0, 32768, 34816, - 35328, 35200, 35208, 35206, 0, 32768, 34816, 35328, - 35200, 0, 32768, 34816, 35328, 35200, 35208, 0, - 32768, 34816, 35328, 35200, 35208, 0, 32768, 34816, - 35328, 35200, 35208, 35210, 0, 32768, 34816, 35328, - 35200, 35208, 0, 32768, 34816, 35328, 35200, 35216, - 35212, 0, 32768, 34816, 35328, 35200, 35216, 35212, - 0, 32768, 34816, 35328, 35200, 35216, 35217, 35214, - 0, 32768, 34816, 35328, 35200, 0, 32768, 34816, - 35328, 35200, 35216, 0, 32768, 34816, 35328, 35200, - 35216, 0, 32768, 34816, 35328, 35200, 35216, 35218, - 0, 32768, 34816, 35328, 35200, 35216, 0, 32768, - 34816, 35328, 35200, 35216, 35220, 0, 32768, 34816, - 35328, 35200, 35216, 35220, 0, 32768, 34816, 35328, - 35200, 35216, 35224, 35222, 0, 32768, 34816, 35328, - 35200, 35216, 0, 32768, 34816, 35328, 35200, 35232, - 35224, 0, 32768, 34816, 35328, 35200, 35232, 35224, - 0, 32768, 34816, 35328, 35200, 35232, 35224, 35226, - 0, 32768, 34816, 35328, 35200, 35232, 35224, 0, - 32768, 34816, 35328, 35200, 35232, 35233, 35228, 0, - 32768, 34816, 35328, 35200, 35232, 35233, 35228, 0, - 32768, 34816, 35328, 35200, 35232, 35233, 35228, 35230, - 0, 32768, 34816, 35328, 35200, 0, 32768, 34816, - 35328, 35200, 35232, 0, 32768, 34816, 35328, 35200, - 35232, 0, 32768, 34816, 35328, 35200, 35232, 35234, - 0, 32768, 34816, 35328, 35200, 35232, 0, 32768, - 34816, 35328, 35200, 35232, 35236, 0, 32768, 34816, - 35328, 35200, 35232, 35236, 0, 32768, 34816, 35328, - 35200, 35232, 35240, 35238, 0, 32768, 34816, 35328, - 35200, 35232, 0, 32768, 34816, 35328, 35200, 35232, - 35240, 0, 32768, 34816, 35328, 35200, 35232, 35240, - 0, 32768, 34816, 35328, 35200, 35232, 35240, 35242, - 0, 32768, 34816, 35328, 35200, 35232, 35240, 0, - 32768, 34816, 35328, 35200, 35232, 35248, 35244, 0, - 32768, 34816, 35328, 35200, 35232, 35248, 35244, 0, - 32768, 34816, 35328, 35200, 35232, 35248, 35249, 35246, - 0, 32768, 34816, 35328, 35200, 35232, 0, 32768, - 34816, 35328, 35200, 35264, 35248, 0, 32768, 34816, - 35328, 35200, 35264, 35248, 0, 32768, 34816, 35328, - 35200, 35264, 35248, 35250, 0, 32768, 34816, 35328, - 35200, 35264, 35248, 0, 32768, 34816, 35328, 35200, - 35264, 35248, 35252, 0, 32768, 34816, 35328, 35200, - 35264, 35248, 35252, 0, 32768, 34816, 35328, 35200, - 35264, 35248, 35256, 35254, 0, 32768, 34816, 35328, - 35200, 35264, 35248, 0, 32768, 34816, 35328, 35200, - 35264, 35265, 35256, 0, 32768, 34816, 35328, 35200, - 35264, 35265, 35256, 0, 32768, 34816, 35328, 35200, - 35264, 35265, 35256, 35258, 0, 32768, 34816, 35328, - 35200, 35264, 35265, 35256, 0, 32768, 34816, 35328, - 35200, 35264, 35265, 35256, 35260, 0, 32768, 34816, - 35328, 35200, 35264, 35265, 35267, 35260, 0, 32768, - 34816, 35328, 35200, 35264, 35265, 35267, 35260, 35262, - 0, 32768, 34816, 35328, 35200, 0, 32768, 34816, - 35328, 35329, 35264, 0, 32768, 34816, 35328, 35329, - 35264, 0, 32768, 34816, 35328, 35329, 35264, 35266, - 0, 32768, 34816, 35328, 35329, 35264, 0, 32768, - 34816, 35328, 35329, 35264, 35268, 0, 32768, 34816, - 35328, 35329, 35264, 35268, 0, 32768, 34816, 35328, - 35329, 35264, 35272, 35270, 0, 32768, 34816, 35328, - 35329, 35264, 0, 32768, 34816, 35328, 35329, 35264, - 35272, 0, 32768, 34816, 35328, 35329, 35264, 35272, - 0, 32768, 34816, 35328, 35329, 35264, 35272, 35274, - 0, 32768, 34816, 35328, 35329, 35264, 35272, 0, - 32768, 34816, 35328, 35329, 35264, 35280, 35276, 0, - 32768, 34816, 35328, 35329, 35264, 35280, 35276, 0, - 32768, 34816, 35328, 35329, 35264, 35280, 35281, 35278, - 0, 32768, 34816, 35328, 35329, 35264, 0, 32768, - 34816, 35328, 35329, 35264, 35280, 0, 32768, 34816, - 35328, 35329, 35264, 35280, 0, 32768, 34816, 35328, - 35329, 35264, 35280, 35282, 0, 32768, 34816, 35328, - 35329, 35264, 35280, 0, 32768, 34816, 35328, 35329, - 35264, 35280, 35284, 0, 32768, 34816, 35328, 35329, - 35264, 35280, 35284, 0, 32768, 34816, 35328, 35329, - 35264, 35280, 35288, 35286, 0, 32768, 34816, 35328, - 35329, 35264, 35280, 0, 32768, 34816, 35328, 35329, - 35264, 35296, 35288, 0, 32768, 34816, 35328, 35329, - 35264, 35296, 35288, 0, 32768, 34816, 35328, 35329, - 35264, 35296, 35288, 35290, 0, 32768, 34816, 35328, - 35329, 35264, 35296, 35288, 0, 32768, 34816, 35328, - 35329, 35264, 35296, 35297, 35292, 0, 32768, 34816, - 35328, 35329, 35264, 35296, 35297, 35292, 0, 32768, - 34816, 35328, 35329, 35264, 35296, 35297, 35292, 35294, - 0, 32768, 34816, 35328, 35329, 35264, 0, 32768, - 34816, 35328, 35329, 35264, 35296, 0, 32768, 34816, - 35328, 35329, 35331, 35296, 0, 32768, 34816, 35328, - 35329, 35331, 35296, 35298, 0, 32768, 34816, 35328, - 35329, 35331, 35296, 0, 32768, 34816, 35328, 35329, - 35331, 35296, 35300, 0, 32768, 34816, 35328, 35329, - 35331, 35296, 35300, 0, 32768, 34816, 35328, 35329, - 35331, 35296, 35304, 35302, 0, 32768, 34816, 35328, - 35329, 35331, 35296, 0, 32768, 34816, 35328, 35329, - 35331, 35296, 35304, 0, 32768, 34816, 35328, 35329, - 35331, 35296, 35304, 0, 32768, 34816, 35328, 35329, - 35331, 35296, 35304, 35306, 0, 32768, 34816, 35328, - 35329, 35331, 35296, 35304, 0, 32768, 34816, 35328, - 35329, 35331, 35296, 35312, 35308, 0, 32768, 34816, - 35328, 35329, 35331, 35296, 35312, 35308, 0, 32768, - 34816, 35328, 35329, 35331, 35296, 35312, 35313, 35310, - 0, 32768, 34816, 35328, 35329, 35331, 35296, 0, - 32768, 34816, 35328, 35329, 35331, 35296, 35312, 0, - 32768, 34816, 35328, 35329, 35331, 35296, 35312, 0, - 32768, 34816, 35328, 35329, 35331, 35296, 35312, 35314, - 0, 32768, 34816, 35328, 35329, 35331, 35335, 35312, - 0, 32768, 34816, 35328, 35329, 35331, 35335, 35312, - 35316, 0, 32768, 34816, 35328, 35329, 35331, 35335, - 35312, 35316, 0, 32768, 34816, 35328, 35329, 35331, - 35335, 35312, 35320, 35318, 0, 32768, 34816, 35328, - 35329, 35331, 35335, 35312, 0, 32768, 34816, 35328, - 35329, 35331, 35335, 35312, 35320, 0, 32768, 34816, - 35328, 35329, 35331, 35335, 35312, 35320, 0, 32768, - 34816, 35328, 35329, 35331, 35335, 35312, 35320, 35322, - 0, 32768, 34816, 35328, 35329, 35331, 35335, 35312, - 35320, 0, 32768, 34816, 35328, 35329, 35331, 35335, - 35312, 35320, 35324, 0, 32768, 34816, 35328, 35329, - 35331, 35335, 35312, 35320, 35324, 0, 32768, 34816, - 35328, 35329, 35331, 35335, 35312, 35320, 35324, 35326, - 0, 32768, 34816, 0, 32768, 34816, 35328, 0, - 32768, 34816, 35328, 0, 32768, 34816, 35328, 35330, - 0, 32768, 34816, 35328, 0, 32768, 34816, 35328, - 35332, 0, 32768, 34816, 35328, 35332, 0, 32768, - 34816, 35328, 35336, 35334, 0, 32768, 34816, 35328, - 0, 32768, 34816, 35328, 35336, 0, 32768, 34816, - 35328, 35336, 0, 32768, 34816, 35328, 35336, 35338, - 0, 32768, 34816, 35328, 35336, 0, 32768, 34816, - 35328, 35344, 35340, 0, 32768, 34816, 35328, 35344, - 35340, 0, 32768, 34816, 35328, 35344, 35345, 35342, - 0, 32768, 34816, 35328, 0, 32768, 34816, 35328, - 35344, 0, 32768, 34816, 35328, 35344, 0, 32768, - 34816, 35328, 35344, 35346, 0, 32768, 34816, 35328, - 35344, 0, 32768, 34816, 35328, 35344, 35348, 0, - 32768, 34816, 35328, 35344, 35348, 0, 32768, 34816, - 35328, 35344, 35352, 35350, 0, 32768, 34816, 35328, - 35344, 0, 32768, 34816, 35328, 35360, 35352, 0, - 32768, 34816, 35328, 35360, 35352, 0, 32768, 34816, - 35328, 35360, 35352, 35354, 0, 32768, 34816, 35328, - 35360, 35352, 0, 32768, 34816, 35328, 35360, 35361, - 35356, 0, 32768, 34816, 35328, 35360, 35361, 35356, - 0, 32768, 34816, 35328, 35360, 35361, 35356, 35358, - 0, 32768, 34816, 35328, 0, 32768, 34816, 35328, - 35360, 0, 32768, 34816, 35328, 35360, 0, 32768, - 34816, 35328, 35360, 35362, 0, 32768, 34816, 35328, - 35360, 0, 32768, 34816, 35328, 35360, 35364, 0, - 32768, 34816, 35328, 35360, 35364, 0, 32768, 34816, - 35328, 35360, 35368, 35366, 0, 32768, 34816, 35328, - 35360, 0, 32768, 34816, 35328, 35360, 35368, 0, - 32768, 34816, 35328, 35360, 35368, 0, 32768, 34816, - 35328, 35360, 35368, 35370, 0, 32768, 34816, 35328, - 35360, 35368, 0, 32768, 34816, 35328, 35360, 35376, - 35372, 0, 32768, 34816, 35328, 35360, 35376, 35372, - 0, 32768, 34816, 35328, 35360, 35376, 35377, 35374, - 0, 32768, 34816, 35328, 35360, 0, 32768, 34816, - 35328, 35392, 35376, 0, 32768, 34816, 35328, 35392, - 35376, 0, 32768, 34816, 35328, 35392, 35376, 35378, - 0, 32768, 34816, 35328, 35392, 35376, 0, 32768, - 34816, 35328, 35392, 35376, 35380, 0, 32768, 34816, - 35328, 35392, 35376, 35380, 0, 32768, 34816, 35328, - 35392, 35376, 35384, 35382, 0, 32768, 34816, 35328, - 35392, 35376, 0, 32768, 34816, 35328, 35392, 35393, - 35384, 0, 32768, 34816, 35328, 35392, 35393, 35384, - 0, 32768, 34816, 35328, 35392, 35393, 35384, 35386, - 0, 32768, 34816, 35328, 35392, 35393, 35384, 0, - 32768, 34816, 35328, 35392, 35393, 35384, 35388, 0, - 32768, 34816, 35328, 35392, 35393, 35395, 35388, 0, - 32768, 34816, 35328, 35392, 35393, 35395, 35388, 35390, - 0, 32768, 34816, 35328, 0, 32768, 34816, 35328, - 35392, 0, 32768, 34816, 35328, 35392, 0, 32768, - 34816, 35328, 35392, 35394, 0, 32768, 34816, 35328, - 35392, 0, 32768, 34816, 35328, 35392, 35396, 0, - 32768, 34816, 35328, 35392, 35396, 0, 32768, 34816, - 35328, 35392, 35400, 35398, 0, 32768, 34816, 35328, - 35392, 0, 32768, 34816, 35328, 35392, 35400, 0, - 32768, 34816, 35328, 35392, 35400, 0, 32768, 34816, - 35328, 35392, 35400, 35402, 0, 32768, 34816, 35328, - 35392, 35400, 0, 32768, 34816, 35328, 35392, 35408, - 35404, 0, 32768, 34816, 35328, 35392, 35408, 35404, - 0, 32768, 34816, 35328, 35392, 35408, 35409, 35406, - 0, 32768, 34816, 35328, 35392, 0, 32768, 34816, - 35328, 35392, 35408, 0, 32768, 34816, 35328, 35392, - 35408, 0, 32768, 34816, 35328, 35392, 35408, 35410, - 0, 32768, 34816, 35328, 35392, 35408, 0, 32768, - 34816, 35328, 35392, 35408, 35412, 0, 32768, 34816, - 35328, 35392, 35408, 35412, 0, 32768, 34816, 35328, - 35392, 35408, 35416, 35414, 0, 32768, 34816, 35328, - 35392, 35408, 0, 32768, 34816, 35328, 35392, 35424, - 35416, 0, 32768, 34816, 35328, 35392, 35424, 35416, - 0, 32768, 34816, 35328, 35392, 35424, 35416, 35418, - 0, 32768, 34816, 35328, 35392, 35424, 35416, 0, - 32768, 34816, 35328, 35392, 35424, 35425, 35420, 0, - 32768, 34816, 35328, 35392, 35424, 35425, 35420, 0, - 32768, 34816, 35328, 35392, 35424, 35425, 35420, 35422, - 0, 32768, 34816, 35328, 35392, 0, 32768, 34816, - 35328, 35456, 35424, 0, 32768, 34816, 35328, 35456, - 35424, 0, 32768, 34816, 35328, 35456, 35424, 35426, - 0, 32768, 34816, 35328, 35456, 35424, 0, 32768, - 34816, 35328, 35456, 35424, 35428, 0, 32768, 34816, - 35328, 35456, 35424, 35428, 0, 32768, 34816, 35328, - 35456, 35424, 35432, 35430, 0, 32768, 34816, 35328, - 35456, 35424, 0, 32768, 34816, 35328, 35456, 35424, - 35432, 0, 32768, 34816, 35328, 35456, 35424, 35432, - 0, 32768, 34816, 35328, 35456, 35424, 35432, 35434, - 0, 32768, 34816, 35328, 35456, 35424, 35432, 0, - 32768, 34816, 35328, 35456, 35424, 35440, 35436, 0, - 32768, 34816, 35328, 35456, 35424, 35440, 35436, 0, - 32768, 34816, 35328, 35456, 35424, 35440, 35441, 35438, - 0, 32768, 34816, 35328, 35456, 35424, 0, 32768, - 34816, 35328, 35456, 35457, 35440, 0, 32768, 34816, - 35328, 35456, 35457, 35440, 0, 32768, 34816, 35328, - 35456, 35457, 35440, 35442, 0, 32768, 34816, 35328, - 35456, 35457, 35440, 0, 32768, 34816, 35328, 35456, - 35457, 35440, 35444, 0, 32768, 34816, 35328, 35456, - 35457, 35440, 35444, 0, 32768, 34816, 35328, 35456, - 35457, 35440, 35448, 35446, 0, 32768, 34816, 35328, - 35456, 35457, 35440, 0, 32768, 34816, 35328, 35456, - 35457, 35440, 35448, 0, 32768, 34816, 35328, 35456, - 35457, 35459, 35448, 0, 32768, 34816, 35328, 35456, - 35457, 35459, 35448, 35450, 0, 32768, 34816, 35328, - 35456, 35457, 35459, 35448, 0, 32768, 34816, 35328, - 35456, 35457, 35459, 35448, 35452, 0, 32768, 34816, - 35328, 35456, 35457, 35459, 35448, 35452, 0, 32768, - 34816, 35328, 35456, 35457, 35459, 35448, 35452, 35454, - 0, 32768, 34816, 35328, 0, 32768, 34816, 35328, - 35456, 0, 32768, 34816, 35328, 35456, 0, 32768, - 34816, 35328, 35456, 35458, 0, 32768, 34816, 35328, - 35456, 0, 32768, 34816, 35328, 35456, 35460, 0, - 32768, 34816, 35328, 35456, 35460, 0, 32768, 34816, - 35328, 35456, 35464, 35462, 0, 32768, 34816, 35328, - 35456, 0, 32768, 34816, 35328, 35456, 35464, 0, - 32768, 34816, 35328, 35456, 35464, 0, 32768, 34816, - 35328, 35456, 35464, 35466, 0, 32768, 34816, 35328, - 35456, 35464, 0, 32768, 34816, 35328, 35456, 35472, - 35468, 0, 32768, 34816, 35328, 35456, 35472, 35468, - 0, 32768, 34816, 35328, 35456, 35472, 35473, 35470, - 0, 32768, 34816, 35328, 35456, 0, 32768, 34816, - 35328, 35456, 35472, 0, 32768, 34816, 35328, 35456, - 35472, 0, 32768, 34816, 35328, 35456, 35472, 35474, - 0, 32768, 34816, 35328, 35456, 35472, 0, 32768, - 34816, 35328, 35456, 35472, 35476, 0, 32768, 34816, - 35328, 35456, 35472, 35476, 0, 32768, 34816, 35328, - 35456, 35472, 35480, 35478, 0, 32768, 34816, 35328, - 35456, 35472, 0, 32768, 34816, 35328, 35456, 35488, - 35480, 0, 32768, 34816, 35328, 35456, 35488, 35480, - 0, 32768, 34816, 35328, 35456, 35488, 35480, 35482, - 0, 32768, 34816, 35328, 35456, 35488, 35480, 0, - 32768, 34816, 35328, 35456, 35488, 35489, 35484, 0, - 32768, 34816, 35328, 35456, 35488, 35489, 35484, 0, - 32768, 34816, 35328, 35456, 35488, 35489, 35484, 35486, - 0, 32768, 34816, 35328, 35456, 0, 32768, 34816, - 35328, 35456, 35488, 0, 32768, 34816, 35328, 35456, - 35488, 0, 32768, 34816, 35328, 35456, 35488, 35490, - 0, 32768, 34816, 35328, 35456, 35488, 0, 32768, - 34816, 35328, 35456, 35488, 35492, 0, 32768, 34816, - 35328, 35456, 35488, 35492, 0, 32768, 34816, 35328, - 35456, 35488, 35496, 35494, 0, 32768, 34816, 35328, - 35456, 35488, 0, 32768, 34816, 35328, 35456, 35488, - 35496, 0, 32768, 34816, 35328, 35456, 35488, 35496, - 0, 32768, 34816, 35328, 35456, 35488, 35496, 35498, - 0, 32768, 34816, 35328, 35456, 35488, 35496, 0, - 32768, 34816, 35328, 35456, 35488, 35504, 35500, 0, - 32768, 34816, 35328, 35456, 35488, 35504, 35500, 0, - 32768, 34816, 35328, 35456, 35488, 35504, 35505, 35502, - 0, 32768, 34816, 35328, 35456, 35488, 0, 32768, - 34816, 35328, 35456, 35520, 35504, 0, 32768, 34816, - 35328, 35456, 35520, 35504, 0, 32768, 34816, 35328, - 35456, 35520, 35504, 35506, 0, 32768, 34816, 35328, - 35456, 35520, 35504, 0, 32768, 34816, 35328, 35456, - 35520, 35504, 35508, 0, 32768, 34816, 35328, 35456, - 35520, 35504, 35508, 0, 32768, 34816, 35328, 35456, - 35520, 35504, 35512, 35510, 0, 32768, 34816, 35328, - 35456, 35520, 35504, 0, 32768, 34816, 35328, 35456, - 35520, 35521, 35512, 0, 32768, 34816, 35328, 35456, - 35520, 35521, 35512, 0, 32768, 34816, 35328, 35456, - 35520, 35521, 35512, 35514, 0, 32768, 34816, 35328, - 35456, 35520, 35521, 35512, 0, 32768, 34816, 35328, - 35456, 35520, 35521, 35512, 35516, 0, 32768, 34816, - 35328, 35456, 35520, 35521, 35523, 35516, 0, 32768, - 34816, 35328, 35456, 35520, 35521, 35523, 35516, 35518, - 0, 32768, 34816, 35328, 35456, 0, 32768, 34816, - 35328, 35584, 35520, 0, 32768, 34816, 35328, 35584, - 35520, 0, 32768, 34816, 35328, 35584, 35520, 35522, - 0, 32768, 34816, 35328, 35584, 35520, 0, 32768, - 34816, 35328, 35584, 35520, 35524, 0, 32768, 34816, - 35328, 35584, 35520, 35524, 0, 32768, 34816, 35328, - 35584, 35520, 35528, 35526, 0, 32768, 34816, 35328, - 35584, 35520, 0, 32768, 34816, 35328, 35584, 35520, - 35528, 0, 32768, 34816, 35328, 35584, 35520, 35528, - 0, 32768, 34816, 35328, 35584, 35520, 35528, 35530, - 0, 32768, 34816, 35328, 35584, 35520, 35528, 0, - 32768, 34816, 35328, 35584, 35520, 35536, 35532, 0, - 32768, 34816, 35328, 35584, 35520, 35536, 35532, 0, - 32768, 34816, 35328, 35584, 35520, 35536, 35537, 35534, - 0, 32768, 34816, 35328, 35584, 35520, 0, 32768, - 34816, 35328, 35584, 35520, 35536, 0, 32768, 34816, - 35328, 35584, 35520, 35536, 0, 32768, 34816, 35328, - 35584, 35520, 35536, 35538, 0, 32768, 34816, 35328, - 35584, 35520, 35536, 0, 32768, 34816, 35328, 35584, - 35520, 35536, 35540, 0, 32768, 34816, 35328, 35584, - 35520, 35536, 35540, 0, 32768, 34816, 35328, 35584, - 35520, 35536, 35544, 35542, 0, 32768, 34816, 35328, - 35584, 35520, 35536, 0, 32768, 34816, 35328, 35584, - 35520, 35552, 35544, 0, 32768, 34816, 35328, 35584, - 35520, 35552, 35544, 0, 32768, 34816, 35328, 35584, - 35520, 35552, 35544, 35546, 0, 32768, 34816, 35328, - 35584, 35520, 35552, 35544, 0, 32768, 34816, 35328, - 35584, 35520, 35552, 35553, 35548, 0, 32768, 34816, - 35328, 35584, 35520, 35552, 35553, 35548, 0, 32768, - 34816, 35328, 35584, 35520, 35552, 35553, 35548, 35550, - 0, 32768, 34816, 35328, 35584, 35520, 0, 32768, - 34816, 35328, 35584, 35585, 35552, 0, 32768, 34816, - 35328, 35584, 35585, 35552, 0, 32768, 34816, 35328, - 35584, 35585, 35552, 35554, 0, 32768, 34816, 35328, - 35584, 35585, 35552, 0, 32768, 34816, 35328, 35584, - 35585, 35552, 35556, 0, 32768, 34816, 35328, 35584, - 35585, 35552, 35556, 0, 32768, 34816, 35328, 35584, - 35585, 35552, 35560, 35558, 0, 32768, 34816, 35328, - 35584, 35585, 35552, 0, 32768, 34816, 35328, 35584, - 35585, 35552, 35560, 0, 32768, 34816, 35328, 35584, - 35585, 35552, 35560, 0, 32768, 34816, 35328, 35584, - 35585, 35552, 35560, 35562, 0, 32768, 34816, 35328, - 35584, 35585, 35552, 35560, 0, 32768, 34816, 35328, - 35584, 35585, 35552, 35568, 35564, 0, 32768, 34816, - 35328, 35584, 35585, 35552, 35568, 35564, 0, 32768, - 34816, 35328, 35584, 35585, 35552, 35568, 35569, 35566, - 0, 32768, 34816, 35328, 35584, 35585, 35552, 0, - 32768, 34816, 35328, 35584, 35585, 35552, 35568, 0, - 32768, 34816, 35328, 35584, 35585, 35587, 35568, 0, - 32768, 34816, 35328, 35584, 35585, 35587, 35568, 35570, - 0, 32768, 34816, 35328, 35584, 35585, 35587, 35568, - 0, 32768, 34816, 35328, 35584, 35585, 35587, 35568, - 35572, 0, 32768, 34816, 35328, 35584, 35585, 35587, - 35568, 35572, 0, 32768, 34816, 35328, 35584, 35585, - 35587, 35568, 35576, 35574, 0, 32768, 34816, 35328, - 35584, 35585, 35587, 35568, 0, 32768, 34816, 35328, - 35584, 35585, 35587, 35568, 35576, 0, 32768, 34816, - 35328, 35584, 35585, 35587, 35568, 35576, 0, 32768, - 34816, 35328, 35584, 35585, 35587, 35568, 35576, 35578, - 0, 32768, 34816, 35328, 35584, 35585, 35587, 35591, - 35576, 0, 32768, 34816, 35328, 35584, 35585, 35587, - 35591, 35576, 35580, 0, 32768, 34816, 35328, 35584, - 35585, 35587, 35591, 35576, 35580, 0, 32768, 34816, - 35328, 35584, 35585, 35587, 35591, 35576, 35580, 35582, - 0, 32768, 34816, 35328, 0, 32768, 34816, 35840, - 35584, 0, 32768, 34816, 35840, 35584, 0, 32768, - 34816, 35840, 35584, 35586, 0, 32768, 34816, 35840, - 35584, 0, 32768, 34816, 35840, 35584, 35588, 0, - 32768, 34816, 35840, 35584, 35588, 0, 32768, 34816, - 35840, 35584, 35592, 35590, 0, 32768, 34816, 35840, - 35584, 0, 32768, 34816, 35840, 35584, 35592, 0, - 32768, 34816, 35840, 35584, 35592, 0, 32768, 34816, - 35840, 35584, 35592, 35594, 0, 32768, 34816, 35840, - 35584, 35592, 0, 32768, 34816, 35840, 35584, 35600, - 35596, 0, 32768, 34816, 35840, 35584, 35600, 35596, - 0, 32768, 34816, 35840, 35584, 35600, 35601, 35598, - 0, 32768, 34816, 35840, 35584, 0, 32768, 34816, - 35840, 35584, 35600, 0, 32768, 34816, 35840, 35584, - 35600, 0, 32768, 34816, 35840, 35584, 35600, 35602, - 0, 32768, 34816, 35840, 35584, 35600, 0, 32768, - 34816, 35840, 35584, 35600, 35604, 0, 32768, 34816, - 35840, 35584, 35600, 35604, 0, 32768, 34816, 35840, - 35584, 35600, 35608, 35606, 0, 32768, 34816, 35840, - 35584, 35600, 0, 32768, 34816, 35840, 35584, 35616, - 35608, 0, 32768, 34816, 35840, 35584, 35616, 35608, - 0, 32768, 34816, 35840, 35584, 35616, 35608, 35610, - 0, 32768, 34816, 35840, 35584, 35616, 35608, 0, - 32768, 34816, 35840, 35584, 35616, 35617, 35612, 0, - 32768, 34816, 35840, 35584, 35616, 35617, 35612, 0, - 32768, 34816, 35840, 35584, 35616, 35617, 35612, 35614, - 0, 32768, 34816, 35840, 35584, 0, 32768, 34816, - 35840, 35584, 35616, 0, 32768, 34816, 35840, 35584, - 35616, 0, 32768, 34816, 35840, 35584, 35616, 35618, - 0, 32768, 34816, 35840, 35584, 35616, 0, 32768, - 34816, 35840, 35584, 35616, 35620, 0, 32768, 34816, - 35840, 35584, 35616, 35620, 0, 32768, 34816, 35840, - 35584, 35616, 35624, 35622, 0, 32768, 34816, 35840, - 35584, 35616, 0, 32768, 34816, 35840, 35584, 35616, - 35624, 0, 32768, 34816, 35840, 35584, 35616, 35624, - 0, 32768, 34816, 35840, 35584, 35616, 35624, 35626, - 0, 32768, 34816, 35840, 35584, 35616, 35624, 0, - 32768, 34816, 35840, 35584, 35616, 35632, 35628, 0, - 32768, 34816, 35840, 35584, 35616, 35632, 35628, 0, - 32768, 34816, 35840, 35584, 35616, 35632, 35633, 35630, - 0, 32768, 34816, 35840, 35584, 35616, 0, 32768, - 34816, 35840, 35584, 35648, 35632, 0, 32768, 34816, - 35840, 35584, 35648, 35632, 0, 32768, 34816, 35840, - 35584, 35648, 35632, 35634, 0, 32768, 34816, 35840, - 35584, 35648, 35632, 0, 32768, 34816, 35840, 35584, - 35648, 35632, 35636, 0, 32768, 34816, 35840, 35584, - 35648, 35632, 35636, 0, 32768, 34816, 35840, 35584, - 35648, 35632, 35640, 35638, 0, 32768, 34816, 35840, - 35584, 35648, 35632, 0, 32768, 34816, 35840, 35584, - 35648, 35649, 35640, 0, 32768, 34816, 35840, 35584, - 35648, 35649, 35640, 0, 32768, 34816, 35840, 35584, - 35648, 35649, 35640, 35642, 0, 32768, 34816, 35840, - 35584, 35648, 35649, 35640, 0, 32768, 34816, 35840, - 35584, 35648, 35649, 35640, 35644, 0, 32768, 34816, - 35840, 35584, 35648, 35649, 35651, 35644, 0, 32768, - 34816, 35840, 35584, 35648, 35649, 35651, 35644, 35646, - 0, 32768, 34816, 35840, 35584, 0, 32768, 34816, - 35840, 35584, 35648, 0, 32768, 34816, 35840, 35584, - 35648, 0, 32768, 34816, 35840, 35584, 35648, 35650, - 0, 32768, 34816, 35840, 35584, 35648, 0, 32768, - 34816, 35840, 35584, 35648, 35652, 0, 32768, 34816, - 35840, 35584, 35648, 35652, 0, 32768, 34816, 35840, - 35584, 35648, 35656, 35654, 0, 32768, 34816, 35840, - 35584, 35648, 0, 32768, 34816, 35840, 35584, 35648, - 35656, 0, 32768, 34816, 35840, 35584, 35648, 35656, - 0, 32768, 34816, 35840, 35584, 35648, 35656, 35658, - 0, 32768, 34816, 35840, 35584, 35648, 35656, 0, - 32768, 34816, 35840, 35584, 35648, 35664, 35660, 0, - 32768, 34816, 35840, 35584, 35648, 35664, 35660, 0, - 32768, 34816, 35840, 35584, 35648, 35664, 35665, 35662, - 0, 32768, 34816, 35840, 35584, 35648, 0, 32768, - 34816, 35840, 35584, 35648, 35664, 0, 32768, 34816, - 35840, 35584, 35648, 35664, 0, 32768, 34816, 35840, - 35584, 35648, 35664, 35666, 0, 32768, 34816, 35840, - 35584, 35648, 35664, 0, 32768, 34816, 35840, 35584, - 35648, 35664, 35668, 0, 32768, 34816, 35840, 35584, - 35648, 35664, 35668, 0, 32768, 34816, 35840, 35584, - 35648, 35664, 35672, 35670, 0, 32768, 34816, 35840, - 35584, 35648, 35664, 0, 32768, 34816, 35840, 35584, - 35648, 35680, 35672, 0, 32768, 34816, 35840, 35584, - 35648, 35680, 35672, 0, 32768, 34816, 35840, 35584, - 35648, 35680, 35672, 35674, 0, 32768, 34816, 35840, - 35584, 35648, 35680, 35672, 0, 32768, 34816, 35840, - 35584, 35648, 35680, 35681, 35676, 0, 32768, 34816, - 35840, 35584, 35648, 35680, 35681, 35676, 0, 32768, - 34816, 35840, 35584, 35648, 35680, 35681, 35676, 35678, - 0, 32768, 34816, 35840, 35584, 35648, 0, 32768, - 34816, 35840, 35584, 35712, 35680, 0, 32768, 34816, - 35840, 35584, 35712, 35680, 0, 32768, 34816, 35840, - 35584, 35712, 35680, 35682, 0, 32768, 34816, 35840, - 35584, 35712, 35680, 0, 32768, 34816, 35840, 35584, - 35712, 35680, 35684, 0, 32768, 34816, 35840, 35584, - 35712, 35680, 35684, 0, 32768, 34816, 35840, 35584, - 35712, 35680, 35688, 35686, 0, 32768, 34816, 35840, - 35584, 35712, 35680, 0, 32768, 34816, 35840, 35584, - 35712, 35680, 35688, 0, 32768, 34816, 35840, 35584, - 35712, 35680, 35688, 0, 32768, 34816, 35840, 35584, - 35712, 35680, 35688, 35690, 0, 32768, 34816, 35840, - 35584, 35712, 35680, 35688, 0, 32768, 34816, 35840, - 35584, 35712, 35680, 35696, 35692, 0, 32768, 34816, - 35840, 35584, 35712, 35680, 35696, 35692, 0, 32768, - 34816, 35840, 35584, 35712, 35680, 35696, 35697, 35694, - 0, 32768, 34816, 35840, 35584, 35712, 35680, 0, - 32768, 34816, 35840, 35584, 35712, 35713, 35696, 0, - 32768, 34816, 35840, 35584, 35712, 35713, 35696, 0, - 32768, 34816, 35840, 35584, 35712, 35713, 35696, 35698, - 0, 32768, 34816, 35840, 35584, 35712, 35713, 35696, - 0, 32768, 34816, 35840, 35584, 35712, 35713, 35696, - 35700, 0, 32768, 34816, 35840, 35584, 35712, 35713, - 35696, 35700, 0, 32768, 34816, 35840, 35584, 35712, - 35713, 35696, 35704, 35702, 0, 32768, 34816, 35840, - 35584, 35712, 35713, 35696, 0, 32768, 34816, 35840, - 35584, 35712, 35713, 35696, 35704, 0, 32768, 34816, - 35840, 35584, 35712, 35713, 35715, 35704, 0, 32768, - 34816, 35840, 35584, 35712, 35713, 35715, 35704, 35706, - 0, 32768, 34816, 35840, 35584, 35712, 35713, 35715, - 35704, 0, 32768, 34816, 35840, 35584, 35712, 35713, - 35715, 35704, 35708, 0, 32768, 34816, 35840, 35584, - 35712, 35713, 35715, 35704, 35708, 0, 32768, 34816, - 35840, 35584, 35712, 35713, 35715, 35704, 35708, 35710, - 0, 32768, 34816, 35840, 35584, 0, 32768, 34816, - 35840, 35584, 35712, 0, 32768, 34816, 35840, 35841, - 35712, 0, 32768, 34816, 35840, 35841, 35712, 35714, - 0, 32768, 34816, 35840, 35841, 35712, 0, 32768, - 34816, 35840, 35841, 35712, 35716, 0, 32768, 34816, - 35840, 35841, 35712, 35716, 0, 32768, 34816, 35840, - 35841, 35712, 35720, 35718, 0, 32768, 34816, 35840, - 35841, 35712, 0, 32768, 34816, 35840, 35841, 35712, - 35720, 0, 32768, 34816, 35840, 35841, 35712, 35720, - 0, 32768, 34816, 35840, 35841, 35712, 35720, 35722, - 0, 32768, 34816, 35840, 35841, 35712, 35720, 0, - 32768, 34816, 35840, 35841, 35712, 35728, 35724, 0, - 32768, 34816, 35840, 35841, 35712, 35728, 35724, 0, - 32768, 34816, 35840, 35841, 35712, 35728, 35729, 35726, - 0, 32768, 34816, 35840, 35841, 35712, 0, 32768, - 34816, 35840, 35841, 35712, 35728, 0, 32768, 34816, - 35840, 35841, 35712, 35728, 0, 32768, 34816, 35840, - 35841, 35712, 35728, 35730, 0, 32768, 34816, 35840, - 35841, 35712, 35728, 0, 32768, 34816, 35840, 35841, - 35712, 35728, 35732, 0, 32768, 34816, 35840, 35841, - 35712, 35728, 35732, 0, 32768, 34816, 35840, 35841, - 35712, 35728, 35736, 35734, 0, 32768, 34816, 35840, - 35841, 35712, 35728, 0, 32768, 34816, 35840, 35841, - 35712, 35744, 35736, 0, 32768, 34816, 35840, 35841, - 35712, 35744, 35736, 0, 32768, 34816, 35840, 35841, - 35712, 35744, 35736, 35738, 0, 32768, 34816, 35840, - 35841, 35712, 35744, 35736, 0, 32768, 34816, 35840, - 35841, 35712, 35744, 35745, 35740, 0, 32768, 34816, - 35840, 35841, 35712, 35744, 35745, 35740, 0, 32768, - 34816, 35840, 35841, 35712, 35744, 35745, 35740, 35742, - 0, 32768, 34816, 35840, 35841, 35712, 0, 32768, - 34816, 35840, 35841, 35712, 35744, 0, 32768, 34816, - 35840, 35841, 35712, 35744, 0, 32768, 34816, 35840, - 35841, 35712, 35744, 35746, 0, 32768, 34816, 35840, - 35841, 35712, 35744, 0, 32768, 34816, 35840, 35841, - 35712, 35744, 35748, 0, 32768, 34816, 35840, 35841, - 35712, 35744, 35748, 0, 32768, 34816, 35840, 35841, - 35712, 35744, 35752, 35750, 0, 32768, 34816, 35840, - 35841, 35712, 35744, 0, 32768, 34816, 35840, 35841, - 35712, 35744, 35752, 0, 32768, 34816, 35840, 35841, - 35712, 35744, 35752, 0, 32768, 34816, 35840, 35841, - 35712, 35744, 35752, 35754, 0, 32768, 34816, 35840, - 35841, 35712, 35744, 35752, 0, 32768, 34816, 35840, - 35841, 35712, 35744, 35760, 35756, 0, 32768, 34816, - 35840, 35841, 35712, 35744, 35760, 35756, 0, 32768, - 34816, 35840, 35841, 35712, 35744, 35760, 35761, 35758, - 0, 32768, 34816, 35840, 35841, 35712, 35744, 0, - 32768, 34816, 35840, 35841, 35712, 35776, 35760, 0, - 32768, 34816, 35840, 35841, 35712, 35776, 35760, 0, - 32768, 34816, 35840, 35841, 35712, 35776, 35760, 35762, - 0, 32768, 34816, 35840, 35841, 35712, 35776, 35760, - 0, 32768, 34816, 35840, 35841, 35712, 35776, 35760, - 35764, 0, 32768, 34816, 35840, 35841, 35712, 35776, - 35760, 35764, 0, 32768, 34816, 35840, 35841, 35712, - 35776, 35760, 35768, 35766, 0, 32768, 34816, 35840, - 35841, 35712, 35776, 35760, 0, 32768, 34816, 35840, - 35841, 35712, 35776, 35777, 35768, 0, 32768, 34816, - 35840, 35841, 35712, 35776, 35777, 35768, 0, 32768, - 34816, 35840, 35841, 35712, 35776, 35777, 35768, 35770, - 0, 32768, 34816, 35840, 35841, 35712, 35776, 35777, - 35768, 0, 32768, 34816, 35840, 35841, 35712, 35776, - 35777, 35768, 35772, 0, 32768, 34816, 35840, 35841, - 35712, 35776, 35777, 35779, 35772, 0, 32768, 34816, - 35840, 35841, 35712, 35776, 35777, 35779, 35772, 35774, - 0, 32768, 34816, 35840, 35841, 35712, 0, 32768, - 34816, 35840, 35841, 35712, 35776, 0, 32768, 34816, - 35840, 35841, 35712, 35776, 0, 32768, 34816, 35840, - 35841, 35712, 35776, 35778, 0, 32768, 34816, 35840, - 35841, 35843, 35776, 0, 32768, 34816, 35840, 35841, - 35843, 35776, 35780, 0, 32768, 34816, 35840, 35841, - 35843, 35776, 35780, 0, 32768, 34816, 35840, 35841, - 35843, 35776, 35784, 35782, 0, 32768, 34816, 35840, - 35841, 35843, 35776, 0, 32768, 34816, 35840, 35841, - 35843, 35776, 35784, 0, 32768, 34816, 35840, 35841, - 35843, 35776, 35784, 0, 32768, 34816, 35840, 35841, - 35843, 35776, 35784, 35786, 0, 32768, 34816, 35840, - 35841, 35843, 35776, 35784, 0, 32768, 34816, 35840, - 35841, 35843, 35776, 35792, 35788, 0, 32768, 34816, - 35840, 35841, 35843, 35776, 35792, 35788, 0, 32768, - 34816, 35840, 35841, 35843, 35776, 35792, 35793, 35790, - 0, 32768, 34816, 35840, 35841, 35843, 35776, 0, - 32768, 34816, 35840, 35841, 35843, 35776, 35792, 0, - 32768, 34816, 35840, 35841, 35843, 35776, 35792, 0, - 32768, 34816, 35840, 35841, 35843, 35776, 35792, 35794, - 0, 32768, 34816, 35840, 35841, 35843, 35776, 35792, - 0, 32768, 34816, 35840, 35841, 35843, 35776, 35792, - 35796, 0, 32768, 34816, 35840, 35841, 35843, 35776, - 35792, 35796, 0, 32768, 34816, 35840, 35841, 35843, - 35776, 35792, 35800, 35798, 0, 32768, 34816, 35840, - 35841, 35843, 35776, 35792, 0, 32768, 34816, 35840, - 35841, 35843, 35776, 35808, 35800, 0, 32768, 34816, - 35840, 35841, 35843, 35776, 35808, 35800, 0, 32768, - 34816, 35840, 35841, 35843, 35776, 35808, 35800, 35802, - 0, 32768, 34816, 35840, 35841, 35843, 35776, 35808, - 35800, 0, 32768, 34816, 35840, 35841, 35843, 35776, - 35808, 35809, 35804, 0, 32768, 34816, 35840, 35841, - 35843, 35776, 35808, 35809, 35804, 0, 32768, 34816, - 35840, 35841, 35843, 35776, 35808, 35809, 35804, 35806, - 0, 32768, 34816, 35840, 35841, 35843, 35776, 0, - 32768, 34816, 35840, 35841, 35843, 35776, 35808, 0, - 32768, 34816, 35840, 35841, 35843, 35776, 35808, 0, - 32768, 34816, 35840, 35841, 35843, 35776, 35808, 35810, - 0, 32768, 34816, 35840, 35841, 35843, 35776, 35808, - 0, 32768, 34816, 35840, 35841, 35843, 35776, 35808, - 35812, 0, 32768, 34816, 35840, 35841, 35843, 35776, - 35808, 35812, 0, 32768, 34816, 35840, 35841, 35843, - 35776, 35808, 35816, 35814, 0, 32768, 34816, 35840, - 35841, 35843, 35847, 35808, 0, 32768, 34816, 35840, - 35841, 35843, 35847, 35808, 35816, 0, 32768, 34816, - 35840, 35841, 35843, 35847, 35808, 35816, 0, 32768, - 34816, 35840, 35841, 35843, 35847, 35808, 35816, 35818, - 0, 32768, 34816, 35840, 35841, 35843, 35847, 35808, - 35816, 0, 32768, 34816, 35840, 35841, 35843, 35847, - 35808, 35824, 35820, 0, 32768, 34816, 35840, 35841, - 35843, 35847, 35808, 35824, 35820, 0, 32768, 34816, - 35840, 35841, 35843, 35847, 35808, 35824, 35825, 35822, - 0, 32768, 34816, 35840, 35841, 35843, 35847, 35808, - 0, 32768, 34816, 35840, 35841, 35843, 35847, 35808, - 35824, 0, 32768, 34816, 35840, 35841, 35843, 35847, - 35808, 35824, 0, 32768, 34816, 35840, 35841, 35843, - 35847, 35808, 35824, 35826, 0, 32768, 34816, 35840, - 35841, 35843, 35847, 35808, 35824, 0, 32768, 34816, - 35840, 35841, 35843, 35847, 35808, 35824, 35828, 0, - 32768, 34816, 35840, 35841, 35843, 35847, 35808, 35824, - 35828, 0, 32768, 34816, 35840, 35841, 35843, 35847, - 35808, 35824, 35832, 35830, 0, 32768, 34816, 35840, - 35841, 35843, 35847, 35808, 35824, 0, 32768, 34816, - 35840, 35841, 35843, 35847, 35808, 35824, 35832, 0, - 32768, 34816, 35840, 35841, 35843, 35847, 35808, 35824, - 35832, 0, 32768, 34816, 35840, 35841, 35843, 35847, - 35808, 35824, 35832, 35834, 0, 32768, 34816, 35840, - 35841, 35843, 35847, 35808, 35824, 35832, 0, 32768, - 34816, 35840, 35841, 35843, 35847, 35808, 35824, 35832, - 35836, 0, 32768, 34816, 35840, 35841, 35843, 35847, - 35808, 35824, 35832, 35836, 0, 32768, 34816, 35840, - 35841, 35843, 35847, 35808, 35824, 35832, 35836, 35838, - 0, 32768, 34816, 0, 32768, 34816, 35840, 0, - 32768, 34816, 35840, 0, 32768, 34816, 35840, 35842, - 0, 32768, 34816, 35840, 0, 32768, 34816, 35840, - 35844, 0, 32768, 34816, 35840, 35844, 0, 32768, - 34816, 35840, 35848, 35846, 0, 32768, 34816, 35840, - 0, 32768, 34816, 35840, 35848, 0, 32768, 34816, - 35840, 35848, 0, 32768, 34816, 35840, 35848, 35850, - 0, 32768, 34816, 35840, 35848, 0, 32768, 34816, - 35840, 35856, 35852, 0, 32768, 34816, 35840, 35856, - 35852, 0, 32768, 34816, 35840, 35856, 35857, 35854, - 0, 32768, 34816, 35840, 0, 32768, 34816, 35840, - 35856, 0, 32768, 34816, 35840, 35856, 0, 32768, - 34816, 35840, 35856, 35858, 0, 32768, 34816, 35840, - 35856, 0, 32768, 34816, 35840, 35856, 35860, 0, - 32768, 34816, 35840, 35856, 35860, 0, 32768, 34816, - 35840, 35856, 35864, 35862, 0, 32768, 34816, 35840, - 35856, 0, 32768, 34816, 35840, 35872, 35864, 0, - 32768, 34816, 35840, 35872, 35864, 0, 32768, 34816, - 35840, 35872, 35864, 35866, 0, 32768, 34816, 35840, - 35872, 35864, 0, 32768, 34816, 35840, 35872, 35873, - 35868, 0, 32768, 34816, 35840, 35872, 35873, 35868, - 0, 32768, 34816, 35840, 35872, 35873, 35868, 35870, - 0, 32768, 34816, 35840, 0, 32768, 34816, 35840, - 35872, 0, 32768, 34816, 35840, 35872, 0, 32768, - 34816, 35840, 35872, 35874, 0, 32768, 34816, 35840, - 35872, 0, 32768, 34816, 35840, 35872, 35876, 0, - 32768, 34816, 35840, 35872, 35876, 0, 32768, 34816, - 35840, 35872, 35880, 35878, 0, 32768, 34816, 35840, - 35872, 0, 32768, 34816, 35840, 35872, 35880, 0, - 32768, 34816, 35840, 35872, 35880, 0, 32768, 34816, - 35840, 35872, 35880, 35882, 0, 32768, 34816, 35840, - 35872, 35880, 0, 32768, 34816, 35840, 35872, 35888, - 35884, 0, 32768, 34816, 35840, 35872, 35888, 35884, - 0, 32768, 34816, 35840, 35872, 35888, 35889, 35886, - 0, 32768, 34816, 35840, 35872, 0, 32768, 34816, - 35840, 35904, 35888, 0, 32768, 34816, 35840, 35904, - 35888, 0, 32768, 34816, 35840, 35904, 35888, 35890, - 0, 32768, 34816, 35840, 35904, 35888, 0, 32768, - 34816, 35840, 35904, 35888, 35892, 0, 32768, 34816, - 35840, 35904, 35888, 35892, 0, 32768, 34816, 35840, - 35904, 35888, 35896, 35894, 0, 32768, 34816, 35840, - 35904, 35888, 0, 32768, 34816, 35840, 35904, 35905, - 35896, 0, 32768, 34816, 35840, 35904, 35905, 35896, - 0, 32768, 34816, 35840, 35904, 35905, 35896, 35898, - 0, 32768, 34816, 35840, 35904, 35905, 35896, 0, - 32768, 34816, 35840, 35904, 35905, 35896, 35900, 0, - 32768, 34816, 35840, 35904, 35905, 35907, 35900, 0, - 32768, 34816, 35840, 35904, 35905, 35907, 35900, 35902, - 0, 32768, 34816, 35840, 0, 32768, 34816, 35840, - 35904, 0, 32768, 34816, 35840, 35904, 0, 32768, - 34816, 35840, 35904, 35906, 0, 32768, 34816, 35840, - 35904, 0, 32768, 34816, 35840, 35904, 35908, 0, - 32768, 34816, 35840, 35904, 35908, 0, 32768, 34816, - 35840, 35904, 35912, 35910, 0, 32768, 34816, 35840, - 35904, 0, 32768, 34816, 35840, 35904, 35912, 0, - 32768, 34816, 35840, 35904, 35912, 0, 32768, 34816, - 35840, 35904, 35912, 35914, 0, 32768, 34816, 35840, - 35904, 35912, 0, 32768, 34816, 35840, 35904, 35920, - 35916, 0, 32768, 34816, 35840, 35904, 35920, 35916, - 0, 32768, 34816, 35840, 35904, 35920, 35921, 35918, - 0, 32768, 34816, 35840, 35904, 0, 32768, 34816, - 35840, 35904, 35920, 0, 32768, 34816, 35840, 35904, - 35920, 0, 32768, 34816, 35840, 35904, 35920, 35922, - 0, 32768, 34816, 35840, 35904, 35920, 0, 32768, - 34816, 35840, 35904, 35920, 35924, 0, 32768, 34816, - 35840, 35904, 35920, 35924, 0, 32768, 34816, 35840, - 35904, 35920, 35928, 35926, 0, 32768, 34816, 35840, - 35904, 35920, 0, 32768, 34816, 35840, 35904, 35936, - 35928, 0, 32768, 34816, 35840, 35904, 35936, 35928, - 0, 32768, 34816, 35840, 35904, 35936, 35928, 35930, - 0, 32768, 34816, 35840, 35904, 35936, 35928, 0, - 32768, 34816, 35840, 35904, 35936, 35937, 35932, 0, - 32768, 34816, 35840, 35904, 35936, 35937, 35932, 0, - 32768, 34816, 35840, 35904, 35936, 35937, 35932, 35934, - 0, 32768, 34816, 35840, 35904, 0, 32768, 34816, - 35840, 35968, 35936, 0, 32768, 34816, 35840, 35968, - 35936, 0, 32768, 34816, 35840, 35968, 35936, 35938, - 0, 32768, 34816, 35840, 35968, 35936, 0, 32768, - 34816, 35840, 35968, 35936, 35940, 0, 32768, 34816, - 35840, 35968, 35936, 35940, 0, 32768, 34816, 35840, - 35968, 35936, 35944, 35942, 0, 32768, 34816, 35840, - 35968, 35936, 0, 32768, 34816, 35840, 35968, 35936, - 35944, 0, 32768, 34816, 35840, 35968, 35936, 35944, - 0, 32768, 34816, 35840, 35968, 35936, 35944, 35946, - 0, 32768, 34816, 35840, 35968, 35936, 35944, 0, - 32768, 34816, 35840, 35968, 35936, 35952, 35948, 0, - 32768, 34816, 35840, 35968, 35936, 35952, 35948, 0, - 32768, 34816, 35840, 35968, 35936, 35952, 35953, 35950, - 0, 32768, 34816, 35840, 35968, 35936, 0, 32768, - 34816, 35840, 35968, 35969, 35952, 0, 32768, 34816, - 35840, 35968, 35969, 35952, 0, 32768, 34816, 35840, - 35968, 35969, 35952, 35954, 0, 32768, 34816, 35840, - 35968, 35969, 35952, 0, 32768, 34816, 35840, 35968, - 35969, 35952, 35956, 0, 32768, 34816, 35840, 35968, - 35969, 35952, 35956, 0, 32768, 34816, 35840, 35968, - 35969, 35952, 35960, 35958, 0, 32768, 34816, 35840, - 35968, 35969, 35952, 0, 32768, 34816, 35840, 35968, - 35969, 35952, 35960, 0, 32768, 34816, 35840, 35968, - 35969, 35971, 35960, 0, 32768, 34816, 35840, 35968, - 35969, 35971, 35960, 35962, 0, 32768, 34816, 35840, - 35968, 35969, 35971, 35960, 0, 32768, 34816, 35840, - 35968, 35969, 35971, 35960, 35964, 0, 32768, 34816, - 35840, 35968, 35969, 35971, 35960, 35964, 0, 32768, - 34816, 35840, 35968, 35969, 35971, 35960, 35964, 35966, - 0, 32768, 34816, 35840, 0, 32768, 34816, 35840, - 35968, 0, 32768, 34816, 35840, 35968, 0, 32768, - 34816, 35840, 35968, 35970, 0, 32768, 34816, 35840, - 35968, 0, 32768, 34816, 35840, 35968, 35972, 0, - 32768, 34816, 35840, 35968, 35972, 0, 32768, 34816, - 35840, 35968, 35976, 35974, 0, 32768, 34816, 35840, - 35968, 0, 32768, 34816, 35840, 35968, 35976, 0, - 32768, 34816, 35840, 35968, 35976, 0, 32768, 34816, - 35840, 35968, 35976, 35978, 0, 32768, 34816, 35840, - 35968, 35976, 0, 32768, 34816, 35840, 35968, 35984, - 35980, 0, 32768, 34816, 35840, 35968, 35984, 35980, - 0, 32768, 34816, 35840, 35968, 35984, 35985, 35982, - 0, 32768, 34816, 35840, 35968, 0, 32768, 34816, - 35840, 35968, 35984, 0, 32768, 34816, 35840, 35968, - 35984, 0, 32768, 34816, 35840, 35968, 35984, 35986, - 0, 32768, 34816, 35840, 35968, 35984, 0, 32768, - 34816, 35840, 35968, 35984, 35988, 0, 32768, 34816, - 35840, 35968, 35984, 35988, 0, 32768, 34816, 35840, - 35968, 35984, 35992, 35990, 0, 32768, 34816, 35840, - 35968, 35984, 0, 32768, 34816, 35840, 35968, 36000, - 35992, 0, 32768, 34816, 35840, 35968, 36000, 35992, - 0, 32768, 34816, 35840, 35968, 36000, 35992, 35994, - 0, 32768, 34816, 35840, 35968, 36000, 35992, 0, - 32768, 34816, 35840, 35968, 36000, 36001, 35996, 0, - 32768, 34816, 35840, 35968, 36000, 36001, 35996, 0, - 32768, 34816, 35840, 35968, 36000, 36001, 35996, 35998, - 0, 32768, 34816, 35840, 35968, 0, 32768, 34816, - 35840, 35968, 36000, 0, 32768, 34816, 35840, 35968, - 36000, 0, 32768, 34816, 35840, 35968, 36000, 36002, - 0, 32768, 34816, 35840, 35968, 36000, 0, 32768, - 34816, 35840, 35968, 36000, 36004, 0, 32768, 34816, - 35840, 35968, 36000, 36004, 0, 32768, 34816, 35840, - 35968, 36000, 36008, 36006, 0, 32768, 34816, 35840, - 35968, 36000, 0, 32768, 34816, 35840, 35968, 36000, - 36008, 0, 32768, 34816, 35840, 35968, 36000, 36008, - 0, 32768, 34816, 35840, 35968, 36000, 36008, 36010, - 0, 32768, 34816, 35840, 35968, 36000, 36008, 0, - 32768, 34816, 35840, 35968, 36000, 36016, 36012, 0, - 32768, 34816, 35840, 35968, 36000, 36016, 36012, 0, - 32768, 34816, 35840, 35968, 36000, 36016, 36017, 36014, - 0, 32768, 34816, 35840, 35968, 36000, 0, 32768, - 34816, 35840, 35968, 36032, 36016, 0, 32768, 34816, - 35840, 35968, 36032, 36016, 0, 32768, 34816, 35840, - 35968, 36032, 36016, 36018, 0, 32768, 34816, 35840, - 35968, 36032, 36016, 0, 32768, 34816, 35840, 35968, - 36032, 36016, 36020, 0, 32768, 34816, 35840, 35968, - 36032, 36016, 36020, 0, 32768, 34816, 35840, 35968, - 36032, 36016, 36024, 36022, 0, 32768, 34816, 35840, - 35968, 36032, 36016, 0, 32768, 34816, 35840, 35968, - 36032, 36033, 36024, 0, 32768, 34816, 35840, 35968, - 36032, 36033, 36024, 0, 32768, 34816, 35840, 35968, - 36032, 36033, 36024, 36026, 0, 32768, 34816, 35840, - 35968, 36032, 36033, 36024, 0, 32768, 34816, 35840, - 35968, 36032, 36033, 36024, 36028, 0, 32768, 34816, - 35840, 35968, 36032, 36033, 36035, 36028, 0, 32768, - 34816, 35840, 35968, 36032, 36033, 36035, 36028, 36030, - 0, 32768, 34816, 35840, 35968, 0, 32768, 34816, - 35840, 36096, 36032, 0, 32768, 34816, 35840, 36096, - 36032, 0, 32768, 34816, 35840, 36096, 36032, 36034, - 0, 32768, 34816, 35840, 36096, 36032, 0, 32768, - 34816, 35840, 36096, 36032, 36036, 0, 32768, 34816, - 35840, 36096, 36032, 36036, 0, 32768, 34816, 35840, - 36096, 36032, 36040, 36038, 0, 32768, 34816, 35840, - 36096, 36032, 0, 32768, 34816, 35840, 36096, 36032, - 36040, 0, 32768, 34816, 35840, 36096, 36032, 36040, - 0, 32768, 34816, 35840, 36096, 36032, 36040, 36042, - 0, 32768, 34816, 35840, 36096, 36032, 36040, 0, - 32768, 34816, 35840, 36096, 36032, 36048, 36044, 0, - 32768, 34816, 35840, 36096, 36032, 36048, 36044, 0, - 32768, 34816, 35840, 36096, 36032, 36048, 36049, 36046, - 0, 32768, 34816, 35840, 36096, 36032, 0, 32768, - 34816, 35840, 36096, 36032, 36048, 0, 32768, 34816, - 35840, 36096, 36032, 36048, 0, 32768, 34816, 35840, - 36096, 36032, 36048, 36050, 0, 32768, 34816, 35840, - 36096, 36032, 36048, 0, 32768, 34816, 35840, 36096, - 36032, 36048, 36052, 0, 32768, 34816, 35840, 36096, - 36032, 36048, 36052, 0, 32768, 34816, 35840, 36096, - 36032, 36048, 36056, 36054, 0, 32768, 34816, 35840, - 36096, 36032, 36048, 0, 32768, 34816, 35840, 36096, - 36032, 36064, 36056, 0, 32768, 34816, 35840, 36096, - 36032, 36064, 36056, 0, 32768, 34816, 35840, 36096, - 36032, 36064, 36056, 36058, 0, 32768, 34816, 35840, - 36096, 36032, 36064, 36056, 0, 32768, 34816, 35840, - 36096, 36032, 36064, 36065, 36060, 0, 32768, 34816, - 35840, 36096, 36032, 36064, 36065, 36060, 0, 32768, - 34816, 35840, 36096, 36032, 36064, 36065, 36060, 36062, - 0, 32768, 34816, 35840, 36096, 36032, 0, 32768, - 34816, 35840, 36096, 36097, 36064, 0, 32768, 34816, - 35840, 36096, 36097, 36064, 0, 32768, 34816, 35840, - 36096, 36097, 36064, 36066, 0, 32768, 34816, 35840, - 36096, 36097, 36064, 0, 32768, 34816, 35840, 36096, - 36097, 36064, 36068, 0, 32768, 34816, 35840, 36096, - 36097, 36064, 36068, 0, 32768, 34816, 35840, 36096, - 36097, 36064, 36072, 36070, 0, 32768, 34816, 35840, - 36096, 36097, 36064, 0, 32768, 34816, 35840, 36096, - 36097, 36064, 36072, 0, 32768, 34816, 35840, 36096, - 36097, 36064, 36072, 0, 32768, 34816, 35840, 36096, - 36097, 36064, 36072, 36074, 0, 32768, 34816, 35840, - 36096, 36097, 36064, 36072, 0, 32768, 34816, 35840, - 36096, 36097, 36064, 36080, 36076, 0, 32768, 34816, - 35840, 36096, 36097, 36064, 36080, 36076, 0, 32768, - 34816, 35840, 36096, 36097, 36064, 36080, 36081, 36078, - 0, 32768, 34816, 35840, 36096, 36097, 36064, 0, - 32768, 34816, 35840, 36096, 36097, 36064, 36080, 0, - 32768, 34816, 35840, 36096, 36097, 36099, 36080, 0, - 32768, 34816, 35840, 36096, 36097, 36099, 36080, 36082, - 0, 32768, 34816, 35840, 36096, 36097, 36099, 36080, - 0, 32768, 34816, 35840, 36096, 36097, 36099, 36080, - 36084, 0, 32768, 34816, 35840, 36096, 36097, 36099, - 36080, 36084, 0, 32768, 34816, 35840, 36096, 36097, - 36099, 36080, 36088, 36086, 0, 32768, 34816, 35840, - 36096, 36097, 36099, 36080, 0, 32768, 34816, 35840, - 36096, 36097, 36099, 36080, 36088, 0, 32768, 34816, - 35840, 36096, 36097, 36099, 36080, 36088, 0, 32768, - 34816, 35840, 36096, 36097, 36099, 36080, 36088, 36090, - 0, 32768, 34816, 35840, 36096, 36097, 36099, 36103, - 36088, 0, 32768, 34816, 35840, 36096, 36097, 36099, - 36103, 36088, 36092, 0, 32768, 34816, 35840, 36096, - 36097, 36099, 36103, 36088, 36092, 0, 32768, 34816, - 35840, 36096, 36097, 36099, 36103, 36088, 36092, 36094, - 0, 32768, 34816, 35840, 0, 32768, 36864, 35840, - 36096, 0, 32768, 36864, 35840, 36096, 0, 32768, - 36864, 35840, 36096, 36098, 0, 32768, 36864, 35840, - 36096, 0, 32768, 36864, 35840, 36096, 36100, 0, - 32768, 36864, 35840, 36096, 36100, 0, 32768, 36864, - 35840, 36096, 36104, 36102, 0, 32768, 36864, 35840, - 36096, 0, 32768, 36864, 35840, 36096, 36104, 0, - 32768, 36864, 35840, 36096, 36104, 0, 32768, 36864, - 35840, 36096, 36104, 36106, 0, 32768, 36864, 35840, - 36096, 36104, 0, 32768, 36864, 35840, 36096, 36112, - 36108, 0, 32768, 36864, 35840, 36096, 36112, 36108, - 0, 32768, 36864, 35840, 36096, 36112, 36113, 36110, - 0, 32768, 36864, 35840, 36096, 0, 32768, 36864, - 35840, 36096, 36112, 0, 32768, 36864, 35840, 36096, - 36112, 0, 32768, 36864, 35840, 36096, 36112, 36114, - 0, 32768, 36864, 35840, 36096, 36112, 0, 32768, - 36864, 35840, 36096, 36112, 36116, 0, 32768, 36864, - 35840, 36096, 36112, 36116, 0, 32768, 36864, 35840, - 36096, 36112, 36120, 36118, 0, 32768, 36864, 35840, - 36096, 36112, 0, 32768, 36864, 35840, 36096, 36128, - 36120, 0, 32768, 36864, 35840, 36096, 36128, 36120, - 0, 32768, 36864, 35840, 36096, 36128, 36120, 36122, - 0, 32768, 36864, 35840, 36096, 36128, 36120, 0, - 32768, 36864, 35840, 36096, 36128, 36129, 36124, 0, - 32768, 36864, 35840, 36096, 36128, 36129, 36124, 0, - 32768, 36864, 35840, 36096, 36128, 36129, 36124, 36126, - 0, 32768, 36864, 35840, 36096, 0, 32768, 36864, - 35840, 36096, 36128, 0, 32768, 36864, 35840, 36096, - 36128, 0, 32768, 36864, 35840, 36096, 36128, 36130, - 0, 32768, 36864, 35840, 36096, 36128, 0, 32768, - 36864, 35840, 36096, 36128, 36132, 0, 32768, 36864, - 35840, 36096, 36128, 36132, 0, 32768, 36864, 35840, - 36096, 36128, 36136, 36134, 0, 32768, 36864, 35840, - 36096, 36128, 0, 32768, 36864, 35840, 36096, 36128, - 36136, 0, 32768, 36864, 35840, 36096, 36128, 36136, - 0, 32768, 36864, 35840, 36096, 36128, 36136, 36138, - 0, 32768, 36864, 35840, 36096, 36128, 36136, 0, - 32768, 36864, 35840, 36096, 36128, 36144, 36140, 0, - 32768, 36864, 35840, 36096, 36128, 36144, 36140, 0, - 32768, 36864, 35840, 36096, 36128, 36144, 36145, 36142, - 0, 32768, 36864, 35840, 36096, 36128, 0, 32768, - 36864, 35840, 36096, 36160, 36144, 0, 32768, 36864, - 35840, 36096, 36160, 36144, 0, 32768, 36864, 35840, - 36096, 36160, 36144, 36146, 0, 32768, 36864, 35840, - 36096, 36160, 36144, 0, 32768, 36864, 35840, 36096, - 36160, 36144, 36148, 0, 32768, 36864, 35840, 36096, - 36160, 36144, 36148, 0, 32768, 36864, 35840, 36096, - 36160, 36144, 36152, 36150, 0, 32768, 36864, 35840, - 36096, 36160, 36144, 0, 32768, 36864, 35840, 36096, - 36160, 36161, 36152, 0, 32768, 36864, 35840, 36096, - 36160, 36161, 36152, 0, 32768, 36864, 35840, 36096, - 36160, 36161, 36152, 36154, 0, 32768, 36864, 35840, - 36096, 36160, 36161, 36152, 0, 32768, 36864, 35840, - 36096, 36160, 36161, 36152, 36156, 0, 32768, 36864, - 35840, 36096, 36160, 36161, 36163, 36156, 0, 32768, - 36864, 35840, 36096, 36160, 36161, 36163, 36156, 36158, - 0, 32768, 36864, 35840, 36096, 0, 32768, 36864, - 35840, 36096, 36160, 0, 32768, 36864, 35840, 36096, - 36160, 0, 32768, 36864, 35840, 36096, 36160, 36162, - 0, 32768, 36864, 35840, 36096, 36160, 0, 32768, - 36864, 35840, 36096, 36160, 36164, 0, 32768, 36864, - 35840, 36096, 36160, 36164, 0, 32768, 36864, 35840, - 36096, 36160, 36168, 36166, 0, 32768, 36864, 35840, - 36096, 36160, 0, 32768, 36864, 35840, 36096, 36160, - 36168, 0, 32768, 36864, 35840, 36096, 36160, 36168, - 0, 32768, 36864, 35840, 36096, 36160, 36168, 36170, - 0, 32768, 36864, 35840, 36096, 36160, 36168, 0, - 32768, 36864, 35840, 36096, 36160, 36176, 36172, 0, - 32768, 36864, 35840, 36096, 36160, 36176, 36172, 0, - 32768, 36864, 35840, 36096, 36160, 36176, 36177, 36174, - 0, 32768, 36864, 35840, 36096, 36160, 0, 32768, - 36864, 35840, 36096, 36160, 36176, 0, 32768, 36864, - 35840, 36096, 36160, 36176, 0, 32768, 36864, 35840, - 36096, 36160, 36176, 36178, 0, 32768, 36864, 35840, - 36096, 36160, 36176, 0, 32768, 36864, 35840, 36096, - 36160, 36176, 36180, 0, 32768, 36864, 35840, 36096, - 36160, 36176, 36180, 0, 32768, 36864, 35840, 36096, - 36160, 36176, 36184, 36182, 0, 32768, 36864, 35840, - 36096, 36160, 36176, 0, 32768, 36864, 35840, 36096, - 36160, 36192, 36184, 0, 32768, 36864, 35840, 36096, - 36160, 36192, 36184, 0, 32768, 36864, 35840, 36096, - 36160, 36192, 36184, 36186, 0, 32768, 36864, 35840, - 36096, 36160, 36192, 36184, 0, 32768, 36864, 35840, - 36096, 36160, 36192, 36193, 36188, 0, 32768, 36864, - 35840, 36096, 36160, 36192, 36193, 36188, 0, 32768, - 36864, 35840, 36096, 36160, 36192, 36193, 36188, 36190, - 0, 32768, 36864, 35840, 36096, 36160, 0, 32768, - 36864, 35840, 36096, 36224, 36192, 0, 32768, 36864, - 35840, 36096, 36224, 36192, 0, 32768, 36864, 35840, - 36096, 36224, 36192, 36194, 0, 32768, 36864, 35840, - 36096, 36224, 36192, 0, 32768, 36864, 35840, 36096, - 36224, 36192, 36196, 0, 32768, 36864, 35840, 36096, - 36224, 36192, 36196, 0, 32768, 36864, 35840, 36096, - 36224, 36192, 36200, 36198, 0, 32768, 36864, 35840, - 36096, 36224, 36192, 0, 32768, 36864, 35840, 36096, - 36224, 36192, 36200, 0, 32768, 36864, 35840, 36096, - 36224, 36192, 36200, 0, 32768, 36864, 35840, 36096, - 36224, 36192, 36200, 36202, 0, 32768, 36864, 35840, - 36096, 36224, 36192, 36200, 0, 32768, 36864, 35840, - 36096, 36224, 36192, 36208, 36204, 0, 32768, 36864, - 35840, 36096, 36224, 36192, 36208, 36204, 0, 32768, - 36864, 35840, 36096, 36224, 36192, 36208, 36209, 36206, - 0, 32768, 36864, 35840, 36096, 36224, 36192, 0, - 32768, 36864, 35840, 36096, 36224, 36225, 36208, 0, - 32768, 36864, 35840, 36096, 36224, 36225, 36208, 0, - 32768, 36864, 35840, 36096, 36224, 36225, 36208, 36210, - 0, 32768, 36864, 35840, 36096, 36224, 36225, 36208, - 0, 32768, 36864, 35840, 36096, 36224, 36225, 36208, - 36212, 0, 32768, 36864, 35840, 36096, 36224, 36225, - 36208, 36212, 0, 32768, 36864, 35840, 36096, 36224, - 36225, 36208, 36216, 36214, 0, 32768, 36864, 35840, - 36096, 36224, 36225, 36208, 0, 32768, 36864, 35840, - 36096, 36224, 36225, 36208, 36216, 0, 32768, 36864, - 35840, 36096, 36224, 36225, 36227, 36216, 0, 32768, - 36864, 35840, 36096, 36224, 36225, 36227, 36216, 36218, - 0, 32768, 36864, 35840, 36096, 36224, 36225, 36227, - 36216, 0, 32768, 36864, 35840, 36096, 36224, 36225, - 36227, 36216, 36220, 0, 32768, 36864, 35840, 36096, - 36224, 36225, 36227, 36216, 36220, 0, 32768, 36864, - 35840, 36096, 36224, 36225, 36227, 36216, 36220, 36222, - 0, 32768, 36864, 35840, 36096, 0, 32768, 36864, - 35840, 36352, 36224, 0, 32768, 36864, 35840, 36352, - 36224, 0, 32768, 36864, 35840, 36352, 36224, 36226, - 0, 32768, 36864, 35840, 36352, 36224, 0, 32768, - 36864, 35840, 36352, 36224, 36228, 0, 32768, 36864, - 35840, 36352, 36224, 36228, 0, 32768, 36864, 35840, - 36352, 36224, 36232, 36230, 0, 32768, 36864, 35840, - 36352, 36224, 0, 32768, 36864, 35840, 36352, 36224, - 36232, 0, 32768, 36864, 35840, 36352, 36224, 36232, - 0, 32768, 36864, 35840, 36352, 36224, 36232, 36234, - 0, 32768, 36864, 35840, 36352, 36224, 36232, 0, - 32768, 36864, 35840, 36352, 36224, 36240, 36236, 0, - 32768, 36864, 35840, 36352, 36224, 36240, 36236, 0, - 32768, 36864, 35840, 36352, 36224, 36240, 36241, 36238, - 0, 32768, 36864, 35840, 36352, 36224, 0, 32768, - 36864, 35840, 36352, 36224, 36240, 0, 32768, 36864, - 35840, 36352, 36224, 36240, 0, 32768, 36864, 35840, - 36352, 36224, 36240, 36242, 0, 32768, 36864, 35840, - 36352, 36224, 36240, 0, 32768, 36864, 35840, 36352, - 36224, 36240, 36244, 0, 32768, 36864, 35840, 36352, - 36224, 36240, 36244, 0, 32768, 36864, 35840, 36352, - 36224, 36240, 36248, 36246, 0, 32768, 36864, 35840, - 36352, 36224, 36240, 0, 32768, 36864, 35840, 36352, - 36224, 36256, 36248, 0, 32768, 36864, 35840, 36352, - 36224, 36256, 36248, 0, 32768, 36864, 35840, 36352, - 36224, 36256, 36248, 36250, 0, 32768, 36864, 35840, - 36352, 36224, 36256, 36248, 0, 32768, 36864, 35840, - 36352, 36224, 36256, 36257, 36252, 0, 32768, 36864, - 35840, 36352, 36224, 36256, 36257, 36252, 0, 32768, - 36864, 35840, 36352, 36224, 36256, 36257, 36252, 36254, - 0, 32768, 36864, 35840, 36352, 36224, 0, 32768, - 36864, 35840, 36352, 36224, 36256, 0, 32768, 36864, - 35840, 36352, 36224, 36256, 0, 32768, 36864, 35840, - 36352, 36224, 36256, 36258, 0, 32768, 36864, 35840, - 36352, 36224, 36256, 0, 32768, 36864, 35840, 36352, - 36224, 36256, 36260, 0, 32768, 36864, 35840, 36352, - 36224, 36256, 36260, 0, 32768, 36864, 35840, 36352, - 36224, 36256, 36264, 36262, 0, 32768, 36864, 35840, - 36352, 36224, 36256, 0, 32768, 36864, 35840, 36352, - 36224, 36256, 36264, 0, 32768, 36864, 35840, 36352, - 36224, 36256, 36264, 0, 32768, 36864, 35840, 36352, - 36224, 36256, 36264, 36266, 0, 32768, 36864, 35840, - 36352, 36224, 36256, 36264, 0, 32768, 36864, 35840, - 36352, 36224, 36256, 36272, 36268, 0, 32768, 36864, - 35840, 36352, 36224, 36256, 36272, 36268, 0, 32768, - 36864, 35840, 36352, 36224, 36256, 36272, 36273, 36270, - 0, 32768, 36864, 35840, 36352, 36224, 36256, 0, - 32768, 36864, 35840, 36352, 36224, 36288, 36272, 0, - 32768, 36864, 35840, 36352, 36224, 36288, 36272, 0, - 32768, 36864, 35840, 36352, 36224, 36288, 36272, 36274, - 0, 32768, 36864, 35840, 36352, 36224, 36288, 36272, - 0, 32768, 36864, 35840, 36352, 36224, 36288, 36272, - 36276, 0, 32768, 36864, 35840, 36352, 36224, 36288, - 36272, 36276, 0, 32768, 36864, 35840, 36352, 36224, - 36288, 36272, 36280, 36278, 0, 32768, 36864, 35840, - 36352, 36224, 36288, 36272, 0, 32768, 36864, 35840, - 36352, 36224, 36288, 36289, 36280, 0, 32768, 36864, - 35840, 36352, 36224, 36288, 36289, 36280, 0, 32768, - 36864, 35840, 36352, 36224, 36288, 36289, 36280, 36282, - 0, 32768, 36864, 35840, 36352, 36224, 36288, 36289, - 36280, 0, 32768, 36864, 35840, 36352, 36224, 36288, - 36289, 36280, 36284, 0, 32768, 36864, 35840, 36352, - 36224, 36288, 36289, 36291, 36284, 0, 32768, 36864, - 35840, 36352, 36224, 36288, 36289, 36291, 36284, 36286, - 0, 32768, 36864, 35840, 36352, 36224, 0, 32768, - 36864, 35840, 36352, 36353, 36288, 0, 32768, 36864, - 35840, 36352, 36353, 36288, 0, 32768, 36864, 35840, - 36352, 36353, 36288, 36290, 0, 32768, 36864, 35840, - 36352, 36353, 36288, 0, 32768, 36864, 35840, 36352, - 36353, 36288, 36292, 0, 32768, 36864, 35840, 36352, - 36353, 36288, 36292, 0, 32768, 36864, 35840, 36352, - 36353, 36288, 36296, 36294, 0, 32768, 36864, 35840, - 36352, 36353, 36288, 0, 32768, 36864, 35840, 36352, - 36353, 36288, 36296, 0, 32768, 36864, 35840, 36352, - 36353, 36288, 36296, 0, 32768, 36864, 35840, 36352, - 36353, 36288, 36296, 36298, 0, 32768, 36864, 35840, - 36352, 36353, 36288, 36296, 0, 32768, 36864, 35840, - 36352, 36353, 36288, 36304, 36300, 0, 32768, 36864, - 35840, 36352, 36353, 36288, 36304, 36300, 0, 32768, - 36864, 35840, 36352, 36353, 36288, 36304, 36305, 36302, - 0, 32768, 36864, 35840, 36352, 36353, 36288, 0, - 32768, 36864, 35840, 36352, 36353, 36288, 36304, 0, - 32768, 36864, 35840, 36352, 36353, 36288, 36304, 0, - 32768, 36864, 35840, 36352, 36353, 36288, 36304, 36306, - 0, 32768, 36864, 35840, 36352, 36353, 36288, 36304, - 0, 32768, 36864, 35840, 36352, 36353, 36288, 36304, - 36308, 0, 32768, 36864, 35840, 36352, 36353, 36288, - 36304, 36308, 0, 32768, 36864, 35840, 36352, 36353, - 36288, 36304, 36312, 36310, 0, 32768, 36864, 35840, - 36352, 36353, 36288, 36304, 0, 32768, 36864, 35840, - 36352, 36353, 36288, 36320, 36312, 0, 32768, 36864, - 35840, 36352, 36353, 36288, 36320, 36312, 0, 32768, - 36864, 35840, 36352, 36353, 36288, 36320, 36312, 36314, - 0, 32768, 36864, 35840, 36352, 36353, 36288, 36320, - 36312, 0, 32768, 36864, 35840, 36352, 36353, 36288, - 36320, 36321, 36316, 0, 32768, 36864, 35840, 36352, - 36353, 36288, 36320, 36321, 36316, 0, 32768, 36864, - 35840, 36352, 36353, 36288, 36320, 36321, 36316, 36318, - 0, 32768, 36864, 35840, 36352, 36353, 36288, 0, - 32768, 36864, 35840, 36352, 36353, 36288, 36320, 0, - 32768, 36864, 35840, 36352, 36353, 36355, 36320, 0, - 32768, 36864, 35840, 36352, 36353, 36355, 36320, 36322, - 0, 32768, 36864, 35840, 36352, 36353, 36355, 36320, - 0, 32768, 36864, 35840, 36352, 36353, 36355, 36320, - 36324, 0, 32768, 36864, 35840, 36352, 36353, 36355, - 36320, 36324, 0, 32768, 36864, 35840, 36352, 36353, - 36355, 36320, 36328, 36326, 0, 32768, 36864, 35840, - 36352, 36353, 36355, 36320, 0, 32768, 36864, 35840, - 36352, 36353, 36355, 36320, 36328, 0, 32768, 36864, - 35840, 36352, 36353, 36355, 36320, 36328, 0, 32768, - 36864, 35840, 36352, 36353, 36355, 36320, 36328, 36330, - 0, 32768, 36864, 35840, 36352, 36353, 36355, 36320, - 36328, 0, 32768, 36864, 35840, 36352, 36353, 36355, - 36320, 36336, 36332, 0, 32768, 36864, 35840, 36352, - 36353, 36355, 36320, 36336, 36332, 0, 32768, 36864, - 35840, 36352, 36353, 36355, 36320, 36336, 36337, 36334, - 0, 32768, 36864, 35840, 36352, 36353, 36355, 36320, - 0, 32768, 36864, 35840, 36352, 36353, 36355, 36320, - 36336, 0, 32768, 36864, 35840, 36352, 36353, 36355, - 36320, 36336, 0, 32768, 36864, 35840, 36352, 36353, - 36355, 36320, 36336, 36338, 0, 32768, 36864, 35840, - 36352, 36353, 36355, 36359, 36336, 0, 32768, 36864, - 35840, 36352, 36353, 36355, 36359, 36336, 36340, 0, - 32768, 36864, 35840, 36352, 36353, 36355, 36359, 36336, - 36340, 0, 32768, 36864, 35840, 36352, 36353, 36355, - 36359, 36336, 36344, 36342, 0, 32768, 36864, 35840, - 36352, 36353, 36355, 36359, 36336, 0, 32768, 36864, - 35840, 36352, 36353, 36355, 36359, 36336, 36344, 0, - 32768, 36864, 35840, 36352, 36353, 36355, 36359, 36336, - 36344, 0, 32768, 36864, 35840, 36352, 36353, 36355, - 36359, 36336, 36344, 36346, 0, 32768, 36864, 35840, - 36352, 36353, 36355, 36359, 36336, 36344, 0, 32768, - 36864, 35840, 36352, 36353, 36355, 36359, 36336, 36344, - 36348, 0, 32768, 36864, 35840, 36352, 36353, 36355, - 36359, 36336, 36344, 36348, 0, 32768, 36864, 35840, - 36352, 36353, 36355, 36359, 36336, 36344, 36348, 36350, - 0, 32768, 36864, 35840, 0, 32768, 36864, 35840, - 36352, 0, 32768, 36864, 36865, 36352, 0, 32768, - 36864, 36865, 36352, 36354, 0, 32768, 36864, 36865, - 36352, 0, 32768, 36864, 36865, 36352, 36356, 0, - 32768, 36864, 36865, 36352, 36356, 0, 32768, 36864, - 36865, 36352, 36360, 36358, 0, 32768, 36864, 36865, - 36352, 0, 32768, 36864, 36865, 36352, 36360, 0, - 32768, 36864, 36865, 36352, 36360, 0, 32768, 36864, - 36865, 36352, 36360, 36362, 0, 32768, 36864, 36865, - 36352, 36360, 0, 32768, 36864, 36865, 36352, 36368, - 36364, 0, 32768, 36864, 36865, 36352, 36368, 36364, - 0, 32768, 36864, 36865, 36352, 36368, 36369, 36366, - 0, 32768, 36864, 36865, 36352, 0, 32768, 36864, - 36865, 36352, 36368, 0, 32768, 36864, 36865, 36352, - 36368, 0, 32768, 36864, 36865, 36352, 36368, 36370, - 0, 32768, 36864, 36865, 36352, 36368, 0, 32768, - 36864, 36865, 36352, 36368, 36372, 0, 32768, 36864, - 36865, 36352, 36368, 36372, 0, 32768, 36864, 36865, - 36352, 36368, 36376, 36374, 0, 32768, 36864, 36865, - 36352, 36368, 0, 32768, 36864, 36865, 36352, 36384, - 36376, 0, 32768, 36864, 36865, 36352, 36384, 36376, - 0, 32768, 36864, 36865, 36352, 36384, 36376, 36378, - 0, 32768, 36864, 36865, 36352, 36384, 36376, 0, - 32768, 36864, 36865, 36352, 36384, 36385, 36380, 0, - 32768, 36864, 36865, 36352, 36384, 36385, 36380, 0, - 32768, 36864, 36865, 36352, 36384, 36385, 36380, 36382, - 0, 32768, 36864, 36865, 36352, 0, 32768, 36864, - 36865, 36352, 36384, 0, 32768, 36864, 36865, 36352, - 36384, 0, 32768, 36864, 36865, 36352, 36384, 36386, - 0, 32768, 36864, 36865, 36352, 36384, 0, 32768, - 36864, 36865, 36352, 36384, 36388, 0, 32768, 36864, - 36865, 36352, 36384, 36388, 0, 32768, 36864, 36865, - 36352, 36384, 36392, 36390, 0, 32768, 36864, 36865, - 36352, 36384, 0, 32768, 36864, 36865, 36352, 36384, - 36392, 0, 32768, 36864, 36865, 36352, 36384, 36392, - 0, 32768, 36864, 36865, 36352, 36384, 36392, 36394, - 0, 32768, 36864, 36865, 36352, 36384, 36392, 0, - 32768, 36864, 36865, 36352, 36384, 36400, 36396, 0, - 32768, 36864, 36865, 36352, 36384, 36400, 36396, 0, - 32768, 36864, 36865, 36352, 36384, 36400, 36401, 36398, - 0, 32768, 36864, 36865, 36352, 36384, 0, 32768, - 36864, 36865, 36352, 36416, 36400, 0, 32768, 36864, - 36865, 36352, 36416, 36400, 0, 32768, 36864, 36865, - 36352, 36416, 36400, 36402, 0, 32768, 36864, 36865, - 36352, 36416, 36400, 0, 32768, 36864, 36865, 36352, - 36416, 36400, 36404, 0, 32768, 36864, 36865, 36352, - 36416, 36400, 36404, 0, 32768, 36864, 36865, 36352, - 36416, 36400, 36408, 36406, 0, 32768, 36864, 36865, - 36352, 36416, 36400, 0, 32768, 36864, 36865, 36352, - 36416, 36417, 36408, 0, 32768, 36864, 36865, 36352, - 36416, 36417, 36408, 0, 32768, 36864, 36865, 36352, - 36416, 36417, 36408, 36410, 0, 32768, 36864, 36865, - 36352, 36416, 36417, 36408, 0, 32768, 36864, 36865, - 36352, 36416, 36417, 36408, 36412, 0, 32768, 36864, - 36865, 36352, 36416, 36417, 36419, 36412, 0, 32768, - 36864, 36865, 36352, 36416, 36417, 36419, 36412, 36414, - 0, 32768, 36864, 36865, 36352, 0, 32768, 36864, - 36865, 36352, 36416, 0, 32768, 36864, 36865, 36352, - 36416, 0, 32768, 36864, 36865, 36352, 36416, 36418, - 0, 32768, 36864, 36865, 36352, 36416, 0, 32768, - 36864, 36865, 36352, 36416, 36420, 0, 32768, 36864, - 36865, 36352, 36416, 36420, 0, 32768, 36864, 36865, - 36352, 36416, 36424, 36422, 0, 32768, 36864, 36865, - 36352, 36416, 0, 32768, 36864, 36865, 36352, 36416, - 36424, 0, 32768, 36864, 36865, 36352, 36416, 36424, - 0, 32768, 36864, 36865, 36352, 36416, 36424, 36426, - 0, 32768, 36864, 36865, 36352, 36416, 36424, 0, - 32768, 36864, 36865, 36352, 36416, 36432, 36428, 0, - 32768, 36864, 36865, 36352, 36416, 36432, 36428, 0, - 32768, 36864, 36865, 36352, 36416, 36432, 36433, 36430, - 0, 32768, 36864, 36865, 36352, 36416, 0, 32768, - 36864, 36865, 36352, 36416, 36432, 0, 32768, 36864, - 36865, 36352, 36416, 36432, 0, 32768, 36864, 36865, - 36352, 36416, 36432, 36434, 0, 32768, 36864, 36865, - 36352, 36416, 36432, 0, 32768, 36864, 36865, 36352, - 36416, 36432, 36436, 0, 32768, 36864, 36865, 36352, - 36416, 36432, 36436, 0, 32768, 36864, 36865, 36352, - 36416, 36432, 36440, 36438, 0, 32768, 36864, 36865, - 36352, 36416, 36432, 0, 32768, 36864, 36865, 36352, - 36416, 36448, 36440, 0, 32768, 36864, 36865, 36352, - 36416, 36448, 36440, 0, 32768, 36864, 36865, 36352, - 36416, 36448, 36440, 36442, 0, 32768, 36864, 36865, - 36352, 36416, 36448, 36440, 0, 32768, 36864, 36865, - 36352, 36416, 36448, 36449, 36444, 0, 32768, 36864, - 36865, 36352, 36416, 36448, 36449, 36444, 0, 32768, - 36864, 36865, 36352, 36416, 36448, 36449, 36444, 36446, - 0, 32768, 36864, 36865, 36352, 36416, 0, 32768, - 36864, 36865, 36352, 36480, 36448, 0, 32768, 36864, - 36865, 36352, 36480, 36448, 0, 32768, 36864, 36865, - 36352, 36480, 36448, 36450, 0, 32768, 36864, 36865, - 36352, 36480, 36448, 0, 32768, 36864, 36865, 36352, - 36480, 36448, 36452, 0, 32768, 36864, 36865, 36352, - 36480, 36448, 36452, 0, 32768, 36864, 36865, 36352, - 36480, 36448, 36456, 36454, 0, 32768, 36864, 36865, - 36352, 36480, 36448, 0, 32768, 36864, 36865, 36352, - 36480, 36448, 36456, 0, 32768, 36864, 36865, 36352, - 36480, 36448, 36456, 0, 32768, 36864, 36865, 36352, - 36480, 36448, 36456, 36458, 0, 32768, 36864, 36865, - 36352, 36480, 36448, 36456, 0, 32768, 36864, 36865, - 36352, 36480, 36448, 36464, 36460, 0, 32768, 36864, - 36865, 36352, 36480, 36448, 36464, 36460, 0, 32768, - 36864, 36865, 36352, 36480, 36448, 36464, 36465, 36462, - 0, 32768, 36864, 36865, 36352, 36480, 36448, 0, - 32768, 36864, 36865, 36352, 36480, 36481, 36464, 0, - 32768, 36864, 36865, 36352, 36480, 36481, 36464, 0, - 32768, 36864, 36865, 36352, 36480, 36481, 36464, 36466, - 0, 32768, 36864, 36865, 36352, 36480, 36481, 36464, - 0, 32768, 36864, 36865, 36352, 36480, 36481, 36464, - 36468, 0, 32768, 36864, 36865, 36352, 36480, 36481, - 36464, 36468, 0, 32768, 36864, 36865, 36352, 36480, - 36481, 36464, 36472, 36470, 0, 32768, 36864, 36865, - 36352, 36480, 36481, 36464, 0, 32768, 36864, 36865, - 36352, 36480, 36481, 36464, 36472, 0, 32768, 36864, - 36865, 36352, 36480, 36481, 36483, 36472, 0, 32768, - 36864, 36865, 36352, 36480, 36481, 36483, 36472, 36474, - 0, 32768, 36864, 36865, 36352, 36480, 36481, 36483, - 36472, 0, 32768, 36864, 36865, 36352, 36480, 36481, - 36483, 36472, 36476, 0, 32768, 36864, 36865, 36352, - 36480, 36481, 36483, 36472, 36476, 0, 32768, 36864, - 36865, 36352, 36480, 36481, 36483, 36472, 36476, 36478, - 0, 32768, 36864, 36865, 36352, 0, 32768, 36864, - 36865, 36352, 36480, 0, 32768, 36864, 36865, 36352, - 36480, 0, 32768, 36864, 36865, 36352, 36480, 36482, - 0, 32768, 36864, 36865, 36352, 36480, 0, 32768, - 36864, 36865, 36352, 36480, 36484, 0, 32768, 36864, - 36865, 36352, 36480, 36484, 0, 32768, 36864, 36865, - 36352, 36480, 36488, 36486, 0, 32768, 36864, 36865, - 36352, 36480, 0, 32768, 36864, 36865, 36352, 36480, - 36488, 0, 32768, 36864, 36865, 36352, 36480, 36488, - 0, 32768, 36864, 36865, 36352, 36480, 36488, 36490, - 0, 32768, 36864, 36865, 36352, 36480, 36488, 0, - 32768, 36864, 36865, 36352, 36480, 36496, 36492, 0, - 32768, 36864, 36865, 36352, 36480, 36496, 36492, 0, - 32768, 36864, 36865, 36352, 36480, 36496, 36497, 36494, - 0, 32768, 36864, 36865, 36352, 36480, 0, 32768, - 36864, 36865, 36352, 36480, 36496, 0, 32768, 36864, - 36865, 36352, 36480, 36496, 0, 32768, 36864, 36865, - 36352, 36480, 36496, 36498, 0, 32768, 36864, 36865, - 36352, 36480, 36496, 0, 32768, 36864, 36865, 36352, - 36480, 36496, 36500, 0, 32768, 36864, 36865, 36352, - 36480, 36496, 36500, 0, 32768, 36864, 36865, 36352, - 36480, 36496, 36504, 36502, 0, 32768, 36864, 36865, - 36352, 36480, 36496, 0, 32768, 36864, 36865, 36352, - 36480, 36512, 36504, 0, 32768, 36864, 36865, 36352, - 36480, 36512, 36504, 0, 32768, 36864, 36865, 36352, - 36480, 36512, 36504, 36506, 0, 32768, 36864, 36865, - 36352, 36480, 36512, 36504, 0, 32768, 36864, 36865, - 36352, 36480, 36512, 36513, 36508, 0, 32768, 36864, - 36865, 36352, 36480, 36512, 36513, 36508, 0, 32768, - 36864, 36865, 36352, 36480, 36512, 36513, 36508, 36510, - 0, 32768, 36864, 36865, 36352, 36480, 0, 32768, - 36864, 36865, 36352, 36480, 36512, 0, 32768, 36864, - 36865, 36352, 36480, 36512, 0, 32768, 36864, 36865, - 36352, 36480, 36512, 36514, 0, 32768, 36864, 36865, - 36352, 36480, 36512, 0, 32768, 36864, 36865, 36352, - 36480, 36512, 36516, 0, 32768, 36864, 36865, 36352, - 36480, 36512, 36516, 0, 32768, 36864, 36865, 36352, - 36480, 36512, 36520, 36518, 0, 32768, 36864, 36865, - 36352, 36480, 36512, 0, 32768, 36864, 36865, 36352, - 36480, 36512, 36520, 0, 32768, 36864, 36865, 36352, - 36480, 36512, 36520, 0, 32768, 36864, 36865, 36352, - 36480, 36512, 36520, 36522, 0, 32768, 36864, 36865, - 36352, 36480, 36512, 36520, 0, 32768, 36864, 36865, - 36352, 36480, 36512, 36528, 36524, 0, 32768, 36864, - 36865, 36352, 36480, 36512, 36528, 36524, 0, 32768, - 36864, 36865, 36352, 36480, 36512, 36528, 36529, 36526, - 0, 32768, 36864, 36865, 36352, 36480, 36512, 0, - 32768, 36864, 36865, 36352, 36480, 36544, 36528, 0, - 32768, 36864, 36865, 36352, 36480, 36544, 36528, 0, - 32768, 36864, 36865, 36352, 36480, 36544, 36528, 36530, - 0, 32768, 36864, 36865, 36352, 36480, 36544, 36528, - 0, 32768, 36864, 36865, 36352, 36480, 36544, 36528, - 36532, 0, 32768, 36864, 36865, 36352, 36480, 36544, - 36528, 36532, 0, 32768, 36864, 36865, 36352, 36480, - 36544, 36528, 36536, 36534, 0, 32768, 36864, 36865, - 36352, 36480, 36544, 36528, 0, 32768, 36864, 36865, - 36352, 36480, 36544, 36545, 36536, 0, 32768, 36864, - 36865, 36352, 36480, 36544, 36545, 36536, 0, 32768, - 36864, 36865, 36352, 36480, 36544, 36545, 36536, 36538, - 0, 32768, 36864, 36865, 36352, 36480, 36544, 36545, - 36536, 0, 32768, 36864, 36865, 36352, 36480, 36544, - 36545, 36536, 36540, 0, 32768, 36864, 36865, 36352, - 36480, 36544, 36545, 36547, 36540, 0, 32768, 36864, - 36865, 36352, 36480, 36544, 36545, 36547, 36540, 36542, - 0, 32768, 36864, 36865, 36352, 36480, 0, 32768, - 36864, 36865, 36352, 36608, 36544, 0, 32768, 36864, - 36865, 36352, 36608, 36544, 0, 32768, 36864, 36865, - 36352, 36608, 36544, 36546, 0, 32768, 36864, 36865, - 36352, 36608, 36544, 0, 32768, 36864, 36865, 36352, - 36608, 36544, 36548, 0, 32768, 36864, 36865, 36352, - 36608, 36544, 36548, 0, 32768, 36864, 36865, 36352, - 36608, 36544, 36552, 36550, 0, 32768, 36864, 36865, - 36352, 36608, 36544, 0, 32768, 36864, 36865, 36352, - 36608, 36544, 36552, 0, 32768, 36864, 36865, 36352, - 36608, 36544, 36552, 0, 32768, 36864, 36865, 36352, - 36608, 36544, 36552, 36554, 0, 32768, 36864, 36865, - 36352, 36608, 36544, 36552, 0, 32768, 36864, 36865, - 36352, 36608, 36544, 36560, 36556, 0, 32768, 36864, - 36865, 36352, 36608, 36544, 36560, 36556, 0, 32768, - 36864, 36865, 36352, 36608, 36544, 36560, 36561, 36558, - 0, 32768, 36864, 36865, 36352, 36608, 36544, 0, - 32768, 36864, 36865, 36352, 36608, 36544, 36560, 0, - 32768, 36864, 36865, 36352, 36608, 36544, 36560, 0, - 32768, 36864, 36865, 36352, 36608, 36544, 36560, 36562, - 0, 32768, 36864, 36865, 36352, 36608, 36544, 36560, - 0, 32768, 36864, 36865, 36352, 36608, 36544, 36560, - 36564, 0, 32768, 36864, 36865, 36352, 36608, 36544, - 36560, 36564, 0, 32768, 36864, 36865, 36352, 36608, - 36544, 36560, 36568, 36566, 0, 32768, 36864, 36865, - 36352, 36608, 36544, 36560, 0, 32768, 36864, 36865, - 36352, 36608, 36544, 36576, 36568, 0, 32768, 36864, - 36865, 36352, 36608, 36544, 36576, 36568, 0, 32768, - 36864, 36865, 36352, 36608, 36544, 36576, 36568, 36570, - 0, 32768, 36864, 36865, 36352, 36608, 36544, 36576, - 36568, 0, 32768, 36864, 36865, 36352, 36608, 36544, - 36576, 36577, 36572, 0, 32768, 36864, 36865, 36352, - 36608, 36544, 36576, 36577, 36572, 0, 32768, 36864, - 36865, 36352, 36608, 36544, 36576, 36577, 36572, 36574, - 0, 32768, 36864, 36865, 36352, 36608, 36544, 0, - 32768, 36864, 36865, 36352, 36608, 36609, 36576, 0, - 32768, 36864, 36865, 36352, 36608, 36609, 36576, 0, - 32768, 36864, 36865, 36352, 36608, 36609, 36576, 36578, - 0, 32768, 36864, 36865, 36352, 36608, 36609, 36576, - 0, 32768, 36864, 36865, 36352, 36608, 36609, 36576, - 36580, 0, 32768, 36864, 36865, 36352, 36608, 36609, - 36576, 36580, 0, 32768, 36864, 36865, 36352, 36608, - 36609, 36576, 36584, 36582, 0, 32768, 36864, 36865, - 36352, 36608, 36609, 36576, 0, 32768, 36864, 36865, - 36352, 36608, 36609, 36576, 36584, 0, 32768, 36864, - 36865, 36352, 36608, 36609, 36576, 36584, 0, 32768, - 36864, 36865, 36352, 36608, 36609, 36576, 36584, 36586, - 0, 32768, 36864, 36865, 36352, 36608, 36609, 36576, - 36584, 0, 32768, 36864, 36865, 36352, 36608, 36609, - 36576, 36592, 36588, 0, 32768, 36864, 36865, 36352, - 36608, 36609, 36576, 36592, 36588, 0, 32768, 36864, - 36865, 36352, 36608, 36609, 36576, 36592, 36593, 36590, - 0, 32768, 36864, 36865, 36352, 36608, 36609, 36576, - 0, 32768, 36864, 36865, 36352, 36608, 36609, 36576, - 36592, 0, 32768, 36864, 36865, 36352, 36608, 36609, - 36611, 36592, 0, 32768, 36864, 36865, 36352, 36608, - 36609, 36611, 36592, 36594, 0, 32768, 36864, 36865, - 36352, 36608, 36609, 36611, 36592, 0, 32768, 36864, - 36865, 36352, 36608, 36609, 36611, 36592, 36596, 0, - 32768, 36864, 36865, 36352, 36608, 36609, 36611, 36592, - 36596, 0, 32768, 36864, 36865, 36352, 36608, 36609, - 36611, 36592, 36600, 36598, 0, 32768, 36864, 36865, - 36352, 36608, 36609, 36611, 36592, 0, 32768, 36864, - 36865, 36352, 36608, 36609, 36611, 36592, 36600, 0, - 32768, 36864, 36865, 36352, 36608, 36609, 36611, 36592, - 36600, 0, 32768, 36864, 36865, 36352, 36608, 36609, - 36611, 36592, 36600, 36602, 0, 32768, 36864, 36865, - 36352, 36608, 36609, 36611, 36615, 36600, 0, 32768, - 36864, 36865, 36352, 36608, 36609, 36611, 36615, 36600, - 36604, 0, 32768, 36864, 36865, 36352, 36608, 36609, - 36611, 36615, 36600, 36604, 0, 32768, 36864, 36865, - 36352, 36608, 36609, 36611, 36615, 36600, 36604, 36606, - 0, 32768, 36864, 36865, 36352, 0, 32768, 36864, - 36865, 36352, 36608, 0, 32768, 36864, 36865, 36352, - 36608, 0, 32768, 36864, 36865, 36352, 36608, 36610, - 0, 32768, 36864, 36865, 36867, 36608, 0, 32768, - 36864, 36865, 36867, 36608, 36612, 0, 32768, 36864, - 36865, 36867, 36608, 36612, 0, 32768, 36864, 36865, - 36867, 36608, 36616, 36614, 0, 32768, 36864, 36865, - 36867, 36608, 0, 32768, 36864, 36865, 36867, 36608, - 36616, 0, 32768, 36864, 36865, 36867, 36608, 36616, - 0, 32768, 36864, 36865, 36867, 36608, 36616, 36618, - 0, 32768, 36864, 36865, 36867, 36608, 36616, 0, - 32768, 36864, 36865, 36867, 36608, 36624, 36620, 0, - 32768, 36864, 36865, 36867, 36608, 36624, 36620, 0, - 32768, 36864, 36865, 36867, 36608, 36624, 36625, 36622, - 0, 32768, 36864, 36865, 36867, 36608, 0, 32768, - 36864, 36865, 36867, 36608, 36624, 0, 32768, 36864, - 36865, 36867, 36608, 36624, 0, 32768, 36864, 36865, - 36867, 36608, 36624, 36626, 0, 32768, 36864, 36865, - 36867, 36608, 36624, 0, 32768, 36864, 36865, 36867, - 36608, 36624, 36628, 0, 32768, 36864, 36865, 36867, - 36608, 36624, 36628, 0, 32768, 36864, 36865, 36867, - 36608, 36624, 36632, 36630, 0, 32768, 36864, 36865, - 36867, 36608, 36624, 0, 32768, 36864, 36865, 36867, - 36608, 36640, 36632, 0, 32768, 36864, 36865, 36867, - 36608, 36640, 36632, 0, 32768, 36864, 36865, 36867, - 36608, 36640, 36632, 36634, 0, 32768, 36864, 36865, - 36867, 36608, 36640, 36632, 0, 32768, 36864, 36865, - 36867, 36608, 36640, 36641, 36636, 0, 32768, 36864, - 36865, 36867, 36608, 36640, 36641, 36636, 0, 32768, - 36864, 36865, 36867, 36608, 36640, 36641, 36636, 36638, - 0, 32768, 36864, 36865, 36867, 36608, 0, 32768, - 36864, 36865, 36867, 36608, 36640, 0, 32768, 36864, - 36865, 36867, 36608, 36640, 0, 32768, 36864, 36865, - 36867, 36608, 36640, 36642, 0, 32768, 36864, 36865, - 36867, 36608, 36640, 0, 32768, 36864, 36865, 36867, - 36608, 36640, 36644, 0, 32768, 36864, 36865, 36867, - 36608, 36640, 36644, 0, 32768, 36864, 36865, 36867, - 36608, 36640, 36648, 36646, 0, 32768, 36864, 36865, - 36867, 36608, 36640, 0, 32768, 36864, 36865, 36867, - 36608, 36640, 36648, 0, 32768, 36864, 36865, 36867, - 36608, 36640, 36648, 0, 32768, 36864, 36865, 36867, - 36608, 36640, 36648, 36650, 0, 32768, 36864, 36865, - 36867, 36608, 36640, 36648, 0, 32768, 36864, 36865, - 36867, 36608, 36640, 36656, 36652, 0, 32768, 36864, - 36865, 36867, 36608, 36640, 36656, 36652, 0, 32768, - 36864, 36865, 36867, 36608, 36640, 36656, 36657, 36654, - 0, 32768, 36864, 36865, 36867, 36608, 36640, 0, - 32768, 36864, 36865, 36867, 36608, 36672, 36656, 0, - 32768, 36864, 36865, 36867, 36608, 36672, 36656, 0, - 32768, 36864, 36865, 36867, 36608, 36672, 36656, 36658, - 0, 32768, 36864, 36865, 36867, 36608, 36672, 36656, - 0, 32768, 36864, 36865, 36867, 36608, 36672, 36656, - 36660, 0, 32768, 36864, 36865, 36867, 36608, 36672, - 36656, 36660, 0, 32768, 36864, 36865, 36867, 36608, - 36672, 36656, 36664, 36662, 0, 32768, 36864, 36865, - 36867, 36608, 36672, 36656, 0, 32768, 36864, 36865, - 36867, 36608, 36672, 36673, 36664, 0, 32768, 36864, - 36865, 36867, 36608, 36672, 36673, 36664, 0, 32768, - 36864, 36865, 36867, 36608, 36672, 36673, 36664, 36666, - 0, 32768, 36864, 36865, 36867, 36608, 36672, 36673, - 36664, 0, 32768, 36864, 36865, 36867, 36608, 36672, - 36673, 36664, 36668, 0, 32768, 36864, 36865, 36867, - 36608, 36672, 36673, 36675, 36668, 0, 32768, 36864, - 36865, 36867, 36608, 36672, 36673, 36675, 36668, 36670, - 0, 32768, 36864, 36865, 36867, 36608, 0, 32768, - 36864, 36865, 36867, 36608, 36672, 0, 32768, 36864, - 36865, 36867, 36608, 36672, 0, 32768, 36864, 36865, - 36867, 36608, 36672, 36674, 0, 32768, 36864, 36865, - 36867, 36608, 36672, 0, 32768, 36864, 36865, 36867, - 36608, 36672, 36676, 0, 32768, 36864, 36865, 36867, - 36608, 36672, 36676, 0, 32768, 36864, 36865, 36867, - 36608, 36672, 36680, 36678, 0, 32768, 36864, 36865, - 36867, 36608, 36672, 0, 32768, 36864, 36865, 36867, - 36608, 36672, 36680, 0, 32768, 36864, 36865, 36867, - 36608, 36672, 36680, 0, 32768, 36864, 36865, 36867, - 36608, 36672, 36680, 36682, 0, 32768, 36864, 36865, - 36867, 36608, 36672, 36680, 0, 32768, 36864, 36865, - 36867, 36608, 36672, 36688, 36684, 0, 32768, 36864, - 36865, 36867, 36608, 36672, 36688, 36684, 0, 32768, - 36864, 36865, 36867, 36608, 36672, 36688, 36689, 36686, - 0, 32768, 36864, 36865, 36867, 36608, 36672, 0, - 32768, 36864, 36865, 36867, 36608, 36672, 36688, 0, - 32768, 36864, 36865, 36867, 36608, 36672, 36688, 0, - 32768, 36864, 36865, 36867, 36608, 36672, 36688, 36690, - 0, 32768, 36864, 36865, 36867, 36608, 36672, 36688, - 0, 32768, 36864, 36865, 36867, 36608, 36672, 36688, - 36692, 0, 32768, 36864, 36865, 36867, 36608, 36672, - 36688, 36692, 0, 32768, 36864, 36865, 36867, 36608, - 36672, 36688, 36696, 36694, 0, 32768, 36864, 36865, - 36867, 36608, 36672, 36688, 0, 32768, 36864, 36865, - 36867, 36608, 36672, 36704, 36696, 0, 32768, 36864, - 36865, 36867, 36608, 36672, 36704, 36696, 0, 32768, - 36864, 36865, 36867, 36608, 36672, 36704, 36696, 36698, - 0, 32768, 36864, 36865, 36867, 36608, 36672, 36704, - 36696, 0, 32768, 36864, 36865, 36867, 36608, 36672, - 36704, 36705, 36700, 0, 32768, 36864, 36865, 36867, - 36608, 36672, 36704, 36705, 36700, 0, 32768, 36864, - 36865, 36867, 36608, 36672, 36704, 36705, 36700, 36702, - 0, 32768, 36864, 36865, 36867, 36608, 36672, 0, - 32768, 36864, 36865, 36867, 36608, 36736, 36704, 0, - 32768, 36864, 36865, 36867, 36608, 36736, 36704, 0, - 32768, 36864, 36865, 36867, 36608, 36736, 36704, 36706, - 0, 32768, 36864, 36865, 36867, 36608, 36736, 36704, - 0, 32768, 36864, 36865, 36867, 36608, 36736, 36704, - 36708, 0, 32768, 36864, 36865, 36867, 36608, 36736, - 36704, 36708, 0, 32768, 36864, 36865, 36867, 36608, - 36736, 36704, 36712, 36710, 0, 32768, 36864, 36865, - 36867, 36608, 36736, 36704, 0, 32768, 36864, 36865, - 36867, 36608, 36736, 36704, 36712, 0, 32768, 36864, - 36865, 36867, 36608, 36736, 36704, 36712, 0, 32768, - 36864, 36865, 36867, 36608, 36736, 36704, 36712, 36714, - 0, 32768, 36864, 36865, 36867, 36608, 36736, 36704, - 36712, 0, 32768, 36864, 36865, 36867, 36608, 36736, - 36704, 36720, 36716, 0, 32768, 36864, 36865, 36867, - 36608, 36736, 36704, 36720, 36716, 0, 32768, 36864, - 36865, 36867, 36608, 36736, 36704, 36720, 36721, 36718, - 0, 32768, 36864, 36865, 36867, 36608, 36736, 36704, - 0, 32768, 36864, 36865, 36867, 36608, 36736, 36737, - 36720, 0, 32768, 36864, 36865, 36867, 36608, 36736, - 36737, 36720, 0, 32768, 36864, 36865, 36867, 36608, - 36736, 36737, 36720, 36722, 0, 32768, 36864, 36865, - 36867, 36608, 36736, 36737, 36720, 0, 32768, 36864, - 36865, 36867, 36608, 36736, 36737, 36720, 36724, 0, - 32768, 36864, 36865, 36867, 36608, 36736, 36737, 36720, - 36724, 0, 32768, 36864, 36865, 36867, 36608, 36736, - 36737, 36720, 36728, 36726, 0, 32768, 36864, 36865, - 36867, 36608, 36736, 36737, 36720, 0, 32768, 36864, - 36865, 36867, 36608, 36736, 36737, 36720, 36728, 0, - 32768, 36864, 36865, 36867, 36608, 36736, 36737, 36739, - 36728, 0, 32768, 36864, 36865, 36867, 36608, 36736, - 36737, 36739, 36728, 36730, 0, 32768, 36864, 36865, - 36867, 36608, 36736, 36737, 36739, 36728, 0, 32768, - 36864, 36865, 36867, 36608, 36736, 36737, 36739, 36728, - 36732, 0, 32768, 36864, 36865, 36867, 36608, 36736, - 36737, 36739, 36728, 36732, 0, 32768, 36864, 36865, - 36867, 36608, 36736, 36737, 36739, 36728, 36732, 36734, - 0, 32768, 36864, 36865, 36867, 36608, 0, 32768, - 36864, 36865, 36867, 36608, 36736, 0, 32768, 36864, - 36865, 36867, 36608, 36736, 0, 32768, 36864, 36865, - 36867, 36608, 36736, 36738, 0, 32768, 36864, 36865, - 36867, 36608, 36736, 0, 32768, 36864, 36865, 36867, - 36608, 36736, 36740, 0, 32768, 36864, 36865, 36867, - 36608, 36736, 36740, 0, 32768, 36864, 36865, 36867, - 36608, 36736, 36744, 36742, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 0, 32768, 36864, 36865, 36867, - 36871, 36736, 36744, 0, 32768, 36864, 36865, 36867, - 36871, 36736, 36744, 0, 32768, 36864, 36865, 36867, - 36871, 36736, 36744, 36746, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36744, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36752, 36748, 0, 32768, 36864, - 36865, 36867, 36871, 36736, 36752, 36748, 0, 32768, - 36864, 36865, 36867, 36871, 36736, 36752, 36753, 36750, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 0, - 32768, 36864, 36865, 36867, 36871, 36736, 36752, 0, - 32768, 36864, 36865, 36867, 36871, 36736, 36752, 0, - 32768, 36864, 36865, 36867, 36871, 36736, 36752, 36754, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 36752, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 36752, - 36756, 0, 32768, 36864, 36865, 36867, 36871, 36736, - 36752, 36756, 0, 32768, 36864, 36865, 36867, 36871, - 36736, 36752, 36760, 36758, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36752, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36768, 36760, 0, 32768, 36864, - 36865, 36867, 36871, 36736, 36768, 36760, 0, 32768, - 36864, 36865, 36867, 36871, 36736, 36768, 36760, 36762, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 36768, - 36760, 0, 32768, 36864, 36865, 36867, 36871, 36736, - 36768, 36769, 36764, 0, 32768, 36864, 36865, 36867, - 36871, 36736, 36768, 36769, 36764, 0, 32768, 36864, - 36865, 36867, 36871, 36736, 36768, 36769, 36764, 36766, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 0, - 32768, 36864, 36865, 36867, 36871, 36736, 36768, 0, - 32768, 36864, 36865, 36867, 36871, 36736, 36768, 0, - 32768, 36864, 36865, 36867, 36871, 36736, 36768, 36770, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 36768, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 36768, - 36772, 0, 32768, 36864, 36865, 36867, 36871, 36736, - 36768, 36772, 0, 32768, 36864, 36865, 36867, 36871, - 36736, 36768, 36776, 36774, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36768, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36768, 36776, 0, 32768, 36864, - 36865, 36867, 36871, 36736, 36768, 36776, 0, 32768, - 36864, 36865, 36867, 36871, 36736, 36768, 36776, 36778, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 36768, - 36776, 0, 32768, 36864, 36865, 36867, 36871, 36736, - 36768, 36784, 36780, 0, 32768, 36864, 36865, 36867, - 36871, 36736, 36768, 36784, 36780, 0, 32768, 36864, - 36865, 36867, 36871, 36736, 36768, 36784, 36785, 36782, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 36768, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 36800, - 36784, 0, 32768, 36864, 36865, 36867, 36871, 36736, - 36800, 36784, 0, 32768, 36864, 36865, 36867, 36871, - 36736, 36800, 36784, 36786, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36800, 36784, 0, 32768, 36864, - 36865, 36867, 36871, 36736, 36800, 36784, 36788, 0, - 32768, 36864, 36865, 36867, 36871, 36736, 36800, 36784, - 36788, 0, 32768, 36864, 36865, 36867, 36871, 36736, - 36800, 36784, 36792, 36790, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36800, 36784, 0, 32768, 36864, - 36865, 36867, 36871, 36736, 36800, 36801, 36792, 0, - 32768, 36864, 36865, 36867, 36871, 36736, 36800, 36801, - 36792, 0, 32768, 36864, 36865, 36867, 36871, 36736, - 36800, 36801, 36792, 36794, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36800, 36801, 36792, 0, 32768, - 36864, 36865, 36867, 36871, 36736, 36800, 36801, 36792, - 36796, 0, 32768, 36864, 36865, 36867, 36871, 36736, - 36800, 36801, 36803, 36796, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36800, 36801, 36803, 36796, 36798, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 0, - 32768, 36864, 36865, 36867, 36871, 36736, 36800, 0, - 32768, 36864, 36865, 36867, 36871, 36736, 36800, 0, - 32768, 36864, 36865, 36867, 36871, 36736, 36800, 36802, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 36800, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 36800, - 36804, 0, 32768, 36864, 36865, 36867, 36871, 36736, - 36800, 36804, 0, 32768, 36864, 36865, 36867, 36871, - 36736, 36800, 36808, 36806, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36800, 0, 32768, 36864, 36865, - 36867, 36871, 36736, 36800, 36808, 0, 32768, 36864, - 36865, 36867, 36871, 36736, 36800, 36808, 0, 32768, - 36864, 36865, 36867, 36871, 36736, 36800, 36808, 36810, - 0, 32768, 36864, 36865, 36867, 36871, 36736, 36800, - 36808, 0, 32768, 36864, 36865, 36867, 36871, 36736, - 36800, 36816, 36812, 0, 32768, 36864, 36865, 36867, - 36871, 36736, 36800, 36816, 36812, 0, 32768, 36864, - 36865, 36867, 36871, 36736, 36800, 36816, 36817, 36814, - 0, 32768, 36864, 36865, 36867, 36871, 36879, 36800, - 0, 32768, 36864, 36865, 36867, 36871, 36879, 36800, - 36816, 0, 32768, 36864, 36865, 36867, 36871, 36879, - 36800, 36816, 0, 32768, 36864, 36865, 36867, 36871, - 36879, 36800, 36816, 36818, 0, 32768, 36864, 36865, - 36867, 36871, 36879, 36800, 36816, 0, 32768, 36864, - 36865, 36867, 36871, 36879, 36800, 36816, 36820, 0, - 32768, 36864, 36865, 36867, 36871, 36879, 36800, 36816, - 36820, 0, 32768, 36864, 36865, 36867, 36871, 36879, - 36800, 36816, 36824, 36822, 0, 32768, 36864, 36865, - 36867, 36871, 36879, 36800, 36816, 0, 32768, 36864, - 36865, 36867, 36871, 36879, 36800, 36832, 36824, 0, - 32768, 36864, 36865, 36867, 36871, 36879, 36800, 36832, - 36824, 0, 32768, 36864, 36865, 36867, 36871, 36879, - 36800, 36832, 36824, 36826, 0, 32768, 36864, 36865, - 36867, 36871, 36879, 36800, 36832, 36824, 0, 32768, - 36864, 36865, 36867, 36871, 36879, 36800, 36832, 36833, - 36828, 0, 32768, 36864, 36865, 36867, 36871, 36879, - 36800, 36832, 36833, 36828, 0, 32768, 36864, 36865, - 36867, 36871, 36879, 36800, 36832, 36833, 36828, 36830, - 0, 32768, 36864, 36865, 36867, 36871, 36879, 36800, - 0, 32768, 36864, 36865, 36867, 36871, 36879, 36800, - 36832, 0, 32768, 36864, 36865, 36867, 36871, 36879, - 36800, 36832, 0, 32768, 36864, 36865, 36867, 36871, - 36879, 36800, 36832, 36834, 0, 32768, 36864, 36865, - 36867, 36871, 36879, 36800, 36832, 0, 32768, 36864, - 36865, 36867, 36871, 36879, 36800, 36832, 36836, 0, - 32768, 36864, 36865, 36867, 36871, 36879, 36800, 36832, - 36836, 0, 32768, 36864, 36865, 36867, 36871, 36879, - 36800, 36832, 36840, 36838, 0, 32768, 36864, 36865, - 36867, 36871, 36879, 36800, 36832, 0, 32768, 36864, - 36865, 36867, 36871, 36879, 36800, 36832, 36840, 0, - 32768, 36864, 36865, 36867, 36871, 36879, 36800, 36832, - 36840, 0, 32768, 36864, 36865, 36867, 36871, 36879, - 36800, 36832, 36840, 36842, 0, 32768, 36864, 36865, - 36867, 36871, 36879, 36800, 36832, 36840, 0, 32768, - 36864, 36865, 36867, 36871, 36879, 36800, 36832, 36848, - 36844, 0, 32768, 36864, 36865, 36867, 36871, 36879, - 36800, 36832, 36848, 36844, 0, 32768, 36864, 36865, - 36867, 36871, 36879, 36800, 36832, 36848, 36849, 36846, - 0, 32768, 36864, 36865, 36867, 36871, 36879, 36800, - 36832, 0, 32768, 36864, 36865, 36867, 36871, 36879, - 36800, 36832, 36848, 0, 32768, 36864, 36865, 36867, - 36871, 36879, 36800, 36832, 36848, 0, 32768, 36864, - 36865, 36867, 36871, 36879, 36800, 36832, 36848, 36850, - 0, 32768, 36864, 36865, 36867, 36871, 36879, 36800, - 36832, 36848, 0, 32768, 36864, 36865, 36867, 36871, - 36879, 36800, 36832, 36848, 36852, 0, 32768, 36864, - 36865, 36867, 36871, 36879, 36800, 36832, 36848, 36852, - 0, 32768, 36864, 36865, 36867, 36871, 36879, 36800, - 36832, 36848, 36856, 36854, 0, 32768, 36864, 36865, - 36867, 36871, 36879, 36800, 36832, 36848, 0, 32768, - 36864, 36865, 36867, 36871, 36879, 36800, 36832, 36848, - 36856, 0, 32768, 36864, 36865, 36867, 36871, 36879, - 36800, 36832, 36848, 36856, 0, 32768, 36864, 36865, - 36867, 36871, 36879, 36800, 36832, 36848, 36856, 36858, - 0, 32768, 36864, 36865, 36867, 36871, 36879, 36800, - 36832, 36848, 36856, 0, 32768, 36864, 36865, 36867, - 36871, 36879, 36800, 36832, 36848, 36856, 36860, 0, - 32768, 36864, 36865, 36867, 36871, 36879, 36800, 36832, - 36848, 36856, 36860, 0, 32768, 36864, 36865, 36867, - 36871, 36879, 36800, 36832, 36848, 36856, 36860, 36862, - 0, 32768, 0, 32768, 36864, 0, 32768, 36864, - 0, 32768, 36864, 36866, 0, 32768, 36864, 0, - 32768, 36864, 36868, 0, 32768, 36864, 36868, 0, - 32768, 36864, 36872, 36870, 0, 32768, 36864, 0, - 32768, 36864, 36872, 0, 32768, 36864, 36872, 0, - 32768, 36864, 36872, 36874, 0, 32768, 36864, 36872, - 0, 32768, 36864, 36880, 36876, 0, 32768, 36864, - 36880, 36876, 0, 32768, 36864, 36880, 36881, 36878, - 0, 32768, 36864, 0, 32768, 36864, 36880, 0, - 32768, 36864, 36880, 0, 32768, 36864, 36880, 36882, - 0, 32768, 36864, 36880, 0, 32768, 36864, 36880, - 36884, 0, 32768, 36864, 36880, 36884, 0, 32768, - 36864, 36880, 36888, 36886, 0, 32768, 36864, 36880, - 0, 32768, 36864, 36896, 36888, 0, 32768, 36864, - 36896, 36888, 0, 32768, 36864, 36896, 36888, 36890, - 0, 32768, 36864, 36896, 36888, 0, 32768, 36864, - 36896, 36897, 36892, 0, 32768, 36864, 36896, 36897, - 36892, 0, 32768, 36864, 36896, 36897, 36892, 36894, - 0, 32768, 36864, 0, 32768, 36864, 36896, 0, - 32768, 36864, 36896, 0, 32768, 36864, 36896, 36898, - 0, 32768, 36864, 36896, 0, 32768, 36864, 36896, - 36900, 0, 32768, 36864, 36896, 36900, 0, 32768, - 36864, 36896, 36904, 36902, 0, 32768, 36864, 36896, - 0, 32768, 36864, 36896, 36904, 0, 32768, 36864, - 36896, 36904, 0, 32768, 36864, 36896, 36904, 36906, - 0, 32768, 36864, 36896, 36904, 0, 32768, 36864, - 36896, 36912, 36908, 0, 32768, 36864, 36896, 36912, - 36908, 0, 32768, 36864, 36896, 36912, 36913, 36910, - 0, 32768, 36864, 36896, 0, 32768, 36864, 36928, - 36912, 0, 32768, 36864, 36928, 36912, 0, 32768, - 36864, 36928, 36912, 36914, 0, 32768, 36864, 36928, - 36912, 0, 32768, 36864, 36928, 36912, 36916, 0, - 32768, 36864, 36928, 36912, 36916, 0, 32768, 36864, - 36928, 36912, 36920, 36918, 0, 32768, 36864, 36928, - 36912, 0, 32768, 36864, 36928, 36929, 36920, 0, - 32768, 36864, 36928, 36929, 36920, 0, 32768, 36864, - 36928, 36929, 36920, 36922, 0, 32768, 36864, 36928, - 36929, 36920, 0, 32768, 36864, 36928, 36929, 36920, - 36924, 0, 32768, 36864, 36928, 36929, 36931, 36924, - 0, 32768, 36864, 36928, 36929, 36931, 36924, 36926, - 0, 32768, 36864, 0, 32768, 36864, 36928, 0, - 32768, 36864, 36928, 0, 32768, 36864, 36928, 36930, - 0, 32768, 36864, 36928, 0, 32768, 36864, 36928, - 36932, 0, 32768, 36864, 36928, 36932, 0, 32768, - 36864, 36928, 36936, 36934, 0, 32768, 36864, 36928, - 0, 32768, 36864, 36928, 36936, 0, 32768, 36864, - 36928, 36936, 0, 32768, 36864, 36928, 36936, 36938, - 0, 32768, 36864, 36928, 36936, 0, 32768, 36864, - 36928, 36944, 36940, 0, 32768, 36864, 36928, 36944, - 36940, 0, 32768, 36864, 36928, 36944, 36945, 36942, - 0, 32768, 36864, 36928, 0, 32768, 36864, 36928, - 36944, 0, 32768, 36864, 36928, 36944, 0, 32768, - 36864, 36928, 36944, 36946, 0, 32768, 36864, 36928, - 36944, 0, 32768, 36864, 36928, 36944, 36948, 0, - 32768, 36864, 36928, 36944, 36948, 0, 32768, 36864, - 36928, 36944, 36952, 36950, 0, 32768, 36864, 36928, - 36944, 0, 32768, 36864, 36928, 36960, 36952, 0, - 32768, 36864, 36928, 36960, 36952, 0, 32768, 36864, - 36928, 36960, 36952, 36954, 0, 32768, 36864, 36928, - 36960, 36952, 0, 32768, 36864, 36928, 36960, 36961, - 36956, 0, 32768, 36864, 36928, 36960, 36961, 36956, - 0, 32768, 36864, 36928, 36960, 36961, 36956, 36958, - 0, 32768, 36864, 36928, 0, 32768, 36864, 36992, - 36960, 0, 32768, 36864, 36992, 36960, 0, 32768, - 36864, 36992, 36960, 36962, 0, 32768, 36864, 36992, - 36960, 0, 32768, 36864, 36992, 36960, 36964, 0, - 32768, 36864, 36992, 36960, 36964, 0, 32768, 36864, - 36992, 36960, 36968, 36966, 0, 32768, 36864, 36992, - 36960, 0, 32768, 36864, 36992, 36960, 36968, 0, - 32768, 36864, 36992, 36960, 36968, 0, 32768, 36864, - 36992, 36960, 36968, 36970, 0, 32768, 36864, 36992, - 36960, 36968, 0, 32768, 36864, 36992, 36960, 36976, - 36972, 0, 32768, 36864, 36992, 36960, 36976, 36972, - 0, 32768, 36864, 36992, 36960, 36976, 36977, 36974, - 0, 32768, 36864, 36992, 36960, 0, 32768, 36864, - 36992, 36993, 36976, 0, 32768, 36864, 36992, 36993, - 36976, 0, 32768, 36864, 36992, 36993, 36976, 36978, - 0, 32768, 36864, 36992, 36993, 36976, 0, 32768, - 36864, 36992, 36993, 36976, 36980, 0, 32768, 36864, - 36992, 36993, 36976, 36980, 0, 32768, 36864, 36992, - 36993, 36976, 36984, 36982, 0, 32768, 36864, 36992, - 36993, 36976, 0, 32768, 36864, 36992, 36993, 36976, - 36984, 0, 32768, 36864, 36992, 36993, 36995, 36984, - 0, 32768, 36864, 36992, 36993, 36995, 36984, 36986, - 0, 32768, 36864, 36992, 36993, 36995, 36984, 0, - 32768, 36864, 36992, 36993, 36995, 36984, 36988, 0, - 32768, 36864, 36992, 36993, 36995, 36984, 36988, 0, - 32768, 36864, 36992, 36993, 36995, 36984, 36988, 36990, - 0, 32768, 36864, 0, 32768, 36864, 36992, 0, - 32768, 36864, 36992, 0, 32768, 36864, 36992, 36994, - 0, 32768, 36864, 36992, 0, 32768, 36864, 36992, - 36996, 0, 32768, 36864, 36992, 36996, 0, 32768, - 36864, 36992, 37000, 36998, 0, 32768, 36864, 36992, - 0, 32768, 36864, 36992, 37000, 0, 32768, 36864, - 36992, 37000, 0, 32768, 36864, 36992, 37000, 37002, - 0, 32768, 36864, 36992, 37000, 0, 32768, 36864, - 36992, 37008, 37004, 0, 32768, 36864, 36992, 37008, - 37004, 0, 32768, 36864, 36992, 37008, 37009, 37006, - 0, 32768, 36864, 36992, 0, 32768, 36864, 36992, - 37008, 0, 32768, 36864, 36992, 37008, 0, 32768, - 36864, 36992, 37008, 37010, 0, 32768, 36864, 36992, - 37008, 0, 32768, 36864, 36992, 37008, 37012, 0, - 32768, 36864, 36992, 37008, 37012, 0, 32768, 36864, - 36992, 37008, 37016, 37014, 0, 32768, 36864, 36992, - 37008, 0, 32768, 36864, 36992, 37024, 37016, 0, - 32768, 36864, 36992, 37024, 37016, 0, 32768, 36864, - 36992, 37024, 37016, 37018, 0, 32768, 36864, 36992, - 37024, 37016, 0, 32768, 36864, 36992, 37024, 37025, - 37020, 0, 32768, 36864, 36992, 37024, 37025, 37020, - 0, 32768, 36864, 36992, 37024, 37025, 37020, 37022, - 0, 32768, 36864, 36992, 0, 32768, 36864, 36992, - 37024, 0, 32768, 36864, 36992, 37024, 0, 32768, - 36864, 36992, 37024, 37026, 0, 32768, 36864, 36992, - 37024, 0, 32768, 36864, 36992, 37024, 37028, 0, - 32768, 36864, 36992, 37024, 37028, 0, 32768, 36864, - 36992, 37024, 37032, 37030, 0, 32768, 36864, 36992, - 37024, 0, 32768, 36864, 36992, 37024, 37032, 0, - 32768, 36864, 36992, 37024, 37032, 0, 32768, 36864, - 36992, 37024, 37032, 37034, 0, 32768, 36864, 36992, - 37024, 37032, 0, 32768, 36864, 36992, 37024, 37040, - 37036, 0, 32768, 36864, 36992, 37024, 37040, 37036, - 0, 32768, 36864, 36992, 37024, 37040, 37041, 37038, - 0, 32768, 36864, 36992, 37024, 0, 32768, 36864, - 36992, 37056, 37040, 0, 32768, 36864, 36992, 37056, - 37040, 0, 32768, 36864, 36992, 37056, 37040, 37042, - 0, 32768, 36864, 36992, 37056, 37040, 0, 32768, - 36864, 36992, 37056, 37040, 37044, 0, 32768, 36864, - 36992, 37056, 37040, 37044, 0, 32768, 36864, 36992, - 37056, 37040, 37048, 37046, 0, 32768, 36864, 36992, - 37056, 37040, 0, 32768, 36864, 36992, 37056, 37057, - 37048, 0, 32768, 36864, 36992, 37056, 37057, 37048, - 0, 32768, 36864, 36992, 37056, 37057, 37048, 37050, - 0, 32768, 36864, 36992, 37056, 37057, 37048, 0, - 32768, 36864, 36992, 37056, 37057, 37048, 37052, 0, - 32768, 36864, 36992, 37056, 37057, 37059, 37052, 0, - 32768, 36864, 36992, 37056, 37057, 37059, 37052, 37054, - 0, 32768, 36864, 36992, 0, 32768, 36864, 37120, - 37056, 0, 32768, 36864, 37120, 37056, 0, 32768, - 36864, 37120, 37056, 37058, 0, 32768, 36864, 37120, - 37056, 0, 32768, 36864, 37120, 37056, 37060, 0, - 32768, 36864, 37120, 37056, 37060, 0, 32768, 36864, - 37120, 37056, 37064, 37062, 0, 32768, 36864, 37120, - 37056, 0, 32768, 36864, 37120, 37056, 37064, 0, - 32768, 36864, 37120, 37056, 37064, 0, 32768, 36864, - 37120, 37056, 37064, 37066, 0, 32768, 36864, 37120, - 37056, 37064, 0, 32768, 36864, 37120, 37056, 37072, - 37068, 0, 32768, 36864, 37120, 37056, 37072, 37068, - 0, 32768, 36864, 37120, 37056, 37072, 37073, 37070, - 0, 32768, 36864, 37120, 37056, 0, 32768, 36864, - 37120, 37056, 37072, 0, 32768, 36864, 37120, 37056, - 37072, 0, 32768, 36864, 37120, 37056, 37072, 37074, - 0, 32768, 36864, 37120, 37056, 37072, 0, 32768, - 36864, 37120, 37056, 37072, 37076, 0, 32768, 36864, - 37120, 37056, 37072, 37076, 0, 32768, 36864, 37120, - 37056, 37072, 37080, 37078, 0, 32768, 36864, 37120, - 37056, 37072, 0, 32768, 36864, 37120, 37056, 37088, - 37080, 0, 32768, 36864, 37120, 37056, 37088, 37080, - 0, 32768, 36864, 37120, 37056, 37088, 37080, 37082, - 0, 32768, 36864, 37120, 37056, 37088, 37080, 0, - 32768, 36864, 37120, 37056, 37088, 37089, 37084, 0, - 32768, 36864, 37120, 37056, 37088, 37089, 37084, 0, - 32768, 36864, 37120, 37056, 37088, 37089, 37084, 37086, - 0, 32768, 36864, 37120, 37056, 0, 32768, 36864, - 37120, 37121, 37088, 0, 32768, 36864, 37120, 37121, - 37088, 0, 32768, 36864, 37120, 37121, 37088, 37090, - 0, 32768, 36864, 37120, 37121, 37088, 0, 32768, - 36864, 37120, 37121, 37088, 37092, 0, 32768, 36864, - 37120, 37121, 37088, 37092, 0, 32768, 36864, 37120, - 37121, 37088, 37096, 37094, 0, 32768, 36864, 37120, - 37121, 37088, 0, 32768, 36864, 37120, 37121, 37088, - 37096, 0, 32768, 36864, 37120, 37121, 37088, 37096, - 0, 32768, 36864, 37120, 37121, 37088, 37096, 37098, - 0, 32768, 36864, 37120, 37121, 37088, 37096, 0, - 32768, 36864, 37120, 37121, 37088, 37104, 37100, 0, - 32768, 36864, 37120, 37121, 37088, 37104, 37100, 0, - 32768, 36864, 37120, 37121, 37088, 37104, 37105, 37102, - 0, 32768, 36864, 37120, 37121, 37088, 0, 32768, - 36864, 37120, 37121, 37088, 37104, 0, 32768, 36864, - 37120, 37121, 37123, 37104, 0, 32768, 36864, 37120, - 37121, 37123, 37104, 37106, 0, 32768, 36864, 37120, - 37121, 37123, 37104, 0, 32768, 36864, 37120, 37121, - 37123, 37104, 37108, 0, 32768, 36864, 37120, 37121, - 37123, 37104, 37108, 0, 32768, 36864, 37120, 37121, - 37123, 37104, 37112, 37110, 0, 32768, 36864, 37120, - 37121, 37123, 37104, 0, 32768, 36864, 37120, 37121, - 37123, 37104, 37112, 0, 32768, 36864, 37120, 37121, - 37123, 37104, 37112, 0, 32768, 36864, 37120, 37121, - 37123, 37104, 37112, 37114, 0, 32768, 36864, 37120, - 37121, 37123, 37127, 37112, 0, 32768, 36864, 37120, - 37121, 37123, 37127, 37112, 37116, 0, 32768, 36864, - 37120, 37121, 37123, 37127, 37112, 37116, 0, 32768, - 36864, 37120, 37121, 37123, 37127, 37112, 37116, 37118, - 0, 32768, 36864, 0, 32768, 36864, 37120, 0, - 32768, 36864, 37120, 0, 32768, 36864, 37120, 37122, - 0, 32768, 36864, 37120, 0, 32768, 36864, 37120, - 37124, 0, 32768, 36864, 37120, 37124, 0, 32768, - 36864, 37120, 37128, 37126, 0, 32768, 36864, 37120, - 0, 32768, 36864, 37120, 37128, 0, 32768, 36864, - 37120, 37128, 0, 32768, 36864, 37120, 37128, 37130, - 0, 32768, 36864, 37120, 37128, 0, 32768, 36864, - 37120, 37136, 37132, 0, 32768, 36864, 37120, 37136, - 37132, 0, 32768, 36864, 37120, 37136, 37137, 37134, - 0, 32768, 36864, 37120, 0, 32768, 36864, 37120, - 37136, 0, 32768, 36864, 37120, 37136, 0, 32768, - 36864, 37120, 37136, 37138, 0, 32768, 36864, 37120, - 37136, 0, 32768, 36864, 37120, 37136, 37140, 0, - 32768, 36864, 37120, 37136, 37140, 0, 32768, 36864, - 37120, 37136, 37144, 37142, 0, 32768, 36864, 37120, - 37136, 0, 32768, 36864, 37120, 37152, 37144, 0, - 32768, 36864, 37120, 37152, 37144, 0, 32768, 36864, - 37120, 37152, 37144, 37146, 0, 32768, 36864, 37120, - 37152, 37144, 0, 32768, 36864, 37120, 37152, 37153, - 37148, 0, 32768, 36864, 37120, 37152, 37153, 37148, - 0, 32768, 36864, 37120, 37152, 37153, 37148, 37150, - 0, 32768, 36864, 37120, 0, 32768, 36864, 37120, - 37152, 0, 32768, 36864, 37120, 37152, 0, 32768, - 36864, 37120, 37152, 37154, 0, 32768, 36864, 37120, - 37152, 0, 32768, 36864, 37120, 37152, 37156, 0, - 32768, 36864, 37120, 37152, 37156, 0, 32768, 36864, - 37120, 37152, 37160, 37158, 0, 32768, 36864, 37120, - 37152, 0, 32768, 36864, 37120, 37152, 37160, 0, - 32768, 36864, 37120, 37152, 37160, 0, 32768, 36864, - 37120, 37152, 37160, 37162, 0, 32768, 36864, 37120, - 37152, 37160, 0, 32768, 36864, 37120, 37152, 37168, - 37164, 0, 32768, 36864, 37120, 37152, 37168, 37164, - 0, 32768, 36864, 37120, 37152, 37168, 37169, 37166, - 0, 32768, 36864, 37120, 37152, 0, 32768, 36864, - 37120, 37184, 37168, 0, 32768, 36864, 37120, 37184, - 37168, 0, 32768, 36864, 37120, 37184, 37168, 37170, - 0, 32768, 36864, 37120, 37184, 37168, 0, 32768, - 36864, 37120, 37184, 37168, 37172, 0, 32768, 36864, - 37120, 37184, 37168, 37172, 0, 32768, 36864, 37120, - 37184, 37168, 37176, 37174, 0, 32768, 36864, 37120, - 37184, 37168, 0, 32768, 36864, 37120, 37184, 37185, - 37176, 0, 32768, 36864, 37120, 37184, 37185, 37176, - 0, 32768, 36864, 37120, 37184, 37185, 37176, 37178, - 0, 32768, 36864, 37120, 37184, 37185, 37176, 0, - 32768, 36864, 37120, 37184, 37185, 37176, 37180, 0, - 32768, 36864, 37120, 37184, 37185, 37187, 37180, 0, - 32768, 36864, 37120, 37184, 37185, 37187, 37180, 37182, - 0, 32768, 36864, 37120, 0, 32768, 36864, 37120, - 37184, 0, 32768, 36864, 37120, 37184, 0, 32768, - 36864, 37120, 37184, 37186, 0, 32768, 36864, 37120, - 37184, 0, 32768, 36864, 37120, 37184, 37188, 0, - 32768, 36864, 37120, 37184, 37188, 0, 32768, 36864, - 37120, 37184, 37192, 37190, 0, 32768, 36864, 37120, - 37184, 0, 32768, 36864, 37120, 37184, 37192, 0, - 32768, 36864, 37120, 37184, 37192, 0, 32768, 36864, - 37120, 37184, 37192, 37194, 0, 32768, 36864, 37120, - 37184, 37192, 0, 32768, 36864, 37120, 37184, 37200, - 37196, 0, 32768, 36864, 37120, 37184, 37200, 37196, - 0, 32768, 36864, 37120, 37184, 37200, 37201, 37198, - 0, 32768, 36864, 37120, 37184, 0, 32768, 36864, - 37120, 37184, 37200, 0, 32768, 36864, 37120, 37184, - 37200, 0, 32768, 36864, 37120, 37184, 37200, 37202, - 0, 32768, 36864, 37120, 37184, 37200, 0, 32768, - 36864, 37120, 37184, 37200, 37204, 0, 32768, 36864, - 37120, 37184, 37200, 37204, 0, 32768, 36864, 37120, - 37184, 37200, 37208, 37206, 0, 32768, 36864, 37120, - 37184, 37200, 0, 32768, 36864, 37120, 37184, 37216, - 37208, 0, 32768, 36864, 37120, 37184, 37216, 37208, - 0, 32768, 36864, 37120, 37184, 37216, 37208, 37210, - 0, 32768, 36864, 37120, 37184, 37216, 37208, 0, - 32768, 36864, 37120, 37184, 37216, 37217, 37212, 0, - 32768, 36864, 37120, 37184, 37216, 37217, 37212, 0, - 32768, 36864, 37120, 37184, 37216, 37217, 37212, 37214, - 0, 32768, 36864, 37120, 37184, 0, 32768, 36864, - 37120, 37248, 37216, 0, 32768, 36864, 37120, 37248, - 37216, 0, 32768, 36864, 37120, 37248, 37216, 37218, - 0, 32768, 36864, 37120, 37248, 37216, 0, 32768, - 36864, 37120, 37248, 37216, 37220, 0, 32768, 36864, - 37120, 37248, 37216, 37220, 0, 32768, 36864, 37120, - 37248, 37216, 37224, 37222, 0, 32768, 36864, 37120, - 37248, 37216, 0, 32768, 36864, 37120, 37248, 37216, - 37224, 0, 32768, 36864, 37120, 37248, 37216, 37224, - 0, 32768, 36864, 37120, 37248, 37216, 37224, 37226, - 0, 32768, 36864, 37120, 37248, 37216, 37224, 0, - 32768, 36864, 37120, 37248, 37216, 37232, 37228, 0, - 32768, 36864, 37120, 37248, 37216, 37232, 37228, 0, - 32768, 36864, 37120, 37248, 37216, 37232, 37233, 37230, - 0, 32768, 36864, 37120, 37248, 37216, 0, 32768, - 36864, 37120, 37248, 37249, 37232, 0, 32768, 36864, - 37120, 37248, 37249, 37232, 0, 32768, 36864, 37120, - 37248, 37249, 37232, 37234, 0, 32768, 36864, 37120, - 37248, 37249, 37232, 0, 32768, 36864, 37120, 37248, - 37249, 37232, 37236, 0, 32768, 36864, 37120, 37248, - 37249, 37232, 37236, 0, 32768, 36864, 37120, 37248, - 37249, 37232, 37240, 37238, 0, 32768, 36864, 37120, - 37248, 37249, 37232, 0, 32768, 36864, 37120, 37248, - 37249, 37232, 37240, 0, 32768, 36864, 37120, 37248, - 37249, 37251, 37240, 0, 32768, 36864, 37120, 37248, - 37249, 37251, 37240, 37242, 0, 32768, 36864, 37120, - 37248, 37249, 37251, 37240, 0, 32768, 36864, 37120, - 37248, 37249, 37251, 37240, 37244, 0, 32768, 36864, - 37120, 37248, 37249, 37251, 37240, 37244, 0, 32768, - 36864, 37120, 37248, 37249, 37251, 37240, 37244, 37246, - 0, 32768, 36864, 37120, 0, 32768, 36864, 37376, - 37248, 0, 32768, 36864, 37376, 37248, 0, 32768, - 36864, 37376, 37248, 37250, 0, 32768, 36864, 37376, - 37248, 0, 32768, 36864, 37376, 37248, 37252, 0, - 32768, 36864, 37376, 37248, 37252, 0, 32768, 36864, - 37376, 37248, 37256, 37254, 0, 32768, 36864, 37376, - 37248, 0, 32768, 36864, 37376, 37248, 37256, 0, - 32768, 36864, 37376, 37248, 37256, 0, 32768, 36864, - 37376, 37248, 37256, 37258, 0, 32768, 36864, 37376, - 37248, 37256, 0, 32768, 36864, 37376, 37248, 37264, - 37260, 0, 32768, 36864, 37376, 37248, 37264, 37260, - 0, 32768, 36864, 37376, 37248, 37264, 37265, 37262, - 0, 32768, 36864, 37376, 37248, 0, 32768, 36864, - 37376, 37248, 37264, 0, 32768, 36864, 37376, 37248, - 37264, 0, 32768, 36864, 37376, 37248, 37264, 37266, - 0, 32768, 36864, 37376, 37248, 37264, 0, 32768, - 36864, 37376, 37248, 37264, 37268, 0, 32768, 36864, - 37376, 37248, 37264, 37268, 0, 32768, 36864, 37376, - 37248, 37264, 37272, 37270, 0, 32768, 36864, 37376, - 37248, 37264, 0, 32768, 36864, 37376, 37248, 37280, - 37272, 0, 32768, 36864, 37376, 37248, 37280, 37272, - 0, 32768, 36864, 37376, 37248, 37280, 37272, 37274, - 0, 32768, 36864, 37376, 37248, 37280, 37272, 0, - 32768, 36864, 37376, 37248, 37280, 37281, 37276, 0, - 32768, 36864, 37376, 37248, 37280, 37281, 37276, 0, - 32768, 36864, 37376, 37248, 37280, 37281, 37276, 37278, - 0, 32768, 36864, 37376, 37248, 0, 32768, 36864, - 37376, 37248, 37280, 0, 32768, 36864, 37376, 37248, - 37280, 0, 32768, 36864, 37376, 37248, 37280, 37282, - 0, 32768, 36864, 37376, 37248, 37280, 0, 32768, - 36864, 37376, 37248, 37280, 37284, 0, 32768, 36864, - 37376, 37248, 37280, 37284, 0, 32768, 36864, 37376, - 37248, 37280, 37288, 37286, 0, 32768, 36864, 37376, - 37248, 37280, 0, 32768, 36864, 37376, 37248, 37280, - 37288, 0, 32768, 36864, 37376, 37248, 37280, 37288, - 0, 32768, 36864, 37376, 37248, 37280, 37288, 37290, - 0, 32768, 36864, 37376, 37248, 37280, 37288, 0, - 32768, 36864, 37376, 37248, 37280, 37296, 37292, 0, - 32768, 36864, 37376, 37248, 37280, 37296, 37292, 0, - 32768, 36864, 37376, 37248, 37280, 37296, 37297, 37294, - 0, 32768, 36864, 37376, 37248, 37280, 0, 32768, - 36864, 37376, 37248, 37312, 37296, 0, 32768, 36864, - 37376, 37248, 37312, 37296, 0, 32768, 36864, 37376, - 37248, 37312, 37296, 37298, 0, 32768, 36864, 37376, - 37248, 37312, 37296, 0, 32768, 36864, 37376, 37248, - 37312, 37296, 37300, 0, 32768, 36864, 37376, 37248, - 37312, 37296, 37300, 0, 32768, 36864, 37376, 37248, - 37312, 37296, 37304, 37302, 0, 32768, 36864, 37376, - 37248, 37312, 37296, 0, 32768, 36864, 37376, 37248, - 37312, 37313, 37304, 0, 32768, 36864, 37376, 37248, - 37312, 37313, 37304, 0, 32768, 36864, 37376, 37248, - 37312, 37313, 37304, 37306, 0, 32768, 36864, 37376, - 37248, 37312, 37313, 37304, 0, 32768, 36864, 37376, - 37248, 37312, 37313, 37304, 37308, 0, 32768, 36864, - 37376, 37248, 37312, 37313, 37315, 37308, 0, 32768, - 36864, 37376, 37248, 37312, 37313, 37315, 37308, 37310, - 0, 32768, 36864, 37376, 37248, 0, 32768, 36864, - 37376, 37377, 37312, 0, 32768, 36864, 37376, 37377, - 37312, 0, 32768, 36864, 37376, 37377, 37312, 37314, - 0, 32768, 36864, 37376, 37377, 37312, 0, 32768, - 36864, 37376, 37377, 37312, 37316, 0, 32768, 36864, - 37376, 37377, 37312, 37316, 0, 32768, 36864, 37376, - 37377, 37312, 37320, 37318, 0, 32768, 36864, 37376, - 37377, 37312, 0, 32768, 36864, 37376, 37377, 37312, - 37320, 0, 32768, 36864, 37376, 37377, 37312, 37320, - 0, 32768, 36864, 37376, 37377, 37312, 37320, 37322, - 0, 32768, 36864, 37376, 37377, 37312, 37320, 0, - 32768, 36864, 37376, 37377, 37312, 37328, 37324, 0, - 32768, 36864, 37376, 37377, 37312, 37328, 37324, 0, - 32768, 36864, 37376, 37377, 37312, 37328, 37329, 37326, - 0, 32768, 36864, 37376, 37377, 37312, 0, 32768, - 36864, 37376, 37377, 37312, 37328, 0, 32768, 36864, - 37376, 37377, 37312, 37328, 0, 32768, 36864, 37376, - 37377, 37312, 37328, 37330, 0, 32768, 36864, 37376, - 37377, 37312, 37328, 0, 32768, 36864, 37376, 37377, - 37312, 37328, 37332, 0, 32768, 36864, 37376, 37377, - 37312, 37328, 37332, 0, 32768, 36864, 37376, 37377, - 37312, 37328, 37336, 37334, 0, 32768, 36864, 37376, - 37377, 37312, 37328, 0, 32768, 36864, 37376, 37377, - 37312, 37344, 37336, 0, 32768, 36864, 37376, 37377, - 37312, 37344, 37336, 0, 32768, 36864, 37376, 37377, - 37312, 37344, 37336, 37338, 0, 32768, 36864, 37376, - 37377, 37312, 37344, 37336, 0, 32768, 36864, 37376, - 37377, 37312, 37344, 37345, 37340, 0, 32768, 36864, - 37376, 37377, 37312, 37344, 37345, 37340, 0, 32768, - 36864, 37376, 37377, 37312, 37344, 37345, 37340, 37342, - 0, 32768, 36864, 37376, 37377, 37312, 0, 32768, - 36864, 37376, 37377, 37312, 37344, 0, 32768, 36864, - 37376, 37377, 37379, 37344, 0, 32768, 36864, 37376, - 37377, 37379, 37344, 37346, 0, 32768, 36864, 37376, - 37377, 37379, 37344, 0, 32768, 36864, 37376, 37377, - 37379, 37344, 37348, 0, 32768, 36864, 37376, 37377, - 37379, 37344, 37348, 0, 32768, 36864, 37376, 37377, - 37379, 37344, 37352, 37350, 0, 32768, 36864, 37376, - 37377, 37379, 37344, 0, 32768, 36864, 37376, 37377, - 37379, 37344, 37352, 0, 32768, 36864, 37376, 37377, - 37379, 37344, 37352, 0, 32768, 36864, 37376, 37377, - 37379, 37344, 37352, 37354, 0, 32768, 36864, 37376, - 37377, 37379, 37344, 37352, 0, 32768, 36864, 37376, - 37377, 37379, 37344, 37360, 37356, 0, 32768, 36864, - 37376, 37377, 37379, 37344, 37360, 37356, 0, 32768, - 36864, 37376, 37377, 37379, 37344, 37360, 37361, 37358, - 0, 32768, 36864, 37376, 37377, 37379, 37344, 0, - 32768, 36864, 37376, 37377, 37379, 37344, 37360, 0, - 32768, 36864, 37376, 37377, 37379, 37344, 37360, 0, - 32768, 36864, 37376, 37377, 37379, 37344, 37360, 37362, - 0, 32768, 36864, 37376, 37377, 37379, 37383, 37360, - 0, 32768, 36864, 37376, 37377, 37379, 37383, 37360, - 37364, 0, 32768, 36864, 37376, 37377, 37379, 37383, - 37360, 37364, 0, 32768, 36864, 37376, 37377, 37379, - 37383, 37360, 37368, 37366, 0, 32768, 36864, 37376, - 37377, 37379, 37383, 37360, 0, 32768, 36864, 37376, - 37377, 37379, 37383, 37360, 37368, 0, 32768, 36864, - 37376, 37377, 37379, 37383, 37360, 37368, 0, 32768, - 36864, 37376, 37377, 37379, 37383, 37360, 37368, 37370, - 0, 32768, 36864, 37376, 37377, 37379, 37383, 37360, - 37368, 0, 32768, 36864, 37376, 37377, 37379, 37383, - 37360, 37368, 37372, 0, 32768, 36864, 37376, 37377, - 37379, 37383, 37360, 37368, 37372, 0, 32768, 36864, - 37376, 37377, 37379, 37383, 37360, 37368, 37372, 37374, - 0, 32768, 36864, 0, 32768, 36864, 37376, 0, - 32768, 36864, 37376, 0, 32768, 36864, 37376, 37378, - 0, 32768, 36864, 37376, 0, 32768, 36864, 37376, - 37380, 0, 32768, 36864, 37376, 37380, 0, 32768, - 36864, 37376, 37384, 37382, 0, 32768, 36864, 37376, - 0, 32768, 36864, 37376, 37384, 0, 32768, 36864, - 37376, 37384, 0, 32768, 36864, 37376, 37384, 37386, - 0, 32768, 36864, 37376, 37384, 0, 32768, 36864, - 37376, 37392, 37388, 0, 32768, 36864, 37376, 37392, - 37388, 0, 32768, 36864, 37376, 37392, 37393, 37390, - 0, 32768, 36864, 37376, 0, 32768, 36864, 37376, - 37392, 0, 32768, 36864, 37376, 37392, 0, 32768, - 36864, 37376, 37392, 37394, 0, 32768, 36864, 37376, - 37392, 0, 32768, 36864, 37376, 37392, 37396, 0, - 32768, 36864, 37376, 37392, 37396, 0, 32768, 36864, - 37376, 37392, 37400, 37398, 0, 32768, 36864, 37376, - 37392, 0, 32768, 36864, 37376, 37408, 37400, 0, - 32768, 36864, 37376, 37408, 37400, 0, 32768, 36864, - 37376, 37408, 37400, 37402, 0, 32768, 36864, 37376, - 37408, 37400, 0, 32768, 36864, 37376, 37408, 37409, - 37404, 0, 32768, 36864, 37376, 37408, 37409, 37404, - 0, 32768, 36864, 37376, 37408, 37409, 37404, 37406, - 0, 32768, 36864, 37376, 0, 32768, 36864, 37376, - 37408, 0, 32768, 36864, 37376, 37408, 0, 32768, - 36864, 37376, 37408, 37410, 0, 32768, 36864, 37376, - 37408, 0, 32768, 36864, 37376, 37408, 37412, 0, - 32768, 36864, 37376, 37408, 37412, 0, 32768, 36864, - 37376, 37408, 37416, 37414, 0, 32768, 36864, 37376, - 37408, 0, 32768, 36864, 37376, 37408, 37416, 0, - 32768, 36864, 37376, 37408, 37416, 0, 32768, 36864, - 37376, 37408, 37416, 37418, 0, 32768, 36864, 37376, - 37408, 37416, 0, 32768, 36864, 37376, 37408, 37424, - 37420, 0, 32768, 36864, 37376, 37408, 37424, 37420, - 0, 32768, 36864, 37376, 37408, 37424, 37425, 37422, - 0, 32768, 36864, 37376, 37408, 0, 32768, 36864, - 37376, 37440, 37424, 0, 32768, 36864, 37376, 37440, - 37424, 0, 32768, 36864, 37376, 37440, 37424, 37426, - 0, 32768, 36864, 37376, 37440, 37424, 0, 32768, - 36864, 37376, 37440, 37424, 37428, 0, 32768, 36864, - 37376, 37440, 37424, 37428, 0, 32768, 36864, 37376, - 37440, 37424, 37432, 37430, 0, 32768, 36864, 37376, - 37440, 37424, 0, 32768, 36864, 37376, 37440, 37441, - 37432, 0, 32768, 36864, 37376, 37440, 37441, 37432, - 0, 32768, 36864, 37376, 37440, 37441, 37432, 37434, - 0, 32768, 36864, 37376, 37440, 37441, 37432, 0, - 32768, 36864, 37376, 37440, 37441, 37432, 37436, 0, - 32768, 36864, 37376, 37440, 37441, 37443, 37436, 0, - 32768, 36864, 37376, 37440, 37441, 37443, 37436, 37438, - 0, 32768, 36864, 37376, 0, 32768, 36864, 37376, - 37440, 0, 32768, 36864, 37376, 37440, 0, 32768, - 36864, 37376, 37440, 37442, 0, 32768, 36864, 37376, - 37440, 0, 32768, 36864, 37376, 37440, 37444, 0, - 32768, 36864, 37376, 37440, 37444, 0, 32768, 36864, - 37376, 37440, 37448, 37446, 0, 32768, 36864, 37376, - 37440, 0, 32768, 36864, 37376, 37440, 37448, 0, - 32768, 36864, 37376, 37440, 37448, 0, 32768, 36864, - 37376, 37440, 37448, 37450, 0, 32768, 36864, 37376, - 37440, 37448, 0, 32768, 36864, 37376, 37440, 37456, - 37452, 0, 32768, 36864, 37376, 37440, 37456, 37452, - 0, 32768, 36864, 37376, 37440, 37456, 37457, 37454, - 0, 32768, 36864, 37376, 37440, 0, 32768, 36864, - 37376, 37440, 37456, 0, 32768, 36864, 37376, 37440, - 37456, 0, 32768, 36864, 37376, 37440, 37456, 37458, - 0, 32768, 36864, 37376, 37440, 37456, 0, 32768, - 36864, 37376, 37440, 37456, 37460, 0, 32768, 36864, - 37376, 37440, 37456, 37460, 0, 32768, 36864, 37376, - 37440, 37456, 37464, 37462, 0, 32768, 36864, 37376, - 37440, 37456, 0, 32768, 36864, 37376, 37440, 37472, - 37464, 0, 32768, 36864, 37376, 37440, 37472, 37464, - 0, 32768, 36864, 37376, 37440, 37472, 37464, 37466, - 0, 32768, 36864, 37376, 37440, 37472, 37464, 0, - 32768, 36864, 37376, 37440, 37472, 37473, 37468, 0, - 32768, 36864, 37376, 37440, 37472, 37473, 37468, 0, - 32768, 36864, 37376, 37440, 37472, 37473, 37468, 37470, - 0, 32768, 36864, 37376, 37440, 0, 32768, 36864, - 37376, 37504, 37472, 0, 32768, 36864, 37376, 37504, - 37472, 0, 32768, 36864, 37376, 37504, 37472, 37474, - 0, 32768, 36864, 37376, 37504, 37472, 0, 32768, - 36864, 37376, 37504, 37472, 37476, 0, 32768, 36864, - 37376, 37504, 37472, 37476, 0, 32768, 36864, 37376, - 37504, 37472, 37480, 37478, 0, 32768, 36864, 37376, - 37504, 37472, 0, 32768, 36864, 37376, 37504, 37472, - 37480, 0, 32768, 36864, 37376, 37504, 37472, 37480, - 0, 32768, 36864, 37376, 37504, 37472, 37480, 37482, - 0, 32768, 36864, 37376, 37504, 37472, 37480, 0, - 32768, 36864, 37376, 37504, 37472, 37488, 37484, 0, - 32768, 36864, 37376, 37504, 37472, 37488, 37484, 0, - 32768, 36864, 37376, 37504, 37472, 37488, 37489, 37486, - 0, 32768, 36864, 37376, 37504, 37472, 0, 32768, - 36864, 37376, 37504, 37505, 37488, 0, 32768, 36864, - 37376, 37504, 37505, 37488, 0, 32768, 36864, 37376, - 37504, 37505, 37488, 37490, 0, 32768, 36864, 37376, - 37504, 37505, 37488, 0, 32768, 36864, 37376, 37504, - 37505, 37488, 37492, 0, 32768, 36864, 37376, 37504, - 37505, 37488, 37492, 0, 32768, 36864, 37376, 37504, - 37505, 37488, 37496, 37494, 0, 32768, 36864, 37376, - 37504, 37505, 37488, 0, 32768, 36864, 37376, 37504, - 37505, 37488, 37496, 0, 32768, 36864, 37376, 37504, - 37505, 37507, 37496, 0, 32768, 36864, 37376, 37504, - 37505, 37507, 37496, 37498, 0, 32768, 36864, 37376, - 37504, 37505, 37507, 37496, 0, 32768, 36864, 37376, - 37504, 37505, 37507, 37496, 37500, 0, 32768, 36864, - 37376, 37504, 37505, 37507, 37496, 37500, 0, 32768, - 36864, 37376, 37504, 37505, 37507, 37496, 37500, 37502, - 0, 32768, 36864, 37376, 0, 32768, 36864, 37376, - 37504, 0, 32768, 36864, 37376, 37504, 0, 32768, - 36864, 37376, 37504, 37506, 0, 32768, 36864, 37376, - 37504, 0, 32768, 36864, 37376, 37504, 37508, 0, - 32768, 36864, 37376, 37504, 37508, 0, 32768, 36864, - 37376, 37504, 37512, 37510, 0, 32768, 36864, 37376, - 37504, 0, 32768, 36864, 37376, 37504, 37512, 0, - 32768, 36864, 37376, 37504, 37512, 0, 32768, 36864, - 37376, 37504, 37512, 37514, 0, 32768, 36864, 37376, - 37504, 37512, 0, 32768, 36864, 37376, 37504, 37520, - 37516, 0, 32768, 36864, 37376, 37504, 37520, 37516, - 0, 32768, 36864, 37376, 37504, 37520, 37521, 37518, - 0, 32768, 36864, 37376, 37504, 0, 32768, 36864, - 37376, 37504, 37520, 0, 32768, 36864, 37376, 37504, - 37520, 0, 32768, 36864, 37376, 37504, 37520, 37522, - 0, 32768, 36864, 37376, 37504, 37520, 0, 32768, - 36864, 37376, 37504, 37520, 37524, 0, 32768, 36864, - 37376, 37504, 37520, 37524, 0, 32768, 36864, 37376, - 37504, 37520, 37528, 37526, 0, 32768, 36864, 37376, - 37504, 37520, 0, 32768, 36864, 37376, 37504, 37536, - 37528, 0, 32768, 36864, 37376, 37504, 37536, 37528, - 0, 32768, 36864, 37376, 37504, 37536, 37528, 37530, - 0, 32768, 36864, 37376, 37504, 37536, 37528, 0, - 32768, 36864, 37376, 37504, 37536, 37537, 37532, 0, - 32768, 36864, 37376, 37504, 37536, 37537, 37532, 0, - 32768, 36864, 37376, 37504, 37536, 37537, 37532, 37534, - 0, 32768, 36864, 37376, 37504, 0, 32768, 36864, - 37376, 37504, 37536, 0, 32768, 36864, 37376, 37504, - 37536, 0, 32768, 36864, 37376, 37504, 37536, 37538, - 0, 32768, 36864, 37376, 37504, 37536, 0, 32768, - 36864, 37376, 37504, 37536, 37540, 0, 32768, 36864, - 37376, 37504, 37536, 37540, 0, 32768, 36864, 37376, - 37504, 37536, 37544, 37542, 0, 32768, 36864, 37376, - 37504, 37536, 0, 32768, 36864, 37376, 37504, 37536, - 37544, 0, 32768, 36864, 37376, 37504, 37536, 37544, - 0, 32768, 36864, 37376, 37504, 37536, 37544, 37546, - 0, 32768, 36864, 37376, 37504, 37536, 37544, 0, - 32768, 36864, 37376, 37504, 37536, 37552, 37548, 0, - 32768, 36864, 37376, 37504, 37536, 37552, 37548, 0, - 32768, 36864, 37376, 37504, 37536, 37552, 37553, 37550, - 0, 32768, 36864, 37376, 37504, 37536, 0, 32768, - 36864, 37376, 37504, 37568, 37552, 0, 32768, 36864, - 37376, 37504, 37568, 37552, 0, 32768, 36864, 37376, - 37504, 37568, 37552, 37554, 0, 32768, 36864, 37376, - 37504, 37568, 37552, 0, 32768, 36864, 37376, 37504, - 37568, 37552, 37556, 0, 32768, 36864, 37376, 37504, - 37568, 37552, 37556, 0, 32768, 36864, 37376, 37504, - 37568, 37552, 37560, 37558, 0, 32768, 36864, 37376, - 37504, 37568, 37552, 0, 32768, 36864, 37376, 37504, - 37568, 37569, 37560, 0, 32768, 36864, 37376, 37504, - 37568, 37569, 37560, 0, 32768, 36864, 37376, 37504, - 37568, 37569, 37560, 37562, 0, 32768, 36864, 37376, - 37504, 37568, 37569, 37560, 0, 32768, 36864, 37376, - 37504, 37568, 37569, 37560, 37564, 0, 32768, 36864, - 37376, 37504, 37568, 37569, 37571, 37564, 0, 32768, - 36864, 37376, 37504, 37568, 37569, 37571, 37564, 37566, - 0, 32768, 36864, 37376, 37504, 0, 32768, 36864, - 37376, 37632, 37568, 0, 32768, 36864, 37376, 37632, - 37568, 0, 32768, 36864, 37376, 37632, 37568, 37570, - 0, 32768, 36864, 37376, 37632, 37568, 0, 32768, - 36864, 37376, 37632, 37568, 37572, 0, 32768, 36864, - 37376, 37632, 37568, 37572, 0, 32768, 36864, 37376, - 37632, 37568, 37576, 37574, 0, 32768, 36864, 37376, - 37632, 37568, 0, 32768, 36864, 37376, 37632, 37568, - 37576, 0, 32768, 36864, 37376, 37632, 37568, 37576, - 0, 32768, 36864, 37376, 37632, 37568, 37576, 37578, - 0, 32768, 36864, 37376, 37632, 37568, 37576, 0, - 32768, 36864, 37376, 37632, 37568, 37584, 37580, 0, - 32768, 36864, 37376, 37632, 37568, 37584, 37580, 0, - 32768, 36864, 37376, 37632, 37568, 37584, 37585, 37582, - 0, 32768, 36864, 37376, 37632, 37568, 0, 32768, - 36864, 37376, 37632, 37568, 37584, 0, 32768, 36864, - 37376, 37632, 37568, 37584, 0, 32768, 36864, 37376, - 37632, 37568, 37584, 37586, 0, 32768, 36864, 37376, - 37632, 37568, 37584, 0, 32768, 36864, 37376, 37632, - 37568, 37584, 37588, 0, 32768, 36864, 37376, 37632, - 37568, 37584, 37588, 0, 32768, 36864, 37376, 37632, - 37568, 37584, 37592, 37590, 0, 32768, 36864, 37376, - 37632, 37568, 37584, 0, 32768, 36864, 37376, 37632, - 37568, 37600, 37592, 0, 32768, 36864, 37376, 37632, - 37568, 37600, 37592, 0, 32768, 36864, 37376, 37632, - 37568, 37600, 37592, 37594, 0, 32768, 36864, 37376, - 37632, 37568, 37600, 37592, 0, 32768, 36864, 37376, - 37632, 37568, 37600, 37601, 37596, 0, 32768, 36864, - 37376, 37632, 37568, 37600, 37601, 37596, 0, 32768, - 36864, 37376, 37632, 37568, 37600, 37601, 37596, 37598, - 0, 32768, 36864, 37376, 37632, 37568, 0, 32768, - 36864, 37376, 37632, 37633, 37600, 0, 32768, 36864, - 37376, 37632, 37633, 37600, 0, 32768, 36864, 37376, - 37632, 37633, 37600, 37602, 0, 32768, 36864, 37376, - 37632, 37633, 37600, 0, 32768, 36864, 37376, 37632, - 37633, 37600, 37604, 0, 32768, 36864, 37376, 37632, - 37633, 37600, 37604, 0, 32768, 36864, 37376, 37632, - 37633, 37600, 37608, 37606, 0, 32768, 36864, 37376, - 37632, 37633, 37600, 0, 32768, 36864, 37376, 37632, - 37633, 37600, 37608, 0, 32768, 36864, 37376, 37632, - 37633, 37600, 37608, 0, 32768, 36864, 37376, 37632, - 37633, 37600, 37608, 37610, 0, 32768, 36864, 37376, - 37632, 37633, 37600, 37608, 0, 32768, 36864, 37376, - 37632, 37633, 37600, 37616, 37612, 0, 32768, 36864, - 37376, 37632, 37633, 37600, 37616, 37612, 0, 32768, - 36864, 37376, 37632, 37633, 37600, 37616, 37617, 37614, - 0, 32768, 36864, 37376, 37632, 37633, 37600, 0, - 32768, 36864, 37376, 37632, 37633, 37600, 37616, 0, - 32768, 36864, 37376, 37632, 37633, 37635, 37616, 0, - 32768, 36864, 37376, 37632, 37633, 37635, 37616, 37618, - 0, 32768, 36864, 37376, 37632, 37633, 37635, 37616, - 0, 32768, 36864, 37376, 37632, 37633, 37635, 37616, - 37620, 0, 32768, 36864, 37376, 37632, 37633, 37635, - 37616, 37620, 0, 32768, 36864, 37376, 37632, 37633, - 37635, 37616, 37624, 37622, 0, 32768, 36864, 37376, - 37632, 37633, 37635, 37616, 0, 32768, 36864, 37376, - 37632, 37633, 37635, 37616, 37624, 0, 32768, 36864, - 37376, 37632, 37633, 37635, 37616, 37624, 0, 32768, - 36864, 37376, 37632, 37633, 37635, 37616, 37624, 37626, - 0, 32768, 36864, 37376, 37632, 37633, 37635, 37639, - 37624, 0, 32768, 36864, 37376, 37632, 37633, 37635, - 37639, 37624, 37628, 0, 32768, 36864, 37376, 37632, - 37633, 37635, 37639, 37624, 37628, 0, 32768, 36864, - 37376, 37632, 37633, 37635, 37639, 37624, 37628, 37630, - 0, 32768, 36864, 37376, 0, 32768, 36864, 37888, - 37632, 0, 32768, 36864, 37888, 37632, 0, 32768, - 36864, 37888, 37632, 37634, 0, 32768, 36864, 37888, - 37632, 0, 32768, 36864, 37888, 37632, 37636, 0, - 32768, 36864, 37888, 37632, 37636, 0, 32768, 36864, - 37888, 37632, 37640, 37638, 0, 32768, 36864, 37888, - 37632, 0, 32768, 36864, 37888, 37632, 37640, 0, - 32768, 36864, 37888, 37632, 37640, 0, 32768, 36864, - 37888, 37632, 37640, 37642, 0, 32768, 36864, 37888, - 37632, 37640, 0, 32768, 36864, 37888, 37632, 37648, - 37644, 0, 32768, 36864, 37888, 37632, 37648, 37644, - 0, 32768, 36864, 37888, 37632, 37648, 37649, 37646, - 0, 32768, 36864, 37888, 37632, 0, 32768, 36864, - 37888, 37632, 37648, 0, 32768, 36864, 37888, 37632, - 37648, 0, 32768, 36864, 37888, 37632, 37648, 37650, - 0, 32768, 36864, 37888, 37632, 37648, 0, 32768, - 36864, 37888, 37632, 37648, 37652, 0, 32768, 36864, - 37888, 37632, 37648, 37652, 0, 32768, 36864, 37888, - 37632, 37648, 37656, 37654, 0, 32768, 36864, 37888, - 37632, 37648, 0, 32768, 36864, 37888, 37632, 37664, - 37656, 0, 32768, 36864, 37888, 37632, 37664, 37656, - 0, 32768, 36864, 37888, 37632, 37664, 37656, 37658, - 0, 32768, 36864, 37888, 37632, 37664, 37656, 0, - 32768, 36864, 37888, 37632, 37664, 37665, 37660, 0, - 32768, 36864, 37888, 37632, 37664, 37665, 37660, 0, - 32768, 36864, 37888, 37632, 37664, 37665, 37660, 37662, - 0, 32768, 36864, 37888, 37632, 0, 32768, 36864, - 37888, 37632, 37664, 0, 32768, 36864, 37888, 37632, - 37664, 0, 32768, 36864, 37888, 37632, 37664, 37666, - 0, 32768, 36864, 37888, 37632, 37664, 0, 32768, - 36864, 37888, 37632, 37664, 37668, 0, 32768, 36864, - 37888, 37632, 37664, 37668, 0, 32768, 36864, 37888, - 37632, 37664, 37672, 37670, 0, 32768, 36864, 37888, - 37632, 37664, 0, 32768, 36864, 37888, 37632, 37664, - 37672, 0, 32768, 36864, 37888, 37632, 37664, 37672, - 0, 32768, 36864, 37888, 37632, 37664, 37672, 37674, - 0, 32768, 36864, 37888, 37632, 37664, 37672, 0, - 32768, 36864, 37888, 37632, 37664, 37680, 37676, 0, - 32768, 36864, 37888, 37632, 37664, 37680, 37676, 0, - 32768, 36864, 37888, 37632, 37664, 37680, 37681, 37678, - 0, 32768, 36864, 37888, 37632, 37664, 0, 32768, - 36864, 37888, 37632, 37696, 37680, 0, 32768, 36864, - 37888, 37632, 37696, 37680, 0, 32768, 36864, 37888, - 37632, 37696, 37680, 37682, 0, 32768, 36864, 37888, - 37632, 37696, 37680, 0, 32768, 36864, 37888, 37632, - 37696, 37680, 37684, 0, 32768, 36864, 37888, 37632, - 37696, 37680, 37684, 0, 32768, 36864, 37888, 37632, - 37696, 37680, 37688, 37686, 0, 32768, 36864, 37888, - 37632, 37696, 37680, 0, 32768, 36864, 37888, 37632, - 37696, 37697, 37688, 0, 32768, 36864, 37888, 37632, - 37696, 37697, 37688, 0, 32768, 36864, 37888, 37632, - 37696, 37697, 37688, 37690, 0, 32768, 36864, 37888, - 37632, 37696, 37697, 37688, 0, 32768, 36864, 37888, - 37632, 37696, 37697, 37688, 37692, 0, 32768, 36864, - 37888, 37632, 37696, 37697, 37699, 37692, 0, 32768, - 36864, 37888, 37632, 37696, 37697, 37699, 37692, 37694, - 0, 32768, 36864, 37888, 37632, 0, 32768, 36864, - 37888, 37632, 37696, 0, 32768, 36864, 37888, 37632, - 37696, 0, 32768, 36864, 37888, 37632, 37696, 37698, - 0, 32768, 36864, 37888, 37632, 37696, 0, 32768, - 36864, 37888, 37632, 37696, 37700, 0, 32768, 36864, - 37888, 37632, 37696, 37700, 0, 32768, 36864, 37888, - 37632, 37696, 37704, 37702, 0, 32768, 36864, 37888, - 37632, 37696, 0, 32768, 36864, 37888, 37632, 37696, - 37704, 0, 32768, 36864, 37888, 37632, 37696, 37704, - 0, 32768, 36864, 37888, 37632, 37696, 37704, 37706, - 0, 32768, 36864, 37888, 37632, 37696, 37704, 0, - 32768, 36864, 37888, 37632, 37696, 37712, 37708, 0, - 32768, 36864, 37888, 37632, 37696, 37712, 37708, 0, - 32768, 36864, 37888, 37632, 37696, 37712, 37713, 37710, - 0, 32768, 36864, 37888, 37632, 37696, 0, 32768, - 36864, 37888, 37632, 37696, 37712, 0, 32768, 36864, - 37888, 37632, 37696, 37712, 0, 32768, 36864, 37888, - 37632, 37696, 37712, 37714, 0, 32768, 36864, 37888, - 37632, 37696, 37712, 0, 32768, 36864, 37888, 37632, - 37696, 37712, 37716, 0, 32768, 36864, 37888, 37632, - 37696, 37712, 37716, 0, 32768, 36864, 37888, 37632, - 37696, 37712, 37720, 37718, 0, 32768, 36864, 37888, - 37632, 37696, 37712, 0, 32768, 36864, 37888, 37632, - 37696, 37728, 37720, 0, 32768, 36864, 37888, 37632, - 37696, 37728, 37720, 0, 32768, 36864, 37888, 37632, - 37696, 37728, 37720, 37722, 0, 32768, 36864, 37888, - 37632, 37696, 37728, 37720, 0, 32768, 36864, 37888, - 37632, 37696, 37728, 37729, 37724, 0, 32768, 36864, - 37888, 37632, 37696, 37728, 37729, 37724, 0, 32768, - 36864, 37888, 37632, 37696, 37728, 37729, 37724, 37726, - 0, 32768, 36864, 37888, 37632, 37696, 0, 32768, - 36864, 37888, 37632, 37760, 37728, 0, 32768, 36864, - 37888, 37632, 37760, 37728, 0, 32768, 36864, 37888, - 37632, 37760, 37728, 37730, 0, 32768, 36864, 37888, - 37632, 37760, 37728, 0, 32768, 36864, 37888, 37632, - 37760, 37728, 37732, 0, 32768, 36864, 37888, 37632, - 37760, 37728, 37732, 0, 32768, 36864, 37888, 37632, - 37760, 37728, 37736, 37734, 0, 32768, 36864, 37888, - 37632, 37760, 37728, 0, 32768, 36864, 37888, 37632, - 37760, 37728, 37736, 0, 32768, 36864, 37888, 37632, - 37760, 37728, 37736, 0, 32768, 36864, 37888, 37632, - 37760, 37728, 37736, 37738, 0, 32768, 36864, 37888, - 37632, 37760, 37728, 37736, 0, 32768, 36864, 37888, - 37632, 37760, 37728, 37744, 37740, 0, 32768, 36864, - 37888, 37632, 37760, 37728, 37744, 37740, 0, 32768, - 36864, 37888, 37632, 37760, 37728, 37744, 37745, 37742, - 0, 32768, 36864, 37888, 37632, 37760, 37728, 0, - 32768, 36864, 37888, 37632, 37760, 37761, 37744, 0, - 32768, 36864, 37888, 37632, 37760, 37761, 37744, 0, - 32768, 36864, 37888, 37632, 37760, 37761, 37744, 37746, - 0, 32768, 36864, 37888, 37632, 37760, 37761, 37744, - 0, 32768, 36864, 37888, 37632, 37760, 37761, 37744, - 37748, 0, 32768, 36864, 37888, 37632, 37760, 37761, - 37744, 37748, 0, 32768, 36864, 37888, 37632, 37760, - 37761, 37744, 37752, 37750, 0, 32768, 36864, 37888, - 37632, 37760, 37761, 37744, 0, 32768, 36864, 37888, - 37632, 37760, 37761, 37744, 37752, 0, 32768, 36864, - 37888, 37632, 37760, 37761, 37763, 37752, 0, 32768, - 36864, 37888, 37632, 37760, 37761, 37763, 37752, 37754, - 0, 32768, 36864, 37888, 37632, 37760, 37761, 37763, - 37752, 0, 32768, 36864, 37888, 37632, 37760, 37761, - 37763, 37752, 37756, 0, 32768, 36864, 37888, 37632, - 37760, 37761, 37763, 37752, 37756, 0, 32768, 36864, - 37888, 37632, 37760, 37761, 37763, 37752, 37756, 37758, - 0, 32768, 36864, 37888, 37632, 0, 32768, 36864, - 37888, 37632, 37760, 0, 32768, 36864, 37888, 37889, - 37760, 0, 32768, 36864, 37888, 37889, 37760, 37762, - 0, 32768, 36864, 37888, 37889, 37760, 0, 32768, - 36864, 37888, 37889, 37760, 37764, 0, 32768, 36864, - 37888, 37889, 37760, 37764, 0, 32768, 36864, 37888, - 37889, 37760, 37768, 37766, 0, 32768, 36864, 37888, - 37889, 37760, 0, 32768, 36864, 37888, 37889, 37760, - 37768, 0, 32768, 36864, 37888, 37889, 37760, 37768, - 0, 32768, 36864, 37888, 37889, 37760, 37768, 37770, - 0, 32768, 36864, 37888, 37889, 37760, 37768, 0, - 32768, 36864, 37888, 37889, 37760, 37776, 37772, 0, - 32768, 36864, 37888, 37889, 37760, 37776, 37772, 0, - 32768, 36864, 37888, 37889, 37760, 37776, 37777, 37774, - 0, 32768, 36864, 37888, 37889, 37760, 0, 32768, - 36864, 37888, 37889, 37760, 37776, 0, 32768, 36864, - 37888, 37889, 37760, 37776, 0, 32768, 36864, 37888, - 37889, 37760, 37776, 37778, 0, 32768, 36864, 37888, - 37889, 37760, 37776, 0, 32768, 36864, 37888, 37889, - 37760, 37776, 37780, 0, 32768, 36864, 37888, 37889, - 37760, 37776, 37780, 0, 32768, 36864, 37888, 37889, - 37760, 37776, 37784, 37782, 0, 32768, 36864, 37888, - 37889, 37760, 37776, 0, 32768, 36864, 37888, 37889, - 37760, 37792, 37784, 0, 32768, 36864, 37888, 37889, - 37760, 37792, 37784, 0, 32768, 36864, 37888, 37889, - 37760, 37792, 37784, 37786, 0, 32768, 36864, 37888, - 37889, 37760, 37792, 37784, 0, 32768, 36864, 37888, - 37889, 37760, 37792, 37793, 37788, 0, 32768, 36864, - 37888, 37889, 37760, 37792, 37793, 37788, 0, 32768, - 36864, 37888, 37889, 37760, 37792, 37793, 37788, 37790, - 0, 32768, 36864, 37888, 37889, 37760, 0, 32768, - 36864, 37888, 37889, 37760, 37792, 0, 32768, 36864, - 37888, 37889, 37760, 37792, 0, 32768, 36864, 37888, - 37889, 37760, 37792, 37794, 0, 32768, 36864, 37888, - 37889, 37760, 37792, 0, 32768, 36864, 37888, 37889, - 37760, 37792, 37796, 0, 32768, 36864, 37888, 37889, - 37760, 37792, 37796, 0, 32768, 36864, 37888, 37889, - 37760, 37792, 37800, 37798, 0, 32768, 36864, 37888, - 37889, 37760, 37792, 0, 32768, 36864, 37888, 37889, - 37760, 37792, 37800, 0, 32768, 36864, 37888, 37889, - 37760, 37792, 37800, 0, 32768, 36864, 37888, 37889, - 37760, 37792, 37800, 37802, 0, 32768, 36864, 37888, - 37889, 37760, 37792, 37800, 0, 32768, 36864, 37888, - 37889, 37760, 37792, 37808, 37804, 0, 32768, 36864, - 37888, 37889, 37760, 37792, 37808, 37804, 0, 32768, - 36864, 37888, 37889, 37760, 37792, 37808, 37809, 37806, - 0, 32768, 36864, 37888, 37889, 37760, 37792, 0, - 32768, 36864, 37888, 37889, 37760, 37824, 37808, 0, - 32768, 36864, 37888, 37889, 37760, 37824, 37808, 0, - 32768, 36864, 37888, 37889, 37760, 37824, 37808, 37810, - 0, 32768, 36864, 37888, 37889, 37760, 37824, 37808, - 0, 32768, 36864, 37888, 37889, 37760, 37824, 37808, - 37812, 0, 32768, 36864, 37888, 37889, 37760, 37824, - 37808, 37812, 0, 32768, 36864, 37888, 37889, 37760, - 37824, 37808, 37816, 37814, 0, 32768, 36864, 37888, - 37889, 37760, 37824, 37808, 0, 32768, 36864, 37888, - 37889, 37760, 37824, 37825, 37816, 0, 32768, 36864, - 37888, 37889, 37760, 37824, 37825, 37816, 0, 32768, - 36864, 37888, 37889, 37760, 37824, 37825, 37816, 37818, - 0, 32768, 36864, 37888, 37889, 37760, 37824, 37825, - 37816, 0, 32768, 36864, 37888, 37889, 37760, 37824, - 37825, 37816, 37820, 0, 32768, 36864, 37888, 37889, - 37760, 37824, 37825, 37827, 37820, 0, 32768, 36864, - 37888, 37889, 37760, 37824, 37825, 37827, 37820, 37822, - 0, 32768, 36864, 37888, 37889, 37760, 0, 32768, - 36864, 37888, 37889, 37760, 37824, 0, 32768, 36864, - 37888, 37889, 37760, 37824, 0, 32768, 36864, 37888, - 37889, 37760, 37824, 37826, 0, 32768, 36864, 37888, - 37889, 37891, 37824, 0, 32768, 36864, 37888, 37889, - 37891, 37824, 37828, 0, 32768, 36864, 37888, 37889, - 37891, 37824, 37828, 0, 32768, 36864, 37888, 37889, - 37891, 37824, 37832, 37830, 0, 32768, 36864, 37888, - 37889, 37891, 37824, 0, 32768, 36864, 37888, 37889, - 37891, 37824, 37832, 0, 32768, 36864, 37888, 37889, - 37891, 37824, 37832, 0, 32768, 36864, 37888, 37889, - 37891, 37824, 37832, 37834, 0, 32768, 36864, 37888, - 37889, 37891, 37824, 37832, 0, 32768, 36864, 37888, - 37889, 37891, 37824, 37840, 37836, 0, 32768, 36864, - 37888, 37889, 37891, 37824, 37840, 37836, 0, 32768, - 36864, 37888, 37889, 37891, 37824, 37840, 37841, 37838, - 0, 32768, 36864, 37888, 37889, 37891, 37824, 0, - 32768, 36864, 37888, 37889, 37891, 37824, 37840, 0, - 32768, 36864, 37888, 37889, 37891, 37824, 37840, 0, - 32768, 36864, 37888, 37889, 37891, 37824, 37840, 37842, - 0, 32768, 36864, 37888, 37889, 37891, 37824, 37840, - 0, 32768, 36864, 37888, 37889, 37891, 37824, 37840, - 37844, 0, 32768, 36864, 37888, 37889, 37891, 37824, - 37840, 37844, 0, 32768, 36864, 37888, 37889, 37891, - 37824, 37840, 37848, 37846, 0, 32768, 36864, 37888, - 37889, 37891, 37824, 37840, 0, 32768, 36864, 37888, - 37889, 37891, 37824, 37856, 37848, 0, 32768, 36864, - 37888, 37889, 37891, 37824, 37856, 37848, 0, 32768, - 36864, 37888, 37889, 37891, 37824, 37856, 37848, 37850, - 0, 32768, 36864, 37888, 37889, 37891, 37824, 37856, - 37848, 0, 32768, 36864, 37888, 37889, 37891, 37824, - 37856, 37857, 37852, 0, 32768, 36864, 37888, 37889, - 37891, 37824, 37856, 37857, 37852, 0, 32768, 36864, - 37888, 37889, 37891, 37824, 37856, 37857, 37852, 37854, - 0, 32768, 36864, 37888, 37889, 37891, 37824, 0, - 32768, 36864, 37888, 37889, 37891, 37824, 37856, 0, - 32768, 36864, 37888, 37889, 37891, 37824, 37856, 0, - 32768, 36864, 37888, 37889, 37891, 37824, 37856, 37858, - 0, 32768, 36864, 37888, 37889, 37891, 37824, 37856, - 0, 32768, 36864, 37888, 37889, 37891, 37824, 37856, - 37860, 0, 32768, 36864, 37888, 37889, 37891, 37824, - 37856, 37860, 0, 32768, 36864, 37888, 37889, 37891, - 37824, 37856, 37864, 37862, 0, 32768, 36864, 37888, - 37889, 37891, 37895, 37856, 0, 32768, 36864, 37888, - 37889, 37891, 37895, 37856, 37864, 0, 32768, 36864, - 37888, 37889, 37891, 37895, 37856, 37864, 0, 32768, - 36864, 37888, 37889, 37891, 37895, 37856, 37864, 37866, - 0, 32768, 36864, 37888, 37889, 37891, 37895, 37856, - 37864, 0, 32768, 36864, 37888, 37889, 37891, 37895, - 37856, 37872, 37868, 0, 32768, 36864, 37888, 37889, - 37891, 37895, 37856, 37872, 37868, 0, 32768, 36864, - 37888, 37889, 37891, 37895, 37856, 37872, 37873, 37870, - 0, 32768, 36864, 37888, 37889, 37891, 37895, 37856, - 0, 32768, 36864, 37888, 37889, 37891, 37895, 37856, - 37872, 0, 32768, 36864, 37888, 37889, 37891, 37895, - 37856, 37872, 0, 32768, 36864, 37888, 37889, 37891, - 37895, 37856, 37872, 37874, 0, 32768, 36864, 37888, - 37889, 37891, 37895, 37856, 37872, 0, 32768, 36864, - 37888, 37889, 37891, 37895, 37856, 37872, 37876, 0, - 32768, 36864, 37888, 37889, 37891, 37895, 37856, 37872, - 37876, 0, 32768, 36864, 37888, 37889, 37891, 37895, - 37856, 37872, 37880, 37878, 0, 32768, 36864, 37888, - 37889, 37891, 37895, 37856, 37872, 0, 32768, 36864, - 37888, 37889, 37891, 37895, 37856, 37872, 37880, 0, - 32768, 36864, 37888, 37889, 37891, 37895, 37856, 37872, - 37880, 0, 32768, 36864, 37888, 37889, 37891, 37895, - 37856, 37872, 37880, 37882, 0, 32768, 36864, 37888, - 37889, 37891, 37895, 37856, 37872, 37880, 0, 32768, - 36864, 37888, 37889, 37891, 37895, 37856, 37872, 37880, - 37884, 0, 32768, 36864, 37888, 37889, 37891, 37895, - 37856, 37872, 37880, 37884, 0, 32768, 36864, 37888, - 37889, 37891, 37895, 37856, 37872, 37880, 37884, 37886, - 0, 32768, 36864, 0, 32768, 36864, 37888, 0, - 32768, 36864, 37888, 0, 32768, 36864, 37888, 37890, - 0, 32768, 36864, 37888, 0, 32768, 36864, 37888, - 37892, 0, 32768, 36864, 37888, 37892, 0, 32768, - 36864, 37888, 37896, 37894, 0, 32768, 36864, 37888, - 0, 32768, 36864, 37888, 37896, 0, 32768, 36864, - 37888, 37896, 0, 32768, 36864, 37888, 37896, 37898, - 0, 32768, 36864, 37888, 37896, 0, 32768, 36864, - 37888, 37904, 37900, 0, 32768, 36864, 37888, 37904, - 37900, 0, 32768, 36864, 37888, 37904, 37905, 37902, - 0, 32768, 36864, 37888, 0, 32768, 36864, 37888, - 37904, 0, 32768, 36864, 37888, 37904, 0, 32768, - 36864, 37888, 37904, 37906, 0, 32768, 36864, 37888, - 37904, 0, 32768, 36864, 37888, 37904, 37908, 0, - 32768, 36864, 37888, 37904, 37908, 0, 32768, 36864, - 37888, 37904, 37912, 37910, 0, 32768, 36864, 37888, - 37904, 0, 32768, 36864, 37888, 37920, 37912, 0, - 32768, 36864, 37888, 37920, 37912, 0, 32768, 36864, - 37888, 37920, 37912, 37914, 0, 32768, 36864, 37888, - 37920, 37912, 0, 32768, 36864, 37888, 37920, 37921, - 37916, 0, 32768, 36864, 37888, 37920, 37921, 37916, - 0, 32768, 36864, 37888, 37920, 37921, 37916, 37918, - 0, 32768, 36864, 37888, 0, 32768, 36864, 37888, - 37920, 0, 32768, 36864, 37888, 37920, 0, 32768, - 36864, 37888, 37920, 37922, 0, 32768, 36864, 37888, - 37920, 0, 32768, 36864, 37888, 37920, 37924, 0, - 32768, 36864, 37888, 37920, 37924, 0, 32768, 36864, - 37888, 37920, 37928, 37926, 0, 32768, 36864, 37888, - 37920, 0, 32768, 36864, 37888, 37920, 37928, 0, - 32768, 36864, 37888, 37920, 37928, 0, 32768, 36864, - 37888, 37920, 37928, 37930, 0, 32768, 36864, 37888, - 37920, 37928, 0, 32768, 36864, 37888, 37920, 37936, - 37932, 0, 32768, 36864, 37888, 37920, 37936, 37932, - 0, 32768, 36864, 37888, 37920, 37936, 37937, 37934, - 0, 32768, 36864, 37888, 37920, 0, 32768, 36864, - 37888, 37952, 37936, 0, 32768, 36864, 37888, 37952, - 37936, 0, 32768, 36864, 37888, 37952, 37936, 37938, - 0, 32768, 36864, 37888, 37952, 37936, 0, 32768, - 36864, 37888, 37952, 37936, 37940, 0, 32768, 36864, - 37888, 37952, 37936, 37940, 0, 32768, 36864, 37888, - 37952, 37936, 37944, 37942, 0, 32768, 36864, 37888, - 37952, 37936, 0, 32768, 36864, 37888, 37952, 37953, - 37944, 0, 32768, 36864, 37888, 37952, 37953, 37944, - 0, 32768, 36864, 37888, 37952, 37953, 37944, 37946, - 0, 32768, 36864, 37888, 37952, 37953, 37944, 0, - 32768, 36864, 37888, 37952, 37953, 37944, 37948, 0, - 32768, 36864, 37888, 37952, 37953, 37955, 37948, 0, - 32768, 36864, 37888, 37952, 37953, 37955, 37948, 37950, - 0, 32768, 36864, 37888, 0, 32768, 36864, 37888, - 37952, 0, 32768, 36864, 37888, 37952, 0, 32768, - 36864, 37888, 37952, 37954, 0, 32768, 36864, 37888, - 37952, 0, 32768, 36864, 37888, 37952, 37956, 0, - 32768, 36864, 37888, 37952, 37956, 0, 32768, 36864, - 37888, 37952, 37960, 37958, 0, 32768, 36864, 37888, - 37952, 0, 32768, 36864, 37888, 37952, 37960, 0, - 32768, 36864, 37888, 37952, 37960, 0, 32768, 36864, - 37888, 37952, 37960, 37962, 0, 32768, 36864, 37888, - 37952, 37960, 0, 32768, 36864, 37888, 37952, 37968, - 37964, 0, 32768, 36864, 37888, 37952, 37968, 37964, - 0, 32768, 36864, 37888, 37952, 37968, 37969, 37966, - 0, 32768, 36864, 37888, 37952, 0, 32768, 36864, - 37888, 37952, 37968, 0, 32768, 36864, 37888, 37952, - 37968, 0, 32768, 36864, 37888, 37952, 37968, 37970, - 0, 32768, 36864, 37888, 37952, 37968, 0, 32768, - 36864, 37888, 37952, 37968, 37972, 0, 32768, 36864, - 37888, 37952, 37968, 37972, 0, 32768, 36864, 37888, - 37952, 37968, 37976, 37974, 0, 32768, 36864, 37888, - 37952, 37968, 0, 32768, 36864, 37888, 37952, 37984, - 37976, 0, 32768, 36864, 37888, 37952, 37984, 37976, - 0, 32768, 36864, 37888, 37952, 37984, 37976, 37978, - 0, 32768, 36864, 37888, 37952, 37984, 37976, 0, - 32768, 36864, 37888, 37952, 37984, 37985, 37980, 0, - 32768, 36864, 37888, 37952, 37984, 37985, 37980, 0, - 32768, 36864, 37888, 37952, 37984, 37985, 37980, 37982, - 0, 32768, 36864, 37888, 37952, 0, 32768, 36864, - 37888, 38016, 37984, 0, 32768, 36864, 37888, 38016, - 37984, 0, 32768, 36864, 37888, 38016, 37984, 37986, - 0, 32768, 36864, 37888, 38016, 37984, 0, 32768, - 36864, 37888, 38016, 37984, 37988, 0, 32768, 36864, - 37888, 38016, 37984, 37988, 0, 32768, 36864, 37888, - 38016, 37984, 37992, 37990, 0, 32768, 36864, 37888, - 38016, 37984, 0, 32768, 36864, 37888, 38016, 37984, - 37992, 0, 32768, 36864, 37888, 38016, 37984, 37992, - 0, 32768, 36864, 37888, 38016, 37984, 37992, 37994, - 0, 32768, 36864, 37888, 38016, 37984, 37992, 0, - 32768, 36864, 37888, 38016, 37984, 38000, 37996, 0, - 32768, 36864, 37888, 38016, 37984, 38000, 37996, 0, - 32768, 36864, 37888, 38016, 37984, 38000, 38001, 37998, - 0, 32768, 36864, 37888, 38016, 37984, 0, 32768, - 36864, 37888, 38016, 38017, 38000, 0, 32768, 36864, - 37888, 38016, 38017, 38000, 0, 32768, 36864, 37888, - 38016, 38017, 38000, 38002, 0, 32768, 36864, 37888, - 38016, 38017, 38000, 0, 32768, 36864, 37888, 38016, - 38017, 38000, 38004, 0, 32768, 36864, 37888, 38016, - 38017, 38000, 38004, 0, 32768, 36864, 37888, 38016, - 38017, 38000, 38008, 38006, 0, 32768, 36864, 37888, - 38016, 38017, 38000, 0, 32768, 36864, 37888, 38016, - 38017, 38000, 38008, 0, 32768, 36864, 37888, 38016, - 38017, 38019, 38008, 0, 32768, 36864, 37888, 38016, - 38017, 38019, 38008, 38010, 0, 32768, 36864, 37888, - 38016, 38017, 38019, 38008, 0, 32768, 36864, 37888, - 38016, 38017, 38019, 38008, 38012, 0, 32768, 36864, - 37888, 38016, 38017, 38019, 38008, 38012, 0, 32768, - 36864, 37888, 38016, 38017, 38019, 38008, 38012, 38014, - 0, 32768, 36864, 37888, 0, 32768, 36864, 37888, - 38016, 0, 32768, 36864, 37888, 38016, 0, 32768, - 36864, 37888, 38016, 38018, 0, 32768, 36864, 37888, - 38016, 0, 32768, 36864, 37888, 38016, 38020, 0, - 32768, 36864, 37888, 38016, 38020, 0, 32768, 36864, - 37888, 38016, 38024, 38022, 0, 32768, 36864, 37888, - 38016, 0, 32768, 36864, 37888, 38016, 38024, 0, - 32768, 36864, 37888, 38016, 38024, 0, 32768, 36864, - 37888, 38016, 38024, 38026, 0, 32768, 36864, 37888, - 38016, 38024, 0, 32768, 36864, 37888, 38016, 38032, - 38028, 0, 32768, 36864, 37888, 38016, 38032, 38028, - 0, 32768, 36864, 37888, 38016, 38032, 38033, 38030, - 0, 32768, 36864, 37888, 38016, 0, 32768, 36864, - 37888, 38016, 38032, 0, 32768, 36864, 37888, 38016, - 38032, 0, 32768, 36864, 37888, 38016, 38032, 38034, - 0, 32768, 36864, 37888, 38016, 38032, 0, 32768, - 36864, 37888, 38016, 38032, 38036, 0, 32768, 36864, - 37888, 38016, 38032, 38036, 0, 32768, 36864, 37888, - 38016, 38032, 38040, 38038, 0, 32768, 36864, 37888, - 38016, 38032, 0, 32768, 36864, 37888, 38016, 38048, - 38040, 0, 32768, 36864, 37888, 38016, 38048, 38040, - 0, 32768, 36864, 37888, 38016, 38048, 38040, 38042, - 0, 32768, 36864, 37888, 38016, 38048, 38040, 0, - 32768, 36864, 37888, 38016, 38048, 38049, 38044, 0, - 32768, 36864, 37888, 38016, 38048, 38049, 38044, 0, - 32768, 36864, 37888, 38016, 38048, 38049, 38044, 38046, - 0, 32768, 36864, 37888, 38016, 0, 32768, 36864, - 37888, 38016, 38048, 0, 32768, 36864, 37888, 38016, - 38048, 0, 32768, 36864, 37888, 38016, 38048, 38050, - 0, 32768, 36864, 37888, 38016, 38048, 0, 32768, - 36864, 37888, 38016, 38048, 38052, 0, 32768, 36864, - 37888, 38016, 38048, 38052, 0, 32768, 36864, 37888, - 38016, 38048, 38056, 38054, 0, 32768, 36864, 37888, - 38016, 38048, 0, 32768, 36864, 37888, 38016, 38048, - 38056, 0, 32768, 36864, 37888, 38016, 38048, 38056, - 0, 32768, 36864, 37888, 38016, 38048, 38056, 38058, - 0, 32768, 36864, 37888, 38016, 38048, 38056, 0, - 32768, 36864, 37888, 38016, 38048, 38064, 38060, 0, - 32768, 36864, 37888, 38016, 38048, 38064, 38060, 0, - 32768, 36864, 37888, 38016, 38048, 38064, 38065, 38062, - 0, 32768, 36864, 37888, 38016, 38048, 0, 32768, - 36864, 37888, 38016, 38080, 38064, 0, 32768, 36864, - 37888, 38016, 38080, 38064, 0, 32768, 36864, 37888, - 38016, 38080, 38064, 38066, 0, 32768, 36864, 37888, - 38016, 38080, 38064, 0, 32768, 36864, 37888, 38016, - 38080, 38064, 38068, 0, 32768, 36864, 37888, 38016, - 38080, 38064, 38068, 0, 32768, 36864, 37888, 38016, - 38080, 38064, 38072, 38070, 0, 32768, 36864, 37888, - 38016, 38080, 38064, 0, 32768, 36864, 37888, 38016, - 38080, 38081, 38072, 0, 32768, 36864, 37888, 38016, - 38080, 38081, 38072, 0, 32768, 36864, 37888, 38016, - 38080, 38081, 38072, 38074, 0, 32768, 36864, 37888, - 38016, 38080, 38081, 38072, 0, 32768, 36864, 37888, - 38016, 38080, 38081, 38072, 38076, 0, 32768, 36864, - 37888, 38016, 38080, 38081, 38083, 38076, 0, 32768, - 36864, 37888, 38016, 38080, 38081, 38083, 38076, 38078, - 0, 32768, 36864, 37888, 38016, 0, 32768, 36864, - 37888, 38144, 38080, 0, 32768, 36864, 37888, 38144, - 38080, 0, 32768, 36864, 37888, 38144, 38080, 38082, - 0, 32768, 36864, 37888, 38144, 38080, 0, 32768, - 36864, 37888, 38144, 38080, 38084, 0, 32768, 36864, - 37888, 38144, 38080, 38084, 0, 32768, 36864, 37888, - 38144, 38080, 38088, 38086, 0, 32768, 36864, 37888, - 38144, 38080, 0, 32768, 36864, 37888, 38144, 38080, - 38088, 0, 32768, 36864, 37888, 38144, 38080, 38088, - 0, 32768, 36864, 37888, 38144, 38080, 38088, 38090, - 0, 32768, 36864, 37888, 38144, 38080, 38088, 0, - 32768, 36864, 37888, 38144, 38080, 38096, 38092, 0, - 32768, 36864, 37888, 38144, 38080, 38096, 38092, 0, - 32768, 36864, 37888, 38144, 38080, 38096, 38097, 38094, - 0, 32768, 36864, 37888, 38144, 38080, 0, 32768, - 36864, 37888, 38144, 38080, 38096, 0, 32768, 36864, - 37888, 38144, 38080, 38096, 0, 32768, 36864, 37888, - 38144, 38080, 38096, 38098, 0, 32768, 36864, 37888, - 38144, 38080, 38096, 0, 32768, 36864, 37888, 38144, - 38080, 38096, 38100, 0, 32768, 36864, 37888, 38144, - 38080, 38096, 38100, 0, 32768, 36864, 37888, 38144, - 38080, 38096, 38104, 38102, 0, 32768, 36864, 37888, - 38144, 38080, 38096, 0, 32768, 36864, 37888, 38144, - 38080, 38112, 38104, 0, 32768, 36864, 37888, 38144, - 38080, 38112, 38104, 0, 32768, 36864, 37888, 38144, - 38080, 38112, 38104, 38106, 0, 32768, 36864, 37888, - 38144, 38080, 38112, 38104, 0, 32768, 36864, 37888, - 38144, 38080, 38112, 38113, 38108, 0, 32768, 36864, - 37888, 38144, 38080, 38112, 38113, 38108, 0, 32768, - 36864, 37888, 38144, 38080, 38112, 38113, 38108, 38110, - 0, 32768, 36864, 37888, 38144, 38080, 0, 32768, - 36864, 37888, 38144, 38145, 38112, 0, 32768, 36864, - 37888, 38144, 38145, 38112, 0, 32768, 36864, 37888, - 38144, 38145, 38112, 38114, 0, 32768, 36864, 37888, - 38144, 38145, 38112, 0, 32768, 36864, 37888, 38144, - 38145, 38112, 38116, 0, 32768, 36864, 37888, 38144, - 38145, 38112, 38116, 0, 32768, 36864, 37888, 38144, - 38145, 38112, 38120, 38118, 0, 32768, 36864, 37888, - 38144, 38145, 38112, 0, 32768, 36864, 37888, 38144, - 38145, 38112, 38120, 0, 32768, 36864, 37888, 38144, - 38145, 38112, 38120, 0, 32768, 36864, 37888, 38144, - 38145, 38112, 38120, 38122, 0, 32768, 36864, 37888, - 38144, 38145, 38112, 38120, 0, 32768, 36864, 37888, - 38144, 38145, 38112, 38128, 38124, 0, 32768, 36864, - 37888, 38144, 38145, 38112, 38128, 38124, 0, 32768, - 36864, 37888, 38144, 38145, 38112, 38128, 38129, 38126, - 0, 32768, 36864, 37888, 38144, 38145, 38112, 0, - 32768, 36864, 37888, 38144, 38145, 38112, 38128, 0, - 32768, 36864, 37888, 38144, 38145, 38147, 38128, 0, - 32768, 36864, 37888, 38144, 38145, 38147, 38128, 38130, - 0, 32768, 36864, 37888, 38144, 38145, 38147, 38128, - 0, 32768, 36864, 37888, 38144, 38145, 38147, 38128, - 38132, 0, 32768, 36864, 37888, 38144, 38145, 38147, - 38128, 38132, 0, 32768, 36864, 37888, 38144, 38145, - 38147, 38128, 38136, 38134, 0, 32768, 36864, 37888, - 38144, 38145, 38147, 38128, 0, 32768, 36864, 37888, - 38144, 38145, 38147, 38128, 38136, 0, 32768, 36864, - 37888, 38144, 38145, 38147, 38128, 38136, 0, 32768, - 36864, 37888, 38144, 38145, 38147, 38128, 38136, 38138, - 0, 32768, 36864, 37888, 38144, 38145, 38147, 38151, - 38136, 0, 32768, 36864, 37888, 38144, 38145, 38147, - 38151, 38136, 38140, 0, 32768, 36864, 37888, 38144, - 38145, 38147, 38151, 38136, 38140, 0, 32768, 36864, - 37888, 38144, 38145, 38147, 38151, 38136, 38140, 38142, - 0, 32768, 36864, 37888, 0, 32768, 36864, 37888, - 38144, 0, 32768, 36864, 37888, 38144, 0, 32768, - 36864, 37888, 38144, 38146, 0, 32768, 36864, 37888, - 38144, 0, 32768, 36864, 37888, 38144, 38148, 0, - 32768, 36864, 37888, 38144, 38148, 0, 32768, 36864, - 37888, 38144, 38152, 38150, 0, 32768, 36864, 37888, - 38144, 0, 32768, 36864, 37888, 38144, 38152, 0, - 32768, 36864, 37888, 38144, 38152, 0, 32768, 36864, - 37888, 38144, 38152, 38154, 0, 32768, 36864, 37888, - 38144, 38152, 0, 32768, 36864, 37888, 38144, 38160, - 38156, 0, 32768, 36864, 37888, 38144, 38160, 38156, - 0, 32768, 36864, 37888, 38144, 38160, 38161, 38158, - 0, 32768, 36864, 37888, 38144, 0, 32768, 36864, - 37888, 38144, 38160, 0, 32768, 36864, 37888, 38144, - 38160, 0, 32768, 36864, 37888, 38144, 38160, 38162, - 0, 32768, 36864, 37888, 38144, 38160, 0, 32768, - 36864, 37888, 38144, 38160, 38164, 0, 32768, 36864, - 37888, 38144, 38160, 38164, 0, 32768, 36864, 37888, - 38144, 38160, 38168, 38166, 0, 32768, 36864, 37888, - 38144, 38160, 0, 32768, 36864, 37888, 38144, 38176, - 38168, 0, 32768, 36864, 37888, 38144, 38176, 38168, - 0, 32768, 36864, 37888, 38144, 38176, 38168, 38170, - 0, 32768, 36864, 37888, 38144, 38176, 38168, 0, - 32768, 36864, 37888, 38144, 38176, 38177, 38172, 0, - 32768, 36864, 37888, 38144, 38176, 38177, 38172, 0, - 32768, 36864, 37888, 38144, 38176, 38177, 38172, 38174, - 0, 32768, 36864, 37888, 38144, 0, 32768, 36864, - 37888, 38144, 38176, 0, 32768, 36864, 37888, 38144, - 38176, 0, 32768, 36864, 37888, 38144, 38176, 38178, - 0, 32768, 36864, 37888, 38144, 38176, 0, 32768, - 36864, 37888, 38144, 38176, 38180, 0, 32768, 36864, - 37888, 38144, 38176, 38180, 0, 32768, 36864, 37888, - 38144, 38176, 38184, 38182, 0, 32768, 36864, 37888, - 38144, 38176, 0, 32768, 36864, 37888, 38144, 38176, - 38184, 0, 32768, 36864, 37888, 38144, 38176, 38184, - 0, 32768, 36864, 37888, 38144, 38176, 38184, 38186, - 0, 32768, 36864, 37888, 38144, 38176, 38184, 0, - 32768, 36864, 37888, 38144, 38176, 38192, 38188, 0, - 32768, 36864, 37888, 38144, 38176, 38192, 38188, 0, - 32768, 36864, 37888, 38144, 38176, 38192, 38193, 38190, - 0, 32768, 36864, 37888, 38144, 38176, 0, 32768, - 36864, 37888, 38144, 38208, 38192, 0, 32768, 36864, - 37888, 38144, 38208, 38192, 0, 32768, 36864, 37888, - 38144, 38208, 38192, 38194, 0, 32768, 36864, 37888, - 38144, 38208, 38192, 0, 32768, 36864, 37888, 38144, - 38208, 38192, 38196, 0, 32768, 36864, 37888, 38144, - 38208, 38192, 38196, 0, 32768, 36864, 37888, 38144, - 38208, 38192, 38200, 38198, 0, 32768, 36864, 37888, - 38144, 38208, 38192, 0, 32768, 36864, 37888, 38144, - 38208, 38209, 38200, 0, 32768, 36864, 37888, 38144, - 38208, 38209, 38200, 0, 32768, 36864, 37888, 38144, - 38208, 38209, 38200, 38202, 0, 32768, 36864, 37888, - 38144, 38208, 38209, 38200, 0, 32768, 36864, 37888, - 38144, 38208, 38209, 38200, 38204, 0, 32768, 36864, - 37888, 38144, 38208, 38209, 38211, 38204, 0, 32768, - 36864, 37888, 38144, 38208, 38209, 38211, 38204, 38206, - 0, 32768, 36864, 37888, 38144, 0, 32768, 36864, - 37888, 38144, 38208, 0, 32768, 36864, 37888, 38144, - 38208, 0, 32768, 36864, 37888, 38144, 38208, 38210, - 0, 32768, 36864, 37888, 38144, 38208, 0, 32768, - 36864, 37888, 38144, 38208, 38212, 0, 32768, 36864, - 37888, 38144, 38208, 38212, 0, 32768, 36864, 37888, - 38144, 38208, 38216, 38214, 0, 32768, 36864, 37888, - 38144, 38208, 0, 32768, 36864, 37888, 38144, 38208, - 38216, 0, 32768, 36864, 37888, 38144, 38208, 38216, - 0, 32768, 36864, 37888, 38144, 38208, 38216, 38218, - 0, 32768, 36864, 37888, 38144, 38208, 38216, 0, - 32768, 36864, 37888, 38144, 38208, 38224, 38220, 0, - 32768, 36864, 37888, 38144, 38208, 38224, 38220, 0, - 32768, 36864, 37888, 38144, 38208, 38224, 38225, 38222, - 0, 32768, 36864, 37888, 38144, 38208, 0, 32768, - 36864, 37888, 38144, 38208, 38224, 0, 32768, 36864, - 37888, 38144, 38208, 38224, 0, 32768, 36864, 37888, - 38144, 38208, 38224, 38226, 0, 32768, 36864, 37888, - 38144, 38208, 38224, 0, 32768, 36864, 37888, 38144, - 38208, 38224, 38228, 0, 32768, 36864, 37888, 38144, - 38208, 38224, 38228, 0, 32768, 36864, 37888, 38144, - 38208, 38224, 38232, 38230, 0, 32768, 36864, 37888, - 38144, 38208, 38224, 0, 32768, 36864, 37888, 38144, - 38208, 38240, 38232, 0, 32768, 36864, 37888, 38144, - 38208, 38240, 38232, 0, 32768, 36864, 37888, 38144, - 38208, 38240, 38232, 38234, 0, 32768, 36864, 37888, - 38144, 38208, 38240, 38232, 0, 32768, 36864, 37888, - 38144, 38208, 38240, 38241, 38236, 0, 32768, 36864, - 37888, 38144, 38208, 38240, 38241, 38236, 0, 32768, - 36864, 37888, 38144, 38208, 38240, 38241, 38236, 38238, - 0, 32768, 36864, 37888, 38144, 38208, 0, 32768, - 36864, 37888, 38144, 38272, 38240, 0, 32768, 36864, - 37888, 38144, 38272, 38240, 0, 32768, 36864, 37888, - 38144, 38272, 38240, 38242, 0, 32768, 36864, 37888, - 38144, 38272, 38240, 0, 32768, 36864, 37888, 38144, - 38272, 38240, 38244, 0, 32768, 36864, 37888, 38144, - 38272, 38240, 38244, 0, 32768, 36864, 37888, 38144, - 38272, 38240, 38248, 38246, 0, 32768, 36864, 37888, - 38144, 38272, 38240, 0, 32768, 36864, 37888, 38144, - 38272, 38240, 38248, 0, 32768, 36864, 37888, 38144, - 38272, 38240, 38248, 0, 32768, 36864, 37888, 38144, - 38272, 38240, 38248, 38250, 0, 32768, 36864, 37888, - 38144, 38272, 38240, 38248, 0, 32768, 36864, 37888, - 38144, 38272, 38240, 38256, 38252, 0, 32768, 36864, - 37888, 38144, 38272, 38240, 38256, 38252, 0, 32768, - 36864, 37888, 38144, 38272, 38240, 38256, 38257, 38254, - 0, 32768, 36864, 37888, 38144, 38272, 38240, 0, - 32768, 36864, 37888, 38144, 38272, 38273, 38256, 0, - 32768, 36864, 37888, 38144, 38272, 38273, 38256, 0, - 32768, 36864, 37888, 38144, 38272, 38273, 38256, 38258, - 0, 32768, 36864, 37888, 38144, 38272, 38273, 38256, - 0, 32768, 36864, 37888, 38144, 38272, 38273, 38256, - 38260, 0, 32768, 36864, 37888, 38144, 38272, 38273, - 38256, 38260, 0, 32768, 36864, 37888, 38144, 38272, - 38273, 38256, 38264, 38262, 0, 32768, 36864, 37888, - 38144, 38272, 38273, 38256, 0, 32768, 36864, 37888, - 38144, 38272, 38273, 38256, 38264, 0, 32768, 36864, - 37888, 38144, 38272, 38273, 38275, 38264, 0, 32768, - 36864, 37888, 38144, 38272, 38273, 38275, 38264, 38266, - 0, 32768, 36864, 37888, 38144, 38272, 38273, 38275, - 38264, 0, 32768, 36864, 37888, 38144, 38272, 38273, - 38275, 38264, 38268, 0, 32768, 36864, 37888, 38144, - 38272, 38273, 38275, 38264, 38268, 0, 32768, 36864, - 37888, 38144, 38272, 38273, 38275, 38264, 38268, 38270, - 0, 32768, 36864, 37888, 38144, 0, 32768, 36864, - 37888, 38400, 38272, 0, 32768, 36864, 37888, 38400, - 38272, 0, 32768, 36864, 37888, 38400, 38272, 38274, - 0, 32768, 36864, 37888, 38400, 38272, 0, 32768, - 36864, 37888, 38400, 38272, 38276, 0, 32768, 36864, - 37888, 38400, 38272, 38276, 0, 32768, 36864, 37888, - 38400, 38272, 38280, 38278, 0, 32768, 36864, 37888, - 38400, 38272, 0, 32768, 36864, 37888, 38400, 38272, - 38280, 0, 32768, 36864, 37888, 38400, 38272, 38280, - 0, 32768, 36864, 37888, 38400, 38272, 38280, 38282, - 0, 32768, 36864, 37888, 38400, 38272, 38280, 0, - 32768, 36864, 37888, 38400, 38272, 38288, 38284, 0, - 32768, 36864, 37888, 38400, 38272, 38288, 38284, 0, - 32768, 36864, 37888, 38400, 38272, 38288, 38289, 38286, - 0, 32768, 36864, 37888, 38400, 38272, 0, 32768, - 36864, 37888, 38400, 38272, 38288, 0, 32768, 36864, - 37888, 38400, 38272, 38288, 0, 32768, 36864, 37888, - 38400, 38272, 38288, 38290, 0, 32768, 36864, 37888, - 38400, 38272, 38288, 0, 32768, 36864, 37888, 38400, - 38272, 38288, 38292, 0, 32768, 36864, 37888, 38400, - 38272, 38288, 38292, 0, 32768, 36864, 37888, 38400, - 38272, 38288, 38296, 38294, 0, 32768, 36864, 37888, - 38400, 38272, 38288, 0, 32768, 36864, 37888, 38400, - 38272, 38304, 38296, 0, 32768, 36864, 37888, 38400, - 38272, 38304, 38296, 0, 32768, 36864, 37888, 38400, - 38272, 38304, 38296, 38298, 0, 32768, 36864, 37888, - 38400, 38272, 38304, 38296, 0, 32768, 36864, 37888, - 38400, 38272, 38304, 38305, 38300, 0, 32768, 36864, - 37888, 38400, 38272, 38304, 38305, 38300, 0, 32768, - 36864, 37888, 38400, 38272, 38304, 38305, 38300, 38302, - 0, 32768, 36864, 37888, 38400, 38272, 0, 32768, - 36864, 37888, 38400, 38272, 38304, 0, 32768, 36864, - 37888, 38400, 38272, 38304, 0, 32768, 36864, 37888, - 38400, 38272, 38304, 38306, 0, 32768, 36864, 37888, - 38400, 38272, 38304, 0, 32768, 36864, 37888, 38400, - 38272, 38304, 38308, 0, 32768, 36864, 37888, 38400, - 38272, 38304, 38308, 0, 32768, 36864, 37888, 38400, - 38272, 38304, 38312, 38310, 0, 32768, 36864, 37888, - 38400, 38272, 38304, 0, 32768, 36864, 37888, 38400, - 38272, 38304, 38312, 0, 32768, 36864, 37888, 38400, - 38272, 38304, 38312, 0, 32768, 36864, 37888, 38400, - 38272, 38304, 38312, 38314, 0, 32768, 36864, 37888, - 38400, 38272, 38304, 38312, 0, 32768, 36864, 37888, - 38400, 38272, 38304, 38320, 38316, 0, 32768, 36864, - 37888, 38400, 38272, 38304, 38320, 38316, 0, 32768, - 36864, 37888, 38400, 38272, 38304, 38320, 38321, 38318, - 0, 32768, 36864, 37888, 38400, 38272, 38304, 0, - 32768, 36864, 37888, 38400, 38272, 38336, 38320, 0, - 32768, 36864, 37888, 38400, 38272, 38336, 38320, 0, - 32768, 36864, 37888, 38400, 38272, 38336, 38320, 38322, - 0, 32768, 36864, 37888, 38400, 38272, 38336, 38320, - 0, 32768, 36864, 37888, 38400, 38272, 38336, 38320, - 38324, 0, 32768, 36864, 37888, 38400, 38272, 38336, - 38320, 38324, 0, 32768, 36864, 37888, 38400, 38272, - 38336, 38320, 38328, 38326, 0, 32768, 36864, 37888, - 38400, 38272, 38336, 38320, 0, 32768, 36864, 37888, - 38400, 38272, 38336, 38337, 38328, 0, 32768, 36864, - 37888, 38400, 38272, 38336, 38337, 38328, 0, 32768, - 36864, 37888, 38400, 38272, 38336, 38337, 38328, 38330, - 0, 32768, 36864, 37888, 38400, 38272, 38336, 38337, - 38328, 0, 32768, 36864, 37888, 38400, 38272, 38336, - 38337, 38328, 38332, 0, 32768, 36864, 37888, 38400, - 38272, 38336, 38337, 38339, 38332, 0, 32768, 36864, - 37888, 38400, 38272, 38336, 38337, 38339, 38332, 38334, - 0, 32768, 36864, 37888, 38400, 38272, 0, 32768, - 36864, 37888, 38400, 38401, 38336, 0, 32768, 36864, - 37888, 38400, 38401, 38336, 0, 32768, 36864, 37888, - 38400, 38401, 38336, 38338, 0, 32768, 36864, 37888, - 38400, 38401, 38336, 0, 32768, 36864, 37888, 38400, - 38401, 38336, 38340, 0, 32768, 36864, 37888, 38400, - 38401, 38336, 38340, 0, 32768, 36864, 37888, 38400, - 38401, 38336, 38344, 38342, 0, 32768, 36864, 37888, - 38400, 38401, 38336, 0, 32768, 36864, 37888, 38400, - 38401, 38336, 38344, 0, 32768, 36864, 37888, 38400, - 38401, 38336, 38344, 0, 32768, 36864, 37888, 38400, - 38401, 38336, 38344, 38346, 0, 32768, 36864, 37888, - 38400, 38401, 38336, 38344, 0, 32768, 36864, 37888, - 38400, 38401, 38336, 38352, 38348, 0, 32768, 36864, - 37888, 38400, 38401, 38336, 38352, 38348, 0, 32768, - 36864, 37888, 38400, 38401, 38336, 38352, 38353, 38350, - 0, 32768, 36864, 37888, 38400, 38401, 38336, 0, - 32768, 36864, 37888, 38400, 38401, 38336, 38352, 0, - 32768, 36864, 37888, 38400, 38401, 38336, 38352, 0, - 32768, 36864, 37888, 38400, 38401, 38336, 38352, 38354, - 0, 32768, 36864, 37888, 38400, 38401, 38336, 38352, - 0, 32768, 36864, 37888, 38400, 38401, 38336, 38352, - 38356, 0, 32768, 36864, 37888, 38400, 38401, 38336, - 38352, 38356, 0, 32768, 36864, 37888, 38400, 38401, - 38336, 38352, 38360, 38358, 0, 32768, 36864, 37888, - 38400, 38401, 38336, 38352, 0, 32768, 36864, 37888, - 38400, 38401, 38336, 38368, 38360, 0, 32768, 36864, - 37888, 38400, 38401, 38336, 38368, 38360, 0, 32768, - 36864, 37888, 38400, 38401, 38336, 38368, 38360, 38362, - 0, 32768, 36864, 37888, 38400, 38401, 38336, 38368, - 38360, 0, 32768, 36864, 37888, 38400, 38401, 38336, - 38368, 38369, 38364, 0, 32768, 36864, 37888, 38400, - 38401, 38336, 38368, 38369, 38364, 0, 32768, 36864, - 37888, 38400, 38401, 38336, 38368, 38369, 38364, 38366, - 0, 32768, 36864, 37888, 38400, 38401, 38336, 0, - 32768, 36864, 37888, 38400, 38401, 38336, 38368, 0, - 32768, 36864, 37888, 38400, 38401, 38403, 38368, 0, - 32768, 36864, 37888, 38400, 38401, 38403, 38368, 38370, - 0, 32768, 36864, 37888, 38400, 38401, 38403, 38368, - 0, 32768, 36864, 37888, 38400, 38401, 38403, 38368, - 38372, 0, 32768, 36864, 37888, 38400, 38401, 38403, - 38368, 38372, 0, 32768, 36864, 37888, 38400, 38401, - 38403, 38368, 38376, 38374, 0, 32768, 36864, 37888, - 38400, 38401, 38403, 38368, 0, 32768, 36864, 37888, - 38400, 38401, 38403, 38368, 38376, 0, 32768, 36864, - 37888, 38400, 38401, 38403, 38368, 38376, 0, 32768, - 36864, 37888, 38400, 38401, 38403, 38368, 38376, 38378, - 0, 32768, 36864, 37888, 38400, 38401, 38403, 38368, - 38376, 0, 32768, 36864, 37888, 38400, 38401, 38403, - 38368, 38384, 38380, 0, 32768, 36864, 37888, 38400, - 38401, 38403, 38368, 38384, 38380, 0, 32768, 36864, - 37888, 38400, 38401, 38403, 38368, 38384, 38385, 38382, - 0, 32768, 36864, 37888, 38400, 38401, 38403, 38368, - 0, 32768, 36864, 37888, 38400, 38401, 38403, 38368, - 38384, 0, 32768, 36864, 37888, 38400, 38401, 38403, - 38368, 38384, 0, 32768, 36864, 37888, 38400, 38401, - 38403, 38368, 38384, 38386, 0, 32768, 36864, 37888, - 38400, 38401, 38403, 38407, 38384, 0, 32768, 36864, - 37888, 38400, 38401, 38403, 38407, 38384, 38388, 0, - 32768, 36864, 37888, 38400, 38401, 38403, 38407, 38384, - 38388, 0, 32768, 36864, 37888, 38400, 38401, 38403, - 38407, 38384, 38392, 38390, 0, 32768, 36864, 37888, - 38400, 38401, 38403, 38407, 38384, 0, 32768, 36864, - 37888, 38400, 38401, 38403, 38407, 38384, 38392, 0, - 32768, 36864, 37888, 38400, 38401, 38403, 38407, 38384, - 38392, 0, 32768, 36864, 37888, 38400, 38401, 38403, - 38407, 38384, 38392, 38394, 0, 32768, 36864, 37888, - 38400, 38401, 38403, 38407, 38384, 38392, 0, 32768, - 36864, 37888, 38400, 38401, 38403, 38407, 38384, 38392, - 38396, 0, 32768, 36864, 37888, 38400, 38401, 38403, - 38407, 38384, 38392, 38396, 0, 32768, 36864, 37888, - 38400, 38401, 38403, 38407, 38384, 38392, 38396, 38398, - 0, 32768, 36864, 37888, 0, 32768, 36864, 38912, - 38400, 0, 32768, 36864, 38912, 38400, 0, 32768, - 36864, 38912, 38400, 38402, 0, 32768, 36864, 38912, - 38400, 0, 32768, 36864, 38912, 38400, 38404, 0, - 32768, 36864, 38912, 38400, 38404, 0, 32768, 36864, - 38912, 38400, 38408, 38406, 0, 32768, 36864, 38912, - 38400, 0, 32768, 36864, 38912, 38400, 38408, 0, - 32768, 36864, 38912, 38400, 38408, 0, 32768, 36864, - 38912, 38400, 38408, 38410, 0, 32768, 36864, 38912, - 38400, 38408, 0, 32768, 36864, 38912, 38400, 38416, - 38412, 0, 32768, 36864, 38912, 38400, 38416, 38412, - 0, 32768, 36864, 38912, 38400, 38416, 38417, 38414, - 0, 32768, 36864, 38912, 38400, 0, 32768, 36864, - 38912, 38400, 38416, 0, 32768, 36864, 38912, 38400, - 38416, 0, 32768, 36864, 38912, 38400, 38416, 38418, - 0, 32768, 36864, 38912, 38400, 38416, 0, 32768, - 36864, 38912, 38400, 38416, 38420, 0, 32768, 36864, - 38912, 38400, 38416, 38420, 0, 32768, 36864, 38912, - 38400, 38416, 38424, 38422, 0, 32768, 36864, 38912, - 38400, 38416, 0, 32768, 36864, 38912, 38400, 38432, - 38424, 0, 32768, 36864, 38912, 38400, 38432, 38424, - 0, 32768, 36864, 38912, 38400, 38432, 38424, 38426, - 0, 32768, 36864, 38912, 38400, 38432, 38424, 0, - 32768, 36864, 38912, 38400, 38432, 38433, 38428, 0, - 32768, 36864, 38912, 38400, 38432, 38433, 38428, 0, - 32768, 36864, 38912, 38400, 38432, 38433, 38428, 38430, - 0, 32768, 36864, 38912, 38400, 0, 32768, 36864, - 38912, 38400, 38432, 0, 32768, 36864, 38912, 38400, - 38432, 0, 32768, 36864, 38912, 38400, 38432, 38434, - 0, 32768, 36864, 38912, 38400, 38432, 0, 32768, - 36864, 38912, 38400, 38432, 38436, 0, 32768, 36864, - 38912, 38400, 38432, 38436, 0, 32768, 36864, 38912, - 38400, 38432, 38440, 38438, 0, 32768, 36864, 38912, - 38400, 38432, 0, 32768, 36864, 38912, 38400, 38432, - 38440, 0, 32768, 36864, 38912, 38400, 38432, 38440, - 0, 32768, 36864, 38912, 38400, 38432, 38440, 38442, - 0, 32768, 36864, 38912, 38400, 38432, 38440, 0, - 32768, 36864, 38912, 38400, 38432, 38448, 38444, 0, - 32768, 36864, 38912, 38400, 38432, 38448, 38444, 0, - 32768, 36864, 38912, 38400, 38432, 38448, 38449, 38446, - 0, 32768, 36864, 38912, 38400, 38432, 0, 32768, - 36864, 38912, 38400, 38464, 38448, 0, 32768, 36864, - 38912, 38400, 38464, 38448, 0, 32768, 36864, 38912, - 38400, 38464, 38448, 38450, 0, 32768, 36864, 38912, - 38400, 38464, 38448, 0, 32768, 36864, 38912, 38400, - 38464, 38448, 38452, 0, 32768, 36864, 38912, 38400, - 38464, 38448, 38452, 0, 32768, 36864, 38912, 38400, - 38464, 38448, 38456, 38454, 0, 32768, 36864, 38912, - 38400, 38464, 38448, 0, 32768, 36864, 38912, 38400, - 38464, 38465, 38456, 0, 32768, 36864, 38912, 38400, - 38464, 38465, 38456, 0, 32768, 36864, 38912, 38400, - 38464, 38465, 38456, 38458, 0, 32768, 36864, 38912, - 38400, 38464, 38465, 38456, 0, 32768, 36864, 38912, - 38400, 38464, 38465, 38456, 38460, 0, 32768, 36864, - 38912, 38400, 38464, 38465, 38467, 38460, 0, 32768, - 36864, 38912, 38400, 38464, 38465, 38467, 38460, 38462, - 0, 32768, 36864, 38912, 38400, 0, 32768, 36864, - 38912, 38400, 38464, 0, 32768, 36864, 38912, 38400, - 38464, 0, 32768, 36864, 38912, 38400, 38464, 38466, - 0, 32768, 36864, 38912, 38400, 38464, 0, 32768, - 36864, 38912, 38400, 38464, 38468, 0, 32768, 36864, - 38912, 38400, 38464, 38468, 0, 32768, 36864, 38912, - 38400, 38464, 38472, 38470, 0, 32768, 36864, 38912, - 38400, 38464, 0, 32768, 36864, 38912, 38400, 38464, - 38472, 0, 32768, 36864, 38912, 38400, 38464, 38472, - 0, 32768, 36864, 38912, 38400, 38464, 38472, 38474, - 0, 32768, 36864, 38912, 38400, 38464, 38472, 0, - 32768, 36864, 38912, 38400, 38464, 38480, 38476, 0, - 32768, 36864, 38912, 38400, 38464, 38480, 38476, 0, - 32768, 36864, 38912, 38400, 38464, 38480, 38481, 38478, - 0, 32768, 36864, 38912, 38400, 38464, 0, 32768, - 36864, 38912, 38400, 38464, 38480, 0, 32768, 36864, - 38912, 38400, 38464, 38480, 0, 32768, 36864, 38912, - 38400, 38464, 38480, 38482, 0, 32768, 36864, 38912, - 38400, 38464, 38480, 0, 32768, 36864, 38912, 38400, - 38464, 38480, 38484, 0, 32768, 36864, 38912, 38400, - 38464, 38480, 38484, 0, 32768, 36864, 38912, 38400, - 38464, 38480, 38488, 38486, 0, 32768, 36864, 38912, - 38400, 38464, 38480, 0, 32768, 36864, 38912, 38400, - 38464, 38496, 38488, 0, 32768, 36864, 38912, 38400, - 38464, 38496, 38488, 0, 32768, 36864, 38912, 38400, - 38464, 38496, 38488, 38490, 0, 32768, 36864, 38912, - 38400, 38464, 38496, 38488, 0, 32768, 36864, 38912, - 38400, 38464, 38496, 38497, 38492, 0, 32768, 36864, - 38912, 38400, 38464, 38496, 38497, 38492, 0, 32768, - 36864, 38912, 38400, 38464, 38496, 38497, 38492, 38494, - 0, 32768, 36864, 38912, 38400, 38464, 0, 32768, - 36864, 38912, 38400, 38528, 38496, 0, 32768, 36864, - 38912, 38400, 38528, 38496, 0, 32768, 36864, 38912, - 38400, 38528, 38496, 38498, 0, 32768, 36864, 38912, - 38400, 38528, 38496, 0, 32768, 36864, 38912, 38400, - 38528, 38496, 38500, 0, 32768, 36864, 38912, 38400, - 38528, 38496, 38500, 0, 32768, 36864, 38912, 38400, - 38528, 38496, 38504, 38502, 0, 32768, 36864, 38912, - 38400, 38528, 38496, 0, 32768, 36864, 38912, 38400, - 38528, 38496, 38504, 0, 32768, 36864, 38912, 38400, - 38528, 38496, 38504, 0, 32768, 36864, 38912, 38400, - 38528, 38496, 38504, 38506, 0, 32768, 36864, 38912, - 38400, 38528, 38496, 38504, 0, 32768, 36864, 38912, - 38400, 38528, 38496, 38512, 38508, 0, 32768, 36864, - 38912, 38400, 38528, 38496, 38512, 38508, 0, 32768, - 36864, 38912, 38400, 38528, 38496, 38512, 38513, 38510, - 0, 32768, 36864, 38912, 38400, 38528, 38496, 0, - 32768, 36864, 38912, 38400, 38528, 38529, 38512, 0, - 32768, 36864, 38912, 38400, 38528, 38529, 38512, 0, - 32768, 36864, 38912, 38400, 38528, 38529, 38512, 38514, - 0, 32768, 36864, 38912, 38400, 38528, 38529, 38512, - 0, 32768, 36864, 38912, 38400, 38528, 38529, 38512, - 38516, 0, 32768, 36864, 38912, 38400, 38528, 38529, - 38512, 38516, 0, 32768, 36864, 38912, 38400, 38528, - 38529, 38512, 38520, 38518, 0, 32768, 36864, 38912, - 38400, 38528, 38529, 38512, 0, 32768, 36864, 38912, - 38400, 38528, 38529, 38512, 38520, 0, 32768, 36864, - 38912, 38400, 38528, 38529, 38531, 38520, 0, 32768, - 36864, 38912, 38400, 38528, 38529, 38531, 38520, 38522, - 0, 32768, 36864, 38912, 38400, 38528, 38529, 38531, - 38520, 0, 32768, 36864, 38912, 38400, 38528, 38529, - 38531, 38520, 38524, 0, 32768, 36864, 38912, 38400, - 38528, 38529, 38531, 38520, 38524, 0, 32768, 36864, - 38912, 38400, 38528, 38529, 38531, 38520, 38524, 38526, - 0, 32768, 36864, 38912, 38400, 0, 32768, 36864, - 38912, 38400, 38528, 0, 32768, 36864, 38912, 38400, - 38528, 0, 32768, 36864, 38912, 38400, 38528, 38530, - 0, 32768, 36864, 38912, 38400, 38528, 0, 32768, - 36864, 38912, 38400, 38528, 38532, 0, 32768, 36864, - 38912, 38400, 38528, 38532, 0, 32768, 36864, 38912, - 38400, 38528, 38536, 38534, 0, 32768, 36864, 38912, - 38400, 38528, 0, 32768, 36864, 38912, 38400, 38528, - 38536, 0, 32768, 36864, 38912, 38400, 38528, 38536, - 0, 32768, 36864, 38912, 38400, 38528, 38536, 38538, - 0, 32768, 36864, 38912, 38400, 38528, 38536, 0, - 32768, 36864, 38912, 38400, 38528, 38544, 38540, 0, - 32768, 36864, 38912, 38400, 38528, 38544, 38540, 0, - 32768, 36864, 38912, 38400, 38528, 38544, 38545, 38542, - 0, 32768, 36864, 38912, 38400, 38528, 0, 32768, - 36864, 38912, 38400, 38528, 38544, 0, 32768, 36864, - 38912, 38400, 38528, 38544, 0, 32768, 36864, 38912, - 38400, 38528, 38544, 38546, 0, 32768, 36864, 38912, - 38400, 38528, 38544, 0, 32768, 36864, 38912, 38400, - 38528, 38544, 38548, 0, 32768, 36864, 38912, 38400, - 38528, 38544, 38548, 0, 32768, 36864, 38912, 38400, - 38528, 38544, 38552, 38550, 0, 32768, 36864, 38912, - 38400, 38528, 38544, 0, 32768, 36864, 38912, 38400, - 38528, 38560, 38552, 0, 32768, 36864, 38912, 38400, - 38528, 38560, 38552, 0, 32768, 36864, 38912, 38400, - 38528, 38560, 38552, 38554, 0, 32768, 36864, 38912, - 38400, 38528, 38560, 38552, 0, 32768, 36864, 38912, - 38400, 38528, 38560, 38561, 38556, 0, 32768, 36864, - 38912, 38400, 38528, 38560, 38561, 38556, 0, 32768, - 36864, 38912, 38400, 38528, 38560, 38561, 38556, 38558, - 0, 32768, 36864, 38912, 38400, 38528, 0, 32768, - 36864, 38912, 38400, 38528, 38560, 0, 32768, 36864, - 38912, 38400, 38528, 38560, 0, 32768, 36864, 38912, - 38400, 38528, 38560, 38562, 0, 32768, 36864, 38912, - 38400, 38528, 38560, 0, 32768, 36864, 38912, 38400, - 38528, 38560, 38564, 0, 32768, 36864, 38912, 38400, - 38528, 38560, 38564, 0, 32768, 36864, 38912, 38400, - 38528, 38560, 38568, 38566, 0, 32768, 36864, 38912, - 38400, 38528, 38560, 0, 32768, 36864, 38912, 38400, - 38528, 38560, 38568, 0, 32768, 36864, 38912, 38400, - 38528, 38560, 38568, 0, 32768, 36864, 38912, 38400, - 38528, 38560, 38568, 38570, 0, 32768, 36864, 38912, - 38400, 38528, 38560, 38568, 0, 32768, 36864, 38912, - 38400, 38528, 38560, 38576, 38572, 0, 32768, 36864, - 38912, 38400, 38528, 38560, 38576, 38572, 0, 32768, - 36864, 38912, 38400, 38528, 38560, 38576, 38577, 38574, - 0, 32768, 36864, 38912, 38400, 38528, 38560, 0, - 32768, 36864, 38912, 38400, 38528, 38592, 38576, 0, - 32768, 36864, 38912, 38400, 38528, 38592, 38576, 0, - 32768, 36864, 38912, 38400, 38528, 38592, 38576, 38578, - 0, 32768, 36864, 38912, 38400, 38528, 38592, 38576, - 0, 32768, 36864, 38912, 38400, 38528, 38592, 38576, - 38580, 0, 32768, 36864, 38912, 38400, 38528, 38592, - 38576, 38580, 0, 32768, 36864, 38912, 38400, 38528, - 38592, 38576, 38584, 38582, 0, 32768, 36864, 38912, - 38400, 38528, 38592, 38576, 0, 32768, 36864, 38912, - 38400, 38528, 38592, 38593, 38584, 0, 32768, 36864, - 38912, 38400, 38528, 38592, 38593, 38584, 0, 32768, - 36864, 38912, 38400, 38528, 38592, 38593, 38584, 38586, - 0, 32768, 36864, 38912, 38400, 38528, 38592, 38593, - 38584, 0, 32768, 36864, 38912, 38400, 38528, 38592, - 38593, 38584, 38588, 0, 32768, 36864, 38912, 38400, - 38528, 38592, 38593, 38595, 38588, 0, 32768, 36864, - 38912, 38400, 38528, 38592, 38593, 38595, 38588, 38590, - 0, 32768, 36864, 38912, 38400, 38528, 0, 32768, - 36864, 38912, 38400, 38656, 38592, 0, 32768, 36864, - 38912, 38400, 38656, 38592, 0, 32768, 36864, 38912, - 38400, 38656, 38592, 38594, 0, 32768, 36864, 38912, - 38400, 38656, 38592, 0, 32768, 36864, 38912, 38400, - 38656, 38592, 38596, 0, 32768, 36864, 38912, 38400, - 38656, 38592, 38596, 0, 32768, 36864, 38912, 38400, - 38656, 38592, 38600, 38598, 0, 32768, 36864, 38912, - 38400, 38656, 38592, 0, 32768, 36864, 38912, 38400, - 38656, 38592, 38600, 0, 32768, 36864, 38912, 38400, - 38656, 38592, 38600, 0, 32768, 36864, 38912, 38400, - 38656, 38592, 38600, 38602, 0, 32768, 36864, 38912, - 38400, 38656, 38592, 38600, 0, 32768, 36864, 38912, - 38400, 38656, 38592, 38608, 38604, 0, 32768, 36864, - 38912, 38400, 38656, 38592, 38608, 38604, 0, 32768, - 36864, 38912, 38400, 38656, 38592, 38608, 38609, 38606, - 0, 32768, 36864, 38912, 38400, 38656, 38592, 0, - 32768, 36864, 38912, 38400, 38656, 38592, 38608, 0, - 32768, 36864, 38912, 38400, 38656, 38592, 38608, 0, - 32768, 36864, 38912, 38400, 38656, 38592, 38608, 38610, - 0, 32768, 36864, 38912, 38400, 38656, 38592, 38608, - 0, 32768, 36864, 38912, 38400, 38656, 38592, 38608, - 38612, 0, 32768, 36864, 38912, 38400, 38656, 38592, - 38608, 38612, 0, 32768, 36864, 38912, 38400, 38656, - 38592, 38608, 38616, 38614, 0, 32768, 36864, 38912, - 38400, 38656, 38592, 38608, 0, 32768, 36864, 38912, - 38400, 38656, 38592, 38624, 38616, 0, 32768, 36864, - 38912, 38400, 38656, 38592, 38624, 38616, 0, 32768, - 36864, 38912, 38400, 38656, 38592, 38624, 38616, 38618, - 0, 32768, 36864, 38912, 38400, 38656, 38592, 38624, - 38616, 0, 32768, 36864, 38912, 38400, 38656, 38592, - 38624, 38625, 38620, 0, 32768, 36864, 38912, 38400, - 38656, 38592, 38624, 38625, 38620, 0, 32768, 36864, - 38912, 38400, 38656, 38592, 38624, 38625, 38620, 38622, - 0, 32768, 36864, 38912, 38400, 38656, 38592, 0, - 32768, 36864, 38912, 38400, 38656, 38657, 38624, 0, - 32768, 36864, 38912, 38400, 38656, 38657, 38624, 0, - 32768, 36864, 38912, 38400, 38656, 38657, 38624, 38626, - 0, 32768, 36864, 38912, 38400, 38656, 38657, 38624, - 0, 32768, 36864, 38912, 38400, 38656, 38657, 38624, - 38628, 0, 32768, 36864, 38912, 38400, 38656, 38657, - 38624, 38628, 0, 32768, 36864, 38912, 38400, 38656, - 38657, 38624, 38632, 38630, 0, 32768, 36864, 38912, - 38400, 38656, 38657, 38624, 0, 32768, 36864, 38912, - 38400, 38656, 38657, 38624, 38632, 0, 32768, 36864, - 38912, 38400, 38656, 38657, 38624, 38632, 0, 32768, - 36864, 38912, 38400, 38656, 38657, 38624, 38632, 38634, - 0, 32768, 36864, 38912, 38400, 38656, 38657, 38624, - 38632, 0, 32768, 36864, 38912, 38400, 38656, 38657, - 38624, 38640, 38636, 0, 32768, 36864, 38912, 38400, - 38656, 38657, 38624, 38640, 38636, 0, 32768, 36864, - 38912, 38400, 38656, 38657, 38624, 38640, 38641, 38638, - 0, 32768, 36864, 38912, 38400, 38656, 38657, 38624, - 0, 32768, 36864, 38912, 38400, 38656, 38657, 38624, - 38640, 0, 32768, 36864, 38912, 38400, 38656, 38657, - 38659, 38640, 0, 32768, 36864, 38912, 38400, 38656, - 38657, 38659, 38640, 38642, 0, 32768, 36864, 38912, - 38400, 38656, 38657, 38659, 38640, 0, 32768, 36864, - 38912, 38400, 38656, 38657, 38659, 38640, 38644, 0, - 32768, 36864, 38912, 38400, 38656, 38657, 38659, 38640, - 38644, 0, 32768, 36864, 38912, 38400, 38656, 38657, - 38659, 38640, 38648, 38646, 0, 32768, 36864, 38912, - 38400, 38656, 38657, 38659, 38640, 0, 32768, 36864, - 38912, 38400, 38656, 38657, 38659, 38640, 38648, 0, - 32768, 36864, 38912, 38400, 38656, 38657, 38659, 38640, - 38648, 0, 32768, 36864, 38912, 38400, 38656, 38657, - 38659, 38640, 38648, 38650, 0, 32768, 36864, 38912, - 38400, 38656, 38657, 38659, 38663, 38648, 0, 32768, - 36864, 38912, 38400, 38656, 38657, 38659, 38663, 38648, - 38652, 0, 32768, 36864, 38912, 38400, 38656, 38657, - 38659, 38663, 38648, 38652, 0, 32768, 36864, 38912, - 38400, 38656, 38657, 38659, 38663, 38648, 38652, 38654, - 0, 32768, 36864, 38912, 38400, 0, 32768, 36864, - 38912, 38400, 38656, 0, 32768, 36864, 38912, 38913, - 38656, 0, 32768, 36864, 38912, 38913, 38656, 38658, - 0, 32768, 36864, 38912, 38913, 38656, 0, 32768, - 36864, 38912, 38913, 38656, 38660, 0, 32768, 36864, - 38912, 38913, 38656, 38660, 0, 32768, 36864, 38912, - 38913, 38656, 38664, 38662, 0, 32768, 36864, 38912, - 38913, 38656, 0, 32768, 36864, 38912, 38913, 38656, - 38664, 0, 32768, 36864, 38912, 38913, 38656, 38664, - 0, 32768, 36864, 38912, 38913, 38656, 38664, 38666, - 0, 32768, 36864, 38912, 38913, 38656, 38664, 0, - 32768, 36864, 38912, 38913, 38656, 38672, 38668, 0, - 32768, 36864, 38912, 38913, 38656, 38672, 38668, 0, - 32768, 36864, 38912, 38913, 38656, 38672, 38673, 38670, - 0, 32768, 36864, 38912, 38913, 38656, 0, 32768, - 36864, 38912, 38913, 38656, 38672, 0, 32768, 36864, - 38912, 38913, 38656, 38672, 0, 32768, 36864, 38912, - 38913, 38656, 38672, 38674, 0, 32768, 36864, 38912, - 38913, 38656, 38672, 0, 32768, 36864, 38912, 38913, - 38656, 38672, 38676, 0, 32768, 36864, 38912, 38913, - 38656, 38672, 38676, 0, 32768, 36864, 38912, 38913, - 38656, 38672, 38680, 38678, 0, 32768, 36864, 38912, - 38913, 38656, 38672, 0, 32768, 36864, 38912, 38913, - 38656, 38688, 38680, 0, 32768, 36864, 38912, 38913, - 38656, 38688, 38680, 0, 32768, 36864, 38912, 38913, - 38656, 38688, 38680, 38682, 0, 32768, 36864, 38912, - 38913, 38656, 38688, 38680, 0, 32768, 36864, 38912, - 38913, 38656, 38688, 38689, 38684, 0, 32768, 36864, - 38912, 38913, 38656, 38688, 38689, 38684, 0, 32768, - 36864, 38912, 38913, 38656, 38688, 38689, 38684, 38686, - 0, 32768, 36864, 38912, 38913, 38656, 0, 32768, - 36864, 38912, 38913, 38656, 38688, 0, 32768, 36864, - 38912, 38913, 38656, 38688, 0, 32768, 36864, 38912, - 38913, 38656, 38688, 38690, 0, 32768, 36864, 38912, - 38913, 38656, 38688, 0, 32768, 36864, 38912, 38913, - 38656, 38688, 38692, 0, 32768, 36864, 38912, 38913, - 38656, 38688, 38692, 0, 32768, 36864, 38912, 38913, - 38656, 38688, 38696, 38694, 0, 32768, 36864, 38912, - 38913, 38656, 38688, 0, 32768, 36864, 38912, 38913, - 38656, 38688, 38696, 0, 32768, 36864, 38912, 38913, - 38656, 38688, 38696, 0, 32768, 36864, 38912, 38913, - 38656, 38688, 38696, 38698, 0, 32768, 36864, 38912, - 38913, 38656, 38688, 38696, 0, 32768, 36864, 38912, - 38913, 38656, 38688, 38704, 38700, 0, 32768, 36864, - 38912, 38913, 38656, 38688, 38704, 38700, 0, 32768, - 36864, 38912, 38913, 38656, 38688, 38704, 38705, 38702, - 0, 32768, 36864, 38912, 38913, 38656, 38688, 0, - 32768, 36864, 38912, 38913, 38656, 38720, 38704, 0, - 32768, 36864, 38912, 38913, 38656, 38720, 38704, 0, - 32768, 36864, 38912, 38913, 38656, 38720, 38704, 38706, - 0, 32768, 36864, 38912, 38913, 38656, 38720, 38704, - 0, 32768, 36864, 38912, 38913, 38656, 38720, 38704, - 38708, 0, 32768, 36864, 38912, 38913, 38656, 38720, - 38704, 38708, 0, 32768, 36864, 38912, 38913, 38656, - 38720, 38704, 38712, 38710, 0, 32768, 36864, 38912, - 38913, 38656, 38720, 38704, 0, 32768, 36864, 38912, - 38913, 38656, 38720, 38721, 38712, 0, 32768, 36864, - 38912, 38913, 38656, 38720, 38721, 38712, 0, 32768, - 36864, 38912, 38913, 38656, 38720, 38721, 38712, 38714, - 0, 32768, 36864, 38912, 38913, 38656, 38720, 38721, - 38712, 0, 32768, 36864, 38912, 38913, 38656, 38720, - 38721, 38712, 38716, 0, 32768, 36864, 38912, 38913, - 38656, 38720, 38721, 38723, 38716, 0, 32768, 36864, - 38912, 38913, 38656, 38720, 38721, 38723, 38716, 38718, - 0, 32768, 36864, 38912, 38913, 38656, 0, 32768, - 36864, 38912, 38913, 38656, 38720, 0, 32768, 36864, - 38912, 38913, 38656, 38720, 0, 32768, 36864, 38912, - 38913, 38656, 38720, 38722, 0, 32768, 36864, 38912, - 38913, 38656, 38720, 0, 32768, 36864, 38912, 38913, - 38656, 38720, 38724, 0, 32768, 36864, 38912, 38913, - 38656, 38720, 38724, 0, 32768, 36864, 38912, 38913, - 38656, 38720, 38728, 38726, 0, 32768, 36864, 38912, - 38913, 38656, 38720, 0, 32768, 36864, 38912, 38913, - 38656, 38720, 38728, 0, 32768, 36864, 38912, 38913, - 38656, 38720, 38728, 0, 32768, 36864, 38912, 38913, - 38656, 38720, 38728, 38730, 0, 32768, 36864, 38912, - 38913, 38656, 38720, 38728, 0, 32768, 36864, 38912, - 38913, 38656, 38720, 38736, 38732, 0, 32768, 36864, - 38912, 38913, 38656, 38720, 38736, 38732, 0, 32768, - 36864, 38912, 38913, 38656, 38720, 38736, 38737, 38734, - 0, 32768, 36864, 38912, 38913, 38656, 38720, 0, - 32768, 36864, 38912, 38913, 38656, 38720, 38736, 0, - 32768, 36864, 38912, 38913, 38656, 38720, 38736, 0, - 32768, 36864, 38912, 38913, 38656, 38720, 38736, 38738, - 0, 32768, 36864, 38912, 38913, 38656, 38720, 38736, - 0, 32768, 36864, 38912, 38913, 38656, 38720, 38736, - 38740, 0, 32768, 36864, 38912, 38913, 38656, 38720, - 38736, 38740, 0, 32768, 36864, 38912, 38913, 38656, - 38720, 38736, 38744, 38742, 0, 32768, 36864, 38912, - 38913, 38656, 38720, 38736, 0, 32768, 36864, 38912, - 38913, 38656, 38720, 38752, 38744, 0, 32768, 36864, - 38912, 38913, 38656, 38720, 38752, 38744, 0, 32768, - 36864, 38912, 38913, 38656, 38720, 38752, 38744, 38746, - 0, 32768, 36864, 38912, 38913, 38656, 38720, 38752, - 38744, 0, 32768, 36864, 38912, 38913, 38656, 38720, - 38752, 38753, 38748, 0, 32768, 36864, 38912, 38913, - 38656, 38720, 38752, 38753, 38748, 0, 32768, 36864, - 38912, 38913, 38656, 38720, 38752, 38753, 38748, 38750, - 0, 32768, 36864, 38912, 38913, 38656, 38720, 0, - 32768, 36864, 38912, 38913, 38656, 38784, 38752, 0, - 32768, 36864, 38912, 38913, 38656, 38784, 38752, 0, - 32768, 36864, 38912, 38913, 38656, 38784, 38752, 38754, - 0, 32768, 36864, 38912, 38913, 38656, 38784, 38752, - 0, 32768, 36864, 38912, 38913, 38656, 38784, 38752, - 38756, 0, 32768, 36864, 38912, 38913, 38656, 38784, - 38752, 38756, 0, 32768, 36864, 38912, 38913, 38656, - 38784, 38752, 38760, 38758, 0, 32768, 36864, 38912, - 38913, 38656, 38784, 38752, 0, 32768, 36864, 38912, - 38913, 38656, 38784, 38752, 38760, 0, 32768, 36864, - 38912, 38913, 38656, 38784, 38752, 38760, 0, 32768, - 36864, 38912, 38913, 38656, 38784, 38752, 38760, 38762, - 0, 32768, 36864, 38912, 38913, 38656, 38784, 38752, - 38760, 0, 32768, 36864, 38912, 38913, 38656, 38784, - 38752, 38768, 38764, 0, 32768, 36864, 38912, 38913, - 38656, 38784, 38752, 38768, 38764, 0, 32768, 36864, - 38912, 38913, 38656, 38784, 38752, 38768, 38769, 38766, - 0, 32768, 36864, 38912, 38913, 38656, 38784, 38752, - 0, 32768, 36864, 38912, 38913, 38656, 38784, 38785, - 38768, 0, 32768, 36864, 38912, 38913, 38656, 38784, - 38785, 38768, 0, 32768, 36864, 38912, 38913, 38656, - 38784, 38785, 38768, 38770, 0, 32768, 36864, 38912, - 38913, 38656, 38784, 38785, 38768, 0, 32768, 36864, - 38912, 38913, 38656, 38784, 38785, 38768, 38772, 0, - 32768, 36864, 38912, 38913, 38656, 38784, 38785, 38768, - 38772, 0, 32768, 36864, 38912, 38913, 38656, 38784, - 38785, 38768, 38776, 38774, 0, 32768, 36864, 38912, - 38913, 38656, 38784, 38785, 38768, 0, 32768, 36864, - 38912, 38913, 38656, 38784, 38785, 38768, 38776, 0, - 32768, 36864, 38912, 38913, 38656, 38784, 38785, 38787, - 38776, 0, 32768, 36864, 38912, 38913, 38656, 38784, - 38785, 38787, 38776, 38778, 0, 32768, 36864, 38912, - 38913, 38656, 38784, 38785, 38787, 38776, 0, 32768, - 36864, 38912, 38913, 38656, 38784, 38785, 38787, 38776, - 38780, 0, 32768, 36864, 38912, 38913, 38656, 38784, - 38785, 38787, 38776, 38780, 0, 32768, 36864, 38912, - 38913, 38656, 38784, 38785, 38787, 38776, 38780, 38782, - 0, 32768, 36864, 38912, 38913, 38656, 0, 32768, - 36864, 38912, 38913, 38656, 38784, 0, 32768, 36864, - 38912, 38913, 38656, 38784, 0, 32768, 36864, 38912, - 38913, 38656, 38784, 38786, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 0, 32768, 36864, 38912, 38913, - 38915, 38784, 38788, 0, 32768, 36864, 38912, 38913, - 38915, 38784, 38788, 0, 32768, 36864, 38912, 38913, - 38915, 38784, 38792, 38790, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 0, 32768, 36864, 38912, 38913, - 38915, 38784, 38792, 0, 32768, 36864, 38912, 38913, - 38915, 38784, 38792, 0, 32768, 36864, 38912, 38913, - 38915, 38784, 38792, 38794, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 38792, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 38800, 38796, 0, 32768, 36864, - 38912, 38913, 38915, 38784, 38800, 38796, 0, 32768, - 36864, 38912, 38913, 38915, 38784, 38800, 38801, 38798, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 0, - 32768, 36864, 38912, 38913, 38915, 38784, 38800, 0, - 32768, 36864, 38912, 38913, 38915, 38784, 38800, 0, - 32768, 36864, 38912, 38913, 38915, 38784, 38800, 38802, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 38800, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 38800, - 38804, 0, 32768, 36864, 38912, 38913, 38915, 38784, - 38800, 38804, 0, 32768, 36864, 38912, 38913, 38915, - 38784, 38800, 38808, 38806, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 38800, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 38816, 38808, 0, 32768, 36864, - 38912, 38913, 38915, 38784, 38816, 38808, 0, 32768, - 36864, 38912, 38913, 38915, 38784, 38816, 38808, 38810, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 38816, - 38808, 0, 32768, 36864, 38912, 38913, 38915, 38784, - 38816, 38817, 38812, 0, 32768, 36864, 38912, 38913, - 38915, 38784, 38816, 38817, 38812, 0, 32768, 36864, - 38912, 38913, 38915, 38784, 38816, 38817, 38812, 38814, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 0, - 32768, 36864, 38912, 38913, 38915, 38784, 38816, 0, - 32768, 36864, 38912, 38913, 38915, 38784, 38816, 0, - 32768, 36864, 38912, 38913, 38915, 38784, 38816, 38818, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 38816, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 38816, - 38820, 0, 32768, 36864, 38912, 38913, 38915, 38784, - 38816, 38820, 0, 32768, 36864, 38912, 38913, 38915, - 38784, 38816, 38824, 38822, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 38816, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 38816, 38824, 0, 32768, 36864, - 38912, 38913, 38915, 38784, 38816, 38824, 0, 32768, - 36864, 38912, 38913, 38915, 38784, 38816, 38824, 38826, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 38816, - 38824, 0, 32768, 36864, 38912, 38913, 38915, 38784, - 38816, 38832, 38828, 0, 32768, 36864, 38912, 38913, - 38915, 38784, 38816, 38832, 38828, 0, 32768, 36864, - 38912, 38913, 38915, 38784, 38816, 38832, 38833, 38830, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 38816, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 38848, - 38832, 0, 32768, 36864, 38912, 38913, 38915, 38784, - 38848, 38832, 0, 32768, 36864, 38912, 38913, 38915, - 38784, 38848, 38832, 38834, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 38848, 38832, 0, 32768, 36864, - 38912, 38913, 38915, 38784, 38848, 38832, 38836, 0, - 32768, 36864, 38912, 38913, 38915, 38784, 38848, 38832, - 38836, 0, 32768, 36864, 38912, 38913, 38915, 38784, - 38848, 38832, 38840, 38838, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 38848, 38832, 0, 32768, 36864, - 38912, 38913, 38915, 38784, 38848, 38849, 38840, 0, - 32768, 36864, 38912, 38913, 38915, 38784, 38848, 38849, - 38840, 0, 32768, 36864, 38912, 38913, 38915, 38784, - 38848, 38849, 38840, 38842, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 38848, 38849, 38840, 0, 32768, - 36864, 38912, 38913, 38915, 38784, 38848, 38849, 38840, - 38844, 0, 32768, 36864, 38912, 38913, 38915, 38784, - 38848, 38849, 38851, 38844, 0, 32768, 36864, 38912, - 38913, 38915, 38784, 38848, 38849, 38851, 38844, 38846, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 0, - 32768, 36864, 38912, 38913, 38915, 38784, 38848, 0, - 32768, 36864, 38912, 38913, 38915, 38784, 38848, 0, - 32768, 36864, 38912, 38913, 38915, 38784, 38848, 38850, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 38848, - 0, 32768, 36864, 38912, 38913, 38915, 38784, 38848, - 38852, 0, 32768, 36864, 38912, 38913, 38915, 38784, - 38848, 38852, 0, 32768, 36864, 38912, 38913, 38915, - 38784, 38848, 38856, 38854, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38848, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38848, 38856, 0, 32768, 36864, - 38912, 38913, 38915, 38919, 38848, 38856, 0, 32768, - 36864, 38912, 38913, 38915, 38919, 38848, 38856, 38858, - 0, 32768, 36864, 38912, 38913, 38915, 38919, 38848, - 38856, 0, 32768, 36864, 38912, 38913, 38915, 38919, - 38848, 38864, 38860, 0, 32768, 36864, 38912, 38913, - 38915, 38919, 38848, 38864, 38860, 0, 32768, 36864, - 38912, 38913, 38915, 38919, 38848, 38864, 38865, 38862, - 0, 32768, 36864, 38912, 38913, 38915, 38919, 38848, - 0, 32768, 36864, 38912, 38913, 38915, 38919, 38848, - 38864, 0, 32768, 36864, 38912, 38913, 38915, 38919, - 38848, 38864, 0, 32768, 36864, 38912, 38913, 38915, - 38919, 38848, 38864, 38866, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38848, 38864, 0, 32768, 36864, - 38912, 38913, 38915, 38919, 38848, 38864, 38868, 0, - 32768, 36864, 38912, 38913, 38915, 38919, 38848, 38864, - 38868, 0, 32768, 36864, 38912, 38913, 38915, 38919, - 38848, 38864, 38872, 38870, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38848, 38864, 0, 32768, 36864, - 38912, 38913, 38915, 38919, 38848, 38880, 38872, 0, - 32768, 36864, 38912, 38913, 38915, 38919, 38848, 38880, - 38872, 0, 32768, 36864, 38912, 38913, 38915, 38919, - 38848, 38880, 38872, 38874, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38848, 38880, 38872, 0, 32768, - 36864, 38912, 38913, 38915, 38919, 38848, 38880, 38881, - 38876, 0, 32768, 36864, 38912, 38913, 38915, 38919, - 38848, 38880, 38881, 38876, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38848, 38880, 38881, 38876, 38878, - 0, 32768, 36864, 38912, 38913, 38915, 38919, 38848, - 0, 32768, 36864, 38912, 38913, 38915, 38919, 38848, - 38880, 0, 32768, 36864, 38912, 38913, 38915, 38919, - 38848, 38880, 0, 32768, 36864, 38912, 38913, 38915, - 38919, 38848, 38880, 38882, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38848, 38880, 0, 32768, 36864, - 38912, 38913, 38915, 38919, 38848, 38880, 38884, 0, - 32768, 36864, 38912, 38913, 38915, 38919, 38848, 38880, - 38884, 0, 32768, 36864, 38912, 38913, 38915, 38919, - 38848, 38880, 38888, 38886, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38848, 38880, 0, 32768, 36864, - 38912, 38913, 38915, 38919, 38848, 38880, 38888, 0, - 32768, 36864, 38912, 38913, 38915, 38919, 38848, 38880, - 38888, 0, 32768, 36864, 38912, 38913, 38915, 38919, - 38848, 38880, 38888, 38890, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38848, 38880, 38888, 0, 32768, - 36864, 38912, 38913, 38915, 38919, 38848, 38880, 38896, - 38892, 0, 32768, 36864, 38912, 38913, 38915, 38919, - 38848, 38880, 38896, 38892, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38848, 38880, 38896, 38897, 38894, - 0, 32768, 36864, 38912, 38913, 38915, 38919, 38927, - 38880, 0, 32768, 36864, 38912, 38913, 38915, 38919, - 38927, 38880, 38896, 0, 32768, 36864, 38912, 38913, - 38915, 38919, 38927, 38880, 38896, 0, 32768, 36864, - 38912, 38913, 38915, 38919, 38927, 38880, 38896, 38898, - 0, 32768, 36864, 38912, 38913, 38915, 38919, 38927, - 38880, 38896, 0, 32768, 36864, 38912, 38913, 38915, - 38919, 38927, 38880, 38896, 38900, 0, 32768, 36864, - 38912, 38913, 38915, 38919, 38927, 38880, 38896, 38900, - 0, 32768, 36864, 38912, 38913, 38915, 38919, 38927, - 38880, 38896, 38904, 38902, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38927, 38880, 38896, 0, 32768, - 36864, 38912, 38913, 38915, 38919, 38927, 38880, 38896, - 38904, 0, 32768, 36864, 38912, 38913, 38915, 38919, - 38927, 38880, 38896, 38904, 0, 32768, 36864, 38912, - 38913, 38915, 38919, 38927, 38880, 38896, 38904, 38906, - 0, 32768, 36864, 38912, 38913, 38915, 38919, 38927, - 38880, 38896, 38904, 0, 32768, 36864, 38912, 38913, - 38915, 38919, 38927, 38880, 38896, 38904, 38908, 0, - 32768, 36864, 38912, 38913, 38915, 38919, 38927, 38880, - 38896, 38904, 38908, 0, 32768, 36864, 38912, 38913, - 38915, 38919, 38927, 38880, 38896, 38904, 38908, 38910, - 0, 32768, 36864, 0, 32768, 36864, 38912, 0, - 32768, 36864, 38912, 0, 32768, 36864, 38912, 38914, - 0, 32768, 36864, 38912, 0, 32768, 36864, 38912, - 38916, 0, 32768, 36864, 38912, 38916, 0, 32768, - 36864, 38912, 38920, 38918, 0, 32768, 36864, 38912, - 0, 32768, 36864, 38912, 38920, 0, 32768, 36864, - 38912, 38920, 0, 32768, 36864, 38912, 38920, 38922, - 0, 32768, 36864, 38912, 38920, 0, 32768, 36864, - 38912, 38928, 38924, 0, 32768, 36864, 38912, 38928, - 38924, 0, 32768, 36864, 38912, 38928, 38929, 38926, - 0, 32768, 36864, 38912, 0, 32768, 36864, 38912, - 38928, 0, 32768, 36864, 38912, 38928, 0, 32768, - 36864, 38912, 38928, 38930, 0, 32768, 36864, 38912, - 38928, 0, 32768, 36864, 38912, 38928, 38932, 0, - 32768, 36864, 38912, 38928, 38932, 0, 32768, 36864, - 38912, 38928, 38936, 38934, 0, 32768, 36864, 38912, - 38928, 0, 32768, 36864, 38912, 38944, 38936, 0, - 32768, 36864, 38912, 38944, 38936, 0, 32768, 36864, - 38912, 38944, 38936, 38938, 0, 32768, 36864, 38912, - 38944, 38936, 0, 32768, 36864, 38912, 38944, 38945, - 38940, 0, 32768, 36864, 38912, 38944, 38945, 38940, - 0, 32768, 36864, 38912, 38944, 38945, 38940, 38942, - 0, 32768, 36864, 38912, 0, 32768, 36864, 38912, - 38944, 0, 32768, 36864, 38912, 38944, 0, 32768, - 36864, 38912, 38944, 38946, 0, 32768, 36864, 38912, - 38944, 0, 32768, 36864, 38912, 38944, 38948, 0, - 32768, 36864, 38912, 38944, 38948, 0, 32768, 36864, - 38912, 38944, 38952, 38950, 0, 32768, 36864, 38912, - 38944, 0, 32768, 36864, 38912, 38944, 38952, 0, - 32768, 36864, 38912, 38944, 38952, 0, 32768, 36864, - 38912, 38944, 38952, 38954, 0, 32768, 36864, 38912, - 38944, 38952, 0, 32768, 36864, 38912, 38944, 38960, - 38956, 0, 32768, 36864, 38912, 38944, 38960, 38956, - 0, 32768, 36864, 38912, 38944, 38960, 38961, 38958, - 0, 32768, 36864, 38912, 38944, 0, 32768, 36864, - 38912, 38976, 38960, 0, 32768, 36864, 38912, 38976, - 38960, 0, 32768, 36864, 38912, 38976, 38960, 38962, - 0, 32768, 36864, 38912, 38976, 38960, 0, 32768, - 36864, 38912, 38976, 38960, 38964, 0, 32768, 36864, - 38912, 38976, 38960, 38964, 0, 32768, 36864, 38912, - 38976, 38960, 38968, 38966, 0, 32768, 36864, 38912, - 38976, 38960, 0, 32768, 36864, 38912, 38976, 38977, - 38968, 0, 32768, 36864, 38912, 38976, 38977, 38968, - 0, 32768, 36864, 38912, 38976, 38977, 38968, 38970, - 0, 32768, 36864, 38912, 38976, 38977, 38968, 0, - 32768, 36864, 38912, 38976, 38977, 38968, 38972, 0, - 32768, 36864, 38912, 38976, 38977, 38979, 38972, 0, - 32768, 36864, 38912, 38976, 38977, 38979, 38972, 38974, - 0, 32768, 36864, 38912, 0, 32768, 36864, 38912, - 38976, 0, 32768, 36864, 38912, 38976, 0, 32768, - 36864, 38912, 38976, 38978, 0, 32768, 36864, 38912, - 38976, 0, 32768, 36864, 38912, 38976, 38980, 0, - 32768, 36864, 38912, 38976, 38980, 0, 32768, 36864, - 38912, 38976, 38984, 38982, 0, 32768, 36864, 38912, - 38976, 0, 32768, 36864, 38912, 38976, 38984, 0, - 32768, 36864, 38912, 38976, 38984, 0, 32768, 36864, - 38912, 38976, 38984, 38986, 0, 32768, 36864, 38912, - 38976, 38984, 0, 32768, 36864, 38912, 38976, 38992, - 38988, 0, 32768, 36864, 38912, 38976, 38992, 38988, - 0, 32768, 36864, 38912, 38976, 38992, 38993, 38990, - 0, 32768, 36864, 38912, 38976, 0, 32768, 36864, - 38912, 38976, 38992, 0, 32768, 36864, 38912, 38976, - 38992, 0, 32768, 36864, 38912, 38976, 38992, 38994, - 0, 32768, 36864, 38912, 38976, 38992, 0, 32768, - 36864, 38912, 38976, 38992, 38996, 0, 32768, 36864, - 38912, 38976, 38992, 38996, 0, 32768, 36864, 38912, - 38976, 38992, 39000, 38998, 0, 32768, 36864, 38912, - 38976, 38992, 0, 32768, 36864, 38912, 38976, 39008, - 39000, 0, 32768, 36864, 38912, 38976, 39008, 39000, - 0, 32768, 36864, 38912, 38976, 39008, 39000, 39002, - 0, 32768, 36864, 38912, 38976, 39008, 39000, 0, - 32768, 36864, 38912, 38976, 39008, 39009, 39004, 0, - 32768, 36864, 38912, 38976, 39008, 39009, 39004, 0, - 32768, 36864, 38912, 38976, 39008, 39009, 39004, 39006, - 0, 32768, 36864, 38912, 38976, 0, 32768, 36864, - 38912, 39040, 39008, 0, 32768, 36864, 38912, 39040, - 39008, 0, 32768, 36864, 38912, 39040, 39008, 39010, - 0, 32768, 36864, 38912, 39040, 39008, 0, 32768, - 36864, 38912, 39040, 39008, 39012, 0, 32768, 36864, - 38912, 39040, 39008, 39012, 0, 32768, 36864, 38912, - 39040, 39008, 39016, 39014, 0, 32768, 36864, 38912, - 39040, 39008, 0, 32768, 36864, 38912, 39040, 39008, - 39016, 0, 32768, 36864, 38912, 39040, 39008, 39016, - 0, 32768, 36864, 38912, 39040, 39008, 39016, 39018, - 0, 32768, 36864, 38912, 39040, 39008, 39016, 0, - 32768, 36864, 38912, 39040, 39008, 39024, 39020, 0, - 32768, 36864, 38912, 39040, 39008, 39024, 39020, 0, - 32768, 36864, 38912, 39040, 39008, 39024, 39025, 39022, - 0, 32768, 36864, 38912, 39040, 39008, 0, 32768, - 36864, 38912, 39040, 39041, 39024, 0, 32768, 36864, - 38912, 39040, 39041, 39024, 0, 32768, 36864, 38912, - 39040, 39041, 39024, 39026, 0, 32768, 36864, 38912, - 39040, 39041, 39024, 0, 32768, 36864, 38912, 39040, - 39041, 39024, 39028, 0, 32768, 36864, 38912, 39040, - 39041, 39024, 39028, 0, 32768, 36864, 38912, 39040, - 39041, 39024, 39032, 39030, 0, 32768, 36864, 38912, - 39040, 39041, 39024, 0, 32768, 36864, 38912, 39040, - 39041, 39024, 39032, 0, 32768, 36864, 38912, 39040, - 39041, 39043, 39032, 0, 32768, 36864, 38912, 39040, - 39041, 39043, 39032, 39034, 0, 32768, 36864, 38912, - 39040, 39041, 39043, 39032, 0, 32768, 36864, 38912, - 39040, 39041, 39043, 39032, 39036, 0, 32768, 36864, - 38912, 39040, 39041, 39043, 39032, 39036, 0, 32768, - 36864, 38912, 39040, 39041, 39043, 39032, 39036, 39038, - 0, 32768, 36864, 38912, 0, 32768, 36864, 38912, - 39040, 0, 32768, 36864, 38912, 39040, 0, 32768, - 36864, 38912, 39040, 39042, 0, 32768, 36864, 38912, - 39040, 0, 32768, 36864, 38912, 39040, 39044, 0, - 32768, 36864, 38912, 39040, 39044, 0, 32768, 36864, - 38912, 39040, 39048, 39046, 0, 32768, 36864, 38912, - 39040, 0, 32768, 36864, 38912, 39040, 39048, 0, - 32768, 36864, 38912, 39040, 39048, 0, 32768, 36864, - 38912, 39040, 39048, 39050, 0, 32768, 36864, 38912, - 39040, 39048, 0, 32768, 36864, 38912, 39040, 39056, - 39052, 0, 32768, 36864, 38912, 39040, 39056, 39052, - 0, 32768, 36864, 38912, 39040, 39056, 39057, 39054, - 0, 32768, 36864, 38912, 39040, 0, 32768, 36864, - 38912, 39040, 39056, 0, 32768, 36864, 38912, 39040, - 39056, 0, 32768, 36864, 38912, 39040, 39056, 39058, - 0, 32768, 36864, 38912, 39040, 39056, 0, 32768, - 36864, 38912, 39040, 39056, 39060, 0, 32768, 36864, - 38912, 39040, 39056, 39060, 0, 32768, 36864, 38912, - 39040, 39056, 39064, 39062, 0, 32768, 36864, 38912, - 39040, 39056, 0, 32768, 36864, 38912, 39040, 39072, - 39064, 0, 32768, 36864, 38912, 39040, 39072, 39064, - 0, 32768, 36864, 38912, 39040, 39072, 39064, 39066, - 0, 32768, 36864, 38912, 39040, 39072, 39064, 0, - 32768, 36864, 38912, 39040, 39072, 39073, 39068, 0, - 32768, 36864, 38912, 39040, 39072, 39073, 39068, 0, - 32768, 36864, 38912, 39040, 39072, 39073, 39068, 39070, - 0, 32768, 36864, 38912, 39040, 0, 32768, 36864, - 38912, 39040, 39072, 0, 32768, 36864, 38912, 39040, - 39072, 0, 32768, 36864, 38912, 39040, 39072, 39074, - 0, 32768, 36864, 38912, 39040, 39072, 0, 32768, - 36864, 38912, 39040, 39072, 39076, 0, 32768, 36864, - 38912, 39040, 39072, 39076, 0, 32768, 36864, 38912, - 39040, 39072, 39080, 39078, 0, 32768, 36864, 38912, - 39040, 39072, 0, 32768, 36864, 38912, 39040, 39072, - 39080, 0, 32768, 36864, 38912, 39040, 39072, 39080, - 0, 32768, 36864, 38912, 39040, 39072, 39080, 39082, - 0, 32768, 36864, 38912, 39040, 39072, 39080, 0, - 32768, 36864, 38912, 39040, 39072, 39088, 39084, 0, - 32768, 36864, 38912, 39040, 39072, 39088, 39084, 0, - 32768, 36864, 38912, 39040, 39072, 39088, 39089, 39086, - 0, 32768, 36864, 38912, 39040, 39072, 0, 32768, - 36864, 38912, 39040, 39104, 39088, 0, 32768, 36864, - 38912, 39040, 39104, 39088, 0, 32768, 36864, 38912, - 39040, 39104, 39088, 39090, 0, 32768, 36864, 38912, - 39040, 39104, 39088, 0, 32768, 36864, 38912, 39040, - 39104, 39088, 39092, 0, 32768, 36864, 38912, 39040, - 39104, 39088, 39092, 0, 32768, 36864, 38912, 39040, - 39104, 39088, 39096, 39094, 0, 32768, 36864, 38912, - 39040, 39104, 39088, 0, 32768, 36864, 38912, 39040, - 39104, 39105, 39096, 0, 32768, 36864, 38912, 39040, - 39104, 39105, 39096, 0, 32768, 36864, 38912, 39040, - 39104, 39105, 39096, 39098, 0, 32768, 36864, 38912, - 39040, 39104, 39105, 39096, 0, 32768, 36864, 38912, - 39040, 39104, 39105, 39096, 39100, 0, 32768, 36864, - 38912, 39040, 39104, 39105, 39107, 39100, 0, 32768, - 36864, 38912, 39040, 39104, 39105, 39107, 39100, 39102, - 0, 32768, 36864, 38912, 39040, 0, 32768, 36864, - 38912, 39168, 39104, 0, 32768, 36864, 38912, 39168, - 39104, 0, 32768, 36864, 38912, 39168, 39104, 39106, - 0, 32768, 36864, 38912, 39168, 39104, 0, 32768, - 36864, 38912, 39168, 39104, 39108, 0, 32768, 36864, - 38912, 39168, 39104, 39108, 0, 32768, 36864, 38912, - 39168, 39104, 39112, 39110, 0, 32768, 36864, 38912, - 39168, 39104, 0, 32768, 36864, 38912, 39168, 39104, - 39112, 0, 32768, 36864, 38912, 39168, 39104, 39112, - 0, 32768, 36864, 38912, 39168, 39104, 39112, 39114, - 0, 32768, 36864, 38912, 39168, 39104, 39112, 0, - 32768, 36864, 38912, 39168, 39104, 39120, 39116, 0, - 32768, 36864, 38912, 39168, 39104, 39120, 39116, 0, - 32768, 36864, 38912, 39168, 39104, 39120, 39121, 39118, - 0, 32768, 36864, 38912, 39168, 39104, 0, 32768, - 36864, 38912, 39168, 39104, 39120, 0, 32768, 36864, - 38912, 39168, 39104, 39120, 0, 32768, 36864, 38912, - 39168, 39104, 39120, 39122, 0, 32768, 36864, 38912, - 39168, 39104, 39120, 0, 32768, 36864, 38912, 39168, - 39104, 39120, 39124, 0, 32768, 36864, 38912, 39168, - 39104, 39120, 39124, 0, 32768, 36864, 38912, 39168, - 39104, 39120, 39128, 39126, 0, 32768, 36864, 38912, - 39168, 39104, 39120, 0, 32768, 36864, 38912, 39168, - 39104, 39136, 39128, 0, 32768, 36864, 38912, 39168, - 39104, 39136, 39128, 0, 32768, 36864, 38912, 39168, - 39104, 39136, 39128, 39130, 0, 32768, 36864, 38912, - 39168, 39104, 39136, 39128, 0, 32768, 36864, 38912, - 39168, 39104, 39136, 39137, 39132, 0, 32768, 36864, - 38912, 39168, 39104, 39136, 39137, 39132, 0, 32768, - 36864, 38912, 39168, 39104, 39136, 39137, 39132, 39134, - 0, 32768, 36864, 38912, 39168, 39104, 0, 32768, - 36864, 38912, 39168, 39169, 39136, 0, 32768, 36864, - 38912, 39168, 39169, 39136, 0, 32768, 36864, 38912, - 39168, 39169, 39136, 39138, 0, 32768, 36864, 38912, - 39168, 39169, 39136, 0, 32768, 36864, 38912, 39168, - 39169, 39136, 39140, 0, 32768, 36864, 38912, 39168, - 39169, 39136, 39140, 0, 32768, 36864, 38912, 39168, - 39169, 39136, 39144, 39142, 0, 32768, 36864, 38912, - 39168, 39169, 39136, 0, 32768, 36864, 38912, 39168, - 39169, 39136, 39144, 0, 32768, 36864, 38912, 39168, - 39169, 39136, 39144, 0, 32768, 36864, 38912, 39168, - 39169, 39136, 39144, 39146, 0, 32768, 36864, 38912, - 39168, 39169, 39136, 39144, 0, 32768, 36864, 38912, - 39168, 39169, 39136, 39152, 39148, 0, 32768, 36864, - 38912, 39168, 39169, 39136, 39152, 39148, 0, 32768, - 36864, 38912, 39168, 39169, 39136, 39152, 39153, 39150, - 0, 32768, 36864, 38912, 39168, 39169, 39136, 0, - 32768, 36864, 38912, 39168, 39169, 39136, 39152, 0, - 32768, 36864, 38912, 39168, 39169, 39171, 39152, 0, - 32768, 36864, 38912, 39168, 39169, 39171, 39152, 39154, - 0, 32768, 36864, 38912, 39168, 39169, 39171, 39152, - 0, 32768, 36864, 38912, 39168, 39169, 39171, 39152, - 39156, 0, 32768, 36864, 38912, 39168, 39169, 39171, - 39152, 39156, 0, 32768, 36864, 38912, 39168, 39169, - 39171, 39152, 39160, 39158, 0, 32768, 36864, 38912, - 39168, 39169, 39171, 39152, 0, 32768, 36864, 38912, - 39168, 39169, 39171, 39152, 39160, 0, 32768, 36864, - 38912, 39168, 39169, 39171, 39152, 39160, 0, 32768, - 36864, 38912, 39168, 39169, 39171, 39152, 39160, 39162, - 0, 32768, 36864, 38912, 39168, 39169, 39171, 39175, - 39160, 0, 32768, 36864, 38912, 39168, 39169, 39171, - 39175, 39160, 39164, 0, 32768, 36864, 38912, 39168, - 39169, 39171, 39175, 39160, 39164, 0, 32768, 36864, - 38912, 39168, 39169, 39171, 39175, 39160, 39164, 39166, - 0, 32768, 36864, 38912, 0, 32768, 36864, 38912, - 39168, 0, 32768, 36864, 38912, 39168, 0, 32768, - 36864, 38912, 39168, 39170, 0, 32768, 36864, 38912, - 39168, 0, 32768, 36864, 38912, 39168, 39172, 0, - 32768, 36864, 38912, 39168, 39172, 0, 32768, 36864, - 38912, 39168, 39176, 39174, 0, 32768, 36864, 38912, - 39168, 0, 32768, 36864, 38912, 39168, 39176, 0, - 32768, 36864, 38912, 39168, 39176, 0, 32768, 36864, - 38912, 39168, 39176, 39178, 0, 32768, 36864, 38912, - 39168, 39176, 0, 32768, 36864, 38912, 39168, 39184, - 39180, 0, 32768, 36864, 38912, 39168, 39184, 39180, - 0, 32768, 36864, 38912, 39168, 39184, 39185, 39182, - 0, 32768, 36864, 38912, 39168, 0, 32768, 36864, - 38912, 39168, 39184, 0, 32768, 36864, 38912, 39168, - 39184, 0, 32768, 36864, 38912, 39168, 39184, 39186, - 0, 32768, 36864, 38912, 39168, 39184, 0, 32768, - 36864, 38912, 39168, 39184, 39188, 0, 32768, 36864, - 38912, 39168, 39184, 39188, 0, 32768, 36864, 38912, - 39168, 39184, 39192, 39190, 0, 32768, 36864, 38912, - 39168, 39184, 0, 32768, 36864, 38912, 39168, 39200, - 39192, 0, 32768, 36864, 38912, 39168, 39200, 39192, - 0, 32768, 36864, 38912, 39168, 39200, 39192, 39194, - 0, 32768, 36864, 38912, 39168, 39200, 39192, 0, - 32768, 36864, 38912, 39168, 39200, 39201, 39196, 0, - 32768, 36864, 38912, 39168, 39200, 39201, 39196, 0, - 32768, 36864, 38912, 39168, 39200, 39201, 39196, 39198, - 0, 32768, 36864, 38912, 39168, 0, 32768, 36864, - 38912, 39168, 39200, 0, 32768, 36864, 38912, 39168, - 39200, 0, 32768, 36864, 38912, 39168, 39200, 39202, - 0, 32768, 36864, 38912, 39168, 39200, 0, 32768, - 36864, 38912, 39168, 39200, 39204, 0, 32768, 36864, - 38912, 39168, 39200, 39204, 0, 32768, 36864, 38912, - 39168, 39200, 39208, 39206, 0, 32768, 36864, 38912, - 39168, 39200, 0, 32768, 36864, 38912, 39168, 39200, - 39208, 0, 32768, 36864, 38912, 39168, 39200, 39208, - 0, 32768, 36864, 38912, 39168, 39200, 39208, 39210, - 0, 32768, 36864, 38912, 39168, 39200, 39208, 0, - 32768, 36864, 38912, 39168, 39200, 39216, 39212, 0, - 32768, 36864, 38912, 39168, 39200, 39216, 39212, 0, - 32768, 36864, 38912, 39168, 39200, 39216, 39217, 39214, - 0, 32768, 36864, 38912, 39168, 39200, 0, 32768, - 36864, 38912, 39168, 39232, 39216, 0, 32768, 36864, - 38912, 39168, 39232, 39216, 0, 32768, 36864, 38912, - 39168, 39232, 39216, 39218, 0, 32768, 36864, 38912, - 39168, 39232, 39216, 0, 32768, 36864, 38912, 39168, - 39232, 39216, 39220, 0, 32768, 36864, 38912, 39168, - 39232, 39216, 39220, 0, 32768, 36864, 38912, 39168, - 39232, 39216, 39224, 39222, 0, 32768, 36864, 38912, - 39168, 39232, 39216, 0, 32768, 36864, 38912, 39168, - 39232, 39233, 39224, 0, 32768, 36864, 38912, 39168, - 39232, 39233, 39224, 0, 32768, 36864, 38912, 39168, - 39232, 39233, 39224, 39226, 0, 32768, 36864, 38912, - 39168, 39232, 39233, 39224, 0, 32768, 36864, 38912, - 39168, 39232, 39233, 39224, 39228, 0, 32768, 36864, - 38912, 39168, 39232, 39233, 39235, 39228, 0, 32768, - 36864, 38912, 39168, 39232, 39233, 39235, 39228, 39230, - 0, 32768, 36864, 38912, 39168, 0, 32768, 36864, - 38912, 39168, 39232, 0, 32768, 36864, 38912, 39168, - 39232, 0, 32768, 36864, 38912, 39168, 39232, 39234, - 0, 32768, 36864, 38912, 39168, 39232, 0, 32768, - 36864, 38912, 39168, 39232, 39236, 0, 32768, 36864, - 38912, 39168, 39232, 39236, 0, 32768, 36864, 38912, - 39168, 39232, 39240, 39238, 0, 32768, 36864, 38912, - 39168, 39232, 0, 32768, 36864, 38912, 39168, 39232, - 39240, 0, 32768, 36864, 38912, 39168, 39232, 39240, - 0, 32768, 36864, 38912, 39168, 39232, 39240, 39242, - 0, 32768, 36864, 38912, 39168, 39232, 39240, 0, - 32768, 36864, 38912, 39168, 39232, 39248, 39244, 0, - 32768, 36864, 38912, 39168, 39232, 39248, 39244, 0, - 32768, 36864, 38912, 39168, 39232, 39248, 39249, 39246, - 0, 32768, 36864, 38912, 39168, 39232, 0, 32768, - 36864, 38912, 39168, 39232, 39248, 0, 32768, 36864, - 38912, 39168, 39232, 39248, 0, 32768, 36864, 38912, - 39168, 39232, 39248, 39250, 0, 32768, 36864, 38912, - 39168, 39232, 39248, 0, 32768, 36864, 38912, 39168, - 39232, 39248, 39252, 0, 32768, 36864, 38912, 39168, - 39232, 39248, 39252, 0, 32768, 36864, 38912, 39168, - 39232, 39248, 39256, 39254, 0, 32768, 36864, 38912, - 39168, 39232, 39248, 0, 32768, 36864, 38912, 39168, - 39232, 39264, 39256, 0, 32768, 36864, 38912, 39168, - 39232, 39264, 39256, 0, 32768, 36864, 38912, 39168, - 39232, 39264, 39256, 39258, 0, 32768, 36864, 38912, - 39168, 39232, 39264, 39256, 0, 32768, 36864, 38912, - 39168, 39232, 39264, 39265, 39260, 0, 32768, 36864, - 38912, 39168, 39232, 39264, 39265, 39260, 0, 32768, - 36864, 38912, 39168, 39232, 39264, 39265, 39260, 39262, - 0, 32768, 36864, 38912, 39168, 39232, 0, 32768, - 36864, 38912, 39168, 39296, 39264, 0, 32768, 36864, - 38912, 39168, 39296, 39264, 0, 32768, 36864, 38912, - 39168, 39296, 39264, 39266, 0, 32768, 36864, 38912, - 39168, 39296, 39264, 0, 32768, 36864, 38912, 39168, - 39296, 39264, 39268, 0, 32768, 36864, 38912, 39168, - 39296, 39264, 39268, 0, 32768, 36864, 38912, 39168, - 39296, 39264, 39272, 39270, 0, 32768, 36864, 38912, - 39168, 39296, 39264, 0, 32768, 36864, 38912, 39168, - 39296, 39264, 39272, 0, 32768, 36864, 38912, 39168, - 39296, 39264, 39272, 0, 32768, 36864, 38912, 39168, - 39296, 39264, 39272, 39274, 0, 32768, 36864, 38912, - 39168, 39296, 39264, 39272, 0, 32768, 36864, 38912, - 39168, 39296, 39264, 39280, 39276, 0, 32768, 36864, - 38912, 39168, 39296, 39264, 39280, 39276, 0, 32768, - 36864, 38912, 39168, 39296, 39264, 39280, 39281, 39278, - 0, 32768, 36864, 38912, 39168, 39296, 39264, 0, - 32768, 36864, 38912, 39168, 39296, 39297, 39280, 0, - 32768, 36864, 38912, 39168, 39296, 39297, 39280, 0, - 32768, 36864, 38912, 39168, 39296, 39297, 39280, 39282, - 0, 32768, 36864, 38912, 39168, 39296, 39297, 39280, - 0, 32768, 36864, 38912, 39168, 39296, 39297, 39280, - 39284, 0, 32768, 36864, 38912, 39168, 39296, 39297, - 39280, 39284, 0, 32768, 36864, 38912, 39168, 39296, - 39297, 39280, 39288, 39286, 0, 32768, 36864, 38912, - 39168, 39296, 39297, 39280, 0, 32768, 36864, 38912, - 39168, 39296, 39297, 39280, 39288, 0, 32768, 36864, - 38912, 39168, 39296, 39297, 39299, 39288, 0, 32768, - 36864, 38912, 39168, 39296, 39297, 39299, 39288, 39290, - 0, 32768, 36864, 38912, 39168, 39296, 39297, 39299, - 39288, 0, 32768, 36864, 38912, 39168, 39296, 39297, - 39299, 39288, 39292, 0, 32768, 36864, 38912, 39168, - 39296, 39297, 39299, 39288, 39292, 0, 32768, 36864, - 38912, 39168, 39296, 39297, 39299, 39288, 39292, 39294, - 0, 32768, 36864, 38912, 39168, 0, 32768, 36864, - 38912, 39424, 39296, 0, 32768, 36864, 38912, 39424, - 39296, 0, 32768, 36864, 38912, 39424, 39296, 39298, - 0, 32768, 36864, 38912, 39424, 39296, 0, 32768, - 36864, 38912, 39424, 39296, 39300, 0, 32768, 36864, - 38912, 39424, 39296, 39300, 0, 32768, 36864, 38912, - 39424, 39296, 39304, 39302, 0, 32768, 36864, 38912, - 39424, 39296, 0, 32768, 36864, 38912, 39424, 39296, - 39304, 0, 32768, 36864, 38912, 39424, 39296, 39304, - 0, 32768, 36864, 38912, 39424, 39296, 39304, 39306, - 0, 32768, 36864, 38912, 39424, 39296, 39304, 0, - 32768, 36864, 38912, 39424, 39296, 39312, 39308, 0, - 32768, 36864, 38912, 39424, 39296, 39312, 39308, 0, - 32768, 36864, 38912, 39424, 39296, 39312, 39313, 39310, - 0, 32768, 36864, 38912, 39424, 39296, 0, 32768, - 36864, 38912, 39424, 39296, 39312, 0, 32768, 36864, - 38912, 39424, 39296, 39312, 0, 32768, 36864, 38912, - 39424, 39296, 39312, 39314, 0, 32768, 36864, 38912, - 39424, 39296, 39312, 0, 32768, 36864, 38912, 39424, - 39296, 39312, 39316, 0, 32768, 36864, 38912, 39424, - 39296, 39312, 39316, 0, 32768, 36864, 38912, 39424, - 39296, 39312, 39320, 39318, 0, 32768, 36864, 38912, - 39424, 39296, 39312, 0, 32768, 36864, 38912, 39424, - 39296, 39328, 39320, 0, 32768, 36864, 38912, 39424, - 39296, 39328, 39320, 0, 32768, 36864, 38912, 39424, - 39296, 39328, 39320, 39322, 0, 32768, 36864, 38912, - 39424, 39296, 39328, 39320, 0, 32768, 36864, 38912, - 39424, 39296, 39328, 39329, 39324, 0, 32768, 36864, - 38912, 39424, 39296, 39328, 39329, 39324, 0, 32768, - 36864, 38912, 39424, 39296, 39328, 39329, 39324, 39326, - 0, 32768, 36864, 38912, 39424, 39296, 0, 32768, - 36864, 38912, 39424, 39296, 39328, 0, 32768, 36864, - 38912, 39424, 39296, 39328, 0, 32768, 36864, 38912, - 39424, 39296, 39328, 39330, 0, 32768, 36864, 38912, - 39424, 39296, 39328, 0, 32768, 36864, 38912, 39424, - 39296, 39328, 39332, 0, 32768, 36864, 38912, 39424, - 39296, 39328, 39332, 0, 32768, 36864, 38912, 39424, - 39296, 39328, 39336, 39334, 0, 32768, 36864, 38912, - 39424, 39296, 39328, 0, 32768, 36864, 38912, 39424, - 39296, 39328, 39336, 0, 32768, 36864, 38912, 39424, - 39296, 39328, 39336, 0, 32768, 36864, 38912, 39424, - 39296, 39328, 39336, 39338, 0, 32768, 36864, 38912, - 39424, 39296, 39328, 39336, 0, 32768, 36864, 38912, - 39424, 39296, 39328, 39344, 39340, 0, 32768, 36864, - 38912, 39424, 39296, 39328, 39344, 39340, 0, 32768, - 36864, 38912, 39424, 39296, 39328, 39344, 39345, 39342, - 0, 32768, 36864, 38912, 39424, 39296, 39328, 0, - 32768, 36864, 38912, 39424, 39296, 39360, 39344, 0, - 32768, 36864, 38912, 39424, 39296, 39360, 39344, 0, - 32768, 36864, 38912, 39424, 39296, 39360, 39344, 39346, - 0, 32768, 36864, 38912, 39424, 39296, 39360, 39344, - 0, 32768, 36864, 38912, 39424, 39296, 39360, 39344, - 39348, 0, 32768, 36864, 38912, 39424, 39296, 39360, - 39344, 39348, 0, 32768, 36864, 38912, 39424, 39296, - 39360, 39344, 39352, 39350, 0, 32768, 36864, 38912, - 39424, 39296, 39360, 39344, 0, 32768, 36864, 38912, - 39424, 39296, 39360, 39361, 39352, 0, 32768, 36864, - 38912, 39424, 39296, 39360, 39361, 39352, 0, 32768, - 36864, 38912, 39424, 39296, 39360, 39361, 39352, 39354, - 0, 32768, 36864, 38912, 39424, 39296, 39360, 39361, - 39352, 0, 32768, 36864, 38912, 39424, 39296, 39360, - 39361, 39352, 39356, 0, 32768, 36864, 38912, 39424, - 39296, 39360, 39361, 39363, 39356, 0, 32768, 36864, - 38912, 39424, 39296, 39360, 39361, 39363, 39356, 39358, - 0, 32768, 36864, 38912, 39424, 39296, 0, 32768, - 36864, 38912, 39424, 39425, 39360, 0, 32768, 36864, - 38912, 39424, 39425, 39360, 0, 32768, 36864, 38912, - 39424, 39425, 39360, 39362, 0, 32768, 36864, 38912, - 39424, 39425, 39360, 0, 32768, 36864, 38912, 39424, - 39425, 39360, 39364, 0, 32768, 36864, 38912, 39424, - 39425, 39360, 39364, 0, 32768, 36864, 38912, 39424, - 39425, 39360, 39368, 39366, 0, 32768, 36864, 38912, - 39424, 39425, 39360, 0, 32768, 36864, 38912, 39424, - 39425, 39360, 39368, 0, 32768, 36864, 38912, 39424, - 39425, 39360, 39368, 0, 32768, 36864, 38912, 39424, - 39425, 39360, 39368, 39370, 0, 32768, 36864, 38912, - 39424, 39425, 39360, 39368, 0, 32768, 36864, 38912, - 39424, 39425, 39360, 39376, 39372, 0, 32768, 36864, - 38912, 39424, 39425, 39360, 39376, 39372, 0, 32768, - 36864, 38912, 39424, 39425, 39360, 39376, 39377, 39374, - 0, 32768, 36864, 38912, 39424, 39425, 39360, 0, - 32768, 36864, 38912, 39424, 39425, 39360, 39376, 0, - 32768, 36864, 38912, 39424, 39425, 39360, 39376, 0, - 32768, 36864, 38912, 39424, 39425, 39360, 39376, 39378, - 0, 32768, 36864, 38912, 39424, 39425, 39360, 39376, - 0, 32768, 36864, 38912, 39424, 39425, 39360, 39376, - 39380, 0, 32768, 36864, 38912, 39424, 39425, 39360, - 39376, 39380, 0, 32768, 36864, 38912, 39424, 39425, - 39360, 39376, 39384, 39382, 0, 32768, 36864, 38912, - 39424, 39425, 39360, 39376, 0, 32768, 36864, 38912, - 39424, 39425, 39360, 39392, 39384, 0, 32768, 36864, - 38912, 39424, 39425, 39360, 39392, 39384, 0, 32768, - 36864, 38912, 39424, 39425, 39360, 39392, 39384, 39386, - 0, 32768, 36864, 38912, 39424, 39425, 39360, 39392, - 39384, 0, 32768, 36864, 38912, 39424, 39425, 39360, - 39392, 39393, 39388, 0, 32768, 36864, 38912, 39424, - 39425, 39360, 39392, 39393, 39388, 0, 32768, 36864, - 38912, 39424, 39425, 39360, 39392, 39393, 39388, 39390, - 0, 32768, 36864, 38912, 39424, 39425, 39360, 0, - 32768, 36864, 38912, 39424, 39425, 39360, 39392, 0, - 32768, 36864, 38912, 39424, 39425, 39427, 39392, 0, - 32768, 36864, 38912, 39424, 39425, 39427, 39392, 39394, - 0, 32768, 36864, 38912, 39424, 39425, 39427, 39392, - 0, 32768, 36864, 38912, 39424, 39425, 39427, 39392, - 39396, 0, 32768, 36864, 38912, 39424, 39425, 39427, - 39392, 39396, 0, 32768, 36864, 38912, 39424, 39425, - 39427, 39392, 39400, 39398, 0, 32768, 36864, 38912, - 39424, 39425, 39427, 39392, 0, 32768, 36864, 38912, - 39424, 39425, 39427, 39392, 39400, 0, 32768, 36864, - 38912, 39424, 39425, 39427, 39392, 39400, 0, 32768, - 36864, 38912, 39424, 39425, 39427, 39392, 39400, 39402, - 0, 32768, 36864, 38912, 39424, 39425, 39427, 39392, - 39400, 0, 32768, 36864, 38912, 39424, 39425, 39427, - 39392, 39408, 39404, 0, 32768, 36864, 38912, 39424, - 39425, 39427, 39392, 39408, 39404, 0, 32768, 36864, - 38912, 39424, 39425, 39427, 39392, 39408, 39409, 39406, - 0, 32768, 36864, 38912, 39424, 39425, 39427, 39392, - 0, 32768, 36864, 38912, 39424, 39425, 39427, 39392, - 39408, 0, 32768, 36864, 38912, 39424, 39425, 39427, - 39392, 39408, 0, 32768, 36864, 38912, 39424, 39425, - 39427, 39392, 39408, 39410, 0, 32768, 36864, 38912, - 39424, 39425, 39427, 39431, 39408, 0, 32768, 36864, - 38912, 39424, 39425, 39427, 39431, 39408, 39412, 0, - 32768, 36864, 38912, 39424, 39425, 39427, 39431, 39408, - 39412, 0, 32768, 36864, 38912, 39424, 39425, 39427, - 39431, 39408, 39416, 39414, 0, 32768, 36864, 38912, - 39424, 39425, 39427, 39431, 39408, 0, 32768, 36864, - 38912, 39424, 39425, 39427, 39431, 39408, 39416, 0, - 32768, 36864, 38912, 39424, 39425, 39427, 39431, 39408, - 39416, 0, 32768, 36864, 38912, 39424, 39425, 39427, - 39431, 39408, 39416, 39418, 0, 32768, 36864, 38912, - 39424, 39425, 39427, 39431, 39408, 39416, 0, 32768, - 36864, 38912, 39424, 39425, 39427, 39431, 39408, 39416, - 39420, 0, 32768, 36864, 38912, 39424, 39425, 39427, - 39431, 39408, 39416, 39420, 0, 32768, 36864, 38912, - 39424, 39425, 39427, 39431, 39408, 39416, 39420, 39422, - 0, 32768, 36864, 38912, 0, 32768, 36864, 38912, - 39424, 0, 32768, 36864, 38912, 39424, 0, 32768, - 36864, 38912, 39424, 39426, 0, 32768, 36864, 38912, - 39424, 0, 32768, 36864, 38912, 39424, 39428, 0, - 32768, 36864, 38912, 39424, 39428, 0, 32768, 36864, - 38912, 39424, 39432, 39430, 0, 32768, 36864, 38912, - 39424, 0, 32768, 36864, 38912, 39424, 39432, 0, - 32768, 36864, 38912, 39424, 39432, 0, 32768, 36864, - 38912, 39424, 39432, 39434, 0, 32768, 36864, 38912, - 39424, 39432, 0, 32768, 36864, 38912, 39424, 39440, - 39436, 0, 32768, 36864, 38912, 39424, 39440, 39436, - 0, 32768, 36864, 38912, 39424, 39440, 39441, 39438, - 0, 32768, 36864, 38912, 39424, 0, 32768, 36864, - 38912, 39424, 39440, 0, 32768, 36864, 38912, 39424, - 39440, 0, 32768, 36864, 38912, 39424, 39440, 39442, - 0, 32768, 36864, 38912, 39424, 39440, 0, 32768, - 36864, 38912, 39424, 39440, 39444, 0, 32768, 36864, - 38912, 39424, 39440, 39444, 0, 32768, 36864, 38912, - 39424, 39440, 39448, 39446, 0, 32768, 36864, 38912, - 39424, 39440, 0, 32768, 36864, 38912, 39424, 39456, - 39448, 0, 32768, 36864, 38912, 39424, 39456, 39448, - 0, 32768, 36864, 38912, 39424, 39456, 39448, 39450, - 0, 32768, 36864, 38912, 39424, 39456, 39448, 0, - 32768, 36864, 38912, 39424, 39456, 39457, 39452, 0, - 32768, 36864, 38912, 39424, 39456, 39457, 39452, 0, - 32768, 36864, 38912, 39424, 39456, 39457, 39452, 39454, - 0, 32768, 36864, 38912, 39424, 0, 32768, 36864, - 38912, 39424, 39456, 0, 32768, 36864, 38912, 39424, - 39456, 0, 32768, 36864, 38912, 39424, 39456, 39458, - 0, 32768, 36864, 38912, 39424, 39456, 0, 32768, - 36864, 38912, 39424, 39456, 39460, 0, 32768, 36864, - 38912, 39424, 39456, 39460, 0, 32768, 36864, 38912, - 39424, 39456, 39464, 39462, 0, 32768, 36864, 38912, - 39424, 39456, 0, 32768, 36864, 38912, 39424, 39456, - 39464, 0, 32768, 36864, 38912, 39424, 39456, 39464, - 0, 32768, 36864, 38912, 39424, 39456, 39464, 39466, - 0, 32768, 36864, 38912, 39424, 39456, 39464, 0, - 32768, 36864, 38912, 39424, 39456, 39472, 39468, 0, - 32768, 36864, 38912, 39424, 39456, 39472, 39468, 0, - 32768, 36864, 38912, 39424, 39456, 39472, 39473, 39470, - 0, 32768, 36864, 38912, 39424, 39456, 0, 32768, - 36864, 38912, 39424, 39488, 39472, 0, 32768, 36864, - 38912, 39424, 39488, 39472, 0, 32768, 36864, 38912, - 39424, 39488, 39472, 39474, 0, 32768, 36864, 38912, - 39424, 39488, 39472, 0, 32768, 36864, 38912, 39424, - 39488, 39472, 39476, 0, 32768, 36864, 38912, 39424, - 39488, 39472, 39476, 0, 32768, 36864, 38912, 39424, - 39488, 39472, 39480, 39478, 0, 32768, 36864, 38912, - 39424, 39488, 39472, 0, 32768, 36864, 38912, 39424, - 39488, 39489, 39480, 0, 32768, 36864, 38912, 39424, - 39488, 39489, 39480, 0, 32768, 36864, 38912, 39424, - 39488, 39489, 39480, 39482, 0, 32768, 36864, 38912, - 39424, 39488, 39489, 39480, 0, 32768, 36864, 38912, - 39424, 39488, 39489, 39480, 39484, 0, 32768, 36864, - 38912, 39424, 39488, 39489, 39491, 39484, 0, 32768, - 36864, 38912, 39424, 39488, 39489, 39491, 39484, 39486, - 0, 32768, 36864, 38912, 39424, 0, 32768, 36864, - 38912, 39424, 39488, 0, 32768, 36864, 38912, 39424, - 39488, 0, 32768, 36864, 38912, 39424, 39488, 39490, - 0, 32768, 36864, 38912, 39424, 39488, 0, 32768, - 36864, 38912, 39424, 39488, 39492, 0, 32768, 36864, - 38912, 39424, 39488, 39492, 0, 32768, 36864, 38912, - 39424, 39488, 39496, 39494, 0, 32768, 36864, 38912, - 39424, 39488, 0, 32768, 36864, 38912, 39424, 39488, - 39496, 0, 32768, 36864, 38912, 39424, 39488, 39496, - 0, 32768, 36864, 38912, 39424, 39488, 39496, 39498, - 0, 32768, 36864, 38912, 39424, 39488, 39496, 0, - 32768, 36864, 38912, 39424, 39488, 39504, 39500, 0, - 32768, 36864, 38912, 39424, 39488, 39504, 39500, 0, - 32768, 36864, 38912, 39424, 39488, 39504, 39505, 39502, - 0, 32768, 36864, 38912, 39424, 39488, 0, 32768, - 36864, 38912, 39424, 39488, 39504, 0, 32768, 36864, - 38912, 39424, 39488, 39504, 0, 32768, 36864, 38912, - 39424, 39488, 39504, 39506, 0, 32768, 36864, 38912, - 39424, 39488, 39504, 0, 32768, 36864, 38912, 39424, - 39488, 39504, 39508, 0, 32768, 36864, 38912, 39424, - 39488, 39504, 39508, 0, 32768, 36864, 38912, 39424, - 39488, 39504, 39512, 39510, 0, 32768, 36864, 38912, - 39424, 39488, 39504, 0, 32768, 36864, 38912, 39424, - 39488, 39520, 39512, 0, 32768, 36864, 38912, 39424, - 39488, 39520, 39512, 0, 32768, 36864, 38912, 39424, - 39488, 39520, 39512, 39514, 0, 32768, 36864, 38912, - 39424, 39488, 39520, 39512, 0, 32768, 36864, 38912, - 39424, 39488, 39520, 39521, 39516, 0, 32768, 36864, - 38912, 39424, 39488, 39520, 39521, 39516, 0, 32768, - 36864, 38912, 39424, 39488, 39520, 39521, 39516, 39518, - 0, 32768, 36864, 38912, 39424, 39488, 0, 32768, - 36864, 38912, 39424, 39552, 39520, 0, 32768, 36864, - 38912, 39424, 39552, 39520, 0, 32768, 36864, 38912, - 39424, 39552, 39520, 39522, 0, 32768, 36864, 38912, - 39424, 39552, 39520, 0, 32768, 36864, 38912, 39424, - 39552, 39520, 39524, 0, 32768, 36864, 38912, 39424, - 39552, 39520, 39524, 0, 32768, 36864, 38912, 39424, - 39552, 39520, 39528, 39526, 0, 32768, 36864, 38912, - 39424, 39552, 39520, 0, 32768, 36864, 38912, 39424, - 39552, 39520, 39528, 0, 32768, 36864, 38912, 39424, - 39552, 39520, 39528, 0, 32768, 36864, 38912, 39424, - 39552, 39520, 39528, 39530, 0, 32768, 36864, 38912, - 39424, 39552, 39520, 39528, 0, 32768, 36864, 38912, - 39424, 39552, 39520, 39536, 39532, 0, 32768, 36864, - 38912, 39424, 39552, 39520, 39536, 39532, 0, 32768, - 36864, 38912, 39424, 39552, 39520, 39536, 39537, 39534, - 0, 32768, 36864, 38912, 39424, 39552, 39520, 0, - 32768, 36864, 38912, 39424, 39552, 39553, 39536, 0, - 32768, 36864, 38912, 39424, 39552, 39553, 39536, 0, - 32768, 36864, 38912, 39424, 39552, 39553, 39536, 39538, - 0, 32768, 36864, 38912, 39424, 39552, 39553, 39536, - 0, 32768, 36864, 38912, 39424, 39552, 39553, 39536, - 39540, 0, 32768, 36864, 38912, 39424, 39552, 39553, - 39536, 39540, 0, 32768, 36864, 38912, 39424, 39552, - 39553, 39536, 39544, 39542, 0, 32768, 36864, 38912, - 39424, 39552, 39553, 39536, 0, 32768, 36864, 38912, - 39424, 39552, 39553, 39536, 39544, 0, 32768, 36864, - 38912, 39424, 39552, 39553, 39555, 39544, 0, 32768, - 36864, 38912, 39424, 39552, 39553, 39555, 39544, 39546, - 0, 32768, 36864, 38912, 39424, 39552, 39553, 39555, - 39544, 0, 32768, 36864, 38912, 39424, 39552, 39553, - 39555, 39544, 39548, 0, 32768, 36864, 38912, 39424, - 39552, 39553, 39555, 39544, 39548, 0, 32768, 36864, - 38912, 39424, 39552, 39553, 39555, 39544, 39548, 39550, - 0, 32768, 36864, 38912, 39424, 0, 32768, 36864, - 38912, 39424, 39552, 0, 32768, 36864, 38912, 39424, - 39552, 0, 32768, 36864, 38912, 39424, 39552, 39554, - 0, 32768, 36864, 38912, 39424, 39552, 0, 32768, - 36864, 38912, 39424, 39552, 39556, 0, 32768, 36864, - 38912, 39424, 39552, 39556, 0, 32768, 36864, 38912, - 39424, 39552, 39560, 39558, 0, 32768, 36864, 38912, - 39424, 39552, 0, 32768, 36864, 38912, 39424, 39552, - 39560, 0, 32768, 36864, 38912, 39424, 39552, 39560, - 0, 32768, 36864, 38912, 39424, 39552, 39560, 39562, - 0, 32768, 36864, 38912, 39424, 39552, 39560, 0, - 32768, 36864, 38912, 39424, 39552, 39568, 39564, 0, - 32768, 36864, 38912, 39424, 39552, 39568, 39564, 0, - 32768, 36864, 38912, 39424, 39552, 39568, 39569, 39566, - 0, 32768, 36864, 38912, 39424, 39552, 0, 32768, - 36864, 38912, 39424, 39552, 39568, 0, 32768, 36864, - 38912, 39424, 39552, 39568, 0, 32768, 36864, 38912, - 39424, 39552, 39568, 39570, 0, 32768, 36864, 38912, - 39424, 39552, 39568, 0, 32768, 36864, 38912, 39424, - 39552, 39568, 39572, 0, 32768, 36864, 38912, 39424, - 39552, 39568, 39572, 0, 32768, 36864, 38912, 39424, - 39552, 39568, 39576, 39574, 0, 32768, 36864, 38912, - 39424, 39552, 39568, 0, 32768, 36864, 38912, 39424, - 39552, 39584, 39576, 0, 32768, 36864, 38912, 39424, - 39552, 39584, 39576, 0, 32768, 36864, 38912, 39424, - 39552, 39584, 39576, 39578, 0, 32768, 36864, 38912, - 39424, 39552, 39584, 39576, 0, 32768, 36864, 38912, - 39424, 39552, 39584, 39585, 39580, 0, 32768, 36864, - 38912, 39424, 39552, 39584, 39585, 39580, 0, 32768, - 36864, 38912, 39424, 39552, 39584, 39585, 39580, 39582, - 0, 32768, 36864, 38912, 39424, 39552, 0, 32768, - 36864, 38912, 39424, 39552, 39584, 0, 32768, 36864, - 38912, 39424, 39552, 39584, 0, 32768, 36864, 38912, - 39424, 39552, 39584, 39586, 0, 32768, 36864, 38912, - 39424, 39552, 39584, 0, 32768, 36864, 38912, 39424, - 39552, 39584, 39588, 0, 32768, 36864, 38912, 39424, - 39552, 39584, 39588, 0, 32768, 36864, 38912, 39424, - 39552, 39584, 39592, 39590, 0, 32768, 36864, 38912, - 39424, 39552, 39584, 0, 32768, 36864, 38912, 39424, - 39552, 39584, 39592, 0, 32768, 36864, 38912, 39424, - 39552, 39584, 39592, 0, 32768, 36864, 38912, 39424, - 39552, 39584, 39592, 39594, 0, 32768, 36864, 38912, - 39424, 39552, 39584, 39592, 0, 32768, 36864, 38912, - 39424, 39552, 39584, 39600, 39596, 0, 32768, 36864, - 38912, 39424, 39552, 39584, 39600, 39596, 0, 32768, - 36864, 38912, 39424, 39552, 39584, 39600, 39601, 39598, - 0, 32768, 36864, 38912, 39424, 39552, 39584, 0, - 32768, 36864, 38912, 39424, 39552, 39616, 39600, 0, - 32768, 36864, 38912, 39424, 39552, 39616, 39600, 0, - 32768, 36864, 38912, 39424, 39552, 39616, 39600, 39602, - 0, 32768, 36864, 38912, 39424, 39552, 39616, 39600, - 0, 32768, 36864, 38912, 39424, 39552, 39616, 39600, - 39604, 0, 32768, 36864, 38912, 39424, 39552, 39616, - 39600, 39604, 0, 32768, 36864, 38912, 39424, 39552, - 39616, 39600, 39608, 39606, 0, 32768, 36864, 38912, - 39424, 39552, 39616, 39600, 0, 32768, 36864, 38912, - 39424, 39552, 39616, 39617, 39608, 0, 32768, 36864, - 38912, 39424, 39552, 39616, 39617, 39608, 0, 32768, - 36864, 38912, 39424, 39552, 39616, 39617, 39608, 39610, - 0, 32768, 36864, 38912, 39424, 39552, 39616, 39617, - 39608, 0, 32768, 36864, 38912, 39424, 39552, 39616, - 39617, 39608, 39612, 0, 32768, 36864, 38912, 39424, - 39552, 39616, 39617, 39619, 39612, 0, 32768, 36864, - 38912, 39424, 39552, 39616, 39617, 39619, 39612, 39614, - 0, 32768, 36864, 38912, 39424, 39552, 0, 32768, - 36864, 38912, 39424, 39680, 39616, 0, 32768, 36864, - 38912, 39424, 39680, 39616, 0, 32768, 36864, 38912, - 39424, 39680, 39616, 39618, 0, 32768, 36864, 38912, - 39424, 39680, 39616, 0, 32768, 36864, 38912, 39424, - 39680, 39616, 39620, 0, 32768, 36864, 38912, 39424, - 39680, 39616, 39620, 0, 32768, 36864, 38912, 39424, - 39680, 39616, 39624, 39622, 0, 32768, 36864, 38912, - 39424, 39680, 39616, 0, 32768, 36864, 38912, 39424, - 39680, 39616, 39624, 0, 32768, 36864, 38912, 39424, - 39680, 39616, 39624, 0, 32768, 36864, 38912, 39424, - 39680, 39616, 39624, 39626, 0, 32768, 36864, 38912, - 39424, 39680, 39616, 39624, 0, 32768, 36864, 38912, - 39424, 39680, 39616, 39632, 39628, 0, 32768, 36864, - 38912, 39424, 39680, 39616, 39632, 39628, 0, 32768, - 36864, 38912, 39424, 39680, 39616, 39632, 39633, 39630, - 0, 32768, 36864, 38912, 39424, 39680, 39616, 0, - 32768, 36864, 38912, 39424, 39680, 39616, 39632, 0, - 32768, 36864, 38912, 39424, 39680, 39616, 39632, 0, - 32768, 36864, 38912, 39424, 39680, 39616, 39632, 39634, - 0, 32768, 36864, 38912, 39424, 39680, 39616, 39632, - 0, 32768, 36864, 38912, 39424, 39680, 39616, 39632, - 39636, 0, 32768, 36864, 38912, 39424, 39680, 39616, - 39632, 39636, 0, 32768, 36864, 38912, 39424, 39680, - 39616, 39632, 39640, 39638, 0, 32768, 36864, 38912, - 39424, 39680, 39616, 39632, 0, 32768, 36864, 38912, - 39424, 39680, 39616, 39648, 39640, 0, 32768, 36864, - 38912, 39424, 39680, 39616, 39648, 39640, 0, 32768, - 36864, 38912, 39424, 39680, 39616, 39648, 39640, 39642, - 0, 32768, 36864, 38912, 39424, 39680, 39616, 39648, - 39640, 0, 32768, 36864, 38912, 39424, 39680, 39616, - 39648, 39649, 39644, 0, 32768, 36864, 38912, 39424, - 39680, 39616, 39648, 39649, 39644, 0, 32768, 36864, - 38912, 39424, 39680, 39616, 39648, 39649, 39644, 39646, - 0, 32768, 36864, 38912, 39424, 39680, 39616, 0, - 32768, 36864, 38912, 39424, 39680, 39681, 39648, 0, - 32768, 36864, 38912, 39424, 39680, 39681, 39648, 0, - 32768, 36864, 38912, 39424, 39680, 39681, 39648, 39650, - 0, 32768, 36864, 38912, 39424, 39680, 39681, 39648, - 0, 32768, 36864, 38912, 39424, 39680, 39681, 39648, - 39652, 0, 32768, 36864, 38912, 39424, 39680, 39681, - 39648, 39652, 0, 32768, 36864, 38912, 39424, 39680, - 39681, 39648, 39656, 39654, 0, 32768, 36864, 38912, - 39424, 39680, 39681, 39648, 0, 32768, 36864, 38912, - 39424, 39680, 39681, 39648, 39656, 0, 32768, 36864, - 38912, 39424, 39680, 39681, 39648, 39656, 0, 32768, - 36864, 38912, 39424, 39680, 39681, 39648, 39656, 39658, - 0, 32768, 36864, 38912, 39424, 39680, 39681, 39648, - 39656, 0, 32768, 36864, 38912, 39424, 39680, 39681, - 39648, 39664, 39660, 0, 32768, 36864, 38912, 39424, - 39680, 39681, 39648, 39664, 39660, 0, 32768, 36864, - 38912, 39424, 39680, 39681, 39648, 39664, 39665, 39662, - 0, 32768, 36864, 38912, 39424, 39680, 39681, 39648, - 0, 32768, 36864, 38912, 39424, 39680, 39681, 39648, - 39664, 0, 32768, 36864, 38912, 39424, 39680, 39681, - 39683, 39664, 0, 32768, 36864, 38912, 39424, 39680, - 39681, 39683, 39664, 39666, 0, 32768, 36864, 38912, - 39424, 39680, 39681, 39683, 39664, 0, 32768, 36864, - 38912, 39424, 39680, 39681, 39683, 39664, 39668, 0, - 32768, 36864, 38912, 39424, 39680, 39681, 39683, 39664, - 39668, 0, 32768, 36864, 38912, 39424, 39680, 39681, - 39683, 39664, 39672, 39670, 0, 32768, 36864, 38912, - 39424, 39680, 39681, 39683, 39664, 0, 32768, 36864, - 38912, 39424, 39680, 39681, 39683, 39664, 39672, 0, - 32768, 36864, 38912, 39424, 39680, 39681, 39683, 39664, - 39672, 0, 32768, 36864, 38912, 39424, 39680, 39681, - 39683, 39664, 39672, 39674, 0, 32768, 36864, 38912, - 39424, 39680, 39681, 39683, 39687, 39672, 0, 32768, - 36864, 38912, 39424, 39680, 39681, 39683, 39687, 39672, - 39676, 0, 32768, 36864, 38912, 39424, 39680, 39681, - 39683, 39687, 39672, 39676, 0, 32768, 36864, 38912, - 39424, 39680, 39681, 39683, 39687, 39672, 39676, 39678, - 0, 32768, 36864, 38912, 39424, 0, 32768, 36864, - 38912, 39936, 39680, 0, 32768, 36864, 38912, 39936, - 39680, 0, 32768, 36864, 38912, 39936, 39680, 39682, - 0, 32768, 36864, 38912, 39936, 39680, 0, 32768, - 36864, 38912, 39936, 39680, 39684, 0, 32768, 36864, - 38912, 39936, 39680, 39684, 0, 32768, 36864, 38912, - 39936, 39680, 39688, 39686, 0, 32768, 36864, 38912, - 39936, 39680, 0, 32768, 36864, 38912, 39936, 39680, - 39688, 0, 32768, 36864, 38912, 39936, 39680, 39688, - 0, 32768, 36864, 38912, 39936, 39680, 39688, 39690, - 0, 32768, 36864, 38912, 39936, 39680, 39688, 0, - 32768, 36864, 38912, 39936, 39680, 39696, 39692, 0, - 32768, 36864, 38912, 39936, 39680, 39696, 39692, 0, - 32768, 36864, 38912, 39936, 39680, 39696, 39697, 39694, - 0, 32768, 36864, 38912, 39936, 39680, 0, 32768, - 36864, 38912, 39936, 39680, 39696, 0, 32768, 36864, - 38912, 39936, 39680, 39696, 0, 32768, 36864, 38912, - 39936, 39680, 39696, 39698, 0, 32768, 36864, 38912, - 39936, 39680, 39696, 0, 32768, 36864, 38912, 39936, - 39680, 39696, 39700, 0, 32768, 36864, 38912, 39936, - 39680, 39696, 39700, 0, 32768, 36864, 38912, 39936, - 39680, 39696, 39704, 39702, 0, 32768, 36864, 38912, - 39936, 39680, 39696, 0, 32768, 36864, 38912, 39936, - 39680, 39712, 39704, 0, 32768, 36864, 38912, 39936, - 39680, 39712, 39704, 0, 32768, 36864, 38912, 39936, - 39680, 39712, 39704, 39706, 0, 32768, 36864, 38912, - 39936, 39680, 39712, 39704, 0, 32768, 36864, 38912, - 39936, 39680, 39712, 39713, 39708, 0, 32768, 36864, - 38912, 39936, 39680, 39712, 39713, 39708, 0, 32768, - 36864, 38912, 39936, 39680, 39712, 39713, 39708, 39710, - 0, 32768, 36864, 38912, 39936, 39680, 0, 32768, - 36864, 38912, 39936, 39680, 39712, 0, 32768, 36864, - 38912, 39936, 39680, 39712, 0, 32768, 36864, 38912, - 39936, 39680, 39712, 39714, 0, 32768, 36864, 38912, - 39936, 39680, 39712, 0, 32768, 36864, 38912, 39936, - 39680, 39712, 39716, 0, 32768, 36864, 38912, 39936, - 39680, 39712, 39716, 0, 32768, 36864, 38912, 39936, - 39680, 39712, 39720, 39718, 0, 32768, 36864, 38912, - 39936, 39680, 39712, 0, 32768, 36864, 38912, 39936, - 39680, 39712, 39720, 0, 32768, 36864, 38912, 39936, - 39680, 39712, 39720, 0, 32768, 36864, 38912, 39936, - 39680, 39712, 39720, 39722, 0, 32768, 36864, 38912, - 39936, 39680, 39712, 39720, 0, 32768, 36864, 38912, - 39936, 39680, 39712, 39728, 39724, 0, 32768, 36864, - 38912, 39936, 39680, 39712, 39728, 39724, 0, 32768, - 36864, 38912, 39936, 39680, 39712, 39728, 39729, 39726, - 0, 32768, 36864, 38912, 39936, 39680, 39712, 0, - 32768, 36864, 38912, 39936, 39680, 39744, 39728, 0, - 32768, 36864, 38912, 39936, 39680, 39744, 39728, 0, - 32768, 36864, 38912, 39936, 39680, 39744, 39728, 39730, - 0, 32768, 36864, 38912, 39936, 39680, 39744, 39728, - 0, 32768, 36864, 38912, 39936, 39680, 39744, 39728, - 39732, 0, 32768, 36864, 38912, 39936, 39680, 39744, - 39728, 39732, 0, 32768, 36864, 38912, 39936, 39680, - 39744, 39728, 39736, 39734, 0, 32768, 36864, 38912, - 39936, 39680, 39744, 39728, 0, 32768, 36864, 38912, - 39936, 39680, 39744, 39745, 39736, 0, 32768, 36864, - 38912, 39936, 39680, 39744, 39745, 39736, 0, 32768, - 36864, 38912, 39936, 39680, 39744, 39745, 39736, 39738, - 0, 32768, 36864, 38912, 39936, 39680, 39744, 39745, - 39736, 0, 32768, 36864, 38912, 39936, 39680, 39744, - 39745, 39736, 39740, 0, 32768, 36864, 38912, 39936, - 39680, 39744, 39745, 39747, 39740, 0, 32768, 36864, - 38912, 39936, 39680, 39744, 39745, 39747, 39740, 39742, - 0, 32768, 36864, 38912, 39936, 39680, 0, 32768, - 36864, 38912, 39936, 39680, 39744, 0, 32768, 36864, - 38912, 39936, 39680, 39744, 0, 32768, 36864, 38912, - 39936, 39680, 39744, 39746, 0, 32768, 36864, 38912, - 39936, 39680, 39744, 0, 32768, 36864, 38912, 39936, - 39680, 39744, 39748, 0, 32768, 36864, 38912, 39936, - 39680, 39744, 39748, 0, 32768, 36864, 38912, 39936, - 39680, 39744, 39752, 39750, 0, 32768, 36864, 38912, - 39936, 39680, 39744, 0, 32768, 36864, 38912, 39936, - 39680, 39744, 39752, 0, 32768, 36864, 38912, 39936, - 39680, 39744, 39752, 0, 32768, 36864, 38912, 39936, - 39680, 39744, 39752, 39754, 0, 32768, 36864, 38912, - 39936, 39680, 39744, 39752, 0, 32768, 36864, 38912, - 39936, 39680, 39744, 39760, 39756, 0, 32768, 36864, - 38912, 39936, 39680, 39744, 39760, 39756, 0, 32768, - 36864, 38912, 39936, 39680, 39744, 39760, 39761, 39758, - 0, 32768, 36864, 38912, 39936, 39680, 39744, 0, - 32768, 36864, 38912, 39936, 39680, 39744, 39760, 0, - 32768, 36864, 38912, 39936, 39680, 39744, 39760, 0, - 32768, 36864, 38912, 39936, 39680, 39744, 39760, 39762, - 0, 32768, 36864, 38912, 39936, 39680, 39744, 39760, - 0, 32768, 36864, 38912, 39936, 39680, 39744, 39760, - 39764, 0, 32768, 36864, 38912, 39936, 39680, 39744, - 39760, 39764, 0, 32768, 36864, 38912, 39936, 39680, - 39744, 39760, 39768, 39766, 0, 32768, 36864, 38912, - 39936, 39680, 39744, 39760, 0, 32768, 36864, 38912, - 39936, 39680, 39744, 39776, 39768, 0, 32768, 36864, - 38912, 39936, 39680, 39744, 39776, 39768, 0, 32768, - 36864, 38912, 39936, 39680, 39744, 39776, 39768, 39770, - 0, 32768, 36864, 38912, 39936, 39680, 39744, 39776, - 39768, 0, 32768, 36864, 38912, 39936, 39680, 39744, - 39776, 39777, 39772, 0, 32768, 36864, 38912, 39936, - 39680, 39744, 39776, 39777, 39772, 0, 32768, 36864, - 38912, 39936, 39680, 39744, 39776, 39777, 39772, 39774, - 0, 32768, 36864, 38912, 39936, 39680, 39744, 0, - 32768, 36864, 38912, 39936, 39680, 39808, 39776, 0, - 32768, 36864, 38912, 39936, 39680, 39808, 39776, 0, - 32768, 36864, 38912, 39936, 39680, 39808, 39776, 39778, - 0, 32768, 36864, 38912, 39936, 39680, 39808, 39776, - 0, 32768, 36864, 38912, 39936, 39680, 39808, 39776, - 39780, 0, 32768, 36864, 38912, 39936, 39680, 39808, - 39776, 39780, 0, 32768, 36864, 38912, 39936, 39680, - 39808, 39776, 39784, 39782, 0, 32768, 36864, 38912, - 39936, 39680, 39808, 39776, 0, 32768, 36864, 38912, - 39936, 39680, 39808, 39776, 39784, 0, 32768, 36864, - 38912, 39936, 39680, 39808, 39776, 39784, 0, 32768, - 36864, 38912, 39936, 39680, 39808, 39776, 39784, 39786, - 0, 32768, 36864, 38912, 39936, 39680, 39808, 39776, - 39784, 0, 32768, 36864, 38912, 39936, 39680, 39808, - 39776, 39792, 39788, 0, 32768, 36864, 38912, 39936, - 39680, 39808, 39776, 39792, 39788, 0, 32768, 36864, - 38912, 39936, 39680, 39808, 39776, 39792, 39793, 39790, - 0, 32768, 36864, 38912, 39936, 39680, 39808, 39776, - 0, 32768, 36864, 38912, 39936, 39680, 39808, 39809, - 39792, 0, 32768, 36864, 38912, 39936, 39680, 39808, - 39809, 39792, 0, 32768, 36864, 38912, 39936, 39680, - 39808, 39809, 39792, 39794, 0, 32768, 36864, 38912, - 39936, 39680, 39808, 39809, 39792, 0, 32768, 36864, - 38912, 39936, 39680, 39808, 39809, 39792, 39796, 0, - 32768, 36864, 38912, 39936, 39680, 39808, 39809, 39792, - 39796, 0, 32768, 36864, 38912, 39936, 39680, 39808, - 39809, 39792, 39800, 39798, 0, 32768, 36864, 38912, - 39936, 39680, 39808, 39809, 39792, 0, 32768, 36864, - 38912, 39936, 39680, 39808, 39809, 39792, 39800, 0, - 32768, 36864, 38912, 39936, 39680, 39808, 39809, 39811, - 39800, 0, 32768, 36864, 38912, 39936, 39680, 39808, - 39809, 39811, 39800, 39802, 0, 32768, 36864, 38912, - 39936, 39680, 39808, 39809, 39811, 39800, 0, 32768, - 36864, 38912, 39936, 39680, 39808, 39809, 39811, 39800, - 39804, 0, 32768, 36864, 38912, 39936, 39680, 39808, - 39809, 39811, 39800, 39804, 0, 32768, 36864, 38912, - 39936, 39680, 39808, 39809, 39811, 39800, 39804, 39806, - 0, 32768, 36864, 38912, 39936, 39680, 0, 32768, - 36864, 38912, 39936, 39680, 39808, 0, 32768, 36864, - 38912, 39936, 39937, 39808, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 39810, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 0, 32768, 36864, 38912, 39936, - 39937, 39808, 39812, 0, 32768, 36864, 38912, 39936, - 39937, 39808, 39812, 0, 32768, 36864, 38912, 39936, - 39937, 39808, 39816, 39814, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 0, 32768, 36864, 38912, 39936, - 39937, 39808, 39816, 0, 32768, 36864, 38912, 39936, - 39937, 39808, 39816, 0, 32768, 36864, 38912, 39936, - 39937, 39808, 39816, 39818, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 39816, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 39824, 39820, 0, 32768, 36864, - 38912, 39936, 39937, 39808, 39824, 39820, 0, 32768, - 36864, 38912, 39936, 39937, 39808, 39824, 39825, 39822, - 0, 32768, 36864, 38912, 39936, 39937, 39808, 0, - 32768, 36864, 38912, 39936, 39937, 39808, 39824, 0, - 32768, 36864, 38912, 39936, 39937, 39808, 39824, 0, - 32768, 36864, 38912, 39936, 39937, 39808, 39824, 39826, - 0, 32768, 36864, 38912, 39936, 39937, 39808, 39824, - 0, 32768, 36864, 38912, 39936, 39937, 39808, 39824, - 39828, 0, 32768, 36864, 38912, 39936, 39937, 39808, - 39824, 39828, 0, 32768, 36864, 38912, 39936, 39937, - 39808, 39824, 39832, 39830, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 39824, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 39840, 39832, 0, 32768, 36864, - 38912, 39936, 39937, 39808, 39840, 39832, 0, 32768, - 36864, 38912, 39936, 39937, 39808, 39840, 39832, 39834, - 0, 32768, 36864, 38912, 39936, 39937, 39808, 39840, - 39832, 0, 32768, 36864, 38912, 39936, 39937, 39808, - 39840, 39841, 39836, 0, 32768, 36864, 38912, 39936, - 39937, 39808, 39840, 39841, 39836, 0, 32768, 36864, - 38912, 39936, 39937, 39808, 39840, 39841, 39836, 39838, - 0, 32768, 36864, 38912, 39936, 39937, 39808, 0, - 32768, 36864, 38912, 39936, 39937, 39808, 39840, 0, - 32768, 36864, 38912, 39936, 39937, 39808, 39840, 0, - 32768, 36864, 38912, 39936, 39937, 39808, 39840, 39842, - 0, 32768, 36864, 38912, 39936, 39937, 39808, 39840, - 0, 32768, 36864, 38912, 39936, 39937, 39808, 39840, - 39844, 0, 32768, 36864, 38912, 39936, 39937, 39808, - 39840, 39844, 0, 32768, 36864, 38912, 39936, 39937, - 39808, 39840, 39848, 39846, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 39840, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 39840, 39848, 0, 32768, 36864, - 38912, 39936, 39937, 39808, 39840, 39848, 0, 32768, - 36864, 38912, 39936, 39937, 39808, 39840, 39848, 39850, - 0, 32768, 36864, 38912, 39936, 39937, 39808, 39840, - 39848, 0, 32768, 36864, 38912, 39936, 39937, 39808, - 39840, 39856, 39852, 0, 32768, 36864, 38912, 39936, - 39937, 39808, 39840, 39856, 39852, 0, 32768, 36864, - 38912, 39936, 39937, 39808, 39840, 39856, 39857, 39854, - 0, 32768, 36864, 38912, 39936, 39937, 39808, 39840, - 0, 32768, 36864, 38912, 39936, 39937, 39808, 39872, - 39856, 0, 32768, 36864, 38912, 39936, 39937, 39808, - 39872, 39856, 0, 32768, 36864, 38912, 39936, 39937, - 39808, 39872, 39856, 39858, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 39872, 39856, 0, 32768, 36864, - 38912, 39936, 39937, 39808, 39872, 39856, 39860, 0, - 32768, 36864, 38912, 39936, 39937, 39808, 39872, 39856, - 39860, 0, 32768, 36864, 38912, 39936, 39937, 39808, - 39872, 39856, 39864, 39862, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 39872, 39856, 0, 32768, 36864, - 38912, 39936, 39937, 39808, 39872, 39873, 39864, 0, - 32768, 36864, 38912, 39936, 39937, 39808, 39872, 39873, - 39864, 0, 32768, 36864, 38912, 39936, 39937, 39808, - 39872, 39873, 39864, 39866, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 39872, 39873, 39864, 0, 32768, - 36864, 38912, 39936, 39937, 39808, 39872, 39873, 39864, - 39868, 0, 32768, 36864, 38912, 39936, 39937, 39808, - 39872, 39873, 39875, 39868, 0, 32768, 36864, 38912, - 39936, 39937, 39808, 39872, 39873, 39875, 39868, 39870, - 0, 32768, 36864, 38912, 39936, 39937, 39808, 0, - 32768, 36864, 38912, 39936, 39937, 39808, 39872, 0, - 32768, 36864, 38912, 39936, 39937, 39808, 39872, 0, - 32768, 36864, 38912, 39936, 39937, 39808, 39872, 39874, - 0, 32768, 36864, 38912, 39936, 39937, 39939, 39872, - 0, 32768, 36864, 38912, 39936, 39937, 39939, 39872, - 39876, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39872, 39876, 0, 32768, 36864, 38912, 39936, 39937, - 39939, 39872, 39880, 39878, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39872, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39872, 39880, 0, 32768, 36864, - 38912, 39936, 39937, 39939, 39872, 39880, 0, 32768, - 36864, 38912, 39936, 39937, 39939, 39872, 39880, 39882, - 0, 32768, 36864, 38912, 39936, 39937, 39939, 39872, - 39880, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39872, 39888, 39884, 0, 32768, 36864, 38912, 39936, - 39937, 39939, 39872, 39888, 39884, 0, 32768, 36864, - 38912, 39936, 39937, 39939, 39872, 39888, 39889, 39886, - 0, 32768, 36864, 38912, 39936, 39937, 39939, 39872, - 0, 32768, 36864, 38912, 39936, 39937, 39939, 39872, - 39888, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39872, 39888, 0, 32768, 36864, 38912, 39936, 39937, - 39939, 39872, 39888, 39890, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39872, 39888, 0, 32768, 36864, - 38912, 39936, 39937, 39939, 39872, 39888, 39892, 0, - 32768, 36864, 38912, 39936, 39937, 39939, 39872, 39888, - 39892, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39872, 39888, 39896, 39894, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39872, 39888, 0, 32768, 36864, - 38912, 39936, 39937, 39939, 39872, 39904, 39896, 0, - 32768, 36864, 38912, 39936, 39937, 39939, 39872, 39904, - 39896, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39872, 39904, 39896, 39898, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39872, 39904, 39896, 0, 32768, - 36864, 38912, 39936, 39937, 39939, 39872, 39904, 39905, - 39900, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39872, 39904, 39905, 39900, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39872, 39904, 39905, 39900, 39902, - 0, 32768, 36864, 38912, 39936, 39937, 39939, 39872, - 0, 32768, 36864, 38912, 39936, 39937, 39939, 39872, - 39904, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39872, 39904, 0, 32768, 36864, 38912, 39936, 39937, - 39939, 39872, 39904, 39906, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39872, 39904, 0, 32768, 36864, - 38912, 39936, 39937, 39939, 39872, 39904, 39908, 0, - 32768, 36864, 38912, 39936, 39937, 39939, 39872, 39904, - 39908, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39872, 39904, 39912, 39910, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39943, 39904, 0, 32768, 36864, - 38912, 39936, 39937, 39939, 39943, 39904, 39912, 0, - 32768, 36864, 38912, 39936, 39937, 39939, 39943, 39904, - 39912, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39943, 39904, 39912, 39914, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39943, 39904, 39912, 0, 32768, - 36864, 38912, 39936, 39937, 39939, 39943, 39904, 39920, - 39916, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39943, 39904, 39920, 39916, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39943, 39904, 39920, 39921, 39918, - 0, 32768, 36864, 38912, 39936, 39937, 39939, 39943, - 39904, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39943, 39904, 39920, 0, 32768, 36864, 38912, 39936, - 39937, 39939, 39943, 39904, 39920, 0, 32768, 36864, - 38912, 39936, 39937, 39939, 39943, 39904, 39920, 39922, - 0, 32768, 36864, 38912, 39936, 39937, 39939, 39943, - 39904, 39920, 0, 32768, 36864, 38912, 39936, 39937, - 39939, 39943, 39904, 39920, 39924, 0, 32768, 36864, - 38912, 39936, 39937, 39939, 39943, 39904, 39920, 39924, - 0, 32768, 36864, 38912, 39936, 39937, 39939, 39943, - 39904, 39920, 39928, 39926, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39943, 39904, 39920, 0, 32768, - 36864, 38912, 39936, 39937, 39939, 39943, 39904, 39920, - 39928, 0, 32768, 36864, 38912, 39936, 39937, 39939, - 39943, 39904, 39920, 39928, 0, 32768, 36864, 38912, - 39936, 39937, 39939, 39943, 39904, 39920, 39928, 39930, - 0, 32768, 36864, 38912, 39936, 39937, 39939, 39943, - 39904, 39920, 39928, 0, 32768, 36864, 38912, 39936, - 39937, 39939, 39943, 39904, 39920, 39928, 39932, 0, - 32768, 36864, 38912, 39936, 39937, 39939, 39943, 39904, - 39920, 39928, 39932, 0, 32768, 36864, 38912, 39936, - 39937, 39939, 39943, 39904, 39920, 39928, 39932, 39934, - 0, 32768, 36864, 38912, 0, 32768, 36864, 38912, - 39936, 0, 32768, 36864, 38912, 39936, 0, 32768, - 36864, 38912, 39936, 39938, 0, 32768, 36864, 38912, - 39936, 0, 32768, 36864, 38912, 39936, 39940, 0, - 32768, 36864, 38912, 39936, 39940, 0, 32768, 36864, - 38912, 39936, 39944, 39942, 0, 32768, 36864, 38912, - 39936, 0, 32768, 36864, 38912, 39936, 39944, 0, - 32768, 36864, 38912, 39936, 39944, 0, 32768, 36864, - 38912, 39936, 39944, 39946, 0, 32768, 36864, 38912, - 39936, 39944, 0, 32768, 36864, 38912, 39936, 39952, - 39948, 0, 32768, 36864, 38912, 39936, 39952, 39948, - 0, 32768, 36864, 38912, 39936, 39952, 39953, 39950, - 0, 32768, 36864, 38912, 39936, 0, 32768, 36864, - 38912, 39936, 39952, 0, 32768, 36864, 38912, 39936, - 39952, 0, 32768, 36864, 38912, 39936, 39952, 39954, - 0, 32768, 36864, 38912, 39936, 39952, 0, 32768, - 36864, 38912, 39936, 39952, 39956, 0, 32768, 36864, - 38912, 39936, 39952, 39956, 0, 32768, 36864, 38912, - 39936, 39952, 39960, 39958, 0, 32768, 36864, 38912, - 39936, 39952, 0, 32768, 36864, 38912, 39936, 39968, - 39960, 0, 32768, 36864, 38912, 39936, 39968, 39960, - 0, 32768, 36864, 38912, 39936, 39968, 39960, 39962, - 0, 32768, 36864, 38912, 39936, 39968, 39960, 0, - 32768, 36864, 38912, 39936, 39968, 39969, 39964, 0, - 32768, 36864, 38912, 39936, 39968, 39969, 39964, 0, - 32768, 36864, 38912, 39936, 39968, 39969, 39964, 39966, - 0, 32768, 36864, 38912, 39936, 0, 32768, 36864, - 38912, 39936, 39968, 0, 32768, 36864, 38912, 39936, - 39968, 0, 32768, 36864, 38912, 39936, 39968, 39970, - 0, 32768, 36864, 38912, 39936, 39968, 0, 32768, - 36864, 38912, 39936, 39968, 39972, 0, 32768, 36864, - 38912, 39936, 39968, 39972, 0, 32768, 36864, 38912, - 39936, 39968, 39976, 39974, 0, 32768, 36864, 38912, - 39936, 39968, 0, 32768, 36864, 38912, 39936, 39968, - 39976, 0, 32768, 36864, 38912, 39936, 39968, 39976, - 0, 32768, 36864, 38912, 39936, 39968, 39976, 39978, - 0, 32768, 36864, 38912, 39936, 39968, 39976, 0, - 32768, 36864, 38912, 39936, 39968, 39984, 39980, 0, - 32768, 36864, 38912, 39936, 39968, 39984, 39980, 0, - 32768, 36864, 38912, 39936, 39968, 39984, 39985, 39982, - 0, 32768, 36864, 38912, 39936, 39968, 0, 32768, - 36864, 38912, 39936, 40000, 39984, 0, 32768, 36864, - 38912, 39936, 40000, 39984, 0, 32768, 36864, 38912, - 39936, 40000, 39984, 39986, 0, 32768, 36864, 38912, - 39936, 40000, 39984, 0, 32768, 36864, 38912, 39936, - 40000, 39984, 39988, 0, 32768, 36864, 38912, 39936, - 40000, 39984, 39988, 0, 32768, 36864, 38912, 39936, - 40000, 39984, 39992, 39990, 0, 32768, 36864, 38912, - 39936, 40000, 39984, 0, 32768, 36864, 38912, 39936, - 40000, 40001, 39992, 0, 32768, 36864, 38912, 39936, - 40000, 40001, 39992, 0, 32768, 36864, 38912, 39936, - 40000, 40001, 39992, 39994, 0, 32768, 36864, 38912, - 39936, 40000, 40001, 39992, 0, 32768, 36864, 38912, - 39936, 40000, 40001, 39992, 39996, 0, 32768, 36864, - 38912, 39936, 40000, 40001, 40003, 39996, 0, 32768, - 36864, 38912, 39936, 40000, 40001, 40003, 39996, 39998, - 0, 32768, 36864, 38912, 39936, 0, 32768, 40960, - 38912, 39936, 40000, 0, 32768, 40960, 38912, 39936, - 40000, 0, 32768, 40960, 38912, 39936, 40000, 40002, - 0, 32768, 40960, 38912, 39936, 40000, 0, 32768, - 40960, 38912, 39936, 40000, 40004, 0, 32768, 40960, - 38912, 39936, 40000, 40004, 0, 32768, 40960, 38912, - 39936, 40000, 40008, 40006, 0, 32768, 40960, 38912, - 39936, 40000, 0, 32768, 40960, 38912, 39936, 40000, - 40008, 0, 32768, 40960, 38912, 39936, 40000, 40008, - 0, 32768, 40960, 38912, 39936, 40000, 40008, 40010, - 0, 32768, 40960, 38912, 39936, 40000, 40008, 0, - 32768, 40960, 38912, 39936, 40000, 40016, 40012, 0, - 32768, 40960, 38912, 39936, 40000, 40016, 40012, 0, - 32768, 40960, 38912, 39936, 40000, 40016, 40017, 40014, - 0, 32768, 40960, 38912, 39936, 40000, 0, 32768, - 40960, 38912, 39936, 40000, 40016, 0, 32768, 40960, - 38912, 39936, 40000, 40016, 0, 32768, 40960, 38912, - 39936, 40000, 40016, 40018, 0, 32768, 40960, 38912, - 39936, 40000, 40016, 0, 32768, 40960, 38912, 39936, - 40000, 40016, 40020, 0, 32768, 40960, 38912, 39936, - 40000, 40016, 40020, 0, 32768, 40960, 38912, 39936, - 40000, 40016, 40024, 40022, 0, 32768, 40960, 38912, - 39936, 40000, 40016, 0, 32768, 40960, 38912, 39936, - 40000, 40032, 40024, 0, 32768, 40960, 38912, 39936, - 40000, 40032, 40024, 0, 32768, 40960, 38912, 39936, - 40000, 40032, 40024, 40026, 0, 32768, 40960, 38912, - 39936, 40000, 40032, 40024, 0, 32768, 40960, 38912, - 39936, 40000, 40032, 40033, 40028, 0, 32768, 40960, - 38912, 39936, 40000, 40032, 40033, 40028, 0, 32768, - 40960, 38912, 39936, 40000, 40032, 40033, 40028, 40030, - 0, 32768, 40960, 38912, 39936, 40000, 0, 32768, - 40960, 38912, 39936, 40064, 40032, 0, 32768, 40960, - 38912, 39936, 40064, 40032, 0, 32768, 40960, 38912, - 39936, 40064, 40032, 40034, 0, 32768, 40960, 38912, - 39936, 40064, 40032, 0, 32768, 40960, 38912, 39936, - 40064, 40032, 40036, 0, 32768, 40960, 38912, 39936, - 40064, 40032, 40036, 0, 32768, 40960, 38912, 39936, - 40064, 40032, 40040, 40038, 0, 32768, 40960, 38912, - 39936, 40064, 40032, 0, 32768, 40960, 38912, 39936, - 40064, 40032, 40040, 0, 32768, 40960, 38912, 39936, - 40064, 40032, 40040, 0, 32768, 40960, 38912, 39936, - 40064, 40032, 40040, 40042, 0, 32768, 40960, 38912, - 39936, 40064, 40032, 40040, 0, 32768, 40960, 38912, - 39936, 40064, 40032, 40048, 40044, 0, 32768, 40960, - 38912, 39936, 40064, 40032, 40048, 40044, 0, 32768, - 40960, 38912, 39936, 40064, 40032, 40048, 40049, 40046, - 0, 32768, 40960, 38912, 39936, 40064, 40032, 0, - 32768, 40960, 38912, 39936, 40064, 40065, 40048, 0, - 32768, 40960, 38912, 39936, 40064, 40065, 40048, 0, - 32768, 40960, 38912, 39936, 40064, 40065, 40048, 40050, - 0, 32768, 40960, 38912, 39936, 40064, 40065, 40048, - 0, 32768, 40960, 38912, 39936, 40064, 40065, 40048, - 40052, 0, 32768, 40960, 38912, 39936, 40064, 40065, - 40048, 40052, 0, 32768, 40960, 38912, 39936, 40064, - 40065, 40048, 40056, 40054, 0, 32768, 40960, 38912, - 39936, 40064, 40065, 40048, 0, 32768, 40960, 38912, - 39936, 40064, 40065, 40048, 40056, 0, 32768, 40960, - 38912, 39936, 40064, 40065, 40067, 40056, 0, 32768, - 40960, 38912, 39936, 40064, 40065, 40067, 40056, 40058, - 0, 32768, 40960, 38912, 39936, 40064, 40065, 40067, - 40056, 0, 32768, 40960, 38912, 39936, 40064, 40065, - 40067, 40056, 40060, 0, 32768, 40960, 38912, 39936, - 40064, 40065, 40067, 40056, 40060, 0, 32768, 40960, - 38912, 39936, 40064, 40065, 40067, 40056, 40060, 40062, - 0, 32768, 40960, 38912, 39936, 0, 32768, 40960, - 38912, 39936, 40064, 0, 32768, 40960, 38912, 39936, - 40064, 0, 32768, 40960, 38912, 39936, 40064, 40066, - 0, 32768, 40960, 38912, 39936, 40064, 0, 32768, - 40960, 38912, 39936, 40064, 40068, 0, 32768, 40960, - 38912, 39936, 40064, 40068, 0, 32768, 40960, 38912, - 39936, 40064, 40072, 40070, 0, 32768, 40960, 38912, - 39936, 40064, 0, 32768, 40960, 38912, 39936, 40064, - 40072, 0, 32768, 40960, 38912, 39936, 40064, 40072, - 0, 32768, 40960, 38912, 39936, 40064, 40072, 40074, - 0, 32768, 40960, 38912, 39936, 40064, 40072, 0, - 32768, 40960, 38912, 39936, 40064, 40080, 40076, 0, - 32768, 40960, 38912, 39936, 40064, 40080, 40076, 0, - 32768, 40960, 38912, 39936, 40064, 40080, 40081, 40078, - 0, 32768, 40960, 38912, 39936, 40064, 0, 32768, - 40960, 38912, 39936, 40064, 40080, 0, 32768, 40960, - 38912, 39936, 40064, 40080, 0, 32768, 40960, 38912, - 39936, 40064, 40080, 40082, 0, 32768, 40960, 38912, - 39936, 40064, 40080, 0, 32768, 40960, 38912, 39936, - 40064, 40080, 40084, 0, 32768, 40960, 38912, 39936, - 40064, 40080, 40084, 0, 32768, 40960, 38912, 39936, - 40064, 40080, 40088, 40086, 0, 32768, 40960, 38912, - 39936, 40064, 40080, 0, 32768, 40960, 38912, 39936, - 40064, 40096, 40088, 0, 32768, 40960, 38912, 39936, - 40064, 40096, 40088, 0, 32768, 40960, 38912, 39936, - 40064, 40096, 40088, 40090, 0, 32768, 40960, 38912, - 39936, 40064, 40096, 40088, 0, 32768, 40960, 38912, - 39936, 40064, 40096, 40097, 40092, 0, 32768, 40960, - 38912, 39936, 40064, 40096, 40097, 40092, 0, 32768, - 40960, 38912, 39936, 40064, 40096, 40097, 40092, 40094, - 0, 32768, 40960, 38912, 39936, 40064, 0, 32768, - 40960, 38912, 39936, 40064, 40096, 0, 32768, 40960, - 38912, 39936, 40064, 40096, 0, 32768, 40960, 38912, - 39936, 40064, 40096, 40098, 0, 32768, 40960, 38912, - 39936, 40064, 40096, 0, 32768, 40960, 38912, 39936, - 40064, 40096, 40100, 0, 32768, 40960, 38912, 39936, - 40064, 40096, 40100, 0, 32768, 40960, 38912, 39936, - 40064, 40096, 40104, 40102, 0, 32768, 40960, 38912, - 39936, 40064, 40096, 0, 32768, 40960, 38912, 39936, - 40064, 40096, 40104, 0, 32768, 40960, 38912, 39936, - 40064, 40096, 40104, 0, 32768, 40960, 38912, 39936, - 40064, 40096, 40104, 40106, 0, 32768, 40960, 38912, - 39936, 40064, 40096, 40104, 0, 32768, 40960, 38912, - 39936, 40064, 40096, 40112, 40108, 0, 32768, 40960, - 38912, 39936, 40064, 40096, 40112, 40108, 0, 32768, - 40960, 38912, 39936, 40064, 40096, 40112, 40113, 40110, - 0, 32768, 40960, 38912, 39936, 40064, 40096, 0, - 32768, 40960, 38912, 39936, 40064, 40128, 40112, 0, - 32768, 40960, 38912, 39936, 40064, 40128, 40112, 0, - 32768, 40960, 38912, 39936, 40064, 40128, 40112, 40114, - 0, 32768, 40960, 38912, 39936, 40064, 40128, 40112, - 0, 32768, 40960, 38912, 39936, 40064, 40128, 40112, - 40116, 0, 32768, 40960, 38912, 39936, 40064, 40128, - 40112, 40116, 0, 32768, 40960, 38912, 39936, 40064, - 40128, 40112, 40120, 40118, 0, 32768, 40960, 38912, - 39936, 40064, 40128, 40112, 0, 32768, 40960, 38912, - 39936, 40064, 40128, 40129, 40120, 0, 32768, 40960, - 38912, 39936, 40064, 40128, 40129, 40120, 0, 32768, - 40960, 38912, 39936, 40064, 40128, 40129, 40120, 40122, - 0, 32768, 40960, 38912, 39936, 40064, 40128, 40129, - 40120, 0, 32768, 40960, 38912, 39936, 40064, 40128, - 40129, 40120, 40124, 0, 32768, 40960, 38912, 39936, - 40064, 40128, 40129, 40131, 40124, 0, 32768, 40960, - 38912, 39936, 40064, 40128, 40129, 40131, 40124, 40126, - 0, 32768, 40960, 38912, 39936, 40064, 0, 32768, - 40960, 38912, 39936, 40192, 40128, 0, 32768, 40960, - 38912, 39936, 40192, 40128, 0, 32768, 40960, 38912, - 39936, 40192, 40128, 40130, 0, 32768, 40960, 38912, - 39936, 40192, 40128, 0, 32768, 40960, 38912, 39936, - 40192, 40128, 40132, 0, 32768, 40960, 38912, 39936, - 40192, 40128, 40132, 0, 32768, 40960, 38912, 39936, - 40192, 40128, 40136, 40134, 0, 32768, 40960, 38912, - 39936, 40192, 40128, 0, 32768, 40960, 38912, 39936, - 40192, 40128, 40136, 0, 32768, 40960, 38912, 39936, - 40192, 40128, 40136, 0, 32768, 40960, 38912, 39936, - 40192, 40128, 40136, 40138, 0, 32768, 40960, 38912, - 39936, 40192, 40128, 40136, 0, 32768, 40960, 38912, - 39936, 40192, 40128, 40144, 40140, 0, 32768, 40960, - 38912, 39936, 40192, 40128, 40144, 40140, 0, 32768, - 40960, 38912, 39936, 40192, 40128, 40144, 40145, 40142, - 0, 32768, 40960, 38912, 39936, 40192, 40128, 0, - 32768, 40960, 38912, 39936, 40192, 40128, 40144, 0, - 32768, 40960, 38912, 39936, 40192, 40128, 40144, 0, - 32768, 40960, 38912, 39936, 40192, 40128, 40144, 40146, - 0, 32768, 40960, 38912, 39936, 40192, 40128, 40144, - 0, 32768, 40960, 38912, 39936, 40192, 40128, 40144, - 40148, 0, 32768, 40960, 38912, 39936, 40192, 40128, - 40144, 40148, 0, 32768, 40960, 38912, 39936, 40192, - 40128, 40144, 40152, 40150, 0, 32768, 40960, 38912, - 39936, 40192, 40128, 40144, 0, 32768, 40960, 38912, - 39936, 40192, 40128, 40160, 40152, 0, 32768, 40960, - 38912, 39936, 40192, 40128, 40160, 40152, 0, 32768, - 40960, 38912, 39936, 40192, 40128, 40160, 40152, 40154, - 0, 32768, 40960, 38912, 39936, 40192, 40128, 40160, - 40152, 0, 32768, 40960, 38912, 39936, 40192, 40128, - 40160, 40161, 40156, 0, 32768, 40960, 38912, 39936, - 40192, 40128, 40160, 40161, 40156, 0, 32768, 40960, - 38912, 39936, 40192, 40128, 40160, 40161, 40156, 40158, - 0, 32768, 40960, 38912, 39936, 40192, 40128, 0, - 32768, 40960, 38912, 39936, 40192, 40193, 40160, 0, - 32768, 40960, 38912, 39936, 40192, 40193, 40160, 0, - 32768, 40960, 38912, 39936, 40192, 40193, 40160, 40162, - 0, 32768, 40960, 38912, 39936, 40192, 40193, 40160, - 0, 32768, 40960, 38912, 39936, 40192, 40193, 40160, - 40164, 0, 32768, 40960, 38912, 39936, 40192, 40193, - 40160, 40164, 0, 32768, 40960, 38912, 39936, 40192, - 40193, 40160, 40168, 40166, 0, 32768, 40960, 38912, - 39936, 40192, 40193, 40160, 0, 32768, 40960, 38912, - 39936, 40192, 40193, 40160, 40168, 0, 32768, 40960, - 38912, 39936, 40192, 40193, 40160, 40168, 0, 32768, - 40960, 38912, 39936, 40192, 40193, 40160, 40168, 40170, - 0, 32768, 40960, 38912, 39936, 40192, 40193, 40160, - 40168, 0, 32768, 40960, 38912, 39936, 40192, 40193, - 40160, 40176, 40172, 0, 32768, 40960, 38912, 39936, - 40192, 40193, 40160, 40176, 40172, 0, 32768, 40960, - 38912, 39936, 40192, 40193, 40160, 40176, 40177, 40174, - 0, 32768, 40960, 38912, 39936, 40192, 40193, 40160, - 0, 32768, 40960, 38912, 39936, 40192, 40193, 40160, - 40176, 0, 32768, 40960, 38912, 39936, 40192, 40193, - 40195, 40176, 0, 32768, 40960, 38912, 39936, 40192, - 40193, 40195, 40176, 40178, 0, 32768, 40960, 38912, - 39936, 40192, 40193, 40195, 40176, 0, 32768, 40960, - 38912, 39936, 40192, 40193, 40195, 40176, 40180, 0, - 32768, 40960, 38912, 39936, 40192, 40193, 40195, 40176, - 40180, 0, 32768, 40960, 38912, 39936, 40192, 40193, - 40195, 40176, 40184, 40182, 0, 32768, 40960, 38912, - 39936, 40192, 40193, 40195, 40176, 0, 32768, 40960, - 38912, 39936, 40192, 40193, 40195, 40176, 40184, 0, - 32768, 40960, 38912, 39936, 40192, 40193, 40195, 40176, - 40184, 0, 32768, 40960, 38912, 39936, 40192, 40193, - 40195, 40176, 40184, 40186, 0, 32768, 40960, 38912, - 39936, 40192, 40193, 40195, 40199, 40184, 0, 32768, - 40960, 38912, 39936, 40192, 40193, 40195, 40199, 40184, - 40188, 0, 32768, 40960, 38912, 39936, 40192, 40193, - 40195, 40199, 40184, 40188, 0, 32768, 40960, 38912, - 39936, 40192, 40193, 40195, 40199, 40184, 40188, 40190, - 0, 32768, 40960, 38912, 39936, 0, 32768, 40960, - 38912, 39936, 40192, 0, 32768, 40960, 40961, 39936, - 40192, 0, 32768, 40960, 40961, 39936, 40192, 40194, - 0, 32768, 40960, 40961, 39936, 40192, 0, 32768, - 40960, 40961, 39936, 40192, 40196, 0, 32768, 40960, - 40961, 39936, 40192, 40196, 0, 32768, 40960, 40961, - 39936, 40192, 40200, 40198, 0, 32768, 40960, 40961, - 39936, 40192, 0, 32768, 40960, 40961, 39936, 40192, - 40200, 0, 32768, 40960, 40961, 39936, 40192, 40200, - 0, 32768, 40960, 40961, 39936, 40192, 40200, 40202, - 0, 32768, 40960, 40961, 39936, 40192, 40200, 0, - 32768, 40960, 40961, 39936, 40192, 40208, 40204, 0, - 32768, 40960, 40961, 39936, 40192, 40208, 40204, 0, - 32768, 40960, 40961, 39936, 40192, 40208, 40209, 40206, - 0, 32768, 40960, 40961, 39936, 40192, 0, 32768, - 40960, 40961, 39936, 40192, 40208, 0, 32768, 40960, - 40961, 39936, 40192, 40208, 0, 32768, 40960, 40961, - 39936, 40192, 40208, 40210, 0, 32768, 40960, 40961, - 39936, 40192, 40208, 0, 32768, 40960, 40961, 39936, - 40192, 40208, 40212, 0, 32768, 40960, 40961, 39936, - 40192, 40208, 40212, 0, 32768, 40960, 40961, 39936, - 40192, 40208, 40216, 40214, 0, 32768, 40960, 40961, - 39936, 40192, 40208, 0, 32768, 40960, 40961, 39936, - 40192, 40224, 40216, 0, 32768, 40960, 40961, 39936, - 40192, 40224, 40216, 0, 32768, 40960, 40961, 39936, - 40192, 40224, 40216, 40218, 0, 32768, 40960, 40961, - 39936, 40192, 40224, 40216, 0, 32768, 40960, 40961, - 39936, 40192, 40224, 40225, 40220, 0, 32768, 40960, - 40961, 39936, 40192, 40224, 40225, 40220, 0, 32768, - 40960, 40961, 39936, 40192, 40224, 40225, 40220, 40222, - 0, 32768, 40960, 40961, 39936, 40192, 0, 32768, - 40960, 40961, 39936, 40192, 40224, 0, 32768, 40960, - 40961, 39936, 40192, 40224, 0, 32768, 40960, 40961, - 39936, 40192, 40224, 40226, 0, 32768, 40960, 40961, - 39936, 40192, 40224, 0, 32768, 40960, 40961, 39936, - 40192, 40224, 40228, 0, 32768, 40960, 40961, 39936, - 40192, 40224, 40228, 0, 32768, 40960, 40961, 39936, - 40192, 40224, 40232, 40230, 0, 32768, 40960, 40961, - 39936, 40192, 40224, 0, 32768, 40960, 40961, 39936, - 40192, 40224, 40232, 0, 32768, 40960, 40961, 39936, - 40192, 40224, 40232, 0, 32768, 40960, 40961, 39936, - 40192, 40224, 40232, 40234, 0, 32768, 40960, 40961, - 39936, 40192, 40224, 40232, 0, 32768, 40960, 40961, - 39936, 40192, 40224, 40240, 40236, 0, 32768, 40960, - 40961, 39936, 40192, 40224, 40240, 40236, 0, 32768, - 40960, 40961, 39936, 40192, 40224, 40240, 40241, 40238, - 0, 32768, 40960, 40961, 39936, 40192, 40224, 0, - 32768, 40960, 40961, 39936, 40192, 40256, 40240, 0, - 32768, 40960, 40961, 39936, 40192, 40256, 40240, 0, - 32768, 40960, 40961, 39936, 40192, 40256, 40240, 40242, - 0, 32768, 40960, 40961, 39936, 40192, 40256, 40240, - 0, 32768, 40960, 40961, 39936, 40192, 40256, 40240, - 40244, 0, 32768, 40960, 40961, 39936, 40192, 40256, - 40240, 40244, 0, 32768, 40960, 40961, 39936, 40192, - 40256, 40240, 40248, 40246, 0, 32768, 40960, 40961, - 39936, 40192, 40256, 40240, 0, 32768, 40960, 40961, - 39936, 40192, 40256, 40257, 40248, 0, 32768, 40960, - 40961, 39936, 40192, 40256, 40257, 40248, 0, 32768, - 40960, 40961, 39936, 40192, 40256, 40257, 40248, 40250, - 0, 32768, 40960, 40961, 39936, 40192, 40256, 40257, - 40248, 0, 32768, 40960, 40961, 39936, 40192, 40256, - 40257, 40248, 40252, 0, 32768, 40960, 40961, 39936, - 40192, 40256, 40257, 40259, 40252, 0, 32768, 40960, - 40961, 39936, 40192, 40256, 40257, 40259, 40252, 40254, - 0, 32768, 40960, 40961, 39936, 40192, 0, 32768, - 40960, 40961, 39936, 40192, 40256, 0, 32768, 40960, - 40961, 39936, 40192, 40256, 0, 32768, 40960, 40961, - 39936, 40192, 40256, 40258, 0, 32768, 40960, 40961, - 39936, 40192, 40256, 0, 32768, 40960, 40961, 39936, - 40192, 40256, 40260, 0, 32768, 40960, 40961, 39936, - 40192, 40256, 40260, 0, 32768, 40960, 40961, 39936, - 40192, 40256, 40264, 40262, 0, 32768, 40960, 40961, - 39936, 40192, 40256, 0, 32768, 40960, 40961, 39936, - 40192, 40256, 40264, 0, 32768, 40960, 40961, 39936, - 40192, 40256, 40264, 0, 32768, 40960, 40961, 39936, - 40192, 40256, 40264, 40266, 0, 32768, 40960, 40961, - 39936, 40192, 40256, 40264, 0, 32768, 40960, 40961, - 39936, 40192, 40256, 40272, 40268, 0, 32768, 40960, - 40961, 39936, 40192, 40256, 40272, 40268, 0, 32768, - 40960, 40961, 39936, 40192, 40256, 40272, 40273, 40270, - 0, 32768, 40960, 40961, 39936, 40192, 40256, 0, - 32768, 40960, 40961, 39936, 40192, 40256, 40272, 0, - 32768, 40960, 40961, 39936, 40192, 40256, 40272, 0, - 32768, 40960, 40961, 39936, 40192, 40256, 40272, 40274, - 0, 32768, 40960, 40961, 39936, 40192, 40256, 40272, - 0, 32768, 40960, 40961, 39936, 40192, 40256, 40272, - 40276, 0, 32768, 40960, 40961, 39936, 40192, 40256, - 40272, 40276, 0, 32768, 40960, 40961, 39936, 40192, - 40256, 40272, 40280, 40278, 0, 32768, 40960, 40961, - 39936, 40192, 40256, 40272, 0, 32768, 40960, 40961, - 39936, 40192, 40256, 40288, 40280, 0, 32768, 40960, - 40961, 39936, 40192, 40256, 40288, 40280, 0, 32768, - 40960, 40961, 39936, 40192, 40256, 40288, 40280, 40282, - 0, 32768, 40960, 40961, 39936, 40192, 40256, 40288, - 40280, 0, 32768, 40960, 40961, 39936, 40192, 40256, - 40288, 40289, 40284, 0, 32768, 40960, 40961, 39936, - 40192, 40256, 40288, 40289, 40284, 0, 32768, 40960, - 40961, 39936, 40192, 40256, 40288, 40289, 40284, 40286, - 0, 32768, 40960, 40961, 39936, 40192, 40256, 0, - 32768, 40960, 40961, 39936, 40192, 40320, 40288, 0, - 32768, 40960, 40961, 39936, 40192, 40320, 40288, 0, - 32768, 40960, 40961, 39936, 40192, 40320, 40288, 40290, - 0, 32768, 40960, 40961, 39936, 40192, 40320, 40288, - 0, 32768, 40960, 40961, 39936, 40192, 40320, 40288, - 40292, 0, 32768, 40960, 40961, 39936, 40192, 40320, - 40288, 40292, 0, 32768, 40960, 40961, 39936, 40192, - 40320, 40288, 40296, 40294, 0, 32768, 40960, 40961, - 39936, 40192, 40320, 40288, 0, 32768, 40960, 40961, - 39936, 40192, 40320, 40288, 40296, 0, 32768, 40960, - 40961, 39936, 40192, 40320, 40288, 40296, 0, 32768, - 40960, 40961, 39936, 40192, 40320, 40288, 40296, 40298, - 0, 32768, 40960, 40961, 39936, 40192, 40320, 40288, - 40296, 0, 32768, 40960, 40961, 39936, 40192, 40320, - 40288, 40304, 40300, 0, 32768, 40960, 40961, 39936, - 40192, 40320, 40288, 40304, 40300, 0, 32768, 40960, - 40961, 39936, 40192, 40320, 40288, 40304, 40305, 40302, - 0, 32768, 40960, 40961, 39936, 40192, 40320, 40288, - 0, 32768, 40960, 40961, 39936, 40192, 40320, 40321, - 40304, 0, 32768, 40960, 40961, 39936, 40192, 40320, - 40321, 40304, 0, 32768, 40960, 40961, 39936, 40192, - 40320, 40321, 40304, 40306, 0, 32768, 40960, 40961, - 39936, 40192, 40320, 40321, 40304, 0, 32768, 40960, - 40961, 39936, 40192, 40320, 40321, 40304, 40308, 0, - 32768, 40960, 40961, 39936, 40192, 40320, 40321, 40304, - 40308, 0, 32768, 40960, 40961, 39936, 40192, 40320, - 40321, 40304, 40312, 40310, 0, 32768, 40960, 40961, - 39936, 40192, 40320, 40321, 40304, 0, 32768, 40960, - 40961, 39936, 40192, 40320, 40321, 40304, 40312, 0, - 32768, 40960, 40961, 39936, 40192, 40320, 40321, 40323, - 40312, 0, 32768, 40960, 40961, 39936, 40192, 40320, - 40321, 40323, 40312, 40314, 0, 32768, 40960, 40961, - 39936, 40192, 40320, 40321, 40323, 40312, 0, 32768, - 40960, 40961, 39936, 40192, 40320, 40321, 40323, 40312, - 40316, 0, 32768, 40960, 40961, 39936, 40192, 40320, - 40321, 40323, 40312, 40316, 0, 32768, 40960, 40961, - 39936, 40192, 40320, 40321, 40323, 40312, 40316, 40318, - 0, 32768, 40960, 40961, 39936, 40192, 0, 32768, - 40960, 40961, 39936, 40448, 40320, 0, 32768, 40960, - 40961, 39936, 40448, 40320, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 40322, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 0, 32768, 40960, 40961, 39936, - 40448, 40320, 40324, 0, 32768, 40960, 40961, 39936, - 40448, 40320, 40324, 0, 32768, 40960, 40961, 39936, - 40448, 40320, 40328, 40326, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 0, 32768, 40960, 40961, 39936, - 40448, 40320, 40328, 0, 32768, 40960, 40961, 39936, - 40448, 40320, 40328, 0, 32768, 40960, 40961, 39936, - 40448, 40320, 40328, 40330, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 40328, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 40336, 40332, 0, 32768, 40960, - 40961, 39936, 40448, 40320, 40336, 40332, 0, 32768, - 40960, 40961, 39936, 40448, 40320, 40336, 40337, 40334, - 0, 32768, 40960, 40961, 39936, 40448, 40320, 0, - 32768, 40960, 40961, 39936, 40448, 40320, 40336, 0, - 32768, 40960, 40961, 39936, 40448, 40320, 40336, 0, - 32768, 40960, 40961, 39936, 40448, 40320, 40336, 40338, - 0, 32768, 40960, 40961, 39936, 40448, 40320, 40336, - 0, 32768, 40960, 40961, 39936, 40448, 40320, 40336, - 40340, 0, 32768, 40960, 40961, 39936, 40448, 40320, - 40336, 40340, 0, 32768, 40960, 40961, 39936, 40448, - 40320, 40336, 40344, 40342, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 40336, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 40352, 40344, 0, 32768, 40960, - 40961, 39936, 40448, 40320, 40352, 40344, 0, 32768, - 40960, 40961, 39936, 40448, 40320, 40352, 40344, 40346, - 0, 32768, 40960, 40961, 39936, 40448, 40320, 40352, - 40344, 0, 32768, 40960, 40961, 39936, 40448, 40320, - 40352, 40353, 40348, 0, 32768, 40960, 40961, 39936, - 40448, 40320, 40352, 40353, 40348, 0, 32768, 40960, - 40961, 39936, 40448, 40320, 40352, 40353, 40348, 40350, - 0, 32768, 40960, 40961, 39936, 40448, 40320, 0, - 32768, 40960, 40961, 39936, 40448, 40320, 40352, 0, - 32768, 40960, 40961, 39936, 40448, 40320, 40352, 0, - 32768, 40960, 40961, 39936, 40448, 40320, 40352, 40354, - 0, 32768, 40960, 40961, 39936, 40448, 40320, 40352, - 0, 32768, 40960, 40961, 39936, 40448, 40320, 40352, - 40356, 0, 32768, 40960, 40961, 39936, 40448, 40320, - 40352, 40356, 0, 32768, 40960, 40961, 39936, 40448, - 40320, 40352, 40360, 40358, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 40352, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 40352, 40360, 0, 32768, 40960, - 40961, 39936, 40448, 40320, 40352, 40360, 0, 32768, - 40960, 40961, 39936, 40448, 40320, 40352, 40360, 40362, - 0, 32768, 40960, 40961, 39936, 40448, 40320, 40352, - 40360, 0, 32768, 40960, 40961, 39936, 40448, 40320, - 40352, 40368, 40364, 0, 32768, 40960, 40961, 39936, - 40448, 40320, 40352, 40368, 40364, 0, 32768, 40960, - 40961, 39936, 40448, 40320, 40352, 40368, 40369, 40366, - 0, 32768, 40960, 40961, 39936, 40448, 40320, 40352, - 0, 32768, 40960, 40961, 39936, 40448, 40320, 40384, - 40368, 0, 32768, 40960, 40961, 39936, 40448, 40320, - 40384, 40368, 0, 32768, 40960, 40961, 39936, 40448, - 40320, 40384, 40368, 40370, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 40384, 40368, 0, 32768, 40960, - 40961, 39936, 40448, 40320, 40384, 40368, 40372, 0, - 32768, 40960, 40961, 39936, 40448, 40320, 40384, 40368, - 40372, 0, 32768, 40960, 40961, 39936, 40448, 40320, - 40384, 40368, 40376, 40374, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 40384, 40368, 0, 32768, 40960, - 40961, 39936, 40448, 40320, 40384, 40385, 40376, 0, - 32768, 40960, 40961, 39936, 40448, 40320, 40384, 40385, - 40376, 0, 32768, 40960, 40961, 39936, 40448, 40320, - 40384, 40385, 40376, 40378, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 40384, 40385, 40376, 0, 32768, - 40960, 40961, 39936, 40448, 40320, 40384, 40385, 40376, - 40380, 0, 32768, 40960, 40961, 39936, 40448, 40320, - 40384, 40385, 40387, 40380, 0, 32768, 40960, 40961, - 39936, 40448, 40320, 40384, 40385, 40387, 40380, 40382, - 0, 32768, 40960, 40961, 39936, 40448, 40320, 0, - 32768, 40960, 40961, 39936, 40448, 40449, 40384, 0, - 32768, 40960, 40961, 39936, 40448, 40449, 40384, 0, - 32768, 40960, 40961, 39936, 40448, 40449, 40384, 40386, - 0, 32768, 40960, 40961, 39936, 40448, 40449, 40384, - 0, 32768, 40960, 40961, 39936, 40448, 40449, 40384, - 40388, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40384, 40388, 0, 32768, 40960, 40961, 39936, 40448, - 40449, 40384, 40392, 40390, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40384, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40384, 40392, 0, 32768, 40960, - 40961, 39936, 40448, 40449, 40384, 40392, 0, 32768, - 40960, 40961, 39936, 40448, 40449, 40384, 40392, 40394, - 0, 32768, 40960, 40961, 39936, 40448, 40449, 40384, - 40392, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40384, 40400, 40396, 0, 32768, 40960, 40961, 39936, - 40448, 40449, 40384, 40400, 40396, 0, 32768, 40960, - 40961, 39936, 40448, 40449, 40384, 40400, 40401, 40398, - 0, 32768, 40960, 40961, 39936, 40448, 40449, 40384, - 0, 32768, 40960, 40961, 39936, 40448, 40449, 40384, - 40400, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40384, 40400, 0, 32768, 40960, 40961, 39936, 40448, - 40449, 40384, 40400, 40402, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40384, 40400, 0, 32768, 40960, - 40961, 39936, 40448, 40449, 40384, 40400, 40404, 0, - 32768, 40960, 40961, 39936, 40448, 40449, 40384, 40400, - 40404, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40384, 40400, 40408, 40406, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40384, 40400, 0, 32768, 40960, - 40961, 39936, 40448, 40449, 40384, 40416, 40408, 0, - 32768, 40960, 40961, 39936, 40448, 40449, 40384, 40416, - 40408, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40384, 40416, 40408, 40410, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40384, 40416, 40408, 0, 32768, - 40960, 40961, 39936, 40448, 40449, 40384, 40416, 40417, - 40412, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40384, 40416, 40417, 40412, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40384, 40416, 40417, 40412, 40414, - 0, 32768, 40960, 40961, 39936, 40448, 40449, 40384, - 0, 32768, 40960, 40961, 39936, 40448, 40449, 40384, - 40416, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40451, 40416, 0, 32768, 40960, 40961, 39936, 40448, - 40449, 40451, 40416, 40418, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40451, 40416, 0, 32768, 40960, - 40961, 39936, 40448, 40449, 40451, 40416, 40420, 0, - 32768, 40960, 40961, 39936, 40448, 40449, 40451, 40416, - 40420, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40451, 40416, 40424, 40422, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40451, 40416, 0, 32768, 40960, - 40961, 39936, 40448, 40449, 40451, 40416, 40424, 0, - 32768, 40960, 40961, 39936, 40448, 40449, 40451, 40416, - 40424, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40451, 40416, 40424, 40426, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40451, 40416, 40424, 0, 32768, - 40960, 40961, 39936, 40448, 40449, 40451, 40416, 40432, - 40428, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40451, 40416, 40432, 40428, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40451, 40416, 40432, 40433, 40430, - 0, 32768, 40960, 40961, 39936, 40448, 40449, 40451, - 40416, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40451, 40416, 40432, 0, 32768, 40960, 40961, 39936, - 40448, 40449, 40451, 40416, 40432, 0, 32768, 40960, - 40961, 39936, 40448, 40449, 40451, 40416, 40432, 40434, - 0, 32768, 40960, 40961, 39936, 40448, 40449, 40451, - 40455, 40432, 0, 32768, 40960, 40961, 39936, 40448, - 40449, 40451, 40455, 40432, 40436, 0, 32768, 40960, - 40961, 39936, 40448, 40449, 40451, 40455, 40432, 40436, - 0, 32768, 40960, 40961, 39936, 40448, 40449, 40451, - 40455, 40432, 40440, 40438, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40451, 40455, 40432, 0, 32768, - 40960, 40961, 39936, 40448, 40449, 40451, 40455, 40432, - 40440, 0, 32768, 40960, 40961, 39936, 40448, 40449, - 40451, 40455, 40432, 40440, 0, 32768, 40960, 40961, - 39936, 40448, 40449, 40451, 40455, 40432, 40440, 40442, - 0, 32768, 40960, 40961, 39936, 40448, 40449, 40451, - 40455, 40432, 40440, 0, 32768, 40960, 40961, 39936, - 40448, 40449, 40451, 40455, 40432, 40440, 40444, 0, - 32768, 40960, 40961, 39936, 40448, 40449, 40451, 40455, - 40432, 40440, 40444, 0, 32768, 40960, 40961, 39936, - 40448, 40449, 40451, 40455, 40432, 40440, 40444, 40446, - 0, 32768, 40960, 40961, 39936, 0, 32768, 40960, - 40961, 39936, 40448, 0, 32768, 40960, 40961, 39936, - 40448, 0, 32768, 40960, 40961, 39936, 40448, 40450, - 0, 32768, 40960, 40961, 40963, 40448, 0, 32768, - 40960, 40961, 40963, 40448, 40452, 0, 32768, 40960, - 40961, 40963, 40448, 40452, 0, 32768, 40960, 40961, - 40963, 40448, 40456, 40454, 0, 32768, 40960, 40961, - 40963, 40448, 0, 32768, 40960, 40961, 40963, 40448, - 40456, 0, 32768, 40960, 40961, 40963, 40448, 40456, - 0, 32768, 40960, 40961, 40963, 40448, 40456, 40458, - 0, 32768, 40960, 40961, 40963, 40448, 40456, 0, - 32768, 40960, 40961, 40963, 40448, 40464, 40460, 0, - 32768, 40960, 40961, 40963, 40448, 40464, 40460, 0, - 32768, 40960, 40961, 40963, 40448, 40464, 40465, 40462, - 0, 32768, 40960, 40961, 40963, 40448, 0, 32768, - 40960, 40961, 40963, 40448, 40464, 0, 32768, 40960, - 40961, 40963, 40448, 40464, 0, 32768, 40960, 40961, - 40963, 40448, 40464, 40466, 0, 32768, 40960, 40961, - 40963, 40448, 40464, 0, 32768, 40960, 40961, 40963, - 40448, 40464, 40468, 0, 32768, 40960, 40961, 40963, - 40448, 40464, 40468, 0, 32768, 40960, 40961, 40963, - 40448, 40464, 40472, 40470, 0, 32768, 40960, 40961, - 40963, 40448, 40464, 0, 32768, 40960, 40961, 40963, - 40448, 40480, 40472, 0, 32768, 40960, 40961, 40963, - 40448, 40480, 40472, 0, 32768, 40960, 40961, 40963, - 40448, 40480, 40472, 40474, 0, 32768, 40960, 40961, - 40963, 40448, 40480, 40472, 0, 32768, 40960, 40961, - 40963, 40448, 40480, 40481, 40476, 0, 32768, 40960, - 40961, 40963, 40448, 40480, 40481, 40476, 0, 32768, - 40960, 40961, 40963, 40448, 40480, 40481, 40476, 40478, - 0, 32768, 40960, 40961, 40963, 40448, 0, 32768, - 40960, 40961, 40963, 40448, 40480, 0, 32768, 40960, - 40961, 40963, 40448, 40480, 0, 32768, 40960, 40961, - 40963, 40448, 40480, 40482, 0, 32768, 40960, 40961, - 40963, 40448, 40480, 0, 32768, 40960, 40961, 40963, - 40448, 40480, 40484, 0, 32768, 40960, 40961, 40963, - 40448, 40480, 40484, 0, 32768, 40960, 40961, 40963, - 40448, 40480, 40488, 40486, 0, 32768, 40960, 40961, - 40963, 40448, 40480, 0, 32768, 40960, 40961, 40963, - 40448, 40480, 40488, 0, 32768, 40960, 40961, 40963, - 40448, 40480, 40488, 0, 32768, 40960, 40961, 40963, - 40448, 40480, 40488, 40490, 0, 32768, 40960, 40961, - 40963, 40448, 40480, 40488, 0, 32768, 40960, 40961, - 40963, 40448, 40480, 40496, 40492, 0, 32768, 40960, - 40961, 40963, 40448, 40480, 40496, 40492, 0, 32768, - 40960, 40961, 40963, 40448, 40480, 40496, 40497, 40494, - 0, 32768, 40960, 40961, 40963, 40448, 40480, 0, - 32768, 40960, 40961, 40963, 40448, 40512, 40496, 0, - 32768, 40960, 40961, 40963, 40448, 40512, 40496, 0, - 32768, 40960, 40961, 40963, 40448, 40512, 40496, 40498, - 0, 32768, 40960, 40961, 40963, 40448, 40512, 40496, - 0, 32768, 40960, 40961, 40963, 40448, 40512, 40496, - 40500, 0, 32768, 40960, 40961, 40963, 40448, 40512, - 40496, 40500, 0, 32768, 40960, 40961, 40963, 40448, - 40512, 40496, 40504, 40502, 0, 32768, 40960, 40961, - 40963, 40448, 40512, 40496, 0, 32768, 40960, 40961, - 40963, 40448, 40512, 40513, 40504, 0, 32768, 40960, - 40961, 40963, 40448, 40512, 40513, 40504, 0, 32768, - 40960, 40961, 40963, 40448, 40512, 40513, 40504, 40506, - 0, 32768, 40960, 40961, 40963, 40448, 40512, 40513, - 40504, 0, 32768, 40960, 40961, 40963, 40448, 40512, - 40513, 40504, 40508, 0, 32768, 40960, 40961, 40963, - 40448, 40512, 40513, 40515, 40508, 0, 32768, 40960, - 40961, 40963, 40448, 40512, 40513, 40515, 40508, 40510, - 0, 32768, 40960, 40961, 40963, 40448, 0, 32768, - 40960, 40961, 40963, 40448, 40512, 0, 32768, 40960, - 40961, 40963, 40448, 40512, 0, 32768, 40960, 40961, - 40963, 40448, 40512, 40514, 0, 32768, 40960, 40961, - 40963, 40448, 40512, 0, 32768, 40960, 40961, 40963, - 40448, 40512, 40516, 0, 32768, 40960, 40961, 40963, - 40448, 40512, 40516, 0, 32768, 40960, 40961, 40963, - 40448, 40512, 40520, 40518, 0, 32768, 40960, 40961, - 40963, 40448, 40512, 0, 32768, 40960, 40961, 40963, - 40448, 40512, 40520, 0, 32768, 40960, 40961, 40963, - 40448, 40512, 40520, 0, 32768, 40960, 40961, 40963, - 40448, 40512, 40520, 40522, 0, 32768, 40960, 40961, - 40963, 40448, 40512, 40520, 0, 32768, 40960, 40961, - 40963, 40448, 40512, 40528, 40524, 0, 32768, 40960, - 40961, 40963, 40448, 40512, 40528, 40524, 0, 32768, - 40960, 40961, 40963, 40448, 40512, 40528, 40529, 40526, - 0, 32768, 40960, 40961, 40963, 40448, 40512, 0, - 32768, 40960, 40961, 40963, 40448, 40512, 40528, 0, - 32768, 40960, 40961, 40963, 40448, 40512, 40528, 0, - 32768, 40960, 40961, 40963, 40448, 40512, 40528, 40530, - 0, 32768, 40960, 40961, 40963, 40448, 40512, 40528, - 0, 32768, 40960, 40961, 40963, 40448, 40512, 40528, - 40532, 0, 32768, 40960, 40961, 40963, 40448, 40512, - 40528, 40532, 0, 32768, 40960, 40961, 40963, 40448, - 40512, 40528, 40536, 40534, 0, 32768, 40960, 40961, - 40963, 40448, 40512, 40528, 0, 32768, 40960, 40961, - 40963, 40448, 40512, 40544, 40536, 0, 32768, 40960, - 40961, 40963, 40448, 40512, 40544, 40536, 0, 32768, - 40960, 40961, 40963, 40448, 40512, 40544, 40536, 40538, - 0, 32768, 40960, 40961, 40963, 40448, 40512, 40544, - 40536, 0, 32768, 40960, 40961, 40963, 40448, 40512, - 40544, 40545, 40540, 0, 32768, 40960, 40961, 40963, - 40448, 40512, 40544, 40545, 40540, 0, 32768, 40960, - 40961, 40963, 40448, 40512, 40544, 40545, 40540, 40542, - 0, 32768, 40960, 40961, 40963, 40448, 40512, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40544, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40544, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40544, 40546, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40544, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40544, - 40548, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40544, 40548, 0, 32768, 40960, 40961, 40963, 40448, - 40576, 40544, 40552, 40550, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40544, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40544, 40552, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 40544, 40552, 0, 32768, - 40960, 40961, 40963, 40448, 40576, 40544, 40552, 40554, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40544, - 40552, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40544, 40560, 40556, 0, 32768, 40960, 40961, 40963, - 40448, 40576, 40544, 40560, 40556, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 40544, 40560, 40561, 40558, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40544, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40577, - 40560, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40577, 40560, 0, 32768, 40960, 40961, 40963, 40448, - 40576, 40577, 40560, 40562, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40577, 40560, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 40577, 40560, 40564, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40577, 40560, - 40564, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40577, 40560, 40568, 40566, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40577, 40560, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 40577, 40560, 40568, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40577, 40579, - 40568, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40577, 40579, 40568, 40570, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40577, 40579, 40568, 0, 32768, - 40960, 40961, 40963, 40448, 40576, 40577, 40579, 40568, - 40572, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40577, 40579, 40568, 40572, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40577, 40579, 40568, 40572, 40574, - 0, 32768, 40960, 40961, 40963, 40448, 0, 32768, - 40960, 40961, 40963, 40448, 40576, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40578, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 0, 32768, 40960, 40961, 40963, - 40448, 40576, 40580, 0, 32768, 40960, 40961, 40963, - 40448, 40576, 40580, 0, 32768, 40960, 40961, 40963, - 40448, 40576, 40584, 40582, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 0, 32768, 40960, 40961, 40963, - 40448, 40576, 40584, 0, 32768, 40960, 40961, 40963, - 40448, 40576, 40584, 0, 32768, 40960, 40961, 40963, - 40448, 40576, 40584, 40586, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40584, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40592, 40588, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 40592, 40588, 0, 32768, - 40960, 40961, 40963, 40448, 40576, 40592, 40593, 40590, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40592, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40592, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40592, 40594, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40592, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40592, - 40596, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40592, 40596, 0, 32768, 40960, 40961, 40963, 40448, - 40576, 40592, 40600, 40598, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40592, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40608, 40600, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 40608, 40600, 0, 32768, - 40960, 40961, 40963, 40448, 40576, 40608, 40600, 40602, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40608, - 40600, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40608, 40609, 40604, 0, 32768, 40960, 40961, 40963, - 40448, 40576, 40608, 40609, 40604, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 40608, 40609, 40604, 40606, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40608, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40608, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40608, 40610, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40608, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40608, - 40612, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40608, 40612, 0, 32768, 40960, 40961, 40963, 40448, - 40576, 40608, 40616, 40614, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40608, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40608, 40616, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 40608, 40616, 0, 32768, - 40960, 40961, 40963, 40448, 40576, 40608, 40616, 40618, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40608, - 40616, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40608, 40624, 40620, 0, 32768, 40960, 40961, 40963, - 40448, 40576, 40608, 40624, 40620, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 40608, 40624, 40625, 40622, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40608, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 40640, - 40624, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40640, 40624, 0, 32768, 40960, 40961, 40963, 40448, - 40576, 40640, 40624, 40626, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40640, 40624, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 40640, 40624, 40628, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40640, 40624, - 40628, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40640, 40624, 40632, 40630, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40640, 40624, 0, 32768, 40960, - 40961, 40963, 40448, 40576, 40640, 40641, 40632, 0, - 32768, 40960, 40961, 40963, 40448, 40576, 40640, 40641, - 40632, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40640, 40641, 40632, 40634, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40640, 40641, 40632, 0, 32768, - 40960, 40961, 40963, 40448, 40576, 40640, 40641, 40632, - 40636, 0, 32768, 40960, 40961, 40963, 40448, 40576, - 40640, 40641, 40643, 40636, 0, 32768, 40960, 40961, - 40963, 40448, 40576, 40640, 40641, 40643, 40636, 40638, - 0, 32768, 40960, 40961, 40963, 40448, 40576, 0, - 32768, 40960, 40961, 40963, 40448, 40704, 40640, 0, - 32768, 40960, 40961, 40963, 40448, 40704, 40640, 0, - 32768, 40960, 40961, 40963, 40448, 40704, 40640, 40642, - 0, 32768, 40960, 40961, 40963, 40448, 40704, 40640, - 0, 32768, 40960, 40961, 40963, 40448, 40704, 40640, - 40644, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40640, 40644, 0, 32768, 40960, 40961, 40963, 40448, - 40704, 40640, 40648, 40646, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40640, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40640, 40648, 0, 32768, 40960, - 40961, 40963, 40448, 40704, 40640, 40648, 0, 32768, - 40960, 40961, 40963, 40448, 40704, 40640, 40648, 40650, - 0, 32768, 40960, 40961, 40963, 40448, 40704, 40640, - 40648, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40640, 40656, 40652, 0, 32768, 40960, 40961, 40963, - 40448, 40704, 40640, 40656, 40652, 0, 32768, 40960, - 40961, 40963, 40448, 40704, 40640, 40656, 40657, 40654, - 0, 32768, 40960, 40961, 40963, 40448, 40704, 40640, - 0, 32768, 40960, 40961, 40963, 40448, 40704, 40640, - 40656, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40640, 40656, 0, 32768, 40960, 40961, 40963, 40448, - 40704, 40640, 40656, 40658, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40640, 40656, 0, 32768, 40960, - 40961, 40963, 40448, 40704, 40640, 40656, 40660, 0, - 32768, 40960, 40961, 40963, 40448, 40704, 40640, 40656, - 40660, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40640, 40656, 40664, 40662, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40640, 40656, 0, 32768, 40960, - 40961, 40963, 40448, 40704, 40640, 40672, 40664, 0, - 32768, 40960, 40961, 40963, 40448, 40704, 40640, 40672, - 40664, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40640, 40672, 40664, 40666, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40640, 40672, 40664, 0, 32768, - 40960, 40961, 40963, 40448, 40704, 40640, 40672, 40673, - 40668, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40640, 40672, 40673, 40668, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40640, 40672, 40673, 40668, 40670, - 0, 32768, 40960, 40961, 40963, 40448, 40704, 40640, - 0, 32768, 40960, 40961, 40963, 40448, 40704, 40705, - 40672, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40705, 40672, 0, 32768, 40960, 40961, 40963, 40448, - 40704, 40705, 40672, 40674, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40705, 40672, 0, 32768, 40960, - 40961, 40963, 40448, 40704, 40705, 40672, 40676, 0, - 32768, 40960, 40961, 40963, 40448, 40704, 40705, 40672, - 40676, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40705, 40672, 40680, 40678, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40705, 40672, 0, 32768, 40960, - 40961, 40963, 40448, 40704, 40705, 40672, 40680, 0, - 32768, 40960, 40961, 40963, 40448, 40704, 40705, 40672, - 40680, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40705, 40672, 40680, 40682, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40705, 40672, 40680, 0, 32768, - 40960, 40961, 40963, 40448, 40704, 40705, 40672, 40688, - 40684, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40705, 40672, 40688, 40684, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40705, 40672, 40688, 40689, 40686, - 0, 32768, 40960, 40961, 40963, 40448, 40704, 40705, - 40672, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40705, 40672, 40688, 0, 32768, 40960, 40961, 40963, - 40448, 40704, 40705, 40707, 40688, 0, 32768, 40960, - 40961, 40963, 40448, 40704, 40705, 40707, 40688, 40690, - 0, 32768, 40960, 40961, 40963, 40448, 40704, 40705, - 40707, 40688, 0, 32768, 40960, 40961, 40963, 40448, - 40704, 40705, 40707, 40688, 40692, 0, 32768, 40960, - 40961, 40963, 40448, 40704, 40705, 40707, 40688, 40692, - 0, 32768, 40960, 40961, 40963, 40448, 40704, 40705, - 40707, 40688, 40696, 40694, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40705, 40707, 40688, 0, 32768, - 40960, 40961, 40963, 40448, 40704, 40705, 40707, 40688, - 40696, 0, 32768, 40960, 40961, 40963, 40448, 40704, - 40705, 40707, 40688, 40696, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40705, 40707, 40688, 40696, 40698, - 0, 32768, 40960, 40961, 40963, 40448, 40704, 40705, - 40707, 40711, 40696, 0, 32768, 40960, 40961, 40963, - 40448, 40704, 40705, 40707, 40711, 40696, 40700, 0, - 32768, 40960, 40961, 40963, 40448, 40704, 40705, 40707, - 40711, 40696, 40700, 0, 32768, 40960, 40961, 40963, - 40448, 40704, 40705, 40707, 40711, 40696, 40700, 40702, - 0, 32768, 40960, 40961, 40963, 40448, 0, 32768, - 40960, 40961, 40963, 40448, 40704, 0, 32768, 40960, - 40961, 40963, 40448, 40704, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 40706, 0, 32768, 40960, 40961, - 40963, 40448, 40704, 0, 32768, 40960, 40961, 40963, - 40448, 40704, 40708, 0, 32768, 40960, 40961, 40963, - 40448, 40704, 40708, 0, 32768, 40960, 40961, 40963, - 40448, 40704, 40712, 40710, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 0, 32768, 40960, 40961, 40963, - 40967, 40704, 40712, 0, 32768, 40960, 40961, 40963, - 40967, 40704, 40712, 0, 32768, 40960, 40961, 40963, - 40967, 40704, 40712, 40714, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40712, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40720, 40716, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40720, 40716, 0, 32768, - 40960, 40961, 40963, 40967, 40704, 40720, 40721, 40718, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40720, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40720, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40720, 40722, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40720, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40720, - 40724, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40720, 40724, 0, 32768, 40960, 40961, 40963, 40967, - 40704, 40720, 40728, 40726, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40720, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40736, 40728, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40736, 40728, 0, 32768, - 40960, 40961, 40963, 40967, 40704, 40736, 40728, 40730, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40736, - 40728, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40736, 40737, 40732, 0, 32768, 40960, 40961, 40963, - 40967, 40704, 40736, 40737, 40732, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40736, 40737, 40732, 40734, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40736, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40736, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40736, 40738, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40736, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40736, - 40740, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40736, 40740, 0, 32768, 40960, 40961, 40963, 40967, - 40704, 40736, 40744, 40742, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40736, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40736, 40744, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40736, 40744, 0, 32768, - 40960, 40961, 40963, 40967, 40704, 40736, 40744, 40746, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40736, - 40744, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40736, 40752, 40748, 0, 32768, 40960, 40961, 40963, - 40967, 40704, 40736, 40752, 40748, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40736, 40752, 40753, 40750, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40736, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40768, - 40752, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40768, 40752, 0, 32768, 40960, 40961, 40963, 40967, - 40704, 40768, 40752, 40754, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40768, 40752, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40768, 40752, 40756, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40768, 40752, - 40756, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40768, 40752, 40760, 40758, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40768, 40752, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40768, 40769, 40760, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40768, 40769, - 40760, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40768, 40769, 40760, 40762, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40768, 40769, 40760, 0, 32768, - 40960, 40961, 40963, 40967, 40704, 40768, 40769, 40760, - 40764, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40768, 40769, 40771, 40764, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40768, 40769, 40771, 40764, 40766, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40768, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40768, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40768, 40770, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40768, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40768, - 40772, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40768, 40772, 0, 32768, 40960, 40961, 40963, 40967, - 40704, 40768, 40776, 40774, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40768, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40768, 40776, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40768, 40776, 0, 32768, - 40960, 40961, 40963, 40967, 40704, 40768, 40776, 40778, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40768, - 40776, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40768, 40784, 40780, 0, 32768, 40960, 40961, 40963, - 40967, 40704, 40768, 40784, 40780, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40768, 40784, 40785, 40782, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40768, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40768, - 40784, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40768, 40784, 0, 32768, 40960, 40961, 40963, 40967, - 40704, 40768, 40784, 40786, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40768, 40784, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40768, 40784, 40788, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40768, 40784, - 40788, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40768, 40784, 40792, 40790, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40768, 40784, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40768, 40800, 40792, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40768, 40800, - 40792, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40768, 40800, 40792, 40794, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40768, 40800, 40792, 0, 32768, - 40960, 40961, 40963, 40967, 40704, 40768, 40800, 40801, - 40796, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40768, 40800, 40801, 40796, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40768, 40800, 40801, 40796, 40798, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40768, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40832, - 40800, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40832, 40800, 0, 32768, 40960, 40961, 40963, 40967, - 40704, 40832, 40800, 40802, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40832, 40800, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40832, 40800, 40804, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40832, 40800, - 40804, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40832, 40800, 40808, 40806, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40832, 40800, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40832, 40800, 40808, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40832, 40800, - 40808, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40832, 40800, 40808, 40810, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40832, 40800, 40808, 0, 32768, - 40960, 40961, 40963, 40967, 40704, 40832, 40800, 40816, - 40812, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40832, 40800, 40816, 40812, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40832, 40800, 40816, 40817, 40814, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40832, - 40800, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40832, 40833, 40816, 0, 32768, 40960, 40961, 40963, - 40967, 40704, 40832, 40833, 40816, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40832, 40833, 40816, 40818, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40832, - 40833, 40816, 0, 32768, 40960, 40961, 40963, 40967, - 40704, 40832, 40833, 40816, 40820, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40832, 40833, 40816, 40820, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40832, - 40833, 40816, 40824, 40822, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40832, 40833, 40816, 0, 32768, - 40960, 40961, 40963, 40967, 40704, 40832, 40833, 40816, - 40824, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40832, 40833, 40835, 40824, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40832, 40833, 40835, 40824, 40826, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40832, - 40833, 40835, 40824, 0, 32768, 40960, 40961, 40963, - 40967, 40704, 40832, 40833, 40835, 40824, 40828, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40832, 40833, - 40835, 40824, 40828, 0, 32768, 40960, 40961, 40963, - 40967, 40704, 40832, 40833, 40835, 40824, 40828, 40830, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40832, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40832, 0, - 32768, 40960, 40961, 40963, 40967, 40704, 40832, 40834, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40832, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40832, - 40836, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40832, 40836, 0, 32768, 40960, 40961, 40963, 40967, - 40704, 40832, 40840, 40838, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40832, 0, 32768, 40960, 40961, - 40963, 40967, 40704, 40832, 40840, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40832, 40840, 0, 32768, - 40960, 40961, 40963, 40967, 40704, 40832, 40840, 40842, - 0, 32768, 40960, 40961, 40963, 40967, 40704, 40832, - 40840, 0, 32768, 40960, 40961, 40963, 40967, 40704, - 40832, 40848, 40844, 0, 32768, 40960, 40961, 40963, - 40967, 40704, 40832, 40848, 40844, 0, 32768, 40960, - 40961, 40963, 40967, 40704, 40832, 40848, 40849, 40846, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 40848, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40848, 0, 32768, 40960, 40961, 40963, 40967, - 40975, 40832, 40848, 40850, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40848, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40832, 40848, 40852, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40832, 40848, - 40852, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40848, 40856, 40854, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40848, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40832, 40864, 40856, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40832, 40864, - 40856, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40864, 40856, 40858, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40864, 40856, 0, 32768, - 40960, 40961, 40963, 40967, 40975, 40832, 40864, 40865, - 40860, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40864, 40865, 40860, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40864, 40865, 40860, 40862, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 40864, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40864, 0, 32768, 40960, 40961, 40963, 40967, - 40975, 40832, 40864, 40866, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40864, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40832, 40864, 40868, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40832, 40864, - 40868, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40864, 40872, 40870, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40864, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40832, 40864, 40872, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40832, 40864, - 40872, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40864, 40872, 40874, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40864, 40872, 0, 32768, - 40960, 40961, 40963, 40967, 40975, 40832, 40864, 40880, - 40876, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40864, 40880, 40876, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40864, 40880, 40881, 40878, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 40864, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40896, 40880, 0, 32768, 40960, 40961, 40963, - 40967, 40975, 40832, 40896, 40880, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40832, 40896, 40880, 40882, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 40896, 40880, 0, 32768, 40960, 40961, 40963, 40967, - 40975, 40832, 40896, 40880, 40884, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40832, 40896, 40880, 40884, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 40896, 40880, 40888, 40886, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40896, 40880, 0, 32768, - 40960, 40961, 40963, 40967, 40975, 40832, 40896, 40897, - 40888, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40896, 40897, 40888, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40896, 40897, 40888, 40890, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 40896, 40897, 40888, 0, 32768, 40960, 40961, 40963, - 40967, 40975, 40832, 40896, 40897, 40888, 40892, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40832, 40896, - 40897, 40899, 40892, 0, 32768, 40960, 40961, 40963, - 40967, 40975, 40832, 40896, 40897, 40899, 40892, 40894, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 40896, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40896, 0, 32768, 40960, 40961, 40963, 40967, - 40975, 40832, 40896, 40898, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40896, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40832, 40896, 40900, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40832, 40896, - 40900, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40896, 40904, 40902, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40896, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40832, 40896, 40904, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40832, 40896, - 40904, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40896, 40904, 40906, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40896, 40904, 0, 32768, - 40960, 40961, 40963, 40967, 40975, 40832, 40896, 40912, - 40908, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40896, 40912, 40908, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40896, 40912, 40913, 40910, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 40896, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40896, 40912, 0, 32768, 40960, 40961, 40963, - 40967, 40975, 40832, 40896, 40912, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40832, 40896, 40912, 40914, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 40896, 40912, 0, 32768, 40960, 40961, 40963, 40967, - 40975, 40832, 40896, 40912, 40916, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40832, 40896, 40912, 40916, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 40896, 40912, 40920, 40918, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40896, 40912, 0, 32768, - 40960, 40961, 40963, 40967, 40975, 40832, 40896, 40928, - 40920, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40832, 40896, 40928, 40920, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40832, 40896, 40928, 40920, 40922, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40832, - 40896, 40928, 40920, 0, 32768, 40960, 40961, 40963, - 40967, 40975, 40832, 40896, 40928, 40929, 40924, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40832, 40896, - 40928, 40929, 40924, 0, 32768, 40960, 40961, 40963, - 40967, 40975, 40832, 40896, 40928, 40929, 40924, 40926, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40991, - 40896, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40991, 40896, 40928, 0, 32768, 40960, 40961, 40963, - 40967, 40975, 40991, 40896, 40928, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40991, 40896, 40928, 40930, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40991, - 40896, 40928, 0, 32768, 40960, 40961, 40963, 40967, - 40975, 40991, 40896, 40928, 40932, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40991, 40896, 40928, 40932, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40991, - 40896, 40928, 40936, 40934, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40991, 40896, 40928, 0, 32768, - 40960, 40961, 40963, 40967, 40975, 40991, 40896, 40928, - 40936, 0, 32768, 40960, 40961, 40963, 40967, 40975, - 40991, 40896, 40928, 40936, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40991, 40896, 40928, 40936, 40938, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40991, - 40896, 40928, 40936, 0, 32768, 40960, 40961, 40963, - 40967, 40975, 40991, 40896, 40928, 40944, 40940, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40991, 40896, - 40928, 40944, 40940, 0, 32768, 40960, 40961, 40963, - 40967, 40975, 40991, 40896, 40928, 40944, 40945, 40942, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40991, - 40896, 40928, 0, 32768, 40960, 40961, 40963, 40967, - 40975, 40991, 40896, 40928, 40944, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40991, 40896, 40928, 40944, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40991, - 40896, 40928, 40944, 40946, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40991, 40896, 40928, 40944, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40991, 40896, - 40928, 40944, 40948, 0, 32768, 40960, 40961, 40963, - 40967, 40975, 40991, 40896, 40928, 40944, 40948, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40991, 40896, - 40928, 40944, 40952, 40950, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40991, 40896, 40928, 40944, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40991, 40896, - 40928, 40944, 40952, 0, 32768, 40960, 40961, 40963, - 40967, 40975, 40991, 40896, 40928, 40944, 40952, 0, - 32768, 40960, 40961, 40963, 40967, 40975, 40991, 40896, - 40928, 40944, 40952, 40954, 0, 32768, 40960, 40961, - 40963, 40967, 40975, 40991, 40896, 40928, 40944, 40952, - 0, 32768, 40960, 40961, 40963, 40967, 40975, 40991, - 40896, 40928, 40944, 40952, 40956, 0, 32768, 40960, - 40961, 40963, 40967, 40975, 40991, 40896, 40928, 40944, - 40952, 40956, 0, 32768, 40960, 40961, 40963, 40967, - 40975, 40991, 40896, 40928, 40944, 40952, 40956, 40958, - 0, 32768, 0, 32768, 40960, 0, 32768, 40960, - 0, 32768, 40960, 40962, 0, 32768, 40960, 0, - 32768, 40960, 40964, 0, 32768, 40960, 40964, 0, - 32768, 40960, 40968, 40966, 0, 32768, 40960, 0, - 32768, 40960, 40968, 0, 32768, 40960, 40968, 0, - 32768, 40960, 40968, 40970, 0, 32768, 40960, 40968, - 0, 32768, 40960, 40976, 40972, 0, 32768, 40960, - 40976, 40972, 0, 32768, 40960, 40976, 40977, 40974, - 0, 32768, 40960, 0, 32768, 40960, 40976, 0, - 32768, 40960, 40976, 0, 32768, 40960, 40976, 40978, - 0, 32768, 40960, 40976, 0, 32768, 40960, 40976, - 40980, 0, 32768, 40960, 40976, 40980, 0, 32768, - 40960, 40976, 40984, 40982, 0, 32768, 40960, 40976, - 0, 32768, 40960, 40992, 40984, 0, 32768, 40960, - 40992, 40984, 0, 32768, 40960, 40992, 40984, 40986, - 0, 32768, 40960, 40992, 40984, 0, 32768, 40960, - 40992, 40993, 40988, 0, 32768, 40960, 40992, 40993, - 40988, 0, 32768, 40960, 40992, 40993, 40988, 40990, - 0, 32768, 40960, 0, 32768, 40960, 40992, 0, - 32768, 40960, 40992, 0, 32768, 40960, 40992, 40994, - 0, 32768, 40960, 40992, 0, 32768, 40960, 40992, - 40996, 0, 32768, 40960, 40992, 40996, 0, 32768, - 40960, 40992, 41000, 40998, 0, 32768, 40960, 40992, - 0, 32768, 40960, 40992, 41000, 0, 32768, 40960, - 40992, 41000, 0, 32768, 40960, 40992, 41000, 41002, - 0, 32768, 40960, 40992, 41000, 0, 32768, 40960, - 40992, 41008, 41004, 0, 32768, 40960, 40992, 41008, - 41004, 0, 32768, 40960, 40992, 41008, 41009, 41006, - 0, 32768, 40960, 40992, 0, 32768, 40960, 41024, - 41008, 0, 32768, 40960, 41024, 41008, 0, 32768, - 40960, 41024, 41008, 41010, 0, 32768, 40960, 41024, - 41008, 0, 32768, 40960, 41024, 41008, 41012, 0, - 32768, 40960, 41024, 41008, 41012, 0, 32768, 40960, - 41024, 41008, 41016, 41014, 0, 32768, 40960, 41024, - 41008, 0, 32768, 40960, 41024, 41025, 41016, 0, - 32768, 40960, 41024, 41025, 41016, 0, 32768, 40960, - 41024, 41025, 41016, 41018, 0, 32768, 40960, 41024, - 41025, 41016, 0, 32768, 40960, 41024, 41025, 41016, - 41020, 0, 32768, 40960, 41024, 41025, 41027, 41020, - 0, 32768, 40960, 41024, 41025, 41027, 41020, 41022, - 0, 32768, 40960, 0, 32768, 40960, 41024, 0, - 32768, 40960, 41024, 0, 32768, 40960, 41024, 41026, - 0, 32768, 40960, 41024, 0, 32768, 40960, 41024, - 41028, 0, 32768, 40960, 41024, 41028, 0, 32768, - 40960, 41024, 41032, 41030, 0, 32768, 40960, 41024, - 0, 32768, 40960, 41024, 41032, 0, 32768, 40960, - 41024, 41032, 0, 32768, 40960, 41024, 41032, 41034, - 0, 32768, 40960, 41024, 41032, 0, 32768, 40960, - 41024, 41040, 41036, 0, 32768, 40960, 41024, 41040, - 41036, 0, 32768, 40960, 41024, 41040, 41041, 41038, - 0, 32768, 40960, 41024, 0, 32768, 40960, 41024, - 41040, 0, 32768, 40960, 41024, 41040, 0, 32768, - 40960, 41024, 41040, 41042, 0, 32768, 40960, 41024, - 41040, 0, 32768, 40960, 41024, 41040, 41044, 0, - 32768, 40960, 41024, 41040, 41044, 0, 32768, 40960, - 41024, 41040, 41048, 41046, 0, 32768, 40960, 41024, - 41040, 0, 32768, 40960, 41024, 41056, 41048, 0, - 32768, 40960, 41024, 41056, 41048, 0, 32768, 40960, - 41024, 41056, 41048, 41050, 0, 32768, 40960, 41024, - 41056, 41048, 0, 32768, 40960, 41024, 41056, 41057, - 41052, 0, 32768, 40960, 41024, 41056, 41057, 41052, - 0, 32768, 40960, 41024, 41056, 41057, 41052, 41054, - 0, 32768, 40960, 41024, 0, 32768, 40960, 41088, - 41056, 0, 32768, 40960, 41088, 41056, 0, 32768, - 40960, 41088, 41056, 41058, 0, 32768, 40960, 41088, - 41056, 0, 32768, 40960, 41088, 41056, 41060, 0, - 32768, 40960, 41088, 41056, 41060, 0, 32768, 40960, - 41088, 41056, 41064, 41062, 0, 32768, 40960, 41088, - 41056, 0, 32768, 40960, 41088, 41056, 41064, 0, - 32768, 40960, 41088, 41056, 41064, 0, 32768, 40960, - 41088, 41056, 41064, 41066, 0, 32768, 40960, 41088, - 41056, 41064, 0, 32768, 40960, 41088, 41056, 41072, - 41068, 0, 32768, 40960, 41088, 41056, 41072, 41068, - 0, 32768, 40960, 41088, 41056, 41072, 41073, 41070, - 0, 32768, 40960, 41088, 41056, 0, 32768, 40960, - 41088, 41089, 41072, 0, 32768, 40960, 41088, 41089, - 41072, 0, 32768, 40960, 41088, 41089, 41072, 41074, - 0, 32768, 40960, 41088, 41089, 41072, 0, 32768, - 40960, 41088, 41089, 41072, 41076, 0, 32768, 40960, - 41088, 41089, 41072, 41076, 0, 32768, 40960, 41088, - 41089, 41072, 41080, 41078, 0, 32768, 40960, 41088, - 41089, 41072, 0, 32768, 40960, 41088, 41089, 41072, - 41080, 0, 32768, 40960, 41088, 41089, 41091, 41080, - 0, 32768, 40960, 41088, 41089, 41091, 41080, 41082, - 0, 32768, 40960, 41088, 41089, 41091, 41080, 0, - 32768, 40960, 41088, 41089, 41091, 41080, 41084, 0, - 32768, 40960, 41088, 41089, 41091, 41080, 41084, 0, - 32768, 40960, 41088, 41089, 41091, 41080, 41084, 41086, - 0, 32768, 40960, 0, 32768, 40960, 41088, 0, - 32768, 40960, 41088, 0, 32768, 40960, 41088, 41090, - 0, 32768, 40960, 41088, 0, 32768, 40960, 41088, - 41092, 0, 32768, 40960, 41088, 41092, 0, 32768, - 40960, 41088, 41096, 41094, 0, 32768, 40960, 41088, - 0, 32768, 40960, 41088, 41096, 0, 32768, 40960, - 41088, 41096, 0, 32768, 40960, 41088, 41096, 41098, - 0, 32768, 40960, 41088, 41096, 0, 32768, 40960, - 41088, 41104, 41100, 0, 32768, 40960, 41088, 41104, - 41100, 0, 32768, 40960, 41088, 41104, 41105, 41102, - 0, 32768, 40960, 41088, 0, 32768, 40960, 41088, - 41104, 0, 32768, 40960, 41088, 41104, 0, 32768, - 40960, 41088, 41104, 41106, 0, 32768, 40960, 41088, - 41104, 0, 32768, 40960, 41088, 41104, 41108, 0, - 32768, 40960, 41088, 41104, 41108, 0, 32768, 40960, - 41088, 41104, 41112, 41110, 0, 32768, 40960, 41088, - 41104, 0, 32768, 40960, 41088, 41120, 41112, 0, - 32768, 40960, 41088, 41120, 41112, 0, 32768, 40960, - 41088, 41120, 41112, 41114, 0, 32768, 40960, 41088, - 41120, 41112, 0, 32768, 40960, 41088, 41120, 41121, - 41116, 0, 32768, 40960, 41088, 41120, 41121, 41116, - 0, 32768, 40960, 41088, 41120, 41121, 41116, 41118, - 0, 32768, 40960, 41088, 0, 32768, 40960, 41088, - 41120, 0, 32768, 40960, 41088, 41120, 0, 32768, - 40960, 41088, 41120, 41122, 0, 32768, 40960, 41088, - 41120, 0, 32768, 40960, 41088, 41120, 41124, 0, - 32768, 40960, 41088, 41120, 41124, 0, 32768, 40960, - 41088, 41120, 41128, 41126, 0, 32768, 40960, 41088, - 41120, 0, 32768, 40960, 41088, 41120, 41128, 0, - 32768, 40960, 41088, 41120, 41128, 0, 32768, 40960, - 41088, 41120, 41128, 41130, 0, 32768, 40960, 41088, - 41120, 41128, 0, 32768, 40960, 41088, 41120, 41136, - 41132, 0, 32768, 40960, 41088, 41120, 41136, 41132, - 0, 32768, 40960, 41088, 41120, 41136, 41137, 41134, - 0, 32768, 40960, 41088, 41120, 0, 32768, 40960, - 41088, 41152, 41136, 0, 32768, 40960, 41088, 41152, - 41136, 0, 32768, 40960, 41088, 41152, 41136, 41138, - 0, 32768, 40960, 41088, 41152, 41136, 0, 32768, - 40960, 41088, 41152, 41136, 41140, 0, 32768, 40960, - 41088, 41152, 41136, 41140, 0, 32768, 40960, 41088, - 41152, 41136, 41144, 41142, 0, 32768, 40960, 41088, - 41152, 41136, 0, 32768, 40960, 41088, 41152, 41153, - 41144, 0, 32768, 40960, 41088, 41152, 41153, 41144, - 0, 32768, 40960, 41088, 41152, 41153, 41144, 41146, - 0, 32768, 40960, 41088, 41152, 41153, 41144, 0, - 32768, 40960, 41088, 41152, 41153, 41144, 41148, 0, - 32768, 40960, 41088, 41152, 41153, 41155, 41148, 0, - 32768, 40960, 41088, 41152, 41153, 41155, 41148, 41150, - 0, 32768, 40960, 41088, 0, 32768, 40960, 41216, - 41152, 0, 32768, 40960, 41216, 41152, 0, 32768, - 40960, 41216, 41152, 41154, 0, 32768, 40960, 41216, - 41152, 0, 32768, 40960, 41216, 41152, 41156, 0, - 32768, 40960, 41216, 41152, 41156, 0, 32768, 40960, - 41216, 41152, 41160, 41158, 0, 32768, 40960, 41216, - 41152, 0, 32768, 40960, 41216, 41152, 41160, 0, - 32768, 40960, 41216, 41152, 41160, 0, 32768, 40960, - 41216, 41152, 41160, 41162, 0, 32768, 40960, 41216, - 41152, 41160, 0, 32768, 40960, 41216, 41152, 41168, - 41164, 0, 32768, 40960, 41216, 41152, 41168, 41164, - 0, 32768, 40960, 41216, 41152, 41168, 41169, 41166, - 0, 32768, 40960, 41216, 41152, 0, 32768, 40960, - 41216, 41152, 41168, 0, 32768, 40960, 41216, 41152, - 41168, 0, 32768, 40960, 41216, 41152, 41168, 41170, - 0, 32768, 40960, 41216, 41152, 41168, 0, 32768, - 40960, 41216, 41152, 41168, 41172, 0, 32768, 40960, - 41216, 41152, 41168, 41172, 0, 32768, 40960, 41216, - 41152, 41168, 41176, 41174, 0, 32768, 40960, 41216, - 41152, 41168, 0, 32768, 40960, 41216, 41152, 41184, - 41176, 0, 32768, 40960, 41216, 41152, 41184, 41176, - 0, 32768, 40960, 41216, 41152, 41184, 41176, 41178, - 0, 32768, 40960, 41216, 41152, 41184, 41176, 0, - 32768, 40960, 41216, 41152, 41184, 41185, 41180, 0, - 32768, 40960, 41216, 41152, 41184, 41185, 41180, 0, - 32768, 40960, 41216, 41152, 41184, 41185, 41180, 41182, - 0, 32768, 40960, 41216, 41152, 0, 32768, 40960, - 41216, 41217, 41184, 0, 32768, 40960, 41216, 41217, - 41184, 0, 32768, 40960, 41216, 41217, 41184, 41186, - 0, 32768, 40960, 41216, 41217, 41184, 0, 32768, - 40960, 41216, 41217, 41184, 41188, 0, 32768, 40960, - 41216, 41217, 41184, 41188, 0, 32768, 40960, 41216, - 41217, 41184, 41192, 41190, 0, 32768, 40960, 41216, - 41217, 41184, 0, 32768, 40960, 41216, 41217, 41184, - 41192, 0, 32768, 40960, 41216, 41217, 41184, 41192, - 0, 32768, 40960, 41216, 41217, 41184, 41192, 41194, - 0, 32768, 40960, 41216, 41217, 41184, 41192, 0, - 32768, 40960, 41216, 41217, 41184, 41200, 41196, 0, - 32768, 40960, 41216, 41217, 41184, 41200, 41196, 0, - 32768, 40960, 41216, 41217, 41184, 41200, 41201, 41198, - 0, 32768, 40960, 41216, 41217, 41184, 0, 32768, - 40960, 41216, 41217, 41184, 41200, 0, 32768, 40960, - 41216, 41217, 41219, 41200, 0, 32768, 40960, 41216, - 41217, 41219, 41200, 41202, 0, 32768, 40960, 41216, - 41217, 41219, 41200, 0, 32768, 40960, 41216, 41217, - 41219, 41200, 41204, 0, 32768, 40960, 41216, 41217, - 41219, 41200, 41204, 0, 32768, 40960, 41216, 41217, - 41219, 41200, 41208, 41206, 0, 32768, 40960, 41216, - 41217, 41219, 41200, 0, 32768, 40960, 41216, 41217, - 41219, 41200, 41208, 0, 32768, 40960, 41216, 41217, - 41219, 41200, 41208, 0, 32768, 40960, 41216, 41217, - 41219, 41200, 41208, 41210, 0, 32768, 40960, 41216, - 41217, 41219, 41223, 41208, 0, 32768, 40960, 41216, - 41217, 41219, 41223, 41208, 41212, 0, 32768, 40960, - 41216, 41217, 41219, 41223, 41208, 41212, 0, 32768, - 40960, 41216, 41217, 41219, 41223, 41208, 41212, 41214, - 0, 32768, 40960, 0, 32768, 40960, 41216, 0, - 32768, 40960, 41216, 0, 32768, 40960, 41216, 41218, - 0, 32768, 40960, 41216, 0, 32768, 40960, 41216, - 41220, 0, 32768, 40960, 41216, 41220, 0, 32768, - 40960, 41216, 41224, 41222, 0, 32768, 40960, 41216, - 0, 32768, 40960, 41216, 41224, 0, 32768, 40960, - 41216, 41224, 0, 32768, 40960, 41216, 41224, 41226, - 0, 32768, 40960, 41216, 41224, 0, 32768, 40960, - 41216, 41232, 41228, 0, 32768, 40960, 41216, 41232, - 41228, 0, 32768, 40960, 41216, 41232, 41233, 41230, - 0, 32768, 40960, 41216, 0, 32768, 40960, 41216, - 41232, 0, 32768, 40960, 41216, 41232, 0, 32768, - 40960, 41216, 41232, 41234, 0, 32768, 40960, 41216, - 41232, 0, 32768, 40960, 41216, 41232, 41236, 0, - 32768, 40960, 41216, 41232, 41236, 0, 32768, 40960, - 41216, 41232, 41240, 41238, 0, 32768, 40960, 41216, - 41232, 0, 32768, 40960, 41216, 41248, 41240, 0, - 32768, 40960, 41216, 41248, 41240, 0, 32768, 40960, - 41216, 41248, 41240, 41242, 0, 32768, 40960, 41216, - 41248, 41240, 0, 32768, 40960, 41216, 41248, 41249, - 41244, 0, 32768, 40960, 41216, 41248, 41249, 41244, - 0, 32768, 40960, 41216, 41248, 41249, 41244, 41246, - 0, 32768, 40960, 41216, 0, 32768, 40960, 41216, - 41248, 0, 32768, 40960, 41216, 41248, 0, 32768, - 40960, 41216, 41248, 41250, 0, 32768, 40960, 41216, - 41248, 0, 32768, 40960, 41216, 41248, 41252, 0, - 32768, 40960, 41216, 41248, 41252, 0, 32768, 40960, - 41216, 41248, 41256, 41254, 0, 32768, 40960, 41216, - 41248, 0, 32768, 40960, 41216, 41248, 41256, 0, - 32768, 40960, 41216, 41248, 41256, 0, 32768, 40960, - 41216, 41248, 41256, 41258, 0, 32768, 40960, 41216, - 41248, 41256, 0, 32768, 40960, 41216, 41248, 41264, - 41260, 0, 32768, 40960, 41216, 41248, 41264, 41260, - 0, 32768, 40960, 41216, 41248, 41264, 41265, 41262, - 0, 32768, 40960, 41216, 41248, 0, 32768, 40960, - 41216, 41280, 41264, 0, 32768, 40960, 41216, 41280, - 41264, 0, 32768, 40960, 41216, 41280, 41264, 41266, - 0, 32768, 40960, 41216, 41280, 41264, 0, 32768, - 40960, 41216, 41280, 41264, 41268, 0, 32768, 40960, - 41216, 41280, 41264, 41268, 0, 32768, 40960, 41216, - 41280, 41264, 41272, 41270, 0, 32768, 40960, 41216, - 41280, 41264, 0, 32768, 40960, 41216, 41280, 41281, - 41272, 0, 32768, 40960, 41216, 41280, 41281, 41272, - 0, 32768, 40960, 41216, 41280, 41281, 41272, 41274, - 0, 32768, 40960, 41216, 41280, 41281, 41272, 0, - 32768, 40960, 41216, 41280, 41281, 41272, 41276, 0, - 32768, 40960, 41216, 41280, 41281, 41283, 41276, 0, - 32768, 40960, 41216, 41280, 41281, 41283, 41276, 41278, - 0, 32768, 40960, 41216, 0, 32768, 40960, 41216, - 41280, 0, 32768, 40960, 41216, 41280, 0, 32768, - 40960, 41216, 41280, 41282, 0, 32768, 40960, 41216, - 41280, 0, 32768, 40960, 41216, 41280, 41284, 0, - 32768, 40960, 41216, 41280, 41284, 0, 32768, 40960, - 41216, 41280, 41288, 41286, 0, 32768, 40960, 41216, - 41280, 0, 32768, 40960, 41216, 41280, 41288, 0, - 32768, 40960, 41216, 41280, 41288, 0, 32768, 40960, - 41216, 41280, 41288, 41290, 0, 32768, 40960, 41216, - 41280, 41288, 0, 32768, 40960, 41216, 41280, 41296, - 41292, 0, 32768, 40960, 41216, 41280, 41296, 41292, - 0, 32768, 40960, 41216, 41280, 41296, 41297, 41294, - 0, 32768, 40960, 41216, 41280, 0, 32768, 40960, - 41216, 41280, 41296, 0, 32768, 40960, 41216, 41280, - 41296, 0, 32768, 40960, 41216, 41280, 41296, 41298, - 0, 32768, 40960, 41216, 41280, 41296, 0, 32768, - 40960, 41216, 41280, 41296, 41300, 0, 32768, 40960, - 41216, 41280, 41296, 41300, 0, 32768, 40960, 41216, - 41280, 41296, 41304, 41302, 0, 32768, 40960, 41216, - 41280, 41296, 0, 32768, 40960, 41216, 41280, 41312, - 41304, 0, 32768, 40960, 41216, 41280, 41312, 41304, - 0, 32768, 40960, 41216, 41280, 41312, 41304, 41306, - 0, 32768, 40960, 41216, 41280, 41312, 41304, 0, - 32768, 40960, 41216, 41280, 41312, 41313, 41308, 0, - 32768, 40960, 41216, 41280, 41312, 41313, 41308, 0, - 32768, 40960, 41216, 41280, 41312, 41313, 41308, 41310, - 0, 32768, 40960, 41216, 41280, 0, 32768, 40960, - 41216, 41344, 41312, 0, 32768, 40960, 41216, 41344, - 41312, 0, 32768, 40960, 41216, 41344, 41312, 41314, - 0, 32768, 40960, 41216, 41344, 41312, 0, 32768, - 40960, 41216, 41344, 41312, 41316, 0, 32768, 40960, - 41216, 41344, 41312, 41316, 0, 32768, 40960, 41216, - 41344, 41312, 41320, 41318, 0, 32768, 40960, 41216, - 41344, 41312, 0, 32768, 40960, 41216, 41344, 41312, - 41320, 0, 32768, 40960, 41216, 41344, 41312, 41320, - 0, 32768, 40960, 41216, 41344, 41312, 41320, 41322, - 0, 32768, 40960, 41216, 41344, 41312, 41320, 0, - 32768, 40960, 41216, 41344, 41312, 41328, 41324, 0, - 32768, 40960, 41216, 41344, 41312, 41328, 41324, 0, - 32768, 40960, 41216, 41344, 41312, 41328, 41329, 41326, - 0, 32768, 40960, 41216, 41344, 41312, 0, 32768, - 40960, 41216, 41344, 41345, 41328, 0, 32768, 40960, - 41216, 41344, 41345, 41328, 0, 32768, 40960, 41216, - 41344, 41345, 41328, 41330, 0, 32768, 40960, 41216, - 41344, 41345, 41328, 0, 32768, 40960, 41216, 41344, - 41345, 41328, 41332, 0, 32768, 40960, 41216, 41344, - 41345, 41328, 41332, 0, 32768, 40960, 41216, 41344, - 41345, 41328, 41336, 41334, 0, 32768, 40960, 41216, - 41344, 41345, 41328, 0, 32768, 40960, 41216, 41344, - 41345, 41328, 41336, 0, 32768, 40960, 41216, 41344, - 41345, 41347, 41336, 0, 32768, 40960, 41216, 41344, - 41345, 41347, 41336, 41338, 0, 32768, 40960, 41216, - 41344, 41345, 41347, 41336, 0, 32768, 40960, 41216, - 41344, 41345, 41347, 41336, 41340, 0, 32768, 40960, - 41216, 41344, 41345, 41347, 41336, 41340, 0, 32768, - 40960, 41216, 41344, 41345, 41347, 41336, 41340, 41342, - 0, 32768, 40960, 41216, 0, 32768, 40960, 41472, - 41344, 0, 32768, 40960, 41472, 41344, 0, 32768, - 40960, 41472, 41344, 41346, 0, 32768, 40960, 41472, - 41344, 0, 32768, 40960, 41472, 41344, 41348, 0, - 32768, 40960, 41472, 41344, 41348, 0, 32768, 40960, - 41472, 41344, 41352, 41350, 0, 32768, 40960, 41472, - 41344, 0, 32768, 40960, 41472, 41344, 41352, 0, - 32768, 40960, 41472, 41344, 41352, 0, 32768, 40960, - 41472, 41344, 41352, 41354, 0, 32768, 40960, 41472, - 41344, 41352, 0, 32768, 40960, 41472, 41344, 41360, - 41356, 0, 32768, 40960, 41472, 41344, 41360, 41356, - 0, 32768, 40960, 41472, 41344, 41360, 41361, 41358, - 0, 32768, 40960, 41472, 41344, 0, 32768, 40960, - 41472, 41344, 41360, 0, 32768, 40960, 41472, 41344, - 41360, 0, 32768, 40960, 41472, 41344, 41360, 41362, - 0, 32768, 40960, 41472, 41344, 41360, 0, 32768, - 40960, 41472, 41344, 41360, 41364, 0, 32768, 40960, - 41472, 41344, 41360, 41364, 0, 32768, 40960, 41472, - 41344, 41360, 41368, 41366, 0, 32768, 40960, 41472, - 41344, 41360, 0, 32768, 40960, 41472, 41344, 41376, - 41368, 0, 32768, 40960, 41472, 41344, 41376, 41368, - 0, 32768, 40960, 41472, 41344, 41376, 41368, 41370, - 0, 32768, 40960, 41472, 41344, 41376, 41368, 0, - 32768, 40960, 41472, 41344, 41376, 41377, 41372, 0, - 32768, 40960, 41472, 41344, 41376, 41377, 41372, 0, - 32768, 40960, 41472, 41344, 41376, 41377, 41372, 41374, - 0, 32768, 40960, 41472, 41344, 0, 32768, 40960, - 41472, 41344, 41376, 0, 32768, 40960, 41472, 41344, - 41376, 0, 32768, 40960, 41472, 41344, 41376, 41378, - 0, 32768, 40960, 41472, 41344, 41376, 0, 32768, - 40960, 41472, 41344, 41376, 41380, 0, 32768, 40960, - 41472, 41344, 41376, 41380, 0, 32768, 40960, 41472, - 41344, 41376, 41384, 41382, 0, 32768, 40960, 41472, - 41344, 41376, 0, 32768, 40960, 41472, 41344, 41376, - 41384, 0, 32768, 40960, 41472, 41344, 41376, 41384, - 0, 32768, 40960, 41472, 41344, 41376, 41384, 41386, - 0, 32768, 40960, 41472, 41344, 41376, 41384, 0, - 32768, 40960, 41472, 41344, 41376, 41392, 41388, 0, - 32768, 40960, 41472, 41344, 41376, 41392, 41388, 0, - 32768, 40960, 41472, 41344, 41376, 41392, 41393, 41390, - 0, 32768, 40960, 41472, 41344, 41376, 0, 32768, - 40960, 41472, 41344, 41408, 41392, 0, 32768, 40960, - 41472, 41344, 41408, 41392, 0, 32768, 40960, 41472, - 41344, 41408, 41392, 41394, 0, 32768, 40960, 41472, - 41344, 41408, 41392, 0, 32768, 40960, 41472, 41344, - 41408, 41392, 41396, 0, 32768, 40960, 41472, 41344, - 41408, 41392, 41396, 0, 32768, 40960, 41472, 41344, - 41408, 41392, 41400, 41398, 0, 32768, 40960, 41472, - 41344, 41408, 41392, 0, 32768, 40960, 41472, 41344, - 41408, 41409, 41400, 0, 32768, 40960, 41472, 41344, - 41408, 41409, 41400, 0, 32768, 40960, 41472, 41344, - 41408, 41409, 41400, 41402, 0, 32768, 40960, 41472, - 41344, 41408, 41409, 41400, 0, 32768, 40960, 41472, - 41344, 41408, 41409, 41400, 41404, 0, 32768, 40960, - 41472, 41344, 41408, 41409, 41411, 41404, 0, 32768, - 40960, 41472, 41344, 41408, 41409, 41411, 41404, 41406, - 0, 32768, 40960, 41472, 41344, 0, 32768, 40960, - 41472, 41473, 41408, 0, 32768, 40960, 41472, 41473, - 41408, 0, 32768, 40960, 41472, 41473, 41408, 41410, - 0, 32768, 40960, 41472, 41473, 41408, 0, 32768, - 40960, 41472, 41473, 41408, 41412, 0, 32768, 40960, - 41472, 41473, 41408, 41412, 0, 32768, 40960, 41472, - 41473, 41408, 41416, 41414, 0, 32768, 40960, 41472, - 41473, 41408, 0, 32768, 40960, 41472, 41473, 41408, - 41416, 0, 32768, 40960, 41472, 41473, 41408, 41416, - 0, 32768, 40960, 41472, 41473, 41408, 41416, 41418, - 0, 32768, 40960, 41472, 41473, 41408, 41416, 0, - 32768, 40960, 41472, 41473, 41408, 41424, 41420, 0, - 32768, 40960, 41472, 41473, 41408, 41424, 41420, 0, - 32768, 40960, 41472, 41473, 41408, 41424, 41425, 41422, - 0, 32768, 40960, 41472, 41473, 41408, 0, 32768, - 40960, 41472, 41473, 41408, 41424, 0, 32768, 40960, - 41472, 41473, 41408, 41424, 0, 32768, 40960, 41472, - 41473, 41408, 41424, 41426, 0, 32768, 40960, 41472, - 41473, 41408, 41424, 0, 32768, 40960, 41472, 41473, - 41408, 41424, 41428, 0, 32768, 40960, 41472, 41473, - 41408, 41424, 41428, 0, 32768, 40960, 41472, 41473, - 41408, 41424, 41432, 41430, 0, 32768, 40960, 41472, - 41473, 41408, 41424, 0, 32768, 40960, 41472, 41473, - 41408, 41440, 41432, 0, 32768, 40960, 41472, 41473, - 41408, 41440, 41432, 0, 32768, 40960, 41472, 41473, - 41408, 41440, 41432, 41434, 0, 32768, 40960, 41472, - 41473, 41408, 41440, 41432, 0, 32768, 40960, 41472, - 41473, 41408, 41440, 41441, 41436, 0, 32768, 40960, - 41472, 41473, 41408, 41440, 41441, 41436, 0, 32768, - 40960, 41472, 41473, 41408, 41440, 41441, 41436, 41438, - 0, 32768, 40960, 41472, 41473, 41408, 0, 32768, - 40960, 41472, 41473, 41408, 41440, 0, 32768, 40960, - 41472, 41473, 41475, 41440, 0, 32768, 40960, 41472, - 41473, 41475, 41440, 41442, 0, 32768, 40960, 41472, - 41473, 41475, 41440, 0, 32768, 40960, 41472, 41473, - 41475, 41440, 41444, 0, 32768, 40960, 41472, 41473, - 41475, 41440, 41444, 0, 32768, 40960, 41472, 41473, - 41475, 41440, 41448, 41446, 0, 32768, 40960, 41472, - 41473, 41475, 41440, 0, 32768, 40960, 41472, 41473, - 41475, 41440, 41448, 0, 32768, 40960, 41472, 41473, - 41475, 41440, 41448, 0, 32768, 40960, 41472, 41473, - 41475, 41440, 41448, 41450, 0, 32768, 40960, 41472, - 41473, 41475, 41440, 41448, 0, 32768, 40960, 41472, - 41473, 41475, 41440, 41456, 41452, 0, 32768, 40960, - 41472, 41473, 41475, 41440, 41456, 41452, 0, 32768, - 40960, 41472, 41473, 41475, 41440, 41456, 41457, 41454, - 0, 32768, 40960, 41472, 41473, 41475, 41440, 0, - 32768, 40960, 41472, 41473, 41475, 41440, 41456, 0, - 32768, 40960, 41472, 41473, 41475, 41440, 41456, 0, - 32768, 40960, 41472, 41473, 41475, 41440, 41456, 41458, - 0, 32768, 40960, 41472, 41473, 41475, 41479, 41456, - 0, 32768, 40960, 41472, 41473, 41475, 41479, 41456, - 41460, 0, 32768, 40960, 41472, 41473, 41475, 41479, - 41456, 41460, 0, 32768, 40960, 41472, 41473, 41475, - 41479, 41456, 41464, 41462, 0, 32768, 40960, 41472, - 41473, 41475, 41479, 41456, 0, 32768, 40960, 41472, - 41473, 41475, 41479, 41456, 41464, 0, 32768, 40960, - 41472, 41473, 41475, 41479, 41456, 41464, 0, 32768, - 40960, 41472, 41473, 41475, 41479, 41456, 41464, 41466, - 0, 32768, 40960, 41472, 41473, 41475, 41479, 41456, - 41464, 0, 32768, 40960, 41472, 41473, 41475, 41479, - 41456, 41464, 41468, 0, 32768, 40960, 41472, 41473, - 41475, 41479, 41456, 41464, 41468, 0, 32768, 40960, - 41472, 41473, 41475, 41479, 41456, 41464, 41468, 41470, - 0, 32768, 40960, 0, 32768, 40960, 41472, 0, - 32768, 40960, 41472, 0, 32768, 40960, 41472, 41474, - 0, 32768, 40960, 41472, 0, 32768, 40960, 41472, - 41476, 0, 32768, 40960, 41472, 41476, 0, 32768, - 40960, 41472, 41480, 41478, 0, 32768, 40960, 41472, - 0, 32768, 40960, 41472, 41480, 0, 32768, 40960, - 41472, 41480, 0, 32768, 40960, 41472, 41480, 41482, - 0, 32768, 40960, 41472, 41480, 0, 32768, 40960, - 41472, 41488, 41484, 0, 32768, 40960, 41472, 41488, - 41484, 0, 32768, 40960, 41472, 41488, 41489, 41486, - 0, 32768, 40960, 41472, 0, 32768, 40960, 41472, - 41488, 0, 32768, 40960, 41472, 41488, 0, 32768, - 40960, 41472, 41488, 41490, 0, 32768, 40960, 41472, - 41488, 0, 32768, 40960, 41472, 41488, 41492, 0, - 32768, 40960, 41472, 41488, 41492, 0, 32768, 40960, - 41472, 41488, 41496, 41494, 0, 32768, 40960, 41472, - 41488, 0, 32768, 40960, 41472, 41504, 41496, 0, - 32768, 40960, 41472, 41504, 41496, 0, 32768, 40960, - 41472, 41504, 41496, 41498, 0, 32768, 40960, 41472, - 41504, 41496, 0, 32768, 40960, 41472, 41504, 41505, - 41500, 0, 32768, 40960, 41472, 41504, 41505, 41500, - 0, 32768, 40960, 41472, 41504, 41505, 41500, 41502, - 0, 32768, 40960, 41472, 0, 32768, 40960, 41472, - 41504, 0, 32768, 40960, 41472, 41504, 0, 32768, - 40960, 41472, 41504, 41506, 0, 32768, 40960, 41472, - 41504, 0, 32768, 40960, 41472, 41504, 41508, 0, - 32768, 40960, 41472, 41504, 41508, 0, 32768, 40960, - 41472, 41504, 41512, 41510, 0, 32768, 40960, 41472, - 41504, 0, 32768, 40960, 41472, 41504, 41512, 0, - 32768, 40960, 41472, 41504, 41512, 0, 32768, 40960, - 41472, 41504, 41512, 41514, 0, 32768, 40960, 41472, - 41504, 41512, 0, 32768, 40960, 41472, 41504, 41520, - 41516, 0, 32768, 40960, 41472, 41504, 41520, 41516, - 0, 32768, 40960, 41472, 41504, 41520, 41521, 41518, - 0, 32768, 40960, 41472, 41504, 0, 32768, 40960, - 41472, 41536, 41520, 0, 32768, 40960, 41472, 41536, - 41520, 0, 32768, 40960, 41472, 41536, 41520, 41522, - 0, 32768, 40960, 41472, 41536, 41520, 0, 32768, - 40960, 41472, 41536, 41520, 41524, 0, 32768, 40960, - 41472, 41536, 41520, 41524, 0, 32768, 40960, 41472, - 41536, 41520, 41528, 41526, 0, 32768, 40960, 41472, - 41536, 41520, 0, 32768, 40960, 41472, 41536, 41537, - 41528, 0, 32768, 40960, 41472, 41536, 41537, 41528, - 0, 32768, 40960, 41472, 41536, 41537, 41528, 41530, - 0, 32768, 40960, 41472, 41536, 41537, 41528, 0, - 32768, 40960, 41472, 41536, 41537, 41528, 41532, 0, - 32768, 40960, 41472, 41536, 41537, 41539, 41532, 0, - 32768, 40960, 41472, 41536, 41537, 41539, 41532, 41534, - 0, 32768, 40960, 41472, 0, 32768, 40960, 41472, - 41536, 0, 32768, 40960, 41472, 41536, 0, 32768, - 40960, 41472, 41536, 41538, 0, 32768, 40960, 41472, - 41536, 0, 32768, 40960, 41472, 41536, 41540, 0, - 32768, 40960, 41472, 41536, 41540, 0, 32768, 40960, - 41472, 41536, 41544, 41542, 0, 32768, 40960, 41472, - 41536, 0, 32768, 40960, 41472, 41536, 41544, 0, - 32768, 40960, 41472, 41536, 41544, 0, 32768, 40960, - 41472, 41536, 41544, 41546, 0, 32768, 40960, 41472, - 41536, 41544, 0, 32768, 40960, 41472, 41536, 41552, - 41548, 0, 32768, 40960, 41472, 41536, 41552, 41548, - 0, 32768, 40960, 41472, 41536, 41552, 41553, 41550, - 0, 32768, 40960, 41472, 41536, 0, 32768, 40960, - 41472, 41536, 41552, 0, 32768, 40960, 41472, 41536, - 41552, 0, 32768, 40960, 41472, 41536, 41552, 41554, - 0, 32768, 40960, 41472, 41536, 41552, 0, 32768, - 40960, 41472, 41536, 41552, 41556, 0, 32768, 40960, - 41472, 41536, 41552, 41556, 0, 32768, 40960, 41472, - 41536, 41552, 41560, 41558, 0, 32768, 40960, 41472, - 41536, 41552, 0, 32768, 40960, 41472, 41536, 41568, - 41560, 0, 32768, 40960, 41472, 41536, 41568, 41560, - 0, 32768, 40960, 41472, 41536, 41568, 41560, 41562, - 0, 32768, 40960, 41472, 41536, 41568, 41560, 0, - 32768, 40960, 41472, 41536, 41568, 41569, 41564, 0, - 32768, 40960, 41472, 41536, 41568, 41569, 41564, 0, - 32768, 40960, 41472, 41536, 41568, 41569, 41564, 41566, - 0, 32768, 40960, 41472, 41536, 0, 32768, 40960, - 41472, 41600, 41568, 0, 32768, 40960, 41472, 41600, - 41568, 0, 32768, 40960, 41472, 41600, 41568, 41570, - 0, 32768, 40960, 41472, 41600, 41568, 0, 32768, - 40960, 41472, 41600, 41568, 41572, 0, 32768, 40960, - 41472, 41600, 41568, 41572, 0, 32768, 40960, 41472, - 41600, 41568, 41576, 41574, 0, 32768, 40960, 41472, - 41600, 41568, 0, 32768, 40960, 41472, 41600, 41568, - 41576, 0, 32768, 40960, 41472, 41600, 41568, 41576, - 0, 32768, 40960, 41472, 41600, 41568, 41576, 41578, - 0, 32768, 40960, 41472, 41600, 41568, 41576, 0, - 32768, 40960, 41472, 41600, 41568, 41584, 41580, 0, - 32768, 40960, 41472, 41600, 41568, 41584, 41580, 0, - 32768, 40960, 41472, 41600, 41568, 41584, 41585, 41582, - 0, 32768, 40960, 41472, 41600, 41568, 0, 32768, - 40960, 41472, 41600, 41601, 41584, 0, 32768, 40960, - 41472, 41600, 41601, 41584, 0, 32768, 40960, 41472, - 41600, 41601, 41584, 41586, 0, 32768, 40960, 41472, - 41600, 41601, 41584, 0, 32768, 40960, 41472, 41600, - 41601, 41584, 41588, 0, 32768, 40960, 41472, 41600, - 41601, 41584, 41588, 0, 32768, 40960, 41472, 41600, - 41601, 41584, 41592, 41590, 0, 32768, 40960, 41472, - 41600, 41601, 41584, 0, 32768, 40960, 41472, 41600, - 41601, 41584, 41592, 0, 32768, 40960, 41472, 41600, - 41601, 41603, 41592, 0, 32768, 40960, 41472, 41600, - 41601, 41603, 41592, 41594, 0, 32768, 40960, 41472, - 41600, 41601, 41603, 41592, 0, 32768, 40960, 41472, - 41600, 41601, 41603, 41592, 41596, 0, 32768, 40960, - 41472, 41600, 41601, 41603, 41592, 41596, 0, 32768, - 40960, 41472, 41600, 41601, 41603, 41592, 41596, 41598, - 0, 32768, 40960, 41472, 0, 32768, 40960, 41472, - 41600, 0, 32768, 40960, 41472, 41600, 0, 32768, - 40960, 41472, 41600, 41602, 0, 32768, 40960, 41472, - 41600, 0, 32768, 40960, 41472, 41600, 41604, 0, - 32768, 40960, 41472, 41600, 41604, 0, 32768, 40960, - 41472, 41600, 41608, 41606, 0, 32768, 40960, 41472, - 41600, 0, 32768, 40960, 41472, 41600, 41608, 0, - 32768, 40960, 41472, 41600, 41608, 0, 32768, 40960, - 41472, 41600, 41608, 41610, 0, 32768, 40960, 41472, - 41600, 41608, 0, 32768, 40960, 41472, 41600, 41616, - 41612, 0, 32768, 40960, 41472, 41600, 41616, 41612, - 0, 32768, 40960, 41472, 41600, 41616, 41617, 41614, - 0, 32768, 40960, 41472, 41600, 0, 32768, 40960, - 41472, 41600, 41616, 0, 32768, 40960, 41472, 41600, - 41616, 0, 32768, 40960, 41472, 41600, 41616, 41618, - 0, 32768, 40960, 41472, 41600, 41616, 0, 32768, - 40960, 41472, 41600, 41616, 41620, 0, 32768, 40960, - 41472, 41600, 41616, 41620, 0, 32768, 40960, 41472, - 41600, 41616, 41624, 41622, 0, 32768, 40960, 41472, - 41600, 41616, 0, 32768, 40960, 41472, 41600, 41632, - 41624, 0, 32768, 40960, 41472, 41600, 41632, 41624, - 0, 32768, 40960, 41472, 41600, 41632, 41624, 41626, - 0, 32768, 40960, 41472, 41600, 41632, 41624, 0, - 32768, 40960, 41472, 41600, 41632, 41633, 41628, 0, - 32768, 40960, 41472, 41600, 41632, 41633, 41628, 0, - 32768, 40960, 41472, 41600, 41632, 41633, 41628, 41630, - 0, 32768, 40960, 41472, 41600, 0, 32768, 40960, - 41472, 41600, 41632, 0, 32768, 40960, 41472, 41600, - 41632, 0, 32768, 40960, 41472, 41600, 41632, 41634, - 0, 32768, 40960, 41472, 41600, 41632, 0, 32768, - 40960, 41472, 41600, 41632, 41636, 0, 32768, 40960, - 41472, 41600, 41632, 41636, 0, 32768, 40960, 41472, - 41600, 41632, 41640, 41638, 0, 32768, 40960, 41472, - 41600, 41632, 0, 32768, 40960, 41472, 41600, 41632, - 41640, 0, 32768, 40960, 41472, 41600, 41632, 41640, - 0, 32768, 40960, 41472, 41600, 41632, 41640, 41642, - 0, 32768, 40960, 41472, 41600, 41632, 41640, 0, - 32768, 40960, 41472, 41600, 41632, 41648, 41644, 0, - 32768, 40960, 41472, 41600, 41632, 41648, 41644, 0, - 32768, 40960, 41472, 41600, 41632, 41648, 41649, 41646, - 0, 32768, 40960, 41472, 41600, 41632, 0, 32768, - 40960, 41472, 41600, 41664, 41648, 0, 32768, 40960, - 41472, 41600, 41664, 41648, 0, 32768, 40960, 41472, - 41600, 41664, 41648, 41650, 0, 32768, 40960, 41472, - 41600, 41664, 41648, 0, 32768, 40960, 41472, 41600, - 41664, 41648, 41652, 0, 32768, 40960, 41472, 41600, - 41664, 41648, 41652, 0, 32768, 40960, 41472, 41600, - 41664, 41648, 41656, 41654, 0, 32768, 40960, 41472, - 41600, 41664, 41648, 0, 32768, 40960, 41472, 41600, - 41664, 41665, 41656, 0, 32768, 40960, 41472, 41600, - 41664, 41665, 41656, 0, 32768, 40960, 41472, 41600, - 41664, 41665, 41656, 41658, 0, 32768, 40960, 41472, - 41600, 41664, 41665, 41656, 0, 32768, 40960, 41472, - 41600, 41664, 41665, 41656, 41660, 0, 32768, 40960, - 41472, 41600, 41664, 41665, 41667, 41660, 0, 32768, - 40960, 41472, 41600, 41664, 41665, 41667, 41660, 41662, - 0, 32768, 40960, 41472, 41600, 0, 32768, 40960, - 41472, 41728, 41664, 0, 32768, 40960, 41472, 41728, - 41664, 0, 32768, 40960, 41472, 41728, 41664, 41666, - 0, 32768, 40960, 41472, 41728, 41664, 0, 32768, - 40960, 41472, 41728, 41664, 41668, 0, 32768, 40960, - 41472, 41728, 41664, 41668, 0, 32768, 40960, 41472, - 41728, 41664, 41672, 41670, 0, 32768, 40960, 41472, - 41728, 41664, 0, 32768, 40960, 41472, 41728, 41664, - 41672, 0, 32768, 40960, 41472, 41728, 41664, 41672, - 0, 32768, 40960, 41472, 41728, 41664, 41672, 41674, - 0, 32768, 40960, 41472, 41728, 41664, 41672, 0, - 32768, 40960, 41472, 41728, 41664, 41680, 41676, 0, - 32768, 40960, 41472, 41728, 41664, 41680, 41676, 0, - 32768, 40960, 41472, 41728, 41664, 41680, 41681, 41678, - 0, 32768, 40960, 41472, 41728, 41664, 0, 32768, - 40960, 41472, 41728, 41664, 41680, 0, 32768, 40960, - 41472, 41728, 41664, 41680, 0, 32768, 40960, 41472, - 41728, 41664, 41680, 41682, 0, 32768, 40960, 41472, - 41728, 41664, 41680, 0, 32768, 40960, 41472, 41728, - 41664, 41680, 41684, 0, 32768, 40960, 41472, 41728, - 41664, 41680, 41684, 0, 32768, 40960, 41472, 41728, - 41664, 41680, 41688, 41686, 0, 32768, 40960, 41472, - 41728, 41664, 41680, 0, 32768, 40960, 41472, 41728, - 41664, 41696, 41688, 0, 32768, 40960, 41472, 41728, - 41664, 41696, 41688, 0, 32768, 40960, 41472, 41728, - 41664, 41696, 41688, 41690, 0, 32768, 40960, 41472, - 41728, 41664, 41696, 41688, 0, 32768, 40960, 41472, - 41728, 41664, 41696, 41697, 41692, 0, 32768, 40960, - 41472, 41728, 41664, 41696, 41697, 41692, 0, 32768, - 40960, 41472, 41728, 41664, 41696, 41697, 41692, 41694, - 0, 32768, 40960, 41472, 41728, 41664, 0, 32768, - 40960, 41472, 41728, 41729, 41696, 0, 32768, 40960, - 41472, 41728, 41729, 41696, 0, 32768, 40960, 41472, - 41728, 41729, 41696, 41698, 0, 32768, 40960, 41472, - 41728, 41729, 41696, 0, 32768, 40960, 41472, 41728, - 41729, 41696, 41700, 0, 32768, 40960, 41472, 41728, - 41729, 41696, 41700, 0, 32768, 40960, 41472, 41728, - 41729, 41696, 41704, 41702, 0, 32768, 40960, 41472, - 41728, 41729, 41696, 0, 32768, 40960, 41472, 41728, - 41729, 41696, 41704, 0, 32768, 40960, 41472, 41728, - 41729, 41696, 41704, 0, 32768, 40960, 41472, 41728, - 41729, 41696, 41704, 41706, 0, 32768, 40960, 41472, - 41728, 41729, 41696, 41704, 0, 32768, 40960, 41472, - 41728, 41729, 41696, 41712, 41708, 0, 32768, 40960, - 41472, 41728, 41729, 41696, 41712, 41708, 0, 32768, - 40960, 41472, 41728, 41729, 41696, 41712, 41713, 41710, - 0, 32768, 40960, 41472, 41728, 41729, 41696, 0, - 32768, 40960, 41472, 41728, 41729, 41696, 41712, 0, - 32768, 40960, 41472, 41728, 41729, 41731, 41712, 0, - 32768, 40960, 41472, 41728, 41729, 41731, 41712, 41714, - 0, 32768, 40960, 41472, 41728, 41729, 41731, 41712, - 0, 32768, 40960, 41472, 41728, 41729, 41731, 41712, - 41716, 0, 32768, 40960, 41472, 41728, 41729, 41731, - 41712, 41716, 0, 32768, 40960, 41472, 41728, 41729, - 41731, 41712, 41720, 41718, 0, 32768, 40960, 41472, - 41728, 41729, 41731, 41712, 0, 32768, 40960, 41472, - 41728, 41729, 41731, 41712, 41720, 0, 32768, 40960, - 41472, 41728, 41729, 41731, 41712, 41720, 0, 32768, - 40960, 41472, 41728, 41729, 41731, 41712, 41720, 41722, - 0, 32768, 40960, 41472, 41728, 41729, 41731, 41735, - 41720, 0, 32768, 40960, 41472, 41728, 41729, 41731, - 41735, 41720, 41724, 0, 32768, 40960, 41472, 41728, - 41729, 41731, 41735, 41720, 41724, 0, 32768, 40960, - 41472, 41728, 41729, 41731, 41735, 41720, 41724, 41726, - 0, 32768, 40960, 41472, 0, 32768, 40960, 41984, - 41728, 0, 32768, 40960, 41984, 41728, 0, 32768, - 40960, 41984, 41728, 41730, 0, 32768, 40960, 41984, - 41728, 0, 32768, 40960, 41984, 41728, 41732, 0, - 32768, 40960, 41984, 41728, 41732, 0, 32768, 40960, - 41984, 41728, 41736, 41734, 0, 32768, 40960, 41984, - 41728, 0, 32768, 40960, 41984, 41728, 41736, 0, - 32768, 40960, 41984, 41728, 41736, 0, 32768, 40960, - 41984, 41728, 41736, 41738, 0, 32768, 40960, 41984, - 41728, 41736, 0, 32768, 40960, 41984, 41728, 41744, - 41740, 0, 32768, 40960, 41984, 41728, 41744, 41740, - 0, 32768, 40960, 41984, 41728, 41744, 41745, 41742, - 0, 32768, 40960, 41984, 41728, 0, 32768, 40960, - 41984, 41728, 41744, 0, 32768, 40960, 41984, 41728, - 41744, 0, 32768, 40960, 41984, 41728, 41744, 41746, - 0, 32768, 40960, 41984, 41728, 41744, 0, 32768, - 40960, 41984, 41728, 41744, 41748, 0, 32768, 40960, - 41984, 41728, 41744, 41748, 0, 32768, 40960, 41984, - 41728, 41744, 41752, 41750, 0, 32768, 40960, 41984, - 41728, 41744, 0, 32768, 40960, 41984, 41728, 41760, - 41752, 0, 32768, 40960, 41984, 41728, 41760, 41752, - 0, 32768, 40960, 41984, 41728, 41760, 41752, 41754, - 0, 32768, 40960, 41984, 41728, 41760, 41752, 0, - 32768, 40960, 41984, 41728, 41760, 41761, 41756, 0, - 32768, 40960, 41984, 41728, 41760, 41761, 41756, 0, - 32768, 40960, 41984, 41728, 41760, 41761, 41756, 41758, - 0, 32768, 40960, 41984, 41728, 0, 32768, 40960, - 41984, 41728, 41760, 0, 32768, 40960, 41984, 41728, - 41760, 0, 32768, 40960, 41984, 41728, 41760, 41762, - 0, 32768, 40960, 41984, 41728, 41760, 0, 32768, - 40960, 41984, 41728, 41760, 41764, 0, 32768, 40960, - 41984, 41728, 41760, 41764, 0, 32768, 40960, 41984, - 41728, 41760, 41768, 41766, 0, 32768, 40960, 41984, - 41728, 41760, 0, 32768, 40960, 41984, 41728, 41760, - 41768, 0, 32768, 40960, 41984, 41728, 41760, 41768, - 0, 32768, 40960, 41984, 41728, 41760, 41768, 41770, - 0, 32768, 40960, 41984, 41728, 41760, 41768, 0, - 32768, 40960, 41984, 41728, 41760, 41776, 41772, 0, - 32768, 40960, 41984, 41728, 41760, 41776, 41772, 0, - 32768, 40960, 41984, 41728, 41760, 41776, 41777, 41774, - 0, 32768, 40960, 41984, 41728, 41760, 0, 32768, - 40960, 41984, 41728, 41792, 41776, 0, 32768, 40960, - 41984, 41728, 41792, 41776, 0, 32768, 40960, 41984, - 41728, 41792, 41776, 41778, 0, 32768, 40960, 41984, - 41728, 41792, 41776, 0, 32768, 40960, 41984, 41728, - 41792, 41776, 41780, 0, 32768, 40960, 41984, 41728, - 41792, 41776, 41780, 0, 32768, 40960, 41984, 41728, - 41792, 41776, 41784, 41782, 0, 32768, 40960, 41984, - 41728, 41792, 41776, 0, 32768, 40960, 41984, 41728, - 41792, 41793, 41784, 0, 32768, 40960, 41984, 41728, - 41792, 41793, 41784, 0, 32768, 40960, 41984, 41728, - 41792, 41793, 41784, 41786, 0, 32768, 40960, 41984, - 41728, 41792, 41793, 41784, 0, 32768, 40960, 41984, - 41728, 41792, 41793, 41784, 41788, 0, 32768, 40960, - 41984, 41728, 41792, 41793, 41795, 41788, 0, 32768, - 40960, 41984, 41728, 41792, 41793, 41795, 41788, 41790, - 0, 32768, 40960, 41984, 41728, 0, 32768, 40960, - 41984, 41728, 41792, 0, 32768, 40960, 41984, 41728, - 41792, 0, 32768, 40960, 41984, 41728, 41792, 41794, - 0, 32768, 40960, 41984, 41728, 41792, 0, 32768, - 40960, 41984, 41728, 41792, 41796, 0, 32768, 40960, - 41984, 41728, 41792, 41796, 0, 32768, 40960, 41984, - 41728, 41792, 41800, 41798, 0, 32768, 40960, 41984, - 41728, 41792, 0, 32768, 40960, 41984, 41728, 41792, - 41800, 0, 32768, 40960, 41984, 41728, 41792, 41800, - 0, 32768, 40960, 41984, 41728, 41792, 41800, 41802, - 0, 32768, 40960, 41984, 41728, 41792, 41800, 0, - 32768, 40960, 41984, 41728, 41792, 41808, 41804, 0, - 32768, 40960, 41984, 41728, 41792, 41808, 41804, 0, - 32768, 40960, 41984, 41728, 41792, 41808, 41809, 41806, - 0, 32768, 40960, 41984, 41728, 41792, 0, 32768, - 40960, 41984, 41728, 41792, 41808, 0, 32768, 40960, - 41984, 41728, 41792, 41808, 0, 32768, 40960, 41984, - 41728, 41792, 41808, 41810, 0, 32768, 40960, 41984, - 41728, 41792, 41808, 0, 32768, 40960, 41984, 41728, - 41792, 41808, 41812, 0, 32768, 40960, 41984, 41728, - 41792, 41808, 41812, 0, 32768, 40960, 41984, 41728, - 41792, 41808, 41816, 41814, 0, 32768, 40960, 41984, - 41728, 41792, 41808, 0, 32768, 40960, 41984, 41728, - 41792, 41824, 41816, 0, 32768, 40960, 41984, 41728, - 41792, 41824, 41816, 0, 32768, 40960, 41984, 41728, - 41792, 41824, 41816, 41818, 0, 32768, 40960, 41984, - 41728, 41792, 41824, 41816, 0, 32768, 40960, 41984, - 41728, 41792, 41824, 41825, 41820, 0, 32768, 40960, - 41984, 41728, 41792, 41824, 41825, 41820, 0, 32768, - 40960, 41984, 41728, 41792, 41824, 41825, 41820, 41822, - 0, 32768, 40960, 41984, 41728, 41792, 0, 32768, - 40960, 41984, 41728, 41856, 41824, 0, 32768, 40960, - 41984, 41728, 41856, 41824, 0, 32768, 40960, 41984, - 41728, 41856, 41824, 41826, 0, 32768, 40960, 41984, - 41728, 41856, 41824, 0, 32768, 40960, 41984, 41728, - 41856, 41824, 41828, 0, 32768, 40960, 41984, 41728, - 41856, 41824, 41828, 0, 32768, 40960, 41984, 41728, - 41856, 41824, 41832, 41830, 0, 32768, 40960, 41984, - 41728, 41856, 41824, 0, 32768, 40960, 41984, 41728, - 41856, 41824, 41832, 0, 32768, 40960, 41984, 41728, - 41856, 41824, 41832, 0, 32768, 40960, 41984, 41728, - 41856, 41824, 41832, 41834, 0, 32768, 40960, 41984, - 41728, 41856, 41824, 41832, 0, 32768, 40960, 41984, - 41728, 41856, 41824, 41840, 41836, 0, 32768, 40960, - 41984, 41728, 41856, 41824, 41840, 41836, 0, 32768, - 40960, 41984, 41728, 41856, 41824, 41840, 41841, 41838, - 0, 32768, 40960, 41984, 41728, 41856, 41824, 0, - 32768, 40960, 41984, 41728, 41856, 41857, 41840, 0, - 32768, 40960, 41984, 41728, 41856, 41857, 41840, 0, - 32768, 40960, 41984, 41728, 41856, 41857, 41840, 41842, - 0, 32768, 40960, 41984, 41728, 41856, 41857, 41840, - 0, 32768, 40960, 41984, 41728, 41856, 41857, 41840, - 41844, 0, 32768, 40960, 41984, 41728, 41856, 41857, - 41840, 41844, 0, 32768, 40960, 41984, 41728, 41856, - 41857, 41840, 41848, 41846, 0, 32768, 40960, 41984, - 41728, 41856, 41857, 41840, 0, 32768, 40960, 41984, - 41728, 41856, 41857, 41840, 41848, 0, 32768, 40960, - 41984, 41728, 41856, 41857, 41859, 41848, 0, 32768, - 40960, 41984, 41728, 41856, 41857, 41859, 41848, 41850, - 0, 32768, 40960, 41984, 41728, 41856, 41857, 41859, - 41848, 0, 32768, 40960, 41984, 41728, 41856, 41857, - 41859, 41848, 41852, 0, 32768, 40960, 41984, 41728, - 41856, 41857, 41859, 41848, 41852, 0, 32768, 40960, - 41984, 41728, 41856, 41857, 41859, 41848, 41852, 41854, - 0, 32768, 40960, 41984, 41728, 0, 32768, 40960, - 41984, 41728, 41856, 0, 32768, 40960, 41984, 41985, - 41856, 0, 32768, 40960, 41984, 41985, 41856, 41858, - 0, 32768, 40960, 41984, 41985, 41856, 0, 32768, - 40960, 41984, 41985, 41856, 41860, 0, 32768, 40960, - 41984, 41985, 41856, 41860, 0, 32768, 40960, 41984, - 41985, 41856, 41864, 41862, 0, 32768, 40960, 41984, - 41985, 41856, 0, 32768, 40960, 41984, 41985, 41856, - 41864, 0, 32768, 40960, 41984, 41985, 41856, 41864, - 0, 32768, 40960, 41984, 41985, 41856, 41864, 41866, - 0, 32768, 40960, 41984, 41985, 41856, 41864, 0, - 32768, 40960, 41984, 41985, 41856, 41872, 41868, 0, - 32768, 40960, 41984, 41985, 41856, 41872, 41868, 0, - 32768, 40960, 41984, 41985, 41856, 41872, 41873, 41870, - 0, 32768, 40960, 41984, 41985, 41856, 0, 32768, - 40960, 41984, 41985, 41856, 41872, 0, 32768, 40960, - 41984, 41985, 41856, 41872, 0, 32768, 40960, 41984, - 41985, 41856, 41872, 41874, 0, 32768, 40960, 41984, - 41985, 41856, 41872, 0, 32768, 40960, 41984, 41985, - 41856, 41872, 41876, 0, 32768, 40960, 41984, 41985, - 41856, 41872, 41876, 0, 32768, 40960, 41984, 41985, - 41856, 41872, 41880, 41878, 0, 32768, 40960, 41984, - 41985, 41856, 41872, 0, 32768, 40960, 41984, 41985, - 41856, 41888, 41880, 0, 32768, 40960, 41984, 41985, - 41856, 41888, 41880, 0, 32768, 40960, 41984, 41985, - 41856, 41888, 41880, 41882, 0, 32768, 40960, 41984, - 41985, 41856, 41888, 41880, 0, 32768, 40960, 41984, - 41985, 41856, 41888, 41889, 41884, 0, 32768, 40960, - 41984, 41985, 41856, 41888, 41889, 41884, 0, 32768, - 40960, 41984, 41985, 41856, 41888, 41889, 41884, 41886, - 0, 32768, 40960, 41984, 41985, 41856, 0, 32768, - 40960, 41984, 41985, 41856, 41888, 0, 32768, 40960, - 41984, 41985, 41856, 41888, 0, 32768, 40960, 41984, - 41985, 41856, 41888, 41890, 0, 32768, 40960, 41984, - 41985, 41856, 41888, 0, 32768, 40960, 41984, 41985, - 41856, 41888, 41892, 0, 32768, 40960, 41984, 41985, - 41856, 41888, 41892, 0, 32768, 40960, 41984, 41985, - 41856, 41888, 41896, 41894, 0, 32768, 40960, 41984, - 41985, 41856, 41888, 0, 32768, 40960, 41984, 41985, - 41856, 41888, 41896, 0, 32768, 40960, 41984, 41985, - 41856, 41888, 41896, 0, 32768, 40960, 41984, 41985, - 41856, 41888, 41896, 41898, 0, 32768, 40960, 41984, - 41985, 41856, 41888, 41896, 0, 32768, 40960, 41984, - 41985, 41856, 41888, 41904, 41900, 0, 32768, 40960, - 41984, 41985, 41856, 41888, 41904, 41900, 0, 32768, - 40960, 41984, 41985, 41856, 41888, 41904, 41905, 41902, - 0, 32768, 40960, 41984, 41985, 41856, 41888, 0, - 32768, 40960, 41984, 41985, 41856, 41920, 41904, 0, - 32768, 40960, 41984, 41985, 41856, 41920, 41904, 0, - 32768, 40960, 41984, 41985, 41856, 41920, 41904, 41906, - 0, 32768, 40960, 41984, 41985, 41856, 41920, 41904, - 0, 32768, 40960, 41984, 41985, 41856, 41920, 41904, - 41908, 0, 32768, 40960, 41984, 41985, 41856, 41920, - 41904, 41908, 0, 32768, 40960, 41984, 41985, 41856, - 41920, 41904, 41912, 41910, 0, 32768, 40960, 41984, - 41985, 41856, 41920, 41904, 0, 32768, 40960, 41984, - 41985, 41856, 41920, 41921, 41912, 0, 32768, 40960, - 41984, 41985, 41856, 41920, 41921, 41912, 0, 32768, - 40960, 41984, 41985, 41856, 41920, 41921, 41912, 41914, - 0, 32768, 40960, 41984, 41985, 41856, 41920, 41921, - 41912, 0, 32768, 40960, 41984, 41985, 41856, 41920, - 41921, 41912, 41916, 0, 32768, 40960, 41984, 41985, - 41856, 41920, 41921, 41923, 41916, 0, 32768, 40960, - 41984, 41985, 41856, 41920, 41921, 41923, 41916, 41918, - 0, 32768, 40960, 41984, 41985, 41856, 0, 32768, - 40960, 41984, 41985, 41856, 41920, 0, 32768, 40960, - 41984, 41985, 41856, 41920, 0, 32768, 40960, 41984, - 41985, 41856, 41920, 41922, 0, 32768, 40960, 41984, - 41985, 41987, 41920, 0, 32768, 40960, 41984, 41985, - 41987, 41920, 41924, 0, 32768, 40960, 41984, 41985, - 41987, 41920, 41924, 0, 32768, 40960, 41984, 41985, - 41987, 41920, 41928, 41926, 0, 32768, 40960, 41984, - 41985, 41987, 41920, 0, 32768, 40960, 41984, 41985, - 41987, 41920, 41928, 0, 32768, 40960, 41984, 41985, - 41987, 41920, 41928, 0, 32768, 40960, 41984, 41985, - 41987, 41920, 41928, 41930, 0, 32768, 40960, 41984, - 41985, 41987, 41920, 41928, 0, 32768, 40960, 41984, - 41985, 41987, 41920, 41936, 41932, 0, 32768, 40960, - 41984, 41985, 41987, 41920, 41936, 41932, 0, 32768, - 40960, 41984, 41985, 41987, 41920, 41936, 41937, 41934, - 0, 32768, 40960, 41984, 41985, 41987, 41920, 0, - 32768, 40960, 41984, 41985, 41987, 41920, 41936, 0, - 32768, 40960, 41984, 41985, 41987, 41920, 41936, 0, - 32768, 40960, 41984, 41985, 41987, 41920, 41936, 41938, - 0, 32768, 40960, 41984, 41985, 41987, 41920, 41936, - 0, 32768, 40960, 41984, 41985, 41987, 41920, 41936, - 41940, 0, 32768, 40960, 41984, 41985, 41987, 41920, - 41936, 41940, 0, 32768, 40960, 41984, 41985, 41987, - 41920, 41936, 41944, 41942, 0, 32768, 40960, 41984, - 41985, 41987, 41920, 41936, 0, 32768, 40960, 41984, - 41985, 41987, 41920, 41952, 41944, 0, 32768, 40960, - 41984, 41985, 41987, 41920, 41952, 41944, 0, 32768, - 40960, 41984, 41985, 41987, 41920, 41952, 41944, 41946, - 0, 32768, 40960, 41984, 41985, 41987, 41920, 41952, - 41944, 0, 32768, 40960, 41984, 41985, 41987, 41920, - 41952, 41953, 41948, 0, 32768, 40960, 41984, 41985, - 41987, 41920, 41952, 41953, 41948, 0, 32768, 40960, - 41984, 41985, 41987, 41920, 41952, 41953, 41948, 41950, - 0, 32768, 40960, 41984, 41985, 41987, 41920, 0, - 32768, 40960, 41984, 41985, 41987, 41920, 41952, 0, - 32768, 40960, 41984, 41985, 41987, 41920, 41952, 0, - 32768, 40960, 41984, 41985, 41987, 41920, 41952, 41954, - 0, 32768, 40960, 41984, 41985, 41987, 41920, 41952, - 0, 32768, 40960, 41984, 41985, 41987, 41920, 41952, - 41956, 0, 32768, 40960, 41984, 41985, 41987, 41920, - 41952, 41956, 0, 32768, 40960, 41984, 41985, 41987, - 41920, 41952, 41960, 41958, 0, 32768, 40960, 41984, - 41985, 41987, 41991, 41952, 0, 32768, 40960, 41984, - 41985, 41987, 41991, 41952, 41960, 0, 32768, 40960, - 41984, 41985, 41987, 41991, 41952, 41960, 0, 32768, - 40960, 41984, 41985, 41987, 41991, 41952, 41960, 41962, - 0, 32768, 40960, 41984, 41985, 41987, 41991, 41952, - 41960, 0, 32768, 40960, 41984, 41985, 41987, 41991, - 41952, 41968, 41964, 0, 32768, 40960, 41984, 41985, - 41987, 41991, 41952, 41968, 41964, 0, 32768, 40960, - 41984, 41985, 41987, 41991, 41952, 41968, 41969, 41966, - 0, 32768, 40960, 41984, 41985, 41987, 41991, 41952, - 0, 32768, 40960, 41984, 41985, 41987, 41991, 41952, - 41968, 0, 32768, 40960, 41984, 41985, 41987, 41991, - 41952, 41968, 0, 32768, 40960, 41984, 41985, 41987, - 41991, 41952, 41968, 41970, 0, 32768, 40960, 41984, - 41985, 41987, 41991, 41952, 41968, 0, 32768, 40960, - 41984, 41985, 41987, 41991, 41952, 41968, 41972, 0, - 32768, 40960, 41984, 41985, 41987, 41991, 41952, 41968, - 41972, 0, 32768, 40960, 41984, 41985, 41987, 41991, - 41952, 41968, 41976, 41974, 0, 32768, 40960, 41984, - 41985, 41987, 41991, 41952, 41968, 0, 32768, 40960, - 41984, 41985, 41987, 41991, 41952, 41968, 41976, 0, - 32768, 40960, 41984, 41985, 41987, 41991, 41952, 41968, - 41976, 0, 32768, 40960, 41984, 41985, 41987, 41991, - 41952, 41968, 41976, 41978, 0, 32768, 40960, 41984, - 41985, 41987, 41991, 41952, 41968, 41976, 0, 32768, - 40960, 41984, 41985, 41987, 41991, 41952, 41968, 41976, - 41980, 0, 32768, 40960, 41984, 41985, 41987, 41991, - 41952, 41968, 41976, 41980, 0, 32768, 40960, 41984, - 41985, 41987, 41991, 41952, 41968, 41976, 41980, 41982, - 0, 32768, 40960, 0, 32768, 40960, 41984, 0, - 32768, 40960, 41984, 0, 32768, 40960, 41984, 41986, - 0, 32768, 40960, 41984, 0, 32768, 40960, 41984, - 41988, 0, 32768, 40960, 41984, 41988, 0, 32768, - 40960, 41984, 41992, 41990, 0, 32768, 40960, 41984, - 0, 32768, 40960, 41984, 41992, 0, 32768, 40960, - 41984, 41992, 0, 32768, 40960, 41984, 41992, 41994, - 0, 32768, 40960, 41984, 41992, 0, 32768, 40960, - 41984, 42000, 41996, 0, 32768, 40960, 41984, 42000, - 41996, 0, 32768, 40960, 41984, 42000, 42001, 41998, - 0, 32768, 40960, 41984, 0, 32768, 40960, 41984, - 42000, 0, 32768, 40960, 41984, 42000, 0, 32768, - 40960, 41984, 42000, 42002, 0, 32768, 40960, 41984, - 42000, 0, 32768, 40960, 41984, 42000, 42004, 0, - 32768, 40960, 41984, 42000, 42004, 0, 32768, 40960, - 41984, 42000, 42008, 42006, 0, 32768, 40960, 41984, - 42000, 0, 32768, 40960, 41984, 42016, 42008, 0, - 32768, 40960, 41984, 42016, 42008, 0, 32768, 40960, - 41984, 42016, 42008, 42010, 0, 32768, 40960, 41984, - 42016, 42008, 0, 32768, 40960, 41984, 42016, 42017, - 42012, 0, 32768, 40960, 41984, 42016, 42017, 42012, - 0, 32768, 40960, 41984, 42016, 42017, 42012, 42014, - 0, 32768, 40960, 41984, 0, 32768, 40960, 41984, - 42016, 0, 32768, 40960, 41984, 42016, 0, 32768, - 40960, 41984, 42016, 42018, 0, 32768, 40960, 41984, - 42016, 0, 32768, 40960, 41984, 42016, 42020, 0, - 32768, 40960, 41984, 42016, 42020, 0, 32768, 40960, - 41984, 42016, 42024, 42022, 0, 32768, 40960, 41984, - 42016, 0, 32768, 40960, 41984, 42016, 42024, 0, - 32768, 40960, 41984, 42016, 42024, 0, 32768, 40960, - 41984, 42016, 42024, 42026, 0, 32768, 40960, 41984, - 42016, 42024, 0, 32768, 40960, 41984, 42016, 42032, - 42028, 0, 32768, 40960, 41984, 42016, 42032, 42028, - 0, 32768, 40960, 41984, 42016, 42032, 42033, 42030, - 0, 32768, 40960, 41984, 42016, 0, 32768, 40960, - 41984, 42048, 42032, 0, 32768, 40960, 41984, 42048, - 42032, 0, 32768, 40960, 41984, 42048, 42032, 42034, - 0, 32768, 40960, 41984, 42048, 42032, 0, 32768, - 40960, 41984, 42048, 42032, 42036, 0, 32768, 40960, - 41984, 42048, 42032, 42036, 0, 32768, 40960, 41984, - 42048, 42032, 42040, 42038, 0, 32768, 40960, 41984, - 42048, 42032, 0, 32768, 40960, 41984, 42048, 42049, - 42040, 0, 32768, 40960, 41984, 42048, 42049, 42040, - 0, 32768, 40960, 41984, 42048, 42049, 42040, 42042, - 0, 32768, 40960, 41984, 42048, 42049, 42040, 0, - 32768, 40960, 41984, 42048, 42049, 42040, 42044, 0, - 32768, 40960, 41984, 42048, 42049, 42051, 42044, 0, - 32768, 40960, 41984, 42048, 42049, 42051, 42044, 42046, - 0, 32768, 40960, 41984, 0, 32768, 40960, 41984, - 42048, 0, 32768, 40960, 41984, 42048, 0, 32768, - 40960, 41984, 42048, 42050, 0, 32768, 40960, 41984, - 42048, 0, 32768, 40960, 41984, 42048, 42052, 0, - 32768, 40960, 41984, 42048, 42052, 0, 32768, 40960, - 41984, 42048, 42056, 42054, 0, 32768, 40960, 41984, - 42048, 0, 32768, 40960, 41984, 42048, 42056, 0, - 32768, 40960, 41984, 42048, 42056, 0, 32768, 40960, - 41984, 42048, 42056, 42058, 0, 32768, 40960, 41984, - 42048, 42056, 0, 32768, 40960, 41984, 42048, 42064, - 42060, 0, 32768, 40960, 41984, 42048, 42064, 42060, - 0, 32768, 40960, 41984, 42048, 42064, 42065, 42062, - 0, 32768, 40960, 41984, 42048, 0, 32768, 40960, - 41984, 42048, 42064, 0, 32768, 40960, 41984, 42048, - 42064, 0, 32768, 40960, 41984, 42048, 42064, 42066, - 0, 32768, 40960, 41984, 42048, 42064, 0, 32768, - 40960, 41984, 42048, 42064, 42068, 0, 32768, 40960, - 41984, 42048, 42064, 42068, 0, 32768, 40960, 41984, - 42048, 42064, 42072, 42070, 0, 32768, 40960, 41984, - 42048, 42064, 0, 32768, 40960, 41984, 42048, 42080, - 42072, 0, 32768, 40960, 41984, 42048, 42080, 42072, - 0, 32768, 40960, 41984, 42048, 42080, 42072, 42074, - 0, 32768, 40960, 41984, 42048, 42080, 42072, 0, - 32768, 40960, 41984, 42048, 42080, 42081, 42076, 0, - 32768, 40960, 41984, 42048, 42080, 42081, 42076, 0, - 32768, 40960, 41984, 42048, 42080, 42081, 42076, 42078, - 0, 32768, 40960, 41984, 42048, 0, 32768, 40960, - 41984, 42112, 42080, 0, 32768, 40960, 41984, 42112, - 42080, 0, 32768, 40960, 41984, 42112, 42080, 42082, - 0, 32768, 40960, 41984, 42112, 42080, 0, 32768, - 40960, 41984, 42112, 42080, 42084, 0, 32768, 40960, - 41984, 42112, 42080, 42084, 0, 32768, 40960, 41984, - 42112, 42080, 42088, 42086, 0, 32768, 40960, 41984, - 42112, 42080, 0, 32768, 40960, 41984, 42112, 42080, - 42088, 0, 32768, 40960, 41984, 42112, 42080, 42088, - 0, 32768, 40960, 41984, 42112, 42080, 42088, 42090, - 0, 32768, 40960, 41984, 42112, 42080, 42088, 0, - 32768, 40960, 41984, 42112, 42080, 42096, 42092, 0, - 32768, 40960, 41984, 42112, 42080, 42096, 42092, 0, - 32768, 40960, 41984, 42112, 42080, 42096, 42097, 42094, - 0, 32768, 40960, 41984, 42112, 42080, 0, 32768, - 40960, 41984, 42112, 42113, 42096, 0, 32768, 40960, - 41984, 42112, 42113, 42096, 0, 32768, 40960, 41984, - 42112, 42113, 42096, 42098, 0, 32768, 40960, 41984, - 42112, 42113, 42096, 0, 32768, 40960, 41984, 42112, - 42113, 42096, 42100, 0, 32768, 40960, 41984, 42112, - 42113, 42096, 42100, 0, 32768, 40960, 41984, 42112, - 42113, 42096, 42104, 42102, 0, 32768, 40960, 41984, - 42112, 42113, 42096, 0, 32768, 40960, 41984, 42112, - 42113, 42096, 42104, 0, 32768, 40960, 41984, 42112, - 42113, 42115, 42104, 0, 32768, 40960, 41984, 42112, - 42113, 42115, 42104, 42106, 0, 32768, 40960, 41984, - 42112, 42113, 42115, 42104, 0, 32768, 40960, 41984, - 42112, 42113, 42115, 42104, 42108, 0, 32768, 40960, - 41984, 42112, 42113, 42115, 42104, 42108, 0, 32768, - 40960, 41984, 42112, 42113, 42115, 42104, 42108, 42110, - 0, 32768, 40960, 41984, 0, 32768, 40960, 41984, - 42112, 0, 32768, 40960, 41984, 42112, 0, 32768, - 40960, 41984, 42112, 42114, 0, 32768, 40960, 41984, - 42112, 0, 32768, 40960, 41984, 42112, 42116, 0, - 32768, 40960, 41984, 42112, 42116, 0, 32768, 40960, - 41984, 42112, 42120, 42118, 0, 32768, 40960, 41984, - 42112, 0, 32768, 40960, 41984, 42112, 42120, 0, - 32768, 40960, 41984, 42112, 42120, 0, 32768, 40960, - 41984, 42112, 42120, 42122, 0, 32768, 40960, 41984, - 42112, 42120, 0, 32768, 40960, 41984, 42112, 42128, - 42124, 0, 32768, 40960, 41984, 42112, 42128, 42124, - 0, 32768, 40960, 41984, 42112, 42128, 42129, 42126, - 0, 32768, 40960, 41984, 42112, 0, 32768, 40960, - 41984, 42112, 42128, 0, 32768, 40960, 41984, 42112, - 42128, 0, 32768, 40960, 41984, 42112, 42128, 42130, - 0, 32768, 40960, 41984, 42112, 42128, 0, 32768, - 40960, 41984, 42112, 42128, 42132, 0, 32768, 40960, - 41984, 42112, 42128, 42132, 0, 32768, 40960, 41984, - 42112, 42128, 42136, 42134, 0, 32768, 40960, 41984, - 42112, 42128, 0, 32768, 40960, 41984, 42112, 42144, - 42136, 0, 32768, 40960, 41984, 42112, 42144, 42136, - 0, 32768, 40960, 41984, 42112, 42144, 42136, 42138, - 0, 32768, 40960, 41984, 42112, 42144, 42136, 0, - 32768, 40960, 41984, 42112, 42144, 42145, 42140, 0, - 32768, 40960, 41984, 42112, 42144, 42145, 42140, 0, - 32768, 40960, 41984, 42112, 42144, 42145, 42140, 42142, - 0, 32768, 40960, 41984, 42112, 0, 32768, 40960, - 41984, 42112, 42144, 0, 32768, 40960, 41984, 42112, - 42144, 0, 32768, 40960, 41984, 42112, 42144, 42146, - 0, 32768, 40960, 41984, 42112, 42144, 0, 32768, - 40960, 41984, 42112, 42144, 42148, 0, 32768, 40960, - 41984, 42112, 42144, 42148, 0, 32768, 40960, 41984, - 42112, 42144, 42152, 42150, 0, 32768, 40960, 41984, - 42112, 42144, 0, 32768, 40960, 41984, 42112, 42144, - 42152, 0, 32768, 40960, 41984, 42112, 42144, 42152, - 0, 32768, 40960, 41984, 42112, 42144, 42152, 42154, - 0, 32768, 40960, 41984, 42112, 42144, 42152, 0, - 32768, 40960, 41984, 42112, 42144, 42160, 42156, 0, - 32768, 40960, 41984, 42112, 42144, 42160, 42156, 0, - 32768, 40960, 41984, 42112, 42144, 42160, 42161, 42158, - 0, 32768, 40960, 41984, 42112, 42144, 0, 32768, - 40960, 41984, 42112, 42176, 42160, 0, 32768, 40960, - 41984, 42112, 42176, 42160, 0, 32768, 40960, 41984, - 42112, 42176, 42160, 42162, 0, 32768, 40960, 41984, - 42112, 42176, 42160, 0, 32768, 40960, 41984, 42112, - 42176, 42160, 42164, 0, 32768, 40960, 41984, 42112, - 42176, 42160, 42164, 0, 32768, 40960, 41984, 42112, - 42176, 42160, 42168, 42166, 0, 32768, 40960, 41984, - 42112, 42176, 42160, 0, 32768, 40960, 41984, 42112, - 42176, 42177, 42168, 0, 32768, 40960, 41984, 42112, - 42176, 42177, 42168, 0, 32768, 40960, 41984, 42112, - 42176, 42177, 42168, 42170, 0, 32768, 40960, 41984, - 42112, 42176, 42177, 42168, 0, 32768, 40960, 41984, - 42112, 42176, 42177, 42168, 42172, 0, 32768, 40960, - 41984, 42112, 42176, 42177, 42179, 42172, 0, 32768, - 40960, 41984, 42112, 42176, 42177, 42179, 42172, 42174, - 0, 32768, 40960, 41984, 42112, 0, 32768, 40960, - 41984, 42240, 42176, 0, 32768, 40960, 41984, 42240, - 42176, 0, 32768, 40960, 41984, 42240, 42176, 42178, - 0, 32768, 40960, 41984, 42240, 42176, 0, 32768, - 40960, 41984, 42240, 42176, 42180, 0, 32768, 40960, - 41984, 42240, 42176, 42180, 0, 32768, 40960, 41984, - 42240, 42176, 42184, 42182, 0, 32768, 40960, 41984, - 42240, 42176, 0, 32768, 40960, 41984, 42240, 42176, - 42184, 0, 32768, 40960, 41984, 42240, 42176, 42184, - 0, 32768, 40960, 41984, 42240, 42176, 42184, 42186, - 0, 32768, 40960, 41984, 42240, 42176, 42184, 0, - 32768, 40960, 41984, 42240, 42176, 42192, 42188, 0, - 32768, 40960, 41984, 42240, 42176, 42192, 42188, 0, - 32768, 40960, 41984, 42240, 42176, 42192, 42193, 42190, - 0, 32768, 40960, 41984, 42240, 42176, 0, 32768, - 40960, 41984, 42240, 42176, 42192, 0, 32768, 40960, - 41984, 42240, 42176, 42192, 0, 32768, 40960, 41984, - 42240, 42176, 42192, 42194, 0, 32768, 40960, 41984, - 42240, 42176, 42192, 0, 32768, 40960, 41984, 42240, - 42176, 42192, 42196, 0, 32768, 40960, 41984, 42240, - 42176, 42192, 42196, 0, 32768, 40960, 41984, 42240, - 42176, 42192, 42200, 42198, 0, 32768, 40960, 41984, - 42240, 42176, 42192, 0, 32768, 40960, 41984, 42240, - 42176, 42208, 42200, 0, 32768, 40960, 41984, 42240, - 42176, 42208, 42200, 0, 32768, 40960, 41984, 42240, - 42176, 42208, 42200, 42202, 0, 32768, 40960, 41984, - 42240, 42176, 42208, 42200, 0, 32768, 40960, 41984, - 42240, 42176, 42208, 42209, 42204, 0, 32768, 40960, - 41984, 42240, 42176, 42208, 42209, 42204, 0, 32768, - 40960, 41984, 42240, 42176, 42208, 42209, 42204, 42206, - 0, 32768, 40960, 41984, 42240, 42176, 0, 32768, - 40960, 41984, 42240, 42241, 42208, 0, 32768, 40960, - 41984, 42240, 42241, 42208, 0, 32768, 40960, 41984, - 42240, 42241, 42208, 42210, 0, 32768, 40960, 41984, - 42240, 42241, 42208, 0, 32768, 40960, 41984, 42240, - 42241, 42208, 42212, 0, 32768, 40960, 41984, 42240, - 42241, 42208, 42212, 0, 32768, 40960, 41984, 42240, - 42241, 42208, 42216, 42214, 0, 32768, 40960, 41984, - 42240, 42241, 42208, 0, 32768, 40960, 41984, 42240, - 42241, 42208, 42216, 0, 32768, 40960, 41984, 42240, - 42241, 42208, 42216, 0, 32768, 40960, 41984, 42240, - 42241, 42208, 42216, 42218, 0, 32768, 40960, 41984, - 42240, 42241, 42208, 42216, 0, 32768, 40960, 41984, - 42240, 42241, 42208, 42224, 42220, 0, 32768, 40960, - 41984, 42240, 42241, 42208, 42224, 42220, 0, 32768, - 40960, 41984, 42240, 42241, 42208, 42224, 42225, 42222, - 0, 32768, 40960, 41984, 42240, 42241, 42208, 0, - 32768, 40960, 41984, 42240, 42241, 42208, 42224, 0, - 32768, 40960, 41984, 42240, 42241, 42243, 42224, 0, - 32768, 40960, 41984, 42240, 42241, 42243, 42224, 42226, - 0, 32768, 40960, 41984, 42240, 42241, 42243, 42224, - 0, 32768, 40960, 41984, 42240, 42241, 42243, 42224, - 42228, 0, 32768, 40960, 41984, 42240, 42241, 42243, - 42224, 42228, 0, 32768, 40960, 41984, 42240, 42241, - 42243, 42224, 42232, 42230, 0, 32768, 40960, 41984, - 42240, 42241, 42243, 42224, 0, 32768, 40960, 41984, - 42240, 42241, 42243, 42224, 42232, 0, 32768, 40960, - 41984, 42240, 42241, 42243, 42224, 42232, 0, 32768, - 40960, 41984, 42240, 42241, 42243, 42224, 42232, 42234, - 0, 32768, 40960, 41984, 42240, 42241, 42243, 42247, - 42232, 0, 32768, 40960, 41984, 42240, 42241, 42243, - 42247, 42232, 42236, 0, 32768, 40960, 41984, 42240, - 42241, 42243, 42247, 42232, 42236, 0, 32768, 40960, - 41984, 42240, 42241, 42243, 42247, 42232, 42236, 42238, - 0, 32768, 40960, 41984, 0, 32768, 40960, 41984, - 42240, 0, 32768, 40960, 41984, 42240, 0, 32768, - 40960, 41984, 42240, 42242, 0, 32768, 40960, 41984, - 42240, 0, 32768, 40960, 41984, 42240, 42244, 0, - 32768, 40960, 41984, 42240, 42244, 0, 32768, 40960, - 41984, 42240, 42248, 42246, 0, 32768, 40960, 41984, - 42240, 0, 32768, 40960, 41984, 42240, 42248, 0, - 32768, 40960, 41984, 42240, 42248, 0, 32768, 40960, - 41984, 42240, 42248, 42250, 0, 32768, 40960, 41984, - 42240, 42248, 0, 32768, 40960, 41984, 42240, 42256, - 42252, 0, 32768, 40960, 41984, 42240, 42256, 42252, - 0, 32768, 40960, 41984, 42240, 42256, 42257, 42254, - 0, 32768, 40960, 41984, 42240, 0, 32768, 40960, - 41984, 42240, 42256, 0, 32768, 40960, 41984, 42240, - 42256, 0, 32768, 40960, 41984, 42240, 42256, 42258, - 0, 32768, 40960, 41984, 42240, 42256, 0, 32768, - 40960, 41984, 42240, 42256, 42260, 0, 32768, 40960, - 41984, 42240, 42256, 42260, 0, 32768, 40960, 41984, - 42240, 42256, 42264, 42262, 0, 32768, 40960, 41984, - 42240, 42256, 0, 32768, 40960, 41984, 42240, 42272, - 42264, 0, 32768, 40960, 41984, 42240, 42272, 42264, - 0, 32768, 40960, 41984, 42240, 42272, 42264, 42266, - 0, 32768, 40960, 41984, 42240, 42272, 42264, 0, - 32768, 40960, 41984, 42240, 42272, 42273, 42268, 0, - 32768, 40960, 41984, 42240, 42272, 42273, 42268, 0, - 32768, 40960, 41984, 42240, 42272, 42273, 42268, 42270, - 0, 32768, 40960, 41984, 42240, 0, 32768, 40960, - 41984, 42240, 42272, 0, 32768, 40960, 41984, 42240, - 42272, 0, 32768, 40960, 41984, 42240, 42272, 42274, - 0, 32768, 40960, 41984, 42240, 42272, 0, 32768, - 40960, 41984, 42240, 42272, 42276, 0, 32768, 40960, - 41984, 42240, 42272, 42276, 0, 32768, 40960, 41984, - 42240, 42272, 42280, 42278, 0, 32768, 40960, 41984, - 42240, 42272, 0, 32768, 40960, 41984, 42240, 42272, - 42280, 0, 32768, 40960, 41984, 42240, 42272, 42280, - 0, 32768, 40960, 41984, 42240, 42272, 42280, 42282, - 0, 32768, 40960, 41984, 42240, 42272, 42280, 0, - 32768, 40960, 41984, 42240, 42272, 42288, 42284, 0, - 32768, 40960, 41984, 42240, 42272, 42288, 42284, 0, - 32768, 40960, 41984, 42240, 42272, 42288, 42289, 42286, - 0, 32768, 40960, 41984, 42240, 42272, 0, 32768, - 40960, 41984, 42240, 42304, 42288, 0, 32768, 40960, - 41984, 42240, 42304, 42288, 0, 32768, 40960, 41984, - 42240, 42304, 42288, 42290, 0, 32768, 40960, 41984, - 42240, 42304, 42288, 0, 32768, 40960, 41984, 42240, - 42304, 42288, 42292, 0, 32768, 40960, 41984, 42240, - 42304, 42288, 42292, 0, 32768, 40960, 41984, 42240, - 42304, 42288, 42296, 42294, 0, 32768, 40960, 41984, - 42240, 42304, 42288, 0, 32768, 40960, 41984, 42240, - 42304, 42305, 42296, 0, 32768, 40960, 41984, 42240, - 42304, 42305, 42296, 0, 32768, 40960, 41984, 42240, - 42304, 42305, 42296, 42298, 0, 32768, 40960, 41984, - 42240, 42304, 42305, 42296, 0, 32768, 40960, 41984, - 42240, 42304, 42305, 42296, 42300, 0, 32768, 40960, - 41984, 42240, 42304, 42305, 42307, 42300, 0, 32768, - 40960, 41984, 42240, 42304, 42305, 42307, 42300, 42302, - 0, 32768, 40960, 41984, 42240, 0, 32768, 40960, - 41984, 42240, 42304, 0, 32768, 40960, 41984, 42240, - 42304, 0, 32768, 40960, 41984, 42240, 42304, 42306, - 0, 32768, 40960, 41984, 42240, 42304, 0, 32768, - 40960, 41984, 42240, 42304, 42308, 0, 32768, 40960, - 41984, 42240, 42304, 42308, 0, 32768, 40960, 41984, - 42240, 42304, 42312, 42310, 0, 32768, 40960, 41984, - 42240, 42304, 0, 32768, 40960, 41984, 42240, 42304, - 42312, 0, 32768, 40960, 41984, 42240, 42304, 42312, - 0, 32768, 40960, 41984, 42240, 42304, 42312, 42314, - 0, 32768, 40960, 41984, 42240, 42304, 42312, 0, - 32768, 40960, 41984, 42240, 42304, 42320, 42316, 0, - 32768, 40960, 41984, 42240, 42304, 42320, 42316, 0, - 32768, 40960, 41984, 42240, 42304, 42320, 42321, 42318, - 0, 32768, 40960, 41984, 42240, 42304, 0, 32768, - 40960, 41984, 42240, 42304, 42320, 0, 32768, 40960, - 41984, 42240, 42304, 42320, 0, 32768, 40960, 41984, - 42240, 42304, 42320, 42322, 0, 32768, 40960, 41984, - 42240, 42304, 42320, 0, 32768, 40960, 41984, 42240, - 42304, 42320, 42324, 0, 32768, 40960, 41984, 42240, - 42304, 42320, 42324, 0, 32768, 40960, 41984, 42240, - 42304, 42320, 42328, 42326, 0, 32768, 40960, 41984, - 42240, 42304, 42320, 0, 32768, 40960, 41984, 42240, - 42304, 42336, 42328, 0, 32768, 40960, 41984, 42240, - 42304, 42336, 42328, 0, 32768, 40960, 41984, 42240, - 42304, 42336, 42328, 42330, 0, 32768, 40960, 41984, - 42240, 42304, 42336, 42328, 0, 32768, 40960, 41984, - 42240, 42304, 42336, 42337, 42332, 0, 32768, 40960, - 41984, 42240, 42304, 42336, 42337, 42332, 0, 32768, - 40960, 41984, 42240, 42304, 42336, 42337, 42332, 42334, - 0, 32768, 40960, 41984, 42240, 42304, 0, 32768, - 40960, 41984, 42240, 42368, 42336, 0, 32768, 40960, - 41984, 42240, 42368, 42336, 0, 32768, 40960, 41984, - 42240, 42368, 42336, 42338, 0, 32768, 40960, 41984, - 42240, 42368, 42336, 0, 32768, 40960, 41984, 42240, - 42368, 42336, 42340, 0, 32768, 40960, 41984, 42240, - 42368, 42336, 42340, 0, 32768, 40960, 41984, 42240, - 42368, 42336, 42344, 42342, 0, 32768, 40960, 41984, - 42240, 42368, 42336, 0, 32768, 40960, 41984, 42240, - 42368, 42336, 42344, 0, 32768, 40960, 41984, 42240, - 42368, 42336, 42344, 0, 32768, 40960, 41984, 42240, - 42368, 42336, 42344, 42346, 0, 32768, 40960, 41984, - 42240, 42368, 42336, 42344, 0, 32768, 40960, 41984, - 42240, 42368, 42336, 42352, 42348, 0, 32768, 40960, - 41984, 42240, 42368, 42336, 42352, 42348, 0, 32768, - 40960, 41984, 42240, 42368, 42336, 42352, 42353, 42350, - 0, 32768, 40960, 41984, 42240, 42368, 42336, 0, - 32768, 40960, 41984, 42240, 42368, 42369, 42352, 0, - 32768, 40960, 41984, 42240, 42368, 42369, 42352, 0, - 32768, 40960, 41984, 42240, 42368, 42369, 42352, 42354, - 0, 32768, 40960, 41984, 42240, 42368, 42369, 42352, - 0, 32768, 40960, 41984, 42240, 42368, 42369, 42352, - 42356, 0, 32768, 40960, 41984, 42240, 42368, 42369, - 42352, 42356, 0, 32768, 40960, 41984, 42240, 42368, - 42369, 42352, 42360, 42358, 0, 32768, 40960, 41984, - 42240, 42368, 42369, 42352, 0, 32768, 40960, 41984, - 42240, 42368, 42369, 42352, 42360, 0, 32768, 40960, - 41984, 42240, 42368, 42369, 42371, 42360, 0, 32768, - 40960, 41984, 42240, 42368, 42369, 42371, 42360, 42362, - 0, 32768, 40960, 41984, 42240, 42368, 42369, 42371, - 42360, 0, 32768, 40960, 41984, 42240, 42368, 42369, - 42371, 42360, 42364, 0, 32768, 40960, 41984, 42240, - 42368, 42369, 42371, 42360, 42364, 0, 32768, 40960, - 41984, 42240, 42368, 42369, 42371, 42360, 42364, 42366, - 0, 32768, 40960, 41984, 42240, 0, 32768, 40960, - 41984, 42496, 42368, 0, 32768, 40960, 41984, 42496, - 42368, 0, 32768, 40960, 41984, 42496, 42368, 42370, - 0, 32768, 40960, 41984, 42496, 42368, 0, 32768, - 40960, 41984, 42496, 42368, 42372, 0, 32768, 40960, - 41984, 42496, 42368, 42372, 0, 32768, 40960, 41984, - 42496, 42368, 42376, 42374, 0, 32768, 40960, 41984, - 42496, 42368, 0, 32768, 40960, 41984, 42496, 42368, - 42376, 0, 32768, 40960, 41984, 42496, 42368, 42376, - 0, 32768, 40960, 41984, 42496, 42368, 42376, 42378, - 0, 32768, 40960, 41984, 42496, 42368, 42376, 0, - 32768, 40960, 41984, 42496, 42368, 42384, 42380, 0, - 32768, 40960, 41984, 42496, 42368, 42384, 42380, 0, - 32768, 40960, 41984, 42496, 42368, 42384, 42385, 42382, - 0, 32768, 40960, 41984, 42496, 42368, 0, 32768, - 40960, 41984, 42496, 42368, 42384, 0, 32768, 40960, - 41984, 42496, 42368, 42384, 0, 32768, 40960, 41984, - 42496, 42368, 42384, 42386, 0, 32768, 40960, 41984, - 42496, 42368, 42384, 0, 32768, 40960, 41984, 42496, - 42368, 42384, 42388, 0, 32768, 40960, 41984, 42496, - 42368, 42384, 42388, 0, 32768, 40960, 41984, 42496, - 42368, 42384, 42392, 42390, 0, 32768, 40960, 41984, - 42496, 42368, 42384, 0, 32768, 40960, 41984, 42496, - 42368, 42400, 42392, 0, 32768, 40960, 41984, 42496, - 42368, 42400, 42392, 0, 32768, 40960, 41984, 42496, - 42368, 42400, 42392, 42394, 0, 32768, 40960, 41984, - 42496, 42368, 42400, 42392, 0, 32768, 40960, 41984, - 42496, 42368, 42400, 42401, 42396, 0, 32768, 40960, - 41984, 42496, 42368, 42400, 42401, 42396, 0, 32768, - 40960, 41984, 42496, 42368, 42400, 42401, 42396, 42398, - 0, 32768, 40960, 41984, 42496, 42368, 0, 32768, - 40960, 41984, 42496, 42368, 42400, 0, 32768, 40960, - 41984, 42496, 42368, 42400, 0, 32768, 40960, 41984, - 42496, 42368, 42400, 42402, 0, 32768, 40960, 41984, - 42496, 42368, 42400, 0, 32768, 40960, 41984, 42496, - 42368, 42400, 42404, 0, 32768, 40960, 41984, 42496, - 42368, 42400, 42404, 0, 32768, 40960, 41984, 42496, - 42368, 42400, 42408, 42406, 0, 32768, 40960, 41984, - 42496, 42368, 42400, 0, 32768, 40960, 41984, 42496, - 42368, 42400, 42408, 0, 32768, 40960, 41984, 42496, - 42368, 42400, 42408, 0, 32768, 40960, 41984, 42496, - 42368, 42400, 42408, 42410, 0, 32768, 40960, 41984, - 42496, 42368, 42400, 42408, 0, 32768, 40960, 41984, - 42496, 42368, 42400, 42416, 42412, 0, 32768, 40960, - 41984, 42496, 42368, 42400, 42416, 42412, 0, 32768, - 40960, 41984, 42496, 42368, 42400, 42416, 42417, 42414, - 0, 32768, 40960, 41984, 42496, 42368, 42400, 0, - 32768, 40960, 41984, 42496, 42368, 42432, 42416, 0, - 32768, 40960, 41984, 42496, 42368, 42432, 42416, 0, - 32768, 40960, 41984, 42496, 42368, 42432, 42416, 42418, - 0, 32768, 40960, 41984, 42496, 42368, 42432, 42416, - 0, 32768, 40960, 41984, 42496, 42368, 42432, 42416, - 42420, 0, 32768, 40960, 41984, 42496, 42368, 42432, - 42416, 42420, 0, 32768, 40960, 41984, 42496, 42368, - 42432, 42416, 42424, 42422, 0, 32768, 40960, 41984, - 42496, 42368, 42432, 42416, 0, 32768, 40960, 41984, - 42496, 42368, 42432, 42433, 42424, 0, 32768, 40960, - 41984, 42496, 42368, 42432, 42433, 42424, 0, 32768, - 40960, 41984, 42496, 42368, 42432, 42433, 42424, 42426, - 0, 32768, 40960, 41984, 42496, 42368, 42432, 42433, - 42424, 0, 32768, 40960, 41984, 42496, 42368, 42432, - 42433, 42424, 42428, 0, 32768, 40960, 41984, 42496, - 42368, 42432, 42433, 42435, 42428, 0, 32768, 40960, - 41984, 42496, 42368, 42432, 42433, 42435, 42428, 42430, - 0, 32768, 40960, 41984, 42496, 42368, 0, 32768, - 40960, 41984, 42496, 42497, 42432, 0, 32768, 40960, - 41984, 42496, 42497, 42432, 0, 32768, 40960, 41984, - 42496, 42497, 42432, 42434, 0, 32768, 40960, 41984, - 42496, 42497, 42432, 0, 32768, 40960, 41984, 42496, - 42497, 42432, 42436, 0, 32768, 40960, 41984, 42496, - 42497, 42432, 42436, 0, 32768, 40960, 41984, 42496, - 42497, 42432, 42440, 42438, 0, 32768, 40960, 41984, - 42496, 42497, 42432, 0, 32768, 40960, 41984, 42496, - 42497, 42432, 42440, 0, 32768, 40960, 41984, 42496, - 42497, 42432, 42440, 0, 32768, 40960, 41984, 42496, - 42497, 42432, 42440, 42442, 0, 32768, 40960, 41984, - 42496, 42497, 42432, 42440, 0, 32768, 40960, 41984, - 42496, 42497, 42432, 42448, 42444, 0, 32768, 40960, - 41984, 42496, 42497, 42432, 42448, 42444, 0, 32768, - 40960, 41984, 42496, 42497, 42432, 42448, 42449, 42446, - 0, 32768, 40960, 41984, 42496, 42497, 42432, 0, - 32768, 40960, 41984, 42496, 42497, 42432, 42448, 0, - 32768, 40960, 41984, 42496, 42497, 42432, 42448, 0, - 32768, 40960, 41984, 42496, 42497, 42432, 42448, 42450, - 0, 32768, 40960, 41984, 42496, 42497, 42432, 42448, - 0, 32768, 40960, 41984, 42496, 42497, 42432, 42448, - 42452, 0, 32768, 40960, 41984, 42496, 42497, 42432, - 42448, 42452, 0, 32768, 40960, 41984, 42496, 42497, - 42432, 42448, 42456, 42454, 0, 32768, 40960, 41984, - 42496, 42497, 42432, 42448, 0, 32768, 40960, 41984, - 42496, 42497, 42432, 42464, 42456, 0, 32768, 40960, - 41984, 42496, 42497, 42432, 42464, 42456, 0, 32768, - 40960, 41984, 42496, 42497, 42432, 42464, 42456, 42458, - 0, 32768, 40960, 41984, 42496, 42497, 42432, 42464, - 42456, 0, 32768, 40960, 41984, 42496, 42497, 42432, - 42464, 42465, 42460, 0, 32768, 40960, 41984, 42496, - 42497, 42432, 42464, 42465, 42460, 0, 32768, 40960, - 41984, 42496, 42497, 42432, 42464, 42465, 42460, 42462, - 0, 32768, 40960, 41984, 42496, 42497, 42432, 0, - 32768, 40960, 41984, 42496, 42497, 42432, 42464, 0, - 32768, 40960, 41984, 42496, 42497, 42499, 42464, 0, - 32768, 40960, 41984, 42496, 42497, 42499, 42464, 42466, - 0, 32768, 40960, 41984, 42496, 42497, 42499, 42464, - 0, 32768, 40960, 41984, 42496, 42497, 42499, 42464, - 42468, 0, 32768, 40960, 41984, 42496, 42497, 42499, - 42464, 42468, 0, 32768, 40960, 41984, 42496, 42497, - 42499, 42464, 42472, 42470, 0, 32768, 40960, 41984, - 42496, 42497, 42499, 42464, 0, 32768, 40960, 41984, - 42496, 42497, 42499, 42464, 42472, 0, 32768, 40960, - 41984, 42496, 42497, 42499, 42464, 42472, 0, 32768, - 40960, 41984, 42496, 42497, 42499, 42464, 42472, 42474, - 0, 32768, 40960, 41984, 42496, 42497, 42499, 42464, - 42472, 0, 32768, 40960, 41984, 42496, 42497, 42499, - 42464, 42480, 42476, 0, 32768, 40960, 41984, 42496, - 42497, 42499, 42464, 42480, 42476, 0, 32768, 40960, - 41984, 42496, 42497, 42499, 42464, 42480, 42481, 42478, - 0, 32768, 40960, 41984, 42496, 42497, 42499, 42464, - 0, 32768, 40960, 41984, 42496, 42497, 42499, 42464, - 42480, 0, 32768, 40960, 41984, 42496, 42497, 42499, - 42464, 42480, 0, 32768, 40960, 41984, 42496, 42497, - 42499, 42464, 42480, 42482, 0, 32768, 40960, 41984, - 42496, 42497, 42499, 42503, 42480, 0, 32768, 40960, - 41984, 42496, 42497, 42499, 42503, 42480, 42484, 0, - 32768, 40960, 41984, 42496, 42497, 42499, 42503, 42480, - 42484, 0, 32768, 40960, 41984, 42496, 42497, 42499, - 42503, 42480, 42488, 42486, 0, 32768, 40960, 41984, - 42496, 42497, 42499, 42503, 42480, 0, 32768, 40960, - 41984, 42496, 42497, 42499, 42503, 42480, 42488, 0, - 32768, 40960, 41984, 42496, 42497, 42499, 42503, 42480, - 42488, 0, 32768, 40960, 41984, 42496, 42497, 42499, - 42503, 42480, 42488, 42490, 0, 32768, 40960, 41984, - 42496, 42497, 42499, 42503, 42480, 42488, 0, 32768, - 40960, 41984, 42496, 42497, 42499, 42503, 42480, 42488, - 42492, 0, 32768, 40960, 41984, 42496, 42497, 42499, - 42503, 42480, 42488, 42492, 0, 32768, 40960, 41984, - 42496, 42497, 42499, 42503, 42480, 42488, 42492, 42494, - 0, 32768, 40960, 41984, 0, 32768, 40960, 43008, - 42496, 0, 32768, 40960, 43008, 42496, 0, 32768, - 40960, 43008, 42496, 42498, 0, 32768, 40960, 43008, - 42496, 0, 32768, 40960, 43008, 42496, 42500, 0, - 32768, 40960, 43008, 42496, 42500, 0, 32768, 40960, - 43008, 42496, 42504, 42502, 0, 32768, 40960, 43008, - 42496, 0, 32768, 40960, 43008, 42496, 42504, 0, - 32768, 40960, 43008, 42496, 42504, 0, 32768, 40960, - 43008, 42496, 42504, 42506, 0, 32768, 40960, 43008, - 42496, 42504, 0, 32768, 40960, 43008, 42496, 42512, - 42508, 0, 32768, 40960, 43008, 42496, 42512, 42508, - 0, 32768, 40960, 43008, 42496, 42512, 42513, 42510, - 0, 32768, 40960, 43008, 42496, 0, 32768, 40960, - 43008, 42496, 42512, 0, 32768, 40960, 43008, 42496, - 42512, 0, 32768, 40960, 43008, 42496, 42512, 42514, - 0, 32768, 40960, 43008, 42496, 42512, 0, 32768, - 40960, 43008, 42496, 42512, 42516, 0, 32768, 40960, - 43008, 42496, 42512, 42516, 0, 32768, 40960, 43008, - 42496, 42512, 42520, 42518, 0, 32768, 40960, 43008, - 42496, 42512, 0, 32768, 40960, 43008, 42496, 42528, - 42520, 0, 32768, 40960, 43008, 42496, 42528, 42520, - 0, 32768, 40960, 43008, 42496, 42528, 42520, 42522, - 0, 32768, 40960, 43008, 42496, 42528, 42520, 0, - 32768, 40960, 43008, 42496, 42528, 42529, 42524, 0, - 32768, 40960, 43008, 42496, 42528, 42529, 42524, 0, - 32768, 40960, 43008, 42496, 42528, 42529, 42524, 42526, - 0, 32768, 40960, 43008, 42496, 0, 32768, 40960, - 43008, 42496, 42528, 0, 32768, 40960, 43008, 42496, - 42528, 0, 32768, 40960, 43008, 42496, 42528, 42530, - 0, 32768, 40960, 43008, 42496, 42528, 0, 32768, - 40960, 43008, 42496, 42528, 42532, 0, 32768, 40960, - 43008, 42496, 42528, 42532, 0, 32768, 40960, 43008, - 42496, 42528, 42536, 42534, 0, 32768, 40960, 43008, - 42496, 42528, 0, 32768, 40960, 43008, 42496, 42528, - 42536, 0, 32768, 40960, 43008, 42496, 42528, 42536, - 0, 32768, 40960, 43008, 42496, 42528, 42536, 42538, - 0, 32768, 40960, 43008, 42496, 42528, 42536, 0, - 32768, 40960, 43008, 42496, 42528, 42544, 42540, 0, - 32768, 40960, 43008, 42496, 42528, 42544, 42540, 0, - 32768, 40960, 43008, 42496, 42528, 42544, 42545, 42542, - 0, 32768, 40960, 43008, 42496, 42528, 0, 32768, - 40960, 43008, 42496, 42560, 42544, 0, 32768, 40960, - 43008, 42496, 42560, 42544, 0, 32768, 40960, 43008, - 42496, 42560, 42544, 42546, 0, 32768, 40960, 43008, - 42496, 42560, 42544, 0, 32768, 40960, 43008, 42496, - 42560, 42544, 42548, 0, 32768, 40960, 43008, 42496, - 42560, 42544, 42548, 0, 32768, 40960, 43008, 42496, - 42560, 42544, 42552, 42550, 0, 32768, 40960, 43008, - 42496, 42560, 42544, 0, 32768, 40960, 43008, 42496, - 42560, 42561, 42552, 0, 32768, 40960, 43008, 42496, - 42560, 42561, 42552, 0, 32768, 40960, 43008, 42496, - 42560, 42561, 42552, 42554, 0, 32768, 40960, 43008, - 42496, 42560, 42561, 42552, 0, 32768, 40960, 43008, - 42496, 42560, 42561, 42552, 42556, 0, 32768, 40960, - 43008, 42496, 42560, 42561, 42563, 42556, 0, 32768, - 40960, 43008, 42496, 42560, 42561, 42563, 42556, 42558, - 0, 32768, 40960, 43008, 42496, 0, 32768, 40960, - 43008, 42496, 42560, 0, 32768, 40960, 43008, 42496, - 42560, 0, 32768, 40960, 43008, 42496, 42560, 42562, - 0, 32768, 40960, 43008, 42496, 42560, 0, 32768, - 40960, 43008, 42496, 42560, 42564, 0, 32768, 40960, - 43008, 42496, 42560, 42564, 0, 32768, 40960, 43008, - 42496, 42560, 42568, 42566, 0, 32768, 40960, 43008, - 42496, 42560, 0, 32768, 40960, 43008, 42496, 42560, - 42568, 0, 32768, 40960, 43008, 42496, 42560, 42568, - 0, 32768, 40960, 43008, 42496, 42560, 42568, 42570, - 0, 32768, 40960, 43008, 42496, 42560, 42568, 0, - 32768, 40960, 43008, 42496, 42560, 42576, 42572, 0, - 32768, 40960, 43008, 42496, 42560, 42576, 42572, 0, - 32768, 40960, 43008, 42496, 42560, 42576, 42577, 42574, - 0, 32768, 40960, 43008, 42496, 42560, 0, 32768, - 40960, 43008, 42496, 42560, 42576, 0, 32768, 40960, - 43008, 42496, 42560, 42576, 0, 32768, 40960, 43008, - 42496, 42560, 42576, 42578, 0, 32768, 40960, 43008, - 42496, 42560, 42576, 0, 32768, 40960, 43008, 42496, - 42560, 42576, 42580, 0, 32768, 40960, 43008, 42496, - 42560, 42576, 42580, 0, 32768, 40960, 43008, 42496, - 42560, 42576, 42584, 42582, 0, 32768, 40960, 43008, - 42496, 42560, 42576, 0, 32768, 40960, 43008, 42496, - 42560, 42592, 42584, 0, 32768, 40960, 43008, 42496, - 42560, 42592, 42584, 0, 32768, 40960, 43008, 42496, - 42560, 42592, 42584, 42586, 0, 32768, 40960, 43008, - 42496, 42560, 42592, 42584, 0, 32768, 40960, 43008, - 42496, 42560, 42592, 42593, 42588, 0, 32768, 40960, - 43008, 42496, 42560, 42592, 42593, 42588, 0, 32768, - 40960, 43008, 42496, 42560, 42592, 42593, 42588, 42590, - 0, 32768, 40960, 43008, 42496, 42560, 0, 32768, - 40960, 43008, 42496, 42624, 42592, 0, 32768, 40960, - 43008, 42496, 42624, 42592, 0, 32768, 40960, 43008, - 42496, 42624, 42592, 42594, 0, 32768, 40960, 43008, - 42496, 42624, 42592, 0, 32768, 40960, 43008, 42496, - 42624, 42592, 42596, 0, 32768, 40960, 43008, 42496, - 42624, 42592, 42596, 0, 32768, 40960, 43008, 42496, - 42624, 42592, 42600, 42598, 0, 32768, 40960, 43008, - 42496, 42624, 42592, 0, 32768, 40960, 43008, 42496, - 42624, 42592, 42600, 0, 32768, 40960, 43008, 42496, - 42624, 42592, 42600, 0, 32768, 40960, 43008, 42496, - 42624, 42592, 42600, 42602, 0, 32768, 40960, 43008, - 42496, 42624, 42592, 42600, 0, 32768, 40960, 43008, - 42496, 42624, 42592, 42608, 42604, 0, 32768, 40960, - 43008, 42496, 42624, 42592, 42608, 42604, 0, 32768, - 40960, 43008, 42496, 42624, 42592, 42608, 42609, 42606, - 0, 32768, 40960, 43008, 42496, 42624, 42592, 0, - 32768, 40960, 43008, 42496, 42624, 42625, 42608, 0, - 32768, 40960, 43008, 42496, 42624, 42625, 42608, 0, - 32768, 40960, 43008, 42496, 42624, 42625, 42608, 42610, - 0, 32768, 40960, 43008, 42496, 42624, 42625, 42608, - 0, 32768, 40960, 43008, 42496, 42624, 42625, 42608, - 42612, 0, 32768, 40960, 43008, 42496, 42624, 42625, - 42608, 42612, 0, 32768, 40960, 43008, 42496, 42624, - 42625, 42608, 42616, 42614, 0, 32768, 40960, 43008, - 42496, 42624, 42625, 42608, 0, 32768, 40960, 43008, - 42496, 42624, 42625, 42608, 42616, 0, 32768, 40960, - 43008, 42496, 42624, 42625, 42627, 42616, 0, 32768, - 40960, 43008, 42496, 42624, 42625, 42627, 42616, 42618, - 0, 32768, 40960, 43008, 42496, 42624, 42625, 42627, - 42616, 0, 32768, 40960, 43008, 42496, 42624, 42625, - 42627, 42616, 42620, 0, 32768, 40960, 43008, 42496, - 42624, 42625, 42627, 42616, 42620, 0, 32768, 40960, - 43008, 42496, 42624, 42625, 42627, 42616, 42620, 42622, - 0, 32768, 40960, 43008, 42496, 0, 32768, 40960, - 43008, 42496, 42624, 0, 32768, 40960, 43008, 42496, - 42624, 0, 32768, 40960, 43008, 42496, 42624, 42626, - 0, 32768, 40960, 43008, 42496, 42624, 0, 32768, - 40960, 43008, 42496, 42624, 42628, 0, 32768, 40960, - 43008, 42496, 42624, 42628, 0, 32768, 40960, 43008, - 42496, 42624, 42632, 42630, 0, 32768, 40960, 43008, - 42496, 42624, 0, 32768, 40960, 43008, 42496, 42624, - 42632, 0, 32768, 40960, 43008, 42496, 42624, 42632, - 0, 32768, 40960, 43008, 42496, 42624, 42632, 42634, - 0, 32768, 40960, 43008, 42496, 42624, 42632, 0, - 32768, 40960, 43008, 42496, 42624, 42640, 42636, 0, - 32768, 40960, 43008, 42496, 42624, 42640, 42636, 0, - 32768, 40960, 43008, 42496, 42624, 42640, 42641, 42638, - 0, 32768, 40960, 43008, 42496, 42624, 0, 32768, - 40960, 43008, 42496, 42624, 42640, 0, 32768, 40960, - 43008, 42496, 42624, 42640, 0, 32768, 40960, 43008, - 42496, 42624, 42640, 42642, 0, 32768, 40960, 43008, - 42496, 42624, 42640, 0, 32768, 40960, 43008, 42496, - 42624, 42640, 42644, 0, 32768, 40960, 43008, 42496, - 42624, 42640, 42644, 0, 32768, 40960, 43008, 42496, - 42624, 42640, 42648, 42646, 0, 32768, 40960, 43008, - 42496, 42624, 42640, 0, 32768, 40960, 43008, 42496, - 42624, 42656, 42648, 0, 32768, 40960, 43008, 42496, - 42624, 42656, 42648, 0, 32768, 40960, 43008, 42496, - 42624, 42656, 42648, 42650, 0, 32768, 40960, 43008, - 42496, 42624, 42656, 42648, 0, 32768, 40960, 43008, - 42496, 42624, 42656, 42657, 42652, 0, 32768, 40960, - 43008, 42496, 42624, 42656, 42657, 42652, 0, 32768, - 40960, 43008, 42496, 42624, 42656, 42657, 42652, 42654, - 0, 32768, 40960, 43008, 42496, 42624, 0, 32768, - 40960, 43008, 42496, 42624, 42656, 0, 32768, 40960, - 43008, 42496, 42624, 42656, 0, 32768, 40960, 43008, - 42496, 42624, 42656, 42658, 0, 32768, 40960, 43008, - 42496, 42624, 42656, 0, 32768, 40960, 43008, 42496, - 42624, 42656, 42660, 0, 32768, 40960, 43008, 42496, - 42624, 42656, 42660, 0, 32768, 40960, 43008, 42496, - 42624, 42656, 42664, 42662, 0, 32768, 40960, 43008, - 42496, 42624, 42656, 0, 32768, 40960, 43008, 42496, - 42624, 42656, 42664, 0, 32768, 40960, 43008, 42496, - 42624, 42656, 42664, 0, 32768, 40960, 43008, 42496, - 42624, 42656, 42664, 42666, 0, 32768, 40960, 43008, - 42496, 42624, 42656, 42664, 0, 32768, 40960, 43008, - 42496, 42624, 42656, 42672, 42668, 0, 32768, 40960, - 43008, 42496, 42624, 42656, 42672, 42668, 0, 32768, - 40960, 43008, 42496, 42624, 42656, 42672, 42673, 42670, - 0, 32768, 40960, 43008, 42496, 42624, 42656, 0, - 32768, 40960, 43008, 42496, 42624, 42688, 42672, 0, - 32768, 40960, 43008, 42496, 42624, 42688, 42672, 0, - 32768, 40960, 43008, 42496, 42624, 42688, 42672, 42674, - 0, 32768, 40960, 43008, 42496, 42624, 42688, 42672, - 0, 32768, 40960, 43008, 42496, 42624, 42688, 42672, - 42676, 0, 32768, 40960, 43008, 42496, 42624, 42688, - 42672, 42676, 0, 32768, 40960, 43008, 42496, 42624, - 42688, 42672, 42680, 42678, 0, 32768, 40960, 43008, - 42496, 42624, 42688, 42672, 0, 32768, 40960, 43008, - 42496, 42624, 42688, 42689, 42680, 0, 32768, 40960, - 43008, 42496, 42624, 42688, 42689, 42680, 0, 32768, - 40960, 43008, 42496, 42624, 42688, 42689, 42680, 42682, - 0, 32768, 40960, 43008, 42496, 42624, 42688, 42689, - 42680, 0, 32768, 40960, 43008, 42496, 42624, 42688, - 42689, 42680, 42684, 0, 32768, 40960, 43008, 42496, - 42624, 42688, 42689, 42691, 42684, 0, 32768, 40960, - 43008, 42496, 42624, 42688, 42689, 42691, 42684, 42686, - 0, 32768, 40960, 43008, 42496, 42624, 0, 32768, - 40960, 43008, 42496, 42752, 42688, 0, 32768, 40960, - 43008, 42496, 42752, 42688, 0, 32768, 40960, 43008, - 42496, 42752, 42688, 42690, 0, 32768, 40960, 43008, - 42496, 42752, 42688, 0, 32768, 40960, 43008, 42496, - 42752, 42688, 42692, 0, 32768, 40960, 43008, 42496, - 42752, 42688, 42692, 0, 32768, 40960, 43008, 42496, - 42752, 42688, 42696, 42694, 0, 32768, 40960, 43008, - 42496, 42752, 42688, 0, 32768, 40960, 43008, 42496, - 42752, 42688, 42696, 0, 32768, 40960, 43008, 42496, - 42752, 42688, 42696, 0, 32768, 40960, 43008, 42496, - 42752, 42688, 42696, 42698, 0, 32768, 40960, 43008, - 42496, 42752, 42688, 42696, 0, 32768, 40960, 43008, - 42496, 42752, 42688, 42704, 42700, 0, 32768, 40960, - 43008, 42496, 42752, 42688, 42704, 42700, 0, 32768, - 40960, 43008, 42496, 42752, 42688, 42704, 42705, 42702, - 0, 32768, 40960, 43008, 42496, 42752, 42688, 0, - 32768, 40960, 43008, 42496, 42752, 42688, 42704, 0, - 32768, 40960, 43008, 42496, 42752, 42688, 42704, 0, - 32768, 40960, 43008, 42496, 42752, 42688, 42704, 42706, - 0, 32768, 40960, 43008, 42496, 42752, 42688, 42704, - 0, 32768, 40960, 43008, 42496, 42752, 42688, 42704, - 42708, 0, 32768, 40960, 43008, 42496, 42752, 42688, - 42704, 42708, 0, 32768, 40960, 43008, 42496, 42752, - 42688, 42704, 42712, 42710, 0, 32768, 40960, 43008, - 42496, 42752, 42688, 42704, 0, 32768, 40960, 43008, - 42496, 42752, 42688, 42720, 42712, 0, 32768, 40960, - 43008, 42496, 42752, 42688, 42720, 42712, 0, 32768, - 40960, 43008, 42496, 42752, 42688, 42720, 42712, 42714, - 0, 32768, 40960, 43008, 42496, 42752, 42688, 42720, - 42712, 0, 32768, 40960, 43008, 42496, 42752, 42688, - 42720, 42721, 42716, 0, 32768, 40960, 43008, 42496, - 42752, 42688, 42720, 42721, 42716, 0, 32768, 40960, - 43008, 42496, 42752, 42688, 42720, 42721, 42716, 42718, - 0, 32768, 40960, 43008, 42496, 42752, 42688, 0, - 32768, 40960, 43008, 42496, 42752, 42753, 42720, 0, - 32768, 40960, 43008, 42496, 42752, 42753, 42720, 0, - 32768, 40960, 43008, 42496, 42752, 42753, 42720, 42722, - 0, 32768, 40960, 43008, 42496, 42752, 42753, 42720, - 0, 32768, 40960, 43008, 42496, 42752, 42753, 42720, - 42724, 0, 32768, 40960, 43008, 42496, 42752, 42753, - 42720, 42724, 0, 32768, 40960, 43008, 42496, 42752, - 42753, 42720, 42728, 42726, 0, 32768, 40960, 43008, - 42496, 42752, 42753, 42720, 0, 32768, 40960, 43008, - 42496, 42752, 42753, 42720, 42728, 0, 32768, 40960, - 43008, 42496, 42752, 42753, 42720, 42728, 0, 32768, - 40960, 43008, 42496, 42752, 42753, 42720, 42728, 42730, - 0, 32768, 40960, 43008, 42496, 42752, 42753, 42720, - 42728, 0, 32768, 40960, 43008, 42496, 42752, 42753, - 42720, 42736, 42732, 0, 32768, 40960, 43008, 42496, - 42752, 42753, 42720, 42736, 42732, 0, 32768, 40960, - 43008, 42496, 42752, 42753, 42720, 42736, 42737, 42734, - 0, 32768, 40960, 43008, 42496, 42752, 42753, 42720, - 0, 32768, 40960, 43008, 42496, 42752, 42753, 42720, - 42736, 0, 32768, 40960, 43008, 42496, 42752, 42753, - 42755, 42736, 0, 32768, 40960, 43008, 42496, 42752, - 42753, 42755, 42736, 42738, 0, 32768, 40960, 43008, - 42496, 42752, 42753, 42755, 42736, 0, 32768, 40960, - 43008, 42496, 42752, 42753, 42755, 42736, 42740, 0, - 32768, 40960, 43008, 42496, 42752, 42753, 42755, 42736, - 42740, 0, 32768, 40960, 43008, 42496, 42752, 42753, - 42755, 42736, 42744, 42742, 0, 32768, 40960, 43008, - 42496, 42752, 42753, 42755, 42736, 0, 32768, 40960, - 43008, 42496, 42752, 42753, 42755, 42736, 42744, 0, - 32768, 40960, 43008, 42496, 42752, 42753, 42755, 42736, - 42744, 0, 32768, 40960, 43008, 42496, 42752, 42753, - 42755, 42736, 42744, 42746, 0, 32768, 40960, 43008, - 42496, 42752, 42753, 42755, 42759, 42744, 0, 32768, - 40960, 43008, 42496, 42752, 42753, 42755, 42759, 42744, - 42748, 0, 32768, 40960, 43008, 42496, 42752, 42753, - 42755, 42759, 42744, 42748, 0, 32768, 40960, 43008, - 42496, 42752, 42753, 42755, 42759, 42744, 42748, 42750, - 0, 32768, 40960, 43008, 42496, 0, 32768, 40960, - 43008, 42496, 42752, 0, 32768, 40960, 43008, 43009, - 42752, 0, 32768, 40960, 43008, 43009, 42752, 42754, - 0, 32768, 40960, 43008, 43009, 42752, 0, 32768, - 40960, 43008, 43009, 42752, 42756, 0, 32768, 40960, - 43008, 43009, 42752, 42756, 0, 32768, 40960, 43008, - 43009, 42752, 42760, 42758, 0, 32768, 40960, 43008, - 43009, 42752, 0, 32768, 40960, 43008, 43009, 42752, - 42760, 0, 32768, 40960, 43008, 43009, 42752, 42760, - 0, 32768, 40960, 43008, 43009, 42752, 42760, 42762, - 0, 32768, 40960, 43008, 43009, 42752, 42760, 0, - 32768, 40960, 43008, 43009, 42752, 42768, 42764, 0, - 32768, 40960, 43008, 43009, 42752, 42768, 42764, 0, - 32768, 40960, 43008, 43009, 42752, 42768, 42769, 42766, - 0, 32768, 40960, 43008, 43009, 42752, 0, 32768, - 40960, 43008, 43009, 42752, 42768, 0, 32768, 40960, - 43008, 43009, 42752, 42768, 0, 32768, 40960, 43008, - 43009, 42752, 42768, 42770, 0, 32768, 40960, 43008, - 43009, 42752, 42768, 0, 32768, 40960, 43008, 43009, - 42752, 42768, 42772, 0, 32768, 40960, 43008, 43009, - 42752, 42768, 42772, 0, 32768, 40960, 43008, 43009, - 42752, 42768, 42776, 42774, 0, 32768, 40960, 43008, - 43009, 42752, 42768, 0, 32768, 40960, 43008, 43009, - 42752, 42784, 42776, 0, 32768, 40960, 43008, 43009, - 42752, 42784, 42776, 0, 32768, 40960, 43008, 43009, - 42752, 42784, 42776, 42778, 0, 32768, 40960, 43008, - 43009, 42752, 42784, 42776, 0, 32768, 40960, 43008, - 43009, 42752, 42784, 42785, 42780, 0, 32768, 40960, - 43008, 43009, 42752, 42784, 42785, 42780, 0, 32768, - 40960, 43008, 43009, 42752, 42784, 42785, 42780, 42782, - 0, 32768, 40960, 43008, 43009, 42752, 0, 32768, - 40960, 43008, 43009, 42752, 42784, 0, 32768, 40960, - 43008, 43009, 42752, 42784, 0, 32768, 40960, 43008, - 43009, 42752, 42784, 42786, 0, 32768, 40960, 43008, - 43009, 42752, 42784, 0, 32768, 40960, 43008, 43009, - 42752, 42784, 42788, 0, 32768, 40960, 43008, 43009, - 42752, 42784, 42788, 0, 32768, 40960, 43008, 43009, - 42752, 42784, 42792, 42790, 0, 32768, 40960, 43008, - 43009, 42752, 42784, 0, 32768, 40960, 43008, 43009, - 42752, 42784, 42792, 0, 32768, 40960, 43008, 43009, - 42752, 42784, 42792, 0, 32768, 40960, 43008, 43009, - 42752, 42784, 42792, 42794, 0, 32768, 40960, 43008, - 43009, 42752, 42784, 42792, 0, 32768, 40960, 43008, - 43009, 42752, 42784, 42800, 42796, 0, 32768, 40960, - 43008, 43009, 42752, 42784, 42800, 42796, 0, 32768, - 40960, 43008, 43009, 42752, 42784, 42800, 42801, 42798, - 0, 32768, 40960, 43008, 43009, 42752, 42784, 0, - 32768, 40960, 43008, 43009, 42752, 42816, 42800, 0, - 32768, 40960, 43008, 43009, 42752, 42816, 42800, 0, - 32768, 40960, 43008, 43009, 42752, 42816, 42800, 42802, - 0, 32768, 40960, 43008, 43009, 42752, 42816, 42800, - 0, 32768, 40960, 43008, 43009, 42752, 42816, 42800, - 42804, 0, 32768, 40960, 43008, 43009, 42752, 42816, - 42800, 42804, 0, 32768, 40960, 43008, 43009, 42752, - 42816, 42800, 42808, 42806, 0, 32768, 40960, 43008, - 43009, 42752, 42816, 42800, 0, 32768, 40960, 43008, - 43009, 42752, 42816, 42817, 42808, 0, 32768, 40960, - 43008, 43009, 42752, 42816, 42817, 42808, 0, 32768, - 40960, 43008, 43009, 42752, 42816, 42817, 42808, 42810, - 0, 32768, 40960, 43008, 43009, 42752, 42816, 42817, - 42808, 0, 32768, 40960, 43008, 43009, 42752, 42816, - 42817, 42808, 42812, 0, 32768, 40960, 43008, 43009, - 42752, 42816, 42817, 42819, 42812, 0, 32768, 40960, - 43008, 43009, 42752, 42816, 42817, 42819, 42812, 42814, - 0, 32768, 40960, 43008, 43009, 42752, 0, 32768, - 40960, 43008, 43009, 42752, 42816, 0, 32768, 40960, - 43008, 43009, 42752, 42816, 0, 32768, 40960, 43008, - 43009, 42752, 42816, 42818, 0, 32768, 40960, 43008, - 43009, 42752, 42816, 0, 32768, 40960, 43008, 43009, - 42752, 42816, 42820, 0, 32768, 40960, 43008, 43009, - 42752, 42816, 42820, 0, 32768, 40960, 43008, 43009, - 42752, 42816, 42824, 42822, 0, 32768, 40960, 43008, - 43009, 42752, 42816, 0, 32768, 40960, 43008, 43009, - 42752, 42816, 42824, 0, 32768, 40960, 43008, 43009, - 42752, 42816, 42824, 0, 32768, 40960, 43008, 43009, - 42752, 42816, 42824, 42826, 0, 32768, 40960, 43008, - 43009, 42752, 42816, 42824, 0, 32768, 40960, 43008, - 43009, 42752, 42816, 42832, 42828, 0, 32768, 40960, - 43008, 43009, 42752, 42816, 42832, 42828, 0, 32768, - 40960, 43008, 43009, 42752, 42816, 42832, 42833, 42830, - 0, 32768, 40960, 43008, 43009, 42752, 42816, 0, - 32768, 40960, 43008, 43009, 42752, 42816, 42832, 0, - 32768, 40960, 43008, 43009, 42752, 42816, 42832, 0, - 32768, 40960, 43008, 43009, 42752, 42816, 42832, 42834, - 0, 32768, 40960, 43008, 43009, 42752, 42816, 42832, - 0, 32768, 40960, 43008, 43009, 42752, 42816, 42832, - 42836, 0, 32768, 40960, 43008, 43009, 42752, 42816, - 42832, 42836, 0, 32768, 40960, 43008, 43009, 42752, - 42816, 42832, 42840, 42838, 0, 32768, 40960, 43008, - 43009, 42752, 42816, 42832, 0, 32768, 40960, 43008, - 43009, 42752, 42816, 42848, 42840, 0, 32768, 40960, - 43008, 43009, 42752, 42816, 42848, 42840, 0, 32768, - 40960, 43008, 43009, 42752, 42816, 42848, 42840, 42842, - 0, 32768, 40960, 43008, 43009, 42752, 42816, 42848, - 42840, 0, 32768, 40960, 43008, 43009, 42752, 42816, - 42848, 42849, 42844, 0, 32768, 40960, 43008, 43009, - 42752, 42816, 42848, 42849, 42844, 0, 32768, 40960, - 43008, 43009, 42752, 42816, 42848, 42849, 42844, 42846, - 0, 32768, 40960, 43008, 43009, 42752, 42816, 0, - 32768, 40960, 43008, 43009, 42752, 42880, 42848, 0, - 32768, 40960, 43008, 43009, 42752, 42880, 42848, 0, - 32768, 40960, 43008, 43009, 42752, 42880, 42848, 42850, - 0, 32768, 40960, 43008, 43009, 42752, 42880, 42848, - 0, 32768, 40960, 43008, 43009, 42752, 42880, 42848, - 42852, 0, 32768, 40960, 43008, 43009, 42752, 42880, - 42848, 42852, 0, 32768, 40960, 43008, 43009, 42752, - 42880, 42848, 42856, 42854, 0, 32768, 40960, 43008, - 43009, 42752, 42880, 42848, 0, 32768, 40960, 43008, - 43009, 42752, 42880, 42848, 42856, 0, 32768, 40960, - 43008, 43009, 42752, 42880, 42848, 42856, 0, 32768, - 40960, 43008, 43009, 42752, 42880, 42848, 42856, 42858, - 0, 32768, 40960, 43008, 43009, 42752, 42880, 42848, - 42856, 0, 32768, 40960, 43008, 43009, 42752, 42880, - 42848, 42864, 42860, 0, 32768, 40960, 43008, 43009, - 42752, 42880, 42848, 42864, 42860, 0, 32768, 40960, - 43008, 43009, 42752, 42880, 42848, 42864, 42865, 42862, - 0, 32768, 40960, 43008, 43009, 42752, 42880, 42848, - 0, 32768, 40960, 43008, 43009, 42752, 42880, 42881, - 42864, 0, 32768, 40960, 43008, 43009, 42752, 42880, - 42881, 42864, 0, 32768, 40960, 43008, 43009, 42752, - 42880, 42881, 42864, 42866, 0, 32768, 40960, 43008, - 43009, 42752, 42880, 42881, 42864, 0, 32768, 40960, - 43008, 43009, 42752, 42880, 42881, 42864, 42868, 0, - 32768, 40960, 43008, 43009, 42752, 42880, 42881, 42864, - 42868, 0, 32768, 40960, 43008, 43009, 42752, 42880, - 42881, 42864, 42872, 42870, 0, 32768, 40960, 43008, - 43009, 42752, 42880, 42881, 42864, 0, 32768, 40960, - 43008, 43009, 42752, 42880, 42881, 42864, 42872, 0, - 32768, 40960, 43008, 43009, 42752, 42880, 42881, 42883, - 42872, 0, 32768, 40960, 43008, 43009, 42752, 42880, - 42881, 42883, 42872, 42874, 0, 32768, 40960, 43008, - 43009, 42752, 42880, 42881, 42883, 42872, 0, 32768, - 40960, 43008, 43009, 42752, 42880, 42881, 42883, 42872, - 42876, 0, 32768, 40960, 43008, 43009, 42752, 42880, - 42881, 42883, 42872, 42876, 0, 32768, 40960, 43008, - 43009, 42752, 42880, 42881, 42883, 42872, 42876, 42878, - 0, 32768, 40960, 43008, 43009, 42752, 0, 32768, - 40960, 43008, 43009, 42752, 42880, 0, 32768, 40960, - 43008, 43009, 42752, 42880, 0, 32768, 40960, 43008, - 43009, 42752, 42880, 42882, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 0, 32768, 40960, 43008, 43009, - 43011, 42880, 42884, 0, 32768, 40960, 43008, 43009, - 43011, 42880, 42884, 0, 32768, 40960, 43008, 43009, - 43011, 42880, 42888, 42886, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 0, 32768, 40960, 43008, 43009, - 43011, 42880, 42888, 0, 32768, 40960, 43008, 43009, - 43011, 42880, 42888, 0, 32768, 40960, 43008, 43009, - 43011, 42880, 42888, 42890, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 42888, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 42896, 42892, 0, 32768, 40960, - 43008, 43009, 43011, 42880, 42896, 42892, 0, 32768, - 40960, 43008, 43009, 43011, 42880, 42896, 42897, 42894, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 0, - 32768, 40960, 43008, 43009, 43011, 42880, 42896, 0, - 32768, 40960, 43008, 43009, 43011, 42880, 42896, 0, - 32768, 40960, 43008, 43009, 43011, 42880, 42896, 42898, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 42896, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 42896, - 42900, 0, 32768, 40960, 43008, 43009, 43011, 42880, - 42896, 42900, 0, 32768, 40960, 43008, 43009, 43011, - 42880, 42896, 42904, 42902, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 42896, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 42912, 42904, 0, 32768, 40960, - 43008, 43009, 43011, 42880, 42912, 42904, 0, 32768, - 40960, 43008, 43009, 43011, 42880, 42912, 42904, 42906, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 42912, - 42904, 0, 32768, 40960, 43008, 43009, 43011, 42880, - 42912, 42913, 42908, 0, 32768, 40960, 43008, 43009, - 43011, 42880, 42912, 42913, 42908, 0, 32768, 40960, - 43008, 43009, 43011, 42880, 42912, 42913, 42908, 42910, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 0, - 32768, 40960, 43008, 43009, 43011, 42880, 42912, 0, - 32768, 40960, 43008, 43009, 43011, 42880, 42912, 0, - 32768, 40960, 43008, 43009, 43011, 42880, 42912, 42914, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 42912, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 42912, - 42916, 0, 32768, 40960, 43008, 43009, 43011, 42880, - 42912, 42916, 0, 32768, 40960, 43008, 43009, 43011, - 42880, 42912, 42920, 42918, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 42912, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 42912, 42920, 0, 32768, 40960, - 43008, 43009, 43011, 42880, 42912, 42920, 0, 32768, - 40960, 43008, 43009, 43011, 42880, 42912, 42920, 42922, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 42912, - 42920, 0, 32768, 40960, 43008, 43009, 43011, 42880, - 42912, 42928, 42924, 0, 32768, 40960, 43008, 43009, - 43011, 42880, 42912, 42928, 42924, 0, 32768, 40960, - 43008, 43009, 43011, 42880, 42912, 42928, 42929, 42926, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 42912, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 42944, - 42928, 0, 32768, 40960, 43008, 43009, 43011, 42880, - 42944, 42928, 0, 32768, 40960, 43008, 43009, 43011, - 42880, 42944, 42928, 42930, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 42944, 42928, 0, 32768, 40960, - 43008, 43009, 43011, 42880, 42944, 42928, 42932, 0, - 32768, 40960, 43008, 43009, 43011, 42880, 42944, 42928, - 42932, 0, 32768, 40960, 43008, 43009, 43011, 42880, - 42944, 42928, 42936, 42934, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 42944, 42928, 0, 32768, 40960, - 43008, 43009, 43011, 42880, 42944, 42945, 42936, 0, - 32768, 40960, 43008, 43009, 43011, 42880, 42944, 42945, - 42936, 0, 32768, 40960, 43008, 43009, 43011, 42880, - 42944, 42945, 42936, 42938, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 42944, 42945, 42936, 0, 32768, - 40960, 43008, 43009, 43011, 42880, 42944, 42945, 42936, - 42940, 0, 32768, 40960, 43008, 43009, 43011, 42880, - 42944, 42945, 42947, 42940, 0, 32768, 40960, 43008, - 43009, 43011, 42880, 42944, 42945, 42947, 42940, 42942, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 0, - 32768, 40960, 43008, 43009, 43011, 42880, 42944, 0, - 32768, 40960, 43008, 43009, 43011, 42880, 42944, 0, - 32768, 40960, 43008, 43009, 43011, 42880, 42944, 42946, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 42944, - 0, 32768, 40960, 43008, 43009, 43011, 42880, 42944, - 42948, 0, 32768, 40960, 43008, 43009, 43011, 42880, - 42944, 42948, 0, 32768, 40960, 43008, 43009, 43011, - 42880, 42944, 42952, 42950, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 42944, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 42944, 42952, 0, 32768, 40960, - 43008, 43009, 43011, 43015, 42944, 42952, 0, 32768, - 40960, 43008, 43009, 43011, 43015, 42944, 42952, 42954, - 0, 32768, 40960, 43008, 43009, 43011, 43015, 42944, - 42952, 0, 32768, 40960, 43008, 43009, 43011, 43015, - 42944, 42960, 42956, 0, 32768, 40960, 43008, 43009, - 43011, 43015, 42944, 42960, 42956, 0, 32768, 40960, - 43008, 43009, 43011, 43015, 42944, 42960, 42961, 42958, - 0, 32768, 40960, 43008, 43009, 43011, 43015, 42944, - 0, 32768, 40960, 43008, 43009, 43011, 43015, 42944, - 42960, 0, 32768, 40960, 43008, 43009, 43011, 43015, - 42944, 42960, 0, 32768, 40960, 43008, 43009, 43011, - 43015, 42944, 42960, 42962, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 42944, 42960, 0, 32768, 40960, - 43008, 43009, 43011, 43015, 42944, 42960, 42964, 0, - 32768, 40960, 43008, 43009, 43011, 43015, 42944, 42960, - 42964, 0, 32768, 40960, 43008, 43009, 43011, 43015, - 42944, 42960, 42968, 42966, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 42944, 42960, 0, 32768, 40960, - 43008, 43009, 43011, 43015, 42944, 42976, 42968, 0, - 32768, 40960, 43008, 43009, 43011, 43015, 42944, 42976, - 42968, 0, 32768, 40960, 43008, 43009, 43011, 43015, - 42944, 42976, 42968, 42970, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 42944, 42976, 42968, 0, 32768, - 40960, 43008, 43009, 43011, 43015, 42944, 42976, 42977, - 42972, 0, 32768, 40960, 43008, 43009, 43011, 43015, - 42944, 42976, 42977, 42972, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 42944, 42976, 42977, 42972, 42974, - 0, 32768, 40960, 43008, 43009, 43011, 43015, 42944, - 0, 32768, 40960, 43008, 43009, 43011, 43015, 42944, - 42976, 0, 32768, 40960, 43008, 43009, 43011, 43015, - 42944, 42976, 0, 32768, 40960, 43008, 43009, 43011, - 43015, 42944, 42976, 42978, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 42944, 42976, 0, 32768, 40960, - 43008, 43009, 43011, 43015, 42944, 42976, 42980, 0, - 32768, 40960, 43008, 43009, 43011, 43015, 42944, 42976, - 42980, 0, 32768, 40960, 43008, 43009, 43011, 43015, - 42944, 42976, 42984, 42982, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 42944, 42976, 0, 32768, 40960, - 43008, 43009, 43011, 43015, 42944, 42976, 42984, 0, - 32768, 40960, 43008, 43009, 43011, 43015, 42944, 42976, - 42984, 0, 32768, 40960, 43008, 43009, 43011, 43015, - 42944, 42976, 42984, 42986, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 42944, 42976, 42984, 0, 32768, - 40960, 43008, 43009, 43011, 43015, 42944, 42976, 42992, - 42988, 0, 32768, 40960, 43008, 43009, 43011, 43015, - 42944, 42976, 42992, 42988, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 42944, 42976, 42992, 42993, 42990, - 0, 32768, 40960, 43008, 43009, 43011, 43015, 43023, - 42976, 0, 32768, 40960, 43008, 43009, 43011, 43015, - 43023, 42976, 42992, 0, 32768, 40960, 43008, 43009, - 43011, 43015, 43023, 42976, 42992, 0, 32768, 40960, - 43008, 43009, 43011, 43015, 43023, 42976, 42992, 42994, - 0, 32768, 40960, 43008, 43009, 43011, 43015, 43023, - 42976, 42992, 0, 32768, 40960, 43008, 43009, 43011, - 43015, 43023, 42976, 42992, 42996, 0, 32768, 40960, - 43008, 43009, 43011, 43015, 43023, 42976, 42992, 42996, - 0, 32768, 40960, 43008, 43009, 43011, 43015, 43023, - 42976, 42992, 43000, 42998, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 43023, 42976, 42992, 0, 32768, - 40960, 43008, 43009, 43011, 43015, 43023, 42976, 42992, - 43000, 0, 32768, 40960, 43008, 43009, 43011, 43015, - 43023, 42976, 42992, 43000, 0, 32768, 40960, 43008, - 43009, 43011, 43015, 43023, 42976, 42992, 43000, 43002, - 0, 32768, 40960, 43008, 43009, 43011, 43015, 43023, - 42976, 42992, 43000, 0, 32768, 40960, 43008, 43009, - 43011, 43015, 43023, 42976, 42992, 43000, 43004, 0, - 32768, 40960, 43008, 43009, 43011, 43015, 43023, 42976, - 42992, 43000, 43004, 0, 32768, 40960, 43008, 43009, - 43011, 43015, 43023, 42976, 42992, 43000, 43004, 43006, - 0, 32768, 40960, 0, 32768, 40960, 43008, 0, - 32768, 40960, 43008, 0, 32768, 40960, 43008, 43010, - 0, 32768, 40960, 43008, 0, 32768, 40960, 43008, - 43012, 0, 32768, 40960, 43008, 43012, 0, 32768, - 40960, 43008, 43016, 43014, 0, 32768, 40960, 43008, - 0, 32768, 40960, 43008, 43016, 0, 32768, 40960, - 43008, 43016, 0, 32768, 40960, 43008, 43016, 43018, - 0, 32768, 40960, 43008, 43016, 0, 32768, 40960, - 43008, 43024, 43020, 0, 32768, 40960, 43008, 43024, - 43020, 0, 32768, 40960, 43008, 43024, 43025, 43022, - 0, 32768, 40960, 43008, 0, 32768, 40960, 43008, - 43024, 0, 32768, 40960, 43008, 43024, 0, 32768, - 40960, 43008, 43024, 43026, 0, 32768, 40960, 43008, - 43024, 0, 32768, 40960, 43008, 43024, 43028, 0, - 32768, 40960, 43008, 43024, 43028, 0, 32768, 40960, - 43008, 43024, 43032, 43030, 0, 32768, 40960, 43008, - 43024, 0, 32768, 40960, 43008, 43040, 43032, 0, - 32768, 40960, 43008, 43040, 43032, 0, 32768, 40960, - 43008, 43040, 43032, 43034, 0, 32768, 40960, 43008, - 43040, 43032, 0, 32768, 40960, 43008, 43040, 43041, - 43036, 0, 32768, 40960, 43008, 43040, 43041, 43036, - 0, 32768, 40960, 43008, 43040, 43041, 43036, 43038, - 0, 32768, 40960, 43008, 0, 32768, 40960, 43008, - 43040, 0, 32768, 40960, 43008, 43040, 0, 32768, - 40960, 43008, 43040, 43042, 0, 32768, 40960, 43008, - 43040, 0, 32768, 40960, 43008, 43040, 43044, 0, - 32768, 40960, 43008, 43040, 43044, 0, 32768, 40960, - 43008, 43040, 43048, 43046, 0, 32768, 40960, 43008, - 43040, 0, 32768, 40960, 43008, 43040, 43048, 0, - 32768, 40960, 43008, 43040, 43048, 0, 32768, 40960, - 43008, 43040, 43048, 43050, 0, 32768, 40960, 43008, - 43040, 43048, 0, 32768, 40960, 43008, 43040, 43056, - 43052, 0, 32768, 40960, 43008, 43040, 43056, 43052, - 0, 32768, 40960, 43008, 43040, 43056, 43057, 43054, - 0, 32768, 40960, 43008, 43040, 0, 32768, 40960, - 43008, 43072, 43056, 0, 32768, 40960, 43008, 43072, - 43056, 0, 32768, 40960, 43008, 43072, 43056, 43058, - 0, 32768, 40960, 43008, 43072, 43056, 0, 32768, - 40960, 43008, 43072, 43056, 43060, 0, 32768, 40960, - 43008, 43072, 43056, 43060, 0, 32768, 40960, 43008, - 43072, 43056, 43064, 43062, 0, 32768, 40960, 43008, - 43072, 43056, 0, 32768, 40960, 43008, 43072, 43073, - 43064, 0, 32768, 40960, 43008, 43072, 43073, 43064, - 0, 32768, 40960, 43008, 43072, 43073, 43064, 43066, - 0, 32768, 40960, 43008, 43072, 43073, 43064, 0, - 32768, 40960, 43008, 43072, 43073, 43064, 43068, 0, - 32768, 40960, 43008, 43072, 43073, 43075, 43068, 0, - 32768, 40960, 43008, 43072, 43073, 43075, 43068, 43070, - 0, 32768, 40960, 43008, 0, 32768, 40960, 43008, - 43072, 0, 32768, 40960, 43008, 43072, 0, 32768, - 40960, 43008, 43072, 43074, 0, 32768, 40960, 43008, - 43072, 0, 32768, 40960, 43008, 43072, 43076, 0, - 32768, 40960, 43008, 43072, 43076, 0, 32768, 40960, - 43008, 43072, 43080, 43078, 0, 32768, 40960, 43008, - 43072, 0, 32768, 40960, 43008, 43072, 43080, 0, - 32768, 40960, 43008, 43072, 43080, 0, 32768, 40960, - 43008, 43072, 43080, 43082, 0, 32768, 40960, 43008, - 43072, 43080, 0, 32768, 40960, 43008, 43072, 43088, - 43084, 0, 32768, 40960, 43008, 43072, 43088, 43084, - 0, 32768, 40960, 43008, 43072, 43088, 43089, 43086, - 0, 32768, 40960, 43008, 43072, 0, 32768, 40960, - 43008, 43072, 43088, 0, 32768, 40960, 43008, 43072, - 43088, 0, 32768, 40960, 43008, 43072, 43088, 43090, - 0, 32768, 40960, 43008, 43072, 43088, 0, 32768, - 40960, 43008, 43072, 43088, 43092, 0, 32768, 40960, - 43008, 43072, 43088, 43092, 0, 32768, 40960, 43008, - 43072, 43088, 43096, 43094, 0, 32768, 40960, 43008, - 43072, 43088, 0, 32768, 40960, 43008, 43072, 43104, - 43096, 0, 32768, 40960, 43008, 43072, 43104, 43096, - 0, 32768, 40960, 43008, 43072, 43104, 43096, 43098, - 0, 32768, 40960, 43008, 43072, 43104, 43096, 0, - 32768, 40960, 43008, 43072, 43104, 43105, 43100, 0, - 32768, 40960, 43008, 43072, 43104, 43105, 43100, 0, - 32768, 40960, 43008, 43072, 43104, 43105, 43100, 43102, - 0, 32768, 40960, 43008, 43072, 0, 32768, 40960, - 43008, 43136, 43104, 0, 32768, 40960, 43008, 43136, - 43104, 0, 32768, 40960, 43008, 43136, 43104, 43106, - 0, 32768, 40960, 43008, 43136, 43104, 0, 32768, - 40960, 43008, 43136, 43104, 43108, 0, 32768, 40960, - 43008, 43136, 43104, 43108, 0, 32768, 40960, 43008, - 43136, 43104, 43112, 43110, 0, 32768, 40960, 43008, - 43136, 43104, 0, 32768, 40960, 43008, 43136, 43104, - 43112, 0, 32768, 40960, 43008, 43136, 43104, 43112, - 0, 32768, 40960, 43008, 43136, 43104, 43112, 43114, - 0, 32768, 40960, 43008, 43136, 43104, 43112, 0, - 32768, 40960, 43008, 43136, 43104, 43120, 43116, 0, - 32768, 40960, 43008, 43136, 43104, 43120, 43116, 0, - 32768, 40960, 43008, 43136, 43104, 43120, 43121, 43118, - 0, 32768, 40960, 43008, 43136, 43104, 0, 32768, - 40960, 43008, 43136, 43137, 43120, 0, 32768, 40960, - 43008, 43136, 43137, 43120, 0, 32768, 40960, 43008, - 43136, 43137, 43120, 43122, 0, 32768, 40960, 43008, - 43136, 43137, 43120, 0, 32768, 40960, 43008, 43136, - 43137, 43120, 43124, 0, 32768, 40960, 43008, 43136, - 43137, 43120, 43124, 0, 32768, 40960, 43008, 43136, - 43137, 43120, 43128, 43126, 0, 32768, 40960, 43008, - 43136, 43137, 43120, 0, 32768, 40960, 43008, 43136, - 43137, 43120, 43128, 0, 32768, 40960, 43008, 43136, - 43137, 43139, 43128, 0, 32768, 40960, 43008, 43136, - 43137, 43139, 43128, 43130, 0, 32768, 40960, 43008, - 43136, 43137, 43139, 43128, 0, 32768, 40960, 43008, - 43136, 43137, 43139, 43128, 43132, 0, 32768, 40960, - 43008, 43136, 43137, 43139, 43128, 43132, 0, 32768, - 40960, 43008, 43136, 43137, 43139, 43128, 43132, 43134, - 0, 32768, 40960, 43008, 0, 32768, 40960, 43008, - 43136, 0, 32768, 40960, 43008, 43136, 0, 32768, - 40960, 43008, 43136, 43138, 0, 32768, 40960, 43008, - 43136, 0, 32768, 40960, 43008, 43136, 43140, 0, - 32768, 40960, 43008, 43136, 43140, 0, 32768, 40960, - 43008, 43136, 43144, 43142, 0, 32768, 40960, 43008, - 43136, 0, 32768, 40960, 43008, 43136, 43144, 0, - 32768, 40960, 43008, 43136, 43144, 0, 32768, 40960, - 43008, 43136, 43144, 43146, 0, 32768, 40960, 43008, - 43136, 43144, 0, 32768, 40960, 43008, 43136, 43152, - 43148, 0, 32768, 40960, 43008, 43136, 43152, 43148, - 0, 32768, 40960, 43008, 43136, 43152, 43153, 43150, - 0, 32768, 40960, 43008, 43136, 0, 32768, 40960, - 43008, 43136, 43152, 0, 32768, 40960, 43008, 43136, - 43152, 0, 32768, 40960, 43008, 43136, 43152, 43154, - 0, 32768, 40960, 43008, 43136, 43152, 0, 32768, - 40960, 43008, 43136, 43152, 43156, 0, 32768, 40960, - 43008, 43136, 43152, 43156, 0, 32768, 40960, 43008, - 43136, 43152, 43160, 43158, 0, 32768, 40960, 43008, - 43136, 43152, 0, 32768, 40960, 43008, 43136, 43168, - 43160, 0, 32768, 40960, 43008, 43136, 43168, 43160, - 0, 32768, 40960, 43008, 43136, 43168, 43160, 43162, - 0, 32768, 40960, 43008, 43136, 43168, 43160, 0, - 32768, 40960, 43008, 43136, 43168, 43169, 43164, 0, - 32768, 40960, 43008, 43136, 43168, 43169, 43164, 0, - 32768, 40960, 43008, 43136, 43168, 43169, 43164, 43166, - 0, 32768, 40960, 43008, 43136, 0, 32768, 40960, - 43008, 43136, 43168, 0, 32768, 40960, 43008, 43136, - 43168, 0, 32768, 40960, 43008, 43136, 43168, 43170, - 0, 32768, 40960, 43008, 43136, 43168, 0, 32768, - 40960, 43008, 43136, 43168, 43172, 0, 32768, 40960, - 43008, 43136, 43168, 43172, 0, 32768, 40960, 43008, - 43136, 43168, 43176, 43174, 0, 32768, 40960, 43008, - 43136, 43168, 0, 32768, 40960, 43008, 43136, 43168, - 43176, 0, 32768, 40960, 43008, 43136, 43168, 43176, - 0, 32768, 40960, 43008, 43136, 43168, 43176, 43178, - 0, 32768, 40960, 43008, 43136, 43168, 43176, 0, - 32768, 40960, 43008, 43136, 43168, 43184, 43180, 0, - 32768, 40960, 43008, 43136, 43168, 43184, 43180, 0, - 32768, 40960, 43008, 43136, 43168, 43184, 43185, 43182, - 0, 32768, 40960, 43008, 43136, 43168, 0, 32768, - 40960, 43008, 43136, 43200, 43184, 0, 32768, 40960, - 43008, 43136, 43200, 43184, 0, 32768, 40960, 43008, - 43136, 43200, 43184, 43186, 0, 32768, 40960, 43008, - 43136, 43200, 43184, 0, 32768, 40960, 43008, 43136, - 43200, 43184, 43188, 0, 32768, 40960, 43008, 43136, - 43200, 43184, 43188, 0, 32768, 40960, 43008, 43136, - 43200, 43184, 43192, 43190, 0, 32768, 40960, 43008, - 43136, 43200, 43184, 0, 32768, 40960, 43008, 43136, - 43200, 43201, 43192, 0, 32768, 40960, 43008, 43136, - 43200, 43201, 43192, 0, 32768, 40960, 43008, 43136, - 43200, 43201, 43192, 43194, 0, 32768, 40960, 43008, - 43136, 43200, 43201, 43192, 0, 32768, 40960, 43008, - 43136, 43200, 43201, 43192, 43196, 0, 32768, 40960, - 43008, 43136, 43200, 43201, 43203, 43196, 0, 32768, - 40960, 43008, 43136, 43200, 43201, 43203, 43196, 43198, - 0, 32768, 40960, 43008, 43136, 0, 32768, 40960, - 43008, 43264, 43200, 0, 32768, 40960, 43008, 43264, - 43200, 0, 32768, 40960, 43008, 43264, 43200, 43202, - 0, 32768, 40960, 43008, 43264, 43200, 0, 32768, - 40960, 43008, 43264, 43200, 43204, 0, 32768, 40960, - 43008, 43264, 43200, 43204, 0, 32768, 40960, 43008, - 43264, 43200, 43208, 43206, 0, 32768, 40960, 43008, - 43264, 43200, 0, 32768, 40960, 43008, 43264, 43200, - 43208, 0, 32768, 40960, 43008, 43264, 43200, 43208, - 0, 32768, 40960, 43008, 43264, 43200, 43208, 43210, - 0, 32768, 40960, 43008, 43264, 43200, 43208, 0, - 32768, 40960, 43008, 43264, 43200, 43216, 43212, 0, - 32768, 40960, 43008, 43264, 43200, 43216, 43212, 0, - 32768, 40960, 43008, 43264, 43200, 43216, 43217, 43214, - 0, 32768, 40960, 43008, 43264, 43200, 0, 32768, - 40960, 43008, 43264, 43200, 43216, 0, 32768, 40960, - 43008, 43264, 43200, 43216, 0, 32768, 40960, 43008, - 43264, 43200, 43216, 43218, 0, 32768, 40960, 43008, - 43264, 43200, 43216, 0, 32768, 40960, 43008, 43264, - 43200, 43216, 43220, 0, 32768, 40960, 43008, 43264, - 43200, 43216, 43220, 0, 32768, 40960, 43008, 43264, - 43200, 43216, 43224, 43222, 0, 32768, 40960, 43008, - 43264, 43200, 43216, 0, 32768, 40960, 43008, 43264, - 43200, 43232, 43224, 0, 32768, 40960, 43008, 43264, - 43200, 43232, 43224, 0, 32768, 40960, 43008, 43264, - 43200, 43232, 43224, 43226, 0, 32768, 40960, 43008, - 43264, 43200, 43232, 43224, 0, 32768, 40960, 43008, - 43264, 43200, 43232, 43233, 43228, 0, 32768, 40960, - 43008, 43264, 43200, 43232, 43233, 43228, 0, 32768, - 40960, 43008, 43264, 43200, 43232, 43233, 43228, 43230, - 0, 32768, 40960, 43008, 43264, 43200, 0, 32768, - 40960, 43008, 43264, 43265, 43232, 0, 32768, 40960, - 43008, 43264, 43265, 43232, 0, 32768, 40960, 43008, - 43264, 43265, 43232, 43234, 0, 32768, 40960, 43008, - 43264, 43265, 43232, 0, 32768, 40960, 43008, 43264, - 43265, 43232, 43236, 0, 32768, 40960, 43008, 43264, - 43265, 43232, 43236, 0, 32768, 40960, 43008, 43264, - 43265, 43232, 43240, 43238, 0, 32768, 40960, 43008, - 43264, 43265, 43232, 0, 32768, 40960, 43008, 43264, - 43265, 43232, 43240, 0, 32768, 40960, 43008, 43264, - 43265, 43232, 43240, 0, 32768, 40960, 43008, 43264, - 43265, 43232, 43240, 43242, 0, 32768, 40960, 43008, - 43264, 43265, 43232, 43240, 0, 32768, 40960, 43008, - 43264, 43265, 43232, 43248, 43244, 0, 32768, 40960, - 43008, 43264, 43265, 43232, 43248, 43244, 0, 32768, - 40960, 43008, 43264, 43265, 43232, 43248, 43249, 43246, - 0, 32768, 40960, 43008, 43264, 43265, 43232, 0, - 32768, 40960, 43008, 43264, 43265, 43232, 43248, 0, - 32768, 40960, 43008, 43264, 43265, 43267, 43248, 0, - 32768, 40960, 43008, 43264, 43265, 43267, 43248, 43250, - 0, 32768, 40960, 43008, 43264, 43265, 43267, 43248, - 0, 32768, 40960, 43008, 43264, 43265, 43267, 43248, - 43252, 0, 32768, 40960, 43008, 43264, 43265, 43267, - 43248, 43252, 0, 32768, 40960, 43008, 43264, 43265, - 43267, 43248, 43256, 43254, 0, 32768, 40960, 43008, - 43264, 43265, 43267, 43248, 0, 32768, 40960, 43008, - 43264, 43265, 43267, 43248, 43256, 0, 32768, 40960, - 43008, 43264, 43265, 43267, 43248, 43256, 0, 32768, - 40960, 43008, 43264, 43265, 43267, 43248, 43256, 43258, - 0, 32768, 40960, 43008, 43264, 43265, 43267, 43271, - 43256, 0, 32768, 40960, 43008, 43264, 43265, 43267, - 43271, 43256, 43260, 0, 32768, 40960, 43008, 43264, - 43265, 43267, 43271, 43256, 43260, 0, 32768, 40960, - 43008, 43264, 43265, 43267, 43271, 43256, 43260, 43262, - 0, 32768, 40960, 43008, 0, 32768, 40960, 43008, - 43264, 0, 32768, 40960, 43008, 43264, 0, 32768, - 40960, 43008, 43264, 43266, 0, 32768, 40960, 43008, - 43264, 0, 32768, 40960, 43008, 43264, 43268, 0, - 32768, 40960, 43008, 43264, 43268, 0, 32768, 40960, - 43008, 43264, 43272, 43270, 0, 32768, 40960, 43008, - 43264, 0, 32768, 40960, 43008, 43264, 43272, 0, - 32768, 40960, 43008, 43264, 43272, 0, 32768, 40960, - 43008, 43264, 43272, 43274, 0, 32768, 40960, 43008, - 43264, 43272, 0, 32768, 40960, 43008, 43264, 43280, - 43276, 0, 32768, 40960, 43008, 43264, 43280, 43276, - 0, 32768, 40960, 43008, 43264, 43280, 43281, 43278, - 0, 32768, 40960, 43008, 43264, 0, 32768, 40960, - 43008, 43264, 43280, 0, 32768, 40960, 43008, 43264, - 43280, 0, 32768, 40960, 43008, 43264, 43280, 43282, - 0, 32768, 40960, 43008, 43264, 43280, 0, 32768, - 40960, 43008, 43264, 43280, 43284, 0, 32768, 40960, - 43008, 43264, 43280, 43284, 0, 32768, 40960, 43008, - 43264, 43280, 43288, 43286, 0, 32768, 40960, 43008, - 43264, 43280, 0, 32768, 40960, 43008, 43264, 43296, - 43288, 0, 32768, 40960, 43008, 43264, 43296, 43288, - 0, 32768, 40960, 43008, 43264, 43296, 43288, 43290, - 0, 32768, 40960, 43008, 43264, 43296, 43288, 0, - 32768, 40960, 43008, 43264, 43296, 43297, 43292, 0, - 32768, 40960, 43008, 43264, 43296, 43297, 43292, 0, - 32768, 40960, 43008, 43264, 43296, 43297, 43292, 43294, - 0, 32768, 40960, 43008, 43264, 0, 32768, 40960, - 43008, 43264, 43296, 0, 32768, 40960, 43008, 43264, - 43296, 0, 32768, 40960, 43008, 43264, 43296, 43298, - 0, 32768, 40960, 43008, 43264, 43296, 0, 32768, - 40960, 43008, 43264, 43296, 43300, 0, 32768, 40960, - 43008, 43264, 43296, 43300, 0, 32768, 40960, 43008, - 43264, 43296, 43304, 43302, 0, 32768, 40960, 43008, - 43264, 43296, 0, 32768, 40960, 43008, 43264, 43296, - 43304, 0, 32768, 40960, 43008, 43264, 43296, 43304, - 0, 32768, 40960, 43008, 43264, 43296, 43304, 43306, - 0, 32768, 40960, 43008, 43264, 43296, 43304, 0, - 32768, 40960, 43008, 43264, 43296, 43312, 43308, 0, - 32768, 40960, 43008, 43264, 43296, 43312, 43308, 0, - 32768, 40960, 43008, 43264, 43296, 43312, 43313, 43310, - 0, 32768, 40960, 43008, 43264, 43296, 0, 32768, - 40960, 43008, 43264, 43328, 43312, 0, 32768, 40960, - 43008, 43264, 43328, 43312, 0, 32768, 40960, 43008, - 43264, 43328, 43312, 43314, 0, 32768, 40960, 43008, - 43264, 43328, 43312, 0, 32768, 40960, 43008, 43264, - 43328, 43312, 43316, 0, 32768, 40960, 43008, 43264, - 43328, 43312, 43316, 0, 32768, 40960, 43008, 43264, - 43328, 43312, 43320, 43318, 0, 32768, 40960, 43008, - 43264, 43328, 43312, 0, 32768, 40960, 43008, 43264, - 43328, 43329, 43320, 0, 32768, 40960, 43008, 43264, - 43328, 43329, 43320, 0, 32768, 40960, 43008, 43264, - 43328, 43329, 43320, 43322, 0, 32768, 40960, 43008, - 43264, 43328, 43329, 43320, 0, 32768, 40960, 43008, - 43264, 43328, 43329, 43320, 43324, 0, 32768, 40960, - 43008, 43264, 43328, 43329, 43331, 43324, 0, 32768, - 40960, 43008, 43264, 43328, 43329, 43331, 43324, 43326, - 0, 32768, 40960, 43008, 43264, 0, 32768, 40960, - 43008, 43264, 43328, 0, 32768, 40960, 43008, 43264, - 43328, 0, 32768, 40960, 43008, 43264, 43328, 43330, - 0, 32768, 40960, 43008, 43264, 43328, 0, 32768, - 40960, 43008, 43264, 43328, 43332, 0, 32768, 40960, - 43008, 43264, 43328, 43332, 0, 32768, 40960, 43008, - 43264, 43328, 43336, 43334, 0, 32768, 40960, 43008, - 43264, 43328, 0, 32768, 40960, 43008, 43264, 43328, - 43336, 0, 32768, 40960, 43008, 43264, 43328, 43336, - 0, 32768, 40960, 43008, 43264, 43328, 43336, 43338, - 0, 32768, 40960, 43008, 43264, 43328, 43336, 0, - 32768, 40960, 43008, 43264, 43328, 43344, 43340, 0, - 32768, 40960, 43008, 43264, 43328, 43344, 43340, 0, - 32768, 40960, 43008, 43264, 43328, 43344, 43345, 43342, - 0, 32768, 40960, 43008, 43264, 43328, 0, 32768, - 40960, 43008, 43264, 43328, 43344, 0, 32768, 40960, - 43008, 43264, 43328, 43344, 0, 32768, 40960, 43008, - 43264, 43328, 43344, 43346, 0, 32768, 40960, 43008, - 43264, 43328, 43344, 0, 32768, 40960, 43008, 43264, - 43328, 43344, 43348, 0, 32768, 40960, 43008, 43264, - 43328, 43344, 43348, 0, 32768, 40960, 43008, 43264, - 43328, 43344, 43352, 43350, 0, 32768, 40960, 43008, - 43264, 43328, 43344, 0, 32768, 40960, 43008, 43264, - 43328, 43360, 43352, 0, 32768, 40960, 43008, 43264, - 43328, 43360, 43352, 0, 32768, 40960, 43008, 43264, - 43328, 43360, 43352, 43354, 0, 32768, 40960, 43008, - 43264, 43328, 43360, 43352, 0, 32768, 40960, 43008, - 43264, 43328, 43360, 43361, 43356, 0, 32768, 40960, - 43008, 43264, 43328, 43360, 43361, 43356, 0, 32768, - 40960, 43008, 43264, 43328, 43360, 43361, 43356, 43358, - 0, 32768, 40960, 43008, 43264, 43328, 0, 32768, - 40960, 43008, 43264, 43392, 43360, 0, 32768, 40960, - 43008, 43264, 43392, 43360, 0, 32768, 40960, 43008, - 43264, 43392, 43360, 43362, 0, 32768, 40960, 43008, - 43264, 43392, 43360, 0, 32768, 40960, 43008, 43264, - 43392, 43360, 43364, 0, 32768, 40960, 43008, 43264, - 43392, 43360, 43364, 0, 32768, 40960, 43008, 43264, - 43392, 43360, 43368, 43366, 0, 32768, 40960, 43008, - 43264, 43392, 43360, 0, 32768, 40960, 43008, 43264, - 43392, 43360, 43368, 0, 32768, 40960, 43008, 43264, - 43392, 43360, 43368, 0, 32768, 40960, 43008, 43264, - 43392, 43360, 43368, 43370, 0, 32768, 40960, 43008, - 43264, 43392, 43360, 43368, 0, 32768, 40960, 43008, - 43264, 43392, 43360, 43376, 43372, 0, 32768, 40960, - 43008, 43264, 43392, 43360, 43376, 43372, 0, 32768, - 40960, 43008, 43264, 43392, 43360, 43376, 43377, 43374, - 0, 32768, 40960, 43008, 43264, 43392, 43360, 0, - 32768, 40960, 43008, 43264, 43392, 43393, 43376, 0, - 32768, 40960, 43008, 43264, 43392, 43393, 43376, 0, - 32768, 40960, 43008, 43264, 43392, 43393, 43376, 43378, - 0, 32768, 40960, 43008, 43264, 43392, 43393, 43376, - 0, 32768, 40960, 43008, 43264, 43392, 43393, 43376, - 43380, 0, 32768, 40960, 43008, 43264, 43392, 43393, - 43376, 43380, 0, 32768, 40960, 43008, 43264, 43392, - 43393, 43376, 43384, 43382, 0, 32768, 40960, 43008, - 43264, 43392, 43393, 43376, 0, 32768, 40960, 43008, - 43264, 43392, 43393, 43376, 43384, 0, 32768, 40960, - 43008, 43264, 43392, 43393, 43395, 43384, 0, 32768, - 40960, 43008, 43264, 43392, 43393, 43395, 43384, 43386, - 0, 32768, 40960, 43008, 43264, 43392, 43393, 43395, - 43384, 0, 32768, 40960, 43008, 43264, 43392, 43393, - 43395, 43384, 43388, 0, 32768, 40960, 43008, 43264, - 43392, 43393, 43395, 43384, 43388, 0, 32768, 40960, - 43008, 43264, 43392, 43393, 43395, 43384, 43388, 43390, - 0, 32768, 40960, 43008, 43264, 0, 32768, 40960, - 43008, 43520, 43392, 0, 32768, 40960, 43008, 43520, - 43392, 0, 32768, 40960, 43008, 43520, 43392, 43394, - 0, 32768, 40960, 43008, 43520, 43392, 0, 32768, - 40960, 43008, 43520, 43392, 43396, 0, 32768, 40960, - 43008, 43520, 43392, 43396, 0, 32768, 40960, 43008, - 43520, 43392, 43400, 43398, 0, 32768, 40960, 43008, - 43520, 43392, 0, 32768, 40960, 43008, 43520, 43392, - 43400, 0, 32768, 40960, 43008, 43520, 43392, 43400, - 0, 32768, 40960, 43008, 43520, 43392, 43400, 43402, - 0, 32768, 40960, 43008, 43520, 43392, 43400, 0, - 32768, 40960, 43008, 43520, 43392, 43408, 43404, 0, - 32768, 40960, 43008, 43520, 43392, 43408, 43404, 0, - 32768, 40960, 43008, 43520, 43392, 43408, 43409, 43406, - 0, 32768, 40960, 43008, 43520, 43392, 0, 32768, - 40960, 43008, 43520, 43392, 43408, 0, 32768, 40960, - 43008, 43520, 43392, 43408, 0, 32768, 40960, 43008, - 43520, 43392, 43408, 43410, 0, 32768, 40960, 43008, - 43520, 43392, 43408, 0, 32768, 40960, 43008, 43520, - 43392, 43408, 43412, 0, 32768, 40960, 43008, 43520, - 43392, 43408, 43412, 0, 32768, 40960, 43008, 43520, - 43392, 43408, 43416, 43414, 0, 32768, 40960, 43008, - 43520, 43392, 43408, 0, 32768, 40960, 43008, 43520, - 43392, 43424, 43416, 0, 32768, 40960, 43008, 43520, - 43392, 43424, 43416, 0, 32768, 40960, 43008, 43520, - 43392, 43424, 43416, 43418, 0, 32768, 40960, 43008, - 43520, 43392, 43424, 43416, 0, 32768, 40960, 43008, - 43520, 43392, 43424, 43425, 43420, 0, 32768, 40960, - 43008, 43520, 43392, 43424, 43425, 43420, 0, 32768, - 40960, 43008, 43520, 43392, 43424, 43425, 43420, 43422, - 0, 32768, 40960, 43008, 43520, 43392, 0, 32768, - 40960, 43008, 43520, 43392, 43424, 0, 32768, 40960, - 43008, 43520, 43392, 43424, 0, 32768, 40960, 43008, - 43520, 43392, 43424, 43426, 0, 32768, 40960, 43008, - 43520, 43392, 43424, 0, 32768, 40960, 43008, 43520, - 43392, 43424, 43428, 0, 32768, 40960, 43008, 43520, - 43392, 43424, 43428, 0, 32768, 40960, 43008, 43520, - 43392, 43424, 43432, 43430, 0, 32768, 40960, 43008, - 43520, 43392, 43424, 0, 32768, 40960, 43008, 43520, - 43392, 43424, 43432, 0, 32768, 40960, 43008, 43520, - 43392, 43424, 43432, 0, 32768, 40960, 43008, 43520, - 43392, 43424, 43432, 43434, 0, 32768, 40960, 43008, - 43520, 43392, 43424, 43432, 0, 32768, 40960, 43008, - 43520, 43392, 43424, 43440, 43436, 0, 32768, 40960, - 43008, 43520, 43392, 43424, 43440, 43436, 0, 32768, - 40960, 43008, 43520, 43392, 43424, 43440, 43441, 43438, - 0, 32768, 40960, 43008, 43520, 43392, 43424, 0, - 32768, 40960, 43008, 43520, 43392, 43456, 43440, 0, - 32768, 40960, 43008, 43520, 43392, 43456, 43440, 0, - 32768, 40960, 43008, 43520, 43392, 43456, 43440, 43442, - 0, 32768, 40960, 43008, 43520, 43392, 43456, 43440, - 0, 32768, 40960, 43008, 43520, 43392, 43456, 43440, - 43444, 0, 32768, 40960, 43008, 43520, 43392, 43456, - 43440, 43444, 0, 32768, 40960, 43008, 43520, 43392, - 43456, 43440, 43448, 43446, 0, 32768, 40960, 43008, - 43520, 43392, 43456, 43440, 0, 32768, 40960, 43008, - 43520, 43392, 43456, 43457, 43448, 0, 32768, 40960, - 43008, 43520, 43392, 43456, 43457, 43448, 0, 32768, - 40960, 43008, 43520, 43392, 43456, 43457, 43448, 43450, - 0, 32768, 40960, 43008, 43520, 43392, 43456, 43457, - 43448, 0, 32768, 40960, 43008, 43520, 43392, 43456, - 43457, 43448, 43452, 0, 32768, 40960, 43008, 43520, - 43392, 43456, 43457, 43459, 43452, 0, 32768, 40960, - 43008, 43520, 43392, 43456, 43457, 43459, 43452, 43454, - 0, 32768, 40960, 43008, 43520, 43392, 0, 32768, - 40960, 43008, 43520, 43521, 43456, 0, 32768, 40960, - 43008, 43520, 43521, 43456, 0, 32768, 40960, 43008, - 43520, 43521, 43456, 43458, 0, 32768, 40960, 43008, - 43520, 43521, 43456, 0, 32768, 40960, 43008, 43520, - 43521, 43456, 43460, 0, 32768, 40960, 43008, 43520, - 43521, 43456, 43460, 0, 32768, 40960, 43008, 43520, - 43521, 43456, 43464, 43462, 0, 32768, 40960, 43008, - 43520, 43521, 43456, 0, 32768, 40960, 43008, 43520, - 43521, 43456, 43464, 0, 32768, 40960, 43008, 43520, - 43521, 43456, 43464, 0, 32768, 40960, 43008, 43520, - 43521, 43456, 43464, 43466, 0, 32768, 40960, 43008, - 43520, 43521, 43456, 43464, 0, 32768, 40960, 43008, - 43520, 43521, 43456, 43472, 43468, 0, 32768, 40960, - 43008, 43520, 43521, 43456, 43472, 43468, 0, 32768, - 40960, 43008, 43520, 43521, 43456, 43472, 43473, 43470, - 0, 32768, 40960, 43008, 43520, 43521, 43456, 0, - 32768, 40960, 43008, 43520, 43521, 43456, 43472, 0, - 32768, 40960, 43008, 43520, 43521, 43456, 43472, 0, - 32768, 40960, 43008, 43520, 43521, 43456, 43472, 43474, - 0, 32768, 40960, 43008, 43520, 43521, 43456, 43472, - 0, 32768, 40960, 43008, 43520, 43521, 43456, 43472, - 43476, 0, 32768, 40960, 43008, 43520, 43521, 43456, - 43472, 43476, 0, 32768, 40960, 43008, 43520, 43521, - 43456, 43472, 43480, 43478, 0, 32768, 40960, 43008, - 43520, 43521, 43456, 43472, 0, 32768, 40960, 43008, - 43520, 43521, 43456, 43488, 43480, 0, 32768, 40960, - 43008, 43520, 43521, 43456, 43488, 43480, 0, 32768, - 40960, 43008, 43520, 43521, 43456, 43488, 43480, 43482, - 0, 32768, 40960, 43008, 43520, 43521, 43456, 43488, - 43480, 0, 32768, 40960, 43008, 43520, 43521, 43456, - 43488, 43489, 43484, 0, 32768, 40960, 43008, 43520, - 43521, 43456, 43488, 43489, 43484, 0, 32768, 40960, - 43008, 43520, 43521, 43456, 43488, 43489, 43484, 43486, - 0, 32768, 40960, 43008, 43520, 43521, 43456, 0, - 32768, 40960, 43008, 43520, 43521, 43456, 43488, 0, - 32768, 40960, 43008, 43520, 43521, 43523, 43488, 0, - 32768, 40960, 43008, 43520, 43521, 43523, 43488, 43490, - 0, 32768, 40960, 43008, 43520, 43521, 43523, 43488, - 0, 32768, 40960, 43008, 43520, 43521, 43523, 43488, - 43492, 0, 32768, 40960, 43008, 43520, 43521, 43523, - 43488, 43492, 0, 32768, 40960, 43008, 43520, 43521, - 43523, 43488, 43496, 43494, 0, 32768, 40960, 43008, - 43520, 43521, 43523, 43488, 0, 32768, 40960, 43008, - 43520, 43521, 43523, 43488, 43496, 0, 32768, 40960, - 43008, 43520, 43521, 43523, 43488, 43496, 0, 32768, - 40960, 43008, 43520, 43521, 43523, 43488, 43496, 43498, - 0, 32768, 40960, 43008, 43520, 43521, 43523, 43488, - 43496, 0, 32768, 40960, 43008, 43520, 43521, 43523, - 43488, 43504, 43500, 0, 32768, 40960, 43008, 43520, - 43521, 43523, 43488, 43504, 43500, 0, 32768, 40960, - 43008, 43520, 43521, 43523, 43488, 43504, 43505, 43502, - 0, 32768, 40960, 43008, 43520, 43521, 43523, 43488, - 0, 32768, 40960, 43008, 43520, 43521, 43523, 43488, - 43504, 0, 32768, 40960, 43008, 43520, 43521, 43523, - 43488, 43504, 0, 32768, 40960, 43008, 43520, 43521, - 43523, 43488, 43504, 43506, 0, 32768, 40960, 43008, - 43520, 43521, 43523, 43527, 43504, 0, 32768, 40960, - 43008, 43520, 43521, 43523, 43527, 43504, 43508, 0, - 32768, 40960, 43008, 43520, 43521, 43523, 43527, 43504, - 43508, 0, 32768, 40960, 43008, 43520, 43521, 43523, - 43527, 43504, 43512, 43510, 0, 32768, 40960, 43008, - 43520, 43521, 43523, 43527, 43504, 0, 32768, 40960, - 43008, 43520, 43521, 43523, 43527, 43504, 43512, 0, - 32768, 40960, 43008, 43520, 43521, 43523, 43527, 43504, - 43512, 0, 32768, 40960, 43008, 43520, 43521, 43523, - 43527, 43504, 43512, 43514, 0, 32768, 40960, 43008, - 43520, 43521, 43523, 43527, 43504, 43512, 0, 32768, - 40960, 43008, 43520, 43521, 43523, 43527, 43504, 43512, - 43516, 0, 32768, 40960, 43008, 43520, 43521, 43523, - 43527, 43504, 43512, 43516, 0, 32768, 40960, 43008, - 43520, 43521, 43523, 43527, 43504, 43512, 43516, 43518, - 0, 32768, 40960, 43008, 0, 32768, 40960, 43008, - 43520, 0, 32768, 40960, 43008, 43520, 0, 32768, - 40960, 43008, 43520, 43522, 0, 32768, 40960, 43008, - 43520, 0, 32768, 40960, 43008, 43520, 43524, 0, - 32768, 40960, 43008, 43520, 43524, 0, 32768, 40960, - 43008, 43520, 43528, 43526, 0, 32768, 40960, 43008, - 43520, 0, 32768, 40960, 43008, 43520, 43528, 0, - 32768, 40960, 43008, 43520, 43528, 0, 32768, 40960, - 43008, 43520, 43528, 43530, 0, 32768, 40960, 43008, - 43520, 43528, 0, 32768, 40960, 43008, 43520, 43536, - 43532, 0, 32768, 40960, 43008, 43520, 43536, 43532, - 0, 32768, 40960, 43008, 43520, 43536, 43537, 43534, - 0, 32768, 40960, 43008, 43520, 0, 32768, 40960, - 43008, 43520, 43536, 0, 32768, 40960, 43008, 43520, - 43536, 0, 32768, 40960, 43008, 43520, 43536, 43538, - 0, 32768, 40960, 43008, 43520, 43536, 0, 32768, - 40960, 43008, 43520, 43536, 43540, 0, 32768, 40960, - 43008, 43520, 43536, 43540, 0, 32768, 40960, 43008, - 43520, 43536, 43544, 43542, 0, 32768, 40960, 43008, - 43520, 43536, 0, 32768, 40960, 43008, 43520, 43552, - 43544, 0, 32768, 40960, 43008, 43520, 43552, 43544, - 0, 32768, 40960, 43008, 43520, 43552, 43544, 43546, - 0, 32768, 40960, 43008, 43520, 43552, 43544, 0, - 32768, 40960, 43008, 43520, 43552, 43553, 43548, 0, - 32768, 40960, 43008, 43520, 43552, 43553, 43548, 0, - 32768, 40960, 43008, 43520, 43552, 43553, 43548, 43550, - 0, 32768, 40960, 43008, 43520, 0, 32768, 40960, - 43008, 43520, 43552, 0, 32768, 40960, 43008, 43520, - 43552, 0, 32768, 40960, 43008, 43520, 43552, 43554, - 0, 32768, 40960, 43008, 43520, 43552, 0, 32768, - 40960, 43008, 43520, 43552, 43556, 0, 32768, 40960, - 43008, 43520, 43552, 43556, 0, 32768, 40960, 43008, - 43520, 43552, 43560, 43558, 0, 32768, 40960, 43008, - 43520, 43552, 0, 32768, 40960, 43008, 43520, 43552, - 43560, 0, 32768, 40960, 43008, 43520, 43552, 43560, - 0, 32768, 40960, 43008, 43520, 43552, 43560, 43562, - 0, 32768, 40960, 43008, 43520, 43552, 43560, 0, - 32768, 40960, 43008, 43520, 43552, 43568, 43564, 0, - 32768, 40960, 43008, 43520, 43552, 43568, 43564, 0, - 32768, 40960, 43008, 43520, 43552, 43568, 43569, 43566, - 0, 32768, 40960, 43008, 43520, 43552, 0, 32768, - 40960, 43008, 43520, 43584, 43568, 0, 32768, 40960, - 43008, 43520, 43584, 43568, 0, 32768, 40960, 43008, - 43520, 43584, 43568, 43570, 0, 32768, 40960, 43008, - 43520, 43584, 43568, 0, 32768, 40960, 43008, 43520, - 43584, 43568, 43572, 0, 32768, 40960, 43008, 43520, - 43584, 43568, 43572, 0, 32768, 40960, 43008, 43520, - 43584, 43568, 43576, 43574, 0, 32768, 40960, 43008, - 43520, 43584, 43568, 0, 32768, 40960, 43008, 43520, - 43584, 43585, 43576, 0, 32768, 40960, 43008, 43520, - 43584, 43585, 43576, 0, 32768, 40960, 43008, 43520, - 43584, 43585, 43576, 43578, 0, 32768, 40960, 43008, - 43520, 43584, 43585, 43576, 0, 32768, 40960, 43008, - 43520, 43584, 43585, 43576, 43580, 0, 32768, 40960, - 43008, 43520, 43584, 43585, 43587, 43580, 0, 32768, - 40960, 43008, 43520, 43584, 43585, 43587, 43580, 43582, - 0, 32768, 40960, 43008, 43520, 0, 32768, 40960, - 43008, 43520, 43584, 0, 32768, 40960, 43008, 43520, - 43584, 0, 32768, 40960, 43008, 43520, 43584, 43586, - 0, 32768, 40960, 43008, 43520, 43584, 0, 32768, - 40960, 43008, 43520, 43584, 43588, 0, 32768, 40960, - 43008, 43520, 43584, 43588, 0, 32768, 40960, 43008, - 43520, 43584, 43592, 43590, 0, 32768, 40960, 43008, - 43520, 43584, 0, 32768, 40960, 43008, 43520, 43584, - 43592, 0, 32768, 40960, 43008, 43520, 43584, 43592, - 0, 32768, 40960, 43008, 43520, 43584, 43592, 43594, - 0, 32768, 40960, 43008, 43520, 43584, 43592, 0, - 32768, 40960, 43008, 43520, 43584, 43600, 43596, 0, - 32768, 40960, 43008, 43520, 43584, 43600, 43596, 0, - 32768, 40960, 43008, 43520, 43584, 43600, 43601, 43598, - 0, 32768, 40960, 43008, 43520, 43584, 0, 32768, - 40960, 43008, 43520, 43584, 43600, 0, 32768, 40960, - 43008, 43520, 43584, 43600, 0, 32768, 40960, 43008, - 43520, 43584, 43600, 43602, 0, 32768, 40960, 43008, - 43520, 43584, 43600, 0, 32768, 40960, 43008, 43520, - 43584, 43600, 43604, 0, 32768, 40960, 43008, 43520, - 43584, 43600, 43604, 0, 32768, 40960, 43008, 43520, - 43584, 43600, 43608, 43606, 0, 32768, 40960, 43008, - 43520, 43584, 43600, 0, 32768, 40960, 43008, 43520, - 43584, 43616, 43608, 0, 32768, 40960, 43008, 43520, - 43584, 43616, 43608, 0, 32768, 40960, 43008, 43520, - 43584, 43616, 43608, 43610, 0, 32768, 40960, 43008, - 43520, 43584, 43616, 43608, 0, 32768, 40960, 43008, - 43520, 43584, 43616, 43617, 43612, 0, 32768, 40960, - 43008, 43520, 43584, 43616, 43617, 43612, 0, 32768, - 40960, 43008, 43520, 43584, 43616, 43617, 43612, 43614, - 0, 32768, 40960, 43008, 43520, 43584, 0, 32768, - 40960, 43008, 43520, 43648, 43616, 0, 32768, 40960, - 43008, 43520, 43648, 43616, 0, 32768, 40960, 43008, - 43520, 43648, 43616, 43618, 0, 32768, 40960, 43008, - 43520, 43648, 43616, 0, 32768, 40960, 43008, 43520, - 43648, 43616, 43620, 0, 32768, 40960, 43008, 43520, - 43648, 43616, 43620, 0, 32768, 40960, 43008, 43520, - 43648, 43616, 43624, 43622, 0, 32768, 40960, 43008, - 43520, 43648, 43616, 0, 32768, 40960, 43008, 43520, - 43648, 43616, 43624, 0, 32768, 40960, 43008, 43520, - 43648, 43616, 43624, 0, 32768, 40960, 43008, 43520, - 43648, 43616, 43624, 43626, 0, 32768, 40960, 43008, - 43520, 43648, 43616, 43624, 0, 32768, 40960, 43008, - 43520, 43648, 43616, 43632, 43628, 0, 32768, 40960, - 43008, 43520, 43648, 43616, 43632, 43628, 0, 32768, - 40960, 43008, 43520, 43648, 43616, 43632, 43633, 43630, - 0, 32768, 40960, 43008, 43520, 43648, 43616, 0, - 32768, 40960, 43008, 43520, 43648, 43649, 43632, 0, - 32768, 40960, 43008, 43520, 43648, 43649, 43632, 0, - 32768, 40960, 43008, 43520, 43648, 43649, 43632, 43634, - 0, 32768, 40960, 43008, 43520, 43648, 43649, 43632, - 0, 32768, 40960, 43008, 43520, 43648, 43649, 43632, - 43636, 0, 32768, 40960, 43008, 43520, 43648, 43649, - 43632, 43636, 0, 32768, 40960, 43008, 43520, 43648, - 43649, 43632, 43640, 43638, 0, 32768, 40960, 43008, - 43520, 43648, 43649, 43632, 0, 32768, 40960, 43008, - 43520, 43648, 43649, 43632, 43640, 0, 32768, 40960, - 43008, 43520, 43648, 43649, 43651, 43640, 0, 32768, - 40960, 43008, 43520, 43648, 43649, 43651, 43640, 43642, - 0, 32768, 40960, 43008, 43520, 43648, 43649, 43651, - 43640, 0, 32768, 40960, 43008, 43520, 43648, 43649, - 43651, 43640, 43644, 0, 32768, 40960, 43008, 43520, - 43648, 43649, 43651, 43640, 43644, 0, 32768, 40960, - 43008, 43520, 43648, 43649, 43651, 43640, 43644, 43646, - 0, 32768, 40960, 43008, 43520, 0, 32768, 40960, - 43008, 43520, 43648, 0, 32768, 40960, 43008, 43520, - 43648, 0, 32768, 40960, 43008, 43520, 43648, 43650, - 0, 32768, 40960, 43008, 43520, 43648, 0, 32768, - 40960, 43008, 43520, 43648, 43652, 0, 32768, 40960, - 43008, 43520, 43648, 43652, 0, 32768, 40960, 43008, - 43520, 43648, 43656, 43654, 0, 32768, 40960, 43008, - 43520, 43648, 0, 32768, 40960, 43008, 43520, 43648, - 43656, 0, 32768, 40960, 43008, 43520, 43648, 43656, - 0, 32768, 40960, 43008, 43520, 43648, 43656, 43658, - 0, 32768, 40960, 43008, 43520, 43648, 43656, 0, - 32768, 40960, 43008, 43520, 43648, 43664, 43660, 0, - 32768, 40960, 43008, 43520, 43648, 43664, 43660, 0, - 32768, 40960, 43008, 43520, 43648, 43664, 43665, 43662, - 0, 32768, 40960, 43008, 43520, 43648, 0, 32768, - 40960, 43008, 43520, 43648, 43664, 0, 32768, 40960, - 43008, 43520, 43648, 43664, 0, 32768, 40960, 43008, - 43520, 43648, 43664, 43666, 0, 32768, 40960, 43008, - 43520, 43648, 43664, 0, 32768, 40960, 43008, 43520, - 43648, 43664, 43668, 0, 32768, 40960, 43008, 43520, - 43648, 43664, 43668, 0, 32768, 40960, 43008, 43520, - 43648, 43664, 43672, 43670, 0, 32768, 40960, 43008, - 43520, 43648, 43664, 0, 32768, 40960, 43008, 43520, - 43648, 43680, 43672, 0, 32768, 40960, 43008, 43520, - 43648, 43680, 43672, 0, 32768, 40960, 43008, 43520, - 43648, 43680, 43672, 43674, 0, 32768, 40960, 43008, - 43520, 43648, 43680, 43672, 0, 32768, 40960, 43008, - 43520, 43648, 43680, 43681, 43676, 0, 32768, 40960, - 43008, 43520, 43648, 43680, 43681, 43676, 0, 32768, - 40960, 43008, 43520, 43648, 43680, 43681, 43676, 43678, - 0, 32768, 40960, 43008, 43520, 43648, 0, 32768, - 40960, 43008, 43520, 43648, 43680, 0, 32768, 40960, - 43008, 43520, 43648, 43680, 0, 32768, 40960, 43008, - 43520, 43648, 43680, 43682, 0, 32768, 40960, 43008, - 43520, 43648, 43680, 0, 32768, 40960, 43008, 43520, - 43648, 43680, 43684, 0, 32768, 40960, 43008, 43520, - 43648, 43680, 43684, 0, 32768, 40960, 43008, 43520, - 43648, 43680, 43688, 43686, 0, 32768, 40960, 43008, - 43520, 43648, 43680, 0, 32768, 40960, 43008, 43520, - 43648, 43680, 43688, 0, 32768, 40960, 43008, 43520, - 43648, 43680, 43688, 0, 32768, 40960, 43008, 43520, - 43648, 43680, 43688, 43690, 0, 32768, 40960, 43008, - 43520, 43648, 43680, 43688, 0, 32768, 40960, 43008, - 43520, 43648, 43680, 43696, 43692, 0, 32768, 40960, - 43008, 43520, 43648, 43680, 43696, 43692, 0, 32768, - 40960, 43008, 43520, 43648, 43680, 43696, 43697, 43694, - 0, 32768, 40960, 43008, 43520, 43648, 43680, 0, - 32768, 40960, 43008, 43520, 43648, 43712, 43696, 0, - 32768, 40960, 43008, 43520, 43648, 43712, 43696, 0, - 32768, 40960, 43008, 43520, 43648, 43712, 43696, 43698, - 0, 32768, 40960, 43008, 43520, 43648, 43712, 43696, - 0, 32768, 40960, 43008, 43520, 43648, 43712, 43696, - 43700, 0, 32768, 40960, 43008, 43520, 43648, 43712, - 43696, 43700, 0, 32768, 40960, 43008, 43520, 43648, - 43712, 43696, 43704, 43702, 0, 32768, 40960, 43008, - 43520, 43648, 43712, 43696, 0, 32768, 40960, 43008, - 43520, 43648, 43712, 43713, 43704, 0, 32768, 40960, - 43008, 43520, 43648, 43712, 43713, 43704, 0, 32768, - 40960, 43008, 43520, 43648, 43712, 43713, 43704, 43706, - 0, 32768, 40960, 43008, 43520, 43648, 43712, 43713, - 43704, 0, 32768, 40960, 43008, 43520, 43648, 43712, - 43713, 43704, 43708, 0, 32768, 40960, 43008, 43520, - 43648, 43712, 43713, 43715, 43708, 0, 32768, 40960, - 43008, 43520, 43648, 43712, 43713, 43715, 43708, 43710, - 0, 32768, 40960, 43008, 43520, 43648, 0, 32768, - 40960, 43008, 43520, 43776, 43712, 0, 32768, 40960, - 43008, 43520, 43776, 43712, 0, 32768, 40960, 43008, - 43520, 43776, 43712, 43714, 0, 32768, 40960, 43008, - 43520, 43776, 43712, 0, 32768, 40960, 43008, 43520, - 43776, 43712, 43716, 0, 32768, 40960, 43008, 43520, - 43776, 43712, 43716, 0, 32768, 40960, 43008, 43520, - 43776, 43712, 43720, 43718, 0, 32768, 40960, 43008, - 43520, 43776, 43712, 0, 32768, 40960, 43008, 43520, - 43776, 43712, 43720, 0, 32768, 40960, 43008, 43520, - 43776, 43712, 43720, 0, 32768, 40960, 43008, 43520, - 43776, 43712, 43720, 43722, 0, 32768, 40960, 43008, - 43520, 43776, 43712, 43720, 0, 32768, 40960, 43008, - 43520, 43776, 43712, 43728, 43724, 0, 32768, 40960, - 43008, 43520, 43776, 43712, 43728, 43724, 0, 32768, - 40960, 43008, 43520, 43776, 43712, 43728, 43729, 43726, - 0, 32768, 40960, 43008, 43520, 43776, 43712, 0, - 32768, 40960, 43008, 43520, 43776, 43712, 43728, 0, - 32768, 40960, 43008, 43520, 43776, 43712, 43728, 0, - 32768, 40960, 43008, 43520, 43776, 43712, 43728, 43730, - 0, 32768, 40960, 43008, 43520, 43776, 43712, 43728, - 0, 32768, 40960, 43008, 43520, 43776, 43712, 43728, - 43732, 0, 32768, 40960, 43008, 43520, 43776, 43712, - 43728, 43732, 0, 32768, 40960, 43008, 43520, 43776, - 43712, 43728, 43736, 43734, 0, 32768, 40960, 43008, - 43520, 43776, 43712, 43728, 0, 32768, 40960, 43008, - 43520, 43776, 43712, 43744, 43736, 0, 32768, 40960, - 43008, 43520, 43776, 43712, 43744, 43736, 0, 32768, - 40960, 43008, 43520, 43776, 43712, 43744, 43736, 43738, - 0, 32768, 40960, 43008, 43520, 43776, 43712, 43744, - 43736, 0, 32768, 40960, 43008, 43520, 43776, 43712, - 43744, 43745, 43740, 0, 32768, 40960, 43008, 43520, - 43776, 43712, 43744, 43745, 43740, 0, 32768, 40960, - 43008, 43520, 43776, 43712, 43744, 43745, 43740, 43742, - 0, 32768, 40960, 43008, 43520, 43776, 43712, 0, - 32768, 40960, 43008, 43520, 43776, 43777, 43744, 0, - 32768, 40960, 43008, 43520, 43776, 43777, 43744, 0, - 32768, 40960, 43008, 43520, 43776, 43777, 43744, 43746, - 0, 32768, 40960, 43008, 43520, 43776, 43777, 43744, - 0, 32768, 40960, 43008, 43520, 43776, 43777, 43744, - 43748, 0, 32768, 40960, 43008, 43520, 43776, 43777, - 43744, 43748, 0, 32768, 40960, 43008, 43520, 43776, - 43777, 43744, 43752, 43750, 0, 32768, 40960, 43008, - 43520, 43776, 43777, 43744, 0, 32768, 40960, 43008, - 43520, 43776, 43777, 43744, 43752, 0, 32768, 40960, - 43008, 43520, 43776, 43777, 43744, 43752, 0, 32768, - 40960, 43008, 43520, 43776, 43777, 43744, 43752, 43754, - 0, 32768, 40960, 43008, 43520, 43776, 43777, 43744, - 43752, 0, 32768, 40960, 43008, 43520, 43776, 43777, - 43744, 43760, 43756, 0, 32768, 40960, 43008, 43520, - 43776, 43777, 43744, 43760, 43756, 0, 32768, 40960, - 43008, 43520, 43776, 43777, 43744, 43760, 43761, 43758, - 0, 32768, 40960, 43008, 43520, 43776, 43777, 43744, - 0, 32768, 40960, 43008, 43520, 43776, 43777, 43744, - 43760, 0, 32768, 40960, 43008, 43520, 43776, 43777, - 43779, 43760, 0, 32768, 40960, 43008, 43520, 43776, - 43777, 43779, 43760, 43762, 0, 32768, 40960, 43008, - 43520, 43776, 43777, 43779, 43760, 0, 32768, 40960, - 43008, 43520, 43776, 43777, 43779, 43760, 43764, 0, - 32768, 40960, 43008, 43520, 43776, 43777, 43779, 43760, - 43764, 0, 32768, 40960, 43008, 43520, 43776, 43777, - 43779, 43760, 43768, 43766, 0, 32768, 40960, 43008, - 43520, 43776, 43777, 43779, 43760, 0, 32768, 40960, - 43008, 43520, 43776, 43777, 43779, 43760, 43768, 0, - 32768, 40960, 43008, 43520, 43776, 43777, 43779, 43760, - 43768, 0, 32768, 40960, 43008, 43520, 43776, 43777, - 43779, 43760, 43768, 43770, 0, 32768, 40960, 43008, - 43520, 43776, 43777, 43779, 43783, 43768, 0, 32768, - 40960, 43008, 43520, 43776, 43777, 43779, 43783, 43768, - 43772, 0, 32768, 40960, 43008, 43520, 43776, 43777, - 43779, 43783, 43768, 43772, 0, 32768, 40960, 43008, - 43520, 43776, 43777, 43779, 43783, 43768, 43772, 43774, - 0, 32768, 40960, 43008, 43520, 0, 32768, 40960, - 43008, 44032, 43776, 0, 32768, 40960, 43008, 44032, - 43776, 0, 32768, 40960, 43008, 44032, 43776, 43778, - 0, 32768, 40960, 43008, 44032, 43776, 0, 32768, - 40960, 43008, 44032, 43776, 43780, 0, 32768, 40960, - 43008, 44032, 43776, 43780, 0, 32768, 40960, 43008, - 44032, 43776, 43784, 43782, 0, 32768, 40960, 43008, - 44032, 43776, 0, 32768, 40960, 43008, 44032, 43776, - 43784, 0, 32768, 40960, 43008, 44032, 43776, 43784, - 0, 32768, 40960, 43008, 44032, 43776, 43784, 43786, - 0, 32768, 40960, 43008, 44032, 43776, 43784, 0, - 32768, 40960, 43008, 44032, 43776, 43792, 43788, 0, - 32768, 40960, 43008, 44032, 43776, 43792, 43788, 0, - 32768, 40960, 43008, 44032, 43776, 43792, 43793, 43790, - 0, 32768, 40960, 43008, 44032, 43776, 0, 32768, - 40960, 43008, 44032, 43776, 43792, 0, 32768, 40960, - 43008, 44032, 43776, 43792, 0, 32768, 40960, 43008, - 44032, 43776, 43792, 43794, 0, 32768, 40960, 43008, - 44032, 43776, 43792, 0, 32768, 40960, 43008, 44032, - 43776, 43792, 43796, 0, 32768, 40960, 43008, 44032, - 43776, 43792, 43796, 0, 32768, 40960, 43008, 44032, - 43776, 43792, 43800, 43798, 0, 32768, 40960, 43008, - 44032, 43776, 43792, 0, 32768, 40960, 43008, 44032, - 43776, 43808, 43800, 0, 32768, 40960, 43008, 44032, - 43776, 43808, 43800, 0, 32768, 40960, 43008, 44032, - 43776, 43808, 43800, 43802, 0, 32768, 40960, 43008, - 44032, 43776, 43808, 43800, 0, 32768, 40960, 43008, - 44032, 43776, 43808, 43809, 43804, 0, 32768, 40960, - 43008, 44032, 43776, 43808, 43809, 43804, 0, 32768, - 40960, 43008, 44032, 43776, 43808, 43809, 43804, 43806, - 0, 32768, 40960, 43008, 44032, 43776, 0, 32768, - 40960, 43008, 44032, 43776, 43808, 0, 32768, 40960, - 43008, 44032, 43776, 43808, 0, 32768, 40960, 43008, - 44032, 43776, 43808, 43810, 0, 32768, 40960, 43008, - 44032, 43776, 43808, 0, 32768, 40960, 43008, 44032, - 43776, 43808, 43812, 0, 32768, 40960, 43008, 44032, - 43776, 43808, 43812, 0, 32768, 40960, 43008, 44032, - 43776, 43808, 43816, 43814, 0, 32768, 40960, 43008, - 44032, 43776, 43808, 0, 32768, 40960, 43008, 44032, - 43776, 43808, 43816, 0, 32768, 40960, 43008, 44032, - 43776, 43808, 43816, 0, 32768, 40960, 43008, 44032, - 43776, 43808, 43816, 43818, 0, 32768, 40960, 43008, - 44032, 43776, 43808, 43816, 0, 32768, 40960, 43008, - 44032, 43776, 43808, 43824, 43820, 0, 32768, 40960, - 43008, 44032, 43776, 43808, 43824, 43820, 0, 32768, - 40960, 43008, 44032, 43776, 43808, 43824, 43825, 43822, - 0, 32768, 40960, 43008, 44032, 43776, 43808, 0, - 32768, 40960, 43008, 44032, 43776, 43840, 43824, 0, - 32768, 40960, 43008, 44032, 43776, 43840, 43824, 0, - 32768, 40960, 43008, 44032, 43776, 43840, 43824, 43826, - 0, 32768, 40960, 43008, 44032, 43776, 43840, 43824, - 0, 32768, 40960, 43008, 44032, 43776, 43840, 43824, - 43828, 0, 32768, 40960, 43008, 44032, 43776, 43840, - 43824, 43828, 0, 32768, 40960, 43008, 44032, 43776, - 43840, 43824, 43832, 43830, 0, 32768, 40960, 43008, - 44032, 43776, 43840, 43824, 0, 32768, 40960, 43008, - 44032, 43776, 43840, 43841, 43832, 0, 32768, 40960, - 43008, 44032, 43776, 43840, 43841, 43832, 0, 32768, - 40960, 43008, 44032, 43776, 43840, 43841, 43832, 43834, - 0, 32768, 40960, 43008, 44032, 43776, 43840, 43841, - 43832, 0, 32768, 40960, 43008, 44032, 43776, 43840, - 43841, 43832, 43836, 0, 32768, 40960, 43008, 44032, - 43776, 43840, 43841, 43843, 43836, 0, 32768, 40960, - 43008, 44032, 43776, 43840, 43841, 43843, 43836, 43838, - 0, 32768, 40960, 43008, 44032, 43776, 0, 32768, - 40960, 43008, 44032, 43776, 43840, 0, 32768, 40960, - 43008, 44032, 43776, 43840, 0, 32768, 40960, 43008, - 44032, 43776, 43840, 43842, 0, 32768, 40960, 43008, - 44032, 43776, 43840, 0, 32768, 40960, 43008, 44032, - 43776, 43840, 43844, 0, 32768, 40960, 43008, 44032, - 43776, 43840, 43844, 0, 32768, 40960, 43008, 44032, - 43776, 43840, 43848, 43846, 0, 32768, 40960, 43008, - 44032, 43776, 43840, 0, 32768, 40960, 43008, 44032, - 43776, 43840, 43848, 0, 32768, 40960, 43008, 44032, - 43776, 43840, 43848, 0, 32768, 40960, 43008, 44032, - 43776, 43840, 43848, 43850, 0, 32768, 40960, 43008, - 44032, 43776, 43840, 43848, 0, 32768, 40960, 43008, - 44032, 43776, 43840, 43856, 43852, 0, 32768, 40960, - 43008, 44032, 43776, 43840, 43856, 43852, 0, 32768, - 40960, 43008, 44032, 43776, 43840, 43856, 43857, 43854, - 0, 32768, 40960, 43008, 44032, 43776, 43840, 0, - 32768, 40960, 43008, 44032, 43776, 43840, 43856, 0, - 32768, 40960, 43008, 44032, 43776, 43840, 43856, 0, - 32768, 40960, 43008, 44032, 43776, 43840, 43856, 43858, - 0, 32768, 40960, 43008, 44032, 43776, 43840, 43856, - 0, 32768, 40960, 43008, 44032, 43776, 43840, 43856, - 43860, 0, 32768, 40960, 43008, 44032, 43776, 43840, - 43856, 43860, 0, 32768, 40960, 43008, 44032, 43776, - 43840, 43856, 43864, 43862, 0, 32768, 40960, 43008, - 44032, 43776, 43840, 43856, 0, 32768, 40960, 43008, - 44032, 43776, 43840, 43872, 43864, 0, 32768, 40960, - 43008, 44032, 43776, 43840, 43872, 43864, 0, 32768, - 40960, 43008, 44032, 43776, 43840, 43872, 43864, 43866, - 0, 32768, 40960, 43008, 44032, 43776, 43840, 43872, - 43864, 0, 32768, 40960, 43008, 44032, 43776, 43840, - 43872, 43873, 43868, 0, 32768, 40960, 43008, 44032, - 43776, 43840, 43872, 43873, 43868, 0, 32768, 40960, - 43008, 44032, 43776, 43840, 43872, 43873, 43868, 43870, - 0, 32768, 40960, 43008, 44032, 43776, 43840, 0, - 32768, 40960, 43008, 44032, 43776, 43904, 43872, 0, - 32768, 40960, 43008, 44032, 43776, 43904, 43872, 0, - 32768, 40960, 43008, 44032, 43776, 43904, 43872, 43874, - 0, 32768, 40960, 43008, 44032, 43776, 43904, 43872, - 0, 32768, 40960, 43008, 44032, 43776, 43904, 43872, - 43876, 0, 32768, 40960, 43008, 44032, 43776, 43904, - 43872, 43876, 0, 32768, 40960, 43008, 44032, 43776, - 43904, 43872, 43880, 43878, 0, 32768, 40960, 43008, - 44032, 43776, 43904, 43872, 0, 32768, 40960, 43008, - 44032, 43776, 43904, 43872, 43880, 0, 32768, 40960, - 43008, 44032, 43776, 43904, 43872, 43880, 0, 32768, - 40960, 43008, 44032, 43776, 43904, 43872, 43880, 43882, - 0, 32768, 40960, 43008, 44032, 43776, 43904, 43872, - 43880, 0, 32768, 40960, 43008, 44032, 43776, 43904, - 43872, 43888, 43884, 0, 32768, 40960, 43008, 44032, - 43776, 43904, 43872, 43888, 43884, 0, 32768, 40960, - 43008, 44032, 43776, 43904, 43872, 43888, 43889, 43886, - 0, 32768, 40960, 43008, 44032, 43776, 43904, 43872, - 0, 32768, 40960, 43008, 44032, 43776, 43904, 43905, - 43888, 0, 32768, 40960, 43008, 44032, 43776, 43904, - 43905, 43888, 0, 32768, 40960, 43008, 44032, 43776, - 43904, 43905, 43888, 43890, 0, 32768, 40960, 43008, - 44032, 43776, 43904, 43905, 43888, 0, 32768, 40960, - 43008, 44032, 43776, 43904, 43905, 43888, 43892, 0, - 32768, 40960, 43008, 44032, 43776, 43904, 43905, 43888, - 43892, 0, 32768, 40960, 43008, 44032, 43776, 43904, - 43905, 43888, 43896, 43894, 0, 32768, 40960, 43008, - 44032, 43776, 43904, 43905, 43888, 0, 32768, 40960, - 43008, 44032, 43776, 43904, 43905, 43888, 43896, 0, - 32768, 40960, 43008, 44032, 43776, 43904, 43905, 43907, - 43896, 0, 32768, 40960, 43008, 44032, 43776, 43904, - 43905, 43907, 43896, 43898, 0, 32768, 40960, 43008, - 44032, 43776, 43904, 43905, 43907, 43896, 0, 32768, - 40960, 43008, 44032, 43776, 43904, 43905, 43907, 43896, - 43900, 0, 32768, 40960, 43008, 44032, 43776, 43904, - 43905, 43907, 43896, 43900, 0, 32768, 40960, 43008, - 44032, 43776, 43904, 43905, 43907, 43896, 43900, 43902, - 0, 32768, 40960, 43008, 44032, 43776, 0, 32768, - 40960, 43008, 44032, 43776, 43904, 0, 32768, 40960, - 43008, 44032, 44033, 43904, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 43906, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 0, 32768, 40960, 43008, 44032, - 44033, 43904, 43908, 0, 32768, 40960, 43008, 44032, - 44033, 43904, 43908, 0, 32768, 40960, 43008, 44032, - 44033, 43904, 43912, 43910, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 0, 32768, 40960, 43008, 44032, - 44033, 43904, 43912, 0, 32768, 40960, 43008, 44032, - 44033, 43904, 43912, 0, 32768, 40960, 43008, 44032, - 44033, 43904, 43912, 43914, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 43912, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 43920, 43916, 0, 32768, 40960, - 43008, 44032, 44033, 43904, 43920, 43916, 0, 32768, - 40960, 43008, 44032, 44033, 43904, 43920, 43921, 43918, - 0, 32768, 40960, 43008, 44032, 44033, 43904, 0, - 32768, 40960, 43008, 44032, 44033, 43904, 43920, 0, - 32768, 40960, 43008, 44032, 44033, 43904, 43920, 0, - 32768, 40960, 43008, 44032, 44033, 43904, 43920, 43922, - 0, 32768, 40960, 43008, 44032, 44033, 43904, 43920, - 0, 32768, 40960, 43008, 44032, 44033, 43904, 43920, - 43924, 0, 32768, 40960, 43008, 44032, 44033, 43904, - 43920, 43924, 0, 32768, 40960, 43008, 44032, 44033, - 43904, 43920, 43928, 43926, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 43920, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 43936, 43928, 0, 32768, 40960, - 43008, 44032, 44033, 43904, 43936, 43928, 0, 32768, - 40960, 43008, 44032, 44033, 43904, 43936, 43928, 43930, - 0, 32768, 40960, 43008, 44032, 44033, 43904, 43936, - 43928, 0, 32768, 40960, 43008, 44032, 44033, 43904, - 43936, 43937, 43932, 0, 32768, 40960, 43008, 44032, - 44033, 43904, 43936, 43937, 43932, 0, 32768, 40960, - 43008, 44032, 44033, 43904, 43936, 43937, 43932, 43934, - 0, 32768, 40960, 43008, 44032, 44033, 43904, 0, - 32768, 40960, 43008, 44032, 44033, 43904, 43936, 0, - 32768, 40960, 43008, 44032, 44033, 43904, 43936, 0, - 32768, 40960, 43008, 44032, 44033, 43904, 43936, 43938, - 0, 32768, 40960, 43008, 44032, 44033, 43904, 43936, - 0, 32768, 40960, 43008, 44032, 44033, 43904, 43936, - 43940, 0, 32768, 40960, 43008, 44032, 44033, 43904, - 43936, 43940, 0, 32768, 40960, 43008, 44032, 44033, - 43904, 43936, 43944, 43942, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 43936, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 43936, 43944, 0, 32768, 40960, - 43008, 44032, 44033, 43904, 43936, 43944, 0, 32768, - 40960, 43008, 44032, 44033, 43904, 43936, 43944, 43946, - 0, 32768, 40960, 43008, 44032, 44033, 43904, 43936, - 43944, 0, 32768, 40960, 43008, 44032, 44033, 43904, - 43936, 43952, 43948, 0, 32768, 40960, 43008, 44032, - 44033, 43904, 43936, 43952, 43948, 0, 32768, 40960, - 43008, 44032, 44033, 43904, 43936, 43952, 43953, 43950, - 0, 32768, 40960, 43008, 44032, 44033, 43904, 43936, - 0, 32768, 40960, 43008, 44032, 44033, 43904, 43968, - 43952, 0, 32768, 40960, 43008, 44032, 44033, 43904, - 43968, 43952, 0, 32768, 40960, 43008, 44032, 44033, - 43904, 43968, 43952, 43954, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 43968, 43952, 0, 32768, 40960, - 43008, 44032, 44033, 43904, 43968, 43952, 43956, 0, - 32768, 40960, 43008, 44032, 44033, 43904, 43968, 43952, - 43956, 0, 32768, 40960, 43008, 44032, 44033, 43904, - 43968, 43952, 43960, 43958, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 43968, 43952, 0, 32768, 40960, - 43008, 44032, 44033, 43904, 43968, 43969, 43960, 0, - 32768, 40960, 43008, 44032, 44033, 43904, 43968, 43969, - 43960, 0, 32768, 40960, 43008, 44032, 44033, 43904, - 43968, 43969, 43960, 43962, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 43968, 43969, 43960, 0, 32768, - 40960, 43008, 44032, 44033, 43904, 43968, 43969, 43960, - 43964, 0, 32768, 40960, 43008, 44032, 44033, 43904, - 43968, 43969, 43971, 43964, 0, 32768, 40960, 43008, - 44032, 44033, 43904, 43968, 43969, 43971, 43964, 43966, - 0, 32768, 40960, 43008, 44032, 44033, 43904, 0, - 32768, 40960, 43008, 44032, 44033, 43904, 43968, 0, - 32768, 40960, 43008, 44032, 44033, 43904, 43968, 0, - 32768, 40960, 43008, 44032, 44033, 43904, 43968, 43970, - 0, 32768, 40960, 43008, 44032, 44033, 44035, 43968, - 0, 32768, 40960, 43008, 44032, 44033, 44035, 43968, - 43972, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 43968, 43972, 0, 32768, 40960, 43008, 44032, 44033, - 44035, 43968, 43976, 43974, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 43968, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 43968, 43976, 0, 32768, 40960, - 43008, 44032, 44033, 44035, 43968, 43976, 0, 32768, - 40960, 43008, 44032, 44033, 44035, 43968, 43976, 43978, - 0, 32768, 40960, 43008, 44032, 44033, 44035, 43968, - 43976, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 43968, 43984, 43980, 0, 32768, 40960, 43008, 44032, - 44033, 44035, 43968, 43984, 43980, 0, 32768, 40960, - 43008, 44032, 44033, 44035, 43968, 43984, 43985, 43982, - 0, 32768, 40960, 43008, 44032, 44033, 44035, 43968, - 0, 32768, 40960, 43008, 44032, 44033, 44035, 43968, - 43984, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 43968, 43984, 0, 32768, 40960, 43008, 44032, 44033, - 44035, 43968, 43984, 43986, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 43968, 43984, 0, 32768, 40960, - 43008, 44032, 44033, 44035, 43968, 43984, 43988, 0, - 32768, 40960, 43008, 44032, 44033, 44035, 43968, 43984, - 43988, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 43968, 43984, 43992, 43990, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 43968, 43984, 0, 32768, 40960, - 43008, 44032, 44033, 44035, 43968, 44000, 43992, 0, - 32768, 40960, 43008, 44032, 44033, 44035, 43968, 44000, - 43992, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 43968, 44000, 43992, 43994, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 43968, 44000, 43992, 0, 32768, - 40960, 43008, 44032, 44033, 44035, 43968, 44000, 44001, - 43996, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 43968, 44000, 44001, 43996, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 43968, 44000, 44001, 43996, 43998, - 0, 32768, 40960, 43008, 44032, 44033, 44035, 43968, - 0, 32768, 40960, 43008, 44032, 44033, 44035, 43968, - 44000, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 43968, 44000, 0, 32768, 40960, 43008, 44032, 44033, - 44035, 43968, 44000, 44002, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 43968, 44000, 0, 32768, 40960, - 43008, 44032, 44033, 44035, 43968, 44000, 44004, 0, - 32768, 40960, 43008, 44032, 44033, 44035, 43968, 44000, - 44004, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 43968, 44000, 44008, 44006, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 44039, 44000, 0, 32768, 40960, - 43008, 44032, 44033, 44035, 44039, 44000, 44008, 0, - 32768, 40960, 43008, 44032, 44033, 44035, 44039, 44000, - 44008, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 44039, 44000, 44008, 44010, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 44039, 44000, 44008, 0, 32768, - 40960, 43008, 44032, 44033, 44035, 44039, 44000, 44016, - 44012, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 44039, 44000, 44016, 44012, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 44039, 44000, 44016, 44017, 44014, - 0, 32768, 40960, 43008, 44032, 44033, 44035, 44039, - 44000, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 44039, 44000, 44016, 0, 32768, 40960, 43008, 44032, - 44033, 44035, 44039, 44000, 44016, 0, 32768, 40960, - 43008, 44032, 44033, 44035, 44039, 44000, 44016, 44018, - 0, 32768, 40960, 43008, 44032, 44033, 44035, 44039, - 44000, 44016, 0, 32768, 40960, 43008, 44032, 44033, - 44035, 44039, 44000, 44016, 44020, 0, 32768, 40960, - 43008, 44032, 44033, 44035, 44039, 44000, 44016, 44020, - 0, 32768, 40960, 43008, 44032, 44033, 44035, 44039, - 44000, 44016, 44024, 44022, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 44039, 44000, 44016, 0, 32768, - 40960, 43008, 44032, 44033, 44035, 44039, 44000, 44016, - 44024, 0, 32768, 40960, 43008, 44032, 44033, 44035, - 44039, 44000, 44016, 44024, 0, 32768, 40960, 43008, - 44032, 44033, 44035, 44039, 44000, 44016, 44024, 44026, - 0, 32768, 40960, 43008, 44032, 44033, 44035, 44039, - 44000, 44016, 44024, 0, 32768, 40960, 43008, 44032, - 44033, 44035, 44039, 44000, 44016, 44024, 44028, 0, - 32768, 40960, 43008, 44032, 44033, 44035, 44039, 44000, - 44016, 44024, 44028, 0, 32768, 40960, 43008, 44032, - 44033, 44035, 44039, 44000, 44016, 44024, 44028, 44030, - 0, 32768, 40960, 43008, 0, 32768, 40960, 43008, - 44032, 0, 32768, 40960, 43008, 44032, 0, 32768, - 40960, 43008, 44032, 44034, 0, 32768, 40960, 43008, - 44032, 0, 32768, 40960, 43008, 44032, 44036, 0, - 32768, 40960, 43008, 44032, 44036, 0, 32768, 40960, - 43008, 44032, 44040, 44038, 0, 32768, 40960, 43008, - 44032, 0, 32768, 40960, 43008, 44032, 44040, 0, - 32768, 40960, 43008, 44032, 44040, 0, 32768, 40960, - 43008, 44032, 44040, 44042, 0, 32768, 40960, 43008, - 44032, 44040, 0, 32768, 40960, 43008, 44032, 44048, - 44044, 0, 32768, 40960, 43008, 44032, 44048, 44044, - 0, 32768, 40960, 43008, 44032, 44048, 44049, 44046, - 0, 32768, 40960, 43008, 44032, 0, 32768, 40960, - 43008, 44032, 44048, 0, 32768, 40960, 43008, 44032, - 44048, 0, 32768, 40960, 43008, 44032, 44048, 44050, - 0, 32768, 40960, 43008, 44032, 44048, 0, 32768, - 40960, 43008, 44032, 44048, 44052, 0, 32768, 40960, - 43008, 44032, 44048, 44052, 0, 32768, 40960, 43008, - 44032, 44048, 44056, 44054, 0, 32768, 40960, 43008, - 44032, 44048, 0, 32768, 40960, 43008, 44032, 44064, - 44056, 0, 32768, 40960, 43008, 44032, 44064, 44056, - 0, 32768, 40960, 43008, 44032, 44064, 44056, 44058, - 0, 32768, 40960, 43008, 44032, 44064, 44056, 0, - 32768, 40960, 43008, 44032, 44064, 44065, 44060, 0, - 32768, 40960, 43008, 44032, 44064, 44065, 44060, 0, - 32768, 40960, 43008, 44032, 44064, 44065, 44060, 44062, - 0, 32768, 40960, 43008, 44032, 0, 32768, 40960, - 43008, 44032, 44064, 0, 32768, 40960, 43008, 44032, - 44064, 0, 32768, 40960, 43008, 44032, 44064, 44066, - 0, 32768, 40960, 43008, 44032, 44064, 0, 32768, - 40960, 43008, 44032, 44064, 44068, 0, 32768, 40960, - 43008, 44032, 44064, 44068, 0, 32768, 40960, 43008, - 44032, 44064, 44072, 44070, 0, 32768, 40960, 43008, - 44032, 44064, 0, 32768, 40960, 43008, 44032, 44064, - 44072, 0, 32768, 40960, 43008, 44032, 44064, 44072, - 0, 32768, 40960, 43008, 44032, 44064, 44072, 44074, - 0, 32768, 40960, 43008, 44032, 44064, 44072, 0, - 32768, 40960, 43008, 44032, 44064, 44080, 44076, 0, - 32768, 40960, 43008, 44032, 44064, 44080, 44076, 0, - 32768, 40960, 43008, 44032, 44064, 44080, 44081, 44078, - 0, 32768, 40960, 43008, 44032, 44064, 0, 32768, - 40960, 43008, 44032, 44096, 44080, 0, 32768, 40960, - 43008, 44032, 44096, 44080, 0, 32768, 40960, 43008, - 44032, 44096, 44080, 44082, 0, 32768, 40960, 43008, - 44032, 44096, 44080, 0, 32768, 40960, 43008, 44032, - 44096, 44080, 44084, 0, 32768, 40960, 43008, 44032, - 44096, 44080, 44084, 0, 32768, 40960, 43008, 44032, - 44096, 44080, 44088, 44086, 0, 32768, 40960, 43008, - 44032, 44096, 44080, 0, 32768, 40960, 43008, 44032, - 44096, 44097, 44088, 0, 32768, 40960, 43008, 44032, - 44096, 44097, 44088, 0, 32768, 40960, 43008, 44032, - 44096, 44097, 44088, 44090, 0, 32768, 40960, 43008, - 44032, 44096, 44097, 44088, 0, 32768, 40960, 43008, - 44032, 44096, 44097, 44088, 44092, 0, 32768, 40960, - 43008, 44032, 44096, 44097, 44099, 44092, 0, 32768, - 40960, 43008, 44032, 44096, 44097, 44099, 44092, 44094, - 0, 32768, 40960, 43008, 44032, 0, 32768, 40960, - 43008, 44032, 44096, 0, 32768, 40960, 43008, 44032, - 44096, 0, 32768, 40960, 43008, 44032, 44096, 44098, - 0, 32768, 40960, 43008, 44032, 44096, 0, 32768, - 40960, 43008, 44032, 44096, 44100, 0, 32768, 40960, - 43008, 44032, 44096, 44100, 0, 32768, 40960, 43008, - 44032, 44096, 44104, 44102, 0, 32768, 40960, 43008, - 44032, 44096, 0, 32768, 40960, 43008, 44032, 44096, - 44104, 0, 32768, 40960, 43008, 44032, 44096, 44104, - 0, 32768, 40960, 43008, 44032, 44096, 44104, 44106, - 0, 32768, 40960, 43008, 44032, 44096, 44104, 0, - 32768, 40960, 43008, 44032, 44096, 44112, 44108, 0, - 32768, 40960, 43008, 44032, 44096, 44112, 44108, 0, - 32768, 40960, 43008, 44032, 44096, 44112, 44113, 44110, - 0, 32768, 40960, 43008, 44032, 44096, 0, 32768, - 40960, 43008, 44032, 44096, 44112, 0, 32768, 40960, - 43008, 44032, 44096, 44112, 0, 32768, 40960, 43008, - 44032, 44096, 44112, 44114, 0, 32768, 40960, 43008, - 44032, 44096, 44112, 0, 32768, 40960, 43008, 44032, - 44096, 44112, 44116, 0, 32768, 40960, 43008, 44032, - 44096, 44112, 44116, 0, 32768, 40960, 43008, 44032, - 44096, 44112, 44120, 44118, 0, 32768, 40960, 43008, - 44032, 44096, 44112, 0, 32768, 40960, 43008, 44032, - 44096, 44128, 44120, 0, 32768, 40960, 43008, 44032, - 44096, 44128, 44120, 0, 32768, 40960, 43008, 44032, - 44096, 44128, 44120, 44122, 0, 32768, 40960, 43008, - 44032, 44096, 44128, 44120, 0, 32768, 40960, 43008, - 44032, 44096, 44128, 44129, 44124, 0, 32768, 40960, - 43008, 44032, 44096, 44128, 44129, 44124, 0, 32768, - 40960, 43008, 44032, 44096, 44128, 44129, 44124, 44126, - 0, 32768, 40960, 43008, 44032, 44096, 0, 32768, - 40960, 43008, 44032, 44160, 44128, 0, 32768, 40960, - 43008, 44032, 44160, 44128, 0, 32768, 40960, 43008, - 44032, 44160, 44128, 44130, 0, 32768, 40960, 43008, - 44032, 44160, 44128, 0, 32768, 40960, 43008, 44032, - 44160, 44128, 44132, 0, 32768, 40960, 43008, 44032, - 44160, 44128, 44132, 0, 32768, 40960, 43008, 44032, - 44160, 44128, 44136, 44134, 0, 32768, 40960, 43008, - 44032, 44160, 44128, 0, 32768, 40960, 43008, 44032, - 44160, 44128, 44136, 0, 32768, 40960, 43008, 44032, - 44160, 44128, 44136, 0, 32768, 40960, 43008, 44032, - 44160, 44128, 44136, 44138, 0, 32768, 40960, 43008, - 44032, 44160, 44128, 44136, 0, 32768, 40960, 43008, - 44032, 44160, 44128, 44144, 44140, 0, 32768, 40960, - 43008, 44032, 44160, 44128, 44144, 44140, 0, 32768, - 40960, 43008, 44032, 44160, 44128, 44144, 44145, 44142, - 0, 32768, 40960, 43008, 44032, 44160, 44128, 0, - 32768, 40960, 43008, 44032, 44160, 44161, 44144, 0, - 32768, 40960, 43008, 44032, 44160, 44161, 44144, 0, - 32768, 40960, 43008, 44032, 44160, 44161, 44144, 44146, - 0, 32768, 40960, 43008, 44032, 44160, 44161, 44144, - 0, 32768, 40960, 43008, 44032, 44160, 44161, 44144, - 44148, 0, 32768, 40960, 43008, 44032, 44160, 44161, - 44144, 44148, 0, 32768, 40960, 43008, 44032, 44160, - 44161, 44144, 44152, 44150, 0, 32768, 40960, 43008, - 44032, 44160, 44161, 44144, 0, 32768, 40960, 43008, - 44032, 44160, 44161, 44144, 44152, 0, 32768, 40960, - 43008, 44032, 44160, 44161, 44163, 44152, 0, 32768, - 40960, 43008, 44032, 44160, 44161, 44163, 44152, 44154, - 0, 32768, 40960, 43008, 44032, 44160, 44161, 44163, - 44152, 0, 32768, 40960, 43008, 44032, 44160, 44161, - 44163, 44152, 44156, 0, 32768, 40960, 43008, 44032, - 44160, 44161, 44163, 44152, 44156, 0, 32768, 40960, - 43008, 44032, 44160, 44161, 44163, 44152, 44156, 44158, - 0, 32768, 40960, 43008, 44032, 0, 32768, 40960, - 43008, 44032, 44160, 0, 32768, 40960, 43008, 44032, - 44160, 0, 32768, 40960, 43008, 44032, 44160, 44162, - 0, 32768, 40960, 43008, 44032, 44160, 0, 32768, - 40960, 43008, 44032, 44160, 44164, 0, 32768, 40960, - 43008, 44032, 44160, 44164, 0, 32768, 40960, 43008, - 44032, 44160, 44168, 44166, 0, 32768, 40960, 43008, - 44032, 44160, 0, 32768, 40960, 43008, 44032, 44160, - 44168, 0, 32768, 40960, 43008, 44032, 44160, 44168, - 0, 32768, 40960, 43008, 44032, 44160, 44168, 44170, - 0, 32768, 40960, 43008, 44032, 44160, 44168, 0, - 32768, 40960, 43008, 44032, 44160, 44176, 44172, 0, - 32768, 40960, 43008, 44032, 44160, 44176, 44172, 0, - 32768, 40960, 43008, 44032, 44160, 44176, 44177, 44174, - 0, 32768, 40960, 43008, 44032, 44160, 0, 32768, - 40960, 43008, 44032, 44160, 44176, 0, 32768, 40960, - 43008, 44032, 44160, 44176, 0, 32768, 40960, 43008, - 44032, 44160, 44176, 44178, 0, 32768, 40960, 43008, - 44032, 44160, 44176, 0, 32768, 40960, 43008, 44032, - 44160, 44176, 44180, 0, 32768, 40960, 43008, 44032, - 44160, 44176, 44180, 0, 32768, 40960, 43008, 44032, - 44160, 44176, 44184, 44182, 0, 32768, 40960, 43008, - 44032, 44160, 44176, 0, 32768, 40960, 43008, 44032, - 44160, 44192, 44184, 0, 32768, 40960, 43008, 44032, - 44160, 44192, 44184, 0, 32768, 40960, 43008, 44032, - 44160, 44192, 44184, 44186, 0, 32768, 40960, 43008, - 44032, 44160, 44192, 44184, 0, 32768, 40960, 43008, - 44032, 44160, 44192, 44193, 44188, 0, 32768, 40960, - 43008, 44032, 44160, 44192, 44193, 44188, 0, 32768, - 40960, 43008, 44032, 44160, 44192, 44193, 44188, 44190, - 0, 32768, 40960, 43008, 44032, 44160, 0, 32768, - 40960, 43008, 44032, 44160, 44192, 0, 32768, 40960, - 43008, 44032, 44160, 44192, 0, 32768, 40960, 43008, - 44032, 44160, 44192, 44194, 0, 32768, 40960, 43008, - 44032, 44160, 44192, 0, 32768, 40960, 43008, 44032, - 44160, 44192, 44196, 0, 32768, 40960, 43008, 44032, - 44160, 44192, 44196, 0, 32768, 40960, 43008, 44032, - 44160, 44192, 44200, 44198, 0, 32768, 40960, 43008, - 44032, 44160, 44192, 0, 32768, 40960, 43008, 44032, - 44160, 44192, 44200, 0, 32768, 40960, 43008, 44032, - 44160, 44192, 44200, 0, 32768, 40960, 43008, 44032, - 44160, 44192, 44200, 44202, 0, 32768, 40960, 43008, - 44032, 44160, 44192, 44200, 0, 32768, 40960, 43008, - 44032, 44160, 44192, 44208, 44204, 0, 32768, 40960, - 43008, 44032, 44160, 44192, 44208, 44204, 0, 32768, - 40960, 43008, 44032, 44160, 44192, 44208, 44209, 44206, - 0, 32768, 40960, 43008, 44032, 44160, 44192, 0, - 32768, 40960, 43008, 44032, 44160, 44224, 44208, 0, - 32768, 40960, 43008, 44032, 44160, 44224, 44208, 0, - 32768, 40960, 43008, 44032, 44160, 44224, 44208, 44210, - 0, 32768, 40960, 43008, 44032, 44160, 44224, 44208, - 0, 32768, 40960, 43008, 44032, 44160, 44224, 44208, - 44212, 0, 32768, 40960, 43008, 44032, 44160, 44224, - 44208, 44212, 0, 32768, 40960, 43008, 44032, 44160, - 44224, 44208, 44216, 44214, 0, 32768, 40960, 43008, - 44032, 44160, 44224, 44208, 0, 32768, 40960, 43008, - 44032, 44160, 44224, 44225, 44216, 0, 32768, 40960, - 43008, 44032, 44160, 44224, 44225, 44216, 0, 32768, - 40960, 43008, 44032, 44160, 44224, 44225, 44216, 44218, - 0, 32768, 40960, 43008, 44032, 44160, 44224, 44225, - 44216, 0, 32768, 40960, 43008, 44032, 44160, 44224, - 44225, 44216, 44220, 0, 32768, 40960, 43008, 44032, - 44160, 44224, 44225, 44227, 44220, 0, 32768, 40960, - 43008, 44032, 44160, 44224, 44225, 44227, 44220, 44222, - 0, 32768, 40960, 43008, 44032, 44160, 0, 32768, - 40960, 43008, 44032, 44288, 44224, 0, 32768, 40960, - 43008, 44032, 44288, 44224, 0, 32768, 40960, 43008, - 44032, 44288, 44224, 44226, 0, 32768, 40960, 43008, - 44032, 44288, 44224, 0, 32768, 40960, 43008, 44032, - 44288, 44224, 44228, 0, 32768, 40960, 43008, 44032, - 44288, 44224, 44228, 0, 32768, 40960, 43008, 44032, - 44288, 44224, 44232, 44230, 0, 32768, 40960, 43008, - 44032, 44288, 44224, 0, 32768, 40960, 43008, 44032, - 44288, 44224, 44232, 0, 32768, 40960, 43008, 44032, - 44288, 44224, 44232, 0, 32768, 40960, 43008, 44032, - 44288, 44224, 44232, 44234, 0, 32768, 40960, 43008, - 44032, 44288, 44224, 44232, 0, 32768, 40960, 43008, - 44032, 44288, 44224, 44240, 44236, 0, 32768, 40960, - 43008, 44032, 44288, 44224, 44240, 44236, 0, 32768, - 40960, 43008, 44032, 44288, 44224, 44240, 44241, 44238, - 0, 32768, 40960, 43008, 44032, 44288, 44224, 0, - 32768, 40960, 43008, 44032, 44288, 44224, 44240, 0, - 32768, 40960, 43008, 44032, 44288, 44224, 44240, 0, - 32768, 40960, 43008, 44032, 44288, 44224, 44240, 44242, - 0, 32768, 40960, 43008, 44032, 44288, 44224, 44240, - 0, 32768, 40960, 43008, 44032, 44288, 44224, 44240, - 44244, 0, 32768, 40960, 43008, 44032, 44288, 44224, - 44240, 44244, 0, 32768, 40960, 43008, 44032, 44288, - 44224, 44240, 44248, 44246, 0, 32768, 40960, 43008, - 44032, 44288, 44224, 44240, 0, 32768, 40960, 43008, - 44032, 44288, 44224, 44256, 44248, 0, 32768, 40960, - 43008, 44032, 44288, 44224, 44256, 44248, 0, 32768, - 40960, 43008, 44032, 44288, 44224, 44256, 44248, 44250, - 0, 32768, 40960, 43008, 44032, 44288, 44224, 44256, - 44248, 0, 32768, 40960, 43008, 44032, 44288, 44224, - 44256, 44257, 44252, 0, 32768, 40960, 43008, 44032, - 44288, 44224, 44256, 44257, 44252, 0, 32768, 40960, - 43008, 44032, 44288, 44224, 44256, 44257, 44252, 44254, - 0, 32768, 40960, 43008, 44032, 44288, 44224, 0, - 32768, 40960, 43008, 44032, 44288, 44289, 44256, 0, - 32768, 40960, 43008, 44032, 44288, 44289, 44256, 0, - 32768, 40960, 43008, 44032, 44288, 44289, 44256, 44258, - 0, 32768, 40960, 43008, 44032, 44288, 44289, 44256, - 0, 32768, 40960, 43008, 44032, 44288, 44289, 44256, - 44260, 0, 32768, 40960, 43008, 44032, 44288, 44289, - 44256, 44260, 0, 32768, 40960, 43008, 44032, 44288, - 44289, 44256, 44264, 44262, 0, 32768, 40960, 43008, - 44032, 44288, 44289, 44256, 0, 32768, 40960, 43008, - 44032, 44288, 44289, 44256, 44264, 0, 32768, 40960, - 43008, 44032, 44288, 44289, 44256, 44264, 0, 32768, - 40960, 43008, 44032, 44288, 44289, 44256, 44264, 44266, - 0, 32768, 40960, 43008, 44032, 44288, 44289, 44256, - 44264, 0, 32768, 40960, 43008, 44032, 44288, 44289, - 44256, 44272, 44268, 0, 32768, 40960, 43008, 44032, - 44288, 44289, 44256, 44272, 44268, 0, 32768, 40960, - 43008, 44032, 44288, 44289, 44256, 44272, 44273, 44270, - 0, 32768, 40960, 43008, 44032, 44288, 44289, 44256, - 0, 32768, 40960, 43008, 44032, 44288, 44289, 44256, - 44272, 0, 32768, 40960, 43008, 44032, 44288, 44289, - 44291, 44272, 0, 32768, 40960, 43008, 44032, 44288, - 44289, 44291, 44272, 44274, 0, 32768, 40960, 43008, - 44032, 44288, 44289, 44291, 44272, 0, 32768, 40960, - 43008, 44032, 44288, 44289, 44291, 44272, 44276, 0, - 32768, 40960, 43008, 44032, 44288, 44289, 44291, 44272, - 44276, 0, 32768, 40960, 43008, 44032, 44288, 44289, - 44291, 44272, 44280, 44278, 0, 32768, 40960, 43008, - 44032, 44288, 44289, 44291, 44272, 0, 32768, 40960, - 43008, 44032, 44288, 44289, 44291, 44272, 44280, 0, - 32768, 40960, 43008, 44032, 44288, 44289, 44291, 44272, - 44280, 0, 32768, 40960, 43008, 44032, 44288, 44289, - 44291, 44272, 44280, 44282, 0, 32768, 40960, 43008, - 44032, 44288, 44289, 44291, 44295, 44280, 0, 32768, - 40960, 43008, 44032, 44288, 44289, 44291, 44295, 44280, - 44284, 0, 32768, 40960, 43008, 44032, 44288, 44289, - 44291, 44295, 44280, 44284, 0, 32768, 40960, 43008, - 44032, 44288, 44289, 44291, 44295, 44280, 44284, 44286, - 0, 32768, 40960, 43008, 44032, 0, 32768, 40960, - 45056, 44032, 44288, 0, 32768, 40960, 45056, 44032, - 44288, 0, 32768, 40960, 45056, 44032, 44288, 44290, - 0, 32768, 40960, 45056, 44032, 44288, 0, 32768, - 40960, 45056, 44032, 44288, 44292, 0, 32768, 40960, - 45056, 44032, 44288, 44292, 0, 32768, 40960, 45056, - 44032, 44288, 44296, 44294, 0, 32768, 40960, 45056, - 44032, 44288, 0, 32768, 40960, 45056, 44032, 44288, - 44296, 0, 32768, 40960, 45056, 44032, 44288, 44296, - 0, 32768, 40960, 45056, 44032, 44288, 44296, 44298, - 0, 32768, 40960, 45056, 44032, 44288, 44296, 0, - 32768, 40960, 45056, 44032, 44288, 44304, 44300, 0, - 32768, 40960, 45056, 44032, 44288, 44304, 44300, 0, - 32768, 40960, 45056, 44032, 44288, 44304, 44305, 44302, - 0, 32768, 40960, 45056, 44032, 44288, 0, 32768, - 40960, 45056, 44032, 44288, 44304, 0, 32768, 40960, - 45056, 44032, 44288, 44304, 0, 32768, 40960, 45056, - 44032, 44288, 44304, 44306, 0, 32768, 40960, 45056, - 44032, 44288, 44304, 0, 32768, 40960, 45056, 44032, - 44288, 44304, 44308, 0, 32768, 40960, 45056, 44032, - 44288, 44304, 44308, 0, 32768, 40960, 45056, 44032, - 44288, 44304, 44312, 44310, 0, 32768, 40960, 45056, - 44032, 44288, 44304, 0, 32768, 40960, 45056, 44032, - 44288, 44320, 44312, 0, 32768, 40960, 45056, 44032, - 44288, 44320, 44312, 0, 32768, 40960, 45056, 44032, - 44288, 44320, 44312, 44314, 0, 32768, 40960, 45056, - 44032, 44288, 44320, 44312, 0, 32768, 40960, 45056, - 44032, 44288, 44320, 44321, 44316, 0, 32768, 40960, - 45056, 44032, 44288, 44320, 44321, 44316, 0, 32768, - 40960, 45056, 44032, 44288, 44320, 44321, 44316, 44318, - 0, 32768, 40960, 45056, 44032, 44288, 0, 32768, - 40960, 45056, 44032, 44288, 44320, 0, 32768, 40960, - 45056, 44032, 44288, 44320, 0, 32768, 40960, 45056, - 44032, 44288, 44320, 44322, 0, 32768, 40960, 45056, - 44032, 44288, 44320, 0, 32768, 40960, 45056, 44032, - 44288, 44320, 44324, 0, 32768, 40960, 45056, 44032, - 44288, 44320, 44324, 0, 32768, 40960, 45056, 44032, - 44288, 44320, 44328, 44326, 0, 32768, 40960, 45056, - 44032, 44288, 44320, 0, 32768, 40960, 45056, 44032, - 44288, 44320, 44328, 0, 32768, 40960, 45056, 44032, - 44288, 44320, 44328, 0, 32768, 40960, 45056, 44032, - 44288, 44320, 44328, 44330, 0, 32768, 40960, 45056, - 44032, 44288, 44320, 44328, 0, 32768, 40960, 45056, - 44032, 44288, 44320, 44336, 44332, 0, 32768, 40960, - 45056, 44032, 44288, 44320, 44336, 44332, 0, 32768, - 40960, 45056, 44032, 44288, 44320, 44336, 44337, 44334, - 0, 32768, 40960, 45056, 44032, 44288, 44320, 0, - 32768, 40960, 45056, 44032, 44288, 44352, 44336, 0, - 32768, 40960, 45056, 44032, 44288, 44352, 44336, 0, - 32768, 40960, 45056, 44032, 44288, 44352, 44336, 44338, - 0, 32768, 40960, 45056, 44032, 44288, 44352, 44336, - 0, 32768, 40960, 45056, 44032, 44288, 44352, 44336, - 44340, 0, 32768, 40960, 45056, 44032, 44288, 44352, - 44336, 44340, 0, 32768, 40960, 45056, 44032, 44288, - 44352, 44336, 44344, 44342, 0, 32768, 40960, 45056, - 44032, 44288, 44352, 44336, 0, 32768, 40960, 45056, - 44032, 44288, 44352, 44353, 44344, 0, 32768, 40960, - 45056, 44032, 44288, 44352, 44353, 44344, 0, 32768, - 40960, 45056, 44032, 44288, 44352, 44353, 44344, 44346, - 0, 32768, 40960, 45056, 44032, 44288, 44352, 44353, - 44344, 0, 32768, 40960, 45056, 44032, 44288, 44352, - 44353, 44344, 44348, 0, 32768, 40960, 45056, 44032, - 44288, 44352, 44353, 44355, 44348, 0, 32768, 40960, - 45056, 44032, 44288, 44352, 44353, 44355, 44348, 44350, - 0, 32768, 40960, 45056, 44032, 44288, 0, 32768, - 40960, 45056, 44032, 44288, 44352, 0, 32768, 40960, - 45056, 44032, 44288, 44352, 0, 32768, 40960, 45056, - 44032, 44288, 44352, 44354, 0, 32768, 40960, 45056, - 44032, 44288, 44352, 0, 32768, 40960, 45056, 44032, - 44288, 44352, 44356, 0, 32768, 40960, 45056, 44032, - 44288, 44352, 44356, 0, 32768, 40960, 45056, 44032, - 44288, 44352, 44360, 44358, 0, 32768, 40960, 45056, - 44032, 44288, 44352, 0, 32768, 40960, 45056, 44032, - 44288, 44352, 44360, 0, 32768, 40960, 45056, 44032, - 44288, 44352, 44360, 0, 32768, 40960, 45056, 44032, - 44288, 44352, 44360, 44362, 0, 32768, 40960, 45056, - 44032, 44288, 44352, 44360, 0, 32768, 40960, 45056, - 44032, 44288, 44352, 44368, 44364, 0, 32768, 40960, - 45056, 44032, 44288, 44352, 44368, 44364, 0, 32768, - 40960, 45056, 44032, 44288, 44352, 44368, 44369, 44366, - 0, 32768, 40960, 45056, 44032, 44288, 44352, 0, - 32768, 40960, 45056, 44032, 44288, 44352, 44368, 0, - 32768, 40960, 45056, 44032, 44288, 44352, 44368, 0, - 32768, 40960, 45056, 44032, 44288, 44352, 44368, 44370, - 0, 32768, 40960, 45056, 44032, 44288, 44352, 44368, - 0, 32768, 40960, 45056, 44032, 44288, 44352, 44368, - 44372, 0, 32768, 40960, 45056, 44032, 44288, 44352, - 44368, 44372, 0, 32768, 40960, 45056, 44032, 44288, - 44352, 44368, 44376, 44374, 0, 32768, 40960, 45056, - 44032, 44288, 44352, 44368, 0, 32768, 40960, 45056, - 44032, 44288, 44352, 44384, 44376, 0, 32768, 40960, - 45056, 44032, 44288, 44352, 44384, 44376, 0, 32768, - 40960, 45056, 44032, 44288, 44352, 44384, 44376, 44378, - 0, 32768, 40960, 45056, 44032, 44288, 44352, 44384, - 44376, 0, 32768, 40960, 45056, 44032, 44288, 44352, - 44384, 44385, 44380, 0, 32768, 40960, 45056, 44032, - 44288, 44352, 44384, 44385, 44380, 0, 32768, 40960, - 45056, 44032, 44288, 44352, 44384, 44385, 44380, 44382, - 0, 32768, 40960, 45056, 44032, 44288, 44352, 0, - 32768, 40960, 45056, 44032, 44288, 44416, 44384, 0, - 32768, 40960, 45056, 44032, 44288, 44416, 44384, 0, - 32768, 40960, 45056, 44032, 44288, 44416, 44384, 44386, - 0, 32768, 40960, 45056, 44032, 44288, 44416, 44384, - 0, 32768, 40960, 45056, 44032, 44288, 44416, 44384, - 44388, 0, 32768, 40960, 45056, 44032, 44288, 44416, - 44384, 44388, 0, 32768, 40960, 45056, 44032, 44288, - 44416, 44384, 44392, 44390, 0, 32768, 40960, 45056, - 44032, 44288, 44416, 44384, 0, 32768, 40960, 45056, - 44032, 44288, 44416, 44384, 44392, 0, 32768, 40960, - 45056, 44032, 44288, 44416, 44384, 44392, 0, 32768, - 40960, 45056, 44032, 44288, 44416, 44384, 44392, 44394, - 0, 32768, 40960, 45056, 44032, 44288, 44416, 44384, - 44392, 0, 32768, 40960, 45056, 44032, 44288, 44416, - 44384, 44400, 44396, 0, 32768, 40960, 45056, 44032, - 44288, 44416, 44384, 44400, 44396, 0, 32768, 40960, - 45056, 44032, 44288, 44416, 44384, 44400, 44401, 44398, - 0, 32768, 40960, 45056, 44032, 44288, 44416, 44384, - 0, 32768, 40960, 45056, 44032, 44288, 44416, 44417, - 44400, 0, 32768, 40960, 45056, 44032, 44288, 44416, - 44417, 44400, 0, 32768, 40960, 45056, 44032, 44288, - 44416, 44417, 44400, 44402, 0, 32768, 40960, 45056, - 44032, 44288, 44416, 44417, 44400, 0, 32768, 40960, - 45056, 44032, 44288, 44416, 44417, 44400, 44404, 0, - 32768, 40960, 45056, 44032, 44288, 44416, 44417, 44400, - 44404, 0, 32768, 40960, 45056, 44032, 44288, 44416, - 44417, 44400, 44408, 44406, 0, 32768, 40960, 45056, - 44032, 44288, 44416, 44417, 44400, 0, 32768, 40960, - 45056, 44032, 44288, 44416, 44417, 44400, 44408, 0, - 32768, 40960, 45056, 44032, 44288, 44416, 44417, 44419, - 44408, 0, 32768, 40960, 45056, 44032, 44288, 44416, - 44417, 44419, 44408, 44410, 0, 32768, 40960, 45056, - 44032, 44288, 44416, 44417, 44419, 44408, 0, 32768, - 40960, 45056, 44032, 44288, 44416, 44417, 44419, 44408, - 44412, 0, 32768, 40960, 45056, 44032, 44288, 44416, - 44417, 44419, 44408, 44412, 0, 32768, 40960, 45056, - 44032, 44288, 44416, 44417, 44419, 44408, 44412, 44414, - 0, 32768, 40960, 45056, 44032, 44288, 0, 32768, - 40960, 45056, 44032, 44544, 44416, 0, 32768, 40960, - 45056, 44032, 44544, 44416, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 44418, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 0, 32768, 40960, 45056, 44032, - 44544, 44416, 44420, 0, 32768, 40960, 45056, 44032, - 44544, 44416, 44420, 0, 32768, 40960, 45056, 44032, - 44544, 44416, 44424, 44422, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 0, 32768, 40960, 45056, 44032, - 44544, 44416, 44424, 0, 32768, 40960, 45056, 44032, - 44544, 44416, 44424, 0, 32768, 40960, 45056, 44032, - 44544, 44416, 44424, 44426, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 44424, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 44432, 44428, 0, 32768, 40960, - 45056, 44032, 44544, 44416, 44432, 44428, 0, 32768, - 40960, 45056, 44032, 44544, 44416, 44432, 44433, 44430, - 0, 32768, 40960, 45056, 44032, 44544, 44416, 0, - 32768, 40960, 45056, 44032, 44544, 44416, 44432, 0, - 32768, 40960, 45056, 44032, 44544, 44416, 44432, 0, - 32768, 40960, 45056, 44032, 44544, 44416, 44432, 44434, - 0, 32768, 40960, 45056, 44032, 44544, 44416, 44432, - 0, 32768, 40960, 45056, 44032, 44544, 44416, 44432, - 44436, 0, 32768, 40960, 45056, 44032, 44544, 44416, - 44432, 44436, 0, 32768, 40960, 45056, 44032, 44544, - 44416, 44432, 44440, 44438, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 44432, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 44448, 44440, 0, 32768, 40960, - 45056, 44032, 44544, 44416, 44448, 44440, 0, 32768, - 40960, 45056, 44032, 44544, 44416, 44448, 44440, 44442, - 0, 32768, 40960, 45056, 44032, 44544, 44416, 44448, - 44440, 0, 32768, 40960, 45056, 44032, 44544, 44416, - 44448, 44449, 44444, 0, 32768, 40960, 45056, 44032, - 44544, 44416, 44448, 44449, 44444, 0, 32768, 40960, - 45056, 44032, 44544, 44416, 44448, 44449, 44444, 44446, - 0, 32768, 40960, 45056, 44032, 44544, 44416, 0, - 32768, 40960, 45056, 44032, 44544, 44416, 44448, 0, - 32768, 40960, 45056, 44032, 44544, 44416, 44448, 0, - 32768, 40960, 45056, 44032, 44544, 44416, 44448, 44450, - 0, 32768, 40960, 45056, 44032, 44544, 44416, 44448, - 0, 32768, 40960, 45056, 44032, 44544, 44416, 44448, - 44452, 0, 32768, 40960, 45056, 44032, 44544, 44416, - 44448, 44452, 0, 32768, 40960, 45056, 44032, 44544, - 44416, 44448, 44456, 44454, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 44448, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 44448, 44456, 0, 32768, 40960, - 45056, 44032, 44544, 44416, 44448, 44456, 0, 32768, - 40960, 45056, 44032, 44544, 44416, 44448, 44456, 44458, - 0, 32768, 40960, 45056, 44032, 44544, 44416, 44448, - 44456, 0, 32768, 40960, 45056, 44032, 44544, 44416, - 44448, 44464, 44460, 0, 32768, 40960, 45056, 44032, - 44544, 44416, 44448, 44464, 44460, 0, 32768, 40960, - 45056, 44032, 44544, 44416, 44448, 44464, 44465, 44462, - 0, 32768, 40960, 45056, 44032, 44544, 44416, 44448, - 0, 32768, 40960, 45056, 44032, 44544, 44416, 44480, - 44464, 0, 32768, 40960, 45056, 44032, 44544, 44416, - 44480, 44464, 0, 32768, 40960, 45056, 44032, 44544, - 44416, 44480, 44464, 44466, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 44480, 44464, 0, 32768, 40960, - 45056, 44032, 44544, 44416, 44480, 44464, 44468, 0, - 32768, 40960, 45056, 44032, 44544, 44416, 44480, 44464, - 44468, 0, 32768, 40960, 45056, 44032, 44544, 44416, - 44480, 44464, 44472, 44470, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 44480, 44464, 0, 32768, 40960, - 45056, 44032, 44544, 44416, 44480, 44481, 44472, 0, - 32768, 40960, 45056, 44032, 44544, 44416, 44480, 44481, - 44472, 0, 32768, 40960, 45056, 44032, 44544, 44416, - 44480, 44481, 44472, 44474, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 44480, 44481, 44472, 0, 32768, - 40960, 45056, 44032, 44544, 44416, 44480, 44481, 44472, - 44476, 0, 32768, 40960, 45056, 44032, 44544, 44416, - 44480, 44481, 44483, 44476, 0, 32768, 40960, 45056, - 44032, 44544, 44416, 44480, 44481, 44483, 44476, 44478, - 0, 32768, 40960, 45056, 44032, 44544, 44416, 0, - 32768, 40960, 45056, 44032, 44544, 44545, 44480, 0, - 32768, 40960, 45056, 44032, 44544, 44545, 44480, 0, - 32768, 40960, 45056, 44032, 44544, 44545, 44480, 44482, - 0, 32768, 40960, 45056, 44032, 44544, 44545, 44480, - 0, 32768, 40960, 45056, 44032, 44544, 44545, 44480, - 44484, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44480, 44484, 0, 32768, 40960, 45056, 44032, 44544, - 44545, 44480, 44488, 44486, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44480, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44480, 44488, 0, 32768, 40960, - 45056, 44032, 44544, 44545, 44480, 44488, 0, 32768, - 40960, 45056, 44032, 44544, 44545, 44480, 44488, 44490, - 0, 32768, 40960, 45056, 44032, 44544, 44545, 44480, - 44488, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44480, 44496, 44492, 0, 32768, 40960, 45056, 44032, - 44544, 44545, 44480, 44496, 44492, 0, 32768, 40960, - 45056, 44032, 44544, 44545, 44480, 44496, 44497, 44494, - 0, 32768, 40960, 45056, 44032, 44544, 44545, 44480, - 0, 32768, 40960, 45056, 44032, 44544, 44545, 44480, - 44496, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44480, 44496, 0, 32768, 40960, 45056, 44032, 44544, - 44545, 44480, 44496, 44498, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44480, 44496, 0, 32768, 40960, - 45056, 44032, 44544, 44545, 44480, 44496, 44500, 0, - 32768, 40960, 45056, 44032, 44544, 44545, 44480, 44496, - 44500, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44480, 44496, 44504, 44502, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44480, 44496, 0, 32768, 40960, - 45056, 44032, 44544, 44545, 44480, 44512, 44504, 0, - 32768, 40960, 45056, 44032, 44544, 44545, 44480, 44512, - 44504, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44480, 44512, 44504, 44506, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44480, 44512, 44504, 0, 32768, - 40960, 45056, 44032, 44544, 44545, 44480, 44512, 44513, - 44508, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44480, 44512, 44513, 44508, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44480, 44512, 44513, 44508, 44510, - 0, 32768, 40960, 45056, 44032, 44544, 44545, 44480, - 0, 32768, 40960, 45056, 44032, 44544, 44545, 44480, - 44512, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44547, 44512, 0, 32768, 40960, 45056, 44032, 44544, - 44545, 44547, 44512, 44514, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44547, 44512, 0, 32768, 40960, - 45056, 44032, 44544, 44545, 44547, 44512, 44516, 0, - 32768, 40960, 45056, 44032, 44544, 44545, 44547, 44512, - 44516, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44547, 44512, 44520, 44518, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44547, 44512, 0, 32768, 40960, - 45056, 44032, 44544, 44545, 44547, 44512, 44520, 0, - 32768, 40960, 45056, 44032, 44544, 44545, 44547, 44512, - 44520, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44547, 44512, 44520, 44522, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44547, 44512, 44520, 0, 32768, - 40960, 45056, 44032, 44544, 44545, 44547, 44512, 44528, - 44524, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44547, 44512, 44528, 44524, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44547, 44512, 44528, 44529, 44526, - 0, 32768, 40960, 45056, 44032, 44544, 44545, 44547, - 44512, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44547, 44512, 44528, 0, 32768, 40960, 45056, 44032, - 44544, 44545, 44547, 44512, 44528, 0, 32768, 40960, - 45056, 44032, 44544, 44545, 44547, 44512, 44528, 44530, - 0, 32768, 40960, 45056, 44032, 44544, 44545, 44547, - 44551, 44528, 0, 32768, 40960, 45056, 44032, 44544, - 44545, 44547, 44551, 44528, 44532, 0, 32768, 40960, - 45056, 44032, 44544, 44545, 44547, 44551, 44528, 44532, - 0, 32768, 40960, 45056, 44032, 44544, 44545, 44547, - 44551, 44528, 44536, 44534, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44547, 44551, 44528, 0, 32768, - 40960, 45056, 44032, 44544, 44545, 44547, 44551, 44528, - 44536, 0, 32768, 40960, 45056, 44032, 44544, 44545, - 44547, 44551, 44528, 44536, 0, 32768, 40960, 45056, - 44032, 44544, 44545, 44547, 44551, 44528, 44536, 44538, - 0, 32768, 40960, 45056, 44032, 44544, 44545, 44547, - 44551, 44528, 44536, 0, 32768, 40960, 45056, 44032, - 44544, 44545, 44547, 44551, 44528, 44536, 44540, 0, - 32768, 40960, 45056, 44032, 44544, 44545, 44547, 44551, - 44528, 44536, 44540, 0, 32768, 40960, 45056, 44032, - 44544, 44545, 44547, 44551, 44528, 44536, 44540, 44542, - 0, 32768, 40960, 45056, 44032, 0, 32768, 40960, - 45056, 44032, 44544, 0, 32768, 40960, 45056, 45057, - 44544, 0, 32768, 40960, 45056, 45057, 44544, 44546, - 0, 32768, 40960, 45056, 45057, 44544, 0, 32768, - 40960, 45056, 45057, 44544, 44548, 0, 32768, 40960, - 45056, 45057, 44544, 44548, 0, 32768, 40960, 45056, - 45057, 44544, 44552, 44550, 0, 32768, 40960, 45056, - 45057, 44544, 0, 32768, 40960, 45056, 45057, 44544, - 44552, 0, 32768, 40960, 45056, 45057, 44544, 44552, - 0, 32768, 40960, 45056, 45057, 44544, 44552, 44554, - 0, 32768, 40960, 45056, 45057, 44544, 44552, 0, - 32768, 40960, 45056, 45057, 44544, 44560, 44556, 0, - 32768, 40960, 45056, 45057, 44544, 44560, 44556, 0, - 32768, 40960, 45056, 45057, 44544, 44560, 44561, 44558, - 0, 32768, 40960, 45056, 45057, 44544, 0, 32768, - 40960, 45056, 45057, 44544, 44560, 0, 32768, 40960, - 45056, 45057, 44544, 44560, 0, 32768, 40960, 45056, - 45057, 44544, 44560, 44562, 0, 32768, 40960, 45056, - 45057, 44544, 44560, 0, 32768, 40960, 45056, 45057, - 44544, 44560, 44564, 0, 32768, 40960, 45056, 45057, - 44544, 44560, 44564, 0, 32768, 40960, 45056, 45057, - 44544, 44560, 44568, 44566, 0, 32768, 40960, 45056, - 45057, 44544, 44560, 0, 32768, 40960, 45056, 45057, - 44544, 44576, 44568, 0, 32768, 40960, 45056, 45057, - 44544, 44576, 44568, 0, 32768, 40960, 45056, 45057, - 44544, 44576, 44568, 44570, 0, 32768, 40960, 45056, - 45057, 44544, 44576, 44568, 0, 32768, 40960, 45056, - 45057, 44544, 44576, 44577, 44572, 0, 32768, 40960, - 45056, 45057, 44544, 44576, 44577, 44572, 0, 32768, - 40960, 45056, 45057, 44544, 44576, 44577, 44572, 44574, - 0, 32768, 40960, 45056, 45057, 44544, 0, 32768, - 40960, 45056, 45057, 44544, 44576, 0, 32768, 40960, - 45056, 45057, 44544, 44576, 0, 32768, 40960, 45056, - 45057, 44544, 44576, 44578, 0, 32768, 40960, 45056, - 45057, 44544, 44576, 0, 32768, 40960, 45056, 45057, - 44544, 44576, 44580, 0, 32768, 40960, 45056, 45057, - 44544, 44576, 44580, 0, 32768, 40960, 45056, 45057, - 44544, 44576, 44584, 44582, 0, 32768, 40960, 45056, - 45057, 44544, 44576, 0, 32768, 40960, 45056, 45057, - 44544, 44576, 44584, 0, 32768, 40960, 45056, 45057, - 44544, 44576, 44584, 0, 32768, 40960, 45056, 45057, - 44544, 44576, 44584, 44586, 0, 32768, 40960, 45056, - 45057, 44544, 44576, 44584, 0, 32768, 40960, 45056, - 45057, 44544, 44576, 44592, 44588, 0, 32768, 40960, - 45056, 45057, 44544, 44576, 44592, 44588, 0, 32768, - 40960, 45056, 45057, 44544, 44576, 44592, 44593, 44590, - 0, 32768, 40960, 45056, 45057, 44544, 44576, 0, - 32768, 40960, 45056, 45057, 44544, 44608, 44592, 0, - 32768, 40960, 45056, 45057, 44544, 44608, 44592, 0, - 32768, 40960, 45056, 45057, 44544, 44608, 44592, 44594, - 0, 32768, 40960, 45056, 45057, 44544, 44608, 44592, - 0, 32768, 40960, 45056, 45057, 44544, 44608, 44592, - 44596, 0, 32768, 40960, 45056, 45057, 44544, 44608, - 44592, 44596, 0, 32768, 40960, 45056, 45057, 44544, - 44608, 44592, 44600, 44598, 0, 32768, 40960, 45056, - 45057, 44544, 44608, 44592, 0, 32768, 40960, 45056, - 45057, 44544, 44608, 44609, 44600, 0, 32768, 40960, - 45056, 45057, 44544, 44608, 44609, 44600, 0, 32768, - 40960, 45056, 45057, 44544, 44608, 44609, 44600, 44602, - 0, 32768, 40960, 45056, 45057, 44544, 44608, 44609, - 44600, 0, 32768, 40960, 45056, 45057, 44544, 44608, - 44609, 44600, 44604, 0, 32768, 40960, 45056, 45057, - 44544, 44608, 44609, 44611, 44604, 0, 32768, 40960, - 45056, 45057, 44544, 44608, 44609, 44611, 44604, 44606, - 0, 32768, 40960, 45056, 45057, 44544, 0, 32768, - 40960, 45056, 45057, 44544, 44608, 0, 32768, 40960, - 45056, 45057, 44544, 44608, 0, 32768, 40960, 45056, - 45057, 44544, 44608, 44610, 0, 32768, 40960, 45056, - 45057, 44544, 44608, 0, 32768, 40960, 45056, 45057, - 44544, 44608, 44612, 0, 32768, 40960, 45056, 45057, - 44544, 44608, 44612, 0, 32768, 40960, 45056, 45057, - 44544, 44608, 44616, 44614, 0, 32768, 40960, 45056, - 45057, 44544, 44608, 0, 32768, 40960, 45056, 45057, - 44544, 44608, 44616, 0, 32768, 40960, 45056, 45057, - 44544, 44608, 44616, 0, 32768, 40960, 45056, 45057, - 44544, 44608, 44616, 44618, 0, 32768, 40960, 45056, - 45057, 44544, 44608, 44616, 0, 32768, 40960, 45056, - 45057, 44544, 44608, 44624, 44620, 0, 32768, 40960, - 45056, 45057, 44544, 44608, 44624, 44620, 0, 32768, - 40960, 45056, 45057, 44544, 44608, 44624, 44625, 44622, - 0, 32768, 40960, 45056, 45057, 44544, 44608, 0, - 32768, 40960, 45056, 45057, 44544, 44608, 44624, 0, - 32768, 40960, 45056, 45057, 44544, 44608, 44624, 0, - 32768, 40960, 45056, 45057, 44544, 44608, 44624, 44626, - 0, 32768, 40960, 45056, 45057, 44544, 44608, 44624, - 0, 32768, 40960, 45056, 45057, 44544, 44608, 44624, - 44628, 0, 32768, 40960, 45056, 45057, 44544, 44608, - 44624, 44628, 0, 32768, 40960, 45056, 45057, 44544, - 44608, 44624, 44632, 44630, 0, 32768, 40960, 45056, - 45057, 44544, 44608, 44624, 0, 32768, 40960, 45056, - 45057, 44544, 44608, 44640, 44632, 0, 32768, 40960, - 45056, 45057, 44544, 44608, 44640, 44632, 0, 32768, - 40960, 45056, 45057, 44544, 44608, 44640, 44632, 44634, - 0, 32768, 40960, 45056, 45057, 44544, 44608, 44640, - 44632, 0, 32768, 40960, 45056, 45057, 44544, 44608, - 44640, 44641, 44636, 0, 32768, 40960, 45056, 45057, - 44544, 44608, 44640, 44641, 44636, 0, 32768, 40960, - 45056, 45057, 44544, 44608, 44640, 44641, 44636, 44638, - 0, 32768, 40960, 45056, 45057, 44544, 44608, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44640, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44640, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44640, 44642, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44640, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44640, - 44644, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44640, 44644, 0, 32768, 40960, 45056, 45057, 44544, - 44672, 44640, 44648, 44646, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44640, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44640, 44648, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 44640, 44648, 0, 32768, - 40960, 45056, 45057, 44544, 44672, 44640, 44648, 44650, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44640, - 44648, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44640, 44656, 44652, 0, 32768, 40960, 45056, 45057, - 44544, 44672, 44640, 44656, 44652, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 44640, 44656, 44657, 44654, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44640, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44673, - 44656, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44673, 44656, 0, 32768, 40960, 45056, 45057, 44544, - 44672, 44673, 44656, 44658, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44673, 44656, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 44673, 44656, 44660, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44673, 44656, - 44660, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44673, 44656, 44664, 44662, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44673, 44656, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 44673, 44656, 44664, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44673, 44675, - 44664, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44673, 44675, 44664, 44666, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44673, 44675, 44664, 0, 32768, - 40960, 45056, 45057, 44544, 44672, 44673, 44675, 44664, - 44668, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44673, 44675, 44664, 44668, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44673, 44675, 44664, 44668, 44670, - 0, 32768, 40960, 45056, 45057, 44544, 0, 32768, - 40960, 45056, 45057, 44544, 44672, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44674, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 0, 32768, 40960, 45056, 45057, - 44544, 44672, 44676, 0, 32768, 40960, 45056, 45057, - 44544, 44672, 44676, 0, 32768, 40960, 45056, 45057, - 44544, 44672, 44680, 44678, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 0, 32768, 40960, 45056, 45057, - 44544, 44672, 44680, 0, 32768, 40960, 45056, 45057, - 44544, 44672, 44680, 0, 32768, 40960, 45056, 45057, - 44544, 44672, 44680, 44682, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44680, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44688, 44684, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 44688, 44684, 0, 32768, - 40960, 45056, 45057, 44544, 44672, 44688, 44689, 44686, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44688, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44688, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44688, 44690, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44688, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44688, - 44692, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44688, 44692, 0, 32768, 40960, 45056, 45057, 44544, - 44672, 44688, 44696, 44694, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44688, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44704, 44696, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 44704, 44696, 0, 32768, - 40960, 45056, 45057, 44544, 44672, 44704, 44696, 44698, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44704, - 44696, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44704, 44705, 44700, 0, 32768, 40960, 45056, 45057, - 44544, 44672, 44704, 44705, 44700, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 44704, 44705, 44700, 44702, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44704, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44704, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44704, 44706, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44704, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44704, - 44708, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44704, 44708, 0, 32768, 40960, 45056, 45057, 44544, - 44672, 44704, 44712, 44710, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44704, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44704, 44712, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 44704, 44712, 0, 32768, - 40960, 45056, 45057, 44544, 44672, 44704, 44712, 44714, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44704, - 44712, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44704, 44720, 44716, 0, 32768, 40960, 45056, 45057, - 44544, 44672, 44704, 44720, 44716, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 44704, 44720, 44721, 44718, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44704, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 44736, - 44720, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44736, 44720, 0, 32768, 40960, 45056, 45057, 44544, - 44672, 44736, 44720, 44722, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44736, 44720, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 44736, 44720, 44724, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44736, 44720, - 44724, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44736, 44720, 44728, 44726, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44736, 44720, 0, 32768, 40960, - 45056, 45057, 44544, 44672, 44736, 44737, 44728, 0, - 32768, 40960, 45056, 45057, 44544, 44672, 44736, 44737, - 44728, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44736, 44737, 44728, 44730, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44736, 44737, 44728, 0, 32768, - 40960, 45056, 45057, 44544, 44672, 44736, 44737, 44728, - 44732, 0, 32768, 40960, 45056, 45057, 44544, 44672, - 44736, 44737, 44739, 44732, 0, 32768, 40960, 45056, - 45057, 44544, 44672, 44736, 44737, 44739, 44732, 44734, - 0, 32768, 40960, 45056, 45057, 44544, 44672, 0, - 32768, 40960, 45056, 45057, 44544, 44800, 44736, 0, - 32768, 40960, 45056, 45057, 44544, 44800, 44736, 0, - 32768, 40960, 45056, 45057, 44544, 44800, 44736, 44738, - 0, 32768, 40960, 45056, 45057, 44544, 44800, 44736, - 0, 32768, 40960, 45056, 45057, 44544, 44800, 44736, - 44740, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44736, 44740, 0, 32768, 40960, 45056, 45057, 44544, - 44800, 44736, 44744, 44742, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44736, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44736, 44744, 0, 32768, 40960, - 45056, 45057, 44544, 44800, 44736, 44744, 0, 32768, - 40960, 45056, 45057, 44544, 44800, 44736, 44744, 44746, - 0, 32768, 40960, 45056, 45057, 44544, 44800, 44736, - 44744, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44736, 44752, 44748, 0, 32768, 40960, 45056, 45057, - 44544, 44800, 44736, 44752, 44748, 0, 32768, 40960, - 45056, 45057, 44544, 44800, 44736, 44752, 44753, 44750, - 0, 32768, 40960, 45056, 45057, 44544, 44800, 44736, - 0, 32768, 40960, 45056, 45057, 44544, 44800, 44736, - 44752, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44736, 44752, 0, 32768, 40960, 45056, 45057, 44544, - 44800, 44736, 44752, 44754, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44736, 44752, 0, 32768, 40960, - 45056, 45057, 44544, 44800, 44736, 44752, 44756, 0, - 32768, 40960, 45056, 45057, 44544, 44800, 44736, 44752, - 44756, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44736, 44752, 44760, 44758, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44736, 44752, 0, 32768, 40960, - 45056, 45057, 44544, 44800, 44736, 44768, 44760, 0, - 32768, 40960, 45056, 45057, 44544, 44800, 44736, 44768, - 44760, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44736, 44768, 44760, 44762, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44736, 44768, 44760, 0, 32768, - 40960, 45056, 45057, 44544, 44800, 44736, 44768, 44769, - 44764, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44736, 44768, 44769, 44764, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44736, 44768, 44769, 44764, 44766, - 0, 32768, 40960, 45056, 45057, 44544, 44800, 44736, - 0, 32768, 40960, 45056, 45057, 44544, 44800, 44801, - 44768, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44801, 44768, 0, 32768, 40960, 45056, 45057, 44544, - 44800, 44801, 44768, 44770, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44801, 44768, 0, 32768, 40960, - 45056, 45057, 44544, 44800, 44801, 44768, 44772, 0, - 32768, 40960, 45056, 45057, 44544, 44800, 44801, 44768, - 44772, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44801, 44768, 44776, 44774, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44801, 44768, 0, 32768, 40960, - 45056, 45057, 44544, 44800, 44801, 44768, 44776, 0, - 32768, 40960, 45056, 45057, 44544, 44800, 44801, 44768, - 44776, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44801, 44768, 44776, 44778, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44801, 44768, 44776, 0, 32768, - 40960, 45056, 45057, 44544, 44800, 44801, 44768, 44784, - 44780, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44801, 44768, 44784, 44780, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44801, 44768, 44784, 44785, 44782, - 0, 32768, 40960, 45056, 45057, 44544, 44800, 44801, - 44768, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44801, 44768, 44784, 0, 32768, 40960, 45056, 45057, - 44544, 44800, 44801, 44803, 44784, 0, 32768, 40960, - 45056, 45057, 44544, 44800, 44801, 44803, 44784, 44786, - 0, 32768, 40960, 45056, 45057, 44544, 44800, 44801, - 44803, 44784, 0, 32768, 40960, 45056, 45057, 44544, - 44800, 44801, 44803, 44784, 44788, 0, 32768, 40960, - 45056, 45057, 44544, 44800, 44801, 44803, 44784, 44788, - 0, 32768, 40960, 45056, 45057, 44544, 44800, 44801, - 44803, 44784, 44792, 44790, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44801, 44803, 44784, 0, 32768, - 40960, 45056, 45057, 44544, 44800, 44801, 44803, 44784, - 44792, 0, 32768, 40960, 45056, 45057, 44544, 44800, - 44801, 44803, 44784, 44792, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44801, 44803, 44784, 44792, 44794, - 0, 32768, 40960, 45056, 45057, 44544, 44800, 44801, - 44803, 44807, 44792, 0, 32768, 40960, 45056, 45057, - 44544, 44800, 44801, 44803, 44807, 44792, 44796, 0, - 32768, 40960, 45056, 45057, 44544, 44800, 44801, 44803, - 44807, 44792, 44796, 0, 32768, 40960, 45056, 45057, - 44544, 44800, 44801, 44803, 44807, 44792, 44796, 44798, - 0, 32768, 40960, 45056, 45057, 44544, 0, 32768, - 40960, 45056, 45057, 44544, 44800, 0, 32768, 40960, - 45056, 45057, 44544, 44800, 0, 32768, 40960, 45056, - 45057, 44544, 44800, 44802, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44804, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44804, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44808, 44806, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44808, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44808, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44808, 44810, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44808, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44816, 44812, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44816, 44812, 0, 32768, - 40960, 45056, 45057, 45059, 44800, 44816, 44817, 44814, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44816, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44816, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44816, 44818, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44816, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44816, - 44820, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44816, 44820, 0, 32768, 40960, 45056, 45057, 45059, - 44800, 44816, 44824, 44822, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44816, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44832, 44824, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44832, 44824, 0, 32768, - 40960, 45056, 45057, 45059, 44800, 44832, 44824, 44826, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44832, - 44824, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44832, 44833, 44828, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44832, 44833, 44828, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44832, 44833, 44828, 44830, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44832, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44832, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44832, 44834, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44832, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44832, - 44836, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44832, 44836, 0, 32768, 40960, 45056, 45057, 45059, - 44800, 44832, 44840, 44838, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44832, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44832, 44840, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44832, 44840, 0, 32768, - 40960, 45056, 45057, 45059, 44800, 44832, 44840, 44842, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44832, - 44840, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44832, 44848, 44844, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44832, 44848, 44844, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44832, 44848, 44849, 44846, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44832, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44864, - 44848, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44864, 44848, 0, 32768, 40960, 45056, 45057, 45059, - 44800, 44864, 44848, 44850, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44864, 44848, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44864, 44848, 44852, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44864, 44848, - 44852, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44864, 44848, 44856, 44854, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44864, 44848, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44864, 44865, 44856, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44864, 44865, - 44856, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44864, 44865, 44856, 44858, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44864, 44865, 44856, 0, 32768, - 40960, 45056, 45057, 45059, 44800, 44864, 44865, 44856, - 44860, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44864, 44865, 44867, 44860, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44864, 44865, 44867, 44860, 44862, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44864, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44864, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44864, 44866, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44864, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44864, - 44868, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44864, 44868, 0, 32768, 40960, 45056, 45057, 45059, - 44800, 44864, 44872, 44870, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44864, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44864, 44872, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44864, 44872, 0, 32768, - 40960, 45056, 45057, 45059, 44800, 44864, 44872, 44874, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44864, - 44872, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44864, 44880, 44876, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44864, 44880, 44876, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44864, 44880, 44881, 44878, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44864, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44864, - 44880, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44864, 44880, 0, 32768, 40960, 45056, 45057, 45059, - 44800, 44864, 44880, 44882, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44864, 44880, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44864, 44880, 44884, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44864, 44880, - 44884, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44864, 44880, 44888, 44886, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44864, 44880, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44864, 44896, 44888, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44864, 44896, - 44888, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44864, 44896, 44888, 44890, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44864, 44896, 44888, 0, 32768, - 40960, 45056, 45057, 45059, 44800, 44864, 44896, 44897, - 44892, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44864, 44896, 44897, 44892, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44864, 44896, 44897, 44892, 44894, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44864, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44928, - 44896, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44928, 44896, 0, 32768, 40960, 45056, 45057, 45059, - 44800, 44928, 44896, 44898, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44928, 44896, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44928, 44896, 44900, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44928, 44896, - 44900, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44928, 44896, 44904, 44902, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44928, 44896, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44928, 44896, 44904, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44928, 44896, - 44904, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44928, 44896, 44904, 44906, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44928, 44896, 44904, 0, 32768, - 40960, 45056, 45057, 45059, 44800, 44928, 44896, 44912, - 44908, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44928, 44896, 44912, 44908, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44928, 44896, 44912, 44913, 44910, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44928, - 44896, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44928, 44929, 44912, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44928, 44929, 44912, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44928, 44929, 44912, 44914, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44928, - 44929, 44912, 0, 32768, 40960, 45056, 45057, 45059, - 44800, 44928, 44929, 44912, 44916, 0, 32768, 40960, - 45056, 45057, 45059, 44800, 44928, 44929, 44912, 44916, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44928, - 44929, 44912, 44920, 44918, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44928, 44929, 44912, 0, 32768, - 40960, 45056, 45057, 45059, 44800, 44928, 44929, 44912, - 44920, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44928, 44929, 44931, 44920, 0, 32768, 40960, 45056, - 45057, 45059, 44800, 44928, 44929, 44931, 44920, 44922, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44928, - 44929, 44931, 44920, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44928, 44929, 44931, 44920, 44924, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44928, 44929, - 44931, 44920, 44924, 0, 32768, 40960, 45056, 45057, - 45059, 44800, 44928, 44929, 44931, 44920, 44924, 44926, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44928, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44928, 0, - 32768, 40960, 45056, 45057, 45059, 44800, 44928, 44930, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44928, - 0, 32768, 40960, 45056, 45057, 45059, 44800, 44928, - 44932, 0, 32768, 40960, 45056, 45057, 45059, 44800, - 44928, 44932, 0, 32768, 40960, 45056, 45057, 45059, - 44800, 44928, 44936, 44934, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44936, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 44928, 44936, 0, 32768, - 40960, 45056, 45057, 45059, 45063, 44928, 44936, 44938, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 44928, - 44936, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44944, 44940, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 44928, 44944, 44940, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 44928, 44944, 44945, 44942, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 44928, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 44928, - 44944, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44944, 0, 32768, 40960, 45056, 45057, 45059, - 45063, 44928, 44944, 44946, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44944, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 44928, 44944, 44948, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 44928, 44944, - 44948, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44944, 44952, 44950, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44944, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 44928, 44960, 44952, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 44928, 44960, - 44952, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44960, 44952, 44954, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44960, 44952, 0, 32768, - 40960, 45056, 45057, 45059, 45063, 44928, 44960, 44961, - 44956, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44960, 44961, 44956, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44960, 44961, 44956, 44958, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 44928, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 44928, - 44960, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44960, 0, 32768, 40960, 45056, 45057, 45059, - 45063, 44928, 44960, 44962, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44960, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 44928, 44960, 44964, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 44928, 44960, - 44964, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44960, 44968, 44966, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44960, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 44928, 44960, 44968, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 44928, 44960, - 44968, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44960, 44968, 44970, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44960, 44968, 0, 32768, - 40960, 45056, 45057, 45059, 45063, 44928, 44960, 44976, - 44972, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44960, 44976, 44972, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44960, 44976, 44977, 44974, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 44928, - 44960, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44992, 44976, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 44928, 44992, 44976, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 44928, 44992, 44976, 44978, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 44928, - 44992, 44976, 0, 32768, 40960, 45056, 45057, 45059, - 45063, 44928, 44992, 44976, 44980, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 44928, 44992, 44976, 44980, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 44928, - 44992, 44976, 44984, 44982, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44992, 44976, 0, 32768, - 40960, 45056, 45057, 45059, 45063, 44928, 44992, 44993, - 44984, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44992, 44993, 44984, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44992, 44993, 44984, 44986, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 44928, - 44992, 44993, 44984, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 44928, 44992, 44993, 44984, 44988, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 44928, 44992, - 44993, 44995, 44988, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 44928, 44992, 44993, 44995, 44988, 44990, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 44928, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 44928, - 44992, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44992, 0, 32768, 40960, 45056, 45057, 45059, - 45063, 44928, 44992, 44994, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44992, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 44928, 44992, 44996, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 44928, 44992, - 44996, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44992, 45000, 44998, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44992, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 44928, 44992, 45000, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 44928, 44992, - 45000, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44992, 45000, 45002, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44992, 45000, 0, 32768, - 40960, 45056, 45057, 45059, 45063, 44928, 44992, 45008, - 45004, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 44928, 44992, 45008, 45004, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 44928, 44992, 45008, 45009, 45006, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 45071, - 44992, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 45071, 44992, 45008, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 45071, 44992, 45008, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 45071, 44992, 45008, 45010, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 45071, - 44992, 45008, 0, 32768, 40960, 45056, 45057, 45059, - 45063, 45071, 44992, 45008, 45012, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 45071, 44992, 45008, 45012, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 45071, - 44992, 45008, 45016, 45014, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 45071, 44992, 45008, 0, 32768, - 40960, 45056, 45057, 45059, 45063, 45071, 44992, 45024, - 45016, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 45071, 44992, 45024, 45016, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 45071, 44992, 45024, 45016, 45018, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 45071, - 44992, 45024, 45016, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 45071, 44992, 45024, 45025, 45020, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 45071, 44992, - 45024, 45025, 45020, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 45071, 44992, 45024, 45025, 45020, 45022, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 45071, - 44992, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 45071, 44992, 45024, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 45071, 44992, 45024, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 45071, 44992, 45024, 45026, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 45071, - 44992, 45024, 0, 32768, 40960, 45056, 45057, 45059, - 45063, 45071, 44992, 45024, 45028, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 45071, 44992, 45024, 45028, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 45071, - 44992, 45024, 45032, 45030, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 45071, 44992, 45024, 0, 32768, - 40960, 45056, 45057, 45059, 45063, 45071, 44992, 45024, - 45032, 0, 32768, 40960, 45056, 45057, 45059, 45063, - 45071, 44992, 45024, 45032, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 45071, 44992, 45024, 45032, 45034, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 45071, - 44992, 45024, 45032, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 45071, 44992, 45024, 45040, 45036, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 45071, 44992, - 45024, 45040, 45036, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 45071, 44992, 45024, 45040, 45041, 45038, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 45071, - 44992, 45024, 0, 32768, 40960, 45056, 45057, 45059, - 45063, 45071, 44992, 45024, 45040, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 45071, 44992, 45024, 45040, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 45071, - 44992, 45024, 45040, 45042, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 45071, 44992, 45024, 45040, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 45071, 44992, - 45024, 45040, 45044, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 45071, 44992, 45024, 45040, 45044, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 45071, 44992, - 45024, 45040, 45048, 45046, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 45071, 44992, 45024, 45040, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 45071, 44992, - 45024, 45040, 45048, 0, 32768, 40960, 45056, 45057, - 45059, 45063, 45071, 44992, 45024, 45040, 45048, 0, - 32768, 40960, 45056, 45057, 45059, 45063, 45071, 44992, - 45024, 45040, 45048, 45050, 0, 32768, 40960, 45056, - 45057, 45059, 45063, 45071, 44992, 45024, 45040, 45048, - 0, 32768, 40960, 45056, 45057, 45059, 45063, 45071, - 44992, 45024, 45040, 45048, 45052, 0, 32768, 40960, - 45056, 45057, 45059, 45063, 45071, 44992, 45024, 45040, - 45048, 45052, 0, 32768, 40960, 45056, 45057, 45059, - 45063, 45071, 44992, 45024, 45040, 45048, 45052, 45054, - 0, 32768, 40960, 0, 32768, 40960, 45056, 0, - 32768, 40960, 45056, 0, 32768, 40960, 45056, 45058, - 0, 32768, 40960, 45056, 0, 32768, 40960, 45056, - 45060, 0, 32768, 40960, 45056, 45060, 0, 32768, - 40960, 45056, 45064, 45062, 0, 32768, 40960, 45056, - 0, 32768, 40960, 45056, 45064, 0, 32768, 40960, - 45056, 45064, 0, 32768, 40960, 45056, 45064, 45066, - 0, 32768, 40960, 45056, 45064, 0, 32768, 40960, - 45056, 45072, 45068, 0, 32768, 40960, 45056, 45072, - 45068, 0, 32768, 40960, 45056, 45072, 45073, 45070, - 0, 32768, 40960, 45056, 0, 32768, 40960, 45056, - 45072, 0, 32768, 40960, 45056, 45072, 0, 32768, - 40960, 45056, 45072, 45074, 0, 32768, 40960, 45056, - 45072, 0, 32768, 40960, 45056, 45072, 45076, 0, - 32768, 40960, 45056, 45072, 45076, 0, 32768, 40960, - 45056, 45072, 45080, 45078, 0, 32768, 40960, 45056, - 45072, 0, 32768, 40960, 45056, 45088, 45080, 0, - 32768, 40960, 45056, 45088, 45080, 0, 32768, 40960, - 45056, 45088, 45080, 45082, 0, 32768, 40960, 45056, - 45088, 45080, 0, 32768, 40960, 45056, 45088, 45089, - 45084, 0, 32768, 40960, 45056, 45088, 45089, 45084, - 0, 32768, 40960, 45056, 45088, 45089, 45084, 45086, - 0, 32768, 40960, 45056, 0, 32768, 40960, 45056, - 45088, 0, 32768, 40960, 45056, 45088, 0, 32768, - 40960, 45056, 45088, 45090, 0, 32768, 40960, 45056, - 45088, 0, 32768, 40960, 45056, 45088, 45092, 0, - 32768, 40960, 45056, 45088, 45092, 0, 32768, 40960, - 45056, 45088, 45096, 45094, 0, 32768, 40960, 45056, - 45088, 0, 32768, 40960, 45056, 45088, 45096, 0, - 32768, 40960, 45056, 45088, 45096, 0, 32768, 40960, - 45056, 45088, 45096, 45098, 0, 32768, 40960, 45056, - 45088, 45096, 0, 32768, 40960, 45056, 45088, 45104, - 45100, 0, 32768, 40960, 45056, 45088, 45104, 45100, - 0, 32768, 40960, 45056, 45088, 45104, 45105, 45102, - 0, 32768, 40960, 45056, 45088, 0, 32768, 40960, - 45056, 45120, 45104, 0, 32768, 40960, 45056, 45120, - 45104, 0, 32768, 40960, 45056, 45120, 45104, 45106, - 0, 32768, 40960, 45056, 45120, 45104, 0, 32768, - 40960, 45056, 45120, 45104, 45108, 0, 32768, 40960, - 45056, 45120, 45104, 45108, 0, 32768, 40960, 45056, - 45120, 45104, 45112, 45110, 0, 32768, 40960, 45056, - 45120, 45104, 0, 32768, 40960, 45056, 45120, 45121, - 45112, 0, 32768, 40960, 45056, 45120, 45121, 45112, - 0, 32768, 40960, 45056, 45120, 45121, 45112, 45114, - 0, 32768, 40960, 45056, 45120, 45121, 45112, 0, - 32768, 40960, 45056, 45120, 45121, 45112, 45116, 0, - 32768, 40960, 45056, 45120, 45121, 45123, 45116, 0, - 32768, 40960, 45056, 45120, 45121, 45123, 45116, 45118, - 0, 32768, 40960, 45056, 0, 32768, 40960, 45056, - 45120, 0, 32768, 40960, 45056, 45120, 0, 32768, - 40960, 45056, 45120, 45122, 0, 32768, 40960, 45056, - 45120, 0, 32768, 40960, 45056, 45120, 45124, 0, - 32768, 40960, 45056, 45120, 45124, 0, 32768, 40960, - 45056, 45120, 45128, 45126, 0, 32768, 40960, 45056, - 45120, 0, 32768, 40960, 45056, 45120, 45128, 0, - 32768, 40960, 45056, 45120, 45128, 0, 32768, 40960, - 45056, 45120, 45128, 45130, 0, 32768, 40960, 45056, - 45120, 45128, 0, 32768, 40960, 45056, 45120, 45136, - 45132, 0, 32768, 40960, 45056, 45120, 45136, 45132, - 0, 32768, 40960, 45056, 45120, 45136, 45137, 45134, - 0, 32768, 40960, 45056, 45120, 0, 32768, 40960, - 45056, 45120, 45136, 0, 32768, 40960, 45056, 45120, - 45136, 0, 32768, 40960, 45056, 45120, 45136, 45138, - 0, 32768, 40960, 45056, 45120, 45136, 0, 32768, - 40960, 45056, 45120, 45136, 45140, 0, 32768, 40960, - 45056, 45120, 45136, 45140, 0, 32768, 40960, 45056, - 45120, 45136, 45144, 45142, 0, 32768, 40960, 45056, - 45120, 45136, 0, 32768, 40960, 45056, 45120, 45152, - 45144, 0, 32768, 40960, 45056, 45120, 45152, 45144, - 0, 32768, 40960, 45056, 45120, 45152, 45144, 45146, - 0, 32768, 40960, 45056, 45120, 45152, 45144, 0, - 32768, 40960, 45056, 45120, 45152, 45153, 45148, 0, - 32768, 40960, 45056, 45120, 45152, 45153, 45148, 0, - 32768, 40960, 45056, 45120, 45152, 45153, 45148, 45150, - 0, 32768, 40960, 45056, 45120, 0, 32768, 40960, - 45056, 45184, 45152, 0, 32768, 40960, 45056, 45184, - 45152, 0, 32768, 40960, 45056, 45184, 45152, 45154, - 0, 32768, 40960, 45056, 45184, 45152, 0, 32768, - 40960, 45056, 45184, 45152, 45156, 0, 32768, 40960, - 45056, 45184, 45152, 45156, 0, 32768, 40960, 45056, - 45184, 45152, 45160, 45158, 0, 32768, 40960, 45056, - 45184, 45152, 0, 32768, 40960, 45056, 45184, 45152, - 45160, 0, 32768, 40960, 45056, 45184, 45152, 45160, - 0, 32768, 40960, 45056, 45184, 45152, 45160, 45162, - 0, 32768, 40960, 45056, 45184, 45152, 45160, 0, - 32768, 40960, 45056, 45184, 45152, 45168, 45164, 0, - 32768, 40960, 45056, 45184, 45152, 45168, 45164, 0, - 32768, 40960, 45056, 45184, 45152, 45168, 45169, 45166, - 0, 32768, 40960, 45056, 45184, 45152, 0, 32768, - 40960, 45056, 45184, 45185, 45168, 0, 32768, 40960, - 45056, 45184, 45185, 45168, 0, 32768, 40960, 45056, - 45184, 45185, 45168, 45170, 0, 32768, 40960, 45056, - 45184, 45185, 45168, 0, 32768, 40960, 45056, 45184, - 45185, 45168, 45172, 0, 32768, 40960, 45056, 45184, - 45185, 45168, 45172, 0, 32768, 40960, 45056, 45184, - 45185, 45168, 45176, 45174, 0, 32768, 40960, 45056, - 45184, 45185, 45168, 0, 32768, 40960, 45056, 45184, - 45185, 45168, 45176, 0, 32768, 40960, 45056, 45184, - 45185, 45187, 45176, 0, 32768, 40960, 45056, 45184, - 45185, 45187, 45176, 45178, 0, 32768, 40960, 45056, - 45184, 45185, 45187, 45176, 0, 32768, 40960, 45056, - 45184, 45185, 45187, 45176, 45180, 0, 32768, 40960, - 45056, 45184, 45185, 45187, 45176, 45180, 0, 32768, - 40960, 45056, 45184, 45185, 45187, 45176, 45180, 45182, - 0, 32768, 40960, 45056, 0, 32768, 40960, 45056, - 45184, 0, 32768, 40960, 45056, 45184, 0, 32768, - 40960, 45056, 45184, 45186, 0, 32768, 40960, 45056, - 45184, 0, 32768, 40960, 45056, 45184, 45188, 0, - 32768, 40960, 45056, 45184, 45188, 0, 32768, 40960, - 45056, 45184, 45192, 45190, 0, 32768, 40960, 45056, - 45184, 0, 32768, 40960, 45056, 45184, 45192, 0, - 32768, 40960, 45056, 45184, 45192, 0, 32768, 40960, - 45056, 45184, 45192, 45194, 0, 32768, 40960, 45056, - 45184, 45192, 0, 32768, 40960, 45056, 45184, 45200, - 45196, 0, 32768, 40960, 45056, 45184, 45200, 45196, - 0, 32768, 40960, 45056, 45184, 45200, 45201, 45198, - 0, 32768, 40960, 45056, 45184, 0, 32768, 40960, - 45056, 45184, 45200, 0, 32768, 40960, 45056, 45184, - 45200, 0, 32768, 40960, 45056, 45184, 45200, 45202, - 0, 32768, 40960, 45056, 45184, 45200, 0, 32768, - 40960, 45056, 45184, 45200, 45204, 0, 32768, 40960, - 45056, 45184, 45200, 45204, 0, 32768, 40960, 45056, - 45184, 45200, 45208, 45206, 0, 32768, 40960, 45056, - 45184, 45200, 0, 32768, 40960, 45056, 45184, 45216, - 45208, 0, 32768, 40960, 45056, 45184, 45216, 45208, - 0, 32768, 40960, 45056, 45184, 45216, 45208, 45210, - 0, 32768, 40960, 45056, 45184, 45216, 45208, 0, - 32768, 40960, 45056, 45184, 45216, 45217, 45212, 0, - 32768, 40960, 45056, 45184, 45216, 45217, 45212, 0, - 32768, 40960, 45056, 45184, 45216, 45217, 45212, 45214, - 0, 32768, 40960, 45056, 45184, 0, 32768, 40960, - 45056, 45184, 45216, 0, 32768, 40960, 45056, 45184, - 45216, 0, 32768, 40960, 45056, 45184, 45216, 45218, - 0, 32768, 40960, 45056, 45184, 45216, 0, 32768, - 40960, 45056, 45184, 45216, 45220, 0, 32768, 40960, - 45056, 45184, 45216, 45220, 0, 32768, 40960, 45056, - 45184, 45216, 45224, 45222, 0, 32768, 40960, 45056, - 45184, 45216, 0, 32768, 40960, 45056, 45184, 45216, - 45224, 0, 32768, 40960, 45056, 45184, 45216, 45224, - 0, 32768, 40960, 45056, 45184, 45216, 45224, 45226, - 0, 32768, 40960, 45056, 45184, 45216, 45224, 0, - 32768, 40960, 45056, 45184, 45216, 45232, 45228, 0, - 32768, 40960, 45056, 45184, 45216, 45232, 45228, 0, - 32768, 40960, 45056, 45184, 45216, 45232, 45233, 45230, - 0, 32768, 40960, 45056, 45184, 45216, 0, 32768, - 40960, 45056, 45184, 45248, 45232, 0, 32768, 40960, - 45056, 45184, 45248, 45232, 0, 32768, 40960, 45056, - 45184, 45248, 45232, 45234, 0, 32768, 40960, 45056, - 45184, 45248, 45232, 0, 32768, 40960, 45056, 45184, - 45248, 45232, 45236, 0, 32768, 40960, 45056, 45184, - 45248, 45232, 45236, 0, 32768, 40960, 45056, 45184, - 45248, 45232, 45240, 45238, 0, 32768, 40960, 45056, - 45184, 45248, 45232, 0, 32768, 40960, 45056, 45184, - 45248, 45249, 45240, 0, 32768, 40960, 45056, 45184, - 45248, 45249, 45240, 0, 32768, 40960, 45056, 45184, - 45248, 45249, 45240, 45242, 0, 32768, 40960, 45056, - 45184, 45248, 45249, 45240, 0, 32768, 40960, 45056, - 45184, 45248, 45249, 45240, 45244, 0, 32768, 40960, - 45056, 45184, 45248, 45249, 45251, 45244, 0, 32768, - 40960, 45056, 45184, 45248, 45249, 45251, 45244, 45246, - 0, 32768, 40960, 45056, 45184, 0, 32768, 40960, - 45056, 45312, 45248, 0, 32768, 40960, 45056, 45312, - 45248, 0, 32768, 40960, 45056, 45312, 45248, 45250, - 0, 32768, 40960, 45056, 45312, 45248, 0, 32768, - 40960, 45056, 45312, 45248, 45252, 0, 32768, 40960, - 45056, 45312, 45248, 45252, 0, 32768, 40960, 45056, - 45312, 45248, 45256, 45254, 0, 32768, 40960, 45056, - 45312, 45248, 0, 32768, 40960, 45056, 45312, 45248, - 45256, 0, 32768, 40960, 45056, 45312, 45248, 45256, - 0, 32768, 40960, 45056, 45312, 45248, 45256, 45258, - 0, 32768, 40960, 45056, 45312, 45248, 45256, 0, - 32768, 40960, 45056, 45312, 45248, 45264, 45260, 0, - 32768, 40960, 45056, 45312, 45248, 45264, 45260, 0, - 32768, 40960, 45056, 45312, 45248, 45264, 45265, 45262, - 0, 32768, 40960, 45056, 45312, 45248, 0, 32768, - 40960, 45056, 45312, 45248, 45264, 0, 32768, 40960, - 45056, 45312, 45248, 45264, 0, 32768, 40960, 45056, - 45312, 45248, 45264, 45266, 0, 32768, 40960, 45056, - 45312, 45248, 45264, 0, 32768, 40960, 45056, 45312, - 45248, 45264, 45268, 0, 32768, 40960, 45056, 45312, - 45248, 45264, 45268, 0, 32768, 40960, 45056, 45312, - 45248, 45264, 45272, 45270, 0, 32768, 40960, 45056, - 45312, 45248, 45264, 0, 32768, 40960, 45056, 45312, - 45248, 45280, 45272, 0, 32768, 40960, 45056, 45312, - 45248, 45280, 45272, 0, 32768, 40960, 45056, 45312, - 45248, 45280, 45272, 45274, 0, 32768, 40960, 45056, - 45312, 45248, 45280, 45272, 0, 32768, 40960, 45056, - 45312, 45248, 45280, 45281, 45276, 0, 32768, 40960, - 45056, 45312, 45248, 45280, 45281, 45276, 0, 32768, - 40960, 45056, 45312, 45248, 45280, 45281, 45276, 45278, - 0, 32768, 40960, 45056, 45312, 45248, 0, 32768, - 40960, 45056, 45312, 45313, 45280, 0, 32768, 40960, - 45056, 45312, 45313, 45280, 0, 32768, 40960, 45056, - 45312, 45313, 45280, 45282, 0, 32768, 40960, 45056, - 45312, 45313, 45280, 0, 32768, 40960, 45056, 45312, - 45313, 45280, 45284, 0, 32768, 40960, 45056, 45312, - 45313, 45280, 45284, 0, 32768, 40960, 45056, 45312, - 45313, 45280, 45288, 45286, 0, 32768, 40960, 45056, - 45312, 45313, 45280, 0, 32768, 40960, 45056, 45312, - 45313, 45280, 45288, 0, 32768, 40960, 45056, 45312, - 45313, 45280, 45288, 0, 32768, 40960, 45056, 45312, - 45313, 45280, 45288, 45290, 0, 32768, 40960, 45056, - 45312, 45313, 45280, 45288, 0, 32768, 40960, 45056, - 45312, 45313, 45280, 45296, 45292, 0, 32768, 40960, - 45056, 45312, 45313, 45280, 45296, 45292, 0, 32768, - 40960, 45056, 45312, 45313, 45280, 45296, 45297, 45294, - 0, 32768, 40960, 45056, 45312, 45313, 45280, 0, - 32768, 40960, 45056, 45312, 45313, 45280, 45296, 0, - 32768, 40960, 45056, 45312, 45313, 45315, 45296, 0, - 32768, 40960, 45056, 45312, 45313, 45315, 45296, 45298, - 0, 32768, 40960, 45056, 45312, 45313, 45315, 45296, - 0, 32768, 40960, 45056, 45312, 45313, 45315, 45296, - 45300, 0, 32768, 40960, 45056, 45312, 45313, 45315, - 45296, 45300, 0, 32768, 40960, 45056, 45312, 45313, - 45315, 45296, 45304, 45302, 0, 32768, 40960, 45056, - 45312, 45313, 45315, 45296, 0, 32768, 40960, 45056, - 45312, 45313, 45315, 45296, 45304, 0, 32768, 40960, - 45056, 45312, 45313, 45315, 45296, 45304, 0, 32768, - 40960, 45056, 45312, 45313, 45315, 45296, 45304, 45306, - 0, 32768, 40960, 45056, 45312, 45313, 45315, 45319, - 45304, 0, 32768, 40960, 45056, 45312, 45313, 45315, - 45319, 45304, 45308, 0, 32768, 40960, 45056, 45312, - 45313, 45315, 45319, 45304, 45308, 0, 32768, 40960, - 45056, 45312, 45313, 45315, 45319, 45304, 45308, 45310, - 0, 32768, 40960, 45056, 0, 32768, 40960, 45056, - 45312, 0, 32768, 40960, 45056, 45312, 0, 32768, - 40960, 45056, 45312, 45314, 0, 32768, 40960, 45056, - 45312, 0, 32768, 40960, 45056, 45312, 45316, 0, - 32768, 40960, 45056, 45312, 45316, 0, 32768, 40960, - 45056, 45312, 45320, 45318, 0, 32768, 40960, 45056, - 45312, 0, 32768, 40960, 45056, 45312, 45320, 0, - 32768, 40960, 45056, 45312, 45320, 0, 32768, 40960, - 45056, 45312, 45320, 45322, 0, 32768, 40960, 45056, - 45312, 45320, 0, 32768, 40960, 45056, 45312, 45328, - 45324, 0, 32768, 40960, 45056, 45312, 45328, 45324, - 0, 32768, 40960, 45056, 45312, 45328, 45329, 45326, - 0, 32768, 40960, 45056, 45312, 0, 32768, 40960, - 45056, 45312, 45328, 0, 32768, 40960, 45056, 45312, - 45328, 0, 32768, 40960, 45056, 45312, 45328, 45330, - 0, 32768, 40960, 45056, 45312, 45328, 0, 32768, - 40960, 45056, 45312, 45328, 45332, 0, 32768, 40960, - 45056, 45312, 45328, 45332, 0, 32768, 40960, 45056, - 45312, 45328, 45336, 45334, 0, 32768, 40960, 45056, - 45312, 45328, 0, 32768, 40960, 45056, 45312, 45344, - 45336, 0, 32768, 40960, 45056, 45312, 45344, 45336, - 0, 32768, 40960, 45056, 45312, 45344, 45336, 45338, - 0, 32768, 40960, 45056, 45312, 45344, 45336, 0, - 32768, 40960, 45056, 45312, 45344, 45345, 45340, 0, - 32768, 40960, 45056, 45312, 45344, 45345, 45340, 0, - 32768, 40960, 45056, 45312, 45344, 45345, 45340, 45342, - 0, 32768, 40960, 45056, 45312, 0, 32768, 40960, - 45056, 45312, 45344, 0, 32768, 40960, 45056, 45312, - 45344, 0, 32768, 40960, 45056, 45312, 45344, 45346, - 0, 32768, 40960, 45056, 45312, 45344, 0, 32768, - 40960, 45056, 45312, 45344, 45348, 0, 32768, 40960, - 45056, 45312, 45344, 45348, 0, 32768, 40960, 45056, - 45312, 45344, 45352, 45350, 0, 32768, 40960, 45056, - 45312, 45344, 0, 32768, 40960, 45056, 45312, 45344, - 45352, 0, 32768, 40960, 45056, 45312, 45344, 45352, - 0, 32768, 40960, 45056, 45312, 45344, 45352, 45354, - 0, 32768, 40960, 45056, 45312, 45344, 45352, 0, - 32768, 40960, 45056, 45312, 45344, 45360, 45356, 0, - 32768, 40960, 45056, 45312, 45344, 45360, 45356, 0, - 32768, 40960, 45056, 45312, 45344, 45360, 45361, 45358, - 0, 32768, 40960, 45056, 45312, 45344, 0, 32768, - 40960, 45056, 45312, 45376, 45360, 0, 32768, 40960, - 45056, 45312, 45376, 45360, 0, 32768, 40960, 45056, - 45312, 45376, 45360, 45362, 0, 32768, 40960, 45056, - 45312, 45376, 45360, 0, 32768, 40960, 45056, 45312, - 45376, 45360, 45364, 0, 32768, 40960, 45056, 45312, - 45376, 45360, 45364, 0, 32768, 40960, 45056, 45312, - 45376, 45360, 45368, 45366, 0, 32768, 40960, 45056, - 45312, 45376, 45360, 0, 32768, 40960, 45056, 45312, - 45376, 45377, 45368, 0, 32768, 40960, 45056, 45312, - 45376, 45377, 45368, 0, 32768, 40960, 45056, 45312, - 45376, 45377, 45368, 45370, 0, 32768, 40960, 45056, - 45312, 45376, 45377, 45368, 0, 32768, 40960, 45056, - 45312, 45376, 45377, 45368, 45372, 0, 32768, 40960, - 45056, 45312, 45376, 45377, 45379, 45372, 0, 32768, - 40960, 45056, 45312, 45376, 45377, 45379, 45372, 45374, - 0, 32768, 40960, 45056, 45312, 0, 32768, 40960, - 45056, 45312, 45376, 0, 32768, 40960, 45056, 45312, - 45376, 0, 32768, 40960, 45056, 45312, 45376, 45378, - 0, 32768, 40960, 45056, 45312, 45376, 0, 32768, - 40960, 45056, 45312, 45376, 45380, 0, 32768, 40960, - 45056, 45312, 45376, 45380, 0, 32768, 40960, 45056, - 45312, 45376, 45384, 45382, 0, 32768, 40960, 45056, - 45312, 45376, 0, 32768, 40960, 45056, 45312, 45376, - 45384, 0, 32768, 40960, 45056, 45312, 45376, 45384, - 0, 32768, 40960, 45056, 45312, 45376, 45384, 45386, - 0, 32768, 40960, 45056, 45312, 45376, 45384, 0, - 32768, 40960, 45056, 45312, 45376, 45392, 45388, 0, - 32768, 40960, 45056, 45312, 45376, 45392, 45388, 0, - 32768, 40960, 45056, 45312, 45376, 45392, 45393, 45390, - 0, 32768, 40960, 45056, 45312, 45376, 0, 32768, - 40960, 45056, 45312, 45376, 45392, 0, 32768, 40960, - 45056, 45312, 45376, 45392, 0, 32768, 40960, 45056, - 45312, 45376, 45392, 45394, 0, 32768, 40960, 45056, - 45312, 45376, 45392, 0, 32768, 40960, 45056, 45312, - 45376, 45392, 45396, 0, 32768, 40960, 45056, 45312, - 45376, 45392, 45396, 0, 32768, 40960, 45056, 45312, - 45376, 45392, 45400, 45398, 0, 32768, 40960, 45056, - 45312, 45376, 45392, 0, 32768, 40960, 45056, 45312, - 45376, 45408, 45400, 0, 32768, 40960, 45056, 45312, - 45376, 45408, 45400, 0, 32768, 40960, 45056, 45312, - 45376, 45408, 45400, 45402, 0, 32768, 40960, 45056, - 45312, 45376, 45408, 45400, 0, 32768, 40960, 45056, - 45312, 45376, 45408, 45409, 45404, 0, 32768, 40960, - 45056, 45312, 45376, 45408, 45409, 45404, 0, 32768, - 40960, 45056, 45312, 45376, 45408, 45409, 45404, 45406, - 0, 32768, 40960, 45056, 45312, 45376, 0, 32768, - 40960, 45056, 45312, 45440, 45408, 0, 32768, 40960, - 45056, 45312, 45440, 45408, 0, 32768, 40960, 45056, - 45312, 45440, 45408, 45410, 0, 32768, 40960, 45056, - 45312, 45440, 45408, 0, 32768, 40960, 45056, 45312, - 45440, 45408, 45412, 0, 32768, 40960, 45056, 45312, - 45440, 45408, 45412, 0, 32768, 40960, 45056, 45312, - 45440, 45408, 45416, 45414, 0, 32768, 40960, 45056, - 45312, 45440, 45408, 0, 32768, 40960, 45056, 45312, - 45440, 45408, 45416, 0, 32768, 40960, 45056, 45312, - 45440, 45408, 45416, 0, 32768, 40960, 45056, 45312, - 45440, 45408, 45416, 45418, 0, 32768, 40960, 45056, - 45312, 45440, 45408, 45416, 0, 32768, 40960, 45056, - 45312, 45440, 45408, 45424, 45420, 0, 32768, 40960, - 45056, 45312, 45440, 45408, 45424, 45420, 0, 32768, - 40960, 45056, 45312, 45440, 45408, 45424, 45425, 45422, - 0, 32768, 40960, 45056, 45312, 45440, 45408, 0, - 32768, 40960, 45056, 45312, 45440, 45441, 45424, 0, - 32768, 40960, 45056, 45312, 45440, 45441, 45424, 0, - 32768, 40960, 45056, 45312, 45440, 45441, 45424, 45426, - 0, 32768, 40960, 45056, 45312, 45440, 45441, 45424, - 0, 32768, 40960, 45056, 45312, 45440, 45441, 45424, - 45428, 0, 32768, 40960, 45056, 45312, 45440, 45441, - 45424, 45428, 0, 32768, 40960, 45056, 45312, 45440, - 45441, 45424, 45432, 45430, 0, 32768, 40960, 45056, - 45312, 45440, 45441, 45424, 0, 32768, 40960, 45056, - 45312, 45440, 45441, 45424, 45432, 0, 32768, 40960, - 45056, 45312, 45440, 45441, 45443, 45432, 0, 32768, - 40960, 45056, 45312, 45440, 45441, 45443, 45432, 45434, - 0, 32768, 40960, 45056, 45312, 45440, 45441, 45443, - 45432, 0, 32768, 40960, 45056, 45312, 45440, 45441, - 45443, 45432, 45436, 0, 32768, 40960, 45056, 45312, - 45440, 45441, 45443, 45432, 45436, 0, 32768, 40960, - 45056, 45312, 45440, 45441, 45443, 45432, 45436, 45438, - 0, 32768, 40960, 45056, 45312, 0, 32768, 40960, - 45056, 45568, 45440, 0, 32768, 40960, 45056, 45568, - 45440, 0, 32768, 40960, 45056, 45568, 45440, 45442, - 0, 32768, 40960, 45056, 45568, 45440, 0, 32768, - 40960, 45056, 45568, 45440, 45444, 0, 32768, 40960, - 45056, 45568, 45440, 45444, 0, 32768, 40960, 45056, - 45568, 45440, 45448, 45446, 0, 32768, 40960, 45056, - 45568, 45440, 0, 32768, 40960, 45056, 45568, 45440, - 45448, 0, 32768, 40960, 45056, 45568, 45440, 45448, - 0, 32768, 40960, 45056, 45568, 45440, 45448, 45450, - 0, 32768, 40960, 45056, 45568, 45440, 45448, 0, - 32768, 40960, 45056, 45568, 45440, 45456, 45452, 0, - 32768, 40960, 45056, 45568, 45440, 45456, 45452, 0, - 32768, 40960, 45056, 45568, 45440, 45456, 45457, 45454, - 0, 32768, 40960, 45056, 45568, 45440, 0, 32768, - 40960, 45056, 45568, 45440, 45456, 0, 32768, 40960, - 45056, 45568, 45440, 45456, 0, 32768, 40960, 45056, - 45568, 45440, 45456, 45458, 0, 32768, 40960, 45056, - 45568, 45440, 45456, 0, 32768, 40960, 45056, 45568, - 45440, 45456, 45460, 0, 32768, 40960, 45056, 45568, - 45440, 45456, 45460, 0, 32768, 40960, 45056, 45568, - 45440, 45456, 45464, 45462, 0, 32768, 40960, 45056, - 45568, 45440, 45456, 0, 32768, 40960, 45056, 45568, - 45440, 45472, 45464, 0, 32768, 40960, 45056, 45568, - 45440, 45472, 45464, 0, 32768, 40960, 45056, 45568, - 45440, 45472, 45464, 45466, 0, 32768, 40960, 45056, - 45568, 45440, 45472, 45464, 0, 32768, 40960, 45056, - 45568, 45440, 45472, 45473, 45468, 0, 32768, 40960, - 45056, 45568, 45440, 45472, 45473, 45468, 0, 32768, - 40960, 45056, 45568, 45440, 45472, 45473, 45468, 45470, - 0, 32768, 40960, 45056, 45568, 45440, 0, 32768, - 40960, 45056, 45568, 45440, 45472, 0, 32768, 40960, - 45056, 45568, 45440, 45472, 0, 32768, 40960, 45056, - 45568, 45440, 45472, 45474, 0, 32768, 40960, 45056, - 45568, 45440, 45472, 0, 32768, 40960, 45056, 45568, - 45440, 45472, 45476, 0, 32768, 40960, 45056, 45568, - 45440, 45472, 45476, 0, 32768, 40960, 45056, 45568, - 45440, 45472, 45480, 45478, 0, 32768, 40960, 45056, - 45568, 45440, 45472, 0, 32768, 40960, 45056, 45568, - 45440, 45472, 45480, 0, 32768, 40960, 45056, 45568, - 45440, 45472, 45480, 0, 32768, 40960, 45056, 45568, - 45440, 45472, 45480, 45482, 0, 32768, 40960, 45056, - 45568, 45440, 45472, 45480, 0, 32768, 40960, 45056, - 45568, 45440, 45472, 45488, 45484, 0, 32768, 40960, - 45056, 45568, 45440, 45472, 45488, 45484, 0, 32768, - 40960, 45056, 45568, 45440, 45472, 45488, 45489, 45486, - 0, 32768, 40960, 45056, 45568, 45440, 45472, 0, - 32768, 40960, 45056, 45568, 45440, 45504, 45488, 0, - 32768, 40960, 45056, 45568, 45440, 45504, 45488, 0, - 32768, 40960, 45056, 45568, 45440, 45504, 45488, 45490, - 0, 32768, 40960, 45056, 45568, 45440, 45504, 45488, - 0, 32768, 40960, 45056, 45568, 45440, 45504, 45488, - 45492, 0, 32768, 40960, 45056, 45568, 45440, 45504, - 45488, 45492, 0, 32768, 40960, 45056, 45568, 45440, - 45504, 45488, 45496, 45494, 0, 32768, 40960, 45056, - 45568, 45440, 45504, 45488, 0, 32768, 40960, 45056, - 45568, 45440, 45504, 45505, 45496, 0, 32768, 40960, - 45056, 45568, 45440, 45504, 45505, 45496, 0, 32768, - 40960, 45056, 45568, 45440, 45504, 45505, 45496, 45498, - 0, 32768, 40960, 45056, 45568, 45440, 45504, 45505, - 45496, 0, 32768, 40960, 45056, 45568, 45440, 45504, - 45505, 45496, 45500, 0, 32768, 40960, 45056, 45568, - 45440, 45504, 45505, 45507, 45500, 0, 32768, 40960, - 45056, 45568, 45440, 45504, 45505, 45507, 45500, 45502, - 0, 32768, 40960, 45056, 45568, 45440, 0, 32768, - 40960, 45056, 45568, 45569, 45504, 0, 32768, 40960, - 45056, 45568, 45569, 45504, 0, 32768, 40960, 45056, - 45568, 45569, 45504, 45506, 0, 32768, 40960, 45056, - 45568, 45569, 45504, 0, 32768, 40960, 45056, 45568, - 45569, 45504, 45508, 0, 32768, 40960, 45056, 45568, - 45569, 45504, 45508, 0, 32768, 40960, 45056, 45568, - 45569, 45504, 45512, 45510, 0, 32768, 40960, 45056, - 45568, 45569, 45504, 0, 32768, 40960, 45056, 45568, - 45569, 45504, 45512, 0, 32768, 40960, 45056, 45568, - 45569, 45504, 45512, 0, 32768, 40960, 45056, 45568, - 45569, 45504, 45512, 45514, 0, 32768, 40960, 45056, - 45568, 45569, 45504, 45512, 0, 32768, 40960, 45056, - 45568, 45569, 45504, 45520, 45516, 0, 32768, 40960, - 45056, 45568, 45569, 45504, 45520, 45516, 0, 32768, - 40960, 45056, 45568, 45569, 45504, 45520, 45521, 45518, - 0, 32768, 40960, 45056, 45568, 45569, 45504, 0, - 32768, 40960, 45056, 45568, 45569, 45504, 45520, 0, - 32768, 40960, 45056, 45568, 45569, 45504, 45520, 0, - 32768, 40960, 45056, 45568, 45569, 45504, 45520, 45522, - 0, 32768, 40960, 45056, 45568, 45569, 45504, 45520, - 0, 32768, 40960, 45056, 45568, 45569, 45504, 45520, - 45524, 0, 32768, 40960, 45056, 45568, 45569, 45504, - 45520, 45524, 0, 32768, 40960, 45056, 45568, 45569, - 45504, 45520, 45528, 45526, 0, 32768, 40960, 45056, - 45568, 45569, 45504, 45520, 0, 32768, 40960, 45056, - 45568, 45569, 45504, 45536, 45528, 0, 32768, 40960, - 45056, 45568, 45569, 45504, 45536, 45528, 0, 32768, - 40960, 45056, 45568, 45569, 45504, 45536, 45528, 45530, - 0, 32768, 40960, 45056, 45568, 45569, 45504, 45536, - 45528, 0, 32768, 40960, 45056, 45568, 45569, 45504, - 45536, 45537, 45532, 0, 32768, 40960, 45056, 45568, - 45569, 45504, 45536, 45537, 45532, 0, 32768, 40960, - 45056, 45568, 45569, 45504, 45536, 45537, 45532, 45534, - 0, 32768, 40960, 45056, 45568, 45569, 45504, 0, - 32768, 40960, 45056, 45568, 45569, 45504, 45536, 0, - 32768, 40960, 45056, 45568, 45569, 45571, 45536, 0, - 32768, 40960, 45056, 45568, 45569, 45571, 45536, 45538, - 0, 32768, 40960, 45056, 45568, 45569, 45571, 45536, - 0, 32768, 40960, 45056, 45568, 45569, 45571, 45536, - 45540, 0, 32768, 40960, 45056, 45568, 45569, 45571, - 45536, 45540, 0, 32768, 40960, 45056, 45568, 45569, - 45571, 45536, 45544, 45542, 0, 32768, 40960, 45056, - 45568, 45569, 45571, 45536, 0, 32768, 40960, 45056, - 45568, 45569, 45571, 45536, 45544, 0, 32768, 40960, - 45056, 45568, 45569, 45571, 45536, 45544, 0, 32768, - 40960, 45056, 45568, 45569, 45571, 45536, 45544, 45546, - 0, 32768, 40960, 45056, 45568, 45569, 45571, 45536, - 45544, 0, 32768, 40960, 45056, 45568, 45569, 45571, - 45536, 45552, 45548, 0, 32768, 40960, 45056, 45568, - 45569, 45571, 45536, 45552, 45548, 0, 32768, 40960, - 45056, 45568, 45569, 45571, 45536, 45552, 45553, 45550, - 0, 32768, 40960, 45056, 45568, 45569, 45571, 45536, - 0, 32768, 40960, 45056, 45568, 45569, 45571, 45536, - 45552, 0, 32768, 40960, 45056, 45568, 45569, 45571, - 45536, 45552, 0, 32768, 40960, 45056, 45568, 45569, - 45571, 45536, 45552, 45554, 0, 32768, 40960, 45056, - 45568, 45569, 45571, 45575, 45552, 0, 32768, 40960, - 45056, 45568, 45569, 45571, 45575, 45552, 45556, 0, - 32768, 40960, 45056, 45568, 45569, 45571, 45575, 45552, - 45556, 0, 32768, 40960, 45056, 45568, 45569, 45571, - 45575, 45552, 45560, 45558, 0, 32768, 40960, 45056, - 45568, 45569, 45571, 45575, 45552, 0, 32768, 40960, - 45056, 45568, 45569, 45571, 45575, 45552, 45560, 0, - 32768, 40960, 45056, 45568, 45569, 45571, 45575, 45552, - 45560, 0, 32768, 40960, 45056, 45568, 45569, 45571, - 45575, 45552, 45560, 45562, 0, 32768, 40960, 45056, - 45568, 45569, 45571, 45575, 45552, 45560, 0, 32768, - 40960, 45056, 45568, 45569, 45571, 45575, 45552, 45560, - 45564, 0, 32768, 40960, 45056, 45568, 45569, 45571, - 45575, 45552, 45560, 45564, 0, 32768, 40960, 45056, - 45568, 45569, 45571, 45575, 45552, 45560, 45564, 45566, - 0, 32768, 40960, 45056, 0, 32768, 40960, 45056, - 45568, 0, 32768, 40960, 45056, 45568, 0, 32768, - 40960, 45056, 45568, 45570, 0, 32768, 40960, 45056, - 45568, 0, 32768, 40960, 45056, 45568, 45572, 0, - 32768, 40960, 45056, 45568, 45572, 0, 32768, 40960, - 45056, 45568, 45576, 45574, 0, 32768, 40960, 45056, - 45568, 0, 32768, 40960, 45056, 45568, 45576, 0, - 32768, 40960, 45056, 45568, 45576, 0, 32768, 40960, - 45056, 45568, 45576, 45578, 0, 32768, 40960, 45056, - 45568, 45576, 0, 32768, 40960, 45056, 45568, 45584, - 45580, 0, 32768, 40960, 45056, 45568, 45584, 45580, - 0, 32768, 40960, 45056, 45568, 45584, 45585, 45582, - 0, 32768, 40960, 45056, 45568, 0, 32768, 40960, - 45056, 45568, 45584, 0, 32768, 40960, 45056, 45568, - 45584, 0, 32768, 40960, 45056, 45568, 45584, 45586, - 0, 32768, 40960, 45056, 45568, 45584, 0, 32768, - 40960, 45056, 45568, 45584, 45588, 0, 32768, 40960, - 45056, 45568, 45584, 45588, 0, 32768, 40960, 45056, - 45568, 45584, 45592, 45590, 0, 32768, 40960, 45056, - 45568, 45584, 0, 32768, 40960, 45056, 45568, 45600, - 45592, 0, 32768, 40960, 45056, 45568, 45600, 45592, - 0, 32768, 40960, 45056, 45568, 45600, 45592, 45594, - 0, 32768, 40960, 45056, 45568, 45600, 45592, 0, - 32768, 40960, 45056, 45568, 45600, 45601, 45596, 0, - 32768, 40960, 45056, 45568, 45600, 45601, 45596, 0, - 32768, 40960, 45056, 45568, 45600, 45601, 45596, 45598, - 0, 32768, 40960, 45056, 45568, 0, 32768, 40960, - 45056, 45568, 45600, 0, 32768, 40960, 45056, 45568, - 45600, 0, 32768, 40960, 45056, 45568, 45600, 45602, - 0, 32768, 40960, 45056, 45568, 45600, 0, 32768, - 40960, 45056, 45568, 45600, 45604, 0, 32768, 40960, - 45056, 45568, 45600, 45604, 0, 32768, 40960, 45056, - 45568, 45600, 45608, 45606, 0, 32768, 40960, 45056, - 45568, 45600, 0, 32768, 40960, 45056, 45568, 45600, - 45608, 0, 32768, 40960, 45056, 45568, 45600, 45608, - 0, 32768, 40960, 45056, 45568, 45600, 45608, 45610, - 0, 32768, 40960, 45056, 45568, 45600, 45608, 0, - 32768, 40960, 45056, 45568, 45600, 45616, 45612, 0, - 32768, 40960, 45056, 45568, 45600, 45616, 45612, 0, - 32768, 40960, 45056, 45568, 45600, 45616, 45617, 45614, - 0, 32768, 40960, 45056, 45568, 45600, 0, 32768, - 40960, 45056, 45568, 45632, 45616, 0, 32768, 40960, - 45056, 45568, 45632, 45616, 0, 32768, 40960, 45056, - 45568, 45632, 45616, 45618, 0, 32768, 40960, 45056, - 45568, 45632, 45616, 0, 32768, 40960, 45056, 45568, - 45632, 45616, 45620, 0, 32768, 40960, 45056, 45568, - 45632, 45616, 45620, 0, 32768, 40960, 45056, 45568, - 45632, 45616, 45624, 45622, 0, 32768, 40960, 45056, - 45568, 45632, 45616, 0, 32768, 40960, 45056, 45568, - 45632, 45633, 45624, 0, 32768, 40960, 45056, 45568, - 45632, 45633, 45624, 0, 32768, 40960, 45056, 45568, - 45632, 45633, 45624, 45626, 0, 32768, 40960, 45056, - 45568, 45632, 45633, 45624, 0, 32768, 40960, 45056, - 45568, 45632, 45633, 45624, 45628, 0, 32768, 40960, - 45056, 45568, 45632, 45633, 45635, 45628, 0, 32768, - 40960, 45056, 45568, 45632, 45633, 45635, 45628, 45630, - 0, 32768, 40960, 45056, 45568, 0, 32768, 40960, - 45056, 45568, 45632, 0, 32768, 40960, 45056, 45568, - 45632, 0, 32768, 40960, 45056, 45568, 45632, 45634, - 0, 32768, 40960, 45056, 45568, 45632, 0, 32768, - 40960, 45056, 45568, 45632, 45636, 0, 32768, 40960, - 45056, 45568, 45632, 45636, 0, 32768, 40960, 45056, - 45568, 45632, 45640, 45638, 0, 32768, 40960, 45056, - 45568, 45632, 0, 32768, 40960, 45056, 45568, 45632, - 45640, 0, 32768, 40960, 45056, 45568, 45632, 45640, - 0, 32768, 40960, 45056, 45568, 45632, 45640, 45642, - 0, 32768, 40960, 45056, 45568, 45632, 45640, 0, - 32768, 40960, 45056, 45568, 45632, 45648, 45644, 0, - 32768, 40960, 45056, 45568, 45632, 45648, 45644, 0, - 32768, 40960, 45056, 45568, 45632, 45648, 45649, 45646, - 0, 32768, 40960, 45056, 45568, 45632, 0, 32768, - 40960, 45056, 45568, 45632, 45648, 0, 32768, 40960, - 45056, 45568, 45632, 45648, 0, 32768, 40960, 45056, - 45568, 45632, 45648, 45650, 0, 32768, 40960, 45056, - 45568, 45632, 45648, 0, 32768, 40960, 45056, 45568, - 45632, 45648, 45652, 0, 32768, 40960, 45056, 45568, - 45632, 45648, 45652, 0, 32768, 40960, 45056, 45568, - 45632, 45648, 45656, 45654, 0, 32768, 40960, 45056, - 45568, 45632, 45648, 0, 32768, 40960, 45056, 45568, - 45632, 45664, 45656, 0, 32768, 40960, 45056, 45568, - 45632, 45664, 45656, 0, 32768, 40960, 45056, 45568, - 45632, 45664, 45656, 45658, 0, 32768, 40960, 45056, - 45568, 45632, 45664, 45656, 0, 32768, 40960, 45056, - 45568, 45632, 45664, 45665, 45660, 0, 32768, 40960, - 45056, 45568, 45632, 45664, 45665, 45660, 0, 32768, - 40960, 45056, 45568, 45632, 45664, 45665, 45660, 45662, - 0, 32768, 40960, 45056, 45568, 45632, 0, 32768, - 40960, 45056, 45568, 45696, 45664, 0, 32768, 40960, - 45056, 45568, 45696, 45664, 0, 32768, 40960, 45056, - 45568, 45696, 45664, 45666, 0, 32768, 40960, 45056, - 45568, 45696, 45664, 0, 32768, 40960, 45056, 45568, - 45696, 45664, 45668, 0, 32768, 40960, 45056, 45568, - 45696, 45664, 45668, 0, 32768, 40960, 45056, 45568, - 45696, 45664, 45672, 45670, 0, 32768, 40960, 45056, - 45568, 45696, 45664, 0, 32768, 40960, 45056, 45568, - 45696, 45664, 45672, 0, 32768, 40960, 45056, 45568, - 45696, 45664, 45672, 0, 32768, 40960, 45056, 45568, - 45696, 45664, 45672, 45674, 0, 32768, 40960, 45056, - 45568, 45696, 45664, 45672, 0, 32768, 40960, 45056, - 45568, 45696, 45664, 45680, 45676, 0, 32768, 40960, - 45056, 45568, 45696, 45664, 45680, 45676, 0, 32768, - 40960, 45056, 45568, 45696, 45664, 45680, 45681, 45678, - 0, 32768, 40960, 45056, 45568, 45696, 45664, 0, - 32768, 40960, 45056, 45568, 45696, 45697, 45680, 0, - 32768, 40960, 45056, 45568, 45696, 45697, 45680, 0, - 32768, 40960, 45056, 45568, 45696, 45697, 45680, 45682, - 0, 32768, 40960, 45056, 45568, 45696, 45697, 45680, - 0, 32768, 40960, 45056, 45568, 45696, 45697, 45680, - 45684, 0, 32768, 40960, 45056, 45568, 45696, 45697, - 45680, 45684, 0, 32768, 40960, 45056, 45568, 45696, - 45697, 45680, 45688, 45686, 0, 32768, 40960, 45056, - 45568, 45696, 45697, 45680, 0, 32768, 40960, 45056, - 45568, 45696, 45697, 45680, 45688, 0, 32768, 40960, - 45056, 45568, 45696, 45697, 45699, 45688, 0, 32768, - 40960, 45056, 45568, 45696, 45697, 45699, 45688, 45690, - 0, 32768, 40960, 45056, 45568, 45696, 45697, 45699, - 45688, 0, 32768, 40960, 45056, 45568, 45696, 45697, - 45699, 45688, 45692, 0, 32768, 40960, 45056, 45568, - 45696, 45697, 45699, 45688, 45692, 0, 32768, 40960, - 45056, 45568, 45696, 45697, 45699, 45688, 45692, 45694, - 0, 32768, 40960, 45056, 45568, 0, 32768, 40960, - 45056, 45568, 45696, 0, 32768, 40960, 45056, 45568, - 45696, 0, 32768, 40960, 45056, 45568, 45696, 45698, - 0, 32768, 40960, 45056, 45568, 45696, 0, 32768, - 40960, 45056, 45568, 45696, 45700, 0, 32768, 40960, - 45056, 45568, 45696, 45700, 0, 32768, 40960, 45056, - 45568, 45696, 45704, 45702, 0, 32768, 40960, 45056, - 45568, 45696, 0, 32768, 40960, 45056, 45568, 45696, - 45704, 0, 32768, 40960, 45056, 45568, 45696, 45704, - 0, 32768, 40960, 45056, 45568, 45696, 45704, 45706, - 0, 32768, 40960, 45056, 45568, 45696, 45704, 0, - 32768, 40960, 45056, 45568, 45696, 45712, 45708, 0, - 32768, 40960, 45056, 45568, 45696, 45712, 45708, 0, - 32768, 40960, 45056, 45568, 45696, 45712, 45713, 45710, - 0, 32768, 40960, 45056, 45568, 45696, 0, 32768, - 40960, 45056, 45568, 45696, 45712, 0, 32768, 40960, - 45056, 45568, 45696, 45712, 0, 32768, 40960, 45056, - 45568, 45696, 45712, 45714, 0, 32768, 40960, 45056, - 45568, 45696, 45712, 0, 32768, 40960, 45056, 45568, - 45696, 45712, 45716, 0, 32768, 40960, 45056, 45568, - 45696, 45712, 45716, 0, 32768, 40960, 45056, 45568, - 45696, 45712, 45720, 45718, 0, 32768, 40960, 45056, - 45568, 45696, 45712, 0, 32768, 40960, 45056, 45568, - 45696, 45728, 45720, 0, 32768, 40960, 45056, 45568, - 45696, 45728, 45720, 0, 32768, 40960, 45056, 45568, - 45696, 45728, 45720, 45722, 0, 32768, 40960, 45056, - 45568, 45696, 45728, 45720, 0, 32768, 40960, 45056, - 45568, 45696, 45728, 45729, 45724, 0, 32768, 40960, - 45056, 45568, 45696, 45728, 45729, 45724, 0, 32768, - 40960, 45056, 45568, 45696, 45728, 45729, 45724, 45726, - 0, 32768, 40960, 45056, 45568, 45696, 0, 32768, - 40960, 45056, 45568, 45696, 45728, 0, 32768, 40960, - 45056, 45568, 45696, 45728, 0, 32768, 40960, 45056, - 45568, 45696, 45728, 45730, 0, 32768, 40960, 45056, - 45568, 45696, 45728, 0, 32768, 40960, 45056, 45568, - 45696, 45728, 45732, 0, 32768, 40960, 45056, 45568, - 45696, 45728, 45732, 0, 32768, 40960, 45056, 45568, - 45696, 45728, 45736, 45734, 0, 32768, 40960, 45056, - 45568, 45696, 45728, 0, 32768, 40960, 45056, 45568, - 45696, 45728, 45736, 0, 32768, 40960, 45056, 45568, - 45696, 45728, 45736, 0, 32768, 40960, 45056, 45568, - 45696, 45728, 45736, 45738, 0, 32768, 40960, 45056, - 45568, 45696, 45728, 45736, 0, 32768, 40960, 45056, - 45568, 45696, 45728, 45744, 45740, 0, 32768, 40960, - 45056, 45568, 45696, 45728, 45744, 45740, 0, 32768, - 40960, 45056, 45568, 45696, 45728, 45744, 45745, 45742, - 0, 32768, 40960, 45056, 45568, 45696, 45728, 0, - 32768, 40960, 45056, 45568, 45696, 45760, 45744, 0, - 32768, 40960, 45056, 45568, 45696, 45760, 45744, 0, - 32768, 40960, 45056, 45568, 45696, 45760, 45744, 45746, - 0, 32768, 40960, 45056, 45568, 45696, 45760, 45744, - 0, 32768, 40960, 45056, 45568, 45696, 45760, 45744, - 45748, 0, 32768, 40960, 45056, 45568, 45696, 45760, - 45744, 45748, 0, 32768, 40960, 45056, 45568, 45696, - 45760, 45744, 45752, 45750, 0, 32768, 40960, 45056, - 45568, 45696, 45760, 45744, 0, 32768, 40960, 45056, - 45568, 45696, 45760, 45761, 45752, 0, 32768, 40960, - 45056, 45568, 45696, 45760, 45761, 45752, 0, 32768, - 40960, 45056, 45568, 45696, 45760, 45761, 45752, 45754, - 0, 32768, 40960, 45056, 45568, 45696, 45760, 45761, - 45752, 0, 32768, 40960, 45056, 45568, 45696, 45760, - 45761, 45752, 45756, 0, 32768, 40960, 45056, 45568, - 45696, 45760, 45761, 45763, 45756, 0, 32768, 40960, - 45056, 45568, 45696, 45760, 45761, 45763, 45756, 45758, - 0, 32768, 40960, 45056, 45568, 45696, 0, 32768, - 40960, 45056, 45568, 45824, 45760, 0, 32768, 40960, - 45056, 45568, 45824, 45760, 0, 32768, 40960, 45056, - 45568, 45824, 45760, 45762, 0, 32768, 40960, 45056, - 45568, 45824, 45760, 0, 32768, 40960, 45056, 45568, - 45824, 45760, 45764, 0, 32768, 40960, 45056, 45568, - 45824, 45760, 45764, 0, 32768, 40960, 45056, 45568, - 45824, 45760, 45768, 45766, 0, 32768, 40960, 45056, - 45568, 45824, 45760, 0, 32768, 40960, 45056, 45568, - 45824, 45760, 45768, 0, 32768, 40960, 45056, 45568, - 45824, 45760, 45768, 0, 32768, 40960, 45056, 45568, - 45824, 45760, 45768, 45770, 0, 32768, 40960, 45056, - 45568, 45824, 45760, 45768, 0, 32768, 40960, 45056, - 45568, 45824, 45760, 45776, 45772, 0, 32768, 40960, - 45056, 45568, 45824, 45760, 45776, 45772, 0, 32768, - 40960, 45056, 45568, 45824, 45760, 45776, 45777, 45774, - 0, 32768, 40960, 45056, 45568, 45824, 45760, 0, - 32768, 40960, 45056, 45568, 45824, 45760, 45776, 0, - 32768, 40960, 45056, 45568, 45824, 45760, 45776, 0, - 32768, 40960, 45056, 45568, 45824, 45760, 45776, 45778, - 0, 32768, 40960, 45056, 45568, 45824, 45760, 45776, - 0, 32768, 40960, 45056, 45568, 45824, 45760, 45776, - 45780, 0, 32768, 40960, 45056, 45568, 45824, 45760, - 45776, 45780, 0, 32768, 40960, 45056, 45568, 45824, - 45760, 45776, 45784, 45782, 0, 32768, 40960, 45056, - 45568, 45824, 45760, 45776, 0, 32768, 40960, 45056, - 45568, 45824, 45760, 45792, 45784, 0, 32768, 40960, - 45056, 45568, 45824, 45760, 45792, 45784, 0, 32768, - 40960, 45056, 45568, 45824, 45760, 45792, 45784, 45786, - 0, 32768, 40960, 45056, 45568, 45824, 45760, 45792, - 45784, 0, 32768, 40960, 45056, 45568, 45824, 45760, - 45792, 45793, 45788, 0, 32768, 40960, 45056, 45568, - 45824, 45760, 45792, 45793, 45788, 0, 32768, 40960, - 45056, 45568, 45824, 45760, 45792, 45793, 45788, 45790, - 0, 32768, 40960, 45056, 45568, 45824, 45760, 0, - 32768, 40960, 45056, 45568, 45824, 45825, 45792, 0, - 32768, 40960, 45056, 45568, 45824, 45825, 45792, 0, - 32768, 40960, 45056, 45568, 45824, 45825, 45792, 45794, - 0, 32768, 40960, 45056, 45568, 45824, 45825, 45792, - 0, 32768, 40960, 45056, 45568, 45824, 45825, 45792, - 45796, 0, 32768, 40960, 45056, 45568, 45824, 45825, - 45792, 45796, 0, 32768, 40960, 45056, 45568, 45824, - 45825, 45792, 45800, 45798, 0, 32768, 40960, 45056, - 45568, 45824, 45825, 45792, 0, 32768, 40960, 45056, - 45568, 45824, 45825, 45792, 45800, 0, 32768, 40960, - 45056, 45568, 45824, 45825, 45792, 45800, 0, 32768, - 40960, 45056, 45568, 45824, 45825, 45792, 45800, 45802, - 0, 32768, 40960, 45056, 45568, 45824, 45825, 45792, - 45800, 0, 32768, 40960, 45056, 45568, 45824, 45825, - 45792, 45808, 45804, 0, 32768, 40960, 45056, 45568, - 45824, 45825, 45792, 45808, 45804, 0, 32768, 40960, - 45056, 45568, 45824, 45825, 45792, 45808, 45809, 45806, - 0, 32768, 40960, 45056, 45568, 45824, 45825, 45792, - 0, 32768, 40960, 45056, 45568, 45824, 45825, 45792, - 45808, 0, 32768, 40960, 45056, 45568, 45824, 45825, - 45827, 45808, 0, 32768, 40960, 45056, 45568, 45824, - 45825, 45827, 45808, 45810, 0, 32768, 40960, 45056, - 45568, 45824, 45825, 45827, 45808, 0, 32768, 40960, - 45056, 45568, 45824, 45825, 45827, 45808, 45812, 0, - 32768, 40960, 45056, 45568, 45824, 45825, 45827, 45808, - 45812, 0, 32768, 40960, 45056, 45568, 45824, 45825, - 45827, 45808, 45816, 45814, 0, 32768, 40960, 45056, - 45568, 45824, 45825, 45827, 45808, 0, 32768, 40960, - 45056, 45568, 45824, 45825, 45827, 45808, 45816, 0, - 32768, 40960, 45056, 45568, 45824, 45825, 45827, 45808, - 45816, 0, 32768, 40960, 45056, 45568, 45824, 45825, - 45827, 45808, 45816, 45818, 0, 32768, 40960, 45056, - 45568, 45824, 45825, 45827, 45831, 45816, 0, 32768, - 40960, 45056, 45568, 45824, 45825, 45827, 45831, 45816, - 45820, 0, 32768, 40960, 45056, 45568, 45824, 45825, - 45827, 45831, 45816, 45820, 0, 32768, 40960, 45056, - 45568, 45824, 45825, 45827, 45831, 45816, 45820, 45822, - 0, 32768, 40960, 45056, 45568, 0, 32768, 40960, - 45056, 46080, 45824, 0, 32768, 40960, 45056, 46080, - 45824, 0, 32768, 40960, 45056, 46080, 45824, 45826, - 0, 32768, 40960, 45056, 46080, 45824, 0, 32768, - 40960, 45056, 46080, 45824, 45828, 0, 32768, 40960, - 45056, 46080, 45824, 45828, 0, 32768, 40960, 45056, - 46080, 45824, 45832, 45830, 0, 32768, 40960, 45056, - 46080, 45824, 0, 32768, 40960, 45056, 46080, 45824, - 45832, 0, 32768, 40960, 45056, 46080, 45824, 45832, - 0, 32768, 40960, 45056, 46080, 45824, 45832, 45834, - 0, 32768, 40960, 45056, 46080, 45824, 45832, 0, - 32768, 40960, 45056, 46080, 45824, 45840, 45836, 0, - 32768, 40960, 45056, 46080, 45824, 45840, 45836, 0, - 32768, 40960, 45056, 46080, 45824, 45840, 45841, 45838, - 0, 32768, 40960, 45056, 46080, 45824, 0, 32768, - 40960, 45056, 46080, 45824, 45840, 0, 32768, 40960, - 45056, 46080, 45824, 45840, 0, 32768, 40960, 45056, - 46080, 45824, 45840, 45842, 0, 32768, 40960, 45056, - 46080, 45824, 45840, 0, 32768, 40960, 45056, 46080, - 45824, 45840, 45844, 0, 32768, 40960, 45056, 46080, - 45824, 45840, 45844, 0, 32768, 40960, 45056, 46080, - 45824, 45840, 45848, 45846, 0, 32768, 40960, 45056, - 46080, 45824, 45840, 0, 32768, 40960, 45056, 46080, - 45824, 45856, 45848, 0, 32768, 40960, 45056, 46080, - 45824, 45856, 45848, 0, 32768, 40960, 45056, 46080, - 45824, 45856, 45848, 45850, 0, 32768, 40960, 45056, - 46080, 45824, 45856, 45848, 0, 32768, 40960, 45056, - 46080, 45824, 45856, 45857, 45852, 0, 32768, 40960, - 45056, 46080, 45824, 45856, 45857, 45852, 0, 32768, - 40960, 45056, 46080, 45824, 45856, 45857, 45852, 45854, - 0, 32768, 40960, 45056, 46080, 45824, 0, 32768, - 40960, 45056, 46080, 45824, 45856, 0, 32768, 40960, - 45056, 46080, 45824, 45856, 0, 32768, 40960, 45056, - 46080, 45824, 45856, 45858, 0, 32768, 40960, 45056, - 46080, 45824, 45856, 0, 32768, 40960, 45056, 46080, - 45824, 45856, 45860, 0, 32768, 40960, 45056, 46080, - 45824, 45856, 45860, 0, 32768, 40960, 45056, 46080, - 45824, 45856, 45864, 45862, 0, 32768, 40960, 45056, - 46080, 45824, 45856, 0, 32768, 40960, 45056, 46080, - 45824, 45856, 45864, 0, 32768, 40960, 45056, 46080, - 45824, 45856, 45864, 0, 32768, 40960, 45056, 46080, - 45824, 45856, 45864, 45866, 0, 32768, 40960, 45056, - 46080, 45824, 45856, 45864, 0, 32768, 40960, 45056, - 46080, 45824, 45856, 45872, 45868, 0, 32768, 40960, - 45056, 46080, 45824, 45856, 45872, 45868, 0, 32768, - 40960, 45056, 46080, 45824, 45856, 45872, 45873, 45870, - 0, 32768, 40960, 45056, 46080, 45824, 45856, 0, - 32768, 40960, 45056, 46080, 45824, 45888, 45872, 0, - 32768, 40960, 45056, 46080, 45824, 45888, 45872, 0, - 32768, 40960, 45056, 46080, 45824, 45888, 45872, 45874, - 0, 32768, 40960, 45056, 46080, 45824, 45888, 45872, - 0, 32768, 40960, 45056, 46080, 45824, 45888, 45872, - 45876, 0, 32768, 40960, 45056, 46080, 45824, 45888, - 45872, 45876, 0, 32768, 40960, 45056, 46080, 45824, - 45888, 45872, 45880, 45878, 0, 32768, 40960, 45056, - 46080, 45824, 45888, 45872, 0, 32768, 40960, 45056, - 46080, 45824, 45888, 45889, 45880, 0, 32768, 40960, - 45056, 46080, 45824, 45888, 45889, 45880, 0, 32768, - 40960, 45056, 46080, 45824, 45888, 45889, 45880, 45882, - 0, 32768, 40960, 45056, 46080, 45824, 45888, 45889, - 45880, 0, 32768, 40960, 45056, 46080, 45824, 45888, - 45889, 45880, 45884, 0, 32768, 40960, 45056, 46080, - 45824, 45888, 45889, 45891, 45884, 0, 32768, 40960, - 45056, 46080, 45824, 45888, 45889, 45891, 45884, 45886, - 0, 32768, 40960, 45056, 46080, 45824, 0, 32768, - 40960, 45056, 46080, 45824, 45888, 0, 32768, 40960, - 45056, 46080, 45824, 45888, 0, 32768, 40960, 45056, - 46080, 45824, 45888, 45890, 0, 32768, 40960, 45056, - 46080, 45824, 45888, 0, 32768, 40960, 45056, 46080, - 45824, 45888, 45892, 0, 32768, 40960, 45056, 46080, - 45824, 45888, 45892, 0, 32768, 40960, 45056, 46080, - 45824, 45888, 45896, 45894, 0, 32768, 40960, 45056, - 46080, 45824, 45888, 0, 32768, 40960, 45056, 46080, - 45824, 45888, 45896, 0, 32768, 40960, 45056, 46080, - 45824, 45888, 45896, 0, 32768, 40960, 45056, 46080, - 45824, 45888, 45896, 45898, 0, 32768, 40960, 45056, - 46080, 45824, 45888, 45896, 0, 32768, 40960, 45056, - 46080, 45824, 45888, 45904, 45900, 0, 32768, 40960, - 45056, 46080, 45824, 45888, 45904, 45900, 0, 32768, - 40960, 45056, 46080, 45824, 45888, 45904, 45905, 45902, - 0, 32768, 40960, 45056, 46080, 45824, 45888, 0, - 32768, 40960, 45056, 46080, 45824, 45888, 45904, 0, - 32768, 40960, 45056, 46080, 45824, 45888, 45904, 0, - 32768, 40960, 45056, 46080, 45824, 45888, 45904, 45906, - 0, 32768, 40960, 45056, 46080, 45824, 45888, 45904, - 0, 32768, 40960, 45056, 46080, 45824, 45888, 45904, - 45908, 0, 32768, 40960, 45056, 46080, 45824, 45888, - 45904, 45908, 0, 32768, 40960, 45056, 46080, 45824, - 45888, 45904, 45912, 45910, 0, 32768, 40960, 45056, - 46080, 45824, 45888, 45904, 0, 32768, 40960, 45056, - 46080, 45824, 45888, 45920, 45912, 0, 32768, 40960, - 45056, 46080, 45824, 45888, 45920, 45912, 0, 32768, - 40960, 45056, 46080, 45824, 45888, 45920, 45912, 45914, - 0, 32768, 40960, 45056, 46080, 45824, 45888, 45920, - 45912, 0, 32768, 40960, 45056, 46080, 45824, 45888, - 45920, 45921, 45916, 0, 32768, 40960, 45056, 46080, - 45824, 45888, 45920, 45921, 45916, 0, 32768, 40960, - 45056, 46080, 45824, 45888, 45920, 45921, 45916, 45918, - 0, 32768, 40960, 45056, 46080, 45824, 45888, 0, - 32768, 40960, 45056, 46080, 45824, 45952, 45920, 0, - 32768, 40960, 45056, 46080, 45824, 45952, 45920, 0, - 32768, 40960, 45056, 46080, 45824, 45952, 45920, 45922, - 0, 32768, 40960, 45056, 46080, 45824, 45952, 45920, - 0, 32768, 40960, 45056, 46080, 45824, 45952, 45920, - 45924, 0, 32768, 40960, 45056, 46080, 45824, 45952, - 45920, 45924, 0, 32768, 40960, 45056, 46080, 45824, - 45952, 45920, 45928, 45926, 0, 32768, 40960, 45056, - 46080, 45824, 45952, 45920, 0, 32768, 40960, 45056, - 46080, 45824, 45952, 45920, 45928, 0, 32768, 40960, - 45056, 46080, 45824, 45952, 45920, 45928, 0, 32768, - 40960, 45056, 46080, 45824, 45952, 45920, 45928, 45930, - 0, 32768, 40960, 45056, 46080, 45824, 45952, 45920, - 45928, 0, 32768, 40960, 45056, 46080, 45824, 45952, - 45920, 45936, 45932, 0, 32768, 40960, 45056, 46080, - 45824, 45952, 45920, 45936, 45932, 0, 32768, 40960, - 45056, 46080, 45824, 45952, 45920, 45936, 45937, 45934, - 0, 32768, 40960, 45056, 46080, 45824, 45952, 45920, - 0, 32768, 40960, 45056, 46080, 45824, 45952, 45953, - 45936, 0, 32768, 40960, 45056, 46080, 45824, 45952, - 45953, 45936, 0, 32768, 40960, 45056, 46080, 45824, - 45952, 45953, 45936, 45938, 0, 32768, 40960, 45056, - 46080, 45824, 45952, 45953, 45936, 0, 32768, 40960, - 45056, 46080, 45824, 45952, 45953, 45936, 45940, 0, - 32768, 40960, 45056, 46080, 45824, 45952, 45953, 45936, - 45940, 0, 32768, 40960, 45056, 46080, 45824, 45952, - 45953, 45936, 45944, 45942, 0, 32768, 40960, 45056, - 46080, 45824, 45952, 45953, 45936, 0, 32768, 40960, - 45056, 46080, 45824, 45952, 45953, 45936, 45944, 0, - 32768, 40960, 45056, 46080, 45824, 45952, 45953, 45955, - 45944, 0, 32768, 40960, 45056, 46080, 45824, 45952, - 45953, 45955, 45944, 45946, 0, 32768, 40960, 45056, - 46080, 45824, 45952, 45953, 45955, 45944, 0, 32768, - 40960, 45056, 46080, 45824, 45952, 45953, 45955, 45944, - 45948, 0, 32768, 40960, 45056, 46080, 45824, 45952, - 45953, 45955, 45944, 45948, 0, 32768, 40960, 45056, - 46080, 45824, 45952, 45953, 45955, 45944, 45948, 45950, - 0, 32768, 40960, 45056, 46080, 45824, 0, 32768, - 40960, 45056, 46080, 45824, 45952, 0, 32768, 40960, - 45056, 46080, 46081, 45952, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 45954, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 0, 32768, 40960, 45056, 46080, - 46081, 45952, 45956, 0, 32768, 40960, 45056, 46080, - 46081, 45952, 45956, 0, 32768, 40960, 45056, 46080, - 46081, 45952, 45960, 45958, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 0, 32768, 40960, 45056, 46080, - 46081, 45952, 45960, 0, 32768, 40960, 45056, 46080, - 46081, 45952, 45960, 0, 32768, 40960, 45056, 46080, - 46081, 45952, 45960, 45962, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 45960, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 45968, 45964, 0, 32768, 40960, - 45056, 46080, 46081, 45952, 45968, 45964, 0, 32768, - 40960, 45056, 46080, 46081, 45952, 45968, 45969, 45966, - 0, 32768, 40960, 45056, 46080, 46081, 45952, 0, - 32768, 40960, 45056, 46080, 46081, 45952, 45968, 0, - 32768, 40960, 45056, 46080, 46081, 45952, 45968, 0, - 32768, 40960, 45056, 46080, 46081, 45952, 45968, 45970, - 0, 32768, 40960, 45056, 46080, 46081, 45952, 45968, - 0, 32768, 40960, 45056, 46080, 46081, 45952, 45968, - 45972, 0, 32768, 40960, 45056, 46080, 46081, 45952, - 45968, 45972, 0, 32768, 40960, 45056, 46080, 46081, - 45952, 45968, 45976, 45974, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 45968, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 45984, 45976, 0, 32768, 40960, - 45056, 46080, 46081, 45952, 45984, 45976, 0, 32768, - 40960, 45056, 46080, 46081, 45952, 45984, 45976, 45978, - 0, 32768, 40960, 45056, 46080, 46081, 45952, 45984, - 45976, 0, 32768, 40960, 45056, 46080, 46081, 45952, - 45984, 45985, 45980, 0, 32768, 40960, 45056, 46080, - 46081, 45952, 45984, 45985, 45980, 0, 32768, 40960, - 45056, 46080, 46081, 45952, 45984, 45985, 45980, 45982, - 0, 32768, 40960, 45056, 46080, 46081, 45952, 0, - 32768, 40960, 45056, 46080, 46081, 45952, 45984, 0, - 32768, 40960, 45056, 46080, 46081, 45952, 45984, 0, - 32768, 40960, 45056, 46080, 46081, 45952, 45984, 45986, - 0, 32768, 40960, 45056, 46080, 46081, 45952, 45984, - 0, 32768, 40960, 45056, 46080, 46081, 45952, 45984, - 45988, 0, 32768, 40960, 45056, 46080, 46081, 45952, - 45984, 45988, 0, 32768, 40960, 45056, 46080, 46081, - 45952, 45984, 45992, 45990, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 45984, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 45984, 45992, 0, 32768, 40960, - 45056, 46080, 46081, 45952, 45984, 45992, 0, 32768, - 40960, 45056, 46080, 46081, 45952, 45984, 45992, 45994, - 0, 32768, 40960, 45056, 46080, 46081, 45952, 45984, - 45992, 0, 32768, 40960, 45056, 46080, 46081, 45952, - 45984, 46000, 45996, 0, 32768, 40960, 45056, 46080, - 46081, 45952, 45984, 46000, 45996, 0, 32768, 40960, - 45056, 46080, 46081, 45952, 45984, 46000, 46001, 45998, - 0, 32768, 40960, 45056, 46080, 46081, 45952, 45984, - 0, 32768, 40960, 45056, 46080, 46081, 45952, 46016, - 46000, 0, 32768, 40960, 45056, 46080, 46081, 45952, - 46016, 46000, 0, 32768, 40960, 45056, 46080, 46081, - 45952, 46016, 46000, 46002, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 46016, 46000, 0, 32768, 40960, - 45056, 46080, 46081, 45952, 46016, 46000, 46004, 0, - 32768, 40960, 45056, 46080, 46081, 45952, 46016, 46000, - 46004, 0, 32768, 40960, 45056, 46080, 46081, 45952, - 46016, 46000, 46008, 46006, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 46016, 46000, 0, 32768, 40960, - 45056, 46080, 46081, 45952, 46016, 46017, 46008, 0, - 32768, 40960, 45056, 46080, 46081, 45952, 46016, 46017, - 46008, 0, 32768, 40960, 45056, 46080, 46081, 45952, - 46016, 46017, 46008, 46010, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 46016, 46017, 46008, 0, 32768, - 40960, 45056, 46080, 46081, 45952, 46016, 46017, 46008, - 46012, 0, 32768, 40960, 45056, 46080, 46081, 45952, - 46016, 46017, 46019, 46012, 0, 32768, 40960, 45056, - 46080, 46081, 45952, 46016, 46017, 46019, 46012, 46014, - 0, 32768, 40960, 45056, 46080, 46081, 45952, 0, - 32768, 40960, 45056, 46080, 46081, 45952, 46016, 0, - 32768, 40960, 45056, 46080, 46081, 45952, 46016, 0, - 32768, 40960, 45056, 46080, 46081, 45952, 46016, 46018, - 0, 32768, 40960, 45056, 46080, 46081, 46083, 46016, - 0, 32768, 40960, 45056, 46080, 46081, 46083, 46016, - 46020, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46016, 46020, 0, 32768, 40960, 45056, 46080, 46081, - 46083, 46016, 46024, 46022, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46016, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46016, 46024, 0, 32768, 40960, - 45056, 46080, 46081, 46083, 46016, 46024, 0, 32768, - 40960, 45056, 46080, 46081, 46083, 46016, 46024, 46026, - 0, 32768, 40960, 45056, 46080, 46081, 46083, 46016, - 46024, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46016, 46032, 46028, 0, 32768, 40960, 45056, 46080, - 46081, 46083, 46016, 46032, 46028, 0, 32768, 40960, - 45056, 46080, 46081, 46083, 46016, 46032, 46033, 46030, - 0, 32768, 40960, 45056, 46080, 46081, 46083, 46016, - 0, 32768, 40960, 45056, 46080, 46081, 46083, 46016, - 46032, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46016, 46032, 0, 32768, 40960, 45056, 46080, 46081, - 46083, 46016, 46032, 46034, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46016, 46032, 0, 32768, 40960, - 45056, 46080, 46081, 46083, 46016, 46032, 46036, 0, - 32768, 40960, 45056, 46080, 46081, 46083, 46016, 46032, - 46036, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46016, 46032, 46040, 46038, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46016, 46032, 0, 32768, 40960, - 45056, 46080, 46081, 46083, 46016, 46048, 46040, 0, - 32768, 40960, 45056, 46080, 46081, 46083, 46016, 46048, - 46040, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46016, 46048, 46040, 46042, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46016, 46048, 46040, 0, 32768, - 40960, 45056, 46080, 46081, 46083, 46016, 46048, 46049, - 46044, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46016, 46048, 46049, 46044, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46016, 46048, 46049, 46044, 46046, - 0, 32768, 40960, 45056, 46080, 46081, 46083, 46016, - 0, 32768, 40960, 45056, 46080, 46081, 46083, 46016, - 46048, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46016, 46048, 0, 32768, 40960, 45056, 46080, 46081, - 46083, 46016, 46048, 46050, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46016, 46048, 0, 32768, 40960, - 45056, 46080, 46081, 46083, 46016, 46048, 46052, 0, - 32768, 40960, 45056, 46080, 46081, 46083, 46016, 46048, - 46052, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46016, 46048, 46056, 46054, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46087, 46048, 0, 32768, 40960, - 45056, 46080, 46081, 46083, 46087, 46048, 46056, 0, - 32768, 40960, 45056, 46080, 46081, 46083, 46087, 46048, - 46056, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46087, 46048, 46056, 46058, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46087, 46048, 46056, 0, 32768, - 40960, 45056, 46080, 46081, 46083, 46087, 46048, 46064, - 46060, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46087, 46048, 46064, 46060, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46087, 46048, 46064, 46065, 46062, - 0, 32768, 40960, 45056, 46080, 46081, 46083, 46087, - 46048, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46087, 46048, 46064, 0, 32768, 40960, 45056, 46080, - 46081, 46083, 46087, 46048, 46064, 0, 32768, 40960, - 45056, 46080, 46081, 46083, 46087, 46048, 46064, 46066, - 0, 32768, 40960, 45056, 46080, 46081, 46083, 46087, - 46048, 46064, 0, 32768, 40960, 45056, 46080, 46081, - 46083, 46087, 46048, 46064, 46068, 0, 32768, 40960, - 45056, 46080, 46081, 46083, 46087, 46048, 46064, 46068, - 0, 32768, 40960, 45056, 46080, 46081, 46083, 46087, - 46048, 46064, 46072, 46070, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46087, 46048, 46064, 0, 32768, - 40960, 45056, 46080, 46081, 46083, 46087, 46048, 46064, - 46072, 0, 32768, 40960, 45056, 46080, 46081, 46083, - 46087, 46048, 46064, 46072, 0, 32768, 40960, 45056, - 46080, 46081, 46083, 46087, 46048, 46064, 46072, 46074, - 0, 32768, 40960, 45056, 46080, 46081, 46083, 46087, - 46048, 46064, 46072, 0, 32768, 40960, 45056, 46080, - 46081, 46083, 46087, 46048, 46064, 46072, 46076, 0, - 32768, 40960, 45056, 46080, 46081, 46083, 46087, 46048, - 46064, 46072, 46076, 0, 32768, 40960, 45056, 46080, - 46081, 46083, 46087, 46048, 46064, 46072, 46076, 46078, - 0, 32768, 40960, 45056, 0, 32768, 40960, 45056, - 46080, 0, 32768, 40960, 45056, 46080, 0, 32768, - 40960, 45056, 46080, 46082, 0, 32768, 40960, 45056, - 46080, 0, 32768, 40960, 45056, 46080, 46084, 0, - 32768, 40960, 45056, 46080, 46084, 0, 32768, 40960, - 45056, 46080, 46088, 46086, 0, 32768, 40960, 45056, - 46080, 0, 32768, 40960, 45056, 46080, 46088, 0, - 32768, 40960, 45056, 46080, 46088, 0, 32768, 40960, - 45056, 46080, 46088, 46090, 0, 32768, 40960, 45056, - 46080, 46088, 0, 32768, 40960, 45056, 46080, 46096, - 46092, 0, 32768, 40960, 45056, 46080, 46096, 46092, - 0, 32768, 40960, 45056, 46080, 46096, 46097, 46094, - 0, 32768, 40960, 45056, 46080, 0, 32768, 40960, - 45056, 46080, 46096, 0, 32768, 40960, 45056, 46080, - 46096, 0, 32768, 40960, 45056, 46080, 46096, 46098, - 0, 32768, 40960, 45056, 46080, 46096, 0, 32768, - 40960, 45056, 46080, 46096, 46100, 0, 32768, 40960, - 45056, 46080, 46096, 46100, 0, 32768, 40960, 45056, - 46080, 46096, 46104, 46102, 0, 32768, 40960, 45056, - 46080, 46096, 0, 32768, 40960, 45056, 46080, 46112, - 46104, 0, 32768, 40960, 45056, 46080, 46112, 46104, - 0, 32768, 40960, 45056, 46080, 46112, 46104, 46106, - 0, 32768, 40960, 45056, 46080, 46112, 46104, 0, - 32768, 40960, 45056, 46080, 46112, 46113, 46108, 0, - 32768, 40960, 45056, 46080, 46112, 46113, 46108, 0, - 32768, 40960, 45056, 46080, 46112, 46113, 46108, 46110, - 0, 32768, 40960, 45056, 46080, 0, 32768, 40960, - 45056, 46080, 46112, 0, 32768, 40960, 45056, 46080, - 46112, 0, 32768, 40960, 45056, 46080, 46112, 46114, - 0, 32768, 40960, 45056, 46080, 46112, 0, 32768, - 40960, 45056, 46080, 46112, 46116, 0, 32768, 40960, - 45056, 46080, 46112, 46116, 0, 32768, 40960, 45056, - 46080, 46112, 46120, 46118, 0, 32768, 40960, 45056, - 46080, 46112, 0, 32768, 40960, 45056, 46080, 46112, - 46120, 0, 32768, 40960, 45056, 46080, 46112, 46120, - 0, 32768, 40960, 45056, 46080, 46112, 46120, 46122, - 0, 32768, 40960, 45056, 46080, 46112, 46120, 0, - 32768, 40960, 45056, 46080, 46112, 46128, 46124, 0, - 32768, 40960, 45056, 46080, 46112, 46128, 46124, 0, - 32768, 40960, 45056, 46080, 46112, 46128, 46129, 46126, - 0, 32768, 40960, 45056, 46080, 46112, 0, 32768, - 40960, 45056, 46080, 46144, 46128, 0, 32768, 40960, - 45056, 46080, 46144, 46128, 0, 32768, 40960, 45056, - 46080, 46144, 46128, 46130, 0, 32768, 40960, 45056, - 46080, 46144, 46128, 0, 32768, 40960, 45056, 46080, - 46144, 46128, 46132, 0, 32768, 40960, 45056, 46080, - 46144, 46128, 46132, 0, 32768, 40960, 45056, 46080, - 46144, 46128, 46136, 46134, 0, 32768, 40960, 45056, - 46080, 46144, 46128, 0, 32768, 40960, 45056, 46080, - 46144, 46145, 46136, 0, 32768, 40960, 45056, 46080, - 46144, 46145, 46136, 0, 32768, 40960, 45056, 46080, - 46144, 46145, 46136, 46138, 0, 32768, 40960, 45056, - 46080, 46144, 46145, 46136, 0, 32768, 40960, 45056, - 46080, 46144, 46145, 46136, 46140, 0, 32768, 40960, - 45056, 46080, 46144, 46145, 46147, 46140, 0, 32768, - 40960, 45056, 46080, 46144, 46145, 46147, 46140, 46142, - 0, 32768, 40960, 45056, 46080, 0, 32768, 40960, - 45056, 46080, 46144, 0, 32768, 40960, 45056, 46080, - 46144, 0, 32768, 40960, 45056, 46080, 46144, 46146, - 0, 32768, 40960, 45056, 46080, 46144, 0, 32768, - 40960, 45056, 46080, 46144, 46148, 0, 32768, 40960, - 45056, 46080, 46144, 46148, 0, 32768, 40960, 45056, - 46080, 46144, 46152, 46150, 0, 32768, 40960, 45056, - 46080, 46144, 0, 32768, 40960, 45056, 46080, 46144, - 46152, 0, 32768, 40960, 45056, 46080, 46144, 46152, - 0, 32768, 40960, 45056, 46080, 46144, 46152, 46154, - 0, 32768, 40960, 45056, 46080, 46144, 46152, 0, - 32768, 40960, 45056, 46080, 46144, 46160, 46156, 0, - 32768, 40960, 45056, 46080, 46144, 46160, 46156, 0, - 32768, 40960, 45056, 46080, 46144, 46160, 46161, 46158, - 0, 32768, 40960, 45056, 46080, 46144, 0, 32768, - 40960, 45056, 46080, 46144, 46160, 0, 32768, 40960, - 45056, 46080, 46144, 46160, 0, 32768, 40960, 45056, - 46080, 46144, 46160, 46162, 0, 32768, 40960, 45056, - 46080, 46144, 46160, 0, 32768, 40960, 45056, 46080, - 46144, 46160, 46164, 0, 32768, 40960, 45056, 46080, - 46144, 46160, 46164, 0, 32768, 40960, 45056, 46080, - 46144, 46160, 46168, 46166, 0, 32768, 40960, 45056, - 46080, 46144, 46160, 0, 32768, 40960, 45056, 46080, - 46144, 46176, 46168, 0, 32768, 40960, 45056, 46080, - 46144, 46176, 46168, 0, 32768, 40960, 45056, 46080, - 46144, 46176, 46168, 46170, 0, 32768, 40960, 45056, - 46080, 46144, 46176, 46168, 0, 32768, 40960, 45056, - 46080, 46144, 46176, 46177, 46172, 0, 32768, 40960, - 45056, 46080, 46144, 46176, 46177, 46172, 0, 32768, - 40960, 45056, 46080, 46144, 46176, 46177, 46172, 46174, - 0, 32768, 40960, 45056, 46080, 46144, 0, 32768, - 40960, 45056, 46080, 46208, 46176, 0, 32768, 40960, - 45056, 46080, 46208, 46176, 0, 32768, 40960, 45056, - 46080, 46208, 46176, 46178, 0, 32768, 40960, 45056, - 46080, 46208, 46176, 0, 32768, 40960, 45056, 46080, - 46208, 46176, 46180, 0, 32768, 40960, 45056, 46080, - 46208, 46176, 46180, 0, 32768, 40960, 45056, 46080, - 46208, 46176, 46184, 46182, 0, 32768, 40960, 45056, - 46080, 46208, 46176, 0, 32768, 40960, 45056, 46080, - 46208, 46176, 46184, 0, 32768, 40960, 45056, 46080, - 46208, 46176, 46184, 0, 32768, 40960, 45056, 46080, - 46208, 46176, 46184, 46186, 0, 32768, 40960, 45056, - 46080, 46208, 46176, 46184, 0, 32768, 40960, 45056, - 46080, 46208, 46176, 46192, 46188, 0, 32768, 40960, - 45056, 46080, 46208, 46176, 46192, 46188, 0, 32768, - 40960, 45056, 46080, 46208, 46176, 46192, 46193, 46190, - 0, 32768, 40960, 45056, 46080, 46208, 46176, 0, - 32768, 40960, 45056, 46080, 46208, 46209, 46192, 0, - 32768, 40960, 45056, 46080, 46208, 46209, 46192, 0, - 32768, 40960, 45056, 46080, 46208, 46209, 46192, 46194, - 0, 32768, 40960, 45056, 46080, 46208, 46209, 46192, - 0, 32768, 40960, 45056, 46080, 46208, 46209, 46192, - 46196, 0, 32768, 40960, 45056, 46080, 46208, 46209, - 46192, 46196, 0, 32768, 40960, 45056, 46080, 46208, - 46209, 46192, 46200, 46198, 0, 32768, 40960, 45056, - 46080, 46208, 46209, 46192, 0, 32768, 40960, 45056, - 46080, 46208, 46209, 46192, 46200, 0, 32768, 40960, - 45056, 46080, 46208, 46209, 46211, 46200, 0, 32768, - 40960, 45056, 46080, 46208, 46209, 46211, 46200, 46202, - 0, 32768, 40960, 45056, 46080, 46208, 46209, 46211, - 46200, 0, 32768, 40960, 45056, 46080, 46208, 46209, - 46211, 46200, 46204, 0, 32768, 40960, 45056, 46080, - 46208, 46209, 46211, 46200, 46204, 0, 32768, 40960, - 45056, 46080, 46208, 46209, 46211, 46200, 46204, 46206, - 0, 32768, 40960, 45056, 46080, 0, 32768, 40960, - 45056, 46080, 46208, 0, 32768, 40960, 45056, 46080, - 46208, 0, 32768, 40960, 45056, 46080, 46208, 46210, - 0, 32768, 40960, 45056, 46080, 46208, 0, 32768, - 40960, 45056, 46080, 46208, 46212, 0, 32768, 40960, - 45056, 46080, 46208, 46212, 0, 32768, 40960, 45056, - 46080, 46208, 46216, 46214, 0, 32768, 40960, 45056, - 46080, 46208, 0, 32768, 40960, 45056, 46080, 46208, - 46216, 0, 32768, 40960, 45056, 46080, 46208, 46216, - 0, 32768, 40960, 45056, 46080, 46208, 46216, 46218, - 0, 32768, 40960, 45056, 46080, 46208, 46216, 0, - 32768, 40960, 45056, 46080, 46208, 46224, 46220, 0, - 32768, 40960, 45056, 46080, 46208, 46224, 46220, 0, - 32768, 40960, 45056, 46080, 46208, 46224, 46225, 46222, - 0, 32768, 40960, 45056, 46080, 46208, 0, 32768, - 40960, 45056, 46080, 46208, 46224, 0, 32768, 40960, - 45056, 46080, 46208, 46224, 0, 32768, 40960, 45056, - 46080, 46208, 46224, 46226, 0, 32768, 40960, 45056, - 46080, 46208, 46224, 0, 32768, 40960, 45056, 46080, - 46208, 46224, 46228, 0, 32768, 40960, 45056, 46080, - 46208, 46224, 46228, 0, 32768, 40960, 45056, 46080, - 46208, 46224, 46232, 46230, 0, 32768, 40960, 45056, - 46080, 46208, 46224, 0, 32768, 40960, 45056, 46080, - 46208, 46240, 46232, 0, 32768, 40960, 45056, 46080, - 46208, 46240, 46232, 0, 32768, 40960, 45056, 46080, - 46208, 46240, 46232, 46234, 0, 32768, 40960, 45056, - 46080, 46208, 46240, 46232, 0, 32768, 40960, 45056, - 46080, 46208, 46240, 46241, 46236, 0, 32768, 40960, - 45056, 46080, 46208, 46240, 46241, 46236, 0, 32768, - 40960, 45056, 46080, 46208, 46240, 46241, 46236, 46238, - 0, 32768, 40960, 45056, 46080, 46208, 0, 32768, - 40960, 45056, 46080, 46208, 46240, 0, 32768, 40960, - 45056, 46080, 46208, 46240, 0, 32768, 40960, 45056, - 46080, 46208, 46240, 46242, 0, 32768, 40960, 45056, - 46080, 46208, 46240, 0, 32768, 40960, 45056, 46080, - 46208, 46240, 46244, 0, 32768, 40960, 45056, 46080, - 46208, 46240, 46244, 0, 32768, 40960, 45056, 46080, - 46208, 46240, 46248, 46246, 0, 32768, 40960, 45056, - 46080, 46208, 46240, 0, 32768, 40960, 45056, 46080, - 46208, 46240, 46248, 0, 32768, 40960, 45056, 46080, - 46208, 46240, 46248, 0, 32768, 40960, 45056, 46080, - 46208, 46240, 46248, 46250, 0, 32768, 40960, 45056, - 46080, 46208, 46240, 46248, 0, 32768, 40960, 45056, - 46080, 46208, 46240, 46256, 46252, 0, 32768, 40960, - 45056, 46080, 46208, 46240, 46256, 46252, 0, 32768, - 40960, 45056, 46080, 46208, 46240, 46256, 46257, 46254, - 0, 32768, 40960, 45056, 46080, 46208, 46240, 0, - 32768, 40960, 45056, 46080, 46208, 46272, 46256, 0, - 32768, 40960, 45056, 46080, 46208, 46272, 46256, 0, - 32768, 40960, 45056, 46080, 46208, 46272, 46256, 46258, - 0, 32768, 40960, 45056, 46080, 46208, 46272, 46256, - 0, 32768, 40960, 45056, 46080, 46208, 46272, 46256, - 46260, 0, 32768, 40960, 45056, 46080, 46208, 46272, - 46256, 46260, 0, 32768, 40960, 45056, 46080, 46208, - 46272, 46256, 46264, 46262, 0, 32768, 40960, 45056, - 46080, 46208, 46272, 46256, 0, 32768, 40960, 45056, - 46080, 46208, 46272, 46273, 46264, 0, 32768, 40960, - 45056, 46080, 46208, 46272, 46273, 46264, 0, 32768, - 40960, 45056, 46080, 46208, 46272, 46273, 46264, 46266, - 0, 32768, 40960, 45056, 46080, 46208, 46272, 46273, - 46264, 0, 32768, 40960, 45056, 46080, 46208, 46272, - 46273, 46264, 46268, 0, 32768, 40960, 45056, 46080, - 46208, 46272, 46273, 46275, 46268, 0, 32768, 40960, - 45056, 46080, 46208, 46272, 46273, 46275, 46268, 46270, - 0, 32768, 40960, 45056, 46080, 46208, 0, 32768, - 40960, 45056, 46080, 46336, 46272, 0, 32768, 40960, - 45056, 46080, 46336, 46272, 0, 32768, 40960, 45056, - 46080, 46336, 46272, 46274, 0, 32768, 40960, 45056, - 46080, 46336, 46272, 0, 32768, 40960, 45056, 46080, - 46336, 46272, 46276, 0, 32768, 40960, 45056, 46080, - 46336, 46272, 46276, 0, 32768, 40960, 45056, 46080, - 46336, 46272, 46280, 46278, 0, 32768, 40960, 45056, - 46080, 46336, 46272, 0, 32768, 40960, 45056, 46080, - 46336, 46272, 46280, 0, 32768, 40960, 45056, 46080, - 46336, 46272, 46280, 0, 32768, 40960, 45056, 46080, - 46336, 46272, 46280, 46282, 0, 32768, 40960, 45056, - 46080, 46336, 46272, 46280, 0, 32768, 40960, 45056, - 46080, 46336, 46272, 46288, 46284, 0, 32768, 40960, - 45056, 46080, 46336, 46272, 46288, 46284, 0, 32768, - 40960, 45056, 46080, 46336, 46272, 46288, 46289, 46286, - 0, 32768, 40960, 45056, 46080, 46336, 46272, 0, - 32768, 40960, 45056, 46080, 46336, 46272, 46288, 0, - 32768, 40960, 45056, 46080, 46336, 46272, 46288, 0, - 32768, 40960, 45056, 46080, 46336, 46272, 46288, 46290, - 0, 32768, 40960, 45056, 46080, 46336, 46272, 46288, - 0, 32768, 40960, 45056, 46080, 46336, 46272, 46288, - 46292, 0, 32768, 40960, 45056, 46080, 46336, 46272, - 46288, 46292, 0, 32768, 40960, 45056, 46080, 46336, - 46272, 46288, 46296, 46294, 0, 32768, 40960, 45056, - 46080, 46336, 46272, 46288, 0, 32768, 40960, 45056, - 46080, 46336, 46272, 46304, 46296, 0, 32768, 40960, - 45056, 46080, 46336, 46272, 46304, 46296, 0, 32768, - 40960, 45056, 46080, 46336, 46272, 46304, 46296, 46298, - 0, 32768, 40960, 45056, 46080, 46336, 46272, 46304, - 46296, 0, 32768, 40960, 45056, 46080, 46336, 46272, - 46304, 46305, 46300, 0, 32768, 40960, 45056, 46080, - 46336, 46272, 46304, 46305, 46300, 0, 32768, 40960, - 45056, 46080, 46336, 46272, 46304, 46305, 46300, 46302, - 0, 32768, 40960, 45056, 46080, 46336, 46272, 0, - 32768, 40960, 45056, 46080, 46336, 46337, 46304, 0, - 32768, 40960, 45056, 46080, 46336, 46337, 46304, 0, - 32768, 40960, 45056, 46080, 46336, 46337, 46304, 46306, - 0, 32768, 40960, 45056, 46080, 46336, 46337, 46304, - 0, 32768, 40960, 45056, 46080, 46336, 46337, 46304, - 46308, 0, 32768, 40960, 45056, 46080, 46336, 46337, - 46304, 46308, 0, 32768, 40960, 45056, 46080, 46336, - 46337, 46304, 46312, 46310, 0, 32768, 40960, 45056, - 46080, 46336, 46337, 46304, 0, 32768, 40960, 45056, - 46080, 46336, 46337, 46304, 46312, 0, 32768, 40960, - 45056, 46080, 46336, 46337, 46304, 46312, 0, 32768, - 40960, 45056, 46080, 46336, 46337, 46304, 46312, 46314, - 0, 32768, 40960, 45056, 46080, 46336, 46337, 46304, - 46312, 0, 32768, 40960, 45056, 46080, 46336, 46337, - 46304, 46320, 46316, 0, 32768, 40960, 45056, 46080, - 46336, 46337, 46304, 46320, 46316, 0, 32768, 40960, - 45056, 46080, 46336, 46337, 46304, 46320, 46321, 46318, - 0, 32768, 40960, 45056, 46080, 46336, 46337, 46304, - 0, 32768, 40960, 45056, 46080, 46336, 46337, 46304, - 46320, 0, 32768, 40960, 45056, 46080, 46336, 46337, - 46339, 46320, 0, 32768, 40960, 45056, 46080, 46336, - 46337, 46339, 46320, 46322, 0, 32768, 40960, 45056, - 46080, 46336, 46337, 46339, 46320, 0, 32768, 40960, - 45056, 46080, 46336, 46337, 46339, 46320, 46324, 0, - 32768, 40960, 45056, 46080, 46336, 46337, 46339, 46320, - 46324, 0, 32768, 40960, 45056, 46080, 46336, 46337, - 46339, 46320, 46328, 46326, 0, 32768, 40960, 45056, - 46080, 46336, 46337, 46339, 46320, 0, 32768, 40960, - 45056, 46080, 46336, 46337, 46339, 46320, 46328, 0, - 32768, 40960, 45056, 46080, 46336, 46337, 46339, 46320, - 46328, 0, 32768, 40960, 45056, 46080, 46336, 46337, - 46339, 46320, 46328, 46330, 0, 32768, 40960, 45056, - 46080, 46336, 46337, 46339, 46343, 46328, 0, 32768, - 40960, 45056, 46080, 46336, 46337, 46339, 46343, 46328, - 46332, 0, 32768, 40960, 45056, 46080, 46336, 46337, - 46339, 46343, 46328, 46332, 0, 32768, 40960, 45056, - 46080, 46336, 46337, 46339, 46343, 46328, 46332, 46334, - 0, 32768, 40960, 45056, 46080, 0, 32768, 40960, - 45056, 46080, 46336, 0, 32768, 40960, 45056, 46080, - 46336, 0, 32768, 40960, 45056, 46080, 46336, 46338, - 0, 32768, 40960, 45056, 46080, 46336, 0, 32768, - 40960, 45056, 46080, 46336, 46340, 0, 32768, 40960, - 45056, 46080, 46336, 46340, 0, 32768, 40960, 45056, - 46080, 46336, 46344, 46342, 0, 32768, 40960, 45056, - 46080, 46336, 0, 32768, 40960, 45056, 46080, 46336, - 46344, 0, 32768, 40960, 45056, 46080, 46336, 46344, - 0, 32768, 40960, 45056, 46080, 46336, 46344, 46346, - 0, 32768, 40960, 45056, 46080, 46336, 46344, 0, - 32768, 40960, 45056, 46080, 46336, 46352, 46348, 0, - 32768, 40960, 45056, 46080, 46336, 46352, 46348, 0, - 32768, 40960, 45056, 46080, 46336, 46352, 46353, 46350, - 0, 32768, 40960, 45056, 46080, 46336, 0, 32768, - 40960, 45056, 46080, 46336, 46352, 0, 32768, 40960, - 45056, 46080, 46336, 46352, 0, 32768, 40960, 45056, - 46080, 46336, 46352, 46354, 0, 32768, 40960, 45056, - 46080, 46336, 46352, 0, 32768, 40960, 45056, 46080, - 46336, 46352, 46356, 0, 32768, 40960, 45056, 46080, - 46336, 46352, 46356, 0, 32768, 40960, 45056, 46080, - 46336, 46352, 46360, 46358, 0, 32768, 40960, 45056, - 46080, 46336, 46352, 0, 32768, 40960, 45056, 46080, - 46336, 46368, 46360, 0, 32768, 40960, 45056, 46080, - 46336, 46368, 46360, 0, 32768, 40960, 45056, 46080, - 46336, 46368, 46360, 46362, 0, 32768, 40960, 45056, - 46080, 46336, 46368, 46360, 0, 32768, 40960, 45056, - 46080, 46336, 46368, 46369, 46364, 0, 32768, 40960, - 45056, 46080, 46336, 46368, 46369, 46364, 0, 32768, - 40960, 45056, 46080, 46336, 46368, 46369, 46364, 46366, - 0, 32768, 40960, 45056, 46080, 46336, 0, 32768, - 40960, 45056, 46080, 46336, 46368, 0, 32768, 40960, - 45056, 46080, 46336, 46368, 0, 32768, 40960, 45056, - 46080, 46336, 46368, 46370, 0, 32768, 40960, 45056, - 46080, 46336, 46368, 0, 32768, 40960, 45056, 46080, - 46336, 46368, 46372, 0, 32768, 40960, 45056, 46080, - 46336, 46368, 46372, 0, 32768, 40960, 45056, 46080, - 46336, 46368, 46376, 46374, 0, 32768, 40960, 45056, - 46080, 46336, 46368, 0, 32768, 40960, 45056, 46080, - 46336, 46368, 46376, 0, 32768, 40960, 45056, 46080, - 46336, 46368, 46376, 0, 32768, 40960, 45056, 46080, - 46336, 46368, 46376, 46378, 0, 32768, 40960, 45056, - 46080, 46336, 46368, 46376, 0, 32768, 40960, 45056, - 46080, 46336, 46368, 46384, 46380, 0, 32768, 40960, - 45056, 46080, 46336, 46368, 46384, 46380, 0, 32768, - 40960, 45056, 46080, 46336, 46368, 46384, 46385, 46382, - 0, 32768, 40960, 45056, 46080, 46336, 46368, 0, - 32768, 40960, 45056, 46080, 46336, 46400, 46384, 0, - 32768, 40960, 45056, 46080, 46336, 46400, 46384, 0, - 32768, 40960, 45056, 46080, 46336, 46400, 46384, 46386, - 0, 32768, 40960, 45056, 46080, 46336, 46400, 46384, - 0, 32768, 40960, 45056, 46080, 46336, 46400, 46384, - 46388, 0, 32768, 40960, 45056, 46080, 46336, 46400, - 46384, 46388, 0, 32768, 40960, 45056, 46080, 46336, - 46400, 46384, 46392, 46390, 0, 32768, 40960, 45056, - 46080, 46336, 46400, 46384, 0, 32768, 40960, 45056, - 46080, 46336, 46400, 46401, 46392, 0, 32768, 40960, - 45056, 46080, 46336, 46400, 46401, 46392, 0, 32768, - 40960, 45056, 46080, 46336, 46400, 46401, 46392, 46394, - 0, 32768, 40960, 45056, 46080, 46336, 46400, 46401, - 46392, 0, 32768, 40960, 45056, 46080, 46336, 46400, - 46401, 46392, 46396, 0, 32768, 40960, 45056, 46080, - 46336, 46400, 46401, 46403, 46396, 0, 32768, 40960, - 45056, 46080, 46336, 46400, 46401, 46403, 46396, 46398, - 0, 32768, 40960, 45056, 46080, 46336, 0, 32768, - 40960, 45056, 46080, 46336, 46400, 0, 32768, 40960, - 45056, 46080, 46336, 46400, 0, 32768, 40960, 45056, - 46080, 46336, 46400, 46402, 0, 32768, 40960, 45056, - 46080, 46336, 46400, 0, 32768, 40960, 45056, 46080, - 46336, 46400, 46404, 0, 32768, 40960, 45056, 46080, - 46336, 46400, 46404, 0, 32768, 40960, 45056, 46080, - 46336, 46400, 46408, 46406, 0, 32768, 40960, 45056, - 46080, 46336, 46400, 0, 32768, 40960, 45056, 46080, - 46336, 46400, 46408, 0, 32768, 40960, 45056, 46080, - 46336, 46400, 46408, 0, 32768, 40960, 45056, 46080, - 46336, 46400, 46408, 46410, 0, 32768, 40960, 45056, - 46080, 46336, 46400, 46408, 0, 32768, 40960, 45056, - 46080, 46336, 46400, 46416, 46412, 0, 32768, 40960, - 45056, 46080, 46336, 46400, 46416, 46412, 0, 32768, - 40960, 45056, 46080, 46336, 46400, 46416, 46417, 46414, - 0, 32768, 40960, 45056, 46080, 46336, 46400, 0, - 32768, 40960, 45056, 46080, 46336, 46400, 46416, 0, - 32768, 40960, 45056, 46080, 46336, 46400, 46416, 0, - 32768, 40960, 45056, 46080, 46336, 46400, 46416, 46418, - 0, 32768, 40960, 45056, 46080, 46336, 46400, 46416, - 0, 32768, 40960, 45056, 46080, 46336, 46400, 46416, - 46420, 0, 32768, 40960, 45056, 46080, 46336, 46400, - 46416, 46420, 0, 32768, 40960, 45056, 46080, 46336, - 46400, 46416, 46424, 46422, 0, 32768, 40960, 45056, - 46080, 46336, 46400, 46416, 0, 32768, 40960, 45056, - 46080, 46336, 46400, 46432, 46424, 0, 32768, 40960, - 45056, 46080, 46336, 46400, 46432, 46424, 0, 32768, - 40960, 45056, 46080, 46336, 46400, 46432, 46424, 46426, - 0, 32768, 40960, 45056, 46080, 46336, 46400, 46432, - 46424, 0, 32768, 40960, 45056, 46080, 46336, 46400, - 46432, 46433, 46428, 0, 32768, 40960, 45056, 46080, - 46336, 46400, 46432, 46433, 46428, 0, 32768, 40960, - 45056, 46080, 46336, 46400, 46432, 46433, 46428, 46430, - 0, 32768, 40960, 45056, 46080, 46336, 46400, 0, - 32768, 40960, 45056, 46080, 46336, 46464, 46432, 0, - 32768, 40960, 45056, 46080, 46336, 46464, 46432, 0, - 32768, 40960, 45056, 46080, 46336, 46464, 46432, 46434, - 0, 32768, 40960, 45056, 46080, 46336, 46464, 46432, - 0, 32768, 40960, 45056, 46080, 46336, 46464, 46432, - 46436, 0, 32768, 40960, 45056, 46080, 46336, 46464, - 46432, 46436, 0, 32768, 40960, 45056, 46080, 46336, - 46464, 46432, 46440, 46438, 0, 32768, 40960, 45056, - 46080, 46336, 46464, 46432, 0, 32768, 40960, 45056, - 46080, 46336, 46464, 46432, 46440, 0, 32768, 40960, - 45056, 46080, 46336, 46464, 46432, 46440, 0, 32768, - 40960, 45056, 46080, 46336, 46464, 46432, 46440, 46442, - 0, 32768, 40960, 45056, 46080, 46336, 46464, 46432, - 46440, 0, 32768, 40960, 45056, 46080, 46336, 46464, - 46432, 46448, 46444, 0, 32768, 40960, 45056, 46080, - 46336, 46464, 46432, 46448, 46444, 0, 32768, 40960, - 45056, 46080, 46336, 46464, 46432, 46448, 46449, 46446, - 0, 32768, 40960, 45056, 46080, 46336, 46464, 46432, - 0, 32768, 40960, 45056, 46080, 46336, 46464, 46465, - 46448, 0, 32768, 40960, 45056, 46080, 46336, 46464, - 46465, 46448, 0, 32768, 40960, 45056, 46080, 46336, - 46464, 46465, 46448, 46450, 0, 32768, 40960, 45056, - 46080, 46336, 46464, 46465, 46448, 0, 32768, 40960, - 45056, 46080, 46336, 46464, 46465, 46448, 46452, 0, - 32768, 40960, 45056, 46080, 46336, 46464, 46465, 46448, - 46452, 0, 32768, 40960, 45056, 46080, 46336, 46464, - 46465, 46448, 46456, 46454, 0, 32768, 40960, 45056, - 46080, 46336, 46464, 46465, 46448, 0, 32768, 40960, - 45056, 46080, 46336, 46464, 46465, 46448, 46456, 0, - 32768, 40960, 45056, 46080, 46336, 46464, 46465, 46467, - 46456, 0, 32768, 40960, 45056, 46080, 46336, 46464, - 46465, 46467, 46456, 46458, 0, 32768, 40960, 45056, - 46080, 46336, 46464, 46465, 46467, 46456, 0, 32768, - 40960, 45056, 46080, 46336, 46464, 46465, 46467, 46456, - 46460, 0, 32768, 40960, 45056, 46080, 46336, 46464, - 46465, 46467, 46456, 46460, 0, 32768, 40960, 45056, - 46080, 46336, 46464, 46465, 46467, 46456, 46460, 46462, - 0, 32768, 40960, 45056, 46080, 46336, 0, 32768, - 40960, 45056, 46080, 46592, 46464, 0, 32768, 40960, - 45056, 46080, 46592, 46464, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 46466, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 0, 32768, 40960, 45056, 46080, - 46592, 46464, 46468, 0, 32768, 40960, 45056, 46080, - 46592, 46464, 46468, 0, 32768, 40960, 45056, 46080, - 46592, 46464, 46472, 46470, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 0, 32768, 40960, 45056, 46080, - 46592, 46464, 46472, 0, 32768, 40960, 45056, 46080, - 46592, 46464, 46472, 0, 32768, 40960, 45056, 46080, - 46592, 46464, 46472, 46474, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 46472, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 46480, 46476, 0, 32768, 40960, - 45056, 46080, 46592, 46464, 46480, 46476, 0, 32768, - 40960, 45056, 46080, 46592, 46464, 46480, 46481, 46478, - 0, 32768, 40960, 45056, 46080, 46592, 46464, 0, - 32768, 40960, 45056, 46080, 46592, 46464, 46480, 0, - 32768, 40960, 45056, 46080, 46592, 46464, 46480, 0, - 32768, 40960, 45056, 46080, 46592, 46464, 46480, 46482, - 0, 32768, 40960, 45056, 46080, 46592, 46464, 46480, - 0, 32768, 40960, 45056, 46080, 46592, 46464, 46480, - 46484, 0, 32768, 40960, 45056, 46080, 46592, 46464, - 46480, 46484, 0, 32768, 40960, 45056, 46080, 46592, - 46464, 46480, 46488, 46486, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 46480, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 46496, 46488, 0, 32768, 40960, - 45056, 46080, 46592, 46464, 46496, 46488, 0, 32768, - 40960, 45056, 46080, 46592, 46464, 46496, 46488, 46490, - 0, 32768, 40960, 45056, 46080, 46592, 46464, 46496, - 46488, 0, 32768, 40960, 45056, 46080, 46592, 46464, - 46496, 46497, 46492, 0, 32768, 40960, 45056, 46080, - 46592, 46464, 46496, 46497, 46492, 0, 32768, 40960, - 45056, 46080, 46592, 46464, 46496, 46497, 46492, 46494, - 0, 32768, 40960, 45056, 46080, 46592, 46464, 0, - 32768, 40960, 45056, 46080, 46592, 46464, 46496, 0, - 32768, 40960, 45056, 46080, 46592, 46464, 46496, 0, - 32768, 40960, 45056, 46080, 46592, 46464, 46496, 46498, - 0, 32768, 40960, 45056, 46080, 46592, 46464, 46496, - 0, 32768, 40960, 45056, 46080, 46592, 46464, 46496, - 46500, 0, 32768, 40960, 45056, 46080, 46592, 46464, - 46496, 46500, 0, 32768, 40960, 45056, 46080, 46592, - 46464, 46496, 46504, 46502, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 46496, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 46496, 46504, 0, 32768, 40960, - 45056, 46080, 46592, 46464, 46496, 46504, 0, 32768, - 40960, 45056, 46080, 46592, 46464, 46496, 46504, 46506, - 0, 32768, 40960, 45056, 46080, 46592, 46464, 46496, - 46504, 0, 32768, 40960, 45056, 46080, 46592, 46464, - 46496, 46512, 46508, 0, 32768, 40960, 45056, 46080, - 46592, 46464, 46496, 46512, 46508, 0, 32768, 40960, - 45056, 46080, 46592, 46464, 46496, 46512, 46513, 46510, - 0, 32768, 40960, 45056, 46080, 46592, 46464, 46496, - 0, 32768, 40960, 45056, 46080, 46592, 46464, 46528, - 46512, 0, 32768, 40960, 45056, 46080, 46592, 46464, - 46528, 46512, 0, 32768, 40960, 45056, 46080, 46592, - 46464, 46528, 46512, 46514, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 46528, 46512, 0, 32768, 40960, - 45056, 46080, 46592, 46464, 46528, 46512, 46516, 0, - 32768, 40960, 45056, 46080, 46592, 46464, 46528, 46512, - 46516, 0, 32768, 40960, 45056, 46080, 46592, 46464, - 46528, 46512, 46520, 46518, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 46528, 46512, 0, 32768, 40960, - 45056, 46080, 46592, 46464, 46528, 46529, 46520, 0, - 32768, 40960, 45056, 46080, 46592, 46464, 46528, 46529, - 46520, 0, 32768, 40960, 45056, 46080, 46592, 46464, - 46528, 46529, 46520, 46522, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 46528, 46529, 46520, 0, 32768, - 40960, 45056, 46080, 46592, 46464, 46528, 46529, 46520, - 46524, 0, 32768, 40960, 45056, 46080, 46592, 46464, - 46528, 46529, 46531, 46524, 0, 32768, 40960, 45056, - 46080, 46592, 46464, 46528, 46529, 46531, 46524, 46526, - 0, 32768, 40960, 45056, 46080, 46592, 46464, 0, - 32768, 40960, 45056, 46080, 46592, 46593, 46528, 0, - 32768, 40960, 45056, 46080, 46592, 46593, 46528, 0, - 32768, 40960, 45056, 46080, 46592, 46593, 46528, 46530, - 0, 32768, 40960, 45056, 46080, 46592, 46593, 46528, - 0, 32768, 40960, 45056, 46080, 46592, 46593, 46528, - 46532, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46528, 46532, 0, 32768, 40960, 45056, 46080, 46592, - 46593, 46528, 46536, 46534, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46528, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46528, 46536, 0, 32768, 40960, - 45056, 46080, 46592, 46593, 46528, 46536, 0, 32768, - 40960, 45056, 46080, 46592, 46593, 46528, 46536, 46538, - 0, 32768, 40960, 45056, 46080, 46592, 46593, 46528, - 46536, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46528, 46544, 46540, 0, 32768, 40960, 45056, 46080, - 46592, 46593, 46528, 46544, 46540, 0, 32768, 40960, - 45056, 46080, 46592, 46593, 46528, 46544, 46545, 46542, - 0, 32768, 40960, 45056, 46080, 46592, 46593, 46528, - 0, 32768, 40960, 45056, 46080, 46592, 46593, 46528, - 46544, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46528, 46544, 0, 32768, 40960, 45056, 46080, 46592, - 46593, 46528, 46544, 46546, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46528, 46544, 0, 32768, 40960, - 45056, 46080, 46592, 46593, 46528, 46544, 46548, 0, - 32768, 40960, 45056, 46080, 46592, 46593, 46528, 46544, - 46548, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46528, 46544, 46552, 46550, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46528, 46544, 0, 32768, 40960, - 45056, 46080, 46592, 46593, 46528, 46560, 46552, 0, - 32768, 40960, 45056, 46080, 46592, 46593, 46528, 46560, - 46552, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46528, 46560, 46552, 46554, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46528, 46560, 46552, 0, 32768, - 40960, 45056, 46080, 46592, 46593, 46528, 46560, 46561, - 46556, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46528, 46560, 46561, 46556, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46528, 46560, 46561, 46556, 46558, - 0, 32768, 40960, 45056, 46080, 46592, 46593, 46528, - 0, 32768, 40960, 45056, 46080, 46592, 46593, 46528, - 46560, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46595, 46560, 0, 32768, 40960, 45056, 46080, 46592, - 46593, 46595, 46560, 46562, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46595, 46560, 0, 32768, 40960, - 45056, 46080, 46592, 46593, 46595, 46560, 46564, 0, - 32768, 40960, 45056, 46080, 46592, 46593, 46595, 46560, - 46564, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46595, 46560, 46568, 46566, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46595, 46560, 0, 32768, 40960, - 45056, 46080, 46592, 46593, 46595, 46560, 46568, 0, - 32768, 40960, 45056, 46080, 46592, 46593, 46595, 46560, - 46568, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46595, 46560, 46568, 46570, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46595, 46560, 46568, 0, 32768, - 40960, 45056, 46080, 46592, 46593, 46595, 46560, 46576, - 46572, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46595, 46560, 46576, 46572, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46595, 46560, 46576, 46577, 46574, - 0, 32768, 40960, 45056, 46080, 46592, 46593, 46595, - 46560, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46595, 46560, 46576, 0, 32768, 40960, 45056, 46080, - 46592, 46593, 46595, 46560, 46576, 0, 32768, 40960, - 45056, 46080, 46592, 46593, 46595, 46560, 46576, 46578, - 0, 32768, 40960, 45056, 46080, 46592, 46593, 46595, - 46599, 46576, 0, 32768, 40960, 45056, 46080, 46592, - 46593, 46595, 46599, 46576, 46580, 0, 32768, 40960, - 45056, 46080, 46592, 46593, 46595, 46599, 46576, 46580, - 0, 32768, 40960, 45056, 46080, 46592, 46593, 46595, - 46599, 46576, 46584, 46582, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46595, 46599, 46576, 0, 32768, - 40960, 45056, 46080, 46592, 46593, 46595, 46599, 46576, - 46584, 0, 32768, 40960, 45056, 46080, 46592, 46593, - 46595, 46599, 46576, 46584, 0, 32768, 40960, 45056, - 46080, 46592, 46593, 46595, 46599, 46576, 46584, 46586, - 0, 32768, 40960, 45056, 46080, 46592, 46593, 46595, - 46599, 46576, 46584, 0, 32768, 40960, 45056, 46080, - 46592, 46593, 46595, 46599, 46576, 46584, 46588, 0, - 32768, 40960, 45056, 46080, 46592, 46593, 46595, 46599, - 46576, 46584, 46588, 0, 32768, 40960, 45056, 46080, - 46592, 46593, 46595, 46599, 46576, 46584, 46588, 46590, - 0, 32768, 40960, 45056, 46080, 0, 32768, 40960, - 45056, 47104, 46592, 0, 32768, 40960, 45056, 47104, - 46592, 0, 32768, 40960, 45056, 47104, 46592, 46594, - 0, 32768, 40960, 45056, 47104, 46592, 0, 32768, - 40960, 45056, 47104, 46592, 46596, 0, 32768, 40960, - 45056, 47104, 46592, 46596, 0, 32768, 40960, 45056, - 47104, 46592, 46600, 46598, 0, 32768, 40960, 45056, - 47104, 46592, 0, 32768, 40960, 45056, 47104, 46592, - 46600, 0, 32768, 40960, 45056, 47104, 46592, 46600, - 0, 32768, 40960, 45056, 47104, 46592, 46600, 46602, - 0, 32768, 40960, 45056, 47104, 46592, 46600, 0, - 32768, 40960, 45056, 47104, 46592, 46608, 46604, 0, - 32768, 40960, 45056, 47104, 46592, 46608, 46604, 0, - 32768, 40960, 45056, 47104, 46592, 46608, 46609, 46606, - 0, 32768, 40960, 45056, 47104, 46592, 0, 32768, - 40960, 45056, 47104, 46592, 46608, 0, 32768, 40960, - 45056, 47104, 46592, 46608, 0, 32768, 40960, 45056, - 47104, 46592, 46608, 46610, 0, 32768, 40960, 45056, - 47104, 46592, 46608, 0, 32768, 40960, 45056, 47104, - 46592, 46608, 46612, 0, 32768, 40960, 45056, 47104, - 46592, 46608, 46612, 0, 32768, 40960, 45056, 47104, - 46592, 46608, 46616, 46614, 0, 32768, 40960, 45056, - 47104, 46592, 46608, 0, 32768, 40960, 45056, 47104, - 46592, 46624, 46616, 0, 32768, 40960, 45056, 47104, - 46592, 46624, 46616, 0, 32768, 40960, 45056, 47104, - 46592, 46624, 46616, 46618, 0, 32768, 40960, 45056, - 47104, 46592, 46624, 46616, 0, 32768, 40960, 45056, - 47104, 46592, 46624, 46625, 46620, 0, 32768, 40960, - 45056, 47104, 46592, 46624, 46625, 46620, 0, 32768, - 40960, 45056, 47104, 46592, 46624, 46625, 46620, 46622, - 0, 32768, 40960, 45056, 47104, 46592, 0, 32768, - 40960, 45056, 47104, 46592, 46624, 0, 32768, 40960, - 45056, 47104, 46592, 46624, 0, 32768, 40960, 45056, - 47104, 46592, 46624, 46626, 0, 32768, 40960, 45056, - 47104, 46592, 46624, 0, 32768, 40960, 45056, 47104, - 46592, 46624, 46628, 0, 32768, 40960, 45056, 47104, - 46592, 46624, 46628, 0, 32768, 40960, 45056, 47104, - 46592, 46624, 46632, 46630, 0, 32768, 40960, 45056, - 47104, 46592, 46624, 0, 32768, 40960, 45056, 47104, - 46592, 46624, 46632, 0, 32768, 40960, 45056, 47104, - 46592, 46624, 46632, 0, 32768, 40960, 45056, 47104, - 46592, 46624, 46632, 46634, 0, 32768, 40960, 45056, - 47104, 46592, 46624, 46632, 0, 32768, 40960, 45056, - 47104, 46592, 46624, 46640, 46636, 0, 32768, 40960, - 45056, 47104, 46592, 46624, 46640, 46636, 0, 32768, - 40960, 45056, 47104, 46592, 46624, 46640, 46641, 46638, - 0, 32768, 40960, 45056, 47104, 46592, 46624, 0, - 32768, 40960, 45056, 47104, 46592, 46656, 46640, 0, - 32768, 40960, 45056, 47104, 46592, 46656, 46640, 0, - 32768, 40960, 45056, 47104, 46592, 46656, 46640, 46642, - 0, 32768, 40960, 45056, 47104, 46592, 46656, 46640, - 0, 32768, 40960, 45056, 47104, 46592, 46656, 46640, - 46644, 0, 32768, 40960, 45056, 47104, 46592, 46656, - 46640, 46644, 0, 32768, 40960, 45056, 47104, 46592, - 46656, 46640, 46648, 46646, 0, 32768, 40960, 45056, - 47104, 46592, 46656, 46640, 0, 32768, 40960, 45056, - 47104, 46592, 46656, 46657, 46648, 0, 32768, 40960, - 45056, 47104, 46592, 46656, 46657, 46648, 0, 32768, - 40960, 45056, 47104, 46592, 46656, 46657, 46648, 46650, - 0, 32768, 40960, 45056, 47104, 46592, 46656, 46657, - 46648, 0, 32768, 40960, 45056, 47104, 46592, 46656, - 46657, 46648, 46652, 0, 32768, 40960, 45056, 47104, - 46592, 46656, 46657, 46659, 46652, 0, 32768, 40960, - 45056, 47104, 46592, 46656, 46657, 46659, 46652, 46654, - 0, 32768, 40960, 45056, 47104, 46592, 0, 32768, - 40960, 45056, 47104, 46592, 46656, 0, 32768, 40960, - 45056, 47104, 46592, 46656, 0, 32768, 40960, 45056, - 47104, 46592, 46656, 46658, 0, 32768, 40960, 45056, - 47104, 46592, 46656, 0, 32768, 40960, 45056, 47104, - 46592, 46656, 46660, 0, 32768, 40960, 45056, 47104, - 46592, 46656, 46660, 0, 32768, 40960, 45056, 47104, - 46592, 46656, 46664, 46662, 0, 32768, 40960, 45056, - 47104, 46592, 46656, 0, 32768, 40960, 45056, 47104, - 46592, 46656, 46664, 0, 32768, 40960, 45056, 47104, - 46592, 46656, 46664, 0, 32768, 40960, 45056, 47104, - 46592, 46656, 46664, 46666, 0, 32768, 40960, 45056, - 47104, 46592, 46656, 46664, 0, 32768, 40960, 45056, - 47104, 46592, 46656, 46672, 46668, 0, 32768, 40960, - 45056, 47104, 46592, 46656, 46672, 46668, 0, 32768, - 40960, 45056, 47104, 46592, 46656, 46672, 46673, 46670, - 0, 32768, 40960, 45056, 47104, 46592, 46656, 0, - 32768, 40960, 45056, 47104, 46592, 46656, 46672, 0, - 32768, 40960, 45056, 47104, 46592, 46656, 46672, 0, - 32768, 40960, 45056, 47104, 46592, 46656, 46672, 46674, - 0, 32768, 40960, 45056, 47104, 46592, 46656, 46672, - 0, 32768, 40960, 45056, 47104, 46592, 46656, 46672, - 46676, 0, 32768, 40960, 45056, 47104, 46592, 46656, - 46672, 46676, 0, 32768, 40960, 45056, 47104, 46592, - 46656, 46672, 46680, 46678, 0, 32768, 40960, 45056, - 47104, 46592, 46656, 46672, 0, 32768, 40960, 45056, - 47104, 46592, 46656, 46688, 46680, 0, 32768, 40960, - 45056, 47104, 46592, 46656, 46688, 46680, 0, 32768, - 40960, 45056, 47104, 46592, 46656, 46688, 46680, 46682, - 0, 32768, 40960, 45056, 47104, 46592, 46656, 46688, - 46680, 0, 32768, 40960, 45056, 47104, 46592, 46656, - 46688, 46689, 46684, 0, 32768, 40960, 45056, 47104, - 46592, 46656, 46688, 46689, 46684, 0, 32768, 40960, - 45056, 47104, 46592, 46656, 46688, 46689, 46684, 46686, - 0, 32768, 40960, 45056, 47104, 46592, 46656, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46688, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46688, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46688, 46690, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46688, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46688, - 46692, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46688, 46692, 0, 32768, 40960, 45056, 47104, 46592, - 46720, 46688, 46696, 46694, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46688, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46688, 46696, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 46688, 46696, 0, 32768, - 40960, 45056, 47104, 46592, 46720, 46688, 46696, 46698, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46688, - 46696, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46688, 46704, 46700, 0, 32768, 40960, 45056, 47104, - 46592, 46720, 46688, 46704, 46700, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 46688, 46704, 46705, 46702, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46688, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46721, - 46704, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46721, 46704, 0, 32768, 40960, 45056, 47104, 46592, - 46720, 46721, 46704, 46706, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46721, 46704, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 46721, 46704, 46708, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46721, 46704, - 46708, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46721, 46704, 46712, 46710, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46721, 46704, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 46721, 46704, 46712, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46721, 46723, - 46712, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46721, 46723, 46712, 46714, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46721, 46723, 46712, 0, 32768, - 40960, 45056, 47104, 46592, 46720, 46721, 46723, 46712, - 46716, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46721, 46723, 46712, 46716, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46721, 46723, 46712, 46716, 46718, - 0, 32768, 40960, 45056, 47104, 46592, 0, 32768, - 40960, 45056, 47104, 46592, 46720, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46722, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 0, 32768, 40960, 45056, 47104, - 46592, 46720, 46724, 0, 32768, 40960, 45056, 47104, - 46592, 46720, 46724, 0, 32768, 40960, 45056, 47104, - 46592, 46720, 46728, 46726, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 0, 32768, 40960, 45056, 47104, - 46592, 46720, 46728, 0, 32768, 40960, 45056, 47104, - 46592, 46720, 46728, 0, 32768, 40960, 45056, 47104, - 46592, 46720, 46728, 46730, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46728, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46736, 46732, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 46736, 46732, 0, 32768, - 40960, 45056, 47104, 46592, 46720, 46736, 46737, 46734, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46736, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46736, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46736, 46738, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46736, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46736, - 46740, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46736, 46740, 0, 32768, 40960, 45056, 47104, 46592, - 46720, 46736, 46744, 46742, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46736, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46752, 46744, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 46752, 46744, 0, 32768, - 40960, 45056, 47104, 46592, 46720, 46752, 46744, 46746, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46752, - 46744, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46752, 46753, 46748, 0, 32768, 40960, 45056, 47104, - 46592, 46720, 46752, 46753, 46748, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 46752, 46753, 46748, 46750, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46752, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46752, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46752, 46754, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46752, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46752, - 46756, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46752, 46756, 0, 32768, 40960, 45056, 47104, 46592, - 46720, 46752, 46760, 46758, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46752, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46752, 46760, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 46752, 46760, 0, 32768, - 40960, 45056, 47104, 46592, 46720, 46752, 46760, 46762, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46752, - 46760, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46752, 46768, 46764, 0, 32768, 40960, 45056, 47104, - 46592, 46720, 46752, 46768, 46764, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 46752, 46768, 46769, 46766, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46752, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 46784, - 46768, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46784, 46768, 0, 32768, 40960, 45056, 47104, 46592, - 46720, 46784, 46768, 46770, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46784, 46768, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 46784, 46768, 46772, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46784, 46768, - 46772, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46784, 46768, 46776, 46774, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46784, 46768, 0, 32768, 40960, - 45056, 47104, 46592, 46720, 46784, 46785, 46776, 0, - 32768, 40960, 45056, 47104, 46592, 46720, 46784, 46785, - 46776, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46784, 46785, 46776, 46778, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46784, 46785, 46776, 0, 32768, - 40960, 45056, 47104, 46592, 46720, 46784, 46785, 46776, - 46780, 0, 32768, 40960, 45056, 47104, 46592, 46720, - 46784, 46785, 46787, 46780, 0, 32768, 40960, 45056, - 47104, 46592, 46720, 46784, 46785, 46787, 46780, 46782, - 0, 32768, 40960, 45056, 47104, 46592, 46720, 0, - 32768, 40960, 45056, 47104, 46592, 46848, 46784, 0, - 32768, 40960, 45056, 47104, 46592, 46848, 46784, 0, - 32768, 40960, 45056, 47104, 46592, 46848, 46784, 46786, - 0, 32768, 40960, 45056, 47104, 46592, 46848, 46784, - 0, 32768, 40960, 45056, 47104, 46592, 46848, 46784, - 46788, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46784, 46788, 0, 32768, 40960, 45056, 47104, 46592, - 46848, 46784, 46792, 46790, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46784, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46784, 46792, 0, 32768, 40960, - 45056, 47104, 46592, 46848, 46784, 46792, 0, 32768, - 40960, 45056, 47104, 46592, 46848, 46784, 46792, 46794, - 0, 32768, 40960, 45056, 47104, 46592, 46848, 46784, - 46792, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46784, 46800, 46796, 0, 32768, 40960, 45056, 47104, - 46592, 46848, 46784, 46800, 46796, 0, 32768, 40960, - 45056, 47104, 46592, 46848, 46784, 46800, 46801, 46798, - 0, 32768, 40960, 45056, 47104, 46592, 46848, 46784, - 0, 32768, 40960, 45056, 47104, 46592, 46848, 46784, - 46800, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46784, 46800, 0, 32768, 40960, 45056, 47104, 46592, - 46848, 46784, 46800, 46802, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46784, 46800, 0, 32768, 40960, - 45056, 47104, 46592, 46848, 46784, 46800, 46804, 0, - 32768, 40960, 45056, 47104, 46592, 46848, 46784, 46800, - 46804, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46784, 46800, 46808, 46806, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46784, 46800, 0, 32768, 40960, - 45056, 47104, 46592, 46848, 46784, 46816, 46808, 0, - 32768, 40960, 45056, 47104, 46592, 46848, 46784, 46816, - 46808, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46784, 46816, 46808, 46810, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46784, 46816, 46808, 0, 32768, - 40960, 45056, 47104, 46592, 46848, 46784, 46816, 46817, - 46812, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46784, 46816, 46817, 46812, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46784, 46816, 46817, 46812, 46814, - 0, 32768, 40960, 45056, 47104, 46592, 46848, 46784, - 0, 32768, 40960, 45056, 47104, 46592, 46848, 46849, - 46816, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46849, 46816, 0, 32768, 40960, 45056, 47104, 46592, - 46848, 46849, 46816, 46818, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46849, 46816, 0, 32768, 40960, - 45056, 47104, 46592, 46848, 46849, 46816, 46820, 0, - 32768, 40960, 45056, 47104, 46592, 46848, 46849, 46816, - 46820, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46849, 46816, 46824, 46822, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46849, 46816, 0, 32768, 40960, - 45056, 47104, 46592, 46848, 46849, 46816, 46824, 0, - 32768, 40960, 45056, 47104, 46592, 46848, 46849, 46816, - 46824, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46849, 46816, 46824, 46826, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46849, 46816, 46824, 0, 32768, - 40960, 45056, 47104, 46592, 46848, 46849, 46816, 46832, - 46828, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46849, 46816, 46832, 46828, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46849, 46816, 46832, 46833, 46830, - 0, 32768, 40960, 45056, 47104, 46592, 46848, 46849, - 46816, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46849, 46816, 46832, 0, 32768, 40960, 45056, 47104, - 46592, 46848, 46849, 46851, 46832, 0, 32768, 40960, - 45056, 47104, 46592, 46848, 46849, 46851, 46832, 46834, - 0, 32768, 40960, 45056, 47104, 46592, 46848, 46849, - 46851, 46832, 0, 32768, 40960, 45056, 47104, 46592, - 46848, 46849, 46851, 46832, 46836, 0, 32768, 40960, - 45056, 47104, 46592, 46848, 46849, 46851, 46832, 46836, - 0, 32768, 40960, 45056, 47104, 46592, 46848, 46849, - 46851, 46832, 46840, 46838, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46849, 46851, 46832, 0, 32768, - 40960, 45056, 47104, 46592, 46848, 46849, 46851, 46832, - 46840, 0, 32768, 40960, 45056, 47104, 46592, 46848, - 46849, 46851, 46832, 46840, 0, 32768, 40960, 45056, - 47104, 46592, 46848, 46849, 46851, 46832, 46840, 46842, - 0, 32768, 40960, 45056, 47104, 46592, 46848, 46849, - 46851, 46855, 46840, 0, 32768, 40960, 45056, 47104, - 46592, 46848, 46849, 46851, 46855, 46840, 46844, 0, - 32768, 40960, 45056, 47104, 46592, 46848, 46849, 46851, - 46855, 46840, 46844, 0, 32768, 40960, 45056, 47104, - 46592, 46848, 46849, 46851, 46855, 46840, 46844, 46846, - 0, 32768, 40960, 45056, 47104, 46592, 0, 32768, - 40960, 45056, 47104, 46592, 46848, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46850, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46852, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46852, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46856, 46854, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46856, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46856, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46856, 46858, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46856, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46864, 46860, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46864, 46860, 0, 32768, - 40960, 45056, 47104, 47105, 46848, 46864, 46865, 46862, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46864, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46864, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46864, 46866, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46864, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46864, - 46868, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46864, 46868, 0, 32768, 40960, 45056, 47104, 47105, - 46848, 46864, 46872, 46870, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46864, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46880, 46872, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46880, 46872, 0, 32768, - 40960, 45056, 47104, 47105, 46848, 46880, 46872, 46874, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46880, - 46872, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46880, 46881, 46876, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46880, 46881, 46876, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46880, 46881, 46876, 46878, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46880, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46880, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46880, 46882, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46880, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46880, - 46884, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46880, 46884, 0, 32768, 40960, 45056, 47104, 47105, - 46848, 46880, 46888, 46886, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46880, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46880, 46888, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46880, 46888, 0, 32768, - 40960, 45056, 47104, 47105, 46848, 46880, 46888, 46890, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46880, - 46888, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46880, 46896, 46892, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46880, 46896, 46892, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46880, 46896, 46897, 46894, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46880, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46912, - 46896, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46912, 46896, 0, 32768, 40960, 45056, 47104, 47105, - 46848, 46912, 46896, 46898, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46912, 46896, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46912, 46896, 46900, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46912, 46896, - 46900, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46912, 46896, 46904, 46902, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46912, 46896, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46912, 46913, 46904, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46912, 46913, - 46904, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46912, 46913, 46904, 46906, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46912, 46913, 46904, 0, 32768, - 40960, 45056, 47104, 47105, 46848, 46912, 46913, 46904, - 46908, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46912, 46913, 46915, 46908, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46912, 46913, 46915, 46908, 46910, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46912, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46912, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46912, 46914, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46912, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46912, - 46916, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46912, 46916, 0, 32768, 40960, 45056, 47104, 47105, - 46848, 46912, 46920, 46918, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46912, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46912, 46920, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46912, 46920, 0, 32768, - 40960, 45056, 47104, 47105, 46848, 46912, 46920, 46922, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46912, - 46920, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46912, 46928, 46924, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46912, 46928, 46924, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46912, 46928, 46929, 46926, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46912, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46912, - 46928, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46912, 46928, 0, 32768, 40960, 45056, 47104, 47105, - 46848, 46912, 46928, 46930, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46912, 46928, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46912, 46928, 46932, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46912, 46928, - 46932, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46912, 46928, 46936, 46934, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46912, 46928, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46912, 46944, 46936, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46912, 46944, - 46936, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46912, 46944, 46936, 46938, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46912, 46944, 46936, 0, 32768, - 40960, 45056, 47104, 47105, 46848, 46912, 46944, 46945, - 46940, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46912, 46944, 46945, 46940, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46912, 46944, 46945, 46940, 46942, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46912, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46976, - 46944, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46976, 46944, 0, 32768, 40960, 45056, 47104, 47105, - 46848, 46976, 46944, 46946, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46976, 46944, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46976, 46944, 46948, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46976, 46944, - 46948, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46976, 46944, 46952, 46950, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46976, 46944, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46976, 46944, 46952, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46976, 46944, - 46952, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46976, 46944, 46952, 46954, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46976, 46944, 46952, 0, 32768, - 40960, 45056, 47104, 47105, 46848, 46976, 46944, 46960, - 46956, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46976, 46944, 46960, 46956, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46976, 46944, 46960, 46961, 46958, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46976, - 46944, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46976, 46977, 46960, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46976, 46977, 46960, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46976, 46977, 46960, 46962, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46976, - 46977, 46960, 0, 32768, 40960, 45056, 47104, 47105, - 46848, 46976, 46977, 46960, 46964, 0, 32768, 40960, - 45056, 47104, 47105, 46848, 46976, 46977, 46960, 46964, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46976, - 46977, 46960, 46968, 46966, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46976, 46977, 46960, 0, 32768, - 40960, 45056, 47104, 47105, 46848, 46976, 46977, 46960, - 46968, 0, 32768, 40960, 45056, 47104, 47105, 46848, - 46976, 46977, 46979, 46968, 0, 32768, 40960, 45056, - 47104, 47105, 46848, 46976, 46977, 46979, 46968, 46970, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 46976, - 46977, 46979, 46968, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46976, 46977, 46979, 46968, 46972, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46976, 46977, - 46979, 46968, 46972, 0, 32768, 40960, 45056, 47104, - 47105, 46848, 46976, 46977, 46979, 46968, 46972, 46974, - 0, 32768, 40960, 45056, 47104, 47105, 46848, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46976, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46976, 0, - 32768, 40960, 45056, 47104, 47105, 46848, 46976, 46978, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 46980, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 46980, 0, 32768, 40960, 45056, 47104, 47105, - 47107, 46976, 46984, 46982, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 46984, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 46976, 46984, 0, 32768, - 40960, 45056, 47104, 47105, 47107, 46976, 46984, 46986, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 46984, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 46992, 46988, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 46976, 46992, 46988, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 46976, 46992, 46993, 46990, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 46992, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 46992, 0, 32768, 40960, 45056, 47104, 47105, - 47107, 46976, 46992, 46994, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 46992, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 46976, 46992, 46996, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 46976, 46992, - 46996, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 46992, 47000, 46998, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 46992, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 46976, 47008, 47000, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 46976, 47008, - 47000, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 47008, 47000, 47002, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 47008, 47000, 0, 32768, - 40960, 45056, 47104, 47105, 47107, 46976, 47008, 47009, - 47004, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 47008, 47009, 47004, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 47008, 47009, 47004, 47006, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 47008, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 47008, 0, 32768, 40960, 45056, 47104, 47105, - 47107, 46976, 47008, 47010, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 47008, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 46976, 47008, 47012, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 46976, 47008, - 47012, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 47008, 47016, 47014, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 47008, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 46976, 47008, 47016, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 46976, 47008, - 47016, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 47008, 47016, 47018, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 47008, 47016, 0, 32768, - 40960, 45056, 47104, 47105, 47107, 46976, 47008, 47024, - 47020, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 47008, 47024, 47020, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 47008, 47024, 47025, 47022, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 47008, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 47040, 47024, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 46976, 47040, 47024, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 46976, 47040, 47024, 47026, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 47040, 47024, 0, 32768, 40960, 45056, 47104, 47105, - 47107, 46976, 47040, 47024, 47028, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 46976, 47040, 47024, 47028, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 47040, 47024, 47032, 47030, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 47040, 47024, 0, 32768, - 40960, 45056, 47104, 47105, 47107, 46976, 47040, 47041, - 47032, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 47040, 47041, 47032, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 47040, 47041, 47032, 47034, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 47040, 47041, 47032, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 46976, 47040, 47041, 47032, 47036, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 46976, 47040, - 47041, 47043, 47036, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 46976, 47040, 47041, 47043, 47036, 47038, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 46976, - 47040, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 47040, 0, 32768, 40960, 45056, 47104, 47105, - 47107, 46976, 47040, 47042, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 46976, 47040, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 46976, 47040, 47044, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 46976, 47040, - 47044, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 46976, 47040, 47048, 47046, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 47111, 47040, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 47111, 47040, 47048, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 47111, 47040, - 47048, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 47111, 47040, 47048, 47050, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 47111, 47040, 47048, 0, 32768, - 40960, 45056, 47104, 47105, 47107, 47111, 47040, 47056, - 47052, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 47111, 47040, 47056, 47052, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 47111, 47040, 47056, 47057, 47054, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 47111, - 47040, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 47111, 47040, 47056, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 47111, 47040, 47056, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 47111, 47040, 47056, 47058, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 47111, - 47040, 47056, 0, 32768, 40960, 45056, 47104, 47105, - 47107, 47111, 47040, 47056, 47060, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 47111, 47040, 47056, 47060, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 47111, - 47040, 47056, 47064, 47062, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 47111, 47040, 47056, 0, 32768, - 40960, 45056, 47104, 47105, 47107, 47111, 47040, 47072, - 47064, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 47111, 47040, 47072, 47064, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 47111, 47040, 47072, 47064, 47066, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 47111, - 47040, 47072, 47064, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 47111, 47040, 47072, 47073, 47068, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 47111, 47040, - 47072, 47073, 47068, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 47111, 47040, 47072, 47073, 47068, 47070, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 47111, - 47040, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 47111, 47040, 47072, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 47111, 47040, 47072, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 47111, 47040, 47072, 47074, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 47111, - 47040, 47072, 0, 32768, 40960, 45056, 47104, 47105, - 47107, 47111, 47040, 47072, 47076, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 47111, 47040, 47072, 47076, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 47111, - 47040, 47072, 47080, 47078, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 47111, 47040, 47072, 0, 32768, - 40960, 45056, 47104, 47105, 47107, 47111, 47040, 47072, - 47080, 0, 32768, 40960, 45056, 47104, 47105, 47107, - 47111, 47040, 47072, 47080, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 47111, 47040, 47072, 47080, 47082, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 47111, - 47040, 47072, 47080, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 47111, 47040, 47072, 47088, 47084, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 47111, 47040, - 47072, 47088, 47084, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 47111, 47040, 47072, 47088, 47089, 47086, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 47111, - 47119, 47072, 0, 32768, 40960, 45056, 47104, 47105, - 47107, 47111, 47119, 47072, 47088, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 47111, 47119, 47072, 47088, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 47111, - 47119, 47072, 47088, 47090, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 47111, 47119, 47072, 47088, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 47111, 47119, - 47072, 47088, 47092, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 47111, 47119, 47072, 47088, 47092, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 47111, 47119, - 47072, 47088, 47096, 47094, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 47111, 47119, 47072, 47088, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 47111, 47119, - 47072, 47088, 47096, 0, 32768, 40960, 45056, 47104, - 47105, 47107, 47111, 47119, 47072, 47088, 47096, 0, - 32768, 40960, 45056, 47104, 47105, 47107, 47111, 47119, - 47072, 47088, 47096, 47098, 0, 32768, 40960, 45056, - 47104, 47105, 47107, 47111, 47119, 47072, 47088, 47096, - 0, 32768, 40960, 45056, 47104, 47105, 47107, 47111, - 47119, 47072, 47088, 47096, 47100, 0, 32768, 40960, - 45056, 47104, 47105, 47107, 47111, 47119, 47072, 47088, - 47096, 47100, 0, 32768, 40960, 45056, 47104, 47105, - 47107, 47111, 47119, 47072, 47088, 47096, 47100, 47102, - 0, 32768, 40960, 45056, 0, 32768, 40960, 45056, - 47104, 0, 32768, 40960, 45056, 47104, 0, 32768, - 40960, 45056, 47104, 47106, 0, 32768, 40960, 45056, - 47104, 0, 32768, 40960, 45056, 47104, 47108, 0, - 32768, 40960, 45056, 47104, 47108, 0, 32768, 40960, - 45056, 47104, 47112, 47110, 0, 32768, 40960, 45056, - 47104, 0, 32768, 40960, 45056, 47104, 47112, 0, - 32768, 40960, 45056, 47104, 47112, 0, 32768, 40960, - 45056, 47104, 47112, 47114, 0, 32768, 40960, 45056, - 47104, 47112, 0, 32768, 40960, 45056, 47104, 47120, - 47116, 0, 32768, 40960, 45056, 47104, 47120, 47116, - 0, 32768, 40960, 45056, 47104, 47120, 47121, 47118, - 0, 32768, 40960, 45056, 47104, 0, 32768, 40960, - 45056, 47104, 47120, 0, 32768, 40960, 45056, 47104, - 47120, 0, 32768, 40960, 45056, 47104, 47120, 47122, - 0, 32768, 40960, 45056, 47104, 47120, 0, 32768, - 40960, 45056, 47104, 47120, 47124, 0, 32768, 40960, - 45056, 47104, 47120, 47124, 0, 32768, 40960, 45056, - 47104, 47120, 47128, 47126, 0, 32768, 40960, 45056, - 47104, 47120, 0, 32768, 40960, 45056, 47104, 47136, - 47128, 0, 32768, 40960, 45056, 47104, 47136, 47128, - 0, 32768, 40960, 45056, 47104, 47136, 47128, 47130, - 0, 32768, 40960, 45056, 47104, 47136, 47128, 0, - 32768, 40960, 45056, 47104, 47136, 47137, 47132, 0, - 32768, 40960, 45056, 47104, 47136, 47137, 47132, 0, - 32768, 40960, 45056, 47104, 47136, 47137, 47132, 47134, - 0, 32768, 40960, 45056, 47104, 0, 32768, 40960, - 45056, 47104, 47136, 0, 32768, 40960, 45056, 47104, - 47136, 0, 32768, 40960, 45056, 47104, 47136, 47138, - 0, 32768, 40960, 45056, 47104, 47136, 0, 32768, - 40960, 45056, 47104, 47136, 47140, 0, 32768, 40960, - 45056, 47104, 47136, 47140, 0, 32768, 40960, 45056, - 47104, 47136, 47144, 47142, 0, 32768, 40960, 45056, - 47104, 47136, 0, 32768, 40960, 45056, 47104, 47136, - 47144, 0, 32768, 40960, 45056, 47104, 47136, 47144, - 0, 32768, 40960, 45056, 47104, 47136, 47144, 47146, - 0, 32768, 40960, 45056, 47104, 47136, 47144, 0, - 32768, 40960, 45056, 47104, 47136, 47152, 47148, 0, - 32768, 40960, 45056, 47104, 47136, 47152, 47148, 0, - 32768, 40960, 45056, 47104, 47136, 47152, 47153, 47150, - 0, 32768, 40960, 45056, 47104, 47136, 0, 32768, - 40960, 45056, 47104, 47168, 47152, 0, 32768, 40960, - 45056, 47104, 47168, 47152, 0, 32768, 40960, 45056, - 47104, 47168, 47152, 47154, 0, 32768, 40960, 45056, - 47104, 47168, 47152, 0, 32768, 40960, 45056, 47104, - 47168, 47152, 47156, 0, 32768, 40960, 45056, 47104, - 47168, 47152, 47156, 0, 32768, 40960, 45056, 47104, - 47168, 47152, 47160, 47158, 0, 32768, 40960, 45056, - 47104, 47168, 47152, 0, 32768, 40960, 45056, 47104, - 47168, 47169, 47160, 0, 32768, 40960, 45056, 47104, - 47168, 47169, 47160, 0, 32768, 40960, 45056, 47104, - 47168, 47169, 47160, 47162, 0, 32768, 40960, 45056, - 47104, 47168, 47169, 47160, 0, 32768, 40960, 45056, - 47104, 47168, 47169, 47160, 47164, 0, 32768, 40960, - 45056, 47104, 47168, 47169, 47171, 47164, 0, 32768, - 40960, 45056, 47104, 47168, 47169, 47171, 47164, 47166, - 0, 32768, 40960, 45056, 47104, 0, 32768, 40960, - 45056, 47104, 47168, 0, 32768, 40960, 45056, 47104, - 47168, 0, 32768, 40960, 45056, 47104, 47168, 47170, - 0, 32768, 40960, 45056, 47104, 47168, 0, 32768, - 40960, 45056, 47104, 47168, 47172, 0, 32768, 40960, - 45056, 47104, 47168, 47172, 0, 32768, 40960, 45056, - 47104, 47168, 47176, 47174, 0, 32768, 40960, 45056, - 47104, 47168, 0, 32768, 40960, 45056, 47104, 47168, - 47176, 0, 32768, 40960, 45056, 47104, 47168, 47176, - 0, 32768, 40960, 45056, 47104, 47168, 47176, 47178, - 0, 32768, 40960, 45056, 47104, 47168, 47176, 0, - 32768, 40960, 45056, 47104, 47168, 47184, 47180, 0, - 32768, 40960, 45056, 47104, 47168, 47184, 47180, 0, - 32768, 40960, 45056, 47104, 47168, 47184, 47185, 47182, - 0, 32768, 40960, 45056, 47104, 47168, 0, 32768, - 40960, 45056, 47104, 47168, 47184, 0, 32768, 40960, - 45056, 47104, 47168, 47184, 0, 32768, 40960, 45056, - 47104, 47168, 47184, 47186, 0, 32768, 40960, 45056, - 47104, 47168, 47184, 0, 32768, 40960, 45056, 47104, - 47168, 47184, 47188, 0, 32768, 40960, 45056, 47104, - 47168, 47184, 47188, 0, 32768, 40960, 45056, 47104, - 47168, 47184, 47192, 47190, 0, 32768, 40960, 45056, - 47104, 47168, 47184, 0, 32768, 40960, 45056, 47104, - 47168, 47200, 47192, 0, 32768, 40960, 45056, 47104, - 47168, 47200, 47192, 0, 32768, 40960, 45056, 47104, - 47168, 47200, 47192, 47194, 0, 32768, 40960, 45056, - 47104, 47168, 47200, 47192, 0, 32768, 40960, 45056, - 47104, 47168, 47200, 47201, 47196, 0, 32768, 40960, - 45056, 47104, 47168, 47200, 47201, 47196, 0, 32768, - 40960, 45056, 47104, 47168, 47200, 47201, 47196, 47198, - 0, 32768, 40960, 45056, 47104, 47168, 0, 32768, - 40960, 45056, 47104, 47232, 47200, 0, 32768, 40960, - 45056, 47104, 47232, 47200, 0, 32768, 40960, 45056, - 47104, 47232, 47200, 47202, 0, 32768, 40960, 45056, - 47104, 47232, 47200, 0, 32768, 40960, 45056, 47104, - 47232, 47200, 47204, 0, 32768, 40960, 45056, 47104, - 47232, 47200, 47204, 0, 32768, 40960, 45056, 47104, - 47232, 47200, 47208, 47206, 0, 32768, 40960, 45056, - 47104, 47232, 47200, 0, 32768, 40960, 45056, 47104, - 47232, 47200, 47208, 0, 32768, 40960, 45056, 47104, - 47232, 47200, 47208, 0, 32768, 40960, 45056, 47104, - 47232, 47200, 47208, 47210, 0, 32768, 40960, 45056, - 47104, 47232, 47200, 47208, 0, 32768, 40960, 45056, - 47104, 47232, 47200, 47216, 47212, 0, 32768, 40960, - 45056, 47104, 47232, 47200, 47216, 47212, 0, 32768, - 40960, 45056, 47104, 47232, 47200, 47216, 47217, 47214, - 0, 32768, 40960, 45056, 47104, 47232, 47200, 0, - 32768, 40960, 45056, 47104, 47232, 47233, 47216, 0, - 32768, 40960, 45056, 47104, 47232, 47233, 47216, 0, - 32768, 40960, 45056, 47104, 47232, 47233, 47216, 47218, - 0, 32768, 40960, 45056, 47104, 47232, 47233, 47216, - 0, 32768, 40960, 45056, 47104, 47232, 47233, 47216, - 47220, 0, 32768, 40960, 45056, 47104, 47232, 47233, - 47216, 47220, 0, 32768, 40960, 45056, 47104, 47232, - 47233, 47216, 47224, 47222, 0, 32768, 40960, 45056, - 47104, 47232, 47233, 47216, 0, 32768, 40960, 45056, - 47104, 47232, 47233, 47216, 47224, 0, 32768, 40960, - 45056, 47104, 47232, 47233, 47235, 47224, 0, 32768, - 40960, 45056, 47104, 47232, 47233, 47235, 47224, 47226, - 0, 32768, 40960, 45056, 47104, 47232, 47233, 47235, - 47224, 0, 32768, 40960, 45056, 47104, 47232, 47233, - 47235, 47224, 47228, 0, 32768, 40960, 45056, 47104, - 47232, 47233, 47235, 47224, 47228, 0, 32768, 40960, - 45056, 47104, 47232, 47233, 47235, 47224, 47228, 47230, - 0, 32768, 40960, 45056, 47104, 0, 32768, 40960, - 45056, 47104, 47232, 0, 32768, 40960, 45056, 47104, - 47232, 0, 32768, 40960, 45056, 47104, 47232, 47234, - 0, 32768, 40960, 45056, 47104, 47232, 0, 32768, - 40960, 45056, 47104, 47232, 47236, 0, 32768, 40960, - 45056, 47104, 47232, 47236, 0, 32768, 40960, 45056, - 47104, 47232, 47240, 47238, 0, 32768, 40960, 45056, - 47104, 47232, 0, 32768, 40960, 45056, 47104, 47232, - 47240, 0, 32768, 40960, 45056, 47104, 47232, 47240, - 0, 32768, 40960, 45056, 47104, 47232, 47240, 47242, - 0, 32768, 40960, 45056, 47104, 47232, 47240, 0, - 32768, 40960, 45056, 47104, 47232, 47248, 47244, 0, - 32768, 40960, 45056, 47104, 47232, 47248, 47244, 0, - 32768, 40960, 45056, 47104, 47232, 47248, 47249, 47246, - 0, 32768, 40960, 45056, 47104, 47232, 0, 32768, - 40960, 45056, 47104, 47232, 47248, 0, 32768, 40960, - 45056, 47104, 47232, 47248, 0, 32768, 40960, 45056, - 47104, 47232, 47248, 47250, 0, 32768, 40960, 45056, - 47104, 47232, 47248, 0, 32768, 40960, 45056, 47104, - 47232, 47248, 47252, 0, 32768, 40960, 45056, 47104, - 47232, 47248, 47252, 0, 32768, 40960, 45056, 47104, - 47232, 47248, 47256, 47254, 0, 32768, 40960, 45056, - 47104, 47232, 47248, 0, 32768, 40960, 45056, 47104, - 47232, 47264, 47256, 0, 32768, 40960, 45056, 47104, - 47232, 47264, 47256, 0, 32768, 40960, 45056, 47104, - 47232, 47264, 47256, 47258, 0, 32768, 40960, 45056, - 47104, 47232, 47264, 47256, 0, 32768, 40960, 45056, - 47104, 47232, 47264, 47265, 47260, 0, 32768, 40960, - 45056, 47104, 47232, 47264, 47265, 47260, 0, 32768, - 40960, 45056, 47104, 47232, 47264, 47265, 47260, 47262, - 0, 32768, 40960, 45056, 47104, 47232, 0, 32768, - 40960, 45056, 47104, 47232, 47264, 0, 32768, 40960, - 45056, 47104, 47232, 47264, 0, 32768, 40960, 45056, - 47104, 47232, 47264, 47266, 0, 32768, 40960, 45056, - 47104, 47232, 47264, 0, 32768, 40960, 45056, 47104, - 47232, 47264, 47268, 0, 32768, 40960, 45056, 47104, - 47232, 47264, 47268, 0, 32768, 40960, 45056, 47104, - 47232, 47264, 47272, 47270, 0, 32768, 40960, 45056, - 47104, 47232, 47264, 0, 32768, 40960, 45056, 47104, - 47232, 47264, 47272, 0, 32768, 40960, 45056, 47104, - 47232, 47264, 47272, 0, 32768, 40960, 45056, 47104, - 47232, 47264, 47272, 47274, 0, 32768, 40960, 45056, - 47104, 47232, 47264, 47272, 0, 32768, 40960, 45056, - 47104, 47232, 47264, 47280, 47276, 0, 32768, 40960, - 45056, 47104, 47232, 47264, 47280, 47276, 0, 32768, - 40960, 45056, 47104, 47232, 47264, 47280, 47281, 47278, - 0, 32768, 40960, 45056, 47104, 47232, 47264, 0, - 32768, 40960, 45056, 47104, 47232, 47296, 47280, 0, - 32768, 40960, 45056, 47104, 47232, 47296, 47280, 0, - 32768, 40960, 45056, 47104, 47232, 47296, 47280, 47282, - 0, 32768, 40960, 45056, 47104, 47232, 47296, 47280, - 0, 32768, 40960, 45056, 47104, 47232, 47296, 47280, - 47284, 0, 32768, 40960, 45056, 47104, 47232, 47296, - 47280, 47284, 0, 32768, 40960, 45056, 47104, 47232, - 47296, 47280, 47288, 47286, 0, 32768, 40960, 45056, - 47104, 47232, 47296, 47280, 0, 32768, 40960, 45056, - 47104, 47232, 47296, 47297, 47288, 0, 32768, 40960, - 45056, 47104, 47232, 47296, 47297, 47288, 0, 32768, - 40960, 45056, 47104, 47232, 47296, 47297, 47288, 47290, - 0, 32768, 40960, 45056, 47104, 47232, 47296, 47297, - 47288, 0, 32768, 40960, 45056, 47104, 47232, 47296, - 47297, 47288, 47292, 0, 32768, 40960, 45056, 47104, - 47232, 47296, 47297, 47299, 47292, 0, 32768, 40960, - 45056, 47104, 47232, 47296, 47297, 47299, 47292, 47294, - 0, 32768, 40960, 45056, 47104, 47232, 0, 32768, - 40960, 45056, 47104, 47360, 47296, 0, 32768, 40960, - 45056, 47104, 47360, 47296, 0, 32768, 40960, 45056, - 47104, 47360, 47296, 47298, 0, 32768, 40960, 45056, - 47104, 47360, 47296, 0, 32768, 40960, 45056, 47104, - 47360, 47296, 47300, 0, 32768, 40960, 45056, 47104, - 47360, 47296, 47300, 0, 32768, 40960, 45056, 47104, - 47360, 47296, 47304, 47302, 0, 32768, 40960, 45056, - 47104, 47360, 47296, 0, 32768, 40960, 45056, 47104, - 47360, 47296, 47304, 0, 32768, 40960, 45056, 47104, - 47360, 47296, 47304, 0, 32768, 40960, 45056, 47104, - 47360, 47296, 47304, 47306, 0, 32768, 40960, 45056, - 47104, 47360, 47296, 47304, 0, 32768, 40960, 45056, - 47104, 47360, 47296, 47312, 47308, 0, 32768, 40960, - 45056, 47104, 47360, 47296, 47312, 47308, 0, 32768, - 40960, 45056, 47104, 47360, 47296, 47312, 47313, 47310, - 0, 32768, 40960, 45056, 47104, 47360, 47296, 0, - 32768, 40960, 45056, 47104, 47360, 47296, 47312, 0, - 32768, 40960, 45056, 47104, 47360, 47296, 47312, 0, - 32768, 40960, 45056, 47104, 47360, 47296, 47312, 47314, - 0, 32768, 40960, 45056, 47104, 47360, 47296, 47312, - 0, 32768, 40960, 45056, 47104, 47360, 47296, 47312, - 47316, 0, 32768, 40960, 45056, 47104, 47360, 47296, - 47312, 47316, 0, 32768, 40960, 45056, 47104, 47360, - 47296, 47312, 47320, 47318, 0, 32768, 40960, 45056, - 47104, 47360, 47296, 47312, 0, 32768, 40960, 45056, - 47104, 47360, 47296, 47328, 47320, 0, 32768, 40960, - 45056, 47104, 47360, 47296, 47328, 47320, 0, 32768, - 40960, 45056, 47104, 47360, 47296, 47328, 47320, 47322, - 0, 32768, 40960, 45056, 47104, 47360, 47296, 47328, - 47320, 0, 32768, 40960, 45056, 47104, 47360, 47296, - 47328, 47329, 47324, 0, 32768, 40960, 45056, 47104, - 47360, 47296, 47328, 47329, 47324, 0, 32768, 40960, - 45056, 47104, 47360, 47296, 47328, 47329, 47324, 47326, - 0, 32768, 40960, 45056, 47104, 47360, 47296, 0, - 32768, 40960, 45056, 47104, 47360, 47361, 47328, 0, - 32768, 40960, 45056, 47104, 47360, 47361, 47328, 0, - 32768, 40960, 45056, 47104, 47360, 47361, 47328, 47330, - 0, 32768, 40960, 45056, 47104, 47360, 47361, 47328, - 0, 32768, 40960, 45056, 47104, 47360, 47361, 47328, - 47332, 0, 32768, 40960, 45056, 47104, 47360, 47361, - 47328, 47332, 0, 32768, 40960, 45056, 47104, 47360, - 47361, 47328, 47336, 47334, 0, 32768, 40960, 45056, - 47104, 47360, 47361, 47328, 0, 32768, 40960, 45056, - 47104, 47360, 47361, 47328, 47336, 0, 32768, 40960, - 45056, 47104, 47360, 47361, 47328, 47336, 0, 32768, - 40960, 45056, 47104, 47360, 47361, 47328, 47336, 47338, - 0, 32768, 40960, 45056, 47104, 47360, 47361, 47328, - 47336, 0, 32768, 40960, 45056, 47104, 47360, 47361, - 47328, 47344, 47340, 0, 32768, 40960, 45056, 47104, - 47360, 47361, 47328, 47344, 47340, 0, 32768, 40960, - 45056, 47104, 47360, 47361, 47328, 47344, 47345, 47342, - 0, 32768, 40960, 45056, 47104, 47360, 47361, 47328, - 0, 32768, 40960, 45056, 47104, 47360, 47361, 47328, - 47344, 0, 32768, 40960, 45056, 47104, 47360, 47361, - 47363, 47344, 0, 32768, 40960, 45056, 47104, 47360, - 47361, 47363, 47344, 47346, 0, 32768, 40960, 45056, - 47104, 47360, 47361, 47363, 47344, 0, 32768, 40960, - 45056, 47104, 47360, 47361, 47363, 47344, 47348, 0, - 32768, 40960, 45056, 47104, 47360, 47361, 47363, 47344, - 47348, 0, 32768, 40960, 45056, 47104, 47360, 47361, - 47363, 47344, 47352, 47350, 0, 32768, 40960, 45056, - 47104, 47360, 47361, 47363, 47344, 0, 32768, 40960, - 45056, 47104, 47360, 47361, 47363, 47344, 47352, 0, - 32768, 40960, 45056, 47104, 47360, 47361, 47363, 47344, - 47352, 0, 32768, 40960, 45056, 47104, 47360, 47361, - 47363, 47344, 47352, 47354, 0, 32768, 40960, 45056, - 47104, 47360, 47361, 47363, 47367, 47352, 0, 32768, - 40960, 45056, 47104, 47360, 47361, 47363, 47367, 47352, - 47356, 0, 32768, 40960, 45056, 47104, 47360, 47361, - 47363, 47367, 47352, 47356, 0, 32768, 40960, 45056, - 47104, 47360, 47361, 47363, 47367, 47352, 47356, 47358, - 0, 32768, 40960, 45056, 47104, 0, 32768, 40960, - 45056, 47104, 47360, 0, 32768, 40960, 45056, 47104, - 47360, 0, 32768, 40960, 45056, 47104, 47360, 47362, - 0, 32768, 40960, 45056, 47104, 47360, 0, 32768, - 40960, 45056, 47104, 47360, 47364, 0, 32768, 40960, - 45056, 47104, 47360, 47364, 0, 32768, 40960, 45056, - 47104, 47360, 47368, 47366, 0, 32768, 40960, 45056, - 47104, 47360, 0, 32768, 40960, 45056, 47104, 47360, - 47368, 0, 32768, 40960, 45056, 47104, 47360, 47368, - 0, 32768, 40960, 45056, 47104, 47360, 47368, 47370, - 0, 32768, 40960, 45056, 47104, 47360, 47368, 0, - 32768, 40960, 45056, 47104, 47360, 47376, 47372, 0, - 32768, 40960, 45056, 47104, 47360, 47376, 47372, 0, - 32768, 40960, 45056, 47104, 47360, 47376, 47377, 47374, - 0, 32768, 40960, 45056, 47104, 47360, 0, 32768, - 40960, 45056, 47104, 47360, 47376, 0, 32768, 40960, - 45056, 47104, 47360, 47376, 0, 32768, 40960, 45056, - 47104, 47360, 47376, 47378, 0, 32768, 40960, 45056, - 47104, 47360, 47376, 0, 32768, 40960, 45056, 47104, - 47360, 47376, 47380, 0, 32768, 40960, 45056, 47104, - 47360, 47376, 47380, 0, 32768, 40960, 45056, 47104, - 47360, 47376, 47384, 47382, 0, 32768, 40960, 45056, - 47104, 47360, 47376, 0, 32768, 40960, 45056, 47104, - 47360, 47392, 47384, 0, 32768, 40960, 45056, 47104, - 47360, 47392, 47384, 0, 32768, 40960, 45056, 47104, - 47360, 47392, 47384, 47386, 0, 32768, 40960, 45056, - 47104, 47360, 47392, 47384, 0, 32768, 40960, 45056, - 47104, 47360, 47392, 47393, 47388, 0, 32768, 40960, - 45056, 47104, 47360, 47392, 47393, 47388, 0, 32768, - 40960, 45056, 47104, 47360, 47392, 47393, 47388, 47390, - 0, 32768, 40960, 45056, 47104, 47360, 0, 32768, - 40960, 45056, 47104, 47360, 47392, 0, 32768, 40960, - 45056, 47104, 47360, 47392, 0, 32768, 40960, 45056, - 47104, 47360, 47392, 47394, 0, 32768, 40960, 45056, - 47104, 47360, 47392, 0, 32768, 40960, 45056, 47104, - 47360, 47392, 47396, 0, 32768, 40960, 45056, 47104, - 47360, 47392, 47396, 0, 32768, 40960, 45056, 47104, - 47360, 47392, 47400, 47398, 0, 32768, 40960, 45056, - 47104, 47360, 47392, 0, 32768, 40960, 45056, 47104, - 47360, 47392, 47400, 0, 32768, 40960, 45056, 47104, - 47360, 47392, 47400, 0, 32768, 40960, 45056, 47104, - 47360, 47392, 47400, 47402, 0, 32768, 40960, 45056, - 47104, 47360, 47392, 47400, 0, 32768, 40960, 45056, - 47104, 47360, 47392, 47408, 47404, 0, 32768, 40960, - 45056, 47104, 47360, 47392, 47408, 47404, 0, 32768, - 40960, 45056, 47104, 47360, 47392, 47408, 47409, 47406, - 0, 32768, 40960, 45056, 47104, 47360, 47392, 0, - 32768, 40960, 45056, 47104, 47360, 47424, 47408, 0, - 32768, 40960, 45056, 47104, 47360, 47424, 47408, 0, - 32768, 40960, 45056, 47104, 47360, 47424, 47408, 47410, - 0, 32768, 40960, 45056, 47104, 47360, 47424, 47408, - 0, 32768, 40960, 45056, 47104, 47360, 47424, 47408, - 47412, 0, 32768, 40960, 45056, 47104, 47360, 47424, - 47408, 47412, 0, 32768, 40960, 45056, 47104, 47360, - 47424, 47408, 47416, 47414, 0, 32768, 40960, 45056, - 47104, 47360, 47424, 47408, 0, 32768, 40960, 45056, - 47104, 47360, 47424, 47425, 47416, 0, 32768, 40960, - 45056, 47104, 47360, 47424, 47425, 47416, 0, 32768, - 40960, 45056, 47104, 47360, 47424, 47425, 47416, 47418, - 0, 32768, 40960, 45056, 47104, 47360, 47424, 47425, - 47416, 0, 32768, 40960, 45056, 47104, 47360, 47424, - 47425, 47416, 47420, 0, 32768, 40960, 45056, 47104, - 47360, 47424, 47425, 47427, 47420, 0, 32768, 40960, - 45056, 47104, 47360, 47424, 47425, 47427, 47420, 47422, - 0, 32768, 40960, 45056, 47104, 47360, 0, 32768, - 40960, 45056, 47104, 47360, 47424, 0, 32768, 40960, - 45056, 47104, 47360, 47424, 0, 32768, 40960, 45056, - 47104, 47360, 47424, 47426, 0, 32768, 40960, 45056, - 47104, 47360, 47424, 0, 32768, 40960, 45056, 47104, - 47360, 47424, 47428, 0, 32768, 40960, 45056, 47104, - 47360, 47424, 47428, 0, 32768, 40960, 45056, 47104, - 47360, 47424, 47432, 47430, 0, 32768, 40960, 45056, - 47104, 47360, 47424, 0, 32768, 40960, 45056, 47104, - 47360, 47424, 47432, 0, 32768, 40960, 45056, 47104, - 47360, 47424, 47432, 0, 32768, 40960, 45056, 47104, - 47360, 47424, 47432, 47434, 0, 32768, 40960, 45056, - 47104, 47360, 47424, 47432, 0, 32768, 40960, 45056, - 47104, 47360, 47424, 47440, 47436, 0, 32768, 40960, - 45056, 47104, 47360, 47424, 47440, 47436, 0, 32768, - 40960, 45056, 47104, 47360, 47424, 47440, 47441, 47438, - 0, 32768, 40960, 45056, 47104, 47360, 47424, 0, - 32768, 40960, 45056, 47104, 47360, 47424, 47440, 0, - 32768, 40960, 45056, 47104, 47360, 47424, 47440, 0, - 32768, 40960, 45056, 47104, 47360, 47424, 47440, 47442, - 0, 32768, 40960, 45056, 47104, 47360, 47424, 47440, - 0, 32768, 40960, 45056, 47104, 47360, 47424, 47440, - 47444, 0, 32768, 40960, 45056, 47104, 47360, 47424, - 47440, 47444, 0, 32768, 40960, 45056, 47104, 47360, - 47424, 47440, 47448, 47446, 0, 32768, 40960, 45056, - 47104, 47360, 47424, 47440, 0, 32768, 40960, 45056, - 47104, 47360, 47424, 47456, 47448, 0, 32768, 40960, - 45056, 47104, 47360, 47424, 47456, 47448, 0, 32768, - 40960, 45056, 47104, 47360, 47424, 47456, 47448, 47450, - 0, 32768, 40960, 45056, 47104, 47360, 47424, 47456, - 47448, 0, 32768, 40960, 45056, 47104, 47360, 47424, - 47456, 47457, 47452, 0, 32768, 40960, 45056, 47104, - 47360, 47424, 47456, 47457, 47452, 0, 32768, 40960, - 45056, 47104, 47360, 47424, 47456, 47457, 47452, 47454, - 0, 32768, 40960, 45056, 47104, 47360, 47424, 0, - 32768, 40960, 45056, 47104, 47360, 47488, 47456, 0, - 32768, 40960, 45056, 47104, 47360, 47488, 47456, 0, - 32768, 40960, 45056, 47104, 47360, 47488, 47456, 47458, - 0, 32768, 40960, 45056, 47104, 47360, 47488, 47456, - 0, 32768, 40960, 45056, 47104, 47360, 47488, 47456, - 47460, 0, 32768, 40960, 45056, 47104, 47360, 47488, - 47456, 47460, 0, 32768, 40960, 45056, 47104, 47360, - 47488, 47456, 47464, 47462, 0, 32768, 40960, 45056, - 47104, 47360, 47488, 47456, 0, 32768, 40960, 45056, - 47104, 47360, 47488, 47456, 47464, 0, 32768, 40960, - 45056, 47104, 47360, 47488, 47456, 47464, 0, 32768, - 40960, 45056, 47104, 47360, 47488, 47456, 47464, 47466, - 0, 32768, 40960, 45056, 47104, 47360, 47488, 47456, - 47464, 0, 32768, 40960, 45056, 47104, 47360, 47488, - 47456, 47472, 47468, 0, 32768, 40960, 45056, 47104, - 47360, 47488, 47456, 47472, 47468, 0, 32768, 40960, - 45056, 47104, 47360, 47488, 47456, 47472, 47473, 47470, - 0, 32768, 40960, 45056, 47104, 47360, 47488, 47456, - 0, 32768, 40960, 45056, 47104, 47360, 47488, 47489, - 47472, 0, 32768, 40960, 45056, 47104, 47360, 47488, - 47489, 47472, 0, 32768, 40960, 45056, 47104, 47360, - 47488, 47489, 47472, 47474, 0, 32768, 40960, 45056, - 47104, 47360, 47488, 47489, 47472, 0, 32768, 40960, - 45056, 47104, 47360, 47488, 47489, 47472, 47476, 0, - 32768, 40960, 45056, 47104, 47360, 47488, 47489, 47472, - 47476, 0, 32768, 40960, 45056, 47104, 47360, 47488, - 47489, 47472, 47480, 47478, 0, 32768, 40960, 45056, - 47104, 47360, 47488, 47489, 47472, 0, 32768, 40960, - 45056, 47104, 47360, 47488, 47489, 47472, 47480, 0, - 32768, 40960, 45056, 47104, 47360, 47488, 47489, 47491, - 47480, 0, 32768, 40960, 45056, 47104, 47360, 47488, - 47489, 47491, 47480, 47482, 0, 32768, 40960, 45056, - 47104, 47360, 47488, 47489, 47491, 47480, 0, 32768, - 40960, 45056, 47104, 47360, 47488, 47489, 47491, 47480, - 47484, 0, 32768, 40960, 45056, 47104, 47360, 47488, - 47489, 47491, 47480, 47484, 0, 32768, 40960, 45056, - 47104, 47360, 47488, 47489, 47491, 47480, 47484, 47486, - 0, 32768, 40960, 45056, 47104, 47360, 0, 32768, - 40960, 45056, 47104, 47616, 47488, 0, 32768, 40960, - 45056, 47104, 47616, 47488, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 47490, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 0, 32768, 40960, 45056, 47104, - 47616, 47488, 47492, 0, 32768, 40960, 45056, 47104, - 47616, 47488, 47492, 0, 32768, 40960, 45056, 47104, - 47616, 47488, 47496, 47494, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 0, 32768, 40960, 45056, 47104, - 47616, 47488, 47496, 0, 32768, 40960, 45056, 47104, - 47616, 47488, 47496, 0, 32768, 40960, 45056, 47104, - 47616, 47488, 47496, 47498, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 47496, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 47504, 47500, 0, 32768, 40960, - 45056, 47104, 47616, 47488, 47504, 47500, 0, 32768, - 40960, 45056, 47104, 47616, 47488, 47504, 47505, 47502, - 0, 32768, 40960, 45056, 47104, 47616, 47488, 0, - 32768, 40960, 45056, 47104, 47616, 47488, 47504, 0, - 32768, 40960, 45056, 47104, 47616, 47488, 47504, 0, - 32768, 40960, 45056, 47104, 47616, 47488, 47504, 47506, - 0, 32768, 40960, 45056, 47104, 47616, 47488, 47504, - 0, 32768, 40960, 45056, 47104, 47616, 47488, 47504, - 47508, 0, 32768, 40960, 45056, 47104, 47616, 47488, - 47504, 47508, 0, 32768, 40960, 45056, 47104, 47616, - 47488, 47504, 47512, 47510, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 47504, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 47520, 47512, 0, 32768, 40960, - 45056, 47104, 47616, 47488, 47520, 47512, 0, 32768, - 40960, 45056, 47104, 47616, 47488, 47520, 47512, 47514, - 0, 32768, 40960, 45056, 47104, 47616, 47488, 47520, - 47512, 0, 32768, 40960, 45056, 47104, 47616, 47488, - 47520, 47521, 47516, 0, 32768, 40960, 45056, 47104, - 47616, 47488, 47520, 47521, 47516, 0, 32768, 40960, - 45056, 47104, 47616, 47488, 47520, 47521, 47516, 47518, - 0, 32768, 40960, 45056, 47104, 47616, 47488, 0, - 32768, 40960, 45056, 47104, 47616, 47488, 47520, 0, - 32768, 40960, 45056, 47104, 47616, 47488, 47520, 0, - 32768, 40960, 45056, 47104, 47616, 47488, 47520, 47522, - 0, 32768, 40960, 45056, 47104, 47616, 47488, 47520, - 0, 32768, 40960, 45056, 47104, 47616, 47488, 47520, - 47524, 0, 32768, 40960, 45056, 47104, 47616, 47488, - 47520, 47524, 0, 32768, 40960, 45056, 47104, 47616, - 47488, 47520, 47528, 47526, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 47520, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 47520, 47528, 0, 32768, 40960, - 45056, 47104, 47616, 47488, 47520, 47528, 0, 32768, - 40960, 45056, 47104, 47616, 47488, 47520, 47528, 47530, - 0, 32768, 40960, 45056, 47104, 47616, 47488, 47520, - 47528, 0, 32768, 40960, 45056, 47104, 47616, 47488, - 47520, 47536, 47532, 0, 32768, 40960, 45056, 47104, - 47616, 47488, 47520, 47536, 47532, 0, 32768, 40960, - 45056, 47104, 47616, 47488, 47520, 47536, 47537, 47534, - 0, 32768, 40960, 45056, 47104, 47616, 47488, 47520, - 0, 32768, 40960, 45056, 47104, 47616, 47488, 47552, - 47536, 0, 32768, 40960, 45056, 47104, 47616, 47488, - 47552, 47536, 0, 32768, 40960, 45056, 47104, 47616, - 47488, 47552, 47536, 47538, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 47552, 47536, 0, 32768, 40960, - 45056, 47104, 47616, 47488, 47552, 47536, 47540, 0, - 32768, 40960, 45056, 47104, 47616, 47488, 47552, 47536, - 47540, 0, 32768, 40960, 45056, 47104, 47616, 47488, - 47552, 47536, 47544, 47542, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 47552, 47536, 0, 32768, 40960, - 45056, 47104, 47616, 47488, 47552, 47553, 47544, 0, - 32768, 40960, 45056, 47104, 47616, 47488, 47552, 47553, - 47544, 0, 32768, 40960, 45056, 47104, 47616, 47488, - 47552, 47553, 47544, 47546, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 47552, 47553, 47544, 0, 32768, - 40960, 45056, 47104, 47616, 47488, 47552, 47553, 47544, - 47548, 0, 32768, 40960, 45056, 47104, 47616, 47488, - 47552, 47553, 47555, 47548, 0, 32768, 40960, 45056, - 47104, 47616, 47488, 47552, 47553, 47555, 47548, 47550, - 0, 32768, 40960, 45056, 47104, 47616, 47488, 0, - 32768, 40960, 45056, 47104, 47616, 47617, 47552, 0, - 32768, 40960, 45056, 47104, 47616, 47617, 47552, 0, - 32768, 40960, 45056, 47104, 47616, 47617, 47552, 47554, - 0, 32768, 40960, 45056, 47104, 47616, 47617, 47552, - 0, 32768, 40960, 45056, 47104, 47616, 47617, 47552, - 47556, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47552, 47556, 0, 32768, 40960, 45056, 47104, 47616, - 47617, 47552, 47560, 47558, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47552, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47552, 47560, 0, 32768, 40960, - 45056, 47104, 47616, 47617, 47552, 47560, 0, 32768, - 40960, 45056, 47104, 47616, 47617, 47552, 47560, 47562, - 0, 32768, 40960, 45056, 47104, 47616, 47617, 47552, - 47560, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47552, 47568, 47564, 0, 32768, 40960, 45056, 47104, - 47616, 47617, 47552, 47568, 47564, 0, 32768, 40960, - 45056, 47104, 47616, 47617, 47552, 47568, 47569, 47566, - 0, 32768, 40960, 45056, 47104, 47616, 47617, 47552, - 0, 32768, 40960, 45056, 47104, 47616, 47617, 47552, - 47568, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47552, 47568, 0, 32768, 40960, 45056, 47104, 47616, - 47617, 47552, 47568, 47570, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47552, 47568, 0, 32768, 40960, - 45056, 47104, 47616, 47617, 47552, 47568, 47572, 0, - 32768, 40960, 45056, 47104, 47616, 47617, 47552, 47568, - 47572, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47552, 47568, 47576, 47574, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47552, 47568, 0, 32768, 40960, - 45056, 47104, 47616, 47617, 47552, 47584, 47576, 0, - 32768, 40960, 45056, 47104, 47616, 47617, 47552, 47584, - 47576, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47552, 47584, 47576, 47578, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47552, 47584, 47576, 0, 32768, - 40960, 45056, 47104, 47616, 47617, 47552, 47584, 47585, - 47580, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47552, 47584, 47585, 47580, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47552, 47584, 47585, 47580, 47582, - 0, 32768, 40960, 45056, 47104, 47616, 47617, 47552, - 0, 32768, 40960, 45056, 47104, 47616, 47617, 47552, - 47584, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47619, 47584, 0, 32768, 40960, 45056, 47104, 47616, - 47617, 47619, 47584, 47586, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47619, 47584, 0, 32768, 40960, - 45056, 47104, 47616, 47617, 47619, 47584, 47588, 0, - 32768, 40960, 45056, 47104, 47616, 47617, 47619, 47584, - 47588, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47619, 47584, 47592, 47590, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47619, 47584, 0, 32768, 40960, - 45056, 47104, 47616, 47617, 47619, 47584, 47592, 0, - 32768, 40960, 45056, 47104, 47616, 47617, 47619, 47584, - 47592, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47619, 47584, 47592, 47594, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47619, 47584, 47592, 0, 32768, - 40960, 45056, 47104, 47616, 47617, 47619, 47584, 47600, - 47596, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47619, 47584, 47600, 47596, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47619, 47584, 47600, 47601, 47598, - 0, 32768, 40960, 45056, 47104, 47616, 47617, 47619, - 47584, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47619, 47584, 47600, 0, 32768, 40960, 45056, 47104, - 47616, 47617, 47619, 47584, 47600, 0, 32768, 40960, - 45056, 47104, 47616, 47617, 47619, 47584, 47600, 47602, - 0, 32768, 40960, 45056, 47104, 47616, 47617, 47619, - 47623, 47600, 0, 32768, 40960, 45056, 47104, 47616, - 47617, 47619, 47623, 47600, 47604, 0, 32768, 40960, - 45056, 47104, 47616, 47617, 47619, 47623, 47600, 47604, - 0, 32768, 40960, 45056, 47104, 47616, 47617, 47619, - 47623, 47600, 47608, 47606, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47619, 47623, 47600, 0, 32768, - 40960, 45056, 47104, 47616, 47617, 47619, 47623, 47600, - 47608, 0, 32768, 40960, 45056, 47104, 47616, 47617, - 47619, 47623, 47600, 47608, 0, 32768, 40960, 45056, - 47104, 47616, 47617, 47619, 47623, 47600, 47608, 47610, - 0, 32768, 40960, 45056, 47104, 47616, 47617, 47619, - 47623, 47600, 47608, 0, 32768, 40960, 45056, 47104, - 47616, 47617, 47619, 47623, 47600, 47608, 47612, 0, - 32768, 40960, 45056, 47104, 47616, 47617, 47619, 47623, - 47600, 47608, 47612, 0, 32768, 40960, 45056, 47104, - 47616, 47617, 47619, 47623, 47600, 47608, 47612, 47614, - 0, 32768, 40960, 45056, 47104, 0, 32768, 40960, - 45056, 47104, 47616, 0, 32768, 40960, 45056, 47104, - 47616, 0, 32768, 40960, 45056, 47104, 47616, 47618, - 0, 32768, 40960, 45056, 47104, 47616, 0, 32768, - 40960, 45056, 47104, 47616, 47620, 0, 32768, 40960, - 45056, 47104, 47616, 47620, 0, 32768, 40960, 45056, - 47104, 47616, 47624, 47622, 0, 32768, 40960, 45056, - 47104, 47616, 0, 32768, 40960, 45056, 47104, 47616, - 47624, 0, 32768, 40960, 45056, 47104, 47616, 47624, - 0, 32768, 40960, 45056, 47104, 47616, 47624, 47626, - 0, 32768, 40960, 45056, 47104, 47616, 47624, 0, - 32768, 40960, 45056, 47104, 47616, 47632, 47628, 0, - 32768, 40960, 45056, 47104, 47616, 47632, 47628, 0, - 32768, 40960, 45056, 47104, 47616, 47632, 47633, 47630, - 0, 32768, 40960, 45056, 47104, 47616, 0, 32768, - 40960, 45056, 47104, 47616, 47632, 0, 32768, 40960, - 45056, 47104, 47616, 47632, 0, 32768, 40960, 45056, - 47104, 47616, 47632, 47634, 0, 32768, 40960, 45056, - 47104, 47616, 47632, 0, 32768, 40960, 45056, 47104, - 47616, 47632, 47636, 0, 32768, 40960, 45056, 47104, - 47616, 47632, 47636, 0, 32768, 40960, 45056, 47104, - 47616, 47632, 47640, 47638, 0, 32768, 40960, 45056, - 47104, 47616, 47632, 0, 32768, 40960, 45056, 47104, - 47616, 47648, 47640, 0, 32768, 40960, 45056, 47104, - 47616, 47648, 47640, 0, 32768, 40960, 45056, 47104, - 47616, 47648, 47640, 47642, 0, 32768, 40960, 45056, - 47104, 47616, 47648, 47640, 0, 32768, 40960, 45056, - 47104, 47616, 47648, 47649, 47644, 0, 32768, 40960, - 45056, 47104, 47616, 47648, 47649, 47644, 0, 32768, - 40960, 45056, 47104, 47616, 47648, 47649, 47644, 47646, - 0, 32768, 40960, 45056, 47104, 47616, 0, 32768, - 40960, 45056, 47104, 47616, 47648, 0, 32768, 40960, - 45056, 47104, 47616, 47648, 0, 32768, 40960, 45056, - 47104, 47616, 47648, 47650, 0, 32768, 40960, 45056, - 47104, 47616, 47648, 0, 32768, 40960, 45056, 47104, - 47616, 47648, 47652, 0, 32768, 40960, 45056, 47104, - 47616, 47648, 47652, 0, 32768, 40960, 45056, 47104, - 47616, 47648, 47656, 47654, 0, 32768, 40960, 45056, - 47104, 47616, 47648, 0, 32768, 40960, 45056, 47104, - 47616, 47648, 47656, 0, 32768, 40960, 45056, 47104, - 47616, 47648, 47656, 0, 32768, 40960, 45056, 47104, - 47616, 47648, 47656, 47658, 0, 32768, 40960, 45056, - 47104, 47616, 47648, 47656, 0, 32768, 40960, 45056, - 47104, 47616, 47648, 47664, 47660, 0, 32768, 40960, - 45056, 47104, 47616, 47648, 47664, 47660, 0, 32768, - 40960, 45056, 47104, 47616, 47648, 47664, 47665, 47662, - 0, 32768, 40960, 45056, 47104, 47616, 47648, 0, - 32768, 40960, 45056, 47104, 47616, 47680, 47664, 0, - 32768, 40960, 45056, 47104, 47616, 47680, 47664, 0, - 32768, 40960, 45056, 47104, 47616, 47680, 47664, 47666, - 0, 32768, 40960, 45056, 47104, 47616, 47680, 47664, - 0, 32768, 40960, 45056, 47104, 47616, 47680, 47664, - 47668, 0, 32768, 40960, 45056, 47104, 47616, 47680, - 47664, 47668, 0, 32768, 40960, 45056, 47104, 47616, - 47680, 47664, 47672, 47670, 0, 32768, 40960, 45056, - 47104, 47616, 47680, 47664, 0, 32768, 40960, 45056, - 47104, 47616, 47680, 47681, 47672, 0, 32768, 40960, - 45056, 47104, 47616, 47680, 47681, 47672, 0, 32768, - 40960, 45056, 47104, 47616, 47680, 47681, 47672, 47674, - 0, 32768, 40960, 45056, 47104, 47616, 47680, 47681, - 47672, 0, 32768, 40960, 45056, 47104, 47616, 47680, - 47681, 47672, 47676, 0, 32768, 40960, 45056, 47104, - 47616, 47680, 47681, 47683, 47676, 0, 32768, 40960, - 45056, 47104, 47616, 47680, 47681, 47683, 47676, 47678, - 0, 32768, 40960, 45056, 47104, 47616, 0, 32768, - 40960, 45056, 47104, 47616, 47680, 0, 32768, 40960, - 45056, 47104, 47616, 47680, 0, 32768, 40960, 45056, - 47104, 47616, 47680, 47682, 0, 32768, 40960, 45056, - 47104, 47616, 47680, 0, 32768, 40960, 45056, 47104, - 47616, 47680, 47684, 0, 32768, 40960, 45056, 47104, - 47616, 47680, 47684, 0, 32768, 40960, 45056, 47104, - 47616, 47680, 47688, 47686, 0, 32768, 40960, 45056, - 47104, 47616, 47680, 0, 32768, 40960, 45056, 47104, - 47616, 47680, 47688, 0, 32768, 40960, 45056, 47104, - 47616, 47680, 47688, 0, 32768, 40960, 45056, 47104, - 47616, 47680, 47688, 47690, 0, 32768, 40960, 45056, - 47104, 47616, 47680, 47688, 0, 32768, 40960, 45056, - 47104, 47616, 47680, 47696, 47692, 0, 32768, 40960, - 45056, 47104, 47616, 47680, 47696, 47692, 0, 32768, - 40960, 45056, 47104, 47616, 47680, 47696, 47697, 47694, - 0, 32768, 40960, 45056, 47104, 47616, 47680, 0, - 32768, 40960, 45056, 47104, 47616, 47680, 47696, 0, - 32768, 40960, 45056, 47104, 47616, 47680, 47696, 0, - 32768, 40960, 45056, 47104, 47616, 47680, 47696, 47698, - 0, 32768, 40960, 45056, 47104, 47616, 47680, 47696, - 0, 32768, 40960, 45056, 47104, 47616, 47680, 47696, - 47700, 0, 32768, 40960, 45056, 47104, 47616, 47680, - 47696, 47700, 0, 32768, 40960, 45056, 47104, 47616, - 47680, 47696, 47704, 47702, 0, 32768, 40960, 45056, - 47104, 47616, 47680, 47696, 0, 32768, 40960, 45056, - 47104, 47616, 47680, 47712, 47704, 0, 32768, 40960, - 45056, 47104, 47616, 47680, 47712, 47704, 0, 32768, - 40960, 45056, 47104, 47616, 47680, 47712, 47704, 47706, - 0, 32768, 40960, 45056, 47104, 47616, 47680, 47712, - 47704, 0, 32768, 40960, 45056, 47104, 47616, 47680, - 47712, 47713, 47708, 0, 32768, 40960, 45056, 47104, - 47616, 47680, 47712, 47713, 47708, 0, 32768, 40960, - 45056, 47104, 47616, 47680, 47712, 47713, 47708, 47710, - 0, 32768, 40960, 45056, 47104, 47616, 47680, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47712, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47712, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47712, 47714, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47712, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47712, - 47716, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47712, 47716, 0, 32768, 40960, 45056, 47104, 47616, - 47744, 47712, 47720, 47718, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47712, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47712, 47720, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 47712, 47720, 0, 32768, - 40960, 45056, 47104, 47616, 47744, 47712, 47720, 47722, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47712, - 47720, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47712, 47728, 47724, 0, 32768, 40960, 45056, 47104, - 47616, 47744, 47712, 47728, 47724, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 47712, 47728, 47729, 47726, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47712, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47745, - 47728, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47745, 47728, 0, 32768, 40960, 45056, 47104, 47616, - 47744, 47745, 47728, 47730, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47745, 47728, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 47745, 47728, 47732, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47745, 47728, - 47732, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47745, 47728, 47736, 47734, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47745, 47728, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 47745, 47728, 47736, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47745, 47747, - 47736, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47745, 47747, 47736, 47738, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47745, 47747, 47736, 0, 32768, - 40960, 45056, 47104, 47616, 47744, 47745, 47747, 47736, - 47740, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47745, 47747, 47736, 47740, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47745, 47747, 47736, 47740, 47742, - 0, 32768, 40960, 45056, 47104, 47616, 0, 32768, - 40960, 45056, 47104, 47616, 47744, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47746, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 0, 32768, 40960, 45056, 47104, - 47616, 47744, 47748, 0, 32768, 40960, 45056, 47104, - 47616, 47744, 47748, 0, 32768, 40960, 45056, 47104, - 47616, 47744, 47752, 47750, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 0, 32768, 40960, 45056, 47104, - 47616, 47744, 47752, 0, 32768, 40960, 45056, 47104, - 47616, 47744, 47752, 0, 32768, 40960, 45056, 47104, - 47616, 47744, 47752, 47754, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47752, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47760, 47756, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 47760, 47756, 0, 32768, - 40960, 45056, 47104, 47616, 47744, 47760, 47761, 47758, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47760, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47760, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47760, 47762, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47760, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47760, - 47764, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47760, 47764, 0, 32768, 40960, 45056, 47104, 47616, - 47744, 47760, 47768, 47766, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47760, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47776, 47768, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 47776, 47768, 0, 32768, - 40960, 45056, 47104, 47616, 47744, 47776, 47768, 47770, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47776, - 47768, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47776, 47777, 47772, 0, 32768, 40960, 45056, 47104, - 47616, 47744, 47776, 47777, 47772, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 47776, 47777, 47772, 47774, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47776, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47776, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47776, 47778, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47776, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47776, - 47780, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47776, 47780, 0, 32768, 40960, 45056, 47104, 47616, - 47744, 47776, 47784, 47782, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47776, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47776, 47784, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 47776, 47784, 0, 32768, - 40960, 45056, 47104, 47616, 47744, 47776, 47784, 47786, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47776, - 47784, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47776, 47792, 47788, 0, 32768, 40960, 45056, 47104, - 47616, 47744, 47776, 47792, 47788, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 47776, 47792, 47793, 47790, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47776, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 47808, - 47792, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47808, 47792, 0, 32768, 40960, 45056, 47104, 47616, - 47744, 47808, 47792, 47794, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47808, 47792, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 47808, 47792, 47796, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47808, 47792, - 47796, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47808, 47792, 47800, 47798, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47808, 47792, 0, 32768, 40960, - 45056, 47104, 47616, 47744, 47808, 47809, 47800, 0, - 32768, 40960, 45056, 47104, 47616, 47744, 47808, 47809, - 47800, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47808, 47809, 47800, 47802, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47808, 47809, 47800, 0, 32768, - 40960, 45056, 47104, 47616, 47744, 47808, 47809, 47800, - 47804, 0, 32768, 40960, 45056, 47104, 47616, 47744, - 47808, 47809, 47811, 47804, 0, 32768, 40960, 45056, - 47104, 47616, 47744, 47808, 47809, 47811, 47804, 47806, - 0, 32768, 40960, 45056, 47104, 47616, 47744, 0, - 32768, 40960, 45056, 47104, 47616, 47872, 47808, 0, - 32768, 40960, 45056, 47104, 47616, 47872, 47808, 0, - 32768, 40960, 45056, 47104, 47616, 47872, 47808, 47810, - 0, 32768, 40960, 45056, 47104, 47616, 47872, 47808, - 0, 32768, 40960, 45056, 47104, 47616, 47872, 47808, - 47812, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47808, 47812, 0, 32768, 40960, 45056, 47104, 47616, - 47872, 47808, 47816, 47814, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47808, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47808, 47816, 0, 32768, 40960, - 45056, 47104, 47616, 47872, 47808, 47816, 0, 32768, - 40960, 45056, 47104, 47616, 47872, 47808, 47816, 47818, - 0, 32768, 40960, 45056, 47104, 47616, 47872, 47808, - 47816, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47808, 47824, 47820, 0, 32768, 40960, 45056, 47104, - 47616, 47872, 47808, 47824, 47820, 0, 32768, 40960, - 45056, 47104, 47616, 47872, 47808, 47824, 47825, 47822, - 0, 32768, 40960, 45056, 47104, 47616, 47872, 47808, - 0, 32768, 40960, 45056, 47104, 47616, 47872, 47808, - 47824, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47808, 47824, 0, 32768, 40960, 45056, 47104, 47616, - 47872, 47808, 47824, 47826, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47808, 47824, 0, 32768, 40960, - 45056, 47104, 47616, 47872, 47808, 47824, 47828, 0, - 32768, 40960, 45056, 47104, 47616, 47872, 47808, 47824, - 47828, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47808, 47824, 47832, 47830, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47808, 47824, 0, 32768, 40960, - 45056, 47104, 47616, 47872, 47808, 47840, 47832, 0, - 32768, 40960, 45056, 47104, 47616, 47872, 47808, 47840, - 47832, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47808, 47840, 47832, 47834, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47808, 47840, 47832, 0, 32768, - 40960, 45056, 47104, 47616, 47872, 47808, 47840, 47841, - 47836, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47808, 47840, 47841, 47836, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47808, 47840, 47841, 47836, 47838, - 0, 32768, 40960, 45056, 47104, 47616, 47872, 47808, - 0, 32768, 40960, 45056, 47104, 47616, 47872, 47873, - 47840, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47873, 47840, 0, 32768, 40960, 45056, 47104, 47616, - 47872, 47873, 47840, 47842, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47873, 47840, 0, 32768, 40960, - 45056, 47104, 47616, 47872, 47873, 47840, 47844, 0, - 32768, 40960, 45056, 47104, 47616, 47872, 47873, 47840, - 47844, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47873, 47840, 47848, 47846, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47873, 47840, 0, 32768, 40960, - 45056, 47104, 47616, 47872, 47873, 47840, 47848, 0, - 32768, 40960, 45056, 47104, 47616, 47872, 47873, 47840, - 47848, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47873, 47840, 47848, 47850, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47873, 47840, 47848, 0, 32768, - 40960, 45056, 47104, 47616, 47872, 47873, 47840, 47856, - 47852, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47873, 47840, 47856, 47852, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47873, 47840, 47856, 47857, 47854, - 0, 32768, 40960, 45056, 47104, 47616, 47872, 47873, - 47840, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47873, 47840, 47856, 0, 32768, 40960, 45056, 47104, - 47616, 47872, 47873, 47875, 47856, 0, 32768, 40960, - 45056, 47104, 47616, 47872, 47873, 47875, 47856, 47858, - 0, 32768, 40960, 45056, 47104, 47616, 47872, 47873, - 47875, 47856, 0, 32768, 40960, 45056, 47104, 47616, - 47872, 47873, 47875, 47856, 47860, 0, 32768, 40960, - 45056, 47104, 47616, 47872, 47873, 47875, 47856, 47860, - 0, 32768, 40960, 45056, 47104, 47616, 47872, 47873, - 47875, 47856, 47864, 47862, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47873, 47875, 47856, 0, 32768, - 40960, 45056, 47104, 47616, 47872, 47873, 47875, 47856, - 47864, 0, 32768, 40960, 45056, 47104, 47616, 47872, - 47873, 47875, 47856, 47864, 0, 32768, 40960, 45056, - 47104, 47616, 47872, 47873, 47875, 47856, 47864, 47866, - 0, 32768, 40960, 45056, 47104, 47616, 47872, 47873, - 47875, 47879, 47864, 0, 32768, 40960, 45056, 47104, - 47616, 47872, 47873, 47875, 47879, 47864, 47868, 0, - 32768, 40960, 45056, 47104, 47616, 47872, 47873, 47875, - 47879, 47864, 47868, 0, 32768, 40960, 45056, 47104, - 47616, 47872, 47873, 47875, 47879, 47864, 47868, 47870, - 0, 32768, 40960, 45056, 47104, 47616, 0, 32768, - 40960, 45056, 47104, 48128, 47872, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47874, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 47876, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 47876, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 47880, 47878, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 47880, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 47880, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 47880, 47882, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47880, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47888, 47884, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 47888, 47884, 0, 32768, - 40960, 45056, 47104, 48128, 47872, 47888, 47889, 47886, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47888, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47888, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47888, 47890, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47888, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47888, - 47892, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47888, 47892, 0, 32768, 40960, 45056, 47104, 48128, - 47872, 47888, 47896, 47894, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47888, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47904, 47896, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 47904, 47896, 0, 32768, - 40960, 45056, 47104, 48128, 47872, 47904, 47896, 47898, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47904, - 47896, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47904, 47905, 47900, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 47904, 47905, 47900, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 47904, 47905, 47900, 47902, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47904, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47904, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47904, 47906, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47904, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47904, - 47908, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47904, 47908, 0, 32768, 40960, 45056, 47104, 48128, - 47872, 47904, 47912, 47910, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47904, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47904, 47912, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 47904, 47912, 0, 32768, - 40960, 45056, 47104, 48128, 47872, 47904, 47912, 47914, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47904, - 47912, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47904, 47920, 47916, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 47904, 47920, 47916, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 47904, 47920, 47921, 47918, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47904, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47936, - 47920, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47936, 47920, 0, 32768, 40960, 45056, 47104, 48128, - 47872, 47936, 47920, 47922, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47936, 47920, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 47936, 47920, 47924, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47936, 47920, - 47924, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47936, 47920, 47928, 47926, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47936, 47920, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 47936, 47937, 47928, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47936, 47937, - 47928, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47936, 47937, 47928, 47930, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47936, 47937, 47928, 0, 32768, - 40960, 45056, 47104, 48128, 47872, 47936, 47937, 47928, - 47932, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47936, 47937, 47939, 47932, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47936, 47937, 47939, 47932, 47934, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47936, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47936, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47936, 47938, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47936, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47936, - 47940, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47936, 47940, 0, 32768, 40960, 45056, 47104, 48128, - 47872, 47936, 47944, 47942, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47936, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47936, 47944, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 47936, 47944, 0, 32768, - 40960, 45056, 47104, 48128, 47872, 47936, 47944, 47946, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47936, - 47944, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47936, 47952, 47948, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 47936, 47952, 47948, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 47936, 47952, 47953, 47950, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47936, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47936, - 47952, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47936, 47952, 0, 32768, 40960, 45056, 47104, 48128, - 47872, 47936, 47952, 47954, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47936, 47952, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 47936, 47952, 47956, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47936, 47952, - 47956, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47936, 47952, 47960, 47958, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47936, 47952, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 47936, 47968, 47960, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 47936, 47968, - 47960, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47936, 47968, 47960, 47962, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47936, 47968, 47960, 0, 32768, - 40960, 45056, 47104, 48128, 47872, 47936, 47968, 47969, - 47964, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 47936, 47968, 47969, 47964, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 47936, 47968, 47969, 47964, 47966, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 47936, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 48000, - 47968, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 48000, 47968, 0, 32768, 40960, 45056, 47104, 48128, - 47872, 48000, 47968, 47970, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 48000, 47968, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 48000, 47968, 47972, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 48000, 47968, - 47972, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 48000, 47968, 47976, 47974, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 48000, 47968, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 48000, 47968, 47976, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 48000, 47968, - 47976, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 48000, 47968, 47976, 47978, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 48000, 47968, 47976, 0, 32768, - 40960, 45056, 47104, 48128, 47872, 48000, 47968, 47984, - 47980, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 48000, 47968, 47984, 47980, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 48000, 47968, 47984, 47985, 47982, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 48000, - 47968, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 48000, 48001, 47984, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 48000, 48001, 47984, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 48000, 48001, 47984, 47986, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 48000, - 48001, 47984, 0, 32768, 40960, 45056, 47104, 48128, - 47872, 48000, 48001, 47984, 47988, 0, 32768, 40960, - 45056, 47104, 48128, 47872, 48000, 48001, 47984, 47988, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 48000, - 48001, 47984, 47992, 47990, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 48000, 48001, 47984, 0, 32768, - 40960, 45056, 47104, 48128, 47872, 48000, 48001, 47984, - 47992, 0, 32768, 40960, 45056, 47104, 48128, 47872, - 48000, 48001, 48003, 47992, 0, 32768, 40960, 45056, - 47104, 48128, 47872, 48000, 48001, 48003, 47992, 47994, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 48000, - 48001, 48003, 47992, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 48000, 48001, 48003, 47992, 47996, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 48000, 48001, - 48003, 47992, 47996, 0, 32768, 40960, 45056, 47104, - 48128, 47872, 48000, 48001, 48003, 47992, 47996, 47998, - 0, 32768, 40960, 45056, 47104, 48128, 47872, 0, - 32768, 40960, 45056, 47104, 48128, 47872, 48000, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48000, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48000, 48002, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 48004, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48004, 0, 32768, 40960, 45056, 47104, 48128, - 48129, 48000, 48008, 48006, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 48008, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48000, 48008, 0, 32768, - 40960, 45056, 47104, 48128, 48129, 48000, 48008, 48010, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 48008, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48016, 48012, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48000, 48016, 48012, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48000, 48016, 48017, 48014, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 48016, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48016, 0, 32768, 40960, 45056, 47104, 48128, - 48129, 48000, 48016, 48018, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 48016, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48000, 48016, 48020, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48000, 48016, - 48020, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48016, 48024, 48022, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 48016, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48000, 48032, 48024, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48000, 48032, - 48024, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48032, 48024, 48026, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 48032, 48024, 0, 32768, - 40960, 45056, 47104, 48128, 48129, 48000, 48032, 48033, - 48028, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48032, 48033, 48028, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 48032, 48033, 48028, 48030, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 48032, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48032, 0, 32768, 40960, 45056, 47104, 48128, - 48129, 48000, 48032, 48034, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 48032, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48000, 48032, 48036, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48000, 48032, - 48036, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48032, 48040, 48038, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 48032, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48000, 48032, 48040, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48000, 48032, - 48040, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48032, 48040, 48042, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 48032, 48040, 0, 32768, - 40960, 45056, 47104, 48128, 48129, 48000, 48032, 48048, - 48044, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48032, 48048, 48044, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 48032, 48048, 48049, 48046, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 48032, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48064, 48048, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48000, 48064, 48048, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48000, 48064, 48048, 48050, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 48064, 48048, 0, 32768, 40960, 45056, 47104, 48128, - 48129, 48000, 48064, 48048, 48052, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48000, 48064, 48048, 48052, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 48064, 48048, 48056, 48054, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 48064, 48048, 0, 32768, - 40960, 45056, 47104, 48128, 48129, 48000, 48064, 48065, - 48056, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48064, 48065, 48056, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48000, 48064, 48065, 48056, 48058, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 48064, 48065, 48056, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48000, 48064, 48065, 48056, 48060, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48000, 48064, - 48065, 48067, 48060, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48000, 48064, 48065, 48067, 48060, 48062, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48000, - 48064, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48000, 48064, 0, 32768, 40960, 45056, 47104, 48128, - 48129, 48000, 48064, 48066, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48131, 48064, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48131, 48064, 48068, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48131, 48064, - 48068, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48131, 48064, 48072, 48070, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48131, 48064, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48131, 48064, 48072, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48131, 48064, - 48072, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48131, 48064, 48072, 48074, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48131, 48064, 48072, 0, 32768, - 40960, 45056, 47104, 48128, 48129, 48131, 48064, 48080, - 48076, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48131, 48064, 48080, 48076, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48131, 48064, 48080, 48081, 48078, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48131, - 48064, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48131, 48064, 48080, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48131, 48064, 48080, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48131, 48064, 48080, 48082, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48131, - 48064, 48080, 0, 32768, 40960, 45056, 47104, 48128, - 48129, 48131, 48064, 48080, 48084, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48131, 48064, 48080, 48084, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48131, - 48064, 48080, 48088, 48086, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48131, 48064, 48080, 0, 32768, - 40960, 45056, 47104, 48128, 48129, 48131, 48064, 48096, - 48088, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48131, 48064, 48096, 48088, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48131, 48064, 48096, 48088, 48090, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48131, - 48064, 48096, 48088, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48131, 48064, 48096, 48097, 48092, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48131, 48064, - 48096, 48097, 48092, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48131, 48064, 48096, 48097, 48092, 48094, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48131, - 48064, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48131, 48064, 48096, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48131, 48064, 48096, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48131, 48064, 48096, 48098, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48131, - 48064, 48096, 0, 32768, 40960, 45056, 47104, 48128, - 48129, 48131, 48064, 48096, 48100, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48131, 48064, 48096, 48100, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48131, - 48064, 48096, 48104, 48102, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48131, 48135, 48096, 0, 32768, - 40960, 45056, 47104, 48128, 48129, 48131, 48135, 48096, - 48104, 0, 32768, 40960, 45056, 47104, 48128, 48129, - 48131, 48135, 48096, 48104, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48131, 48135, 48096, 48104, 48106, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48131, - 48135, 48096, 48104, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48131, 48135, 48096, 48112, 48108, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48131, 48135, - 48096, 48112, 48108, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48131, 48135, 48096, 48112, 48113, 48110, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48131, - 48135, 48096, 0, 32768, 40960, 45056, 47104, 48128, - 48129, 48131, 48135, 48096, 48112, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48131, 48135, 48096, 48112, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48131, - 48135, 48096, 48112, 48114, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48131, 48135, 48096, 48112, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48131, 48135, - 48096, 48112, 48116, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48131, 48135, 48096, 48112, 48116, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48131, 48135, - 48096, 48112, 48120, 48118, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48131, 48135, 48096, 48112, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48131, 48135, - 48096, 48112, 48120, 0, 32768, 40960, 45056, 47104, - 48128, 48129, 48131, 48135, 48096, 48112, 48120, 0, - 32768, 40960, 45056, 47104, 48128, 48129, 48131, 48135, - 48096, 48112, 48120, 48122, 0, 32768, 40960, 45056, - 47104, 48128, 48129, 48131, 48135, 48096, 48112, 48120, - 0, 32768, 40960, 45056, 47104, 48128, 48129, 48131, - 48135, 48096, 48112, 48120, 48124, 0, 32768, 40960, - 45056, 47104, 48128, 48129, 48131, 48135, 48096, 48112, - 48120, 48124, 0, 32768, 40960, 45056, 47104, 48128, - 48129, 48131, 48135, 48096, 48112, 48120, 48124, 48126, - 0, 1, 40960, 45056, 47104, 0, 1, 40960, - 45056, 47104, 48128, 0, 1, 40960, 45056, 47104, - 48128, 0, 1, 40960, 45056, 47104, 48128, 48130, - 0, 1, 40960, 45056, 47104, 48128, 0, 1, - 49152, 45056, 47104, 48128, 48132, 0, 1, 49152, - 45056, 47104, 48128, 48132, 0, 1, 49152, 45056, - 47104, 48128, 48136, 48134, 0, 1, 49152, 45056, - 47104, 48128, 0, 1, 49152, 45056, 47104, 48128, - 48136, 0, 1, 49152, 45056, 47104, 48128, 48136, - 0, 1, 49152, 45056, 47104, 48128, 48136, 48138, - 0, 1, 49152, 45056, 47104, 48128, 48136, 0, - 1, 49152, 45056, 47104, 48128, 48144, 48140, 0, - 1, 49152, 45056, 47104, 48128, 48144, 48140, 0, - 1, 49152, 45056, 47104, 48128, 48144, 48145, 48142, - 0, 1, 49152, 45056, 47104, 48128, 0, 1, - 49152, 45056, 47104, 48128, 48144, 0, 1, 49152, - 45056, 47104, 48128, 48144, 0, 1, 49152, 45056, - 47104, 48128, 48144, 48146, 0, 1, 49152, 45056, - 47104, 48128, 48144, 0, 1, 49152, 45056, 47104, - 48128, 48144, 48148, 0, 1, 49152, 45056, 47104, - 48128, 48144, 48148, 0, 1, 49152, 45056, 47104, - 48128, 48144, 48152, 48150, 0, 1, 49152, 45056, - 47104, 48128, 48144, 0, 1, 49152, 45056, 47104, - 48128, 48160, 48152, 0, 1, 49152, 45056, 47104, - 48128, 48160, 48152, 0, 1, 49152, 45056, 47104, - 48128, 48160, 48152, 48154, 0, 1, 49152, 45056, - 47104, 48128, 48160, 48152, 0, 1, 49152, 45056, - 47104, 48128, 48160, 48161, 48156, 0, 1, 49152, - 45056, 47104, 48128, 48160, 48161, 48156, 0, 1, - 49152, 45056, 47104, 48128, 48160, 48161, 48156, 48158, - 0, 1, 49152, 45056, 47104, 48128, 0, 1, - 49152, 45056, 47104, 48128, 48160, 0, 1, 49152, - 45056, 47104, 48128, 48160, 0, 1, 49152, 45056, - 47104, 48128, 48160, 48162, 0, 1, 49152, 45056, - 47104, 48128, 48160, 0, 1, 49152, 45056, 47104, - 48128, 48160, 48164, 0, 1, 49152, 45056, 47104, - 48128, 48160, 48164, 0, 1, 49152, 45056, 47104, - 48128, 48160, 48168, 48166, 0, 1, 49152, 45056, - 47104, 48128, 48160, 0, 1, 49152, 45056, 47104, - 48128, 48160, 48168, 0, 1, 49152, 45056, 47104, - 48128, 48160, 48168, 0, 1, 49152, 45056, 47104, - 48128, 48160, 48168, 48170, 0, 1, 49152, 45056, - 47104, 48128, 48160, 48168, 0, 1, 49152, 45056, - 47104, 48128, 48160, 48176, 48172, 0, 1, 49152, - 45056, 47104, 48128, 48160, 48176, 48172, 0, 1, - 49152, 45056, 47104, 48128, 48160, 48176, 48177, 48174, - 0, 1, 49152, 45056, 47104, 48128, 48160, 0, - 1, 49152, 45056, 47104, 48128, 48192, 48176, 0, - 1, 49152, 45056, 47104, 48128, 48192, 48176, 0, - 1, 49152, 45056, 47104, 48128, 48192, 48176, 48178, - 0, 1, 49152, 45056, 47104, 48128, 48192, 48176, - 0, 1, 49152, 45056, 47104, 48128, 48192, 48176, - 48180, 0, 1, 49152, 45056, 47104, 48128, 48192, - 48176, 48180, 0, 1, 49152, 45056, 47104, 48128, - 48192, 48176, 48184, 48182, 0, 1, 49152, 45056, - 47104, 48128, 48192, 48176, 0, 1, 49152, 45056, - 47104, 48128, 48192, 48193, 48184, 0, 1, 49152, - 45056, 47104, 48128, 48192, 48193, 48184, 0, 1, - 49152, 45056, 47104, 48128, 48192, 48193, 48184, 48186, - 0, 1, 49152, 45056, 47104, 48128, 48192, 48193, - 48184, 0, 1, 49152, 45056, 47104, 48128, 48192, - 48193, 48184, 48188, 0, 1, 49152, 45056, 47104, - 48128, 48192, 48193, 48195, 48188, 0, 1, 49152, - 45056, 47104, 48128, 48192, 48193, 48195, 48188, 48190, - 0, 1, 49152, 45056, 47104, 48128, 0, 1, - 49152, 45056, 47104, 48128, 48192, 0, 1, 49152, - 49153, 47104, 48128, 48192, 0, 1, 49152, 49153, - 47104, 48128, 48192, 48194, 0, 1, 49152, 49153, - 47104, 48128, 48192, 0, 1, 49152, 49153, 47104, - 48128, 48192, 48196, 0, 1, 49152, 49153, 47104, - 48128, 48192, 48196, 0, 1, 49152, 49153, 47104, - 48128, 48192, 48200, 48198, 0, 1, 49152, 49153, - 47104, 48128, 48192, 0, 1, 49152, 49153, 47104, - 48128, 48192, 48200, 0, 1, 49152, 49153, 47104, - 48128, 48192, 48200, 0, 1, 49152, 49153, 47104, - 48128, 48192, 48200, 48202, 0, 1, 49152, 49153, - 47104, 48128, 48192, 48200, 0, 1, 49152, 49153, - 47104, 48128, 48192, 48208, 48204, 0, 1, 49152, - 49153, 47104, 48128, 48192, 48208, 48204, 0, 1, - 49152, 49153, 47104, 48128, 48192, 48208, 48209, 48206, - 0, 1, 49152, 49153, 47104, 48128, 48192, 0, - 1, 49152, 49153, 47104, 48128, 48192, 48208, 0, - 1, 49152, 49153, 47104, 48128, 48192, 48208, 0, - 1, 49152, 49153, 47104, 48128, 48192, 48208, 48210, - 0, 1, 49152, 49153, 47104, 48128, 48192, 48208, - 0, 1, 49152, 49153, 47104, 48128, 48192, 48208, - 48212, 0, 1, 49152, 49153, 47104, 48128, 48192, - 48208, 48212, 0, 1, 49152, 49153, 47104, 48128, - 48192, 48208, 48216, 48214, 0, 1, 49152, 49153, - 47104, 48128, 48192, 48208, 0, 1, 49152, 49153, - 47104, 48128, 48192, 48224, 48216, 0, 1, 49152, - 49153, 47104, 48128, 48192, 48224, 48216, 0, 1, - 49152, 49153, 47104, 48128, 48192, 48224, 48216, 48218, - 0, 1, 49152, 49153, 47104, 48128, 48192, 48224, - 48216, 0, 1, 49152, 49153, 47104, 48128, 48192, - 48224, 48225, 48220, 0, 1, 49152, 49153, 47104, - 48128, 48192, 48224, 48225, 48220, 0, 1, 49152, - 49153, 47104, 48128, 48192, 48224, 48225, 48220, 48222, - 0, 1, 49152, 49153, 47104, 48128, 48192, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48224, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48224, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48224, 48226, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48224, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48224, - 48228, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48224, 48228, 0, 1, 49152, 49153, 47104, 48128, - 48256, 48224, 48232, 48230, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48224, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48224, 48232, 0, 1, 49152, - 49153, 47104, 48128, 48256, 48224, 48232, 0, 1, - 49152, 49153, 47104, 48128, 48256, 48224, 48232, 48234, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48224, - 48232, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48224, 48240, 48236, 0, 1, 49152, 49153, 47104, - 48128, 48256, 48224, 48240, 48236, 0, 1, 49152, - 49153, 47104, 48128, 48256, 48224, 48240, 48241, 48238, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48224, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48257, - 48240, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48257, 48240, 0, 1, 49152, 49153, 47104, 48128, - 48256, 48257, 48240, 48242, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48257, 48240, 0, 1, 49152, - 49153, 47104, 48128, 48256, 48257, 48240, 48244, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48257, 48240, - 48244, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48257, 48240, 48248, 48246, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48257, 48240, 0, 1, 49152, - 49153, 47104, 48128, 48256, 48257, 48240, 48248, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48257, 48259, - 48248, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48257, 48259, 48248, 48250, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48257, 48259, 48248, 0, 1, - 49152, 49153, 47104, 48128, 48256, 48257, 48259, 48248, - 48252, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48257, 48259, 48248, 48252, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48257, 48259, 48248, 48252, 48254, - 0, 1, 49152, 49153, 47104, 48128, 0, 1, - 49152, 49153, 47104, 48128, 48256, 0, 1, 49152, - 49153, 47104, 48128, 48256, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48258, 0, 1, 49152, 49153, - 47104, 48128, 48256, 0, 1, 49152, 49153, 47104, - 48128, 48256, 48260, 0, 1, 49152, 49153, 47104, - 48128, 48256, 48260, 0, 1, 49152, 49153, 47104, - 48128, 48256, 48264, 48262, 0, 1, 49152, 49153, - 47104, 48128, 48256, 0, 1, 49152, 49153, 47104, - 48128, 48256, 48264, 0, 1, 49152, 49153, 47104, - 48128, 48256, 48264, 0, 1, 49152, 49153, 47104, - 48128, 48256, 48264, 48266, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48264, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48272, 48268, 0, 1, 49152, - 49153, 47104, 48128, 48256, 48272, 48268, 0, 1, - 49152, 49153, 47104, 48128, 48256, 48272, 48273, 48270, - 0, 1, 49152, 49153, 47104, 48128, 48256, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48272, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48272, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48272, 48274, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48272, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48272, - 48276, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48272, 48276, 0, 1, 49152, 49153, 47104, 48128, - 48256, 48272, 48280, 48278, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48272, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48288, 48280, 0, 1, 49152, - 49153, 47104, 48128, 48256, 48288, 48280, 0, 1, - 49152, 49153, 47104, 48128, 48256, 48288, 48280, 48282, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48288, - 48280, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48288, 48289, 48284, 0, 1, 49152, 49153, 47104, - 48128, 48256, 48288, 48289, 48284, 0, 1, 49152, - 49153, 47104, 48128, 48256, 48288, 48289, 48284, 48286, - 0, 1, 49152, 49153, 47104, 48128, 48256, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48288, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48288, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48288, 48290, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48288, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48288, - 48292, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48288, 48292, 0, 1, 49152, 49153, 47104, 48128, - 48256, 48288, 48296, 48294, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48288, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48288, 48296, 0, 1, 49152, - 49153, 47104, 48128, 48256, 48288, 48296, 0, 1, - 49152, 49153, 47104, 48128, 48256, 48288, 48296, 48298, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48288, - 48296, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48288, 48304, 48300, 0, 1, 49152, 49153, 47104, - 48128, 48256, 48288, 48304, 48300, 0, 1, 49152, - 49153, 47104, 48128, 48256, 48288, 48304, 48305, 48302, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48288, - 0, 1, 49152, 49153, 47104, 48128, 48256, 48320, - 48304, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48320, 48304, 0, 1, 49152, 49153, 47104, 48128, - 48256, 48320, 48304, 48306, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48320, 48304, 0, 1, 49152, - 49153, 47104, 48128, 48256, 48320, 48304, 48308, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48320, 48304, - 48308, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48320, 48304, 48312, 48310, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48320, 48304, 0, 1, 49152, - 49153, 47104, 48128, 48256, 48320, 48321, 48312, 0, - 1, 49152, 49153, 47104, 48128, 48256, 48320, 48321, - 48312, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48320, 48321, 48312, 48314, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48320, 48321, 48312, 0, 1, - 49152, 49153, 47104, 48128, 48256, 48320, 48321, 48312, - 48316, 0, 1, 49152, 49153, 47104, 48128, 48256, - 48320, 48321, 48323, 48316, 0, 1, 49152, 49153, - 47104, 48128, 48256, 48320, 48321, 48323, 48316, 48318, - 0, 1, 49152, 49153, 47104, 48128, 48256, 0, - 1, 49152, 49153, 47104, 48128, 48384, 48320, 0, - 1, 49152, 49153, 47104, 48128, 48384, 48320, 0, - 1, 49152, 49153, 47104, 48128, 48384, 48320, 48322, - 0, 1, 49152, 49153, 47104, 48128, 48384, 48320, - 0, 1, 49152, 49153, 47104, 48128, 48384, 48320, - 48324, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48320, 48324, 0, 1, 49152, 49153, 47104, 48128, - 48384, 48320, 48328, 48326, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48320, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48320, 48328, 0, 1, 49152, - 49153, 47104, 48128, 48384, 48320, 48328, 0, 1, - 49152, 49153, 47104, 48128, 48384, 48320, 48328, 48330, - 0, 1, 49152, 49153, 47104, 48128, 48384, 48320, - 48328, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48320, 48336, 48332, 0, 1, 49152, 49153, 47104, - 48128, 48384, 48320, 48336, 48332, 0, 1, 49152, - 49153, 47104, 48128, 48384, 48320, 48336, 48337, 48334, - 0, 1, 49152, 49153, 47104, 48128, 48384, 48320, - 0, 1, 49152, 49153, 47104, 48128, 48384, 48320, - 48336, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48320, 48336, 0, 1, 49152, 49153, 47104, 48128, - 48384, 48320, 48336, 48338, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48320, 48336, 0, 1, 49152, - 49153, 47104, 48128, 48384, 48320, 48336, 48340, 0, - 1, 49152, 49153, 47104, 48128, 48384, 48320, 48336, - 48340, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48320, 48336, 48344, 48342, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48320, 48336, 0, 1, 49152, - 49153, 47104, 48128, 48384, 48320, 48352, 48344, 0, - 1, 49152, 49153, 47104, 48128, 48384, 48320, 48352, - 48344, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48320, 48352, 48344, 48346, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48320, 48352, 48344, 0, 1, - 49152, 49153, 47104, 48128, 48384, 48320, 48352, 48353, - 48348, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48320, 48352, 48353, 48348, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48320, 48352, 48353, 48348, 48350, - 0, 1, 49152, 49153, 47104, 48128, 48384, 48320, - 0, 1, 49152, 49153, 47104, 48128, 48384, 48385, - 48352, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48385, 48352, 0, 1, 49152, 49153, 47104, 48128, - 48384, 48385, 48352, 48354, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48385, 48352, 0, 1, 49152, - 49153, 47104, 48128, 48384, 48385, 48352, 48356, 0, - 1, 49152, 49153, 47104, 48128, 48384, 48385, 48352, - 48356, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48385, 48352, 48360, 48358, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48385, 48352, 0, 1, 49152, - 49153, 47104, 48128, 48384, 48385, 48352, 48360, 0, - 1, 49152, 49153, 47104, 48128, 48384, 48385, 48352, - 48360, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48385, 48352, 48360, 48362, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48385, 48352, 48360, 0, 1, - 49152, 49153, 47104, 48128, 48384, 48385, 48352, 48368, - 48364, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48385, 48352, 48368, 48364, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48385, 48352, 48368, 48369, 48366, - 0, 1, 49152, 49153, 47104, 48128, 48384, 48385, - 48352, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48385, 48352, 48368, 0, 1, 49152, 49153, 47104, - 48128, 48384, 48385, 48387, 48368, 0, 1, 49152, - 49153, 47104, 48128, 48384, 48385, 48387, 48368, 48370, - 0, 1, 49152, 49153, 47104, 48128, 48384, 48385, - 48387, 48368, 0, 1, 49152, 49153, 47104, 48128, - 48384, 48385, 48387, 48368, 48372, 0, 1, 49152, - 49153, 47104, 48128, 48384, 48385, 48387, 48368, 48372, - 0, 1, 49152, 49153, 47104, 48128, 48384, 48385, - 48387, 48368, 48376, 48374, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48385, 48387, 48368, 0, 1, - 49152, 49153, 47104, 48128, 48384, 48385, 48387, 48368, - 48376, 0, 1, 49152, 49153, 47104, 48128, 48384, - 48385, 48387, 48368, 48376, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48385, 48387, 48368, 48376, 48378, - 0, 1, 49152, 49153, 47104, 48128, 48384, 48385, - 48387, 48391, 48376, 0, 1, 49152, 49153, 47104, - 48128, 48384, 48385, 48387, 48391, 48376, 48380, 0, - 1, 49152, 49153, 47104, 48128, 48384, 48385, 48387, - 48391, 48376, 48380, 0, 1, 49152, 49153, 47104, - 48128, 48384, 48385, 48387, 48391, 48376, 48380, 48382, - 0, 1, 49152, 49153, 47104, 48128, 0, 1, - 49152, 49153, 47104, 48128, 48384, 0, 1, 49152, - 49153, 47104, 48128, 48384, 0, 1, 49152, 49153, - 47104, 48128, 48384, 48386, 0, 1, 49152, 49153, - 49155, 48128, 48384, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48388, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48388, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48392, 48390, 0, 1, 49152, 49153, - 49155, 48128, 48384, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48392, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48392, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48392, 48394, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48392, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48400, 48396, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48400, 48396, 0, 1, - 49152, 49153, 49155, 48128, 48384, 48400, 48401, 48398, - 0, 1, 49152, 49153, 49155, 48128, 48384, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48400, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48400, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48400, 48402, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48400, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48400, - 48404, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48400, 48404, 0, 1, 49152, 49153, 49155, 48128, - 48384, 48400, 48408, 48406, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48400, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48416, 48408, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48416, 48408, 0, 1, - 49152, 49153, 49155, 48128, 48384, 48416, 48408, 48410, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48416, - 48408, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48416, 48417, 48412, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48416, 48417, 48412, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48416, 48417, 48412, 48414, - 0, 1, 49152, 49153, 49155, 48128, 48384, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48416, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48416, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48416, 48418, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48416, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48416, - 48420, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48416, 48420, 0, 1, 49152, 49153, 49155, 48128, - 48384, 48416, 48424, 48422, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48416, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48416, 48424, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48416, 48424, 0, 1, - 49152, 49153, 49155, 48128, 48384, 48416, 48424, 48426, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48416, - 48424, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48416, 48432, 48428, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48416, 48432, 48428, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48416, 48432, 48433, 48430, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48416, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48448, - 48432, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48448, 48432, 0, 1, 49152, 49153, 49155, 48128, - 48384, 48448, 48432, 48434, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48448, 48432, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48448, 48432, 48436, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48448, 48432, - 48436, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48448, 48432, 48440, 48438, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48448, 48432, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48448, 48449, 48440, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48448, 48449, - 48440, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48448, 48449, 48440, 48442, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48448, 48449, 48440, 0, 1, - 49152, 49153, 49155, 48128, 48384, 48448, 48449, 48440, - 48444, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48448, 48449, 48451, 48444, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48448, 48449, 48451, 48444, 48446, - 0, 1, 49152, 49153, 49155, 48128, 48384, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48448, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48448, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48448, 48450, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48448, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48448, - 48452, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48448, 48452, 0, 1, 49152, 49153, 49155, 48128, - 48384, 48448, 48456, 48454, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48448, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48448, 48456, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48448, 48456, 0, 1, - 49152, 49153, 49155, 48128, 48384, 48448, 48456, 48458, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48448, - 48456, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48448, 48464, 48460, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48448, 48464, 48460, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48448, 48464, 48465, 48462, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48448, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48448, - 48464, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48448, 48464, 0, 1, 49152, 49153, 49155, 48128, - 48384, 48448, 48464, 48466, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48448, 48464, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48448, 48464, 48468, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48448, 48464, - 48468, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48448, 48464, 48472, 48470, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48448, 48464, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48448, 48480, 48472, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48448, 48480, - 48472, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48448, 48480, 48472, 48474, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48448, 48480, 48472, 0, 1, - 49152, 49153, 49155, 48128, 48384, 48448, 48480, 48481, - 48476, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48448, 48480, 48481, 48476, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48448, 48480, 48481, 48476, 48478, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48448, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48512, - 48480, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48512, 48480, 0, 1, 49152, 49153, 49155, 48128, - 48384, 48512, 48480, 48482, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48512, 48480, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48512, 48480, 48484, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48512, 48480, - 48484, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48512, 48480, 48488, 48486, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48512, 48480, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48512, 48480, 48488, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48512, 48480, - 48488, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48512, 48480, 48488, 48490, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48512, 48480, 48488, 0, 1, - 49152, 49153, 49155, 48128, 48384, 48512, 48480, 48496, - 48492, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48512, 48480, 48496, 48492, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48512, 48480, 48496, 48497, 48494, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48512, - 48480, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48512, 48513, 48496, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48512, 48513, 48496, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48512, 48513, 48496, 48498, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48512, - 48513, 48496, 0, 1, 49152, 49153, 49155, 48128, - 48384, 48512, 48513, 48496, 48500, 0, 1, 49152, - 49153, 49155, 48128, 48384, 48512, 48513, 48496, 48500, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48512, - 48513, 48496, 48504, 48502, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48512, 48513, 48496, 0, 1, - 49152, 49153, 49155, 48128, 48384, 48512, 48513, 48496, - 48504, 0, 1, 49152, 49153, 49155, 48128, 48384, - 48512, 48513, 48515, 48504, 0, 1, 49152, 49153, - 49155, 48128, 48384, 48512, 48513, 48515, 48504, 48506, - 0, 1, 49152, 49153, 49155, 48128, 48384, 48512, - 48513, 48515, 48504, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48512, 48513, 48515, 48504, 48508, 0, - 1, 49152, 49153, 49155, 48128, 48384, 48512, 48513, - 48515, 48504, 48508, 0, 1, 49152, 49153, 49155, - 48128, 48384, 48512, 48513, 48515, 48504, 48508, 48510, - 0, 1, 49152, 49153, 49155, 48128, 48384, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48512, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48512, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48512, 48514, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 48516, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48516, 0, 1, 49152, 49153, 49155, 48128, - 48640, 48512, 48520, 48518, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 48520, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48512, 48520, 0, 1, - 49152, 49153, 49155, 48128, 48640, 48512, 48520, 48522, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 48520, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48528, 48524, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48512, 48528, 48524, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48512, 48528, 48529, 48526, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 48528, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48528, 0, 1, 49152, 49153, 49155, 48128, - 48640, 48512, 48528, 48530, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 48528, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48512, 48528, 48532, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48512, 48528, - 48532, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48528, 48536, 48534, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 48528, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48512, 48544, 48536, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48512, 48544, - 48536, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48544, 48536, 48538, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 48544, 48536, 0, 1, - 49152, 49153, 49155, 48128, 48640, 48512, 48544, 48545, - 48540, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48544, 48545, 48540, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 48544, 48545, 48540, 48542, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 48544, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48544, 0, 1, 49152, 49153, 49155, 48128, - 48640, 48512, 48544, 48546, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 48544, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48512, 48544, 48548, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48512, 48544, - 48548, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48544, 48552, 48550, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 48544, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48512, 48544, 48552, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48512, 48544, - 48552, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48544, 48552, 48554, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 48544, 48552, 0, 1, - 49152, 49153, 49155, 48128, 48640, 48512, 48544, 48560, - 48556, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48544, 48560, 48556, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 48544, 48560, 48561, 48558, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 48544, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48576, 48560, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48512, 48576, 48560, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48512, 48576, 48560, 48562, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 48576, 48560, 0, 1, 49152, 49153, 49155, 48128, - 48640, 48512, 48576, 48560, 48564, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48512, 48576, 48560, 48564, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 48576, 48560, 48568, 48566, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 48576, 48560, 0, 1, - 49152, 49153, 49155, 48128, 48640, 48512, 48576, 48577, - 48568, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48512, 48576, 48577, 48568, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48512, 48576, 48577, 48568, 48570, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 48576, 48577, 48568, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48512, 48576, 48577, 48568, 48572, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48512, 48576, - 48577, 48579, 48572, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48512, 48576, 48577, 48579, 48572, 48574, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48512, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48576, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48641, 48576, 0, 1, 49152, 49153, 49155, 48128, - 48640, 48641, 48576, 48578, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48641, 48576, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48641, 48576, 48580, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48641, 48576, - 48580, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48641, 48576, 48584, 48582, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48641, 48576, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48641, 48576, 48584, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48641, 48576, - 48584, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48641, 48576, 48584, 48586, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48641, 48576, 48584, 0, 1, - 49152, 49153, 49155, 48128, 48640, 48641, 48576, 48592, - 48588, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48641, 48576, 48592, 48588, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48641, 48576, 48592, 48593, 48590, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48576, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48641, 48576, 48592, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48641, 48576, 48592, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48641, 48576, 48592, 48594, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48576, 48592, 0, 1, 49152, 49153, 49155, 48128, - 48640, 48641, 48576, 48592, 48596, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48641, 48576, 48592, 48596, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48576, 48592, 48600, 48598, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48641, 48576, 48592, 0, 1, - 49152, 49153, 49155, 48128, 48640, 48641, 48576, 48608, - 48600, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48641, 48576, 48608, 48600, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48641, 48576, 48608, 48600, 48602, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48576, 48608, 48600, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48641, 48576, 48608, 48609, 48604, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48641, 48576, - 48608, 48609, 48604, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48641, 48576, 48608, 48609, 48604, 48606, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48576, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48641, 48576, 48608, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48641, 48643, 48608, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48641, 48643, 48608, 48610, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48643, 48608, 0, 1, 49152, 49153, 49155, 48128, - 48640, 48641, 48643, 48608, 48612, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48641, 48643, 48608, 48612, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48643, 48608, 48616, 48614, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48641, 48643, 48608, 0, 1, - 49152, 49153, 49155, 48128, 48640, 48641, 48643, 48608, - 48616, 0, 1, 49152, 49153, 49155, 48128, 48640, - 48641, 48643, 48608, 48616, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48641, 48643, 48608, 48616, 48618, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48643, 48608, 48616, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48641, 48643, 48608, 48624, 48620, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48641, 48643, - 48608, 48624, 48620, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48641, 48643, 48608, 48624, 48625, 48622, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48643, 48608, 0, 1, 49152, 49153, 49155, 48128, - 48640, 48641, 48643, 48608, 48624, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48641, 48643, 48608, 48624, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48643, 48608, 48624, 48626, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48641, 48643, 48647, 48624, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48641, 48643, - 48647, 48624, 48628, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48641, 48643, 48647, 48624, 48628, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48641, 48643, - 48647, 48624, 48632, 48630, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48641, 48643, 48647, 48624, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48641, 48643, - 48647, 48624, 48632, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48641, 48643, 48647, 48624, 48632, 0, - 1, 49152, 49153, 49155, 48128, 48640, 48641, 48643, - 48647, 48624, 48632, 48634, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48641, 48643, 48647, 48624, 48632, - 0, 1, 49152, 49153, 49155, 48128, 48640, 48641, - 48643, 48647, 48624, 48632, 48636, 0, 1, 49152, - 49153, 49155, 48128, 48640, 48641, 48643, 48647, 48624, - 48632, 48636, 0, 1, 49152, 49153, 49155, 48128, - 48640, 48641, 48643, 48647, 48624, 48632, 48636, 48638, - 0, 1, 49152, 49153, 49155, 48128, 0, 1, - 49152, 49153, 49155, 48128, 48640, 0, 1, 49152, - 49153, 49155, 48128, 48640, 0, 1, 49152, 49153, - 49155, 48128, 48640, 48642, 0, 1, 49152, 49153, - 49155, 48128, 48640, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48644, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48644, 0, 1, 49152, 49153, 49155, - 48128, 48640, 48648, 48646, 0, 1, 49152, 49153, - 49155, 49159, 48640, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48648, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48648, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48648, 48650, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48648, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48656, 48652, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48656, 48652, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48656, 48657, 48654, - 0, 1, 49152, 49153, 49155, 49159, 48640, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48656, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48656, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48656, 48658, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48656, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48656, - 48660, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48656, 48660, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48656, 48664, 48662, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48656, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48672, 48664, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48672, 48664, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48672, 48664, 48666, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48672, - 48664, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48672, 48673, 48668, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48672, 48673, 48668, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48672, 48673, 48668, 48670, - 0, 1, 49152, 49153, 49155, 49159, 48640, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48672, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48672, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48672, 48674, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48672, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48672, - 48676, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48672, 48676, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48672, 48680, 48678, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48672, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48672, 48680, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48672, 48680, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48672, 48680, 48682, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48672, - 48680, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48672, 48688, 48684, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48672, 48688, 48684, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48672, 48688, 48689, 48686, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48672, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48704, - 48688, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48704, 48688, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48704, 48688, 48690, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48704, 48688, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48704, 48688, 48692, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48704, 48688, - 48692, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48704, 48688, 48696, 48694, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48704, 48688, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48704, 48705, 48696, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48704, 48705, - 48696, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48704, 48705, 48696, 48698, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48704, 48705, 48696, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48704, 48705, 48696, - 48700, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48704, 48705, 48707, 48700, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48704, 48705, 48707, 48700, 48702, - 0, 1, 49152, 49153, 49155, 49159, 48640, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48704, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48704, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48704, 48706, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48704, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48704, - 48708, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48704, 48708, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48704, 48712, 48710, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48704, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48704, 48712, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48704, 48712, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48704, 48712, 48714, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48704, - 48712, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48704, 48720, 48716, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48704, 48720, 48716, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48704, 48720, 48721, 48718, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48704, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48704, - 48720, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48704, 48720, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48704, 48720, 48722, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48704, 48720, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48704, 48720, 48724, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48704, 48720, - 48724, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48704, 48720, 48728, 48726, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48704, 48720, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48704, 48736, 48728, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48704, 48736, - 48728, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48704, 48736, 48728, 48730, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48704, 48736, 48728, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48704, 48736, 48737, - 48732, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48704, 48736, 48737, 48732, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48704, 48736, 48737, 48732, 48734, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48704, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48736, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48736, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48768, 48736, 48738, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48736, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48736, 48740, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48768, 48736, - 48740, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48736, 48744, 48742, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48736, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48736, 48744, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48768, 48736, - 48744, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48736, 48744, 48746, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48736, 48744, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48768, 48736, 48752, - 48748, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48736, 48752, 48748, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48736, 48752, 48753, 48750, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48736, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48769, 48752, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48768, 48769, 48752, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48769, 48752, 48754, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48769, 48752, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48768, 48769, 48752, 48756, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48769, 48752, 48756, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48769, 48752, 48760, 48758, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48769, 48752, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48768, 48769, 48752, - 48760, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48769, 48771, 48760, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48769, 48771, 48760, 48762, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48769, 48771, 48760, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48768, 48769, 48771, 48760, 48764, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48768, 48769, - 48771, 48760, 48764, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48768, 48769, 48771, 48760, 48764, 48766, - 0, 1, 49152, 49153, 49155, 49159, 48640, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48768, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48768, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48768, 48770, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48772, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48772, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48768, 48776, 48774, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48776, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48776, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48768, 48776, 48778, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48776, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48784, 48780, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48768, 48784, 48780, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48784, 48785, 48782, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48784, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48784, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48768, 48784, 48786, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48784, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48784, 48788, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48768, 48784, - 48788, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48784, 48792, 48790, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48784, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48800, 48792, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48768, 48800, - 48792, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48800, 48792, 48794, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48800, 48792, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48768, 48800, 48801, - 48796, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48800, 48801, 48796, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48800, 48801, 48796, 48798, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48800, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48800, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48768, 48800, 48802, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48800, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48800, 48804, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48768, 48800, - 48804, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48800, 48808, 48806, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48800, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48800, 48808, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48768, 48800, - 48808, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48800, 48808, 48810, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48800, 48808, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48768, 48800, 48816, - 48812, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48800, 48816, 48812, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48800, 48816, 48817, 48814, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48800, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48832, 48816, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48768, 48832, 48816, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48832, 48816, 48818, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48832, 48816, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48768, 48832, 48816, 48820, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48768, 48832, 48816, 48820, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48832, 48816, 48824, 48822, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48832, 48816, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48768, 48832, 48833, - 48824, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48768, 48832, 48833, 48824, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48768, 48832, 48833, 48824, 48826, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 48832, 48833, 48824, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48768, 48832, 48833, 48824, 48828, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48768, 48832, - 48833, 48835, 48828, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48768, 48832, 48833, 48835, 48828, 48830, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48768, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48832, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48896, 48832, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48896, 48832, 48834, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48832, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48896, 48832, 48836, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48896, 48832, - 48836, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48896, 48832, 48840, 48838, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48832, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48896, 48832, 48840, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48896, 48832, - 48840, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48896, 48832, 48840, 48842, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48832, 48840, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48896, 48832, 48848, - 48844, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48896, 48832, 48848, 48844, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48832, 48848, 48849, 48846, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48832, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48896, 48832, 48848, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48896, 48832, 48848, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48896, 48832, 48848, 48850, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48832, 48848, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48896, 48832, 48848, 48852, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48896, 48832, 48848, 48852, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48832, 48848, 48856, 48854, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48832, 48848, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48896, 48832, 48864, - 48856, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48896, 48832, 48864, 48856, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48832, 48864, 48856, 48858, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48832, 48864, 48856, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48896, 48832, 48864, 48865, 48860, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48896, 48832, - 48864, 48865, 48860, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48896, 48832, 48864, 48865, 48860, 48862, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48832, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48896, 48897, 48864, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48896, 48897, 48864, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48896, 48897, 48864, 48866, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48897, 48864, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48896, 48897, 48864, 48868, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48896, 48897, 48864, 48868, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48897, 48864, 48872, 48870, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48897, 48864, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48896, 48897, 48864, - 48872, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48896, 48897, 48864, 48872, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48897, 48864, 48872, 48874, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48897, 48864, 48872, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48896, 48897, 48864, 48880, 48876, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48896, 48897, - 48864, 48880, 48876, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48896, 48897, 48864, 48880, 48881, 48878, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48897, 48864, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48896, 48897, 48864, 48880, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48896, 48897, 48899, 48880, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48897, 48899, 48880, 48882, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48897, 48899, 48880, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48896, 48897, - 48899, 48880, 48884, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48896, 48897, 48899, 48880, 48884, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48896, 48897, - 48899, 48880, 48888, 48886, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48897, 48899, 48880, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48896, 48897, - 48899, 48880, 48888, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48896, 48897, 48899, 48880, 48888, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48896, 48897, - 48899, 48880, 48888, 48890, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48897, 48899, 48903, 48888, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48897, 48899, 48903, 48888, 48892, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48896, 48897, 48899, 48903, - 48888, 48892, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48896, 48897, 48899, 48903, 48888, 48892, 48894, - 0, 1, 49152, 49153, 49155, 49159, 48640, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48896, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48896, 0, - 1, 49152, 49153, 49155, 49159, 48640, 48896, 48898, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48900, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48896, 48900, 0, 1, 49152, 49153, 49155, 49159, - 48640, 48896, 48904, 48902, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 0, 1, 49152, 49153, - 49155, 49159, 48640, 48896, 48904, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48896, 48904, 0, 1, - 49152, 49153, 49155, 49159, 48640, 48896, 48904, 48906, - 0, 1, 49152, 49153, 49155, 49159, 48640, 48896, - 48904, 0, 1, 49152, 49153, 49155, 49159, 48640, - 48896, 48912, 48908, 0, 1, 49152, 49153, 49155, - 49159, 48640, 48896, 48912, 48908, 0, 1, 49152, - 49153, 49155, 49159, 48640, 48896, 48912, 48913, 48910, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48912, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48912, 0, 1, 49152, 49153, 49155, 49159, - 49167, 48896, 48912, 48914, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48912, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 48912, 48916, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 48912, - 48916, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48912, 48920, 48918, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48912, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 48928, 48920, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 48928, - 48920, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48928, 48920, 48922, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48928, 48920, 0, 1, - 49152, 49153, 49155, 49159, 49167, 48896, 48928, 48929, - 48924, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48928, 48929, 48924, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48928, 48929, 48924, 48926, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48928, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48928, 0, 1, 49152, 49153, 49155, 49159, - 49167, 48896, 48928, 48930, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48928, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 48928, 48932, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 48928, - 48932, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48928, 48936, 48934, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48928, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 48928, 48936, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 48928, - 48936, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48928, 48936, 48938, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48928, 48936, 0, 1, - 49152, 49153, 49155, 49159, 49167, 48896, 48928, 48944, - 48940, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48928, 48944, 48940, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48928, 48944, 48945, 48942, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48928, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48960, 48944, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 48960, 48944, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 48960, 48944, 48946, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48960, 48944, 0, 1, 49152, 49153, 49155, 49159, - 49167, 48896, 48960, 48944, 48948, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 48960, 48944, 48948, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48960, 48944, 48952, 48950, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48960, 48944, 0, 1, - 49152, 49153, 49155, 49159, 49167, 48896, 48960, 48961, - 48952, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48960, 48961, 48952, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48960, 48961, 48952, 48954, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48960, 48961, 48952, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 48960, 48961, 48952, 48956, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 48960, - 48961, 48963, 48956, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 48960, 48961, 48963, 48956, 48958, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48960, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48960, 0, 1, 49152, 49153, 49155, 49159, - 49167, 48896, 48960, 48962, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48960, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 48960, 48964, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 48960, - 48964, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48960, 48968, 48966, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48960, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 48960, 48968, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 48960, - 48968, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48960, 48968, 48970, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48960, 48968, 0, 1, - 49152, 49153, 49155, 49159, 49167, 48896, 48960, 48976, - 48972, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48960, 48976, 48972, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48960, 48976, 48977, 48974, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48960, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48960, 48976, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 48960, 48976, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 48960, 48976, 48978, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48960, 48976, 0, 1, 49152, 49153, 49155, 49159, - 49167, 48896, 48960, 48976, 48980, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 48960, 48976, 48980, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48960, 48976, 48984, 48982, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48960, 48976, 0, 1, - 49152, 49153, 49155, 49159, 49167, 48896, 48960, 48992, - 48984, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 48960, 48992, 48984, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 48960, 48992, 48984, 48986, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48960, 48992, 48984, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 48960, 48992, 48993, 48988, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 48960, - 48992, 48993, 48988, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 48960, 48992, 48993, 48988, 48990, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 48960, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 49024, 48992, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 49024, 48992, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 49024, 48992, 48994, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 49024, 48992, 0, 1, 49152, 49153, 49155, 49159, - 49167, 48896, 49024, 48992, 48996, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 49024, 48992, 48996, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 49024, 48992, 49000, 48998, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 49024, 48992, 0, 1, - 49152, 49153, 49155, 49159, 49167, 48896, 49024, 48992, - 49000, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 49024, 48992, 49000, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 49024, 48992, 49000, 49002, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 49024, 48992, 49000, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 49024, 48992, 49008, 49004, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 49024, - 48992, 49008, 49004, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 49024, 48992, 49008, 49009, 49006, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 49024, 48992, 0, 1, 49152, 49153, 49155, 49159, - 49167, 48896, 49024, 49025, 49008, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 49024, 49025, 49008, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 49024, 49025, 49008, 49010, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 49024, 49025, 49008, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 49024, - 49025, 49008, 49012, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 49024, 49025, 49008, 49012, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 49024, - 49025, 49008, 49016, 49014, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 49024, 49025, 49008, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 49024, - 49025, 49008, 49016, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 49024, 49025, 49027, 49016, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 49024, - 49025, 49027, 49016, 49018, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 49024, 49025, 49027, 49016, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 49024, 49025, 49027, 49016, 49020, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 49024, 49025, 49027, - 49016, 49020, 0, 1, 49152, 49153, 49155, 49159, - 49167, 48896, 49024, 49025, 49027, 49016, 49020, 49022, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 49024, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 49024, 0, 1, 49152, 49153, 49155, 49159, - 49167, 48896, 49024, 49026, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 49024, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 49024, 49028, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 49024, - 49028, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 49024, 49032, 49030, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 49024, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 49024, 49032, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 49024, - 49032, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 49024, 49032, 49034, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 49024, 49032, 0, 1, - 49152, 49153, 49155, 49159, 49167, 48896, 49024, 49040, - 49036, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 49024, 49040, 49036, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 49024, 49040, 49041, 49038, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 49024, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 49024, 49040, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 49024, 49040, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 49024, 49040, 49042, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 49024, 49040, 0, 1, 49152, 49153, 49155, 49159, - 49167, 48896, 49024, 49040, 49044, 0, 1, 49152, - 49153, 49155, 49159, 49167, 48896, 49024, 49040, 49044, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 49024, 49040, 49048, 49046, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 49024, 49040, 0, 1, - 49152, 49153, 49155, 49159, 49167, 48896, 49024, 49056, - 49048, 0, 1, 49152, 49153, 49155, 49159, 49167, - 48896, 49024, 49056, 49048, 0, 1, 49152, 49153, - 49155, 49159, 49167, 48896, 49024, 49056, 49048, 49050, - 0, 1, 49152, 49153, 49155, 49159, 49167, 48896, - 49024, 49056, 49048, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 49024, 49056, 49057, 49052, 0, - 1, 49152, 49153, 49155, 49159, 49167, 48896, 49024, - 49056, 49057, 49052, 0, 1, 49152, 49153, 49155, - 49159, 49167, 48896, 49024, 49056, 49057, 49052, 49054, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 0, 1, 49152, 49153, 49155, 49159, 49167, - 49183, 49024, 49056, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49056, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49056, 49058, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49056, 0, 1, 49152, 49153, 49155, 49159, - 49167, 49183, 49024, 49056, 49060, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49056, 49060, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49056, 49064, 49062, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49056, 0, 1, - 49152, 49153, 49155, 49159, 49167, 49183, 49024, 49056, - 49064, 0, 1, 49152, 49153, 49155, 49159, 49167, - 49183, 49024, 49056, 49064, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49056, 49064, 49066, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49056, 49064, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49056, 49072, 49068, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49056, 49072, 49068, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49056, 49072, 49073, 49070, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49056, 0, 1, 49152, 49153, 49155, 49159, - 49167, 49183, 49024, 49088, 49072, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49088, 49072, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49072, 49074, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49072, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49072, 49076, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 49072, 49076, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49072, 49080, 49078, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49072, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49089, 49080, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 49089, 49080, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49089, 49080, 49082, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49089, 49080, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49089, 49080, 49084, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49088, 49089, - 49091, 49084, 0, 1, 49152, 49153, 49155, 49159, - 49167, 49183, 49024, 49088, 49089, 49091, 49084, 49086, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 0, 1, 49152, 49153, 49155, 49159, 49167, - 49183, 49024, 49088, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49088, 49090, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 0, 1, 49152, 49153, 49155, 49159, - 49167, 49183, 49024, 49088, 49092, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49088, 49092, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49096, 49094, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 0, 1, - 49152, 49153, 49155, 49159, 49167, 49183, 49024, 49088, - 49096, 0, 1, 49152, 49153, 49155, 49159, 49167, - 49183, 49024, 49088, 49096, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49096, 49098, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49096, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 49104, 49100, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49104, 49100, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 49104, 49105, 49102, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 0, 1, 49152, 49153, 49155, 49159, - 49167, 49183, 49024, 49088, 49104, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49088, 49104, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49104, 49106, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49104, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49104, 49108, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 49104, 49108, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49104, 49112, 49110, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49104, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49120, 49112, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 49120, 49112, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49120, 49112, 49114, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49120, 49112, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49120, 49121, 49116, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49088, 49120, - 49121, 49116, 0, 1, 49152, 49153, 49155, 49159, - 49167, 49183, 49024, 49088, 49120, 49121, 49116, 49118, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 0, 1, 49152, 49153, 49155, 49159, - 49167, 49183, 49024, 49088, 49120, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49088, 49120, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49120, 49122, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49120, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49120, 49124, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 49120, 49124, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49120, 49128, 49126, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49120, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49120, 49128, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 49120, 49128, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49120, 49128, 49130, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49120, 49128, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49120, 49136, 49132, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49088, 49120, - 49136, 49132, 0, 1, 49152, 49153, 49155, 49159, - 49167, 49183, 49024, 49088, 49120, 49136, 49137, 49134, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49120, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 49120, 49136, 0, - 1, 49152, 49153, 49155, 49159, 49167, 49183, 49024, - 49088, 49120, 49136, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 49120, 49136, 49138, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49120, 49136, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49120, 49136, - 49140, 0, 1, 49152, 49153, 49155, 49159, 49167, - 49183, 49024, 49088, 49120, 49136, 49140, 0, 1, - 49152, 49153, 49155, 49159, 49167, 49183, 49024, 49088, - 49120, 49136, 49144, 49142, 0, 1, 49152, 49153, - 49155, 49159, 49167, 49183, 49024, 49088, 49120, 49136, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49120, 49136, 49144, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49088, 49120, - 49136, 49144, 0, 1, 49152, 49153, 49155, 49159, - 49167, 49183, 49024, 49088, 49120, 49136, 49144, 49146, - 0, 1, 49152, 49153, 49155, 49159, 49167, 49183, - 49024, 49088, 49120, 49136, 49144, 0, 1, 49152, - 49153, 49155, 49159, 49167, 49183, 49024, 49088, 49120, - 49136, 49144, 49148, 0, 1, 49152, 49153, 49155, - 49159, 49167, 49183, 49024, 49088, 49120, 49136, 49144, - 49148, 0, 1, 49152, 49153, 49155, 49159, 49167, - 49183, 49024, 49088, 49120, 49136, 49144, 49148, 49150, - 0, 1, 0, 1, 49152, 0, 1, 49152, - 0, 1, 49152, 49154, 0, 1, 49152, 0, - 1, 49152, 49156, 0, 1, 49152, 49156, 0, - 1, 49152, 49160, 49158, 0, 1, 49152, 0, - 1, 49152, 49160, 0, 1, 49152, 49160, 0, - 1, 49152, 49160, 49162, 0, 1, 49152, 49160, - 0, 1, 49152, 49168, 49164, 0, 1, 49152, - 49168, 49164, 0, 1, 49152, 49168, 49169, 49166, - 0, 1, 49152, 0, 1, 49152, 49168, 0, - 1, 49152, 49168, 0, 1, 49152, 49168, 49170, - 0, 1, 49152, 49168, 0, 1, 49152, 49168, - 49172, 0, 1, 49152, 49168, 49172, 0, 1, - 49152, 49168, 49176, 49174, 0, 1, 49152, 49168, - 0, 1, 49152, 49184, 49176, 0, 1, 49152, - 49184, 49176, 0, 1, 49152, 49184, 49176, 49178, - 0, 1, 49152, 49184, 49176, 0, 1, 49152, - 49184, 49185, 49180, 0, 1, 49152, 49184, 49185, - 49180, 0, 1, 49152, 49184, 49185, 49180, 49182, - 0, 1, 49152, 0, 1, 49152, 49184, 0, - 1, 49152, 49184, 0, 1, 49152, 49184, 49186, - 0, 1, 49152, 49184, 0, 1, 49152, 49184, - 49188, 0, 1, 49152, 49184, 49188, 0, 1, - 49152, 49184, 49192, 49190, 0, 1, 49152, 49184, - 0, 1, 49152, 49184, 49192, 0, 1, 49152, - 49184, 49192, 0, 1, 49152, 49184, 49192, 49194, - 0, 1, 49152, 49184, 49192, 0, 1, 49152, - 49184, 49200, 49196, 0, 1, 49152, 49184, 49200, - 49196, 0, 1, 49152, 49184, 49200, 49201, 49198, - 0, 1, 49152, 49184, 0, 1, 49152, 49216, - 49200, 0, 1, 49152, 49216, 49200, 0, 1, - 49152, 49216, 49200, 49202, 0, 1, 49152, 49216, - 49200, 0, 1, 49152, 49216, 49200, 49204, 0, - 1, 49152, 49216, 49200, 49204, 0, 1, 49152, - 49216, 49200, 49208, 49206, 0, 1, 49152, 49216, - 49200, 0, 1, 49152, 49216, 49217, 49208, 0, - 1, 49152, 49216, 49217, 49208, 0, 1, 49152, - 49216, 49217, 49208, 49210, 0, 1, 49152, 49216, - 49217, 49208, 0, 1, 49152, 49216, 49217, 49208, - 49212, 0, 1, 49152, 49216, 49217, 49219, 49212, - 0, 1, 49152, 49216, 49217, 49219, 49212, 49214, - 0, 1, 49152, 0, 1, 49152, 49216, 0, - 1, 49152, 49216, 0, 1, 49152, 49216, 49218, - 0, 1, 49152, 49216, 0, 1, 49152, 49216, - 49220, 0, 1, 49152, 49216, 49220, 0, 1, - 49152, 49216, 49224, 49222, 0, 1, 49152, 49216, - 0, 1, 49152, 49216, 49224, 0, 1, 49152, - 49216, 49224, 0, 1, 49152, 49216, 49224, 49226, - 0, 1, 49152, 49216, 49224, 0, 1, 49152, - 49216, 49232, 49228, 0, 1, 49152, 49216, 49232, - 49228, 0, 1, 49152, 49216, 49232, 49233, 49230, - 0, 1, 49152, 49216, 0, 1, 49152, 49216, - 49232, 0, 1, 49152, 49216, 49232, 0, 1, - 49152, 49216, 49232, 49234, 0, 1, 49152, 49216, - 49232, 0, 1, 49152, 49216, 49232, 49236, 0, - 1, 49152, 49216, 49232, 49236, 0, 1, 49152, - 49216, 49232, 49240, 49238, 0, 1, 49152, 49216, - 49232, 0, 1, 49152, 49216, 49248, 49240, 0, - 1, 49152, 49216, 49248, 49240, 0, 1, 49152, - 49216, 49248, 49240, 49242, 0, 1, 49152, 49216, - 49248, 49240, 0, 1, 49152, 49216, 49248, 49249, - 49244, 0, 1, 49152, 49216, 49248, 49249, 49244, - 0, 1, 49152, 49216, 49248, 49249, 49244, 49246, - 0, 1, 49152, 49216, 0, 1, 49152, 49280, - 49248, 0, 1, 49152, 49280, 49248, 0, 1, - 49152, 49280, 49248, 49250, 0, 1, 49152, 49280, - 49248, 0, 1, 49152, 49280, 49248, 49252, 0, - 1, 49152, 49280, 49248, 49252, 0, 1, 49152, - 49280, 49248, 49256, 49254, 0, 1, 49152, 49280, - 49248, 0, 1, 49152, 49280, 49248, 49256, 0, - 1, 49152, 49280, 49248, 49256, 0, 1, 49152, - 49280, 49248, 49256, 49258, 0, 1, 49152, 49280, - 49248, 49256, 0, 1, 49152, 49280, 49248, 49264, - 49260, 0, 1, 49152, 49280, 49248, 49264, 49260, - 0, 1, 49152, 49280, 49248, 49264, 49265, 49262, - 0, 1, 49152, 49280, 49248, 0, 1, 49152, - 49280, 49281, 49264, 0, 1, 49152, 49280, 49281, - 49264, 0, 1, 49152, 49280, 49281, 49264, 49266, - 0, 1, 49152, 49280, 49281, 49264, 0, 1, - 49152, 49280, 49281, 49264, 49268, 0, 1, 49152, - 49280, 49281, 49264, 49268, 0, 1, 49152, 49280, - 49281, 49264, 49272, 49270, 0, 1, 49152, 49280, - 49281, 49264, 0, 1, 49152, 49280, 49281, 49264, - 49272, 0, 1, 49152, 49280, 49281, 49283, 49272, - 0, 1, 49152, 49280, 49281, 49283, 49272, 49274, - 0, 1, 49152, 49280, 49281, 49283, 49272, 0, - 1, 49152, 49280, 49281, 49283, 49272, 49276, 0, - 1, 49152, 49280, 49281, 49283, 49272, 49276, 0, - 1, 49152, 49280, 49281, 49283, 49272, 49276, 49278, - 0, 1, 49152, 0, 1, 49152, 49280, 0, - 1, 49152, 49280, 0, 1, 49152, 49280, 49282, - 0, 1, 49152, 49280, 0, 1, 49152, 49280, - 49284, 0, 1, 49152, 49280, 49284, 0, 1, - 49152, 49280, 49288, 49286, 0, 1, 49152, 49280, - 0, 1, 49152, 49280, 49288, 0, 1, 49152, - 49280, 49288, 0, 1, 49152, 49280, 49288, 49290, - 0, 1, 49152, 49280, 49288, 0, 1, 49152, - 49280, 49296, 49292, 0, 1, 49152, 49280, 49296, - 49292, 0, 1, 49152, 49280, 49296, 49297, 49294, - 0, 1, 49152, 49280, 0, 1, 49152, 49280, - 49296, 0, 1, 49152, 49280, 49296, 0, 1, - 49152, 49280, 49296, 49298, 0, 1, 49152, 49280, - 49296, 0, 1, 49152, 49280, 49296, 49300, 0, - 1, 49152, 49280, 49296, 49300, 0, 1, 49152, - 49280, 49296, 49304, 49302, 0, 1, 49152, 49280, - 49296, 0, 1, 49152, 49280, 49312, 49304, 0, - 1, 49152, 49280, 49312, 49304, 0, 1, 49152, - 49280, 49312, 49304, 49306, 0, 1, 49152, 49280, - 49312, 49304, 0, 1, 49152, 49280, 49312, 49313, - 49308, 0, 1, 49152, 49280, 49312, 49313, 49308, - 0, 1, 49152, 49280, 49312, 49313, 49308, 49310, - 0, 1, 49152, 49280, 0, 1, 49152, 49280, - 49312, 0, 1, 49152, 49280, 49312, 0, 1, - 49152, 49280, 49312, 49314, 0, 1, 49152, 49280, - 49312, 0, 1, 49152, 49280, 49312, 49316, 0, - 1, 49152, 49280, 49312, 49316, 0, 1, 49152, - 49280, 49312, 49320, 49318, 0, 1, 49152, 49280, - 49312, 0, 1, 49152, 49280, 49312, 49320, 0, - 1, 49152, 49280, 49312, 49320, 0, 1, 49152, - 49280, 49312, 49320, 49322, 0, 1, 49152, 49280, - 49312, 49320, 0, 1, 49152, 49280, 49312, 49328, - 49324, 0, 1, 49152, 49280, 49312, 49328, 49324, - 0, 1, 49152, 49280, 49312, 49328, 49329, 49326, - 0, 1, 49152, 49280, 49312, 0, 1, 49152, - 49280, 49344, 49328, 0, 1, 49152, 49280, 49344, - 49328, 0, 1, 49152, 49280, 49344, 49328, 49330, - 0, 1, 49152, 49280, 49344, 49328, 0, 1, - 49152, 49280, 49344, 49328, 49332, 0, 1, 49152, - 49280, 49344, 49328, 49332, 0, 1, 49152, 49280, - 49344, 49328, 49336, 49334, 0, 1, 49152, 49280, - 49344, 49328, 0, 1, 49152, 49280, 49344, 49345, - 49336, 0, 1, 49152, 49280, 49344, 49345, 49336, - 0, 1, 49152, 49280, 49344, 49345, 49336, 49338, - 0, 1, 49152, 49280, 49344, 49345, 49336, 0, - 1, 49152, 49280, 49344, 49345, 49336, 49340, 0, - 1, 49152, 49280, 49344, 49345, 49347, 49340, 0, - 1, 49152, 49280, 49344, 49345, 49347, 49340, 49342, - 0, 1, 49152, 49280, 0, 1, 49152, 49408, - 49344, 0, 1, 49152, 49408, 49344, 0, 1, - 49152, 49408, 49344, 49346, 0, 1, 49152, 49408, - 49344, 0, 1, 49152, 49408, 49344, 49348, 0, - 1, 49152, 49408, 49344, 49348, 0, 1, 49152, - 49408, 49344, 49352, 49350, 0, 1, 49152, 49408, - 49344, 0, 1, 49152, 49408, 49344, 49352, 0, - 1, 49152, 49408, 49344, 49352, 0, 1, 49152, - 49408, 49344, 49352, 49354, 0, 1, 49152, 49408, - 49344, 49352, 0, 1, 49152, 49408, 49344, 49360, - 49356, 0, 1, 49152, 49408, 49344, 49360, 49356, - 0, 1, 49152, 49408, 49344, 49360, 49361, 49358, - 0, 1, 49152, 49408, 49344, 0, 1, 49152, - 49408, 49344, 49360, 0, 1, 49152, 49408, 49344, - 49360, 0, 1, 49152, 49408, 49344, 49360, 49362, - 0, 1, 49152, 49408, 49344, 49360, 0, 1, - 49152, 49408, 49344, 49360, 49364, 0, 1, 49152, - 49408, 49344, 49360, 49364, 0, 1, 49152, 49408, - 49344, 49360, 49368, 49366, 0, 1, 49152, 49408, - 49344, 49360, 0, 1, 49152, 49408, 49344, 49376, - 49368, 0, 1, 49152, 49408, 49344, 49376, 49368, - 0, 1, 49152, 49408, 49344, 49376, 49368, 49370, - 0, 1, 49152, 49408, 49344, 49376, 49368, 0, - 1, 49152, 49408, 49344, 49376, 49377, 49372, 0, - 1, 49152, 49408, 49344, 49376, 49377, 49372, 0, - 1, 49152, 49408, 49344, 49376, 49377, 49372, 49374, - 0, 1, 49152, 49408, 49344, 0, 1, 49152, - 49408, 49409, 49376, 0, 1, 49152, 49408, 49409, - 49376, 0, 1, 49152, 49408, 49409, 49376, 49378, - 0, 1, 49152, 49408, 49409, 49376, 0, 1, - 49152, 49408, 49409, 49376, 49380, 0, 1, 49152, - 49408, 49409, 49376, 49380, 0, 1, 49152, 49408, - 49409, 49376, 49384, 49382, 0, 1, 49152, 49408, - 49409, 49376, 0, 1, 49152, 49408, 49409, 49376, - 49384, 0, 1, 49152, 49408, 49409, 49376, 49384, - 0, 1, 49152, 49408, 49409, 49376, 49384, 49386, - 0, 1, 49152, 49408, 49409, 49376, 49384, 0, - 1, 49152, 49408, 49409, 49376, 49392, 49388, 0, - 1, 49152, 49408, 49409, 49376, 49392, 49388, 0, - 1, 49152, 49408, 49409, 49376, 49392, 49393, 49390, - 0, 1, 49152, 49408, 49409, 49376, 0, 1, - 49152, 49408, 49409, 49376, 49392, 0, 1, 49152, - 49408, 49409, 49411, 49392, 0, 1, 49152, 49408, - 49409, 49411, 49392, 49394, 0, 1, 49152, 49408, - 49409, 49411, 49392, 0, 1, 49152, 49408, 49409, - 49411, 49392, 49396, 0, 1, 49152, 49408, 49409, - 49411, 49392, 49396, 0, 1, 49152, 49408, 49409, - 49411, 49392, 49400, 49398, 0, 1, 49152, 49408, - 49409, 49411, 49392, 0, 1, 49152, 49408, 49409, - 49411, 49392, 49400, 0, 1, 49152, 49408, 49409, - 49411, 49392, 49400, 0, 1, 49152, 49408, 49409, - 49411, 49392, 49400, 49402, 0, 1, 49152, 49408, - 49409, 49411, 49415, 49400, 0, 1, 49152, 49408, - 49409, 49411, 49415, 49400, 49404, 0, 1, 49152, - 49408, 49409, 49411, 49415, 49400, 49404, 0, 1, - 49152, 49408, 49409, 49411, 49415, 49400, 49404, 49406, - 0, 1, 49152, 0, 1, 49152, 49408, 0, - 1, 49152, 49408, 0, 1, 49152, 49408, 49410, - 0, 1, 49152, 49408, 0, 1, 49152, 49408, - 49412, 0, 1, 49152, 49408, 49412, 0, 1, - 49152, 49408, 49416, 49414, 0, 1, 49152, 49408, - 0, 1, 49152, 49408, 49416, 0, 1, 49152, - 49408, 49416, 0, 1, 49152, 49408, 49416, 49418, - 0, 1, 49152, 49408, 49416, 0, 1, 49152, - 49408, 49424, 49420, 0, 1, 49152, 49408, 49424, - 49420, 0, 1, 49152, 49408, 49424, 49425, 49422, - 0, 1, 49152, 49408, 0, 1, 49152, 49408, - 49424, 0, 1, 49152, 49408, 49424, 0, 1, - 49152, 49408, 49424, 49426, 0, 1, 49152, 49408, - 49424, 0, 1, 49152, 49408, 49424, 49428, 0, - 1, 49152, 49408, 49424, 49428, 0, 1, 49152, - 49408, 49424, 49432, 49430, 0, 1, 49152, 49408, - 49424, 0, 1, 49152, 49408, 49440, 49432, 0, - 1, 49152, 49408, 49440, 49432, 0, 1, 49152, - 49408, 49440, 49432, 49434, 0, 1, 49152, 49408, - 49440, 49432, 0, 1, 49152, 49408, 49440, 49441, - 49436, 0, 1, 49152, 49408, 49440, 49441, 49436, - 0, 1, 49152, 49408, 49440, 49441, 49436, 49438, - 0, 1, 49152, 49408, 0, 1, 49152, 49408, - 49440, 0, 1, 49152, 49408, 49440, 0, 1, - 49152, 49408, 49440, 49442, 0, 1, 49152, 49408, - 49440, 0, 1, 49152, 49408, 49440, 49444, 0, - 1, 49152, 49408, 49440, 49444, 0, 1, 49152, - 49408, 49440, 49448, 49446, 0, 1, 49152, 49408, - 49440, 0, 1, 49152, 49408, 49440, 49448, 0, - 1, 49152, 49408, 49440, 49448, 0, 1, 49152, - 49408, 49440, 49448, 49450, 0, 1, 49152, 49408, - 49440, 49448, 0, 1, 49152, 49408, 49440, 49456, - 49452, 0, 1, 49152, 49408, 49440, 49456, 49452, - 0, 1, 49152, 49408, 49440, 49456, 49457, 49454, - 0, 1, 49152, 49408, 49440, 0, 1, 49152, - 49408, 49472, 49456, 0, 1, 49152, 49408, 49472, - 49456, 0, 1, 49152, 49408, 49472, 49456, 49458, - 0, 1, 49152, 49408, 49472, 49456, 0, 1, - 49152, 49408, 49472, 49456, 49460, 0, 1, 49152, - 49408, 49472, 49456, 49460, 0, 1, 49152, 49408, - 49472, 49456, 49464, 49462, 0, 1, 49152, 49408, - 49472, 49456, 0, 1, 49152, 49408, 49472, 49473, - 49464, 0, 1, 49152, 49408, 49472, 49473, 49464, - 0, 1, 49152, 49408, 49472, 49473, 49464, 49466, - 0, 1, 49152, 49408, 49472, 49473, 49464, 0, - 1, 49152, 49408, 49472, 49473, 49464, 49468, 0, - 1, 49152, 49408, 49472, 49473, 49475, 49468, 0, - 1, 49152, 49408, 49472, 49473, 49475, 49468, 49470, - 0, 1, 49152, 49408, 0, 1, 49152, 49408, - 49472, 0, 1, 49152, 49408, 49472, 0, 1, - 49152, 49408, 49472, 49474, 0, 1, 49152, 49408, - 49472, 0, 1, 49152, 49408, 49472, 49476, 0, - 1, 49152, 49408, 49472, 49476, 0, 1, 49152, - 49408, 49472, 49480, 49478, 0, 1, 49152, 49408, - 49472, 0, 1, 49152, 49408, 49472, 49480, 0, - 1, 49152, 49408, 49472, 49480, 0, 1, 49152, - 49408, 49472, 49480, 49482, 0, 1, 49152, 49408, - 49472, 49480, 0, 1, 49152, 49408, 49472, 49488, - 49484, 0, 1, 49152, 49408, 49472, 49488, 49484, - 0, 1, 49152, 49408, 49472, 49488, 49489, 49486, - 0, 1, 49152, 49408, 49472, 0, 1, 49152, - 49408, 49472, 49488, 0, 1, 49152, 49408, 49472, - 49488, 0, 1, 49152, 49408, 49472, 49488, 49490, - 0, 1, 49152, 49408, 49472, 49488, 0, 1, - 49152, 49408, 49472, 49488, 49492, 0, 1, 49152, - 49408, 49472, 49488, 49492, 0, 1, 49152, 49408, - 49472, 49488, 49496, 49494, 0, 1, 49152, 49408, - 49472, 49488, 0, 1, 49152, 49408, 49472, 49504, - 49496, 0, 1, 49152, 49408, 49472, 49504, 49496, - 0, 1, 49152, 49408, 49472, 49504, 49496, 49498, - 0, 1, 49152, 49408, 49472, 49504, 49496, 0, - 1, 49152, 49408, 49472, 49504, 49505, 49500, 0, - 1, 49152, 49408, 49472, 49504, 49505, 49500, 0, - 1, 49152, 49408, 49472, 49504, 49505, 49500, 49502, - 0, 1, 49152, 49408, 49472, 0, 1, 49152, - 49408, 49536, 49504, 0, 1, 49152, 49408, 49536, - 49504, 0, 1, 49152, 49408, 49536, 49504, 49506, - 0, 1, 49152, 49408, 49536, 49504, 0, 1, - 49152, 49408, 49536, 49504, 49508, 0, 1, 49152, - 49408, 49536, 49504, 49508, 0, 1, 49152, 49408, - 49536, 49504, 49512, 49510, 0, 1, 49152, 49408, - 49536, 49504, 0, 1, 49152, 49408, 49536, 49504, - 49512, 0, 1, 49152, 49408, 49536, 49504, 49512, - 0, 1, 49152, 49408, 49536, 49504, 49512, 49514, - 0, 1, 49152, 49408, 49536, 49504, 49512, 0, - 1, 49152, 49408, 49536, 49504, 49520, 49516, 0, - 1, 49152, 49408, 49536, 49504, 49520, 49516, 0, - 1, 49152, 49408, 49536, 49504, 49520, 49521, 49518, - 0, 1, 49152, 49408, 49536, 49504, 0, 1, - 49152, 49408, 49536, 49537, 49520, 0, 1, 49152, - 49408, 49536, 49537, 49520, 0, 1, 49152, 49408, - 49536, 49537, 49520, 49522, 0, 1, 49152, 49408, - 49536, 49537, 49520, 0, 1, 49152, 49408, 49536, - 49537, 49520, 49524, 0, 1, 49152, 49408, 49536, - 49537, 49520, 49524, 0, 1, 49152, 49408, 49536, - 49537, 49520, 49528, 49526, 0, 1, 49152, 49408, - 49536, 49537, 49520, 0, 1, 49152, 49408, 49536, - 49537, 49520, 49528, 0, 1, 49152, 49408, 49536, - 49537, 49539, 49528, 0, 1, 49152, 49408, 49536, - 49537, 49539, 49528, 49530, 0, 1, 49152, 49408, - 49536, 49537, 49539, 49528, 0, 1, 49152, 49408, - 49536, 49537, 49539, 49528, 49532, 0, 1, 49152, - 49408, 49536, 49537, 49539, 49528, 49532, 0, 1, - 49152, 49408, 49536, 49537, 49539, 49528, 49532, 49534, - 0, 1, 49152, 49408, 0, 1, 49152, 49664, - 49536, 0, 1, 49152, 49664, 49536, 0, 1, - 49152, 49664, 49536, 49538, 0, 1, 49152, 49664, - 49536, 0, 1, 49152, 49664, 49536, 49540, 0, - 1, 49152, 49664, 49536, 49540, 0, 1, 49152, - 49664, 49536, 49544, 49542, 0, 1, 49152, 49664, - 49536, 0, 1, 49152, 49664, 49536, 49544, 0, - 1, 49152, 49664, 49536, 49544, 0, 1, 49152, - 49664, 49536, 49544, 49546, 0, 1, 49152, 49664, - 49536, 49544, 0, 1, 49152, 49664, 49536, 49552, - 49548, 0, 1, 49152, 49664, 49536, 49552, 49548, - 0, 1, 49152, 49664, 49536, 49552, 49553, 49550, - 0, 1, 49152, 49664, 49536, 0, 1, 49152, - 49664, 49536, 49552, 0, 1, 49152, 49664, 49536, - 49552, 0, 1, 49152, 49664, 49536, 49552, 49554, - 0, 1, 49152, 49664, 49536, 49552, 0, 1, - 49152, 49664, 49536, 49552, 49556, 0, 1, 49152, - 49664, 49536, 49552, 49556, 0, 1, 49152, 49664, - 49536, 49552, 49560, 49558, 0, 1, 49152, 49664, - 49536, 49552, 0, 1, 49152, 49664, 49536, 49568, - 49560, 0, 1, 49152, 49664, 49536, 49568, 49560, - 0, 1, 49152, 49664, 49536, 49568, 49560, 49562, - 0, 1, 49152, 49664, 49536, 49568, 49560, 0, - 1, 49152, 49664, 49536, 49568, 49569, 49564, 0, - 1, 49152, 49664, 49536, 49568, 49569, 49564, 0, - 1, 49152, 49664, 49536, 49568, 49569, 49564, 49566, - 0, 1, 49152, 49664, 49536, 0, 1, 49152, - 49664, 49536, 49568, 0, 1, 49152, 49664, 49536, - 49568, 0, 1, 49152, 49664, 49536, 49568, 49570, - 0, 1, 49152, 49664, 49536, 49568, 0, 1, - 49152, 49664, 49536, 49568, 49572, 0, 1, 49152, - 49664, 49536, 49568, 49572, 0, 1, 49152, 49664, - 49536, 49568, 49576, 49574, 0, 1, 49152, 49664, - 49536, 49568, 0, 1, 49152, 49664, 49536, 49568, - 49576, 0, 1, 49152, 49664, 49536, 49568, 49576, - 0, 1, 49152, 49664, 49536, 49568, 49576, 49578, - 0, 1, 49152, 49664, 49536, 49568, 49576, 0, - 1, 49152, 49664, 49536, 49568, 49584, 49580, 0, - 1, 49152, 49664, 49536, 49568, 49584, 49580, 0, - 1, 49152, 49664, 49536, 49568, 49584, 49585, 49582, - 0, 1, 49152, 49664, 49536, 49568, 0, 1, - 49152, 49664, 49536, 49600, 49584, 0, 1, 49152, - 49664, 49536, 49600, 49584, 0, 1, 49152, 49664, - 49536, 49600, 49584, 49586, 0, 1, 49152, 49664, - 49536, 49600, 49584, 0, 1, 49152, 49664, 49536, - 49600, 49584, 49588, 0, 1, 49152, 49664, 49536, - 49600, 49584, 49588, 0, 1, 49152, 49664, 49536, - 49600, 49584, 49592, 49590, 0, 1, 49152, 49664, - 49536, 49600, 49584, 0, 1, 49152, 49664, 49536, - 49600, 49601, 49592, 0, 1, 49152, 49664, 49536, - 49600, 49601, 49592, 0, 1, 49152, 49664, 49536, - 49600, 49601, 49592, 49594, 0, 1, 49152, 49664, - 49536, 49600, 49601, 49592, 0, 1, 49152, 49664, - 49536, 49600, 49601, 49592, 49596, 0, 1, 49152, - 49664, 49536, 49600, 49601, 49603, 49596, 0, 1, - 49152, 49664, 49536, 49600, 49601, 49603, 49596, 49598, - 0, 1, 49152, 49664, 49536, 0, 1, 49152, - 49664, 49665, 49600, 0, 1, 49152, 49664, 49665, - 49600, 0, 1, 49152, 49664, 49665, 49600, 49602, - 0, 1, 49152, 49664, 49665, 49600, 0, 1, - 49152, 49664, 49665, 49600, 49604, 0, 1, 49152, - 49664, 49665, 49600, 49604, 0, 1, 49152, 49664, - 49665, 49600, 49608, 49606, 0, 1, 49152, 49664, - 49665, 49600, 0, 1, 49152, 49664, 49665, 49600, - 49608, 0, 1, 49152, 49664, 49665, 49600, 49608, - 0, 1, 49152, 49664, 49665, 49600, 49608, 49610, - 0, 1, 49152, 49664, 49665, 49600, 49608, 0, - 1, 49152, 49664, 49665, 49600, 49616, 49612, 0, - 1, 49152, 49664, 49665, 49600, 49616, 49612, 0, - 1, 49152, 49664, 49665, 49600, 49616, 49617, 49614, - 0, 1, 49152, 49664, 49665, 49600, 0, 1, - 49152, 49664, 49665, 49600, 49616, 0, 1, 49152, - 49664, 49665, 49600, 49616, 0, 1, 49152, 49664, - 49665, 49600, 49616, 49618, 0, 1, 49152, 49664, - 49665, 49600, 49616, 0, 1, 49152, 49664, 49665, - 49600, 49616, 49620, 0, 1, 49152, 49664, 49665, - 49600, 49616, 49620, 0, 1, 49152, 49664, 49665, - 49600, 49616, 49624, 49622, 0, 1, 49152, 49664, - 49665, 49600, 49616, 0, 1, 49152, 49664, 49665, - 49600, 49632, 49624, 0, 1, 49152, 49664, 49665, - 49600, 49632, 49624, 0, 1, 49152, 49664, 49665, - 49600, 49632, 49624, 49626, 0, 1, 49152, 49664, - 49665, 49600, 49632, 49624, 0, 1, 49152, 49664, - 49665, 49600, 49632, 49633, 49628, 0, 1, 49152, - 49664, 49665, 49600, 49632, 49633, 49628, 0, 1, - 49152, 49664, 49665, 49600, 49632, 49633, 49628, 49630, - 0, 1, 49152, 49664, 49665, 49600, 0, 1, - 49152, 49664, 49665, 49600, 49632, 0, 1, 49152, - 49664, 49665, 49667, 49632, 0, 1, 49152, 49664, - 49665, 49667, 49632, 49634, 0, 1, 49152, 49664, - 49665, 49667, 49632, 0, 1, 49152, 49664, 49665, - 49667, 49632, 49636, 0, 1, 49152, 49664, 49665, - 49667, 49632, 49636, 0, 1, 49152, 49664, 49665, - 49667, 49632, 49640, 49638, 0, 1, 49152, 49664, - 49665, 49667, 49632, 0, 1, 49152, 49664, 49665, - 49667, 49632, 49640, 0, 1, 49152, 49664, 49665, - 49667, 49632, 49640, 0, 1, 49152, 49664, 49665, - 49667, 49632, 49640, 49642, 0, 1, 49152, 49664, - 49665, 49667, 49632, 49640, 0, 1, 49152, 49664, - 49665, 49667, 49632, 49648, 49644, 0, 1, 49152, - 49664, 49665, 49667, 49632, 49648, 49644, 0, 1, - 49152, 49664, 49665, 49667, 49632, 49648, 49649, 49646, - 0, 1, 49152, 49664, 49665, 49667, 49632, 0, - 1, 49152, 49664, 49665, 49667, 49632, 49648, 0, - 1, 49152, 49664, 49665, 49667, 49632, 49648, 0, - 1, 49152, 49664, 49665, 49667, 49632, 49648, 49650, - 0, 1, 49152, 49664, 49665, 49667, 49671, 49648, - 0, 1, 49152, 49664, 49665, 49667, 49671, 49648, - 49652, 0, 1, 49152, 49664, 49665, 49667, 49671, - 49648, 49652, 0, 1, 49152, 49664, 49665, 49667, - 49671, 49648, 49656, 49654, 0, 1, 49152, 49664, - 49665, 49667, 49671, 49648, 0, 1, 49152, 49664, - 49665, 49667, 49671, 49648, 49656, 0, 1, 49152, - 49664, 49665, 49667, 49671, 49648, 49656, 0, 1, - 49152, 49664, 49665, 49667, 49671, 49648, 49656, 49658, - 0, 1, 49152, 49664, 49665, 49667, 49671, 49648, - 49656, 0, 1, 49152, 49664, 49665, 49667, 49671, - 49648, 49656, 49660, 0, 1, 49152, 49664, 49665, - 49667, 49671, 49648, 49656, 49660, 0, 1, 49152, - 49664, 49665, 49667, 49671, 49648, 49656, 49660, 49662, - 0, 1, 49152, 0, 1, 49152, 49664, 0, - 1, 49152, 49664, 0, 1, 49152, 49664, 49666, - 0, 1, 49152, 49664, 0, 1, 49152, 49664, - 49668, 0, 1, 49152, 49664, 49668, 0, 1, - 49152, 49664, 49672, 49670, 0, 1, 49152, 49664, - 0, 1, 49152, 49664, 49672, 0, 1, 49152, - 49664, 49672, 0, 1, 49152, 49664, 49672, 49674, - 0, 1, 49152, 49664, 49672, 0, 1, 49152, - 49664, 49680, 49676, 0, 1, 49152, 49664, 49680, - 49676, 0, 1, 49152, 49664, 49680, 49681, 49678, - 0, 1, 49152, 49664, 0, 1, 49152, 49664, - 49680, 0, 1, 49152, 49664, 49680, 0, 1, - 49152, 49664, 49680, 49682, 0, 1, 49152, 49664, - 49680, 0, 1, 49152, 49664, 49680, 49684, 0, - 1, 49152, 49664, 49680, 49684, 0, 1, 49152, - 49664, 49680, 49688, 49686, 0, 1, 49152, 49664, - 49680, 0, 1, 49152, 49664, 49696, 49688, 0, - 1, 49152, 49664, 49696, 49688, 0, 1, 49152, - 49664, 49696, 49688, 49690, 0, 1, 49152, 49664, - 49696, 49688, 0, 1, 49152, 49664, 49696, 49697, - 49692, 0, 1, 49152, 49664, 49696, 49697, 49692, - 0, 1, 49152, 49664, 49696, 49697, 49692, 49694, - 0, 1, 49152, 49664, 0, 1, 49152, 49664, - 49696, 0, 1, 49152, 49664, 49696, 0, 1, - 49152, 49664, 49696, 49698, 0, 1, 49152, 49664, - 49696, 0, 1, 49152, 49664, 49696, 49700, 0, - 1, 49152, 49664, 49696, 49700, 0, 1, 49152, - 49664, 49696, 49704, 49702, 0, 1, 49152, 49664, - 49696, 0, 1, 49152, 49664, 49696, 49704, 0, - 1, 49152, 49664, 49696, 49704, 0, 1, 49152, - 49664, 49696, 49704, 49706, 0, 1, 49152, 49664, - 49696, 49704, 0, 1, 49152, 49664, 49696, 49712, - 49708, 0, 1, 49152, 49664, 49696, 49712, 49708, - 0, 1, 49152, 49664, 49696, 49712, 49713, 49710, - 0, 1, 49152, 49664, 49696, 0, 1, 49152, - 49664, 49728, 49712, 0, 1, 49152, 49664, 49728, - 49712, 0, 1, 49152, 49664, 49728, 49712, 49714, - 0, 1, 49152, 49664, 49728, 49712, 0, 1, - 49152, 49664, 49728, 49712, 49716, 0, 1, 49152, - 49664, 49728, 49712, 49716, 0, 1, 49152, 49664, - 49728, 49712, 49720, 49718, 0, 1, 49152, 49664, - 49728, 49712, 0, 1, 49152, 49664, 49728, 49729, - 49720, 0, 1, 49152, 49664, 49728, 49729, 49720, - 0, 1, 49152, 49664, 49728, 49729, 49720, 49722, - 0, 1, 49152, 49664, 49728, 49729, 49720, 0, - 1, 49152, 49664, 49728, 49729, 49720, 49724, 0, - 1, 49152, 49664, 49728, 49729, 49731, 49724, 0, - 1, 49152, 49664, 49728, 49729, 49731, 49724, 49726, - 0, 1, 49152, 49664, 0, 1, 49152, 49664, - 49728, 0, 1, 49152, 49664, 49728, 0, 1, - 49152, 49664, 49728, 49730, 0, 1, 49152, 49664, - 49728, 0, 1, 49152, 49664, 49728, 49732, 0, - 1, 49152, 49664, 49728, 49732, 0, 1, 49152, - 49664, 49728, 49736, 49734, 0, 1, 49152, 49664, - 49728, 0, 1, 49152, 49664, 49728, 49736, 0, - 1, 49152, 49664, 49728, 49736, 0, 1, 49152, - 49664, 49728, 49736, 49738, 0, 1, 49152, 49664, - 49728, 49736, 0, 1, 49152, 49664, 49728, 49744, - 49740, 0, 1, 49152, 49664, 49728, 49744, 49740, - 0, 1, 49152, 49664, 49728, 49744, 49745, 49742, - 0, 1, 49152, 49664, 49728, 0, 1, 49152, - 49664, 49728, 49744, 0, 1, 49152, 49664, 49728, - 49744, 0, 1, 49152, 49664, 49728, 49744, 49746, - 0, 1, 49152, 49664, 49728, 49744, 0, 1, - 49152, 49664, 49728, 49744, 49748, 0, 1, 49152, - 49664, 49728, 49744, 49748, 0, 1, 49152, 49664, - 49728, 49744, 49752, 49750, 0, 1, 49152, 49664, - 49728, 49744, 0, 1, 49152, 49664, 49728, 49760, - 49752, 0, 1, 49152, 49664, 49728, 49760, 49752, - 0, 1, 49152, 49664, 49728, 49760, 49752, 49754, - 0, 1, 49152, 49664, 49728, 49760, 49752, 0, - 1, 49152, 49664, 49728, 49760, 49761, 49756, 0, - 1, 49152, 49664, 49728, 49760, 49761, 49756, 0, - 1, 49152, 49664, 49728, 49760, 49761, 49756, 49758, - 0, 1, 49152, 49664, 49728, 0, 1, 49152, - 49664, 49792, 49760, 0, 1, 49152, 49664, 49792, - 49760, 0, 1, 49152, 49664, 49792, 49760, 49762, - 0, 1, 49152, 49664, 49792, 49760, 0, 1, - 49152, 49664, 49792, 49760, 49764, 0, 1, 49152, - 49664, 49792, 49760, 49764, 0, 1, 49152, 49664, - 49792, 49760, 49768, 49766, 0, 1, 49152, 49664, - 49792, 49760, 0, 1, 49152, 49664, 49792, 49760, - 49768, 0, 1, 49152, 49664, 49792, 49760, 49768, - 0, 1, 49152, 49664, 49792, 49760, 49768, 49770, - 0, 1, 49152, 49664, 49792, 49760, 49768, 0, - 1, 49152, 49664, 49792, 49760, 49776, 49772, 0, - 1, 49152, 49664, 49792, 49760, 49776, 49772, 0, - 1, 49152, 49664, 49792, 49760, 49776, 49777, 49774, - 0, 1, 49152, 49664, 49792, 49760, 0, 1, - 49152, 49664, 49792, 49793, 49776, 0, 1, 49152, - 49664, 49792, 49793, 49776, 0, 1, 49152, 49664, - 49792, 49793, 49776, 49778, 0, 1, 49152, 49664, - 49792, 49793, 49776, 0, 1, 49152, 49664, 49792, - 49793, 49776, 49780, 0, 1, 49152, 49664, 49792, - 49793, 49776, 49780, 0, 1, 49152, 49664, 49792, - 49793, 49776, 49784, 49782, 0, 1, 49152, 49664, - 49792, 49793, 49776, 0, 1, 49152, 49664, 49792, - 49793, 49776, 49784, 0, 1, 49152, 49664, 49792, - 49793, 49795, 49784, 0, 1, 49152, 49664, 49792, - 49793, 49795, 49784, 49786, 0, 1, 49152, 49664, - 49792, 49793, 49795, 49784, 0, 1, 49152, 49664, - 49792, 49793, 49795, 49784, 49788, 0, 1, 49152, - 49664, 49792, 49793, 49795, 49784, 49788, 0, 1, - 49152, 49664, 49792, 49793, 49795, 49784, 49788, 49790, - 0, 1, 49152, 49664, 0, 1, 49152, 49664, - 49792, 0, 1, 49152, 49664, 49792, 0, 1, - 49152, 49664, 49792, 49794, 0, 1, 49152, 49664, - 49792, 0, 1, 49152, 49664, 49792, 49796, 0, - 1, 49152, 49664, 49792, 49796, 0, 1, 49152, - 49664, 49792, 49800, 49798, 0, 1, 49152, 49664, - 49792, 0, 1, 49152, 49664, 49792, 49800, 0, - 1, 49152, 49664, 49792, 49800, 0, 1, 49152, - 49664, 49792, 49800, 49802, 0, 1, 49152, 49664, - 49792, 49800, 0, 1, 49152, 49664, 49792, 49808, - 49804, 0, 1, 49152, 49664, 49792, 49808, 49804, - 0, 1, 49152, 49664, 49792, 49808, 49809, 49806, - 0, 1, 49152, 49664, 49792, 0, 1, 49152, - 49664, 49792, 49808, 0, 1, 49152, 49664, 49792, - 49808, 0, 1, 49152, 49664, 49792, 49808, 49810, - 0, 1, 49152, 49664, 49792, 49808, 0, 1, - 49152, 49664, 49792, 49808, 49812, 0, 1, 49152, - 49664, 49792, 49808, 49812, 0, 1, 49152, 49664, - 49792, 49808, 49816, 49814, 0, 1, 49152, 49664, - 49792, 49808, 0, 1, 49152, 49664, 49792, 49824, - 49816, 0, 1, 49152, 49664, 49792, 49824, 49816, - 0, 1, 49152, 49664, 49792, 49824, 49816, 49818, - 0, 1, 49152, 49664, 49792, 49824, 49816, 0, - 1, 49152, 49664, 49792, 49824, 49825, 49820, 0, - 1, 49152, 49664, 49792, 49824, 49825, 49820, 0, - 1, 49152, 49664, 49792, 49824, 49825, 49820, 49822, - 0, 1, 49152, 49664, 49792, 0, 1, 49152, - 49664, 49792, 49824, 0, 1, 49152, 49664, 49792, - 49824, 0, 1, 49152, 49664, 49792, 49824, 49826, - 0, 1, 49152, 49664, 49792, 49824, 0, 1, - 49152, 49664, 49792, 49824, 49828, 0, 1, 49152, - 49664, 49792, 49824, 49828, 0, 1, 49152, 49664, - 49792, 49824, 49832, 49830, 0, 1, 49152, 49664, - 49792, 49824, 0, 1, 49152, 49664, 49792, 49824, - 49832, 0, 1, 49152, 49664, 49792, 49824, 49832, - 0, 1, 49152, 49664, 49792, 49824, 49832, 49834, - 0, 1, 49152, 49664, 49792, 49824, 49832, 0, - 1, 49152, 49664, 49792, 49824, 49840, 49836, 0, - 1, 49152, 49664, 49792, 49824, 49840, 49836, 0, - 1, 49152, 49664, 49792, 49824, 49840, 49841, 49838, - 0, 1, 49152, 49664, 49792, 49824, 0, 1, - 49152, 49664, 49792, 49856, 49840, 0, 1, 49152, - 49664, 49792, 49856, 49840, 0, 1, 49152, 49664, - 49792, 49856, 49840, 49842, 0, 1, 49152, 49664, - 49792, 49856, 49840, 0, 1, 49152, 49664, 49792, - 49856, 49840, 49844, 0, 1, 49152, 49664, 49792, - 49856, 49840, 49844, 0, 1, 49152, 49664, 49792, - 49856, 49840, 49848, 49846, 0, 1, 49152, 49664, - 49792, 49856, 49840, 0, 1, 49152, 49664, 49792, - 49856, 49857, 49848, 0, 1, 49152, 49664, 49792, - 49856, 49857, 49848, 0, 1, 49152, 49664, 49792, - 49856, 49857, 49848, 49850, 0, 1, 49152, 49664, - 49792, 49856, 49857, 49848, 0, 1, 49152, 49664, - 49792, 49856, 49857, 49848, 49852, 0, 1, 49152, - 49664, 49792, 49856, 49857, 49859, 49852, 0, 1, - 49152, 49664, 49792, 49856, 49857, 49859, 49852, 49854, - 0, 1, 49152, 49664, 49792, 0, 1, 49152, - 49664, 49920, 49856, 0, 1, 49152, 49664, 49920, - 49856, 0, 1, 49152, 49664, 49920, 49856, 49858, - 0, 1, 49152, 49664, 49920, 49856, 0, 1, - 49152, 49664, 49920, 49856, 49860, 0, 1, 49152, - 49664, 49920, 49856, 49860, 0, 1, 49152, 49664, - 49920, 49856, 49864, 49862, 0, 1, 49152, 49664, - 49920, 49856, 0, 1, 49152, 49664, 49920, 49856, - 49864, 0, 1, 49152, 49664, 49920, 49856, 49864, - 0, 1, 49152, 49664, 49920, 49856, 49864, 49866, - 0, 1, 49152, 49664, 49920, 49856, 49864, 0, - 1, 49152, 49664, 49920, 49856, 49872, 49868, 0, - 1, 49152, 49664, 49920, 49856, 49872, 49868, 0, - 1, 49152, 49664, 49920, 49856, 49872, 49873, 49870, - 0, 1, 49152, 49664, 49920, 49856, 0, 1, - 49152, 49664, 49920, 49856, 49872, 0, 1, 49152, - 49664, 49920, 49856, 49872, 0, 1, 49152, 49664, - 49920, 49856, 49872, 49874, 0, 1, 49152, 49664, - 49920, 49856, 49872, 0, 1, 49152, 49664, 49920, - 49856, 49872, 49876, 0, 1, 49152, 49664, 49920, - 49856, 49872, 49876, 0, 1, 49152, 49664, 49920, - 49856, 49872, 49880, 49878, 0, 1, 49152, 49664, - 49920, 49856, 49872, 0, 1, 49152, 49664, 49920, - 49856, 49888, 49880, 0, 1, 49152, 49664, 49920, - 49856, 49888, 49880, 0, 1, 49152, 49664, 49920, - 49856, 49888, 49880, 49882, 0, 1, 49152, 49664, - 49920, 49856, 49888, 49880, 0, 1, 49152, 49664, - 49920, 49856, 49888, 49889, 49884, 0, 1, 49152, - 49664, 49920, 49856, 49888, 49889, 49884, 0, 1, - 49152, 49664, 49920, 49856, 49888, 49889, 49884, 49886, - 0, 1, 49152, 49664, 49920, 49856, 0, 1, - 49152, 49664, 49920, 49921, 49888, 0, 1, 49152, - 49664, 49920, 49921, 49888, 0, 1, 49152, 49664, - 49920, 49921, 49888, 49890, 0, 1, 49152, 49664, - 49920, 49921, 49888, 0, 1, 49152, 49664, 49920, - 49921, 49888, 49892, 0, 1, 49152, 49664, 49920, - 49921, 49888, 49892, 0, 1, 49152, 49664, 49920, - 49921, 49888, 49896, 49894, 0, 1, 49152, 49664, - 49920, 49921, 49888, 0, 1, 49152, 49664, 49920, - 49921, 49888, 49896, 0, 1, 49152, 49664, 49920, - 49921, 49888, 49896, 0, 1, 49152, 49664, 49920, - 49921, 49888, 49896, 49898, 0, 1, 49152, 49664, - 49920, 49921, 49888, 49896, 0, 1, 49152, 49664, - 49920, 49921, 49888, 49904, 49900, 0, 1, 49152, - 49664, 49920, 49921, 49888, 49904, 49900, 0, 1, - 49152, 49664, 49920, 49921, 49888, 49904, 49905, 49902, - 0, 1, 49152, 49664, 49920, 49921, 49888, 0, - 1, 49152, 49664, 49920, 49921, 49888, 49904, 0, - 1, 49152, 49664, 49920, 49921, 49923, 49904, 0, - 1, 49152, 49664, 49920, 49921, 49923, 49904, 49906, - 0, 1, 49152, 49664, 49920, 49921, 49923, 49904, - 0, 1, 49152, 49664, 49920, 49921, 49923, 49904, - 49908, 0, 1, 49152, 49664, 49920, 49921, 49923, - 49904, 49908, 0, 1, 49152, 49664, 49920, 49921, - 49923, 49904, 49912, 49910, 0, 1, 49152, 49664, - 49920, 49921, 49923, 49904, 0, 1, 49152, 49664, - 49920, 49921, 49923, 49904, 49912, 0, 1, 49152, - 49664, 49920, 49921, 49923, 49904, 49912, 0, 1, - 49152, 49664, 49920, 49921, 49923, 49904, 49912, 49914, - 0, 1, 49152, 49664, 49920, 49921, 49923, 49927, - 49912, 0, 1, 49152, 49664, 49920, 49921, 49923, - 49927, 49912, 49916, 0, 1, 49152, 49664, 49920, - 49921, 49923, 49927, 49912, 49916, 0, 1, 49152, - 49664, 49920, 49921, 49923, 49927, 49912, 49916, 49918, - 0, 1, 49152, 49664, 0, 1, 49152, 50176, - 49920, 0, 1, 49152, 50176, 49920, 0, 1, - 49152, 50176, 49920, 49922, 0, 1, 49152, 50176, - 49920, 0, 1, 49152, 50176, 49920, 49924, 0, - 1, 49152, 50176, 49920, 49924, 0, 1, 49152, - 50176, 49920, 49928, 49926, 0, 1, 49152, 50176, - 49920, 0, 1, 49152, 50176, 49920, 49928, 0, - 1, 49152, 50176, 49920, 49928, 0, 1, 49152, - 50176, 49920, 49928, 49930, 0, 1, 49152, 50176, - 49920, 49928, 0, 1, 49152, 50176, 49920, 49936, - 49932, 0, 1, 49152, 50176, 49920, 49936, 49932, - 0, 1, 49152, 50176, 49920, 49936, 49937, 49934, - 0, 1, 49152, 50176, 49920, 0, 1, 49152, - 50176, 49920, 49936, 0, 1, 49152, 50176, 49920, - 49936, 0, 1, 49152, 50176, 49920, 49936, 49938, - 0, 1, 49152, 50176, 49920, 49936, 0, 1, - 49152, 50176, 49920, 49936, 49940, 0, 1, 49152, - 50176, 49920, 49936, 49940, 0, 1, 49152, 50176, - 49920, 49936, 49944, 49942, 0, 1, 49152, 50176, - 49920, 49936, 0, 1, 49152, 50176, 49920, 49952, - 49944, 0, 1, 49152, 50176, 49920, 49952, 49944, - 0, 1, 49152, 50176, 49920, 49952, 49944, 49946, - 0, 1, 49152, 50176, 49920, 49952, 49944, 0, - 1, 49152, 50176, 49920, 49952, 49953, 49948, 0, - 1, 49152, 50176, 49920, 49952, 49953, 49948, 0, - 1, 49152, 50176, 49920, 49952, 49953, 49948, 49950, - 0, 1, 49152, 50176, 49920, 0, 1, 49152, - 50176, 49920, 49952, 0, 1, 49152, 50176, 49920, - 49952, 0, 1, 49152, 50176, 49920, 49952, 49954, - 0, 1, 49152, 50176, 49920, 49952, 0, 1, - 49152, 50176, 49920, 49952, 49956, 0, 1, 49152, - 50176, 49920, 49952, 49956, 0, 1, 49152, 50176, - 49920, 49952, 49960, 49958, 0, 1, 49152, 50176, - 49920, 49952, 0, 1, 49152, 50176, 49920, 49952, - 49960, 0, 1, 49152, 50176, 49920, 49952, 49960, - 0, 1, 49152, 50176, 49920, 49952, 49960, 49962, - 0, 1, 49152, 50176, 49920, 49952, 49960, 0, - 1, 49152, 50176, 49920, 49952, 49968, 49964, 0, - 1, 49152, 50176, 49920, 49952, 49968, 49964, 0, - 1, 49152, 50176, 49920, 49952, 49968, 49969, 49966, - 0, 1, 49152, 50176, 49920, 49952, 0, 1, - 49152, 50176, 49920, 49984, 49968, 0, 1, 49152, - 50176, 49920, 49984, 49968, 0, 1, 49152, 50176, - 49920, 49984, 49968, 49970, 0, 1, 49152, 50176, - 49920, 49984, 49968, 0, 1, 49152, 50176, 49920, - 49984, 49968, 49972, 0, 1, 49152, 50176, 49920, - 49984, 49968, 49972, 0, 1, 49152, 50176, 49920, - 49984, 49968, 49976, 49974, 0, 1, 49152, 50176, - 49920, 49984, 49968, 0, 1, 49152, 50176, 49920, - 49984, 49985, 49976, 0, 1, 49152, 50176, 49920, - 49984, 49985, 49976, 0, 1, 49152, 50176, 49920, - 49984, 49985, 49976, 49978, 0, 1, 49152, 50176, - 49920, 49984, 49985, 49976, 0, 1, 49152, 50176, - 49920, 49984, 49985, 49976, 49980, 0, 1, 49152, - 50176, 49920, 49984, 49985, 49987, 49980, 0, 1, - 49152, 50176, 49920, 49984, 49985, 49987, 49980, 49982, - 0, 1, 49152, 50176, 49920, 0, 1, 49152, - 50176, 49920, 49984, 0, 1, 49152, 50176, 49920, - 49984, 0, 1, 49152, 50176, 49920, 49984, 49986, - 0, 1, 49152, 50176, 49920, 49984, 0, 1, - 49152, 50176, 49920, 49984, 49988, 0, 1, 49152, - 50176, 49920, 49984, 49988, 0, 1, 49152, 50176, - 49920, 49984, 49992, 49990, 0, 1, 49152, 50176, - 49920, 49984, 0, 1, 49152, 50176, 49920, 49984, - 49992, 0, 1, 49152, 50176, 49920, 49984, 49992, - 0, 1, 49152, 50176, 49920, 49984, 49992, 49994, - 0, 1, 49152, 50176, 49920, 49984, 49992, 0, - 1, 49152, 50176, 49920, 49984, 50000, 49996, 0, - 1, 49152, 50176, 49920, 49984, 50000, 49996, 0, - 1, 49152, 50176, 49920, 49984, 50000, 50001, 49998, - 0, 1, 49152, 50176, 49920, 49984, 0, 1, - 49152, 50176, 49920, 49984, 50000, 0, 1, 49152, - 50176, 49920, 49984, 50000, 0, 1, 49152, 50176, - 49920, 49984, 50000, 50002, 0, 1, 49152, 50176, - 49920, 49984, 50000, 0, 1, 49152, 50176, 49920, - 49984, 50000, 50004, 0, 1, 49152, 50176, 49920, - 49984, 50000, 50004, 0, 1, 49152, 50176, 49920, - 49984, 50000, 50008, 50006, 0, 1, 49152, 50176, - 49920, 49984, 50000, 0, 1, 49152, 50176, 49920, - 49984, 50016, 50008, 0, 1, 49152, 50176, 49920, - 49984, 50016, 50008, 0, 1, 49152, 50176, 49920, - 49984, 50016, 50008, 50010, 0, 1, 49152, 50176, - 49920, 49984, 50016, 50008, 0, 1, 49152, 50176, - 49920, 49984, 50016, 50017, 50012, 0, 1, 49152, - 50176, 49920, 49984, 50016, 50017, 50012, 0, 1, - 49152, 50176, 49920, 49984, 50016, 50017, 50012, 50014, - 0, 1, 49152, 50176, 49920, 49984, 0, 1, - 49152, 50176, 49920, 50048, 50016, 0, 1, 49152, - 50176, 49920, 50048, 50016, 0, 1, 49152, 50176, - 49920, 50048, 50016, 50018, 0, 1, 49152, 50176, - 49920, 50048, 50016, 0, 1, 49152, 50176, 49920, - 50048, 50016, 50020, 0, 1, 49152, 50176, 49920, - 50048, 50016, 50020, 0, 1, 49152, 50176, 49920, - 50048, 50016, 50024, 50022, 0, 1, 49152, 50176, - 49920, 50048, 50016, 0, 1, 49152, 50176, 49920, - 50048, 50016, 50024, 0, 1, 49152, 50176, 49920, - 50048, 50016, 50024, 0, 1, 49152, 50176, 49920, - 50048, 50016, 50024, 50026, 0, 1, 49152, 50176, - 49920, 50048, 50016, 50024, 0, 1, 49152, 50176, - 49920, 50048, 50016, 50032, 50028, 0, 1, 49152, - 50176, 49920, 50048, 50016, 50032, 50028, 0, 1, - 49152, 50176, 49920, 50048, 50016, 50032, 50033, 50030, - 0, 1, 49152, 50176, 49920, 50048, 50016, 0, - 1, 49152, 50176, 49920, 50048, 50049, 50032, 0, - 1, 49152, 50176, 49920, 50048, 50049, 50032, 0, - 1, 49152, 50176, 49920, 50048, 50049, 50032, 50034, - 0, 1, 49152, 50176, 49920, 50048, 50049, 50032, - 0, 1, 49152, 50176, 49920, 50048, 50049, 50032, - 50036, 0, 1, 49152, 50176, 49920, 50048, 50049, - 50032, 50036, 0, 1, 49152, 50176, 49920, 50048, - 50049, 50032, 50040, 50038, 0, 1, 49152, 50176, - 49920, 50048, 50049, 50032, 0, 1, 49152, 50176, - 49920, 50048, 50049, 50032, 50040, 0, 1, 49152, - 50176, 49920, 50048, 50049, 50051, 50040, 0, 1, - 49152, 50176, 49920, 50048, 50049, 50051, 50040, 50042, - 0, 1, 49152, 50176, 49920, 50048, 50049, 50051, - 50040, 0, 1, 49152, 50176, 49920, 50048, 50049, - 50051, 50040, 50044, 0, 1, 49152, 50176, 49920, - 50048, 50049, 50051, 50040, 50044, 0, 1, 49152, - 50176, 49920, 50048, 50049, 50051, 50040, 50044, 50046, - 0, 1, 49152, 50176, 49920, 0, 1, 49152, - 50176, 49920, 50048, 0, 1, 49152, 50176, 50177, - 50048, 0, 1, 49152, 50176, 50177, 50048, 50050, - 0, 1, 49152, 50176, 50177, 50048, 0, 1, - 49152, 50176, 50177, 50048, 50052, 0, 1, 49152, - 50176, 50177, 50048, 50052, 0, 1, 49152, 50176, - 50177, 50048, 50056, 50054, 0, 1, 49152, 50176, - 50177, 50048, 0, 1, 49152, 50176, 50177, 50048, - 50056, 0, 1, 49152, 50176, 50177, 50048, 50056, - 0, 1, 49152, 50176, 50177, 50048, 50056, 50058, - 0, 1, 49152, 50176, 50177, 50048, 50056, 0, - 1, 49152, 50176, 50177, 50048, 50064, 50060, 0, - 1, 49152, 50176, 50177, 50048, 50064, 50060, 0, - 1, 49152, 50176, 50177, 50048, 50064, 50065, 50062, - 0, 1, 49152, 50176, 50177, 50048, 0, 1, - 49152, 50176, 50177, 50048, 50064, 0, 1, 49152, - 50176, 50177, 50048, 50064, 0, 1, 49152, 50176, - 50177, 50048, 50064, 50066, 0, 1, 49152, 50176, - 50177, 50048, 50064, 0, 1, 49152, 50176, 50177, - 50048, 50064, 50068, 0, 1, 49152, 50176, 50177, - 50048, 50064, 50068, 0, 1, 49152, 50176, 50177, - 50048, 50064, 50072, 50070, 0, 1, 49152, 50176, - 50177, 50048, 50064, 0, 1, 49152, 50176, 50177, - 50048, 50080, 50072, 0, 1, 49152, 50176, 50177, - 50048, 50080, 50072, 0, 1, 49152, 50176, 50177, - 50048, 50080, 50072, 50074, 0, 1, 49152, 50176, - 50177, 50048, 50080, 50072, 0, 1, 49152, 50176, - 50177, 50048, 50080, 50081, 50076, 0, 1, 49152, - 50176, 50177, 50048, 50080, 50081, 50076, 0, 1, - 49152, 50176, 50177, 50048, 50080, 50081, 50076, 50078, - 0, 1, 49152, 50176, 50177, 50048, 0, 1, - 49152, 50176, 50177, 50048, 50080, 0, 1, 49152, - 50176, 50177, 50048, 50080, 0, 1, 49152, 50176, - 50177, 50048, 50080, 50082, 0, 1, 49152, 50176, - 50177, 50048, 50080, 0, 1, 49152, 50176, 50177, - 50048, 50080, 50084, 0, 1, 49152, 50176, 50177, - 50048, 50080, 50084, 0, 1, 49152, 50176, 50177, - 50048, 50080, 50088, 50086, 0, 1, 49152, 50176, - 50177, 50048, 50080, 0, 1, 49152, 50176, 50177, - 50048, 50080, 50088, 0, 1, 49152, 50176, 50177, - 50048, 50080, 50088, 0, 1, 49152, 50176, 50177, - 50048, 50080, 50088, 50090, 0, 1, 49152, 50176, - 50177, 50048, 50080, 50088, 0, 1, 49152, 50176, - 50177, 50048, 50080, 50096, 50092, 0, 1, 49152, - 50176, 50177, 50048, 50080, 50096, 50092, 0, 1, - 49152, 50176, 50177, 50048, 50080, 50096, 50097, 50094, - 0, 1, 49152, 50176, 50177, 50048, 50080, 0, - 1, 49152, 50176, 50177, 50048, 50112, 50096, 0, - 1, 49152, 50176, 50177, 50048, 50112, 50096, 0, - 1, 49152, 50176, 50177, 50048, 50112, 50096, 50098, - 0, 1, 49152, 50176, 50177, 50048, 50112, 50096, - 0, 1, 49152, 50176, 50177, 50048, 50112, 50096, - 50100, 0, 1, 49152, 50176, 50177, 50048, 50112, - 50096, 50100, 0, 1, 49152, 50176, 50177, 50048, - 50112, 50096, 50104, 50102, 0, 1, 49152, 50176, - 50177, 50048, 50112, 50096, 0, 1, 49152, 50176, - 50177, 50048, 50112, 50113, 50104, 0, 1, 49152, - 50176, 50177, 50048, 50112, 50113, 50104, 0, 1, - 49152, 50176, 50177, 50048, 50112, 50113, 50104, 50106, - 0, 1, 49152, 50176, 50177, 50048, 50112, 50113, - 50104, 0, 1, 49152, 50176, 50177, 50048, 50112, - 50113, 50104, 50108, 0, 1, 49152, 50176, 50177, - 50048, 50112, 50113, 50115, 50108, 0, 1, 49152, - 50176, 50177, 50048, 50112, 50113, 50115, 50108, 50110, - 0, 1, 49152, 50176, 50177, 50048, 0, 1, - 49152, 50176, 50177, 50048, 50112, 0, 1, 49152, - 50176, 50177, 50048, 50112, 0, 1, 49152, 50176, - 50177, 50048, 50112, 50114, 0, 1, 49152, 50176, - 50177, 50179, 50112, 0, 1, 49152, 50176, 50177, - 50179, 50112, 50116, 0, 1, 49152, 50176, 50177, - 50179, 50112, 50116, 0, 1, 49152, 50176, 50177, - 50179, 50112, 50120, 50118, 0, 1, 49152, 50176, - 50177, 50179, 50112, 0, 1, 49152, 50176, 50177, - 50179, 50112, 50120, 0, 1, 49152, 50176, 50177, - 50179, 50112, 50120, 0, 1, 49152, 50176, 50177, - 50179, 50112, 50120, 50122, 0, 1, 49152, 50176, - 50177, 50179, 50112, 50120, 0, 1, 49152, 50176, - 50177, 50179, 50112, 50128, 50124, 0, 1, 49152, - 50176, 50177, 50179, 50112, 50128, 50124, 0, 1, - 49152, 50176, 50177, 50179, 50112, 50128, 50129, 50126, - 0, 1, 49152, 50176, 50177, 50179, 50112, 0, - 1, 49152, 50176, 50177, 50179, 50112, 50128, 0, - 1, 49152, 50176, 50177, 50179, 50112, 50128, 0, - 1, 49152, 50176, 50177, 50179, 50112, 50128, 50130, - 0, 1, 49152, 50176, 50177, 50179, 50112, 50128, - 0, 1, 49152, 50176, 50177, 50179, 50112, 50128, - 50132, 0, 1, 49152, 50176, 50177, 50179, 50112, - 50128, 50132, 0, 1, 49152, 50176, 50177, 50179, - 50112, 50128, 50136, 50134, 0, 1, 49152, 50176, - 50177, 50179, 50112, 50128, 0, 1, 49152, 50176, - 50177, 50179, 50112, 50144, 50136, 0, 1, 49152, - 50176, 50177, 50179, 50112, 50144, 50136, 0, 1, - 49152, 50176, 50177, 50179, 50112, 50144, 50136, 50138, - 0, 1, 49152, 50176, 50177, 50179, 50112, 50144, - 50136, 0, 1, 49152, 50176, 50177, 50179, 50112, - 50144, 50145, 50140, 0, 1, 49152, 50176, 50177, - 50179, 50112, 50144, 50145, 50140, 0, 1, 49152, - 50176, 50177, 50179, 50112, 50144, 50145, 50140, 50142, - 0, 1, 49152, 50176, 50177, 50179, 50112, 0, - 1, 49152, 50176, 50177, 50179, 50112, 50144, 0, - 1, 49152, 50176, 50177, 50179, 50112, 50144, 0, - 1, 49152, 50176, 50177, 50179, 50112, 50144, 50146, - 0, 1, 49152, 50176, 50177, 50179, 50112, 50144, - 0, 1, 49152, 50176, 50177, 50179, 50112, 50144, - 50148, 0, 1, 49152, 50176, 50177, 50179, 50112, - 50144, 50148, 0, 1, 49152, 50176, 50177, 50179, - 50112, 50144, 50152, 50150, 0, 1, 49152, 50176, - 50177, 50179, 50183, 50144, 0, 1, 49152, 50176, - 50177, 50179, 50183, 50144, 50152, 0, 1, 49152, - 50176, 50177, 50179, 50183, 50144, 50152, 0, 1, - 49152, 50176, 50177, 50179, 50183, 50144, 50152, 50154, - 0, 1, 49152, 50176, 50177, 50179, 50183, 50144, - 50152, 0, 1, 49152, 50176, 50177, 50179, 50183, - 50144, 50160, 50156, 0, 1, 49152, 50176, 50177, - 50179, 50183, 50144, 50160, 50156, 0, 1, 49152, - 50176, 50177, 50179, 50183, 50144, 50160, 50161, 50158, - 0, 1, 49152, 50176, 50177, 50179, 50183, 50144, - 0, 1, 49152, 50176, 50177, 50179, 50183, 50144, - 50160, 0, 1, 49152, 50176, 50177, 50179, 50183, - 50144, 50160, 0, 1, 49152, 50176, 50177, 50179, - 50183, 50144, 50160, 50162, 0, 1, 49152, 50176, - 50177, 50179, 50183, 50144, 50160, 0, 1, 49152, - 50176, 50177, 50179, 50183, 50144, 50160, 50164, 0, - 1, 49152, 50176, 50177, 50179, 50183, 50144, 50160, - 50164, 0, 1, 49152, 50176, 50177, 50179, 50183, - 50144, 50160, 50168, 50166, 0, 1, 49152, 50176, - 50177, 50179, 50183, 50144, 50160, 0, 1, 49152, - 50176, 50177, 50179, 50183, 50144, 50160, 50168, 0, - 1, 49152, 50176, 50177, 50179, 50183, 50144, 50160, - 50168, 0, 1, 49152, 50176, 50177, 50179, 50183, - 50144, 50160, 50168, 50170, 0, 1, 49152, 50176, - 50177, 50179, 50183, 50144, 50160, 50168, 0, 1, - 49152, 50176, 50177, 50179, 50183, 50144, 50160, 50168, - 50172, 0, 1, 49152, 50176, 50177, 50179, 50183, - 50144, 50160, 50168, 50172, 0, 1, 49152, 50176, - 50177, 50179, 50183, 50144, 50160, 50168, 50172, 50174, - 0, 1, 49152, 0, 1, 49152, 50176, 0, - 1, 49152, 50176, 0, 1, 49152, 50176, 50178, - 0, 1, 49152, 50176, 0, 1, 49152, 50176, - 50180, 0, 1, 49152, 50176, 50180, 0, 1, - 49152, 50176, 50184, 50182, 0, 1, 49152, 50176, - 0, 1, 49152, 50176, 50184, 0, 1, 49152, - 50176, 50184, 0, 1, 49152, 50176, 50184, 50186, - 0, 1, 49152, 50176, 50184, 0, 1, 49152, - 50176, 50192, 50188, 0, 1, 49152, 50176, 50192, - 50188, 0, 1, 49152, 50176, 50192, 50193, 50190, - 0, 1, 49152, 50176, 0, 1, 49152, 50176, - 50192, 0, 1, 49152, 50176, 50192, 0, 1, - 49152, 50176, 50192, 50194, 0, 1, 49152, 50176, - 50192, 0, 1, 49152, 50176, 50192, 50196, 0, - 1, 49152, 50176, 50192, 50196, 0, 1, 49152, - 50176, 50192, 50200, 50198, 0, 1, 49152, 50176, - 50192, 0, 1, 49152, 50176, 50208, 50200, 0, - 1, 49152, 50176, 50208, 50200, 0, 1, 49152, - 50176, 50208, 50200, 50202, 0, 1, 49152, 50176, - 50208, 50200, 0, 1, 49152, 50176, 50208, 50209, - 50204, 0, 1, 49152, 50176, 50208, 50209, 50204, - 0, 1, 49152, 50176, 50208, 50209, 50204, 50206, - 0, 1, 49152, 50176, 0, 1, 49152, 50176, - 50208, 0, 1, 49152, 50176, 50208, 0, 1, - 49152, 50176, 50208, 50210, 0, 1, 49152, 50176, - 50208, 0, 1, 49152, 50176, 50208, 50212, 0, - 1, 49152, 50176, 50208, 50212, 0, 1, 49152, - 50176, 50208, 50216, 50214, 0, 1, 49152, 50176, - 50208, 0, 1, 49152, 50176, 50208, 50216, 0, - 1, 49152, 50176, 50208, 50216, 0, 1, 49152, - 50176, 50208, 50216, 50218, 0, 1, 49152, 50176, - 50208, 50216, 0, 1, 49152, 50176, 50208, 50224, - 50220, 0, 1, 49152, 50176, 50208, 50224, 50220, - 0, 1, 49152, 50176, 50208, 50224, 50225, 50222, - 0, 1, 49152, 50176, 50208, 0, 1, 49152, - 50176, 50240, 50224, 0, 1, 49152, 50176, 50240, - 50224, 0, 1, 49152, 50176, 50240, 50224, 50226, - 0, 1, 49152, 50176, 50240, 50224, 0, 1, - 49152, 50176, 50240, 50224, 50228, 0, 1, 49152, - 50176, 50240, 50224, 50228, 0, 1, 49152, 50176, - 50240, 50224, 50232, 50230, 0, 1, 49152, 50176, - 50240, 50224, 0, 1, 49152, 50176, 50240, 50241, - 50232, 0, 1, 49152, 50176, 50240, 50241, 50232, - 0, 1, 49152, 50176, 50240, 50241, 50232, 50234, - 0, 1, 49152, 50176, 50240, 50241, 50232, 0, - 1, 49152, 50176, 50240, 50241, 50232, 50236, 0, - 1, 49152, 50176, 50240, 50241, 50243, 50236, 0, - 1, 49152, 50176, 50240, 50241, 50243, 50236, 50238, - 0, 1, 49152, 50176, 0, 1, 49152, 50176, - 50240, 0, 1, 49152, 50176, 50240, 0, 1, - 49152, 50176, 50240, 50242, 0, 1, 49152, 50176, - 50240, 0, 1, 49152, 50176, 50240, 50244, 0, - 1, 49152, 50176, 50240, 50244, 0, 1, 49152, - 50176, 50240, 50248, 50246, 0, 1, 49152, 50176, - 50240, 0, 1, 49152, 50176, 50240, 50248, 0, - 1, 49152, 50176, 50240, 50248, 0, 1, 49152, - 50176, 50240, 50248, 50250, 0, 1, 49152, 50176, - 50240, 50248, 0, 1, 49152, 50176, 50240, 50256, - 50252, 0, 1, 49152, 50176, 50240, 50256, 50252, - 0, 1, 49152, 50176, 50240, 50256, 50257, 50254, - 0, 1, 49152, 50176, 50240, 0, 1, 49152, - 50176, 50240, 50256, 0, 1, 49152, 50176, 50240, - 50256, 0, 1, 49152, 50176, 50240, 50256, 50258, - 0, 1, 49152, 50176, 50240, 50256, 0, 1, - 49152, 50176, 50240, 50256, 50260, 0, 1, 49152, - 50176, 50240, 50256, 50260, 0, 1, 49152, 50176, - 50240, 50256, 50264, 50262, 0, 1, 49152, 50176, - 50240, 50256, 0, 1, 49152, 50176, 50240, 50272, - 50264, 0, 1, 49152, 50176, 50240, 50272, 50264, - 0, 1, 49152, 50176, 50240, 50272, 50264, 50266, - 0, 1, 49152, 50176, 50240, 50272, 50264, 0, - 1, 49152, 50176, 50240, 50272, 50273, 50268, 0, - 1, 49152, 50176, 50240, 50272, 50273, 50268, 0, - 1, 49152, 50176, 50240, 50272, 50273, 50268, 50270, - 0, 1, 49152, 50176, 50240, 0, 1, 49152, - 50176, 50304, 50272, 0, 1, 49152, 50176, 50304, - 50272, 0, 1, 49152, 50176, 50304, 50272, 50274, - 0, 1, 49152, 50176, 50304, 50272, 0, 1, - 49152, 50176, 50304, 50272, 50276, 0, 1, 49152, - 50176, 50304, 50272, 50276, 0, 1, 49152, 50176, - 50304, 50272, 50280, 50278, 0, 1, 49152, 50176, - 50304, 50272, 0, 1, 49152, 50176, 50304, 50272, - 50280, 0, 1, 49152, 50176, 50304, 50272, 50280, - 0, 1, 49152, 50176, 50304, 50272, 50280, 50282, - 0, 1, 49152, 50176, 50304, 50272, 50280, 0, - 1, 49152, 50176, 50304, 50272, 50288, 50284, 0, - 1, 49152, 50176, 50304, 50272, 50288, 50284, 0, - 1, 49152, 50176, 50304, 50272, 50288, 50289, 50286, - 0, 1, 49152, 50176, 50304, 50272, 0, 1, - 49152, 50176, 50304, 50305, 50288, 0, 1, 49152, - 50176, 50304, 50305, 50288, 0, 1, 49152, 50176, - 50304, 50305, 50288, 50290, 0, 1, 49152, 50176, - 50304, 50305, 50288, 0, 1, 49152, 50176, 50304, - 50305, 50288, 50292, 0, 1, 49152, 50176, 50304, - 50305, 50288, 50292, 0, 1, 49152, 50176, 50304, - 50305, 50288, 50296, 50294, 0, 1, 49152, 50176, - 50304, 50305, 50288, 0, 1, 49152, 50176, 50304, - 50305, 50288, 50296, 0, 1, 49152, 50176, 50304, - 50305, 50307, 50296, 0, 1, 49152, 50176, 50304, - 50305, 50307, 50296, 50298, 0, 1, 49152, 50176, - 50304, 50305, 50307, 50296, 0, 1, 49152, 50176, - 50304, 50305, 50307, 50296, 50300, 0, 1, 49152, - 50176, 50304, 50305, 50307, 50296, 50300, 0, 1, - 49152, 50176, 50304, 50305, 50307, 50296, 50300, 50302, - 0, 1, 49152, 50176, 0, 1, 49152, 50176, - 50304, 0, 1, 49152, 50176, 50304, 0, 1, - 49152, 50176, 50304, 50306, 0, 1, 49152, 50176, - 50304, 0, 1, 49152, 50176, 50304, 50308, 0, - 1, 49152, 50176, 50304, 50308, 0, 1, 49152, - 50176, 50304, 50312, 50310, 0, 1, 49152, 50176, - 50304, 0, 1, 49152, 50176, 50304, 50312, 0, - 1, 49152, 50176, 50304, 50312, 0, 1, 49152, - 50176, 50304, 50312, 50314, 0, 1, 49152, 50176, - 50304, 50312, 0, 1, 49152, 50176, 50304, 50320, - 50316, 0, 1, 49152, 50176, 50304, 50320, 50316, - 0, 1, 49152, 50176, 50304, 50320, 50321, 50318, - 0, 1, 49152, 50176, 50304, 0, 1, 49152, - 50176, 50304, 50320, 0, 1, 49152, 50176, 50304, - 50320, 0, 1, 49152, 50176, 50304, 50320, 50322, - 0, 1, 49152, 50176, 50304, 50320, 0, 1, - 49152, 50176, 50304, 50320, 50324, 0, 1, 49152, - 50176, 50304, 50320, 50324, 0, 1, 49152, 50176, - 50304, 50320, 50328, 50326, 0, 1, 49152, 50176, - 50304, 50320, 0, 1, 49152, 50176, 50304, 50336, - 50328, 0, 1, 49152, 50176, 50304, 50336, 50328, - 0, 1, 49152, 50176, 50304, 50336, 50328, 50330, - 0, 1, 49152, 50176, 50304, 50336, 50328, 0, - 1, 49152, 50176, 50304, 50336, 50337, 50332, 0, - 1, 49152, 50176, 50304, 50336, 50337, 50332, 0, - 1, 49152, 50176, 50304, 50336, 50337, 50332, 50334, - 0, 1, 49152, 50176, 50304, 0, 1, 49152, - 50176, 50304, 50336, 0, 1, 49152, 50176, 50304, - 50336, 0, 1, 49152, 50176, 50304, 50336, 50338, - 0, 1, 49152, 50176, 50304, 50336, 0, 1, - 49152, 50176, 50304, 50336, 50340, 0, 1, 49152, - 50176, 50304, 50336, 50340, 0, 1, 49152, 50176, - 50304, 50336, 50344, 50342, 0, 1, 49152, 50176, - 50304, 50336, 0, 1, 49152, 50176, 50304, 50336, - 50344, 0, 1, 49152, 50176, 50304, 50336, 50344, - 0, 1, 49152, 50176, 50304, 50336, 50344, 50346, - 0, 1, 49152, 50176, 50304, 50336, 50344, 0, - 1, 49152, 50176, 50304, 50336, 50352, 50348, 0, - 1, 49152, 50176, 50304, 50336, 50352, 50348, 0, - 1, 49152, 50176, 50304, 50336, 50352, 50353, 50350, - 0, 1, 49152, 50176, 50304, 50336, 0, 1, - 49152, 50176, 50304, 50368, 50352, 0, 1, 49152, - 50176, 50304, 50368, 50352, 0, 1, 49152, 50176, - 50304, 50368, 50352, 50354, 0, 1, 49152, 50176, - 50304, 50368, 50352, 0, 1, 49152, 50176, 50304, - 50368, 50352, 50356, 0, 1, 49152, 50176, 50304, - 50368, 50352, 50356, 0, 1, 49152, 50176, 50304, - 50368, 50352, 50360, 50358, 0, 1, 49152, 50176, - 50304, 50368, 50352, 0, 1, 49152, 50176, 50304, - 50368, 50369, 50360, 0, 1, 49152, 50176, 50304, - 50368, 50369, 50360, 0, 1, 49152, 50176, 50304, - 50368, 50369, 50360, 50362, 0, 1, 49152, 50176, - 50304, 50368, 50369, 50360, 0, 1, 49152, 50176, - 50304, 50368, 50369, 50360, 50364, 0, 1, 49152, - 50176, 50304, 50368, 50369, 50371, 50364, 0, 1, - 49152, 50176, 50304, 50368, 50369, 50371, 50364, 50366, - 0, 1, 49152, 50176, 50304, 0, 1, 49152, - 50176, 50432, 50368, 0, 1, 49152, 50176, 50432, - 50368, 0, 1, 49152, 50176, 50432, 50368, 50370, - 0, 1, 49152, 50176, 50432, 50368, 0, 1, - 49152, 50176, 50432, 50368, 50372, 0, 1, 49152, - 50176, 50432, 50368, 50372, 0, 1, 49152, 50176, - 50432, 50368, 50376, 50374, 0, 1, 49152, 50176, - 50432, 50368, 0, 1, 49152, 50176, 50432, 50368, - 50376, 0, 1, 49152, 50176, 50432, 50368, 50376, - 0, 1, 49152, 50176, 50432, 50368, 50376, 50378, - 0, 1, 49152, 50176, 50432, 50368, 50376, 0, - 1, 49152, 50176, 50432, 50368, 50384, 50380, 0, - 1, 49152, 50176, 50432, 50368, 50384, 50380, 0, - 1, 49152, 50176, 50432, 50368, 50384, 50385, 50382, - 0, 1, 49152, 50176, 50432, 50368, 0, 1, - 49152, 50176, 50432, 50368, 50384, 0, 1, 49152, - 50176, 50432, 50368, 50384, 0, 1, 49152, 50176, - 50432, 50368, 50384, 50386, 0, 1, 49152, 50176, - 50432, 50368, 50384, 0, 1, 49152, 50176, 50432, - 50368, 50384, 50388, 0, 1, 49152, 50176, 50432, - 50368, 50384, 50388, 0, 1, 49152, 50176, 50432, - 50368, 50384, 50392, 50390, 0, 1, 49152, 50176, - 50432, 50368, 50384, 0, 1, 49152, 50176, 50432, - 50368, 50400, 50392, 0, 1, 49152, 50176, 50432, - 50368, 50400, 50392, 0, 1, 49152, 50176, 50432, - 50368, 50400, 50392, 50394, 0, 1, 49152, 50176, - 50432, 50368, 50400, 50392, 0, 1, 49152, 50176, - 50432, 50368, 50400, 50401, 50396, 0, 1, 49152, - 50176, 50432, 50368, 50400, 50401, 50396, 0, 1, - 49152, 50176, 50432, 50368, 50400, 50401, 50396, 50398, - 0, 1, 49152, 50176, 50432, 50368, 0, 1, - 49152, 50176, 50432, 50433, 50400, 0, 1, 49152, - 50176, 50432, 50433, 50400, 0, 1, 49152, 50176, - 50432, 50433, 50400, 50402, 0, 1, 49152, 50176, - 50432, 50433, 50400, 0, 1, 49152, 50176, 50432, - 50433, 50400, 50404, 0, 1, 49152, 50176, 50432, - 50433, 50400, 50404, 0, 1, 49152, 50176, 50432, - 50433, 50400, 50408, 50406, 0, 1, 49152, 50176, - 50432, 50433, 50400, 0, 1, 49152, 50176, 50432, - 50433, 50400, 50408, 0, 1, 49152, 50176, 50432, - 50433, 50400, 50408, 0, 1, 49152, 50176, 50432, - 50433, 50400, 50408, 50410, 0, 1, 49152, 50176, - 50432, 50433, 50400, 50408, 0, 1, 49152, 50176, - 50432, 50433, 50400, 50416, 50412, 0, 1, 49152, - 50176, 50432, 50433, 50400, 50416, 50412, 0, 1, - 49152, 50176, 50432, 50433, 50400, 50416, 50417, 50414, - 0, 1, 49152, 50176, 50432, 50433, 50400, 0, - 1, 49152, 50176, 50432, 50433, 50400, 50416, 0, - 1, 49152, 50176, 50432, 50433, 50435, 50416, 0, - 1, 49152, 50176, 50432, 50433, 50435, 50416, 50418, - 0, 1, 49152, 50176, 50432, 50433, 50435, 50416, - 0, 1, 49152, 50176, 50432, 50433, 50435, 50416, - 50420, 0, 1, 49152, 50176, 50432, 50433, 50435, - 50416, 50420, 0, 1, 49152, 50176, 50432, 50433, - 50435, 50416, 50424, 50422, 0, 1, 49152, 50176, - 50432, 50433, 50435, 50416, 0, 1, 49152, 50176, - 50432, 50433, 50435, 50416, 50424, 0, 1, 49152, - 50176, 50432, 50433, 50435, 50416, 50424, 0, 1, - 49152, 50176, 50432, 50433, 50435, 50416, 50424, 50426, - 0, 1, 49152, 50176, 50432, 50433, 50435, 50439, - 50424, 0, 1, 49152, 50176, 50432, 50433, 50435, - 50439, 50424, 50428, 0, 1, 49152, 50176, 50432, - 50433, 50435, 50439, 50424, 50428, 0, 1, 49152, - 50176, 50432, 50433, 50435, 50439, 50424, 50428, 50430, - 0, 1, 49152, 50176, 0, 1, 49152, 50176, - 50432, 0, 1, 49152, 50176, 50432, 0, 1, - 49152, 50176, 50432, 50434, 0, 1, 49152, 50176, - 50432, 0, 1, 49152, 50176, 50432, 50436, 0, - 1, 49152, 50176, 50432, 50436, 0, 1, 49152, - 50176, 50432, 50440, 50438, 0, 1, 49152, 50176, - 50432, 0, 1, 49152, 50176, 50432, 50440, 0, - 1, 49152, 50176, 50432, 50440, 0, 1, 49152, - 50176, 50432, 50440, 50442, 0, 1, 49152, 50176, - 50432, 50440, 0, 1, 49152, 50176, 50432, 50448, - 50444, 0, 1, 49152, 50176, 50432, 50448, 50444, - 0, 1, 49152, 50176, 50432, 50448, 50449, 50446, - 0, 1, 49152, 50176, 50432, 0, 1, 49152, - 50176, 50432, 50448, 0, 1, 49152, 50176, 50432, - 50448, 0, 1, 49152, 50176, 50432, 50448, 50450, - 0, 1, 49152, 50176, 50432, 50448, 0, 1, - 49152, 50176, 50432, 50448, 50452, 0, 1, 49152, - 50176, 50432, 50448, 50452, 0, 1, 49152, 50176, - 50432, 50448, 50456, 50454, 0, 1, 49152, 50176, - 50432, 50448, 0, 1, 49152, 50176, 50432, 50464, - 50456, 0, 1, 49152, 50176, 50432, 50464, 50456, - 0, 1, 49152, 50176, 50432, 50464, 50456, 50458, - 0, 1, 49152, 50176, 50432, 50464, 50456, 0, - 1, 49152, 50176, 50432, 50464, 50465, 50460, 0, - 1, 49152, 50176, 50432, 50464, 50465, 50460, 0, - 1, 49152, 50176, 50432, 50464, 50465, 50460, 50462, - 0, 1, 49152, 50176, 50432, 0, 1, 49152, - 50176, 50432, 50464, 0, 1, 49152, 50176, 50432, - 50464, 0, 1, 49152, 50176, 50432, 50464, 50466, - 0, 1, 49152, 50176, 50432, 50464, 0, 1, - 49152, 50176, 50432, 50464, 50468, 0, 1, 49152, - 50176, 50432, 50464, 50468, 0, 1, 49152, 50176, - 50432, 50464, 50472, 50470, 0, 1, 49152, 50176, - 50432, 50464, 0, 1, 49152, 50176, 50432, 50464, - 50472, 0, 1, 49152, 50176, 50432, 50464, 50472, - 0, 1, 49152, 50176, 50432, 50464, 50472, 50474, - 0, 1, 49152, 50176, 50432, 50464, 50472, 0, - 1, 49152, 50176, 50432, 50464, 50480, 50476, 0, - 1, 49152, 50176, 50432, 50464, 50480, 50476, 0, - 1, 49152, 50176, 50432, 50464, 50480, 50481, 50478, - 0, 1, 49152, 50176, 50432, 50464, 0, 1, - 49152, 50176, 50432, 50496, 50480, 0, 1, 49152, - 50176, 50432, 50496, 50480, 0, 1, 49152, 50176, - 50432, 50496, 50480, 50482, 0, 1, 49152, 50176, - 50432, 50496, 50480, 0, 1, 49152, 50176, 50432, - 50496, 50480, 50484, 0, 1, 49152, 50176, 50432, - 50496, 50480, 50484, 0, 1, 49152, 50176, 50432, - 50496, 50480, 50488, 50486, 0, 1, 49152, 50176, - 50432, 50496, 50480, 0, 1, 49152, 50176, 50432, - 50496, 50497, 50488, 0, 1, 49152, 50176, 50432, - 50496, 50497, 50488, 0, 1, 49152, 50176, 50432, - 50496, 50497, 50488, 50490, 0, 1, 49152, 50176, - 50432, 50496, 50497, 50488, 0, 1, 49152, 50176, - 50432, 50496, 50497, 50488, 50492, 0, 1, 49152, - 50176, 50432, 50496, 50497, 50499, 50492, 0, 1, - 49152, 50176, 50432, 50496, 50497, 50499, 50492, 50494, - 0, 1, 49152, 50176, 50432, 0, 1, 49152, - 50176, 50432, 50496, 0, 1, 49152, 50176, 50432, - 50496, 0, 1, 49152, 50176, 50432, 50496, 50498, - 0, 1, 49152, 50176, 50432, 50496, 0, 1, - 49152, 50176, 50432, 50496, 50500, 0, 1, 49152, - 50176, 50432, 50496, 50500, 0, 1, 49152, 50176, - 50432, 50496, 50504, 50502, 0, 1, 49152, 50176, - 50432, 50496, 0, 1, 49152, 50176, 50432, 50496, - 50504, 0, 1, 49152, 50176, 50432, 50496, 50504, - 0, 1, 49152, 50176, 50432, 50496, 50504, 50506, - 0, 1, 49152, 50176, 50432, 50496, 50504, 0, - 1, 49152, 50176, 50432, 50496, 50512, 50508, 0, - 1, 49152, 50176, 50432, 50496, 50512, 50508, 0, - 1, 49152, 50176, 50432, 50496, 50512, 50513, 50510, - 0, 1, 49152, 50176, 50432, 50496, 0, 1, - 49152, 50176, 50432, 50496, 50512, 0, 1, 49152, - 50176, 50432, 50496, 50512, 0, 1, 49152, 50176, - 50432, 50496, 50512, 50514, 0, 1, 49152, 50176, - 50432, 50496, 50512, 0, 1, 49152, 50176, 50432, - 50496, 50512, 50516, 0, 1, 49152, 50176, 50432, - 50496, 50512, 50516, 0, 1, 49152, 50176, 50432, - 50496, 50512, 50520, 50518, 0, 1, 49152, 50176, - 50432, 50496, 50512, 0, 1, 49152, 50176, 50432, - 50496, 50528, 50520, 0, 1, 49152, 50176, 50432, - 50496, 50528, 50520, 0, 1, 49152, 50176, 50432, - 50496, 50528, 50520, 50522, 0, 1, 49152, 50176, - 50432, 50496, 50528, 50520, 0, 1, 49152, 50176, - 50432, 50496, 50528, 50529, 50524, 0, 1, 49152, - 50176, 50432, 50496, 50528, 50529, 50524, 0, 1, - 49152, 50176, 50432, 50496, 50528, 50529, 50524, 50526, - 0, 1, 49152, 50176, 50432, 50496, 0, 1, - 49152, 50176, 50432, 50560, 50528, 0, 1, 49152, - 50176, 50432, 50560, 50528, 0, 1, 49152, 50176, - 50432, 50560, 50528, 50530, 0, 1, 49152, 50176, - 50432, 50560, 50528, 0, 1, 49152, 50176, 50432, - 50560, 50528, 50532, 0, 1, 49152, 50176, 50432, - 50560, 50528, 50532, 0, 1, 49152, 50176, 50432, - 50560, 50528, 50536, 50534, 0, 1, 49152, 50176, - 50432, 50560, 50528, 0, 1, 49152, 50176, 50432, - 50560, 50528, 50536, 0, 1, 49152, 50176, 50432, - 50560, 50528, 50536, 0, 1, 49152, 50176, 50432, - 50560, 50528, 50536, 50538, 0, 1, 49152, 50176, - 50432, 50560, 50528, 50536, 0, 1, 49152, 50176, - 50432, 50560, 50528, 50544, 50540, 0, 1, 49152, - 50176, 50432, 50560, 50528, 50544, 50540, 0, 1, - 49152, 50176, 50432, 50560, 50528, 50544, 50545, 50542, - 0, 1, 49152, 50176, 50432, 50560, 50528, 0, - 1, 49152, 50176, 50432, 50560, 50561, 50544, 0, - 1, 49152, 50176, 50432, 50560, 50561, 50544, 0, - 1, 49152, 50176, 50432, 50560, 50561, 50544, 50546, - 0, 1, 49152, 50176, 50432, 50560, 50561, 50544, - 0, 1, 49152, 50176, 50432, 50560, 50561, 50544, - 50548, 0, 1, 49152, 50176, 50432, 50560, 50561, - 50544, 50548, 0, 1, 49152, 50176, 50432, 50560, - 50561, 50544, 50552, 50550, 0, 1, 49152, 50176, - 50432, 50560, 50561, 50544, 0, 1, 49152, 50176, - 50432, 50560, 50561, 50544, 50552, 0, 1, 49152, - 50176, 50432, 50560, 50561, 50563, 50552, 0, 1, - 49152, 50176, 50432, 50560, 50561, 50563, 50552, 50554, - 0, 1, 49152, 50176, 50432, 50560, 50561, 50563, - 50552, 0, 1, 49152, 50176, 50432, 50560, 50561, - 50563, 50552, 50556, 0, 1, 49152, 50176, 50432, - 50560, 50561, 50563, 50552, 50556, 0, 1, 49152, - 50176, 50432, 50560, 50561, 50563, 50552, 50556, 50558, - 0, 1, 49152, 50176, 50432, 0, 1, 49152, - 50176, 50688, 50560, 0, 1, 49152, 50176, 50688, - 50560, 0, 1, 49152, 50176, 50688, 50560, 50562, - 0, 1, 49152, 50176, 50688, 50560, 0, 1, - 49152, 50176, 50688, 50560, 50564, 0, 1, 49152, - 50176, 50688, 50560, 50564, 0, 1, 49152, 50176, - 50688, 50560, 50568, 50566, 0, 1, 49152, 50176, - 50688, 50560, 0, 1, 49152, 50176, 50688, 50560, - 50568, 0, 1, 49152, 50176, 50688, 50560, 50568, - 0, 1, 49152, 50176, 50688, 50560, 50568, 50570, - 0, 1, 49152, 50176, 50688, 50560, 50568, 0, - 1, 49152, 50176, 50688, 50560, 50576, 50572, 0, - 1, 49152, 50176, 50688, 50560, 50576, 50572, 0, - 1, 49152, 50176, 50688, 50560, 50576, 50577, 50574, - 0, 1, 49152, 50176, 50688, 50560, 0, 1, - 49152, 50176, 50688, 50560, 50576, 0, 1, 49152, - 50176, 50688, 50560, 50576, 0, 1, 49152, 50176, - 50688, 50560, 50576, 50578, 0, 1, 49152, 50176, - 50688, 50560, 50576, 0, 1, 49152, 50176, 50688, - 50560, 50576, 50580, 0, 1, 49152, 50176, 50688, - 50560, 50576, 50580, 0, 1, 49152, 50176, 50688, - 50560, 50576, 50584, 50582, 0, 1, 49152, 50176, - 50688, 50560, 50576, 0, 1, 49152, 50176, 50688, - 50560, 50592, 50584, 0, 1, 49152, 50176, 50688, - 50560, 50592, 50584, 0, 1, 49152, 50176, 50688, - 50560, 50592, 50584, 50586, 0, 1, 49152, 50176, - 50688, 50560, 50592, 50584, 0, 1, 49152, 50176, - 50688, 50560, 50592, 50593, 50588, 0, 1, 49152, - 50176, 50688, 50560, 50592, 50593, 50588, 0, 1, - 49152, 50176, 50688, 50560, 50592, 50593, 50588, 50590, - 0, 1, 49152, 50176, 50688, 50560, 0, 1, - 49152, 50176, 50688, 50560, 50592, 0, 1, 49152, - 50176, 50688, 50560, 50592, 0, 1, 49152, 50176, - 50688, 50560, 50592, 50594, 0, 1, 49152, 50176, - 50688, 50560, 50592, 0, 1, 49152, 50176, 50688, - 50560, 50592, 50596, 0, 1, 49152, 50176, 50688, - 50560, 50592, 50596, 0, 1, 49152, 50176, 50688, - 50560, 50592, 50600, 50598, 0, 1, 49152, 50176, - 50688, 50560, 50592, 0, 1, 49152, 50176, 50688, - 50560, 50592, 50600, 0, 1, 49152, 50176, 50688, - 50560, 50592, 50600, 0, 1, 49152, 50176, 50688, - 50560, 50592, 50600, 50602, 0, 1, 49152, 50176, - 50688, 50560, 50592, 50600, 0, 1, 49152, 50176, - 50688, 50560, 50592, 50608, 50604, 0, 1, 49152, - 50176, 50688, 50560, 50592, 50608, 50604, 0, 1, - 49152, 50176, 50688, 50560, 50592, 50608, 50609, 50606, - 0, 1, 49152, 50176, 50688, 50560, 50592, 0, - 1, 49152, 50176, 50688, 50560, 50624, 50608, 0, - 1, 49152, 50176, 50688, 50560, 50624, 50608, 0, - 1, 49152, 50176, 50688, 50560, 50624, 50608, 50610, - 0, 1, 49152, 50176, 50688, 50560, 50624, 50608, - 0, 1, 49152, 50176, 50688, 50560, 50624, 50608, - 50612, 0, 1, 49152, 50176, 50688, 50560, 50624, - 50608, 50612, 0, 1, 49152, 50176, 50688, 50560, - 50624, 50608, 50616, 50614, 0, 1, 49152, 50176, - 50688, 50560, 50624, 50608, 0, 1, 49152, 50176, - 50688, 50560, 50624, 50625, 50616, 0, 1, 49152, - 50176, 50688, 50560, 50624, 50625, 50616, 0, 1, - 49152, 50176, 50688, 50560, 50624, 50625, 50616, 50618, - 0, 1, 49152, 50176, 50688, 50560, 50624, 50625, - 50616, 0, 1, 49152, 50176, 50688, 50560, 50624, - 50625, 50616, 50620, 0, 1, 49152, 50176, 50688, - 50560, 50624, 50625, 50627, 50620, 0, 1, 49152, - 50176, 50688, 50560, 50624, 50625, 50627, 50620, 50622, - 0, 1, 49152, 50176, 50688, 50560, 0, 1, - 49152, 50176, 50688, 50689, 50624, 0, 1, 49152, - 50176, 50688, 50689, 50624, 0, 1, 49152, 50176, - 50688, 50689, 50624, 50626, 0, 1, 49152, 50176, - 50688, 50689, 50624, 0, 1, 49152, 50176, 50688, - 50689, 50624, 50628, 0, 1, 49152, 50176, 50688, - 50689, 50624, 50628, 0, 1, 49152, 50176, 50688, - 50689, 50624, 50632, 50630, 0, 1, 49152, 50176, - 50688, 50689, 50624, 0, 1, 49152, 50176, 50688, - 50689, 50624, 50632, 0, 1, 49152, 50176, 50688, - 50689, 50624, 50632, 0, 1, 49152, 50176, 50688, - 50689, 50624, 50632, 50634, 0, 1, 49152, 50176, - 50688, 50689, 50624, 50632, 0, 1, 49152, 50176, - 50688, 50689, 50624, 50640, 50636, 0, 1, 49152, - 50176, 50688, 50689, 50624, 50640, 50636, 0, 1, - 49152, 50176, 50688, 50689, 50624, 50640, 50641, 50638, - 0, 1, 49152, 50176, 50688, 50689, 50624, 0, - 1, 49152, 50176, 50688, 50689, 50624, 50640, 0, - 1, 49152, 50176, 50688, 50689, 50624, 50640, 0, - 1, 49152, 50176, 50688, 50689, 50624, 50640, 50642, - 0, 1, 49152, 50176, 50688, 50689, 50624, 50640, - 0, 1, 49152, 50176, 50688, 50689, 50624, 50640, - 50644, 0, 1, 49152, 50176, 50688, 50689, 50624, - 50640, 50644, 0, 1, 49152, 50176, 50688, 50689, - 50624, 50640, 50648, 50646, 0, 1, 49152, 50176, - 50688, 50689, 50624, 50640, 0, 1, 49152, 50176, - 50688, 50689, 50624, 50656, 50648, 0, 1, 49152, - 50176, 50688, 50689, 50624, 50656, 50648, 0, 1, - 49152, 50176, 50688, 50689, 50624, 50656, 50648, 50650, - 0, 1, 49152, 50176, 50688, 50689, 50624, 50656, - 50648, 0, 1, 49152, 50176, 50688, 50689, 50624, - 50656, 50657, 50652, 0, 1, 49152, 50176, 50688, - 50689, 50624, 50656, 50657, 50652, 0, 1, 49152, - 50176, 50688, 50689, 50624, 50656, 50657, 50652, 50654, - 0, 1, 49152, 50176, 50688, 50689, 50624, 0, - 1, 49152, 50176, 50688, 50689, 50624, 50656, 0, - 1, 49152, 50176, 50688, 50689, 50691, 50656, 0, - 1, 49152, 50176, 50688, 50689, 50691, 50656, 50658, - 0, 1, 49152, 50176, 50688, 50689, 50691, 50656, - 0, 1, 49152, 50176, 50688, 50689, 50691, 50656, - 50660, 0, 1, 49152, 50176, 50688, 50689, 50691, - 50656, 50660, 0, 1, 49152, 50176, 50688, 50689, - 50691, 50656, 50664, 50662, 0, 1, 49152, 50176, - 50688, 50689, 50691, 50656, 0, 1, 49152, 50176, - 50688, 50689, 50691, 50656, 50664, 0, 1, 49152, - 50176, 50688, 50689, 50691, 50656, 50664, 0, 1, - 49152, 50176, 50688, 50689, 50691, 50656, 50664, 50666, - 0, 1, 49152, 50176, 50688, 50689, 50691, 50656, - 50664, 0, 1, 49152, 50176, 50688, 50689, 50691, - 50656, 50672, 50668, 0, 1, 49152, 50176, 50688, - 50689, 50691, 50656, 50672, 50668, 0, 1, 49152, - 50176, 50688, 50689, 50691, 50656, 50672, 50673, 50670, - 0, 1, 49152, 50176, 50688, 50689, 50691, 50656, - 0, 1, 49152, 50176, 50688, 50689, 50691, 50656, - 50672, 0, 1, 49152, 50176, 50688, 50689, 50691, - 50656, 50672, 0, 1, 49152, 50176, 50688, 50689, - 50691, 50656, 50672, 50674, 0, 1, 49152, 50176, - 50688, 50689, 50691, 50695, 50672, 0, 1, 49152, - 50176, 50688, 50689, 50691, 50695, 50672, 50676, 0, - 1, 49152, 50176, 50688, 50689, 50691, 50695, 50672, - 50676, 0, 1, 49152, 50176, 50688, 50689, 50691, - 50695, 50672, 50680, 50678, 0, 1, 49152, 50176, - 50688, 50689, 50691, 50695, 50672, 0, 1, 49152, - 50176, 50688, 50689, 50691, 50695, 50672, 50680, 0, - 1, 49152, 50176, 50688, 50689, 50691, 50695, 50672, - 50680, 0, 1, 49152, 50176, 50688, 50689, 50691, - 50695, 50672, 50680, 50682, 0, 1, 49152, 50176, - 50688, 50689, 50691, 50695, 50672, 50680, 0, 1, - 49152, 50176, 50688, 50689, 50691, 50695, 50672, 50680, - 50684, 0, 1, 49152, 50176, 50688, 50689, 50691, - 50695, 50672, 50680, 50684, 0, 1, 49152, 50176, - 50688, 50689, 50691, 50695, 50672, 50680, 50684, 50686, - 0, 1, 49152, 50176, 0, 1, 49152, 51200, - 50688, 0, 1, 49152, 51200, 50688, 0, 1, - 49152, 51200, 50688, 50690, 0, 1, 49152, 51200, - 50688, 0, 1, 49152, 51200, 50688, 50692, 0, - 1, 49152, 51200, 50688, 50692, 0, 1, 49152, - 51200, 50688, 50696, 50694, 0, 1, 49152, 51200, - 50688, 0, 1, 49152, 51200, 50688, 50696, 0, - 1, 49152, 51200, 50688, 50696, 0, 1, 49152, - 51200, 50688, 50696, 50698, 0, 1, 49152, 51200, - 50688, 50696, 0, 1, 49152, 51200, 50688, 50704, - 50700, 0, 1, 49152, 51200, 50688, 50704, 50700, - 0, 1, 49152, 51200, 50688, 50704, 50705, 50702, - 0, 1, 49152, 51200, 50688, 0, 1, 49152, - 51200, 50688, 50704, 0, 1, 49152, 51200, 50688, - 50704, 0, 1, 49152, 51200, 50688, 50704, 50706, - 0, 1, 49152, 51200, 50688, 50704, 0, 1, - 49152, 51200, 50688, 50704, 50708, 0, 1, 49152, - 51200, 50688, 50704, 50708, 0, 1, 49152, 51200, - 50688, 50704, 50712, 50710, 0, 1, 49152, 51200, - 50688, 50704, 0, 1, 49152, 51200, 50688, 50720, - 50712, 0, 1, 49152, 51200, 50688, 50720, 50712, - 0, 1, 49152, 51200, 50688, 50720, 50712, 50714, - 0, 1, 49152, 51200, 50688, 50720, 50712, 0, - 1, 49152, 51200, 50688, 50720, 50721, 50716, 0, - 1, 49152, 51200, 50688, 50720, 50721, 50716, 0, - 1, 49152, 51200, 50688, 50720, 50721, 50716, 50718, - 0, 1, 49152, 51200, 50688, 0, 1, 49152, - 51200, 50688, 50720, 0, 1, 49152, 51200, 50688, - 50720, 0, 1, 49152, 51200, 50688, 50720, 50722, - 0, 1, 49152, 51200, 50688, 50720, 0, 1, - 49152, 51200, 50688, 50720, 50724, 0, 1, 49152, - 51200, 50688, 50720, 50724, 0, 1, 49152, 51200, - 50688, 50720, 50728, 50726, 0, 1, 49152, 51200, - 50688, 50720, 0, 1, 49152, 51200, 50688, 50720, - 50728, 0, 1, 49152, 51200, 50688, 50720, 50728, - 0, 1, 49152, 51200, 50688, 50720, 50728, 50730, - 0, 1, 49152, 51200, 50688, 50720, 50728, 0, - 1, 49152, 51200, 50688, 50720, 50736, 50732, 0, - 1, 49152, 51200, 50688, 50720, 50736, 50732, 0, - 1, 49152, 51200, 50688, 50720, 50736, 50737, 50734, - 0, 1, 49152, 51200, 50688, 50720, 0, 1, - 49152, 51200, 50688, 50752, 50736, 0, 1, 49152, - 51200, 50688, 50752, 50736, 0, 1, 49152, 51200, - 50688, 50752, 50736, 50738, 0, 1, 49152, 51200, - 50688, 50752, 50736, 0, 1, 49152, 51200, 50688, - 50752, 50736, 50740, 0, 1, 49152, 51200, 50688, - 50752, 50736, 50740, 0, 1, 49152, 51200, 50688, - 50752, 50736, 50744, 50742, 0, 1, 49152, 51200, - 50688, 50752, 50736, 0, 1, 49152, 51200, 50688, - 50752, 50753, 50744, 0, 1, 49152, 51200, 50688, - 50752, 50753, 50744, 0, 1, 49152, 51200, 50688, - 50752, 50753, 50744, 50746, 0, 1, 49152, 51200, - 50688, 50752, 50753, 50744, 0, 1, 49152, 51200, - 50688, 50752, 50753, 50744, 50748, 0, 1, 49152, - 51200, 50688, 50752, 50753, 50755, 50748, 0, 1, - 49152, 51200, 50688, 50752, 50753, 50755, 50748, 50750, - 0, 1, 49152, 51200, 50688, 0, 1, 49152, - 51200, 50688, 50752, 0, 1, 49152, 51200, 50688, - 50752, 0, 1, 49152, 51200, 50688, 50752, 50754, - 0, 1, 49152, 51200, 50688, 50752, 0, 1, - 49152, 51200, 50688, 50752, 50756, 0, 1, 49152, - 51200, 50688, 50752, 50756, 0, 1, 49152, 51200, - 50688, 50752, 50760, 50758, 0, 1, 49152, 51200, - 50688, 50752, 0, 1, 49152, 51200, 50688, 50752, - 50760, 0, 1, 49152, 51200, 50688, 50752, 50760, - 0, 1, 49152, 51200, 50688, 50752, 50760, 50762, - 0, 1, 49152, 51200, 50688, 50752, 50760, 0, - 1, 49152, 51200, 50688, 50752, 50768, 50764, 0, - 1, 49152, 51200, 50688, 50752, 50768, 50764, 0, - 1, 49152, 51200, 50688, 50752, 50768, 50769, 50766, - 0, 1, 49152, 51200, 50688, 50752, 0, 1, - 49152, 51200, 50688, 50752, 50768, 0, 1, 49152, - 51200, 50688, 50752, 50768, 0, 1, 49152, 51200, - 50688, 50752, 50768, 50770, 0, 1, 49152, 51200, - 50688, 50752, 50768, 0, 1, 49152, 51200, 50688, - 50752, 50768, 50772, 0, 1, 49152, 51200, 50688, - 50752, 50768, 50772, 0, 1, 49152, 51200, 50688, - 50752, 50768, 50776, 50774, 0, 1, 49152, 51200, - 50688, 50752, 50768, 0, 1, 49152, 51200, 50688, - 50752, 50784, 50776, 0, 1, 49152, 51200, 50688, - 50752, 50784, 50776, 0, 1, 49152, 51200, 50688, - 50752, 50784, 50776, 50778, 0, 1, 49152, 51200, - 50688, 50752, 50784, 50776, 0, 1, 49152, 51200, - 50688, 50752, 50784, 50785, 50780, 0, 1, 49152, - 51200, 50688, 50752, 50784, 50785, 50780, 0, 1, - 49152, 51200, 50688, 50752, 50784, 50785, 50780, 50782, - 0, 1, 49152, 51200, 50688, 50752, 0, 1, - 49152, 51200, 50688, 50816, 50784, 0, 1, 49152, - 51200, 50688, 50816, 50784, 0, 1, 49152, 51200, - 50688, 50816, 50784, 50786, 0, 1, 49152, 51200, - 50688, 50816, 50784, 0, 1, 49152, 51200, 50688, - 50816, 50784, 50788, 0, 1, 49152, 51200, 50688, - 50816, 50784, 50788, 0, 1, 49152, 51200, 50688, - 50816, 50784, 50792, 50790, 0, 1, 49152, 51200, - 50688, 50816, 50784, 0, 1, 49152, 51200, 50688, - 50816, 50784, 50792, 0, 1, 49152, 51200, 50688, - 50816, 50784, 50792, 0, 1, 49152, 51200, 50688, - 50816, 50784, 50792, 50794, 0, 1, 49152, 51200, - 50688, 50816, 50784, 50792, 0, 1, 49152, 51200, - 50688, 50816, 50784, 50800, 50796, 0, 1, 49152, - 51200, 50688, 50816, 50784, 50800, 50796, 0, 1, - 49152, 51200, 50688, 50816, 50784, 50800, 50801, 50798, - 0, 1, 49152, 51200, 50688, 50816, 50784, 0, - 1, 49152, 51200, 50688, 50816, 50817, 50800, 0, - 1, 49152, 51200, 50688, 50816, 50817, 50800, 0, - 1, 49152, 51200, 50688, 50816, 50817, 50800, 50802, - 0, 1, 49152, 51200, 50688, 50816, 50817, 50800, - 0, 1, 49152, 51200, 50688, 50816, 50817, 50800, - 50804, 0, 1, 49152, 51200, 50688, 50816, 50817, - 50800, 50804, 0, 1, 49152, 51200, 50688, 50816, - 50817, 50800, 50808, 50806, 0, 1, 49152, 51200, - 50688, 50816, 50817, 50800, 0, 1, 49152, 51200, - 50688, 50816, 50817, 50800, 50808, 0, 1, 49152, - 51200, 50688, 50816, 50817, 50819, 50808, 0, 1, - 49152, 51200, 50688, 50816, 50817, 50819, 50808, 50810, - 0, 1, 49152, 51200, 50688, 50816, 50817, 50819, - 50808, 0, 1, 49152, 51200, 50688, 50816, 50817, - 50819, 50808, 50812, 0, 1, 49152, 51200, 50688, - 50816, 50817, 50819, 50808, 50812, 0, 1, 49152, - 51200, 50688, 50816, 50817, 50819, 50808, 50812, 50814, - 0, 1, 49152, 51200, 50688, 0, 1, 49152, - 51200, 50688, 50816, 0, 1, 49152, 51200, 50688, - 50816, 0, 1, 49152, 51200, 50688, 50816, 50818, - 0, 1, 49152, 51200, 50688, 50816, 0, 1, - 49152, 51200, 50688, 50816, 50820, 0, 1, 49152, - 51200, 50688, 50816, 50820, 0, 1, 49152, 51200, - 50688, 50816, 50824, 50822, 0, 1, 49152, 51200, - 50688, 50816, 0, 1, 49152, 51200, 50688, 50816, - 50824, 0, 1, 49152, 51200, 50688, 50816, 50824, - 0, 1, 49152, 51200, 50688, 50816, 50824, 50826, - 0, 1, 49152, 51200, 50688, 50816, 50824, 0, - 1, 49152, 51200, 50688, 50816, 50832, 50828, 0, - 1, 49152, 51200, 50688, 50816, 50832, 50828, 0, - 1, 49152, 51200, 50688, 50816, 50832, 50833, 50830, - 0, 1, 49152, 51200, 50688, 50816, 0, 1, - 49152, 51200, 50688, 50816, 50832, 0, 1, 49152, - 51200, 50688, 50816, 50832, 0, 1, 49152, 51200, - 50688, 50816, 50832, 50834, 0, 1, 49152, 51200, - 50688, 50816, 50832, 0, 1, 49152, 51200, 50688, - 50816, 50832, 50836, 0, 1, 49152, 51200, 50688, - 50816, 50832, 50836, 0, 1, 49152, 51200, 50688, - 50816, 50832, 50840, 50838, 0, 1, 49152, 51200, - 50688, 50816, 50832, 0, 1, 49152, 51200, 50688, - 50816, 50848, 50840, 0, 1, 49152, 51200, 50688, - 50816, 50848, 50840, 0, 1, 49152, 51200, 50688, - 50816, 50848, 50840, 50842, 0, 1, 49152, 51200, - 50688, 50816, 50848, 50840, 0, 1, 49152, 51200, - 50688, 50816, 50848, 50849, 50844, 0, 1, 49152, - 51200, 50688, 50816, 50848, 50849, 50844, 0, 1, - 49152, 51200, 50688, 50816, 50848, 50849, 50844, 50846, - 0, 1, 49152, 51200, 50688, 50816, 0, 1, - 49152, 51200, 50688, 50816, 50848, 0, 1, 49152, - 51200, 50688, 50816, 50848, 0, 1, 49152, 51200, - 50688, 50816, 50848, 50850, 0, 1, 49152, 51200, - 50688, 50816, 50848, 0, 1, 49152, 51200, 50688, - 50816, 50848, 50852, 0, 1, 49152, 51200, 50688, - 50816, 50848, 50852, 0, 1, 49152, 51200, 50688, - 50816, 50848, 50856, 50854, 0, 1, 49152, 51200, - 50688, 50816, 50848, 0, 1, 49152, 51200, 50688, - 50816, 50848, 50856, 0, 1, 49152, 51200, 50688, - 50816, 50848, 50856, 0, 1, 49152, 51200, 50688, - 50816, 50848, 50856, 50858, 0, 1, 49152, 51200, - 50688, 50816, 50848, 50856, 0, 1, 49152, 51200, - 50688, 50816, 50848, 50864, 50860, 0, 1, 49152, - 51200, 50688, 50816, 50848, 50864, 50860, 0, 1, - 49152, 51200, 50688, 50816, 50848, 50864, 50865, 50862, - 0, 1, 49152, 51200, 50688, 50816, 50848, 0, - 1, 49152, 51200, 50688, 50816, 50880, 50864, 0, - 1, 49152, 51200, 50688, 50816, 50880, 50864, 0, - 1, 49152, 51200, 50688, 50816, 50880, 50864, 50866, - 0, 1, 49152, 51200, 50688, 50816, 50880, 50864, - 0, 1, 49152, 51200, 50688, 50816, 50880, 50864, - 50868, 0, 1, 49152, 51200, 50688, 50816, 50880, - 50864, 50868, 0, 1, 49152, 51200, 50688, 50816, - 50880, 50864, 50872, 50870, 0, 1, 49152, 51200, - 50688, 50816, 50880, 50864, 0, 1, 49152, 51200, - 50688, 50816, 50880, 50881, 50872, 0, 1, 49152, - 51200, 50688, 50816, 50880, 50881, 50872, 0, 1, - 49152, 51200, 50688, 50816, 50880, 50881, 50872, 50874, - 0, 1, 49152, 51200, 50688, 50816, 50880, 50881, - 50872, 0, 1, 49152, 51200, 50688, 50816, 50880, - 50881, 50872, 50876, 0, 1, 49152, 51200, 50688, - 50816, 50880, 50881, 50883, 50876, 0, 1, 49152, - 51200, 50688, 50816, 50880, 50881, 50883, 50876, 50878, - 0, 1, 49152, 51200, 50688, 50816, 0, 1, - 49152, 51200, 50688, 50944, 50880, 0, 1, 49152, - 51200, 50688, 50944, 50880, 0, 1, 49152, 51200, - 50688, 50944, 50880, 50882, 0, 1, 49152, 51200, - 50688, 50944, 50880, 0, 1, 49152, 51200, 50688, - 50944, 50880, 50884, 0, 1, 49152, 51200, 50688, - 50944, 50880, 50884, 0, 1, 49152, 51200, 50688, - 50944, 50880, 50888, 50886, 0, 1, 49152, 51200, - 50688, 50944, 50880, 0, 1, 49152, 51200, 50688, - 50944, 50880, 50888, 0, 1, 49152, 51200, 50688, - 50944, 50880, 50888, 0, 1, 49152, 51200, 50688, - 50944, 50880, 50888, 50890, 0, 1, 49152, 51200, - 50688, 50944, 50880, 50888, 0, 1, 49152, 51200, - 50688, 50944, 50880, 50896, 50892, 0, 1, 49152, - 51200, 50688, 50944, 50880, 50896, 50892, 0, 1, - 49152, 51200, 50688, 50944, 50880, 50896, 50897, 50894, - 0, 1, 49152, 51200, 50688, 50944, 50880, 0, - 1, 49152, 51200, 50688, 50944, 50880, 50896, 0, - 1, 49152, 51200, 50688, 50944, 50880, 50896, 0, - 1, 49152, 51200, 50688, 50944, 50880, 50896, 50898, - 0, 1, 49152, 51200, 50688, 50944, 50880, 50896, - 0, 1, 49152, 51200, 50688, 50944, 50880, 50896, - 50900, 0, 1, 49152, 51200, 50688, 50944, 50880, - 50896, 50900, 0, 1, 49152, 51200, 50688, 50944, - 50880, 50896, 50904, 50902, 0, 1, 49152, 51200, - 50688, 50944, 50880, 50896, 0, 1, 49152, 51200, - 50688, 50944, 50880, 50912, 50904, 0, 1, 49152, - 51200, 50688, 50944, 50880, 50912, 50904, 0, 1, - 49152, 51200, 50688, 50944, 50880, 50912, 50904, 50906, - 0, 1, 49152, 51200, 50688, 50944, 50880, 50912, - 50904, 0, 1, 49152, 51200, 50688, 50944, 50880, - 50912, 50913, 50908, 0, 1, 49152, 51200, 50688, - 50944, 50880, 50912, 50913, 50908, 0, 1, 49152, - 51200, 50688, 50944, 50880, 50912, 50913, 50908, 50910, - 0, 1, 49152, 51200, 50688, 50944, 50880, 0, - 1, 49152, 51200, 50688, 50944, 50945, 50912, 0, - 1, 49152, 51200, 50688, 50944, 50945, 50912, 0, - 1, 49152, 51200, 50688, 50944, 50945, 50912, 50914, - 0, 1, 49152, 51200, 50688, 50944, 50945, 50912, - 0, 1, 49152, 51200, 50688, 50944, 50945, 50912, - 50916, 0, 1, 49152, 51200, 50688, 50944, 50945, - 50912, 50916, 0, 1, 49152, 51200, 50688, 50944, - 50945, 50912, 50920, 50918, 0, 1, 49152, 51200, - 50688, 50944, 50945, 50912, 0, 1, 49152, 51200, - 50688, 50944, 50945, 50912, 50920, 0, 1, 49152, - 51200, 50688, 50944, 50945, 50912, 50920, 0, 1, - 49152, 51200, 50688, 50944, 50945, 50912, 50920, 50922, - 0, 1, 49152, 51200, 50688, 50944, 50945, 50912, - 50920, 0, 1, 49152, 51200, 50688, 50944, 50945, - 50912, 50928, 50924, 0, 1, 49152, 51200, 50688, - 50944, 50945, 50912, 50928, 50924, 0, 1, 49152, - 51200, 50688, 50944, 50945, 50912, 50928, 50929, 50926, - 0, 1, 49152, 51200, 50688, 50944, 50945, 50912, - 0, 1, 49152, 51200, 50688, 50944, 50945, 50912, - 50928, 0, 1, 49152, 51200, 50688, 50944, 50945, - 50947, 50928, 0, 1, 49152, 51200, 50688, 50944, - 50945, 50947, 50928, 50930, 0, 1, 49152, 51200, - 50688, 50944, 50945, 50947, 50928, 0, 1, 49152, - 51200, 50688, 50944, 50945, 50947, 50928, 50932, 0, - 1, 49152, 51200, 50688, 50944, 50945, 50947, 50928, - 50932, 0, 1, 49152, 51200, 50688, 50944, 50945, - 50947, 50928, 50936, 50934, 0, 1, 49152, 51200, - 50688, 50944, 50945, 50947, 50928, 0, 1, 49152, - 51200, 50688, 50944, 50945, 50947, 50928, 50936, 0, - 1, 49152, 51200, 50688, 50944, 50945, 50947, 50928, - 50936, 0, 1, 49152, 51200, 50688, 50944, 50945, - 50947, 50928, 50936, 50938, 0, 1, 49152, 51200, - 50688, 50944, 50945, 50947, 50951, 50936, 0, 1, - 49152, 51200, 50688, 50944, 50945, 50947, 50951, 50936, - 50940, 0, 1, 49152, 51200, 50688, 50944, 50945, - 50947, 50951, 50936, 50940, 0, 1, 49152, 51200, - 50688, 50944, 50945, 50947, 50951, 50936, 50940, 50942, - 0, 1, 49152, 51200, 50688, 0, 1, 49152, - 51200, 50688, 50944, 0, 1, 49152, 51200, 51201, - 50944, 0, 1, 49152, 51200, 51201, 50944, 50946, - 0, 1, 49152, 51200, 51201, 50944, 0, 1, - 49152, 51200, 51201, 50944, 50948, 0, 1, 49152, - 51200, 51201, 50944, 50948, 0, 1, 49152, 51200, - 51201, 50944, 50952, 50950, 0, 1, 49152, 51200, - 51201, 50944, 0, 1, 49152, 51200, 51201, 50944, - 50952, 0, 1, 49152, 51200, 51201, 50944, 50952, - 0, 1, 49152, 51200, 51201, 50944, 50952, 50954, - 0, 1, 49152, 51200, 51201, 50944, 50952, 0, - 1, 49152, 51200, 51201, 50944, 50960, 50956, 0, - 1, 49152, 51200, 51201, 50944, 50960, 50956, 0, - 1, 49152, 51200, 51201, 50944, 50960, 50961, 50958, - 0, 1, 49152, 51200, 51201, 50944, 0, 1, - 49152, 51200, 51201, 50944, 50960, 0, 1, 49152, - 51200, 51201, 50944, 50960, 0, 1, 49152, 51200, - 51201, 50944, 50960, 50962, 0, 1, 49152, 51200, - 51201, 50944, 50960, 0, 1, 49152, 51200, 51201, - 50944, 50960, 50964, 0, 1, 49152, 51200, 51201, - 50944, 50960, 50964, 0, 1, 49152, 51200, 51201, - 50944, 50960, 50968, 50966, 0, 1, 49152, 51200, - 51201, 50944, 50960, 0, 1, 49152, 51200, 51201, - 50944, 50976, 50968, 0, 1, 49152, 51200, 51201, - 50944, 50976, 50968, 0, 1, 49152, 51200, 51201, - 50944, 50976, 50968, 50970, 0, 1, 49152, 51200, - 51201, 50944, 50976, 50968, 0, 1, 49152, 51200, - 51201, 50944, 50976, 50977, 50972, 0, 1, 49152, - 51200, 51201, 50944, 50976, 50977, 50972, 0, 1, - 49152, 51200, 51201, 50944, 50976, 50977, 50972, 50974, - 0, 1, 49152, 51200, 51201, 50944, 0, 1, - 49152, 51200, 51201, 50944, 50976, 0, 1, 49152, - 51200, 51201, 50944, 50976, 0, 1, 49152, 51200, - 51201, 50944, 50976, 50978, 0, 1, 49152, 51200, - 51201, 50944, 50976, 0, 1, 49152, 51200, 51201, - 50944, 50976, 50980, 0, 1, 49152, 51200, 51201, - 50944, 50976, 50980, 0, 1, 49152, 51200, 51201, - 50944, 50976, 50984, 50982, 0, 1, 49152, 51200, - 51201, 50944, 50976, 0, 1, 49152, 51200, 51201, - 50944, 50976, 50984, 0, 1, 49152, 51200, 51201, - 50944, 50976, 50984, 0, 1, 49152, 51200, 51201, - 50944, 50976, 50984, 50986, 0, 1, 49152, 51200, - 51201, 50944, 50976, 50984, 0, 1, 49152, 51200, - 51201, 50944, 50976, 50992, 50988, 0, 1, 49152, - 51200, 51201, 50944, 50976, 50992, 50988, 0, 1, - 49152, 51200, 51201, 50944, 50976, 50992, 50993, 50990, - 0, 1, 49152, 51200, 51201, 50944, 50976, 0, - 1, 49152, 51200, 51201, 50944, 51008, 50992, 0, - 1, 49152, 51200, 51201, 50944, 51008, 50992, 0, - 1, 49152, 51200, 51201, 50944, 51008, 50992, 50994, - 0, 1, 49152, 51200, 51201, 50944, 51008, 50992, - 0, 1, 49152, 51200, 51201, 50944, 51008, 50992, - 50996, 0, 1, 49152, 51200, 51201, 50944, 51008, - 50992, 50996, 0, 1, 49152, 51200, 51201, 50944, - 51008, 50992, 51000, 50998, 0, 1, 49152, 51200, - 51201, 50944, 51008, 50992, 0, 1, 49152, 51200, - 51201, 50944, 51008, 51009, 51000, 0, 1, 49152, - 51200, 51201, 50944, 51008, 51009, 51000, 0, 1, - 49152, 51200, 51201, 50944, 51008, 51009, 51000, 51002, - 0, 1, 49152, 51200, 51201, 50944, 51008, 51009, - 51000, 0, 1, 49152, 51200, 51201, 50944, 51008, - 51009, 51000, 51004, 0, 1, 49152, 51200, 51201, - 50944, 51008, 51009, 51011, 51004, 0, 1, 49152, - 51200, 51201, 50944, 51008, 51009, 51011, 51004, 51006, - 0, 1, 49152, 51200, 51201, 50944, 0, 1, - 49152, 51200, 51201, 50944, 51008, 0, 1, 49152, - 51200, 51201, 50944, 51008, 0, 1, 49152, 51200, - 51201, 50944, 51008, 51010, 0, 1, 49152, 51200, - 51201, 50944, 51008, 0, 1, 49152, 51200, 51201, - 50944, 51008, 51012, 0, 1, 49152, 51200, 51201, - 50944, 51008, 51012, 0, 1, 49152, 51200, 51201, - 50944, 51008, 51016, 51014, 0, 1, 49152, 51200, - 51201, 50944, 51008, 0, 1, 49152, 51200, 51201, - 50944, 51008, 51016, 0, 1, 49152, 51200, 51201, - 50944, 51008, 51016, 0, 1, 49152, 51200, 51201, - 50944, 51008, 51016, 51018, 0, 1, 49152, 51200, - 51201, 50944, 51008, 51016, 0, 1, 49152, 51200, - 51201, 50944, 51008, 51024, 51020, 0, 1, 49152, - 51200, 51201, 50944, 51008, 51024, 51020, 0, 1, - 49152, 51200, 51201, 50944, 51008, 51024, 51025, 51022, - 0, 1, 49152, 51200, 51201, 50944, 51008, 0, - 1, 49152, 51200, 51201, 50944, 51008, 51024, 0, - 1, 49152, 51200, 51201, 50944, 51008, 51024, 0, - 1, 49152, 51200, 51201, 50944, 51008, 51024, 51026, - 0, 1, 49152, 51200, 51201, 50944, 51008, 51024, - 0, 1, 49152, 51200, 51201, 50944, 51008, 51024, - 51028, 0, 1, 49152, 51200, 51201, 50944, 51008, - 51024, 51028, 0, 1, 49152, 51200, 51201, 50944, - 51008, 51024, 51032, 51030, 0, 1, 49152, 51200, - 51201, 50944, 51008, 51024, 0, 1, 49152, 51200, - 51201, 50944, 51008, 51040, 51032, 0, 1, 49152, - 51200, 51201, 50944, 51008, 51040, 51032, 0, 1, - 49152, 51200, 51201, 50944, 51008, 51040, 51032, 51034, - 0, 1, 49152, 51200, 51201, 50944, 51008, 51040, - 51032, 0, 1, 49152, 51200, 51201, 50944, 51008, - 51040, 51041, 51036, 0, 1, 49152, 51200, 51201, - 50944, 51008, 51040, 51041, 51036, 0, 1, 49152, - 51200, 51201, 50944, 51008, 51040, 51041, 51036, 51038, - 0, 1, 49152, 51200, 51201, 50944, 51008, 0, - 1, 49152, 51200, 51201, 50944, 51072, 51040, 0, - 1, 49152, 51200, 51201, 50944, 51072, 51040, 0, - 1, 49152, 51200, 51201, 50944, 51072, 51040, 51042, - 0, 1, 49152, 51200, 51201, 50944, 51072, 51040, - 0, 1, 49152, 51200, 51201, 50944, 51072, 51040, - 51044, 0, 1, 49152, 51200, 51201, 50944, 51072, - 51040, 51044, 0, 1, 49152, 51200, 51201, 50944, - 51072, 51040, 51048, 51046, 0, 1, 49152, 51200, - 51201, 50944, 51072, 51040, 0, 1, 49152, 51200, - 51201, 50944, 51072, 51040, 51048, 0, 1, 49152, - 51200, 51201, 50944, 51072, 51040, 51048, 0, 1, - 49152, 51200, 51201, 50944, 51072, 51040, 51048, 51050, - 0, 1, 49152, 51200, 51201, 50944, 51072, 51040, - 51048, 0, 1, 49152, 51200, 51201, 50944, 51072, - 51040, 51056, 51052, 0, 1, 49152, 51200, 51201, - 50944, 51072, 51040, 51056, 51052, 0, 1, 49152, - 51200, 51201, 50944, 51072, 51040, 51056, 51057, 51054, - 0, 1, 49152, 51200, 51201, 50944, 51072, 51040, - 0, 1, 49152, 51200, 51201, 50944, 51072, 51073, - 51056, 0, 1, 49152, 51200, 51201, 50944, 51072, - 51073, 51056, 0, 1, 49152, 51200, 51201, 50944, - 51072, 51073, 51056, 51058, 0, 1, 49152, 51200, - 51201, 50944, 51072, 51073, 51056, 0, 1, 49152, - 51200, 51201, 50944, 51072, 51073, 51056, 51060, 0, - 1, 49152, 51200, 51201, 50944, 51072, 51073, 51056, - 51060, 0, 1, 49152, 51200, 51201, 50944, 51072, - 51073, 51056, 51064, 51062, 0, 1, 49152, 51200, - 51201, 50944, 51072, 51073, 51056, 0, 1, 49152, - 51200, 51201, 50944, 51072, 51073, 51056, 51064, 0, - 1, 49152, 51200, 51201, 50944, 51072, 51073, 51075, - 51064, 0, 1, 49152, 51200, 51201, 50944, 51072, - 51073, 51075, 51064, 51066, 0, 1, 49152, 51200, - 51201, 50944, 51072, 51073, 51075, 51064, 0, 1, - 49152, 51200, 51201, 50944, 51072, 51073, 51075, 51064, - 51068, 0, 1, 49152, 51200, 51201, 50944, 51072, - 51073, 51075, 51064, 51068, 0, 1, 49152, 51200, - 51201, 50944, 51072, 51073, 51075, 51064, 51068, 51070, - 0, 1, 49152, 51200, 51201, 50944, 0, 1, - 49152, 51200, 51201, 50944, 51072, 0, 1, 49152, - 51200, 51201, 50944, 51072, 0, 1, 49152, 51200, - 51201, 50944, 51072, 51074, 0, 1, 49152, 51200, - 51201, 51203, 51072, 0, 1, 49152, 51200, 51201, - 51203, 51072, 51076, 0, 1, 49152, 51200, 51201, - 51203, 51072, 51076, 0, 1, 49152, 51200, 51201, - 51203, 51072, 51080, 51078, 0, 1, 49152, 51200, - 51201, 51203, 51072, 0, 1, 49152, 51200, 51201, - 51203, 51072, 51080, 0, 1, 49152, 51200, 51201, - 51203, 51072, 51080, 0, 1, 49152, 51200, 51201, - 51203, 51072, 51080, 51082, 0, 1, 49152, 51200, - 51201, 51203, 51072, 51080, 0, 1, 49152, 51200, - 51201, 51203, 51072, 51088, 51084, 0, 1, 49152, - 51200, 51201, 51203, 51072, 51088, 51084, 0, 1, - 49152, 51200, 51201, 51203, 51072, 51088, 51089, 51086, - 0, 1, 49152, 51200, 51201, 51203, 51072, 0, - 1, 49152, 51200, 51201, 51203, 51072, 51088, 0, - 1, 49152, 51200, 51201, 51203, 51072, 51088, 0, - 1, 49152, 51200, 51201, 51203, 51072, 51088, 51090, - 0, 1, 49152, 51200, 51201, 51203, 51072, 51088, - 0, 1, 49152, 51200, 51201, 51203, 51072, 51088, - 51092, 0, 1, 49152, 51200, 51201, 51203, 51072, - 51088, 51092, 0, 1, 49152, 51200, 51201, 51203, - 51072, 51088, 51096, 51094, 0, 1, 49152, 51200, - 51201, 51203, 51072, 51088, 0, 1, 49152, 51200, - 51201, 51203, 51072, 51104, 51096, 0, 1, 49152, - 51200, 51201, 51203, 51072, 51104, 51096, 0, 1, - 49152, 51200, 51201, 51203, 51072, 51104, 51096, 51098, - 0, 1, 49152, 51200, 51201, 51203, 51072, 51104, - 51096, 0, 1, 49152, 51200, 51201, 51203, 51072, - 51104, 51105, 51100, 0, 1, 49152, 51200, 51201, - 51203, 51072, 51104, 51105, 51100, 0, 1, 49152, - 51200, 51201, 51203, 51072, 51104, 51105, 51100, 51102, - 0, 1, 49152, 51200, 51201, 51203, 51072, 0, - 1, 49152, 51200, 51201, 51203, 51072, 51104, 0, - 1, 49152, 51200, 51201, 51203, 51072, 51104, 0, - 1, 49152, 51200, 51201, 51203, 51072, 51104, 51106, - 0, 1, 49152, 51200, 51201, 51203, 51072, 51104, - 0, 1, 49152, 51200, 51201, 51203, 51072, 51104, - 51108, 0, 1, 49152, 51200, 51201, 51203, 51072, - 51104, 51108, 0, 1, 49152, 51200, 51201, 51203, - 51072, 51104, 51112, 51110, 0, 1, 49152, 51200, - 51201, 51203, 51072, 51104, 0, 1, 49152, 51200, - 51201, 51203, 51072, 51104, 51112, 0, 1, 49152, - 51200, 51201, 51203, 51072, 51104, 51112, 0, 1, - 49152, 51200, 51201, 51203, 51072, 51104, 51112, 51114, - 0, 1, 49152, 51200, 51201, 51203, 51072, 51104, - 51112, 0, 1, 49152, 51200, 51201, 51203, 51072, - 51104, 51120, 51116, 0, 1, 49152, 51200, 51201, - 51203, 51072, 51104, 51120, 51116, 0, 1, 49152, - 51200, 51201, 51203, 51072, 51104, 51120, 51121, 51118, - 0, 1, 49152, 51200, 51201, 51203, 51072, 51104, - 0, 1, 49152, 51200, 51201, 51203, 51072, 51136, - 51120, 0, 1, 49152, 51200, 51201, 51203, 51072, - 51136, 51120, 0, 1, 49152, 51200, 51201, 51203, - 51072, 51136, 51120, 51122, 0, 1, 49152, 51200, - 51201, 51203, 51072, 51136, 51120, 0, 1, 49152, - 51200, 51201, 51203, 51072, 51136, 51120, 51124, 0, - 1, 49152, 51200, 51201, 51203, 51072, 51136, 51120, - 51124, 0, 1, 49152, 51200, 51201, 51203, 51072, - 51136, 51120, 51128, 51126, 0, 1, 49152, 51200, - 51201, 51203, 51072, 51136, 51120, 0, 1, 49152, - 51200, 51201, 51203, 51072, 51136, 51137, 51128, 0, - 1, 49152, 51200, 51201, 51203, 51072, 51136, 51137, - 51128, 0, 1, 49152, 51200, 51201, 51203, 51072, - 51136, 51137, 51128, 51130, 0, 1, 49152, 51200, - 51201, 51203, 51072, 51136, 51137, 51128, 0, 1, - 49152, 51200, 51201, 51203, 51072, 51136, 51137, 51128, - 51132, 0, 1, 49152, 51200, 51201, 51203, 51072, - 51136, 51137, 51139, 51132, 0, 1, 49152, 51200, - 51201, 51203, 51072, 51136, 51137, 51139, 51132, 51134, - 0, 1, 49152, 51200, 51201, 51203, 51072, 0, - 1, 49152, 51200, 51201, 51203, 51072, 51136, 0, - 1, 49152, 51200, 51201, 51203, 51072, 51136, 0, - 1, 49152, 51200, 51201, 51203, 51072, 51136, 51138, - 0, 1, 49152, 51200, 51201, 51203, 51072, 51136, - 0, 1, 49152, 51200, 51201, 51203, 51072, 51136, - 51140, 0, 1, 49152, 51200, 51201, 51203, 51072, - 51136, 51140, 0, 1, 49152, 51200, 51201, 51203, - 51072, 51136, 51144, 51142, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51136, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51136, 51144, 0, 1, 49152, - 51200, 51201, 51203, 51207, 51136, 51144, 0, 1, - 49152, 51200, 51201, 51203, 51207, 51136, 51144, 51146, - 0, 1, 49152, 51200, 51201, 51203, 51207, 51136, - 51144, 0, 1, 49152, 51200, 51201, 51203, 51207, - 51136, 51152, 51148, 0, 1, 49152, 51200, 51201, - 51203, 51207, 51136, 51152, 51148, 0, 1, 49152, - 51200, 51201, 51203, 51207, 51136, 51152, 51153, 51150, - 0, 1, 49152, 51200, 51201, 51203, 51207, 51136, - 0, 1, 49152, 51200, 51201, 51203, 51207, 51136, - 51152, 0, 1, 49152, 51200, 51201, 51203, 51207, - 51136, 51152, 0, 1, 49152, 51200, 51201, 51203, - 51207, 51136, 51152, 51154, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51136, 51152, 0, 1, 49152, - 51200, 51201, 51203, 51207, 51136, 51152, 51156, 0, - 1, 49152, 51200, 51201, 51203, 51207, 51136, 51152, - 51156, 0, 1, 49152, 51200, 51201, 51203, 51207, - 51136, 51152, 51160, 51158, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51136, 51152, 0, 1, 49152, - 51200, 51201, 51203, 51207, 51136, 51168, 51160, 0, - 1, 49152, 51200, 51201, 51203, 51207, 51136, 51168, - 51160, 0, 1, 49152, 51200, 51201, 51203, 51207, - 51136, 51168, 51160, 51162, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51136, 51168, 51160, 0, 1, - 49152, 51200, 51201, 51203, 51207, 51136, 51168, 51169, - 51164, 0, 1, 49152, 51200, 51201, 51203, 51207, - 51136, 51168, 51169, 51164, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51136, 51168, 51169, 51164, 51166, - 0, 1, 49152, 51200, 51201, 51203, 51207, 51136, - 0, 1, 49152, 51200, 51201, 51203, 51207, 51136, - 51168, 0, 1, 49152, 51200, 51201, 51203, 51207, - 51136, 51168, 0, 1, 49152, 51200, 51201, 51203, - 51207, 51136, 51168, 51170, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51136, 51168, 0, 1, 49152, - 51200, 51201, 51203, 51207, 51136, 51168, 51172, 0, - 1, 49152, 51200, 51201, 51203, 51207, 51136, 51168, - 51172, 0, 1, 49152, 51200, 51201, 51203, 51207, - 51136, 51168, 51176, 51174, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51136, 51168, 0, 1, 49152, - 51200, 51201, 51203, 51207, 51136, 51168, 51176, 0, - 1, 49152, 51200, 51201, 51203, 51207, 51136, 51168, - 51176, 0, 1, 49152, 51200, 51201, 51203, 51207, - 51136, 51168, 51176, 51178, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51136, 51168, 51176, 0, 1, - 49152, 51200, 51201, 51203, 51207, 51136, 51168, 51184, - 51180, 0, 1, 49152, 51200, 51201, 51203, 51207, - 51136, 51168, 51184, 51180, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51136, 51168, 51184, 51185, 51182, - 0, 1, 49152, 51200, 51201, 51203, 51207, 51215, - 51168, 0, 1, 49152, 51200, 51201, 51203, 51207, - 51215, 51168, 51184, 0, 1, 49152, 51200, 51201, - 51203, 51207, 51215, 51168, 51184, 0, 1, 49152, - 51200, 51201, 51203, 51207, 51215, 51168, 51184, 51186, - 0, 1, 49152, 51200, 51201, 51203, 51207, 51215, - 51168, 51184, 0, 1, 49152, 51200, 51201, 51203, - 51207, 51215, 51168, 51184, 51188, 0, 1, 49152, - 51200, 51201, 51203, 51207, 51215, 51168, 51184, 51188, - 0, 1, 49152, 51200, 51201, 51203, 51207, 51215, - 51168, 51184, 51192, 51190, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51215, 51168, 51184, 0, 1, - 49152, 51200, 51201, 51203, 51207, 51215, 51168, 51184, - 51192, 0, 1, 49152, 51200, 51201, 51203, 51207, - 51215, 51168, 51184, 51192, 0, 1, 49152, 51200, - 51201, 51203, 51207, 51215, 51168, 51184, 51192, 51194, - 0, 1, 49152, 51200, 51201, 51203, 51207, 51215, - 51168, 51184, 51192, 0, 1, 49152, 51200, 51201, - 51203, 51207, 51215, 51168, 51184, 51192, 51196, 0, - 1, 49152, 51200, 51201, 51203, 51207, 51215, 51168, - 51184, 51192, 51196, 0, 1, 49152, 51200, 51201, - 51203, 51207, 51215, 51168, 51184, 51192, 51196, 51198, - 0, 1, 49152, 0, 1, 49152, 51200, 0, - 1, 49152, 51200, 0, 1, 49152, 51200, 51202, - 0, 1, 49152, 51200, 0, 1, 49152, 51200, - 51204, 0, 1, 49152, 51200, 51204, 0, 1, - 49152, 51200, 51208, 51206, 0, 1, 49152, 51200, - 0, 1, 49152, 51200, 51208, 0, 1, 49152, - 51200, 51208, 0, 1, 49152, 51200, 51208, 51210, - 0, 1, 49152, 51200, 51208, 0, 1, 49152, - 51200, 51216, 51212, 0, 1, 49152, 51200, 51216, - 51212, 0, 1, 49152, 51200, 51216, 51217, 51214, - 0, 1, 49152, 51200, 0, 1, 49152, 51200, - 51216, 0, 1, 49152, 51200, 51216, 0, 1, - 49152, 51200, 51216, 51218, 0, 1, 49152, 51200, - 51216, 0, 1, 49152, 51200, 51216, 51220, 0, - 1, 49152, 51200, 51216, 51220, 0, 1, 49152, - 51200, 51216, 51224, 51222, 0, 1, 49152, 51200, - 51216, 0, 1, 49152, 51200, 51232, 51224, 0, - 1, 49152, 51200, 51232, 51224, 0, 1, 49152, - 51200, 51232, 51224, 51226, 0, 1, 49152, 51200, - 51232, 51224, 0, 1, 49152, 51200, 51232, 51233, - 51228, 0, 1, 49152, 51200, 51232, 51233, 51228, - 0, 1, 49152, 51200, 51232, 51233, 51228, 51230, - 0, 1, 49152, 51200, 0, 1, 49152, 51200, - 51232, 0, 1, 49152, 51200, 51232, 0, 1, - 49152, 51200, 51232, 51234, 0, 1, 49152, 51200, - 51232, 0, 1, 49152, 51200, 51232, 51236, 0, - 1, 49152, 51200, 51232, 51236, 0, 1, 49152, - 51200, 51232, 51240, 51238, 0, 1, 49152, 51200, - 51232, 0, 1, 49152, 51200, 51232, 51240, 0, - 1, 49152, 51200, 51232, 51240, 0, 1, 49152, - 51200, 51232, 51240, 51242, 0, 1, 49152, 51200, - 51232, 51240, 0, 1, 49152, 51200, 51232, 51248, - 51244, 0, 1, 49152, 51200, 51232, 51248, 51244, - 0, 1, 49152, 51200, 51232, 51248, 51249, 51246, - 0, 1, 49152, 51200, 51232, 0, 1, 49152, - 51200, 51264, 51248, 0, 1, 49152, 51200, 51264, - 51248, 0, 1, 49152, 51200, 51264, 51248, 51250, - 0, 1, 49152, 51200, 51264, 51248, 0, 1, - 49152, 51200, 51264, 51248, 51252, 0, 1, 49152, - 51200, 51264, 51248, 51252, 0, 1, 49152, 51200, - 51264, 51248, 51256, 51254, 0, 1, 49152, 51200, - 51264, 51248, 0, 1, 49152, 51200, 51264, 51265, - 51256, 0, 1, 49152, 51200, 51264, 51265, 51256, - 0, 1, 49152, 51200, 51264, 51265, 51256, 51258, - 0, 1, 49152, 51200, 51264, 51265, 51256, 0, - 1, 49152, 51200, 51264, 51265, 51256, 51260, 0, - 1, 49152, 51200, 51264, 51265, 51267, 51260, 0, - 1, 49152, 51200, 51264, 51265, 51267, 51260, 51262, - 0, 1, 49152, 51200, 0, 1, 49152, 51200, - 51264, 0, 1, 49152, 51200, 51264, 0, 1, - 49152, 51200, 51264, 51266, 0, 1, 49152, 51200, - 51264, 0, 1, 49152, 51200, 51264, 51268, 0, - 1, 49152, 51200, 51264, 51268, 0, 1, 49152, - 51200, 51264, 51272, 51270, 0, 1, 49152, 51200, - 51264, 0, 1, 49152, 51200, 51264, 51272, 0, - 1, 49152, 51200, 51264, 51272, 0, 1, 49152, - 51200, 51264, 51272, 51274, 0, 1, 49152, 51200, - 51264, 51272, 0, 1, 49152, 51200, 51264, 51280, - 51276, 0, 1, 49152, 51200, 51264, 51280, 51276, - 0, 1, 49152, 51200, 51264, 51280, 51281, 51278, - 0, 1, 49152, 51200, 51264, 0, 1, 49152, - 51200, 51264, 51280, 0, 1, 49152, 51200, 51264, - 51280, 0, 1, 49152, 51200, 51264, 51280, 51282, - 0, 1, 49152, 51200, 51264, 51280, 0, 1, - 49152, 51200, 51264, 51280, 51284, 0, 1, 49152, - 51200, 51264, 51280, 51284, 0, 1, 49152, 51200, - 51264, 51280, 51288, 51286, 0, 1, 49152, 51200, - 51264, 51280, 0, 1, 49152, 51200, 51264, 51296, - 51288, 0, 1, 49152, 51200, 51264, 51296, 51288, - 0, 1, 49152, 51200, 51264, 51296, 51288, 51290, - 0, 1, 49152, 51200, 51264, 51296, 51288, 0, - 1, 49152, 51200, 51264, 51296, 51297, 51292, 0, - 1, 49152, 51200, 51264, 51296, 51297, 51292, 0, - 1, 49152, 51200, 51264, 51296, 51297, 51292, 51294, - 0, 1, 49152, 51200, 51264, 0, 1, 49152, - 51200, 51328, 51296, 0, 1, 49152, 51200, 51328, - 51296, 0, 1, 49152, 51200, 51328, 51296, 51298, - 0, 1, 49152, 51200, 51328, 51296, 0, 1, - 49152, 51200, 51328, 51296, 51300, 0, 1, 49152, - 51200, 51328, 51296, 51300, 0, 1, 49152, 51200, - 51328, 51296, 51304, 51302, 0, 1, 49152, 51200, - 51328, 51296, 0, 1, 49152, 51200, 51328, 51296, - 51304, 0, 1, 49152, 51200, 51328, 51296, 51304, - 0, 1, 49152, 51200, 51328, 51296, 51304, 51306, - 0, 1, 49152, 51200, 51328, 51296, 51304, 0, - 1, 49152, 51200, 51328, 51296, 51312, 51308, 0, - 1, 49152, 51200, 51328, 51296, 51312, 51308, 0, - 1, 49152, 51200, 51328, 51296, 51312, 51313, 51310, - 0, 1, 49152, 51200, 51328, 51296, 0, 1, - 49152, 51200, 51328, 51329, 51312, 0, 1, 49152, - 51200, 51328, 51329, 51312, 0, 1, 49152, 51200, - 51328, 51329, 51312, 51314, 0, 1, 49152, 51200, - 51328, 51329, 51312, 0, 1, 49152, 51200, 51328, - 51329, 51312, 51316, 0, 1, 49152, 51200, 51328, - 51329, 51312, 51316, 0, 1, 49152, 51200, 51328, - 51329, 51312, 51320, 51318, 0, 1, 49152, 51200, - 51328, 51329, 51312, 0, 1, 49152, 51200, 51328, - 51329, 51312, 51320, 0, 1, 49152, 51200, 51328, - 51329, 51331, 51320, 0, 1, 49152, 51200, 51328, - 51329, 51331, 51320, 51322, 0, 1, 49152, 51200, - 51328, 51329, 51331, 51320, 0, 1, 49152, 51200, - 51328, 51329, 51331, 51320, 51324, 0, 1, 49152, - 51200, 51328, 51329, 51331, 51320, 51324, 0, 1, - 49152, 51200, 51328, 51329, 51331, 51320, 51324, 51326, - 0, 1, 49152, 51200, 0, 1, 49152, 51200, - 51328, 0, 1, 49152, 51200, 51328, 0, 1, - 49152, 51200, 51328, 51330, 0, 1, 49152, 51200, - 51328, 0, 1, 49152, 51200, 51328, 51332, 0, - 1, 49152, 51200, 51328, 51332, 0, 1, 49152, - 51200, 51328, 51336, 51334, 0, 1, 49152, 51200, - 51328, 0, 1, 49152, 51200, 51328, 51336, 0, - 1, 49152, 51200, 51328, 51336, 0, 1, 49152, - 51200, 51328, 51336, 51338, 0, 1, 49152, 51200, - 51328, 51336, 0, 1, 49152, 51200, 51328, 51344, - 51340, 0, 1, 49152, 51200, 51328, 51344, 51340, - 0, 1, 49152, 51200, 51328, 51344, 51345, 51342, - 0, 1, 49152, 51200, 51328, 0, 1, 49152, - 51200, 51328, 51344, 0, 1, 49152, 51200, 51328, - 51344, 0, 1, 49152, 51200, 51328, 51344, 51346, - 0, 1, 49152, 51200, 51328, 51344, 0, 1, - 49152, 51200, 51328, 51344, 51348, 0, 1, 49152, - 51200, 51328, 51344, 51348, 0, 1, 49152, 51200, - 51328, 51344, 51352, 51350, 0, 1, 49152, 51200, - 51328, 51344, 0, 1, 49152, 51200, 51328, 51360, - 51352, 0, 1, 49152, 51200, 51328, 51360, 51352, - 0, 1, 49152, 51200, 51328, 51360, 51352, 51354, - 0, 1, 49152, 51200, 51328, 51360, 51352, 0, - 1, 49152, 51200, 51328, 51360, 51361, 51356, 0, - 1, 49152, 51200, 51328, 51360, 51361, 51356, 0, - 1, 49152, 51200, 51328, 51360, 51361, 51356, 51358, - 0, 1, 49152, 51200, 51328, 0, 1, 49152, - 51200, 51328, 51360, 0, 1, 49152, 51200, 51328, - 51360, 0, 1, 49152, 51200, 51328, 51360, 51362, - 0, 1, 49152, 51200, 51328, 51360, 0, 1, - 49152, 51200, 51328, 51360, 51364, 0, 1, 49152, - 51200, 51328, 51360, 51364, 0, 1, 49152, 51200, - 51328, 51360, 51368, 51366, 0, 1, 49152, 51200, - 51328, 51360, 0, 1, 49152, 51200, 51328, 51360, - 51368, 0, 1, 49152, 51200, 51328, 51360, 51368, - 0, 1, 49152, 51200, 51328, 51360, 51368, 51370, - 0, 1, 49152, 51200, 51328, 51360, 51368, 0, - 1, 49152, 51200, 51328, 51360, 51376, 51372, 0, - 1, 49152, 51200, 51328, 51360, 51376, 51372, 0, - 1, 49152, 51200, 51328, 51360, 51376, 51377, 51374, - 0, 1, 49152, 51200, 51328, 51360, 0, 1, - 49152, 51200, 51328, 51392, 51376, 0, 1, 49152, - 51200, 51328, 51392, 51376, 0, 1, 49152, 51200, - 51328, 51392, 51376, 51378, 0, 1, 49152, 51200, - 51328, 51392, 51376, 0, 1, 49152, 51200, 51328, - 51392, 51376, 51380, 0, 1, 49152, 51200, 51328, - 51392, 51376, 51380, 0, 1, 49152, 51200, 51328, - 51392, 51376, 51384, 51382, 0, 1, 49152, 51200, - 51328, 51392, 51376, 0, 1, 49152, 51200, 51328, - 51392, 51393, 51384, 0, 1, 49152, 51200, 51328, - 51392, 51393, 51384, 0, 1, 49152, 51200, 51328, - 51392, 51393, 51384, 51386, 0, 1, 49152, 51200, - 51328, 51392, 51393, 51384, 0, 1, 49152, 51200, - 51328, 51392, 51393, 51384, 51388, 0, 1, 49152, - 51200, 51328, 51392, 51393, 51395, 51388, 0, 1, - 49152, 51200, 51328, 51392, 51393, 51395, 51388, 51390, - 0, 1, 49152, 51200, 51328, 0, 1, 49152, - 51200, 51456, 51392, 0, 1, 49152, 51200, 51456, - 51392, 0, 1, 49152, 51200, 51456, 51392, 51394, - 0, 1, 49152, 51200, 51456, 51392, 0, 1, - 49152, 51200, 51456, 51392, 51396, 0, 1, 49152, - 51200, 51456, 51392, 51396, 0, 1, 49152, 51200, - 51456, 51392, 51400, 51398, 0, 1, 49152, 51200, - 51456, 51392, 0, 1, 49152, 51200, 51456, 51392, - 51400, 0, 1, 49152, 51200, 51456, 51392, 51400, - 0, 1, 49152, 51200, 51456, 51392, 51400, 51402, - 0, 1, 49152, 51200, 51456, 51392, 51400, 0, - 1, 49152, 51200, 51456, 51392, 51408, 51404, 0, - 1, 49152, 51200, 51456, 51392, 51408, 51404, 0, - 1, 49152, 51200, 51456, 51392, 51408, 51409, 51406, - 0, 1, 49152, 51200, 51456, 51392, 0, 1, - 49152, 51200, 51456, 51392, 51408, 0, 1, 49152, - 51200, 51456, 51392, 51408, 0, 1, 49152, 51200, - 51456, 51392, 51408, 51410, 0, 1, 49152, 51200, - 51456, 51392, 51408, 0, 1, 49152, 51200, 51456, - 51392, 51408, 51412, 0, 1, 49152, 51200, 51456, - 51392, 51408, 51412, 0, 1, 49152, 51200, 51456, - 51392, 51408, 51416, 51414, 0, 1, 49152, 51200, - 51456, 51392, 51408, 0, 1, 49152, 51200, 51456, - 51392, 51424, 51416, 0, 1, 49152, 51200, 51456, - 51392, 51424, 51416, 0, 1, 49152, 51200, 51456, - 51392, 51424, 51416, 51418, 0, 1, 49152, 51200, - 51456, 51392, 51424, 51416, 0, 1, 49152, 51200, - 51456, 51392, 51424, 51425, 51420, 0, 1, 49152, - 51200, 51456, 51392, 51424, 51425, 51420, 0, 1, - 49152, 51200, 51456, 51392, 51424, 51425, 51420, 51422, - 0, 1, 49152, 51200, 51456, 51392, 0, 1, - 49152, 51200, 51456, 51457, 51424, 0, 1, 49152, - 51200, 51456, 51457, 51424, 0, 1, 49152, 51200, - 51456, 51457, 51424, 51426, 0, 1, 49152, 51200, - 51456, 51457, 51424, 0, 1, 49152, 51200, 51456, - 51457, 51424, 51428, 0, 1, 49152, 51200, 51456, - 51457, 51424, 51428, 0, 1, 49152, 51200, 51456, - 51457, 51424, 51432, 51430, 0, 1, 49152, 51200, - 51456, 51457, 51424, 0, 1, 49152, 51200, 51456, - 51457, 51424, 51432, 0, 1, 49152, 51200, 51456, - 51457, 51424, 51432, 0, 1, 49152, 51200, 51456, - 51457, 51424, 51432, 51434, 0, 1, 49152, 51200, - 51456, 51457, 51424, 51432, 0, 1, 49152, 51200, - 51456, 51457, 51424, 51440, 51436, 0, 1, 49152, - 51200, 51456, 51457, 51424, 51440, 51436, 0, 1, - 49152, 51200, 51456, 51457, 51424, 51440, 51441, 51438, - 0, 1, 49152, 51200, 51456, 51457, 51424, 0, - 1, 49152, 51200, 51456, 51457, 51424, 51440, 0, - 1, 49152, 51200, 51456, 51457, 51459, 51440, 0, - 1, 49152, 51200, 51456, 51457, 51459, 51440, 51442, - 0, 1, 49152, 51200, 51456, 51457, 51459, 51440, - 0, 1, 49152, 51200, 51456, 51457, 51459, 51440, - 51444, 0, 1, 49152, 51200, 51456, 51457, 51459, - 51440, 51444, 0, 1, 49152, 51200, 51456, 51457, - 51459, 51440, 51448, 51446, 0, 1, 49152, 51200, - 51456, 51457, 51459, 51440, 0, 1, 49152, 51200, - 51456, 51457, 51459, 51440, 51448, 0, 1, 49152, - 51200, 51456, 51457, 51459, 51440, 51448, 0, 1, - 49152, 51200, 51456, 51457, 51459, 51440, 51448, 51450, - 0, 1, 49152, 51200, 51456, 51457, 51459, 51463, - 51448, 0, 1, 49152, 51200, 51456, 51457, 51459, - 51463, 51448, 51452, 0, 1, 49152, 51200, 51456, - 51457, 51459, 51463, 51448, 51452, 0, 1, 49152, - 51200, 51456, 51457, 51459, 51463, 51448, 51452, 51454, - 0, 1, 49152, 51200, 0, 1, 49152, 51200, - 51456, 0, 1, 49152, 51200, 51456, 0, 1, - 49152, 51200, 51456, 51458, 0, 1, 49152, 51200, - 51456, 0, 1, 49152, 51200, 51456, 51460, 0, - 1, 49152, 51200, 51456, 51460, 0, 1, 49152, - 51200, 51456, 51464, 51462, 0, 1, 49152, 51200, - 51456, 0, 1, 49152, 51200, 51456, 51464, 0, - 1, 49152, 51200, 51456, 51464, 0, 1, 49152, - 51200, 51456, 51464, 51466, 0, 1, 49152, 51200, - 51456, 51464, 0, 1, 49152, 51200, 51456, 51472, - 51468, 0, 1, 49152, 51200, 51456, 51472, 51468, - 0, 1, 49152, 51200, 51456, 51472, 51473, 51470, - 0, 1, 49152, 51200, 51456, 0, 1, 49152, - 51200, 51456, 51472, 0, 1, 49152, 51200, 51456, - 51472, 0, 1, 49152, 51200, 51456, 51472, 51474, - 0, 1, 49152, 51200, 51456, 51472, 0, 1, - 49152, 51200, 51456, 51472, 51476, 0, 1, 49152, - 51200, 51456, 51472, 51476, 0, 1, 49152, 51200, - 51456, 51472, 51480, 51478, 0, 1, 49152, 51200, - 51456, 51472, 0, 1, 49152, 51200, 51456, 51488, - 51480, 0, 1, 49152, 51200, 51456, 51488, 51480, - 0, 1, 49152, 51200, 51456, 51488, 51480, 51482, - 0, 1, 49152, 51200, 51456, 51488, 51480, 0, - 1, 49152, 51200, 51456, 51488, 51489, 51484, 0, - 1, 49152, 51200, 51456, 51488, 51489, 51484, 0, - 1, 49152, 51200, 51456, 51488, 51489, 51484, 51486, - 0, 1, 49152, 51200, 51456, 0, 1, 49152, - 51200, 51456, 51488, 0, 1, 49152, 51200, 51456, - 51488, 0, 1, 49152, 51200, 51456, 51488, 51490, - 0, 1, 49152, 51200, 51456, 51488, 0, 1, - 49152, 51200, 51456, 51488, 51492, 0, 1, 49152, - 51200, 51456, 51488, 51492, 0, 1, 49152, 51200, - 51456, 51488, 51496, 51494, 0, 1, 49152, 51200, - 51456, 51488, 0, 1, 49152, 51200, 51456, 51488, - 51496, 0, 1, 49152, 51200, 51456, 51488, 51496, - 0, 1, 49152, 51200, 51456, 51488, 51496, 51498, - 0, 1, 49152, 51200, 51456, 51488, 51496, 0, - 1, 49152, 51200, 51456, 51488, 51504, 51500, 0, - 1, 49152, 51200, 51456, 51488, 51504, 51500, 0, - 1, 49152, 51200, 51456, 51488, 51504, 51505, 51502, - 0, 1, 49152, 51200, 51456, 51488, 0, 1, - 49152, 51200, 51456, 51520, 51504, 0, 1, 49152, - 51200, 51456, 51520, 51504, 0, 1, 49152, 51200, - 51456, 51520, 51504, 51506, 0, 1, 49152, 51200, - 51456, 51520, 51504, 0, 1, 49152, 51200, 51456, - 51520, 51504, 51508, 0, 1, 49152, 51200, 51456, - 51520, 51504, 51508, 0, 1, 49152, 51200, 51456, - 51520, 51504, 51512, 51510, 0, 1, 49152, 51200, - 51456, 51520, 51504, 0, 1, 49152, 51200, 51456, - 51520, 51521, 51512, 0, 1, 49152, 51200, 51456, - 51520, 51521, 51512, 0, 1, 49152, 51200, 51456, - 51520, 51521, 51512, 51514, 0, 1, 49152, 51200, - 51456, 51520, 51521, 51512, 0, 1, 49152, 51200, - 51456, 51520, 51521, 51512, 51516, 0, 1, 49152, - 51200, 51456, 51520, 51521, 51523, 51516, 0, 1, - 49152, 51200, 51456, 51520, 51521, 51523, 51516, 51518, - 0, 1, 49152, 51200, 51456, 0, 1, 49152, - 51200, 51456, 51520, 0, 1, 49152, 51200, 51456, - 51520, 0, 1, 49152, 51200, 51456, 51520, 51522, - 0, 1, 49152, 51200, 51456, 51520, 0, 1, - 49152, 51200, 51456, 51520, 51524, 0, 1, 49152, - 51200, 51456, 51520, 51524, 0, 1, 49152, 51200, - 51456, 51520, 51528, 51526, 0, 1, 49152, 51200, - 51456, 51520, 0, 1, 49152, 51200, 51456, 51520, - 51528, 0, 1, 49152, 51200, 51456, 51520, 51528, - 0, 1, 49152, 51200, 51456, 51520, 51528, 51530, - 0, 1, 49152, 51200, 51456, 51520, 51528, 0, - 1, 49152, 51200, 51456, 51520, 51536, 51532, 0, - 1, 49152, 51200, 51456, 51520, 51536, 51532, 0, - 1, 49152, 51200, 51456, 51520, 51536, 51537, 51534, - 0, 1, 49152, 51200, 51456, 51520, 0, 1, - 49152, 51200, 51456, 51520, 51536, 0, 1, 49152, - 51200, 51456, 51520, 51536, 0, 1, 49152, 51200, - 51456, 51520, 51536, 51538, 0, 1, 49152, 51200, - 51456, 51520, 51536, 0, 1, 49152, 51200, 51456, - 51520, 51536, 51540, 0, 1, 49152, 51200, 51456, - 51520, 51536, 51540, 0, 1, 49152, 51200, 51456, - 51520, 51536, 51544, 51542, 0, 1, 49152, 51200, - 51456, 51520, 51536, 0, 1, 49152, 51200, 51456, - 51520, 51552, 51544, 0, 1, 49152, 51200, 51456, - 51520, 51552, 51544, 0, 1, 49152, 51200, 51456, - 51520, 51552, 51544, 51546, 0, 1, 49152, 51200, - 51456, 51520, 51552, 51544, 0, 1, 49152, 51200, - 51456, 51520, 51552, 51553, 51548, 0, 1, 49152, - 51200, 51456, 51520, 51552, 51553, 51548, 0, 1, - 49152, 51200, 51456, 51520, 51552, 51553, 51548, 51550, - 0, 1, 49152, 51200, 51456, 51520, 0, 1, - 49152, 51200, 51456, 51584, 51552, 0, 1, 49152, - 51200, 51456, 51584, 51552, 0, 1, 49152, 51200, - 51456, 51584, 51552, 51554, 0, 1, 49152, 51200, - 51456, 51584, 51552, 0, 1, 49152, 51200, 51456, - 51584, 51552, 51556, 0, 1, 49152, 51200, 51456, - 51584, 51552, 51556, 0, 1, 49152, 51200, 51456, - 51584, 51552, 51560, 51558, 0, 1, 49152, 51200, - 51456, 51584, 51552, 0, 1, 49152, 51200, 51456, - 51584, 51552, 51560, 0, 1, 49152, 51200, 51456, - 51584, 51552, 51560, 0, 1, 49152, 51200, 51456, - 51584, 51552, 51560, 51562, 0, 1, 49152, 51200, - 51456, 51584, 51552, 51560, 0, 1, 49152, 51200, - 51456, 51584, 51552, 51568, 51564, 0, 1, 49152, - 51200, 51456, 51584, 51552, 51568, 51564, 0, 1, - 49152, 51200, 51456, 51584, 51552, 51568, 51569, 51566, - 0, 1, 49152, 51200, 51456, 51584, 51552, 0, - 1, 49152, 51200, 51456, 51584, 51585, 51568, 0, - 1, 49152, 51200, 51456, 51584, 51585, 51568, 0, - 1, 49152, 51200, 51456, 51584, 51585, 51568, 51570, - 0, 1, 49152, 51200, 51456, 51584, 51585, 51568, - 0, 1, 49152, 51200, 51456, 51584, 51585, 51568, - 51572, 0, 1, 49152, 51200, 51456, 51584, 51585, - 51568, 51572, 0, 1, 49152, 51200, 51456, 51584, - 51585, 51568, 51576, 51574, 0, 1, 49152, 51200, - 51456, 51584, 51585, 51568, 0, 1, 49152, 51200, - 51456, 51584, 51585, 51568, 51576, 0, 1, 49152, - 51200, 51456, 51584, 51585, 51587, 51576, 0, 1, - 49152, 51200, 51456, 51584, 51585, 51587, 51576, 51578, - 0, 1, 49152, 51200, 51456, 51584, 51585, 51587, - 51576, 0, 1, 49152, 51200, 51456, 51584, 51585, - 51587, 51576, 51580, 0, 1, 49152, 51200, 51456, - 51584, 51585, 51587, 51576, 51580, 0, 1, 49152, - 51200, 51456, 51584, 51585, 51587, 51576, 51580, 51582, - 0, 1, 49152, 51200, 51456, 0, 1, 49152, - 51200, 51712, 51584, 0, 1, 49152, 51200, 51712, - 51584, 0, 1, 49152, 51200, 51712, 51584, 51586, - 0, 1, 49152, 51200, 51712, 51584, 0, 1, - 49152, 51200, 51712, 51584, 51588, 0, 1, 49152, - 51200, 51712, 51584, 51588, 0, 1, 49152, 51200, - 51712, 51584, 51592, 51590, 0, 1, 49152, 51200, - 51712, 51584, 0, 1, 49152, 51200, 51712, 51584, - 51592, 0, 1, 49152, 51200, 51712, 51584, 51592, - 0, 1, 49152, 51200, 51712, 51584, 51592, 51594, - 0, 1, 49152, 51200, 51712, 51584, 51592, 0, - 1, 49152, 51200, 51712, 51584, 51600, 51596, 0, - 1, 49152, 51200, 51712, 51584, 51600, 51596, 0, - 1, 49152, 51200, 51712, 51584, 51600, 51601, 51598, - 0, 1, 49152, 51200, 51712, 51584, 0, 1, - 49152, 51200, 51712, 51584, 51600, 0, 1, 49152, - 51200, 51712, 51584, 51600, 0, 1, 49152, 51200, - 51712, 51584, 51600, 51602, 0, 1, 49152, 51200, - 51712, 51584, 51600, 0, 1, 49152, 51200, 51712, - 51584, 51600, 51604, 0, 1, 49152, 51200, 51712, - 51584, 51600, 51604, 0, 1, 49152, 51200, 51712, - 51584, 51600, 51608, 51606, 0, 1, 49152, 51200, - 51712, 51584, 51600, 0, 1, 49152, 51200, 51712, - 51584, 51616, 51608, 0, 1, 49152, 51200, 51712, - 51584, 51616, 51608, 0, 1, 49152, 51200, 51712, - 51584, 51616, 51608, 51610, 0, 1, 49152, 51200, - 51712, 51584, 51616, 51608, 0, 1, 49152, 51200, - 51712, 51584, 51616, 51617, 51612, 0, 1, 49152, - 51200, 51712, 51584, 51616, 51617, 51612, 0, 1, - 49152, 51200, 51712, 51584, 51616, 51617, 51612, 51614, - 0, 1, 49152, 51200, 51712, 51584, 0, 1, - 49152, 51200, 51712, 51584, 51616, 0, 1, 49152, - 51200, 51712, 51584, 51616, 0, 1, 49152, 51200, - 51712, 51584, 51616, 51618, 0, 1, 49152, 51200, - 51712, 51584, 51616, 0, 1, 49152, 51200, 51712, - 51584, 51616, 51620, 0, 1, 49152, 51200, 51712, - 51584, 51616, 51620, 0, 1, 49152, 51200, 51712, - 51584, 51616, 51624, 51622, 0, 1, 49152, 51200, - 51712, 51584, 51616, 0, 1, 49152, 51200, 51712, - 51584, 51616, 51624, 0, 1, 49152, 51200, 51712, - 51584, 51616, 51624, 0, 1, 49152, 51200, 51712, - 51584, 51616, 51624, 51626, 0, 1, 49152, 51200, - 51712, 51584, 51616, 51624, 0, 1, 49152, 51200, - 51712, 51584, 51616, 51632, 51628, 0, 1, 49152, - 51200, 51712, 51584, 51616, 51632, 51628, 0, 1, - 49152, 51200, 51712, 51584, 51616, 51632, 51633, 51630, - 0, 1, 49152, 51200, 51712, 51584, 51616, 0, - 1, 49152, 51200, 51712, 51584, 51648, 51632, 0, - 1, 49152, 51200, 51712, 51584, 51648, 51632, 0, - 1, 49152, 51200, 51712, 51584, 51648, 51632, 51634, - 0, 1, 49152, 51200, 51712, 51584, 51648, 51632, - 0, 1, 49152, 51200, 51712, 51584, 51648, 51632, - 51636, 0, 1, 49152, 51200, 51712, 51584, 51648, - 51632, 51636, 0, 1, 49152, 51200, 51712, 51584, - 51648, 51632, 51640, 51638, 0, 1, 49152, 51200, - 51712, 51584, 51648, 51632, 0, 1, 49152, 51200, - 51712, 51584, 51648, 51649, 51640, 0, 1, 49152, - 51200, 51712, 51584, 51648, 51649, 51640, 0, 1, - 49152, 51200, 51712, 51584, 51648, 51649, 51640, 51642, - 0, 1, 49152, 51200, 51712, 51584, 51648, 51649, - 51640, 0, 1, 49152, 51200, 51712, 51584, 51648, - 51649, 51640, 51644, 0, 1, 49152, 51200, 51712, - 51584, 51648, 51649, 51651, 51644, 0, 1, 49152, - 51200, 51712, 51584, 51648, 51649, 51651, 51644, 51646, - 0, 1, 49152, 51200, 51712, 51584, 0, 1, - 49152, 51200, 51712, 51713, 51648, 0, 1, 49152, - 51200, 51712, 51713, 51648, 0, 1, 49152, 51200, - 51712, 51713, 51648, 51650, 0, 1, 49152, 51200, - 51712, 51713, 51648, 0, 1, 49152, 51200, 51712, - 51713, 51648, 51652, 0, 1, 49152, 51200, 51712, - 51713, 51648, 51652, 0, 1, 49152, 51200, 51712, - 51713, 51648, 51656, 51654, 0, 1, 49152, 51200, - 51712, 51713, 51648, 0, 1, 49152, 51200, 51712, - 51713, 51648, 51656, 0, 1, 49152, 51200, 51712, - 51713, 51648, 51656, 0, 1, 49152, 51200, 51712, - 51713, 51648, 51656, 51658, 0, 1, 49152, 51200, - 51712, 51713, 51648, 51656, 0, 1, 49152, 51200, - 51712, 51713, 51648, 51664, 51660, 0, 1, 49152, - 51200, 51712, 51713, 51648, 51664, 51660, 0, 1, - 49152, 51200, 51712, 51713, 51648, 51664, 51665, 51662, - 0, 1, 49152, 51200, 51712, 51713, 51648, 0, - 1, 49152, 51200, 51712, 51713, 51648, 51664, 0, - 1, 49152, 51200, 51712, 51713, 51648, 51664, 0, - 1, 49152, 51200, 51712, 51713, 51648, 51664, 51666, - 0, 1, 49152, 51200, 51712, 51713, 51648, 51664, - 0, 1, 49152, 51200, 51712, 51713, 51648, 51664, - 51668, 0, 1, 49152, 51200, 51712, 51713, 51648, - 51664, 51668, 0, 1, 49152, 51200, 51712, 51713, - 51648, 51664, 51672, 51670, 0, 1, 49152, 51200, - 51712, 51713, 51648, 51664, 0, 1, 49152, 51200, - 51712, 51713, 51648, 51680, 51672, 0, 1, 49152, - 51200, 51712, 51713, 51648, 51680, 51672, 0, 1, - 49152, 51200, 51712, 51713, 51648, 51680, 51672, 51674, - 0, 1, 49152, 51200, 51712, 51713, 51648, 51680, - 51672, 0, 1, 49152, 51200, 51712, 51713, 51648, - 51680, 51681, 51676, 0, 1, 49152, 51200, 51712, - 51713, 51648, 51680, 51681, 51676, 0, 1, 49152, - 51200, 51712, 51713, 51648, 51680, 51681, 51676, 51678, - 0, 1, 49152, 51200, 51712, 51713, 51648, 0, - 1, 49152, 51200, 51712, 51713, 51648, 51680, 0, - 1, 49152, 51200, 51712, 51713, 51715, 51680, 0, - 1, 49152, 51200, 51712, 51713, 51715, 51680, 51682, - 0, 1, 49152, 51200, 51712, 51713, 51715, 51680, - 0, 1, 49152, 51200, 51712, 51713, 51715, 51680, - 51684, 0, 1, 49152, 51200, 51712, 51713, 51715, - 51680, 51684, 0, 1, 49152, 51200, 51712, 51713, - 51715, 51680, 51688, 51686, 0, 1, 49152, 51200, - 51712, 51713, 51715, 51680, 0, 1, 49152, 51200, - 51712, 51713, 51715, 51680, 51688, 0, 1, 49152, - 51200, 51712, 51713, 51715, 51680, 51688, 0, 1, - 49152, 51200, 51712, 51713, 51715, 51680, 51688, 51690, - 0, 1, 49152, 51200, 51712, 51713, 51715, 51680, - 51688, 0, 1, 49152, 51200, 51712, 51713, 51715, - 51680, 51696, 51692, 0, 1, 49152, 51200, 51712, - 51713, 51715, 51680, 51696, 51692, 0, 1, 49152, - 51200, 51712, 51713, 51715, 51680, 51696, 51697, 51694, - 0, 1, 49152, 51200, 51712, 51713, 51715, 51680, - 0, 1, 49152, 51200, 51712, 51713, 51715, 51680, - 51696, 0, 1, 49152, 51200, 51712, 51713, 51715, - 51680, 51696, 0, 1, 49152, 51200, 51712, 51713, - 51715, 51680, 51696, 51698, 0, 1, 49152, 51200, - 51712, 51713, 51715, 51719, 51696, 0, 1, 49152, - 51200, 51712, 51713, 51715, 51719, 51696, 51700, 0, - 1, 49152, 51200, 51712, 51713, 51715, 51719, 51696, - 51700, 0, 1, 49152, 51200, 51712, 51713, 51715, - 51719, 51696, 51704, 51702, 0, 1, 49152, 51200, - 51712, 51713, 51715, 51719, 51696, 0, 1, 49152, - 51200, 51712, 51713, 51715, 51719, 51696, 51704, 0, - 1, 49152, 51200, 51712, 51713, 51715, 51719, 51696, - 51704, 0, 1, 49152, 51200, 51712, 51713, 51715, - 51719, 51696, 51704, 51706, 0, 1, 49152, 51200, - 51712, 51713, 51715, 51719, 51696, 51704, 0, 1, - 49152, 51200, 51712, 51713, 51715, 51719, 51696, 51704, - 51708, 0, 1, 49152, 51200, 51712, 51713, 51715, - 51719, 51696, 51704, 51708, 0, 1, 49152, 51200, - 51712, 51713, 51715, 51719, 51696, 51704, 51708, 51710, - 0, 1, 49152, 51200, 0, 1, 49152, 51200, - 51712, 0, 1, 49152, 51200, 51712, 0, 1, - 49152, 51200, 51712, 51714, 0, 1, 49152, 51200, - 51712, 0, 1, 49152, 51200, 51712, 51716, 0, - 1, 49152, 51200, 51712, 51716, 0, 1, 49152, - 51200, 51712, 51720, 51718, 0, 1, 49152, 51200, - 51712, 0, 1, 49152, 51200, 51712, 51720, 0, - 1, 49152, 51200, 51712, 51720, 0, 1, 49152, - 51200, 51712, 51720, 51722, 0, 1, 49152, 51200, - 51712, 51720, 0, 1, 49152, 51200, 51712, 51728, - 51724, 0, 1, 49152, 51200, 51712, 51728, 51724, - 0, 1, 49152, 51200, 51712, 51728, 51729, 51726, - 0, 1, 49152, 51200, 51712, 0, 1, 49152, - 51200, 51712, 51728, 0, 1, 49152, 51200, 51712, - 51728, 0, 1, 49152, 51200, 51712, 51728, 51730, - 0, 1, 49152, 51200, 51712, 51728, 0, 1, - 49152, 51200, 51712, 51728, 51732, 0, 1, 49152, - 51200, 51712, 51728, 51732, 0, 1, 49152, 51200, - 51712, 51728, 51736, 51734, 0, 1, 49152, 51200, - 51712, 51728, 0, 1, 49152, 51200, 51712, 51744, - 51736, 0, 1, 49152, 51200, 51712, 51744, 51736, - 0, 1, 49152, 51200, 51712, 51744, 51736, 51738, - 0, 1, 49152, 51200, 51712, 51744, 51736, 0, - 1, 49152, 51200, 51712, 51744, 51745, 51740, 0, - 1, 49152, 51200, 51712, 51744, 51745, 51740, 0, - 1, 49152, 51200, 51712, 51744, 51745, 51740, 51742, - 0, 1, 49152, 51200, 51712, 0, 1, 49152, - 51200, 51712, 51744, 0, 1, 49152, 51200, 51712, - 51744, 0, 1, 49152, 51200, 51712, 51744, 51746, - 0, 1, 49152, 51200, 51712, 51744, 0, 1, - 49152, 51200, 51712, 51744, 51748, 0, 1, 49152, - 51200, 51712, 51744, 51748, 0, 1, 49152, 51200, - 51712, 51744, 51752, 51750, 0, 1, 49152, 51200, - 51712, 51744, 0, 1, 49152, 51200, 51712, 51744, - 51752, 0, 1, 49152, 51200, 51712, 51744, 51752, - 0, 1, 49152, 51200, 51712, 51744, 51752, 51754, - 0, 1, 49152, 51200, 51712, 51744, 51752, 0, - 1, 49152, 51200, 51712, 51744, 51760, 51756, 0, - 1, 49152, 51200, 51712, 51744, 51760, 51756, 0, - 1, 49152, 51200, 51712, 51744, 51760, 51761, 51758, - 0, 1, 49152, 51200, 51712, 51744, 0, 1, - 49152, 51200, 51712, 51776, 51760, 0, 1, 49152, - 51200, 51712, 51776, 51760, 0, 1, 49152, 51200, - 51712, 51776, 51760, 51762, 0, 1, 49152, 51200, - 51712, 51776, 51760, 0, 1, 49152, 51200, 51712, - 51776, 51760, 51764, 0, 1, 49152, 51200, 51712, - 51776, 51760, 51764, 0, 1, 49152, 51200, 51712, - 51776, 51760, 51768, 51766, 0, 1, 49152, 51200, - 51712, 51776, 51760, 0, 1, 49152, 51200, 51712, - 51776, 51777, 51768, 0, 1, 49152, 51200, 51712, - 51776, 51777, 51768, 0, 1, 49152, 51200, 51712, - 51776, 51777, 51768, 51770, 0, 1, 49152, 51200, - 51712, 51776, 51777, 51768, 0, 1, 49152, 51200, - 51712, 51776, 51777, 51768, 51772, 0, 1, 49152, - 51200, 51712, 51776, 51777, 51779, 51772, 0, 1, - 49152, 51200, 51712, 51776, 51777, 51779, 51772, 51774, - 0, 1, 49152, 51200, 51712, 0, 1, 49152, - 51200, 51712, 51776, 0, 1, 49152, 51200, 51712, - 51776, 0, 1, 49152, 51200, 51712, 51776, 51778, - 0, 1, 49152, 51200, 51712, 51776, 0, 1, - 49152, 51200, 51712, 51776, 51780, 0, 1, 49152, - 51200, 51712, 51776, 51780, 0, 1, 49152, 51200, - 51712, 51776, 51784, 51782, 0, 1, 49152, 51200, - 51712, 51776, 0, 1, 49152, 51200, 51712, 51776, - 51784, 0, 1, 49152, 51200, 51712, 51776, 51784, - 0, 1, 49152, 51200, 51712, 51776, 51784, 51786, - 0, 1, 49152, 51200, 51712, 51776, 51784, 0, - 1, 49152, 51200, 51712, 51776, 51792, 51788, 0, - 1, 49152, 51200, 51712, 51776, 51792, 51788, 0, - 1, 49152, 51200, 51712, 51776, 51792, 51793, 51790, - 0, 1, 49152, 51200, 51712, 51776, 0, 1, - 49152, 51200, 51712, 51776, 51792, 0, 1, 49152, - 51200, 51712, 51776, 51792, 0, 1, 49152, 51200, - 51712, 51776, 51792, 51794, 0, 1, 49152, 51200, - 51712, 51776, 51792, 0, 1, 49152, 51200, 51712, - 51776, 51792, 51796, 0, 1, 49152, 51200, 51712, - 51776, 51792, 51796, 0, 1, 49152, 51200, 51712, - 51776, 51792, 51800, 51798, 0, 1, 49152, 51200, - 51712, 51776, 51792, 0, 1, 49152, 51200, 51712, - 51776, 51808, 51800, 0, 1, 49152, 51200, 51712, - 51776, 51808, 51800, 0, 1, 49152, 51200, 51712, - 51776, 51808, 51800, 51802, 0, 1, 49152, 51200, - 51712, 51776, 51808, 51800, 0, 1, 49152, 51200, - 51712, 51776, 51808, 51809, 51804, 0, 1, 49152, - 51200, 51712, 51776, 51808, 51809, 51804, 0, 1, - 49152, 51200, 51712, 51776, 51808, 51809, 51804, 51806, - 0, 1, 49152, 51200, 51712, 51776, 0, 1, - 49152, 51200, 51712, 51840, 51808, 0, 1, 49152, - 51200, 51712, 51840, 51808, 0, 1, 49152, 51200, - 51712, 51840, 51808, 51810, 0, 1, 49152, 51200, - 51712, 51840, 51808, 0, 1, 49152, 51200, 51712, - 51840, 51808, 51812, 0, 1, 49152, 51200, 51712, - 51840, 51808, 51812, 0, 1, 49152, 51200, 51712, - 51840, 51808, 51816, 51814, 0, 1, 49152, 51200, - 51712, 51840, 51808, 0, 1, 49152, 51200, 51712, - 51840, 51808, 51816, 0, 1, 49152, 51200, 51712, - 51840, 51808, 51816, 0, 1, 49152, 51200, 51712, - 51840, 51808, 51816, 51818, 0, 1, 49152, 51200, - 51712, 51840, 51808, 51816, 0, 1, 49152, 51200, - 51712, 51840, 51808, 51824, 51820, 0, 1, 49152, - 51200, 51712, 51840, 51808, 51824, 51820, 0, 1, - 49152, 51200, 51712, 51840, 51808, 51824, 51825, 51822, - 0, 1, 49152, 51200, 51712, 51840, 51808, 0, - 1, 49152, 51200, 51712, 51840, 51841, 51824, 0, - 1, 49152, 51200, 51712, 51840, 51841, 51824, 0, - 1, 49152, 51200, 51712, 51840, 51841, 51824, 51826, - 0, 1, 49152, 51200, 51712, 51840, 51841, 51824, - 0, 1, 49152, 51200, 51712, 51840, 51841, 51824, - 51828, 0, 1, 49152, 51200, 51712, 51840, 51841, - 51824, 51828, 0, 1, 49152, 51200, 51712, 51840, - 51841, 51824, 51832, 51830, 0, 1, 49152, 51200, - 51712, 51840, 51841, 51824, 0, 1, 49152, 51200, - 51712, 51840, 51841, 51824, 51832, 0, 1, 49152, - 51200, 51712, 51840, 51841, 51843, 51832, 0, 1, - 49152, 51200, 51712, 51840, 51841, 51843, 51832, 51834, - 0, 1, 49152, 51200, 51712, 51840, 51841, 51843, - 51832, 0, 1, 49152, 51200, 51712, 51840, 51841, - 51843, 51832, 51836, 0, 1, 49152, 51200, 51712, - 51840, 51841, 51843, 51832, 51836, 0, 1, 49152, - 51200, 51712, 51840, 51841, 51843, 51832, 51836, 51838, - 0, 1, 49152, 51200, 51712, 0, 1, 49152, - 51200, 51712, 51840, 0, 1, 49152, 51200, 51712, - 51840, 0, 1, 49152, 51200, 51712, 51840, 51842, - 0, 1, 49152, 51200, 51712, 51840, 0, 1, - 49152, 51200, 51712, 51840, 51844, 0, 1, 49152, - 51200, 51712, 51840, 51844, 0, 1, 49152, 51200, - 51712, 51840, 51848, 51846, 0, 1, 49152, 51200, - 51712, 51840, 0, 1, 49152, 51200, 51712, 51840, - 51848, 0, 1, 49152, 51200, 51712, 51840, 51848, - 0, 1, 49152, 51200, 51712, 51840, 51848, 51850, - 0, 1, 49152, 51200, 51712, 51840, 51848, 0, - 1, 49152, 51200, 51712, 51840, 51856, 51852, 0, - 1, 49152, 51200, 51712, 51840, 51856, 51852, 0, - 1, 49152, 51200, 51712, 51840, 51856, 51857, 51854, - 0, 1, 49152, 51200, 51712, 51840, 0, 1, - 49152, 51200, 51712, 51840, 51856, 0, 1, 49152, - 51200, 51712, 51840, 51856, 0, 1, 49152, 51200, - 51712, 51840, 51856, 51858, 0, 1, 49152, 51200, - 51712, 51840, 51856, 0, 1, 49152, 51200, 51712, - 51840, 51856, 51860, 0, 1, 49152, 51200, 51712, - 51840, 51856, 51860, 0, 1, 49152, 51200, 51712, - 51840, 51856, 51864, 51862, 0, 1, 49152, 51200, - 51712, 51840, 51856, 0, 1, 49152, 51200, 51712, - 51840, 51872, 51864, 0, 1, 49152, 51200, 51712, - 51840, 51872, 51864, 0, 1, 49152, 51200, 51712, - 51840, 51872, 51864, 51866, 0, 1, 49152, 51200, - 51712, 51840, 51872, 51864, 0, 1, 49152, 51200, - 51712, 51840, 51872, 51873, 51868, 0, 1, 49152, - 51200, 51712, 51840, 51872, 51873, 51868, 0, 1, - 49152, 51200, 51712, 51840, 51872, 51873, 51868, 51870, - 0, 1, 49152, 51200, 51712, 51840, 0, 1, - 49152, 51200, 51712, 51840, 51872, 0, 1, 49152, - 51200, 51712, 51840, 51872, 0, 1, 49152, 51200, - 51712, 51840, 51872, 51874, 0, 1, 49152, 51200, - 51712, 51840, 51872, 0, 1, 49152, 51200, 51712, - 51840, 51872, 51876, 0, 1, 49152, 51200, 51712, - 51840, 51872, 51876, 0, 1, 49152, 51200, 51712, - 51840, 51872, 51880, 51878, 0, 1, 49152, 51200, - 51712, 51840, 51872, 0, 1, 49152, 51200, 51712, - 51840, 51872, 51880, 0, 1, 49152, 51200, 51712, - 51840, 51872, 51880, 0, 1, 49152, 51200, 51712, - 51840, 51872, 51880, 51882, 0, 1, 49152, 51200, - 51712, 51840, 51872, 51880, 0, 1, 49152, 51200, - 51712, 51840, 51872, 51888, 51884, 0, 1, 49152, - 51200, 51712, 51840, 51872, 51888, 51884, 0, 1, - 49152, 51200, 51712, 51840, 51872, 51888, 51889, 51886, - 0, 1, 49152, 51200, 51712, 51840, 51872, 0, - 1, 49152, 51200, 51712, 51840, 51904, 51888, 0, - 1, 49152, 51200, 51712, 51840, 51904, 51888, 0, - 1, 49152, 51200, 51712, 51840, 51904, 51888, 51890, - 0, 1, 49152, 51200, 51712, 51840, 51904, 51888, - 0, 1, 49152, 51200, 51712, 51840, 51904, 51888, - 51892, 0, 1, 49152, 51200, 51712, 51840, 51904, - 51888, 51892, 0, 1, 49152, 51200, 51712, 51840, - 51904, 51888, 51896, 51894, 0, 1, 49152, 51200, - 51712, 51840, 51904, 51888, 0, 1, 49152, 51200, - 51712, 51840, 51904, 51905, 51896, 0, 1, 49152, - 51200, 51712, 51840, 51904, 51905, 51896, 0, 1, - 49152, 51200, 51712, 51840, 51904, 51905, 51896, 51898, - 0, 1, 49152, 51200, 51712, 51840, 51904, 51905, - 51896, 0, 1, 49152, 51200, 51712, 51840, 51904, - 51905, 51896, 51900, 0, 1, 49152, 51200, 51712, - 51840, 51904, 51905, 51907, 51900, 0, 1, 49152, - 51200, 51712, 51840, 51904, 51905, 51907, 51900, 51902, - 0, 1, 49152, 51200, 51712, 51840, 0, 1, - 49152, 51200, 51712, 51968, 51904, 0, 1, 49152, - 51200, 51712, 51968, 51904, 0, 1, 49152, 51200, - 51712, 51968, 51904, 51906, 0, 1, 49152, 51200, - 51712, 51968, 51904, 0, 1, 49152, 51200, 51712, - 51968, 51904, 51908, 0, 1, 49152, 51200, 51712, - 51968, 51904, 51908, 0, 1, 49152, 51200, 51712, - 51968, 51904, 51912, 51910, 0, 1, 49152, 51200, - 51712, 51968, 51904, 0, 1, 49152, 51200, 51712, - 51968, 51904, 51912, 0, 1, 49152, 51200, 51712, - 51968, 51904, 51912, 0, 1, 49152, 51200, 51712, - 51968, 51904, 51912, 51914, 0, 1, 49152, 51200, - 51712, 51968, 51904, 51912, 0, 1, 49152, 51200, - 51712, 51968, 51904, 51920, 51916, 0, 1, 49152, - 51200, 51712, 51968, 51904, 51920, 51916, 0, 1, - 49152, 51200, 51712, 51968, 51904, 51920, 51921, 51918, - 0, 1, 49152, 51200, 51712, 51968, 51904, 0, - 1, 49152, 51200, 51712, 51968, 51904, 51920, 0, - 1, 49152, 51200, 51712, 51968, 51904, 51920, 0, - 1, 49152, 51200, 51712, 51968, 51904, 51920, 51922, - 0, 1, 49152, 51200, 51712, 51968, 51904, 51920, - 0, 1, 49152, 51200, 51712, 51968, 51904, 51920, - 51924, 0, 1, 49152, 51200, 51712, 51968, 51904, - 51920, 51924, 0, 1, 49152, 51200, 51712, 51968, - 51904, 51920, 51928, 51926, 0, 1, 49152, 51200, - 51712, 51968, 51904, 51920, 0, 1, 49152, 51200, - 51712, 51968, 51904, 51936, 51928, 0, 1, 49152, - 51200, 51712, 51968, 51904, 51936, 51928, 0, 1, - 49152, 51200, 51712, 51968, 51904, 51936, 51928, 51930, - 0, 1, 49152, 51200, 51712, 51968, 51904, 51936, - 51928, 0, 1, 49152, 51200, 51712, 51968, 51904, - 51936, 51937, 51932, 0, 1, 49152, 51200, 51712, - 51968, 51904, 51936, 51937, 51932, 0, 1, 49152, - 51200, 51712, 51968, 51904, 51936, 51937, 51932, 51934, - 0, 1, 49152, 51200, 51712, 51968, 51904, 0, - 1, 49152, 51200, 51712, 51968, 51969, 51936, 0, - 1, 49152, 51200, 51712, 51968, 51969, 51936, 0, - 1, 49152, 51200, 51712, 51968, 51969, 51936, 51938, - 0, 1, 49152, 51200, 51712, 51968, 51969, 51936, - 0, 1, 49152, 51200, 51712, 51968, 51969, 51936, - 51940, 0, 1, 49152, 51200, 51712, 51968, 51969, - 51936, 51940, 0, 1, 49152, 51200, 51712, 51968, - 51969, 51936, 51944, 51942, 0, 1, 49152, 51200, - 51712, 51968, 51969, 51936, 0, 1, 49152, 51200, - 51712, 51968, 51969, 51936, 51944, 0, 1, 49152, - 51200, 51712, 51968, 51969, 51936, 51944, 0, 1, - 49152, 51200, 51712, 51968, 51969, 51936, 51944, 51946, - 0, 1, 49152, 51200, 51712, 51968, 51969, 51936, - 51944, 0, 1, 49152, 51200, 51712, 51968, 51969, - 51936, 51952, 51948, 0, 1, 49152, 51200, 51712, - 51968, 51969, 51936, 51952, 51948, 0, 1, 49152, - 51200, 51712, 51968, 51969, 51936, 51952, 51953, 51950, - 0, 1, 49152, 51200, 51712, 51968, 51969, 51936, - 0, 1, 49152, 51200, 51712, 51968, 51969, 51936, - 51952, 0, 1, 49152, 51200, 51712, 51968, 51969, - 51971, 51952, 0, 1, 49152, 51200, 51712, 51968, - 51969, 51971, 51952, 51954, 0, 1, 49152, 51200, - 51712, 51968, 51969, 51971, 51952, 0, 1, 49152, - 51200, 51712, 51968, 51969, 51971, 51952, 51956, 0, - 1, 49152, 51200, 51712, 51968, 51969, 51971, 51952, - 51956, 0, 1, 49152, 51200, 51712, 51968, 51969, - 51971, 51952, 51960, 51958, 0, 1, 49152, 51200, - 51712, 51968, 51969, 51971, 51952, 0, 1, 49152, - 51200, 51712, 51968, 51969, 51971, 51952, 51960, 0, - 1, 49152, 51200, 51712, 51968, 51969, 51971, 51952, - 51960, 0, 1, 49152, 51200, 51712, 51968, 51969, - 51971, 51952, 51960, 51962, 0, 1, 49152, 51200, - 51712, 51968, 51969, 51971, 51975, 51960, 0, 1, - 49152, 51200, 51712, 51968, 51969, 51971, 51975, 51960, - 51964, 0, 1, 49152, 51200, 51712, 51968, 51969, - 51971, 51975, 51960, 51964, 0, 1, 49152, 51200, - 51712, 51968, 51969, 51971, 51975, 51960, 51964, 51966, - 0, 1, 49152, 51200, 51712, 0, 1, 49152, - 51200, 52224, 51968, 0, 1, 49152, 51200, 52224, - 51968, 0, 1, 49152, 51200, 52224, 51968, 51970, - 0, 1, 49152, 51200, 52224, 51968, 0, 1, - 49152, 51200, 52224, 51968, 51972, 0, 1, 49152, - 51200, 52224, 51968, 51972, 0, 1, 49152, 51200, - 52224, 51968, 51976, 51974, 0, 1, 49152, 51200, - 52224, 51968, 0, 1, 49152, 51200, 52224, 51968, - 51976, 0, 1, 49152, 51200, 52224, 51968, 51976, - 0, 1, 49152, 51200, 52224, 51968, 51976, 51978, - 0, 1, 49152, 51200, 52224, 51968, 51976, 0, - 1, 49152, 51200, 52224, 51968, 51984, 51980, 0, - 1, 49152, 51200, 52224, 51968, 51984, 51980, 0, - 1, 49152, 51200, 52224, 51968, 51984, 51985, 51982, - 0, 1, 49152, 51200, 52224, 51968, 0, 1, - 49152, 51200, 52224, 51968, 51984, 0, 1, 49152, - 51200, 52224, 51968, 51984, 0, 1, 49152, 51200, - 52224, 51968, 51984, 51986, 0, 1, 49152, 51200, - 52224, 51968, 51984, 0, 1, 49152, 51200, 52224, - 51968, 51984, 51988, 0, 1, 49152, 51200, 52224, - 51968, 51984, 51988, 0, 1, 49152, 51200, 52224, - 51968, 51984, 51992, 51990, 0, 1, 49152, 51200, - 52224, 51968, 51984, 0, 1, 49152, 51200, 52224, - 51968, 52000, 51992, 0, 1, 49152, 51200, 52224, - 51968, 52000, 51992, 0, 1, 49152, 51200, 52224, - 51968, 52000, 51992, 51994, 0, 1, 49152, 51200, - 52224, 51968, 52000, 51992, 0, 1, 49152, 51200, - 52224, 51968, 52000, 52001, 51996, 0, 1, 49152, - 51200, 52224, 51968, 52000, 52001, 51996, 0, 1, - 49152, 51200, 52224, 51968, 52000, 52001, 51996, 51998, - 0, 1, 49152, 51200, 52224, 51968, 0, 1, - 49152, 51200, 52224, 51968, 52000, 0, 1, 49152, - 51200, 52224, 51968, 52000, 0, 1, 49152, 51200, - 52224, 51968, 52000, 52002, 0, 1, 49152, 51200, - 52224, 51968, 52000, 0, 1, 49152, 51200, 52224, - 51968, 52000, 52004, 0, 1, 49152, 51200, 52224, - 51968, 52000, 52004, 0, 1, 49152, 51200, 52224, - 51968, 52000, 52008, 52006, 0, 1, 49152, 51200, - 52224, 51968, 52000, 0, 1, 49152, 51200, 52224, - 51968, 52000, 52008, 0, 1, 49152, 51200, 52224, - 51968, 52000, 52008, 0, 1, 49152, 51200, 52224, - 51968, 52000, 52008, 52010, 0, 1, 49152, 51200, - 52224, 51968, 52000, 52008, 0, 1, 49152, 51200, - 52224, 51968, 52000, 52016, 52012, 0, 1, 49152, - 51200, 52224, 51968, 52000, 52016, 52012, 0, 1, - 49152, 51200, 52224, 51968, 52000, 52016, 52017, 52014, - 0, 1, 49152, 51200, 52224, 51968, 52000, 0, - 1, 49152, 51200, 52224, 51968, 52032, 52016, 0, - 1, 49152, 51200, 52224, 51968, 52032, 52016, 0, - 1, 49152, 51200, 52224, 51968, 52032, 52016, 52018, - 0, 1, 49152, 51200, 52224, 51968, 52032, 52016, - 0, 1, 49152, 51200, 52224, 51968, 52032, 52016, - 52020, 0, 1, 49152, 51200, 52224, 51968, 52032, - 52016, 52020, 0, 1, 49152, 51200, 52224, 51968, - 52032, 52016, 52024, 52022, 0, 1, 49152, 51200, - 52224, 51968, 52032, 52016, 0, 1, 49152, 51200, - 52224, 51968, 52032, 52033, 52024, 0, 1, 49152, - 51200, 52224, 51968, 52032, 52033, 52024, 0, 1, - 49152, 51200, 52224, 51968, 52032, 52033, 52024, 52026, - 0, 1, 49152, 51200, 52224, 51968, 52032, 52033, - 52024, 0, 1, 49152, 51200, 52224, 51968, 52032, - 52033, 52024, 52028, 0, 1, 49152, 51200, 52224, - 51968, 52032, 52033, 52035, 52028, 0, 1, 49152, - 51200, 52224, 51968, 52032, 52033, 52035, 52028, 52030, - 0, 1, 49152, 51200, 52224, 51968, 0, 1, - 49152, 51200, 52224, 51968, 52032, 0, 1, 49152, - 51200, 52224, 51968, 52032, 0, 1, 49152, 51200, - 52224, 51968, 52032, 52034, 0, 1, 49152, 51200, - 52224, 51968, 52032, 0, 1, 49152, 51200, 52224, - 51968, 52032, 52036, 0, 1, 49152, 51200, 52224, - 51968, 52032, 52036, 0, 1, 49152, 51200, 52224, - 51968, 52032, 52040, 52038, 0, 1, 49152, 51200, - 52224, 51968, 52032, 0, 1, 49152, 51200, 52224, - 51968, 52032, 52040, 0, 1, 49152, 51200, 52224, - 51968, 52032, 52040, 0, 1, 49152, 51200, 52224, - 51968, 52032, 52040, 52042, 0, 1, 49152, 51200, - 52224, 51968, 52032, 52040, 0, 1, 49152, 51200, - 52224, 51968, 52032, 52048, 52044, 0, 1, 49152, - 51200, 52224, 51968, 52032, 52048, 52044, 0, 1, - 49152, 51200, 52224, 51968, 52032, 52048, 52049, 52046, - 0, 1, 49152, 51200, 52224, 51968, 52032, 0, - 1, 49152, 51200, 52224, 51968, 52032, 52048, 0, - 1, 49152, 51200, 52224, 51968, 52032, 52048, 0, - 1, 49152, 51200, 52224, 51968, 52032, 52048, 52050, - 0, 1, 49152, 51200, 52224, 51968, 52032, 52048, - 0, 1, 49152, 51200, 52224, 51968, 52032, 52048, - 52052, 0, 1, 49152, 51200, 52224, 51968, 52032, - 52048, 52052, 0, 1, 49152, 51200, 52224, 51968, - 52032, 52048, 52056, 52054, 0, 1, 49152, 51200, - 52224, 51968, 52032, 52048, 0, 1, 49152, 51200, - 52224, 51968, 52032, 52064, 52056, 0, 1, 49152, - 51200, 52224, 51968, 52032, 52064, 52056, 0, 1, - 49152, 51200, 52224, 51968, 52032, 52064, 52056, 52058, - 0, 1, 49152, 51200, 52224, 51968, 52032, 52064, - 52056, 0, 1, 49152, 51200, 52224, 51968, 52032, - 52064, 52065, 52060, 0, 1, 49152, 51200, 52224, - 51968, 52032, 52064, 52065, 52060, 0, 1, 49152, - 51200, 52224, 51968, 52032, 52064, 52065, 52060, 52062, - 0, 1, 49152, 51200, 52224, 51968, 52032, 0, - 1, 49152, 51200, 52224, 51968, 52096, 52064, 0, - 1, 49152, 51200, 52224, 51968, 52096, 52064, 0, - 1, 49152, 51200, 52224, 51968, 52096, 52064, 52066, - 0, 1, 49152, 51200, 52224, 51968, 52096, 52064, - 0, 1, 49152, 51200, 52224, 51968, 52096, 52064, - 52068, 0, 1, 49152, 51200, 52224, 51968, 52096, - 52064, 52068, 0, 1, 49152, 51200, 52224, 51968, - 52096, 52064, 52072, 52070, 0, 1, 49152, 51200, - 52224, 51968, 52096, 52064, 0, 1, 49152, 51200, - 52224, 51968, 52096, 52064, 52072, 0, 1, 49152, - 51200, 52224, 51968, 52096, 52064, 52072, 0, 1, - 49152, 51200, 52224, 51968, 52096, 52064, 52072, 52074, - 0, 1, 49152, 51200, 52224, 51968, 52096, 52064, - 52072, 0, 1, 49152, 51200, 52224, 51968, 52096, - 52064, 52080, 52076, 0, 1, 49152, 51200, 52224, - 51968, 52096, 52064, 52080, 52076, 0, 1, 49152, - 51200, 52224, 51968, 52096, 52064, 52080, 52081, 52078, - 0, 1, 49152, 51200, 52224, 51968, 52096, 52064, - 0, 1, 49152, 51200, 52224, 51968, 52096, 52097, - 52080, 0, 1, 49152, 51200, 52224, 51968, 52096, - 52097, 52080, 0, 1, 49152, 51200, 52224, 51968, - 52096, 52097, 52080, 52082, 0, 1, 49152, 51200, - 52224, 51968, 52096, 52097, 52080, 0, 1, 49152, - 51200, 52224, 51968, 52096, 52097, 52080, 52084, 0, - 1, 49152, 51200, 52224, 51968, 52096, 52097, 52080, - 52084, 0, 1, 49152, 51200, 52224, 51968, 52096, - 52097, 52080, 52088, 52086, 0, 1, 49152, 51200, - 52224, 51968, 52096, 52097, 52080, 0, 1, 49152, - 51200, 52224, 51968, 52096, 52097, 52080, 52088, 0, - 1, 49152, 51200, 52224, 51968, 52096, 52097, 52099, - 52088, 0, 1, 49152, 51200, 52224, 51968, 52096, - 52097, 52099, 52088, 52090, 0, 1, 49152, 51200, - 52224, 51968, 52096, 52097, 52099, 52088, 0, 1, - 49152, 51200, 52224, 51968, 52096, 52097, 52099, 52088, - 52092, 0, 1, 49152, 51200, 52224, 51968, 52096, - 52097, 52099, 52088, 52092, 0, 1, 49152, 51200, - 52224, 51968, 52096, 52097, 52099, 52088, 52092, 52094, - 0, 1, 49152, 51200, 52224, 51968, 0, 1, - 49152, 51200, 52224, 51968, 52096, 0, 1, 49152, - 51200, 52224, 52225, 52096, 0, 1, 49152, 51200, - 52224, 52225, 52096, 52098, 0, 1, 49152, 51200, - 52224, 52225, 52096, 0, 1, 49152, 51200, 52224, - 52225, 52096, 52100, 0, 1, 49152, 51200, 52224, - 52225, 52096, 52100, 0, 1, 49152, 51200, 52224, - 52225, 52096, 52104, 52102, 0, 1, 49152, 51200, - 52224, 52225, 52096, 0, 1, 49152, 51200, 52224, - 52225, 52096, 52104, 0, 1, 49152, 51200, 52224, - 52225, 52096, 52104, 0, 1, 49152, 51200, 52224, - 52225, 52096, 52104, 52106, 0, 1, 49152, 51200, - 52224, 52225, 52096, 52104, 0, 1, 49152, 51200, - 52224, 52225, 52096, 52112, 52108, 0, 1, 49152, - 51200, 52224, 52225, 52096, 52112, 52108, 0, 1, - 49152, 51200, 52224, 52225, 52096, 52112, 52113, 52110, - 0, 1, 49152, 51200, 52224, 52225, 52096, 0, - 1, 49152, 51200, 52224, 52225, 52096, 52112, 0, - 1, 49152, 51200, 52224, 52225, 52096, 52112, 0, - 1, 49152, 51200, 52224, 52225, 52096, 52112, 52114, - 0, 1, 49152, 51200, 52224, 52225, 52096, 52112, - 0, 1, 49152, 51200, 52224, 52225, 52096, 52112, - 52116, 0, 1, 49152, 51200, 52224, 52225, 52096, - 52112, 52116, 0, 1, 49152, 51200, 52224, 52225, - 52096, 52112, 52120, 52118, 0, 1, 49152, 51200, - 52224, 52225, 52096, 52112, 0, 1, 49152, 51200, - 52224, 52225, 52096, 52128, 52120, 0, 1, 49152, - 51200, 52224, 52225, 52096, 52128, 52120, 0, 1, - 49152, 51200, 52224, 52225, 52096, 52128, 52120, 52122, - 0, 1, 49152, 51200, 52224, 52225, 52096, 52128, - 52120, 0, 1, 49152, 51200, 52224, 52225, 52096, - 52128, 52129, 52124, 0, 1, 49152, 51200, 52224, - 52225, 52096, 52128, 52129, 52124, 0, 1, 49152, - 51200, 52224, 52225, 52096, 52128, 52129, 52124, 52126, - 0, 1, 49152, 51200, 52224, 52225, 52096, 0, - 1, 49152, 51200, 52224, 52225, 52096, 52128, 0, - 1, 49152, 51200, 52224, 52225, 52096, 52128, 0, - 1, 49152, 51200, 52224, 52225, 52096, 52128, 52130, - 0, 1, 49152, 51200, 52224, 52225, 52096, 52128, - 0, 1, 49152, 51200, 52224, 52225, 52096, 52128, - 52132, 0, 1, 49152, 51200, 52224, 52225, 52096, - 52128, 52132, 0, 1, 49152, 51200, 52224, 52225, - 52096, 52128, 52136, 52134, 0, 1, 49152, 51200, - 52224, 52225, 52096, 52128, 0, 1, 49152, 51200, - 52224, 52225, 52096, 52128, 52136, 0, 1, 49152, - 51200, 52224, 52225, 52096, 52128, 52136, 0, 1, - 49152, 51200, 52224, 52225, 52096, 52128, 52136, 52138, - 0, 1, 49152, 51200, 52224, 52225, 52096, 52128, - 52136, 0, 1, 49152, 51200, 52224, 52225, 52096, - 52128, 52144, 52140, 0, 1, 49152, 51200, 52224, - 52225, 52096, 52128, 52144, 52140, 0, 1, 49152, - 51200, 52224, 52225, 52096, 52128, 52144, 52145, 52142, - 0, 1, 49152, 51200, 52224, 52225, 52096, 52128, - 0, 1, 49152, 51200, 52224, 52225, 52096, 52160, - 52144, 0, 1, 49152, 51200, 52224, 52225, 52096, - 52160, 52144, 0, 1, 49152, 51200, 52224, 52225, - 52096, 52160, 52144, 52146, 0, 1, 49152, 51200, - 52224, 52225, 52096, 52160, 52144, 0, 1, 49152, - 51200, 52224, 52225, 52096, 52160, 52144, 52148, 0, - 1, 49152, 51200, 52224, 52225, 52096, 52160, 52144, - 52148, 0, 1, 49152, 51200, 52224, 52225, 52096, - 52160, 52144, 52152, 52150, 0, 1, 49152, 51200, - 52224, 52225, 52096, 52160, 52144, 0, 1, 49152, - 51200, 52224, 52225, 52096, 52160, 52161, 52152, 0, - 1, 49152, 51200, 52224, 52225, 52096, 52160, 52161, - 52152, 0, 1, 49152, 51200, 52224, 52225, 52096, - 52160, 52161, 52152, 52154, 0, 1, 49152, 51200, - 52224, 52225, 52096, 52160, 52161, 52152, 0, 1, - 49152, 51200, 52224, 52225, 52096, 52160, 52161, 52152, - 52156, 0, 1, 49152, 51200, 52224, 52225, 52096, - 52160, 52161, 52163, 52156, 0, 1, 49152, 51200, - 52224, 52225, 52096, 52160, 52161, 52163, 52156, 52158, - 0, 1, 49152, 51200, 52224, 52225, 52096, 0, - 1, 49152, 51200, 52224, 52225, 52096, 52160, 0, - 1, 49152, 51200, 52224, 52225, 52096, 52160, 0, - 1, 49152, 51200, 52224, 52225, 52096, 52160, 52162, - 0, 1, 49152, 51200, 52224, 52225, 52227, 52160, - 0, 1, 49152, 51200, 52224, 52225, 52227, 52160, - 52164, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52160, 52164, 0, 1, 49152, 51200, 52224, 52225, - 52227, 52160, 52168, 52166, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52160, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52160, 52168, 0, 1, 49152, - 51200, 52224, 52225, 52227, 52160, 52168, 0, 1, - 49152, 51200, 52224, 52225, 52227, 52160, 52168, 52170, - 0, 1, 49152, 51200, 52224, 52225, 52227, 52160, - 52168, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52160, 52176, 52172, 0, 1, 49152, 51200, 52224, - 52225, 52227, 52160, 52176, 52172, 0, 1, 49152, - 51200, 52224, 52225, 52227, 52160, 52176, 52177, 52174, - 0, 1, 49152, 51200, 52224, 52225, 52227, 52160, - 0, 1, 49152, 51200, 52224, 52225, 52227, 52160, - 52176, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52160, 52176, 0, 1, 49152, 51200, 52224, 52225, - 52227, 52160, 52176, 52178, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52160, 52176, 0, 1, 49152, - 51200, 52224, 52225, 52227, 52160, 52176, 52180, 0, - 1, 49152, 51200, 52224, 52225, 52227, 52160, 52176, - 52180, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52160, 52176, 52184, 52182, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52160, 52176, 0, 1, 49152, - 51200, 52224, 52225, 52227, 52160, 52192, 52184, 0, - 1, 49152, 51200, 52224, 52225, 52227, 52160, 52192, - 52184, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52160, 52192, 52184, 52186, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52160, 52192, 52184, 0, 1, - 49152, 51200, 52224, 52225, 52227, 52160, 52192, 52193, - 52188, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52160, 52192, 52193, 52188, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52160, 52192, 52193, 52188, 52190, - 0, 1, 49152, 51200, 52224, 52225, 52227, 52160, - 0, 1, 49152, 51200, 52224, 52225, 52227, 52160, - 52192, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52160, 52192, 0, 1, 49152, 51200, 52224, 52225, - 52227, 52160, 52192, 52194, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52160, 52192, 0, 1, 49152, - 51200, 52224, 52225, 52227, 52160, 52192, 52196, 0, - 1, 49152, 51200, 52224, 52225, 52227, 52160, 52192, - 52196, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52160, 52192, 52200, 52198, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52231, 52192, 0, 1, 49152, - 51200, 52224, 52225, 52227, 52231, 52192, 52200, 0, - 1, 49152, 51200, 52224, 52225, 52227, 52231, 52192, - 52200, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52231, 52192, 52200, 52202, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52231, 52192, 52200, 0, 1, - 49152, 51200, 52224, 52225, 52227, 52231, 52192, 52208, - 52204, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52231, 52192, 52208, 52204, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52231, 52192, 52208, 52209, 52206, - 0, 1, 49152, 51200, 52224, 52225, 52227, 52231, - 52192, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52231, 52192, 52208, 0, 1, 49152, 51200, 52224, - 52225, 52227, 52231, 52192, 52208, 0, 1, 49152, - 51200, 52224, 52225, 52227, 52231, 52192, 52208, 52210, - 0, 1, 49152, 51200, 52224, 52225, 52227, 52231, - 52192, 52208, 0, 1, 49152, 51200, 52224, 52225, - 52227, 52231, 52192, 52208, 52212, 0, 1, 49152, - 51200, 52224, 52225, 52227, 52231, 52192, 52208, 52212, - 0, 1, 49152, 51200, 52224, 52225, 52227, 52231, - 52192, 52208, 52216, 52214, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52231, 52192, 52208, 0, 1, - 49152, 51200, 52224, 52225, 52227, 52231, 52192, 52208, - 52216, 0, 1, 49152, 51200, 52224, 52225, 52227, - 52231, 52192, 52208, 52216, 0, 1, 49152, 51200, - 52224, 52225, 52227, 52231, 52192, 52208, 52216, 52218, - 0, 1, 49152, 51200, 52224, 52225, 52227, 52231, - 52192, 52208, 52216, 0, 1, 49152, 51200, 52224, - 52225, 52227, 52231, 52192, 52208, 52216, 52220, 0, - 1, 49152, 51200, 52224, 52225, 52227, 52231, 52192, - 52208, 52216, 52220, 0, 1, 49152, 51200, 52224, - 52225, 52227, 52231, 52192, 52208, 52216, 52220, 52222, - 0, 1, 49152, 51200, 0, 1, 49152, 51200, - 52224, 0, 1, 49152, 51200, 52224, 0, 1, - 49152, 51200, 52224, 52226, 0, 1, 49152, 51200, - 52224, 0, 1, 49152, 51200, 52224, 52228, 0, - 1, 49152, 51200, 52224, 52228, 0, 1, 49152, - 51200, 52224, 52232, 52230, 0, 1, 49152, 51200, - 52224, 0, 1, 49152, 51200, 52224, 52232, 0, - 1, 49152, 51200, 52224, 52232, 0, 1, 49152, - 51200, 52224, 52232, 52234, 0, 1, 49152, 51200, - 52224, 52232, 0, 1, 49152, 51200, 52224, 52240, - 52236, 0, 1, 49152, 51200, 52224, 52240, 52236, - 0, 1, 49152, 51200, 52224, 52240, 52241, 52238, - 0, 1, 49152, 51200, 52224, 0, 1, 49152, - 51200, 52224, 52240, 0, 1, 49152, 51200, 52224, - 52240, 0, 1, 49152, 51200, 52224, 52240, 52242, - 0, 1, 49152, 51200, 52224, 52240, 0, 1, - 49152, 51200, 52224, 52240, 52244, 0, 1, 49152, - 51200, 52224, 52240, 52244, 0, 1, 49152, 51200, - 52224, 52240, 52248, 52246, 0, 1, 49152, 51200, - 52224, 52240, 0, 1, 49152, 51200, 52224, 52256, - 52248, 0, 1, 49152, 51200, 52224, 52256, 52248, - 0, 1, 49152, 51200, 52224, 52256, 52248, 52250, - 0, 1, 49152, 51200, 52224, 52256, 52248, 0, - 1, 49152, 51200, 52224, 52256, 52257, 52252, 0, - 1, 49152, 51200, 52224, 52256, 52257, 52252, 0, - 1, 49152, 51200, 52224, 52256, 52257, 52252, 52254, - 0, 1, 49152, 51200, 52224, 0, 1, 49152, - 51200, 52224, 52256, 0, 1, 49152, 51200, 52224, - 52256, 0, 1, 49152, 51200, 52224, 52256, 52258, - 0, 1, 49152, 51200, 52224, 52256, 0, 1, - 49152, 51200, 52224, 52256, 52260, 0, 1, 49152, - 51200, 52224, 52256, 52260, 0, 1, 49152, 51200, - 52224, 52256, 52264, 52262, 0, 1, 49152, 51200, - 52224, 52256, 0, 1, 49152, 51200, 52224, 52256, - 52264, 0, 1, 49152, 51200, 52224, 52256, 52264, - 0, 1, 49152, 51200, 52224, 52256, 52264, 52266, - 0, 1, 49152, 51200, 52224, 52256, 52264, 0, - 1, 49152, 51200, 52224, 52256, 52272, 52268, 0, - 1, 49152, 51200, 52224, 52256, 52272, 52268, 0, - 1, 49152, 51200, 52224, 52256, 52272, 52273, 52270, - 0, 1, 49152, 51200, 52224, 52256, 0, 1, - 49152, 51200, 52224, 52288, 52272, 0, 1, 49152, - 51200, 52224, 52288, 52272, 0, 1, 49152, 51200, - 52224, 52288, 52272, 52274, 0, 1, 49152, 51200, - 52224, 52288, 52272, 0, 1, 49152, 51200, 52224, - 52288, 52272, 52276, 0, 1, 49152, 51200, 52224, - 52288, 52272, 52276, 0, 1, 49152, 51200, 52224, - 52288, 52272, 52280, 52278, 0, 1, 49152, 51200, - 52224, 52288, 52272, 0, 1, 49152, 51200, 52224, - 52288, 52289, 52280, 0, 1, 49152, 51200, 52224, - 52288, 52289, 52280, 0, 1, 49152, 51200, 52224, - 52288, 52289, 52280, 52282, 0, 1, 49152, 51200, - 52224, 52288, 52289, 52280, 0, 1, 49152, 51200, - 52224, 52288, 52289, 52280, 52284, 0, 1, 49152, - 51200, 52224, 52288, 52289, 52291, 52284, 0, 1, - 49152, 51200, 52224, 52288, 52289, 52291, 52284, 52286, - 0, 1, 49152, 51200, 52224, 0, 1, 49152, - 51200, 52224, 52288, 0, 1, 49152, 51200, 52224, - 52288, 0, 1, 49152, 51200, 52224, 52288, 52290, - 0, 1, 49152, 51200, 52224, 52288, 0, 1, - 49152, 51200, 52224, 52288, 52292, 0, 1, 49152, - 51200, 52224, 52288, 52292, 0, 1, 49152, 51200, - 52224, 52288, 52296, 52294, 0, 1, 49152, 51200, - 52224, 52288, 0, 1, 49152, 51200, 52224, 52288, - 52296, 0, 1, 49152, 51200, 52224, 52288, 52296, - 0, 1, 49152, 51200, 52224, 52288, 52296, 52298, - 0, 1, 49152, 51200, 52224, 52288, 52296, 0, - 1, 49152, 51200, 52224, 52288, 52304, 52300, 0, - 1, 49152, 51200, 52224, 52288, 52304, 52300, 0, - 1, 49152, 51200, 52224, 52288, 52304, 52305, 52302, - 0, 1, 49152, 51200, 52224, 52288, 0, 1, - 49152, 51200, 52224, 52288, 52304, 0, 1, 49152, - 51200, 52224, 52288, 52304, 0, 1, 49152, 51200, - 52224, 52288, 52304, 52306, 0, 1, 49152, 51200, - 52224, 52288, 52304, 0, 1, 49152, 51200, 52224, - 52288, 52304, 52308, 0, 1, 49152, 51200, 52224, - 52288, 52304, 52308, 0, 1, 49152, 51200, 52224, - 52288, 52304, 52312, 52310, 0, 1, 49152, 51200, - 52224, 52288, 52304, 0, 1, 49152, 51200, 52224, - 52288, 52320, 52312, 0, 1, 49152, 51200, 52224, - 52288, 52320, 52312, 0, 1, 49152, 51200, 52224, - 52288, 52320, 52312, 52314, 0, 1, 49152, 51200, - 52224, 52288, 52320, 52312, 0, 1, 49152, 51200, - 52224, 52288, 52320, 52321, 52316, 0, 1, 49152, - 51200, 52224, 52288, 52320, 52321, 52316, 0, 1, - 49152, 51200, 52224, 52288, 52320, 52321, 52316, 52318, - 0, 1, 49152, 51200, 52224, 52288, 0, 1, - 49152, 51200, 52224, 52352, 52320, 0, 1, 49152, - 51200, 52224, 52352, 52320, 0, 1, 49152, 51200, - 52224, 52352, 52320, 52322, 0, 1, 49152, 51200, - 52224, 52352, 52320, 0, 1, 49152, 51200, 52224, - 52352, 52320, 52324, 0, 1, 49152, 51200, 52224, - 52352, 52320, 52324, 0, 1, 49152, 51200, 52224, - 52352, 52320, 52328, 52326, 0, 1, 49152, 51200, - 52224, 52352, 52320, 0, 1, 49152, 51200, 52224, - 52352, 52320, 52328, 0, 1, 49152, 51200, 52224, - 52352, 52320, 52328, 0, 1, 49152, 51200, 52224, - 52352, 52320, 52328, 52330, 0, 1, 49152, 51200, - 52224, 52352, 52320, 52328, 0, 1, 49152, 51200, - 52224, 52352, 52320, 52336, 52332, 0, 1, 49152, - 51200, 52224, 52352, 52320, 52336, 52332, 0, 1, - 49152, 51200, 52224, 52352, 52320, 52336, 52337, 52334, - 0, 1, 49152, 51200, 52224, 52352, 52320, 0, - 1, 49152, 51200, 52224, 52352, 52353, 52336, 0, - 1, 49152, 51200, 52224, 52352, 52353, 52336, 0, - 1, 49152, 51200, 52224, 52352, 52353, 52336, 52338, - 0, 1, 49152, 51200, 52224, 52352, 52353, 52336, - 0, 1, 49152, 51200, 52224, 52352, 52353, 52336, - 52340, 0, 1, 49152, 51200, 52224, 52352, 52353, - 52336, 52340, 0, 1, 49152, 51200, 52224, 52352, - 52353, 52336, 52344, 52342, 0, 1, 49152, 51200, - 52224, 52352, 52353, 52336, 0, 1, 49152, 51200, - 52224, 52352, 52353, 52336, 52344, 0, 1, 49152, - 51200, 52224, 52352, 52353, 52355, 52344, 0, 1, - 49152, 51200, 52224, 52352, 52353, 52355, 52344, 52346, - 0, 1, 49152, 51200, 52224, 52352, 52353, 52355, - 52344, 0, 1, 49152, 51200, 52224, 52352, 52353, - 52355, 52344, 52348, 0, 1, 49152, 51200, 52224, - 52352, 52353, 52355, 52344, 52348, 0, 1, 49152, - 51200, 52224, 52352, 52353, 52355, 52344, 52348, 52350, - 0, 1, 49152, 51200, 52224, 0, 1, 49152, - 51200, 52224, 52352, 0, 1, 49152, 51200, 52224, - 52352, 0, 1, 49152, 51200, 52224, 52352, 52354, - 0, 1, 49152, 51200, 52224, 52352, 0, 1, - 49152, 51200, 52224, 52352, 52356, 0, 1, 49152, - 51200, 52224, 52352, 52356, 0, 1, 49152, 51200, - 52224, 52352, 52360, 52358, 0, 1, 49152, 51200, - 52224, 52352, 0, 1, 49152, 51200, 52224, 52352, - 52360, 0, 1, 49152, 51200, 52224, 52352, 52360, - 0, 1, 49152, 51200, 52224, 52352, 52360, 52362, - 0, 1, 49152, 51200, 52224, 52352, 52360, 0, - 1, 49152, 51200, 52224, 52352, 52368, 52364, 0, - 1, 49152, 51200, 52224, 52352, 52368, 52364, 0, - 1, 49152, 51200, 52224, 52352, 52368, 52369, 52366, - 0, 1, 49152, 51200, 52224, 52352, 0, 1, - 49152, 51200, 52224, 52352, 52368, 0, 1, 49152, - 51200, 52224, 52352, 52368, 0, 1, 49152, 51200, - 52224, 52352, 52368, 52370, 0, 1, 49152, 51200, - 52224, 52352, 52368, 0, 1, 49152, 51200, 52224, - 52352, 52368, 52372, 0, 1, 49152, 51200, 52224, - 52352, 52368, 52372, 0, 1, 49152, 51200, 52224, - 52352, 52368, 52376, 52374, 0, 1, 49152, 51200, - 52224, 52352, 52368, 0, 1, 49152, 51200, 52224, - 52352, 52384, 52376, 0, 1, 49152, 51200, 52224, - 52352, 52384, 52376, 0, 1, 49152, 51200, 52224, - 52352, 52384, 52376, 52378, 0, 1, 49152, 51200, - 52224, 52352, 52384, 52376, 0, 1, 49152, 51200, - 52224, 52352, 52384, 52385, 52380, 0, 1, 49152, - 51200, 52224, 52352, 52384, 52385, 52380, 0, 1, - 49152, 51200, 52224, 52352, 52384, 52385, 52380, 52382, - 0, 1, 49152, 51200, 52224, 52352, 0, 1, - 49152, 51200, 52224, 52352, 52384, 0, 1, 49152, - 51200, 52224, 52352, 52384, 0, 1, 49152, 51200, - 52224, 52352, 52384, 52386, 0, 1, 49152, 51200, - 52224, 52352, 52384, 0, 1, 49152, 51200, 52224, - 52352, 52384, 52388, 0, 1, 49152, 51200, 52224, - 52352, 52384, 52388, 0, 1, 49152, 51200, 52224, - 52352, 52384, 52392, 52390, 0, 1, 49152, 51200, - 52224, 52352, 52384, 0, 1, 49152, 51200, 52224, - 52352, 52384, 52392, 0, 1, 49152, 51200, 52224, - 52352, 52384, 52392, 0, 1, 49152, 51200, 52224, - 52352, 52384, 52392, 52394, 0, 1, 49152, 51200, - 52224, 52352, 52384, 52392, 0, 1, 49152, 51200, - 52224, 52352, 52384, 52400, 52396, 0, 1, 49152, - 51200, 52224, 52352, 52384, 52400, 52396, 0, 1, - 49152, 51200, 52224, 52352, 52384, 52400, 52401, 52398, - 0, 1, 49152, 51200, 52224, 52352, 52384, 0, - 1, 49152, 51200, 52224, 52352, 52416, 52400, 0, - 1, 49152, 51200, 52224, 52352, 52416, 52400, 0, - 1, 49152, 51200, 52224, 52352, 52416, 52400, 52402, - 0, 1, 49152, 51200, 52224, 52352, 52416, 52400, - 0, 1, 49152, 51200, 52224, 52352, 52416, 52400, - 52404, 0, 1, 49152, 51200, 52224, 52352, 52416, - 52400, 52404, 0, 1, 49152, 51200, 52224, 52352, - 52416, 52400, 52408, 52406, 0, 1, 49152, 51200, - 52224, 52352, 52416, 52400, 0, 1, 49152, 51200, - 52224, 52352, 52416, 52417, 52408, 0, 1, 49152, - 51200, 52224, 52352, 52416, 52417, 52408, 0, 1, - 49152, 51200, 52224, 52352, 52416, 52417, 52408, 52410, - 0, 1, 49152, 51200, 52224, 52352, 52416, 52417, - 52408, 0, 1, 49152, 51200, 52224, 52352, 52416, - 52417, 52408, 52412, 0, 1, 49152, 51200, 52224, - 52352, 52416, 52417, 52419, 52412, 0, 1, 49152, - 51200, 52224, 52352, 52416, 52417, 52419, 52412, 52414, - 0, 1, 49152, 51200, 52224, 52352, 0, 1, - 49152, 51200, 52224, 52480, 52416, 0, 1, 49152, - 51200, 52224, 52480, 52416, 0, 1, 49152, 51200, - 52224, 52480, 52416, 52418, 0, 1, 49152, 51200, - 52224, 52480, 52416, 0, 1, 49152, 51200, 52224, - 52480, 52416, 52420, 0, 1, 49152, 51200, 52224, - 52480, 52416, 52420, 0, 1, 49152, 51200, 52224, - 52480, 52416, 52424, 52422, 0, 1, 49152, 51200, - 52224, 52480, 52416, 0, 1, 49152, 51200, 52224, - 52480, 52416, 52424, 0, 1, 49152, 51200, 52224, - 52480, 52416, 52424, 0, 1, 49152, 51200, 52224, - 52480, 52416, 52424, 52426, 0, 1, 49152, 51200, - 52224, 52480, 52416, 52424, 0, 1, 49152, 51200, - 52224, 52480, 52416, 52432, 52428, 0, 1, 49152, - 51200, 52224, 52480, 52416, 52432, 52428, 0, 1, - 49152, 51200, 52224, 52480, 52416, 52432, 52433, 52430, - 0, 1, 49152, 51200, 52224, 52480, 52416, 0, - 1, 49152, 51200, 52224, 52480, 52416, 52432, 0, - 1, 49152, 51200, 52224, 52480, 52416, 52432, 0, - 1, 49152, 51200, 52224, 52480, 52416, 52432, 52434, - 0, 1, 49152, 51200, 52224, 52480, 52416, 52432, - 0, 1, 49152, 51200, 52224, 52480, 52416, 52432, - 52436, 0, 1, 49152, 51200, 52224, 52480, 52416, - 52432, 52436, 0, 1, 49152, 51200, 52224, 52480, - 52416, 52432, 52440, 52438, 0, 1, 49152, 51200, - 52224, 52480, 52416, 52432, 0, 1, 49152, 51200, - 52224, 52480, 52416, 52448, 52440, 0, 1, 49152, - 51200, 52224, 52480, 52416, 52448, 52440, 0, 1, - 49152, 51200, 52224, 52480, 52416, 52448, 52440, 52442, - 0, 1, 49152, 51200, 52224, 52480, 52416, 52448, - 52440, 0, 1, 49152, 51200, 52224, 52480, 52416, - 52448, 52449, 52444, 0, 1, 49152, 51200, 52224, - 52480, 52416, 52448, 52449, 52444, 0, 1, 49152, - 51200, 52224, 52480, 52416, 52448, 52449, 52444, 52446, - 0, 1, 49152, 51200, 52224, 52480, 52416, 0, - 1, 49152, 51200, 52224, 52480, 52481, 52448, 0, - 1, 49152, 51200, 52224, 52480, 52481, 52448, 0, - 1, 49152, 51200, 52224, 52480, 52481, 52448, 52450, - 0, 1, 49152, 51200, 52224, 52480, 52481, 52448, - 0, 1, 49152, 51200, 52224, 52480, 52481, 52448, - 52452, 0, 1, 49152, 51200, 52224, 52480, 52481, - 52448, 52452, 0, 1, 49152, 51200, 52224, 52480, - 52481, 52448, 52456, 52454, 0, 1, 49152, 51200, - 52224, 52480, 52481, 52448, 0, 1, 49152, 51200, - 52224, 52480, 52481, 52448, 52456, 0, 1, 49152, - 51200, 52224, 52480, 52481, 52448, 52456, 0, 1, - 49152, 51200, 52224, 52480, 52481, 52448, 52456, 52458, - 0, 1, 49152, 51200, 52224, 52480, 52481, 52448, - 52456, 0, 1, 49152, 51200, 52224, 52480, 52481, - 52448, 52464, 52460, 0, 1, 49152, 51200, 52224, - 52480, 52481, 52448, 52464, 52460, 0, 1, 49152, - 51200, 52224, 52480, 52481, 52448, 52464, 52465, 52462, - 0, 1, 49152, 51200, 52224, 52480, 52481, 52448, - 0, 1, 49152, 51200, 52224, 52480, 52481, 52448, - 52464, 0, 1, 49152, 51200, 52224, 52480, 52481, - 52483, 52464, 0, 1, 49152, 51200, 52224, 52480, - 52481, 52483, 52464, 52466, 0, 1, 49152, 51200, - 52224, 52480, 52481, 52483, 52464, 0, 1, 49152, - 51200, 52224, 52480, 52481, 52483, 52464, 52468, 0, - 1, 49152, 51200, 52224, 52480, 52481, 52483, 52464, - 52468, 0, 1, 49152, 51200, 52224, 52480, 52481, - 52483, 52464, 52472, 52470, 0, 1, 49152, 51200, - 52224, 52480, 52481, 52483, 52464, 0, 1, 49152, - 51200, 52224, 52480, 52481, 52483, 52464, 52472, 0, - 1, 49152, 51200, 52224, 52480, 52481, 52483, 52464, - 52472, 0, 1, 49152, 51200, 52224, 52480, 52481, - 52483, 52464, 52472, 52474, 0, 1, 49152, 51200, - 52224, 52480, 52481, 52483, 52487, 52472, 0, 1, - 49152, 51200, 52224, 52480, 52481, 52483, 52487, 52472, - 52476, 0, 1, 49152, 51200, 52224, 52480, 52481, - 52483, 52487, 52472, 52476, 0, 1, 49152, 51200, - 52224, 52480, 52481, 52483, 52487, 52472, 52476, 52478, - 0, 1, 49152, 51200, 52224, 0, 1, 49152, - 53248, 52224, 52480, 0, 1, 49152, 53248, 52224, - 52480, 0, 1, 49152, 53248, 52224, 52480, 52482, - 0, 1, 49152, 53248, 52224, 52480, 0, 1, - 49152, 53248, 52224, 52480, 52484, 0, 1, 49152, - 53248, 52224, 52480, 52484, 0, 1, 49152, 53248, - 52224, 52480, 52488, 52486, 0, 1, 49152, 53248, - 52224, 52480, 0, 1, 49152, 53248, 52224, 52480, - 52488, 0, 1, 49152, 53248, 52224, 52480, 52488, - 0, 1, 49152, 53248, 52224, 52480, 52488, 52490, - 0, 1, 49152, 53248, 52224, 52480, 52488, 0, - 1, 49152, 53248, 52224, 52480, 52496, 52492, 0, - 1, 49152, 53248, 52224, 52480, 52496, 52492, 0, - 1, 49152, 53248, 52224, 52480, 52496, 52497, 52494, - 0, 1, 49152, 53248, 52224, 52480, 0, 1, - 49152, 53248, 52224, 52480, 52496, 0, 1, 49152, - 53248, 52224, 52480, 52496, 0, 1, 49152, 53248, - 52224, 52480, 52496, 52498, 0, 1, 49152, 53248, - 52224, 52480, 52496, 0, 1, 49152, 53248, 52224, - 52480, 52496, 52500, 0, 1, 49152, 53248, 52224, - 52480, 52496, 52500, 0, 1, 49152, 53248, 52224, - 52480, 52496, 52504, 52502, 0, 1, 49152, 53248, - 52224, 52480, 52496, 0, 1, 49152, 53248, 52224, - 52480, 52512, 52504, 0, 1, 49152, 53248, 52224, - 52480, 52512, 52504, 0, 1, 49152, 53248, 52224, - 52480, 52512, 52504, 52506, 0, 1, 49152, 53248, - 52224, 52480, 52512, 52504, 0, 1, 49152, 53248, - 52224, 52480, 52512, 52513, 52508, 0, 1, 49152, - 53248, 52224, 52480, 52512, 52513, 52508, 0, 1, - 49152, 53248, 52224, 52480, 52512, 52513, 52508, 52510, - 0, 1, 49152, 53248, 52224, 52480, 0, 1, - 49152, 53248, 52224, 52480, 52512, 0, 1, 49152, - 53248, 52224, 52480, 52512, 0, 1, 49152, 53248, - 52224, 52480, 52512, 52514, 0, 1, 49152, 53248, - 52224, 52480, 52512, 0, 1, 49152, 53248, 52224, - 52480, 52512, 52516, 0, 1, 49152, 53248, 52224, - 52480, 52512, 52516, 0, 1, 49152, 53248, 52224, - 52480, 52512, 52520, 52518, 0, 1, 49152, 53248, - 52224, 52480, 52512, 0, 1, 49152, 53248, 52224, - 52480, 52512, 52520, 0, 1, 49152, 53248, 52224, - 52480, 52512, 52520, 0, 1, 49152, 53248, 52224, - 52480, 52512, 52520, 52522, 0, 1, 49152, 53248, - 52224, 52480, 52512, 52520, 0, 1, 49152, 53248, - 52224, 52480, 52512, 52528, 52524, 0, 1, 49152, - 53248, 52224, 52480, 52512, 52528, 52524, 0, 1, - 49152, 53248, 52224, 52480, 52512, 52528, 52529, 52526, - 0, 1, 49152, 53248, 52224, 52480, 52512, 0, - 1, 49152, 53248, 52224, 52480, 52544, 52528, 0, - 1, 49152, 53248, 52224, 52480, 52544, 52528, 0, - 1, 49152, 53248, 52224, 52480, 52544, 52528, 52530, - 0, 1, 49152, 53248, 52224, 52480, 52544, 52528, - 0, 1, 49152, 53248, 52224, 52480, 52544, 52528, - 52532, 0, 1, 49152, 53248, 52224, 52480, 52544, - 52528, 52532, 0, 1, 49152, 53248, 52224, 52480, - 52544, 52528, 52536, 52534, 0, 1, 49152, 53248, - 52224, 52480, 52544, 52528, 0, 1, 49152, 53248, - 52224, 52480, 52544, 52545, 52536, 0, 1, 49152, - 53248, 52224, 52480, 52544, 52545, 52536, 0, 1, - 49152, 53248, 52224, 52480, 52544, 52545, 52536, 52538, - 0, 1, 49152, 53248, 52224, 52480, 52544, 52545, - 52536, 0, 1, 49152, 53248, 52224, 52480, 52544, - 52545, 52536, 52540, 0, 1, 49152, 53248, 52224, - 52480, 52544, 52545, 52547, 52540, 0, 1, 49152, - 53248, 52224, 52480, 52544, 52545, 52547, 52540, 52542, - 0, 1, 49152, 53248, 52224, 52480, 0, 1, - 49152, 53248, 52224, 52480, 52544, 0, 1, 49152, - 53248, 52224, 52480, 52544, 0, 1, 49152, 53248, - 52224, 52480, 52544, 52546, 0, 1, 49152, 53248, - 52224, 52480, 52544, 0, 1, 49152, 53248, 52224, - 52480, 52544, 52548, 0, 1, 49152, 53248, 52224, - 52480, 52544, 52548, 0, 1, 49152, 53248, 52224, - 52480, 52544, 52552, 52550, 0, 1, 49152, 53248, - 52224, 52480, 52544, 0, 1, 49152, 53248, 52224, - 52480, 52544, 52552, 0, 1, 49152, 53248, 52224, - 52480, 52544, 52552, 0, 1, 49152, 53248, 52224, - 52480, 52544, 52552, 52554, 0, 1, 49152, 53248, - 52224, 52480, 52544, 52552, 0, 1, 49152, 53248, - 52224, 52480, 52544, 52560, 52556, 0, 1, 49152, - 53248, 52224, 52480, 52544, 52560, 52556, 0, 1, - 49152, 53248, 52224, 52480, 52544, 52560, 52561, 52558, - 0, 1, 49152, 53248, 52224, 52480, 52544, 0, - 1, 49152, 53248, 52224, 52480, 52544, 52560, 0, - 1, 49152, 53248, 52224, 52480, 52544, 52560, 0, - 1, 49152, 53248, 52224, 52480, 52544, 52560, 52562, - 0, 1, 49152, 53248, 52224, 52480, 52544, 52560, - 0, 1, 49152, 53248, 52224, 52480, 52544, 52560, - 52564, 0, 1, 49152, 53248, 52224, 52480, 52544, - 52560, 52564, 0, 1, 49152, 53248, 52224, 52480, - 52544, 52560, 52568, 52566, 0, 1, 49152, 53248, - 52224, 52480, 52544, 52560, 0, 1, 49152, 53248, - 52224, 52480, 52544, 52576, 52568, 0, 1, 49152, - 53248, 52224, 52480, 52544, 52576, 52568, 0, 1, - 49152, 53248, 52224, 52480, 52544, 52576, 52568, 52570, - 0, 1, 49152, 53248, 52224, 52480, 52544, 52576, - 52568, 0, 1, 49152, 53248, 52224, 52480, 52544, - 52576, 52577, 52572, 0, 1, 49152, 53248, 52224, - 52480, 52544, 52576, 52577, 52572, 0, 1, 49152, - 53248, 52224, 52480, 52544, 52576, 52577, 52572, 52574, - 0, 1, 49152, 53248, 52224, 52480, 52544, 0, - 1, 49152, 53248, 52224, 52480, 52608, 52576, 0, - 1, 49152, 53248, 52224, 52480, 52608, 52576, 0, - 1, 49152, 53248, 52224, 52480, 52608, 52576, 52578, - 0, 1, 49152, 53248, 52224, 52480, 52608, 52576, - 0, 1, 49152, 53248, 52224, 52480, 52608, 52576, - 52580, 0, 1, 49152, 53248, 52224, 52480, 52608, - 52576, 52580, 0, 1, 49152, 53248, 52224, 52480, - 52608, 52576, 52584, 52582, 0, 1, 49152, 53248, - 52224, 52480, 52608, 52576, 0, 1, 49152, 53248, - 52224, 52480, 52608, 52576, 52584, 0, 1, 49152, - 53248, 52224, 52480, 52608, 52576, 52584, 0, 1, - 49152, 53248, 52224, 52480, 52608, 52576, 52584, 52586, - 0, 1, 49152, 53248, 52224, 52480, 52608, 52576, - 52584, 0, 1, 49152, 53248, 52224, 52480, 52608, - 52576, 52592, 52588, 0, 1, 49152, 53248, 52224, - 52480, 52608, 52576, 52592, 52588, 0, 1, 49152, - 53248, 52224, 52480, 52608, 52576, 52592, 52593, 52590, - 0, 1, 49152, 53248, 52224, 52480, 52608, 52576, - 0, 1, 49152, 53248, 52224, 52480, 52608, 52609, - 52592, 0, 1, 49152, 53248, 52224, 52480, 52608, - 52609, 52592, 0, 1, 49152, 53248, 52224, 52480, - 52608, 52609, 52592, 52594, 0, 1, 49152, 53248, - 52224, 52480, 52608, 52609, 52592, 0, 1, 49152, - 53248, 52224, 52480, 52608, 52609, 52592, 52596, 0, - 1, 49152, 53248, 52224, 52480, 52608, 52609, 52592, - 52596, 0, 1, 49152, 53248, 52224, 52480, 52608, - 52609, 52592, 52600, 52598, 0, 1, 49152, 53248, - 52224, 52480, 52608, 52609, 52592, 0, 1, 49152, - 53248, 52224, 52480, 52608, 52609, 52592, 52600, 0, - 1, 49152, 53248, 52224, 52480, 52608, 52609, 52611, - 52600, 0, 1, 49152, 53248, 52224, 52480, 52608, - 52609, 52611, 52600, 52602, 0, 1, 49152, 53248, - 52224, 52480, 52608, 52609, 52611, 52600, 0, 1, - 49152, 53248, 52224, 52480, 52608, 52609, 52611, 52600, - 52604, 0, 1, 49152, 53248, 52224, 52480, 52608, - 52609, 52611, 52600, 52604, 0, 1, 49152, 53248, - 52224, 52480, 52608, 52609, 52611, 52600, 52604, 52606, - 0, 1, 49152, 53248, 52224, 52480, 0, 1, - 49152, 53248, 52224, 52736, 52608, 0, 1, 49152, - 53248, 52224, 52736, 52608, 0, 1, 49152, 53248, - 52224, 52736, 52608, 52610, 0, 1, 49152, 53248, - 52224, 52736, 52608, 0, 1, 49152, 53248, 52224, - 52736, 52608, 52612, 0, 1, 49152, 53248, 52224, - 52736, 52608, 52612, 0, 1, 49152, 53248, 52224, - 52736, 52608, 52616, 52614, 0, 1, 49152, 53248, - 52224, 52736, 52608, 0, 1, 49152, 53248, 52224, - 52736, 52608, 52616, 0, 1, 49152, 53248, 52224, - 52736, 52608, 52616, 0, 1, 49152, 53248, 52224, - 52736, 52608, 52616, 52618, 0, 1, 49152, 53248, - 52224, 52736, 52608, 52616, 0, 1, 49152, 53248, - 52224, 52736, 52608, 52624, 52620, 0, 1, 49152, - 53248, 52224, 52736, 52608, 52624, 52620, 0, 1, - 49152, 53248, 52224, 52736, 52608, 52624, 52625, 52622, - 0, 1, 49152, 53248, 52224, 52736, 52608, 0, - 1, 49152, 53248, 52224, 52736, 52608, 52624, 0, - 1, 49152, 53248, 52224, 52736, 52608, 52624, 0, - 1, 49152, 53248, 52224, 52736, 52608, 52624, 52626, - 0, 1, 49152, 53248, 52224, 52736, 52608, 52624, - 0, 1, 49152, 53248, 52224, 52736, 52608, 52624, - 52628, 0, 1, 49152, 53248, 52224, 52736, 52608, - 52624, 52628, 0, 1, 49152, 53248, 52224, 52736, - 52608, 52624, 52632, 52630, 0, 1, 49152, 53248, - 52224, 52736, 52608, 52624, 0, 1, 49152, 53248, - 52224, 52736, 52608, 52640, 52632, 0, 1, 49152, - 53248, 52224, 52736, 52608, 52640, 52632, 0, 1, - 49152, 53248, 52224, 52736, 52608, 52640, 52632, 52634, - 0, 1, 49152, 53248, 52224, 52736, 52608, 52640, - 52632, 0, 1, 49152, 53248, 52224, 52736, 52608, - 52640, 52641, 52636, 0, 1, 49152, 53248, 52224, - 52736, 52608, 52640, 52641, 52636, 0, 1, 49152, - 53248, 52224, 52736, 52608, 52640, 52641, 52636, 52638, - 0, 1, 49152, 53248, 52224, 52736, 52608, 0, - 1, 49152, 53248, 52224, 52736, 52608, 52640, 0, - 1, 49152, 53248, 52224, 52736, 52608, 52640, 0, - 1, 49152, 53248, 52224, 52736, 52608, 52640, 52642, - 0, 1, 49152, 53248, 52224, 52736, 52608, 52640, - 0, 1, 49152, 53248, 52224, 52736, 52608, 52640, - 52644, 0, 1, 49152, 53248, 52224, 52736, 52608, - 52640, 52644, 0, 1, 49152, 53248, 52224, 52736, - 52608, 52640, 52648, 52646, 0, 1, 49152, 53248, - 52224, 52736, 52608, 52640, 0, 1, 49152, 53248, - 52224, 52736, 52608, 52640, 52648, 0, 1, 49152, - 53248, 52224, 52736, 52608, 52640, 52648, 0, 1, - 49152, 53248, 52224, 52736, 52608, 52640, 52648, 52650, - 0, 1, 49152, 53248, 52224, 52736, 52608, 52640, - 52648, 0, 1, 49152, 53248, 52224, 52736, 52608, - 52640, 52656, 52652, 0, 1, 49152, 53248, 52224, - 52736, 52608, 52640, 52656, 52652, 0, 1, 49152, - 53248, 52224, 52736, 52608, 52640, 52656, 52657, 52654, - 0, 1, 49152, 53248, 52224, 52736, 52608, 52640, - 0, 1, 49152, 53248, 52224, 52736, 52608, 52672, - 52656, 0, 1, 49152, 53248, 52224, 52736, 52608, - 52672, 52656, 0, 1, 49152, 53248, 52224, 52736, - 52608, 52672, 52656, 52658, 0, 1, 49152, 53248, - 52224, 52736, 52608, 52672, 52656, 0, 1, 49152, - 53248, 52224, 52736, 52608, 52672, 52656, 52660, 0, - 1, 49152, 53248, 52224, 52736, 52608, 52672, 52656, - 52660, 0, 1, 49152, 53248, 52224, 52736, 52608, - 52672, 52656, 52664, 52662, 0, 1, 49152, 53248, - 52224, 52736, 52608, 52672, 52656, 0, 1, 49152, - 53248, 52224, 52736, 52608, 52672, 52673, 52664, 0, - 1, 49152, 53248, 52224, 52736, 52608, 52672, 52673, - 52664, 0, 1, 49152, 53248, 52224, 52736, 52608, - 52672, 52673, 52664, 52666, 0, 1, 49152, 53248, - 52224, 52736, 52608, 52672, 52673, 52664, 0, 1, - 49152, 53248, 52224, 52736, 52608, 52672, 52673, 52664, - 52668, 0, 1, 49152, 53248, 52224, 52736, 52608, - 52672, 52673, 52675, 52668, 0, 1, 49152, 53248, - 52224, 52736, 52608, 52672, 52673, 52675, 52668, 52670, - 0, 1, 49152, 53248, 52224, 52736, 52608, 0, - 1, 49152, 53248, 52224, 52736, 52737, 52672, 0, - 1, 49152, 53248, 52224, 52736, 52737, 52672, 0, - 1, 49152, 53248, 52224, 52736, 52737, 52672, 52674, - 0, 1, 49152, 53248, 52224, 52736, 52737, 52672, - 0, 1, 49152, 53248, 52224, 52736, 52737, 52672, - 52676, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52672, 52676, 0, 1, 49152, 53248, 52224, 52736, - 52737, 52672, 52680, 52678, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52672, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52672, 52680, 0, 1, 49152, - 53248, 52224, 52736, 52737, 52672, 52680, 0, 1, - 49152, 53248, 52224, 52736, 52737, 52672, 52680, 52682, - 0, 1, 49152, 53248, 52224, 52736, 52737, 52672, - 52680, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52672, 52688, 52684, 0, 1, 49152, 53248, 52224, - 52736, 52737, 52672, 52688, 52684, 0, 1, 49152, - 53248, 52224, 52736, 52737, 52672, 52688, 52689, 52686, - 0, 1, 49152, 53248, 52224, 52736, 52737, 52672, - 0, 1, 49152, 53248, 52224, 52736, 52737, 52672, - 52688, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52672, 52688, 0, 1, 49152, 53248, 52224, 52736, - 52737, 52672, 52688, 52690, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52672, 52688, 0, 1, 49152, - 53248, 52224, 52736, 52737, 52672, 52688, 52692, 0, - 1, 49152, 53248, 52224, 52736, 52737, 52672, 52688, - 52692, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52672, 52688, 52696, 52694, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52672, 52688, 0, 1, 49152, - 53248, 52224, 52736, 52737, 52672, 52704, 52696, 0, - 1, 49152, 53248, 52224, 52736, 52737, 52672, 52704, - 52696, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52672, 52704, 52696, 52698, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52672, 52704, 52696, 0, 1, - 49152, 53248, 52224, 52736, 52737, 52672, 52704, 52705, - 52700, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52672, 52704, 52705, 52700, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52672, 52704, 52705, 52700, 52702, - 0, 1, 49152, 53248, 52224, 52736, 52737, 52672, - 0, 1, 49152, 53248, 52224, 52736, 52737, 52672, - 52704, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52739, 52704, 0, 1, 49152, 53248, 52224, 52736, - 52737, 52739, 52704, 52706, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52739, 52704, 0, 1, 49152, - 53248, 52224, 52736, 52737, 52739, 52704, 52708, 0, - 1, 49152, 53248, 52224, 52736, 52737, 52739, 52704, - 52708, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52739, 52704, 52712, 52710, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52739, 52704, 0, 1, 49152, - 53248, 52224, 52736, 52737, 52739, 52704, 52712, 0, - 1, 49152, 53248, 52224, 52736, 52737, 52739, 52704, - 52712, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52739, 52704, 52712, 52714, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52739, 52704, 52712, 0, 1, - 49152, 53248, 52224, 52736, 52737, 52739, 52704, 52720, - 52716, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52739, 52704, 52720, 52716, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52739, 52704, 52720, 52721, 52718, - 0, 1, 49152, 53248, 52224, 52736, 52737, 52739, - 52704, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52739, 52704, 52720, 0, 1, 49152, 53248, 52224, - 52736, 52737, 52739, 52704, 52720, 0, 1, 49152, - 53248, 52224, 52736, 52737, 52739, 52704, 52720, 52722, - 0, 1, 49152, 53248, 52224, 52736, 52737, 52739, - 52743, 52720, 0, 1, 49152, 53248, 52224, 52736, - 52737, 52739, 52743, 52720, 52724, 0, 1, 49152, - 53248, 52224, 52736, 52737, 52739, 52743, 52720, 52724, - 0, 1, 49152, 53248, 52224, 52736, 52737, 52739, - 52743, 52720, 52728, 52726, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52739, 52743, 52720, 0, 1, - 49152, 53248, 52224, 52736, 52737, 52739, 52743, 52720, - 52728, 0, 1, 49152, 53248, 52224, 52736, 52737, - 52739, 52743, 52720, 52728, 0, 1, 49152, 53248, - 52224, 52736, 52737, 52739, 52743, 52720, 52728, 52730, - 0, 1, 49152, 53248, 52224, 52736, 52737, 52739, - 52743, 52720, 52728, 0, 1, 49152, 53248, 52224, - 52736, 52737, 52739, 52743, 52720, 52728, 52732, 0, - 1, 49152, 53248, 52224, 52736, 52737, 52739, 52743, - 52720, 52728, 52732, 0, 1, 49152, 53248, 52224, - 52736, 52737, 52739, 52743, 52720, 52728, 52732, 52734, - 0, 1, 49152, 53248, 52224, 0, 1, 49152, - 53248, 52224, 52736, 0, 1, 49152, 53248, 53249, - 52736, 0, 1, 49152, 53248, 53249, 52736, 52738, - 0, 1, 49152, 53248, 53249, 52736, 0, 1, - 49152, 53248, 53249, 52736, 52740, 0, 1, 49152, - 53248, 53249, 52736, 52740, 0, 1, 49152, 53248, - 53249, 52736, 52744, 52742, 0, 1, 49152, 53248, - 53249, 52736, 0, 1, 49152, 53248, 53249, 52736, - 52744, 0, 1, 49152, 53248, 53249, 52736, 52744, - 0, 1, 49152, 53248, 53249, 52736, 52744, 52746, - 0, 1, 49152, 53248, 53249, 52736, 52744, 0, - 1, 49152, 53248, 53249, 52736, 52752, 52748, 0, - 1, 49152, 53248, 53249, 52736, 52752, 52748, 0, - 1, 49152, 53248, 53249, 52736, 52752, 52753, 52750, - 0, 1, 49152, 53248, 53249, 52736, 0, 1, - 49152, 53248, 53249, 52736, 52752, 0, 1, 49152, - 53248, 53249, 52736, 52752, 0, 1, 49152, 53248, - 53249, 52736, 52752, 52754, 0, 1, 49152, 53248, - 53249, 52736, 52752, 0, 1, 49152, 53248, 53249, - 52736, 52752, 52756, 0, 1, 49152, 53248, 53249, - 52736, 52752, 52756, 0, 1, 49152, 53248, 53249, - 52736, 52752, 52760, 52758, 0, 1, 49152, 53248, - 53249, 52736, 52752, 0, 1, 49152, 53248, 53249, - 52736, 52768, 52760, 0, 1, 49152, 53248, 53249, - 52736, 52768, 52760, 0, 1, 49152, 53248, 53249, - 52736, 52768, 52760, 52762, 0, 1, 49152, 53248, - 53249, 52736, 52768, 52760, 0, 1, 49152, 53248, - 53249, 52736, 52768, 52769, 52764, 0, 1, 49152, - 53248, 53249, 52736, 52768, 52769, 52764, 0, 1, - 49152, 53248, 53249, 52736, 52768, 52769, 52764, 52766, - 0, 1, 49152, 53248, 53249, 52736, 0, 1, - 49152, 53248, 53249, 52736, 52768, 0, 1, 49152, - 53248, 53249, 52736, 52768, 0, 1, 49152, 53248, - 53249, 52736, 52768, 52770, 0, 1, 49152, 53248, - 53249, 52736, 52768, 0, 1, 49152, 53248, 53249, - 52736, 52768, 52772, 0, 1, 49152, 53248, 53249, - 52736, 52768, 52772, 0, 1, 49152, 53248, 53249, - 52736, 52768, 52776, 52774, 0, 1, 49152, 53248, - 53249, 52736, 52768, 0, 1, 49152, 53248, 53249, - 52736, 52768, 52776, 0, 1, 49152, 53248, 53249, - 52736, 52768, 52776, 0, 1, 49152, 53248, 53249, - 52736, 52768, 52776, 52778, 0, 1, 49152, 53248, - 53249, 52736, 52768, 52776, 0, 1, 49152, 53248, - 53249, 52736, 52768, 52784, 52780, 0, 1, 49152, - 53248, 53249, 52736, 52768, 52784, 52780, 0, 1, - 49152, 53248, 53249, 52736, 52768, 52784, 52785, 52782, - 0, 1, 49152, 53248, 53249, 52736, 52768, 0, - 1, 49152, 53248, 53249, 52736, 52800, 52784, 0, - 1, 49152, 53248, 53249, 52736, 52800, 52784, 0, - 1, 49152, 53248, 53249, 52736, 52800, 52784, 52786, - 0, 1, 49152, 53248, 53249, 52736, 52800, 52784, - 0, 1, 49152, 53248, 53249, 52736, 52800, 52784, - 52788, 0, 1, 49152, 53248, 53249, 52736, 52800, - 52784, 52788, 0, 1, 49152, 53248, 53249, 52736, - 52800, 52784, 52792, 52790, 0, 1, 49152, 53248, - 53249, 52736, 52800, 52784, 0, 1, 49152, 53248, - 53249, 52736, 52800, 52801, 52792, 0, 1, 49152, - 53248, 53249, 52736, 52800, 52801, 52792, 0, 1, - 49152, 53248, 53249, 52736, 52800, 52801, 52792, 52794, - 0, 1, 49152, 53248, 53249, 52736, 52800, 52801, - 52792, 0, 1, 49152, 53248, 53249, 52736, 52800, - 52801, 52792, 52796, 0, 1, 49152, 53248, 53249, - 52736, 52800, 52801, 52803, 52796, 0, 1, 49152, - 53248, 53249, 52736, 52800, 52801, 52803, 52796, 52798, - 0, 1, 49152, 53248, 53249, 52736, 0, 1, - 49152, 53248, 53249, 52736, 52800, 0, 1, 49152, - 53248, 53249, 52736, 52800, 0, 1, 49152, 53248, - 53249, 52736, 52800, 52802, 0, 1, 49152, 53248, - 53249, 52736, 52800, 0, 1, 49152, 53248, 53249, - 52736, 52800, 52804, 0, 1, 49152, 53248, 53249, - 52736, 52800, 52804, 0, 1, 49152, 53248, 53249, - 52736, 52800, 52808, 52806, 0, 1, 49152, 53248, - 53249, 52736, 52800, 0, 1, 49152, 53248, 53249, - 52736, 52800, 52808, 0, 1, 49152, 53248, 53249, - 52736, 52800, 52808, 0, 1, 49152, 53248, 53249, - 52736, 52800, 52808, 52810, 0, 1, 49152, 53248, - 53249, 52736, 52800, 52808, 0, 1, 49152, 53248, - 53249, 52736, 52800, 52816, 52812, 0, 1, 49152, - 53248, 53249, 52736, 52800, 52816, 52812, 0, 1, - 49152, 53248, 53249, 52736, 52800, 52816, 52817, 52814, - 0, 1, 49152, 53248, 53249, 52736, 52800, 0, - 1, 49152, 53248, 53249, 52736, 52800, 52816, 0, - 1, 49152, 53248, 53249, 52736, 52800, 52816, 0, - 1, 49152, 53248, 53249, 52736, 52800, 52816, 52818, - 0, 1, 49152, 53248, 53249, 52736, 52800, 52816, - 0, 1, 49152, 53248, 53249, 52736, 52800, 52816, - 52820, 0, 1, 49152, 53248, 53249, 52736, 52800, - 52816, 52820, 0, 1, 49152, 53248, 53249, 52736, - 52800, 52816, 52824, 52822, 0, 1, 49152, 53248, - 53249, 52736, 52800, 52816, 0, 1, 49152, 53248, - 53249, 52736, 52800, 52832, 52824, 0, 1, 49152, - 53248, 53249, 52736, 52800, 52832, 52824, 0, 1, - 49152, 53248, 53249, 52736, 52800, 52832, 52824, 52826, - 0, 1, 49152, 53248, 53249, 52736, 52800, 52832, - 52824, 0, 1, 49152, 53248, 53249, 52736, 52800, - 52832, 52833, 52828, 0, 1, 49152, 53248, 53249, - 52736, 52800, 52832, 52833, 52828, 0, 1, 49152, - 53248, 53249, 52736, 52800, 52832, 52833, 52828, 52830, - 0, 1, 49152, 53248, 53249, 52736, 52800, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52832, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52832, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52832, 52834, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52832, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52832, - 52836, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52832, 52836, 0, 1, 49152, 53248, 53249, 52736, - 52864, 52832, 52840, 52838, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52832, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52832, 52840, 0, 1, 49152, - 53248, 53249, 52736, 52864, 52832, 52840, 0, 1, - 49152, 53248, 53249, 52736, 52864, 52832, 52840, 52842, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52832, - 52840, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52832, 52848, 52844, 0, 1, 49152, 53248, 53249, - 52736, 52864, 52832, 52848, 52844, 0, 1, 49152, - 53248, 53249, 52736, 52864, 52832, 52848, 52849, 52846, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52832, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52865, - 52848, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52865, 52848, 0, 1, 49152, 53248, 53249, 52736, - 52864, 52865, 52848, 52850, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52865, 52848, 0, 1, 49152, - 53248, 53249, 52736, 52864, 52865, 52848, 52852, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52865, 52848, - 52852, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52865, 52848, 52856, 52854, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52865, 52848, 0, 1, 49152, - 53248, 53249, 52736, 52864, 52865, 52848, 52856, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52865, 52867, - 52856, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52865, 52867, 52856, 52858, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52865, 52867, 52856, 0, 1, - 49152, 53248, 53249, 52736, 52864, 52865, 52867, 52856, - 52860, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52865, 52867, 52856, 52860, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52865, 52867, 52856, 52860, 52862, - 0, 1, 49152, 53248, 53249, 52736, 0, 1, - 49152, 53248, 53249, 52736, 52864, 0, 1, 49152, - 53248, 53249, 52736, 52864, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52866, 0, 1, 49152, 53248, - 53249, 52736, 52864, 0, 1, 49152, 53248, 53249, - 52736, 52864, 52868, 0, 1, 49152, 53248, 53249, - 52736, 52864, 52868, 0, 1, 49152, 53248, 53249, - 52736, 52864, 52872, 52870, 0, 1, 49152, 53248, - 53249, 52736, 52864, 0, 1, 49152, 53248, 53249, - 52736, 52864, 52872, 0, 1, 49152, 53248, 53249, - 52736, 52864, 52872, 0, 1, 49152, 53248, 53249, - 52736, 52864, 52872, 52874, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52872, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52880, 52876, 0, 1, 49152, - 53248, 53249, 52736, 52864, 52880, 52876, 0, 1, - 49152, 53248, 53249, 52736, 52864, 52880, 52881, 52878, - 0, 1, 49152, 53248, 53249, 52736, 52864, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52880, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52880, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52880, 52882, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52880, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52880, - 52884, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52880, 52884, 0, 1, 49152, 53248, 53249, 52736, - 52864, 52880, 52888, 52886, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52880, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52896, 52888, 0, 1, 49152, - 53248, 53249, 52736, 52864, 52896, 52888, 0, 1, - 49152, 53248, 53249, 52736, 52864, 52896, 52888, 52890, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52896, - 52888, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52896, 52897, 52892, 0, 1, 49152, 53248, 53249, - 52736, 52864, 52896, 52897, 52892, 0, 1, 49152, - 53248, 53249, 52736, 52864, 52896, 52897, 52892, 52894, - 0, 1, 49152, 53248, 53249, 52736, 52864, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52896, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52896, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52896, 52898, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52896, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52896, - 52900, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52896, 52900, 0, 1, 49152, 53248, 53249, 52736, - 52864, 52896, 52904, 52902, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52896, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52896, 52904, 0, 1, 49152, - 53248, 53249, 52736, 52864, 52896, 52904, 0, 1, - 49152, 53248, 53249, 52736, 52864, 52896, 52904, 52906, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52896, - 52904, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52896, 52912, 52908, 0, 1, 49152, 53248, 53249, - 52736, 52864, 52896, 52912, 52908, 0, 1, 49152, - 53248, 53249, 52736, 52864, 52896, 52912, 52913, 52910, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52896, - 0, 1, 49152, 53248, 53249, 52736, 52864, 52928, - 52912, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52928, 52912, 0, 1, 49152, 53248, 53249, 52736, - 52864, 52928, 52912, 52914, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52928, 52912, 0, 1, 49152, - 53248, 53249, 52736, 52864, 52928, 52912, 52916, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52928, 52912, - 52916, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52928, 52912, 52920, 52918, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52928, 52912, 0, 1, 49152, - 53248, 53249, 52736, 52864, 52928, 52929, 52920, 0, - 1, 49152, 53248, 53249, 52736, 52864, 52928, 52929, - 52920, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52928, 52929, 52920, 52922, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52928, 52929, 52920, 0, 1, - 49152, 53248, 53249, 52736, 52864, 52928, 52929, 52920, - 52924, 0, 1, 49152, 53248, 53249, 52736, 52864, - 52928, 52929, 52931, 52924, 0, 1, 49152, 53248, - 53249, 52736, 52864, 52928, 52929, 52931, 52924, 52926, - 0, 1, 49152, 53248, 53249, 52736, 52864, 0, - 1, 49152, 53248, 53249, 52736, 52992, 52928, 0, - 1, 49152, 53248, 53249, 52736, 52992, 52928, 0, - 1, 49152, 53248, 53249, 52736, 52992, 52928, 52930, - 0, 1, 49152, 53248, 53249, 52736, 52992, 52928, - 0, 1, 49152, 53248, 53249, 52736, 52992, 52928, - 52932, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52928, 52932, 0, 1, 49152, 53248, 53249, 52736, - 52992, 52928, 52936, 52934, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52928, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52928, 52936, 0, 1, 49152, - 53248, 53249, 52736, 52992, 52928, 52936, 0, 1, - 49152, 53248, 53249, 52736, 52992, 52928, 52936, 52938, - 0, 1, 49152, 53248, 53249, 52736, 52992, 52928, - 52936, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52928, 52944, 52940, 0, 1, 49152, 53248, 53249, - 52736, 52992, 52928, 52944, 52940, 0, 1, 49152, - 53248, 53249, 52736, 52992, 52928, 52944, 52945, 52942, - 0, 1, 49152, 53248, 53249, 52736, 52992, 52928, - 0, 1, 49152, 53248, 53249, 52736, 52992, 52928, - 52944, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52928, 52944, 0, 1, 49152, 53248, 53249, 52736, - 52992, 52928, 52944, 52946, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52928, 52944, 0, 1, 49152, - 53248, 53249, 52736, 52992, 52928, 52944, 52948, 0, - 1, 49152, 53248, 53249, 52736, 52992, 52928, 52944, - 52948, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52928, 52944, 52952, 52950, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52928, 52944, 0, 1, 49152, - 53248, 53249, 52736, 52992, 52928, 52960, 52952, 0, - 1, 49152, 53248, 53249, 52736, 52992, 52928, 52960, - 52952, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52928, 52960, 52952, 52954, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52928, 52960, 52952, 0, 1, - 49152, 53248, 53249, 52736, 52992, 52928, 52960, 52961, - 52956, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52928, 52960, 52961, 52956, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52928, 52960, 52961, 52956, 52958, - 0, 1, 49152, 53248, 53249, 52736, 52992, 52928, - 0, 1, 49152, 53248, 53249, 52736, 52992, 52993, - 52960, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52993, 52960, 0, 1, 49152, 53248, 53249, 52736, - 52992, 52993, 52960, 52962, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52993, 52960, 0, 1, 49152, - 53248, 53249, 52736, 52992, 52993, 52960, 52964, 0, - 1, 49152, 53248, 53249, 52736, 52992, 52993, 52960, - 52964, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52993, 52960, 52968, 52966, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52993, 52960, 0, 1, 49152, - 53248, 53249, 52736, 52992, 52993, 52960, 52968, 0, - 1, 49152, 53248, 53249, 52736, 52992, 52993, 52960, - 52968, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52993, 52960, 52968, 52970, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52993, 52960, 52968, 0, 1, - 49152, 53248, 53249, 52736, 52992, 52993, 52960, 52976, - 52972, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52993, 52960, 52976, 52972, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52993, 52960, 52976, 52977, 52974, - 0, 1, 49152, 53248, 53249, 52736, 52992, 52993, - 52960, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52993, 52960, 52976, 0, 1, 49152, 53248, 53249, - 52736, 52992, 52993, 52995, 52976, 0, 1, 49152, - 53248, 53249, 52736, 52992, 52993, 52995, 52976, 52978, - 0, 1, 49152, 53248, 53249, 52736, 52992, 52993, - 52995, 52976, 0, 1, 49152, 53248, 53249, 52736, - 52992, 52993, 52995, 52976, 52980, 0, 1, 49152, - 53248, 53249, 52736, 52992, 52993, 52995, 52976, 52980, - 0, 1, 49152, 53248, 53249, 52736, 52992, 52993, - 52995, 52976, 52984, 52982, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52993, 52995, 52976, 0, 1, - 49152, 53248, 53249, 52736, 52992, 52993, 52995, 52976, - 52984, 0, 1, 49152, 53248, 53249, 52736, 52992, - 52993, 52995, 52976, 52984, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52993, 52995, 52976, 52984, 52986, - 0, 1, 49152, 53248, 53249, 52736, 52992, 52993, - 52995, 52999, 52984, 0, 1, 49152, 53248, 53249, - 52736, 52992, 52993, 52995, 52999, 52984, 52988, 0, - 1, 49152, 53248, 53249, 52736, 52992, 52993, 52995, - 52999, 52984, 52988, 0, 1, 49152, 53248, 53249, - 52736, 52992, 52993, 52995, 52999, 52984, 52988, 52990, - 0, 1, 49152, 53248, 53249, 52736, 0, 1, - 49152, 53248, 53249, 52736, 52992, 0, 1, 49152, - 53248, 53249, 52736, 52992, 0, 1, 49152, 53248, - 53249, 52736, 52992, 52994, 0, 1, 49152, 53248, - 53249, 53251, 52992, 0, 1, 49152, 53248, 53249, - 53251, 52992, 52996, 0, 1, 49152, 53248, 53249, - 53251, 52992, 52996, 0, 1, 49152, 53248, 53249, - 53251, 52992, 53000, 52998, 0, 1, 49152, 53248, - 53249, 53251, 52992, 0, 1, 49152, 53248, 53249, - 53251, 52992, 53000, 0, 1, 49152, 53248, 53249, - 53251, 52992, 53000, 0, 1, 49152, 53248, 53249, - 53251, 52992, 53000, 53002, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53000, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53008, 53004, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53008, 53004, 0, 1, - 49152, 53248, 53249, 53251, 52992, 53008, 53009, 53006, - 0, 1, 49152, 53248, 53249, 53251, 52992, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53008, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53008, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53008, 53010, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53008, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53008, - 53012, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53008, 53012, 0, 1, 49152, 53248, 53249, 53251, - 52992, 53008, 53016, 53014, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53008, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53024, 53016, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53024, 53016, 0, 1, - 49152, 53248, 53249, 53251, 52992, 53024, 53016, 53018, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53024, - 53016, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53024, 53025, 53020, 0, 1, 49152, 53248, 53249, - 53251, 52992, 53024, 53025, 53020, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53024, 53025, 53020, 53022, - 0, 1, 49152, 53248, 53249, 53251, 52992, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53024, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53024, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53024, 53026, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53024, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53024, - 53028, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53024, 53028, 0, 1, 49152, 53248, 53249, 53251, - 52992, 53024, 53032, 53030, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53024, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53024, 53032, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53024, 53032, 0, 1, - 49152, 53248, 53249, 53251, 52992, 53024, 53032, 53034, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53024, - 53032, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53024, 53040, 53036, 0, 1, 49152, 53248, 53249, - 53251, 52992, 53024, 53040, 53036, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53024, 53040, 53041, 53038, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53024, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53056, - 53040, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53056, 53040, 0, 1, 49152, 53248, 53249, 53251, - 52992, 53056, 53040, 53042, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53056, 53040, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53056, 53040, 53044, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53056, 53040, - 53044, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53056, 53040, 53048, 53046, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53056, 53040, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53056, 53057, 53048, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53056, 53057, - 53048, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53056, 53057, 53048, 53050, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53056, 53057, 53048, 0, 1, - 49152, 53248, 53249, 53251, 52992, 53056, 53057, 53048, - 53052, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53056, 53057, 53059, 53052, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53056, 53057, 53059, 53052, 53054, - 0, 1, 49152, 53248, 53249, 53251, 52992, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53056, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53056, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53056, 53058, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53056, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53056, - 53060, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53056, 53060, 0, 1, 49152, 53248, 53249, 53251, - 52992, 53056, 53064, 53062, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53056, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53056, 53064, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53056, 53064, 0, 1, - 49152, 53248, 53249, 53251, 52992, 53056, 53064, 53066, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53056, - 53064, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53056, 53072, 53068, 0, 1, 49152, 53248, 53249, - 53251, 52992, 53056, 53072, 53068, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53056, 53072, 53073, 53070, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53056, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53056, - 53072, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53056, 53072, 0, 1, 49152, 53248, 53249, 53251, - 52992, 53056, 53072, 53074, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53056, 53072, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53056, 53072, 53076, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53056, 53072, - 53076, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53056, 53072, 53080, 53078, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53056, 53072, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53056, 53088, 53080, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53056, 53088, - 53080, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53056, 53088, 53080, 53082, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53056, 53088, 53080, 0, 1, - 49152, 53248, 53249, 53251, 52992, 53056, 53088, 53089, - 53084, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53056, 53088, 53089, 53084, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53056, 53088, 53089, 53084, 53086, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53056, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53120, - 53088, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53120, 53088, 0, 1, 49152, 53248, 53249, 53251, - 52992, 53120, 53088, 53090, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53120, 53088, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53120, 53088, 53092, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53120, 53088, - 53092, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53120, 53088, 53096, 53094, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53120, 53088, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53120, 53088, 53096, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53120, 53088, - 53096, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53120, 53088, 53096, 53098, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53120, 53088, 53096, 0, 1, - 49152, 53248, 53249, 53251, 52992, 53120, 53088, 53104, - 53100, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53120, 53088, 53104, 53100, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53120, 53088, 53104, 53105, 53102, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53120, - 53088, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53120, 53121, 53104, 0, 1, 49152, 53248, 53249, - 53251, 52992, 53120, 53121, 53104, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53120, 53121, 53104, 53106, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53120, - 53121, 53104, 0, 1, 49152, 53248, 53249, 53251, - 52992, 53120, 53121, 53104, 53108, 0, 1, 49152, - 53248, 53249, 53251, 52992, 53120, 53121, 53104, 53108, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53120, - 53121, 53104, 53112, 53110, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53120, 53121, 53104, 0, 1, - 49152, 53248, 53249, 53251, 52992, 53120, 53121, 53104, - 53112, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53120, 53121, 53123, 53112, 0, 1, 49152, 53248, - 53249, 53251, 52992, 53120, 53121, 53123, 53112, 53114, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53120, - 53121, 53123, 53112, 0, 1, 49152, 53248, 53249, - 53251, 52992, 53120, 53121, 53123, 53112, 53116, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53120, 53121, - 53123, 53112, 53116, 0, 1, 49152, 53248, 53249, - 53251, 52992, 53120, 53121, 53123, 53112, 53116, 53118, - 0, 1, 49152, 53248, 53249, 53251, 52992, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53120, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53120, 0, - 1, 49152, 53248, 53249, 53251, 52992, 53120, 53122, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53120, - 0, 1, 49152, 53248, 53249, 53251, 52992, 53120, - 53124, 0, 1, 49152, 53248, 53249, 53251, 52992, - 53120, 53124, 0, 1, 49152, 53248, 53249, 53251, - 52992, 53120, 53128, 53126, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53128, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53120, 53128, 0, 1, - 49152, 53248, 53249, 53251, 53255, 53120, 53128, 53130, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53120, - 53128, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53136, 53132, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53120, 53136, 53132, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53120, 53136, 53137, 53134, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53120, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53120, - 53136, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53136, 0, 1, 49152, 53248, 53249, 53251, - 53255, 53120, 53136, 53138, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53136, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53120, 53136, 53140, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53120, 53136, - 53140, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53136, 53144, 53142, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53136, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53120, 53152, 53144, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53120, 53152, - 53144, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53152, 53144, 53146, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53152, 53144, 0, 1, - 49152, 53248, 53249, 53251, 53255, 53120, 53152, 53153, - 53148, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53152, 53153, 53148, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53152, 53153, 53148, 53150, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53120, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53120, - 53152, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53152, 0, 1, 49152, 53248, 53249, 53251, - 53255, 53120, 53152, 53154, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53152, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53120, 53152, 53156, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53120, 53152, - 53156, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53152, 53160, 53158, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53152, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53120, 53152, 53160, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53120, 53152, - 53160, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53152, 53160, 53162, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53152, 53160, 0, 1, - 49152, 53248, 53249, 53251, 53255, 53120, 53152, 53168, - 53164, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53152, 53168, 53164, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53152, 53168, 53169, 53166, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53120, - 53152, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53184, 53168, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53120, 53184, 53168, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53120, 53184, 53168, 53170, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53120, - 53184, 53168, 0, 1, 49152, 53248, 53249, 53251, - 53255, 53120, 53184, 53168, 53172, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53120, 53184, 53168, 53172, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53120, - 53184, 53168, 53176, 53174, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53184, 53168, 0, 1, - 49152, 53248, 53249, 53251, 53255, 53120, 53184, 53185, - 53176, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53184, 53185, 53176, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53184, 53185, 53176, 53178, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53120, - 53184, 53185, 53176, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53120, 53184, 53185, 53176, 53180, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53120, 53184, - 53185, 53187, 53180, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53120, 53184, 53185, 53187, 53180, 53182, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53120, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53120, - 53184, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53184, 0, 1, 49152, 53248, 53249, 53251, - 53255, 53120, 53184, 53186, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53184, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53120, 53184, 53188, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53120, 53184, - 53188, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53184, 53192, 53190, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53184, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53120, 53184, 53192, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53120, 53184, - 53192, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53184, 53192, 53194, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53184, 53192, 0, 1, - 49152, 53248, 53249, 53251, 53255, 53120, 53184, 53200, - 53196, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53120, 53184, 53200, 53196, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53120, 53184, 53200, 53201, 53198, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53263, - 53184, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53263, 53184, 53200, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53263, 53184, 53200, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53263, 53184, 53200, 53202, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53263, - 53184, 53200, 0, 1, 49152, 53248, 53249, 53251, - 53255, 53263, 53184, 53200, 53204, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53263, 53184, 53200, 53204, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53263, - 53184, 53200, 53208, 53206, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53263, 53184, 53200, 0, 1, - 49152, 53248, 53249, 53251, 53255, 53263, 53184, 53216, - 53208, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53263, 53184, 53216, 53208, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53263, 53184, 53216, 53208, 53210, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53263, - 53184, 53216, 53208, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53263, 53184, 53216, 53217, 53212, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53263, 53184, - 53216, 53217, 53212, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53263, 53184, 53216, 53217, 53212, 53214, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53263, - 53184, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53263, 53184, 53216, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53263, 53184, 53216, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53263, 53184, 53216, 53218, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53263, - 53184, 53216, 0, 1, 49152, 53248, 53249, 53251, - 53255, 53263, 53184, 53216, 53220, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53263, 53184, 53216, 53220, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53263, - 53184, 53216, 53224, 53222, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53263, 53184, 53216, 0, 1, - 49152, 53248, 53249, 53251, 53255, 53263, 53184, 53216, - 53224, 0, 1, 49152, 53248, 53249, 53251, 53255, - 53263, 53184, 53216, 53224, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53263, 53184, 53216, 53224, 53226, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53263, - 53184, 53216, 53224, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53263, 53184, 53216, 53232, 53228, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53263, 53184, - 53216, 53232, 53228, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53263, 53184, 53216, 53232, 53233, 53230, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53263, - 53184, 53216, 0, 1, 49152, 53248, 53249, 53251, - 53255, 53263, 53184, 53216, 53232, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53263, 53184, 53216, 53232, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53263, - 53184, 53216, 53232, 53234, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53263, 53184, 53216, 53232, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53263, 53184, - 53216, 53232, 53236, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53263, 53184, 53216, 53232, 53236, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53263, 53184, - 53216, 53232, 53240, 53238, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53263, 53184, 53216, 53232, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53263, 53184, - 53216, 53232, 53240, 0, 1, 49152, 53248, 53249, - 53251, 53255, 53263, 53184, 53216, 53232, 53240, 0, - 1, 49152, 53248, 53249, 53251, 53255, 53263, 53184, - 53216, 53232, 53240, 53242, 0, 1, 49152, 53248, - 53249, 53251, 53255, 53263, 53184, 53216, 53232, 53240, - 0, 1, 49152, 53248, 53249, 53251, 53255, 53263, - 53184, 53216, 53232, 53240, 53244, 0, 1, 49152, - 53248, 53249, 53251, 53255, 53263, 53184, 53216, 53232, - 53240, 53244, 0, 1, 49152, 53248, 53249, 53251, - 53255, 53263, 53184, 53216, 53232, 53240, 53244, 53246, - 0, 1, 49152, 0, 1, 49152, 53248, 0, - 1, 49152, 53248, 0, 1, 49152, 53248, 53250, - 0, 1, 49152, 53248, 0, 1, 49152, 53248, - 53252, 0, 1, 49152, 53248, 53252, 0, 1, - 49152, 53248, 53256, 53254, 0, 1, 49152, 53248, - 0, 1, 49152, 53248, 53256, 0, 1, 49152, - 53248, 53256, 0, 1, 49152, 53248, 53256, 53258, - 0, 1, 49152, 53248, 53256, 0, 1, 49152, - 53248, 53264, 53260, 0, 1, 49152, 53248, 53264, - 53260, 0, 1, 49152, 53248, 53264, 53265, 53262, - 0, 1, 49152, 53248, 0, 1, 49152, 53248, - 53264, 0, 1, 49152, 53248, 53264, 0, 1, - 49152, 53248, 53264, 53266, 0, 1, 49152, 53248, - 53264, 0, 1, 49152, 53248, 53264, 53268, 0, - 1, 49152, 53248, 53264, 53268, 0, 1, 49152, - 53248, 53264, 53272, 53270, 0, 1, 49152, 53248, - 53264, 0, 1, 49152, 53248, 53280, 53272, 0, - 1, 49152, 53248, 53280, 53272, 0, 1, 49152, - 53248, 53280, 53272, 53274, 0, 1, 49152, 53248, - 53280, 53272, 0, 1, 49152, 53248, 53280, 53281, - 53276, 0, 1, 49152, 53248, 53280, 53281, 53276, - 0, 1, 49152, 53248, 53280, 53281, 53276, 53278, - 0, 1, 49152, 53248, 0, 1, 49152, 53248, - 53280, 0, 1, 49152, 53248, 53280, 0, 1, - 49152, 53248, 53280, 53282, 0, 1, 49152, 53248, - 53280, 0, 1, 49152, 53248, 53280, 53284, 0, - 1, 49152, 53248, 53280, 53284, 0, 1, 49152, - 53248, 53280, 53288, 53286, 0, 1, 49152, 53248, - 53280, 0, 1, 49152, 53248, 53280, 53288, 0, - 1, 49152, 53248, 53280, 53288, 0, 1, 49152, - 53248, 53280, 53288, 53290, 0, 1, 49152, 53248, - 53280, 53288, 0, 1, 49152, 53248, 53280, 53296, - 53292, 0, 1, 49152, 53248, 53280, 53296, 53292, - 0, 1, 49152, 53248, 53280, 53296, 53297, 53294, - 0, 1, 49152, 53248, 53280, 0, 1, 49152, - 53248, 53312, 53296, 0, 1, 49152, 53248, 53312, - 53296, 0, 1, 49152, 53248, 53312, 53296, 53298, - 0, 1, 49152, 53248, 53312, 53296, 0, 1, - 49152, 53248, 53312, 53296, 53300, 0, 1, 49152, - 53248, 53312, 53296, 53300, 0, 1, 49152, 53248, - 53312, 53296, 53304, 53302, 0, 1, 49152, 53248, - 53312, 53296, 0, 1, 49152, 53248, 53312, 53313, - 53304, 0, 1, 49152, 53248, 53312, 53313, 53304, - 0, 1, 49152, 53248, 53312, 53313, 53304, 53306, - 0, 1, 49152, 53248, 53312, 53313, 53304, 0, - 1, 49152, 53248, 53312, 53313, 53304, 53308, 0, - 1, 49152, 53248, 53312, 53313, 53315, 53308, 0, - 1, 49152, 53248, 53312, 53313, 53315, 53308, 53310, - 0, 1, 49152, 53248, 0, 1, 49152, 53248, - 53312, 0, 1, 49152, 53248, 53312, 0, 1, - 49152, 53248, 53312, 53314, 0, 1, 49152, 53248, - 53312, 0, 1, 49152, 53248, 53312, 53316, 0, - 1, 49152, 53248, 53312, 53316, 0, 1, 49152, - 53248, 53312, 53320, 53318, 0, 1, 49152, 53248, - 53312, 0, 1, 49152, 53248, 53312, 53320, 0, - 1, 49152, 53248, 53312, 53320, 0, 1, 49152, - 53248, 53312, 53320, 53322, 0, 1, 49152, 53248, - 53312, 53320, 0, 1, 49152, 53248, 53312, 53328, - 53324, 0, 1, 49152, 53248, 53312, 53328, 53324, - 0, 1, 49152, 53248, 53312, 53328, 53329, 53326, - 0, 1, 49152, 53248, 53312, 0, 1, 49152, - 53248, 53312, 53328, 0, 1, 49152, 53248, 53312, - 53328, 0, 1, 49152, 53248, 53312, 53328, 53330, - 0, 1, 49152, 53248, 53312, 53328, 0, 1, - 49152, 53248, 53312, 53328, 53332, 0, 1, 49152, - 53248, 53312, 53328, 53332, 0, 1, 49152, 53248, - 53312, 53328, 53336, 53334, 0, 1, 49152, 53248, - 53312, 53328, 0, 1, 49152, 53248, 53312, 53344, - 53336, 0, 1, 49152, 53248, 53312, 53344, 53336, - 0, 1, 49152, 53248, 53312, 53344, 53336, 53338, - 0, 1, 49152, 53248, 53312, 53344, 53336, 0, - 1, 49152, 53248, 53312, 53344, 53345, 53340, 0, - 1, 49152, 53248, 53312, 53344, 53345, 53340, 0, - 1, 49152, 53248, 53312, 53344, 53345, 53340, 53342, - 0, 1, 49152, 53248, 53312, 0, 1, 49152, - 53248, 53376, 53344, 0, 1, 49152, 53248, 53376, - 53344, 0, 1, 49152, 53248, 53376, 53344, 53346, - 0, 1, 49152, 53248, 53376, 53344, 0, 1, - 49152, 53248, 53376, 53344, 53348, 0, 1, 49152, - 53248, 53376, 53344, 53348, 0, 1, 49152, 53248, - 53376, 53344, 53352, 53350, 0, 1, 49152, 53248, - 53376, 53344, 0, 1, 49152, 53248, 53376, 53344, - 53352, 0, 1, 49152, 53248, 53376, 53344, 53352, - 0, 1, 49152, 53248, 53376, 53344, 53352, 53354, - 0, 1, 49152, 53248, 53376, 53344, 53352, 0, - 1, 49152, 53248, 53376, 53344, 53360, 53356, 0, - 1, 49152, 53248, 53376, 53344, 53360, 53356, 0, - 1, 49152, 53248, 53376, 53344, 53360, 53361, 53358, - 0, 1, 49152, 53248, 53376, 53344, 0, 1, - 49152, 53248, 53376, 53377, 53360, 0, 1, 49152, - 53248, 53376, 53377, 53360, 0, 1, 49152, 53248, - 53376, 53377, 53360, 53362, 0, 1, 49152, 53248, - 53376, 53377, 53360, 0, 1, 49152, 53248, 53376, - 53377, 53360, 53364, 0, 1, 49152, 53248, 53376, - 53377, 53360, 53364, 0, 1, 49152, 53248, 53376, - 53377, 53360, 53368, 53366, 0, 1, 49152, 53248, - 53376, 53377, 53360, 0, 1, 49152, 53248, 53376, - 53377, 53360, 53368, 0, 1, 49152, 53248, 53376, - 53377, 53379, 53368, 0, 1, 49152, 53248, 53376, - 53377, 53379, 53368, 53370, 0, 1, 49152, 53248, - 53376, 53377, 53379, 53368, 0, 1, 49152, 53248, - 53376, 53377, 53379, 53368, 53372, 0, 1, 49152, - 53248, 53376, 53377, 53379, 53368, 53372, 0, 1, - 49152, 53248, 53376, 53377, 53379, 53368, 53372, 53374, - 0, 1, 49152, 53248, 0, 1, 49152, 53248, - 53376, 0, 1, 49152, 53248, 53376, 0, 1, - 49152, 53248, 53376, 53378, 0, 1, 49152, 53248, - 53376, 0, 1, 49152, 53248, 53376, 53380, 0, - 1, 49152, 53248, 53376, 53380, 0, 1, 49152, - 53248, 53376, 53384, 53382, 0, 1, 49152, 53248, - 53376, 0, 1, 49152, 53248, 53376, 53384, 0, - 1, 49152, 53248, 53376, 53384, 0, 1, 49152, - 53248, 53376, 53384, 53386, 0, 1, 49152, 53248, - 53376, 53384, 0, 1, 49152, 53248, 53376, 53392, - 53388, 0, 1, 49152, 53248, 53376, 53392, 53388, - 0, 1, 49152, 53248, 53376, 53392, 53393, 53390, - 0, 1, 49152, 53248, 53376, 0, 1, 49152, - 53248, 53376, 53392, 0, 1, 49152, 53248, 53376, - 53392, 0, 1, 49152, 53248, 53376, 53392, 53394, - 0, 1, 49152, 53248, 53376, 53392, 0, 1, - 49152, 53248, 53376, 53392, 53396, 0, 1, 49152, - 53248, 53376, 53392, 53396, 0, 1, 49152, 53248, - 53376, 53392, 53400, 53398, 0, 1, 49152, 53248, - 53376, 53392, 0, 1, 49152, 53248, 53376, 53408, - 53400, 0, 1, 49152, 53248, 53376, 53408, 53400, - 0, 1, 49152, 53248, 53376, 53408, 53400, 53402, - 0, 1, 49152, 53248, 53376, 53408, 53400, 0, - 1, 49152, 53248, 53376, 53408, 53409, 53404, 0, - 1, 49152, 53248, 53376, 53408, 53409, 53404, 0, - 1, 49152, 53248, 53376, 53408, 53409, 53404, 53406, - 0, 1, 49152, 53248, 53376, 0, 1, 49152, - 53248, 53376, 53408, 0, 1, 49152, 53248, 53376, - 53408, 0, 1, 49152, 53248, 53376, 53408, 53410, - 0, 1, 49152, 53248, 53376, 53408, 0, 1, - 49152, 53248, 53376, 53408, 53412, 0, 1, 49152, - 53248, 53376, 53408, 53412, 0, 1, 49152, 53248, - 53376, 53408, 53416, 53414, 0, 1, 49152, 53248, - 53376, 53408, 0, 1, 49152, 53248, 53376, 53408, - 53416, 0, 1, 49152, 53248, 53376, 53408, 53416, - 0, 1, 49152, 53248, 53376, 53408, 53416, 53418, - 0, 1, 49152, 53248, 53376, 53408, 53416, 0, - 1, 49152, 53248, 53376, 53408, 53424, 53420, 0, - 1, 49152, 53248, 53376, 53408, 53424, 53420, 0, - 1, 49152, 53248, 53376, 53408, 53424, 53425, 53422, - 0, 1, 49152, 53248, 53376, 53408, 0, 1, - 49152, 53248, 53376, 53440, 53424, 0, 1, 49152, - 53248, 53376, 53440, 53424, 0, 1, 49152, 53248, - 53376, 53440, 53424, 53426, 0, 1, 49152, 53248, - 53376, 53440, 53424, 0, 1, 49152, 53248, 53376, - 53440, 53424, 53428, 0, 1, 49152, 53248, 53376, - 53440, 53424, 53428, 0, 1, 49152, 53248, 53376, - 53440, 53424, 53432, 53430, 0, 1, 49152, 53248, - 53376, 53440, 53424, 0, 1, 49152, 53248, 53376, - 53440, 53441, 53432, 0, 1, 49152, 53248, 53376, - 53440, 53441, 53432, 0, 1, 49152, 53248, 53376, - 53440, 53441, 53432, 53434, 0, 1, 49152, 53248, - 53376, 53440, 53441, 53432, 0, 1, 49152, 53248, - 53376, 53440, 53441, 53432, 53436, 0, 1, 49152, - 53248, 53376, 53440, 53441, 53443, 53436, 0, 1, - 49152, 53248, 53376, 53440, 53441, 53443, 53436, 53438, - 0, 1, 49152, 53248, 53376, 0, 1, 49152, - 53248, 53504, 53440, 0, 1, 49152, 53248, 53504, - 53440, 0, 1, 49152, 53248, 53504, 53440, 53442, - 0, 1, 49152, 53248, 53504, 53440, 0, 1, - 49152, 53248, 53504, 53440, 53444, 0, 1, 49152, - 53248, 53504, 53440, 53444, 0, 1, 49152, 53248, - 53504, 53440, 53448, 53446, 0, 1, 49152, 53248, - 53504, 53440, 0, 1, 49152, 53248, 53504, 53440, - 53448, 0, 1, 49152, 53248, 53504, 53440, 53448, - 0, 1, 49152, 53248, 53504, 53440, 53448, 53450, - 0, 1, 49152, 53248, 53504, 53440, 53448, 0, - 1, 49152, 53248, 53504, 53440, 53456, 53452, 0, - 1, 49152, 53248, 53504, 53440, 53456, 53452, 0, - 1, 49152, 53248, 53504, 53440, 53456, 53457, 53454, - 0, 1, 49152, 53248, 53504, 53440, 0, 1, - 49152, 53248, 53504, 53440, 53456, 0, 1, 49152, - 53248, 53504, 53440, 53456, 0, 1, 49152, 53248, - 53504, 53440, 53456, 53458, 0, 1, 49152, 53248, - 53504, 53440, 53456, 0, 1, 49152, 53248, 53504, - 53440, 53456, 53460, 0, 1, 49152, 53248, 53504, - 53440, 53456, 53460, 0, 1, 49152, 53248, 53504, - 53440, 53456, 53464, 53462, 0, 1, 49152, 53248, - 53504, 53440, 53456, 0, 1, 49152, 53248, 53504, - 53440, 53472, 53464, 0, 1, 49152, 53248, 53504, - 53440, 53472, 53464, 0, 1, 49152, 53248, 53504, - 53440, 53472, 53464, 53466, 0, 1, 49152, 53248, - 53504, 53440, 53472, 53464, 0, 1, 49152, 53248, - 53504, 53440, 53472, 53473, 53468, 0, 1, 49152, - 53248, 53504, 53440, 53472, 53473, 53468, 0, 1, - 49152, 53248, 53504, 53440, 53472, 53473, 53468, 53470, - 0, 1, 49152, 53248, 53504, 53440, 0, 1, - 49152, 53248, 53504, 53505, 53472, 0, 1, 49152, - 53248, 53504, 53505, 53472, 0, 1, 49152, 53248, - 53504, 53505, 53472, 53474, 0, 1, 49152, 53248, - 53504, 53505, 53472, 0, 1, 49152, 53248, 53504, - 53505, 53472, 53476, 0, 1, 49152, 53248, 53504, - 53505, 53472, 53476, 0, 1, 49152, 53248, 53504, - 53505, 53472, 53480, 53478, 0, 1, 49152, 53248, - 53504, 53505, 53472, 0, 1, 49152, 53248, 53504, - 53505, 53472, 53480, 0, 1, 49152, 53248, 53504, - 53505, 53472, 53480, 0, 1, 49152, 53248, 53504, - 53505, 53472, 53480, 53482, 0, 1, 49152, 53248, - 53504, 53505, 53472, 53480, 0, 1, 49152, 53248, - 53504, 53505, 53472, 53488, 53484, 0, 1, 49152, - 53248, 53504, 53505, 53472, 53488, 53484, 0, 1, - 49152, 53248, 53504, 53505, 53472, 53488, 53489, 53486, - 0, 1, 49152, 53248, 53504, 53505, 53472, 0, - 1, 49152, 53248, 53504, 53505, 53472, 53488, 0, - 1, 49152, 53248, 53504, 53505, 53507, 53488, 0, - 1, 49152, 53248, 53504, 53505, 53507, 53488, 53490, - 0, 1, 49152, 53248, 53504, 53505, 53507, 53488, - 0, 1, 49152, 53248, 53504, 53505, 53507, 53488, - 53492, 0, 1, 49152, 53248, 53504, 53505, 53507, - 53488, 53492, 0, 1, 49152, 53248, 53504, 53505, - 53507, 53488, 53496, 53494, 0, 1, 49152, 53248, - 53504, 53505, 53507, 53488, 0, 1, 49152, 53248, - 53504, 53505, 53507, 53488, 53496, 0, 1, 49152, - 53248, 53504, 53505, 53507, 53488, 53496, 0, 1, - 49152, 53248, 53504, 53505, 53507, 53488, 53496, 53498, - 0, 1, 49152, 53248, 53504, 53505, 53507, 53511, - 53496, 0, 1, 49152, 53248, 53504, 53505, 53507, - 53511, 53496, 53500, 0, 1, 49152, 53248, 53504, - 53505, 53507, 53511, 53496, 53500, 0, 1, 49152, - 53248, 53504, 53505, 53507, 53511, 53496, 53500, 53502, - 0, 1, 49152, 53248, 0, 1, 49152, 53248, - 53504, 0, 1, 49152, 53248, 53504, 0, 1, - 49152, 53248, 53504, 53506, 0, 1, 49152, 53248, - 53504, 0, 1, 49152, 53248, 53504, 53508, 0, - 1, 49152, 53248, 53504, 53508, 0, 1, 49152, - 53248, 53504, 53512, 53510, 0, 1, 49152, 53248, - 53504, 0, 1, 49152, 53248, 53504, 53512, 0, - 1, 49152, 53248, 53504, 53512, 0, 1, 49152, - 53248, 53504, 53512, 53514, 0, 1, 49152, 53248, - 53504, 53512, 0, 1, 49152, 53248, 53504, 53520, - 53516, 0, 1, 49152, 53248, 53504, 53520, 53516, - 0, 1, 49152, 53248, 53504, 53520, 53521, 53518, - 0, 1, 49152, 53248, 53504, 0, 1, 49152, - 53248, 53504, 53520, 0, 1, 49152, 53248, 53504, - 53520, 0, 1, 49152, 53248, 53504, 53520, 53522, - 0, 1, 49152, 53248, 53504, 53520, 0, 1, - 49152, 53248, 53504, 53520, 53524, 0, 1, 49152, - 53248, 53504, 53520, 53524, 0, 1, 49152, 53248, - 53504, 53520, 53528, 53526, 0, 1, 49152, 53248, - 53504, 53520, 0, 1, 49152, 53248, 53504, 53536, - 53528, 0, 1, 49152, 53248, 53504, 53536, 53528, - 0, 1, 49152, 53248, 53504, 53536, 53528, 53530, - 0, 1, 49152, 53248, 53504, 53536, 53528, 0, - 1, 49152, 53248, 53504, 53536, 53537, 53532, 0, - 1, 49152, 53248, 53504, 53536, 53537, 53532, 0, - 1, 49152, 53248, 53504, 53536, 53537, 53532, 53534, - 0, 1, 49152, 53248, 53504, 0, 1, 49152, - 53248, 53504, 53536, 0, 1, 49152, 53248, 53504, - 53536, 0, 1, 49152, 53248, 53504, 53536, 53538, - 0, 1, 49152, 53248, 53504, 53536, 0, 1, - 49152, 53248, 53504, 53536, 53540, 0, 1, 49152, - 53248, 53504, 53536, 53540, 0, 1, 49152, 53248, - 53504, 53536, 53544, 53542, 0, 1, 49152, 53248, - 53504, 53536, 0, 1, 49152, 53248, 53504, 53536, - 53544, 0, 1, 49152, 53248, 53504, 53536, 53544, - 0, 1, 49152, 53248, 53504, 53536, 53544, 53546, - 0, 1, 49152, 53248, 53504, 53536, 53544, 0, - 1, 49152, 53248, 53504, 53536, 53552, 53548, 0, - 1, 49152, 53248, 53504, 53536, 53552, 53548, 0, - 1, 49152, 53248, 53504, 53536, 53552, 53553, 53550, - 0, 1, 49152, 53248, 53504, 53536, 0, 1, - 49152, 53248, 53504, 53568, 53552, 0, 1, 49152, - 53248, 53504, 53568, 53552, 0, 1, 49152, 53248, - 53504, 53568, 53552, 53554, 0, 1, 49152, 53248, - 53504, 53568, 53552, 0, 1, 49152, 53248, 53504, - 53568, 53552, 53556, 0, 1, 49152, 53248, 53504, - 53568, 53552, 53556, 0, 1, 49152, 53248, 53504, - 53568, 53552, 53560, 53558, 0, 1, 49152, 53248, - 53504, 53568, 53552, 0, 1, 49152, 53248, 53504, - 53568, 53569, 53560, 0, 1, 49152, 53248, 53504, - 53568, 53569, 53560, 0, 1, 49152, 53248, 53504, - 53568, 53569, 53560, 53562, 0, 1, 49152, 53248, - 53504, 53568, 53569, 53560, 0, 1, 49152, 53248, - 53504, 53568, 53569, 53560, 53564, 0, 1, 49152, - 53248, 53504, 53568, 53569, 53571, 53564, 0, 1, - 49152, 53248, 53504, 53568, 53569, 53571, 53564, 53566, - 0, 1, 49152, 53248, 53504, 0, 1, 49152, - 53248, 53504, 53568, 0, 1, 49152, 53248, 53504, - 53568, 0, 1, 49152, 53248, 53504, 53568, 53570, - 0, 1, 49152, 53248, 53504, 53568, 0, 1, - 49152, 53248, 53504, 53568, 53572, 0, 1, 49152, - 53248, 53504, 53568, 53572, 0, 1, 49152, 53248, - 53504, 53568, 53576, 53574, 0, 1, 49152, 53248, - 53504, 53568, 0, 1, 49152, 53248, 53504, 53568, - 53576, 0, 1, 49152, 53248, 53504, 53568, 53576, - 0, 1, 49152, 53248, 53504, 53568, 53576, 53578, - 0, 1, 49152, 53248, 53504, 53568, 53576, 0, - 1, 49152, 53248, 53504, 53568, 53584, 53580, 0, - 1, 49152, 53248, 53504, 53568, 53584, 53580, 0, - 1, 49152, 53248, 53504, 53568, 53584, 53585, 53582, - 0, 1, 49152, 53248, 53504, 53568, 0, 1, - 49152, 53248, 53504, 53568, 53584, 0, 1, 49152, - 53248, 53504, 53568, 53584, 0, 1, 49152, 53248, - 53504, 53568, 53584, 53586, 0, 1, 49152, 53248, - 53504, 53568, 53584, 0, 1, 49152, 53248, 53504, - 53568, 53584, 53588, 0, 1, 49152, 53248, 53504, - 53568, 53584, 53588, 0, 1, 49152, 53248, 53504, - 53568, 53584, 53592, 53590, 0, 1, 49152, 53248, - 53504, 53568, 53584, 0, 1, 49152, 53248, 53504, - 53568, 53600, 53592, 0, 1, 49152, 53248, 53504, - 53568, 53600, 53592, 0, 1, 49152, 53248, 53504, - 53568, 53600, 53592, 53594, 0, 1, 49152, 53248, - 53504, 53568, 53600, 53592, 0, 1, 49152, 53248, - 53504, 53568, 53600, 53601, 53596, 0, 1, 49152, - 53248, 53504, 53568, 53600, 53601, 53596, 0, 1, - 49152, 53248, 53504, 53568, 53600, 53601, 53596, 53598, - 0, 1, 49152, 53248, 53504, 53568, 0, 1, - 49152, 53248, 53504, 53632, 53600, 0, 1, 49152, - 53248, 53504, 53632, 53600, 0, 1, 49152, 53248, - 53504, 53632, 53600, 53602, 0, 1, 49152, 53248, - 53504, 53632, 53600, 0, 1, 49152, 53248, 53504, - 53632, 53600, 53604, 0, 1, 49152, 53248, 53504, - 53632, 53600, 53604, 0, 1, 49152, 53248, 53504, - 53632, 53600, 53608, 53606, 0, 1, 49152, 53248, - 53504, 53632, 53600, 0, 1, 49152, 53248, 53504, - 53632, 53600, 53608, 0, 1, 49152, 53248, 53504, - 53632, 53600, 53608, 0, 1, 49152, 53248, 53504, - 53632, 53600, 53608, 53610, 0, 1, 49152, 53248, - 53504, 53632, 53600, 53608, 0, 1, 49152, 53248, - 53504, 53632, 53600, 53616, 53612, 0, 1, 49152, - 53248, 53504, 53632, 53600, 53616, 53612, 0, 1, - 49152, 53248, 53504, 53632, 53600, 53616, 53617, 53614, - 0, 1, 49152, 53248, 53504, 53632, 53600, 0, - 1, 49152, 53248, 53504, 53632, 53633, 53616, 0, - 1, 49152, 53248, 53504, 53632, 53633, 53616, 0, - 1, 49152, 53248, 53504, 53632, 53633, 53616, 53618, - 0, 1, 49152, 53248, 53504, 53632, 53633, 53616, - 0, 1, 49152, 53248, 53504, 53632, 53633, 53616, - 53620, 0, 1, 49152, 53248, 53504, 53632, 53633, - 53616, 53620, 0, 1, 49152, 53248, 53504, 53632, - 53633, 53616, 53624, 53622, 0, 1, 49152, 53248, - 53504, 53632, 53633, 53616, 0, 1, 49152, 53248, - 53504, 53632, 53633, 53616, 53624, 0, 1, 49152, - 53248, 53504, 53632, 53633, 53635, 53624, 0, 1, - 49152, 53248, 53504, 53632, 53633, 53635, 53624, 53626, - 0, 1, 49152, 53248, 53504, 53632, 53633, 53635, - 53624, 0, 1, 49152, 53248, 53504, 53632, 53633, - 53635, 53624, 53628, 0, 1, 49152, 53248, 53504, - 53632, 53633, 53635, 53624, 53628, 0, 1, 49152, - 53248, 53504, 53632, 53633, 53635, 53624, 53628, 53630, - 0, 1, 49152, 53248, 53504, 0, 1, 49152, - 53248, 53760, 53632, 0, 1, 49152, 53248, 53760, - 53632, 0, 1, 49152, 53248, 53760, 53632, 53634, - 0, 1, 49152, 53248, 53760, 53632, 0, 1, - 49152, 53248, 53760, 53632, 53636, 0, 1, 49152, - 53248, 53760, 53632, 53636, 0, 1, 49152, 53248, - 53760, 53632, 53640, 53638, 0, 1, 49152, 53248, - 53760, 53632, 0, 1, 49152, 53248, 53760, 53632, - 53640, 0, 1, 49152, 53248, 53760, 53632, 53640, - 0, 1, 49152, 53248, 53760, 53632, 53640, 53642, - 0, 1, 49152, 53248, 53760, 53632, 53640, 0, - 1, 49152, 53248, 53760, 53632, 53648, 53644, 0, - 1, 49152, 53248, 53760, 53632, 53648, 53644, 0, - 1, 49152, 53248, 53760, 53632, 53648, 53649, 53646, - 0, 1, 49152, 53248, 53760, 53632, 0, 1, - 49152, 53248, 53760, 53632, 53648, 0, 1, 49152, - 53248, 53760, 53632, 53648, 0, 1, 49152, 53248, - 53760, 53632, 53648, 53650, 0, 1, 49152, 53248, - 53760, 53632, 53648, 0, 1, 49152, 53248, 53760, - 53632, 53648, 53652, 0, 1, 49152, 53248, 53760, - 53632, 53648, 53652, 0, 1, 49152, 53248, 53760, - 53632, 53648, 53656, 53654, 0, 1, 49152, 53248, - 53760, 53632, 53648, 0, 1, 49152, 53248, 53760, - 53632, 53664, 53656, 0, 1, 49152, 53248, 53760, - 53632, 53664, 53656, 0, 1, 49152, 53248, 53760, - 53632, 53664, 53656, 53658, 0, 1, 49152, 53248, - 53760, 53632, 53664, 53656, 0, 1, 49152, 53248, - 53760, 53632, 53664, 53665, 53660, 0, 1, 49152, - 53248, 53760, 53632, 53664, 53665, 53660, 0, 1, - 49152, 53248, 53760, 53632, 53664, 53665, 53660, 53662, - 0, 1, 49152, 53248, 53760, 53632, 0, 1, - 49152, 53248, 53760, 53632, 53664, 0, 1, 49152, - 53248, 53760, 53632, 53664, 0, 1, 49152, 53248, - 53760, 53632, 53664, 53666, 0, 1, 49152, 53248, - 53760, 53632, 53664, 0, 1, 49152, 53248, 53760, - 53632, 53664, 53668, 0, 1, 49152, 53248, 53760, - 53632, 53664, 53668, 0, 1, 49152, 53248, 53760, - 53632, 53664, 53672, 53670, 0, 1, 49152, 53248, - 53760, 53632, 53664, 0, 1, 49152, 53248, 53760, - 53632, 53664, 53672, 0, 1, 49152, 53248, 53760, - 53632, 53664, 53672, 0, 1, 49152, 53248, 53760, - 53632, 53664, 53672, 53674, 0, 1, 49152, 53248, - 53760, 53632, 53664, 53672, 0, 1, 49152, 53248, - 53760, 53632, 53664, 53680, 53676, 0, 1, 49152, - 53248, 53760, 53632, 53664, 53680, 53676, 0, 1, - 49152, 53248, 53760, 53632, 53664, 53680, 53681, 53678, - 0, 1, 49152, 53248, 53760, 53632, 53664, 0, - 1, 49152, 53248, 53760, 53632, 53696, 53680, 0, - 1, 49152, 53248, 53760, 53632, 53696, 53680, 0, - 1, 49152, 53248, 53760, 53632, 53696, 53680, 53682, - 0, 1, 49152, 53248, 53760, 53632, 53696, 53680, - 0, 1, 49152, 53248, 53760, 53632, 53696, 53680, - 53684, 0, 1, 49152, 53248, 53760, 53632, 53696, - 53680, 53684, 0, 1, 49152, 53248, 53760, 53632, - 53696, 53680, 53688, 53686, 0, 1, 49152, 53248, - 53760, 53632, 53696, 53680, 0, 1, 49152, 53248, - 53760, 53632, 53696, 53697, 53688, 0, 1, 49152, - 53248, 53760, 53632, 53696, 53697, 53688, 0, 1, - 49152, 53248, 53760, 53632, 53696, 53697, 53688, 53690, - 0, 1, 49152, 53248, 53760, 53632, 53696, 53697, - 53688, 0, 1, 49152, 53248, 53760, 53632, 53696, - 53697, 53688, 53692, 0, 1, 49152, 53248, 53760, - 53632, 53696, 53697, 53699, 53692, 0, 1, 49152, - 53248, 53760, 53632, 53696, 53697, 53699, 53692, 53694, - 0, 1, 49152, 53248, 53760, 53632, 0, 1, - 49152, 53248, 53760, 53761, 53696, 0, 1, 49152, - 53248, 53760, 53761, 53696, 0, 1, 49152, 53248, - 53760, 53761, 53696, 53698, 0, 1, 49152, 53248, - 53760, 53761, 53696, 0, 1, 49152, 53248, 53760, - 53761, 53696, 53700, 0, 1, 49152, 53248, 53760, - 53761, 53696, 53700, 0, 1, 49152, 53248, 53760, - 53761, 53696, 53704, 53702, 0, 1, 49152, 53248, - 53760, 53761, 53696, 0, 1, 49152, 53248, 53760, - 53761, 53696, 53704, 0, 1, 49152, 53248, 53760, - 53761, 53696, 53704, 0, 1, 49152, 53248, 53760, - 53761, 53696, 53704, 53706, 0, 1, 49152, 53248, - 53760, 53761, 53696, 53704, 0, 1, 49152, 53248, - 53760, 53761, 53696, 53712, 53708, 0, 1, 49152, - 53248, 53760, 53761, 53696, 53712, 53708, 0, 1, - 49152, 53248, 53760, 53761, 53696, 53712, 53713, 53710, - 0, 1, 49152, 53248, 53760, 53761, 53696, 0, - 1, 49152, 53248, 53760, 53761, 53696, 53712, 0, - 1, 49152, 53248, 53760, 53761, 53696, 53712, 0, - 1, 49152, 53248, 53760, 53761, 53696, 53712, 53714, - 0, 1, 49152, 53248, 53760, 53761, 53696, 53712, - 0, 1, 49152, 53248, 53760, 53761, 53696, 53712, - 53716, 0, 1, 49152, 53248, 53760, 53761, 53696, - 53712, 53716, 0, 1, 49152, 53248, 53760, 53761, - 53696, 53712, 53720, 53718, 0, 1, 49152, 53248, - 53760, 53761, 53696, 53712, 0, 1, 49152, 53248, - 53760, 53761, 53696, 53728, 53720, 0, 1, 49152, - 53248, 53760, 53761, 53696, 53728, 53720, 0, 1, - 49152, 53248, 53760, 53761, 53696, 53728, 53720, 53722, - 0, 1, 49152, 53248, 53760, 53761, 53696, 53728, - 53720, 0, 1, 49152, 53248, 53760, 53761, 53696, - 53728, 53729, 53724, 0, 1, 49152, 53248, 53760, - 53761, 53696, 53728, 53729, 53724, 0, 1, 49152, - 53248, 53760, 53761, 53696, 53728, 53729, 53724, 53726, - 0, 1, 49152, 53248, 53760, 53761, 53696, 0, - 1, 49152, 53248, 53760, 53761, 53696, 53728, 0, - 1, 49152, 53248, 53760, 53761, 53763, 53728, 0, - 1, 49152, 53248, 53760, 53761, 53763, 53728, 53730, - 0, 1, 49152, 53248, 53760, 53761, 53763, 53728, - 0, 1, 49152, 53248, 53760, 53761, 53763, 53728, - 53732, 0, 1, 49152, 53248, 53760, 53761, 53763, - 53728, 53732, 0, 1, 49152, 53248, 53760, 53761, - 53763, 53728, 53736, 53734, 0, 1, 49152, 53248, - 53760, 53761, 53763, 53728, 0, 1, 49152, 53248, - 53760, 53761, 53763, 53728, 53736, 0, 1, 49152, - 53248, 53760, 53761, 53763, 53728, 53736, 0, 1, - 49152, 53248, 53760, 53761, 53763, 53728, 53736, 53738, - 0, 1, 49152, 53248, 53760, 53761, 53763, 53728, - 53736, 0, 1, 49152, 53248, 53760, 53761, 53763, - 53728, 53744, 53740, 0, 1, 49152, 53248, 53760, - 53761, 53763, 53728, 53744, 53740, 0, 1, 49152, - 53248, 53760, 53761, 53763, 53728, 53744, 53745, 53742, - 0, 1, 49152, 53248, 53760, 53761, 53763, 53728, - 0, 1, 49152, 53248, 53760, 53761, 53763, 53728, - 53744, 0, 1, 49152, 53248, 53760, 53761, 53763, - 53728, 53744, 0, 1, 49152, 53248, 53760, 53761, - 53763, 53728, 53744, 53746, 0, 1, 49152, 53248, - 53760, 53761, 53763, 53767, 53744, 0, 1, 49152, - 53248, 53760, 53761, 53763, 53767, 53744, 53748, 0, - 1, 49152, 53248, 53760, 53761, 53763, 53767, 53744, - 53748, 0, 1, 49152, 53248, 53760, 53761, 53763, - 53767, 53744, 53752, 53750, 0, 1, 49152, 53248, - 53760, 53761, 53763, 53767, 53744, 0, 1, 49152, - 53248, 53760, 53761, 53763, 53767, 53744, 53752, 0, - 1, 49152, 53248, 53760, 53761, 53763, 53767, 53744, - 53752, 0, 1, 49152, 53248, 53760, 53761, 53763, - 53767, 53744, 53752, 53754, 0, 1, 49152, 53248, - 53760, 53761, 53763, 53767, 53744, 53752, 0, 1, - 49152, 53248, 53760, 53761, 53763, 53767, 53744, 53752, - 53756, 0, 1, 49152, 53248, 53760, 53761, 53763, - 53767, 53744, 53752, 53756, 0, 1, 49152, 53248, - 53760, 53761, 53763, 53767, 53744, 53752, 53756, 53758, - 0, 1, 49152, 53248, 0, 1, 49152, 53248, - 53760, 0, 1, 49152, 53248, 53760, 0, 1, - 49152, 53248, 53760, 53762, 0, 1, 49152, 53248, - 53760, 0, 1, 49152, 53248, 53760, 53764, 0, - 1, 49152, 53248, 53760, 53764, 0, 1, 49152, - 53248, 53760, 53768, 53766, 0, 1, 49152, 53248, - 53760, 0, 1, 49152, 53248, 53760, 53768, 0, - 1, 49152, 53248, 53760, 53768, 0, 1, 49152, - 53248, 53760, 53768, 53770, 0, 1, 49152, 53248, - 53760, 53768, 0, 1, 49152, 53248, 53760, 53776, - 53772, 0, 1, 49152, 53248, 53760, 53776, 53772, - 0, 1, 49152, 53248, 53760, 53776, 53777, 53774, - 0, 1, 49152, 53248, 53760, 0, 1, 49152, - 53248, 53760, 53776, 0, 1, 49152, 53248, 53760, - 53776, 0, 1, 49152, 53248, 53760, 53776, 53778, - 0, 1, 49152, 53248, 53760, 53776, 0, 1, - 49152, 53248, 53760, 53776, 53780, 0, 1, 49152, - 53248, 53760, 53776, 53780, 0, 1, 49152, 53248, - 53760, 53776, 53784, 53782, 0, 1, 49152, 53248, - 53760, 53776, 0, 1, 49152, 53248, 53760, 53792, - 53784, 0, 1, 49152, 53248, 53760, 53792, 53784, - 0, 1, 49152, 53248, 53760, 53792, 53784, 53786, - 0, 1, 49152, 53248, 53760, 53792, 53784, 0, - 1, 49152, 53248, 53760, 53792, 53793, 53788, 0, - 1, 49152, 53248, 53760, 53792, 53793, 53788, 0, - 1, 49152, 53248, 53760, 53792, 53793, 53788, 53790, - 0, 1, 49152, 53248, 53760, 0, 1, 49152, - 53248, 53760, 53792, 0, 1, 49152, 53248, 53760, - 53792, 0, 1, 49152, 53248, 53760, 53792, 53794, - 0, 1, 49152, 53248, 53760, 53792, 0, 1, - 49152, 53248, 53760, 53792, 53796, 0, 1, 49152, - 53248, 53760, 53792, 53796, 0, 1, 49152, 53248, - 53760, 53792, 53800, 53798, 0, 1, 49152, 53248, - 53760, 53792, 0, 1, 49152, 53248, 53760, 53792, - 53800, 0, 1, 49152, 53248, 53760, 53792, 53800, - 0, 1, 49152, 53248, 53760, 53792, 53800, 53802, - 0, 1, 49152, 53248, 53760, 53792, 53800, 0, - 1, 49152, 53248, 53760, 53792, 53808, 53804, 0, - 1, 49152, 53248, 53760, 53792, 53808, 53804, 0, - 1, 49152, 53248, 53760, 53792, 53808, 53809, 53806, - 0, 1, 49152, 53248, 53760, 53792, 0, 1, - 49152, 53248, 53760, 53824, 53808, 0, 1, 49152, - 53248, 53760, 53824, 53808, 0, 1, 49152, 53248, - 53760, 53824, 53808, 53810, 0, 1, 49152, 53248, - 53760, 53824, 53808, 0, 1, 49152, 53248, 53760, - 53824, 53808, 53812, 0, 1, 49152, 53248, 53760, - 53824, 53808, 53812, 0, 1, 49152, 53248, 53760, - 53824, 53808, 53816, 53814, 0, 1, 49152, 53248, - 53760, 53824, 53808, 0, 1, 49152, 53248, 53760, - 53824, 53825, 53816, 0, 1, 49152, 53248, 53760, - 53824, 53825, 53816, 0, 1, 49152, 53248, 53760, - 53824, 53825, 53816, 53818, 0, 1, 49152, 53248, - 53760, 53824, 53825, 53816, 0, 1, 49152, 53248, - 53760, 53824, 53825, 53816, 53820, 0, 1, 49152, - 53248, 53760, 53824, 53825, 53827, 53820, 0, 1, - 49152, 53248, 53760, 53824, 53825, 53827, 53820, 53822, - 0, 1, 49152, 53248, 53760, 0, 1, 49152, - 53248, 53760, 53824, 0, 1, 49152, 53248, 53760, - 53824, 0, 1, 49152, 53248, 53760, 53824, 53826, - 0, 1, 49152, 53248, 53760, 53824, 0, 1, - 49152, 53248, 53760, 53824, 53828, 0, 1, 49152, - 53248, 53760, 53824, 53828, 0, 1, 49152, 53248, - 53760, 53824, 53832, 53830, 0, 1, 49152, 53248, - 53760, 53824, 0, 1, 49152, 53248, 53760, 53824, - 53832, 0, 1, 49152, 53248, 53760, 53824, 53832, - 0, 1, 49152, 53248, 53760, 53824, 53832, 53834, - 0, 1, 49152, 53248, 53760, 53824, 53832, 0, - 1, 49152, 53248, 53760, 53824, 53840, 53836, 0, - 1, 49152, 53248, 53760, 53824, 53840, 53836, 0, - 1, 49152, 53248, 53760, 53824, 53840, 53841, 53838, - 0, 1, 49152, 53248, 53760, 53824, 0, 1, - 49152, 53248, 53760, 53824, 53840, 0, 1, 49152, - 53248, 53760, 53824, 53840, 0, 1, 49152, 53248, - 53760, 53824, 53840, 53842, 0, 1, 49152, 53248, - 53760, 53824, 53840, 0, 1, 49152, 53248, 53760, - 53824, 53840, 53844, 0, 1, 49152, 53248, 53760, - 53824, 53840, 53844, 0, 1, 49152, 53248, 53760, - 53824, 53840, 53848, 53846, 0, 1, 49152, 53248, - 53760, 53824, 53840, 0, 1, 49152, 53248, 53760, - 53824, 53856, 53848, 0, 1, 49152, 53248, 53760, - 53824, 53856, 53848, 0, 1, 49152, 53248, 53760, - 53824, 53856, 53848, 53850, 0, 1, 49152, 53248, - 53760, 53824, 53856, 53848, 0, 1, 49152, 53248, - 53760, 53824, 53856, 53857, 53852, 0, 1, 49152, - 53248, 53760, 53824, 53856, 53857, 53852, 0, 1, - 49152, 53248, 53760, 53824, 53856, 53857, 53852, 53854, - 0, 1, 49152, 53248, 53760, 53824, 0, 1, - 49152, 53248, 53760, 53888, 53856, 0, 1, 49152, - 53248, 53760, 53888, 53856, 0, 1, 49152, 53248, - 53760, 53888, 53856, 53858, 0, 1, 49152, 53248, - 53760, 53888, 53856, 0, 1, 49152, 53248, 53760, - 53888, 53856, 53860, 0, 1, 49152, 53248, 53760, - 53888, 53856, 53860, 0, 1, 49152, 53248, 53760, - 53888, 53856, 53864, 53862, 0, 1, 49152, 53248, - 53760, 53888, 53856, 0, 1, 49152, 53248, 53760, - 53888, 53856, 53864, 0, 1, 49152, 53248, 53760, - 53888, 53856, 53864, 0, 1, 49152, 53248, 53760, - 53888, 53856, 53864, 53866, 0, 1, 49152, 53248, - 53760, 53888, 53856, 53864, 0, 1, 49152, 53248, - 53760, 53888, 53856, 53872, 53868, 0, 1, 49152, - 53248, 53760, 53888, 53856, 53872, 53868, 0, 1, - 49152, 53248, 53760, 53888, 53856, 53872, 53873, 53870, - 0, 1, 49152, 53248, 53760, 53888, 53856, 0, - 1, 49152, 53248, 53760, 53888, 53889, 53872, 0, - 1, 49152, 53248, 53760, 53888, 53889, 53872, 0, - 1, 49152, 53248, 53760, 53888, 53889, 53872, 53874, - 0, 1, 49152, 53248, 53760, 53888, 53889, 53872, - 0, 1, 49152, 53248, 53760, 53888, 53889, 53872, - 53876, 0, 1, 49152, 53248, 53760, 53888, 53889, - 53872, 53876, 0, 1, 49152, 53248, 53760, 53888, - 53889, 53872, 53880, 53878, 0, 1, 49152, 53248, - 53760, 53888, 53889, 53872, 0, 1, 49152, 53248, - 53760, 53888, 53889, 53872, 53880, 0, 1, 49152, - 53248, 53760, 53888, 53889, 53891, 53880, 0, 1, - 49152, 53248, 53760, 53888, 53889, 53891, 53880, 53882, - 0, 1, 49152, 53248, 53760, 53888, 53889, 53891, - 53880, 0, 1, 49152, 53248, 53760, 53888, 53889, - 53891, 53880, 53884, 0, 1, 49152, 53248, 53760, - 53888, 53889, 53891, 53880, 53884, 0, 1, 49152, - 53248, 53760, 53888, 53889, 53891, 53880, 53884, 53886, - 0, 1, 49152, 53248, 53760, 0, 1, 49152, - 53248, 53760, 53888, 0, 1, 49152, 53248, 53760, - 53888, 0, 1, 49152, 53248, 53760, 53888, 53890, - 0, 1, 49152, 53248, 53760, 53888, 0, 1, - 49152, 53248, 53760, 53888, 53892, 0, 1, 49152, - 53248, 53760, 53888, 53892, 0, 1, 49152, 53248, - 53760, 53888, 53896, 53894, 0, 1, 49152, 53248, - 53760, 53888, 0, 1, 49152, 53248, 53760, 53888, - 53896, 0, 1, 49152, 53248, 53760, 53888, 53896, - 0, 1, 49152, 53248, 53760, 53888, 53896, 53898, - 0, 1, 49152, 53248, 53760, 53888, 53896, 0, - 1, 49152, 53248, 53760, 53888, 53904, 53900, 0, - 1, 49152, 53248, 53760, 53888, 53904, 53900, 0, - 1, 49152, 53248, 53760, 53888, 53904, 53905, 53902, - 0, 1, 49152, 53248, 53760, 53888, 0, 1, - 49152, 53248, 53760, 53888, 53904, 0, 1, 49152, - 53248, 53760, 53888, 53904, 0, 1, 49152, 53248, - 53760, 53888, 53904, 53906, 0, 1, 49152, 53248, - 53760, 53888, 53904, 0, 1, 49152, 53248, 53760, - 53888, 53904, 53908, 0, 1, 49152, 53248, 53760, - 53888, 53904, 53908, 0, 1, 49152, 53248, 53760, - 53888, 53904, 53912, 53910, 0, 1, 49152, 53248, - 53760, 53888, 53904, 0, 1, 49152, 53248, 53760, - 53888, 53920, 53912, 0, 1, 49152, 53248, 53760, - 53888, 53920, 53912, 0, 1, 49152, 53248, 53760, - 53888, 53920, 53912, 53914, 0, 1, 49152, 53248, - 53760, 53888, 53920, 53912, 0, 1, 49152, 53248, - 53760, 53888, 53920, 53921, 53916, 0, 1, 49152, - 53248, 53760, 53888, 53920, 53921, 53916, 0, 1, - 49152, 53248, 53760, 53888, 53920, 53921, 53916, 53918, - 0, 1, 49152, 53248, 53760, 53888, 0, 1, - 49152, 53248, 53760, 53888, 53920, 0, 1, 49152, - 53248, 53760, 53888, 53920, 0, 1, 49152, 53248, - 53760, 53888, 53920, 53922, 0, 1, 49152, 53248, - 53760, 53888, 53920, 0, 1, 49152, 53248, 53760, - 53888, 53920, 53924, 0, 1, 49152, 53248, 53760, - 53888, 53920, 53924, 0, 1, 49152, 53248, 53760, - 53888, 53920, 53928, 53926, 0, 1, 49152, 53248, - 53760, 53888, 53920, 0, 1, 49152, 53248, 53760, - 53888, 53920, 53928, 0, 1, 49152, 53248, 53760, - 53888, 53920, 53928, 0, 1, 49152, 53248, 53760, - 53888, 53920, 53928, 53930, 0, 1, 49152, 53248, - 53760, 53888, 53920, 53928, 0, 1, 49152, 53248, - 53760, 53888, 53920, 53936, 53932, 0, 1, 49152, - 53248, 53760, 53888, 53920, 53936, 53932, 0, 1, - 49152, 53248, 53760, 53888, 53920, 53936, 53937, 53934, - 0, 1, 49152, 53248, 53760, 53888, 53920, 0, - 1, 49152, 53248, 53760, 53888, 53952, 53936, 0, - 1, 49152, 53248, 53760, 53888, 53952, 53936, 0, - 1, 49152, 53248, 53760, 53888, 53952, 53936, 53938, - 0, 1, 49152, 53248, 53760, 53888, 53952, 53936, - 0, 1, 49152, 53248, 53760, 53888, 53952, 53936, - 53940, 0, 1, 49152, 53248, 53760, 53888, 53952, - 53936, 53940, 0, 1, 49152, 53248, 53760, 53888, - 53952, 53936, 53944, 53942, 0, 1, 49152, 53248, - 53760, 53888, 53952, 53936, 0, 1, 49152, 53248, - 53760, 53888, 53952, 53953, 53944, 0, 1, 49152, - 53248, 53760, 53888, 53952, 53953, 53944, 0, 1, - 49152, 53248, 53760, 53888, 53952, 53953, 53944, 53946, - 0, 1, 49152, 53248, 53760, 53888, 53952, 53953, - 53944, 0, 1, 49152, 53248, 53760, 53888, 53952, - 53953, 53944, 53948, 0, 1, 49152, 53248, 53760, - 53888, 53952, 53953, 53955, 53948, 0, 1, 49152, - 53248, 53760, 53888, 53952, 53953, 53955, 53948, 53950, - 0, 1, 49152, 53248, 53760, 53888, 0, 1, - 49152, 53248, 53760, 54016, 53952, 0, 1, 49152, - 53248, 53760, 54016, 53952, 0, 1, 49152, 53248, - 53760, 54016, 53952, 53954, 0, 1, 49152, 53248, - 53760, 54016, 53952, 0, 1, 49152, 53248, 53760, - 54016, 53952, 53956, 0, 1, 49152, 53248, 53760, - 54016, 53952, 53956, 0, 1, 49152, 53248, 53760, - 54016, 53952, 53960, 53958, 0, 1, 49152, 53248, - 53760, 54016, 53952, 0, 1, 49152, 53248, 53760, - 54016, 53952, 53960, 0, 1, 49152, 53248, 53760, - 54016, 53952, 53960, 0, 1, 49152, 53248, 53760, - 54016, 53952, 53960, 53962, 0, 1, 49152, 53248, - 53760, 54016, 53952, 53960, 0, 1, 49152, 53248, - 53760, 54016, 53952, 53968, 53964, 0, 1, 49152, - 53248, 53760, 54016, 53952, 53968, 53964, 0, 1, - 49152, 53248, 53760, 54016, 53952, 53968, 53969, 53966, - 0, 1, 49152, 53248, 53760, 54016, 53952, 0, - 1, 49152, 53248, 53760, 54016, 53952, 53968, 0, - 1, 49152, 53248, 53760, 54016, 53952, 53968, 0, - 1, 49152, 53248, 53760, 54016, 53952, 53968, 53970, - 0, 1, 49152, 53248, 53760, 54016, 53952, 53968, - 0, 1, 49152, 53248, 53760, 54016, 53952, 53968, - 53972, 0, 1, 49152, 53248, 53760, 54016, 53952, - 53968, 53972, 0, 1, 49152, 53248, 53760, 54016, - 53952, 53968, 53976, 53974, 0, 1, 49152, 53248, - 53760, 54016, 53952, 53968, 0, 1, 49152, 53248, - 53760, 54016, 53952, 53984, 53976, 0, 1, 49152, - 53248, 53760, 54016, 53952, 53984, 53976, 0, 1, - 49152, 53248, 53760, 54016, 53952, 53984, 53976, 53978, - 0, 1, 49152, 53248, 53760, 54016, 53952, 53984, - 53976, 0, 1, 49152, 53248, 53760, 54016, 53952, - 53984, 53985, 53980, 0, 1, 49152, 53248, 53760, - 54016, 53952, 53984, 53985, 53980, 0, 1, 49152, - 53248, 53760, 54016, 53952, 53984, 53985, 53980, 53982, - 0, 1, 49152, 53248, 53760, 54016, 53952, 0, - 1, 49152, 53248, 53760, 54016, 54017, 53984, 0, - 1, 49152, 53248, 53760, 54016, 54017, 53984, 0, - 1, 49152, 53248, 53760, 54016, 54017, 53984, 53986, - 0, 1, 49152, 53248, 53760, 54016, 54017, 53984, - 0, 1, 49152, 53248, 53760, 54016, 54017, 53984, - 53988, 0, 1, 49152, 53248, 53760, 54016, 54017, - 53984, 53988, 0, 1, 49152, 53248, 53760, 54016, - 54017, 53984, 53992, 53990, 0, 1, 49152, 53248, - 53760, 54016, 54017, 53984, 0, 1, 49152, 53248, - 53760, 54016, 54017, 53984, 53992, 0, 1, 49152, - 53248, 53760, 54016, 54017, 53984, 53992, 0, 1, - 49152, 53248, 53760, 54016, 54017, 53984, 53992, 53994, - 0, 1, 49152, 53248, 53760, 54016, 54017, 53984, - 53992, 0, 1, 49152, 53248, 53760, 54016, 54017, - 53984, 54000, 53996, 0, 1, 49152, 53248, 53760, - 54016, 54017, 53984, 54000, 53996, 0, 1, 49152, - 53248, 53760, 54016, 54017, 53984, 54000, 54001, 53998, - 0, 1, 49152, 53248, 53760, 54016, 54017, 53984, - 0, 1, 49152, 53248, 53760, 54016, 54017, 53984, - 54000, 0, 1, 49152, 53248, 53760, 54016, 54017, - 54019, 54000, 0, 1, 49152, 53248, 53760, 54016, - 54017, 54019, 54000, 54002, 0, 1, 49152, 53248, - 53760, 54016, 54017, 54019, 54000, 0, 1, 49152, - 53248, 53760, 54016, 54017, 54019, 54000, 54004, 0, - 1, 49152, 53248, 53760, 54016, 54017, 54019, 54000, - 54004, 0, 1, 49152, 53248, 53760, 54016, 54017, - 54019, 54000, 54008, 54006, 0, 1, 49152, 53248, - 53760, 54016, 54017, 54019, 54000, 0, 1, 49152, - 53248, 53760, 54016, 54017, 54019, 54000, 54008, 0, - 1, 49152, 53248, 53760, 54016, 54017, 54019, 54000, - 54008, 0, 1, 49152, 53248, 53760, 54016, 54017, - 54019, 54000, 54008, 54010, 0, 1, 49152, 53248, - 53760, 54016, 54017, 54019, 54023, 54008, 0, 1, - 49152, 53248, 53760, 54016, 54017, 54019, 54023, 54008, - 54012, 0, 1, 49152, 53248, 53760, 54016, 54017, - 54019, 54023, 54008, 54012, 0, 1, 49152, 53248, - 53760, 54016, 54017, 54019, 54023, 54008, 54012, 54014, - 0, 1, 49152, 53248, 53760, 0, 1, 49152, - 53248, 54272, 54016, 0, 1, 49152, 53248, 54272, - 54016, 0, 1, 49152, 53248, 54272, 54016, 54018, - 0, 1, 49152, 53248, 54272, 54016, 0, 1, - 49152, 53248, 54272, 54016, 54020, 0, 1, 49152, - 53248, 54272, 54016, 54020, 0, 1, 49152, 53248, - 54272, 54016, 54024, 54022, 0, 1, 49152, 53248, - 54272, 54016, 0, 1, 49152, 53248, 54272, 54016, - 54024, 0, 1, 49152, 53248, 54272, 54016, 54024, - 0, 1, 49152, 53248, 54272, 54016, 54024, 54026, - 0, 1, 49152, 53248, 54272, 54016, 54024, 0, - 1, 49152, 53248, 54272, 54016, 54032, 54028, 0, - 1, 49152, 53248, 54272, 54016, 54032, 54028, 0, - 1, 49152, 53248, 54272, 54016, 54032, 54033, 54030, - 0, 1, 49152, 53248, 54272, 54016, 0, 1, - 49152, 53248, 54272, 54016, 54032, 0, 1, 49152, - 53248, 54272, 54016, 54032, 0, 1, 49152, 53248, - 54272, 54016, 54032, 54034, 0, 1, 49152, 53248, - 54272, 54016, 54032, 0, 1, 49152, 53248, 54272, - 54016, 54032, 54036, 0, 1, 49152, 53248, 54272, - 54016, 54032, 54036, 0, 1, 49152, 53248, 54272, - 54016, 54032, 54040, 54038, 0, 1, 49152, 53248, - 54272, 54016, 54032, 0, 1, 49152, 53248, 54272, - 54016, 54048, 54040, 0, 1, 49152, 53248, 54272, - 54016, 54048, 54040, 0, 1, 49152, 53248, 54272, - 54016, 54048, 54040, 54042, 0, 1, 49152, 53248, - 54272, 54016, 54048, 54040, 0, 1, 49152, 53248, - 54272, 54016, 54048, 54049, 54044, 0, 1, 49152, - 53248, 54272, 54016, 54048, 54049, 54044, 0, 1, - 49152, 53248, 54272, 54016, 54048, 54049, 54044, 54046, - 0, 1, 49152, 53248, 54272, 54016, 0, 1, - 49152, 53248, 54272, 54016, 54048, 0, 1, 49152, - 53248, 54272, 54016, 54048, 0, 1, 49152, 53248, - 54272, 54016, 54048, 54050, 0, 1, 49152, 53248, - 54272, 54016, 54048, 0, 1, 49152, 53248, 54272, - 54016, 54048, 54052, 0, 1, 49152, 53248, 54272, - 54016, 54048, 54052, 0, 1, 49152, 53248, 54272, - 54016, 54048, 54056, 54054, 0, 1, 49152, 53248, - 54272, 54016, 54048, 0, 1, 49152, 53248, 54272, - 54016, 54048, 54056, 0, 1, 49152, 53248, 54272, - 54016, 54048, 54056, 0, 1, 49152, 53248, 54272, - 54016, 54048, 54056, 54058, 0, 1, 49152, 53248, - 54272, 54016, 54048, 54056, 0, 1, 49152, 53248, - 54272, 54016, 54048, 54064, 54060, 0, 1, 49152, - 53248, 54272, 54016, 54048, 54064, 54060, 0, 1, - 49152, 53248, 54272, 54016, 54048, 54064, 54065, 54062, - 0, 1, 49152, 53248, 54272, 54016, 54048, 0, - 1, 49152, 53248, 54272, 54016, 54080, 54064, 0, - 1, 49152, 53248, 54272, 54016, 54080, 54064, 0, - 1, 49152, 53248, 54272, 54016, 54080, 54064, 54066, - 0, 1, 49152, 53248, 54272, 54016, 54080, 54064, - 0, 1, 49152, 53248, 54272, 54016, 54080, 54064, - 54068, 0, 1, 49152, 53248, 54272, 54016, 54080, - 54064, 54068, 0, 1, 49152, 53248, 54272, 54016, - 54080, 54064, 54072, 54070, 0, 1, 49152, 53248, - 54272, 54016, 54080, 54064, 0, 1, 49152, 53248, - 54272, 54016, 54080, 54081, 54072, 0, 1, 49152, - 53248, 54272, 54016, 54080, 54081, 54072, 0, 1, - 49152, 53248, 54272, 54016, 54080, 54081, 54072, 54074, - 0, 1, 49152, 53248, 54272, 54016, 54080, 54081, - 54072, 0, 1, 49152, 53248, 54272, 54016, 54080, - 54081, 54072, 54076, 0, 1, 49152, 53248, 54272, - 54016, 54080, 54081, 54083, 54076, 0, 1, 49152, - 53248, 54272, 54016, 54080, 54081, 54083, 54076, 54078, - 0, 1, 49152, 53248, 54272, 54016, 0, 1, - 49152, 53248, 54272, 54016, 54080, 0, 1, 49152, - 53248, 54272, 54016, 54080, 0, 1, 49152, 53248, - 54272, 54016, 54080, 54082, 0, 1, 49152, 53248, - 54272, 54016, 54080, 0, 1, 49152, 53248, 54272, - 54016, 54080, 54084, 0, 1, 49152, 53248, 54272, - 54016, 54080, 54084, 0, 1, 49152, 53248, 54272, - 54016, 54080, 54088, 54086, 0, 1, 49152, 53248, - 54272, 54016, 54080, 0, 1, 49152, 53248, 54272, - 54016, 54080, 54088, 0, 1, 49152, 53248, 54272, - 54016, 54080, 54088, 0, 1, 49152, 53248, 54272, - 54016, 54080, 54088, 54090, 0, 1, 49152, 53248, - 54272, 54016, 54080, 54088, 0, 1, 49152, 53248, - 54272, 54016, 54080, 54096, 54092, 0, 1, 49152, - 53248, 54272, 54016, 54080, 54096, 54092, 0, 1, - 49152, 53248, 54272, 54016, 54080, 54096, 54097, 54094, - 0, 1, 49152, 53248, 54272, 54016, 54080, 0, - 1, 49152, 53248, 54272, 54016, 54080, 54096, 0, - 1, 49152, 53248, 54272, 54016, 54080, 54096, 0, - 1, 49152, 53248, 54272, 54016, 54080, 54096, 54098, - 0, 1, 49152, 53248, 54272, 54016, 54080, 54096, - 0, 1, 49152, 53248, 54272, 54016, 54080, 54096, - 54100, 0, 1, 49152, 53248, 54272, 54016, 54080, - 54096, 54100, 0, 1, 49152, 53248, 54272, 54016, - 54080, 54096, 54104, 54102, 0, 1, 49152, 53248, - 54272, 54016, 54080, 54096, 0, 1, 49152, 53248, - 54272, 54016, 54080, 54112, 54104, 0, 1, 49152, - 53248, 54272, 54016, 54080, 54112, 54104, 0, 1, - 49152, 53248, 54272, 54016, 54080, 54112, 54104, 54106, - 0, 1, 49152, 53248, 54272, 54016, 54080, 54112, - 54104, 0, 1, 49152, 53248, 54272, 54016, 54080, - 54112, 54113, 54108, 0, 1, 49152, 53248, 54272, - 54016, 54080, 54112, 54113, 54108, 0, 1, 49152, - 53248, 54272, 54016, 54080, 54112, 54113, 54108, 54110, - 0, 1, 49152, 53248, 54272, 54016, 54080, 0, - 1, 49152, 53248, 54272, 54016, 54144, 54112, 0, - 1, 49152, 53248, 54272, 54016, 54144, 54112, 0, - 1, 49152, 53248, 54272, 54016, 54144, 54112, 54114, - 0, 1, 49152, 53248, 54272, 54016, 54144, 54112, - 0, 1, 49152, 53248, 54272, 54016, 54144, 54112, - 54116, 0, 1, 49152, 53248, 54272, 54016, 54144, - 54112, 54116, 0, 1, 49152, 53248, 54272, 54016, - 54144, 54112, 54120, 54118, 0, 1, 49152, 53248, - 54272, 54016, 54144, 54112, 0, 1, 49152, 53248, - 54272, 54016, 54144, 54112, 54120, 0, 1, 49152, - 53248, 54272, 54016, 54144, 54112, 54120, 0, 1, - 49152, 53248, 54272, 54016, 54144, 54112, 54120, 54122, - 0, 1, 49152, 53248, 54272, 54016, 54144, 54112, - 54120, 0, 1, 49152, 53248, 54272, 54016, 54144, - 54112, 54128, 54124, 0, 1, 49152, 53248, 54272, - 54016, 54144, 54112, 54128, 54124, 0, 1, 49152, - 53248, 54272, 54016, 54144, 54112, 54128, 54129, 54126, - 0, 1, 49152, 53248, 54272, 54016, 54144, 54112, - 0, 1, 49152, 53248, 54272, 54016, 54144, 54145, - 54128, 0, 1, 49152, 53248, 54272, 54016, 54144, - 54145, 54128, 0, 1, 49152, 53248, 54272, 54016, - 54144, 54145, 54128, 54130, 0, 1, 49152, 53248, - 54272, 54016, 54144, 54145, 54128, 0, 1, 49152, - 53248, 54272, 54016, 54144, 54145, 54128, 54132, 0, - 1, 49152, 53248, 54272, 54016, 54144, 54145, 54128, - 54132, 0, 1, 49152, 53248, 54272, 54016, 54144, - 54145, 54128, 54136, 54134, 0, 1, 49152, 53248, - 54272, 54016, 54144, 54145, 54128, 0, 1, 49152, - 53248, 54272, 54016, 54144, 54145, 54128, 54136, 0, - 1, 49152, 53248, 54272, 54016, 54144, 54145, 54147, - 54136, 0, 1, 49152, 53248, 54272, 54016, 54144, - 54145, 54147, 54136, 54138, 0, 1, 49152, 53248, - 54272, 54016, 54144, 54145, 54147, 54136, 0, 1, - 49152, 53248, 54272, 54016, 54144, 54145, 54147, 54136, - 54140, 0, 1, 49152, 53248, 54272, 54016, 54144, - 54145, 54147, 54136, 54140, 0, 1, 49152, 53248, - 54272, 54016, 54144, 54145, 54147, 54136, 54140, 54142, - 0, 1, 49152, 53248, 54272, 54016, 0, 1, - 49152, 53248, 54272, 54016, 54144, 0, 1, 49152, - 53248, 54272, 54273, 54144, 0, 1, 49152, 53248, - 54272, 54273, 54144, 54146, 0, 1, 49152, 53248, - 54272, 54273, 54144, 0, 1, 49152, 53248, 54272, - 54273, 54144, 54148, 0, 1, 49152, 53248, 54272, - 54273, 54144, 54148, 0, 1, 49152, 53248, 54272, - 54273, 54144, 54152, 54150, 0, 1, 49152, 53248, - 54272, 54273, 54144, 0, 1, 49152, 53248, 54272, - 54273, 54144, 54152, 0, 1, 49152, 53248, 54272, - 54273, 54144, 54152, 0, 1, 49152, 53248, 54272, - 54273, 54144, 54152, 54154, 0, 1, 49152, 53248, - 54272, 54273, 54144, 54152, 0, 1, 49152, 53248, - 54272, 54273, 54144, 54160, 54156, 0, 1, 49152, - 53248, 54272, 54273, 54144, 54160, 54156, 0, 1, - 49152, 53248, 54272, 54273, 54144, 54160, 54161, 54158, - 0, 1, 49152, 53248, 54272, 54273, 54144, 0, - 1, 49152, 53248, 54272, 54273, 54144, 54160, 0, - 1, 49152, 53248, 54272, 54273, 54144, 54160, 0, - 1, 49152, 53248, 54272, 54273, 54144, 54160, 54162, - 0, 1, 49152, 53248, 54272, 54273, 54144, 54160, - 0, 1, 49152, 53248, 54272, 54273, 54144, 54160, - 54164, 0, 1, 49152, 53248, 54272, 54273, 54144, - 54160, 54164, 0, 1, 49152, 53248, 54272, 54273, - 54144, 54160, 54168, 54166, 0, 1, 49152, 53248, - 54272, 54273, 54144, 54160, 0, 1, 49152, 53248, - 54272, 54273, 54144, 54176, 54168, 0, 1, 49152, - 53248, 54272, 54273, 54144, 54176, 54168, 0, 1, - 49152, 53248, 54272, 54273, 54144, 54176, 54168, 54170, - 0, 1, 49152, 53248, 54272, 54273, 54144, 54176, - 54168, 0, 1, 49152, 53248, 54272, 54273, 54144, - 54176, 54177, 54172, 0, 1, 49152, 53248, 54272, - 54273, 54144, 54176, 54177, 54172, 0, 1, 49152, - 53248, 54272, 54273, 54144, 54176, 54177, 54172, 54174, - 0, 1, 49152, 53248, 54272, 54273, 54144, 0, - 1, 49152, 53248, 54272, 54273, 54144, 54176, 0, - 1, 49152, 53248, 54272, 54273, 54144, 54176, 0, - 1, 49152, 53248, 54272, 54273, 54144, 54176, 54178, - 0, 1, 49152, 53248, 54272, 54273, 54144, 54176, - 0, 1, 49152, 53248, 54272, 54273, 54144, 54176, - 54180, 0, 1, 49152, 53248, 54272, 54273, 54144, - 54176, 54180, 0, 1, 49152, 53248, 54272, 54273, - 54144, 54176, 54184, 54182, 0, 1, 49152, 53248, - 54272, 54273, 54144, 54176, 0, 1, 49152, 53248, - 54272, 54273, 54144, 54176, 54184, 0, 1, 49152, - 53248, 54272, 54273, 54144, 54176, 54184, 0, 1, - 49152, 53248, 54272, 54273, 54144, 54176, 54184, 54186, - 0, 1, 49152, 53248, 54272, 54273, 54144, 54176, - 54184, 0, 1, 49152, 53248, 54272, 54273, 54144, - 54176, 54192, 54188, 0, 1, 49152, 53248, 54272, - 54273, 54144, 54176, 54192, 54188, 0, 1, 49152, - 53248, 54272, 54273, 54144, 54176, 54192, 54193, 54190, - 0, 1, 49152, 53248, 54272, 54273, 54144, 54176, - 0, 1, 49152, 53248, 54272, 54273, 54144, 54208, - 54192, 0, 1, 49152, 53248, 54272, 54273, 54144, - 54208, 54192, 0, 1, 49152, 53248, 54272, 54273, - 54144, 54208, 54192, 54194, 0, 1, 49152, 53248, - 54272, 54273, 54144, 54208, 54192, 0, 1, 49152, - 53248, 54272, 54273, 54144, 54208, 54192, 54196, 0, - 1, 49152, 53248, 54272, 54273, 54144, 54208, 54192, - 54196, 0, 1, 49152, 53248, 54272, 54273, 54144, - 54208, 54192, 54200, 54198, 0, 1, 49152, 53248, - 54272, 54273, 54144, 54208, 54192, 0, 1, 49152, - 53248, 54272, 54273, 54144, 54208, 54209, 54200, 0, - 1, 49152, 53248, 54272, 54273, 54144, 54208, 54209, - 54200, 0, 1, 49152, 53248, 54272, 54273, 54144, - 54208, 54209, 54200, 54202, 0, 1, 49152, 53248, - 54272, 54273, 54144, 54208, 54209, 54200, 0, 1, - 49152, 53248, 54272, 54273, 54144, 54208, 54209, 54200, - 54204, 0, 1, 49152, 53248, 54272, 54273, 54144, - 54208, 54209, 54211, 54204, 0, 1, 49152, 53248, - 54272, 54273, 54144, 54208, 54209, 54211, 54204, 54206, - 0, 1, 49152, 53248, 54272, 54273, 54144, 0, - 1, 49152, 53248, 54272, 54273, 54144, 54208, 0, - 1, 49152, 53248, 54272, 54273, 54144, 54208, 0, - 1, 49152, 53248, 54272, 54273, 54144, 54208, 54210, - 0, 1, 49152, 53248, 54272, 54273, 54275, 54208, - 0, 1, 49152, 53248, 54272, 54273, 54275, 54208, - 54212, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54208, 54212, 0, 1, 49152, 53248, 54272, 54273, - 54275, 54208, 54216, 54214, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54208, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54208, 54216, 0, 1, 49152, - 53248, 54272, 54273, 54275, 54208, 54216, 0, 1, - 49152, 53248, 54272, 54273, 54275, 54208, 54216, 54218, - 0, 1, 49152, 53248, 54272, 54273, 54275, 54208, - 54216, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54208, 54224, 54220, 0, 1, 49152, 53248, 54272, - 54273, 54275, 54208, 54224, 54220, 0, 1, 49152, - 53248, 54272, 54273, 54275, 54208, 54224, 54225, 54222, - 0, 1, 49152, 53248, 54272, 54273, 54275, 54208, - 0, 1, 49152, 53248, 54272, 54273, 54275, 54208, - 54224, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54208, 54224, 0, 1, 49152, 53248, 54272, 54273, - 54275, 54208, 54224, 54226, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54208, 54224, 0, 1, 49152, - 53248, 54272, 54273, 54275, 54208, 54224, 54228, 0, - 1, 49152, 53248, 54272, 54273, 54275, 54208, 54224, - 54228, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54208, 54224, 54232, 54230, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54208, 54224, 0, 1, 49152, - 53248, 54272, 54273, 54275, 54208, 54240, 54232, 0, - 1, 49152, 53248, 54272, 54273, 54275, 54208, 54240, - 54232, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54208, 54240, 54232, 54234, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54208, 54240, 54232, 0, 1, - 49152, 53248, 54272, 54273, 54275, 54208, 54240, 54241, - 54236, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54208, 54240, 54241, 54236, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54208, 54240, 54241, 54236, 54238, - 0, 1, 49152, 53248, 54272, 54273, 54275, 54208, - 0, 1, 49152, 53248, 54272, 54273, 54275, 54208, - 54240, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54208, 54240, 0, 1, 49152, 53248, 54272, 54273, - 54275, 54208, 54240, 54242, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54208, 54240, 0, 1, 49152, - 53248, 54272, 54273, 54275, 54208, 54240, 54244, 0, - 1, 49152, 53248, 54272, 54273, 54275, 54208, 54240, - 54244, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54208, 54240, 54248, 54246, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54279, 54240, 0, 1, 49152, - 53248, 54272, 54273, 54275, 54279, 54240, 54248, 0, - 1, 49152, 53248, 54272, 54273, 54275, 54279, 54240, - 54248, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54279, 54240, 54248, 54250, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54279, 54240, 54248, 0, 1, - 49152, 53248, 54272, 54273, 54275, 54279, 54240, 54256, - 54252, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54279, 54240, 54256, 54252, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54279, 54240, 54256, 54257, 54254, - 0, 1, 49152, 53248, 54272, 54273, 54275, 54279, - 54240, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54279, 54240, 54256, 0, 1, 49152, 53248, 54272, - 54273, 54275, 54279, 54240, 54256, 0, 1, 49152, - 53248, 54272, 54273, 54275, 54279, 54240, 54256, 54258, - 0, 1, 49152, 53248, 54272, 54273, 54275, 54279, - 54240, 54256, 0, 1, 49152, 53248, 54272, 54273, - 54275, 54279, 54240, 54256, 54260, 0, 1, 49152, - 53248, 54272, 54273, 54275, 54279, 54240, 54256, 54260, - 0, 1, 49152, 53248, 54272, 54273, 54275, 54279, - 54240, 54256, 54264, 54262, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54279, 54240, 54256, 0, 1, - 49152, 53248, 54272, 54273, 54275, 54279, 54240, 54256, - 54264, 0, 1, 49152, 53248, 54272, 54273, 54275, - 54279, 54240, 54256, 54264, 0, 1, 49152, 53248, - 54272, 54273, 54275, 54279, 54240, 54256, 54264, 54266, - 0, 1, 49152, 53248, 54272, 54273, 54275, 54279, - 54240, 54256, 54264, 0, 1, 49152, 53248, 54272, - 54273, 54275, 54279, 54240, 54256, 54264, 54268, 0, - 1, 49152, 53248, 54272, 54273, 54275, 54279, 54240, - 54256, 54264, 54268, 0, 1, 49152, 53248, 54272, - 54273, 54275, 54279, 54240, 54256, 54264, 54268, 54270, - 0, 1, 49152, 53248, 0, 1, 49152, 53248, - 54272, 0, 1, 49152, 53248, 54272, 0, 1, - 49152, 53248, 54272, 54274, 0, 1, 49152, 53248, - 54272, 0, 1, 49152, 53248, 54272, 54276, 0, - 1, 49152, 53248, 54272, 54276, 0, 1, 49152, - 53248, 54272, 54280, 54278, 0, 1, 49152, 53248, - 54272, 0, 1, 49152, 53248, 54272, 54280, 0, - 1, 49152, 53248, 54272, 54280, 0, 1, 49152, - 53248, 54272, 54280, 54282, 0, 1, 49152, 53248, - 54272, 54280, 0, 1, 49152, 53248, 54272, 54288, - 54284, 0, 1, 49152, 53248, 54272, 54288, 54284, - 0, 1, 49152, 53248, 54272, 54288, 54289, 54286, - 0, 1, 49152, 53248, 54272, 0, 1, 49152, - 53248, 54272, 54288, 0, 1, 49152, 53248, 54272, - 54288, 0, 1, 49152, 53248, 54272, 54288, 54290, - 0, 1, 49152, 53248, 54272, 54288, 0, 1, - 49152, 53248, 54272, 54288, 54292, 0, 1, 49152, - 53248, 54272, 54288, 54292, 0, 1, 49152, 53248, - 54272, 54288, 54296, 54294, 0, 1, 49152, 53248, - 54272, 54288, 0, 1, 49152, 53248, 54272, 54304, - 54296, 0, 1, 49152, 53248, 54272, 54304, 54296, - 0, 1, 49152, 53248, 54272, 54304, 54296, 54298, - 0, 1, 49152, 53248, 54272, 54304, 54296, 0, - 1, 49152, 53248, 54272, 54304, 54305, 54300, 0, - 1, 49152, 53248, 54272, 54304, 54305, 54300, 0, - 1, 49152, 53248, 54272, 54304, 54305, 54300, 54302, - 0, 1, 49152, 53248, 54272, 0, 1, 49152, - 53248, 54272, 54304, 0, 1, 49152, 53248, 54272, - 54304, 0, 1, 49152, 53248, 54272, 54304, 54306, - 0, 1, 49152, 53248, 54272, 54304, 0, 1, - 49152, 53248, 54272, 54304, 54308, 0, 1, 49152, - 53248, 54272, 54304, 54308, 0, 1, 49152, 53248, - 54272, 54304, 54312, 54310, 0, 1, 49152, 53248, - 54272, 54304, 0, 1, 49152, 53248, 54272, 54304, - 54312, 0, 1, 49152, 53248, 54272, 54304, 54312, - 0, 1, 49152, 53248, 54272, 54304, 54312, 54314, - 0, 1, 49152, 53248, 54272, 54304, 54312, 0, - 1, 49152, 53248, 54272, 54304, 54320, 54316, 0, - 1, 49152, 53248, 54272, 54304, 54320, 54316, 0, - 1, 49152, 53248, 54272, 54304, 54320, 54321, 54318, - 0, 1, 49152, 53248, 54272, 54304, 0, 1, - 49152, 53248, 54272, 54336, 54320, 0, 1, 49152, - 53248, 54272, 54336, 54320, 0, 1, 49152, 53248, - 54272, 54336, 54320, 54322, 0, 1, 49152, 53248, - 54272, 54336, 54320, 0, 1, 49152, 53248, 54272, - 54336, 54320, 54324, 0, 1, 49152, 53248, 54272, - 54336, 54320, 54324, 0, 1, 49152, 53248, 54272, - 54336, 54320, 54328, 54326, 0, 1, 49152, 53248, - 54272, 54336, 54320, 0, 1, 49152, 53248, 54272, - 54336, 54337, 54328, 0, 1, 49152, 53248, 54272, - 54336, 54337, 54328, 0, 1, 49152, 53248, 54272, - 54336, 54337, 54328, 54330, 0, 1, 49152, 53248, - 54272, 54336, 54337, 54328, 0, 1, 49152, 53248, - 54272, 54336, 54337, 54328, 54332, 0, 1, 49152, - 53248, 54272, 54336, 54337, 54339, 54332, 0, 1, - 49152, 53248, 54272, 54336, 54337, 54339, 54332, 54334, - 0, 1, 49152, 53248, 54272, 0, 1, 49152, - 53248, 54272, 54336, 0, 1, 49152, 53248, 54272, - 54336, 0, 1, 49152, 53248, 54272, 54336, 54338, - 0, 1, 49152, 53248, 54272, 54336, 0, 1, - 49152, 53248, 54272, 54336, 54340, 0, 1, 49152, - 53248, 54272, 54336, 54340, 0, 1, 49152, 53248, - 54272, 54336, 54344, 54342, 0, 1, 49152, 53248, - 54272, 54336, 0, 1, 49152, 53248, 54272, 54336, - 54344, 0, 1, 49152, 53248, 54272, 54336, 54344, - 0, 1, 49152, 53248, 54272, 54336, 54344, 54346, - 0, 1, 49152, 53248, 54272, 54336, 54344, 0, - 1, 49152, 53248, 54272, 54336, 54352, 54348, 0, - 1, 49152, 53248, 54272, 54336, 54352, 54348, 0, - 1, 49152, 53248, 54272, 54336, 54352, 54353, 54350, - 0, 1, 49152, 53248, 54272, 54336, 0, 1, - 49152, 53248, 54272, 54336, 54352, 0, 1, 49152, - 53248, 54272, 54336, 54352, 0, 1, 49152, 53248, - 54272, 54336, 54352, 54354, 0, 1, 49152, 53248, - 54272, 54336, 54352, 0, 1, 49152, 53248, 54272, - 54336, 54352, 54356, 0, 1, 49152, 53248, 54272, - 54336, 54352, 54356, 0, 1, 49152, 53248, 54272, - 54336, 54352, 54360, 54358, 0, 1, 49152, 53248, - 54272, 54336, 54352, 0, 1, 49152, 53248, 54272, - 54336, 54368, 54360, 0, 1, 49152, 53248, 54272, - 54336, 54368, 54360, 0, 1, 49152, 53248, 54272, - 54336, 54368, 54360, 54362, 0, 1, 49152, 53248, - 54272, 54336, 54368, 54360, 0, 1, 49152, 53248, - 54272, 54336, 54368, 54369, 54364, 0, 1, 49152, - 53248, 54272, 54336, 54368, 54369, 54364, 0, 1, - 49152, 53248, 54272, 54336, 54368, 54369, 54364, 54366, - 0, 1, 49152, 53248, 54272, 54336, 0, 1, - 49152, 53248, 54272, 54400, 54368, 0, 1, 49152, - 53248, 54272, 54400, 54368, 0, 1, 49152, 53248, - 54272, 54400, 54368, 54370, 0, 1, 49152, 53248, - 54272, 54400, 54368, 0, 1, 49152, 53248, 54272, - 54400, 54368, 54372, 0, 1, 49152, 53248, 54272, - 54400, 54368, 54372, 0, 1, 49152, 53248, 54272, - 54400, 54368, 54376, 54374, 0, 1, 49152, 53248, - 54272, 54400, 54368, 0, 1, 49152, 53248, 54272, - 54400, 54368, 54376, 0, 1, 49152, 53248, 54272, - 54400, 54368, 54376, 0, 1, 49152, 53248, 54272, - 54400, 54368, 54376, 54378, 0, 1, 49152, 53248, - 54272, 54400, 54368, 54376, 0, 1, 49152, 53248, - 54272, 54400, 54368, 54384, 54380, 0, 1, 49152, - 53248, 54272, 54400, 54368, 54384, 54380, 0, 1, - 49152, 53248, 54272, 54400, 54368, 54384, 54385, 54382, - 0, 1, 49152, 53248, 54272, 54400, 54368, 0, - 1, 49152, 53248, 54272, 54400, 54401, 54384, 0, - 1, 49152, 53248, 54272, 54400, 54401, 54384, 0, - 1, 49152, 53248, 54272, 54400, 54401, 54384, 54386, - 0, 1, 49152, 53248, 54272, 54400, 54401, 54384, - 0, 1, 49152, 53248, 54272, 54400, 54401, 54384, - 54388, 0, 1, 49152, 53248, 54272, 54400, 54401, - 54384, 54388, 0, 1, 49152, 53248, 54272, 54400, - 54401, 54384, 54392, 54390, 0, 1, 49152, 53248, - 54272, 54400, 54401, 54384, 0, 1, 49152, 53248, - 54272, 54400, 54401, 54384, 54392, 0, 1, 49152, - 53248, 54272, 54400, 54401, 54403, 54392, 0, 1, - 49152, 53248, 54272, 54400, 54401, 54403, 54392, 54394, - 0, 1, 49152, 53248, 54272, 54400, 54401, 54403, - 54392, 0, 1, 49152, 53248, 54272, 54400, 54401, - 54403, 54392, 54396, 0, 1, 49152, 53248, 54272, - 54400, 54401, 54403, 54392, 54396, 0, 1, 49152, - 53248, 54272, 54400, 54401, 54403, 54392, 54396, 54398, - 0, 1, 49152, 53248, 54272, 0, 1, 49152, - 53248, 54272, 54400, 0, 1, 49152, 53248, 54272, - 54400, 0, 1, 49152, 53248, 54272, 54400, 54402, - 0, 1, 49152, 53248, 54272, 54400, 0, 1, - 49152, 53248, 54272, 54400, 54404, 0, 1, 49152, - 53248, 54272, 54400, 54404, 0, 1, 49152, 53248, - 54272, 54400, 54408, 54406, 0, 1, 49152, 53248, - 54272, 54400, 0, 1, 49152, 53248, 54272, 54400, - 54408, 0, 1, 49152, 53248, 54272, 54400, 54408, - 0, 1, 49152, 53248, 54272, 54400, 54408, 54410, - 0, 1, 49152, 53248, 54272, 54400, 54408, 0, - 1, 49152, 53248, 54272, 54400, 54416, 54412, 0, - 1, 49152, 53248, 54272, 54400, 54416, 54412, 0, - 1, 49152, 53248, 54272, 54400, 54416, 54417, 54414, - 0, 1, 49152, 53248, 54272, 54400, 0, 1, - 49152, 53248, 54272, 54400, 54416, 0, 1, 49152, - 53248, 54272, 54400, 54416, 0, 1, 49152, 53248, - 54272, 54400, 54416, 54418, 0, 1, 49152, 53248, - 54272, 54400, 54416, 0, 1, 49152, 53248, 54272, - 54400, 54416, 54420, 0, 1, 49152, 53248, 54272, - 54400, 54416, 54420, 0, 1, 49152, 53248, 54272, - 54400, 54416, 54424, 54422, 0, 1, 49152, 53248, - 54272, 54400, 54416, 0, 1, 49152, 53248, 54272, - 54400, 54432, 54424, 0, 1, 49152, 53248, 54272, - 54400, 54432, 54424, 0, 1, 49152, 53248, 54272, - 54400, 54432, 54424, 54426, 0, 1, 49152, 53248, - 54272, 54400, 54432, 54424, 0, 1, 49152, 53248, - 54272, 54400, 54432, 54433, 54428, 0, 1, 49152, - 53248, 54272, 54400, 54432, 54433, 54428, 0, 1, - 49152, 53248, 54272, 54400, 54432, 54433, 54428, 54430, - 0, 1, 49152, 53248, 54272, 54400, 0, 1, - 49152, 53248, 54272, 54400, 54432, 0, 1, 49152, - 53248, 54272, 54400, 54432, 0, 1, 49152, 53248, - 54272, 54400, 54432, 54434, 0, 1, 49152, 53248, - 54272, 54400, 54432, 0, 1, 49152, 53248, 54272, - 54400, 54432, 54436, 0, 1, 49152, 53248, 54272, - 54400, 54432, 54436, 0, 1, 49152, 53248, 54272, - 54400, 54432, 54440, 54438, 0, 1, 49152, 53248, - 54272, 54400, 54432, 0, 1, 49152, 53248, 54272, - 54400, 54432, 54440, 0, 1, 49152, 53248, 54272, - 54400, 54432, 54440, 0, 1, 49152, 53248, 54272, - 54400, 54432, 54440, 54442, 0, 1, 49152, 53248, - 54272, 54400, 54432, 54440, 0, 1, 49152, 53248, - 54272, 54400, 54432, 54448, 54444, 0, 1, 49152, - 53248, 54272, 54400, 54432, 54448, 54444, 0, 1, - 49152, 53248, 54272, 54400, 54432, 54448, 54449, 54446, - 0, 1, 49152, 53248, 54272, 54400, 54432, 0, - 1, 49152, 53248, 54272, 54400, 54464, 54448, 0, - 1, 49152, 53248, 54272, 54400, 54464, 54448, 0, - 1, 49152, 53248, 54272, 54400, 54464, 54448, 54450, - 0, 1, 49152, 53248, 54272, 54400, 54464, 54448, - 0, 1, 49152, 53248, 54272, 54400, 54464, 54448, - 54452, 0, 1, 49152, 53248, 54272, 54400, 54464, - 54448, 54452, 0, 1, 49152, 53248, 54272, 54400, - 54464, 54448, 54456, 54454, 0, 1, 49152, 53248, - 54272, 54400, 54464, 54448, 0, 1, 49152, 53248, - 54272, 54400, 54464, 54465, 54456, 0, 1, 49152, - 53248, 54272, 54400, 54464, 54465, 54456, 0, 1, - 49152, 53248, 54272, 54400, 54464, 54465, 54456, 54458, - 0, 1, 49152, 53248, 54272, 54400, 54464, 54465, - 54456, 0, 1, 49152, 53248, 54272, 54400, 54464, - 54465, 54456, 54460, 0, 1, 49152, 53248, 54272, - 54400, 54464, 54465, 54467, 54460, 0, 1, 49152, - 53248, 54272, 54400, 54464, 54465, 54467, 54460, 54462, - 0, 1, 49152, 53248, 54272, 54400, 0, 1, - 49152, 53248, 54272, 54528, 54464, 0, 1, 49152, - 53248, 54272, 54528, 54464, 0, 1, 49152, 53248, - 54272, 54528, 54464, 54466, 0, 1, 49152, 53248, - 54272, 54528, 54464, 0, 1, 49152, 53248, 54272, - 54528, 54464, 54468, 0, 1, 49152, 53248, 54272, - 54528, 54464, 54468, 0, 1, 49152, 53248, 54272, - 54528, 54464, 54472, 54470, 0, 1, 49152, 53248, - 54272, 54528, 54464, 0, 1, 49152, 53248, 54272, - 54528, 54464, 54472, 0, 1, 49152, 53248, 54272, - 54528, 54464, 54472, 0, 1, 49152, 53248, 54272, - 54528, 54464, 54472, 54474, 0, 1, 49152, 53248, - 54272, 54528, 54464, 54472, 0, 1, 49152, 53248, - 54272, 54528, 54464, 54480, 54476, 0, 1, 49152, - 53248, 54272, 54528, 54464, 54480, 54476, 0, 1, - 49152, 53248, 54272, 54528, 54464, 54480, 54481, 54478, - 0, 1, 49152, 53248, 54272, 54528, 54464, 0, - 1, 49152, 53248, 54272, 54528, 54464, 54480, 0, - 1, 49152, 53248, 54272, 54528, 54464, 54480, 0, - 1, 49152, 53248, 54272, 54528, 54464, 54480, 54482, - 0, 1, 49152, 53248, 54272, 54528, 54464, 54480, - 0, 1, 49152, 53248, 54272, 54528, 54464, 54480, - 54484, 0, 1, 49152, 53248, 54272, 54528, 54464, - 54480, 54484, 0, 1, 49152, 53248, 54272, 54528, - 54464, 54480, 54488, 54486, 0, 1, 49152, 53248, - 54272, 54528, 54464, 54480, 0, 1, 49152, 53248, - 54272, 54528, 54464, 54496, 54488, 0, 1, 49152, - 53248, 54272, 54528, 54464, 54496, 54488, 0, 1, - 49152, 53248, 54272, 54528, 54464, 54496, 54488, 54490, - 0, 1, 49152, 53248, 54272, 54528, 54464, 54496, - 54488, 0, 1, 49152, 53248, 54272, 54528, 54464, - 54496, 54497, 54492, 0, 1, 49152, 53248, 54272, - 54528, 54464, 54496, 54497, 54492, 0, 1, 49152, - 53248, 54272, 54528, 54464, 54496, 54497, 54492, 54494, - 0, 1, 49152, 53248, 54272, 54528, 54464, 0, - 1, 49152, 53248, 54272, 54528, 54529, 54496, 0, - 1, 49152, 53248, 54272, 54528, 54529, 54496, 0, - 1, 49152, 53248, 54272, 54528, 54529, 54496, 54498, - 0, 1, 49152, 53248, 54272, 54528, 54529, 54496, - 0, 1, 49152, 53248, 54272, 54528, 54529, 54496, - 54500, 0, 1, 49152, 53248, 54272, 54528, 54529, - 54496, 54500, 0, 1, 49152, 53248, 54272, 54528, - 54529, 54496, 54504, 54502, 0, 1, 49152, 53248, - 54272, 54528, 54529, 54496, 0, 1, 49152, 53248, - 54272, 54528, 54529, 54496, 54504, 0, 1, 49152, - 53248, 54272, 54528, 54529, 54496, 54504, 0, 1, - 49152, 53248, 54272, 54528, 54529, 54496, 54504, 54506, - 0, 1, 49152, 53248, 54272, 54528, 54529, 54496, - 54504, 0, 1, 49152, 53248, 54272, 54528, 54529, - 54496, 54512, 54508, 0, 1, 49152, 53248, 54272, - 54528, 54529, 54496, 54512, 54508, 0, 1, 49152, - 53248, 54272, 54528, 54529, 54496, 54512, 54513, 54510, - 0, 1, 49152, 53248, 54272, 54528, 54529, 54496, - 0, 1, 49152, 53248, 54272, 54528, 54529, 54496, - 54512, 0, 1, 49152, 53248, 54272, 54528, 54529, - 54531, 54512, 0, 1, 49152, 53248, 54272, 54528, - 54529, 54531, 54512, 54514, 0, 1, 49152, 53248, - 54272, 54528, 54529, 54531, 54512, 0, 1, 49152, - 53248, 54272, 54528, 54529, 54531, 54512, 54516, 0, - 1, 49152, 53248, 54272, 54528, 54529, 54531, 54512, - 54516, 0, 1, 49152, 53248, 54272, 54528, 54529, - 54531, 54512, 54520, 54518, 0, 1, 49152, 53248, - 54272, 54528, 54529, 54531, 54512, 0, 1, 49152, - 53248, 54272, 54528, 54529, 54531, 54512, 54520, 0, - 1, 49152, 53248, 54272, 54528, 54529, 54531, 54512, - 54520, 0, 1, 49152, 53248, 54272, 54528, 54529, - 54531, 54512, 54520, 54522, 0, 1, 49152, 53248, - 54272, 54528, 54529, 54531, 54535, 54520, 0, 1, - 49152, 53248, 54272, 54528, 54529, 54531, 54535, 54520, - 54524, 0, 1, 49152, 53248, 54272, 54528, 54529, - 54531, 54535, 54520, 54524, 0, 1, 49152, 53248, - 54272, 54528, 54529, 54531, 54535, 54520, 54524, 54526, - 0, 1, 49152, 53248, 54272, 0, 1, 49152, - 53248, 54272, 54528, 0, 1, 49152, 53248, 54272, - 54528, 0, 1, 49152, 53248, 54272, 54528, 54530, - 0, 1, 49152, 53248, 54272, 54528, 0, 1, - 49152, 53248, 54272, 54528, 54532, 0, 1, 49152, - 53248, 54272, 54528, 54532, 0, 1, 49152, 53248, - 54272, 54528, 54536, 54534, 0, 1, 49152, 53248, - 54272, 54528, 0, 1, 49152, 53248, 54272, 54528, - 54536, 0, 1, 49152, 53248, 54272, 54528, 54536, - 0, 1, 49152, 53248, 54272, 54528, 54536, 54538, - 0, 1, 49152, 53248, 54272, 54528, 54536, 0, - 1, 49152, 53248, 54272, 54528, 54544, 54540, 0, - 1, 49152, 53248, 54272, 54528, 54544, 54540, 0, - 1, 49152, 53248, 54272, 54528, 54544, 54545, 54542, - 0, 1, 49152, 53248, 54272, 54528, 0, 1, - 49152, 53248, 54272, 54528, 54544, 0, 1, 49152, - 53248, 54272, 54528, 54544, 0, 1, 49152, 53248, - 54272, 54528, 54544, 54546, 0, 1, 49152, 53248, - 54272, 54528, 54544, 0, 1, 49152, 53248, 54272, - 54528, 54544, 54548, 0, 1, 49152, 53248, 54272, - 54528, 54544, 54548, 0, 1, 49152, 53248, 54272, - 54528, 54544, 54552, 54550, 0, 1, 49152, 53248, - 54272, 54528, 54544, 0, 1, 49152, 53248, 54272, - 54528, 54560, 54552, 0, 1, 49152, 53248, 54272, - 54528, 54560, 54552, 0, 1, 49152, 53248, 54272, - 54528, 54560, 54552, 54554, 0, 1, 49152, 53248, - 54272, 54528, 54560, 54552, 0, 1, 49152, 53248, - 54272, 54528, 54560, 54561, 54556, 0, 1, 49152, - 53248, 54272, 54528, 54560, 54561, 54556, 0, 1, - 49152, 53248, 54272, 54528, 54560, 54561, 54556, 54558, - 0, 1, 49152, 53248, 54272, 54528, 0, 1, - 49152, 53248, 54272, 54528, 54560, 0, 1, 49152, - 53248, 54272, 54528, 54560, 0, 1, 49152, 53248, - 54272, 54528, 54560, 54562, 0, 1, 49152, 53248, - 54272, 54528, 54560, 0, 1, 49152, 53248, 54272, - 54528, 54560, 54564, 0, 1, 49152, 53248, 54272, - 54528, 54560, 54564, 0, 1, 49152, 53248, 54272, - 54528, 54560, 54568, 54566, 0, 1, 49152, 53248, - 54272, 54528, 54560, 0, 1, 49152, 53248, 54272, - 54528, 54560, 54568, 0, 1, 49152, 53248, 54272, - 54528, 54560, 54568, 0, 1, 49152, 53248, 54272, - 54528, 54560, 54568, 54570, 0, 1, 49152, 53248, - 54272, 54528, 54560, 54568, 0, 1, 49152, 53248, - 54272, 54528, 54560, 54576, 54572, 0, 1, 49152, - 53248, 54272, 54528, 54560, 54576, 54572, 0, 1, - 49152, 53248, 54272, 54528, 54560, 54576, 54577, 54574, - 0, 1, 49152, 53248, 54272, 54528, 54560, 0, - 1, 49152, 53248, 54272, 54528, 54592, 54576, 0, - 1, 49152, 53248, 54272, 54528, 54592, 54576, 0, - 1, 49152, 53248, 54272, 54528, 54592, 54576, 54578, - 0, 1, 49152, 53248, 54272, 54528, 54592, 54576, - 0, 1, 49152, 53248, 54272, 54528, 54592, 54576, - 54580, 0, 1, 49152, 53248, 54272, 54528, 54592, - 54576, 54580, 0, 1, 49152, 53248, 54272, 54528, - 54592, 54576, 54584, 54582, 0, 1, 49152, 53248, - 54272, 54528, 54592, 54576, 0, 1, 49152, 53248, - 54272, 54528, 54592, 54593, 54584, 0, 1, 49152, - 53248, 54272, 54528, 54592, 54593, 54584, 0, 1, - 49152, 53248, 54272, 54528, 54592, 54593, 54584, 54586, - 0, 1, 49152, 53248, 54272, 54528, 54592, 54593, - 54584, 0, 1, 49152, 53248, 54272, 54528, 54592, - 54593, 54584, 54588, 0, 1, 49152, 53248, 54272, - 54528, 54592, 54593, 54595, 54588, 0, 1, 49152, - 53248, 54272, 54528, 54592, 54593, 54595, 54588, 54590, - 0, 1, 49152, 53248, 54272, 54528, 0, 1, - 49152, 53248, 54272, 54528, 54592, 0, 1, 49152, - 53248, 54272, 54528, 54592, 0, 1, 49152, 53248, - 54272, 54528, 54592, 54594, 0, 1, 49152, 53248, - 54272, 54528, 54592, 0, 1, 49152, 53248, 54272, - 54528, 54592, 54596, 0, 1, 49152, 53248, 54272, - 54528, 54592, 54596, 0, 1, 49152, 53248, 54272, - 54528, 54592, 54600, 54598, 0, 1, 49152, 53248, - 54272, 54528, 54592, 0, 1, 49152, 53248, 54272, - 54528, 54592, 54600, 0, 1, 49152, 53248, 54272, - 54528, 54592, 54600, 0, 1, 49152, 53248, 54272, - 54528, 54592, 54600, 54602, 0, 1, 49152, 53248, - 54272, 54528, 54592, 54600, 0, 1, 49152, 53248, - 54272, 54528, 54592, 54608, 54604, 0, 1, 49152, - 53248, 54272, 54528, 54592, 54608, 54604, 0, 1, - 49152, 53248, 54272, 54528, 54592, 54608, 54609, 54606, - 0, 1, 49152, 53248, 54272, 54528, 54592, 0, - 1, 49152, 53248, 54272, 54528, 54592, 54608, 0, - 1, 49152, 53248, 54272, 54528, 54592, 54608, 0, - 1, 49152, 53248, 54272, 54528, 54592, 54608, 54610, - 0, 1, 49152, 53248, 54272, 54528, 54592, 54608, - 0, 1, 49152, 53248, 54272, 54528, 54592, 54608, - 54612, 0, 1, 49152, 53248, 54272, 54528, 54592, - 54608, 54612, 0, 1, 49152, 53248, 54272, 54528, - 54592, 54608, 54616, 54614, 0, 1, 49152, 53248, - 54272, 54528, 54592, 54608, 0, 1, 49152, 53248, - 54272, 54528, 54592, 54624, 54616, 0, 1, 49152, - 53248, 54272, 54528, 54592, 54624, 54616, 0, 1, - 49152, 53248, 54272, 54528, 54592, 54624, 54616, 54618, - 0, 1, 49152, 53248, 54272, 54528, 54592, 54624, - 54616, 0, 1, 49152, 53248, 54272, 54528, 54592, - 54624, 54625, 54620, 0, 1, 49152, 53248, 54272, - 54528, 54592, 54624, 54625, 54620, 0, 1, 49152, - 53248, 54272, 54528, 54592, 54624, 54625, 54620, 54622, - 0, 1, 49152, 53248, 54272, 54528, 54592, 0, - 1, 49152, 53248, 54272, 54528, 54656, 54624, 0, - 1, 49152, 53248, 54272, 54528, 54656, 54624, 0, - 1, 49152, 53248, 54272, 54528, 54656, 54624, 54626, - 0, 1, 49152, 53248, 54272, 54528, 54656, 54624, - 0, 1, 49152, 53248, 54272, 54528, 54656, 54624, - 54628, 0, 1, 49152, 53248, 54272, 54528, 54656, - 54624, 54628, 0, 1, 49152, 53248, 54272, 54528, - 54656, 54624, 54632, 54630, 0, 1, 49152, 53248, - 54272, 54528, 54656, 54624, 0, 1, 49152, 53248, - 54272, 54528, 54656, 54624, 54632, 0, 1, 49152, - 53248, 54272, 54528, 54656, 54624, 54632, 0, 1, - 49152, 53248, 54272, 54528, 54656, 54624, 54632, 54634, - 0, 1, 49152, 53248, 54272, 54528, 54656, 54624, - 54632, 0, 1, 49152, 53248, 54272, 54528, 54656, - 54624, 54640, 54636, 0, 1, 49152, 53248, 54272, - 54528, 54656, 54624, 54640, 54636, 0, 1, 49152, - 53248, 54272, 54528, 54656, 54624, 54640, 54641, 54638, - 0, 1, 49152, 53248, 54272, 54528, 54656, 54624, - 0, 1, 49152, 53248, 54272, 54528, 54656, 54657, - 54640, 0, 1, 49152, 53248, 54272, 54528, 54656, - 54657, 54640, 0, 1, 49152, 53248, 54272, 54528, - 54656, 54657, 54640, 54642, 0, 1, 49152, 53248, - 54272, 54528, 54656, 54657, 54640, 0, 1, 49152, - 53248, 54272, 54528, 54656, 54657, 54640, 54644, 0, - 1, 49152, 53248, 54272, 54528, 54656, 54657, 54640, - 54644, 0, 1, 49152, 53248, 54272, 54528, 54656, - 54657, 54640, 54648, 54646, 0, 1, 49152, 53248, - 54272, 54528, 54656, 54657, 54640, 0, 1, 49152, - 53248, 54272, 54528, 54656, 54657, 54640, 54648, 0, - 1, 49152, 53248, 54272, 54528, 54656, 54657, 54659, - 54648, 0, 1, 49152, 53248, 54272, 54528, 54656, - 54657, 54659, 54648, 54650, 0, 1, 49152, 53248, - 54272, 54528, 54656, 54657, 54659, 54648, 0, 1, - 49152, 53248, 54272, 54528, 54656, 54657, 54659, 54648, - 54652, 0, 1, 49152, 53248, 54272, 54528, 54656, - 54657, 54659, 54648, 54652, 0, 1, 49152, 53248, - 54272, 54528, 54656, 54657, 54659, 54648, 54652, 54654, - 0, 1, 49152, 53248, 54272, 54528, 0, 1, - 49152, 53248, 54272, 54784, 54656, 0, 1, 49152, - 53248, 54272, 54784, 54656, 0, 1, 49152, 53248, - 54272, 54784, 54656, 54658, 0, 1, 49152, 53248, - 54272, 54784, 54656, 0, 1, 49152, 53248, 54272, - 54784, 54656, 54660, 0, 1, 49152, 53248, 54272, - 54784, 54656, 54660, 0, 1, 49152, 53248, 54272, - 54784, 54656, 54664, 54662, 0, 1, 49152, 53248, - 54272, 54784, 54656, 0, 1, 49152, 53248, 54272, - 54784, 54656, 54664, 0, 1, 49152, 53248, 54272, - 54784, 54656, 54664, 0, 1, 49152, 53248, 54272, - 54784, 54656, 54664, 54666, 0, 1, 49152, 53248, - 54272, 54784, 54656, 54664, 0, 1, 49152, 53248, - 54272, 54784, 54656, 54672, 54668, 0, 1, 49152, - 53248, 54272, 54784, 54656, 54672, 54668, 0, 1, - 49152, 53248, 54272, 54784, 54656, 54672, 54673, 54670, - 0, 1, 49152, 53248, 54272, 54784, 54656, 0, - 1, 49152, 53248, 54272, 54784, 54656, 54672, 0, - 1, 49152, 53248, 54272, 54784, 54656, 54672, 0, - 1, 49152, 53248, 54272, 54784, 54656, 54672, 54674, - 0, 1, 49152, 53248, 54272, 54784, 54656, 54672, - 0, 1, 49152, 53248, 54272, 54784, 54656, 54672, - 54676, 0, 1, 49152, 53248, 54272, 54784, 54656, - 54672, 54676, 0, 1, 49152, 53248, 54272, 54784, - 54656, 54672, 54680, 54678, 0, 1, 49152, 53248, - 54272, 54784, 54656, 54672, 0, 1, 49152, 53248, - 54272, 54784, 54656, 54688, 54680, 0, 1, 49152, - 53248, 54272, 54784, 54656, 54688, 54680, 0, 1, - 49152, 53248, 54272, 54784, 54656, 54688, 54680, 54682, - 0, 1, 49152, 53248, 54272, 54784, 54656, 54688, - 54680, 0, 1, 49152, 53248, 54272, 54784, 54656, - 54688, 54689, 54684, 0, 1, 49152, 53248, 54272, - 54784, 54656, 54688, 54689, 54684, 0, 1, 49152, - 53248, 54272, 54784, 54656, 54688, 54689, 54684, 54686, - 0, 1, 49152, 53248, 54272, 54784, 54656, 0, - 1, 49152, 53248, 54272, 54784, 54656, 54688, 0, - 1, 49152, 53248, 54272, 54784, 54656, 54688, 0, - 1, 49152, 53248, 54272, 54784, 54656, 54688, 54690, - 0, 1, 49152, 53248, 54272, 54784, 54656, 54688, - 0, 1, 49152, 53248, 54272, 54784, 54656, 54688, - 54692, 0, 1, 49152, 53248, 54272, 54784, 54656, - 54688, 54692, 0, 1, 49152, 53248, 54272, 54784, - 54656, 54688, 54696, 54694, 0, 1, 49152, 53248, - 54272, 54784, 54656, 54688, 0, 1, 49152, 53248, - 54272, 54784, 54656, 54688, 54696, 0, 1, 49152, - 53248, 54272, 54784, 54656, 54688, 54696, 0, 1, - 49152, 53248, 54272, 54784, 54656, 54688, 54696, 54698, - 0, 1, 49152, 53248, 54272, 54784, 54656, 54688, - 54696, 0, 1, 49152, 53248, 54272, 54784, 54656, - 54688, 54704, 54700, 0, 1, 49152, 53248, 54272, - 54784, 54656, 54688, 54704, 54700, 0, 1, 49152, - 53248, 54272, 54784, 54656, 54688, 54704, 54705, 54702, - 0, 1, 49152, 53248, 54272, 54784, 54656, 54688, - 0, 1, 49152, 53248, 54272, 54784, 54656, 54720, - 54704, 0, 1, 49152, 53248, 54272, 54784, 54656, - 54720, 54704, 0, 1, 49152, 53248, 54272, 54784, - 54656, 54720, 54704, 54706, 0, 1, 49152, 53248, - 54272, 54784, 54656, 54720, 54704, 0, 1, 49152, - 53248, 54272, 54784, 54656, 54720, 54704, 54708, 0, - 1, 49152, 53248, 54272, 54784, 54656, 54720, 54704, - 54708, 0, 1, 49152, 53248, 54272, 54784, 54656, - 54720, 54704, 54712, 54710, 0, 1, 49152, 53248, - 54272, 54784, 54656, 54720, 54704, 0, 1, 49152, - 53248, 54272, 54784, 54656, 54720, 54721, 54712, 0, - 1, 49152, 53248, 54272, 54784, 54656, 54720, 54721, - 54712, 0, 1, 49152, 53248, 54272, 54784, 54656, - 54720, 54721, 54712, 54714, 0, 1, 49152, 53248, - 54272, 54784, 54656, 54720, 54721, 54712, 0, 1, - 49152, 53248, 54272, 54784, 54656, 54720, 54721, 54712, - 54716, 0, 1, 49152, 53248, 54272, 54784, 54656, - 54720, 54721, 54723, 54716, 0, 1, 49152, 53248, - 54272, 54784, 54656, 54720, 54721, 54723, 54716, 54718, - 0, 1, 49152, 53248, 54272, 54784, 54656, 0, - 1, 49152, 53248, 54272, 54784, 54785, 54720, 0, - 1, 49152, 53248, 54272, 54784, 54785, 54720, 0, - 1, 49152, 53248, 54272, 54784, 54785, 54720, 54722, - 0, 1, 49152, 53248, 54272, 54784, 54785, 54720, - 0, 1, 49152, 53248, 54272, 54784, 54785, 54720, - 54724, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54720, 54724, 0, 1, 49152, 53248, 54272, 54784, - 54785, 54720, 54728, 54726, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54720, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54720, 54728, 0, 1, 49152, - 53248, 54272, 54784, 54785, 54720, 54728, 0, 1, - 49152, 53248, 54272, 54784, 54785, 54720, 54728, 54730, - 0, 1, 49152, 53248, 54272, 54784, 54785, 54720, - 54728, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54720, 54736, 54732, 0, 1, 49152, 53248, 54272, - 54784, 54785, 54720, 54736, 54732, 0, 1, 49152, - 53248, 54272, 54784, 54785, 54720, 54736, 54737, 54734, - 0, 1, 49152, 53248, 54272, 54784, 54785, 54720, - 0, 1, 49152, 53248, 54272, 54784, 54785, 54720, - 54736, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54720, 54736, 0, 1, 49152, 53248, 54272, 54784, - 54785, 54720, 54736, 54738, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54720, 54736, 0, 1, 49152, - 53248, 54272, 54784, 54785, 54720, 54736, 54740, 0, - 1, 49152, 53248, 54272, 54784, 54785, 54720, 54736, - 54740, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54720, 54736, 54744, 54742, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54720, 54736, 0, 1, 49152, - 53248, 54272, 54784, 54785, 54720, 54752, 54744, 0, - 1, 49152, 53248, 54272, 54784, 54785, 54720, 54752, - 54744, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54720, 54752, 54744, 54746, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54720, 54752, 54744, 0, 1, - 49152, 53248, 54272, 54784, 54785, 54720, 54752, 54753, - 54748, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54720, 54752, 54753, 54748, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54720, 54752, 54753, 54748, 54750, - 0, 1, 49152, 53248, 54272, 54784, 54785, 54720, - 0, 1, 49152, 53248, 54272, 54784, 54785, 54720, - 54752, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54787, 54752, 0, 1, 49152, 53248, 54272, 54784, - 54785, 54787, 54752, 54754, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54787, 54752, 0, 1, 49152, - 53248, 54272, 54784, 54785, 54787, 54752, 54756, 0, - 1, 49152, 53248, 54272, 54784, 54785, 54787, 54752, - 54756, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54787, 54752, 54760, 54758, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54787, 54752, 0, 1, 49152, - 53248, 54272, 54784, 54785, 54787, 54752, 54760, 0, - 1, 49152, 53248, 54272, 54784, 54785, 54787, 54752, - 54760, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54787, 54752, 54760, 54762, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54787, 54752, 54760, 0, 1, - 49152, 53248, 54272, 54784, 54785, 54787, 54752, 54768, - 54764, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54787, 54752, 54768, 54764, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54787, 54752, 54768, 54769, 54766, - 0, 1, 49152, 53248, 54272, 54784, 54785, 54787, - 54752, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54787, 54752, 54768, 0, 1, 49152, 53248, 54272, - 54784, 54785, 54787, 54752, 54768, 0, 1, 49152, - 53248, 54272, 54784, 54785, 54787, 54752, 54768, 54770, - 0, 1, 49152, 53248, 54272, 54784, 54785, 54787, - 54791, 54768, 0, 1, 49152, 53248, 54272, 54784, - 54785, 54787, 54791, 54768, 54772, 0, 1, 49152, - 53248, 54272, 54784, 54785, 54787, 54791, 54768, 54772, - 0, 1, 49152, 53248, 54272, 54784, 54785, 54787, - 54791, 54768, 54776, 54774, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54787, 54791, 54768, 0, 1, - 49152, 53248, 54272, 54784, 54785, 54787, 54791, 54768, - 54776, 0, 1, 49152, 53248, 54272, 54784, 54785, - 54787, 54791, 54768, 54776, 0, 1, 49152, 53248, - 54272, 54784, 54785, 54787, 54791, 54768, 54776, 54778, - 0, 1, 49152, 53248, 54272, 54784, 54785, 54787, - 54791, 54768, 54776, 0, 1, 49152, 53248, 54272, - 54784, 54785, 54787, 54791, 54768, 54776, 54780, 0, - 1, 49152, 53248, 54272, 54784, 54785, 54787, 54791, - 54768, 54776, 54780, 0, 1, 49152, 53248, 54272, - 54784, 54785, 54787, 54791, 54768, 54776, 54780, 54782, - 0, 1, 49152, 53248, 54272, 0, 1, 49152, - 53248, 55296, 54784, 0, 1, 49152, 53248, 55296, - 54784, 0, 1, 49152, 53248, 55296, 54784, 54786, - 0, 1, 49152, 53248, 55296, 54784, 0, 1, - 49152, 53248, 55296, 54784, 54788, 0, 1, 49152, - 53248, 55296, 54784, 54788, 0, 1, 49152, 53248, - 55296, 54784, 54792, 54790, 0, 1, 49152, 53248, - 55296, 54784, 0, 1, 49152, 53248, 55296, 54784, - 54792, 0, 1, 49152, 53248, 55296, 54784, 54792, - 0, 1, 49152, 53248, 55296, 54784, 54792, 54794, - 0, 1, 49152, 53248, 55296, 54784, 54792, 0, - 1, 49152, 53248, 55296, 54784, 54800, 54796, 0, - 1, 49152, 53248, 55296, 54784, 54800, 54796, 0, - 1, 49152, 53248, 55296, 54784, 54800, 54801, 54798, - 0, 1, 49152, 53248, 55296, 54784, 0, 1, - 49152, 53248, 55296, 54784, 54800, 0, 1, 49152, - 53248, 55296, 54784, 54800, 0, 1, 49152, 53248, - 55296, 54784, 54800, 54802, 0, 1, 49152, 53248, - 55296, 54784, 54800, 0, 1, 49152, 53248, 55296, - 54784, 54800, 54804, 0, 1, 49152, 53248, 55296, - 54784, 54800, 54804, 0, 1, 49152, 53248, 55296, - 54784, 54800, 54808, 54806, 0, 1, 49152, 53248, - 55296, 54784, 54800, 0, 1, 49152, 53248, 55296, - 54784, 54816, 54808, 0, 1, 49152, 53248, 55296, - 54784, 54816, 54808, 0, 1, 49152, 53248, 55296, - 54784, 54816, 54808, 54810, 0, 1, 49152, 53248, - 55296, 54784, 54816, 54808, 0, 1, 49152, 53248, - 55296, 54784, 54816, 54817, 54812, 0, 1, 49152, - 53248, 55296, 54784, 54816, 54817, 54812, 0, 1, - 49152, 53248, 55296, 54784, 54816, 54817, 54812, 54814, - 0, 1, 49152, 53248, 55296, 54784, 0, 1, - 49152, 53248, 55296, 54784, 54816, 0, 1, 49152, - 53248, 55296, 54784, 54816, 0, 1, 49152, 53248, - 55296, 54784, 54816, 54818, 0, 1, 49152, 53248, - 55296, 54784, 54816, 0, 1, 49152, 53248, 55296, - 54784, 54816, 54820, 0, 1, 49152, 53248, 55296, - 54784, 54816, 54820, 0, 1, 49152, 53248, 55296, - 54784, 54816, 54824, 54822, 0, 1, 49152, 53248, - 55296, 54784, 54816, 0, 1, 49152, 53248, 55296, - 54784, 54816, 54824, 0, 1, 49152, 53248, 55296, - 54784, 54816, 54824, 0, 1, 49152, 53248, 55296, - 54784, 54816, 54824, 54826, 0, 1, 49152, 53248, - 55296, 54784, 54816, 54824, 0, 1, 49152, 53248, - 55296, 54784, 54816, 54832, 54828, 0, 1, 49152, - 53248, 55296, 54784, 54816, 54832, 54828, 0, 1, - 49152, 53248, 55296, 54784, 54816, 54832, 54833, 54830, - 0, 1, 49152, 53248, 55296, 54784, 54816, 0, - 1, 49152, 53248, 55296, 54784, 54848, 54832, 0, - 1, 49152, 53248, 55296, 54784, 54848, 54832, 0, - 1, 49152, 53248, 55296, 54784, 54848, 54832, 54834, - 0, 1, 49152, 53248, 55296, 54784, 54848, 54832, - 0, 1, 49152, 53248, 55296, 54784, 54848, 54832, - 54836, 0, 1, 49152, 53248, 55296, 54784, 54848, - 54832, 54836, 0, 1, 49152, 53248, 55296, 54784, - 54848, 54832, 54840, 54838, 0, 1, 49152, 53248, - 55296, 54784, 54848, 54832, 0, 1, 49152, 53248, - 55296, 54784, 54848, 54849, 54840, 0, 1, 49152, - 53248, 55296, 54784, 54848, 54849, 54840, 0, 1, - 49152, 53248, 55296, 54784, 54848, 54849, 54840, 54842, - 0, 1, 49152, 53248, 55296, 54784, 54848, 54849, - 54840, 0, 1, 49152, 53248, 55296, 54784, 54848, - 54849, 54840, 54844, 0, 1, 49152, 53248, 55296, - 54784, 54848, 54849, 54851, 54844, 0, 1, 49152, - 53248, 55296, 54784, 54848, 54849, 54851, 54844, 54846, - 0, 1, 49152, 53248, 55296, 54784, 0, 1, - 49152, 53248, 55296, 54784, 54848, 0, 1, 49152, - 53248, 55296, 54784, 54848, 0, 1, 49152, 53248, - 55296, 54784, 54848, 54850, 0, 1, 49152, 53248, - 55296, 54784, 54848, 0, 1, 49152, 53248, 55296, - 54784, 54848, 54852, 0, 1, 49152, 53248, 55296, - 54784, 54848, 54852, 0, 1, 49152, 53248, 55296, - 54784, 54848, 54856, 54854, 0, 1, 49152, 53248, - 55296, 54784, 54848, 0, 1, 49152, 53248, 55296, - 54784, 54848, 54856, 0, 1, 49152, 53248, 55296, - 54784, 54848, 54856, 0, 1, 49152, 53248, 55296, - 54784, 54848, 54856, 54858, 0, 1, 49152, 53248, - 55296, 54784, 54848, 54856, 0, 1, 49152, 53248, - 55296, 54784, 54848, 54864, 54860, 0, 1, 49152, - 53248, 55296, 54784, 54848, 54864, 54860, 0, 1, - 49152, 53248, 55296, 54784, 54848, 54864, 54865, 54862, - 0, 1, 49152, 53248, 55296, 54784, 54848, 0, - 1, 49152, 53248, 55296, 54784, 54848, 54864, 0, - 1, 49152, 53248, 55296, 54784, 54848, 54864, 0, - 1, 49152, 53248, 55296, 54784, 54848, 54864, 54866, - 0, 1, 49152, 53248, 55296, 54784, 54848, 54864, - 0, 1, 49152, 53248, 55296, 54784, 54848, 54864, - 54868, 0, 1, 49152, 53248, 55296, 54784, 54848, - 54864, 54868, 0, 1, 49152, 53248, 55296, 54784, - 54848, 54864, 54872, 54870, 0, 1, 49152, 53248, - 55296, 54784, 54848, 54864, 0, 1, 49152, 53248, - 55296, 54784, 54848, 54880, 54872, 0, 1, 49152, - 53248, 55296, 54784, 54848, 54880, 54872, 0, 1, - 49152, 53248, 55296, 54784, 54848, 54880, 54872, 54874, - 0, 1, 49152, 53248, 55296, 54784, 54848, 54880, - 54872, 0, 1, 49152, 53248, 55296, 54784, 54848, - 54880, 54881, 54876, 0, 1, 49152, 53248, 55296, - 54784, 54848, 54880, 54881, 54876, 0, 1, 49152, - 53248, 55296, 54784, 54848, 54880, 54881, 54876, 54878, - 0, 1, 49152, 53248, 55296, 54784, 54848, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54880, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54880, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54880, 54882, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54880, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54880, - 54884, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54880, 54884, 0, 1, 49152, 53248, 55296, 54784, - 54912, 54880, 54888, 54886, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54880, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54880, 54888, 0, 1, 49152, - 53248, 55296, 54784, 54912, 54880, 54888, 0, 1, - 49152, 53248, 55296, 54784, 54912, 54880, 54888, 54890, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54880, - 54888, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54880, 54896, 54892, 0, 1, 49152, 53248, 55296, - 54784, 54912, 54880, 54896, 54892, 0, 1, 49152, - 53248, 55296, 54784, 54912, 54880, 54896, 54897, 54894, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54880, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54913, - 54896, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54913, 54896, 0, 1, 49152, 53248, 55296, 54784, - 54912, 54913, 54896, 54898, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54913, 54896, 0, 1, 49152, - 53248, 55296, 54784, 54912, 54913, 54896, 54900, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54913, 54896, - 54900, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54913, 54896, 54904, 54902, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54913, 54896, 0, 1, 49152, - 53248, 55296, 54784, 54912, 54913, 54896, 54904, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54913, 54915, - 54904, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54913, 54915, 54904, 54906, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54913, 54915, 54904, 0, 1, - 49152, 53248, 55296, 54784, 54912, 54913, 54915, 54904, - 54908, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54913, 54915, 54904, 54908, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54913, 54915, 54904, 54908, 54910, - 0, 1, 49152, 53248, 55296, 54784, 0, 1, - 49152, 53248, 55296, 54784, 54912, 0, 1, 49152, - 53248, 55296, 54784, 54912, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54914, 0, 1, 49152, 53248, - 55296, 54784, 54912, 0, 1, 49152, 53248, 55296, - 54784, 54912, 54916, 0, 1, 49152, 53248, 55296, - 54784, 54912, 54916, 0, 1, 49152, 53248, 55296, - 54784, 54912, 54920, 54918, 0, 1, 49152, 53248, - 55296, 54784, 54912, 0, 1, 49152, 53248, 55296, - 54784, 54912, 54920, 0, 1, 49152, 53248, 55296, - 54784, 54912, 54920, 0, 1, 49152, 53248, 55296, - 54784, 54912, 54920, 54922, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54920, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54928, 54924, 0, 1, 49152, - 53248, 55296, 54784, 54912, 54928, 54924, 0, 1, - 49152, 53248, 55296, 54784, 54912, 54928, 54929, 54926, - 0, 1, 49152, 53248, 55296, 54784, 54912, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54928, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54928, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54928, 54930, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54928, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54928, - 54932, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54928, 54932, 0, 1, 49152, 53248, 55296, 54784, - 54912, 54928, 54936, 54934, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54928, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54944, 54936, 0, 1, 49152, - 53248, 55296, 54784, 54912, 54944, 54936, 0, 1, - 49152, 53248, 55296, 54784, 54912, 54944, 54936, 54938, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54944, - 54936, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54944, 54945, 54940, 0, 1, 49152, 53248, 55296, - 54784, 54912, 54944, 54945, 54940, 0, 1, 49152, - 53248, 55296, 54784, 54912, 54944, 54945, 54940, 54942, - 0, 1, 49152, 53248, 55296, 54784, 54912, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54944, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54944, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54944, 54946, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54944, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54944, - 54948, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54944, 54948, 0, 1, 49152, 53248, 55296, 54784, - 54912, 54944, 54952, 54950, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54944, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54944, 54952, 0, 1, 49152, - 53248, 55296, 54784, 54912, 54944, 54952, 0, 1, - 49152, 53248, 55296, 54784, 54912, 54944, 54952, 54954, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54944, - 54952, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54944, 54960, 54956, 0, 1, 49152, 53248, 55296, - 54784, 54912, 54944, 54960, 54956, 0, 1, 49152, - 53248, 55296, 54784, 54912, 54944, 54960, 54961, 54958, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54944, - 0, 1, 49152, 53248, 55296, 54784, 54912, 54976, - 54960, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54976, 54960, 0, 1, 49152, 53248, 55296, 54784, - 54912, 54976, 54960, 54962, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54976, 54960, 0, 1, 49152, - 53248, 55296, 54784, 54912, 54976, 54960, 54964, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54976, 54960, - 54964, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54976, 54960, 54968, 54966, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54976, 54960, 0, 1, 49152, - 53248, 55296, 54784, 54912, 54976, 54977, 54968, 0, - 1, 49152, 53248, 55296, 54784, 54912, 54976, 54977, - 54968, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54976, 54977, 54968, 54970, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54976, 54977, 54968, 0, 1, - 49152, 53248, 55296, 54784, 54912, 54976, 54977, 54968, - 54972, 0, 1, 49152, 53248, 55296, 54784, 54912, - 54976, 54977, 54979, 54972, 0, 1, 49152, 53248, - 55296, 54784, 54912, 54976, 54977, 54979, 54972, 54974, - 0, 1, 49152, 53248, 55296, 54784, 54912, 0, - 1, 49152, 53248, 55296, 54784, 55040, 54976, 0, - 1, 49152, 53248, 55296, 54784, 55040, 54976, 0, - 1, 49152, 53248, 55296, 54784, 55040, 54976, 54978, - 0, 1, 49152, 53248, 55296, 54784, 55040, 54976, - 0, 1, 49152, 53248, 55296, 54784, 55040, 54976, - 54980, 0, 1, 49152, 53248, 55296, 54784, 55040, - 54976, 54980, 0, 1, 49152, 53248, 55296, 54784, - 55040, 54976, 54984, 54982, 0, 1, 49152, 53248, - 55296, 54784, 55040, 54976, 0, 1, 49152, 53248, - 55296, 54784, 55040, 54976, 54984, 0, 1, 49152, - 53248, 55296, 54784, 55040, 54976, 54984, 0, 1, - 49152, 53248, 55296, 54784, 55040, 54976, 54984, 54986, - 0, 1, 49152, 53248, 55296, 54784, 55040, 54976, - 54984, 0, 1, 49152, 53248, 55296, 54784, 55040, - 54976, 54992, 54988, 0, 1, 49152, 53248, 55296, - 54784, 55040, 54976, 54992, 54988, 0, 1, 49152, - 53248, 55296, 54784, 55040, 54976, 54992, 54993, 54990, - 0, 1, 49152, 53248, 55296, 54784, 55040, 54976, - 0, 1, 49152, 53248, 55296, 54784, 55040, 54976, - 54992, 0, 1, 49152, 53248, 55296, 54784, 55040, - 54976, 54992, 0, 1, 49152, 53248, 55296, 54784, - 55040, 54976, 54992, 54994, 0, 1, 49152, 53248, - 55296, 54784, 55040, 54976, 54992, 0, 1, 49152, - 53248, 55296, 54784, 55040, 54976, 54992, 54996, 0, - 1, 49152, 53248, 55296, 54784, 55040, 54976, 54992, - 54996, 0, 1, 49152, 53248, 55296, 54784, 55040, - 54976, 54992, 55000, 54998, 0, 1, 49152, 53248, - 55296, 54784, 55040, 54976, 54992, 0, 1, 49152, - 53248, 55296, 54784, 55040, 54976, 55008, 55000, 0, - 1, 49152, 53248, 55296, 54784, 55040, 54976, 55008, - 55000, 0, 1, 49152, 53248, 55296, 54784, 55040, - 54976, 55008, 55000, 55002, 0, 1, 49152, 53248, - 55296, 54784, 55040, 54976, 55008, 55000, 0, 1, - 49152, 53248, 55296, 54784, 55040, 54976, 55008, 55009, - 55004, 0, 1, 49152, 53248, 55296, 54784, 55040, - 54976, 55008, 55009, 55004, 0, 1, 49152, 53248, - 55296, 54784, 55040, 54976, 55008, 55009, 55004, 55006, - 0, 1, 49152, 53248, 55296, 54784, 55040, 54976, - 0, 1, 49152, 53248, 55296, 54784, 55040, 55041, - 55008, 0, 1, 49152, 53248, 55296, 54784, 55040, - 55041, 55008, 0, 1, 49152, 53248, 55296, 54784, - 55040, 55041, 55008, 55010, 0, 1, 49152, 53248, - 55296, 54784, 55040, 55041, 55008, 0, 1, 49152, - 53248, 55296, 54784, 55040, 55041, 55008, 55012, 0, - 1, 49152, 53248, 55296, 54784, 55040, 55041, 55008, - 55012, 0, 1, 49152, 53248, 55296, 54784, 55040, - 55041, 55008, 55016, 55014, 0, 1, 49152, 53248, - 55296, 54784, 55040, 55041, 55008, 0, 1, 49152, - 53248, 55296, 54784, 55040, 55041, 55008, 55016, 0, - 1, 49152, 53248, 55296, 54784, 55040, 55041, 55008, - 55016, 0, 1, 49152, 53248, 55296, 54784, 55040, - 55041, 55008, 55016, 55018, 0, 1, 49152, 53248, - 55296, 54784, 55040, 55041, 55008, 55016, 0, 1, - 49152, 53248, 55296, 54784, 55040, 55041, 55008, 55024, - 55020, 0, 1, 49152, 53248, 55296, 54784, 55040, - 55041, 55008, 55024, 55020, 0, 1, 49152, 53248, - 55296, 54784, 55040, 55041, 55008, 55024, 55025, 55022, - 0, 1, 49152, 53248, 55296, 54784, 55040, 55041, - 55008, 0, 1, 49152, 53248, 55296, 54784, 55040, - 55041, 55008, 55024, 0, 1, 49152, 53248, 55296, - 54784, 55040, 55041, 55043, 55024, 0, 1, 49152, - 53248, 55296, 54784, 55040, 55041, 55043, 55024, 55026, - 0, 1, 49152, 53248, 55296, 54784, 55040, 55041, - 55043, 55024, 0, 1, 49152, 53248, 55296, 54784, - 55040, 55041, 55043, 55024, 55028, 0, 1, 49152, - 53248, 55296, 54784, 55040, 55041, 55043, 55024, 55028, - 0, 1, 49152, 53248, 55296, 54784, 55040, 55041, - 55043, 55024, 55032, 55030, 0, 1, 49152, 53248, - 55296, 54784, 55040, 55041, 55043, 55024, 0, 1, - 49152, 53248, 55296, 54784, 55040, 55041, 55043, 55024, - 55032, 0, 1, 49152, 53248, 55296, 54784, 55040, - 55041, 55043, 55024, 55032, 0, 1, 49152, 53248, - 55296, 54784, 55040, 55041, 55043, 55024, 55032, 55034, - 0, 1, 49152, 53248, 55296, 54784, 55040, 55041, - 55043, 55047, 55032, 0, 1, 49152, 53248, 55296, - 54784, 55040, 55041, 55043, 55047, 55032, 55036, 0, - 1, 49152, 53248, 55296, 54784, 55040, 55041, 55043, - 55047, 55032, 55036, 0, 1, 49152, 53248, 55296, - 54784, 55040, 55041, 55043, 55047, 55032, 55036, 55038, - 0, 1, 49152, 53248, 55296, 54784, 0, 1, - 49152, 53248, 55296, 54784, 55040, 0, 1, 49152, - 53248, 55296, 55297, 55040, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55042, 0, 1, 49152, 53248, - 55296, 55297, 55040, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55044, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55044, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55048, 55046, 0, 1, 49152, 53248, - 55296, 55297, 55040, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55048, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55048, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55048, 55050, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55048, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55056, 55052, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55056, 55052, 0, 1, - 49152, 53248, 55296, 55297, 55040, 55056, 55057, 55054, - 0, 1, 49152, 53248, 55296, 55297, 55040, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55056, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55056, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55056, 55058, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55056, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55056, - 55060, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55056, 55060, 0, 1, 49152, 53248, 55296, 55297, - 55040, 55056, 55064, 55062, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55056, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55072, 55064, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55072, 55064, 0, 1, - 49152, 53248, 55296, 55297, 55040, 55072, 55064, 55066, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55072, - 55064, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55072, 55073, 55068, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55072, 55073, 55068, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55072, 55073, 55068, 55070, - 0, 1, 49152, 53248, 55296, 55297, 55040, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55072, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55072, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55072, 55074, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55072, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55072, - 55076, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55072, 55076, 0, 1, 49152, 53248, 55296, 55297, - 55040, 55072, 55080, 55078, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55072, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55072, 55080, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55072, 55080, 0, 1, - 49152, 53248, 55296, 55297, 55040, 55072, 55080, 55082, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55072, - 55080, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55072, 55088, 55084, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55072, 55088, 55084, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55072, 55088, 55089, 55086, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55072, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55104, - 55088, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55104, 55088, 0, 1, 49152, 53248, 55296, 55297, - 55040, 55104, 55088, 55090, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55104, 55088, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55104, 55088, 55092, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55104, 55088, - 55092, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55104, 55088, 55096, 55094, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55104, 55088, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55104, 55105, 55096, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55104, 55105, - 55096, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55104, 55105, 55096, 55098, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55104, 55105, 55096, 0, 1, - 49152, 53248, 55296, 55297, 55040, 55104, 55105, 55096, - 55100, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55104, 55105, 55107, 55100, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55104, 55105, 55107, 55100, 55102, - 0, 1, 49152, 53248, 55296, 55297, 55040, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55104, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55104, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55104, 55106, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55104, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55104, - 55108, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55104, 55108, 0, 1, 49152, 53248, 55296, 55297, - 55040, 55104, 55112, 55110, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55104, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55104, 55112, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55104, 55112, 0, 1, - 49152, 53248, 55296, 55297, 55040, 55104, 55112, 55114, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55104, - 55112, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55104, 55120, 55116, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55104, 55120, 55116, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55104, 55120, 55121, 55118, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55104, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55104, - 55120, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55104, 55120, 0, 1, 49152, 53248, 55296, 55297, - 55040, 55104, 55120, 55122, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55104, 55120, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55104, 55120, 55124, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55104, 55120, - 55124, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55104, 55120, 55128, 55126, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55104, 55120, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55104, 55136, 55128, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55104, 55136, - 55128, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55104, 55136, 55128, 55130, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55104, 55136, 55128, 0, 1, - 49152, 53248, 55296, 55297, 55040, 55104, 55136, 55137, - 55132, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55104, 55136, 55137, 55132, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55104, 55136, 55137, 55132, 55134, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55104, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55168, - 55136, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55168, 55136, 0, 1, 49152, 53248, 55296, 55297, - 55040, 55168, 55136, 55138, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55168, 55136, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55168, 55136, 55140, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55168, 55136, - 55140, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55168, 55136, 55144, 55142, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55168, 55136, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55168, 55136, 55144, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55168, 55136, - 55144, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55168, 55136, 55144, 55146, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55168, 55136, 55144, 0, 1, - 49152, 53248, 55296, 55297, 55040, 55168, 55136, 55152, - 55148, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55168, 55136, 55152, 55148, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55168, 55136, 55152, 55153, 55150, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55168, - 55136, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55168, 55169, 55152, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55168, 55169, 55152, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55168, 55169, 55152, 55154, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55168, - 55169, 55152, 0, 1, 49152, 53248, 55296, 55297, - 55040, 55168, 55169, 55152, 55156, 0, 1, 49152, - 53248, 55296, 55297, 55040, 55168, 55169, 55152, 55156, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55168, - 55169, 55152, 55160, 55158, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55168, 55169, 55152, 0, 1, - 49152, 53248, 55296, 55297, 55040, 55168, 55169, 55152, - 55160, 0, 1, 49152, 53248, 55296, 55297, 55040, - 55168, 55169, 55171, 55160, 0, 1, 49152, 53248, - 55296, 55297, 55040, 55168, 55169, 55171, 55160, 55162, - 0, 1, 49152, 53248, 55296, 55297, 55040, 55168, - 55169, 55171, 55160, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55168, 55169, 55171, 55160, 55164, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55168, 55169, - 55171, 55160, 55164, 0, 1, 49152, 53248, 55296, - 55297, 55040, 55168, 55169, 55171, 55160, 55164, 55166, - 0, 1, 49152, 53248, 55296, 55297, 55040, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55168, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55168, 0, - 1, 49152, 53248, 55296, 55297, 55040, 55168, 55170, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 55172, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55172, 0, 1, 49152, 53248, 55296, 55297, - 55299, 55168, 55176, 55174, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55176, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55168, 55176, 0, 1, - 49152, 53248, 55296, 55297, 55299, 55168, 55176, 55178, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 55176, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55184, 55180, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55168, 55184, 55180, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55168, 55184, 55185, 55182, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 55184, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55184, 0, 1, 49152, 53248, 55296, 55297, - 55299, 55168, 55184, 55186, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55184, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55168, 55184, 55188, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55168, 55184, - 55188, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55184, 55192, 55190, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55184, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55168, 55200, 55192, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55168, 55200, - 55192, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55200, 55192, 55194, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55200, 55192, 0, 1, - 49152, 53248, 55296, 55297, 55299, 55168, 55200, 55201, - 55196, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55200, 55201, 55196, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55200, 55201, 55196, 55198, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 55200, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55200, 0, 1, 49152, 53248, 55296, 55297, - 55299, 55168, 55200, 55202, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55200, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55168, 55200, 55204, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55168, 55200, - 55204, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55200, 55208, 55206, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55200, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55168, 55200, 55208, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55168, 55200, - 55208, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55200, 55208, 55210, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55200, 55208, 0, 1, - 49152, 53248, 55296, 55297, 55299, 55168, 55200, 55216, - 55212, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55200, 55216, 55212, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55200, 55216, 55217, 55214, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 55200, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55232, 55216, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55168, 55232, 55216, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55168, 55232, 55216, 55218, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 55232, 55216, 0, 1, 49152, 53248, 55296, 55297, - 55299, 55168, 55232, 55216, 55220, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55168, 55232, 55216, 55220, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 55232, 55216, 55224, 55222, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55232, 55216, 0, 1, - 49152, 53248, 55296, 55297, 55299, 55168, 55232, 55233, - 55224, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55232, 55233, 55224, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55232, 55233, 55224, 55226, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 55232, 55233, 55224, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55168, 55232, 55233, 55224, 55228, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55168, 55232, - 55233, 55235, 55228, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55168, 55232, 55233, 55235, 55228, 55230, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55168, - 55232, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55232, 0, 1, 49152, 53248, 55296, 55297, - 55299, 55168, 55232, 55234, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55168, 55232, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55168, 55232, 55236, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55168, 55232, - 55236, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55168, 55232, 55240, 55238, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55303, 55232, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55303, 55232, 55240, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55303, 55232, - 55240, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55303, 55232, 55240, 55242, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55303, 55232, 55240, 0, 1, - 49152, 53248, 55296, 55297, 55299, 55303, 55232, 55248, - 55244, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55303, 55232, 55248, 55244, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55303, 55232, 55248, 55249, 55246, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55303, - 55232, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55303, 55232, 55248, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55303, 55232, 55248, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55303, 55232, 55248, 55250, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55303, - 55232, 55248, 0, 1, 49152, 53248, 55296, 55297, - 55299, 55303, 55232, 55248, 55252, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55303, 55232, 55248, 55252, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55303, - 55232, 55248, 55256, 55254, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55303, 55232, 55248, 0, 1, - 49152, 53248, 55296, 55297, 55299, 55303, 55232, 55264, - 55256, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55303, 55232, 55264, 55256, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55303, 55232, 55264, 55256, 55258, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55303, - 55232, 55264, 55256, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55303, 55232, 55264, 55265, 55260, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55303, 55232, - 55264, 55265, 55260, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55303, 55232, 55264, 55265, 55260, 55262, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55303, - 55232, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55303, 55232, 55264, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55303, 55232, 55264, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55303, 55232, 55264, 55266, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55303, - 55232, 55264, 0, 1, 49152, 53248, 55296, 55297, - 55299, 55303, 55232, 55264, 55268, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55303, 55232, 55264, 55268, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55303, - 55232, 55264, 55272, 55270, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55303, 55232, 55264, 0, 1, - 49152, 53248, 55296, 55297, 55299, 55303, 55232, 55264, - 55272, 0, 1, 49152, 53248, 55296, 55297, 55299, - 55303, 55232, 55264, 55272, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55303, 55232, 55264, 55272, 55274, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55303, - 55232, 55264, 55272, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55303, 55232, 55264, 55280, 55276, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55303, 55232, - 55264, 55280, 55276, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55303, 55232, 55264, 55280, 55281, 55278, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55303, - 55311, 55264, 0, 1, 49152, 53248, 55296, 55297, - 55299, 55303, 55311, 55264, 55280, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55303, 55311, 55264, 55280, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55303, - 55311, 55264, 55280, 55282, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55303, 55311, 55264, 55280, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55303, 55311, - 55264, 55280, 55284, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55303, 55311, 55264, 55280, 55284, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55303, 55311, - 55264, 55280, 55288, 55286, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55303, 55311, 55264, 55280, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55303, 55311, - 55264, 55280, 55288, 0, 1, 49152, 53248, 55296, - 55297, 55299, 55303, 55311, 55264, 55280, 55288, 0, - 1, 49152, 53248, 55296, 55297, 55299, 55303, 55311, - 55264, 55280, 55288, 55290, 0, 1, 49152, 53248, - 55296, 55297, 55299, 55303, 55311, 55264, 55280, 55288, - 0, 1, 49152, 53248, 55296, 55297, 55299, 55303, - 55311, 55264, 55280, 55288, 55292, 0, 1, 49152, - 53248, 55296, 55297, 55299, 55303, 55311, 55264, 55280, - 55288, 55292, 0, 1, 49152, 53248, 55296, 55297, - 55299, 55303, 55311, 55264, 55280, 55288, 55292, 55294, - 0, 1, 49152, 53248, 0, 1, 49152, 53248, - 55296, 0, 1, 49152, 53248, 55296, 0, 1, - 49152, 53248, 55296, 55298, 0, 1, 49152, 53248, - 55296, 0, 1, 49152, 53248, 55296, 55300, 0, - 1, 49152, 53248, 55296, 55300, 0, 1, 49152, - 53248, 55296, 55304, 55302, 0, 1, 49152, 53248, - 55296, 0, 1, 49152, 53248, 55296, 55304, 0, - 1, 49152, 53248, 55296, 55304, 0, 1, 49152, - 53248, 55296, 55304, 55306, 0, 1, 49152, 53248, - 55296, 55304, 0, 1, 49152, 53248, 55296, 55312, - 55308, 0, 1, 49152, 53248, 55296, 55312, 55308, - 0, 1, 49152, 53248, 55296, 55312, 55313, 55310, - 0, 1, 49152, 53248, 55296, 0, 1, 49152, - 53248, 55296, 55312, 0, 1, 49152, 53248, 55296, - 55312, 0, 1, 49152, 53248, 55296, 55312, 55314, - 0, 1, 49152, 53248, 55296, 55312, 0, 1, - 49152, 53248, 55296, 55312, 55316, 0, 1, 49152, - 53248, 55296, 55312, 55316, 0, 1, 49152, 53248, - 55296, 55312, 55320, 55318, 0, 1, 49152, 53248, - 55296, 55312, 0, 1, 49152, 53248, 55296, 55328, - 55320, 0, 1, 49152, 53248, 55296, 55328, 55320, - 0, 1, 49152, 53248, 55296, 55328, 55320, 55322, - 0, 1, 49152, 53248, 55296, 55328, 55320, 0, - 1, 49152, 53248, 55296, 55328, 55329, 55324, 0, - 1, 49152, 53248, 55296, 55328, 55329, 55324, 0, - 1, 49152, 53248, 55296, 55328, 55329, 55324, 55326, - 0, 1, 49152, 53248, 55296, 0, 1, 49152, - 53248, 55296, 55328, 0, 1, 49152, 53248, 55296, - 55328, 0, 1, 49152, 53248, 55296, 55328, 55330, - 0, 1, 49152, 53248, 55296, 55328, 0, 1, - 49152, 53248, 55296, 55328, 55332, 0, 1, 49152, - 53248, 55296, 55328, 55332, 0, 1, 49152, 53248, - 55296, 55328, 55336, 55334, 0, 1, 49152, 53248, - 55296, 55328, 0, 1, 49152, 53248, 55296, 55328, - 55336, 0, 1, 49152, 53248, 55296, 55328, 55336, - 0, 1, 49152, 53248, 55296, 55328, 55336, 55338, - 0, 1, 49152, 53248, 55296, 55328, 55336, 0, - 1, 49152, 53248, 55296, 55328, 55344, 55340, 0, - 1, 49152, 53248, 55296, 55328, 55344, 55340, 0, - 1, 49152, 53248, 55296, 55328, 55344, 55345, 55342, - 0, 1, 49152, 53248, 55296, 55328, 0, 1, - 49152, 53248, 55296, 55360, 55344, 0, 1, 49152, - 53248, 55296, 55360, 55344, 0, 1, 49152, 53248, - 55296, 55360, 55344, 55346, 0, 1, 49152, 53248, - 55296, 55360, 55344, 0, 1, 49152, 53248, 55296, - 55360, 55344, 55348, 0, 1, 49152, 53248, 55296, - 55360, 55344, 55348, 0, 1, 49152, 53248, 55296, - 55360, 55344, 55352, 55350, 0, 1, 49152, 53248, - 55296, 55360, 55344, 0, 1, 49152, 53248, 55296, - 55360, 55361, 55352, 0, 1, 49152, 53248, 55296, - 55360, 55361, 55352, 0, 1, 49152, 53248, 55296, - 55360, 55361, 55352, 55354, 0, 1, 49152, 53248, - 55296, 55360, 55361, 55352, 0, 1, 49152, 53248, - 55296, 55360, 55361, 55352, 55356, 0, 1, 49152, - 53248, 55296, 55360, 55361, 55363, 55356, 0, 1, - 49152, 53248, 55296, 55360, 55361, 55363, 55356, 55358, - 0, 1, 49152, 53248, 55296, 0, 1, 49152, - 53248, 55296, 55360, 0, 1, 49152, 53248, 55296, - 55360, 0, 1, 49152, 53248, 55296, 55360, 55362, - 0, 1, 49152, 53248, 55296, 55360, 0, 1, - 49152, 53248, 55296, 55360, 55364, 0, 1, 49152, - 53248, 55296, 55360, 55364, 0, 1, 49152, 53248, - 55296, 55360, 55368, 55366, 0, 1, 49152, 53248, - 55296, 55360, 0, 1, 49152, 53248, 55296, 55360, - 55368, 0, 1, 49152, 53248, 55296, 55360, 55368, - 0, 1, 49152, 53248, 55296, 55360, 55368, 55370, - 0, 1, 49152, 53248, 55296, 55360, 55368, 0, - 1, 49152, 53248, 55296, 55360, 55376, 55372, 0, - 1, 49152, 53248, 55296, 55360, 55376, 55372, 0, - 1, 49152, 53248, 55296, 55360, 55376, 55377, 55374, - 0, 1, 49152, 53248, 55296, 55360, 0, 1, - 49152, 53248, 55296, 55360, 55376, 0, 1, 49152, - 53248, 55296, 55360, 55376, 0, 1, 49152, 53248, - 55296, 55360, 55376, 55378, 0, 1, 49152, 53248, - 55296, 55360, 55376, 0, 1, 49152, 53248, 55296, - 55360, 55376, 55380, 0, 1, 49152, 53248, 55296, - 55360, 55376, 55380, 0, 1, 49152, 53248, 55296, - 55360, 55376, 55384, 55382, 0, 1, 49152, 53248, - 55296, 55360, 55376, 0, 1, 49152, 53248, 55296, - 55360, 55392, 55384, 0, 1, 49152, 53248, 55296, - 55360, 55392, 55384, 0, 1, 49152, 53248, 55296, - 55360, 55392, 55384, 55386, 0, 1, 49152, 53248, - 55296, 55360, 55392, 55384, 0, 1, 49152, 53248, - 55296, 55360, 55392, 55393, 55388, 0, 1, 49152, - 53248, 55296, 55360, 55392, 55393, 55388, 0, 1, - 49152, 53248, 55296, 55360, 55392, 55393, 55388, 55390, - 0, 1, 49152, 53248, 55296, 55360, 0, 1, - 49152, 53248, 55296, 55424, 55392, 0, 1, 49152, - 53248, 55296, 55424, 55392, 0, 1, 49152, 53248, - 55296, 55424, 55392, 55394, 0, 1, 49152, 53248, - 55296, 55424, 55392, 0, 1, 49152, 53248, 55296, - 55424, 55392, 55396, 0, 1, 49152, 53248, 55296, - 55424, 55392, 55396, 0, 1, 49152, 53248, 55296, - 55424, 55392, 55400, 55398, 0, 1, 49152, 53248, - 55296, 55424, 55392, 0, 1, 49152, 53248, 55296, - 55424, 55392, 55400, 0, 1, 49152, 53248, 55296, - 55424, 55392, 55400, 0, 1, 49152, 53248, 55296, - 55424, 55392, 55400, 55402, 0, 1, 49152, 53248, - 55296, 55424, 55392, 55400, 0, 1, 49152, 53248, - 55296, 55424, 55392, 55408, 55404, 0, 1, 49152, - 53248, 55296, 55424, 55392, 55408, 55404, 0, 1, - 49152, 53248, 55296, 55424, 55392, 55408, 55409, 55406, - 0, 1, 49152, 53248, 55296, 55424, 55392, 0, - 1, 49152, 53248, 55296, 55424, 55425, 55408, 0, - 1, 49152, 53248, 55296, 55424, 55425, 55408, 0, - 1, 49152, 53248, 55296, 55424, 55425, 55408, 55410, - 0, 1, 49152, 53248, 55296, 55424, 55425, 55408, - 0, 1, 49152, 53248, 55296, 55424, 55425, 55408, - 55412, 0, 1, 49152, 53248, 55296, 55424, 55425, - 55408, 55412, 0, 1, 49152, 53248, 55296, 55424, - 55425, 55408, 55416, 55414, 0, 1, 49152, 53248, - 55296, 55424, 55425, 55408, 0, 1, 49152, 53248, - 55296, 55424, 55425, 55408, 55416, 0, 1, 49152, - 53248, 55296, 55424, 55425, 55427, 55416, 0, 1, - 49152, 53248, 55296, 55424, 55425, 55427, 55416, 55418, - 0, 1, 49152, 53248, 55296, 55424, 55425, 55427, - 55416, 0, 1, 49152, 53248, 55296, 55424, 55425, - 55427, 55416, 55420, 0, 1, 49152, 53248, 55296, - 55424, 55425, 55427, 55416, 55420, 0, 1, 49152, - 53248, 55296, 55424, 55425, 55427, 55416, 55420, 55422, - 0, 1, 49152, 53248, 55296, 0, 1, 49152, - 53248, 55296, 55424, 0, 1, 49152, 53248, 55296, - 55424, 0, 1, 49152, 53248, 55296, 55424, 55426, - 0, 1, 49152, 53248, 55296, 55424, 0, 1, - 49152, 53248, 55296, 55424, 55428, 0, 1, 49152, - 53248, 55296, 55424, 55428, 0, 1, 49152, 53248, - 55296, 55424, 55432, 55430, 0, 1, 49152, 53248, - 55296, 55424, 0, 1, 49152, 53248, 55296, 55424, - 55432, 0, 1, 49152, 53248, 55296, 55424, 55432, - 0, 1, 49152, 53248, 55296, 55424, 55432, 55434, - 0, 1, 49152, 53248, 55296, 55424, 55432, 0, - 1, 49152, 53248, 55296, 55424, 55440, 55436, 0, - 1, 49152, 53248, 55296, 55424, 55440, 55436, 0, - 1, 49152, 53248, 55296, 55424, 55440, 55441, 55438, - 0, 1, 49152, 53248, 55296, 55424, 0, 1, - 49152, 53248, 55296, 55424, 55440, 0, 1, 49152, - 53248, 55296, 55424, 55440, 0, 1, 49152, 53248, - 55296, 55424, 55440, 55442, 0, 1, 49152, 53248, - 55296, 55424, 55440, 0, 1, 49152, 53248, 55296, - 55424, 55440, 55444, 0, 1, 49152, 53248, 55296, - 55424, 55440, 55444, 0, 1, 49152, 53248, 55296, - 55424, 55440, 55448, 55446, 0, 1, 49152, 53248, - 55296, 55424, 55440, 0, 1, 49152, 53248, 55296, - 55424, 55456, 55448, 0, 1, 49152, 53248, 55296, - 55424, 55456, 55448, 0, 1, 49152, 53248, 55296, - 55424, 55456, 55448, 55450, 0, 1, 49152, 53248, - 55296, 55424, 55456, 55448, 0, 1, 49152, 53248, - 55296, 55424, 55456, 55457, 55452, 0, 1, 49152, - 53248, 55296, 55424, 55456, 55457, 55452, 0, 1, - 49152, 53248, 55296, 55424, 55456, 55457, 55452, 55454, - 0, 1, 49152, 53248, 55296, 55424, 0, 1, - 49152, 53248, 55296, 55424, 55456, 0, 1, 49152, - 53248, 55296, 55424, 55456, 0, 1, 49152, 53248, - 55296, 55424, 55456, 55458, 0, 1, 49152, 53248, - 55296, 55424, 55456, 0, 1, 49152, 53248, 55296, - 55424, 55456, 55460, 0, 1, 49152, 53248, 55296, - 55424, 55456, 55460, 0, 1, 49152, 53248, 55296, - 55424, 55456, 55464, 55462, 0, 1, 49152, 53248, - 55296, 55424, 55456, 0, 1, 49152, 53248, 55296, - 55424, 55456, 55464, 0, 1, 49152, 53248, 55296, - 55424, 55456, 55464, 0, 1, 49152, 53248, 55296, - 55424, 55456, 55464, 55466, 0, 1, 49152, 53248, - 55296, 55424, 55456, 55464, 0, 1, 49152, 53248, - 55296, 55424, 55456, 55472, 55468, 0, 1, 49152, - 53248, 55296, 55424, 55456, 55472, 55468, 0, 1, - 49152, 53248, 55296, 55424, 55456, 55472, 55473, 55470, - 0, 1, 49152, 53248, 55296, 55424, 55456, 0, - 1, 49152, 53248, 55296, 55424, 55488, 55472, 0, - 1, 49152, 53248, 55296, 55424, 55488, 55472, 0, - 1, 49152, 53248, 55296, 55424, 55488, 55472, 55474, - 0, 1, 49152, 53248, 55296, 55424, 55488, 55472, - 0, 1, 49152, 53248, 55296, 55424, 55488, 55472, - 55476, 0, 1, 49152, 53248, 55296, 55424, 55488, - 55472, 55476, 0, 1, 49152, 53248, 55296, 55424, - 55488, 55472, 55480, 55478, 0, 1, 49152, 53248, - 55296, 55424, 55488, 55472, 0, 1, 49152, 53248, - 55296, 55424, 55488, 55489, 55480, 0, 1, 49152, - 53248, 55296, 55424, 55488, 55489, 55480, 0, 1, - 49152, 53248, 55296, 55424, 55488, 55489, 55480, 55482, - 0, 1, 49152, 53248, 55296, 55424, 55488, 55489, - 55480, 0, 1, 49152, 53248, 55296, 55424, 55488, - 55489, 55480, 55484, 0, 1, 49152, 53248, 55296, - 55424, 55488, 55489, 55491, 55484, 0, 1, 49152, - 53248, 55296, 55424, 55488, 55489, 55491, 55484, 55486, - 0, 1, 49152, 53248, 55296, 55424, 0, 1, - 49152, 53248, 55296, 55552, 55488, 0, 1, 49152, - 53248, 55296, 55552, 55488, 0, 1, 49152, 53248, - 55296, 55552, 55488, 55490, 0, 1, 49152, 53248, - 55296, 55552, 55488, 0, 1, 49152, 53248, 55296, - 55552, 55488, 55492, 0, 1, 49152, 53248, 55296, - 55552, 55488, 55492, 0, 1, 49152, 53248, 55296, - 55552, 55488, 55496, 55494, 0, 1, 49152, 53248, - 55296, 55552, 55488, 0, 1, 49152, 53248, 55296, - 55552, 55488, 55496, 0, 1, 49152, 53248, 55296, - 55552, 55488, 55496, 0, 1, 49152, 53248, 55296, - 55552, 55488, 55496, 55498, 0, 1, 49152, 53248, - 55296, 55552, 55488, 55496, 0, 1, 49152, 53248, - 55296, 55552, 55488, 55504, 55500, 0, 1, 49152, - 53248, 55296, 55552, 55488, 55504, 55500, 0, 1, - 49152, 53248, 55296, 55552, 55488, 55504, 55505, 55502, - 0, 1, 49152, 53248, 55296, 55552, 55488, 0, - 1, 49152, 53248, 55296, 55552, 55488, 55504, 0, - 1, 49152, 53248, 55296, 55552, 55488, 55504, 0, - 1, 49152, 53248, 55296, 55552, 55488, 55504, 55506, - 0, 1, 49152, 53248, 55296, 55552, 55488, 55504, - 0, 1, 49152, 53248, 55296, 55552, 55488, 55504, - 55508, 0, 1, 49152, 53248, 55296, 55552, 55488, - 55504, 55508, 0, 1, 49152, 53248, 55296, 55552, - 55488, 55504, 55512, 55510, 0, 1, 49152, 53248, - 55296, 55552, 55488, 55504, 0, 1, 49152, 53248, - 55296, 55552, 55488, 55520, 55512, 0, 1, 49152, - 53248, 55296, 55552, 55488, 55520, 55512, 0, 1, - 49152, 53248, 55296, 55552, 55488, 55520, 55512, 55514, - 0, 1, 49152, 53248, 55296, 55552, 55488, 55520, - 55512, 0, 1, 49152, 53248, 55296, 55552, 55488, - 55520, 55521, 55516, 0, 1, 49152, 53248, 55296, - 55552, 55488, 55520, 55521, 55516, 0, 1, 49152, - 53248, 55296, 55552, 55488, 55520, 55521, 55516, 55518, - 0, 1, 49152, 53248, 55296, 55552, 55488, 0, - 1, 49152, 53248, 55296, 55552, 55553, 55520, 0, - 1, 49152, 53248, 55296, 55552, 55553, 55520, 0, - 1, 49152, 53248, 55296, 55552, 55553, 55520, 55522, - 0, 1, 49152, 53248, 55296, 55552, 55553, 55520, - 0, 1, 49152, 53248, 55296, 55552, 55553, 55520, - 55524, 0, 1, 49152, 53248, 55296, 55552, 55553, - 55520, 55524, 0, 1, 49152, 53248, 55296, 55552, - 55553, 55520, 55528, 55526, 0, 1, 49152, 53248, - 55296, 55552, 55553, 55520, 0, 1, 49152, 53248, - 55296, 55552, 55553, 55520, 55528, 0, 1, 49152, - 53248, 55296, 55552, 55553, 55520, 55528, 0, 1, - 49152, 53248, 55296, 55552, 55553, 55520, 55528, 55530, - 0, 1, 49152, 53248, 55296, 55552, 55553, 55520, - 55528, 0, 1, 49152, 53248, 55296, 55552, 55553, - 55520, 55536, 55532, 0, 1, 49152, 53248, 55296, - 55552, 55553, 55520, 55536, 55532, 0, 1, 49152, - 53248, 55296, 55552, 55553, 55520, 55536, 55537, 55534, - 0, 1, 49152, 53248, 55296, 55552, 55553, 55520, - 0, 1, 49152, 53248, 55296, 55552, 55553, 55520, - 55536, 0, 1, 49152, 53248, 55296, 55552, 55553, - 55555, 55536, 0, 1, 49152, 53248, 55296, 55552, - 55553, 55555, 55536, 55538, 0, 1, 49152, 53248, - 55296, 55552, 55553, 55555, 55536, 0, 1, 49152, - 53248, 55296, 55552, 55553, 55555, 55536, 55540, 0, - 1, 49152, 53248, 55296, 55552, 55553, 55555, 55536, - 55540, 0, 1, 49152, 53248, 55296, 55552, 55553, - 55555, 55536, 55544, 55542, 0, 1, 49152, 53248, - 55296, 55552, 55553, 55555, 55536, 0, 1, 49152, - 53248, 55296, 55552, 55553, 55555, 55536, 55544, 0, - 1, 49152, 53248, 55296, 55552, 55553, 55555, 55536, - 55544, 0, 1, 49152, 53248, 55296, 55552, 55553, - 55555, 55536, 55544, 55546, 0, 1, 49152, 53248, - 55296, 55552, 55553, 55555, 55559, 55544, 0, 1, - 49152, 53248, 55296, 55552, 55553, 55555, 55559, 55544, - 55548, 0, 1, 49152, 53248, 55296, 55552, 55553, - 55555, 55559, 55544, 55548, 0, 1, 49152, 53248, - 55296, 55552, 55553, 55555, 55559, 55544, 55548, 55550, - 0, 1, 49152, 53248, 55296, 0, 1, 49152, - 53248, 55296, 55552, 0, 1, 49152, 53248, 55296, - 55552, 0, 1, 49152, 53248, 55296, 55552, 55554, - 0, 1, 49152, 53248, 55296, 55552, 0, 1, - 49152, 53248, 55296, 55552, 55556, 0, 1, 49152, - 53248, 55296, 55552, 55556, 0, 1, 49152, 53248, - 55296, 55552, 55560, 55558, 0, 1, 49152, 53248, - 55296, 55552, 0, 1, 49152, 53248, 55296, 55552, - 55560, 0, 1, 49152, 53248, 55296, 55552, 55560, - 0, 1, 49152, 53248, 55296, 55552, 55560, 55562, - 0, 1, 49152, 53248, 55296, 55552, 55560, 0, - 1, 49152, 53248, 55296, 55552, 55568, 55564, 0, - 1, 49152, 53248, 55296, 55552, 55568, 55564, 0, - 1, 49152, 53248, 55296, 55552, 55568, 55569, 55566, - 0, 1, 49152, 53248, 55296, 55552, 0, 1, - 49152, 53248, 55296, 55552, 55568, 0, 1, 49152, - 53248, 55296, 55552, 55568, 0, 1, 49152, 53248, - 55296, 55552, 55568, 55570, 0, 1, 49152, 53248, - 55296, 55552, 55568, 0, 1, 49152, 53248, 55296, - 55552, 55568, 55572, 0, 1, 49152, 53248, 55296, - 55552, 55568, 55572, 0, 1, 49152, 53248, 55296, - 55552, 55568, 55576, 55574, 0, 1, 49152, 53248, - 55296, 55552, 55568, 0, 1, 49152, 53248, 55296, - 55552, 55584, 55576, 0, 1, 49152, 53248, 55296, - 55552, 55584, 55576, 0, 1, 49152, 53248, 55296, - 55552, 55584, 55576, 55578, 0, 1, 49152, 53248, - 55296, 55552, 55584, 55576, 0, 1, 49152, 53248, - 55296, 55552, 55584, 55585, 55580, 0, 1, 49152, - 53248, 55296, 55552, 55584, 55585, 55580, 0, 1, - 49152, 53248, 55296, 55552, 55584, 55585, 55580, 55582, - 0, 1, 49152, 53248, 55296, 55552, 0, 1, - 49152, 53248, 55296, 55552, 55584, 0, 1, 49152, - 53248, 55296, 55552, 55584, 0, 1, 49152, 53248, - 55296, 55552, 55584, 55586, 0, 1, 49152, 53248, - 55296, 55552, 55584, 0, 1, 49152, 53248, 55296, - 55552, 55584, 55588, 0, 1, 49152, 53248, 55296, - 55552, 55584, 55588, 0, 1, 49152, 53248, 55296, - 55552, 55584, 55592, 55590, 0, 1, 49152, 53248, - 55296, 55552, 55584, 0, 1, 49152, 53248, 55296, - 55552, 55584, 55592, 0, 1, 49152, 53248, 55296, - 55552, 55584, 55592, 0, 1, 49152, 53248, 55296, - 55552, 55584, 55592, 55594, 0, 1, 49152, 53248, - 55296, 55552, 55584, 55592, 0, 1, 49152, 53248, - 55296, 55552, 55584, 55600, 55596, 0, 1, 49152, - 53248, 55296, 55552, 55584, 55600, 55596, 0, 1, - 49152, 53248, 55296, 55552, 55584, 55600, 55601, 55598, - 0, 1, 49152, 53248, 55296, 55552, 55584, 0, - 1, 49152, 53248, 55296, 55552, 55616, 55600, 0, - 1, 49152, 53248, 55296, 55552, 55616, 55600, 0, - 1, 49152, 53248, 55296, 55552, 55616, 55600, 55602, - 0, 1, 49152, 53248, 55296, 55552, 55616, 55600, - 0, 1, 49152, 53248, 55296, 55552, 55616, 55600, - 55604, 0, 1, 49152, 53248, 55296, 55552, 55616, - 55600, 55604, 0, 1, 49152, 53248, 55296, 55552, - 55616, 55600, 55608, 55606, 0, 1, 49152, 53248, - 55296, 55552, 55616, 55600, 0, 1, 49152, 53248, - 55296, 55552, 55616, 55617, 55608, 0, 1, 49152, - 53248, 55296, 55552, 55616, 55617, 55608, 0, 1, - 49152, 53248, 55296, 55552, 55616, 55617, 55608, 55610, - 0, 1, 49152, 53248, 55296, 55552, 55616, 55617, - 55608, 0, 1, 49152, 53248, 55296, 55552, 55616, - 55617, 55608, 55612, 0, 1, 49152, 53248, 55296, - 55552, 55616, 55617, 55619, 55612, 0, 1, 49152, - 53248, 55296, 55552, 55616, 55617, 55619, 55612, 55614, - 0, 1, 49152, 53248, 55296, 55552, 0, 1, - 49152, 53248, 55296, 55552, 55616, 0, 1, 49152, - 53248, 55296, 55552, 55616, 0, 1, 49152, 53248, - 55296, 55552, 55616, 55618, 0, 1, 49152, 53248, - 55296, 55552, 55616, 0, 1, 49152, 53248, 55296, - 55552, 55616, 55620, 0, 1, 49152, 53248, 55296, - 55552, 55616, 55620, 0, 1, 49152, 53248, 55296, - 55552, 55616, 55624, 55622, 0, 1, 49152, 53248, - 55296, 55552, 55616, 0, 1, 49152, 53248, 55296, - 55552, 55616, 55624, 0, 1, 49152, 53248, 55296, - 55552, 55616, 55624, 0, 1, 49152, 53248, 55296, - 55552, 55616, 55624, 55626, 0, 1, 49152, 53248, - 55296, 55552, 55616, 55624, 0, 1, 49152, 53248, - 55296, 55552, 55616, 55632, 55628, 0, 1, 49152, - 53248, 55296, 55552, 55616, 55632, 55628, 0, 1, - 49152, 53248, 55296, 55552, 55616, 55632, 55633, 55630, - 0, 1, 49152, 53248, 55296, 55552, 55616, 0, - 1, 49152, 53248, 55296, 55552, 55616, 55632, 0, - 1, 49152, 53248, 55296, 55552, 55616, 55632, 0, - 1, 49152, 53248, 55296, 55552, 55616, 55632, 55634, - 0, 1, 49152, 53248, 55296, 55552, 55616, 55632, - 0, 1, 49152, 53248, 55296, 55552, 55616, 55632, - 55636, 0, 1, 49152, 53248, 55296, 55552, 55616, - 55632, 55636, 0, 1, 49152, 53248, 55296, 55552, - 55616, 55632, 55640, 55638, 0, 1, 49152, 53248, - 55296, 55552, 55616, 55632, 0, 1, 49152, 53248, - 55296, 55552, 55616, 55648, 55640, 0, 1, 49152, - 53248, 55296, 55552, 55616, 55648, 55640, 0, 1, - 49152, 53248, 55296, 55552, 55616, 55648, 55640, 55642, - 0, 1, 49152, 53248, 55296, 55552, 55616, 55648, - 55640, 0, 1, 49152, 53248, 55296, 55552, 55616, - 55648, 55649, 55644, 0, 1, 49152, 53248, 55296, - 55552, 55616, 55648, 55649, 55644, 0, 1, 49152, - 53248, 55296, 55552, 55616, 55648, 55649, 55644, 55646, - 0, 1, 49152, 53248, 55296, 55552, 55616, 0, - 1, 49152, 53248, 55296, 55552, 55680, 55648, 0, - 1, 49152, 53248, 55296, 55552, 55680, 55648, 0, - 1, 49152, 53248, 55296, 55552, 55680, 55648, 55650, - 0, 1, 49152, 53248, 55296, 55552, 55680, 55648, - 0, 1, 49152, 53248, 55296, 55552, 55680, 55648, - 55652, 0, 1, 49152, 53248, 55296, 55552, 55680, - 55648, 55652, 0, 1, 49152, 53248, 55296, 55552, - 55680, 55648, 55656, 55654, 0, 1, 49152, 53248, - 55296, 55552, 55680, 55648, 0, 1, 49152, 53248, - 55296, 55552, 55680, 55648, 55656, 0, 1, 49152, - 53248, 55296, 55552, 55680, 55648, 55656, 0, 1, - 49152, 53248, 55296, 55552, 55680, 55648, 55656, 55658, - 0, 1, 49152, 53248, 55296, 55552, 55680, 55648, - 55656, 0, 1, 49152, 53248, 55296, 55552, 55680, - 55648, 55664, 55660, 0, 1, 49152, 53248, 55296, - 55552, 55680, 55648, 55664, 55660, 0, 1, 49152, - 53248, 55296, 55552, 55680, 55648, 55664, 55665, 55662, - 0, 1, 49152, 53248, 55296, 55552, 55680, 55648, - 0, 1, 49152, 53248, 55296, 55552, 55680, 55681, - 55664, 0, 1, 49152, 53248, 55296, 55552, 55680, - 55681, 55664, 0, 1, 49152, 53248, 55296, 55552, - 55680, 55681, 55664, 55666, 0, 1, 49152, 53248, - 55296, 55552, 55680, 55681, 55664, 0, 1, 49152, - 53248, 55296, 55552, 55680, 55681, 55664, 55668, 0, - 1, 49152, 53248, 55296, 55552, 55680, 55681, 55664, - 55668, 0, 1, 49152, 53248, 55296, 55552, 55680, - 55681, 55664, 55672, 55670, 0, 1, 49152, 53248, - 55296, 55552, 55680, 55681, 55664, 0, 1, 49152, - 53248, 55296, 55552, 55680, 55681, 55664, 55672, 0, - 1, 49152, 53248, 55296, 55552, 55680, 55681, 55683, - 55672, 0, 1, 49152, 53248, 55296, 55552, 55680, - 55681, 55683, 55672, 55674, 0, 1, 49152, 53248, - 55296, 55552, 55680, 55681, 55683, 55672, 0, 1, - 49152, 53248, 55296, 55552, 55680, 55681, 55683, 55672, - 55676, 0, 1, 49152, 53248, 55296, 55552, 55680, - 55681, 55683, 55672, 55676, 0, 1, 49152, 53248, - 55296, 55552, 55680, 55681, 55683, 55672, 55676, 55678, - 0, 1, 49152, 53248, 55296, 55552, 0, 1, - 49152, 53248, 55296, 55808, 55680, 0, 1, 49152, - 53248, 55296, 55808, 55680, 0, 1, 49152, 53248, - 55296, 55808, 55680, 55682, 0, 1, 49152, 53248, - 55296, 55808, 55680, 0, 1, 49152, 53248, 55296, - 55808, 55680, 55684, 0, 1, 49152, 53248, 55296, - 55808, 55680, 55684, 0, 1, 49152, 53248, 55296, - 55808, 55680, 55688, 55686, 0, 1, 49152, 53248, - 55296, 55808, 55680, 0, 1, 49152, 53248, 55296, - 55808, 55680, 55688, 0, 1, 49152, 53248, 55296, - 55808, 55680, 55688, 0, 1, 49152, 53248, 55296, - 55808, 55680, 55688, 55690, 0, 1, 49152, 53248, - 55296, 55808, 55680, 55688, 0, 1, 49152, 53248, - 55296, 55808, 55680, 55696, 55692, 0, 1, 49152, - 53248, 55296, 55808, 55680, 55696, 55692, 0, 1, - 49152, 53248, 55296, 55808, 55680, 55696, 55697, 55694, - 0, 1, 49152, 53248, 55296, 55808, 55680, 0, - 1, 49152, 53248, 55296, 55808, 55680, 55696, 0, - 1, 49152, 53248, 55296, 55808, 55680, 55696, 0, - 1, 49152, 53248, 55296, 55808, 55680, 55696, 55698, - 0, 1, 49152, 53248, 55296, 55808, 55680, 55696, - 0, 1, 49152, 53248, 55296, 55808, 55680, 55696, - 55700, 0, 1, 49152, 53248, 55296, 55808, 55680, - 55696, 55700, 0, 1, 49152, 53248, 55296, 55808, - 55680, 55696, 55704, 55702, 0, 1, 49152, 53248, - 55296, 55808, 55680, 55696, 0, 1, 49152, 53248, - 55296, 55808, 55680, 55712, 55704, 0, 1, 49152, - 53248, 55296, 55808, 55680, 55712, 55704, 0, 1, - 49152, 53248, 55296, 55808, 55680, 55712, 55704, 55706, - 0, 1, 49152, 53248, 55296, 55808, 55680, 55712, - 55704, 0, 1, 49152, 53248, 55296, 55808, 55680, - 55712, 55713, 55708, 0, 1, 49152, 53248, 55296, - 55808, 55680, 55712, 55713, 55708, 0, 1, 49152, - 53248, 55296, 55808, 55680, 55712, 55713, 55708, 55710, - 0, 1, 49152, 53248, 55296, 55808, 55680, 0, - 1, 49152, 53248, 55296, 55808, 55680, 55712, 0, - 1, 49152, 53248, 55296, 55808, 55680, 55712, 0, - 1, 49152, 53248, 55296, 55808, 55680, 55712, 55714, - 0, 1, 49152, 53248, 55296, 55808, 55680, 55712, - 0, 1, 49152, 53248, 55296, 55808, 55680, 55712, - 55716, 0, 1, 49152, 53248, 55296, 55808, 55680, - 55712, 55716, 0, 1, 49152, 53248, 55296, 55808, - 55680, 55712, 55720, 55718, 0, 1, 49152, 53248, - 55296, 55808, 55680, 55712, 0, 1, 49152, 53248, - 55296, 55808, 55680, 55712, 55720, 0, 1, 49152, - 53248, 55296, 55808, 55680, 55712, 55720, 0, 1, - 49152, 53248, 55296, 55808, 55680, 55712, 55720, 55722, - 0, 1, 49152, 53248, 55296, 55808, 55680, 55712, - 55720, 0, 1, 49152, 53248, 55296, 55808, 55680, - 55712, 55728, 55724, 0, 1, 49152, 53248, 55296, - 55808, 55680, 55712, 55728, 55724, 0, 1, 49152, - 53248, 55296, 55808, 55680, 55712, 55728, 55729, 55726, - 0, 1, 49152, 53248, 55296, 55808, 55680, 55712, - 0, 1, 49152, 53248, 55296, 55808, 55680, 55744, - 55728, 0, 1, 49152, 53248, 55296, 55808, 55680, - 55744, 55728, 0, 1, 49152, 53248, 55296, 55808, - 55680, 55744, 55728, 55730, 0, 1, 49152, 53248, - 55296, 55808, 55680, 55744, 55728, 0, 1, 49152, - 53248, 55296, 55808, 55680, 55744, 55728, 55732, 0, - 1, 49152, 53248, 55296, 55808, 55680, 55744, 55728, - 55732, 0, 1, 49152, 53248, 55296, 55808, 55680, - 55744, 55728, 55736, 55734, 0, 1, 49152, 53248, - 55296, 55808, 55680, 55744, 55728, 0, 1, 49152, - 53248, 55296, 55808, 55680, 55744, 55745, 55736, 0, - 1, 49152, 53248, 55296, 55808, 55680, 55744, 55745, - 55736, 0, 1, 49152, 53248, 55296, 55808, 55680, - 55744, 55745, 55736, 55738, 0, 1, 49152, 53248, - 55296, 55808, 55680, 55744, 55745, 55736, 0, 1, - 49152, 53248, 55296, 55808, 55680, 55744, 55745, 55736, - 55740, 0, 1, 49152, 53248, 55296, 55808, 55680, - 55744, 55745, 55747, 55740, 0, 1, 49152, 53248, - 55296, 55808, 55680, 55744, 55745, 55747, 55740, 55742, - 0, 1, 49152, 53248, 55296, 55808, 55680, 0, - 1, 49152, 53248, 55296, 55808, 55809, 55744, 0, - 1, 49152, 53248, 55296, 55808, 55809, 55744, 0, - 1, 49152, 53248, 55296, 55808, 55809, 55744, 55746, - 0, 1, 49152, 53248, 55296, 55808, 55809, 55744, - 0, 1, 49152, 53248, 55296, 55808, 55809, 55744, - 55748, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55744, 55748, 0, 1, 49152, 53248, 55296, 55808, - 55809, 55744, 55752, 55750, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55744, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55744, 55752, 0, 1, 49152, - 53248, 55296, 55808, 55809, 55744, 55752, 0, 1, - 49152, 53248, 55296, 55808, 55809, 55744, 55752, 55754, - 0, 1, 49152, 53248, 55296, 55808, 55809, 55744, - 55752, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55744, 55760, 55756, 0, 1, 49152, 53248, 55296, - 55808, 55809, 55744, 55760, 55756, 0, 1, 49152, - 53248, 55296, 55808, 55809, 55744, 55760, 55761, 55758, - 0, 1, 49152, 53248, 55296, 55808, 55809, 55744, - 0, 1, 49152, 53248, 55296, 55808, 55809, 55744, - 55760, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55744, 55760, 0, 1, 49152, 53248, 55296, 55808, - 55809, 55744, 55760, 55762, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55744, 55760, 0, 1, 49152, - 53248, 55296, 55808, 55809, 55744, 55760, 55764, 0, - 1, 49152, 53248, 55296, 55808, 55809, 55744, 55760, - 55764, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55744, 55760, 55768, 55766, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55744, 55760, 0, 1, 49152, - 53248, 55296, 55808, 55809, 55744, 55776, 55768, 0, - 1, 49152, 53248, 55296, 55808, 55809, 55744, 55776, - 55768, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55744, 55776, 55768, 55770, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55744, 55776, 55768, 0, 1, - 49152, 53248, 55296, 55808, 55809, 55744, 55776, 55777, - 55772, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55744, 55776, 55777, 55772, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55744, 55776, 55777, 55772, 55774, - 0, 1, 49152, 53248, 55296, 55808, 55809, 55744, - 0, 1, 49152, 53248, 55296, 55808, 55809, 55744, - 55776, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55811, 55776, 0, 1, 49152, 53248, 55296, 55808, - 55809, 55811, 55776, 55778, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55811, 55776, 0, 1, 49152, - 53248, 55296, 55808, 55809, 55811, 55776, 55780, 0, - 1, 49152, 53248, 55296, 55808, 55809, 55811, 55776, - 55780, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55811, 55776, 55784, 55782, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55811, 55776, 0, 1, 49152, - 53248, 55296, 55808, 55809, 55811, 55776, 55784, 0, - 1, 49152, 53248, 55296, 55808, 55809, 55811, 55776, - 55784, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55811, 55776, 55784, 55786, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55811, 55776, 55784, 0, 1, - 49152, 53248, 55296, 55808, 55809, 55811, 55776, 55792, - 55788, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55811, 55776, 55792, 55788, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55811, 55776, 55792, 55793, 55790, - 0, 1, 49152, 53248, 55296, 55808, 55809, 55811, - 55776, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55811, 55776, 55792, 0, 1, 49152, 53248, 55296, - 55808, 55809, 55811, 55776, 55792, 0, 1, 49152, - 53248, 55296, 55808, 55809, 55811, 55776, 55792, 55794, - 0, 1, 49152, 53248, 55296, 55808, 55809, 55811, - 55815, 55792, 0, 1, 49152, 53248, 55296, 55808, - 55809, 55811, 55815, 55792, 55796, 0, 1, 49152, - 53248, 55296, 55808, 55809, 55811, 55815, 55792, 55796, - 0, 1, 49152, 53248, 55296, 55808, 55809, 55811, - 55815, 55792, 55800, 55798, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55811, 55815, 55792, 0, 1, - 49152, 53248, 55296, 55808, 55809, 55811, 55815, 55792, - 55800, 0, 1, 49152, 53248, 55296, 55808, 55809, - 55811, 55815, 55792, 55800, 0, 1, 49152, 53248, - 55296, 55808, 55809, 55811, 55815, 55792, 55800, 55802, - 0, 1, 49152, 53248, 55296, 55808, 55809, 55811, - 55815, 55792, 55800, 0, 1, 49152, 53248, 55296, - 55808, 55809, 55811, 55815, 55792, 55800, 55804, 0, - 1, 49152, 53248, 55296, 55808, 55809, 55811, 55815, - 55792, 55800, 55804, 0, 1, 49152, 53248, 55296, - 55808, 55809, 55811, 55815, 55792, 55800, 55804, 55806, - 0, 1, 49152, 53248, 55296, 0, 1, 49152, - 53248, 55296, 55808, 0, 1, 49152, 53248, 55296, - 55808, 0, 1, 49152, 53248, 55296, 55808, 55810, - 0, 1, 49152, 53248, 55296, 55808, 0, 1, - 49152, 53248, 55296, 55808, 55812, 0, 1, 49152, - 53248, 55296, 55808, 55812, 0, 1, 49152, 53248, - 55296, 55808, 55816, 55814, 0, 1, 49152, 53248, - 55296, 55808, 0, 1, 49152, 53248, 55296, 55808, - 55816, 0, 1, 49152, 53248, 55296, 55808, 55816, - 0, 1, 49152, 53248, 55296, 55808, 55816, 55818, - 0, 1, 49152, 53248, 55296, 55808, 55816, 0, - 1, 49152, 53248, 55296, 55808, 55824, 55820, 0, - 1, 49152, 53248, 55296, 55808, 55824, 55820, 0, - 1, 49152, 53248, 55296, 55808, 55824, 55825, 55822, - 0, 1, 49152, 53248, 55296, 55808, 0, 1, - 49152, 53248, 55296, 55808, 55824, 0, 1, 49152, - 53248, 55296, 55808, 55824, 0, 1, 49152, 53248, - 55296, 55808, 55824, 55826, 0, 1, 49152, 53248, - 55296, 55808, 55824, 0, 1, 49152, 53248, 55296, - 55808, 55824, 55828, 0, 1, 49152, 53248, 55296, - 55808, 55824, 55828, 0, 1, 49152, 53248, 55296, - 55808, 55824, 55832, 55830, 0, 1, 49152, 53248, - 55296, 55808, 55824, 0, 1, 49152, 53248, 55296, - 55808, 55840, 55832, 0, 1, 49152, 53248, 55296, - 55808, 55840, 55832, 0, 1, 49152, 53248, 55296, - 55808, 55840, 55832, 55834, 0, 1, 49152, 53248, - 55296, 55808, 55840, 55832, 0, 1, 49152, 53248, - 55296, 55808, 55840, 55841, 55836, 0, 1, 49152, - 53248, 55296, 55808, 55840, 55841, 55836, 0, 1, - 49152, 53248, 55296, 55808, 55840, 55841, 55836, 55838, - 0, 1, 49152, 53248, 55296, 55808, 0, 1, - 49152, 53248, 55296, 55808, 55840, 0, 1, 49152, - 53248, 55296, 55808, 55840, 0, 1, 49152, 53248, - 55296, 55808, 55840, 55842, 0, 1, 49152, 53248, - 55296, 55808, 55840, 0, 1, 49152, 53248, 55296, - 55808, 55840, 55844, 0, 1, 49152, 53248, 55296, - 55808, 55840, 55844, 0, 1, 49152, 53248, 55296, - 55808, 55840, 55848, 55846, 0, 1, 49152, 53248, - 55296, 55808, 55840, 0, 1, 49152, 53248, 55296, - 55808, 55840, 55848, 0, 1, 49152, 53248, 55296, - 55808, 55840, 55848, 0, 1, 49152, 53248, 55296, - 55808, 55840, 55848, 55850, 0, 1, 49152, 53248, - 55296, 55808, 55840, 55848, 0, 1, 49152, 53248, - 55296, 55808, 55840, 55856, 55852, 0, 1, 49152, - 53248, 55296, 55808, 55840, 55856, 55852, 0, 1, - 49152, 53248, 55296, 55808, 55840, 55856, 55857, 55854, - 0, 1, 49152, 53248, 55296, 55808, 55840, 0, - 1, 49152, 53248, 55296, 55808, 55872, 55856, 0, - 1, 49152, 53248, 55296, 55808, 55872, 55856, 0, - 1, 49152, 53248, 55296, 55808, 55872, 55856, 55858, - 0, 1, 49152, 53248, 55296, 55808, 55872, 55856, - 0, 1, 49152, 53248, 55296, 55808, 55872, 55856, - 55860, 0, 1, 49152, 53248, 55296, 55808, 55872, - 55856, 55860, 0, 1, 49152, 53248, 55296, 55808, - 55872, 55856, 55864, 55862, 0, 1, 49152, 53248, - 55296, 55808, 55872, 55856, 0, 1, 49152, 53248, - 55296, 55808, 55872, 55873, 55864, 0, 1, 49152, - 53248, 55296, 55808, 55872, 55873, 55864, 0, 1, - 49152, 53248, 55296, 55808, 55872, 55873, 55864, 55866, - 0, 1, 49152, 53248, 55296, 55808, 55872, 55873, - 55864, 0, 1, 49152, 53248, 55296, 55808, 55872, - 55873, 55864, 55868, 0, 1, 49152, 53248, 55296, - 55808, 55872, 55873, 55875, 55868, 0, 1, 49152, - 53248, 55296, 55808, 55872, 55873, 55875, 55868, 55870, - 0, 1, 49152, 53248, 55296, 55808, 0, 1, - 49152, 53248, 55296, 55808, 55872, 0, 1, 49152, - 53248, 55296, 55808, 55872, 0, 1, 49152, 53248, - 55296, 55808, 55872, 55874, 0, 1, 49152, 53248, - 55296, 55808, 55872, 0, 1, 49152, 53248, 55296, - 55808, 55872, 55876, 0, 1, 49152, 53248, 55296, - 55808, 55872, 55876, 0, 1, 49152, 53248, 55296, - 55808, 55872, 55880, 55878, 0, 1, 49152, 53248, - 55296, 55808, 55872, 0, 1, 49152, 53248, 55296, - 55808, 55872, 55880, 0, 1, 49152, 53248, 55296, - 55808, 55872, 55880, 0, 1, 49152, 53248, 55296, - 55808, 55872, 55880, 55882, 0, 1, 49152, 53248, - 55296, 55808, 55872, 55880, 0, 1, 49152, 53248, - 55296, 55808, 55872, 55888, 55884, 0, 1, 49152, - 53248, 55296, 55808, 55872, 55888, 55884, 0, 1, - 49152, 53248, 55296, 55808, 55872, 55888, 55889, 55886, - 0, 1, 49152, 53248, 55296, 55808, 55872, 0, - 1, 49152, 53248, 55296, 55808, 55872, 55888, 0, - 1, 49152, 53248, 55296, 55808, 55872, 55888, 0, - 1, 49152, 53248, 55296, 55808, 55872, 55888, 55890, - 0, 1, 49152, 53248, 55296, 55808, 55872, 55888, - 0, 1, 49152, 53248, 55296, 55808, 55872, 55888, - 55892, 0, 1, 49152, 53248, 55296, 55808, 55872, - 55888, 55892, 0, 1, 49152, 53248, 55296, 55808, - 55872, 55888, 55896, 55894, 0, 1, 49152, 53248, - 55296, 55808, 55872, 55888, 0, 1, 49152, 53248, - 55296, 55808, 55872, 55904, 55896, 0, 1, 49152, - 53248, 55296, 55808, 55872, 55904, 55896, 0, 1, - 49152, 53248, 55296, 55808, 55872, 55904, 55896, 55898, - 0, 1, 49152, 53248, 55296, 55808, 55872, 55904, - 55896, 0, 1, 49152, 53248, 55296, 55808, 55872, - 55904, 55905, 55900, 0, 1, 49152, 53248, 55296, - 55808, 55872, 55904, 55905, 55900, 0, 1, 49152, - 53248, 55296, 55808, 55872, 55904, 55905, 55900, 55902, - 0, 1, 49152, 53248, 55296, 55808, 55872, 0, - 1, 49152, 53248, 55296, 55808, 55936, 55904, 0, - 1, 49152, 53248, 55296, 55808, 55936, 55904, 0, - 1, 49152, 53248, 55296, 55808, 55936, 55904, 55906, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55904, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55904, - 55908, 0, 1, 49152, 53248, 55296, 55808, 55936, - 55904, 55908, 0, 1, 49152, 53248, 55296, 55808, - 55936, 55904, 55912, 55910, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55904, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55904, 55912, 0, 1, 49152, - 53248, 55296, 55808, 55936, 55904, 55912, 0, 1, - 49152, 53248, 55296, 55808, 55936, 55904, 55912, 55914, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55904, - 55912, 0, 1, 49152, 53248, 55296, 55808, 55936, - 55904, 55920, 55916, 0, 1, 49152, 53248, 55296, - 55808, 55936, 55904, 55920, 55916, 0, 1, 49152, - 53248, 55296, 55808, 55936, 55904, 55920, 55921, 55918, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55904, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55937, - 55920, 0, 1, 49152, 53248, 55296, 55808, 55936, - 55937, 55920, 0, 1, 49152, 53248, 55296, 55808, - 55936, 55937, 55920, 55922, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55937, 55920, 0, 1, 49152, - 53248, 55296, 55808, 55936, 55937, 55920, 55924, 0, - 1, 49152, 53248, 55296, 55808, 55936, 55937, 55920, - 55924, 0, 1, 49152, 53248, 55296, 55808, 55936, - 55937, 55920, 55928, 55926, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55937, 55920, 0, 1, 49152, - 53248, 55296, 55808, 55936, 55937, 55920, 55928, 0, - 1, 49152, 53248, 55296, 55808, 55936, 55937, 55939, - 55928, 0, 1, 49152, 53248, 55296, 55808, 55936, - 55937, 55939, 55928, 55930, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55937, 55939, 55928, 0, 1, - 49152, 53248, 55296, 55808, 55936, 55937, 55939, 55928, - 55932, 0, 1, 49152, 53248, 55296, 55808, 55936, - 55937, 55939, 55928, 55932, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55937, 55939, 55928, 55932, 55934, - 0, 1, 49152, 53248, 55296, 55808, 0, 1, - 49152, 53248, 55296, 55808, 55936, 0, 1, 49152, - 53248, 55296, 55808, 55936, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55938, 0, 1, 49152, 53248, - 55296, 55808, 55936, 0, 1, 49152, 53248, 55296, - 55808, 55936, 55940, 0, 1, 49152, 53248, 55296, - 55808, 55936, 55940, 0, 1, 49152, 53248, 55296, - 55808, 55936, 55944, 55942, 0, 1, 49152, 53248, - 55296, 55808, 55936, 0, 1, 49152, 53248, 55296, - 55808, 55936, 55944, 0, 1, 49152, 53248, 55296, - 55808, 55936, 55944, 0, 1, 49152, 53248, 55296, - 55808, 55936, 55944, 55946, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55944, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55952, 55948, 0, 1, 49152, - 53248, 55296, 55808, 55936, 55952, 55948, 0, 1, - 49152, 53248, 55296, 55808, 55936, 55952, 55953, 55950, - 0, 1, 49152, 53248, 55296, 55808, 55936, 0, - 1, 49152, 53248, 55296, 55808, 55936, 55952, 0, - 1, 49152, 53248, 55296, 55808, 55936, 55952, 0, - 1, 49152, 53248, 55296, 55808, 55936, 55952, 55954, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55952, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55952, - 55956, 0, 1, 49152, 53248, 55296, 55808, 55936, - 55952, 55956, 0, 1, 49152, 53248, 55296, 55808, - 55936, 55952, 55960, 55958, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55952, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55968, 55960, 0, 1, 49152, - 53248, 55296, 55808, 55936, 55968, 55960, 0, 1, - 49152, 53248, 55296, 55808, 55936, 55968, 55960, 55962, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55968, - 55960, 0, 1, 49152, 53248, 55296, 55808, 55936, - 55968, 55969, 55964, 0, 1, 49152, 53248, 55296, - 55808, 55936, 55968, 55969, 55964, 0, 1, 49152, - 53248, 55296, 55808, 55936, 55968, 55969, 55964, 55966, - 0, 1, 49152, 53248, 55296, 55808, 55936, 0, - 1, 49152, 53248, 55296, 55808, 55936, 55968, 0, - 1, 49152, 53248, 55296, 55808, 55936, 55968, 0, - 1, 49152, 53248, 55296, 55808, 55936, 55968, 55970, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55968, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55968, - 55972, 0, 1, 49152, 53248, 55296, 55808, 55936, - 55968, 55972, 0, 1, 49152, 53248, 55296, 55808, - 55936, 55968, 55976, 55974, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55968, 0, 1, 49152, 53248, - 55296, 55808, 55936, 55968, 55976, 0, 1, 49152, - 53248, 55296, 55808, 55936, 55968, 55976, 0, 1, - 49152, 53248, 55296, 55808, 55936, 55968, 55976, 55978, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55968, - 55976, 0, 1, 49152, 53248, 55296, 55808, 55936, - 55968, 55984, 55980, 0, 1, 49152, 53248, 55296, - 55808, 55936, 55968, 55984, 55980, 0, 1, 49152, - 53248, 55296, 55808, 55936, 55968, 55984, 55985, 55982, - 0, 1, 49152, 53248, 55296, 55808, 55936, 55968, - 0, 1, 49152, 53248, 55296, 55808, 55936, 56000, - 55984, 0, 1, 49152, 53248, 55296, 55808, 55936, - 56000, 55984, 0, 1, 49152, 53248, 55296, 55808, - 55936, 56000, 55984, 55986, 0, 1, 49152, 53248, - 55296, 55808, 55936, 56000, 55984, 0, 1, 49152, - 53248, 55296, 55808, 55936, 56000, 55984, 55988, 0, - 1, 49152, 53248, 55296, 55808, 55936, 56000, 55984, - 55988, 0, 1, 49152, 53248, 55296, 55808, 55936, - 56000, 55984, 55992, 55990, 0, 1, 49152, 53248, - 55296, 55808, 55936, 56000, 55984, 0, 1, 49152, - 53248, 55296, 55808, 55936, 56000, 56001, 55992, 0, - 1, 49152, 53248, 55296, 55808, 55936, 56000, 56001, - 55992, 0, 1, 49152, 53248, 55296, 55808, 55936, - 56000, 56001, 55992, 55994, 0, 1, 49152, 53248, - 55296, 55808, 55936, 56000, 56001, 55992, 0, 1, - 49152, 53248, 55296, 55808, 55936, 56000, 56001, 55992, - 55996, 0, 1, 49152, 53248, 55296, 55808, 55936, - 56000, 56001, 56003, 55996, 0, 1, 49152, 53248, - 55296, 55808, 55936, 56000, 56001, 56003, 55996, 55998, - 0, 1, 49152, 53248, 55296, 55808, 55936, 0, - 1, 49152, 53248, 55296, 55808, 56064, 56000, 0, - 1, 49152, 53248, 55296, 55808, 56064, 56000, 0, - 1, 49152, 53248, 55296, 55808, 56064, 56000, 56002, - 0, 1, 49152, 53248, 55296, 55808, 56064, 56000, - 0, 1, 49152, 53248, 55296, 55808, 56064, 56000, - 56004, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56000, 56004, 0, 1, 49152, 53248, 55296, 55808, - 56064, 56000, 56008, 56006, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56000, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56000, 56008, 0, 1, 49152, - 53248, 55296, 55808, 56064, 56000, 56008, 0, 1, - 49152, 53248, 55296, 55808, 56064, 56000, 56008, 56010, - 0, 1, 49152, 53248, 55296, 55808, 56064, 56000, - 56008, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56000, 56016, 56012, 0, 1, 49152, 53248, 55296, - 55808, 56064, 56000, 56016, 56012, 0, 1, 49152, - 53248, 55296, 55808, 56064, 56000, 56016, 56017, 56014, - 0, 1, 49152, 53248, 55296, 55808, 56064, 56000, - 0, 1, 49152, 53248, 55296, 55808, 56064, 56000, - 56016, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56000, 56016, 0, 1, 49152, 53248, 55296, 55808, - 56064, 56000, 56016, 56018, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56000, 56016, 0, 1, 49152, - 53248, 55296, 55808, 56064, 56000, 56016, 56020, 0, - 1, 49152, 53248, 55296, 55808, 56064, 56000, 56016, - 56020, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56000, 56016, 56024, 56022, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56000, 56016, 0, 1, 49152, - 53248, 55296, 55808, 56064, 56000, 56032, 56024, 0, - 1, 49152, 53248, 55296, 55808, 56064, 56000, 56032, - 56024, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56000, 56032, 56024, 56026, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56000, 56032, 56024, 0, 1, - 49152, 53248, 55296, 55808, 56064, 56000, 56032, 56033, - 56028, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56000, 56032, 56033, 56028, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56000, 56032, 56033, 56028, 56030, - 0, 1, 49152, 53248, 55296, 55808, 56064, 56000, - 0, 1, 49152, 53248, 55296, 55808, 56064, 56065, - 56032, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56065, 56032, 0, 1, 49152, 53248, 55296, 55808, - 56064, 56065, 56032, 56034, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56065, 56032, 0, 1, 49152, - 53248, 55296, 55808, 56064, 56065, 56032, 56036, 0, - 1, 49152, 53248, 55296, 55808, 56064, 56065, 56032, - 56036, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56065, 56032, 56040, 56038, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56065, 56032, 0, 1, 49152, - 53248, 55296, 55808, 56064, 56065, 56032, 56040, 0, - 1, 49152, 53248, 55296, 55808, 56064, 56065, 56032, - 56040, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56065, 56032, 56040, 56042, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56065, 56032, 56040, 0, 1, - 49152, 53248, 55296, 55808, 56064, 56065, 56032, 56048, - 56044, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56065, 56032, 56048, 56044, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56065, 56032, 56048, 56049, 56046, - 0, 1, 49152, 53248, 55296, 55808, 56064, 56065, - 56032, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56065, 56032, 56048, 0, 1, 49152, 53248, 55296, - 55808, 56064, 56065, 56067, 56048, 0, 1, 49152, - 53248, 55296, 55808, 56064, 56065, 56067, 56048, 56050, - 0, 1, 49152, 53248, 55296, 55808, 56064, 56065, - 56067, 56048, 0, 1, 49152, 53248, 55296, 55808, - 56064, 56065, 56067, 56048, 56052, 0, 1, 49152, - 53248, 55296, 55808, 56064, 56065, 56067, 56048, 56052, - 0, 1, 49152, 53248, 55296, 55808, 56064, 56065, - 56067, 56048, 56056, 56054, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56065, 56067, 56048, 0, 1, - 49152, 53248, 55296, 55808, 56064, 56065, 56067, 56048, - 56056, 0, 1, 49152, 53248, 55296, 55808, 56064, - 56065, 56067, 56048, 56056, 0, 1, 49152, 53248, - 55296, 55808, 56064, 56065, 56067, 56048, 56056, 56058, - 0, 1, 49152, 53248, 55296, 55808, 56064, 56065, - 56067, 56071, 56056, 0, 1, 49152, 53248, 55296, - 55808, 56064, 56065, 56067, 56071, 56056, 56060, 0, - 1, 49152, 53248, 55296, 55808, 56064, 56065, 56067, - 56071, 56056, 56060, 0, 1, 49152, 53248, 55296, - 55808, 56064, 56065, 56067, 56071, 56056, 56060, 56062, - 0, 1, 49152, 53248, 55296, 55808, 0, 1, - 49152, 53248, 55296, 56320, 56064, 0, 1, 49152, - 53248, 55296, 56320, 56064, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56066, 0, 1, 49152, 53248, - 55296, 56320, 56064, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56068, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56068, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56072, 56070, 0, 1, 49152, 53248, - 55296, 56320, 56064, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56072, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56072, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56072, 56074, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56072, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56080, 56076, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56080, 56076, 0, 1, - 49152, 53248, 55296, 56320, 56064, 56080, 56081, 56078, - 0, 1, 49152, 53248, 55296, 56320, 56064, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56080, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56080, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56080, 56082, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56080, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56080, - 56084, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56080, 56084, 0, 1, 49152, 53248, 55296, 56320, - 56064, 56080, 56088, 56086, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56080, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56096, 56088, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56096, 56088, 0, 1, - 49152, 53248, 55296, 56320, 56064, 56096, 56088, 56090, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56096, - 56088, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56096, 56097, 56092, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56096, 56097, 56092, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56096, 56097, 56092, 56094, - 0, 1, 49152, 53248, 55296, 56320, 56064, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56096, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56096, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56096, 56098, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56096, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56096, - 56100, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56096, 56100, 0, 1, 49152, 53248, 55296, 56320, - 56064, 56096, 56104, 56102, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56096, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56096, 56104, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56096, 56104, 0, 1, - 49152, 53248, 55296, 56320, 56064, 56096, 56104, 56106, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56096, - 56104, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56096, 56112, 56108, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56096, 56112, 56108, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56096, 56112, 56113, 56110, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56096, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56128, - 56112, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56128, 56112, 0, 1, 49152, 53248, 55296, 56320, - 56064, 56128, 56112, 56114, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56128, 56112, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56128, 56112, 56116, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56128, 56112, - 56116, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56128, 56112, 56120, 56118, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56128, 56112, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56128, 56129, 56120, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56128, 56129, - 56120, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56128, 56129, 56120, 56122, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56128, 56129, 56120, 0, 1, - 49152, 53248, 55296, 56320, 56064, 56128, 56129, 56120, - 56124, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56128, 56129, 56131, 56124, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56128, 56129, 56131, 56124, 56126, - 0, 1, 49152, 53248, 55296, 56320, 56064, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56128, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56128, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56128, 56130, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56128, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56128, - 56132, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56128, 56132, 0, 1, 49152, 53248, 55296, 56320, - 56064, 56128, 56136, 56134, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56128, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56128, 56136, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56128, 56136, 0, 1, - 49152, 53248, 55296, 56320, 56064, 56128, 56136, 56138, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56128, - 56136, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56128, 56144, 56140, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56128, 56144, 56140, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56128, 56144, 56145, 56142, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56128, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56128, - 56144, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56128, 56144, 0, 1, 49152, 53248, 55296, 56320, - 56064, 56128, 56144, 56146, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56128, 56144, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56128, 56144, 56148, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56128, 56144, - 56148, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56128, 56144, 56152, 56150, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56128, 56144, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56128, 56160, 56152, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56128, 56160, - 56152, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56128, 56160, 56152, 56154, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56128, 56160, 56152, 0, 1, - 49152, 53248, 55296, 56320, 56064, 56128, 56160, 56161, - 56156, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56128, 56160, 56161, 56156, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56128, 56160, 56161, 56156, 56158, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56128, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56192, - 56160, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56192, 56160, 0, 1, 49152, 53248, 55296, 56320, - 56064, 56192, 56160, 56162, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56192, 56160, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56192, 56160, 56164, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56192, 56160, - 56164, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56192, 56160, 56168, 56166, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56192, 56160, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56192, 56160, 56168, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56192, 56160, - 56168, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56192, 56160, 56168, 56170, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56192, 56160, 56168, 0, 1, - 49152, 53248, 55296, 56320, 56064, 56192, 56160, 56176, - 56172, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56192, 56160, 56176, 56172, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56192, 56160, 56176, 56177, 56174, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56192, - 56160, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56192, 56193, 56176, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56192, 56193, 56176, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56192, 56193, 56176, 56178, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56192, - 56193, 56176, 0, 1, 49152, 53248, 55296, 56320, - 56064, 56192, 56193, 56176, 56180, 0, 1, 49152, - 53248, 55296, 56320, 56064, 56192, 56193, 56176, 56180, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56192, - 56193, 56176, 56184, 56182, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56192, 56193, 56176, 0, 1, - 49152, 53248, 55296, 56320, 56064, 56192, 56193, 56176, - 56184, 0, 1, 49152, 53248, 55296, 56320, 56064, - 56192, 56193, 56195, 56184, 0, 1, 49152, 53248, - 55296, 56320, 56064, 56192, 56193, 56195, 56184, 56186, - 0, 1, 49152, 53248, 55296, 56320, 56064, 56192, - 56193, 56195, 56184, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56192, 56193, 56195, 56184, 56188, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56192, 56193, - 56195, 56184, 56188, 0, 1, 49152, 53248, 55296, - 56320, 56064, 56192, 56193, 56195, 56184, 56188, 56190, - 0, 1, 49152, 53248, 55296, 56320, 56064, 0, - 1, 49152, 53248, 55296, 56320, 56064, 56192, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56192, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56192, 56194, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 56196, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56196, 0, 1, 49152, 53248, 55296, 56320, - 56321, 56192, 56200, 56198, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 56200, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56192, 56200, 0, 1, - 49152, 53248, 55296, 56320, 56321, 56192, 56200, 56202, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 56200, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56208, 56204, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56192, 56208, 56204, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56192, 56208, 56209, 56206, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 56208, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56208, 0, 1, 49152, 53248, 55296, 56320, - 56321, 56192, 56208, 56210, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 56208, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56192, 56208, 56212, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56192, 56208, - 56212, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56208, 56216, 56214, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 56208, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56192, 56224, 56216, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56192, 56224, - 56216, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56224, 56216, 56218, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 56224, 56216, 0, 1, - 49152, 53248, 55296, 56320, 56321, 56192, 56224, 56225, - 56220, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56224, 56225, 56220, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 56224, 56225, 56220, 56222, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 56224, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56224, 0, 1, 49152, 53248, 55296, 56320, - 56321, 56192, 56224, 56226, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 56224, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56192, 56224, 56228, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56192, 56224, - 56228, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56224, 56232, 56230, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 56224, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56192, 56224, 56232, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56192, 56224, - 56232, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56224, 56232, 56234, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 56224, 56232, 0, 1, - 49152, 53248, 55296, 56320, 56321, 56192, 56224, 56240, - 56236, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56224, 56240, 56236, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 56224, 56240, 56241, 56238, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 56224, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56256, 56240, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56192, 56256, 56240, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56192, 56256, 56240, 56242, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 56256, 56240, 0, 1, 49152, 53248, 55296, 56320, - 56321, 56192, 56256, 56240, 56244, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56192, 56256, 56240, 56244, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 56256, 56240, 56248, 56246, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 56256, 56240, 0, 1, - 49152, 53248, 55296, 56320, 56321, 56192, 56256, 56257, - 56248, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56256, 56257, 56248, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56192, 56256, 56257, 56248, 56250, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 56256, 56257, 56248, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56192, 56256, 56257, 56248, 56252, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56192, 56256, - 56257, 56259, 56252, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56192, 56256, 56257, 56259, 56252, 56254, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56192, - 56256, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56192, 56256, 0, 1, 49152, 53248, 55296, 56320, - 56321, 56192, 56256, 56258, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56323, 56256, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56323, 56256, 56260, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56323, 56256, - 56260, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56323, 56256, 56264, 56262, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56323, 56256, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56323, 56256, 56264, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56323, 56256, - 56264, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56323, 56256, 56264, 56266, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56323, 56256, 56264, 0, 1, - 49152, 53248, 55296, 56320, 56321, 56323, 56256, 56272, - 56268, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56323, 56256, 56272, 56268, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56323, 56256, 56272, 56273, 56270, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56323, - 56256, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56323, 56256, 56272, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56323, 56256, 56272, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56323, 56256, 56272, 56274, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56323, - 56256, 56272, 0, 1, 49152, 53248, 55296, 56320, - 56321, 56323, 56256, 56272, 56276, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56323, 56256, 56272, 56276, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56323, - 56256, 56272, 56280, 56278, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56323, 56256, 56272, 0, 1, - 49152, 53248, 55296, 56320, 56321, 56323, 56256, 56288, - 56280, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56323, 56256, 56288, 56280, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56323, 56256, 56288, 56280, 56282, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56323, - 56256, 56288, 56280, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56323, 56256, 56288, 56289, 56284, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56323, 56256, - 56288, 56289, 56284, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56323, 56256, 56288, 56289, 56284, 56286, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56323, - 56256, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56323, 56256, 56288, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56323, 56256, 56288, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56323, 56256, 56288, 56290, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56323, - 56256, 56288, 0, 1, 49152, 53248, 55296, 56320, - 56321, 56323, 56256, 56288, 56292, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56323, 56256, 56288, 56292, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56323, - 56256, 56288, 56296, 56294, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56323, 56327, 56288, 0, 1, - 49152, 53248, 55296, 56320, 56321, 56323, 56327, 56288, - 56296, 0, 1, 49152, 53248, 55296, 56320, 56321, - 56323, 56327, 56288, 56296, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56323, 56327, 56288, 56296, 56298, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56323, - 56327, 56288, 56296, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56323, 56327, 56288, 56304, 56300, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56323, 56327, - 56288, 56304, 56300, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56323, 56327, 56288, 56304, 56305, 56302, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56323, - 56327, 56288, 0, 1, 49152, 53248, 55296, 56320, - 56321, 56323, 56327, 56288, 56304, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56323, 56327, 56288, 56304, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56323, - 56327, 56288, 56304, 56306, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56323, 56327, 56288, 56304, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56323, 56327, - 56288, 56304, 56308, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56323, 56327, 56288, 56304, 56308, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56323, 56327, - 56288, 56304, 56312, 56310, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56323, 56327, 56288, 56304, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56323, 56327, - 56288, 56304, 56312, 0, 1, 49152, 53248, 55296, - 56320, 56321, 56323, 56327, 56288, 56304, 56312, 0, - 1, 49152, 53248, 55296, 56320, 56321, 56323, 56327, - 56288, 56304, 56312, 56314, 0, 1, 49152, 53248, - 55296, 56320, 56321, 56323, 56327, 56288, 56304, 56312, - 0, 1, 49152, 53248, 55296, 56320, 56321, 56323, - 56327, 56288, 56304, 56312, 56316, 0, 1, 49152, - 53248, 55296, 56320, 56321, 56323, 56327, 56288, 56304, - 56312, 56316, 0, 1, 49152, 53248, 55296, 56320, - 56321, 56323, 56327, 56288, 56304, 56312, 56316, 56318, - 0, 1, 49152, 53248, 55296, 0, 1, 49152, - 53248, 55296, 56320, 0, 1, 49152, 53248, 55296, - 56320, 0, 1, 49152, 53248, 55296, 56320, 56322, - 0, 1, 49152, 53248, 55296, 56320, 0, 1, - 49152, 53248, 55296, 56320, 56324, 0, 1, 49152, - 53248, 55296, 56320, 56324, 0, 1, 49152, 53248, - 55296, 56320, 56328, 56326, 0, 1, 49152, 53248, - 55296, 56320, 0, 1, 49152, 53248, 55296, 56320, - 56328, 0, 1, 49152, 53248, 55296, 56320, 56328, - 0, 1, 49152, 53248, 55296, 56320, 56328, 56330, - 0, 1, 49152, 53248, 55296, 56320, 56328, 0, - 1, 49152, 53248, 55296, 56320, 56336, 56332, 0, - 1, 49152, 53248, 55296, 56320, 56336, 56332, 0, - 1, 49152, 53248, 55296, 56320, 56336, 56337, 56334, - 0, 1, 49152, 53248, 55296, 56320, 0, 1, - 49152, 53248, 55296, 56320, 56336, 0, 1, 49152, - 53248, 55296, 56320, 56336, 0, 1, 49152, 53248, - 55296, 56320, 56336, 56338, 0, 1, 49152, 53248, - 55296, 56320, 56336, 0, 1, 49152, 53248, 55296, - 56320, 56336, 56340, 0, 1, 49152, 53248, 55296, - 56320, 56336, 56340, 0, 1, 49152, 53248, 55296, - 56320, 56336, 56344, 56342, 0, 1, 49152, 53248, - 55296, 56320, 56336, 0, 1, 49152, 53248, 55296, - 56320, 56352, 56344, 0, 1, 49152, 53248, 55296, - 56320, 56352, 56344, 0, 1, 49152, 53248, 55296, - 56320, 56352, 56344, 56346, 0, 1, 49152, 53248, - 55296, 56320, 56352, 56344, 0, 1, 49152, 53248, - 55296, 56320, 56352, 56353, 56348, 0, 1, 49152, - 53248, 55296, 56320, 56352, 56353, 56348, 0, 1, - 49152, 53248, 55296, 56320, 56352, 56353, 56348, 56350, - 0, 1, 49152, 53248, 55296, 56320, 0, 1, - 49152, 53248, 55296, 56320, 56352, 0, 1, 49152, - 53248, 55296, 56320, 56352, 0, 1, 49152, 53248, - 55296, 56320, 56352, 56354, 0, 1, 49152, 53248, - 55296, 56320, 56352, 0, 1, 49152, 53248, 55296, - 56320, 56352, 56356, 0, 1, 49152, 53248, 55296, - 56320, 56352, 56356, 0, 1, 49152, 53248, 55296, - 56320, 56352, 56360, 56358, 0, 1, 49152, 53248, - 55296, 56320, 56352, 0, 1, 49152, 53248, 55296, - 56320, 56352, 56360, 0, 1, 49152, 53248, 55296, - 56320, 56352, 56360, 0, 1, 49152, 53248, 55296, - 56320, 56352, 56360, 56362, 0, 1, 49152, 53248, - 55296, 56320, 56352, 56360, 0, 1, 49152, 53248, - 55296, 56320, 56352, 56368, 56364, 0, 1, 49152, - 53248, 55296, 56320, 56352, 56368, 56364, 0, 1, - 49152, 53248, 55296, 56320, 56352, 56368, 56369, 56366, - 0, 1, 49152, 53248, 55296, 56320, 56352, 0, - 1, 49152, 53248, 55296, 56320, 56384, 56368, 0, - 1, 49152, 53248, 55296, 56320, 56384, 56368, 0, - 1, 49152, 53248, 55296, 56320, 56384, 56368, 56370, - 0, 1, 49152, 53248, 55296, 56320, 56384, 56368, - 0, 1, 49152, 53248, 55296, 56320, 56384, 56368, - 56372, 0, 1, 49152, 53248, 55296, 56320, 56384, - 56368, 56372, 0, 1, 49152, 53248, 55296, 56320, - 56384, 56368, 56376, 56374, 0, 1, 49152, 53248, - 55296, 56320, 56384, 56368, 0, 1, 49152, 53248, - 55296, 56320, 56384, 56385, 56376, 0, 1, 49152, - 53248, 55296, 56320, 56384, 56385, 56376, 0, 1, - 49152, 53248, 55296, 56320, 56384, 56385, 56376, 56378, - 0, 1, 49152, 53248, 55296, 56320, 56384, 56385, - 56376, 0, 1, 49152, 53248, 55296, 56320, 56384, - 56385, 56376, 56380, 0, 1, 49152, 53248, 55296, - 56320, 56384, 56385, 56387, 56380, 0, 1, 49152, - 53248, 55296, 56320, 56384, 56385, 56387, 56380, 56382, - 0, 1, 49152, 53248, 55296, 56320, 0, 1, - 49152, 57344, 55296, 56320, 56384, 0, 1, 49152, - 57344, 55296, 56320, 56384, 0, 1, 49152, 57344, - 55296, 56320, 56384, 56386, 0, 1, 49152, 57344, - 55296, 56320, 56384, 0, 1, 49152, 57344, 55296, - 56320, 56384, 56388, 0, 1, 49152, 57344, 55296, - 56320, 56384, 56388, 0, 1, 49152, 57344, 55296, - 56320, 56384, 56392, 56390, 0, 1, 49152, 57344, - 55296, 56320, 56384, 0, 1, 49152, 57344, 55296, - 56320, 56384, 56392, 0, 1, 49152, 57344, 55296, - 56320, 56384, 56392, 0, 1, 49152, 57344, 55296, - 56320, 56384, 56392, 56394, 0, 1, 49152, 57344, - 55296, 56320, 56384, 56392, 0, 1, 49152, 57344, - 55296, 56320, 56384, 56400, 56396, 0, 1, 49152, - 57344, 55296, 56320, 56384, 56400, 56396, 0, 1, - 49152, 57344, 55296, 56320, 56384, 56400, 56401, 56398, - 0, 1, 49152, 57344, 55296, 56320, 56384, 0, - 1, 49152, 57344, 55296, 56320, 56384, 56400, 0, - 1, 49152, 57344, 55296, 56320, 56384, 56400, 0, - 1, 49152, 57344, 55296, 56320, 56384, 56400, 56402, - 0, 1, 49152, 57344, 55296, 56320, 56384, 56400, - 0, 1, 49152, 57344, 55296, 56320, 56384, 56400, - 56404, 0, 1, 49152, 57344, 55296, 56320, 56384, - 56400, 56404, 0, 1, 49152, 57344, 55296, 56320, - 56384, 56400, 56408, 56406, 0, 1, 49152, 57344, - 55296, 56320, 56384, 56400, 0, 1, 49152, 57344, - 55296, 56320, 56384, 56416, 56408, 0, 1, 49152, - 57344, 55296, 56320, 56384, 56416, 56408, 0, 1, - 49152, 57344, 55296, 56320, 56384, 56416, 56408, 56410, - 0, 1, 49152, 57344, 55296, 56320, 56384, 56416, - 56408, 0, 1, 49152, 57344, 55296, 56320, 56384, - 56416, 56417, 56412, 0, 1, 49152, 57344, 55296, - 56320, 56384, 56416, 56417, 56412, 0, 1, 49152, - 57344, 55296, 56320, 56384, 56416, 56417, 56412, 56414, - 0, 1, 49152, 57344, 55296, 56320, 56384, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56416, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56416, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56416, 56418, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56416, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56416, - 56420, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56416, 56420, 0, 1, 49152, 57344, 55296, 56320, - 56448, 56416, 56424, 56422, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56416, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56416, 56424, 0, 1, 49152, - 57344, 55296, 56320, 56448, 56416, 56424, 0, 1, - 49152, 57344, 55296, 56320, 56448, 56416, 56424, 56426, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56416, - 56424, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56416, 56432, 56428, 0, 1, 49152, 57344, 55296, - 56320, 56448, 56416, 56432, 56428, 0, 1, 49152, - 57344, 55296, 56320, 56448, 56416, 56432, 56433, 56430, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56416, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56449, - 56432, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56449, 56432, 0, 1, 49152, 57344, 55296, 56320, - 56448, 56449, 56432, 56434, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56449, 56432, 0, 1, 49152, - 57344, 55296, 56320, 56448, 56449, 56432, 56436, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56449, 56432, - 56436, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56449, 56432, 56440, 56438, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56449, 56432, 0, 1, 49152, - 57344, 55296, 56320, 56448, 56449, 56432, 56440, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56449, 56451, - 56440, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56449, 56451, 56440, 56442, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56449, 56451, 56440, 0, 1, - 49152, 57344, 55296, 56320, 56448, 56449, 56451, 56440, - 56444, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56449, 56451, 56440, 56444, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56449, 56451, 56440, 56444, 56446, - 0, 1, 49152, 57344, 55296, 56320, 0, 1, - 49152, 57344, 55296, 56320, 56448, 0, 1, 49152, - 57344, 55296, 56320, 56448, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56450, 0, 1, 49152, 57344, - 55296, 56320, 56448, 0, 1, 49152, 57344, 55296, - 56320, 56448, 56452, 0, 1, 49152, 57344, 55296, - 56320, 56448, 56452, 0, 1, 49152, 57344, 55296, - 56320, 56448, 56456, 56454, 0, 1, 49152, 57344, - 55296, 56320, 56448, 0, 1, 49152, 57344, 55296, - 56320, 56448, 56456, 0, 1, 49152, 57344, 55296, - 56320, 56448, 56456, 0, 1, 49152, 57344, 55296, - 56320, 56448, 56456, 56458, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56456, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56464, 56460, 0, 1, 49152, - 57344, 55296, 56320, 56448, 56464, 56460, 0, 1, - 49152, 57344, 55296, 56320, 56448, 56464, 56465, 56462, - 0, 1, 49152, 57344, 55296, 56320, 56448, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56464, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56464, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56464, 56466, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56464, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56464, - 56468, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56464, 56468, 0, 1, 49152, 57344, 55296, 56320, - 56448, 56464, 56472, 56470, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56464, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56480, 56472, 0, 1, 49152, - 57344, 55296, 56320, 56448, 56480, 56472, 0, 1, - 49152, 57344, 55296, 56320, 56448, 56480, 56472, 56474, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56480, - 56472, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56480, 56481, 56476, 0, 1, 49152, 57344, 55296, - 56320, 56448, 56480, 56481, 56476, 0, 1, 49152, - 57344, 55296, 56320, 56448, 56480, 56481, 56476, 56478, - 0, 1, 49152, 57344, 55296, 56320, 56448, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56480, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56480, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56480, 56482, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56480, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56480, - 56484, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56480, 56484, 0, 1, 49152, 57344, 55296, 56320, - 56448, 56480, 56488, 56486, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56480, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56480, 56488, 0, 1, 49152, - 57344, 55296, 56320, 56448, 56480, 56488, 0, 1, - 49152, 57344, 55296, 56320, 56448, 56480, 56488, 56490, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56480, - 56488, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56480, 56496, 56492, 0, 1, 49152, 57344, 55296, - 56320, 56448, 56480, 56496, 56492, 0, 1, 49152, - 57344, 55296, 56320, 56448, 56480, 56496, 56497, 56494, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56480, - 0, 1, 49152, 57344, 55296, 56320, 56448, 56512, - 56496, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56512, 56496, 0, 1, 49152, 57344, 55296, 56320, - 56448, 56512, 56496, 56498, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56512, 56496, 0, 1, 49152, - 57344, 55296, 56320, 56448, 56512, 56496, 56500, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56512, 56496, - 56500, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56512, 56496, 56504, 56502, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56512, 56496, 0, 1, 49152, - 57344, 55296, 56320, 56448, 56512, 56513, 56504, 0, - 1, 49152, 57344, 55296, 56320, 56448, 56512, 56513, - 56504, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56512, 56513, 56504, 56506, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56512, 56513, 56504, 0, 1, - 49152, 57344, 55296, 56320, 56448, 56512, 56513, 56504, - 56508, 0, 1, 49152, 57344, 55296, 56320, 56448, - 56512, 56513, 56515, 56508, 0, 1, 49152, 57344, - 55296, 56320, 56448, 56512, 56513, 56515, 56508, 56510, - 0, 1, 49152, 57344, 55296, 56320, 56448, 0, - 1, 49152, 57344, 55296, 56320, 56576, 56512, 0, - 1, 49152, 57344, 55296, 56320, 56576, 56512, 0, - 1, 49152, 57344, 55296, 56320, 56576, 56512, 56514, - 0, 1, 49152, 57344, 55296, 56320, 56576, 56512, - 0, 1, 49152, 57344, 55296, 56320, 56576, 56512, - 56516, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56512, 56516, 0, 1, 49152, 57344, 55296, 56320, - 56576, 56512, 56520, 56518, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56512, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56512, 56520, 0, 1, 49152, - 57344, 55296, 56320, 56576, 56512, 56520, 0, 1, - 49152, 57344, 55296, 56320, 56576, 56512, 56520, 56522, - 0, 1, 49152, 57344, 55296, 56320, 56576, 56512, - 56520, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56512, 56528, 56524, 0, 1, 49152, 57344, 55296, - 56320, 56576, 56512, 56528, 56524, 0, 1, 49152, - 57344, 55296, 56320, 56576, 56512, 56528, 56529, 56526, - 0, 1, 49152, 57344, 55296, 56320, 56576, 56512, - 0, 1, 49152, 57344, 55296, 56320, 56576, 56512, - 56528, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56512, 56528, 0, 1, 49152, 57344, 55296, 56320, - 56576, 56512, 56528, 56530, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56512, 56528, 0, 1, 49152, - 57344, 55296, 56320, 56576, 56512, 56528, 56532, 0, - 1, 49152, 57344, 55296, 56320, 56576, 56512, 56528, - 56532, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56512, 56528, 56536, 56534, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56512, 56528, 0, 1, 49152, - 57344, 55296, 56320, 56576, 56512, 56544, 56536, 0, - 1, 49152, 57344, 55296, 56320, 56576, 56512, 56544, - 56536, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56512, 56544, 56536, 56538, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56512, 56544, 56536, 0, 1, - 49152, 57344, 55296, 56320, 56576, 56512, 56544, 56545, - 56540, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56512, 56544, 56545, 56540, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56512, 56544, 56545, 56540, 56542, - 0, 1, 49152, 57344, 55296, 56320, 56576, 56512, - 0, 1, 49152, 57344, 55296, 56320, 56576, 56577, - 56544, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56577, 56544, 0, 1, 49152, 57344, 55296, 56320, - 56576, 56577, 56544, 56546, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56577, 56544, 0, 1, 49152, - 57344, 55296, 56320, 56576, 56577, 56544, 56548, 0, - 1, 49152, 57344, 55296, 56320, 56576, 56577, 56544, - 56548, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56577, 56544, 56552, 56550, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56577, 56544, 0, 1, 49152, - 57344, 55296, 56320, 56576, 56577, 56544, 56552, 0, - 1, 49152, 57344, 55296, 56320, 56576, 56577, 56544, - 56552, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56577, 56544, 56552, 56554, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56577, 56544, 56552, 0, 1, - 49152, 57344, 55296, 56320, 56576, 56577, 56544, 56560, - 56556, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56577, 56544, 56560, 56556, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56577, 56544, 56560, 56561, 56558, - 0, 1, 49152, 57344, 55296, 56320, 56576, 56577, - 56544, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56577, 56544, 56560, 0, 1, 49152, 57344, 55296, - 56320, 56576, 56577, 56579, 56560, 0, 1, 49152, - 57344, 55296, 56320, 56576, 56577, 56579, 56560, 56562, - 0, 1, 49152, 57344, 55296, 56320, 56576, 56577, - 56579, 56560, 0, 1, 49152, 57344, 55296, 56320, - 56576, 56577, 56579, 56560, 56564, 0, 1, 49152, - 57344, 55296, 56320, 56576, 56577, 56579, 56560, 56564, - 0, 1, 49152, 57344, 55296, 56320, 56576, 56577, - 56579, 56560, 56568, 56566, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56577, 56579, 56560, 0, 1, - 49152, 57344, 55296, 56320, 56576, 56577, 56579, 56560, - 56568, 0, 1, 49152, 57344, 55296, 56320, 56576, - 56577, 56579, 56560, 56568, 0, 1, 49152, 57344, - 55296, 56320, 56576, 56577, 56579, 56560, 56568, 56570, - 0, 1, 49152, 57344, 55296, 56320, 56576, 56577, - 56579, 56583, 56568, 0, 1, 49152, 57344, 55296, - 56320, 56576, 56577, 56579, 56583, 56568, 56572, 0, - 1, 49152, 57344, 55296, 56320, 56576, 56577, 56579, - 56583, 56568, 56572, 0, 1, 49152, 57344, 55296, - 56320, 56576, 56577, 56579, 56583, 56568, 56572, 56574, - 0, 1, 49152, 57344, 55296, 56320, 0, 1, - 49152, 57344, 55296, 56320, 56576, 0, 1, 49152, - 57344, 57345, 56320, 56576, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56578, 0, 1, 49152, 57344, - 57345, 56320, 56576, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56580, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56580, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56584, 56582, 0, 1, 49152, 57344, - 57345, 56320, 56576, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56584, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56584, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56584, 56586, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56584, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56592, 56588, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56592, 56588, 0, 1, - 49152, 57344, 57345, 56320, 56576, 56592, 56593, 56590, - 0, 1, 49152, 57344, 57345, 56320, 56576, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56592, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56592, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56592, 56594, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56592, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56592, - 56596, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56592, 56596, 0, 1, 49152, 57344, 57345, 56320, - 56576, 56592, 56600, 56598, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56592, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56608, 56600, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56608, 56600, 0, 1, - 49152, 57344, 57345, 56320, 56576, 56608, 56600, 56602, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56608, - 56600, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56608, 56609, 56604, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56608, 56609, 56604, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56608, 56609, 56604, 56606, - 0, 1, 49152, 57344, 57345, 56320, 56576, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56608, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56608, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56608, 56610, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56608, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56608, - 56612, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56608, 56612, 0, 1, 49152, 57344, 57345, 56320, - 56576, 56608, 56616, 56614, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56608, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56608, 56616, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56608, 56616, 0, 1, - 49152, 57344, 57345, 56320, 56576, 56608, 56616, 56618, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56608, - 56616, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56608, 56624, 56620, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56608, 56624, 56620, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56608, 56624, 56625, 56622, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56608, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56640, - 56624, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56640, 56624, 0, 1, 49152, 57344, 57345, 56320, - 56576, 56640, 56624, 56626, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56640, 56624, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56640, 56624, 56628, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56640, 56624, - 56628, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56640, 56624, 56632, 56630, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56640, 56624, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56640, 56641, 56632, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56640, 56641, - 56632, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56640, 56641, 56632, 56634, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56640, 56641, 56632, 0, 1, - 49152, 57344, 57345, 56320, 56576, 56640, 56641, 56632, - 56636, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56640, 56641, 56643, 56636, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56640, 56641, 56643, 56636, 56638, - 0, 1, 49152, 57344, 57345, 56320, 56576, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56640, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56640, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56640, 56642, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56640, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56640, - 56644, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56640, 56644, 0, 1, 49152, 57344, 57345, 56320, - 56576, 56640, 56648, 56646, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56640, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56640, 56648, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56640, 56648, 0, 1, - 49152, 57344, 57345, 56320, 56576, 56640, 56648, 56650, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56640, - 56648, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56640, 56656, 56652, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56640, 56656, 56652, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56640, 56656, 56657, 56654, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56640, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56640, - 56656, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56640, 56656, 0, 1, 49152, 57344, 57345, 56320, - 56576, 56640, 56656, 56658, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56640, 56656, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56640, 56656, 56660, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56640, 56656, - 56660, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56640, 56656, 56664, 56662, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56640, 56656, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56640, 56672, 56664, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56640, 56672, - 56664, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56640, 56672, 56664, 56666, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56640, 56672, 56664, 0, 1, - 49152, 57344, 57345, 56320, 56576, 56640, 56672, 56673, - 56668, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56640, 56672, 56673, 56668, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56640, 56672, 56673, 56668, 56670, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56640, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56704, - 56672, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56704, 56672, 0, 1, 49152, 57344, 57345, 56320, - 56576, 56704, 56672, 56674, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56704, 56672, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56704, 56672, 56676, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56704, 56672, - 56676, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56704, 56672, 56680, 56678, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56704, 56672, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56704, 56672, 56680, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56704, 56672, - 56680, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56704, 56672, 56680, 56682, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56704, 56672, 56680, 0, 1, - 49152, 57344, 57345, 56320, 56576, 56704, 56672, 56688, - 56684, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56704, 56672, 56688, 56684, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56704, 56672, 56688, 56689, 56686, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56704, - 56672, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56704, 56705, 56688, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56704, 56705, 56688, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56704, 56705, 56688, 56690, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56704, - 56705, 56688, 0, 1, 49152, 57344, 57345, 56320, - 56576, 56704, 56705, 56688, 56692, 0, 1, 49152, - 57344, 57345, 56320, 56576, 56704, 56705, 56688, 56692, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56704, - 56705, 56688, 56696, 56694, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56704, 56705, 56688, 0, 1, - 49152, 57344, 57345, 56320, 56576, 56704, 56705, 56688, - 56696, 0, 1, 49152, 57344, 57345, 56320, 56576, - 56704, 56705, 56707, 56696, 0, 1, 49152, 57344, - 57345, 56320, 56576, 56704, 56705, 56707, 56696, 56698, - 0, 1, 49152, 57344, 57345, 56320, 56576, 56704, - 56705, 56707, 56696, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56704, 56705, 56707, 56696, 56700, 0, - 1, 49152, 57344, 57345, 56320, 56576, 56704, 56705, - 56707, 56696, 56700, 0, 1, 49152, 57344, 57345, - 56320, 56576, 56704, 56705, 56707, 56696, 56700, 56702, - 0, 1, 49152, 57344, 57345, 56320, 56576, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56704, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56704, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56704, 56706, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 56708, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56708, 0, 1, 49152, 57344, 57345, 56320, - 56832, 56704, 56712, 56710, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 56712, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56704, 56712, 0, 1, - 49152, 57344, 57345, 56320, 56832, 56704, 56712, 56714, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 56712, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56720, 56716, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56704, 56720, 56716, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56704, 56720, 56721, 56718, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 56720, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56720, 0, 1, 49152, 57344, 57345, 56320, - 56832, 56704, 56720, 56722, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 56720, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56704, 56720, 56724, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56704, 56720, - 56724, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56720, 56728, 56726, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 56720, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56704, 56736, 56728, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56704, 56736, - 56728, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56736, 56728, 56730, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 56736, 56728, 0, 1, - 49152, 57344, 57345, 56320, 56832, 56704, 56736, 56737, - 56732, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56736, 56737, 56732, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 56736, 56737, 56732, 56734, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 56736, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56736, 0, 1, 49152, 57344, 57345, 56320, - 56832, 56704, 56736, 56738, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 56736, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56704, 56736, 56740, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56704, 56736, - 56740, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56736, 56744, 56742, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 56736, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56704, 56736, 56744, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56704, 56736, - 56744, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56736, 56744, 56746, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 56736, 56744, 0, 1, - 49152, 57344, 57345, 56320, 56832, 56704, 56736, 56752, - 56748, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56736, 56752, 56748, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 56736, 56752, 56753, 56750, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 56736, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56768, 56752, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56704, 56768, 56752, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56704, 56768, 56752, 56754, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 56768, 56752, 0, 1, 49152, 57344, 57345, 56320, - 56832, 56704, 56768, 56752, 56756, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56704, 56768, 56752, 56756, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 56768, 56752, 56760, 56758, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 56768, 56752, 0, 1, - 49152, 57344, 57345, 56320, 56832, 56704, 56768, 56769, - 56760, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56704, 56768, 56769, 56760, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56704, 56768, 56769, 56760, 56762, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 56768, 56769, 56760, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56704, 56768, 56769, 56760, 56764, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56704, 56768, - 56769, 56771, 56764, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56704, 56768, 56769, 56771, 56764, 56766, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56704, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56768, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56833, 56768, 0, 1, 49152, 57344, 57345, 56320, - 56832, 56833, 56768, 56770, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56833, 56768, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56833, 56768, 56772, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56833, 56768, - 56772, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56833, 56768, 56776, 56774, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56833, 56768, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56833, 56768, 56776, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56833, 56768, - 56776, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56833, 56768, 56776, 56778, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56833, 56768, 56776, 0, 1, - 49152, 57344, 57345, 56320, 56832, 56833, 56768, 56784, - 56780, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56833, 56768, 56784, 56780, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56833, 56768, 56784, 56785, 56782, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56768, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56833, 56768, 56784, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56833, 56768, 56784, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56833, 56768, 56784, 56786, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56768, 56784, 0, 1, 49152, 57344, 57345, 56320, - 56832, 56833, 56768, 56784, 56788, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56833, 56768, 56784, 56788, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56768, 56784, 56792, 56790, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56833, 56768, 56784, 0, 1, - 49152, 57344, 57345, 56320, 56832, 56833, 56768, 56800, - 56792, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56833, 56768, 56800, 56792, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56833, 56768, 56800, 56792, 56794, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56768, 56800, 56792, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56833, 56768, 56800, 56801, 56796, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56833, 56768, - 56800, 56801, 56796, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56833, 56768, 56800, 56801, 56796, 56798, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56768, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56833, 56768, 56800, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56833, 56835, 56800, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56833, 56835, 56800, 56802, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56835, 56800, 0, 1, 49152, 57344, 57345, 56320, - 56832, 56833, 56835, 56800, 56804, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56833, 56835, 56800, 56804, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56835, 56800, 56808, 56806, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56833, 56835, 56800, 0, 1, - 49152, 57344, 57345, 56320, 56832, 56833, 56835, 56800, - 56808, 0, 1, 49152, 57344, 57345, 56320, 56832, - 56833, 56835, 56800, 56808, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56833, 56835, 56800, 56808, 56810, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56835, 56800, 56808, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56833, 56835, 56800, 56816, 56812, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56833, 56835, - 56800, 56816, 56812, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56833, 56835, 56800, 56816, 56817, 56814, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56835, 56800, 0, 1, 49152, 57344, 57345, 56320, - 56832, 56833, 56835, 56800, 56816, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56833, 56835, 56800, 56816, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56835, 56800, 56816, 56818, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56833, 56835, 56839, 56816, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56833, 56835, - 56839, 56816, 56820, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56833, 56835, 56839, 56816, 56820, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56833, 56835, - 56839, 56816, 56824, 56822, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56833, 56835, 56839, 56816, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56833, 56835, - 56839, 56816, 56824, 0, 1, 49152, 57344, 57345, - 56320, 56832, 56833, 56835, 56839, 56816, 56824, 0, - 1, 49152, 57344, 57345, 56320, 56832, 56833, 56835, - 56839, 56816, 56824, 56826, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56833, 56835, 56839, 56816, 56824, - 0, 1, 49152, 57344, 57345, 56320, 56832, 56833, - 56835, 56839, 56816, 56824, 56828, 0, 1, 49152, - 57344, 57345, 56320, 56832, 56833, 56835, 56839, 56816, - 56824, 56828, 0, 1, 49152, 57344, 57345, 56320, - 56832, 56833, 56835, 56839, 56816, 56824, 56828, 56830, - 0, 1, 49152, 57344, 57345, 56320, 0, 1, - 49152, 57344, 57345, 56320, 56832, 0, 1, 49152, - 57344, 57345, 56320, 56832, 0, 1, 49152, 57344, - 57345, 56320, 56832, 56834, 0, 1, 49152, 57344, - 57345, 57347, 56832, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56836, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56836, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56840, 56838, 0, 1, 49152, 57344, - 57345, 57347, 56832, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56840, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56840, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56840, 56842, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56840, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56848, 56844, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56848, 56844, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56848, 56849, 56846, - 0, 1, 49152, 57344, 57345, 57347, 56832, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56848, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56848, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56848, 56850, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56848, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56848, - 56852, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56848, 56852, 0, 1, 49152, 57344, 57345, 57347, - 56832, 56848, 56856, 56854, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56848, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56864, 56856, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56864, 56856, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56864, 56856, 56858, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56864, - 56856, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56864, 56865, 56860, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56864, 56865, 56860, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56864, 56865, 56860, 56862, - 0, 1, 49152, 57344, 57345, 57347, 56832, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56864, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56864, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56864, 56866, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56864, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56864, - 56868, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56864, 56868, 0, 1, 49152, 57344, 57345, 57347, - 56832, 56864, 56872, 56870, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56864, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56864, 56872, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56864, 56872, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56864, 56872, 56874, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56864, - 56872, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56864, 56880, 56876, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56864, 56880, 56876, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56864, 56880, 56881, 56878, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56864, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56896, - 56880, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56896, 56880, 0, 1, 49152, 57344, 57345, 57347, - 56832, 56896, 56880, 56882, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56896, 56880, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56896, 56880, 56884, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56896, 56880, - 56884, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56896, 56880, 56888, 56886, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56896, 56880, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56896, 56897, 56888, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56896, 56897, - 56888, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56896, 56897, 56888, 56890, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56896, 56897, 56888, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56896, 56897, 56888, - 56892, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56896, 56897, 56899, 56892, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56896, 56897, 56899, 56892, 56894, - 0, 1, 49152, 57344, 57345, 57347, 56832, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56896, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56896, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56896, 56898, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56896, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56896, - 56900, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56896, 56900, 0, 1, 49152, 57344, 57345, 57347, - 56832, 56896, 56904, 56902, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56896, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56896, 56904, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56896, 56904, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56896, 56904, 56906, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56896, - 56904, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56896, 56912, 56908, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56896, 56912, 56908, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56896, 56912, 56913, 56910, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56896, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56896, - 56912, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56896, 56912, 0, 1, 49152, 57344, 57345, 57347, - 56832, 56896, 56912, 56914, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56896, 56912, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56896, 56912, 56916, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56896, 56912, - 56916, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56896, 56912, 56920, 56918, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56896, 56912, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56896, 56928, 56920, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56896, 56928, - 56920, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56896, 56928, 56920, 56922, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56896, 56928, 56920, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56896, 56928, 56929, - 56924, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56896, 56928, 56929, 56924, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56896, 56928, 56929, 56924, 56926, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56896, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 56928, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56928, 0, 1, 49152, 57344, 57345, 57347, - 56832, 56960, 56928, 56930, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56928, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 56928, 56932, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56960, 56928, - 56932, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56928, 56936, 56934, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56928, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 56928, 56936, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56960, 56928, - 56936, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56928, 56936, 56938, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56928, 56936, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56960, 56928, 56944, - 56940, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56928, 56944, 56940, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56928, 56944, 56945, 56942, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 56928, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56961, 56944, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56960, 56961, 56944, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 56961, 56944, 56946, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 56961, 56944, 0, 1, 49152, 57344, 57345, 57347, - 56832, 56960, 56961, 56944, 56948, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 56961, 56944, 56948, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 56961, 56944, 56952, 56950, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56961, 56944, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56960, 56961, 56944, - 56952, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56961, 56963, 56952, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56961, 56963, 56952, 56954, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 56961, 56963, 56952, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56960, 56961, 56963, 56952, 56956, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56960, 56961, - 56963, 56952, 56956, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56960, 56961, 56963, 56952, 56956, 56958, - 0, 1, 49152, 57344, 57345, 57347, 56832, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56960, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56960, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56960, 56962, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 56964, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56964, 0, 1, 49152, 57344, 57345, 57347, - 56832, 56960, 56968, 56966, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56968, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 56968, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56960, 56968, 56970, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 56968, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56976, 56972, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56960, 56976, 56972, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 56976, 56977, 56974, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 56976, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56976, 0, 1, 49152, 57344, 57345, 57347, - 56832, 56960, 56976, 56978, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56976, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 56976, 56980, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56960, 56976, - 56980, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56976, 56984, 56982, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56976, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 56992, 56984, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56960, 56992, - 56984, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56992, 56984, 56986, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56992, 56984, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56960, 56992, 56993, - 56988, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56992, 56993, 56988, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56992, 56993, 56988, 56990, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 56992, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56992, 0, 1, 49152, 57344, 57345, 57347, - 56832, 56960, 56992, 56994, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56992, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 56992, 56996, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56960, 56992, - 56996, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56992, 57000, 56998, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56992, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 56992, 57000, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56960, 56992, - 57000, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56992, 57000, 57002, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56992, 57000, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56960, 56992, 57008, - 57004, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 56992, 57008, 57004, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 56992, 57008, 57009, 57006, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 56992, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 57024, 57008, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56960, 57024, 57008, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 57024, 57008, 57010, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 57024, 57008, 0, 1, 49152, 57344, 57345, 57347, - 56832, 56960, 57024, 57008, 57012, 0, 1, 49152, - 57344, 57345, 57347, 56832, 56960, 57024, 57008, 57012, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 57024, 57008, 57016, 57014, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 57024, 57008, 0, 1, - 49152, 57344, 57345, 57347, 56832, 56960, 57024, 57025, - 57016, 0, 1, 49152, 57344, 57345, 57347, 56832, - 56960, 57024, 57025, 57016, 0, 1, 49152, 57344, - 57345, 57347, 56832, 56960, 57024, 57025, 57016, 57018, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 57024, 57025, 57016, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56960, 57024, 57025, 57016, 57020, 0, - 1, 49152, 57344, 57345, 57347, 56832, 56960, 57024, - 57025, 57027, 57020, 0, 1, 49152, 57344, 57345, - 57347, 56832, 56960, 57024, 57025, 57027, 57020, 57022, - 0, 1, 49152, 57344, 57345, 57347, 56832, 56960, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57024, 0, 1, 49152, 57344, 57345, 57347, 56832, - 57088, 57024, 0, 1, 49152, 57344, 57345, 57347, - 56832, 57088, 57024, 57026, 0, 1, 49152, 57344, - 57345, 57347, 56832, 57088, 57024, 0, 1, 49152, - 57344, 57345, 57347, 56832, 57088, 57024, 57028, 0, - 1, 49152, 57344, 57345, 57347, 56832, 57088, 57024, - 57028, 0, 1, 49152, 57344, 57345, 57347, 56832, - 57088, 57024, 57032, 57030, 0, 1, 49152, 57344, - 57345, 57347, 56832, 57088, 57024, 0, 1, 49152, - 57344, 57345, 57347, 56832, 57088, 57024, 57032, 0, - 1, 49152, 57344, 57345, 57347, 56832, 57088, 57024, - 57032, 0, 1, 49152, 57344, 57345, 57347, 56832, - 57088, 57024, 57032, 57034, 0, 1, 49152, 57344, - 57345, 57347, 56832, 57088, 57024, 57032, 0, 1, - 49152, 57344, 57345, 57347, 56832, 57088, 57024, 57040, - 57036, 0, 1, 49152, 57344, 57345, 57347, 56832, - 57088, 57024, 57040, 57036, 0, 1, 49152, 57344, - 57345, 57347, 56832, 57088, 57024, 57040, 57041, 57038, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57024, 0, 1, 49152, 57344, 57345, 57347, 56832, - 57088, 57024, 57040, 0, 1, 49152, 57344, 57345, - 57347, 56832, 57088, 57024, 57040, 0, 1, 49152, - 57344, 57345, 57347, 56832, 57088, 57024, 57040, 57042, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57024, 57040, 0, 1, 49152, 57344, 57345, 57347, - 56832, 57088, 57024, 57040, 57044, 0, 1, 49152, - 57344, 57345, 57347, 56832, 57088, 57024, 57040, 57044, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57024, 57040, 57048, 57046, 0, 1, 49152, 57344, - 57345, 57347, 56832, 57088, 57024, 57040, 0, 1, - 49152, 57344, 57345, 57347, 56832, 57088, 57024, 57056, - 57048, 0, 1, 49152, 57344, 57345, 57347, 56832, - 57088, 57024, 57056, 57048, 0, 1, 49152, 57344, - 57345, 57347, 56832, 57088, 57024, 57056, 57048, 57050, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57024, 57056, 57048, 0, 1, 49152, 57344, 57345, - 57347, 56832, 57088, 57024, 57056, 57057, 57052, 0, - 1, 49152, 57344, 57345, 57347, 56832, 57088, 57024, - 57056, 57057, 57052, 0, 1, 49152, 57344, 57345, - 57347, 56832, 57088, 57024, 57056, 57057, 57052, 57054, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57024, 0, 1, 49152, 57344, 57345, 57347, 56832, - 57088, 57089, 57056, 0, 1, 49152, 57344, 57345, - 57347, 56832, 57088, 57089, 57056, 0, 1, 49152, - 57344, 57345, 57347, 56832, 57088, 57089, 57056, 57058, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57089, 57056, 0, 1, 49152, 57344, 57345, 57347, - 56832, 57088, 57089, 57056, 57060, 0, 1, 49152, - 57344, 57345, 57347, 56832, 57088, 57089, 57056, 57060, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57089, 57056, 57064, 57062, 0, 1, 49152, 57344, - 57345, 57347, 56832, 57088, 57089, 57056, 0, 1, - 49152, 57344, 57345, 57347, 56832, 57088, 57089, 57056, - 57064, 0, 1, 49152, 57344, 57345, 57347, 56832, - 57088, 57089, 57056, 57064, 0, 1, 49152, 57344, - 57345, 57347, 56832, 57088, 57089, 57056, 57064, 57066, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57089, 57056, 57064, 0, 1, 49152, 57344, 57345, - 57347, 56832, 57088, 57089, 57056, 57072, 57068, 0, - 1, 49152, 57344, 57345, 57347, 56832, 57088, 57089, - 57056, 57072, 57068, 0, 1, 49152, 57344, 57345, - 57347, 56832, 57088, 57089, 57056, 57072, 57073, 57070, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57089, 57056, 0, 1, 49152, 57344, 57345, 57347, - 56832, 57088, 57089, 57056, 57072, 0, 1, 49152, - 57344, 57345, 57347, 56832, 57088, 57089, 57091, 57072, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57089, 57091, 57072, 57074, 0, 1, 49152, 57344, - 57345, 57347, 56832, 57088, 57089, 57091, 57072, 0, - 1, 49152, 57344, 57345, 57347, 56832, 57088, 57089, - 57091, 57072, 57076, 0, 1, 49152, 57344, 57345, - 57347, 56832, 57088, 57089, 57091, 57072, 57076, 0, - 1, 49152, 57344, 57345, 57347, 56832, 57088, 57089, - 57091, 57072, 57080, 57078, 0, 1, 49152, 57344, - 57345, 57347, 56832, 57088, 57089, 57091, 57072, 0, - 1, 49152, 57344, 57345, 57347, 56832, 57088, 57089, - 57091, 57072, 57080, 0, 1, 49152, 57344, 57345, - 57347, 56832, 57088, 57089, 57091, 57072, 57080, 0, - 1, 49152, 57344, 57345, 57347, 56832, 57088, 57089, - 57091, 57072, 57080, 57082, 0, 1, 49152, 57344, - 57345, 57347, 56832, 57088, 57089, 57091, 57095, 57080, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57089, 57091, 57095, 57080, 57084, 0, 1, 49152, - 57344, 57345, 57347, 56832, 57088, 57089, 57091, 57095, - 57080, 57084, 0, 1, 49152, 57344, 57345, 57347, - 56832, 57088, 57089, 57091, 57095, 57080, 57084, 57086, - 0, 1, 49152, 57344, 57345, 57347, 56832, 0, - 1, 49152, 57344, 57345, 57347, 56832, 57088, 0, - 1, 49152, 57344, 57345, 57347, 56832, 57088, 0, - 1, 49152, 57344, 57345, 57347, 56832, 57088, 57090, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 0, 1, 49152, 57344, 57345, 57347, 56832, 57088, - 57092, 0, 1, 49152, 57344, 57345, 57347, 56832, - 57088, 57092, 0, 1, 49152, 57344, 57345, 57347, - 56832, 57088, 57096, 57094, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57096, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57096, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57088, 57096, 57098, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57096, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57104, 57100, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57104, 57100, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57104, 57105, 57102, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57104, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57104, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57088, 57104, 57106, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57104, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57104, 57108, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57104, - 57108, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57104, 57112, 57110, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57104, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57120, 57112, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57120, - 57112, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57120, 57112, 57114, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57120, 57112, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57088, 57120, 57121, - 57116, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57120, 57121, 57116, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57120, 57121, 57116, 57118, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57120, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57120, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57088, 57120, 57122, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57120, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57120, 57124, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57120, - 57124, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57120, 57128, 57126, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57120, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57120, 57128, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57120, - 57128, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57120, 57128, 57130, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57120, 57128, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57088, 57120, 57136, - 57132, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57120, 57136, 57132, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57120, 57136, 57137, 57134, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57120, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57152, 57136, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57152, 57136, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57152, 57136, 57138, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57152, 57136, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57088, 57152, 57136, 57140, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57152, 57136, 57140, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57152, 57136, 57144, 57142, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57152, 57136, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57088, 57152, 57153, - 57144, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57152, 57153, 57144, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57152, 57153, 57144, 57146, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57152, 57153, 57144, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57152, 57153, 57144, 57148, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57152, - 57153, 57155, 57148, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57152, 57153, 57155, 57148, 57150, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57152, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57152, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57088, 57152, 57154, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57152, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57152, 57156, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57152, - 57156, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57152, 57160, 57158, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57152, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57152, 57160, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57152, - 57160, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57152, 57160, 57162, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57152, 57160, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57088, 57152, 57168, - 57164, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57152, 57168, 57164, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57152, 57168, 57169, 57166, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57152, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57152, 57168, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57152, 57168, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57152, 57168, 57170, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57152, 57168, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57088, 57152, 57168, 57172, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57152, 57168, 57172, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57152, 57168, 57176, 57174, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57152, 57168, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57088, 57152, 57184, - 57176, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57152, 57184, 57176, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57152, 57184, 57176, 57178, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57152, 57184, 57176, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57152, 57184, 57185, 57180, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57152, - 57184, 57185, 57180, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57152, 57184, 57185, 57180, 57182, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57152, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57216, 57184, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57216, 57184, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57216, 57184, 57186, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57216, 57184, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57088, 57216, 57184, 57188, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57216, 57184, 57188, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57216, 57184, 57192, 57190, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57216, 57184, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57088, 57216, 57184, - 57192, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57216, 57184, 57192, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57216, 57184, 57192, 57194, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57216, 57184, 57192, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57216, 57184, 57200, 57196, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57216, - 57184, 57200, 57196, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57216, 57184, 57200, 57201, 57198, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57216, 57184, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57088, 57216, 57217, 57200, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57216, 57217, 57200, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57216, 57217, 57200, 57202, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57216, 57217, 57200, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57216, - 57217, 57200, 57204, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57216, 57217, 57200, 57204, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57216, - 57217, 57200, 57208, 57206, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57216, 57217, 57200, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57216, - 57217, 57200, 57208, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57088, 57216, 57217, 57219, 57208, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57216, - 57217, 57219, 57208, 57210, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57216, 57217, 57219, 57208, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57216, 57217, 57219, 57208, 57212, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57216, 57217, 57219, - 57208, 57212, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57088, 57216, 57217, 57219, 57208, 57212, 57214, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57088, - 57216, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57216, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57088, 57216, 57218, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57216, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57216, 57220, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57216, - 57220, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57216, 57224, 57222, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57216, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57088, 57216, 57224, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57088, 57216, - 57224, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57216, 57224, 57226, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57216, 57224, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57088, 57216, 57232, - 57228, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57088, 57216, 57232, 57228, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57088, 57216, 57232, 57233, 57230, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57359, 57216, 57232, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57232, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57216, 57232, 57234, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57232, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57359, 57216, 57232, 57236, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57216, 57232, 57236, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57232, 57240, 57238, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57232, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57359, 57216, 57248, - 57240, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57359, 57216, 57248, 57240, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57248, 57240, 57242, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57248, 57240, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57248, 57249, 57244, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57216, - 57248, 57249, 57244, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57248, 57249, 57244, 57246, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57359, 57216, 57248, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57248, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57216, 57248, 57250, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57248, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57359, 57216, 57248, 57252, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57216, 57248, 57252, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57248, 57256, 57254, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57248, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57359, 57216, 57248, - 57256, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57359, 57216, 57248, 57256, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57248, 57256, 57258, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57248, 57256, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57248, 57264, 57260, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57216, - 57248, 57264, 57260, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57248, 57264, 57265, 57262, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57248, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57359, 57216, 57280, 57264, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57216, 57280, 57264, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57280, 57264, 57266, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57280, 57264, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57216, - 57280, 57264, 57268, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57280, 57264, 57268, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57216, - 57280, 57264, 57272, 57270, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57280, 57264, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57216, - 57280, 57281, 57272, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57280, 57281, 57272, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57216, - 57280, 57281, 57272, 57274, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57280, 57281, 57272, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57280, 57281, 57272, 57276, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57216, 57280, 57281, - 57283, 57276, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57359, 57216, 57280, 57281, 57283, 57276, 57278, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57359, 57216, 57280, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57280, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57216, 57280, 57282, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57280, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57359, 57216, 57280, 57284, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57216, 57280, 57284, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57280, 57288, 57286, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57280, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57359, 57216, 57280, - 57288, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57359, 57216, 57280, 57288, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57280, 57288, 57290, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57280, 57288, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57280, 57296, 57292, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57216, - 57280, 57296, 57292, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57280, 57296, 57297, 57294, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57280, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57359, 57216, 57280, 57296, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57216, 57280, 57296, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57280, 57296, 57298, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57280, 57296, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57216, - 57280, 57296, 57300, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57280, 57296, 57300, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57216, - 57280, 57296, 57304, 57302, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57280, 57296, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57216, - 57280, 57312, 57304, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57216, 57280, 57312, 57304, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57216, - 57280, 57312, 57304, 57306, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57216, 57280, 57312, 57304, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57216, 57280, 57312, 57313, 57308, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57216, 57280, 57312, - 57313, 57308, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57359, 57216, 57280, 57312, 57313, 57308, 57310, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57375, 57280, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57359, 57375, 57280, 57312, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57375, 57280, 57312, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57375, 57280, 57312, 57314, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57375, 57280, 57312, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57375, - 57280, 57312, 57316, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57375, 57280, 57312, 57316, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57375, - 57280, 57312, 57320, 57318, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57375, 57280, 57312, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57375, - 57280, 57312, 57320, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57375, 57280, 57312, 57320, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57375, - 57280, 57312, 57320, 57322, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57375, 57280, 57312, 57320, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57375, 57280, 57312, 57328, 57324, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57375, 57280, 57312, - 57328, 57324, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57359, 57375, 57280, 57312, 57328, 57329, 57326, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57375, 57280, 57312, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57375, 57280, 57312, 57328, 0, - 1, 49152, 57344, 57345, 57347, 57351, 57359, 57375, - 57280, 57312, 57328, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57375, 57280, 57312, 57328, 57330, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57375, 57280, 57312, 57328, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57375, 57280, 57312, 57328, - 57332, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57359, 57375, 57280, 57312, 57328, 57332, 0, 1, - 49152, 57344, 57345, 57347, 57351, 57359, 57375, 57280, - 57312, 57328, 57336, 57334, 0, 1, 49152, 57344, - 57345, 57347, 57351, 57359, 57375, 57280, 57312, 57328, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57375, 57280, 57312, 57328, 57336, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57375, 57280, 57312, - 57328, 57336, 0, 1, 49152, 57344, 57345, 57347, - 57351, 57359, 57375, 57280, 57312, 57328, 57336, 57338, - 0, 1, 49152, 57344, 57345, 57347, 57351, 57359, - 57375, 57280, 57312, 57328, 57336, 0, 1, 49152, - 57344, 57345, 57347, 57351, 57359, 57375, 57280, 57312, - 57328, 57336, 57340, 0, 1, 49152, 57344, 57345, - 57347, 57351, 57359, 57375, 57280, 57312, 57328, 57336, - 57340, 0, 1, 49152, 57344, 57345, 57347, 57351, - 57359, 57375, 57280, 57312, 57328, 57336, 57340, 57342, - 0, 1, 49152, 0, 1, 49152, 57344, 0, - 1, 49152, 57344, 0, 1, 49152, 57344, 57346, - 0, 1, 49152, 57344, 0, 1, 49152, 57344, - 57348, 0, 1, 49152, 57344, 57348, 0, 1, - 49152, 57344, 57352, 57350, 0, 1, 49152, 57344, - 0, 1, 49152, 57344, 57352, 0, 1, 49152, - 57344, 57352, 0, 1, 49152, 57344, 57352, 57354, - 0, 1, 49152, 57344, 57352, 0, 1, 49152, - 57344, 57360, 57356, 0, 1, 49152, 57344, 57360, - 57356, 0, 1, 49152, 57344, 57360, 57361, 57358, - 0, 1, 49152, 57344, 0, 1, 49152, 57344, - 57360, 0, 1, 49152, 57344, 57360, 0, 1, - 49152, 57344, 57360, 57362, 0, 1, 49152, 57344, - 57360, 0, 1, 49152, 57344, 57360, 57364, 0, - 1, 49152, 57344, 57360, 57364, 0, 1, 49152, - 57344, 57360, 57368, 57366, 0, 1, 49152, 57344, - 57360, 0, 1, 49152, 57344, 57376, 57368, 0, - 1, 49152, 57344, 57376, 57368, 0, 1, 49152, - 57344, 57376, 57368, 57370, 0, 1, 49152, 57344, - 57376, 57368, 0, 1, 49152, 57344, 57376, 57377, - 57372, 0, 1, 49152, 57344, 57376, 57377, 57372, - 0, 1, 49152, 57344, 57376, 57377, 57372, 57374, - 0, 1, 49152, 57344, 0, 1, 49152, 57344, - 57376, 0, 1, 49152, 57344, 57376, 0, 1, - 49152, 57344, 57376, 57378, 0, 1, 49152, 57344, - 57376, 0, 1, 49152, 57344, 57376, 57380, 0, - 1, 49152, 57344, 57376, 57380, 0, 1, 49152, - 57344, 57376, 57384, 57382, 0, 1, 49152, 57344, - 57376, 0, 1, 49152, 57344, 57376, 57384, 0, - 1, 49152, 57344, 57376, 57384, 0, 1, 49152, - 57344, 57376, 57384, 57386, 0, 1, 49152, 57344, - 57376, 57384, 0, 1, 49152, 57344, 57376, 57392, - 57388, 0, 1, 49152, 57344, 57376, 57392, 57388, - 0, 1, 49152, 57344, 57376, 57392, 57393, 57390, - 0, 1, 49152, 57344, 57376, 0, 1, 49152, - 57344, 57408, 57392, 0, 1, 49152, 57344, 57408, - 57392, 0, 1, 49152, 57344, 57408, 57392, 57394, - 0, 1, 49152, 57344, 57408, 57392, 0, 1, - 49152, 57344, 57408, 57392, 57396, 0, 1, 49152, - 57344, 57408, 57392, 57396, 0, 1, 49152, 57344, - 57408, 57392, 57400, 57398, 0, 1, 49152, 57344, - 57408, 57392, 0, 1, 49152, 57344, 57408, 57409, - 57400, 0, 1, 49152, 57344, 57408, 57409, 57400, - 0, 1, 49152, 57344, 57408, 57409, 57400, 57402, - 0, 1, 49152, 57344, 57408, 57409, 57400, 0, - 1, 49152, 57344, 57408, 57409, 57400, 57404, 0, - 1, 49152, 57344, 57408, 57409, 57411, 57404, 0, - 1, 49152, 57344, 57408, 57409, 57411, 57404, 57406, - 0, 1, 49152, 57344, 0, 1, 49152, 57344, - 57408, 0, 1, 49152, 57344, 57408, 0, 1, - 49152, 57344, 57408, 57410, 0, 1, 49152, 57344, - 57408, 0, 1, 49152, 57344, 57408, 57412, 0, - 1, 49152, 57344, 57408, 57412, 0, 1, 49152, - 57344, 57408, 57416, 57414, 0, 1, 49152, 57344, - 57408, 0, 1, 49152, 57344, 57408, 57416, 0, - 1, 49152, 57344, 57408, 57416, 0, 1, 49152, - 57344, 57408, 57416, 57418, 0, 1, 49152, 57344, - 57408, 57416, 0, 1, 49152, 57344, 57408, 57424, - 57420, 0, 1, 49152, 57344, 57408, 57424, 57420, - 0, 1, 49152, 57344, 57408, 57424, 57425, 57422, - 0, 1, 49152, 57344, 57408, 0, 1, 49152, - 57344, 57408, 57424, 0, 1, 49152, 57344, 57408, - 57424, 0, 1, 49152, 57344, 57408, 57424, 57426, - 0, 1, 49152, 57344, 57408, 57424, 0, 1, - 49152, 57344, 57408, 57424, 57428, 0, 1, 49152, - 57344, 57408, 57424, 57428, 0, 1, 49152, 57344, - 57408, 57424, 57432, 57430, 0, 1, 49152, 57344, - 57408, 57424, 0, 1, 49152, 57344, 57408, 57440, - 57432, 0, 1, 49152, 57344, 57408, 57440, 57432, - 0, 1, 49152, 57344, 57408, 57440, 57432, 57434, - 0, 1, 49152, 57344, 57408, 57440, 57432, 0, - 1, 49152, 57344, 57408, 57440, 57441, 57436, 0, - 1, 49152, 57344, 57408, 57440, 57441, 57436, 0, - 1, 49152, 57344, 57408, 57440, 57441, 57436, 57438, - 0, 1, 49152, 57344, 57408, 0, 1, 49152, - 57344, 57472, 57440, 0, 1, 49152, 57344, 57472, - 57440, 0, 1, 49152, 57344, 57472, 57440, 57442, - 0, 1, 49152, 57344, 57472, 57440, 0, 1, - 49152, 57344, 57472, 57440, 57444, 0, 1, 49152, - 57344, 57472, 57440, 57444, 0, 1, 49152, 57344, - 57472, 57440, 57448, 57446, 0, 1, 49152, 57344, - 57472, 57440, 0, 1, 49152, 57344, 57472, 57440, - 57448, 0, 1, 49152, 57344, 57472, 57440, 57448, - 0, 1, 49152, 57344, 57472, 57440, 57448, 57450, - 0, 1, 49152, 57344, 57472, 57440, 57448, 0, - 1, 49152, 57344, 57472, 57440, 57456, 57452, 0, - 1, 49152, 57344, 57472, 57440, 57456, 57452, 0, - 1, 49152, 57344, 57472, 57440, 57456, 57457, 57454, - 0, 1, 49152, 57344, 57472, 57440, 0, 1, - 49152, 57344, 57472, 57473, 57456, 0, 1, 49152, - 57344, 57472, 57473, 57456, 0, 1, 49152, 57344, - 57472, 57473, 57456, 57458, 0, 1, 49152, 57344, - 57472, 57473, 57456, 0, 1, 49152, 57344, 57472, - 57473, 57456, 57460, 0, 1, 49152, 57344, 57472, - 57473, 57456, 57460, 0, 1, 49152, 57344, 57472, - 57473, 57456, 57464, 57462, 0, 1, 49152, 57344, - 57472, 57473, 57456, 0, 1, 49152, 57344, 57472, - 57473, 57456, 57464, 0, 1, 49152, 57344, 57472, - 57473, 57475, 57464, 0, 1, 49152, 57344, 57472, - 57473, 57475, 57464, 57466, 0, 1, 49152, 57344, - 57472, 57473, 57475, 57464, 0, 1, 49152, 57344, - 57472, 57473, 57475, 57464, 57468, 0, 1, 49152, - 57344, 57472, 57473, 57475, 57464, 57468, 0, 1, - 49152, 57344, 57472, 57473, 57475, 57464, 57468, 57470, - 0, 1, 49152, 57344, 0, 1, 49152, 57344, - 57472, 0, 1, 49152, 57344, 57472, 0, 1, - 49152, 57344, 57472, 57474, 0, 1, 49152, 57344, - 57472, 0, 1, 49152, 57344, 57472, 57476, 0, - 1, 49152, 57344, 57472, 57476, 0, 1, 49152, - 57344, 57472, 57480, 57478, 0, 1, 49152, 57344, - 57472, 0, 1, 49152, 57344, 57472, 57480, 0, - 1, 49152, 57344, 57472, 57480, 0, 1, 49152, - 57344, 57472, 57480, 57482, 0, 1, 49152, 57344, - 57472, 57480, 0, 1, 49152, 57344, 57472, 57488, - 57484, 0, 1, 49152, 57344, 57472, 57488, 57484, - 0, 1, 49152, 57344, 57472, 57488, 57489, 57486, - 0, 1, 49152, 57344, 57472, 0, 1, 49152, - 57344, 57472, 57488, 0, 1, 49152, 57344, 57472, - 57488, 0, 1, 49152, 57344, 57472, 57488, 57490, - 0, 1, 49152, 57344, 57472, 57488, 0, 1, - 49152, 57344, 57472, 57488, 57492, 0, 1, 49152, - 57344, 57472, 57488, 57492, 0, 1, 49152, 57344, - 57472, 57488, 57496, 57494, 0, 1, 49152, 57344, - 57472, 57488, 0, 1, 49152, 57344, 57472, 57504, - 57496, 0, 1, 49152, 57344, 57472, 57504, 57496, - 0, 1, 49152, 57344, 57472, 57504, 57496, 57498, - 0, 1, 49152, 57344, 57472, 57504, 57496, 0, - 1, 49152, 57344, 57472, 57504, 57505, 57500, 0, - 1, 49152, 57344, 57472, 57504, 57505, 57500, 0, - 1, 49152, 57344, 57472, 57504, 57505, 57500, 57502, - 0, 1, 49152, 57344, 57472, 0, 1, 49152, - 57344, 57472, 57504, 0, 1, 49152, 57344, 57472, - 57504, 0, 1, 49152, 57344, 57472, 57504, 57506, - 0, 1, 49152, 57344, 57472, 57504, 0, 1, - 49152, 57344, 57472, 57504, 57508, 0, 1, 49152, - 57344, 57472, 57504, 57508, 0, 1, 49152, 57344, - 57472, 57504, 57512, 57510, 0, 1, 49152, 57344, - 57472, 57504, 0, 1, 49152, 57344, 57472, 57504, - 57512, 0, 1, 49152, 57344, 57472, 57504, 57512, - 0, 1, 49152, 57344, 57472, 57504, 57512, 57514, - 0, 1, 49152, 57344, 57472, 57504, 57512, 0, - 1, 49152, 57344, 57472, 57504, 57520, 57516, 0, - 1, 49152, 57344, 57472, 57504, 57520, 57516, 0, - 1, 49152, 57344, 57472, 57504, 57520, 57521, 57518, - 0, 1, 49152, 57344, 57472, 57504, 0, 1, - 49152, 57344, 57472, 57536, 57520, 0, 1, 49152, - 57344, 57472, 57536, 57520, 0, 1, 49152, 57344, - 57472, 57536, 57520, 57522, 0, 1, 49152, 57344, - 57472, 57536, 57520, 0, 1, 49152, 57344, 57472, - 57536, 57520, 57524, 0, 1, 49152, 57344, 57472, - 57536, 57520, 57524, 0, 1, 49152, 57344, 57472, - 57536, 57520, 57528, 57526, 0, 1, 49152, 57344, - 57472, 57536, 57520, 0, 1, 49152, 57344, 57472, - 57536, 57537, 57528, 0, 1, 49152, 57344, 57472, - 57536, 57537, 57528, 0, 1, 49152, 57344, 57472, - 57536, 57537, 57528, 57530, 0, 1, 49152, 57344, - 57472, 57536, 57537, 57528, 0, 1, 49152, 57344, - 57472, 57536, 57537, 57528, 57532, 0, 1, 49152, - 57344, 57472, 57536, 57537, 57539, 57532, 0, 1, - 49152, 57344, 57472, 57536, 57537, 57539, 57532, 57534, - 0, 1, 49152, 57344, 57472, 0, 1, 49152, - 57344, 57600, 57536, 0, 1, 49152, 57344, 57600, - 57536, 0, 1, 49152, 57344, 57600, 57536, 57538, - 0, 1, 49152, 57344, 57600, 57536, 0, 1, - 49152, 57344, 57600, 57536, 57540, 0, 1, 49152, - 57344, 57600, 57536, 57540, 0, 1, 49152, 57344, - 57600, 57536, 57544, 57542, 0, 1, 49152, 57344, - 57600, 57536, 0, 1, 49152, 57344, 57600, 57536, - 57544, 0, 1, 49152, 57344, 57600, 57536, 57544, - 0, 1, 49152, 57344, 57600, 57536, 57544, 57546, - 0, 1, 49152, 57344, 57600, 57536, 57544, 0, - 1, 49152, 57344, 57600, 57536, 57552, 57548, 0, - 1, 49152, 57344, 57600, 57536, 57552, 57548, 0, - 1, 49152, 57344, 57600, 57536, 57552, 57553, 57550, - 0, 1, 49152, 57344, 57600, 57536, 0, 1, - 49152, 57344, 57600, 57536, 57552, 0, 1, 49152, - 57344, 57600, 57536, 57552, 0, 1, 49152, 57344, - 57600, 57536, 57552, 57554, 0, 1, 49152, 57344, - 57600, 57536, 57552, 0, 1, 49152, 57344, 57600, - 57536, 57552, 57556, 0, 1, 49152, 57344, 57600, - 57536, 57552, 57556, 0, 1, 49152, 57344, 57600, - 57536, 57552, 57560, 57558, 0, 1, 49152, 57344, - 57600, 57536, 57552, 0, 1, 49152, 57344, 57600, - 57536, 57568, 57560, 0, 1, 49152, 57344, 57600, - 57536, 57568, 57560, 0, 1, 49152, 57344, 57600, - 57536, 57568, 57560, 57562, 0, 1, 49152, 57344, - 57600, 57536, 57568, 57560, 0, 1, 49152, 57344, - 57600, 57536, 57568, 57569, 57564, 0, 1, 49152, - 57344, 57600, 57536, 57568, 57569, 57564, 0, 1, - 49152, 57344, 57600, 57536, 57568, 57569, 57564, 57566, - 0, 1, 49152, 57344, 57600, 57536, 0, 1, - 49152, 57344, 57600, 57601, 57568, 0, 1, 49152, - 57344, 57600, 57601, 57568, 0, 1, 49152, 57344, - 57600, 57601, 57568, 57570, 0, 1, 49152, 57344, - 57600, 57601, 57568, 0, 1, 49152, 57344, 57600, - 57601, 57568, 57572, 0, 1, 49152, 57344, 57600, - 57601, 57568, 57572, 0, 1, 49152, 57344, 57600, - 57601, 57568, 57576, 57574, 0, 1, 49152, 57344, - 57600, 57601, 57568, 0, 1, 49152, 57344, 57600, - 57601, 57568, 57576, 0, 1, 49152, 57344, 57600, - 57601, 57568, 57576, 0, 1, 49152, 57344, 57600, - 57601, 57568, 57576, 57578, 0, 1, 49152, 57344, - 57600, 57601, 57568, 57576, 0, 1, 49152, 57344, - 57600, 57601, 57568, 57584, 57580, 0, 1, 49152, - 57344, 57600, 57601, 57568, 57584, 57580, 0, 1, - 49152, 57344, 57600, 57601, 57568, 57584, 57585, 57582, - 0, 1, 49152, 57344, 57600, 57601, 57568, 0, - 1, 49152, 57344, 57600, 57601, 57568, 57584, 0, - 1, 49152, 57344, 57600, 57601, 57603, 57584, 0, - 1, 49152, 57344, 57600, 57601, 57603, 57584, 57586, - 0, 1, 49152, 57344, 57600, 57601, 57603, 57584, - 0, 1, 49152, 57344, 57600, 57601, 57603, 57584, - 57588, 0, 1, 49152, 57344, 57600, 57601, 57603, - 57584, 57588, 0, 1, 49152, 57344, 57600, 57601, - 57603, 57584, 57592, 57590, 0, 1, 49152, 57344, - 57600, 57601, 57603, 57584, 0, 1, 49152, 57344, - 57600, 57601, 57603, 57584, 57592, 0, 1, 49152, - 57344, 57600, 57601, 57603, 57584, 57592, 0, 1, - 49152, 57344, 57600, 57601, 57603, 57584, 57592, 57594, - 0, 1, 49152, 57344, 57600, 57601, 57603, 57607, - 57592, 0, 1, 49152, 57344, 57600, 57601, 57603, - 57607, 57592, 57596, 0, 1, 49152, 57344, 57600, - 57601, 57603, 57607, 57592, 57596, 0, 1, 49152, - 57344, 57600, 57601, 57603, 57607, 57592, 57596, 57598, - 0, 1, 49152, 57344, 0, 1, 49152, 57344, - 57600, 0, 1, 49152, 57344, 57600, 0, 1, - 49152, 57344, 57600, 57602, 0, 1, 49152, 57344, - 57600, 0, 1, 49152, 57344, 57600, 57604, 0, - 1, 49152, 57344, 57600, 57604, 0, 1, 49152, - 57344, 57600, 57608, 57606, 0, 1, 49152, 57344, - 57600, 0, 1, 49152, 57344, 57600, 57608, 0, - 1, 49152, 57344, 57600, 57608, 0, 1, 49152, - 57344, 57600, 57608, 57610, 0, 1, 49152, 57344, - 57600, 57608, 0, 1, 49152, 57344, 57600, 57616, - 57612, 0, 1, 49152, 57344, 57600, 57616, 57612, - 0, 1, 49152, 57344, 57600, 57616, 57617, 57614, - 0, 1, 49152, 57344, 57600, 0, 1, 49152, - 57344, 57600, 57616, 0, 1, 49152, 57344, 57600, - 57616, 0, 1, 49152, 57344, 57600, 57616, 57618, - 0, 1, 49152, 57344, 57600, 57616, 0, 1, - 49152, 57344, 57600, 57616, 57620, 0, 1, 49152, - 57344, 57600, 57616, 57620, 0, 1, 49152, 57344, - 57600, 57616, 57624, 57622, 0, 1, 49152, 57344, - 57600, 57616, 0, 1, 49152, 57344, 57600, 57632, - 57624, 0, 1, 49152, 57344, 57600, 57632, 57624, - 0, 1, 49152, 57344, 57600, 57632, 57624, 57626, - 0, 1, 49152, 57344, 57600, 57632, 57624, 0, - 1, 49152, 57344, 57600, 57632, 57633, 57628, 0, - 1, 49152, 57344, 57600, 57632, 57633, 57628, 0, - 1, 49152, 57344, 57600, 57632, 57633, 57628, 57630, - 0, 1, 49152, 57344, 57600, 0, 1, 49152, - 57344, 57600, 57632, 0, 1, 49152, 57344, 57600, - 57632, 0, 1, 49152, 57344, 57600, 57632, 57634, - 0, 1, 49152, 57344, 57600, 57632, 0, 1, - 49152, 57344, 57600, 57632, 57636, 0, 1, 49152, - 57344, 57600, 57632, 57636, 0, 1, 49152, 57344, - 57600, 57632, 57640, 57638, 0, 1, 49152, 57344, - 57600, 57632, 0, 1, 49152, 57344, 57600, 57632, - 57640, 0, 1, 49152, 57344, 57600, 57632, 57640, - 0, 1, 49152, 57344, 57600, 57632, 57640, 57642, - 0, 1, 49152, 57344, 57600, 57632, 57640, 0, - 1, 49152, 57344, 57600, 57632, 57648, 57644, 0, - 1, 49152, 57344, 57600, 57632, 57648, 57644, 0, - 1, 49152, 57344, 57600, 57632, 57648, 57649, 57646, - 0, 1, 49152, 57344, 57600, 57632, 0, 1, - 49152, 57344, 57600, 57664, 57648, 0, 1, 49152, - 57344, 57600, 57664, 57648, 0, 1, 49152, 57344, - 57600, 57664, 57648, 57650, 0, 1, 49152, 57344, - 57600, 57664, 57648, 0, 1, 49152, 57344, 57600, - 57664, 57648, 57652, 0, 1, 49152, 57344, 57600, - 57664, 57648, 57652, 0, 1, 49152, 57344, 57600, - 57664, 57648, 57656, 57654, 0, 1, 49152, 57344, - 57600, 57664, 57648, 0, 1, 49152, 57344, 57600, - 57664, 57665, 57656, 0, 1, 49152, 57344, 57600, - 57664, 57665, 57656, 0, 1, 49152, 57344, 57600, - 57664, 57665, 57656, 57658, 0, 1, 49152, 57344, - 57600, 57664, 57665, 57656, 0, 1, 49152, 57344, - 57600, 57664, 57665, 57656, 57660, 0, 1, 49152, - 57344, 57600, 57664, 57665, 57667, 57660, 0, 1, - 49152, 57344, 57600, 57664, 57665, 57667, 57660, 57662, - 0, 1, 49152, 57344, 57600, 0, 1, 49152, - 57344, 57600, 57664, 0, 1, 49152, 57344, 57600, - 57664, 0, 1, 49152, 57344, 57600, 57664, 57666, - 0, 1, 49152, 57344, 57600, 57664, 0, 1, - 49152, 57344, 57600, 57664, 57668, 0, 1, 49152, - 57344, 57600, 57664, 57668, 0, 1, 49152, 57344, - 57600, 57664, 57672, 57670, 0, 1, 49152, 57344, - 57600, 57664, 0, 1, 49152, 57344, 57600, 57664, - 57672, 0, 1, 49152, 57344, 57600, 57664, 57672, - 0, 1, 49152, 57344, 57600, 57664, 57672, 57674, - 0, 1, 49152, 57344, 57600, 57664, 57672, 0, - 1, 49152, 57344, 57600, 57664, 57680, 57676, 0, - 1, 49152, 57344, 57600, 57664, 57680, 57676, 0, - 1, 49152, 57344, 57600, 57664, 57680, 57681, 57678, - 0, 1, 49152, 57344, 57600, 57664, 0, 1, - 49152, 57344, 57600, 57664, 57680, 0, 1, 49152, - 57344, 57600, 57664, 57680, 0, 1, 49152, 57344, - 57600, 57664, 57680, 57682, 0, 1, 49152, 57344, - 57600, 57664, 57680, 0, 1, 49152, 57344, 57600, - 57664, 57680, 57684, 0, 1, 49152, 57344, 57600, - 57664, 57680, 57684, 0, 1, 49152, 57344, 57600, - 57664, 57680, 57688, 57686, 0, 1, 49152, 57344, - 57600, 57664, 57680, 0, 1, 49152, 57344, 57600, - 57664, 57696, 57688, 0, 1, 49152, 57344, 57600, - 57664, 57696, 57688, 0, 1, 49152, 57344, 57600, - 57664, 57696, 57688, 57690, 0, 1, 49152, 57344, - 57600, 57664, 57696, 57688, 0, 1, 49152, 57344, - 57600, 57664, 57696, 57697, 57692, 0, 1, 49152, - 57344, 57600, 57664, 57696, 57697, 57692, 0, 1, - 49152, 57344, 57600, 57664, 57696, 57697, 57692, 57694, - 0, 1, 49152, 57344, 57600, 57664, 0, 1, - 49152, 57344, 57600, 57728, 57696, 0, 1, 49152, - 57344, 57600, 57728, 57696, 0, 1, 49152, 57344, - 57600, 57728, 57696, 57698, 0, 1, 49152, 57344, - 57600, 57728, 57696, 0, 1, 49152, 57344, 57600, - 57728, 57696, 57700, 0, 1, 49152, 57344, 57600, - 57728, 57696, 57700, 0, 1, 49152, 57344, 57600, - 57728, 57696, 57704, 57702, 0, 1, 49152, 57344, - 57600, 57728, 57696, 0, 1, 49152, 57344, 57600, - 57728, 57696, 57704, 0, 1, 49152, 57344, 57600, - 57728, 57696, 57704, 0, 1, 49152, 57344, 57600, - 57728, 57696, 57704, 57706, 0, 1, 49152, 57344, - 57600, 57728, 57696, 57704, 0, 1, 49152, 57344, - 57600, 57728, 57696, 57712, 57708, 0, 1, 49152, - 57344, 57600, 57728, 57696, 57712, 57708, 0, 1, - 49152, 57344, 57600, 57728, 57696, 57712, 57713, 57710, - 0, 1, 49152, 57344, 57600, 57728, 57696, 0, - 1, 49152, 57344, 57600, 57728, 57729, 57712, 0, - 1, 49152, 57344, 57600, 57728, 57729, 57712, 0, - 1, 49152, 57344, 57600, 57728, 57729, 57712, 57714, - 0, 1, 49152, 57344, 57600, 57728, 57729, 57712, - 0, 1, 49152, 57344, 57600, 57728, 57729, 57712, - 57716, 0, 1, 49152, 57344, 57600, 57728, 57729, - 57712, 57716, 0, 1, 49152, 57344, 57600, 57728, - 57729, 57712, 57720, 57718, 0, 1, 49152, 57344, - 57600, 57728, 57729, 57712, 0, 1, 49152, 57344, - 57600, 57728, 57729, 57712, 57720, 0, 1, 49152, - 57344, 57600, 57728, 57729, 57731, 57720, 0, 1, - 49152, 57344, 57600, 57728, 57729, 57731, 57720, 57722, - 0, 1, 49152, 57344, 57600, 57728, 57729, 57731, - 57720, 0, 1, 49152, 57344, 57600, 57728, 57729, - 57731, 57720, 57724, 0, 1, 49152, 57344, 57600, - 57728, 57729, 57731, 57720, 57724, 0, 1, 49152, - 57344, 57600, 57728, 57729, 57731, 57720, 57724, 57726, - 0, 1, 49152, 57344, 57600, 0, 1, 49152, - 57344, 57856, 57728, 0, 1, 49152, 57344, 57856, - 57728, 0, 1, 49152, 57344, 57856, 57728, 57730, - 0, 1, 49152, 57344, 57856, 57728, 0, 1, - 49152, 57344, 57856, 57728, 57732, 0, 1, 49152, - 57344, 57856, 57728, 57732, 0, 1, 49152, 57344, - 57856, 57728, 57736, 57734, 0, 1, 49152, 57344, - 57856, 57728, 0, 1, 49152, 57344, 57856, 57728, - 57736, 0, 1, 49152, 57344, 57856, 57728, 57736, - 0, 1, 49152, 57344, 57856, 57728, 57736, 57738, - 0, 1, 49152, 57344, 57856, 57728, 57736, 0, - 1, 49152, 57344, 57856, 57728, 57744, 57740, 0, - 1, 49152, 57344, 57856, 57728, 57744, 57740, 0, - 1, 49152, 57344, 57856, 57728, 57744, 57745, 57742, - 0, 1, 49152, 57344, 57856, 57728, 0, 1, - 49152, 57344, 57856, 57728, 57744, 0, 1, 49152, - 57344, 57856, 57728, 57744, 0, 1, 49152, 57344, - 57856, 57728, 57744, 57746, 0, 1, 49152, 57344, - 57856, 57728, 57744, 0, 1, 49152, 57344, 57856, - 57728, 57744, 57748, 0, 1, 49152, 57344, 57856, - 57728, 57744, 57748, 0, 1, 49152, 57344, 57856, - 57728, 57744, 57752, 57750, 0, 1, 49152, 57344, - 57856, 57728, 57744, 0, 1, 49152, 57344, 57856, - 57728, 57760, 57752, 0, 1, 49152, 57344, 57856, - 57728, 57760, 57752, 0, 1, 49152, 57344, 57856, - 57728, 57760, 57752, 57754, 0, 1, 49152, 57344, - 57856, 57728, 57760, 57752, 0, 1, 49152, 57344, - 57856, 57728, 57760, 57761, 57756, 0, 1, 49152, - 57344, 57856, 57728, 57760, 57761, 57756, 0, 1, - 49152, 57344, 57856, 57728, 57760, 57761, 57756, 57758, - 0, 1, 49152, 57344, 57856, 57728, 0, 1, - 49152, 57344, 57856, 57728, 57760, 0, 1, 49152, - 57344, 57856, 57728, 57760, 0, 1, 49152, 57344, - 57856, 57728, 57760, 57762, 0, 1, 49152, 57344, - 57856, 57728, 57760, 0, 1, 49152, 57344, 57856, - 57728, 57760, 57764, 0, 1, 49152, 57344, 57856, - 57728, 57760, 57764, 0, 1, 49152, 57344, 57856, - 57728, 57760, 57768, 57766, 0, 1, 49152, 57344, - 57856, 57728, 57760, 0, 1, 49152, 57344, 57856, - 57728, 57760, 57768, 0, 1, 49152, 57344, 57856, - 57728, 57760, 57768, 0, 1, 49152, 57344, 57856, - 57728, 57760, 57768, 57770, 0, 1, 49152, 57344, - 57856, 57728, 57760, 57768, 0, 1, 49152, 57344, - 57856, 57728, 57760, 57776, 57772, 0, 1, 49152, - 57344, 57856, 57728, 57760, 57776, 57772, 0, 1, - 49152, 57344, 57856, 57728, 57760, 57776, 57777, 57774, - 0, 1, 49152, 57344, 57856, 57728, 57760, 0, - 1, 49152, 57344, 57856, 57728, 57792, 57776, 0, - 1, 49152, 57344, 57856, 57728, 57792, 57776, 0, - 1, 49152, 57344, 57856, 57728, 57792, 57776, 57778, - 0, 1, 49152, 57344, 57856, 57728, 57792, 57776, - 0, 1, 49152, 57344, 57856, 57728, 57792, 57776, - 57780, 0, 1, 49152, 57344, 57856, 57728, 57792, - 57776, 57780, 0, 1, 49152, 57344, 57856, 57728, - 57792, 57776, 57784, 57782, 0, 1, 49152, 57344, - 57856, 57728, 57792, 57776, 0, 1, 49152, 57344, - 57856, 57728, 57792, 57793, 57784, 0, 1, 49152, - 57344, 57856, 57728, 57792, 57793, 57784, 0, 1, - 49152, 57344, 57856, 57728, 57792, 57793, 57784, 57786, - 0, 1, 49152, 57344, 57856, 57728, 57792, 57793, - 57784, 0, 1, 49152, 57344, 57856, 57728, 57792, - 57793, 57784, 57788, 0, 1, 49152, 57344, 57856, - 57728, 57792, 57793, 57795, 57788, 0, 1, 49152, - 57344, 57856, 57728, 57792, 57793, 57795, 57788, 57790, - 0, 1, 49152, 57344, 57856, 57728, 0, 1, - 49152, 57344, 57856, 57857, 57792, 0, 1, 49152, - 57344, 57856, 57857, 57792, 0, 1, 49152, 57344, - 57856, 57857, 57792, 57794, 0, 1, 49152, 57344, - 57856, 57857, 57792, 0, 1, 49152, 57344, 57856, - 57857, 57792, 57796, 0, 1, 49152, 57344, 57856, - 57857, 57792, 57796, 0, 1, 49152, 57344, 57856, - 57857, 57792, 57800, 57798, 0, 1, 49152, 57344, - 57856, 57857, 57792, 0, 1, 49152, 57344, 57856, - 57857, 57792, 57800, 0, 1, 49152, 57344, 57856, - 57857, 57792, 57800, 0, 1, 49152, 57344, 57856, - 57857, 57792, 57800, 57802, 0, 1, 49152, 57344, - 57856, 57857, 57792, 57800, 0, 1, 49152, 57344, - 57856, 57857, 57792, 57808, 57804, 0, 1, 49152, - 57344, 57856, 57857, 57792, 57808, 57804, 0, 1, - 49152, 57344, 57856, 57857, 57792, 57808, 57809, 57806, - 0, 1, 49152, 57344, 57856, 57857, 57792, 0, - 1, 49152, 57344, 57856, 57857, 57792, 57808, 0, - 1, 49152, 57344, 57856, 57857, 57792, 57808, 0, - 1, 49152, 57344, 57856, 57857, 57792, 57808, 57810, - 0, 1, 49152, 57344, 57856, 57857, 57792, 57808, - 0, 1, 49152, 57344, 57856, 57857, 57792, 57808, - 57812, 0, 1, 49152, 57344, 57856, 57857, 57792, - 57808, 57812, 0, 1, 49152, 57344, 57856, 57857, - 57792, 57808, 57816, 57814, 0, 1, 49152, 57344, - 57856, 57857, 57792, 57808, 0, 1, 49152, 57344, - 57856, 57857, 57792, 57824, 57816, 0, 1, 49152, - 57344, 57856, 57857, 57792, 57824, 57816, 0, 1, - 49152, 57344, 57856, 57857, 57792, 57824, 57816, 57818, - 0, 1, 49152, 57344, 57856, 57857, 57792, 57824, - 57816, 0, 1, 49152, 57344, 57856, 57857, 57792, - 57824, 57825, 57820, 0, 1, 49152, 57344, 57856, - 57857, 57792, 57824, 57825, 57820, 0, 1, 49152, - 57344, 57856, 57857, 57792, 57824, 57825, 57820, 57822, - 0, 1, 49152, 57344, 57856, 57857, 57792, 0, - 1, 49152, 57344, 57856, 57857, 57792, 57824, 0, - 1, 49152, 57344, 57856, 57857, 57859, 57824, 0, - 1, 49152, 57344, 57856, 57857, 57859, 57824, 57826, - 0, 1, 49152, 57344, 57856, 57857, 57859, 57824, - 0, 1, 49152, 57344, 57856, 57857, 57859, 57824, - 57828, 0, 1, 49152, 57344, 57856, 57857, 57859, - 57824, 57828, 0, 1, 49152, 57344, 57856, 57857, - 57859, 57824, 57832, 57830, 0, 1, 49152, 57344, - 57856, 57857, 57859, 57824, 0, 1, 49152, 57344, - 57856, 57857, 57859, 57824, 57832, 0, 1, 49152, - 57344, 57856, 57857, 57859, 57824, 57832, 0, 1, - 49152, 57344, 57856, 57857, 57859, 57824, 57832, 57834, - 0, 1, 49152, 57344, 57856, 57857, 57859, 57824, - 57832, 0, 1, 49152, 57344, 57856, 57857, 57859, - 57824, 57840, 57836, 0, 1, 49152, 57344, 57856, - 57857, 57859, 57824, 57840, 57836, 0, 1, 49152, - 57344, 57856, 57857, 57859, 57824, 57840, 57841, 57838, - 0, 1, 49152, 57344, 57856, 57857, 57859, 57824, - 0, 1, 49152, 57344, 57856, 57857, 57859, 57824, - 57840, 0, 1, 49152, 57344, 57856, 57857, 57859, - 57824, 57840, 0, 1, 49152, 57344, 57856, 57857, - 57859, 57824, 57840, 57842, 0, 1, 49152, 57344, - 57856, 57857, 57859, 57863, 57840, 0, 1, 49152, - 57344, 57856, 57857, 57859, 57863, 57840, 57844, 0, - 1, 49152, 57344, 57856, 57857, 57859, 57863, 57840, - 57844, 0, 1, 49152, 57344, 57856, 57857, 57859, - 57863, 57840, 57848, 57846, 0, 1, 49152, 57344, - 57856, 57857, 57859, 57863, 57840, 0, 1, 49152, - 57344, 57856, 57857, 57859, 57863, 57840, 57848, 0, - 1, 49152, 57344, 57856, 57857, 57859, 57863, 57840, - 57848, 0, 1, 49152, 57344, 57856, 57857, 57859, - 57863, 57840, 57848, 57850, 0, 1, 49152, 57344, - 57856, 57857, 57859, 57863, 57840, 57848, 0, 1, - 49152, 57344, 57856, 57857, 57859, 57863, 57840, 57848, - 57852, 0, 1, 49152, 57344, 57856, 57857, 57859, - 57863, 57840, 57848, 57852, 0, 1, 49152, 57344, - 57856, 57857, 57859, 57863, 57840, 57848, 57852, 57854, - 0, 1, 49152, 57344, 0, 1, 49152, 57344, - 57856, 0, 1, 49152, 57344, 57856, 0, 1, - 49152, 57344, 57856, 57858, 0, 1, 49152, 57344, - 57856, 0, 1, 49152, 57344, 57856, 57860, 0, - 1, 49152, 57344, 57856, 57860, 0, 1, 49152, - 57344, 57856, 57864, 57862, 0, 1, 49152, 57344, - 57856, 0, 1, 49152, 57344, 57856, 57864, 0, - 1, 49152, 57344, 57856, 57864, 0, 1, 49152, - 57344, 57856, 57864, 57866, 0, 1, 49152, 57344, - 57856, 57864, 0, 1, 49152, 57344, 57856, 57872, - 57868, 0, 1, 49152, 57344, 57856, 57872, 57868, - 0, 1, 49152, 57344, 57856, 57872, 57873, 57870, - 0, 1, 49152, 57344, 57856, 0, 1, 49152, - 57344, 57856, 57872, 0, 1, 49152, 57344, 57856, - 57872, 0, 1, 49152, 57344, 57856, 57872, 57874, - 0, 1, 49152, 57344, 57856, 57872, 0, 1, - 49152, 57344, 57856, 57872, 57876, 0, 1, 49152, - 57344, 57856, 57872, 57876, 0, 1, 49152, 57344, - 57856, 57872, 57880, 57878, 0, 1, 49152, 57344, - 57856, 57872, 0, 1, 49152, 57344, 57856, 57888, - 57880, 0, 1, 49152, 57344, 57856, 57888, 57880, - 0, 1, 49152, 57344, 57856, 57888, 57880, 57882, - 0, 1, 49152, 57344, 57856, 57888, 57880, 0, - 1, 49152, 57344, 57856, 57888, 57889, 57884, 0, - 1, 49152, 57344, 57856, 57888, 57889, 57884, 0, - 1, 49152, 57344, 57856, 57888, 57889, 57884, 57886, - 0, 1, 49152, 57344, 57856, 0, 1, 49152, - 57344, 57856, 57888, 0, 1, 49152, 57344, 57856, - 57888, 0, 1, 49152, 57344, 57856, 57888, 57890, - 0, 1, 49152, 57344, 57856, 57888, 0, 1, - 49152, 57344, 57856, 57888, 57892, 0, 1, 49152, - 57344, 57856, 57888, 57892, 0, 1, 49152, 57344, - 57856, 57888, 57896, 57894, 0, 1, 49152, 57344, - 57856, 57888, 0, 1, 49152, 57344, 57856, 57888, - 57896, 0, 1, 49152, 57344, 57856, 57888, 57896, - 0, 1, 49152, 57344, 57856, 57888, 57896, 57898, - 0, 1, 49152, 57344, 57856, 57888, 57896, 0, - 1, 49152, 57344, 57856, 57888, 57904, 57900, 0, - 1, 49152, 57344, 57856, 57888, 57904, 57900, 0, - 1, 49152, 57344, 57856, 57888, 57904, 57905, 57902, - 0, 1, 49152, 57344, 57856, 57888, 0, 1, - 49152, 57344, 57856, 57920, 57904, 0, 1, 49152, - 57344, 57856, 57920, 57904, 0, 1, 49152, 57344, - 57856, 57920, 57904, 57906, 0, 1, 49152, 57344, - 57856, 57920, 57904, 0, 1, 49152, 57344, 57856, - 57920, 57904, 57908, 0, 1, 49152, 57344, 57856, - 57920, 57904, 57908, 0, 1, 49152, 57344, 57856, - 57920, 57904, 57912, 57910, 0, 1, 49152, 57344, - 57856, 57920, 57904, 0, 1, 49152, 57344, 57856, - 57920, 57921, 57912, 0, 1, 49152, 57344, 57856, - 57920, 57921, 57912, 0, 1, 49152, 57344, 57856, - 57920, 57921, 57912, 57914, 0, 1, 49152, 57344, - 57856, 57920, 57921, 57912, 0, 1, 49152, 57344, - 57856, 57920, 57921, 57912, 57916, 0, 1, 49152, - 57344, 57856, 57920, 57921, 57923, 57916, 0, 1, - 49152, 57344, 57856, 57920, 57921, 57923, 57916, 57918, - 0, 1, 49152, 57344, 57856, 0, 1, 49152, - 57344, 57856, 57920, 0, 1, 49152, 57344, 57856, - 57920, 0, 1, 49152, 57344, 57856, 57920, 57922, - 0, 1, 49152, 57344, 57856, 57920, 0, 1, - 49152, 57344, 57856, 57920, 57924, 0, 1, 49152, - 57344, 57856, 57920, 57924, 0, 1, 49152, 57344, - 57856, 57920, 57928, 57926, 0, 1, 49152, 57344, - 57856, 57920, 0, 1, 49152, 57344, 57856, 57920, - 57928, 0, 1, 49152, 57344, 57856, 57920, 57928, - 0, 1, 49152, 57344, 57856, 57920, 57928, 57930, - 0, 1, 49152, 57344, 57856, 57920, 57928, 0, - 1, 49152, 57344, 57856, 57920, 57936, 57932, 0, - 1, 49152, 57344, 57856, 57920, 57936, 57932, 0, - 1, 49152, 57344, 57856, 57920, 57936, 57937, 57934, - 0, 1, 49152, 57344, 57856, 57920, 0, 1, - 49152, 57344, 57856, 57920, 57936, 0, 1, 49152, - 57344, 57856, 57920, 57936, 0, 1, 49152, 57344, - 57856, 57920, 57936, 57938, 0, 1, 49152, 57344, - 57856, 57920, 57936, 0, 1, 49152, 57344, 57856, - 57920, 57936, 57940, 0, 1, 49152, 57344, 57856, - 57920, 57936, 57940, 0, 1, 49152, 57344, 57856, - 57920, 57936, 57944, 57942, 0, 1, 49152, 57344, - 57856, 57920, 57936, 0, 1, 49152, 57344, 57856, - 57920, 57952, 57944, 0, 1, 49152, 57344, 57856, - 57920, 57952, 57944, 0, 1, 49152, 57344, 57856, - 57920, 57952, 57944, 57946, 0, 1, 49152, 57344, - 57856, 57920, 57952, 57944, 0, 1, 49152, 57344, - 57856, 57920, 57952, 57953, 57948, 0, 1, 49152, - 57344, 57856, 57920, 57952, 57953, 57948, 0, 1, - 49152, 57344, 57856, 57920, 57952, 57953, 57948, 57950, - 0, 1, 49152, 57344, 57856, 57920, 0, 1, - 49152, 57344, 57856, 57984, 57952, 0, 1, 49152, - 57344, 57856, 57984, 57952, 0, 1, 49152, 57344, - 57856, 57984, 57952, 57954, 0, 1, 49152, 57344, - 57856, 57984, 57952, 0, 1, 49152, 57344, 57856, - 57984, 57952, 57956, 0, 1, 49152, 57344, 57856, - 57984, 57952, 57956, 0, 1, 49152, 57344, 57856, - 57984, 57952, 57960, 57958, 0, 1, 49152, 57344, - 57856, 57984, 57952, 0, 1, 49152, 57344, 57856, - 57984, 57952, 57960, 0, 1, 49152, 57344, 57856, - 57984, 57952, 57960, 0, 1, 49152, 57344, 57856, - 57984, 57952, 57960, 57962, 0, 1, 49152, 57344, - 57856, 57984, 57952, 57960, 0, 1, 49152, 57344, - 57856, 57984, 57952, 57968, 57964, 0, 1, 49152, - 57344, 57856, 57984, 57952, 57968, 57964, 0, 1, - 49152, 57344, 57856, 57984, 57952, 57968, 57969, 57966, - 0, 1, 49152, 57344, 57856, 57984, 57952, 0, - 1, 49152, 57344, 57856, 57984, 57985, 57968, 0, - 1, 49152, 57344, 57856, 57984, 57985, 57968, 0, - 1, 49152, 57344, 57856, 57984, 57985, 57968, 57970, - 0, 1, 49152, 57344, 57856, 57984, 57985, 57968, - 0, 1, 49152, 57344, 57856, 57984, 57985, 57968, - 57972, 0, 1, 49152, 57344, 57856, 57984, 57985, - 57968, 57972, 0, 1, 49152, 57344, 57856, 57984, - 57985, 57968, 57976, 57974, 0, 1, 49152, 57344, - 57856, 57984, 57985, 57968, 0, 1, 49152, 57344, - 57856, 57984, 57985, 57968, 57976, 0, 1, 49152, - 57344, 57856, 57984, 57985, 57987, 57976, 0, 1, - 49152, 57344, 57856, 57984, 57985, 57987, 57976, 57978, - 0, 1, 49152, 57344, 57856, 57984, 57985, 57987, - 57976, 0, 1, 49152, 57344, 57856, 57984, 57985, - 57987, 57976, 57980, 0, 1, 49152, 57344, 57856, - 57984, 57985, 57987, 57976, 57980, 0, 1, 49152, - 57344, 57856, 57984, 57985, 57987, 57976, 57980, 57982, - 0, 1, 49152, 57344, 57856, 0, 1, 49152, - 57344, 57856, 57984, 0, 1, 49152, 57344, 57856, - 57984, 0, 1, 49152, 57344, 57856, 57984, 57986, - 0, 1, 49152, 57344, 57856, 57984, 0, 1, - 49152, 57344, 57856, 57984, 57988, 0, 1, 49152, - 57344, 57856, 57984, 57988, 0, 1, 49152, 57344, - 57856, 57984, 57992, 57990, 0, 1, 49152, 57344, - 57856, 57984, 0, 1, 49152, 57344, 57856, 57984, - 57992, 0, 1, 49152, 57344, 57856, 57984, 57992, - 0, 1, 49152, 57344, 57856, 57984, 57992, 57994, - 0, 1, 49152, 57344, 57856, 57984, 57992, 0, - 1, 49152, 57344, 57856, 57984, 58000, 57996, 0, - 1, 49152, 57344, 57856, 57984, 58000, 57996, 0, - 1, 49152, 57344, 57856, 57984, 58000, 58001, 57998, - 0, 1, 49152, 57344, 57856, 57984, 0, 1, - 49152, 57344, 57856, 57984, 58000, 0, 1, 49152, - 57344, 57856, 57984, 58000, 0, 1, 49152, 57344, - 57856, 57984, 58000, 58002, 0, 1, 49152, 57344, - 57856, 57984, 58000, 0, 1, 49152, 57344, 57856, - 57984, 58000, 58004, 0, 1, 49152, 57344, 57856, - 57984, 58000, 58004, 0, 1, 49152, 57344, 57856, - 57984, 58000, 58008, 58006, 0, 1, 49152, 57344, - 57856, 57984, 58000, 0, 1, 49152, 57344, 57856, - 57984, 58016, 58008, 0, 1, 49152, 57344, 57856, - 57984, 58016, 58008, 0, 1, 49152, 57344, 57856, - 57984, 58016, 58008, 58010, 0, 1, 49152, 57344, - 57856, 57984, 58016, 58008, 0, 1, 49152, 57344, - 57856, 57984, 58016, 58017, 58012, 0, 1, 49152, - 57344, 57856, 57984, 58016, 58017, 58012, 0, 1, - 49152, 57344, 57856, 57984, 58016, 58017, 58012, 58014, - 0, 1, 49152, 57344, 57856, 57984, 0, 1, - 49152, 57344, 57856, 57984, 58016, 0, 1, 49152, - 57344, 57856, 57984, 58016, 0, 1, 49152, 57344, - 57856, 57984, 58016, 58018, 0, 1, 49152, 57344, - 57856, 57984, 58016, 0, 1, 49152, 57344, 57856, - 57984, 58016, 58020, 0, 1, 49152, 57344, 57856, - 57984, 58016, 58020, 0, 1, 49152, 57344, 57856, - 57984, 58016, 58024, 58022, 0, 1, 49152, 57344, - 57856, 57984, 58016, 0, 1, 49152, 57344, 57856, - 57984, 58016, 58024, 0, 1, 49152, 57344, 57856, - 57984, 58016, 58024, 0, 1, 49152, 57344, 57856, - 57984, 58016, 58024, 58026, 0, 1, 49152, 57344, - 57856, 57984, 58016, 58024, 0, 1, 49152, 57344, - 57856, 57984, 58016, 58032, 58028, 0, 1, 49152, - 57344, 57856, 57984, 58016, 58032, 58028, 0, 1, - 49152, 57344, 57856, 57984, 58016, 58032, 58033, 58030, - 0, 1, 49152, 57344, 57856, 57984, 58016, 0, - 1, 49152, 57344, 57856, 57984, 58048, 58032, 0, - 1, 49152, 57344, 57856, 57984, 58048, 58032, 0, - 1, 49152, 57344, 57856, 57984, 58048, 58032, 58034, - 0, 1, 49152, 57344, 57856, 57984, 58048, 58032, - 0, 1, 49152, 57344, 57856, 57984, 58048, 58032, - 58036, 0, 1, 49152, 57344, 57856, 57984, 58048, - 58032, 58036, 0, 1, 49152, 57344, 57856, 57984, - 58048, 58032, 58040, 58038, 0, 1, 49152, 57344, - 57856, 57984, 58048, 58032, 0, 1, 49152, 57344, - 57856, 57984, 58048, 58049, 58040, 0, 1, 49152, - 57344, 57856, 57984, 58048, 58049, 58040, 0, 1, - 49152, 57344, 57856, 57984, 58048, 58049, 58040, 58042, - 0, 1, 49152, 57344, 57856, 57984, 58048, 58049, - 58040, 0, 1, 49152, 57344, 57856, 57984, 58048, - 58049, 58040, 58044, 0, 1, 49152, 57344, 57856, - 57984, 58048, 58049, 58051, 58044, 0, 1, 49152, - 57344, 57856, 57984, 58048, 58049, 58051, 58044, 58046, - 0, 1, 49152, 57344, 57856, 57984, 0, 1, - 49152, 57344, 57856, 58112, 58048, 0, 1, 49152, - 57344, 57856, 58112, 58048, 0, 1, 49152, 57344, - 57856, 58112, 58048, 58050, 0, 1, 49152, 57344, - 57856, 58112, 58048, 0, 1, 49152, 57344, 57856, - 58112, 58048, 58052, 0, 1, 49152, 57344, 57856, - 58112, 58048, 58052, 0, 1, 49152, 57344, 57856, - 58112, 58048, 58056, 58054, 0, 1, 49152, 57344, - 57856, 58112, 58048, 0, 1, 49152, 57344, 57856, - 58112, 58048, 58056, 0, 1, 49152, 57344, 57856, - 58112, 58048, 58056, 0, 1, 49152, 57344, 57856, - 58112, 58048, 58056, 58058, 0, 1, 49152, 57344, - 57856, 58112, 58048, 58056, 0, 1, 49152, 57344, - 57856, 58112, 58048, 58064, 58060, 0, 1, 49152, - 57344, 57856, 58112, 58048, 58064, 58060, 0, 1, - 49152, 57344, 57856, 58112, 58048, 58064, 58065, 58062, - 0, 1, 49152, 57344, 57856, 58112, 58048, 0, - 1, 49152, 57344, 57856, 58112, 58048, 58064, 0, - 1, 49152, 57344, 57856, 58112, 58048, 58064, 0, - 1, 49152, 57344, 57856, 58112, 58048, 58064, 58066, - 0, 1, 49152, 57344, 57856, 58112, 58048, 58064, - 0, 1, 49152, 57344, 57856, 58112, 58048, 58064, - 58068, 0, 1, 49152, 57344, 57856, 58112, 58048, - 58064, 58068, 0, 1, 49152, 57344, 57856, 58112, - 58048, 58064, 58072, 58070, 0, 1, 49152, 57344, - 57856, 58112, 58048, 58064, 0, 1, 49152, 57344, - 57856, 58112, 58048, 58080, 58072, 0, 1, 49152, - 57344, 57856, 58112, 58048, 58080, 58072, 0, 1, - 49152, 57344, 57856, 58112, 58048, 58080, 58072, 58074, - 0, 1, 49152, 57344, 57856, 58112, 58048, 58080, - 58072, 0, 1, 49152, 57344, 57856, 58112, 58048, - 58080, 58081, 58076, 0, 1, 49152, 57344, 57856, - 58112, 58048, 58080, 58081, 58076, 0, 1, 49152, - 57344, 57856, 58112, 58048, 58080, 58081, 58076, 58078, - 0, 1, 49152, 57344, 57856, 58112, 58048, 0, - 1, 49152, 57344, 57856, 58112, 58113, 58080, 0, - 1, 49152, 57344, 57856, 58112, 58113, 58080, 0, - 1, 49152, 57344, 57856, 58112, 58113, 58080, 58082, - 0, 1, 49152, 57344, 57856, 58112, 58113, 58080, - 0, 1, 49152, 57344, 57856, 58112, 58113, 58080, - 58084, 0, 1, 49152, 57344, 57856, 58112, 58113, - 58080, 58084, 0, 1, 49152, 57344, 57856, 58112, - 58113, 58080, 58088, 58086, 0, 1, 49152, 57344, - 57856, 58112, 58113, 58080, 0, 1, 49152, 57344, - 57856, 58112, 58113, 58080, 58088, 0, 1, 49152, - 57344, 57856, 58112, 58113, 58080, 58088, 0, 1, - 49152, 57344, 57856, 58112, 58113, 58080, 58088, 58090, - 0, 1, 49152, 57344, 57856, 58112, 58113, 58080, - 58088, 0, 1, 49152, 57344, 57856, 58112, 58113, - 58080, 58096, 58092, 0, 1, 49152, 57344, 57856, - 58112, 58113, 58080, 58096, 58092, 0, 1, 49152, - 57344, 57856, 58112, 58113, 58080, 58096, 58097, 58094, - 0, 1, 49152, 57344, 57856, 58112, 58113, 58080, - 0, 1, 49152, 57344, 57856, 58112, 58113, 58080, - 58096, 0, 1, 49152, 57344, 57856, 58112, 58113, - 58115, 58096, 0, 1, 49152, 57344, 57856, 58112, - 58113, 58115, 58096, 58098, 0, 1, 49152, 57344, - 57856, 58112, 58113, 58115, 58096, 0, 1, 49152, - 57344, 57856, 58112, 58113, 58115, 58096, 58100, 0, - 1, 49152, 57344, 57856, 58112, 58113, 58115, 58096, - 58100, 0, 1, 49152, 57344, 57856, 58112, 58113, - 58115, 58096, 58104, 58102, 0, 1, 49152, 57344, - 57856, 58112, 58113, 58115, 58096, 0, 1, 49152, - 57344, 57856, 58112, 58113, 58115, 58096, 58104, 0, - 1, 49152, 57344, 57856, 58112, 58113, 58115, 58096, - 58104, 0, 1, 49152, 57344, 57856, 58112, 58113, - 58115, 58096, 58104, 58106, 0, 1, 49152, 57344, - 57856, 58112, 58113, 58115, 58119, 58104, 0, 1, - 49152, 57344, 57856, 58112, 58113, 58115, 58119, 58104, - 58108, 0, 1, 49152, 57344, 57856, 58112, 58113, - 58115, 58119, 58104, 58108, 0, 1, 49152, 57344, - 57856, 58112, 58113, 58115, 58119, 58104, 58108, 58110, - 0, 1, 49152, 57344, 57856, 0, 1, 49152, - 57344, 58368, 58112, 0, 1, 49152, 57344, 58368, - 58112, 0, 1, 49152, 57344, 58368, 58112, 58114, - 0, 1, 49152, 57344, 58368, 58112, 0, 1, - 49152, 57344, 58368, 58112, 58116, 0, 1, 49152, - 57344, 58368, 58112, 58116, 0, 1, 49152, 57344, - 58368, 58112, 58120, 58118, 0, 1, 49152, 57344, - 58368, 58112, 0, 1, 49152, 57344, 58368, 58112, - 58120, 0, 1, 49152, 57344, 58368, 58112, 58120, - 0, 1, 49152, 57344, 58368, 58112, 58120, 58122, - 0, 1, 49152, 57344, 58368, 58112, 58120, 0, - 1, 49152, 57344, 58368, 58112, 58128, 58124, 0, - 1, 49152, 57344, 58368, 58112, 58128, 58124, 0, - 1, 49152, 57344, 58368, 58112, 58128, 58129, 58126, - 0, 1, 49152, 57344, 58368, 58112, 0, 1, - 49152, 57344, 58368, 58112, 58128, 0, 1, 49152, - 57344, 58368, 58112, 58128, 0, 1, 49152, 57344, - 58368, 58112, 58128, 58130, 0, 1, 49152, 57344, - 58368, 58112, 58128, 0, 1, 49152, 57344, 58368, - 58112, 58128, 58132, 0, 1, 49152, 57344, 58368, - 58112, 58128, 58132, 0, 1, 49152, 57344, 58368, - 58112, 58128, 58136, 58134, 0, 1, 49152, 57344, - 58368, 58112, 58128, 0, 1, 49152, 57344, 58368, - 58112, 58144, 58136, 0, 1, 49152, 57344, 58368, - 58112, 58144, 58136, 0, 1, 49152, 57344, 58368, - 58112, 58144, 58136, 58138, 0, 1, 49152, 57344, - 58368, 58112, 58144, 58136, 0, 1, 49152, 57344, - 58368, 58112, 58144, 58145, 58140, 0, 1, 49152, - 57344, 58368, 58112, 58144, 58145, 58140, 0, 1, - 49152, 57344, 58368, 58112, 58144, 58145, 58140, 58142, - 0, 1, 49152, 57344, 58368, 58112, 0, 1, - 49152, 57344, 58368, 58112, 58144, 0, 1, 49152, - 57344, 58368, 58112, 58144, 0, 1, 49152, 57344, - 58368, 58112, 58144, 58146, 0, 1, 49152, 57344, - 58368, 58112, 58144, 0, 1, 49152, 57344, 58368, - 58112, 58144, 58148, 0, 1, 49152, 57344, 58368, - 58112, 58144, 58148, 0, 1, 49152, 57344, 58368, - 58112, 58144, 58152, 58150, 0, 1, 49152, 57344, - 58368, 58112, 58144, 0, 1, 49152, 57344, 58368, - 58112, 58144, 58152, 0, 1, 49152, 57344, 58368, - 58112, 58144, 58152, 0, 1, 49152, 57344, 58368, - 58112, 58144, 58152, 58154, 0, 1, 49152, 57344, - 58368, 58112, 58144, 58152, 0, 1, 49152, 57344, - 58368, 58112, 58144, 58160, 58156, 0, 1, 49152, - 57344, 58368, 58112, 58144, 58160, 58156, 0, 1, - 49152, 57344, 58368, 58112, 58144, 58160, 58161, 58158, - 0, 1, 49152, 57344, 58368, 58112, 58144, 0, - 1, 49152, 57344, 58368, 58112, 58176, 58160, 0, - 1, 49152, 57344, 58368, 58112, 58176, 58160, 0, - 1, 49152, 57344, 58368, 58112, 58176, 58160, 58162, - 0, 1, 49152, 57344, 58368, 58112, 58176, 58160, - 0, 1, 49152, 57344, 58368, 58112, 58176, 58160, - 58164, 0, 1, 49152, 57344, 58368, 58112, 58176, - 58160, 58164, 0, 1, 49152, 57344, 58368, 58112, - 58176, 58160, 58168, 58166, 0, 1, 49152, 57344, - 58368, 58112, 58176, 58160, 0, 1, 49152, 57344, - 58368, 58112, 58176, 58177, 58168, 0, 1, 49152, - 57344, 58368, 58112, 58176, 58177, 58168, 0, 1, - 49152, 57344, 58368, 58112, 58176, 58177, 58168, 58170, - 0, 1, 49152, 57344, 58368, 58112, 58176, 58177, - 58168, 0, 1, 49152, 57344, 58368, 58112, 58176, - 58177, 58168, 58172, 0, 1, 49152, 57344, 58368, - 58112, 58176, 58177, 58179, 58172, 0, 1, 49152, - 57344, 58368, 58112, 58176, 58177, 58179, 58172, 58174, - 0, 1, 49152, 57344, 58368, 58112, 0, 1, - 49152, 57344, 58368, 58112, 58176, 0, 1, 49152, - 57344, 58368, 58112, 58176, 0, 1, 49152, 57344, - 58368, 58112, 58176, 58178, 0, 1, 49152, 57344, - 58368, 58112, 58176, 0, 1, 49152, 57344, 58368, - 58112, 58176, 58180, 0, 1, 49152, 57344, 58368, - 58112, 58176, 58180, 0, 1, 49152, 57344, 58368, - 58112, 58176, 58184, 58182, 0, 1, 49152, 57344, - 58368, 58112, 58176, 0, 1, 49152, 57344, 58368, - 58112, 58176, 58184, 0, 1, 49152, 57344, 58368, - 58112, 58176, 58184, 0, 1, 49152, 57344, 58368, - 58112, 58176, 58184, 58186, 0, 1, 49152, 57344, - 58368, 58112, 58176, 58184, 0, 1, 49152, 57344, - 58368, 58112, 58176, 58192, 58188, 0, 1, 49152, - 57344, 58368, 58112, 58176, 58192, 58188, 0, 1, - 49152, 57344, 58368, 58112, 58176, 58192, 58193, 58190, - 0, 1, 49152, 57344, 58368, 58112, 58176, 0, - 1, 49152, 57344, 58368, 58112, 58176, 58192, 0, - 1, 49152, 57344, 58368, 58112, 58176, 58192, 0, - 1, 49152, 57344, 58368, 58112, 58176, 58192, 58194, - 0, 1, 49152, 57344, 58368, 58112, 58176, 58192, - 0, 1, 49152, 57344, 58368, 58112, 58176, 58192, - 58196, 0, 1, 49152, 57344, 58368, 58112, 58176, - 58192, 58196, 0, 1, 49152, 57344, 58368, 58112, - 58176, 58192, 58200, 58198, 0, 1, 49152, 57344, - 58368, 58112, 58176, 58192, 0, 1, 49152, 57344, - 58368, 58112, 58176, 58208, 58200, 0, 1, 49152, - 57344, 58368, 58112, 58176, 58208, 58200, 0, 1, - 49152, 57344, 58368, 58112, 58176, 58208, 58200, 58202, - 0, 1, 49152, 57344, 58368, 58112, 58176, 58208, - 58200, 0, 1, 49152, 57344, 58368, 58112, 58176, - 58208, 58209, 58204, 0, 1, 49152, 57344, 58368, - 58112, 58176, 58208, 58209, 58204, 0, 1, 49152, - 57344, 58368, 58112, 58176, 58208, 58209, 58204, 58206, - 0, 1, 49152, 57344, 58368, 58112, 58176, 0, - 1, 49152, 57344, 58368, 58112, 58240, 58208, 0, - 1, 49152, 57344, 58368, 58112, 58240, 58208, 0, - 1, 49152, 57344, 58368, 58112, 58240, 58208, 58210, - 0, 1, 49152, 57344, 58368, 58112, 58240, 58208, - 0, 1, 49152, 57344, 58368, 58112, 58240, 58208, - 58212, 0, 1, 49152, 57344, 58368, 58112, 58240, - 58208, 58212, 0, 1, 49152, 57344, 58368, 58112, - 58240, 58208, 58216, 58214, 0, 1, 49152, 57344, - 58368, 58112, 58240, 58208, 0, 1, 49152, 57344, - 58368, 58112, 58240, 58208, 58216, 0, 1, 49152, - 57344, 58368, 58112, 58240, 58208, 58216, 0, 1, - 49152, 57344, 58368, 58112, 58240, 58208, 58216, 58218, - 0, 1, 49152, 57344, 58368, 58112, 58240, 58208, - 58216, 0, 1, 49152, 57344, 58368, 58112, 58240, - 58208, 58224, 58220, 0, 1, 49152, 57344, 58368, - 58112, 58240, 58208, 58224, 58220, 0, 1, 49152, - 57344, 58368, 58112, 58240, 58208, 58224, 58225, 58222, - 0, 1, 49152, 57344, 58368, 58112, 58240, 58208, - 0, 1, 49152, 57344, 58368, 58112, 58240, 58241, - 58224, 0, 1, 49152, 57344, 58368, 58112, 58240, - 58241, 58224, 0, 1, 49152, 57344, 58368, 58112, - 58240, 58241, 58224, 58226, 0, 1, 49152, 57344, - 58368, 58112, 58240, 58241, 58224, 0, 1, 49152, - 57344, 58368, 58112, 58240, 58241, 58224, 58228, 0, - 1, 49152, 57344, 58368, 58112, 58240, 58241, 58224, - 58228, 0, 1, 49152, 57344, 58368, 58112, 58240, - 58241, 58224, 58232, 58230, 0, 1, 49152, 57344, - 58368, 58112, 58240, 58241, 58224, 0, 1, 49152, - 57344, 58368, 58112, 58240, 58241, 58224, 58232, 0, - 1, 49152, 57344, 58368, 58112, 58240, 58241, 58243, - 58232, 0, 1, 49152, 57344, 58368, 58112, 58240, - 58241, 58243, 58232, 58234, 0, 1, 49152, 57344, - 58368, 58112, 58240, 58241, 58243, 58232, 0, 1, - 49152, 57344, 58368, 58112, 58240, 58241, 58243, 58232, - 58236, 0, 1, 49152, 57344, 58368, 58112, 58240, - 58241, 58243, 58232, 58236, 0, 1, 49152, 57344, - 58368, 58112, 58240, 58241, 58243, 58232, 58236, 58238, - 0, 1, 49152, 57344, 58368, 58112, 0, 1, - 49152, 57344, 58368, 58112, 58240, 0, 1, 49152, - 57344, 58368, 58369, 58240, 0, 1, 49152, 57344, - 58368, 58369, 58240, 58242, 0, 1, 49152, 57344, - 58368, 58369, 58240, 0, 1, 49152, 57344, 58368, - 58369, 58240, 58244, 0, 1, 49152, 57344, 58368, - 58369, 58240, 58244, 0, 1, 49152, 57344, 58368, - 58369, 58240, 58248, 58246, 0, 1, 49152, 57344, - 58368, 58369, 58240, 0, 1, 49152, 57344, 58368, - 58369, 58240, 58248, 0, 1, 49152, 57344, 58368, - 58369, 58240, 58248, 0, 1, 49152, 57344, 58368, - 58369, 58240, 58248, 58250, 0, 1, 49152, 57344, - 58368, 58369, 58240, 58248, 0, 1, 49152, 57344, - 58368, 58369, 58240, 58256, 58252, 0, 1, 49152, - 57344, 58368, 58369, 58240, 58256, 58252, 0, 1, - 49152, 57344, 58368, 58369, 58240, 58256, 58257, 58254, - 0, 1, 49152, 57344, 58368, 58369, 58240, 0, - 1, 49152, 57344, 58368, 58369, 58240, 58256, 0, - 1, 49152, 57344, 58368, 58369, 58240, 58256, 0, - 1, 49152, 57344, 58368, 58369, 58240, 58256, 58258, - 0, 1, 49152, 57344, 58368, 58369, 58240, 58256, - 0, 1, 49152, 57344, 58368, 58369, 58240, 58256, - 58260, 0, 1, 49152, 57344, 58368, 58369, 58240, - 58256, 58260, 0, 1, 49152, 57344, 58368, 58369, - 58240, 58256, 58264, 58262, 0, 1, 49152, 57344, - 58368, 58369, 58240, 58256, 0, 1, 49152, 57344, - 58368, 58369, 58240, 58272, 58264, 0, 1, 49152, - 57344, 58368, 58369, 58240, 58272, 58264, 0, 1, - 49152, 57344, 58368, 58369, 58240, 58272, 58264, 58266, - 0, 1, 49152, 57344, 58368, 58369, 58240, 58272, - 58264, 0, 1, 49152, 57344, 58368, 58369, 58240, - 58272, 58273, 58268, 0, 1, 49152, 57344, 58368, - 58369, 58240, 58272, 58273, 58268, 0, 1, 49152, - 57344, 58368, 58369, 58240, 58272, 58273, 58268, 58270, - 0, 1, 49152, 57344, 58368, 58369, 58240, 0, - 1, 49152, 57344, 58368, 58369, 58240, 58272, 0, - 1, 49152, 57344, 58368, 58369, 58240, 58272, 0, - 1, 49152, 57344, 58368, 58369, 58240, 58272, 58274, - 0, 1, 49152, 57344, 58368, 58369, 58240, 58272, - 0, 1, 49152, 57344, 58368, 58369, 58240, 58272, - 58276, 0, 1, 49152, 57344, 58368, 58369, 58240, - 58272, 58276, 0, 1, 49152, 57344, 58368, 58369, - 58240, 58272, 58280, 58278, 0, 1, 49152, 57344, - 58368, 58369, 58240, 58272, 0, 1, 49152, 57344, - 58368, 58369, 58240, 58272, 58280, 0, 1, 49152, - 57344, 58368, 58369, 58240, 58272, 58280, 0, 1, - 49152, 57344, 58368, 58369, 58240, 58272, 58280, 58282, - 0, 1, 49152, 57344, 58368, 58369, 58240, 58272, - 58280, 0, 1, 49152, 57344, 58368, 58369, 58240, - 58272, 58288, 58284, 0, 1, 49152, 57344, 58368, - 58369, 58240, 58272, 58288, 58284, 0, 1, 49152, - 57344, 58368, 58369, 58240, 58272, 58288, 58289, 58286, - 0, 1, 49152, 57344, 58368, 58369, 58240, 58272, - 0, 1, 49152, 57344, 58368, 58369, 58240, 58304, - 58288, 0, 1, 49152, 57344, 58368, 58369, 58240, - 58304, 58288, 0, 1, 49152, 57344, 58368, 58369, - 58240, 58304, 58288, 58290, 0, 1, 49152, 57344, - 58368, 58369, 58240, 58304, 58288, 0, 1, 49152, - 57344, 58368, 58369, 58240, 58304, 58288, 58292, 0, - 1, 49152, 57344, 58368, 58369, 58240, 58304, 58288, - 58292, 0, 1, 49152, 57344, 58368, 58369, 58240, - 58304, 58288, 58296, 58294, 0, 1, 49152, 57344, - 58368, 58369, 58240, 58304, 58288, 0, 1, 49152, - 57344, 58368, 58369, 58240, 58304, 58305, 58296, 0, - 1, 49152, 57344, 58368, 58369, 58240, 58304, 58305, - 58296, 0, 1, 49152, 57344, 58368, 58369, 58240, - 58304, 58305, 58296, 58298, 0, 1, 49152, 57344, - 58368, 58369, 58240, 58304, 58305, 58296, 0, 1, - 49152, 57344, 58368, 58369, 58240, 58304, 58305, 58296, - 58300, 0, 1, 49152, 57344, 58368, 58369, 58240, - 58304, 58305, 58307, 58300, 0, 1, 49152, 57344, - 58368, 58369, 58240, 58304, 58305, 58307, 58300, 58302, - 0, 1, 49152, 57344, 58368, 58369, 58240, 0, - 1, 49152, 57344, 58368, 58369, 58240, 58304, 0, - 1, 49152, 57344, 58368, 58369, 58240, 58304, 0, - 1, 49152, 57344, 58368, 58369, 58240, 58304, 58306, - 0, 1, 49152, 57344, 58368, 58369, 58371, 58304, - 0, 1, 49152, 57344, 58368, 58369, 58371, 58304, - 58308, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58304, 58308, 0, 1, 49152, 57344, 58368, 58369, - 58371, 58304, 58312, 58310, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58304, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58304, 58312, 0, 1, 49152, - 57344, 58368, 58369, 58371, 58304, 58312, 0, 1, - 49152, 57344, 58368, 58369, 58371, 58304, 58312, 58314, - 0, 1, 49152, 57344, 58368, 58369, 58371, 58304, - 58312, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58304, 58320, 58316, 0, 1, 49152, 57344, 58368, - 58369, 58371, 58304, 58320, 58316, 0, 1, 49152, - 57344, 58368, 58369, 58371, 58304, 58320, 58321, 58318, - 0, 1, 49152, 57344, 58368, 58369, 58371, 58304, - 0, 1, 49152, 57344, 58368, 58369, 58371, 58304, - 58320, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58304, 58320, 0, 1, 49152, 57344, 58368, 58369, - 58371, 58304, 58320, 58322, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58304, 58320, 0, 1, 49152, - 57344, 58368, 58369, 58371, 58304, 58320, 58324, 0, - 1, 49152, 57344, 58368, 58369, 58371, 58304, 58320, - 58324, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58304, 58320, 58328, 58326, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58304, 58320, 0, 1, 49152, - 57344, 58368, 58369, 58371, 58304, 58336, 58328, 0, - 1, 49152, 57344, 58368, 58369, 58371, 58304, 58336, - 58328, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58304, 58336, 58328, 58330, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58304, 58336, 58328, 0, 1, - 49152, 57344, 58368, 58369, 58371, 58304, 58336, 58337, - 58332, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58304, 58336, 58337, 58332, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58304, 58336, 58337, 58332, 58334, - 0, 1, 49152, 57344, 58368, 58369, 58371, 58304, - 0, 1, 49152, 57344, 58368, 58369, 58371, 58304, - 58336, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58304, 58336, 0, 1, 49152, 57344, 58368, 58369, - 58371, 58304, 58336, 58338, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58304, 58336, 0, 1, 49152, - 57344, 58368, 58369, 58371, 58304, 58336, 58340, 0, - 1, 49152, 57344, 58368, 58369, 58371, 58304, 58336, - 58340, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58304, 58336, 58344, 58342, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58375, 58336, 0, 1, 49152, - 57344, 58368, 58369, 58371, 58375, 58336, 58344, 0, - 1, 49152, 57344, 58368, 58369, 58371, 58375, 58336, - 58344, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58375, 58336, 58344, 58346, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58375, 58336, 58344, 0, 1, - 49152, 57344, 58368, 58369, 58371, 58375, 58336, 58352, - 58348, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58375, 58336, 58352, 58348, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58375, 58336, 58352, 58353, 58350, - 0, 1, 49152, 57344, 58368, 58369, 58371, 58375, - 58336, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58375, 58336, 58352, 0, 1, 49152, 57344, 58368, - 58369, 58371, 58375, 58336, 58352, 0, 1, 49152, - 57344, 58368, 58369, 58371, 58375, 58336, 58352, 58354, - 0, 1, 49152, 57344, 58368, 58369, 58371, 58375, - 58336, 58352, 0, 1, 49152, 57344, 58368, 58369, - 58371, 58375, 58336, 58352, 58356, 0, 1, 49152, - 57344, 58368, 58369, 58371, 58375, 58336, 58352, 58356, - 0, 1, 49152, 57344, 58368, 58369, 58371, 58375, - 58336, 58352, 58360, 58358, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58375, 58336, 58352, 0, 1, - 49152, 57344, 58368, 58369, 58371, 58375, 58336, 58352, - 58360, 0, 1, 49152, 57344, 58368, 58369, 58371, - 58375, 58336, 58352, 58360, 0, 1, 49152, 57344, - 58368, 58369, 58371, 58375, 58336, 58352, 58360, 58362, - 0, 1, 49152, 57344, 58368, 58369, 58371, 58375, - 58336, 58352, 58360, 0, 1, 49152, 57344, 58368, - 58369, 58371, 58375, 58336, 58352, 58360, 58364, 0, - 1, 49152, 57344, 58368, 58369, 58371, 58375, 58336, - 58352, 58360, 58364, 0, 1, 49152, 57344, 58368, - 58369, 58371, 58375, 58336, 58352, 58360, 58364, 58366, - 0, 1, 49152, 57344, 0, 1, 49152, 57344, - 58368, 0, 1, 49152, 57344, 58368, 0, 1, - 49152, 57344, 58368, 58370, 0, 1, 49152, 57344, - 58368, 0, 1, 49152, 57344, 58368, 58372, 0, - 1, 49152, 57344, 58368, 58372, 0, 1, 49152, - 57344, 58368, 58376, 58374, 0, 1, 49152, 57344, - 58368, 0, 1, 49152, 57344, 58368, 58376, 0, - 1, 49152, 57344, 58368, 58376, 0, 1, 49152, - 57344, 58368, 58376, 58378, 0, 1, 49152, 57344, - 58368, 58376, 0, 1, 49152, 57344, 58368, 58384, - 58380, 0, 1, 49152, 57344, 58368, 58384, 58380, - 0, 1, 49152, 57344, 58368, 58384, 58385, 58382, - 0, 1, 49152, 57344, 58368, 0, 1, 49152, - 57344, 58368, 58384, 0, 1, 49152, 57344, 58368, - 58384, 0, 1, 49152, 57344, 58368, 58384, 58386, - 0, 1, 49152, 57344, 58368, 58384, 0, 1, - 49152, 57344, 58368, 58384, 58388, 0, 1, 49152, - 57344, 58368, 58384, 58388, 0, 1, 49152, 57344, - 58368, 58384, 58392, 58390, 0, 1, 49152, 57344, - 58368, 58384, 0, 1, 49152, 57344, 58368, 58400, - 58392, 0, 1, 49152, 57344, 58368, 58400, 58392, - 0, 1, 49152, 57344, 58368, 58400, 58392, 58394, - 0, 1, 49152, 57344, 58368, 58400, 58392, 0, - 1, 49152, 57344, 58368, 58400, 58401, 58396, 0, - 1, 49152, 57344, 58368, 58400, 58401, 58396, 0, - 1, 49152, 57344, 58368, 58400, 58401, 58396, 58398, - 0, 1, 49152, 57344, 58368, 0, 1, 49152, - 57344, 58368, 58400, 0, 1, 49152, 57344, 58368, - 58400, 0, 1, 49152, 57344, 58368, 58400, 58402, - 0, 1, 49152, 57344, 58368, 58400, 0, 1, - 49152, 57344, 58368, 58400, 58404, 0, 1, 49152, - 57344, 58368, 58400, 58404, 0, 1, 49152, 57344, - 58368, 58400, 58408, 58406, 0, 1, 49152, 57344, - 58368, 58400, 0, 1, 49152, 57344, 58368, 58400, - 58408, 0, 1, 49152, 57344, 58368, 58400, 58408, - 0, 1, 49152, 57344, 58368, 58400, 58408, 58410, - 0, 1, 49152, 57344, 58368, 58400, 58408, 0, - 1, 49152, 57344, 58368, 58400, 58416, 58412, 0, - 1, 49152, 57344, 58368, 58400, 58416, 58412, 0, - 1, 49152, 57344, 58368, 58400, 58416, 58417, 58414, - 0, 1, 49152, 57344, 58368, 58400, 0, 1, - 49152, 57344, 58368, 58432, 58416, 0, 1, 49152, - 57344, 58368, 58432, 58416, 0, 1, 49152, 57344, - 58368, 58432, 58416, 58418, 0, 1, 49152, 57344, - 58368, 58432, 58416, 0, 1, 49152, 57344, 58368, - 58432, 58416, 58420, 0, 1, 49152, 57344, 58368, - 58432, 58416, 58420, 0, 1, 49152, 57344, 58368, - 58432, 58416, 58424, 58422, 0, 1, 49152, 57344, - 58368, 58432, 58416, 0, 1, 49152, 57344, 58368, - 58432, 58433, 58424, 0, 1, 49152, 57344, 58368, - 58432, 58433, 58424, 0, 1, 49152, 57344, 58368, - 58432, 58433, 58424, 58426, 0, 1, 49152, 57344, - 58368, 58432, 58433, 58424, 0, 1, 49152, 57344, - 58368, 58432, 58433, 58424, 58428, 0, 1, 49152, - 57344, 58368, 58432, 58433, 58435, 58428, 0, 1, - 49152, 57344, 58368, 58432, 58433, 58435, 58428, 58430, - 0, 1, 49152, 57344, 58368, 0, 1, 49152, - 57344, 58368, 58432, 0, 1, 49152, 57344, 58368, - 58432, 0, 1, 49152, 57344, 58368, 58432, 58434, - 0, 1, 49152, 57344, 58368, 58432, 0, 1, - 49152, 57344, 58368, 58432, 58436, 0, 1, 49152, - 57344, 58368, 58432, 58436, 0, 1, 49152, 57344, - 58368, 58432, 58440, 58438, 0, 1, 49152, 57344, - 58368, 58432, 0, 1, 49152, 57344, 58368, 58432, - 58440, 0, 1, 49152, 57344, 58368, 58432, 58440, - 0, 1, 49152, 57344, 58368, 58432, 58440, 58442, - 0, 1, 49152, 57344, 58368, 58432, 58440, 0, - 1, 49152, 57344, 58368, 58432, 58448, 58444, 0, - 1, 49152, 57344, 58368, 58432, 58448, 58444, 0, - 1, 49152, 57344, 58368, 58432, 58448, 58449, 58446, - 0, 1, 49152, 57344, 58368, 58432, 0, 1, - 49152, 57344, 58368, 58432, 58448, 0, 1, 49152, - 57344, 58368, 58432, 58448, 0, 1, 49152, 57344, - 58368, 58432, 58448, 58450, 0, 1, 49152, 57344, - 58368, 58432, 58448, 0, 1, 49152, 57344, 58368, - 58432, 58448, 58452, 0, 1, 49152, 57344, 58368, - 58432, 58448, 58452, 0, 1, 49152, 57344, 58368, - 58432, 58448, 58456, 58454, 0, 1, 49152, 57344, - 58368, 58432, 58448, 0, 1, 49152, 57344, 58368, - 58432, 58464, 58456, 0, 1, 49152, 57344, 58368, - 58432, 58464, 58456, 0, 1, 49152, 57344, 58368, - 58432, 58464, 58456, 58458, 0, 1, 49152, 57344, - 58368, 58432, 58464, 58456, 0, 1, 49152, 57344, - 58368, 58432, 58464, 58465, 58460, 0, 1, 49152, - 57344, 58368, 58432, 58464, 58465, 58460, 0, 1, - 49152, 57344, 58368, 58432, 58464, 58465, 58460, 58462, - 0, 1, 49152, 57344, 58368, 58432, 0, 1, - 49152, 57344, 58368, 58496, 58464, 0, 1, 49152, - 57344, 58368, 58496, 58464, 0, 1, 49152, 57344, - 58368, 58496, 58464, 58466, 0, 1, 49152, 57344, - 58368, 58496, 58464, 0, 1, 49152, 57344, 58368, - 58496, 58464, 58468, 0, 1, 49152, 57344, 58368, - 58496, 58464, 58468, 0, 1, 49152, 57344, 58368, - 58496, 58464, 58472, 58470, 0, 1, 49152, 57344, - 58368, 58496, 58464, 0, 1, 49152, 57344, 58368, - 58496, 58464, 58472, 0, 1, 49152, 57344, 58368, - 58496, 58464, 58472, 0, 1, 49152, 57344, 58368, - 58496, 58464, 58472, 58474, 0, 1, 49152, 57344, - 58368, 58496, 58464, 58472, 0, 1, 49152, 57344, - 58368, 58496, 58464, 58480, 58476, 0, 1, 49152, - 57344, 58368, 58496, 58464, 58480, 58476, 0, 1, - 49152, 57344, 58368, 58496, 58464, 58480, 58481, 58478, - 0, 1, 49152, 57344, 58368, 58496, 58464, 0, - 1, 49152, 57344, 58368, 58496, 58497, 58480, 0, - 1, 49152, 57344, 58368, 58496, 58497, 58480, 0, - 1, 49152, 57344, 58368, 58496, 58497, 58480, 58482, - 0, 1, 49152, 57344, 58368, 58496, 58497, 58480, - 0, 1, 49152, 57344, 58368, 58496, 58497, 58480, - 58484, 0, 1, 49152, 57344, 58368, 58496, 58497, - 58480, 58484, 0, 1, 49152, 57344, 58368, 58496, - 58497, 58480, 58488, 58486, 0, 1, 49152, 57344, - 58368, 58496, 58497, 58480, 0, 1, 49152, 57344, - 58368, 58496, 58497, 58480, 58488, 0, 1, 49152, - 57344, 58368, 58496, 58497, 58499, 58488, 0, 1, - 49152, 57344, 58368, 58496, 58497, 58499, 58488, 58490, - 0, 1, 49152, 57344, 58368, 58496, 58497, 58499, - 58488, 0, 1, 49152, 57344, 58368, 58496, 58497, - 58499, 58488, 58492, 0, 1, 49152, 57344, 58368, - 58496, 58497, 58499, 58488, 58492, 0, 1, 49152, - 57344, 58368, 58496, 58497, 58499, 58488, 58492, 58494, - 0, 1, 49152, 57344, 58368, 0, 1, 49152, - 57344, 58368, 58496, 0, 1, 49152, 57344, 58368, - 58496, 0, 1, 49152, 57344, 58368, 58496, 58498, - 0, 1, 49152, 57344, 58368, 58496, 0, 1, - 49152, 57344, 58368, 58496, 58500, 0, 1, 49152, - 57344, 58368, 58496, 58500, 0, 1, 49152, 57344, - 58368, 58496, 58504, 58502, 0, 1, 49152, 57344, - 58368, 58496, 0, 1, 49152, 57344, 58368, 58496, - 58504, 0, 1, 49152, 57344, 58368, 58496, 58504, - 0, 1, 49152, 57344, 58368, 58496, 58504, 58506, - 0, 1, 49152, 57344, 58368, 58496, 58504, 0, - 1, 49152, 57344, 58368, 58496, 58512, 58508, 0, - 1, 49152, 57344, 58368, 58496, 58512, 58508, 0, - 1, 49152, 57344, 58368, 58496, 58512, 58513, 58510, - 0, 1, 49152, 57344, 58368, 58496, 0, 1, - 49152, 57344, 58368, 58496, 58512, 0, 1, 49152, - 57344, 58368, 58496, 58512, 0, 1, 49152, 57344, - 58368, 58496, 58512, 58514, 0, 1, 49152, 57344, - 58368, 58496, 58512, 0, 1, 49152, 57344, 58368, - 58496, 58512, 58516, 0, 1, 49152, 57344, 58368, - 58496, 58512, 58516, 0, 1, 49152, 57344, 58368, - 58496, 58512, 58520, 58518, 0, 1, 49152, 57344, - 58368, 58496, 58512, 0, 1, 49152, 57344, 58368, - 58496, 58528, 58520, 0, 1, 49152, 57344, 58368, - 58496, 58528, 58520, 0, 1, 49152, 57344, 58368, - 58496, 58528, 58520, 58522, 0, 1, 49152, 57344, - 58368, 58496, 58528, 58520, 0, 1, 49152, 57344, - 58368, 58496, 58528, 58529, 58524, 0, 1, 49152, - 57344, 58368, 58496, 58528, 58529, 58524, 0, 1, - 49152, 57344, 58368, 58496, 58528, 58529, 58524, 58526, - 0, 1, 49152, 57344, 58368, 58496, 0, 1, - 49152, 57344, 58368, 58496, 58528, 0, 1, 49152, - 57344, 58368, 58496, 58528, 0, 1, 49152, 57344, - 58368, 58496, 58528, 58530, 0, 1, 49152, 57344, - 58368, 58496, 58528, 0, 1, 49152, 57344, 58368, - 58496, 58528, 58532, 0, 1, 49152, 57344, 58368, - 58496, 58528, 58532, 0, 1, 49152, 57344, 58368, - 58496, 58528, 58536, 58534, 0, 1, 49152, 57344, - 58368, 58496, 58528, 0, 1, 49152, 57344, 58368, - 58496, 58528, 58536, 0, 1, 49152, 57344, 58368, - 58496, 58528, 58536, 0, 1, 49152, 57344, 58368, - 58496, 58528, 58536, 58538, 0, 1, 49152, 57344, - 58368, 58496, 58528, 58536, 0, 1, 49152, 57344, - 58368, 58496, 58528, 58544, 58540, 0, 1, 49152, - 57344, 58368, 58496, 58528, 58544, 58540, 0, 1, - 49152, 57344, 58368, 58496, 58528, 58544, 58545, 58542, - 0, 1, 49152, 57344, 58368, 58496, 58528, 0, - 1, 49152, 57344, 58368, 58496, 58560, 58544, 0, - 1, 49152, 57344, 58368, 58496, 58560, 58544, 0, - 1, 49152, 57344, 58368, 58496, 58560, 58544, 58546, - 0, 1, 49152, 57344, 58368, 58496, 58560, 58544, - 0, 1, 49152, 57344, 58368, 58496, 58560, 58544, - 58548, 0, 1, 49152, 57344, 58368, 58496, 58560, - 58544, 58548, 0, 1, 49152, 57344, 58368, 58496, - 58560, 58544, 58552, 58550, 0, 1, 49152, 57344, - 58368, 58496, 58560, 58544, 0, 1, 49152, 57344, - 58368, 58496, 58560, 58561, 58552, 0, 1, 49152, - 57344, 58368, 58496, 58560, 58561, 58552, 0, 1, - 49152, 57344, 58368, 58496, 58560, 58561, 58552, 58554, - 0, 1, 49152, 57344, 58368, 58496, 58560, 58561, - 58552, 0, 1, 49152, 57344, 58368, 58496, 58560, - 58561, 58552, 58556, 0, 1, 49152, 57344, 58368, - 58496, 58560, 58561, 58563, 58556, 0, 1, 49152, - 57344, 58368, 58496, 58560, 58561, 58563, 58556, 58558, - 0, 1, 49152, 57344, 58368, 58496, 0, 1, - 49152, 57344, 58368, 58624, 58560, 0, 1, 49152, - 57344, 58368, 58624, 58560, 0, 1, 49152, 57344, - 58368, 58624, 58560, 58562, 0, 1, 49152, 57344, - 58368, 58624, 58560, 0, 1, 49152, 57344, 58368, - 58624, 58560, 58564, 0, 1, 49152, 57344, 58368, - 58624, 58560, 58564, 0, 1, 49152, 57344, 58368, - 58624, 58560, 58568, 58566, 0, 1, 49152, 57344, - 58368, 58624, 58560, 0, 1, 49152, 57344, 58368, - 58624, 58560, 58568, 0, 1, 49152, 57344, 58368, - 58624, 58560, 58568, 0, 1, 49152, 57344, 58368, - 58624, 58560, 58568, 58570, 0, 1, 49152, 57344, - 58368, 58624, 58560, 58568, 0, 1, 49152, 57344, - 58368, 58624, 58560, 58576, 58572, 0, 1, 49152, - 57344, 58368, 58624, 58560, 58576, 58572, 0, 1, - 49152, 57344, 58368, 58624, 58560, 58576, 58577, 58574, - 0, 1, 49152, 57344, 58368, 58624, 58560, 0, - 1, 49152, 57344, 58368, 58624, 58560, 58576, 0, - 1, 49152, 57344, 58368, 58624, 58560, 58576, 0, - 1, 49152, 57344, 58368, 58624, 58560, 58576, 58578, - 0, 1, 49152, 57344, 58368, 58624, 58560, 58576, - 0, 1, 49152, 57344, 58368, 58624, 58560, 58576, - 58580, 0, 1, 49152, 57344, 58368, 58624, 58560, - 58576, 58580, 0, 1, 49152, 57344, 58368, 58624, - 58560, 58576, 58584, 58582, 0, 1, 49152, 57344, - 58368, 58624, 58560, 58576, 0, 1, 49152, 57344, - 58368, 58624, 58560, 58592, 58584, 0, 1, 49152, - 57344, 58368, 58624, 58560, 58592, 58584, 0, 1, - 49152, 57344, 58368, 58624, 58560, 58592, 58584, 58586, - 0, 1, 49152, 57344, 58368, 58624, 58560, 58592, - 58584, 0, 1, 49152, 57344, 58368, 58624, 58560, - 58592, 58593, 58588, 0, 1, 49152, 57344, 58368, - 58624, 58560, 58592, 58593, 58588, 0, 1, 49152, - 57344, 58368, 58624, 58560, 58592, 58593, 58588, 58590, - 0, 1, 49152, 57344, 58368, 58624, 58560, 0, - 1, 49152, 57344, 58368, 58624, 58625, 58592, 0, - 1, 49152, 57344, 58368, 58624, 58625, 58592, 0, - 1, 49152, 57344, 58368, 58624, 58625, 58592, 58594, - 0, 1, 49152, 57344, 58368, 58624, 58625, 58592, - 0, 1, 49152, 57344, 58368, 58624, 58625, 58592, - 58596, 0, 1, 49152, 57344, 58368, 58624, 58625, - 58592, 58596, 0, 1, 49152, 57344, 58368, 58624, - 58625, 58592, 58600, 58598, 0, 1, 49152, 57344, - 58368, 58624, 58625, 58592, 0, 1, 49152, 57344, - 58368, 58624, 58625, 58592, 58600, 0, 1, 49152, - 57344, 58368, 58624, 58625, 58592, 58600, 0, 1, - 49152, 57344, 58368, 58624, 58625, 58592, 58600, 58602, - 0, 1, 49152, 57344, 58368, 58624, 58625, 58592, - 58600, 0, 1, 49152, 57344, 58368, 58624, 58625, - 58592, 58608, 58604, 0, 1, 49152, 57344, 58368, - 58624, 58625, 58592, 58608, 58604, 0, 1, 49152, - 57344, 58368, 58624, 58625, 58592, 58608, 58609, 58606, - 0, 1, 49152, 57344, 58368, 58624, 58625, 58592, - 0, 1, 49152, 57344, 58368, 58624, 58625, 58592, - 58608, 0, 1, 49152, 57344, 58368, 58624, 58625, - 58627, 58608, 0, 1, 49152, 57344, 58368, 58624, - 58625, 58627, 58608, 58610, 0, 1, 49152, 57344, - 58368, 58624, 58625, 58627, 58608, 0, 1, 49152, - 57344, 58368, 58624, 58625, 58627, 58608, 58612, 0, - 1, 49152, 57344, 58368, 58624, 58625, 58627, 58608, - 58612, 0, 1, 49152, 57344, 58368, 58624, 58625, - 58627, 58608, 58616, 58614, 0, 1, 49152, 57344, - 58368, 58624, 58625, 58627, 58608, 0, 1, 49152, - 57344, 58368, 58624, 58625, 58627, 58608, 58616, 0, - 1, 49152, 57344, 58368, 58624, 58625, 58627, 58608, - 58616, 0, 1, 49152, 57344, 58368, 58624, 58625, - 58627, 58608, 58616, 58618, 0, 1, 49152, 57344, - 58368, 58624, 58625, 58627, 58631, 58616, 0, 1, - 49152, 57344, 58368, 58624, 58625, 58627, 58631, 58616, - 58620, 0, 1, 49152, 57344, 58368, 58624, 58625, - 58627, 58631, 58616, 58620, 0, 1, 49152, 57344, - 58368, 58624, 58625, 58627, 58631, 58616, 58620, 58622, - 0, 1, 49152, 57344, 58368, 0, 1, 49152, - 57344, 58368, 58624, 0, 1, 49152, 57344, 58368, - 58624, 0, 1, 49152, 57344, 58368, 58624, 58626, - 0, 1, 49152, 57344, 58368, 58624, 0, 1, - 49152, 57344, 58368, 58624, 58628, 0, 1, 49152, - 57344, 58368, 58624, 58628, 0, 1, 49152, 57344, - 58368, 58624, 58632, 58630, 0, 1, 49152, 57344, - 58368, 58624, 0, 1, 49152, 57344, 58368, 58624, - 58632, 0, 1, 49152, 57344, 58368, 58624, 58632, - 0, 1, 49152, 57344, 58368, 58624, 58632, 58634, - 0, 1, 49152, 57344, 58368, 58624, 58632, 0, - 1, 49152, 57344, 58368, 58624, 58640, 58636, 0, - 1, 49152, 57344, 58368, 58624, 58640, 58636, 0, - 1, 49152, 57344, 58368, 58624, 58640, 58641, 58638, - 0, 1, 49152, 57344, 58368, 58624, 0, 1, - 49152, 57344, 58368, 58624, 58640, 0, 1, 49152, - 57344, 58368, 58624, 58640, 0, 1, 49152, 57344, - 58368, 58624, 58640, 58642, 0, 1, 49152, 57344, - 58368, 58624, 58640, 0, 1, 49152, 57344, 58368, - 58624, 58640, 58644, 0, 1, 49152, 57344, 58368, - 58624, 58640, 58644, 0, 1, 49152, 57344, 58368, - 58624, 58640, 58648, 58646, 0, 1, 49152, 57344, - 58368, 58624, 58640, 0, 1, 49152, 57344, 58368, - 58624, 58656, 58648, 0, 1, 49152, 57344, 58368, - 58624, 58656, 58648, 0, 1, 49152, 57344, 58368, - 58624, 58656, 58648, 58650, 0, 1, 49152, 57344, - 58368, 58624, 58656, 58648, 0, 1, 49152, 57344, - 58368, 58624, 58656, 58657, 58652, 0, 1, 49152, - 57344, 58368, 58624, 58656, 58657, 58652, 0, 1, - 49152, 57344, 58368, 58624, 58656, 58657, 58652, 58654, - 0, 1, 49152, 57344, 58368, 58624, 0, 1, - 49152, 57344, 58368, 58624, 58656, 0, 1, 49152, - 57344, 58368, 58624, 58656, 0, 1, 49152, 57344, - 58368, 58624, 58656, 58658, 0, 1, 49152, 57344, - 58368, 58624, 58656, 0, 1, 49152, 57344, 58368, - 58624, 58656, 58660, 0, 1, 49152, 57344, 58368, - 58624, 58656, 58660, 0, 1, 49152, 57344, 58368, - 58624, 58656, 58664, 58662, 0, 1, 49152, 57344, - 58368, 58624, 58656, 0, 1, 49152, 57344, 58368, - 58624, 58656, 58664, 0, 1, 49152, 57344, 58368, - 58624, 58656, 58664, 0, 1, 49152, 57344, 58368, - 58624, 58656, 58664, 58666, 0, 1, 49152, 57344, - 58368, 58624, 58656, 58664, 0, 1, 49152, 57344, - 58368, 58624, 58656, 58672, 58668, 0, 1, 49152, - 57344, 58368, 58624, 58656, 58672, 58668, 0, 1, - 49152, 57344, 58368, 58624, 58656, 58672, 58673, 58670, - 0, 1, 49152, 57344, 58368, 58624, 58656, 0, - 1, 49152, 57344, 58368, 58624, 58688, 58672, 0, - 1, 49152, 57344, 58368, 58624, 58688, 58672, 0, - 1, 49152, 57344, 58368, 58624, 58688, 58672, 58674, - 0, 1, 49152, 57344, 58368, 58624, 58688, 58672, - 0, 1, 49152, 57344, 58368, 58624, 58688, 58672, - 58676, 0, 1, 49152, 57344, 58368, 58624, 58688, - 58672, 58676, 0, 1, 49152, 57344, 58368, 58624, - 58688, 58672, 58680, 58678, 0, 1, 49152, 57344, - 58368, 58624, 58688, 58672, 0, 1, 49152, 57344, - 58368, 58624, 58688, 58689, 58680, 0, 1, 49152, - 57344, 58368, 58624, 58688, 58689, 58680, 0, 1, - 49152, 57344, 58368, 58624, 58688, 58689, 58680, 58682, - 0, 1, 49152, 57344, 58368, 58624, 58688, 58689, - 58680, 0, 1, 49152, 57344, 58368, 58624, 58688, - 58689, 58680, 58684, 0, 1, 49152, 57344, 58368, - 58624, 58688, 58689, 58691, 58684, 0, 1, 49152, - 57344, 58368, 58624, 58688, 58689, 58691, 58684, 58686, - 0, 1, 49152, 57344, 58368, 58624, 0, 1, - 49152, 57344, 58368, 58624, 58688, 0, 1, 49152, - 57344, 58368, 58624, 58688, 0, 1, 49152, 57344, - 58368, 58624, 58688, 58690, 0, 1, 49152, 57344, - 58368, 58624, 58688, 0, 1, 49152, 57344, 58368, - 58624, 58688, 58692, 0, 1, 49152, 57344, 58368, - 58624, 58688, 58692, 0, 1, 49152, 57344, 58368, - 58624, 58688, 58696, 58694, 0, 1, 49152, 57344, - 58368, 58624, 58688, 0, 1, 49152, 57344, 58368, - 58624, 58688, 58696, 0, 1, 49152, 57344, 58368, - 58624, 58688, 58696, 0, 1, 49152, 57344, 58368, - 58624, 58688, 58696, 58698, 0, 1, 49152, 57344, - 58368, 58624, 58688, 58696, 0, 1, 49152, 57344, - 58368, 58624, 58688, 58704, 58700, 0, 1, 49152, - 57344, 58368, 58624, 58688, 58704, 58700, 0, 1, - 49152, 57344, 58368, 58624, 58688, 58704, 58705, 58702, - 0, 1, 49152, 57344, 58368, 58624, 58688, 0, - 1, 49152, 57344, 58368, 58624, 58688, 58704, 0, - 1, 49152, 57344, 58368, 58624, 58688, 58704, 0, - 1, 49152, 57344, 58368, 58624, 58688, 58704, 58706, - 0, 1, 49152, 57344, 58368, 58624, 58688, 58704, - 0, 1, 49152, 57344, 58368, 58624, 58688, 58704, - 58708, 0, 1, 49152, 57344, 58368, 58624, 58688, - 58704, 58708, 0, 1, 49152, 57344, 58368, 58624, - 58688, 58704, 58712, 58710, 0, 1, 49152, 57344, - 58368, 58624, 58688, 58704, 0, 1, 49152, 57344, - 58368, 58624, 58688, 58720, 58712, 0, 1, 49152, - 57344, 58368, 58624, 58688, 58720, 58712, 0, 1, - 49152, 57344, 58368, 58624, 58688, 58720, 58712, 58714, - 0, 1, 49152, 57344, 58368, 58624, 58688, 58720, - 58712, 0, 1, 49152, 57344, 58368, 58624, 58688, - 58720, 58721, 58716, 0, 1, 49152, 57344, 58368, - 58624, 58688, 58720, 58721, 58716, 0, 1, 49152, - 57344, 58368, 58624, 58688, 58720, 58721, 58716, 58718, - 0, 1, 49152, 57344, 58368, 58624, 58688, 0, - 1, 49152, 57344, 58368, 58624, 58752, 58720, 0, - 1, 49152, 57344, 58368, 58624, 58752, 58720, 0, - 1, 49152, 57344, 58368, 58624, 58752, 58720, 58722, - 0, 1, 49152, 57344, 58368, 58624, 58752, 58720, - 0, 1, 49152, 57344, 58368, 58624, 58752, 58720, - 58724, 0, 1, 49152, 57344, 58368, 58624, 58752, - 58720, 58724, 0, 1, 49152, 57344, 58368, 58624, - 58752, 58720, 58728, 58726, 0, 1, 49152, 57344, - 58368, 58624, 58752, 58720, 0, 1, 49152, 57344, - 58368, 58624, 58752, 58720, 58728, 0, 1, 49152, - 57344, 58368, 58624, 58752, 58720, 58728, 0, 1, - 49152, 57344, 58368, 58624, 58752, 58720, 58728, 58730, - 0, 1, 49152, 57344, 58368, 58624, 58752, 58720, - 58728, 0, 1, 49152, 57344, 58368, 58624, 58752, - 58720, 58736, 58732, 0, 1, 49152, 57344, 58368, - 58624, 58752, 58720, 58736, 58732, 0, 1, 49152, - 57344, 58368, 58624, 58752, 58720, 58736, 58737, 58734, - 0, 1, 49152, 57344, 58368, 58624, 58752, 58720, - 0, 1, 49152, 57344, 58368, 58624, 58752, 58753, - 58736, 0, 1, 49152, 57344, 58368, 58624, 58752, - 58753, 58736, 0, 1, 49152, 57344, 58368, 58624, - 58752, 58753, 58736, 58738, 0, 1, 49152, 57344, - 58368, 58624, 58752, 58753, 58736, 0, 1, 49152, - 57344, 58368, 58624, 58752, 58753, 58736, 58740, 0, - 1, 49152, 57344, 58368, 58624, 58752, 58753, 58736, - 58740, 0, 1, 49152, 57344, 58368, 58624, 58752, - 58753, 58736, 58744, 58742, 0, 1, 49152, 57344, - 58368, 58624, 58752, 58753, 58736, 0, 1, 49152, - 57344, 58368, 58624, 58752, 58753, 58736, 58744, 0, - 1, 49152, 57344, 58368, 58624, 58752, 58753, 58755, - 58744, 0, 1, 49152, 57344, 58368, 58624, 58752, - 58753, 58755, 58744, 58746, 0, 1, 49152, 57344, - 58368, 58624, 58752, 58753, 58755, 58744, 0, 1, - 49152, 57344, 58368, 58624, 58752, 58753, 58755, 58744, - 58748, 0, 1, 49152, 57344, 58368, 58624, 58752, - 58753, 58755, 58744, 58748, 0, 1, 49152, 57344, - 58368, 58624, 58752, 58753, 58755, 58744, 58748, 58750, - 0, 1, 49152, 57344, 58368, 58624, 0, 1, - 49152, 57344, 58368, 58880, 58752, 0, 1, 49152, - 57344, 58368, 58880, 58752, 0, 1, 49152, 57344, - 58368, 58880, 58752, 58754, 0, 1, 49152, 57344, - 58368, 58880, 58752, 0, 1, 49152, 57344, 58368, - 58880, 58752, 58756, 0, 1, 49152, 57344, 58368, - 58880, 58752, 58756, 0, 1, 49152, 57344, 58368, - 58880, 58752, 58760, 58758, 0, 1, 49152, 57344, - 58368, 58880, 58752, 0, 1, 49152, 57344, 58368, - 58880, 58752, 58760, 0, 1, 49152, 57344, 58368, - 58880, 58752, 58760, 0, 1, 49152, 57344, 58368, - 58880, 58752, 58760, 58762, 0, 1, 49152, 57344, - 58368, 58880, 58752, 58760, 0, 1, 49152, 57344, - 58368, 58880, 58752, 58768, 58764, 0, 1, 49152, - 57344, 58368, 58880, 58752, 58768, 58764, 0, 1, - 49152, 57344, 58368, 58880, 58752, 58768, 58769, 58766, - 0, 1, 49152, 57344, 58368, 58880, 58752, 0, - 1, 49152, 57344, 58368, 58880, 58752, 58768, 0, - 1, 49152, 57344, 58368, 58880, 58752, 58768, 0, - 1, 49152, 57344, 58368, 58880, 58752, 58768, 58770, - 0, 1, 49152, 57344, 58368, 58880, 58752, 58768, - 0, 1, 49152, 57344, 58368, 58880, 58752, 58768, - 58772, 0, 1, 49152, 57344, 58368, 58880, 58752, - 58768, 58772, 0, 1, 49152, 57344, 58368, 58880, - 58752, 58768, 58776, 58774, 0, 1, 49152, 57344, - 58368, 58880, 58752, 58768, 0, 1, 49152, 57344, - 58368, 58880, 58752, 58784, 58776, 0, 1, 49152, - 57344, 58368, 58880, 58752, 58784, 58776, 0, 1, - 49152, 57344, 58368, 58880, 58752, 58784, 58776, 58778, - 0, 1, 49152, 57344, 58368, 58880, 58752, 58784, - 58776, 0, 1, 49152, 57344, 58368, 58880, 58752, - 58784, 58785, 58780, 0, 1, 49152, 57344, 58368, - 58880, 58752, 58784, 58785, 58780, 0, 1, 49152, - 57344, 58368, 58880, 58752, 58784, 58785, 58780, 58782, - 0, 1, 49152, 57344, 58368, 58880, 58752, 0, - 1, 49152, 57344, 58368, 58880, 58752, 58784, 0, - 1, 49152, 57344, 58368, 58880, 58752, 58784, 0, - 1, 49152, 57344, 58368, 58880, 58752, 58784, 58786, - 0, 1, 49152, 57344, 58368, 58880, 58752, 58784, - 0, 1, 49152, 57344, 58368, 58880, 58752, 58784, - 58788, 0, 1, 49152, 57344, 58368, 58880, 58752, - 58784, 58788, 0, 1, 49152, 57344, 58368, 58880, - 58752, 58784, 58792, 58790, 0, 1, 49152, 57344, - 58368, 58880, 58752, 58784, 0, 1, 49152, 57344, - 58368, 58880, 58752, 58784, 58792, 0, 1, 49152, - 57344, 58368, 58880, 58752, 58784, 58792, 0, 1, - 49152, 57344, 58368, 58880, 58752, 58784, 58792, 58794, - 0, 1, 49152, 57344, 58368, 58880, 58752, 58784, - 58792, 0, 1, 49152, 57344, 58368, 58880, 58752, - 58784, 58800, 58796, 0, 1, 49152, 57344, 58368, - 58880, 58752, 58784, 58800, 58796, 0, 1, 49152, - 57344, 58368, 58880, 58752, 58784, 58800, 58801, 58798, - 0, 1, 49152, 57344, 58368, 58880, 58752, 58784, - 0, 1, 49152, 57344, 58368, 58880, 58752, 58816, - 58800, 0, 1, 49152, 57344, 58368, 58880, 58752, - 58816, 58800, 0, 1, 49152, 57344, 58368, 58880, - 58752, 58816, 58800, 58802, 0, 1, 49152, 57344, - 58368, 58880, 58752, 58816, 58800, 0, 1, 49152, - 57344, 58368, 58880, 58752, 58816, 58800, 58804, 0, - 1, 49152, 57344, 58368, 58880, 58752, 58816, 58800, - 58804, 0, 1, 49152, 57344, 58368, 58880, 58752, - 58816, 58800, 58808, 58806, 0, 1, 49152, 57344, - 58368, 58880, 58752, 58816, 58800, 0, 1, 49152, - 57344, 58368, 58880, 58752, 58816, 58817, 58808, 0, - 1, 49152, 57344, 58368, 58880, 58752, 58816, 58817, - 58808, 0, 1, 49152, 57344, 58368, 58880, 58752, - 58816, 58817, 58808, 58810, 0, 1, 49152, 57344, - 58368, 58880, 58752, 58816, 58817, 58808, 0, 1, - 49152, 57344, 58368, 58880, 58752, 58816, 58817, 58808, - 58812, 0, 1, 49152, 57344, 58368, 58880, 58752, - 58816, 58817, 58819, 58812, 0, 1, 49152, 57344, - 58368, 58880, 58752, 58816, 58817, 58819, 58812, 58814, - 0, 1, 49152, 57344, 58368, 58880, 58752, 0, - 1, 49152, 57344, 58368, 58880, 58881, 58816, 0, - 1, 49152, 57344, 58368, 58880, 58881, 58816, 0, - 1, 49152, 57344, 58368, 58880, 58881, 58816, 58818, - 0, 1, 49152, 57344, 58368, 58880, 58881, 58816, - 0, 1, 49152, 57344, 58368, 58880, 58881, 58816, - 58820, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58816, 58820, 0, 1, 49152, 57344, 58368, 58880, - 58881, 58816, 58824, 58822, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58816, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58816, 58824, 0, 1, 49152, - 57344, 58368, 58880, 58881, 58816, 58824, 0, 1, - 49152, 57344, 58368, 58880, 58881, 58816, 58824, 58826, - 0, 1, 49152, 57344, 58368, 58880, 58881, 58816, - 58824, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58816, 58832, 58828, 0, 1, 49152, 57344, 58368, - 58880, 58881, 58816, 58832, 58828, 0, 1, 49152, - 57344, 58368, 58880, 58881, 58816, 58832, 58833, 58830, - 0, 1, 49152, 57344, 58368, 58880, 58881, 58816, - 0, 1, 49152, 57344, 58368, 58880, 58881, 58816, - 58832, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58816, 58832, 0, 1, 49152, 57344, 58368, 58880, - 58881, 58816, 58832, 58834, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58816, 58832, 0, 1, 49152, - 57344, 58368, 58880, 58881, 58816, 58832, 58836, 0, - 1, 49152, 57344, 58368, 58880, 58881, 58816, 58832, - 58836, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58816, 58832, 58840, 58838, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58816, 58832, 0, 1, 49152, - 57344, 58368, 58880, 58881, 58816, 58848, 58840, 0, - 1, 49152, 57344, 58368, 58880, 58881, 58816, 58848, - 58840, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58816, 58848, 58840, 58842, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58816, 58848, 58840, 0, 1, - 49152, 57344, 58368, 58880, 58881, 58816, 58848, 58849, - 58844, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58816, 58848, 58849, 58844, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58816, 58848, 58849, 58844, 58846, - 0, 1, 49152, 57344, 58368, 58880, 58881, 58816, - 0, 1, 49152, 57344, 58368, 58880, 58881, 58816, - 58848, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58883, 58848, 0, 1, 49152, 57344, 58368, 58880, - 58881, 58883, 58848, 58850, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58883, 58848, 0, 1, 49152, - 57344, 58368, 58880, 58881, 58883, 58848, 58852, 0, - 1, 49152, 57344, 58368, 58880, 58881, 58883, 58848, - 58852, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58883, 58848, 58856, 58854, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58883, 58848, 0, 1, 49152, - 57344, 58368, 58880, 58881, 58883, 58848, 58856, 0, - 1, 49152, 57344, 58368, 58880, 58881, 58883, 58848, - 58856, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58883, 58848, 58856, 58858, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58883, 58848, 58856, 0, 1, - 49152, 57344, 58368, 58880, 58881, 58883, 58848, 58864, - 58860, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58883, 58848, 58864, 58860, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58883, 58848, 58864, 58865, 58862, - 0, 1, 49152, 57344, 58368, 58880, 58881, 58883, - 58848, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58883, 58848, 58864, 0, 1, 49152, 57344, 58368, - 58880, 58881, 58883, 58848, 58864, 0, 1, 49152, - 57344, 58368, 58880, 58881, 58883, 58848, 58864, 58866, - 0, 1, 49152, 57344, 58368, 58880, 58881, 58883, - 58887, 58864, 0, 1, 49152, 57344, 58368, 58880, - 58881, 58883, 58887, 58864, 58868, 0, 1, 49152, - 57344, 58368, 58880, 58881, 58883, 58887, 58864, 58868, - 0, 1, 49152, 57344, 58368, 58880, 58881, 58883, - 58887, 58864, 58872, 58870, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58883, 58887, 58864, 0, 1, - 49152, 57344, 58368, 58880, 58881, 58883, 58887, 58864, - 58872, 0, 1, 49152, 57344, 58368, 58880, 58881, - 58883, 58887, 58864, 58872, 0, 1, 49152, 57344, - 58368, 58880, 58881, 58883, 58887, 58864, 58872, 58874, - 0, 1, 49152, 57344, 58368, 58880, 58881, 58883, - 58887, 58864, 58872, 0, 1, 49152, 57344, 58368, - 58880, 58881, 58883, 58887, 58864, 58872, 58876, 0, - 1, 49152, 57344, 58368, 58880, 58881, 58883, 58887, - 58864, 58872, 58876, 0, 1, 49152, 57344, 58368, - 58880, 58881, 58883, 58887, 58864, 58872, 58876, 58878, - 0, 1, 49152, 57344, 58368, 0, 1, 49152, - 57344, 59392, 58880, 0, 1, 49152, 57344, 59392, - 58880, 0, 1, 49152, 57344, 59392, 58880, 58882, - 0, 1, 49152, 57344, 59392, 58880, 0, 1, - 49152, 57344, 59392, 58880, 58884, 0, 1, 49152, - 57344, 59392, 58880, 58884, 0, 1, 49152, 57344, - 59392, 58880, 58888, 58886, 0, 1, 49152, 57344, - 59392, 58880, 0, 1, 49152, 57344, 59392, 58880, - 58888, 0, 1, 49152, 57344, 59392, 58880, 58888, - 0, 1, 49152, 57344, 59392, 58880, 58888, 58890, - 0, 1, 49152, 57344, 59392, 58880, 58888, 0, - 1, 49152, 57344, 59392, 58880, 58896, 58892, 0, - 1, 49152, 57344, 59392, 58880, 58896, 58892, 0, - 1, 49152, 57344, 59392, 58880, 58896, 58897, 58894, - 0, 1, 49152, 57344, 59392, 58880, 0, 1, - 49152, 57344, 59392, 58880, 58896, 0, 1, 49152, - 57344, 59392, 58880, 58896, 0, 1, 49152, 57344, - 59392, 58880, 58896, 58898, 0, 1, 49152, 57344, - 59392, 58880, 58896, 0, 1, 49152, 57344, 59392, - 58880, 58896, 58900, 0, 1, 49152, 57344, 59392, - 58880, 58896, 58900, 0, 1, 49152, 57344, 59392, - 58880, 58896, 58904, 58902, 0, 1, 49152, 57344, - 59392, 58880, 58896, 0, 1, 49152, 57344, 59392, - 58880, 58912, 58904, 0, 1, 49152, 57344, 59392, - 58880, 58912, 58904, 0, 1, 49152, 57344, 59392, - 58880, 58912, 58904, 58906, 0, 1, 49152, 57344, - 59392, 58880, 58912, 58904, 0, 1, 49152, 57344, - 59392, 58880, 58912, 58913, 58908, 0, 1, 49152, - 57344, 59392, 58880, 58912, 58913, 58908, 0, 1, - 49152, 57344, 59392, 58880, 58912, 58913, 58908, 58910, - 0, 1, 49152, 57344, 59392, 58880, 0, 1, - 49152, 57344, 59392, 58880, 58912, 0, 1, 49152, - 57344, 59392, 58880, 58912, 0, 1, 49152, 57344, - 59392, 58880, 58912, 58914, 0, 1, 49152, 57344, - 59392, 58880, 58912, 0, 1, 49152, 57344, 59392, - 58880, 58912, 58916, 0, 1, 49152, 57344, 59392, - 58880, 58912, 58916, 0, 1, 49152, 57344, 59392, - 58880, 58912, 58920, 58918, 0, 1, 49152, 57344, - 59392, 58880, 58912, 0, 1, 49152, 57344, 59392, - 58880, 58912, 58920, 0, 1, 49152, 57344, 59392, - 58880, 58912, 58920, 0, 1, 49152, 57344, 59392, - 58880, 58912, 58920, 58922, 0, 1, 49152, 57344, - 59392, 58880, 58912, 58920, 0, 1, 49152, 57344, - 59392, 58880, 58912, 58928, 58924, 0, 1, 49152, - 57344, 59392, 58880, 58912, 58928, 58924, 0, 1, - 49152, 57344, 59392, 58880, 58912, 58928, 58929, 58926, - 0, 1, 49152, 57344, 59392, 58880, 58912, 0, - 1, 49152, 57344, 59392, 58880, 58944, 58928, 0, - 1, 49152, 57344, 59392, 58880, 58944, 58928, 0, - 1, 49152, 57344, 59392, 58880, 58944, 58928, 58930, - 0, 1, 49152, 57344, 59392, 58880, 58944, 58928, - 0, 1, 49152, 57344, 59392, 58880, 58944, 58928, - 58932, 0, 1, 49152, 57344, 59392, 58880, 58944, - 58928, 58932, 0, 1, 49152, 57344, 59392, 58880, - 58944, 58928, 58936, 58934, 0, 1, 49152, 57344, - 59392, 58880, 58944, 58928, 0, 1, 49152, 57344, - 59392, 58880, 58944, 58945, 58936, 0, 1, 49152, - 57344, 59392, 58880, 58944, 58945, 58936, 0, 1, - 49152, 57344, 59392, 58880, 58944, 58945, 58936, 58938, - 0, 1, 49152, 57344, 59392, 58880, 58944, 58945, - 58936, 0, 1, 49152, 57344, 59392, 58880, 58944, - 58945, 58936, 58940, 0, 1, 49152, 57344, 59392, - 58880, 58944, 58945, 58947, 58940, 0, 1, 49152, - 57344, 59392, 58880, 58944, 58945, 58947, 58940, 58942, - 0, 1, 49152, 57344, 59392, 58880, 0, 1, - 49152, 57344, 59392, 58880, 58944, 0, 1, 49152, - 57344, 59392, 58880, 58944, 0, 1, 49152, 57344, - 59392, 58880, 58944, 58946, 0, 1, 49152, 57344, - 59392, 58880, 58944, 0, 1, 49152, 57344, 59392, - 58880, 58944, 58948, 0, 1, 49152, 57344, 59392, - 58880, 58944, 58948, 0, 1, 49152, 57344, 59392, - 58880, 58944, 58952, 58950, 0, 1, 49152, 57344, - 59392, 58880, 58944, 0, 1, 49152, 57344, 59392, - 58880, 58944, 58952, 0, 1, 49152, 57344, 59392, - 58880, 58944, 58952, 0, 1, 49152, 57344, 59392, - 58880, 58944, 58952, 58954, 0, 1, 49152, 57344, - 59392, 58880, 58944, 58952, 0, 1, 49152, 57344, - 59392, 58880, 58944, 58960, 58956, 0, 1, 49152, - 57344, 59392, 58880, 58944, 58960, 58956, 0, 1, - 49152, 57344, 59392, 58880, 58944, 58960, 58961, 58958, - 0, 1, 49152, 57344, 59392, 58880, 58944, 0, - 1, 49152, 57344, 59392, 58880, 58944, 58960, 0, - 1, 49152, 57344, 59392, 58880, 58944, 58960, 0, - 1, 49152, 57344, 59392, 58880, 58944, 58960, 58962, - 0, 1, 49152, 57344, 59392, 58880, 58944, 58960, - 0, 1, 49152, 57344, 59392, 58880, 58944, 58960, - 58964, 0, 1, 49152, 57344, 59392, 58880, 58944, - 58960, 58964, 0, 1, 49152, 57344, 59392, 58880, - 58944, 58960, 58968, 58966, 0, 1, 49152, 57344, - 59392, 58880, 58944, 58960, 0, 1, 49152, 57344, - 59392, 58880, 58944, 58976, 58968, 0, 1, 49152, - 57344, 59392, 58880, 58944, 58976, 58968, 0, 1, - 49152, 57344, 59392, 58880, 58944, 58976, 58968, 58970, - 0, 1, 49152, 57344, 59392, 58880, 58944, 58976, - 58968, 0, 1, 49152, 57344, 59392, 58880, 58944, - 58976, 58977, 58972, 0, 1, 49152, 57344, 59392, - 58880, 58944, 58976, 58977, 58972, 0, 1, 49152, - 57344, 59392, 58880, 58944, 58976, 58977, 58972, 58974, - 0, 1, 49152, 57344, 59392, 58880, 58944, 0, - 1, 49152, 57344, 59392, 58880, 59008, 58976, 0, - 1, 49152, 57344, 59392, 58880, 59008, 58976, 0, - 1, 49152, 57344, 59392, 58880, 59008, 58976, 58978, - 0, 1, 49152, 57344, 59392, 58880, 59008, 58976, - 0, 1, 49152, 57344, 59392, 58880, 59008, 58976, - 58980, 0, 1, 49152, 57344, 59392, 58880, 59008, - 58976, 58980, 0, 1, 49152, 57344, 59392, 58880, - 59008, 58976, 58984, 58982, 0, 1, 49152, 57344, - 59392, 58880, 59008, 58976, 0, 1, 49152, 57344, - 59392, 58880, 59008, 58976, 58984, 0, 1, 49152, - 57344, 59392, 58880, 59008, 58976, 58984, 0, 1, - 49152, 57344, 59392, 58880, 59008, 58976, 58984, 58986, - 0, 1, 49152, 57344, 59392, 58880, 59008, 58976, - 58984, 0, 1, 49152, 57344, 59392, 58880, 59008, - 58976, 58992, 58988, 0, 1, 49152, 57344, 59392, - 58880, 59008, 58976, 58992, 58988, 0, 1, 49152, - 57344, 59392, 58880, 59008, 58976, 58992, 58993, 58990, - 0, 1, 49152, 57344, 59392, 58880, 59008, 58976, - 0, 1, 49152, 57344, 59392, 58880, 59008, 59009, - 58992, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59009, 58992, 0, 1, 49152, 57344, 59392, 58880, - 59008, 59009, 58992, 58994, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59009, 58992, 0, 1, 49152, - 57344, 59392, 58880, 59008, 59009, 58992, 58996, 0, - 1, 49152, 57344, 59392, 58880, 59008, 59009, 58992, - 58996, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59009, 58992, 59000, 58998, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59009, 58992, 0, 1, 49152, - 57344, 59392, 58880, 59008, 59009, 58992, 59000, 0, - 1, 49152, 57344, 59392, 58880, 59008, 59009, 59011, - 59000, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59009, 59011, 59000, 59002, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59009, 59011, 59000, 0, 1, - 49152, 57344, 59392, 58880, 59008, 59009, 59011, 59000, - 59004, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59009, 59011, 59000, 59004, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59009, 59011, 59000, 59004, 59006, - 0, 1, 49152, 57344, 59392, 58880, 0, 1, - 49152, 57344, 59392, 58880, 59008, 0, 1, 49152, - 57344, 59392, 58880, 59008, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59010, 0, 1, 49152, 57344, - 59392, 58880, 59008, 0, 1, 49152, 57344, 59392, - 58880, 59008, 59012, 0, 1, 49152, 57344, 59392, - 58880, 59008, 59012, 0, 1, 49152, 57344, 59392, - 58880, 59008, 59016, 59014, 0, 1, 49152, 57344, - 59392, 58880, 59008, 0, 1, 49152, 57344, 59392, - 58880, 59008, 59016, 0, 1, 49152, 57344, 59392, - 58880, 59008, 59016, 0, 1, 49152, 57344, 59392, - 58880, 59008, 59016, 59018, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59016, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59024, 59020, 0, 1, 49152, - 57344, 59392, 58880, 59008, 59024, 59020, 0, 1, - 49152, 57344, 59392, 58880, 59008, 59024, 59025, 59022, - 0, 1, 49152, 57344, 59392, 58880, 59008, 0, - 1, 49152, 57344, 59392, 58880, 59008, 59024, 0, - 1, 49152, 57344, 59392, 58880, 59008, 59024, 0, - 1, 49152, 57344, 59392, 58880, 59008, 59024, 59026, - 0, 1, 49152, 57344, 59392, 58880, 59008, 59024, - 0, 1, 49152, 57344, 59392, 58880, 59008, 59024, - 59028, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59024, 59028, 0, 1, 49152, 57344, 59392, 58880, - 59008, 59024, 59032, 59030, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59024, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59040, 59032, 0, 1, 49152, - 57344, 59392, 58880, 59008, 59040, 59032, 0, 1, - 49152, 57344, 59392, 58880, 59008, 59040, 59032, 59034, - 0, 1, 49152, 57344, 59392, 58880, 59008, 59040, - 59032, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59040, 59041, 59036, 0, 1, 49152, 57344, 59392, - 58880, 59008, 59040, 59041, 59036, 0, 1, 49152, - 57344, 59392, 58880, 59008, 59040, 59041, 59036, 59038, - 0, 1, 49152, 57344, 59392, 58880, 59008, 0, - 1, 49152, 57344, 59392, 58880, 59008, 59040, 0, - 1, 49152, 57344, 59392, 58880, 59008, 59040, 0, - 1, 49152, 57344, 59392, 58880, 59008, 59040, 59042, - 0, 1, 49152, 57344, 59392, 58880, 59008, 59040, - 0, 1, 49152, 57344, 59392, 58880, 59008, 59040, - 59044, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59040, 59044, 0, 1, 49152, 57344, 59392, 58880, - 59008, 59040, 59048, 59046, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59040, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59040, 59048, 0, 1, 49152, - 57344, 59392, 58880, 59008, 59040, 59048, 0, 1, - 49152, 57344, 59392, 58880, 59008, 59040, 59048, 59050, - 0, 1, 49152, 57344, 59392, 58880, 59008, 59040, - 59048, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59040, 59056, 59052, 0, 1, 49152, 57344, 59392, - 58880, 59008, 59040, 59056, 59052, 0, 1, 49152, - 57344, 59392, 58880, 59008, 59040, 59056, 59057, 59054, - 0, 1, 49152, 57344, 59392, 58880, 59008, 59040, - 0, 1, 49152, 57344, 59392, 58880, 59008, 59072, - 59056, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59072, 59056, 0, 1, 49152, 57344, 59392, 58880, - 59008, 59072, 59056, 59058, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59072, 59056, 0, 1, 49152, - 57344, 59392, 58880, 59008, 59072, 59056, 59060, 0, - 1, 49152, 57344, 59392, 58880, 59008, 59072, 59056, - 59060, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59072, 59056, 59064, 59062, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59072, 59056, 0, 1, 49152, - 57344, 59392, 58880, 59008, 59072, 59073, 59064, 0, - 1, 49152, 57344, 59392, 58880, 59008, 59072, 59073, - 59064, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59072, 59073, 59064, 59066, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59072, 59073, 59064, 0, 1, - 49152, 57344, 59392, 58880, 59008, 59072, 59073, 59064, - 59068, 0, 1, 49152, 57344, 59392, 58880, 59008, - 59072, 59073, 59075, 59068, 0, 1, 49152, 57344, - 59392, 58880, 59008, 59072, 59073, 59075, 59068, 59070, - 0, 1, 49152, 57344, 59392, 58880, 59008, 0, - 1, 49152, 57344, 59392, 58880, 59136, 59072, 0, - 1, 49152, 57344, 59392, 58880, 59136, 59072, 0, - 1, 49152, 57344, 59392, 58880, 59136, 59072, 59074, - 0, 1, 49152, 57344, 59392, 58880, 59136, 59072, - 0, 1, 49152, 57344, 59392, 58880, 59136, 59072, - 59076, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59072, 59076, 0, 1, 49152, 57344, 59392, 58880, - 59136, 59072, 59080, 59078, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59072, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59072, 59080, 0, 1, 49152, - 57344, 59392, 58880, 59136, 59072, 59080, 0, 1, - 49152, 57344, 59392, 58880, 59136, 59072, 59080, 59082, - 0, 1, 49152, 57344, 59392, 58880, 59136, 59072, - 59080, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59072, 59088, 59084, 0, 1, 49152, 57344, 59392, - 58880, 59136, 59072, 59088, 59084, 0, 1, 49152, - 57344, 59392, 58880, 59136, 59072, 59088, 59089, 59086, - 0, 1, 49152, 57344, 59392, 58880, 59136, 59072, - 0, 1, 49152, 57344, 59392, 58880, 59136, 59072, - 59088, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59072, 59088, 0, 1, 49152, 57344, 59392, 58880, - 59136, 59072, 59088, 59090, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59072, 59088, 0, 1, 49152, - 57344, 59392, 58880, 59136, 59072, 59088, 59092, 0, - 1, 49152, 57344, 59392, 58880, 59136, 59072, 59088, - 59092, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59072, 59088, 59096, 59094, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59072, 59088, 0, 1, 49152, - 57344, 59392, 58880, 59136, 59072, 59104, 59096, 0, - 1, 49152, 57344, 59392, 58880, 59136, 59072, 59104, - 59096, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59072, 59104, 59096, 59098, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59072, 59104, 59096, 0, 1, - 49152, 57344, 59392, 58880, 59136, 59072, 59104, 59105, - 59100, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59072, 59104, 59105, 59100, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59072, 59104, 59105, 59100, 59102, - 0, 1, 49152, 57344, 59392, 58880, 59136, 59072, - 0, 1, 49152, 57344, 59392, 58880, 59136, 59137, - 59104, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59137, 59104, 0, 1, 49152, 57344, 59392, 58880, - 59136, 59137, 59104, 59106, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59137, 59104, 0, 1, 49152, - 57344, 59392, 58880, 59136, 59137, 59104, 59108, 0, - 1, 49152, 57344, 59392, 58880, 59136, 59137, 59104, - 59108, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59137, 59104, 59112, 59110, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59137, 59104, 0, 1, 49152, - 57344, 59392, 58880, 59136, 59137, 59104, 59112, 0, - 1, 49152, 57344, 59392, 58880, 59136, 59137, 59104, - 59112, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59137, 59104, 59112, 59114, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59137, 59104, 59112, 0, 1, - 49152, 57344, 59392, 58880, 59136, 59137, 59104, 59120, - 59116, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59137, 59104, 59120, 59116, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59137, 59104, 59120, 59121, 59118, - 0, 1, 49152, 57344, 59392, 58880, 59136, 59137, - 59104, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59137, 59104, 59120, 0, 1, 49152, 57344, 59392, - 58880, 59136, 59137, 59139, 59120, 0, 1, 49152, - 57344, 59392, 58880, 59136, 59137, 59139, 59120, 59122, - 0, 1, 49152, 57344, 59392, 58880, 59136, 59137, - 59139, 59120, 0, 1, 49152, 57344, 59392, 58880, - 59136, 59137, 59139, 59120, 59124, 0, 1, 49152, - 57344, 59392, 58880, 59136, 59137, 59139, 59120, 59124, - 0, 1, 49152, 57344, 59392, 58880, 59136, 59137, - 59139, 59120, 59128, 59126, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59137, 59139, 59120, 0, 1, - 49152, 57344, 59392, 58880, 59136, 59137, 59139, 59120, - 59128, 0, 1, 49152, 57344, 59392, 58880, 59136, - 59137, 59139, 59120, 59128, 0, 1, 49152, 57344, - 59392, 58880, 59136, 59137, 59139, 59120, 59128, 59130, - 0, 1, 49152, 57344, 59392, 58880, 59136, 59137, - 59139, 59143, 59128, 0, 1, 49152, 57344, 59392, - 58880, 59136, 59137, 59139, 59143, 59128, 59132, 0, - 1, 49152, 57344, 59392, 58880, 59136, 59137, 59139, - 59143, 59128, 59132, 0, 1, 49152, 57344, 59392, - 58880, 59136, 59137, 59139, 59143, 59128, 59132, 59134, - 0, 1, 49152, 57344, 59392, 58880, 0, 1, - 49152, 57344, 59392, 58880, 59136, 0, 1, 49152, - 57344, 59392, 59393, 59136, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59138, 0, 1, 49152, 57344, - 59392, 59393, 59136, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59140, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59140, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59144, 59142, 0, 1, 49152, 57344, - 59392, 59393, 59136, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59144, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59144, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59144, 59146, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59144, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59152, 59148, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59152, 59148, 0, 1, - 49152, 57344, 59392, 59393, 59136, 59152, 59153, 59150, - 0, 1, 49152, 57344, 59392, 59393, 59136, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59152, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59152, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59152, 59154, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59152, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59152, - 59156, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59152, 59156, 0, 1, 49152, 57344, 59392, 59393, - 59136, 59152, 59160, 59158, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59152, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59168, 59160, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59168, 59160, 0, 1, - 49152, 57344, 59392, 59393, 59136, 59168, 59160, 59162, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59168, - 59160, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59168, 59169, 59164, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59168, 59169, 59164, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59168, 59169, 59164, 59166, - 0, 1, 49152, 57344, 59392, 59393, 59136, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59168, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59168, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59168, 59170, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59168, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59168, - 59172, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59168, 59172, 0, 1, 49152, 57344, 59392, 59393, - 59136, 59168, 59176, 59174, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59168, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59168, 59176, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59168, 59176, 0, 1, - 49152, 57344, 59392, 59393, 59136, 59168, 59176, 59178, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59168, - 59176, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59168, 59184, 59180, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59168, 59184, 59180, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59168, 59184, 59185, 59182, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59168, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59200, - 59184, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59200, 59184, 0, 1, 49152, 57344, 59392, 59393, - 59136, 59200, 59184, 59186, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59200, 59184, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59200, 59184, 59188, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59200, 59184, - 59188, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59200, 59184, 59192, 59190, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59200, 59184, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59200, 59201, 59192, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59200, 59201, - 59192, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59200, 59201, 59192, 59194, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59200, 59201, 59192, 0, 1, - 49152, 57344, 59392, 59393, 59136, 59200, 59201, 59192, - 59196, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59200, 59201, 59203, 59196, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59200, 59201, 59203, 59196, 59198, - 0, 1, 49152, 57344, 59392, 59393, 59136, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59200, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59200, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59200, 59202, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59200, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59200, - 59204, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59200, 59204, 0, 1, 49152, 57344, 59392, 59393, - 59136, 59200, 59208, 59206, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59200, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59200, 59208, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59200, 59208, 0, 1, - 49152, 57344, 59392, 59393, 59136, 59200, 59208, 59210, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59200, - 59208, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59200, 59216, 59212, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59200, 59216, 59212, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59200, 59216, 59217, 59214, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59200, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59200, - 59216, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59200, 59216, 0, 1, 49152, 57344, 59392, 59393, - 59136, 59200, 59216, 59218, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59200, 59216, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59200, 59216, 59220, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59200, 59216, - 59220, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59200, 59216, 59224, 59222, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59200, 59216, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59200, 59232, 59224, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59200, 59232, - 59224, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59200, 59232, 59224, 59226, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59200, 59232, 59224, 0, 1, - 49152, 57344, 59392, 59393, 59136, 59200, 59232, 59233, - 59228, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59200, 59232, 59233, 59228, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59200, 59232, 59233, 59228, 59230, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59200, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59264, - 59232, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59264, 59232, 0, 1, 49152, 57344, 59392, 59393, - 59136, 59264, 59232, 59234, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59264, 59232, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59264, 59232, 59236, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59264, 59232, - 59236, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59264, 59232, 59240, 59238, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59264, 59232, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59264, 59232, 59240, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59264, 59232, - 59240, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59264, 59232, 59240, 59242, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59264, 59232, 59240, 0, 1, - 49152, 57344, 59392, 59393, 59136, 59264, 59232, 59248, - 59244, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59264, 59232, 59248, 59244, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59264, 59232, 59248, 59249, 59246, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59264, - 59232, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59264, 59265, 59248, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59264, 59265, 59248, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59264, 59265, 59248, 59250, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59264, - 59265, 59248, 0, 1, 49152, 57344, 59392, 59393, - 59136, 59264, 59265, 59248, 59252, 0, 1, 49152, - 57344, 59392, 59393, 59136, 59264, 59265, 59248, 59252, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59264, - 59265, 59248, 59256, 59254, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59264, 59265, 59248, 0, 1, - 49152, 57344, 59392, 59393, 59136, 59264, 59265, 59248, - 59256, 0, 1, 49152, 57344, 59392, 59393, 59136, - 59264, 59265, 59267, 59256, 0, 1, 49152, 57344, - 59392, 59393, 59136, 59264, 59265, 59267, 59256, 59258, - 0, 1, 49152, 57344, 59392, 59393, 59136, 59264, - 59265, 59267, 59256, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59264, 59265, 59267, 59256, 59260, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59264, 59265, - 59267, 59256, 59260, 0, 1, 49152, 57344, 59392, - 59393, 59136, 59264, 59265, 59267, 59256, 59260, 59262, - 0, 1, 49152, 57344, 59392, 59393, 59136, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59264, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59264, 0, - 1, 49152, 57344, 59392, 59393, 59136, 59264, 59266, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 59268, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59268, 0, 1, 49152, 57344, 59392, 59393, - 59395, 59264, 59272, 59270, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59272, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59264, 59272, 0, 1, - 49152, 57344, 59392, 59393, 59395, 59264, 59272, 59274, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 59272, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59280, 59276, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59264, 59280, 59276, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59264, 59280, 59281, 59278, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 59280, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59280, 0, 1, 49152, 57344, 59392, 59393, - 59395, 59264, 59280, 59282, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59280, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59264, 59280, 59284, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59264, 59280, - 59284, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59280, 59288, 59286, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59280, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59264, 59296, 59288, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59264, 59296, - 59288, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59296, 59288, 59290, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59296, 59288, 0, 1, - 49152, 57344, 59392, 59393, 59395, 59264, 59296, 59297, - 59292, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59296, 59297, 59292, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59296, 59297, 59292, 59294, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 59296, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59296, 0, 1, 49152, 57344, 59392, 59393, - 59395, 59264, 59296, 59298, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59296, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59264, 59296, 59300, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59264, 59296, - 59300, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59296, 59304, 59302, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59296, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59264, 59296, 59304, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59264, 59296, - 59304, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59296, 59304, 59306, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59296, 59304, 0, 1, - 49152, 57344, 59392, 59393, 59395, 59264, 59296, 59312, - 59308, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59296, 59312, 59308, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59296, 59312, 59313, 59310, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 59296, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59328, 59312, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59264, 59328, 59312, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59264, 59328, 59312, 59314, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 59328, 59312, 0, 1, 49152, 57344, 59392, 59393, - 59395, 59264, 59328, 59312, 59316, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59264, 59328, 59312, 59316, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 59328, 59312, 59320, 59318, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59328, 59312, 0, 1, - 49152, 57344, 59392, 59393, 59395, 59264, 59328, 59329, - 59320, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59328, 59329, 59320, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59328, 59329, 59320, 59322, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 59328, 59329, 59320, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59264, 59328, 59329, 59320, 59324, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59264, 59328, - 59329, 59331, 59324, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59264, 59328, 59329, 59331, 59324, 59326, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59264, - 59328, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59328, 0, 1, 49152, 57344, 59392, 59393, - 59395, 59264, 59328, 59330, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59264, 59328, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59264, 59328, 59332, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59264, 59328, - 59332, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59264, 59328, 59336, 59334, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59399, 59328, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59399, 59328, 59336, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59399, 59328, - 59336, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59399, 59328, 59336, 59338, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59399, 59328, 59336, 0, 1, - 49152, 57344, 59392, 59393, 59395, 59399, 59328, 59344, - 59340, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59399, 59328, 59344, 59340, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59399, 59328, 59344, 59345, 59342, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59399, - 59328, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59399, 59328, 59344, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59399, 59328, 59344, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59399, 59328, 59344, 59346, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59399, - 59328, 59344, 0, 1, 49152, 57344, 59392, 59393, - 59395, 59399, 59328, 59344, 59348, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59399, 59328, 59344, 59348, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59399, - 59328, 59344, 59352, 59350, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59399, 59328, 59344, 0, 1, - 49152, 57344, 59392, 59393, 59395, 59399, 59328, 59360, - 59352, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59399, 59328, 59360, 59352, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59399, 59328, 59360, 59352, 59354, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59399, - 59328, 59360, 59352, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59399, 59328, 59360, 59361, 59356, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59399, 59328, - 59360, 59361, 59356, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59399, 59328, 59360, 59361, 59356, 59358, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59399, - 59328, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59399, 59328, 59360, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59399, 59328, 59360, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59399, 59328, 59360, 59362, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59399, - 59328, 59360, 0, 1, 49152, 57344, 59392, 59393, - 59395, 59399, 59328, 59360, 59364, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59399, 59328, 59360, 59364, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59399, - 59328, 59360, 59368, 59366, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59399, 59328, 59360, 0, 1, - 49152, 57344, 59392, 59393, 59395, 59399, 59328, 59360, - 59368, 0, 1, 49152, 57344, 59392, 59393, 59395, - 59399, 59328, 59360, 59368, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59399, 59328, 59360, 59368, 59370, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59399, - 59328, 59360, 59368, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59399, 59328, 59360, 59376, 59372, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59399, 59328, - 59360, 59376, 59372, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59399, 59328, 59360, 59376, 59377, 59374, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59399, - 59407, 59360, 0, 1, 49152, 57344, 59392, 59393, - 59395, 59399, 59407, 59360, 59376, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59399, 59407, 59360, 59376, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59399, - 59407, 59360, 59376, 59378, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59399, 59407, 59360, 59376, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59399, 59407, - 59360, 59376, 59380, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59399, 59407, 59360, 59376, 59380, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59399, 59407, - 59360, 59376, 59384, 59382, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59399, 59407, 59360, 59376, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59399, 59407, - 59360, 59376, 59384, 0, 1, 49152, 57344, 59392, - 59393, 59395, 59399, 59407, 59360, 59376, 59384, 0, - 1, 49152, 57344, 59392, 59393, 59395, 59399, 59407, - 59360, 59376, 59384, 59386, 0, 1, 49152, 57344, - 59392, 59393, 59395, 59399, 59407, 59360, 59376, 59384, - 0, 1, 49152, 57344, 59392, 59393, 59395, 59399, - 59407, 59360, 59376, 59384, 59388, 0, 1, 49152, - 57344, 59392, 59393, 59395, 59399, 59407, 59360, 59376, - 59384, 59388, 0, 1, 49152, 57344, 59392, 59393, - 59395, 59399, 59407, 59360, 59376, 59384, 59388, 59390, - 0, 1, 49152, 57344, 0, 1, 49152, 57344, - 59392, 0, 1, 49152, 57344, 59392, 0, 1, - 49152, 57344, 59392, 59394, 0, 1, 49152, 57344, - 59392, 0, 1, 49152, 57344, 59392, 59396, 0, - 1, 49152, 57344, 59392, 59396, 0, 1, 49152, - 57344, 59392, 59400, 59398, 0, 1, 49152, 57344, - 59392, 0, 1, 49152, 57344, 59392, 59400, 0, - 1, 49152, 57344, 59392, 59400, 0, 1, 49152, - 57344, 59392, 59400, 59402, 0, 1, 49152, 57344, - 59392, 59400, 0, 1, 49152, 57344, 59392, 59408, - 59404, 0, 1, 49152, 57344, 59392, 59408, 59404, - 0, 1, 49152, 57344, 59392, 59408, 59409, 59406, - 0, 1, 49152, 57344, 59392, 0, 1, 49152, - 57344, 59392, 59408, 0, 1, 49152, 57344, 59392, - 59408, 0, 1, 49152, 57344, 59392, 59408, 59410, - 0, 1, 49152, 57344, 59392, 59408, 0, 1, - 49152, 57344, 59392, 59408, 59412, 0, 1, 49152, - 57344, 59392, 59408, 59412, 0, 1, 49152, 57344, - 59392, 59408, 59416, 59414, 0, 1, 49152, 57344, - 59392, 59408, 0, 1, 49152, 57344, 59392, 59424, - 59416, 0, 1, 49152, 57344, 59392, 59424, 59416, - 0, 1, 49152, 57344, 59392, 59424, 59416, 59418, - 0, 1, 49152, 57344, 59392, 59424, 59416, 0, - 1, 49152, 57344, 59392, 59424, 59425, 59420, 0, - 1, 49152, 57344, 59392, 59424, 59425, 59420, 0, - 1, 49152, 57344, 59392, 59424, 59425, 59420, 59422, - 0, 1, 49152, 57344, 59392, 0, 1, 49152, - 57344, 59392, 59424, 0, 1, 49152, 57344, 59392, - 59424, 0, 1, 49152, 57344, 59392, 59424, 59426, - 0, 1, 49152, 57344, 59392, 59424, 0, 1, - 49152, 57344, 59392, 59424, 59428, 0, 1, 49152, - 57344, 59392, 59424, 59428, 0, 1, 49152, 57344, - 59392, 59424, 59432, 59430, 0, 1, 49152, 57344, - 59392, 59424, 0, 1, 49152, 57344, 59392, 59424, - 59432, 0, 1, 49152, 57344, 59392, 59424, 59432, - 0, 1, 49152, 57344, 59392, 59424, 59432, 59434, - 0, 1, 49152, 57344, 59392, 59424, 59432, 0, - 1, 49152, 57344, 59392, 59424, 59440, 59436, 0, - 1, 49152, 57344, 59392, 59424, 59440, 59436, 0, - 1, 49152, 57344, 59392, 59424, 59440, 59441, 59438, - 0, 1, 49152, 57344, 59392, 59424, 0, 1, - 49152, 57344, 59392, 59456, 59440, 0, 1, 49152, - 57344, 59392, 59456, 59440, 0, 1, 49152, 57344, - 59392, 59456, 59440, 59442, 0, 1, 49152, 57344, - 59392, 59456, 59440, 0, 1, 49152, 57344, 59392, - 59456, 59440, 59444, 0, 1, 49152, 57344, 59392, - 59456, 59440, 59444, 0, 1, 49152, 57344, 59392, - 59456, 59440, 59448, 59446, 0, 1, 49152, 57344, - 59392, 59456, 59440, 0, 1, 49152, 57344, 59392, - 59456, 59457, 59448, 0, 1, 49152, 57344, 59392, - 59456, 59457, 59448, 0, 1, 49152, 57344, 59392, - 59456, 59457, 59448, 59450, 0, 1, 49152, 57344, - 59392, 59456, 59457, 59448, 0, 1, 49152, 57344, - 59392, 59456, 59457, 59448, 59452, 0, 1, 49152, - 57344, 59392, 59456, 59457, 59459, 59452, 0, 1, - 49152, 57344, 59392, 59456, 59457, 59459, 59452, 59454, - 0, 1, 49152, 57344, 59392, 0, 1, 49152, - 57344, 59392, 59456, 0, 1, 49152, 57344, 59392, - 59456, 0, 1, 49152, 57344, 59392, 59456, 59458, - 0, 1, 49152, 57344, 59392, 59456, 0, 1, - 49152, 57344, 59392, 59456, 59460, 0, 1, 49152, - 57344, 59392, 59456, 59460, 0, 1, 49152, 57344, - 59392, 59456, 59464, 59462, 0, 1, 49152, 57344, - 59392, 59456, 0, 1, 49152, 57344, 59392, 59456, - 59464, 0, 1, 49152, 57344, 59392, 59456, 59464, - 0, 1, 49152, 57344, 59392, 59456, 59464, 59466, - 0, 1, 49152, 57344, 59392, 59456, 59464, 0, - 1, 49152, 57344, 59392, 59456, 59472, 59468, 0, - 1, 49152, 57344, 59392, 59456, 59472, 59468, 0, - 1, 49152, 57344, 59392, 59456, 59472, 59473, 59470, - 0, 1, 49152, 57344, 59392, 59456, 0, 1, - 49152, 57344, 59392, 59456, 59472, 0, 1, 49152, - 57344, 59392, 59456, 59472, 0, 1, 49152, 57344, - 59392, 59456, 59472, 59474, 0, 1, 49152, 57344, - 59392, 59456, 59472, 0, 1, 49152, 57344, 59392, - 59456, 59472, 59476, 0, 1, 49152, 57344, 59392, - 59456, 59472, 59476, 0, 1, 49152, 57344, 59392, - 59456, 59472, 59480, 59478, 0, 1, 49152, 57344, - 59392, 59456, 59472, 0, 1, 49152, 57344, 59392, - 59456, 59488, 59480, 0, 1, 49152, 57344, 59392, - 59456, 59488, 59480, 0, 1, 49152, 57344, 59392, - 59456, 59488, 59480, 59482, 0, 1, 49152, 57344, - 59392, 59456, 59488, 59480, 0, 1, 49152, 57344, - 59392, 59456, 59488, 59489, 59484, 0, 1, 49152, - 57344, 59392, 59456, 59488, 59489, 59484, 0, 1, - 49152, 57344, 59392, 59456, 59488, 59489, 59484, 59486, - 0, 1, 49152, 57344, 59392, 59456, 0, 1, - 49152, 57344, 59392, 59520, 59488, 0, 1, 49152, - 57344, 59392, 59520, 59488, 0, 1, 49152, 57344, - 59392, 59520, 59488, 59490, 0, 1, 49152, 57344, - 59392, 59520, 59488, 0, 1, 49152, 57344, 59392, - 59520, 59488, 59492, 0, 1, 49152, 57344, 59392, - 59520, 59488, 59492, 0, 1, 49152, 57344, 59392, - 59520, 59488, 59496, 59494, 0, 1, 49152, 57344, - 59392, 59520, 59488, 0, 1, 49152, 57344, 59392, - 59520, 59488, 59496, 0, 1, 49152, 57344, 59392, - 59520, 59488, 59496, 0, 1, 49152, 57344, 59392, - 59520, 59488, 59496, 59498, 0, 1, 49152, 57344, - 59392, 59520, 59488, 59496, 0, 1, 49152, 57344, - 59392, 59520, 59488, 59504, 59500, 0, 1, 49152, - 57344, 59392, 59520, 59488, 59504, 59500, 0, 1, - 49152, 57344, 59392, 59520, 59488, 59504, 59505, 59502, - 0, 1, 49152, 57344, 59392, 59520, 59488, 0, - 1, 49152, 57344, 59392, 59520, 59521, 59504, 0, - 1, 49152, 57344, 59392, 59520, 59521, 59504, 0, - 1, 49152, 57344, 59392, 59520, 59521, 59504, 59506, - 0, 1, 49152, 57344, 59392, 59520, 59521, 59504, - 0, 1, 49152, 57344, 59392, 59520, 59521, 59504, - 59508, 0, 1, 49152, 57344, 59392, 59520, 59521, - 59504, 59508, 0, 1, 49152, 57344, 59392, 59520, - 59521, 59504, 59512, 59510, 0, 1, 49152, 57344, - 59392, 59520, 59521, 59504, 0, 1, 49152, 57344, - 59392, 59520, 59521, 59504, 59512, 0, 1, 49152, - 57344, 59392, 59520, 59521, 59523, 59512, 0, 1, - 49152, 57344, 59392, 59520, 59521, 59523, 59512, 59514, - 0, 1, 49152, 57344, 59392, 59520, 59521, 59523, - 59512, 0, 1, 49152, 57344, 59392, 59520, 59521, - 59523, 59512, 59516, 0, 1, 49152, 57344, 59392, - 59520, 59521, 59523, 59512, 59516, 0, 1, 49152, - 57344, 59392, 59520, 59521, 59523, 59512, 59516, 59518, - 0, 1, 49152, 57344, 59392, 0, 1, 49152, - 57344, 59392, 59520, 0, 1, 49152, 57344, 59392, - 59520, 0, 1, 49152, 57344, 59392, 59520, 59522, - 0, 1, 49152, 57344, 59392, 59520, 0, 1, - 49152, 57344, 59392, 59520, 59524, 0, 1, 49152, - 57344, 59392, 59520, 59524, 0, 1, 49152, 57344, - 59392, 59520, 59528, 59526, 0, 1, 49152, 57344, - 59392, 59520, 0, 1, 49152, 57344, 59392, 59520, - 59528, 0, 1, 49152, 57344, 59392, 59520, 59528, - 0, 1, 49152, 57344, 59392, 59520, 59528, 59530, - 0, 1, 49152, 57344, 59392, 59520, 59528, 0, - 1, 49152, 57344, 59392, 59520, 59536, 59532, 0, - 1, 49152, 57344, 59392, 59520, 59536, 59532, 0, - 1, 49152, 57344, 59392, 59520, 59536, 59537, 59534, - 0, 1, 49152, 57344, 59392, 59520, 0, 1, - 49152, 57344, 59392, 59520, 59536, 0, 1, 49152, - 57344, 59392, 59520, 59536, 0, 1, 49152, 57344, - 59392, 59520, 59536, 59538, 0, 1, 49152, 57344, - 59392, 59520, 59536, 0, 1, 49152, 57344, 59392, - 59520, 59536, 59540, 0, 1, 49152, 57344, 59392, - 59520, 59536, 59540, 0, 1, 49152, 57344, 59392, - 59520, 59536, 59544, 59542, 0, 1, 49152, 57344, - 59392, 59520, 59536, 0, 1, 49152, 57344, 59392, - 59520, 59552, 59544, 0, 1, 49152, 57344, 59392, - 59520, 59552, 59544, 0, 1, 49152, 57344, 59392, - 59520, 59552, 59544, 59546, 0, 1, 49152, 57344, - 59392, 59520, 59552, 59544, 0, 1, 49152, 57344, - 59392, 59520, 59552, 59553, 59548, 0, 1, 49152, - 57344, 59392, 59520, 59552, 59553, 59548, 0, 1, - 49152, 57344, 59392, 59520, 59552, 59553, 59548, 59550, - 0, 1, 49152, 57344, 59392, 59520, 0, 1, - 49152, 57344, 59392, 59520, 59552, 0, 1, 49152, - 57344, 59392, 59520, 59552, 0, 1, 49152, 57344, - 59392, 59520, 59552, 59554, 0, 1, 49152, 57344, - 59392, 59520, 59552, 0, 1, 49152, 57344, 59392, - 59520, 59552, 59556, 0, 1, 49152, 57344, 59392, - 59520, 59552, 59556, 0, 1, 49152, 57344, 59392, - 59520, 59552, 59560, 59558, 0, 1, 49152, 57344, - 59392, 59520, 59552, 0, 1, 49152, 57344, 59392, - 59520, 59552, 59560, 0, 1, 49152, 57344, 59392, - 59520, 59552, 59560, 0, 1, 49152, 57344, 59392, - 59520, 59552, 59560, 59562, 0, 1, 49152, 57344, - 59392, 59520, 59552, 59560, 0, 1, 49152, 57344, - 59392, 59520, 59552, 59568, 59564, 0, 1, 49152, - 57344, 59392, 59520, 59552, 59568, 59564, 0, 1, - 49152, 57344, 59392, 59520, 59552, 59568, 59569, 59566, - 0, 1, 49152, 57344, 59392, 59520, 59552, 0, - 1, 49152, 57344, 59392, 59520, 59584, 59568, 0, - 1, 49152, 57344, 59392, 59520, 59584, 59568, 0, - 1, 49152, 57344, 59392, 59520, 59584, 59568, 59570, - 0, 1, 49152, 57344, 59392, 59520, 59584, 59568, - 0, 1, 49152, 57344, 59392, 59520, 59584, 59568, - 59572, 0, 1, 49152, 57344, 59392, 59520, 59584, - 59568, 59572, 0, 1, 49152, 57344, 59392, 59520, - 59584, 59568, 59576, 59574, 0, 1, 49152, 57344, - 59392, 59520, 59584, 59568, 0, 1, 49152, 57344, - 59392, 59520, 59584, 59585, 59576, 0, 1, 49152, - 57344, 59392, 59520, 59584, 59585, 59576, 0, 1, - 49152, 57344, 59392, 59520, 59584, 59585, 59576, 59578, - 0, 1, 49152, 57344, 59392, 59520, 59584, 59585, - 59576, 0, 1, 49152, 57344, 59392, 59520, 59584, - 59585, 59576, 59580, 0, 1, 49152, 57344, 59392, - 59520, 59584, 59585, 59587, 59580, 0, 1, 49152, - 57344, 59392, 59520, 59584, 59585, 59587, 59580, 59582, - 0, 1, 49152, 57344, 59392, 59520, 0, 1, - 49152, 57344, 59392, 59648, 59584, 0, 1, 49152, - 57344, 59392, 59648, 59584, 0, 1, 49152, 57344, - 59392, 59648, 59584, 59586, 0, 1, 49152, 57344, - 59392, 59648, 59584, 0, 1, 49152, 57344, 59392, - 59648, 59584, 59588, 0, 1, 49152, 57344, 59392, - 59648, 59584, 59588, 0, 1, 49152, 57344, 59392, - 59648, 59584, 59592, 59590, 0, 1, 49152, 57344, - 59392, 59648, 59584, 0, 1, 49152, 57344, 59392, - 59648, 59584, 59592, 0, 1, 49152, 57344, 59392, - 59648, 59584, 59592, 0, 1, 49152, 57344, 59392, - 59648, 59584, 59592, 59594, 0, 1, 49152, 57344, - 59392, 59648, 59584, 59592, 0, 1, 49152, 57344, - 59392, 59648, 59584, 59600, 59596, 0, 1, 49152, - 57344, 59392, 59648, 59584, 59600, 59596, 0, 1, - 49152, 57344, 59392, 59648, 59584, 59600, 59601, 59598, - 0, 1, 49152, 57344, 59392, 59648, 59584, 0, - 1, 49152, 57344, 59392, 59648, 59584, 59600, 0, - 1, 49152, 57344, 59392, 59648, 59584, 59600, 0, - 1, 49152, 57344, 59392, 59648, 59584, 59600, 59602, - 0, 1, 49152, 57344, 59392, 59648, 59584, 59600, - 0, 1, 49152, 57344, 59392, 59648, 59584, 59600, - 59604, 0, 1, 49152, 57344, 59392, 59648, 59584, - 59600, 59604, 0, 1, 49152, 57344, 59392, 59648, - 59584, 59600, 59608, 59606, 0, 1, 49152, 57344, - 59392, 59648, 59584, 59600, 0, 1, 49152, 57344, - 59392, 59648, 59584, 59616, 59608, 0, 1, 49152, - 57344, 59392, 59648, 59584, 59616, 59608, 0, 1, - 49152, 57344, 59392, 59648, 59584, 59616, 59608, 59610, - 0, 1, 49152, 57344, 59392, 59648, 59584, 59616, - 59608, 0, 1, 49152, 57344, 59392, 59648, 59584, - 59616, 59617, 59612, 0, 1, 49152, 57344, 59392, - 59648, 59584, 59616, 59617, 59612, 0, 1, 49152, - 57344, 59392, 59648, 59584, 59616, 59617, 59612, 59614, - 0, 1, 49152, 57344, 59392, 59648, 59584, 0, - 1, 49152, 57344, 59392, 59648, 59649, 59616, 0, - 1, 49152, 57344, 59392, 59648, 59649, 59616, 0, - 1, 49152, 57344, 59392, 59648, 59649, 59616, 59618, - 0, 1, 49152, 57344, 59392, 59648, 59649, 59616, - 0, 1, 49152, 57344, 59392, 59648, 59649, 59616, - 59620, 0, 1, 49152, 57344, 59392, 59648, 59649, - 59616, 59620, 0, 1, 49152, 57344, 59392, 59648, - 59649, 59616, 59624, 59622, 0, 1, 49152, 57344, - 59392, 59648, 59649, 59616, 0, 1, 49152, 57344, - 59392, 59648, 59649, 59616, 59624, 0, 1, 49152, - 57344, 59392, 59648, 59649, 59616, 59624, 0, 1, - 49152, 57344, 59392, 59648, 59649, 59616, 59624, 59626, - 0, 1, 49152, 57344, 59392, 59648, 59649, 59616, - 59624, 0, 1, 49152, 57344, 59392, 59648, 59649, - 59616, 59632, 59628, 0, 1, 49152, 57344, 59392, - 59648, 59649, 59616, 59632, 59628, 0, 1, 49152, - 57344, 59392, 59648, 59649, 59616, 59632, 59633, 59630, - 0, 1, 49152, 57344, 59392, 59648, 59649, 59616, - 0, 1, 49152, 57344, 59392, 59648, 59649, 59616, - 59632, 0, 1, 49152, 57344, 59392, 59648, 59649, - 59651, 59632, 0, 1, 49152, 57344, 59392, 59648, - 59649, 59651, 59632, 59634, 0, 1, 49152, 57344, - 59392, 59648, 59649, 59651, 59632, 0, 1, 49152, - 57344, 59392, 59648, 59649, 59651, 59632, 59636, 0, - 1, 49152, 57344, 59392, 59648, 59649, 59651, 59632, - 59636, 0, 1, 49152, 57344, 59392, 59648, 59649, - 59651, 59632, 59640, 59638, 0, 1, 49152, 57344, - 59392, 59648, 59649, 59651, 59632, 0, 1, 49152, - 57344, 59392, 59648, 59649, 59651, 59632, 59640, 0, - 1, 49152, 57344, 59392, 59648, 59649, 59651, 59632, - 59640, 0, 1, 49152, 57344, 59392, 59648, 59649, - 59651, 59632, 59640, 59642, 0, 1, 49152, 57344, - 59392, 59648, 59649, 59651, 59655, 59640, 0, 1, - 49152, 57344, 59392, 59648, 59649, 59651, 59655, 59640, - 59644, 0, 1, 49152, 57344, 59392, 59648, 59649, - 59651, 59655, 59640, 59644, 0, 1, 49152, 57344, - 59392, 59648, 59649, 59651, 59655, 59640, 59644, 59646, - 0, 1, 49152, 57344, 59392, 0, 1, 49152, - 57344, 59392, 59648, 0, 1, 49152, 57344, 59392, - 59648, 0, 1, 49152, 57344, 59392, 59648, 59650, - 0, 1, 49152, 57344, 59392, 59648, 0, 1, - 49152, 57344, 59392, 59648, 59652, 0, 1, 49152, - 57344, 59392, 59648, 59652, 0, 1, 49152, 57344, - 59392, 59648, 59656, 59654, 0, 1, 49152, 57344, - 59392, 59648, 0, 1, 49152, 57344, 59392, 59648, - 59656, 0, 1, 49152, 57344, 59392, 59648, 59656, - 0, 1, 49152, 57344, 59392, 59648, 59656, 59658, - 0, 1, 49152, 57344, 59392, 59648, 59656, 0, - 1, 49152, 57344, 59392, 59648, 59664, 59660, 0, - 1, 49152, 57344, 59392, 59648, 59664, 59660, 0, - 1, 49152, 57344, 59392, 59648, 59664, 59665, 59662, - 0, 1, 49152, 57344, 59392, 59648, 0, 1, - 49152, 57344, 59392, 59648, 59664, 0, 1, 49152, - 57344, 59392, 59648, 59664, 0, 1, 49152, 57344, - 59392, 59648, 59664, 59666, 0, 1, 49152, 57344, - 59392, 59648, 59664, 0, 1, 49152, 57344, 59392, - 59648, 59664, 59668, 0, 1, 49152, 57344, 59392, - 59648, 59664, 59668, 0, 1, 49152, 57344, 59392, - 59648, 59664, 59672, 59670, 0, 1, 49152, 57344, - 59392, 59648, 59664, 0, 1, 49152, 57344, 59392, - 59648, 59680, 59672, 0, 1, 49152, 57344, 59392, - 59648, 59680, 59672, 0, 1, 49152, 57344, 59392, - 59648, 59680, 59672, 59674, 0, 1, 49152, 57344, - 59392, 59648, 59680, 59672, 0, 1, 49152, 57344, - 59392, 59648, 59680, 59681, 59676, 0, 1, 49152, - 57344, 59392, 59648, 59680, 59681, 59676, 0, 1, - 49152, 57344, 59392, 59648, 59680, 59681, 59676, 59678, - 0, 1, 49152, 57344, 59392, 59648, 0, 1, - 49152, 57344, 59392, 59648, 59680, 0, 1, 49152, - 57344, 59392, 59648, 59680, 0, 1, 49152, 57344, - 59392, 59648, 59680, 59682, 0, 1, 49152, 57344, - 59392, 59648, 59680, 0, 1, 49152, 57344, 59392, - 59648, 59680, 59684, 0, 1, 49152, 57344, 59392, - 59648, 59680, 59684, 0, 1, 49152, 57344, 59392, - 59648, 59680, 59688, 59686, 0, 1, 49152, 57344, - 59392, 59648, 59680, 0, 1, 49152, 57344, 59392, - 59648, 59680, 59688, 0, 1, 49152, 57344, 59392, - 59648, 59680, 59688, 0, 1, 49152, 57344, 59392, - 59648, 59680, 59688, 59690, 0, 1, 49152, 57344, - 59392, 59648, 59680, 59688, 0, 1, 49152, 57344, - 59392, 59648, 59680, 59696, 59692, 0, 1, 49152, - 57344, 59392, 59648, 59680, 59696, 59692, 0, 1, - 49152, 57344, 59392, 59648, 59680, 59696, 59697, 59694, - 0, 1, 49152, 57344, 59392, 59648, 59680, 0, - 1, 49152, 57344, 59392, 59648, 59712, 59696, 0, - 1, 49152, 57344, 59392, 59648, 59712, 59696, 0, - 1, 49152, 57344, 59392, 59648, 59712, 59696, 59698, - 0, 1, 49152, 57344, 59392, 59648, 59712, 59696, - 0, 1, 49152, 57344, 59392, 59648, 59712, 59696, - 59700, 0, 1, 49152, 57344, 59392, 59648, 59712, - 59696, 59700, 0, 1, 49152, 57344, 59392, 59648, - 59712, 59696, 59704, 59702, 0, 1, 49152, 57344, - 59392, 59648, 59712, 59696, 0, 1, 49152, 57344, - 59392, 59648, 59712, 59713, 59704, 0, 1, 49152, - 57344, 59392, 59648, 59712, 59713, 59704, 0, 1, - 49152, 57344, 59392, 59648, 59712, 59713, 59704, 59706, - 0, 1, 49152, 57344, 59392, 59648, 59712, 59713, - 59704, 0, 1, 49152, 57344, 59392, 59648, 59712, - 59713, 59704, 59708, 0, 1, 49152, 57344, 59392, - 59648, 59712, 59713, 59715, 59708, 0, 1, 49152, - 57344, 59392, 59648, 59712, 59713, 59715, 59708, 59710, - 0, 1, 49152, 57344, 59392, 59648, 0, 1, - 49152, 57344, 59392, 59648, 59712, 0, 1, 49152, - 57344, 59392, 59648, 59712, 0, 1, 49152, 57344, - 59392, 59648, 59712, 59714, 0, 1, 49152, 57344, - 59392, 59648, 59712, 0, 1, 49152, 57344, 59392, - 59648, 59712, 59716, 0, 1, 49152, 57344, 59392, - 59648, 59712, 59716, 0, 1, 49152, 57344, 59392, - 59648, 59712, 59720, 59718, 0, 1, 49152, 57344, - 59392, 59648, 59712, 0, 1, 49152, 57344, 59392, - 59648, 59712, 59720, 0, 1, 49152, 57344, 59392, - 59648, 59712, 59720, 0, 1, 49152, 57344, 59392, - 59648, 59712, 59720, 59722, 0, 1, 49152, 57344, - 59392, 59648, 59712, 59720, 0, 1, 49152, 57344, - 59392, 59648, 59712, 59728, 59724, 0, 1, 49152, - 57344, 59392, 59648, 59712, 59728, 59724, 0, 1, - 49152, 57344, 59392, 59648, 59712, 59728, 59729, 59726, - 0, 1, 49152, 57344, 59392, 59648, 59712, 0, - 1, 49152, 57344, 59392, 59648, 59712, 59728, 0, - 1, 49152, 57344, 59392, 59648, 59712, 59728, 0, - 1, 49152, 57344, 59392, 59648, 59712, 59728, 59730, - 0, 1, 49152, 57344, 59392, 59648, 59712, 59728, - 0, 1, 49152, 57344, 59392, 59648, 59712, 59728, - 59732, 0, 1, 49152, 57344, 59392, 59648, 59712, - 59728, 59732, 0, 1, 49152, 57344, 59392, 59648, - 59712, 59728, 59736, 59734, 0, 1, 49152, 57344, - 59392, 59648, 59712, 59728, 0, 1, 49152, 57344, - 59392, 59648, 59712, 59744, 59736, 0, 1, 49152, - 57344, 59392, 59648, 59712, 59744, 59736, 0, 1, - 49152, 57344, 59392, 59648, 59712, 59744, 59736, 59738, - 0, 1, 49152, 57344, 59392, 59648, 59712, 59744, - 59736, 0, 1, 49152, 57344, 59392, 59648, 59712, - 59744, 59745, 59740, 0, 1, 49152, 57344, 59392, - 59648, 59712, 59744, 59745, 59740, 0, 1, 49152, - 57344, 59392, 59648, 59712, 59744, 59745, 59740, 59742, - 0, 1, 49152, 57344, 59392, 59648, 59712, 0, - 1, 49152, 57344, 59392, 59648, 59776, 59744, 0, - 1, 49152, 57344, 59392, 59648, 59776, 59744, 0, - 1, 49152, 57344, 59392, 59648, 59776, 59744, 59746, - 0, 1, 49152, 57344, 59392, 59648, 59776, 59744, - 0, 1, 49152, 57344, 59392, 59648, 59776, 59744, - 59748, 0, 1, 49152, 57344, 59392, 59648, 59776, - 59744, 59748, 0, 1, 49152, 57344, 59392, 59648, - 59776, 59744, 59752, 59750, 0, 1, 49152, 57344, - 59392, 59648, 59776, 59744, 0, 1, 49152, 57344, - 59392, 59648, 59776, 59744, 59752, 0, 1, 49152, - 57344, 59392, 59648, 59776, 59744, 59752, 0, 1, - 49152, 57344, 59392, 59648, 59776, 59744, 59752, 59754, - 0, 1, 49152, 57344, 59392, 59648, 59776, 59744, - 59752, 0, 1, 49152, 57344, 59392, 59648, 59776, - 59744, 59760, 59756, 0, 1, 49152, 57344, 59392, - 59648, 59776, 59744, 59760, 59756, 0, 1, 49152, - 57344, 59392, 59648, 59776, 59744, 59760, 59761, 59758, - 0, 1, 49152, 57344, 59392, 59648, 59776, 59744, - 0, 1, 49152, 57344, 59392, 59648, 59776, 59777, - 59760, 0, 1, 49152, 57344, 59392, 59648, 59776, - 59777, 59760, 0, 1, 49152, 57344, 59392, 59648, - 59776, 59777, 59760, 59762, 0, 1, 49152, 57344, - 59392, 59648, 59776, 59777, 59760, 0, 1, 49152, - 57344, 59392, 59648, 59776, 59777, 59760, 59764, 0, - 1, 49152, 57344, 59392, 59648, 59776, 59777, 59760, - 59764, 0, 1, 49152, 57344, 59392, 59648, 59776, - 59777, 59760, 59768, 59766, 0, 1, 49152, 57344, - 59392, 59648, 59776, 59777, 59760, 0, 1, 49152, - 57344, 59392, 59648, 59776, 59777, 59760, 59768, 0, - 1, 49152, 57344, 59392, 59648, 59776, 59777, 59779, - 59768, 0, 1, 49152, 57344, 59392, 59648, 59776, - 59777, 59779, 59768, 59770, 0, 1, 49152, 57344, - 59392, 59648, 59776, 59777, 59779, 59768, 0, 1, - 49152, 57344, 59392, 59648, 59776, 59777, 59779, 59768, - 59772, 0, 1, 49152, 57344, 59392, 59648, 59776, - 59777, 59779, 59768, 59772, 0, 1, 49152, 57344, - 59392, 59648, 59776, 59777, 59779, 59768, 59772, 59774, - 0, 1, 49152, 57344, 59392, 59648, 0, 1, - 49152, 57344, 59392, 59904, 59776, 0, 1, 49152, - 57344, 59392, 59904, 59776, 0, 1, 49152, 57344, - 59392, 59904, 59776, 59778, 0, 1, 49152, 57344, - 59392, 59904, 59776, 0, 1, 49152, 57344, 59392, - 59904, 59776, 59780, 0, 1, 49152, 57344, 59392, - 59904, 59776, 59780, 0, 1, 49152, 57344, 59392, - 59904, 59776, 59784, 59782, 0, 1, 49152, 57344, - 59392, 59904, 59776, 0, 1, 49152, 57344, 59392, - 59904, 59776, 59784, 0, 1, 49152, 57344, 59392, - 59904, 59776, 59784, 0, 1, 49152, 57344, 59392, - 59904, 59776, 59784, 59786, 0, 1, 49152, 57344, - 59392, 59904, 59776, 59784, 0, 1, 49152, 57344, - 59392, 59904, 59776, 59792, 59788, 0, 1, 49152, - 57344, 59392, 59904, 59776, 59792, 59788, 0, 1, - 49152, 57344, 59392, 59904, 59776, 59792, 59793, 59790, - 0, 1, 49152, 57344, 59392, 59904, 59776, 0, - 1, 49152, 57344, 59392, 59904, 59776, 59792, 0, - 1, 49152, 57344, 59392, 59904, 59776, 59792, 0, - 1, 49152, 57344, 59392, 59904, 59776, 59792, 59794, - 0, 1, 49152, 57344, 59392, 59904, 59776, 59792, - 0, 1, 49152, 57344, 59392, 59904, 59776, 59792, - 59796, 0, 1, 49152, 57344, 59392, 59904, 59776, - 59792, 59796, 0, 1, 49152, 57344, 59392, 59904, - 59776, 59792, 59800, 59798, 0, 1, 49152, 57344, - 59392, 59904, 59776, 59792, 0, 1, 49152, 57344, - 59392, 59904, 59776, 59808, 59800, 0, 1, 49152, - 57344, 59392, 59904, 59776, 59808, 59800, 0, 1, - 49152, 57344, 59392, 59904, 59776, 59808, 59800, 59802, - 0, 1, 49152, 57344, 59392, 59904, 59776, 59808, - 59800, 0, 1, 49152, 57344, 59392, 59904, 59776, - 59808, 59809, 59804, 0, 1, 49152, 57344, 59392, - 59904, 59776, 59808, 59809, 59804, 0, 1, 49152, - 57344, 59392, 59904, 59776, 59808, 59809, 59804, 59806, - 0, 1, 49152, 57344, 59392, 59904, 59776, 0, - 1, 49152, 57344, 59392, 59904, 59776, 59808, 0, - 1, 49152, 57344, 59392, 59904, 59776, 59808, 0, - 1, 49152, 57344, 59392, 59904, 59776, 59808, 59810, - 0, 1, 49152, 57344, 59392, 59904, 59776, 59808, - 0, 1, 49152, 57344, 59392, 59904, 59776, 59808, - 59812, 0, 1, 49152, 57344, 59392, 59904, 59776, - 59808, 59812, 0, 1, 49152, 57344, 59392, 59904, - 59776, 59808, 59816, 59814, 0, 1, 49152, 57344, - 59392, 59904, 59776, 59808, 0, 1, 49152, 57344, - 59392, 59904, 59776, 59808, 59816, 0, 1, 49152, - 57344, 59392, 59904, 59776, 59808, 59816, 0, 1, - 49152, 57344, 59392, 59904, 59776, 59808, 59816, 59818, - 0, 1, 49152, 57344, 59392, 59904, 59776, 59808, - 59816, 0, 1, 49152, 57344, 59392, 59904, 59776, - 59808, 59824, 59820, 0, 1, 49152, 57344, 59392, - 59904, 59776, 59808, 59824, 59820, 0, 1, 49152, - 57344, 59392, 59904, 59776, 59808, 59824, 59825, 59822, - 0, 1, 49152, 57344, 59392, 59904, 59776, 59808, - 0, 1, 49152, 57344, 59392, 59904, 59776, 59840, - 59824, 0, 1, 49152, 57344, 59392, 59904, 59776, - 59840, 59824, 0, 1, 49152, 57344, 59392, 59904, - 59776, 59840, 59824, 59826, 0, 1, 49152, 57344, - 59392, 59904, 59776, 59840, 59824, 0, 1, 49152, - 57344, 59392, 59904, 59776, 59840, 59824, 59828, 0, - 1, 49152, 57344, 59392, 59904, 59776, 59840, 59824, - 59828, 0, 1, 49152, 57344, 59392, 59904, 59776, - 59840, 59824, 59832, 59830, 0, 1, 49152, 57344, - 59392, 59904, 59776, 59840, 59824, 0, 1, 49152, - 57344, 59392, 59904, 59776, 59840, 59841, 59832, 0, - 1, 49152, 57344, 59392, 59904, 59776, 59840, 59841, - 59832, 0, 1, 49152, 57344, 59392, 59904, 59776, - 59840, 59841, 59832, 59834, 0, 1, 49152, 57344, - 59392, 59904, 59776, 59840, 59841, 59832, 0, 1, - 49152, 57344, 59392, 59904, 59776, 59840, 59841, 59832, - 59836, 0, 1, 49152, 57344, 59392, 59904, 59776, - 59840, 59841, 59843, 59836, 0, 1, 49152, 57344, - 59392, 59904, 59776, 59840, 59841, 59843, 59836, 59838, - 0, 1, 49152, 57344, 59392, 59904, 59776, 0, - 1, 49152, 57344, 59392, 59904, 59905, 59840, 0, - 1, 49152, 57344, 59392, 59904, 59905, 59840, 0, - 1, 49152, 57344, 59392, 59904, 59905, 59840, 59842, - 0, 1, 49152, 57344, 59392, 59904, 59905, 59840, - 0, 1, 49152, 57344, 59392, 59904, 59905, 59840, - 59844, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59840, 59844, 0, 1, 49152, 57344, 59392, 59904, - 59905, 59840, 59848, 59846, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59840, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59840, 59848, 0, 1, 49152, - 57344, 59392, 59904, 59905, 59840, 59848, 0, 1, - 49152, 57344, 59392, 59904, 59905, 59840, 59848, 59850, - 0, 1, 49152, 57344, 59392, 59904, 59905, 59840, - 59848, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59840, 59856, 59852, 0, 1, 49152, 57344, 59392, - 59904, 59905, 59840, 59856, 59852, 0, 1, 49152, - 57344, 59392, 59904, 59905, 59840, 59856, 59857, 59854, - 0, 1, 49152, 57344, 59392, 59904, 59905, 59840, - 0, 1, 49152, 57344, 59392, 59904, 59905, 59840, - 59856, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59840, 59856, 0, 1, 49152, 57344, 59392, 59904, - 59905, 59840, 59856, 59858, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59840, 59856, 0, 1, 49152, - 57344, 59392, 59904, 59905, 59840, 59856, 59860, 0, - 1, 49152, 57344, 59392, 59904, 59905, 59840, 59856, - 59860, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59840, 59856, 59864, 59862, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59840, 59856, 0, 1, 49152, - 57344, 59392, 59904, 59905, 59840, 59872, 59864, 0, - 1, 49152, 57344, 59392, 59904, 59905, 59840, 59872, - 59864, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59840, 59872, 59864, 59866, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59840, 59872, 59864, 0, 1, - 49152, 57344, 59392, 59904, 59905, 59840, 59872, 59873, - 59868, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59840, 59872, 59873, 59868, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59840, 59872, 59873, 59868, 59870, - 0, 1, 49152, 57344, 59392, 59904, 59905, 59840, - 0, 1, 49152, 57344, 59392, 59904, 59905, 59840, - 59872, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59907, 59872, 0, 1, 49152, 57344, 59392, 59904, - 59905, 59907, 59872, 59874, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59907, 59872, 0, 1, 49152, - 57344, 59392, 59904, 59905, 59907, 59872, 59876, 0, - 1, 49152, 57344, 59392, 59904, 59905, 59907, 59872, - 59876, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59907, 59872, 59880, 59878, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59907, 59872, 0, 1, 49152, - 57344, 59392, 59904, 59905, 59907, 59872, 59880, 0, - 1, 49152, 57344, 59392, 59904, 59905, 59907, 59872, - 59880, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59907, 59872, 59880, 59882, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59907, 59872, 59880, 0, 1, - 49152, 57344, 59392, 59904, 59905, 59907, 59872, 59888, - 59884, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59907, 59872, 59888, 59884, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59907, 59872, 59888, 59889, 59886, - 0, 1, 49152, 57344, 59392, 59904, 59905, 59907, - 59872, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59907, 59872, 59888, 0, 1, 49152, 57344, 59392, - 59904, 59905, 59907, 59872, 59888, 0, 1, 49152, - 57344, 59392, 59904, 59905, 59907, 59872, 59888, 59890, - 0, 1, 49152, 57344, 59392, 59904, 59905, 59907, - 59911, 59888, 0, 1, 49152, 57344, 59392, 59904, - 59905, 59907, 59911, 59888, 59892, 0, 1, 49152, - 57344, 59392, 59904, 59905, 59907, 59911, 59888, 59892, - 0, 1, 49152, 57344, 59392, 59904, 59905, 59907, - 59911, 59888, 59896, 59894, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59907, 59911, 59888, 0, 1, - 49152, 57344, 59392, 59904, 59905, 59907, 59911, 59888, - 59896, 0, 1, 49152, 57344, 59392, 59904, 59905, - 59907, 59911, 59888, 59896, 0, 1, 49152, 57344, - 59392, 59904, 59905, 59907, 59911, 59888, 59896, 59898, - 0, 1, 49152, 57344, 59392, 59904, 59905, 59907, - 59911, 59888, 59896, 0, 1, 49152, 57344, 59392, - 59904, 59905, 59907, 59911, 59888, 59896, 59900, 0, - 1, 49152, 57344, 59392, 59904, 59905, 59907, 59911, - 59888, 59896, 59900, 0, 1, 49152, 57344, 59392, - 59904, 59905, 59907, 59911, 59888, 59896, 59900, 59902, - 0, 1, 49152, 57344, 59392, 0, 1, 49152, - 57344, 59392, 59904, 0, 1, 49152, 57344, 59392, - 59904, 0, 1, 49152, 57344, 59392, 59904, 59906, - 0, 1, 49152, 57344, 59392, 59904, 0, 1, - 49152, 57344, 59392, 59904, 59908, 0, 1, 49152, - 57344, 59392, 59904, 59908, 0, 1, 49152, 57344, - 59392, 59904, 59912, 59910, 0, 1, 49152, 57344, - 59392, 59904, 0, 1, 49152, 57344, 59392, 59904, - 59912, 0, 1, 49152, 57344, 59392, 59904, 59912, - 0, 1, 49152, 57344, 59392, 59904, 59912, 59914, - 0, 1, 49152, 57344, 59392, 59904, 59912, 0, - 1, 49152, 57344, 59392, 59904, 59920, 59916, 0, - 1, 49152, 57344, 59392, 59904, 59920, 59916, 0, - 1, 49152, 57344, 59392, 59904, 59920, 59921, 59918, - 0, 1, 49152, 57344, 59392, 59904, 0, 1, - 49152, 57344, 59392, 59904, 59920, 0, 1, 49152, - 57344, 59392, 59904, 59920, 0, 1, 49152, 57344, - 59392, 59904, 59920, 59922, 0, 1, 49152, 57344, - 59392, 59904, 59920, 0, 1, 49152, 57344, 59392, - 59904, 59920, 59924, 0, 1, 49152, 57344, 59392, - 59904, 59920, 59924, 0, 1, 49152, 57344, 59392, - 59904, 59920, 59928, 59926, 0, 1, 49152, 57344, - 59392, 59904, 59920, 0, 1, 49152, 57344, 59392, - 59904, 59936, 59928, 0, 1, 49152, 57344, 59392, - 59904, 59936, 59928, 0, 1, 49152, 57344, 59392, - 59904, 59936, 59928, 59930, 0, 1, 49152, 57344, - 59392, 59904, 59936, 59928, 0, 1, 49152, 57344, - 59392, 59904, 59936, 59937, 59932, 0, 1, 49152, - 57344, 59392, 59904, 59936, 59937, 59932, 0, 1, - 49152, 57344, 59392, 59904, 59936, 59937, 59932, 59934, - 0, 1, 49152, 57344, 59392, 59904, 0, 1, - 49152, 57344, 59392, 59904, 59936, 0, 1, 49152, - 57344, 59392, 59904, 59936, 0, 1, 49152, 57344, - 59392, 59904, 59936, 59938, 0, 1, 49152, 57344, - 59392, 59904, 59936, 0, 1, 49152, 57344, 59392, - 59904, 59936, 59940, 0, 1, 49152, 57344, 59392, - 59904, 59936, 59940, 0, 1, 49152, 57344, 59392, - 59904, 59936, 59944, 59942, 0, 1, 49152, 57344, - 59392, 59904, 59936, 0, 1, 49152, 57344, 59392, - 59904, 59936, 59944, 0, 1, 49152, 57344, 59392, - 59904, 59936, 59944, 0, 1, 49152, 57344, 59392, - 59904, 59936, 59944, 59946, 0, 1, 49152, 57344, - 59392, 59904, 59936, 59944, 0, 1, 49152, 57344, - 59392, 59904, 59936, 59952, 59948, 0, 1, 49152, - 57344, 59392, 59904, 59936, 59952, 59948, 0, 1, - 49152, 57344, 59392, 59904, 59936, 59952, 59953, 59950, - 0, 1, 49152, 57344, 59392, 59904, 59936, 0, - 1, 49152, 57344, 59392, 59904, 59968, 59952, 0, - 1, 49152, 57344, 59392, 59904, 59968, 59952, 0, - 1, 49152, 57344, 59392, 59904, 59968, 59952, 59954, - 0, 1, 49152, 57344, 59392, 59904, 59968, 59952, - 0, 1, 49152, 57344, 59392, 59904, 59968, 59952, - 59956, 0, 1, 49152, 57344, 59392, 59904, 59968, - 59952, 59956, 0, 1, 49152, 57344, 59392, 59904, - 59968, 59952, 59960, 59958, 0, 1, 49152, 57344, - 59392, 59904, 59968, 59952, 0, 1, 49152, 57344, - 59392, 59904, 59968, 59969, 59960, 0, 1, 49152, - 57344, 59392, 59904, 59968, 59969, 59960, 0, 1, - 49152, 57344, 59392, 59904, 59968, 59969, 59960, 59962, - 0, 1, 49152, 57344, 59392, 59904, 59968, 59969, - 59960, 0, 1, 49152, 57344, 59392, 59904, 59968, - 59969, 59960, 59964, 0, 1, 49152, 57344, 59392, - 59904, 59968, 59969, 59971, 59964, 0, 1, 49152, - 57344, 59392, 59904, 59968, 59969, 59971, 59964, 59966, - 0, 1, 49152, 57344, 59392, 59904, 0, 1, - 49152, 57344, 59392, 59904, 59968, 0, 1, 49152, - 57344, 59392, 59904, 59968, 0, 1, 49152, 57344, - 59392, 59904, 59968, 59970, 0, 1, 49152, 57344, - 59392, 59904, 59968, 0, 1, 49152, 57344, 59392, - 59904, 59968, 59972, 0, 1, 49152, 57344, 59392, - 59904, 59968, 59972, 0, 1, 49152, 57344, 59392, - 59904, 59968, 59976, 59974, 0, 1, 49152, 57344, - 59392, 59904, 59968, 0, 1, 49152, 57344, 59392, - 59904, 59968, 59976, 0, 1, 49152, 57344, 59392, - 59904, 59968, 59976, 0, 1, 49152, 57344, 59392, - 59904, 59968, 59976, 59978, 0, 1, 49152, 57344, - 59392, 59904, 59968, 59976, 0, 1, 49152, 57344, - 59392, 59904, 59968, 59984, 59980, 0, 1, 49152, - 57344, 59392, 59904, 59968, 59984, 59980, 0, 1, - 49152, 57344, 59392, 59904, 59968, 59984, 59985, 59982, - 0, 1, 49152, 57344, 59392, 59904, 59968, 0, - 1, 49152, 57344, 59392, 59904, 59968, 59984, 0, - 1, 49152, 57344, 59392, 59904, 59968, 59984, 0, - 1, 49152, 57344, 59392, 59904, 59968, 59984, 59986, - 0, 1, 49152, 57344, 59392, 59904, 59968, 59984, - 0, 1, 49152, 57344, 59392, 59904, 59968, 59984, - 59988, 0, 1, 49152, 57344, 59392, 59904, 59968, - 59984, 59988, 0, 1, 49152, 57344, 59392, 59904, - 59968, 59984, 59992, 59990, 0, 1, 49152, 57344, - 59392, 59904, 59968, 59984, 0, 1, 49152, 57344, - 59392, 59904, 59968, 60000, 59992, 0, 1, 49152, - 57344, 59392, 59904, 59968, 60000, 59992, 0, 1, - 49152, 57344, 59392, 59904, 59968, 60000, 59992, 59994, - 0, 1, 49152, 57344, 59392, 59904, 59968, 60000, - 59992, 0, 1, 49152, 57344, 59392, 59904, 59968, - 60000, 60001, 59996, 0, 1, 49152, 57344, 59392, - 59904, 59968, 60000, 60001, 59996, 0, 1, 49152, - 57344, 59392, 59904, 59968, 60000, 60001, 59996, 59998, - 0, 1, 49152, 57344, 59392, 59904, 59968, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60000, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60000, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60000, 60002, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60000, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60000, - 60004, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60000, 60004, 0, 1, 49152, 57344, 59392, 59904, - 60032, 60000, 60008, 60006, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60000, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60000, 60008, 0, 1, 49152, - 57344, 59392, 59904, 60032, 60000, 60008, 0, 1, - 49152, 57344, 59392, 59904, 60032, 60000, 60008, 60010, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60000, - 60008, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60000, 60016, 60012, 0, 1, 49152, 57344, 59392, - 59904, 60032, 60000, 60016, 60012, 0, 1, 49152, - 57344, 59392, 59904, 60032, 60000, 60016, 60017, 60014, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60000, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60033, - 60016, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60033, 60016, 0, 1, 49152, 57344, 59392, 59904, - 60032, 60033, 60016, 60018, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60033, 60016, 0, 1, 49152, - 57344, 59392, 59904, 60032, 60033, 60016, 60020, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60033, 60016, - 60020, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60033, 60016, 60024, 60022, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60033, 60016, 0, 1, 49152, - 57344, 59392, 59904, 60032, 60033, 60016, 60024, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60033, 60035, - 60024, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60033, 60035, 60024, 60026, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60033, 60035, 60024, 0, 1, - 49152, 57344, 59392, 59904, 60032, 60033, 60035, 60024, - 60028, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60033, 60035, 60024, 60028, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60033, 60035, 60024, 60028, 60030, - 0, 1, 49152, 57344, 59392, 59904, 0, 1, - 49152, 57344, 59392, 59904, 60032, 0, 1, 49152, - 57344, 59392, 59904, 60032, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60034, 0, 1, 49152, 57344, - 59392, 59904, 60032, 0, 1, 49152, 57344, 59392, - 59904, 60032, 60036, 0, 1, 49152, 57344, 59392, - 59904, 60032, 60036, 0, 1, 49152, 57344, 59392, - 59904, 60032, 60040, 60038, 0, 1, 49152, 57344, - 59392, 59904, 60032, 0, 1, 49152, 57344, 59392, - 59904, 60032, 60040, 0, 1, 49152, 57344, 59392, - 59904, 60032, 60040, 0, 1, 49152, 57344, 59392, - 59904, 60032, 60040, 60042, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60040, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60048, 60044, 0, 1, 49152, - 57344, 59392, 59904, 60032, 60048, 60044, 0, 1, - 49152, 57344, 59392, 59904, 60032, 60048, 60049, 60046, - 0, 1, 49152, 57344, 59392, 59904, 60032, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60048, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60048, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60048, 60050, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60048, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60048, - 60052, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60048, 60052, 0, 1, 49152, 57344, 59392, 59904, - 60032, 60048, 60056, 60054, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60048, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60064, 60056, 0, 1, 49152, - 57344, 59392, 59904, 60032, 60064, 60056, 0, 1, - 49152, 57344, 59392, 59904, 60032, 60064, 60056, 60058, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60064, - 60056, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60064, 60065, 60060, 0, 1, 49152, 57344, 59392, - 59904, 60032, 60064, 60065, 60060, 0, 1, 49152, - 57344, 59392, 59904, 60032, 60064, 60065, 60060, 60062, - 0, 1, 49152, 57344, 59392, 59904, 60032, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60064, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60064, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60064, 60066, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60064, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60064, - 60068, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60064, 60068, 0, 1, 49152, 57344, 59392, 59904, - 60032, 60064, 60072, 60070, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60064, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60064, 60072, 0, 1, 49152, - 57344, 59392, 59904, 60032, 60064, 60072, 0, 1, - 49152, 57344, 59392, 59904, 60032, 60064, 60072, 60074, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60064, - 60072, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60064, 60080, 60076, 0, 1, 49152, 57344, 59392, - 59904, 60032, 60064, 60080, 60076, 0, 1, 49152, - 57344, 59392, 59904, 60032, 60064, 60080, 60081, 60078, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60064, - 0, 1, 49152, 57344, 59392, 59904, 60032, 60096, - 60080, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60096, 60080, 0, 1, 49152, 57344, 59392, 59904, - 60032, 60096, 60080, 60082, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60096, 60080, 0, 1, 49152, - 57344, 59392, 59904, 60032, 60096, 60080, 60084, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60096, 60080, - 60084, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60096, 60080, 60088, 60086, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60096, 60080, 0, 1, 49152, - 57344, 59392, 59904, 60032, 60096, 60097, 60088, 0, - 1, 49152, 57344, 59392, 59904, 60032, 60096, 60097, - 60088, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60096, 60097, 60088, 60090, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60096, 60097, 60088, 0, 1, - 49152, 57344, 59392, 59904, 60032, 60096, 60097, 60088, - 60092, 0, 1, 49152, 57344, 59392, 59904, 60032, - 60096, 60097, 60099, 60092, 0, 1, 49152, 57344, - 59392, 59904, 60032, 60096, 60097, 60099, 60092, 60094, - 0, 1, 49152, 57344, 59392, 59904, 60032, 0, - 1, 49152, 57344, 59392, 59904, 60160, 60096, 0, - 1, 49152, 57344, 59392, 59904, 60160, 60096, 0, - 1, 49152, 57344, 59392, 59904, 60160, 60096, 60098, - 0, 1, 49152, 57344, 59392, 59904, 60160, 60096, - 0, 1, 49152, 57344, 59392, 59904, 60160, 60096, - 60100, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60096, 60100, 0, 1, 49152, 57344, 59392, 59904, - 60160, 60096, 60104, 60102, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60096, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60096, 60104, 0, 1, 49152, - 57344, 59392, 59904, 60160, 60096, 60104, 0, 1, - 49152, 57344, 59392, 59904, 60160, 60096, 60104, 60106, - 0, 1, 49152, 57344, 59392, 59904, 60160, 60096, - 60104, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60096, 60112, 60108, 0, 1, 49152, 57344, 59392, - 59904, 60160, 60096, 60112, 60108, 0, 1, 49152, - 57344, 59392, 59904, 60160, 60096, 60112, 60113, 60110, - 0, 1, 49152, 57344, 59392, 59904, 60160, 60096, - 0, 1, 49152, 57344, 59392, 59904, 60160, 60096, - 60112, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60096, 60112, 0, 1, 49152, 57344, 59392, 59904, - 60160, 60096, 60112, 60114, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60096, 60112, 0, 1, 49152, - 57344, 59392, 59904, 60160, 60096, 60112, 60116, 0, - 1, 49152, 57344, 59392, 59904, 60160, 60096, 60112, - 60116, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60096, 60112, 60120, 60118, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60096, 60112, 0, 1, 49152, - 57344, 59392, 59904, 60160, 60096, 60128, 60120, 0, - 1, 49152, 57344, 59392, 59904, 60160, 60096, 60128, - 60120, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60096, 60128, 60120, 60122, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60096, 60128, 60120, 0, 1, - 49152, 57344, 59392, 59904, 60160, 60096, 60128, 60129, - 60124, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60096, 60128, 60129, 60124, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60096, 60128, 60129, 60124, 60126, - 0, 1, 49152, 57344, 59392, 59904, 60160, 60096, - 0, 1, 49152, 57344, 59392, 59904, 60160, 60161, - 60128, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60161, 60128, 0, 1, 49152, 57344, 59392, 59904, - 60160, 60161, 60128, 60130, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60161, 60128, 0, 1, 49152, - 57344, 59392, 59904, 60160, 60161, 60128, 60132, 0, - 1, 49152, 57344, 59392, 59904, 60160, 60161, 60128, - 60132, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60161, 60128, 60136, 60134, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60161, 60128, 0, 1, 49152, - 57344, 59392, 59904, 60160, 60161, 60128, 60136, 0, - 1, 49152, 57344, 59392, 59904, 60160, 60161, 60128, - 60136, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60161, 60128, 60136, 60138, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60161, 60128, 60136, 0, 1, - 49152, 57344, 59392, 59904, 60160, 60161, 60128, 60144, - 60140, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60161, 60128, 60144, 60140, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60161, 60128, 60144, 60145, 60142, - 0, 1, 49152, 57344, 59392, 59904, 60160, 60161, - 60128, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60161, 60128, 60144, 0, 1, 49152, 57344, 59392, - 59904, 60160, 60161, 60163, 60144, 0, 1, 49152, - 57344, 59392, 59904, 60160, 60161, 60163, 60144, 60146, - 0, 1, 49152, 57344, 59392, 59904, 60160, 60161, - 60163, 60144, 0, 1, 49152, 57344, 59392, 59904, - 60160, 60161, 60163, 60144, 60148, 0, 1, 49152, - 57344, 59392, 59904, 60160, 60161, 60163, 60144, 60148, - 0, 1, 49152, 57344, 59392, 59904, 60160, 60161, - 60163, 60144, 60152, 60150, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60161, 60163, 60144, 0, 1, - 49152, 57344, 59392, 59904, 60160, 60161, 60163, 60144, - 60152, 0, 1, 49152, 57344, 59392, 59904, 60160, - 60161, 60163, 60144, 60152, 0, 1, 49152, 57344, - 59392, 59904, 60160, 60161, 60163, 60144, 60152, 60154, - 0, 1, 49152, 57344, 59392, 59904, 60160, 60161, - 60163, 60167, 60152, 0, 1, 49152, 57344, 59392, - 59904, 60160, 60161, 60163, 60167, 60152, 60156, 0, - 1, 49152, 57344, 59392, 59904, 60160, 60161, 60163, - 60167, 60152, 60156, 0, 1, 49152, 57344, 59392, - 59904, 60160, 60161, 60163, 60167, 60152, 60156, 60158, - 0, 1, 49152, 57344, 59392, 59904, 0, 1, - 49152, 57344, 59392, 60416, 60160, 0, 1, 49152, - 57344, 59392, 60416, 60160, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60162, 0, 1, 49152, 57344, - 59392, 60416, 60160, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60164, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60164, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60168, 60166, 0, 1, 49152, 57344, - 59392, 60416, 60160, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60168, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60168, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60168, 60170, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60168, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60176, 60172, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60176, 60172, 0, 1, - 49152, 57344, 59392, 60416, 60160, 60176, 60177, 60174, - 0, 1, 49152, 57344, 59392, 60416, 60160, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60176, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60176, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60176, 60178, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60176, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60176, - 60180, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60176, 60180, 0, 1, 49152, 57344, 59392, 60416, - 60160, 60176, 60184, 60182, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60176, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60192, 60184, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60192, 60184, 0, 1, - 49152, 57344, 59392, 60416, 60160, 60192, 60184, 60186, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60192, - 60184, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60192, 60193, 60188, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60192, 60193, 60188, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60192, 60193, 60188, 60190, - 0, 1, 49152, 57344, 59392, 60416, 60160, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60192, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60192, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60192, 60194, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60192, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60192, - 60196, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60192, 60196, 0, 1, 49152, 57344, 59392, 60416, - 60160, 60192, 60200, 60198, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60192, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60192, 60200, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60192, 60200, 0, 1, - 49152, 57344, 59392, 60416, 60160, 60192, 60200, 60202, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60192, - 60200, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60192, 60208, 60204, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60192, 60208, 60204, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60192, 60208, 60209, 60206, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60192, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60224, - 60208, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60224, 60208, 0, 1, 49152, 57344, 59392, 60416, - 60160, 60224, 60208, 60210, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60224, 60208, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60224, 60208, 60212, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60224, 60208, - 60212, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60224, 60208, 60216, 60214, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60224, 60208, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60224, 60225, 60216, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60224, 60225, - 60216, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60224, 60225, 60216, 60218, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60224, 60225, 60216, 0, 1, - 49152, 57344, 59392, 60416, 60160, 60224, 60225, 60216, - 60220, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60224, 60225, 60227, 60220, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60224, 60225, 60227, 60220, 60222, - 0, 1, 49152, 57344, 59392, 60416, 60160, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60224, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60224, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60224, 60226, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60224, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60224, - 60228, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60224, 60228, 0, 1, 49152, 57344, 59392, 60416, - 60160, 60224, 60232, 60230, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60224, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60224, 60232, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60224, 60232, 0, 1, - 49152, 57344, 59392, 60416, 60160, 60224, 60232, 60234, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60224, - 60232, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60224, 60240, 60236, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60224, 60240, 60236, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60224, 60240, 60241, 60238, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60224, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60224, - 60240, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60224, 60240, 0, 1, 49152, 57344, 59392, 60416, - 60160, 60224, 60240, 60242, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60224, 60240, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60224, 60240, 60244, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60224, 60240, - 60244, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60224, 60240, 60248, 60246, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60224, 60240, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60224, 60256, 60248, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60224, 60256, - 60248, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60224, 60256, 60248, 60250, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60224, 60256, 60248, 0, 1, - 49152, 57344, 59392, 60416, 60160, 60224, 60256, 60257, - 60252, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60224, 60256, 60257, 60252, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60224, 60256, 60257, 60252, 60254, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60224, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60288, - 60256, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60288, 60256, 0, 1, 49152, 57344, 59392, 60416, - 60160, 60288, 60256, 60258, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60288, 60256, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60288, 60256, 60260, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60288, 60256, - 60260, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60288, 60256, 60264, 60262, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60288, 60256, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60288, 60256, 60264, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60288, 60256, - 60264, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60288, 60256, 60264, 60266, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60288, 60256, 60264, 0, 1, - 49152, 57344, 59392, 60416, 60160, 60288, 60256, 60272, - 60268, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60288, 60256, 60272, 60268, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60288, 60256, 60272, 60273, 60270, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60288, - 60256, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60288, 60289, 60272, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60288, 60289, 60272, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60288, 60289, 60272, 60274, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60288, - 60289, 60272, 0, 1, 49152, 57344, 59392, 60416, - 60160, 60288, 60289, 60272, 60276, 0, 1, 49152, - 57344, 59392, 60416, 60160, 60288, 60289, 60272, 60276, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60288, - 60289, 60272, 60280, 60278, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60288, 60289, 60272, 0, 1, - 49152, 57344, 59392, 60416, 60160, 60288, 60289, 60272, - 60280, 0, 1, 49152, 57344, 59392, 60416, 60160, - 60288, 60289, 60291, 60280, 0, 1, 49152, 57344, - 59392, 60416, 60160, 60288, 60289, 60291, 60280, 60282, - 0, 1, 49152, 57344, 59392, 60416, 60160, 60288, - 60289, 60291, 60280, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60288, 60289, 60291, 60280, 60284, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60288, 60289, - 60291, 60280, 60284, 0, 1, 49152, 57344, 59392, - 60416, 60160, 60288, 60289, 60291, 60280, 60284, 60286, - 0, 1, 49152, 57344, 59392, 60416, 60160, 0, - 1, 49152, 57344, 59392, 60416, 60160, 60288, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60288, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60288, 60290, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 60292, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60292, 0, 1, 49152, 57344, 59392, 60416, - 60417, 60288, 60296, 60294, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 60296, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60288, 60296, 0, 1, - 49152, 57344, 59392, 60416, 60417, 60288, 60296, 60298, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 60296, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60304, 60300, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60288, 60304, 60300, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60288, 60304, 60305, 60302, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 60304, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60304, 0, 1, 49152, 57344, 59392, 60416, - 60417, 60288, 60304, 60306, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 60304, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60288, 60304, 60308, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60288, 60304, - 60308, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60304, 60312, 60310, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 60304, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60288, 60320, 60312, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60288, 60320, - 60312, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60320, 60312, 60314, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 60320, 60312, 0, 1, - 49152, 57344, 59392, 60416, 60417, 60288, 60320, 60321, - 60316, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60320, 60321, 60316, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 60320, 60321, 60316, 60318, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 60320, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60320, 0, 1, 49152, 57344, 59392, 60416, - 60417, 60288, 60320, 60322, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 60320, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60288, 60320, 60324, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60288, 60320, - 60324, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60320, 60328, 60326, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 60320, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60288, 60320, 60328, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60288, 60320, - 60328, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60320, 60328, 60330, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 60320, 60328, 0, 1, - 49152, 57344, 59392, 60416, 60417, 60288, 60320, 60336, - 60332, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60320, 60336, 60332, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 60320, 60336, 60337, 60334, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 60320, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60352, 60336, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60288, 60352, 60336, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60288, 60352, 60336, 60338, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 60352, 60336, 0, 1, 49152, 57344, 59392, 60416, - 60417, 60288, 60352, 60336, 60340, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60288, 60352, 60336, 60340, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 60352, 60336, 60344, 60342, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 60352, 60336, 0, 1, - 49152, 57344, 59392, 60416, 60417, 60288, 60352, 60353, - 60344, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60352, 60353, 60344, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60288, 60352, 60353, 60344, 60346, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 60352, 60353, 60344, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60288, 60352, 60353, 60344, 60348, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60288, 60352, - 60353, 60355, 60348, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60288, 60352, 60353, 60355, 60348, 60350, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60288, - 60352, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60288, 60352, 0, 1, 49152, 57344, 59392, 60416, - 60417, 60288, 60352, 60354, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60419, 60352, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60419, 60352, 60356, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60419, 60352, - 60356, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60419, 60352, 60360, 60358, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60419, 60352, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60419, 60352, 60360, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60419, 60352, - 60360, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60419, 60352, 60360, 60362, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60419, 60352, 60360, 0, 1, - 49152, 57344, 59392, 60416, 60417, 60419, 60352, 60368, - 60364, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60419, 60352, 60368, 60364, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60419, 60352, 60368, 60369, 60366, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60419, - 60352, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60419, 60352, 60368, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60419, 60352, 60368, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60419, 60352, 60368, 60370, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60419, - 60352, 60368, 0, 1, 49152, 57344, 59392, 60416, - 60417, 60419, 60352, 60368, 60372, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60419, 60352, 60368, 60372, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60419, - 60352, 60368, 60376, 60374, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60419, 60352, 60368, 0, 1, - 49152, 57344, 59392, 60416, 60417, 60419, 60352, 60384, - 60376, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60419, 60352, 60384, 60376, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60419, 60352, 60384, 60376, 60378, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60419, - 60352, 60384, 60376, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60419, 60352, 60384, 60385, 60380, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60419, 60352, - 60384, 60385, 60380, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60419, 60352, 60384, 60385, 60380, 60382, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60419, - 60352, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60419, 60352, 60384, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60419, 60352, 60384, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60419, 60352, 60384, 60386, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60419, - 60352, 60384, 0, 1, 49152, 57344, 59392, 60416, - 60417, 60419, 60352, 60384, 60388, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60419, 60352, 60384, 60388, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60419, - 60352, 60384, 60392, 60390, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60419, 60423, 60384, 0, 1, - 49152, 57344, 59392, 60416, 60417, 60419, 60423, 60384, - 60392, 0, 1, 49152, 57344, 59392, 60416, 60417, - 60419, 60423, 60384, 60392, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60419, 60423, 60384, 60392, 60394, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60419, - 60423, 60384, 60392, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60419, 60423, 60384, 60400, 60396, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60419, 60423, - 60384, 60400, 60396, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60419, 60423, 60384, 60400, 60401, 60398, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60419, - 60423, 60384, 0, 1, 49152, 57344, 59392, 60416, - 60417, 60419, 60423, 60384, 60400, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60419, 60423, 60384, 60400, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60419, - 60423, 60384, 60400, 60402, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60419, 60423, 60384, 60400, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60419, 60423, - 60384, 60400, 60404, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60419, 60423, 60384, 60400, 60404, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60419, 60423, - 60384, 60400, 60408, 60406, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60419, 60423, 60384, 60400, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60419, 60423, - 60384, 60400, 60408, 0, 1, 49152, 57344, 59392, - 60416, 60417, 60419, 60423, 60384, 60400, 60408, 0, - 1, 49152, 57344, 59392, 60416, 60417, 60419, 60423, - 60384, 60400, 60408, 60410, 0, 1, 49152, 57344, - 59392, 60416, 60417, 60419, 60423, 60384, 60400, 60408, - 0, 1, 49152, 57344, 59392, 60416, 60417, 60419, - 60423, 60384, 60400, 60408, 60412, 0, 1, 49152, - 57344, 59392, 60416, 60417, 60419, 60423, 60384, 60400, - 60408, 60412, 0, 1, 49152, 57344, 59392, 60416, - 60417, 60419, 60423, 60384, 60400, 60408, 60412, 60414, - 0, 1, 49152, 57344, 59392, 0, 1, 49152, - 57344, 59392, 60416, 0, 1, 49152, 57344, 59392, - 60416, 0, 1, 49152, 57344, 59392, 60416, 60418, - 0, 1, 49152, 57344, 59392, 60416, 0, 1, - 49152, 57344, 59392, 60416, 60420, 0, 1, 49152, - 57344, 59392, 60416, 60420, 0, 1, 49152, 57344, - 59392, 60416, 60424, 60422, 0, 1, 49152, 57344, - 59392, 60416, 0, 1, 49152, 57344, 59392, 60416, - 60424, 0, 1, 49152, 57344, 59392, 60416, 60424, - 0, 1, 49152, 57344, 59392, 60416, 60424, 60426, - 0, 1, 49152, 57344, 59392, 60416, 60424, 0, - 1, 49152, 57344, 59392, 60416, 60432, 60428, 0, - 1, 49152, 57344, 59392, 60416, 60432, 60428, 0, - 1, 49152, 57344, 59392, 60416, 60432, 60433, 60430, - 0, 1, 49152, 57344, 59392, 60416, 0, 1, - 49152, 57344, 59392, 60416, 60432, 0, 1, 49152, - 57344, 59392, 60416, 60432, 0, 1, 49152, 57344, - 59392, 60416, 60432, 60434, 0, 1, 49152, 57344, - 59392, 60416, 60432, 0, 1, 49152, 57344, 59392, - 60416, 60432, 60436, 0, 1, 49152, 57344, 59392, - 60416, 60432, 60436, 0, 1, 49152, 57344, 59392, - 60416, 60432, 60440, 60438, 0, 1, 49152, 57344, - 59392, 60416, 60432, 0, 1, 49152, 57344, 59392, - 60416, 60448, 60440, 0, 1, 49152, 57344, 59392, - 60416, 60448, 60440, 0, 1, 49152, 57344, 59392, - 60416, 60448, 60440, 60442, 0, 1, 49152, 57344, - 59392, 60416, 60448, 60440, 0, 1, 49152, 57344, - 59392, 60416, 60448, 60449, 60444, 0, 1, 49152, - 57344, 59392, 60416, 60448, 60449, 60444, 0, 1, - 49152, 57344, 59392, 60416, 60448, 60449, 60444, 60446, - 0, 1, 49152, 57344, 59392, 60416, 0, 1, - 49152, 57344, 59392, 60416, 60448, 0, 1, 49152, - 57344, 59392, 60416, 60448, 0, 1, 49152, 57344, - 59392, 60416, 60448, 60450, 0, 1, 49152, 57344, - 59392, 60416, 60448, 0, 1, 49152, 57344, 59392, - 60416, 60448, 60452, 0, 1, 49152, 57344, 59392, - 60416, 60448, 60452, 0, 1, 49152, 57344, 59392, - 60416, 60448, 60456, 60454, 0, 1, 49152, 57344, - 59392, 60416, 60448, 0, 1, 49152, 57344, 59392, - 60416, 60448, 60456, 0, 1, 49152, 57344, 59392, - 60416, 60448, 60456, 0, 1, 49152, 57344, 59392, - 60416, 60448, 60456, 60458, 0, 1, 49152, 57344, - 59392, 60416, 60448, 60456, 0, 1, 49152, 57344, - 59392, 60416, 60448, 60464, 60460, 0, 1, 49152, - 57344, 59392, 60416, 60448, 60464, 60460, 0, 1, - 49152, 57344, 59392, 60416, 60448, 60464, 60465, 60462, - 0, 1, 49152, 57344, 59392, 60416, 60448, 0, - 1, 49152, 57344, 59392, 60416, 60480, 60464, 0, - 1, 49152, 57344, 59392, 60416, 60480, 60464, 0, - 1, 49152, 57344, 59392, 60416, 60480, 60464, 60466, - 0, 1, 49152, 57344, 59392, 60416, 60480, 60464, - 0, 1, 49152, 57344, 59392, 60416, 60480, 60464, - 60468, 0, 1, 49152, 57344, 59392, 60416, 60480, - 60464, 60468, 0, 1, 49152, 57344, 59392, 60416, - 60480, 60464, 60472, 60470, 0, 1, 49152, 57344, - 59392, 60416, 60480, 60464, 0, 1, 49152, 57344, - 59392, 60416, 60480, 60481, 60472, 0, 1, 49152, - 57344, 59392, 60416, 60480, 60481, 60472, 0, 1, - 49152, 57344, 59392, 60416, 60480, 60481, 60472, 60474, - 0, 1, 49152, 57344, 59392, 60416, 60480, 60481, - 60472, 0, 1, 49152, 57344, 59392, 60416, 60480, - 60481, 60472, 60476, 0, 1, 49152, 57344, 59392, - 60416, 60480, 60481, 60483, 60476, 0, 1, 49152, - 57344, 59392, 60416, 60480, 60481, 60483, 60476, 60478, - 0, 1, 49152, 57344, 59392, 60416, 0, 1, - 49152, 57344, 59392, 60416, 60480, 0, 1, 49152, - 57344, 59392, 60416, 60480, 0, 1, 49152, 57344, - 59392, 60416, 60480, 60482, 0, 1, 49152, 57344, - 59392, 60416, 60480, 0, 1, 49152, 57344, 59392, - 60416, 60480, 60484, 0, 1, 49152, 57344, 59392, - 60416, 60480, 60484, 0, 1, 49152, 57344, 59392, - 60416, 60480, 60488, 60486, 0, 1, 49152, 57344, - 59392, 60416, 60480, 0, 1, 49152, 57344, 59392, - 60416, 60480, 60488, 0, 1, 49152, 57344, 59392, - 60416, 60480, 60488, 0, 1, 49152, 57344, 59392, - 60416, 60480, 60488, 60490, 0, 1, 49152, 57344, - 59392, 60416, 60480, 60488, 0, 1, 49152, 57344, - 59392, 60416, 60480, 60496, 60492, 0, 1, 49152, - 57344, 59392, 60416, 60480, 60496, 60492, 0, 1, - 49152, 57344, 59392, 60416, 60480, 60496, 60497, 60494, - 0, 1, 49152, 57344, 59392, 60416, 60480, 0, - 1, 49152, 57344, 59392, 60416, 60480, 60496, 0, - 1, 49152, 57344, 59392, 60416, 60480, 60496, 0, - 1, 49152, 57344, 59392, 60416, 60480, 60496, 60498, - 0, 1, 49152, 57344, 59392, 60416, 60480, 60496, - 0, 1, 49152, 57344, 59392, 60416, 60480, 60496, - 60500, 0, 1, 49152, 57344, 59392, 60416, 60480, - 60496, 60500, 0, 1, 49152, 57344, 59392, 60416, - 60480, 60496, 60504, 60502, 0, 1, 49152, 57344, - 59392, 60416, 60480, 60496, 0, 1, 49152, 57344, - 59392, 60416, 60480, 60512, 60504, 0, 1, 49152, - 57344, 59392, 60416, 60480, 60512, 60504, 0, 1, - 49152, 57344, 59392, 60416, 60480, 60512, 60504, 60506, - 0, 1, 49152, 57344, 59392, 60416, 60480, 60512, - 60504, 0, 1, 49152, 57344, 59392, 60416, 60480, - 60512, 60513, 60508, 0, 1, 49152, 57344, 59392, - 60416, 60480, 60512, 60513, 60508, 0, 1, 49152, - 57344, 59392, 60416, 60480, 60512, 60513, 60508, 60510, - 0, 1, 49152, 57344, 59392, 60416, 60480, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60512, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60512, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60512, 60514, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60512, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60512, - 60516, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60512, 60516, 0, 1, 49152, 57344, 59392, 60416, - 60544, 60512, 60520, 60518, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60512, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60512, 60520, 0, 1, 49152, - 57344, 59392, 60416, 60544, 60512, 60520, 0, 1, - 49152, 57344, 59392, 60416, 60544, 60512, 60520, 60522, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60512, - 60520, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60512, 60528, 60524, 0, 1, 49152, 57344, 59392, - 60416, 60544, 60512, 60528, 60524, 0, 1, 49152, - 57344, 59392, 60416, 60544, 60512, 60528, 60529, 60526, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60512, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60545, - 60528, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60545, 60528, 0, 1, 49152, 57344, 59392, 60416, - 60544, 60545, 60528, 60530, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60545, 60528, 0, 1, 49152, - 57344, 59392, 60416, 60544, 60545, 60528, 60532, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60545, 60528, - 60532, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60545, 60528, 60536, 60534, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60545, 60528, 0, 1, 49152, - 57344, 59392, 60416, 60544, 60545, 60528, 60536, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60545, 60547, - 60536, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60545, 60547, 60536, 60538, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60545, 60547, 60536, 0, 1, - 49152, 57344, 59392, 60416, 60544, 60545, 60547, 60536, - 60540, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60545, 60547, 60536, 60540, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60545, 60547, 60536, 60540, 60542, - 0, 1, 49152, 57344, 59392, 60416, 0, 1, - 49152, 57344, 59392, 60416, 60544, 0, 1, 49152, - 57344, 59392, 60416, 60544, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60546, 0, 1, 49152, 57344, - 59392, 60416, 60544, 0, 1, 49152, 57344, 59392, - 60416, 60544, 60548, 0, 1, 49152, 57344, 59392, - 60416, 60544, 60548, 0, 1, 49152, 57344, 59392, - 60416, 60544, 60552, 60550, 0, 1, 49152, 57344, - 59392, 60416, 60544, 0, 1, 49152, 57344, 59392, - 60416, 60544, 60552, 0, 1, 49152, 57344, 59392, - 60416, 60544, 60552, 0, 1, 49152, 57344, 59392, - 60416, 60544, 60552, 60554, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60552, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60560, 60556, 0, 1, 49152, - 57344, 59392, 60416, 60544, 60560, 60556, 0, 1, - 49152, 57344, 59392, 60416, 60544, 60560, 60561, 60558, - 0, 1, 49152, 57344, 59392, 60416, 60544, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60560, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60560, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60560, 60562, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60560, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60560, - 60564, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60560, 60564, 0, 1, 49152, 57344, 59392, 60416, - 60544, 60560, 60568, 60566, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60560, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60576, 60568, 0, 1, 49152, - 57344, 59392, 60416, 60544, 60576, 60568, 0, 1, - 49152, 57344, 59392, 60416, 60544, 60576, 60568, 60570, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60576, - 60568, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60576, 60577, 60572, 0, 1, 49152, 57344, 59392, - 60416, 60544, 60576, 60577, 60572, 0, 1, 49152, - 57344, 59392, 60416, 60544, 60576, 60577, 60572, 60574, - 0, 1, 49152, 57344, 59392, 60416, 60544, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60576, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60576, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60576, 60578, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60576, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60576, - 60580, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60576, 60580, 0, 1, 49152, 57344, 59392, 60416, - 60544, 60576, 60584, 60582, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60576, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60576, 60584, 0, 1, 49152, - 57344, 59392, 60416, 60544, 60576, 60584, 0, 1, - 49152, 57344, 59392, 60416, 60544, 60576, 60584, 60586, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60576, - 60584, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60576, 60592, 60588, 0, 1, 49152, 57344, 59392, - 60416, 60544, 60576, 60592, 60588, 0, 1, 49152, - 57344, 59392, 60416, 60544, 60576, 60592, 60593, 60590, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60576, - 0, 1, 49152, 57344, 59392, 60416, 60544, 60608, - 60592, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60608, 60592, 0, 1, 49152, 57344, 59392, 60416, - 60544, 60608, 60592, 60594, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60608, 60592, 0, 1, 49152, - 57344, 59392, 60416, 60544, 60608, 60592, 60596, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60608, 60592, - 60596, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60608, 60592, 60600, 60598, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60608, 60592, 0, 1, 49152, - 57344, 59392, 60416, 60544, 60608, 60609, 60600, 0, - 1, 49152, 57344, 59392, 60416, 60544, 60608, 60609, - 60600, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60608, 60609, 60600, 60602, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60608, 60609, 60600, 0, 1, - 49152, 57344, 59392, 60416, 60544, 60608, 60609, 60600, - 60604, 0, 1, 49152, 57344, 59392, 60416, 60544, - 60608, 60609, 60611, 60604, 0, 1, 49152, 57344, - 59392, 60416, 60544, 60608, 60609, 60611, 60604, 60606, - 0, 1, 49152, 57344, 59392, 60416, 60544, 0, - 1, 49152, 57344, 59392, 60416, 60672, 60608, 0, - 1, 49152, 57344, 59392, 60416, 60672, 60608, 0, - 1, 49152, 57344, 59392, 60416, 60672, 60608, 60610, - 0, 1, 49152, 57344, 59392, 60416, 60672, 60608, - 0, 1, 49152, 57344, 59392, 60416, 60672, 60608, - 60612, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60608, 60612, 0, 1, 49152, 57344, 59392, 60416, - 60672, 60608, 60616, 60614, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60608, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60608, 60616, 0, 1, 49152, - 57344, 59392, 60416, 60672, 60608, 60616, 0, 1, - 49152, 57344, 59392, 60416, 60672, 60608, 60616, 60618, - 0, 1, 49152, 57344, 59392, 60416, 60672, 60608, - 60616, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60608, 60624, 60620, 0, 1, 49152, 57344, 59392, - 60416, 60672, 60608, 60624, 60620, 0, 1, 49152, - 57344, 59392, 60416, 60672, 60608, 60624, 60625, 60622, - 0, 1, 49152, 57344, 59392, 60416, 60672, 60608, - 0, 1, 49152, 57344, 59392, 60416, 60672, 60608, - 60624, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60608, 60624, 0, 1, 49152, 57344, 59392, 60416, - 60672, 60608, 60624, 60626, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60608, 60624, 0, 1, 49152, - 57344, 59392, 60416, 60672, 60608, 60624, 60628, 0, - 1, 49152, 57344, 59392, 60416, 60672, 60608, 60624, - 60628, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60608, 60624, 60632, 60630, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60608, 60624, 0, 1, 49152, - 57344, 59392, 60416, 60672, 60608, 60640, 60632, 0, - 1, 49152, 57344, 59392, 60416, 60672, 60608, 60640, - 60632, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60608, 60640, 60632, 60634, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60608, 60640, 60632, 0, 1, - 49152, 57344, 59392, 60416, 60672, 60608, 60640, 60641, - 60636, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60608, 60640, 60641, 60636, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60608, 60640, 60641, 60636, 60638, - 0, 1, 49152, 57344, 59392, 60416, 60672, 60608, - 0, 1, 49152, 57344, 59392, 60416, 60672, 60673, - 60640, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60673, 60640, 0, 1, 49152, 57344, 59392, 60416, - 60672, 60673, 60640, 60642, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60673, 60640, 0, 1, 49152, - 57344, 59392, 60416, 60672, 60673, 60640, 60644, 0, - 1, 49152, 57344, 59392, 60416, 60672, 60673, 60640, - 60644, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60673, 60640, 60648, 60646, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60673, 60640, 0, 1, 49152, - 57344, 59392, 60416, 60672, 60673, 60640, 60648, 0, - 1, 49152, 57344, 59392, 60416, 60672, 60673, 60640, - 60648, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60673, 60640, 60648, 60650, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60673, 60640, 60648, 0, 1, - 49152, 57344, 59392, 60416, 60672, 60673, 60640, 60656, - 60652, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60673, 60640, 60656, 60652, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60673, 60640, 60656, 60657, 60654, - 0, 1, 49152, 57344, 59392, 60416, 60672, 60673, - 60640, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60673, 60640, 60656, 0, 1, 49152, 57344, 59392, - 60416, 60672, 60673, 60675, 60656, 0, 1, 49152, - 57344, 59392, 60416, 60672, 60673, 60675, 60656, 60658, - 0, 1, 49152, 57344, 59392, 60416, 60672, 60673, - 60675, 60656, 0, 1, 49152, 57344, 59392, 60416, - 60672, 60673, 60675, 60656, 60660, 0, 1, 49152, - 57344, 59392, 60416, 60672, 60673, 60675, 60656, 60660, - 0, 1, 49152, 57344, 59392, 60416, 60672, 60673, - 60675, 60656, 60664, 60662, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60673, 60675, 60656, 0, 1, - 49152, 57344, 59392, 60416, 60672, 60673, 60675, 60656, - 60664, 0, 1, 49152, 57344, 59392, 60416, 60672, - 60673, 60675, 60656, 60664, 0, 1, 49152, 57344, - 59392, 60416, 60672, 60673, 60675, 60656, 60664, 60666, - 0, 1, 49152, 57344, 59392, 60416, 60672, 60673, - 60675, 60679, 60664, 0, 1, 49152, 57344, 59392, - 60416, 60672, 60673, 60675, 60679, 60664, 60668, 0, - 1, 49152, 57344, 59392, 60416, 60672, 60673, 60675, - 60679, 60664, 60668, 0, 1, 49152, 57344, 59392, - 60416, 60672, 60673, 60675, 60679, 60664, 60668, 60670, - 0, 1, 49152, 57344, 59392, 60416, 0, 1, - 49152, 57344, 61440, 60416, 60672, 0, 1, 49152, - 57344, 61440, 60416, 60672, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60674, 0, 1, 49152, 57344, - 61440, 60416, 60672, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60676, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60676, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60680, 60678, 0, 1, 49152, 57344, - 61440, 60416, 60672, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60680, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60680, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60680, 60682, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60680, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60688, 60684, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60688, 60684, 0, 1, - 49152, 57344, 61440, 60416, 60672, 60688, 60689, 60686, - 0, 1, 49152, 57344, 61440, 60416, 60672, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60688, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60688, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60688, 60690, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60688, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60688, - 60692, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60688, 60692, 0, 1, 49152, 57344, 61440, 60416, - 60672, 60688, 60696, 60694, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60688, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60704, 60696, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60704, 60696, 0, 1, - 49152, 57344, 61440, 60416, 60672, 60704, 60696, 60698, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60704, - 60696, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60704, 60705, 60700, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60704, 60705, 60700, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60704, 60705, 60700, 60702, - 0, 1, 49152, 57344, 61440, 60416, 60672, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60704, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60704, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60704, 60706, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60704, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60704, - 60708, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60704, 60708, 0, 1, 49152, 57344, 61440, 60416, - 60672, 60704, 60712, 60710, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60704, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60704, 60712, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60704, 60712, 0, 1, - 49152, 57344, 61440, 60416, 60672, 60704, 60712, 60714, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60704, - 60712, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60704, 60720, 60716, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60704, 60720, 60716, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60704, 60720, 60721, 60718, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60704, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60736, - 60720, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60736, 60720, 0, 1, 49152, 57344, 61440, 60416, - 60672, 60736, 60720, 60722, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60736, 60720, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60736, 60720, 60724, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60736, 60720, - 60724, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60736, 60720, 60728, 60726, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60736, 60720, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60736, 60737, 60728, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60736, 60737, - 60728, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60736, 60737, 60728, 60730, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60736, 60737, 60728, 0, 1, - 49152, 57344, 61440, 60416, 60672, 60736, 60737, 60728, - 60732, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60736, 60737, 60739, 60732, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60736, 60737, 60739, 60732, 60734, - 0, 1, 49152, 57344, 61440, 60416, 60672, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60736, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60736, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60736, 60738, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60736, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60736, - 60740, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60736, 60740, 0, 1, 49152, 57344, 61440, 60416, - 60672, 60736, 60744, 60742, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60736, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60736, 60744, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60736, 60744, 0, 1, - 49152, 57344, 61440, 60416, 60672, 60736, 60744, 60746, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60736, - 60744, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60736, 60752, 60748, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60736, 60752, 60748, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60736, 60752, 60753, 60750, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60736, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60736, - 60752, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60736, 60752, 0, 1, 49152, 57344, 61440, 60416, - 60672, 60736, 60752, 60754, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60736, 60752, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60736, 60752, 60756, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60736, 60752, - 60756, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60736, 60752, 60760, 60758, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60736, 60752, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60736, 60768, 60760, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60736, 60768, - 60760, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60736, 60768, 60760, 60762, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60736, 60768, 60760, 0, 1, - 49152, 57344, 61440, 60416, 60672, 60736, 60768, 60769, - 60764, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60736, 60768, 60769, 60764, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60736, 60768, 60769, 60764, 60766, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60736, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60800, - 60768, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60800, 60768, 0, 1, 49152, 57344, 61440, 60416, - 60672, 60800, 60768, 60770, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60800, 60768, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60800, 60768, 60772, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60800, 60768, - 60772, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60800, 60768, 60776, 60774, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60800, 60768, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60800, 60768, 60776, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60800, 60768, - 60776, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60800, 60768, 60776, 60778, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60800, 60768, 60776, 0, 1, - 49152, 57344, 61440, 60416, 60672, 60800, 60768, 60784, - 60780, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60800, 60768, 60784, 60780, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60800, 60768, 60784, 60785, 60782, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60800, - 60768, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60800, 60801, 60784, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60800, 60801, 60784, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60800, 60801, 60784, 60786, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60800, - 60801, 60784, 0, 1, 49152, 57344, 61440, 60416, - 60672, 60800, 60801, 60784, 60788, 0, 1, 49152, - 57344, 61440, 60416, 60672, 60800, 60801, 60784, 60788, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60800, - 60801, 60784, 60792, 60790, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60800, 60801, 60784, 0, 1, - 49152, 57344, 61440, 60416, 60672, 60800, 60801, 60784, - 60792, 0, 1, 49152, 57344, 61440, 60416, 60672, - 60800, 60801, 60803, 60792, 0, 1, 49152, 57344, - 61440, 60416, 60672, 60800, 60801, 60803, 60792, 60794, - 0, 1, 49152, 57344, 61440, 60416, 60672, 60800, - 60801, 60803, 60792, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60800, 60801, 60803, 60792, 60796, 0, - 1, 49152, 57344, 61440, 60416, 60672, 60800, 60801, - 60803, 60792, 60796, 0, 1, 49152, 57344, 61440, - 60416, 60672, 60800, 60801, 60803, 60792, 60796, 60798, - 0, 1, 49152, 57344, 61440, 60416, 60672, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60800, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60800, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60800, 60802, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 60804, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60804, 0, 1, 49152, 57344, 61440, 60416, - 60928, 60800, 60808, 60806, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 60808, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60800, 60808, 0, 1, - 49152, 57344, 61440, 60416, 60928, 60800, 60808, 60810, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 60808, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60816, 60812, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60800, 60816, 60812, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60800, 60816, 60817, 60814, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 60816, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60816, 0, 1, 49152, 57344, 61440, 60416, - 60928, 60800, 60816, 60818, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 60816, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60800, 60816, 60820, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60800, 60816, - 60820, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60816, 60824, 60822, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 60816, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60800, 60832, 60824, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60800, 60832, - 60824, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60832, 60824, 60826, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 60832, 60824, 0, 1, - 49152, 57344, 61440, 60416, 60928, 60800, 60832, 60833, - 60828, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60832, 60833, 60828, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 60832, 60833, 60828, 60830, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 60832, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60832, 0, 1, 49152, 57344, 61440, 60416, - 60928, 60800, 60832, 60834, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 60832, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60800, 60832, 60836, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60800, 60832, - 60836, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60832, 60840, 60838, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 60832, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60800, 60832, 60840, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60800, 60832, - 60840, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60832, 60840, 60842, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 60832, 60840, 0, 1, - 49152, 57344, 61440, 60416, 60928, 60800, 60832, 60848, - 60844, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60832, 60848, 60844, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 60832, 60848, 60849, 60846, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 60832, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60864, 60848, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60800, 60864, 60848, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60800, 60864, 60848, 60850, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 60864, 60848, 0, 1, 49152, 57344, 61440, 60416, - 60928, 60800, 60864, 60848, 60852, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60800, 60864, 60848, 60852, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 60864, 60848, 60856, 60854, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 60864, 60848, 0, 1, - 49152, 57344, 61440, 60416, 60928, 60800, 60864, 60865, - 60856, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60800, 60864, 60865, 60856, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60800, 60864, 60865, 60856, 60858, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 60864, 60865, 60856, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60800, 60864, 60865, 60856, 60860, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60800, 60864, - 60865, 60867, 60860, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60800, 60864, 60865, 60867, 60860, 60862, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60800, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60864, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60929, 60864, 0, 1, 49152, 57344, 61440, 60416, - 60928, 60929, 60864, 60866, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60929, 60864, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60929, 60864, 60868, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60929, 60864, - 60868, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60929, 60864, 60872, 60870, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60929, 60864, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60929, 60864, 60872, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60929, 60864, - 60872, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60929, 60864, 60872, 60874, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60929, 60864, 60872, 0, 1, - 49152, 57344, 61440, 60416, 60928, 60929, 60864, 60880, - 60876, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60929, 60864, 60880, 60876, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60929, 60864, 60880, 60881, 60878, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60864, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60929, 60864, 60880, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60929, 60864, 60880, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60929, 60864, 60880, 60882, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60864, 60880, 0, 1, 49152, 57344, 61440, 60416, - 60928, 60929, 60864, 60880, 60884, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60929, 60864, 60880, 60884, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60864, 60880, 60888, 60886, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60929, 60864, 60880, 0, 1, - 49152, 57344, 61440, 60416, 60928, 60929, 60864, 60896, - 60888, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60929, 60864, 60896, 60888, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60929, 60864, 60896, 60888, 60890, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60864, 60896, 60888, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60929, 60864, 60896, 60897, 60892, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60929, 60864, - 60896, 60897, 60892, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60929, 60864, 60896, 60897, 60892, 60894, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60864, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60929, 60864, 60896, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60929, 60931, 60896, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60929, 60931, 60896, 60898, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60931, 60896, 0, 1, 49152, 57344, 61440, 60416, - 60928, 60929, 60931, 60896, 60900, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60929, 60931, 60896, 60900, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60931, 60896, 60904, 60902, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60929, 60931, 60896, 0, 1, - 49152, 57344, 61440, 60416, 60928, 60929, 60931, 60896, - 60904, 0, 1, 49152, 57344, 61440, 60416, 60928, - 60929, 60931, 60896, 60904, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60929, 60931, 60896, 60904, 60906, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60931, 60896, 60904, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60929, 60931, 60896, 60912, 60908, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60929, 60931, - 60896, 60912, 60908, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60929, 60931, 60896, 60912, 60913, 60910, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60931, 60896, 0, 1, 49152, 57344, 61440, 60416, - 60928, 60929, 60931, 60896, 60912, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60929, 60931, 60896, 60912, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60931, 60896, 60912, 60914, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60929, 60931, 60935, 60912, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60929, 60931, - 60935, 60912, 60916, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60929, 60931, 60935, 60912, 60916, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60929, 60931, - 60935, 60912, 60920, 60918, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60929, 60931, 60935, 60912, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60929, 60931, - 60935, 60912, 60920, 0, 1, 49152, 57344, 61440, - 60416, 60928, 60929, 60931, 60935, 60912, 60920, 0, - 1, 49152, 57344, 61440, 60416, 60928, 60929, 60931, - 60935, 60912, 60920, 60922, 0, 1, 49152, 57344, - 61440, 60416, 60928, 60929, 60931, 60935, 60912, 60920, - 0, 1, 49152, 57344, 61440, 60416, 60928, 60929, - 60931, 60935, 60912, 60920, 60924, 0, 1, 49152, - 57344, 61440, 60416, 60928, 60929, 60931, 60935, 60912, - 60920, 60924, 0, 1, 49152, 57344, 61440, 60416, - 60928, 60929, 60931, 60935, 60912, 60920, 60924, 60926, - 0, 1, 49152, 57344, 61440, 60416, 0, 1, - 49152, 57344, 61440, 60416, 60928, 0, 1, 49152, - 57344, 61440, 61441, 60928, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60930, 0, 1, 49152, 57344, - 61440, 61441, 60928, 0, 1, 49152, 57344, 61440, - 61441, 60928, 60932, 0, 1, 49152, 57344, 61440, - 61441, 60928, 60932, 0, 1, 49152, 57344, 61440, - 61441, 60928, 60936, 60934, 0, 1, 49152, 57344, - 61440, 61441, 60928, 0, 1, 49152, 57344, 61440, - 61441, 60928, 60936, 0, 1, 49152, 57344, 61440, - 61441, 60928, 60936, 0, 1, 49152, 57344, 61440, - 61441, 60928, 60936, 60938, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60936, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60944, 60940, 0, 1, 49152, - 57344, 61440, 61441, 60928, 60944, 60940, 0, 1, - 49152, 57344, 61440, 61441, 60928, 60944, 60945, 60942, - 0, 1, 49152, 57344, 61440, 61441, 60928, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60944, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60944, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60944, 60946, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60944, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60944, - 60948, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60944, 60948, 0, 1, 49152, 57344, 61440, 61441, - 60928, 60944, 60952, 60950, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60944, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60960, 60952, 0, 1, 49152, - 57344, 61440, 61441, 60928, 60960, 60952, 0, 1, - 49152, 57344, 61440, 61441, 60928, 60960, 60952, 60954, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60960, - 60952, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60960, 60961, 60956, 0, 1, 49152, 57344, 61440, - 61441, 60928, 60960, 60961, 60956, 0, 1, 49152, - 57344, 61440, 61441, 60928, 60960, 60961, 60956, 60958, - 0, 1, 49152, 57344, 61440, 61441, 60928, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60960, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60960, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60960, 60962, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60960, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60960, - 60964, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60960, 60964, 0, 1, 49152, 57344, 61440, 61441, - 60928, 60960, 60968, 60966, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60960, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60960, 60968, 0, 1, 49152, - 57344, 61440, 61441, 60928, 60960, 60968, 0, 1, - 49152, 57344, 61440, 61441, 60928, 60960, 60968, 60970, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60960, - 60968, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60960, 60976, 60972, 0, 1, 49152, 57344, 61440, - 61441, 60928, 60960, 60976, 60972, 0, 1, 49152, - 57344, 61440, 61441, 60928, 60960, 60976, 60977, 60974, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60960, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60992, - 60976, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60992, 60976, 0, 1, 49152, 57344, 61440, 61441, - 60928, 60992, 60976, 60978, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60992, 60976, 0, 1, 49152, - 57344, 61440, 61441, 60928, 60992, 60976, 60980, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60992, 60976, - 60980, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60992, 60976, 60984, 60982, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60992, 60976, 0, 1, 49152, - 57344, 61440, 61441, 60928, 60992, 60993, 60984, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60992, 60993, - 60984, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60992, 60993, 60984, 60986, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60992, 60993, 60984, 0, 1, - 49152, 57344, 61440, 61441, 60928, 60992, 60993, 60984, - 60988, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60992, 60993, 60995, 60988, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60992, 60993, 60995, 60988, 60990, - 0, 1, 49152, 57344, 61440, 61441, 60928, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60992, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60992, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60992, 60994, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60992, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60992, - 60996, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60992, 60996, 0, 1, 49152, 57344, 61440, 61441, - 60928, 60992, 61000, 60998, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60992, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60992, 61000, 0, 1, 49152, - 57344, 61440, 61441, 60928, 60992, 61000, 0, 1, - 49152, 57344, 61440, 61441, 60928, 60992, 61000, 61002, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60992, - 61000, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60992, 61008, 61004, 0, 1, 49152, 57344, 61440, - 61441, 60928, 60992, 61008, 61004, 0, 1, 49152, - 57344, 61440, 61441, 60928, 60992, 61008, 61009, 61006, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60992, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60992, - 61008, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60992, 61008, 0, 1, 49152, 57344, 61440, 61441, - 60928, 60992, 61008, 61010, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60992, 61008, 0, 1, 49152, - 57344, 61440, 61441, 60928, 60992, 61008, 61012, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60992, 61008, - 61012, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60992, 61008, 61016, 61014, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60992, 61008, 0, 1, 49152, - 57344, 61440, 61441, 60928, 60992, 61024, 61016, 0, - 1, 49152, 57344, 61440, 61441, 60928, 60992, 61024, - 61016, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60992, 61024, 61016, 61018, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60992, 61024, 61016, 0, 1, - 49152, 57344, 61440, 61441, 60928, 60992, 61024, 61025, - 61020, 0, 1, 49152, 57344, 61440, 61441, 60928, - 60992, 61024, 61025, 61020, 0, 1, 49152, 57344, - 61440, 61441, 60928, 60992, 61024, 61025, 61020, 61022, - 0, 1, 49152, 57344, 61440, 61441, 60928, 60992, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61024, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61024, 0, 1, 49152, 57344, 61440, 61441, - 60928, 61056, 61024, 61026, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61024, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61024, 61028, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61056, 61024, - 61028, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61024, 61032, 61030, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61024, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61024, 61032, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61056, 61024, - 61032, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61024, 61032, 61034, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61024, 61032, 0, 1, - 49152, 57344, 61440, 61441, 60928, 61056, 61024, 61040, - 61036, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61024, 61040, 61036, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61024, 61040, 61041, 61038, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61024, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61057, 61040, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61056, 61057, 61040, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61057, 61040, 61042, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61057, 61040, 0, 1, 49152, 57344, 61440, 61441, - 60928, 61056, 61057, 61040, 61044, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61057, 61040, 61044, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61057, 61040, 61048, 61046, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61057, 61040, 0, 1, - 49152, 57344, 61440, 61441, 60928, 61056, 61057, 61040, - 61048, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61057, 61059, 61048, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61057, 61059, 61048, 61050, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61057, 61059, 61048, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61056, 61057, 61059, 61048, 61052, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61056, 61057, - 61059, 61048, 61052, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61056, 61057, 61059, 61048, 61052, 61054, - 0, 1, 49152, 57344, 61440, 61441, 60928, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61056, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61056, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61056, 61058, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61060, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61060, 0, 1, 49152, 57344, 61440, 61441, - 60928, 61056, 61064, 61062, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61064, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61064, 0, 1, - 49152, 57344, 61440, 61441, 60928, 61056, 61064, 61066, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61064, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61072, 61068, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61056, 61072, 61068, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61072, 61073, 61070, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61072, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61072, 0, 1, 49152, 57344, 61440, 61441, - 60928, 61056, 61072, 61074, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61072, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61072, 61076, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61056, 61072, - 61076, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61072, 61080, 61078, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61072, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61088, 61080, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61056, 61088, - 61080, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61088, 61080, 61082, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61088, 61080, 0, 1, - 49152, 57344, 61440, 61441, 60928, 61056, 61088, 61089, - 61084, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61088, 61089, 61084, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61088, 61089, 61084, 61086, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61088, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61088, 0, 1, 49152, 57344, 61440, 61441, - 60928, 61056, 61088, 61090, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61088, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61088, 61092, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61056, 61088, - 61092, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61088, 61096, 61094, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61088, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61088, 61096, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61056, 61088, - 61096, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61088, 61096, 61098, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61088, 61096, 0, 1, - 49152, 57344, 61440, 61441, 60928, 61056, 61088, 61104, - 61100, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61088, 61104, 61100, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61088, 61104, 61105, 61102, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61088, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61120, 61104, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61056, 61120, 61104, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61120, 61104, 61106, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61120, 61104, 0, 1, 49152, 57344, 61440, 61441, - 60928, 61056, 61120, 61104, 61108, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61056, 61120, 61104, 61108, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61120, 61104, 61112, 61110, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61120, 61104, 0, 1, - 49152, 57344, 61440, 61441, 60928, 61056, 61120, 61121, - 61112, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61056, 61120, 61121, 61112, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61056, 61120, 61121, 61112, 61114, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 61120, 61121, 61112, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61056, 61120, 61121, 61112, 61116, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61056, 61120, - 61121, 61123, 61116, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61056, 61120, 61121, 61123, 61116, 61118, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61056, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61120, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61184, 61120, 0, 1, 49152, 57344, 61440, 61441, - 60928, 61184, 61120, 61122, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61184, 61120, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61184, 61120, 61124, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61184, 61120, - 61124, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61184, 61120, 61128, 61126, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61184, 61120, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61184, 61120, 61128, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61184, 61120, - 61128, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61184, 61120, 61128, 61130, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61184, 61120, 61128, 0, 1, - 49152, 57344, 61440, 61441, 60928, 61184, 61120, 61136, - 61132, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61184, 61120, 61136, 61132, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61184, 61120, 61136, 61137, 61134, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61120, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61184, 61120, 61136, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61184, 61120, 61136, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61184, 61120, 61136, 61138, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61120, 61136, 0, 1, 49152, 57344, 61440, 61441, - 60928, 61184, 61120, 61136, 61140, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61184, 61120, 61136, 61140, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61120, 61136, 61144, 61142, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61184, 61120, 61136, 0, 1, - 49152, 57344, 61440, 61441, 60928, 61184, 61120, 61152, - 61144, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61184, 61120, 61152, 61144, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61184, 61120, 61152, 61144, 61146, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61120, 61152, 61144, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61184, 61120, 61152, 61153, 61148, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61184, 61120, - 61152, 61153, 61148, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61184, 61120, 61152, 61153, 61148, 61150, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61120, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61184, 61185, 61152, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61184, 61185, 61152, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61184, 61185, 61152, 61154, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61185, 61152, 0, 1, 49152, 57344, 61440, 61441, - 60928, 61184, 61185, 61152, 61156, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61184, 61185, 61152, 61156, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61185, 61152, 61160, 61158, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61184, 61185, 61152, 0, 1, - 49152, 57344, 61440, 61441, 60928, 61184, 61185, 61152, - 61160, 0, 1, 49152, 57344, 61440, 61441, 60928, - 61184, 61185, 61152, 61160, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61184, 61185, 61152, 61160, 61162, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61185, 61152, 61160, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61184, 61185, 61152, 61168, 61164, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61184, 61185, - 61152, 61168, 61164, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61184, 61185, 61152, 61168, 61169, 61166, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61185, 61152, 0, 1, 49152, 57344, 61440, 61441, - 60928, 61184, 61185, 61152, 61168, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61184, 61185, 61187, 61168, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61185, 61187, 61168, 61170, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61184, 61185, 61187, 61168, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61184, 61185, - 61187, 61168, 61172, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61184, 61185, 61187, 61168, 61172, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61184, 61185, - 61187, 61168, 61176, 61174, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61184, 61185, 61187, 61168, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61184, 61185, - 61187, 61168, 61176, 0, 1, 49152, 57344, 61440, - 61441, 60928, 61184, 61185, 61187, 61168, 61176, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61184, 61185, - 61187, 61168, 61176, 61178, 0, 1, 49152, 57344, - 61440, 61441, 60928, 61184, 61185, 61187, 61191, 61176, - 0, 1, 49152, 57344, 61440, 61441, 60928, 61184, - 61185, 61187, 61191, 61176, 61180, 0, 1, 49152, - 57344, 61440, 61441, 60928, 61184, 61185, 61187, 61191, - 61176, 61180, 0, 1, 49152, 57344, 61440, 61441, - 60928, 61184, 61185, 61187, 61191, 61176, 61180, 61182, - 0, 1, 49152, 57344, 61440, 61441, 60928, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61184, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61184, 0, - 1, 49152, 57344, 61440, 61441, 60928, 61184, 61186, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61188, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61188, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61184, 61192, 61190, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61192, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61192, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61184, 61192, 61194, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61192, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61200, 61196, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61200, 61196, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61200, 61201, 61198, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61200, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61200, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61184, 61200, 61202, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61200, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61200, 61204, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61200, - 61204, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61200, 61208, 61206, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61200, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61216, 61208, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61216, - 61208, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61216, 61208, 61210, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61216, 61208, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61184, 61216, 61217, - 61212, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61216, 61217, 61212, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61216, 61217, 61212, 61214, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61216, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61216, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61184, 61216, 61218, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61216, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61216, 61220, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61216, - 61220, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61216, 61224, 61222, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61216, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61216, 61224, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61216, - 61224, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61216, 61224, 61226, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61216, 61224, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61184, 61216, 61232, - 61228, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61216, 61232, 61228, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61216, 61232, 61233, 61230, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61216, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61248, 61232, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61248, 61232, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61248, 61232, 61234, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61248, 61232, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61184, 61248, 61232, 61236, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61248, 61232, 61236, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61248, 61232, 61240, 61238, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61248, 61232, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61184, 61248, 61249, - 61240, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61248, 61249, 61240, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61248, 61249, 61240, 61242, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61248, 61249, 61240, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61248, 61249, 61240, 61244, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61248, - 61249, 61251, 61244, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61248, 61249, 61251, 61244, 61246, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61248, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61248, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61184, 61248, 61250, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61248, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61248, 61252, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61248, - 61252, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61248, 61256, 61254, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61248, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61248, 61256, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61248, - 61256, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61248, 61256, 61258, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61248, 61256, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61184, 61248, 61264, - 61260, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61248, 61264, 61260, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61248, 61264, 61265, 61262, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61248, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61248, 61264, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61248, 61264, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61248, 61264, 61266, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61248, 61264, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61184, 61248, 61264, 61268, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61248, 61264, 61268, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61248, 61264, 61272, 61270, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61248, 61264, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61184, 61248, 61280, - 61272, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61248, 61280, 61272, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61248, 61280, 61272, 61274, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61248, 61280, 61272, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61248, 61280, 61281, 61276, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61248, - 61280, 61281, 61276, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61248, 61280, 61281, 61276, 61278, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61248, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61312, 61280, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61312, 61280, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61312, 61280, 61282, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61312, 61280, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61184, 61312, 61280, 61284, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61312, 61280, 61284, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61312, 61280, 61288, 61286, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61312, 61280, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61184, 61312, 61280, - 61288, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61312, 61280, 61288, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61312, 61280, 61288, 61290, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61312, 61280, 61288, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61312, 61280, 61296, 61292, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61312, - 61280, 61296, 61292, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61312, 61280, 61296, 61297, 61294, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61312, 61280, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61184, 61312, 61313, 61296, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61312, 61313, 61296, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61312, 61313, 61296, 61298, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61312, 61313, 61296, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61312, - 61313, 61296, 61300, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61312, 61313, 61296, 61300, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61312, - 61313, 61296, 61304, 61302, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61312, 61313, 61296, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61312, - 61313, 61296, 61304, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61184, 61312, 61313, 61315, 61304, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61312, - 61313, 61315, 61304, 61306, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61312, 61313, 61315, 61304, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61312, 61313, 61315, 61304, 61308, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61312, 61313, 61315, - 61304, 61308, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61184, 61312, 61313, 61315, 61304, 61308, 61310, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61184, - 61312, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61312, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61184, 61312, 61314, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61184, 61312, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61184, 61312, 61316, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61184, 61312, - 61316, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61184, 61312, 61320, 61318, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61312, 61320, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61312, - 61320, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61447, 61312, 61320, 61322, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 61320, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61447, 61312, 61328, - 61324, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61447, 61312, 61328, 61324, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 61328, 61329, 61326, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61447, 61312, 61328, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61312, 61328, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61312, 61328, 61330, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61328, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61447, 61312, 61328, 61332, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61312, 61328, 61332, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61328, 61336, 61334, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 61328, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61447, 61312, 61344, - 61336, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61447, 61312, 61344, 61336, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 61344, 61336, 61338, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61344, 61336, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61312, 61344, 61345, 61340, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61312, - 61344, 61345, 61340, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61312, 61344, 61345, 61340, 61342, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61447, 61312, 61344, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61312, 61344, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61312, 61344, 61346, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61344, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61447, 61312, 61344, 61348, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61312, 61344, 61348, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61344, 61352, 61350, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 61344, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61447, 61312, 61344, - 61352, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61447, 61312, 61344, 61352, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 61344, 61352, 61354, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61344, 61352, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61312, 61344, 61360, 61356, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61312, - 61344, 61360, 61356, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61312, 61344, 61360, 61361, 61358, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61344, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61447, 61312, 61376, 61360, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61312, 61376, 61360, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61376, 61360, 61362, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 61376, 61360, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61312, - 61376, 61360, 61364, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61312, 61376, 61360, 61364, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61312, - 61376, 61360, 61368, 61366, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 61376, 61360, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61312, - 61376, 61377, 61368, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61312, 61376, 61377, 61368, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61312, - 61376, 61377, 61368, 61370, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 61376, 61377, 61368, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61376, 61377, 61368, 61372, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61312, 61376, 61377, - 61379, 61372, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61447, 61312, 61376, 61377, 61379, 61372, 61374, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61447, 61312, 61376, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61312, 61376, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61312, 61376, 61378, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61376, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61447, 61312, 61376, 61380, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61312, 61376, 61380, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61376, 61384, 61382, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 61376, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61447, 61312, 61376, - 61384, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61447, 61312, 61376, 61384, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61312, 61376, 61384, 61386, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61312, 61376, 61384, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61312, 61376, 61392, 61388, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61312, - 61376, 61392, 61388, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61312, 61376, 61392, 61393, 61390, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61455, 61376, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61447, 61455, 61376, 61392, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61455, 61376, 61392, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61455, 61376, 61392, 61394, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61455, 61376, 61392, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61455, - 61376, 61392, 61396, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61455, 61376, 61392, 61396, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61455, - 61376, 61392, 61400, 61398, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61455, 61376, 61392, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61455, - 61376, 61408, 61400, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61455, 61376, 61408, 61400, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61455, - 61376, 61408, 61400, 61402, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61455, 61376, 61408, 61400, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61455, 61376, 61408, 61409, 61404, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61455, 61376, 61408, - 61409, 61404, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61447, 61455, 61376, 61408, 61409, 61404, 61406, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61455, 61376, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61447, 61455, 61376, 61408, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61455, 61376, 61408, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61455, 61376, 61408, 61410, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61455, 61376, 61408, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61455, - 61376, 61408, 61412, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61455, 61376, 61408, 61412, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61455, - 61376, 61408, 61416, 61414, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61455, 61376, 61408, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61455, - 61376, 61408, 61416, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61455, 61376, 61408, 61416, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61455, - 61376, 61408, 61416, 61418, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61455, 61376, 61408, 61416, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61455, 61376, 61408, 61424, 61420, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61455, 61376, 61408, - 61424, 61420, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61447, 61455, 61376, 61408, 61424, 61425, 61422, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61455, 61376, 61408, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61455, 61376, 61408, 61424, 0, - 1, 49152, 57344, 61440, 61441, 61443, 61447, 61455, - 61376, 61408, 61424, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61455, 61376, 61408, 61424, 61426, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61455, 61376, 61408, 61424, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61455, 61376, 61408, 61424, - 61428, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61447, 61455, 61376, 61408, 61424, 61428, 0, 1, - 49152, 57344, 61440, 61441, 61443, 61447, 61455, 61376, - 61408, 61424, 61432, 61430, 0, 1, 49152, 57344, - 61440, 61441, 61443, 61447, 61455, 61376, 61408, 61424, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61455, 61376, 61408, 61424, 61432, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61455, 61376, 61408, - 61424, 61432, 0, 1, 49152, 57344, 61440, 61441, - 61443, 61447, 61455, 61376, 61408, 61424, 61432, 61434, - 0, 1, 49152, 57344, 61440, 61441, 61443, 61447, - 61455, 61376, 61408, 61424, 61432, 0, 1, 49152, - 57344, 61440, 61441, 61443, 61447, 61455, 61376, 61408, - 61424, 61432, 61436, 0, 1, 49152, 57344, 61440, - 61441, 61443, 61447, 61455, 61376, 61408, 61424, 61432, - 61436, 0, 1, 49152, 57344, 61440, 61441, 61443, - 61447, 61455, 61376, 61408, 61424, 61432, 61436, 61438, - 0, 1, 49152, 57344, 0, 1, 49152, 57344, - 61440, 0, 1, 49152, 57344, 61440, 0, 1, - 49152, 57344, 61440, 61442, 0, 1, 49152, 57344, - 61440, 0, 1, 49152, 57344, 61440, 61444, 0, - 1, 49152, 57344, 61440, 61444, 0, 1, 49152, - 57344, 61440, 61448, 61446, 0, 1, 49152, 57344, - 61440, 0, 1, 49152, 57344, 61440, 61448, 0, - 1, 49152, 57344, 61440, 61448, 0, 1, 49152, - 57344, 61440, 61448, 61450, 0, 1, 49152, 57344, - 61440, 61448, 0, 1, 49152, 57344, 61440, 61456, - 61452, 0, 1, 49152, 57344, 61440, 61456, 61452, - 0, 1, 49152, 57344, 61440, 61456, 61457, 61454, - 0, 1, 49152, 57344, 61440, 0, 1, 49152, - 57344, 61440, 61456, 0, 1, 49152, 57344, 61440, - 61456, 0, 1, 49152, 57344, 61440, 61456, 61458, - 0, 1, 49152, 57344, 61440, 61456, 0, 1, - 49152, 57344, 61440, 61456, 61460, 0, 1, 49152, - 57344, 61440, 61456, 61460, 0, 1, 49152, 57344, - 61440, 61456, 61464, 61462, 0, 1, 49152, 57344, - 61440, 61456, 0, 1, 49152, 57344, 61440, 61472, - 61464, 0, 1, 49152, 57344, 61440, 61472, 61464, - 0, 1, 49152, 57344, 61440, 61472, 61464, 61466, - 0, 1, 49152, 57344, 61440, 61472, 61464, 0, - 1, 49152, 57344, 61440, 61472, 61473, 61468, 0, - 1, 49152, 57344, 61440, 61472, 61473, 61468, 0, - 1, 49152, 57344, 61440, 61472, 61473, 61468, 61470, - 0, 1, 49152, 57344, 61440, 0, 1, 49152, - 57344, 61440, 61472, 0, 1, 49152, 57344, 61440, - 61472, 0, 1, 49152, 57344, 61440, 61472, 61474, - 0, 1, 49152, 57344, 61440, 61472, 0, 1, - 49152, 57344, 61440, 61472, 61476, 0, 1, 49152, - 57344, 61440, 61472, 61476, 0, 1, 49152, 57344, - 61440, 61472, 61480, 61478, 0, 1, 49152, 57344, - 61440, 61472, 0, 1, 49152, 57344, 61440, 61472, - 61480, 0, 1, 49152, 57344, 61440, 61472, 61480, - 0, 1, 49152, 57344, 61440, 61472, 61480, 61482, - 0, 1, 49152, 57344, 61440, 61472, 61480, 0, - 1, 49152, 57344, 61440, 61472, 61488, 61484, 0, - 1, 49152, 57344, 61440, 61472, 61488, 61484, 0, - 1, 49152, 57344, 61440, 61472, 61488, 61489, 61486, - 0, 1, 49152, 57344, 61440, 61472, 0, 1, - 49152, 57344, 61440, 61504, 61488, 0, 1, 49152, - 57344, 61440, 61504, 61488, 0, 1, 49152, 57344, - 61440, 61504, 61488, 61490, 0, 1, 49152, 57344, - 61440, 61504, 61488, 0, 1, 49152, 57344, 61440, - 61504, 61488, 61492, 0, 1, 49152, 57344, 61440, - 61504, 61488, 61492, 0, 1, 49152, 57344, 61440, - 61504, 61488, 61496, 61494, 0, 1, 49152, 57344, - 61440, 61504, 61488, 0, 1, 49152, 57344, 61440, - 61504, 61505, 61496, 0, 1, 49152, 57344, 61440, - 61504, 61505, 61496, 0, 1, 49152, 57344, 61440, - 61504, 61505, 61496, 61498, 0, 1, 49152, 57344, - 61440, 61504, 61505, 61496, 0, 1, 49152, 57344, - 61440, 61504, 61505, 61496, 61500, 0, 1, 49152, - 57344, 61440, 61504, 61505, 61507, 61500, 0, 1, - 49152, 57344, 61440, 61504, 61505, 61507, 61500, 61502, - 0, 1, 49152, 57344, 61440, 0, 1, 49152, - 57344, 61440, 61504, 0, 1, 49152, 57344, 61440, - 61504, 0, 1, 49152, 57344, 61440, 61504, 61506, - 0, 1, 49152, 57344, 61440, 61504, 0, 1, - 49152, 57344, 61440, 61504, 61508, 0, 1, 49152, - 57344, 61440, 61504, 61508, 0, 1, 49152, 57344, - 61440, 61504, 61512, 61510, 0, 1, 49152, 57344, - 61440, 61504, 0, 1, 49152, 57344, 61440, 61504, - 61512, 0, 1, 49152, 57344, 61440, 61504, 61512, - 0, 1, 49152, 57344, 61440, 61504, 61512, 61514, - 0, 1, 49152, 57344, 61440, 61504, 61512, 0, - 1, 49152, 57344, 61440, 61504, 61520, 61516, 0, - 1, 49152, 57344, 61440, 61504, 61520, 61516, 0, - 1, 49152, 57344, 61440, 61504, 61520, 61521, 61518, - 0, 1, 49152, 57344, 61440, 61504, 0, 1, - 49152, 57344, 61440, 61504, 61520, 0, 1, 49152, - 57344, 61440, 61504, 61520, 0, 1, 49152, 57344, - 61440, 61504, 61520, 61522, 0, 1, 49152, 57344, - 61440, 61504, 61520, 0, 1, 49152, 57344, 61440, - 61504, 61520, 61524, 0, 1, 49152, 57344, 61440, - 61504, 61520, 61524, 0, 1, 49152, 57344, 61440, - 61504, 61520, 61528, 61526, 0, 1, 49152, 57344, - 61440, 61504, 61520, 0, 1, 49152, 57344, 61440, - 61504, 61536, 61528, 0, 1, 49152, 57344, 61440, - 61504, 61536, 61528, 0, 1, 49152, 57344, 61440, - 61504, 61536, 61528, 61530, 0, 1, 49152, 57344, - 61440, 61504, 61536, 61528, 0, 1, 49152, 57344, - 61440, 61504, 61536, 61537, 61532, 0, 1, 49152, - 57344, 61440, 61504, 61536, 61537, 61532, 0, 1, - 49152, 57344, 61440, 61504, 61536, 61537, 61532, 61534, - 0, 1, 49152, 57344, 61440, 61504, 0, 1, - 49152, 57344, 61440, 61568, 61536, 0, 1, 49152, - 57344, 61440, 61568, 61536, 0, 1, 49152, 57344, - 61440, 61568, 61536, 61538, 0, 1, 49152, 57344, - 61440, 61568, 61536, 0, 1, 49152, 57344, 61440, - 61568, 61536, 61540, 0, 1, 49152, 57344, 61440, - 61568, 61536, 61540, 0, 1, 49152, 57344, 61440, - 61568, 61536, 61544, 61542, 0, 1, 49152, 57344, - 61440, 61568, 61536, 0, 1, 49152, 57344, 61440, - 61568, 61536, 61544, 0, 1, 49152, 57344, 61440, - 61568, 61536, 61544, 0, 1, 49152, 57344, 61440, - 61568, 61536, 61544, 61546, 0, 1, 49152, 57344, - 61440, 61568, 61536, 61544, 0, 1, 49152, 57344, - 61440, 61568, 61536, 61552, 61548, 0, 1, 49152, - 57344, 61440, 61568, 61536, 61552, 61548, 0, 1, - 49152, 57344, 61440, 61568, 61536, 61552, 61553, 61550, - 0, 1, 49152, 57344, 61440, 61568, 61536, 0, - 1, 49152, 57344, 61440, 61568, 61569, 61552, 0, - 1, 49152, 57344, 61440, 61568, 61569, 61552, 0, - 1, 49152, 57344, 61440, 61568, 61569, 61552, 61554, - 0, 1, 49152, 57344, 61440, 61568, 61569, 61552, - 0, 1, 49152, 57344, 61440, 61568, 61569, 61552, - 61556, 0, 1, 49152, 57344, 61440, 61568, 61569, - 61552, 61556, 0, 1, 49152, 57344, 61440, 61568, - 61569, 61552, 61560, 61558, 0, 1, 49152, 57344, - 61440, 61568, 61569, 61552, 0, 1, 49152, 57344, - 61440, 61568, 61569, 61552, 61560, 0, 1, 49152, - 57344, 61440, 61568, 61569, 61571, 61560, 0, 1, - 49152, 57344, 61440, 61568, 61569, 61571, 61560, 61562, - 0, 1, 49152, 57344, 61440, 61568, 61569, 61571, - 61560, 0, 1, 49152, 57344, 61440, 61568, 61569, - 61571, 61560, 61564, 0, 1, 49152, 57344, 61440, - 61568, 61569, 61571, 61560, 61564, 0, 1, 49152, - 57344, 61440, 61568, 61569, 61571, 61560, 61564, 61566, - 0, 1, 49152, 57344, 61440, 0, 1, 49152, - 57344, 61440, 61568, 0, 1, 49152, 57344, 61440, - 61568, 0, 1, 49152, 57344, 61440, 61568, 61570, - 0, 1, 49152, 57344, 61440, 61568, 0, 1, - 49152, 57344, 61440, 61568, 61572, 0, 1, 49152, - 57344, 61440, 61568, 61572, 0, 1, 49152, 57344, - 61440, 61568, 61576, 61574, 0, 1, 49152, 57344, - 61440, 61568, 0, 1, 49152, 57344, 61440, 61568, - 61576, 0, 1, 49152, 57344, 61440, 61568, 61576, - 0, 1, 49152, 57344, 61440, 61568, 61576, 61578, - 0, 1, 49152, 57344, 61440, 61568, 61576, 0, - 1, 49152, 57344, 61440, 61568, 61584, 61580, 0, - 1, 49152, 57344, 61440, 61568, 61584, 61580, 0, - 1, 49152, 57344, 61440, 61568, 61584, 61585, 61582, - 0, 1, 49152, 57344, 61440, 61568, 0, 1, - 49152, 57344, 61440, 61568, 61584, 0, 1, 49152, - 57344, 61440, 61568, 61584, 0, 1, 49152, 57344, - 61440, 61568, 61584, 61586, 0, 1, 49152, 57344, - 61440, 61568, 61584, 0, 1, 49152, 57344, 61440, - 61568, 61584, 61588, 0, 1, 49152, 57344, 61440, - 61568, 61584, 61588, 0, 1, 49152, 57344, 61440, - 61568, 61584, 61592, 61590, 0, 1, 49152, 57344, - 61440, 61568, 61584, 0, 1, 49152, 57344, 61440, - 61568, 61600, 61592, 0, 1, 49152, 57344, 61440, - 61568, 61600, 61592, 0, 1, 49152, 57344, 61440, - 61568, 61600, 61592, 61594, 0, 1, 49152, 57344, - 61440, 61568, 61600, 61592, 0, 1, 49152, 57344, - 61440, 61568, 61600, 61601, 61596, 0, 1, 49152, - 57344, 61440, 61568, 61600, 61601, 61596, 0, 1, - 49152, 57344, 61440, 61568, 61600, 61601, 61596, 61598, - 0, 1, 49152, 57344, 61440, 61568, 0, 1, - 49152, 57344, 61440, 61568, 61600, 0, 1, 49152, - 57344, 61440, 61568, 61600, 0, 1, 49152, 57344, - 61440, 61568, 61600, 61602, 0, 1, 49152, 57344, - 61440, 61568, 61600, 0, 1, 49152, 57344, 61440, - 61568, 61600, 61604, 0, 1, 49152, 57344, 61440, - 61568, 61600, 61604, 0, 1, 49152, 57344, 61440, - 61568, 61600, 61608, 61606, 0, 1, 49152, 57344, - 61440, 61568, 61600, 0, 1, 49152, 57344, 61440, - 61568, 61600, 61608, 0, 1, 49152, 57344, 61440, - 61568, 61600, 61608, 0, 1, 49152, 57344, 61440, - 61568, 61600, 61608, 61610, 0, 1, 49152, 57344, - 61440, 61568, 61600, 61608, 0, 1, 49152, 57344, - 61440, 61568, 61600, 61616, 61612, 0, 1, 49152, - 57344, 61440, 61568, 61600, 61616, 61612, 0, 1, - 49152, 57344, 61440, 61568, 61600, 61616, 61617, 61614, - 0, 1, 49152, 57344, 61440, 61568, 61600, 0, - 1, 49152, 57344, 61440, 61568, 61632, 61616, 0, - 1, 49152, 57344, 61440, 61568, 61632, 61616, 0, - 1, 49152, 57344, 61440, 61568, 61632, 61616, 61618, - 0, 1, 49152, 57344, 61440, 61568, 61632, 61616, - 0, 1, 49152, 57344, 61440, 61568, 61632, 61616, - 61620, 0, 1, 49152, 57344, 61440, 61568, 61632, - 61616, 61620, 0, 1, 49152, 57344, 61440, 61568, - 61632, 61616, 61624, 61622, 0, 1, 49152, 57344, - 61440, 61568, 61632, 61616, 0, 1, 49152, 57344, - 61440, 61568, 61632, 61633, 61624, 0, 1, 49152, - 57344, 61440, 61568, 61632, 61633, 61624, 0, 1, - 49152, 57344, 61440, 61568, 61632, 61633, 61624, 61626, - 0, 1, 49152, 57344, 61440, 61568, 61632, 61633, - 61624, 0, 1, 49152, 57344, 61440, 61568, 61632, - 61633, 61624, 61628, 0, 1, 49152, 57344, 61440, - 61568, 61632, 61633, 61635, 61628, 0, 1, 49152, - 57344, 61440, 61568, 61632, 61633, 61635, 61628, 61630, - 0, 1, 49152, 57344, 61440, 61568, 0, 1, - 49152, 57344, 61440, 61696, 61632, 0, 1, 49152, - 57344, 61440, 61696, 61632, 0, 1, 49152, 57344, - 61440, 61696, 61632, 61634, 0, 1, 49152, 57344, - 61440, 61696, 61632, 0, 1, 49152, 57344, 61440, - 61696, 61632, 61636, 0, 1, 49152, 57344, 61440, - 61696, 61632, 61636, 0, 1, 49152, 57344, 61440, - 61696, 61632, 61640, 61638, 0, 1, 49152, 57344, - 61440, 61696, 61632, 0, 1, 49152, 57344, 61440, - 61696, 61632, 61640, 0, 1, 49152, 57344, 61440, - 61696, 61632, 61640, 0, 1, 49152, 57344, 61440, - 61696, 61632, 61640, 61642, 0, 1, 49152, 57344, - 61440, 61696, 61632, 61640, 0, 1, 49152, 57344, - 61440, 61696, 61632, 61648, 61644, 0, 1, 49152, - 57344, 61440, 61696, 61632, 61648, 61644, 0, 1, - 49152, 57344, 61440, 61696, 61632, 61648, 61649, 61646, - 0, 1, 49152, 57344, 61440, 61696, 61632, 0, - 1, 49152, 57344, 61440, 61696, 61632, 61648, 0, - 1, 49152, 57344, 61440, 61696, 61632, 61648, 0, - 1, 49152, 57344, 61440, 61696, 61632, 61648, 61650, - 0, 1, 49152, 57344, 61440, 61696, 61632, 61648, - 0, 1, 49152, 57344, 61440, 61696, 61632, 61648, - 61652, 0, 1, 49152, 57344, 61440, 61696, 61632, - 61648, 61652, 0, 1, 49152, 57344, 61440, 61696, - 61632, 61648, 61656, 61654, 0, 1, 49152, 57344, - 61440, 61696, 61632, 61648, 0, 1, 49152, 57344, - 61440, 61696, 61632, 61664, 61656, 0, 1, 49152, - 57344, 61440, 61696, 61632, 61664, 61656, 0, 1, - 49152, 57344, 61440, 61696, 61632, 61664, 61656, 61658, - 0, 1, 49152, 57344, 61440, 61696, 61632, 61664, - 61656, 0, 1, 49152, 57344, 61440, 61696, 61632, - 61664, 61665, 61660, 0, 1, 49152, 57344, 61440, - 61696, 61632, 61664, 61665, 61660, 0, 1, 49152, - 57344, 61440, 61696, 61632, 61664, 61665, 61660, 61662, - 0, 1, 49152, 57344, 61440, 61696, 61632, 0, - 1, 49152, 57344, 61440, 61696, 61697, 61664, 0, - 1, 49152, 57344, 61440, 61696, 61697, 61664, 0, - 1, 49152, 57344, 61440, 61696, 61697, 61664, 61666, - 0, 1, 49152, 57344, 61440, 61696, 61697, 61664, - 0, 1, 49152, 57344, 61440, 61696, 61697, 61664, - 61668, 0, 1, 49152, 57344, 61440, 61696, 61697, - 61664, 61668, 0, 1, 49152, 57344, 61440, 61696, - 61697, 61664, 61672, 61670, 0, 1, 49152, 57344, - 61440, 61696, 61697, 61664, 0, 1, 49152, 57344, - 61440, 61696, 61697, 61664, 61672, 0, 1, 49152, - 57344, 61440, 61696, 61697, 61664, 61672, 0, 1, - 49152, 57344, 61440, 61696, 61697, 61664, 61672, 61674, - 0, 1, 49152, 57344, 61440, 61696, 61697, 61664, - 61672, 0, 1, 49152, 57344, 61440, 61696, 61697, - 61664, 61680, 61676, 0, 1, 49152, 57344, 61440, - 61696, 61697, 61664, 61680, 61676, 0, 1, 49152, - 57344, 61440, 61696, 61697, 61664, 61680, 61681, 61678, - 0, 1, 49152, 57344, 61440, 61696, 61697, 61664, - 0, 1, 49152, 57344, 61440, 61696, 61697, 61664, - 61680, 0, 1, 49152, 57344, 61440, 61696, 61697, - 61699, 61680, 0, 1, 49152, 57344, 61440, 61696, - 61697, 61699, 61680, 61682, 0, 1, 49152, 57344, - 61440, 61696, 61697, 61699, 61680, 0, 1, 49152, - 57344, 61440, 61696, 61697, 61699, 61680, 61684, 0, - 1, 49152, 57344, 61440, 61696, 61697, 61699, 61680, - 61684, 0, 1, 49152, 57344, 61440, 61696, 61697, - 61699, 61680, 61688, 61686, 0, 1, 49152, 57344, - 61440, 61696, 61697, 61699, 61680, 0, 1, 49152, - 57344, 61440, 61696, 61697, 61699, 61680, 61688, 0, - 1, 49152, 57344, 61440, 61696, 61697, 61699, 61680, - 61688, 0, 1, 49152, 57344, 61440, 61696, 61697, - 61699, 61680, 61688, 61690, 0, 1, 49152, 57344, - 61440, 61696, 61697, 61699, 61703, 61688, 0, 1, - 49152, 57344, 61440, 61696, 61697, 61699, 61703, 61688, - 61692, 0, 1, 49152, 57344, 61440, 61696, 61697, - 61699, 61703, 61688, 61692, 0, 1, 49152, 57344, - 61440, 61696, 61697, 61699, 61703, 61688, 61692, 61694, - 0, 1, 49152, 57344, 61440, 0, 1, 49152, - 57344, 61440, 61696, 0, 1, 49152, 57344, 61440, - 61696, 0, 1, 49152, 57344, 61440, 61696, 61698, - 0, 1, 49152, 57344, 61440, 61696, 0, 1, - 49152, 57344, 61440, 61696, 61700, 0, 1, 49152, - 57344, 61440, 61696, 61700, 0, 1, 49152, 57344, - 61440, 61696, 61704, 61702, 0, 1, 49152, 57344, - 61440, 61696, 0, 1, 49152, 57344, 61440, 61696, - 61704, 0, 1, 49152, 57344, 61440, 61696, 61704, - 0, 1, 49152, 57344, 61440, 61696, 61704, 61706, - 0, 1, 49152, 57344, 61440, 61696, 61704, 0, - 1, 49152, 57344, 61440, 61696, 61712, 61708, 0, - 1, 49152, 57344, 61440, 61696, 61712, 61708, 0, - 1, 49152, 57344, 61440, 61696, 61712, 61713, 61710, - 0, 1, 49152, 57344, 61440, 61696, 0, 1, - 49152, 57344, 61440, 61696, 61712, 0, 1, 49152, - 57344, 61440, 61696, 61712, 0, 1, 49152, 57344, - 61440, 61696, 61712, 61714, 0, 1, 49152, 57344, - 61440, 61696, 61712, 0, 1, 49152, 57344, 61440, - 61696, 61712, 61716, 0, 1, 49152, 57344, 61440, - 61696, 61712, 61716, 0, 1, 49152, 57344, 61440, - 61696, 61712, 61720, 61718, 0, 1, 49152, 57344, - 61440, 61696, 61712, 0, 1, 49152, 57344, 61440, - 61696, 61728, 61720, 0, 1, 49152, 57344, 61440, - 61696, 61728, 61720, 0, 1, 49152, 57344, 61440, - 61696, 61728, 61720, 61722, 0, 1, 49152, 57344, - 61440, 61696, 61728, 61720, 0, 1, 49152, 57344, - 61440, 61696, 61728, 61729, 61724, 0, 1, 49152, - 57344, 61440, 61696, 61728, 61729, 61724, 0, 1, - 49152, 57344, 61440, 61696, 61728, 61729, 61724, 61726, - 0, 1, 49152, 57344, 61440, 61696, 0, 1, - 49152, 57344, 61440, 61696, 61728, 0, 1, 49152, - 57344, 61440, 61696, 61728, 0, 1, 49152, 57344, - 61440, 61696, 61728, 61730, 0, 1, 49152, 57344, - 61440, 61696, 61728, 0, 1, 49152, 57344, 61440, - 61696, 61728, 61732, 0, 1, 49152, 57344, 61440, - 61696, 61728, 61732, 0, 1, 49152, 57344, 61440, - 61696, 61728, 61736, 61734, 0, 1, 49152, 57344, - 61440, 61696, 61728, 0, 1, 49152, 57344, 61440, - 61696, 61728, 61736, 0, 1, 49152, 57344, 61440, - 61696, 61728, 61736, 0, 1, 49152, 57344, 61440, - 61696, 61728, 61736, 61738, 0, 1, 49152, 57344, - 61440, 61696, 61728, 61736, 0, 1, 49152, 57344, - 61440, 61696, 61728, 61744, 61740, 0, 1, 49152, - 57344, 61440, 61696, 61728, 61744, 61740, 0, 1, - 49152, 57344, 61440, 61696, 61728, 61744, 61745, 61742, - 0, 1, 49152, 57344, 61440, 61696, 61728, 0, - 1, 49152, 57344, 61440, 61696, 61760, 61744, 0, - 1, 49152, 57344, 61440, 61696, 61760, 61744, 0, - 1, 49152, 57344, 61440, 61696, 61760, 61744, 61746, - 0, 1, 49152, 57344, 61440, 61696, 61760, 61744, - 0, 1, 49152, 57344, 61440, 61696, 61760, 61744, - 61748, 0, 1, 49152, 57344, 61440, 61696, 61760, - 61744, 61748, 0, 1, 49152, 57344, 61440, 61696, - 61760, 61744, 61752, 61750, 0, 1, 49152, 57344, - 61440, 61696, 61760, 61744, 0, 1, 49152, 57344, - 61440, 61696, 61760, 61761, 61752, 0, 1, 49152, - 57344, 61440, 61696, 61760, 61761, 61752, 0, 1, - 49152, 57344, 61440, 61696, 61760, 61761, 61752, 61754, - 0, 1, 49152, 57344, 61440, 61696, 61760, 61761, - 61752, 0, 1, 49152, 57344, 61440, 61696, 61760, - 61761, 61752, 61756, 0, 1, 49152, 57344, 61440, - 61696, 61760, 61761, 61763, 61756, 0, 1, 49152, - 57344, 61440, 61696, 61760, 61761, 61763, 61756, 61758, - 0, 1, 49152, 57344, 61440, 61696, 0, 1, - 49152, 57344, 61440, 61696, 61760, 0, 1, 49152, - 57344, 61440, 61696, 61760, 0, 1, 49152, 57344, - 61440, 61696, 61760, 61762, 0, 1, 49152, 57344, - 61440, 61696, 61760, 0, 1, 49152, 57344, 61440, - 61696, 61760, 61764, 0, 1, 49152, 57344, 61440, - 61696, 61760, 61764, 0, 1, 49152, 57344, 61440, - 61696, 61760, 61768, 61766, 0, 1, 49152, 57344, - 61440, 61696, 61760, 0, 1, 49152, 57344, 61440, - 61696, 61760, 61768, 0, 1, 49152, 57344, 61440, - 61696, 61760, 61768, 0, 1, 49152, 57344, 61440, - 61696, 61760, 61768, 61770, 0, 1, 49152, 57344, - 61440, 61696, 61760, 61768, 0, 1, 49152, 57344, - 61440, 61696, 61760, 61776, 61772, 0, 1, 49152, - 57344, 61440, 61696, 61760, 61776, 61772, 0, 1, - 49152, 57344, 61440, 61696, 61760, 61776, 61777, 61774, - 0, 1, 49152, 57344, 61440, 61696, 61760, 0, - 1, 49152, 57344, 61440, 61696, 61760, 61776, 0, - 1, 49152, 57344, 61440, 61696, 61760, 61776, 0, - 1, 49152, 57344, 61440, 61696, 61760, 61776, 61778, - 0, 1, 49152, 57344, 61440, 61696, 61760, 61776, - 0, 1, 49152, 57344, 61440, 61696, 61760, 61776, - 61780, 0, 1, 49152, 57344, 61440, 61696, 61760, - 61776, 61780, 0, 1, 49152, 57344, 61440, 61696, - 61760, 61776, 61784, 61782, 0, 1, 49152, 57344, - 61440, 61696, 61760, 61776, 0, 1, 49152, 57344, - 61440, 61696, 61760, 61792, 61784, 0, 1, 49152, - 57344, 61440, 61696, 61760, 61792, 61784, 0, 1, - 49152, 57344, 61440, 61696, 61760, 61792, 61784, 61786, - 0, 1, 49152, 57344, 61440, 61696, 61760, 61792, - 61784, 0, 1, 49152, 57344, 61440, 61696, 61760, - 61792, 61793, 61788, 0, 1, 49152, 57344, 61440, - 61696, 61760, 61792, 61793, 61788, 0, 1, 49152, - 57344, 61440, 61696, 61760, 61792, 61793, 61788, 61790, - 0, 1, 49152, 57344, 61440, 61696, 61760, 0, - 1, 49152, 57344, 61440, 61696, 61824, 61792, 0, - 1, 49152, 57344, 61440, 61696, 61824, 61792, 0, - 1, 49152, 57344, 61440, 61696, 61824, 61792, 61794, - 0, 1, 49152, 57344, 61440, 61696, 61824, 61792, - 0, 1, 49152, 57344, 61440, 61696, 61824, 61792, - 61796, 0, 1, 49152, 57344, 61440, 61696, 61824, - 61792, 61796, 0, 1, 49152, 57344, 61440, 61696, - 61824, 61792, 61800, 61798, 0, 1, 49152, 57344, - 61440, 61696, 61824, 61792, 0, 1, 49152, 57344, - 61440, 61696, 61824, 61792, 61800, 0, 1, 49152, - 57344, 61440, 61696, 61824, 61792, 61800, 0, 1, - 49152, 57344, 61440, 61696, 61824, 61792, 61800, 61802, - 0, 1, 49152, 57344, 61440, 61696, 61824, 61792, - 61800, 0, 1, 49152, 57344, 61440, 61696, 61824, - 61792, 61808, 61804, 0, 1, 49152, 57344, 61440, - 61696, 61824, 61792, 61808, 61804, 0, 1, 49152, - 57344, 61440, 61696, 61824, 61792, 61808, 61809, 61806, - 0, 1, 49152, 57344, 61440, 61696, 61824, 61792, - 0, 1, 49152, 57344, 61440, 61696, 61824, 61825, - 61808, 0, 1, 49152, 57344, 61440, 61696, 61824, - 61825, 61808, 0, 1, 49152, 57344, 61440, 61696, - 61824, 61825, 61808, 61810, 0, 1, 49152, 57344, - 61440, 61696, 61824, 61825, 61808, 0, 1, 49152, - 57344, 61440, 61696, 61824, 61825, 61808, 61812, 0, - 1, 49152, 57344, 61440, 61696, 61824, 61825, 61808, - 61812, 0, 1, 49152, 57344, 61440, 61696, 61824, - 61825, 61808, 61816, 61814, 0, 1, 49152, 57344, - 61440, 61696, 61824, 61825, 61808, 0, 1, 49152, - 57344, 61440, 61696, 61824, 61825, 61808, 61816, 0, - 1, 49152, 57344, 61440, 61696, 61824, 61825, 61827, - 61816, 0, 1, 49152, 57344, 61440, 61696, 61824, - 61825, 61827, 61816, 61818, 0, 1, 49152, 57344, - 61440, 61696, 61824, 61825, 61827, 61816, 0, 1, - 49152, 57344, 61440, 61696, 61824, 61825, 61827, 61816, - 61820, 0, 1, 49152, 57344, 61440, 61696, 61824, - 61825, 61827, 61816, 61820, 0, 1, 49152, 57344, - 61440, 61696, 61824, 61825, 61827, 61816, 61820, 61822, - 0, 1, 49152, 57344, 61440, 61696, 0, 1, - 49152, 57344, 61440, 61952, 61824, 0, 1, 49152, - 57344, 61440, 61952, 61824, 0, 1, 49152, 57344, - 61440, 61952, 61824, 61826, 0, 1, 49152, 57344, - 61440, 61952, 61824, 0, 1, 49152, 57344, 61440, - 61952, 61824, 61828, 0, 1, 49152, 57344, 61440, - 61952, 61824, 61828, 0, 1, 49152, 57344, 61440, - 61952, 61824, 61832, 61830, 0, 1, 49152, 57344, - 61440, 61952, 61824, 0, 1, 49152, 57344, 61440, - 61952, 61824, 61832, 0, 1, 49152, 57344, 61440, - 61952, 61824, 61832, 0, 1, 49152, 57344, 61440, - 61952, 61824, 61832, 61834, 0, 1, 49152, 57344, - 61440, 61952, 61824, 61832, 0, 1, 49152, 57344, - 61440, 61952, 61824, 61840, 61836, 0, 1, 49152, - 57344, 61440, 61952, 61824, 61840, 61836, 0, 1, - 49152, 57344, 61440, 61952, 61824, 61840, 61841, 61838, - 0, 1, 49152, 57344, 61440, 61952, 61824, 0, - 1, 49152, 57344, 61440, 61952, 61824, 61840, 0, - 1, 49152, 57344, 61440, 61952, 61824, 61840, 0, - 1, 49152, 57344, 61440, 61952, 61824, 61840, 61842, - 0, 1, 49152, 57344, 61440, 61952, 61824, 61840, - 0, 1, 49152, 57344, 61440, 61952, 61824, 61840, - 61844, 0, 1, 49152, 57344, 61440, 61952, 61824, - 61840, 61844, 0, 1, 49152, 57344, 61440, 61952, - 61824, 61840, 61848, 61846, 0, 1, 49152, 57344, - 61440, 61952, 61824, 61840, 0, 1, 49152, 57344, - 61440, 61952, 61824, 61856, 61848, 0, 1, 49152, - 57344, 61440, 61952, 61824, 61856, 61848, 0, 1, - 49152, 57344, 61440, 61952, 61824, 61856, 61848, 61850, - 0, 1, 49152, 57344, 61440, 61952, 61824, 61856, - 61848, 0, 1, 49152, 57344, 61440, 61952, 61824, - 61856, 61857, 61852, 0, 1, 49152, 57344, 61440, - 61952, 61824, 61856, 61857, 61852, 0, 1, 49152, - 57344, 61440, 61952, 61824, 61856, 61857, 61852, 61854, - 0, 1, 49152, 57344, 61440, 61952, 61824, 0, - 1, 49152, 57344, 61440, 61952, 61824, 61856, 0, - 1, 49152, 57344, 61440, 61952, 61824, 61856, 0, - 1, 49152, 57344, 61440, 61952, 61824, 61856, 61858, - 0, 1, 49152, 57344, 61440, 61952, 61824, 61856, - 0, 1, 49152, 57344, 61440, 61952, 61824, 61856, - 61860, 0, 1, 49152, 57344, 61440, 61952, 61824, - 61856, 61860, 0, 1, 49152, 57344, 61440, 61952, - 61824, 61856, 61864, 61862, 0, 1, 49152, 57344, - 61440, 61952, 61824, 61856, 0, 1, 49152, 57344, - 61440, 61952, 61824, 61856, 61864, 0, 1, 49152, - 57344, 61440, 61952, 61824, 61856, 61864, 0, 1, - 49152, 57344, 61440, 61952, 61824, 61856, 61864, 61866, - 0, 1, 49152, 57344, 61440, 61952, 61824, 61856, - 61864, 0, 1, 49152, 57344, 61440, 61952, 61824, - 61856, 61872, 61868, 0, 1, 49152, 57344, 61440, - 61952, 61824, 61856, 61872, 61868, 0, 1, 49152, - 57344, 61440, 61952, 61824, 61856, 61872, 61873, 61870, - 0, 1, 49152, 57344, 61440, 61952, 61824, 61856, - 0, 1, 49152, 57344, 61440, 61952, 61824, 61888, - 61872, 0, 1, 49152, 57344, 61440, 61952, 61824, - 61888, 61872, 0, 1, 49152, 57344, 61440, 61952, - 61824, 61888, 61872, 61874, 0, 1, 49152, 57344, - 61440, 61952, 61824, 61888, 61872, 0, 1, 49152, - 57344, 61440, 61952, 61824, 61888, 61872, 61876, 0, - 1, 49152, 57344, 61440, 61952, 61824, 61888, 61872, - 61876, 0, 1, 49152, 57344, 61440, 61952, 61824, - 61888, 61872, 61880, 61878, 0, 1, 49152, 57344, - 61440, 61952, 61824, 61888, 61872, 0, 1, 49152, - 57344, 61440, 61952, 61824, 61888, 61889, 61880, 0, - 1, 49152, 57344, 61440, 61952, 61824, 61888, 61889, - 61880, 0, 1, 49152, 57344, 61440, 61952, 61824, - 61888, 61889, 61880, 61882, 0, 1, 49152, 57344, - 61440, 61952, 61824, 61888, 61889, 61880, 0, 1, - 49152, 57344, 61440, 61952, 61824, 61888, 61889, 61880, - 61884, 0, 1, 49152, 57344, 61440, 61952, 61824, - 61888, 61889, 61891, 61884, 0, 1, 49152, 57344, - 61440, 61952, 61824, 61888, 61889, 61891, 61884, 61886, - 0, 1, 49152, 57344, 61440, 61952, 61824, 0, - 1, 49152, 57344, 61440, 61952, 61953, 61888, 0, - 1, 49152, 57344, 61440, 61952, 61953, 61888, 0, - 1, 49152, 57344, 61440, 61952, 61953, 61888, 61890, - 0, 1, 49152, 57344, 61440, 61952, 61953, 61888, - 0, 1, 49152, 57344, 61440, 61952, 61953, 61888, - 61892, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61888, 61892, 0, 1, 49152, 57344, 61440, 61952, - 61953, 61888, 61896, 61894, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61888, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61888, 61896, 0, 1, 49152, - 57344, 61440, 61952, 61953, 61888, 61896, 0, 1, - 49152, 57344, 61440, 61952, 61953, 61888, 61896, 61898, - 0, 1, 49152, 57344, 61440, 61952, 61953, 61888, - 61896, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61888, 61904, 61900, 0, 1, 49152, 57344, 61440, - 61952, 61953, 61888, 61904, 61900, 0, 1, 49152, - 57344, 61440, 61952, 61953, 61888, 61904, 61905, 61902, - 0, 1, 49152, 57344, 61440, 61952, 61953, 61888, - 0, 1, 49152, 57344, 61440, 61952, 61953, 61888, - 61904, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61888, 61904, 0, 1, 49152, 57344, 61440, 61952, - 61953, 61888, 61904, 61906, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61888, 61904, 0, 1, 49152, - 57344, 61440, 61952, 61953, 61888, 61904, 61908, 0, - 1, 49152, 57344, 61440, 61952, 61953, 61888, 61904, - 61908, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61888, 61904, 61912, 61910, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61888, 61904, 0, 1, 49152, - 57344, 61440, 61952, 61953, 61888, 61920, 61912, 0, - 1, 49152, 57344, 61440, 61952, 61953, 61888, 61920, - 61912, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61888, 61920, 61912, 61914, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61888, 61920, 61912, 0, 1, - 49152, 57344, 61440, 61952, 61953, 61888, 61920, 61921, - 61916, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61888, 61920, 61921, 61916, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61888, 61920, 61921, 61916, 61918, - 0, 1, 49152, 57344, 61440, 61952, 61953, 61888, - 0, 1, 49152, 57344, 61440, 61952, 61953, 61888, - 61920, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61955, 61920, 0, 1, 49152, 57344, 61440, 61952, - 61953, 61955, 61920, 61922, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61955, 61920, 0, 1, 49152, - 57344, 61440, 61952, 61953, 61955, 61920, 61924, 0, - 1, 49152, 57344, 61440, 61952, 61953, 61955, 61920, - 61924, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61955, 61920, 61928, 61926, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61955, 61920, 0, 1, 49152, - 57344, 61440, 61952, 61953, 61955, 61920, 61928, 0, - 1, 49152, 57344, 61440, 61952, 61953, 61955, 61920, - 61928, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61955, 61920, 61928, 61930, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61955, 61920, 61928, 0, 1, - 49152, 57344, 61440, 61952, 61953, 61955, 61920, 61936, - 61932, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61955, 61920, 61936, 61932, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61955, 61920, 61936, 61937, 61934, - 0, 1, 49152, 57344, 61440, 61952, 61953, 61955, - 61920, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61955, 61920, 61936, 0, 1, 49152, 57344, 61440, - 61952, 61953, 61955, 61920, 61936, 0, 1, 49152, - 57344, 61440, 61952, 61953, 61955, 61920, 61936, 61938, - 0, 1, 49152, 57344, 61440, 61952, 61953, 61955, - 61959, 61936, 0, 1, 49152, 57344, 61440, 61952, - 61953, 61955, 61959, 61936, 61940, 0, 1, 49152, - 57344, 61440, 61952, 61953, 61955, 61959, 61936, 61940, - 0, 1, 49152, 57344, 61440, 61952, 61953, 61955, - 61959, 61936, 61944, 61942, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61955, 61959, 61936, 0, 1, - 49152, 57344, 61440, 61952, 61953, 61955, 61959, 61936, - 61944, 0, 1, 49152, 57344, 61440, 61952, 61953, - 61955, 61959, 61936, 61944, 0, 1, 49152, 57344, - 61440, 61952, 61953, 61955, 61959, 61936, 61944, 61946, - 0, 1, 49152, 57344, 61440, 61952, 61953, 61955, - 61959, 61936, 61944, 0, 1, 49152, 57344, 61440, - 61952, 61953, 61955, 61959, 61936, 61944, 61948, 0, - 1, 49152, 57344, 61440, 61952, 61953, 61955, 61959, - 61936, 61944, 61948, 0, 1, 49152, 57344, 61440, - 61952, 61953, 61955, 61959, 61936, 61944, 61948, 61950, - 0, 1, 49152, 57344, 61440, 0, 1, 49152, - 57344, 61440, 61952, 0, 1, 49152, 57344, 61440, - 61952, 0, 1, 49152, 57344, 61440, 61952, 61954, - 0, 1, 49152, 57344, 61440, 61952, 0, 1, - 49152, 57344, 61440, 61952, 61956, 0, 1, 49152, - 57344, 61440, 61952, 61956, 0, 1, 49152, 57344, - 61440, 61952, 61960, 61958, 0, 1, 49152, 57344, - 61440, 61952, 0, 1, 49152, 57344, 61440, 61952, - 61960, 0, 1, 49152, 57344, 61440, 61952, 61960, - 0, 1, 49152, 57344, 61440, 61952, 61960, 61962, - 0, 1, 49152, 57344, 61440, 61952, 61960, 0, - 1, 49152, 57344, 61440, 61952, 61968, 61964, 0, - 1, 49152, 57344, 61440, 61952, 61968, 61964, 0, - 1, 49152, 57344, 61440, 61952, 61968, 61969, 61966, - 0, 1, 49152, 57344, 61440, 61952, 0, 1, - 49152, 57344, 61440, 61952, 61968, 0, 1, 49152, - 57344, 61440, 61952, 61968, 0, 1, 49152, 57344, - 61440, 61952, 61968, 61970, 0, 1, 49152, 57344, - 61440, 61952, 61968, 0, 1, 49152, 57344, 61440, - 61952, 61968, 61972, 0, 1, 49152, 57344, 61440, - 61952, 61968, 61972, 0, 1, 49152, 57344, 61440, - 61952, 61968, 61976, 61974, 0, 1, 49152, 57344, - 61440, 61952, 61968, 0, 1, 49152, 57344, 61440, - 61952, 61984, 61976, 0, 1, 49152, 57344, 61440, - 61952, 61984, 61976, 0, 1, 49152, 57344, 61440, - 61952, 61984, 61976, 61978, 0, 1, 49152, 57344, - 61440, 61952, 61984, 61976, 0, 1, 49152, 57344, - 61440, 61952, 61984, 61985, 61980, 0, 1, 49152, - 57344, 61440, 61952, 61984, 61985, 61980, 0, 1, - 49152, 57344, 61440, 61952, 61984, 61985, 61980, 61982, - 0, 1, 49152, 57344, 61440, 61952, 0, 1, - 49152, 57344, 61440, 61952, 61984, 0, 1, 49152, - 57344, 61440, 61952, 61984, 0, 1, 49152, 57344, - 61440, 61952, 61984, 61986, 0, 1, 49152, 57344, - 61440, 61952, 61984, 0, 1, 49152, 57344, 61440, - 61952, 61984, 61988, 0, 1, 49152, 57344, 61440, - 61952, 61984, 61988, 0, 1, 49152, 57344, 61440, - 61952, 61984, 61992, 61990, 0, 1, 49152, 57344, - 61440, 61952, 61984, 0, 1, 49152, 57344, 61440, - 61952, 61984, 61992, 0, 1, 49152, 57344, 61440, - 61952, 61984, 61992, 0, 1, 49152, 57344, 61440, - 61952, 61984, 61992, 61994, 0, 1, 49152, 57344, - 61440, 61952, 61984, 61992, 0, 1, 49152, 57344, - 61440, 61952, 61984, 62000, 61996, 0, 1, 49152, - 57344, 61440, 61952, 61984, 62000, 61996, 0, 1, - 49152, 57344, 61440, 61952, 61984, 62000, 62001, 61998, - 0, 1, 49152, 57344, 61440, 61952, 61984, 0, - 1, 49152, 57344, 61440, 61952, 62016, 62000, 0, - 1, 49152, 57344, 61440, 61952, 62016, 62000, 0, - 1, 49152, 57344, 61440, 61952, 62016, 62000, 62002, - 0, 1, 49152, 57344, 61440, 61952, 62016, 62000, - 0, 1, 49152, 57344, 61440, 61952, 62016, 62000, - 62004, 0, 1, 49152, 57344, 61440, 61952, 62016, - 62000, 62004, 0, 1, 49152, 57344, 61440, 61952, - 62016, 62000, 62008, 62006, 0, 1, 49152, 57344, - 61440, 61952, 62016, 62000, 0, 1, 49152, 57344, - 61440, 61952, 62016, 62017, 62008, 0, 1, 49152, - 57344, 61440, 61952, 62016, 62017, 62008, 0, 1, - 49152, 57344, 61440, 61952, 62016, 62017, 62008, 62010, - 0, 1, 49152, 57344, 61440, 61952, 62016, 62017, - 62008, 0, 1, 49152, 57344, 61440, 61952, 62016, - 62017, 62008, 62012, 0, 1, 49152, 57344, 61440, - 61952, 62016, 62017, 62019, 62012, 0, 1, 49152, - 57344, 61440, 61952, 62016, 62017, 62019, 62012, 62014, - 0, 1, 49152, 57344, 61440, 61952, 0, 1, - 49152, 57344, 61440, 61952, 62016, 0, 1, 49152, - 57344, 61440, 61952, 62016, 0, 1, 49152, 57344, - 61440, 61952, 62016, 62018, 0, 1, 49152, 57344, - 61440, 61952, 62016, 0, 1, 49152, 57344, 61440, - 61952, 62016, 62020, 0, 1, 49152, 57344, 61440, - 61952, 62016, 62020, 0, 1, 49152, 57344, 61440, - 61952, 62016, 62024, 62022, 0, 1, 49152, 57344, - 61440, 61952, 62016, 0, 1, 49152, 57344, 61440, - 61952, 62016, 62024, 0, 1, 49152, 57344, 61440, - 61952, 62016, 62024, 0, 1, 49152, 57344, 61440, - 61952, 62016, 62024, 62026, 0, 1, 49152, 57344, - 61440, 61952, 62016, 62024, 0, 1, 49152, 57344, - 61440, 61952, 62016, 62032, 62028, 0, 1, 49152, - 57344, 61440, 61952, 62016, 62032, 62028, 0, 1, - 49152, 57344, 61440, 61952, 62016, 62032, 62033, 62030, - 0, 1, 49152, 57344, 61440, 61952, 62016, 0, - 1, 49152, 57344, 61440, 61952, 62016, 62032, 0, - 1, 49152, 57344, 61440, 61952, 62016, 62032, 0, - 1, 49152, 57344, 61440, 61952, 62016, 62032, 62034, - 0, 1, 49152, 57344, 61440, 61952, 62016, 62032, - 0, 1, 49152, 57344, 61440, 61952, 62016, 62032, - 62036, 0, 1, 49152, 57344, 61440, 61952, 62016, - 62032, 62036, 0, 1, 49152, 57344, 61440, 61952, - 62016, 62032, 62040, 62038, 0, 1, 49152, 57344, - 61440, 61952, 62016, 62032, 0, 1, 49152, 57344, - 61440, 61952, 62016, 62048, 62040, 0, 1, 49152, - 57344, 61440, 61952, 62016, 62048, 62040, 0, 1, - 49152, 57344, 61440, 61952, 62016, 62048, 62040, 62042, - 0, 1, 49152, 57344, 61440, 61952, 62016, 62048, - 62040, 0, 1, 49152, 57344, 61440, 61952, 62016, - 62048, 62049, 62044, 0, 1, 49152, 57344, 61440, - 61952, 62016, 62048, 62049, 62044, 0, 1, 49152, - 57344, 61440, 61952, 62016, 62048, 62049, 62044, 62046, - 0, 1, 49152, 57344, 61440, 61952, 62016, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62048, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62048, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62048, 62050, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62048, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62048, - 62052, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62048, 62052, 0, 1, 49152, 57344, 61440, 61952, - 62080, 62048, 62056, 62054, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62048, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62048, 62056, 0, 1, 49152, - 57344, 61440, 61952, 62080, 62048, 62056, 0, 1, - 49152, 57344, 61440, 61952, 62080, 62048, 62056, 62058, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62048, - 62056, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62048, 62064, 62060, 0, 1, 49152, 57344, 61440, - 61952, 62080, 62048, 62064, 62060, 0, 1, 49152, - 57344, 61440, 61952, 62080, 62048, 62064, 62065, 62062, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62048, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62081, - 62064, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62081, 62064, 0, 1, 49152, 57344, 61440, 61952, - 62080, 62081, 62064, 62066, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62081, 62064, 0, 1, 49152, - 57344, 61440, 61952, 62080, 62081, 62064, 62068, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62081, 62064, - 62068, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62081, 62064, 62072, 62070, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62081, 62064, 0, 1, 49152, - 57344, 61440, 61952, 62080, 62081, 62064, 62072, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62081, 62083, - 62072, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62081, 62083, 62072, 62074, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62081, 62083, 62072, 0, 1, - 49152, 57344, 61440, 61952, 62080, 62081, 62083, 62072, - 62076, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62081, 62083, 62072, 62076, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62081, 62083, 62072, 62076, 62078, - 0, 1, 49152, 57344, 61440, 61952, 0, 1, - 49152, 57344, 61440, 61952, 62080, 0, 1, 49152, - 57344, 61440, 61952, 62080, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62082, 0, 1, 49152, 57344, - 61440, 61952, 62080, 0, 1, 49152, 57344, 61440, - 61952, 62080, 62084, 0, 1, 49152, 57344, 61440, - 61952, 62080, 62084, 0, 1, 49152, 57344, 61440, - 61952, 62080, 62088, 62086, 0, 1, 49152, 57344, - 61440, 61952, 62080, 0, 1, 49152, 57344, 61440, - 61952, 62080, 62088, 0, 1, 49152, 57344, 61440, - 61952, 62080, 62088, 0, 1, 49152, 57344, 61440, - 61952, 62080, 62088, 62090, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62088, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62096, 62092, 0, 1, 49152, - 57344, 61440, 61952, 62080, 62096, 62092, 0, 1, - 49152, 57344, 61440, 61952, 62080, 62096, 62097, 62094, - 0, 1, 49152, 57344, 61440, 61952, 62080, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62096, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62096, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62096, 62098, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62096, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62096, - 62100, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62096, 62100, 0, 1, 49152, 57344, 61440, 61952, - 62080, 62096, 62104, 62102, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62096, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62112, 62104, 0, 1, 49152, - 57344, 61440, 61952, 62080, 62112, 62104, 0, 1, - 49152, 57344, 61440, 61952, 62080, 62112, 62104, 62106, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62112, - 62104, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62112, 62113, 62108, 0, 1, 49152, 57344, 61440, - 61952, 62080, 62112, 62113, 62108, 0, 1, 49152, - 57344, 61440, 61952, 62080, 62112, 62113, 62108, 62110, - 0, 1, 49152, 57344, 61440, 61952, 62080, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62112, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62112, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62112, 62114, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62112, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62112, - 62116, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62112, 62116, 0, 1, 49152, 57344, 61440, 61952, - 62080, 62112, 62120, 62118, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62112, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62112, 62120, 0, 1, 49152, - 57344, 61440, 61952, 62080, 62112, 62120, 0, 1, - 49152, 57344, 61440, 61952, 62080, 62112, 62120, 62122, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62112, - 62120, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62112, 62128, 62124, 0, 1, 49152, 57344, 61440, - 61952, 62080, 62112, 62128, 62124, 0, 1, 49152, - 57344, 61440, 61952, 62080, 62112, 62128, 62129, 62126, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62112, - 0, 1, 49152, 57344, 61440, 61952, 62080, 62144, - 62128, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62144, 62128, 0, 1, 49152, 57344, 61440, 61952, - 62080, 62144, 62128, 62130, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62144, 62128, 0, 1, 49152, - 57344, 61440, 61952, 62080, 62144, 62128, 62132, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62144, 62128, - 62132, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62144, 62128, 62136, 62134, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62144, 62128, 0, 1, 49152, - 57344, 61440, 61952, 62080, 62144, 62145, 62136, 0, - 1, 49152, 57344, 61440, 61952, 62080, 62144, 62145, - 62136, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62144, 62145, 62136, 62138, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62144, 62145, 62136, 0, 1, - 49152, 57344, 61440, 61952, 62080, 62144, 62145, 62136, - 62140, 0, 1, 49152, 57344, 61440, 61952, 62080, - 62144, 62145, 62147, 62140, 0, 1, 49152, 57344, - 61440, 61952, 62080, 62144, 62145, 62147, 62140, 62142, - 0, 1, 49152, 57344, 61440, 61952, 62080, 0, - 1, 49152, 57344, 61440, 61952, 62208, 62144, 0, - 1, 49152, 57344, 61440, 61952, 62208, 62144, 0, - 1, 49152, 57344, 61440, 61952, 62208, 62144, 62146, - 0, 1, 49152, 57344, 61440, 61952, 62208, 62144, - 0, 1, 49152, 57344, 61440, 61952, 62208, 62144, - 62148, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62144, 62148, 0, 1, 49152, 57344, 61440, 61952, - 62208, 62144, 62152, 62150, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62144, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62144, 62152, 0, 1, 49152, - 57344, 61440, 61952, 62208, 62144, 62152, 0, 1, - 49152, 57344, 61440, 61952, 62208, 62144, 62152, 62154, - 0, 1, 49152, 57344, 61440, 61952, 62208, 62144, - 62152, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62144, 62160, 62156, 0, 1, 49152, 57344, 61440, - 61952, 62208, 62144, 62160, 62156, 0, 1, 49152, - 57344, 61440, 61952, 62208, 62144, 62160, 62161, 62158, - 0, 1, 49152, 57344, 61440, 61952, 62208, 62144, - 0, 1, 49152, 57344, 61440, 61952, 62208, 62144, - 62160, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62144, 62160, 0, 1, 49152, 57344, 61440, 61952, - 62208, 62144, 62160, 62162, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62144, 62160, 0, 1, 49152, - 57344, 61440, 61952, 62208, 62144, 62160, 62164, 0, - 1, 49152, 57344, 61440, 61952, 62208, 62144, 62160, - 62164, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62144, 62160, 62168, 62166, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62144, 62160, 0, 1, 49152, - 57344, 61440, 61952, 62208, 62144, 62176, 62168, 0, - 1, 49152, 57344, 61440, 61952, 62208, 62144, 62176, - 62168, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62144, 62176, 62168, 62170, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62144, 62176, 62168, 0, 1, - 49152, 57344, 61440, 61952, 62208, 62144, 62176, 62177, - 62172, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62144, 62176, 62177, 62172, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62144, 62176, 62177, 62172, 62174, - 0, 1, 49152, 57344, 61440, 61952, 62208, 62144, - 0, 1, 49152, 57344, 61440, 61952, 62208, 62209, - 62176, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62209, 62176, 0, 1, 49152, 57344, 61440, 61952, - 62208, 62209, 62176, 62178, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62209, 62176, 0, 1, 49152, - 57344, 61440, 61952, 62208, 62209, 62176, 62180, 0, - 1, 49152, 57344, 61440, 61952, 62208, 62209, 62176, - 62180, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62209, 62176, 62184, 62182, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62209, 62176, 0, 1, 49152, - 57344, 61440, 61952, 62208, 62209, 62176, 62184, 0, - 1, 49152, 57344, 61440, 61952, 62208, 62209, 62176, - 62184, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62209, 62176, 62184, 62186, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62209, 62176, 62184, 0, 1, - 49152, 57344, 61440, 61952, 62208, 62209, 62176, 62192, - 62188, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62209, 62176, 62192, 62188, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62209, 62176, 62192, 62193, 62190, - 0, 1, 49152, 57344, 61440, 61952, 62208, 62209, - 62176, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62209, 62176, 62192, 0, 1, 49152, 57344, 61440, - 61952, 62208, 62209, 62211, 62192, 0, 1, 49152, - 57344, 61440, 61952, 62208, 62209, 62211, 62192, 62194, - 0, 1, 49152, 57344, 61440, 61952, 62208, 62209, - 62211, 62192, 0, 1, 49152, 57344, 61440, 61952, - 62208, 62209, 62211, 62192, 62196, 0, 1, 49152, - 57344, 61440, 61952, 62208, 62209, 62211, 62192, 62196, - 0, 1, 49152, 57344, 61440, 61952, 62208, 62209, - 62211, 62192, 62200, 62198, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62209, 62211, 62192, 0, 1, - 49152, 57344, 61440, 61952, 62208, 62209, 62211, 62192, - 62200, 0, 1, 49152, 57344, 61440, 61952, 62208, - 62209, 62211, 62192, 62200, 0, 1, 49152, 57344, - 61440, 61952, 62208, 62209, 62211, 62192, 62200, 62202, - 0, 1, 49152, 57344, 61440, 61952, 62208, 62209, - 62211, 62215, 62200, 0, 1, 49152, 57344, 61440, - 61952, 62208, 62209, 62211, 62215, 62200, 62204, 0, - 1, 49152, 57344, 61440, 61952, 62208, 62209, 62211, - 62215, 62200, 62204, 0, 1, 49152, 57344, 61440, - 61952, 62208, 62209, 62211, 62215, 62200, 62204, 62206, - 0, 1, 49152, 57344, 61440, 61952, 0, 1, - 49152, 57344, 61440, 62464, 62208, 0, 1, 49152, - 57344, 61440, 62464, 62208, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62210, 0, 1, 49152, 57344, - 61440, 62464, 62208, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62212, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62212, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62216, 62214, 0, 1, 49152, 57344, - 61440, 62464, 62208, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62216, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62216, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62216, 62218, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62216, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62224, 62220, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62224, 62220, 0, 1, - 49152, 57344, 61440, 62464, 62208, 62224, 62225, 62222, - 0, 1, 49152, 57344, 61440, 62464, 62208, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62224, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62224, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62224, 62226, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62224, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62224, - 62228, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62224, 62228, 0, 1, 49152, 57344, 61440, 62464, - 62208, 62224, 62232, 62230, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62224, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62240, 62232, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62240, 62232, 0, 1, - 49152, 57344, 61440, 62464, 62208, 62240, 62232, 62234, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62240, - 62232, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62240, 62241, 62236, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62240, 62241, 62236, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62240, 62241, 62236, 62238, - 0, 1, 49152, 57344, 61440, 62464, 62208, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62240, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62240, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62240, 62242, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62240, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62240, - 62244, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62240, 62244, 0, 1, 49152, 57344, 61440, 62464, - 62208, 62240, 62248, 62246, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62240, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62240, 62248, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62240, 62248, 0, 1, - 49152, 57344, 61440, 62464, 62208, 62240, 62248, 62250, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62240, - 62248, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62240, 62256, 62252, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62240, 62256, 62252, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62240, 62256, 62257, 62254, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62240, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62272, - 62256, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62272, 62256, 0, 1, 49152, 57344, 61440, 62464, - 62208, 62272, 62256, 62258, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62272, 62256, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62272, 62256, 62260, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62272, 62256, - 62260, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62272, 62256, 62264, 62262, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62272, 62256, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62272, 62273, 62264, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62272, 62273, - 62264, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62272, 62273, 62264, 62266, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62272, 62273, 62264, 0, 1, - 49152, 57344, 61440, 62464, 62208, 62272, 62273, 62264, - 62268, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62272, 62273, 62275, 62268, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62272, 62273, 62275, 62268, 62270, - 0, 1, 49152, 57344, 61440, 62464, 62208, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62272, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62272, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62272, 62274, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62272, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62272, - 62276, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62272, 62276, 0, 1, 49152, 57344, 61440, 62464, - 62208, 62272, 62280, 62278, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62272, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62272, 62280, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62272, 62280, 0, 1, - 49152, 57344, 61440, 62464, 62208, 62272, 62280, 62282, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62272, - 62280, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62272, 62288, 62284, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62272, 62288, 62284, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62272, 62288, 62289, 62286, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62272, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62272, - 62288, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62272, 62288, 0, 1, 49152, 57344, 61440, 62464, - 62208, 62272, 62288, 62290, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62272, 62288, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62272, 62288, 62292, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62272, 62288, - 62292, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62272, 62288, 62296, 62294, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62272, 62288, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62272, 62304, 62296, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62272, 62304, - 62296, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62272, 62304, 62296, 62298, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62272, 62304, 62296, 0, 1, - 49152, 57344, 61440, 62464, 62208, 62272, 62304, 62305, - 62300, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62272, 62304, 62305, 62300, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62272, 62304, 62305, 62300, 62302, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62272, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62336, - 62304, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62336, 62304, 0, 1, 49152, 57344, 61440, 62464, - 62208, 62336, 62304, 62306, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62336, 62304, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62336, 62304, 62308, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62336, 62304, - 62308, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62336, 62304, 62312, 62310, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62336, 62304, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62336, 62304, 62312, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62336, 62304, - 62312, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62336, 62304, 62312, 62314, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62336, 62304, 62312, 0, 1, - 49152, 57344, 61440, 62464, 62208, 62336, 62304, 62320, - 62316, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62336, 62304, 62320, 62316, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62336, 62304, 62320, 62321, 62318, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62336, - 62304, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62336, 62337, 62320, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62336, 62337, 62320, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62336, 62337, 62320, 62322, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62336, - 62337, 62320, 0, 1, 49152, 57344, 61440, 62464, - 62208, 62336, 62337, 62320, 62324, 0, 1, 49152, - 57344, 61440, 62464, 62208, 62336, 62337, 62320, 62324, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62336, - 62337, 62320, 62328, 62326, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62336, 62337, 62320, 0, 1, - 49152, 57344, 61440, 62464, 62208, 62336, 62337, 62320, - 62328, 0, 1, 49152, 57344, 61440, 62464, 62208, - 62336, 62337, 62339, 62328, 0, 1, 49152, 57344, - 61440, 62464, 62208, 62336, 62337, 62339, 62328, 62330, - 0, 1, 49152, 57344, 61440, 62464, 62208, 62336, - 62337, 62339, 62328, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62336, 62337, 62339, 62328, 62332, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62336, 62337, - 62339, 62328, 62332, 0, 1, 49152, 57344, 61440, - 62464, 62208, 62336, 62337, 62339, 62328, 62332, 62334, - 0, 1, 49152, 57344, 61440, 62464, 62208, 0, - 1, 49152, 57344, 61440, 62464, 62208, 62336, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62336, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62336, 62338, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 62340, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62340, 0, 1, 49152, 57344, 61440, 62464, - 62465, 62336, 62344, 62342, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 62344, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62336, 62344, 0, 1, - 49152, 57344, 61440, 62464, 62465, 62336, 62344, 62346, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 62344, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62352, 62348, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62336, 62352, 62348, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62336, 62352, 62353, 62350, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 62352, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62352, 0, 1, 49152, 57344, 61440, 62464, - 62465, 62336, 62352, 62354, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 62352, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62336, 62352, 62356, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62336, 62352, - 62356, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62352, 62360, 62358, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 62352, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62336, 62368, 62360, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62336, 62368, - 62360, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62368, 62360, 62362, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 62368, 62360, 0, 1, - 49152, 57344, 61440, 62464, 62465, 62336, 62368, 62369, - 62364, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62368, 62369, 62364, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 62368, 62369, 62364, 62366, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 62368, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62368, 0, 1, 49152, 57344, 61440, 62464, - 62465, 62336, 62368, 62370, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 62368, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62336, 62368, 62372, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62336, 62368, - 62372, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62368, 62376, 62374, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 62368, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62336, 62368, 62376, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62336, 62368, - 62376, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62368, 62376, 62378, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 62368, 62376, 0, 1, - 49152, 57344, 61440, 62464, 62465, 62336, 62368, 62384, - 62380, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62368, 62384, 62380, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 62368, 62384, 62385, 62382, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 62368, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62400, 62384, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62336, 62400, 62384, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62336, 62400, 62384, 62386, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 62400, 62384, 0, 1, 49152, 57344, 61440, 62464, - 62465, 62336, 62400, 62384, 62388, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62336, 62400, 62384, 62388, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 62400, 62384, 62392, 62390, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 62400, 62384, 0, 1, - 49152, 57344, 61440, 62464, 62465, 62336, 62400, 62401, - 62392, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62400, 62401, 62392, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62336, 62400, 62401, 62392, 62394, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 62400, 62401, 62392, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62336, 62400, 62401, 62392, 62396, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62336, 62400, - 62401, 62403, 62396, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62336, 62400, 62401, 62403, 62396, 62398, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62336, - 62400, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62336, 62400, 0, 1, 49152, 57344, 61440, 62464, - 62465, 62336, 62400, 62402, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62467, 62400, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62467, 62400, 62404, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62467, 62400, - 62404, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62467, 62400, 62408, 62406, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62467, 62400, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62467, 62400, 62408, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62467, 62400, - 62408, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62467, 62400, 62408, 62410, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62467, 62400, 62408, 0, 1, - 49152, 57344, 61440, 62464, 62465, 62467, 62400, 62416, - 62412, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62467, 62400, 62416, 62412, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62467, 62400, 62416, 62417, 62414, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62467, - 62400, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62467, 62400, 62416, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62467, 62400, 62416, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62467, 62400, 62416, 62418, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62467, - 62400, 62416, 0, 1, 49152, 57344, 61440, 62464, - 62465, 62467, 62400, 62416, 62420, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62467, 62400, 62416, 62420, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62467, - 62400, 62416, 62424, 62422, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62467, 62400, 62416, 0, 1, - 49152, 57344, 61440, 62464, 62465, 62467, 62400, 62432, - 62424, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62467, 62400, 62432, 62424, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62467, 62400, 62432, 62424, 62426, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62467, - 62400, 62432, 62424, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62467, 62400, 62432, 62433, 62428, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62467, 62400, - 62432, 62433, 62428, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62467, 62400, 62432, 62433, 62428, 62430, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62467, - 62400, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62467, 62400, 62432, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62467, 62400, 62432, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62467, 62400, 62432, 62434, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62467, - 62400, 62432, 0, 1, 49152, 57344, 61440, 62464, - 62465, 62467, 62400, 62432, 62436, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62467, 62400, 62432, 62436, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62467, - 62400, 62432, 62440, 62438, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62467, 62471, 62432, 0, 1, - 49152, 57344, 61440, 62464, 62465, 62467, 62471, 62432, - 62440, 0, 1, 49152, 57344, 61440, 62464, 62465, - 62467, 62471, 62432, 62440, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62467, 62471, 62432, 62440, 62442, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62467, - 62471, 62432, 62440, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62467, 62471, 62432, 62448, 62444, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62467, 62471, - 62432, 62448, 62444, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62467, 62471, 62432, 62448, 62449, 62446, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62467, - 62471, 62432, 0, 1, 49152, 57344, 61440, 62464, - 62465, 62467, 62471, 62432, 62448, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62467, 62471, 62432, 62448, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62467, - 62471, 62432, 62448, 62450, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62467, 62471, 62432, 62448, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62467, 62471, - 62432, 62448, 62452, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62467, 62471, 62432, 62448, 62452, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62467, 62471, - 62432, 62448, 62456, 62454, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62467, 62471, 62432, 62448, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62467, 62471, - 62432, 62448, 62456, 0, 1, 49152, 57344, 61440, - 62464, 62465, 62467, 62471, 62432, 62448, 62456, 0, - 1, 49152, 57344, 61440, 62464, 62465, 62467, 62471, - 62432, 62448, 62456, 62458, 0, 1, 49152, 57344, - 61440, 62464, 62465, 62467, 62471, 62432, 62448, 62456, - 0, 1, 49152, 57344, 61440, 62464, 62465, 62467, - 62471, 62432, 62448, 62456, 62460, 0, 1, 49152, - 57344, 61440, 62464, 62465, 62467, 62471, 62432, 62448, - 62456, 62460, 0, 1, 49152, 57344, 61440, 62464, - 62465, 62467, 62471, 62432, 62448, 62456, 62460, 62462, - 0, 1, 49152, 57344, 61440, 0, 1, 49152, - 57344, 61440, 62464, 0, 1, 49152, 57344, 61440, - 62464, 0, 1, 49152, 57344, 61440, 62464, 62466, - 0, 1, 49152, 57344, 61440, 62464, 0, 1, - 49152, 57344, 61440, 62464, 62468, 0, 1, 49152, - 57344, 61440, 62464, 62468, 0, 1, 49152, 57344, - 61440, 62464, 62472, 62470, 0, 1, 49152, 57344, - 61440, 62464, 0, 1, 49152, 57344, 61440, 62464, - 62472, 0, 1, 49152, 57344, 61440, 62464, 62472, - 0, 1, 49152, 57344, 61440, 62464, 62472, 62474, - 0, 1, 49152, 57344, 61440, 62464, 62472, 0, - 1, 49152, 57344, 61440, 62464, 62480, 62476, 0, - 1, 49152, 57344, 61440, 62464, 62480, 62476, 0, - 1, 49152, 57344, 61440, 62464, 62480, 62481, 62478, - 0, 1, 49152, 57344, 61440, 62464, 0, 1, - 49152, 57344, 61440, 62464, 62480, 0, 1, 49152, - 57344, 61440, 62464, 62480, 0, 1, 49152, 57344, - 61440, 62464, 62480, 62482, 0, 1, 49152, 57344, - 61440, 62464, 62480, 0, 1, 49152, 57344, 61440, - 62464, 62480, 62484, 0, 1, 49152, 57344, 61440, - 62464, 62480, 62484, 0, 1, 49152, 57344, 61440, - 62464, 62480, 62488, 62486, 0, 1, 49152, 57344, - 61440, 62464, 62480, 0, 1, 49152, 57344, 61440, - 62464, 62496, 62488, 0, 1, 49152, 57344, 61440, - 62464, 62496, 62488, 0, 1, 49152, 57344, 61440, - 62464, 62496, 62488, 62490, 0, 1, 49152, 57344, - 61440, 62464, 62496, 62488, 0, 1, 49152, 57344, - 61440, 62464, 62496, 62497, 62492, 0, 1, 49152, - 57344, 61440, 62464, 62496, 62497, 62492, 0, 1, - 49152, 57344, 61440, 62464, 62496, 62497, 62492, 62494, - 0, 1, 49152, 57344, 61440, 62464, 0, 1, - 49152, 57344, 61440, 62464, 62496, 0, 1, 49152, - 57344, 61440, 62464, 62496, 0, 1, 49152, 57344, - 61440, 62464, 62496, 62498, 0, 1, 49152, 57344, - 61440, 62464, 62496, 0, 1, 49152, 57344, 61440, - 62464, 62496, 62500, 0, 1, 49152, 57344, 61440, - 62464, 62496, 62500, 0, 1, 49152, 57344, 61440, - 62464, 62496, 62504, 62502, 0, 1, 49152, 57344, - 61440, 62464, 62496, 0, 1, 49152, 57344, 61440, - 62464, 62496, 62504, 0, 1, 49152, 57344, 61440, - 62464, 62496, 62504, 0, 1, 49152, 57344, 61440, - 62464, 62496, 62504, 62506, 0, 1, 49152, 57344, - 61440, 62464, 62496, 62504, 0, 1, 49152, 57344, - 61440, 62464, 62496, 62512, 62508, 0, 1, 49152, - 57344, 61440, 62464, 62496, 62512, 62508, 0, 1, - 49152, 57344, 61440, 62464, 62496, 62512, 62513, 62510, - 0, 1, 49152, 57344, 61440, 62464, 62496, 0, - 1, 49152, 57344, 61440, 62464, 62528, 62512, 0, - 1, 49152, 57344, 61440, 62464, 62528, 62512, 0, - 1, 49152, 57344, 61440, 62464, 62528, 62512, 62514, - 0, 1, 49152, 57344, 61440, 62464, 62528, 62512, - 0, 1, 49152, 57344, 61440, 62464, 62528, 62512, - 62516, 0, 1, 49152, 57344, 61440, 62464, 62528, - 62512, 62516, 0, 1, 49152, 57344, 61440, 62464, - 62528, 62512, 62520, 62518, 0, 1, 49152, 57344, - 61440, 62464, 62528, 62512, 0, 1, 49152, 57344, - 61440, 62464, 62528, 62529, 62520, 0, 1, 49152, - 57344, 61440, 62464, 62528, 62529, 62520, 0, 1, - 49152, 57344, 61440, 62464, 62528, 62529, 62520, 62522, - 0, 1, 49152, 57344, 61440, 62464, 62528, 62529, - 62520, 0, 1, 49152, 57344, 61440, 62464, 62528, - 62529, 62520, 62524, 0, 1, 49152, 57344, 61440, - 62464, 62528, 62529, 62531, 62524, 0, 1, 49152, - 57344, 61440, 62464, 62528, 62529, 62531, 62524, 62526, - 0, 1, 49152, 57344, 61440, 62464, 0, 1, - 49152, 57344, 61440, 62464, 62528, 0, 1, 49152, - 57344, 61440, 62464, 62528, 0, 1, 49152, 57344, - 61440, 62464, 62528, 62530, 0, 1, 49152, 57344, - 61440, 62464, 62528, 0, 1, 49152, 57344, 61440, - 62464, 62528, 62532, 0, 1, 49152, 57344, 61440, - 62464, 62528, 62532, 0, 1, 49152, 57344, 61440, - 62464, 62528, 62536, 62534, 0, 1, 49152, 57344, - 61440, 62464, 62528, 0, 1, 49152, 57344, 61440, - 62464, 62528, 62536, 0, 1, 49152, 57344, 61440, - 62464, 62528, 62536, 0, 1, 49152, 57344, 61440, - 62464, 62528, 62536, 62538, 0, 1, 49152, 57344, - 61440, 62464, 62528, 62536, 0, 1, 49152, 57344, - 61440, 62464, 62528, 62544, 62540, 0, 1, 49152, - 57344, 61440, 62464, 62528, 62544, 62540, 0, 1, - 49152, 57344, 61440, 62464, 62528, 62544, 62545, 62542, - 0, 1, 49152, 57344, 61440, 62464, 62528, 0, - 1, 49152, 57344, 61440, 62464, 62528, 62544, 0, - 1, 49152, 57344, 61440, 62464, 62528, 62544, 0, - 1, 49152, 57344, 61440, 62464, 62528, 62544, 62546, - 0, 1, 49152, 57344, 61440, 62464, 62528, 62544, - 0, 1, 49152, 57344, 61440, 62464, 62528, 62544, - 62548, 0, 1, 49152, 57344, 61440, 62464, 62528, - 62544, 62548, 0, 1, 49152, 57344, 61440, 62464, - 62528, 62544, 62552, 62550, 0, 1, 49152, 57344, - 61440, 62464, 62528, 62544, 0, 1, 49152, 57344, - 61440, 62464, 62528, 62560, 62552, 0, 1, 49152, - 57344, 61440, 62464, 62528, 62560, 62552, 0, 1, - 49152, 57344, 61440, 62464, 62528, 62560, 62552, 62554, - 0, 1, 49152, 57344, 61440, 62464, 62528, 62560, - 62552, 0, 1, 49152, 57344, 61440, 62464, 62528, - 62560, 62561, 62556, 0, 1, 49152, 57344, 61440, - 62464, 62528, 62560, 62561, 62556, 0, 1, 49152, - 57344, 61440, 62464, 62528, 62560, 62561, 62556, 62558, - 0, 1, 49152, 57344, 61440, 62464, 62528, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62560, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62560, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62560, 62562, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62560, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62560, - 62564, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62560, 62564, 0, 1, 49152, 57344, 61440, 62464, - 62592, 62560, 62568, 62566, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62560, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62560, 62568, 0, 1, 49152, - 57344, 61440, 62464, 62592, 62560, 62568, 0, 1, - 49152, 57344, 61440, 62464, 62592, 62560, 62568, 62570, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62560, - 62568, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62560, 62576, 62572, 0, 1, 49152, 57344, 61440, - 62464, 62592, 62560, 62576, 62572, 0, 1, 49152, - 57344, 61440, 62464, 62592, 62560, 62576, 62577, 62574, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62560, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62593, - 62576, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62593, 62576, 0, 1, 49152, 57344, 61440, 62464, - 62592, 62593, 62576, 62578, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62593, 62576, 0, 1, 49152, - 57344, 61440, 62464, 62592, 62593, 62576, 62580, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62593, 62576, - 62580, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62593, 62576, 62584, 62582, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62593, 62576, 0, 1, 49152, - 57344, 61440, 62464, 62592, 62593, 62576, 62584, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62593, 62595, - 62584, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62593, 62595, 62584, 62586, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62593, 62595, 62584, 0, 1, - 49152, 57344, 61440, 62464, 62592, 62593, 62595, 62584, - 62588, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62593, 62595, 62584, 62588, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62593, 62595, 62584, 62588, 62590, - 0, 1, 49152, 57344, 61440, 62464, 0, 1, - 49152, 57344, 61440, 62464, 62592, 0, 1, 49152, - 57344, 61440, 62464, 62592, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62594, 0, 1, 49152, 57344, - 61440, 62464, 62592, 0, 1, 49152, 57344, 61440, - 62464, 62592, 62596, 0, 1, 49152, 57344, 61440, - 62464, 62592, 62596, 0, 1, 49152, 57344, 61440, - 62464, 62592, 62600, 62598, 0, 1, 49152, 57344, - 61440, 62464, 62592, 0, 1, 49152, 57344, 61440, - 62464, 62592, 62600, 0, 1, 49152, 57344, 61440, - 62464, 62592, 62600, 0, 1, 49152, 57344, 61440, - 62464, 62592, 62600, 62602, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62600, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62608, 62604, 0, 1, 49152, - 57344, 61440, 62464, 62592, 62608, 62604, 0, 1, - 49152, 57344, 61440, 62464, 62592, 62608, 62609, 62606, - 0, 1, 49152, 57344, 61440, 62464, 62592, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62608, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62608, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62608, 62610, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62608, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62608, - 62612, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62608, 62612, 0, 1, 49152, 57344, 61440, 62464, - 62592, 62608, 62616, 62614, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62608, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62624, 62616, 0, 1, 49152, - 57344, 61440, 62464, 62592, 62624, 62616, 0, 1, - 49152, 57344, 61440, 62464, 62592, 62624, 62616, 62618, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62624, - 62616, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62624, 62625, 62620, 0, 1, 49152, 57344, 61440, - 62464, 62592, 62624, 62625, 62620, 0, 1, 49152, - 57344, 61440, 62464, 62592, 62624, 62625, 62620, 62622, - 0, 1, 49152, 57344, 61440, 62464, 62592, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62624, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62624, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62624, 62626, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62624, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62624, - 62628, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62624, 62628, 0, 1, 49152, 57344, 61440, 62464, - 62592, 62624, 62632, 62630, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62624, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62624, 62632, 0, 1, 49152, - 57344, 61440, 62464, 62592, 62624, 62632, 0, 1, - 49152, 57344, 61440, 62464, 62592, 62624, 62632, 62634, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62624, - 62632, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62624, 62640, 62636, 0, 1, 49152, 57344, 61440, - 62464, 62592, 62624, 62640, 62636, 0, 1, 49152, - 57344, 61440, 62464, 62592, 62624, 62640, 62641, 62638, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62624, - 0, 1, 49152, 57344, 61440, 62464, 62592, 62656, - 62640, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62656, 62640, 0, 1, 49152, 57344, 61440, 62464, - 62592, 62656, 62640, 62642, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62656, 62640, 0, 1, 49152, - 57344, 61440, 62464, 62592, 62656, 62640, 62644, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62656, 62640, - 62644, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62656, 62640, 62648, 62646, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62656, 62640, 0, 1, 49152, - 57344, 61440, 62464, 62592, 62656, 62657, 62648, 0, - 1, 49152, 57344, 61440, 62464, 62592, 62656, 62657, - 62648, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62656, 62657, 62648, 62650, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62656, 62657, 62648, 0, 1, - 49152, 57344, 61440, 62464, 62592, 62656, 62657, 62648, - 62652, 0, 1, 49152, 57344, 61440, 62464, 62592, - 62656, 62657, 62659, 62652, 0, 1, 49152, 57344, - 61440, 62464, 62592, 62656, 62657, 62659, 62652, 62654, - 0, 1, 49152, 57344, 61440, 62464, 62592, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62656, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62656, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62656, 62658, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62656, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62656, - 62660, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62656, 62660, 0, 1, 49152, 57344, 61440, 62464, - 62720, 62656, 62664, 62662, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62656, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62656, 62664, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62656, 62664, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62656, 62664, 62666, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62656, - 62664, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62656, 62672, 62668, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62656, 62672, 62668, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62656, 62672, 62673, 62670, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62656, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62656, - 62672, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62656, 62672, 0, 1, 49152, 57344, 61440, 62464, - 62720, 62656, 62672, 62674, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62656, 62672, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62656, 62672, 62676, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62656, 62672, - 62676, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62656, 62672, 62680, 62678, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62656, 62672, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62656, 62688, 62680, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62656, 62688, - 62680, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62656, 62688, 62680, 62682, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62656, 62688, 62680, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62656, 62688, 62689, - 62684, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62656, 62688, 62689, 62684, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62656, 62688, 62689, 62684, 62686, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62656, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62721, - 62688, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62721, 62688, 0, 1, 49152, 57344, 61440, 62464, - 62720, 62721, 62688, 62690, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62721, 62688, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62721, 62688, 62692, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62721, 62688, - 62692, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62721, 62688, 62696, 62694, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62721, 62688, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62721, 62688, 62696, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62721, 62688, - 62696, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62721, 62688, 62696, 62698, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62721, 62688, 62696, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62721, 62688, 62704, - 62700, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62721, 62688, 62704, 62700, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62721, 62688, 62704, 62705, 62702, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62721, - 62688, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62721, 62688, 62704, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62721, 62723, 62704, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62721, 62723, 62704, 62706, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62721, - 62723, 62704, 0, 1, 49152, 57344, 61440, 62464, - 62720, 62721, 62723, 62704, 62708, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62721, 62723, 62704, 62708, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62721, - 62723, 62704, 62712, 62710, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62721, 62723, 62704, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62721, 62723, 62704, - 62712, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62721, 62723, 62704, 62712, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62721, 62723, 62704, 62712, 62714, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62721, - 62723, 62727, 62712, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62721, 62723, 62727, 62712, 62716, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62721, 62723, - 62727, 62712, 62716, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62721, 62723, 62727, 62712, 62716, 62718, - 0, 1, 49152, 57344, 61440, 62464, 0, 1, - 49152, 57344, 61440, 62464, 62720, 0, 1, 49152, - 57344, 61440, 62464, 62720, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62722, 0, 1, 49152, 57344, - 61440, 62464, 62720, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62724, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62724, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62728, 62726, 0, 1, 49152, 57344, - 61440, 62464, 62720, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62728, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62728, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62728, 62730, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62728, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62736, 62732, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62736, 62732, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62736, 62737, 62734, - 0, 1, 49152, 57344, 61440, 62464, 62720, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62736, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62736, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62736, 62738, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62736, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62736, - 62740, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62736, 62740, 0, 1, 49152, 57344, 61440, 62464, - 62720, 62736, 62744, 62742, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62736, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62752, 62744, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62752, 62744, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62752, 62744, 62746, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62752, - 62744, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62752, 62753, 62748, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62752, 62753, 62748, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62752, 62753, 62748, 62750, - 0, 1, 49152, 57344, 61440, 62464, 62720, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62752, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62752, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62752, 62754, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62752, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62752, - 62756, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62752, 62756, 0, 1, 49152, 57344, 61440, 62464, - 62720, 62752, 62760, 62758, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62752, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62752, 62760, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62752, 62760, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62752, 62760, 62762, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62752, - 62760, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62752, 62768, 62764, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62752, 62768, 62764, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62752, 62768, 62769, 62766, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62752, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62784, - 62768, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62784, 62768, 0, 1, 49152, 57344, 61440, 62464, - 62720, 62784, 62768, 62770, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62784, 62768, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62784, 62768, 62772, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62784, 62768, - 62772, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62784, 62768, 62776, 62774, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62784, 62768, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62784, 62785, 62776, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62784, 62785, - 62776, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62784, 62785, 62776, 62778, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62784, 62785, 62776, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62784, 62785, 62776, - 62780, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62784, 62785, 62787, 62780, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62784, 62785, 62787, 62780, 62782, - 0, 1, 49152, 57344, 61440, 62464, 62720, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62784, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62784, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62784, 62786, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62784, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62784, - 62788, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62784, 62788, 0, 1, 49152, 57344, 61440, 62464, - 62720, 62784, 62792, 62790, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62784, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62784, 62792, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62784, 62792, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62784, 62792, 62794, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62784, - 62792, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62784, 62800, 62796, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62784, 62800, 62796, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62784, 62800, 62801, 62798, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62784, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62784, - 62800, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62784, 62800, 0, 1, 49152, 57344, 61440, 62464, - 62720, 62784, 62800, 62802, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62784, 62800, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62784, 62800, 62804, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62784, 62800, - 62804, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62784, 62800, 62808, 62806, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62784, 62800, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62784, 62816, 62808, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62784, 62816, - 62808, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62784, 62816, 62808, 62810, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62784, 62816, 62808, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62784, 62816, 62817, - 62812, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62784, 62816, 62817, 62812, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62784, 62816, 62817, 62812, 62814, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62784, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62848, - 62816, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62848, 62816, 0, 1, 49152, 57344, 61440, 62464, - 62720, 62848, 62816, 62818, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62848, 62816, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62848, 62816, 62820, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62848, 62816, - 62820, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62848, 62816, 62824, 62822, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62848, 62816, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62848, 62816, 62824, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62848, 62816, - 62824, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62848, 62816, 62824, 62826, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62848, 62816, 62824, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62848, 62816, 62832, - 62828, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62848, 62816, 62832, 62828, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62848, 62816, 62832, 62833, 62830, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62848, - 62816, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62848, 62849, 62832, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62848, 62849, 62832, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62848, 62849, 62832, 62834, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62848, - 62849, 62832, 0, 1, 49152, 57344, 61440, 62464, - 62720, 62848, 62849, 62832, 62836, 0, 1, 49152, - 57344, 61440, 62464, 62720, 62848, 62849, 62832, 62836, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62848, - 62849, 62832, 62840, 62838, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62848, 62849, 62832, 0, 1, - 49152, 57344, 61440, 62464, 62720, 62848, 62849, 62832, - 62840, 0, 1, 49152, 57344, 61440, 62464, 62720, - 62848, 62849, 62851, 62840, 0, 1, 49152, 57344, - 61440, 62464, 62720, 62848, 62849, 62851, 62840, 62842, - 0, 1, 49152, 57344, 61440, 62464, 62720, 62848, - 62849, 62851, 62840, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62848, 62849, 62851, 62840, 62844, 0, - 1, 49152, 57344, 61440, 62464, 62720, 62848, 62849, - 62851, 62840, 62844, 0, 1, 49152, 57344, 61440, - 62464, 62720, 62848, 62849, 62851, 62840, 62844, 62846, - 0, 1, 49152, 57344, 61440, 62464, 62720, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62848, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62848, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62848, 62850, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 62852, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62852, 0, 1, 49152, 57344, 61440, 62464, - 62976, 62848, 62856, 62854, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 62856, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62848, 62856, 0, 1, - 49152, 57344, 61440, 62464, 62976, 62848, 62856, 62858, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 62856, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62864, 62860, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62848, 62864, 62860, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62848, 62864, 62865, 62862, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 62864, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62864, 0, 1, 49152, 57344, 61440, 62464, - 62976, 62848, 62864, 62866, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 62864, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62848, 62864, 62868, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62848, 62864, - 62868, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62864, 62872, 62870, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 62864, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62848, 62880, 62872, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62848, 62880, - 62872, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62880, 62872, 62874, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 62880, 62872, 0, 1, - 49152, 57344, 61440, 62464, 62976, 62848, 62880, 62881, - 62876, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62880, 62881, 62876, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 62880, 62881, 62876, 62878, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 62880, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62880, 0, 1, 49152, 57344, 61440, 62464, - 62976, 62848, 62880, 62882, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 62880, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62848, 62880, 62884, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62848, 62880, - 62884, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62880, 62888, 62886, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 62880, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62848, 62880, 62888, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62848, 62880, - 62888, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62880, 62888, 62890, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 62880, 62888, 0, 1, - 49152, 57344, 61440, 62464, 62976, 62848, 62880, 62896, - 62892, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62880, 62896, 62892, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 62880, 62896, 62897, 62894, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 62880, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62912, 62896, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62848, 62912, 62896, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62848, 62912, 62896, 62898, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 62912, 62896, 0, 1, 49152, 57344, 61440, 62464, - 62976, 62848, 62912, 62896, 62900, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62848, 62912, 62896, 62900, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 62912, 62896, 62904, 62902, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 62912, 62896, 0, 1, - 49152, 57344, 61440, 62464, 62976, 62848, 62912, 62913, - 62904, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62848, 62912, 62913, 62904, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62848, 62912, 62913, 62904, 62906, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 62912, 62913, 62904, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62848, 62912, 62913, 62904, 62908, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62848, 62912, - 62913, 62915, 62908, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62848, 62912, 62913, 62915, 62908, 62910, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62848, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62912, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62977, 62912, 0, 1, 49152, 57344, 61440, 62464, - 62976, 62977, 62912, 62914, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62977, 62912, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62977, 62912, 62916, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62977, 62912, - 62916, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62977, 62912, 62920, 62918, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62977, 62912, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62977, 62912, 62920, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62977, 62912, - 62920, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62977, 62912, 62920, 62922, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62977, 62912, 62920, 0, 1, - 49152, 57344, 61440, 62464, 62976, 62977, 62912, 62928, - 62924, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62977, 62912, 62928, 62924, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62977, 62912, 62928, 62929, 62926, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62912, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62977, 62912, 62928, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62977, 62912, 62928, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62977, 62912, 62928, 62930, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62912, 62928, 0, 1, 49152, 57344, 61440, 62464, - 62976, 62977, 62912, 62928, 62932, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62977, 62912, 62928, 62932, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62912, 62928, 62936, 62934, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62977, 62912, 62928, 0, 1, - 49152, 57344, 61440, 62464, 62976, 62977, 62912, 62944, - 62936, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62977, 62912, 62944, 62936, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62977, 62912, 62944, 62936, 62938, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62912, 62944, 62936, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62977, 62912, 62944, 62945, 62940, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62977, 62912, - 62944, 62945, 62940, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62977, 62912, 62944, 62945, 62940, 62942, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62912, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62977, 62912, 62944, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62977, 62979, 62944, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62977, 62979, 62944, 62946, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62979, 62944, 0, 1, 49152, 57344, 61440, 62464, - 62976, 62977, 62979, 62944, 62948, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62977, 62979, 62944, 62948, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62979, 62944, 62952, 62950, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62977, 62979, 62944, 0, 1, - 49152, 57344, 61440, 62464, 62976, 62977, 62979, 62944, - 62952, 0, 1, 49152, 57344, 61440, 62464, 62976, - 62977, 62979, 62944, 62952, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62977, 62979, 62944, 62952, 62954, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62979, 62944, 62952, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62977, 62979, 62944, 62960, 62956, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62977, 62979, - 62944, 62960, 62956, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62977, 62979, 62944, 62960, 62961, 62958, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62979, 62944, 0, 1, 49152, 57344, 61440, 62464, - 62976, 62977, 62979, 62944, 62960, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62977, 62979, 62944, 62960, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62979, 62944, 62960, 62962, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62977, 62979, 62983, 62960, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62977, 62979, - 62983, 62960, 62964, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62977, 62979, 62983, 62960, 62964, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62977, 62979, - 62983, 62960, 62968, 62966, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62977, 62979, 62983, 62960, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62977, 62979, - 62983, 62960, 62968, 0, 1, 49152, 57344, 61440, - 62464, 62976, 62977, 62979, 62983, 62960, 62968, 0, - 1, 49152, 57344, 61440, 62464, 62976, 62977, 62979, - 62983, 62960, 62968, 62970, 0, 1, 49152, 57344, - 61440, 62464, 62976, 62977, 62979, 62983, 62960, 62968, - 0, 1, 49152, 57344, 61440, 62464, 62976, 62977, - 62979, 62983, 62960, 62968, 62972, 0, 1, 49152, - 57344, 61440, 62464, 62976, 62977, 62979, 62983, 62960, - 62968, 62972, 0, 1, 49152, 57344, 61440, 62464, - 62976, 62977, 62979, 62983, 62960, 62968, 62972, 62974, - 0, 1, 49152, 57344, 61440, 62464, 0, 1, - 49152, 57344, 61440, 63488, 62976, 0, 1, 49152, - 57344, 61440, 63488, 62976, 0, 1, 49152, 57344, - 61440, 63488, 62976, 62978, 0, 1, 49152, 57344, - 61440, 63488, 62976, 0, 1, 49152, 57344, 61440, - 63488, 62976, 62980, 0, 1, 49152, 57344, 61440, - 63488, 62976, 62980, 0, 1, 49152, 57344, 61440, - 63488, 62976, 62984, 62982, 0, 1, 49152, 57344, - 61440, 63488, 62976, 0, 1, 49152, 57344, 61440, - 63488, 62976, 62984, 0, 1, 49152, 57344, 61440, - 63488, 62976, 62984, 0, 1, 49152, 57344, 61440, - 63488, 62976, 62984, 62986, 0, 1, 49152, 57344, - 61440, 63488, 62976, 62984, 0, 1, 49152, 57344, - 61440, 63488, 62976, 62992, 62988, 0, 1, 49152, - 57344, 61440, 63488, 62976, 62992, 62988, 0, 1, - 49152, 57344, 61440, 63488, 62976, 62992, 62993, 62990, - 0, 1, 49152, 57344, 61440, 63488, 62976, 0, - 1, 49152, 57344, 61440, 63488, 62976, 62992, 0, - 1, 49152, 57344, 61440, 63488, 62976, 62992, 0, - 1, 49152, 57344, 61440, 63488, 62976, 62992, 62994, - 0, 1, 49152, 57344, 61440, 63488, 62976, 62992, - 0, 1, 49152, 57344, 61440, 63488, 62976, 62992, - 62996, 0, 1, 49152, 57344, 61440, 63488, 62976, - 62992, 62996, 0, 1, 49152, 57344, 61440, 63488, - 62976, 62992, 63000, 62998, 0, 1, 49152, 57344, - 61440, 63488, 62976, 62992, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63008, 63000, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63008, 63000, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63008, 63000, 63002, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63008, - 63000, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63008, 63009, 63004, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63008, 63009, 63004, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63008, 63009, 63004, 63006, - 0, 1, 49152, 57344, 61440, 63488, 62976, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63008, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63008, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63008, 63010, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63008, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63008, - 63012, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63008, 63012, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63008, 63016, 63014, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63008, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63008, 63016, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63008, 63016, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63008, 63016, 63018, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63008, - 63016, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63008, 63024, 63020, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63008, 63024, 63020, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63008, 63024, 63025, 63022, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63008, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63040, - 63024, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63040, 63024, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63040, 63024, 63026, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63040, 63024, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63040, 63024, 63028, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63040, 63024, - 63028, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63040, 63024, 63032, 63030, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63040, 63024, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63040, 63041, 63032, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63040, 63041, - 63032, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63040, 63041, 63032, 63034, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63040, 63041, 63032, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63040, 63041, 63032, - 63036, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63040, 63041, 63043, 63036, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63040, 63041, 63043, 63036, 63038, - 0, 1, 49152, 57344, 61440, 63488, 62976, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63040, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63040, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63040, 63042, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63040, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63040, - 63044, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63040, 63044, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63040, 63048, 63046, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63040, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63040, 63048, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63040, 63048, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63040, 63048, 63050, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63040, - 63048, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63040, 63056, 63052, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63040, 63056, 63052, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63040, 63056, 63057, 63054, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63040, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63040, - 63056, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63040, 63056, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63040, 63056, 63058, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63040, 63056, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63040, 63056, 63060, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63040, 63056, - 63060, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63040, 63056, 63064, 63062, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63040, 63056, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63040, 63072, 63064, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63040, 63072, - 63064, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63040, 63072, 63064, 63066, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63040, 63072, 63064, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63040, 63072, 63073, - 63068, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63040, 63072, 63073, 63068, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63040, 63072, 63073, 63068, 63070, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63040, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63072, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63072, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63104, 63072, 63074, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63072, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63072, 63076, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63104, 63072, - 63076, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63072, 63080, 63078, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63072, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63072, 63080, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63104, 63072, - 63080, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63072, 63080, 63082, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63072, 63080, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63104, 63072, 63088, - 63084, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63072, 63088, 63084, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63072, 63088, 63089, 63086, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63072, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63105, 63088, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63104, 63105, 63088, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63105, 63088, 63090, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63105, 63088, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63104, 63105, 63088, 63092, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63105, 63088, 63092, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63105, 63088, 63096, 63094, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63105, 63088, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63104, 63105, 63088, - 63096, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63105, 63107, 63096, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63105, 63107, 63096, 63098, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63105, 63107, 63096, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63104, 63105, 63107, 63096, 63100, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63104, 63105, - 63107, 63096, 63100, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63104, 63105, 63107, 63096, 63100, 63102, - 0, 1, 49152, 57344, 61440, 63488, 62976, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63104, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63104, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63104, 63106, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63108, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63108, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63104, 63112, 63110, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63112, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63112, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63104, 63112, 63114, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63112, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63120, 63116, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63104, 63120, 63116, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63120, 63121, 63118, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63120, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63120, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63104, 63120, 63122, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63120, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63120, 63124, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63104, 63120, - 63124, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63120, 63128, 63126, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63120, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63136, 63128, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63104, 63136, - 63128, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63136, 63128, 63130, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63136, 63128, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63104, 63136, 63137, - 63132, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63136, 63137, 63132, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63136, 63137, 63132, 63134, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63136, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63136, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63104, 63136, 63138, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63136, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63136, 63140, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63104, 63136, - 63140, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63136, 63144, 63142, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63136, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63136, 63144, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63104, 63136, - 63144, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63136, 63144, 63146, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63136, 63144, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63104, 63136, 63152, - 63148, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63136, 63152, 63148, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63136, 63152, 63153, 63150, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63136, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63168, 63152, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63104, 63168, 63152, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63168, 63152, 63154, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63168, 63152, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63104, 63168, 63152, 63156, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63104, 63168, 63152, 63156, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63168, 63152, 63160, 63158, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63168, 63152, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63104, 63168, 63169, - 63160, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63104, 63168, 63169, 63160, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63104, 63168, 63169, 63160, 63162, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 63168, 63169, 63160, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63104, 63168, 63169, 63160, 63164, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63104, 63168, - 63169, 63171, 63164, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63104, 63168, 63169, 63171, 63164, 63166, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63104, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63168, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63232, 63168, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63232, 63168, 63170, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63232, 63168, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63232, 63168, 63172, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63232, 63168, - 63172, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63232, 63168, 63176, 63174, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63232, 63168, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63232, 63168, 63176, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63232, 63168, - 63176, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63232, 63168, 63176, 63178, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63232, 63168, 63176, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63232, 63168, 63184, - 63180, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63232, 63168, 63184, 63180, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63232, 63168, 63184, 63185, 63182, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63168, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63232, 63168, 63184, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63232, 63168, 63184, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63232, 63168, 63184, 63186, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63168, 63184, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63232, 63168, 63184, 63188, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63232, 63168, 63184, 63188, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63168, 63184, 63192, 63190, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63232, 63168, 63184, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63232, 63168, 63200, - 63192, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63232, 63168, 63200, 63192, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63232, 63168, 63200, 63192, 63194, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63168, 63200, 63192, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63232, 63168, 63200, 63201, 63196, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63232, 63168, - 63200, 63201, 63196, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63232, 63168, 63200, 63201, 63196, 63198, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63168, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63232, 63233, 63200, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63232, 63233, 63200, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63232, 63233, 63200, 63202, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63233, 63200, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63232, 63233, 63200, 63204, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63232, 63233, 63200, 63204, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63233, 63200, 63208, 63206, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63232, 63233, 63200, 0, 1, - 49152, 57344, 61440, 63488, 62976, 63232, 63233, 63200, - 63208, 0, 1, 49152, 57344, 61440, 63488, 62976, - 63232, 63233, 63200, 63208, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63232, 63233, 63200, 63208, 63210, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63233, 63200, 63208, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63232, 63233, 63200, 63216, 63212, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63232, 63233, - 63200, 63216, 63212, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63232, 63233, 63200, 63216, 63217, 63214, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63233, 63200, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63232, 63233, 63200, 63216, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63232, 63233, 63235, 63216, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63233, 63235, 63216, 63218, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63232, 63233, 63235, 63216, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63232, 63233, - 63235, 63216, 63220, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63232, 63233, 63235, 63216, 63220, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63232, 63233, - 63235, 63216, 63224, 63222, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63232, 63233, 63235, 63216, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63232, 63233, - 63235, 63216, 63224, 0, 1, 49152, 57344, 61440, - 63488, 62976, 63232, 63233, 63235, 63216, 63224, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63232, 63233, - 63235, 63216, 63224, 63226, 0, 1, 49152, 57344, - 61440, 63488, 62976, 63232, 63233, 63235, 63239, 63224, - 0, 1, 49152, 57344, 61440, 63488, 62976, 63232, - 63233, 63235, 63239, 63224, 63228, 0, 1, 49152, - 57344, 61440, 63488, 62976, 63232, 63233, 63235, 63239, - 63224, 63228, 0, 1, 49152, 57344, 61440, 63488, - 62976, 63232, 63233, 63235, 63239, 63224, 63228, 63230, - 0, 1, 49152, 57344, 61440, 63488, 62976, 0, - 1, 49152, 57344, 61440, 63488, 62976, 63232, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63234, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63236, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63236, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63232, 63240, 63238, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63240, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63240, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63232, 63240, 63242, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63240, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63248, 63244, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63248, 63244, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63248, 63249, 63246, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63248, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63248, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63232, 63248, 63250, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63248, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63248, 63252, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63248, - 63252, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63248, 63256, 63254, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63248, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63264, 63256, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63264, - 63256, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63264, 63256, 63258, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63264, 63256, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63232, 63264, 63265, - 63260, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63264, 63265, 63260, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63264, 63265, 63260, 63262, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63264, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63264, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63232, 63264, 63266, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63264, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63264, 63268, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63264, - 63268, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63264, 63272, 63270, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63264, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63264, 63272, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63264, - 63272, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63264, 63272, 63274, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63264, 63272, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63232, 63264, 63280, - 63276, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63264, 63280, 63276, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63264, 63280, 63281, 63278, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63264, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63296, 63280, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63296, 63280, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63296, 63280, 63282, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63296, 63280, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63232, 63296, 63280, 63284, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63296, 63280, 63284, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63296, 63280, 63288, 63286, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63296, 63280, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63232, 63296, 63297, - 63288, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63296, 63297, 63288, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63296, 63297, 63288, 63290, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63296, 63297, 63288, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63296, 63297, 63288, 63292, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63296, - 63297, 63299, 63292, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63296, 63297, 63299, 63292, 63294, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63296, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63296, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63232, 63296, 63298, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63296, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63296, 63300, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63296, - 63300, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63296, 63304, 63302, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63296, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63296, 63304, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63296, - 63304, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63296, 63304, 63306, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63296, 63304, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63232, 63296, 63312, - 63308, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63296, 63312, 63308, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63296, 63312, 63313, 63310, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63296, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63296, 63312, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63296, 63312, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63296, 63312, 63314, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63296, 63312, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63232, 63296, 63312, 63316, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63296, 63312, 63316, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63296, 63312, 63320, 63318, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63296, 63312, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63232, 63296, 63328, - 63320, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63296, 63328, 63320, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63296, 63328, 63320, 63322, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63296, 63328, 63320, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63296, 63328, 63329, 63324, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63296, - 63328, 63329, 63324, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63296, 63328, 63329, 63324, 63326, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63296, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63360, 63328, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63360, 63328, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63360, 63328, 63330, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63360, 63328, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63232, 63360, 63328, 63332, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63360, 63328, 63332, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63360, 63328, 63336, 63334, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63360, 63328, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63232, 63360, 63328, - 63336, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63360, 63328, 63336, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63360, 63328, 63336, 63338, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63360, 63328, 63336, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63360, 63328, 63344, 63340, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63360, - 63328, 63344, 63340, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63360, 63328, 63344, 63345, 63342, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63360, 63328, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63232, 63360, 63361, 63344, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63360, 63361, 63344, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63360, 63361, 63344, 63346, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63360, 63361, 63344, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63360, - 63361, 63344, 63348, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63360, 63361, 63344, 63348, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63360, - 63361, 63344, 63352, 63350, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63360, 63361, 63344, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63360, - 63361, 63344, 63352, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63232, 63360, 63361, 63363, 63352, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63232, 63360, - 63361, 63363, 63352, 63354, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63232, 63360, 63361, 63363, 63352, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63360, 63361, 63363, 63352, 63356, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63232, 63360, 63361, 63363, - 63352, 63356, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63232, 63360, 63361, 63363, 63352, 63356, 63358, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63232, - 63360, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63232, 63360, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63232, 63360, 63362, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63360, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63360, 63364, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63360, - 63364, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63491, 63360, 63368, 63366, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63360, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63360, 63368, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63360, - 63368, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63491, 63360, 63368, 63370, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63360, 63368, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63491, 63360, 63376, - 63372, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63491, 63360, 63376, 63372, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63360, 63376, 63377, 63374, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63491, 63360, 63376, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63360, 63376, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63360, 63376, 63378, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 63376, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63491, 63360, 63376, 63380, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63360, 63376, 63380, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 63376, 63384, 63382, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63360, 63376, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63491, 63360, 63392, - 63384, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63491, 63360, 63392, 63384, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63360, 63392, 63384, 63386, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 63392, 63384, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63360, 63392, 63393, 63388, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63360, - 63392, 63393, 63388, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63360, 63392, 63393, 63388, 63390, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63491, 63360, 63392, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63360, 63392, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63360, 63392, 63394, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 63392, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63491, 63360, 63392, 63396, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63360, 63392, 63396, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 63392, 63400, 63398, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63360, 63392, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63491, 63360, 63392, - 63400, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63491, 63360, 63392, 63400, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63360, 63392, 63400, 63402, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 63392, 63400, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63360, 63392, 63408, 63404, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63360, - 63392, 63408, 63404, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63360, 63392, 63408, 63409, 63406, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 63392, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63491, 63360, 63424, 63408, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63360, 63424, 63408, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 63424, 63408, 63410, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63360, 63424, 63408, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63360, - 63424, 63408, 63412, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63360, 63424, 63408, 63412, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63360, - 63424, 63408, 63416, 63414, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63360, 63424, 63408, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63360, - 63424, 63425, 63416, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63360, 63424, 63425, 63416, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63360, - 63424, 63425, 63416, 63418, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63360, 63424, 63425, 63416, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 63424, 63425, 63416, 63420, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63360, 63424, 63425, - 63427, 63420, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63491, 63360, 63424, 63425, 63427, 63420, 63422, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63491, 63360, 63424, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63360, 63424, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63360, 63424, 63426, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 63424, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63491, 63360, 63424, 63428, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63360, 63424, 63428, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63360, 63424, 63432, 63430, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63495, 63424, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63491, 63495, 63424, - 63432, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63491, 63495, 63424, 63432, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63495, 63424, 63432, 63434, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63495, 63424, 63432, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63495, 63424, 63440, 63436, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63495, - 63424, 63440, 63436, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63495, 63424, 63440, 63441, 63438, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63495, 63424, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63491, 63495, 63424, 63440, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63495, 63424, 63440, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63495, 63424, 63440, 63442, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63495, 63424, 63440, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63495, - 63424, 63440, 63444, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63495, 63424, 63440, 63444, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63495, - 63424, 63440, 63448, 63446, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63495, 63424, 63440, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63495, - 63424, 63456, 63448, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63495, 63424, 63456, 63448, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63495, - 63424, 63456, 63448, 63450, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63495, 63424, 63456, 63448, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63495, 63424, 63456, 63457, 63452, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63495, 63424, 63456, - 63457, 63452, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63491, 63495, 63424, 63456, 63457, 63452, 63454, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63495, 63424, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63491, 63495, 63424, 63456, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63495, 63424, 63456, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63495, 63424, 63456, 63458, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63495, 63424, 63456, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63495, - 63424, 63456, 63460, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63495, 63424, 63456, 63460, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63495, - 63424, 63456, 63464, 63462, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63495, 63424, 63456, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63495, - 63424, 63456, 63464, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63495, 63424, 63456, 63464, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63495, - 63424, 63456, 63464, 63466, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63495, 63424, 63456, 63464, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63495, 63424, 63456, 63472, 63468, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63495, 63424, 63456, - 63472, 63468, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63491, 63495, 63424, 63456, 63472, 63473, 63470, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63495, 63503, 63456, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63495, 63503, 63456, 63472, 0, - 1, 49152, 57344, 61440, 63488, 63489, 63491, 63495, - 63503, 63456, 63472, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63495, 63503, 63456, 63472, 63474, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63495, 63503, 63456, 63472, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63495, 63503, 63456, 63472, - 63476, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63491, 63495, 63503, 63456, 63472, 63476, 0, 1, - 49152, 57344, 61440, 63488, 63489, 63491, 63495, 63503, - 63456, 63472, 63480, 63478, 0, 1, 49152, 57344, - 61440, 63488, 63489, 63491, 63495, 63503, 63456, 63472, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63495, 63503, 63456, 63472, 63480, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63495, 63503, 63456, - 63472, 63480, 0, 1, 49152, 57344, 61440, 63488, - 63489, 63491, 63495, 63503, 63456, 63472, 63480, 63482, - 0, 1, 49152, 57344, 61440, 63488, 63489, 63491, - 63495, 63503, 63456, 63472, 63480, 0, 1, 49152, - 57344, 61440, 63488, 63489, 63491, 63495, 63503, 63456, - 63472, 63480, 63484, 0, 1, 49152, 57344, 61440, - 63488, 63489, 63491, 63495, 63503, 63456, 63472, 63480, - 63484, 0, 1, 49152, 57344, 61440, 63488, 63489, - 63491, 63495, 63503, 63456, 63472, 63480, 63484, 63486, - 0, 1, 49152, 57344, 61440, 0, 1, 49152, - 57344, 61440, 63488, 0, 1, 49152, 57344, 61440, - 63488, 0, 1, 49152, 57344, 61440, 63488, 63490, - 0, 1, 49152, 57344, 61440, 63488, 0, 1, - 49152, 57344, 61440, 63488, 63492, 0, 1, 49152, - 57344, 61440, 63488, 63492, 0, 1, 49152, 57344, - 61440, 63488, 63496, 63494, 0, 1, 49152, 57344, - 61440, 63488, 0, 1, 49152, 57344, 61440, 63488, - 63496, 0, 1, 49152, 57344, 61440, 63488, 63496, - 0, 1, 49152, 57344, 61440, 63488, 63496, 63498, - 0, 1, 49152, 57344, 61440, 63488, 63496, 0, - 1, 49152, 57344, 61440, 63488, 63504, 63500, 0, - 1, 49152, 57344, 61440, 63488, 63504, 63500, 0, - 1, 49152, 57344, 61440, 63488, 63504, 63505, 63502, - 0, 1, 49152, 57344, 61440, 63488, 0, 1, - 49152, 57344, 61440, 63488, 63504, 0, 1, 49152, - 57344, 61440, 63488, 63504, 0, 1, 49152, 57344, - 61440, 63488, 63504, 63506, 0, 1, 49152, 57344, - 61440, 63488, 63504, 0, 1, 49152, 57344, 61440, - 63488, 63504, 63508, 0, 1, 49152, 57344, 61440, - 63488, 63504, 63508, 0, 1, 49152, 57344, 61440, - 63488, 63504, 63512, 63510, 0, 1, 49152, 57344, - 61440, 63488, 63504, 0, 1, 49152, 57344, 61440, - 63488, 63520, 63512, 0, 1, 49152, 57344, 61440, - 63488, 63520, 63512, 0, 1, 49152, 57344, 61440, - 63488, 63520, 63512, 63514, 0, 1, 49152, 57344, - 61440, 63488, 63520, 63512, 0, 1, 49152, 57344, - 61440, 63488, 63520, 63521, 63516, 0, 1, 49152, - 57344, 61440, 63488, 63520, 63521, 63516, 0, 1, - 49152, 57344, 61440, 63488, 63520, 63521, 63516, 63518, - 0, 1, 49152, 57344, 61440, 63488, 0, 1, - 49152, 57344, 61440, 63488, 63520, 0, 1, 49152, - 57344, 61440, 63488, 63520, 0, 1, 49152, 57344, - 61440, 63488, 63520, 63522, 0, 1, 49152, 57344, - 61440, 63488, 63520, 0, 1, 49152, 57344, 61440, - 63488, 63520, 63524, 0, 1, 49152, 57344, 61440, - 63488, 63520, 63524, 0, 1, 49152, 57344, 61440, - 63488, 63520, 63528, 63526, 0, 1, 49152, 57344, - 61440, 63488, 63520, 0, 1, 49152, 57344, 61440, - 63488, 63520, 63528, 0, 1, 49152, 57344, 61440, - 63488, 63520, 63528, 0, 1, 49152, 57344, 61440, - 63488, 63520, 63528, 63530, 0, 1, 49152, 57344, - 61440, 63488, 63520, 63528, 0, 1, 49152, 57344, - 61440, 63488, 63520, 63536, 63532, 0, 1, 49152, - 57344, 61440, 63488, 63520, 63536, 63532, 0, 1, - 49152, 57344, 61440, 63488, 63520, 63536, 63537, 63534, - 0, 1, 49152, 57344, 61440, 63488, 63520, 0, - 1, 49152, 57344, 61440, 63488, 63552, 63536, 0, - 1, 49152, 57344, 61440, 63488, 63552, 63536, 0, - 1, 49152, 57344, 61440, 63488, 63552, 63536, 63538, - 0, 1, 49152, 57344, 61440, 63488, 63552, 63536, - 0, 1, 49152, 57344, 61440, 63488, 63552, 63536, - 63540, 0, 1, 49152, 57344, 61440, 63488, 63552, - 63536, 63540, 0, 1, 49152, 57344, 61440, 63488, - 63552, 63536, 63544, 63542, 0, 1, 49152, 57344, - 61440, 63488, 63552, 63536, 0, 1, 49152, 57344, - 61440, 63488, 63552, 63553, 63544, 0, 1, 49152, - 57344, 61440, 63488, 63552, 63553, 63544, 0, 1, - 49152, 57344, 61440, 63488, 63552, 63553, 63544, 63546, - 0, 1, 49152, 57344, 61440, 63488, 63552, 63553, - 63544, 0, 1, 49152, 57344, 61440, 63488, 63552, - 63553, 63544, 63548, 0, 1, 49152, 57344, 61440, - 63488, 63552, 63553, 63555, 63548, 0, 1, 49152, - 57344, 61440, 63488, 63552, 63553, 63555, 63548, 63550, - 0, 1, 49152, 57344, 61440, 63488, 0, 1, - 49152, 57344, 61440, 63488, 63552, 0, 1, 49152, - 57344, 61440, 63488, 63552, 0, 1, 49152, 57344, - 61440, 63488, 63552, 63554, 0, 1, 49152, 57344, - 61440, 63488, 63552, 0, 1, 49152, 57344, 61440, - 63488, 63552, 63556, 0, 1, 49152, 57344, 61440, - 63488, 63552, 63556, 0, 1, 49152, 57344, 61440, - 63488, 63552, 63560, 63558, 0, 1, 49152, 57344, - 61440, 63488, 63552, 0, 1, 49152, 57344, 61440, - 63488, 63552, 63560, 0, 1, 49152, 57344, 61440, - 63488, 63552, 63560, 0, 1, 49152, 57344, 61440, - 63488, 63552, 63560, 63562, 0, 1, 49152, 57344, - 61440, 63488, 63552, 63560, 0, 1, 49152, 57344, - 61440, 63488, 63552, 63568, 63564, 0, 1, 49152, - 57344, 61440, 63488, 63552, 63568, 63564, 0, 1, - 49152, 57344, 61440, 63488, 63552, 63568, 63569, 63566, - 0, 1, 49152, 57344, 61440, 63488, 63552, 0, - 1, 49152, 57344, 61440, 63488, 63552, 63568, 0, - 1, 49152, 57344, 61440, 63488, 63552, 63568, 0, - 1, 49152, 57344, 61440, 63488, 63552, 63568, 63570, - 0, 1, 49152, 57344, 61440, 63488, 63552, 63568, - 0, 1, 49152, 57344, 61440, 63488, 63552, 63568, - 63572, 0, 1, 49152, 57344, 61440, 63488, 63552, - 63568, 63572, 0, 1, 49152, 57344, 61440, 63488, - 63552, 63568, 63576, 63574, 0, 1, 49152, 57344, - 61440, 63488, 63552, 63568, 0, 1, 49152, 57344, - 61440, 63488, 63552, 63584, 63576, 0, 1, 49152, - 57344, 61440, 63488, 63552, 63584, 63576, 0, 1, - 49152, 57344, 61440, 63488, 63552, 63584, 63576, 63578, - 0, 1, 49152, 57344, 61440, 63488, 63552, 63584, - 63576, 0, 1, 49152, 57344, 61440, 63488, 63552, - 63584, 63585, 63580, 0, 1, 49152, 57344, 61440, - 63488, 63552, 63584, 63585, 63580, 0, 1, 49152, - 57344, 61440, 63488, 63552, 63584, 63585, 63580, 63582, - 0, 1, 49152, 57344, 61440, 63488, 63552, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63584, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63584, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63584, 63586, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63584, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63584, - 63588, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63584, 63588, 0, 1, 49152, 57344, 61440, 63488, - 63616, 63584, 63592, 63590, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63584, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63584, 63592, 0, 1, 49152, - 57344, 61440, 63488, 63616, 63584, 63592, 0, 1, - 49152, 57344, 61440, 63488, 63616, 63584, 63592, 63594, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63584, - 63592, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63584, 63600, 63596, 0, 1, 49152, 57344, 61440, - 63488, 63616, 63584, 63600, 63596, 0, 1, 49152, - 57344, 61440, 63488, 63616, 63584, 63600, 63601, 63598, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63584, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63617, - 63600, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63617, 63600, 0, 1, 49152, 57344, 61440, 63488, - 63616, 63617, 63600, 63602, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63617, 63600, 0, 1, 49152, - 57344, 61440, 63488, 63616, 63617, 63600, 63604, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63617, 63600, - 63604, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63617, 63600, 63608, 63606, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63617, 63600, 0, 1, 49152, - 57344, 61440, 63488, 63616, 63617, 63600, 63608, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63617, 63619, - 63608, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63617, 63619, 63608, 63610, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63617, 63619, 63608, 0, 1, - 49152, 57344, 61440, 63488, 63616, 63617, 63619, 63608, - 63612, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63617, 63619, 63608, 63612, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63617, 63619, 63608, 63612, 63614, - 0, 1, 49152, 57344, 61440, 63488, 0, 1, - 49152, 57344, 61440, 63488, 63616, 0, 1, 49152, - 57344, 61440, 63488, 63616, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63618, 0, 1, 49152, 57344, - 61440, 63488, 63616, 0, 1, 49152, 57344, 61440, - 63488, 63616, 63620, 0, 1, 49152, 57344, 61440, - 63488, 63616, 63620, 0, 1, 49152, 57344, 61440, - 63488, 63616, 63624, 63622, 0, 1, 49152, 57344, - 61440, 63488, 63616, 0, 1, 49152, 57344, 61440, - 63488, 63616, 63624, 0, 1, 49152, 57344, 61440, - 63488, 63616, 63624, 0, 1, 49152, 57344, 61440, - 63488, 63616, 63624, 63626, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63624, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63632, 63628, 0, 1, 49152, - 57344, 61440, 63488, 63616, 63632, 63628, 0, 1, - 49152, 57344, 61440, 63488, 63616, 63632, 63633, 63630, - 0, 1, 49152, 57344, 61440, 63488, 63616, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63632, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63632, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63632, 63634, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63632, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63632, - 63636, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63632, 63636, 0, 1, 49152, 57344, 61440, 63488, - 63616, 63632, 63640, 63638, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63632, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63648, 63640, 0, 1, 49152, - 57344, 61440, 63488, 63616, 63648, 63640, 0, 1, - 49152, 57344, 61440, 63488, 63616, 63648, 63640, 63642, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63648, - 63640, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63648, 63649, 63644, 0, 1, 49152, 57344, 61440, - 63488, 63616, 63648, 63649, 63644, 0, 1, 49152, - 57344, 61440, 63488, 63616, 63648, 63649, 63644, 63646, - 0, 1, 49152, 57344, 61440, 63488, 63616, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63648, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63648, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63648, 63650, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63648, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63648, - 63652, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63648, 63652, 0, 1, 49152, 57344, 61440, 63488, - 63616, 63648, 63656, 63654, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63648, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63648, 63656, 0, 1, 49152, - 57344, 61440, 63488, 63616, 63648, 63656, 0, 1, - 49152, 57344, 61440, 63488, 63616, 63648, 63656, 63658, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63648, - 63656, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63648, 63664, 63660, 0, 1, 49152, 57344, 61440, - 63488, 63616, 63648, 63664, 63660, 0, 1, 49152, - 57344, 61440, 63488, 63616, 63648, 63664, 63665, 63662, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63648, - 0, 1, 49152, 57344, 61440, 63488, 63616, 63680, - 63664, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63680, 63664, 0, 1, 49152, 57344, 61440, 63488, - 63616, 63680, 63664, 63666, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63680, 63664, 0, 1, 49152, - 57344, 61440, 63488, 63616, 63680, 63664, 63668, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63680, 63664, - 63668, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63680, 63664, 63672, 63670, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63680, 63664, 0, 1, 49152, - 57344, 61440, 63488, 63616, 63680, 63681, 63672, 0, - 1, 49152, 57344, 61440, 63488, 63616, 63680, 63681, - 63672, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63680, 63681, 63672, 63674, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63680, 63681, 63672, 0, 1, - 49152, 57344, 61440, 63488, 63616, 63680, 63681, 63672, - 63676, 0, 1, 49152, 57344, 61440, 63488, 63616, - 63680, 63681, 63683, 63676, 0, 1, 49152, 57344, - 61440, 63488, 63616, 63680, 63681, 63683, 63676, 63678, - 0, 1, 49152, 57344, 61440, 63488, 63616, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63680, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63680, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63680, 63682, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63680, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63680, - 63684, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63680, 63684, 0, 1, 49152, 57344, 61440, 63488, - 63744, 63680, 63688, 63686, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63680, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63680, 63688, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63680, 63688, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63680, 63688, 63690, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63680, - 63688, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63680, 63696, 63692, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63680, 63696, 63692, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63680, 63696, 63697, 63694, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63680, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63680, - 63696, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63680, 63696, 0, 1, 49152, 57344, 61440, 63488, - 63744, 63680, 63696, 63698, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63680, 63696, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63680, 63696, 63700, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63680, 63696, - 63700, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63680, 63696, 63704, 63702, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63680, 63696, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63680, 63712, 63704, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63680, 63712, - 63704, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63680, 63712, 63704, 63706, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63680, 63712, 63704, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63680, 63712, 63713, - 63708, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63680, 63712, 63713, 63708, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63680, 63712, 63713, 63708, 63710, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63680, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63745, - 63712, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63745, 63712, 0, 1, 49152, 57344, 61440, 63488, - 63744, 63745, 63712, 63714, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63745, 63712, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63745, 63712, 63716, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63745, 63712, - 63716, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63745, 63712, 63720, 63718, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63745, 63712, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63745, 63712, 63720, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63745, 63712, - 63720, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63745, 63712, 63720, 63722, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63745, 63712, 63720, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63745, 63712, 63728, - 63724, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63745, 63712, 63728, 63724, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63745, 63712, 63728, 63729, 63726, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63745, - 63712, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63745, 63712, 63728, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63745, 63747, 63728, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63745, 63747, 63728, 63730, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63745, - 63747, 63728, 0, 1, 49152, 57344, 61440, 63488, - 63744, 63745, 63747, 63728, 63732, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63745, 63747, 63728, 63732, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63745, - 63747, 63728, 63736, 63734, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63745, 63747, 63728, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63745, 63747, 63728, - 63736, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63745, 63747, 63728, 63736, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63745, 63747, 63728, 63736, 63738, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63745, - 63747, 63751, 63736, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63745, 63747, 63751, 63736, 63740, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63745, 63747, - 63751, 63736, 63740, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63745, 63747, 63751, 63736, 63740, 63742, - 0, 1, 49152, 57344, 61440, 63488, 0, 1, - 49152, 57344, 61440, 63488, 63744, 0, 1, 49152, - 57344, 61440, 63488, 63744, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63746, 0, 1, 49152, 57344, - 61440, 63488, 63744, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63748, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63748, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63752, 63750, 0, 1, 49152, 57344, - 61440, 63488, 63744, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63752, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63752, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63752, 63754, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63752, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63760, 63756, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63760, 63756, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63760, 63761, 63758, - 0, 1, 49152, 57344, 61440, 63488, 63744, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63760, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63760, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63760, 63762, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63760, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63760, - 63764, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63760, 63764, 0, 1, 49152, 57344, 61440, 63488, - 63744, 63760, 63768, 63766, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63760, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63776, 63768, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63776, 63768, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63776, 63768, 63770, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63776, - 63768, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63776, 63777, 63772, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63776, 63777, 63772, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63776, 63777, 63772, 63774, - 0, 1, 49152, 57344, 61440, 63488, 63744, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63776, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63776, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63776, 63778, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63776, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63776, - 63780, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63776, 63780, 0, 1, 49152, 57344, 61440, 63488, - 63744, 63776, 63784, 63782, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63776, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63776, 63784, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63776, 63784, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63776, 63784, 63786, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63776, - 63784, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63776, 63792, 63788, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63776, 63792, 63788, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63776, 63792, 63793, 63790, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63776, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63808, - 63792, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63808, 63792, 0, 1, 49152, 57344, 61440, 63488, - 63744, 63808, 63792, 63794, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63808, 63792, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63808, 63792, 63796, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63808, 63792, - 63796, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63808, 63792, 63800, 63798, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63808, 63792, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63808, 63809, 63800, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63808, 63809, - 63800, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63808, 63809, 63800, 63802, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63808, 63809, 63800, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63808, 63809, 63800, - 63804, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63808, 63809, 63811, 63804, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63808, 63809, 63811, 63804, 63806, - 0, 1, 49152, 57344, 61440, 63488, 63744, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63808, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63808, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63808, 63810, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63808, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63808, - 63812, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63808, 63812, 0, 1, 49152, 57344, 61440, 63488, - 63744, 63808, 63816, 63814, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63808, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63808, 63816, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63808, 63816, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63808, 63816, 63818, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63808, - 63816, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63808, 63824, 63820, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63808, 63824, 63820, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63808, 63824, 63825, 63822, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63808, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63808, - 63824, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63808, 63824, 0, 1, 49152, 57344, 61440, 63488, - 63744, 63808, 63824, 63826, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63808, 63824, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63808, 63824, 63828, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63808, 63824, - 63828, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63808, 63824, 63832, 63830, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63808, 63824, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63808, 63840, 63832, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63808, 63840, - 63832, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63808, 63840, 63832, 63834, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63808, 63840, 63832, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63808, 63840, 63841, - 63836, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63808, 63840, 63841, 63836, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63808, 63840, 63841, 63836, 63838, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63808, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63872, - 63840, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63872, 63840, 0, 1, 49152, 57344, 61440, 63488, - 63744, 63872, 63840, 63842, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63872, 63840, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63872, 63840, 63844, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63872, 63840, - 63844, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63872, 63840, 63848, 63846, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63872, 63840, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63872, 63840, 63848, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63872, 63840, - 63848, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63872, 63840, 63848, 63850, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63872, 63840, 63848, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63872, 63840, 63856, - 63852, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63872, 63840, 63856, 63852, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63872, 63840, 63856, 63857, 63854, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63872, - 63840, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63872, 63873, 63856, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63872, 63873, 63856, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63872, 63873, 63856, 63858, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63872, - 63873, 63856, 0, 1, 49152, 57344, 61440, 63488, - 63744, 63872, 63873, 63856, 63860, 0, 1, 49152, - 57344, 61440, 63488, 63744, 63872, 63873, 63856, 63860, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63872, - 63873, 63856, 63864, 63862, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63872, 63873, 63856, 0, 1, - 49152, 57344, 61440, 63488, 63744, 63872, 63873, 63856, - 63864, 0, 1, 49152, 57344, 61440, 63488, 63744, - 63872, 63873, 63875, 63864, 0, 1, 49152, 57344, - 61440, 63488, 63744, 63872, 63873, 63875, 63864, 63866, - 0, 1, 49152, 57344, 61440, 63488, 63744, 63872, - 63873, 63875, 63864, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63872, 63873, 63875, 63864, 63868, 0, - 1, 49152, 57344, 61440, 63488, 63744, 63872, 63873, - 63875, 63864, 63868, 0, 1, 49152, 57344, 61440, - 63488, 63744, 63872, 63873, 63875, 63864, 63868, 63870, - 0, 1, 49152, 57344, 61440, 63488, 63744, 0, - 1, 49152, 57344, 61440, 63488, 64000, 63872, 0, - 1, 49152, 57344, 61440, 63488, 64000, 63872, 0, - 1, 49152, 57344, 61440, 63488, 64000, 63872, 63874, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 63876, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63876, 0, 1, 49152, 57344, 61440, 63488, - 64000, 63872, 63880, 63878, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 63880, 0, 1, 49152, - 57344, 61440, 63488, 64000, 63872, 63880, 0, 1, - 49152, 57344, 61440, 63488, 64000, 63872, 63880, 63882, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 63880, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63888, 63884, 0, 1, 49152, 57344, 61440, - 63488, 64000, 63872, 63888, 63884, 0, 1, 49152, - 57344, 61440, 63488, 64000, 63872, 63888, 63889, 63886, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 63888, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63888, 0, 1, 49152, 57344, 61440, 63488, - 64000, 63872, 63888, 63890, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 63888, 0, 1, 49152, - 57344, 61440, 63488, 64000, 63872, 63888, 63892, 0, - 1, 49152, 57344, 61440, 63488, 64000, 63872, 63888, - 63892, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63888, 63896, 63894, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 63888, 0, 1, 49152, - 57344, 61440, 63488, 64000, 63872, 63904, 63896, 0, - 1, 49152, 57344, 61440, 63488, 64000, 63872, 63904, - 63896, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63904, 63896, 63898, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 63904, 63896, 0, 1, - 49152, 57344, 61440, 63488, 64000, 63872, 63904, 63905, - 63900, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63904, 63905, 63900, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 63904, 63905, 63900, 63902, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 63904, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63904, 0, 1, 49152, 57344, 61440, 63488, - 64000, 63872, 63904, 63906, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 63904, 0, 1, 49152, - 57344, 61440, 63488, 64000, 63872, 63904, 63908, 0, - 1, 49152, 57344, 61440, 63488, 64000, 63872, 63904, - 63908, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63904, 63912, 63910, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 63904, 0, 1, 49152, - 57344, 61440, 63488, 64000, 63872, 63904, 63912, 0, - 1, 49152, 57344, 61440, 63488, 64000, 63872, 63904, - 63912, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63904, 63912, 63914, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 63904, 63912, 0, 1, - 49152, 57344, 61440, 63488, 64000, 63872, 63904, 63920, - 63916, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63904, 63920, 63916, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 63904, 63920, 63921, 63918, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 63904, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63936, 63920, 0, 1, 49152, 57344, 61440, - 63488, 64000, 63872, 63936, 63920, 0, 1, 49152, - 57344, 61440, 63488, 64000, 63872, 63936, 63920, 63922, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 63936, 63920, 0, 1, 49152, 57344, 61440, 63488, - 64000, 63872, 63936, 63920, 63924, 0, 1, 49152, - 57344, 61440, 63488, 64000, 63872, 63936, 63920, 63924, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 63936, 63920, 63928, 63926, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 63936, 63920, 0, 1, - 49152, 57344, 61440, 63488, 64000, 63872, 63936, 63937, - 63928, 0, 1, 49152, 57344, 61440, 63488, 64000, - 63872, 63936, 63937, 63928, 0, 1, 49152, 57344, - 61440, 63488, 64000, 63872, 63936, 63937, 63928, 63930, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 63936, 63937, 63928, 0, 1, 49152, 57344, 61440, - 63488, 64000, 63872, 63936, 63937, 63928, 63932, 0, - 1, 49152, 57344, 61440, 63488, 64000, 63872, 63936, - 63937, 63939, 63932, 0, 1, 49152, 57344, 61440, - 63488, 64000, 63872, 63936, 63937, 63939, 63932, 63934, - 0, 1, 49152, 57344, 61440, 63488, 64000, 63872, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 63936, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64001, 63936, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64001, 63936, 63938, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64001, 63936, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64001, 63936, 63940, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64001, 63936, - 63940, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64001, 63936, 63944, 63942, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64001, 63936, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64001, 63936, 63944, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64001, 63936, - 63944, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64001, 63936, 63944, 63946, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64001, 63936, 63944, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64001, 63936, 63952, - 63948, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64001, 63936, 63952, 63948, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64001, 63936, 63952, 63953, 63950, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 63936, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64001, 63936, 63952, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64001, 63936, 63952, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64001, 63936, 63952, 63954, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 63936, 63952, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64001, 63936, 63952, 63956, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64001, 63936, 63952, 63956, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 63936, 63952, 63960, 63958, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64001, 63936, 63952, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64001, 63936, 63968, - 63960, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64001, 63936, 63968, 63960, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64001, 63936, 63968, 63960, 63962, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 63936, 63968, 63960, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64001, 63936, 63968, 63969, 63964, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64001, 63936, - 63968, 63969, 63964, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64001, 63936, 63968, 63969, 63964, 63966, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 63936, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64001, 63936, 63968, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64001, 64003, 63968, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64001, 64003, 63968, 63970, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 64003, 63968, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64001, 64003, 63968, 63972, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64001, 64003, 63968, 63972, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 64003, 63968, 63976, 63974, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64001, 64003, 63968, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64001, 64003, 63968, - 63976, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64001, 64003, 63968, 63976, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64001, 64003, 63968, 63976, 63978, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 64003, 63968, 63976, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64001, 64003, 63968, 63984, 63980, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64001, 64003, - 63968, 63984, 63980, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64001, 64003, 63968, 63984, 63985, 63982, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 64003, 63968, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64001, 64003, 63968, 63984, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64001, 64003, 63968, 63984, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 64003, 63968, 63984, 63986, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64001, 64003, 64007, 63984, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64001, 64003, - 64007, 63984, 63988, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64001, 64003, 64007, 63984, 63988, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64001, 64003, - 64007, 63984, 63992, 63990, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64001, 64003, 64007, 63984, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64001, 64003, - 64007, 63984, 63992, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64001, 64003, 64007, 63984, 63992, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64001, 64003, - 64007, 63984, 63992, 63994, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64001, 64003, 64007, 63984, 63992, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64001, - 64003, 64007, 63984, 63992, 63996, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64001, 64003, 64007, 63984, - 63992, 63996, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64001, 64003, 64007, 63984, 63992, 63996, 63998, - 0, 1, 49152, 57344, 61440, 63488, 0, 1, - 49152, 57344, 61440, 63488, 64000, 0, 1, 49152, - 57344, 61440, 63488, 64000, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64002, 0, 1, 49152, 57344, - 61440, 63488, 64000, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64004, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64004, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64008, 64006, 0, 1, 49152, 57344, - 61440, 63488, 64000, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64008, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64008, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64008, 64010, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64008, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64016, 64012, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64016, 64012, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64016, 64017, 64014, - 0, 1, 49152, 57344, 61440, 63488, 64000, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64016, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64016, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64016, 64018, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64016, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64016, - 64020, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64016, 64020, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64016, 64024, 64022, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64016, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64032, 64024, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64032, 64024, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64032, 64024, 64026, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64032, - 64024, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64032, 64033, 64028, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64032, 64033, 64028, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64032, 64033, 64028, 64030, - 0, 1, 49152, 57344, 61440, 63488, 64000, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64032, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64032, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64032, 64034, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64032, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64032, - 64036, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64032, 64036, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64032, 64040, 64038, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64032, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64032, 64040, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64032, 64040, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64032, 64040, 64042, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64032, - 64040, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64032, 64048, 64044, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64032, 64048, 64044, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64032, 64048, 64049, 64046, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64032, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64064, - 64048, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64064, 64048, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64064, 64048, 64050, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64064, 64048, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64064, 64048, 64052, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64064, 64048, - 64052, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64064, 64048, 64056, 64054, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64064, 64048, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64064, 64065, 64056, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64064, 64065, - 64056, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64064, 64065, 64056, 64058, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64064, 64065, 64056, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64064, 64065, 64056, - 64060, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64064, 64065, 64067, 64060, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64064, 64065, 64067, 64060, 64062, - 0, 1, 49152, 57344, 61440, 63488, 64000, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64064, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64064, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64064, 64066, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64064, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64064, - 64068, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64064, 64068, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64064, 64072, 64070, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64064, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64064, 64072, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64064, 64072, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64064, 64072, 64074, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64064, - 64072, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64064, 64080, 64076, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64064, 64080, 64076, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64064, 64080, 64081, 64078, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64064, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64064, - 64080, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64064, 64080, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64064, 64080, 64082, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64064, 64080, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64064, 64080, 64084, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64064, 64080, - 64084, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64064, 64080, 64088, 64086, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64064, 64080, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64064, 64096, 64088, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64064, 64096, - 64088, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64064, 64096, 64088, 64090, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64064, 64096, 64088, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64064, 64096, 64097, - 64092, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64064, 64096, 64097, 64092, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64064, 64096, 64097, 64092, 64094, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64064, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64096, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64096, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64128, 64096, 64098, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64096, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64096, 64100, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64128, 64096, - 64100, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64096, 64104, 64102, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64096, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64096, 64104, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64128, 64096, - 64104, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64096, 64104, 64106, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64096, 64104, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64128, 64096, 64112, - 64108, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64096, 64112, 64108, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64096, 64112, 64113, 64110, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64096, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64129, 64112, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64128, 64129, 64112, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64129, 64112, 64114, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64129, 64112, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64128, 64129, 64112, 64116, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64129, 64112, 64116, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64129, 64112, 64120, 64118, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64129, 64112, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64128, 64129, 64112, - 64120, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64129, 64131, 64120, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64129, 64131, 64120, 64122, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64129, 64131, 64120, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64128, 64129, 64131, 64120, 64124, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64128, 64129, - 64131, 64120, 64124, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64128, 64129, 64131, 64120, 64124, 64126, - 0, 1, 49152, 57344, 61440, 63488, 64000, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64128, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64128, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64128, 64130, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64132, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64132, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64128, 64136, 64134, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64136, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64136, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64128, 64136, 64138, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64136, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64144, 64140, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64128, 64144, 64140, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64144, 64145, 64142, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64144, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64144, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64128, 64144, 64146, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64144, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64144, 64148, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64128, 64144, - 64148, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64144, 64152, 64150, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64144, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64160, 64152, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64128, 64160, - 64152, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64160, 64152, 64154, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64160, 64152, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64128, 64160, 64161, - 64156, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64160, 64161, 64156, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64160, 64161, 64156, 64158, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64160, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64160, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64128, 64160, 64162, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64160, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64160, 64164, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64128, 64160, - 64164, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64160, 64168, 64166, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64160, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64160, 64168, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64128, 64160, - 64168, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64160, 64168, 64170, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64160, 64168, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64128, 64160, 64176, - 64172, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64160, 64176, 64172, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64160, 64176, 64177, 64174, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64160, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64192, 64176, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64128, 64192, 64176, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64192, 64176, 64178, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64192, 64176, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64128, 64192, 64176, 64180, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64128, 64192, 64176, 64180, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64192, 64176, 64184, 64182, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64192, 64176, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64128, 64192, 64193, - 64184, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64128, 64192, 64193, 64184, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64128, 64192, 64193, 64184, 64186, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 64192, 64193, 64184, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64128, 64192, 64193, 64184, 64188, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64128, 64192, - 64193, 64195, 64188, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64128, 64192, 64193, 64195, 64188, 64190, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64128, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64192, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64192, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64192, 64194, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64192, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64192, 64196, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64192, - 64196, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64192, 64200, 64198, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64192, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64192, 64200, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64192, - 64200, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64192, 64200, 64202, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64192, 64200, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64192, 64208, - 64204, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64192, 64208, 64204, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64192, 64208, 64209, 64206, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64192, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64192, 64208, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64192, 64208, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64192, 64208, 64210, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64192, 64208, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64192, 64208, 64212, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64192, 64208, 64212, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64192, 64208, 64216, 64214, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64192, 64208, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64192, 64224, - 64216, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64192, 64224, 64216, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64192, 64224, 64216, 64218, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64192, 64224, 64216, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64192, 64224, 64225, 64220, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64192, - 64224, 64225, 64220, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64192, 64224, 64225, 64220, 64222, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64192, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64257, 64224, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64257, 64224, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64257, 64224, 64226, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64257, 64224, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64257, 64224, 64228, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64257, 64224, 64228, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64257, 64224, 64232, 64230, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64257, 64224, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64257, 64224, - 64232, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64257, 64224, 64232, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64257, 64224, 64232, 64234, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64257, 64224, 64232, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64257, 64224, 64240, 64236, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64257, - 64224, 64240, 64236, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64257, 64224, 64240, 64241, 64238, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64257, 64224, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64257, 64224, 64240, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64257, 64259, 64240, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64257, 64259, 64240, 64242, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64257, 64259, 64240, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64257, - 64259, 64240, 64244, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64257, 64259, 64240, 64244, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64257, - 64259, 64240, 64248, 64246, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64257, 64259, 64240, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64257, - 64259, 64240, 64248, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64257, 64259, 64240, 64248, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64257, - 64259, 64240, 64248, 64250, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64257, 64259, 64263, 64248, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64257, 64259, 64263, 64248, 64252, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64257, 64259, 64263, - 64248, 64252, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64257, 64259, 64263, 64248, 64252, 64254, - 0, 1, 49152, 57344, 61440, 63488, 64000, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64258, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64260, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64260, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64264, 64262, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64264, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64264, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64264, 64266, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64264, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64272, 64268, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64272, 64268, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64272, 64273, 64270, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64272, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64272, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64272, 64274, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64272, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64272, 64276, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64272, - 64276, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64272, 64280, 64278, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64272, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64288, 64280, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64288, - 64280, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64288, 64280, 64282, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64288, 64280, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64288, 64289, - 64284, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64288, 64289, 64284, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64288, 64289, 64284, 64286, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64288, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64288, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64288, 64290, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64288, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64288, 64292, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64288, - 64292, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64288, 64296, 64294, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64288, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64288, 64296, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64288, - 64296, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64288, 64296, 64298, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64288, 64296, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64288, 64304, - 64300, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64288, 64304, 64300, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64288, 64304, 64305, 64302, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64288, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64320, 64304, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64320, 64304, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64320, 64304, 64306, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64320, 64304, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64320, 64304, 64308, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64320, 64304, 64308, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64320, 64304, 64312, 64310, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64320, 64304, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64320, 64321, - 64312, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64320, 64321, 64312, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64320, 64321, 64312, 64314, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64320, 64321, 64312, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64320, 64321, 64312, 64316, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64320, - 64321, 64323, 64316, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64320, 64321, 64323, 64316, 64318, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64320, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64320, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64320, 64322, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64320, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64320, 64324, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64320, - 64324, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64320, 64328, 64326, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64320, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64320, 64328, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64320, - 64328, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64320, 64328, 64330, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64320, 64328, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64320, 64336, - 64332, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64320, 64336, 64332, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64320, 64336, 64337, 64334, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64320, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64320, 64336, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64320, 64336, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64320, 64336, 64338, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64320, 64336, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64320, 64336, 64340, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64320, 64336, 64340, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64320, 64336, 64344, 64342, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64320, 64336, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64320, 64352, - 64344, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64320, 64352, 64344, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64320, 64352, 64344, 64346, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64320, 64352, 64344, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64320, 64352, 64353, 64348, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64320, - 64352, 64353, 64348, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64320, 64352, 64353, 64348, 64350, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64320, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64352, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64352, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64352, 64354, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64352, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64352, 64356, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64352, 64356, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64352, 64360, 64358, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64352, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64384, 64352, - 64360, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64352, 64360, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64352, 64360, 64362, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64352, 64360, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64352, 64368, 64364, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64352, 64368, 64364, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64352, 64368, 64369, 64366, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64352, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64385, 64368, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64385, 64368, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64385, 64368, 64370, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64385, 64368, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64385, 64368, 64372, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64385, 64368, 64372, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64385, 64368, 64376, 64374, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64385, 64368, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64385, 64368, 64376, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64385, 64387, 64376, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64385, 64387, 64376, 64378, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64385, 64387, 64376, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64385, 64387, 64376, 64380, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64385, 64387, - 64376, 64380, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64385, 64387, 64376, 64380, 64382, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64386, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64388, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64388, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64392, 64390, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64392, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64392, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64392, 64394, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64392, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64384, 64400, - 64396, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64400, 64396, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64400, 64401, 64398, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64400, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64400, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64400, 64402, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64400, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64400, 64404, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64400, 64404, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64400, 64408, 64406, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64400, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64384, 64416, - 64408, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64416, 64408, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64416, 64408, 64410, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64416, 64408, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64416, 64417, 64412, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64416, 64417, 64412, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64416, 64417, 64412, 64414, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64416, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64416, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64416, 64418, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64416, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64416, 64420, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64416, 64420, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64416, 64424, 64422, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64416, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64384, 64416, - 64424, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64416, 64424, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64416, 64424, 64426, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64416, 64424, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64416, 64432, 64428, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64416, 64432, 64428, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64416, 64432, 64433, 64430, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64416, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64448, 64432, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64448, 64432, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64432, 64434, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64432, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64432, 64436, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 64432, 64436, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64432, 64440, 64438, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64432, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64449, 64440, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 64449, 64440, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64449, 64440, 64442, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64449, 64440, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64449, 64440, 64444, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64448, 64449, - 64451, 64444, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64448, 64449, 64451, 64444, 64446, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64448, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64448, 64450, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64448, 64452, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64448, 64452, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64456, 64454, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64384, 64448, - 64456, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64448, 64456, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64456, 64458, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64456, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 64464, 64460, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64464, 64460, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 64464, 64465, 64462, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64448, 64464, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64448, 64464, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64464, 64466, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64464, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64464, 64468, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 64464, 64468, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64464, 64472, 64470, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64464, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64480, 64472, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 64480, 64472, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64480, 64472, 64474, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64480, 64472, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64480, 64481, 64476, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64448, 64480, - 64481, 64476, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64448, 64480, 64481, 64476, 64478, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64448, 64480, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64448, 64480, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64480, 64482, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64480, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64480, 64484, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 64480, 64484, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64480, 64488, 64486, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64480, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64480, 64488, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 64480, 64488, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64480, 64488, 64490, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64480, 64488, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64480, 64496, 64492, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64448, 64480, - 64496, 64492, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64448, 64480, 64496, 64497, 64494, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64480, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 64480, 64496, 0, - 1, 49152, 57344, 61440, 63488, 64000, 64256, 64384, - 64448, 64480, 64496, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 64480, 64496, 64498, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64480, 64496, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64480, 64496, - 64500, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64448, 64480, 64496, 64500, 0, 1, - 49152, 57344, 61440, 63488, 64000, 64256, 64384, 64448, - 64480, 64496, 64504, 64502, 0, 1, 49152, 57344, - 61440, 63488, 64000, 64256, 64384, 64448, 64480, 64496, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64480, 64496, 64504, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64448, 64480, - 64496, 64504, 0, 1, 49152, 57344, 61440, 63488, - 64000, 64256, 64384, 64448, 64480, 64496, 64504, 64506, - 0, 1, 49152, 57344, 61440, 63488, 64000, 64256, - 64384, 64448, 64480, 64496, 64504, 0, 1, 49152, - 57344, 61440, 63488, 64000, 64256, 64384, 64448, 64480, - 64496, 64504, 64508, 0, 1, 49152, 57344, 61440, - 63488, 64000, 64256, 64384, 64448, 64480, 64496, 64504, - 64508, 0, 1, 49152, 57344, 61440, 63488, 64000, - 64256, 64384, 64448, 64480, 64496, 64504, 64508, 64510, - 0, 1, 3, 7, 15, 31, 0, 1, - 3, 7, 15, 31, 63, 0, 1, 3, - 7, 15, 31, 63, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 4095, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 2047, 4095, 8191, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 8191, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 8191, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 8191, 16383, - 0, 1, 3, 7, 15, 31, 63, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 4095, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 2047, 4095, 8191, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 8191, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 8191, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 8191, 16383, - 0, 1, 3, 7, 15, 31, 63, 127, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 4095, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 2047, 4095, 8191, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 8191, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 8191, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 8191, 16383, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 4095, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 2047, 4095, 8191, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 8191, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 8191, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 8191, 16383, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 4095, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 2047, 4095, 8191, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 8191, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 8191, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 8191, 16383, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 4095, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 2047, 4095, 8191, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 8191, 0, 1, 3, 7, 15, - 31, 63, 127, 255, 511, 1023, 2047, 4095, - 8191, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 8191, 16383, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 4095, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 0, 1, - 3, 7, 15, 31, 63, 127, 255, 511, - 1023, 2047, 4095, 8191, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 4095, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 8191, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 8191, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 8191, 16383, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 4095, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 8191, 0, - 1, 3, 7, 15, 31, 63, 127, 255, - 511, 1023, 2047, 4095, 8191, 0, 1, 3, - 7, 15, 31, 63, 127, 255, 511, 1023, - 2047, 4095, 8191, 16383, 0, 1, 3, 7, - 15, 31, 63, 127, 255, 511, 1023, 2047, - 4095, 8191, 0, 1, 3, 7, 15, 31, - 63, 127, 255, 511, 1023, 2047, 4095, 8191, - 16383, 0, 1, 3, 7, 15, 31, 63, - 127, 255, 511, 1023, 2047, 4095, 8191, 16383, - 0, 1, 3, 7, 15, 31, 63, 127, - 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, -}; - - diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThread.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThread.cpp deleted file mode 100644 index 359c7d1..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThread.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Thread -- dummy implementation for -// platforms that do not support threading -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.h" - -//#if !defined (_WIN32) &&!(_WIN64) && !(HAVE_PTHREAD) - -#include "IlmThread.h" -#include "Iex.h" - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER - - -bool -supportsThreads () -{ - return false; -} - - -Thread::Thread () -{ - throw IEX_NAMESPACE::NoImplExc ("Threads not supported on this platform."); -} - - -Thread::~Thread () -{ - throw IEX_NAMESPACE::NoImplExc ("Threads not supported on this platform."); -} - - -void -Thread::start () -{ - throw IEX_NAMESPACE::NoImplExc ("Threads not supported on this platform."); -} - - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT - -//#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThread.h b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThread.h deleted file mode 100644 index 1f6d9e6..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThread.h +++ /dev/null @@ -1,143 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_ILM_THREAD_H -#define INCLUDED_ILM_THREAD_H - -//----------------------------------------------------------------------------- -// -// class Thread -// -// Class Thread is a portable interface to a system-dependent thread -// primitive. In order to make a thread actually do something useful, -// you must derive a subclass from class Thread and implement the -// run() function. If the operating system supports threading then -// the run() function will be executed int a new thread. -// -// The actual creation of the thread is done by the start() routine -// which then calls the run() function. In general the start() -// routine should be called from the constructor of the derived class. -// -// The base-class thread destructor will join/destroy the thread. -// -// IMPORTANT: Due to the mechanisms that encapsulate the low-level -// threading primitives in a C++ class there is a race condition -// with code resembling the following: -// -// { -// WorkerThread myThread; -// } // myThread goes out of scope, is destroyed -// // and the thread is joined -// -// The race is between the parent thread joining the child thread -// in the destructor of myThread, and the run() function in the -// child thread. If the destructor gets executed first then run() -// will be called with an invalid "this" pointer. -// -// This issue can be fixed by using a Semaphore to keep track of -// whether the run() function has already been called. You can -// include a Semaphore member variable within your derived class -// which you post() on in the run() function, and wait() on in the -// destructor before the thread is joined. Alternatively you could -// do something like this: -// -// Semaphore runStarted; -// -// void WorkerThread::run () -// { -// runStarted.post() -// // do some work -// ... -// } -// -// { -// WorkerThread myThread; -// runStarted.wait (); // ensure that we have started -// // the run function -// } // myThread goes out of scope, is destroyed -// // and the thread is joined -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.h" -#include "IlmThreadExport.h" -#include "IlmThreadNamespace.h" - -#if defined _WIN32 || defined _WIN64 - #ifdef NOMINMAX - #undef NOMINMAX - #endif - #define NOMINMAX - #include - #include -#elif HAVE_PTHREAD - #include -#endif - -ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER - -// -// Query function to determine if the current platform supports -// threads AND this library was compiled with threading enabled. -// - -ILMTHREAD_EXPORT bool supportsThreads (); - - -class ILMTHREAD_EXPORT Thread -{ - public: - - Thread (); - virtual ~Thread (); - - void start (); - virtual void run () = 0; - - private: - - #if defined _WIN32 || defined _WIN64 - HANDLE _thread; - #elif HAVE_PTHREAD - pthread_t _thread; - #endif - - void operator = (const Thread& t); // not implemented - Thread (const Thread& t); // not implemented -}; - - -ILMTHREAD_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_ILM_THREAD_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadExport.h b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadExport.h deleted file mode 100644 index 96d2200..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadExport.h +++ /dev/null @@ -1,46 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#if defined(OPENEXR_DLL) - #if defined(ILMTHREAD_EXPORTS) - #define ILMTHREAD_EXPORT __declspec(dllexport) - #define ILMTHREAD_EXPORT_CONST extern __declspec(dllexport) - #else - #define ILMTHREAD_EXPORT __declspec(dllimport) - #define ILMTHREAD_EXPORT_CONST extern __declspec(dllimport) - #endif -#else - #define ILMTHREAD_EXPORT - #define ILMTHREAD_EXPORT_CONST extern const -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadForward.h b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadForward.h deleted file mode 100644 index b52bdac..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadForward.h +++ /dev/null @@ -1,52 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_ILMTHREADFORWARD_H -#define INCLUDED_ILMTHREADFORWARD_H - -#include "IlmThreadNamespace.h" - -ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER - -class Thread; -class Mutex; -class Lock; -class ThreadPool; -class Task; -class TaskGroup; -class Semaphore; - -ILMTHREAD_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_ILMTHREADFORWARD_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutex.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutex.cpp deleted file mode 100644 index 613d65a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutex.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Mutex, class Lock -- dummy implementation -// for platforms that do not support threading -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.h" - -//#if !defined (_WIN32) && !(_WIN64) && !(HAVE_PTHREAD) - -#include "IlmThreadMutex.h" - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER - - -Mutex::Mutex () {} -Mutex::~Mutex () {} -void Mutex::lock () const {} -void Mutex::unlock () const {} - - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT - -//#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutex.h b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutex.h deleted file mode 100644 index dd42067..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutex.h +++ /dev/null @@ -1,160 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_ILM_THREAD_MUTEX_H -#define INCLUDED_ILM_THREAD_MUTEX_H - -//----------------------------------------------------------------------------- -// -// class Mutex, class Lock -// -// Class Mutex is a wrapper for a system-dependent mutual exclusion -// mechanism. Actual locking and unlocking of a Mutex object must -// be performed using an instance of a Lock (defined below). -// -// Class lock provides safe locking and unlocking of mutexes even in -// the presence of C++ exceptions. Constructing a Lock object locks -// the mutex; destroying the Lock unlocks the mutex. -// -// Lock objects are not themselves thread-safe. You should never -// share a Lock object among multiple threads. -// -// Typical usage: -// -// Mutex mtx; // Create a Mutex object that is visible -// //to multiple threads -// -// ... // create some threads -// -// // Then, within each thread, construct a critical section like so: -// -// { -// Lock lock (mtx); // Lock constructor locks the mutex -// ... // do some computation on shared data -// } // leaving the block unlocks the mutex -// -//----------------------------------------------------------------------------- - -#include "IlmThreadExport.h" -#include "IlmBaseConfig.h" -#include "IlmThreadNamespace.h" - -#if defined _WIN32 || defined _WIN64 - #ifdef NOMINMAX - #undef NOMINMAX - #endif - #define NOMINMAX - #include -#elif HAVE_PTHREAD - #include -#endif - -ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER - -class Lock; - - -class ILMTHREAD_EXPORT Mutex -{ - public: - - Mutex (); - virtual ~Mutex (); - - private: - - void lock () const; - void unlock () const; - - #if defined _WIN32 || defined _WIN64 - mutable CRITICAL_SECTION _mutex; - #elif HAVE_PTHREAD - mutable pthread_mutex_t _mutex; - #endif - - void operator = (const Mutex& M); // not implemented - Mutex (const Mutex& M); // not implemented - - friend class Lock; -}; - - -class ILMTHREAD_EXPORT Lock -{ - public: - - Lock (const Mutex& m, bool autoLock = true): - _mutex (m), - _locked (false) - { - if (autoLock) - { - _mutex.lock(); - _locked = true; - } - } - - ~Lock () - { - if (_locked) - _mutex.unlock(); - } - - void acquire () - { - _mutex.lock(); - _locked = true; - } - - void release () - { - _mutex.unlock(); - _locked = false; - } - - bool locked () - { - return _locked; - } - - private: - - const Mutex & _mutex; - bool _locked; -}; - - -ILMTHREAD_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_ILM_THREAD_MUTEX_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp deleted file mode 100644 index c123132..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Mutex -- implementation for -// platforms that support Posix threads -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.h" - -#if HAVE_PTHREAD - -#include "IlmThreadMutex.h" -#include "Iex.h" -#include - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER - - -Mutex::Mutex () -{ - if (int error = ::pthread_mutex_init (&_mutex, 0)) - IEX_INTERNAL_NAMESPACE::throwErrnoExc ("Cannot initialize mutex (%T).", error); -} - - -Mutex::~Mutex () -{ - int error = ::pthread_mutex_destroy (&_mutex); - assert (error == 0); -} - - -void -Mutex::lock () const -{ - if (int error = ::pthread_mutex_lock (&_mutex)) - IEX_INTERNAL_NAMESPACE::throwErrnoExc ("Cannot lock mutex (%T).", error); -} - - -void -Mutex::unlock () const -{ - if (int error = ::pthread_mutex_unlock (&_mutex)) - IEX_INTERNAL_NAMESPACE::throwErrnoExc ("Cannot unlock mutex (%T).", error); -} - - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutexWin32.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutexWin32.cpp deleted file mode 100644 index a68d653..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutexWin32.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Mutex -- implementation for Windows -// -//----------------------------------------------------------------------------- - -#include "IlmThreadMutex.h" -#include "Iex.h" - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER - - -Mutex::Mutex () -{ - ::InitializeCriticalSection (&_mutex); -} - - -Mutex::~Mutex () -{ - ::DeleteCriticalSection (&_mutex); -} - - -void -Mutex::lock () const -{ - ::EnterCriticalSection (&_mutex); -} - - -void -Mutex::unlock () const -{ - ::LeaveCriticalSection (&_mutex); -} - - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadNamespace.h b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadNamespace.h deleted file mode 100644 index a412997..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadNamespace.h +++ /dev/null @@ -1,114 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_ILMTHREADNAMESPACE_H -#define INCLUDED_ILMTHREADNAMESPACE_H - -// -// The purpose of this file is to make it possible to specify an -// ILMTHREAD_INTERNAL_NAMESPACE as a preprocessor definition and have all of -// the IlmThread symbols defined within that namespace rather than the -// standard IlmThread namespace. Those symbols are made available to client -// code through the ILMTHREAD_NAMESPACE in addition to the -// ILMTHREAD_INTERNAL_NAMESPACE. -// -// To ensure source code compatibility, the ILMTHREAD_NAMESPACE defaults to -// IlmThread and then "using namespace ILMTHREAD_INTERNAL_NAMESPACE;" brings -// all of the declarations from the ILMTHREAD_INTERNAL_NAMESPACE into the -// ILMTHREAD_NAMESPACE. This means that client code can continue to use -// syntax like IlmThread::Thread, but at link time it will resolve to a -// mangled symbol based on the ILMTHREAD_INTERNAL_NAMESPACE. -// -// As an example, if one needed to build against a newer version of IlmThread -// and have it run alongside an older version in the same application, it is -// now possible to use an internal namespace to prevent collisions between -// the older versions of IlmThread symbols and the newer ones. To do this, -// the following could be defined at build time: -// -// ILMTHREAD_INTERNAL_NAMESPACE = IlmThread_v2 -// -// This means that declarations inside IlmThread headers look like this -// (after the preprocessor has done its work): -// -// namespace IlmThread_v2 { -// ... -// class declarations -// ... -// } -// -// namespace IlmThread { -// using namespace IlmThread_v2; -// } -// - -// -// Open Source version of this file pulls in the IlmBaseConfig.h file -// for the configure time options. -// -#include "IlmBaseConfig.h" - -#ifndef ILMTHREAD_NAMESPACE -#define ILMTHREAD_NAMESPACE IlmThread -#endif - -#ifndef ILMTHREAD_INTERNAL_NAMESPACE -#define ILMTHREAD_INTERNAL_NAMESPACE ILMTHREAD_NAMESPACE -#endif - -// -// We need to be sure that we import the internal namespace into the public one. -// To do this, we use the small bit of code below which initially defines -// ILMTHREAD_INTERNAL_NAMESPACE (so it can be referenced) and then defines -// ILMTHREAD_NAMESPACE and pulls the internal symbols into the public -// namespace. -// - -namespace ILMTHREAD_INTERNAL_NAMESPACE {} -namespace ILMTHREAD_NAMESPACE { - using namespace ILMTHREAD_INTERNAL_NAMESPACE; -} - -// -// There are identical pairs of HEADER/SOURCE ENTER/EXIT macros so that -// future extension to the namespace mechanism is possible without changing -// project source code. -// - -#define ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER namespace ILMTHREAD_INTERNAL_NAMESPACE { -#define ILMTHREAD_INTERNAL_NAMESPACE_HEADER_EXIT } - -#define ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER namespace ILMTHREAD_INTERNAL_NAMESPACE { -#define ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT } - -#endif // INCLUDED_ILMTHREADNAMESPACE_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPool.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPool.cpp deleted file mode 100644 index 0a889f8..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPool.cpp +++ /dev/null @@ -1,483 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Task, class ThreadPool, class TaskGroup -// -//----------------------------------------------------------------------------- - -#include "IlmThread.h" -#include "IlmThreadMutex.h" -#include "IlmThreadSemaphore.h" -#include "IlmThreadPool.h" -#include "Iex.h" -#include - -using namespace std; - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER -namespace { - -class WorkerThread: public Thread -{ - public: - - WorkerThread (ThreadPool::Data* data); - - virtual void run (); - - private: - - ThreadPool::Data * _data; -}; - -} //namespace - - -struct TaskGroup::Data -{ - Data (); - ~Data (); - - void addTask () ; - void removeTask (); - - Semaphore isEmpty; // used to signal that the taskgroup is empty - int numPending; // number of pending tasks to still execute - Mutex dtorMutex; // used to work around the glibc bug: - // http://sources.redhat.com/bugzilla/show_bug.cgi?id=12674 -}; - - -struct ThreadPool::Data -{ - Data (); - ~Data(); - - void finish (); - bool stopped () const; - void stop (); - - Semaphore taskSemaphore; // threads wait on this for ready tasks - Mutex taskMutex; // mutual exclusion for the tasks list - list tasks; // the list of tasks to execute - size_t numTasks; // fast access to list size - // (list::size() can be O(n)) - - Semaphore threadSemaphore; // signaled when a thread starts executing - Mutex threadMutex; // mutual exclusion for threads list - list threads; // the list of all threads - size_t numThreads; // fast access to list size - - bool stopping; // flag indicating whether to stop threads - Mutex stopMutex; // mutual exclusion for stopping flag -}; - - - -// -// class WorkerThread -// - -WorkerThread::WorkerThread (ThreadPool::Data* data): - _data (data) -{ - start(); -} - - -void -WorkerThread::run () -{ - // - // Signal that the thread has started executing - // - - _data->threadSemaphore.post(); - - while (true) - { - // - // Wait for a task to become available - // - - _data->taskSemaphore.wait(); - - { - Lock taskLock (_data->taskMutex); - - // - // If there is a task pending, pop off the next task in the FIFO - // - - if (_data->numTasks > 0) - { - Task* task = _data->tasks.front(); - TaskGroup* taskGroup = task->group(); - _data->tasks.pop_front(); - _data->numTasks--; - - taskLock.release(); - task->execute(); - taskLock.acquire(); - - delete task; - taskGroup->_data->removeTask(); - } - else if (_data->stopped()) - { - break; - } - } - } -} - - -// -// struct TaskGroup::Data -// - -TaskGroup::Data::Data (): isEmpty (1), numPending (0) -{ - // empty -} - - -TaskGroup::Data::~Data () -{ - // - // A TaskGroup acts like an "inverted" semaphore: if the count - // is above 0 then waiting on the taskgroup will block. This - // destructor waits until the taskgroup is empty before returning. - // - - isEmpty.wait (); - - // Alas, given the current bug in glibc we need a secondary - // syncronisation primitive here to account for the fact that - // destructing the isEmpty Semaphore in this thread can cause - // an error for a separate thread that is issuing the post() call. - // We are entitled to destruct the semaphore at this point, however, - // that post() call attempts to access data out of the associated - // memory *after* it has woken the waiting threads, including this one, - // potentially leading to invalid memory reads. - // http://sources.redhat.com/bugzilla/show_bug.cgi?id=12674 - - Lock lock (dtorMutex); -} - - -void -TaskGroup::Data::addTask () -{ - // - // Any access to the taskgroup is protected by a mutex that is - // held by the threadpool. Therefore it is safe to access - // numPending before we wait on the semaphore. - // - - if (numPending++ == 0) - isEmpty.wait (); -} - - -void -TaskGroup::Data::removeTask () -{ - // Alas, given the current bug in glibc we need a secondary - // syncronisation primitive here to account for the fact that - // destructing the isEmpty Semaphore in a separate thread can - // cause an error. Issuing the post call here the current libc - // implementation attempts to access memory *after* it has woken - // waiting threads. - // Since other threads are entitled to delete the semaphore the - // access to the memory location can be invalid. - // http://sources.redhat.com/bugzilla/show_bug.cgi?id=12674 - - if (--numPending == 0) - { - Lock lock (dtorMutex); - isEmpty.post (); - } -} - - -// -// struct ThreadPool::Data -// - -ThreadPool::Data::Data (): numTasks (0), numThreads (0), stopping (false) -{ - // empty -} - - -ThreadPool::Data::~Data() -{ - Lock lock (threadMutex); - finish (); -} - - -void -ThreadPool::Data::finish () -{ - stop(); - - // - // Signal enough times to allow all threads to stop. - // - // Wait until all threads have started their run functions. - // If we do not wait before we destroy the threads then it's - // possible that the threads have not yet called their run - // functions. - // If this happens then the run function will be called off - // of an invalid object and we will crash, most likely with - // an error like: "pure virtual method called" - // - - for (size_t i = 0; i < numThreads; i++) - { - taskSemaphore.post(); - threadSemaphore.wait(); - } - - // - // Join all the threads - // - - for (list::iterator i = threads.begin(); - i != threads.end(); - ++i) - { - delete (*i); - } - - Lock lock1 (taskMutex); - Lock lock2 (stopMutex); - threads.clear(); - tasks.clear(); - numThreads = 0; - numTasks = 0; - stopping = false; -} - - -bool -ThreadPool::Data::stopped () const -{ - Lock lock (stopMutex); - return stopping; -} - - -void -ThreadPool::Data::stop () -{ - Lock lock (stopMutex); - stopping = true; -} - - -// -// class Task -// - -Task::Task (TaskGroup* g): _group(g) -{ - // empty -} - - -Task::~Task() -{ - // empty -} - - -TaskGroup* -Task::group () -{ - return _group; -} - - -TaskGroup::TaskGroup (): - _data (new Data()) -{ - // empty -} - - -TaskGroup::~TaskGroup () -{ - delete _data; -} - - -// -// class ThreadPool -// - -ThreadPool::ThreadPool (unsigned nthreads): - _data (new Data()) -{ - setNumThreads (nthreads); -} - - -ThreadPool::~ThreadPool () -{ - delete _data; -} - - -int -ThreadPool::numThreads () const -{ - Lock lock (_data->threadMutex); - return _data->numThreads; -} - - -void -ThreadPool::setNumThreads (int count) -{ - if (count < 0) - throw IEX_INTERNAL_NAMESPACE::ArgExc ("Attempt to set the number of threads " - "in a thread pool to a negative value."); - - // - // Lock access to thread list and size - // - - Lock lock (_data->threadMutex); - - if ((size_t)count > _data->numThreads) - { - // - // Add more threads - // - - while (_data->numThreads < (size_t)count) - { - _data->threads.push_back (new WorkerThread (_data)); - _data->numThreads++; - } - } - else if ((size_t)count < _data->numThreads) - { - // - // Wait until all existing threads are finished processing, - // then delete all threads. - // - - _data->finish (); - - // - // Add in new threads - // - - while (_data->numThreads < (size_t)count) - { - _data->threads.push_back (new WorkerThread (_data)); - _data->numThreads++; - } - } -} - - -void -ThreadPool::addTask (Task* task) -{ - // - // Lock the threads, needed to access numThreads - // - - Lock lock (_data->threadMutex); - - if (_data->numThreads == 0) - { - task->execute (); - delete task; - } - else - { - // - // Get exclusive access to the tasks queue - // - - { - Lock taskLock (_data->taskMutex); - - // - // Push the new task into the FIFO - // - - _data->tasks.push_back (task); - _data->numTasks++; - task->group()->_data->addTask(); - } - - // - // Signal that we have a new task to process - // - - _data->taskSemaphore.post (); - } -} - - -ThreadPool& -ThreadPool::globalThreadPool () -{ - // - // The global thread pool - // - - static ThreadPool gThreadPool (0); - - return gThreadPool; -} - - -void -ThreadPool::addGlobalTask (Task* task) -{ - globalThreadPool().addTask (task); -} - - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPool.h b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPool.h deleted file mode 100644 index d436d4e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPool.h +++ /dev/null @@ -1,160 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_ILM_THREAD_POOL_H -#define INCLUDED_ILM_THREAD_POOL_H - - -//----------------------------------------------------------------------------- -// -// class Task, class ThreadPool, class TaskGroup -// -// Class ThreadPool manages a set of worker threads and accepts -// tasks for processing. Tasks added to the thread pool are -// executed concurrently by the worker threads. -// -// Class Task provides an abstract interface for a task which -// a ThreadPool works on. Derived classes need to implement the -// execute() function which performs the actual task. -// -// Class TaskGroup allows synchronization on the completion of a set -// of tasks. Every task that is added to a ThreadPool belongs to a -// single TaskGroup. The destructor of the TaskGroup waits for all -// tasks in the group to finish. -// -// Note: if you plan to use the ThreadPool interface in your own -// applications note that the implementation of the ThreadPool calls -// operator delete on tasks as they complete. If you define a custom -// operator new for your tasks, for instance to use a custom heap, -// then you must also write an appropriate operator delete. -// -//----------------------------------------------------------------------------- - -#include "IlmThreadNamespace.h" -#include "IlmThreadExport.h" - -ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER - -class TaskGroup; -class Task; - - -class ILMTHREAD_EXPORT ThreadPool -{ - public: - - //------------------------------------------------------- - // Constructor -- creates numThreads worker threads which - // wait until a task is available. - //------------------------------------------------------- - - ThreadPool (unsigned numThreads = 0); - - - //----------------------------------------------------------- - // Destructor -- waits for all tasks to complete, joins all - // the threads to the calling thread, and then destroys them. - //----------------------------------------------------------- - - virtual ~ThreadPool (); - - - //-------------------------------------------------------- - // Query and set the number of worker threads in the pool. - // - // Warning: never call setNumThreads from within a worker - // thread as this will almost certainly cause a deadlock - // or crash. - //-------------------------------------------------------- - - int numThreads () const; - void setNumThreads (int count); - - - //------------------------------------------------------------ - // Add a task for processing. The ThreadPool can handle any - // number of tasks regardless of the number of worker threads. - // The tasks are first added onto a queue, and are executed - // by threads as they become available, in FIFO order. - //------------------------------------------------------------ - - void addTask (Task* task); - - - //------------------------------------------- - // Access functions for the global threadpool - //------------------------------------------- - - static ThreadPool& globalThreadPool (); - static void addGlobalTask (Task* task); - - struct Data; - - protected: - - Data * _data; -}; - - -class ILMTHREAD_EXPORT Task -{ - public: - - Task (TaskGroup* g); - virtual ~Task (); - - virtual void execute () = 0; - TaskGroup * group(); - - protected: - - TaskGroup * _group; -}; - - -class ILMTHREAD_EXPORT TaskGroup -{ - public: - - TaskGroup(); - ~TaskGroup(); - - struct Data; - Data* const _data; -}; - - -ILMTHREAD_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_ILM_THREAD_POOL_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPosix.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPosix.cpp deleted file mode 100644 index c487e39..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPosix.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Thread -- implementation for -// platforms that support Posix threads -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.h" - -#if HAVE_PTHREAD - -#include "IlmThread.h" -#include "Iex.h" -#include - -extern "C" -{ - typedef void * (* Start) (void *); -} - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER - - -bool -supportsThreads () -{ - return true; -} - -namespace { - -void -threadLoop (void * t) -{ - return (reinterpret_cast(t))->run(); -} - -} // namespace - - -Thread::Thread () -{ - // empty -} - - -Thread::~Thread () -{ - int error = ::pthread_join (_thread, 0); - assert (error == 0); -} - - -void -Thread::start () -{ - if (int error = ::pthread_create (&_thread, 0, Start (threadLoop), this)) - IEX_NAMESPACE::throwErrnoExc ("Cannot create new thread (%T).", error); -} - - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp deleted file mode 100644 index cf37aff..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Semaphore -- dummy implementation for -// for platforms that do not support threading -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.h" - -//#if !defined (_WIN32) && !(_WIN64) && !(HAVE_PTHREAD) -#include "IlmThreadSemaphore.h" - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER - - -Semaphore::Semaphore (unsigned int value) {} -Semaphore::~Semaphore () {} -void Semaphore::wait () {} -bool Semaphore::tryWait () {return true;} -void Semaphore::post () {} -int Semaphore::value () const {return 0;} - - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT - -//#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphore.h b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphore.h deleted file mode 100644 index 46cfd02..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphore.h +++ /dev/null @@ -1,112 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_ILM_THREAD_SEMAPHORE_H -#define INCLUDED_ILM_THREAD_SEMAPHORE_H - -//----------------------------------------------------------------------------- -// -// class Semaphore -- a wrapper class for -// system-dependent counting semaphores -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.h" -#include "IlmThreadExport.h" -#include "IlmThreadNamespace.h" - -#if defined _WIN32 || defined _WIN64 - #ifdef NOMINMAX - #undef NOMINMAX - #endif - #define NOMINMAX - #include -#elif HAVE_PTHREAD && !HAVE_POSIX_SEMAPHORES - #include -#elif HAVE_PTHREAD && HAVE_POSIX_SEMAPHORES - #include -#endif - -ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER - - -class ILMTHREAD_EXPORT Semaphore -{ - public: - - Semaphore (unsigned int value = 0); - virtual ~Semaphore(); - - void wait(); - bool tryWait(); - void post(); - int value() const; - - private: - - #if defined _WIN32 || defined _WIN64 - - mutable HANDLE _semaphore; - - #elif HAVE_PTHREAD && !HAVE_POSIX_SEMAPHORES - - // - // If the platform has Posix threads but no semapohores, - // then we implement them ourselves using condition variables - // - - struct sema_t - { - unsigned int count; - unsigned long numWaiting; - pthread_mutex_t mutex; - pthread_cond_t nonZero; - }; - - mutable sema_t _semaphore; - - #elif HAVE_PTHREAD && HAVE_POSIX_SEMAPHORES - - mutable sem_t _semaphore; - - #endif - - void operator = (const Semaphore& s); // not implemented - Semaphore (const Semaphore& s); // not implemented -}; - - -ILMTHREAD_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_ILM_THREAD_SEMAPHORE_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosix.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosix.cpp deleted file mode 100644 index 400d90e..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosix.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Semaphore -- implementation for platforms -// that support Posix threads and Posix semaphores -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.h" - -#if HAVE_PTHREAD && HAVE_POSIX_SEMAPHORES - -#include "IlmThreadSemaphore.h" -#include "Iex.h" -#include -#include - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER - - -Semaphore::Semaphore (unsigned int value) -{ - if (::sem_init (&_semaphore, 0, value)) - IEX_NAMESPACE::throwErrnoExc ("Cannot initialize semaphore (%T)."); -} - - -Semaphore::~Semaphore () -{ - int error = ::sem_destroy (&_semaphore); - assert (error == 0); -} - - -void -Semaphore::wait () -{ - while( ::sem_wait( &_semaphore ) == -1 && errno == EINTR ) - { - } -} - - -bool -Semaphore::tryWait () -{ - return sem_trywait (&_semaphore) == 0; -} - - -void -Semaphore::post () -{ - if (::sem_post (&_semaphore)) - IEX_NAMESPACE::throwErrnoExc ("Post operation on semaphore failed (%T)."); -} - - -int -Semaphore::value () const -{ - int value; - - if (::sem_getvalue (&_semaphore, &value)) - IEX_NAMESPACE::throwErrnoExc ("Cannot read semaphore value (%T)."); - - return value; -} - - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosixCompat.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosixCompat.cpp deleted file mode 100644 index 29b109d..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosixCompat.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Semaphore -- implementation for for platforms that do -// support Posix threads but do not support Posix semaphores, -// for example, OS X -// -//----------------------------------------------------------------------------- - -#include "IlmBaseConfig.h" - -#if HAVE_PTHREAD && !HAVE_POSIX_SEMAPHORES - -#include "IlmThreadSemaphore.h" -#include "Iex.h" -#include - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER - - -Semaphore::Semaphore (unsigned int value) -{ - if (int error = ::pthread_mutex_init (&_semaphore.mutex, 0)) - IEX_NAMESPACE::throwErrnoExc ("Cannot initialize mutex (%T).", error); - - if (int error = ::pthread_cond_init (&_semaphore.nonZero, 0)) - IEX_NAMESPACE::throwErrnoExc ("Cannot initialize condition variable (%T).", - error); - - _semaphore.count = value; - _semaphore.numWaiting = 0; -} - - -Semaphore::~Semaphore () -{ - int error = ::pthread_cond_destroy (&_semaphore.nonZero); - assert (error == 0); - error = ::pthread_mutex_destroy (&_semaphore.mutex); - assert (error == 0); -} - - -void -Semaphore::wait () -{ - ::pthread_mutex_lock (&_semaphore.mutex); - - _semaphore.numWaiting++; - - while (_semaphore.count == 0) - { - if (int error = ::pthread_cond_wait (&_semaphore.nonZero, - &_semaphore.mutex)) - { - ::pthread_mutex_unlock (&_semaphore.mutex); - - IEX_NAMESPACE::throwErrnoExc ("Cannot wait on condition variable (%T).", - error); - } - } - - _semaphore.numWaiting--; - _semaphore.count--; - - ::pthread_mutex_unlock (&_semaphore.mutex); -} - - -bool -Semaphore::tryWait () -{ - ::pthread_mutex_lock (&_semaphore.mutex); - - if (_semaphore.count == 0) - { - ::pthread_mutex_unlock (&_semaphore.mutex); - return false; - } - else - { - _semaphore.count--; - ::pthread_mutex_unlock (&_semaphore.mutex); - return true; - } -} - - -void -Semaphore::post () -{ - ::pthread_mutex_lock (&_semaphore.mutex); - - if (_semaphore.numWaiting > 0) - { - if (int error = ::pthread_cond_signal (&_semaphore.nonZero)) - { - ::pthread_mutex_unlock (&_semaphore.mutex); - - IEX_NAMESPACE::throwErrnoExc ("Cannot signal condition variable (%T).", - error); - } - } - - _semaphore.count++; - ::pthread_mutex_unlock (&_semaphore.mutex); -} - - -int -Semaphore::value () const -{ - ::pthread_mutex_lock (&_semaphore.mutex); - int value = _semaphore.count; - ::pthread_mutex_unlock (&_semaphore.mutex); - return value; -} - - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphoreWin32.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphoreWin32.cpp deleted file mode 100644 index 3e5c372..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphoreWin32.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Semaphore -- implementation for Windows -// -//----------------------------------------------------------------------------- - -#include "IlmThreadSemaphore.h" -#include "Iex.h" -#include -#include -#include - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER - -using namespace IEX_NAMESPACE; - -namespace { - -std::string -errorString () -{ - LPSTR messageBuffer; - DWORD bufferLength; - std::string message; - - // - // Call FormatMessage() to allow for message - // text to be acquired from the system. - // - - if (bufferLength = FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_IGNORE_INSERTS | - FORMAT_MESSAGE_FROM_SYSTEM, - 0, - GetLastError (), - MAKELANGID (LANG_NEUTRAL, - SUBLANG_DEFAULT), - (LPSTR) &messageBuffer, - 0, - NULL)) - { - message = messageBuffer; - LocalFree (messageBuffer); - } - - return message; -} - -} // namespace - - -Semaphore::Semaphore (unsigned int value) -{ - if ((_semaphore = ::CreateSemaphore (0, value, 0x7fffffff, 0)) == 0) - { - THROW (LogicExc, "Could not create semaphore " - "(" << errorString() << ")."); - } -} - - -Semaphore::~Semaphore() -{ - bool ok = ::CloseHandle (_semaphore) != FALSE; - assert (ok); -} - - -void -Semaphore::wait() -{ - if (::WaitForSingleObject (_semaphore, INFINITE) != WAIT_OBJECT_0) - { - THROW (LogicExc, "Could not wait on semaphore " - "(" << errorString() << ")."); - } -} - - -bool -Semaphore::tryWait() -{ - return ::WaitForSingleObject (_semaphore, 0) == WAIT_OBJECT_0; -} - - -void -Semaphore::post() -{ - if (!::ReleaseSemaphore (_semaphore, 1, 0)) - { - THROW (LogicExc, "Could not post on semaphore " - "(" << errorString() << ")."); - } -} - - -int -Semaphore::value() const -{ - LONG v = -1; - - if (!::ReleaseSemaphore (_semaphore, 0, &v) || v < 0) - { - THROW (LogicExc, "Could not get value of semaphore " - "(" << errorString () << ")."); - } - - return v; -} - - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadWin32.cpp b/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadWin32.cpp deleted file mode 100644 index c563091..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/IlmThread/IlmThreadWin32.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// class Thread -- implementation for Windows -// -//----------------------------------------------------------------------------- - - -#include "IlmThread.h" -#include "Iex.h" -#include -#include - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER - - -bool -supportsThreads () -{ - return true; -} - -namespace { - -unsigned __stdcall -threadLoop (void * t) -{ - reinterpret_cast(t)->run(); - _endthreadex (0); - return 0; -} - -} // namespace - - -Thread::Thread () -{ - // empty -} - - -Thread::~Thread () -{ - DWORD status = ::WaitForSingleObject (_thread, INFINITE); - assert (status == WAIT_OBJECT_0); - bool ok = ::CloseHandle (_thread) != FALSE; - assert (ok); -} - - -void -Thread::start () -{ - unsigned id; - _thread = (HANDLE)::_beginthreadex (0, 0, &threadLoop, this, 0, &id); - - if (_thread == 0) - IEX_NAMESPACE::throwErrnoExc ("Cannot create new thread (%T)."); -} - - -ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathBox.cpp b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathBox.cpp deleted file mode 100644 index 07bddfd..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathBox.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#include "ImathBox.h" - -// this file is necessary for template instantiation on windows diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathBox.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathBox.h deleted file mode 100644 index 45165ff..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathBox.h +++ /dev/null @@ -1,849 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMATHBOX_H -#define INCLUDED_IMATHBOX_H - -//------------------------------------------------------------------- -// -// class Imath::Box -// -------------------------------- -// -// This class imposes the following requirements on its -// parameter class: -// -// 1) The class T must implement these operators: -// + - < > <= >= = -// with the signature (T,T) and the expected -// return values for a numeric type. -// -// 2) The class T must implement operator= -// with the signature (T,float and/or double) -// -// 3) The class T must have a constructor which takes -// a float (and/or double) for use in initializing the box. -// -// 4) The class T must have a function T::dimensions() -// which returns the number of dimensions in the class -// (since its assumed its a vector) -- preferably, this -// returns a constant expression. -// -//------------------------------------------------------------------- - -#include "ImathVec.h" -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -template -class Box -{ - public: - - //------------------------- - // Data Members are public - //------------------------- - - T min; - T max; - - //----------------------------------------------------- - // Constructors - an "empty" box is created by default - //----------------------------------------------------- - - Box (); - Box (const T &point); - Box (const T &minT, const T &maxT); - - //-------------------- - // Operators: ==, != - //-------------------- - - bool operator == (const Box &src) const; - bool operator != (const Box &src) const; - - //------------------ - // Box manipulation - //------------------ - - void makeEmpty (); - void extendBy (const T &point); - void extendBy (const Box &box); - void makeInfinite (); - - //--------------------------------------------------- - // Query functions - these compute results each time - //--------------------------------------------------- - - T size () const; - T center () const; - bool intersects (const T &point) const; - bool intersects (const Box &box) const; - - unsigned int majorAxis () const; - - //---------------- - // Classification - //---------------- - - bool isEmpty () const; - bool hasVolume () const; - bool isInfinite () const; -}; - - -//-------------------- -// Convenient typedefs -//-------------------- - -typedef Box Box2s; -typedef Box Box2i; -typedef Box Box2f; -typedef Box Box2d; -typedef Box Box3s; -typedef Box Box3i; -typedef Box Box3f; -typedef Box Box3d; - - -//---------------- -// Implementation - - -template -inline Box::Box() -{ - makeEmpty(); -} - - -template -inline Box::Box (const T &point) -{ - min = point; - max = point; -} - - -template -inline Box::Box (const T &minT, const T &maxT) -{ - min = minT; - max = maxT; -} - - -template -inline bool -Box::operator == (const Box &src) const -{ - return (min == src.min && max == src.max); -} - - -template -inline bool -Box::operator != (const Box &src) const -{ - return (min != src.min || max != src.max); -} - - -template -inline void Box::makeEmpty() -{ - min = T(T::baseTypeMax()); - max = T(T::baseTypeMin()); -} - -template -inline void Box::makeInfinite() -{ - min = T(T::baseTypeMin()); - max = T(T::baseTypeMax()); -} - - -template -inline void -Box::extendBy(const T &point) -{ - for (unsigned int i = 0; i < min.dimensions(); i++) - { - if (point[i] < min[i]) - min[i] = point[i]; - - if (point[i] > max[i]) - max[i] = point[i]; - } -} - - -template -inline void -Box::extendBy(const Box &box) -{ - for (unsigned int i = 0; i < min.dimensions(); i++) - { - if (box.min[i] < min[i]) - min[i] = box.min[i]; - - if (box.max[i] > max[i]) - max[i] = box.max[i]; - } -} - - -template -inline bool -Box::intersects(const T &point) const -{ - for (unsigned int i = 0; i < min.dimensions(); i++) - { - if (point[i] < min[i] || point[i] > max[i]) - return false; - } - - return true; -} - - -template -inline bool -Box::intersects(const Box &box) const -{ - for (unsigned int i = 0; i < min.dimensions(); i++) - { - if (box.max[i] < min[i] || box.min[i] > max[i]) - return false; - } - - return true; -} - - -template -inline T -Box::size() const -{ - if (isEmpty()) - return T (0); - - return max - min; -} - - -template -inline T -Box::center() const -{ - return (max + min) / 2; -} - - -template -inline bool -Box::isEmpty() const -{ - for (unsigned int i = 0; i < min.dimensions(); i++) - { - if (max[i] < min[i]) - return true; - } - - return false; -} - -template -inline bool -Box::isInfinite() const -{ - for (unsigned int i = 0; i < min.dimensions(); i++) - { - if (min[i] != T::baseTypeMin() || max[i] != T::baseTypeMax()) - return false; - } - - return true; -} - - -template -inline bool -Box::hasVolume() const -{ - for (unsigned int i = 0; i < min.dimensions(); i++) - { - if (max[i] <= min[i]) - return false; - } - - return true; -} - - -template -inline unsigned int -Box::majorAxis() const -{ - unsigned int major = 0; - T s = size(); - - for (unsigned int i = 1; i < min.dimensions(); i++) - { - if (s[i] > s[major]) - major = i; - } - - return major; -} - -//------------------------------------------------------------------- -// -// Partial class specializations for Imath::Vec2 and Imath::Vec3 -// -//------------------------------------------------------------------- - -template class Box; - -template -class Box > -{ - public: - - //------------------------- - // Data Members are public - //------------------------- - - Vec2 min; - Vec2 max; - - //----------------------------------------------------- - // Constructors - an "empty" box is created by default - //----------------------------------------------------- - - Box(); - Box (const Vec2 &point); - Box (const Vec2 &minT, const Vec2 &maxT); - - //-------------------- - // Operators: ==, != - //-------------------- - - bool operator == (const Box > &src) const; - bool operator != (const Box > &src) const; - - //------------------ - // Box manipulation - //------------------ - - void makeEmpty(); - void extendBy (const Vec2 &point); - void extendBy (const Box > &box); - void makeInfinite(); - - //--------------------------------------------------- - // Query functions - these compute results each time - //--------------------------------------------------- - - Vec2 size() const; - Vec2 center() const; - bool intersects (const Vec2 &point) const; - bool intersects (const Box > &box) const; - - unsigned int majorAxis() const; - - //---------------- - // Classification - //---------------- - - bool isEmpty() const; - bool hasVolume() const; - bool isInfinite() const; -}; - - -//---------------- -// Implementation - -template -inline Box >::Box() -{ - makeEmpty(); -} - - -template -inline Box >::Box (const Vec2 &point) -{ - min = point; - max = point; -} - - -template -inline Box >::Box (const Vec2 &minT, const Vec2 &maxT) -{ - min = minT; - max = maxT; -} - - -template -inline bool -Box >::operator == (const Box > &src) const -{ - return (min == src.min && max == src.max); -} - - -template -inline bool -Box >::operator != (const Box > &src) const -{ - return (min != src.min || max != src.max); -} - - -template -inline void Box >::makeEmpty() -{ - min = Vec2(Vec2::baseTypeMax()); - max = Vec2(Vec2::baseTypeMin()); -} - -template -inline void Box >::makeInfinite() -{ - min = Vec2(Vec2::baseTypeMin()); - max = Vec2(Vec2::baseTypeMax()); -} - - -template -inline void -Box >::extendBy (const Vec2 &point) -{ - if (point[0] < min[0]) - min[0] = point[0]; - - if (point[0] > max[0]) - max[0] = point[0]; - - if (point[1] < min[1]) - min[1] = point[1]; - - if (point[1] > max[1]) - max[1] = point[1]; -} - - -template -inline void -Box >::extendBy (const Box > &box) -{ - if (box.min[0] < min[0]) - min[0] = box.min[0]; - - if (box.max[0] > max[0]) - max[0] = box.max[0]; - - if (box.min[1] < min[1]) - min[1] = box.min[1]; - - if (box.max[1] > max[1]) - max[1] = box.max[1]; -} - - -template -inline bool -Box >::intersects (const Vec2 &point) const -{ - if (point[0] < min[0] || point[0] > max[0] || - point[1] < min[1] || point[1] > max[1]) - return false; - - return true; -} - - -template -inline bool -Box >::intersects (const Box > &box) const -{ - if (box.max[0] < min[0] || box.min[0] > max[0] || - box.max[1] < min[1] || box.min[1] > max[1]) - return false; - - return true; -} - - -template -inline Vec2 -Box >::size() const -{ - if (isEmpty()) - return Vec2 (0); - - return max - min; -} - - -template -inline Vec2 -Box >::center() const -{ - return (max + min) / 2; -} - - -template -inline bool -Box >::isEmpty() const -{ - if (max[0] < min[0] || - max[1] < min[1]) - return true; - - return false; -} - -template -inline bool -Box > ::isInfinite() const -{ - if (min[0] != limits::min() || max[0] != limits::max() || - min[1] != limits::min() || max[1] != limits::max()) - return false; - - return true; -} - - -template -inline bool -Box >::hasVolume() const -{ - if (max[0] <= min[0] || - max[1] <= min[1]) - return false; - - return true; -} - - -template -inline unsigned int -Box >::majorAxis() const -{ - unsigned int major = 0; - Vec2 s = size(); - - if (s[1] > s[major]) - major = 1; - - return major; -} - - -template -class Box > -{ - public: - - //------------------------- - // Data Members are public - //------------------------- - - Vec3 min; - Vec3 max; - - //----------------------------------------------------- - // Constructors - an "empty" box is created by default - //----------------------------------------------------- - - Box(); - Box (const Vec3 &point); - Box (const Vec3 &minT, const Vec3 &maxT); - - //-------------------- - // Operators: ==, != - //-------------------- - - bool operator == (const Box > &src) const; - bool operator != (const Box > &src) const; - - //------------------ - // Box manipulation - //------------------ - - void makeEmpty(); - void extendBy (const Vec3 &point); - void extendBy (const Box > &box); - void makeInfinite (); - - //--------------------------------------------------- - // Query functions - these compute results each time - //--------------------------------------------------- - - Vec3 size() const; - Vec3 center() const; - bool intersects (const Vec3 &point) const; - bool intersects (const Box > &box) const; - - unsigned int majorAxis() const; - - //---------------- - // Classification - //---------------- - - bool isEmpty() const; - bool hasVolume() const; - bool isInfinite() const; -}; - - -//---------------- -// Implementation - - -template -inline Box >::Box() -{ - makeEmpty(); -} - - -template -inline Box >::Box (const Vec3 &point) -{ - min = point; - max = point; -} - - -template -inline Box >::Box (const Vec3 &minT, const Vec3 &maxT) -{ - min = minT; - max = maxT; -} - - -template -inline bool -Box >::operator == (const Box > &src) const -{ - return (min == src.min && max == src.max); -} - - -template -inline bool -Box >::operator != (const Box > &src) const -{ - return (min != src.min || max != src.max); -} - - -template -inline void Box >::makeEmpty() -{ - min = Vec3(Vec3::baseTypeMax()); - max = Vec3(Vec3::baseTypeMin()); -} - -template -inline void Box >::makeInfinite() -{ - min = Vec3(Vec3::baseTypeMin()); - max = Vec3(Vec3::baseTypeMax()); -} - - -template -inline void -Box >::extendBy (const Vec3 &point) -{ - if (point[0] < min[0]) - min[0] = point[0]; - - if (point[0] > max[0]) - max[0] = point[0]; - - if (point[1] < min[1]) - min[1] = point[1]; - - if (point[1] > max[1]) - max[1] = point[1]; - - if (point[2] < min[2]) - min[2] = point[2]; - - if (point[2] > max[2]) - max[2] = point[2]; -} - - -template -inline void -Box >::extendBy (const Box > &box) -{ - if (box.min[0] < min[0]) - min[0] = box.min[0]; - - if (box.max[0] > max[0]) - max[0] = box.max[0]; - - if (box.min[1] < min[1]) - min[1] = box.min[1]; - - if (box.max[1] > max[1]) - max[1] = box.max[1]; - - if (box.min[2] < min[2]) - min[2] = box.min[2]; - - if (box.max[2] > max[2]) - max[2] = box.max[2]; -} - - -template -inline bool -Box >::intersects (const Vec3 &point) const -{ - if (point[0] < min[0] || point[0] > max[0] || - point[1] < min[1] || point[1] > max[1] || - point[2] < min[2] || point[2] > max[2]) - return false; - - return true; -} - - -template -inline bool -Box >::intersects (const Box > &box) const -{ - if (box.max[0] < min[0] || box.min[0] > max[0] || - box.max[1] < min[1] || box.min[1] > max[1] || - box.max[2] < min[2] || box.min[2] > max[2]) - return false; - - return true; -} - - -template -inline Vec3 -Box >::size() const -{ - if (isEmpty()) - return Vec3 (0); - - return max - min; -} - - -template -inline Vec3 -Box >::center() const -{ - return (max + min) / 2; -} - - -template -inline bool -Box >::isEmpty() const -{ - if (max[0] < min[0] || - max[1] < min[1] || - max[2] < min[2]) - return true; - - return false; -} - -template -inline bool -Box >::isInfinite() const -{ - if (min[0] != limits::min() || max[0] != limits::max() || - min[1] != limits::min() || max[1] != limits::max() || - min[2] != limits::min() || max[2] != limits::max()) - return false; - - return true; -} - - -template -inline bool -Box >::hasVolume() const -{ - if (max[0] <= min[0] || - max[1] <= min[1] || - max[2] <= min[2]) - return false; - - return true; -} - - -template -inline unsigned int -Box >::majorAxis() const -{ - unsigned int major = 0; - Vec3 s = size(); - - if (s[1] > s[major]) - major = 1; - - if (s[2] > s[major]) - major = 2; - - return major; -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHBOX_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathBoxAlgo.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathBoxAlgo.h deleted file mode 100644 index 63bd2f6..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathBoxAlgo.h +++ /dev/null @@ -1,1016 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHBOXALGO_H -#define INCLUDED_IMATHBOXALGO_H - - -//--------------------------------------------------------------------------- -// -// This file contains algorithms applied to or in conjunction -// with bounding boxes (Imath::Box). These algorithms require -// more headers to compile. The assumption made is that these -// functions are called much less often than the basic box -// functions or these functions require more support classes. -// -// Contains: -// -// T clip(const T& in, const Box& box) -// -// Vec3 closestPointOnBox(const Vec3&, const Box>& ) -// -// Vec3 closestPointInBox(const Vec3&, const Box>& ) -// -// Box< Vec3 > transform(const Box>&, const Matrix44&) -// Box< Vec3 > affineTransform(const Box>&, const Matrix44&) -// -// void transform(const Box>&, const Matrix44&, Box>&) -// void affineTransform(const Box>&, -// const Matrix44&, -// Box>&) -// -// bool findEntryAndExitPoints(const Line &line, -// const Box< Vec3 > &box, -// Vec3 &enterPoint, -// Vec3 &exitPoint) -// -// bool intersects(const Box> &box, -// const Line3 &ray, -// Vec3 intersectionPoint) -// -// bool intersects(const Box> &box, const Line3 &ray) -// -//--------------------------------------------------------------------------- - -#include "ImathBox.h" -#include "ImathMatrix.h" -#include "ImathLineAlgo.h" -#include "ImathPlane.h" -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -template -inline T -clip (const T &p, const Box &box) -{ - // - // Clip the coordinates of a point, p, against a box. - // The result, q, is the closest point to p that is inside the box. - // - - T q; - - for (int i = 0; i < int (box.min.dimensions()); i++) - { - if (p[i] < box.min[i]) - q[i] = box.min[i]; - else if (p[i] > box.max[i]) - q[i] = box.max[i]; - else - q[i] = p[i]; - } - - return q; -} - - -template -inline T -closestPointInBox (const T &p, const Box &box) -{ - return clip (p, box); -} - - -template -Vec3 -closestPointOnBox (const Vec3 &p, const Box< Vec3 > &box) -{ - // - // Find the point, q, on the surface of - // the box, that is closest to point p. - // - // If the box is empty, return p. - // - - if (box.isEmpty()) - return p; - - Vec3 q = closestPointInBox (p, box); - - if (q == p) - { - Vec3 d1 = p - box.min; - Vec3 d2 = box.max - p; - - Vec3 d ((d1.x < d2.x)? d1.x: d2.x, - (d1.y < d2.y)? d1.y: d2.y, - (d1.z < d2.z)? d1.z: d2.z); - - if (d.x < d.y && d.x < d.z) - { - q.x = (d1.x < d2.x)? box.min.x: box.max.x; - } - else if (d.y < d.z) - { - q.y = (d1.y < d2.y)? box.min.y: box.max.y; - } - else - { - q.z = (d1.z < d2.z)? box.min.z: box.max.z; - } - } - - return q; -} - - -template -Box< Vec3 > -transform (const Box< Vec3 > &box, const Matrix44 &m) -{ - // - // Transform a 3D box by a matrix, and compute a new box that - // tightly encloses the transformed box. - // - // If m is an affine transform, then we use James Arvo's fast - // method as described in "Graphics Gems", Academic Press, 1990, - // pp. 548-550. - // - - // - // A transformed empty box is still empty, and a transformed infinite box - // is still infinite - // - - if (box.isEmpty() || box.isInfinite()) - return box; - - // - // If the last column of m is (0 0 0 1) then m is an affine - // transform, and we use the fast Graphics Gems trick. - // - - if (m[0][3] == 0 && m[1][3] == 0 && m[2][3] == 0 && m[3][3] == 1) - { - Box< Vec3 > newBox; - - for (int i = 0; i < 3; i++) - { - newBox.min[i] = newBox.max[i] = (S) m[3][i]; - - for (int j = 0; j < 3; j++) - { - S a, b; - - a = (S) m[j][i] * box.min[j]; - b = (S) m[j][i] * box.max[j]; - - if (a < b) - { - newBox.min[i] += a; - newBox.max[i] += b; - } - else - { - newBox.min[i] += b; - newBox.max[i] += a; - } - } - } - - return newBox; - } - - // - // M is a projection matrix. Do things the naive way: - // Transform the eight corners of the box, and find an - // axis-parallel box that encloses the transformed corners. - // - - Vec3 points[8]; - - points[0][0] = points[1][0] = points[2][0] = points[3][0] = box.min[0]; - points[4][0] = points[5][0] = points[6][0] = points[7][0] = box.max[0]; - - points[0][1] = points[1][1] = points[4][1] = points[5][1] = box.min[1]; - points[2][1] = points[3][1] = points[6][1] = points[7][1] = box.max[1]; - - points[0][2] = points[2][2] = points[4][2] = points[6][2] = box.min[2]; - points[1][2] = points[3][2] = points[5][2] = points[7][2] = box.max[2]; - - Box< Vec3 > newBox; - - for (int i = 0; i < 8; i++) - newBox.extendBy (points[i] * m); - - return newBox; -} - -template -void -transform (const Box< Vec3 > &box, - const Matrix44 &m, - Box< Vec3 > &result) -{ - // - // Transform a 3D box by a matrix, and compute a new box that - // tightly encloses the transformed box. - // - // If m is an affine transform, then we use James Arvo's fast - // method as described in "Graphics Gems", Academic Press, 1990, - // pp. 548-550. - // - - // - // A transformed empty box is still empty, and a transformed infinite - // box is still infinite - // - - if (box.isEmpty() || box.isInfinite()) - { - return; - } - - // - // If the last column of m is (0 0 0 1) then m is an affine - // transform, and we use the fast Graphics Gems trick. - // - - if (m[0][3] == 0 && m[1][3] == 0 && m[2][3] == 0 && m[3][3] == 1) - { - for (int i = 0; i < 3; i++) - { - result.min[i] = result.max[i] = (S) m[3][i]; - - for (int j = 0; j < 3; j++) - { - S a, b; - - a = (S) m[j][i] * box.min[j]; - b = (S) m[j][i] * box.max[j]; - - if (a < b) - { - result.min[i] += a; - result.max[i] += b; - } - else - { - result.min[i] += b; - result.max[i] += a; - } - } - } - - return; - } - - // - // M is a projection matrix. Do things the naive way: - // Transform the eight corners of the box, and find an - // axis-parallel box that encloses the transformed corners. - // - - Vec3 points[8]; - - points[0][0] = points[1][0] = points[2][0] = points[3][0] = box.min[0]; - points[4][0] = points[5][0] = points[6][0] = points[7][0] = box.max[0]; - - points[0][1] = points[1][1] = points[4][1] = points[5][1] = box.min[1]; - points[2][1] = points[3][1] = points[6][1] = points[7][1] = box.max[1]; - - points[0][2] = points[2][2] = points[4][2] = points[6][2] = box.min[2]; - points[1][2] = points[3][2] = points[5][2] = points[7][2] = box.max[2]; - - for (int i = 0; i < 8; i++) - result.extendBy (points[i] * m); -} - - -template -Box< Vec3 > -affineTransform (const Box< Vec3 > &box, const Matrix44 &m) -{ - // - // Transform a 3D box by a matrix whose rightmost column - // is (0 0 0 1), and compute a new box that tightly encloses - // the transformed box. - // - // As in the transform() function, above, we use James Arvo's - // fast method. - // - - if (box.isEmpty() || box.isInfinite()) - { - // - // A transformed empty or infinite box is still empty or infinite - // - - return box; - } - - Box< Vec3 > newBox; - - for (int i = 0; i < 3; i++) - { - newBox.min[i] = newBox.max[i] = (S) m[3][i]; - - for (int j = 0; j < 3; j++) - { - S a, b; - - a = (S) m[j][i] * box.min[j]; - b = (S) m[j][i] * box.max[j]; - - if (a < b) - { - newBox.min[i] += a; - newBox.max[i] += b; - } - else - { - newBox.min[i] += b; - newBox.max[i] += a; - } - } - } - - return newBox; -} - -template -void -affineTransform (const Box< Vec3 > &box, - const Matrix44 &m, - Box > &result) -{ - // - // Transform a 3D box by a matrix whose rightmost column - // is (0 0 0 1), and compute a new box that tightly encloses - // the transformed box. - // - // As in the transform() function, above, we use James Arvo's - // fast method. - // - - if (box.isEmpty()) - { - // - // A transformed empty box is still empty - // - result.makeEmpty(); - return; - } - - if (box.isInfinite()) - { - // - // A transformed infinite box is still infinite - // - result.makeInfinite(); - return; - } - - for (int i = 0; i < 3; i++) - { - result.min[i] = result.max[i] = (S) m[3][i]; - - for (int j = 0; j < 3; j++) - { - S a, b; - - a = (S) m[j][i] * box.min[j]; - b = (S) m[j][i] * box.max[j]; - - if (a < b) - { - result.min[i] += a; - result.max[i] += b; - } - else - { - result.min[i] += b; - result.max[i] += a; - } - } - } -} - - -template -bool -findEntryAndExitPoints (const Line3 &r, - const Box > &b, - Vec3 &entry, - Vec3 &exit) -{ - // - // Compute the points where a ray, r, enters and exits a box, b: - // - // findEntryAndExitPoints() returns - // - // - true if the ray starts inside the box or if the - // ray starts outside and intersects the box - // - // - false otherwise (that is, if the ray does not - // intersect the box) - // - // The entry and exit points are - // - // - points on two of the faces of the box when - // findEntryAndExitPoints() returns true - // (The entry end exit points may be on either - // side of the ray's origin) - // - // - undefined when findEntryAndExitPoints() - // returns false - // - - if (b.isEmpty()) - { - // - // No ray intersects an empty box - // - - return false; - } - - // - // The following description assumes that the ray's origin is outside - // the box, but the code below works even if the origin is inside the - // box: - // - // Between one and three "frontfacing" sides of the box are oriented - // towards the ray's origin, and between one and three "backfacing" - // sides are oriented away from the ray's origin. - // We intersect the ray with the planes that contain the sides of the - // box, and compare the distances between the ray's origin and the - // ray-plane intersections. The ray intersects the box if the most - // distant frontfacing intersection is nearer than the nearest - // backfacing intersection. If the ray does intersect the box, then - // the most distant frontfacing ray-plane intersection is the entry - // point and the nearest backfacing ray-plane intersection is the - // exit point. - // - - const T TMAX = limits::max(); - - T tFrontMax = -TMAX; - T tBackMin = TMAX; - - // - // Minimum and maximum X sides. - // - - if (r.dir.x >= 0) - { - T d1 = b.max.x - r.pos.x; - T d2 = b.min.x - r.pos.x; - - if (r.dir.x > 1 || - (abs (d1) < TMAX * r.dir.x && - abs (d2) < TMAX * r.dir.x)) - { - T t1 = d1 / r.dir.x; - T t2 = d2 / r.dir.x; - - if (tBackMin > t1) - { - tBackMin = t1; - - exit.x = b.max.x; - exit.y = clamp (r.pos.y + t1 * r.dir.y, b.min.y, b.max.y); - exit.z = clamp (r.pos.z + t1 * r.dir.z, b.min.z, b.max.z); - } - - if (tFrontMax < t2) - { - tFrontMax = t2; - - entry.x = b.min.x; - entry.y = clamp (r.pos.y + t2 * r.dir.y, b.min.y, b.max.y); - entry.z = clamp (r.pos.z + t2 * r.dir.z, b.min.z, b.max.z); - } - } - else if (r.pos.x < b.min.x || r.pos.x > b.max.x) - { - return false; - } - } - else // r.dir.x < 0 - { - T d1 = b.min.x - r.pos.x; - T d2 = b.max.x - r.pos.x; - - if (r.dir.x < -1 || - (abs (d1) < -TMAX * r.dir.x && - abs (d2) < -TMAX * r.dir.x)) - { - T t1 = d1 / r.dir.x; - T t2 = d2 / r.dir.x; - - if (tBackMin > t1) - { - tBackMin = t1; - - exit.x = b.min.x; - exit.y = clamp (r.pos.y + t1 * r.dir.y, b.min.y, b.max.y); - exit.z = clamp (r.pos.z + t1 * r.dir.z, b.min.z, b.max.z); - } - - if (tFrontMax < t2) - { - tFrontMax = t2; - - entry.x = b.max.x; - entry.y = clamp (r.pos.y + t2 * r.dir.y, b.min.y, b.max.y); - entry.z = clamp (r.pos.z + t2 * r.dir.z, b.min.z, b.max.z); - } - } - else if (r.pos.x < b.min.x || r.pos.x > b.max.x) - { - return false; - } - } - - // - // Minimum and maximum Y sides. - // - - if (r.dir.y >= 0) - { - T d1 = b.max.y - r.pos.y; - T d2 = b.min.y - r.pos.y; - - if (r.dir.y > 1 || - (abs (d1) < TMAX * r.dir.y && - abs (d2) < TMAX * r.dir.y)) - { - T t1 = d1 / r.dir.y; - T t2 = d2 / r.dir.y; - - if (tBackMin > t1) - { - tBackMin = t1; - - exit.x = clamp (r.pos.x + t1 * r.dir.x, b.min.x, b.max.x); - exit.y = b.max.y; - exit.z = clamp (r.pos.z + t1 * r.dir.z, b.min.z, b.max.z); - } - - if (tFrontMax < t2) - { - tFrontMax = t2; - - entry.x = clamp (r.pos.x + t2 * r.dir.x, b.min.x, b.max.x); - entry.y = b.min.y; - entry.z = clamp (r.pos.z + t2 * r.dir.z, b.min.z, b.max.z); - } - } - else if (r.pos.y < b.min.y || r.pos.y > b.max.y) - { - return false; - } - } - else // r.dir.y < 0 - { - T d1 = b.min.y - r.pos.y; - T d2 = b.max.y - r.pos.y; - - if (r.dir.y < -1 || - (abs (d1) < -TMAX * r.dir.y && - abs (d2) < -TMAX * r.dir.y)) - { - T t1 = d1 / r.dir.y; - T t2 = d2 / r.dir.y; - - if (tBackMin > t1) - { - tBackMin = t1; - - exit.x = clamp (r.pos.x + t1 * r.dir.x, b.min.x, b.max.x); - exit.y = b.min.y; - exit.z = clamp (r.pos.z + t1 * r.dir.z, b.min.z, b.max.z); - } - - if (tFrontMax < t2) - { - tFrontMax = t2; - - entry.x = clamp (r.pos.x + t2 * r.dir.x, b.min.x, b.max.x); - entry.y = b.max.y; - entry.z = clamp (r.pos.z + t2 * r.dir.z, b.min.z, b.max.z); - } - } - else if (r.pos.y < b.min.y || r.pos.y > b.max.y) - { - return false; - } - } - - // - // Minimum and maximum Z sides. - // - - if (r.dir.z >= 0) - { - T d1 = b.max.z - r.pos.z; - T d2 = b.min.z - r.pos.z; - - if (r.dir.z > 1 || - (abs (d1) < TMAX * r.dir.z && - abs (d2) < TMAX * r.dir.z)) - { - T t1 = d1 / r.dir.z; - T t2 = d2 / r.dir.z; - - if (tBackMin > t1) - { - tBackMin = t1; - - exit.x = clamp (r.pos.x + t1 * r.dir.x, b.min.x, b.max.x); - exit.y = clamp (r.pos.y + t1 * r.dir.y, b.min.y, b.max.y); - exit.z = b.max.z; - } - - if (tFrontMax < t2) - { - tFrontMax = t2; - - entry.x = clamp (r.pos.x + t2 * r.dir.x, b.min.x, b.max.x); - entry.y = clamp (r.pos.y + t2 * r.dir.y, b.min.y, b.max.y); - entry.z = b.min.z; - } - } - else if (r.pos.z < b.min.z || r.pos.z > b.max.z) - { - return false; - } - } - else // r.dir.z < 0 - { - T d1 = b.min.z - r.pos.z; - T d2 = b.max.z - r.pos.z; - - if (r.dir.z < -1 || - (abs (d1) < -TMAX * r.dir.z && - abs (d2) < -TMAX * r.dir.z)) - { - T t1 = d1 / r.dir.z; - T t2 = d2 / r.dir.z; - - if (tBackMin > t1) - { - tBackMin = t1; - - exit.x = clamp (r.pos.x + t1 * r.dir.x, b.min.x, b.max.x); - exit.y = clamp (r.pos.y + t1 * r.dir.y, b.min.y, b.max.y); - exit.z = b.min.z; - } - - if (tFrontMax < t2) - { - tFrontMax = t2; - - entry.x = clamp (r.pos.x + t2 * r.dir.x, b.min.x, b.max.x); - entry.y = clamp (r.pos.y + t2 * r.dir.y, b.min.y, b.max.y); - entry.z = b.max.z; - } - } - else if (r.pos.z < b.min.z || r.pos.z > b.max.z) - { - return false; - } - } - - return tFrontMax <= tBackMin; -} - - -template -bool -intersects (const Box< Vec3 > &b, const Line3 &r, Vec3 &ip) -{ - // - // Intersect a ray, r, with a box, b, and compute the intersection - // point, ip: - // - // intersect() returns - // - // - true if the ray starts inside the box or if the - // ray starts outside and intersects the box - // - // - false if the ray starts outside the box and intersects it, - // but the intersection is behind the ray's origin. - // - // - false if the ray starts outside and does not intersect it - // - // The intersection point is - // - // - the ray's origin if the ray starts inside the box - // - // - a point on one of the faces of the box if the ray - // starts outside the box - // - // - undefined when intersect() returns false - // - - if (b.isEmpty()) - { - // - // No ray intersects an empty box - // - - return false; - } - - if (b.intersects (r.pos)) - { - // - // The ray starts inside the box - // - - ip = r.pos; - return true; - } - - // - // The ray starts outside the box. Between one and three "frontfacing" - // sides of the box are oriented towards the ray, and between one and - // three "backfacing" sides are oriented away from the ray. - // We intersect the ray with the planes that contain the sides of the - // box, and compare the distances between ray's origin and the ray-plane - // intersections. - // The ray intersects the box if the most distant frontfacing intersection - // is nearer than the nearest backfacing intersection. If the ray does - // intersect the box, then the most distant frontfacing ray-plane - // intersection is the ray-box intersection. - // - - const T TMAX = limits::max(); - - T tFrontMax = -1; - T tBackMin = TMAX; - - // - // Minimum and maximum X sides. - // - - if (r.dir.x > 0) - { - if (r.pos.x > b.max.x) - return false; - - T d = b.max.x - r.pos.x; - - if (r.dir.x > 1 || d < TMAX * r.dir.x) - { - T t = d / r.dir.x; - - if (tBackMin > t) - tBackMin = t; - } - - if (r.pos.x <= b.min.x) - { - T d = b.min.x - r.pos.x; - T t = (r.dir.x > 1 || d < TMAX * r.dir.x)? d / r.dir.x: TMAX; - - if (tFrontMax < t) - { - tFrontMax = t; - - ip.x = b.min.x; - ip.y = clamp (r.pos.y + t * r.dir.y, b.min.y, b.max.y); - ip.z = clamp (r.pos.z + t * r.dir.z, b.min.z, b.max.z); - } - } - } - else if (r.dir.x < 0) - { - if (r.pos.x < b.min.x) - return false; - - T d = b.min.x - r.pos.x; - - if (r.dir.x < -1 || d > TMAX * r.dir.x) - { - T t = d / r.dir.x; - - if (tBackMin > t) - tBackMin = t; - } - - if (r.pos.x >= b.max.x) - { - T d = b.max.x - r.pos.x; - T t = (r.dir.x < -1 || d > TMAX * r.dir.x)? d / r.dir.x: TMAX; - - if (tFrontMax < t) - { - tFrontMax = t; - - ip.x = b.max.x; - ip.y = clamp (r.pos.y + t * r.dir.y, b.min.y, b.max.y); - ip.z = clamp (r.pos.z + t * r.dir.z, b.min.z, b.max.z); - } - } - } - else // r.dir.x == 0 - { - if (r.pos.x < b.min.x || r.pos.x > b.max.x) - return false; - } - - // - // Minimum and maximum Y sides. - // - - if (r.dir.y > 0) - { - if (r.pos.y > b.max.y) - return false; - - T d = b.max.y - r.pos.y; - - if (r.dir.y > 1 || d < TMAX * r.dir.y) - { - T t = d / r.dir.y; - - if (tBackMin > t) - tBackMin = t; - } - - if (r.pos.y <= b.min.y) - { - T d = b.min.y - r.pos.y; - T t = (r.dir.y > 1 || d < TMAX * r.dir.y)? d / r.dir.y: TMAX; - - if (tFrontMax < t) - { - tFrontMax = t; - - ip.x = clamp (r.pos.x + t * r.dir.x, b.min.x, b.max.x); - ip.y = b.min.y; - ip.z = clamp (r.pos.z + t * r.dir.z, b.min.z, b.max.z); - } - } - } - else if (r.dir.y < 0) - { - if (r.pos.y < b.min.y) - return false; - - T d = b.min.y - r.pos.y; - - if (r.dir.y < -1 || d > TMAX * r.dir.y) - { - T t = d / r.dir.y; - - if (tBackMin > t) - tBackMin = t; - } - - if (r.pos.y >= b.max.y) - { - T d = b.max.y - r.pos.y; - T t = (r.dir.y < -1 || d > TMAX * r.dir.y)? d / r.dir.y: TMAX; - - if (tFrontMax < t) - { - tFrontMax = t; - - ip.x = clamp (r.pos.x + t * r.dir.x, b.min.x, b.max.x); - ip.y = b.max.y; - ip.z = clamp (r.pos.z + t * r.dir.z, b.min.z, b.max.z); - } - } - } - else // r.dir.y == 0 - { - if (r.pos.y < b.min.y || r.pos.y > b.max.y) - return false; - } - - // - // Minimum and maximum Z sides. - // - - if (r.dir.z > 0) - { - if (r.pos.z > b.max.z) - return false; - - T d = b.max.z - r.pos.z; - - if (r.dir.z > 1 || d < TMAX * r.dir.z) - { - T t = d / r.dir.z; - - if (tBackMin > t) - tBackMin = t; - } - - if (r.pos.z <= b.min.z) - { - T d = b.min.z - r.pos.z; - T t = (r.dir.z > 1 || d < TMAX * r.dir.z)? d / r.dir.z: TMAX; - - if (tFrontMax < t) - { - tFrontMax = t; - - ip.x = clamp (r.pos.x + t * r.dir.x, b.min.x, b.max.x); - ip.y = clamp (r.pos.y + t * r.dir.y, b.min.y, b.max.y); - ip.z = b.min.z; - } - } - } - else if (r.dir.z < 0) - { - if (r.pos.z < b.min.z) - return false; - - T d = b.min.z - r.pos.z; - - if (r.dir.z < -1 || d > TMAX * r.dir.z) - { - T t = d / r.dir.z; - - if (tBackMin > t) - tBackMin = t; - } - - if (r.pos.z >= b.max.z) - { - T d = b.max.z - r.pos.z; - T t = (r.dir.z < -1 || d > TMAX * r.dir.z)? d / r.dir.z: TMAX; - - if (tFrontMax < t) - { - tFrontMax = t; - - ip.x = clamp (r.pos.x + t * r.dir.x, b.min.x, b.max.x); - ip.y = clamp (r.pos.y + t * r.dir.y, b.min.y, b.max.y); - ip.z = b.max.z; - } - } - } - else // r.dir.z == 0 - { - if (r.pos.z < b.min.z || r.pos.z > b.max.z) - return false; - } - - return tFrontMax <= tBackMin; -} - - -template -bool -intersects (const Box< Vec3 > &box, const Line3 &ray) -{ - Vec3 ignored; - return intersects (box, ray, ignored); -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHBOXALGO_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathColor.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathColor.h deleted file mode 100644 index 743c72d..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathColor.h +++ /dev/null @@ -1,736 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHCOLOR_H -#define INCLUDED_IMATHCOLOR_H - -//---------------------------------------------------- -// -// A three and four component color class template. -// -//---------------------------------------------------- - -#include "ImathVec.h" -#include "ImathNamespace.h" -#include "half.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -template -class Color3: public Vec3 -{ - public: - - //------------- - // Constructors - //------------- - - Color3 (); // no initialization - explicit Color3 (T a); // (a a a) - Color3 (T a, T b, T c); // (a b c) - - - //--------------------------------- - // Copy constructors and assignment - //--------------------------------- - - Color3 (const Color3 &c); - template Color3 (const Vec3 &v); - - const Color3 & operator = (const Color3 &c); - - - //------------------------ - // Component-wise addition - //------------------------ - - const Color3 & operator += (const Color3 &c); - Color3 operator + (const Color3 &c) const; - - - //--------------------------- - // Component-wise subtraction - //--------------------------- - - const Color3 & operator -= (const Color3 &c); - Color3 operator - (const Color3 &c) const; - - - //------------------------------------ - // Component-wise multiplication by -1 - //------------------------------------ - - Color3 operator - () const; - const Color3 & negate (); - - - //------------------------------ - // Component-wise multiplication - //------------------------------ - - const Color3 & operator *= (const Color3 &c); - const Color3 & operator *= (T a); - Color3 operator * (const Color3 &c) const; - Color3 operator * (T a) const; - - - //------------------------ - // Component-wise division - //------------------------ - - const Color3 & operator /= (const Color3 &c); - const Color3 & operator /= (T a); - Color3 operator / (const Color3 &c) const; - Color3 operator / (T a) const; -}; - -template class Color4 -{ - public: - - //------------------- - // Access to elements - //------------------- - - T r, g, b, a; - - T & operator [] (int i); - const T & operator [] (int i) const; - - - //------------- - // Constructors - //------------- - - Color4 (); // no initialization - explicit Color4 (T a); // (a a a a) - Color4 (T a, T b, T c, T d); // (a b c d) - - - //--------------------------------- - // Copy constructors and assignment - //--------------------------------- - - Color4 (const Color4 &v); - template Color4 (const Color4 &v); - - const Color4 & operator = (const Color4 &v); - - - //---------------------- - // Compatibility with Sb - //---------------------- - - template - void setValue (S a, S b, S c, S d); - - template - void setValue (const Color4 &v); - - template - void getValue (S &a, S &b, S &c, S &d) const; - - template - void getValue (Color4 &v) const; - - T * getValue(); - const T * getValue() const; - - - //--------- - // Equality - //--------- - - template - bool operator == (const Color4 &v) const; - - template - bool operator != (const Color4 &v) const; - - - //------------------------ - // Component-wise addition - //------------------------ - - const Color4 & operator += (const Color4 &v); - Color4 operator + (const Color4 &v) const; - - - //--------------------------- - // Component-wise subtraction - //--------------------------- - - const Color4 & operator -= (const Color4 &v); - Color4 operator - (const Color4 &v) const; - - - //------------------------------------ - // Component-wise multiplication by -1 - //------------------------------------ - - Color4 operator - () const; - const Color4 & negate (); - - - //------------------------------ - // Component-wise multiplication - //------------------------------ - - const Color4 & operator *= (const Color4 &v); - const Color4 & operator *= (T a); - Color4 operator * (const Color4 &v) const; - Color4 operator * (T a) const; - - - //------------------------ - // Component-wise division - //------------------------ - - const Color4 & operator /= (const Color4 &v); - const Color4 & operator /= (T a); - Color4 operator / (const Color4 &v) const; - Color4 operator / (T a) const; - - - //---------------------------------------------------------- - // Number of dimensions, i.e. number of elements in a Color4 - //---------------------------------------------------------- - - static unsigned int dimensions() {return 4;} - - - //------------------------------------------------- - // Limitations of type T (see also class limits) - //------------------------------------------------- - - static T baseTypeMin() {return limits::min();} - static T baseTypeMax() {return limits::max();} - static T baseTypeSmallest() {return limits::smallest();} - static T baseTypeEpsilon() {return limits::epsilon();} - - - //-------------------------------------------------------------- - // Base type -- in templates, which accept a parameter, V, which - // could be a Color4, you can refer to T as - // V::BaseType - //-------------------------------------------------------------- - - typedef T BaseType; -}; - -//-------------- -// Stream output -//-------------- - -template -std::ostream & operator << (std::ostream &s, const Color4 &v); - -//---------------------------------------------------- -// Reverse multiplication: S * Color4 -//---------------------------------------------------- - -template Color4 operator * (S a, const Color4 &v); - -//------------------------- -// Typedefs for convenience -//------------------------- - -typedef Color3 Color3f; -typedef Color3 Color3h; -typedef Color3 Color3c; -typedef Color3 C3h; -typedef Color3 C3f; -typedef Color3 C3c; -typedef Color4 Color4f; -typedef Color4 Color4h; -typedef Color4 Color4c; -typedef Color4 C4f; -typedef Color4 C4h; -typedef Color4 C4c; -typedef unsigned int PackedColor; - - -//------------------------- -// Implementation of Color3 -//------------------------- - -template -inline -Color3::Color3 (): Vec3 () -{ - // empty -} - -template -inline -Color3::Color3 (T a): Vec3 (a) -{ - // empty -} - -template -inline -Color3::Color3 (T a, T b, T c): Vec3 (a, b, c) -{ - // empty -} - -template -inline -Color3::Color3 (const Color3 &c): Vec3 (c) -{ - // empty -} - -template -template -inline -Color3::Color3 (const Vec3 &v): Vec3 (v) -{ - //empty -} - -template -inline const Color3 & -Color3::operator = (const Color3 &c) -{ - *((Vec3 *) this) = c; - return *this; -} - -template -inline const Color3 & -Color3::operator += (const Color3 &c) -{ - *((Vec3 *) this) += c; - return *this; -} - -template -inline Color3 -Color3::operator + (const Color3 &c) const -{ - return Color3 (*(Vec3 *)this + (const Vec3 &)c); -} - -template -inline const Color3 & -Color3::operator -= (const Color3 &c) -{ - *((Vec3 *) this) -= c; - return *this; -} - -template -inline Color3 -Color3::operator - (const Color3 &c) const -{ - return Color3 (*(Vec3 *)this - (const Vec3 &)c); -} - -template -inline Color3 -Color3::operator - () const -{ - return Color3 (-(*(Vec3 *)this)); -} - -template -inline const Color3 & -Color3::negate () -{ - ((Vec3 *) this)->negate(); - return *this; -} - -template -inline const Color3 & -Color3::operator *= (const Color3 &c) -{ - *((Vec3 *) this) *= c; - return *this; -} - -template -inline const Color3 & -Color3::operator *= (T a) -{ - *((Vec3 *) this) *= a; - return *this; -} - -template -inline Color3 -Color3::operator * (const Color3 &c) const -{ - return Color3 (*(Vec3 *)this * (const Vec3 &)c); -} - -template -inline Color3 -Color3::operator * (T a) const -{ - return Color3 (*(Vec3 *)this * a); -} - -template -inline const Color3 & -Color3::operator /= (const Color3 &c) -{ - *((Vec3 *) this) /= c; - return *this; -} - -template -inline const Color3 & -Color3::operator /= (T a) -{ - *((Vec3 *) this) /= a; - return *this; -} - -template -inline Color3 -Color3::operator / (const Color3 &c) const -{ - return Color3 (*(Vec3 *)this / (const Vec3 &)c); -} - -template -inline Color3 -Color3::operator / (T a) const -{ - return Color3 (*(Vec3 *)this / a); -} - -//----------------------- -// Implementation of Color4 -//----------------------- - -template -inline T & -Color4::operator [] (int i) -{ - return (&r)[i]; -} - -template -inline const T & -Color4::operator [] (int i) const -{ - return (&r)[i]; -} - -template -inline -Color4::Color4 () -{ - // empty -} - -template -inline -Color4::Color4 (T x) -{ - r = g = b = a = x; -} - -template -inline -Color4::Color4 (T x, T y, T z, T w) -{ - r = x; - g = y; - b = z; - a = w; -} - -template -inline -Color4::Color4 (const Color4 &v) -{ - r = v.r; - g = v.g; - b = v.b; - a = v.a; -} - -template -template -inline -Color4::Color4 (const Color4 &v) -{ - r = T (v.r); - g = T (v.g); - b = T (v.b); - a = T (v.a); -} - -template -inline const Color4 & -Color4::operator = (const Color4 &v) -{ - r = v.r; - g = v.g; - b = v.b; - a = v.a; - return *this; -} - -template -template -inline void -Color4::setValue (S x, S y, S z, S w) -{ - r = T (x); - g = T (y); - b = T (z); - a = T (w); -} - -template -template -inline void -Color4::setValue (const Color4 &v) -{ - r = T (v.r); - g = T (v.g); - b = T (v.b); - a = T (v.a); -} - -template -template -inline void -Color4::getValue (S &x, S &y, S &z, S &w) const -{ - x = S (r); - y = S (g); - z = S (b); - w = S (a); -} - -template -template -inline void -Color4::getValue (Color4 &v) const -{ - v.r = S (r); - v.g = S (g); - v.b = S (b); - v.a = S (a); -} - -template -inline T * -Color4::getValue() -{ - return (T *) &r; -} - -template -inline const T * -Color4::getValue() const -{ - return (const T *) &r; -} - -template -template -inline bool -Color4::operator == (const Color4 &v) const -{ - return r == v.r && g == v.g && b == v.b && a == v.a; -} - -template -template -inline bool -Color4::operator != (const Color4 &v) const -{ - return r != v.r || g != v.g || b != v.b || a != v.a; -} - -template -inline const Color4 & -Color4::operator += (const Color4 &v) -{ - r += v.r; - g += v.g; - b += v.b; - a += v.a; - return *this; -} - -template -inline Color4 -Color4::operator + (const Color4 &v) const -{ - return Color4 (r + v.r, g + v.g, b + v.b, a + v.a); -} - -template -inline const Color4 & -Color4::operator -= (const Color4 &v) -{ - r -= v.r; - g -= v.g; - b -= v.b; - a -= v.a; - return *this; -} - -template -inline Color4 -Color4::operator - (const Color4 &v) const -{ - return Color4 (r - v.r, g - v.g, b - v.b, a - v.a); -} - -template -inline Color4 -Color4::operator - () const -{ - return Color4 (-r, -g, -b, -a); -} - -template -inline const Color4 & -Color4::negate () -{ - r = -r; - g = -g; - b = -b; - a = -a; - return *this; -} - -template -inline const Color4 & -Color4::operator *= (const Color4 &v) -{ - r *= v.r; - g *= v.g; - b *= v.b; - a *= v.a; - return *this; -} - -template -inline const Color4 & -Color4::operator *= (T x) -{ - r *= x; - g *= x; - b *= x; - a *= x; - return *this; -} - -template -inline Color4 -Color4::operator * (const Color4 &v) const -{ - return Color4 (r * v.r, g * v.g, b * v.b, a * v.a); -} - -template -inline Color4 -Color4::operator * (T x) const -{ - return Color4 (r * x, g * x, b * x, a * x); -} - -template -inline const Color4 & -Color4::operator /= (const Color4 &v) -{ - r /= v.r; - g /= v.g; - b /= v.b; - a /= v.a; - return *this; -} - -template -inline const Color4 & -Color4::operator /= (T x) -{ - r /= x; - g /= x; - b /= x; - a /= x; - return *this; -} - -template -inline Color4 -Color4::operator / (const Color4 &v) const -{ - return Color4 (r / v.r, g / v.g, b / v.b, a / v.a); -} - -template -inline Color4 -Color4::operator / (T x) const -{ - return Color4 (r / x, g / x, b / x, a / x); -} - - -template -std::ostream & -operator << (std::ostream &s, const Color4 &v) -{ - return s << '(' << v.r << ' ' << v.g << ' ' << v.b << ' ' << v.a << ')'; -} - -//----------------------------------------- -// Implementation of reverse multiplication -//----------------------------------------- - -template -inline Color4 -operator * (S x, const Color4 &v) -{ - return Color4 (x * v.r, x * v.g, x * v.b, x * v.a); -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHCOLOR_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathColorAlgo.cpp b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathColorAlgo.cpp deleted file mode 100644 index a351c40..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathColorAlgo.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -//---------------------------------------------------------------------------- -// -// Implementation of non-template items declared in ImathColorAlgo.h -// -//---------------------------------------------------------------------------- - -#include "ImathColorAlgo.h" - -IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER - - -Vec3 -hsv2rgb_d(const Vec3 &hsv) -{ - double hue = hsv.x; - double sat = hsv.y; - double val = hsv.z; - - double x = 0.0, y = 0.0, z = 0.0; - - if (hue == 1) hue = 0; - else hue *= 6; - - int i = int(Math::floor(hue)); - double f = hue-i; - double p = val*(1-sat); - double q = val*(1-(sat*f)); - double t = val*(1-(sat*(1-f))); - - switch (i) - { - case 0: x = val; y = t; z = p; break; - case 1: x = q; y = val; z = p; break; - case 2: x = p; y = val; z = t; break; - case 3: x = p; y = q; z = val; break; - case 4: x = t; y = p; z = val; break; - case 5: x = val; y = p; z = q; break; - } - - return Vec3(x,y,z); -} - - -Color4 -hsv2rgb_d(const Color4 &hsv) -{ - double hue = hsv.r; - double sat = hsv.g; - double val = hsv.b; - - double r = 0.0, g = 0.0, b = 0.0; - - if (hue == 1) hue = 0; - else hue *= 6; - - int i = int(Math::floor(hue)); - double f = hue-i; - double p = val*(1-sat); - double q = val*(1-(sat*f)); - double t = val*(1-(sat*(1-f))); - - switch (i) - { - case 0: r = val; g = t; b = p; break; - case 1: r = q; g = val; b = p; break; - case 2: r = p; g = val; b = t; break; - case 3: r = p; g = q; b = val; break; - case 4: r = t; g = p; b = val; break; - case 5: r = val; g = p; b = q; break; - } - - return Color4(r,g,b,hsv.a); -} - - - -Vec3 -rgb2hsv_d(const Vec3 &c) -{ - const double &x = c.x; - const double &y = c.y; - const double &z = c.z; - - double max = (x > y) ? ((x > z) ? x : z) : ((y > z) ? y : z); - double min = (x < y) ? ((x < z) ? x : z) : ((y < z) ? y : z); - double range = max - min; - double val = max; - double sat = 0; - double hue = 0; - - if (max != 0) sat = range/max; - - if (sat != 0) - { - double h; - - if (x == max) h = (y - z) / range; - else if (y == max) h = 2 + (z - x) / range; - else h = 4 + (x - y) / range; - - hue = h/6.; - - if (hue < 0.) - hue += 1.0; - } - return Vec3(hue,sat,val); -} - - -Color4 -rgb2hsv_d(const Color4 &c) -{ - const double &r = c.r; - const double &g = c.g; - const double &b = c.b; - - double max = (r > g) ? ((r > b) ? r : b) : ((g > b) ? g : b); - double min = (r < g) ? ((r < b) ? r : b) : ((g < b) ? g : b); - double range = max - min; - double val = max; - double sat = 0; - double hue = 0; - - if (max != 0) sat = range/max; - - if (sat != 0) - { - double h; - - if (r == max) h = (g - b) / range; - else if (g == max) h = 2 + (b - r) / range; - else h = 4 + (r - g) / range; - - hue = h/6.; - - if (hue < 0.) - hue += 1.0; - } - return Color4(hue,sat,val,c.a); -} - - -IMATH_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathColorAlgo.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathColorAlgo.h deleted file mode 100644 index cbc3be4..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathColorAlgo.h +++ /dev/null @@ -1,257 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHCOLORALGO_H -#define INCLUDED_IMATHCOLORALGO_H - - -#include "ImathColor.h" -#include "ImathExport.h" -#include "ImathMath.h" -#include "ImathLimits.h" -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -// -// Non-templated helper routines for color conversion. -// These routines eliminate type warnings under g++. -// - -IMATH_EXPORT Vec3 hsv2rgb_d(const Vec3 &hsv); - -IMATH_EXPORT Color4 hsv2rgb_d(const Color4 &hsv); - -IMATH_EXPORT Vec3 rgb2hsv_d(const Vec3 &rgb); - -IMATH_EXPORT Color4 rgb2hsv_d(const Color4 &rgb); - - -// -// Color conversion functions and general color algorithms -// -// hsv2rgb(), rgb2hsv(), rgb2packed(), packed2rgb() -// see each funtion definition for details. -// - -template -Vec3 -hsv2rgb(const Vec3 &hsv) -{ - if ( limits::isIntegral() ) - { - Vec3 v = Vec3(hsv.x / double(limits::max()), - hsv.y / double(limits::max()), - hsv.z / double(limits::max())); - Vec3 c = hsv2rgb_d(v); - return Vec3((T) (c.x * limits::max()), - (T) (c.y * limits::max()), - (T) (c.z * limits::max())); - } - else - { - Vec3 v = Vec3(hsv.x, hsv.y, hsv.z); - Vec3 c = hsv2rgb_d(v); - return Vec3((T) c.x, (T) c.y, (T) c.z); - } -} - - -template -Color4 -hsv2rgb(const Color4 &hsv) -{ - if ( limits::isIntegral() ) - { - Color4 v = Color4(hsv.r / float(limits::max()), - hsv.g / float(limits::max()), - hsv.b / float(limits::max()), - hsv.a / float(limits::max())); - Color4 c = hsv2rgb_d(v); - return Color4((T) (c.r * limits::max()), - (T) (c.g * limits::max()), - (T) (c.b * limits::max()), - (T) (c.a * limits::max())); - } - else - { - Color4 v = Color4(hsv.r, hsv.g, hsv.b, hsv.a); - Color4 c = hsv2rgb_d(v); - return Color4((T) c.r, (T) c.g, (T) c.b, (T) c.a); - } -} - - -template -Vec3 -rgb2hsv(const Vec3 &rgb) -{ - if ( limits::isIntegral() ) - { - Vec3 v = Vec3(rgb.x / double(limits::max()), - rgb.y / double(limits::max()), - rgb.z / double(limits::max())); - Vec3 c = rgb2hsv_d(v); - return Vec3((T) (c.x * limits::max()), - (T) (c.y * limits::max()), - (T) (c.z * limits::max())); - } - else - { - Vec3 v = Vec3(rgb.x, rgb.y, rgb.z); - Vec3 c = rgb2hsv_d(v); - return Vec3((T) c.x, (T) c.y, (T) c.z); - } -} - - -template -Color4 -rgb2hsv(const Color4 &rgb) -{ - if ( limits::isIntegral() ) - { - Color4 v = Color4(rgb.r / float(limits::max()), - rgb.g / float(limits::max()), - rgb.b / float(limits::max()), - rgb.a / float(limits::max())); - Color4 c = rgb2hsv_d(v); - return Color4((T) (c.r * limits::max()), - (T) (c.g * limits::max()), - (T) (c.b * limits::max()), - (T) (c.a * limits::max())); - } - else - { - Color4 v = Color4(rgb.r, rgb.g, rgb.b, rgb.a); - Color4 c = rgb2hsv_d(v); - return Color4((T) c.r, (T) c.g, (T) c.b, (T) c.a); - } -} - -template -PackedColor -rgb2packed(const Vec3 &c) -{ - if ( limits::isIntegral() ) - { - float x = c.x / float(limits::max()); - float y = c.y / float(limits::max()); - float z = c.z / float(limits::max()); - return rgb2packed( V3f(x,y,z) ); - } - else - { - return ( (PackedColor) (c.x * 255) | - (((PackedColor) (c.y * 255)) << 8) | - (((PackedColor) (c.z * 255)) << 16) | 0xFF000000 ); - } -} - -template -PackedColor -rgb2packed(const Color4 &c) -{ - if ( limits::isIntegral() ) - { - float r = c.r / float(limits::max()); - float g = c.g / float(limits::max()); - float b = c.b / float(limits::max()); - float a = c.a / float(limits::max()); - return rgb2packed( C4f(r,g,b,a) ); - } - else - { - return ( (PackedColor) (c.r * 255) | - (((PackedColor) (c.g * 255)) << 8) | - (((PackedColor) (c.b * 255)) << 16) | - (((PackedColor) (c.a * 255)) << 24)); - } -} - -// -// This guy can't return the result because the template -// parameter would not be in the function signiture. So instead, -// its passed in as an argument. -// - -template -void -packed2rgb(PackedColor packed, Vec3 &out) -{ - if ( limits::isIntegral() ) - { - T f = limits::max() / ((PackedColor)0xFF); - out.x = (packed & 0xFF) * f; - out.y = ((packed & 0xFF00) >> 8) * f; - out.z = ((packed & 0xFF0000) >> 16) * f; - } - else - { - T f = T(1) / T(255); - out.x = (packed & 0xFF) * f; - out.y = ((packed & 0xFF00) >> 8) * f; - out.z = ((packed & 0xFF0000) >> 16) * f; - } -} - -template -void -packed2rgb(PackedColor packed, Color4 &out) -{ - if ( limits::isIntegral() ) - { - T f = limits::max() / ((PackedColor)0xFF); - out.r = (packed & 0xFF) * f; - out.g = ((packed & 0xFF00) >> 8) * f; - out.b = ((packed & 0xFF0000) >> 16) * f; - out.a = ((packed & 0xFF000000) >> 24) * f; - } - else - { - T f = T(1) / T(255); - out.r = (packed & 0xFF) * f; - out.g = ((packed & 0xFF00) >> 8) * f; - out.b = ((packed & 0xFF0000) >> 16) * f; - out.a = ((packed & 0xFF000000) >> 24) * f; - } -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHCOLORALGO_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathEuler.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathEuler.h deleted file mode 100644 index 254c76f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathEuler.h +++ /dev/null @@ -1,926 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHEULER_H -#define INCLUDED_IMATHEULER_H - -//---------------------------------------------------------------------- -// -// template class Euler -// -// This class represents euler angle orientations. The class -// inherits from Vec3 to it can be freely cast. The additional -// information is the euler priorities rep. This class is -// essentially a rip off of Ken Shoemake's GemsIV code. It has -// been modified minimally to make it more understandable, but -// hardly enough to make it easy to grok completely. -// -// There are 24 possible combonations of Euler angle -// representations of which 12 are common in CG and you will -// probably only use 6 of these which in this scheme are the -// non-relative-non-repeating types. -// -// The representations can be partitioned according to two -// criteria: -// -// 1) Are the angles measured relative to a set of fixed axis -// or relative to each other (the latter being what happens -// when rotation matrices are multiplied together and is -// almost ubiquitous in the cg community) -// -// 2) Is one of the rotations repeated (ala XYX rotation) -// -// When you construct a given representation from scratch you -// must order the angles according to their priorities. So, the -// easiest is a softimage or aerospace (yaw/pitch/roll) ordering -// of ZYX. -// -// float x_rot = 1; -// float y_rot = 2; -// float z_rot = 3; -// -// Eulerf angles(z_rot, y_rot, x_rot, Eulerf::ZYX); -// -or- -// Eulerf angles( V3f(z_rot,y_rot,z_rot), Eulerf::ZYX ); -// -// If instead, the order was YXZ for instance you would have to -// do this: -// -// float x_rot = 1; -// float y_rot = 2; -// float z_rot = 3; -// -// Eulerf angles(y_rot, x_rot, z_rot, Eulerf::YXZ); -// -or- -// Eulerf angles( V3f(y_rot,x_rot,z_rot), Eulerf::YXZ ); -// -// Notice how the order you put the angles into the three slots -// should correspond to the enum (YXZ) ordering. The input angle -// vector is called the "ijk" vector -- not an "xyz" vector. The -// ijk vector order is the same as the enum. If you treat the -// Euler<> as a Vec<> (which it inherts from) you will find the -// angles are ordered in the same way, i.e.: -// -// V3f v = angles; -// // v.x == y_rot, v.y == x_rot, v.z == z_rot -// -// If you just want the x, y, and z angles stored in a vector in -// that order, you can do this: -// -// V3f v = angles.toXYZVector() -// // v.x == x_rot, v.y == y_rot, v.z == z_rot -// -// If you want to set the Euler with an XYZVector use the -// optional layout argument: -// -// Eulerf angles(x_rot, y_rot, z_rot, -// Eulerf::YXZ, -// Eulerf::XYZLayout); -// -// This is the same as: -// -// Eulerf angles(y_rot, x_rot, z_rot, Eulerf::YXZ); -// -// Note that this won't do anything intelligent if you have a -// repeated axis in the euler angles (e.g. XYX) -// -// If you need to use the "relative" versions of these, you will -// need to use the "r" enums. -// -// The units of the rotation angles are assumed to be radians. -// -//---------------------------------------------------------------------- - - -#include "ImathMath.h" -#include "ImathVec.h" -#include "ImathQuat.h" -#include "ImathMatrix.h" -#include "ImathLimits.h" -#include "ImathNamespace.h" - -#include - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -// Disable MS VC++ warnings about conversion from double to float -#pragma warning(disable:4244) -#endif - -template -class Euler : public Vec3 -{ - public: - - using Vec3::x; - using Vec3::y; - using Vec3::z; - - enum Order - { - // - // All 24 possible orderings - // - - XYZ = 0x0101, // "usual" orderings - XZY = 0x0001, - YZX = 0x1101, - YXZ = 0x1001, - ZXY = 0x2101, - ZYX = 0x2001, - - XZX = 0x0011, // first axis repeated - XYX = 0x0111, - YXY = 0x1011, - YZY = 0x1111, - ZYZ = 0x2011, - ZXZ = 0x2111, - - XYZr = 0x2000, // relative orderings -- not common - XZYr = 0x2100, - YZXr = 0x1000, - YXZr = 0x1100, - ZXYr = 0x0000, - ZYXr = 0x0100, - - XZXr = 0x2110, // relative first axis repeated - XYXr = 0x2010, - YXYr = 0x1110, - YZYr = 0x1010, - ZYZr = 0x0110, - ZXZr = 0x0010, - // |||| - // VVVV - // Legend: ABCD - // A -> Initial Axis (0==x, 1==y, 2==z) - // B -> Parity Even (1==true) - // C -> Initial Repeated (1==true) - // D -> Frame Static (1==true) - // - - Legal = XYZ | XZY | YZX | YXZ | ZXY | ZYX | - XZX | XYX | YXY | YZY | ZYZ | ZXZ | - XYZr| XZYr| YZXr| YXZr| ZXYr| ZYXr| - XZXr| XYXr| YXYr| YZYr| ZYZr| ZXZr, - - Min = 0x0000, - Max = 0x2111, - Default = XYZ - }; - - enum Axis { X = 0, Y = 1, Z = 2 }; - - enum InputLayout { XYZLayout, IJKLayout }; - - //-------------------------------------------------------------------- - // Constructors -- all default to ZYX non-relative ala softimage - // (where there is no argument to specify it) - // - // The Euler-from-matrix constructors assume that the matrix does - // not include shear or non-uniform scaling, but the constructors - // do not examine the matrix to verify this assumption. If necessary, - // you can adjust the matrix by calling the removeScalingAndShear() - // function, defined in ImathMatrixAlgo.h. - //-------------------------------------------------------------------- - - Euler(); - Euler(const Euler&); - Euler(Order p); - Euler(const Vec3 &v, Order o = Default, InputLayout l = IJKLayout); - Euler(T i, T j, T k, Order o = Default, InputLayout l = IJKLayout); - Euler(const Euler &euler, Order newp); - Euler(const Matrix33 &, Order o = Default); - Euler(const Matrix44 &, Order o = Default); - - //--------------------------------- - // Algebraic functions/ Operators - //--------------------------------- - - const Euler& operator= (const Euler&); - const Euler& operator= (const Vec3&); - - //-------------------------------------------------------- - // Set the euler value - // This does NOT convert the angles, but setXYZVector() - // does reorder the input vector. - //-------------------------------------------------------- - - static bool legal(Order); - - void setXYZVector(const Vec3 &); - - Order order() const; - void setOrder(Order); - - void set(Axis initial, - bool relative, - bool parityEven, - bool firstRepeats); - - //------------------------------------------------------------ - // Conversions, toXYZVector() reorders the angles so that - // the X rotation comes first, followed by the Y and Z - // in cases like XYX ordering, the repeated angle will be - // in the "z" component - // - // The Euler-from-matrix extract() functions assume that the - // matrix does not include shear or non-uniform scaling, but - // the extract() functions do not examine the matrix to verify - // this assumption. If necessary, you can adjust the matrix - // by calling the removeScalingAndShear() function, defined - // in ImathMatrixAlgo.h. - //------------------------------------------------------------ - - void extract(const Matrix33&); - void extract(const Matrix44&); - void extract(const Quat&); - - Matrix33 toMatrix33() const; - Matrix44 toMatrix44() const; - Quat toQuat() const; - Vec3 toXYZVector() const; - - //--------------------------------------------------- - // Use this function to unpack angles from ijk form - //--------------------------------------------------- - - void angleOrder(int &i, int &j, int &k) const; - - //--------------------------------------------------- - // Use this function to determine mapping from xyz to ijk - // - reshuffles the xyz to match the order - //--------------------------------------------------- - - void angleMapping(int &i, int &j, int &k) const; - - //---------------------------------------------------------------------- - // - // Utility methods for getting continuous rotations. None of these - // methods change the orientation given by its inputs (or at least - // that is the intent). - // - // angleMod() converts an angle to its equivalent in [-PI, PI] - // - // simpleXYZRotation() adjusts xyzRot so that its components differ - // from targetXyzRot by no more than +-PI - // - // nearestRotation() adjusts xyzRot so that its components differ - // from targetXyzRot by as little as possible. - // Note that xyz here really means ijk, because - // the order must be provided. - // - // makeNear() adjusts "this" Euler so that its components differ - // from target by as little as possible. This method - // might not make sense for Eulers with different order - // and it probably doesn't work for repeated axis and - // relative orderings (TODO). - // - //----------------------------------------------------------------------- - - static float angleMod (T angle); - static void simpleXYZRotation (Vec3 &xyzRot, - const Vec3 &targetXyzRot); - static void nearestRotation (Vec3 &xyzRot, - const Vec3 &targetXyzRot, - Order order = XYZ); - - void makeNear (const Euler &target); - - bool frameStatic() const { return _frameStatic; } - bool initialRepeated() const { return _initialRepeated; } - bool parityEven() const { return _parityEven; } - Axis initialAxis() const { return _initialAxis; } - - protected: - - bool _frameStatic : 1; // relative or static rotations - bool _initialRepeated : 1; // init axis repeated as last - bool _parityEven : 1; // "parity of axis permutation" -#if defined _WIN32 || defined _WIN64 - Axis _initialAxis ; // First axis of rotation -#else - Axis _initialAxis : 2; // First axis of rotation -#endif -}; - - -//-------------------- -// Convenient typedefs -//-------------------- - -typedef Euler Eulerf; -typedef Euler Eulerd; - - -//--------------- -// Implementation -//--------------- - -template -inline void - Euler::angleOrder(int &i, int &j, int &k) const -{ - i = _initialAxis; - j = _parityEven ? (i+1)%3 : (i > 0 ? i-1 : 2); - k = _parityEven ? (i > 0 ? i-1 : 2) : (i+1)%3; -} - -template -inline void - Euler::angleMapping(int &i, int &j, int &k) const -{ - int m[3]; - - m[_initialAxis] = 0; - m[(_initialAxis+1) % 3] = _parityEven ? 1 : 2; - m[(_initialAxis+2) % 3] = _parityEven ? 2 : 1; - i = m[0]; - j = m[1]; - k = m[2]; -} - -template -inline void -Euler::setXYZVector(const Vec3 &v) -{ - int i,j,k; - angleMapping(i,j,k); - (*this)[i] = v.x; - (*this)[j] = v.y; - (*this)[k] = v.z; -} - -template -inline Vec3 -Euler::toXYZVector() const -{ - int i,j,k; - angleMapping(i,j,k); - return Vec3((*this)[i],(*this)[j],(*this)[k]); -} - - -template -Euler::Euler() : - Vec3(0,0,0), - _frameStatic(true), - _initialRepeated(false), - _parityEven(true), - _initialAxis(X) -{} - -template -Euler::Euler(typename Euler::Order p) : - Vec3(0,0,0), - _frameStatic(true), - _initialRepeated(false), - _parityEven(true), - _initialAxis(X) -{ - setOrder(p); -} - -template -inline Euler::Euler( const Vec3 &v, - typename Euler::Order p, - typename Euler::InputLayout l ) -{ - setOrder(p); - if ( l == XYZLayout ) setXYZVector(v); - else { x = v.x; y = v.y; z = v.z; } -} - -template -inline Euler::Euler(const Euler &euler) -{ - operator=(euler); -} - -template -inline Euler::Euler(const Euler &euler,Order p) -{ - setOrder(p); - Matrix33 M = euler.toMatrix33(); - extract(M); -} - -template -inline Euler::Euler( T xi, T yi, T zi, - typename Euler::Order p, - typename Euler::InputLayout l) -{ - setOrder(p); - if ( l == XYZLayout ) setXYZVector(Vec3(xi,yi,zi)); - else { x = xi; y = yi; z = zi; } -} - -template -inline Euler::Euler( const Matrix33 &M, typename Euler::Order p ) -{ - setOrder(p); - extract(M); -} - -template -inline Euler::Euler( const Matrix44 &M, typename Euler::Order p ) -{ - setOrder(p); - extract(M); -} - -template -inline void Euler::extract(const Quat &q) -{ - extract(q.toMatrix33()); -} - -template -void Euler::extract(const Matrix33 &M) -{ - int i,j,k; - angleOrder(i,j,k); - - if (_initialRepeated) - { - // - // Extract the first angle, x. - // - - x = Math::atan2 (M[j][i], M[k][i]); - - // - // Remove the x rotation from M, so that the remaining - // rotation, N, is only around two axes, and gimbal lock - // cannot occur. - // - - Vec3 r (0, 0, 0); - r[i] = (_parityEven? -x: x); - - Matrix44 N; - N.rotate (r); - - N = N * Matrix44 (M[0][0], M[0][1], M[0][2], 0, - M[1][0], M[1][1], M[1][2], 0, - M[2][0], M[2][1], M[2][2], 0, - 0, 0, 0, 1); - // - // Extract the other two angles, y and z, from N. - // - - T sy = Math::sqrt (N[j][i]*N[j][i] + N[k][i]*N[k][i]); - y = Math::atan2 (sy, N[i][i]); - z = Math::atan2 (N[j][k], N[j][j]); - } - else - { - // - // Extract the first angle, x. - // - - x = Math::atan2 (M[j][k], M[k][k]); - - // - // Remove the x rotation from M, so that the remaining - // rotation, N, is only around two axes, and gimbal lock - // cannot occur. - // - - Vec3 r (0, 0, 0); - r[i] = (_parityEven? -x: x); - - Matrix44 N; - N.rotate (r); - - N = N * Matrix44 (M[0][0], M[0][1], M[0][2], 0, - M[1][0], M[1][1], M[1][2], 0, - M[2][0], M[2][1], M[2][2], 0, - 0, 0, 0, 1); - // - // Extract the other two angles, y and z, from N. - // - - T cy = Math::sqrt (N[i][i]*N[i][i] + N[i][j]*N[i][j]); - y = Math::atan2 (-N[i][k], cy); - z = Math::atan2 (-N[j][i], N[j][j]); - } - - if (!_parityEven) - *this *= -1; - - if (!_frameStatic) - { - T t = x; - x = z; - z = t; - } -} - -template -void Euler::extract(const Matrix44 &M) -{ - int i,j,k; - angleOrder(i,j,k); - - if (_initialRepeated) - { - // - // Extract the first angle, x. - // - - x = Math::atan2 (M[j][i], M[k][i]); - - // - // Remove the x rotation from M, so that the remaining - // rotation, N, is only around two axes, and gimbal lock - // cannot occur. - // - - Vec3 r (0, 0, 0); - r[i] = (_parityEven? -x: x); - - Matrix44 N; - N.rotate (r); - N = N * M; - - // - // Extract the other two angles, y and z, from N. - // - - T sy = Math::sqrt (N[j][i]*N[j][i] + N[k][i]*N[k][i]); - y = Math::atan2 (sy, N[i][i]); - z = Math::atan2 (N[j][k], N[j][j]); - } - else - { - // - // Extract the first angle, x. - // - - x = Math::atan2 (M[j][k], M[k][k]); - - // - // Remove the x rotation from M, so that the remaining - // rotation, N, is only around two axes, and gimbal lock - // cannot occur. - // - - Vec3 r (0, 0, 0); - r[i] = (_parityEven? -x: x); - - Matrix44 N; - N.rotate (r); - N = N * M; - - // - // Extract the other two angles, y and z, from N. - // - - T cy = Math::sqrt (N[i][i]*N[i][i] + N[i][j]*N[i][j]); - y = Math::atan2 (-N[i][k], cy); - z = Math::atan2 (-N[j][i], N[j][j]); - } - - if (!_parityEven) - *this *= -1; - - if (!_frameStatic) - { - T t = x; - x = z; - z = t; - } -} - -template -Matrix33 Euler::toMatrix33() const -{ - int i,j,k; - angleOrder(i,j,k); - - Vec3 angles; - - if ( _frameStatic ) angles = (*this); - else angles = Vec3(z,y,x); - - if ( !_parityEven ) angles *= -1.0; - - T ci = Math::cos(angles.x); - T cj = Math::cos(angles.y); - T ch = Math::cos(angles.z); - T si = Math::sin(angles.x); - T sj = Math::sin(angles.y); - T sh = Math::sin(angles.z); - - T cc = ci*ch; - T cs = ci*sh; - T sc = si*ch; - T ss = si*sh; - - Matrix33 M; - - if ( _initialRepeated ) - { - M[i][i] = cj; M[j][i] = sj*si; M[k][i] = sj*ci; - M[i][j] = sj*sh; M[j][j] = -cj*ss+cc; M[k][j] = -cj*cs-sc; - M[i][k] = -sj*ch; M[j][k] = cj*sc+cs; M[k][k] = cj*cc-ss; - } - else - { - M[i][i] = cj*ch; M[j][i] = sj*sc-cs; M[k][i] = sj*cc+ss; - M[i][j] = cj*sh; M[j][j] = sj*ss+cc; M[k][j] = sj*cs-sc; - M[i][k] = -sj; M[j][k] = cj*si; M[k][k] = cj*ci; - } - - return M; -} - -template -Matrix44 Euler::toMatrix44() const -{ - int i,j,k; - angleOrder(i,j,k); - - Vec3 angles; - - if ( _frameStatic ) angles = (*this); - else angles = Vec3(z,y,x); - - if ( !_parityEven ) angles *= -1.0; - - T ci = Math::cos(angles.x); - T cj = Math::cos(angles.y); - T ch = Math::cos(angles.z); - T si = Math::sin(angles.x); - T sj = Math::sin(angles.y); - T sh = Math::sin(angles.z); - - T cc = ci*ch; - T cs = ci*sh; - T sc = si*ch; - T ss = si*sh; - - Matrix44 M; - - if ( _initialRepeated ) - { - M[i][i] = cj; M[j][i] = sj*si; M[k][i] = sj*ci; - M[i][j] = sj*sh; M[j][j] = -cj*ss+cc; M[k][j] = -cj*cs-sc; - M[i][k] = -sj*ch; M[j][k] = cj*sc+cs; M[k][k] = cj*cc-ss; - } - else - { - M[i][i] = cj*ch; M[j][i] = sj*sc-cs; M[k][i] = sj*cc+ss; - M[i][j] = cj*sh; M[j][j] = sj*ss+cc; M[k][j] = sj*cs-sc; - M[i][k] = -sj; M[j][k] = cj*si; M[k][k] = cj*ci; - } - - return M; -} - -template -Quat Euler::toQuat() const -{ - Vec3 angles; - int i,j,k; - angleOrder(i,j,k); - - if ( _frameStatic ) angles = (*this); - else angles = Vec3(z,y,x); - - if ( !_parityEven ) angles.y = -angles.y; - - T ti = angles.x*0.5; - T tj = angles.y*0.5; - T th = angles.z*0.5; - T ci = Math::cos(ti); - T cj = Math::cos(tj); - T ch = Math::cos(th); - T si = Math::sin(ti); - T sj = Math::sin(tj); - T sh = Math::sin(th); - T cc = ci*ch; - T cs = ci*sh; - T sc = si*ch; - T ss = si*sh; - - T parity = _parityEven ? 1.0 : -1.0; - - Quat q; - Vec3 a; - - if ( _initialRepeated ) - { - a[i] = cj*(cs + sc); - a[j] = sj*(cc + ss) * parity, - a[k] = sj*(cs - sc); - q.r = cj*(cc - ss); - } - else - { - a[i] = cj*sc - sj*cs, - a[j] = (cj*ss + sj*cc) * parity, - a[k] = cj*cs - sj*sc; - q.r = cj*cc + sj*ss; - } - - q.v = a; - - return q; -} - -template -inline bool -Euler::legal(typename Euler::Order order) -{ - return (order & ~Legal) ? false : true; -} - -template -typename Euler::Order -Euler::order() const -{ - int foo = (_initialAxis == Z ? 0x2000 : (_initialAxis == Y ? 0x1000 : 0)); - - if (_parityEven) foo |= 0x0100; - if (_initialRepeated) foo |= 0x0010; - if (_frameStatic) foo++; - - return (Order)foo; -} - -template -inline void Euler::setOrder(typename Euler::Order p) -{ - set( p & 0x2000 ? Z : (p & 0x1000 ? Y : X), // initial axis - !(p & 0x1), // static? - !!(p & 0x100), // permutation even? - !!(p & 0x10)); // initial repeats? -} - -template -void Euler::set(typename Euler::Axis axis, - bool relative, - bool parityEven, - bool firstRepeats) -{ - _initialAxis = axis; - _frameStatic = !relative; - _parityEven = parityEven; - _initialRepeated = firstRepeats; -} - -template -const Euler& Euler::operator= (const Euler &euler) -{ - x = euler.x; - y = euler.y; - z = euler.z; - _initialAxis = euler._initialAxis; - _frameStatic = euler._frameStatic; - _parityEven = euler._parityEven; - _initialRepeated = euler._initialRepeated; - return *this; -} - -template -const Euler& Euler::operator= (const Vec3 &v) -{ - x = v.x; - y = v.y; - z = v.z; - return *this; -} - -template -std::ostream& operator << (std::ostream &o, const Euler &euler) -{ - char a[3] = { 'X', 'Y', 'Z' }; - - const char* r = euler.frameStatic() ? "" : "r"; - int i,j,k; - euler.angleOrder(i,j,k); - - if ( euler.initialRepeated() ) k = i; - - return o << "(" - << euler.x << " " - << euler.y << " " - << euler.z << " " - << a[i] << a[j] << a[k] << r << ")"; -} - -template -float -Euler::angleMod (T angle) -{ - angle = fmod(T (angle), T (2 * M_PI)); - - if (angle < -M_PI) angle += 2 * M_PI; - if (angle > +M_PI) angle -= 2 * M_PI; - - return angle; -} - -template -void -Euler::simpleXYZRotation (Vec3 &xyzRot, const Vec3 &targetXyzRot) -{ - Vec3 d = xyzRot - targetXyzRot; - xyzRot[0] = targetXyzRot[0] + angleMod(d[0]); - xyzRot[1] = targetXyzRot[1] + angleMod(d[1]); - xyzRot[2] = targetXyzRot[2] + angleMod(d[2]); -} - -template -void -Euler::nearestRotation (Vec3 &xyzRot, const Vec3 &targetXyzRot, - Order order) -{ - int i,j,k; - Euler e (0,0,0, order); - e.angleOrder(i,j,k); - - simpleXYZRotation(xyzRot, targetXyzRot); - - Vec3 otherXyzRot; - otherXyzRot[i] = M_PI+xyzRot[i]; - otherXyzRot[j] = M_PI-xyzRot[j]; - otherXyzRot[k] = M_PI+xyzRot[k]; - - simpleXYZRotation(otherXyzRot, targetXyzRot); - - Vec3 d = xyzRot - targetXyzRot; - Vec3 od = otherXyzRot - targetXyzRot; - T dMag = d.dot(d); - T odMag = od.dot(od); - - if (odMag < dMag) - { - xyzRot = otherXyzRot; - } -} - -template -void -Euler::makeNear (const Euler &target) -{ - Vec3 xyzRot = toXYZVector(); - Vec3 targetXyz; - if (order() != target.order()) - { - Euler targetSameOrder = Euler(target, order()); - targetXyz = targetSameOrder.toXYZVector(); - } - else - { - targetXyz = target.toXYZVector(); - } - - nearestRotation(xyzRot, targetXyz, order()); - - setXYZVector(xyzRot); -} - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -#pragma warning(default:4244) -#endif - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif // INCLUDED_IMATHEULER_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathExc.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathExc.h deleted file mode 100644 index 65af3b5..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathExc.h +++ /dev/null @@ -1,73 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMATHEXC_H -#define INCLUDED_IMATHEXC_H - - -//----------------------------------------------- -// -// Imath library-specific exceptions -// -//----------------------------------------------- - -#include "ImathNamespace.h" -#include "IexBaseExc.h" -#include "ImathExport.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -// Attempt to normalize null vector -DEFINE_EXC_EXP (IMATH_EXPORT, NullVecExc, ::IEX_NAMESPACE::MathExc) - -// Attempt to normalize a point at infinity -DEFINE_EXC_EXP (IMATH_EXPORT, InfPointExc, ::IEX_NAMESPACE::MathExc) - -// Attempt to normalize null quaternion -DEFINE_EXC_EXP (IMATH_EXPORT, NullQuatExc, ::IEX_NAMESPACE::MathExc) - -// Attempt to invert singular matrix -DEFINE_EXC_EXP (IMATH_EXPORT, SingMatrixExc, ::IEX_NAMESPACE::MathExc) - -// Attempt to remove zero scaling from matrix -DEFINE_EXC_EXP (IMATH_EXPORT, ZeroScaleExc, ::IEX_NAMESPACE::MathExc) - -// Attempt to normalize a vector of whose elementsare an integer type -DEFINE_EXC_EXP (IMATH_EXPORT, IntVecNormalizeExc, ::IEX_NAMESPACE::MathExc) - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHEXC_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathExport.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathExport.h deleted file mode 100644 index 4357c12..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathExport.h +++ /dev/null @@ -1,46 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#if defined(OPENEXR_DLL) - #if defined(IMATH_EXPORTS) - #define IMATH_EXPORT __declspec(dllexport) - #define IMATH_EXPORT_CONST extern __declspec(dllexport) - #else - #define IMATH_EXPORT __declspec(dllimport) - #define IMATH_EXPORT_CONST extern __declspec(dllimport) - #endif -#else - #define IMATH_EXPORT - #define IMATH_EXPORT_CONST extern const -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathForward.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathForward.h deleted file mode 100644 index 39d398c..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathForward.h +++ /dev/null @@ -1,72 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMATHFORWARD_H -#define INCLUDED_IMATHFORWARD_H - -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -// -// Basic template type declarations. -// - -template class Box; -template class Color3; -template class Color4; -template class Euler; -template class Frustum; -template class FrustumTest; -template class Interval; -template class Line3; -template class Matrix33; -template class Matrix44; -template class Plane3; -template class Quat; -template class Shear6; -template class Sphere3; -template class TMatrix; -template class TMatrixBase; -template class TMatrixData; -template class Vec2; -template class Vec3; -template class Vec4; - -class Rand32; -class Rand48; - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHFORWARD_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFrame.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFrame.h deleted file mode 100644 index 95ebb66..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFrame.h +++ /dev/null @@ -1,192 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHFRAME_H -#define INCLUDED_IMATHFRAME_H - -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -template class Vec3; -template class Matrix44; - -// -// These methods compute a set of reference frames, defined by their -// transformation matrix, along a curve. It is designed so that the -// array of points and the array of matrices used to fetch these routines -// don't need to be ordered as the curve. -// -// A typical usage would be : -// -// m[0] = IMATH_INTERNAL_NAMESPACE::firstFrame( p[0], p[1], p[2] ); -// for( int i = 1; i < n - 1; i++ ) -// { -// m[i] = IMATH_INTERNAL_NAMESPACE::nextFrame( m[i-1], p[i-1], p[i], t[i-1], t[i] ); -// } -// m[n-1] = IMATH_INTERNAL_NAMESPACE::lastFrame( m[n-2], p[n-2], p[n-1] ); -// -// See Graphics Gems I for the underlying algorithm. -// - -template Matrix44 firstFrame( const Vec3&, // First point - const Vec3&, // Second point - const Vec3& ); // Third point - -template Matrix44 nextFrame( const Matrix44&, // Previous matrix - const Vec3&, // Previous point - const Vec3&, // Current point - Vec3&, // Previous tangent - Vec3& ); // Current tangent - -template Matrix44 lastFrame( const Matrix44&, // Previous matrix - const Vec3&, // Previous point - const Vec3& ); // Last point - -// -// firstFrame - Compute the first reference frame along a curve. -// -// This function returns the transformation matrix to the reference frame -// defined by the three points 'pi', 'pj' and 'pk'. Note that if the two -// vectors and are colinears, an arbitrary twist value will -// be choosen. -// -// Throw 'NullVecExc' if 'pi' and 'pj' are equals. -// - -template Matrix44 firstFrame -( - const Vec3& pi, // First point - const Vec3& pj, // Second point - const Vec3& pk ) // Third point -{ - Vec3 t = pj - pi; t.normalizeExc(); - - Vec3 n = t.cross( pk - pi ); n.normalize(); - if( n.length() == 0.0f ) - { - int i = fabs( t[0] ) < fabs( t[1] ) ? 0 : 1; - if( fabs( t[2] ) < fabs( t[i] )) i = 2; - - Vec3 v( 0.0, 0.0, 0.0 ); v[i] = 1.0; - n = t.cross( v ); n.normalize(); - } - - Vec3 b = t.cross( n ); - - Matrix44 M; - - M[0][0] = t[0]; M[0][1] = t[1]; M[0][2] = t[2]; M[0][3] = 0.0, - M[1][0] = n[0]; M[1][1] = n[1]; M[1][2] = n[2]; M[1][3] = 0.0, - M[2][0] = b[0]; M[2][1] = b[1]; M[2][2] = b[2]; M[2][3] = 0.0, - M[3][0] = pi[0]; M[3][1] = pi[1]; M[3][2] = pi[2]; M[3][3] = 1.0; - - return M; -} - -// -// nextFrame - Compute the next reference frame along a curve. -// -// This function returns the transformation matrix to the next reference -// frame defined by the previously computed transformation matrix and the -// new point and tangent vector along the curve. -// - -template Matrix44 nextFrame -( - const Matrix44& Mi, // Previous matrix - const Vec3& pi, // Previous point - const Vec3& pj, // Current point - Vec3& ti, // Previous tangent vector - Vec3& tj ) // Current tangent vector -{ - Vec3 a(0.0, 0.0, 0.0); // Rotation axis. - T r = 0.0; // Rotation angle. - - if( ti.length() != 0.0 && tj.length() != 0.0 ) - { - ti.normalize(); tj.normalize(); - T dot = ti.dot( tj ); - - // - // This is *really* necessary : - // - - if( dot > 1.0 ) dot = 1.0; - else if( dot < -1.0 ) dot = -1.0; - - r = acosf( dot ); - a = ti.cross( tj ); - } - - if( a.length() != 0.0 && r != 0.0 ) - { - Matrix44 R; R.setAxisAngle( a, r ); - Matrix44 Tj; Tj.translate( pj ); - Matrix44 Ti; Ti.translate( -pi ); - - return Mi * Ti * R * Tj; - } - else - { - Matrix44 Tr; Tr.translate( pj - pi ); - - return Mi * Tr; - } -} - -// -// lastFrame - Compute the last reference frame along a curve. -// -// This function returns the transformation matrix to the last reference -// frame defined by the previously computed transformation matrix and the -// last point along the curve. -// - -template Matrix44 lastFrame -( - const Matrix44& Mi, // Previous matrix - const Vec3& pi, // Previous point - const Vec3& pj ) // Last point -{ - Matrix44 Tr; Tr.translate( pj - pi ); - - return Mi * Tr; -} - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHFRAME_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFrustum.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFrustum.h deleted file mode 100644 index 4df92c9..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFrustum.h +++ /dev/null @@ -1,741 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHFRUSTUM_H -#define INCLUDED_IMATHFRUSTUM_H - - -#include "ImathVec.h" -#include "ImathPlane.h" -#include "ImathLine.h" -#include "ImathMatrix.h" -#include "ImathLimits.h" -#include "ImathFun.h" -#include "ImathNamespace.h" - -#include "IexMathExc.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -// -// template class Frustum -// -// The frustum is always located with the eye point at the -// origin facing down -Z. This makes the Frustum class -// compatable with OpenGL (or anything that assumes a camera -// looks down -Z, hence with a right-handed coordinate system) -// but not with RenderMan which assumes the camera looks down -// +Z. Additional functions are provided for conversion from -// and from various camera coordinate spaces. -// -// nearPlane/farPlane: near/far are keywords used by Microsoft's -// compiler, so we use nearPlane/farPlane instead to avoid -// issues. - - -template -class Frustum -{ - public: - Frustum(); - Frustum(const Frustum &); - Frustum(T nearPlane, T farPlane, T left, T right, T top, T bottom, bool ortho=false); - Frustum(T nearPlane, T farPlane, T fovx, T fovy, T aspect); - virtual ~Frustum(); - - //-------------------- - // Assignment operator - //-------------------- - - const Frustum & operator = (const Frustum &); - - //-------------------- - // Operators: ==, != - //-------------------- - - bool operator == (const Frustum &src) const; - bool operator != (const Frustum &src) const; - - //-------------------------------------------------------- - // Set functions change the entire state of the Frustum - //-------------------------------------------------------- - - void set(T nearPlane, T farPlane, - T left, T right, - T top, T bottom, - bool ortho=false); - - void set(T nearPlane, T farPlane, T fovx, T fovy, T aspect); - - //------------------------------------------------------ - // These functions modify an already valid frustum state - //------------------------------------------------------ - - void modifyNearAndFar(T nearPlane, T farPlane); - void setOrthographic(bool); - - //-------------- - // Access - //-------------- - - bool orthographic() const { return _orthographic; } - T nearPlane() const { return _nearPlane; } - T hither() const { return _nearPlane; } - T farPlane() const { return _farPlane; } - T yon() const { return _farPlane; } - T left() const { return _left; } - T right() const { return _right; } - T bottom() const { return _bottom; } - T top() const { return _top; } - - //----------------------------------------------------------------------- - // Sets the planes in p to be the six bounding planes of the frustum, in - // the following order: top, right, bottom, left, near, far. - // Note that the planes have normals that point out of the frustum. - // The version of this routine that takes a matrix applies that matrix - // to transform the frustum before setting the planes. - //----------------------------------------------------------------------- - - void planes(Plane3 p[6]) const; - void planes(Plane3 p[6], const Matrix44 &M) const; - - //---------------------- - // Derived Quantities - //---------------------- - - T fovx() const; - T fovy() const; - T aspect() const; - Matrix44 projectionMatrix() const; - bool degenerate() const; - - //----------------------------------------------------------------------- - // Takes a rectangle in the screen space (i.e., -1 <= left <= right <= 1 - // and -1 <= bottom <= top <= 1) of this Frustum, and returns a new - // Frustum whose near clipping-plane window is that rectangle in local - // space. - //----------------------------------------------------------------------- - - Frustum window(T left, T right, T top, T bottom) const; - - //---------------------------------------------------------- - // Projection is in screen space / Conversion from Z-Buffer - //---------------------------------------------------------- - - Line3 projectScreenToRay( const Vec2 & ) const; - Vec2 projectPointToScreen( const Vec3 & ) const; - - T ZToDepth(long zval, long min, long max) const; - T normalizedZToDepth(T zval) const; - long DepthToZ(T depth, long zmin, long zmax) const; - - T worldRadius(const Vec3 &p, T radius) const; - T screenRadius(const Vec3 &p, T radius) const; - - - protected: - - Vec2 screenToLocal( const Vec2 & ) const; - Vec2 localToScreen( const Vec2 & ) const; - - protected: - T _nearPlane; - T _farPlane; - T _left; - T _right; - T _top; - T _bottom; - bool _orthographic; -}; - - -template -inline Frustum::Frustum() -{ - set(T (0.1), - T (1000.0), - T (-1.0), - T (1.0), - T (1.0), - T (-1.0), - false); -} - -template -inline Frustum::Frustum(const Frustum &f) -{ - *this = f; -} - -template -inline Frustum::Frustum(T n, T f, T l, T r, T t, T b, bool o) -{ - set(n,f,l,r,t,b,o); -} - -template -inline Frustum::Frustum(T nearPlane, T farPlane, T fovx, T fovy, T aspect) -{ - set(nearPlane,farPlane,fovx,fovy,aspect); -} - -template -Frustum::~Frustum() -{ -} - -template -const Frustum & -Frustum::operator = (const Frustum &f) -{ - _nearPlane = f._nearPlane; - _farPlane = f._farPlane; - _left = f._left; - _right = f._right; - _top = f._top; - _bottom = f._bottom; - _orthographic = f._orthographic; - - return *this; -} - -template -bool -Frustum::operator == (const Frustum &src) const -{ - return - _nearPlane == src._nearPlane && - _farPlane == src._farPlane && - _left == src._left && - _right == src._right && - _top == src._top && - _bottom == src._bottom && - _orthographic == src._orthographic; -} - -template -inline bool -Frustum::operator != (const Frustum &src) const -{ - return !operator== (src); -} - -template -void Frustum::set(T n, T f, T l, T r, T t, T b, bool o) -{ - _nearPlane = n; - _farPlane = f; - _left = l; - _right = r; - _bottom = b; - _top = t; - _orthographic = o; -} - -template -void Frustum::modifyNearAndFar(T n, T f) -{ - if ( _orthographic ) - { - _nearPlane = n; - } - else - { - Line3 lowerLeft( Vec3(0,0,0), Vec3(_left,_bottom,-_nearPlane) ); - Line3 upperRight( Vec3(0,0,0), Vec3(_right,_top,-_nearPlane) ); - Plane3 nearPlane( Vec3(0,0,-1), n ); - - Vec3 ll,ur; - nearPlane.intersect(lowerLeft,ll); - nearPlane.intersect(upperRight,ur); - - _left = ll.x; - _right = ur.x; - _top = ur.y; - _bottom = ll.y; - _nearPlane = n; - _farPlane = f; - } - - _farPlane = f; -} - -template -void Frustum::setOrthographic(bool ortho) -{ - _orthographic = ortho; -} - -template -void Frustum::set(T nearPlane, T farPlane, T fovx, T fovy, T aspect) -{ - if (fovx != 0 && fovy != 0) - throw IEX_NAMESPACE::ArgExc ("fovx and fovy cannot both be non-zero."); - - const T two = static_cast(2); - - if (fovx != 0) - { - _right = nearPlane * Math::tan(fovx / two); - _left = -_right; - _top = ((_right - _left) / aspect) / two; - _bottom = -_top; - } - else - { - _top = nearPlane * Math::tan(fovy / two); - _bottom = -_top; - _right = (_top - _bottom) * aspect / two; - _left = -_right; - } - _nearPlane = nearPlane; - _farPlane = farPlane; - _orthographic = false; -} - -template -T Frustum::fovx() const -{ - return Math::atan2(_right,_nearPlane) - Math::atan2(_left,_nearPlane); -} - -template -T Frustum::fovy() const -{ - return Math::atan2(_top,_nearPlane) - Math::atan2(_bottom,_nearPlane); -} - -template -T Frustum::aspect() const -{ - T rightMinusLeft = _right-_left; - T topMinusBottom = _top-_bottom; - - if (abs(topMinusBottom) < 1 && - abs(rightMinusLeft) > limits::max() * abs(topMinusBottom)) - { - throw IEX_NAMESPACE::DivzeroExc ("Bad viewing frustum: " - "aspect ratio cannot be computed."); - } - - return rightMinusLeft / topMinusBottom; -} - -template -Matrix44 Frustum::projectionMatrix() const -{ - T rightPlusLeft = _right+_left; - T rightMinusLeft = _right-_left; - - T topPlusBottom = _top+_bottom; - T topMinusBottom = _top-_bottom; - - T farPlusNear = _farPlane+_nearPlane; - T farMinusNear = _farPlane-_nearPlane; - - if ((abs(rightMinusLeft) < 1 && - abs(rightPlusLeft) > limits::max() * abs(rightMinusLeft)) || - (abs(topMinusBottom) < 1 && - abs(topPlusBottom) > limits::max() * abs(topMinusBottom)) || - (abs(farMinusNear) < 1 && - abs(farPlusNear) > limits::max() * abs(farMinusNear))) - { - throw IEX_NAMESPACE::DivzeroExc ("Bad viewing frustum: " - "projection matrix cannot be computed."); - } - - if ( _orthographic ) - { - T tx = -rightPlusLeft / rightMinusLeft; - T ty = -topPlusBottom / topMinusBottom; - T tz = -farPlusNear / farMinusNear; - - if ((abs(rightMinusLeft) < 1 && - 2 > limits::max() * abs(rightMinusLeft)) || - (abs(topMinusBottom) < 1 && - 2 > limits::max() * abs(topMinusBottom)) || - (abs(farMinusNear) < 1 && - 2 > limits::max() * abs(farMinusNear))) - { - throw IEX_NAMESPACE::DivzeroExc ("Bad viewing frustum: " - "projection matrix cannot be computed."); - } - - T A = 2 / rightMinusLeft; - T B = 2 / topMinusBottom; - T C = -2 / farMinusNear; - - return Matrix44( A, 0, 0, 0, - 0, B, 0, 0, - 0, 0, C, 0, - tx, ty, tz, 1.f ); - } - else - { - T A = rightPlusLeft / rightMinusLeft; - T B = topPlusBottom / topMinusBottom; - T C = -farPlusNear / farMinusNear; - - T farTimesNear = -2 * _farPlane * _nearPlane; - if (abs(farMinusNear) < 1 && - abs(farTimesNear) > limits::max() * abs(farMinusNear)) - { - throw IEX_NAMESPACE::DivzeroExc ("Bad viewing frustum: " - "projection matrix cannot be computed."); - } - - T D = farTimesNear / farMinusNear; - - T twoTimesNear = 2 * _nearPlane; - - if ((abs(rightMinusLeft) < 1 && - abs(twoTimesNear) > limits::max() * abs(rightMinusLeft)) || - (abs(topMinusBottom) < 1 && - abs(twoTimesNear) > limits::max() * abs(topMinusBottom))) - { - throw IEX_NAMESPACE::DivzeroExc ("Bad viewing frustum: " - "projection matrix cannot be computed."); - } - - T E = twoTimesNear / rightMinusLeft; - T F = twoTimesNear / topMinusBottom; - - return Matrix44( E, 0, 0, 0, - 0, F, 0, 0, - A, B, C, -1, - 0, 0, D, 0 ); - } -} - -template -bool Frustum::degenerate() const -{ - return (_nearPlane == _farPlane) || - (_left == _right) || - (_top == _bottom); -} - -template -Frustum Frustum::window(T l, T r, T t, T b) const -{ - // move it to 0->1 space - - Vec2 bl = screenToLocal( Vec2(l,b) ); - Vec2 tr = screenToLocal( Vec2(r,t) ); - - return Frustum(_nearPlane, _farPlane, bl.x, tr.x, tr.y, bl.y, _orthographic); -} - - -template -Vec2 Frustum::screenToLocal(const Vec2 &s) const -{ - return Vec2( _left + (_right-_left) * (1.f+s.x) / 2.f, - _bottom + (_top-_bottom) * (1.f+s.y) / 2.f ); -} - -template -Vec2 Frustum::localToScreen(const Vec2 &p) const -{ - T leftPlusRight = _left - T (2) * p.x + _right; - T leftMinusRight = _left-_right; - T bottomPlusTop = _bottom - T (2) * p.y + _top; - T bottomMinusTop = _bottom-_top; - - if ((abs(leftMinusRight) < T (1) && - abs(leftPlusRight) > limits::max() * abs(leftMinusRight)) || - (abs(bottomMinusTop) < T (1) && - abs(bottomPlusTop) > limits::max() * abs(bottomMinusTop))) - { - throw IEX_NAMESPACE::DivzeroExc - ("Bad viewing frustum: " - "local-to-screen transformation cannot be computed"); - } - - return Vec2( leftPlusRight / leftMinusRight, - bottomPlusTop / bottomMinusTop ); -} - -template -Line3 Frustum::projectScreenToRay(const Vec2 &p) const -{ - Vec2 point = screenToLocal(p); - if (orthographic()) - return Line3( Vec3(point.x,point.y, 0.0), - Vec3(point.x,point.y,-1.0)); - else - return Line3( Vec3(0, 0, 0), Vec3(point.x,point.y,-_nearPlane)); -} - -template -Vec2 Frustum::projectPointToScreen(const Vec3 &point) const -{ - if (orthographic() || point.z == T (0)) - return localToScreen( Vec2( point.x, point.y ) ); - else - return localToScreen( Vec2( point.x * _nearPlane / -point.z, - point.y * _nearPlane / -point.z ) ); -} - -template -T Frustum::ZToDepth(long zval,long zmin,long zmax) const -{ - int zdiff = zmax - zmin; - - if (zdiff == 0) - { - throw IEX_NAMESPACE::DivzeroExc - ("Bad call to Frustum::ZToDepth: zmax == zmin"); - } - - if ( zval > zmax+1 ) zval -= zdiff; - - T fzval = (T(zval) - T(zmin)) / T(zdiff); - return normalizedZToDepth(fzval); -} - -template -T Frustum::normalizedZToDepth(T zval) const -{ - T Zp = zval * 2.0 - 1; - - if ( _orthographic ) - { - return -(Zp*(_farPlane-_nearPlane) + (_farPlane+_nearPlane))/2; - } - else - { - T farTimesNear = 2 * _farPlane * _nearPlane; - T farMinusNear = Zp * (_farPlane - _nearPlane) - _farPlane - _nearPlane; - - if (abs(farMinusNear) < 1 && - abs(farTimesNear) > limits::max() * abs(farMinusNear)) - { - throw IEX_NAMESPACE::DivzeroExc - ("Frustum::normalizedZToDepth cannot be computed. The " - "near and far clipping planes of the viewing frustum " - "may be too close to each other"); - } - - return farTimesNear / farMinusNear; - } -} - -template -long Frustum::DepthToZ(T depth,long zmin,long zmax) const -{ - long zdiff = zmax - zmin; - T farMinusNear = _farPlane-_nearPlane; - - if ( _orthographic ) - { - T farPlusNear = 2*depth + _farPlane + _nearPlane; - - if (abs(farMinusNear) < 1 && - abs(farPlusNear) > limits::max() * abs(farMinusNear)) - { - throw IEX_NAMESPACE::DivzeroExc - ("Bad viewing frustum: near and far clipping planes " - "are too close to each other"); - } - - T Zp = -farPlusNear/farMinusNear; - return long(0.5*(Zp+1)*zdiff) + zmin; - } - else - { - // Perspective - - T farTimesNear = 2*_farPlane*_nearPlane; - if (abs(depth) < 1 && - abs(farTimesNear) > limits::max() * abs(depth)) - { - throw IEX_NAMESPACE::DivzeroExc - ("Bad call to DepthToZ function: value of `depth' " - "is too small"); - } - - T farPlusNear = farTimesNear/depth + _farPlane + _nearPlane; - if (abs(farMinusNear) < 1 && - abs(farPlusNear) > limits::max() * abs(farMinusNear)) - { - throw IEX_NAMESPACE::DivzeroExc - ("Bad viewing frustum: near and far clipping planes " - "are too close to each other"); - } - - T Zp = farPlusNear/farMinusNear; - return long(0.5*(Zp+1)*zdiff) + zmin; - } -} - -template -T Frustum::screenRadius(const Vec3 &p, T radius) const -{ - // Derivation: - // Consider X-Z plane. - // X coord of projection of p = xp = p.x * (-_nearPlane / p.z) - // Let q be p + (radius, 0, 0). - // X coord of projection of q = xq = (p.x - radius) * (-_nearPlane / p.z) - // X coord of projection of segment from p to q = r = xp - xq - // = radius * (-_nearPlane / p.z) - // A similar analysis holds in the Y-Z plane. - // So r is the quantity we want to return. - - if (abs(p.z) > 1 || abs(-_nearPlane) < limits::max() * abs(p.z)) - { - return radius * (-_nearPlane / p.z); - } - else - { - throw IEX_NAMESPACE::DivzeroExc - ("Bad call to Frustum::screenRadius: the magnitude of `p' " - "is too small"); - } - - return radius * (-_nearPlane / p.z); -} - -template -T Frustum::worldRadius(const Vec3 &p, T radius) const -{ - if (abs(-_nearPlane) > 1 || abs(p.z) < limits::max() * abs(-_nearPlane)) - { - return radius * (p.z / -_nearPlane); - } - else - { - throw IEX_NAMESPACE::DivzeroExc - ("Bad viewing frustum: the near clipping plane is too " - "close to zero"); - } -} - -template -void Frustum::planes(Plane3 p[6]) const -{ - // - // Plane order: Top, Right, Bottom, Left, Near, Far. - // Normals point outwards. - // - - if (! _orthographic) - { - Vec3 a( _left, _bottom, -_nearPlane); - Vec3 b( _left, _top, -_nearPlane); - Vec3 c( _right, _top, -_nearPlane); - Vec3 d( _right, _bottom, -_nearPlane); - Vec3 o(0,0,0); - - p[0].set( o, c, b ); - p[1].set( o, d, c ); - p[2].set( o, a, d ); - p[3].set( o, b, a ); - } - else - { - p[0].set( Vec3( 0, 1, 0), _top ); - p[1].set( Vec3( 1, 0, 0), _right ); - p[2].set( Vec3( 0,-1, 0),-_bottom ); - p[3].set( Vec3(-1, 0, 0),-_left ); - } - p[4].set( Vec3(0, 0, 1), -_nearPlane ); - p[5].set( Vec3(0, 0,-1), _farPlane ); -} - - -template -void Frustum::planes(Plane3 p[6], const Matrix44 &M) const -{ - // - // Plane order: Top, Right, Bottom, Left, Near, Far. - // Normals point outwards. - // - - Vec3 a = Vec3( _left, _bottom, -_nearPlane) * M; - Vec3 b = Vec3( _left, _top, -_nearPlane) * M; - Vec3 c = Vec3( _right, _top, -_nearPlane) * M; - Vec3 d = Vec3( _right, _bottom, -_nearPlane) * M; - if (! _orthographic) - { - double s = _farPlane / double(_nearPlane); - T farLeft = (T) (s * _left); - T farRight = (T) (s * _right); - T farTop = (T) (s * _top); - T farBottom = (T) (s * _bottom); - Vec3 e = Vec3( farLeft, farBottom, -_farPlane) * M; - Vec3 f = Vec3( farLeft, farTop, -_farPlane) * M; - Vec3 g = Vec3( farRight, farTop, -_farPlane) * M; - Vec3 o = Vec3(0,0,0) * M; - p[0].set( o, c, b ); - p[1].set( o, d, c ); - p[2].set( o, a, d ); - p[3].set( o, b, a ); - p[4].set( a, d, c ); - p[5].set( e, f, g ); - } - else - { - Vec3 e = Vec3( _left, _bottom, -_farPlane) * M; - Vec3 f = Vec3( _left, _top, -_farPlane) * M; - Vec3 g = Vec3( _right, _top, -_farPlane) * M; - Vec3 h = Vec3( _right, _bottom, -_farPlane) * M; - p[0].set( c, g, f ); - p[1].set( d, h, g ); - p[2].set( a, e, h ); - p[3].set( b, f, e ); - p[4].set( a, d, c ); - p[5].set( e, f, g ); - } -} - -typedef Frustum Frustumf; -typedef Frustum Frustumd; - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - - -#if defined _WIN32 || defined _WIN64 - #ifdef _redef_near - #define near - #endif - #ifdef _redef_far - #define far - #endif -#endif - -#endif // INCLUDED_IMATHFRUSTUM_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFrustumTest.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFrustumTest.h deleted file mode 100644 index d9c10cc..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFrustumTest.h +++ /dev/null @@ -1,417 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2011-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMATHFRUSTUMTEST_H -#define INCLUDED_IMATHFRUSTUMTEST_H - -//------------------------------------------------------------------------- -// -// This file contains algorithms applied to or in conjunction with -// Frustum visibility testing (Imath::Frustum). -// -// Methods for frustum-based rejection of primitives are contained here. -// -//------------------------------------------------------------------------- - -#include "ImathFrustum.h" -#include "ImathBox.h" -#include "ImathSphere.h" -#include "ImathMatrix.h" -#include "ImathVec.h" -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -///////////////////////////////////////////////////////////////// -// FrustumTest -// -// template class FrustumTest -// -// This is a helper class, designed to accelerate the case -// where many tests are made against the same frustum. -// That's a really common case. -// -// The acceleration is achieved by pre-computing the planes of -// the frustum, along with the ablsolute values of the plane normals. -// - - - -////////////////////////////////////////////////////////////////// -// How to use this -// -// Given that you already have: -// Imath::Frustum myFrustum -// Imath::Matrix44 myCameraWorldMatrix -// -// First, make a frustum test object: -// FrustumTest myFrustumTest(myFrustum, myCameraWorldMatrix) -// -// Whenever the camera or frustum changes, call: -// myFrustumTest.setFrustum(myFrustum, myCameraWorldMatrix) -// -// For each object you want to test for visibility, call: -// myFrustumTest.isVisible(myBox) -// myFrustumTest.isVisible(mySphere) -// myFrustumTest.isVisible(myVec3) -// myFrustumTest.completelyContains(myBox) -// myFrustumTest.completelyContains(mySphere) -// - - - - -////////////////////////////////////////////////////////////////// -// Explanation of how it works -// -// -// We store six world-space Frustum planes (nx, ny, nz, offset) -// -// Points: To test a Vec3 for visibility, test it against each plane -// using the normal (v dot n - offset) method. (the result is exact) -// -// BBoxes: To test an axis-aligned bbox, test the center against each plane -// using the normal (v dot n - offset) method, but offset by the -// box extents dot the abs of the plane normal. (the result is NOT -// exact, but will not return false-negatives.) -// -// Spheres: To test a sphere, test the center against each plane -// using the normal (v dot n - offset) method, but offset by the -// sphere's radius. (the result is NOT exact, but will not return -// false-negatives.) -// -// -// SPECIAL NOTE: "Where are the dot products?" -// Actual dot products are currently slow for most SIMD architectures. -// In order to keep this code optimization-ready, the dot products -// are all performed using vector adds and multipies. -// -// In order to do this, the plane equations are stored in "transpose" -// form, with the X components grouped into an X vector, etc. -// - - -template -class FrustumTest -{ -public: - FrustumTest() - { - Frustum frust; - Matrix44 cameraMat; - cameraMat.makeIdentity(); - setFrustum(frust, cameraMat); - } - FrustumTest(const Frustum &frustum, const Matrix44 &cameraMat) - { - setFrustum(frustum, cameraMat); - } - - //////////////////////////////////////////////////////////////////// - // setFrustum() - // This updates the frustum test with a new frustum and matrix. - // This should usually be called just once per frame. - void setFrustum(const Frustum &frustum, const Matrix44 &cameraMat); - - //////////////////////////////////////////////////////////////////// - // isVisible() - // Check to see if shapes are visible. - bool isVisible(const Sphere3 &sphere) const; - bool isVisible(const Box > &box) const; - bool isVisible(const Vec3 &vec) const; - - //////////////////////////////////////////////////////////////////// - // completelyContains() - // Check to see if shapes are entirely contained. - bool completelyContains(const Sphere3 &sphere) const; - bool completelyContains(const Box > &box) const; - - // These next items are kept primarily for debugging tools. - // It's useful for drawing the culling environment, and also - // for getting an "outside view" of the culling frustum. - IMATH_INTERNAL_NAMESPACE::Matrix44 cameraMat() const {return cameraMatrix;} - IMATH_INTERNAL_NAMESPACE::Frustum currentFrustum() const {return currFrustum;} - -protected: - // To understand why the planes are stored this way, see - // the SPECIAL NOTE above. - Vec3 planeNormX[2]; // The X compunents from 6 plane equations - Vec3 planeNormY[2]; // The Y compunents from 6 plane equations - Vec3 planeNormZ[2]; // The Z compunents from 6 plane equations - - Vec3 planeOffsetVec[2]; // The distance offsets from 6 plane equations - - // The absolute values are stored to assist with bounding box tests. - Vec3 planeNormAbsX[2]; // The abs(X) compunents from 6 plane equations - Vec3 planeNormAbsY[2]; // The abs(X) compunents from 6 plane equations - Vec3 planeNormAbsZ[2]; // The abs(X) compunents from 6 plane equations - - // These are kept primarily for debugging tools. - Frustum currFrustum; - Matrix44 cameraMatrix; -}; - - -//////////////////////////////////////////////////////////////////// -// setFrustum() -// This should usually only be called once per frame, or however -// often the camera moves. -template -void FrustumTest::setFrustum(const Frustum &frustum, - const Matrix44 &cameraMat) -{ - Plane3 frustumPlanes[6]; - frustum.planes(frustumPlanes, cameraMat); - - // Here's where we effectively transpose the plane equations. - // We stuff all six X's into the two planeNormX vectors, etc. - for (int i = 0; i < 2; ++i) - { - int index = i * 3; - - planeNormX[i] = Vec3(frustumPlanes[index + 0].normal.x, - frustumPlanes[index + 1].normal.x, - frustumPlanes[index + 2].normal.x); - planeNormY[i] = Vec3(frustumPlanes[index + 0].normal.y, - frustumPlanes[index + 1].normal.y, - frustumPlanes[index + 2].normal.y); - planeNormZ[i] = Vec3(frustumPlanes[index + 0].normal.z, - frustumPlanes[index + 1].normal.z, - frustumPlanes[index + 2].normal.z); - - planeNormAbsX[i] = Vec3(IMATH_INTERNAL_NAMESPACE::abs(planeNormX[i].x), - IMATH_INTERNAL_NAMESPACE::abs(planeNormX[i].y), - IMATH_INTERNAL_NAMESPACE::abs(planeNormX[i].z)); - planeNormAbsY[i] = Vec3(IMATH_INTERNAL_NAMESPACE::abs(planeNormY[i].x), - IMATH_INTERNAL_NAMESPACE::abs(planeNormY[i].y), - IMATH_INTERNAL_NAMESPACE::abs(planeNormY[i].z)); - planeNormAbsZ[i] = Vec3(IMATH_INTERNAL_NAMESPACE::abs(planeNormZ[i].x), - IMATH_INTERNAL_NAMESPACE::abs(planeNormZ[i].y), - IMATH_INTERNAL_NAMESPACE::abs(planeNormZ[i].z)); - - planeOffsetVec[i] = Vec3(frustumPlanes[index + 0].distance, - frustumPlanes[index + 1].distance, - frustumPlanes[index + 2].distance); - } - currFrustum = frustum; - cameraMatrix = cameraMat; -} - - -//////////////////////////////////////////////////////////////////// -// isVisible(Sphere) -// Returns true if any part of the sphere is inside -// the frustum. -// The result MAY return close false-positives, but not false-negatives. -// -template -bool FrustumTest::isVisible(const Sphere3 &sphere) const -{ - Vec3 center = sphere.center; - Vec3 radiusVec = Vec3(sphere.radius, sphere.radius, sphere.radius); - - // This is a vertical dot-product on three vectors at once. - Vec3 d0 = planeNormX[0] * center.x - + planeNormY[0] * center.y - + planeNormZ[0] * center.z - - radiusVec - - planeOffsetVec[0]; - - if (d0.x >= 0 || d0.y >= 0 || d0.z >= 0) - return false; - - Vec3 d1 = planeNormX[1] * center.x - + planeNormY[1] * center.y - + planeNormZ[1] * center.z - - radiusVec - - planeOffsetVec[1]; - - if (d1.x >= 0 || d1.y >= 0 || d1.z >= 0) - return false; - - return true; -} - -//////////////////////////////////////////////////////////////////// -// completelyContains(Sphere) -// Returns true if every part of the sphere is inside -// the frustum. -// The result MAY return close false-negatives, but not false-positives. -// -template -bool FrustumTest::completelyContains(const Sphere3 &sphere) const -{ - Vec3 center = sphere.center; - Vec3 radiusVec = Vec3(sphere.radius, sphere.radius, sphere.radius); - - // This is a vertical dot-product on three vectors at once. - Vec3 d0 = planeNormX[0] * center.x - + planeNormY[0] * center.y - + planeNormZ[0] * center.z - + radiusVec - - planeOffsetVec[0]; - - if (d0.x >= 0 || d0.y >= 0 || d0.z >= 0) - return false; - - Vec3 d1 = planeNormX[1] * center.x - + planeNormY[1] * center.y - + planeNormZ[1] * center.z - + radiusVec - - planeOffsetVec[1]; - - if (d1.x >= 0 || d1.y >= 0 || d1.z >= 0) - return false; - - return true; -} - -//////////////////////////////////////////////////////////////////// -// isVisible(Box) -// Returns true if any part of the axis-aligned box -// is inside the frustum. -// The result MAY return close false-positives, but not false-negatives. -// -template -bool FrustumTest::isVisible(const Box > &box) const -{ - if (box.isEmpty()) - return false; - - Vec3 center = (box.min + box.max) / 2; - Vec3 extent = (box.max - center); - - // This is a vertical dot-product on three vectors at once. - Vec3 d0 = planeNormX[0] * center.x - + planeNormY[0] * center.y - + planeNormZ[0] * center.z - - planeNormAbsX[0] * extent.x - - planeNormAbsY[0] * extent.y - - planeNormAbsZ[0] * extent.z - - planeOffsetVec[0]; - - if (d0.x >= 0 || d0.y >= 0 || d0.z >= 0) - return false; - - Vec3 d1 = planeNormX[1] * center.x - + planeNormY[1] * center.y - + planeNormZ[1] * center.z - - planeNormAbsX[1] * extent.x - - planeNormAbsY[1] * extent.y - - planeNormAbsZ[1] * extent.z - - planeOffsetVec[1]; - - if (d1.x >= 0 || d1.y >= 0 || d1.z >= 0) - return false; - - return true; -} - -//////////////////////////////////////////////////////////////////// -// completelyContains(Box) -// Returns true if every part of the axis-aligned box -// is inside the frustum. -// The result MAY return close false-negatives, but not false-positives. -// -template -bool FrustumTest::completelyContains(const Box > &box) const -{ - if (box.isEmpty()) - return false; - - Vec3 center = (box.min + box.max) / 2; - Vec3 extent = (box.max - center); - - // This is a vertical dot-product on three vectors at once. - Vec3 d0 = planeNormX[0] * center.x - + planeNormY[0] * center.y - + planeNormZ[0] * center.z - + planeNormAbsX[0] * extent.x - + planeNormAbsY[0] * extent.y - + planeNormAbsZ[0] * extent.z - - planeOffsetVec[0]; - - if (d0.x >= 0 || d0.y >= 0 || d0.z >= 0) - return false; - - Vec3 d1 = planeNormX[1] * center.x - + planeNormY[1] * center.y - + planeNormZ[1] * center.z - + planeNormAbsX[1] * extent.x - + planeNormAbsY[1] * extent.y - + planeNormAbsZ[1] * extent.z - - planeOffsetVec[1]; - - if (d1.x >= 0 || d1.y >= 0 || d1.z >= 0) - return false; - - return true; -} - - -//////////////////////////////////////////////////////////////////// -// isVisible(Vec3) -// Returns true if the point is inside the frustum. -// -template -bool FrustumTest::isVisible(const Vec3 &vec) const -{ - // This is a vertical dot-product on three vectors at once. - Vec3 d0 = (planeNormX[0] * vec.x) - + (planeNormY[0] * vec.y) - + (planeNormZ[0] * vec.z) - - planeOffsetVec[0]; - - if (d0.x >= 0 || d0.y >= 0 || d0.z >= 0) - return false; - - Vec3 d1 = (planeNormX[1] * vec.x) - + (planeNormY[1] * vec.y) - + (planeNormZ[1] * vec.z) - - planeOffsetVec[1]; - - if (d1.x >= 0 || d1.y >= 0 || d1.z >= 0) - return false; - - return true; -} - - -typedef FrustumTest FrustumTestf; -typedef FrustumTest FrustumTestd; - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHFRUSTUMTEST_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFun.cpp b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFun.cpp deleted file mode 100644 index 65cf620..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFun.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#include "ImathFun.h" - -IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER - - -float -succf (float f) -{ - union {float f; int i;} u; - u.f = f; - - if ((u.i & 0x7f800000) == 0x7f800000) - { - // Nan or infinity; don't change value. - } - else if (u.i == 0x00000000 || u.i == 0x80000000) - { - // Plus or minus zero. - - u.i = 0x00000001; - } - else if (u.i > 0) - { - // Positive float, normalized or denormalized. - // Incrementing the largest positive float - // produces +infinity. - - ++u.i; - } - else - { - // Negative normalized or denormalized float. - - --u.i; - } - - return u.f; -} - - -float -predf (float f) -{ - union {float f; int i;} u; - u.f = f; - - if ((u.i & 0x7f800000) == 0x7f800000) - { - // Nan or infinity; don't change value. - } - else if (u.i == 0x00000000 || u.i == 0x80000000) - { - // Plus or minus zero. - - u.i = 0x80000001; - } - else if (u.i > 0) - { - // Positive float, normalized or denormalized. - - --u.i; - } - else - { - // Negative normalized or denormalized float. - // Decrementing the largest negative float - // produces -infinity. - - ++u.i; - } - - return u.f; -} - - -double -succd (double d) -{ - union {double d; Int64 i;} u; - u.d = d; - - if ((u.i & 0x7ff0000000000000LL) == 0x7ff0000000000000LL) - { - // Nan or infinity; don't change value. - } - else if (u.i == 0x0000000000000000LL || u.i == 0x8000000000000000LL) - { - // Plus or minus zero. - - u.i = 0x0000000000000001LL; - } - else if (u.d > 0) - { - // Positive double, normalized or denormalized. - // Incrementing the largest positive double - // produces +infinity. - - ++u.i; - } - else - { - // Negative normalized or denormalized double. - - --u.i; - } - - return u.d; -} - - -double -predd (double d) -{ - union {double d; Int64 i;} u; - u.d = d; - - if ((u.i & 0x7ff0000000000000LL) == 0x7ff0000000000000LL) - { - // Nan or infinity; don't change value. - } - else if (u.i == 0x0000000000000000LL || u.i == 0x8000000000000000LL) - { - // Plus or minus zero. - - u.i = 0x8000000000000001LL; - } - else if (u.d > 0) - { - // Positive double, normalized or denormalized. - - --u.i; - } - else - { - // Negative normalized or denormalized double. - // Decrementing the largest negative double - // produces -infinity. - - ++u.i; - } - - return u.d; -} - - -IMATH_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFun.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFun.h deleted file mode 100644 index 068c682..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathFun.h +++ /dev/null @@ -1,269 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHFUN_H -#define INCLUDED_IMATHFUN_H - -//----------------------------------------------------------------------------- -// -// Miscellaneous utility functions -// -//----------------------------------------------------------------------------- - -#include "ImathExport.h" -#include "ImathLimits.h" -#include "ImathInt64.h" -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -template -inline T -abs (T a) -{ - return (a > T(0)) ? a : -a; -} - - -template -inline int -sign (T a) -{ - return (a > T(0))? 1 : ((a < T(0)) ? -1 : 0); -} - - -template -inline T -lerp (T a, T b, Q t) -{ - return (T) (a * (1 - t) + b * t); -} - - -template -inline T -ulerp (T a, T b, Q t) -{ - return (T) ((a > b)? (a - (a - b) * t): (a + (b - a) * t)); -} - - -template -inline T -lerpfactor(T m, T a, T b) -{ - // - // Return how far m is between a and b, that is return t such that - // if: - // t = lerpfactor(m, a, b); - // then: - // m = lerp(a, b, t); - // - // If a==b, return 0. - // - - T d = b - a; - T n = m - a; - - if (abs(d) > T(1) || abs(n) < limits::max() * abs(d)) - return n / d; - - return T(0); -} - - -template -inline T -clamp (T a, T l, T h) -{ - return (a < l)? l : ((a > h)? h : a); -} - - -template -inline int -cmp (T a, T b) -{ - return IMATH_INTERNAL_NAMESPACE::sign (a - b); -} - - -template -inline int -cmpt (T a, T b, T t) -{ - return (IMATH_INTERNAL_NAMESPACE::abs (a - b) <= t)? 0 : cmp (a, b); -} - - -template -inline bool -iszero (T a, T t) -{ - return (IMATH_INTERNAL_NAMESPACE::abs (a) <= t) ? 1 : 0; -} - - -template -inline bool -equal (T1 a, T2 b, T3 t) -{ - return IMATH_INTERNAL_NAMESPACE::abs (a - b) <= t; -} - -template -inline int -floor (T x) -{ - return (x >= 0)? int (x): -(int (-x) + (-x > int (-x))); -} - - -template -inline int -ceil (T x) -{ - return -floor (-x); -} - -template -inline int -trunc (T x) -{ - return (x >= 0) ? int(x) : -int(-x); -} - - -// -// Integer division and remainder where the -// remainder of x/y has the same sign as x: -// -// divs(x,y) == (abs(x) / abs(y)) * (sign(x) * sign(y)) -// mods(x,y) == x - y * divs(x,y) -// - -inline int -divs (int x, int y) -{ - return (x >= 0)? ((y >= 0)? ( x / y): -( x / -y)): - ((y >= 0)? -(-x / y): (-x / -y)); -} - - -inline int -mods (int x, int y) -{ - return (x >= 0)? ((y >= 0)? ( x % y): ( x % -y)): - ((y >= 0)? -(-x % y): -(-x % -y)); -} - - -// -// Integer division and remainder where the -// remainder of x/y is always positive: -// -// divp(x,y) == floor (double(x) / double (y)) -// modp(x,y) == x - y * divp(x,y) -// - -inline int -divp (int x, int y) -{ - return (x >= 0)? ((y >= 0)? ( x / y): -( x / -y)): - ((y >= 0)? -((y-1-x) / y): ((-y-1-x) / -y)); -} - - -inline int -modp (int x, int y) -{ - return x - y * divp (x, y); -} - -//---------------------------------------------------------- -// Successor and predecessor for floating-point numbers: -// -// succf(f) returns float(f+e), where e is the smallest -// positive number such that float(f+e) != f. -// -// predf(f) returns float(f-e), where e is the smallest -// positive number such that float(f-e) != f. -// -// succd(d) returns double(d+e), where e is the smallest -// positive number such that double(d+e) != d. -// -// predd(d) returns double(d-e), where e is the smallest -// positive number such that double(d-e) != d. -// -// Exceptions: If the input value is an infinity or a nan, -// succf(), predf(), succd(), and predd() all -// return the input value without changing it. -// -//---------------------------------------------------------- - -IMATH_EXPORT float succf (float f); -IMATH_EXPORT float predf (float f); - -IMATH_EXPORT double succd (double d); -IMATH_EXPORT double predd (double d); - -// -// Return true if the number is not a NaN or Infinity. -// - -inline bool -finitef (float f) -{ - union {float f; int i;} u; - u.f = f; - - return (u.i & 0x7f800000) != 0x7f800000; -} - -inline bool -finited (double d) -{ - union {double d; Int64 i;} u; - u.d = d; - - return (u.i & 0x7ff0000000000000LL) != 0x7ff0000000000000LL; -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHFUN_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathGL.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathGL.h deleted file mode 100644 index e3b9405..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathGL.h +++ /dev/null @@ -1,166 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMATHGL_H -#define INCLUDED_IMATHGL_H - -#include - -#include "ImathVec.h" -#include "ImathMatrix.h" -#include "IexMathExc.h" -#include "ImathFun.h" -#include "ImathNamespace.h" - -inline void glVertex ( const IMATH_INTERNAL_NAMESPACE::V3f &v ) { glVertex3f(v.x,v.y,v.z); } -inline void glVertex ( const IMATH_INTERNAL_NAMESPACE::V2f &v ) { glVertex2f(v.x,v.y); } -inline void glNormal ( const IMATH_INTERNAL_NAMESPACE::V3f &n ) { glNormal3f(n.x,n.y,n.z); } -inline void glColor ( const IMATH_INTERNAL_NAMESPACE::V3f &c ) { glColor3f(c.x,c.y,c.z); } -inline void glTranslate ( const IMATH_INTERNAL_NAMESPACE::V3f &t ) { glTranslatef(t.x,t.y,t.z); } - -inline void glTexCoord( const IMATH_INTERNAL_NAMESPACE::V2f &t ) -{ - glTexCoord2f(t.x,t.y); -} - -inline void glDisableTexture() -{ - glActiveTexture(GL_TEXTURE1); - glBindTexture(GL_TEXTURE_2D, 0); - glDisable(GL_TEXTURE_2D); - - glActiveTexture(GL_TEXTURE0); -} - -namespace { - -const float GL_FLOAT_MAX = 1.8e+19; // sqrt (FLT_MAX) - -inline bool -badFloat (float f) -{ - return !IMATH_INTERNAL_NAMESPACE::finitef (f) || f < - GL_FLOAT_MAX || f > GL_FLOAT_MAX; -} - -} // namespace - -inline void -throwBadMatrix (const IMATH_INTERNAL_NAMESPACE::M44f& m) -{ - if (badFloat (m[0][0]) || - badFloat (m[0][1]) || - badFloat (m[0][2]) || - badFloat (m[0][3]) || - badFloat (m[1][0]) || - badFloat (m[1][1]) || - badFloat (m[1][2]) || - badFloat (m[1][3]) || - badFloat (m[2][0]) || - badFloat (m[2][1]) || - badFloat (m[2][2]) || - badFloat (m[2][3]) || - badFloat (m[3][0]) || - badFloat (m[3][1]) || - badFloat (m[3][2]) || - badFloat (m[3][3])) - throw IEX_NAMESPACE::OverflowExc ("GL matrix overflow"); -} - -inline void -glMultMatrix( const IMATH_INTERNAL_NAMESPACE::M44f& m ) -{ - throwBadMatrix (m); - glMultMatrixf( (GLfloat*)m[0] ); -} - -inline void -glMultMatrix( const IMATH_INTERNAL_NAMESPACE::M44f* m ) -{ - throwBadMatrix (*m); - glMultMatrixf( (GLfloat*)(*m)[0] ); -} - -inline void -glLoadMatrix( const IMATH_INTERNAL_NAMESPACE::M44f& m ) -{ - throwBadMatrix (m); - glLoadMatrixf( (GLfloat*)m[0] ); -} - -inline void -glLoadMatrix( const IMATH_INTERNAL_NAMESPACE::M44f* m ) -{ - throwBadMatrix (*m); - glLoadMatrixf( (GLfloat*)(*m)[0] ); -} - - - - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -// -// Class objects that push/pop the GL state. These objects assist with -// proper cleanup of the state when exceptions are thrown. -// - -class GLPushMatrix { - public: - - GLPushMatrix () { glPushMatrix(); } - ~GLPushMatrix() { glPopMatrix(); } -}; - -class GLPushAttrib { - public: - - GLPushAttrib (GLbitfield mask) { glPushAttrib (mask); } - ~GLPushAttrib() { glPopAttrib(); } -}; - -class GLBegin { - public: - - GLBegin (GLenum mode) { glBegin (mode); } - ~GLBegin() { glEnd(); } -}; - - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathGLU.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathGLU.h deleted file mode 100644 index 52a43af..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathGLU.h +++ /dev/null @@ -1,54 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHGLU_H -#define INCLUDED_IMATHGLU_H - -#include -#include - -#include "ImathVec.h" - -inline -void -gluLookAt(const IMATH_INTERNAL_NAMESPACE::V3f &pos, const IMATH_INTERNAL_NAMESPACE::V3f &interest, const IMATH_INTERNAL_NAMESPACE::V3f &up) -{ - gluLookAt(pos.x, pos.y, pos.z, - interest.x, interest.y, interest.z, - up.x, up.y, up.z); -} - -#endif diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathHalfLimits.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathHalfLimits.h deleted file mode 100644 index de54bd6..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathHalfLimits.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHHALFLIMITS_H -#define INCLUDED_IMATHHALFLIMITS_H - -//-------------------------------------------------- -// -// Imath-style limits for class half. -// -//-------------------------------------------------- - -#include "ImathLimits.h" -#include "ImathNamespace.h" - -#include "half.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -template <> -struct limits -{ - static float min() {return -HALF_MAX;} - static float max() {return HALF_MAX;} - static float smallest() {return HALF_MIN;} - static float epsilon() {return HALF_EPSILON;} - static bool isIntegral() {return false;} - static bool isSigned() {return true;} -}; - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHHALFLIMITS_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathInt64.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathInt64.h deleted file mode 100644 index 3b867dc..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathInt64.h +++ /dev/null @@ -1,62 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2006-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMATH_INT64_H -#define INCLUDED_IMATH_INT64_H - -//---------------------------------------------------------------------------- -// -// Int64 -- unsigned 64-bit integers -// -//---------------------------------------------------------------------------- - -#include "ImathNamespace.h" -#include - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -#if (defined _WIN32 || defined _WIN64) && _MSC_VER >= 1300 - typedef unsigned __int64 Int64; -#elif ULONG_MAX == 18446744073709551615LU - typedef long unsigned int Int64; -#else - typedef long long unsigned int Int64; -#endif - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATH_INT64_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathInterval.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathInterval.h deleted file mode 100644 index 0062f4d..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathInterval.h +++ /dev/null @@ -1,226 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHINTERVAL_H -#define INCLUDED_IMATHINTERVAL_H - - -//------------------------------------------------------------------- -// -// class Imath::Interval -// -------------------------------- -// -// An Interval has a min and a max and some miscellaneous -// functions. It is basically a Box that allows T to be -// a scalar. -// -//------------------------------------------------------------------- - -#include "ImathVec.h" -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -template -class Interval -{ - public: - - //------------------------- - // Data Members are public - //------------------------- - - T min; - T max; - - //----------------------------------------------------- - // Constructors - an "empty" Interval is created by default - //----------------------------------------------------- - - Interval(); - Interval(const T& point); - Interval(const T& minT, const T& maxT); - - //-------------------------------- - // Operators: we get != from STL - //-------------------------------- - - bool operator == (const Interval &src) const; - - //------------------ - // Interval manipulation - //------------------ - - void makeEmpty(); - void extendBy(const T& point); - void extendBy(const Interval& interval); - - //--------------------------------------------------- - // Query functions - these compute results each time - //--------------------------------------------------- - - T size() const; - T center() const; - bool intersects(const T &point) const; - bool intersects(const Interval &interval) const; - - //---------------- - // Classification - //---------------- - - bool hasVolume() const; - bool isEmpty() const; -}; - - -//-------------------- -// Convenient typedefs -//-------------------- - - -typedef Interval Intervalf; -typedef Interval Intervald; -typedef Interval Intervals; -typedef Interval Intervali; - -//---------------- -// Implementation -//---------------- - - -template -inline Interval::Interval() -{ - makeEmpty(); -} - -template -inline Interval::Interval(const T& point) -{ - min = point; - max = point; -} - -template -inline Interval::Interval(const T& minV, const T& maxV) -{ - min = minV; - max = maxV; -} - -template -inline bool -Interval::operator == (const Interval &src) const -{ - return (min == src.min && max == src.max); -} - -template -inline void -Interval::makeEmpty() -{ - min = limits::max(); - max = limits::min(); -} - -template -inline void -Interval::extendBy(const T& point) -{ - if ( point < min ) - min = point; - - if ( point > max ) - max = point; -} - -template -inline void -Interval::extendBy(const Interval& interval) -{ - if ( interval.min < min ) - min = interval.min; - - if ( interval.max > max ) - max = interval.max; -} - -template -inline bool -Interval::intersects(const T& point) const -{ - return point >= min && point <= max; -} - -template -inline bool -Interval::intersects(const Interval& interval) const -{ - return interval.max >= min && interval.min <= max; -} - -template -inline T -Interval::size() const -{ - return max-min; -} - -template -inline T -Interval::center() const -{ - return (max+min)/2; -} - -template -inline bool -Interval::isEmpty() const -{ - return max < min; -} - -template -inline bool Interval::hasVolume() const -{ - return max > min; -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHINTERVAL_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathLimits.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathLimits.h deleted file mode 100644 index eb6f999..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathLimits.h +++ /dev/null @@ -1,268 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHLIMITS_H -#define INCLUDED_IMATHLIMITS_H - -//---------------------------------------------------------------- -// -// Limitations of the basic C++ numerical data types -// -//---------------------------------------------------------------- - -#include "ImathNamespace.h" -#include -#include - -//------------------------------------------ -// In Windows, min and max are macros. Yay. -//------------------------------------------ - -#if defined _WIN32 || defined _WIN64 - #ifdef min - #undef min - #endif - #ifdef max - #undef max - #endif -#endif - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -//----------------------------------------------------------------- -// -// Template class limits returns information about the limits -// of numerical data type T: -// -// min() largest possible negative value of type T -// -// max() largest possible positive value of type T -// -// smallest() smallest possible positive value of type T -// (for float and double: smallest normalized -// positive value) -// -// epsilon() smallest possible e of type T, for which -// 1 + e != 1 -// -// isIntegral() returns true if T is an integral type -// -// isSigned() returns true if T is signed -// -// Class limits is useful to implement template classes or -// functions which depend on the limits of a numerical type -// which is not known in advance; for example: -// -// template max (T x[], int n) -// { -// T m = limits::min(); -// -// for (int i = 0; i < n; i++) -// if (m < x[i]) -// m = x[i]; -// -// return m; -// } -// -// Class limits has been implemented for the following types: -// -// char, signed char, unsigned char -// short, unsigned short -// int, unsigned int -// long, unsigned long -// float -// double -// long double -// -// Class limits has only static member functions, all of which -// are implemented as inlines. No objects of type limits are -// ever created. -// -//----------------------------------------------------------------- - - -template struct limits -{ - static T min(); - static T max(); - static T smallest(); - static T epsilon(); - static bool isIntegral(); - static bool isSigned(); -}; - - -//--------------- -// Implementation -//--------------- - -template <> -struct limits -{ - static char min() {return CHAR_MIN;} - static char max() {return CHAR_MAX;} - static char smallest() {return 1;} - static char epsilon() {return 1;} - static bool isIntegral() {return true;} - static bool isSigned() {return (char) ~0 < 0;} -}; - -template <> -struct limits -{ - static signed char min() {return SCHAR_MIN;} - static signed char max() {return SCHAR_MAX;} - static signed char smallest() {return 1;} - static signed char epsilon() {return 1;} - static bool isIntegral() {return true;} - static bool isSigned() {return true;} -}; - -template <> -struct limits -{ - static unsigned char min() {return 0;} - static unsigned char max() {return UCHAR_MAX;} - static unsigned char smallest() {return 1;} - static unsigned char epsilon() {return 1;} - static bool isIntegral() {return true;} - static bool isSigned() {return false;} -}; - -template <> -struct limits -{ - static short min() {return SHRT_MIN;} - static short max() {return SHRT_MAX;} - static short smallest() {return 1;} - static short epsilon() {return 1;} - static bool isIntegral() {return true;} - static bool isSigned() {return true;} -}; - -template <> -struct limits -{ - static unsigned short min() {return 0;} - static unsigned short max() {return USHRT_MAX;} - static unsigned short smallest() {return 1;} - static unsigned short epsilon() {return 1;} - static bool isIntegral() {return true;} - static bool isSigned() {return false;} -}; - -template <> -struct limits -{ - static int min() {return INT_MIN;} - static int max() {return INT_MAX;} - static int smallest() {return 1;} - static int epsilon() {return 1;} - static bool isIntegral() {return true;} - static bool isSigned() {return true;} -}; - -template <> -struct limits -{ - static unsigned int min() {return 0;} - static unsigned int max() {return UINT_MAX;} - static unsigned int smallest() {return 1;} - static unsigned int epsilon() {return 1;} - static bool isIntegral() {return true;} - static bool isSigned() {return false;} -}; - -template <> -struct limits -{ - static long min() {return LONG_MIN;} - static long max() {return LONG_MAX;} - static long smallest() {return 1;} - static long epsilon() {return 1;} - static bool isIntegral() {return true;} - static bool isSigned() {return true;} -}; - -template <> -struct limits -{ - static unsigned long min() {return 0;} - static unsigned long max() {return ULONG_MAX;} - static unsigned long smallest() {return 1;} - static unsigned long epsilon() {return 1;} - static bool isIntegral() {return true;} - static bool isSigned() {return false;} -}; - -template <> -struct limits -{ - static float min() {return -FLT_MAX;} - static float max() {return FLT_MAX;} - static float smallest() {return FLT_MIN;} - static float epsilon() {return FLT_EPSILON;} - static bool isIntegral() {return false;} - static bool isSigned() {return true;} -}; - -template <> -struct limits -{ - static double min() {return -DBL_MAX;} - static double max() {return DBL_MAX;} - static double smallest() {return DBL_MIN;} - static double epsilon() {return DBL_EPSILON;} - static bool isIntegral() {return false;} - static bool isSigned() {return true;} -}; - -template <> -struct limits -{ - static long double min() {return -LDBL_MAX;} - static long double max() {return LDBL_MAX;} - static long double smallest() {return LDBL_MIN;} - static long double epsilon() {return LDBL_EPSILON;} - static bool isIntegral() {return false;} - static bool isSigned() {return true;} -}; - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHLIMITS_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathLine.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathLine.h deleted file mode 100644 index 61e4508..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathLine.h +++ /dev/null @@ -1,185 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHLINE_H -#define INCLUDED_IMATHLINE_H - -//------------------------------------- -// -// A 3D line class template -// -//------------------------------------- - -#include "ImathVec.h" -#include "ImathLimits.h" -#include "ImathMatrix.h" -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -template -class Line3 -{ - public: - - Vec3 pos; - Vec3 dir; - - //------------------------------------------------------------- - // Constructors - default is normalized units along direction - //------------------------------------------------------------- - - Line3() {} - Line3(const Vec3& point1, const Vec3& point2); - - //------------------ - // State Query/Set - //------------------ - - void set(const Vec3& point1, - const Vec3& point2); - - //------- - // F(t) - //------- - - Vec3 operator() (T parameter) const; - - //--------- - // Query - //--------- - - T distanceTo(const Vec3& point) const; - T distanceTo(const Line3& line) const; - Vec3 closestPointTo(const Vec3& point) const; - Vec3 closestPointTo(const Line3& line) const; -}; - - -//-------------------- -// Convenient typedefs -//-------------------- - -typedef Line3 Line3f; -typedef Line3 Line3d; - - -//--------------- -// Implementation -//--------------- - -template -inline Line3::Line3(const Vec3 &p0, const Vec3 &p1) -{ - set(p0,p1); -} - -template -inline void Line3::set(const Vec3 &p0, const Vec3 &p1) -{ - pos = p0; dir = p1-p0; - dir.normalize(); -} - -template -inline Vec3 Line3::operator()(T parameter) const -{ - return pos + dir * parameter; -} - -template -inline T Line3::distanceTo(const Vec3& point) const -{ - return (closestPointTo(point)-point).length(); -} - -template -inline Vec3 Line3::closestPointTo(const Vec3& point) const -{ - return ((point - pos) ^ dir) * dir + pos; -} - -template -inline T Line3::distanceTo(const Line3& line) const -{ - T d = (dir % line.dir) ^ (line.pos - pos); - return (d >= 0)? d: -d; -} - -template -inline Vec3 -Line3::closestPointTo(const Line3& line) const -{ - // Assumes the lines are normalized - - Vec3 posLpos = pos - line.pos ; - T c = dir ^ posLpos; - T a = line.dir ^ dir; - T f = line.dir ^ posLpos ; - T num = c - a * f; - - T denom = a*a - 1; - - T absDenom = ((denom >= 0)? denom: -denom); - - if (absDenom < 1) - { - T absNum = ((num >= 0)? num: -num); - - if (absNum >= absDenom * limits::max()) - return pos; - } - - return pos + dir * (num / denom); -} - -template -std::ostream& operator<< (std::ostream &o, const Line3 &line) -{ - return o << "(" << line.pos << ", " << line.dir << ")"; -} - -template -inline Line3 operator * (const Line3 &line, const Matrix44 &M) -{ - return Line3( line.pos * M, (line.pos + line.dir) * M ); -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHLINE_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathLineAlgo.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathLineAlgo.h deleted file mode 100644 index b08a1ff..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathLineAlgo.h +++ /dev/null @@ -1,288 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHLINEALGO_H -#define INCLUDED_IMATHLINEALGO_H - -//------------------------------------------------------------------ -// -// This file contains algorithms applied to or in conjunction -// with lines (Imath::Line). These algorithms may require -// more headers to compile. The assumption made is that these -// functions are called much less often than the basic line -// functions or these functions require more support classes -// -// Contains: -// -// bool closestPoints(const Line& line1, -// const Line& line2, -// Vec3& point1, -// Vec3& point2) -// -// bool intersect( const Line3 &line, -// const Vec3 &v0, -// const Vec3 &v1, -// const Vec3 &v2, -// Vec3 &pt, -// Vec3 &barycentric, -// bool &front) -// -// V3f -// closestVertex(const Vec3 &v0, -// const Vec3 &v1, -// const Vec3 &v2, -// const Line3 &l) -// -// V3f -// rotatePoint(const Vec3 p, Line3 l, float angle) -// -//------------------------------------------------------------------ - -#include "ImathLine.h" -#include "ImathVecAlgo.h" -#include "ImathFun.h" -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -template -bool -closestPoints - (const Line3& line1, - const Line3& line2, - Vec3& point1, - Vec3& point2) -{ - // - // Compute point1 and point2 such that point1 is on line1, point2 - // is on line2 and the distance between point1 and point2 is minimal. - // This function returns true if point1 and point2 can be computed, - // or false if line1 and line2 are parallel or nearly parallel. - // This function assumes that line1.dir and line2.dir are normalized. - // - - Vec3 w = line1.pos - line2.pos; - T d1w = line1.dir ^ w; - T d2w = line2.dir ^ w; - T d1d2 = line1.dir ^ line2.dir; - T n1 = d1d2 * d2w - d1w; - T n2 = d2w - d1d2 * d1w; - T d = 1 - d1d2 * d1d2; - T absD = abs (d); - - if ((absD > 1) || - (abs (n1) < limits::max() * absD && - abs (n2) < limits::max() * absD)) - { - point1 = line1 (n1 / d); - point2 = line2 (n2 / d); - return true; - } - else - { - return false; - } -} - - -template -bool -intersect - (const Line3 &line, - const Vec3 &v0, - const Vec3 &v1, - const Vec3 &v2, - Vec3 &pt, - Vec3 &barycentric, - bool &front) -{ - // - // Given a line and a triangle (v0, v1, v2), the intersect() function - // finds the intersection of the line and the plane that contains the - // triangle. - // - // If the intersection point cannot be computed, either because the - // line and the triangle's plane are nearly parallel or because the - // triangle's area is very small, intersect() returns false. - // - // If the intersection point is outside the triangle, intersect - // returns false. - // - // If the intersection point, pt, is inside the triangle, intersect() - // computes a front-facing flag and the barycentric coordinates of - // the intersection point, and returns true. - // - // The front-facing flag is true if the dot product of the triangle's - // normal, (v2-v1)%(v1-v0), and the line's direction is negative. - // - // The barycentric coordinates have the following property: - // - // pt = v0 * barycentric.x + v1 * barycentric.y + v2 * barycentric.z - // - - Vec3 edge0 = v1 - v0; - Vec3 edge1 = v2 - v1; - Vec3 normal = edge1 % edge0; - - T l = normal.length(); - - if (l != 0) - normal /= l; - else - return false; // zero-area triangle - - // - // d is the distance of line.pos from the plane that contains the triangle. - // The intersection point is at line.pos + (d/nd) * line.dir. - // - - T d = normal ^ (v0 - line.pos); - T nd = normal ^ line.dir; - - if (abs (nd) > 1 || abs (d) < limits::max() * abs (nd)) - pt = line (d / nd); - else - return false; // line and plane are nearly parallel - - // - // Compute the barycentric coordinates of the intersection point. - // The intersection is inside the triangle if all three barycentric - // coordinates are between zero and one. - // - - { - Vec3 en = edge0.normalized(); - Vec3 a = pt - v0; - Vec3 b = v2 - v0; - Vec3 c = (a - en * (en ^ a)); - Vec3 d = (b - en * (en ^ b)); - T e = c ^ d; - T f = d ^ d; - - if (e >= 0 && e <= f) - barycentric.z = e / f; - else - return false; // outside - } - - { - Vec3 en = edge1.normalized(); - Vec3 a = pt - v1; - Vec3 b = v0 - v1; - Vec3 c = (a - en * (en ^ a)); - Vec3 d = (b - en * (en ^ b)); - T e = c ^ d; - T f = d ^ d; - - if (e >= 0 && e <= f) - barycentric.x = e / f; - else - return false; // outside - } - - barycentric.y = 1 - barycentric.x - barycentric.z; - - if (barycentric.y < 0) - return false; // outside - - front = ((line.dir ^ normal) < 0); - return true; -} - - -template -Vec3 -closestVertex - (const Vec3 &v0, - const Vec3 &v1, - const Vec3 &v2, - const Line3 &l) -{ - Vec3 nearest = v0; - T neardot = (v0 - l.closestPointTo(v0)).length2(); - - T tmp = (v1 - l.closestPointTo(v1)).length2(); - - if (tmp < neardot) - { - neardot = tmp; - nearest = v1; - } - - tmp = (v2 - l.closestPointTo(v2)).length2(); - if (tmp < neardot) - { - neardot = tmp; - nearest = v2; - } - - return nearest; -} - - -template -Vec3 -rotatePoint (const Vec3 p, Line3 l, T angle) -{ - // - // Rotate the point p around the line l by the given angle. - // - - // - // Form a coordinate frame with . The rotation is the in xy - // plane. - // - - Vec3 q = l.closestPointTo(p); - Vec3 x = p - q; - T radius = x.length(); - - x.normalize(); - Vec3 y = (x % l.dir).normalize(); - - T cosangle = Math::cos(angle); - T sinangle = Math::sin(angle); - - Vec3 r = q + x * radius * cosangle + y * radius * sinangle; - - return r; -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHLINEALGO_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMath.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMath.h deleted file mode 100644 index 1961d5a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMath.h +++ /dev/null @@ -1,208 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHMATH_H -#define INCLUDED_IMATHMATH_H - -//---------------------------------------------------------------------------- -// -// ImathMath.h -// -// This file contains template functions which call the double- -// precision math functions defined in math.h (sin(), sqrt(), -// exp() etc.), with specializations that call the faster -// single-precision versions (sinf(), sqrtf(), expf() etc.) -// when appropriate. -// -// Example: -// -// double x = Math::sqrt (3); // calls ::sqrt(double); -// float y = Math::sqrt (3); // calls ::sqrtf(float); -// -// When would I want to use this? -// -// You may be writing a template which needs to call some function -// defined in math.h, for example to extract a square root, but you -// don't know whether to call the single- or the double-precision -// version of this function (sqrt() or sqrtf()): -// -// template -// T -// glorp (T x) -// { -// return sqrt (x + 1); // should call ::sqrtf(float) -// } // if x is a float, but we -// // don't know if it is -// -// Using the templates in this file, you can make sure that -// the appropriate version of the math function is called: -// -// template -// T -// glorp (T x, T y) -// { -// return Math::sqrt (x + 1); // calls ::sqrtf(float) if x -// } // is a float, ::sqrt(double) -// // otherwise -// -//---------------------------------------------------------------------------- - -#include "ImathPlatform.h" -#include "ImathLimits.h" -#include "ImathNamespace.h" -#include - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -template -struct Math -{ - static T acos (T x) {return ::acos (double(x));} - static T asin (T x) {return ::asin (double(x));} - static T atan (T x) {return ::atan (double(x));} - static T atan2 (T x, T y) {return ::atan2 (double(x), double(y));} - static T cos (T x) {return ::cos (double(x));} - static T sin (T x) {return ::sin (double(x));} - static T tan (T x) {return ::tan (double(x));} - static T cosh (T x) {return ::cosh (double(x));} - static T sinh (T x) {return ::sinh (double(x));} - static T tanh (T x) {return ::tanh (double(x));} - static T exp (T x) {return ::exp (double(x));} - static T log (T x) {return ::log (double(x));} - static T log10 (T x) {return ::log10 (double(x));} - static T modf (T x, T *iptr) - { - double ival; - T rval( ::modf (double(x),&ival)); - *iptr = ival; - return rval; - } - static T pow (T x, T y) {return ::pow (double(x), double(y));} - static T sqrt (T x) {return ::sqrt (double(x));} - static T ceil (T x) {return ::ceil (double(x));} - static T fabs (T x) {return ::fabs (double(x));} - static T floor (T x) {return ::floor (double(x));} - static T fmod (T x, T y) {return ::fmod (double(x), double(y));} - static T hypot (T x, T y) {return ::hypot (double(x), double(y));} -}; - - -template <> -struct Math -{ - static float acos (float x) {return ::acosf (x);} - static float asin (float x) {return ::asinf (x);} - static float atan (float x) {return ::atanf (x);} - static float atan2 (float x, float y) {return ::atan2f (x, y);} - static float cos (float x) {return ::cosf (x);} - static float sin (float x) {return ::sinf (x);} - static float tan (float x) {return ::tanf (x);} - static float cosh (float x) {return ::coshf (x);} - static float sinh (float x) {return ::sinhf (x);} - static float tanh (float x) {return ::tanhf (x);} - static float exp (float x) {return ::expf (x);} - static float log (float x) {return ::logf (x);} - static float log10 (float x) {return ::log10f (x);} - static float modf (float x, float *y) {return ::modff (x, y);} - static float pow (float x, float y) {return ::powf (x, y);} - static float sqrt (float x) {return ::sqrtf (x);} - static float ceil (float x) {return ::ceilf (x);} - static float fabs (float x) {return ::fabsf (x);} - static float floor (float x) {return ::floorf (x);} - static float fmod (float x, float y) {return ::fmodf (x, y);} -#if !defined(_MSC_VER) - static float hypot (float x, float y) {return ::hypotf (x, y);} -#else - static float hypot (float x, float y) {return ::sqrtf(x*x + y*y);} -#endif -}; - - -//-------------------------------------------------------------------------- -// Don Hatch's version of sin(x)/x, which is accurate for very small x. -// Returns 1 for x == 0. -//-------------------------------------------------------------------------- - -template -inline T -sinx_over_x (T x) -{ - if (x * x < limits::epsilon()) - return T (1); - else - return Math::sin (x) / x; -} - - -//-------------------------------------------------------------------------- -// Compare two numbers and test if they are "approximately equal": -// -// equalWithAbsError (x1, x2, e) -// -// Returns true if x1 is the same as x2 with an absolute error of -// no more than e, -// -// abs (x1 - x2) <= e -// -// equalWithRelError (x1, x2, e) -// -// Returns true if x1 is the same as x2 with an relative error of -// no more than e, -// -// abs (x1 - x2) <= e * x1 -// -//-------------------------------------------------------------------------- - -template -inline bool -equalWithAbsError (T x1, T x2, T e) -{ - return ((x1 > x2)? x1 - x2: x2 - x1) <= e; -} - - -template -inline bool -equalWithRelError (T x1, T x2, T e) -{ - return ((x1 > x2)? x1 - x2: x2 - x1) <= e * ((x1 > 0)? x1: -x1); -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHMATH_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMatrix.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMatrix.h deleted file mode 100644 index 3e96c2f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMatrix.h +++ /dev/null @@ -1,3441 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHMATRIX_H -#define INCLUDED_IMATHMATRIX_H - -//---------------------------------------------------------------- -// -// 2D (3x3) and 3D (4x4) transformation matrix templates. -// -//---------------------------------------------------------------- - -#include "ImathPlatform.h" -#include "ImathFun.h" -#include "ImathExc.h" -#include "ImathVec.h" -#include "ImathShear.h" -#include "ImathNamespace.h" - -#include -#include -#include -#include - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -// suppress exception specification warnings -#pragma warning(disable:4290) -#endif - - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -enum Uninitialized {UNINITIALIZED}; - - -template class Matrix33 -{ - public: - - //------------------- - // Access to elements - //------------------- - - T x[3][3]; - - T * operator [] (int i); - const T * operator [] (int i) const; - - - //------------- - // Constructors - //------------- - - Matrix33 (Uninitialized) {} - - Matrix33 (); - // 1 0 0 - // 0 1 0 - // 0 0 1 - - Matrix33 (T a); - // a a a - // a a a - // a a a - - Matrix33 (const T a[3][3]); - // a[0][0] a[0][1] a[0][2] - // a[1][0] a[1][1] a[1][2] - // a[2][0] a[2][1] a[2][2] - - Matrix33 (T a, T b, T c, T d, T e, T f, T g, T h, T i); - - // a b c - // d e f - // g h i - - - //-------------------------------- - // Copy constructor and assignment - //-------------------------------- - - Matrix33 (const Matrix33 &v); - template explicit Matrix33 (const Matrix33 &v); - - const Matrix33 & operator = (const Matrix33 &v); - const Matrix33 & operator = (T a); - - - //---------------------- - // Compatibility with Sb - //---------------------- - - T * getValue (); - const T * getValue () const; - - template - void getValue (Matrix33 &v) const; - template - Matrix33 & setValue (const Matrix33 &v); - - template - Matrix33 & setTheMatrix (const Matrix33 &v); - - - //--------- - // Identity - //--------- - - void makeIdentity(); - - - //--------- - // Equality - //--------- - - bool operator == (const Matrix33 &v) const; - bool operator != (const Matrix33 &v) const; - - //----------------------------------------------------------------------- - // Compare two matrices and test if they are "approximately equal": - // - // equalWithAbsError (m, e) - // - // Returns true if the coefficients of this and m are the same with - // an absolute error of no more than e, i.e., for all i, j - // - // abs (this[i][j] - m[i][j]) <= e - // - // equalWithRelError (m, e) - // - // Returns true if the coefficients of this and m are the same with - // a relative error of no more than e, i.e., for all i, j - // - // abs (this[i] - v[i][j]) <= e * abs (this[i][j]) - //----------------------------------------------------------------------- - - bool equalWithAbsError (const Matrix33 &v, T e) const; - bool equalWithRelError (const Matrix33 &v, T e) const; - - - //------------------------ - // Component-wise addition - //------------------------ - - const Matrix33 & operator += (const Matrix33 &v); - const Matrix33 & operator += (T a); - Matrix33 operator + (const Matrix33 &v) const; - - - //--------------------------- - // Component-wise subtraction - //--------------------------- - - const Matrix33 & operator -= (const Matrix33 &v); - const Matrix33 & operator -= (T a); - Matrix33 operator - (const Matrix33 &v) const; - - - //------------------------------------ - // Component-wise multiplication by -1 - //------------------------------------ - - Matrix33 operator - () const; - const Matrix33 & negate (); - - - //------------------------------ - // Component-wise multiplication - //------------------------------ - - const Matrix33 & operator *= (T a); - Matrix33 operator * (T a) const; - - - //----------------------------------- - // Matrix-times-matrix multiplication - //----------------------------------- - - const Matrix33 & operator *= (const Matrix33 &v); - Matrix33 operator * (const Matrix33 &v) const; - - - //----------------------------------------------------------------- - // Vector-times-matrix multiplication; see also the "operator *" - // functions defined below. - // - // m.multVecMatrix(src,dst) implements a homogeneous transformation - // by computing Vec3 (src.x, src.y, 1) * m and dividing by the - // result's third element. - // - // m.multDirMatrix(src,dst) multiplies src by the upper left 2x2 - // submatrix, ignoring the rest of matrix m. - //----------------------------------------------------------------- - - template - void multVecMatrix(const Vec2 &src, Vec2 &dst) const; - - template - void multDirMatrix(const Vec2 &src, Vec2 &dst) const; - - - //------------------------ - // Component-wise division - //------------------------ - - const Matrix33 & operator /= (T a); - Matrix33 operator / (T a) const; - - - //------------------ - // Transposed matrix - //------------------ - - const Matrix33 & transpose (); - Matrix33 transposed () const; - - - //------------------------------------------------------------ - // Inverse matrix: If singExc is false, inverting a singular - // matrix produces an identity matrix. If singExc is true, - // inverting a singular matrix throws a SingMatrixExc. - // - // inverse() and invert() invert matrices using determinants; - // gjInverse() and gjInvert() use the Gauss-Jordan method. - // - // inverse() and invert() are significantly faster than - // gjInverse() and gjInvert(), but the results may be slightly - // less accurate. - // - //------------------------------------------------------------ - - const Matrix33 & invert (bool singExc = false) - throw (IEX_NAMESPACE::MathExc); - - Matrix33 inverse (bool singExc = false) const - throw (IEX_NAMESPACE::MathExc); - - const Matrix33 & gjInvert (bool singExc = false) - throw (IEX_NAMESPACE::MathExc); - - Matrix33 gjInverse (bool singExc = false) const - throw (IEX_NAMESPACE::MathExc); - - - //------------------------------------------------ - // Calculate the matrix minor of the (r,c) element - //------------------------------------------------ - - T minorOf (const int r, const int c) const; - - //--------------------------------------------------- - // Build a minor using the specified rows and columns - //--------------------------------------------------- - - T fastMinor (const int r0, const int r1, - const int c0, const int c1) const; - - //------------ - // Determinant - //------------ - - T determinant() const; - - //----------------------------------------- - // Set matrix to rotation by r (in radians) - //----------------------------------------- - - template - const Matrix33 & setRotation (S r); - - - //----------------------------- - // Rotate the given matrix by r - //----------------------------- - - template - const Matrix33 & rotate (S r); - - - //-------------------------------------------- - // Set matrix to scale by given uniform factor - //-------------------------------------------- - - const Matrix33 & setScale (T s); - - - //------------------------------------ - // Set matrix to scale by given vector - //------------------------------------ - - template - const Matrix33 & setScale (const Vec2 &s); - - - //---------------------- - // Scale the matrix by s - //---------------------- - - template - const Matrix33 & scale (const Vec2 &s); - - - //------------------------------------------ - // Set matrix to translation by given vector - //------------------------------------------ - - template - const Matrix33 & setTranslation (const Vec2 &t); - - - //----------------------------- - // Return translation component - //----------------------------- - - Vec2 translation () const; - - - //-------------------------- - // Translate the matrix by t - //-------------------------- - - template - const Matrix33 & translate (const Vec2 &t); - - - //----------------------------------------------------------- - // Set matrix to shear x for each y coord. by given factor xy - //----------------------------------------------------------- - - template - const Matrix33 & setShear (const S &h); - - - //------------------------------------------------------------- - // Set matrix to shear x for each y coord. by given factor h[0] - // and to shear y for each x coord. by given factor h[1] - //------------------------------------------------------------- - - template - const Matrix33 & setShear (const Vec2 &h); - - - //----------------------------------------------------------- - // Shear the matrix in x for each y coord. by given factor xy - //----------------------------------------------------------- - - template - const Matrix33 & shear (const S &xy); - - - //----------------------------------------------------------- - // Shear the matrix in x for each y coord. by given factor xy - // and shear y for each x coord. by given factor yx - //----------------------------------------------------------- - - template - const Matrix33 & shear (const Vec2 &h); - - - //-------------------------------------------------------- - // Number of the row and column dimensions, since - // Matrix33 is a square matrix. - //-------------------------------------------------------- - - static unsigned int dimensions() {return 3;} - - - //------------------------------------------------- - // Limitations of type T (see also class limits) - //------------------------------------------------- - - static T baseTypeMin() {return limits::min();} - static T baseTypeMax() {return limits::max();} - static T baseTypeSmallest() {return limits::smallest();} - static T baseTypeEpsilon() {return limits::epsilon();} - - typedef T BaseType; - typedef Vec3 BaseVecType; - - private: - - template - struct isSameType - { - enum {value = 0}; - }; - - template - struct isSameType - { - enum {value = 1}; - }; -}; - - -template class Matrix44 -{ - public: - - //------------------- - // Access to elements - //------------------- - - T x[4][4]; - - T * operator [] (int i); - const T * operator [] (int i) const; - - - //------------- - // Constructors - //------------- - - Matrix44 (Uninitialized) {} - - Matrix44 (); - // 1 0 0 0 - // 0 1 0 0 - // 0 0 1 0 - // 0 0 0 1 - - Matrix44 (T a); - // a a a a - // a a a a - // a a a a - // a a a a - - Matrix44 (const T a[4][4]) ; - // a[0][0] a[0][1] a[0][2] a[0][3] - // a[1][0] a[1][1] a[1][2] a[1][3] - // a[2][0] a[2][1] a[2][2] a[2][3] - // a[3][0] a[3][1] a[3][2] a[3][3] - - Matrix44 (T a, T b, T c, T d, T e, T f, T g, T h, - T i, T j, T k, T l, T m, T n, T o, T p); - - // a b c d - // e f g h - // i j k l - // m n o p - - Matrix44 (Matrix33 r, Vec3 t); - // r r r 0 - // r r r 0 - // r r r 0 - // t t t 1 - - - //-------------------------------- - // Copy constructor and assignment - //-------------------------------- - - Matrix44 (const Matrix44 &v); - template explicit Matrix44 (const Matrix44 &v); - - const Matrix44 & operator = (const Matrix44 &v); - const Matrix44 & operator = (T a); - - - //---------------------- - // Compatibility with Sb - //---------------------- - - T * getValue (); - const T * getValue () const; - - template - void getValue (Matrix44 &v) const; - template - Matrix44 & setValue (const Matrix44 &v); - - template - Matrix44 & setTheMatrix (const Matrix44 &v); - - //--------- - // Identity - //--------- - - void makeIdentity(); - - - //--------- - // Equality - //--------- - - bool operator == (const Matrix44 &v) const; - bool operator != (const Matrix44 &v) const; - - //----------------------------------------------------------------------- - // Compare two matrices and test if they are "approximately equal": - // - // equalWithAbsError (m, e) - // - // Returns true if the coefficients of this and m are the same with - // an absolute error of no more than e, i.e., for all i, j - // - // abs (this[i][j] - m[i][j]) <= e - // - // equalWithRelError (m, e) - // - // Returns true if the coefficients of this and m are the same with - // a relative error of no more than e, i.e., for all i, j - // - // abs (this[i] - v[i][j]) <= e * abs (this[i][j]) - //----------------------------------------------------------------------- - - bool equalWithAbsError (const Matrix44 &v, T e) const; - bool equalWithRelError (const Matrix44 &v, T e) const; - - - //------------------------ - // Component-wise addition - //------------------------ - - const Matrix44 & operator += (const Matrix44 &v); - const Matrix44 & operator += (T a); - Matrix44 operator + (const Matrix44 &v) const; - - - //--------------------------- - // Component-wise subtraction - //--------------------------- - - const Matrix44 & operator -= (const Matrix44 &v); - const Matrix44 & operator -= (T a); - Matrix44 operator - (const Matrix44 &v) const; - - - //------------------------------------ - // Component-wise multiplication by -1 - //------------------------------------ - - Matrix44 operator - () const; - const Matrix44 & negate (); - - - //------------------------------ - // Component-wise multiplication - //------------------------------ - - const Matrix44 & operator *= (T a); - Matrix44 operator * (T a) const; - - - //----------------------------------- - // Matrix-times-matrix multiplication - //----------------------------------- - - const Matrix44 & operator *= (const Matrix44 &v); - Matrix44 operator * (const Matrix44 &v) const; - - static void multiply (const Matrix44 &a, // assumes that - const Matrix44 &b, // &a != &c and - Matrix44 &c); // &b != &c. - - - //----------------------------------------------------------------- - // Vector-times-matrix multiplication; see also the "operator *" - // functions defined below. - // - // m.multVecMatrix(src,dst) implements a homogeneous transformation - // by computing Vec4 (src.x, src.y, src.z, 1) * m and dividing by - // the result's third element. - // - // m.multDirMatrix(src,dst) multiplies src by the upper left 3x3 - // submatrix, ignoring the rest of matrix m. - //----------------------------------------------------------------- - - template - void multVecMatrix(const Vec3 &src, Vec3 &dst) const; - - template - void multDirMatrix(const Vec3 &src, Vec3 &dst) const; - - - //------------------------ - // Component-wise division - //------------------------ - - const Matrix44 & operator /= (T a); - Matrix44 operator / (T a) const; - - - //------------------ - // Transposed matrix - //------------------ - - const Matrix44 & transpose (); - Matrix44 transposed () const; - - - //------------------------------------------------------------ - // Inverse matrix: If singExc is false, inverting a singular - // matrix produces an identity matrix. If singExc is true, - // inverting a singular matrix throws a SingMatrixExc. - // - // inverse() and invert() invert matrices using determinants; - // gjInverse() and gjInvert() use the Gauss-Jordan method. - // - // inverse() and invert() are significantly faster than - // gjInverse() and gjInvert(), but the results may be slightly - // less accurate. - // - //------------------------------------------------------------ - - const Matrix44 & invert (bool singExc = false) - throw (IEX_NAMESPACE::MathExc); - - Matrix44 inverse (bool singExc = false) const - throw (IEX_NAMESPACE::MathExc); - - const Matrix44 & gjInvert (bool singExc = false) - throw (IEX_NAMESPACE::MathExc); - - Matrix44 gjInverse (bool singExc = false) const - throw (IEX_NAMESPACE::MathExc); - - - //------------------------------------------------ - // Calculate the matrix minor of the (r,c) element - //------------------------------------------------ - - T minorOf (const int r, const int c) const; - - //--------------------------------------------------- - // Build a minor using the specified rows and columns - //--------------------------------------------------- - - T fastMinor (const int r0, const int r1, const int r2, - const int c0, const int c1, const int c2) const; - - //------------ - // Determinant - //------------ - - T determinant() const; - - //-------------------------------------------------------- - // Set matrix to rotation by XYZ euler angles (in radians) - //-------------------------------------------------------- - - template - const Matrix44 & setEulerAngles (const Vec3& r); - - - //-------------------------------------------------------- - // Set matrix to rotation around given axis by given angle - //-------------------------------------------------------- - - template - const Matrix44 & setAxisAngle (const Vec3& ax, S ang); - - - //------------------------------------------- - // Rotate the matrix by XYZ euler angles in r - //------------------------------------------- - - template - const Matrix44 & rotate (const Vec3 &r); - - - //-------------------------------------------- - // Set matrix to scale by given uniform factor - //-------------------------------------------- - - const Matrix44 & setScale (T s); - - - //------------------------------------ - // Set matrix to scale by given vector - //------------------------------------ - - template - const Matrix44 & setScale (const Vec3 &s); - - - //---------------------- - // Scale the matrix by s - //---------------------- - - template - const Matrix44 & scale (const Vec3 &s); - - - //------------------------------------------ - // Set matrix to translation by given vector - //------------------------------------------ - - template - const Matrix44 & setTranslation (const Vec3 &t); - - - //----------------------------- - // Return translation component - //----------------------------- - - const Vec3 translation () const; - - - //-------------------------- - // Translate the matrix by t - //-------------------------- - - template - const Matrix44 & translate (const Vec3 &t); - - - //------------------------------------------------------------- - // Set matrix to shear by given vector h. The resulting matrix - // will shear x for each y coord. by a factor of h[0] ; - // will shear x for each z coord. by a factor of h[1] ; - // will shear y for each z coord. by a factor of h[2] . - //------------------------------------------------------------- - - template - const Matrix44 & setShear (const Vec3 &h); - - - //------------------------------------------------------------ - // Set matrix to shear by given factors. The resulting matrix - // will shear x for each y coord. by a factor of h.xy ; - // will shear x for each z coord. by a factor of h.xz ; - // will shear y for each z coord. by a factor of h.yz ; - // will shear y for each x coord. by a factor of h.yx ; - // will shear z for each x coord. by a factor of h.zx ; - // will shear z for each y coord. by a factor of h.zy . - //------------------------------------------------------------ - - template - const Matrix44 & setShear (const Shear6 &h); - - - //-------------------------------------------------------- - // Shear the matrix by given vector. The composed matrix - // will be * , where the shear matrix ... - // will shear x for each y coord. by a factor of h[0] ; - // will shear x for each z coord. by a factor of h[1] ; - // will shear y for each z coord. by a factor of h[2] . - //-------------------------------------------------------- - - template - const Matrix44 & shear (const Vec3 &h); - - //-------------------------------------------------------- - // Number of the row and column dimensions, since - // Matrix44 is a square matrix. - //-------------------------------------------------------- - - static unsigned int dimensions() {return 4;} - - - //------------------------------------------------------------ - // Shear the matrix by the given factors. The composed matrix - // will be * , where the shear matrix ... - // will shear x for each y coord. by a factor of h.xy ; - // will shear x for each z coord. by a factor of h.xz ; - // will shear y for each z coord. by a factor of h.yz ; - // will shear y for each x coord. by a factor of h.yx ; - // will shear z for each x coord. by a factor of h.zx ; - // will shear z for each y coord. by a factor of h.zy . - //------------------------------------------------------------ - - template - const Matrix44 & shear (const Shear6 &h); - - - //------------------------------------------------- - // Limitations of type T (see also class limits) - //------------------------------------------------- - - static T baseTypeMin() {return limits::min();} - static T baseTypeMax() {return limits::max();} - static T baseTypeSmallest() {return limits::smallest();} - static T baseTypeEpsilon() {return limits::epsilon();} - - typedef T BaseType; - typedef Vec4 BaseVecType; - - private: - - template - struct isSameType - { - enum {value = 0}; - }; - - template - struct isSameType - { - enum {value = 1}; - }; -}; - - -//-------------- -// Stream output -//-------------- - -template -std::ostream & operator << (std::ostream & s, const Matrix33 &m); - -template -std::ostream & operator << (std::ostream & s, const Matrix44 &m); - - -//--------------------------------------------- -// Vector-times-matrix multiplication operators -//--------------------------------------------- - -template -const Vec2 & operator *= (Vec2 &v, const Matrix33 &m); - -template -Vec2 operator * (const Vec2 &v, const Matrix33 &m); - -template -const Vec3 & operator *= (Vec3 &v, const Matrix33 &m); - -template -Vec3 operator * (const Vec3 &v, const Matrix33 &m); - -template -const Vec3 & operator *= (Vec3 &v, const Matrix44 &m); - -template -Vec3 operator * (const Vec3 &v, const Matrix44 &m); - -template -const Vec4 & operator *= (Vec4 &v, const Matrix44 &m); - -template -Vec4 operator * (const Vec4 &v, const Matrix44 &m); - -//------------------------- -// Typedefs for convenience -//------------------------- - -typedef Matrix33 M33f; -typedef Matrix33 M33d; -typedef Matrix44 M44f; -typedef Matrix44 M44d; - - -//--------------------------- -// Implementation of Matrix33 -//--------------------------- - -template -inline T * -Matrix33::operator [] (int i) -{ - return x[i]; -} - -template -inline const T * -Matrix33::operator [] (int i) const -{ - return x[i]; -} - -template -inline -Matrix33::Matrix33 () -{ - memset (x, 0, sizeof (x)); - x[0][0] = 1; - x[1][1] = 1; - x[2][2] = 1; -} - -template -inline -Matrix33::Matrix33 (T a) -{ - x[0][0] = a; - x[0][1] = a; - x[0][2] = a; - x[1][0] = a; - x[1][1] = a; - x[1][2] = a; - x[2][0] = a; - x[2][1] = a; - x[2][2] = a; -} - -template -inline -Matrix33::Matrix33 (const T a[3][3]) -{ - memcpy (x, a, sizeof (x)); -} - -template -inline -Matrix33::Matrix33 (T a, T b, T c, T d, T e, T f, T g, T h, T i) -{ - x[0][0] = a; - x[0][1] = b; - x[0][2] = c; - x[1][0] = d; - x[1][1] = e; - x[1][2] = f; - x[2][0] = g; - x[2][1] = h; - x[2][2] = i; -} - -template -inline -Matrix33::Matrix33 (const Matrix33 &v) -{ - memcpy (x, v.x, sizeof (x)); -} - -template -template -inline -Matrix33::Matrix33 (const Matrix33 &v) -{ - x[0][0] = T (v.x[0][0]); - x[0][1] = T (v.x[0][1]); - x[0][2] = T (v.x[0][2]); - x[1][0] = T (v.x[1][0]); - x[1][1] = T (v.x[1][1]); - x[1][2] = T (v.x[1][2]); - x[2][0] = T (v.x[2][0]); - x[2][1] = T (v.x[2][1]); - x[2][2] = T (v.x[2][2]); -} - -template -inline const Matrix33 & -Matrix33::operator = (const Matrix33 &v) -{ - memcpy (x, v.x, sizeof (x)); - return *this; -} - -template -inline const Matrix33 & -Matrix33::operator = (T a) -{ - x[0][0] = a; - x[0][1] = a; - x[0][2] = a; - x[1][0] = a; - x[1][1] = a; - x[1][2] = a; - x[2][0] = a; - x[2][1] = a; - x[2][2] = a; - return *this; -} - -template -inline T * -Matrix33::getValue () -{ - return (T *) &x[0][0]; -} - -template -inline const T * -Matrix33::getValue () const -{ - return (const T *) &x[0][0]; -} - -template -template -inline void -Matrix33::getValue (Matrix33 &v) const -{ - if (isSameType::value) - { - memcpy (v.x, x, sizeof (x)); - } - else - { - v.x[0][0] = x[0][0]; - v.x[0][1] = x[0][1]; - v.x[0][2] = x[0][2]; - v.x[1][0] = x[1][0]; - v.x[1][1] = x[1][1]; - v.x[1][2] = x[1][2]; - v.x[2][0] = x[2][0]; - v.x[2][1] = x[2][1]; - v.x[2][2] = x[2][2]; - } -} - -template -template -inline Matrix33 & -Matrix33::setValue (const Matrix33 &v) -{ - if (isSameType::value) - { - memcpy (x, v.x, sizeof (x)); - } - else - { - x[0][0] = v.x[0][0]; - x[0][1] = v.x[0][1]; - x[0][2] = v.x[0][2]; - x[1][0] = v.x[1][0]; - x[1][1] = v.x[1][1]; - x[1][2] = v.x[1][2]; - x[2][0] = v.x[2][0]; - x[2][1] = v.x[2][1]; - x[2][2] = v.x[2][2]; - } - - return *this; -} - -template -template -inline Matrix33 & -Matrix33::setTheMatrix (const Matrix33 &v) -{ - if (isSameType::value) - { - memcpy (x, v.x, sizeof (x)); - } - else - { - x[0][0] = v.x[0][0]; - x[0][1] = v.x[0][1]; - x[0][2] = v.x[0][2]; - x[1][0] = v.x[1][0]; - x[1][1] = v.x[1][1]; - x[1][2] = v.x[1][2]; - x[2][0] = v.x[2][0]; - x[2][1] = v.x[2][1]; - x[2][2] = v.x[2][2]; - } - - return *this; -} - -template -inline void -Matrix33::makeIdentity() -{ - memset (x, 0, sizeof (x)); - x[0][0] = 1; - x[1][1] = 1; - x[2][2] = 1; -} - -template -bool -Matrix33::operator == (const Matrix33 &v) const -{ - return x[0][0] == v.x[0][0] && - x[0][1] == v.x[0][1] && - x[0][2] == v.x[0][2] && - x[1][0] == v.x[1][0] && - x[1][1] == v.x[1][1] && - x[1][2] == v.x[1][2] && - x[2][0] == v.x[2][0] && - x[2][1] == v.x[2][1] && - x[2][2] == v.x[2][2]; -} - -template -bool -Matrix33::operator != (const Matrix33 &v) const -{ - return x[0][0] != v.x[0][0] || - x[0][1] != v.x[0][1] || - x[0][2] != v.x[0][2] || - x[1][0] != v.x[1][0] || - x[1][1] != v.x[1][1] || - x[1][2] != v.x[1][2] || - x[2][0] != v.x[2][0] || - x[2][1] != v.x[2][1] || - x[2][2] != v.x[2][2]; -} - -template -bool -Matrix33::equalWithAbsError (const Matrix33 &m, T e) const -{ - for (int i = 0; i < 3; i++) - for (int j = 0; j < 3; j++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithAbsError ((*this)[i][j], m[i][j], e)) - return false; - - return true; -} - -template -bool -Matrix33::equalWithRelError (const Matrix33 &m, T e) const -{ - for (int i = 0; i < 3; i++) - for (int j = 0; j < 3; j++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithRelError ((*this)[i][j], m[i][j], e)) - return false; - - return true; -} - -template -const Matrix33 & -Matrix33::operator += (const Matrix33 &v) -{ - x[0][0] += v.x[0][0]; - x[0][1] += v.x[0][1]; - x[0][2] += v.x[0][2]; - x[1][0] += v.x[1][0]; - x[1][1] += v.x[1][1]; - x[1][2] += v.x[1][2]; - x[2][0] += v.x[2][0]; - x[2][1] += v.x[2][1]; - x[2][2] += v.x[2][2]; - - return *this; -} - -template -const Matrix33 & -Matrix33::operator += (T a) -{ - x[0][0] += a; - x[0][1] += a; - x[0][2] += a; - x[1][0] += a; - x[1][1] += a; - x[1][2] += a; - x[2][0] += a; - x[2][1] += a; - x[2][2] += a; - - return *this; -} - -template -Matrix33 -Matrix33::operator + (const Matrix33 &v) const -{ - return Matrix33 (x[0][0] + v.x[0][0], - x[0][1] + v.x[0][1], - x[0][2] + v.x[0][2], - x[1][0] + v.x[1][0], - x[1][1] + v.x[1][1], - x[1][2] + v.x[1][2], - x[2][0] + v.x[2][0], - x[2][1] + v.x[2][1], - x[2][2] + v.x[2][2]); -} - -template -const Matrix33 & -Matrix33::operator -= (const Matrix33 &v) -{ - x[0][0] -= v.x[0][0]; - x[0][1] -= v.x[0][1]; - x[0][2] -= v.x[0][2]; - x[1][0] -= v.x[1][0]; - x[1][1] -= v.x[1][1]; - x[1][2] -= v.x[1][2]; - x[2][0] -= v.x[2][0]; - x[2][1] -= v.x[2][1]; - x[2][2] -= v.x[2][2]; - - return *this; -} - -template -const Matrix33 & -Matrix33::operator -= (T a) -{ - x[0][0] -= a; - x[0][1] -= a; - x[0][2] -= a; - x[1][0] -= a; - x[1][1] -= a; - x[1][2] -= a; - x[2][0] -= a; - x[2][1] -= a; - x[2][2] -= a; - - return *this; -} - -template -Matrix33 -Matrix33::operator - (const Matrix33 &v) const -{ - return Matrix33 (x[0][0] - v.x[0][0], - x[0][1] - v.x[0][1], - x[0][2] - v.x[0][2], - x[1][0] - v.x[1][0], - x[1][1] - v.x[1][1], - x[1][2] - v.x[1][2], - x[2][0] - v.x[2][0], - x[2][1] - v.x[2][1], - x[2][2] - v.x[2][2]); -} - -template -Matrix33 -Matrix33::operator - () const -{ - return Matrix33 (-x[0][0], - -x[0][1], - -x[0][2], - -x[1][0], - -x[1][1], - -x[1][2], - -x[2][0], - -x[2][1], - -x[2][2]); -} - -template -const Matrix33 & -Matrix33::negate () -{ - x[0][0] = -x[0][0]; - x[0][1] = -x[0][1]; - x[0][2] = -x[0][2]; - x[1][0] = -x[1][0]; - x[1][1] = -x[1][1]; - x[1][2] = -x[1][2]; - x[2][0] = -x[2][0]; - x[2][1] = -x[2][1]; - x[2][2] = -x[2][2]; - - return *this; -} - -template -const Matrix33 & -Matrix33::operator *= (T a) -{ - x[0][0] *= a; - x[0][1] *= a; - x[0][2] *= a; - x[1][0] *= a; - x[1][1] *= a; - x[1][2] *= a; - x[2][0] *= a; - x[2][1] *= a; - x[2][2] *= a; - - return *this; -} - -template -Matrix33 -Matrix33::operator * (T a) const -{ - return Matrix33 (x[0][0] * a, - x[0][1] * a, - x[0][2] * a, - x[1][0] * a, - x[1][1] * a, - x[1][2] * a, - x[2][0] * a, - x[2][1] * a, - x[2][2] * a); -} - -template -inline Matrix33 -operator * (T a, const Matrix33 &v) -{ - return v * a; -} - -template -const Matrix33 & -Matrix33::operator *= (const Matrix33 &v) -{ - Matrix33 tmp (T (0)); - - for (int i = 0; i < 3; i++) - for (int j = 0; j < 3; j++) - for (int k = 0; k < 3; k++) - tmp.x[i][j] += x[i][k] * v.x[k][j]; - - *this = tmp; - return *this; -} - -template -Matrix33 -Matrix33::operator * (const Matrix33 &v) const -{ - Matrix33 tmp (T (0)); - - for (int i = 0; i < 3; i++) - for (int j = 0; j < 3; j++) - for (int k = 0; k < 3; k++) - tmp.x[i][j] += x[i][k] * v.x[k][j]; - - return tmp; -} - -template -template -void -Matrix33::multVecMatrix(const Vec2 &src, Vec2 &dst) const -{ - S a, b, w; - - a = src[0] * x[0][0] + src[1] * x[1][0] + x[2][0]; - b = src[0] * x[0][1] + src[1] * x[1][1] + x[2][1]; - w = src[0] * x[0][2] + src[1] * x[1][2] + x[2][2]; - - dst.x = a / w; - dst.y = b / w; -} - -template -template -void -Matrix33::multDirMatrix(const Vec2 &src, Vec2 &dst) const -{ - S a, b; - - a = src[0] * x[0][0] + src[1] * x[1][0]; - b = src[0] * x[0][1] + src[1] * x[1][1]; - - dst.x = a; - dst.y = b; -} - -template -const Matrix33 & -Matrix33::operator /= (T a) -{ - x[0][0] /= a; - x[0][1] /= a; - x[0][2] /= a; - x[1][0] /= a; - x[1][1] /= a; - x[1][2] /= a; - x[2][0] /= a; - x[2][1] /= a; - x[2][2] /= a; - - return *this; -} - -template -Matrix33 -Matrix33::operator / (T a) const -{ - return Matrix33 (x[0][0] / a, - x[0][1] / a, - x[0][2] / a, - x[1][0] / a, - x[1][1] / a, - x[1][2] / a, - x[2][0] / a, - x[2][1] / a, - x[2][2] / a); -} - -template -const Matrix33 & -Matrix33::transpose () -{ - Matrix33 tmp (x[0][0], - x[1][0], - x[2][0], - x[0][1], - x[1][1], - x[2][1], - x[0][2], - x[1][2], - x[2][2]); - *this = tmp; - return *this; -} - -template -Matrix33 -Matrix33::transposed () const -{ - return Matrix33 (x[0][0], - x[1][0], - x[2][0], - x[0][1], - x[1][1], - x[2][1], - x[0][2], - x[1][2], - x[2][2]); -} - -template -const Matrix33 & -Matrix33::gjInvert (bool singExc) throw (IEX_NAMESPACE::MathExc) -{ - *this = gjInverse (singExc); - return *this; -} - -template -Matrix33 -Matrix33::gjInverse (bool singExc) const throw (IEX_NAMESPACE::MathExc) -{ - int i, j, k; - Matrix33 s; - Matrix33 t (*this); - - // Forward elimination - - for (i = 0; i < 2 ; i++) - { - int pivot = i; - - T pivotsize = t[i][i]; - - if (pivotsize < 0) - pivotsize = -pivotsize; - - for (j = i + 1; j < 3; j++) - { - T tmp = t[j][i]; - - if (tmp < 0) - tmp = -tmp; - - if (tmp > pivotsize) - { - pivot = j; - pivotsize = tmp; - } - } - - if (pivotsize == 0) - { - if (singExc) - throw ::IMATH_INTERNAL_NAMESPACE::SingMatrixExc ("Cannot invert singular matrix."); - - return Matrix33(); - } - - if (pivot != i) - { - for (j = 0; j < 3; j++) - { - T tmp; - - tmp = t[i][j]; - t[i][j] = t[pivot][j]; - t[pivot][j] = tmp; - - tmp = s[i][j]; - s[i][j] = s[pivot][j]; - s[pivot][j] = tmp; - } - } - - for (j = i + 1; j < 3; j++) - { - T f = t[j][i] / t[i][i]; - - for (k = 0; k < 3; k++) - { - t[j][k] -= f * t[i][k]; - s[j][k] -= f * s[i][k]; - } - } - } - - // Backward substitution - - for (i = 2; i >= 0; --i) - { - T f; - - if ((f = t[i][i]) == 0) - { - if (singExc) - throw ::IMATH_INTERNAL_NAMESPACE::SingMatrixExc ("Cannot invert singular matrix."); - - return Matrix33(); - } - - for (j = 0; j < 3; j++) - { - t[i][j] /= f; - s[i][j] /= f; - } - - for (j = 0; j < i; j++) - { - f = t[j][i]; - - for (k = 0; k < 3; k++) - { - t[j][k] -= f * t[i][k]; - s[j][k] -= f * s[i][k]; - } - } - } - - return s; -} - -template -const Matrix33 & -Matrix33::invert (bool singExc) throw (IEX_NAMESPACE::MathExc) -{ - *this = inverse (singExc); - return *this; -} - -template -Matrix33 -Matrix33::inverse (bool singExc) const throw (IEX_NAMESPACE::MathExc) -{ - if (x[0][2] != 0 || x[1][2] != 0 || x[2][2] != 1) - { - Matrix33 s (x[1][1] * x[2][2] - x[2][1] * x[1][2], - x[2][1] * x[0][2] - x[0][1] * x[2][2], - x[0][1] * x[1][2] - x[1][1] * x[0][2], - - x[2][0] * x[1][2] - x[1][0] * x[2][2], - x[0][0] * x[2][2] - x[2][0] * x[0][2], - x[1][0] * x[0][2] - x[0][0] * x[1][2], - - x[1][0] * x[2][1] - x[2][0] * x[1][1], - x[2][0] * x[0][1] - x[0][0] * x[2][1], - x[0][0] * x[1][1] - x[1][0] * x[0][1]); - - T r = x[0][0] * s[0][0] + x[0][1] * s[1][0] + x[0][2] * s[2][0]; - - if (IMATH_INTERNAL_NAMESPACE::abs (r) >= 1) - { - for (int i = 0; i < 3; ++i) - { - for (int j = 0; j < 3; ++j) - { - s[i][j] /= r; - } - } - } - else - { - T mr = IMATH_INTERNAL_NAMESPACE::abs (r) / limits::smallest(); - - for (int i = 0; i < 3; ++i) - { - for (int j = 0; j < 3; ++j) - { - if (mr > IMATH_INTERNAL_NAMESPACE::abs (s[i][j])) - { - s[i][j] /= r; - } - else - { - if (singExc) - throw SingMatrixExc ("Cannot invert " - "singular matrix."); - return Matrix33(); - } - } - } - } - - return s; - } - else - { - Matrix33 s ( x[1][1], - -x[0][1], - 0, - - -x[1][0], - x[0][0], - 0, - - 0, - 0, - 1); - - T r = x[0][0] * x[1][1] - x[1][0] * x[0][1]; - - if (IMATH_INTERNAL_NAMESPACE::abs (r) >= 1) - { - for (int i = 0; i < 2; ++i) - { - for (int j = 0; j < 2; ++j) - { - s[i][j] /= r; - } - } - } - else - { - T mr = IMATH_INTERNAL_NAMESPACE::abs (r) / limits::smallest(); - - for (int i = 0; i < 2; ++i) - { - for (int j = 0; j < 2; ++j) - { - if (mr > IMATH_INTERNAL_NAMESPACE::abs (s[i][j])) - { - s[i][j] /= r; - } - else - { - if (singExc) - throw SingMatrixExc ("Cannot invert " - "singular matrix."); - return Matrix33(); - } - } - } - } - - s[2][0] = -x[2][0] * s[0][0] - x[2][1] * s[1][0]; - s[2][1] = -x[2][0] * s[0][1] - x[2][1] * s[1][1]; - - return s; - } -} - -template -inline T -Matrix33::minorOf (const int r, const int c) const -{ - int r0 = 0 + (r < 1 ? 1 : 0); - int r1 = 1 + (r < 2 ? 1 : 0); - int c0 = 0 + (c < 1 ? 1 : 0); - int c1 = 1 + (c < 2 ? 1 : 0); - - return x[r0][c0]*x[r1][c1] - x[r1][c0]*x[r0][c1]; -} - -template -inline T -Matrix33::fastMinor( const int r0, const int r1, - const int c0, const int c1) const -{ - return x[r0][c0]*x[r1][c1] - x[r0][c1]*x[r1][c0]; -} - -template -inline T -Matrix33::determinant () const -{ - return x[0][0]*(x[1][1]*x[2][2] - x[1][2]*x[2][1]) + - x[0][1]*(x[1][2]*x[2][0] - x[1][0]*x[2][2]) + - x[0][2]*(x[1][0]*x[2][1] - x[1][1]*x[2][0]); -} - -template -template -const Matrix33 & -Matrix33::setRotation (S r) -{ - S cos_r, sin_r; - - cos_r = Math::cos (r); - sin_r = Math::sin (r); - - x[0][0] = cos_r; - x[0][1] = sin_r; - x[0][2] = 0; - - x[1][0] = -sin_r; - x[1][1] = cos_r; - x[1][2] = 0; - - x[2][0] = 0; - x[2][1] = 0; - x[2][2] = 1; - - return *this; -} - -template -template -const Matrix33 & -Matrix33::rotate (S r) -{ - *this *= Matrix33().setRotation (r); - return *this; -} - -template -const Matrix33 & -Matrix33::setScale (T s) -{ - memset (x, 0, sizeof (x)); - x[0][0] = s; - x[1][1] = s; - x[2][2] = 1; - - return *this; -} - -template -template -const Matrix33 & -Matrix33::setScale (const Vec2 &s) -{ - memset (x, 0, sizeof (x)); - x[0][0] = s[0]; - x[1][1] = s[1]; - x[2][2] = 1; - - return *this; -} - -template -template -const Matrix33 & -Matrix33::scale (const Vec2 &s) -{ - x[0][0] *= s[0]; - x[0][1] *= s[0]; - x[0][2] *= s[0]; - - x[1][0] *= s[1]; - x[1][1] *= s[1]; - x[1][2] *= s[1]; - - return *this; -} - -template -template -const Matrix33 & -Matrix33::setTranslation (const Vec2 &t) -{ - x[0][0] = 1; - x[0][1] = 0; - x[0][2] = 0; - - x[1][0] = 0; - x[1][1] = 1; - x[1][2] = 0; - - x[2][0] = t[0]; - x[2][1] = t[1]; - x[2][2] = 1; - - return *this; -} - -template -inline Vec2 -Matrix33::translation () const -{ - return Vec2 (x[2][0], x[2][1]); -} - -template -template -const Matrix33 & -Matrix33::translate (const Vec2 &t) -{ - x[2][0] += t[0] * x[0][0] + t[1] * x[1][0]; - x[2][1] += t[0] * x[0][1] + t[1] * x[1][1]; - x[2][2] += t[0] * x[0][2] + t[1] * x[1][2]; - - return *this; -} - -template -template -const Matrix33 & -Matrix33::setShear (const S &xy) -{ - x[0][0] = 1; - x[0][1] = 0; - x[0][2] = 0; - - x[1][0] = xy; - x[1][1] = 1; - x[1][2] = 0; - - x[2][0] = 0; - x[2][1] = 0; - x[2][2] = 1; - - return *this; -} - -template -template -const Matrix33 & -Matrix33::setShear (const Vec2 &h) -{ - x[0][0] = 1; - x[0][1] = h[1]; - x[0][2] = 0; - - x[1][0] = h[0]; - x[1][1] = 1; - x[1][2] = 0; - - x[2][0] = 0; - x[2][1] = 0; - x[2][2] = 1; - - return *this; -} - -template -template -const Matrix33 & -Matrix33::shear (const S &xy) -{ - // - // In this case, we don't need a temp. copy of the matrix - // because we never use a value on the RHS after we've - // changed it on the LHS. - // - - x[1][0] += xy * x[0][0]; - x[1][1] += xy * x[0][1]; - x[1][2] += xy * x[0][2]; - - return *this; -} - -template -template -const Matrix33 & -Matrix33::shear (const Vec2 &h) -{ - Matrix33 P (*this); - - x[0][0] = P[0][0] + h[1] * P[1][0]; - x[0][1] = P[0][1] + h[1] * P[1][1]; - x[0][2] = P[0][2] + h[1] * P[1][2]; - - x[1][0] = P[1][0] + h[0] * P[0][0]; - x[1][1] = P[1][1] + h[0] * P[0][1]; - x[1][2] = P[1][2] + h[0] * P[0][2]; - - return *this; -} - - -//--------------------------- -// Implementation of Matrix44 -//--------------------------- - -template -inline T * -Matrix44::operator [] (int i) -{ - return x[i]; -} - -template -inline const T * -Matrix44::operator [] (int i) const -{ - return x[i]; -} - -template -inline -Matrix44::Matrix44 () -{ - memset (x, 0, sizeof (x)); - x[0][0] = 1; - x[1][1] = 1; - x[2][2] = 1; - x[3][3] = 1; -} - -template -inline -Matrix44::Matrix44 (T a) -{ - x[0][0] = a; - x[0][1] = a; - x[0][2] = a; - x[0][3] = a; - x[1][0] = a; - x[1][1] = a; - x[1][2] = a; - x[1][3] = a; - x[2][0] = a; - x[2][1] = a; - x[2][2] = a; - x[2][3] = a; - x[3][0] = a; - x[3][1] = a; - x[3][2] = a; - x[3][3] = a; -} - -template -inline -Matrix44::Matrix44 (const T a[4][4]) -{ - memcpy (x, a, sizeof (x)); -} - -template -inline -Matrix44::Matrix44 (T a, T b, T c, T d, T e, T f, T g, T h, - T i, T j, T k, T l, T m, T n, T o, T p) -{ - x[0][0] = a; - x[0][1] = b; - x[0][2] = c; - x[0][3] = d; - x[1][0] = e; - x[1][1] = f; - x[1][2] = g; - x[1][3] = h; - x[2][0] = i; - x[2][1] = j; - x[2][2] = k; - x[2][3] = l; - x[3][0] = m; - x[3][1] = n; - x[3][2] = o; - x[3][3] = p; -} - - -template -inline -Matrix44::Matrix44 (Matrix33 r, Vec3 t) -{ - x[0][0] = r[0][0]; - x[0][1] = r[0][1]; - x[0][2] = r[0][2]; - x[0][3] = 0; - x[1][0] = r[1][0]; - x[1][1] = r[1][1]; - x[1][2] = r[1][2]; - x[1][3] = 0; - x[2][0] = r[2][0]; - x[2][1] = r[2][1]; - x[2][2] = r[2][2]; - x[2][3] = 0; - x[3][0] = t[0]; - x[3][1] = t[1]; - x[3][2] = t[2]; - x[3][3] = 1; -} - -template -inline -Matrix44::Matrix44 (const Matrix44 &v) -{ - x[0][0] = v.x[0][0]; - x[0][1] = v.x[0][1]; - x[0][2] = v.x[0][2]; - x[0][3] = v.x[0][3]; - x[1][0] = v.x[1][0]; - x[1][1] = v.x[1][1]; - x[1][2] = v.x[1][2]; - x[1][3] = v.x[1][3]; - x[2][0] = v.x[2][0]; - x[2][1] = v.x[2][1]; - x[2][2] = v.x[2][2]; - x[2][3] = v.x[2][3]; - x[3][0] = v.x[3][0]; - x[3][1] = v.x[3][1]; - x[3][2] = v.x[3][2]; - x[3][3] = v.x[3][3]; -} - -template -template -inline -Matrix44::Matrix44 (const Matrix44 &v) -{ - x[0][0] = T (v.x[0][0]); - x[0][1] = T (v.x[0][1]); - x[0][2] = T (v.x[0][2]); - x[0][3] = T (v.x[0][3]); - x[1][0] = T (v.x[1][0]); - x[1][1] = T (v.x[1][1]); - x[1][2] = T (v.x[1][2]); - x[1][3] = T (v.x[1][3]); - x[2][0] = T (v.x[2][0]); - x[2][1] = T (v.x[2][1]); - x[2][2] = T (v.x[2][2]); - x[2][3] = T (v.x[2][3]); - x[3][0] = T (v.x[3][0]); - x[3][1] = T (v.x[3][1]); - x[3][2] = T (v.x[3][2]); - x[3][3] = T (v.x[3][3]); -} - -template -inline const Matrix44 & -Matrix44::operator = (const Matrix44 &v) -{ - x[0][0] = v.x[0][0]; - x[0][1] = v.x[0][1]; - x[0][2] = v.x[0][2]; - x[0][3] = v.x[0][3]; - x[1][0] = v.x[1][0]; - x[1][1] = v.x[1][1]; - x[1][2] = v.x[1][2]; - x[1][3] = v.x[1][3]; - x[2][0] = v.x[2][0]; - x[2][1] = v.x[2][1]; - x[2][2] = v.x[2][2]; - x[2][3] = v.x[2][3]; - x[3][0] = v.x[3][0]; - x[3][1] = v.x[3][1]; - x[3][2] = v.x[3][2]; - x[3][3] = v.x[3][3]; - return *this; -} - -template -inline const Matrix44 & -Matrix44::operator = (T a) -{ - x[0][0] = a; - x[0][1] = a; - x[0][2] = a; - x[0][3] = a; - x[1][0] = a; - x[1][1] = a; - x[1][2] = a; - x[1][3] = a; - x[2][0] = a; - x[2][1] = a; - x[2][2] = a; - x[2][3] = a; - x[3][0] = a; - x[3][1] = a; - x[3][2] = a; - x[3][3] = a; - return *this; -} - -template -inline T * -Matrix44::getValue () -{ - return (T *) &x[0][0]; -} - -template -inline const T * -Matrix44::getValue () const -{ - return (const T *) &x[0][0]; -} - -template -template -inline void -Matrix44::getValue (Matrix44 &v) const -{ - if (isSameType::value) - { - memcpy (v.x, x, sizeof (x)); - } - else - { - v.x[0][0] = x[0][0]; - v.x[0][1] = x[0][1]; - v.x[0][2] = x[0][2]; - v.x[0][3] = x[0][3]; - v.x[1][0] = x[1][0]; - v.x[1][1] = x[1][1]; - v.x[1][2] = x[1][2]; - v.x[1][3] = x[1][3]; - v.x[2][0] = x[2][0]; - v.x[2][1] = x[2][1]; - v.x[2][2] = x[2][2]; - v.x[2][3] = x[2][3]; - v.x[3][0] = x[3][0]; - v.x[3][1] = x[3][1]; - v.x[3][2] = x[3][2]; - v.x[3][3] = x[3][3]; - } -} - -template -template -inline Matrix44 & -Matrix44::setValue (const Matrix44 &v) -{ - if (isSameType::value) - { - memcpy (x, v.x, sizeof (x)); - } - else - { - x[0][0] = v.x[0][0]; - x[0][1] = v.x[0][1]; - x[0][2] = v.x[0][2]; - x[0][3] = v.x[0][3]; - x[1][0] = v.x[1][0]; - x[1][1] = v.x[1][1]; - x[1][2] = v.x[1][2]; - x[1][3] = v.x[1][3]; - x[2][0] = v.x[2][0]; - x[2][1] = v.x[2][1]; - x[2][2] = v.x[2][2]; - x[2][3] = v.x[2][3]; - x[3][0] = v.x[3][0]; - x[3][1] = v.x[3][1]; - x[3][2] = v.x[3][2]; - x[3][3] = v.x[3][3]; - } - - return *this; -} - -template -template -inline Matrix44 & -Matrix44::setTheMatrix (const Matrix44 &v) -{ - if (isSameType::value) - { - memcpy (x, v.x, sizeof (x)); - } - else - { - x[0][0] = v.x[0][0]; - x[0][1] = v.x[0][1]; - x[0][2] = v.x[0][2]; - x[0][3] = v.x[0][3]; - x[1][0] = v.x[1][0]; - x[1][1] = v.x[1][1]; - x[1][2] = v.x[1][2]; - x[1][3] = v.x[1][3]; - x[2][0] = v.x[2][0]; - x[2][1] = v.x[2][1]; - x[2][2] = v.x[2][2]; - x[2][3] = v.x[2][3]; - x[3][0] = v.x[3][0]; - x[3][1] = v.x[3][1]; - x[3][2] = v.x[3][2]; - x[3][3] = v.x[3][3]; - } - - return *this; -} - -template -inline void -Matrix44::makeIdentity() -{ - memset (x, 0, sizeof (x)); - x[0][0] = 1; - x[1][1] = 1; - x[2][2] = 1; - x[3][3] = 1; -} - -template -bool -Matrix44::operator == (const Matrix44 &v) const -{ - return x[0][0] == v.x[0][0] && - x[0][1] == v.x[0][1] && - x[0][2] == v.x[0][2] && - x[0][3] == v.x[0][3] && - x[1][0] == v.x[1][0] && - x[1][1] == v.x[1][1] && - x[1][2] == v.x[1][2] && - x[1][3] == v.x[1][3] && - x[2][0] == v.x[2][0] && - x[2][1] == v.x[2][1] && - x[2][2] == v.x[2][2] && - x[2][3] == v.x[2][3] && - x[3][0] == v.x[3][0] && - x[3][1] == v.x[3][1] && - x[3][2] == v.x[3][2] && - x[3][3] == v.x[3][3]; -} - -template -bool -Matrix44::operator != (const Matrix44 &v) const -{ - return x[0][0] != v.x[0][0] || - x[0][1] != v.x[0][1] || - x[0][2] != v.x[0][2] || - x[0][3] != v.x[0][3] || - x[1][0] != v.x[1][0] || - x[1][1] != v.x[1][1] || - x[1][2] != v.x[1][2] || - x[1][3] != v.x[1][3] || - x[2][0] != v.x[2][0] || - x[2][1] != v.x[2][1] || - x[2][2] != v.x[2][2] || - x[2][3] != v.x[2][3] || - x[3][0] != v.x[3][0] || - x[3][1] != v.x[3][1] || - x[3][2] != v.x[3][2] || - x[3][3] != v.x[3][3]; -} - -template -bool -Matrix44::equalWithAbsError (const Matrix44 &m, T e) const -{ - for (int i = 0; i < 4; i++) - for (int j = 0; j < 4; j++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithAbsError ((*this)[i][j], m[i][j], e)) - return false; - - return true; -} - -template -bool -Matrix44::equalWithRelError (const Matrix44 &m, T e) const -{ - for (int i = 0; i < 4; i++) - for (int j = 0; j < 4; j++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithRelError ((*this)[i][j], m[i][j], e)) - return false; - - return true; -} - -template -const Matrix44 & -Matrix44::operator += (const Matrix44 &v) -{ - x[0][0] += v.x[0][0]; - x[0][1] += v.x[0][1]; - x[0][2] += v.x[0][2]; - x[0][3] += v.x[0][3]; - x[1][0] += v.x[1][0]; - x[1][1] += v.x[1][1]; - x[1][2] += v.x[1][2]; - x[1][3] += v.x[1][3]; - x[2][0] += v.x[2][0]; - x[2][1] += v.x[2][1]; - x[2][2] += v.x[2][2]; - x[2][3] += v.x[2][3]; - x[3][0] += v.x[3][0]; - x[3][1] += v.x[3][1]; - x[3][2] += v.x[3][2]; - x[3][3] += v.x[3][3]; - - return *this; -} - -template -const Matrix44 & -Matrix44::operator += (T a) -{ - x[0][0] += a; - x[0][1] += a; - x[0][2] += a; - x[0][3] += a; - x[1][0] += a; - x[1][1] += a; - x[1][2] += a; - x[1][3] += a; - x[2][0] += a; - x[2][1] += a; - x[2][2] += a; - x[2][3] += a; - x[3][0] += a; - x[3][1] += a; - x[3][2] += a; - x[3][3] += a; - - return *this; -} - -template -Matrix44 -Matrix44::operator + (const Matrix44 &v) const -{ - return Matrix44 (x[0][0] + v.x[0][0], - x[0][1] + v.x[0][1], - x[0][2] + v.x[0][2], - x[0][3] + v.x[0][3], - x[1][0] + v.x[1][0], - x[1][1] + v.x[1][1], - x[1][2] + v.x[1][2], - x[1][3] + v.x[1][3], - x[2][0] + v.x[2][0], - x[2][1] + v.x[2][1], - x[2][2] + v.x[2][2], - x[2][3] + v.x[2][3], - x[3][0] + v.x[3][0], - x[3][1] + v.x[3][1], - x[3][2] + v.x[3][2], - x[3][3] + v.x[3][3]); -} - -template -const Matrix44 & -Matrix44::operator -= (const Matrix44 &v) -{ - x[0][0] -= v.x[0][0]; - x[0][1] -= v.x[0][1]; - x[0][2] -= v.x[0][2]; - x[0][3] -= v.x[0][3]; - x[1][0] -= v.x[1][0]; - x[1][1] -= v.x[1][1]; - x[1][2] -= v.x[1][2]; - x[1][3] -= v.x[1][3]; - x[2][0] -= v.x[2][0]; - x[2][1] -= v.x[2][1]; - x[2][2] -= v.x[2][2]; - x[2][3] -= v.x[2][3]; - x[3][0] -= v.x[3][0]; - x[3][1] -= v.x[3][1]; - x[3][2] -= v.x[3][2]; - x[3][3] -= v.x[3][3]; - - return *this; -} - -template -const Matrix44 & -Matrix44::operator -= (T a) -{ - x[0][0] -= a; - x[0][1] -= a; - x[0][2] -= a; - x[0][3] -= a; - x[1][0] -= a; - x[1][1] -= a; - x[1][2] -= a; - x[1][3] -= a; - x[2][0] -= a; - x[2][1] -= a; - x[2][2] -= a; - x[2][3] -= a; - x[3][0] -= a; - x[3][1] -= a; - x[3][2] -= a; - x[3][3] -= a; - - return *this; -} - -template -Matrix44 -Matrix44::operator - (const Matrix44 &v) const -{ - return Matrix44 (x[0][0] - v.x[0][0], - x[0][1] - v.x[0][1], - x[0][2] - v.x[0][2], - x[0][3] - v.x[0][3], - x[1][0] - v.x[1][0], - x[1][1] - v.x[1][1], - x[1][2] - v.x[1][2], - x[1][3] - v.x[1][3], - x[2][0] - v.x[2][0], - x[2][1] - v.x[2][1], - x[2][2] - v.x[2][2], - x[2][3] - v.x[2][3], - x[3][0] - v.x[3][0], - x[3][1] - v.x[3][1], - x[3][2] - v.x[3][2], - x[3][3] - v.x[3][3]); -} - -template -Matrix44 -Matrix44::operator - () const -{ - return Matrix44 (-x[0][0], - -x[0][1], - -x[0][2], - -x[0][3], - -x[1][0], - -x[1][1], - -x[1][2], - -x[1][3], - -x[2][0], - -x[2][1], - -x[2][2], - -x[2][3], - -x[3][0], - -x[3][1], - -x[3][2], - -x[3][3]); -} - -template -const Matrix44 & -Matrix44::negate () -{ - x[0][0] = -x[0][0]; - x[0][1] = -x[0][1]; - x[0][2] = -x[0][2]; - x[0][3] = -x[0][3]; - x[1][0] = -x[1][0]; - x[1][1] = -x[1][1]; - x[1][2] = -x[1][2]; - x[1][3] = -x[1][3]; - x[2][0] = -x[2][0]; - x[2][1] = -x[2][1]; - x[2][2] = -x[2][2]; - x[2][3] = -x[2][3]; - x[3][0] = -x[3][0]; - x[3][1] = -x[3][1]; - x[3][2] = -x[3][2]; - x[3][3] = -x[3][3]; - - return *this; -} - -template -const Matrix44 & -Matrix44::operator *= (T a) -{ - x[0][0] *= a; - x[0][1] *= a; - x[0][2] *= a; - x[0][3] *= a; - x[1][0] *= a; - x[1][1] *= a; - x[1][2] *= a; - x[1][3] *= a; - x[2][0] *= a; - x[2][1] *= a; - x[2][2] *= a; - x[2][3] *= a; - x[3][0] *= a; - x[3][1] *= a; - x[3][2] *= a; - x[3][3] *= a; - - return *this; -} - -template -Matrix44 -Matrix44::operator * (T a) const -{ - return Matrix44 (x[0][0] * a, - x[0][1] * a, - x[0][2] * a, - x[0][3] * a, - x[1][0] * a, - x[1][1] * a, - x[1][2] * a, - x[1][3] * a, - x[2][0] * a, - x[2][1] * a, - x[2][2] * a, - x[2][3] * a, - x[3][0] * a, - x[3][1] * a, - x[3][2] * a, - x[3][3] * a); -} - -template -inline Matrix44 -operator * (T a, const Matrix44 &v) -{ - return v * a; -} - -template -inline const Matrix44 & -Matrix44::operator *= (const Matrix44 &v) -{ - Matrix44 tmp (T (0)); - - multiply (*this, v, tmp); - *this = tmp; - return *this; -} - -template -inline Matrix44 -Matrix44::operator * (const Matrix44 &v) const -{ - Matrix44 tmp (T (0)); - - multiply (*this, v, tmp); - return tmp; -} - -template -void -Matrix44::multiply (const Matrix44 &a, - const Matrix44 &b, - Matrix44 &c) -{ - register const T * IMATH_RESTRICT ap = &a.x[0][0]; - register const T * IMATH_RESTRICT bp = &b.x[0][0]; - register T * IMATH_RESTRICT cp = &c.x[0][0]; - - register T a0, a1, a2, a3; - - a0 = ap[0]; - a1 = ap[1]; - a2 = ap[2]; - a3 = ap[3]; - - cp[0] = a0 * bp[0] + a1 * bp[4] + a2 * bp[8] + a3 * bp[12]; - cp[1] = a0 * bp[1] + a1 * bp[5] + a2 * bp[9] + a3 * bp[13]; - cp[2] = a0 * bp[2] + a1 * bp[6] + a2 * bp[10] + a3 * bp[14]; - cp[3] = a0 * bp[3] + a1 * bp[7] + a2 * bp[11] + a3 * bp[15]; - - a0 = ap[4]; - a1 = ap[5]; - a2 = ap[6]; - a3 = ap[7]; - - cp[4] = a0 * bp[0] + a1 * bp[4] + a2 * bp[8] + a3 * bp[12]; - cp[5] = a0 * bp[1] + a1 * bp[5] + a2 * bp[9] + a3 * bp[13]; - cp[6] = a0 * bp[2] + a1 * bp[6] + a2 * bp[10] + a3 * bp[14]; - cp[7] = a0 * bp[3] + a1 * bp[7] + a2 * bp[11] + a3 * bp[15]; - - a0 = ap[8]; - a1 = ap[9]; - a2 = ap[10]; - a3 = ap[11]; - - cp[8] = a0 * bp[0] + a1 * bp[4] + a2 * bp[8] + a3 * bp[12]; - cp[9] = a0 * bp[1] + a1 * bp[5] + a2 * bp[9] + a3 * bp[13]; - cp[10] = a0 * bp[2] + a1 * bp[6] + a2 * bp[10] + a3 * bp[14]; - cp[11] = a0 * bp[3] + a1 * bp[7] + a2 * bp[11] + a3 * bp[15]; - - a0 = ap[12]; - a1 = ap[13]; - a2 = ap[14]; - a3 = ap[15]; - - cp[12] = a0 * bp[0] + a1 * bp[4] + a2 * bp[8] + a3 * bp[12]; - cp[13] = a0 * bp[1] + a1 * bp[5] + a2 * bp[9] + a3 * bp[13]; - cp[14] = a0 * bp[2] + a1 * bp[6] + a2 * bp[10] + a3 * bp[14]; - cp[15] = a0 * bp[3] + a1 * bp[7] + a2 * bp[11] + a3 * bp[15]; -} - -template template -void -Matrix44::multVecMatrix(const Vec3 &src, Vec3 &dst) const -{ - S a, b, c, w; - - a = src[0] * x[0][0] + src[1] * x[1][0] + src[2] * x[2][0] + x[3][0]; - b = src[0] * x[0][1] + src[1] * x[1][1] + src[2] * x[2][1] + x[3][1]; - c = src[0] * x[0][2] + src[1] * x[1][2] + src[2] * x[2][2] + x[3][2]; - w = src[0] * x[0][3] + src[1] * x[1][3] + src[2] * x[2][3] + x[3][3]; - - dst.x = a / w; - dst.y = b / w; - dst.z = c / w; -} - -template template -void -Matrix44::multDirMatrix(const Vec3 &src, Vec3 &dst) const -{ - S a, b, c; - - a = src[0] * x[0][0] + src[1] * x[1][0] + src[2] * x[2][0]; - b = src[0] * x[0][1] + src[1] * x[1][1] + src[2] * x[2][1]; - c = src[0] * x[0][2] + src[1] * x[1][2] + src[2] * x[2][2]; - - dst.x = a; - dst.y = b; - dst.z = c; -} - -template -const Matrix44 & -Matrix44::operator /= (T a) -{ - x[0][0] /= a; - x[0][1] /= a; - x[0][2] /= a; - x[0][3] /= a; - x[1][0] /= a; - x[1][1] /= a; - x[1][2] /= a; - x[1][3] /= a; - x[2][0] /= a; - x[2][1] /= a; - x[2][2] /= a; - x[2][3] /= a; - x[3][0] /= a; - x[3][1] /= a; - x[3][2] /= a; - x[3][3] /= a; - - return *this; -} - -template -Matrix44 -Matrix44::operator / (T a) const -{ - return Matrix44 (x[0][0] / a, - x[0][1] / a, - x[0][2] / a, - x[0][3] / a, - x[1][0] / a, - x[1][1] / a, - x[1][2] / a, - x[1][3] / a, - x[2][0] / a, - x[2][1] / a, - x[2][2] / a, - x[2][3] / a, - x[3][0] / a, - x[3][1] / a, - x[3][2] / a, - x[3][3] / a); -} - -template -const Matrix44 & -Matrix44::transpose () -{ - Matrix44 tmp (x[0][0], - x[1][0], - x[2][0], - x[3][0], - x[0][1], - x[1][1], - x[2][1], - x[3][1], - x[0][2], - x[1][2], - x[2][2], - x[3][2], - x[0][3], - x[1][3], - x[2][3], - x[3][3]); - *this = tmp; - return *this; -} - -template -Matrix44 -Matrix44::transposed () const -{ - return Matrix44 (x[0][0], - x[1][0], - x[2][0], - x[3][0], - x[0][1], - x[1][1], - x[2][1], - x[3][1], - x[0][2], - x[1][2], - x[2][2], - x[3][2], - x[0][3], - x[1][3], - x[2][3], - x[3][3]); -} - -template -const Matrix44 & -Matrix44::gjInvert (bool singExc) throw (IEX_NAMESPACE::MathExc) -{ - *this = gjInverse (singExc); - return *this; -} - -template -Matrix44 -Matrix44::gjInverse (bool singExc) const throw (IEX_NAMESPACE::MathExc) -{ - int i, j, k; - Matrix44 s; - Matrix44 t (*this); - - // Forward elimination - - for (i = 0; i < 3 ; i++) - { - int pivot = i; - - T pivotsize = t[i][i]; - - if (pivotsize < 0) - pivotsize = -pivotsize; - - for (j = i + 1; j < 4; j++) - { - T tmp = t[j][i]; - - if (tmp < 0) - tmp = -tmp; - - if (tmp > pivotsize) - { - pivot = j; - pivotsize = tmp; - } - } - - if (pivotsize == 0) - { - if (singExc) - throw ::IMATH_INTERNAL_NAMESPACE::SingMatrixExc ("Cannot invert singular matrix."); - - return Matrix44(); - } - - if (pivot != i) - { - for (j = 0; j < 4; j++) - { - T tmp; - - tmp = t[i][j]; - t[i][j] = t[pivot][j]; - t[pivot][j] = tmp; - - tmp = s[i][j]; - s[i][j] = s[pivot][j]; - s[pivot][j] = tmp; - } - } - - for (j = i + 1; j < 4; j++) - { - T f = t[j][i] / t[i][i]; - - for (k = 0; k < 4; k++) - { - t[j][k] -= f * t[i][k]; - s[j][k] -= f * s[i][k]; - } - } - } - - // Backward substitution - - for (i = 3; i >= 0; --i) - { - T f; - - if ((f = t[i][i]) == 0) - { - if (singExc) - throw ::IMATH_INTERNAL_NAMESPACE::SingMatrixExc ("Cannot invert singular matrix."); - - return Matrix44(); - } - - for (j = 0; j < 4; j++) - { - t[i][j] /= f; - s[i][j] /= f; - } - - for (j = 0; j < i; j++) - { - f = t[j][i]; - - for (k = 0; k < 4; k++) - { - t[j][k] -= f * t[i][k]; - s[j][k] -= f * s[i][k]; - } - } - } - - return s; -} - -template -const Matrix44 & -Matrix44::invert (bool singExc) throw (IEX_NAMESPACE::MathExc) -{ - *this = inverse (singExc); - return *this; -} - -template -Matrix44 -Matrix44::inverse (bool singExc) const throw (IEX_NAMESPACE::MathExc) -{ - if (x[0][3] != 0 || x[1][3] != 0 || x[2][3] != 0 || x[3][3] != 1) - return gjInverse(singExc); - - Matrix44 s (x[1][1] * x[2][2] - x[2][1] * x[1][2], - x[2][1] * x[0][2] - x[0][1] * x[2][2], - x[0][1] * x[1][2] - x[1][1] * x[0][2], - 0, - - x[2][0] * x[1][2] - x[1][0] * x[2][2], - x[0][0] * x[2][2] - x[2][0] * x[0][2], - x[1][0] * x[0][2] - x[0][0] * x[1][2], - 0, - - x[1][0] * x[2][1] - x[2][0] * x[1][1], - x[2][0] * x[0][1] - x[0][0] * x[2][1], - x[0][0] * x[1][1] - x[1][0] * x[0][1], - 0, - - 0, - 0, - 0, - 1); - - T r = x[0][0] * s[0][0] + x[0][1] * s[1][0] + x[0][2] * s[2][0]; - - if (IMATH_INTERNAL_NAMESPACE::abs (r) >= 1) - { - for (int i = 0; i < 3; ++i) - { - for (int j = 0; j < 3; ++j) - { - s[i][j] /= r; - } - } - } - else - { - T mr = IMATH_INTERNAL_NAMESPACE::abs (r) / limits::smallest(); - - for (int i = 0; i < 3; ++i) - { - for (int j = 0; j < 3; ++j) - { - if (mr > IMATH_INTERNAL_NAMESPACE::abs (s[i][j])) - { - s[i][j] /= r; - } - else - { - if (singExc) - throw SingMatrixExc ("Cannot invert singular matrix."); - - return Matrix44(); - } - } - } - } - - s[3][0] = -x[3][0] * s[0][0] - x[3][1] * s[1][0] - x[3][2] * s[2][0]; - s[3][1] = -x[3][0] * s[0][1] - x[3][1] * s[1][1] - x[3][2] * s[2][1]; - s[3][2] = -x[3][0] * s[0][2] - x[3][1] * s[1][2] - x[3][2] * s[2][2]; - - return s; -} - -template -inline T -Matrix44::fastMinor( const int r0, const int r1, const int r2, - const int c0, const int c1, const int c2) const -{ - return x[r0][c0] * (x[r1][c1]*x[r2][c2] - x[r1][c2]*x[r2][c1]) - + x[r0][c1] * (x[r1][c2]*x[r2][c0] - x[r1][c0]*x[r2][c2]) - + x[r0][c2] * (x[r1][c0]*x[r2][c1] - x[r1][c1]*x[r2][c0]); -} - -template -inline T -Matrix44::minorOf (const int r, const int c) const -{ - int r0 = 0 + (r < 1 ? 1 : 0); - int r1 = 1 + (r < 2 ? 1 : 0); - int r2 = 2 + (r < 3 ? 1 : 0); - int c0 = 0 + (c < 1 ? 1 : 0); - int c1 = 1 + (c < 2 ? 1 : 0); - int c2 = 2 + (c < 3 ? 1 : 0); - - Matrix33 working (x[r0][c0],x[r1][c0],x[r2][c0], - x[r0][c1],x[r1][c1],x[r2][c1], - x[r0][c2],x[r1][c2],x[r2][c2]); - - return working.determinant(); -} - -template -inline T -Matrix44::determinant () const -{ - T sum = (T)0; - - if (x[0][3] != 0.) sum -= x[0][3] * fastMinor(1,2,3,0,1,2); - if (x[1][3] != 0.) sum += x[1][3] * fastMinor(0,2,3,0,1,2); - if (x[2][3] != 0.) sum -= x[2][3] * fastMinor(0,1,3,0,1,2); - if (x[3][3] != 0.) sum += x[3][3] * fastMinor(0,1,2,0,1,2); - - return sum; -} - -template -template -const Matrix44 & -Matrix44::setEulerAngles (const Vec3& r) -{ - S cos_rz, sin_rz, cos_ry, sin_ry, cos_rx, sin_rx; - - cos_rz = Math::cos (r[2]); - cos_ry = Math::cos (r[1]); - cos_rx = Math::cos (r[0]); - - sin_rz = Math::sin (r[2]); - sin_ry = Math::sin (r[1]); - sin_rx = Math::sin (r[0]); - - x[0][0] = cos_rz * cos_ry; - x[0][1] = sin_rz * cos_ry; - x[0][2] = -sin_ry; - x[0][3] = 0; - - x[1][0] = -sin_rz * cos_rx + cos_rz * sin_ry * sin_rx; - x[1][1] = cos_rz * cos_rx + sin_rz * sin_ry * sin_rx; - x[1][2] = cos_ry * sin_rx; - x[1][3] = 0; - - x[2][0] = sin_rz * sin_rx + cos_rz * sin_ry * cos_rx; - x[2][1] = -cos_rz * sin_rx + sin_rz * sin_ry * cos_rx; - x[2][2] = cos_ry * cos_rx; - x[2][3] = 0; - - x[3][0] = 0; - x[3][1] = 0; - x[3][2] = 0; - x[3][3] = 1; - - return *this; -} - -template -template -const Matrix44 & -Matrix44::setAxisAngle (const Vec3& axis, S angle) -{ - Vec3 unit (axis.normalized()); - S sine = Math::sin (angle); - S cosine = Math::cos (angle); - - x[0][0] = unit[0] * unit[0] * (1 - cosine) + cosine; - x[0][1] = unit[0] * unit[1] * (1 - cosine) + unit[2] * sine; - x[0][2] = unit[0] * unit[2] * (1 - cosine) - unit[1] * sine; - x[0][3] = 0; - - x[1][0] = unit[0] * unit[1] * (1 - cosine) - unit[2] * sine; - x[1][1] = unit[1] * unit[1] * (1 - cosine) + cosine; - x[1][2] = unit[1] * unit[2] * (1 - cosine) + unit[0] * sine; - x[1][3] = 0; - - x[2][0] = unit[0] * unit[2] * (1 - cosine) + unit[1] * sine; - x[2][1] = unit[1] * unit[2] * (1 - cosine) - unit[0] * sine; - x[2][2] = unit[2] * unit[2] * (1 - cosine) + cosine; - x[2][3] = 0; - - x[3][0] = 0; - x[3][1] = 0; - x[3][2] = 0; - x[3][3] = 1; - - return *this; -} - -template -template -const Matrix44 & -Matrix44::rotate (const Vec3 &r) -{ - S cos_rz, sin_rz, cos_ry, sin_ry, cos_rx, sin_rx; - S m00, m01, m02; - S m10, m11, m12; - S m20, m21, m22; - - cos_rz = Math::cos (r[2]); - cos_ry = Math::cos (r[1]); - cos_rx = Math::cos (r[0]); - - sin_rz = Math::sin (r[2]); - sin_ry = Math::sin (r[1]); - sin_rx = Math::sin (r[0]); - - m00 = cos_rz * cos_ry; - m01 = sin_rz * cos_ry; - m02 = -sin_ry; - m10 = -sin_rz * cos_rx + cos_rz * sin_ry * sin_rx; - m11 = cos_rz * cos_rx + sin_rz * sin_ry * sin_rx; - m12 = cos_ry * sin_rx; - m20 = -sin_rz * -sin_rx + cos_rz * sin_ry * cos_rx; - m21 = cos_rz * -sin_rx + sin_rz * sin_ry * cos_rx; - m22 = cos_ry * cos_rx; - - Matrix44 P (*this); - - x[0][0] = P[0][0] * m00 + P[1][0] * m01 + P[2][0] * m02; - x[0][1] = P[0][1] * m00 + P[1][1] * m01 + P[2][1] * m02; - x[0][2] = P[0][2] * m00 + P[1][2] * m01 + P[2][2] * m02; - x[0][3] = P[0][3] * m00 + P[1][3] * m01 + P[2][3] * m02; - - x[1][0] = P[0][0] * m10 + P[1][0] * m11 + P[2][0] * m12; - x[1][1] = P[0][1] * m10 + P[1][1] * m11 + P[2][1] * m12; - x[1][2] = P[0][2] * m10 + P[1][2] * m11 + P[2][2] * m12; - x[1][3] = P[0][3] * m10 + P[1][3] * m11 + P[2][3] * m12; - - x[2][0] = P[0][0] * m20 + P[1][0] * m21 + P[2][0] * m22; - x[2][1] = P[0][1] * m20 + P[1][1] * m21 + P[2][1] * m22; - x[2][2] = P[0][2] * m20 + P[1][2] * m21 + P[2][2] * m22; - x[2][3] = P[0][3] * m20 + P[1][3] * m21 + P[2][3] * m22; - - return *this; -} - -template -const Matrix44 & -Matrix44::setScale (T s) -{ - memset (x, 0, sizeof (x)); - x[0][0] = s; - x[1][1] = s; - x[2][2] = s; - x[3][3] = 1; - - return *this; -} - -template -template -const Matrix44 & -Matrix44::setScale (const Vec3 &s) -{ - memset (x, 0, sizeof (x)); - x[0][0] = s[0]; - x[1][1] = s[1]; - x[2][2] = s[2]; - x[3][3] = 1; - - return *this; -} - -template -template -const Matrix44 & -Matrix44::scale (const Vec3 &s) -{ - x[0][0] *= s[0]; - x[0][1] *= s[0]; - x[0][2] *= s[0]; - x[0][3] *= s[0]; - - x[1][0] *= s[1]; - x[1][1] *= s[1]; - x[1][2] *= s[1]; - x[1][3] *= s[1]; - - x[2][0] *= s[2]; - x[2][1] *= s[2]; - x[2][2] *= s[2]; - x[2][3] *= s[2]; - - return *this; -} - -template -template -const Matrix44 & -Matrix44::setTranslation (const Vec3 &t) -{ - x[0][0] = 1; - x[0][1] = 0; - x[0][2] = 0; - x[0][3] = 0; - - x[1][0] = 0; - x[1][1] = 1; - x[1][2] = 0; - x[1][3] = 0; - - x[2][0] = 0; - x[2][1] = 0; - x[2][2] = 1; - x[2][3] = 0; - - x[3][0] = t[0]; - x[3][1] = t[1]; - x[3][2] = t[2]; - x[3][3] = 1; - - return *this; -} - -template -inline const Vec3 -Matrix44::translation () const -{ - return Vec3 (x[3][0], x[3][1], x[3][2]); -} - -template -template -const Matrix44 & -Matrix44::translate (const Vec3 &t) -{ - x[3][0] += t[0] * x[0][0] + t[1] * x[1][0] + t[2] * x[2][0]; - x[3][1] += t[0] * x[0][1] + t[1] * x[1][1] + t[2] * x[2][1]; - x[3][2] += t[0] * x[0][2] + t[1] * x[1][2] + t[2] * x[2][2]; - x[3][3] += t[0] * x[0][3] + t[1] * x[1][3] + t[2] * x[2][3]; - - return *this; -} - -template -template -const Matrix44 & -Matrix44::setShear (const Vec3 &h) -{ - x[0][0] = 1; - x[0][1] = 0; - x[0][2] = 0; - x[0][3] = 0; - - x[1][0] = h[0]; - x[1][1] = 1; - x[1][2] = 0; - x[1][3] = 0; - - x[2][0] = h[1]; - x[2][1] = h[2]; - x[2][2] = 1; - x[2][3] = 0; - - x[3][0] = 0; - x[3][1] = 0; - x[3][2] = 0; - x[3][3] = 1; - - return *this; -} - -template -template -const Matrix44 & -Matrix44::setShear (const Shear6 &h) -{ - x[0][0] = 1; - x[0][1] = h.yx; - x[0][2] = h.zx; - x[0][3] = 0; - - x[1][0] = h.xy; - x[1][1] = 1; - x[1][2] = h.zy; - x[1][3] = 0; - - x[2][0] = h.xz; - x[2][1] = h.yz; - x[2][2] = 1; - x[2][3] = 0; - - x[3][0] = 0; - x[3][1] = 0; - x[3][2] = 0; - x[3][3] = 1; - - return *this; -} - -template -template -const Matrix44 & -Matrix44::shear (const Vec3 &h) -{ - // - // In this case, we don't need a temp. copy of the matrix - // because we never use a value on the RHS after we've - // changed it on the LHS. - // - - for (int i=0; i < 4; i++) - { - x[2][i] += h[1] * x[0][i] + h[2] * x[1][i]; - x[1][i] += h[0] * x[0][i]; - } - - return *this; -} - -template -template -const Matrix44 & -Matrix44::shear (const Shear6 &h) -{ - Matrix44 P (*this); - - for (int i=0; i < 4; i++) - { - x[0][i] = P[0][i] + h.yx * P[1][i] + h.zx * P[2][i]; - x[1][i] = h.xy * P[0][i] + P[1][i] + h.zy * P[2][i]; - x[2][i] = h.xz * P[0][i] + h.yz * P[1][i] + P[2][i]; - } - - return *this; -} - - -//-------------------------------- -// Implementation of stream output -//-------------------------------- - -template -std::ostream & -operator << (std::ostream &s, const Matrix33 &m) -{ - std::ios_base::fmtflags oldFlags = s.flags(); - int width; - - if (s.flags() & std::ios_base::fixed) - { - s.setf (std::ios_base::showpoint); - width = s.precision() + 5; - } - else - { - s.setf (std::ios_base::scientific); - s.setf (std::ios_base::showpoint); - width = s.precision() + 8; - } - - s << "(" << std::setw (width) << m[0][0] << - " " << std::setw (width) << m[0][1] << - " " << std::setw (width) << m[0][2] << "\n" << - - " " << std::setw (width) << m[1][0] << - " " << std::setw (width) << m[1][1] << - " " << std::setw (width) << m[1][2] << "\n" << - - " " << std::setw (width) << m[2][0] << - " " << std::setw (width) << m[2][1] << - " " << std::setw (width) << m[2][2] << ")\n"; - - s.flags (oldFlags); - return s; -} - -template -std::ostream & -operator << (std::ostream &s, const Matrix44 &m) -{ - std::ios_base::fmtflags oldFlags = s.flags(); - int width; - - if (s.flags() & std::ios_base::fixed) - { - s.setf (std::ios_base::showpoint); - width = s.precision() + 5; - } - else - { - s.setf (std::ios_base::scientific); - s.setf (std::ios_base::showpoint); - width = s.precision() + 8; - } - - s << "(" << std::setw (width) << m[0][0] << - " " << std::setw (width) << m[0][1] << - " " << std::setw (width) << m[0][2] << - " " << std::setw (width) << m[0][3] << "\n" << - - " " << std::setw (width) << m[1][0] << - " " << std::setw (width) << m[1][1] << - " " << std::setw (width) << m[1][2] << - " " << std::setw (width) << m[1][3] << "\n" << - - " " << std::setw (width) << m[2][0] << - " " << std::setw (width) << m[2][1] << - " " << std::setw (width) << m[2][2] << - " " << std::setw (width) << m[2][3] << "\n" << - - " " << std::setw (width) << m[3][0] << - " " << std::setw (width) << m[3][1] << - " " << std::setw (width) << m[3][2] << - " " << std::setw (width) << m[3][3] << ")\n"; - - s.flags (oldFlags); - return s; -} - - -//--------------------------------------------------------------- -// Implementation of vector-times-matrix multiplication operators -//--------------------------------------------------------------- - -template -inline const Vec2 & -operator *= (Vec2 &v, const Matrix33 &m) -{ - S x = S(v.x * m[0][0] + v.y * m[1][0] + m[2][0]); - S y = S(v.x * m[0][1] + v.y * m[1][1] + m[2][1]); - S w = S(v.x * m[0][2] + v.y * m[1][2] + m[2][2]); - - v.x = x / w; - v.y = y / w; - - return v; -} - -template -inline Vec2 -operator * (const Vec2 &v, const Matrix33 &m) -{ - S x = S(v.x * m[0][0] + v.y * m[1][0] + m[2][0]); - S y = S(v.x * m[0][1] + v.y * m[1][1] + m[2][1]); - S w = S(v.x * m[0][2] + v.y * m[1][2] + m[2][2]); - - return Vec2 (x / w, y / w); -} - - -template -inline const Vec3 & -operator *= (Vec3 &v, const Matrix33 &m) -{ - S x = S(v.x * m[0][0] + v.y * m[1][0] + v.z * m[2][0]); - S y = S(v.x * m[0][1] + v.y * m[1][1] + v.z * m[2][1]); - S z = S(v.x * m[0][2] + v.y * m[1][2] + v.z * m[2][2]); - - v.x = x; - v.y = y; - v.z = z; - - return v; -} - -template -inline Vec3 -operator * (const Vec3 &v, const Matrix33 &m) -{ - S x = S(v.x * m[0][0] + v.y * m[1][0] + v.z * m[2][0]); - S y = S(v.x * m[0][1] + v.y * m[1][1] + v.z * m[2][1]); - S z = S(v.x * m[0][2] + v.y * m[1][2] + v.z * m[2][2]); - - return Vec3 (x, y, z); -} - - -template -inline const Vec3 & -operator *= (Vec3 &v, const Matrix44 &m) -{ - S x = S(v.x * m[0][0] + v.y * m[1][0] + v.z * m[2][0] + m[3][0]); - S y = S(v.x * m[0][1] + v.y * m[1][1] + v.z * m[2][1] + m[3][1]); - S z = S(v.x * m[0][2] + v.y * m[1][2] + v.z * m[2][2] + m[3][2]); - S w = S(v.x * m[0][3] + v.y * m[1][3] + v.z * m[2][3] + m[3][3]); - - v.x = x / w; - v.y = y / w; - v.z = z / w; - - return v; -} - -template -inline Vec3 -operator * (const Vec3 &v, const Matrix44 &m) -{ - S x = S(v.x * m[0][0] + v.y * m[1][0] + v.z * m[2][0] + m[3][0]); - S y = S(v.x * m[0][1] + v.y * m[1][1] + v.z * m[2][1] + m[3][1]); - S z = S(v.x * m[0][2] + v.y * m[1][2] + v.z * m[2][2] + m[3][2]); - S w = S(v.x * m[0][3] + v.y * m[1][3] + v.z * m[2][3] + m[3][3]); - - return Vec3 (x / w, y / w, z / w); -} - - -template -inline const Vec4 & -operator *= (Vec4 &v, const Matrix44 &m) -{ - S x = S(v.x * m[0][0] + v.y * m[1][0] + v.z * m[2][0] + v.w * m[3][0]); - S y = S(v.x * m[0][1] + v.y * m[1][1] + v.z * m[2][1] + v.w * m[3][1]); - S z = S(v.x * m[0][2] + v.y * m[1][2] + v.z * m[2][2] + v.w * m[3][2]); - S w = S(v.x * m[0][3] + v.y * m[1][3] + v.z * m[2][3] + v.w * m[3][3]); - - v.x = x; - v.y = y; - v.z = z; - v.w = w; - - return v; -} - -template -inline Vec4 -operator * (const Vec4 &v, const Matrix44 &m) -{ - S x = S(v.x * m[0][0] + v.y * m[1][0] + v.z * m[2][0] + v.w * m[3][0]); - S y = S(v.x * m[0][1] + v.y * m[1][1] + v.z * m[2][1] + v.w * m[3][1]); - S z = S(v.x * m[0][2] + v.y * m[1][2] + v.z * m[2][2] + v.w * m[3][2]); - S w = S(v.x * m[0][3] + v.y * m[1][3] + v.z * m[2][3] + v.w * m[3][3]); - - return Vec4 (x, y, z, w); -} - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHMATRIX_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMatrixAlgo.cpp b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMatrixAlgo.cpp deleted file mode 100644 index 0cafd5c..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMatrixAlgo.cpp +++ /dev/null @@ -1,1252 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - - - -//---------------------------------------------------------------------------- -// -// Implementation of non-template items declared in ImathMatrixAlgo.h -// -//---------------------------------------------------------------------------- - -#include "ImathMatrixAlgo.h" -#include -#include - -#if defined(OPENEXR_DLL) - #define EXPORT_CONST __declspec(dllexport) -#else - #define EXPORT_CONST const -#endif - -IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER - -EXPORT_CONST M33f identity33f ( 1, 0, 0, - 0, 1, 0, - 0, 0, 1); - -EXPORT_CONST M33d identity33d ( 1, 0, 0, - 0, 1, 0, - 0, 0, 1); - -EXPORT_CONST M44f identity44f ( 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1); - -EXPORT_CONST M44d identity44d ( 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1); - -namespace -{ - -class KahanSum -{ -public: - KahanSum() : _total(0), _correction(0) {} - - void - operator+= (const double val) - { - const double y = val - _correction; - const double t = _total + y; - _correction = (t - _total) - y; - _total = t; - } - - double get() const - { - return _total; - } - -private: - double _total; - double _correction; -}; - -} - -template -M44d -procrustesRotationAndTranslation (const Vec3* A, const Vec3* B, const T* weights, const size_t numPoints, const bool doScale) -{ - if (numPoints == 0) - return M44d(); - - // Always do the accumulation in double precision: - V3d Acenter (0.0); - V3d Bcenter (0.0); - double weightsSum = 0.0; - - if (weights == 0) - { - for (int i = 0; i < numPoints; ++i) - { - Acenter += (V3d) A[i]; - Bcenter += (V3d) B[i]; - } - weightsSum = (double) numPoints; - } - else - { - for (int i = 0; i < numPoints; ++i) - { - const double w = weights[i]; - weightsSum += w; - - Acenter += w * (V3d) A[i]; - Bcenter += w * (V3d) B[i]; - } - } - - if (weightsSum == 0) - return M44d(); - - Acenter /= weightsSum; - Bcenter /= weightsSum; - - // - // Find Q such that |Q*A - B| (actually A-Acenter and B-Bcenter, weighted) - // is minimized in the least squares sense. - // From Golub/Van Loan, p.601 - // - // A,B are 3xn - // Let C = B A^T (where A is 3xn and B^T is nx3, so C is 3x3) - // Compute the SVD: C = U D V^T (U,V rotations, D diagonal). - // Throw away the D part, and return Q = U V^T - M33d C (0.0); - if (weights == 0) - { - for (int i = 0; i < numPoints; ++i) - C += outerProduct ((V3d) B[i] - Bcenter, (V3d) A[i] - Acenter); - } - else - { - for (int i = 0; i < numPoints; ++i) - { - const double w = weights[i]; - C += outerProduct (w * ((V3d) B[i] - Bcenter), (V3d) A[i] - Acenter); - } - } - - M33d U, V; - V3d S; - jacobiSVD (C, U, S, V, IMATH_INTERNAL_NAMESPACE::limits::epsilon(), true); - - // We want Q.transposed() here since we are going to be using it in the - // Imath style (multiplying vectors on the right, v' = v*A^T): - const M33d Qt = V * U.transposed(); - - double s = 1.0; - if (doScale && numPoints > 1) - { - // Finding a uniform scale: let us assume the Q is completely fixed - // at this point (solving for both simultaneously seems much harder). - // We are trying to compute (again, per Golub and van Loan) - // min || s*A*Q - B ||_F - // Notice that we've jammed a uniform scale in front of the Q. - // Now, the Frobenius norm (the least squares norm over matrices) - // has the neat property that it is equivalent to minimizing the trace - // of M^T*M (see your friendly neighborhood linear algebra text for a - // derivation). Thus, we can expand this out as - // min tr (s*A*Q - B)^T*(s*A*Q - B) - // = min tr(Q^T*A^T*s*s*A*Q) + tr(B^T*B) - 2*tr(Q^T*A^T*s*B) by linearity of the trace - // = min s^2 tr(A^T*A) + tr(B^T*B) - 2*s*tr(Q^T*A^T*B) using the fact that the trace is invariant - // under similarity transforms Q*M*Q^T - // If we differentiate w.r.t. s and set this to 0, we get - // 0 = 2*s*tr(A^T*A) - 2*tr(Q^T*A^T*B) - // so - // 2*s*tr(A^T*A) = 2*s*tr(Q^T*A^T*B) - // s = tr(Q^T*A^T*B) / tr(A^T*A) - - KahanSum traceATA; - if (weights == 0) - { - for (int i = 0; i < numPoints; ++i) - traceATA += ((V3d) A[i] - Acenter).length2(); - } - else - { - for (int i = 0; i < numPoints; ++i) - traceATA += ((double) weights[i]) * ((V3d) A[i] - Acenter).length2(); - } - - KahanSum traceBATQ; - for (int i = 0; i < 3; ++i) - for (int j = 0; j < 3; ++j) - traceBATQ += Qt[j][i] * C[i][j]; - - s = traceBATQ.get() / traceATA.get(); - } - - // Q is the rotation part of what we want to return. - // The entire transform is: - // (translate origin to Bcenter) * Q * (translate Acenter to origin) - // last first - // The effect of this on a point is: - // (translate origin to Bcenter) * Q * (translate Acenter to origin) * point - // = (translate origin to Bcenter) * Q * (-Acenter + point) - // = (translate origin to Bcenter) * (-Q*Acenter + Q*point) - // = (translate origin to Bcenter) * (translate Q*Acenter to origin) * Q*point - // = (translate Q*Acenter to Bcenter) * Q*point - // So what we want to return is: - // (translate Q*Acenter to Bcenter) * Q - // - // In block form, this is: - // [ 1 0 0 | ] [ 0 ] [ 1 0 0 | ] [ 1 0 0 | ] [ | ] [ ] - // [ 0 1 0 tb ] [ s*Q 0 ] [ 0 1 0 -ta ] = [ 0 1 0 tb ] [ s*Q -s*Q*ta ] = [ Q tb-s*Q*ta ] - // [ 0 0 1 | ] [ 0 ] [ 0 0 1 | ] [ 0 0 1 | ] [ | ] [ ] - // [ 0 0 0 1 ] [ 0 0 0 1 ] [ 0 0 0 1 ] [ 0 0 0 1 ] [ 0 0 0 1 ] [ 0 0 0 1 ] - // (ofc the whole thing is transposed for Imath). - const V3d translate = Bcenter - s*Acenter*Qt; - - return M44d (s*Qt.x[0][0], s*Qt.x[0][1], s*Qt.x[0][2], T(0), - s*Qt.x[1][0], s*Qt.x[1][1], s*Qt.x[1][2], T(0), - s*Qt.x[2][0], s*Qt.x[2][1], s*Qt.x[2][2], T(0), - translate.x, translate.y, translate.z, T(1)); -} // procrustesRotationAndTranslation - -template -M44d -procrustesRotationAndTranslation (const Vec3* A, const Vec3* B, const size_t numPoints, const bool doScale) -{ - return procrustesRotationAndTranslation (A, B, (const T*) 0, numPoints, doScale); -} // procrustesRotationAndTranslation - - -template IMATH_EXPORT M44d procrustesRotationAndTranslation (const V3d* from, const V3d* to, const size_t numPoints, const bool doScale); -template IMATH_EXPORT M44d procrustesRotationAndTranslation (const V3f* from, const V3f* to, const size_t numPoints, const bool doScale); -template IMATH_EXPORT M44d procrustesRotationAndTranslation (const V3d* from, const V3d* to, const double* weights, const size_t numPoints, const bool doScale); -template IMATH_EXPORT M44d procrustesRotationAndTranslation (const V3f* from, const V3f* to, const float* weights, const size_t numPoints, const bool doScale); - - -namespace -{ - -// Applies the 2x2 Jacobi rotation -// [ c s 0 ] [ 1 0 0 ] [ c 0 s ] -// [ -s c 0 ] or [ 0 c s ] or [ 0 1 0 ] -// [ 0 0 1 ] [ 0 -s c ] [ -s 0 c ] -// from the right; that is, computes -// J * A -// for the Jacobi rotation J and the matrix A. This is efficient because we -// only need to touch exactly the 2 columns that are affected, so we never -// need to explicitly construct the J matrix. -template -void -jacobiRotateRight (IMATH_INTERNAL_NAMESPACE::Matrix33& A, - const T c, - const T s) -{ - for (int i = 0; i < 3; ++i) - { - const T tau1 = A[i][j]; - const T tau2 = A[i][k]; - A[i][j] = c * tau1 - s * tau2; - A[i][k] = s * tau1 + c * tau2; - } -} - -template -void -jacobiRotateRight (IMATH_INTERNAL_NAMESPACE::Matrix44& A, - const int j, - const int k, - const T c, - const T s) -{ - for (int i = 0; i < 4; ++i) - { - const T tau1 = A[i][j]; - const T tau2 = A[i][k]; - A[i][j] = c * tau1 - s * tau2; - A[i][k] = s * tau1 + c * tau2; - } -} - -// This routine solves the 2x2 SVD: -// [ c1 s1 ] [ w x ] [ c2 s2 ] [ d1 0 ] -// [ ] [ ] [ ] = [ ] -// [ -s1 c1 ] [ y z ] [ -s2 c2 ] [ 0 d2 ] -// where -// [ w x ] -// A = [ ] -// [ y z ] -// is the subset of A consisting of the [j,k] entries, A([j k], [j k]) in -// Matlab parlance. The method is the 'USVD' algorithm described in the -// following paper: -// 'Computation of the Singular Value Decomposition using Mesh-Connected Processors' -// by Richard P. Brent, Franklin T. Luk, and Charles Van Loan -// It breaks the computation into two steps: the first symmetrizes the matrix, -// and the second diagonalizes the symmetric matrix. -template -bool -twoSidedJacobiRotation (IMATH_INTERNAL_NAMESPACE::Matrix33& A, - IMATH_INTERNAL_NAMESPACE::Matrix33& U, - IMATH_INTERNAL_NAMESPACE::Matrix33& V, - const T tol) -{ - // Load everything into local variables to make things easier on the - // optimizer: - const T w = A[j][j]; - const T x = A[j][k]; - const T y = A[k][j]; - const T z = A[k][k]; - - // We will keep track of whether we're actually performing any rotations, - // since if the matrix is already diagonal we'll end up with the identity - // as our Jacobi rotation and we can short-circuit. - bool changed = false; - - // The first step is to symmetrize the 2x2 matrix, - // [ c s ]^T [ w x ] = [ p q ] - // [ -s c ] [ y z ] [ q r ] - T mu_1 = w + z; - T mu_2 = x - y; - - T c, s; - if (std::abs(mu_2) <= tol*std::abs(mu_1)) // Already symmetric (to tolerance) - { // Note that the <= is important here - c = T(1); // because we want to bypass the computation - s = T(0); // of rho if mu_1 = mu_2 = 0. - - const T p = w; - const T r = z; - mu_1 = r - p; - mu_2 = x + y; - } - else - { - const T rho = mu_1 / mu_2; - s = T(1) / std::sqrt (T(1) + rho*rho); // TODO is there a native inverse square root function? - if (rho < 0) - s = -s; - c = s * rho; - - mu_1 = s * (x + y) + c * (z - w); // = r - p - mu_2 = T(2) * (c * x - s * z); // = 2*q - - changed = true; - } - - // The second stage diagonalizes, - // [ c2 s2 ]^T [ p q ] [ c2 s2 ] = [ d1 0 ] - // [ -s2 c2 ] [ q r ] [ -s2 c2 ] [ 0 d2 ] - T c_2, s_2; - if (std::abs(mu_2) <= tol*std::abs(mu_1)) - { - c_2 = T(1); - s_2 = T(0); - } - else - { - const T rho_2 = mu_1 / mu_2; - T t_2 = T(1) / (std::abs(rho_2) + std::sqrt(1 + rho_2*rho_2)); - if (rho_2 < 0) - t_2 = -t_2; - c_2 = T(1) / std::sqrt (T(1) + t_2*t_2); - s_2 = c_2 * t_2; - - changed = true; - } - - const T c_1 = c_2 * c - s_2 * s; - const T s_1 = s_2 * c + c_2 * s; - - if (!changed) - { - // We've decided that the off-diagonal entries are already small - // enough, so we'll set them to zero. This actually appears to result - // in smaller errors than leaving them be, possibly because it prevents - // us from trying to do extra rotations later that we don't need. - A[k][j] = 0; - A[j][k] = 0; - return false; - } - - const T d_1 = c_1*(w*c_2 - x*s_2) - s_1*(y*c_2 - z*s_2); - const T d_2 = s_1*(w*s_2 + x*c_2) + c_1*(y*s_2 + z*c_2); - - // For the entries we just zeroed out, we'll just set them to 0, since - // they should be 0 up to machine precision. - A[j][j] = d_1; - A[k][k] = d_2; - A[k][j] = 0; - A[j][k] = 0; - - // Rotate the entries that _weren't_ involved in the 2x2 SVD: - { - // Rotate on the left by - // [ c1 s1 0 ]^T [ c1 0 s1 ]^T [ 1 0 0 ]^T - // [ -s1 c1 0 ] or [ 0 1 0 ] or [ 0 c1 s1 ] - // [ 0 0 1 ] [ -s1 0 c1 ] [ 0 -s1 c1 ] - // This has the effect of adding the (weighted) ith and jth _rows_ to - // each other. - const T tau1 = A[j][l]; - const T tau2 = A[k][l]; - A[j][l] = c_1 * tau1 - s_1 * tau2; - A[k][l] = s_1 * tau1 + c_1 * tau2; - } - - { - // Rotate on the right by - // [ c2 s2 0 ] [ c2 0 s2 ] [ 1 0 0 ] - // [ -s2 c2 0 ] or [ 0 1 0 ] or [ 0 c2 s2 ] - // [ 0 0 1 ] [ -s2 0 c2 ] [ 0 -s2 c2 ] - // This has the effect of adding the (weighted) ith and jth _columns_ to - // each other. - const T tau1 = A[l][j]; - const T tau2 = A[l][k]; - A[l][j] = c_2 * tau1 - s_2 * tau2; - A[l][k] = s_2 * tau1 + c_2 * tau2; - } - - // Now apply the rotations to U and V: - // Remember that we have - // R1^T * A * R2 = D - // This is in the 2x2 case, but after doing a bunch of these - // we will get something like this for the 3x3 case: - // ... R1b^T * R1a^T * A * R2a * R2b * ... = D - // ----------------- --------------- - // = U^T = V - // So, - // U = R1a * R1b * ... - // V = R2a * R2b * ... - jacobiRotateRight (U, c_1, s_1); - jacobiRotateRight (V, c_2, s_2); - - return true; -} - -template -bool -twoSidedJacobiRotation (IMATH_INTERNAL_NAMESPACE::Matrix44& A, - int j, - int k, - IMATH_INTERNAL_NAMESPACE::Matrix44& U, - IMATH_INTERNAL_NAMESPACE::Matrix44& V, - const T tol) -{ - // Load everything into local variables to make things easier on the - // optimizer: - const T w = A[j][j]; - const T x = A[j][k]; - const T y = A[k][j]; - const T z = A[k][k]; - - // We will keep track of whether we're actually performing any rotations, - // since if the matrix is already diagonal we'll end up with the identity - // as our Jacobi rotation and we can short-circuit. - bool changed = false; - - // The first step is to symmetrize the 2x2 matrix, - // [ c s ]^T [ w x ] = [ p q ] - // [ -s c ] [ y z ] [ q r ] - T mu_1 = w + z; - T mu_2 = x - y; - - T c, s; - if (std::abs(mu_2) <= tol*std::abs(mu_1)) // Already symmetric (to tolerance) - { // Note that the <= is important here - c = T(1); // because we want to bypass the computation - s = T(0); // of rho if mu_1 = mu_2 = 0. - - const T p = w; - const T r = z; - mu_1 = r - p; - mu_2 = x + y; - } - else - { - const T rho = mu_1 / mu_2; - s = T(1) / std::sqrt (T(1) + rho*rho); // TODO is there a native inverse square root function? - if (rho < 0) - s = -s; - c = s * rho; - - mu_1 = s * (x + y) + c * (z - w); // = r - p - mu_2 = T(2) * (c * x - s * z); // = 2*q - - changed = true; - } - - // The second stage diagonalizes, - // [ c2 s2 ]^T [ p q ] [ c2 s2 ] = [ d1 0 ] - // [ -s2 c2 ] [ q r ] [ -s2 c2 ] [ 0 d2 ] - T c_2, s_2; - if (std::abs(mu_2) <= tol*std::abs(mu_1)) - { - c_2 = T(1); - s_2 = T(0); - } - else - { - const T rho_2 = mu_1 / mu_2; - T t_2 = T(1) / (std::abs(rho_2) + std::sqrt(1 + rho_2*rho_2)); - if (rho_2 < 0) - t_2 = -t_2; - c_2 = T(1) / std::sqrt (T(1) + t_2*t_2); - s_2 = c_2 * t_2; - - changed = true; - } - - const T c_1 = c_2 * c - s_2 * s; - const T s_1 = s_2 * c + c_2 * s; - - if (!changed) - { - // We've decided that the off-diagonal entries are already small - // enough, so we'll set them to zero. This actually appears to result - // in smaller errors than leaving them be, possibly because it prevents - // us from trying to do extra rotations later that we don't need. - A[k][j] = 0; - A[j][k] = 0; - return false; - } - - const T d_1 = c_1*(w*c_2 - x*s_2) - s_1*(y*c_2 - z*s_2); - const T d_2 = s_1*(w*s_2 + x*c_2) + c_1*(y*s_2 + z*c_2); - - // For the entries we just zeroed out, we'll just set them to 0, since - // they should be 0 up to machine precision. - A[j][j] = d_1; - A[k][k] = d_2; - A[k][j] = 0; - A[j][k] = 0; - - // Rotate the entries that _weren't_ involved in the 2x2 SVD: - for (int l = 0; l < 4; ++l) - { - if (l == j || l == k) - continue; - - // Rotate on the left by - // [ 1 ] - // [ . ] - // [ c2 s2 ] j - // [ 1 ] - // [ -s2 c2 ] k - // [ . ] - // [ 1 ] - // j k - // - // This has the effect of adding the (weighted) ith and jth _rows_ to - // each other. - const T tau1 = A[j][l]; - const T tau2 = A[k][l]; - A[j][l] = c_1 * tau1 - s_1 * tau2; - A[k][l] = s_1 * tau1 + c_1 * tau2; - } - - for (int l = 0; l < 4; ++l) - { - // We set the A[j/k][j/k] entries already - if (l == j || l == k) - continue; - - // Rotate on the right by - // [ 1 ] - // [ . ] - // [ c2 s2 ] j - // [ 1 ] - // [ -s2 c2 ] k - // [ . ] - // [ 1 ] - // j k - // - // This has the effect of adding the (weighted) ith and jth _columns_ to - // each other. - const T tau1 = A[l][j]; - const T tau2 = A[l][k]; - A[l][j] = c_2 * tau1 - s_2 * tau2; - A[l][k] = s_2 * tau1 + c_2 * tau2; - } - - // Now apply the rotations to U and V: - // Remember that we have - // R1^T * A * R2 = D - // This is in the 2x2 case, but after doing a bunch of these - // we will get something like this for the 3x3 case: - // ... R1b^T * R1a^T * A * R2a * R2b * ... = D - // ----------------- --------------- - // = U^T = V - // So, - // U = R1a * R1b * ... - // V = R2a * R2b * ... - jacobiRotateRight (U, j, k, c_1, s_1); - jacobiRotateRight (V, j, k, c_2, s_2); - - return true; -} - -template -void -swapColumns (IMATH_INTERNAL_NAMESPACE::Matrix33& A, int j, int k) -{ - for (int i = 0; i < 3; ++i) - std::swap (A[i][j], A[i][k]); -} - -template -T -maxOffDiag (const IMATH_INTERNAL_NAMESPACE::Matrix33& A) -{ - T result = 0; - result = std::max (result, std::abs (A[0][1])); - result = std::max (result, std::abs (A[0][2])); - result = std::max (result, std::abs (A[1][0])); - result = std::max (result, std::abs (A[1][2])); - result = std::max (result, std::abs (A[2][0])); - result = std::max (result, std::abs (A[2][1])); - return result; -} - -template -T -maxOffDiag (const IMATH_INTERNAL_NAMESPACE::Matrix44& A) -{ - T result = 0; - for (int i = 0; i < 4; ++i) - { - for (int j = 0; j < 4; ++j) - { - if (i != j) - result = std::max (result, std::abs (A[i][j])); - } - } - - return result; -} - -template -void -twoSidedJacobiSVD (IMATH_INTERNAL_NAMESPACE::Matrix33 A, - IMATH_INTERNAL_NAMESPACE::Matrix33& U, - IMATH_INTERNAL_NAMESPACE::Vec3& S, - IMATH_INTERNAL_NAMESPACE::Matrix33& V, - const T tol, - const bool forcePositiveDeterminant) -{ - // The two-sided Jacobi SVD works by repeatedly zeroing out - // off-diagonal entries of the matrix, 2 at a time. Basically, - // we can take our 3x3 matrix, - // [* * *] - // [* * *] - // [* * *] - // and use a pair of orthogonal transforms to zero out, say, the - // pair of entries (0, 1) and (1, 0): - // [ c1 s1 ] [* * *] [ c2 s2 ] [* *] - // [-s1 c1 ] [* * *] [-s2 c2 ] = [ * *] - // [ 1] [* * *] [ 1] [* * *] - // When we go to zero out the next pair of entries (say, (0, 2) and (2, 0)) - // then we don't expect those entries to stay 0: - // [ c1 s1 ] [* *] [ c2 s2 ] [* * ] - // [-s1 c1 ] [ * *] [-s2 c2 ] = [* * *] - // [ 1] [* * *] [ 1] [ * *] - // However, if we keep doing this, we'll find that the off-diagonal entries - // converge to 0 fairly quickly (convergence should be roughly cubic). The - // result is a diagonal A matrix and a bunch of orthogonal transforms: - // [* * *] [* ] - // L1 L2 ... Ln [* * *] Rn ... R2 R1 = [ * ] - // [* * *] [ *] - // ------------ ------- ------------ ------- - // U^T A V S - // This turns out to be highly accurate because (1) orthogonal transforms - // are extremely stable to compute and apply (this is why QR factorization - // works so well, FWIW) and because (2) by applying everything to the original - // matrix A instead of computing (A^T * A) we avoid any precision loss that - // would result from that. - U.makeIdentity(); - V.makeIdentity(); - - const int maxIter = 20; // In case we get really unlucky, prevents infinite loops - const T absTol = tol * maxOffDiag (A); // Tolerance is in terms of the maximum - if (absTol != 0) // _off-diagonal_ entry. - { - int numIter = 0; - do - { - ++numIter; - bool changed = twoSidedJacobiRotation (A, U, V, tol); - changed = twoSidedJacobiRotation (A, U, V, tol) || changed; - changed = twoSidedJacobiRotation (A, U, V, tol) || changed; - if (!changed) - break; - } while (maxOffDiag(A) > absTol && numIter < maxIter); - } - - // The off-diagonal entries are (effectively) 0, so whatever's left on the - // diagonal are the singular values: - S.x = A[0][0]; - S.y = A[1][1]; - S.z = A[2][2]; - - // Nothing thus far has guaranteed that the singular values are positive, - // so let's go back through and flip them if not (since by contract we are - // supposed to return all positive SVs): - for (int i = 0; i < 3; ++i) - { - if (S[i] < 0) - { - // If we flip S[i], we need to flip the corresponding column of U - // (we could also pick V if we wanted; it doesn't really matter): - S[i] = -S[i]; - for (int j = 0; j < 3; ++j) - U[j][i] = -U[j][i]; - } - } - - // Order the singular values from largest to smallest; this requires - // exactly two passes through the data using bubble sort: - for (int i = 0; i < 2; ++i) - { - for (int j = 0; j < (2 - i); ++j) - { - // No absolute values necessary since we already ensured that - // they're positive: - if (S[j] < S[j+1]) - { - // If we swap singular values we also have to swap - // corresponding columns in U and V: - std::swap (S[j], S[j+1]); - swapColumns (U, j, j+1); - swapColumns (V, j, j+1); - } - } - } - - if (forcePositiveDeterminant) - { - // We want to guarantee that the returned matrices always have positive - // determinant. We can do this by adding the appropriate number of - // matrices of the form: - // [ 1 ] - // L = [ 1 ] - // [ -1 ] - // Note that L' = L and L*L = Identity. Thus we can add: - // U*L*L*S*V = (U*L)*(L*S)*V - // if U has a negative determinant, and - // U*S*L*L*V = U*(S*L)*(L*V) - // if V has a neg. determinant. - if (U.determinant() < 0) - { - for (int i = 0; i < 3; ++i) - U[i][2] = -U[i][2]; - S.z = -S.z; - } - - if (V.determinant() < 0) - { - for (int i = 0; i < 3; ++i) - V[i][2] = -V[i][2]; - S.z = -S.z; - } - } -} - -template -void -twoSidedJacobiSVD (IMATH_INTERNAL_NAMESPACE::Matrix44 A, - IMATH_INTERNAL_NAMESPACE::Matrix44& U, - IMATH_INTERNAL_NAMESPACE::Vec4& S, - IMATH_INTERNAL_NAMESPACE::Matrix44& V, - const T tol, - const bool forcePositiveDeterminant) -{ - // Please see the Matrix33 version for a detailed description of the algorithm. - U.makeIdentity(); - V.makeIdentity(); - - const int maxIter = 20; // In case we get really unlucky, prevents infinite loops - const T absTol = tol * maxOffDiag (A); // Tolerance is in terms of the maximum - if (absTol != 0) // _off-diagonal_ entry. - { - int numIter = 0; - do - { - ++numIter; - bool changed = twoSidedJacobiRotation (A, 0, 1, U, V, tol); - changed = twoSidedJacobiRotation (A, 0, 2, U, V, tol) || changed; - changed = twoSidedJacobiRotation (A, 0, 3, U, V, tol) || changed; - changed = twoSidedJacobiRotation (A, 1, 2, U, V, tol) || changed; - changed = twoSidedJacobiRotation (A, 1, 3, U, V, tol) || changed; - changed = twoSidedJacobiRotation (A, 2, 3, U, V, tol) || changed; - if (!changed) - break; - } while (maxOffDiag(A) > absTol && numIter < maxIter); - } - - // The off-diagonal entries are (effectively) 0, so whatever's left on the - // diagonal are the singular values: - S[0] = A[0][0]; - S[1] = A[1][1]; - S[2] = A[2][2]; - S[3] = A[3][3]; - - // Nothing thus far has guaranteed that the singular values are positive, - // so let's go back through and flip them if not (since by contract we are - // supposed to return all positive SVs): - for (int i = 0; i < 4; ++i) - { - if (S[i] < 0) - { - // If we flip S[i], we need to flip the corresponding column of U - // (we could also pick V if we wanted; it doesn't really matter): - S[i] = -S[i]; - for (int j = 0; j < 4; ++j) - U[j][i] = -U[j][i]; - } - } - - // Order the singular values from largest to smallest using insertion sort: - for (int i = 1; i < 4; ++i) - { - const IMATH_INTERNAL_NAMESPACE::Vec4 uCol (U[0][i], U[1][i], U[2][i], U[3][i]); - const IMATH_INTERNAL_NAMESPACE::Vec4 vCol (V[0][i], V[1][i], V[2][i], V[3][i]); - const T sVal = S[i]; - - int j = i - 1; - while (std::abs (S[j]) < std::abs (sVal)) - { - for (int k = 0; k < 4; ++k) - U[k][j+1] = U[k][j]; - for (int k = 0; k < 4; ++k) - V[k][j+1] = V[k][j]; - S[j+1] = S[j]; - - --j; - if (j < 0) - break; - } - - for (int k = 0; k < 4; ++k) - U[k][j+1] = uCol[k]; - for (int k = 0; k < 4; ++k) - V[k][j+1] = vCol[k]; - S[j+1] = sVal; - } - - if (forcePositiveDeterminant) - { - // We want to guarantee that the returned matrices always have positive - // determinant. We can do this by adding the appropriate number of - // matrices of the form: - // [ 1 ] - // L = [ 1 ] - // [ 1 ] - // [ -1 ] - // Note that L' = L and L*L = Identity. Thus we can add: - // U*L*L*S*V = (U*L)*(L*S)*V - // if U has a negative determinant, and - // U*S*L*L*V = U*(S*L)*(L*V) - // if V has a neg. determinant. - if (U.determinant() < 0) - { - for (int i = 0; i < 4; ++i) - U[i][3] = -U[i][3]; - S[3] = -S[3]; - } - - if (V.determinant() < 0) - { - for (int i = 0; i < 4; ++i) - V[i][3] = -V[i][3]; - S[3] = -S[3]; - } - } -} - -} - -template -void -jacobiSVD (const IMATH_INTERNAL_NAMESPACE::Matrix33& A, - IMATH_INTERNAL_NAMESPACE::Matrix33& U, - IMATH_INTERNAL_NAMESPACE::Vec3& S, - IMATH_INTERNAL_NAMESPACE::Matrix33& V, - const T tol, - const bool forcePositiveDeterminant) -{ - twoSidedJacobiSVD (A, U, S, V, tol, forcePositiveDeterminant); -} - -template -void -jacobiSVD (const IMATH_INTERNAL_NAMESPACE::Matrix44& A, - IMATH_INTERNAL_NAMESPACE::Matrix44& U, - IMATH_INTERNAL_NAMESPACE::Vec4& S, - IMATH_INTERNAL_NAMESPACE::Matrix44& V, - const T tol, - const bool forcePositiveDeterminant) -{ - twoSidedJacobiSVD (A, U, S, V, tol, forcePositiveDeterminant); -} - -template IMATH_EXPORT void jacobiSVD (const IMATH_INTERNAL_NAMESPACE::Matrix33& A, - IMATH_INTERNAL_NAMESPACE::Matrix33& U, - IMATH_INTERNAL_NAMESPACE::Vec3& S, - IMATH_INTERNAL_NAMESPACE::Matrix33& V, - const float tol, - const bool forcePositiveDeterminant); -template IMATH_EXPORT void jacobiSVD (const IMATH_INTERNAL_NAMESPACE::Matrix33& A, - IMATH_INTERNAL_NAMESPACE::Matrix33& U, - IMATH_INTERNAL_NAMESPACE::Vec3& S, - IMATH_INTERNAL_NAMESPACE::Matrix33& V, - const double tol, - const bool forcePositiveDeterminant); -template IMATH_EXPORT void jacobiSVD (const IMATH_INTERNAL_NAMESPACE::Matrix44& A, - IMATH_INTERNAL_NAMESPACE::Matrix44& U, - IMATH_INTERNAL_NAMESPACE::Vec4& S, - IMATH_INTERNAL_NAMESPACE::Matrix44& V, - const float tol, - const bool forcePositiveDeterminant); -template IMATH_EXPORT void jacobiSVD (const IMATH_INTERNAL_NAMESPACE::Matrix44& A, - IMATH_INTERNAL_NAMESPACE::Matrix44& U, - IMATH_INTERNAL_NAMESPACE::Vec4& S, - IMATH_INTERNAL_NAMESPACE::Matrix44& V, - const double tol, - const bool forcePositiveDeterminant); - -namespace -{ - -template -inline -void -jacobiRotateRight (TM& A, - const typename TM::BaseType s, - const typename TM::BaseType tau) -{ - typedef typename TM::BaseType T; - - for (unsigned int i = 0; i < TM::dimensions(); ++i) - { - const T nu1 = A[i][j]; - const T nu2 = A[i][k]; - A[i][j] -= s * (nu2 + tau * nu1); - A[i][k] += s * (nu1 - tau * nu2); - } -} - -template -bool -jacobiRotation (Matrix33& A, - Matrix33& V, - Vec3& Z, - const T tol) -{ - // Load everything into local variables to make things easier on the - // optimizer: - const T x = A[j][j]; - const T y = A[j][k]; - const T z = A[k][k]; - - // The first stage diagonalizes, - // [ c s ]^T [ x y ] [ c -s ] = [ d1 0 ] - // [ -s c ] [ y z ] [ s c ] [ 0 d2 ] - const T mu1 = z - x; - const T mu2 = 2 * y; - - if (std::abs(mu2) <= tol*std::abs(mu1)) - { - // We've decided that the off-diagonal entries are already small - // enough, so we'll set them to zero. This actually appears to result - // in smaller errors than leaving them be, possibly because it prevents - // us from trying to do extra rotations later that we don't need. - A[j][k] = 0; - return false; - } - const T rho = mu1 / mu2; - const T t = (rho < 0 ? T(-1) : T(1)) / (std::abs(rho) + std::sqrt(1 + rho*rho)); - const T c = T(1) / std::sqrt (T(1) + t*t); - const T s = t * c; - const T tau = s / (T(1) + c); - const T h = t * y; - - // Update diagonal elements. - Z[j] -= h; - Z[k] += h; - A[j][j] -= h; - A[k][k] += h; - - // For the entries we just zeroed out, we'll just set them to 0, since - // they should be 0 up to machine precision. - A[j][k] = 0; - - // We only update upper triagnular elements of A, since - // A is supposed to be symmetric. - T& offd1 = l < j ? A[l][j] : A[j][l]; - T& offd2 = l < k ? A[l][k] : A[k][l]; - const T nu1 = offd1; - const T nu2 = offd2; - offd1 = nu1 - s * (nu2 + tau * nu1); - offd2 = nu2 + s * (nu1 - tau * nu2); - - // Apply rotation to V - jacobiRotateRight (V, s, tau); - - return true; -} - -template -bool -jacobiRotation (Matrix44& A, - Matrix44& V, - Vec4& Z, - const T tol) -{ - const T x = A[j][j]; - const T y = A[j][k]; - const T z = A[k][k]; - - const T mu1 = z - x; - const T mu2 = T(2) * y; - - // Let's see if rho^(-1) = mu2 / mu1 is less than tol - // This test also checks if rho^2 will overflow - // when tol^(-1) < sqrt(limits::max()). - if (std::abs(mu2) <= tol*std::abs(mu1)) - { - A[j][k] = 0; - return true; - } - - const T rho = mu1 / mu2; - const T t = (rho < 0 ? T(-1) : T(1)) / (std::abs(rho) + std::sqrt(1 + rho*rho)); - const T c = T(1) / std::sqrt (T(1) + t*t); - const T s = c * t; - const T tau = s / (T(1) + c); - const T h = t * y; - - Z[j] -= h; - Z[k] += h; - A[j][j] -= h; - A[k][k] += h; - A[j][k] = 0; - - { - T& offd1 = l1 < j ? A[l1][j] : A[j][l1]; - T& offd2 = l1 < k ? A[l1][k] : A[k][l1]; - const T nu1 = offd1; - const T nu2 = offd2; - offd1 -= s * (nu2 + tau * nu1); - offd2 += s * (nu1 - tau * nu2); - } - - { - T& offd1 = l2 < j ? A[l2][j] : A[j][l2]; - T& offd2 = l2 < k ? A[l2][k] : A[k][l2]; - const T nu1 = offd1; - const T nu2 = offd2; - offd1 -= s * (nu2 + tau * nu1); - offd2 += s * (nu1 - tau * nu2); - } - - jacobiRotateRight (V, s, tau); - - return true; -} - -template -inline -typename TM::BaseType -maxOffDiagSymm (const TM& A) -{ - typedef typename TM::BaseType T; - T result = 0; - for (unsigned int i = 0; i < TM::dimensions(); ++i) - for (unsigned int j = i+1; j < TM::dimensions(); ++j) - result = std::max (result, std::abs (A[i][j])); - - return result; -} - -} // namespace - -template -void -jacobiEigenSolver (Matrix33& A, - Vec3& S, - Matrix33& V, - const T tol) -{ - V.makeIdentity(); - for(int i = 0; i < 3; ++i) { - S[i] = A[i][i]; - } - - const int maxIter = 20; // In case we get really unlucky, prevents infinite loops - const T absTol = tol * maxOffDiagSymm (A); // Tolerance is in terms of the maximum - if (absTol != 0) // _off-diagonal_ entry. - { - int numIter = 0; - do - { - // Z is for accumulating small changes (h) to diagonal entries - // of A for one sweep. Adding h's directly to A might cause - // a cancellation effect when h is relatively very small to - // the corresponding diagonal entry of A and - // this will increase numerical errors - Vec3 Z(0, 0, 0); - ++numIter; - bool changed = jacobiRotation<0, 1, 2> (A, V, Z, tol); - changed = jacobiRotation<0, 2, 1> (A, V, Z, tol) || changed; - changed = jacobiRotation<1, 2, 0> (A, V, Z, tol) || changed; - // One sweep passed. Add accumulated changes (Z) to singular values (S) - // Update diagonal elements of A for better accuracy as well. - for(int i = 0; i < 3; ++i) { - A[i][i] = S[i] += Z[i]; - } - if (!changed) - break; - } while (maxOffDiagSymm(A) > absTol && numIter < maxIter); - } -} - -template -void -jacobiEigenSolver (Matrix44& A, - Vec4& S, - Matrix44& V, - const T tol) -{ - V.makeIdentity(); - - for(int i = 0; i < 4; ++i) { - S[i] = A[i][i]; - } - - const int maxIter = 20; // In case we get really unlucky, prevents infinite loops - const T absTol = tol * maxOffDiagSymm (A); // Tolerance is in terms of the maximum - if (absTol != 0) // _off-diagonal_ entry. - { - int numIter = 0; - do - { - ++numIter; - Vec4 Z(0, 0, 0, 0); - bool changed = jacobiRotation<0, 1, 2, 3> (A, V, Z, tol); - changed = jacobiRotation<0, 2, 1, 3> (A, V, Z, tol) || changed; - changed = jacobiRotation<0, 3, 1, 2> (A, V, Z, tol) || changed; - changed = jacobiRotation<1, 2, 0, 3> (A, V, Z, tol) || changed; - changed = jacobiRotation<1, 3, 0, 2> (A, V, Z, tol) || changed; - changed = jacobiRotation<2, 3, 0, 1> (A, V, Z, tol) || changed; - for(int i = 0; i < 4; ++i) { - A[i][i] = S[i] += Z[i]; - } - if (!changed) - break; - } while (maxOffDiagSymm(A) > absTol && numIter < maxIter); - } -} - -template -void -maxEigenVector (TM& A, TV& V) -{ - TV S; - TM MV; - jacobiEigenSolver(A, S, MV); - - int maxIdx(0); - for(unsigned int i = 1; i < TV::dimensions(); ++i) - { - if(std::abs(S[i]) > std::abs(S[maxIdx])) - maxIdx = i; - } - - for(unsigned int i = 0; i < TV::dimensions(); ++i) - V[i] = MV[i][maxIdx]; -} - -template -void -minEigenVector (TM& A, TV& V) -{ - TV S; - TM MV; - jacobiEigenSolver(A, S, MV); - - int minIdx(0); - for(unsigned int i = 1; i < TV::dimensions(); ++i) - { - if(std::abs(S[i]) < std::abs(S[minIdx])) - minIdx = i; - } - - for(unsigned int i = 0; i < TV::dimensions(); ++i) - V[i] = MV[i][minIdx]; -} - -template IMATH_EXPORT void jacobiEigenSolver (Matrix33& A, - Vec3& S, - Matrix33& V, - const float tol); -template IMATH_EXPORT void jacobiEigenSolver (Matrix33& A, - Vec3& S, - Matrix33& V, - const double tol); -template IMATH_EXPORT void jacobiEigenSolver (Matrix44& A, - Vec4& S, - Matrix44& V, - const float tol); -template IMATH_EXPORT void jacobiEigenSolver (Matrix44& A, - Vec4& S, - Matrix44& V, - const double tol); - -template IMATH_EXPORT void maxEigenVector (Matrix33& A, - Vec3& S); -template IMATH_EXPORT void maxEigenVector (Matrix44& A, - Vec4& S); -template IMATH_EXPORT void maxEigenVector (Matrix33& A, - Vec3& S); -template IMATH_EXPORT void maxEigenVector (Matrix44& A, - Vec4& S); - -template IMATH_EXPORT void minEigenVector (Matrix33& A, - Vec3& S); -template IMATH_EXPORT void minEigenVector (Matrix44& A, - Vec4& S); -template IMATH_EXPORT void minEigenVector (Matrix33& A, - Vec3& S); -template IMATH_EXPORT void minEigenVector (Matrix44& A, - Vec4& S); - -IMATH_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMatrixAlgo.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMatrixAlgo.h deleted file mode 100644 index 8e90b02..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathMatrixAlgo.h +++ /dev/null @@ -1,1425 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMATHMATRIXALGO_H -#define INCLUDED_IMATHMATRIXALGO_H - -//------------------------------------------------------------------------- -// -// This file contains algorithms applied to or in conjunction with -// transformation matrices (Imath::Matrix33 and Imath::Matrix44). -// The assumption made is that these functions are called much less -// often than the basic point functions or these functions require -// more support classes. -// -// This file also defines a few predefined constant matrices. -// -//------------------------------------------------------------------------- - -#include "ImathExport.h" -#include "ImathMatrix.h" -#include "ImathQuat.h" -#include "ImathEuler.h" -#include "ImathExc.h" -#include "ImathVec.h" -#include "ImathLimits.h" -#include "ImathNamespace.h" -#include - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -//------------------ -// Identity matrices -//------------------ - -IMATH_EXPORT_CONST M33f identity33f; -IMATH_EXPORT_CONST M44f identity44f; -IMATH_EXPORT_CONST M33d identity33d; -IMATH_EXPORT_CONST M44d identity44d; - -//---------------------------------------------------------------------- -// Extract scale, shear, rotation, and translation values from a matrix: -// -// Notes: -// -// This implementation follows the technique described in the paper by -// Spencer W. Thomas in the Graphics Gems II article: "Decomposing a -// Matrix into Simple Transformations", p. 320. -// -// - Some of the functions below have an optional exc parameter -// that determines the functions' behavior when the matrix' -// scaling is very close to zero: -// -// If exc is true, the functions throw an Imath::ZeroScale exception. -// -// If exc is false: -// -// extractScaling (m, s) returns false, s is invalid -// sansScaling (m) returns m -// removeScaling (m) returns false, m is unchanged -// sansScalingAndShear (m) returns m -// removeScalingAndShear (m) returns false, m is unchanged -// extractAndRemoveScalingAndShear (m, s, h) -// returns false, m is unchanged, -// (sh) are invalid -// checkForZeroScaleInRow () returns false -// extractSHRT (m, s, h, r, t) returns false, (shrt) are invalid -// -// - Functions extractEuler(), extractEulerXYZ() and extractEulerZYX() -// assume that the matrix does not include shear or non-uniform scaling, -// but they do not examine the matrix to verify this assumption. -// Matrices with shear or non-uniform scaling are likely to produce -// meaningless results. Therefore, you should use the -// removeScalingAndShear() routine, if necessary, prior to calling -// extractEuler...() . -// -// - All functions assume that the matrix does not include perspective -// transformation(s), but they do not examine the matrix to verify -// this assumption. Matrices with perspective transformations are -// likely to produce meaningless results. -// -//---------------------------------------------------------------------- - - -// -// Declarations for 4x4 matrix. -// - -template bool extractScaling - (const Matrix44 &mat, - Vec3 &scl, - bool exc = true); - -template Matrix44 sansScaling (const Matrix44 &mat, - bool exc = true); - -template bool removeScaling - (Matrix44 &mat, - bool exc = true); - -template bool extractScalingAndShear - (const Matrix44 &mat, - Vec3 &scl, - Vec3 &shr, - bool exc = true); - -template Matrix44 sansScalingAndShear - (const Matrix44 &mat, - bool exc = true); - -template void sansScalingAndShear - (Matrix44 &result, - const Matrix44 &mat, - bool exc = true); - -template bool removeScalingAndShear - (Matrix44 &mat, - bool exc = true); - -template bool extractAndRemoveScalingAndShear - (Matrix44 &mat, - Vec3 &scl, - Vec3 &shr, - bool exc = true); - -template void extractEulerXYZ - (const Matrix44 &mat, - Vec3 &rot); - -template void extractEulerZYX - (const Matrix44 &mat, - Vec3 &rot); - -template Quat extractQuat (const Matrix44 &mat); - -template bool extractSHRT - (const Matrix44 &mat, - Vec3 &s, - Vec3 &h, - Vec3 &r, - Vec3 &t, - bool exc /*= true*/, - typename Euler::Order rOrder); - -template bool extractSHRT - (const Matrix44 &mat, - Vec3 &s, - Vec3 &h, - Vec3 &r, - Vec3 &t, - bool exc = true); - -template bool extractSHRT - (const Matrix44 &mat, - Vec3 &s, - Vec3 &h, - Euler &r, - Vec3 &t, - bool exc = true); - -// -// Internal utility function. -// - -template bool checkForZeroScaleInRow - (const T &scl, - const Vec3 &row, - bool exc = true); - -template Matrix44 outerProduct - ( const Vec4 &a, - const Vec4 &b); - - -// -// Returns a matrix that rotates "fromDirection" vector to "toDirection" -// vector. -// - -template Matrix44 rotationMatrix (const Vec3 &fromDirection, - const Vec3 &toDirection); - - - -// -// Returns a matrix that rotates the "fromDir" vector -// so that it points towards "toDir". You may also -// specify that you want the up vector to be pointing -// in a certain direction "upDir". -// - -template Matrix44 rotationMatrixWithUpDir - (const Vec3 &fromDir, - const Vec3 &toDir, - const Vec3 &upDir); - - -// -// Constructs a matrix that rotates the z-axis so that it -// points towards "targetDir". You must also specify -// that you want the up vector to be pointing in a -// certain direction "upDir". -// -// Notes: The following degenerate cases are handled: -// (a) when the directions given by "toDir" and "upDir" -// are parallel or opposite; -// (the direction vectors must have a non-zero cross product) -// (b) when any of the given direction vectors have zero length -// - -template void alignZAxisWithTargetDir - (Matrix44 &result, - Vec3 targetDir, - Vec3 upDir); - - -// Compute an orthonormal direct frame from : a position, an x axis direction and a normal to the y axis -// If the x axis and normal are perpendicular, then the normal will have the same direction as the z axis. -// Inputs are : -// -the position of the frame -// -the x axis direction of the frame -// -a normal to the y axis of the frame -// Return is the orthonormal frame -template Matrix44 computeLocalFrame( const Vec3& p, - const Vec3& xDir, - const Vec3& normal); - -// Add a translate/rotate/scale offset to an input frame -// and put it in another frame of reference -// Inputs are : -// - input frame -// - translate offset -// - rotate offset in degrees -// - scale offset -// - frame of reference -// Output is the offsetted frame -template Matrix44 addOffset( const Matrix44& inMat, - const Vec3& tOffset, - const Vec3& rOffset, - const Vec3& sOffset, - const Vec3& ref); - -// Compute Translate/Rotate/Scale matrix from matrix A with the Rotate/Scale of Matrix B -// Inputs are : -// -keepRotateA : if true keep rotate from matrix A, use B otherwise -// -keepScaleA : if true keep scale from matrix A, use B otherwise -// -Matrix A -// -Matrix B -// Return Matrix A with tweaked rotation/scale -template Matrix44 computeRSMatrix( bool keepRotateA, - bool keepScaleA, - const Matrix44& A, - const Matrix44& B); - - -//---------------------------------------------------------------------- - - -// -// Declarations for 3x3 matrix. -// - - -template bool extractScaling - (const Matrix33 &mat, - Vec2 &scl, - bool exc = true); - -template Matrix33 sansScaling (const Matrix33 &mat, - bool exc = true); - -template bool removeScaling - (Matrix33 &mat, - bool exc = true); - -template bool extractScalingAndShear - (const Matrix33 &mat, - Vec2 &scl, - T &h, - bool exc = true); - -template Matrix33 sansScalingAndShear - (const Matrix33 &mat, - bool exc = true); - -template bool removeScalingAndShear - (Matrix33 &mat, - bool exc = true); - -template bool extractAndRemoveScalingAndShear - (Matrix33 &mat, - Vec2 &scl, - T &shr, - bool exc = true); - -template void extractEuler - (const Matrix33 &mat, - T &rot); - -template bool extractSHRT (const Matrix33 &mat, - Vec2 &s, - T &h, - T &r, - Vec2 &t, - bool exc = true); - -template bool checkForZeroScaleInRow - (const T &scl, - const Vec2 &row, - bool exc = true); - -template Matrix33 outerProduct - ( const Vec3 &a, - const Vec3 &b); - - -//----------------------------------------------------------------------------- -// Implementation for 4x4 Matrix -//------------------------------ - - -template -bool -extractScaling (const Matrix44 &mat, Vec3 &scl, bool exc) -{ - Vec3 shr; - Matrix44 M (mat); - - if (! extractAndRemoveScalingAndShear (M, scl, shr, exc)) - return false; - - return true; -} - - -template -Matrix44 -sansScaling (const Matrix44 &mat, bool exc) -{ - Vec3 scl; - Vec3 shr; - Vec3 rot; - Vec3 tran; - - if (! extractSHRT (mat, scl, shr, rot, tran, exc)) - return mat; - - Matrix44 M; - - M.translate (tran); - M.rotate (rot); - M.shear (shr); - - return M; -} - - -template -bool -removeScaling (Matrix44 &mat, bool exc) -{ - Vec3 scl; - Vec3 shr; - Vec3 rot; - Vec3 tran; - - if (! extractSHRT (mat, scl, shr, rot, tran, exc)) - return false; - - mat.makeIdentity (); - mat.translate (tran); - mat.rotate (rot); - mat.shear (shr); - - return true; -} - - -template -bool -extractScalingAndShear (const Matrix44 &mat, - Vec3 &scl, Vec3 &shr, bool exc) -{ - Matrix44 M (mat); - - if (! extractAndRemoveScalingAndShear (M, scl, shr, exc)) - return false; - - return true; -} - - -template -Matrix44 -sansScalingAndShear (const Matrix44 &mat, bool exc) -{ - Vec3 scl; - Vec3 shr; - Matrix44 M (mat); - - if (! extractAndRemoveScalingAndShear (M, scl, shr, exc)) - return mat; - - return M; -} - - -template -void -sansScalingAndShear (Matrix44 &result, const Matrix44 &mat, bool exc) -{ - Vec3 scl; - Vec3 shr; - - if (! extractAndRemoveScalingAndShear (result, scl, shr, exc)) - result = mat; -} - - -template -bool -removeScalingAndShear (Matrix44 &mat, bool exc) -{ - Vec3 scl; - Vec3 shr; - - if (! extractAndRemoveScalingAndShear (mat, scl, shr, exc)) - return false; - - return true; -} - - -template -bool -extractAndRemoveScalingAndShear (Matrix44 &mat, - Vec3 &scl, Vec3 &shr, bool exc) -{ - // - // This implementation follows the technique described in the paper by - // Spencer W. Thomas in the Graphics Gems II article: "Decomposing a - // Matrix into Simple Transformations", p. 320. - // - - Vec3 row[3]; - - row[0] = Vec3 (mat[0][0], mat[0][1], mat[0][2]); - row[1] = Vec3 (mat[1][0], mat[1][1], mat[1][2]); - row[2] = Vec3 (mat[2][0], mat[2][1], mat[2][2]); - - T maxVal = 0; - for (int i=0; i < 3; i++) - for (int j=0; j < 3; j++) - if (IMATH_INTERNAL_NAMESPACE::abs (row[i][j]) > maxVal) - maxVal = IMATH_INTERNAL_NAMESPACE::abs (row[i][j]); - - // - // We normalize the 3x3 matrix here. - // It was noticed that this can improve numerical stability significantly, - // especially when many of the upper 3x3 matrix's coefficients are very - // close to zero; we correct for this step at the end by multiplying the - // scaling factors by maxVal at the end (shear and rotation are not - // affected by the normalization). - - if (maxVal != 0) - { - for (int i=0; i < 3; i++) - if (! checkForZeroScaleInRow (maxVal, row[i], exc)) - return false; - else - row[i] /= maxVal; - } - - // Compute X scale factor. - scl.x = row[0].length (); - if (! checkForZeroScaleInRow (scl.x, row[0], exc)) - return false; - - // Normalize first row. - row[0] /= scl.x; - - // An XY shear factor will shear the X coord. as the Y coord. changes. - // There are 6 combinations (XY, XZ, YZ, YX, ZX, ZY), although we only - // extract the first 3 because we can effect the last 3 by shearing in - // XY, XZ, YZ combined rotations and scales. - // - // shear matrix < 1, YX, ZX, 0, - // XY, 1, ZY, 0, - // XZ, YZ, 1, 0, - // 0, 0, 0, 1 > - - // Compute XY shear factor and make 2nd row orthogonal to 1st. - shr[0] = row[0].dot (row[1]); - row[1] -= shr[0] * row[0]; - - // Now, compute Y scale. - scl.y = row[1].length (); - if (! checkForZeroScaleInRow (scl.y, row[1], exc)) - return false; - - // Normalize 2nd row and correct the XY shear factor for Y scaling. - row[1] /= scl.y; - shr[0] /= scl.y; - - // Compute XZ and YZ shears, orthogonalize 3rd row. - shr[1] = row[0].dot (row[2]); - row[2] -= shr[1] * row[0]; - shr[2] = row[1].dot (row[2]); - row[2] -= shr[2] * row[1]; - - // Next, get Z scale. - scl.z = row[2].length (); - if (! checkForZeroScaleInRow (scl.z, row[2], exc)) - return false; - - // Normalize 3rd row and correct the XZ and YZ shear factors for Z scaling. - row[2] /= scl.z; - shr[1] /= scl.z; - shr[2] /= scl.z; - - // At this point, the upper 3x3 matrix in mat is orthonormal. - // Check for a coordinate system flip. If the determinant - // is less than zero, then negate the matrix and the scaling factors. - if (row[0].dot (row[1].cross (row[2])) < 0) - for (int i=0; i < 3; i++) - { - scl[i] *= -1; - row[i] *= -1; - } - - // Copy over the orthonormal rows into the returned matrix. - // The upper 3x3 matrix in mat is now a rotation matrix. - for (int i=0; i < 3; i++) - { - mat[i][0] = row[i][0]; - mat[i][1] = row[i][1]; - mat[i][2] = row[i][2]; - } - - // Correct the scaling factors for the normalization step that we - // performed above; shear and rotation are not affected by the - // normalization. - scl *= maxVal; - - return true; -} - - -template -void -extractEulerXYZ (const Matrix44 &mat, Vec3 &rot) -{ - // - // Normalize the local x, y and z axes to remove scaling. - // - - Vec3 i (mat[0][0], mat[0][1], mat[0][2]); - Vec3 j (mat[1][0], mat[1][1], mat[1][2]); - Vec3 k (mat[2][0], mat[2][1], mat[2][2]); - - i.normalize(); - j.normalize(); - k.normalize(); - - Matrix44 M (i[0], i[1], i[2], 0, - j[0], j[1], j[2], 0, - k[0], k[1], k[2], 0, - 0, 0, 0, 1); - - // - // Extract the first angle, rot.x. - // - - rot.x = Math::atan2 (M[1][2], M[2][2]); - - // - // Remove the rot.x rotation from M, so that the remaining - // rotation, N, is only around two axes, and gimbal lock - // cannot occur. - // - - Matrix44 N; - N.rotate (Vec3 (-rot.x, 0, 0)); - N = N * M; - - // - // Extract the other two angles, rot.y and rot.z, from N. - // - - T cy = Math::sqrt (N[0][0]*N[0][0] + N[0][1]*N[0][1]); - rot.y = Math::atan2 (-N[0][2], cy); - rot.z = Math::atan2 (-N[1][0], N[1][1]); -} - - -template -void -extractEulerZYX (const Matrix44 &mat, Vec3 &rot) -{ - // - // Normalize the local x, y and z axes to remove scaling. - // - - Vec3 i (mat[0][0], mat[0][1], mat[0][2]); - Vec3 j (mat[1][0], mat[1][1], mat[1][2]); - Vec3 k (mat[2][0], mat[2][1], mat[2][2]); - - i.normalize(); - j.normalize(); - k.normalize(); - - Matrix44 M (i[0], i[1], i[2], 0, - j[0], j[1], j[2], 0, - k[0], k[1], k[2], 0, - 0, 0, 0, 1); - - // - // Extract the first angle, rot.x. - // - - rot.x = -Math::atan2 (M[1][0], M[0][0]); - - // - // Remove the x rotation from M, so that the remaining - // rotation, N, is only around two axes, and gimbal lock - // cannot occur. - // - - Matrix44 N; - N.rotate (Vec3 (0, 0, -rot.x)); - N = N * M; - - // - // Extract the other two angles, rot.y and rot.z, from N. - // - - T cy = Math::sqrt (N[2][2]*N[2][2] + N[2][1]*N[2][1]); - rot.y = -Math::atan2 (-N[2][0], cy); - rot.z = -Math::atan2 (-N[1][2], N[1][1]); -} - - -template -Quat -extractQuat (const Matrix44 &mat) -{ - Matrix44 rot; - - T tr, s; - T q[4]; - int i, j, k; - Quat quat; - - int nxt[3] = {1, 2, 0}; - tr = mat[0][0] + mat[1][1] + mat[2][2]; - - // check the diagonal - if (tr > 0.0) { - s = Math::sqrt (tr + T(1.0)); - quat.r = s / T(2.0); - s = T(0.5) / s; - - quat.v.x = (mat[1][2] - mat[2][1]) * s; - quat.v.y = (mat[2][0] - mat[0][2]) * s; - quat.v.z = (mat[0][1] - mat[1][0]) * s; - } - else { - // diagonal is negative - i = 0; - if (mat[1][1] > mat[0][0]) - i=1; - if (mat[2][2] > mat[i][i]) - i=2; - - j = nxt[i]; - k = nxt[j]; - s = Math::sqrt ((mat[i][i] - (mat[j][j] + mat[k][k])) + T(1.0)); - - q[i] = s * T(0.5); - if (s != T(0.0)) - s = T(0.5) / s; - - q[3] = (mat[j][k] - mat[k][j]) * s; - q[j] = (mat[i][j] + mat[j][i]) * s; - q[k] = (mat[i][k] + mat[k][i]) * s; - - quat.v.x = q[0]; - quat.v.y = q[1]; - quat.v.z = q[2]; - quat.r = q[3]; - } - - return quat; -} - -template -bool -extractSHRT (const Matrix44 &mat, - Vec3 &s, - Vec3 &h, - Vec3 &r, - Vec3 &t, - bool exc /* = true */ , - typename Euler::Order rOrder /* = Euler::XYZ */ ) -{ - Matrix44 rot; - - rot = mat; - if (! extractAndRemoveScalingAndShear (rot, s, h, exc)) - return false; - - extractEulerXYZ (rot, r); - - t.x = mat[3][0]; - t.y = mat[3][1]; - t.z = mat[3][2]; - - if (rOrder != Euler::XYZ) - { - IMATH_INTERNAL_NAMESPACE::Euler eXYZ (r, IMATH_INTERNAL_NAMESPACE::Euler::XYZ); - IMATH_INTERNAL_NAMESPACE::Euler e (eXYZ, rOrder); - r = e.toXYZVector (); - } - - return true; -} - -template -bool -extractSHRT (const Matrix44 &mat, - Vec3 &s, - Vec3 &h, - Vec3 &r, - Vec3 &t, - bool exc) -{ - return extractSHRT(mat, s, h, r, t, exc, IMATH_INTERNAL_NAMESPACE::Euler::XYZ); -} - -template -bool -extractSHRT (const Matrix44 &mat, - Vec3 &s, - Vec3 &h, - Euler &r, - Vec3 &t, - bool exc /* = true */) -{ - return extractSHRT (mat, s, h, r, t, exc, r.order ()); -} - - -template -bool -checkForZeroScaleInRow (const T& scl, - const Vec3 &row, - bool exc /* = true */ ) -{ - for (int i = 0; i < 3; i++) - { - if ((abs (scl) < 1 && abs (row[i]) >= limits::max() * abs (scl))) - { - if (exc) - throw IMATH_INTERNAL_NAMESPACE::ZeroScaleExc ("Cannot remove zero scaling " - "from matrix."); - else - return false; - } - } - - return true; -} - -template -Matrix44 -outerProduct (const Vec4 &a, const Vec4 &b ) -{ - return Matrix44 (a.x*b.x, a.x*b.y, a.x*b.z, a.x*b.w, - a.y*b.x, a.y*b.y, a.y*b.z, a.x*b.w, - a.z*b.x, a.z*b.y, a.z*b.z, a.x*b.w, - a.w*b.x, a.w*b.y, a.w*b.z, a.w*b.w); -} - -template -Matrix44 -rotationMatrix (const Vec3 &from, const Vec3 &to) -{ - Quat q; - q.setRotation(from, to); - return q.toMatrix44(); -} - - -template -Matrix44 -rotationMatrixWithUpDir (const Vec3 &fromDir, - const Vec3 &toDir, - const Vec3 &upDir) -{ - // - // The goal is to obtain a rotation matrix that takes - // "fromDir" to "toDir". We do this in two steps and - // compose the resulting rotation matrices; - // (a) rotate "fromDir" into the z-axis - // (b) rotate the z-axis into "toDir" - // - - // The from direction must be non-zero; but we allow zero to and up dirs. - if (fromDir.length () == 0) - return Matrix44 (); - - else - { - Matrix44 zAxis2FromDir( IMATH_INTERNAL_NAMESPACE::UNINITIALIZED ); - alignZAxisWithTargetDir (zAxis2FromDir, fromDir, Vec3 (0, 1, 0)); - - Matrix44 fromDir2zAxis = zAxis2FromDir.transposed (); - - Matrix44 zAxis2ToDir( IMATH_INTERNAL_NAMESPACE::UNINITIALIZED ); - alignZAxisWithTargetDir (zAxis2ToDir, toDir, upDir); - - return fromDir2zAxis * zAxis2ToDir; - } -} - - -template -void -alignZAxisWithTargetDir (Matrix44 &result, Vec3 targetDir, Vec3 upDir) -{ - // - // Ensure that the target direction is non-zero. - // - - if ( targetDir.length () == 0 ) - targetDir = Vec3 (0, 0, 1); - - // - // Ensure that the up direction is non-zero. - // - - if ( upDir.length () == 0 ) - upDir = Vec3 (0, 1, 0); - - // - // Check for degeneracies. If the upDir and targetDir are parallel - // or opposite, then compute a new, arbitrary up direction that is - // not parallel or opposite to the targetDir. - // - - if (upDir.cross (targetDir).length () == 0) - { - upDir = targetDir.cross (Vec3 (1, 0, 0)); - if (upDir.length() == 0) - upDir = targetDir.cross(Vec3 (0, 0, 1)); - } - - // - // Compute the x-, y-, and z-axis vectors of the new coordinate system. - // - - Vec3 targetPerpDir = upDir.cross (targetDir); - Vec3 targetUpDir = targetDir.cross (targetPerpDir); - - // - // Rotate the x-axis into targetPerpDir (row 0), - // rotate the y-axis into targetUpDir (row 1), - // rotate the z-axis into targetDir (row 2). - // - - Vec3 row[3]; - row[0] = targetPerpDir.normalized (); - row[1] = targetUpDir .normalized (); - row[2] = targetDir .normalized (); - - result.x[0][0] = row[0][0]; - result.x[0][1] = row[0][1]; - result.x[0][2] = row[0][2]; - result.x[0][3] = (T)0; - - result.x[1][0] = row[1][0]; - result.x[1][1] = row[1][1]; - result.x[1][2] = row[1][2]; - result.x[1][3] = (T)0; - - result.x[2][0] = row[2][0]; - result.x[2][1] = row[2][1]; - result.x[2][2] = row[2][2]; - result.x[2][3] = (T)0; - - result.x[3][0] = (T)0; - result.x[3][1] = (T)0; - result.x[3][2] = (T)0; - result.x[3][3] = (T)1; -} - - -// Compute an orthonormal direct frame from : a position, an x axis direction and a normal to the y axis -// If the x axis and normal are perpendicular, then the normal will have the same direction as the z axis. -// Inputs are : -// -the position of the frame -// -the x axis direction of the frame -// -a normal to the y axis of the frame -// Return is the orthonormal frame -template -Matrix44 -computeLocalFrame( const Vec3& p, - const Vec3& xDir, - const Vec3& normal) -{ - Vec3 _xDir(xDir); - Vec3 x = _xDir.normalize(); - Vec3 y = (normal % x).normalize(); - Vec3 z = (x % y).normalize(); - - Matrix44 L; - L[0][0] = x[0]; - L[0][1] = x[1]; - L[0][2] = x[2]; - L[0][3] = 0.0; - - L[1][0] = y[0]; - L[1][1] = y[1]; - L[1][2] = y[2]; - L[1][3] = 0.0; - - L[2][0] = z[0]; - L[2][1] = z[1]; - L[2][2] = z[2]; - L[2][3] = 0.0; - - L[3][0] = p[0]; - L[3][1] = p[1]; - L[3][2] = p[2]; - L[3][3] = 1.0; - - return L; -} - -// Add a translate/rotate/scale offset to an input frame -// and put it in another frame of reference -// Inputs are : -// - input frame -// - translate offset -// - rotate offset in degrees -// - scale offset -// - frame of reference -// Output is the offsetted frame -template -Matrix44 -addOffset( const Matrix44& inMat, - const Vec3& tOffset, - const Vec3& rOffset, - const Vec3& sOffset, - const Matrix44& ref) -{ - Matrix44 O; - - Vec3 _rOffset(rOffset); - _rOffset *= M_PI / 180.0; - O.rotate (_rOffset); - - O[3][0] = tOffset[0]; - O[3][1] = tOffset[1]; - O[3][2] = tOffset[2]; - - Matrix44 S; - S.scale (sOffset); - - Matrix44 X = S * O * inMat * ref; - - return X; -} - -// Compute Translate/Rotate/Scale matrix from matrix A with the Rotate/Scale of Matrix B -// Inputs are : -// -keepRotateA : if true keep rotate from matrix A, use B otherwise -// -keepScaleA : if true keep scale from matrix A, use B otherwise -// -Matrix A -// -Matrix B -// Return Matrix A with tweaked rotation/scale -template -Matrix44 -computeRSMatrix( bool keepRotateA, - bool keepScaleA, - const Matrix44& A, - const Matrix44& B) -{ - Vec3 as, ah, ar, at; - extractSHRT (A, as, ah, ar, at); - - Vec3 bs, bh, br, bt; - extractSHRT (B, bs, bh, br, bt); - - if (!keepRotateA) - ar = br; - - if (!keepScaleA) - as = bs; - - Matrix44 mat; - mat.makeIdentity(); - mat.translate (at); - mat.rotate (ar); - mat.scale (as); - - return mat; -} - - - -//----------------------------------------------------------------------------- -// Implementation for 3x3 Matrix -//------------------------------ - - -template -bool -extractScaling (const Matrix33 &mat, Vec2 &scl, bool exc) -{ - T shr; - Matrix33 M (mat); - - if (! extractAndRemoveScalingAndShear (M, scl, shr, exc)) - return false; - - return true; -} - - -template -Matrix33 -sansScaling (const Matrix33 &mat, bool exc) -{ - Vec2 scl; - T shr; - T rot; - Vec2 tran; - - if (! extractSHRT (mat, scl, shr, rot, tran, exc)) - return mat; - - Matrix33 M; - - M.translate (tran); - M.rotate (rot); - M.shear (shr); - - return M; -} - - -template -bool -removeScaling (Matrix33 &mat, bool exc) -{ - Vec2 scl; - T shr; - T rot; - Vec2 tran; - - if (! extractSHRT (mat, scl, shr, rot, tran, exc)) - return false; - - mat.makeIdentity (); - mat.translate (tran); - mat.rotate (rot); - mat.shear (shr); - - return true; -} - - -template -bool -extractScalingAndShear (const Matrix33 &mat, Vec2 &scl, T &shr, bool exc) -{ - Matrix33 M (mat); - - if (! extractAndRemoveScalingAndShear (M, scl, shr, exc)) - return false; - - return true; -} - - -template -Matrix33 -sansScalingAndShear (const Matrix33 &mat, bool exc) -{ - Vec2 scl; - T shr; - Matrix33 M (mat); - - if (! extractAndRemoveScalingAndShear (M, scl, shr, exc)) - return mat; - - return M; -} - - -template -bool -removeScalingAndShear (Matrix33 &mat, bool exc) -{ - Vec2 scl; - T shr; - - if (! extractAndRemoveScalingAndShear (mat, scl, shr, exc)) - return false; - - return true; -} - -template -bool -extractAndRemoveScalingAndShear (Matrix33 &mat, - Vec2 &scl, T &shr, bool exc) -{ - Vec2 row[2]; - - row[0] = Vec2 (mat[0][0], mat[0][1]); - row[1] = Vec2 (mat[1][0], mat[1][1]); - - T maxVal = 0; - for (int i=0; i < 2; i++) - for (int j=0; j < 2; j++) - if (IMATH_INTERNAL_NAMESPACE::abs (row[i][j]) > maxVal) - maxVal = IMATH_INTERNAL_NAMESPACE::abs (row[i][j]); - - // - // We normalize the 2x2 matrix here. - // It was noticed that this can improve numerical stability significantly, - // especially when many of the upper 2x2 matrix's coefficients are very - // close to zero; we correct for this step at the end by multiplying the - // scaling factors by maxVal at the end (shear and rotation are not - // affected by the normalization). - - if (maxVal != 0) - { - for (int i=0; i < 2; i++) - if (! checkForZeroScaleInRow (maxVal, row[i], exc)) - return false; - else - row[i] /= maxVal; - } - - // Compute X scale factor. - scl.x = row[0].length (); - if (! checkForZeroScaleInRow (scl.x, row[0], exc)) - return false; - - // Normalize first row. - row[0] /= scl.x; - - // An XY shear factor will shear the X coord. as the Y coord. changes. - // There are 2 combinations (XY, YX), although we only extract the XY - // shear factor because we can effect the an YX shear factor by - // shearing in XY combined with rotations and scales. - // - // shear matrix < 1, YX, 0, - // XY, 1, 0, - // 0, 0, 1 > - - // Compute XY shear factor and make 2nd row orthogonal to 1st. - shr = row[0].dot (row[1]); - row[1] -= shr * row[0]; - - // Now, compute Y scale. - scl.y = row[1].length (); - if (! checkForZeroScaleInRow (scl.y, row[1], exc)) - return false; - - // Normalize 2nd row and correct the XY shear factor for Y scaling. - row[1] /= scl.y; - shr /= scl.y; - - // At this point, the upper 2x2 matrix in mat is orthonormal. - // Check for a coordinate system flip. If the determinant - // is -1, then flip the rotation matrix and adjust the scale(Y) - // and shear(XY) factors to compensate. - if (row[0][0] * row[1][1] - row[0][1] * row[1][0] < 0) - { - row[1][0] *= -1; - row[1][1] *= -1; - scl[1] *= -1; - shr *= -1; - } - - // Copy over the orthonormal rows into the returned matrix. - // The upper 2x2 matrix in mat is now a rotation matrix. - for (int i=0; i < 2; i++) - { - mat[i][0] = row[i][0]; - mat[i][1] = row[i][1]; - } - - scl *= maxVal; - - return true; -} - - -template -void -extractEuler (const Matrix33 &mat, T &rot) -{ - // - // Normalize the local x and y axes to remove scaling. - // - - Vec2 i (mat[0][0], mat[0][1]); - Vec2 j (mat[1][0], mat[1][1]); - - i.normalize(); - j.normalize(); - - // - // Extract the angle, rot. - // - - rot = - Math::atan2 (j[0], i[0]); -} - - -template -bool -extractSHRT (const Matrix33 &mat, - Vec2 &s, - T &h, - T &r, - Vec2 &t, - bool exc) -{ - Matrix33 rot; - - rot = mat; - if (! extractAndRemoveScalingAndShear (rot, s, h, exc)) - return false; - - extractEuler (rot, r); - - t.x = mat[2][0]; - t.y = mat[2][1]; - - return true; -} - - -template -bool -checkForZeroScaleInRow (const T& scl, - const Vec2 &row, - bool exc /* = true */ ) -{ - for (int i = 0; i < 2; i++) - { - if ((abs (scl) < 1 && abs (row[i]) >= limits::max() * abs (scl))) - { - if (exc) - throw IMATH_INTERNAL_NAMESPACE::ZeroScaleExc ( - "Cannot remove zero scaling from matrix."); - else - return false; - } - } - - return true; -} - - -template -Matrix33 -outerProduct (const Vec3 &a, const Vec3 &b ) -{ - return Matrix33 (a.x*b.x, a.x*b.y, a.x*b.z, - a.y*b.x, a.y*b.y, a.y*b.z, - a.z*b.x, a.z*b.y, a.z*b.z ); -} - - -// Computes the translation and rotation that brings the 'from' points -// as close as possible to the 'to' points under the Frobenius norm. -// To be more specific, let x be the matrix of 'from' points and y be -// the matrix of 'to' points, we want to find the matrix A of the form -// [ R t ] -// [ 0 1 ] -// that minimizes -// || (A*x - y)^T * W * (A*x - y) ||_F -// If doScaling is true, then a uniform scale is allowed also. -template -IMATH_INTERNAL_NAMESPACE::M44d -procrustesRotationAndTranslation (const IMATH_INTERNAL_NAMESPACE::Vec3* A, // From these - const IMATH_INTERNAL_NAMESPACE::Vec3* B, // To these - const T* weights, - const size_t numPoints, - const bool doScaling = false); - -// Unweighted: -template -IMATH_INTERNAL_NAMESPACE::M44d -procrustesRotationAndTranslation (const IMATH_INTERNAL_NAMESPACE::Vec3* A, - const IMATH_INTERNAL_NAMESPACE::Vec3* B, - const size_t numPoints, - const bool doScaling = false); - -// Compute the SVD of a 3x3 matrix using Jacobi transformations. This method -// should be quite accurate (competitive with LAPACK) even for poorly -// conditioned matrices, and because it has been written specifically for the -// 3x3/4x4 case it is much faster than calling out to LAPACK. -// -// The SVD of a 3x3/4x4 matrix A is defined as follows: -// A = U * S * V^T -// where S is the diagonal matrix of singular values and both U and V are -// orthonormal. By convention, the entries S are all positive and sorted from -// the largest to the smallest. However, some uses of this function may -// require that the matrix U*V^T have positive determinant; in this case, we -// may make the smallest singular value negative to ensure that this is -// satisfied. -// -// Currently only available for single- and double-precision matrices. -template -void -jacobiSVD (const IMATH_INTERNAL_NAMESPACE::Matrix33& A, - IMATH_INTERNAL_NAMESPACE::Matrix33& U, - IMATH_INTERNAL_NAMESPACE::Vec3& S, - IMATH_INTERNAL_NAMESPACE::Matrix33& V, - const T tol = IMATH_INTERNAL_NAMESPACE::limits::epsilon(), - const bool forcePositiveDeterminant = false); - -template -void -jacobiSVD (const IMATH_INTERNAL_NAMESPACE::Matrix44& A, - IMATH_INTERNAL_NAMESPACE::Matrix44& U, - IMATH_INTERNAL_NAMESPACE::Vec4& S, - IMATH_INTERNAL_NAMESPACE::Matrix44& V, - const T tol = IMATH_INTERNAL_NAMESPACE::limits::epsilon(), - const bool forcePositiveDeterminant = false); - -// Compute the eigenvalues (S) and the eigenvectors (V) of -// a real symmetric matrix using Jacobi transformation. -// -// Jacobi transformation of a 3x3/4x4 matrix A outputs S and V: -// A = V * S * V^T -// where V is orthonormal and S is the diagonal matrix of eigenvalues. -// Input matrix A must be symmetric. A is also modified during -// the computation so that upper diagonal entries of A become zero. -// -template -void -jacobiEigenSolver (Matrix33& A, - Vec3& S, - Matrix33& V, - const T tol); - -template -inline -void -jacobiEigenSolver (Matrix33& A, - Vec3& S, - Matrix33& V) -{ - jacobiEigenSolver(A,S,V,limits::epsilon()); -} - -template -void -jacobiEigenSolver (Matrix44& A, - Vec4& S, - Matrix44& V, - const T tol); - -template -inline -void -jacobiEigenSolver (Matrix44& A, - Vec4& S, - Matrix44& V) -{ - jacobiEigenSolver(A,S,V,limits::epsilon()); -} - -// Compute a eigenvector corresponding to the abs max/min eigenvalue -// of a real symmetric matrix using Jacobi transformation. -template -void -maxEigenVector (TM& A, TV& S); -template -void -minEigenVector (TM& A, TV& S); - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHMATRIXALGO_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathNamespace.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathNamespace.h deleted file mode 100644 index c1fb993..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathNamespace.h +++ /dev/null @@ -1,115 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMATHNAMESPACE_H -#define INCLUDED_IMATHNAMESPACE_H - -// -// The purpose of this file is to make it possible to specify an -// IMATH_INTERNAL_NAMESPACE as a preprocessor definition and have all of the -// Imath symbols defined within that namespace rather than the standard -// Imath namespace. Those symbols are made available to client code through -// the IMATH_NAMESPACE in addition to the IMATH_INTERNAL_NAMESPACE. -// -// To ensure source code compatibility, the IMATH_NAMESPACE defaults to Imath -// and then "using namespace IMATH_INTERNAL_NAMESPACE;" brings all of the -// declarations from the IMATH_INTERNAL_NAMESPACE into the IMATH_NAMESPACE. -// This means that client code can continue to use syntax like Imath::V3f, -// but at link time it will resolve to a mangled symbol based on the -// IMATH_INTERNAL_NAMESPACE. -// -// As an example, if one needed to build against a newer version of Imath and -// have it run alongside an older version in the same application, it is now -// possible to use an internal namespace to prevent collisions between the -// older versions of Imath symbols and the newer ones. To do this, the -// following could be defined at build time: -// -// IMATH_INTERNAL_NAMESPACE = Imath_v2 -// -// This means that declarations inside Imath headers look like this (after -// the preprocessor has done its work): -// -// namespace Imath_v2 { -// ... -// class declarations -// ... -// } -// -// namespace Imath { -// using namespace Imath_v2; -// } -// - -// -// Open Source version of this file pulls in the IlmBaseConfig.h file -// for the configure time options. -// -#include "IlmBaseConfig.h" - - -#ifndef IMATH_NAMESPACE -#define IMATH_NAMESPACE Imath -#endif - -#ifndef IMATH_INTERNAL_NAMESPACE -#define IMATH_INTERNAL_NAMESPACE IMATH_NAMESPACE -#endif - -// -// We need to be sure that we import the internal namespace into the public one. -// To do this, we use the small bit of code below which initially defines -// IMATH_INTERNAL_NAMESPACE (so it can be referenced) and then defines -// IMATH_NAMESPACE and pulls the internal symbols into the public -// namespace. -// - -namespace IMATH_INTERNAL_NAMESPACE {} -namespace IMATH_NAMESPACE { - using namespace IMATH_INTERNAL_NAMESPACE; -} - -// -// There are identical pairs of HEADER/SOURCE ENTER/EXIT macros so that -// future extension to the namespace mechanism is possible without changing -// project source code. -// - -#define IMATH_INTERNAL_NAMESPACE_HEADER_ENTER namespace IMATH_INTERNAL_NAMESPACE { -#define IMATH_INTERNAL_NAMESPACE_HEADER_EXIT } - -#define IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER namespace IMATH_INTERNAL_NAMESPACE { -#define IMATH_INTERNAL_NAMESPACE_SOURCE_EXIT } - - -#endif /* INCLUDED_IMATHNAMESPACE_H */ diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathPlane.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathPlane.h deleted file mode 100644 index 7272d67..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathPlane.h +++ /dev/null @@ -1,257 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHPLANE_H -#define INCLUDED_IMATHPLANE_H - -//---------------------------------------------------------------------- -// -// template class Plane3 -// -// The Imath::Plane3<> class represents a half space, so the -// normal may point either towards or away from origin. The -// plane P can be represented by Imath::Plane3 as either p or -p -// corresponding to the two half-spaces on either side of the -// plane. Any function which computes a distance will return -// either negative or positive values for the distance indicating -// which half-space the point is in. Note that reflection, and -// intersection functions will operate as expected. -// -//---------------------------------------------------------------------- - -#include "ImathVec.h" -#include "ImathLine.h" -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -template -class Plane3 -{ - public: - - Vec3 normal; - T distance; - - Plane3() {} - Plane3(const Vec3 &normal, T distance); - Plane3(const Vec3 &point, const Vec3 &normal); - Plane3(const Vec3 &point1, - const Vec3 &point2, - const Vec3 &point3); - - //---------------------- - // Various set methods - //---------------------- - - void set(const Vec3 &normal, - T distance); - - void set(const Vec3 &point, - const Vec3 &normal); - - void set(const Vec3 &point1, - const Vec3 &point2, - const Vec3 &point3 ); - - //---------------------- - // Utilities - //---------------------- - - bool intersect(const Line3 &line, - Vec3 &intersection) const; - - bool intersectT(const Line3 &line, - T ¶meter) const; - - T distanceTo(const Vec3 &) const; - - Vec3 reflectPoint(const Vec3 &) const; - Vec3 reflectVector(const Vec3 &) const; -}; - - -//-------------------- -// Convenient typedefs -//-------------------- - -typedef Plane3 Plane3f; -typedef Plane3 Plane3d; - - -//--------------- -// Implementation -//--------------- - -template -inline Plane3::Plane3(const Vec3 &p0, - const Vec3 &p1, - const Vec3 &p2) -{ - set(p0,p1,p2); -} - -template -inline Plane3::Plane3(const Vec3 &n, T d) -{ - set(n, d); -} - -template -inline Plane3::Plane3(const Vec3 &p, const Vec3 &n) -{ - set(p, n); -} - -template -inline void Plane3::set(const Vec3& point1, - const Vec3& point2, - const Vec3& point3) -{ - normal = (point2 - point1) % (point3 - point1); - normal.normalize(); - distance = normal ^ point1; -} - -template -inline void Plane3::set(const Vec3& point, const Vec3& n) -{ - normal = n; - normal.normalize(); - distance = normal ^ point; -} - -template -inline void Plane3::set(const Vec3& n, T d) -{ - normal = n; - normal.normalize(); - distance = d; -} - -template -inline T Plane3::distanceTo(const Vec3 &point) const -{ - return (point ^ normal) - distance; -} - -template -inline Vec3 Plane3::reflectPoint(const Vec3 &point) const -{ - return normal * distanceTo(point) * -2.0 + point; -} - - -template -inline Vec3 Plane3::reflectVector(const Vec3 &v) const -{ - return normal * (normal ^ v) * 2.0 - v; -} - - -template -inline bool Plane3::intersect(const Line3& line, Vec3& point) const -{ - T d = normal ^ line.dir; - if ( d == 0.0 ) return false; - T t = - ((normal ^ line.pos) - distance) / d; - point = line(t); - return true; -} - -template -inline bool Plane3::intersectT(const Line3& line, T &t) const -{ - T d = normal ^ line.dir; - if ( d == 0.0 ) return false; - t = - ((normal ^ line.pos) - distance) / d; - return true; -} - -template -std::ostream &operator<< (std::ostream &o, const Plane3 &plane) -{ - return o << "(" << plane.normal << ", " << plane.distance - << ")"; -} - -template -Plane3 operator* (const Plane3 &plane, const Matrix44 &M) -{ - // T - // -1 - // Could also compute M but that would suck. - // - - Vec3 dir1 = Vec3 (1, 0, 0) % plane.normal; - T dir1Len = dir1 ^ dir1; - - Vec3 tmp = Vec3 (0, 1, 0) % plane.normal; - T tmpLen = tmp ^ tmp; - - if (tmpLen > dir1Len) - { - dir1 = tmp; - dir1Len = tmpLen; - } - - tmp = Vec3 (0, 0, 1) % plane.normal; - tmpLen = tmp ^ tmp; - - if (tmpLen > dir1Len) - { - dir1 = tmp; - } - - Vec3 dir2 = dir1 % plane.normal; - Vec3 point = plane.distance * plane.normal; - - return Plane3 ( point * M, - (point + dir2) * M, - (point + dir1) * M ); -} - -template -Plane3 operator- (const Plane3 &plane) -{ - return Plane3(-plane.normal,-plane.distance); -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHPLANE_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathPlatform.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathPlatform.h deleted file mode 100644 index 91e82cc..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathPlatform.h +++ /dev/null @@ -1,112 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_IMATHPLATFORM_H -#define INCLUDED_IMATHPLATFORM_H - -//---------------------------------------------------------------------------- -// -// ImathPlatform.h -// -// This file contains functions and constants which aren't -// provided by the system libraries, compilers, or includes on -// certain platforms. -// -//---------------------------------------------------------------------------- - -#include - -#ifndef M_PI - #define M_PI 3.14159265358979323846 -#endif - -#ifndef M_PI_2 - #define M_PI_2 1.57079632679489661923 // pi/2 -#endif - - -//----------------------------------------------------------------------------- -// -// Some, but not all, C++ compilers support the C99 restrict -// keyword or some variant of it, for example, __restrict. -// -//----------------------------------------------------------------------------- - -#if defined __GNUC__ - - // - // supports __restrict - // - - #define IMATH_RESTRICT __restrict - -#elif defined (__INTEL_COMPILER) || \ - defined(__ICL) || \ - defined(__ICC) || \ - defined(__ECC) - - // - // supports restrict - // - - #define IMATH_RESTRICT restrict - -#elif defined __sgi - - // - // supports restrict - // - - #define IMATH_RESTRICT restrict - -#elif defined _MSC_VER - - // - // supports __restrict - // - -// #define IMATH_RESTRICT __restrict - #define IMATH_RESTRICT - -#else - - // - // restrict / __restrict not supported - // - - #define IMATH_RESTRICT - -#endif - -#endif // INCLUDED_IMATHPLATFORM_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathQuat.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathQuat.h deleted file mode 100644 index e95e356..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathQuat.h +++ /dev/null @@ -1,964 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHQUAT_H -#define INCLUDED_IMATHQUAT_H - -//---------------------------------------------------------------------- -// -// template class Quat -// -// "Quaternions came from Hamilton ... and have been an unmixed -// evil to those who have touched them in any way. Vector is a -// useless survival ... and has never been of the slightest use -// to any creature." -// -// - Lord Kelvin -// -// This class implements the quaternion numerical type -- you -// will probably want to use this class to represent orientations -// in R3 and to convert between various euler angle reps. You -// should probably use Imath::Euler<> for that. -// -//---------------------------------------------------------------------- - -#include "ImathExc.h" -#include "ImathMatrix.h" -#include "ImathNamespace.h" - -#include - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -// Disable MS VC++ warnings about conversion from double to float -#pragma warning(disable:4244) -#endif - -template -class Quat -{ - public: - - T r; // real part - Vec3 v; // imaginary vector - - - //----------------------------------------------------- - // Constructors - default constructor is identity quat - //----------------------------------------------------- - - Quat (); - - template - Quat (const Quat &q); - - Quat (T s, T i, T j, T k); - - Quat (T s, Vec3 d); - - static Quat identity (); - - - //------------------------------------------------- - // Basic Algebra - Operators and Methods - // The operator return values are *NOT* normalized - // - // operator^ and euclideanInnnerProduct() both - // implement the 4D dot product - // - // operator/ uses the inverse() quaternion - // - // operator~ is conjugate -- if (S+V) is quat then - // the conjugate (S+V)* == (S-V) - // - // some operators (*,/,*=,/=) treat the quat as - // a 4D vector when one of the operands is scalar - //------------------------------------------------- - - const Quat & operator = (const Quat &q); - const Quat & operator *= (const Quat &q); - const Quat & operator *= (T t); - const Quat & operator /= (const Quat &q); - const Quat & operator /= (T t); - const Quat & operator += (const Quat &q); - const Quat & operator -= (const Quat &q); - T & operator [] (int index); // as 4D vector - T operator [] (int index) const; - - template bool operator == (const Quat &q) const; - template bool operator != (const Quat &q) const; - - Quat & invert (); // this -> 1 / this - Quat inverse () const; - Quat & normalize (); // returns this - Quat normalized () const; - T length () const; // in R4 - Vec3 rotateVector(const Vec3 &original) const; - T euclideanInnerProduct(const Quat &q) const; - - //----------------------- - // Rotation conversion - //----------------------- - - Quat & setAxisAngle (const Vec3 &axis, T radians); - - Quat & setRotation (const Vec3 &fromDirection, - const Vec3 &toDirection); - - T angle () const; - Vec3 axis () const; - - Matrix33 toMatrix33 () const; - Matrix44 toMatrix44 () const; - - Quat log () const; - Quat exp () const; - - - private: - - void setRotationInternal (const Vec3 &f0, - const Vec3 &t0, - Quat &q); -}; - - -template -Quat slerp (const Quat &q1, const Quat &q2, T t); - -template -Quat slerpShortestArc - (const Quat &q1, const Quat &q2, T t); - - -template -Quat squad (const Quat &q1, const Quat &q2, - const Quat &qa, const Quat &qb, T t); - -template -void intermediate (const Quat &q0, const Quat &q1, - const Quat &q2, const Quat &q3, - Quat &qa, Quat &qb); - -template -Matrix33 operator * (const Matrix33 &M, const Quat &q); - -template -Matrix33 operator * (const Quat &q, const Matrix33 &M); - -template -std::ostream & operator << (std::ostream &o, const Quat &q); - -template -Quat operator * (const Quat &q1, const Quat &q2); - -template -Quat operator / (const Quat &q1, const Quat &q2); - -template -Quat operator / (const Quat &q, T t); - -template -Quat operator * (const Quat &q, T t); - -template -Quat operator * (T t, const Quat &q); - -template -Quat operator + (const Quat &q1, const Quat &q2); - -template -Quat operator - (const Quat &q1, const Quat &q2); - -template -Quat operator ~ (const Quat &q); - -template -Quat operator - (const Quat &q); - -template -Vec3 operator * (const Vec3 &v, const Quat &q); - - -//-------------------- -// Convenient typedefs -//-------------------- - -typedef Quat Quatf; -typedef Quat Quatd; - - -//--------------- -// Implementation -//--------------- - -template -inline -Quat::Quat (): r (1), v (0, 0, 0) -{ - // empty -} - - -template -template -inline -Quat::Quat (const Quat &q): r (q.r), v (q.v) -{ - // empty -} - - -template -inline -Quat::Quat (T s, T i, T j, T k): r (s), v (i, j, k) -{ - // empty -} - - -template -inline -Quat::Quat (T s, Vec3 d): r (s), v (d) -{ - // empty -} - - -template -inline Quat -Quat::identity () -{ - return Quat(); -} - -template -inline const Quat & -Quat::operator = (const Quat &q) -{ - r = q.r; - v = q.v; - return *this; -} - - -template -inline const Quat & -Quat::operator *= (const Quat &q) -{ - T rtmp = r * q.r - (v ^ q.v); - v = r * q.v + v * q.r + v % q.v; - r = rtmp; - return *this; -} - - -template -inline const Quat & -Quat::operator *= (T t) -{ - r *= t; - v *= t; - return *this; -} - - -template -inline const Quat & -Quat::operator /= (const Quat &q) -{ - *this = *this * q.inverse(); - return *this; -} - - -template -inline const Quat & -Quat::operator /= (T t) -{ - r /= t; - v /= t; - return *this; -} - - -template -inline const Quat & -Quat::operator += (const Quat &q) -{ - r += q.r; - v += q.v; - return *this; -} - - -template -inline const Quat & -Quat::operator -= (const Quat &q) -{ - r -= q.r; - v -= q.v; - return *this; -} - - -template -inline T & -Quat::operator [] (int index) -{ - return index ? v[index - 1] : r; -} - - -template -inline T -Quat::operator [] (int index) const -{ - return index ? v[index - 1] : r; -} - - -template -template -inline bool -Quat::operator == (const Quat &q) const -{ - return r == q.r && v == q.v; -} - - -template -template -inline bool -Quat::operator != (const Quat &q) const -{ - return r != q.r || v != q.v; -} - - -template -inline T -operator ^ (const Quat& q1 ,const Quat& q2) -{ - return q1.r * q2.r + (q1.v ^ q2.v); -} - - -template -inline T -Quat::length () const -{ - return Math::sqrt (r * r + (v ^ v)); -} - - -template -inline Quat & -Quat::normalize () -{ - if (T l = length()) - { - r /= l; - v /= l; - } - else - { - r = 1; - v = Vec3 (0); - } - - return *this; -} - - -template -inline Quat -Quat::normalized () const -{ - if (T l = length()) - return Quat (r / l, v / l); - - return Quat(); -} - - -template -inline Quat -Quat::inverse () const -{ - // - // 1 Q* - // - = ---- where Q* is conjugate (operator~) - // Q Q* Q and (Q* Q) == Q ^ Q (4D dot) - // - - T qdot = *this ^ *this; - return Quat (r / qdot, -v / qdot); -} - - -template -inline Quat & -Quat::invert () -{ - T qdot = (*this) ^ (*this); - r /= qdot; - v = -v / qdot; - return *this; -} - - -template -inline Vec3 -Quat::rotateVector(const Vec3& original) const -{ - // - // Given a vector p and a quaternion q (aka this), - // calculate p' = qpq* - // - // Assumes unit quaternions (because non-unit - // quaternions cannot be used to rotate vectors - // anyway). - // - - Quat vec (0, original); // temporarily promote grade of original - Quat inv (*this); - inv.v *= -1; // unit multiplicative inverse - Quat result = *this * vec * inv; - return result.v; -} - - -template -inline T -Quat::euclideanInnerProduct (const Quat &q) const -{ - return r * q.r + v.x * q.v.x + v.y * q.v.y + v.z * q.v.z; -} - - -template -T -angle4D (const Quat &q1, const Quat &q2) -{ - // - // Compute the angle between two quaternions, - // interpreting the quaternions as 4D vectors. - // - - Quat d = q1 - q2; - T lengthD = Math::sqrt (d ^ d); - - Quat s = q1 + q2; - T lengthS = Math::sqrt (s ^ s); - - return 2 * Math::atan2 (lengthD, lengthS); -} - - -template -Quat -slerp (const Quat &q1, const Quat &q2, T t) -{ - // - // Spherical linear interpolation. - // Assumes q1 and q2 are normalized and that q1 != -q2. - // - // This method does *not* interpolate along the shortest - // arc between q1 and q2. If you desire interpolation - // along the shortest arc, and q1^q2 is negative, then - // consider calling slerpShortestArc(), below, or flipping - // the second quaternion explicitly. - // - // The implementation of squad() depends on a slerp() - // that interpolates as is, without the automatic - // flipping. - // - // Don Hatch explains the method we use here on his - // web page, The Right Way to Calculate Stuff, at - // http://www.plunk.org/~hatch/rightway.php - // - - T a = angle4D (q1, q2); - T s = 1 - t; - - Quat q = sinx_over_x (s * a) / sinx_over_x (a) * s * q1 + - sinx_over_x (t * a) / sinx_over_x (a) * t * q2; - - return q.normalized(); -} - - -template -Quat -slerpShortestArc (const Quat &q1, const Quat &q2, T t) -{ - // - // Spherical linear interpolation along the shortest - // arc from q1 to either q2 or -q2, whichever is closer. - // Assumes q1 and q2 are unit quaternions. - // - - if ((q1 ^ q2) >= 0) - return slerp (q1, q2, t); - else - return slerp (q1, -q2, t); -} - - -template -Quat -spline (const Quat &q0, const Quat &q1, - const Quat &q2, const Quat &q3, - T t) -{ - // - // Spherical Cubic Spline Interpolation - - // from Advanced Animation and Rendering - // Techniques by Watt and Watt, Page 366: - // A spherical curve is constructed using three - // spherical linear interpolations of a quadrangle - // of unit quaternions: q1, qa, qb, q2. - // Given a set of quaternion keys: q0, q1, q2, q3, - // this routine does the interpolation between - // q1 and q2 by constructing two intermediate - // quaternions: qa and qb. The qa and qb are - // computed by the intermediate function to - // guarantee the continuity of tangents across - // adjacent cubic segments. The qa represents in-tangent - // for q1 and the qb represents the out-tangent for q2. - // - // The q1 q2 is the cubic segment being interpolated. - // The q0 is from the previous adjacent segment and q3 is - // from the next adjacent segment. The q0 and q3 are used - // in computing qa and qb. - // - - Quat qa = intermediate (q0, q1, q2); - Quat qb = intermediate (q1, q2, q3); - Quat result = squad (q1, qa, qb, q2, t); - - return result; -} - - -template -Quat -squad (const Quat &q1, const Quat &qa, - const Quat &qb, const Quat &q2, - T t) -{ - // - // Spherical Quadrangle Interpolation - - // from Advanced Animation and Rendering - // Techniques by Watt and Watt, Page 366: - // It constructs a spherical cubic interpolation as - // a series of three spherical linear interpolations - // of a quadrangle of unit quaternions. - // - - Quat r1 = slerp (q1, q2, t); - Quat r2 = slerp (qa, qb, t); - Quat result = slerp (r1, r2, 2 * t * (1 - t)); - - return result; -} - - -template -Quat -intermediate (const Quat &q0, const Quat &q1, const Quat &q2) -{ - // - // From advanced Animation and Rendering - // Techniques by Watt and Watt, Page 366: - // computing the inner quadrangle - // points (qa and qb) to guarantee tangent - // continuity. - // - - Quat q1inv = q1.inverse(); - Quat c1 = q1inv * q2; - Quat c2 = q1inv * q0; - Quat c3 = (T) (-0.25) * (c2.log() + c1.log()); - Quat qa = q1 * c3.exp(); - qa.normalize(); - return qa; -} - - -template -inline Quat -Quat::log () const -{ - // - // For unit quaternion, from Advanced Animation and - // Rendering Techniques by Watt and Watt, Page 366: - // - - T theta = Math::acos (std::min (r, (T) 1.0)); - - if (theta == 0) - return Quat (0, v); - - T sintheta = Math::sin (theta); - - T k; - if (abs (sintheta) < 1 && abs (theta) >= limits::max() * abs (sintheta)) - k = 1; - else - k = theta / sintheta; - - return Quat ((T) 0, v.x * k, v.y * k, v.z * k); -} - - -template -inline Quat -Quat::exp () const -{ - // - // For pure quaternion (zero scalar part): - // from Advanced Animation and Rendering - // Techniques by Watt and Watt, Page 366: - // - - T theta = v.length(); - T sintheta = Math::sin (theta); - - T k; - if (abs (theta) < 1 && abs (sintheta) >= limits::max() * abs (theta)) - k = 1; - else - k = sintheta / theta; - - T costheta = Math::cos (theta); - - return Quat (costheta, v.x * k, v.y * k, v.z * k); -} - - -template -inline T -Quat::angle () const -{ - return 2 * Math::atan2 (v.length(), r); -} - - -template -inline Vec3 -Quat::axis () const -{ - return v.normalized(); -} - - -template -inline Quat & -Quat::setAxisAngle (const Vec3 &axis, T radians) -{ - r = Math::cos (radians / 2); - v = axis.normalized() * Math::sin (radians / 2); - return *this; -} - - -template -Quat & -Quat::setRotation (const Vec3 &from, const Vec3 &to) -{ - // - // Create a quaternion that rotates vector from into vector to, - // such that the rotation is around an axis that is the cross - // product of from and to. - // - // This function calls function setRotationInternal(), which is - // numerically accurate only for rotation angles that are not much - // greater than pi/2. In order to achieve good accuracy for angles - // greater than pi/2, we split large angles in half, and rotate in - // two steps. - // - - // - // Normalize from and to, yielding f0 and t0. - // - - Vec3 f0 = from.normalized(); - Vec3 t0 = to.normalized(); - - if ((f0 ^ t0) >= 0) - { - // - // The rotation angle is less than or equal to pi/2. - // - - setRotationInternal (f0, t0, *this); - } - else - { - // - // The angle is greater than pi/2. After computing h0, - // which is halfway between f0 and t0, we rotate first - // from f0 to h0, then from h0 to t0. - // - - Vec3 h0 = (f0 + t0).normalized(); - - if ((h0 ^ h0) != 0) - { - setRotationInternal (f0, h0, *this); - - Quat q; - setRotationInternal (h0, t0, q); - - *this *= q; - } - else - { - // - // f0 and t0 point in exactly opposite directions. - // Pick an arbitrary axis that is orthogonal to f0, - // and rotate by pi. - // - - r = T (0); - - Vec3 f02 = f0 * f0; - - if (f02.x <= f02.y && f02.x <= f02.z) - v = (f0 % Vec3 (1, 0, 0)).normalized(); - else if (f02.y <= f02.z) - v = (f0 % Vec3 (0, 1, 0)).normalized(); - else - v = (f0 % Vec3 (0, 0, 1)).normalized(); - } - } - - return *this; -} - - -template -void -Quat::setRotationInternal (const Vec3 &f0, const Vec3 &t0, Quat &q) -{ - // - // The following is equivalent to setAxisAngle(n,2*phi), - // where the rotation axis, n, is orthogonal to the f0 and - // t0 vectors, and 2*phi is the angle between f0 and t0. - // - // This function is called by setRotation(), above; it assumes - // that f0 and t0 are normalized and that the angle between - // them is not much greater than pi/2. This function becomes - // numerically inaccurate if f0 and t0 point into nearly - // opposite directions. - // - - // - // Find a normalized vector, h0, that is halfway between f0 and t0. - // The angle between f0 and h0 is phi. - // - - Vec3 h0 = (f0 + t0).normalized(); - - // - // Store the rotation axis and rotation angle. - // - - q.r = f0 ^ h0; // f0 ^ h0 == cos (phi) - q.v = f0 % h0; // (f0 % h0).length() == sin (phi) -} - - -template -Matrix33 -Quat::toMatrix33() const -{ - return Matrix33 (1 - 2 * (v.y * v.y + v.z * v.z), - 2 * (v.x * v.y + v.z * r), - 2 * (v.z * v.x - v.y * r), - - 2 * (v.x * v.y - v.z * r), - 1 - 2 * (v.z * v.z + v.x * v.x), - 2 * (v.y * v.z + v.x * r), - - 2 * (v.z * v.x + v.y * r), - 2 * (v.y * v.z - v.x * r), - 1 - 2 * (v.y * v.y + v.x * v.x)); -} - -template -Matrix44 -Quat::toMatrix44() const -{ - return Matrix44 (1 - 2 * (v.y * v.y + v.z * v.z), - 2 * (v.x * v.y + v.z * r), - 2 * (v.z * v.x - v.y * r), - 0, - 2 * (v.x * v.y - v.z * r), - 1 - 2 * (v.z * v.z + v.x * v.x), - 2 * (v.y * v.z + v.x * r), - 0, - 2 * (v.z * v.x + v.y * r), - 2 * (v.y * v.z - v.x * r), - 1 - 2 * (v.y * v.y + v.x * v.x), - 0, - 0, - 0, - 0, - 1); -} - - -template -inline Matrix33 -operator * (const Matrix33 &M, const Quat &q) -{ - return M * q.toMatrix33(); -} - - -template -inline Matrix33 -operator * (const Quat &q, const Matrix33 &M) -{ - return q.toMatrix33() * M; -} - - -template -std::ostream & -operator << (std::ostream &o, const Quat &q) -{ - return o << "(" << q.r - << " " << q.v.x - << " " << q.v.y - << " " << q.v.z - << ")"; -} - - -template -inline Quat -operator * (const Quat &q1, const Quat &q2) -{ - return Quat (q1.r * q2.r - (q1.v ^ q2.v), - q1.r * q2.v + q1.v * q2.r + q1.v % q2.v); -} - - -template -inline Quat -operator / (const Quat &q1, const Quat &q2) -{ - return q1 * q2.inverse(); -} - - -template -inline Quat -operator / (const Quat &q, T t) -{ - return Quat (q.r / t, q.v / t); -} - - -template -inline Quat -operator * (const Quat &q, T t) -{ - return Quat (q.r * t, q.v * t); -} - - -template -inline Quat -operator * (T t, const Quat &q) -{ - return Quat (q.r * t, q.v * t); -} - - -template -inline Quat -operator + (const Quat &q1, const Quat &q2) -{ - return Quat (q1.r + q2.r, q1.v + q2.v); -} - - -template -inline Quat -operator - (const Quat &q1, const Quat &q2) -{ - return Quat (q1.r - q2.r, q1.v - q2.v); -} - - -template -inline Quat -operator ~ (const Quat &q) -{ - return Quat (q.r, -q.v); -} - - -template -inline Quat -operator - (const Quat &q) -{ - return Quat (-q.r, -q.v); -} - - -template -inline Vec3 -operator * (const Vec3 &v, const Quat &q) -{ - Vec3 a = q.v % v; - Vec3 b = q.v % a; - return v + T (2) * (q.r * a + b); -} - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -#pragma warning(default:4244) -#endif - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHQUAT_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathRandom.cpp b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathRandom.cpp deleted file mode 100644 index cf3d600..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathRandom.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -//----------------------------------------------------------------------------- -// -// Routines that generate pseudo-random numbers compatible -// with the standard erand48(), nrand48(), etc. functions. -// -//----------------------------------------------------------------------------- - -#include "ImathRandom.h" -#include "ImathInt64.h" - -IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER -namespace { - -// -// Static state used by Imath::drand48(), Imath::lrand48() and Imath::srand48() -// - -unsigned short staticState[3] = {0, 0, 0}; - - -void -rand48Next (unsigned short state[3]) -{ - // - // drand48() and friends are all based on a linear congruential - // sequence, - // - // x[n+1] = (a * x[n] + c) % m, - // - // where a and c are as specified below, and m == (1 << 48) - // - - static const Int64 a = Int64 (0x5deece66dLL); - static const Int64 c = Int64 (0xbLL); - - // - // Assemble the 48-bit value x[n] from the - // three 16-bit values stored in state. - // - - Int64 x = (Int64 (state[2]) << 32) | - (Int64 (state[1]) << 16) | - Int64 (state[0]); - - // - // Compute x[n+1], except for the "modulo m" part. - // - - x = a * x + c; - - // - // Disassemble the 48 least significant bits of x[n+1] into - // three 16-bit values. Discard the 16 most significant bits; - // this takes care of the "modulo m" operation. - // - // We assume that sizeof (unsigned short) == 2. - // - - state[2] = (unsigned short)(x >> 32); - state[1] = (unsigned short)(x >> 16); - state[0] = (unsigned short)(x); -} - -} // namespace - - -double -erand48 (unsigned short state[3]) -{ - // - // Generate double-precision floating-point values between 0.0 and 1.0: - // - // The exponent is set to 0x3ff, which indicates a value greater - // than or equal to 1.0, and less than 2.0. The 48 most significant - // bits of the significand (mantissa) are filled with pseudo-random - // bits generated by rand48Next(). The remaining 4 bits are a copy - // of the 4 most significant bits of the significand. This results - // in bit patterns between 0x3ff0000000000000 and 0x3fffffffffffffff, - // which correspond to uniformly distributed floating-point values - // between 1.0 and 1.99999999999999978. Subtracting 1.0 from those - // values produces numbers between 0.0 and 0.99999999999999978, that - // is, between 0.0 and 1.0-DBL_EPSILON. - // - - rand48Next (state); - - union {double d; Int64 i;} u; - - u.i = (Int64 (0x3ff) << 52) | // sign and exponent - (Int64 (state[2]) << 36) | // significand - (Int64 (state[1]) << 20) | - (Int64 (state[0]) << 4) | - (Int64 (state[2]) >> 12); - - return u.d - 1; -} - - -double -drand48 () -{ - return IMATH_INTERNAL_NAMESPACE::erand48 (staticState); -} - - -long int -nrand48 (unsigned short state[3]) -{ - // - // Generate uniformly distributed integers between 0 and 0x7fffffff. - // - - rand48Next (state); - - return ((long int) (state[2]) << 15) | - ((long int) (state[1]) >> 1); -} - - -long int -lrand48 () -{ - return IMATH_INTERNAL_NAMESPACE::nrand48 (staticState); -} - - -void -srand48 (long int seed) -{ - staticState[2] = (unsigned short)(seed >> 16); - staticState[1] = (unsigned short)(seed); - staticState[0] = 0x330e; -} - - -float -Rand32::nextf () -{ - // - // Generate single-precision floating-point values between 0.0 and 1.0: - // - // The exponent is set to 0x7f, which indicates a value greater than - // or equal to 1.0, and less than 2.0. The 23 bits of the significand - // (mantissa) are filled with pseudo-random bits generated by - // Rand32::next(). This results in in bit patterns between 0x3f800000 - // and 0x3fffffff, which correspond to uniformly distributed floating- - // point values between 1.0 and 1.99999988. Subtracting 1.0 from - // those values produces numbers between 0.0 and 0.99999988, that is, - // between 0.0 and 1.0-FLT_EPSILON. - // - - next (); - - union {float f; unsigned int i;} u; - - u.i = 0x3f800000 | (_state & 0x7fffff); - return u.f - 1; -} - -IMATH_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathRandom.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathRandom.h deleted file mode 100644 index 4f0db13..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathRandom.h +++ /dev/null @@ -1,401 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - -#ifndef INCLUDED_IMATHRANDOM_H -#define INCLUDED_IMATHRANDOM_H - -//----------------------------------------------------------------------------- -// -// Generators for uniformly distributed pseudo-random numbers and -// functions that use those generators to generate numbers with -// non-uniform distributions: -// -// class Rand32 -// class Rand48 -// solidSphereRand() -// hollowSphereRand() -// gaussRand() -// gaussSphereRand() -// -// Note: class Rand48() calls erand48() and nrand48(), which are not -// available on all operating systems. For compatibility we include -// our own versions of erand48() and nrand48(). Our functions have -// been reverse-engineered from the corresponding Unix/Linux man page. -// -//----------------------------------------------------------------------------- - -#include "ImathNamespace.h" -#include "ImathExport.h" - -#include -#include - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -//----------------------------------------------- -// Fast random-number generator that generates -// a uniformly distributed sequence with a period -// length of 2^32. -//----------------------------------------------- - -class IMATH_EXPORT Rand32 -{ - public: - - //------------ - // Constructor - //------------ - - Rand32 (unsigned long int seed = 0); - - - //-------------------------------- - // Re-initialize with a given seed - //-------------------------------- - - void init (unsigned long int seed); - - - //---------------------------------------------------------- - // Get the next value in the sequence (range: [false, true]) - //---------------------------------------------------------- - - bool nextb (); - - - //--------------------------------------------------------------- - // Get the next value in the sequence (range: [0 ... 0xffffffff]) - //--------------------------------------------------------------- - - unsigned long int nexti (); - - - //------------------------------------------------------ - // Get the next value in the sequence (range: [0 ... 1[) - //------------------------------------------------------ - - float nextf (); - - - //------------------------------------------------------------------- - // Get the next value in the sequence (range [rangeMin ... rangeMax[) - //------------------------------------------------------------------- - - float nextf (float rangeMin, float rangeMax); - - - private: - - void next (); - - unsigned long int _state; -}; - - -//-------------------------------------------------------- -// Random-number generator based on the C Standard Library -// functions erand48(), nrand48() & company; generates a -// uniformly distributed sequence. -//-------------------------------------------------------- - -class Rand48 -{ - public: - - //------------ - // Constructor - //------------ - - Rand48 (unsigned long int seed = 0); - - - //-------------------------------- - // Re-initialize with a given seed - //-------------------------------- - - void init (unsigned long int seed); - - - //---------------------------------------------------------- - // Get the next value in the sequence (range: [false, true]) - //---------------------------------------------------------- - - bool nextb (); - - - //--------------------------------------------------------------- - // Get the next value in the sequence (range: [0 ... 0x7fffffff]) - //--------------------------------------------------------------- - - long int nexti (); - - - //------------------------------------------------------ - // Get the next value in the sequence (range: [0 ... 1[) - //------------------------------------------------------ - - double nextf (); - - - //------------------------------------------------------------------- - // Get the next value in the sequence (range [rangeMin ... rangeMax[) - //------------------------------------------------------------------- - - double nextf (double rangeMin, double rangeMax); - - - private: - - unsigned short int _state[3]; -}; - - -//------------------------------------------------------------ -// Return random points uniformly distributed in a sphere with -// radius 1 around the origin (distance from origin <= 1). -//------------------------------------------------------------ - -template -Vec -solidSphereRand (Rand &rand); - - -//------------------------------------------------------------- -// Return random points uniformly distributed on the surface of -// a sphere with radius 1 around the origin. -//------------------------------------------------------------- - -template -Vec -hollowSphereRand (Rand &rand); - - -//----------------------------------------------- -// Return random numbers with a normal (Gaussian) -// distribution with zero mean and unit variance. -//----------------------------------------------- - -template -float -gaussRand (Rand &rand); - - -//---------------------------------------------------- -// Return random points whose distance from the origin -// has a normal (Gaussian) distribution with zero mean -// and unit variance. -//---------------------------------------------------- - -template -Vec -gaussSphereRand (Rand &rand); - - -//--------------------------------- -// erand48(), nrand48() and friends -//--------------------------------- - -IMATH_EXPORT double erand48 (unsigned short state[3]); -IMATH_EXPORT double drand48 (); -IMATH_EXPORT long int nrand48 (unsigned short state[3]); -IMATH_EXPORT long int lrand48 (); -IMATH_EXPORT void srand48 (long int seed); - - -//--------------- -// Implementation -//--------------- - - -inline void -Rand32::init (unsigned long int seed) -{ - _state = (seed * 0xa5a573a5L) ^ 0x5a5a5a5aL; -} - - -inline -Rand32::Rand32 (unsigned long int seed) -{ - init (seed); -} - - -inline void -Rand32::next () -{ - _state = 1664525L * _state + 1013904223L; -} - - -inline bool -Rand32::nextb () -{ - next (); - // Return the 31st (most significant) bit, by and-ing with 2 ^ 31. - return !!(_state & 2147483648UL); -} - - -inline unsigned long int -Rand32::nexti () -{ - next (); - return _state & 0xffffffff; -} - - -inline float -Rand32::nextf (float rangeMin, float rangeMax) -{ - float f = nextf(); - return rangeMin * (1 - f) + rangeMax * f; -} - - -inline void -Rand48::init (unsigned long int seed) -{ - seed = (seed * 0xa5a573a5L) ^ 0x5a5a5a5aL; - - _state[0] = (unsigned short int) (seed & 0xFFFF); - _state[1] = (unsigned short int) ((seed >> 16) & 0xFFFF); - _state[2] = (unsigned short int) (seed & 0xFFFF); -} - - -inline -Rand48::Rand48 (unsigned long int seed) -{ - init (seed); -} - - -inline bool -Rand48::nextb () -{ - return nrand48 (_state) & 1; -} - - -inline long int -Rand48::nexti () -{ - return nrand48 (_state); -} - - -inline double -Rand48::nextf () -{ - return erand48 (_state); -} - - -inline double -Rand48::nextf (double rangeMin, double rangeMax) -{ - double f = nextf(); - return rangeMin * (1 - f) + rangeMax * f; -} - - -template -Vec -solidSphereRand (Rand &rand) -{ - Vec v; - - do - { - for (unsigned int i = 0; i < Vec::dimensions(); i++) - v[i] = (typename Vec::BaseType) rand.nextf (-1, 1); - } - while (v.length2() > 1); - - return v; -} - - -template -Vec -hollowSphereRand (Rand &rand) -{ - Vec v; - typename Vec::BaseType length; - - do - { - for (unsigned int i = 0; i < Vec::dimensions(); i++) - v[i] = (typename Vec::BaseType) rand.nextf (-1, 1); - - length = v.length(); - } - while (length > 1 || length == 0); - - return v / length; -} - - -template -float -gaussRand (Rand &rand) -{ - float x; // Note: to avoid numerical problems with very small - float y; // numbers, we make these variables singe-precision - float length2; // floats, but later we call the double-precision log() - // and sqrt() functions instead of logf() and sqrtf(). - do - { - x = float (rand.nextf (-1, 1)); - y = float (rand.nextf (-1, 1)); - length2 = x * x + y * y; - } - while (length2 >= 1 || length2 == 0); - - return x * sqrt (-2 * log (double (length2)) / length2); -} - - -template -Vec -gaussSphereRand (Rand &rand) -{ - return hollowSphereRand (rand) * gaussRand (rand); -} - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHRANDOM_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathRoots.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathRoots.h deleted file mode 100644 index 036b7f7..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathRoots.h +++ /dev/null @@ -1,219 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHROOTS_H -#define INCLUDED_IMATHROOTS_H - -//--------------------------------------------------------------------- -// -// Functions to solve linear, quadratic or cubic equations -// -//--------------------------------------------------------------------- - -#include "ImathMath.h" -#include "ImathNamespace.h" -#include - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -//-------------------------------------------------------------------------- -// Find the real solutions of a linear, quadratic or cubic equation: -// -// function equation solved -// -// solveLinear (a, b, x) a * x + b == 0 -// solveQuadratic (a, b, c, x) a * x*x + b * x + c == 0 -// solveNormalizedCubic (r, s, t, x) x*x*x + r * x*x + s * x + t == 0 -// solveCubic (a, b, c, d, x) a * x*x*x + b * x*x + c * x + d == 0 -// -// Return value: -// -// 3 three real solutions, stored in x[0], x[1] and x[2] -// 2 two real solutions, stored in x[0] and x[1] -// 1 one real solution, stored in x[1] -// 0 no real solutions -// -1 all real numbers are solutions -// -// Notes: -// -// * It is possible that an equation has real solutions, but that the -// solutions (or some intermediate result) are not representable. -// In this case, either some of the solutions returned are invalid -// (nan or infinity), or, if floating-point exceptions have been -// enabled with Iex::mathExcOn(), an Iex::MathExc exception is -// thrown. -// -// * Cubic equations are solved using Cardano's Formula; even though -// only real solutions are produced, some intermediate results are -// complex (std::complex). -// -//-------------------------------------------------------------------------- - -template int solveLinear (T a, T b, T &x); -template int solveQuadratic (T a, T b, T c, T x[2]); -template int solveNormalizedCubic (T r, T s, T t, T x[3]); -template int solveCubic (T a, T b, T c, T d, T x[3]); - - -//--------------- -// Implementation -//--------------- - -template -int -solveLinear (T a, T b, T &x) -{ - if (a != 0) - { - x = -b / a; - return 1; - } - else if (b != 0) - { - return 0; - } - else - { - return -1; - } -} - - -template -int -solveQuadratic (T a, T b, T c, T x[2]) -{ - if (a == 0) - { - return solveLinear (b, c, x[0]); - } - else - { - T D = b * b - 4 * a * c; - - if (D > 0) - { - T s = Math::sqrt (D); - T q = -(b + (b > 0 ? 1 : -1) * s) / T(2); - - x[0] = q / a; - x[1] = c / q; - return 2; - } - if (D == 0) - { - x[0] = -b / (2 * a); - return 1; - } - else - { - return 0; - } - } -} - - -template -int -solveNormalizedCubic (T r, T s, T t, T x[3]) -{ - T p = (3 * s - r * r) / 3; - T q = 2 * r * r * r / 27 - r * s / 3 + t; - T p3 = p / 3; - T q2 = q / 2; - T D = p3 * p3 * p3 + q2 * q2; - - if (D == 0 && p3 == 0) - { - x[0] = -r / 3; - x[1] = -r / 3; - x[2] = -r / 3; - return 1; - } - - std::complex u = std::pow (-q / 2 + std::sqrt (std::complex (D)), - T (1) / T (3)); - - std::complex v = -p / (T (3) * u); - - const T sqrt3 = T (1.73205080756887729352744634150587); // enough digits - // for long double - std::complex y0 (u + v); - - std::complex y1 (-(u + v) / T (2) + - (u - v) / T (2) * std::complex (0, sqrt3)); - - std::complex y2 (-(u + v) / T (2) - - (u - v) / T (2) * std::complex (0, sqrt3)); - - if (D > 0) - { - x[0] = y0.real() - r / 3; - return 1; - } - else if (D == 0) - { - x[0] = y0.real() - r / 3; - x[1] = y1.real() - r / 3; - return 2; - } - else - { - x[0] = y0.real() - r / 3; - x[1] = y1.real() - r / 3; - x[2] = y2.real() - r / 3; - return 3; - } -} - - -template -int -solveCubic (T a, T b, T c, T d, T x[3]) -{ - if (a == 0) - { - return solveQuadratic (b, c, d, x); - } - else - { - return solveNormalizedCubic (b / a, c / a, d / a, x); - } -} - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHROOTS_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathShear.cpp b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathShear.cpp deleted file mode 100644 index 2c0ba2a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathShear.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - - -//---------------------------------------------------------------------------- -// -// Specializations of the Shear6 template. -// -//---------------------------------------------------------------------------- - -#include "ImathShear.h" - -IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER - - - -// empty - - - -IMATH_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathShear.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathShear.h deleted file mode 100644 index b6f7b9a..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathShear.h +++ /dev/null @@ -1,656 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHSHEAR_H -#define INCLUDED_IMATHSHEAR_H - -//---------------------------------------------------- -// -// Shear6 class template. -// -//---------------------------------------------------- - -#include "ImathExc.h" -#include "ImathLimits.h" -#include "ImathMath.h" -#include "ImathVec.h" -#include "ImathNamespace.h" -#include - - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -template class Shear6 -{ - public: - - //------------------- - // Access to elements - //------------------- - - T xy, xz, yz, yx, zx, zy; - - T & operator [] (int i); - const T & operator [] (int i) const; - - - //------------- - // Constructors - //------------- - - Shear6 (); // (0 0 0 0 0 0) - Shear6 (T XY, T XZ, T YZ); // (XY XZ YZ 0 0 0) - Shear6 (const Vec3 &v); // (v.x v.y v.z 0 0 0) - template // (v.x v.y v.z 0 0 0) - Shear6 (const Vec3 &v); - Shear6 (T XY, T XZ, T YZ, // (XY XZ YZ YX ZX ZY) - T YX, T ZX, T ZY); - - - //--------------------------------- - // Copy constructors and assignment - //--------------------------------- - - Shear6 (const Shear6 &h); - template Shear6 (const Shear6 &h); - - const Shear6 & operator = (const Shear6 &h); - template - const Shear6 & operator = (const Vec3 &v); - - - //---------------------- - // Compatibility with Sb - //---------------------- - - template - void setValue (S XY, S XZ, S YZ, S YX, S ZX, S ZY); - - template - void setValue (const Shear6 &h); - - template - void getValue (S &XY, S &XZ, S &YZ, - S &YX, S &ZX, S &ZY) const; - - template - void getValue (Shear6 &h) const; - - T * getValue(); - const T * getValue() const; - - - //--------- - // Equality - //--------- - - template - bool operator == (const Shear6 &h) const; - - template - bool operator != (const Shear6 &h) const; - - //----------------------------------------------------------------------- - // Compare two shears and test if they are "approximately equal": - // - // equalWithAbsError (h, e) - // - // Returns true if the coefficients of this and h are the same with - // an absolute error of no more than e, i.e., for all i - // - // abs (this[i] - h[i]) <= e - // - // equalWithRelError (h, e) - // - // Returns true if the coefficients of this and h are the same with - // a relative error of no more than e, i.e., for all i - // - // abs (this[i] - h[i]) <= e * abs (this[i]) - //----------------------------------------------------------------------- - - bool equalWithAbsError (const Shear6 &h, T e) const; - bool equalWithRelError (const Shear6 &h, T e) const; - - - //------------------------ - // Component-wise addition - //------------------------ - - const Shear6 & operator += (const Shear6 &h); - Shear6 operator + (const Shear6 &h) const; - - - //--------------------------- - // Component-wise subtraction - //--------------------------- - - const Shear6 & operator -= (const Shear6 &h); - Shear6 operator - (const Shear6 &h) const; - - - //------------------------------------ - // Component-wise multiplication by -1 - //------------------------------------ - - Shear6 operator - () const; - const Shear6 & negate (); - - - //------------------------------ - // Component-wise multiplication - //------------------------------ - - const Shear6 & operator *= (const Shear6 &h); - const Shear6 & operator *= (T a); - Shear6 operator * (const Shear6 &h) const; - Shear6 operator * (T a) const; - - - //------------------------ - // Component-wise division - //------------------------ - - const Shear6 & operator /= (const Shear6 &h); - const Shear6 & operator /= (T a); - Shear6 operator / (const Shear6 &h) const; - Shear6 operator / (T a) const; - - - //---------------------------------------------------------- - // Number of dimensions, i.e. number of elements in a Shear6 - //---------------------------------------------------------- - - static unsigned int dimensions() {return 6;} - - - //------------------------------------------------- - // Limitations of type T (see also class limits) - //------------------------------------------------- - - static T baseTypeMin() {return limits::min();} - static T baseTypeMax() {return limits::max();} - static T baseTypeSmallest() {return limits::smallest();} - static T baseTypeEpsilon() {return limits::epsilon();} - - - //-------------------------------------------------------------- - // Base type -- in templates, which accept a parameter, V, which - // could be either a Vec2 or a Shear6, you can refer to T as - // V::BaseType - //-------------------------------------------------------------- - - typedef T BaseType; -}; - - -//-------------- -// Stream output -//-------------- - -template -std::ostream & operator << (std::ostream &s, const Shear6 &h); - - -//---------------------------------------------------- -// Reverse multiplication: scalar * Shear6 -//---------------------------------------------------- - -template Shear6 operator * (S a, const Shear6 &h); - - -//------------------------- -// Typedefs for convenience -//------------------------- - -typedef Vec3 Shear3f; -typedef Vec3 Shear3d; -typedef Shear6 Shear6f; -typedef Shear6 Shear6d; - - - - -//----------------------- -// Implementation of Shear6 -//----------------------- - -template -inline T & -Shear6::operator [] (int i) -{ - return (&xy)[i]; -} - -template -inline const T & -Shear6::operator [] (int i) const -{ - return (&xy)[i]; -} - -template -inline -Shear6::Shear6 () -{ - xy = xz = yz = yx = zx = zy = 0; -} - -template -inline -Shear6::Shear6 (T XY, T XZ, T YZ) -{ - xy = XY; - xz = XZ; - yz = YZ; - yx = 0; - zx = 0; - zy = 0; -} - -template -inline -Shear6::Shear6 (const Vec3 &v) -{ - xy = v.x; - xz = v.y; - yz = v.z; - yx = 0; - zx = 0; - zy = 0; -} - -template -template -inline -Shear6::Shear6 (const Vec3 &v) -{ - xy = T (v.x); - xz = T (v.y); - yz = T (v.z); - yx = 0; - zx = 0; - zy = 0; -} - -template -inline -Shear6::Shear6 (T XY, T XZ, T YZ, T YX, T ZX, T ZY) -{ - xy = XY; - xz = XZ; - yz = YZ; - yx = YX; - zx = ZX; - zy = ZY; -} - -template -inline -Shear6::Shear6 (const Shear6 &h) -{ - xy = h.xy; - xz = h.xz; - yz = h.yz; - yx = h.yx; - zx = h.zx; - zy = h.zy; -} - -template -template -inline -Shear6::Shear6 (const Shear6 &h) -{ - xy = T (h.xy); - xz = T (h.xz); - yz = T (h.yz); - yx = T (h.yx); - zx = T (h.zx); - zy = T (h.zy); -} - -template -inline const Shear6 & -Shear6::operator = (const Shear6 &h) -{ - xy = h.xy; - xz = h.xz; - yz = h.yz; - yx = h.yx; - zx = h.zx; - zy = h.zy; - return *this; -} - -template -template -inline const Shear6 & -Shear6::operator = (const Vec3 &v) -{ - xy = T (v.x); - xz = T (v.y); - yz = T (v.z); - yx = 0; - zx = 0; - zy = 0; - return *this; -} - -template -template -inline void -Shear6::setValue (S XY, S XZ, S YZ, S YX, S ZX, S ZY) -{ - xy = T (XY); - xz = T (XZ); - yz = T (YZ); - yx = T (YX); - zx = T (ZX); - zy = T (ZY); -} - -template -template -inline void -Shear6::setValue (const Shear6 &h) -{ - xy = T (h.xy); - xz = T (h.xz); - yz = T (h.yz); - yx = T (h.yx); - zx = T (h.zx); - zy = T (h.zy); -} - -template -template -inline void -Shear6::getValue (S &XY, S &XZ, S &YZ, S &YX, S &ZX, S &ZY) const -{ - XY = S (xy); - XZ = S (xz); - YZ = S (yz); - YX = S (yx); - ZX = S (zx); - ZY = S (zy); -} - -template -template -inline void -Shear6::getValue (Shear6 &h) const -{ - h.xy = S (xy); - h.xz = S (xz); - h.yz = S (yz); - h.yx = S (yx); - h.zx = S (zx); - h.zy = S (zy); -} - -template -inline T * -Shear6::getValue() -{ - return (T *) &xy; -} - -template -inline const T * -Shear6::getValue() const -{ - return (const T *) &xy; -} - -template -template -inline bool -Shear6::operator == (const Shear6 &h) const -{ - return xy == h.xy && xz == h.xz && yz == h.yz && - yx == h.yx && zx == h.zx && zy == h.zy; -} - -template -template -inline bool -Shear6::operator != (const Shear6 &h) const -{ - return xy != h.xy || xz != h.xz || yz != h.yz || - yx != h.yx || zx != h.zx || zy != h.zy; -} - -template -bool -Shear6::equalWithAbsError (const Shear6 &h, T e) const -{ - for (int i = 0; i < 6; i++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithAbsError ((*this)[i], h[i], e)) - return false; - - return true; -} - -template -bool -Shear6::equalWithRelError (const Shear6 &h, T e) const -{ - for (int i = 0; i < 6; i++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithRelError ((*this)[i], h[i], e)) - return false; - - return true; -} - - -template -inline const Shear6 & -Shear6::operator += (const Shear6 &h) -{ - xy += h.xy; - xz += h.xz; - yz += h.yz; - yx += h.yx; - zx += h.zx; - zy += h.zy; - return *this; -} - -template -inline Shear6 -Shear6::operator + (const Shear6 &h) const -{ - return Shear6 (xy + h.xy, xz + h.xz, yz + h.yz, - yx + h.yx, zx + h.zx, zy + h.zy); -} - -template -inline const Shear6 & -Shear6::operator -= (const Shear6 &h) -{ - xy -= h.xy; - xz -= h.xz; - yz -= h.yz; - yx -= h.yx; - zx -= h.zx; - zy -= h.zy; - return *this; -} - -template -inline Shear6 -Shear6::operator - (const Shear6 &h) const -{ - return Shear6 (xy - h.xy, xz - h.xz, yz - h.yz, - yx - h.yx, zx - h.zx, zy - h.zy); -} - -template -inline Shear6 -Shear6::operator - () const -{ - return Shear6 (-xy, -xz, -yz, -yx, -zx, -zy); -} - -template -inline const Shear6 & -Shear6::negate () -{ - xy = -xy; - xz = -xz; - yz = -yz; - yx = -yx; - zx = -zx; - zy = -zy; - return *this; -} - -template -inline const Shear6 & -Shear6::operator *= (const Shear6 &h) -{ - xy *= h.xy; - xz *= h.xz; - yz *= h.yz; - yx *= h.yx; - zx *= h.zx; - zy *= h.zy; - return *this; -} - -template -inline const Shear6 & -Shear6::operator *= (T a) -{ - xy *= a; - xz *= a; - yz *= a; - yx *= a; - zx *= a; - zy *= a; - return *this; -} - -template -inline Shear6 -Shear6::operator * (const Shear6 &h) const -{ - return Shear6 (xy * h.xy, xz * h.xz, yz * h.yz, - yx * h.yx, zx * h.zx, zy * h.zy); -} - -template -inline Shear6 -Shear6::operator * (T a) const -{ - return Shear6 (xy * a, xz * a, yz * a, - yx * a, zx * a, zy * a); -} - -template -inline const Shear6 & -Shear6::operator /= (const Shear6 &h) -{ - xy /= h.xy; - xz /= h.xz; - yz /= h.yz; - yx /= h.yx; - zx /= h.zx; - zy /= h.zy; - return *this; -} - -template -inline const Shear6 & -Shear6::operator /= (T a) -{ - xy /= a; - xz /= a; - yz /= a; - yx /= a; - zx /= a; - zy /= a; - return *this; -} - -template -inline Shear6 -Shear6::operator / (const Shear6 &h) const -{ - return Shear6 (xy / h.xy, xz / h.xz, yz / h.yz, - yx / h.yx, zx / h.zx, zy / h.zy); -} - -template -inline Shear6 -Shear6::operator / (T a) const -{ - return Shear6 (xy / a, xz / a, yz / a, - yx / a, zx / a, zy / a); -} - - -//----------------------------- -// Stream output implementation -//----------------------------- - -template -std::ostream & -operator << (std::ostream &s, const Shear6 &h) -{ - return s << '(' - << h.xy << ' ' << h.xz << ' ' << h.yz - << h.yx << ' ' << h.zx << ' ' << h.zy - << ')'; -} - - -//----------------------------------------- -// Implementation of reverse multiplication -//----------------------------------------- - -template -inline Shear6 -operator * (S a, const Shear6 &h) -{ - return Shear6 (a * h.xy, a * h.xz, a * h.yz, - a * h.yx, a * h.zx, a * h.zy); -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHSHEAR_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathSphere.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathSphere.h deleted file mode 100644 index e8f36df..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathSphere.h +++ /dev/null @@ -1,177 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHSPHERE_H -#define INCLUDED_IMATHSPHERE_H - -//------------------------------------- -// -// A 3D sphere class template -// -//------------------------------------- - -#include "ImathVec.h" -#include "ImathBox.h" -#include "ImathLine.h" -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -template -class Sphere3 -{ - public: - - Vec3 center; - T radius; - - //--------------- - // Constructors - //--------------- - - Sphere3() : center(0,0,0), radius(0) {} - Sphere3(const Vec3 &c, T r) : center(c), radius(r) {} - - //------------------------------------------------------------------- - // Utilities: - // - // s.circumscribe(b) sets center and radius of sphere s - // so that the s tightly encloses box b. - // - // s.intersectT (l, t) If sphere s and line l intersect, then - // intersectT() computes the smallest t, - // t >= 0, so that l(t) is a point on the - // sphere. intersectT() then returns true. - // - // If s and l do not intersect, intersectT() - // returns false. - // - // s.intersect (l, i) If sphere s and line l intersect, then - // intersect() calls s.intersectT(l,t) and - // computes i = l(t). - // - // If s and l do not intersect, intersect() - // returns false. - // - //------------------------------------------------------------------- - - void circumscribe(const Box > &box); - bool intersect(const Line3 &l, Vec3 &intersection) const; - bool intersectT(const Line3 &l, T &t) const; -}; - - -//-------------------- -// Convenient typedefs -//-------------------- - -typedef Sphere3 Sphere3f; -typedef Sphere3 Sphere3d; - - -//--------------- -// Implementation -//--------------- - -template -void Sphere3::circumscribe(const Box > &box) -{ - center = T(0.5) * (box.min + box.max); - radius = (box.max - center).length(); -} - - -template -bool Sphere3::intersectT(const Line3 &line, T &t) const -{ - bool doesIntersect = true; - - Vec3 v = line.pos - center; - T B = T(2.0) * (line.dir ^ v); - T C = (v ^ v) - (radius * radius); - - // compute discriminant - // if negative, there is no intersection - - T discr = B*B - T(4.0)*C; - - if (discr < 0.0) - { - // line and Sphere3 do not intersect - - doesIntersect = false; - } - else - { - // t0: (-B - sqrt(B^2 - 4AC)) / 2A (A = 1) - - T sqroot = Math::sqrt(discr); - t = (-B - sqroot) * T(0.5); - - if (t < 0.0) - { - // no intersection, try t1: (-B + sqrt(B^2 - 4AC)) / 2A (A = 1) - - t = (-B + sqroot) * T(0.5); - } - - if (t < 0.0) - doesIntersect = false; - } - - return doesIntersect; -} - - -template -bool Sphere3::intersect(const Line3 &line, Vec3 &intersection) const -{ - T t; - - if (intersectT (line, t)) - { - intersection = line(t); - return true; - } - else - { - return false; - } -} - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHSPHERE_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathVec.cpp b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathVec.cpp deleted file mode 100644 index 5e5b210..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathVec.cpp +++ /dev/null @@ -1,583 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -//---------------------------------------------------------------------------- -// -// Specializations of the Vec2 and Vec3 templates. -// -//---------------------------------------------------------------------------- - -#include "ImathVec.h" -#include "ImathExport.h" - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -// suppress exception specification warnings -#pragma warning(disable:4290) -#endif - - -IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER - -namespace -{ - -template -bool -normalizeOrThrow(Vec2 &v) -{ - int axis = -1; - for (int i = 0; i < 2; i ++) - { - if (v[i] != 0) - { - if (axis != -1) - { - throw IntVecNormalizeExc ("Cannot normalize an integer " - "vector unless it is parallel " - "to a principal axis"); - } - axis = i; - } - } - v[axis] = (v[axis] > 0) ? 1 : -1; - return true; -} - - -template -bool -normalizeOrThrow(Vec3 &v) -{ - int axis = -1; - for (int i = 0; i < 3; i ++) - { - if (v[i] != 0) - { - if (axis != -1) - { - throw IntVecNormalizeExc ("Cannot normalize an integer " - "vector unless it is parallel " - "to a principal axis"); - } - axis = i; - } - } - v[axis] = (v[axis] > 0) ? 1 : -1; - return true; -} - - -template -bool -normalizeOrThrow(Vec4 &v) -{ - int axis = -1; - for (int i = 0; i < 4; i ++) - { - if (v[i] != 0) - { - if (axis != -1) - { - throw IntVecNormalizeExc ("Cannot normalize an integer " - "vector unless it is parallel " - "to a principal axis"); - } - axis = i; - } - } - v[axis] = (v[axis] > 0) ? 1 : -1; - return true; -} - -} - - -// Vec2 - -template <> -IMATH_EXPORT -short -Vec2::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - short lenS = (short) (lenF + 0.5f); - return lenS; -} - -template <> -IMATH_EXPORT -const Vec2 & -Vec2::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec2 & -Vec2::normalizeExc () throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec2 & -Vec2::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -Vec2 -Vec2::normalized () const -{ - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec2 -Vec2::normalizedExc () const throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec2 -Vec2::normalizedNonNull () const -{ - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - - -// Vec2 - -template <> -IMATH_EXPORT -int -Vec2::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - int lenI = (int) (lenF + 0.5f); - return lenI; -} - -template <> -IMATH_EXPORT -const Vec2 & -Vec2::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec2 & -Vec2::normalizeExc () throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec2 & -Vec2::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -Vec2 -Vec2::normalized () const -{ - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec2 -Vec2::normalizedExc () const throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec2 -Vec2::normalizedNonNull () const -{ - Vec2 v(*this); - normalizeOrThrow(v); - return v; -} - - -// Vec3 - -template <> -IMATH_EXPORT -short -Vec3::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - short lenS = (short) (lenF + 0.5f); - return lenS; -} - -template <> -IMATH_EXPORT -const Vec3 & -Vec3::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec3 & -Vec3::normalizeExc () throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec3 & -Vec3::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -Vec3 -Vec3::normalized () const -{ - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec3 -Vec3::normalizedExc () const throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec3 -Vec3::normalizedNonNull () const -{ - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - - -// Vec3 - -template <> -IMATH_EXPORT -int -Vec3::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - int lenI = (int) (lenF + 0.5f); - return lenI; -} - -template <> -IMATH_EXPORT -const Vec3 & -Vec3::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec3 & -Vec3::normalizeExc () throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec3 & -Vec3::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -Vec3 -Vec3::normalized () const -{ - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec3 -Vec3::normalizedExc () const throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec3 -Vec3::normalizedNonNull () const -{ - Vec3 v(*this); - normalizeOrThrow(v); - return v; -} - - -// Vec4 - -template <> -IMATH_EXPORT -short -Vec4::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - short lenS = (short) (lenF + 0.5f); - return lenS; -} - -template <> -IMATH_EXPORT -const Vec4 & -Vec4::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec4 & -Vec4::normalizeExc () throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0) && (w == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec4 & -Vec4::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -Vec4 -Vec4::normalized () const -{ - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec4 -Vec4::normalizedExc () const throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0) && (w == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec4 -Vec4::normalizedNonNull () const -{ - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - - -// Vec4 - -template <> -IMATH_EXPORT -int -Vec4::length () const -{ - float lenF = Math::sqrt ((float)dot (*this)); - int lenI = (int) (lenF + 0.5f); - return lenI; -} - -template <> -IMATH_EXPORT -const Vec4 & -Vec4::normalize () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec4 & -Vec4::normalizeExc () throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0) && (w == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -const Vec4 & -Vec4::normalizeNonNull () -{ - normalizeOrThrow(*this); - return *this; -} - -template <> -IMATH_EXPORT -Vec4 -Vec4::normalized () const -{ - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec4 -Vec4::normalizedExc () const throw (IEX_NAMESPACE::MathExc) -{ - if ((x == 0) && (y == 0) && (z == 0) && (w == 0)) - throw NullVecExc ("Cannot normalize null vector."); - - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - -template <> -IMATH_EXPORT -Vec4 -Vec4::normalizedNonNull () const -{ - Vec4 v(*this); - normalizeOrThrow(v); - return v; -} - -IMATH_INTERNAL_NAMESPACE_SOURCE_EXIT diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathVec.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathVec.h deleted file mode 100644 index fb859eb..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathVec.h +++ /dev/null @@ -1,2227 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2004-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHVEC_H -#define INCLUDED_IMATHVEC_H - -//---------------------------------------------------- -// -// 2D, 3D and 4D point/vector class templates -// -//---------------------------------------------------- - -#include "ImathExc.h" -#include "ImathLimits.h" -#include "ImathMath.h" -#include "ImathNamespace.h" - -#include - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -// suppress exception specification warnings -#pragma warning(push) -#pragma warning(disable:4290) -#endif - - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - -template class Vec2; -template class Vec3; -template class Vec4; - -enum InfException {INF_EXCEPTION}; - - -template class Vec2 -{ - public: - - //------------------- - // Access to elements - //------------------- - - T x, y; - - T & operator [] (int i); - const T & operator [] (int i) const; - - - //------------- - // Constructors - //------------- - - Vec2 (); // no initialization - explicit Vec2 (T a); // (a a) - Vec2 (T a, T b); // (a b) - - - //--------------------------------- - // Copy constructors and assignment - //--------------------------------- - - Vec2 (const Vec2 &v); - template Vec2 (const Vec2 &v); - - const Vec2 & operator = (const Vec2 &v); - - - //---------------------- - // Compatibility with Sb - //---------------------- - - template - void setValue (S a, S b); - - template - void setValue (const Vec2 &v); - - template - void getValue (S &a, S &b) const; - - template - void getValue (Vec2 &v) const; - - T * getValue (); - const T * getValue () const; - - - //--------- - // Equality - //--------- - - template - bool operator == (const Vec2 &v) const; - - template - bool operator != (const Vec2 &v) const; - - - //----------------------------------------------------------------------- - // Compare two vectors and test if they are "approximately equal": - // - // equalWithAbsError (v, e) - // - // Returns true if the coefficients of this and v are the same with - // an absolute error of no more than e, i.e., for all i - // - // abs (this[i] - v[i]) <= e - // - // equalWithRelError (v, e) - // - // Returns true if the coefficients of this and v are the same with - // a relative error of no more than e, i.e., for all i - // - // abs (this[i] - v[i]) <= e * abs (this[i]) - //----------------------------------------------------------------------- - - bool equalWithAbsError (const Vec2 &v, T e) const; - bool equalWithRelError (const Vec2 &v, T e) const; - - //------------ - // Dot product - //------------ - - T dot (const Vec2 &v) const; - T operator ^ (const Vec2 &v) const; - - - //------------------------------------------------ - // Right-handed cross product, i.e. z component of - // Vec3 (this->x, this->y, 0) % Vec3 (v.x, v.y, 0) - //------------------------------------------------ - - T cross (const Vec2 &v) const; - T operator % (const Vec2 &v) const; - - - //------------------------ - // Component-wise addition - //------------------------ - - const Vec2 & operator += (const Vec2 &v); - Vec2 operator + (const Vec2 &v) const; - - - //--------------------------- - // Component-wise subtraction - //--------------------------- - - const Vec2 & operator -= (const Vec2 &v); - Vec2 operator - (const Vec2 &v) const; - - - //------------------------------------ - // Component-wise multiplication by -1 - //------------------------------------ - - Vec2 operator - () const; - const Vec2 & negate (); - - - //------------------------------ - // Component-wise multiplication - //------------------------------ - - const Vec2 & operator *= (const Vec2 &v); - const Vec2 & operator *= (T a); - Vec2 operator * (const Vec2 &v) const; - Vec2 operator * (T a) const; - - - //------------------------ - // Component-wise division - //------------------------ - - const Vec2 & operator /= (const Vec2 &v); - const Vec2 & operator /= (T a); - Vec2 operator / (const Vec2 &v) const; - Vec2 operator / (T a) const; - - - //---------------------------------------------------------------- - // Length and normalization: If v.length() is 0.0, v.normalize() - // and v.normalized() produce a null vector; v.normalizeExc() and - // v.normalizedExc() throw a NullVecExc. - // v.normalizeNonNull() and v.normalizedNonNull() are slightly - // faster than the other normalization routines, but if v.length() - // is 0.0, the result is undefined. - //---------------------------------------------------------------- - - T length () const; - T length2 () const; - - const Vec2 & normalize (); // modifies *this - const Vec2 & normalizeExc () throw (IEX_NAMESPACE::MathExc); - const Vec2 & normalizeNonNull (); - - Vec2 normalized () const; // does not modify *this - Vec2 normalizedExc () const throw (IEX_NAMESPACE::MathExc); - Vec2 normalizedNonNull () const; - - - //-------------------------------------------------------- - // Number of dimensions, i.e. number of elements in a Vec2 - //-------------------------------------------------------- - - static unsigned int dimensions() {return 2;} - - - //------------------------------------------------- - // Limitations of type T (see also class limits) - //------------------------------------------------- - - static T baseTypeMin() {return limits::min();} - static T baseTypeMax() {return limits::max();} - static T baseTypeSmallest() {return limits::smallest();} - static T baseTypeEpsilon() {return limits::epsilon();} - - - //-------------------------------------------------------------- - // Base type -- in templates, which accept a parameter, V, which - // could be either a Vec2, a Vec3, or a Vec4 you can - // refer to T as V::BaseType - //-------------------------------------------------------------- - - typedef T BaseType; - - private: - - T lengthTiny () const; -}; - - -template class Vec3 -{ - public: - - //------------------- - // Access to elements - //------------------- - - T x, y, z; - - T & operator [] (int i); - const T & operator [] (int i) const; - - - //------------- - // Constructors - //------------- - - Vec3 (); // no initialization - explicit Vec3 (T a); // (a a a) - Vec3 (T a, T b, T c); // (a b c) - - - //--------------------------------- - // Copy constructors and assignment - //--------------------------------- - - Vec3 (const Vec3 &v); - template Vec3 (const Vec3 &v); - - const Vec3 & operator = (const Vec3 &v); - - - //--------------------------------------------------------- - // Vec4 to Vec3 conversion, divides x, y and z by w: - // - // The one-argument conversion function divides by w even - // if w is zero. The result depends on how the environment - // handles floating-point exceptions. - // - // The two-argument version thows an InfPointExc exception - // if w is zero or if division by w would overflow. - //--------------------------------------------------------- - - template explicit Vec3 (const Vec4 &v); - template explicit Vec3 (const Vec4 &v, InfException); - - - //---------------------- - // Compatibility with Sb - //---------------------- - - template - void setValue (S a, S b, S c); - - template - void setValue (const Vec3 &v); - - template - void getValue (S &a, S &b, S &c) const; - - template - void getValue (Vec3 &v) const; - - T * getValue(); - const T * getValue() const; - - - //--------- - // Equality - //--------- - - template - bool operator == (const Vec3 &v) const; - - template - bool operator != (const Vec3 &v) const; - - //----------------------------------------------------------------------- - // Compare two vectors and test if they are "approximately equal": - // - // equalWithAbsError (v, e) - // - // Returns true if the coefficients of this and v are the same with - // an absolute error of no more than e, i.e., for all i - // - // abs (this[i] - v[i]) <= e - // - // equalWithRelError (v, e) - // - // Returns true if the coefficients of this and v are the same with - // a relative error of no more than e, i.e., for all i - // - // abs (this[i] - v[i]) <= e * abs (this[i]) - //----------------------------------------------------------------------- - - bool equalWithAbsError (const Vec3 &v, T e) const; - bool equalWithRelError (const Vec3 &v, T e) const; - - //------------ - // Dot product - //------------ - - T dot (const Vec3 &v) const; - T operator ^ (const Vec3 &v) const; - - - //--------------------------- - // Right-handed cross product - //--------------------------- - - Vec3 cross (const Vec3 &v) const; - const Vec3 & operator %= (const Vec3 &v); - Vec3 operator % (const Vec3 &v) const; - - - //------------------------ - // Component-wise addition - //------------------------ - - const Vec3 & operator += (const Vec3 &v); - Vec3 operator + (const Vec3 &v) const; - - - //--------------------------- - // Component-wise subtraction - //--------------------------- - - const Vec3 & operator -= (const Vec3 &v); - Vec3 operator - (const Vec3 &v) const; - - - //------------------------------------ - // Component-wise multiplication by -1 - //------------------------------------ - - Vec3 operator - () const; - const Vec3 & negate (); - - - //------------------------------ - // Component-wise multiplication - //------------------------------ - - const Vec3 & operator *= (const Vec3 &v); - const Vec3 & operator *= (T a); - Vec3 operator * (const Vec3 &v) const; - Vec3 operator * (T a) const; - - - //------------------------ - // Component-wise division - //------------------------ - - const Vec3 & operator /= (const Vec3 &v); - const Vec3 & operator /= (T a); - Vec3 operator / (const Vec3 &v) const; - Vec3 operator / (T a) const; - - - //---------------------------------------------------------------- - // Length and normalization: If v.length() is 0.0, v.normalize() - // and v.normalized() produce a null vector; v.normalizeExc() and - // v.normalizedExc() throw a NullVecExc. - // v.normalizeNonNull() and v.normalizedNonNull() are slightly - // faster than the other normalization routines, but if v.length() - // is 0.0, the result is undefined. - //---------------------------------------------------------------- - - T length () const; - T length2 () const; - - const Vec3 & normalize (); // modifies *this - const Vec3 & normalizeExc () throw (IEX_NAMESPACE::MathExc); - const Vec3 & normalizeNonNull (); - - Vec3 normalized () const; // does not modify *this - Vec3 normalizedExc () const throw (IEX_NAMESPACE::MathExc); - Vec3 normalizedNonNull () const; - - - //-------------------------------------------------------- - // Number of dimensions, i.e. number of elements in a Vec3 - //-------------------------------------------------------- - - static unsigned int dimensions() {return 3;} - - - //------------------------------------------------- - // Limitations of type T (see also class limits) - //------------------------------------------------- - - static T baseTypeMin() {return limits::min();} - static T baseTypeMax() {return limits::max();} - static T baseTypeSmallest() {return limits::smallest();} - static T baseTypeEpsilon() {return limits::epsilon();} - - - //-------------------------------------------------------------- - // Base type -- in templates, which accept a parameter, V, which - // could be either a Vec2, a Vec3, or a Vec4 you can - // refer to T as V::BaseType - //-------------------------------------------------------------- - - typedef T BaseType; - - private: - - T lengthTiny () const; -}; - - - -template class Vec4 -{ - public: - - //------------------- - // Access to elements - //------------------- - - T x, y, z, w; - - T & operator [] (int i); - const T & operator [] (int i) const; - - - //------------- - // Constructors - //------------- - - Vec4 (); // no initialization - explicit Vec4 (T a); // (a a a a) - Vec4 (T a, T b, T c, T d); // (a b c d) - - - //--------------------------------- - // Copy constructors and assignment - //--------------------------------- - - Vec4 (const Vec4 &v); - template Vec4 (const Vec4 &v); - - const Vec4 & operator = (const Vec4 &v); - - - //------------------------------------- - // Vec3 to Vec4 conversion, sets w to 1 - //------------------------------------- - - template explicit Vec4 (const Vec3 &v); - - - //--------- - // Equality - //--------- - - template - bool operator == (const Vec4 &v) const; - - template - bool operator != (const Vec4 &v) const; - - - //----------------------------------------------------------------------- - // Compare two vectors and test if they are "approximately equal": - // - // equalWithAbsError (v, e) - // - // Returns true if the coefficients of this and v are the same with - // an absolute error of no more than e, i.e., for all i - // - // abs (this[i] - v[i]) <= e - // - // equalWithRelError (v, e) - // - // Returns true if the coefficients of this and v are the same with - // a relative error of no more than e, i.e., for all i - // - // abs (this[i] - v[i]) <= e * abs (this[i]) - //----------------------------------------------------------------------- - - bool equalWithAbsError (const Vec4 &v, T e) const; - bool equalWithRelError (const Vec4 &v, T e) const; - - - //------------ - // Dot product - //------------ - - T dot (const Vec4 &v) const; - T operator ^ (const Vec4 &v) const; - - - //----------------------------------- - // Cross product is not defined in 4D - //----------------------------------- - - //------------------------ - // Component-wise addition - //------------------------ - - const Vec4 & operator += (const Vec4 &v); - Vec4 operator + (const Vec4 &v) const; - - - //--------------------------- - // Component-wise subtraction - //--------------------------- - - const Vec4 & operator -= (const Vec4 &v); - Vec4 operator - (const Vec4 &v) const; - - - //------------------------------------ - // Component-wise multiplication by -1 - //------------------------------------ - - Vec4 operator - () const; - const Vec4 & negate (); - - - //------------------------------ - // Component-wise multiplication - //------------------------------ - - const Vec4 & operator *= (const Vec4 &v); - const Vec4 & operator *= (T a); - Vec4 operator * (const Vec4 &v) const; - Vec4 operator * (T a) const; - - - //------------------------ - // Component-wise division - //------------------------ - - const Vec4 & operator /= (const Vec4 &v); - const Vec4 & operator /= (T a); - Vec4 operator / (const Vec4 &v) const; - Vec4 operator / (T a) const; - - - //---------------------------------------------------------------- - // Length and normalization: If v.length() is 0.0, v.normalize() - // and v.normalized() produce a null vector; v.normalizeExc() and - // v.normalizedExc() throw a NullVecExc. - // v.normalizeNonNull() and v.normalizedNonNull() are slightly - // faster than the other normalization routines, but if v.length() - // is 0.0, the result is undefined. - //---------------------------------------------------------------- - - T length () const; - T length2 () const; - - const Vec4 & normalize (); // modifies *this - const Vec4 & normalizeExc () throw (IEX_NAMESPACE::MathExc); - const Vec4 & normalizeNonNull (); - - Vec4 normalized () const; // does not modify *this - Vec4 normalizedExc () const throw (IEX_NAMESPACE::MathExc); - Vec4 normalizedNonNull () const; - - - //-------------------------------------------------------- - // Number of dimensions, i.e. number of elements in a Vec4 - //-------------------------------------------------------- - - static unsigned int dimensions() {return 4;} - - - //------------------------------------------------- - // Limitations of type T (see also class limits) - //------------------------------------------------- - - static T baseTypeMin() {return limits::min();} - static T baseTypeMax() {return limits::max();} - static T baseTypeSmallest() {return limits::smallest();} - static T baseTypeEpsilon() {return limits::epsilon();} - - - //-------------------------------------------------------------- - // Base type -- in templates, which accept a parameter, V, which - // could be either a Vec2, a Vec3, or a Vec4 you can - // refer to T as V::BaseType - //-------------------------------------------------------------- - - typedef T BaseType; - - private: - - T lengthTiny () const; -}; - - -//-------------- -// Stream output -//-------------- - -template -std::ostream & operator << (std::ostream &s, const Vec2 &v); - -template -std::ostream & operator << (std::ostream &s, const Vec3 &v); - -template -std::ostream & operator << (std::ostream &s, const Vec4 &v); - -//---------------------------------------------------- -// Reverse multiplication: S * Vec2 and S * Vec3 -//---------------------------------------------------- - -template Vec2 operator * (T a, const Vec2 &v); -template Vec3 operator * (T a, const Vec3 &v); -template Vec4 operator * (T a, const Vec4 &v); - - -//------------------------- -// Typedefs for convenience -//------------------------- - -typedef Vec2 V2s; -typedef Vec2 V2i; -typedef Vec2 V2f; -typedef Vec2 V2d; -typedef Vec3 V3s; -typedef Vec3 V3i; -typedef Vec3 V3f; -typedef Vec3 V3d; -typedef Vec4 V4s; -typedef Vec4 V4i; -typedef Vec4 V4f; -typedef Vec4 V4d; - - -//------------------------------------------- -// Specializations for VecN, VecN -//------------------------------------------- - -// Vec2 - -template <> short -Vec2::length () const; - -template <> const Vec2 & -Vec2::normalize (); - -template <> const Vec2 & -Vec2::normalizeExc () throw (IEX_NAMESPACE::MathExc); - -template <> const Vec2 & -Vec2::normalizeNonNull (); - -template <> Vec2 -Vec2::normalized () const; - -template <> Vec2 -Vec2::normalizedExc () const throw (IEX_NAMESPACE::MathExc); - -template <> Vec2 -Vec2::normalizedNonNull () const; - - -// Vec2 - -template <> int -Vec2::length () const; - -template <> const Vec2 & -Vec2::normalize (); - -template <> const Vec2 & -Vec2::normalizeExc () throw (IEX_NAMESPACE::MathExc); - -template <> const Vec2 & -Vec2::normalizeNonNull (); - -template <> Vec2 -Vec2::normalized () const; - -template <> Vec2 -Vec2::normalizedExc () const throw (IEX_NAMESPACE::MathExc); - -template <> Vec2 -Vec2::normalizedNonNull () const; - - -// Vec3 - -template <> short -Vec3::length () const; - -template <> const Vec3 & -Vec3::normalize (); - -template <> const Vec3 & -Vec3::normalizeExc () throw (IEX_NAMESPACE::MathExc); - -template <> const Vec3 & -Vec3::normalizeNonNull (); - -template <> Vec3 -Vec3::normalized () const; - -template <> Vec3 -Vec3::normalizedExc () const throw (IEX_NAMESPACE::MathExc); - -template <> Vec3 -Vec3::normalizedNonNull () const; - - -// Vec3 - -template <> int -Vec3::length () const; - -template <> const Vec3 & -Vec3::normalize (); - -template <> const Vec3 & -Vec3::normalizeExc () throw (IEX_NAMESPACE::MathExc); - -template <> const Vec3 & -Vec3::normalizeNonNull (); - -template <> Vec3 -Vec3::normalized () const; - -template <> Vec3 -Vec3::normalizedExc () const throw (IEX_NAMESPACE::MathExc); - -template <> Vec3 -Vec3::normalizedNonNull () const; - -// Vec4 - -template <> short -Vec4::length () const; - -template <> const Vec4 & -Vec4::normalize (); - -template <> const Vec4 & -Vec4::normalizeExc () throw (IEX_NAMESPACE::MathExc); - -template <> const Vec4 & -Vec4::normalizeNonNull (); - -template <> Vec4 -Vec4::normalized () const; - -template <> Vec4 -Vec4::normalizedExc () const throw (IEX_NAMESPACE::MathExc); - -template <> Vec4 -Vec4::normalizedNonNull () const; - - -// Vec4 - -template <> int -Vec4::length () const; - -template <> const Vec4 & -Vec4::normalize (); - -template <> const Vec4 & -Vec4::normalizeExc () throw (IEX_NAMESPACE::MathExc); - -template <> const Vec4 & -Vec4::normalizeNonNull (); - -template <> Vec4 -Vec4::normalized () const; - -template <> Vec4 -Vec4::normalizedExc () const throw (IEX_NAMESPACE::MathExc); - -template <> Vec4 -Vec4::normalizedNonNull () const; - - -//------------------------ -// Implementation of Vec2: -//------------------------ - -template -inline T & -Vec2::operator [] (int i) -{ - return (&x)[i]; -} - -template -inline const T & -Vec2::operator [] (int i) const -{ - return (&x)[i]; -} - -template -inline -Vec2::Vec2 () -{ - // empty -} - -template -inline -Vec2::Vec2 (T a) -{ - x = y = a; -} - -template -inline -Vec2::Vec2 (T a, T b) -{ - x = a; - y = b; -} - -template -inline -Vec2::Vec2 (const Vec2 &v) -{ - x = v.x; - y = v.y; -} - -template -template -inline -Vec2::Vec2 (const Vec2 &v) -{ - x = T (v.x); - y = T (v.y); -} - -template -inline const Vec2 & -Vec2::operator = (const Vec2 &v) -{ - x = v.x; - y = v.y; - return *this; -} - -template -template -inline void -Vec2::setValue (S a, S b) -{ - x = T (a); - y = T (b); -} - -template -template -inline void -Vec2::setValue (const Vec2 &v) -{ - x = T (v.x); - y = T (v.y); -} - -template -template -inline void -Vec2::getValue (S &a, S &b) const -{ - a = S (x); - b = S (y); -} - -template -template -inline void -Vec2::getValue (Vec2 &v) const -{ - v.x = S (x); - v.y = S (y); -} - -template -inline T * -Vec2::getValue() -{ - return (T *) &x; -} - -template -inline const T * -Vec2::getValue() const -{ - return (const T *) &x; -} - -template -template -inline bool -Vec2::operator == (const Vec2 &v) const -{ - return x == v.x && y == v.y; -} - -template -template -inline bool -Vec2::operator != (const Vec2 &v) const -{ - return x != v.x || y != v.y; -} - -template -bool -Vec2::equalWithAbsError (const Vec2 &v, T e) const -{ - for (int i = 0; i < 2; i++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithAbsError ((*this)[i], v[i], e)) - return false; - - return true; -} - -template -bool -Vec2::equalWithRelError (const Vec2 &v, T e) const -{ - for (int i = 0; i < 2; i++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithRelError ((*this)[i], v[i], e)) - return false; - - return true; -} - -template -inline T -Vec2::dot (const Vec2 &v) const -{ - return x * v.x + y * v.y; -} - -template -inline T -Vec2::operator ^ (const Vec2 &v) const -{ - return dot (v); -} - -template -inline T -Vec2::cross (const Vec2 &v) const -{ - return x * v.y - y * v.x; - -} - -template -inline T -Vec2::operator % (const Vec2 &v) const -{ - return x * v.y - y * v.x; -} - -template -inline const Vec2 & -Vec2::operator += (const Vec2 &v) -{ - x += v.x; - y += v.y; - return *this; -} - -template -inline Vec2 -Vec2::operator + (const Vec2 &v) const -{ - return Vec2 (x + v.x, y + v.y); -} - -template -inline const Vec2 & -Vec2::operator -= (const Vec2 &v) -{ - x -= v.x; - y -= v.y; - return *this; -} - -template -inline Vec2 -Vec2::operator - (const Vec2 &v) const -{ - return Vec2 (x - v.x, y - v.y); -} - -template -inline Vec2 -Vec2::operator - () const -{ - return Vec2 (-x, -y); -} - -template -inline const Vec2 & -Vec2::negate () -{ - x = -x; - y = -y; - return *this; -} - -template -inline const Vec2 & -Vec2::operator *= (const Vec2 &v) -{ - x *= v.x; - y *= v.y; - return *this; -} - -template -inline const Vec2 & -Vec2::operator *= (T a) -{ - x *= a; - y *= a; - return *this; -} - -template -inline Vec2 -Vec2::operator * (const Vec2 &v) const -{ - return Vec2 (x * v.x, y * v.y); -} - -template -inline Vec2 -Vec2::operator * (T a) const -{ - return Vec2 (x * a, y * a); -} - -template -inline const Vec2 & -Vec2::operator /= (const Vec2 &v) -{ - x /= v.x; - y /= v.y; - return *this; -} - -template -inline const Vec2 & -Vec2::operator /= (T a) -{ - x /= a; - y /= a; - return *this; -} - -template -inline Vec2 -Vec2::operator / (const Vec2 &v) const -{ - return Vec2 (x / v.x, y / v.y); -} - -template -inline Vec2 -Vec2::operator / (T a) const -{ - return Vec2 (x / a, y / a); -} - -template -T -Vec2::lengthTiny () const -{ - T absX = (x >= T (0))? x: -x; - T absY = (y >= T (0))? y: -y; - - T max = absX; - - if (max < absY) - max = absY; - - if (max == T (0)) - return T (0); - - // - // Do not replace the divisions by max with multiplications by 1/max. - // Computing 1/max can overflow but the divisions below will always - // produce results less than or equal to 1. - // - - absX /= max; - absY /= max; - - return max * Math::sqrt (absX * absX + absY * absY); -} - -template -inline T -Vec2::length () const -{ - T length2 = dot (*this); - - if (length2 < T (2) * limits::smallest()) - return lengthTiny(); - - return Math::sqrt (length2); -} - -template -inline T -Vec2::length2 () const -{ - return dot (*this); -} - -template -const Vec2 & -Vec2::normalize () -{ - T l = length(); - - if (l != T (0)) - { - // - // Do not replace the divisions by l with multiplications by 1/l. - // Computing 1/l can overflow but the divisions below will always - // produce results less than or equal to 1. - // - - x /= l; - y /= l; - } - - return *this; -} - -template -const Vec2 & -Vec2::normalizeExc () throw (IEX_NAMESPACE::MathExc) -{ - T l = length(); - - if (l == T (0)) - throw NullVecExc ("Cannot normalize null vector."); - - x /= l; - y /= l; - return *this; -} - -template -inline -const Vec2 & -Vec2::normalizeNonNull () -{ - T l = length(); - x /= l; - y /= l; - return *this; -} - -template -Vec2 -Vec2::normalized () const -{ - T l = length(); - - if (l == T (0)) - return Vec2 (T (0)); - - return Vec2 (x / l, y / l); -} - -template -Vec2 -Vec2::normalizedExc () const throw (IEX_NAMESPACE::MathExc) -{ - T l = length(); - - if (l == T (0)) - throw NullVecExc ("Cannot normalize null vector."); - - return Vec2 (x / l, y / l); -} - -template -inline -Vec2 -Vec2::normalizedNonNull () const -{ - T l = length(); - return Vec2 (x / l, y / l); -} - - -//----------------------- -// Implementation of Vec3 -//----------------------- - -template -inline T & -Vec3::operator [] (int i) -{ - return (&x)[i]; -} - -template -inline const T & -Vec3::operator [] (int i) const -{ - return (&x)[i]; -} - -template -inline -Vec3::Vec3 () -{ - // empty -} - -template -inline -Vec3::Vec3 (T a) -{ - x = y = z = a; -} - -template -inline -Vec3::Vec3 (T a, T b, T c) -{ - x = a; - y = b; - z = c; -} - -template -inline -Vec3::Vec3 (const Vec3 &v) -{ - x = v.x; - y = v.y; - z = v.z; -} - -template -template -inline -Vec3::Vec3 (const Vec3 &v) -{ - x = T (v.x); - y = T (v.y); - z = T (v.z); -} - -template -inline const Vec3 & -Vec3::operator = (const Vec3 &v) -{ - x = v.x; - y = v.y; - z = v.z; - return *this; -} - -template -template -inline -Vec3::Vec3 (const Vec4 &v) -{ - x = T (v.x / v.w); - y = T (v.y / v.w); - z = T (v.z / v.w); -} - -template -template -Vec3::Vec3 (const Vec4 &v, InfException) -{ - T vx = T (v.x); - T vy = T (v.y); - T vz = T (v.z); - T vw = T (v.w); - - T absW = (vw >= T (0))? vw: -vw; - - if (absW < 1) - { - T m = baseTypeMax() * absW; - - if (vx <= -m || vx >= m || vy <= -m || vy >= m || vz <= -m || vz >= m) - throw InfPointExc ("Cannot normalize point at infinity."); - } - - x = vx / vw; - y = vy / vw; - z = vz / vw; -} - -template -template -inline void -Vec3::setValue (S a, S b, S c) -{ - x = T (a); - y = T (b); - z = T (c); -} - -template -template -inline void -Vec3::setValue (const Vec3 &v) -{ - x = T (v.x); - y = T (v.y); - z = T (v.z); -} - -template -template -inline void -Vec3::getValue (S &a, S &b, S &c) const -{ - a = S (x); - b = S (y); - c = S (z); -} - -template -template -inline void -Vec3::getValue (Vec3 &v) const -{ - v.x = S (x); - v.y = S (y); - v.z = S (z); -} - -template -inline T * -Vec3::getValue() -{ - return (T *) &x; -} - -template -inline const T * -Vec3::getValue() const -{ - return (const T *) &x; -} - -template -template -inline bool -Vec3::operator == (const Vec3 &v) const -{ - return x == v.x && y == v.y && z == v.z; -} - -template -template -inline bool -Vec3::operator != (const Vec3 &v) const -{ - return x != v.x || y != v.y || z != v.z; -} - -template -bool -Vec3::equalWithAbsError (const Vec3 &v, T e) const -{ - for (int i = 0; i < 3; i++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithAbsError ((*this)[i], v[i], e)) - return false; - - return true; -} - -template -bool -Vec3::equalWithRelError (const Vec3 &v, T e) const -{ - for (int i = 0; i < 3; i++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithRelError ((*this)[i], v[i], e)) - return false; - - return true; -} - -template -inline T -Vec3::dot (const Vec3 &v) const -{ - return x * v.x + y * v.y + z * v.z; -} - -template -inline T -Vec3::operator ^ (const Vec3 &v) const -{ - return dot (v); -} - -template -inline Vec3 -Vec3::cross (const Vec3 &v) const -{ - return Vec3 (y * v.z - z * v.y, - z * v.x - x * v.z, - x * v.y - y * v.x); -} - -template -inline const Vec3 & -Vec3::operator %= (const Vec3 &v) -{ - T a = y * v.z - z * v.y; - T b = z * v.x - x * v.z; - T c = x * v.y - y * v.x; - x = a; - y = b; - z = c; - return *this; -} - -template -inline Vec3 -Vec3::operator % (const Vec3 &v) const -{ - return Vec3 (y * v.z - z * v.y, - z * v.x - x * v.z, - x * v.y - y * v.x); -} - -template -inline const Vec3 & -Vec3::operator += (const Vec3 &v) -{ - x += v.x; - y += v.y; - z += v.z; - return *this; -} - -template -inline Vec3 -Vec3::operator + (const Vec3 &v) const -{ - return Vec3 (x + v.x, y + v.y, z + v.z); -} - -template -inline const Vec3 & -Vec3::operator -= (const Vec3 &v) -{ - x -= v.x; - y -= v.y; - z -= v.z; - return *this; -} - -template -inline Vec3 -Vec3::operator - (const Vec3 &v) const -{ - return Vec3 (x - v.x, y - v.y, z - v.z); -} - -template -inline Vec3 -Vec3::operator - () const -{ - return Vec3 (-x, -y, -z); -} - -template -inline const Vec3 & -Vec3::negate () -{ - x = -x; - y = -y; - z = -z; - return *this; -} - -template -inline const Vec3 & -Vec3::operator *= (const Vec3 &v) -{ - x *= v.x; - y *= v.y; - z *= v.z; - return *this; -} - -template -inline const Vec3 & -Vec3::operator *= (T a) -{ - x *= a; - y *= a; - z *= a; - return *this; -} - -template -inline Vec3 -Vec3::operator * (const Vec3 &v) const -{ - return Vec3 (x * v.x, y * v.y, z * v.z); -} - -template -inline Vec3 -Vec3::operator * (T a) const -{ - return Vec3 (x * a, y * a, z * a); -} - -template -inline const Vec3 & -Vec3::operator /= (const Vec3 &v) -{ - x /= v.x; - y /= v.y; - z /= v.z; - return *this; -} - -template -inline const Vec3 & -Vec3::operator /= (T a) -{ - x /= a; - y /= a; - z /= a; - return *this; -} - -template -inline Vec3 -Vec3::operator / (const Vec3 &v) const -{ - return Vec3 (x / v.x, y / v.y, z / v.z); -} - -template -inline Vec3 -Vec3::operator / (T a) const -{ - return Vec3 (x / a, y / a, z / a); -} - -template -T -Vec3::lengthTiny () const -{ - T absX = (x >= T (0))? x: -x; - T absY = (y >= T (0))? y: -y; - T absZ = (z >= T (0))? z: -z; - - T max = absX; - - if (max < absY) - max = absY; - - if (max < absZ) - max = absZ; - - if (max == T (0)) - return T (0); - - // - // Do not replace the divisions by max with multiplications by 1/max. - // Computing 1/max can overflow but the divisions below will always - // produce results less than or equal to 1. - // - - absX /= max; - absY /= max; - absZ /= max; - - return max * Math::sqrt (absX * absX + absY * absY + absZ * absZ); -} - -template -inline T -Vec3::length () const -{ - T length2 = dot (*this); - - if (length2 < T (2) * limits::smallest()) - return lengthTiny(); - - return Math::sqrt (length2); -} - -template -inline T -Vec3::length2 () const -{ - return dot (*this); -} - -template -const Vec3 & -Vec3::normalize () -{ - T l = length(); - - if (l != T (0)) - { - // - // Do not replace the divisions by l with multiplications by 1/l. - // Computing 1/l can overflow but the divisions below will always - // produce results less than or equal to 1. - // - - x /= l; - y /= l; - z /= l; - } - - return *this; -} - -template -const Vec3 & -Vec3::normalizeExc () throw (IEX_NAMESPACE::MathExc) -{ - T l = length(); - - if (l == T (0)) - throw NullVecExc ("Cannot normalize null vector."); - - x /= l; - y /= l; - z /= l; - return *this; -} - -template -inline -const Vec3 & -Vec3::normalizeNonNull () -{ - T l = length(); - x /= l; - y /= l; - z /= l; - return *this; -} - -template -Vec3 -Vec3::normalized () const -{ - T l = length(); - - if (l == T (0)) - return Vec3 (T (0)); - - return Vec3 (x / l, y / l, z / l); -} - -template -Vec3 -Vec3::normalizedExc () const throw (IEX_NAMESPACE::MathExc) -{ - T l = length(); - - if (l == T (0)) - throw NullVecExc ("Cannot normalize null vector."); - - return Vec3 (x / l, y / l, z / l); -} - -template -inline -Vec3 -Vec3::normalizedNonNull () const -{ - T l = length(); - return Vec3 (x / l, y / l, z / l); -} - - -//----------------------- -// Implementation of Vec4 -//----------------------- - -template -inline T & -Vec4::operator [] (int i) -{ - return (&x)[i]; -} - -template -inline const T & -Vec4::operator [] (int i) const -{ - return (&x)[i]; -} - -template -inline -Vec4::Vec4 () -{ - // empty -} - -template -inline -Vec4::Vec4 (T a) -{ - x = y = z = w = a; -} - -template -inline -Vec4::Vec4 (T a, T b, T c, T d) -{ - x = a; - y = b; - z = c; - w = d; -} - -template -inline -Vec4::Vec4 (const Vec4 &v) -{ - x = v.x; - y = v.y; - z = v.z; - w = v.w; -} - -template -template -inline -Vec4::Vec4 (const Vec4 &v) -{ - x = T (v.x); - y = T (v.y); - z = T (v.z); - w = T (v.w); -} - -template -inline const Vec4 & -Vec4::operator = (const Vec4 &v) -{ - x = v.x; - y = v.y; - z = v.z; - w = v.w; - return *this; -} - -template -template -inline -Vec4::Vec4 (const Vec3 &v) -{ - x = T (v.x); - y = T (v.y); - z = T (v.z); - w = T (1); -} - -template -template -inline bool -Vec4::operator == (const Vec4 &v) const -{ - return x == v.x && y == v.y && z == v.z && w == v.w; -} - -template -template -inline bool -Vec4::operator != (const Vec4 &v) const -{ - return x != v.x || y != v.y || z != v.z || w != v.w; -} - -template -bool -Vec4::equalWithAbsError (const Vec4 &v, T e) const -{ - for (int i = 0; i < 4; i++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithAbsError ((*this)[i], v[i], e)) - return false; - - return true; -} - -template -bool -Vec4::equalWithRelError (const Vec4 &v, T e) const -{ - for (int i = 0; i < 4; i++) - if (!IMATH_INTERNAL_NAMESPACE::equalWithRelError ((*this)[i], v[i], e)) - return false; - - return true; -} - -template -inline T -Vec4::dot (const Vec4 &v) const -{ - return x * v.x + y * v.y + z * v.z + w * v.w; -} - -template -inline T -Vec4::operator ^ (const Vec4 &v) const -{ - return dot (v); -} - - -template -inline const Vec4 & -Vec4::operator += (const Vec4 &v) -{ - x += v.x; - y += v.y; - z += v.z; - w += v.w; - return *this; -} - -template -inline Vec4 -Vec4::operator + (const Vec4 &v) const -{ - return Vec4 (x + v.x, y + v.y, z + v.z, w + v.w); -} - -template -inline const Vec4 & -Vec4::operator -= (const Vec4 &v) -{ - x -= v.x; - y -= v.y; - z -= v.z; - w -= v.w; - return *this; -} - -template -inline Vec4 -Vec4::operator - (const Vec4 &v) const -{ - return Vec4 (x - v.x, y - v.y, z - v.z, w - v.w); -} - -template -inline Vec4 -Vec4::operator - () const -{ - return Vec4 (-x, -y, -z, -w); -} - -template -inline const Vec4 & -Vec4::negate () -{ - x = -x; - y = -y; - z = -z; - w = -w; - return *this; -} - -template -inline const Vec4 & -Vec4::operator *= (const Vec4 &v) -{ - x *= v.x; - y *= v.y; - z *= v.z; - w *= v.w; - return *this; -} - -template -inline const Vec4 & -Vec4::operator *= (T a) -{ - x *= a; - y *= a; - z *= a; - w *= a; - return *this; -} - -template -inline Vec4 -Vec4::operator * (const Vec4 &v) const -{ - return Vec4 (x * v.x, y * v.y, z * v.z, w * v.w); -} - -template -inline Vec4 -Vec4::operator * (T a) const -{ - return Vec4 (x * a, y * a, z * a, w * a); -} - -template -inline const Vec4 & -Vec4::operator /= (const Vec4 &v) -{ - x /= v.x; - y /= v.y; - z /= v.z; - w /= v.w; - return *this; -} - -template -inline const Vec4 & -Vec4::operator /= (T a) -{ - x /= a; - y /= a; - z /= a; - w /= a; - return *this; -} - -template -inline Vec4 -Vec4::operator / (const Vec4 &v) const -{ - return Vec4 (x / v.x, y / v.y, z / v.z, w / v.w); -} - -template -inline Vec4 -Vec4::operator / (T a) const -{ - return Vec4 (x / a, y / a, z / a, w / a); -} - -template -T -Vec4::lengthTiny () const -{ - T absX = (x >= T (0))? x: -x; - T absY = (y >= T (0))? y: -y; - T absZ = (z >= T (0))? z: -z; - T absW = (w >= T (0))? w: -w; - - T max = absX; - - if (max < absY) - max = absY; - - if (max < absZ) - max = absZ; - - if (max < absW) - max = absW; - - if (max == T (0)) - return T (0); - - // - // Do not replace the divisions by max with multiplications by 1/max. - // Computing 1/max can overflow but the divisions below will always - // produce results less than or equal to 1. - // - - absX /= max; - absY /= max; - absZ /= max; - absW /= max; - - return max * - Math::sqrt (absX * absX + absY * absY + absZ * absZ + absW * absW); -} - -template -inline T -Vec4::length () const -{ - T length2 = dot (*this); - - if (length2 < T (2) * limits::smallest()) - return lengthTiny(); - - return Math::sqrt (length2); -} - -template -inline T -Vec4::length2 () const -{ - return dot (*this); -} - -template -const Vec4 & -Vec4::normalize () -{ - T l = length(); - - if (l != T (0)) - { - // - // Do not replace the divisions by l with multiplications by 1/l. - // Computing 1/l can overflow but the divisions below will always - // produce results less than or equal to 1. - // - - x /= l; - y /= l; - z /= l; - w /= l; - } - - return *this; -} - -template -const Vec4 & -Vec4::normalizeExc () throw (IEX_NAMESPACE::MathExc) -{ - T l = length(); - - if (l == T (0)) - throw NullVecExc ("Cannot normalize null vector."); - - x /= l; - y /= l; - z /= l; - w /= l; - return *this; -} - -template -inline -const Vec4 & -Vec4::normalizeNonNull () -{ - T l = length(); - x /= l; - y /= l; - z /= l; - w /= l; - return *this; -} - -template -Vec4 -Vec4::normalized () const -{ - T l = length(); - - if (l == T (0)) - return Vec4 (T (0)); - - return Vec4 (x / l, y / l, z / l, w / l); -} - -template -Vec4 -Vec4::normalizedExc () const throw (IEX_NAMESPACE::MathExc) -{ - T l = length(); - - if (l == T (0)) - throw NullVecExc ("Cannot normalize null vector."); - - return Vec4 (x / l, y / l, z / l, w / l); -} - -template -inline -Vec4 -Vec4::normalizedNonNull () const -{ - T l = length(); - return Vec4 (x / l, y / l, z / l, w / l); -} - -//----------------------------- -// Stream output implementation -//----------------------------- - -template -std::ostream & -operator << (std::ostream &s, const Vec2 &v) -{ - return s << '(' << v.x << ' ' << v.y << ')'; -} - -template -std::ostream & -operator << (std::ostream &s, const Vec3 &v) -{ - return s << '(' << v.x << ' ' << v.y << ' ' << v.z << ')'; -} - -template -std::ostream & -operator << (std::ostream &s, const Vec4 &v) -{ - return s << '(' << v.x << ' ' << v.y << ' ' << v.z << ' ' << v.w << ')'; -} - - -//----------------------------------------- -// Implementation of reverse multiplication -//----------------------------------------- - -template -inline Vec2 -operator * (T a, const Vec2 &v) -{ - return Vec2 (a * v.x, a * v.y); -} - -template -inline Vec3 -operator * (T a, const Vec3 &v) -{ - return Vec3 (a * v.x, a * v.y, a * v.z); -} - -template -inline Vec4 -operator * (T a, const Vec4 &v) -{ - return Vec4 (a * v.x, a * v.y, a * v.z, a * v.w); -} - - -#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER -#pragma warning(pop) -#endif - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHVEC_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathVecAlgo.h b/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathVecAlgo.h deleted file mode 100644 index 28bab6b..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/Imath/ImathVecAlgo.h +++ /dev/null @@ -1,147 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// 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 Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - - - -#ifndef INCLUDED_IMATHVECALGO_H -#define INCLUDED_IMATHVECALGO_H - -//------------------------------------------------------------------------- -// -// This file contains algorithms applied to or in conjunction -// with points (Imath::Vec2 and Imath::Vec3). -// The assumption made is that these functions are called much -// less often than the basic point functions or these functions -// require more support classes. -// -//------------------------------------------------------------------------- - -#include "ImathVec.h" -#include "ImathLimits.h" -#include "ImathNamespace.h" - -IMATH_INTERNAL_NAMESPACE_HEADER_ENTER - - -//----------------------------------------------------------------- -// Find the projection of vector t onto vector s (Vec2, Vec3, Vec4) -//----------------------------------------------------------------- - -template Vec project (const Vec &s, const Vec &t); - - -//------------------------------------------------ -// Find a vector that is perpendicular to s and -// in the same plane as s and t (Vec2, Vec3, Vec4) -//------------------------------------------------ - -template Vec orthogonal (const Vec &s, const Vec &t); - - -//----------------------------------------------- -// Find the direction of a ray s after reflection -// off a plane with normal t (Vec2, Vec3, Vec4) -//----------------------------------------------- - -template Vec reflect (const Vec &s, const Vec &t); - - -//-------------------------------------------------------------------- -// Find the vertex of triangle (v0, v1, v2) that is closest to point p -// (Vec2, Vec3, Vec4) -//-------------------------------------------------------------------- - -template Vec closestVertex (const Vec &v0, - const Vec &v1, - const Vec &v2, - const Vec &p); - -//--------------- -// Implementation -//--------------- - -template -Vec -project (const Vec &s, const Vec &t) -{ - Vec sNormalized = s.normalized(); - return sNormalized * (sNormalized ^ t); -} - -template -Vec -orthogonal (const Vec &s, const Vec &t) -{ - return t - project (s, t); -} - -template -Vec -reflect (const Vec &s, const Vec &t) -{ - return s - typename Vec::BaseType(2) * (s - project(t, s)); -} - -template -Vec -closestVertex(const Vec &v0, - const Vec &v1, - const Vec &v2, - const Vec &p) -{ - Vec nearest = v0; - typename Vec::BaseType neardot = (v0 - p).length2(); - typename Vec::BaseType tmp = (v1 - p).length2(); - - if (tmp < neardot) - { - neardot = tmp; - nearest = v1; - } - - tmp = (v2 - p).length2(); - - if (tmp < neardot) - { - neardot = tmp; - nearest = v2; - } - - return nearest; -} - - -IMATH_INTERNAL_NAMESPACE_HEADER_EXIT - -#endif // INCLUDED_IMATHVECALGO_H diff --git a/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2013.vcxproj b/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2013.vcxproj deleted file mode 100644 index 6a93062..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2013.vcxproj +++ /dev/null @@ -1,495 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - OpenEXR - {17A4874B-0606-4687-90B6-F91F8CB3B8AF} - OpenEXR - - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - MinSpace - OnlyExplicitInline - true - Speed - true - ./;./IlmImf;./Imath;./IexMath;./Iex;./Half;./IlmThread;../ZLib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - NotUsing - Level3 - true - Default - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - true - true - - - - - X64 - - - MinSpace - AnySuitable - true - Speed - true - ./;./IlmImf;./Imath;./IexMath;./Iex;./Half;./IlmThread;../ZLib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - NotUsing - Level3 - true - Default - 4800;%(DisableSpecificWarnings) - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - true - true - - - - - Disabled - ./;./IlmImf;./Imath;./IexMath;./Iex;./Half;./IlmThread;../ZLib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - true - true - NotUsing - Level3 - true - EditAndContinue - Default - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - true - - - - - X64 - - - Disabled - ./;./IlmImf;./Imath;./IexMath;./Iex;./Half;./IlmThread;../ZLib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - true - true - NotUsing - Level3 - true - ProgramDatabase - Default - 4800;%(DisableSpecificWarnings) - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {33134f61-c1ad-4b6f-9cea-503a9f140c52} - false - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2013.vcxproj.filters b/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2013.vcxproj.filters deleted file mode 100644 index b96d63f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2013.vcxproj.filters +++ /dev/null @@ -1,889 +0,0 @@ - - - - - {3ae95f1e-e03d-43b1-9656-4944aa6e5e8a} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {23fe3e9c-c23d-4bea-a6b2-544307f246c9} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {f0279cc2-1c62-4be4-a7d8-bfa5e405ad91} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {bf2e76a7-04e4-4042-be03-7ab100fe2a2c} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {9c661ac1-2c87-4f5e-a45d-76ab76842775} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {5968a30f-0820-4196-955e-4580044a3cf9} - - - {542dccc2-e018-453d-b903-8a8ef8005749} - - - {90ef9c88-bf45-47bb-a4a8-68764ac65242} - h;hpp;hxx;hm;inl - - - {bd459e90-3dae-4b9b-b5cb-76d2407c0908} - h;hpp;hxx;hm;inl - - - {73a0c0a2-98d5-4aa3-9486-46a9e39ab826} - h;hpp;hxx;hm;inl - - - {2d41389f-a810-4b64-9cbc-279f170f260d} - h;hpp;hxx;hm;inl - - - {19acba37-c638-48b6-9679-24a98411ab1d} - h;hpp;hxx;hm;inl - - - {3f37cb3e-6374-4d66-a36b-f31de14b3b78} - - - {c43ac413-feb4-49c6-8907-fcc20948ed0a} - - - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Iex Source Files - - - Source Files\Iex Source Files - - - Source Files\Half Source Files - - - Source Files\IlmThread Source Files - - - Source Files\IlmThread Source Files - - - Source Files\IlmThread Source Files - - - Source Files\IlmThread Source Files - - - Source Files\IexMath Source Files - - - Source Files\IexMath Source Files - - - - - Header Files - - - Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Half Header Files - - - Header Files\Half Header Files - - - Header Files\Half Header Files - - - Header Files\Half Header Files - - - Header Files\Half Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IexMath Header Files - - - Header Files\IexMath Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2017.vcxproj b/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2017.vcxproj deleted file mode 100644 index 7e9704f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2017.vcxproj +++ /dev/null @@ -1,496 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - OpenEXR - {17A4874B-0606-4687-90B6-F91F8CB3B8AF} - OpenEXR - 10.0.16299.0 - - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - MinSpace - AnySuitable - true - Speed - true - ./;./IlmImf;./Imath;./IexMath;./Iex;./Half;./IlmThread;../ZLib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - NotUsing - Level3 - true - Default - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - true - true - - - - - X64 - - - MinSpace - AnySuitable - true - Speed - true - ./;./IlmImf;./Imath;./IexMath;./Iex;./Half;./IlmThread;../ZLib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - NotUsing - Level3 - true - Default - 4800;%(DisableSpecificWarnings) - false - None - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - true - true - - - - - Disabled - ./;./IlmImf;./Imath;./IexMath;./Iex;./Half;./IlmThread;../ZLib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - true - true - NotUsing - Level3 - true - EditAndContinue - Default - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - true - - - - - X64 - - - Disabled - ./;./IlmImf;./Imath;./IexMath;./Iex;./Half;./IlmThread;../ZLib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - true - true - NotUsing - Level3 - true - ProgramDatabase - Default - 4800;%(DisableSpecificWarnings) - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {33134f61-c1ad-4b6f-9cea-503a9f140c52} - false - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2017.vcxproj.filters b/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2017.vcxproj.filters deleted file mode 100644 index b96d63f..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/OpenEXR.2017.vcxproj.filters +++ /dev/null @@ -1,889 +0,0 @@ - - - - - {3ae95f1e-e03d-43b1-9656-4944aa6e5e8a} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {23fe3e9c-c23d-4bea-a6b2-544307f246c9} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {f0279cc2-1c62-4be4-a7d8-bfa5e405ad91} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {bf2e76a7-04e4-4042-be03-7ab100fe2a2c} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {9c661ac1-2c87-4f5e-a45d-76ab76842775} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {5968a30f-0820-4196-955e-4580044a3cf9} - - - {542dccc2-e018-453d-b903-8a8ef8005749} - - - {90ef9c88-bf45-47bb-a4a8-68764ac65242} - h;hpp;hxx;hm;inl - - - {bd459e90-3dae-4b9b-b5cb-76d2407c0908} - h;hpp;hxx;hm;inl - - - {73a0c0a2-98d5-4aa3-9486-46a9e39ab826} - h;hpp;hxx;hm;inl - - - {2d41389f-a810-4b64-9cbc-279f170f260d} - h;hpp;hxx;hm;inl - - - {19acba37-c638-48b6-9679-24a98411ab1d} - h;hpp;hxx;hm;inl - - - {3f37cb3e-6374-4d66-a36b-f31de14b3b78} - - - {c43ac413-feb4-49c6-8907-fcc20948ed0a} - - - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\IlmImf Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Imath Source Files - - - Source Files\Iex Source Files - - - Source Files\Iex Source Files - - - Source Files\Half Source Files - - - Source Files\IlmThread Source Files - - - Source Files\IlmThread Source Files - - - Source Files\IlmThread Source Files - - - Source Files\IlmThread Source Files - - - Source Files\IexMath Source Files - - - Source Files\IexMath Source Files - - - - - Header Files - - - Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\IlmImf Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Imath Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Iex Header Files - - - Header Files\Half Header Files - - - Header Files\Half Header Files - - - Header Files\Half Header Files - - - Header Files\Half Header Files - - - Header Files\Half Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IlmThread Header Files - - - Header Files\IexMath Header Files - - - Header Files\IexMath Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/OpenEXR/OpenEXRConfig.h b/Dependencies/FreeImage/Source/OpenEXR/OpenEXRConfig.h deleted file mode 100644 index 5455600..0000000 --- a/Dependencies/FreeImage/Source/OpenEXR/OpenEXRConfig.h +++ /dev/null @@ -1,72 +0,0 @@ -// -// Define and set to 1 if the target system supports a proc filesystem -// compatible with the Linux kernel's proc filesystem. Note that this -// is only used by a program in the IlmImfTest test suite, it's not -// used by any OpenEXR library or application code. -// - -#undef OPENEXR_IMF_HAVE_LINUX_PROCFS - -// -// Define and set to 1 if the target system is a Darwin-based system -// (e.g., OS X). -// - -/* #undef OPENEXR_IMF_HAVE_DARWIN */ - -// -// Define and set to 1 if the target system has a complete -// implementation, specifically if it supports the std::right -// formatter. -// - -#define OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1 - -// -// Define and set to 1 if the target system has support for large -// stack sizes. -// - -#define OPENEXR_IMF_HAVE_LARGE_STACK 1 - -// -// Define if we can support GCC style inline asm with AVX instructions -// - -#undef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX - -// -// Define if we can use sysconf(_SC_NPROCESSORS_ONLN) to get CPU count -// - -#undef OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN - -// -// Current internal library namepace name -// -#define OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM 1 -#define OPENEXR_IMF_INTERNAL_NAMESPACE Imf_2_2 - -// -// Current public user namepace name -// - -/* #undef OPENEXR_IMF_NAMESPACE_CUSTOM */ -#define OPENEXR_IMF_NAMESPACE Imf - -// -// Version string for runtime access -// - -#define OPENEXR_VERSION_STRING "2.2.0" -#define OPENEXR_PACKAGE_STRING "OpenEXR 2.2.0" - -#define OPENEXR_VERSION_MAJOR 2 -#define OPENEXR_VERSION_MINOR 2 -#define OPENEXR_VERSION_PATCH 0 - -// Version as a single hex number, e.g. 0x01000300 == 1.0.3 -#define OPENEXR_VERSION_HEX ((OPENEXR_VERSION_MAJOR << 24) | \ - (OPENEXR_VERSION_MINOR << 16) | \ - (OPENEXR_VERSION_PATCH << 8)) - diff --git a/Dependencies/FreeImage/Source/Plugin.h b/Dependencies/FreeImage/Source/Plugin.h deleted file mode 100644 index 5886fd7..0000000 --- a/Dependencies/FreeImage/Source/Plugin.h +++ /dev/null @@ -1,144 +0,0 @@ -// ========================================================== -// FreeImage Plugin Interface -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Rui Lopes (ruiglopes@yahoo.com) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifdef _MSC_VER -#pragma warning (disable : 4786) // identifier was truncated to 'number' characters -#endif - -#ifndef PLUGIN_H -#define PLUGIN_H - -#include "FreeImage.h" -#include "Utilities.h" - -// ========================================================== - -struct Plugin; - -// ===================================================================== -// Plugin Node -// ===================================================================== - -FI_STRUCT (PluginNode) { - /** FREE_IMAGE_FORMAT attached to this plugin */ - int m_id; - /** Handle to a user plugin DLL (NULL for standard plugins) */ - void *m_instance; - /** The actual plugin, holding the function pointers */ - Plugin *m_plugin; - /** Enable/Disable switch */ - BOOL m_enabled; - - /** Unique format string for the plugin */ - const char *m_format; - /** Description string for the plugin */ - const char *m_description; - /** Comma separated list of file extensions indicating what files this plugin can open */ - const char *m_extension; - /** optional regular expression to help software identifying a bitmap type */ - const char *m_regexpr; -}; - -// ===================================================================== -// Internal Plugin List -// ===================================================================== - -class PluginList { -public : - PluginList(); - ~PluginList(); - - FREE_IMAGE_FORMAT AddNode(FI_InitProc proc, void *instance = NULL, const char *format = 0, const char *description = 0, const char *extension = 0, const char *regexpr = 0); - PluginNode *FindNodeFromFormat(const char *format); - PluginNode *FindNodeFromMime(const char *mime); - PluginNode *FindNodeFromFIF(int node_id); - - int Size() const; - BOOL IsEmpty() const; - -private : - std::map m_plugin_map; - int m_node_count; -}; - -// ========================================================== -// Plugin Initialisation Callback -// ========================================================== - -void DLL_CALLCONV FreeImage_OutputMessage(int fif, const char *message, ...); - -// ===================================================================== -// Reimplementation of stricmp (it is not supported on some systems) -// ===================================================================== - -int FreeImage_stricmp(const char *s1, const char *s2); - -// ========================================================== -// Internal functions -// ========================================================== - -extern "C" { - BOOL DLL_CALLCONV FreeImage_ValidateFIF(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle); - void * DLL_CALLCONV FreeImage_Open(PluginNode *node, FreeImageIO *io, fi_handle handle, BOOL open_for_reading); - void DLL_CALLCONV FreeImage_Close(PluginNode *node, FreeImageIO *io, fi_handle handle, void *data); // plugin.cpp - PluginList * DLL_CALLCONV FreeImage_GetPluginList(); // plugin.cpp -} - -// ========================================================== -// Internal plugins -// ========================================================== - -void DLL_CALLCONV InitBMP(Plugin *plugin, int format_id); -void DLL_CALLCONV InitCUT(Plugin *plugin, int format_id); -void DLL_CALLCONV InitICO(Plugin *plugin, int format_id); -void DLL_CALLCONV InitIFF(Plugin *plugin, int format_id); -void DLL_CALLCONV InitJPEG(Plugin *plugin, int format_id); -void DLL_CALLCONV InitKOALA(Plugin *plugin, int format_id); -void DLL_CALLCONV InitLBM(Plugin *plugin, int format_id); -void DLL_CALLCONV InitMNG(Plugin *plugin, int format_id); -void DLL_CALLCONV InitPCD(Plugin *plugin, int format_id); -void DLL_CALLCONV InitPCX(Plugin *plugin, int format_id); -void DLL_CALLCONV InitPNG(Plugin *plugin, int format_id); -void DLL_CALLCONV InitPNM(Plugin *plugin, int format_id); -void DLL_CALLCONV InitPSD(Plugin *plugin, int format_id); -void DLL_CALLCONV InitRAS(Plugin *plugin, int format_id); -void DLL_CALLCONV InitTARGA(Plugin *plugin, int format_id); -void DLL_CALLCONV InitTIFF(Plugin *plugin, int format_id); -void DLL_CALLCONV InitWBMP(Plugin *plugin, int format_id); -void DLL_CALLCONV InitXBM(Plugin *plugin, int format_id); -void DLL_CALLCONV InitXPM(Plugin *plugin, int format_id); -void DLL_CALLCONV InitDDS(Plugin *plugin, int format_id); -void DLL_CALLCONV InitGIF(Plugin *plugin, int format_id); -void DLL_CALLCONV InitHDR(Plugin *plugin, int format_id); -void DLL_CALLCONV InitG3(Plugin *plugin, int format_id); -void DLL_CALLCONV InitSGI(Plugin *plugin, int format_id); -void DLL_CALLCONV InitEXR(Plugin *plugin, int format_id); -void DLL_CALLCONV InitJ2K(Plugin *plugin, int format_id); -void DLL_CALLCONV InitJP2(Plugin *plugin, int format_id); -void DLL_CALLCONV InitPFM(Plugin *plugin, int format_id); -void DLL_CALLCONV InitPICT(Plugin *plugin, int format_id); -void DLL_CALLCONV InitRAW(Plugin *plugin, int format_id); -void DLL_CALLCONV InitJNG(Plugin *plugin, int format_id); -void DLL_CALLCONV InitWEBP(Plugin *plugin, int format_id); -void DLL_CALLCONV InitJXR(Plugin *plugin, int format_id); - -#endif //!PLUGIN_H diff --git a/Dependencies/FreeImage/Source/Quantizers.h b/Dependencies/FreeImage/Source/Quantizers.h deleted file mode 100644 index 7591c9b..0000000 --- a/Dependencies/FreeImage/Source/Quantizers.h +++ /dev/null @@ -1,359 +0,0 @@ -// ============================================================= -// Quantizer objects and functions -// -// Design and implementation by: -// - Herv Drolon -// - Carsten Klein (cklein05@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ============================================================= - -#ifndef FREEIMAGE_QUANTIZER_H -#define FREEIMAGE_QUANTIZER_H - -// -//////////////////////////////////////////////////////////////// - -#include "FreeImage.h" - -//////////////////////////////////////////////////////////////// - -/** - Xiaolin Wu color quantization algorithm -*/ -class WuQuantizer -{ -public: - -typedef struct tagBox { - int r0; // min value, exclusive - int r1; // max value, inclusive - int g0; - int g1; - int b0; - int b1; - int vol; -} Box; - -protected: - float *gm2; - LONG *wt, *mr, *mg, *mb; - WORD *Qadd; - - // DIB data - unsigned width, height; - unsigned pitch; - FIBITMAP *m_dib; - -protected: - void Hist3D(LONG *vwt, LONG *vmr, LONG *vmg, LONG *vmb, float *m2, int ReserveSize, RGBQUAD *ReservePalette); - void M3D(LONG *vwt, LONG *vmr, LONG *vmg, LONG *vmb, float *m2); - LONG Vol(Box *cube, LONG *mmt); - LONG Bottom(Box *cube, BYTE dir, LONG *mmt); - LONG Top(Box *cube, BYTE dir, int pos, LONG *mmt); - float Var(Box *cube); - float Maximize(Box *cube, BYTE dir, int first, int last , int *cut, - LONG whole_r, LONG whole_g, LONG whole_b, LONG whole_w); - bool Cut(Box *set1, Box *set2); - void Mark(Box *cube, int label, BYTE *tag); - -public: - // Constructor - Input parameter: DIB 24-bit to be quantized - WuQuantizer(FIBITMAP *dib); - // Destructor - ~WuQuantizer(); - // Quantizer - Return value: quantized 8-bit (color palette) DIB - FIBITMAP* Quantize(int PaletteSize, int ReserveSize, RGBQUAD *ReservePalette); -}; - - -/** - NEUQUANT Neural-Net quantization algorithm by Anthony Dekker -*/ - -// ---------------------------------------------------------------- -// Constant definitions -// ---------------------------------------------------------------- - -/** number of colours used: - for 256 colours, fixed arrays need 8kb, plus space for the image -*/ -//static const int netsize = 256; - -/**@name network definitions */ -//@{ -//static const int maxnetpos = (netsize - 1); -/// bias for colour values -static const int netbiasshift = 4; -/// no. of learning cycles -static const int ncycles = 100; -//@} - -/**@name defs for freq and bias */ -//@{ -/// bias for fractions -static const int intbiasshift = 16; -static const int intbias = (((int)1) << intbiasshift); -/// gamma = 1024 -static const int gammashift = 10; -// static const int gamma = (((int)1) << gammashift); -/// beta = 1 / 1024 -static const int betashift = 10; -static const int beta = (intbias >> betashift); -static const int betagamma = (intbias << (gammashift-betashift)); -//@} - -/**@name defs for decreasing radius factor */ -//@{ -/// for 256 cols, radius starts -//static const int initrad = (netsize >> 3); -/// at 32.0 biased by 6 bits -static const int radiusbiasshift = 6; -static const int radiusbias = (((int)1) << radiusbiasshift); -/// and decreases by a -//static const int initradius = (initrad * radiusbias); -// factor of 1/30 each cycle -static const int radiusdec = 30; -//@} - -/**@name defs for decreasing alpha factor */ -//@{ -/// alpha starts at 1.0 -static const int alphabiasshift = 10; -static const int initalpha = (((int)1) << alphabiasshift); -//@} - -/**@name radbias and alpharadbias used for radpower calculation */ -//@{ -static const int radbiasshift = 8; -static const int radbias = (((int)1) << radbiasshift); -static const int alpharadbshift = (alphabiasshift+radbiasshift); -static const int alpharadbias = (((int)1) << alpharadbshift); -//@} - -class NNQuantizer -{ -protected: - /**@name image parameters */ - //@{ - /// pointer to input dib - FIBITMAP *dib_ptr; - /// image width - int img_width; - /// image height - int img_height; - /// image line length - int img_line; - //@} - - /**@name network parameters */ - //@{ - - int netsize, maxnetpos, initrad, initradius; - - /// BGRc - typedef int pixel[4]; - /// the network itself - pixel *network; - - /// for network lookup - really 256 - int netindex[256]; - - /// bias array for learning - int *bias; - /// freq array for learning - int *freq; - /// radpower for precomputation - int *radpower; - //@} - -protected: - /// Initialise network in range (0,0,0) to (255,255,255) and set parameters - void initnet(); - - /// Unbias network to give byte values 0..255 and record position i to prepare for sort - void unbiasnet(); - - /// Insertion sort of network and building of netindex[0..255] (to do after unbias) - void inxbuild(); - - /// Search for BGR values 0..255 (after net is unbiased) and return colour index - int inxsearch(int b, int g, int r); - - /// Search for biased BGR values - int contest(int b, int g, int r); - - /// Move neuron i towards biased (b,g,r) by factor alpha - void altersingle(int alpha, int i, int b, int g, int r); - - /// Move adjacent neurons by precomputed alpha*(1-((i-j)^2/[r]^2)) in radpower[|i-j|] - void alterneigh(int rad, int i, int b, int g, int r); - - /** Main Learning Loop - @param sampling_factor sampling factor in [1..30] - */ - void learn(int sampling_factor); - - /// Get a pixel sample at position pos. Handle 4-byte boundary alignment. - void getSample(long pos, int *b, int *g, int *r); - - -public: - /// Constructor - NNQuantizer(int PaletteSize); - - /// Destructor - ~NNQuantizer(); - - /** Quantizer - @param dib input 24-bit dib to be quantized - @param sampling a sampling factor in range 1..30. - 1 => slower (but better), 30 => faster. Default value is 1 - @return returns the quantized 8-bit (color palette) DIB - */ - FIBITMAP* Quantize(FIBITMAP *dib, int ReserveSize, RGBQUAD *ReservePalette, int sampling = 1); - -}; - -/** - * LFPQUANT - Lossless Fast Pseudo-Quantization Algorithm - * - * The Lossless Fast Pseudo-Quantization algorithm is no real quantization - * algorithm, since it makes no attempt to create a palette, that is suitable - * for all colors of the 24-bit source image. However, it provides very fast - * conversions from 24-bit to 8-bit images, if the number of distinct colors - * in the source image is not greater than the desired palette size. If the - * number of colors in the source image is exceeded, the Quantize method of - * this implementation stops the process and returns NULL. - * - * This implementation uses a very fast hash map implementation to collect - * the source image's colors. It turned out that a customized implementation - * of a hash table with open addressing (using linear probing) provides the - * best performance. The hash table has 512 entries, which prevents the load - * factor to exceed 0.5 as we have 256 entries at most. Each entry consumes - * 64 bits, so the whole hash table takes 4KB of memory. - * - * For large images, the LFPQuantizer is typically up to three times faster - * than the WuQuantizer. - */ -class LFPQuantizer { -public: - /** Constructor */ - LFPQuantizer(unsigned PaletteSize); - - /** Destructor */ - ~LFPQuantizer(); - - /** - * Quantizer - * @param dib input 24-bit or 32-bit bitmap to be quantized - * @return returns the pseudo-quantized 8-bit bitmap - */ - FIBITMAP* Quantize(FIBITMAP *dib, int ReserveSize, RGBQUAD *ReservePalette); - -protected: - /** The maximum size of a palette. */ - static const unsigned MAX_SIZE = 256; - - /** - * The size of the hash table. Must be a power of 2. By sizing it - * MAX_SIZE * 2, we ensure the load factor not to exceed 0.5 at any - * time, since we will have MAX_SIZE entries at most. - */ - static const unsigned MAP_SIZE = MAX_SIZE * 2; - - /** - * With open addressing we need a special value for empty buckets. - * Both entry.color and entry.index are 0xFFFFFFFF for an empty - * entry. - */ - static const unsigned EMPTY_BUCKET = 0xFFFFFFFF; - - /** - * This structure defines a single entry in the hash table. We use - * color as the entry's key. - */ - typedef struct MapEntry { - unsigned color; - unsigned index; - } MapEntry; - - /** The hash table. */ - MapEntry *m_map; - - /** - * The current size of the newly created palette. Since the provided - * reserve palette could contain duplicates, this is not necessarily - * the number of entries in the hash table. Initialized to zero. - */ - unsigned m_size; - - /** - * The desired maximum number of entries in the newly created palette. - * If m_size exceeds this value, the palette is full and the - * quantization process is stopped. Initialized to the desired - * palette size. - */ - unsigned m_limit; - - /** - * The palette index used for the next color added. Initialized to - * zero (the reserve palette is put to the end of the palette). - */ - unsigned m_index; - - /** - * Ensures that hash codes that differ only by constant multiples - * at each bit position have a bounded number of collisions. - * @param h the initial (aka raw) hash code - * @return the modified hash code - */ - static inline unsigned hash(unsigned h) { - h ^= (h >> 20) ^ (h >> 12); - return h ^ (h >> 7) ^ (h >> 4); - } - - /** - * Returns the palette index of the specified color. Tries to put the - * color into the map, if it's not already present in the map. In that - * case, a new index is used for the color. Returns -1, if adding the - * color would exceed the desired maximum number of colors in the - * palette. - * @param color the color to get the index from - * @return the palette index of the specified color or -1, if there - * is no space left in the palette - */ - int GetIndexForColor(unsigned color); - - /** - * Adds the specified number of entries of the specified reserve - * palette to the newly created palette. - * @param *palette a pointer to the reserve palette to copy from - * @param size the number of entries to copy - */ - void AddReservePalette(const void *palette, unsigned size); - - /** - * Copies the newly created palette into the specified destination - * palettte. Although unused palette entries are not overwritten in - * the destination palette, it is assumed to have space for at - * least 256 entries. - * @param palette a pointer to the destination palette - */ - void WritePalette(void *palette); - -}; - -#endif // FREEIMAGE_QUANTIZER_H diff --git a/Dependencies/FreeImage/Source/ToneMapping.h b/Dependencies/FreeImage/Source/ToneMapping.h deleted file mode 100644 index e3f88dc..0000000 --- a/Dependencies/FreeImage/Source/ToneMapping.h +++ /dev/null @@ -1,45 +0,0 @@ -// ========================================================== -// High Dynamic Range bitmap conversion routines -// -// Design and implementation by -// - Herv Drolon (drolon@infonie.fr) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifndef FREEIMAGE_TONE_MAPPING_H -#define FREEIMAGE_TONE_MAPPING_H - -#ifdef __cplusplus -extern "C" { -#endif - -BOOL ConvertInPlaceRGBFToYxy(FIBITMAP *dib); -BOOL ConvertInPlaceYxyToRGBF(FIBITMAP *dib); -FIBITMAP* ConvertRGBFToY(FIBITMAP *src); - -BOOL LuminanceFromYxy(FIBITMAP *dib, float *maxLum, float *minLum, float *worldLum); -BOOL LuminanceFromY(FIBITMAP *dib, float *maxLum, float *minLum, float *Lav, float *Llav); - -void NormalizeY(FIBITMAP *Y, float minPrct, float maxPrct); - -FIBITMAP* ClampConvertRGBFTo24(FIBITMAP *src); - -#ifdef __cplusplus -} -#endif - -#endif // FREEIMAGE_TONE_MAPPING_H - diff --git a/Dependencies/FreeImage/Source/Utilities.h b/Dependencies/FreeImage/Source/Utilities.h deleted file mode 100644 index e4475d5..0000000 --- a/Dependencies/FreeImage/Source/Utilities.h +++ /dev/null @@ -1,536 +0,0 @@ -// ========================================================== -// Utility functions -// -// Design and implementation by -// - Floris van den Berg (flvdberg@wxs.nl) -// - Hervé Drolon -// - Ryan Rubley (ryan@lostreality.org) -// - Mihail Naydenov (mnaydenov@users.sourceforge.net) -// -// This file is part of FreeImage 3 -// -// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE -// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT -// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER -// THIS DISCLAIMER. -// -// Use at your own risk! -// ========================================================== - -#ifndef FREEIMAGE_UTILITIES_H -#define FREEIMAGE_UTILITIES_H - -// ========================================================== -// Standard includes used by the library -// ========================================================== - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// ========================================================== -// Bitmap palette and pixels alignment -// ========================================================== - -#define FIBITMAP_ALIGNMENT 16 // We will use a 16 bytes alignment boundary - -// Memory allocation on a specified alignment boundary -// defined in BitmapAccess.cpp - -void* FreeImage_Aligned_Malloc(size_t amount, size_t alignment); -void FreeImage_Aligned_Free(void* mem); - -#if defined(__cplusplus) -extern "C" { -#endif - -/** -Allocate a FIBITMAP with possibly no pixel data -(i.e. only header data and some or all metadata) -@param header_only If TRUE, allocate a 'header only' FIBITMAP, otherwise allocate a full FIBITMAP -@param type Image type -@param width Image width -@param height Image height -@param bpp Number of bits per pixel -@param red_mask Image red mask -@param green_mask Image green mask -@param blue_mask Image blue mask -@return Returns the allocated FIBITMAP -@see FreeImage_AllocateT -*/ -DLL_API FIBITMAP * DLL_CALLCONV FreeImage_AllocateHeaderT(BOOL header_only, FREE_IMAGE_TYPE type, int width, int height, int bpp FI_DEFAULT(8), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0)); - -/** -Allocate a FIBITMAP of type FIT_BITMAP, with possibly no pixel data -(i.e. only header data and some or all metadata) -@param header_only If TRUE, allocate a 'header only' FIBITMAP, otherwise allocate a full FIBITMAP -@param width Image width -@param height Image height -@param bpp Number of bits per pixel -@param red_mask Image red mask -@param green_mask Image green mask -@param blue_mask Image blue mask -@return Returns the allocated FIBITMAP -@see FreeImage_Allocate -*/ -DLL_API FIBITMAP * DLL_CALLCONV FreeImage_AllocateHeader(BOOL header_only, int width, int height, int bpp, unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0)); - -/** -Allocate a FIBITMAP with no pixel data and wrap a user provided pixel buffer -@param ext_bits Pointer to external user's pixel buffer -@param ext_pitch Pointer to external user's pixel buffer pitch -@param type Image type -@param width Image width -@param height Image height -@param bpp Number of bits per pixel -@param red_mask Image red mask -@param green_mask Image green mask -@param blue_mask Image blue mask -@return Returns the allocated FIBITMAP -@see FreeImage_ConvertFromRawBitsEx -*/ -DLL_API FIBITMAP * DLL_CALLCONV FreeImage_AllocateHeaderForBits(BYTE *ext_bits, unsigned ext_pitch, FREE_IMAGE_TYPE type, int width, int height, int bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask); - -/** -Helper for 16-bit FIT_BITMAP -@see FreeImage_GetRGBMasks -*/ -DLL_API BOOL DLL_CALLCONV FreeImage_HasRGBMasks(FIBITMAP *dib); - -#if defined(__cplusplus) -} -#endif - - -// ========================================================== -// File I/O structs -// ========================================================== - -// these structs are for file I/O and should not be confused with similar -// structs in FreeImage.h which are for in-memory bitmap handling - -#ifdef _WIN32 -#pragma pack(push, 1) -#else -#pragma pack(1) -#endif // _WIN32 - -typedef struct tagFILE_RGBA { - unsigned char r,g,b,a; -} FILE_RGBA; - -typedef struct tagFILE_BGRA { - unsigned char b,g,r,a; -} FILE_BGRA; - -typedef struct tagFILE_RGB { - unsigned char r,g,b; -} FILE_RGB; - -typedef struct tagFILE_BGR { - unsigned char b,g,r; -} FILE_BGR; - -#ifdef _WIN32 -#pragma pack(pop) -#else -#pragma pack() -#endif // _WIN32 - -// ========================================================== -// Template utility functions -// ========================================================== - -/// Max function -template T MAX(const T &a, const T &b) { - return (a > b) ? a: b; -} - -/// Min function -template T MIN(const T &a, const T &b) { - return (a < b) ? a: b; -} - -/// INPLACESWAP adopted from codeguru.com -template void INPLACESWAP(T& a, T& b) { - a ^= b; b ^= a; a ^= b; -} - -/// Clamp function -template T CLAMP(const T &value, const T &min_value, const T &max_value) { - return ((value < min_value) ? min_value : (value > max_value) ? max_value : value); -} - -/** This procedure computes minimum min and maximum max - of n numbers using only (3n/2) - 2 comparisons. - min = L[i1] and max = L[i2]. - ref: Aho A.V., Hopcroft J.E., Ullman J.D., - The design and analysis of computer algorithms, - Addison-Wesley, Reading, 1974. -*/ -template void -MAXMIN(const T* L, long n, T& max, T& min) { - long i1, i2, i, j; - T x1, x2; - long k1, k2; - - i1 = 0; i2 = 0; min = L[0]; max = L[0]; j = 0; - if((n % 2) != 0) j = 1; - for(i = j; i < n; i+= 2) { - k1 = i; k2 = i+1; - x1 = L[k1]; x2 = L[k2]; - if(x1 > x2) { - k1 = k2; k2 = i; - x1 = x2; x2 = L[k2]; - } - if(x1 < min) { - min = x1; i1 = k1; - } - if(x2 > max) { - max = x2; i2 = k2; - } - } -} - -// ========================================================== -// Utility functions -// ========================================================== - -#ifndef _WIN32 -inline char* -i2a(unsigned i, char *a, unsigned r) { - if (i/r > 0) a = i2a(i/r,a,r); - *a = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[i%r]; - return a+1; -} - -/** - Transforms integer i into an ascii string and stores the result in a; - string is encoded in the base indicated by r. - @param i Number to be converted - @param a String result - @param r Base of value; must be in the range 2 - 36 - @return Returns a -*/ -inline char * -_itoa(int i, char *a, int r) { - r = ((r < 2) || (r > 36)) ? 10 : r; - if(i < 0) { - *a = '-'; - *i2a(-i, a+1, r) = 0; - } - else *i2a(i, a, r) = 0; - return a; -} - -#endif // !_WIN32 - -inline unsigned char -HINIBBLE (unsigned char byte) { - return byte & 0xF0; -} - -inline unsigned char -LOWNIBBLE (unsigned char byte) { - return byte & 0x0F; -} - -inline int -CalculateUsedBits(int bits) { - int bit_count = 0; - unsigned bit = 1; - - for (unsigned i = 0; i < 32; i++) { - if ((bits & bit) == bit) { - bit_count++; - } - - bit <<= 1; - } - - return bit_count; -} - -inline unsigned -CalculateLine(const unsigned width, const unsigned bitdepth) { - return (unsigned)( ((unsigned long long)width * bitdepth + 7) / 8 ); -} - -inline unsigned -CalculatePitch(const unsigned line) { - return (line + 3) & ~3; -} - -inline unsigned -CalculateUsedPaletteEntries(const unsigned bit_count) { - if ((bit_count >= 1) && (bit_count <= 8)) { - return 1 << bit_count; - } - - return 0; -} - -inline BYTE* -CalculateScanLine(BYTE *bits, const unsigned pitch, const int scanline) { - return bits ? (bits + ((size_t)pitch * scanline)) : NULL; -} - -// ---------------------------------------------------------- - -/** -Fast generic assign (faster than for loop) -@param dst Destination pixel -@param src Source pixel -@param bytesperpixel # of bytes per pixel -*/ -inline void -AssignPixel(BYTE* dst, const BYTE* src, unsigned bytesperpixel) { - switch (bytesperpixel) { - case 1: // FIT_BITMAP (8-bit) - *dst = *src; - break; - - case 2: // FIT_UINT16 / FIT_INT16 / 16-bit - *(reinterpret_cast(dst)) = *(reinterpret_cast (src)); - break; - - case 3: // FIT_BITMAP (24-bit) - *(reinterpret_cast(dst)) = *(reinterpret_cast (src)); - dst[2] = src[2]; - break; - - case 4: // FIT_BITMAP (32-bit) / FIT_UINT32 / FIT_INT32 / FIT_FLOAT - *(reinterpret_cast(dst)) = *(reinterpret_cast (src)); - break; - - case 6: // FIT_RGB16 (3 x 16-bit) - *(reinterpret_cast(dst)) = *(reinterpret_cast (src)); - *(reinterpret_cast(dst + 4)) = *(reinterpret_cast (src + 4)); - break; - - // the rest can be speeded up with int64 - - case 8: // FIT_RGBA16 (4 x 16-bit) - *(reinterpret_cast(dst)) = *(reinterpret_cast (src)); - *(reinterpret_cast(dst + 4)) = *(reinterpret_cast (src + 4)); - break; - - case 12: // FIT_RGBF (3 x 32-bit IEEE floating point) - *(reinterpret_cast(dst)) = *(reinterpret_cast (src)); - *(reinterpret_cast(dst + 4)) = *(reinterpret_cast (src + 4)); - *(reinterpret_cast(dst + 8)) = *(reinterpret_cast (src + 8)); - break; - - case 16: // FIT_RGBAF (4 x 32-bit IEEE floating point) - *(reinterpret_cast(dst)) = *(reinterpret_cast (src)); - *(reinterpret_cast(dst + 4)) = *(reinterpret_cast (src + 4)); - *(reinterpret_cast(dst + 8)) = *(reinterpret_cast (src + 8)); - *(reinterpret_cast(dst + 12)) = *(reinterpret_cast (src + 12)); - break; - - default: - assert(FALSE); - } -} - -/** -Swap red and blue channels in a 24- or 32-bit dib. -@return Returns TRUE if successful, returns FALSE otherwise -@see See definition in Conversion.cpp -*/ -BOOL SwapRedBlue32(FIBITMAP* dib); - -/** -Inplace convert CMYK to RGBA.(8- and 16-bit). -Alpha is filled with the first extra channel if any or white otherwise. -@return Returns TRUE if successful, returns FALSE otherwise -@see See definition in Conversion.cpp -*/ -BOOL ConvertCMYKtoRGBA(FIBITMAP* dib); - -/** -Inplace convert CIELab to RGBA (8- and 16-bit). -@return Returns TRUE if successful, returns FALSE otherwise -@see See definition in Conversion.cpp -*/ -BOOL ConvertLABtoRGB(FIBITMAP* dib); - -/** -RGBA to RGB conversion -@see See definition in Conversion.cpp -*/ -FIBITMAP* RemoveAlphaChannel(FIBITMAP* dib); - -/** -Rotate a dib according to Exif info -@param dib Input / Output dib to rotate -@see Exif.cpp, PluginJPEG.cpp -*/ -void RotateExif(FIBITMAP **dib); - - -// ========================================================== -// Big Endian / Little Endian utility functions -// ========================================================== - -inline WORD -__SwapUInt16(WORD arg) { -#if defined(_MSC_VER) && _MSC_VER >= 1310 - return _byteswap_ushort(arg); -#elif defined(__i386__) && defined(__GNUC__) - __asm__("xchgb %b0, %h0" : "+q" (arg)); - return arg; -#elif defined(__ppc__) && defined(__GNUC__) - WORD result; - __asm__("lhbrx %0,0,%1" : "=r" (result) : "r" (&arg), "m" (arg)); - return result; -#else - // swap bytes - WORD result; - result = ((arg << 8) & 0xFF00) | ((arg >> 8) & 0x00FF); - return result; -#endif -} - -inline DWORD -__SwapUInt32(DWORD arg) { -#if defined(_MSC_VER) && _MSC_VER >= 1310 - return _byteswap_ulong(arg); -#elif defined(__i386__) && defined(__GNUC__) - __asm__("bswap %0" : "+r" (arg)); - return arg; -#elif defined(__ppc__) && defined(__GNUC__) - DWORD result; - __asm__("lwbrx %0,0,%1" : "=r" (result) : "r" (&arg), "m" (arg)); - return result; -#else - // swap words then bytes - DWORD result; - result = ((arg & 0x000000FF) << 24) | ((arg & 0x0000FF00) << 8) | ((arg >> 8) & 0x0000FF00) | ((arg >> 24) & 0x000000FF); - return result; -#endif -} - -inline void -SwapShort(WORD *sp) { - *sp = __SwapUInt16(*sp); -} - -inline void -SwapLong(DWORD *lp) { - *lp = __SwapUInt32(*lp); -} - -inline void -SwapInt64(UINT64 *arg) { -#if defined(_MSC_VER) && _MSC_VER >= 1310 - *arg = _byteswap_uint64(*arg); -#else - union Swap { - UINT64 sv; - DWORD ul[2]; - } tmp, result; - tmp.sv = *arg; - SwapLong(&tmp.ul[0]); - SwapLong(&tmp.ul[1]); - result.ul[0] = tmp.ul[1]; - result.ul[1] = tmp.ul[0]; - *arg = result.sv; -#endif -} - -// ========================================================== -// Greyscale and color conversion -// ========================================================== - -/** -Extract the luminance channel L from a RGBF image. -Luminance is calculated from the sRGB model using a D65 white point, using the Rec.709 formula : -L = ( 0.2126 * r ) + ( 0.7152 * g ) + ( 0.0722 * b ) -Reference : -A Standard Default Color Space for the Internet - sRGB. -[online] http://www.w3.org/Graphics/Color/sRGB -*/ -#define LUMA_REC709(r, g, b) (0.2126F * r + 0.7152F * g + 0.0722F * b) - -#define GREY(r, g, b) (BYTE)(LUMA_REC709(r, g, b) + 0.5F) -/* -#define GREY(r, g, b) (BYTE)(((WORD)r * 77 + (WORD)g * 150 + (WORD)b * 29) >> 8) // .299R + .587G + .114B -*/ -/* -#define GREY(r, g, b) (BYTE)(((WORD)r * 169 + (WORD)g * 256 + (WORD)b * 87) >> 9) // .33R + 0.5G + .17B -*/ - -/** -Convert a RGB 24-bit value to a 16-bit 565 value -*/ -#define RGB565(b, g, r) ((((b) >> 3) << FI16_565_BLUE_SHIFT) | (((g) >> 2) << FI16_565_GREEN_SHIFT) | (((r) >> 3) << FI16_565_RED_SHIFT)) - -/** -Convert a RGB 24-bit value to a 16-bit 555 value -*/ -#define RGB555(b, g, r) ((((b) >> 3) << FI16_555_BLUE_SHIFT) | (((g) >> 3) << FI16_555_GREEN_SHIFT) | (((r) >> 3) << FI16_555_RED_SHIFT)) - -/** -Returns TRUE if the format of a dib is RGB565 -*/ -#define IS_FORMAT_RGB565(dib) ((FreeImage_GetRedMask(dib) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_565_BLUE_MASK)) - -/** -Convert a RGB565 or RGB555 RGBQUAD pixel to a WORD -*/ -#define RGBQUAD_TO_WORD(dib, color) (IS_FORMAT_RGB565(dib) ? RGB565((color)->rgbBlue, (color)->rgbGreen, (color)->rgbRed) : RGB555((color)->rgbBlue, (color)->rgbGreen, (color)->rgbRed)) - -/** -Create a greyscale palette -*/ -#define CREATE_GREYSCALE_PALETTE(palette, entries) \ - for (unsigned i = 0, v = 0; i < entries; i++, v += 0x00FFFFFF / (entries - 1)) { \ - ((unsigned *)palette)[i] = v; \ - } - -/** -Create a reverse greyscale palette -*/ -#define CREATE_GREYSCALE_PALETTE_REVERSE(palette, entries) \ - for (unsigned i = 0, v = 0x00FFFFFF; i < entries; i++, v -= (0x00FFFFFF / (entries - 1))) { \ - ((unsigned *)palette)[i] = v; \ - } - -// ========================================================== -// Generic error messages -// ========================================================== - -static const char *FI_MSG_ERROR_MEMORY = "Memory allocation failed"; -static const char *FI_MSG_ERROR_DIB_MEMORY = "DIB allocation failed, maybe caused by an invalid image size or by a lack of memory"; -static const char *FI_MSG_ERROR_PARSING = "Parsing error"; -static const char *FI_MSG_ERROR_MAGIC_NUMBER = "Invalid magic number"; -static const char *FI_MSG_ERROR_UNSUPPORTED_FORMAT = "Unsupported format"; -static const char *FI_MSG_ERROR_UNSUPPORTED_COMPRESSION = "Unsupported compression type"; -static const char *FI_MSG_WARNING_INVALID_THUMBNAIL = "Warning: attached thumbnail cannot be written to output file (invalid format) - Thumbnail saving aborted"; - -#endif // FREEIMAGE_UTILITIES_H diff --git a/Dependencies/FreeImage/Source/ZLib/ChangeLog b/Dependencies/FreeImage/Source/ZLib/ChangeLog deleted file mode 100644 index a436dfb..0000000 --- a/Dependencies/FreeImage/Source/ZLib/ChangeLog +++ /dev/null @@ -1,1515 +0,0 @@ - - ChangeLog file for zlib - -Changes in 1.2.11 (15 Jan 2017) -- Fix deflate stored bug when pulling last block from window -- Permit immediate deflateParams changes before any deflate input - -Changes in 1.2.10 (2 Jan 2017) -- Avoid warnings on snprintf() return value -- Fix bug in deflate_stored() for zero-length input -- Fix bug in gzwrite.c that produced corrupt gzip files -- Remove files to be installed before copying them in Makefile.in -- Add warnings when compiling with assembler code - -Changes in 1.2.9 (31 Dec 2016) -- Fix contrib/minizip to permit unzipping with desktop API [Zouzou] -- Improve contrib/blast to return unused bytes -- Assure that gzoffset() is correct when appending -- Improve compress() and uncompress() to support large lengths -- Fix bug in test/example.c where error code not saved -- Remedy Coverity warning [Randers-Pehrson] -- Improve speed of gzprintf() in transparent mode -- Fix inflateInit2() bug when windowBits is 16 or 32 -- Change DEBUG macro to ZLIB_DEBUG -- Avoid uninitialized access by gzclose_w() -- Allow building zlib outside of the source directory -- Fix bug that accepted invalid zlib header when windowBits is zero -- Fix gzseek() problem on MinGW due to buggy _lseeki64 there -- Loop on write() calls in gzwrite.c in case of non-blocking I/O -- Add --warn (-w) option to ./configure for more compiler warnings -- Reject a window size of 256 bytes if not using the zlib wrapper -- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE -- Add --debug (-d) option to ./configure to define ZLIB_DEBUG -- Fix bugs in creating a very large gzip header -- Add uncompress2() function, which returns the input size used -- Assure that deflateParams() will not switch functions mid-block -- Dramatically speed up deflation for level 0 (storing) -- Add gzfread(), duplicating the interface of fread() -- Add gzfwrite(), duplicating the interface of fwrite() -- Add deflateGetDictionary() function -- Use snprintf() for later versions of Microsoft C -- Fix *Init macros to use z_ prefix when requested -- Replace as400 with os400 for OS/400 support [Monnerat] -- Add crc32_z() and adler32_z() functions with size_t lengths -- Update Visual Studio project files [AraHaan] - -Changes in 1.2.8 (28 Apr 2013) -- Update contrib/minizip/iowin32.c for Windows RT [Vollant] -- Do not force Z_CONST for C++ -- Clean up contrib/vstudio [Roß] -- Correct spelling error in zlib.h -- Fix mixed line endings in contrib/vstudio - -Changes in 1.2.7.3 (13 Apr 2013) -- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc - -Changes in 1.2.7.2 (13 Apr 2013) -- Change check for a four-byte type back to hexadecimal -- Fix typo in win32/Makefile.msc -- Add casts in gzwrite.c for pointer differences - -Changes in 1.2.7.1 (24 Mar 2013) -- Replace use of unsafe string functions with snprintf if available -- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink] -- Fix gzgetc undefine when Z_PREFIX set [Turk] -- Eliminate use of mktemp in Makefile (not always available) -- Fix bug in 'F' mode for gzopen() -- Add inflateGetDictionary() function -- Correct comment in deflate.h -- Use _snprintf for snprintf in Microsoft C -- On Darwin, only use /usr/bin/libtool if libtool is not Apple -- Delete "--version" file if created by "ar --version" [Richard G.] -- Fix configure check for veracity of compiler error return codes -- Fix CMake compilation of static lib for MSVC2010 x64 -- Remove unused variable in infback9.c -- Fix argument checks in gzlog_compress() and gzlog_write() -- Clean up the usage of z_const and respect const usage within zlib -- Clean up examples/gzlog.[ch] comparisons of different types -- Avoid shift equal to bits in type (caused endless loop) -- Fix uninitialized value bug in gzputc() introduced by const patches -- Fix memory allocation error in examples/zran.c [Nor] -- Fix bug where gzopen(), gzclose() would write an empty file -- Fix bug in gzclose() when gzwrite() runs out of memory -- Check for input buffer malloc failure in examples/gzappend.c -- Add note to contrib/blast to use binary mode in stdio -- Fix comparisons of differently signed integers in contrib/blast -- Check for invalid code length codes in contrib/puff -- Fix serious but very rare decompression bug in inftrees.c -- Update inflateBack() comments, since inflate() can be faster -- Use underscored I/O function names for WINAPI_FAMILY -- Add _tr_flush_bits to the external symbols prefixed by --zprefix -- Add contrib/vstudio/vc10 pre-build step for static only -- Quote --version-script argument in CMakeLists.txt -- Don't specify --version-script on Apple platforms in CMakeLists.txt -- Fix casting error in contrib/testzlib/testzlib.c -- Fix types in contrib/minizip to match result of get_crc_table() -- Simplify contrib/vstudio/vc10 with 'd' suffix -- Add TOP support to win32/Makefile.msc -- Suport i686 and amd64 assembler builds in CMakeLists.txt -- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h -- Add vc11 and vc12 build files to contrib/vstudio -- Add gzvprintf() as an undocumented function in zlib -- Fix configure for Sun shell -- Remove runtime check in configure for four-byte integer type -- Add casts and consts to ease user conversion to C++ -- Add man pages for minizip and miniunzip -- In Makefile uninstall, don't rm if preceding cd fails -- Do not return Z_BUF_ERROR if deflateParam() has nothing to write - -Changes in 1.2.7 (2 May 2012) -- Replace use of memmove() with a simple copy for portability -- Test for existence of strerror -- Restore gzgetc_ for backward compatibility with 1.2.6 -- Fix build with non-GNU make on Solaris -- Require gcc 4.0 or later on Mac OS X to use the hidden attribute -- Include unistd.h for Watcom C -- Use __WATCOMC__ instead of __WATCOM__ -- Do not use the visibility attribute if NO_VIZ defined -- Improve the detection of no hidden visibility attribute -- Avoid using __int64 for gcc or solo compilation -- Cast to char * in gzprintf to avoid warnings [Zinser] -- Fix make_vms.com for VAX [Zinser] -- Don't use library or built-in byte swaps -- Simplify test and use of gcc hidden attribute -- Fix bug in gzclose_w() when gzwrite() fails to allocate memory -- Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen() -- Fix bug in test/minigzip.c for configure --solo -- Fix contrib/vstudio project link errors [Mohanathas] -- Add ability to choose the builder in make_vms.com [Schweda] -- Add DESTDIR support to mingw32 win32/Makefile.gcc -- Fix comments in win32/Makefile.gcc for proper usage -- Allow overriding the default install locations for cmake -- Generate and install the pkg-config file with cmake -- Build both a static and a shared version of zlib with cmake -- Include version symbols for cmake builds -- If using cmake with MSVC, add the source directory to the includes -- Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta] -- Move obsolete emx makefile to old [Truta] -- Allow the use of -Wundef when compiling or using zlib -- Avoid the use of the -u option with mktemp -- Improve inflate() documentation on the use of Z_FINISH -- Recognize clang as gcc -- Add gzopen_w() in Windows for wide character path names -- Rename zconf.h in CMakeLists.txt to move it out of the way -- Add source directory in CMakeLists.txt for building examples -- Look in build directory for zlib.pc in CMakeLists.txt -- Remove gzflags from zlibvc.def in vc9 and vc10 -- Fix contrib/minizip compilation in the MinGW environment -- Update ./configure for Solaris, support --64 [Mooney] -- Remove -R. from Solaris shared build (possible security issue) -- Avoid race condition for parallel make (-j) running example -- Fix type mismatch between get_crc_table() and crc_table -- Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler] -- Fix the path to zlib.map in CMakeLists.txt -- Force the native libtool in Mac OS X to avoid GNU libtool [Beebe] -- Add instructions to win32/Makefile.gcc for shared install [Torri] - -Changes in 1.2.6.1 (12 Feb 2012) -- Avoid the use of the Objective-C reserved name "id" -- Include io.h in gzguts.h for Microsoft compilers -- Fix problem with ./configure --prefix and gzgetc macro -- Include gz_header definition when compiling zlib solo -- Put gzflags() functionality back in zutil.c -- Avoid library header include in crc32.c for Z_SOLO -- Use name in GCC_CLASSIC as C compiler for coverage testing, if set -- Minor cleanup in contrib/minizip/zip.c [Vollant] -- Update make_vms.com [Zinser] -- Remove unnecessary gzgetc_ function -- Use optimized byte swap operations for Microsoft and GNU [Snyder] -- Fix minor typo in zlib.h comments [Rzesniowiecki] - -Changes in 1.2.6 (29 Jan 2012) -- Update the Pascal interface in contrib/pascal -- Fix function numbers for gzgetc_ in zlibvc.def files -- Fix configure.ac for contrib/minizip [Schiffer] -- Fix large-entry detection in minizip on 64-bit systems [Schiffer] -- Have ./configure use the compiler return code for error indication -- Fix CMakeLists.txt for cross compilation [McClure] -- Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes] -- Fix compilation of contrib/minizip on FreeBSD [Marquez] -- Correct suggested usages in win32/Makefile.msc [Shachar, Horvath] -- Include io.h for Turbo C / Borland C on all platforms [Truta] -- Make version explicit in contrib/minizip/configure.ac [Bosmans] -- Avoid warning for no encryption in contrib/minizip/zip.c [Vollant] -- Minor cleanup up contrib/minizip/unzip.c [Vollant] -- Fix bug when compiling minizip with C++ [Vollant] -- Protect for long name and extra fields in contrib/minizip [Vollant] -- Avoid some warnings in contrib/minizip [Vollant] -- Add -I../.. -L../.. to CFLAGS for minizip and miniunzip -- Add missing libs to minizip linker command -- Add support for VPATH builds in contrib/minizip -- Add an --enable-demos option to contrib/minizip/configure -- Add the generation of configure.log by ./configure -- Exit when required parameters not provided to win32/Makefile.gcc -- Have gzputc return the character written instead of the argument -- Use the -m option on ldconfig for BSD systems [Tobias] -- Correct in zlib.map when deflateResetKeep was added - -Changes in 1.2.5.3 (15 Jan 2012) -- Restore gzgetc function for binary compatibility -- Do not use _lseeki64 under Borland C++ [Truta] -- Update win32/Makefile.msc to build test/*.c [Truta] -- Remove old/visualc6 given CMakefile and other alternatives -- Update AS400 build files and documentation [Monnerat] -- Update win32/Makefile.gcc to build test/*.c [Truta] -- Permit stronger flushes after Z_BLOCK flushes -- Avoid extraneous empty blocks when doing empty flushes -- Permit Z_NULL arguments to deflatePending -- Allow deflatePrime() to insert bits in the middle of a stream -- Remove second empty static block for Z_PARTIAL_FLUSH -- Write out all of the available bits when using Z_BLOCK -- Insert the first two strings in the hash table after a flush - -Changes in 1.2.5.2 (17 Dec 2011) -- fix ld error: unable to find version dependency 'ZLIB_1.2.5' -- use relative symlinks for shared libs -- Avoid searching past window for Z_RLE strategy -- Assure that high-water mark initialization is always applied in deflate -- Add assertions to fill_window() in deflate.c to match comments -- Update python link in README -- Correct spelling error in gzread.c -- Fix bug in gzgets() for a concatenated empty gzip stream -- Correct error in comment for gz_make() -- Change gzread() and related to ignore junk after gzip streams -- Allow gzread() and related to continue after gzclearerr() -- Allow gzrewind() and gzseek() after a premature end-of-file -- Simplify gzseek() now that raw after gzip is ignored -- Change gzgetc() to a macro for speed (~40% speedup in testing) -- Fix gzclose() to return the actual error last encountered -- Always add large file support for windows -- Include zconf.h for windows large file support -- Include zconf.h.cmakein for windows large file support -- Update zconf.h.cmakein on make distclean -- Merge vestigial vsnprintf determination from zutil.h to gzguts.h -- Clarify how gzopen() appends in zlib.h comments -- Correct documentation of gzdirect() since junk at end now ignored -- Add a transparent write mode to gzopen() when 'T' is in the mode -- Update python link in zlib man page -- Get inffixed.h and MAKEFIXED result to match -- Add a ./config --solo option to make zlib subset with no library use -- Add undocumented inflateResetKeep() function for CAB file decoding -- Add --cover option to ./configure for gcc coverage testing -- Add #define ZLIB_CONST option to use const in the z_stream interface -- Add comment to gzdopen() in zlib.h to use dup() when using fileno() -- Note behavior of uncompress() to provide as much data as it can -- Add files in contrib/minizip to aid in building libminizip -- Split off AR options in Makefile.in and configure -- Change ON macro to Z_ARG to avoid application conflicts -- Facilitate compilation with Borland C++ for pragmas and vsnprintf -- Include io.h for Turbo C / Borland C++ -- Move example.c and minigzip.c to test/ -- Simplify incomplete code table filling in inflate_table() -- Remove code from inflate.c and infback.c that is impossible to execute -- Test the inflate code with full coverage -- Allow deflateSetDictionary, inflateSetDictionary at any time (in raw) -- Add deflateResetKeep and fix inflateResetKeep to retain dictionary -- Fix gzwrite.c to accommodate reduced memory zlib compilation -- Have inflate() with Z_FINISH avoid the allocation of a window -- Do not set strm->adler when doing raw inflate -- Fix gzeof() to behave just like feof() when read is not past end of file -- Fix bug in gzread.c when end-of-file is reached -- Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF -- Document gzread() capability to read concurrently written files -- Remove hard-coding of resource compiler in CMakeLists.txt [Blammo] - -Changes in 1.2.5.1 (10 Sep 2011) -- Update FAQ entry on shared builds (#13) -- Avoid symbolic argument to chmod in Makefile.in -- Fix bug and add consts in contrib/puff [Oberhumer] -- Update contrib/puff/zeros.raw test file to have all block types -- Add full coverage test for puff in contrib/puff/Makefile -- Fix static-only-build install in Makefile.in -- Fix bug in unzGetCurrentFileInfo() in contrib/minizip [Kuno] -- Add libz.a dependency to shared in Makefile.in for parallel builds -- Spell out "number" (instead of "nb") in zlib.h for total_in, total_out -- Replace $(...) with `...` in configure for non-bash sh [Bowler] -- Add darwin* to Darwin* and solaris* to SunOS\ 5* in configure [Groffen] -- Add solaris* to Linux* in configure to allow gcc use [Groffen] -- Add *bsd* to Linux* case in configure [Bar-Lev] -- Add inffast.obj to dependencies in win32/Makefile.msc -- Correct spelling error in deflate.h [Kohler] -- Change libzdll.a again to libz.dll.a (!) in win32/Makefile.gcc -- Add test to configure for GNU C looking for gcc in output of $cc -v -- Add zlib.pc generation to win32/Makefile.gcc [Weigelt] -- Fix bug in zlib.h for _FILE_OFFSET_BITS set and _LARGEFILE64_SOURCE not -- Add comment in zlib.h that adler32_combine with len2 < 0 makes no sense -- Make NO_DIVIDE option in adler32.c much faster (thanks to John Reiser) -- Make stronger test in zconf.h to include unistd.h for LFS -- Apply Darwin patches for 64-bit file offsets to contrib/minizip [Slack] -- Fix zlib.h LFS support when Z_PREFIX used -- Add updated as400 support (removed from old) [Monnerat] -- Avoid deflate sensitivity to volatile input data -- Avoid division in adler32_combine for NO_DIVIDE -- Clarify the use of Z_FINISH with deflateBound() amount of space -- Set binary for output file in puff.c -- Use u4 type for crc_table to avoid conversion warnings -- Apply casts in zlib.h to avoid conversion warnings -- Add OF to prototypes for adler32_combine_ and crc32_combine_ [Miller] -- Improve inflateSync() documentation to note indeterminancy -- Add deflatePending() function to return the amount of pending output -- Correct the spelling of "specification" in FAQ [Randers-Pehrson] -- Add a check in configure for stdarg.h, use for gzprintf() -- Check that pointers fit in ints when gzprint() compiled old style -- Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler] -- Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt] -- Add debug records in assmebler code [Londer] -- Update RFC references to use http://tools.ietf.org/html/... [Li] -- Add --archs option, use of libtool to configure for Mac OS X [Borstel] - -Changes in 1.2.5 (19 Apr 2010) -- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev] -- Default to libdir as sharedlibdir in configure [Nieder] -- Update copyright dates on modified source files -- Update trees.c to be able to generate modified trees.h -- Exit configure for MinGW, suggesting win32/Makefile.gcc -- Check for NULL path in gz_open [Homurlu] - -Changes in 1.2.4.5 (18 Apr 2010) -- Set sharedlibdir in configure [Torok] -- Set LDFLAGS in Makefile.in [Bar-Lev] -- Avoid mkdir objs race condition in Makefile.in [Bowler] -- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays -- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C -- Don't use hidden attribute when it is a warning generator (e.g. Solaris) - -Changes in 1.2.4.4 (18 Apr 2010) -- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok] -- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty -- Try to use bash or ksh regardless of functionality of /bin/sh -- Fix configure incompatibility with NetBSD sh -- Remove attempt to run under bash or ksh since have better NetBSD fix -- Fix win32/Makefile.gcc for MinGW [Bar-Lev] -- Add diagnostic messages when using CROSS_PREFIX in configure -- Added --sharedlibdir option to configure [Weigelt] -- Use hidden visibility attribute when available [Frysinger] - -Changes in 1.2.4.3 (10 Apr 2010) -- Only use CROSS_PREFIX in configure for ar and ranlib if they exist -- Use CROSS_PREFIX for nm [Bar-Lev] -- Assume _LARGEFILE64_SOURCE defined is equivalent to true -- Avoid use of undefined symbols in #if with && and || -- Make *64 prototypes in gzguts.h consistent with functions -- Add -shared load option for MinGW in configure [Bowler] -- Move z_off64_t to public interface, use instead of off64_t -- Remove ! from shell test in configure (not portable to Solaris) -- Change +0 macro tests to -0 for possibly increased portability - -Changes in 1.2.4.2 (9 Apr 2010) -- Add consistent carriage returns to readme.txt's in masmx86 and masmx64 -- Really provide prototypes for *64 functions when building without LFS -- Only define unlink() in minigzip.c if unistd.h not included -- Update README to point to contrib/vstudio project files -- Move projects/vc6 to old/ and remove projects/ -- Include stdlib.h in minigzip.c for setmode() definition under WinCE -- Clean up assembler builds in win32/Makefile.msc [Rowe] -- Include sys/types.h for Microsoft for off_t definition -- Fix memory leak on error in gz_open() -- Symbolize nm as $NM in configure [Weigelt] -- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt] -- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined -- Fix bug in gzeof() to take into account unused input data -- Avoid initialization of structures with variables in puff.c -- Updated win32/README-WIN32.txt [Rowe] - -Changes in 1.2.4.1 (28 Mar 2010) -- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] -- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] -- Restore "for debugging" comment on sprintf() in gzlib.c -- Remove fdopen for MVS from gzguts.h -- Put new README-WIN32.txt in win32 [Rowe] -- Add check for shell to configure and invoke another shell if needed -- Fix big fat stinking bug in gzseek() on uncompressed files -- Remove vestigial F_OPEN64 define in zutil.h -- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE -- Avoid errors on non-LFS systems when applications define LFS macros -- Set EXE to ".exe" in configure for MINGW [Kahle] -- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill] -- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev] -- Add DLL install in win32/makefile.gcc [Bar-Lev] -- Allow Linux* or linux* from uname in configure [Bar-Lev] -- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev] -- Add cross-compilation prefixes to configure [Bar-Lev] -- Match type exactly in gz_load() invocation in gzread.c -- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func -- Provide prototypes for *64 functions when building zlib without LFS -- Don't use -lc when linking shared library on MinGW -- Remove errno.h check in configure and vestigial errno code in zutil.h - -Changes in 1.2.4 (14 Mar 2010) -- Fix VER3 extraction in configure for no fourth subversion -- Update zlib.3, add docs to Makefile.in to make .pdf out of it -- Add zlib.3.pdf to distribution -- Don't set error code in gzerror() if passed pointer is NULL -- Apply destination directory fixes to CMakeLists.txt [Lowman] -- Move #cmakedefine's to a new zconf.in.cmakein -- Restore zconf.h for builds that don't use configure or cmake -- Add distclean to dummy Makefile for convenience -- Update and improve INDEX, README, and FAQ -- Update CMakeLists.txt for the return of zconf.h [Lowman] -- Update contrib/vstudio/vc9 and vc10 [Vollant] -- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc -- Apply license and readme changes to contrib/asm686 [Raiter] -- Check file name lengths and add -c option in minigzip.c [Li] -- Update contrib/amd64 and contrib/masmx86/ [Vollant] -- Avoid use of "eof" parameter in trees.c to not shadow library variable -- Update make_vms.com for removal of zlibdefs.h [Zinser] -- Update assembler code and vstudio projects in contrib [Vollant] -- Remove outdated assembler code contrib/masm686 and contrib/asm586 -- Remove old vc7 and vc8 from contrib/vstudio -- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe] -- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open() -- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant] -- Remove *64 functions from win32/zlib.def (they're not 64-bit yet) -- Fix bug in void-returning vsprintf() case in gzwrite.c -- Fix name change from inflate.h in contrib/inflate86/inffas86.c -- Check if temporary file exists before removing in make_vms.com [Zinser] -- Fix make install and uninstall for --static option -- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta] -- Update readme.txt in contrib/masmx64 and masmx86 to assemble - -Changes in 1.2.3.9 (21 Feb 2010) -- Expunge gzio.c -- Move as400 build information to old -- Fix updates in contrib/minizip and contrib/vstudio -- Add const to vsnprintf test in configure to avoid warnings [Weigelt] -- Delete zconf.h (made by configure) [Weigelt] -- Change zconf.in.h to zconf.h.in per convention [Weigelt] -- Check for NULL buf in gzgets() -- Return empty string for gzgets() with len == 1 (like fgets()) -- Fix description of gzgets() in zlib.h for end-of-file, NULL return -- Update minizip to 1.1 [Vollant] -- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c -- Note in zlib.h that gzerror() should be used to distinguish from EOF -- Remove use of snprintf() from gzlib.c -- Fix bug in gzseek() -- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant] -- Fix zconf.h generation in CMakeLists.txt [Lowman] -- Improve comments in zconf.h where modified by configure - -Changes in 1.2.3.8 (13 Feb 2010) -- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer] -- Use z_off64_t in gz_zero() and gz_skip() to match state->skip -- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t) -- Revert to Makefile.in from 1.2.3.6 (live with the clutter) -- Fix missing error return in gzflush(), add zlib.h note -- Add *64 functions to zlib.map [Levin] -- Fix signed/unsigned comparison in gz_comp() -- Use SFLAGS when testing shared linking in configure -- Add --64 option to ./configure to use -m64 with gcc -- Fix ./configure --help to correctly name options -- Have make fail if a test fails [Levin] -- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson] -- Remove assembler object files from contrib - -Changes in 1.2.3.7 (24 Jan 2010) -- Always gzopen() with O_LARGEFILE if available -- Fix gzdirect() to work immediately after gzopen() or gzdopen() -- Make gzdirect() more precise when the state changes while reading -- Improve zlib.h documentation in many places -- Catch memory allocation failure in gz_open() -- Complete close operation if seek forward in gzclose_w() fails -- Return Z_ERRNO from gzclose_r() if close() fails -- Return Z_STREAM_ERROR instead of EOF for gzclose() being passed NULL -- Return zero for gzwrite() errors to match zlib.h description -- Return -1 on gzputs() error to match zlib.h description -- Add zconf.in.h to allow recovery from configure modification [Weigelt] -- Fix static library permissions in Makefile.in [Weigelt] -- Avoid warnings in configure tests that hide functionality [Weigelt] -- Add *BSD and DragonFly to Linux case in configure [gentoo 123571] -- Change libzdll.a to libz.dll.a in win32/Makefile.gcc [gentoo 288212] -- Avoid access of uninitialized data for first inflateReset2 call [Gomes] -- Keep object files in subdirectories to reduce the clutter somewhat -- Remove default Makefile and zlibdefs.h, add dummy Makefile -- Add new external functions to Z_PREFIX, remove duplicates, z_z_ -> z_ -- Remove zlibdefs.h completely -- modify zconf.h instead - -Changes in 1.2.3.6 (17 Jan 2010) -- Avoid void * arithmetic in gzread.c and gzwrite.c -- Make compilers happier with const char * for gz_error message -- Avoid unused parameter warning in inflate.c -- Avoid signed-unsigned comparison warning in inflate.c -- Indent #pragma's for traditional C -- Fix usage of strwinerror() in glib.c, change to gz_strwinerror() -- Correct email address in configure for system options -- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser] -- Update zlib.map [Brown] -- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok] -- Apply various fixes to CMakeLists.txt [Lowman] -- Add checks on len in gzread() and gzwrite() -- Add error message for no more room for gzungetc() -- Remove zlib version check in gzwrite() -- Defer compression of gzprintf() result until need to -- Use snprintf() in gzdopen() if available -- Remove USE_MMAP configuration determination (only used by minigzip) -- Remove examples/pigz.c (available separately) -- Update examples/gun.c to 1.6 - -Changes in 1.2.3.5 (8 Jan 2010) -- Add space after #if in zutil.h for some compilers -- Fix relatively harmless bug in deflate_fast() [Exarevsky] -- Fix same problem in deflate_slow() -- Add $(SHAREDLIBV) to LIBS in Makefile.in [Brown] -- Add deflate_rle() for faster Z_RLE strategy run-length encoding -- Add deflate_huff() for faster Z_HUFFMAN_ONLY encoding -- Change name of "write" variable in inffast.c to avoid library collisions -- Fix premature EOF from gzread() in gzio.c [Brown] -- Use zlib header window size if windowBits is 0 in inflateInit2() -- Remove compressBound() call in deflate.c to avoid linking compress.o -- Replace use of errno in gz* with functions, support WinCE [Alves] -- Provide alternative to perror() in minigzip.c for WinCE [Alves] -- Don't use _vsnprintf on later versions of MSVC [Lowman] -- Add CMake build script and input file [Lowman] -- Update contrib/minizip to 1.1 [Svensson, Vollant] -- Moved nintendods directory from contrib to . -- Replace gzio.c with a new set of routines with the same functionality -- Add gzbuffer(), gzoffset(), gzclose_r(), gzclose_w() as part of above -- Update contrib/minizip to 1.1b -- Change gzeof() to return 0 on error instead of -1 to agree with zlib.h - -Changes in 1.2.3.4 (21 Dec 2009) -- Use old school .SUFFIXES in Makefile.in for FreeBSD compatibility -- Update comments in configure and Makefile.in for default --shared -- Fix test -z's in configure [Marquess] -- Build examplesh and minigzipsh when not testing -- Change NULL's to Z_NULL's in deflate.c and in comments in zlib.h -- Import LDFLAGS from the environment in configure -- Fix configure to populate SFLAGS with discovered CFLAGS options -- Adapt make_vms.com to the new Makefile.in [Zinser] -- Add zlib2ansi script for C++ compilation [Marquess] -- Add _FILE_OFFSET_BITS=64 test to make test (when applicable) -- Add AMD64 assembler code for longest match to contrib [Teterin] -- Include options from $SFLAGS when doing $LDSHARED -- Simplify 64-bit file support by introducing z_off64_t type -- Make shared object files in objs directory to work around old Sun cc -- Use only three-part version number for Darwin shared compiles -- Add rc option to ar in Makefile.in for when ./configure not run -- Add -WI,-rpath,. to LDFLAGS for OSF 1 V4* -- Set LD_LIBRARYN32_PATH for SGI IRIX shared compile -- Protect against _FILE_OFFSET_BITS being defined when compiling zlib -- Rename Makefile.in targets allstatic to static and allshared to shared -- Fix static and shared Makefile.in targets to be independent -- Correct error return bug in gz_open() by setting state [Brown] -- Put spaces before ;;'s in configure for better sh compatibility -- Add pigz.c (parallel implementation of gzip) to examples/ -- Correct constant in crc32.c to UL [Leventhal] -- Reject negative lengths in crc32_combine() -- Add inflateReset2() function to work like inflateEnd()/inflateInit2() -- Include sys/types.h for _LARGEFILE64_SOURCE [Brown] -- Correct typo in doc/algorithm.txt [Janik] -- Fix bug in adler32_combine() [Zhu] -- Catch missing-end-of-block-code error in all inflates and in puff - Assures that random input to inflate eventually results in an error -- Added enough.c (calculation of ENOUGH for inftrees.h) to examples/ -- Update ENOUGH and its usage to reflect discovered bounds -- Fix gzerror() error report on empty input file [Brown] -- Add ush casts in trees.c to avoid pedantic runtime errors -- Fix typo in zlib.h uncompress() description [Reiss] -- Correct inflate() comments with regard to automatic header detection -- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays) -- Put new version of gzlog (2.0) in examples with interruption recovery -- Add puff compile option to permit invalid distance-too-far streams -- Add puff TEST command options, ability to read piped input -- Prototype the *64 functions in zlib.h when _FILE_OFFSET_BITS == 64, but - _LARGEFILE64_SOURCE not defined -- Fix Z_FULL_FLUSH to truly erase the past by resetting s->strstart -- Fix deflateSetDictionary() to use all 32K for output consistency -- Remove extraneous #define MIN_LOOKAHEAD in deflate.c (in deflate.h) -- Clear bytes after deflate lookahead to avoid use of uninitialized data -- Change a limit in inftrees.c to be more transparent to Coverity Prevent -- Update win32/zlib.def with exported symbols from zlib.h -- Correct spelling errors in zlib.h [Willem, Sobrado] -- Allow Z_BLOCK for deflate() to force a new block -- Allow negative bits in inflatePrime() to delete existing bit buffer -- Add Z_TREES flush option to inflate() to return at end of trees -- Add inflateMark() to return current state information for random access -- Add Makefile for NintendoDS to contrib [Costa] -- Add -w in configure compile tests to avoid spurious warnings [Beucler] -- Fix typos in zlib.h comments for deflateSetDictionary() -- Fix EOF detection in transparent gzread() [Maier] - -Changes in 1.2.3.3 (2 October 2006) -- Make --shared the default for configure, add a --static option -- Add compile option to permit invalid distance-too-far streams -- Add inflateUndermine() function which is required to enable above -- Remove use of "this" variable name for C++ compatibility [Marquess] -- Add testing of shared library in make test, if shared library built -- Use ftello() and fseeko() if available instead of ftell() and fseek() -- Provide two versions of all functions that use the z_off_t type for - binary compatibility -- a normal version and a 64-bit offset version, - per the Large File Support Extension when _LARGEFILE64_SOURCE is - defined; use the 64-bit versions by default when _FILE_OFFSET_BITS - is defined to be 64 -- Add a --uname= option to configure to perhaps help with cross-compiling - -Changes in 1.2.3.2 (3 September 2006) -- Turn off silly Borland warnings [Hay] -- Use off64_t and define _LARGEFILE64_SOURCE when present -- Fix missing dependency on inffixed.h in Makefile.in -- Rig configure --shared to build both shared and static [Teredesai, Truta] -- Remove zconf.in.h and instead create a new zlibdefs.h file -- Fix contrib/minizip/unzip.c non-encrypted after encrypted [Vollant] -- Add treebuild.xml (see http://treebuild.metux.de/) [Weigelt] - -Changes in 1.2.3.1 (16 August 2006) -- Add watcom directory with OpenWatcom make files [Daniel] -- Remove #undef of FAR in zconf.in.h for MVS [Fedtke] -- Update make_vms.com [Zinser] -- Use -fPIC for shared build in configure [Teredesai, Nicholson] -- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] -- Use fdopen() (not _fdopen()) for Interix in zutil.h [Bäck] -- Add some FAQ entries about the contrib directory -- Update the MVS question in the FAQ -- Avoid extraneous reads after EOF in gzio.c [Brown] -- Correct spelling of "successfully" in gzio.c [Randers-Pehrson] -- Add comments to zlib.h about gzerror() usage [Brown] -- Set extra flags in gzip header in gzopen() like deflate() does -- Make configure options more compatible with double-dash conventions - [Weigelt] -- Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen] -- Fix uninstall target in Makefile.in [Truta] -- Add pkgconfig support [Weigelt] -- Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt] -- Replace set_data_type() with a more accurate detect_data_type() in - trees.c, according to the txtvsbin.txt document [Truta] -- Swap the order of #include and #include "zlib.h" in - gzio.c, example.c and minigzip.c [Truta] -- Shut up annoying VS2005 warnings about standard C deprecation [Rowe, - Truta] (where?) -- Fix target "clean" from win32/Makefile.bor [Truta] -- Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe] -- Update zlib www home address in win32/DLL_FAQ.txt [Truta] -- Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove] -- Enable browse info in the "Debug" and "ASM Debug" configurations in - the Visual C++ 6 project, and set (non-ASM) "Debug" as default [Truta] -- Add pkgconfig support [Weigelt] -- Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h, - for use in win32/zlib1.rc [Polushin, Rowe, Truta] -- Add a document that explains the new text detection scheme to - doc/txtvsbin.txt [Truta] -- Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta] -- Move algorithm.txt into doc/ [Truta] -- Synchronize FAQ with website -- Fix compressBound(), was low for some pathological cases [Fearnley] -- Take into account wrapper variations in deflateBound() -- Set examples/zpipe.c input and output to binary mode for Windows -- Update examples/zlib_how.html with new zpipe.c (also web site) -- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems - that gcc became pickier in 4.0) -- Add zlib.map for Linux: "All symbols from zlib-1.1.4 remain - un-versioned, the patch adds versioning only for symbols introduced in - zlib-1.2.0 or later. It also declares as local those symbols which are - not designed to be exported." [Levin] -- Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure -- Do not initialize global static by default in trees.c, add a response - NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess] -- Don't use strerror() in gzio.c under WinCE [Yakimov] -- Don't use errno.h in zutil.h under WinCE [Yakimov] -- Move arguments for AR to its usage to allow replacing ar [Marot] -- Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson] -- Improve inflateInit() and inflateInit2() documentation -- Fix structure size comment in inflate.h -- Change configure help option from --h* to --help [Santos] - -Changes in 1.2.3 (18 July 2005) -- Apply security vulnerability fixes to contrib/infback9 as well -- Clean up some text files (carriage returns, trailing space) -- Update testzlib, vstudio, masmx64, and masmx86 in contrib [Vollant] - -Changes in 1.2.2.4 (11 July 2005) -- Add inflatePrime() function for starting inflation at bit boundary -- Avoid some Visual C warnings in deflate.c -- Avoid more silly Visual C warnings in inflate.c and inftrees.c for 64-bit - compile -- Fix some spelling errors in comments [Betts] -- Correct inflateInit2() error return documentation in zlib.h -- Add zran.c example of compressed data random access to examples - directory, shows use of inflatePrime() -- Fix cast for assignments to strm->state in inflate.c and infback.c -- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer] -- Move declarations of gf2 functions to right place in crc32.c [Oberhumer] -- Add cast in trees.c t avoid a warning [Oberhumer] -- Avoid some warnings in fitblk.c, gun.c, gzjoin.c in examples [Oberhumer] -- Update make_vms.com [Zinser] -- Initialize state->write in inflateReset() since copied in inflate_fast() -- Be more strict on incomplete code sets in inflate_table() and increase - ENOUGH and MAXD -- this repairs a possible security vulnerability for - invalid inflate input. Thanks to Tavis Ormandy and Markus Oberhumer for - discovering the vulnerability and providing test cases. -- Add ia64 support to configure for HP-UX [Smith] -- Add error return to gzread() for format or i/o error [Levin] -- Use malloc.h for OS/2 [Necasek] - -Changes in 1.2.2.3 (27 May 2005) -- Replace 1U constants in inflate.c and inftrees.c for 64-bit compile -- Typecast fread() return values in gzio.c [Vollant] -- Remove trailing space in minigzip.c outmode (VC++ can't deal with it) -- Fix crc check bug in gzread() after gzungetc() [Heiner] -- Add the deflateTune() function to adjust internal compression parameters -- Add a fast gzip decompressor, gun.c, to examples (use of inflateBack) -- Remove an incorrect assertion in examples/zpipe.c -- Add C++ wrapper in infback9.h [Donais] -- Fix bug in inflateCopy() when decoding fixed codes -- Note in zlib.h how much deflateSetDictionary() actually uses -- Remove USE_DICT_HEAD in deflate.c (would mess up inflate if used) -- Add _WIN32_WCE to define WIN32 in zconf.in.h [Spencer] -- Don't include stderr.h or errno.h for _WIN32_WCE in zutil.h [Spencer] -- Add gzdirect() function to indicate transparent reads -- Update contrib/minizip [Vollant] -- Fix compilation of deflate.c when both ASMV and FASTEST [Oberhumer] -- Add casts in crc32.c to avoid warnings [Oberhumer] -- Add contrib/masmx64 [Vollant] -- Update contrib/asm586, asm686, masmx86, testzlib, vstudio [Vollant] - -Changes in 1.2.2.2 (30 December 2004) -- Replace structure assignments in deflate.c and inflate.c with zmemcpy to - avoid implicit memcpy calls (portability for no-library compilation) -- Increase sprintf() buffer size in gzdopen() to allow for large numbers -- Add INFLATE_STRICT to check distances against zlib header -- Improve WinCE errno handling and comments [Chang] -- Remove comment about no gzip header processing in FAQ -- Add Z_FIXED strategy option to deflateInit2() to force fixed trees -- Add updated make_vms.com [Coghlan], update README -- Create a new "examples" directory, move gzappend.c there, add zpipe.c, - fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html. -- Add FAQ entry and comments in deflate.c on uninitialized memory access -- Add Solaris 9 make options in configure [Gilbert] -- Allow strerror() usage in gzio.c for STDC -- Fix DecompressBuf in contrib/delphi/ZLib.pas [ManChesTer] -- Update contrib/masmx86/inffas32.asm and gvmat32.asm [Vollant] -- Use z_off_t for adler32_combine() and crc32_combine() lengths -- Make adler32() much faster for small len -- Use OS_CODE in deflate() default gzip header - -Changes in 1.2.2.1 (31 October 2004) -- Allow inflateSetDictionary() call for raw inflate -- Fix inflate header crc check bug for file names and comments -- Add deflateSetHeader() and gz_header structure for custom gzip headers -- Add inflateGetheader() to retrieve gzip headers -- Add crc32_combine() and adler32_combine() functions -- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list -- Use zstreamp consistently in zlib.h (inflate_back functions) -- Remove GUNZIP condition from definition of inflate_mode in inflate.h - and in contrib/inflate86/inffast.S [Truta, Anderson] -- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson] -- Update projects/README.projects and projects/visualc6 [Truta] -- Update win32/DLL_FAQ.txt [Truta] -- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta] -- Deprecate Z_ASCII; use Z_TEXT instead [Truta] -- Use a new algorithm for setting strm->data_type in trees.c [Truta] -- Do not define an exit() prototype in zutil.c unless DEBUG defined -- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta] -- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate() -- Fix Darwin build version identification [Peterson] - -Changes in 1.2.2 (3 October 2004) -- Update zlib.h comments on gzip in-memory processing -- Set adler to 1 in inflateReset() to support Java test suite [Walles] -- Add contrib/dotzlib [Ravn] -- Update win32/DLL_FAQ.txt [Truta] -- Update contrib/minizip [Vollant] -- Move contrib/visual-basic.txt to old/ [Truta] -- Fix assembler builds in projects/visualc6/ [Truta] - -Changes in 1.2.1.2 (9 September 2004) -- Update INDEX file -- Fix trees.c to update strm->data_type (no one ever noticed!) -- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown] -- Add "volatile" to crc table flag declaration (for DYNAMIC_CRC_TABLE) -- Add limited multitasking protection to DYNAMIC_CRC_TABLE -- Add NO_vsnprintf for VMS in zutil.h [Mozilla] -- Don't declare strerror() under VMS [Mozilla] -- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize -- Update contrib/ada [Anisimkov] -- Update contrib/minizip [Vollant] -- Fix configure to not hardcode directories for Darwin [Peterson] -- Fix gzio.c to not return error on empty files [Brown] -- Fix indentation; update version in contrib/delphi/ZLib.pas and - contrib/pascal/zlibpas.pas [Truta] -- Update mkasm.bat in contrib/masmx86 [Truta] -- Update contrib/untgz [Truta] -- Add projects/README.projects [Truta] -- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta] -- Update win32/DLL_FAQ.txt [Truta] -- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta] -- Remove an unnecessary assignment to curr in inftrees.c [Truta] -- Add OS/2 to exe builds in configure [Poltorak] -- Remove err dummy parameter in zlib.h [Kientzle] - -Changes in 1.2.1.1 (9 January 2004) -- Update email address in README -- Several FAQ updates -- Fix a big fat bug in inftrees.c that prevented decoding valid - dynamic blocks with only literals and no distance codes -- - Thanks to "Hot Emu" for the bug report and sample file -- Add a note to puff.c on no distance codes case. - -Changes in 1.2.1 (17 November 2003) -- Remove a tab in contrib/gzappend/gzappend.c -- Update some interfaces in contrib for new zlib functions -- Update zlib version number in some contrib entries -- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta] -- Support shared libraries on Hurd and KFreeBSD [Brown] -- Fix error in NO_DIVIDE option of adler32.c - -Changes in 1.2.0.8 (4 November 2003) -- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas -- Add experimental NO_DIVIDE #define in adler32.c - - Possibly faster on some processors (let me know if it is) -- Correct Z_BLOCK to not return on first inflate call if no wrap -- Fix strm->data_type on inflate() return to correctly indicate EOB -- Add deflatePrime() function for appending in the middle of a byte -- Add contrib/gzappend for an example of appending to a stream -- Update win32/DLL_FAQ.txt [Truta] -- Delete Turbo C comment in README [Truta] -- Improve some indentation in zconf.h [Truta] -- Fix infinite loop on bad input in configure script [Church] -- Fix gzeof() for concatenated gzip files [Johnson] -- Add example to contrib/visual-basic.txt [Michael B.] -- Add -p to mkdir's in Makefile.in [vda] -- Fix configure to properly detect presence or lack of printf functions -- Add AS400 support [Monnerat] -- Add a little Cygwin support [Wilson] - -Changes in 1.2.0.7 (21 September 2003) -- Correct some debug formats in contrib/infback9 -- Cast a type in a debug statement in trees.c -- Change search and replace delimiter in configure from % to # [Beebe] -- Update contrib/untgz to 0.2 with various fixes [Truta] -- Add build support for Amiga [Nikl] -- Remove some directories in old that have been updated to 1.2 -- Add dylib building for Mac OS X in configure and Makefile.in -- Remove old distribution stuff from Makefile -- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X -- Update links in README - -Changes in 1.2.0.6 (13 September 2003) -- Minor FAQ updates -- Update contrib/minizip to 1.00 [Vollant] -- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta] -- Update POSTINC comment for 68060 [Nikl] -- Add contrib/infback9 with deflate64 decoding (unsupported) -- For MVS define NO_vsnprintf and undefine FAR [van Burik] -- Add pragma for fdopen on MVS [van Burik] - -Changes in 1.2.0.5 (8 September 2003) -- Add OF to inflateBackEnd() declaration in zlib.h -- Remember start when using gzdopen in the middle of a file -- Use internal off_t counters in gz* functions to properly handle seeks -- Perform more rigorous check for distance-too-far in inffast.c -- Add Z_BLOCK flush option to return from inflate at block boundary -- Set strm->data_type on return from inflate - - Indicate bits unused, if at block boundary, and if in last block -- Replace size_t with ptrdiff_t in crc32.c, and check for correct size -- Add condition so old NO_DEFLATE define still works for compatibility -- FAQ update regarding the Windows DLL [Truta] -- INDEX update: add qnx entry, remove aix entry [Truta] -- Install zlib.3 into mandir [Wilson] -- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta] -- Adapt the zlib interface to the new DLL convention guidelines [Truta] -- Introduce ZLIB_WINAPI macro to allow the export of functions using - the WINAPI calling convention, for Visual Basic [Vollant, Truta] -- Update msdos and win32 scripts and makefiles [Truta] -- Export symbols by name, not by ordinal, in win32/zlib.def [Truta] -- Add contrib/ada [Anisimkov] -- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta] -- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant] -- Add contrib/masm686 [Truta] -- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm - [Truta, Vollant] -- Update contrib/delphi; rename to contrib/pascal; add example [Truta] -- Remove contrib/delphi2; add a new contrib/delphi [Truta] -- Avoid inclusion of the nonstandard in contrib/iostream, - and fix some method prototypes [Truta] -- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip - [Truta] -- Avoid the use of backslash (\) in contrib/minizip [Vollant] -- Fix file time handling in contrib/untgz; update makefiles [Truta] -- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines - [Vollant] -- Remove contrib/vstudio/vc15_16 [Vollant] -- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta] -- Update README.contrib [Truta] -- Invert the assignment order of match_head and s->prev[...] in - INSERT_STRING [Truta] -- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings - [Truta] -- Compare function pointers with 0, not with NULL or Z_NULL [Truta] -- Fix prototype of syncsearch in inflate.c [Truta] -- Introduce ASMINF macro to be enabled when using an ASM implementation - of inflate_fast [Truta] -- Change NO_DEFLATE to NO_GZCOMPRESS [Truta] -- Modify test_gzio in example.c to take a single file name as a - parameter [Truta] -- Exit the example.c program if gzopen fails [Truta] -- Add type casts around strlen in example.c [Truta] -- Remove casting to sizeof in minigzip.c; give a proper type - to the variable compared with SUFFIX_LEN [Truta] -- Update definitions of STDC and STDC99 in zconf.h [Truta] -- Synchronize zconf.h with the new Windows DLL interface [Truta] -- Use SYS16BIT instead of __32BIT__ to distinguish between - 16- and 32-bit platforms [Truta] -- Use far memory allocators in small 16-bit memory models for - Turbo C [Truta] -- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in - zlibCompileFlags [Truta] -- Cygwin has vsnprintf [Wilson] -- In Windows16, OS_CODE is 0, as in MSDOS [Truta] -- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson] - -Changes in 1.2.0.4 (10 August 2003) -- Minor FAQ updates -- Be more strict when checking inflateInit2's windowBits parameter -- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well -- Add gzip wrapper option to deflateInit2 using windowBits -- Add updated QNX rule in configure and qnx directory [Bonnefoy] -- Make inflate distance-too-far checks more rigorous -- Clean up FAR usage in inflate -- Add casting to sizeof() in gzio.c and minigzip.c - -Changes in 1.2.0.3 (19 July 2003) -- Fix silly error in gzungetc() implementation [Vollant] -- Update contrib/minizip and contrib/vstudio [Vollant] -- Fix printf format in example.c -- Correct cdecl support in zconf.in.h [Anisimkov] -- Minor FAQ updates - -Changes in 1.2.0.2 (13 July 2003) -- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons -- Attempt to avoid warnings in crc32.c for pointer-int conversion -- Add AIX to configure, remove aix directory [Bakker] -- Add some casts to minigzip.c -- Improve checking after insecure sprintf() or vsprintf() calls -- Remove #elif's from crc32.c -- Change leave label to inf_leave in inflate.c and infback.c to avoid - library conflicts -- Remove inflate gzip decoding by default--only enable gzip decoding by - special request for stricter backward compatibility -- Add zlibCompileFlags() function to return compilation information -- More typecasting in deflate.c to avoid warnings -- Remove leading underscore from _Capital #defines [Truta] -- Fix configure to link shared library when testing -- Add some Windows CE target adjustments [Mai] -- Remove #define ZLIB_DLL in zconf.h [Vollant] -- Add zlib.3 [Rodgers] -- Update RFC URL in deflate.c and algorithm.txt [Mai] -- Add zlib_dll_FAQ.txt to contrib [Truta] -- Add UL to some constants [Truta] -- Update minizip and vstudio [Vollant] -- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h -- Expand use of NO_DUMMY_DECL to avoid all dummy structures -- Added iostream3 to contrib [Schwardt] -- Replace rewind() with fseek() for WinCE [Truta] -- Improve setting of zlib format compression level flags - - Report 0 for huffman and rle strategies and for level == 0 or 1 - - Report 2 only for level == 6 -- Only deal with 64K limit when necessary at compile time [Truta] -- Allow TOO_FAR check to be turned off at compile time [Truta] -- Add gzclearerr() function [Souza] -- Add gzungetc() function - -Changes in 1.2.0.1 (17 March 2003) -- Add Z_RLE strategy for run-length encoding [Truta] - - When Z_RLE requested, restrict matches to distance one - - Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE -- Correct FASTEST compilation to allow level == 0 -- Clean up what gets compiled for FASTEST -- Incorporate changes to zconf.in.h [Vollant] - - Refine detection of Turbo C need for dummy returns - - Refine ZLIB_DLL compilation - - Include additional header file on VMS for off_t typedef -- Try to use _vsnprintf where it supplants vsprintf [Vollant] -- Add some casts in inffast.c -- Enchance comments in zlib.h on what happens if gzprintf() tries to - write more than 4095 bytes before compression -- Remove unused state from inflateBackEnd() -- Remove exit(0) from minigzip.c, example.c -- Get rid of all those darn tabs -- Add "check" target to Makefile.in that does the same thing as "test" -- Add "mostlyclean" and "maintainer-clean" targets to Makefile.in -- Update contrib/inflate86 [Anderson] -- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant] -- Add msdos and win32 directories with makefiles [Truta] -- More additions and improvements to the FAQ - -Changes in 1.2.0 (9 March 2003) -- New and improved inflate code - - About 20% faster - - Does not allocate 32K window unless and until needed - - Automatically detects and decompresses gzip streams - - Raw inflate no longer needs an extra dummy byte at end - - Added inflateBack functions using a callback interface--even faster - than inflate, useful for file utilities (gzip, zip) - - Added inflateCopy() function to record state for random access on - externally generated deflate streams (e.g. in gzip files) - - More readable code (I hope) -- New and improved crc32() - - About 50% faster, thanks to suggestions from Rodney Brown -- Add deflateBound() and compressBound() functions -- Fix memory leak in deflateInit2() -- Permit setting dictionary for raw deflate (for parallel deflate) -- Fix const declaration for gzwrite() -- Check for some malloc() failures in gzio.c -- Fix bug in gzopen() on single-byte file 0x1f -- Fix bug in gzread() on concatenated file with 0x1f at end of buffer - and next buffer doesn't start with 0x8b -- Fix uncompress() to return Z_DATA_ERROR on truncated input -- Free memory at end of example.c -- Remove MAX #define in trees.c (conflicted with some libraries) -- Fix static const's in deflate.c, gzio.c, and zutil.[ch] -- Declare malloc() and free() in gzio.c if STDC not defined -- Use malloc() instead of calloc() in zutil.c if int big enough -- Define STDC for AIX -- Add aix/ with approach for compiling shared library on AIX -- Add HP-UX support for shared libraries in configure -- Add OpenUNIX support for shared libraries in configure -- Use $cc instead of gcc to build shared library -- Make prefix directory if needed when installing -- Correct Macintosh avoidance of typedef Byte in zconf.h -- Correct Turbo C memory allocation when under Linux -- Use libz.a instead of -lz in Makefile (assure use of compiled library) -- Update configure to check for snprintf or vsnprintf functions and their - return value, warn during make if using an insecure function -- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that - is lost when library is used--resolution is to build new zconf.h -- Documentation improvements (in zlib.h): - - Document raw deflate and inflate - - Update RFCs URL - - Point out that zlib and gzip formats are different - - Note that Z_BUF_ERROR is not fatal - - Document string limit for gzprintf() and possible buffer overflow - - Note requirement on avail_out when flushing - - Note permitted values of flush parameter of inflate() -- Add some FAQs (and even answers) to the FAQ -- Add contrib/inflate86/ for x86 faster inflate -- Add contrib/blast/ for PKWare Data Compression Library decompression -- Add contrib/puff/ simple inflate for deflate format description - -Changes in 1.1.4 (11 March 2002) -- ZFREE was repeated on same allocation on some error conditions. - This creates a security problem described in - http://www.zlib.org/advisory-2002-03-11.txt -- Returned incorrect error (Z_MEM_ERROR) on some invalid data -- Avoid accesses before window for invalid distances with inflate window - less than 32K. -- force windowBits > 8 to avoid a bug in the encoder for a window size - of 256 bytes. (A complete fix will be available in 1.1.5). - -Changes in 1.1.3 (9 July 1998) -- fix "an inflate input buffer bug that shows up on rare but persistent - occasions" (Mark) -- fix gzread and gztell for concatenated .gz files (Didier Le Botlan) -- fix gzseek(..., SEEK_SET) in write mode -- fix crc check after a gzeek (Frank Faubert) -- fix miniunzip when the last entry in a zip file is itself a zip file - (J Lillge) -- add contrib/asm586 and contrib/asm686 (Brian Raiter) - See http://www.muppetlabs.com/~breadbox/software/assembly.html -- add support for Delphi 3 in contrib/delphi (Bob Dellaca) -- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti) -- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren) -- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks) -- added a FAQ file - -- Support gzdopen on Mac with Metrowerks (Jason Linhart) -- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart) -- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young) -- avoid some warnings with Borland C (Tom Tanner) -- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant) -- emulate utime() for WIN32 in contrib/untgz (Gilles Vollant) -- allow several arguments to configure (Tim Mooney, Frodo Looijaard) -- use libdir and includedir in Makefile.in (Tim Mooney) -- support shared libraries on OSF1 V4 (Tim Mooney) -- remove so_locations in "make clean" (Tim Mooney) -- fix maketree.c compilation error (Glenn, Mark) -- Python interface to zlib now in Python 1.5 (Jeremy Hylton) -- new Makefile.riscos (Rich Walker) -- initialize static descriptors in trees.c for embedded targets (Nick Smith) -- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith) -- add the OS/2 files in Makefile.in too (Andrew Zabolotny) -- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane) -- fix maketree.c to allow clean compilation of inffixed.h (Mark) -- fix parameter check in deflateCopy (Gunther Nikl) -- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler) -- Many portability patches by Christian Spieler: - . zutil.c, zutil.h: added "const" for zmem* - . Make_vms.com: fixed some typos - . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists - . msdos/Makefile.msc: remove "default rtl link library" info from obj files - . msdos/Makefile.*: use model-dependent name for the built zlib library - . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc: - new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT) -- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane) -- replace __far with _far for better portability (Christian Spieler, Tom Lane) -- fix test for errno.h in configure (Tim Newsham) - -Changes in 1.1.2 (19 March 98) -- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant) - See http://www.winimage.com/zLibDll/unzip.html -- preinitialize the inflate tables for fixed codes, to make the code - completely thread safe (Mark) -- some simplifications and slight speed-up to the inflate code (Mark) -- fix gzeof on non-compressed files (Allan Schrum) -- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs) -- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn) -- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny) -- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori) -- do not wrap extern "C" around system includes (Tom Lane) -- mention zlib binding for TCL in README (Andreas Kupries) -- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert) -- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson) -- allow "configure --prefix $HOME" (Tim Mooney) -- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson) -- move Makefile.sas to amiga/Makefile.sas - -Changes in 1.1.1 (27 Feb 98) -- fix macros _tr_tally_* in deflate.h for debug mode (Glenn Randers-Pehrson) -- remove block truncation heuristic which had very marginal effect for zlib - (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the - compression ratio on some files. This also allows inlining _tr_tally for - matches in deflate_slow. -- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier) - -Changes in 1.1.0 (24 Feb 98) -- do not return STREAM_END prematurely in inflate (John Bowler) -- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler) -- compile with -DFASTEST to get compression code optimized for speed only -- in minigzip, try mmap'ing the input file first (Miguel Albrecht) -- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain - on Sun but significant on HP) - -- add a pointer to experimental unzip library in README (Gilles Vollant) -- initialize variable gcc in configure (Chris Herborth) - -Changes in 1.0.9 (17 Feb 1998) -- added gzputs and gzgets functions -- do not clear eof flag in gzseek (Mark Diekhans) -- fix gzseek for files in transparent mode (Mark Diekhans) -- do not assume that vsprintf returns the number of bytes written (Jens Krinke) -- replace EXPORT with ZEXPORT to avoid conflict with other programs -- added compress2 in zconf.h, zlib.def, zlib.dnt -- new asm code from Gilles Vollant in contrib/asm386 -- simplify the inflate code (Mark): - . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new() - . ZALLOC the length list in inflate_trees_fixed() instead of using stack - . ZALLOC the value area for huft_build() instead of using stack - . Simplify Z_FINISH check in inflate() - -- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8 -- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi) -- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with - the declaration of FAR (Gilles VOllant) -- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann) -- read_buf buf parameter of type Bytef* instead of charf* -- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout) -- do not redeclare unlink in minigzip.c for WIN32 (John Bowler) -- fix check for presence of directories in "make install" (Ian Willis) - -Changes in 1.0.8 (27 Jan 1998) -- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant) -- fix gzgetc and gzputc for big endian systems (Markus Oberhumer) -- added compress2() to allow setting the compression level -- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong) -- use constant arrays for the static trees in trees.c instead of computing - them at run time (thanks to Ken Raeburn for this suggestion). To create - trees.h, compile with GEN_TREES_H and run "make test". -- check return code of example in "make test" and display result -- pass minigzip command line options to file_compress -- simplifying code of inflateSync to avoid gcc 2.8 bug - -- support CC="gcc -Wall" in configure -s (QingLong) -- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn) -- fix test for shared library support to avoid compiler warnings -- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant) -- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit) -- do not use fdopen for Metrowerks on Mac (Brad Pettit)) -- add checks for gzputc and gzputc in example.c -- avoid warnings in gzio.c and deflate.c (Andreas Kleinert) -- use const for the CRC table (Ken Raeburn) -- fixed "make uninstall" for shared libraries -- use Tracev instead of Trace in infblock.c -- in example.c use correct compressed length for test_sync -- suppress +vnocompatwarnings in configure for HPUX (not always supported) - -Changes in 1.0.7 (20 Jan 1998) -- fix gzseek which was broken in write mode -- return error for gzseek to negative absolute position -- fix configure for Linux (Chun-Chung Chen) -- increase stack space for MSC (Tim Wegner) -- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant) -- define EXPORTVA for gzprintf (Gilles Vollant) -- added man page zlib.3 (Rick Rodgers) -- for contrib/untgz, fix makedir() and improve Makefile - -- check gzseek in write mode in example.c -- allocate extra buffer for seeks only if gzseek is actually called -- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant) -- add inflateSyncPoint in zconf.h -- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def - -Changes in 1.0.6 (19 Jan 1998) -- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and - gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code) -- Fix a deflate bug occurring only with compression level 0 (thanks to - Andy Buckler for finding this one). -- In minigzip, pass transparently also the first byte for .Z files. -- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress() -- check Z_FINISH in inflate (thanks to Marc Schluper) -- Implement deflateCopy (thanks to Adam Costello) -- make static libraries by default in configure, add --shared option. -- move MSDOS or Windows specific files to directory msdos -- suppress the notion of partial flush to simplify the interface - (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4) -- suppress history buffer provided by application to simplify the interface - (this feature was not implemented anyway in 1.0.4) -- next_in and avail_in must be initialized before calling inflateInit or - inflateInit2 -- add EXPORT in all exported functions (for Windows DLL) -- added Makefile.nt (thanks to Stephen Williams) -- added the unsupported "contrib" directory: - contrib/asm386/ by Gilles Vollant - 386 asm code replacing longest_match(). - contrib/iostream/ by Kevin Ruland - A C++ I/O streams interface to the zlib gz* functions - contrib/iostream2/ by Tyge Løvset - Another C++ I/O streams interface - contrib/untgz/ by "Pedro A. Aranda Guti\irrez" - A very simple tar.gz file extractor using zlib - contrib/visual-basic.txt by Carlos Rios - How to use compress(), uncompress() and the gz* functions from VB. -- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression - level) in minigzip (thanks to Tom Lane) - -- use const for rommable constants in deflate -- added test for gzseek and gztell in example.c -- add undocumented function inflateSyncPoint() (hack for Paul Mackerras) -- add undocumented function zError to convert error code to string - (for Tim Smithers) -- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code. -- Use default memcpy for Symantec MSDOS compiler. -- Add EXPORT keyword for check_func (needed for Windows DLL) -- add current directory to LD_LIBRARY_PATH for "make test" -- create also a link for libz.so.1 -- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura) -- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX) -- added -soname for Linux in configure (Chun-Chung Chen, -- assign numbers to the exported functions in zlib.def (for Windows DLL) -- add advice in zlib.h for best usage of deflateSetDictionary -- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn) -- allow compilation with ANSI keywords only enabled for TurboC in large model -- avoid "versionString"[0] (Borland bug) -- add NEED_DUMMY_RETURN for Borland -- use variable z_verbose for tracing in debug mode (L. Peter Deutsch). -- allow compilation with CC -- defined STDC for OS/2 (David Charlap) -- limit external names to 8 chars for MVS (Thomas Lund) -- in minigzip.c, use static buffers only for 16-bit systems -- fix suffix check for "minigzip -d foo.gz" -- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee) -- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) -- added makelcc.bat for lcc-win32 (Tom St Denis) -- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) -- Avoid expanded $Id: ChangeLog,v 1.9 2017/02/11 03:07:47 drolon Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. -- check for unistd.h in configure (for off_t) -- remove useless check parameter in inflate_blocks_free -- avoid useless assignment of s->check to itself in inflate_blocks_new -- do not flush twice in gzclose (thanks to Ken Raeburn) -- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h -- use NO_ERRNO_H instead of enumeration of operating systems with errno.h -- work around buggy fclose on pipes for HP/UX -- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson) -- fix configure if CC is already equal to gcc - -Changes in 1.0.5 (3 Jan 98) -- Fix inflate to terminate gracefully when fed corrupted or invalid data -- Use const for rommable constants in inflate -- Eliminate memory leaks on error conditions in inflate -- Removed some vestigial code in inflate -- Update web address in README - -Changes in 1.0.4 (24 Jul 96) -- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF - bit, so the decompressor could decompress all the correct data but went - on to attempt decompressing extra garbage data. This affected minigzip too. -- zlibVersion and gzerror return const char* (needed for DLL) -- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno) -- use z_error only for DEBUG (avoid problem with DLLs) - -Changes in 1.0.3 (2 Jul 96) -- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS - small and medium models; this makes the library incompatible with previous - versions for these models. (No effect in large model or on other systems.) -- return OK instead of BUF_ERROR if previous deflate call returned with - avail_out as zero but there is nothing to do -- added memcmp for non STDC compilers -- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly) -- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO) -- better check for 16-bit mode MSC (avoids problem with Symantec) - -Changes in 1.0.2 (23 May 96) -- added Windows DLL support -- added a function zlibVersion (for the DLL support) -- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model) -- Bytef is define's instead of typedef'd only for Borland C -- avoid reading uninitialized memory in example.c -- mention in README that the zlib format is now RFC1950 -- updated Makefile.dj2 -- added algorithm.doc - -Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion] -- fix array overlay in deflate.c which sometimes caused bad compressed data -- fix inflate bug with empty stored block -- fix MSDOS medium model which was broken in 0.99 -- fix deflateParams() which could generate bad compressed data. -- Bytef is define'd instead of typedef'ed (work around Borland bug) -- added an INDEX file -- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), - Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas) -- speed up adler32 for modern machines without auto-increment -- added -ansi for IRIX in configure -- static_init_done in trees.c is an int -- define unlink as delete for VMS -- fix configure for QNX -- add configure branch for SCO and HPUX -- avoid many warnings (unused variables, dead assignments, etc...) -- no fdopen for BeOS -- fix the Watcom fix for 32 bit mode (define FAR as empty) -- removed redefinition of Byte for MKWERKS -- work around an MWKERKS bug (incorrect merge of all .h files) - -Changes in 0.99 (27 Jan 96) -- allow preset dictionary shared between compressor and decompressor -- allow compression level 0 (no compression) -- add deflateParams in zlib.h: allow dynamic change of compression level - and compression strategy. -- test large buffers and deflateParams in example.c -- add optional "configure" to build zlib as a shared library -- suppress Makefile.qnx, use configure instead -- fixed deflate for 64-bit systems (detected on Cray) -- fixed inflate_blocks for 64-bit systems (detected on Alpha) -- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2) -- always return Z_BUF_ERROR when deflate() has nothing to do -- deflateInit and inflateInit are now macros to allow version checking -- prefix all global functions and types with z_ with -DZ_PREFIX -- make falloc completely reentrant (inftrees.c) -- fixed very unlikely race condition in ct_static_init -- free in reverse order of allocation to help memory manager -- use zlib-1.0/* instead of zlib/* inside the tar.gz -- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith - -Wconversion -Wstrict-prototypes -Wmissing-prototypes" -- allow gzread on concatenated .gz files -- deflateEnd now returns Z_DATA_ERROR if it was premature -- deflate is finally (?) fully deterministic (no matches beyond end of input) -- Document Z_SYNC_FLUSH -- add uninstall in Makefile -- Check for __cpluplus in zlib.h -- Better test in ct_align for partial flush -- avoid harmless warnings for Borland C++ -- initialize hash_head in deflate.c -- avoid warning on fdopen (gzio.c) for HP cc -Aa -- include stdlib.h for STDC compilers -- include errno.h for Cray -- ignore error if ranlib doesn't exist -- call ranlib twice for NeXTSTEP -- use exec_prefix instead of prefix for libz.a -- renamed ct_* as _tr_* to avoid conflict with applications -- clear z->msg in inflateInit2 before any error return -- initialize opaque in example.c, gzio.c, deflate.c and inflate.c -- fixed typo in zconf.h (_GNUC__ => __GNUC__) -- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode) -- fix typo in Make_vms.com (f$trnlnm -> f$getsyi) -- in fcalloc, normalize pointer if size > 65520 bytes -- don't use special fcalloc for 32 bit Borland C++ -- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc... -- use Z_BINARY instead of BINARY -- document that gzclose after gzdopen will close the file -- allow "a" as mode in gzopen. -- fix error checking in gzread -- allow skipping .gz extra-field on pipes -- added reference to Perl interface in README -- put the crc table in FAR data (I dislike more and more the medium model :) -- added get_crc_table -- added a dimension to all arrays (Borland C can't count). -- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast -- guard against multiple inclusion of *.h (for precompiled header on Mac) -- Watcom C pretends to be Microsoft C small model even in 32 bit mode. -- don't use unsized arrays to avoid silly warnings by Visual C++: - warning C4746: 'inflate_mask' : unsized array treated as '__far' - (what's wrong with far data in far model?). -- define enum out of inflate_blocks_state to allow compilation with C++ - -Changes in 0.95 (16 Aug 95) -- fix MSDOS small and medium model (now easier to adapt to any compiler) -- inlined send_bits -- fix the final (:-) bug for deflate with flush (output was correct but - not completely flushed in rare occasions). -- default window size is same for compression and decompression - (it's now sufficient to set MAX_WBITS in zconf.h). -- voidp -> voidpf and voidnp -> voidp (for consistency with other - typedefs and because voidnp was not near in large model). - -Changes in 0.94 (13 Aug 95) -- support MSDOS medium model -- fix deflate with flush (could sometimes generate bad output) -- fix deflateReset (zlib header was incorrectly suppressed) -- added support for VMS -- allow a compression level in gzopen() -- gzflush now calls fflush -- For deflate with flush, flush even if no more input is provided. -- rename libgz.a as libz.a -- avoid complex expression in infcodes.c triggering Turbo C bug -- work around a problem with gcc on Alpha (in INSERT_STRING) -- don't use inline functions (problem with some gcc versions) -- allow renaming of Byte, uInt, etc... with #define. -- avoid warning about (unused) pointer before start of array in deflate.c -- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c -- avoid reserved word 'new' in trees.c - -Changes in 0.93 (25 June 95) -- temporarily disable inline functions -- make deflate deterministic -- give enough lookahead for PARTIAL_FLUSH -- Set binary mode for stdin/stdout in minigzip.c for OS/2 -- don't even use signed char in inflate (not portable enough) -- fix inflate memory leak for segmented architectures - -Changes in 0.92 (3 May 95) -- don't assume that char is signed (problem on SGI) -- Clear bit buffer when starting a stored block -- no memcpy on Pyramid -- suppressed inftest.c -- optimized fill_window, put longest_match inline for gcc -- optimized inflate on stored blocks. -- untabify all sources to simplify patches - -Changes in 0.91 (2 May 95) -- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h -- Document the memory requirements in zconf.h -- added "make install" -- fix sync search logic in inflateSync -- deflate(Z_FULL_FLUSH) now works even if output buffer too short -- after inflateSync, don't scare people with just "lo world" -- added support for DJGPP - -Changes in 0.9 (1 May 95) -- don't assume that zalloc clears the allocated memory (the TurboC bug - was Mark's bug after all :) -- let again gzread copy uncompressed data unchanged (was working in 0.71) -- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented -- added a test of inflateSync in example.c -- moved MAX_WBITS to zconf.h because users might want to change that. -- document explicitly that zalloc(64K) on MSDOS must return a normalized - pointer (zero offset) -- added Makefiles for Microsoft C, Turbo C, Borland C++ -- faster crc32() - -Changes in 0.8 (29 April 95) -- added fast inflate (inffast.c) -- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this - is incompatible with previous versions of zlib which returned Z_OK. -- work around a TurboC compiler bug (bad code for b << 0, see infutil.h) - (actually that was not a compiler bug, see 0.81 above) -- gzread no longer reads one extra byte in certain cases -- In gzio destroy(), don't reference a freed structure -- avoid many warnings for MSDOS -- avoid the ERROR symbol which is used by MS Windows - -Changes in 0.71 (14 April 95) -- Fixed more MSDOS compilation problems :( There is still a bug with - TurboC large model. - -Changes in 0.7 (14 April 95) -- Added full inflate support. -- Simplified the crc32() interface. The pre- and post-conditioning - (one's complement) is now done inside crc32(). WARNING: this is - incompatible with previous versions; see zlib.h for the new usage. - -Changes in 0.61 (12 April 95) -- workaround for a bug in TurboC. example and minigzip now work on MSDOS. - -Changes in 0.6 (11 April 95) -- added minigzip.c -- added gzdopen to reopen a file descriptor as gzFile -- added transparent reading of non-gziped files in gzread. -- fixed bug in gzread (don't read crc as data) -- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose). -- don't allocate big arrays in the stack (for MSDOS) -- fix some MSDOS compilation problems - -Changes in 0.5: -- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but - not yet Z_FULL_FLUSH. -- support decompression but only in a single step (forced Z_FINISH) -- added opaque object for zalloc and zfree. -- added deflateReset and inflateReset -- added a variable zlib_version for consistency checking. -- renamed the 'filter' parameter of deflateInit2 as 'strategy'. - Added Z_FILTERED and Z_HUFFMAN_ONLY constants. - -Changes in 0.4: -- avoid "zip" everywhere, use zlib instead of ziplib. -- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush - if compression method == 8. -- added adler32 and crc32 -- renamed deflateOptions as deflateInit2, call one or the other but not both -- added the method parameter for deflateInit2. -- added inflateInit2 -- simplied considerably deflateInit and inflateInit by not supporting - user-provided history buffer. This is supported only in deflateInit2 - and inflateInit2. - -Changes in 0.3: -- prefix all macro names with Z_ -- use Z_FINISH instead of deflateEnd to finish compression. -- added Z_HUFFMAN_ONLY -- added gzerror() diff --git a/Dependencies/FreeImage/Source/ZLib/FAQ b/Dependencies/FreeImage/Source/ZLib/FAQ deleted file mode 100644 index 99b7cf9..0000000 --- a/Dependencies/FreeImage/Source/ZLib/FAQ +++ /dev/null @@ -1,368 +0,0 @@ - - Frequently Asked Questions about zlib - - -If your question is not there, please check the zlib home page -http://zlib.net/ which may have more recent information. -The lastest zlib FAQ is at http://zlib.net/zlib_faq.html - - - 1. Is zlib Y2K-compliant? - - Yes. zlib doesn't handle dates. - - 2. Where can I get a Windows DLL version? - - The zlib sources can be compiled without change to produce a DLL. See the - file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the - precompiled DLL are found in the zlib web site at http://zlib.net/ . - - 3. Where can I get a Visual Basic interface to zlib? - - See - * http://marknelson.us/1997/01/01/zlib-engine/ - * win32/DLL_FAQ.txt in the zlib distribution - - 4. compress() returns Z_BUF_ERROR. - - Make sure that before the call of compress(), the length of the compressed - buffer is equal to the available size of the compressed buffer and not - zero. For Visual Basic, check that this parameter is passed by reference - ("as any"), not by value ("as long"). - - 5. deflate() or inflate() returns Z_BUF_ERROR. - - Before making the call, make sure that avail_in and avail_out are not zero. - When setting the parameter flush equal to Z_FINISH, also make sure that - avail_out is big enough to allow processing all pending input. Note that a - Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be - made with more input or output space. A Z_BUF_ERROR may in fact be - unavoidable depending on how the functions are used, since it is not - possible to tell whether or not there is more output pending when - strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a - heavily annotated example. - - 6. Where's the zlib documentation (man pages, etc.)? - - It's in zlib.h . Examples of zlib usage are in the files test/example.c - and test/minigzip.c, with more in examples/ . - - 7. Why don't you use GNU autoconf or libtool or ...? - - Because we would like to keep zlib as a very small and simple package. - zlib is rather portable and doesn't need much configuration. - - 8. I found a bug in zlib. - - Most of the time, such problems are due to an incorrect usage of zlib. - Please try to reproduce the problem with a small program and send the - corresponding source to us at zlib@gzip.org . Do not send multi-megabyte - data files without prior agreement. - - 9. Why do I get "undefined reference to gzputc"? - - If "make test" produces something like - - example.o(.text+0x154): undefined reference to `gzputc' - - check that you don't have old files libz.* in /usr/lib, /usr/local/lib or - /usr/X11R6/lib. Remove any old versions, then do "make install". - -10. I need a Delphi interface to zlib. - - See the contrib/delphi directory in the zlib distribution. - -11. Can zlib handle .zip archives? - - Not by itself, no. See the directory contrib/minizip in the zlib - distribution. - -12. Can zlib handle .Z files? - - No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt - the code of uncompress on your own. - -13. How can I make a Unix shared library? - - By default a shared (and a static) library is built for Unix. So: - - make distclean - ./configure - make - -14. How do I install a shared zlib library on Unix? - - After the above, then: - - make install - - However, many flavors of Unix come with a shared zlib already installed. - Before going to the trouble of compiling a shared version of zlib and - trying to install it, you may want to check if it's already there! If you - can #include , it's there. The -lz option will probably link to - it. You can check the version at the top of zlib.h or with the - ZLIB_VERSION symbol defined in zlib.h . - -15. I have a question about OttoPDF. - - We are not the authors of OttoPDF. The real author is on the OttoPDF web - site: Joel Hainley, jhainley@myndkryme.com. - -16. Can zlib decode Flate data in an Adobe PDF file? - - Yes. See http://www.pdflib.com/ . To modify PDF forms, see - http://sourceforge.net/projects/acroformtool/ . - -17. Why am I getting this "register_frame_info not found" error on Solaris? - - After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib - generates an error such as: - - ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so: - symbol __register_frame_info: referenced symbol not found - - The symbol __register_frame_info is not part of zlib, it is generated by - the C compiler (cc or gcc). You must recompile applications using zlib - which have this problem. This problem is specific to Solaris. See - http://www.sunfreeware.com for Solaris versions of zlib and applications - using zlib. - -18. Why does gzip give an error on a file I make with compress/deflate? - - The compress and deflate functions produce data in the zlib format, which - is different and incompatible with the gzip format. The gz* functions in - zlib on the other hand use the gzip format. Both the zlib and gzip formats - use the same compressed data format internally, but have different headers - and trailers around the compressed data. - -19. Ok, so why are there two different formats? - - The gzip format was designed to retain the directory information about a - single file, such as the name and last modification date. The zlib format - on the other hand was designed for in-memory and communication channel - applications, and has a much more compact header and trailer and uses a - faster integrity check than gzip. - -20. Well that's nice, but how do I make a gzip file in memory? - - You can request that deflate write the gzip format instead of the zlib - format using deflateInit2(). You can also request that inflate decode the - gzip format using inflateInit2(). Read zlib.h for more details. - -21. Is zlib thread-safe? - - Yes. However any library routines that zlib uses and any application- - provided memory allocation routines must also be thread-safe. zlib's gz* - functions use stdio library routines, and most of zlib's functions use the - library memory allocation routines by default. zlib's *Init* functions - allow for the application to provide custom memory allocation routines. - - Of course, you should only operate on any given zlib or gzip stream from a - single thread at a time. - -22. Can I use zlib in my commercial application? - - Yes. Please read the license in zlib.h. - -23. Is zlib under the GNU license? - - No. Please read the license in zlib.h. - -24. The license says that altered source versions must be "plainly marked". So - what exactly do I need to do to meet that requirement? - - You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In - particular, the final version number needs to be changed to "f", and an - identification string should be appended to ZLIB_VERSION. Version numbers - x.x.x.f are reserved for modifications to zlib by others than the zlib - maintainers. For example, if the version of the base zlib you are altering - is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and - ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also - update the version strings in deflate.c and inftrees.c. - - For altered source distributions, you should also note the origin and - nature of the changes in zlib.h, as well as in ChangeLog and README, along - with the dates of the alterations. The origin should include at least your - name (or your company's name), and an email address to contact for help or - issues with the library. - - Note that distributing a compiled zlib library along with zlib.h and - zconf.h is also a source distribution, and so you should change - ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes - in zlib.h as you would for a full source distribution. - -25. Will zlib work on a big-endian or little-endian architecture, and can I - exchange compressed data between them? - - Yes and yes. - -26. Will zlib work on a 64-bit machine? - - Yes. It has been tested on 64-bit machines, and has no dependence on any - data types being limited to 32-bits in length. If you have any - difficulties, please provide a complete problem report to zlib@gzip.org - -27. Will zlib decompress data from the PKWare Data Compression Library? - - No. The PKWare DCL uses a completely different compressed data format than - does PKZIP and zlib. However, you can look in zlib's contrib/blast - directory for a possible solution to your problem. - -28. Can I access data randomly in a compressed stream? - - No, not without some preparation. If when compressing you periodically use - Z_FULL_FLUSH, carefully write all the pending data at those points, and - keep an index of those locations, then you can start decompression at those - points. You have to be careful to not use Z_FULL_FLUSH too often, since it - can significantly degrade compression. Alternatively, you can scan a - deflate stream once to generate an index, and then use that index for - random access. See examples/zran.c . - -29. Does zlib work on MVS, OS/390, CICS, etc.? - - It has in the past, but we have not heard of any recent evidence. There - were working ports of zlib 1.1.4 to MVS, but those links no longer work. - If you know of recent, successful applications of zlib on these operating - systems, please let us know. Thanks. - -30. Is there some simpler, easier to read version of inflate I can look at to - understand the deflate format? - - First off, you should read RFC 1951. Second, yes. Look in zlib's - contrib/puff directory. - -31. Does zlib infringe on any patents? - - As far as we know, no. In fact, that was originally the whole point behind - zlib. Look here for some more information: - - http://www.gzip.org/#faq11 - -32. Can zlib work with greater than 4 GB of data? - - Yes. inflate() and deflate() will process any amount of data correctly. - Each call of inflate() or deflate() is limited to input and output chunks - of the maximum value that can be stored in the compiler's "unsigned int" - type, but there is no limit to the number of chunks. Note however that the - strm.total_in and strm_total_out counters may be limited to 4 GB. These - counters are provided as a convenience and are not used internally by - inflate() or deflate(). The application can easily set up its own counters - updated after each call of inflate() or deflate() to count beyond 4 GB. - compress() and uncompress() may be limited to 4 GB, since they operate in a - single call. gzseek() and gztell() may be limited to 4 GB depending on how - zlib is compiled. See the zlibCompileFlags() function in zlib.h. - - The word "may" appears several times above since there is a 4 GB limit only - if the compiler's "long" type is 32 bits. If the compiler's "long" type is - 64 bits, then the limit is 16 exabytes. - -33. Does zlib have any security vulnerabilities? - - The only one that we are aware of is potentially in gzprintf(). If zlib is - compiled to use sprintf() or vsprintf(), then there is no protection - against a buffer overflow of an 8K string space (or other value as set by - gzbuffer()), other than the caller of gzprintf() assuring that the output - will not exceed 8K. On the other hand, if zlib is compiled to use - snprintf() or vsnprintf(), which should normally be the case, then there is - no vulnerability. The ./configure script will display warnings if an - insecure variation of sprintf() will be used by gzprintf(). Also the - zlibCompileFlags() function will return information on what variant of - sprintf() is used by gzprintf(). - - If you don't have snprintf() or vsnprintf() and would like one, you can - find a portable implementation here: - - http://www.ijs.si/software/snprintf/ - - Note that you should be using the most recent version of zlib. Versions - 1.1.3 and before were subject to a double-free vulnerability, and versions - 1.2.1 and 1.2.2 were subject to an access exception when decompressing - invalid compressed data. - -34. Is there a Java version of zlib? - - Probably what you want is to use zlib in Java. zlib is already included - as part of the Java SDK in the java.util.zip package. If you really want - a version of zlib written in the Java language, look on the zlib home - page for links: http://zlib.net/ . - -35. I get this or that compiler or source-code scanner warning when I crank it - up to maximally-pedantic. Can't you guys write proper code? - - Many years ago, we gave up attempting to avoid warnings on every compiler - in the universe. It just got to be a waste of time, and some compilers - were downright silly as well as contradicted each other. So now, we simply - make sure that the code always works. - -36. Valgrind (or some similar memory access checker) says that deflate is - performing a conditional jump that depends on an uninitialized value. - Isn't that a bug? - - No. That is intentional for performance reasons, and the output of deflate - is not affected. This only started showing up recently since zlib 1.2.x - uses malloc() by default for allocations, whereas earlier versions used - calloc(), which zeros out the allocated memory. Even though the code was - correct, versions 1.2.4 and later was changed to not stimulate these - checkers. - -37. Will zlib read the (insert any ancient or arcane format here) compressed - data format? - - Probably not. Look in the comp.compression FAQ for pointers to various - formats and associated software. - -38. How can I encrypt/decrypt zip files with zlib? - - zlib doesn't support encryption. The original PKZIP encryption is very - weak and can be broken with freely available programs. To get strong - encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib - compression. For PKZIP compatible "encryption", look at - http://www.info-zip.org/ - -39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? - - "gzip" is the gzip format, and "deflate" is the zlib format. They should - probably have called the second one "zlib" instead to avoid confusion with - the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 - correctly points to the zlib specification in RFC 1950 for the "deflate" - transfer encoding, there have been reports of servers and browsers that - incorrectly produce or expect raw deflate data per the deflate - specification in RFC 1951, most notably Microsoft. So even though the - "deflate" transfer encoding using the zlib format would be the more - efficient approach (and in fact exactly what the zlib format was designed - for), using the "gzip" transfer encoding is probably more reliable due to - an unfortunate choice of name on the part of the HTTP 1.1 authors. - - Bottom line: use the gzip format for HTTP 1.1 encoding. - -40. Does zlib support the new "Deflate64" format introduced by PKWare? - - No. PKWare has apparently decided to keep that format proprietary, since - they have not documented it as they have previous compression formats. In - any case, the compression improvements are so modest compared to other more - modern approaches, that it's not worth the effort to implement. - -41. I'm having a problem with the zip functions in zlib, can you help? - - There are no zip functions in zlib. You are probably using minizip by - Giles Vollant, which is found in the contrib directory of zlib. It is not - part of zlib. In fact none of the stuff in contrib is part of zlib. The - files in there are not supported by the zlib authors. You need to contact - the authors of the respective contribution for help. - -42. The match.asm code in contrib is under the GNU General Public License. - Since it's part of zlib, doesn't that mean that all of zlib falls under the - GNU GPL? - - No. The files in contrib are not part of zlib. They were contributed by - other authors and are provided as a convenience to the user within the zlib - distribution. Each item in contrib has its own license. - -43. Is zlib subject to export controls? What is its ECCN? - - zlib is not subject to export controls, and so is classified as EAR99. - -44. Can you please sign these lengthy legal documents and fax them back to us - so that we can use your software in our product? - - No. Go away. Shoo. diff --git a/Dependencies/FreeImage/Source/ZLib/INDEX b/Dependencies/FreeImage/Source/ZLib/INDEX deleted file mode 100644 index 2ba0641..0000000 --- a/Dependencies/FreeImage/Source/ZLib/INDEX +++ /dev/null @@ -1,68 +0,0 @@ -CMakeLists.txt cmake build file -ChangeLog history of changes -FAQ Frequently Asked Questions about zlib -INDEX this file -Makefile dummy Makefile that tells you to ./configure -Makefile.in template for Unix Makefile -README guess what -configure configure script for Unix -make_vms.com makefile for VMS -test/example.c zlib usages examples for build testing -test/minigzip.c minimal gzip-like functionality for build testing -test/infcover.c inf*.c code coverage for build coverage testing -treebuild.xml XML description of source file dependencies -zconf.h.cmakein zconf.h template for cmake -zconf.h.in zconf.h template for configure -zlib.3 Man page for zlib -zlib.3.pdf Man page in PDF format -zlib.map Linux symbol information -zlib.pc.in Template for pkg-config descriptor -zlib.pc.cmakein zlib.pc template for cmake -zlib2ansi perl script to convert source files for C++ compilation - -amiga/ makefiles for Amiga SAS C -as400/ makefiles for AS/400 -doc/ documentation for formats and algorithms -msdos/ makefiles for MSDOS -nintendods/ makefile for Nintendo DS -old/ makefiles for various architectures and zlib documentation - files that have not yet been updated for zlib 1.2.x -qnx/ makefiles for QNX -watcom/ makefiles for OpenWatcom -win32/ makefiles for Windows - - zlib public header files (required for library use): -zconf.h -zlib.h - - private source files used to build the zlib library: -adler32.c -compress.c -crc32.c -crc32.h -deflate.c -deflate.h -gzclose.c -gzguts.h -gzlib.c -gzread.c -gzwrite.c -infback.c -inffast.c -inffast.h -inffixed.h -inflate.c -inflate.h -inftrees.c -inftrees.h -trees.c -trees.h -uncompr.c -zutil.c -zutil.h - - source files for sample programs -See examples/README.examples - - unsupported contributions by third parties -See contrib/README.contrib diff --git a/Dependencies/FreeImage/Source/ZLib/Makefile b/Dependencies/FreeImage/Source/ZLib/Makefile deleted file mode 100644 index 6bba86c..0000000 --- a/Dependencies/FreeImage/Source/ZLib/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -all: - -@echo "Please use ./configure first. Thank you." - -distclean: - make -f Makefile.in distclean diff --git a/Dependencies/FreeImage/Source/ZLib/Makefile.in b/Dependencies/FreeImage/Source/ZLib/Makefile.in deleted file mode 100644 index 5a77949..0000000 --- a/Dependencies/FreeImage/Source/ZLib/Makefile.in +++ /dev/null @@ -1,410 +0,0 @@ -# Makefile for zlib -# Copyright (C) 1995-2017 Jean-loup Gailly, Mark Adler -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile and test, type: -# ./configure; make test -# Normally configure builds both a static and a shared library. -# If you want to build just a static library, use: ./configure --static - -# To use the asm code, type: -# cp contrib/asm?86/match.S ./match.S -# make LOC=-DASMV OBJA=match.o - -# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: -# make install -# To install in $HOME instead of /usr/local, use: -# make install prefix=$HOME - -CC=cc - -CFLAGS=-O -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-g -DZLIB_DEBUG -#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ -# -Wstrict-prototypes -Wmissing-prototypes - -SFLAGS=-O -LDFLAGS= -TEST_LDFLAGS=-L. libz.a -LDSHARED=$(CC) -CPP=$(CC) -E - -STATICLIB=libz.a -SHAREDLIB=libz.so -SHAREDLIBV=libz.so.1.2.11 -SHAREDLIBM=libz.so.1 -LIBS=$(STATICLIB) $(SHAREDLIBV) - -AR=ar -ARFLAGS=rc -RANLIB=ranlib -LDCONFIG=ldconfig -LDSHAREDLIBC=-lc -TAR=tar -SHELL=/bin/sh -EXE= - -prefix = /usr/local -exec_prefix = ${prefix} -libdir = ${exec_prefix}/lib -sharedlibdir = ${libdir} -includedir = ${prefix}/include -mandir = ${prefix}/share/man -man3dir = ${mandir}/man3 -pkgconfigdir = ${libdir}/pkgconfig -SRCDIR= -ZINC= -ZINCOUT=-I. - -OBJZ = adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o -OBJG = compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o -OBJC = $(OBJZ) $(OBJG) - -PIC_OBJZ = adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo -PIC_OBJG = compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo -PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG) - -# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo -OBJA = -PIC_OBJA = - -OBJS = $(OBJC) $(OBJA) - -PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA) - -all: static shared - -static: example$(EXE) minigzip$(EXE) - -shared: examplesh$(EXE) minigzipsh$(EXE) - -all64: example64$(EXE) minigzip64$(EXE) - -check: test - -test: all teststatic testshared - -teststatic: static - @TMPST=tmpst_$$; \ - if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \ - echo ' *** zlib test OK ***'; \ - else \ - echo ' *** zlib test FAILED ***'; false; \ - fi; \ - rm -f $$TMPST - -testshared: shared - @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ - LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \ - DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \ - SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \ - TMPSH=tmpsh_$$; \ - if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH; then \ - echo ' *** zlib shared test OK ***'; \ - else \ - echo ' *** zlib shared test FAILED ***'; false; \ - fi; \ - rm -f $$TMPSH - -test64: all64 - @TMP64=tmp64_$$; \ - if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \ - echo ' *** zlib 64-bit test OK ***'; \ - else \ - echo ' *** zlib 64-bit test FAILED ***'; false; \ - fi; \ - rm -f $$TMP64 - -infcover.o: $(SRCDIR)test/infcover.c $(SRCDIR)zlib.h zconf.h - $(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/infcover.c - -infcover: infcover.o libz.a - $(CC) $(CFLAGS) -o $@ infcover.o libz.a - -cover: infcover - rm -f *.gcda - ./infcover - gcov inf*.c - -libz.a: $(OBJS) - $(AR) $(ARFLAGS) $@ $(OBJS) - -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 - -match.o: match.S - $(CPP) match.S > _match.s - $(CC) -c _match.s - mv _match.o match.o - rm -f _match.s - -match.lo: match.S - $(CPP) match.S > _match.s - $(CC) -c -fPIC _match.s - mv _match.o match.lo - rm -f _match.s - -example.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h - $(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/example.c - -minigzip.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h - $(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/minigzip.c - -example64.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h - $(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/example.c - -minigzip64.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h - $(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/minigzip.c - - -adler32.o: $(SRCDIR)adler32.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)adler32.c - -crc32.o: $(SRCDIR)crc32.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)crc32.c - -deflate.o: $(SRCDIR)deflate.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)deflate.c - -infback.o: $(SRCDIR)infback.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)infback.c - -inffast.o: $(SRCDIR)inffast.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inffast.c - -inflate.o: $(SRCDIR)inflate.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inflate.c - -inftrees.o: $(SRCDIR)inftrees.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inftrees.c - -trees.o: $(SRCDIR)trees.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)trees.c - -zutil.o: $(SRCDIR)zutil.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)zutil.c - -compress.o: $(SRCDIR)compress.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)compress.c - -uncompr.o: $(SRCDIR)uncompr.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)uncompr.c - -gzclose.o: $(SRCDIR)gzclose.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzclose.c - -gzlib.o: $(SRCDIR)gzlib.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzlib.c - -gzread.o: $(SRCDIR)gzread.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzread.c - -gzwrite.o: $(SRCDIR)gzwrite.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzwrite.c - - -adler32.lo: $(SRCDIR)adler32.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/adler32.o $(SRCDIR)adler32.c - -@mv objs/adler32.o $@ - -crc32.lo: $(SRCDIR)crc32.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/crc32.o $(SRCDIR)crc32.c - -@mv objs/crc32.o $@ - -deflate.lo: $(SRCDIR)deflate.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/deflate.o $(SRCDIR)deflate.c - -@mv objs/deflate.o $@ - -infback.lo: $(SRCDIR)infback.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/infback.o $(SRCDIR)infback.c - -@mv objs/infback.o $@ - -inffast.lo: $(SRCDIR)inffast.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inffast.o $(SRCDIR)inffast.c - -@mv objs/inffast.o $@ - -inflate.lo: $(SRCDIR)inflate.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inflate.o $(SRCDIR)inflate.c - -@mv objs/inflate.o $@ - -inftrees.lo: $(SRCDIR)inftrees.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inftrees.o $(SRCDIR)inftrees.c - -@mv objs/inftrees.o $@ - -trees.lo: $(SRCDIR)trees.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/trees.o $(SRCDIR)trees.c - -@mv objs/trees.o $@ - -zutil.lo: $(SRCDIR)zutil.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/zutil.o $(SRCDIR)zutil.c - -@mv objs/zutil.o $@ - -compress.lo: $(SRCDIR)compress.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/compress.o $(SRCDIR)compress.c - -@mv objs/compress.o $@ - -uncompr.lo: $(SRCDIR)uncompr.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/uncompr.o $(SRCDIR)uncompr.c - -@mv objs/uncompr.o $@ - -gzclose.lo: $(SRCDIR)gzclose.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzclose.o $(SRCDIR)gzclose.c - -@mv objs/gzclose.o $@ - -gzlib.lo: $(SRCDIR)gzlib.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzlib.o $(SRCDIR)gzlib.c - -@mv objs/gzlib.o $@ - -gzread.lo: $(SRCDIR)gzread.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzread.o $(SRCDIR)gzread.c - -@mv objs/gzread.o $@ - -gzwrite.lo: $(SRCDIR)gzwrite.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzwrite.o $(SRCDIR)gzwrite.c - -@mv objs/gzwrite.o $@ - - -placebo $(SHAREDLIBV): $(PIC_OBJS) libz.a - $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS) - rm -f $(SHAREDLIB) $(SHAREDLIBM) - ln -s $@ $(SHAREDLIB) - ln -s $@ $(SHAREDLIBM) - -@rmdir objs - -example$(EXE): example.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) - -minigzip$(EXE): minigzip.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) - -examplesh$(EXE): example.o $(SHAREDLIBV) - $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV) - -minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) - $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV) - -example64$(EXE): example64.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) - -minigzip64$(EXE): minigzip64.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) - -install-libs: $(LIBS) - -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi - -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi - -@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi - -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi - -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi - rm -f $(DESTDIR)$(libdir)/$(STATICLIB) - cp $(STATICLIB) $(DESTDIR)$(libdir) - chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB) - -@($(RANLIB) $(DESTDIR)$(libdir)/libz.a || true) >/dev/null 2>&1 - -@if test -n "$(SHAREDLIBV)"; then \ - rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \ - cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \ - echo "cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)"; \ - chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \ - echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV)"; \ - rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \ - ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \ - ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \ - ($(LDCONFIG) || true) >/dev/null 2>&1; \ - fi - rm -f $(DESTDIR)$(man3dir)/zlib.3 - cp $(SRCDIR)zlib.3 $(DESTDIR)$(man3dir) - chmod 644 $(DESTDIR)$(man3dir)/zlib.3 - rm -f $(DESTDIR)$(pkgconfigdir)/zlib.pc - cp zlib.pc $(DESTDIR)$(pkgconfigdir) - chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc -# The ranlib in install is needed on NeXTSTEP which checks file times -# ldconfig is for Linux - -install: install-libs - -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi - rm -f $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h - cp $(SRCDIR)zlib.h zconf.h $(DESTDIR)$(includedir) - chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h - -uninstall: - cd $(DESTDIR)$(includedir) && rm -f zlib.h zconf.h - cd $(DESTDIR)$(libdir) && rm -f libz.a; \ - if test -n "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \ - rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ - fi - cd $(DESTDIR)$(man3dir) && rm -f zlib.3 - cd $(DESTDIR)$(pkgconfigdir) && rm -f zlib.pc - -docs: zlib.3.pdf - -zlib.3.pdf: $(SRCDIR)zlib.3 - groff -mandoc -f H -T ps $(SRCDIR)zlib.3 | ps2pdf - $@ - -zconf.h.cmakein: $(SRCDIR)zconf.h.in - -@ TEMPFILE=zconfh_$$; \ - echo "/#define ZCONF_H/ a\\\\\n#cmakedefine Z_PREFIX\\\\\n#cmakedefine Z_HAVE_UNISTD_H\n" >> $$TEMPFILE &&\ - sed -f $$TEMPFILE $(SRCDIR)zconf.h.in > $@ &&\ - touch -r $(SRCDIR)zconf.h.in $@ &&\ - rm $$TEMPFILE - -zconf: $(SRCDIR)zconf.h.in - cp -p $(SRCDIR)zconf.h.in zconf.h - -mostlyclean: clean -clean: - rm -f *.o *.lo *~ \ - example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \ - example64$(EXE) minigzip64$(EXE) \ - infcover \ - libz.* foo.gz so_locations \ - _match.s maketree contrib/infback9/*.o - rm -rf objs - rm -f *.gcda *.gcno *.gcov - rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov - -maintainer-clean: distclean -distclean: clean zconf zconf.h.cmakein docs - rm -f Makefile zlib.pc configure.log - -@rm -f .DS_Store - @if [ -f Makefile.in ]; then \ - printf 'all:\n\t-@echo "Please use ./configure first. Thank you."\n' > Makefile ; \ - printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile ; \ - touch -r $(SRCDIR)Makefile.in Makefile ; fi - @if [ ! -f zconf.h.in ]; then rm -f zconf.h zconf.h.cmakein ; fi - @if [ ! -f zlib.3 ]; then rm -f zlib.3.pdf ; fi - -tags: - etags $(SRCDIR)*.[ch] - -adler32.o zutil.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h -gzclose.o gzlib.o gzread.o gzwrite.o: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h -compress.o example.o minigzip.o uncompr.o: $(SRCDIR)zlib.h zconf.h -crc32.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h -deflate.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h -infback.o inflate.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h -inffast.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h -inftrees.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h -trees.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h - -adler32.lo zutil.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h -gzclose.lo gzlib.lo gzread.lo gzwrite.lo: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h -compress.lo example.lo minigzip.lo uncompr.lo: $(SRCDIR)zlib.h zconf.h -crc32.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h -deflate.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h -infback.lo inflate.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h -inffast.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h -inftrees.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h -trees.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h diff --git a/Dependencies/FreeImage/Source/ZLib/README b/Dependencies/FreeImage/Source/ZLib/README deleted file mode 100644 index 51106de..0000000 --- a/Dependencies/FreeImage/Source/ZLib/README +++ /dev/null @@ -1,115 +0,0 @@ -ZLIB DATA COMPRESSION LIBRARY - -zlib 1.2.11 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 -http://marknelson.us/1997/01/01/zlib-engine/ . - -The changes made in version 1.2.11 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, documented at -http://java.sun.com/developer/technicalArticles/Programming/compression/ . - -A Perl interface to zlib written by Paul Marquess is available -at CPAN (Comprehensive Perl Archive Network) sites, including -http://search.cpan.org/~pmqs/IO-Compress-Zlib/ . - -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 (formely 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-2017 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. - -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/Dependencies/FreeImage/Source/ZLib/ZLib.2013.vcxproj b/Dependencies/FreeImage/Source/ZLib/ZLib.2013.vcxproj deleted file mode 100644 index 93ae8cf..0000000 --- a/Dependencies/FreeImage/Source/ZLib/ZLib.2013.vcxproj +++ /dev/null @@ -1,237 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - ZLib - {33134F61-C1AD-4B6F-9CEA-503A9F140C52} - ZLib - - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - StaticLibrary - v120 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - EditAndContinue - stdafx.h - false - 4996 - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - X64 - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - ProgramDatabase - stdafx.h - false - 4996 - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - Full - AnySuitable - true - Speed - true - - - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - stdafx.h - false - None - 4996 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - X64 - - - Full - OnlyExplicitInline - true - Speed - true - - - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - stdafx.h - false - None - 4996 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/ZLib/ZLib.2013.vcxproj.filters b/Dependencies/FreeImage/Source/ZLib/ZLib.2013.vcxproj.filters deleted file mode 100644 index 29462eb..0000000 --- a/Dependencies/FreeImage/Source/ZLib/ZLib.2013.vcxproj.filters +++ /dev/null @@ -1,95 +0,0 @@ - - - - - {d67faf16-4f82-41bc-882b-620fed678573} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {f4a416b7-ef3f-4ba1-b047-c2e553510a1a} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/ZLib/ZLib.2017.vcxproj b/Dependencies/FreeImage/Source/ZLib/ZLib.2017.vcxproj deleted file mode 100644 index 38181f1..0000000 --- a/Dependencies/FreeImage/Source/ZLib/ZLib.2017.vcxproj +++ /dev/null @@ -1,238 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - ZLib - {33134F61-C1AD-4B6F-9CEA-503A9F140C52} - ZLib - 10.0.16299.0 - - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - StaticLibrary - v141 - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - .\$(Platform)\$(Configuration)\ - .\$(Platform)\$(Configuration)\ - - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - EditAndContinue - stdafx.h - false - 4996 - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - X64 - - - Disabled - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - Level3 - true - ProgramDatabase - stdafx.h - false - 4996 - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - Full - AnySuitable - true - Speed - true - - - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - stdafx.h - false - None - 4996 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - X64 - - - Full - AnySuitable - true - Speed - true - - - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - MultiThreaded - false - NotUsing - Level3 - true - Default - stdafx.h - false - None - 4996 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/ZLib/ZLib.2017.vcxproj.filters b/Dependencies/FreeImage/Source/ZLib/ZLib.2017.vcxproj.filters deleted file mode 100644 index 29462eb..0000000 --- a/Dependencies/FreeImage/Source/ZLib/ZLib.2017.vcxproj.filters +++ /dev/null @@ -1,95 +0,0 @@ - - - - - {d67faf16-4f82-41bc-882b-620fed678573} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {f4a416b7-ef3f-4ba1-b047-c2e553510a1a} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/Dependencies/FreeImage/Source/ZLib/adler32.c b/Dependencies/FreeImage/Source/ZLib/adler32.c deleted file mode 100644 index 320effe..0000000 --- a/Dependencies/FreeImage/Source/ZLib/adler32.c +++ /dev/null @@ -1,186 +0,0 @@ -/* 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: adler32.c,v 1.11 2017/02/11 03:07:47 drolon Exp $ */ - -#include "zutil.h" - -local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); - -#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(adler, buf, len) - 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(adler, buf, len) - uLong adler; - const Bytef *buf; - uInt len; -{ - return adler32_z(adler, buf, len); -} - -/* ========================================================================= */ -local uLong adler32_combine_(adler1, adler2, len2) - 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(adler1, adler2, len2) - uLong adler1; - uLong adler2; - z_off_t len2; -{ - return adler32_combine_(adler1, adler2, len2); -} - -uLong ZEXPORT adler32_combine64(adler1, adler2, len2) - uLong adler1; - uLong adler2; - z_off64_t len2; -{ - return adler32_combine_(adler1, adler2, len2); -} diff --git a/Dependencies/FreeImage/Source/ZLib/compress.c b/Dependencies/FreeImage/Source/ZLib/compress.c deleted file mode 100644 index 1e1c270..0000000 --- a/Dependencies/FreeImage/Source/ZLib/compress.c +++ /dev/null @@ -1,86 +0,0 @@ -/* 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: compress.c,v 1.11 2017/02/11 03:07:47 drolon Exp $ */ - -#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 (dest, destLen, source, sourceLen, level) - 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 (dest, destLen, source, sourceLen) - 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 (sourceLen) - uLong sourceLen; -{ - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + - (sourceLen >> 25) + 13; -} diff --git a/Dependencies/FreeImage/Source/ZLib/configure b/Dependencies/FreeImage/Source/ZLib/configure deleted file mode 100644 index e974d1f..0000000 --- a/Dependencies/FreeImage/Source/ZLib/configure +++ /dev/null @@ -1,921 +0,0 @@ -#!/bin/sh -# configure script for zlib. -# -# Normally configure builds both a static and a shared library. -# If you want to build just a static library, use: ./configure --static -# -# To impose specific compiler or flags or install directory, use for example: -# prefix=$HOME CC=cc CFLAGS="-O4" ./configure -# or for csh/tcsh users: -# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure) - -# Incorrect settings of CC or CFLAGS may prevent creating a shared library. -# If you have problems, try without defining CC and CFLAGS before reporting -# an error. - -# start off configure.log -echo -------------------- >> configure.log -echo $0 $* >> configure.log -date >> configure.log - -# get source directory -SRCDIR=`dirname $0` -if test $SRCDIR = "."; then - ZINC="" - ZINCOUT="-I." - SRCDIR="" -else - ZINC='-include zconf.h' - ZINCOUT='-I. -I$(SRCDIR)' - SRCDIR="$SRCDIR/" -fi - -# set command prefix for cross-compilation -if [ -n "${CHOST}" ]; then - uname="`echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/'`" - CROSS_PREFIX="${CHOST}-" -fi - -# destination name for static library -STATICLIB=libz.a - -# extract zlib version numbers from zlib.h -VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h` -VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < ${SRCDIR}zlib.h` -VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h` -VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h` - -# establish commands for library building -if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then - AR=${AR-"${CROSS_PREFIX}ar"} - test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log -else - AR=${AR-"ar"} - test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log -fi -ARFLAGS=${ARFLAGS-"rc"} -if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then - RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} - test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log -else - RANLIB=${RANLIB-"ranlib"} -fi -if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then - NM=${NM-"${CROSS_PREFIX}nm"} - test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log -else - NM=${NM-"nm"} -fi - -# set defaults before processing command line options -LDCONFIG=${LDCONFIG-"ldconfig"} -LDSHAREDLIBC="${LDSHAREDLIBC--lc}" -ARCHS= -prefix=${prefix-/usr/local} -exec_prefix=${exec_prefix-'${prefix}'} -libdir=${libdir-'${exec_prefix}/lib'} -sharedlibdir=${sharedlibdir-'${libdir}'} -includedir=${includedir-'${prefix}/include'} -mandir=${mandir-'${prefix}/share/man'} -shared_ext='.so' -shared=1 -solo=0 -cover=0 -zprefix=0 -zconst=0 -build64=0 -gcc=0 -warn=0 -debug=0 -old_cc="$CC" -old_cflags="$CFLAGS" -OBJC='$(OBJZ) $(OBJG)' -PIC_OBJC='$(PIC_OBJZ) $(PIC_OBJG)' - -# leave this script, optionally in a bad way -leave() -{ - if test "$*" != "0"; then - echo "** $0 aborting." | tee -a configure.log - fi - rm -f $test.[co] $test $test$shared_ext $test.gcno ./--version - echo -------------------- >> configure.log - echo >> configure.log - echo >> configure.log - exit $1 -} - -# process command line options -while test $# -ge 1 -do -case "$1" in - -h* | --help) - echo 'usage:' | tee -a configure.log - echo ' configure [--const] [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]' | tee -a configure.log - echo ' [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]' | tee -a configure.log - echo ' [--includedir=INCLUDEDIR] [--archs="-arch i386 -arch x86_64"]' | tee -a configure.log - exit 0 ;; - -p*=* | --prefix=*) prefix=`echo $1 | sed 's/.*=//'`; shift ;; - -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/.*=//'`; shift ;; - -l*=* | --libdir=*) libdir=`echo $1 | sed 's/.*=//'`; shift ;; - --sharedlibdir=*) sharedlibdir=`echo $1 | sed 's/.*=//'`; shift ;; - -i*=* | --includedir=*) includedir=`echo $1 | sed 's/.*=//'`;shift ;; - -u*=* | --uname=*) uname=`echo $1 | sed 's/.*=//'`;shift ;; - -p* | --prefix) prefix="$2"; shift; shift ;; - -e* | --eprefix) exec_prefix="$2"; shift; shift ;; - -l* | --libdir) libdir="$2"; shift; shift ;; - -i* | --includedir) includedir="$2"; shift; shift ;; - -s* | --shared | --enable-shared) shared=1; shift ;; - -t | --static) shared=0; shift ;; - --solo) solo=1; shift ;; - --cover) cover=1; shift ;; - -z* | --zprefix) zprefix=1; shift ;; - -6* | --64) build64=1; shift ;; - -a*=* | --archs=*) ARCHS=`echo $1 | sed 's/.*=//'`; shift ;; - --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;; - --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; - -c* | --const) zconst=1; shift ;; - -w* | --warn) warn=1; shift ;; - -d* | --debug) debug=1; shift ;; - *) - echo "unknown option: $1" | tee -a configure.log - echo "$0 --help for help" | tee -a configure.log - leave 1;; - esac -done - -# temporary file name -test=ztest$$ - -# put arguments in log, also put test file in log if used in arguments -show() -{ - case "$*" in - *$test.c*) - echo === $test.c === >> configure.log - cat $test.c >> configure.log - echo === >> configure.log;; - esac - echo $* >> configure.log -} - -# check for gcc vs. cc and set compile and link flags based on the system identified by uname -cat > $test.c <&1` in - *gcc*) gcc=1 ;; - *clang*) gcc=1 ;; -esac - -show $cc -c $test.c -if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then - echo ... using gcc >> configure.log - CC="$cc" - CFLAGS="${CFLAGS--O3}" - SFLAGS="${CFLAGS--O3} -fPIC" - if test "$ARCHS"; then - CFLAGS="${CFLAGS} ${ARCHS}" - LDFLAGS="${LDFLAGS} ${ARCHS}" - fi - if test $build64 -eq 1; then - CFLAGS="${CFLAGS} -m64" - SFLAGS="${SFLAGS} -m64" - fi - if test "$warn" -eq 1; then - if test "$zconst" -eq 1; then - CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST" - else - CFLAGS="${CFLAGS} -Wall -Wextra -pedantic" - fi - fi - if test $debug -eq 1; then - CFLAGS="${CFLAGS} -DZLIB_DEBUG" - SFLAGS="${SFLAGS} -DZLIB_DEBUG" - fi - if test -z "$uname"; then - uname=`(uname -s || echo unknown) 2>/dev/null` - fi - case "$uname" in - Linux* | linux* | GNU | GNU/* | solaris*) - LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;; - *BSD | *bsd* | DragonFly) - LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} - LDCONFIG="ldconfig -m" ;; - CYGWIN* | Cygwin* | cygwin* | OS/2*) - EXE='.exe' ;; - MINGW* | mingw*) -# temporary bypass - rm -f $test.[co] $test $test$shared_ext - echo "Please use win32/Makefile.gcc instead." | tee -a configure.log - leave 1 - LDSHARED=${LDSHARED-"$cc -shared"} - LDSHAREDLIBC="" - EXE='.exe' ;; - QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 - # (alain.bonnefoy@icbt.com) - LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;; - HP-UX*) - LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"} - case `(uname -m || echo unknown) 2>/dev/null` in - ia64) - shared_ext='.so' - SHAREDLIB='libz.so' ;; - *) - shared_ext='.sl' - SHAREDLIB='libz.sl' ;; - esac ;; - Darwin* | darwin*) - shared_ext='.dylib' - SHAREDLIB=libz$shared_ext - SHAREDLIBV=libz.$VER$shared_ext - SHAREDLIBM=libz.$VER1$shared_ext - LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"} - if libtool -V 2>&1 | grep Apple > /dev/null; then - AR="libtool" - else - AR="/usr/bin/libtool" - fi - ARFLAGS="-o" ;; - *) LDSHARED=${LDSHARED-"$cc -shared"} ;; - esac -else - # find system name and corresponding cc options - CC=${CC-cc} - gcc=0 - echo ... using $CC >> configure.log - if test -z "$uname"; then - uname=`(uname -sr || echo unknown) 2>/dev/null` - fi - case "$uname" in - HP-UX*) SFLAGS=${CFLAGS-"-O +z"} - CFLAGS=${CFLAGS-"-O"} -# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} - LDSHARED=${LDSHARED-"ld -b"} - case `(uname -m || echo unknown) 2>/dev/null` in - ia64) - shared_ext='.so' - SHAREDLIB='libz.so' ;; - *) - shared_ext='.sl' - SHAREDLIB='libz.sl' ;; - esac ;; - IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} - CFLAGS=${CFLAGS-"-ansi -O2"} - LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;; - OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} - CFLAGS=${CFLAGS-"-O -std1"} - LDFLAGS="${LDFLAGS} -Wl,-rpath,." - LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"} ;; - OSF1*) SFLAGS=${CFLAGS-"-O -std1"} - CFLAGS=${CFLAGS-"-O -std1"} - LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;; - QNX*) SFLAGS=${CFLAGS-"-4 -O"} - CFLAGS=${CFLAGS-"-4 -O"} - LDSHARED=${LDSHARED-"cc"} - RANLIB=${RANLIB-"true"} - AR="cc" - ARFLAGS="-A" ;; - SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} - CFLAGS=${CFLAGS-"-O3"} - LDSHARED=${LDSHARED-"cc -dy -KPIC -G"} ;; - SunOS\ 5* | solaris*) - LDSHARED=${LDSHARED-"cc -G -h libz$shared_ext.$VER1"} - SFLAGS=${CFLAGS-"-fast -KPIC"} - CFLAGS=${CFLAGS-"-fast"} - if test $build64 -eq 1; then - # old versions of SunPRO/Workshop/Studio don't support -m64, - # but newer ones do. Check for it. - flag64=`$CC -flags | egrep -- '^-m64'` - if test x"$flag64" != x"" ; then - CFLAGS="${CFLAGS} -m64" - SFLAGS="${SFLAGS} -m64" - else - case `(uname -m || echo unknown) 2>/dev/null` in - i86*) - SFLAGS="$SFLAGS -xarch=amd64" - CFLAGS="$CFLAGS -xarch=amd64" ;; - *) - SFLAGS="$SFLAGS -xarch=v9" - CFLAGS="$CFLAGS -xarch=v9" ;; - esac - fi - fi - if test -n "$ZINC"; then - ZINC='-I- -I. -I$(SRCDIR)' - fi - ;; - SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} - CFLAGS=${CFLAGS-"-O2"} - LDSHARED=${LDSHARED-"ld"} ;; - SunStudio\ 9*) SFLAGS=${CFLAGS-"-fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"} - CFLAGS=${CFLAGS-"-fast -xtarget=ultra3 -xarch=v9b"} - LDSHARED=${LDSHARED-"cc -xarch=v9b"} ;; - UNIX_System_V\ 4.2.0) - SFLAGS=${CFLAGS-"-KPIC -O"} - CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -G"} ;; - UNIX_SV\ 4.2MP) - SFLAGS=${CFLAGS-"-Kconform_pic -O"} - CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -G"} ;; - OpenUNIX\ 5) - SFLAGS=${CFLAGS-"-KPIC -O"} - CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -G"} ;; - AIX*) # Courtesy of dbakker@arrayasolutions.com - SFLAGS=${CFLAGS-"-O -qmaxmem=8192"} - CFLAGS=${CFLAGS-"-O -qmaxmem=8192"} - LDSHARED=${LDSHARED-"xlc -G"} ;; - # send working options for other systems to zlib@gzip.org - *) SFLAGS=${CFLAGS-"-O"} - CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -shared"} ;; - esac -fi - -# destination names for shared library if not defined above -SHAREDLIB=${SHAREDLIB-"libz$shared_ext"} -SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"} -SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"} - -echo >> configure.log - -# define functions for testing compiler and library characteristics and logging the results - -cat > $test.c </dev/null; then - try() - { - show $* - test "`( $* ) 2>&1 | tee -a configure.log`" = "" - } - echo - using any output from compiler to indicate an error >> configure.log -else - try() - { - show $* - ( $* ) >> configure.log 2>&1 - ret=$? - if test $ret -ne 0; then - echo "(exit code "$ret")" >> configure.log - fi - return $ret - } -fi - -tryboth() -{ - show $* - got=`( $* ) 2>&1` - ret=$? - printf %s "$got" >> configure.log - if test $ret -ne 0; then - return $ret - fi - test "$got" = "" -} - -cat > $test.c << EOF -int foo() { return 0; } -EOF -echo "Checking for obsessive-compulsive compiler options..." >> configure.log -if try $CC -c $CFLAGS $test.c; then - : -else - echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log - leave 1 -fi - -echo >> configure.log - -# see if shared library build supported -cat > $test.c <> configure.log - show "$NM $test.o | grep _hello" - if test "`$NM $test.o | grep _hello | tee -a configure.log`" = ""; then - CPP="$CPP -DNO_UNDERLINE" - echo Checking for underline in external names... No. | tee -a configure.log - else - echo Checking for underline in external names... Yes. | tee -a configure.log - fi ;; -esac - -echo >> configure.log - -# check for size_t -cat > $test.c < -#include -size_t dummy = 0; -EOF -if try $CC -c $CFLAGS $test.c; then - echo "Checking for size_t... Yes." | tee -a configure.log - need_sizet=0 -else - echo "Checking for size_t... No." | tee -a configure.log - need_sizet=1 -fi - -echo >> configure.log - -# find the size_t integer type, if needed -if test $need_sizet -eq 1; then - cat > $test.c < $test.c < -int main(void) { - if (sizeof(void *) <= sizeof(int)) puts("int"); - else if (sizeof(void *) <= sizeof(long)) puts("long"); - else puts("z_longlong"); - return 0; -} -EOF - else - echo "Checking for long long... No." | tee -a configure.log - cat > $test.c < -int main(void) { - if (sizeof(void *) <= sizeof(int)) puts("int"); - else puts("long"); - return 0; -} -EOF - fi - if try $CC $CFLAGS -o $test $test.c; then - sizet=`./$test` - echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log - else - echo "Failed to find a pointer-size integer type." | tee -a configure.log - leave 1 - fi -fi - -if test $need_sizet -eq 1; then - CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}" - SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}" -fi - -echo >> configure.log - -# check for large file support, and if none, check for fseeko() -cat > $test.c < -off64_t dummy = 0; -EOF -if try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then - CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1" - SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1" - ALL="${ALL} all64" - TEST="${TEST} test64" - echo "Checking for off64_t... Yes." | tee -a configure.log - echo "Checking for fseeko... Yes." | tee -a configure.log -else - echo "Checking for off64_t... No." | tee -a configure.log - echo >> configure.log - cat > $test.c < -int main(void) { - fseeko(NULL, 0, 0); - return 0; -} -EOF - if try $CC $CFLAGS -o $test $test.c; then - echo "Checking for fseeko... Yes." | tee -a configure.log - else - CFLAGS="${CFLAGS} -DNO_FSEEKO" - SFLAGS="${SFLAGS} -DNO_FSEEKO" - echo "Checking for fseeko... No." | tee -a configure.log - fi -fi - -echo >> configure.log - -# check for strerror() for use by gz* functions -cat > $test.c < -#include -int main() { return strlen(strerror(errno)); } -EOF -if try $CC $CFLAGS -o $test $test.c; then - echo "Checking for strerror... Yes." | tee -a configure.log -else - CFLAGS="${CFLAGS} -DNO_STRERROR" - SFLAGS="${SFLAGS} -DNO_STRERROR" - echo "Checking for strerror... No." | tee -a configure.log -fi - -# copy clean zconf.h for subsequent edits -cp -p ${SRCDIR}zconf.h.in zconf.h - -echo >> configure.log - -# check for unistd.h and save result in zconf.h -cat > $test.c < -int main() { return 0; } -EOF -if try $CC -c $CFLAGS $test.c; then - sed < zconf.h "/^#ifdef HAVE_UNISTD_H.* may be/s/def HAVE_UNISTD_H\(.*\) may be/ 1\1 was/" > zconf.temp.h - mv zconf.temp.h zconf.h - echo "Checking for unistd.h... Yes." | tee -a configure.log -else - echo "Checking for unistd.h... No." | tee -a configure.log -fi - -echo >> configure.log - -# check for stdarg.h and save result in zconf.h -cat > $test.c < -int main() { return 0; } -EOF -if try $CC -c $CFLAGS $test.c; then - sed < zconf.h "/^#ifdef HAVE_STDARG_H.* may be/s/def HAVE_STDARG_H\(.*\) may be/ 1\1 was/" > zconf.temp.h - mv zconf.temp.h zconf.h - echo "Checking for stdarg.h... Yes." | tee -a configure.log -else - echo "Checking for stdarg.h... No." | tee -a configure.log -fi - -# if the z_ prefix was requested, save that in zconf.h -if test $zprefix -eq 1; then - sed < zconf.h "/#ifdef Z_PREFIX.* may be/s/def Z_PREFIX\(.*\) may be/ 1\1 was/" > zconf.temp.h - mv zconf.temp.h zconf.h - echo >> configure.log - echo "Using z_ prefix on all symbols." | tee -a configure.log -fi - -# if --solo compilation was requested, save that in zconf.h and remove gz stuff from object lists -if test $solo -eq 1; then - sed '/#define ZCONF_H/a\ -#define Z_SOLO - -' < zconf.h > zconf.temp.h - mv zconf.temp.h zconf.h -OBJC='$(OBJZ)' -PIC_OBJC='$(PIC_OBJZ)' -fi - -# if code coverage testing was requested, use older gcc if defined, e.g. "gcc-4.2" on Mac OS X -if test $cover -eq 1; then - CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage" - if test -n "$GCC_CLASSIC"; then - CC=$GCC_CLASSIC - fi -fi - -echo >> configure.log - -# conduct a series of tests to resolve eight possible cases of using "vs" or "s" printf functions -# (using stdarg or not), with or without "n" (proving size of buffer), and with or without a -# return value. The most secure result is vsnprintf() with a return value. snprintf() with a -# return value is secure as well, but then gzprintf() will be limited to 20 arguments. -cat > $test.c < -#include -#include "zconf.h" -int main() -{ -#ifndef STDC - choke me -#endif - return 0; -} -EOF -if try $CC -c $CFLAGS $test.c; then - echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()." | tee -a configure.log - - echo >> configure.log - cat > $test.c < -#include -int mytest(const char *fmt, ...) -{ - char buf[20]; - va_list ap; - va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return 0; -} -int main() -{ - return (mytest("Hello%d\n", 1)); -} -EOF - if try $CC $CFLAGS -o $test $test.c; then - echo "Checking for vsnprintf() in stdio.h... Yes." | tee -a configure.log - - echo >> configure.log - cat >$test.c < -#include -int mytest(const char *fmt, ...) -{ - int n; - char buf[20]; - va_list ap; - va_start(ap, fmt); - n = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return n; -} -int main() -{ - return (mytest("Hello%d\n", 1)); -} -EOF - - if try $CC -c $CFLAGS $test.c; then - echo "Checking for return value of vsnprintf()... Yes." | tee -a configure.log - else - CFLAGS="$CFLAGS -DHAS_vsnprintf_void" - SFLAGS="$SFLAGS -DHAS_vsnprintf_void" - echo "Checking for return value of vsnprintf()... No." | tee -a configure.log - echo " WARNING: apparently vsnprintf() does not return a value. zlib" | tee -a configure.log - echo " can build but will be open to possible string-format security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - fi - else - CFLAGS="$CFLAGS -DNO_vsnprintf" - SFLAGS="$SFLAGS -DNO_vsnprintf" - echo "Checking for vsnprintf() in stdio.h... No." | tee -a configure.log - echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib" | tee -a configure.log - echo " can build but will be open to possible buffer-overflow security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - - echo >> configure.log - cat >$test.c < -#include -int mytest(const char *fmt, ...) -{ - int n; - char buf[20]; - va_list ap; - va_start(ap, fmt); - n = vsprintf(buf, fmt, ap); - va_end(ap); - return n; -} -int main() -{ - return (mytest("Hello%d\n", 1)); -} -EOF - - if try $CC -c $CFLAGS $test.c; then - echo "Checking for return value of vsprintf()... Yes." | tee -a configure.log - else - CFLAGS="$CFLAGS -DHAS_vsprintf_void" - SFLAGS="$SFLAGS -DHAS_vsprintf_void" - echo "Checking for return value of vsprintf()... No." | tee -a configure.log - echo " WARNING: apparently vsprintf() does not return a value. zlib" | tee -a configure.log - echo " can build but will be open to possible string-format security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - fi - fi -else - echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()." | tee -a configure.log - - echo >> configure.log - cat >$test.c < -int mytest() -{ - char buf[20]; - snprintf(buf, sizeof(buf), "%s", "foo"); - return 0; -} -int main() -{ - return (mytest()); -} -EOF - - if try $CC $CFLAGS -o $test $test.c; then - echo "Checking for snprintf() in stdio.h... Yes." | tee -a configure.log - - echo >> configure.log - cat >$test.c < -int mytest() -{ - char buf[20]; - return snprintf(buf, sizeof(buf), "%s", "foo"); -} -int main() -{ - return (mytest()); -} -EOF - - if try $CC -c $CFLAGS $test.c; then - echo "Checking for return value of snprintf()... Yes." | tee -a configure.log - else - CFLAGS="$CFLAGS -DHAS_snprintf_void" - SFLAGS="$SFLAGS -DHAS_snprintf_void" - echo "Checking for return value of snprintf()... No." | tee -a configure.log - echo " WARNING: apparently snprintf() does not return a value. zlib" | tee -a configure.log - echo " can build but will be open to possible string-format security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - fi - else - CFLAGS="$CFLAGS -DNO_snprintf" - SFLAGS="$SFLAGS -DNO_snprintf" - echo "Checking for snprintf() in stdio.h... No." | tee -a configure.log - echo " WARNING: snprintf() not found, falling back to sprintf(). zlib" | tee -a configure.log - echo " can build but will be open to possible buffer-overflow security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - - echo >> configure.log - cat >$test.c < -int mytest() -{ - char buf[20]; - return sprintf(buf, "%s", "foo"); -} -int main() -{ - return (mytest()); -} -EOF - - if try $CC -c $CFLAGS $test.c; then - echo "Checking for return value of sprintf()... Yes." | tee -a configure.log - else - CFLAGS="$CFLAGS -DHAS_sprintf_void" - SFLAGS="$SFLAGS -DHAS_sprintf_void" - echo "Checking for return value of sprintf()... No." | tee -a configure.log - echo " WARNING: apparently sprintf() does not return a value. zlib" | tee -a configure.log - echo " can build but will be open to possible string-format security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - fi - fi -fi - -# see if we can hide zlib internal symbols that are linked between separate source files -if test "$gcc" -eq 1; then - echo >> configure.log - cat > $test.c <> configure.log -echo ALL = $ALL >> configure.log -echo AR = $AR >> configure.log -echo ARFLAGS = $ARFLAGS >> configure.log -echo CC = $CC >> configure.log -echo CFLAGS = $CFLAGS >> configure.log -echo CPP = $CPP >> configure.log -echo EXE = $EXE >> configure.log -echo LDCONFIG = $LDCONFIG >> configure.log -echo LDFLAGS = $LDFLAGS >> configure.log -echo LDSHARED = $LDSHARED >> configure.log -echo LDSHAREDLIBC = $LDSHAREDLIBC >> configure.log -echo OBJC = $OBJC >> configure.log -echo PIC_OBJC = $PIC_OBJC >> configure.log -echo RANLIB = $RANLIB >> configure.log -echo SFLAGS = $SFLAGS >> configure.log -echo SHAREDLIB = $SHAREDLIB >> configure.log -echo SHAREDLIBM = $SHAREDLIBM >> configure.log -echo SHAREDLIBV = $SHAREDLIBV >> configure.log -echo STATICLIB = $STATICLIB >> configure.log -echo TEST = $TEST >> configure.log -echo VER = $VER >> configure.log -echo Z_U4 = $Z_U4 >> configure.log -echo SRCDIR = $SRCDIR >> configure.log -echo exec_prefix = $exec_prefix >> configure.log -echo includedir = $includedir >> configure.log -echo libdir = $libdir >> configure.log -echo mandir = $mandir >> configure.log -echo prefix = $prefix >> configure.log -echo sharedlibdir = $sharedlibdir >> configure.log -echo uname = $uname >> configure.log - -# udpate Makefile with the configure results -sed < ${SRCDIR}Makefile.in " -/^CC *=/s#=.*#=$CC# -/^CFLAGS *=/s#=.*#=$CFLAGS# -/^SFLAGS *=/s#=.*#=$SFLAGS# -/^LDFLAGS *=/s#=.*#=$LDFLAGS# -/^LDSHARED *=/s#=.*#=$LDSHARED# -/^CPP *=/s#=.*#=$CPP# -/^STATICLIB *=/s#=.*#=$STATICLIB# -/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# -/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# -/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# -/^AR *=/s#=.*#=$AR# -/^ARFLAGS *=/s#=.*#=$ARFLAGS# -/^RANLIB *=/s#=.*#=$RANLIB# -/^LDCONFIG *=/s#=.*#=$LDCONFIG# -/^LDSHAREDLIBC *=/s#=.*#=$LDSHAREDLIBC# -/^EXE *=/s#=.*#=$EXE# -/^SRCDIR *=/s#=.*#=$SRCDIR# -/^ZINC *=/s#=.*#=$ZINC# -/^ZINCOUT *=/s#=.*#=$ZINCOUT# -/^prefix *=/s#=.*#=$prefix# -/^exec_prefix *=/s#=.*#=$exec_prefix# -/^libdir *=/s#=.*#=$libdir# -/^sharedlibdir *=/s#=.*#=$sharedlibdir# -/^includedir *=/s#=.*#=$includedir# -/^mandir *=/s#=.*#=$mandir# -/^OBJC *=/s#=.*#= $OBJC# -/^PIC_OBJC *=/s#=.*#= $PIC_OBJC# -/^all: */s#:.*#: $ALL# -/^test: */s#:.*#: $TEST# -" > Makefile - -# create zlib.pc with the configure results -sed < ${SRCDIR}zlib.pc.in " -/^CC *=/s#=.*#=$CC# -/^CFLAGS *=/s#=.*#=$CFLAGS# -/^CPP *=/s#=.*#=$CPP# -/^LDSHARED *=/s#=.*#=$LDSHARED# -/^STATICLIB *=/s#=.*#=$STATICLIB# -/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# -/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# -/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# -/^AR *=/s#=.*#=$AR# -/^ARFLAGS *=/s#=.*#=$ARFLAGS# -/^RANLIB *=/s#=.*#=$RANLIB# -/^EXE *=/s#=.*#=$EXE# -/^prefix *=/s#=.*#=$prefix# -/^exec_prefix *=/s#=.*#=$exec_prefix# -/^libdir *=/s#=.*#=$libdir# -/^sharedlibdir *=/s#=.*#=$sharedlibdir# -/^includedir *=/s#=.*#=$includedir# -/^mandir *=/s#=.*#=$mandir# -/^LDFLAGS *=/s#=.*#=$LDFLAGS# -" | sed -e " -s/\@VERSION\@/$VER/g; -" > zlib.pc - -# done -leave 0 diff --git a/Dependencies/FreeImage/Source/ZLib/crc32.c b/Dependencies/FreeImage/Source/ZLib/crc32.c deleted file mode 100644 index f372efa..0000000 --- a/Dependencies/FreeImage/Source/ZLib/crc32.c +++ /dev/null @@ -1,442 +0,0 @@ -/* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2006, 2010, 2011, 2012, 2016 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * - * Thanks to Rodney Brown for his contribution of faster - * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing - * tables for updating the shift register in one step with three exclusive-ors - * instead of four steps with four exclusive-ors. This results in about a - * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3. - */ - -/* @(#) $Id: crc32.c,v 1.11 2017/02/11 03:07:47 drolon Exp $ */ - -/* - 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(). - - DYNAMIC_CRC_TABLE and MAKECRCH can be #defined to write out crc32.h. - */ - -#ifdef MAKECRCH -# include -# ifndef DYNAMIC_CRC_TABLE -# define DYNAMIC_CRC_TABLE -# endif /* !DYNAMIC_CRC_TABLE */ -#endif /* MAKECRCH */ - -#include "zutil.h" /* for STDC and FAR definitions */ - -/* Definitions for doing the crc four data bytes at a time. */ -#if !defined(NOBYFOUR) && defined(Z_U4) -# define BYFOUR -#endif -#ifdef BYFOUR - local unsigned long crc32_little OF((unsigned long, - const unsigned char FAR *, z_size_t)); - local unsigned long crc32_big OF((unsigned long, - const unsigned char FAR *, z_size_t)); -# define TBLS 8 -#else -# define TBLS 1 -#endif /* BYFOUR */ - -/* Local functions for crc concatenation */ -local unsigned long gf2_matrix_times OF((unsigned long *mat, - unsigned long vec)); -local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat)); -local uLong crc32_combine_ OF((uLong crc1, uLong crc2, z_off64_t len2)); - - -#ifdef DYNAMIC_CRC_TABLE - -local volatile int crc_table_empty = 1; -local z_crc_t FAR crc_table[TBLS][256]; -local void make_crc_table OF((void)); -#ifdef MAKECRCH - local void write_table OF((FILE *, const z_crc_t FAR *)); -#endif /* MAKECRCH */ -/* - 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+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 first 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. The remaining tables - allow for word-at-a-time CRC calculation for both big-endian and little- - endian machines, where a word is four bytes. -*/ -local void make_crc_table() -{ - z_crc_t c; - int n, k; - z_crc_t poly; /* polynomial exclusive-or pattern */ - /* terms of polynomial defining this crc (except x^32): */ - static volatile int first = 1; /* flag to limit concurrent making */ - static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; - - /* See if another task is already doing this (not thread-safe, but better - than nothing -- significantly reduces duration of vulnerability in - case the advice about DYNAMIC_CRC_TABLE is ignored) */ - if (first) { - first = 0; - - /* make exclusive-or pattern from polynomial (0xedb88320UL) */ - poly = 0; - for (n = 0; n < (int)(sizeof(p)/sizeof(unsigned char)); n++) - poly |= (z_crc_t)1 << (31 - p[n]); - - /* generate a crc for every 8-bit value */ - for (n = 0; n < 256; n++) { - c = (z_crc_t)n; - for (k = 0; k < 8; k++) - c = c & 1 ? poly ^ (c >> 1) : c >> 1; - crc_table[0][n] = c; - } - -#ifdef BYFOUR - /* generate crc for each value followed by one, two, and three zeros, - and then the byte reversal of those as well as the first table */ - for (n = 0; n < 256; n++) { - c = crc_table[0][n]; - crc_table[4][n] = ZSWAP32(c); - for (k = 1; k < 4; k++) { - c = crc_table[0][c & 0xff] ^ (c >> 8); - crc_table[k][n] = c; - crc_table[k + 4][n] = ZSWAP32(c); - } - } -#endif /* BYFOUR */ - - crc_table_empty = 0; - } - else { /* not first */ - /* wait for the other guy to finish (not efficient, but rare) */ - while (crc_table_empty) - ; - } - -#ifdef MAKECRCH - /* write out CRC tables to crc32.h */ - { - FILE *out; - - out = fopen("crc32.h", "w"); - if (out == NULL) return; - fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n"); - fprintf(out, " * Generated automatically by crc32.c\n */\n\n"); - fprintf(out, "local const z_crc_t FAR "); - fprintf(out, "crc_table[TBLS][256] =\n{\n {\n"); - write_table(out, crc_table[0]); -# ifdef BYFOUR - fprintf(out, "#ifdef BYFOUR\n"); - for (k = 1; k < 8; k++) { - fprintf(out, " },\n {\n"); - write_table(out, crc_table[k]); - } - fprintf(out, "#endif\n"); -# endif /* BYFOUR */ - fprintf(out, " }\n};\n"); - fclose(out); - } -#endif /* MAKECRCH */ -} - -#ifdef MAKECRCH -local void write_table(out, table) - FILE *out; - const z_crc_t FAR *table; -{ - int n; - - for (n = 0; n < 256; n++) - fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", - (unsigned long)(table[n]), - n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", ")); -} -#endif /* MAKECRCH */ - -#else /* !DYNAMIC_CRC_TABLE */ -/* ======================================================================== - * Tables of CRC-32s of all single-byte values, made by make_crc_table(). - */ -#include "crc32.h" -#endif /* DYNAMIC_CRC_TABLE */ - -/* ========================================================================= - * This function can be used by asm versions of crc32() - */ -const z_crc_t FAR * ZEXPORT get_crc_table() -{ -#ifdef DYNAMIC_CRC_TABLE - if (crc_table_empty) - make_crc_table(); -#endif /* DYNAMIC_CRC_TABLE */ - return (const z_crc_t FAR *)crc_table; -} - -/* ========================================================================= */ -#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8) -#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 - -/* ========================================================================= */ -unsigned long ZEXPORT crc32_z(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - z_size_t len; -{ - if (buf == Z_NULL) return 0UL; - -#ifdef DYNAMIC_CRC_TABLE - if (crc_table_empty) - make_crc_table(); -#endif /* DYNAMIC_CRC_TABLE */ - -#ifdef BYFOUR - if (sizeof(void *) == sizeof(ptrdiff_t)) { - z_crc_t endian; - - endian = 1; - if (*((unsigned char *)(&endian))) - return crc32_little(crc, buf, len); - else - return crc32_big(crc, buf, len); - } -#endif /* BYFOUR */ - crc = crc ^ 0xffffffffUL; - while (len >= 8) { - DO8; - len -= 8; - } - if (len) do { - DO1; - } while (--len); - return crc ^ 0xffffffffUL; -} - -/* ========================================================================= */ -unsigned long ZEXPORT crc32(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - uInt len; -{ - return crc32_z(crc, buf, len); -} - -#ifdef BYFOUR - -/* - This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit - integer pointer type. This violates the strict aliasing rule, where a - compiler can assume, for optimization purposes, that two pointers to - fundamentally different types won't ever point to the same memory. This can - manifest as a problem only if one of the pointers is written to. This code - only reads from those pointers. So long as this code remains isolated in - this compilation unit, there won't be a problem. For this reason, this code - should not be copied and pasted into a compilation unit in which other code - writes to the buffer that is passed to these routines. - */ - -/* ========================================================================= */ -#define DOLIT4 c ^= *buf4++; \ - c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \ - crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24] -#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4 - -/* ========================================================================= */ -local unsigned long crc32_little(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - z_size_t len; -{ - register z_crc_t c; - register const z_crc_t FAR *buf4; - - c = (z_crc_t)crc; - c = ~c; - while (len && ((ptrdiff_t)buf & 3)) { - c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8); - len--; - } - - buf4 = (const z_crc_t FAR *)(const void FAR *)buf; - while (len >= 32) { - DOLIT32; - len -= 32; - } - while (len >= 4) { - DOLIT4; - len -= 4; - } - buf = (const unsigned char FAR *)buf4; - - if (len) do { - c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8); - } while (--len); - c = ~c; - return (unsigned long)c; -} - -/* ========================================================================= */ -#define DOBIG4 c ^= *buf4++; \ - c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \ - crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24] -#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4 - -/* ========================================================================= */ -local unsigned long crc32_big(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - z_size_t len; -{ - register z_crc_t c; - register const z_crc_t FAR *buf4; - - c = ZSWAP32((z_crc_t)crc); - c = ~c; - while (len && ((ptrdiff_t)buf & 3)) { - c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8); - len--; - } - - buf4 = (const z_crc_t FAR *)(const void FAR *)buf; - while (len >= 32) { - DOBIG32; - len -= 32; - } - while (len >= 4) { - DOBIG4; - len -= 4; - } - buf = (const unsigned char FAR *)buf4; - - if (len) do { - c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8); - } while (--len); - c = ~c; - return (unsigned long)(ZSWAP32(c)); -} - -#endif /* BYFOUR */ - -#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */ - -/* ========================================================================= */ -local unsigned long gf2_matrix_times(mat, vec) - unsigned long *mat; - unsigned long vec; -{ - unsigned long sum; - - sum = 0; - while (vec) { - if (vec & 1) - sum ^= *mat; - vec >>= 1; - mat++; - } - return sum; -} - -/* ========================================================================= */ -local void gf2_matrix_square(square, mat) - unsigned long *square; - unsigned long *mat; -{ - int n; - - for (n = 0; n < GF2_DIM; n++) - square[n] = gf2_matrix_times(mat, mat[n]); -} - -/* ========================================================================= */ -local uLong crc32_combine_(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off64_t len2; -{ - int n; - unsigned long row; - unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */ - unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */ - - /* degenerate case (also disallow negative lengths) */ - if (len2 <= 0) - return crc1; - - /* put operator for one zero bit in odd */ - odd[0] = 0xedb88320UL; /* CRC-32 polynomial */ - row = 1; - for (n = 1; n < GF2_DIM; n++) { - odd[n] = row; - row <<= 1; - } - - /* put operator for two zero bits in even */ - gf2_matrix_square(even, odd); - - /* put operator for four zero bits in odd */ - gf2_matrix_square(odd, even); - - /* apply len2 zeros to crc1 (first square will put the operator for one - zero byte, eight zero bits, in even) */ - do { - /* apply zeros operator for this bit of len2 */ - gf2_matrix_square(even, odd); - if (len2 & 1) - crc1 = gf2_matrix_times(even, crc1); - len2 >>= 1; - - /* if no more bits set, then done */ - if (len2 == 0) - break; - - /* another iteration of the loop with odd and even swapped */ - gf2_matrix_square(odd, even); - if (len2 & 1) - crc1 = gf2_matrix_times(odd, crc1); - len2 >>= 1; - - /* if no more bits set, then done */ - } while (len2 != 0); - - /* return combined crc */ - crc1 ^= crc2; - return crc1; -} - -/* ========================================================================= */ -uLong ZEXPORT crc32_combine(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off_t len2; -{ - return crc32_combine_(crc1, crc2, len2); -} - -uLong ZEXPORT crc32_combine64(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off64_t len2; -{ - return crc32_combine_(crc1, crc2, len2); -} diff --git a/Dependencies/FreeImage/Source/ZLib/crc32.h b/Dependencies/FreeImage/Source/ZLib/crc32.h deleted file mode 100644 index 9e0c778..0000000 --- a/Dependencies/FreeImage/Source/ZLib/crc32.h +++ /dev/null @@ -1,441 +0,0 @@ -/* crc32.h -- tables for rapid CRC calculation - * Generated automatically by crc32.c - */ - -local const z_crc_t FAR crc_table[TBLS][256] = -{ - { - 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, - 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL, - 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL, - 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL, - 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL, - 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL, - 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL, - 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL, - 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL, - 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL, - 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL, - 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL, - 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL, - 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL, - 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL, - 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL, - 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL, - 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL, - 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL, - 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL, - 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL, - 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL, - 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL, - 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL, - 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL, - 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL, - 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL, - 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL, - 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL, - 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL, - 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL, - 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL, - 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL, - 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL, - 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL, - 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL, - 0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL, - 0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL, - 0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL, - 0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL, - 0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL, - 0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL, - 0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL, - 0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL, - 0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL, - 0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL, - 0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL, - 0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL, - 0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL, - 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL, - 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL, - 0x2d02ef8dUL -#ifdef BYFOUR - }, - { - 0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL, - 0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL, - 0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL, - 0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL, - 0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL, - 0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL, - 0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL, - 0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL, - 0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL, - 0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL, - 0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL, - 0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL, - 0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL, - 0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL, - 0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL, - 0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL, - 0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL, - 0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL, - 0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL, - 0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL, - 0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL, - 0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL, - 0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL, - 0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL, - 0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL, - 0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL, - 0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL, - 0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL, - 0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL, - 0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL, - 0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL, - 0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL, - 0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL, - 0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL, - 0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL, - 0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL, - 0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL, - 0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL, - 0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL, - 0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL, - 0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL, - 0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL, - 0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL, - 0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL, - 0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL, - 0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL, - 0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL, - 0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL, - 0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL, - 0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL, - 0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL, - 0x9324fd72UL - }, - { - 0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL, - 0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL, - 0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL, - 0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL, - 0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL, - 0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL, - 0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL, - 0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL, - 0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL, - 0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL, - 0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL, - 0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL, - 0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL, - 0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL, - 0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL, - 0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL, - 0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL, - 0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL, - 0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL, - 0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL, - 0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL, - 0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL, - 0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL, - 0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL, - 0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL, - 0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL, - 0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL, - 0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL, - 0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL, - 0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL, - 0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL, - 0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL, - 0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL, - 0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL, - 0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL, - 0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL, - 0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL, - 0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL, - 0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL, - 0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL, - 0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL, - 0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL, - 0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL, - 0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL, - 0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL, - 0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL, - 0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL, - 0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL, - 0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL, - 0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL, - 0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL, - 0xbe9834edUL - }, - { - 0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL, - 0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL, - 0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL, - 0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL, - 0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL, - 0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL, - 0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL, - 0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL, - 0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL, - 0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL, - 0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL, - 0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL, - 0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL, - 0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL, - 0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL, - 0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL, - 0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL, - 0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL, - 0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL, - 0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL, - 0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL, - 0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL, - 0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL, - 0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL, - 0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL, - 0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL, - 0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL, - 0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL, - 0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL, - 0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL, - 0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL, - 0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL, - 0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL, - 0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL, - 0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL, - 0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL, - 0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL, - 0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL, - 0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL, - 0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL, - 0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL, - 0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL, - 0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL, - 0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL, - 0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL, - 0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL, - 0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL, - 0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL, - 0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL, - 0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL, - 0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL, - 0xde0506f1UL - }, - { - 0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL, - 0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL, - 0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL, - 0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL, - 0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL, - 0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL, - 0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL, - 0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL, - 0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL, - 0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL, - 0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL, - 0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL, - 0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL, - 0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL, - 0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL, - 0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL, - 0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL, - 0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL, - 0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL, - 0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL, - 0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL, - 0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL, - 0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL, - 0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL, - 0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL, - 0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL, - 0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL, - 0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL, - 0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL, - 0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL, - 0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL, - 0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL, - 0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL, - 0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL, - 0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL, - 0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL, - 0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL, - 0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL, - 0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL, - 0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL, - 0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL, - 0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL, - 0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL, - 0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL, - 0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL, - 0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL, - 0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL, - 0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL, - 0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL, - 0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL, - 0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL, - 0x8def022dUL - }, - { - 0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL, - 0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL, - 0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL, - 0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL, - 0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL, - 0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL, - 0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL, - 0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL, - 0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL, - 0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL, - 0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL, - 0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL, - 0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL, - 0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL, - 0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL, - 0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL, - 0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL, - 0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL, - 0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL, - 0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL, - 0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL, - 0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL, - 0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL, - 0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL, - 0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL, - 0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL, - 0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL, - 0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL, - 0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL, - 0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL, - 0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL, - 0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL, - 0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL, - 0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL, - 0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL, - 0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL, - 0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL, - 0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL, - 0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL, - 0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL, - 0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL, - 0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL, - 0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL, - 0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL, - 0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL, - 0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL, - 0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL, - 0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL, - 0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL, - 0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL, - 0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL, - 0x72fd2493UL - }, - { - 0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL, - 0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL, - 0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL, - 0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL, - 0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL, - 0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL, - 0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL, - 0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL, - 0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL, - 0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL, - 0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL, - 0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL, - 0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL, - 0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL, - 0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL, - 0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL, - 0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL, - 0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL, - 0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL, - 0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL, - 0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL, - 0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL, - 0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL, - 0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL, - 0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL, - 0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL, - 0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL, - 0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL, - 0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL, - 0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL, - 0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL, - 0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL, - 0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL, - 0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL, - 0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL, - 0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL, - 0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL, - 0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL, - 0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL, - 0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL, - 0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL, - 0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL, - 0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL, - 0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL, - 0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL, - 0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL, - 0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL, - 0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL, - 0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL, - 0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL, - 0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL, - 0xed3498beUL - }, - { - 0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL, - 0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL, - 0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL, - 0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL, - 0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL, - 0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL, - 0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL, - 0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL, - 0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL, - 0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL, - 0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL, - 0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL, - 0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL, - 0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL, - 0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL, - 0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL, - 0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL, - 0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL, - 0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL, - 0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL, - 0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL, - 0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL, - 0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL, - 0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL, - 0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL, - 0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL, - 0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL, - 0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL, - 0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL, - 0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL, - 0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL, - 0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL, - 0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL, - 0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL, - 0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL, - 0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL, - 0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL, - 0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL, - 0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL, - 0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL, - 0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL, - 0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL, - 0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL, - 0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL, - 0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL, - 0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL, - 0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL, - 0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL, - 0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL, - 0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL, - 0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL, - 0xf10605deUL -#endif - } -}; diff --git a/Dependencies/FreeImage/Source/ZLib/deflate.c b/Dependencies/FreeImage/Source/ZLib/deflate.c deleted file mode 100644 index 8de2da8..0000000 --- a/Dependencies/FreeImage/Source/ZLib/deflate.c +++ /dev/null @@ -1,2163 +0,0 @@ -/* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2017 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: deflate.c,v 1.11 2017/02/11 03:07:47 drolon Exp $ */ - -#include "deflate.h" - -const char deflate_copyright[] = - " deflate 1.2.11 Copyright 1995-2017 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. - */ - -/* =========================================================================== - * Function prototypes. - */ -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) OF((deflate_state *s, int flush)); -/* Compression function. Returns the block state after the call. */ - -local int deflateStateCheck OF((z_streamp strm)); -local void slide_hash OF((deflate_state *s)); -local void fill_window OF((deflate_state *s)); -local block_state deflate_stored OF((deflate_state *s, int flush)); -local block_state deflate_fast OF((deflate_state *s, int flush)); -#ifndef FASTEST -local block_state deflate_slow OF((deflate_state *s, int flush)); -#endif -local block_state deflate_rle OF((deflate_state *s, int flush)); -local block_state deflate_huff OF((deflate_state *s, int flush)); -local void lm_init OF((deflate_state *s)); -local void putShortMSB OF((deflate_state *s, uInt b)); -local void flush_pending OF((z_streamp strm)); -local unsigned read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); -#ifdef ASMV -# pragma message("Assembler code may have bugs -- use at your own risk") - void match_init OF((void)); /* asm code initialization */ - uInt longest_match OF((deflate_state *s, IPos cur_match)); -#else -local uInt longest_match OF((deflate_state *s, IPos cur_match)); -#endif - -#ifdef ZLIB_DEBUG -local void check_match OF((deflate_state *s, IPos start, IPos match, - int length)); -#endif - -/* =========================================================================== - * 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)<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) \ - s->head[s->hash_size-1] = NIL; \ - zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); - -/* =========================================================================== - * 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. - */ -local void slide_hash(s) - 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 -} - -/* ========================================================================= */ -int ZEXPORT deflateInit_(strm, level, version, stream_size) - 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_(strm, level, method, windowBits, memLevel, strategy, - version, stream_size) - 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; - - ushf *overlay; - /* We overlay pending_buf and d_buf+l_buf. This works since the average - * output size for (length,distance) codes is <= 24 bits. - */ - - 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; - 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 */ - - overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - s->pending_buf = (uchf *) overlay; - s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); - - 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; - } - s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - - 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 (strm) - 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 (strm, dictionary, dictLength) - 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 (strm, dictionary, dictLength) - 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 (strm) - 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 - s->wrap ? INIT_STATE : BUSY_STATE; - strm->adler = -#ifdef GZIP - s->wrap == 2 ? crc32(0L, Z_NULL, 0) : -#endif - adler32(0L, Z_NULL, 0); - s->last_flush = Z_NO_FLUSH; - - _tr_init(s); - - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateReset (strm) - z_streamp strm; -{ - int ret; - - ret = deflateResetKeep(strm); - if (ret == Z_OK) - lm_init(strm->state); - return ret; -} - -/* ========================================================================= */ -int ZEXPORT deflateSetHeader (strm, head) - 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 (strm, pending, bits) - unsigned *pending; - int *bits; - z_streamp strm; -{ - 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 (strm, bits, value) - z_streamp strm; - int bits; - int value; -{ - deflate_state *s; - int put; - - if (deflateStateCheck(strm)) return Z_STREAM_ERROR; - s = strm->state; - if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3)) - return Z_BUF_ERROR; - 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(strm, level, strategy) - 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->high_water) { - /* Flush the last buffer: */ - int err = deflate(strm, Z_BLOCK); - if (err == Z_STREAM_ERROR) - return err; - if (strm->avail_out == 0) - 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(strm, good_length, max_lazy, nice_length, max_chain) - 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. - * They are coded as constants here for a reason--if the #define's are - * changed, then this function needs to be changed as well. The return - * value for 15 and 8 only works for those exact settings. - * - * For any setting other than those defaults for windowBits and memLevel, - * the value returned is a conservative worst case for the maximum expansion - * resulting from using fixed blocks instead of stored blocks, which deflate - * can emit on compressed data for some combinations of the parameters. - * - * This function could be more sophisticated to provide closer upper bounds for - * every combination of windowBits and memLevel. But even the conservative - * upper bound of about 14% expansion does not seem onerous for output buffer - * allocation. - */ -uLong ZEXPORT deflateBound(strm, sourceLen) - z_streamp strm; - uLong sourceLen; -{ - deflate_state *s; - uLong complen, wraplen; - - /* conservative upper bound for compressed data */ - complen = sourceLen + - ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; - - /* if can't get parameters, return conservative bound plus zlib wrapper */ - if (deflateStateCheck(strm)) - return complen + 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 conservative bound */ - if (s->w_bits != 15 || s->hash_bits != 8 + 7) - return complen + wraplen; - - /* default settings: return tight bound for that case */ - 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 (s, b) - 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(strm) - 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 (strm, flush) - 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) { - /* 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 (strm) - 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 (dest, source) - z_streamp dest; - z_streamp source; -{ -#ifdef MAXSEG_64K - return Z_STREAM_ERROR; -#else - deflate_state *ds; - deflate_state *ss; - ushf *overlay; - - - 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)); - overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2); - ds->pending_buf = (uchf *) overlay; - - 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, (uInt)ds->pending_buf_size); - - ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); - ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); - ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; - - 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 */ -} - -/* =========================================================================== - * 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(strm, buf, size) - 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; -} - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -local void lm_init (s) - 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; -#ifndef FASTEST -#ifdef ASMV - match_init(); /* initialize the asm code */ -#endif -#endif -} - -#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. - */ -#ifndef ASMV -/* For 80x86 and 680x0, an optimized version will be provided in match.asm or - * match.S. The code will be functionally equivalent. - */ -local uInt longest_match(s, cur_match) - deflate_state *s; - IPos cur_match; /* current 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; -} -#endif /* ASMV */ - -#else /* FASTEST */ - -/* --------------------------------------------------------------------------- - * Optimized version for FASTEST only - */ -local uInt longest_match(s, cur_match) - deflate_state *s; - IPos cur_match; /* current 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(s, start, match, length) - deflate_state *s; - IPos start, match; - int length; -{ - /* check that the match is indeed a match */ - if (zmemcmp(s->window + match, - s->window + start, length) != EQUAL) { - fprintf(stderr, " start %u, match %u, length %d\n", - start, match, length); - do { - fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); - } while (--length != 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 */ - -/* =========================================================================== - * 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(s) - 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; - 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"); -} - -/* =========================================================================== - * 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 opportunites to have a single copy from next_in to next_out. - */ -local block_state deflate_stored(s, flush) - 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; - } - 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() */ - } - zmemcpy(s->window + s->strstart, s->strm->next_in - used, used); - s->strstart += used; - } - s->block_start = s->strstart; - s->insert += MIN(used, s->w_size - s->insert); - } - 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 - 1; - 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 (have > s->strm->avail_in) - have = s->strm->avail_in; - if (have) { - read_buf(s->strm, s->window + s->strstart, have); - s->strstart += have; - } - 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(s, flush) - 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->last_lit) - 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(s, flush) - 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->last_lit) - 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(s, flush) - 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->last_lit) - 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(s, flush) - 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->last_lit) - FLUSH_BLOCK(s, 0); - return block_done; -} diff --git a/Dependencies/FreeImage/Source/ZLib/deflate.h b/Dependencies/FreeImage/Source/ZLib/deflate.h deleted file mode 100644 index 03320ee..0000000 --- a/Dependencies/FreeImage/Source/ZLib/deflate.h +++ /dev/null @@ -1,349 +0,0 @@ -/* deflate.h -- internal compression state - * Copyright (C) 1995-2016 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: deflate.h,v 1.11 2017/02/11 03:07:47 drolon Exp $ */ - -#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 - -/* =========================================================================== - * 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 - */ - - uchf *l_buf; /* buffer for literals or lengths */ - - 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 last_lit; /* running index in l_buf */ - - ushf *d_buf; - /* Buffer for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - 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 OF((deflate_state *s)); -int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); -void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, - ulg stored_len, int last)); -void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s)); -void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); -void ZLIB_INTERNAL _tr_stored_block OF((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 - -# define _tr_tally_lit(s, c, flush) \ - { uch cc = (c); \ - s->d_buf[s->last_lit] = 0; \ - s->l_buf[s->last_lit++] = cc; \ - s->dyn_ltree[cc].Freq++; \ - flush = (s->last_lit == s->lit_bufsize-1); \ - } -# define _tr_tally_dist(s, distance, length, flush) \ - { uch len = (uch)(length); \ - ush dist = (ush)(distance); \ - s->d_buf[s->last_lit] = dist; \ - s->l_buf[s->last_lit++] = len; \ - dist--; \ - s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ - s->dyn_dtree[d_code(dist)].Freq++; \ - flush = (s->last_lit == s->lit_bufsize-1); \ - } -#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/Dependencies/FreeImage/Source/ZLib/gzclose.c b/Dependencies/FreeImage/Source/ZLib/gzclose.c deleted file mode 100644 index caeb99a..0000000 --- a/Dependencies/FreeImage/Source/ZLib/gzclose.c +++ /dev/null @@ -1,25 +0,0 @@ -/* 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(file) - 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/Dependencies/FreeImage/Source/ZLib/gzguts.h b/Dependencies/FreeImage/Source/ZLib/gzguts.h deleted file mode 100644 index 990a4d2..0000000 --- a/Dependencies/FreeImage/Source/ZLib/gzguts.h +++ /dev/null @@ -1,218 +0,0 @@ -/* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 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 -# ifdef _FILE_OFFSET_BITS -# undef _FILE_OFFSET_BITS -# endif -#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) || defined(__CYGWIN__) -# 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 OF((uInt size)); - extern void free OF((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 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((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 */ - /* 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 OF((gz_statep, int, const char *)); -#if defined UNDER_CE -char ZLIB_INTERNAL *gz_strwinerror OF((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) */ -#ifdef INT_MAX -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) -#else -unsigned ZLIB_INTERNAL gz_intmax OF((void)); -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) -#endif diff --git a/Dependencies/FreeImage/Source/ZLib/gzlib.c b/Dependencies/FreeImage/Source/ZLib/gzlib.c deleted file mode 100644 index 4105e6a..0000000 --- a/Dependencies/FreeImage/Source/ZLib/gzlib.c +++ /dev/null @@ -1,637 +0,0 @@ -/* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004-2017 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -#if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__) -# define LSEEK _lseeki64 -#else -#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 -# define LSEEK lseek64 -#else -# define LSEEK lseek -#endif -#endif - -/* Local functions */ -local void gz_reset OF((gz_statep)); -local gzFile gz_open OF((const void *, int, const char *)); - -#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 (error) - 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(state) - 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 */ - } - 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(path, fd, mode) - 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(path, mode) - const char *path; - const char *mode; -{ - return gz_open(path, -1, mode); -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzopen64(path, mode) - const char *path; - const char *mode; -{ - return gz_open(path, -1, mode); -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzdopen(fd, mode) - 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(path, mode) - const wchar_t *path; - const char *mode; -{ - return gz_open(path, -2, mode); -} -#endif - -/* -- see zlib.h -- */ -int ZEXPORT gzbuffer(file, size) - 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 < 2) - size = 2; /* need two bytes to check magic header */ - state->want = size; - return 0; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzrewind(file) - 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(file, offset, whence) - 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 - 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(file, offset, whence) - 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(file) - 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(file) - 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(file) - 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(file) - 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(file) - 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(file, errnum) - 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(file) - 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(state, err, msg) - 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 -} - -#ifndef INT_MAX -/* 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() -{ - unsigned p, q; - - p = 1; - do { - q = p; - p <<= 1; - p++; - } while (p > q); - return q >> 1; -} -#endif diff --git a/Dependencies/FreeImage/Source/ZLib/gzread.c b/Dependencies/FreeImage/Source/ZLib/gzread.c deleted file mode 100644 index 956b91e..0000000 --- a/Dependencies/FreeImage/Source/ZLib/gzread.c +++ /dev/null @@ -1,654 +0,0 @@ -/* gzread.c -- zlib functions for reading gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* Local functions */ -local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *)); -local int gz_avail OF((gz_statep)); -local int gz_look OF((gz_statep)); -local int gz_decomp OF((gz_statep)); -local int gz_fetch OF((gz_statep)); -local int gz_skip OF((gz_statep, z_off64_t)); -local z_size_t gz_read OF((gz_statep, voidp, z_size_t)); - -/* 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(state, buf, len, have) - 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(state) - 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(state) - 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; - if (strm->avail_in) { - 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(state) - 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(state) - 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(state, len) - 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(state, buf, len) - 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 = -1; - if (n > len) - n = 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(file, buf, len) - 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 = 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(buf, size, nitems, file) - 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(file) - gzFile file; -{ - int ret; - 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() */ - ret = gz_read(state, buf, 1); - return ret < 1 ? -1 : buf[0]; -} - -int ZEXPORT gzgetc_(file) -gzFile file; -{ - return gzgetc(file); -} - -/* -- see zlib.h -- */ -int ZEXPORT gzungetc(c, file) - int c; - 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 (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(file, buf, len) - 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(file) - 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(file) - 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/Dependencies/FreeImage/Source/ZLib/gzwrite.c b/Dependencies/FreeImage/Source/ZLib/gzwrite.c deleted file mode 100644 index c7b5651..0000000 --- a/Dependencies/FreeImage/Source/ZLib/gzwrite.c +++ /dev/null @@ -1,665 +0,0 @@ -/* gzwrite.c -- zlib functions for writing gzip files - * Copyright (C) 2004-2017 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* Local functions */ -local int gz_init OF((gz_statep)); -local int gz_comp OF((gz_statep, int)); -local int gz_zero OF((gz_statep, z_off64_t)); -local z_size_t gz_write OF((gz_statep, voidpc, z_size_t)); - -/* 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(state) - 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(state, flush) - 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; - } - - /* 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) - deflateReset(strm); - - /* 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(state, len) - 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(state, buf, len) - 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 = 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 = 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(file, buf, len) - 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(buf, size, nitems, file) - 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(file, c) - 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(file, str) - gzFile file; - const char *str; -{ - int ret; - z_size_t len; - 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(str); - ret = gz_write(state, str, len); - return ret == 0 && len != 0 ? -1 : ret; -} - -#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; - memcpy(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 (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) - gzFile file; - const char *format; - int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, 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; - memcpy(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(file, flush) - 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(file, level, strategy) - 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) - 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(file) - 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/Dependencies/FreeImage/Source/ZLib/infback.c b/Dependencies/FreeImage/Source/ZLib/infback.c deleted file mode 100644 index 59679ec..0000000 --- a/Dependencies/FreeImage/Source/ZLib/infback.c +++ /dev/null @@ -1,640 +0,0 @@ -/* infback.c -- inflate using a call-back interface - * Copyright (C) 1995-2016 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" - -/* function prototypes */ -local void fixedtables OF((struct inflate_state FAR *state)); - -/* - 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_(strm, windowBits, window, version, stream_size) -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; - 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(state) -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(strm, in, in_desc, out, out_desc) -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; - - 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 -- write leftover output */ - ret = Z_STREAM_END; - if (left < state->wsize) { - if (out(out_desc, state->window, state->wsize - left)) - ret = Z_BUF_ERROR; - } - 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; - } - - /* Return unused input */ - inf_leave: - strm->next_in = next; - strm->avail_in = have; - return ret; -} - -int ZEXPORT inflateBackEnd(strm) -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/Dependencies/FreeImage/Source/ZLib/inffast.c b/Dependencies/FreeImage/Source/ZLib/inffast.c deleted file mode 100644 index 0dbd1db..0000000 --- a/Dependencies/FreeImage/Source/ZLib/inffast.c +++ /dev/null @@ -1,323 +0,0 @@ -/* 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(strm, start) -z_streamp strm; -unsigned start; /* inflate()'s starting value for strm->avail_out */ -{ - 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 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/Dependencies/FreeImage/Source/ZLib/inffast.h b/Dependencies/FreeImage/Source/ZLib/inffast.h deleted file mode 100644 index e5c1aa4..0000000 --- a/Dependencies/FreeImage/Source/ZLib/inffast.h +++ /dev/null @@ -1,11 +0,0 @@ -/* 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 OF((z_streamp strm, unsigned start)); diff --git a/Dependencies/FreeImage/Source/ZLib/inffixed.h b/Dependencies/FreeImage/Source/ZLib/inffixed.h deleted file mode 100644 index d628327..0000000 --- a/Dependencies/FreeImage/Source/ZLib/inffixed.h +++ /dev/null @@ -1,94 +0,0 @@ - /* 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/Dependencies/FreeImage/Source/ZLib/inflate.c b/Dependencies/FreeImage/Source/ZLib/inflate.c deleted file mode 100644 index ac333e8..0000000 --- a/Dependencies/FreeImage/Source/ZLib/inflate.c +++ /dev/null @@ -1,1561 +0,0 @@ -/* inflate.c -- zlib decompression - * Copyright (C) 1995-2016 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 - -/* function prototypes */ -local int inflateStateCheck OF((z_streamp strm)); -local void fixedtables OF((struct inflate_state FAR *state)); -local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, - unsigned copy)); -#ifdef BUILDFIXED - void makefixed OF((void)); -#endif -local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, - unsigned len)); - -local int inflateStateCheck(strm) -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(strm) -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->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(strm) -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(strm, windowBits) -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) { - 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_(strm, windowBits, version, stream_size) -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_(strm, version, stream_size) -z_streamp strm; -const char *version; -int stream_size; -{ - return inflateInit2_(strm, DEF_WBITS, version, stream_size); -} - -int ZEXPORT inflatePrime(strm, bits, value) -z_streamp strm; -int bits; -int value; -{ - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - 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(state) -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() -{ - 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(strm, end, copy) -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, buf, len) \ - (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) -#else -# define UPDATE(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(strm, flush) -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; - } - state->flags = 0; /* expect zlib header */ - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - case DICT: - if (state->havedict == 0) { - RESTORE(); - return Z_NEED_DICT; - } - strm->adler = state->check = adler32(0L, Z_NULL, 0); - state->mode = TYPE; - case TYPE: - if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; - 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; - case COPY_: - state->mode = COPY; - 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; - 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; - 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; - case LEN_: - state->mode = LEN; - 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; - 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; - 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; - 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; - 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(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; - case LENGTH: - if (state->wrap && state->flags) { - NEEDBITS(32); - if (hold != (state->total & 0xffffffffUL)) { - strm->msg = (char *)"incorrect length check"; - state->mode = BAD; - break; - } - INITBITS(); - Tracev((stderr, "inflate: length matches trailer\n")); - } -#endif - state->mode = DONE; - 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: - 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(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(strm) -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(strm, dictionary, dictLength) -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(strm, dictionary, dictLength) -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(strm, head) -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(have, buf, len) -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(strm) -z_streamp strm; -{ - unsigned len; /* number of bytes to look at or looked at */ - 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; - in = strm->total_in; out = strm->total_out; - inflateReset(strm); - strm->total_in = in; strm->total_out = out; - 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(strm) -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(dest, source) -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(strm, subvert) -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(strm, check) -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 |= 4; - else - state->wrap &= ~4; - return Z_OK; -} - -long ZEXPORT inflateMark(strm) -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(strm) -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/Dependencies/FreeImage/Source/ZLib/inflate.h b/Dependencies/FreeImage/Source/ZLib/inflate.h deleted file mode 100644 index a46cce6..0000000 --- a/Dependencies/FreeImage/Source/ZLib/inflate.h +++ /dev/null @@ -1,125 +0,0 @@ -/* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2016 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) */ - 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/Dependencies/FreeImage/Source/ZLib/inftrees.c b/Dependencies/FreeImage/Source/ZLib/inftrees.c deleted file mode 100644 index 2ea08fc..0000000 --- a/Dependencies/FreeImage/Source/ZLib/inftrees.c +++ /dev/null @@ -1,304 +0,0 @@ -/* inftrees.c -- generate Huffman trees for efficient 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" - -#define MAXBITS 15 - -const char inflate_copyright[] = - " inflate 1.2.11 Copyright 1995-2017 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(type, lens, codes, table, bits, work) -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, 77, 202}; - 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/Dependencies/FreeImage/Source/ZLib/inftrees.h b/Dependencies/FreeImage/Source/ZLib/inftrees.h deleted file mode 100644 index baa53a0..0000000 --- a/Dependencies/FreeImage/Source/ZLib/inftrees.h +++ /dev/null @@ -1,62 +0,0 @@ -/* 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 distribtution. 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 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 OF((codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work)); diff --git a/Dependencies/FreeImage/Source/ZLib/trees.c b/Dependencies/FreeImage/Source/ZLib/trees.c deleted file mode 100644 index e800f32..0000000 --- a/Dependencies/FreeImage/Source/ZLib/trees.c +++ /dev/null @@ -1,1203 +0,0 @@ -/* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2017 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: trees.c,v 1.11 2017/02/11 03:07:47 drolon Exp $ */ - -/* #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 */ -}; - -local const static_tree_desc static_l_desc = -{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; - -local const static_tree_desc static_d_desc = -{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; - -local const static_tree_desc static_bl_desc = -{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; - -/* =========================================================================== - * Local (static) routines in this file. - */ - -local void tr_static_init OF((void)); -local void init_block OF((deflate_state *s)); -local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); -local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); -local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count)); -local void build_tree OF((deflate_state *s, tree_desc *desc)); -local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); -local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); -local int build_bl_tree OF((deflate_state *s)); -local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, - int blcodes)); -local void compress_block OF((deflate_state *s, const ct_data *ltree, - const ct_data *dtree)); -local int detect_data_type OF((deflate_state *s)); -local unsigned bi_reverse OF((unsigned value, int length)); -local void bi_windup OF((deflate_state *s)); -local void bi_flush OF((deflate_state *s)); - -#ifdef GEN_TREES_H -local void gen_trees_header OF((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 - -/* =========================================================================== - * 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)); \ -} - -/* =========================================================================== - * 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 OF((deflate_state *s, int value, int length)); - -local void send_bits(s, value, length) - deflate_state *s; - int value; /* value to send */ - int length; /* number of bits */ -{ - 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() -{ -#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< dist code (0..29) */ - dist = 0; - for (code = 0 ; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1<>= 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) */ -} - -/* =========================================================================== - * Genererate 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() -{ - 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 the tree data structures for a new zlib stream. - */ -void ZLIB_INTERNAL _tr_init(s) - 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); -} - -/* =========================================================================== - * Initialize a new block. - */ -local void init_block(s) - 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->last_lit = s->matches = 0; -} - -#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(s, tree, k) - deflate_state *s; - ct_data *tree; /* the tree to restore */ - int k; /* node to move down */ -{ - 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(s, desc) - deflate_state *s; - tree_desc *desc; /* the tree descriptor */ -{ - 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--; - } - } -} - -/* =========================================================================== - * 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 (tree, max_code, bl_count) - ct_data *tree; /* the tree to decorate */ - int max_code; /* largest code with non zero frequency */ - ushf *bl_count; /* number of codes at each bit length */ -{ - 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<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 (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ -{ - 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 (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ -{ - 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(s) - 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(s, lcodes, dcodes, blcodes) - deflate_state *s; - int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - 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(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ -{ - 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); - 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(s) - 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(s) - 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); -} - -/* =========================================================================== - * 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(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block, or NULL if too old */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ -{ - 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->last_lit)); - - if (static_lenb <= opt_lenb) 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); - -#ifdef FORCE_STATIC - } else if (static_lenb >= 0) { /* force static trees */ -#else - } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { -#endif - 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 (s, dist, lc) - deflate_state *s; - unsigned dist; /* distance of matched string */ - unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - s->d_buf[s->last_lit] = (ush)dist; - s->l_buf[s->last_lit++] = (uch)lc; - 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++; - } - -#ifdef TRUNCATE_BLOCK - /* Try to guess if it is profitable to stop the current block here */ - if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { - /* Compute an upper bound for the compressed length */ - ulg out_length = (ulg)s->last_lit*8L; - ulg in_length = (ulg)((long)s->strstart - s->block_start); - int dcode; - for (dcode = 0; dcode < D_CODES; dcode++) { - out_length += (ulg)s->dyn_dtree[dcode].Freq * - (5L+extra_dbits[dcode]); - } - out_length >>= 3; - Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", - s->last_lit, in_length, out_length, - 100L - out_length*100L/in_length)); - if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; - } -#endif - return (s->last_lit == s->lit_bufsize-1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -local void compress_block(s, ltree, dtree) - deflate_state *s; - const ct_data *ltree; /* literal tree */ - const ct_data *dtree; /* distance tree */ -{ - unsigned dist; /* distance of matched string */ - int lc; /* match length or unmatched char (if dist == 0) */ - unsigned lx = 0; /* running index in l_buf */ - unsigned code; /* the code to send */ - int extra; /* number of extra bits to send */ - - if (s->last_lit != 0) do { - dist = s->d_buf[lx]; - lc = s->l_buf[lx++]; - 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 the 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 that the overlay between pending_buf and d_buf+l_buf is ok: */ - Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - "pendingBuf overflow"); - - } while (lx < s->last_lit); - - 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 - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white 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(s) - deflate_state *s; -{ - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - unsigned long black_mask = 0xf3ffc07fUL; - int n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>= 1) - if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0)) - return Z_BINARY; - - /* Check for textual ("white-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 "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - -/* =========================================================================== - * 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(code, len) - unsigned code; /* the value to invert */ - int len; /* its bit length */ -{ - 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(s) - 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(s) - 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 -} diff --git a/Dependencies/FreeImage/Source/ZLib/trees.h b/Dependencies/FreeImage/Source/ZLib/trees.h deleted file mode 100644 index d35639d..0000000 --- a/Dependencies/FreeImage/Source/ZLib/trees.h +++ /dev/null @@ -1,128 +0,0 @@ -/* 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/Dependencies/FreeImage/Source/ZLib/uncompr.c b/Dependencies/FreeImage/Source/ZLib/uncompr.c deleted file mode 100644 index 46c3d26..0000000 --- a/Dependencies/FreeImage/Source/ZLib/uncompr.c +++ /dev/null @@ -1,93 +0,0 @@ -/* 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: uncompr.c,v 1.11 2017/02/11 03:07:47 drolon Exp $ */ - -#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 (dest, destLen, source, sourceLen) - 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 (dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; -{ - return uncompress2(dest, destLen, source, &sourceLen); -} diff --git a/Dependencies/FreeImage/Source/ZLib/zconf.h b/Dependencies/FreeImage/Source/ZLib/zconf.h deleted file mode 100644 index 9de1623..0000000 --- a/Dependencies/FreeImage/Source/ZLib/zconf.h +++ /dev/null @@ -1,534 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: zconf.h,v 1.11 2017/02/11 03:07:47 drolon Exp $ */ - -#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_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 - typedef unsigned long z_size_t; -#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 - -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(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 -# 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 - -#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 - -#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) -# define Z_HAVE_UNISTD_H -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) -# 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__) && !defined(Z_SOLO) -# 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/Dependencies/FreeImage/Source/ZLib/zconf.h.in b/Dependencies/FreeImage/Source/ZLib/zconf.h.in deleted file mode 100644 index 7e5ffd3..0000000 --- a/Dependencies/FreeImage/Source/ZLib/zconf.h.in +++ /dev/null @@ -1,534 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: zconf.h.in,v 1.6 2017/02/11 03:07:47 drolon Exp $ */ - -#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_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 - typedef unsigned long z_size_t; -#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 - -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(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 -# 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 - -#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 - -#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) -# define Z_HAVE_UNISTD_H -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) -# 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__) && !defined(Z_SOLO) -# 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/Dependencies/FreeImage/Source/ZLib/zlib.3 b/Dependencies/FreeImage/Source/ZLib/zlib.3 deleted file mode 100644 index bda4eb0..0000000 --- a/Dependencies/FreeImage/Source/ZLib/zlib.3 +++ /dev/null @@ -1,149 +0,0 @@ -.TH ZLIB 3 "15 Jan 2017" -.SH NAME -zlib \- compression/decompression library -.SH SYNOPSIS -[see -.I zlib.h -for full description] -.SH DESCRIPTION -The -.I zlib -library is a general purpose data compression library. -The code is thread safe, assuming that the standard library functions -used are thread safe, such as memory allocation routines. -It 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 may be added later -with the same stream interface. -.LP -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. -.LP -The library also supports reading and writing files in -.IR gzip (1) -(.gz) format -with an interface similar to that of stdio. -.LP -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. -.LP -All functions of the compression library are documented in the file -.IR zlib.h . -The distribution source includes examples of use of the library -in the files -.I test/example.c -and -.IR test/minigzip.c, -as well as other examples in the -.IR examples/ -directory. -.LP -Changes to this version are documented in the file -.I ChangeLog -that accompanies the source. -.LP -.I zlib -is built in to many languages and operating systems, including but not limited to -Java, Python, .NET, PHP, Perl, Ruby, Swift, and Go. -.LP -An experimental package to read and write files in the .zip format, -written on top of -.I zlib -by Gilles Vollant (info@winimage.com), -is available at: -.IP -http://www.winimage.com/zLibDll/minizip.html -and also in the -.I contrib/minizip -directory of the main -.I zlib -source distribution. -.SH "SEE ALSO" -The -.I zlib -web site can be found at: -.IP -http://zlib.net/ -.LP -The data format used by the -.I zlib -library is described by RFC -(Request for Comments) 1950 to 1952 in the files: -.IP -http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format) -.br -http://tools.ietf.org/html/rfc1951 (for the deflate compressed data format) -.br -http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer format) -.LP -Mark Nelson wrote an article about -.I zlib -for the Jan. 1997 issue of Dr. Dobb's Journal; -a copy of the article is available at: -.IP -http://marknelson.us/1997/01/01/zlib-engine/ -.SH "REPORTING PROBLEMS" -Before reporting a problem, -please check the -.I zlib -web site to verify that you have the latest version of -.IR zlib ; -otherwise, -obtain the latest version and see if the problem still exists. -Please read the -.I zlib -FAQ at: -.IP -http://zlib.net/zlib_faq.html -.LP -before asking for help. -Send questions and/or comments to zlib@gzip.org, -or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). -.SH AUTHORS AND LICENSE -Version 1.2.11 -.LP -Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler -.LP -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. -.LP -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: -.LP -.nr step 1 1 -.IP \n[step]. 3 -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. -.IP \n+[step]. -Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -.IP \n+[step]. -This notice may not be removed or altered from any source distribution. -.LP -Jean-loup Gailly Mark Adler -.br -jloup@gzip.org madler@alumni.caltech.edu -.LP -The deflate format used by -.I zlib -was defined by Phil Katz. -The deflate and -.I zlib -specifications were written by L. Peter Deutsch. -Thanks to all the people who reported problems and suggested various -improvements in -.IR zlib ; -who are too numerous to cite here. -.LP -UNIX manual page by R. P. C. Rodgers, -U.S. National Library of Medicine (rodgers@nlm.nih.gov). -.\" end of man page diff --git a/Dependencies/FreeImage/Source/ZLib/zlib.h b/Dependencies/FreeImage/Source/ZLib/zlib.h deleted file mode 100644 index f09cdaf..0000000 --- a/Dependencies/FreeImage/Source/ZLib/zlib.h +++ /dev/null @@ -1,1912 +0,0 @@ -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.11, January 15th, 2017 - - Copyright (C) 1995-2017 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.2.11" -#define ZLIB_VERNUM 0x12b0 -#define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 11 -#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) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((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 OF((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 OF((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. - - 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 OF((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 ouput - 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 to avoid repeated flush markers due to - avail_out == 0 on return. - - 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 OF((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 OF((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. - - 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 OF((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 OF((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 OF((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 next_in, 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 OF((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 OF((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. - Similary, 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 OF((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 OF((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. - - 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 OF((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 any input has been consumed in a previous - deflate() call, 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 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 OF((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 OF((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 OF((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 OF((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 OF((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 255, 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 OF((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 streams. - inflate() will return Z_STREAM_END at the end of the gzip stream. The state - would need to be reset to continue decoding a subsequent gzip stream. - - 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 OF((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 OF((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. - Similary, 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 OF((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 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 OF((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 OF((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. - - 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 OF((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 OF((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 OF((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 OF((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 OF((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) OF((void FAR *, - z_const unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - -ZEXTERN int ZEXPORT inflateBack OF((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 OF((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 OF((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 OF((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 OF((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 OF((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 OF((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 OF((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 OF((const char *path, const char *mode)); - - Opens a gzip (.gz) file for reading or 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 OF((int fd, const char *mode)); -/* - gzdopen associates 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 OF((gzFile file, unsigned size)); -/* - Set the internal buffer size used by this library's functions. 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 OF((gzFile file, int level, int strategy)); -/* - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. Previously provided - data is flushed before the parameter change. - - 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 OF((gzFile file, voidp buf, unsigned len)); -/* - Reads the given number of uncompressed bytes from the compressed file. 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 OF((voidp buf, z_size_t size, z_size_t nitems, - gzFile file)); -/* - Read up to nitems items of size size from file to 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 nevetheless 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, reseting and retrying on end-of-file, when size is not 1. -*/ - -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); -/* - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes written or 0 in case of - error. -*/ - -ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, - z_size_t nitems, gzFile file)); -/* - gzfwrite() writes 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 Z_ARG((gzFile file, const char *format, ...)); -/* - Converts, formats, and writes the arguments to the compressed file under - control of the format string, 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 OF((gzFile file, const char *s)); -/* - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - - gzputs returns the number of characters written, or -1 in case of error. -*/ - -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); -/* - Reads bytes from the compressed file until len-1 characters are read, or 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 == 1, the - string is terminated with a null character. If no characters are read due - to an end-of-file or len < 1, 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 OF((gzFile file, int c)); -/* - Writes c, converted to an unsigned char, into the compressed file. gzputc - returns the value that was written, or -1 in case of error. -*/ - -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); -/* - Reads one byte from the compressed 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 OF((int c, gzFile file)); -/* - Push one character back onto the stream to be read as the first character - on the next read. At least one character of push-back is 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 OF((gzFile file, int flush)); -/* - Flushes all pending output into the compressed 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 OF((gzFile file, - z_off_t offset, int whence)); - - Sets the starting position for the next gzread or gzwrite on the given - compressed 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 OF((gzFile file)); -/* - Rewinds the given 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 OF((gzFile file)); - - Returns the starting position for the next gzread or gzwrite on the given - compressed 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 OF((gzFile file)); - - Returns the current offset in the file being read or written. 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 OF((gzFile file)); -/* - Returns true (1) if the end-of-file indicator 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 OF((gzFile file)); -/* - Returns 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 OF((gzFile file)); -/* - Flushes all pending output if necessary, closes the compressed file and - deallocates 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 OF((gzFile file)); -ZEXTERN int ZEXPORT gzclose_w OF((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 OF((gzFile file, int *errnum)); -/* - Returns the error message for the last error which occurred on the given - compressed 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 OF((gzFile file)); -/* - Clears 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 OF((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. 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 OF((uLong adler, const Bytef *buf, - z_size_t len)); -/* - Same as adler32(), but with a size_t length. -*/ - -/* -ZEXTERN uLong ZEXPORT adler32_combine OF((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 OF((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. 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 OF((uLong adler, const Bytef *buf, - z_size_t len)); -/* - Same as crc32(), but with a size_t length. -*/ - -/* -ZEXTERN uLong ZEXPORT crc32_combine OF((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. -*/ - - - /* 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_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((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_ OF((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 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, 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 -# else -# define gzopen gzopen64 -# define gzseek gzseek64 -# define gztell gztell64 -# define gzoffset gzoffset64 -# define adler32_combine adler32_combine64 -# define crc32_combine crc32_combine64 -# endif -# ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); -# endif -#else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); -#endif - -#else /* Z_SOLO */ - - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - -#endif /* !Z_SOLO */ - -/* undocumented functions */ -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); -ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); -ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp)); -ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); -#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - const char *format, - va_list va)); -# endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ZLIB_H */ diff --git a/Dependencies/FreeImage/Source/ZLib/zutil.c b/Dependencies/FreeImage/Source/ZLib/zutil.c deleted file mode 100644 index bac91a5..0000000 --- a/Dependencies/FreeImage/Source/ZLib/zutil.c +++ /dev/null @@ -1,325 +0,0 @@ -/* 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: zutil.c,v 1.11 2017/02/11 03:07:47 drolon Exp $ */ - -#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() -{ - return ZLIB_VERSION; -} - -uLong ZEXPORT zlibCompileFlags() -{ - 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 (m) - 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(err) - int err; -{ - return ERR_MSG(err); -} - -#if defined(_WIN32_WCE) - /* The 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(dest, source, len) - Bytef* dest; - const Bytef* source; - uInt len; -{ - if (len == 0) return; - do { - *dest++ = *source++; /* ??? to be unrolled */ - } while (--len != 0); -} - -int ZLIB_INTERNAL zmemcmp(s1, s2, len) - 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(dest, len) - 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 OF((uInt size)); -extern voidp calloc OF((uInt items, uInt size)); -extern void free OF((voidpf ptr)); -#endif - -voidpf ZLIB_INTERNAL zcalloc (opaque, items, size) - voidpf opaque; - unsigned items; - unsigned size; -{ - (void)opaque; - return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : - (voidpf)calloc(items, size); -} - -void ZLIB_INTERNAL zcfree (opaque, ptr) - voidpf opaque; - voidpf ptr; -{ - (void)opaque; - free(ptr); -} - -#endif /* MY_ZCALLOC */ - -#endif /* !Z_SOLO */ diff --git a/Dependencies/FreeImage/Source/ZLib/zutil.h b/Dependencies/FreeImage/Source/ZLib/zutil.h deleted file mode 100644 index f30d4f8..0000000 --- a/Dependencies/FreeImage/Source/ZLib/zutil.h +++ /dev/null @@ -1,271 +0,0 @@ -/* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2016 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: zutil.h,v 1.11 2017/02/11 03:07:47 drolon Exp $ */ - -#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 - -#ifdef Z_SOLO - typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */ -#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; - -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[Z_NEED_DICT-(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) || defined(TARGET_OS_MAC) -# define OS_CODE 7 -# ifndef Z_SOLO -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -# endif -# endif -#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(_BEOS_) || defined(RISCOS) -# define fdopen(fd,mode) NULL /* No fdopen() */ -#endif - -#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX -# if defined(_WIN32_WCE) -# define fdopen(fd,mode) NULL /* No fdopen() */ -# ifndef _PTRDIFF_T_DEFINED - typedef int ptrdiff_t; -# define _PTRDIFF_T_DEFINED -# endif -# else -# define fdopen(fd,type) _fdopen(fd,type) -# endif -#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 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, 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 OF((Bytef* dest, const Bytef* source, uInt len)); - int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); -#endif - -/* Diagnostic functions */ -#ifdef ZLIB_DEBUG -# include - extern int ZLIB_INTERNAL z_verbose; - extern void ZLIB_INTERNAL z_error OF((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 OF((voidpf opaque, unsigned items, - unsigned size)); - void ZLIB_INTERNAL zcfree OF((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/Dependencies/FreeImage/Whatsnew.txt b/Dependencies/FreeImage/Whatsnew.txt deleted file mode 100644 index 9cccb46..0000000 --- a/Dependencies/FreeImage/Whatsnew.txt +++ /dev/null @@ -1,1304 +0,0 @@ -What's New for FreeImage - -* : fixed -- : removed -! : changed -+ : added - -July 31st, 2018 - 3.18.0 -! FreeImage now uses ZLib 1.2.11 -! FreeImage now uses LibRaw 0.19 -! FreeImage now uses LibWebP 1.0.0 (GIT patch 2018-07-24) -! FreeImage now uses LibPNG 1.6.35 -! FreeImage now uses LibTIFF 4.0.9 (GIT patch 2018-07-02) -! FreeImage now uses OpenEXR 2.2.1 -! FreeImage now uses LibJPEG 9c -+ [Herve Drolon] added VS 2017 project files -- [Herve Drolon] removed VS 2005 project files : this IDE is no longer supported because of its outdated C++ compiler -- [Herve Drolon] removed VS 2008 project files : this IDE is no longer supported because of its outdated C++ compiler -- [Herve Drolon] removed FreeImage_RotateClassic (deprecated function) -- [Herve Drolon] removed internal Deprecation Manager (class DeprecationMgr) -! [Herve Drolon] DDS plugin now convert 16-bit uncompressed RGB (RGB444, RGB555, RGB565) to 24-bit RGB on loading -+ [Garrick Meeker] added saving support to the PSD plugin -+ [Tom Whittock] FreeImage_ConvertToRawBits now deals with palletized images containing transparency during conversion -+ [Mihail Naydenov] added saving support for 32-bit CMYK in JPEG plugin -+ [Herve Drolon] added FreeImage_Validate functions - added FreeImage_Validate - added FreeImage_ValidateU - added FreeImage_ValidateFromHandle - added FreeImage_ValidateFromMemory -* [Pengsu Cheng] fixed PCX loader against malicious images with a bad window specification -* [Herve Drolon] fixed TIFF loader with loading of RGB[A]F float images -* [Garrick Meeker] improved loading speed of PSD plugin -* [Herve Drolon] fixed support of snprintf in Visual Studio 2015 -* [Herve Drolon] improved GIF signature validation -* [Herve Drolon] improved TARGA signature validation -* [Herve Drolon] disabled ICC sRGB profile checking in PluginPNG:Save -* [Ghislain Vaillant] fixed endianness detection on some architectures -* [Mihail Naydenov] fixed saving of 32-bit CMYK converted to 24-bit RGB on loading (remove ICC profile from Exif metadata) -* [Mihail Naydenov] fixed FreeImage_IsTransparent and FreeImage_GetColorType returned value for RGBA[16,F] images flagged as CMYK -* [Mihail Naydenov] fixed a bug in FreeImage_Clone when working with wrapped buffer (obtained from FreeImage_ConvertFromRawBitsEx) -* [Mihail Naydenov] fixed a bug in PluginBMP:Save when saving a dib created with FreeImage_CreateView -* [John Wordsworth] fixed loading of uncompressed DDS files when width / height are not a multiple of 4 -* [Herve Drolon] fixed XPM loader against malicious images with a bad header specification -* [Mihail Naydenov] fixed TIFF loader with Exif loading (saves and restores offset and dir when exif is loaded) -* [Mihail Naydenov] refactored MultiPage and CacheFile mechanism -* [Jojakim Stahl] fixed PCX file conversion crash on special files -* [dartraiden] fixed FreeImage_FillBackground when using blending with an alpha-transparent foreground color over an opaque background -* [Herve Drolon] fixed 64-bit conversion of parameters in sprintf calls (required with C++ 11) -* [Peter Levine] fixed static cast to boolean in PluginJPEG -* [Sergey Shambir] improved error handling in PluginPNG -* [Joachim Reichel] fixed wrong exposure in exported HDR files -* [Percy Schott] fixed PluginTIFF:ReadThumbnail behavior when reading TIF with Exif metadata - -March 15th, 2015 - 3.17.0 -! FreeImage now uses LibPNG 1.6.16 -! FreeImage now uses LibWebP 0.4.2 (GIT patch 2015-03-03) -! FreeImage now uses LibRaw 0.17-Alpha1 -! FreeImage now uses LibTIFF 4.0.4 (CVS patch 2015-01-26) -! FreeImage now uses OpenEXR 2.2.0 -- [Herve Drolon] removed VS 2003 project files : this IDE is no longer supported because of its outdated C++ compiler -+ [Mihail Naydenov] added FreeImage_ConvertFromRawBitsEx -+ [Herve Drolon] added RAW_UNPROCESSED load flag to the RAW plugin -+ [Herve Drolon] added FreeImage_SetMetadataKeyValue -+ [Herve Drolon] added support for metadata writing to the JPEG-JXR plugin -+ [Herve Drolon] added VS 2013 project files -+ [Herve Drolon] added support for PNG tIME metadata (read/write, handle as Exif-TIFF DateTime) -+ [Carsten Klein] added explicit definition of endianness and color order in compiler options -+ [Carsten Klein] added FIQ_LFPQUANT quantizer algorithm -+ [Carsten Klein] added support for input 32-bit dib in Wu quantizer -+ [Tanner Helland] added FreeImage_ConvertToRGBAF and updated conversions in FreeImage_ConvertToType -+ [Herve Drolon] added FreeImage_ConvertToRGBA16 and updated conversions in FreeImage_ConvertToType -+ [Carsten Klein] added FreeImage_CreateView -+ [Carsten Klein] added FreeImage_RescaleRect -+ [Carsten Klein] added FreeImage_GetMemorySize -* [Tanner Helland] ICO plugin: improved support for Vista icons -* [fpgaminer] fixed a rounding error in RGB to greyscale conversion formula -* [Sven-Hendrik Haase] fixed Makefile.fip so that it installs symlinks -* [Joachim Reichel] fixed a potential memory access violation in PluginHDR Save function -* [Christian Schluchter] fixed a bug in FreeImage_LookupSVGColor ("green" color was not found) -* [Marco Altomonte] fixed TARGA signature validation for TARGA versions < 2.0 -* [Jeremy Reyniers] fixed FreeImage_GetScanLine not working with very large images on x64 platforms -* [Herve Drolon] improved PluginTIFF compatibility with LibTIFF 4 -* [Aaron Shumate] fixed a segfault occuring on a corrupted animated GIF -* [Herve Drolon] improved memory allocation in PluginRAW -* [Herve Drolon] fixed loading/saving of TIFF containing a GPS IFD inside the Exif-TIFF metadata segment (the solution is to ignore the tag) -* [Mihail Naydenov] fixed a bug in FreeImage_JPEGCrop*/_JPEGTransform* functions occuring when using the same source / destination filename -* [Herve Drolon] fixed a bug with output image quality in PluginJP2::Save & PluginJ2K::Save functions (regression from FI 3.15.4) -* [Herve Drolon] improved RAW file format detection -* [Aaron Shumate] fixed FreeImage_GetFileType behavior with ANI file formats -* [Herve Drolon] improved Exif reader so as to handle Exif IFD with a suspicious offset (can occur with maker notes) -* [Herve Drolon] fixed a memory leak in PluginPNG:Save occuring when dealing with invalid PNG files -* [Tanner Helland] fixed PNG plugin handling of 16-bit grayscale + 16-bit alpha images -* [Tanner Helland] fixed PNG plugin handling of 16-bit grayscale + tRNS chunk images -* [Tanner Helland] fixed PNG plugin handling of 24-bit RGB + tRNS chunk images -* [Tanner Helland] fixed PNG plugin handling of 1-,4-bit greyscale/palettized + tRNS chunk images -* [ekpyron] fixed invalid directory delimiter in include statement (mingw-w64) in Source/LibJXR/image/sys/strcodec.h -* [ekpyron] fixed Invalid condition for defining _byteswap_ulong (mingw-w64) in Source/LibJXR/image/sys/strcodec.c -* [tostercx] fixed FreeImage_Get*Mask not returning 0 for greyscale images -* [robpats] fixed loading of external plugins when using UNICODE directory names to store plugins -* [Herve Drolon] fixed loading of JXR files when using memory streams -* [Carsten Klein] added Dist/ directory creation in Makefiles (in case it is not already present) - -March 23rd, 2014 - 3.16.0 -! FreeImage now uses LibJPEG 9a -! FreeImage now uses LibPNG 1.6.10 -! FreeImage now uses LibTIFF 4.0.3 (CVS patch 2013-11-30) -! FreeImage now uses LibRaw 0.16.0 -! FreeImage now uses OpenJPEG 2.1.0 (SVN patch 2748) -! FreeImage now uses ZLib 1.2.8 -! FreeImage now uses LibWebP 0.4.0 (GIT patch 2014-03-21) -! FreeImage now uses LibJXR 1.1 (GIT patch 2014-01-31) -+ [Herve Drolon] added loading & writing support for the JPEG-XR image format (also support the FIF_LOAD_NOPIXELS flag) -+ [Herve Drolon] added loading & writing support for the WebP image format (also support the FIF_LOAD_NOPIXELS flag) -+ [Herve Drolon] added support for FIF_LOAD_NOPIXELS flag to JP2/J2K plugins -+ [Gal Zimmermann] added basic support for BMP v4, v5 in BMP plugin (useful for drag and drop from another application such as Firefox) -+ [Mihail Naydenov] FreeImage_GetFIFFromFilename[U] : added support for *rgb,*rgba,*.bw extensions to the SGI plugin -+ [Mihail Naydenov] improved FreeImage_Rescale speed & spatial accuracy -+ [Mihail Naydenov] improved JPEG transform functions and added new functions (see below) : - added FreeImage_JPEGTransformFromHandle - added FreeImage_JPEGTransformCombined - added FreeImage_JPEGTransformCombinedU - added FreeImage_JPEGTransformCombinedFromMemory -* [Herve Drolon] fixed FreeImage_CloneTag behavior with ASCII data handling (regression that appeared in 3.15.2, affect metadata writing) -* [Carsten Klein] ICO plugin: avoid using the AND mask when loading a 32-bit (already transparent) icon -* [Andreas Baumann] HDR plugin: removed a comma at end of an enumerator list -* [mark] added missing in OpenEXR (needed with mingw) -* [Herve Drolon] added support for FIC_MINISWHITE color type inside FreeImage_GetColorType for FIT_UINT16 images -* [Takamasa Mitsuji] FreeImage_Rescale : fixed a NULL-pointer access bug occurring for transparent images with a linear palette -* [Herve Drolon] fixed PSD parser when reading PSD files with corrupted resources -* [Herve Drolon] fixed TIFF plugin truncating metadata tag on loading if type is ASCII and it's value is of variable size (TIFF_VARIABLE) -* [Herve Drolon] fixed loading of TGA 8-bit files with a palette size greater that 256 -* [Anton Kukoba] TIFF parser didn't initialize the memory with zeros in stripped mode. This caused random bitmap data if the tiff file was corrupted/invalid. -* [Herve Drolon] improved TGA file detection when the format version is < 2.0 -* [Christian Heimes] fixed compiler errors on 64bit Linux (INT64 / UINT64 type mismatches and missing prototype for memset) -* [Christian Heimes] fixed FreeImage_Get*Mask() returning 0 on 24-, -32-bit FIT_BITMAP images -* [Mihail Naydenov] fixed GIF plugin LZW decoder failing on some images -* [Herve Drolon] fixed the TIFF plugin against race condition when used simultaneously in multiple threads -* [Herve Drolon] fixed float <--> rgb[a]f conversions when pixels are out of [0..1] range - -October 27th, 2012 - 3.15.4 -! FreeImage now uses LibPNG 1.5.13 -! FreeImage now uses LibRaw 0.14.7 -! FreeImage now uses ZLib 1.2.7 -! FreeImage now uses LibTIFF 4.0.3 -! FreeImage now uses OpenJPEG 1.5.1 -! FreeImage now uses OpenEXR 1.7.1 -+ [Herve Drolon] improved the speed of RAW files detection in FreeImage_GetFileType* functions -+ [Herve Drolon] added JPEG_GREYSCALE load flag to the JPEG plugin (force to load as 8-bit greyscale) -+ [Herve Drolon] added 64-bit RGBA to 24-bit conversion support in FreeImage_ConvertTo24Bits -+ [Carsten Klein] improved the speed of FreeImage_Rescale for FIT_BITMAP & UINT16, RGB[A]16 types -+ [Carsten Klein] improved the speed of FreeImage_ConvertToGreyscale -* [Carsten Klein] updated makefile for building FreeImage with MinGW -* [Herve Drolon] fixed BigTIFF signature validation in FreeImage_GetFileType* functions -* [Carsten Klein] fixed handling of RGB-565 16-bit images (needed for conversion from HBITMAP to FIBITMAP) -* [Herve Drolon] fixed loading of JPEG with invalid IPTC marker -* [Herve Drolon] changed default TIF RowsPerStrips to image height when saving as TIF G3 or TIF G4 (improved compression) -* [Herve Drolon] improved the memory behavior of the RAW plugin (do not allocate huge variables on the stack) -* [Herve Drolon] fixed FreeImage_AllocateT so that it returns NULL with images with a zero width and/or height -* [Herve Drolon] replaced FIUINT64/FIINT64 with standard types UINT64/INT64 -* [Rustam Abdullaev] fixed PNG plugin with saving of transparent monochrome images -* [Floris van den Berg] improved plugin registering when replacing an existing internal plugin with a new equivalent plugin -* [Herve Drolon] fixed a crash when calling FreeImage_GetColorType on a 32-bit RGBA images loaded with the FIF_LOAD_NOPIXELS flag -* [Herve Drolon] fixed FreeImage_SetTransparencyTable falsely setting a dib to 'transparent' when called with a count of 0 -* [Carsten Klein] fixed storing of RGB masks for 16-bit RGB standard images in order to be in a MSDN compatible way -* [Herve Drolon] added an error handling message inside HDR plugin when trying to save an unsupported format -* [Corey Taylor] fixed DDS plugin color channel swapping for RGB color order, when using FREEIMAGE_COLORORDER_RGB color order -* [Herve Drolon] fixed internal TagLib singleton initialization against double-checked locking so that it is multi-thread safe - -March 17th, 2012 - 3.15.3 -! FreeImage now uses LibPNG 1.5.9 -! FreeImage now uses LibTIFF 4.0.1 -+ [Herve Drolon] added new 64-bit data types FIINT64, FIUINT64 -+ [Herve Drolon] added new 64-bit metadata types to FREE_IMAGE_MDTYPE (FIDT_LONG8, FIDT_SLONG8, FIDT_IFD8) -+ [Herve Drolon] added support for 64-bit metadata types to FreeImage_TagToString -* [Herve Drolon] fixed a regression with Fax3/Fax4 TIFF images on 64-bit OS (introduced with FI 3.15.2) -* [Herve Drolon] fixed some gcc 4.4.6 warnings -* [Petr Pytelka] refactored FreeImage_InsertPage and FreeImage_AppendPage -* [Herve Drolon] fixed JP2/J2K plugins with saving of 32-bit dib with a fully opaque layer -* [Herve Drolon] fixed loading of CMYK JPEG when using JPEG_CMYK load flag (need to invert pixels) -* [Herve Drolon] fixed loading of CMYK PSD when using PSD_CMYK load flag - -February 20th, 2012 - 3.15.2 -! FreeImage now uses LibRaw 0.14.5 -! FreeImage now uses LibPNG 1.5.8 -! FreeImage now uses LibJPEG 8d -! FreeImage now uses ZLib 1.2.6 -! FreeImage now uses OpenJPEG 1.5.0 (released version) -! FreeImage now uses LibTIFF 4.0.0 -- [Herve Drolon] removed dependency on LibMNG 1.0.10 (MNG and JNG files are now handled internally) -+ [Herve Drolon] replaced the MNG plugin with a new MNG internal FreeImage plugin (with read support) -+ [Herve Drolon] added a new JNG internal FreeImage plugin (with read/write support) -+ [Christian Heimes] added write support to the TIFF plugin for EXIF_MAIN tags -+ [Herve Drolon] added new Exif maker note tags -+ [Herve Drolon] added TAG_COMPRESSION conversion to FreeImage_TagToString -* [Mylek Grey] enabled the use of multi-component transforms (MCT) in J2K and JP2 saving -* [Herve Drolon] refactored PluginICO in order to correctly support Windows Vista 256x256 icons -* [Herve Drolon] added minor speed improvements to FreeImage_Rescale -* [Herve Drolon] fixed dib allocation failing with very large images (i.e. more than 4GB) -* [Herve Drolon] fixed FreeImage_CloneTag behavior with ASCII data handling -* [Herve Drolon] improved JPEG plugin behavior with very big images -* [Herve Drolon] improved JPEG plugin behavior with C++ exceptions -* [Herve Drolon] fixed loading of palettized PNG with more that 256 palette entries -* [Herve Drolon] fixed a bug inside IFF plugin occuring when loading a 24-bit dib with a palette -* [Herve Drolon] fixed a bug with loading of PNG images containing a cHRM chunk (regression introduced by LibPNG 1.5.4 and fixed by LibPNG 1.5.5) -* [Herve Drolon] allowed loading of PNG with benign errors (such as images with too many IDATs) -* [Mihail Naydenov] fixed some incorrect MIME types returned by FreeImage_GetFIFMimeType -* [Herve Drolon] fixed loading of Exif with bad thumbnail data or with a bad first offset size - -July 25th, 2011 - 3.15.1 -! FreeImage now uses LibRaw 0.13.7 -! FreeImage now uses LibPNG 1.5.4 -! FreeImage now uses LibTIFF 3.9.5 -! FreeImage now uses OpenJPEG 1.5.0 (SVN patch 2011-07-23) -+ [Herve Drolon] added FreeImage_ConvertToRGB16 and updated FreeImage_ConvertToType -+ [Herve Drolon] added RAW_HALFSIZE flag to RAW plugin -* [Herve Drolon] fixed a memory leak in JPEG plugin occuring when loading some corrupted images -* [Eberhard Mattes] improved thread safety behavior inside internal TagLib class -* [Hew How Chee] fixed a bug in FreeImage_EnlargeCanvas when called with negative left and right parameters and bpp <= 4 -* [Herve Drolon] improved memory allocation checking in FreeImage_ConvertTo[Float/RGBF/UINT16] -* [Herve Drolon] allowed loading of TIF with missing bitspersample/samplesperpixel/photometric tags -* [Herve Drolon] fixed FreeImage_AllocateHeaderT against possible malloc overflow -* [Herve Drolon] fixed CUT plugin against heap corruption vulnerability -* [Herve Drolon] fixed BMP plugin for images with a truncated input data stream -* [Herve Drolon] improved PCX format detection in FreeImage_GetFileType* functions -* [Christian Heimes] fixed a TIFF G4 compression bug occuring with gcc-Version 4.1.2 20080704 (Red Hat 4.1.2-50) - -January 24th, 2011 - 3.15.0 -! FreeImage now uses LibRaw 0.13-Beta3 -! FreeImage now uses LibPNG 1.4.5 -! FreeImage now uses LibTIFF 3.9.4 (CVS patch 2011-01-03) -! FreeImage now uses LibJPEG 8c -! FreeImage now uses OpenJPEG 1.4.0 (SVN patch 2011-01-18) -! [Herve Drolon] FreeImage_CloneMetadata now clone resolution info returned by FreeImage_GetDotsPerMeter(X / Y) -+ [Herve Drolon] added loading support for "half float" format to TIF plugin -+ [Herve Drolon] FreeImage_IsTransparent is now independant of FREE_IMAGE_TYPE -+ [Herve Drolon] added FIT_UINT16 to FIT_RGBF conversion to FreeImage_ConvertToRGBF & FreeImage_ConvertToType -+ [Herve Drolon] added FreeImage_ConvertToUINT16 and updated FreeImage_ConvertToType -+ [Mihail Naydenov] added FreeImage_GetThumbnail / FreeImage_SetThumbnail -+ [Mihail Naydenov] added thumbnail support to Exif, JPEG, EXR, PSD, TGA, TIF formats -+ [Mihail Naydenov] added JPEG_BASELINE save flag to the JPEG plugin -+ [Herve Drolon] added new Exif-TIFF tags (PageName, PageNumber, XPosition, YPosition) and Exif WinXP tags -+ [Herve Drolon] added support for 256x256 icon size to PluginICO:Save -* [Domingo Stephan] fixed a compilation error in TARGA plugin when using a big endian OS (OS X 10.6) -* [Christian Heimes] fixed a compilation error with gcc 4.3.x and OpenEXR -* [Eric Fruhinsholz] fixed a crash in JPEG plugin when reading a JPEG with corrupted XMP data -* [Herve Drolon] improved FreeImage_MultigridPoissonSolver for images whose size is a power-of-two -* [Herve Drolon] fixed a crash in PSD plugin when loading a PSD with a CMYK embedded thumbnail -* [Herve Drolon] fixed loading of JPEG images with a not null but zero length IPTC segment (bad files produced by Picasa) -* [Carsten Klein] fixed a bug in FreeImage_ColorQuantizeEx when using FIQ_WUQUANT quantizer -* [Herve Drolon] added support for RGBA[16][F] to FreeImage_IsTransparent -* [Herve Drolon] fixed loading of resolution info in TIFF CMYK images (bug introduced with 3.14.0) -* [Tom May] fixed JPEG plugin crashing on some Exif files containing tags with an invalid tag length -* [Herve Drolon] fixed a crash when loading TIFF images with a TIFFTAG_TRANSFERFUNCTION Exif tag -* [Tom May] removed assertions in PSD plugin, causing crashes on some malformed images in debug mode -* [Mihail Naydenov] fixed a crash in TIFF plugin when reading an uncommon 24-bit palettized file -* [Carsten Klein] fixed a bug in FreeImage_EnlargeCanvas when using the function as a FreeImage_Copy function -* [Herve Drolon] fixed a bug in PluginBMP with loading of OS/2 2.x palettized BMP -* [luispedro] fixed a bug in PluginBMP when reading malformed 16-bit RGB-555 BMP - -August 12th, 2010 - 3.14.1 -+ [Mihail Naydenov] added support for FIF_LOAD_NOPIXELS flag to EXR plugin -+ [Herve Drolon] added support for FIF_LOAD_NOPIXELS flag to CUT, HDR, RAS, ICO, PNM, RAW, BMP, PFM, XPM plugins -* [Eberhard Mattes] fixed memory allocation checking in multipage API -* [Herve Drolon] (compiler options) removed Win32 OpenMP support introduced in 3.14.0 - -August 9th, 2010 - 3.14.0 -! FreeImage now uses OpenEXR 1.7.0 -! FreeImage now uses ZLib 1.2.5 -! FreeImage now uses LibPNG 1.4.3 -! FreeImage now uses LibJPEG 8b -! FreeImage now uses LibTIFF 3.9.4 (CVS patch 2010-07-13) -! FreeImage now uses LibRaw 0.10-Beta3 -! FreeImage now uses OpenJPEG 1.4.0 (SVN patch 2010-04-16) -! [Herve Drolon] FreeImage_AllocateT now builds a default greyscale palette for 8-bit images -! [Volodymyr Goncharov] FreeImage_LoadMultiBitmapFromMemory now supports read/write operations -! [Herve Drolon] FreeImage_OpenMultiBitmapFromHandle now supports read/write operations -! [Herve Drolon] greyscale conversions now use the Rec. 709 formula -! [Mihail Naydenov] saving RGBF images to TIFF no longer use LogLuv encoding (unless you use the TIFF_LOGLUV save flag) -+ [Herve Drolon] added FIT_FLOAT to FIT_RGBF conversion to FreeImage_ConvertToRGBF & FreeImage_ConvertToType -+ [Herve Drolon] added VS 2008 project files -+ [Herve Drolon] added FreeImage_ConvertToFloat -+ [Mihail Naydenov] added RLE saving to the Targa plugin (see flag TARGA_SAVE_RLE) -+ [Volodymyr Goncharov] added FreeImage_SaveMultiBitmapToHandle -+ [Herve Drolon] added FreeImage_SaveMultiBitmapToMemory -+ [Herve Drolon] added new Exif maker note tags -+ [Lucian Sabo] added JPEG_OPTIMIZE to PluginJPEG:Save -+ [Mihail Naydenov] improved support for Exif tag reading in TIFF plugin -+ [Mihail Naydenov] allowed dataWindow with minimal bounds different from zero in OpenEXR plugin -+ [Herve Drolon] added FIMD_EXIF_RAW metadata model -+ [Herve Drolon] JPEG plugin can load & save raw Exif data (see FIMD_EXIF_RAW) -+ [Herve Drolon] added FIF_LOAD_NOPIXELS load flag constant - used to load header & metadata only -+ [Herve Drolon] added FreeImage_HasPixels -+ [Herve Drolon] added FreeImage_FIFSupportsNoPixels -+ [Herve Drolon] added support for FIF_LOAD_NOPIXELS flag to JPEG, PNG, PCD, PCX plugins -+ [Mihail Naydenov] added support for FIF_LOAD_NOPIXELS flag to TGA, PSD, TIFF plugins -+ [Mihail Naydenov] added support for 16-bit image types to FreeImage_Invert -+ [Mihail Naydenov] improved PSD plugin (faster code, added support for CMYK and LAB loading) + added load flags PSD_CMYK & PSD_LAB -+ [Mihail Naydenov] improved TIFF plugin (CMYK 16-bit loading and saving / RGBAF saving) + added TIFF_LOGLUV save flag -* [Herve Drolon] fixed FreeImage_GetFileType behavior with ANI file formats -* [Herve Drolon] fixed loading of JNG with progressive-JPEG formats -* [Mihail Naydenov] fixed loading of TGA with a corrupted rle count -* [Herve Drolon] fixed conversion formula in FreeImage_PreMultiplyWithAlpha -* [Christoph Brill] removed the use of libmng_data.h private API in MNG Plugin -* [phe02sf] fixed handling of bad Exif-GPS data in a Nikon D5000 image -* [Atsuhiro Igarashi] fixed handling of last data block in PluginGIF::Save (sometimes it saves corrupted images) -* [Christian Heimes] fixed saving of G3 & G4 compressed TIFF with 1bpp on 64bit Linux -* [Herve Drolon] fixed long data type being 64-bit on Unix/Linux platforms (use LONG/DWORD instead of long/unsigned long) -* [Herve Drolon] fixed a memory leak in FreeImage_DeletePage -* [Herve Drolon] fixed the loading of RGBZ images in OpenEXR plugin -* [Lucian Sabo] improved conversion from 1-, 4-, 8-bpp transparent images to 32-bpp -* [Roy F.] fixed a bug in FreeImage_EnlargeCanvas (unable to crop an image on the right) -* [Herve Drolon] fixed the loading of Exif with unusual IFD offset value -* [Eberhard Mattes] fixed page numbering info when saving multipage TIFF -* [Herve Drolon] fixed PluginPICT causing an infinite loop on a malformed PICT image -* [Eberhard Mattes] improved memory allocation checking when using the new operator -* [Herve Drolon] (multipage internals) fixed a potential buffer overflow in ReplaceExtension -* [Eberhard Mattes] improved error checking in FreeImage_CloseMultiBitmap - -December 22, 2009 - 3.13.1 -! FreeImage now uses libTIFF 3.9.2 -! FreeImage now uses OpenJPEG 1.3.0 (SVN patch 2009-11-05) -! FreeImage now uses libPNG 1.2.41 -+ [Berend Engelbrecht] added loading of Exif orientation tag in TIFF plugin -+ [Herve Drolon] added decoding support for the old and outdated JPEG-in-TIFF 6.0 format in TIFF plugin -+ [Herve Drolon] added new 'non standard' Exif tags -+ [Herve Drolon] added new Exif makernote tags -* [Herve Drolon] fixed TIF plugin crashing on a malformed TIFF-JPEG compressed image -* [Herve Drolon] fixed MNG plugin crashing on some old mng images -* [Herve Drolon] fixed handling of 2-bit grayscale transparent PNG -* [Herve Drolon] fixed a bug with the compression rate of JP2 and J2K encoders -* [zestony] fixed TIF plugin with the '65535 bytes' pitch size limitation on saving -* [Herve Drolon] fixed handling of PSD files with a non zero file header reserved member -* [Lucian Sabo] PNG plugin now keep transparency when saving 1- or 4-bit transparent images - -September 28th, 2009 - 3.13.0 -! FreeImage now uses LibJPEG 7 -! FreeImage now uses LibRaw-Lite 0.7.2 -! FreeImage now uses libPNG 1.2.40 -! FreeImage now uses libTIFF 3.9.1 -! FreeImage_RotateClassic is deprecated (use FreeImage_Rotate instead) -+ [Herve Drolon] added support for all Photoshop supported color modes to PSD plugin -+ [Herve Drolon] added support for 32-bit to JNG/MNG plugin -+ [Amir Ebrahimi] added loading support for the PICT format -+ [Herve Drolon] added loading support for camera RAW formats (using LibRawLite wrapper for dcraw) -+ [Mihail Naydenov] added UNICODE functions FreeImage_JPEGTransformU and FreeImage_JPEGCropU -+ [Carsten Klein] added FreeImage_OpenMultiBitmapFromHandle -+ [Carsten Klein] added FreeImage_FillBackground -+ [Carsten Klein] added FreeImage_EnlargeCanvas -+ [Carsten Klein] added FreeImage_AllocateEx / FreeImage_AllocateExT -+ [Mihail Naydenov/Herve Drolon] added FreeImage_TmoReinhard05Ex -+ [Herve Drolon] added FIT_RGBA16 to FIT_RGBF conversion to FreeImage_ConvertToRGBF -+ [Herve Drolon] added FreeImage_Rotate (support for most image types, support background color) -* [Christian Heimes] fixed function prototypes to use a void argument when no argument exist -* [Herve Drolon] fixed RGB color ordering on Intel macs -* [Herve Drolon] FreeImage_RotateClassic now keep transparency when applied to 8-bit images -* [Herve Drolon] fixed handling of transparency info in FreeImage_Copy -* [Herve Drolon] fixed a normalization error in FreeImage_GetAdjustColorsLookupTable -* [Herve Drolon] fixed invalid Exif rotation in PluginJPEG for orientation cases 2 and 4 -* [Mihail Naydenov / Carsten Klein] fixed compilation issues with MinGW32 -* [Mihail Naydenov] improved the loading speed of all targa images -* [Herve Drolon] FreeImage_TagToString now handles the Exif UserComment tag - -April 14th, 2009 - 3.12.0 -! FreeImage now uses libPNG 1.2.35 -! FreeImage now uses libTIFF 3.9.0beta (CVS patch 2009-02-12) -! FreeImage now uses OpenJPEG 1.3.0 (SVN patch 2008-08-21) -! [Herve Drolon] FreeImage_CloneMetadata no longer clone the FIMD_ANIMATION metadata (this was causing problems when saving to GIF format) -+ [Herve Drolon] added full support for the PFM format -+ [Herve Drolon] added JPEG_EXIFROTATE load flag to the JPEG plugin -+ [Herve Drolon] added 16-bit RGB(A) and float RGB(A)F support to FreeImage_GetChannel / FreeImage_SetChannel -+ [Herve Drolon] added src FIT_RGBA16 to dst 32-bit FIT_BITMAP conversion to FreeImage_ConvertToType -* [Carsten Klein] FreeImage_Copy now copies transparency info, resolution info, ICC profile and metadata -* [Carsten Klein] check for negative top/left values in FreeImage_Paste -* [Christian Heimes] changed exceptions with a "catch(char *text)" to a "catch(const char *text)" to make GCC 4.1 happy -* [Deif Lou] fixed a bug in FreeImage_SetTransparentIndex -* [Thomas Maiwald] BMP plugin: on saving, fixed correct setting of bfSize BMP file header for palettized images -* [Timothy Lee] fixed handling of frame disposal in GIF_PLAYBACK mode (GIF plugin) -* [Herve Drolon] fixed handling of Exif Olympus Type 2 maker notes (not yet supported but now safely ignored) -* [Rich Geldreich] fixed DXT1 color endpoint precision problem in DDS plugin -* [Mihail Naydenov] improved loading speed of 24-bit targa images -* [Eugene Golushkov] improved big endian / little endian swapping functions -* [Carsten Klein/Jean-Philippe Goerke] improved FreeImage_SetMetadata / FreeImage_GetMetadata accessors -* [Christian Ruppert] improved Linux Makefiles -* [Eugene Golushkov] fixed PluginBMP alignment bug while saving 16 or 24bit BMP on big endian or Apple machines - -July 28th, 2008 - 3.11.0 -! FreeImage now uses libTIFF 3.9.0beta (CVS patch 2008-05-24) -! FreeImage now uses OpenJPEG 1.3.0 (SVN patch 2008-05-22) -! FreeImage now uses libMNG 1.0.10 -! FreeImage now uses libPNG 1.2.29 -+ [Yves Schmid] added 48-bit RGB to 32-bit conversion support in FreeImage_ConvertTo32Bits -+ [Aaron Shumate] added RGB16-to-BITMAP and All-to-RGBF conversion support in FreeImage_ConvertToType -+ [Benjamin English] added a new OpenGL sample to FreeImage/Examples -+ [Lucian Sabo] added new compression flags to the PNG plugin -+ [Lucian Sabo] added new compression flags to the JPEG plugin (chroma subsampling options) -+ [Noam Gat] added support for SGI grayscale + alpha pics to SGI plugin -+ [Herve Drolon] added FreeImage_CloneMetadata -+ [Herve Drolon] added loading support for Windows Vista icons in ICO Plugin -+ [Herve Drolon] added loading and saving support for RGBF images to the TIF plugin (using the LogLuv codec) -* [Will Bryant] fixed makefile for MacOSX Tiger and Leopard -* [Maria Gullickson] fixed a 'divide by 0' error in PNM plugin and FreeImage_Rescale function -* [Yves Schmid] fixed a bug with Exif metadata reading in TIFF images -* [Herve Drolon] fixed some possible 64-bit portability issues with pointer calculations -* [wangyn] fixed a bug with transparency handling of indexed images in PNG plugin -* [Martin Dyring-Andersen] fixed a bug with GIFinfo structure initialization in GIF plugin -* [Noam Gat] fixed a bug in SGI plugin: when the file reports as two-dimensional, the height factor does not get loaded -* [Herve Drolon] added error messages in FreeImage_Load(U) / FreeImage_Save(U) in case of bad filenames -* [Scott Smith/Herve Drolon] added missing IPTC tags and renamed some tag names to be compatible with ExifTool naming convention -* [Martin Dyring-Andersen] fixed a crash problem with images containing exif data emitted by Picassa -* [Herve Drolon] removed RGBA to RGB transparent conversion in EXR plugin -* [Glenn Pierce] improved the speed of FreeImage_FlipHorizontal -* [Carsten Klein] fixed 65535 pixels width/height limitation in FreeImage_Paste - -November 19th, 2007 - 3.10.0 -! FreeImage now uses libTIFF 3.9.0beta (CVS patch 2007-10-05) -! FreeImage now uses OpenJPEG 1.2.0 (SVN patch 2007-07-13) -! FreeImage now uses OpenEXR 1.6.1 -! FreeImage now uses libPNG 1.2.23 -! FreeImage now hides its internal functions and internal libraries when compiled with gcc -- [Herve Drolon] removed VS C+ 6.0 project files : this IDE is no longer supported because of OpenEXR -+ [Herve Drolon] added VS 2005 project files -+ [Herve Drolon] added full support for the OpenEXR format -+ [Herve Drolon] added full support for the JPEG-2000 format -+ [Herve Drolon] added FreeImage_TmoFattal02 tone mapping operator -+ [Ryan Rubley] added support for RGB vs BGR regardless of endian -+ [Herve Drolon] added FreeImage_MultigridPoissonSolver -+ [Carsten Klein] added FreeImage_PreMultiplyWithAlpha -+ [Carsten Klein] added __stdcall version of FreeImage_OutputMessage -+ [Carsten Klein] added new palette and color manipulation functions (see below) : - added FreeImage_SetTransparentIndex - added FreeImage_GetTransparentIndex - added FreeImage_GetAdjustColorsLookupTable - added FreeImage_AdjustColors - added FreeImage_ApplyColorMapping - added FreeImage_SwapColors - added FreeImage_ApplyPaletteIndexMapping - added FreeImage_SwapPaletteIndices -* [Herve Drolon] fixed a bug in TIFF plugin when reading 8-bit + 8-bit alpha images -* [Herve Drolon] fixed a bug in TIFF plugin when reading images with uncommon bitdepths -* [rodrigo] fixed FreeImage exception handling under gcc (added -fexceptions to gcc compiler flags) -* [Martin Dyring-Andersen] fixed GIF plugin crashing on some corrupted files -* [Herve Drolon] fixed a bug with RLE encoding for 8-bit BMP images -* [Herve Drolon] fixed GPS metadata being skipped when reading metadata in Exif images -* [Herve Drolon] fixed a bug when reading OS/2 BMP images with a negative height -* [Ryan Rubley] fixed a bug with loading of GIFs with large amounts of solid color areas -* [Ryan Rubley] fixed OS X compile error in BitmapAccess.cpp -* [Herve Drolon] fixed a bug in FreeImage_Paste when pasting non-standard image types -* [Herve Drolon] saving 1-bit TIF with the TIFF_CCITTFAX3 flag is now compliant with the TIFF Class F specification -* [Carsten Klein] fixed topdown parameter in FreeImage_ConvertFromRawBits and FreeImage_ConvertToRawBits being handled in reverse -* [Herve Drolon] fixed a bug when reading some RLE-4 encoded BMP data -* [Carsten Klein] conversion from 1-bit to 32-bit now keep possibly present transparency - -February 11th, 2007 - 3.9.3 -! FreeImage now uses libPNG 1.2.16 -! [Ryan Rubley/Ryan Davis] reworked the MacOSX makefile in order to fully support Universal Binary builds of FreeImage -! [Herve Drolon] makefiles are now generated from VS2003 project files instead of VS6 project files -! [Herve Drolon] changed JPEG load/save flag option values -+ [Herve Drolon] added support for RGBAF images to FreeImage_ConvertToRGBF -+ [Herve Drolon] FreeImage_Paste now works with any bitmap type -+ [Herve Drolon] added full support for 64-bit RGBA images to the PNG and TIFF plugins -+ [Jascha Wetzel] added JPEG downsampling feature to PluginJPEG:Load -* [Thomas Chmielewski] fixed a bug in FreeImage_Dither and Bayer dithering, added FID_BAYER16x16 -* [Raphael Gaquer] greatly improved the speed of the GIF encoder -* [Herve Drolon] fixed saving of metadata in the PNG plugin -* [rampelstinskin] fixed transparency table to alpha channel conversion for 4-bit images in FreeImage_ConvertTo32Bits -* [Scott Smith] added missing IPTC tag named "Country/PrimaryLocationCode" -* [Herve Drolon] changed #include by #include in FreeImage.h (needed by Solaris 9) -* [Pierre Arnaud] fixed the use of FreeImage in low memory condition by checking some returned values of the malloc function -* [Pierre Arnaud] fixed TagLib::getTagFieldName not being thread safe - -October 30th, 2006 - 3.9.2 -! FreeImage now uses libTIFF 3.8.2 (with patch 2006-10-13) -+ [Herve Drolon] added full support for 16-bit greyscale and 48-bit RGB to the PNM plugin -+ [Herve Drolon] added IPTC writing support to JPEG & TIFF plugins -+ [Herve Drolon] added new Exif maker note tags -+ [Herve Drolon] added FreeImage_JPEGCrop -+ [Thorsten Radde] added support for 8-bit palettized bitmaps in FreeImage_RotateClassic -+ [Matt Rice] added automatic call to FreeImage_Initialise / FreeImage_DeInitialise when using FreeImage as a .so -+ [Martin Dyring-Andersen] added FreeImage_LoadMultiBitmapFromMemory to the multi-page API -+ [Herve Drolon] added support for tiled TIFF images -* [Carsten Klein] fixed a bug in FreeImage_SetMetadata occuring when deleting a tag -* [Herve Drolon] fixed a bug in PNG plugin when reading Macromedia 'false' PNG files -* [Thorsten Radde] added resolution support to PluginPSD -* [Ryan Rubley] fixed a bug in PluginGIF occuring with interlaced GIF -* [Ryan Rubley] fixed a bug in the multipage cache mechanism (internal FreeImage_FindBlock function) -* [Thorsten Radde] fixed a stack corruption in TIFF plugin occuring when reading exif tags -* [checkered] fixed a bug in the multipage cache mechanism causing VS2005 to crash on multipage files -* [Herve Drolon] fixed a bug with transparency support of 1- and 4-bit images -* [Roar Flolo] fixed a bug in PSD plugin when reading non compressed RGB images (alpha channel initialization) -* [Nicolas Hatier] fixed a bug in PluginGIF when using the GIF_PLAYBACK flag -* [Herve Drolon] fixed a bug in TIFF plugin when saving 8-bit images using LZW with differenciation -* [Herve Drolon] fixed 64-bit compilation issue with LibPNG and assembler code - -July 16th, 2006 - 3.9.1 -* [Ryan Rubley] fixed a bug in PluginGIF plugin causing FreeImage to crash on malformed GIF files - -July 6th, 2006 - 3.9.0 -! FreeImage now uses libPNG 1.2.12 -! FreeImage now uses libTIFF 3.8.2 (with patch 2006-06-24) -! FreeImage_Allocate/FreeImage_Allocate now set the resolution to 72 dpi instead of 0 -+ [Herve Drolon/Petr Pytelka] added a raw FAX G3 format loader -+ [Herve Drolon] added support for most image types to FreeImage_Rescale -+ [Herve Drolon] added FreeImage_MakeThumbnail -+ [Herve Drolon] added support for 64-bit images to FreeImage_ConvertTo32Bits -+ [Herve Drolon] added support for Exif tags to TIF plugin (read only) -+ [Herve Drolon] added FreeImage_ReadMemory -+ [Herve Drolon] added FreeImage_WriteMemory -+ [Herve Drolon] added new Exif maker note tags -+ [Sherman Wilcox] added a SGI file format loader -+ [Herve Drolon] added support for separated images to PluginTIFF -+ [Herve Drolon] added support for progressive-JPEG saving to PluginJPEG -* [Carsten Klein] FreeImage_Dither and FreeImage_Threshold now work with palettized 8-bit dib -* [Christophe Petit] fixed a bug in FreeImage_GetFIFFromFilenameU occuring with files without extension -* [Leigh Brasington] fixed a bug in PluginGIF causing FreeImage not working on Win/98/ME -* [Herve Drolon] fixed a bug in PluginTIFF with writing of JPEG-in-TIFF files -* [Jojakim Stahl] fixed a bug occuring with 4-bit PCX files -* [Sandor Szalacsi] fixed a bug in FreeImage_SetBackgroundColor (bkgnd clearing) -* [Petr Pytelka] fixed PluginTIFF::_tiffSizeProc failing on some images -* [Sherman Wilcox] fixed a bug in DDS plugin when loading images whose size is not a multiple of 4 -* [Sherman Wilcox] fixed a memory leak in PluginDDS::LoadDXT_Helper -* [Sherman Wilcox] fixed DDS plugin bad behavior with invalid DDS files (such as files with zero length) -* [Floris van den Berg] fixed a memory leak in the MultiPage cache mechanism -* [Herve Drolon] replaced WIN32 #define by _WIN32 #define as this is needed by VS2005 -* [Herve Drolon] fixed a VS2005 error in FreeImage_DeletePage -* [Petr Supina] fixed a pow(long,long) function not being standard ANSI C/C++ -* [Petr Supina] fixed FreeImage_FindBlock function not being standard ANSI C/C++ -* [Olaf Stoyke] added support for 64-bit Linux OS -* [Craig Stark] fixed FreeImage support on Intel based Mac OS -* [Herve Drolon] fixed PluginTIFF failing on bad fax tiff images (bad images are now loaded 'as is') -* [Zack Simpson] fixed a bug occuring in rare situations with FreeImage_Aligned_Malloc - -September 5, 2005 - 3.8.0 -! FreeImage now uses libTIFF 3.7.3 -! FreeImage now uses ZLib 1.2.3 -+ [Herve Drolon] added support for 48-bit images to FreeImage_ConvertTo24Bits -+ [Herve Drolon] added FreeImage_ConvertToGreyscale -+ [Herve Drolon] added support for 16-bit greyscale images to FreeImage_ConvertTo8Bits -+ [Petr Pytelka] added UNICODE functions (see below) - added FreeImage_LoadU - added FreeImage_SaveU - added FreeImage_GetFIFFromFilenameU - added FreeImage_GetFileTypeU -+ [Herve Drolon] FreeImage_Copy now works with any bitmap type -+ [Herve Drolon] added support for 1-bit images to FreeImage_Paste -* [Ryan Rubley] fixed PluginGIF failing to link on some broken gcc versions -* [Karl-Heinz Bussian] fixed a bug in LookupX11Color/LookupSVGColor with handling of grey color names -* [Herve Drolon] FreeImage_Dither now uses FreeImage_ConvertToGreyscale and handles 4/8-bit palletized images -* [Herve Drolon] FreeImage_Threshold now uses FreeImage_ConvertToGreyscale and handles 4/8-bit palletized images -* [Craig Hockenberry] fixed PluginGIF::Save swapping the byte order for the height on big endian machines (e.g. PPC on Mac OS X.) -* [Herve Drolon] fixed a bug in JPEG plugin when reading Exif maker notes from images produced by Nikon Editor -* [Herve Drolon] fixed a bug in BMP plugin when reading some malformed RLE8 bmp -* [Herve Drolon] fixed a bug in RAS plugin when loading 8-bit palettized images with less than 256 colors -* [Herve Drolon] fixed a bug in FreeImage_Rescale with 16-,48-,64-bit images -* [Herve Drolon] fixed a bug in the ICC profiles API when loading profile-less CMYK TIFF -* [Herve Drolon] 4-bit PNG are now loaded as 4-bit and no longer converted to 8-bit -* [Greg Ng] fixed a bug in FreeImage_ConvertToRGBF (FIT_BITMAP -> FIT_RGBF conversion) - -May 7, 2005 - 3.7.0 -! FreeImage now uses libTIFF 3.7.2 -! [Ryan Rubley] improved FreeImage_OpenMultiBitmap -+ [Detlev Vendt] added FreeImage_ZLibGUnzip -+ [Herve Drolon] added new image data types FIT_RGB16, FIT_RGBA16, FIT_RGBF, FIT_RGBAF -+ [Herve Drolon] FreeImage_FlipHorizontal & FreeImage_FlipVertical now work with any bitmap type -+ [Herve Drolon] added conversions to float and double in FreeImage_ConvertToType -+ [Herve Drolon] added FreeImage_ConvertToRGBF -+ [Herve Drolon] added support for 16-, 48- and 96-bit images to FreeImage_Rescale -+ [Ryan Rubley] added FreeImage_ColorQuantizeEx -+ [Ryan Rubley] added FIMD_ANIMATION and FIDT_PALETTE -+ [Ryan Rubley] added brand new PluginGIF with full animation multipage and metadata support -+ [Herve Drolon] added support for FIC_MINISWHITE 8-bit images to FreeImage_Rescale -+ [Herve Drolon] added HDR (High Dynamic Range) format (loader & writer) -+ [Herve Drolon] added support for 48-bit images in TIFF plugin -+ [Herve Drolon] added support for 48-bit images in PNG plugin -+ [Herve Drolon] added tone mapping operators (see below) -+ added FreeImage_ToneMapping -+ added FreeImage_TmoDrago03 -+ added FreeImage_TmoReinhard05 -+ [Petr Pytelka] added FreeImage_JPEGTransform -* [Herve Drolon] allowed loading of corrupted JPEG with a premature end of file -* [Herve Drolon] fixed a memory leak with loading of exif JPEG images -* [Detlev Vendt] changed some 'pointer-to-int' casts to 'pointer-to-long' for 64bit machines -* [Ryan Rubley] fixed a memory leak in the multipage API -* [Ryan Rubley] updated VB6 wrapper generation for new functions -* [Herve Drolon] fixed incorrect behavior when reading JPEG comments containing special characters -* [Herve Drolon] fixed incorrect behavior when reading JPEG ICC profiles with a size greater than 64 KB -* [Herve Drolon] fixed a bug in TIFF plugin when loading malformed multipage TIFF -* [Herve Drolon] fixed PluginTIFF not being thread safe - -February 20, 2005 - 3.6.1 -* [Ryan Rubley] fixed a memory leak in the metadata API -* [luedi] improved the robustness of FIBITMAP allocations - -February 13, 2005 - 3.6.0 -! FreeImage now uses libMNG 1.0.9 -! [Herve Drolon] improved the speed of FreeImage_Rescale -! [Herve Drolon] improved FreeImage_RotateClassic (more compact code, a little faster) -! [Herve Drolon] improved the metadata API using tag accessors -+ [Detlev Vendt] added LZW support to PluginGIF:Save -+ [Herve Drolon] added VS.Net 2003 project files -+ [Herve Drolon] added VERSIONINFO resource to the DLL -+ [Herve Drolon] added support for CMYK JPEG on loading -+ [Petr Supina] added 16-bytes alignment to FIBITMAP palette and pixels starting address -+ [Petr Supina] added support for MMX/SSE2 code in LibJPEG (based on Mozilla/Firefox code) -+ [Herve Drolon] added TIFF_JPEG compression flag to the TIFF plugin -+ [Detlev Vendt] added FreeImage_ZLibGZip -+ [Detlev Vendt] added FreeImage_ZLibCRC32 -* [Detlev Vendt] fixed PluginPNG not being thread safe -* [Herve Drolon] fixed compiler warning C4018 occuring with VS.Net 2003 - -December 29, 2004 - 3.5.3 -! FreeImage now uses ZLib 1.2.2 -! FreeImage now uses libPNG 1.2.8 -! FreeImage now uses libTIFF 3.7.1 -! [Herve Drolon] improved FreeImage_RotateClassic -! [Detlev Vendt] improved FreeImage_Rescale (more compact code, preserving 8-bpp colors) -+ [Herve Drolon] added support for transparency saving in ICO plugin -+ [Herve Drolon] added support for 1-bit images to FreeImage_RotateClassic -+ [Herve Drolon] added FreeImage_SetDotsPerMeterX and FreeImage_SetDotsPerMeterY -* [Nan Feng] fixed memory leak in FreeImage_DeleteTag (internal stuff) -* [Nigel Stewart] added conditional #pragma with #ifdef _MSC_VER / #endif -* [Herve Drolon] fixed the '65536 lines' limit on loading in PNM plugin - -November 27th, 2004 - 3.5.2 -* [Herve Drolon] fixed a second bug in FreeImage_Clone function - -November 26th, 2004 - 3.5.1 -+ [Riley McNiff] added FreeImage_ConvertTo4Bits -* [Herve Drolon] fixed a buffer overrun with some ILBM images -* [Riley McNiff] fixed a potential problem when reading TIFF resolution info -* [Dimitar Atanasov] fixed a bug in FreeImage_Clone function -* [Dimitar Atanasov] fixed several bugs in TIFF plugin - -November 1st, 2004 - 3.5.0 -! FreeImage now uses libPNG 1.2.7 -! FreeImage now uses libTIFF 3.7.0 -! FreeImage now uses libMNG 1.0.8 -! [Herve Drolon] improved TIFF LZW compression using a predictor -! [Detlev Vendt] FreeImagesPlus: corrected references to FreeImage.h and FreeImage.lib -+ [Herve Drolon] added support for loading/saving of 8-bit transparent TIFF -+ [Riley McNiff] added support for 4-bit dib in FreeImage_Paste -+ [Herve Drolon] added support for memory IO streams (see below) -+ added FreeImage_OpenMemory -+ added FreeImage_CloseMemory -+ added FreeImage_LoadFromMemory -+ added FreeImage_SaveToMemory -+ added FreeImage_TellMemory -+ added FreeImage_SeekMemory -+ added FreeImage_AcquireMemory -+ added FreeImage_GetFileTypeFromMemory -+ [Petr Pytelka] added FreeImage_GetFIFMimeType to the plugins function list -+ [Herve Drolon] added ICC profile support to JPEG plugin -+ [Herve Drolon] added support for metadata (see below) -+ added FreeImage_SetMetadata -+ added FreeImage_GetMetadata -+ added FreeImage_GetMetadataCount -+ added FreeImage_TagToString -+ added FreeImage_FindFirstMetadata -+ added FreeImage_FindNextMetadata -+ added FreeImage_FindCloseMetadata -* [Riley McNiff] fixed a bug with FreeImage_SetPixelIndex and 4-bit images -* [Petr Pytelka] fixed returned value in FreeImage_CloseMultiBitmap -* [Petr Pytelka] fixed index of new page in FreeImage_InsertPage -* [Aaron Shumate] fixed a minor bug in PNG plugin -* [Aaron Shumate] fixed a bug in IFF plugin (odd-length chunks) -* [Rupert Hewitt] fixed FreeImage not compiling on National Instruments Cvi Ccompiler -* [Herve Drolon] fixed a bug in IFF plugin (ILBM data) -* [Fred Harju] added a Makefile for Solaris 9 -* [Roddy Pratt] fixed FreeImage not linking under Borland C++ Builder -* [Vadim Alexandrov] fixed a memory leak in the multipage API -* [Herve Drolon] fixed a bug with DDS plugin behaviour on Big Endian OS -* [Herve Drolon] fixed a bug with conversion of JPEG resolution info on saving - -July 8th, 2004 - 3.4.0 -! [Jim Keir] improved FreeImage_FlipVertical function -! [Herve Drolon] LZW compression is now enabled in FreeImage -+ [Karl-Heinz Bussian] added constants to FreeImage.h to get at compile time the library version -+ [Karl-Heinz Bussian] added color lookup functions for X11 and SVG -+ [Herve Drolon] added TIFF tags TIFF_CCITTFAX3, TIFF_CCITTFAX4 and TIFF_LZW -+ [Detlev Vendt] added support for CMYK TIFF files with alpha channel -+ [Detlev Vendt] added (re-introduction of) PluginGIF -* [Herve Drolon] fixed a bug with loading of FAX TIFF images (introduced with LibTIFF 3.6.1) -* [Herve Drolon] fixed a bug in Floyd-Steinberg dithering algorithm -* [Herve Drolon] fixed a bug in Targa plugin save function -* [Herve Drolon] fixed a bug in FreeImage_AdjustCurve function -* [Ryan Rubley] fixed a bug with FreeImage_Rescale's filters accuracy -* [Ryan Rubley] fixed a bug in NN quantizer -* [Herve Drolon] fixed a bug with TIFF files containing additional Photoshop alpha channels -* [James Rossfeld] fixed a memory leak with some PSD images -* [Herve Drolon] fixed a bug with saving of 32-bit non transparent PNG images -* [Alexandr Zamaraev] fixed FreeImage not compiling with mingw32 -* [Herve Drolon] fixed FreeImage not compiling with VC.NET (pow function needs casts) - -May 2, 2004 - 3.3.0 -! [Ryan Rubley] FreeImage has been ported to MacOSX and should also work on other big endian processors -+ [Ryan Rubley] rewrote XPM plugin (better load support) and added save support -+ [Ryan Rubley] added ICO_MAKEALPHA flag to ICO plugin -+ [Ryan Rubley] Set/GetPixelColor now works with 16-bit pixels (555 or 565) -+ [Herve Drolon] PNG plugin now supports loading and saving of unsigned 16-bit greyscale images -* [Herve Drolon] fixed a bug with loading of 8-bit and 16-bit PNG with a 8-bit alpha channel -* [Herve Drolon] fixed a bug in NN quantizer algorithm with handling of 4-byte boundary alignment. -* [Herve Drolon] fixed a bug in PluginIFF Validate function -* [Herve Drolon] fixed a minor design issue in FreeImage_GetFIFFromFormat -* [Brad Schick] fixed some compiler warnings with VC++ 7.1 -* [Herve Drolon] fixed a bug with saving of 8-bit palettized images to 24-bit JPEG (channel inversion) - -March 16, 2004 - 3.2.1 -! [Volker Grtner] improved the DDS plugin -! [Herve Drolon] FreeImage_Rescale now works on 8-, 24- and 32-bit images -! [Herve Drolon] FreeImage_Copy now works on 1-, 4-, 8-, 16-, 24- and 32-bit images -* [Floris van den Berg] fixed a bug in the MultiPage cache mechanism -* [Herve Drolon] fixed a bug with loading/saving of 8-bit transparent tga images -* [Herve Drolon] fixed a bug with loading of 1-bit TIFF (introduced with LibTIFF 3.6.1) - -February 18, 2004 - 3.2.0 -! FreeImage now uses libTIFF 3.6.1 -+ [Herve Drolon] added FreeImage_HasBackgroundColor -+ [Herve Drolon] added FreeImage_GetBackgroundColor -+ [Herve Drolon] added FreeImage_SetBackgroundColor -+ [Herve Drolon] added FreeImage_Composite -+ [Herve Drolon] added ICC profile support to PNG plugin -+ [Herve Drolon] added background color support to PNG plugin -+ [Volker Grtner] added support for DDS format (loader) -* [Steve Johnson] improved FreeImage_OpenMultiBitmap/FreeImage_CloseMultiBitmap -* [Steve Johnson] fixed a bug in FreeImage_InsertPage -* [Herve Drolon] fixed a bug with JPEG compressed TIFF (red/blue swapping) -* [Herve Drolon] fixed a bug in PluginTarga where 8-bit images were saved incorrectly - -January 26, 2004 - 3.1.0 -! FreeImage now uses ZLib 1.2.1 -+ [Herve Drolon] added support for integer, real and complex image types (see below) -+ added FREE_IMAGE_TYPE enum -+ added FreeImage_AllocateT -+ added FreeImage_GetImageType -+ added FreeImage_FIFSupportsExportType -+ added FreeImage_ConvertToStandardType -+ added FreeImage_ConvertToType -+ added load/save support of all image types to TIFF plugin -+ [Peter Lemmens] added a Validate function to TARGA plugin -+ [Herve Drolon] added FreeImage_GetPixelIndex / FreeImage_SetPixelIndex -+ [Herve Drolon] added FreeImage_GetPixelColor / FreeImage_SetPixelColor -+ [Herve Drolon] added FreeImage_GetComplexChannel / FreeImage_SetComplexChannel -* [Serge Ivanchenko] TIFF_DEFLATE compression is now enabled in TIFF plugin -* [Herve Drolon] fixed a bug in NeuQuant color reduction algorithm - -November 16, 2003 - 3.0.4 -* [Tobias Persson] fixed FreeImage_GetChannel not working with FICC_ALPHA channel -* [Detlev Vendt] fixed a minor bug with PNG plugin and PNG_IGNOREGAMMA flag -* [Detlev Vendt] fixed a memory leak in PNG plugin save routine -* [Detlev Vendt] fixed JPEG validation problem with .jpe files -* [Ryan Rubley] added Source/LibTIFF/tif_extension.c to LibTIFF (needed for MacOSX) -* [Herve Drolon] improved error handling in TIFF plugin -+ [Karl-Heinz Bussian] added FreeImage_IsLittleEndian -+ [Karl-Heinz Bussian] added JPEG save support for 8-bit miniswhite bitmaps (transparent conversion to minisblack) -+ [Karl-Heinz Bussian] FreeImage_GetColorType now recognizes 8-bit FIC_MINISWHITE images -! [Herve Drolon] FreeImage_Rescale now supports rescaling of 32-bit images with alpha channel -! [Herve Drolon] FreeImage_Invert now supports inversion of 32-bit images with alpha channel -! [Herve Drolon] FreeImage_AdjustCurve now supports working with FICC_ALPHA channel - -November 2, 2003 - 3.0.3 -* [Ryan Rubley] improved makefile for Linux -* [Ryan Rubley] fixed FreeImage not compiling under MacOSX -* [Detlev Vendt] fixed still present inconsistancy with 32bpp transparency handling -* [Herve Drolon] fixed incorrect loading of 4-bit greyscale images in TIFF plugin - -October 27, 2003 - 3.0.2 -! FreeImage now uses libMNG 1.0.6 -* [Herve Drolon] fixed a boolean test in PluginCUT returning always false -* [Herve Drolon] fixed a warning in PluginIFF generated with g++ -* [Linus Tan] fixed a bug in FreeImage_Copy -* [Herve Drolon] fixed FreeImage not compiling under Linux (thanks to Michal) - -October 20, 2003 - 3.0.1 - -! FreeImage now uses libTIFF 3.6.0 -* [Detlev Vendt] fixed incorrect definition of the FREE_IMAGE_FORMAT enum -* [Detlev Vendt] fixed a potential crash problem with Load / Save routines -* [Herve Drolon] fixed incorrect loading of 16-bit greyscale images in TIFF plugin -* [Dennis Lim] fixed a memory leak in Floyd & Steinberg dithering routine -* [Herve Drolon] fixed a bug in BMP loader (incorrect loading of RLE4 bmp) -* [Detlev Vendt] fixed some inconsistancy with 32bpp transparency handling -+ [David Boland] added a C# wrapper -// Linux compatibility issues -- [Michal Novotny] removed the round function in Utilities.h -! [Herve Drolon] replaced the round routine by the clamp routine in PluginPCD -+ [Herve Drolon] added _itoa version in Utilities.h -* [Michal Novotny] fixed untyped consts not accepted by g++ in PluginBMP - -September 8, 2003 - 3.0.0 -- [Herve Drolon] removed deprecated functions -- [Herve Drolon] removed deprecated flags (TARGA_LOAD_RGB555, ICO_*, except ICO_DEFAULT) -- [Herve Drolon] removed the FreeImage pointer table (internal stuff) -+ [Herve Drolon] added a C++ wrapper -+ [Herve Drolon] added the FreeImage Toolkit (see below) -+ added FreeImage_Rescale -+ added FreeImage_RotateClassic -+ added FreeImage_RotateEx -+ added FreeImage_FlipHorizontal -+ added FreeImage_FlipVertical -+ added FreeImage_Invert -+ added FreeImage_AdjustCurve -+ added FreeImage_AdjustGamma -+ added FreeImage_AdjustBrightness -+ added FreeImage_AdjustContrast -+ added FreeImage_GetHistogram -+ added FreeImage_GetChannel -+ added FreeImage_SetChannel -+ added FreeImage_Copy -+ added FreeImage_Paste -+ [Karl-Heinz Bussian] added XPM loader -+ [Karl-Heinz Bussian] added flags parameter to FreeImage_CloseMultiBitmap -+ [Karl-Heinz Bussian] added JPEG save support for 8-bit palettized bitmaps (transparent conversion to 24-bit) -+ [Herve Drolon] added interface to ZLib compression functions -+ [Herve Drolon] added ICO format to the multipage API (loader & writer) -+ [Herve Drolon] added a MIME type to all plugins -* [Karl-Heinz Bussian] fixed incorrect conversion from 1-bit FIC_MINISWHITE bitmaps to 8-bit -* [Herve Drolon] fixed a bug in FreeImage_CloseMultiBitmap -* [Herve Drolon] fixed a potential memory leak in conversion functions (8-, 24-, 32-bit) -* [Robert Walker] fixed incorrect conversion from 16-bit to 24-bit and 16-bit to 32-bit -* [blurble] fixed TIFF validate signature problem (3DS files were recognized as TIFF) -* [Kurt Jankowski-Tepe] fixed FreeImage not compiling on MinGW / LCC WIN32 -* [Jani Peltonen] fixed bug in PluginTARGA where 32-bit bitmaps are not always correctly flipped -* [Detlev Vendt] fixed a bug with TIFF (memory leak with ICC profiles) - -May 25, 2003 - 2.6.1 -+ [Detlev Vendt] added FIC_CMYK to FREE_IMAGE_COLOR_TYPE -+ [Detlev Vendt] added ICC profile support to the library (see below) -+ added FreeImage_GetICCProfile -+ added FreeImage_CreateICCProfile -+ added FreeImage_DestroyICCProfile -+ added FIICCPROFILE & FIICCPROFILE flags -+ added plugin function FreeImage_FIFSupportsICCProfiles -+ [Detlev Vendt] added ICC profile support for TIFF -+ [Herve Drolon] added XBM (X11 Bitmap Format) support : loading -* [Herve Drolon] fixed incorrect IFF file detection (thanks Floris) -* [Herve Drolon] fixed incorrect conversion from 1/4-bit greyscale bitmaps to 8-bit -* [Herve Drolon] fixed a bug in TIFF writer when saving 1,4,8 bit dib (introduced in 2.6.0, sorry) -* [Herve Drolon] fixed a palette problem in TIFF loader when loading 1-bit b & w images -* [Herve Drolon] improved FreeImage_Dither to handle any bitdepth - -May 5th, 2003 - 2.6.0 -! FreeImage now uses libPNG 1.2.5 -! FreeImage now uses libMNG 1.0.5 -! [Markus Loibl] ActiveX wrapper is now distributed in a separate release (since 2.5.5) -! [Herve Drolon] the function FreeImage_Free is now deprecated : use FreeImage_Unload instead -! [Herve Drolon] updated the generic samples and removed deprecated functions -+ [Detlev Vendt] added CMYK support to TIFF save function -+ [Detlev Vendt] added TIFF_SAVE_CMYK flag constant -+ [Detlev Vendt] added 32-bit support (with transparency handling) to TIFF plugin -+ [Herve Drolon] added FreeImage_Threshold -+ [Herve Drolon] added FreeImage_Dither -+ [Herve Drolon] added FREE_IMAGE_DITHER parameter to FreeImage_Dither -* [Herve Drolon] improved error handling in PluginMNG -* [Herve Drolon] improved TIFF flags handling in TIFF save function -* [Herve Drolon] fixed a potential crash-problem in FreeImage_OutputMessage (in case of a null message) -* [Detlev Vendt] fixed a bug with the deprecated FreeImage_GetBitsRowCol (trailling backslash behind the DEPRECATE macro) - -July 24th, 2002 - 2.5.5 -! FreeImage now uses libPNG 1.2.4 -! FreeImage now uses libMNG 1.0.4 -+ [Markus Loibl] added ActiveX wrapper - -June 22th, 2002 - 2.5.4 -* [Timothy Roughton] fixed FreeImage not compiling on LCC WIN32 -* [Markus Loibl] fixed PluginTIFF sometimes saving with wrong X/Y resolution -* fixed crashbug when loading some RLE4 BMPs -! FreeImage now uses LibPNG 1.2.3 -! [Markus Loibl] improved startup plugin locate handling code -! [Gerhard Gruber] made some changes so that FreeImage compiles on VC5 -+ [Markus Loibl] added flags TIFF_PACKBITS, TIFF_DEFLATE, TIFF_ADOBE_DEFLATE and TIFF_NONE - -May 21th, 2002 - 2.5.3 -* fixed wrong colors when loading 16-bit grayscale TIFF -* fixed crash-problem with FreeImageQt -* fixed PluginTIFF saving some bitmaps flipped vertically -* [Laurent Rocher] fixed bug in FreeImage_GetLockedPageNumbers -* [Laurent Rocher] fixed bug in FreeImage_UnlockPage -! FreeImage now uses libpng 1.2.2 -+ added TARGA save support -+ added BMP RLE8 save support - -March 30th, 2002 - 2.5.2 -* fixed bug in PluginTARGA where 32-bit bitmaps are not always correctly flipped -* fixed FreeImage_GetLockedPageNumber being mentioned in FreeImage.h -* fixed crash bug when handling read-only multipage bitmaps -- removed internal function FreeImage_GetExtraDataPointer -! FreeImage now uses zlib 1.1.4 -+ added function FreeImage_GetLockedPageNumbers - -March 2nd 2002 - 2.5.1 -* fixed pluginTIFF not being able to save 32-bit bitmaps -* fixed not being able to save PNM bitmaps through the LoadXXX wrappers -* fixed a webcam generated BMP image being loaded with wrong colors -! FI_ReadProc, FI_WriteProc, etc. do now carry the DLL_CALLCONV flag -! the function FreeImage_GetBitsRowCol is now deprecated -! FreeImage_SetTransparencyTable now taken an integer as count parameter -! FreeImage_IsTransparent now always returns true for 32-bit bitmaps -! PluginPNG::Save now ignores the result of FreeImage_IsTransparent -! PluginTIFF now converts all 32-bit bitmaps to 24-bit, until our patch - to fully support alpha in TIFF is applied in libtiff -+ added full multi-paging support -+ added octal and hexadecimal number support to FreeImage_OutputMessage - -January 3rd 2002 - 2.5.0 -* fixed bug in FreeImage_SaveJPEG -* fixed bug in FreeImage_LoadMNG -* fixed bug in FreeImage_LoadPNG -* fixed small Visual C++ 5.0 compiler issue in PluginMNG.cpp -* fixed FreeImage crashing on JPEG 6.0 encoded TIFFs -! FreeImage now uses libTIFF 3.5.7 -! FreeImage now uses libPNG 1.2.1 -! all the FreeImage_LoadXXX and FreeImage_SaveXXX functions are now deprecated -+ added Dr. Halo (*.cut) support -+ added printf-like format string support to SetOutputMessage -+ added basic multi-paging support: open, close, counting and grabbing -+ added deprecation manager -+ added FreeImage_Clone function - -October 3rd 2001 - 2.4.2 -* fixed missing BI_BITFIELDS support for 32-bit BMPs -* fixed bug in FreeImage_ConvertLine16_555_To16_565 and vice versa -* fixed bug in FreeImage_ConvertToRawBits -* fixed PluginTIFF behaving incorrectly on PHOTOMETRIC_MASK images -* fixed 16 bit TIFFs not loading correctly -* fixed incorrect handling of CCITTFAX3 and CCITTFAX4 TIFFs -* fixed JPEG encoded TIFFs not being supported -! [Yours Detlev] patched libTIFF to handle EXTRASAMPLE_UNSPECIFIED -! [Juergen Riecker] improved speed of PCX loading a lot -! rewrote parts of FreeImage to improve support for c -! the internal RGB555 and RGB565 macros now read BGR instead of RGB -! FreeImage now uses libMNG 1.0.3 -! FreeImage now uses libPNG 1.2.0 -! FreeImage_Save now opens files with the "w+b" flag -! renamed internal macro CalculateUsedColors to CalculateUsedPaletteEntries -! enabling/disabling plugins no longer has effect on FIFSupportsReading -! enabling/disabling plugins no longer has effect on FIFSupportsWriting -+ added flag PNG_IGNOREGAMMA -+ added function FreeImage_FIFSupportsExportBPP - -July 30th 2001 - 2.4.1 -* [Jan Nauta] fixed some plugin ids not being passed to plugins -* [Jan Nauta] fixed some functions being natively called instead of indirect -* [Jan Nauta] fixed BMPs with signature BA not being regognised -* [Remo Eichenberger] fixed memory leak in the plugin system -* fixed seek bug in PluginIFF's Validate -* fixed transparency issue in PluginPNG -* fixed uncaught exceptions in WUQuantizer and NNQuantizer -* fixed some problems with PluginTARGA -* fixed some problems with PluginICO -* fixed some problems with PluginBMP -! improved FreeImageQt's load function a little -! tell/seek control for validation is now handled inside the plugin framework - -July 22th 2001 - 2.4.0 -* (Yours Detlev) fixed memory leak in FreeImage_GetFIFFromFilename -* (Yours Detlev) fixed memory leak in the ICO plugin -* (Yours Detlev) fixed memory leak in the PNG plugin -* fixed potential NULL-pointer access bug in Plugin::AddNode -* fixed problems with linking the static lib -- removed LBM plugin. Its functionality is placed in the IFF plugin now -- removed FreeImage_GetFIFByIndex -! FreeImage now uses LibMNG 1.0.2 -! FreeImage_SetTransparent now only enables alpha when the bitmap is 8 or 32 bit -! FreeImage_SetTransparencyTable now only enables alpha when the bitmap is 8 bit -! FreeImage_LoadLBM now uses Mark Sibly's IFF plugin -! FreeImage_SaveBMP now converts to 24-bit when bpp is 32 and transparency is off -! FreeImage_SaveJPEG now converts to 24-bit when bpp is 32 and transparency is off -! FreeImage_SavePNM now converts to 24-bit when bpp is 32 and transparency is off -! FreeImage_SaveTIFF now converts to 24-bit when bpp is 32 and transparency is off -+ [Mark Sibly] added IFF (ILBM) support -+ added basic support for Photoshop files -+ added mime type support (FreeImage_GetFIFFromMime) -+ added functions FreeImage_SetPluginEnabled and FreeImage_IsPluginEnabled - Disabling plugins modifies the behaviour of the following functions: - * FreeImage_LoadFromHandle - * FreeImage_SaveToHandle - * FreeImage_FIFSupportsReading - * FreeImage_FIFSupportsWriting - * FreeImage_GetFIFFromFormat - * FreeImage_GetFIFFromFilename - * FreeImage_GetFIFFromMime - * FreeImage_Validate - -June 30th 2001 - 2.3.2 -* fixed missing "targa" extension in targa extension list -* fixed small memory leak in PluginList::AddNode -* fixed 32 bit PNG saving suddenly disappeared from the distro? -* fixed 'black line' bug in LoadTARGA -- removed project FreeImageM2 -- removed FreeImage_Combine -! FreeImage_RegisterLocalPlugin now receives a FI_InitProc as first parameter -! FreeImage_GetFIFFromFilename now also takes the format id into account -! cleanup up the code a little for PluginPCD and PluginPCX -+ added static lib project - -June 11th 2001 - 2.3.1 -* [Machiel ten Brinke] fixed the loading of some 'ancient' TARGAs -* [Rui Lopes] fixed some bugs in the external plugin registration -* fixed the plugin system crashing when the init function isn't called -- removed project FreeImagePy -- removed 32 to 24 bit conversion while saving PNG in FreeImageQt -! the scanline convert functions are now accessable in plugins -! FreeImage now uses an STL map to store the plugin list -! PluginSDK.h is now integrated into FreeImage.h -! FreeImage_Register now receives the boolean parameter 'load_local_plugins_only' -! FreeImage now uses LibPNG 1.0.12 -+ [Rui Lopes] added plugin for GIF reading/writing support -+ added function FreeImage_SetTransparencyCount -+ added support for 32 bit PNG saving -+ added FreeImage_RegisterLocalPlugin to allow plugins inside apps -+ added FreeImage_RegisterExternalPlugin to manually load DLLs -+ added plugin for JBIG reading/writing support - -May 4th 2001 - 2.3.0 -* [Martin Weber] fixed some small bugs in the TARGA and BMP plugins -* [Martin Weber] fixed tiny bug in new 16 bit conversions -* [Martin Weber] fixed load flag inconsistency in the TARGA plugin -* [Martin Weber] fixed plugin id / load reference inconsistency for PNM -* [Jan Nauta] fixed bug in conversion 16 -> 16 -* [Herve Drolon] fixed small bug in 4-bit PCX loader -- removed code that loads BMPs renamed to ICO in PluginICO -! the flag TARGA_LOAD_RGB555 is now obsolete -! the plugin list is now sorted internally -! ConvertTo32Bits now stores the transparency table as alpha mask -! FreeImage now uses LibMNG 1.0,1 -! FreeImage now uses LibPNG 1.0.11 -+ added external plugin support via DLLs -+ added function FreeImage_GetFIFByIndex -+ added internal function CalculateScanLine -+ added transparency support for high-color PNGs -+ added transparency support for high-color TIFFs -+ added functions FreeImage_SetTransparent and FreeImage_IsTransparent -+ added constant FIC_RGBALPHA to FREE_IMAGE_COLOR_TYPE - -April 5th 2001 - 2.2.0 -* [Remo Eichenberger] fixed small bug concerning DLLMain and static LIB generation -* fixed 1-bit bitmaps not properly loading in FreeImageQt -* fixed bug in conversion 16->16 -* FreeImage now uses LibPNG 1.0.10 -! [Martin Weber] improved loading of BMP files -! [Martin Weber] improved loading of TARGA files -! [Dave Larson] improved visual appearance after 16 conversions -! FreeImageQt now converts 32-bit bitmaps to 24-bit when saving PNGs and JPEGs -+ added functions FreeImage_Initialise and FreeImage_DeInitialise -+ added internal plugins -+ re-added combine/alphablend functions - -March 8th 2001 - 2.1.0 -* [Martin Hemming] fixed bug in 16-bit TARGA loading code -* fixed PNG's with alpha masks not loading correctly -! FreeImage is now dual-licensed: the FI-License and the GPL license -! FreeImage now uses LibPNG 1.0.9 -! FreeImage now uses LibTIFF 3.5.6 Beta -! FreeImage now uses LiBMNG 1.0.0 -! changed the ordering of the FREE_IMAGE_FORMAT table -! improved linux support -! improved test script -+ added transparency table support to SavePNG -+ added BI_BITFIELDS support to LoadBMP and SaveBMP -+ added reading support for OS/2 2.x BMPs -+ added support for MNG and JNG reading using LibMNG -+ added support for Deluxe Paint reading -+ added 'hot swap' support to the Core DLL -+ added 'hot swap' support to FreeImage Qt -+ added functions GetFIFFromFormat and GetFIFFromFilename -+ added functions FIFSupportsReading and FIFSupportsWriting -+ added function GetFIFRegExpr - -January 14th 2001 - 2.0.0 -* [Herve Drolon] fixed a bug in the conversion 4->8 -* [Herve Drolon] fixed a bug in metrics handling in SaveJPEG -* [Herve Drolon] fixed a bug in the return value of the function SaveTIFF -* fixed the presence of two WuQuantizer.cpp files in the distribution -* fixed bug where a BMP renamed to ICO isn't loaded -- removed FreeImage_ConvertToGreyScale. Use FreeImage_ConvertTo8Bits instead. -- removed the boolean parameters from all conversion routines -- removed page handling in LoadTIFF. A new range of functions will be added. -! The void pointers used in FreeImage are now typed -! LoadBMP now takes palettes in 24/32 bit images in respect -! All effects and MMX functions are now stored in a new library (FreeEffects) -! [Herve Drolon] fixed bug in FreeImage_GetColorType -! [Herve Drolon] improved PCX loader. It can now read 1, 4, 8 and 24-bit images -! [Manfred Tausch] improved FreeImage_Rotate -! [Luca Piergentili] fixed crash bug when saving some 1-bit TIFFs -! rewrote all bitdepth conversion routines making use of the new scanline converters -! rewrote bitdepth conversion in FreeImageQt (uses less memory) -! FreeImage is now compiled __stdcall -+ [Herve Drolon] added WBMP (Wireless Bitmap Format) support: loading and saving -+ [Herve Drolon] added 4, 16 and 32 bitdepth handling in GetColorType -+ [Herve Drolon] added handling of 8-bit greyscale bitmaps in SaveJPEG -+ [Herve Drolon] added NeuQuant color reduction algorithm to ColorQuantize -+ added DLL_CALLCONV (calling convention) flag -+ added bitmask support to all bitmaps -+ added a series of functions converting scanlines from one bitdepth to another -+ added functions ConvertFromRawBits and ConvertToRawBits -+ added project FreeImageM2: Magenta II MMT bindings for FreeImage -+ added basic foundation for linux support - -December 2th 2000 - 1.4.4 -* fixed small bug related to TIFFSetDirectory in FreeImage_LoadTIFF -* fixed FreeImage_Rotate sometimes clipping too much pixels -* fixed other small bug in FreeImage_Rotate -* fixed FreeImage_Clone not taking the FREEIMAGEHEADER in account -* fixed bug in FreeImageQt where 1-bit images are not correctly allocated -* fixed FreeImage_Crop not copying the palette -* fixed message function pointer crash bug -* fixed bug where the palette wasn't copied when saving in FreeImageQt -* fixed FreeImage_Clone not copying the transparency table -- removed FreeImage_WritePaletteEntry -! [Adam Gates] rewrote parts of FreeImage so that c compilers can handle it better -! FreeImageQt doesn't statically link with the FreeImage lib anymore -! FreeImageQt now uses atexit() to automatically unregister -! rewrote parts of FreeImage_LoadBMP to increase speed -+ [Markus Loibl] added metrics handling code to LoadBMP, LoadJPEG, LoadTIFF and LoadPCX -+ added metrics handling code to FreeImageQt -+ added functions FIQT_IsLoaded, FIQT_GetVersion and FIQT_GetCopyrightMessage -+ added conversion 1 -> 16 -+ added FreeImage_SaveJPEG and JPEG quality settings -+ added FreeImage_GetBitsRowCol -+ added function FIQT_SetOutputMessage to FreeImageQt -+ added FreeImage_GetFileTypeFromExtension and FIQT_GetFileTypeFromFormat -+ added project FreeImagePy: python bindings for FreeImage - -November 7th 2000 - 1.4.3 -* fixed FreeImage_SavePNG crash bug -* fixed slighly corrupt size filter in FreeImage_Combine -* fixed FreeImage_SaveTIFF not saving 4-bit images -* [Herve Drolon] fixed bug in FreeImage_LoadTIFF -* [Herve Drolon] fixed bug in FreeImage_GetColorType -- removed fclose from FreeImage_SavePNM (who put it there?) -! rewrote FreeImage_Rotate -! FreeImageQt now automatically detects which formats are supported by Qt and which not -! FreeImage_Allocate now returns a void pointer -! FreeImage_Unload is now called FreeImage_Free -+ added 16-bit 5-5-5 support to FreeImage_LoadBMP -+ added RLE_DELTA support to FreeImage_LoadBMP -+ added directory support to FreeImage_LoadTIFF -+ added functions dealing with transparency -+ added transparency support to 8-bit PNG's in Qt -+ added FREE_IMAGE_QUANTIZE parameter to FreeImage_ColorQuantize -+ added custom FREEIMAGEHEADER header prepended to internal bitmaps -+ added new documentation - -October 18th 2000 - 1.4.2 -* fixed FreeImage_SaveBMP storing an incorrect bfSize value in the BITMAPFILEHEADER -* fixed bug where JPEG and PNG wouldn't load in FreeImageQt -* fixed FreeImage_Mirror mirroring one pixel less than needed -! FreeImage_MaskedCombine24 is now called FreeImage_MaskedCombine24Ex -! FreeImage_MaskedCombine32 is now called FreeImage_MaskedCombine32Ex -+ added 16-bit bitmap support to FreeImage_Mirror -+ added 16-bit bitmap support to FreeImage_ConvertTo8Bits -+ added simple version of FreeImage_MaskedCombine24 -+ added simple version of FreeImage_MaskedCombine32 - -October 17th 2000 - 1.4.1 -* [Herve Drolon] fixed bug in FreeImage_ConvertTo8Bits -* fixed bug in conversion with 16 -> 24 and 16 -> 32 -- removed static library support -- removed all unnecessary files from LibTIFF, LibPNG, LibJPEG and ZLib -- removed all absolute seeks from the library -! FreeImageQt now makes use of the DLL distro -! rebuilt the entire directory structure -! improved handling of BMP -! renamed FreeImage_MaskedCombine to FreeImage_MaskedCombine32 -+ [Alexander Dymerets] added 24-bit masked alpha blending with a seperate alpha mask -+ added FreeImage_Rotate (known bug in degrees 76 to 106) -+ added 4-bit bitmap support to FreeImage_ConvertTo16Bits -+ added 8-bit bitmap support to FreeImage_ConvertTo16Bits -+ added 32-bit bitmap support to FreeImage_ConvertTo16Bits -+ added 32-bit bitmap support to FreeImage_Mirror -+ added 16-bit 5-5-5 support to FreeImage_ConvertTo24Bits -+ added 16-bit 5-5-5 support to FreeImage_ConvertTo32Bits - -October 2th 2000 - 1.4.0 -* [Jani Kajala] fixed bug in conversion with 4 -> 24 and 8 -> 32 -* [Jani Kajala] fixed bug in FreeImage_Flip -* [Jani Kajala] fixed minor bug in FreeImage_LoadBMP -- [Herve Drolon] removed PBMFlags, PGMFlags and PPMFlags -- [Herve Drolon] removed FI_LoadGeneric -- removed FreeImage_Win32.h -! [Herve Drolon] changed FI_GetFileType -! [Herve Drolon] replaced FI_LoadPBM, FI_LoadPGM and FI_LoadPPM with FI_LoadPNM -! [Herve Drolon] improved FreeImage_LoadPNG -! FreeImage_WritePaletteEntry is now exported -+ [Herve Drolon] added FreeImage_SavePNG -+ [Herve Drolon] added FreeImage_SavePNM and PNMFlags -+ [Herve Drolon] added XXXFlags parameter to save functions -+ [Herve Drolon] added FreeImage_LoadRAS and FIF_RAS -+ added FreeImage_GetFileTypeFromExt - -September 7th 2000 - 1.3.5 -+ added conversion 4 -> 8 to FI_ConvertTo8Bits -+ added simple version of FI_GetFileType -+ added project FreeImageQt; a port of the library to the TrollTech library - -August 31th 2000 - 1.3.4 -* fixed 'ice effect' bug in new 24 bit PCX code -* fixed some bugs with the conversion 16 -> 24 and 16 -> 32 -! FI_Blur now returns void -! A debug build of the library now produces FreeImaged.dll and FreeImaged.lib -! TARGA_LOAD_ARGB8888 is now called TARGA_LOAD_RGB888 -! Alpha channels are now automatically loaded unless TARGA_LOAD_RGB888 is specified -! cleaned up the code a lot -+ added 32-bit bitmap support to FreeImage_ConvertToGreyscale -+ added support for 32-bit bottom-left TARGA images -+ added internal functions FreeImage_WritePaletteEntry() and FreeImage_GetScanLine() -+ added FreeImage_Win32.h, containing Windows functions needed to create DIBs -+ added documentation through Doxygen - -July 30th 2000 - 1.3.3 -* [Jani Kajala] fixed some bugs with the conversion 4 -> 24 and 8 -> 24 -* [Jani Kajala] fixed some bugs with the conversion 4 -> 32 and 8 -> 32 -* fixed bug in FI_LoadPNM's ASCII number loader -! [Herve Drolon] improved FI_LoadPNG -! [Herve Drolon] changed FI_ConvertToGreyScale (added changeable macro for conversion) -! improved FI_ConvertTo24Bits -! improved FI_ConvertTo32Bits -! freeImage now uses LibPNG 1.0.8 -+ [Herve Drolon] added FI_ColorQuantize, based on Wu's color quantizer -+ added the conversion 1 -> 24 -+ added the conversion 1 -> 32 -+ added FI_ConvertTo8Bits -+ added FI_Invert (very useful for image processing) -+ added FI_GetColorType and 'enum FREE_IMAGE_COLOR_TYPE' - -June 30th 2000 - 1.3.2 -- removed color reduction functions from the project -! [Herve Drolon] Improved FI_LoadTIFF code -! renamed FI_ToGrayscale to FI_ConvertToGreyScale -! renamed FI_IncreaseColors to FI_ConvertTo24Bits -! LoadBMP now supports 32-bit bitmaps -! [Jani Kajala] Improved FI_LoadTARGA and FI_LoadPCX code -+ added FI_ConvertTo32Bits to convert a bitmap to 32-bit -+ added FI_MaskCombine to combine two 32-bit bitmaps using a alpha mask -+ added FI_AddAlphaMask to enrich a 32-bit bitmap with an alpha mask -+ added FI_SaveTIFF -+ added 16-bit bitmap (565) support to the ConvertToXXX functions. -+ added FI_ConvertTo16Bits (555 and 565) - -June 1th 2000 - 1.3.1 -- removed Standard Template Library (STL) code -* [Jani Kajala] fixed minor bug in FI_LoadTARGA -* [Jani Kajala] fixed some minor bugs in FI_LoadPCX -! streamlined FI_LoadJPEG a little -! FreeImage now uses LibPNG 1.0.6 -! FreeImage now uses LibTIFF 3.5.5 -! FreeImage now uses malloc and free instead of new and delete -+ introduced compiler flags to disable certain features in the DLL -+ added experimental nearest color reduction (FI_ReduceColorsNearestColor) - -April 13th 2000 - 1.3.0 -* fixed some 8 bit PCX files loading incorrectly -* fixed tiny bug in internally used CalculateUsedColors function -- removed FI_SaveXPM. Only BMP is supported now. -- removed Windows dependencies for easier porting -! optimized FI_LoadKOALA a little -! optimized FI_Combine using MMX technology -! FI_Combine now receives an 'unsigned integer' as alpha blend parameter -! FI_InCreaseColors and FI_ReduceColors don't dispose the old bitmap anymore -+ added PNM support (PGM, PPM and PBM; both binary and ascii) -+ [Alexander Dymerets] added FI_EnableMMX and FI_DisableMMX -+ added various effect functions (FI_Blur, FI_Brighten and FI_Crop) - -March 1st 2000 - 1.2.1 -* fixed some 24 bit PCX files loading incorrectly - -February 8th 2000 - 1.2.0 -* fixed last bitmap data block in JPEG files being truncated -* fixed 4/8 bit BMP's incorrectly loading when the palette is smaller than the bitcount predicts -- removed FI_Load. There is no reliable way to identify all image formats -- removed FI_SetJpegDecodeMode. - Mode selection is now done using the 'DataEnum data' parameter of FI_LoadJPEG -! read_proc/write_proc/tell_proc in FreeImageIO now are same as fread/fwrite/ftell -+ added a 'DataEnum data' parameter to all FI_LoadXXX functions. -+ added 16 bit TARGA support -+ added RLE support for TARGA images -+ added FI_GetDIBSize to get the size of a DIB in bytes -+ added Kodak PhotoCD support (Base, Base/4 and Base/16 encoding) -+ added KOALA support -+ added FI_GetFileType. Note: there is no reliable way to identify TARGA, ICO and PCD. Therefore they have been excluded -In KOALA files only the files converted by a C64 emulator can be identified. -+ added FI_Combine to combine two 24-bit bitmaps with (optional) alpha blending - -January 15th 2000 - 1.1.1 -! FI_Copy is now called FI_Clone -+ added FI_ToGrayscale to convert a color bitmap to grayscale -+ added 32 bit TARGA support -+ added FI_IncreaseColors to increase the bitmap bitdepth from 4/8 bit to 24 bit - -January 14th 2000 - 1.1.0 -* FI_MIRROR: fixed nibbles not being mirrored in 4 bit images -* FI_MIRROR: fixed bits not being mirrored in 1 bit images -* fixed improper loading of 1, 4 and 8 bit OS/2 BMP's -* fixed some inconsistensies in the calculation of lines and pitches -* fixed incorrectly loading of Huffman and FAX encoded TIFFs -* fixed LoadTGA accepting 16 bit TGA's and returning corrupt DIB's -- removed LZW support for TIFFs -! FreeImage now uses LibTIFF 3.5.4 -+ added ICO support -+ added overridable file I/O support in the form of FreeImageIO and fi_handle -+ added FI_Load for generic image loading -+ added FI_ReduceColors for color reduction -+ added FI_Copy to copy a bitmap in memory - -January 5th 2000 - 1.0.0 diff --git a/Dependencies/FreeImage/license-fi.txt b/Dependencies/FreeImage/license-fi.txt deleted file mode 100644 index 03b666c..0000000 --- a/Dependencies/FreeImage/license-fi.txt +++ /dev/null @@ -1,142 +0,0 @@ -FreeImage Public License - Version 1.0 ---------------------------------------------- - -1. Definitions. - -1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. - -1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. - -1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. - -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - -1.5. "Executable" means Covered Code in any form other than Source Code. - -1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. - -1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - -1.8. "License" means this document. - -1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a -Modification is: - -A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. - -B. Any new file that contains any part of the Original Code or previous Modifications. - -1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. - -1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control -compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. - -1.12. "You" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the -direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. - -2. Source Code License. - -2.1. The Initial Developer Grant. -The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: - -(a) to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and - -(b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell ("Utilize") the Original Code (or portions thereof), but solely to the extent that -any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or -combinations. - -2.2. Contributor Grant. -Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: - -(a) to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and - -(b) under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that -may be necessary to Utilize further Modifications or combinations. - -3. Distribution Obligations. - -3.1. Application of License. -The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or -restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. - -3.2. Availability of Source Code. -Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. - -3.3. Description of Modifications. -You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. - -3.4. Intellectual Property Matters - -(a) Third Party Claims. -If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make -available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. - -(b) Contributor APIs. -If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file. - -3.5. Required Notices. -You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its -structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or -liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of -warranty, support, indemnity or liability terms You offer. - -3.6. Distribution of Executable Versions. -You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You -describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License, -provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. - -3.7. Larger Works. -You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - -If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. - -5. Application of this License. - -This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code. - -6. Versions of the License. - -6.1. New Versions. -Floris van den Berg may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. - -6.2. Effect of New Versions. -Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Floris van den Berg -No one other than Floris van den Berg has the right to modify the terms applicable to Covered Code created under this License. - -6.3. Derivative Works. -If you create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases "FreeImage", `FreeImage Public License", "FIPL", or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the FreeImage Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) - -7. DISCLAIMER OF WARRANTY. - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -8. TERMINATION. - -This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. - -9. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - -The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. - -11. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by Dutch law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in, the The Netherlands: (a) unless otherwise agreed in writing, all disputes relating to this License (excepting any dispute relating to intellectual property rights) shall be subject to final and binding arbitration, with the losing party paying all costs of arbitration; (b) any arbitration relating to this Agreement shall be held in Almelo, The Netherlands; and (c) any litigation relating to this Agreement shall be subject to the jurisdiction of the court of Almelo, The Netherlands with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. - -12. RESPONSIBILITY FOR CLAIMS. - -Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based -on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute -responsibility on an equitable basis. - -EXHIBIT A. - -"The contents of this file are subject to the FreeImage Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://home.wxs.nl/~flvdberg/freeimage-license.txt - -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. \ No newline at end of file diff --git a/Dependencies/FreeImage/license-gplv2.txt b/Dependencies/FreeImage/license-gplv2.txt deleted file mode 100644 index 6020906..0000000 --- a/Dependencies/FreeImage/license-gplv2.txt +++ /dev/null @@ -1,126 +0,0 @@ -GNU General Public License, version 2 (GPL-2.0) -[OSI Approved License] -The GNU General Public License (GPL-2.0) -Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - -Preamble - -The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. - -We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. - -Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and modification follow. - -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. - - c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. - -If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - -5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. - -7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. - -This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. - -10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - -NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - - One line to give the program's name and a brief idea of what it does. - Copyright (C) - - This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. - - signature of Ty Coon, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. diff --git a/Dependencies/FreeImage/license-gplv3.txt b/Dependencies/FreeImage/license-gplv3.txt deleted file mode 100644 index 5ec7b1a..0000000 --- a/Dependencies/FreeImage/license-gplv3.txt +++ /dev/null @@ -1,228 +0,0 @@ -GNU General Public License, version 3 (GPL-3.0) -[OSI Approved License] -GNU GENERAL PUBLIC LICENSE - -Version 3, 29 June 2007 - -Copyright (C) 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -Preamble - -The GNU General Public License is a free, copyleft license for software and other kinds of works. - -The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - -To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. - -For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. - -Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. - -For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. - -Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. - -Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. - -The precise terms and conditions for copying, distribution and modification follow. -TERMS AND CONDITIONS -0. Definitions. - -This License refers to version 3 of the GNU General Public License. - -Copyright also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - -The Program refers to any copyrightable work licensed under this License. Each licensee is addressed as you. Licensees and recipients may be individuals or organizations. - -To modify a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a modified version of the earlier work or a work based on the earlier work. - -A covered work means either the unmodified Program or a work based on the Program. - -To propagate a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. - -To convey a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. - -An interactive user interface displays Appropriate Legal Notices to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. -1. Source Code. - -The source code for a work means the preferred form of the work for making modifications to it. Object code means any non-source form of a work. - -A Standard Interface means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. - -The System Libraries of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A Major Component, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. - -The Corresponding Source for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. - -The Corresponding Source for a work in source code form is that same work. -2. Basic Permissions. - -All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. - -You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. -3. Protecting Users' Legal Rights From Anti-Circumvention Law. - -No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. -4. Conveying Verbatim Copies. - -You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. -5. Conveying Modified Source Versions. - -You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified it, and giving a relevant date. - b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to keep intact all notices. - c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. - d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an aggregate if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. -6. Conveying Non-Source Forms. - -You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: - - a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. - b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. - c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. - d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. - e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. - -A User Product is either (1) a consumer product, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, normally used refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. - -Installation Information for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). - -The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. - -Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. -7. Additional Terms. - -Additional permissions are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. - -Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or - b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or - c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or - d) Limiting the use for publicity purposes of names of licensors or authors of the material; or - e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or - f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered further restrictions within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. -8. Termination. - -You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. -9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. -10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. - -An entity transaction is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. -11. Patents. - -A contributor is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's contributor version. - -A contributor's essential patent claims are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, control includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. - -In the following three paragraphs, a patent license is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To grant such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. Knowingly relying means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. - -A patent license is discriminatory if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. -12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. -13. Use with the GNU Affero General Public License. - -Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. -14. Revised Versions of this License. - -The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License or any later version applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. - -Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. -15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - -END OF TERMS AND CONDITIONS -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the copyright line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - -If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - - Copyright (C) - - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an about box. - -You should also get your employer (if you work as a programmer) or school, if any, to sign a copyright disclaimer for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . - -The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/Dependencies/SDL/Windows/BUGS.txt b/Dependencies/SDL/Windows/BUGS.txt deleted file mode 100644 index 57d953f..0000000 --- a/Dependencies/SDL/Windows/BUGS.txt +++ /dev/null @@ -1,16 +0,0 @@ - -Bugs are now managed in the SDL bug tracker, here: - - https://bugzilla.libsdl.org/ - -You may report bugs there, and search to see if a given issue has already - been reported, discussed, and maybe even fixed. - - -You may also find help at the SDL forums/mailing list: - - https://discourse.libsdl.org/ - -Bug reports are welcome here, but we really appreciate if you use Bugzilla, as - bugs discussed on the mailing list may be forgotten or missed. - diff --git a/Dependencies/SDL/Windows/COPYING.txt b/Dependencies/SDL/Windows/COPYING.txt deleted file mode 100644 index f158cb4..0000000 --- a/Dependencies/SDL/Windows/COPYING.txt +++ /dev/null @@ -1,20 +0,0 @@ - -Simple DirectMedia Layer -Copyright (C) 1997-2020 Sam Lantinga - -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. - diff --git a/Dependencies/SDL/Windows/README-SDL.txt b/Dependencies/SDL/Windows/README-SDL.txt deleted file mode 100644 index 2984b14..0000000 --- a/Dependencies/SDL/Windows/README-SDL.txt +++ /dev/null @@ -1,13 +0,0 @@ - -Please distribute this file with the SDL runtime environment: - -The Simple DirectMedia Layer (SDL for short) is a cross-platform library -designed to make it easy to write multi-media software, such as games -and emulators. - -The Simple DirectMedia Layer library source code is available from: -https://www.libsdl.org/ - -This library is distributed under the terms of the zlib license: -http://www.zlib.net/zlib_license.html - diff --git a/Dependencies/SDL/Windows/README.txt b/Dependencies/SDL/Windows/README.txt deleted file mode 100644 index e8630c7..0000000 --- a/Dependencies/SDL/Windows/README.txt +++ /dev/null @@ -1,21 +0,0 @@ - - Simple DirectMedia Layer - - (SDL) - - Version 2.0 - ---- -https://www.libsdl.org/ - -Simple DirectMedia Layer is a cross-platform development library designed -to provide low level access to audio, keyboard, mouse, joystick, and graphics -hardware via OpenGL and Direct3D. It is used by video playback software, -emulators, and popular games including Valve's award winning catalog -and many Humble Bundle games. - -More extensive documentation is available in the docs directory, starting -with README.md - -Enjoy! - Sam Lantinga (slouken@libsdl.org) diff --git a/Dependencies/SDL/Windows/WhatsNew.txt b/Dependencies/SDL/Windows/WhatsNew.txt deleted file mode 100644 index 606b80d..0000000 --- a/Dependencies/SDL/Windows/WhatsNew.txt +++ /dev/null @@ -1,529 +0,0 @@ - -This is a list of major changes in SDL's version history. - ---------------------------------------------------------------------------- -2.0.12: ---------------------------------------------------------------------------- - -General: -* Added SDL_GetTextureScaleMode() and SDL_SetTextureScaleMode() to get and set the scaling mode used for a texture -* Added SDL_LockTextureToSurface(), similar to SDL_LockTexture() but the locked area is exposed as a SDL surface. -* Added new blend mode, SDL_BLENDMODE_MUL, which does a modulate and blend operation -* Added the hint SDL_HINT_DISPLAY_USABLE_BOUNDS to override the results of SDL_GetDisplayUsableBounds() for display index 0. -* Added the window underneath the finger to the SDL_TouchFingerEvent -* Added SDL_GameControllerTypeForIndex(), SDL_GameControllerGetType() to return the type of a game controller (Xbox 360, Xbox One, PS3, PS4, or Nintendo Switch Pro) -* Added the hint SDL_HINT_GAMECONTROLLERTYPE to override the automatic game controller type detection -* Added SDL_JoystickFromPlayerIndex() and SDL_GameControllerFromPlayerIndex() to get the device associated with a player index -* Added SDL_JoystickSetPlayerIndex() and SDL_GameControllerSetPlayerIndex() to set the player index associated with a device -* Added the hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to specify whether Nintendo Switch Pro controllers should use the buttons as labeled or swapped to match positional layout. The default is to use the buttons as labeled. -* Added support for Nintendo GameCube controllers to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE to control whether this is used. -* Improved support for Xbox 360 and Xbox One controllers when using the HIDAPI driver -* Added support for many game controllers, including: - * 8BitDo FC30 Pro - * 8BitDo M30 GamePad - * BDA PS4 Fightpad - * HORI Fighting Commander - * Hyperkin Duke - * Hyperkin X91 - * MOGA XP5-A Plus - * NACON GC-400ES - * NVIDIA Controller v01.04 - * PDP Versus Fighting Pad - * Razer Raion Fightpad for PS4 - * Razer Serval - * Stadia Controller - * SteelSeries Stratus Duo - * Victrix Pro Fight Stick for PS4 - * Xbox One Elite Series 2 -* Fixed blocking game controller rumble calls when using the HIDAPI driver -* Added SDL_zeroa() macro to zero an array of elements -* Added SDL_HasARMSIMD() which returns true if the CPU has ARM SIMD (ARMv6+) features - -Windows: -* Fixed crash when using the release SDL DLL with applications built with gcc -* Fixed performance regression in event handling introduced in 2.0.10 -* Added support for SDL_SetThreadPriority() for UWP applications - -Linux: -* Added the hint SDL_HINT_VIDEO_X11_WINDOW_VISUALID to specify the visual chosen for new X11 windows -* Added the hint SDL_HINT_VIDEO_X11_FORCE_EGL to specify whether X11 should use GLX or EGL by default - -iOS / tvOS / macOS: -* Added SDL_Metal_CreateView() and SDL_Metal_DestroyView() to create CAMetalLayer-backed NSView/UIView and attach it to the specified window. - -iOS/ tvOS: -* Added support for Bluetooth Steam Controllers as game controllers - -tvOS: -* Fixed support for surround sound on Apple TV - -Android: -* Added SDL_GetAndroidSDKVersion() to return the API level of the current device -* Added support for audio capture using OpenSL-ES -* Added support for Bluetooth Steam Controllers as game controllers -* Fixed rare crashes when the app goes into the background or terminates - - ---------------------------------------------------------------------------- -2.0.10: ---------------------------------------------------------------------------- - -General: -* The SDL_RW* macros have been turned into functions that are available only in 2.0.10 and onward -* Added SDL_SIMDGetAlignment(), SDL_SIMDAlloc(), and SDL_SIMDFree(), to allocate memory aligned for SIMD operations for the current CPU -* Added SDL_RenderDrawPointF(), SDL_RenderDrawPointsF(), SDL_RenderDrawLineF(), SDL_RenderDrawLinesF(), SDL_RenderDrawRectF(), SDL_RenderDrawRectsF(), SDL_RenderFillRectF(), SDL_RenderFillRectsF(), SDL_RenderCopyF(), SDL_RenderCopyExF(), to allow floating point precision in the SDL rendering API. -* Added SDL_GetTouchDeviceType() to get the type of a touch device, which can be a touch screen or a trackpad in relative or absolute coordinate mode. -* The SDL rendering API now uses batched rendering by default, for improved performance -* Added SDL_RenderFlush() to force batched render commands to execute, if you're going to mix SDL rendering with native rendering -* Added the hint SDL_HINT_RENDER_BATCHING to control whether batching should be used for the rendering API. This defaults to "1" if you don't specify what rendering driver to use when creating the renderer. -* Added the hint SDL_HINT_EVENT_LOGGING to enable logging of SDL events for debugging purposes -* Added the hint SDL_HINT_GAMECONTROLLERCONFIG_FILE to specify a file that will be loaded at joystick initialization with game controller bindings -* Added the hint SDL_HINT_MOUSE_TOUCH_EVENTS to control whether SDL will synthesize touch events from mouse events -* Improved handling of malformed WAVE and BMP files, fixing potential security exploits - -Linux: -* Removed the Mir video driver in favor of Wayland - -iOS / tvOS: -* Added support for Xbox and PS4 wireless controllers in iOS 13 and tvOS 13 -* Added support for text input using Bluetooth keyboards - -Android: -* Added low latency audio using OpenSL ES -* Removed SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH (replaced by SDL_HINT_MOUSE_TOUCH_EVENTS and SDL_HINT_TOUCH_MOUSE_EVENTS) - SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=1, should be replaced by setting both previous hints to 0. - SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=0, should be replaced by setting both previous hints to 1. -* Added the hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE to set whether the event loop will block itself when the app is paused. - - ---------------------------------------------------------------------------- -2.0.9: ---------------------------------------------------------------------------- - -General: -* Added a new sensor API, initialized by passing SDL_INIT_SENSOR to SDL_Init(), and defined in SDL_sensor.h -* Added an event SDL_SENSORUPDATE which is sent when a sensor is updated -* Added SDL_GetDisplayOrientation() to return the current display orientation -* Added an event SDL_DISPLAYEVENT which is sent when the display orientation changes -* Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. (Thanks to Valve for contributing the PS4 and Nintendo Switch Pro controller support) -* Added support for many other popular game controllers -* Added SDL_JoystickGetDevicePlayerIndex(), SDL_JoystickGetPlayerIndex(), and SDL_GameControllerGetPlayerIndex() to get the player index for a controller. For XInput controllers this returns the XInput index for the controller. -* Added SDL_GameControllerRumble() and SDL_JoystickRumble() which allow simple rumble without using the haptics API -* Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened -* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_TIME to control the mouse double-click time -* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS to control the mouse double-click radius, in pixels -* Added SDL_HasColorKey() to return whether a surface has a colorkey active -* Added SDL_HasAVX512F() to return whether the CPU has AVX-512F features -* Added SDL_IsTablet() to return whether the application is running on a tablet -* Added SDL_THREAD_PRIORITY_TIME_CRITICAL for threads that must run at the highest priority - -Mac OS X: -* Fixed black screen at start on Mac OS X Mojave - -Linux: -* Added SDL_LinuxSetThreadPriority() to allow adjusting the thread priority of native threads using RealtimeKit if available. - -iOS: -* Fixed Asian IME input - -Android: -* Updated required Android SDK to API 26, to match Google's new App Store requirements -* Added support for wired USB Xbox, PS4, and Nintendo Switch Pro controllers -* Added support for relative mouse mode on Android 7.0 and newer (except where it's broken, on Chromebooks and when in DeX mode with Samsung Experience 9.0) -* Added support for custom mouse cursors on Android 7.0 and newer -* Added the hint SDL_HINT_ANDROID_TRAP_BACK_BUTTON to control whether the back button will back out of the app (the default) or be passed to the application as SDL_SCANCODE_AC_BACK -* Added SDL_AndroidBackButton() to trigger the Android system back button behavior when handling the back button in the application -* Added SDL_IsChromebook() to return whether the app is running in the Chromebook Android runtime -* Added SDL_IsDeXMode() to return whether the app is running while docked in the Samsung DeX - - ---------------------------------------------------------------------------- -2.0.8: ---------------------------------------------------------------------------- - -General: -* Added SDL_fmod() and SDL_log10() -* Each of the SDL math functions now has the corresponding float version -* Added SDL_SetYUVConversionMode() and SDL_GetYUVConversionMode() to control the formula used when converting to and from YUV colorspace. The options are JPEG, BT.601, and BT.709 - -Windows: -* Implemented WASAPI support on Windows UWP and removed the deprecated XAudio2 implementation -* Added resampling support on WASAPI on Windows 7 and above - -Windows UWP: -* Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on - -Mac OS X: -* Added support for the Vulkan SDK for Mac: - https://www.lunarg.com/lunarg-releases-vulkan-sdk-1-0-69-0-for-mac/ -* Added support for OpenGL ES using ANGLE when it's available - -Mac OS X / iOS / tvOS: -* Added a Metal 2D render implementation -* Added SDL_RenderGetMetalLayer() and SDL_RenderGetMetalCommandEncoder() to insert your own drawing into SDL rendering when using the Metal implementation - -iOS: -* Added the hint SDL_HINT_IOS_HIDE_HOME_INDICATOR to control whether the home indicator bar on iPhone X should be hidden. This defaults to dimming the indicator for fullscreen applications and showing the indicator for windowed applications. - -iOS / Android: -* Added the hint SDL_HINT_RETURN_KEY_HIDES_IME to control whether the return key on the software keyboard should hide the keyboard or send a key event (the default) - -Android: -* SDL now supports building with Android Studio and Gradle by default, and the old Ant project is available in android-project-ant -* SDL now requires the API 19 SDK to build, but can still target devices down to API 14 (Android 4.0.1) -* Added SDL_IsAndroidTV() to tell whether the application is running on Android TV - -Android / tvOS: -* Added the hint SDL_HINT_TV_REMOTE_AS_JOYSTICK to control whether TV remotes should be listed as joystick devices (the default) or send keyboard events. - -Linux: -* Added the hint SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR to control whether the X server should skip the compositor for the SDL application. This defaults to "1" -* Added the hint SDL_HINT_VIDEO_DOUBLE_BUFFER to control whether the Raspberry Pi and KMSDRM video drivers should use double or triple buffering (the default) - - ---------------------------------------------------------------------------- -2.0.7: ---------------------------------------------------------------------------- - -General: -* Added audio stream conversion functions: - SDL_NewAudioStream - SDL_AudioStreamPut - SDL_AudioStreamGet - SDL_AudioStreamAvailable - SDL_AudioStreamFlush - SDL_AudioStreamClear - SDL_FreeAudioStream -* Added functions to query and set the SDL memory allocation functions: - SDL_GetMemoryFunctions() - SDL_SetMemoryFunctions() - SDL_GetNumAllocations() -* Added locking functions for multi-threaded access to the joystick and game controller APIs: - SDL_LockJoysticks() - SDL_UnlockJoysticks() -* The following functions are now thread-safe: - SDL_SetEventFilter() - SDL_GetEventFilter() - SDL_AddEventWatch() - SDL_DelEventWatch() - - -General: ---------------------------------------------------------------------------- -2.0.6: ---------------------------------------------------------------------------- - -General: -* Added cross-platform Vulkan graphics support in SDL_vulkan.h - SDL_Vulkan_LoadLibrary() - SDL_Vulkan_GetVkGetInstanceProcAddr() - SDL_Vulkan_GetInstanceExtensions() - SDL_Vulkan_CreateSurface() - SDL_Vulkan_GetDrawableSize() - SDL_Vulkan_UnloadLibrary() - This is all the platform-specific code you need to bring up Vulkan on all SDL platforms. You can look at an example in test/testvulkan.c -* Added SDL_ComposeCustomBlendMode() to create custom blend modes for 2D rendering -* Added SDL_HasNEON() which returns whether the CPU has NEON instruction support -* Added support for many game controllers, including the Nintendo Switch Pro Controller -* Added support for inverted axes and separate axis directions in game controller mappings -* Added functions to return information about a joystick before it's opened: - SDL_JoystickGetDeviceVendor() - SDL_JoystickGetDeviceProduct() - SDL_JoystickGetDeviceProductVersion() - SDL_JoystickGetDeviceType() - SDL_JoystickGetDeviceInstanceID() -* Added functions to return information about an open joystick: - SDL_JoystickGetVendor() - SDL_JoystickGetProduct() - SDL_JoystickGetProductVersion() - SDL_JoystickGetType() - SDL_JoystickGetAxisInitialState() -* Added functions to return information about an open game controller: - SDL_GameControllerGetVendor() - SDL_GameControllerGetProduct() - SDL_GameControllerGetProductVersion() -* Added SDL_GameControllerNumMappings() and SDL_GameControllerMappingForIndex() to be able to enumerate the built-in game controller mappings -* Added SDL_LoadFile() and SDL_LoadFile_RW() to load a file into memory -* Added SDL_DuplicateSurface() to make a copy of a surface -* Added an experimental JACK audio driver -* Implemented non-power-of-two audio resampling, optionally using libsamplerate to perform the resampling -* Added the hint SDL_HINT_AUDIO_RESAMPLING_MODE to control the quality of resampling -* Added the hint SDL_HINT_RENDER_LOGICAL_SIZE_MODE to control the scaling policy for SDL_RenderSetLogicalSize(): - "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen (the default) - "1" or "overscan" - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen -* Added the hints SDL_HINT_MOUSE_NORMAL_SPEED_SCALE and SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE to scale the mouse speed when being read from raw mouse input -* Added the hint SDL_HINT_TOUCH_MOUSE_EVENTS to control whether SDL will synthesize mouse events from touch events - -Windows: -* The new default audio driver on Windows is WASAPI and supports hot-plugging devices and changing the default audio device -* The old XAudio2 audio driver is deprecated and will be removed in the next release -* Added hints SDL_HINT_WINDOWS_INTRESOURCE_ICON and SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL to specify a custom icon resource ID for SDL windows -* The hint SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING is now on by default for compatibility with .NET languages and various Windows debuggers -* Updated the GUID format for game controller mappings, older mappings will be automatically converted on load -* Implemented the SDL_WINDOW_ALWAYS_ON_TOP flag on Windows - -Linux: -* Added an experimental KMS/DRM video driver for embedded development - -iOS: -* Added a hint SDL_HINT_AUDIO_CATEGORY to control the audio category, determining whether the phone mute switch affects the audio - ---------------------------------------------------------------------------- -2.0.5: ---------------------------------------------------------------------------- - -General: -* Implemented audio capture support for some platforms -* Added SDL_DequeueAudio() to retrieve audio when buffer queuing is turned on for audio capture -* Added events for dragging and dropping text -* Added events for dragging and dropping multiple items -* By default the click raising a window will not be delivered to the SDL application. You can set the hint SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH to "1" to allow that click through to the window. -* Saving a surface with an alpha channel as a BMP will use a newer BMP format that supports alpha information. You can set the hint SDL_HINT_BMP_SAVE_LEGACY_FORMAT to "1" to use the old format. -* Added SDL_GetHintBoolean() to get the boolean value of a hint -* Added SDL_RenderSetIntegerScale() to set whether to smoothly scale or use integral multiples of the viewport size when scaling the rendering output -* Added SDL_CreateRGBSurfaceWithFormat() and SDL_CreateRGBSurfaceWithFormatFrom() to create an SDL surface with a specific pixel format -* Added SDL_GetDisplayUsableBounds() which returns the area usable for windows. For example, on Mac OS X, this subtracts the area occupied by the menu bar and dock. -* Added SDL_GetWindowBordersSize() which returns the size of the window's borders around the client area -* Added a window event SDL_WINDOWEVENT_HIT_TEST when a window had a hit test that wasn't SDL_HITTEST_NORMAL (e.g. in the title bar or window frame) -* Added SDL_SetWindowResizable() to change whether a window is resizable -* Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity() to affect the window transparency -* Added SDL_SetWindowModalFor() to set a window as modal for another window -* Added support for AUDIO_U16LSB and AUDIO_U16MSB to SDL_MixAudioFormat() -* Fixed flipped images when reading back from target textures when using the OpenGL renderer -* Fixed texture color modulation with SDL_BLENDMODE_NONE when using the OpenGL renderer -* Fixed bug where the alpha value of colorkeys was ignored when blitting in some cases - -Windows: -* Added a hint SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING to prevent SDL from raising a debugger exception to name threads. This exception can cause problems with .NET applications when running under a debugger. -* The hint SDL_HINT_THREAD_STACK_SIZE is now supported on Windows -* Fixed XBox controller triggers automatically being pulled at startup -* The first icon from the executable is used as the default window icon at runtime -* Fixed SDL log messages being printed twice if SDL was built with C library support -* Reset dead keys when the SDL window loses focus, so dead keys pressed in SDL applications don't affect text input into other applications. - -Mac OS X: -* Fixed selecting the dummy video driver -* The caps lock key now generates a pressed event when pressed and a released event when released, instead of a press/release event pair when pressed. -* Fixed mouse wheel events on Mac OS X 10.12 -* The audio driver has been updated to use AVFoundation for better compatibility with newer versions of Mac OS X - -Linux: -* Added support for the Fcitx IME -* Added a window event SDL_WINDOWEVENT_TAKE_FOCUS when a window manager asks the SDL window whether it wants to take focus. -* Refresh rates are now rounded instead of truncated, e.g. 59.94 Hz is rounded up to 60 Hz instead of 59. -* Added initial support for touchscreens on Raspberry Pi - -OpenBSD: -* SDL_GetBasePath() is now implemented on OpenBSD - -iOS: -* Added support for dynamically loaded objects on iOS 8 and newer - -tvOS: -* Added support for Apple TV -* Added a hint SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION to control whether he Apple TV remote's joystick axes will automatically match the rotation of the remote. - -Android: -* Fixed SDL not resizing window when Android screen resolution changes -* Corrected the joystick Z axis reporting for the accelerometer - -Emscripten (running in a web browser): -* Many bug fixes and improvements - - ---------------------------------------------------------------------------- -2.0.4: ---------------------------------------------------------------------------- - -General: -* Added support for web applications using Emscripten, see docs/README-emscripten.md for more information -* Added support for web applications using Native Client (NaCl), see docs/README-nacl.md for more information -* Added an API to queue audio instead of using the audio callback: - SDL_QueueAudio(), SDL_GetQueuedAudioSize(), SDL_ClearQueuedAudio() -* Added events for audio device hot plug support: - SDL_AUDIODEVICEADDED, SDL_AUDIODEVICEREMOVED -* Added SDL_PointInRect() -* Added SDL_HasAVX2() to detect CPUs with AVX2 support -* Added SDL_SetWindowHitTest() to let apps treat parts of their SDL window like traditional window decorations (drag areas, resize areas) -* Added SDL_GetGrabbedWindow() to get the window that currently has input grab, if any -* Added SDL_RenderIsClipEnabled() to tell whether clipping is currently enabled in a renderer -* Added SDL_CaptureMouse() to capture the mouse to get events while the mouse is not in your window -* Added SDL_WarpMouseGlobal() to warp the mouse cursor in global screen space -* Added SDL_GetGlobalMouseState() to get the current mouse state outside of an SDL window -* Added a direction field to mouse wheel events to tell whether they are flipped (natural) or not -* Added GL_CONTEXT_RELEASE_BEHAVIOR GL attribute (maps to [WGL|GLX]_ARB_context_flush_control extension) -* Added EGL_KHR_create_context support to allow OpenGL ES version selection on some platforms -* Added NV12 and NV21 YUV texture support for OpenGL and OpenGL ES 2.0 renderers -* Added a Vivante video driver that is used on various SoC platforms -* Added an event SDL_RENDER_DEVICE_RESET that is sent from the D3D renderers when the D3D device is lost, and from Android's event loop when the GLES context had to be recreated -* Added a hint SDL_HINT_NO_SIGNAL_HANDLERS to disable SDL's built in signal handling -* Added a hint SDL_HINT_THREAD_STACK_SIZE to set the stack size of SDL's threads -* Added SDL_sqrtf(), SDL_tan(), and SDL_tanf() to the stdlib routines -* Improved support for WAV and BMP files with unusual chunks in them -* Renamed SDL_assert_data to SDL_AssertData and SDL_assert_state to SDL_AssertState -* Added a hint SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN to prevent window interaction while cursor is hidden -* Added SDL_GetDisplayDPI() to get the DPI information for a display -* Added SDL_JoystickCurrentPowerLevel() to get the battery level of a joystick -* Added SDL_JoystickFromInstanceID(), as a helper function, to get the SDL_Joystick* that an event is referring to. -* Added SDL_GameControllerFromInstanceID(), as a helper function, to get the SDL_GameController* that an event is referring to. - -Windows: -* Added support for Windows Phone 8.1 and Windows 10/UWP (Universal Windows Platform) -* Timer resolution is now 1 ms by default, adjustable with the SDL_HINT_TIMER_RESOLUTION hint -* SDLmain no longer depends on the C runtime, so you can use the same .lib in both Debug and Release builds -* Added SDL_SetWindowsMessageHook() to set a function to be called for every windows message before TranslateMessage() -* Added a hint SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP to control whether SDL_PumpEvents() processes the Windows message loop -* You can distinguish between real mouse and touch events by looking for SDL_TOUCH_MOUSEID in the mouse event "which" field -* SDL_SysWMinfo now contains the window HDC -* Added support for Unicode command line options -* Prevent beeping when Alt-key combos are pressed -* SDL_SetTextInputRect() re-positions the OS-rendered IME -* Added a hint SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 to prevent generating SDL_WINDOWEVENT_CLOSE events when Alt-F4 is pressed -* Added a hint SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING to use the old axis and button mapping for XInput devices (deprecated) - -Mac OS X: -* Implemented drag-and-drop support -* Improved joystick hot-plug detection -* The SDL_WINDOWEVENT_EXPOSED window event is triggered in the appropriate situations -* Fixed relative mouse mode when the application loses/regains focus -* Fixed bugs related to transitioning to and from Spaces-aware fullscreen-desktop mode -* Fixed the refresh rate of display modes -* SDL_SysWMInfo is now ARC-compatible -* Added a hint SDL_HINT_MAC_BACKGROUND_APP to prevent forcing the application to become a foreground process - -Linux: -* Enabled building with Mir and Wayland support by default. -* Added IBus IME support -* Added a hint SDL_HINT_IME_INTERNAL_EDITING to control whether IBus should handle text editing internally instead of sending SDL_TEXTEDITING events -* Added a hint SDL_HINT_VIDEO_X11_NET_WM_PING to allow disabling _NET_WM_PING protocol handling in SDL_CreateWindow() -* Added support for multiple audio devices when using Pulseaudio -* Fixed duplicate mouse events when using relative mouse motion - -iOS: -* Added support for iOS 8 -* The SDL_WINDOW_ALLOW_HIGHDPI window flag now enables high-dpi support, and SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() gets the window resolution in pixels -* SDL_GetWindowSize() and display mode sizes are in the "DPI-independent points" / "screen coordinates" coordinate space rather than pixels (matches OS X behavior) -* Added native resolution support for the iPhone 6 Plus -* Added support for MFi game controllers -* Added support for the hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK -* Added sRGB OpenGL ES context support on iOS 7+ -* Added support for SDL_DisableScreenSaver(), SDL_EnableScreenSaver() and the hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER -* SDL_SysWMinfo now contains the OpenGL ES framebuffer and color renderbuffer objects used by the window's active GLES view -* Fixed various rotation and orientation issues -* Fixed memory leaks - -Android: -* Added a hint SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH to prevent mouse events from being registered as touch events -* Added hints SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION and SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION -* Added support for SDL_DisableScreenSaver(), SDL_EnableScreenSaver() and the hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER -* Added support for SDL_ShowMessageBox() and SDL_ShowSimpleMessageBox() - -Raspberry Pi: -* Added support for the Raspberry Pi 2 - - ---------------------------------------------------------------------------- -2.0.3: ---------------------------------------------------------------------------- - -Mac OS X: -* Fixed creating an OpenGL context by default on Mac OS X 10.6 - - ---------------------------------------------------------------------------- -2.0.2: ---------------------------------------------------------------------------- -General: -* Added SDL_GL_ResetAttributes() to reset OpenGL attributes to default values -* Added an API to load a database of game controller mappings from a file: - SDL_GameControllerAddMappingsFromFile(), SDL_GameControllerAddMappingsFromRW() -* Added game controller mappings for the PS4 and OUYA controllers -* Added SDL_GetDefaultAssertionHandler() and SDL_GetAssertionHandler() -* Added SDL_DetachThread() -* Added SDL_HasAVX() to determine if the CPU has AVX features -* Added SDL_vsscanf(), SDL_acos(), and SDL_asin() to the stdlib routines -* EGL can now create/manage OpenGL and OpenGL ES 1.x/2.x contexts, and share - them using SDL_GL_SHARE_WITH_CURRENT_CONTEXT -* Added a field "clicks" to the mouse button event which records whether the event is a single click, double click, etc. -* The screensaver is now disabled by default, and there is a hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER that can change that behavior. -* Added a hint SDL_HINT_MOUSE_RELATIVE_MODE_WARP to specify whether mouse relative mode should be emulated using mouse warping. -* testgl2 does not need to link with libGL anymore -* Added testgles2 test program to demonstrate working with OpenGL ES 2.0 -* Added controllermap test program to visually map a game controller - -Windows: -* Support for OpenGL ES 2.x contexts using either WGL or EGL (natively via - the driver or emulated through ANGLE) -* Added a hint SDL_HINT_VIDEO_WIN_D3DCOMPILER to specify which D3D shader compiler to use for OpenGL ES 2 support through ANGLE -* Added a hint SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT that is useful when creating multiple windows that should share the same OpenGL context. -* Added an event SDL_RENDER_TARGETS_RESET that is sent when D3D9 render targets are reset after the device has been restored. - -Mac OS X: -* Added a hint SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK to control whether Ctrl+click should be treated as a right click on Mac OS X. This is off by default. - -Linux: -* Fixed fullscreen and focused behavior when receiving NotifyGrab events -* Added experimental Wayland and Mir support, disabled by default - -Android: -* Joystick support (minimum SDK version required to build SDL is now 12, - the required runtime version remains at 10, but on such devices joystick - support won't be available). -* Hotplugging support for joysticks -* Added a hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK to control whether the accelerometer should be listed as a 3 axis joystick, which it will by default. - - ---------------------------------------------------------------------------- -2.0.1: ---------------------------------------------------------------------------- - -General: -* Added an API to get common filesystem paths in SDL_filesystem.h: - SDL_GetBasePath(), SDL_GetPrefPath() -* Added an API to do optimized YV12 and IYUV texture updates: - SDL_UpdateYUVTexture() -* Added an API to get the amount of RAM on the system: - SDL_GetSystemRAM() -* Added a macro to perform timestamp comparisons with SDL_GetTicks(): - SDL_TICKS_PASSED() -* Dramatically improved OpenGL ES 2.0 rendering performance -* Added OpenGL attribute SDL_GL_FRAMEBUFFER_SRGB_CAPABLE - -Windows: -* Created a static library configuration for the Visual Studio 2010 project -* Added a hint to create the Direct3D device with support for multi-threading: - SDL_HINT_RENDER_DIRECT3D_THREADSAFE -* Added a function to get the D3D9 adapter index for a display: - SDL_Direct3D9GetAdapterIndex() -* Added a function to get the D3D9 device for a D3D9 renderer: - SDL_RenderGetD3D9Device() -* Fixed building SDL with the mingw32 toolchain (mingw-w64 is preferred) -* Fixed crash when using two XInput controllers at the same time -* Fixed detecting a mixture of XInput and DirectInput controllers -* Fixed clearing a D3D render target larger than the window -* Improved support for format specifiers in SDL_snprintf() - -Mac OS X: -* Added support for retina displays: - Create your window with the SDL_WINDOW_ALLOW_HIGHDPI flag, and then use SDL_GL_GetDrawableSize() to find the actual drawable size. You are responsible for scaling mouse and drawing coordinates appropriately. -* Fixed mouse warping in fullscreen mode -* Right mouse click is emulated by holding the Ctrl key while left clicking - -Linux: -* Fixed float audio support with the PulseAudio driver -* Fixed missing line endpoints in the OpenGL renderer on some drivers -* X11 symbols are no longer defined to avoid collisions when linking statically - -iOS: -* Fixed status bar visibility on iOS 7 -* Flipped the accelerometer Y axis to match expected values - -Android: -IMPORTANT: You MUST get the updated SDLActivity.java to match C code -* Moved EGL initialization to native code -* Fixed the accelerometer axis rotation relative to the device rotation -* Fixed race conditions when handling the EGL context on pause/resume -* Touch devices are available for enumeration immediately after init - -Raspberry Pi: -* Added support for the Raspberry Pi, see README-raspberrypi.txt for details diff --git a/Dependencies/SDL/Windows/docs/README-android.md b/Dependencies/SDL/Windows/docs/README-android.md deleted file mode 100644 index fbd9f99..0000000 --- a/Dependencies/SDL/Windows/docs/README-android.md +++ /dev/null @@ -1,454 +0,0 @@ -Android -================================================================================ - -Matt Styles wrote a tutorial on building SDL for Android with Visual Studio: -http://trederia.blogspot.de/2017/03/building-sdl2-for-android-with-visual.html - -The rest of this README covers the Android gradle style build process. - -If you are using the older ant build process, it is no longer officially -supported, but you can use the "android-project-ant" directory as a template. - - -================================================================================ - Requirements -================================================================================ - -Android SDK (version 26 or later) -https://developer.android.com/sdk/index.html - -Android NDK r15c or later -https://developer.android.com/tools/sdk/ndk/index.html - -Minimum API level supported by SDL: 16 (Android 4.1) - - -================================================================================ - How the port works -================================================================================ - -- Android applications are Java-based, optionally with parts written in C -- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to - the SDL library -- This means that your application C code must be placed inside an Android - Java project, along with some C support code that communicates with Java -- This eventually produces a standard Android .apk package - -The Android Java code implements an "Activity" and can be found in: -android-project/app/src/main/java/org/libsdl/app/SDLActivity.java - -The Java code loads your game code, the SDL shared library, and -dispatches to native functions implemented in the SDL library: -src/core/android/SDL_android.c - - -================================================================================ - Building an app -================================================================================ - -For simple projects you can use the script located at build-scripts/androidbuild.sh - -There's two ways of using it: - - androidbuild.sh com.yourcompany.yourapp < sources.list - androidbuild.sh com.yourcompany.yourapp source1.c source2.c ...sourceN.c - -sources.list should be a text file with a source file name in each line -Filenames should be specified relative to the current directory, for example if -you are in the build-scripts directory and want to create the testgles.c test, you'll -run: - - ./androidbuild.sh org.libsdl.testgles ../test/testgles.c - -One limitation of this script is that all sources provided will be aggregated into -a single directory, thus all your source files should have a unique name. - -Once the project is complete the script will tell you where the debug APK is located. -If you want to create a signed release APK, you can use the project created by this -utility to generate it. - -Finally, a word of caution: re running androidbuild.sh wipes any changes you may have -done in the build directory for the app! - - -For more complex projects, follow these instructions: - -1. Copy the android-project directory wherever you want to keep your projects - and rename it to the name of your project. -2. Move or symlink this SDL directory into the "/app/jni" directory -3. Edit "/app/jni/src/Android.mk" to include your source files - -4a. If you want to use Android Studio, simply open your directory and start building. - -4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device - - -If you already have a project that uses CMake, the instructions change somewhat: - -1. Do points 1 and 2 from the instruction above. -2. Edit "/app/build.gradle" to comment out or remove sections containing ndk-build - and uncomment the cmake sections. Add arguments to the CMake invocation as needed. -3. Edit "/app/jni/CMakeLists.txt" to include your project (it defaults to - adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static - as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)" - in your CMakeLists.txt file. Also be aware that you should use add_library() instead of - add_executable() for the target containing your "main" function. - -If you wish to use Android Studio, you can skip the last step. - -4. Run './gradlew installDebug' or './gradlew installRelease' in the project directory. It will build and install your .apk on any - connected Android device - -Here's an explanation of the files in the Android project, so you can customize them: - - android-project/app - build.gradle - build info including the application version and SDK - src/main/AndroidManifest.xml - package manifest. Among others, it contains the class name of the main Activity and the package name of the application. - jni/ - directory holding native code - jni/Application.mk - Application JNI settings, including target platform and STL library - jni/Android.mk - Android makefile that can call recursively the Android.mk files in all subdirectories - jni/CMakeLists.txt - Top-level CMake project that adds SDL as a subproject - jni/SDL/ - (symlink to) directory holding the SDL library files - jni/SDL/Android.mk - Android makefile for creating the SDL shared library - jni/src/ - directory holding your C/C++ source - jni/src/Android.mk - Android makefile that you should customize to include your source code and any library references - jni/src/CMakeLists.txt - CMake file that you may customize to include your source code and any library references - src/main/assets/ - directory holding asset files for your application - src/main/res/ - directory holding resources for your application - src/main/res/mipmap-* - directories holding icons for different phone hardware - src/main/res/values/strings.xml - strings used in your application, including the application name - src/main/java/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding to SDL. Be very careful changing this, as the SDL library relies on this implementation. You should instead subclass this for your application. - - -================================================================================ - Customizing your application name -================================================================================ - -To customize your application name, edit AndroidManifest.xml and replace -"org.libsdl.app" with an identifier for your product package. - -Then create a Java class extending SDLActivity and place it in a directory -under src matching your package, e.g. - - src/com/gamemaker/game/MyGame.java - -Here's an example of a minimal class file: - - --- MyGame.java -------------------------- - package com.gamemaker.game; - - import org.libsdl.app.SDLActivity; - - /** - * A sample wrapper class that just calls SDLActivity - */ - - public class MyGame extends SDLActivity { } - - ------------------------------------------ - -Then replace "SDLActivity" in AndroidManifest.xml with the name of your -class, .e.g. "MyGame" - - -================================================================================ - Customizing your application icon -================================================================================ - -Conceptually changing your icon is just replacing the "ic_launcher.png" files in -the drawable directories under the res directory. There are several directories -for different screen sizes. - - -================================================================================ - Loading assets -================================================================================ - -Any files you put in the "app/src/main/assets" directory of your project -directory will get bundled into the application package and you can load -them using the standard functions in SDL_rwops.h. - -There are also a few Android specific functions that allow you to get other -useful paths for saving and loading data: -* SDL_AndroidGetInternalStoragePath() -* SDL_AndroidGetExternalStorageState() -* SDL_AndroidGetExternalStoragePath() - -See SDL_system.h for more details on these functions. - -The asset packaging system will, by default, compress certain file extensions. -SDL includes two asset file access mechanisms, the preferred one is the so -called "File Descriptor" method, which is faster and doesn't involve the Dalvik -GC, but given this method does not work on compressed assets, there is also the -"Input Stream" method, which is automatically used as a fall back by SDL. You -may want to keep this fact in mind when building your APK, specially when large -files are involved. -For more information on which extensions get compressed by default and how to -disable this behaviour, see for example: - -http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/ - - -================================================================================ - Pause / Resume behaviour -================================================================================ - -If SDL_HINT_ANDROID_BLOCK_ON_PAUSE hint is set (the default), -the event loop will block itself when the app is paused (ie, when the user -returns to the main Android dashboard). Blocking is better in terms of battery -use, and it allows your app to spring back to life instantaneously after resume -(versus polling for a resume message). - -Upon resume, SDL will attempt to restore the GL context automatically. -In modern devices (Android 3.0 and up) this will most likely succeed and your -app can continue to operate as it was. - -However, there's a chance (on older hardware, or on systems under heavy load), -where the GL context can not be restored. In that case you have to listen for -a specific message, (which is not yet implemented!) and restore your textures -manually or quit the app (which is actually the kind of behaviour you'll see -under iOS, if the OS can not restore your GL context it will just kill your app) - - -================================================================================ - Threads and the Java VM -================================================================================ - -For a quick tour on how Linux native threads interoperate with the Java VM, take -a look here: https://developer.android.com/guide/practices/jni.html - -If you want to use threads in your SDL app, it's strongly recommended that you -do so by creating them using SDL functions. This way, the required attach/detach -handling is managed by SDL automagically. If you have threads created by other -means and they make calls to SDL functions, make sure that you call -Android_JNI_SetupThread() before doing anything else otherwise SDL will attach -your thread automatically anyway (when you make an SDL call), but it'll never -detach it. - - -================================================================================ - Using STL -================================================================================ - -You can use STL in your project by creating an Application.mk file in the jni -folder and adding the following line: - - APP_STL := c++_shared - -For more information go here: - https://developer.android.com/ndk/guides/cpp-support - - -================================================================================ - Using the emulator -================================================================================ - -There are some good tips and tricks for getting the most out of the -emulator here: https://developer.android.com/tools/devices/emulator.html - -Especially useful is the info on setting up OpenGL ES 2.0 emulation. - -Notice that this software emulator is incredibly slow and needs a lot of disk space. -Using a real device works better. - - -================================================================================ - Troubleshooting -================================================================================ - -You can see if adb can see any devices with the following command: - - adb devices - -You can see the output of log messages on the default device with: - - adb logcat - -You can push files to the device with: - - adb push local_file remote_path_and_file - -You can push files to the SD Card at /sdcard, for example: - - adb push moose.dat /sdcard/moose.dat - -You can see the files on the SD card with a shell command: - - adb shell ls /sdcard/ - -You can start a command shell on the default device with: - - adb shell - -You can remove the library files of your project (and not the SDL lib files) with: - - ndk-build clean - -You can do a build with the following command: - - ndk-build - -You can see the complete command line that ndk-build is using by passing V=1 on the command line: - - ndk-build V=1 - -If your application crashes in native code, you can use ndk-stack to get a symbolic stack trace: - https://developer.android.com/ndk/guides/ndk-stack - -If you want to go through the process manually, you can use addr2line to convert the -addresses in the stack trace to lines in your code. - -For example, if your crash looks like this: - - I/DEBUG ( 31): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 400085d0 - I/DEBUG ( 31): r0 00000000 r1 00001000 r2 00000003 r3 400085d4 - I/DEBUG ( 31): r4 400085d0 r5 40008000 r6 afd41504 r7 436c6a7c - I/DEBUG ( 31): r8 436c6b30 r9 435c6fb0 10 435c6f9c fp 4168d82c - I/DEBUG ( 31): ip 8346aff0 sp 436c6a60 lr afd1c8ff pc afd1c902 cpsr 60000030 - I/DEBUG ( 31): #00 pc 0001c902 /system/lib/libc.so - I/DEBUG ( 31): #01 pc 0001ccf6 /system/lib/libc.so - I/DEBUG ( 31): #02 pc 000014bc /data/data/org.libsdl.app/lib/libmain.so - I/DEBUG ( 31): #03 pc 00001506 /data/data/org.libsdl.app/lib/libmain.so - -You can see that there's a crash in the C library being called from the main code. -I run addr2line with the debug version of my code: - - arm-eabi-addr2line -C -f -e obj/local/armeabi/libmain.so - -and then paste in the number after "pc" in the call stack, from the line that I care about: -000014bc - -I get output from addr2line showing that it's in the quit function, in testspriteminimal.c, on line 23. - -You can add logging to your code to help show what's happening: - - #include - - __android_log_print(ANDROID_LOG_INFO, "foo", "Something happened! x = %d", x); - -If you need to build without optimization turned on, you can create a file called -"Application.mk" in the jni directory, with the following line in it: - - APP_OPTIM := debug - - -================================================================================ - Memory debugging -================================================================================ - -The best (and slowest) way to debug memory issues on Android is valgrind. -Valgrind has support for Android out of the box, just grab code using: - - svn co svn://svn.valgrind.org/valgrind/trunk valgrind - -... and follow the instructions in the file README.android to build it. - -One thing I needed to do on Mac OS X was change the path to the toolchain, -and add ranlib to the environment variables: -export RANLIB=$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-ranlib - -Once valgrind is built, you can create a wrapper script to launch your -application with it, changing org.libsdl.app to your package identifier: - - --- start_valgrind_app ------------------- - #!/system/bin/sh - export TMPDIR=/data/data/org.libsdl.app - exec /data/local/Inst/bin/valgrind --log-file=/sdcard/valgrind.log --error-limit=no $* - ------------------------------------------ - -Then push it to the device: - - adb push start_valgrind_app /data/local - -and make it executable: - - adb shell chmod 755 /data/local/start_valgrind_app - -and tell Android to use the script to launch your application: - - adb shell setprop wrap.org.libsdl.app "logwrapper /data/local/start_valgrind_app" - -If the setprop command says "could not set property", it's likely that -your package name is too long and you should make it shorter by changing -AndroidManifest.xml and the path to your class file in android-project/src - -You can then launch your application normally and waaaaaaaiiittt for it. -You can monitor the startup process with the logcat command above, and -when it's done (or even while it's running) you can grab the valgrind -output file: - - adb pull /sdcard/valgrind.log - -When you're done instrumenting with valgrind, you can disable the wrapper: - - adb shell setprop wrap.org.libsdl.app "" - - -================================================================================ - Graphics debugging -================================================================================ - -If you are developing on a compatible Tegra-based tablet, NVidia provides -Tegra Graphics Debugger at their website. Because SDL2 dynamically loads EGL -and GLES libraries, you must follow their instructions for installing the -interposer library on a rooted device. The non-rooted instructions are not -compatible with applications that use SDL2 for video. - -The Tegra Graphics Debugger is available from NVidia here: -https://developer.nvidia.com/tegra-graphics-debugger - - -================================================================================ - Why is API level 16 the minimum required? -================================================================================ - -The latest NDK toolchain doesn't support targeting earlier than API level 16. -As of this writing, according to https://developer.android.com/about/dashboards/index.html -about 99% of the Android devices accessing Google Play support API level 16 or -higher (January 2018). - - -================================================================================ - A note regarding the use of the "dirty rectangles" rendering technique -================================================================================ - -If your app uses a variation of the "dirty rectangles" rendering technique, -where you only update a portion of the screen on each frame, you may notice a -variety of visual glitches on Android, that are not present on other platforms. -This is caused by SDL's use of EGL as the support system to handle OpenGL ES/ES2 -contexts, in particular the use of the eglSwapBuffers function. As stated in the -documentation for the function "The contents of ancillary buffers are always -undefined after calling eglSwapBuffers". -Setting the EGL_SWAP_BEHAVIOR attribute of the surface to EGL_BUFFER_PRESERVED -is not possible for SDL as it requires EGL 1.4, available only on the API level -17+, so the only workaround available on this platform is to redraw the entire -screen each frame. - -Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html - - -================================================================================ - Ending your application -================================================================================ - -Two legitimate ways: - -- return from your main() function. Java side will automatically terminate the -Activity by calling Activity.finish(). - -- Android OS can decide to terminate your application by calling onDestroy() -(see Activity life cycle). Your application will receive a SDL_QUIT event you -can handle to save things and quit. - -Don't call exit() as it stops the activity badly. - -NB: "Back button" can be handled as a SDL_KEYDOWN/UP events, with Keycode -SDLK_AC_BACK, for any purpose. - -================================================================================ - Known issues -================================================================================ - -- The number of buttons reported for each joystick is hardcoded to be 36, which -is the current maximum number of buttons Android can report. - diff --git a/Dependencies/SDL/Windows/docs/README-cmake.md b/Dependencies/SDL/Windows/docs/README-cmake.md deleted file mode 100644 index b13f2d2..0000000 --- a/Dependencies/SDL/Windows/docs/README-cmake.md +++ /dev/null @@ -1,84 +0,0 @@ -CMake -================================================================================ -(www.cmake.org) - -SDL's build system was traditionally based on autotools. Over time, this -approach has suffered from several issues across the different supported -platforms. -To solve these problems, a new build system based on CMake is under development. -It works in parallel to the legacy system, so users can experiment with it -without complication. -While still experimental, the build system should be usable on the following -platforms: - -* FreeBSD -* Linux -* VS.NET 2010 -* MinGW and Msys -* macOS, iOS, and tvOS, with support for XCode - - -================================================================================ -Usage -================================================================================ - -Assuming the source for SDL is located at ~/sdl - - cd ~ - mkdir build - cd build - cmake ../sdl - -This will build the static and dynamic versions of SDL in the ~/build directory. - - -================================================================================ -Usage, iOS/tvOS -================================================================================ - -CMake 3.14+ natively includes support for iOS and tvOS. SDL binaries may be built -using Xcode or Make, possibly among other build-systems. - -When using a recent version of CMake (3.14+), it should be possible to: - -- build SDL for iOS, both static and dynamic -- build SDL test apps (as iOS/tvOS .app bundles) -- generate a working SDL_config.h for iOS (using SDL_config.h.cmake as a basis) - -To use, set the following CMake variables when running CMake's configuration stage: - -- `CMAKE_SYSTEM_NAME=` (either `iOS` or `tvOS`) -- `CMAKE_OSX_SYSROOT=` (examples: `iphoneos`, `iphonesimulator`, `iphoneos12.4`, `/full/path/to/iPhoneOS.sdk`, - `appletvos`, `appletvsimulator`, `appletvos12.4`, `/full/path/to/AppleTVOS.sdk`, etc.) -- `CMAKE_OSX_ARCHITECTURES=` (example: "arm64;armv7s;x86_64") - - -### Examples (for iOS/tvOS): - -- for iOS-Simulator, using the latest, installed SDK: - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64` - -- for iOS-Device, using the latest, installed SDK, 64-bit only - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64` - -- for iOS-Device, using the latest, installed SDK, mixed 32/64 bit - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s"` - -- for iOS-Device, using a specific SDK revision (iOS 12.4, in this example): - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos12.4 -DCMAKE_OSX_ARCHITECTURES=arm64` - -- for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles): - - `cmake ~/sdl -DSDL_TEST=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64` - -- for tvOS-Simulator, using the latest, installed SDK: - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64` - -- for tvOS-Device, using the latest, installed SDK: - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64` diff --git a/Dependencies/SDL/Windows/docs/README-directfb.md b/Dependencies/SDL/Windows/docs/README-directfb.md deleted file mode 100644 index eeac428..0000000 --- a/Dependencies/SDL/Windows/docs/README-directfb.md +++ /dev/null @@ -1,107 +0,0 @@ -DirectFB -======== - -Supports: - -- Hardware YUV overlays -- OpenGL - software only -- 2D/3D accelerations (depends on directfb driver) -- multiple displays -- windows - -What you need: - -* DirectFB 1.0.1, 1.2.x, 1.3.0 -* Kernel-Framebuffer support: required: vesafb, radeonfb .... -* Mesa 7.0.x - optional for OpenGL - -/etc/directfbrc - -This file should contain the following lines to make -your joystick work and avoid crashes: ------------------------- -disable-module=joystick -disable-module=cle266 -disable-module=cyber5k -no-linux-input-grab ------------------------- - -To disable to use x11 backend when DISPLAY variable is found use - -export SDL_DIRECTFB_X11_CHECK=0 - -To disable the use of linux input devices, i.e. multimice/multikeyboard support, -use - -export SDL_DIRECTFB_LINUX_INPUT=0 - -To use hardware accelerated YUV-overlays for YUV-textures, use: - -export SDL_DIRECTFB_YUV_DIRECT=1 - -This is disabled by default. It will only support one -YUV texture, namely the first. Every other YUV texture will be -rendered in software. - -In addition, you may use (directfb-1.2.x) - -export SDL_DIRECTFB_YUV_UNDERLAY=1 - -to make the YUV texture an underlay. This will make the cursor to -be shown. - -Simple Window Manager -===================== - -The driver has support for a very, very basic window manager you may -want to use when running with "wm=default". Use - -export SDL_DIRECTFB_WM=1 - -to enable basic window borders. In order to have the window title rendered, -you need to have the following font installed: - -/usr/share/fonts/truetype/freefont/FreeSans.ttf - -OpenGL Support -============== - -The following instructions will give you *software* OpenGL. However this -works at least on all directfb supported platforms. - -As of this writing 20100802 you need to pull Mesa from git and do the following: - ------------------------- -git clone git://anongit.freedesktop.org/git/mesa/mesa -cd mesa -git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a ------------------------- - -Edit configs/linux-directfb so that the Directories-section looks like ------------------------- -# Directories -SRC_DIRS = mesa glu -GLU_DIRS = sgi -DRIVER_DIRS = directfb -PROGRAM_DIRS = ------------------------- - -make linux-directfb -make - -echo Installing - please enter sudo pw. - -sudo make install INSTALL_DIR=/usr/local/dfb_GL -cd src/mesa/drivers/directfb -make -sudo make install INSTALL_DIR=/usr/local/dfb_GL ------------------------- - -To run the SDL - testprograms: - -export SDL_VIDEODRIVER=directfb -export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib -export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7 - -./testgl - diff --git a/Dependencies/SDL/Windows/docs/README-dynapi.md b/Dependencies/SDL/Windows/docs/README-dynapi.md deleted file mode 100644 index 40b44db..0000000 --- a/Dependencies/SDL/Windows/docs/README-dynapi.md +++ /dev/null @@ -1,130 +0,0 @@ -Dynamic API -================================================================================ -Originally posted by Ryan at: - https://plus.google.com/103391075724026391227/posts/TB8UfnDYu4U - -Background: - -- The Steam Runtime has (at least in theory) a really kick-ass build of SDL2, - but developers are shipping their own SDL2 with individual Steam games. - These games might stop getting updates, but a newer SDL2 might be needed later. - Certainly we'll always be fixing bugs in SDL, even if a new video target isn't - ever needed, and these fixes won't make it to a game shipping its own SDL. -- Even if we replace the SDL2 in those games with a compatible one, that is to - say, edit a developer's Steam depot (yuck!), there are developers that are - statically linking SDL2 that we can't do this for. We can't even force the - dynamic loader to ignore their SDL2 in this case, of course. -- If you don't ship an SDL2 with the game in some form, people that disabled the - Steam Runtime, or just tried to run the game from the command line instead of - Steam might find themselves unable to run the game, due to a missing dependency. -- If you want to ship on non-Steam platforms like GOG or Humble Bundle, or target - generic Linux boxes that may or may not have SDL2 installed, you have to ship - the library or risk a total failure to launch. So now, you might have to have - a non-Steam build plus a Steam build (that is, one with and one without SDL2 - included), which is inconvenient if you could have had one universal build - that works everywhere. -- We like the zlib license, but the biggest complaint from the open source - community about the license change is the static linking. The LGPL forced this - as a legal, not technical issue, but zlib doesn't care. Even those that aren't - concerned about the GNU freedoms found themselves solving the same problems: - swapping in a newer SDL to an older game often times can save the day. - Static linking stops this dead. - -So here's what we did: - -SDL now has, internally, a table of function pointers. So, this is what SDL_Init -now looks like: - - UInt32 SDL_Init(Uint32 flags) - { - return jump_table.SDL_Init(flags); - } - -Except that is all done with a bunch of macro magic so we don't have to maintain -every one of these. - -What is jump_table.SDL_init()? Eventually, that's a function pointer of the real -SDL_Init() that you've been calling all this time. But at startup, it looks more -like this: - - Uint32 SDL_Init_DEFAULT(Uint32 flags) - { - SDL_InitDynamicAPI(); - return jump_table.SDL_Init(flags); - } - -SDL_InitDynamicAPI() fills in jump_table with all the actual SDL function -pointers, which means that this _DEFAULT function never gets called again. -First call to any SDL function sets the whole thing up. - -So you might be asking, what was the value in that? Isn't this what the operating -system's dynamic loader was supposed to do for us? Yes, but now we've got this -level of indirection, we can do things like this: - - export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0 - ./MyGameThatIsStaticallyLinkedToSDL2 - -And now, this game that is statically linked to SDL, can still be overridden -with a newer, or better, SDL. The statically linked one will only be used as -far as calling into the jump table in this case. But in cases where no override -is desired, the statically linked version will provide its own jump table, -and everyone is happy. - -So now: -- Developers can statically link SDL, and users can still replace it. - (We'd still rather you ship a shared library, though!) -- Developers can ship an SDL with their game, Valve can override it for, say, - new features on SteamOS, or distros can override it for their own needs, - but it'll also just work in the default case. -- Developers can ship the same package to everyone (Humble Bundle, GOG, etc), - and it'll do the right thing. -- End users (and Valve) can update a game's SDL in almost any case, - to keep abandoned games running on newer platforms. -- Everyone develops with SDL exactly as they have been doing all along. - Same headers, same ABI. Just get the latest version to enable this magic. - - -A little more about SDL_InitDynamicAPI(): - -Internally, InitAPI does some locking to make sure everything waits until a -single thread initializes everything (although even SDL_CreateThread() goes -through here before spinning a thread, too), and then decides if it should use -an external SDL library. If not, it sets up the jump table using the current -SDL's function pointers (which might be statically linked into a program, or in -a shared library of its own). If so, it loads that library and looks for and -calls a single function: - - SInt32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize); - -That function takes a version number (more on that in a moment), the address of -the jump table, and the size, in bytes, of the table. -Now, we've got policy here: this table's layout never changes; new stuff gets -added to the end. Therefore SDL_DYNAPI_entry() knows that it can provide all -the needed functions if tablesize <= sizeof its own jump table. If tablesize is -bigger (say, SDL 2.0.4 is trying to load SDL 2.0.3), then we know to abort, but -if it's smaller, we know we can provide the entire API that the caller needs. - -The version variable is a failsafe switch. -Right now it's always 1. This number changes when there are major API changes -(so we know if the tablesize might be smaller, or entries in it have changed). -Right now SDL_DYNAPI_entry gives up if the version doesn't match, but it's not -inconceivable to have a small dispatch library that only supplies this one -function and loads different, otherwise-incompatible SDL libraries and has the -right one initialize the jump table based on the version. For something that -must generically catch lots of different versions of SDL over time, like the -Steam Client, this isn't a bad option. - -Finally, I'm sure some people are reading this and thinking, -"I don't want that overhead in my project!" -To which I would point out that the extra function call through the jump table -probably wouldn't even show up in a profile, but lucky you: this can all be -disabled. You can build SDL without this if you absolutely must, but we would -encourage you not to do that. However, on heavily locked down platforms like -iOS, or maybe when debugging, it makes sense to disable it. The way this is -designed in SDL, you just have to change one #define, and the entire system -vaporizes out, and SDL functions exactly like it always did. Most of it is -macro magic, so the system is contained to one C file and a few headers. -However, this is on by default and you have to edit a header file to turn it -off. Our hopes is that if we make it easy to disable, but not too easy, -everyone will ultimately be able to get what they want, but we've gently -nudged everyone towards what we think is the best solution. diff --git a/Dependencies/SDL/Windows/docs/README-emscripten.md b/Dependencies/SDL/Windows/docs/README-emscripten.md deleted file mode 100644 index b535cc6..0000000 --- a/Dependencies/SDL/Windows/docs/README-emscripten.md +++ /dev/null @@ -1,35 +0,0 @@ -Emscripten -================================================================================ - -Build: - - $ mkdir build - $ cd build - $ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2" - $ emmake make - -Or with cmake: - - $ mkdir build - $ cd build - $ emcmake cmake .. - $ emmake make - -To build one of the tests: - - $ cd test/ - $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html - -Uses GLES2 renderer or software - -Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere): - -SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/): - - $ EMCONFIGURE_JS=1 emconfigure ../configure - build as usual... - -SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx): - - $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx - build as usual... diff --git a/Dependencies/SDL/Windows/docs/README-gesture.md b/Dependencies/SDL/Windows/docs/README-gesture.md deleted file mode 100644 index 7e9f95b..0000000 --- a/Dependencies/SDL/Windows/docs/README-gesture.md +++ /dev/null @@ -1,71 +0,0 @@ -Dollar Gestures -=========================================================================== -SDL provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures. - -Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up. - -Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID. - -Recording: ----------- -To begin recording on a touch device call: -SDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices. - -Recording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event. -A SDL_DOLLARRECORD event is a dgesture with the following fields: - -* event.dgesture.touchId - the Id of the touch used to record the gesture. -* event.dgesture.gestureId - the unique id of the recorded gesture. - - -Performing: ------------ -As long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields: - -* event.dgesture.touchId - the Id of the touch which performed the gesture. -* event.dgesture.gestureId - the unique id of the closest gesture to the performed stroke. -* event.dgesture.error - the difference between the gesture template and the actual performed gesture. Lower error is a better match. -* event.dgesture.numFingers - the number of fingers used to draw the stroke. - -Most programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed). - - - -Saving: -------- -To save a template, call SDL_SaveDollarTemplate(gestureId, dst) where gestureId is the id of the gesture you want to save, and dst is an SDL_RWops pointer to the file where the gesture will be stored. - -To save all currently loaded templates, call SDL_SaveAllDollarTemplates(dst) where dst is an SDL_RWops pointer to the file where the gesture will be stored. - -Both functions return the number of gestures successfully saved. - - -Loading: --------- -To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file. - -SDL_LoadDollarTemplates returns the number of templates successfully loaded. - - - -=========================================================================== -Multi Gestures -=========================================================================== -SDL provides simple support for pinch/rotate/swipe gestures. -Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields: - -* event.mgesture.touchId - the Id of the touch on which the gesture was performed. -* event.mgesture.x - the normalized x coordinate of the gesture. (0..1) -* event.mgesture.y - the normalized y coordinate of the gesture. (0..1) -* event.mgesture.dTheta - the amount that the fingers rotated during this motion. -* event.mgesture.dDist - the amount that the fingers pinched during this motion. -* event.mgesture.numFingers - the number of fingers used in the gesture. - - -=========================================================================== -Notes -=========================================================================== -For a complete example see test/testgesture.c - -Please direct questions/comments to: - jim.tla+sdl_touch@gmail.com diff --git a/Dependencies/SDL/Windows/docs/README-hg.md b/Dependencies/SDL/Windows/docs/README-hg.md deleted file mode 100644 index 5f3d259..0000000 --- a/Dependencies/SDL/Windows/docs/README-hg.md +++ /dev/null @@ -1,22 +0,0 @@ -Mercurial -========= - -The latest development version of SDL is available via Mercurial. -Mercurial allows you to get up-to-the-minute fixes and enhancements; -as a developer works on a source tree, you can use "hg" to mirror that -source tree instead of waiting for an official release. Please look -at the Mercurial website ( https://www.mercurial-scm.org/ ) for more -information on using hg, where you can also download software for -Mac OS X, Windows, and Unix systems. - - hg clone http://hg.libsdl.org/SDL - -If you are building SDL via configure, you will need to run autogen.sh -before running configure. - -There is a web interface to the subversion repository at: - http://hg.libsdl.org/SDL/ - -There is an RSS feed available at that URL, for those that want to -track commits in real time. - diff --git a/Dependencies/SDL/Windows/docs/README-ios.md b/Dependencies/SDL/Windows/docs/README-ios.md deleted file mode 100644 index bf34fe4..0000000 --- a/Dependencies/SDL/Windows/docs/README-ios.md +++ /dev/null @@ -1,284 +0,0 @@ -iOS -====== - -============================================================================== -Building the Simple DirectMedia Layer for iOS 5.1+ -============================================================================== - -Requirements: Mac OS X 10.8 or later and the iOS 7+ SDK. - -Instructions: - -1. Open SDL.xcodeproj (located in Xcode-iOS/SDL) in Xcode. -2. Select your desired target, and hit build. - -There are three build targets: -- libSDL.a: - Build SDL as a statically linked library -- testsdl: - Build a test program (there are known test failures which are fine) -- Template: - Package a project template together with the SDL for iPhone static libraries and copies of the SDL headers. The template includes proper references to the SDL library and headers, skeleton code for a basic SDL program, and placeholder graphics for the application icon and startup screen. - - -============================================================================== -Build SDL for iOS from the command line -============================================================================== - -1. cd (PATH WHERE THE SDL CODE IS)/build-scripts -2. ./iosbuild.sh - -If everything goes fine, you should see a build/ios directory, inside there's -two directories "lib" and "include". -"include" contains a copy of the SDL headers that you'll need for your project, -make sure to configure XCode to look for headers there. -"lib" contains find two files, libSDL2.a and libSDL2main.a, you have to add both -to your XCode project. These libraries contain three architectures in them, -armv6 for legacy devices, armv7, and i386 (for the simulator). -By default, iosbuild.sh will autodetect the SDK version you have installed using -xcodebuild -showsdks, and build for iOS >= 3.0, you can override this behaviour -by setting the MIN_OS_VERSION variable, ie: - -MIN_OS_VERSION=4.2 ./iosbuild.sh - -============================================================================== -Using the Simple DirectMedia Layer for iOS -============================================================================== - -FIXME: This needs to be updated for the latest methods - -Here is the easiest method: -1. Build the SDL library (libSDL2.a) and the iPhone SDL Application template. -2. Install the iPhone SDL Application template by copying it to one of Xcode's template directories. I recommend creating a directory called "SDL" in "/Developer/Platforms/iOS.platform/Developer/Library/Xcode/Project Templates/" and placing it there. -3. Start a new project using the template. The project should be immediately ready for use with SDL. - -Here is a more manual method: -1. Create a new iOS view based application. -2. Build the SDL static library (libSDL2.a) for iOS and include them in your project. Xcode will ignore the library that is not currently of the correct architecture, hence your app will work both on iOS and in the iOS Simulator. -3. Include the SDL header files in your project. -4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iOS provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iOS produces its user interface programmatically. -5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell Xcode not to use the project prefix file, as it includes Objective-C code. - -============================================================================== -Notes -- Retina / High-DPI and window sizes -============================================================================== - -Window and display mode sizes in SDL are in "screen coordinates" (or "points", -in Apple's terminology) rather than in pixels. On iOS this means that a window -created on an iPhone 6 will have a size in screen coordinates of 375 x 667, -rather than a size in pixels of 750 x 1334. All iOS apps are expected to -size their content based on screen coordinates / points rather than pixels, -as this allows different iOS devices to have different pixel densities -(Retina versus non-Retina screens, etc.) without apps caring too much. - -By default SDL will not use the full pixel density of the screen on -Retina/high-dpi capable devices. Use the SDL_WINDOW_ALLOW_HIGHDPI flag when -creating your window to enable high-dpi support. - -When high-dpi support is enabled, SDL_GetWindowSize() and display mode sizes -will still be in "screen coordinates" rather than pixels, but the window will -have a much greater pixel density when the device supports it, and the -SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() functions (depending on -whether raw OpenGL or the SDL_Render API is used) can be queried to determine -the size in pixels of the drawable screen framebuffer. - -Some OpenGL ES functions such as glViewport expect sizes in pixels rather than -sizes in screen coordinates. When doing 2D rendering with OpenGL ES, an -orthographic projection matrix using the size in screen coordinates -(SDL_GetWindowSize()) can be used in order to display content at the same scale -no matter whether a Retina device is used or not. - -============================================================================== -Notes -- Application events -============================================================================== - -On iOS the application goes through a fixed life cycle and you will get -notifications of state changes via application events. When these events -are delivered you must handle them in an event callback because the OS may -not give you any processing time after the events are delivered. - -e.g. - - int HandleAppEvents(void *userdata, SDL_Event *event) - { - switch (event->type) - { - case SDL_APP_TERMINATING: - /* Terminate the app. - Shut everything down before returning from this function. - */ - return 0; - case SDL_APP_LOWMEMORY: - /* You will get this when your app is paused and iOS wants more memory. - Release as much memory as possible. - */ - return 0; - case SDL_APP_WILLENTERBACKGROUND: - /* Prepare your app to go into the background. Stop loops, etc. - This gets called when the user hits the home button, or gets a call. - */ - return 0; - case SDL_APP_DIDENTERBACKGROUND: - /* This will get called if the user accepted whatever sent your app to the background. - If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops. - When you get this, you have 5 seconds to save all your state or the app will be terminated. - Your app is NOT active at this point. - */ - return 0; - case SDL_APP_WILLENTERFOREGROUND: - /* This call happens when your app is coming back to the foreground. - Restore all your state here. - */ - return 0; - case SDL_APP_DIDENTERFOREGROUND: - /* Restart your loops here. - Your app is interactive and getting CPU again. - */ - return 0; - default: - /* No special processing, add it to the event queue */ - return 1; - } - } - - int main(int argc, char *argv[]) - { - SDL_SetEventFilter(HandleAppEvents, NULL); - - ... run your main loop - - return 0; - } - - -============================================================================== -Notes -- Accelerometer as Joystick -============================================================================== - -SDL for iPhone supports polling the built in accelerometer as a joystick device. For an example on how to do this, see the accelerometer.c in the demos directory. - -The main thing to note when using the accelerometer with SDL is that while the iPhone natively reports accelerometer as floating point values in units of g-force, SDL_JoystickGetAxis() reports joystick values as signed integers. Hence, in order to convert between the two, some clamping and scaling is necessary on the part of the iPhone SDL joystick driver. To convert SDL_JoystickGetAxis() reported values BACK to units of g-force, simply multiply the values by SDL_IPHONE_MAX_GFORCE / 0x7FFF. - -============================================================================== -Notes -- OpenGL ES -============================================================================== - -Your SDL application for iOS uses OpenGL ES for video by default. - -OpenGL ES for iOS supports several display pixel formats, such as RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute(). - -If your application doesn't use OpenGL's depth buffer, you may find significant performance improvement by setting SDL_GL_DEPTH_SIZE to 0. - -Finally, if your application completely redraws the screen each frame, you may find significant performance improvement by setting the attribute SDL_GL_RETAINED_BACKING to 0. - -OpenGL ES on iOS doesn't use the traditional system-framebuffer setup provided in other operating systems. Special care must be taken because of this: - -- The drawable Renderbuffer must be bound to the GL_RENDERBUFFER binding point when SDL_GL_SwapWindow() is called. -- The drawable Framebuffer Object must be bound while rendering to the screen and when SDL_GL_SwapWindow() is called. -- If multisample antialiasing (MSAA) is used and glReadPixels is used on the screen, the drawable framebuffer must be resolved to the MSAA resolve framebuffer (via glBlitFramebuffer or glResolveMultisampleFramebufferAPPLE), and the MSAA resolve framebuffer must be bound to the GL_READ_FRAMEBUFFER binding point, before glReadPixels is called. - -The above objects can be obtained via SDL_GetWindowWMInfo() (in SDL_syswm.h). - -============================================================================== -Notes -- Keyboard -============================================================================== - -The SDL keyboard API has been extended to support on-screen keyboards: - -void SDL_StartTextInput() - -- enables text events and reveals the onscreen keyboard. - -void SDL_StopTextInput() - -- disables text events and hides the onscreen keyboard. - -SDL_bool SDL_IsTextInputActive() - -- returns whether or not text events are enabled (and the onscreen keyboard is visible) - - -============================================================================== -Notes -- Reading and Writing files -============================================================================== - -Each application installed on iPhone resides in a sandbox which includes its own Application Home directory. Your application may not access files outside this directory. - -Once your application is installed its directory tree looks like: - - MySDLApp Home/ - MySDLApp.app - Documents/ - Library/ - Preferences/ - tmp/ - -When your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored. You cannot write to this directory. Instead, I advise you to write document files to "../Documents/" and preferences to "../Library/Preferences". - -More information on this subject is available here: -http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html - -============================================================================== -Notes -- iPhone SDL limitations -============================================================================== - -Windows: - Full-size, single window applications only. You cannot create multi-window SDL applications for iPhone OS. The application window will fill the display, though you have the option of turning on or off the menu-bar (pass SDL_CreateWindow() the flag SDL_WINDOW_BORDERLESS). - -Textures: - The optimal texture formats on iOS are SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, and SDL_PIXELFORMAT_RGB24 pixel formats. - -Loading Shared Objects: - This is disabled by default since it seems to break the terms of the iOS SDK agreement for iOS versions prior to iOS 8. It can be re-enabled in SDL_config_iphoneos.h. - -============================================================================== -Game Center -============================================================================== - -Game Center integration might require that you break up your main loop in order to yield control back to the system. In other words, instead of running an endless main loop, you run each frame in a callback function, using: - - int SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam); - -This will set up the given function to be called back on the animation callback, and then you have to return from main() to let the Cocoa event loop run. - -e.g. - - extern "C" - void ShowFrame(void*) - { - ... do event handling, frame logic and rendering ... - } - - int main(int argc, char *argv[]) - { - ... initialize game ... - - #if __IPHONEOS__ - // Initialize the Game Center for scoring and matchmaking - InitGameCenter(); - - // Set up the game to run in the window animation callback on iOS - // so that Game Center and so forth works correctly. - SDL_iPhoneSetAnimationCallback(window, 1, ShowFrame, NULL); - #else - while ( running ) { - ShowFrame(0); - DelayFrame(); - } - #endif - return 0; - } - -============================================================================== -Deploying to older versions of iOS -============================================================================== - -SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 6.1 - -In order to do that you need to download an older version of Xcode: -https://developer.apple.com/download/more/?name=Xcode - -Open the package contents of the older Xcode and your newer version of Xcode and copy over the folders in Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport - -Then open the file Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist and add the versions of iOS you want to deploy to the key Root/DefaultProperties/DEPLOYMENT_TARGET_SUGGESTED_VALUES - -Open your project and set your deployment target to the desired version of iOS - -Finally, remove GameController from the list of frameworks linked by your application and edit the build settings for "Other Linker Flags" and add -weak_framework GameController diff --git a/Dependencies/SDL/Windows/docs/README-linux.md b/Dependencies/SDL/Windows/docs/README-linux.md deleted file mode 100644 index 10f80b9..0000000 --- a/Dependencies/SDL/Windows/docs/README-linux.md +++ /dev/null @@ -1,87 +0,0 @@ -Linux -================================================================================ - -By default SDL will only link against glibc, the rest of the features will be -enabled dynamically at runtime depending on the available features on the target -system. So, for example if you built SDL with Xinerama support and the target -system does not have the Xinerama libraries installed, it will be disabled -at runtime, and you won't get a missing library error, at least with the -default configuration parameters. - - -================================================================================ -Build Dependencies -================================================================================ - -Ubuntu 13.04, all available features enabled: - -sudo apt-get install build-essential mercurial make cmake autoconf automake \ -libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \ -libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \ -libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \ -libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \ -fcitx-libs-dev libsamplerate0-dev libsndio-dev - -Ubuntu 16.04+ can also add "libwayland-dev libxkbcommon-dev wayland-protocols" -to that command line for Wayland support. - -NOTES: -- This includes all the audio targets except arts, because Ubuntu pulled the - artsc0-dev package, but in theory SDL still supports it. -- libsamplerate0-dev lets SDL optionally link to libresamplerate at runtime - for higher-quality audio resampling. SDL will work without it if the library - is missing, so it's safe to build in support even if the end user doesn't - have this library installed. -- DirectFB isn't included because the configure script (currently) fails to find - it at all. You can do "sudo apt-get install libdirectfb-dev" and fix the - configure script to include DirectFB support. Send patches. :) - - -================================================================================ -Joystick does not work -================================================================================ - -If you compiled or are using a version of SDL with udev support (and you should!) -there's a few issues that may cause SDL to fail to detect your joystick. To -debug this, start by installing the evtest utility. On Ubuntu/Debian: - - sudo apt-get install evtest - -Then run: - - sudo evtest - -You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX" -Now run: - - cat /dev/input/event/XX - -If you get a permission error, you need to set a udev rule to change the mode of -your device (see below) - -Also, try: - - sudo udevadm info --query=all --name=input/eventXX - -If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it, -you need to set up an udev rule to force this variable. - -A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks -like: - - SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1" - SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1" - -You can set up similar rules for your device by changing the values listed in -idProduct and idVendor. To obtain these values, try: - - sudo udevadm info -a --name=input/eventXX | grep idVendor - sudo udevadm info -a --name=input/eventXX | grep idProduct - -If multiple values come up for each of these, the one you want is the first one of each. - -On other systems which ship with an older udev (such as CentOS), you may need -to set up a rule such as: - - SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1" - diff --git a/Dependencies/SDL/Windows/docs/README-macosx.md b/Dependencies/SDL/Windows/docs/README-macosx.md deleted file mode 100644 index ee4f669..0000000 --- a/Dependencies/SDL/Windows/docs/README-macosx.md +++ /dev/null @@ -1,240 +0,0 @@ -Mac OS X -============================================================================== - -These instructions are for people using Apple's Mac OS X (pronounced -"ten"). - -From the developer's point of view, OS X is a sort of hybrid Mac and -Unix system, and you have the option of using either traditional -command line tools or Apple's IDE Xcode. - -Command Line Build -================== - -To build SDL using the command line, use the standard configure and make -process: - - ./configure - make - sudo make install - -You can also build SDL as a Universal library (a single binary for both -32-bit and 64-bit Intel architectures), on Mac OS X 10.7 and newer, by using -the gcc-fat.sh script in build-scripts: - - mkdir mybuild - cd mybuild - CC=$PWD/../build-scripts/gcc-fat.sh CXX=$PWD/../build-scripts/g++-fat.sh ../configure - make - sudo make install - -This script builds SDL with 10.5 ABI compatibility on i386 and 10.6 -ABI compatibility on x86_64 architectures. For best compatibility you -should compile your application the same way. - -Please note that building SDL requires at least Xcode 4.6 and the 10.7 SDK -(even if you target back to 10.5 systems). PowerPC support for Mac OS X has -been officially dropped as of SDL 2.0.2. - -To use the library once it's built, you essential have two possibilities: -use the traditional autoconf/automake/make method, or use Xcode. - -============================================================================== -Caveats for using SDL with Mac OS X -============================================================================== - -Some things you have to be aware of when using SDL on Mac OS X: - -- If you register your own NSApplicationDelegate (using [NSApp setDelegate:]), - SDL will not register its own. This means that SDL will not terminate using - SDL_Quit if it receives a termination request, it will terminate like a - normal app, and it will not send a SDL_DROPFILE when you request to open a - file with the app. To solve these issues, put the following code in your - NSApplicationDelegate implementation: - - - - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender - { - if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) { - SDL_Event event; - event.type = SDL_QUIT; - SDL_PushEvent(&event); - } - - return NSTerminateCancel; - } - - - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename - { - if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) { - SDL_Event event; - event.type = SDL_DROPFILE; - event.drop.file = SDL_strdup([filename UTF8String]); - return (SDL_PushEvent(&event) > 0); - } - - return NO; - } - -============================================================================== -Using the Simple DirectMedia Layer with a traditional Makefile -============================================================================== - -An existing autoconf/automake build system for your SDL app has good chances -to work almost unchanged on OS X. However, to produce a "real" Mac OS X binary -that you can distribute to users, you need to put the generated binary into a -so called "bundle", which basically is a fancy folder with a name like -"MyCoolGame.app". - -To get this build automatically, add something like the following rule to -your Makefile.am: - - bundle_contents = APP_NAME.app/Contents - APP_NAME_bundle: EXE_NAME - mkdir -p $(bundle_contents)/MacOS - mkdir -p $(bundle_contents)/Resources - echo "APPL????" > $(bundle_contents)/PkgInfo - $(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/ - -You should replace EXE_NAME with the name of the executable. APP_NAME is what -will be visible to the user in the Finder. Usually it will be the same -as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME -usually is "TestGame". You might also want to use `@PACKAGE@` to use the package -name as specified in your configure.ac file. - -If your project builds more than one application, you will have to do a bit -more. For each of your target applications, you need a separate rule. - -If you want the created bundles to be installed, you may want to add this -rule to your Makefile.am: - - install-exec-hook: APP_NAME_bundle - rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app - mkdir -p $(DESTDIR)$(prefix)/Applications/ - cp -r $< /$(DESTDIR)$(prefix)Applications/ - -This rule takes the Bundle created by the rule from step 3 and installs them -into "$(DESTDIR)$(prefix)/Applications/". - -Again, if you want to install multiple applications, you will have to augment -the make rule accordingly. - - -But beware! That is only part of the story! With the above, you end up with -a bare bone .app bundle, which is double clickable from the Finder. But -there are some more things you should do before shipping your product... - -1) The bundle right now probably is dynamically linked against SDL. That - means that when you copy it to another computer, *it will not run*, - unless you also install SDL on that other computer. A good solution - for this dilemma is to static link against SDL. On OS X, you can - achieve that by linking against the libraries listed by - - sdl-config --static-libs - - instead of those listed by - - sdl-config --libs - - Depending on how exactly SDL is integrated into your build systems, the - way to achieve that varies, so I won't describe it here in detail - -2) Add an 'Info.plist' to your application. That is a special XML file which - contains some meta-information about your application (like some copyright - information, the version of your app, the name of an optional icon file, - and other things). Part of that information is displayed by the Finder - when you click on the .app, or if you look at the "Get Info" window. - More information about Info.plist files can be found on Apple's homepage. - - -As a final remark, let me add that I use some of the techniques (and some -variations of them) in Exult and ScummVM; both are available in source on -the net, so feel free to take a peek at them for inspiration! - - -============================================================================== -Using the Simple DirectMedia Layer with Xcode -============================================================================== - -These instructions are for using Apple's Xcode IDE to build SDL applications. - -- First steps - -The first thing to do is to unpack the Xcode.tar.gz archive in the -top level SDL directory (where the Xcode.tar.gz archive resides). -Because Stuffit Expander will unpack the archive into a subdirectory, -you should unpack the archive manually from the command line: - - cd [path_to_SDL_source] - tar zxf Xcode.tar.gz - -This will create a new folder called Xcode, which you can browse -normally from the Finder. - -- Building the Framework - -The SDL Library is packaged as a framework bundle, an organized -relocatable folder hierarchy of executable code, interface headers, -and additional resources. For practical purposes, you can think of a -framework as a more user and system-friendly shared library, whose library -file behaves more or less like a standard UNIX shared library. - -To build the framework, simply open the framework project and build it. -By default, the framework bundle "SDL.framework" is installed in -/Library/Frameworks. Therefore, the testers and project stationary expect -it to be located there. However, it will function the same in any of the -following locations: - - ~/Library/Frameworks - /Local/Library/Frameworks - /System/Library/Frameworks - -- Build Options - There are two "Build Styles" (See the "Targets" tab) for SDL. - "Deployment" should be used if you aren't tweaking the SDL library. - "Development" should be used to debug SDL apps or the library itself. - -- Building the Testers - Open the SDLTest project and build away! - -- Using the Project Stationary - Copy the stationary to the indicated folders to access it from - the "New Project" and "Add target" menus. What could be easier? - -- Setting up a new project by hand - Some of you won't want to use the Stationary so I'll give some tips: - * Create a new "Cocoa Application" - * Add src/main/macosx/SDLMain.m , .h and .nib to your project - * Remove "main.c" from your project - * Remove "MainMenu.nib" from your project - * Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path - * Add "$(HOME)/Library/Frameworks" to the frameworks search path - * Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS" - * Set the "Main Nib File" under "Application Settings" to "SDLMain.nib" - * Add your files - * Clean and build - -- Building from command line - Use pbxbuild in the same directory as your .pbproj file - -- Running your app - You can send command line args to your app by either invoking it from - the command line (in *.app/Contents/MacOS) or by entering them in the - "Executables" panel of the target settings. - -- Implementation Notes - Some things that may be of interest about how it all works... - * Working directory - As defined in the SDL_main.m file, the working directory of your SDL app - is by default set to its parent. You may wish to change this to better - suit your needs. - * You have a Cocoa App! - Your SDL app is essentially a Cocoa application. When your app - starts up and the libraries finish loading, a Cocoa procedure is called, - which sets up the working directory and calls your main() method. - You are free to modify your Cocoa app with generally no consequence - to SDL. You cannot, however, easily change the SDL window itself. - Functionality may be added in the future to help this. - - -Known bugs are listed in the file "BUGS.txt". diff --git a/Dependencies/SDL/Windows/docs/README-nacl.md b/Dependencies/SDL/Windows/docs/README-nacl.md deleted file mode 100644 index 53ada33..0000000 --- a/Dependencies/SDL/Windows/docs/README-nacl.md +++ /dev/null @@ -1,103 +0,0 @@ -Native Client -================================================================================ - -Requirements: - -* Native Client SDK (https://developer.chrome.com/native-client), - (tested with Pepper version 33 or higher). - -The SDL backend for Chrome's Native Client has been tested only with the PNaCl -toolchain, which generates binaries designed to run on ARM and x86_32/64 -platforms. This does not mean it won't work with the other toolchains! - -================================================================================ -Building SDL for NaCl -================================================================================ - -Set up the right environment variables (see naclbuild.sh), then configure SDL with: - - configure --host=pnacl --prefix some/install/destination - -Then "make". - -As an example of how to create a deployable app a Makefile project is provided -in test/nacl/Makefile, which includes some monkey patching of the common.mk file -provided by NaCl, without which linking properly to SDL won't work (the search -path can't be modified externally, so the linker won't find SDL's binaries unless -you dump them into the SDK path, which is inconvenient). -Also provided in test/nacl is the required support file, such as index.html, -manifest.json, etc. -SDL apps for NaCl run on a worker thread using the ppapi_simple infrastructure. -This allows for blocking calls on all the relevant systems (OpenGL ES, filesystem), -hiding the asynchronous nature of the browser behind the scenes...which is not the -same as making it disappear! - - -================================================================================ -Running tests -================================================================================ - -Due to the nature of NaCl programs, building and running SDL tests is not as -straightforward as one would hope. The script naclbuild.sh in build-scripts -automates the process and should serve as a guide for users of SDL trying to build -their own applications. - -Basic usage: - - ./naclbuild.sh path/to/pepper/toolchain (i.e. ~/naclsdk/pepper_35) - -This will build testgles2.c by default. - -If you want to build a different test, for example testrendercopyex.c: - - SOURCES=~/sdl/SDL/test/testrendercopyex.c ./naclbuild.sh ~/naclsdk/pepper_35 - -Once the build finishes, you have to serve the contents with a web server (the -script will give you instructions on how to do that with Python). - -================================================================================ -RWops and nacl_io -================================================================================ - -SDL_RWops work transparently with nacl_io. Two functions control the mount points: - - int mount(const char* source, const char* target, - const char* filesystemtype, - unsigned long mountflags, const void *data); - int umount(const char *target); - - For convenience, SDL will by default mount an httpfs tree at / before calling -the app's main function. Such setting can be overridden by calling: - - umount("/"); - -And then mounting a different filesystem at / - -It's important to consider that the asynchronous nature of file operations on a -browser is hidden from the application, effectively providing the developer with -a set of blocking file operations just like you get in a regular desktop -environment, which eases the job of porting to Native Client, but also introduces -a set of challenges of its own, in particular when big file sizes and slow -connections are involved. - -For more information on how nacl_io and mount points work, see: - - https://developer.chrome.com/native-client/devguide/coding/nacl_io - https://src.chromium.org/chrome/trunk/src/native_client_sdk/src/libraries/nacl_io/nacl_io.h - -To be able to save into the directory "/save/" (like backup of game) : - - mount("", "/save", "html5fs", 0, "type=PERSISTENT"); - -And add to manifest.json : - - "permissions": [ - "unlimitedStorage" - ] - -================================================================================ -TODO - Known Issues -================================================================================ -* Testing of all systems with a real application (something other than SDL's tests) -* Key events don't seem to work properly - diff --git a/Dependencies/SDL/Windows/docs/README-pandora.md b/Dependencies/SDL/Windows/docs/README-pandora.md deleted file mode 100644 index a027763..0000000 --- a/Dependencies/SDL/Windows/docs/README-pandora.md +++ /dev/null @@ -1,17 +0,0 @@ -Pandora -===================================================================== - -( http://openpandora.org/ ) -- A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES -support to work on the pandora under the framebuffer. This driver do not have -input support for now, so if you use it you will have to add your own control code. -The video driver name is "pandora" so if you have problem running it from -the framebuffer, try to set the following variable before starting your application : -"export SDL_VIDEODRIVER=pandora" - -- OpenGL ES support was added to the x11 driver, so it's working like the normal -x11 driver one with OpenGLX support, with SDL input event's etc.. - - -David Carré (Cpasjuste) -cpasjuste@gmail.com diff --git a/Dependencies/SDL/Windows/docs/README-platforms.md b/Dependencies/SDL/Windows/docs/README-platforms.md deleted file mode 100644 index 711557d..0000000 --- a/Dependencies/SDL/Windows/docs/README-platforms.md +++ /dev/null @@ -1,8 +0,0 @@ -Platforms -========= - -We maintain the list of supported platforms on our wiki now, and how to -build and install SDL for those platforms: - - https://wiki.libsdl.org/Installation - diff --git a/Dependencies/SDL/Windows/docs/README-porting.md b/Dependencies/SDL/Windows/docs/README-porting.md deleted file mode 100644 index de30592..0000000 --- a/Dependencies/SDL/Windows/docs/README-porting.md +++ /dev/null @@ -1,68 +0,0 @@ -Porting -======= - -* Porting To A New Platform - - The first thing you have to do when porting to a new platform, is look at -include/SDL_platform.h and create an entry there for your operating system. -The standard format is "__PLATFORM__", where PLATFORM is the name of the OS. -Ideally SDL_platform.h will be able to auto-detect the system it's building -on based on C preprocessor symbols. - -There are two basic ways of building SDL at the moment: - -1. The "UNIX" way: ./configure; make; make install - - If you have a GNUish system, then you might try this. Edit configure.ac, - take a look at the large section labelled: - - "Set up the configuration based on the host platform!" - - Add a section for your platform, and then re-run autogen.sh and build! - -2. Using an IDE: - - If you're using an IDE or other non-configure build system, you'll probably - want to create a custom SDL_config.h for your platform. Edit SDL_config.h, - add a section for your platform, and create a custom SDL_config_{platform}.h, - based on SDL_config_minimal.h and SDL_config.h.in - - Add the top level include directory to the header search path, and then add - the following sources to the project: - - src/*.c - src/atomic/*.c - src/audio/*.c - src/cpuinfo/*.c - src/events/*.c - src/file/*.c - src/haptic/*.c - src/joystick/*.c - src/power/*.c - src/render/*.c - src/render/software/*.c - src/stdlib/*.c - src/thread/*.c - src/timer/*.c - src/video/*.c - src/audio/disk/*.c - src/audio/dummy/*.c - src/filesystem/dummy/*.c - src/video/dummy/*.c - src/haptic/dummy/*.c - src/joystick/dummy/*.c - src/main/dummy/*.c - src/thread/generic/*.c - src/timer/dummy/*.c - src/loadso/dummy/*.c - - -Once you have a working library without any drivers, you can go back to each -of the major subsystems and start implementing drivers for your platform. - -If you have any questions, don't hesitate to ask on the SDL mailing list: - http://www.libsdl.org/mailing-list.php - -Enjoy! - Sam Lantinga (slouken@libsdl.org) - diff --git a/Dependencies/SDL/Windows/docs/README-psp.md b/Dependencies/SDL/Windows/docs/README-psp.md deleted file mode 100644 index e891136..0000000 --- a/Dependencies/SDL/Windows/docs/README-psp.md +++ /dev/null @@ -1,19 +0,0 @@ -PSP -====== -SDL port for the Sony PSP contributed by - Captian Lex - -Credit to - Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP - Geecko for his PSP GU lib "Glib2d" - -Building --------- -To build for the PSP, make sure psp-config is in the path and run: - make -f Makefile.psp - - - -To Do ------- -PSP Screen Keyboard diff --git a/Dependencies/SDL/Windows/docs/README-raspberrypi.md b/Dependencies/SDL/Windows/docs/README-raspberrypi.md deleted file mode 100644 index 5e23ad5..0000000 --- a/Dependencies/SDL/Windows/docs/README-raspberrypi.md +++ /dev/null @@ -1,188 +0,0 @@ -Raspberry Pi -================================================================================ - -Requirements: - -Raspbian (other Linux distros may work as well). - -================================================================================ - Features -================================================================================ - -* Works without X11 -* Hardware accelerated OpenGL ES 2.x -* Sound via ALSA -* Input (mouse/keyboard/joystick) via EVDEV -* Hotplugging of input devices via UDEV - - -================================================================================ - Raspbian Build Dependencies -================================================================================ - -sudo apt-get install libudev-dev libasound2-dev libdbus-1-dev - -You also need the VideoCore binary stuff that ships in /opt/vc for EGL and -OpenGL ES 2.x, it usually comes pre-installed, but in any case: - -sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev - - -================================================================================ - NEON -================================================================================ - -If your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so -that SDL will select some otherwise-disabled highly-optimized code. The -original Pi units don't have NEON, the Pi2 probably does, and the Pi3 -definitely does. - -================================================================================ - Cross compiling from x86 Linux -================================================================================ - -To cross compile SDL for Raspbian from your desktop machine, you'll need a -Raspbian system root and the cross compilation tools. We'll assume these tools -will be placed in /opt/rpi-tools - - sudo git clone --depth 1 https://github.com/raspberrypi/tools /opt/rpi-tools - -You'll also need a Raspbian binary image. -Get it from: http://downloads.raspberrypi.org/raspbian_latest -After unzipping, you'll get file with a name like: "-wheezy-raspbian.img" -Let's assume the sysroot will be built in /opt/rpi-sysroot. - - export SYSROOT=/opt/rpi-sysroot - sudo kpartx -a -v .img - sudo mount -o loop /dev/mapper/loop0p2 /mnt - sudo cp -r /mnt $SYSROOT - sudo apt-get install qemu binfmt-support qemu-user-static - sudo cp /usr/bin/qemu-arm-static $SYSROOT/usr/bin - sudo mount --bind /dev $SYSROOT/dev - sudo mount --bind /proc $SYSROOT/proc - sudo mount --bind /sys $SYSROOT/sys - -Now, before chrooting into the ARM sysroot, you'll need to apply a workaround, -edit $SYSROOT/etc/ld.so.preload and comment out all lines in it. - - sudo chroot $SYSROOT - apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev - exit - sudo umount $SYSROOT/dev - sudo umount $SYSROOT/proc - sudo umount $SYSROOT/sys - sudo umount /mnt - -There's one more fix required, as the libdl.so symlink uses an absolute path -which doesn't quite work in our setup. - - sudo rm -rf $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so - sudo ln -s ../../../lib/arm-linux-gnueabihf/libdl.so.2 $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so - -The final step is compiling SDL itself. - - export CC="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux" - cd - mkdir -p build;cd build - LDFLAGS="-L$SYSROOT/opt/vc/lib" ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd - make - make install - -To be able to deploy this to /usr/local in the Raspbian system you need to fix up a few paths: - - perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config - -================================================================================ - Apps don't work or poor video/audio performance -================================================================================ - -If you get sound problems, buffer underruns, etc, run "sudo rpi-update" to -update the RPi's firmware. Note that doing so will fix these problems, but it -will also render the CMA - Dynamic Memory Split functionality useless. - -Also, by default the Raspbian distro configures the GPU RAM at 64MB, this is too -low in general, specially if a 1080p TV is hooked up. - -See here how to configure this setting: http://elinux.org/RPiconfig - -Using a fixed gpu_mem=128 is the best option (specially if you updated the -firmware, using CMA probably won't work, at least it's the current case). - -================================================================================ - No input -================================================================================ - -Make sure you belong to the "input" group. - - sudo usermod -aG input `whoami` - -================================================================================ - No HDMI Audio -================================================================================ - -If you notice that ALSA works but there's no audio over HDMI, try adding: - - hdmi_drive=2 - -to your config.txt file and reboot. - -Reference: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062 - -================================================================================ - Text Input API support -================================================================================ - -The Text Input API is supported, with translation of scan codes done via the -kernel symbol tables. For this to work, SDL needs access to a valid console. -If you notice there's no SDL_TEXTINPUT message being emitted, double check that -your app has read access to one of the following: - -* /proc/self/fd/0 -* /dev/tty -* /dev/tty[0...6] -* /dev/vc/0 -* /dev/console - -This is usually not a problem if you run from the physical terminal (as opposed -to running from a pseudo terminal, such as via SSH). If running from a PTS, a -quick workaround is to run your app as root or add yourself to the tty group, -then re-login to the system. - - sudo usermod -aG tty `whoami` - -The keyboard layout used by SDL is the same as the one the kernel uses. -To configure the layout on Raspbian: - - sudo dpkg-reconfigure keyboard-configuration - -To configure the locale, which controls which keys are interpreted as letters, -this determining the CAPS LOCK behavior: - - sudo dpkg-reconfigure locales - -================================================================================ - OpenGL problems -================================================================================ - -If you have desktop OpenGL headers installed at build time in your RPi or cross -compilation environment, support for it will be built in. However, the chipset -does not actually have support for it, which causes issues in certain SDL apps -since the presence of OpenGL support supersedes the ES/ES2 variants. -The workaround is to disable OpenGL at configuration time: - - ./configure --disable-video-opengl - -Or if the application uses the Render functions, you can use the SDL_RENDER_DRIVER -environment variable: - - export SDL_RENDER_DRIVER=opengles2 - -================================================================================ - Notes -================================================================================ - -* When launching apps remotely (via SSH), SDL can prevent local keystrokes from - leaking into the console only if it has root privileges. Launching apps locally - does not suffer from this issue. - - diff --git a/Dependencies/SDL/Windows/docs/README-touch.md b/Dependencies/SDL/Windows/docs/README-touch.md deleted file mode 100644 index 09188b8..0000000 --- a/Dependencies/SDL/Windows/docs/README-touch.md +++ /dev/null @@ -1,86 +0,0 @@ -Touch -=========================================================================== -System Specific Notes -=========================================================================== -Linux: -The linux touch system is currently based off event streams, and proc/bus/devices. The active user must be given permissions to read /dev/input/TOUCHDEVICE, where TOUCHDEVICE is the event stream for your device. Currently only Wacom tablets are supported. If you have an unsupported tablet contact me at jim.tla+sdl_touch@gmail.com and I will help you get support for it. - -Mac: -The Mac and iPhone APIs are pretty. If your touch device supports them then you'll be fine. If it doesn't, then there isn't much we can do. - -iPhone: -Works out of box. - -Windows: -Unfortunately there is no windows support as of yet. Support for Windows 7 is planned, but we currently have no way to test. If you have a Windows 7 WM_TOUCH supported device, and are willing to help test please contact me at jim.tla+sdl_touch@gmail.com - -=========================================================================== -Events -=========================================================================== -SDL_FINGERDOWN: -Sent when a finger (or stylus) is placed on a touch device. -Fields: -* event.tfinger.touchId - the Id of the touch device. -* event.tfinger.fingerId - the Id of the finger which just went down. -* event.tfinger.x - the x coordinate of the touch (0..1) -* event.tfinger.y - the y coordinate of the touch (0..1) -* event.tfinger.pressure - the pressure of the touch (0..1) - -SDL_FINGERMOTION: -Sent when a finger (or stylus) is moved on the touch device. -Fields: -Same as SDL_FINGERDOWN but with additional: -* event.tfinger.dx - change in x coordinate during this motion event. -* event.tfinger.dy - change in y coordinate during this motion event. - -SDL_FINGERUP: -Sent when a finger (or stylus) is lifted from the touch device. -Fields: -Same as SDL_FINGERDOWN. - - -=========================================================================== -Functions -=========================================================================== -SDL provides the ability to access the underlying SDL_Finger structures. -These structures should _never_ be modified. - -The following functions are included from SDL_touch.h - -To get a SDL_TouchID call SDL_GetTouchDevice(int index). -This returns a SDL_TouchID. -IMPORTANT: If the touch has been removed, or there is no touch with the given index, SDL_GetTouchDevice() will return 0. Be sure to check for this! - -The number of touch devices can be queried with SDL_GetNumTouchDevices(). - -A SDL_TouchID may be used to get pointers to SDL_Finger. - -SDL_GetNumTouchFingers(touchID) may be used to get the number of fingers currently down on the device. - -The most common reason to access SDL_Finger is to query the fingers outside the event. In most cases accessing the fingers is using the event. This would be accomplished by code like the following: - - float x = event.tfinger.x; - float y = event.tfinger.y; - - - -To get a SDL_Finger, call SDL_GetTouchFinger(SDL_TouchID touchID, int index), where touchID is a SDL_TouchID, and index is the requested finger. -This returns a SDL_Finger *, or NULL if the finger does not exist, or has been removed. -A SDL_Finger is guaranteed to be persistent for the duration of a touch, but it will be de-allocated as soon as the finger is removed. This occurs when the SDL_FINGERUP event is _added_ to the event queue, and thus _before_ the SDL_FINGERUP event is polled. -As a result, be very careful to check for NULL return values. - -A SDL_Finger has the following fields: -* x, y: - The current coordinates of the touch. -* pressure: - The pressure of the touch. - - -=========================================================================== -Notes -=========================================================================== -For a complete example see test/testgesture.c - -Please direct questions/comments to: - jim.tla+sdl_touch@gmail.com - (original author, API was changed since) diff --git a/Dependencies/SDL/Windows/docs/README-wince.md b/Dependencies/SDL/Windows/docs/README-wince.md deleted file mode 100644 index d5fb64f..0000000 --- a/Dependencies/SDL/Windows/docs/README-wince.md +++ /dev/null @@ -1,10 +0,0 @@ -WinCE -===== - -Windows CE is no longer supported by SDL. - -We have left the CE support in SDL 1.2 for those that must have it, and we -have support for Windows Phone 8 and WinRT in SDL2, as of SDL 2.0.3. - ---ryan. - diff --git a/Dependencies/SDL/Windows/docs/README-windows.md b/Dependencies/SDL/Windows/docs/README-windows.md deleted file mode 100644 index 71f968e..0000000 --- a/Dependencies/SDL/Windows/docs/README-windows.md +++ /dev/null @@ -1,45 +0,0 @@ -Windows -================================================================================ - -================================================================================ -OpenGL ES 2.x support -================================================================================ - -SDL has support for OpenGL ES 2.x under Windows via two alternative -implementations. -The most straightforward method consists in running your app in a system with -a graphic card paired with a relatively recent (as of November of 2013) driver -which supports the WGL_EXT_create_context_es2_profile extension. Vendors known -to ship said extension on Windows currently include nVidia and Intel. - -The other method involves using the ANGLE library (https://code.google.com/p/angleproject/) -If an OpenGL ES 2.x context is requested and no WGL_EXT_create_context_es2_profile -extension is found, SDL will try to load the libEGL.dll library provided by -ANGLE. -To obtain the ANGLE binaries, you can either compile from source from -https://chromium.googlesource.com/angle/angle or copy the relevant binaries from -a recent Chrome/Chromium install for Windows. The files you need are: - - * libEGL.dll - * libGLESv2.dll - * d3dcompiler_46.dll (supports Windows Vista or later, better shader compiler) - or... - * d3dcompiler_43.dll (supports Windows XP or later) - -If you compile ANGLE from source, you can configure it so it does not need the -d3dcompiler_* DLL at all (for details on this, see their documentation). -However, by default SDL will try to preload the d3dcompiler_46.dll to -comply with ANGLE's requirements. If you wish SDL to preload d3dcompiler_43.dll (to -support Windows XP) or to skip this step at all, you can use the -SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more details). - -Known Bugs: - - * SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears - that there's a bug in the library which prevents the window contents from - refreshing if this is set to anything other than the default value. - -Vulkan Surface Support -============== - -Support for creating Vulkan surfaces is configured on by default. To disable it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to use Vulkan graphics in your application. diff --git a/Dependencies/SDL/Windows/docs/README-winrt.md b/Dependencies/SDL/Windows/docs/README-winrt.md deleted file mode 100644 index 73ef372..0000000 --- a/Dependencies/SDL/Windows/docs/README-winrt.md +++ /dev/null @@ -1,547 +0,0 @@ -WinRT -===== - -This port allows SDL applications to run on Microsoft's platforms that require -use of "Windows Runtime", aka. "WinRT", APIs. Microsoft may, in some cases, -refer to them as either "Windows Store", or for Windows 10, "UWP" apps. - -Some of the operating systems that include WinRT, are: - -* Windows 10, via its Universal Windows Platform (UWP) APIs -* Windows 8.x -* Windows RT 8.x (aka. Windows 8.x for ARM processors) -* Windows Phone 8.x - - -Requirements ------------- - -* Microsoft Visual C++ (aka Visual Studio), either 2017, 2015, 2013, or 2012 - - Free, "Community" or "Express" editions may be used, so long as they - include support for either "Windows Store" or "Windows Phone" apps. - "Express" versions marked as supporting "Windows Desktop" development - typically do not include support for creating WinRT apps, to note. - (The "Community" editions of Visual C++ do, however, support both - desktop/Win32 and WinRT development). - - Visual Studio 2017 can be used, however it is recommended that you install - the Visual C++ 2015 build tools. These build tools can be installed - using VS 2017's installer. Be sure to also install the workload for - "Universal Windows Platform development", its optional component, the - "C++ Universal Windows Platform tools", and for UWP / Windows 10 - development, the "Windows 10 SDK (10.0.10240.0)". Please note that - targeting UWP / Windows 10 apps from development machine(s) running - earlier versions of Windows, such as Windows 7, is not always supported - by Visual Studio, and you may get error(s) when attempting to do so. - - Visual C++ 2012 can only build apps that target versions 8.0 of Windows, - or Windows Phone. 8.0-targeted apps will run on devices running 8.1 - editions of Windows, however they will not be able to take advantage of - 8.1-specific features. - - Visual C++ 2013 cannot create app projects that target Windows 8.0. - Visual C++ 2013 Update 4, can create app projects for Windows Phone 8.0, - Windows Phone 8.1, and Windows 8.1, but not Windows 8.0. An optional - Visual Studio add-in, "Tools for Maintaining Store apps for Windows 8", - allows Visual C++ 2013 to load and build Windows 8.0 projects that were - created with Visual C++ 2012, so long as Visual C++ 2012 is installed - on the same machine. More details on targeting different versions of - Windows can found at the following web pages: - - [Develop apps by using Visual Studio 2013](http://msdn.microsoft.com/en-us/library/windows/apps/br211384.aspx) - - [To add the Tools for Maintaining Store apps for Windows 8](http://msdn.microsoft.com/en-us/library/windows/apps/dn263114.aspx#AddMaintenanceTools) -* A valid Microsoft account - This requirement is not imposed by SDL, but - rather by Microsoft's Visual C++ toolchain. This is required to launch or - debug apps. - - -Status ------- - -Here is a rough list of what works, and what doesn't: - -* What works: - * compilation via Visual C++ 2012 through 2015 - * compile-time platform detection for SDL programs. The C/C++ #define, - `__WINRT__`, will be set to 1 (by SDL) when compiling for WinRT. - * GPU-accelerated 2D rendering, via SDL_Renderer. - * OpenGL ES 2, via the ANGLE library (included separately from SDL) - * software rendering, via either SDL_Surface (optionally in conjunction with - SDL_GetWindowSurface() and SDL_UpdateWindowSurface()) or via the - SDL_Renderer APIs - * threads - * timers (via SDL_GetTicks(), SDL_AddTimer(), SDL_GetPerformanceCounter(), - SDL_GetPerformanceFrequency(), etc.) - * file I/O via SDL_RWops - * mouse input (unsupported on Windows Phone) - * audio, via SDL's WASAPI backend (if you want to record, your app must - have "Microphone" capabilities enabled in its manifest, and the user must - not have blocked access. Otherwise, capture devices will fail to work, - presenting as a device disconnect shortly after opening it.) - * .DLL file loading. Libraries *MUST* be packaged inside applications. Loading - anything outside of the app is not supported. - * system path retrieval via SDL's filesystem APIs - * game controllers. Support is provided via the SDL_Joystick and - SDL_GameController APIs, and is backed by Microsoft's XInput API. Please - note, however, that Windows limits game-controller support in UWP apps to, - "Xbox compatible controllers" (many controllers that work in Win32 apps, - do not work in UWP, due to restrictions in UWP itself.) - * multi-touch input - * app events. SDL_APP_WILLENTER* and SDL_APP_DIDENTER* events get sent out as - appropriate. - * window events - * using Direct3D 11.x APIs outside of SDL. Non-XAML / Direct3D-only apps can - choose to render content directly via Direct3D, using SDL to manage the - internal WinRT window, as well as input and audio. (Use - SDL_GetWindowWMInfo() to get the WinRT 'CoreWindow', and pass it into - IDXGIFactory2::CreateSwapChainForCoreWindow() as appropriate.) - -* What partially works: - * keyboard input. Most of WinRT's documented virtual keys are supported, as - well as many keys with documented hardware scancodes. Converting - SDL_Scancodes to or from SDL_Keycodes may not work, due to missing APIs - (MapVirtualKey()) in Microsoft's Windows Store / UWP APIs. - * SDLmain. WinRT uses a different signature for each app's main() function. - SDL-based apps that use this port must compile in SDL_winrt_main_NonXAML.cpp - (in `SDL\src\main\winrt\`) directly in order for their C-style main() - functions to be called. - -* What doesn't work: - * compilation with anything other than Visual C++ - * programmatically-created custom cursors. These don't appear to be supported - by WinRT. Different OS-provided cursors can, however, be created via - SDL_CreateSystemCursor() (unsupported on Windows Phone) - * SDL_WarpMouseInWindow() or SDL_WarpMouseGlobal(). This are not currently - supported by WinRT itself. - * joysticks and game controllers that either are not supported by - Microsoft's XInput API, or are not supported within UWP apps (many - controllers that work in Win32, do not work in UWP, due to restrictions in - UWP itself). - * turning off VSync when rendering on Windows Phone. Attempts to turn VSync - off on Windows Phone result either in Direct3D not drawing anything, or it - forcing VSync back on. As such, SDL_RENDERER_PRESENTVSYNC will always get - turned-on on Windows Phone. This limitation is not present in non-Phone - WinRT (such as Windows 8.x), where turning off VSync appears to work. - * probably anything else that's not listed as supported - - - -Upgrade Notes -------------- - -#### SDL_GetPrefPath() usage when upgrading WinRT apps from SDL 2.0.3 - -SDL 2.0.4 fixes two bugs found in the WinRT version of SDL_GetPrefPath(). -The fixes may affect older, SDL 2.0.3-based apps' save data. Please note -that these changes only apply to SDL-based WinRT apps, and not to apps for -any other platform. - -1. SDL_GetPrefPath() would return an invalid path, one in which the path's - directory had not been created. Attempts to create files there - (via fopen(), for example), would fail, unless that directory was - explicitly created beforehand. - -2. SDL_GetPrefPath(), for non-WinPhone-based apps, would return a path inside - a WinRT 'Roaming' folder, the contents of which get automatically - synchronized across multiple devices. This process can occur while an - application runs, and can cause existing save-data to be overwritten - at unexpected times, with data from other devices. (Windows Phone apps - written with SDL 2.0.3 did not utilize a Roaming folder, due to API - restrictions in Windows Phone 8.0). - - -SDL_GetPrefPath(), starting with SDL 2.0.4, addresses these by: - -1. making sure that SDL_GetPrefPath() returns a directory in which data - can be written to immediately, without first needing to create directories. - -2. basing SDL_GetPrefPath() off of a different, non-Roaming folder, the - contents of which do not automatically get synchronized across devices - (and which require less work to use safely, in terms of data integrity). - -Apps that wish to get their Roaming folder's path can do so either by using -SDL_WinRTGetFSPathUTF8(), SDL_WinRTGetFSPathUNICODE() (which returns a -UCS-2/wide-char string), or directly through the WinRT class, -Windows.Storage.ApplicationData. - - - -Setup, High-Level Steps ------------------------ - -The steps for setting up a project for an SDL/WinRT app looks like the -following, at a high-level: - -1. create a new Visual C++ project using Microsoft's template for a, - "Direct3D App". -2. remove most of the files from the project. -3. make your app's project directly reference SDL/WinRT's own Visual C++ - project file, via use of Visual C++'s "References" dialog. This will setup - the linker, and will copy SDL's .dll files to your app's final output. -4. adjust your app's build settings, at minimum, telling it where to find SDL's - header files. -5. add files that contains a WinRT-appropriate main function, along with some - data to make sure mouse-cursor-hiding (via SDL_ShowCursor(SDL_DISABLE) calls) - work properly. -6. add SDL-specific app code. -7. build and run your app. - - -Setup, Detailed Steps ---------------------- - -### 1. Create a new project ### - -Create a new project using one of Visual C++'s templates for a plain, non-XAML, -"Direct3D App" (XAML support for SDL/WinRT is not yet ready for use). If you -don't see one of these templates, in Visual C++'s 'New Project' dialog, try -using the textbox titled, 'Search Installed Templates' to look for one. - - -### 2. Remove unneeded files from the project ### - -In the new project, delete any file that has one of the following extensions: - -- .cpp -- .h -- .hlsl - -When you are done, you should be left with a few files, each of which will be a -necessary part of your app's project. These files will consist of: - -- an .appxmanifest file, which contains metadata on your WinRT app. This is - similar to an Info.plist file on iOS, or an AndroidManifest.xml on Android. -- a few .png files, one of which is a splash screen (displayed when your app - launches), others are app icons. -- a .pfx file, used for code signing purposes. - - -### 3. Add references to SDL's project files ### - -SDL/WinRT can be built in multiple variations, spanning across three different -CPU architectures (x86, x64, and ARM) and two different configurations -(Debug and Release). WinRT and Visual C++ do not currently provide a means -for combining multiple variations of one library into a single file. -Furthermore, it does not provide an easy means for copying pre-built .dll files -into your app's final output (via Post-Build steps, for example). It does, -however, provide a system whereby an app can reference the MSVC projects of -libraries such that, when the app is built: - -1. each library gets built for the appropriate CPU architecture(s) and WinRT - platform(s). -2. each library's output, such as .dll files, get copied to the app's build - output. - -To set this up for SDL/WinRT, you'll need to run through the following steps: - -1. open up the Solution Explorer inside Visual C++ (under the "View" menu, then - "Solution Explorer") -2. right click on your app's solution. -3. navigate to "Add", then to "Existing Project..." -4. find SDL/WinRT's Visual C++ project file and open it. Different project - files exist for different WinRT platforms. All of them are in SDL's - source distribution, in the following directories: - * `VisualC-WinRT/UWP_VS2015/` - for Windows 10 / UWP apps - * `VisualC-WinRT/WinPhone81_VS2013/` - for Windows Phone 8.1 apps - * `VisualC-WinRT/WinRT80_VS2012/` - for Windows 8.0 apps - * `VisualC-WinRT/WinRT81_VS2013/` - for Windows 8.1 apps -5. once the project has been added, right-click on your app's project and - select, "References..." -6. click on the button titled, "Add New Reference..." -7. check the box next to SDL -8. click OK to close the dialog -9. SDL will now show up in the list of references. Click OK to close that - dialog. - -Your project is now linked to SDL's project, insofar that when the app is -built, SDL will be built as well, with its build output getting included with -your app. - - -### 4. Adjust Your App's Build Settings ### - -Some build settings need to be changed in your app's project. This guide will -outline the following: - -- making sure that the compiler knows where to find SDL's header files -- **Optional for C++, but NECESSARY for compiling C code:** telling the - compiler not to use Microsoft's C++ extensions for WinRT development. -- **Optional:** telling the compiler not generate errors due to missing - precompiled header files. - -To change these settings: - -1. right-click on the project -2. choose "Properties" -3. in the drop-down box next to "Configuration", choose, "All Configurations" -4. in the drop-down box next to "Platform", choose, "All Platforms" -5. in the left-hand list, expand the "C/C++" section -6. select "General" -7. edit the "Additional Include Directories" setting, and add a path to SDL's - "include" directory -8. **Optional: to enable compilation of C code:** change the setting for - "Consume Windows Runtime Extension" from "Yes (/ZW)" to "No". If you're - working with a completely C++ based project, this step can usually be - omitted. -9. **Optional: to disable precompiled headers (which can produce - 'stdafx.h'-related build errors, if setup incorrectly:** in the left-hand - list, select "Precompiled Headers", then change the setting for "Precompiled - Header" from "Use (/Yu)" to "Not Using Precompiled Headers". -10. close the dialog, saving settings, by clicking the "OK" button - - -### 5. Add a WinRT-appropriate main function, and a blank-cursor image, to the app. ### - -A few files should be included directly in your app's MSVC project, specifically: -1. a WinRT-appropriate main function (which is different than main() functions on - other platforms) -2. a Win32-style cursor resource, used by SDL_ShowCursor() to hide the mouse cursor - (if and when the app needs to do so). *If this cursor resource is not - included, mouse-position reporting may fail if and when the cursor is - hidden, due to possible bugs/design-oddities in Windows itself.* - -To include these files for C/C++ projects: - -1. right-click on your project (again, in Visual C++'s Solution Explorer), - navigate to "Add", then choose "Existing Item...". -2. navigate to the directory containing SDL's source code, then into its - subdirectory, 'src/main/winrt/'. Select, then add, the following files: - - `SDL_winrt_main_NonXAML.cpp` - - `SDL2-WinRTResources.rc` - - `SDL2-WinRTResource_BlankCursor.cur` -3. right-click on the file `SDL_winrt_main_NonXAML.cpp` (as listed in your - project), then click on "Properties...". -4. in the drop-down box next to "Configuration", choose, "All Configurations" -5. in the drop-down box next to "Platform", choose, "All Platforms" -6. in the left-hand list, click on "C/C++" -7. change the setting for "Consume Windows Runtime Extension" to "Yes (/ZW)". -8. click the OK button. This will close the dialog. - -**NOTE: C++/CX compilation is currently required in at least one file of your -app's project. This is to make sure that Visual C++'s linker builds a 'Windows -Metadata' file (.winmd) for your app. Not doing so can lead to build errors.** - -For non-C++ projects, you will need to call SDL_WinRTRunApp from your language's -main function, and generate SDL2-WinRTResources.res manually by using `rc` via -the Developer Command Prompt and including it as a within the -first block in your Visual Studio project file. - -### 6. Add app code and assets ### - -At this point, you can add in SDL-specific source code. Be sure to include a -C-style main function (ie: `int main(int argc, char *argv[])`). From there you -should be able to create a single `SDL_Window` (WinRT apps can only have one -window, at present), as well as an `SDL_Renderer`. Direct3D will be used to -draw content. Events are received via SDL's usual event functions -(`SDL_PollEvent`, etc.) If you have a set of existing source files and assets, -you can start adding them to the project now. If not, or if you would like to -make sure that you're setup correctly, some short and simple sample code is -provided below. - - -#### 6.A. ... when creating a new app #### - -If you are creating a new app (rather than porting an existing SDL-based app), -or if you would just like a simple app to test SDL/WinRT with before trying to -get existing code working, some working SDL/WinRT code is provided below. To -set this up: - -1. right click on your app's project -2. select Add, then New Item. An "Add New Item" dialog will show up. -3. from the left-hand list, choose "Visual C++" -4. from the middle/main list, choose "C++ File (.cpp)" -5. near the bottom of the dialog, next to "Name:", type in a name for your -source file, such as, "main.cpp". -6. click on the Add button. This will close the dialog, add the new file to -your project, and open the file in Visual C++'s text editor. -7. Copy and paste the following code into the new file, then save it. - - - #include - - int main(int argc, char **argv) - { - SDL_DisplayMode mode; - SDL_Window * window = NULL; - SDL_Renderer * renderer = NULL; - SDL_Event evt; - - if (SDL_Init(SDL_INIT_VIDEO) != 0) { - return 1; - } - - if (SDL_GetCurrentDisplayMode(0, &mode) != 0) { - return 1; - } - - if (SDL_CreateWindowAndRenderer(mode.w, mode.h, SDL_WINDOW_FULLSCREEN, &window, &renderer) != 0) { - return 1; - } - - while (1) { - while (SDL_PollEvent(&evt)) { - } - - SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255); - SDL_RenderClear(renderer); - SDL_RenderPresent(renderer); - } - } - - -#### 6.B. Adding code and assets #### - -If you have existing code and assets that you'd like to add, you should be able -to add them now. The process for adding a set of files is as such. - -1. right click on the app's project -2. select Add, then click on "New Item..." -3. open any source, header, or asset files as appropriate. Support for C and -C++ is available. - -Do note that WinRT only supports a subset of the APIs that are available to -Win32-based apps. Many portions of the Win32 API and the C runtime are not -available. - -A list of unsupported C APIs can be found at - - -General information on using the C runtime in WinRT can be found at - - -A list of supported Win32 APIs for WinRT apps can be found at -. To note, -the list of supported Win32 APIs for Windows Phone 8.0 is different. -That list can be found at - - - -### 7. Build and run your app ### - -Your app project should now be setup, and you should be ready to build your app. -To run it on the local machine, open the Debug menu and choose "Start -Debugging". This will build your app, then run your app full-screen. To switch -out of your app, press the Windows key. Alternatively, you can choose to run -your app in a window. To do this, before building and running your app, find -the drop-down menu in Visual C++'s toolbar that says, "Local Machine". Expand -this by clicking on the arrow on the right side of the list, then click on -Simulator. Once you do that, any time you build and run the app, the app will -launch in window, rather than full-screen. - - -#### 7.A. Running apps on older, ARM-based, "Windows RT" devices #### - -**These instructions do not include Windows Phone, despite Windows Phone -typically running on ARM processors.** They are specifically for devices -that use the "Windows RT" operating system, which was a modified version of -Windows 8.x that ran primarily on ARM-based tablet computers. - -To build and run the app on ARM-based, "Windows RT" devices, you'll need to: - -- install Microsoft's "Remote Debugger" on the device. Visual C++ installs and - debugs ARM-based apps via IP networks. -- change a few options on the development machine, both to make sure it builds - for ARM (rather than x86 or x64), and to make sure it knows how to find the - Windows RT device (on the network). - -Microsoft's Remote Debugger can be found at -. Please note -that separate versions of this debugger exist for different versions of Visual -C++, one each for MSVC 2015, 2013, and 2012. - -To setup Visual C++ to launch your app on an ARM device: - -1. make sure the Remote Debugger is running on your ARM device, and that it's on - the same IP network as your development machine. -2. from Visual C++'s toolbar, find a drop-down menu that says, "Win32". Click - it, then change the value to "ARM". -3. make sure Visual C++ knows the hostname or IP address of the ARM device. To - do this: - 1. open the app project's properties - 2. select "Debugging" - 3. next to "Machine Name", enter the hostname or IP address of the ARM - device - 4. if, and only if, you've turned off authentication in the Remote Debugger, - then change the setting for "Require Authentication" to No - 5. click "OK" -4. build and run the app (from Visual C++). The first time you do this, a - prompt will show up on the ARM device, asking for a Microsoft Account. You - do, unfortunately, need to log in here, and will need to follow the - subsequent registration steps in order to launch the app. After you do so, - if the app didn't already launch, try relaunching it again from within Visual - C++. - - -Troubleshooting ---------------- - -#### Build fails with message, "error LNK2038: mismatch detected for 'vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker'" - -Try adding the following to your linker flags. In MSVC, this can be done by -right-clicking on the app project, navigating to Configuration Properties -> -Linker -> Command Line, then adding them to the Additional Options -section. - -* For Release builds / MSVC-Configurations, add: - - /nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib - -* For Debug builds / MSVC-Configurations, add: - - /nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib - - -#### Mouse-motion events fail to get sent, or SDL_GetMouseState() fails to return updated values - -This may be caused by a bug in Windows itself, whereby hiding the mouse -cursor can cause mouse-position reporting to fail. - -SDL provides a workaround for this, but it requires that an app links to a -set of Win32-style cursor image-resource files. A copy of suitable resource -files can be found in `src/main/winrt/`. Adding them to an app's Visual C++ -project file should be sufficient to get the app to use them. - - -#### SDL's Visual Studio project file fails to open, with message, "The system can't find the file specified." - -This can be caused for any one of a few reasons, which Visual Studio can -report, but won't always do so in an up-front manner. - -To help determine why this error comes up: - -1. open a copy of Visual Studio without opening a project file. This can be - accomplished via Windows' Start Menu, among other means. -2. show Visual Studio's Output window. This can be done by going to VS' - menu bar, then to View, and then to Output. -3. try opening the SDL project file directly by going to VS' menu bar, then - to File, then to Open, then to Project/Solution. When a File-Open dialog - appears, open the SDL project (such as the one in SDL's source code, in its - directory, VisualC-WinRT/UWP_VS2015/). -4. after attempting to open SDL's Visual Studio project file, additional error - information will be output to the Output window. - -If Visual Studio reports (via its Output window) that the project: - -"could not be loaded because it's missing install components. To fix this launch Visual Studio setup with the following selections: -Microsoft.VisualStudio.ComponentGroup.UWP.VC" - -... then you will need to re-launch Visual Studio's installer, and make sure that -the workflow for "Universal Windows Platform development" is checked, and that its -optional component, "C++ Universal Windows Platform tools" is also checked. While -you are there, if you are planning on targeting UWP / Windows 10, also make sure -that you check the optional component, "Windows 10 SDK (10.0.10240.0)". After -making sure these items are checked as-appropriate, install them. - -Once you install these components, try re-launching Visual Studio, and re-opening -the SDL project file. If you still get the error dialog, try using the Output -window, again, seeing what Visual Studio says about it. - - -#### Game controllers / joysticks aren't working! - -Windows only permits certain game controllers and joysticks to work within -WinRT / UWP apps. Even if a game controller or joystick works in a Win32 -app, that device is not guaranteed to work inside a WinRT / UWP app. - -According to Microsoft, "Xbox compatible controllers" should work inside -UWP apps, potentially with more working in the future. This includes, but -may not be limited to, Microsoft-made Xbox controllers and USB adapters. -(Source: https://social.msdn.microsoft.com/Forums/en-US/9064838b-e8c3-4c18-8a83-19bf0dfe150d/xinput-fails-to-detect-game-controllers?forum=wpdevelop) - - diff --git a/Dependencies/SDL/Windows/docs/README.md b/Dependencies/SDL/Windows/docs/README.md deleted file mode 100644 index 7e2c151..0000000 --- a/Dependencies/SDL/Windows/docs/README.md +++ /dev/null @@ -1,63 +0,0 @@ -Simple DirectMedia Layer {#mainpage} -======================== - - (SDL) - - Version 2.0 - ---- -http://www.libsdl.org/ - -Simple DirectMedia Layer is a cross-platform development library designed -to provide low level access to audio, keyboard, mouse, joystick, and graphics -hardware via OpenGL and Direct3D. It is used by video playback software, -emulators, and popular games including Valve's award winning catalog -and many Humble Bundle games. - -SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. -Support for other platforms may be found in the source code. - -SDL is written in C, works natively with C++, and there are bindings -available for several other languages, including C# and Python. - -This library is distributed under the zlib license, which can be found -in the file "COPYING.txt". - -The best way to learn how to use SDL is to check out the header files in -the "include" subdirectory and the programs in the "test" subdirectory. -The header files and test programs are well commented and always up to date. - -More documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/) - -- [Android](README-android.md) -- [CMake](README-cmake.md) -- [DirectFB](README-directfb.md) -- [DynAPI](README-dynapi.md) -- [Emscripten](README-emscripten.md) -- [Gesture](README-gesture.md) -- [Mercurial](README-hg.md) -- [iOS](README-ios.md) -- [Linux](README-linux.md) -- [OS X](README-macosx.md) -- [Native Client](README-nacl.md) -- [Pandora](README-pandora.md) -- [Supported Platforms](README-platforms.md) -- [Porting information](README-porting.md) -- [PSP](README-psp.md) -- [Raspberry Pi](README-raspberrypi.md) -- [Touch](README-touch.md) -- [WinCE](README-wince.md) -- [Windows](README-windows.md) -- [WinRT](README-winrt.md) - -If you need help with the library, or just want to discuss SDL related -issues, you can join the [developers mailing list](http://www.libsdl.org/mailing-list.php) - -If you want to report bugs or contribute patches, please submit them to -[bugzilla](https://bugzilla.libsdl.org/) - -Enjoy! - - -Sam Lantinga - diff --git a/Dependencies/SDL/Windows/docs/doxyfile b/Dependencies/SDL/Windows/docs/doxyfile deleted file mode 100644 index baf1c98..0000000 --- a/Dependencies/SDL/Windows/docs/doxyfile +++ /dev/null @@ -1,1560 +0,0 @@ -# Doxyfile 1.5.9 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = SDL - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 2.0 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = ./output - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = YES - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = YES - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = "defined=\"\def\"" \ - "discussion=\"\par Discussion:\n\"" - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it parses. -# With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this tag. -# The format is ext=language, where ext is a file extension, and language is one of -# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, -# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. Note that for custom extensions you also need to set -# FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = YES - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = YES - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = YES - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = YES - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name -# of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = ./doxygen_warn.txt - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = . ../include - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py \ - *.f90 \ - *.f \ - *.vhd \ - *.vhdl \ - *.h.in \ - *.h.default \ - *.md - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = ../include/SDL_opengles2_gl2ext.h \ - ../include/SDL_opengles2_gl2platform.h \ - ../include/SDL_opengles2_khrplatform.h \ - ../include/SDL_opengl_glext.h \ - ../include/SDL_opengles2_gl2.h \ - ../include/SDL_opengles2.h \ - ../include/SDL_opengles.h \ - ../include/SDL_opengl.h \ - ../include/SDL_egl.h \ - - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = YES - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = YES - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = NO - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = SDL_ \ - SDL - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = YES - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "SDL 2.0 Doxygen" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.libsdl.sdl20 - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = ./sdl20.chm - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = YES - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -# HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. -# For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's -# filter section matches. -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 1 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values -# for this tag are: HIERARCHIES, which will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list; -# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which -# disables this behavior completely. For backwards compatibility with previous -# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE -# respectively. - -GENERATE_TREEVIEW = ALL - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = YES - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = DOXYGEN_SHOULD_IGNORE_THIS=1 \ - DECLSPEC= \ - SDLCALL= \ - _WIN32=1 - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = ./SDL.tag - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = c:\Perl\bin\perl.exe - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = FreeSans - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 60 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 2 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = YES - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Options related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/Dependencies/SDL/Windows/include/SDL.h b/Dependencies/SDL/Windows/include/SDL.h deleted file mode 100644 index 634bf4b..0000000 --- a/Dependencies/SDL/Windows/include/SDL.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL.h - * - * Main include header for the SDL library - */ - - -#ifndef SDL_h_ -#define SDL_h_ - -#include "SDL_main.h" -#include "SDL_stdinc.h" -#include "SDL_assert.h" -#include "SDL_atomic.h" -#include "SDL_audio.h" -#include "SDL_clipboard.h" -#include "SDL_cpuinfo.h" -#include "SDL_endian.h" -#include "SDL_error.h" -#include "SDL_events.h" -#include "SDL_filesystem.h" -#include "SDL_gamecontroller.h" -#include "SDL_haptic.h" -#include "SDL_hints.h" -#include "SDL_joystick.h" -#include "SDL_loadso.h" -#include "SDL_log.h" -#include "SDL_messagebox.h" -#include "SDL_metal.h" -#include "SDL_mutex.h" -#include "SDL_power.h" -#include "SDL_render.h" -#include "SDL_rwops.h" -#include "SDL_sensor.h" -#include "SDL_shape.h" -#include "SDL_system.h" -#include "SDL_thread.h" -#include "SDL_timer.h" -#include "SDL_version.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* As of version 0.5, SDL is loaded dynamically into the application */ - -/** - * \name SDL_INIT_* - * - * These are the flags which may be passed to SDL_Init(). You should - * specify the subsystems which you will be using in your application. - */ -/* @{ */ -#define SDL_INIT_TIMER 0x00000001u -#define SDL_INIT_AUDIO 0x00000010u -#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */ -#define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */ -#define SDL_INIT_HAPTIC 0x00001000u -#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */ -#define SDL_INIT_EVENTS 0x00004000u -#define SDL_INIT_SENSOR 0x00008000u -#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */ -#define SDL_INIT_EVERYTHING ( \ - SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \ - SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \ - ) -/* @} */ - -/** - * This function initializes the subsystems specified by \c flags - */ -extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags); - -/** - * This function initializes specific SDL subsystems - * - * Subsystem initialization is ref-counted, you must call - * SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly - * shutdown a subsystem manually (or call SDL_Quit() to force shutdown). - * If a subsystem is already loaded then this call will - * increase the ref-count and return. - */ -extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags); - -/** - * This function cleans up specific SDL subsystems - */ -extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags); - -/** - * This function returns a mask of the specified subsystems which have - * previously been initialized. - * - * If \c flags is 0, it returns a mask of all initialized subsystems. - */ -extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags); - -/** - * This function cleans up all initialized subsystems. You should - * call it upon all exit conditions. - */ -extern DECLSPEC void SDLCALL SDL_Quit(void); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_assert.h b/Dependencies/SDL/Windows/include/SDL_assert.h deleted file mode 100644 index 21bdad9..0000000 --- a/Dependencies/SDL/Windows/include/SDL_assert.h +++ /dev/null @@ -1,291 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -#ifndef SDL_assert_h_ -#define SDL_assert_h_ - -#include "SDL_config.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef SDL_ASSERT_LEVEL -#ifdef SDL_DEFAULT_ASSERT_LEVEL -#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL -#elif defined(_DEBUG) || defined(DEBUG) || \ - (defined(__GNUC__) && !defined(__OPTIMIZE__)) -#define SDL_ASSERT_LEVEL 2 -#else -#define SDL_ASSERT_LEVEL 1 -#endif -#endif /* SDL_ASSERT_LEVEL */ - -/* -These are macros and not first class functions so that the debugger breaks -on the assertion line and not in some random guts of SDL, and so each -assert can have unique static variables associated with it. -*/ - -#if defined(_MSC_VER) -/* Don't include intrin.h here because it contains C++ code */ - extern void __cdecl __debugbreak(void); - #define SDL_TriggerBreakpoint() __debugbreak() -#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) ) - #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" ) -#elif defined(__386__) && defined(__WATCOMC__) - #define SDL_TriggerBreakpoint() { _asm { int 0x03 } } -#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__) - #include - #define SDL_TriggerBreakpoint() raise(SIGTRAP) -#else - /* How do we trigger breakpoints on this platform? */ - #define SDL_TriggerBreakpoint() -#endif - -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */ -# define SDL_FUNCTION __func__ -#elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__)) -# define SDL_FUNCTION __FUNCTION__ -#else -# define SDL_FUNCTION "???" -#endif -#define SDL_FILE __FILE__ -#define SDL_LINE __LINE__ - -/* -sizeof (x) makes the compiler still parse the expression even without -assertions enabled, so the code is always checked at compile time, but -doesn't actually generate code for it, so there are no side effects or -expensive checks at run time, just the constant size of what x WOULD be, -which presumably gets optimized out as unused. -This also solves the problem of... - - int somevalue = blah(); - SDL_assert(somevalue == 1); - -...which would cause compiles to complain that somevalue is unused if we -disable assertions. -*/ - -/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking - this condition isn't constant. And looks like an owl's face! */ -#ifdef _MSC_VER /* stupid /W4 warnings. */ -#define SDL_NULL_WHILE_LOOP_CONDITION (0,0) -#else -#define SDL_NULL_WHILE_LOOP_CONDITION (0) -#endif - -#define SDL_disabled_assert(condition) \ - do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION) - -typedef enum -{ - SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */ - SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */ - SDL_ASSERTION_ABORT, /**< Terminate the program. */ - SDL_ASSERTION_IGNORE, /**< Ignore the assert. */ - SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */ -} SDL_AssertState; - -typedef struct SDL_AssertData -{ - int always_ignore; - unsigned int trigger_count; - const char *condition; - const char *filename; - int linenum; - const char *function; - const struct SDL_AssertData *next; -} SDL_AssertData; - -#if (SDL_ASSERT_LEVEL > 0) - -/* Never call this directly. Use the SDL_assert* macros. */ -extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *, - const char *, - const char *, int) -#if defined(__clang__) -#if __has_feature(attribute_analyzer_noreturn) -/* this tells Clang's static analysis that we're a custom assert function, - and that the analyzer should assume the condition was always true past this - SDL_assert test. */ - __attribute__((analyzer_noreturn)) -#endif -#endif -; - -/* the do {} while(0) avoids dangling else problems: - if (x) SDL_assert(y); else blah(); - ... without the do/while, the "else" could attach to this macro's "if". - We try to handle just the minimum we need here in a macro...the loop, - the static vars, and break points. The heavy lifting is handled in - SDL_ReportAssertion(), in SDL_assert.c. -*/ -#define SDL_enabled_assert(condition) \ - do { \ - while ( !(condition) ) { \ - static struct SDL_AssertData sdl_assert_data = { \ - 0, 0, #condition, 0, 0, 0, 0 \ - }; \ - const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \ - if (sdl_assert_state == SDL_ASSERTION_RETRY) { \ - continue; /* go again. */ \ - } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \ - SDL_TriggerBreakpoint(); \ - } \ - break; /* not retrying. */ \ - } \ - } while (SDL_NULL_WHILE_LOOP_CONDITION) - -#endif /* enabled assertions support code */ - -/* Enable various levels of assertions. */ -#if SDL_ASSERT_LEVEL == 0 /* assertions disabled */ -# define SDL_assert(condition) SDL_disabled_assert(condition) -# define SDL_assert_release(condition) SDL_disabled_assert(condition) -# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition) -#elif SDL_ASSERT_LEVEL == 1 /* release settings. */ -# define SDL_assert(condition) SDL_disabled_assert(condition) -# define SDL_assert_release(condition) SDL_enabled_assert(condition) -# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition) -#elif SDL_ASSERT_LEVEL == 2 /* normal settings. */ -# define SDL_assert(condition) SDL_enabled_assert(condition) -# define SDL_assert_release(condition) SDL_enabled_assert(condition) -# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition) -#elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */ -# define SDL_assert(condition) SDL_enabled_assert(condition) -# define SDL_assert_release(condition) SDL_enabled_assert(condition) -# define SDL_assert_paranoid(condition) SDL_enabled_assert(condition) -#else -# error Unknown assertion level. -#endif - -/* this assertion is never disabled at any level. */ -#define SDL_assert_always(condition) SDL_enabled_assert(condition) - - -typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)( - const SDL_AssertData* data, void* userdata); - -/** - * \brief Set an application-defined assertion handler. - * - * This allows an app to show its own assertion UI and/or force the - * response to an assertion failure. If the app doesn't provide this, SDL - * will try to do the right thing, popping up a system-specific GUI dialog, - * and probably minimizing any fullscreen windows. - * - * This callback may fire from any thread, but it runs wrapped in a mutex, so - * it will only fire from one thread at a time. - * - * Setting the callback to NULL restores SDL's original internal handler. - * - * This callback is NOT reset to SDL's internal handler upon SDL_Quit()! - * - * Return SDL_AssertState value of how to handle the assertion failure. - * - * \param handler Callback function, called when an assertion fails. - * \param userdata A pointer passed to the callback as-is. - */ -extern DECLSPEC void SDLCALL SDL_SetAssertionHandler( - SDL_AssertionHandler handler, - void *userdata); - -/** - * \brief Get the default assertion handler. - * - * This returns the function pointer that is called by default when an - * assertion is triggered. This is an internal function provided by SDL, - * that is used for assertions when SDL_SetAssertionHandler() hasn't been - * used to provide a different function. - * - * \return The default SDL_AssertionHandler that is called when an assert triggers. - */ -extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void); - -/** - * \brief Get the current assertion handler. - * - * This returns the function pointer that is called when an assertion is - * triggered. This is either the value last passed to - * SDL_SetAssertionHandler(), or if no application-specified function is - * set, is equivalent to calling SDL_GetDefaultAssertionHandler(). - * - * \param puserdata Pointer to a void*, which will store the "userdata" - * pointer that was passed to SDL_SetAssertionHandler(). - * This value will always be NULL for the default handler. - * If you don't care about this data, it is safe to pass - * a NULL pointer to this function to ignore it. - * \return The SDL_AssertionHandler that is called when an assert triggers. - */ -extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata); - -/** - * \brief Get a list of all assertion failures. - * - * Get all assertions triggered since last call to SDL_ResetAssertionReport(), - * or the start of the program. - * - * The proper way to examine this data looks something like this: - * - * - * const SDL_AssertData *item = SDL_GetAssertionReport(); - * while (item) { - * printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n", - * item->condition, item->function, item->filename, - * item->linenum, item->trigger_count, - * item->always_ignore ? "yes" : "no"); - * item = item->next; - * } - * - * - * \return List of all assertions. - * \sa SDL_ResetAssertionReport - */ -extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void); - -/** - * \brief Reset the list of all assertion failures. - * - * Reset list of all assertions triggered. - * - * \sa SDL_GetAssertionReport - */ -extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void); - - -/* these had wrong naming conventions until 2.0.4. Please update your app! */ -#define SDL_assert_state SDL_AssertState -#define SDL_assert_data SDL_AssertData - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_assert_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_atomic.h b/Dependencies/SDL/Windows/include/SDL_atomic.h deleted file mode 100644 index e99f1bc..0000000 --- a/Dependencies/SDL/Windows/include/SDL_atomic.h +++ /dev/null @@ -1,295 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_atomic.h - * - * Atomic operations. - * - * IMPORTANT: - * If you are not an expert in concurrent lockless programming, you should - * only be using the atomic lock and reference counting functions in this - * file. In all other cases you should be protecting your data structures - * with full mutexes. - * - * The list of "safe" functions to use are: - * SDL_AtomicLock() - * SDL_AtomicUnlock() - * SDL_AtomicIncRef() - * SDL_AtomicDecRef() - * - * Seriously, here be dragons! - * ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - * - * You can find out a little more about lockless programming and the - * subtle issues that can arise here: - * http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx - * - * There's also lots of good information here: - * http://www.1024cores.net/home/lock-free-algorithms - * http://preshing.com/ - * - * These operations may or may not actually be implemented using - * processor specific atomic operations. When possible they are - * implemented as true processor specific atomic operations. When that - * is not possible the are implemented using locks that *do* use the - * available atomic operations. - * - * All of the atomic operations that modify memory are full memory barriers. - */ - -#ifndef SDL_atomic_h_ -#define SDL_atomic_h_ - -#include "SDL_stdinc.h" -#include "SDL_platform.h" - -#include "begin_code.h" - -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \name SDL AtomicLock - * - * The atomic locks are efficient spinlocks using CPU instructions, - * but are vulnerable to starvation and can spin forever if a thread - * holding a lock has been terminated. For this reason you should - * minimize the code executed inside an atomic lock and never do - * expensive things like API or system calls while holding them. - * - * The atomic locks are not safe to lock recursively. - * - * Porting Note: - * The spin lock functions and type are required and can not be - * emulated because they are used in the atomic emulation code. - */ -/* @{ */ - -typedef int SDL_SpinLock; - -/** - * \brief Try to lock a spin lock by setting it to a non-zero value. - * - * \param lock Points to the lock. - * - * \return SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already held. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock); - -/** - * \brief Lock a spin lock by setting it to a non-zero value. - * - * \param lock Points to the lock. - */ -extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock); - -/** - * \brief Unlock a spin lock by setting it to 0. Always returns immediately - * - * \param lock Points to the lock. - */ -extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock); - -/* @} *//* SDL AtomicLock */ - - -/** - * The compiler barrier prevents the compiler from reordering - * reads and writes to globally visible variables across the call. - */ -#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__) -void _ReadWriteBarrier(void); -#pragma intrinsic(_ReadWriteBarrier) -#define SDL_CompilerBarrier() _ReadWriteBarrier() -#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120)) -/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */ -#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory") -#elif defined(__WATCOMC__) -extern _inline void SDL_CompilerBarrier (void); -#pragma aux SDL_CompilerBarrier = "" parm [] modify exact []; -#else -#define SDL_CompilerBarrier() \ -{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); } -#endif - -/** - * Memory barriers are designed to prevent reads and writes from being - * reordered by the compiler and being seen out of order on multi-core CPUs. - * - * A typical pattern would be for thread A to write some data and a flag, - * and for thread B to read the flag and get the data. In this case you - * would insert a release barrier between writing the data and the flag, - * guaranteeing that the data write completes no later than the flag is - * written, and you would insert an acquire barrier between reading the - * flag and reading the data, to ensure that all the reads associated - * with the flag have completed. - * - * In this pattern you should always see a release barrier paired with - * an acquire barrier and you should gate the data reads/writes with a - * single flag variable. - * - * For more information on these semantics, take a look at the blog post: - * http://preshing.com/20120913/acquire-and-release-semantics - */ -extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void); -extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void); - -#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) -#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory") -#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory") -#elif defined(__GNUC__) && defined(__aarch64__) -#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory") -#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory") -#elif defined(__GNUC__) && defined(__arm__) -#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */ -/* Information from: - https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19 - - The Linux kernel provides a helper function which provides the right code for a memory barrier, - hard-coded at address 0xffff0fa0 -*/ -typedef void (*SDL_KernelMemoryBarrierFunc)(); -#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)() -#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)() -#elif 0 /* defined(__QNXNTO__) */ -#include - -#define SDL_MemoryBarrierRelease() __cpu_membarrier() -#define SDL_MemoryBarrierAcquire() __cpu_membarrier() -#else -#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__) -#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory") -#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory") -#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__) -#ifdef __thumb__ -/* The mcr instruction isn't available in thumb mode, use real functions */ -#define SDL_MEMORY_BARRIER_USES_FUNCTION -#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction() -#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction() -#else -#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory") -#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory") -#endif /* __thumb__ */ -#else -#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory") -#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory") -#endif /* __LINUX__ || __ANDROID__ */ -#endif /* __GNUC__ && __arm__ */ -#else -#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120)) -/* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */ -#include -#define SDL_MemoryBarrierRelease() __machine_rel_barrier() -#define SDL_MemoryBarrierAcquire() __machine_acq_barrier() -#else -/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */ -#define SDL_MemoryBarrierRelease() SDL_CompilerBarrier() -#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier() -#endif -#endif - -/** - * \brief A type representing an atomic integer value. It is a struct - * so people don't accidentally use numeric operations on it. - */ -typedef struct { int value; } SDL_atomic_t; - -/** - * \brief Set an atomic variable to a new value if it is currently an old value. - * - * \return SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise. - * - * \note If you don't know what this function is for, you shouldn't use it! -*/ -extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval); - -/** - * \brief Set an atomic variable to a value. - * - * \return The previous value of the atomic variable. - */ -extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v); - -/** - * \brief Get the value of an atomic variable - */ -extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a); - -/** - * \brief Add to an atomic variable. - * - * \return The previous value of the atomic variable. - * - * \note This same style can be used for any number operation - */ -extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v); - -/** - * \brief Increment an atomic variable used as a reference count. - */ -#ifndef SDL_AtomicIncRef -#define SDL_AtomicIncRef(a) SDL_AtomicAdd(a, 1) -#endif - -/** - * \brief Decrement an atomic variable used as a reference count. - * - * \return SDL_TRUE if the variable reached zero after decrementing, - * SDL_FALSE otherwise - */ -#ifndef SDL_AtomicDecRef -#define SDL_AtomicDecRef(a) (SDL_AtomicAdd(a, -1) == 1) -#endif - -/** - * \brief Set a pointer to a new value if it is currently an old value. - * - * \return SDL_TRUE if the pointer was set, SDL_FALSE otherwise. - * - * \note If you don't know what this function is for, you shouldn't use it! -*/ -extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval); - -/** - * \brief Set a pointer to a value atomically. - * - * \return The previous value of the pointer. - */ -extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v); - -/** - * \brief Get the value of a pointer atomically. - */ -extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif - -#include "close_code.h" - -#endif /* SDL_atomic_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_audio.h b/Dependencies/SDL/Windows/include/SDL_audio.h deleted file mode 100644 index 4ba3491..0000000 --- a/Dependencies/SDL/Windows/include/SDL_audio.h +++ /dev/null @@ -1,859 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_audio.h - * - * Access to the raw audio mixing buffer for the SDL library. - */ - -#ifndef SDL_audio_h_ -#define SDL_audio_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_endian.h" -#include "SDL_mutex.h" -#include "SDL_thread.h" -#include "SDL_rwops.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Audio format flags. - * - * These are what the 16 bits in SDL_AudioFormat currently mean... - * (Unspecified bits are always zero). - * - * \verbatim - ++-----------------------sample is signed if set - || - || ++-----------sample is bigendian if set - || || - || || ++---sample is float if set - || || || - || || || +---sample bit size---+ - || || || | | - 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 - \endverbatim - * - * There are macros in SDL 2.0 and later to query these bits. - */ -typedef Uint16 SDL_AudioFormat; - -/** - * \name Audio flags - */ -/* @{ */ - -#define SDL_AUDIO_MASK_BITSIZE (0xFF) -#define SDL_AUDIO_MASK_DATATYPE (1<<8) -#define SDL_AUDIO_MASK_ENDIAN (1<<12) -#define SDL_AUDIO_MASK_SIGNED (1<<15) -#define SDL_AUDIO_BITSIZE(x) (x & SDL_AUDIO_MASK_BITSIZE) -#define SDL_AUDIO_ISFLOAT(x) (x & SDL_AUDIO_MASK_DATATYPE) -#define SDL_AUDIO_ISBIGENDIAN(x) (x & SDL_AUDIO_MASK_ENDIAN) -#define SDL_AUDIO_ISSIGNED(x) (x & SDL_AUDIO_MASK_SIGNED) -#define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x)) -#define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x)) -#define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x)) - -/** - * \name Audio format flags - * - * Defaults to LSB byte order. - */ -/* @{ */ -#define AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */ -#define AUDIO_S8 0x8008 /**< Signed 8-bit samples */ -#define AUDIO_U16LSB 0x0010 /**< Unsigned 16-bit samples */ -#define AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */ -#define AUDIO_U16MSB 0x1010 /**< As above, but big-endian byte order */ -#define AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */ -#define AUDIO_U16 AUDIO_U16LSB -#define AUDIO_S16 AUDIO_S16LSB -/* @} */ - -/** - * \name int32 support - */ -/* @{ */ -#define AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */ -#define AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */ -#define AUDIO_S32 AUDIO_S32LSB -/* @} */ - -/** - * \name float32 support - */ -/* @{ */ -#define AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */ -#define AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */ -#define AUDIO_F32 AUDIO_F32LSB -/* @} */ - -/** - * \name Native audio byte ordering - */ -/* @{ */ -#if SDL_BYTEORDER == SDL_LIL_ENDIAN -#define AUDIO_U16SYS AUDIO_U16LSB -#define AUDIO_S16SYS AUDIO_S16LSB -#define AUDIO_S32SYS AUDIO_S32LSB -#define AUDIO_F32SYS AUDIO_F32LSB -#else -#define AUDIO_U16SYS AUDIO_U16MSB -#define AUDIO_S16SYS AUDIO_S16MSB -#define AUDIO_S32SYS AUDIO_S32MSB -#define AUDIO_F32SYS AUDIO_F32MSB -#endif -/* @} */ - -/** - * \name Allow change flags - * - * Which audio format changes are allowed when opening a device. - */ -/* @{ */ -#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001 -#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002 -#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004 -#define SDL_AUDIO_ALLOW_SAMPLES_CHANGE 0x00000008 -#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE) -/* @} */ - -/* @} *//* Audio flags */ - -/** - * This function is called when the audio device needs more data. - * - * \param userdata An application-specific parameter saved in - * the SDL_AudioSpec structure - * \param stream A pointer to the audio data buffer. - * \param len The length of that buffer in bytes. - * - * Once the callback returns, the buffer will no longer be valid. - * Stereo samples are stored in a LRLRLR ordering. - * - * You can choose to avoid callbacks and use SDL_QueueAudio() instead, if - * you like. Just open your audio device with a NULL callback. - */ -typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream, - int len); - -/** - * The calculated values in this structure are calculated by SDL_OpenAudio(). - * - * For multi-channel audio, the default SDL channel mapping is: - * 2: FL FR (stereo) - * 3: FL FR LFE (2.1 surround) - * 4: FL FR BL BR (quad) - * 5: FL FR FC BL BR (quad + center) - * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) - * 7: FL FR FC LFE BC SL SR (6.1 surround) - * 8: FL FR FC LFE BL BR SL SR (7.1 surround) - */ -typedef struct SDL_AudioSpec -{ - int freq; /**< DSP frequency -- samples per second */ - SDL_AudioFormat format; /**< Audio data format */ - Uint8 channels; /**< Number of channels: 1 mono, 2 stereo */ - Uint8 silence; /**< Audio buffer silence value (calculated) */ - Uint16 samples; /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */ - Uint16 padding; /**< Necessary for some compile environments */ - Uint32 size; /**< Audio buffer size in bytes (calculated) */ - SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */ - void *userdata; /**< Userdata passed to callback (ignored for NULL callbacks). */ -} SDL_AudioSpec; - - -struct SDL_AudioCVT; -typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt, - SDL_AudioFormat format); - -/** - * \brief Upper limit of filters in SDL_AudioCVT - * - * The maximum number of SDL_AudioFilter functions in SDL_AudioCVT is - * currently limited to 9. The SDL_AudioCVT.filters array has 10 pointers, - * one of which is the terminating NULL pointer. - */ -#define SDL_AUDIOCVT_MAX_FILTERS 9 - -/** - * \struct SDL_AudioCVT - * \brief A structure to hold a set of audio conversion filters and buffers. - * - * Note that various parts of the conversion pipeline can take advantage - * of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require - * you to pass it aligned data, but can possibly run much faster if you - * set both its (buf) field to a pointer that is aligned to 16 bytes, and its - * (len) field to something that's a multiple of 16, if possible. - */ -#ifdef __GNUC__ -/* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't - pad it out to 88 bytes to guarantee ABI compatibility between compilers. - vvv - The next time we rev the ABI, make sure to size the ints and add padding. -*/ -#define SDL_AUDIOCVT_PACKED __attribute__((packed)) -#else -#define SDL_AUDIOCVT_PACKED -#endif -/* */ -typedef struct SDL_AudioCVT -{ - int needed; /**< Set to 1 if conversion possible */ - SDL_AudioFormat src_format; /**< Source audio format */ - SDL_AudioFormat dst_format; /**< Target audio format */ - double rate_incr; /**< Rate conversion increment */ - Uint8 *buf; /**< Buffer to hold entire audio data */ - int len; /**< Length of original audio buffer */ - int len_cvt; /**< Length of converted audio buffer */ - int len_mult; /**< buffer must be len*len_mult big */ - double len_ratio; /**< Given len, final size is len*len_ratio */ - SDL_AudioFilter filters[SDL_AUDIOCVT_MAX_FILTERS + 1]; /**< NULL-terminated list of filter functions */ - int filter_index; /**< Current audio conversion function */ -} SDL_AUDIOCVT_PACKED SDL_AudioCVT; - - -/* Function prototypes */ - -/** - * \name Driver discovery functions - * - * These functions return the list of built in audio drivers, in the - * order that they are normally initialized by default. - */ -/* @{ */ -extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void); -extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index); -/* @} */ - -/** - * \name Initialization and cleanup - * - * \internal These functions are used internally, and should not be used unless - * you have a specific need to specify the audio driver you want to - * use. You should normally use SDL_Init() or SDL_InitSubSystem(). - */ -/* @{ */ -extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name); -extern DECLSPEC void SDLCALL SDL_AudioQuit(void); -/* @} */ - -/** - * This function returns the name of the current audio driver, or NULL - * if no driver has been initialized. - */ -extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void); - -/** - * This function opens the audio device with the desired parameters, and - * returns 0 if successful, placing the actual hardware parameters in the - * structure pointed to by \c obtained. If \c obtained is NULL, the audio - * data passed to the callback function will be guaranteed to be in the - * requested format, and will be automatically converted to the hardware - * audio format if necessary. This function returns -1 if it failed - * to open the audio device, or couldn't set up the audio thread. - * - * When filling in the desired audio spec structure, - * - \c desired->freq should be the desired audio frequency in samples-per- - * second. - * - \c desired->format should be the desired audio format. - * - \c desired->samples is the desired size of the audio buffer, in - * samples. This number should be a power of two, and may be adjusted by - * the audio driver to a value more suitable for the hardware. Good values - * seem to range between 512 and 8096 inclusive, depending on the - * application and CPU speed. Smaller values yield faster response time, - * but can lead to underflow if the application is doing heavy processing - * and cannot fill the audio buffer in time. A stereo sample consists of - * both right and left channels in LR ordering. - * Note that the number of samples is directly related to time by the - * following formula: \code ms = (samples*1000)/freq \endcode - * - \c desired->size is the size in bytes of the audio buffer, and is - * calculated by SDL_OpenAudio(). - * - \c desired->silence is the value used to set the buffer to silence, - * and is calculated by SDL_OpenAudio(). - * - \c desired->callback should be set to a function that will be called - * when the audio device is ready for more data. It is passed a pointer - * to the audio buffer, and the length in bytes of the audio buffer. - * This function usually runs in a separate thread, and so you should - * protect data structures that it accesses by calling SDL_LockAudio() - * and SDL_UnlockAudio() in your code. Alternately, you may pass a NULL - * pointer here, and call SDL_QueueAudio() with some frequency, to queue - * more audio samples to be played (or for capture devices, call - * SDL_DequeueAudio() with some frequency, to obtain audio samples). - * - \c desired->userdata is passed as the first parameter to your callback - * function. If you passed a NULL callback, this value is ignored. - * - * The audio device starts out playing silence when it's opened, and should - * be enabled for playing by calling \c SDL_PauseAudio(0) when you are ready - * for your audio callback function to be called. Since the audio driver - * may modify the requested size of the audio buffer, you should allocate - * any local mixing buffers after you open the audio device. - */ -extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired, - SDL_AudioSpec * obtained); - -/** - * SDL Audio Device IDs. - * - * A successful call to SDL_OpenAudio() is always device id 1, and legacy - * SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls - * always returns devices >= 2 on success. The legacy calls are good both - * for backwards compatibility and when you don't care about multiple, - * specific, or capture devices. - */ -typedef Uint32 SDL_AudioDeviceID; - -/** - * Get the number of available devices exposed by the current driver. - * Only valid after a successfully initializing the audio subsystem. - * Returns -1 if an explicit list of devices can't be determined; this is - * not an error. For example, if SDL is set up to talk to a remote audio - * server, it can't list every one available on the Internet, but it will - * still allow a specific host to be specified to SDL_OpenAudioDevice(). - * - * In many common cases, when this function returns a value <= 0, it can still - * successfully open the default device (NULL for first argument of - * SDL_OpenAudioDevice()). - */ -extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture); - -/** - * Get the human-readable name of a specific audio device. - * Must be a value between 0 and (number of audio devices-1). - * Only valid after a successfully initializing the audio subsystem. - * The values returned by this function reflect the latest call to - * SDL_GetNumAudioDevices(); recall that function to redetect available - * hardware. - * - * The string returned by this function is UTF-8 encoded, read-only, and - * managed internally. You are not to free it. If you need to keep the - * string for any length of time, you should make your own copy of it, as it - * will be invalid next time any of several other SDL functions is called. - */ -extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index, - int iscapture); - - -/** - * Open a specific audio device. Passing in a device name of NULL requests - * the most reasonable default (and is equivalent to calling SDL_OpenAudio()). - * - * The device name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but - * some drivers allow arbitrary and driver-specific strings, such as a - * hostname/IP address for a remote audio server, or a filename in the - * diskaudio driver. - * - * \return 0 on error, a valid device ID that is >= 2 on success. - * - * SDL_OpenAudio(), unlike this function, always acts on device ID 1. - */ -extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char - *device, - int iscapture, - const - SDL_AudioSpec * - desired, - SDL_AudioSpec * - obtained, - int - allowed_changes); - - - -/** - * \name Audio state - * - * Get the current audio state. - */ -/* @{ */ -typedef enum -{ - SDL_AUDIO_STOPPED = 0, - SDL_AUDIO_PLAYING, - SDL_AUDIO_PAUSED -} SDL_AudioStatus; -extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void); - -extern DECLSPEC SDL_AudioStatus SDLCALL -SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev); -/* @} *//* Audio State */ - -/** - * \name Pause audio functions - * - * These functions pause and unpause the audio callback processing. - * They should be called with a parameter of 0 after opening the audio - * device to start playing sound. This is so you can safely initialize - * data for your callback function after opening the audio device. - * Silence will be written to the audio device during the pause. - */ -/* @{ */ -extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on); -extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev, - int pause_on); -/* @} *//* Pause audio functions */ - -/** - * \brief Load the audio data of a WAVE file into memory - * - * Loading a WAVE file requires \c src, \c spec, \c audio_buf and \c audio_len - * to be valid pointers. The entire data portion of the file is then loaded - * into memory and decoded if necessary. - * - * If \c freesrc is non-zero, the data source gets automatically closed and - * freed before the function returns. - * - * Supported are RIFF WAVE files with the formats PCM (8, 16, 24, and 32 bits), - * IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and A-law and - * µ-law (8 bits). Other formats are currently unsupported and cause an error. - * - * If this function succeeds, the pointer returned by it is equal to \c spec - * and the pointer to the audio data allocated by the function is written to - * \c audio_buf and its length in bytes to \c audio_len. The \ref SDL_AudioSpec - * members \c freq, \c channels, and \c format are set to the values of the - * audio data in the buffer. The \c samples member is set to a sane default and - * all others are set to zero. - * - * It's necessary to use SDL_FreeWAV() to free the audio data returned in - * \c audio_buf when it is no longer used. - * - * Because of the underspecification of the Waveform format, there are many - * problematic files in the wild that cause issues with strict decoders. To - * provide compatibility with these files, this decoder is lenient in regards - * to the truncation of the file, the fact chunk, and the size of the RIFF - * chunk. The hints SDL_HINT_WAVE_RIFF_CHUNK_SIZE, SDL_HINT_WAVE_TRUNCATION, - * and SDL_HINT_WAVE_FACT_CHUNK can be used to tune the behavior of the - * loading process. - * - * Any file that is invalid (due to truncation, corruption, or wrong values in - * the headers), too big, or unsupported causes an error. Additionally, any - * critical I/O error from the data source will terminate the loading process - * with an error. The function returns NULL on error and in all cases (with the - * exception of \c src being NULL), an appropriate error message will be set. - * - * It is required that the data source supports seeking. - * - * Example: - * \code - * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...); - * \endcode - * - * \param src The data source with the WAVE data - * \param freesrc A integer value that makes the function close the data source if non-zero - * \param spec A pointer filled with the audio format of the audio data - * \param audio_buf A pointer filled with the audio data allocated by the function - * \param audio_len A pointer filled with the length of the audio data buffer in bytes - * \return NULL on error, or non-NULL on success. - */ -extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src, - int freesrc, - SDL_AudioSpec * spec, - Uint8 ** audio_buf, - Uint32 * audio_len); - -/** - * Loads a WAV from a file. - * Compatibility convenience function. - */ -#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \ - SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len) - -/** - * This function frees data previously allocated with SDL_LoadWAV_RW() - */ -extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf); - -/** - * This function takes a source format and rate and a destination format - * and rate, and initializes the \c cvt structure with information needed - * by SDL_ConvertAudio() to convert a buffer of audio data from one format - * to the other. An unsupported format causes an error and -1 will be returned. - * - * \return 0 if no conversion is needed, 1 if the audio filter is set up, - * or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt, - SDL_AudioFormat src_format, - Uint8 src_channels, - int src_rate, - SDL_AudioFormat dst_format, - Uint8 dst_channels, - int dst_rate); - -/** - * Once you have initialized the \c cvt structure using SDL_BuildAudioCVT(), - * created an audio buffer \c cvt->buf, and filled it with \c cvt->len bytes of - * audio data in the source format, this function will convert it in-place - * to the desired format. - * - * The data conversion may expand the size of the audio data, so the buffer - * \c cvt->buf should be allocated after the \c cvt structure is initialized by - * SDL_BuildAudioCVT(), and should be \c cvt->len*cvt->len_mult bytes long. - * - * \return 0 on success or -1 if \c cvt->buf is NULL. - */ -extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt); - -/* SDL_AudioStream is a new audio conversion interface. - The benefits vs SDL_AudioCVT: - - it can handle resampling data in chunks without generating - artifacts, when it doesn't have the complete buffer available. - - it can handle incoming data in any variable size. - - You push data as you have it, and pull it when you need it - */ -/* this is opaque to the outside world. */ -struct _SDL_AudioStream; -typedef struct _SDL_AudioStream SDL_AudioStream; - -/** - * Create a new audio stream - * - * \param src_format The format of the source audio - * \param src_channels The number of channels of the source audio - * \param src_rate The sampling rate of the source audio - * \param dst_format The format of the desired audio output - * \param dst_channels The number of channels of the desired audio output - * \param dst_rate The sampling rate of the desired audio output - * \return 0 on success, or -1 on error. - * - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamFlush - * \sa SDL_AudioStreamClear - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format, - const Uint8 src_channels, - const int src_rate, - const SDL_AudioFormat dst_format, - const Uint8 dst_channels, - const int dst_rate); - -/** - * Add data to be converted/resampled to the stream - * - * \param stream The stream the audio data is being added to - * \param buf A pointer to the audio data to add - * \param len The number of bytes to write to the stream - * \return 0 on success, or -1 on error. - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamFlush - * \sa SDL_AudioStreamClear - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len); - -/** - * Get converted/resampled data from the stream - * - * \param stream The stream the audio is being requested from - * \param buf A buffer to fill with audio data - * \param len The maximum number of bytes to fill - * \return The number of bytes read from the stream, or -1 on error - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamFlush - * \sa SDL_AudioStreamClear - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len); - -/** - * Get the number of converted/resampled bytes available. The stream may be - * buffering data behind the scenes until it has enough to resample - * correctly, so this number might be lower than what you expect, or even - * be zero. Add more data or flush the stream if you need the data now. - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamFlush - * \sa SDL_AudioStreamClear - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream); - -/** - * Tell the stream that you're done sending data, and anything being buffered - * should be converted/resampled and made available immediately. - * - * It is legal to add more data to a stream after flushing, but there will - * be audio gaps in the output. Generally this is intended to signal the - * end of input, so the complete output becomes available. - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamClear - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream); - -/** - * Clear any pending data in the stream without converting it - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamFlush - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream); - -/** - * Free an audio stream - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamFlush - * \sa SDL_AudioStreamClear - */ -extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream); - -#define SDL_MIX_MAXVOLUME 128 -/** - * This takes two audio buffers of the playing audio format and mixes - * them, performing addition, volume adjustment, and overflow clipping. - * The volume ranges from 0 - 128, and should be set to ::SDL_MIX_MAXVOLUME - * for full audio volume. Note this does not change hardware volume. - * This is provided for convenience -- you can mix your own audio data. - */ -extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src, - Uint32 len, int volume); - -/** - * This works like SDL_MixAudio(), but you specify the audio format instead of - * using the format of audio device 1. Thus it can be used when no audio - * device is open at all. - */ -extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst, - const Uint8 * src, - SDL_AudioFormat format, - Uint32 len, int volume); - -/** - * Queue more audio on non-callback devices. - * - * (If you are looking to retrieve queued audio from a non-callback capture - * device, you want SDL_DequeueAudio() instead. This will return -1 to - * signify an error if you use it with capture devices.) - * - * SDL offers two ways to feed audio to the device: you can either supply a - * callback that SDL triggers with some frequency to obtain more audio - * (pull method), or you can supply no callback, and then SDL will expect - * you to supply data at regular intervals (push method) with this function. - * - * There are no limits on the amount of data you can queue, short of - * exhaustion of address space. Queued data will drain to the device as - * necessary without further intervention from you. If the device needs - * audio but there is not enough queued, it will play silence to make up - * the difference. This means you will have skips in your audio playback - * if you aren't routinely queueing sufficient data. - * - * This function copies the supplied data, so you are safe to free it when - * the function returns. This function is thread-safe, but queueing to the - * same device from two threads at once does not promise which buffer will - * be queued first. - * - * You may not queue audio on a device that is using an application-supplied - * callback; doing so returns an error. You have to use the audio callback - * or queue audio with this function, but not both. - * - * You should not call SDL_LockAudio() on the device before queueing; SDL - * handles locking internally for this function. - * - * \param dev The device ID to which we will queue audio. - * \param data The data to queue to the device for later playback. - * \param len The number of bytes (not samples!) to which (data) points. - * \return 0 on success, or -1 on error. - * - * \sa SDL_GetQueuedAudioSize - * \sa SDL_ClearQueuedAudio - */ -extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len); - -/** - * Dequeue more audio on non-callback devices. - * - * (If you are looking to queue audio for output on a non-callback playback - * device, you want SDL_QueueAudio() instead. This will always return 0 - * if you use it with playback devices.) - * - * SDL offers two ways to retrieve audio from a capture device: you can - * either supply a callback that SDL triggers with some frequency as the - * device records more audio data, (push method), or you can supply no - * callback, and then SDL will expect you to retrieve data at regular - * intervals (pull method) with this function. - * - * There are no limits on the amount of data you can queue, short of - * exhaustion of address space. Data from the device will keep queuing as - * necessary without further intervention from you. This means you will - * eventually run out of memory if you aren't routinely dequeueing data. - * - * Capture devices will not queue data when paused; if you are expecting - * to not need captured audio for some length of time, use - * SDL_PauseAudioDevice() to stop the capture device from queueing more - * data. This can be useful during, say, level loading times. When - * unpaused, capture devices will start queueing data from that point, - * having flushed any capturable data available while paused. - * - * This function is thread-safe, but dequeueing from the same device from - * two threads at once does not promise which thread will dequeued data - * first. - * - * You may not dequeue audio from a device that is using an - * application-supplied callback; doing so returns an error. You have to use - * the audio callback, or dequeue audio with this function, but not both. - * - * You should not call SDL_LockAudio() on the device before queueing; SDL - * handles locking internally for this function. - * - * \param dev The device ID from which we will dequeue audio. - * \param data A pointer into where audio data should be copied. - * \param len The number of bytes (not samples!) to which (data) points. - * \return number of bytes dequeued, which could be less than requested. - * - * \sa SDL_GetQueuedAudioSize - * \sa SDL_ClearQueuedAudio - */ -extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len); - -/** - * Get the number of bytes of still-queued audio. - * - * For playback device: - * - * This is the number of bytes that have been queued for playback with - * SDL_QueueAudio(), but have not yet been sent to the hardware. This - * number may shrink at any time, so this only informs of pending data. - * - * Once we've sent it to the hardware, this function can not decide the - * exact byte boundary of what has been played. It's possible that we just - * gave the hardware several kilobytes right before you called this - * function, but it hasn't played any of it yet, or maybe half of it, etc. - * - * For capture devices: - * - * This is the number of bytes that have been captured by the device and - * are waiting for you to dequeue. This number may grow at any time, so - * this only informs of the lower-bound of available data. - * - * You may not queue audio on a device that is using an application-supplied - * callback; calling this function on such a device always returns 0. - * You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use - * the audio callback, but not both. - * - * You should not call SDL_LockAudio() on the device before querying; SDL - * handles locking internally for this function. - * - * \param dev The device ID of which we will query queued audio size. - * \return Number of bytes (not samples!) of queued audio. - * - * \sa SDL_QueueAudio - * \sa SDL_ClearQueuedAudio - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev); - -/** - * Drop any queued audio data. For playback devices, this is any queued data - * still waiting to be submitted to the hardware. For capture devices, this - * is any data that was queued by the device that hasn't yet been dequeued by - * the application. - * - * Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For - * playback devices, the hardware will start playing silence if more audio - * isn't queued. Unpaused capture devices will start filling the queue again - * as soon as they have more data available (which, depending on the state - * of the hardware and the thread, could be before this function call - * returns!). - * - * This will not prevent playback of queued audio that's already been sent - * to the hardware, as we can not undo that, so expect there to be some - * fraction of a second of audio that might still be heard. This can be - * useful if you want to, say, drop any pending music during a level change - * in your game. - * - * You may not queue audio on a device that is using an application-supplied - * callback; calling this function on such a device is always a no-op. - * You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use - * the audio callback, but not both. - * - * You should not call SDL_LockAudio() on the device before clearing the - * queue; SDL handles locking internally for this function. - * - * This function always succeeds and thus returns void. - * - * \param dev The device ID of which to clear the audio queue. - * - * \sa SDL_QueueAudio - * \sa SDL_GetQueuedAudioSize - */ -extern DECLSPEC void SDLCALL SDL_ClearQueuedAudio(SDL_AudioDeviceID dev); - - -/** - * \name Audio lock functions - * - * The lock manipulated by these functions protects the callback function. - * During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that - * the callback function is not running. Do not call these from the callback - * function or you will cause deadlock. - */ -/* @{ */ -extern DECLSPEC void SDLCALL SDL_LockAudio(void); -extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev); -extern DECLSPEC void SDLCALL SDL_UnlockAudio(void); -extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev); -/* @} *//* Audio lock functions */ - -/** - * This function shuts down audio processing and closes the audio device. - */ -extern DECLSPEC void SDLCALL SDL_CloseAudio(void); -extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_audio_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_bits.h b/Dependencies/SDL/Windows/include/SDL_bits.h deleted file mode 100644 index db150ed..0000000 --- a/Dependencies/SDL/Windows/include/SDL_bits.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_bits.h - * - * Functions for fiddling with bits and bitmasks. - */ - -#ifndef SDL_bits_h_ -#define SDL_bits_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \file SDL_bits.h - */ - -/** - * Get the index of the most significant bit. Result is undefined when called - * with 0. This operation can also be stated as "count leading zeroes" and - * "log base 2". - * - * \return Index of the most significant bit, or -1 if the value is 0. - */ -#if defined(__WATCOMC__) && defined(__386__) -extern _inline int _SDL_clz_watcom (Uint32); -#pragma aux _SDL_clz_watcom = \ - "bsr eax, eax" \ - "xor eax, 31" \ - parm [eax] nomemory \ - value [eax] \ - modify exact [eax] nomemory; -#endif - -SDL_FORCE_INLINE int -SDL_MostSignificantBitIndex32(Uint32 x) -{ -#if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) - /* Count Leading Zeroes builtin in GCC. - * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html - */ - if (x == 0) { - return -1; - } - return 31 - __builtin_clz(x); -#elif defined(__WATCOMC__) && defined(__386__) - if (x == 0) { - return -1; - } - return 31 - _SDL_clz_watcom(x); -#else - /* Based off of Bit Twiddling Hacks by Sean Eron Anderson - * , released in the public domain. - * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog - */ - const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000}; - const int S[] = {1, 2, 4, 8, 16}; - - int msbIndex = 0; - int i; - - if (x == 0) { - return -1; - } - - for (i = 4; i >= 0; i--) - { - if (x & b[i]) - { - x >>= S[i]; - msbIndex |= S[i]; - } - } - - return msbIndex; -#endif -} - -SDL_FORCE_INLINE SDL_bool -SDL_HasExactlyOneBitSet32(Uint32 x) -{ - if (x && !(x & (x - 1))) { - return SDL_TRUE; - } - return SDL_FALSE; -} - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_bits_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_blendmode.h b/Dependencies/SDL/Windows/include/SDL_blendmode.h deleted file mode 100644 index 5e21a79..0000000 --- a/Dependencies/SDL/Windows/include/SDL_blendmode.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_blendmode.h - * - * Header file declaring the SDL_BlendMode enumeration - */ - -#ifndef SDL_blendmode_h_ -#define SDL_blendmode_h_ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief The blend mode used in SDL_RenderCopy() and drawing operations. - */ -typedef enum -{ - SDL_BLENDMODE_NONE = 0x00000000, /**< no blending - dstRGBA = srcRGBA */ - SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending - dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) - dstA = srcA + (dstA * (1-srcA)) */ - SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending - dstRGB = (srcRGB * srcA) + dstRGB - dstA = dstA */ - SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate - dstRGB = srcRGB * dstRGB - dstA = dstA */ - SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply - dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) - dstA = (srcA * dstA) + (dstA * (1-srcA)) */ - SDL_BLENDMODE_INVALID = 0x7FFFFFFF - - /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */ - -} SDL_BlendMode; - -/** - * \brief The blend operation used when combining source and destination pixel components - */ -typedef enum -{ - SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */ - SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */ - SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */ - SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D11 */ - SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D11 */ - -} SDL_BlendOperation; - -/** - * \brief The normalized factor used to multiply pixel components - */ -typedef enum -{ - SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */ - SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */ - SDL_BLENDFACTOR_SRC_COLOR = 0x3, /**< srcR, srcG, srcB, srcA */ - SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4, /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */ - SDL_BLENDFACTOR_SRC_ALPHA = 0x5, /**< srcA, srcA, srcA, srcA */ - SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6, /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */ - SDL_BLENDFACTOR_DST_COLOR = 0x7, /**< dstR, dstG, dstB, dstA */ - SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */ - SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */ - SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */ - -} SDL_BlendFactor; - -/** - * \brief Create a custom blend mode, which may or may not be supported by a given renderer - * - * \param srcColorFactor source color factor - * \param dstColorFactor destination color factor - * \param colorOperation color operation - * \param srcAlphaFactor source alpha factor - * \param dstAlphaFactor destination alpha factor - * \param alphaOperation alpha operation - * - * The result of the blend mode operation will be: - * dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor - * and - * dstA = dstA * dstAlphaFactor alphaOperation srcA * srcAlphaFactor - */ -extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, - SDL_BlendFactor dstColorFactor, - SDL_BlendOperation colorOperation, - SDL_BlendFactor srcAlphaFactor, - SDL_BlendFactor dstAlphaFactor, - SDL_BlendOperation alphaOperation); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_blendmode_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_clipboard.h b/Dependencies/SDL/Windows/include/SDL_clipboard.h deleted file mode 100644 index dbf69fc..0000000 --- a/Dependencies/SDL/Windows/include/SDL_clipboard.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_clipboard.h - * - * Include file for SDL clipboard handling - */ - -#ifndef SDL_clipboard_h_ -#define SDL_clipboard_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* Function prototypes */ - -/** - * \brief Put UTF-8 text into the clipboard - * - * \sa SDL_GetClipboardText() - */ -extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text); - -/** - * \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free() - * - * \sa SDL_SetClipboardText() - */ -extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void); - -/** - * \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty - * - * \sa SDL_GetClipboardText() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_clipboard_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_config.h b/Dependencies/SDL/Windows/include/SDL_config.h deleted file mode 100644 index f269bfc..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config.h +++ /dev/null @@ -1,260 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_windows_h_ -#define SDL_config_windows_h_ -#define SDL_config_h_ - -#include "SDL_platform.h" - -/* This is a set of defines to configure the SDL features */ - -#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H) -#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) -#define HAVE_STDINT_H 1 -#elif defined(_MSC_VER) -typedef signed __int8 int8_t; -typedef unsigned __int8 uint8_t; -typedef signed __int16 int16_t; -typedef unsigned __int16 uint16_t; -typedef signed __int32 int32_t; -typedef unsigned __int32 uint32_t; -typedef signed __int64 int64_t; -typedef unsigned __int64 uint64_t; -#ifndef _UINTPTR_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 uintptr_t; -#else -typedef unsigned int uintptr_t; -#endif -#define _UINTPTR_T_DEFINED -#endif -/* Older Visual C++ headers don't have the Win64-compatible typedefs... */ -#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR))) -#define DWORD_PTR DWORD -#endif -#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR))) -#define LONG_PTR LONG -#endif -#else /* !__GNUC__ && !_MSC_VER */ -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed short int16_t; -typedef unsigned short uint16_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef signed long long int64_t; -typedef unsigned long long uint64_t; -#ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef unsigned int size_t; -#endif -typedef unsigned int uintptr_t; -#endif /* __GNUC__ || _MSC_VER */ -#endif /* !_STDINT_H_ && !HAVE_STDINT_H */ - -#ifdef _WIN64 -# define SIZEOF_VOIDP 8 -#else -# define SIZEOF_VOIDP 4 -#endif - -#define HAVE_DDRAW_H 1 -#define HAVE_DINPUT_H 1 -#define HAVE_DSOUND_H 1 -#define HAVE_DXGI_H 1 -#define HAVE_XINPUT_H 1 -#define HAVE_MMDEVICEAPI_H 1 -#define HAVE_AUDIOCLIENT_H 1 - -/* This is disabled by default to avoid C runtime dependencies and manifest requirements */ -#ifdef HAVE_LIBC -/* Useful headers */ -#define STDC_HEADERS 1 -#define HAVE_CTYPE_H 1 -#define HAVE_FLOAT_H 1 -#define HAVE_LIMITS_H 1 -#define HAVE_MATH_H 1 -#define HAVE_SIGNAL_H 1 -#define HAVE_STDIO_H 1 -#define HAVE_STRING_H 1 - -/* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_QSORT 1 -#define HAVE_ABS 1 -#define HAVE_MEMSET 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMCMP 1 -#define HAVE_STRLEN 1 -#define HAVE__STRREV 1 -/* These functions have security warnings, so we won't use them */ -/* #undef HAVE__STRUPR */ -/* #undef HAVE__STRLWR */ -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -/* #undef HAVE_STRTOK_R */ -#if defined(_MSC_VER) -#define HAVE_STRTOK_S 1 -#endif -/* These functions have security warnings, so we won't use them */ -/* #undef HAVE__LTOA */ -/* #undef HAVE__ULTOA */ -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE__STRICMP 1 -#define HAVE__STRNICMP 1 -#define HAVE_ACOS 1 -#define HAVE_ACOSF 1 -#define HAVE_ASIN 1 -#define HAVE_ASINF 1 -#define HAVE_ATAN 1 -#define HAVE_ATANF 1 -#define HAVE_ATAN2 1 -#define HAVE_ATAN2F 1 -#define HAVE_CEILF 1 -#define HAVE__COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_EXP 1 -#define HAVE_EXPF 1 -#define HAVE_FABS 1 -#define HAVE_FABSF 1 -#define HAVE_FLOOR 1 -#define HAVE_FLOORF 1 -#define HAVE_FMOD 1 -#define HAVE_FMODF 1 -#define HAVE_LOG 1 -#define HAVE_LOGF 1 -#define HAVE_LOG10 1 -#define HAVE_LOG10F 1 -#define HAVE_POW 1 -#define HAVE_POWF 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SQRTF 1 -#define HAVE_TAN 1 -#define HAVE_TANF 1 -#if defined(_MSC_VER) -/* These functions were added with the VC++ 2013 C runtime library */ -#if _MSC_VER >= 1800 -#define HAVE_STRTOLL 1 -#define HAVE_VSSCANF 1 -#define HAVE_SCALBN 1 -#define HAVE_SCALBNF 1 -#endif -/* This function is available with at least the VC++ 2008 C runtime library */ -#if _MSC_VER >= 1400 -#define HAVE__FSEEKI64 1 -#endif -#endif -#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES) -#define HAVE_M_PI 1 -#endif -#else -#define HAVE_STDARG_H 1 -#define HAVE_STDDEF_H 1 -#endif - -/* Enable various audio drivers */ -#define SDL_AUDIO_DRIVER_WASAPI 1 -#define SDL_AUDIO_DRIVER_DSOUND 1 -#define SDL_AUDIO_DRIVER_WINMM 1 -#define SDL_AUDIO_DRIVER_DISK 1 -#define SDL_AUDIO_DRIVER_DUMMY 1 - -/* Enable various input drivers */ -#define SDL_JOYSTICK_DINPUT 1 -#define SDL_JOYSTICK_XINPUT 1 -#define SDL_JOYSTICK_HIDAPI 1 -#define SDL_HAPTIC_DINPUT 1 -#define SDL_HAPTIC_XINPUT 1 - -/* Enable the dummy sensor driver */ -#define SDL_SENSOR_DUMMY 1 - -/* Enable various shared object loading systems */ -#define SDL_LOADSO_WINDOWS 1 - -/* Enable various threading systems */ -#define SDL_THREAD_WINDOWS 1 - -/* Enable various timer systems */ -#define SDL_TIMER_WINDOWS 1 - -/* Enable various video drivers */ -#define SDL_VIDEO_DRIVER_DUMMY 1 -#define SDL_VIDEO_DRIVER_WINDOWS 1 - -#ifndef SDL_VIDEO_RENDER_D3D -#define SDL_VIDEO_RENDER_D3D 1 -#endif -#ifndef SDL_VIDEO_RENDER_D3D11 -#define SDL_VIDEO_RENDER_D3D11 0 -#endif - -/* Enable OpenGL support */ -#ifndef SDL_VIDEO_OPENGL -#define SDL_VIDEO_OPENGL 1 -#endif -#ifndef SDL_VIDEO_OPENGL_WGL -#define SDL_VIDEO_OPENGL_WGL 1 -#endif -#ifndef SDL_VIDEO_RENDER_OGL -#define SDL_VIDEO_RENDER_OGL 1 -#endif -#ifndef SDL_VIDEO_RENDER_OGL_ES2 -#define SDL_VIDEO_RENDER_OGL_ES2 1 -#endif -#ifndef SDL_VIDEO_OPENGL_ES2 -#define SDL_VIDEO_OPENGL_ES2 1 -#endif -#ifndef SDL_VIDEO_OPENGL_EGL -#define SDL_VIDEO_OPENGL_EGL 1 -#endif - -/* Enable Vulkan support */ -#define SDL_VIDEO_VULKAN 1 - -/* Enable system power support */ -#define SDL_POWER_WINDOWS 1 - -/* Enable filesystem support */ -#define SDL_FILESYSTEM_WINDOWS 1 - -/* Enable assembly routines (Win64 doesn't have inline asm) */ -#ifndef _WIN64 -#define SDL_ASSEMBLY_ROUTINES 1 -#endif - -#endif /* SDL_config_windows_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config.h.cmake b/Dependencies/SDL/Windows/include/SDL_config.h.cmake deleted file mode 100644 index c57266c..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config.h.cmake +++ /dev/null @@ -1,445 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_h_ -#define SDL_config_h_ - -/** - * \file SDL_config.h.in - * - * This is a set of defines to configure the SDL features - */ - -/* General platform specific identifiers */ -#include "SDL_platform.h" - -/* C language features */ -#cmakedefine const @HAVE_CONST@ -#cmakedefine inline @HAVE_INLINE@ -#cmakedefine volatile @HAVE_VOLATILE@ - -/* C datatypes */ -/* Define SIZEOF_VOIDP for 64/32 architectures */ -#ifdef __LP64__ -#define SIZEOF_VOIDP 8 -#else -#define SIZEOF_VOIDP 4 -#endif - -#cmakedefine HAVE_GCC_ATOMICS @HAVE_GCC_ATOMICS@ -#cmakedefine HAVE_GCC_SYNC_LOCK_TEST_AND_SET @HAVE_GCC_SYNC_LOCK_TEST_AND_SET@ - -#cmakedefine HAVE_D3D_H @HAVE_D3D_H@ -#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@ -#cmakedefine HAVE_DDRAW_H @HAVE_DDRAW_H@ -#cmakedefine HAVE_DSOUND_H @HAVE_DSOUND_H@ -#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@ -#cmakedefine HAVE_XAUDIO2_H @HAVE_XAUDIO2_H@ -#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@ -#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@ -#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@ -#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@ - -/* Comment this if you want to build without any C library requirements */ -#cmakedefine HAVE_LIBC 1 -#if HAVE_LIBC - -/* Useful headers */ -#cmakedefine HAVE_ALLOCA_H 1 -#cmakedefine HAVE_SYS_TYPES_H 1 -#cmakedefine HAVE_STDIO_H 1 -#cmakedefine STDC_HEADERS 1 -#cmakedefine HAVE_STDLIB_H 1 -#cmakedefine HAVE_STDARG_H 1 -#cmakedefine HAVE_MALLOC_H 1 -#cmakedefine HAVE_MEMORY_H 1 -#cmakedefine HAVE_STRING_H 1 -#cmakedefine HAVE_STRINGS_H 1 -#cmakedefine HAVE_WCHAR_H 1 -#cmakedefine HAVE_INTTYPES_H 1 -#cmakedefine HAVE_STDINT_H 1 -#cmakedefine HAVE_CTYPE_H 1 -#cmakedefine HAVE_MATH_H 1 -#cmakedefine HAVE_ICONV_H 1 -#cmakedefine HAVE_SIGNAL_H 1 -#cmakedefine HAVE_ALTIVEC_H 1 -#cmakedefine HAVE_PTHREAD_NP_H 1 -#cmakedefine HAVE_LIBUDEV_H 1 -#cmakedefine HAVE_DBUS_DBUS_H 1 -#cmakedefine HAVE_IBUS_IBUS_H 1 -#cmakedefine HAVE_FCITX_FRONTEND_H 1 -#cmakedefine HAVE_LIBSAMPLERATE_H 1 - -/* C library functions */ -#cmakedefine HAVE_MALLOC 1 -#cmakedefine HAVE_CALLOC 1 -#cmakedefine HAVE_REALLOC 1 -#cmakedefine HAVE_FREE 1 -#cmakedefine HAVE_ALLOCA 1 -#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */ -#cmakedefine HAVE_GETENV 1 -#cmakedefine HAVE_SETENV 1 -#cmakedefine HAVE_PUTENV 1 -#cmakedefine HAVE_UNSETENV 1 -#endif -#cmakedefine HAVE_QSORT 1 -#cmakedefine HAVE_ABS 1 -#cmakedefine HAVE_BCOPY 1 -#cmakedefine HAVE_MEMSET 1 -#cmakedefine HAVE_MEMCPY 1 -#cmakedefine HAVE_MEMMOVE 1 -#cmakedefine HAVE_MEMCMP 1 -#cmakedefine HAVE_WCSLEN 1 -#cmakedefine HAVE_WCSLCPY 1 -#cmakedefine HAVE_WCSLCAT 1 -#cmakedefine HAVE_WCSCMP 1 -#cmakedefine HAVE_STRLEN 1 -#cmakedefine HAVE_STRLCPY 1 -#cmakedefine HAVE_STRLCAT 1 -#cmakedefine HAVE_STRDUP 1 -#cmakedefine HAVE__STRREV 1 -#cmakedefine HAVE__STRUPR 1 -#cmakedefine HAVE__STRLWR 1 -#cmakedefine HAVE_INDEX 1 -#cmakedefine HAVE_RINDEX 1 -#cmakedefine HAVE_STRCHR 1 -#cmakedefine HAVE_STRRCHR 1 -#cmakedefine HAVE_STRSTR 1 -#cmakedefine HAVE_ITOA 1 -#cmakedefine HAVE__LTOA 1 -#cmakedefine HAVE__UITOA 1 -#cmakedefine HAVE__ULTOA 1 -#cmakedefine HAVE_STRTOL 1 -#cmakedefine HAVE_STRTOUL 1 -#cmakedefine HAVE__I64TOA 1 -#cmakedefine HAVE__UI64TOA 1 -#cmakedefine HAVE_STRTOLL 1 -#cmakedefine HAVE_STRTOULL 1 -#cmakedefine HAVE_STRTOD 1 -#cmakedefine HAVE_ATOI 1 -#cmakedefine HAVE_ATOF 1 -#cmakedefine HAVE_STRCMP 1 -#cmakedefine HAVE_STRNCMP 1 -#cmakedefine HAVE__STRICMP 1 -#cmakedefine HAVE_STRCASECMP 1 -#cmakedefine HAVE__STRNICMP 1 -#cmakedefine HAVE_STRNCASECMP 1 -#cmakedefine HAVE_VSSCANF 1 -#cmakedefine HAVE_VSNPRINTF 1 -#cmakedefine HAVE_M_PI 1 -#cmakedefine HAVE_ATAN 1 -#cmakedefine HAVE_ATAN2 1 -#cmakedefine HAVE_ACOS 1 -#cmakedefine HAVE_ASIN 1 -#cmakedefine HAVE_CEIL 1 -#cmakedefine HAVE_COPYSIGN 1 -#cmakedefine HAVE_COS 1 -#cmakedefine HAVE_COSF 1 -#cmakedefine HAVE_FABS 1 -#cmakedefine HAVE_FLOOR 1 -#cmakedefine HAVE_LOG 1 -#cmakedefine HAVE_POW 1 -#cmakedefine HAVE_SCALBN 1 -#cmakedefine HAVE_SIN 1 -#cmakedefine HAVE_SINF 1 -#cmakedefine HAVE_SQRT 1 -#cmakedefine HAVE_SQRTF 1 -#cmakedefine HAVE_TAN 1 -#cmakedefine HAVE_TANF 1 -#cmakedefine HAVE_FOPEN64 1 -#cmakedefine HAVE_FSEEKO 1 -#cmakedefine HAVE_FSEEKO64 1 -#cmakedefine HAVE_SIGACTION 1 -#cmakedefine HAVE_SA_SIGACTION 1 -#cmakedefine HAVE_SETJMP 1 -#cmakedefine HAVE_NANOSLEEP 1 -#cmakedefine HAVE_SYSCONF 1 -#cmakedefine HAVE_SYSCTLBYNAME 1 -#cmakedefine HAVE_CLOCK_GETTIME 1 -#cmakedefine HAVE_GETPAGESIZE 1 -#cmakedefine HAVE_MPROTECT 1 -#cmakedefine HAVE_ICONV 1 -#cmakedefine HAVE_PTHREAD_SETNAME_NP 1 -#cmakedefine HAVE_PTHREAD_SET_NAME_NP 1 -#cmakedefine HAVE_SEM_TIMEDWAIT 1 -#cmakedefine HAVE_GETAUXVAL 1 -#cmakedefine HAVE_POLL 1 - -#elif __WIN32__ -#cmakedefine HAVE_STDARG_H 1 -#cmakedefine HAVE_STDDEF_H 1 -#else -/* We may need some replacement for stdarg.h here */ -#include -#endif /* HAVE_LIBC */ - -/* SDL internal assertion support */ -#cmakedefine SDL_DEFAULT_ASSERT_LEVEL @SDL_DEFAULT_ASSERT_LEVEL@ - -/* Allow disabling of core subsystems */ -#cmakedefine SDL_ATOMIC_DISABLED @SDL_ATOMIC_DISABLED@ -#cmakedefine SDL_AUDIO_DISABLED @SDL_AUDIO_DISABLED@ -#cmakedefine SDL_CPUINFO_DISABLED @SDL_CPUINFO_DISABLED@ -#cmakedefine SDL_EVENTS_DISABLED @SDL_EVENTS_DISABLED@ -#cmakedefine SDL_FILE_DISABLED @SDL_FILE_DISABLED@ -#cmakedefine SDL_JOYSTICK_DISABLED @SDL_JOYSTICK_DISABLED@ -#cmakedefine SDL_HAPTIC_DISABLED @SDL_HAPTIC_DISABLED@ -#cmakedefine SDL_LOADSO_DISABLED @SDL_LOADSO_DISABLED@ -#cmakedefine SDL_RENDER_DISABLED @SDL_RENDER_DISABLED@ -#cmakedefine SDL_THREADS_DISABLED @SDL_THREADS_DISABLED@ -#cmakedefine SDL_TIMERS_DISABLED @SDL_TIMERS_DISABLED@ -#cmakedefine SDL_VIDEO_DISABLED @SDL_VIDEO_DISABLED@ -#cmakedefine SDL_POWER_DISABLED @SDL_POWER_DISABLED@ -#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@ - -/* Enable various audio drivers */ -#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@ -#cmakedefine SDL_AUDIO_DRIVER_ALSA_DYNAMIC @SDL_AUDIO_DRIVER_ALSA_DYNAMIC@ -#cmakedefine SDL_AUDIO_DRIVER_ANDROID @SDL_AUDIO_DRIVER_ANDROID@ -#cmakedefine SDL_AUDIO_DRIVER_ARTS @SDL_AUDIO_DRIVER_ARTS@ -#cmakedefine SDL_AUDIO_DRIVER_ARTS_DYNAMIC @SDL_AUDIO_DRIVER_ARTS_DYNAMIC@ -#cmakedefine SDL_AUDIO_DRIVER_COREAUDIO @SDL_AUDIO_DRIVER_COREAUDIO@ -#cmakedefine SDL_AUDIO_DRIVER_DISK @SDL_AUDIO_DRIVER_DISK@ -#cmakedefine SDL_AUDIO_DRIVER_DSOUND @SDL_AUDIO_DRIVER_DSOUND@ -#cmakedefine SDL_AUDIO_DRIVER_DUMMY @SDL_AUDIO_DRIVER_DUMMY@ -#cmakedefine SDL_AUDIO_DRIVER_EMSCRIPTEN @SDL_AUDIO_DRIVER_EMSCRIPTEN@ -#cmakedefine SDL_AUDIO_DRIVER_ESD @SDL_AUDIO_DRIVER_ESD@ -#cmakedefine SDL_AUDIO_DRIVER_ESD_DYNAMIC @SDL_AUDIO_DRIVER_ESD_DYNAMIC@ -#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND @SDL_AUDIO_DRIVER_FUSIONSOUND@ -#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC @SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC@ -#cmakedefine SDL_AUDIO_DRIVER_HAIKU @SDL_AUDIO_DRIVER_HAIKU@ -#cmakedefine SDL_AUDIO_DRIVER_JACK @SDL_AUDIO_DRIVER_JACK@ -#cmakedefine SDL_AUDIO_DRIVER_JACK_DYNAMIC @SDL_AUDIO_DRIVER_JACK_DYNAMIC@ -#cmakedefine SDL_AUDIO_DRIVER_NAS @SDL_AUDIO_DRIVER_NAS@ -#cmakedefine SDL_AUDIO_DRIVER_NAS_DYNAMIC @SDL_AUDIO_DRIVER_NAS_DYNAMIC@ -#cmakedefine SDL_AUDIO_DRIVER_NETBSD @SDL_AUDIO_DRIVER_NETBSD@ -#cmakedefine SDL_AUDIO_DRIVER_OSS @SDL_AUDIO_DRIVER_OSS@ -#cmakedefine SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H @SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H@ -#cmakedefine SDL_AUDIO_DRIVER_PAUDIO @SDL_AUDIO_DRIVER_PAUDIO@ -#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO @SDL_AUDIO_DRIVER_PULSEAUDIO@ -#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC @SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC@ -#cmakedefine SDL_AUDIO_DRIVER_QSA @SDL_AUDIO_DRIVER_QSA@ -#cmakedefine SDL_AUDIO_DRIVER_SNDIO @SDL_AUDIO_DRIVER_SNDIO@ -#cmakedefine SDL_AUDIO_DRIVER_SNDIO_DYNAMIC @SDL_AUDIO_DRIVER_SNDIO_DYNAMIC@ -#cmakedefine SDL_AUDIO_DRIVER_SUNAUDIO @SDL_AUDIO_DRIVER_SUNAUDIO@ -#cmakedefine SDL_AUDIO_DRIVER_WASAPI @SDL_AUDIO_DRIVER_WASAPI@ -#cmakedefine SDL_AUDIO_DRIVER_WINMM @SDL_AUDIO_DRIVER_WINMM@ -#cmakedefine SDL_AUDIO_DRIVER_XAUDIO2 @SDL_AUDIO_DRIVER_XAUDIO2@ - -/* Enable various input drivers */ -#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@ -#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@ -#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@ -#cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@ -#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@ -#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@ -#cmakedefine SDL_JOYSTICK_XINPUT @SDL_JOYSTICK_XINPUT@ -#cmakedefine SDL_JOYSTICK_DUMMY @SDL_JOYSTICK_DUMMY@ -#cmakedefine SDL_JOYSTICK_IOKIT @SDL_JOYSTICK_IOKIT@ -#cmakedefine SDL_JOYSTICK_MFI @SDL_JOYSTICK_MFI@ -#cmakedefine SDL_JOYSTICK_LINUX @SDL_JOYSTICK_LINUX@ -#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@ -#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@ -#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@ -#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@ -#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@ -#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@ -#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@ -#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@ -#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@ -#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@ - -/* Enable various shared object loading systems */ -#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@ -#cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@ -#cmakedefine SDL_LOADSO_LDG @SDL_LOADSO_LDG@ -#cmakedefine SDL_LOADSO_WINDOWS @SDL_LOADSO_WINDOWS@ - -/* Enable various threading systems */ -#cmakedefine SDL_THREAD_PTHREAD @SDL_THREAD_PTHREAD@ -#cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX@ -#cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP@ -#cmakedefine SDL_THREAD_WINDOWS @SDL_THREAD_WINDOWS@ - -/* Enable various timer systems */ -#cmakedefine SDL_TIMER_HAIKU @SDL_TIMER_HAIKU@ -#cmakedefine SDL_TIMER_DUMMY @SDL_TIMER_DUMMY@ -#cmakedefine SDL_TIMER_UNIX @SDL_TIMER_UNIX@ -#cmakedefine SDL_TIMER_WINDOWS @SDL_TIMER_WINDOWS@ -#cmakedefine SDL_TIMER_WINCE @SDL_TIMER_WINCE@ - -/* Enable various video drivers */ -#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@ -#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@ -#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@ -#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@ -#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@ -#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@ -#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@ -#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@ -#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@ -#cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@ -#cmakedefine SDL_VIDEO_DRIVER_VIVANTE_VDK @SDL_VIDEO_DRIVER_VIVANTE_VDK@ - -#cmakedefine SDL_VIDEO_DRIVER_KMSDRM @SDL_VIDEO_DRIVER_KMSDRM@ -#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC@ -#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM@ - -#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH @SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH@ -#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC@ -#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL@ -#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@ -#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@ - -#cmakedefine SDL_VIDEO_DRIVER_MIR @SDL_VIDEO_DRIVER_MIR@ -#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC @SDL_VIDEO_DRIVER_MIR_DYNAMIC@ -#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON@ -#cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@ -#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@ -#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@ -#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT @SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT@ -#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR@ -#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA@ -#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2@ -#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR@ -#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS @SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS@ -#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE @SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE@ -#cmakedefine SDL_VIDEO_DRIVER_X11_XCURSOR @SDL_VIDEO_DRIVER_X11_XCURSOR@ -#cmakedefine SDL_VIDEO_DRIVER_X11_XDBE @SDL_VIDEO_DRIVER_X11_XDBE@ -#cmakedefine SDL_VIDEO_DRIVER_X11_XINERAMA @SDL_VIDEO_DRIVER_X11_XINERAMA@ -#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2 @SDL_VIDEO_DRIVER_X11_XINPUT2@ -#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH @SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH@ -#cmakedefine SDL_VIDEO_DRIVER_X11_XRANDR @SDL_VIDEO_DRIVER_X11_XRANDR@ -#cmakedefine SDL_VIDEO_DRIVER_X11_XSCRNSAVER @SDL_VIDEO_DRIVER_X11_XSCRNSAVER@ -#cmakedefine SDL_VIDEO_DRIVER_X11_XSHAPE @SDL_VIDEO_DRIVER_X11_XSHAPE@ -#cmakedefine SDL_VIDEO_DRIVER_X11_XVIDMODE @SDL_VIDEO_DRIVER_X11_XVIDMODE@ -#cmakedefine SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS @SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS@ -#cmakedefine SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY @SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY@ -#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@ - -#cmakedefine SDL_VIDEO_RENDER_D3D @SDL_VIDEO_RENDER_D3D@ -#cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@ -#cmakedefine SDL_VIDEO_RENDER_OGL @SDL_VIDEO_RENDER_OGL@ -#cmakedefine SDL_VIDEO_RENDER_OGL_ES @SDL_VIDEO_RENDER_OGL_ES@ -#cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@ -#cmakedefine SDL_VIDEO_RENDER_DIRECTFB @SDL_VIDEO_RENDER_DIRECTFB@ - -/* Enable OpenGL support */ -#cmakedefine SDL_VIDEO_OPENGL @SDL_VIDEO_OPENGL@ -#cmakedefine SDL_VIDEO_OPENGL_ES @SDL_VIDEO_OPENGL_ES@ -#cmakedefine SDL_VIDEO_OPENGL_ES2 @SDL_VIDEO_OPENGL_ES2@ -#cmakedefine SDL_VIDEO_OPENGL_BGL @SDL_VIDEO_OPENGL_BGL@ -#cmakedefine SDL_VIDEO_OPENGL_CGL @SDL_VIDEO_OPENGL_CGL@ -#cmakedefine SDL_VIDEO_OPENGL_GLX @SDL_VIDEO_OPENGL_GLX@ -#cmakedefine SDL_VIDEO_OPENGL_WGL @SDL_VIDEO_OPENGL_WGL@ -#cmakedefine SDL_VIDEO_OPENGL_EGL @SDL_VIDEO_OPENGL_EGL@ -#cmakedefine SDL_VIDEO_OPENGL_OSMESA @SDL_VIDEO_OPENGL_OSMESA@ -#cmakedefine SDL_VIDEO_OPENGL_OSMESA_DYNAMIC @SDL_VIDEO_OPENGL_OSMESA_DYNAMIC@ - -/* Enable Vulkan support */ -#cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@ - -/* Enable system power support */ -#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@ -#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@ -#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@ -#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@ -#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@ -#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@ -#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@ - -/* Enable system filesystem support */ -#cmakedefine SDL_FILESYSTEM_ANDROID @SDL_FILESYSTEM_ANDROID@ -#cmakedefine SDL_FILESYSTEM_HAIKU @SDL_FILESYSTEM_HAIKU@ -#cmakedefine SDL_FILESYSTEM_COCOA @SDL_FILESYSTEM_COCOA@ -#cmakedefine SDL_FILESYSTEM_DUMMY @SDL_FILESYSTEM_DUMMY@ -#cmakedefine SDL_FILESYSTEM_UNIX @SDL_FILESYSTEM_UNIX@ -#cmakedefine SDL_FILESYSTEM_WINDOWS @SDL_FILESYSTEM_WINDOWS@ -#cmakedefine SDL_FILESYSTEM_EMSCRIPTEN @SDL_FILESYSTEM_EMSCRIPTEN@ - -/* Enable assembly routines */ -#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@ -#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@ - -/* Enable dynamic libsamplerate support */ -#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@ - -/* Platform specific definitions */ -#if !defined(__WIN32__) -# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H) -typedef unsigned int size_t; -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed short int16_t; -typedef unsigned short uint16_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef signed long long int64_t; -typedef unsigned long long uint64_t; -typedef unsigned long uintptr_t; -# endif /* if (stdint.h isn't available) */ -#else /* __WIN32__ */ -# if !defined(_STDINT_H_) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H) -# if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) -#define HAVE_STDINT_H 1 -# elif defined(_MSC_VER) -typedef signed __int8 int8_t; -typedef unsigned __int8 uint8_t; -typedef signed __int16 int16_t; -typedef unsigned __int16 uint16_t; -typedef signed __int32 int32_t; -typedef unsigned __int32 uint32_t; -typedef signed __int64 int64_t; -typedef unsigned __int64 uint64_t; -# ifndef _UINTPTR_T_DEFINED -# ifdef _WIN64 -typedef unsigned __int64 uintptr_t; -# else -typedef unsigned int uintptr_t; -# endif -#define _UINTPTR_T_DEFINED -# endif -/* Older Visual C++ headers don't have the Win64-compatible typedefs... */ -# if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR))) -#define DWORD_PTR DWORD -# endif -# if ((_MSC_VER <= 1200) && (!defined(LONG_PTR))) -#define LONG_PTR LONG -# endif -# else /* !__GNUC__ && !_MSC_VER */ -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed short int16_t; -typedef unsigned short uint16_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef signed long long int64_t; -typedef unsigned long long uint64_t; -# ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef unsigned int size_t; -# endif -typedef unsigned int uintptr_t; -# endif /* __GNUC__ || _MSC_VER */ -# endif /* !_STDINT_H_ && !HAVE_STDINT_H */ -#endif /* __WIN32__ */ - -#endif /* SDL_config_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config.h.in b/Dependencies/SDL/Windows/include/SDL_config.h.in deleted file mode 100644 index 8b3d208..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config.h.in +++ /dev/null @@ -1,389 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_h_ -#define SDL_config_h_ - -/** - * \file SDL_config.h.in - * - * This is a set of defines to configure the SDL features - */ - -/* General platform specific identifiers */ -#include "SDL_platform.h" - -/* Make sure that this isn't included by Visual C++ */ -#ifdef _MSC_VER -#error You should run hg revert SDL_config.h -#endif - -/* C language features */ -#undef const -#undef inline -#undef volatile - -/* C datatypes */ -#ifdef __LP64__ -#define SIZEOF_VOIDP 8 -#else -#define SIZEOF_VOIDP 4 -#endif -#undef HAVE_GCC_ATOMICS -#undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET - -#undef HAVE_DDRAW_H -#undef HAVE_DINPUT_H -#undef HAVE_DSOUND_H -#undef HAVE_DXGI_H -#undef HAVE_XINPUT_H -#undef HAVE_XINPUT_GAMEPAD_EX -#undef HAVE_XINPUT_STATE_EX - -/* Comment this if you want to build without any C library requirements */ -#undef HAVE_LIBC -#if HAVE_LIBC - -/* Useful headers */ -#undef HAVE_ALLOCA_H -#undef HAVE_SYS_TYPES_H -#undef HAVE_STDIO_H -#undef STDC_HEADERS -#undef HAVE_STDLIB_H -#undef HAVE_STDARG_H -#undef HAVE_MALLOC_H -#undef HAVE_MEMORY_H -#undef HAVE_STRING_H -#undef HAVE_STRINGS_H -#undef HAVE_WCHAR_H -#undef HAVE_INTTYPES_H -#undef HAVE_STDINT_H -#undef HAVE_CTYPE_H -#undef HAVE_MATH_H -#undef HAVE_ICONV_H -#undef HAVE_SIGNAL_H -#undef HAVE_ALTIVEC_H -#undef HAVE_PTHREAD_NP_H -#undef HAVE_LIBUDEV_H -#undef HAVE_DBUS_DBUS_H -#undef HAVE_IBUS_IBUS_H -#undef HAVE_FCITX_FRONTEND_H -#undef HAVE_LIBSAMPLERATE_H - -/* C library functions */ -#undef HAVE_MALLOC -#undef HAVE_CALLOC -#undef HAVE_REALLOC -#undef HAVE_FREE -#undef HAVE_ALLOCA -#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */ -#undef HAVE_GETENV -#undef HAVE_SETENV -#undef HAVE_PUTENV -#undef HAVE_UNSETENV -#endif -#undef HAVE_QSORT -#undef HAVE_ABS -#undef HAVE_BCOPY -#undef HAVE_MEMSET -#undef HAVE_MEMCPY -#undef HAVE_MEMMOVE -#undef HAVE_MEMCMP -#undef HAVE_WCSLEN -#undef HAVE_WCSLCPY -#undef HAVE_WCSLCAT -#undef HAVE_WCSCMP -#undef HAVE_STRLEN -#undef HAVE_STRLCPY -#undef HAVE_STRLCAT -#undef HAVE_STRDUP -#undef HAVE__STRREV -#undef HAVE__STRUPR -#undef HAVE__STRLWR -#undef HAVE_INDEX -#undef HAVE_RINDEX -#undef HAVE_STRCHR -#undef HAVE_STRRCHR -#undef HAVE_STRSTR -#undef HAVE_ITOA -#undef HAVE__LTOA -#undef HAVE__UITOA -#undef HAVE__ULTOA -#undef HAVE_STRTOL -#undef HAVE_STRTOUL -#undef HAVE__I64TOA -#undef HAVE__UI64TOA -#undef HAVE_STRTOLL -#undef HAVE_STRTOULL -#undef HAVE_STRTOD -#undef HAVE_ATOI -#undef HAVE_ATOF -#undef HAVE_STRCMP -#undef HAVE_STRNCMP -#undef HAVE__STRICMP -#undef HAVE_STRCASECMP -#undef HAVE__STRNICMP -#undef HAVE_STRNCASECMP -#undef HAVE_SSCANF -#undef HAVE_VSSCANF -#undef HAVE_SNPRINTF -#undef HAVE_VSNPRINTF -#undef HAVE_M_PI -#undef HAVE_ATAN -#undef HAVE_ATAN2 -#undef HAVE_ACOS -#undef HAVE_ASIN -#undef HAVE_CEIL -#undef HAVE_COPYSIGN -#undef HAVE_COS -#undef HAVE_COSF -#undef HAVE_FABS -#undef HAVE_FLOOR -#undef HAVE_LOG -#undef HAVE_POW -#undef HAVE_SCALBN -#undef HAVE_SIN -#undef HAVE_SINF -#undef HAVE_SQRT -#undef HAVE_SQRTF -#undef HAVE_TAN -#undef HAVE_TANF -#undef HAVE_FOPEN64 -#undef HAVE_FSEEKO -#undef HAVE_FSEEKO64 -#undef HAVE_SIGACTION -#undef HAVE_SA_SIGACTION -#undef HAVE_SETJMP -#undef HAVE_NANOSLEEP -#undef HAVE_SYSCONF -#undef HAVE_SYSCTLBYNAME -#undef HAVE_CLOCK_GETTIME -#undef HAVE_GETPAGESIZE -#undef HAVE_MPROTECT -#undef HAVE_ICONV -#undef HAVE_PTHREAD_SETNAME_NP -#undef HAVE_PTHREAD_SET_NAME_NP -#undef HAVE_SEM_TIMEDWAIT -#undef HAVE_GETAUXVAL -#undef HAVE_POLL - -#else -#define HAVE_STDARG_H 1 -#define HAVE_STDDEF_H 1 -#define HAVE_STDINT_H 1 -#endif /* HAVE_LIBC */ - -/* SDL internal assertion support */ -#undef SDL_DEFAULT_ASSERT_LEVEL - -/* Allow disabling of core subsystems */ -#undef SDL_ATOMIC_DISABLED -#undef SDL_AUDIO_DISABLED -#undef SDL_CPUINFO_DISABLED -#undef SDL_EVENTS_DISABLED -#undef SDL_FILE_DISABLED -#undef SDL_JOYSTICK_DISABLED -#undef SDL_HAPTIC_DISABLED -#undef SDL_LOADSO_DISABLED -#undef SDL_RENDER_DISABLED -#undef SDL_THREADS_DISABLED -#undef SDL_TIMERS_DISABLED -#undef SDL_VIDEO_DISABLED -#undef SDL_POWER_DISABLED -#undef SDL_FILESYSTEM_DISABLED - -/* Enable various audio drivers */ -#undef SDL_AUDIO_DRIVER_ALSA -#undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC -#undef SDL_AUDIO_DRIVER_ANDROID -#undef SDL_AUDIO_DRIVER_ARTS -#undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC -#undef SDL_AUDIO_DRIVER_COREAUDIO -#undef SDL_AUDIO_DRIVER_DISK -#undef SDL_AUDIO_DRIVER_DSOUND -#undef SDL_AUDIO_DRIVER_DUMMY -#undef SDL_AUDIO_DRIVER_EMSCRIPTEN -#undef SDL_AUDIO_DRIVER_ESD -#undef SDL_AUDIO_DRIVER_ESD_DYNAMIC -#undef SDL_AUDIO_DRIVER_FUSIONSOUND -#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC -#undef SDL_AUDIO_DRIVER_HAIKU -#undef SDL_AUDIO_DRIVER_JACK -#undef SDL_AUDIO_DRIVER_JACK_DYNAMIC -#undef SDL_AUDIO_DRIVER_NACL -#undef SDL_AUDIO_DRIVER_NAS -#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC -#undef SDL_AUDIO_DRIVER_NETBSD -#undef SDL_AUDIO_DRIVER_OSS -#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H -#undef SDL_AUDIO_DRIVER_PAUDIO -#undef SDL_AUDIO_DRIVER_PULSEAUDIO -#undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC -#undef SDL_AUDIO_DRIVER_QSA -#undef SDL_AUDIO_DRIVER_SNDIO -#undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC -#undef SDL_AUDIO_DRIVER_SUNAUDIO -#undef SDL_AUDIO_DRIVER_WASAPI -#undef SDL_AUDIO_DRIVER_WINMM -#undef SDL_AUDIO_DRIVER_XAUDIO2 - -/* Enable various input drivers */ -#undef SDL_INPUT_LINUXEV -#undef SDL_INPUT_LINUXKD -#undef SDL_INPUT_TSLIB -#undef SDL_JOYSTICK_HAIKU -#undef SDL_JOYSTICK_DINPUT -#undef SDL_JOYSTICK_XINPUT -#undef SDL_JOYSTICK_DUMMY -#undef SDL_JOYSTICK_IOKIT -#undef SDL_JOYSTICK_LINUX -#undef SDL_JOYSTICK_ANDROID -#undef SDL_JOYSTICK_WINMM -#undef SDL_JOYSTICK_USBHID -#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H -#undef SDL_JOYSTICK_EMSCRIPTEN -#undef SDL_HAPTIC_DUMMY -#undef SDL_HAPTIC_LINUX -#undef SDL_HAPTIC_IOKIT -#undef SDL_HAPTIC_DINPUT -#undef SDL_HAPTIC_XINPUT - -/* Enable various shared object loading systems */ -#undef SDL_LOADSO_DLOPEN -#undef SDL_LOADSO_DUMMY -#undef SDL_LOADSO_LDG -#undef SDL_LOADSO_WINDOWS - -/* Enable various threading systems */ -#undef SDL_THREAD_PTHREAD -#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX -#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP -#undef SDL_THREAD_WINDOWS - -/* Enable various timer systems */ -#undef SDL_TIMER_HAIKU -#undef SDL_TIMER_DUMMY -#undef SDL_TIMER_UNIX -#undef SDL_TIMER_WINDOWS - -/* Enable various video drivers */ -#undef SDL_VIDEO_DRIVER_HAIKU -#undef SDL_VIDEO_DRIVER_COCOA -#undef SDL_VIDEO_DRIVER_DIRECTFB -#undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC -#undef SDL_VIDEO_DRIVER_DUMMY -#undef SDL_VIDEO_DRIVER_WINDOWS -#undef SDL_VIDEO_DRIVER_WAYLAND -#undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH -#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC -#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL -#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR -#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON -#undef SDL_VIDEO_DRIVER_MIR -#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC -#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON -#undef SDL_VIDEO_DRIVER_X11 -#undef SDL_VIDEO_DRIVER_RPI -#undef SDL_VIDEO_DRIVER_KMSDRM -#undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC -#undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM -#undef SDL_VIDEO_DRIVER_ANDROID -#undef SDL_VIDEO_DRIVER_EMSCRIPTEN -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE -#undef SDL_VIDEO_DRIVER_X11_XCURSOR -#undef SDL_VIDEO_DRIVER_X11_XDBE -#undef SDL_VIDEO_DRIVER_X11_XINERAMA -#undef SDL_VIDEO_DRIVER_X11_XINPUT2 -#undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH -#undef SDL_VIDEO_DRIVER_X11_XRANDR -#undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER -#undef SDL_VIDEO_DRIVER_X11_XSHAPE -#undef SDL_VIDEO_DRIVER_X11_XVIDMODE -#undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS -#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY -#undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM -#undef SDL_VIDEO_DRIVER_NACL -#undef SDL_VIDEO_DRIVER_VIVANTE -#undef SDL_VIDEO_DRIVER_VIVANTE_VDK -#undef SDL_VIDEO_DRIVER_QNX - -#undef SDL_VIDEO_RENDER_D3D -#undef SDL_VIDEO_RENDER_D3D11 -#undef SDL_VIDEO_RENDER_OGL -#undef SDL_VIDEO_RENDER_OGL_ES -#undef SDL_VIDEO_RENDER_OGL_ES2 -#undef SDL_VIDEO_RENDER_DIRECTFB - -/* Enable OpenGL support */ -#undef SDL_VIDEO_OPENGL -#undef SDL_VIDEO_OPENGL_ES -#undef SDL_VIDEO_OPENGL_ES2 -#undef SDL_VIDEO_OPENGL_BGL -#undef SDL_VIDEO_OPENGL_CGL -#undef SDL_VIDEO_OPENGL_EGL -#undef SDL_VIDEO_OPENGL_GLX -#undef SDL_VIDEO_OPENGL_WGL -#undef SDL_VIDEO_OPENGL_OSMESA -#undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC - -/* Enable Vulkan support */ -#undef SDL_VIDEO_VULKAN - -/* Enable system power support */ -#undef SDL_POWER_LINUX -#undef SDL_POWER_WINDOWS -#undef SDL_POWER_MACOSX -#undef SDL_POWER_HAIKU -#undef SDL_POWER_ANDROID -#undef SDL_POWER_EMSCRIPTEN -#undef SDL_POWER_HARDWIRED - -/* Enable system filesystem support */ -#undef SDL_FILESYSTEM_HAIKU -#undef SDL_FILESYSTEM_COCOA -#undef SDL_FILESYSTEM_DUMMY -#undef SDL_FILESYSTEM_UNIX -#undef SDL_FILESYSTEM_WINDOWS -#undef SDL_FILESYSTEM_NACL -#undef SDL_FILESYSTEM_ANDROID -#undef SDL_FILESYSTEM_EMSCRIPTEN - -/* Enable assembly routines */ -#undef SDL_ASSEMBLY_ROUTINES -#undef SDL_ALTIVEC_BLITTERS - -/* Enable ime support */ -#undef SDL_USE_IME - -/* Enable dynamic udev support */ -#undef SDL_UDEV_DYNAMIC - -/* Enable dynamic libsamplerate support */ -#undef SDL_LIBSAMPLERATE_DYNAMIC - -#endif /* SDL_config_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config_android.h b/Dependencies/SDL/Windows/include/SDL_config_android.h deleted file mode 100644 index 361bad8..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config_android.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_android_h_ -#define SDL_config_android_h_ -#define SDL_config_h_ - -#include "SDL_platform.h" - -/** - * \file SDL_config_android.h - * - * This is a configuration that can be used to build SDL for Android - */ - -#include - -#define HAVE_GCC_ATOMICS 1 - -#define HAVE_ALLOCA_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_STDIO_H 1 -#define STDC_HEADERS 1 -#define HAVE_STRING_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_SIGNAL_H 1 - -/* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_SETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_SETENV 1 -#define HAVE_UNSETENV 1 -#define HAVE_QSORT 1 -#define HAVE_ABS 1 -#define HAVE_BCOPY 1 -#define HAVE_MEMSET 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMCMP 1 -#define HAVE_STRLEN 1 -#define HAVE_STRLCPY 1 -#define HAVE_STRLCAT 1 -#define HAVE_STRDUP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1 -#define HAVE_VSSCANF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_M_PI 1 -#define HAVE_ATAN 1 -#define HAVE_ATAN2 1 -#define HAVE_ACOS 1 -#define HAVE_ASIN 1 -#define HAVE_CEIL 1 -#define HAVE_COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_POW 1 -#define HAVE_SCALBN 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SQRTF 1 -#define HAVE_TAN 1 -#define HAVE_TANF 1 -#define HAVE_SIGACTION 1 -#define HAVE_SETJMP 1 -#define HAVE_NANOSLEEP 1 -#define HAVE_SYSCONF 1 -#define HAVE_CLOCK_GETTIME 1 - -#define SIZEOF_VOIDP 4 - -/* Enable various audio drivers */ -#define SDL_AUDIO_DRIVER_ANDROID 1 -#define SDL_AUDIO_DRIVER_DUMMY 1 - -/* Enable various input drivers */ -#define SDL_JOYSTICK_ANDROID 1 -#define SDL_HAPTIC_ANDROID 1 - -/* Enable various shared object loading systems */ -#define SDL_LOADSO_DLOPEN 1 - -/* Enable various threading systems */ -#define SDL_THREAD_PTHREAD 1 -#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 - -/* Enable various timer systems */ -#define SDL_TIMER_UNIX 1 - -/* Enable various video drivers */ -#define SDL_VIDEO_DRIVER_ANDROID 1 - -/* Enable OpenGL ES */ -#define SDL_VIDEO_OPENGL_ES 1 -#define SDL_VIDEO_OPENGL_ES2 1 -#define SDL_VIDEO_OPENGL_EGL 1 -#define SDL_VIDEO_RENDER_OGL_ES 1 -#define SDL_VIDEO_RENDER_OGL_ES2 1 - -/* Enable Vulkan support */ -/* Android does not support Vulkan in native code using the "armeabi" ABI. */ -#if defined(__ARM_ARCH) && __ARM_ARCH < 7 -#define SDL_VIDEO_VULKAN 0 -#else -#define SDL_VIDEO_VULKAN 1 -#endif - -/* Enable system power support */ -#define SDL_POWER_ANDROID 1 - -/* Enable the filesystem driver */ -#define SDL_FILESYSTEM_ANDROID 1 - -#endif /* SDL_config_android_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config_iphoneos.h b/Dependencies/SDL/Windows/include/SDL_config_iphoneos.h deleted file mode 100644 index deea030..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config_iphoneos.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_iphoneos_h_ -#define SDL_config_iphoneos_h_ -#define SDL_config_h_ - -#include "SDL_platform.h" - -#ifdef __LP64__ -#define SIZEOF_VOIDP 8 -#else -#define SIZEOF_VOIDP 4 -#endif - -#define HAVE_GCC_ATOMICS 1 - -#define HAVE_ALLOCA_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_STDIO_H 1 -#define STDC_HEADERS 1 -#define HAVE_STRING_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_SIGNAL_H 1 - -/* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_SETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_SETENV 1 -#define HAVE_UNSETENV 1 -#define HAVE_QSORT 1 -#define HAVE_ABS 1 -#define HAVE_BCOPY 1 -#define HAVE_MEMSET 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMCMP 1 -#define HAVE_STRLEN 1 -#define HAVE_STRLCPY 1 -#define HAVE_STRLCAT 1 -#define HAVE_STRDUP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1 -#define HAVE_VSSCANF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_M_PI 1 -#define HAVE_ATAN 1 -#define HAVE_ATAN2 1 -#define HAVE_ACOS 1 -#define HAVE_ASIN 1 -#define HAVE_CEIL 1 -#define HAVE_COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_POW 1 -#define HAVE_SCALBN 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SQRTF 1 -#define HAVE_TAN 1 -#define HAVE_TANF 1 -#define HAVE_SIGACTION 1 -#define HAVE_SETJMP 1 -#define HAVE_NANOSLEEP 1 -#define HAVE_SYSCONF 1 -#define HAVE_SYSCTLBYNAME 1 - -/* enable iPhone version of Core Audio driver */ -#define SDL_AUDIO_DRIVER_COREAUDIO 1 -/* Enable the dummy audio driver (src/audio/dummy/\*.c) */ -#define SDL_AUDIO_DRIVER_DUMMY 1 - -/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ -#define SDL_HAPTIC_DUMMY 1 - -/* Enable MFi joystick support */ -#define SDL_JOYSTICK_MFI 1 - -/* Enable Unix style SO loading */ -#define SDL_LOADSO_DLOPEN 1 - -/* Enable various threading systems */ -#define SDL_THREAD_PTHREAD 1 -#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 - -/* Enable various timer systems */ -#define SDL_TIMER_UNIX 1 - -/* Supported video drivers */ -#define SDL_VIDEO_DRIVER_UIKIT 1 -#define SDL_VIDEO_DRIVER_DUMMY 1 - -/* enable OpenGL ES */ -#define SDL_VIDEO_OPENGL_ES2 1 -#define SDL_VIDEO_OPENGL_ES 1 -#define SDL_VIDEO_RENDER_OGL_ES 1 -#define SDL_VIDEO_RENDER_OGL_ES2 1 - -/* Enable Vulkan support */ -#if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM // Only 64-bit devices have Metal -#define SDL_VIDEO_VULKAN 1 -#else -#define SDL_VIDEO_VULKAN 0 -#endif - -/* Enable system power support */ -#define SDL_POWER_UIKIT 1 - -/* enable iPhone keyboard support */ -#define SDL_IPHONE_KEYBOARD 1 - -/* enable iOS extended launch screen */ -#define SDL_IPHONE_LAUNCHSCREEN 1 - -/* Set max recognized G-force from accelerometer - See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed - */ -#define SDL_IPHONE_MAX_GFORCE 5.0 - -/* enable filesystem support */ -#define SDL_FILESYSTEM_COCOA 1 - -#endif /* SDL_config_iphoneos_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config_macosx.h b/Dependencies/SDL/Windows/include/SDL_config_macosx.h deleted file mode 100644 index 9b09899..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config_macosx.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_macosx_h_ -#define SDL_config_macosx_h_ -#define SDL_config_h_ - -#include "SDL_platform.h" - -/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */ -#include - -/* This is a set of defines to configure the SDL features */ - -#ifdef __LP64__ - #define SIZEOF_VOIDP 8 -#else - #define SIZEOF_VOIDP 4 -#endif - -/* Useful headers */ -#define HAVE_ALLOCA_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_STDIO_H 1 -#define STDC_HEADERS 1 -#define HAVE_STRING_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_SIGNAL_H 1 - -/* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_SETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_UNSETENV 1 -#define HAVE_QSORT 1 -#define HAVE_ABS 1 -#define HAVE_BCOPY 1 -#define HAVE_MEMSET 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMCMP 1 -#define HAVE_STRLEN 1 -#define HAVE_STRLCPY 1 -#define HAVE_STRLCAT 1 -#define HAVE_STRDUP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1 -#define HAVE_VSSCANF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_CEIL 1 -#define HAVE_COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_POW 1 -#define HAVE_SCALBN 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SQRTF 1 -#define HAVE_TAN 1 -#define HAVE_TANF 1 -#define HAVE_SIGACTION 1 -#define HAVE_SETJMP 1 -#define HAVE_NANOSLEEP 1 -#define HAVE_SYSCONF 1 -#define HAVE_SYSCTLBYNAME 1 -#define HAVE_ATAN 1 -#define HAVE_ATAN2 1 -#define HAVE_ACOS 1 -#define HAVE_ASIN 1 - -/* Enable various audio drivers */ -#define SDL_AUDIO_DRIVER_COREAUDIO 1 -#define SDL_AUDIO_DRIVER_DISK 1 -#define SDL_AUDIO_DRIVER_DUMMY 1 - -/* Enable various input drivers */ -#define SDL_JOYSTICK_IOKIT 1 -#define SDL_HAPTIC_IOKIT 1 - -/* Enable various shared object loading systems */ -#define SDL_LOADSO_DLOPEN 1 - -/* Enable various threading systems */ -#define SDL_THREAD_PTHREAD 1 -#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 - -/* Enable various timer systems */ -#define SDL_TIMER_UNIX 1 - -/* Enable various video drivers */ -#define SDL_VIDEO_DRIVER_COCOA 1 -#define SDL_VIDEO_DRIVER_DUMMY 1 -#undef SDL_VIDEO_DRIVER_X11 -#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib" -#define SDL_VIDEO_DRIVER_X11_XDBE 1 -#define SDL_VIDEO_DRIVER_X11_XINERAMA 1 -#define SDL_VIDEO_DRIVER_X11_XRANDR 1 -#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1 -#define SDL_VIDEO_DRIVER_X11_XSHAPE 1 -#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1 -#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1 - -#ifdef MAC_OS_X_VERSION_10_8 -/* - * No matter the versions targeted, this is the 10.8 or later SDK, so you have - * to use the external Xquartz, which is a more modern Xlib. Previous SDKs - * used an older Xlib. - */ -#define SDL_VIDEO_DRIVER_X11_XINPUT2 1 -#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1 -#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1 -#endif - -#ifndef SDL_VIDEO_RENDER_OGL -#define SDL_VIDEO_RENDER_OGL 1 -#endif - -/* Enable OpenGL support */ -#ifndef SDL_VIDEO_OPENGL -#define SDL_VIDEO_OPENGL 1 -#endif -#ifndef SDL_VIDEO_OPENGL_CGL -#define SDL_VIDEO_OPENGL_CGL 1 -#endif -#ifndef SDL_VIDEO_OPENGL_GLX -#define SDL_VIDEO_OPENGL_GLX 1 -#endif - -/* Enable Vulkan support */ -/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */ -#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100) -#define SDL_VIDEO_VULKAN 1 -#else -#define SDL_VIDEO_VULKAN 0 -#endif - -/* Enable system power support */ -#define SDL_POWER_MACOSX 1 - -/* enable filesystem support */ -#define SDL_FILESYSTEM_COCOA 1 - -/* Enable assembly routines */ -#define SDL_ASSEMBLY_ROUTINES 1 -#ifdef __ppc__ -#define SDL_ALTIVEC_BLITTERS 1 -#endif - -#endif /* SDL_config_macosx_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config_macosx.h.orig b/Dependencies/SDL/Windows/include/SDL_config_macosx.h.orig deleted file mode 100644 index f03f1ae..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config_macosx.h.orig +++ /dev/null @@ -1,197 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_macosx_h_ -#define SDL_config_macosx_h_ -#define SDL_config_h_ - -#include "SDL_platform.h" - -/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */ -#include - -/* This is a set of defines to configure the SDL features */ - -#ifdef __LP64__ - #define SIZEOF_VOIDP 8 -#else - #define SIZEOF_VOIDP 4 -#endif - -/* Useful headers */ -#define HAVE_ALLOCA_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_STDIO_H 1 -#define STDC_HEADERS 1 -#define HAVE_STRING_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_SIGNAL_H 1 - -/* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_SETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_UNSETENV 1 -#define HAVE_QSORT 1 -#define HAVE_ABS 1 -#define HAVE_BCOPY 1 -#define HAVE_MEMSET 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMCMP 1 -#define HAVE_STRLEN 1 -#define HAVE_STRLCPY 1 -#define HAVE_STRLCAT 1 -#define HAVE_STRDUP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1 -#define HAVE_VSSCANF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_CEIL 1 -#define HAVE_COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_POW 1 -#define HAVE_SCALBN 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SQRTF 1 -#define HAVE_TAN 1 -#define HAVE_TANF 1 -#define HAVE_SIGACTION 1 -#define HAVE_SETJMP 1 -#define HAVE_NANOSLEEP 1 -#define HAVE_SYSCONF 1 -#define HAVE_SYSCTLBYNAME 1 -#define HAVE_ATAN 1 -#define HAVE_ATAN2 1 -#define HAVE_ACOS 1 -#define HAVE_ASIN 1 - -/* Enable various audio drivers */ -#define SDL_AUDIO_DRIVER_COREAUDIO 1 -#define SDL_AUDIO_DRIVER_DISK 1 -#define SDL_AUDIO_DRIVER_DUMMY 1 - -/* Enable various input drivers */ -#define SDL_JOYSTICK_IOKIT 1 -#define SDL_HAPTIC_IOKIT 1 - -/* Enable various shared object loading systems */ -#define SDL_LOADSO_DLOPEN 1 - -/* Enable various threading systems */ -#define SDL_THREAD_PTHREAD 1 -#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 - -/* Enable various timer systems */ -#define SDL_TIMER_UNIX 1 - -/* Enable various video drivers */ -#define SDL_VIDEO_DRIVER_COCOA 1 -#define SDL_VIDEO_DRIVER_DUMMY 1 -#undef SDL_VIDEO_DRIVER_X11 -#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib" -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib" -#define SDL_VIDEO_DRIVER_X11_XDBE 1 -#define SDL_VIDEO_DRIVER_X11_XINERAMA 1 -#define SDL_VIDEO_DRIVER_X11_XRANDR 1 -#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1 -#define SDL_VIDEO_DRIVER_X11_XSHAPE 1 -#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1 -#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1 - -#ifdef MAC_OS_X_VERSION_10_8 -/* - * No matter the versions targeted, this is the 10.8 or later SDK, so you have - * to use the external Xquartz, which is a more modern Xlib. Previous SDKs - * used an older Xlib. - */ -#define SDL_VIDEO_DRIVER_X11_XINPUT2 1 -#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1 -#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1 -#endif - -#ifndef SDL_VIDEO_RENDER_OGL -#define SDL_VIDEO_RENDER_OGL 1 -#endif - -/* Enable OpenGL support */ -#ifndef SDL_VIDEO_OPENGL -#define SDL_VIDEO_OPENGL 1 -#endif -#ifndef SDL_VIDEO_OPENGL_CGL -#define SDL_VIDEO_OPENGL_CGL 1 -#endif -#ifndef SDL_VIDEO_OPENGL_GLX -#define SDL_VIDEO_OPENGL_GLX 1 -#endif - -/* Enable Vulkan support */ -/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures and 10.11+ */ -#if TARGET_CPU_X86_64 -#define SDL_VIDEO_VULKAN 1 -#else -#define SDL_VIDEO_VULKAN 0 -#endif - -/* Enable system power support */ -#define SDL_POWER_MACOSX 1 - -/* enable filesystem support */ -#define SDL_FILESYSTEM_COCOA 1 - -/* Enable assembly routines */ -#define SDL_ASSEMBLY_ROUTINES 1 -#ifdef __ppc__ -#define SDL_ALTIVEC_BLITTERS 1 -#endif - -#endif /* SDL_config_macosx_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config_minimal.h b/Dependencies/SDL/Windows/include/SDL_config_minimal.h deleted file mode 100644 index 3112700..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config_minimal.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_minimal_h_ -#define SDL_config_minimal_h_ -#define SDL_config_h_ - -#include "SDL_platform.h" - -/** - * \file SDL_config_minimal.h - * - * This is the minimal configuration that can be used to build SDL. - */ - -#define HAVE_STDARG_H 1 -#define HAVE_STDDEF_H 1 - -/* Most everything except Visual Studio 2008 and earlier has stdint.h now */ -#if defined(_MSC_VER) && (_MSC_VER < 1600) -/* Here are some reasonable defaults */ -typedef unsigned int size_t; -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed short int16_t; -typedef unsigned short uint16_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef signed long long int64_t; -typedef unsigned long long uint64_t; -typedef unsigned long uintptr_t; -#else -#define HAVE_STDINT_H 1 -#endif /* Visual Studio 2008 */ - -#ifdef __GNUC__ -#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1 -#endif - -/* Enable the dummy audio driver (src/audio/dummy/\*.c) */ -#define SDL_AUDIO_DRIVER_DUMMY 1 - -/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */ -#define SDL_JOYSTICK_DISABLED 1 - -/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ -#define SDL_HAPTIC_DISABLED 1 - -/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ -#define SDL_LOADSO_DISABLED 1 - -/* Enable the stub thread support (src/thread/generic/\*.c) */ -#define SDL_THREADS_DISABLED 1 - -/* Enable the stub timer support (src/timer/dummy/\*.c) */ -#define SDL_TIMERS_DISABLED 1 - -/* Enable the dummy video driver (src/video/dummy/\*.c) */ -#define SDL_VIDEO_DRIVER_DUMMY 1 - -/* Enable the dummy filesystem driver (src/filesystem/dummy/\*.c) */ -#define SDL_FILESYSTEM_DUMMY 1 - -#endif /* SDL_config_minimal_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config_pandora.h b/Dependencies/SDL/Windows/include/SDL_config_pandora.h deleted file mode 100644 index ea62fe5..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config_pandora.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_pandora_h_ -#define SDL_config_pandora_h_ -#define SDL_config_h_ - -/* This is a set of defines to configure the SDL features */ - -/* General platform specific identifiers */ -#include "SDL_platform.h" - -#ifdef __LP64__ -#define SIZEOF_VOIDP 8 -#else -#define SIZEOF_VOIDP 4 -#endif - -#define SDL_BYTEORDER 1234 - -#define HAVE_ALLOCA_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_STDIO_H 1 -#define STDC_HEADERS 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STDARG_H 1 -#define HAVE_MALLOC_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_ICONV_H 1 -#define HAVE_SIGNAL_H 1 -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_SETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_UNSETENV 1 -#define HAVE_QSORT 1 -#define HAVE_ABS 1 -#define HAVE_BCOPY 1 -#define HAVE_MEMSET 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_STRLEN 1 -#define HAVE_STRDUP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1 -#define HAVE_VSSCANF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_M_PI 1 -#define HAVE_CEIL 1 -#define HAVE_COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_SCALBN 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SQRTF 1 -#define HAVE_TAN 1 -#define HAVE_TANF 1 -#define HAVE_SIGACTION 1 -#define HAVE_SETJMP 1 -#define HAVE_NANOSLEEP 1 - -#define SDL_AUDIO_DRIVER_DUMMY 1 -#define SDL_AUDIO_DRIVER_OSS 1 - -#define SDL_INPUT_LINUXEV 1 -#define SDL_INPUT_TSLIB 1 -#define SDL_JOYSTICK_LINUX 1 -#define SDL_HAPTIC_LINUX 1 - -#define SDL_LOADSO_DLOPEN 1 - -#define SDL_THREAD_PTHREAD 1 -#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1 - -#define SDL_TIMER_UNIX 1 -#define SDL_FILESYSTEM_UNIX 1 - -#define SDL_VIDEO_DRIVER_DUMMY 1 -#define SDL_VIDEO_DRIVER_X11 1 -#define SDL_VIDEO_DRIVER_PANDORA 1 -#define SDL_VIDEO_RENDER_OGL_ES 1 -#define SDL_VIDEO_OPENGL_ES 1 - -#endif /* SDL_config_pandora_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config_psp.h b/Dependencies/SDL/Windows/include/SDL_config_psp.h deleted file mode 100644 index 28efb4c..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config_psp.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_psp_h_ -#define SDL_config_psp_h_ -#define SDL_config_h_ - -#include "SDL_platform.h" - - - -#ifdef __GNUC__ -#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1 -#endif - -#define HAVE_GCC_ATOMICS 1 - -#define HAVE_ALLOCA_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_STDIO_H 1 -#define STDC_HEADERS 1 -#define HAVE_STRING_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_SIGNAL_H 1 - -/* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_SETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_SETENV 1 -#define HAVE_UNSETENV 1 -#define HAVE_QSORT 1 -#define HAVE_ABS 1 -#define HAVE_BCOPY 1 -#define HAVE_MEMSET 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMCMP 1 -#define HAVE_STRLEN 1 -#define HAVE_STRLCPY 1 -#define HAVE_STRLCAT 1 -#define HAVE_STRDUP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1 -#define HAVE_VSSCANF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_M_PI 1 -#define HAVE_ATAN 1 -#define HAVE_ATAN2 1 -#define HAVE_ACOS 1 -#define HAVE_ASIN 1 -#define HAVE_CEIL 1 -#define HAVE_COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_POW 1 -#define HAVE_SCALBN 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SQRTF 1 -#define HAVE_TAN 1 -#define HAVE_TANF 1 -#define HAVE_SETJMP 1 -#define HAVE_NANOSLEEP 1 -/* #define HAVE_SYSCONF 1 */ -/* #define HAVE_SIGACTION 1 */ - - -/* PSP isn't that sophisticated */ -#define LACKS_SYS_MMAN_H 1 - -/* Enable the stub thread support (src/thread/psp/\*.c) */ -#define SDL_THREAD_PSP 1 - -/* Enable the stub timer support (src/timer/psp/\*.c) */ -#define SDL_TIMERS_PSP 1 - -/* Enable the stub joystick driver (src/joystick/psp/\*.c) */ -#define SDL_JOYSTICK_PSP 1 - -/* Enable the stub audio driver (src/audio/psp/\*.c) */ -#define SDL_AUDIO_DRIVER_PSP 1 - -/* PSP video dirver */ -#define SDL_VIDEO_DRIVER_PSP 1 - -/* PSP render dirver */ -#define SDL_VIDEO_RENDER_PSP 1 - -#define SDL_POWER_PSP 1 - -/* !!! FIXME: what does PSP do for filesystem stuff? */ -#define SDL_FILESYSTEM_DUMMY 1 - -/* PSP doesn't have haptic device (src/haptic/dummy/\*.c) */ -#define SDL_HAPTIC_DISABLED 1 - -/* PSP can't load shared object (src/loadso/dummy/\*.c) */ -#define SDL_LOADSO_DISABLED 1 - - -#endif /* SDL_config_psp_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config_windows.h b/Dependencies/SDL/Windows/include/SDL_config_windows.h deleted file mode 100644 index 2456c84..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config_windows.h +++ /dev/null @@ -1,225 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_windows_h_ -#define SDL_config_windows_h_ -#define SDL_config_h_ - -#include "SDL_platform.h" - -/* This is a set of defines to configure the SDL features */ - -#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H) -#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) -#define HAVE_STDINT_H 1 -#elif defined(_MSC_VER) -typedef signed __int8 int8_t; -typedef unsigned __int8 uint8_t; -typedef signed __int16 int16_t; -typedef unsigned __int16 uint16_t; -typedef signed __int32 int32_t; -typedef unsigned __int32 uint32_t; -typedef signed __int64 int64_t; -typedef unsigned __int64 uint64_t; -#ifndef _UINTPTR_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 uintptr_t; -#else -typedef unsigned int uintptr_t; -#endif -#define _UINTPTR_T_DEFINED -#endif -/* Older Visual C++ headers don't have the Win64-compatible typedefs... */ -#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR))) -#define DWORD_PTR DWORD -#endif -#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR))) -#define LONG_PTR LONG -#endif -#else /* !__GNUC__ && !_MSC_VER */ -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed short int16_t; -typedef unsigned short uint16_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef signed long long int64_t; -typedef unsigned long long uint64_t; -#ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef unsigned int size_t; -#endif -typedef unsigned int uintptr_t; -#endif /* __GNUC__ || _MSC_VER */ -#endif /* !_STDINT_H_ && !HAVE_STDINT_H */ - -#ifdef _WIN64 -# define SIZEOF_VOIDP 8 -#else -# define SIZEOF_VOIDP 4 -#endif - -#define HAVE_DDRAW_H 1 -#define HAVE_DINPUT_H 1 -#define HAVE_DSOUND_H 1 -#define HAVE_DXGI_H 1 -#define HAVE_XINPUT_H 1 - -/* This is disabled by default to avoid C runtime dependencies and manifest requirements */ -#ifdef HAVE_LIBC -/* Useful headers */ -#define HAVE_STDIO_H 1 -#define STDC_HEADERS 1 -#define HAVE_STRING_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_SIGNAL_H 1 - -/* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_QSORT 1 -#define HAVE_ABS 1 -#define HAVE_MEMSET 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMCMP 1 -#define HAVE_STRLEN 1 -#define HAVE__STRREV 1 -#define HAVE__STRUPR 1 -#define HAVE__STRLWR 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE__LTOA 1 -#define HAVE__ULTOA 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE__STRICMP 1 -#define HAVE__STRNICMP 1 -#define HAVE_ATAN 1 -#define HAVE_ATAN2 1 -#define HAVE_ACOS 1 -#define HAVE_ASIN 1 -#define HAVE_CEIL 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_POW 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SQRTF 1 -#define HAVE_TAN 1 -#define HAVE_TANF 1 -#if _MSC_VER >= 1800 -#define HAVE_STRTOLL 1 -#define HAVE_VSSCANF 1 -#define HAVE_COPYSIGN 1 -#define HAVE_SCALBN 1 -#endif -#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES) -#define HAVE_M_PI 1 -#endif -#else -#define HAVE_STDARG_H 1 -#define HAVE_STDDEF_H 1 -#endif - -/* Enable various audio drivers */ -#define SDL_AUDIO_DRIVER_WASAPI 1 -#define SDL_AUDIO_DRIVER_DSOUND 1 -#define SDL_AUDIO_DRIVER_XAUDIO2 0 -#define SDL_AUDIO_DRIVER_WINMM 1 -#define SDL_AUDIO_DRIVER_DISK 1 -#define SDL_AUDIO_DRIVER_DUMMY 1 - -/* Enable various input drivers */ -#define SDL_JOYSTICK_DINPUT 1 -#define SDL_JOYSTICK_XINPUT 1 -#define SDL_HAPTIC_DINPUT 1 -#define SDL_HAPTIC_XINPUT 1 - -/* Enable various shared object loading systems */ -#define SDL_LOADSO_WINDOWS 1 - -/* Enable various threading systems */ -#define SDL_THREAD_WINDOWS 1 - -/* Enable various timer systems */ -#define SDL_TIMER_WINDOWS 1 - -/* Enable various video drivers */ -#define SDL_VIDEO_DRIVER_DUMMY 1 -#define SDL_VIDEO_DRIVER_WINDOWS 1 - -#ifndef SDL_VIDEO_RENDER_D3D -#define SDL_VIDEO_RENDER_D3D 1 -#endif -#ifndef SDL_VIDEO_RENDER_D3D11 -#define SDL_VIDEO_RENDER_D3D11 0 -#endif - -/* Enable OpenGL support */ -#ifndef SDL_VIDEO_OPENGL -#define SDL_VIDEO_OPENGL 1 -#endif -#ifndef SDL_VIDEO_OPENGL_WGL -#define SDL_VIDEO_OPENGL_WGL 1 -#endif -#ifndef SDL_VIDEO_RENDER_OGL -#define SDL_VIDEO_RENDER_OGL 1 -#endif -#ifndef SDL_VIDEO_RENDER_OGL_ES2 -#define SDL_VIDEO_RENDER_OGL_ES2 1 -#endif -#ifndef SDL_VIDEO_OPENGL_ES2 -#define SDL_VIDEO_OPENGL_ES2 1 -#endif -#ifndef SDL_VIDEO_OPENGL_EGL -#define SDL_VIDEO_OPENGL_EGL 1 -#endif - -/* Enable Vulkan support */ -#define SDL_VIDEO_VULKAN 1 - -/* Enable system power support */ -#define SDL_POWER_WINDOWS 1 - -/* Enable filesystem support */ -#define SDL_FILESYSTEM_WINDOWS 1 - -/* Enable assembly routines (Win64 doesn't have inline asm) */ -#ifndef _WIN64 -#define SDL_ASSEMBLY_ROUTINES 1 -#endif - -#endif /* SDL_config_windows_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config_winrt.h b/Dependencies/SDL/Windows/include/SDL_config_winrt.h deleted file mode 100644 index 24f9e17..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config_winrt.h +++ /dev/null @@ -1,215 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_winrt_h_ -#define SDL_config_winrt_h_ -#define SDL_config_h_ - -#include "SDL_platform.h" - -/* Make sure the Windows SDK's NTDDI_VERSION macro gets defined. This is used - by SDL to determine which version of the Windows SDK is being used. -*/ -#include - -/* Define possibly-undefined NTDDI values (used when compiling SDL against - older versions of the Windows SDK. -*/ -#ifndef NTDDI_WINBLUE -#define NTDDI_WINBLUE 0x06030000 -#endif -#ifndef NTDDI_WIN10 -#define NTDDI_WIN10 0x0A000000 -#endif - -/* This is a set of defines to configure the SDL features */ - -#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H) -#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) -#define HAVE_STDINT_H 1 -#elif defined(_MSC_VER) -typedef signed __int8 int8_t; -typedef unsigned __int8 uint8_t; -typedef signed __int16 int16_t; -typedef unsigned __int16 uint16_t; -typedef signed __int32 int32_t; -typedef unsigned __int32 uint32_t; -typedef signed __int64 int64_t; -typedef unsigned __int64 uint64_t; -#ifndef _UINTPTR_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 uintptr_t; -#else -typedef unsigned int uintptr_t; -#endif -#define _UINTPTR_T_DEFINED -#endif -/* Older Visual C++ headers don't have the Win64-compatible typedefs... */ -#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR))) -#define DWORD_PTR DWORD -#endif -#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR))) -#define LONG_PTR LONG -#endif -#else /* !__GNUC__ && !_MSC_VER */ -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed short int16_t; -typedef unsigned short uint16_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef signed long long int64_t; -typedef unsigned long long uint64_t; -#ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef unsigned int size_t; -#endif -typedef unsigned int uintptr_t; -#endif /* __GNUC__ || _MSC_VER */ -#endif /* !_STDINT_H_ && !HAVE_STDINT_H */ - -#ifdef _WIN64 -# define SIZEOF_VOIDP 8 -#else -# define SIZEOF_VOIDP 4 -#endif - -/* Useful headers */ -#define HAVE_DXGI_H 1 -#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP -#define HAVE_XINPUT_H 1 -#endif -#define HAVE_LIBC 1 -#define HAVE_STDIO_H 1 -#define STDC_HEADERS 1 -#define HAVE_STRING_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_FLOAT_H 1 -#define HAVE_SIGNAL_H 1 - -/* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_QSORT 1 -#define HAVE_ABS 1 -#define HAVE_MEMSET 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMCMP 1 -#define HAVE_STRLEN 1 -#define HAVE__STRREV 1 -#define HAVE__STRUPR 1 -//#define HAVE__STRLWR 1 // TODO, WinRT: consider using _strlwr_s instead -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead -//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead -//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -//#define HAVE_STRTOLL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE__STRICMP 1 -#define HAVE__STRNICMP 1 -#define HAVE_VSNPRINTF 1 -//#define HAVE_SSCANF 1 // TODO, WinRT: consider using sscanf_s instead -#define HAVE_M_PI 1 -#define HAVE_ATAN 1 -#define HAVE_ATAN2 1 -#define HAVE_CEIL 1 -#define HAVE__COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_POW 1 -//#define HAVE_SCALBN 1 -#define HAVE__SCALB 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SQRTF 1 -#define HAVE_TAN 1 -#define HAVE_TANF 1 -#define HAVE__FSEEKI64 1 - -/* Enable various audio drivers */ -#define SDL_AUDIO_DRIVER_XAUDIO2 1 -#define SDL_AUDIO_DRIVER_DISK 1 -#define SDL_AUDIO_DRIVER_DUMMY 1 - -/* Enable various input drivers */ -#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP -#define SDL_JOYSTICK_DISABLED 1 -#define SDL_HAPTIC_DISABLED 1 -#else -#define SDL_JOYSTICK_XINPUT 1 -#define SDL_HAPTIC_XINPUT 1 -#endif - -/* Enable various shared object loading systems */ -#define SDL_LOADSO_WINDOWS 1 - -/* Enable various threading systems */ -#if (NTDDI_VERSION >= NTDDI_WINBLUE) -#define SDL_THREAD_WINDOWS 1 -#else -/* WinRT on Windows 8.0 and Windows Phone 8.0 don't support CreateThread() */ -#define SDL_THREAD_STDCPP 1 -#endif - -/* Enable various timer systems */ -#define SDL_TIMER_WINDOWS 1 - -/* Enable various video drivers */ -#define SDL_VIDEO_DRIVER_WINRT 1 -#define SDL_VIDEO_DRIVER_DUMMY 1 - -/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */ -#define SDL_VIDEO_OPENGL_ES2 1 -#define SDL_VIDEO_OPENGL_EGL 1 - -/* Enable appropriate renderer(s) */ -#define SDL_VIDEO_RENDER_D3D11 1 - -#if SDL_VIDEO_OPENGL_ES2 -#define SDL_VIDEO_RENDER_OGL_ES2 1 -#endif - -/* Enable system power support */ -#define SDL_POWER_WINRT 1 - -/* Enable assembly routines (Win64 doesn't have inline asm) */ -#ifndef _WIN64 -#define SDL_ASSEMBLY_ROUTINES 1 -#endif - -#endif /* SDL_config_winrt_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_config_wiz.h b/Dependencies/SDL/Windows/include/SDL_config_wiz.h deleted file mode 100644 index 5bb845a..0000000 --- a/Dependencies/SDL/Windows/include/SDL_config_wiz.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ - -#ifndef SDL_config_wiz_h_ -#define SDL_config_wiz_h_ -#define SDL_config_h_ - -/* This is a set of defines to configure the SDL features */ - -/* General platform specific identifiers */ -#include "SDL_platform.h" - -#define SDL_BYTEORDER 1234 - -#define HAVE_ALLOCA_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_STDIO_H 1 -#define STDC_HEADERS 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STDARG_H 1 -#define HAVE_MALLOC_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_ICONV_H 1 -#define HAVE_SIGNAL_H 1 -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_SETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_UNSETENV 1 -#define HAVE_QSORT 1 -#define HAVE_ABS 1 -#define HAVE_BCOPY 1 -#define HAVE_MEMSET 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_STRLEN 1 -#define HAVE_STRDUP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1 -#define HAVE_VSSCANF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_M_PI 1 -#define HAVE_CEIL 1 -#define HAVE_COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_SCALBN 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SQRTF 1 -#define HAVE_TAN 1 -#define HAVE_TANF 1 -#define HAVE_SIGACTION 1 -#define HAVE_SETJMP 1 -#define HAVE_NANOSLEEP 1 -#define HAVE_POW 1 - -#define SDL_AUDIO_DRIVER_DUMMY 1 -#define SDL_AUDIO_DRIVER_OSS 1 - -#define SDL_INPUT_LINUXEV 1 -#define SDL_INPUT_TSLIB 1 -#define SDL_JOYSTICK_LINUX 1 -#define SDL_HAPTIC_LINUX 1 - -#define SDL_LOADSO_DLOPEN 1 - -#define SDL_THREAD_PTHREAD 1 -#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1 - -#define SDL_TIMER_UNIX 1 - -#define SDL_VIDEO_DRIVER_DUMMY 1 -#define SDL_VIDEO_DRIVER_PANDORA 1 -#define SDL_VIDEO_RENDER_OGL_ES 1 -#define SDL_VIDEO_OPENGL_ES 1 - -#endif /* SDL_config_wiz_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_copying.h b/Dependencies/SDL/Windows/include/SDL_copying.h deleted file mode 100644 index 8f60af6..0000000 --- a/Dependencies/SDL/Windows/include/SDL_copying.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - 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. -*/ diff --git a/Dependencies/SDL/Windows/include/SDL_cpuinfo.h b/Dependencies/SDL/Windows/include/SDL_cpuinfo.h deleted file mode 100644 index 0d9b821..0000000 --- a/Dependencies/SDL/Windows/include/SDL_cpuinfo.h +++ /dev/null @@ -1,275 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_cpuinfo.h - * - * CPU feature detection for SDL. - */ - -#ifndef SDL_cpuinfo_h_ -#define SDL_cpuinfo_h_ - -#include "SDL_stdinc.h" - -/* Need to do this here because intrin.h has C++ code in it */ -/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */ -#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64)) -#ifdef __clang__ -/* Many of the intrinsics SDL uses are not implemented by clang with Visual Studio */ -#undef __MMX__ -#undef __SSE__ -#undef __SSE2__ -#else -#include -#ifndef _WIN64 -#ifndef __MMX__ -#define __MMX__ -#endif -#ifndef __3dNOW__ -#define __3dNOW__ -#endif -#endif -#ifndef __SSE__ -#define __SSE__ -#endif -#ifndef __SSE2__ -#define __SSE2__ -#endif -#endif /* __clang__ */ -#elif defined(__MINGW64_VERSION_MAJOR) -#include -#else -/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */ -#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H) -#include -#endif -#if !defined(SDL_DISABLE_ARM_NEON_H) -# if defined(__ARM_NEON) -# include -# elif defined(__WINDOWS__) || defined(__WINRT__) -/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */ -# if defined(_M_ARM) -# include -# include -# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */ -# endif -# if defined (_M_ARM64) -# include -# include -# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */ -# endif -# endif -#endif -#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H) -#include -#endif -#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H) -#include -#else -#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H) -#include -#endif -#if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H) -#include -#endif -#if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H) -#include -#endif -#if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H) -#include -#endif -#endif /* HAVE_IMMINTRIN_H */ -#endif /* compiler version */ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* This is a guess for the cacheline size used for padding. - * Most x86 processors have a 64 byte cache line. - * The 64-bit PowerPC processors have a 128 byte cache line. - * We'll use the larger value to be generally safe. - */ -#define SDL_CACHELINE_SIZE 128 - -/** - * This function returns the number of CPU cores available. - */ -extern DECLSPEC int SDLCALL SDL_GetCPUCount(void); - -/** - * This function returns the L1 cache line size of the CPU - * - * This is useful for determining multi-threaded structure padding - * or SIMD prefetch sizes. - */ -extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void); - -/** - * This function returns true if the CPU has the RDTSC instruction. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void); - -/** - * This function returns true if the CPU has AltiVec features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void); - -/** - * This function returns true if the CPU has MMX features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void); - -/** - * This function returns true if the CPU has 3DNow! features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void); - -/** - * This function returns true if the CPU has SSE features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void); - -/** - * This function returns true if the CPU has SSE2 features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void); - -/** - * This function returns true if the CPU has SSE3 features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void); - -/** - * This function returns true if the CPU has SSE4.1 features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void); - -/** - * This function returns true if the CPU has SSE4.2 features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void); - -/** - * This function returns true if the CPU has AVX features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void); - -/** - * This function returns true if the CPU has AVX2 features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void); - -/** - * This function returns true if the CPU has AVX-512F (foundation) features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void); - -/** - * This function returns true if the CPU has ARM SIMD (ARMv6) features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void); - -/** - * This function returns true if the CPU has NEON (ARM SIMD) features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void); - -/** - * This function returns the amount of RAM configured in the system, in MB. - */ -extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void); - -/** - * \brief Report the alignment this system needs for SIMD allocations. - * - * This will return the minimum number of bytes to which a pointer must be - * aligned to be compatible with SIMD instructions on the current machine. - * For example, if the machine supports SSE only, it will return 16, but if - * it supports AVX-512F, it'll return 64 (etc). This only reports values for - * instruction sets SDL knows about, so if your SDL build doesn't have - * SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and - * not 64 for the AVX-512 instructions that exist but SDL doesn't know about. - * Plan accordingly. - */ -extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void); - -/** - * \brief Allocate memory in a SIMD-friendly way. - * - * This will allocate a block of memory that is suitable for use with SIMD - * instructions. Specifically, it will be properly aligned and padded for - * the system's supported vector instructions. - * - * The memory returned will be padded such that it is safe to read or write - * an incomplete vector at the end of the memory block. This can be useful - * so you don't have to drop back to a scalar fallback at the end of your - * SIMD processing loop to deal with the final elements without overflowing - * the allocated buffer. - * - * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() - * or delete[], etc. - * - * Note that SDL will only deal with SIMD instruction sets it is aware of; - * for example, SDL 2.0.8 knows that SSE wants 16-byte vectors - * (SDL_HasSSE()), and AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't - * know that AVX-512 wants 64. To be clear: if you can't decide to use an - * instruction set with an SDL_Has*() function, don't use that instruction - * set with memory allocated through here. - * - * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't - * out of memory. - * - * \param len The length, in bytes, of the block to allocated. The actual - * allocated block might be larger due to padding, etc. - * \return Pointer to newly-allocated block, NULL if out of memory. - * - * \sa SDL_SIMDAlignment - * \sa SDL_SIMDFree - */ -extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len); - -/** - * \brief Deallocate memory obtained from SDL_SIMDAlloc - * - * It is not valid to use this function on a pointer from anything but - * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc, - * SDL_malloc, memalign, new[], etc. - * - * However, SDL_SIMDFree(NULL) is a legal no-op. - * - * \sa SDL_SIMDAlloc - */ -extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr); - -/* vi: set ts=4 sw=4 expandtab: */ -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_cpuinfo_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_egl.h b/Dependencies/SDL/Windows/include/SDL_egl.h deleted file mode 100644 index 531441e..0000000 --- a/Dependencies/SDL/Windows/include/SDL_egl.h +++ /dev/null @@ -1,1676 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_egl.h - * - * This is a simple file to encapsulate the EGL API headers. - */ -#if !defined(_MSC_VER) && !defined(__ANDROID__) - -#include -#include - -#else /* _MSC_VER */ - -/* EGL headers for Visual Studio */ - -#ifndef __khrplatform_h_ -#define __khrplatform_h_ - -/* -** Copyright (c) 2008-2009 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Khronos platform-specific types and definitions. -* -* $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $ -* -* Adopters may modify this file to suit their platform. Adopters are -* encouraged to submit platform specific modifications to the Khronos -* group so that they can be included in future versions of this file. -* Please submit changes by sending them to the public Khronos Bugzilla -* (http://khronos.org/bugzilla) by filing a bug against product -* "Khronos (general)" component "Registry". -* -* A predefined template which fills in some of the bug fields can be -* reached using http://tinyurl.com/khrplatform-h-bugreport, but you -* must create a Bugzilla login first. -* -* -* See the Implementer's Guidelines for information about where this file -* should be located on your system and for more details of its use: -* http://www.khronos.org/registry/implementers_guide.pdf -* -* This file should be included as -* #include -* by Khronos client API header files that use its types and defines. -* -* The types in khrplatform.h should only be used to define API-specific types. -* -* Types defined in khrplatform.h: -* khronos_int8_t signed 8 bit -* khronos_uint8_t unsigned 8 bit -* khronos_int16_t signed 16 bit -* khronos_uint16_t unsigned 16 bit -* khronos_int32_t signed 32 bit -* khronos_uint32_t unsigned 32 bit -* khronos_int64_t signed 64 bit -* khronos_uint64_t unsigned 64 bit -* khronos_intptr_t signed same number of bits as a pointer -* khronos_uintptr_t unsigned same number of bits as a pointer -* khronos_ssize_t signed size -* khronos_usize_t unsigned size -* khronos_float_t signed 32 bit floating point -* khronos_time_ns_t unsigned 64 bit time in nanoseconds -* khronos_utime_nanoseconds_t unsigned time interval or absolute time in -* nanoseconds -* khronos_stime_nanoseconds_t signed time interval in nanoseconds -* khronos_boolean_enum_t enumerated boolean type. This should -* only be used as a base type when a client API's boolean type is -* an enum. Client APIs which use an integer or other type for -* booleans cannot use this as the base type for their boolean. -* -* Tokens defined in khrplatform.h: -* -* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. -* -* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. -* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. -* -* Calling convention macros defined in this file: -* KHRONOS_APICALL -* KHRONOS_APIENTRY -* KHRONOS_APIATTRIBUTES -* -* These may be used in function prototypes as: -* -* KHRONOS_APICALL void KHRONOS_APIENTRY funcname( -* int arg1, -* int arg2) KHRONOS_APIATTRIBUTES; -*/ - -/*------------------------------------------------------------------------- -* Definition of KHRONOS_APICALL -*------------------------------------------------------------------------- -* This precedes the return type of the function in the function prototype. -*/ -#if defined(_WIN32) && !defined(__SCITECH_SNAP__) && !defined(SDL_VIDEO_STATIC_ANGLE) -# define KHRONOS_APICALL __declspec(dllimport) -#elif defined (__SYMBIAN32__) -# define KHRONOS_APICALL IMPORT_C -#else -# define KHRONOS_APICALL -#endif - -/*------------------------------------------------------------------------- -* Definition of KHRONOS_APIENTRY -*------------------------------------------------------------------------- -* This follows the return type of the function and precedes the function -* name in the function prototype. -*/ -#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) -/* Win32 but not WinCE */ -# define KHRONOS_APIENTRY __stdcall -#else -# define KHRONOS_APIENTRY -#endif - -/*------------------------------------------------------------------------- -* Definition of KHRONOS_APIATTRIBUTES -*------------------------------------------------------------------------- -* This follows the closing parenthesis of the function prototype arguments. -*/ -#if defined (__ARMCC_2__) -#define KHRONOS_APIATTRIBUTES __softfp -#else -#define KHRONOS_APIATTRIBUTES -#endif - -/*------------------------------------------------------------------------- -* basic type definitions -*-----------------------------------------------------------------------*/ -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) - - -/* -* Using -*/ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__VMS ) || defined(__sgi) - -/* -* Using -*/ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) - -/* -* Win32 -*/ -typedef __int32 khronos_int32_t; -typedef unsigned __int32 khronos_uint32_t; -typedef __int64 khronos_int64_t; -typedef unsigned __int64 khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__sun__) || defined(__digital__) - -/* -* Sun or Digital -*/ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#if defined(__arch64__) || defined(_LP64) -typedef long int khronos_int64_t; -typedef unsigned long int khronos_uint64_t; -#else -typedef long long int khronos_int64_t; -typedef unsigned long long int khronos_uint64_t; -#endif /* __arch64__ */ -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif 0 - -/* -* Hypothetical platform with no float or int64 support -*/ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#define KHRONOS_SUPPORT_INT64 0 -#define KHRONOS_SUPPORT_FLOAT 0 - -#else - -/* -* Generic fallback -*/ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#endif - - -/* -* Types that are (so far) the same on all platforms -*/ -typedef signed char khronos_int8_t; -typedef unsigned char khronos_uint8_t; -typedef signed short int khronos_int16_t; -typedef unsigned short int khronos_uint16_t; - -/* -* Types that differ between LLP64 and LP64 architectures - in LLP64, -* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears -* to be the only LLP64 architecture in current use. -*/ -#ifdef _WIN64 -typedef signed long long int khronos_intptr_t; -typedef unsigned long long int khronos_uintptr_t; -typedef signed long long int khronos_ssize_t; -typedef unsigned long long int khronos_usize_t; -#else -typedef signed long int khronos_intptr_t; -typedef unsigned long int khronos_uintptr_t; -typedef signed long int khronos_ssize_t; -typedef unsigned long int khronos_usize_t; -#endif - -#if KHRONOS_SUPPORT_FLOAT -/* -* Float type -*/ -typedef float khronos_float_t; -#endif - -#if KHRONOS_SUPPORT_INT64 -/* Time types -* -* These types can be used to represent a time interval in nanoseconds or -* an absolute Unadjusted System Time. Unadjusted System Time is the number -* of nanoseconds since some arbitrary system event (e.g. since the last -* time the system booted). The Unadjusted System Time is an unsigned -* 64 bit value that wraps back to 0 every 584 years. Time intervals -* may be either signed or unsigned. -*/ -typedef khronos_uint64_t khronos_utime_nanoseconds_t; -typedef khronos_int64_t khronos_stime_nanoseconds_t; -#endif - -/* -* Dummy value used to pad enum types to 32 bits. -*/ -#ifndef KHRONOS_MAX_ENUM -#define KHRONOS_MAX_ENUM 0x7FFFFFFF -#endif - -/* -* Enumerated boolean type -* -* Values other than zero should be considered to be true. Therefore -* comparisons should not be made against KHRONOS_TRUE. -*/ -typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM -} khronos_boolean_enum_t; - -#endif /* __khrplatform_h_ */ - - -#ifndef __eglplatform_h_ -#define __eglplatform_h_ - -/* -** Copyright (c) 2007-2009 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Platform-specific types and definitions for egl.h -* $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $ -* -* Adopters may modify khrplatform.h and this file to suit their platform. -* You are encouraged to submit all modifications to the Khronos group so that -* they can be included in future versions of this file. Please submit changes -* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) -* by filing a bug against product "EGL" component "Registry". -*/ - -/*#include */ - -/* Macros used in EGL function prototype declarations. -* -* EGL functions should be prototyped as: -* -* EGLAPI return-type EGLAPIENTRY eglFunction(arguments); -* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); -* -* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h -*/ - -#ifndef EGLAPI -#define EGLAPI KHRONOS_APICALL -#endif - -#ifndef EGLAPIENTRY -#define EGLAPIENTRY KHRONOS_APIENTRY -#endif -#define EGLAPIENTRYP EGLAPIENTRY* - -/* The types NativeDisplayType, NativeWindowType, and NativePixmapType -* are aliases of window-system-dependent types, such as X Display * or -* Windows Device Context. They must be defined in platform-specific -* code below. The EGL-prefixed versions of Native*Type are the same -* types, renamed in EGL 1.3 so all types in the API start with "EGL". -* -* Khronos STRONGLY RECOMMENDS that you use the default definitions -* provided below, since these changes affect both binary and source -* portability of applications using EGL running on different EGL -* implementations. -*/ - -#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif -#ifndef NOMINMAX /* don't define min() and max(). */ -#define NOMINMAX -#endif -#include - -#if __WINRT__ -#include -typedef IUnknown * EGLNativeWindowType; -typedef IUnknown * EGLNativePixmapType; -typedef IUnknown * EGLNativeDisplayType; -#else -typedef HDC EGLNativeDisplayType; -typedef HBITMAP EGLNativePixmapType; -typedef HWND EGLNativeWindowType; -#endif - -#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ - -typedef int EGLNativeDisplayType; -typedef void *EGLNativeWindowType; -typedef void *EGLNativePixmapType; - -#elif defined(WL_EGL_PLATFORM) - -typedef struct wl_display *EGLNativeDisplayType; -typedef struct wl_egl_pixmap *EGLNativePixmapType; -typedef struct wl_egl_window *EGLNativeWindowType; - -#elif defined(__GBM__) - -typedef struct gbm_device *EGLNativeDisplayType; -typedef struct gbm_bo *EGLNativePixmapType; -typedef void *EGLNativeWindowType; - -#elif defined(__ANDROID__) /* Android */ - -struct ANativeWindow; -struct egl_native_pixmap_t; - -typedef struct ANativeWindow *EGLNativeWindowType; -typedef struct egl_native_pixmap_t *EGLNativePixmapType; -typedef void *EGLNativeDisplayType; - -#elif defined(MIR_EGL_PLATFORM) - -#include -typedef MirEGLNativeDisplayType EGLNativeDisplayType; -typedef void *EGLNativePixmapType; -typedef MirEGLNativeWindowType EGLNativeWindowType; - -#elif defined(__unix__) - -#ifdef MESA_EGL_NO_X11_HEADERS - -typedef void *EGLNativeDisplayType; -typedef khronos_uintptr_t EGLNativePixmapType; -typedef khronos_uintptr_t EGLNativeWindowType; - -#else - -/* X11 (tentative) */ -#include -#include - -typedef Display *EGLNativeDisplayType; -typedef Pixmap EGLNativePixmapType; -typedef Window EGLNativeWindowType; - -#endif /* MESA_EGL_NO_X11_HEADERS */ - -#else -#error "Platform not recognized" -#endif - -/* EGL 1.2 types, renamed for consistency in EGL 1.3 */ -typedef EGLNativeDisplayType NativeDisplayType; -typedef EGLNativePixmapType NativePixmapType; -typedef EGLNativeWindowType NativeWindowType; - - -/* Define EGLint. This must be a signed integral type large enough to contain -* all legal attribute names and values passed into and out of EGL, whether -* their type is boolean, bitmask, enumerant (symbolic constant), integer, -* handle, or other. While in general a 32-bit integer will suffice, if -* handles are 64 bit types, then EGLint should be defined as a signed 64-bit -* integer type. -*/ -typedef khronos_int32_t EGLint; - -#endif /* __eglplatform_h */ - -#ifndef __egl_h_ -#define __egl_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2015 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 31566 $ on $Date: 2015-06-23 08:48:48 -0700 (Tue, 23 Jun 2015) $ -*/ - -/*#include */ - -/* Generated on date 20150623 */ - -/* Generated C header for: - * API: egl - * Versions considered: .* - * Versions emitted: .* - * Default extensions included: None - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef EGL_VERSION_1_0 -#define EGL_VERSION_1_0 1 -typedef unsigned int EGLBoolean; -typedef void *EGLDisplay; -typedef void *EGLConfig; -typedef void *EGLSurface; -typedef void *EGLContext; -typedef void (*__eglMustCastToProperFunctionPointerType)(void); -#define EGL_ALPHA_SIZE 0x3021 -#define EGL_BAD_ACCESS 0x3002 -#define EGL_BAD_ALLOC 0x3003 -#define EGL_BAD_ATTRIBUTE 0x3004 -#define EGL_BAD_CONFIG 0x3005 -#define EGL_BAD_CONTEXT 0x3006 -#define EGL_BAD_CURRENT_SURFACE 0x3007 -#define EGL_BAD_DISPLAY 0x3008 -#define EGL_BAD_MATCH 0x3009 -#define EGL_BAD_NATIVE_PIXMAP 0x300A -#define EGL_BAD_NATIVE_WINDOW 0x300B -#define EGL_BAD_PARAMETER 0x300C -#define EGL_BAD_SURFACE 0x300D -#define EGL_BLUE_SIZE 0x3022 -#define EGL_BUFFER_SIZE 0x3020 -#define EGL_CONFIG_CAVEAT 0x3027 -#define EGL_CONFIG_ID 0x3028 -#define EGL_CORE_NATIVE_ENGINE 0x305B -#define EGL_DEPTH_SIZE 0x3025 -#define EGL_DONT_CARE ((EGLint)-1) -#define EGL_DRAW 0x3059 -#define EGL_EXTENSIONS 0x3055 -#define EGL_FALSE 0 -#define EGL_GREEN_SIZE 0x3023 -#define EGL_HEIGHT 0x3056 -#define EGL_LARGEST_PBUFFER 0x3058 -#define EGL_LEVEL 0x3029 -#define EGL_MAX_PBUFFER_HEIGHT 0x302A -#define EGL_MAX_PBUFFER_PIXELS 0x302B -#define EGL_MAX_PBUFFER_WIDTH 0x302C -#define EGL_NATIVE_RENDERABLE 0x302D -#define EGL_NATIVE_VISUAL_ID 0x302E -#define EGL_NATIVE_VISUAL_TYPE 0x302F -#define EGL_NONE 0x3038 -#define EGL_NON_CONFORMANT_CONFIG 0x3051 -#define EGL_NOT_INITIALIZED 0x3001 -#define EGL_NO_CONTEXT ((EGLContext)0) -#define EGL_NO_DISPLAY ((EGLDisplay)0) -#define EGL_NO_SURFACE ((EGLSurface)0) -#define EGL_PBUFFER_BIT 0x0001 -#define EGL_PIXMAP_BIT 0x0002 -#define EGL_READ 0x305A -#define EGL_RED_SIZE 0x3024 -#define EGL_SAMPLES 0x3031 -#define EGL_SAMPLE_BUFFERS 0x3032 -#define EGL_SLOW_CONFIG 0x3050 -#define EGL_STENCIL_SIZE 0x3026 -#define EGL_SUCCESS 0x3000 -#define EGL_SURFACE_TYPE 0x3033 -#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 -#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 -#define EGL_TRANSPARENT_RED_VALUE 0x3037 -#define EGL_TRANSPARENT_RGB 0x3052 -#define EGL_TRANSPARENT_TYPE 0x3034 -#define EGL_TRUE 1 -#define EGL_VENDOR 0x3053 -#define EGL_VERSION 0x3054 -#define EGL_WIDTH 0x3057 -#define EGL_WINDOW_BIT 0x0004 -EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); -EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); -EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface); -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); -EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void); -EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw); -EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id); -EGLAPI EGLint EGLAPIENTRY eglGetError (void); -EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname); -EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor); -EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); -EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface); -EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine); -#endif /* EGL_VERSION_1_0 */ - -#ifndef EGL_VERSION_1_1 -#define EGL_VERSION_1_1 1 -#define EGL_BACK_BUFFER 0x3084 -#define EGL_BIND_TO_TEXTURE_RGB 0x3039 -#define EGL_BIND_TO_TEXTURE_RGBA 0x303A -#define EGL_CONTEXT_LOST 0x300E -#define EGL_MIN_SWAP_INTERVAL 0x303B -#define EGL_MAX_SWAP_INTERVAL 0x303C -#define EGL_MIPMAP_TEXTURE 0x3082 -#define EGL_MIPMAP_LEVEL 0x3083 -#define EGL_NO_TEXTURE 0x305C -#define EGL_TEXTURE_2D 0x305F -#define EGL_TEXTURE_FORMAT 0x3080 -#define EGL_TEXTURE_RGB 0x305D -#define EGL_TEXTURE_RGBA 0x305E -#define EGL_TEXTURE_TARGET 0x3081 -EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); -EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); -EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval); -#endif /* EGL_VERSION_1_1 */ - -#ifndef EGL_VERSION_1_2 -#define EGL_VERSION_1_2 1 -typedef unsigned int EGLenum; -typedef void *EGLClientBuffer; -#define EGL_ALPHA_FORMAT 0x3088 -#define EGL_ALPHA_FORMAT_NONPRE 0x308B -#define EGL_ALPHA_FORMAT_PRE 0x308C -#define EGL_ALPHA_MASK_SIZE 0x303E -#define EGL_BUFFER_PRESERVED 0x3094 -#define EGL_BUFFER_DESTROYED 0x3095 -#define EGL_CLIENT_APIS 0x308D -#define EGL_COLORSPACE 0x3087 -#define EGL_COLORSPACE_sRGB 0x3089 -#define EGL_COLORSPACE_LINEAR 0x308A -#define EGL_COLOR_BUFFER_TYPE 0x303F -#define EGL_CONTEXT_CLIENT_TYPE 0x3097 -#define EGL_DISPLAY_SCALING 10000 -#define EGL_HORIZONTAL_RESOLUTION 0x3090 -#define EGL_LUMINANCE_BUFFER 0x308F -#define EGL_LUMINANCE_SIZE 0x303D -#define EGL_OPENGL_ES_BIT 0x0001 -#define EGL_OPENVG_BIT 0x0002 -#define EGL_OPENGL_ES_API 0x30A0 -#define EGL_OPENVG_API 0x30A1 -#define EGL_OPENVG_IMAGE 0x3096 -#define EGL_PIXEL_ASPECT_RATIO 0x3092 -#define EGL_RENDERABLE_TYPE 0x3040 -#define EGL_RENDER_BUFFER 0x3086 -#define EGL_RGB_BUFFER 0x308E -#define EGL_SINGLE_BUFFER 0x3085 -#define EGL_SWAP_BEHAVIOR 0x3093 -#define EGL_UNKNOWN ((EGLint)-1) -#define EGL_VERTICAL_RESOLUTION 0x3091 -EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api); -EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void); -#endif /* EGL_VERSION_1_2 */ - -#ifndef EGL_VERSION_1_3 -#define EGL_VERSION_1_3 1 -#define EGL_CONFORMANT 0x3042 -#define EGL_CONTEXT_CLIENT_VERSION 0x3098 -#define EGL_MATCH_NATIVE_PIXMAP 0x3041 -#define EGL_OPENGL_ES2_BIT 0x0004 -#define EGL_VG_ALPHA_FORMAT 0x3088 -#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B -#define EGL_VG_ALPHA_FORMAT_PRE 0x308C -#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 -#define EGL_VG_COLORSPACE 0x3087 -#define EGL_VG_COLORSPACE_sRGB 0x3089 -#define EGL_VG_COLORSPACE_LINEAR 0x308A -#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 -#endif /* EGL_VERSION_1_3 */ - -#ifndef EGL_VERSION_1_4 -#define EGL_VERSION_1_4 1 -#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) -#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 -#define EGL_MULTISAMPLE_RESOLVE 0x3099 -#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A -#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B -#define EGL_OPENGL_API 0x30A2 -#define EGL_OPENGL_BIT 0x0008 -#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 -EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void); -#endif /* EGL_VERSION_1_4 */ - -#ifndef EGL_VERSION_1_5 -#define EGL_VERSION_1_5 1 -typedef void *EGLSync; -typedef intptr_t EGLAttrib; -typedef khronos_utime_nanoseconds_t EGLTime; -typedef void *EGLImage; -#define EGL_CONTEXT_MAJOR_VERSION 0x3098 -#define EGL_CONTEXT_MINOR_VERSION 0x30FB -#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD -#define EGL_NO_RESET_NOTIFICATION 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF -#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001 -#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0 -#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2 -#define EGL_OPENGL_ES3_BIT 0x00000040 -#define EGL_CL_EVENT_HANDLE 0x309C -#define EGL_SYNC_CL_EVENT 0x30FE -#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0 -#define EGL_SYNC_TYPE 0x30F7 -#define EGL_SYNC_STATUS 0x30F1 -#define EGL_SYNC_CONDITION 0x30F8 -#define EGL_SIGNALED 0x30F2 -#define EGL_UNSIGNALED 0x30F3 -#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001 -#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull -#define EGL_TIMEOUT_EXPIRED 0x30F5 -#define EGL_CONDITION_SATISFIED 0x30F6 -#define EGL_NO_SYNC ((EGLSync)0) -#define EGL_SYNC_FENCE 0x30F9 -#define EGL_GL_COLORSPACE 0x309D -#define EGL_GL_COLORSPACE_SRGB 0x3089 -#define EGL_GL_COLORSPACE_LINEAR 0x308A -#define EGL_GL_RENDERBUFFER 0x30B9 -#define EGL_GL_TEXTURE_2D 0x30B1 -#define EGL_GL_TEXTURE_LEVEL 0x30BC -#define EGL_GL_TEXTURE_3D 0x30B2 -#define EGL_GL_TEXTURE_ZOFFSET 0x30BD -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 -#define EGL_IMAGE_PRESERVED 0x30D2 -#define EGL_NO_IMAGE ((EGLImage)0) -EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value); -EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image); -EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags); -#endif /* EGL_VERSION_1_5 */ - -#ifdef __cplusplus -} -#endif - -#endif /* __egl_h_ */ - - - -#ifndef __eglext_h_ -#define __eglext_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2015 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 31566 $ on $Date: 2015-06-23 08:48:48 -0700 (Tue, 23 Jun 2015) $ -*/ - -/*#include */ - -#define EGL_EGLEXT_VERSION 20150623 - -/* Generated C header for: - * API: egl - * Versions considered: .* - * Versions emitted: _nomatch_^ - * Default extensions included: egl - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef EGL_KHR_cl_event -#define EGL_KHR_cl_event 1 -#define EGL_CL_EVENT_HANDLE_KHR 0x309C -#define EGL_SYNC_CL_EVENT_KHR 0x30FE -#define EGL_SYNC_CL_EVENT_COMPLETE_KHR 0x30FF -#endif /* EGL_KHR_cl_event */ - -#ifndef EGL_KHR_cl_event2 -#define EGL_KHR_cl_event2 1 -typedef void *EGLSyncKHR; -typedef intptr_t EGLAttribKHR; -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list); -#endif -#endif /* EGL_KHR_cl_event2 */ - -#ifndef EGL_KHR_client_get_all_proc_addresses -#define EGL_KHR_client_get_all_proc_addresses 1 -#endif /* EGL_KHR_client_get_all_proc_addresses */ - -#ifndef EGL_KHR_config_attribs -#define EGL_KHR_config_attribs 1 -#define EGL_CONFORMANT_KHR 0x3042 -#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 -#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 -#endif /* EGL_KHR_config_attribs */ - -#ifndef EGL_KHR_create_context -#define EGL_KHR_create_context 1 -#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098 -#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB -#define EGL_CONTEXT_FLAGS_KHR 0x30FC -#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD -#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF -#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001 -#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004 -#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001 -#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002 -#define EGL_OPENGL_ES3_BIT_KHR 0x00000040 -#endif /* EGL_KHR_create_context */ - -#ifndef EGL_KHR_create_context_no_error -#define EGL_KHR_create_context_no_error 1 -#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31B3 -#endif /* EGL_KHR_create_context_no_error */ - -#ifndef EGL_KHR_fence_sync -#define EGL_KHR_fence_sync 1 -typedef khronos_utime_nanoseconds_t EGLTimeKHR; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 -#define EGL_SYNC_CONDITION_KHR 0x30F8 -#define EGL_SYNC_FENCE_KHR 0x30F9 -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); -typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_fence_sync */ - -#ifndef EGL_KHR_get_all_proc_addresses -#define EGL_KHR_get_all_proc_addresses 1 -#endif /* EGL_KHR_get_all_proc_addresses */ - -#ifndef EGL_KHR_gl_colorspace -#define EGL_KHR_gl_colorspace 1 -#define EGL_GL_COLORSPACE_KHR 0x309D -#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089 -#define EGL_GL_COLORSPACE_LINEAR_KHR 0x308A -#endif /* EGL_KHR_gl_colorspace */ - -#ifndef EGL_KHR_gl_renderbuffer_image -#define EGL_KHR_gl_renderbuffer_image 1 -#define EGL_GL_RENDERBUFFER_KHR 0x30B9 -#endif /* EGL_KHR_gl_renderbuffer_image */ - -#ifndef EGL_KHR_gl_texture_2D_image -#define EGL_KHR_gl_texture_2D_image 1 -#define EGL_GL_TEXTURE_2D_KHR 0x30B1 -#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC -#endif /* EGL_KHR_gl_texture_2D_image */ - -#ifndef EGL_KHR_gl_texture_3D_image -#define EGL_KHR_gl_texture_3D_image 1 -#define EGL_GL_TEXTURE_3D_KHR 0x30B2 -#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD -#endif /* EGL_KHR_gl_texture_3D_image */ - -#ifndef EGL_KHR_gl_texture_cubemap_image -#define EGL_KHR_gl_texture_cubemap_image 1 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 -#endif /* EGL_KHR_gl_texture_cubemap_image */ - -#ifndef EGL_KHR_image -#define EGL_KHR_image 1 -typedef void *EGLImageKHR; -#define EGL_NATIVE_PIXMAP_KHR 0x30B0 -#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); -#endif -#endif /* EGL_KHR_image */ - -#ifndef EGL_KHR_image_base -#define EGL_KHR_image_base 1 -#define EGL_IMAGE_PRESERVED_KHR 0x30D2 -#endif /* EGL_KHR_image_base */ - -#ifndef EGL_KHR_image_pixmap -#define EGL_KHR_image_pixmap 1 -#endif /* EGL_KHR_image_pixmap */ - -#ifndef EGL_KHR_lock_surface -#define EGL_KHR_lock_surface 1 -#define EGL_READ_SURFACE_BIT_KHR 0x0001 -#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 -#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 -#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 -#define EGL_MATCH_FORMAT_KHR 0x3043 -#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 -#define EGL_FORMAT_RGB_565_KHR 0x30C1 -#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 -#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 -#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 -#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 -#define EGL_BITMAP_POINTER_KHR 0x30C6 -#define EGL_BITMAP_PITCH_KHR 0x30C7 -#define EGL_BITMAP_ORIGIN_KHR 0x30C8 -#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 -#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA -#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB -#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC -#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD -#define EGL_LOWER_LEFT_KHR 0x30CE -#define EGL_UPPER_LEFT_KHR 0x30CF -typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface); -#endif -#endif /* EGL_KHR_lock_surface */ - -#ifndef EGL_KHR_lock_surface2 -#define EGL_KHR_lock_surface2 1 -#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110 -#endif /* EGL_KHR_lock_surface2 */ - -#ifndef EGL_KHR_lock_surface3 -#define EGL_KHR_lock_surface3 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value); -#endif -#endif /* EGL_KHR_lock_surface3 */ - -#ifndef EGL_KHR_partial_update -#define EGL_KHR_partial_update 1 -#define EGL_BUFFER_AGE_KHR 0x313D -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#endif -#endif /* EGL_KHR_partial_update */ - -#ifndef EGL_KHR_platform_android -#define EGL_KHR_platform_android 1 -#define EGL_PLATFORM_ANDROID_KHR 0x3141 -#endif /* EGL_KHR_platform_android */ - -#ifndef EGL_KHR_platform_gbm -#define EGL_KHR_platform_gbm 1 -#define EGL_PLATFORM_GBM_KHR 0x31D7 -#endif /* EGL_KHR_platform_gbm */ - -#ifndef EGL_KHR_platform_wayland -#define EGL_KHR_platform_wayland 1 -#define EGL_PLATFORM_WAYLAND_KHR 0x31D8 -#endif /* EGL_KHR_platform_wayland */ - -#ifndef EGL_KHR_platform_x11 -#define EGL_KHR_platform_x11 1 -#define EGL_PLATFORM_X11_KHR 0x31D5 -#define EGL_PLATFORM_X11_SCREEN_KHR 0x31D6 -#endif /* EGL_KHR_platform_x11 */ - -#ifndef EGL_KHR_reusable_sync -#define EGL_KHR_reusable_sync 1 -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_STATUS_KHR 0x30F1 -#define EGL_SIGNALED_KHR 0x30F2 -#define EGL_UNSIGNALED_KHR 0x30F3 -#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 -#define EGL_CONDITION_SATISFIED_KHR 0x30F6 -#define EGL_SYNC_TYPE_KHR 0x30F7 -#define EGL_SYNC_REUSABLE_KHR 0x30FA -#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 -#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull -#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_reusable_sync */ - -#ifndef EGL_KHR_stream -#define EGL_KHR_stream 1 -typedef void *EGLStreamKHR; -typedef khronos_uint64_t EGLuint64KHR; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0) -#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210 -#define EGL_PRODUCER_FRAME_KHR 0x3212 -#define EGL_CONSUMER_FRAME_KHR 0x3213 -#define EGL_STREAM_STATE_KHR 0x3214 -#define EGL_STREAM_STATE_CREATED_KHR 0x3215 -#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216 -#define EGL_STREAM_STATE_EMPTY_KHR 0x3217 -#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218 -#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219 -#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A -#define EGL_BAD_STREAM_KHR 0x321B -#define EGL_BAD_STATE_KHR 0x321C -typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_stream */ - -#ifndef EGL_KHR_stream_consumer_gltexture -#define EGL_KHR_stream_consumer_gltexture 1 -#ifdef EGL_KHR_stream -#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_consumer_gltexture */ - -#ifndef EGL_KHR_stream_cross_process_fd -#define EGL_KHR_stream_cross_process_fd 1 -typedef int EGLNativeFileDescriptorKHR; -#ifdef EGL_KHR_stream -#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1)) -typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_cross_process_fd */ - -#ifndef EGL_KHR_stream_fifo -#define EGL_KHR_stream_fifo 1 -#ifdef EGL_KHR_stream -#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC -#define EGL_STREAM_TIME_NOW_KHR 0x31FD -#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE -#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_fifo */ - -#ifndef EGL_KHR_stream_producer_aldatalocator -#define EGL_KHR_stream_producer_aldatalocator 1 -#ifdef EGL_KHR_stream -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_producer_aldatalocator */ - -#ifndef EGL_KHR_stream_producer_eglsurface -#define EGL_KHR_stream_producer_eglsurface 1 -#ifdef EGL_KHR_stream -#define EGL_STREAM_BIT_KHR 0x0800 -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_producer_eglsurface */ - -#ifndef EGL_KHR_surfaceless_context -#define EGL_KHR_surfaceless_context 1 -#endif /* EGL_KHR_surfaceless_context */ - -#ifndef EGL_KHR_swap_buffers_with_damage -#define EGL_KHR_swap_buffers_with_damage 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#endif -#endif /* EGL_KHR_swap_buffers_with_damage */ - -#ifndef EGL_KHR_vg_parent_image -#define EGL_KHR_vg_parent_image 1 -#define EGL_VG_PARENT_IMAGE_KHR 0x30BA -#endif /* EGL_KHR_vg_parent_image */ - -#ifndef EGL_KHR_wait_sync -#define EGL_KHR_wait_sync 1 -typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); -#endif -#endif /* EGL_KHR_wait_sync */ - -#ifndef EGL_ANDROID_blob_cache -#define EGL_ANDROID_blob_cache 1 -typedef khronos_ssize_t EGLsizeiANDROID; -typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize); -typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); -typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); -#endif -#endif /* EGL_ANDROID_blob_cache */ - -#ifndef EGL_ANDROID_framebuffer_target -#define EGL_ANDROID_framebuffer_target 1 -#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147 -#endif /* EGL_ANDROID_framebuffer_target */ - -#ifndef EGL_ANDROID_image_native_buffer -#define EGL_ANDROID_image_native_buffer 1 -#define EGL_NATIVE_BUFFER_ANDROID 0x3140 -#endif /* EGL_ANDROID_image_native_buffer */ - -#ifndef EGL_ANDROID_native_fence_sync -#define EGL_ANDROID_native_fence_sync 1 -#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144 -#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 -#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146 -#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1 -typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync); -#endif -#endif /* EGL_ANDROID_native_fence_sync */ - -#ifndef EGL_ANDROID_recordable -#define EGL_ANDROID_recordable 1 -#define EGL_RECORDABLE_ANDROID 0x3142 -#endif /* EGL_ANDROID_recordable */ - -#ifndef EGL_ANGLE_d3d_share_handle_client_buffer -#define EGL_ANGLE_d3d_share_handle_client_buffer 1 -#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200 -#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */ - -#ifndef EGL_ANGLE_device_d3d -#define EGL_ANGLE_device_d3d 1 -#define EGL_D3D9_DEVICE_ANGLE 0x33A0 -#define EGL_D3D11_DEVICE_ANGLE 0x33A1 -#endif /* EGL_ANGLE_device_d3d */ - -#ifndef EGL_ANGLE_query_surface_pointer -#define EGL_ANGLE_query_surface_pointer 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); -#endif -#endif /* EGL_ANGLE_query_surface_pointer */ - -#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle -#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1 -#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */ - -#ifndef EGL_ANGLE_window_fixed_size -#define EGL_ANGLE_window_fixed_size 1 -#define EGL_FIXED_SIZE_ANGLE 0x3201 -#endif /* EGL_ANGLE_window_fixed_size */ - -#ifndef EGL_ARM_pixmap_multisample_discard -#define EGL_ARM_pixmap_multisample_discard 1 -#define EGL_DISCARD_SAMPLES_ARM 0x3286 -#endif /* EGL_ARM_pixmap_multisample_discard */ - -#ifndef EGL_EXT_buffer_age -#define EGL_EXT_buffer_age 1 -#define EGL_BUFFER_AGE_EXT 0x313D -#endif /* EGL_EXT_buffer_age */ - -#ifndef EGL_EXT_client_extensions -#define EGL_EXT_client_extensions 1 -#endif /* EGL_EXT_client_extensions */ - -#ifndef EGL_EXT_create_context_robustness -#define EGL_EXT_create_context_robustness 1 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138 -#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF -#endif /* EGL_EXT_create_context_robustness */ - -#ifndef EGL_EXT_device_base -#define EGL_EXT_device_base 1 -typedef void *EGLDeviceEXT; -#define EGL_NO_DEVICE_EXT ((EGLDeviceEXT)(0)) -#define EGL_BAD_DEVICE_EXT 0x322B -#define EGL_DEVICE_EXT 0x322C -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); -typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); -EGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); -#endif -#endif /* EGL_EXT_device_base */ - -#ifndef EGL_EXT_device_drm -#define EGL_EXT_device_drm 1 -#define EGL_DRM_DEVICE_FILE_EXT 0x3233 -#endif /* EGL_EXT_device_drm */ - -#ifndef EGL_EXT_device_enumeration -#define EGL_EXT_device_enumeration 1 -#endif /* EGL_EXT_device_enumeration */ - -#ifndef EGL_EXT_device_openwf -#define EGL_EXT_device_openwf 1 -#define EGL_OPENWF_DEVICE_ID_EXT 0x3237 -#endif /* EGL_EXT_device_openwf */ - -#ifndef EGL_EXT_device_query -#define EGL_EXT_device_query 1 -#endif /* EGL_EXT_device_query */ - -#ifndef EGL_EXT_image_dma_buf_import -#define EGL_EXT_image_dma_buf_import 1 -#define EGL_LINUX_DMA_BUF_EXT 0x3270 -#define EGL_LINUX_DRM_FOURCC_EXT 0x3271 -#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 -#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 -#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 -#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 -#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 -#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 -#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 -#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 -#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A -#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B -#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C -#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D -#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E -#define EGL_ITU_REC601_EXT 0x327F -#define EGL_ITU_REC709_EXT 0x3280 -#define EGL_ITU_REC2020_EXT 0x3281 -#define EGL_YUV_FULL_RANGE_EXT 0x3282 -#define EGL_YUV_NARROW_RANGE_EXT 0x3283 -#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284 -#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285 -#endif /* EGL_EXT_image_dma_buf_import */ - -#ifndef EGL_EXT_multiview_window -#define EGL_EXT_multiview_window 1 -#define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134 -#endif /* EGL_EXT_multiview_window */ - -#ifndef EGL_EXT_output_base -#define EGL_EXT_output_base 1 -typedef void *EGLOutputLayerEXT; -typedef void *EGLOutputPortEXT; -#define EGL_NO_OUTPUT_LAYER_EXT ((EGLOutputLayerEXT)0) -#define EGL_NO_OUTPUT_PORT_EXT ((EGLOutputPortEXT)0) -#define EGL_BAD_OUTPUT_LAYER_EXT 0x322D -#define EGL_BAD_OUTPUT_PORT_EXT 0x322E -#define EGL_SWAP_INTERVAL_EXT 0x322F -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value); -typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value); -typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers); -EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports); -EGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value); -EGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value); -EGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); -#endif -#endif /* EGL_EXT_output_base */ - -#ifndef EGL_EXT_output_drm -#define EGL_EXT_output_drm 1 -#define EGL_DRM_CRTC_EXT 0x3234 -#define EGL_DRM_PLANE_EXT 0x3235 -#define EGL_DRM_CONNECTOR_EXT 0x3236 -#endif /* EGL_EXT_output_drm */ - -#ifndef EGL_EXT_output_openwf -#define EGL_EXT_output_openwf 1 -#define EGL_OPENWF_PIPELINE_ID_EXT 0x3238 -#define EGL_OPENWF_PORT_ID_EXT 0x3239 -#endif /* EGL_EXT_output_openwf */ - -#ifndef EGL_EXT_platform_base -#define EGL_EXT_platform_base 1 -typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list); -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); -#endif -#endif /* EGL_EXT_platform_base */ - -#ifndef EGL_EXT_platform_device -#define EGL_EXT_platform_device 1 -#define EGL_PLATFORM_DEVICE_EXT 0x313F -#endif /* EGL_EXT_platform_device */ - -#ifndef EGL_EXT_platform_wayland -#define EGL_EXT_platform_wayland 1 -#define EGL_PLATFORM_WAYLAND_EXT 0x31D8 -#endif /* EGL_EXT_platform_wayland */ - -#ifndef EGL_EXT_platform_x11 -#define EGL_EXT_platform_x11 1 -#define EGL_PLATFORM_X11_EXT 0x31D5 -#define EGL_PLATFORM_X11_SCREEN_EXT 0x31D6 -#endif /* EGL_EXT_platform_x11 */ - -#ifndef EGL_EXT_protected_surface -#define EGL_EXT_protected_surface 1 -#define EGL_PROTECTED_CONTENT_EXT 0x32C0 -#endif /* EGL_EXT_protected_surface */ - -#ifndef EGL_EXT_stream_consumer_egloutput -#define EGL_EXT_stream_consumer_egloutput 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer); -#endif -#endif /* EGL_EXT_stream_consumer_egloutput */ - -#ifndef EGL_EXT_swap_buffers_with_damage -#define EGL_EXT_swap_buffers_with_damage 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#endif -#endif /* EGL_EXT_swap_buffers_with_damage */ - -#ifndef EGL_EXT_yuv_surface -#define EGL_EXT_yuv_surface 1 -#define EGL_YUV_ORDER_EXT 0x3301 -#define EGL_YUV_NUMBER_OF_PLANES_EXT 0x3311 -#define EGL_YUV_SUBSAMPLE_EXT 0x3312 -#define EGL_YUV_DEPTH_RANGE_EXT 0x3317 -#define EGL_YUV_CSC_STANDARD_EXT 0x330A -#define EGL_YUV_PLANE_BPP_EXT 0x331A -#define EGL_YUV_BUFFER_EXT 0x3300 -#define EGL_YUV_ORDER_YUV_EXT 0x3302 -#define EGL_YUV_ORDER_YVU_EXT 0x3303 -#define EGL_YUV_ORDER_YUYV_EXT 0x3304 -#define EGL_YUV_ORDER_UYVY_EXT 0x3305 -#define EGL_YUV_ORDER_YVYU_EXT 0x3306 -#define EGL_YUV_ORDER_VYUY_EXT 0x3307 -#define EGL_YUV_ORDER_AYUV_EXT 0x3308 -#define EGL_YUV_SUBSAMPLE_4_2_0_EXT 0x3313 -#define EGL_YUV_SUBSAMPLE_4_2_2_EXT 0x3314 -#define EGL_YUV_SUBSAMPLE_4_4_4_EXT 0x3315 -#define EGL_YUV_DEPTH_RANGE_LIMITED_EXT 0x3318 -#define EGL_YUV_DEPTH_RANGE_FULL_EXT 0x3319 -#define EGL_YUV_CSC_STANDARD_601_EXT 0x330B -#define EGL_YUV_CSC_STANDARD_709_EXT 0x330C -#define EGL_YUV_CSC_STANDARD_2020_EXT 0x330D -#define EGL_YUV_PLANE_BPP_0_EXT 0x331B -#define EGL_YUV_PLANE_BPP_8_EXT 0x331C -#define EGL_YUV_PLANE_BPP_10_EXT 0x331D -#endif /* EGL_EXT_yuv_surface */ - -#ifndef EGL_HI_clientpixmap -#define EGL_HI_clientpixmap 1 -struct EGLClientPixmapHI { - void *pData; - EGLint iWidth; - EGLint iHeight; - EGLint iStride; -}; -#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap); -#endif -#endif /* EGL_HI_clientpixmap */ - -#ifndef EGL_HI_colorformats -#define EGL_HI_colorformats 1 -#define EGL_COLOR_FORMAT_HI 0x8F70 -#define EGL_COLOR_RGB_HI 0x8F71 -#define EGL_COLOR_RGBA_HI 0x8F72 -#define EGL_COLOR_ARGB_HI 0x8F73 -#endif /* EGL_HI_colorformats */ - -#ifndef EGL_IMG_context_priority -#define EGL_IMG_context_priority 1 -#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 -#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 -#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 -#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 -#endif /* EGL_IMG_context_priority */ - -#ifndef EGL_MESA_drm_image -#define EGL_MESA_drm_image 1 -#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 -#define EGL_DRM_BUFFER_USE_MESA 0x31D1 -#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 -#define EGL_DRM_BUFFER_MESA 0x31D3 -#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 -#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 -#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); -#endif -#endif /* EGL_MESA_drm_image */ - -#ifndef EGL_MESA_image_dma_buf_export -#define EGL_MESA_image_dma_buf_export 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers); -EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets); -#endif -#endif /* EGL_MESA_image_dma_buf_export */ - -#ifndef EGL_MESA_platform_gbm -#define EGL_MESA_platform_gbm 1 -#define EGL_PLATFORM_GBM_MESA 0x31D7 -#endif /* EGL_MESA_platform_gbm */ - -#ifndef EGL_NOK_swap_region -#define EGL_NOK_swap_region 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#endif -#endif /* EGL_NOK_swap_region */ - -#ifndef EGL_NOK_swap_region2 -#define EGL_NOK_swap_region2 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#endif -#endif /* EGL_NOK_swap_region2 */ - -#ifndef EGL_NOK_texture_from_pixmap -#define EGL_NOK_texture_from_pixmap 1 -#define EGL_Y_INVERTED_NOK 0x307F -#endif /* EGL_NOK_texture_from_pixmap */ - -#ifndef EGL_NV_3dvision_surface -#define EGL_NV_3dvision_surface 1 -#define EGL_AUTO_STEREO_NV 0x3136 -#endif /* EGL_NV_3dvision_surface */ - -#ifndef EGL_NV_coverage_sample -#define EGL_NV_coverage_sample 1 -#define EGL_COVERAGE_BUFFERS_NV 0x30E0 -#define EGL_COVERAGE_SAMPLES_NV 0x30E1 -#endif /* EGL_NV_coverage_sample */ - -#ifndef EGL_NV_coverage_sample_resolve -#define EGL_NV_coverage_sample_resolve 1 -#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131 -#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132 -#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133 -#endif /* EGL_NV_coverage_sample_resolve */ - -#ifndef EGL_NV_cuda_event -#define EGL_NV_cuda_event 1 -#define EGL_CUDA_EVENT_HANDLE_NV 0x323B -#define EGL_SYNC_CUDA_EVENT_NV 0x323C -#define EGL_SYNC_CUDA_EVENT_COMPLETE_NV 0x323D -#endif /* EGL_NV_cuda_event */ - -#ifndef EGL_NV_depth_nonlinear -#define EGL_NV_depth_nonlinear 1 -#define EGL_DEPTH_ENCODING_NV 0x30E2 -#define EGL_DEPTH_ENCODING_NONE_NV 0 -#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 -#endif /* EGL_NV_depth_nonlinear */ - -#ifndef EGL_NV_device_cuda -#define EGL_NV_device_cuda 1 -#define EGL_CUDA_DEVICE_NV 0x323A -#endif /* EGL_NV_device_cuda */ - -#ifndef EGL_NV_native_query -#define EGL_NV_native_query 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); -#endif -#endif /* EGL_NV_native_query */ - -#ifndef EGL_NV_post_convert_rounding -#define EGL_NV_post_convert_rounding 1 -#endif /* EGL_NV_post_convert_rounding */ - -#ifndef EGL_NV_post_sub_buffer -#define EGL_NV_post_sub_buffer 1 -#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE -typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); -#endif -#endif /* EGL_NV_post_sub_buffer */ - -#ifndef EGL_NV_stream_sync -#define EGL_NV_stream_sync 1 -#define EGL_SYNC_NEW_FRAME_NV 0x321F -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); -#endif -#endif /* EGL_NV_stream_sync */ - -#ifndef EGL_NV_sync -#define EGL_NV_sync 1 -typedef void *EGLSyncNV; -typedef khronos_utime_nanoseconds_t EGLTimeNV; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 -#define EGL_SYNC_STATUS_NV 0x30E7 -#define EGL_SIGNALED_NV 0x30E8 -#define EGL_UNSIGNALED_NV 0x30E9 -#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001 -#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull -#define EGL_ALREADY_SIGNALED_NV 0x30EA -#define EGL_TIMEOUT_EXPIRED_NV 0x30EB -#define EGL_CONDITION_SATISFIED_NV 0x30EC -#define EGL_SYNC_TYPE_NV 0x30ED -#define EGL_SYNC_CONDITION_NV 0x30EE -#define EGL_SYNC_FENCE_NV 0x30EF -#define EGL_NO_SYNC_NV ((EGLSyncNV)0) -typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync); -typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync); -EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_NV_sync */ - -#ifndef EGL_NV_system_time -#define EGL_NV_system_time 1 -typedef khronos_utime_nanoseconds_t EGLuint64NV; -#ifdef KHRONOS_SUPPORT_INT64 -typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void); -typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV (void); -EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_NV_system_time */ - -#ifndef EGL_TIZEN_image_native_buffer -#define EGL_TIZEN_image_native_buffer 1 -#define EGL_NATIVE_BUFFER_TIZEN 0x32A0 -#endif /* EGL_TIZEN_image_native_buffer */ - -#ifndef EGL_TIZEN_image_native_surface -#define EGL_TIZEN_image_native_surface 1 -#define EGL_NATIVE_SURFACE_TIZEN 0x32A1 -#endif /* EGL_TIZEN_image_native_surface */ - -#ifdef __cplusplus -} -#endif - -#endif /* __eglext_h_ */ - - -#endif /* _MSC_VER */ diff --git a/Dependencies/SDL/Windows/include/SDL_endian.h b/Dependencies/SDL/Windows/include/SDL_endian.h deleted file mode 100644 index 171c008..0000000 --- a/Dependencies/SDL/Windows/include/SDL_endian.h +++ /dev/null @@ -1,263 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_endian.h - * - * Functions for reading and writing endian-specific values - */ - -#ifndef SDL_endian_h_ -#define SDL_endian_h_ - -#include "SDL_stdinc.h" - -/** - * \name The two types of endianness - */ -/* @{ */ -#define SDL_LIL_ENDIAN 1234 -#define SDL_BIG_ENDIAN 4321 -/* @} */ - -#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */ -#ifdef __linux__ -#include -#define SDL_BYTEORDER __BYTE_ORDER -#elif defined(__OpenBSD__) -#include -#define SDL_BYTEORDER BYTE_ORDER -#else -#if defined(__hppa__) || \ - defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ - (defined(__MIPS__) && defined(__MIPSEB__)) || \ - defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \ - defined(__sparc__) -#define SDL_BYTEORDER SDL_BIG_ENDIAN -#else -#define SDL_BYTEORDER SDL_LIL_ENDIAN -#endif -#endif /* __linux__ */ -#endif /* !SDL_BYTEORDER */ - - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \file SDL_endian.h - */ -#if defined(__GNUC__) && defined(__i386__) && \ - !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */) -SDL_FORCE_INLINE Uint16 -SDL_Swap16(Uint16 x) -{ - __asm__("xchgb %b0,%h0": "=q"(x):"0"(x)); - return x; -} -#elif defined(__GNUC__) && defined(__x86_64__) -SDL_FORCE_INLINE Uint16 -SDL_Swap16(Uint16 x) -{ - __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x)); - return x; -} -#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) -SDL_FORCE_INLINE Uint16 -SDL_Swap16(Uint16 x) -{ - int result; - - __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x)); - return (Uint16)result; -} -#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__) -SDL_FORCE_INLINE Uint16 -SDL_Swap16(Uint16 x) -{ - __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc"); - return x; -} -#elif defined(__WATCOMC__) && defined(__386__) -extern _inline Uint16 SDL_Swap16(Uint16); -#pragma aux SDL_Swap16 = \ - "xchg al, ah" \ - parm [ax] \ - modify [ax]; -#else -SDL_FORCE_INLINE Uint16 -SDL_Swap16(Uint16 x) -{ - return SDL_static_cast(Uint16, ((x << 8) | (x >> 8))); -} -#endif - -#if defined(__GNUC__) && defined(__i386__) -SDL_FORCE_INLINE Uint32 -SDL_Swap32(Uint32 x) -{ - __asm__("bswap %0": "=r"(x):"0"(x)); - return x; -} -#elif defined(__GNUC__) && defined(__x86_64__) -SDL_FORCE_INLINE Uint32 -SDL_Swap32(Uint32 x) -{ - __asm__("bswapl %0": "=r"(x):"0"(x)); - return x; -} -#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) -SDL_FORCE_INLINE Uint32 -SDL_Swap32(Uint32 x) -{ - Uint32 result; - - __asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x)); - __asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x)); - __asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x)); - return result; -} -#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__) -SDL_FORCE_INLINE Uint32 -SDL_Swap32(Uint32 x) -{ - __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc"); - return x; -} -#elif defined(__WATCOMC__) && defined(__386__) -extern _inline Uint32 SDL_Swap32(Uint32); -#ifndef __SW_3 /* 486+ */ -#pragma aux SDL_Swap32 = \ - "bswap eax" \ - parm [eax] \ - modify [eax]; -#else /* 386-only */ -#pragma aux SDL_Swap32 = \ - "xchg al, ah" \ - "ror eax, 16" \ - "xchg al, ah" \ - parm [eax] \ - modify [eax]; -#endif -#else -SDL_FORCE_INLINE Uint32 -SDL_Swap32(Uint32 x) -{ - return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) | - ((x >> 8) & 0x0000FF00) | (x >> 24))); -} -#endif - -#if defined(__GNUC__) && defined(__i386__) -SDL_FORCE_INLINE Uint64 -SDL_Swap64(Uint64 x) -{ - union - { - struct - { - Uint32 a, b; - } s; - Uint64 u; - } v; - v.u = x; - __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a), - "1"(v.s. - b)); - return v.u; -} -#elif defined(__GNUC__) && defined(__x86_64__) -SDL_FORCE_INLINE Uint64 -SDL_Swap64(Uint64 x) -{ - __asm__("bswapq %0": "=r"(x):"0"(x)); - return x; -} -#else -SDL_FORCE_INLINE Uint64 -SDL_Swap64(Uint64 x) -{ - Uint32 hi, lo; - - /* Separate into high and low 32-bit values and swap them */ - lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF); - x >>= 32; - hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF); - x = SDL_Swap32(lo); - x <<= 32; - x |= SDL_Swap32(hi); - return (x); -} -#endif - - -SDL_FORCE_INLINE float -SDL_SwapFloat(float x) -{ - union - { - float f; - Uint32 ui32; - } swapper; - swapper.f = x; - swapper.ui32 = SDL_Swap32(swapper.ui32); - return swapper.f; -} - - -/** - * \name Swap to native - * Byteswap item from the specified endianness to the native endianness. - */ -/* @{ */ -#if SDL_BYTEORDER == SDL_LIL_ENDIAN -#define SDL_SwapLE16(X) (X) -#define SDL_SwapLE32(X) (X) -#define SDL_SwapLE64(X) (X) -#define SDL_SwapFloatLE(X) (X) -#define SDL_SwapBE16(X) SDL_Swap16(X) -#define SDL_SwapBE32(X) SDL_Swap32(X) -#define SDL_SwapBE64(X) SDL_Swap64(X) -#define SDL_SwapFloatBE(X) SDL_SwapFloat(X) -#else -#define SDL_SwapLE16(X) SDL_Swap16(X) -#define SDL_SwapLE32(X) SDL_Swap32(X) -#define SDL_SwapLE64(X) SDL_Swap64(X) -#define SDL_SwapFloatLE(X) SDL_SwapFloat(X) -#define SDL_SwapBE16(X) (X) -#define SDL_SwapBE32(X) (X) -#define SDL_SwapBE64(X) (X) -#define SDL_SwapFloatBE(X) (X) -#endif -/* @} *//* Swap to native */ - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_endian_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_error.h b/Dependencies/SDL/Windows/include/SDL_error.h deleted file mode 100644 index aae37c0..0000000 --- a/Dependencies/SDL/Windows/include/SDL_error.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_error.h - * - * Simple error message routines for SDL. - */ - -#ifndef SDL_error_h_ -#define SDL_error_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* Public functions */ -/* SDL_SetError() unconditionally returns -1. */ -extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); -extern DECLSPEC const char *SDLCALL SDL_GetError(void); -extern DECLSPEC void SDLCALL SDL_ClearError(void); - -/** - * \name Internal error functions - * - * \internal - * Private error reporting function - used internally. - */ -/* @{ */ -#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) -#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) -#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param)) -typedef enum -{ - SDL_ENOMEM, - SDL_EFREAD, - SDL_EFWRITE, - SDL_EFSEEK, - SDL_UNSUPPORTED, - SDL_LASTERROR -} SDL_errorcode; -/* SDL_Error() unconditionally returns -1. */ -extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code); -/* @} *//* Internal error functions */ - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_error_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_events.h b/Dependencies/SDL/Windows/include/SDL_events.h deleted file mode 100644 index 32cfbe3..0000000 --- a/Dependencies/SDL/Windows/include/SDL_events.h +++ /dev/null @@ -1,792 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_events.h - * - * Include file for SDL event handling. - */ - -#ifndef SDL_events_h_ -#define SDL_events_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_video.h" -#include "SDL_keyboard.h" -#include "SDL_mouse.h" -#include "SDL_joystick.h" -#include "SDL_gamecontroller.h" -#include "SDL_quit.h" -#include "SDL_gesture.h" -#include "SDL_touch.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* General keyboard/mouse state definitions */ -#define SDL_RELEASED 0 -#define SDL_PRESSED 1 - -/** - * \brief The types of events that can be delivered. - */ -typedef enum -{ - SDL_FIRSTEVENT = 0, /**< Unused (do not remove) */ - - /* Application events */ - SDL_QUIT = 0x100, /**< User-requested quit */ - - /* These application events have special meaning on iOS, see README-ios.md for details */ - SDL_APP_TERMINATING, /**< The application is being terminated by the OS - Called on iOS in applicationWillTerminate() - Called on Android in onDestroy() - */ - SDL_APP_LOWMEMORY, /**< The application is low on memory, free memory if possible. - Called on iOS in applicationDidReceiveMemoryWarning() - Called on Android in onLowMemory() - */ - SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background - Called on iOS in applicationWillResignActive() - Called on Android in onPause() - */ - SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time - Called on iOS in applicationDidEnterBackground() - Called on Android in onPause() - */ - SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground - Called on iOS in applicationWillEnterForeground() - Called on Android in onResume() - */ - SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive - Called on iOS in applicationDidBecomeActive() - Called on Android in onResume() - */ - - /* Display events */ - SDL_DISPLAYEVENT = 0x150, /**< Display state change */ - - /* Window events */ - SDL_WINDOWEVENT = 0x200, /**< Window state change */ - SDL_SYSWMEVENT, /**< System specific event */ - - /* Keyboard events */ - SDL_KEYDOWN = 0x300, /**< Key pressed */ - SDL_KEYUP, /**< Key released */ - SDL_TEXTEDITING, /**< Keyboard text editing (composition) */ - SDL_TEXTINPUT, /**< Keyboard text input */ - SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an - input language or keyboard layout change. - */ - - /* Mouse events */ - SDL_MOUSEMOTION = 0x400, /**< Mouse moved */ - SDL_MOUSEBUTTONDOWN, /**< Mouse button pressed */ - SDL_MOUSEBUTTONUP, /**< Mouse button released */ - SDL_MOUSEWHEEL, /**< Mouse wheel motion */ - - /* Joystick events */ - SDL_JOYAXISMOTION = 0x600, /**< Joystick axis motion */ - SDL_JOYBALLMOTION, /**< Joystick trackball motion */ - SDL_JOYHATMOTION, /**< Joystick hat position change */ - SDL_JOYBUTTONDOWN, /**< Joystick button pressed */ - SDL_JOYBUTTONUP, /**< Joystick button released */ - SDL_JOYDEVICEADDED, /**< A new joystick has been inserted into the system */ - SDL_JOYDEVICEREMOVED, /**< An opened joystick has been removed */ - - /* Game controller events */ - SDL_CONTROLLERAXISMOTION = 0x650, /**< Game controller axis motion */ - SDL_CONTROLLERBUTTONDOWN, /**< Game controller button pressed */ - SDL_CONTROLLERBUTTONUP, /**< Game controller button released */ - SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */ - SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */ - SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */ - - /* Touch events */ - SDL_FINGERDOWN = 0x700, - SDL_FINGERUP, - SDL_FINGERMOTION, - - /* Gesture events */ - SDL_DOLLARGESTURE = 0x800, - SDL_DOLLARRECORD, - SDL_MULTIGESTURE, - - /* Clipboard events */ - SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */ - - /* Drag and drop events */ - SDL_DROPFILE = 0x1000, /**< The system requests a file open */ - SDL_DROPTEXT, /**< text/plain drag-and-drop event */ - SDL_DROPBEGIN, /**< A new set of drops is beginning (NULL filename) */ - SDL_DROPCOMPLETE, /**< Current set of drops is now complete (NULL filename) */ - - /* Audio hotplug events */ - SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */ - SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */ - - /* Sensor events */ - SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */ - - /* Render events */ - SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */ - SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */ - - /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use, - * and should be allocated with SDL_RegisterEvents() - */ - SDL_USEREVENT = 0x8000, - - /** - * This last event is only for bounding internal arrays - */ - SDL_LASTEVENT = 0xFFFF -} SDL_EventType; - -/** - * \brief Fields shared by every event - */ -typedef struct SDL_CommonEvent -{ - Uint32 type; - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ -} SDL_CommonEvent; - -/** - * \brief Display state change event data (event.display.*) - */ -typedef struct SDL_DisplayEvent -{ - Uint32 type; /**< ::SDL_DISPLAYEVENT */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Uint32 display; /**< The associated display index */ - Uint8 event; /**< ::SDL_DisplayEventID */ - Uint8 padding1; - Uint8 padding2; - Uint8 padding3; - Sint32 data1; /**< event dependent data */ -} SDL_DisplayEvent; - -/** - * \brief Window state change event data (event.window.*) - */ -typedef struct SDL_WindowEvent -{ - Uint32 type; /**< ::SDL_WINDOWEVENT */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Uint32 windowID; /**< The associated window */ - Uint8 event; /**< ::SDL_WindowEventID */ - Uint8 padding1; - Uint8 padding2; - Uint8 padding3; - Sint32 data1; /**< event dependent data */ - Sint32 data2; /**< event dependent data */ -} SDL_WindowEvent; - -/** - * \brief Keyboard button event structure (event.key.*) - */ -typedef struct SDL_KeyboardEvent -{ - Uint32 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Uint32 windowID; /**< The window with keyboard focus, if any */ - Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ - Uint8 repeat; /**< Non-zero if this is a key repeat */ - Uint8 padding2; - Uint8 padding3; - SDL_Keysym keysym; /**< The key that was pressed or released */ -} SDL_KeyboardEvent; - -#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32) -/** - * \brief Keyboard text editing event structure (event.edit.*) - */ -typedef struct SDL_TextEditingEvent -{ - Uint32 type; /**< ::SDL_TEXTEDITING */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Uint32 windowID; /**< The window with keyboard focus, if any */ - char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; /**< The editing text */ - Sint32 start; /**< The start cursor of selected editing text */ - Sint32 length; /**< The length of selected editing text */ -} SDL_TextEditingEvent; - - -#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32) -/** - * \brief Keyboard text input event structure (event.text.*) - */ -typedef struct SDL_TextInputEvent -{ - Uint32 type; /**< ::SDL_TEXTINPUT */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Uint32 windowID; /**< The window with keyboard focus, if any */ - char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */ -} SDL_TextInputEvent; - -/** - * \brief Mouse motion event structure (event.motion.*) - */ -typedef struct SDL_MouseMotionEvent -{ - Uint32 type; /**< ::SDL_MOUSEMOTION */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Uint32 windowID; /**< The window with mouse focus, if any */ - Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */ - Uint32 state; /**< The current button state */ - Sint32 x; /**< X coordinate, relative to window */ - Sint32 y; /**< Y coordinate, relative to window */ - Sint32 xrel; /**< The relative motion in the X direction */ - Sint32 yrel; /**< The relative motion in the Y direction */ -} SDL_MouseMotionEvent; - -/** - * \brief Mouse button event structure (event.button.*) - */ -typedef struct SDL_MouseButtonEvent -{ - Uint32 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Uint32 windowID; /**< The window with mouse focus, if any */ - Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */ - Uint8 button; /**< The mouse button index */ - Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ - Uint8 clicks; /**< 1 for single-click, 2 for double-click, etc. */ - Uint8 padding1; - Sint32 x; /**< X coordinate, relative to window */ - Sint32 y; /**< Y coordinate, relative to window */ -} SDL_MouseButtonEvent; - -/** - * \brief Mouse wheel event structure (event.wheel.*) - */ -typedef struct SDL_MouseWheelEvent -{ - Uint32 type; /**< ::SDL_MOUSEWHEEL */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Uint32 windowID; /**< The window with mouse focus, if any */ - Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */ - Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */ - Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */ - Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */ -} SDL_MouseWheelEvent; - -/** - * \brief Joystick axis motion event structure (event.jaxis.*) - */ -typedef struct SDL_JoyAxisEvent -{ - Uint32 type; /**< ::SDL_JOYAXISMOTION */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - SDL_JoystickID which; /**< The joystick instance id */ - Uint8 axis; /**< The joystick axis index */ - Uint8 padding1; - Uint8 padding2; - Uint8 padding3; - Sint16 value; /**< The axis value (range: -32768 to 32767) */ - Uint16 padding4; -} SDL_JoyAxisEvent; - -/** - * \brief Joystick trackball motion event structure (event.jball.*) - */ -typedef struct SDL_JoyBallEvent -{ - Uint32 type; /**< ::SDL_JOYBALLMOTION */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - SDL_JoystickID which; /**< The joystick instance id */ - Uint8 ball; /**< The joystick trackball index */ - Uint8 padding1; - Uint8 padding2; - Uint8 padding3; - Sint16 xrel; /**< The relative motion in the X direction */ - Sint16 yrel; /**< The relative motion in the Y direction */ -} SDL_JoyBallEvent; - -/** - * \brief Joystick hat position change event structure (event.jhat.*) - */ -typedef struct SDL_JoyHatEvent -{ - Uint32 type; /**< ::SDL_JOYHATMOTION */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - SDL_JoystickID which; /**< The joystick instance id */ - Uint8 hat; /**< The joystick hat index */ - Uint8 value; /**< The hat position value. - * \sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP - * \sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT - * \sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN - * - * Note that zero means the POV is centered. - */ - Uint8 padding1; - Uint8 padding2; -} SDL_JoyHatEvent; - -/** - * \brief Joystick button event structure (event.jbutton.*) - */ -typedef struct SDL_JoyButtonEvent -{ - Uint32 type; /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - SDL_JoystickID which; /**< The joystick instance id */ - Uint8 button; /**< The joystick button index */ - Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ - Uint8 padding1; - Uint8 padding2; -} SDL_JoyButtonEvent; - -/** - * \brief Joystick device event structure (event.jdevice.*) - */ -typedef struct SDL_JoyDeviceEvent -{ - Uint32 type; /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */ -} SDL_JoyDeviceEvent; - - -/** - * \brief Game controller axis motion event structure (event.caxis.*) - */ -typedef struct SDL_ControllerAxisEvent -{ - Uint32 type; /**< ::SDL_CONTROLLERAXISMOTION */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - SDL_JoystickID which; /**< The joystick instance id */ - Uint8 axis; /**< The controller axis (SDL_GameControllerAxis) */ - Uint8 padding1; - Uint8 padding2; - Uint8 padding3; - Sint16 value; /**< The axis value (range: -32768 to 32767) */ - Uint16 padding4; -} SDL_ControllerAxisEvent; - - -/** - * \brief Game controller button event structure (event.cbutton.*) - */ -typedef struct SDL_ControllerButtonEvent -{ - Uint32 type; /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - SDL_JoystickID which; /**< The joystick instance id */ - Uint8 button; /**< The controller button (SDL_GameControllerButton) */ - Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ - Uint8 padding1; - Uint8 padding2; -} SDL_ControllerButtonEvent; - - -/** - * \brief Controller device event structure (event.cdevice.*) - */ -typedef struct SDL_ControllerDeviceEvent -{ - Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */ -} SDL_ControllerDeviceEvent; - -/** - * \brief Audio device event structure (event.adevice.*) - */ -typedef struct SDL_AudioDeviceEvent -{ - Uint32 type; /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Uint32 which; /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */ - Uint8 iscapture; /**< zero if an output device, non-zero if a capture device. */ - Uint8 padding1; - Uint8 padding2; - Uint8 padding3; -} SDL_AudioDeviceEvent; - - -/** - * \brief Touch finger event structure (event.tfinger.*) - */ -typedef struct SDL_TouchFingerEvent -{ - Uint32 type; /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - SDL_TouchID touchId; /**< The touch device id */ - SDL_FingerID fingerId; - float x; /**< Normalized in the range 0...1 */ - float y; /**< Normalized in the range 0...1 */ - float dx; /**< Normalized in the range -1...1 */ - float dy; /**< Normalized in the range -1...1 */ - float pressure; /**< Normalized in the range 0...1 */ - Uint32 windowID; /**< The window underneath the finger, if any */ -} SDL_TouchFingerEvent; - - -/** - * \brief Multiple Finger Gesture Event (event.mgesture.*) - */ -typedef struct SDL_MultiGestureEvent -{ - Uint32 type; /**< ::SDL_MULTIGESTURE */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - SDL_TouchID touchId; /**< The touch device id */ - float dTheta; - float dDist; - float x; - float y; - Uint16 numFingers; - Uint16 padding; -} SDL_MultiGestureEvent; - - -/** - * \brief Dollar Gesture Event (event.dgesture.*) - */ -typedef struct SDL_DollarGestureEvent -{ - Uint32 type; /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - SDL_TouchID touchId; /**< The touch device id */ - SDL_GestureID gestureId; - Uint32 numFingers; - float error; - float x; /**< Normalized center of gesture */ - float y; /**< Normalized center of gesture */ -} SDL_DollarGestureEvent; - - -/** - * \brief An event used to request a file open by the system (event.drop.*) - * This event is enabled by default, you can disable it with SDL_EventState(). - * \note If this event is enabled, you must free the filename in the event. - */ -typedef struct SDL_DropEvent -{ - Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */ - Uint32 windowID; /**< The window that was dropped on, if any */ -} SDL_DropEvent; - - -/** - * \brief Sensor event structure (event.sensor.*) - */ -typedef struct SDL_SensorEvent -{ - Uint32 type; /**< ::SDL_SENSORUPDATE */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Sint32 which; /**< The instance ID of the sensor */ - float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */ -} SDL_SensorEvent; - -/** - * \brief The "quit requested" event - */ -typedef struct SDL_QuitEvent -{ - Uint32 type; /**< ::SDL_QUIT */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ -} SDL_QuitEvent; - -/** - * \brief OS Specific event - */ -typedef struct SDL_OSEvent -{ - Uint32 type; /**< ::SDL_QUIT */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ -} SDL_OSEvent; - -/** - * \brief A user-defined event type (event.user.*) - */ -typedef struct SDL_UserEvent -{ - Uint32 type; /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - Uint32 windowID; /**< The associated window if any */ - Sint32 code; /**< User defined event code */ - void *data1; /**< User defined data pointer */ - void *data2; /**< User defined data pointer */ -} SDL_UserEvent; - - -struct SDL_SysWMmsg; -typedef struct SDL_SysWMmsg SDL_SysWMmsg; - -/** - * \brief A video driver dependent system event (event.syswm.*) - * This event is disabled by default, you can enable it with SDL_EventState() - * - * \note If you want to use this event, you should include SDL_syswm.h. - */ -typedef struct SDL_SysWMEvent -{ - Uint32 type; /**< ::SDL_SYSWMEVENT */ - Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ - SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */ -} SDL_SysWMEvent; - -/** - * \brief General event structure - */ -typedef union SDL_Event -{ - Uint32 type; /**< Event type, shared with all events */ - SDL_CommonEvent common; /**< Common event data */ - SDL_DisplayEvent display; /**< Display event data */ - SDL_WindowEvent window; /**< Window event data */ - SDL_KeyboardEvent key; /**< Keyboard event data */ - SDL_TextEditingEvent edit; /**< Text editing event data */ - SDL_TextInputEvent text; /**< Text input event data */ - SDL_MouseMotionEvent motion; /**< Mouse motion event data */ - SDL_MouseButtonEvent button; /**< Mouse button event data */ - SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */ - SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */ - SDL_JoyBallEvent jball; /**< Joystick ball event data */ - SDL_JoyHatEvent jhat; /**< Joystick hat event data */ - SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ - SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */ - SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */ - SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */ - SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */ - SDL_AudioDeviceEvent adevice; /**< Audio device event data */ - SDL_SensorEvent sensor; /**< Sensor event data */ - SDL_QuitEvent quit; /**< Quit request event data */ - SDL_UserEvent user; /**< Custom event data */ - SDL_SysWMEvent syswm; /**< System dependent window event data */ - SDL_TouchFingerEvent tfinger; /**< Touch finger event data */ - SDL_MultiGestureEvent mgesture; /**< Gesture event data */ - SDL_DollarGestureEvent dgesture; /**< Gesture event data */ - SDL_DropEvent drop; /**< Drag and drop event data */ - - /* This is necessary for ABI compatibility between Visual C++ and GCC - Visual C++ will respect the push pack pragma and use 52 bytes for - this structure, and GCC will use the alignment of the largest datatype - within the union, which is 8 bytes. - - So... we'll add padding to force the size to be 56 bytes for both. - */ - Uint8 padding[56]; -} SDL_Event; - -/* Make sure we haven't broken binary compatibility */ -SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == 56); - - -/* Function prototypes */ - -/** - * Pumps the event loop, gathering events from the input devices. - * - * This function updates the event queue and internal input device state. - * - * This should only be run in the thread that sets the video mode. - */ -extern DECLSPEC void SDLCALL SDL_PumpEvents(void); - -/* @{ */ -typedef enum -{ - SDL_ADDEVENT, - SDL_PEEKEVENT, - SDL_GETEVENT -} SDL_eventaction; - -/** - * Checks the event queue for messages and optionally returns them. - * - * If \c action is ::SDL_ADDEVENT, up to \c numevents events will be added to - * the back of the event queue. - * - * If \c action is ::SDL_PEEKEVENT, up to \c numevents events at the front - * of the event queue, within the specified minimum and maximum type, - * will be returned and will not be removed from the queue. - * - * If \c action is ::SDL_GETEVENT, up to \c numevents events at the front - * of the event queue, within the specified minimum and maximum type, - * will be returned and will be removed from the queue. - * - * \return The number of events actually stored, or -1 if there was an error. - * - * This function is thread-safe. - */ -extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents, - SDL_eventaction action, - Uint32 minType, Uint32 maxType); -/* @} */ - -/** - * Checks to see if certain event types are in the event queue. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type); -extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType); - -/** - * This function clears events from the event queue - * This function only affects currently queued events. If you want to make - * sure that all pending OS events are flushed, you can call SDL_PumpEvents() - * on the main thread immediately before the flush call. - */ -extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type); -extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType); - -/** - * \brief Polls for currently pending events. - * - * \return 1 if there are any pending events, or 0 if there are none available. - * - * \param event If not NULL, the next event is removed from the queue and - * stored in that area. - */ -extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event); - -/** - * \brief Waits indefinitely for the next available event. - * - * \return 1, or 0 if there was an error while waiting for events. - * - * \param event If not NULL, the next event is removed from the queue and - * stored in that area. - */ -extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event); - -/** - * \brief Waits until the specified timeout (in milliseconds) for the next - * available event. - * - * \return 1, or 0 if there was an error while waiting for events. - * - * \param event If not NULL, the next event is removed from the queue and - * stored in that area. - * \param timeout The timeout (in milliseconds) to wait for next event. - */ -extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event, - int timeout); - -/** - * \brief Add an event to the event queue. - * - * \return 1 on success, 0 if the event was filtered, or -1 if the event queue - * was full or there was some other error. - */ -extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event); - -typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event); - -/** - * Sets up a filter to process all events before they change internal state and - * are posted to the internal event queue. - * - * The filter is prototyped as: - * \code - * int SDL_EventFilter(void *userdata, SDL_Event * event); - * \endcode - * - * If the filter returns 1, then the event will be added to the internal queue. - * If it returns 0, then the event will be dropped from the queue, but the - * internal state will still be updated. This allows selective filtering of - * dynamically arriving events. - * - * \warning Be very careful of what you do in the event filter function, as - * it may run in a different thread! - * - * There is one caveat when dealing with the ::SDL_QuitEvent event type. The - * event filter is only called when the window manager desires to close the - * application window. If the event filter returns 1, then the window will - * be closed, otherwise the window will remain open if possible. - * - * If the quit event is generated by an interrupt signal, it will bypass the - * internal queue and be delivered to the application at the next event poll. - */ -extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter, - void *userdata); - -/** - * Return the current event filter - can be used to "chain" filters. - * If there is no event filter set, this function returns SDL_FALSE. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter, - void **userdata); - -/** - * Add a function which is called when an event is added to the queue. - */ -extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter, - void *userdata); - -/** - * Remove an event watch function added with SDL_AddEventWatch() - */ -extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter, - void *userdata); - -/** - * Run the filter function on the current event queue, removing any - * events for which the filter returns 0. - */ -extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter, - void *userdata); - -/* @{ */ -#define SDL_QUERY -1 -#define SDL_IGNORE 0 -#define SDL_DISABLE 0 -#define SDL_ENABLE 1 - -/** - * This function allows you to set the state of processing certain events. - * - If \c state is set to ::SDL_IGNORE, that event will be automatically - * dropped from the event queue and will not be filtered. - * - If \c state is set to ::SDL_ENABLE, that event will be processed - * normally. - * - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the - * current processing state of the specified event. - */ -extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state); -/* @} */ -#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY) - -/** - * This function allocates a set of user-defined events, and returns - * the beginning event number for that set of events. - * - * If there aren't enough user-defined events left, this function - * returns (Uint32)-1 - */ -extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_events_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_filesystem.h b/Dependencies/SDL/Windows/include/SDL_filesystem.h deleted file mode 100644 index 68042b6..0000000 --- a/Dependencies/SDL/Windows/include/SDL_filesystem.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_filesystem.h - * - * \brief Include file for filesystem SDL API functions - */ - -#ifndef SDL_filesystem_h_ -#define SDL_filesystem_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" - -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Get the path where the application resides. - * - * Get the "base path". This is the directory where the application was run - * from, which is probably the installation directory, and may or may not - * be the process's current working directory. - * - * This returns an absolute path in UTF-8 encoding, and is guaranteed to - * end with a path separator ('\\' on Windows, '/' most other places). - * - * The pointer returned by this function is owned by you. Please call - * SDL_free() on the pointer when you are done with it, or it will be a - * memory leak. This is not necessarily a fast call, though, so you should - * call this once near startup and save the string if you need it. - * - * Some platforms can't determine the application's path, and on other - * platforms, this might be meaningless. In such cases, this function will - * return NULL. - * - * \return String of base dir in UTF-8 encoding, or NULL on error. - * - * \sa SDL_GetPrefPath - */ -extern DECLSPEC char *SDLCALL SDL_GetBasePath(void); - -/** - * \brief Get the user-and-app-specific path where files can be written. - * - * Get the "pref dir". This is meant to be where users can write personal - * files (preferences and save games, etc) that are specific to your - * application. This directory is unique per user, per application. - * - * This function will decide the appropriate location in the native filesystem, - * create the directory if necessary, and return a string of the absolute - * path to the directory in UTF-8 encoding. - * - * On Windows, the string might look like: - * "C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\" - * - * On Linux, the string might look like: - * "/home/bob/.local/share/My Program Name/" - * - * On Mac OS X, the string might look like: - * "/Users/bob/Library/Application Support/My Program Name/" - * - * (etc.) - * - * You specify the name of your organization (if it's not a real organization, - * your name or an Internet domain you own might do) and the name of your - * application. These should be untranslated proper names. - * - * Both the org and app strings may become part of a directory name, so - * please follow these rules: - * - * - Try to use the same org string (including case-sensitivity) for - * all your applications that use this function. - * - Always use a unique app string for each one, and make sure it never - * changes for an app once you've decided on it. - * - Unicode characters are legal, as long as it's UTF-8 encoded, but... - * - ...only use letters, numbers, and spaces. Avoid punctuation like - * "Game Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient. - * - * This returns an absolute path in UTF-8 encoding, and is guaranteed to - * end with a path separator ('\\' on Windows, '/' most other places). - * - * The pointer returned by this function is owned by you. Please call - * SDL_free() on the pointer when you are done with it, or it will be a - * memory leak. This is not necessarily a fast call, though, so you should - * call this once near startup and save the string if you need it. - * - * You should assume the path returned by this function is the only safe - * place to write files (and that SDL_GetBasePath(), while it might be - * writable, or even the parent of the returned path, aren't where you - * should be writing things). - * - * Some platforms can't determine the pref path, and on other - * platforms, this might be meaningless. In such cases, this function will - * return NULL. - * - * \param org The name of your organization. - * \param app The name of your application. - * \return UTF-8 string of user dir in platform-dependent notation. NULL - * if there's a problem (creating directory failed, etc). - * - * \sa SDL_GetBasePath - */ -extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_filesystem_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_gamecontroller.h b/Dependencies/SDL/Windows/include/SDL_gamecontroller.h deleted file mode 100644 index 21cc1e4..0000000 --- a/Dependencies/SDL/Windows/include/SDL_gamecontroller.h +++ /dev/null @@ -1,420 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_gamecontroller.h - * - * Include file for SDL game controller event handling - */ - -#ifndef SDL_gamecontroller_h_ -#define SDL_gamecontroller_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_rwops.h" -#include "SDL_joystick.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \file SDL_gamecontroller.h - * - * In order to use these functions, SDL_Init() must have been called - * with the ::SDL_INIT_GAMECONTROLLER flag. This causes SDL to scan the system - * for game controllers, and load appropriate drivers. - * - * If you would like to receive controller updates while the application - * is in the background, you should set the following hint before calling - * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS - */ - -/** - * The gamecontroller structure used to identify an SDL game controller - */ -struct _SDL_GameController; -typedef struct _SDL_GameController SDL_GameController; - -typedef enum -{ - SDL_CONTROLLER_TYPE_UNKNOWN = 0, - SDL_CONTROLLER_TYPE_XBOX360, - SDL_CONTROLLER_TYPE_XBOXONE, - SDL_CONTROLLER_TYPE_PS3, - SDL_CONTROLLER_TYPE_PS4, - SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO -} SDL_GameControllerType; - -typedef enum -{ - SDL_CONTROLLER_BINDTYPE_NONE = 0, - SDL_CONTROLLER_BINDTYPE_BUTTON, - SDL_CONTROLLER_BINDTYPE_AXIS, - SDL_CONTROLLER_BINDTYPE_HAT -} SDL_GameControllerBindType; - -/** - * Get the SDL joystick layer binding for this controller button/axis mapping - */ -typedef struct SDL_GameControllerButtonBind -{ - SDL_GameControllerBindType bindType; - union - { - int button; - int axis; - struct { - int hat; - int hat_mask; - } hat; - } value; - -} SDL_GameControllerButtonBind; - - -/** - * To count the number of game controllers in the system for the following: - * int nJoysticks = SDL_NumJoysticks(); - * int nGameControllers = 0; - * for (int i = 0; i < nJoysticks; i++) { - * if (SDL_IsGameController(i)) { - * nGameControllers++; - * } - * } - * - * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is: - * guid,name,mappings - * - * Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones. - * Under Windows there is a reserved GUID of "xinput" that covers any XInput devices. - * The mapping format for joystick is: - * bX - a joystick button, index X - * hX.Y - hat X with value Y - * aX - axis X of the joystick - * Buttons can be used as a controller axis and vice versa. - * - * This string shows an example of a valid mapping for a controller - * "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7", - * - */ - -/** - * Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform() - * A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt - * - * If \c freerw is non-zero, the stream will be closed after being read. - * - * \return number of mappings added, -1 on error - */ -extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw); - -/** - * Load a set of mappings from a file, filtered by the current SDL_GetPlatform() - * - * Convenience macro. - */ -#define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1) - -/** - * Add or update an existing mapping configuration - * - * \return 1 if mapping is added, 0 if updated, -1 on error - */ -extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString); - -/** - * Get the number of mappings installed - * - * \return the number of mappings - */ -extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void); - -/** - * Get the mapping at a particular index. - * - * \return the mapping string. Must be freed with SDL_free(). Returns NULL if the index is out of range. - */ -extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index); - -/** - * Get a mapping string for a GUID - * - * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available - */ -extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid); - -/** - * Get a mapping string for an open GameController - * - * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available - */ -extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController * gamecontroller); - -/** - * Is the joystick on this index supported by the game controller interface? - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index); - -/** - * Get the implementation dependent name of a game controller. - * This can be called before any controllers are opened. - * If no name can be found, this function returns NULL. - */ -extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index); - -/** - * Get the type of a game controller. - * This can be called before any controllers are opened. - */ -extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index); - -/** - * Get the mapping of a game controller. - * This can be called before any controllers are opened. - * - * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available - */ -extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index); - -/** - * Open a game controller for use. - * The index passed as an argument refers to the N'th game controller on the system. - * This index is not the value which will identify this controller in future - * controller events. The joystick's instance id (::SDL_JoystickID) will be - * used there instead. - * - * \return A controller identifier, or NULL if an error occurred. - */ -extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index); - -/** - * Return the SDL_GameController associated with an instance id. - */ -extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid); - -/** - * Return the SDL_GameController associated with a player index. - */ -extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index); - -/** - * Return the name for this currently opened controller - */ -extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller); - -/** - * Return the type of this currently opened controller - */ -extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller); - -/** - * Get the player index of an opened game controller, or -1 if it's not available - * - * For XInput controllers this returns the XInput user index. - */ -extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller); - -/** - * Set the player index of an opened game controller - */ -extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index); - -/** - * Get the USB vendor ID of an opened controller, if available. - * If the vendor ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController * gamecontroller); - -/** - * Get the USB product ID of an opened controller, if available. - * If the product ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * gamecontroller); - -/** - * Get the product version of an opened controller, if available. - * If the product version isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController * gamecontroller); - -/** - * Returns SDL_TRUE if the controller has been opened and currently connected, - * or SDL_FALSE if it has not. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller); - -/** - * Get the underlying joystick object used by a controller - */ -extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller); - -/** - * Enable/disable controller event polling. - * - * If controller events are disabled, you must call SDL_GameControllerUpdate() - * yourself and check the state of the controller when you want controller - * information. - * - * The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE. - */ -extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state); - -/** - * Update the current state of the open game controllers. - * - * This is called automatically by the event loop if any game controller - * events are enabled. - */ -extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void); - - -/** - * The list of axes available from a controller - * - * Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX, - * and are centered within ~8000 of zero, though advanced UI will allow users to set - * or autodetect the dead zone, which varies between controllers. - * - * Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX. - */ -typedef enum -{ - SDL_CONTROLLER_AXIS_INVALID = -1, - SDL_CONTROLLER_AXIS_LEFTX, - SDL_CONTROLLER_AXIS_LEFTY, - SDL_CONTROLLER_AXIS_RIGHTX, - SDL_CONTROLLER_AXIS_RIGHTY, - SDL_CONTROLLER_AXIS_TRIGGERLEFT, - SDL_CONTROLLER_AXIS_TRIGGERRIGHT, - SDL_CONTROLLER_AXIS_MAX -} SDL_GameControllerAxis; - -/** - * turn this string into a axis mapping - */ -extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString); - -/** - * turn this axis enum into a string mapping - */ -extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis); - -/** - * Get the SDL joystick layer binding for this controller button mapping - */ -extern DECLSPEC SDL_GameControllerButtonBind SDLCALL -SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, - SDL_GameControllerAxis axis); - -/** - * Get the current state of an axis control on a game controller. - * - * The state is a value ranging from -32768 to 32767 (except for the triggers, - * which range from 0 to 32767). - * - * The axis indices start at index 0. - */ -extern DECLSPEC Sint16 SDLCALL -SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, - SDL_GameControllerAxis axis); - -/** - * The list of buttons available from a controller - */ -typedef enum -{ - SDL_CONTROLLER_BUTTON_INVALID = -1, - SDL_CONTROLLER_BUTTON_A, - SDL_CONTROLLER_BUTTON_B, - SDL_CONTROLLER_BUTTON_X, - SDL_CONTROLLER_BUTTON_Y, - SDL_CONTROLLER_BUTTON_BACK, - SDL_CONTROLLER_BUTTON_GUIDE, - SDL_CONTROLLER_BUTTON_START, - SDL_CONTROLLER_BUTTON_LEFTSTICK, - SDL_CONTROLLER_BUTTON_RIGHTSTICK, - SDL_CONTROLLER_BUTTON_LEFTSHOULDER, - SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, - SDL_CONTROLLER_BUTTON_DPAD_UP, - SDL_CONTROLLER_BUTTON_DPAD_DOWN, - SDL_CONTROLLER_BUTTON_DPAD_LEFT, - SDL_CONTROLLER_BUTTON_DPAD_RIGHT, - SDL_CONTROLLER_BUTTON_MAX -} SDL_GameControllerButton; - -/** - * turn this string into a button mapping - */ -extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *pchString); - -/** - * turn this button enum into a string mapping - */ -extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button); - -/** - * Get the SDL joystick layer binding for this controller button mapping - */ -extern DECLSPEC SDL_GameControllerButtonBind SDLCALL -SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, - SDL_GameControllerButton button); - - -/** - * Get the current state of a button on a game controller. - * - * The button indices start at index 0. - */ -extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller, - SDL_GameControllerButton button); - -/** - * Trigger a rumble effect - * Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling. - * - * \param gamecontroller The controller to vibrate - * \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF - * \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF - * \param duration_ms The duration of the rumble effect, in milliseconds - * - * \return 0, or -1 if rumble isn't supported on this joystick - */ -extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); - -/** - * Close a controller previously opened with SDL_GameControllerOpen(). - */ -extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_gamecontroller_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_gesture.h b/Dependencies/SDL/Windows/include/SDL_gesture.h deleted file mode 100644 index 81ed431..0000000 --- a/Dependencies/SDL/Windows/include/SDL_gesture.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_gesture.h - * - * Include file for SDL gesture event handling. - */ - -#ifndef SDL_gesture_h_ -#define SDL_gesture_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_video.h" - -#include "SDL_touch.h" - - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -typedef Sint64 SDL_GestureID; - -/* Function prototypes */ - -/** - * \brief Begin Recording a gesture on the specified touch, or all touches (-1) - * - * - */ -extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId); - - -/** - * \brief Save all currently loaded Dollar Gesture templates - * - * - */ -extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst); - -/** - * \brief Save a currently loaded Dollar Gesture template - * - * - */ -extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst); - - -/** - * \brief Load Dollar Gesture templates from a file - * - * - */ -extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_gesture_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_haptic.h b/Dependencies/SDL/Windows/include/SDL_haptic.h deleted file mode 100644 index aa6f47f..0000000 --- a/Dependencies/SDL/Windows/include/SDL_haptic.h +++ /dev/null @@ -1,1238 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_haptic.h - * - * \brief The SDL haptic subsystem allows you to control haptic (force feedback) - * devices. - * - * The basic usage is as follows: - * - Initialize the subsystem (::SDL_INIT_HAPTIC). - * - Open a haptic device. - * - SDL_HapticOpen() to open from index. - * - SDL_HapticOpenFromJoystick() to open from an existing joystick. - * - Create an effect (::SDL_HapticEffect). - * - Upload the effect with SDL_HapticNewEffect(). - * - Run the effect with SDL_HapticRunEffect(). - * - (optional) Free the effect with SDL_HapticDestroyEffect(). - * - Close the haptic device with SDL_HapticClose(). - * - * \par Simple rumble example: - * \code - * SDL_Haptic *haptic; - * - * // Open the device - * haptic = SDL_HapticOpen( 0 ); - * if (haptic == NULL) - * return -1; - * - * // Initialize simple rumble - * if (SDL_HapticRumbleInit( haptic ) != 0) - * return -1; - * - * // Play effect at 50% strength for 2 seconds - * if (SDL_HapticRumblePlay( haptic, 0.5, 2000 ) != 0) - * return -1; - * SDL_Delay( 2000 ); - * - * // Clean up - * SDL_HapticClose( haptic ); - * \endcode - * - * \par Complete example: - * \code - * int test_haptic( SDL_Joystick * joystick ) { - * SDL_Haptic *haptic; - * SDL_HapticEffect effect; - * int effect_id; - * - * // Open the device - * haptic = SDL_HapticOpenFromJoystick( joystick ); - * if (haptic == NULL) return -1; // Most likely joystick isn't haptic - * - * // See if it can do sine waves - * if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) { - * SDL_HapticClose(haptic); // No sine effect - * return -1; - * } - * - * // Create the effect - * memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default - * effect.type = SDL_HAPTIC_SINE; - * effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates - * effect.periodic.direction.dir[0] = 18000; // Force comes from south - * effect.periodic.period = 1000; // 1000 ms - * effect.periodic.magnitude = 20000; // 20000/32767 strength - * effect.periodic.length = 5000; // 5 seconds long - * effect.periodic.attack_length = 1000; // Takes 1 second to get max strength - * effect.periodic.fade_length = 1000; // Takes 1 second to fade away - * - * // Upload the effect - * effect_id = SDL_HapticNewEffect( haptic, &effect ); - * - * // Test the effect - * SDL_HapticRunEffect( haptic, effect_id, 1 ); - * SDL_Delay( 5000); // Wait for the effect to finish - * - * // We destroy the effect, although closing the device also does this - * SDL_HapticDestroyEffect( haptic, effect_id ); - * - * // Close the device - * SDL_HapticClose(haptic); - * - * return 0; // Success - * } - * \endcode - */ - -#ifndef SDL_haptic_h_ -#define SDL_haptic_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_joystick.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF). - * - * At the moment the magnitude variables are mixed between signed/unsigned, and - * it is also not made clear that ALL of those variables expect a max of 0x7FFF. - * - * Some platforms may have higher precision than that (Linux FF, Windows XInput) - * so we should fix the inconsistency in favor of higher possible precision, - * adjusting for platforms that use different scales. - * -flibit - */ - -/** - * \typedef SDL_Haptic - * - * \brief The haptic structure used to identify an SDL haptic. - * - * \sa SDL_HapticOpen - * \sa SDL_HapticOpenFromJoystick - * \sa SDL_HapticClose - */ -struct _SDL_Haptic; -typedef struct _SDL_Haptic SDL_Haptic; - - -/** - * \name Haptic features - * - * Different haptic features a device can have. - */ -/* @{ */ - -/** - * \name Haptic effects - */ -/* @{ */ - -/** - * \brief Constant effect supported. - * - * Constant haptic effect. - * - * \sa SDL_HapticCondition - */ -#define SDL_HAPTIC_CONSTANT (1u<<0) - -/** - * \brief Sine wave effect supported. - * - * Periodic haptic effect that simulates sine waves. - * - * \sa SDL_HapticPeriodic - */ -#define SDL_HAPTIC_SINE (1u<<1) - -/** - * \brief Left/Right effect supported. - * - * Haptic effect for direct control over high/low frequency motors. - * - * \sa SDL_HapticLeftRight - * \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry, - * we ran out of bits, and this is important for XInput devices. - */ -#define SDL_HAPTIC_LEFTRIGHT (1u<<2) - -/* !!! FIXME: put this back when we have more bits in 2.1 */ -/* #define SDL_HAPTIC_SQUARE (1<<2) */ - -/** - * \brief Triangle wave effect supported. - * - * Periodic haptic effect that simulates triangular waves. - * - * \sa SDL_HapticPeriodic - */ -#define SDL_HAPTIC_TRIANGLE (1u<<3) - -/** - * \brief Sawtoothup wave effect supported. - * - * Periodic haptic effect that simulates saw tooth up waves. - * - * \sa SDL_HapticPeriodic - */ -#define SDL_HAPTIC_SAWTOOTHUP (1u<<4) - -/** - * \brief Sawtoothdown wave effect supported. - * - * Periodic haptic effect that simulates saw tooth down waves. - * - * \sa SDL_HapticPeriodic - */ -#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5) - -/** - * \brief Ramp effect supported. - * - * Ramp haptic effect. - * - * \sa SDL_HapticRamp - */ -#define SDL_HAPTIC_RAMP (1u<<6) - -/** - * \brief Spring effect supported - uses axes position. - * - * Condition haptic effect that simulates a spring. Effect is based on the - * axes position. - * - * \sa SDL_HapticCondition - */ -#define SDL_HAPTIC_SPRING (1u<<7) - -/** - * \brief Damper effect supported - uses axes velocity. - * - * Condition haptic effect that simulates dampening. Effect is based on the - * axes velocity. - * - * \sa SDL_HapticCondition - */ -#define SDL_HAPTIC_DAMPER (1u<<8) - -/** - * \brief Inertia effect supported - uses axes acceleration. - * - * Condition haptic effect that simulates inertia. Effect is based on the axes - * acceleration. - * - * \sa SDL_HapticCondition - */ -#define SDL_HAPTIC_INERTIA (1u<<9) - -/** - * \brief Friction effect supported - uses axes movement. - * - * Condition haptic effect that simulates friction. Effect is based on the - * axes movement. - * - * \sa SDL_HapticCondition - */ -#define SDL_HAPTIC_FRICTION (1u<<10) - -/** - * \brief Custom effect is supported. - * - * User defined custom haptic effect. - */ -#define SDL_HAPTIC_CUSTOM (1u<<11) - -/* @} *//* Haptic effects */ - -/* These last few are features the device has, not effects */ - -/** - * \brief Device can set global gain. - * - * Device supports setting the global gain. - * - * \sa SDL_HapticSetGain - */ -#define SDL_HAPTIC_GAIN (1u<<12) - -/** - * \brief Device can set autocenter. - * - * Device supports setting autocenter. - * - * \sa SDL_HapticSetAutocenter - */ -#define SDL_HAPTIC_AUTOCENTER (1u<<13) - -/** - * \brief Device can be queried for effect status. - * - * Device supports querying effect status. - * - * \sa SDL_HapticGetEffectStatus - */ -#define SDL_HAPTIC_STATUS (1u<<14) - -/** - * \brief Device can be paused. - * - * Devices supports being paused. - * - * \sa SDL_HapticPause - * \sa SDL_HapticUnpause - */ -#define SDL_HAPTIC_PAUSE (1u<<15) - - -/** - * \name Direction encodings - */ -/* @{ */ - -/** - * \brief Uses polar coordinates for the direction. - * - * \sa SDL_HapticDirection - */ -#define SDL_HAPTIC_POLAR 0 - -/** - * \brief Uses cartesian coordinates for the direction. - * - * \sa SDL_HapticDirection - */ -#define SDL_HAPTIC_CARTESIAN 1 - -/** - * \brief Uses spherical coordinates for the direction. - * - * \sa SDL_HapticDirection - */ -#define SDL_HAPTIC_SPHERICAL 2 - -/* @} *//* Direction encodings */ - -/* @} *//* Haptic features */ - -/* - * Misc defines. - */ - -/** - * \brief Used to play a device an infinite number of times. - * - * \sa SDL_HapticRunEffect - */ -#define SDL_HAPTIC_INFINITY 4294967295U - - -/** - * \brief Structure that represents a haptic direction. - * - * This is the direction where the force comes from, - * instead of the direction in which the force is exerted. - * - * Directions can be specified by: - * - ::SDL_HAPTIC_POLAR : Specified by polar coordinates. - * - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates. - * - ::SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates. - * - * Cardinal directions of the haptic device are relative to the positioning - * of the device. North is considered to be away from the user. - * - * The following diagram represents the cardinal directions: - * \verbatim - .--. - |__| .-------. - |=.| |.-----.| - |--| || || - | | |'-----'| - |__|~')_____(' - [ COMPUTER ] - - - North (0,-1) - ^ - | - | - (-1,0) West <----[ HAPTIC ]----> East (1,0) - | - | - v - South (0,1) - - - [ USER ] - \|||/ - (o o) - ---ooO-(_)-Ooo--- - \endverbatim - * - * If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a - * degree starting north and turning clockwise. ::SDL_HAPTIC_POLAR only uses - * the first \c dir parameter. The cardinal directions would be: - * - North: 0 (0 degrees) - * - East: 9000 (90 degrees) - * - South: 18000 (180 degrees) - * - West: 27000 (270 degrees) - * - * If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions - * (X axis, Y axis and Z axis (with 3 axes)). ::SDL_HAPTIC_CARTESIAN uses - * the first three \c dir parameters. The cardinal directions would be: - * - North: 0,-1, 0 - * - East: 1, 0, 0 - * - South: 0, 1, 0 - * - West: -1, 0, 0 - * - * The Z axis represents the height of the effect if supported, otherwise - * it's unused. In cartesian encoding (1, 2) would be the same as (2, 4), you - * can use any multiple you want, only the direction matters. - * - * If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations. - * The first two \c dir parameters are used. The \c dir parameters are as - * follows (all values are in hundredths of degrees): - * - Degrees from (1, 0) rotated towards (0, 1). - * - Degrees towards (0, 0, 1) (device needs at least 3 axes). - * - * - * Example of force coming from the south with all encodings (force coming - * from the south means the user will have to pull the stick to counteract): - * \code - * SDL_HapticDirection direction; - * - * // Cartesian directions - * direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding. - * direction.dir[0] = 0; // X position - * direction.dir[1] = 1; // Y position - * // Assuming the device has 2 axes, we don't need to specify third parameter. - * - * // Polar directions - * direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding. - * direction.dir[0] = 18000; // Polar only uses first parameter - * - * // Spherical coordinates - * direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding - * direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters. - * \endcode - * - * \sa SDL_HAPTIC_POLAR - * \sa SDL_HAPTIC_CARTESIAN - * \sa SDL_HAPTIC_SPHERICAL - * \sa SDL_HapticEffect - * \sa SDL_HapticNumAxes - */ -typedef struct SDL_HapticDirection -{ - Uint8 type; /**< The type of encoding. */ - Sint32 dir[3]; /**< The encoded direction. */ -} SDL_HapticDirection; - - -/** - * \brief A structure containing a template for a Constant effect. - * - * This struct is exclusively for the ::SDL_HAPTIC_CONSTANT effect. - * - * A constant effect applies a constant force in the specified direction - * to the joystick. - * - * \sa SDL_HAPTIC_CONSTANT - * \sa SDL_HapticEffect - */ -typedef struct SDL_HapticConstant -{ - /* Header */ - Uint16 type; /**< ::SDL_HAPTIC_CONSTANT */ - SDL_HapticDirection direction; /**< Direction of the effect. */ - - /* Replay */ - Uint32 length; /**< Duration of the effect. */ - Uint16 delay; /**< Delay before starting the effect. */ - - /* Trigger */ - Uint16 button; /**< Button that triggers the effect. */ - Uint16 interval; /**< How soon it can be triggered again after button. */ - - /* Constant */ - Sint16 level; /**< Strength of the constant effect. */ - - /* Envelope */ - Uint16 attack_length; /**< Duration of the attack. */ - Uint16 attack_level; /**< Level at the start of the attack. */ - Uint16 fade_length; /**< Duration of the fade. */ - Uint16 fade_level; /**< Level at the end of the fade. */ -} SDL_HapticConstant; - -/** - * \brief A structure containing a template for a Periodic effect. - * - * The struct handles the following effects: - * - ::SDL_HAPTIC_SINE - * - ::SDL_HAPTIC_LEFTRIGHT - * - ::SDL_HAPTIC_TRIANGLE - * - ::SDL_HAPTIC_SAWTOOTHUP - * - ::SDL_HAPTIC_SAWTOOTHDOWN - * - * A periodic effect consists in a wave-shaped effect that repeats itself - * over time. The type determines the shape of the wave and the parameters - * determine the dimensions of the wave. - * - * Phase is given by hundredth of a degree meaning that giving the phase a value - * of 9000 will displace it 25% of its period. Here are sample values: - * - 0: No phase displacement. - * - 9000: Displaced 25% of its period. - * - 18000: Displaced 50% of its period. - * - 27000: Displaced 75% of its period. - * - 36000: Displaced 100% of its period, same as 0, but 0 is preferred. - * - * Examples: - * \verbatim - SDL_HAPTIC_SINE - __ __ __ __ - / \ / \ / \ / - / \__/ \__/ \__/ - - SDL_HAPTIC_SQUARE - __ __ __ __ __ - | | | | | | | | | | - | |__| |__| |__| |__| | - - SDL_HAPTIC_TRIANGLE - /\ /\ /\ /\ /\ - / \ / \ / \ / \ / - / \/ \/ \/ \/ - - SDL_HAPTIC_SAWTOOTHUP - /| /| /| /| /| /| /| - / | / | / | / | / | / | / | - / |/ |/ |/ |/ |/ |/ | - - SDL_HAPTIC_SAWTOOTHDOWN - \ |\ |\ |\ |\ |\ |\ | - \ | \ | \ | \ | \ | \ | \ | - \| \| \| \| \| \| \| - \endverbatim - * - * \sa SDL_HAPTIC_SINE - * \sa SDL_HAPTIC_LEFTRIGHT - * \sa SDL_HAPTIC_TRIANGLE - * \sa SDL_HAPTIC_SAWTOOTHUP - * \sa SDL_HAPTIC_SAWTOOTHDOWN - * \sa SDL_HapticEffect - */ -typedef struct SDL_HapticPeriodic -{ - /* Header */ - Uint16 type; /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT, - ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or - ::SDL_HAPTIC_SAWTOOTHDOWN */ - SDL_HapticDirection direction; /**< Direction of the effect. */ - - /* Replay */ - Uint32 length; /**< Duration of the effect. */ - Uint16 delay; /**< Delay before starting the effect. */ - - /* Trigger */ - Uint16 button; /**< Button that triggers the effect. */ - Uint16 interval; /**< How soon it can be triggered again after button. */ - - /* Periodic */ - Uint16 period; /**< Period of the wave. */ - Sint16 magnitude; /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */ - Sint16 offset; /**< Mean value of the wave. */ - Uint16 phase; /**< Positive phase shift given by hundredth of a degree. */ - - /* Envelope */ - Uint16 attack_length; /**< Duration of the attack. */ - Uint16 attack_level; /**< Level at the start of the attack. */ - Uint16 fade_length; /**< Duration of the fade. */ - Uint16 fade_level; /**< Level at the end of the fade. */ -} SDL_HapticPeriodic; - -/** - * \brief A structure containing a template for a Condition effect. - * - * The struct handles the following effects: - * - ::SDL_HAPTIC_SPRING: Effect based on axes position. - * - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity. - * - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration. - * - ::SDL_HAPTIC_FRICTION: Effect based on axes movement. - * - * Direction is handled by condition internals instead of a direction member. - * The condition effect specific members have three parameters. The first - * refers to the X axis, the second refers to the Y axis and the third - * refers to the Z axis. The right terms refer to the positive side of the - * axis and the left terms refer to the negative side of the axis. Please - * refer to the ::SDL_HapticDirection diagram for which side is positive and - * which is negative. - * - * \sa SDL_HapticDirection - * \sa SDL_HAPTIC_SPRING - * \sa SDL_HAPTIC_DAMPER - * \sa SDL_HAPTIC_INERTIA - * \sa SDL_HAPTIC_FRICTION - * \sa SDL_HapticEffect - */ -typedef struct SDL_HapticCondition -{ - /* Header */ - Uint16 type; /**< ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER, - ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION */ - SDL_HapticDirection direction; /**< Direction of the effect - Not used ATM. */ - - /* Replay */ - Uint32 length; /**< Duration of the effect. */ - Uint16 delay; /**< Delay before starting the effect. */ - - /* Trigger */ - Uint16 button; /**< Button that triggers the effect. */ - Uint16 interval; /**< How soon it can be triggered again after button. */ - - /* Condition */ - Uint16 right_sat[3]; /**< Level when joystick is to the positive side; max 0xFFFF. */ - Uint16 left_sat[3]; /**< Level when joystick is to the negative side; max 0xFFFF. */ - Sint16 right_coeff[3]; /**< How fast to increase the force towards the positive side. */ - Sint16 left_coeff[3]; /**< How fast to increase the force towards the negative side. */ - Uint16 deadband[3]; /**< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. */ - Sint16 center[3]; /**< Position of the dead zone. */ -} SDL_HapticCondition; - -/** - * \brief A structure containing a template for a Ramp effect. - * - * This struct is exclusively for the ::SDL_HAPTIC_RAMP effect. - * - * The ramp effect starts at start strength and ends at end strength. - * It augments in linear fashion. If you use attack and fade with a ramp - * the effects get added to the ramp effect making the effect become - * quadratic instead of linear. - * - * \sa SDL_HAPTIC_RAMP - * \sa SDL_HapticEffect - */ -typedef struct SDL_HapticRamp -{ - /* Header */ - Uint16 type; /**< ::SDL_HAPTIC_RAMP */ - SDL_HapticDirection direction; /**< Direction of the effect. */ - - /* Replay */ - Uint32 length; /**< Duration of the effect. */ - Uint16 delay; /**< Delay before starting the effect. */ - - /* Trigger */ - Uint16 button; /**< Button that triggers the effect. */ - Uint16 interval; /**< How soon it can be triggered again after button. */ - - /* Ramp */ - Sint16 start; /**< Beginning strength level. */ - Sint16 end; /**< Ending strength level. */ - - /* Envelope */ - Uint16 attack_length; /**< Duration of the attack. */ - Uint16 attack_level; /**< Level at the start of the attack. */ - Uint16 fade_length; /**< Duration of the fade. */ - Uint16 fade_level; /**< Level at the end of the fade. */ -} SDL_HapticRamp; - -/** - * \brief A structure containing a template for a Left/Right effect. - * - * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect. - * - * The Left/Right effect is used to explicitly control the large and small - * motors, commonly found in modern game controllers. The small (right) motor - * is high frequency, and the large (left) motor is low frequency. - * - * \sa SDL_HAPTIC_LEFTRIGHT - * \sa SDL_HapticEffect - */ -typedef struct SDL_HapticLeftRight -{ - /* Header */ - Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */ - - /* Replay */ - Uint32 length; /**< Duration of the effect in milliseconds. */ - - /* Rumble */ - Uint16 large_magnitude; /**< Control of the large controller motor. */ - Uint16 small_magnitude; /**< Control of the small controller motor. */ -} SDL_HapticLeftRight; - -/** - * \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect. - * - * This struct is exclusively for the ::SDL_HAPTIC_CUSTOM effect. - * - * A custom force feedback effect is much like a periodic effect, where the - * application can define its exact shape. You will have to allocate the - * data yourself. Data should consist of channels * samples Uint16 samples. - * - * If channels is one, the effect is rotated using the defined direction. - * Otherwise it uses the samples in data for the different axes. - * - * \sa SDL_HAPTIC_CUSTOM - * \sa SDL_HapticEffect - */ -typedef struct SDL_HapticCustom -{ - /* Header */ - Uint16 type; /**< ::SDL_HAPTIC_CUSTOM */ - SDL_HapticDirection direction; /**< Direction of the effect. */ - - /* Replay */ - Uint32 length; /**< Duration of the effect. */ - Uint16 delay; /**< Delay before starting the effect. */ - - /* Trigger */ - Uint16 button; /**< Button that triggers the effect. */ - Uint16 interval; /**< How soon it can be triggered again after button. */ - - /* Custom */ - Uint8 channels; /**< Axes to use, minimum of one. */ - Uint16 period; /**< Sample periods. */ - Uint16 samples; /**< Amount of samples. */ - Uint16 *data; /**< Should contain channels*samples items. */ - - /* Envelope */ - Uint16 attack_length; /**< Duration of the attack. */ - Uint16 attack_level; /**< Level at the start of the attack. */ - Uint16 fade_length; /**< Duration of the fade. */ - Uint16 fade_level; /**< Level at the end of the fade. */ -} SDL_HapticCustom; - -/** - * \brief The generic template for any haptic effect. - * - * All values max at 32767 (0x7FFF). Signed values also can be negative. - * Time values unless specified otherwise are in milliseconds. - * - * You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767 - * value. Neither delay, interval, attack_length nor fade_length support - * ::SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends. - * - * Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of - * ::SDL_HAPTIC_INFINITY. - * - * Button triggers may not be supported on all devices, it is advised to not - * use them if possible. Buttons start at index 1 instead of index 0 like - * the joystick. - * - * If both attack_length and fade_level are 0, the envelope is not used, - * otherwise both values are used. - * - * Common parts: - * \code - * // Replay - All effects have this - * Uint32 length; // Duration of effect (ms). - * Uint16 delay; // Delay before starting effect. - * - * // Trigger - All effects have this - * Uint16 button; // Button that triggers effect. - * Uint16 interval; // How soon before effect can be triggered again. - * - * // Envelope - All effects except condition effects have this - * Uint16 attack_length; // Duration of the attack (ms). - * Uint16 attack_level; // Level at the start of the attack. - * Uint16 fade_length; // Duration of the fade out (ms). - * Uint16 fade_level; // Level at the end of the fade. - * \endcode - * - * - * Here we have an example of a constant effect evolution in time: - * \verbatim - Strength - ^ - | - | effect level --> _________________ - | / \ - | / \ - | / \ - | / \ - | attack_level --> | \ - | | | <--- fade_level - | - +--------------------------------------------------> Time - [--] [---] - attack_length fade_length - - [------------------][-----------------------] - delay length - \endverbatim - * - * Note either the attack_level or the fade_level may be above the actual - * effect level. - * - * \sa SDL_HapticConstant - * \sa SDL_HapticPeriodic - * \sa SDL_HapticCondition - * \sa SDL_HapticRamp - * \sa SDL_HapticLeftRight - * \sa SDL_HapticCustom - */ -typedef union SDL_HapticEffect -{ - /* Common for all force feedback effects */ - Uint16 type; /**< Effect type. */ - SDL_HapticConstant constant; /**< Constant effect. */ - SDL_HapticPeriodic periodic; /**< Periodic effect. */ - SDL_HapticCondition condition; /**< Condition effect. */ - SDL_HapticRamp ramp; /**< Ramp effect. */ - SDL_HapticLeftRight leftright; /**< Left/Right effect. */ - SDL_HapticCustom custom; /**< Custom effect. */ -} SDL_HapticEffect; - - -/* Function prototypes */ -/** - * \brief Count the number of haptic devices attached to the system. - * - * \return Number of haptic devices detected on the system. - */ -extern DECLSPEC int SDLCALL SDL_NumHaptics(void); - -/** - * \brief Get the implementation dependent name of a haptic device. - * - * This can be called before any joysticks are opened. - * If no name can be found, this function returns NULL. - * - * \param device_index Index of the device to get its name. - * \return Name of the device or NULL on error. - * - * \sa SDL_NumHaptics - */ -extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index); - -/** - * \brief Opens a haptic device for use. - * - * The index passed as an argument refers to the N'th haptic device on this - * system. - * - * When opening a haptic device, its gain will be set to maximum and - * autocenter will be disabled. To modify these values use - * SDL_HapticSetGain() and SDL_HapticSetAutocenter(). - * - * \param device_index Index of the device to open. - * \return Device identifier or NULL on error. - * - * \sa SDL_HapticIndex - * \sa SDL_HapticOpenFromMouse - * \sa SDL_HapticOpenFromJoystick - * \sa SDL_HapticClose - * \sa SDL_HapticSetGain - * \sa SDL_HapticSetAutocenter - * \sa SDL_HapticPause - * \sa SDL_HapticStopAll - */ -extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index); - -/** - * \brief Checks if the haptic device at index has been opened. - * - * \param device_index Index to check to see if it has been opened. - * \return 1 if it has been opened or 0 if it hasn't. - * - * \sa SDL_HapticOpen - * \sa SDL_HapticIndex - */ -extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index); - -/** - * \brief Gets the index of a haptic device. - * - * \param haptic Haptic device to get the index of. - * \return The index of the haptic device or -1 on error. - * - * \sa SDL_HapticOpen - * \sa SDL_HapticOpened - */ -extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic); - -/** - * \brief Gets whether or not the current mouse has haptic capabilities. - * - * \return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't. - * - * \sa SDL_HapticOpenFromMouse - */ -extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void); - -/** - * \brief Tries to open a haptic device from the current mouse. - * - * \return The haptic device identifier or NULL on error. - * - * \sa SDL_MouseIsHaptic - * \sa SDL_HapticOpen - */ -extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void); - -/** - * \brief Checks to see if a joystick has haptic features. - * - * \param joystick Joystick to test for haptic capabilities. - * \return SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't - * or -1 if an error occurred. - * - * \sa SDL_HapticOpenFromJoystick - */ -extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick); - -/** - * \brief Opens a haptic device for use from a joystick device. - * - * You must still close the haptic device separately. It will not be closed - * with the joystick. - * - * When opening from a joystick you should first close the haptic device before - * closing the joystick device. If not, on some implementations the haptic - * device will also get unallocated and you'll be unable to use force feedback - * on that device. - * - * \param joystick Joystick to create a haptic device from. - * \return A valid haptic device identifier on success or NULL on error. - * - * \sa SDL_HapticOpen - * \sa SDL_HapticClose - */ -extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick * - joystick); - -/** - * \brief Closes a haptic device previously opened with SDL_HapticOpen(). - * - * \param haptic Haptic device to close. - */ -extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic); - -/** - * \brief Returns the number of effects a haptic device can store. - * - * On some platforms this isn't fully supported, and therefore is an - * approximation. Always check to see if your created effect was actually - * created and do not rely solely on SDL_HapticNumEffects(). - * - * \param haptic The haptic device to query effect max. - * \return The number of effects the haptic device can store or - * -1 on error. - * - * \sa SDL_HapticNumEffectsPlaying - * \sa SDL_HapticQuery - */ -extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic); - -/** - * \brief Returns the number of effects a haptic device can play at the same - * time. - * - * This is not supported on all platforms, but will always return a value. - * Added here for the sake of completeness. - * - * \param haptic The haptic device to query maximum playing effects. - * \return The number of effects the haptic device can play at the same time - * or -1 on error. - * - * \sa SDL_HapticNumEffects - * \sa SDL_HapticQuery - */ -extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic); - -/** - * \brief Gets the haptic device's supported features in bitwise manner. - * - * Example: - * \code - * if (SDL_HapticQuery(haptic) & SDL_HAPTIC_CONSTANT) { - * printf("We have constant haptic effect!\n"); - * } - * \endcode - * - * \param haptic The haptic device to query. - * \return Haptic features in bitwise manner (OR'd). - * - * \sa SDL_HapticNumEffects - * \sa SDL_HapticEffectSupported - */ -extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic); - - -/** - * \brief Gets the number of haptic axes the device has. - * - * \sa SDL_HapticDirection - */ -extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic); - -/** - * \brief Checks to see if effect is supported by haptic. - * - * \param haptic Haptic device to check on. - * \param effect Effect to check to see if it is supported. - * \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error. - * - * \sa SDL_HapticQuery - * \sa SDL_HapticNewEffect - */ -extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic, - SDL_HapticEffect * - effect); - -/** - * \brief Creates a new haptic effect on the device. - * - * \param haptic Haptic device to create the effect on. - * \param effect Properties of the effect to create. - * \return The identifier of the effect on success or -1 on error. - * - * \sa SDL_HapticUpdateEffect - * \sa SDL_HapticRunEffect - * \sa SDL_HapticDestroyEffect - */ -extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic, - SDL_HapticEffect * effect); - -/** - * \brief Updates the properties of an effect. - * - * Can be used dynamically, although behavior when dynamically changing - * direction may be strange. Specifically the effect may reupload itself - * and start playing from the start. You cannot change the type either when - * running SDL_HapticUpdateEffect(). - * - * \param haptic Haptic device that has the effect. - * \param effect Identifier of the effect to update. - * \param data New effect properties to use. - * \return 0 on success or -1 on error. - * - * \sa SDL_HapticNewEffect - * \sa SDL_HapticRunEffect - * \sa SDL_HapticDestroyEffect - */ -extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic, - int effect, - SDL_HapticEffect * data); - -/** - * \brief Runs the haptic effect on its associated haptic device. - * - * If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over - * repeating the envelope (attack and fade) every time. If you only want the - * effect to last forever, set ::SDL_HAPTIC_INFINITY in the effect's length - * parameter. - * - * \param haptic Haptic device to run the effect on. - * \param effect Identifier of the haptic effect to run. - * \param iterations Number of iterations to run the effect. Use - * ::SDL_HAPTIC_INFINITY for infinity. - * \return 0 on success or -1 on error. - * - * \sa SDL_HapticStopEffect - * \sa SDL_HapticDestroyEffect - * \sa SDL_HapticGetEffectStatus - */ -extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic, - int effect, - Uint32 iterations); - -/** - * \brief Stops the haptic effect on its associated haptic device. - * - * \param haptic Haptic device to stop the effect on. - * \param effect Identifier of the effect to stop. - * \return 0 on success or -1 on error. - * - * \sa SDL_HapticRunEffect - * \sa SDL_HapticDestroyEffect - */ -extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic, - int effect); - -/** - * \brief Destroys a haptic effect on the device. - * - * This will stop the effect if it's running. Effects are automatically - * destroyed when the device is closed. - * - * \param haptic Device to destroy the effect on. - * \param effect Identifier of the effect to destroy. - * - * \sa SDL_HapticNewEffect - */ -extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic, - int effect); - -/** - * \brief Gets the status of the current effect on the haptic device. - * - * Device must support the ::SDL_HAPTIC_STATUS feature. - * - * \param haptic Haptic device to query the effect status on. - * \param effect Identifier of the effect to query its status. - * \return 0 if it isn't playing, 1 if it is playing or -1 on error. - * - * \sa SDL_HapticRunEffect - * \sa SDL_HapticStopEffect - */ -extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic, - int effect); - -/** - * \brief Sets the global gain of the device. - * - * Device must support the ::SDL_HAPTIC_GAIN feature. - * - * The user may specify the maximum gain by setting the environment variable - * SDL_HAPTIC_GAIN_MAX which should be between 0 and 100. All calls to - * SDL_HapticSetGain() will scale linearly using SDL_HAPTIC_GAIN_MAX as the - * maximum. - * - * \param haptic Haptic device to set the gain on. - * \param gain Value to set the gain to, should be between 0 and 100. - * \return 0 on success or -1 on error. - * - * \sa SDL_HapticQuery - */ -extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain); - -/** - * \brief Sets the global autocenter of the device. - * - * Autocenter should be between 0 and 100. Setting it to 0 will disable - * autocentering. - * - * Device must support the ::SDL_HAPTIC_AUTOCENTER feature. - * - * \param haptic Haptic device to set autocentering on. - * \param autocenter Value to set autocenter to, 0 disables autocentering. - * \return 0 on success or -1 on error. - * - * \sa SDL_HapticQuery - */ -extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic, - int autocenter); - -/** - * \brief Pauses a haptic device. - * - * Device must support the ::SDL_HAPTIC_PAUSE feature. Call - * SDL_HapticUnpause() to resume playback. - * - * Do not modify the effects nor add new ones while the device is paused. - * That can cause all sorts of weird errors. - * - * \param haptic Haptic device to pause. - * \return 0 on success or -1 on error. - * - * \sa SDL_HapticUnpause - */ -extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic); - -/** - * \brief Unpauses a haptic device. - * - * Call to unpause after SDL_HapticPause(). - * - * \param haptic Haptic device to unpause. - * \return 0 on success or -1 on error. - * - * \sa SDL_HapticPause - */ -extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic); - -/** - * \brief Stops all the currently playing effects on a haptic device. - * - * \param haptic Haptic device to stop. - * \return 0 on success or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic); - -/** - * \brief Checks to see if rumble is supported on a haptic device. - * - * \param haptic Haptic device to check to see if it supports rumble. - * \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error. - * - * \sa SDL_HapticRumbleInit - * \sa SDL_HapticRumblePlay - * \sa SDL_HapticRumbleStop - */ -extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic); - -/** - * \brief Initializes the haptic device for simple rumble playback. - * - * \param haptic Haptic device to initialize for simple rumble playback. - * \return 0 on success or -1 on error. - * - * \sa SDL_HapticOpen - * \sa SDL_HapticRumbleSupported - * \sa SDL_HapticRumblePlay - * \sa SDL_HapticRumbleStop - */ -extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic); - -/** - * \brief Runs simple rumble on a haptic device - * - * \param haptic Haptic device to play rumble effect on. - * \param strength Strength of the rumble to play as a 0-1 float value. - * \param length Length of the rumble to play in milliseconds. - * \return 0 on success or -1 on error. - * - * \sa SDL_HapticRumbleSupported - * \sa SDL_HapticRumbleInit - * \sa SDL_HapticRumbleStop - */ -extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length ); - -/** - * \brief Stops the simple rumble on a haptic device. - * - * \param haptic Haptic to stop the rumble on. - * \return 0 on success or -1 on error. - * - * \sa SDL_HapticRumbleSupported - * \sa SDL_HapticRumbleInit - * \sa SDL_HapticRumblePlay - */ -extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_haptic_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_hints.h b/Dependencies/SDL/Windows/include/SDL_hints.h deleted file mode 100644 index a3a5373..0000000 --- a/Dependencies/SDL/Windows/include/SDL_hints.h +++ /dev/null @@ -1,1364 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_hints.h - * - * Official documentation for SDL configuration variables - * - * This file contains functions to set and get configuration hints, - * as well as listing each of them alphabetically. - * - * The convention for naming hints is SDL_HINT_X, where "SDL_X" is - * the environment variable that can be used to override the default. - * - * In general these hints are just that - they may or may not be - * supported or applicable on any given platform, but they provide - * a way for an application or user to give the library a hint as - * to how they would like the library to work. - */ - -#ifndef SDL_hints_h_ -#define SDL_hints_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface. - * - * SDL can try to accelerate the SDL screen surface by using streaming - * textures with a 3D rendering engine. This variable controls whether and - * how this is done. - * - * This variable can be set to the following values: - * "0" - Disable 3D acceleration - * "1" - Enable 3D acceleration, using the default renderer. - * "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.) - * - * By default SDL tries to make a best guess for each platform whether - * to use acceleration or not. - */ -#define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION" - -/** - * \brief A variable specifying which render driver to use. - * - * If the application doesn't pick a specific renderer to use, this variable - * specifies the name of the preferred renderer. If the preferred renderer - * can't be initialized, the normal default renderer is used. - * - * This variable is case insensitive and can be set to the following values: - * "direct3d" - * "opengl" - * "opengles2" - * "opengles" - * "metal" - * "software" - * - * The default varies by platform, but it's the first one in the list that - * is available on the current platform. - */ -#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER" - -/** - * \brief A variable controlling whether the OpenGL render driver uses shaders if they are available. - * - * This variable can be set to the following values: - * "0" - Disable shaders - * "1" - Enable shaders - * - * By default shaders are used if OpenGL supports them. - */ -#define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS" - -/** - * \brief A variable controlling whether the Direct3D device is initialized for thread-safe operations. - * - * This variable can be set to the following values: - * "0" - Thread-safety is not enabled (faster) - * "1" - Thread-safety is enabled - * - * By default the Direct3D device is created with thread-safety disabled. - */ -#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE" - -/** - * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer. - * - * This variable does not have any effect on the Direct3D 9 based renderer. - * - * This variable can be set to the following values: - * "0" - Disable Debug Layer use - * "1" - Enable Debug Layer use - * - * By default, SDL does not use Direct3D Debug Layer. - */ -#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG" - -/** - * \brief A variable controlling the scaling policy for SDL_RenderSetLogicalSize. - * - * This variable can be set to the following values: - * "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen - * "1" or "overscan" - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen - * - * By default letterbox is used - */ -#define SDL_HINT_RENDER_LOGICAL_SIZE_MODE "SDL_RENDER_LOGICAL_SIZE_MODE" - -/** - * \brief A variable controlling the scaling quality - * - * This variable can be set to the following values: - * "0" or "nearest" - Nearest pixel sampling - * "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D) - * "2" or "best" - Currently this is the same as "linear" - * - * By default nearest pixel sampling is used - */ -#define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY" - -/** - * \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing. - * - * This variable can be set to the following values: - * "0" - Disable vsync - * "1" - Enable vsync - * - * By default SDL does not sync screen surface updates with vertical refresh. - */ -#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC" - -/** - * \brief A variable controlling whether the screensaver is enabled. - * - * This variable can be set to the following values: - * "0" - Disable screensaver - * "1" - Enable screensaver - * - * By default SDL will disable the screensaver. - */ -#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER" - -/** - * \brief A variable controlling whether the graphics context is externally managed. - * - * This variable can be set to the following values: - * "0" - SDL will manage graphics contexts that are attached to windows. - * "1" - Disable graphics context management on windows. - * - * By default SDL will manage OpenGL contexts in certain situations. For example, on Android the - * context will be automatically saved and restored when pausing the application. Additionally, some - * platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this - * behavior, which is desireable when the application manages the graphics context, such as - * an externally managed OpenGL context or attaching a Vulkan surface to the window. - */ -#define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT" - -/** - * \brief A variable controlling whether the X11 VidMode extension should be used. - * - * This variable can be set to the following values: - * "0" - Disable XVidMode - * "1" - Enable XVidMode - * - * By default SDL will use XVidMode if it is available. - */ -#define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE" - -/** - * \brief A variable controlling whether the X11 Xinerama extension should be used. - * - * This variable can be set to the following values: - * "0" - Disable Xinerama - * "1" - Enable Xinerama - * - * By default SDL will use Xinerama if it is available. - */ -#define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA" - -/** - * \brief A variable controlling whether the X11 XRandR extension should be used. - * - * This variable can be set to the following values: - * "0" - Disable XRandR - * "1" - Enable XRandR - * - * By default SDL will not use XRandR because of window manager issues. - */ -#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR" - -/** - * \brief A variable forcing the visual ID chosen for new X11 windows - * - */ -#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID" - -/** - * \brief A variable controlling whether the X11 _NET_WM_PING protocol should be supported. - * - * This variable can be set to the following values: - * "0" - Disable _NET_WM_PING - * "1" - Enable _NET_WM_PING - * - * By default SDL will use _NET_WM_PING, but for applications that know they - * will not always be able to respond to ping requests in a timely manner they can - * turn it off to avoid the window manager thinking the app is hung. - * The hint is checked in CreateWindow. - */ -#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING" - -/** - * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used. - * - * This variable can be set to the following values: - * "0" - Disable _NET_WM_BYPASS_COMPOSITOR - * "1" - Enable _NET_WM_BYPASS_COMPOSITOR - * - * By default SDL will use _NET_WM_BYPASS_COMPOSITOR - * - */ -#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" - -/** - * \brief A variable controlling whether X11 should use GLX or EGL by default - * - * This variable can be set to the following values: - * "0" - Use GLX - * "1" - Use EGL - * - * By default SDL will use GLX when both are present. - */ -#define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL" - -/** - * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden - * - * This variable can be set to the following values: - * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc) - * "1" - The window frame is interactive when the cursor is hidden - * - * By default SDL will allow interaction with the window frame when the cursor is hidden - */ -#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN" - -/** - * \brief A variable to specify custom icon resource id from RC file on Windows platform - */ -#define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON" -#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL" - -/** - * \brief A variable controlling whether the windows message loop is processed by SDL - * - * This variable can be set to the following values: - * "0" - The window message loop is not run - * "1" - The window message loop is processed in SDL_PumpEvents() - * - * By default SDL will process the windows message loop - */ -#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP" - -/** - * \brief A variable controlling whether grabbing input grabs the keyboard - * - * This variable can be set to the following values: - * "0" - Grab will affect only the mouse - * "1" - Grab will affect mouse and keyboard - * - * By default SDL will not grab the keyboard so system shortcuts still work. - */ -#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD" - -/** - * \brief A variable setting the double click time, in milliseconds. - */ -#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME" - -/** - * \brief A variable setting the double click radius, in pixels. - */ -#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS" - -/** - * \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode - */ -#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE" - -/** - * \brief A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode - */ -#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE" - -/** - * \brief A variable controlling whether relative mouse mode is implemented using mouse warping - * - * This variable can be set to the following values: - * "0" - Relative mouse mode uses raw input - * "1" - Relative mouse mode uses mouse warping - * - * By default SDL will use raw input for relative mouse mode - */ -#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP" - -/** - * \brief Allow mouse click events when clicking to focus an SDL window - * - * This variable can be set to the following values: - * "0" - Ignore mouse clicks that activate a window - * "1" - Generate events for mouse clicks that activate a window - * - * By default SDL will ignore mouse clicks that activate a window - */ -#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH" - -/** - * \brief A variable controlling whether touch events should generate synthetic mouse events - * - * This variable can be set to the following values: - * "0" - Touch events will not generate mouse events - * "1" - Touch events will generate mouse events - * - * By default SDL will generate mouse events for touch events - */ -#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS" - -/** - * \brief A variable controlling whether mouse events should generate synthetic touch events - * - * This variable can be set to the following values: - * "0" - Mouse events will not generate touch events (default for desktop platforms) - * "1" - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS) - */ - -#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS" - -/** - * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true. - * - */ -#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS" - -/** - * \brief A variable controlling whether the idle timer is disabled on iOS. - * - * When an iOS app does not receive touches for some time, the screen is - * dimmed automatically. For games where the accelerometer is the only input - * this is problematic. This functionality can be disabled by setting this - * hint. - * - * As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver() - * accomplish the same thing on iOS. They should be preferred over this hint. - * - * This variable can be set to the following values: - * "0" - Enable idle timer - * "1" - Disable idle timer - */ -#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED" - -/** - * \brief A variable controlling which orientations are allowed on iOS/Android. - * - * In some circumstances it is necessary to be able to explicitly control - * which UI orientations are allowed. - * - * This variable is a space delimited list of the following values: - * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown" - */ -#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS" - -/** - * \brief A variable controlling whether controllers used with the Apple TV - * generate UI events. - * - * When UI events are generated by controller input, the app will be - * backgrounded when the Apple TV remote's menu button is pressed, and when the - * pause or B buttons on gamepads are pressed. - * - * More information about properly making use of controllers for the Apple TV - * can be found here: - * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/ - * - * This variable can be set to the following values: - * "0" - Controller input does not generate UI events (the default). - * "1" - Controller input generates UI events. - */ -#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS" - -/** - * \brief A variable controlling whether the Apple TV remote's joystick axes - * will automatically match the rotation of the remote. - * - * This variable can be set to the following values: - * "0" - Remote orientation does not affect joystick axes (the default). - * "1" - Joystick axes are based on the orientation of the remote. - */ -#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION" - -/** - * \brief A variable controlling whether the home indicator bar on iPhone X - * should be hidden. - * - * This variable can be set to the following values: - * "0" - The indicator bar is not hidden (default for windowed applications) - * "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications) - * "2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications) - */ -#define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR" - -/** - * \brief A variable controlling whether the Android / iOS built-in - * accelerometer should be listed as a joystick device. - * - * This variable can be set to the following values: - * "0" - The accelerometer is not listed as a joystick - * "1" - The accelerometer is available as a 3 axis joystick (the default). - */ -#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK" - -/** - * \brief A variable controlling whether the Android / tvOS remotes - * should be listed as joystick devices, instead of sending keyboard events. - * - * This variable can be set to the following values: - * "0" - Remotes send enter/escape/arrow key events - * "1" - Remotes are available as 2 axis, 2 button joysticks (the default). - */ -#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK" - -/** - * \brief A variable that lets you disable the detection and use of Xinput gamepad devices - * - * The variable can be set to the following values: - * "0" - Disable XInput detection (only uses direct input) - * "1" - Enable XInput detection (the default) - */ -#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED" - -/** - * \brief A variable that causes SDL to use the old axis and button mapping for XInput devices. - * - * This hint is for backwards compatibility only and will be removed in SDL 2.1 - * - * The default value is "0". This hint must be set before SDL_Init() - */ -#define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING" - -/** - * \brief A variable that overrides the automatic controller type detection - * - * The variable should be comma separated entries, in the form: VID/PID=type - * - * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd - * - * The type should be one of: - * Xbox360 - * XboxOne - * PS3 - * PS4 - * SwitchPro - * - * This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) - */ -#define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE" - -/** - * \brief A variable that lets you manually hint extra gamecontroller db entries. - * - * The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h - * - * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) - * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping() - */ -#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG" - -/** - * \brief A variable that lets you provide a file with extra gamecontroller db entries. - * - * The file should contain lines of gamecontroller config data, see SDL_gamecontroller.h - * - * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) - * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping() - */ -#define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE" - -/** - * \brief A variable containing a list of devices to skip when scanning for game controllers. - * - * The format of the string is a comma separated list of USB VID/PID pairs - * in hexadecimal form, e.g. - * - * 0xAAAA/0xBBBB,0xCCCC/0xDDDD - * - * The variable can also take the form of @file, in which case the named - * file will be loaded and interpreted as the value of the variable. - */ -#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES" - -/** - * \brief If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable. - * - * The format of the string is a comma separated list of USB VID/PID pairs - * in hexadecimal form, e.g. - * - * 0xAAAA/0xBBBB,0xCCCC/0xDDDD - * - * The variable can also take the form of @file, in which case the named - * file will be loaded and interpreted as the value of the variable. - */ -#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT" - -/** - * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout. - * - * For example, on Nintendo Switch controllers, normally you'd get: - * - * (Y) - * (X) (B) - * (A) - * - * but if this hint is set, you'll get: - * - * (X) - * (Y) (A) - * (B) - * - * The variable can be set to the following values: - * "0" - Report the face buttons by position, as though they were on an Xbox controller. - * "1" - Report the face buttons by label instead of position - * - * The default value is "1". This hint may be set at any time. - */ -#define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS" - -/** - * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background. - * - * The variable can be set to the following values: - * "0" - Disable joystick & gamecontroller input events when the - * application is in the background. - * "1" - Enable joystick & gamecontroller input events when the - * application is in the background. - * - * The default value is "0". This hint may be set at any time. - */ -#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS" - -/** - * \brief A variable controlling whether the HIDAPI joystick drivers should be used. - * - * This variable can be set to the following values: - * "0" - HIDAPI drivers are not used - * "1" - HIDAPI drivers are used (the default) - * - * This variable is the default for all drivers, but can be overridden by the hints for specific drivers below. - */ -#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI" - -/** - * \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used. - * - * This variable can be set to the following values: - * "0" - HIDAPI driver is not used - * "1" - HIDAPI driver is used - * - * The default is the value of SDL_HINT_JOYSTICK_HIDAPI - */ -#define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4" - -/** - * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver. - * - * This variable can be set to the following values: - * "0" - extended reports are not enabled (the default) - * "1" - extended reports - * - * Extended input reports allow rumble on Bluetooth PS4 controllers, but - * break DirectInput handling for applications that don't use SDL. - * - * Once extended reports are enabled, they can not be disabled without - * power cycling the controller. - */ -#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE" - -/** - * \brief A variable controlling whether the HIDAPI driver for Steam Controllers should be used. - * - * This variable can be set to the following values: - * "0" - HIDAPI driver is not used - * "1" - HIDAPI driver is used - * - * The default is the value of SDL_HINT_JOYSTICK_HIDAPI - */ -#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM" - -/** - * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used. - * - * This variable can be set to the following values: - * "0" - HIDAPI driver is not used - * "1" - HIDAPI driver is used - * - * The default is the value of SDL_HINT_JOYSTICK_HIDAPI - */ -#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH" - -/** - * \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used. - * - * This variable can be set to the following values: - * "0" - HIDAPI driver is not used - * "1" - HIDAPI driver is used - * - * The default is the value of SDL_HINT_JOYSTICK_HIDAPI - */ -#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX" - -/** - * \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used. - * - * This variable can be set to the following values: - * "0" - HIDAPI driver is not used - * "1" - HIDAPI driver is used - * - * The default is the value of SDL_HINT_JOYSTICK_HIDAPI - */ -#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE" - -/** - * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs - * - * The variable can be set to the following values: - * "0" - Do not scan for Steam Controllers - * "1" - Scan for Steam Controllers (the default) - * - * The default value is "1". This hint must be set before initializing the joystick subsystem. - */ -#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS" - - -/** - * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it. - * This is a debugging aid for developers and not expected to be used by end users. The default is "1" - * - * This variable can be set to the following values: - * "0" - don't allow topmost - * "1" - allow topmost - */ -#define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST" - -/** - * \brief A variable that controls the timer resolution, in milliseconds. - * - * The higher resolution the timer, the more frequently the CPU services - * timer interrupts, and the more precise delays are, but this takes up - * power and CPU time. This hint is only used on Windows 7 and earlier. - * - * See this blog post for more information: - * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/ - * - * If this variable is set to "0", the system timer resolution is not set. - * - * The default value is "1". This hint may be set at any time. - */ -#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION" - - -/** - * \brief A variable describing the content orientation on QtWayland-based platforms. - * - * On QtWayland platforms, windows are rotated client-side to allow for custom - * transitions. In order to correctly position overlays (e.g. volume bar) and - * gestures (e.g. events view, close/minimize gestures), the system needs to - * know in which orientation the application is currently drawing its contents. - * - * This does not cause the window to be rotated or resized, the application - * needs to take care of drawing the content in the right orientation (the - * framebuffer is always in portrait mode). - * - * This variable can be one of the following values: - * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape" - */ -#define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION" - -/** - * \brief Flags to set on QtWayland windows to integrate with the native window manager. - * - * On QtWayland platforms, this hint controls the flags to set on the windows. - * For example, on Sailfish OS "OverridesSystemGestures" disables swipe gestures. - * - * This variable is a space-separated list of the following values (empty = no flags): - * "OverridesSystemGestures", "StaysOnTop", "BypassWindowManager" - */ -#define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS" - -/** -* \brief A string specifying SDL's threads stack size in bytes or "0" for the backend's default size -* -* Use this hint in case you need to set SDL's threads stack size to other than the default. -* This is specially useful if you build SDL against a non glibc libc library (such as musl) which -* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses). -* Support for this hint is currently available only in the pthread, Windows, and PSP backend. -* -* Instead of this hint, in 2.0.9 and later, you can use -* SDL_CreateThreadWithStackSize(). This hint only works with the classic -* SDL_CreateThread(). -*/ -#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE" - -/** - * \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS) - */ -#define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED" - -/** - * \brief A variable that determines whether ctrl+click should generate a right-click event on Mac - * - * If present, holding ctrl while left clicking will generate a right click - * event when on Mac. - */ -#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK" - -/** -* \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries -* -* SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It -* can use two different sets of binaries, those compiled by the user from source -* or those provided by the Chrome browser. In the later case, these binaries require -* that SDL loads a DLL providing the shader compiler. -* -* This variable can be set to the following values: -* "d3dcompiler_46.dll" - default, best for Vista or later. -* "d3dcompiler_43.dll" - for XP support. -* "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries. -* -*/ -#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER" - -/** -* \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p"). -* -* If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has -* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly -* created SDL_Window: -* -* 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is -* needed for example when sharing an OpenGL context across multiple windows. -* -* 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for -* OpenGL rendering. -* -* This variable can be set to the following values: -* The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should -* share a pixel format with. -*/ -#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT" - -/** - * \brief A URL to a WinRT app's privacy policy - * - * All network-enabled WinRT apps must make a privacy policy available to its - * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be - * be available in the Windows Settings charm, as accessed from within the app. - * SDL provides code to add a URL-based link there, which can point to the app's - * privacy policy. - * - * To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL - * before calling any SDL_Init() functions. The contents of the hint should - * be a valid URL. For example, "http://www.example.com". - * - * The default value is "", which will prevent SDL from adding a privacy policy - * link to the Settings charm. This hint should only be set during app init. - * - * The label text of an app's "Privacy Policy" link may be customized via another - * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL. - * - * Please note that on Windows Phone, Microsoft does not provide standard UI - * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL - * will not get used on that platform. Network-enabled phone apps should display - * their privacy policy through some other, in-app means. - */ -#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL" - -/** \brief Label text for a WinRT app's privacy policy link - * - * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT, - * Microsoft mandates that this policy be available via the Windows Settings charm. - * SDL provides code to add a link there, with its label text being set via the - * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL. - * - * Please note that a privacy policy's contents are not set via this hint. A separate - * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the - * policy. - * - * The contents of this hint should be encoded as a UTF8 string. - * - * The default value is "Privacy Policy". This hint should only be set during app - * initialization, preferably before any calls to SDL_Init(). - * - * For additional information on linking to a privacy policy, see the documentation for - * SDL_HINT_WINRT_PRIVACY_POLICY_URL. - */ -#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL" - -/** \brief Allows back-button-press events on Windows Phone to be marked as handled - * - * Windows Phone devices typically feature a Back button. When pressed, - * the OS will emit back-button-press events, which apps are expected to - * handle in an appropriate manner. If apps do not explicitly mark these - * events as 'Handled', then the OS will invoke its default behavior for - * unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to - * terminate the app (and attempt to switch to the previous app, or to the - * device's home screen). - * - * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL - * to mark back-button-press events as Handled, if and when one is sent to - * the app. - * - * Internally, Windows Phone sends back button events as parameters to - * special back-button-press callback functions. Apps that need to respond - * to back-button-press events are expected to register one or more - * callback functions for such, shortly after being launched (during the - * app's initialization phase). After the back button is pressed, the OS - * will invoke these callbacks. If the app's callback(s) do not explicitly - * mark the event as handled by the time they return, or if the app never - * registers one of these callback, the OS will consider the event - * un-handled, and it will apply its default back button behavior (terminate - * the app). - * - * SDL registers its own back-button-press callback with the Windows Phone - * OS. This callback will emit a pair of SDL key-press events (SDL_KEYDOWN - * and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which - * it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON. - * If the hint's value is set to "1", the back button event's Handled - * property will get set to 'true'. If the hint's value is set to something - * else, or if it is unset, SDL will leave the event's Handled property - * alone. (By default, the OS sets this property to 'false', to note.) - * - * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a - * back button is pressed, or can set it in direct-response to a back button - * being pressed. - * - * In order to get notified when a back button is pressed, SDL apps should - * register a callback function with SDL_AddEventWatch(), and have it listen - * for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK. - * (Alternatively, SDL_KEYUP events can be listened-for. Listening for - * either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON - * set by such a callback, will be applied to the OS' current - * back-button-press event. - * - * More details on back button behavior in Windows Phone apps can be found - * at the following page, on Microsoft's developer site: - * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx - */ -#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON" - -/** - * \brief A variable that dictates policy for fullscreen Spaces on Mac OS X. - * - * This hint only applies to Mac OS X. - * - * The variable can be set to the following values: - * "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and - * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen" - * button on their titlebars). - * "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and - * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen" - * button on their titlebars). - * - * The default value is "1". Spaces are disabled regardless of this hint if - * the OS isn't at least Mac OS X Lion (10.7). This hint must be set before - * any windows are created. - */ -#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES" - -/** -* \brief When set don't force the SDL app to become a foreground process -* -* This hint only applies to Mac OS X. -* -*/ -#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP" - -/** - * \brief Android APK expansion main file version. Should be a string number like "1", "2" etc. - * - * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION. - * - * If both hints were set then SDL_RWFromFile() will look into expansion files - * after a given relative path was not found in the internal storage and assets. - * - * By default this hint is not set and the APK expansion files are not searched. - */ -#define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION" - -/** - * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc. - * - * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION. - * - * If both hints were set then SDL_RWFromFile() will look into expansion files - * after a given relative path was not found in the internal storage and assets. - * - * By default this hint is not set and the APK expansion files are not searched. - */ -#define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION" - -/** - * \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_TEXTEDITING events. - * - * The variable can be set to the following values: - * "0" - SDL_TEXTEDITING events are sent, and it is the application's - * responsibility to render the text from these events and - * differentiate it somehow from committed text. (default) - * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, - * and text that is being composed will be rendered in its own UI. - */ -#define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING" - -/** - * \brief A variable to control whether we trap the Android back button to handle it manually. - * This is necessary for the right mouse button to work on some Android devices, or - * to be able to trap the back button for use in your code reliably. If set to true, - * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of - * SDL_SCANCODE_AC_BACK. - * - * The variable can be set to the following values: - * "0" - Back button will be handled as usual for system. (default) - * "1" - Back button will be trapped, allowing you to handle the key press - * manually. (This will also let right mouse click work on systems - * where the right mouse button functions as back.) - * - * The value of this hint is used at runtime, so it can be changed at any time. - */ -#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON" - -/** - * \brief A variable to control whether the event loop will block itself when the app is paused. - * - * The variable can be set to the following values: - * "0" - Non blocking. - * "1" - Blocking. (default) - * - * The value should be set before SDL is initialized. - */ -#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE" - - /** - * \brief A variable to control whether the return key on the soft keyboard - * should hide the soft keyboard on Android and iOS. - * - * The variable can be set to the following values: - * "0" - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default) - * "1" - The return key will hide the keyboard. - * - * The value of this hint is used at runtime, so it can be changed at any time. - */ -#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME" - -/** - * \brief override the binding element for keyboard inputs for Emscripten builds - * - * This hint only applies to the emscripten platform - * - * The variable can be one of - * "#window" - The javascript window object (this is the default) - * "#document" - The javascript document object - * "#screen" - the javascript window.screen object - * "#canvas" - the WebGL canvas element - * any other string without a leading # sign applies to the element on the page with that ID. - */ -#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" - -/** - * \brief Tell SDL not to catch the SIGINT or SIGTERM signals. - * - * This hint only applies to Unix-like platforms. - * - * The variable can be set to the following values: - * "0" - SDL will install a SIGINT and SIGTERM handler, and when it - * catches a signal, convert it into an SDL_QUIT event. - * "1" - SDL will not install a signal handler at all. - */ -#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS" - -/** - * \brief Tell SDL not to generate window-close events for Alt+F4 on Windows. - * - * The variable can be set to the following values: - * "0" - SDL will generate a window-close event when it sees Alt+F4. - * "1" - SDL will only do normal key handling for Alt+F4. - */ -#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4" - -/** - * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs. - * - * The bitmap header version 4 is required for proper alpha channel support and - * SDL will use it when required. Should this not be desired, this hint can - * force the use of the 40 byte header version which is supported everywhere. - * - * The variable can be set to the following values: - * "0" - Surfaces with a colorkey or an alpha channel are saved to a - * 32-bit BMP file with an alpha mask. SDL will use the bitmap - * header version 4 and set the alpha mask accordingly. - * "1" - Surfaces with a colorkey or an alpha channel are saved to a - * 32-bit BMP file without an alpha mask. The alpha channel data - * will be in the file, but applications are going to ignore it. - * - * The default value is "0". - */ -#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT" - -/** - * \brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception. - * The 0x406D1388 Exception is a trick used to inform Visual Studio of a - * thread's name, but it tends to cause problems with other debuggers, - * and the .NET runtime. Note that SDL 2.0.6 and later will still use - * the (safer) SetThreadDescription API, introduced in the Windows 10 - * Creators Update, if available. - * - * The variable can be set to the following values: - * "0" - SDL will raise the 0x406D1388 Exception to name threads. - * This is the default behavior of SDL <= 2.0.4. - * "1" - SDL will not raise this exception, and threads will be unnamed. (default) - * This is necessary with .NET languages or debuggers that aren't Visual Studio. - */ -#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING" - -/** - * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI - * - * Also known as Z-order. The variable can take a negative or positive value. - * The default is 10000. - */ -#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER" - -/** - * \brief Tell the video driver that we only want a double buffer. - * - * By default, most lowlevel 2D APIs will use a triple buffer scheme that - * wastes no CPU time on waiting for vsync after issuing a flip, but - * introduces a frame of latency. On the other hand, using a double buffer - * scheme instead is recommended for cases where low latency is an important - * factor because we save a whole frame of latency. - * We do so by waiting for vsync immediately after issuing a flip, usually just - * after eglSwapBuffers call in the backend's *_SwapWindow function. - * - * Since it's driver-specific, it's only supported where possible and - * implemented. Currently supported the following drivers: - * - KMSDRM (kmsdrm) - * - Raspberry Pi (raspberrypi) - */ -#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER" - -/** - * \brief A variable controlling what driver to use for OpenGL ES contexts. - * - * On some platforms, currently Windows and X11, OpenGL drivers may support - * creating contexts with an OpenGL ES profile. By default SDL uses these - * profiles, when available, otherwise it attempts to load an OpenGL ES - * library, e.g. that provided by the ANGLE project. This variable controls - * whether SDL follows this default behaviour or will always load an - * OpenGL ES library. - * - * Circumstances where this is useful include - * - Testing an app with a particular OpenGL ES implementation, e.g ANGLE, - * or emulator, e.g. those from ARM, Imagination or Qualcomm. - * - Resolving OpenGL ES function addresses at link time by linking with - * the OpenGL ES library instead of querying them at run time with - * SDL_GL_GetProcAddress(). - * - * Caution: for an application to work with the default behaviour across - * different OpenGL drivers it must query the OpenGL ES function - * addresses at run time using SDL_GL_GetProcAddress(). - * - * This variable is ignored on most platforms because OpenGL ES is native - * or not supported. - * - * This variable can be set to the following values: - * "0" - Use ES profile of OpenGL, if available. (Default when not set.) - * "1" - Load OpenGL ES library using the default library names. - * - */ -#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER" - -/** - * \brief A variable controlling speed/quality tradeoff of audio resampling. - * - * If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ ) - * to handle audio resampling. There are different resampling modes available - * that produce different levels of quality, using more CPU. - * - * If this hint isn't specified to a valid setting, or libsamplerate isn't - * available, SDL will use the default, internal resampling algorithm. - * - * Note that this is currently only applicable to resampling audio that is - * being written to a device for playback or audio being read from a device - * for capture. SDL_AudioCVT always uses the default resampler (although this - * might change for SDL 2.1). - * - * This hint is currently only checked at audio subsystem initialization. - * - * This variable can be set to the following values: - * - * "0" or "default" - Use SDL's internal resampling (Default when not set - low quality, fast) - * "1" or "fast" - Use fast, slightly higher quality resampling, if available - * "2" or "medium" - Use medium quality resampling, if available - * "3" or "best" - Use high quality resampling, if available - */ -#define SDL_HINT_AUDIO_RESAMPLING_MODE "SDL_AUDIO_RESAMPLING_MODE" - -/** - * \brief A variable controlling the audio category on iOS and Mac OS X - * - * This variable can be set to the following values: - * - * "ambient" - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default) - * "playback" - Use the AVAudioSessionCategoryPlayback category - * - * For more information, see Apple's documentation: - * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html - */ -#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY" - -/** - * \brief A variable controlling whether the 2D render API is compatible or efficient. - * - * This variable can be set to the following values: - * - * "0" - Don't use batching to make rendering more efficient. - * "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls. - * - * Up to SDL 2.0.9, the render API would draw immediately when requested. Now - * it batches up draw requests and sends them all to the GPU only when forced - * to (during SDL_RenderPresent, when changing render targets, by updating a - * texture that the batch needs, etc). This is significantly more efficient, - * but it can cause problems for apps that expect to render on top of the - * render API's output. As such, SDL will disable batching if a specific - * render backend is requested (since this might indicate that the app is - * planning to use the underlying graphics API directly). This hint can - * be used to explicitly request batching in this instance. It is a contract - * that you will either never use the underlying graphics API directly, or - * if you do, you will call SDL_RenderFlush() before you do so any current - * batch goes to the GPU before your work begins. Not following this contract - * will result in undefined behavior. - */ -#define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING" - - -/** - * \brief A variable controlling whether SDL logs all events pushed onto its internal queue. - * - * This variable can be set to the following values: - * - * "0" - Don't log any events (default) - * "1" - Log all events except mouse and finger motion, which are pretty spammy. - * "2" - Log all events. - * - * This is generally meant to be used to debug SDL itself, but can be useful - * for application developers that need better visibility into what is going - * on in the event queue. Logged events are sent through SDL_Log(), which - * means by default they appear on stdout on most platforms or maybe - * OutputDebugString() on Windows, and can be funneled by the app with - * SDL_LogSetOutputFunction(), etc. - * - * This hint can be toggled on and off at runtime, if you only need to log - * events for a small subset of program execution. - */ -#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING" - - - -/** - * \brief Controls how the size of the RIFF chunk affects the loading of a WAVE file. - * - * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE - * file) is not always reliable. In case the size is wrong, it's possible to - * just ignore it and step through the chunks until a fixed limit is reached. - * - * Note that files that have trailing data unrelated to the WAVE file or - * corrupt files may slow down the loading process without a reliable boundary. - * By default, SDL stops after 10000 chunks to prevent wasting time. Use the - * environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value. - * - * This variable can be set to the following values: - * - * "force" - Always use the RIFF chunk size as a boundary for the chunk search - * "ignorezero" - Like "force", but a zero size searches up to 4 GiB (default) - * "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB - * "maximum" - Search for chunks until the end of file (not recommended) - */ -#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE" - -/** - * \brief Controls how a truncated WAVE file is handled. - * - * A WAVE file is considered truncated if any of the chunks are incomplete or - * the data chunk size is not a multiple of the block size. By default, SDL - * decodes until the first incomplete block, as most applications seem to do. - * - * This variable can be set to the following values: - * - * "verystrict" - Raise an error if the file is truncated - * "strict" - Like "verystrict", but the size of the RIFF chunk is ignored - * "dropframe" - Decode until the first incomplete sample frame - * "dropblock" - Decode until the first incomplete block (default) - */ -#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION" - -/** - * \brief Controls how the fact chunk affects the loading of a WAVE file. - * - * The fact chunk stores information about the number of samples of a WAVE - * file. The Standards Update from Microsoft notes that this value can be used - * to 'determine the length of the data in seconds'. This is especially useful - * for compressed formats (for which this is a mandatory chunk) if they produce - * multiple sample frames per block and truncating the block is not allowed. - * The fact chunk can exactly specify how many sample frames there should be - * in this case. - * - * Unfortunately, most application seem to ignore the fact chunk and so SDL - * ignores it by default as well. - * - * This variable can be set to the following values: - * - * "truncate" - Use the number of samples to truncate the wave data if - * the fact chunk is present and valid - * "strict" - Like "truncate", but raise an error if the fact chunk - * is invalid, not present for non-PCM formats, or if the - * data chunk doesn't have that many samples - * "ignorezero" - Like "truncate", but ignore fact chunk if the number of - * samples is zero - * "ignore" - Ignore fact chunk entirely (default) - */ -#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK" - -/* - * \brief Override for SDL_GetDisplayUsableBounds() - * - * If set, this hint will override the expected results for - * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want - * to do this, but this allows an embedded system to request that some of the - * screen be reserved for other uses when paired with a well-behaved - * application. - * - * The contents of this hint must be 4 comma-separated integers, the first - * is the bounds x, then y, width and height, in that order. - */ -#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS" - -/** - * \brief An enumeration of hint priorities - */ -typedef enum -{ - SDL_HINT_DEFAULT, - SDL_HINT_NORMAL, - SDL_HINT_OVERRIDE -} SDL_HintPriority; - - -/** - * \brief Set a hint with a specific priority - * - * The priority controls the behavior when setting a hint that already - * has a value. Hints will replace existing hints of their priority and - * lower. Environment variables are considered to have override priority. - * - * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise - */ -extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name, - const char *value, - SDL_HintPriority priority); - -/** - * \brief Set a hint with normal priority - * - * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise - */ -extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name, - const char *value); - -/** - * \brief Get a hint - * - * \return The string value of a hint variable. - */ -extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name); - -/** - * \brief Get a hint - * - * \return The boolean value of a hint variable. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value); - -/** - * \brief type definition of the hint callback function. - */ -typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue); - -/** - * \brief Add a function to watch a particular hint - * - * \param name The hint to watch - * \param callback The function to call when the hint value changes - * \param userdata A pointer to pass to the callback function - */ -extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name, - SDL_HintCallback callback, - void *userdata); - -/** - * \brief Remove a function watching a particular hint - * - * \param name The hint being watched - * \param callback The function being called when the hint value changes - * \param userdata A pointer being passed to the callback function - */ -extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name, - SDL_HintCallback callback, - void *userdata); - -/** - * \brief Clear all hints - * - * This function is called during SDL_Quit() to free stored hints. - */ -extern DECLSPEC void SDLCALL SDL_ClearHints(void); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_hints_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_joystick.h b/Dependencies/SDL/Windows/include/SDL_joystick.h deleted file mode 100644 index a0dd720..0000000 --- a/Dependencies/SDL/Windows/include/SDL_joystick.h +++ /dev/null @@ -1,418 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_joystick.h - * - * Include file for SDL joystick event handling - * - * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick - * behind a device_index changing as joysticks are plugged and unplugged. - * - * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted - * then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in. - * - * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of - * the device (a X360 wired controller for example). This identifier is platform dependent. - * - * - */ - -#ifndef SDL_joystick_h_ -#define SDL_joystick_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \file SDL_joystick.h - * - * In order to use these functions, SDL_Init() must have been called - * with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system - * for joysticks, and load appropriate drivers. - * - * If you would like to receive joystick updates while the application - * is in the background, you should set the following hint before calling - * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS - */ - -/** - * The joystick structure used to identify an SDL joystick - */ -struct _SDL_Joystick; -typedef struct _SDL_Joystick SDL_Joystick; - -/* A structure that encodes the stable unique id for a joystick device */ -typedef struct { - Uint8 data[16]; -} SDL_JoystickGUID; - -/** - * This is a unique ID for a joystick for the time it is connected to the system, - * and is never reused for the lifetime of the application. If the joystick is - * disconnected and reconnected, it will get a new ID. - * - * The ID value starts at 0 and increments from there. The value -1 is an invalid ID. - */ -typedef Sint32 SDL_JoystickID; - -typedef enum -{ - SDL_JOYSTICK_TYPE_UNKNOWN, - SDL_JOYSTICK_TYPE_GAMECONTROLLER, - SDL_JOYSTICK_TYPE_WHEEL, - SDL_JOYSTICK_TYPE_ARCADE_STICK, - SDL_JOYSTICK_TYPE_FLIGHT_STICK, - SDL_JOYSTICK_TYPE_DANCE_PAD, - SDL_JOYSTICK_TYPE_GUITAR, - SDL_JOYSTICK_TYPE_DRUM_KIT, - SDL_JOYSTICK_TYPE_ARCADE_PAD, - SDL_JOYSTICK_TYPE_THROTTLE -} SDL_JoystickType; - -typedef enum -{ - SDL_JOYSTICK_POWER_UNKNOWN = -1, - SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */ - SDL_JOYSTICK_POWER_LOW, /* <= 20% */ - SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */ - SDL_JOYSTICK_POWER_FULL, /* <= 100% */ - SDL_JOYSTICK_POWER_WIRED, - SDL_JOYSTICK_POWER_MAX -} SDL_JoystickPowerLevel; - -/* Function prototypes */ - -/** - * Locking for multi-threaded access to the joystick API - * - * If you are using the joystick API or handling events from multiple threads - * you should use these locking functions to protect access to the joysticks. - * - * In particular, you are guaranteed that the joystick list won't change, so - * the API functions that take a joystick index will be valid, and joystick - * and game controller events will not be delivered. - */ -extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); -extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void); - -/** - * Count the number of joysticks attached to the system right now - */ -extern DECLSPEC int SDLCALL SDL_NumJoysticks(void); - -/** - * Get the implementation dependent name of a joystick. - * This can be called before any joysticks are opened. - * If no name can be found, this function returns NULL. - */ -extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index); - -/** - * Get the player index of a joystick, or -1 if it's not available - * This can be called before any joysticks are opened. - */ -extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index); - -/** - * Return the GUID for the joystick at this index - * This can be called before any joysticks are opened. - */ -extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index); - -/** - * Get the USB vendor ID of a joystick, if available. - * This can be called before any joysticks are opened. - * If the vendor ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index); - -/** - * Get the USB product ID of a joystick, if available. - * This can be called before any joysticks are opened. - * If the product ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index); - -/** - * Get the product version of a joystick, if available. - * This can be called before any joysticks are opened. - * If the product version isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index); - -/** - * Get the type of a joystick, if available. - * This can be called before any joysticks are opened. - */ -extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index); - -/** - * Get the instance ID of a joystick. - * This can be called before any joysticks are opened. - * If the index is out of range, this function will return -1. - */ -extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index); - -/** - * Open a joystick for use. - * The index passed as an argument refers to the N'th joystick on the system. - * This index is not the value which will identify this joystick in future - * joystick events. The joystick's instance id (::SDL_JoystickID) will be used - * there instead. - * - * \return A joystick identifier, or NULL if an error occurred. - */ -extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index); - -/** - * Return the SDL_Joystick associated with an instance id. - */ -extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID instance_id); - -/** - * Return the SDL_Joystick associated with a player index. - */ -extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index); - -/** - * Return the name for this currently opened joystick. - * If no name can be found, this function returns NULL. - */ -extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick); - -/** - * Get the player index of an opened joystick, or -1 if it's not available - * - * For XInput controllers this returns the XInput user index. - */ -extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick); - -/** - * Set the player index of an opened joystick - */ -extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick * joystick, int player_index); - -/** - * Return the GUID for this opened joystick - */ -extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick); - -/** - * Get the USB vendor ID of an opened joystick, if available. - * If the vendor ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick * joystick); - -/** - * Get the USB product ID of an opened joystick, if available. - * If the product ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick * joystick); - -/** - * Get the product version of an opened joystick, if available. - * If the product version isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick); - -/** - * Get the type of an opened joystick. - */ -extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick * joystick); - -/** - * Return a string representation for this guid. pszGUID must point to at least 33 bytes - * (32 for the string plus a NULL terminator). - */ -extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID); - -/** - * Convert a string into a joystick guid - */ -extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID); - -/** - * Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick * joystick); - -/** - * Get the instance ID of an opened joystick or -1 if the joystick is invalid. - */ -extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick * joystick); - -/** - * Get the number of general axis controls on a joystick. - */ -extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick); - -/** - * Get the number of trackballs on a joystick. - * - * Joystick trackballs have only relative motion events associated - * with them and their state cannot be polled. - */ -extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick); - -/** - * Get the number of POV hats on a joystick. - */ -extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick); - -/** - * Get the number of buttons on a joystick. - */ -extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick); - -/** - * Update the current state of the open joysticks. - * - * This is called automatically by the event loop if any joystick - * events are enabled. - */ -extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void); - -/** - * Enable/disable joystick event polling. - * - * If joystick events are disabled, you must call SDL_JoystickUpdate() - * yourself and check the state of the joystick when you want joystick - * information. - * - * The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE. - */ -extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state); - -#define SDL_JOYSTICK_AXIS_MAX 32767 -#define SDL_JOYSTICK_AXIS_MIN -32768 -/** - * Get the current state of an axis control on a joystick. - * - * The state is a value ranging from -32768 to 32767. - * - * The axis indices start at index 0. - */ -extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick, - int axis); - -/** - * Get the initial state of an axis control on a joystick. - * - * The state is a value ranging from -32768 to 32767. - * - * The axis indices start at index 0. - * - * \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * joystick, - int axis, Sint16 *state); - -/** - * \name Hat positions - */ -/* @{ */ -#define SDL_HAT_CENTERED 0x00 -#define SDL_HAT_UP 0x01 -#define SDL_HAT_RIGHT 0x02 -#define SDL_HAT_DOWN 0x04 -#define SDL_HAT_LEFT 0x08 -#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP) -#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN) -#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP) -#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN) -/* @} */ - -/** - * Get the current state of a POV hat on a joystick. - * - * The hat indices start at index 0. - * - * \return The return value is one of the following positions: - * - ::SDL_HAT_CENTERED - * - ::SDL_HAT_UP - * - ::SDL_HAT_RIGHT - * - ::SDL_HAT_DOWN - * - ::SDL_HAT_LEFT - * - ::SDL_HAT_RIGHTUP - * - ::SDL_HAT_RIGHTDOWN - * - ::SDL_HAT_LEFTUP - * - ::SDL_HAT_LEFTDOWN - */ -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick, - int hat); - -/** - * Get the ball axis change since the last poll. - * - * \return 0, or -1 if you passed it invalid parameters. - * - * The ball indices start at index 0. - */ -extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick, - int ball, int *dx, int *dy); - -/** - * Get the current state of a button on a joystick. - * - * The button indices start at index 0. - */ -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, - int button); - -/** - * Trigger a rumble effect - * Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling. - * - * \param joystick The joystick to vibrate - * \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF - * \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF - * \param duration_ms The duration of the rumble effect, in milliseconds - * - * \return 0, or -1 if rumble isn't supported on this joystick - */ -extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); - -/** - * Close a joystick previously opened with SDL_JoystickOpen(). - */ -extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick); - -/** - * Return the battery level of this joystick - */ -extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_joystick_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_keyboard.h b/Dependencies/SDL/Windows/include/SDL_keyboard.h deleted file mode 100644 index f6853c6..0000000 --- a/Dependencies/SDL/Windows/include/SDL_keyboard.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_keyboard.h - * - * Include file for SDL keyboard event handling - */ - -#ifndef SDL_keyboard_h_ -#define SDL_keyboard_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_keycode.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief The SDL keysym structure, used in key events. - * - * \note If you are looking for translated character input, see the ::SDL_TEXTINPUT event. - */ -typedef struct SDL_Keysym -{ - SDL_Scancode scancode; /**< SDL physical key code - see ::SDL_Scancode for details */ - SDL_Keycode sym; /**< SDL virtual key code - see ::SDL_Keycode for details */ - Uint16 mod; /**< current key modifiers */ - Uint32 unused; -} SDL_Keysym; - -/* Function prototypes */ - -/** - * \brief Get the window which currently has keyboard focus. - */ -extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void); - -/** - * \brief Get a snapshot of the current state of the keyboard. - * - * \param numkeys if non-NULL, receives the length of the returned array. - * - * \return An array of key states. Indexes into this array are obtained by using ::SDL_Scancode values. - * - * \b Example: - * \code - * const Uint8 *state = SDL_GetKeyboardState(NULL); - * if ( state[SDL_SCANCODE_RETURN] ) { - * printf(" is pressed.\n"); - * } - * \endcode - */ -extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys); - -/** - * \brief Get the current key modifier state for the keyboard. - */ -extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void); - -/** - * \brief Set the current key modifier state for the keyboard. - * - * \note This does not change the keyboard state, only the key modifier flags. - */ -extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate); - -/** - * \brief Get the key code corresponding to the given scancode according - * to the current keyboard layout. - * - * See ::SDL_Keycode for details. - * - * \sa SDL_GetKeyName() - */ -extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode); - -/** - * \brief Get the scancode corresponding to the given key code according to the - * current keyboard layout. - * - * See ::SDL_Scancode for details. - * - * \sa SDL_GetScancodeName() - */ -extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key); - -/** - * \brief Get a human-readable name for a scancode. - * - * \return A pointer to the name for the scancode. - * If the scancode doesn't have a name, this function returns - * an empty string (""). - * - * \sa SDL_Scancode - */ -extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode); - -/** - * \brief Get a scancode from a human-readable name - * - * \return scancode, or SDL_SCANCODE_UNKNOWN if the name wasn't recognized - * - * \sa SDL_Scancode - */ -extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name); - -/** - * \brief Get a human-readable name for a key. - * - * \return A pointer to a UTF-8 string that stays valid at least until the next - * call to this function. If you need it around any longer, you must - * copy it. If the key doesn't have a name, this function returns an - * empty string (""). - * - * \sa SDL_Keycode - */ -extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key); - -/** - * \brief Get a key code from a human-readable name - * - * \return key code, or SDLK_UNKNOWN if the name wasn't recognized - * - * \sa SDL_Keycode - */ -extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name); - -/** - * \brief Start accepting Unicode text input events. - * This function will show the on-screen keyboard if supported. - * - * \sa SDL_StopTextInput() - * \sa SDL_SetTextInputRect() - * \sa SDL_HasScreenKeyboardSupport() - */ -extern DECLSPEC void SDLCALL SDL_StartTextInput(void); - -/** - * \brief Return whether or not Unicode text input events are enabled. - * - * \sa SDL_StartTextInput() - * \sa SDL_StopTextInput() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void); - -/** - * \brief Stop receiving any text input events. - * This function will hide the on-screen keyboard if supported. - * - * \sa SDL_StartTextInput() - * \sa SDL_HasScreenKeyboardSupport() - */ -extern DECLSPEC void SDLCALL SDL_StopTextInput(void); - -/** - * \brief Set the rectangle used to type Unicode text inputs. - * This is used as a hint for IME and on-screen keyboard placement. - * - * \sa SDL_StartTextInput() - */ -extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect); - -/** - * \brief Returns whether the platform has some screen keyboard support. - * - * \return SDL_TRUE if some keyboard support is available else SDL_FALSE. - * - * \note Not all screen keyboard functions are supported on all platforms. - * - * \sa SDL_IsScreenKeyboardShown() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void); - -/** - * \brief Returns whether the screen keyboard is shown for given window. - * - * \param window The window for which screen keyboard should be queried. - * - * \return SDL_TRUE if screen keyboard is shown else SDL_FALSE. - * - * \sa SDL_HasScreenKeyboardSupport() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_keyboard_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_keycode.h b/Dependencies/SDL/Windows/include/SDL_keycode.h deleted file mode 100644 index a1ce7a4..0000000 --- a/Dependencies/SDL/Windows/include/SDL_keycode.h +++ /dev/null @@ -1,349 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_keycode.h - * - * Defines constants which identify keyboard keys and modifiers. - */ - -#ifndef SDL_keycode_h_ -#define SDL_keycode_h_ - -#include "SDL_stdinc.h" -#include "SDL_scancode.h" - -/** - * \brief The SDL virtual key representation. - * - * Values of this type are used to represent keyboard keys using the current - * layout of the keyboard. These values include Unicode values representing - * the unmodified character that would be generated by pressing the key, or - * an SDLK_* constant for those keys that do not generate characters. - * - * A special exception is the number keys at the top of the keyboard which - * always map to SDLK_0...SDLK_9, regardless of layout. - */ -typedef Sint32 SDL_Keycode; - -#define SDLK_SCANCODE_MASK (1<<30) -#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK) - -typedef enum -{ - SDLK_UNKNOWN = 0, - - SDLK_RETURN = '\r', - SDLK_ESCAPE = '\033', - SDLK_BACKSPACE = '\b', - SDLK_TAB = '\t', - SDLK_SPACE = ' ', - SDLK_EXCLAIM = '!', - SDLK_QUOTEDBL = '"', - SDLK_HASH = '#', - SDLK_PERCENT = '%', - SDLK_DOLLAR = '$', - SDLK_AMPERSAND = '&', - SDLK_QUOTE = '\'', - SDLK_LEFTPAREN = '(', - SDLK_RIGHTPAREN = ')', - SDLK_ASTERISK = '*', - SDLK_PLUS = '+', - SDLK_COMMA = ',', - SDLK_MINUS = '-', - SDLK_PERIOD = '.', - SDLK_SLASH = '/', - SDLK_0 = '0', - SDLK_1 = '1', - SDLK_2 = '2', - SDLK_3 = '3', - SDLK_4 = '4', - SDLK_5 = '5', - SDLK_6 = '6', - SDLK_7 = '7', - SDLK_8 = '8', - SDLK_9 = '9', - SDLK_COLON = ':', - SDLK_SEMICOLON = ';', - SDLK_LESS = '<', - SDLK_EQUALS = '=', - SDLK_GREATER = '>', - SDLK_QUESTION = '?', - SDLK_AT = '@', - /* - Skip uppercase letters - */ - SDLK_LEFTBRACKET = '[', - SDLK_BACKSLASH = '\\', - SDLK_RIGHTBRACKET = ']', - SDLK_CARET = '^', - SDLK_UNDERSCORE = '_', - SDLK_BACKQUOTE = '`', - SDLK_a = 'a', - SDLK_b = 'b', - SDLK_c = 'c', - SDLK_d = 'd', - SDLK_e = 'e', - SDLK_f = 'f', - SDLK_g = 'g', - SDLK_h = 'h', - SDLK_i = 'i', - SDLK_j = 'j', - SDLK_k = 'k', - SDLK_l = 'l', - SDLK_m = 'm', - SDLK_n = 'n', - SDLK_o = 'o', - SDLK_p = 'p', - SDLK_q = 'q', - SDLK_r = 'r', - SDLK_s = 's', - SDLK_t = 't', - SDLK_u = 'u', - SDLK_v = 'v', - SDLK_w = 'w', - SDLK_x = 'x', - SDLK_y = 'y', - SDLK_z = 'z', - - SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK), - - SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1), - SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2), - SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3), - SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4), - SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5), - SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6), - SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7), - SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8), - SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9), - SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10), - SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11), - SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12), - - SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN), - SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK), - SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE), - SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT), - SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME), - SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP), - SDLK_DELETE = '\177', - SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END), - SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN), - SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT), - SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT), - SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN), - SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP), - - SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR), - SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE), - SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY), - SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS), - SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS), - SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER), - SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1), - SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2), - SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3), - SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4), - SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5), - SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6), - SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7), - SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8), - SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9), - SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0), - SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD), - - SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION), - SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER), - SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS), - SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13), - SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14), - SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15), - SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16), - SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17), - SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18), - SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19), - SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20), - SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21), - SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22), - SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23), - SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24), - SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE), - SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP), - SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU), - SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT), - SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP), - SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN), - SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO), - SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT), - SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY), - SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE), - SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND), - SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE), - SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP), - SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN), - SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA), - SDLK_KP_EQUALSAS400 = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400), - - SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE), - SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ), - SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL), - SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR), - SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR), - SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2), - SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR), - SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT), - SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER), - SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN), - SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL), - SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL), - - SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00), - SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000), - SDLK_THOUSANDSSEPARATOR = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR), - SDLK_DECIMALSEPARATOR = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR), - SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT), - SDLK_CURRENCYSUBUNIT = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT), - SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN), - SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN), - SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE), - SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE), - SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB), - SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE), - SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A), - SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B), - SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C), - SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D), - SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E), - SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F), - SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR), - SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER), - SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT), - SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS), - SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER), - SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND), - SDLK_KP_DBLAMPERSAND = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND), - SDLK_KP_VERTICALBAR = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR), - SDLK_KP_DBLVERTICALBAR = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR), - SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON), - SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH), - SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE), - SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT), - SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM), - SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE), - SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL), - SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR), - SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD), - SDLK_KP_MEMSUBTRACT = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT), - SDLK_KP_MEMMULTIPLY = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY), - SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE), - SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS), - SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR), - SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY), - SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY), - SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL), - SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL), - SDLK_KP_HEXADECIMAL = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL), - - SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL), - SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT), - SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT), - SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI), - SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL), - SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT), - SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT), - SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI), - - SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE), - - SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT), - SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV), - SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP), - SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY), - SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE), - SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT), - SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW), - SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL), - SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR), - SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER), - SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH), - SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME), - SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK), - SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD), - SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP), - SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH), - SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS), - - SDLK_BRIGHTNESSDOWN = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN), - SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP), - SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH), - SDLK_KBDILLUMTOGGLE = - SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE), - SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN), - SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP), - SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT), - SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP), - SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1), - SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2), - - SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND), - SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD) -} SDL_KeyCode; - -/** - * \brief Enumeration of valid key mods (possibly OR'd together). - */ -typedef enum -{ - KMOD_NONE = 0x0000, - KMOD_LSHIFT = 0x0001, - KMOD_RSHIFT = 0x0002, - KMOD_LCTRL = 0x0040, - KMOD_RCTRL = 0x0080, - KMOD_LALT = 0x0100, - KMOD_RALT = 0x0200, - KMOD_LGUI = 0x0400, - KMOD_RGUI = 0x0800, - KMOD_NUM = 0x1000, - KMOD_CAPS = 0x2000, - KMOD_MODE = 0x4000, - KMOD_RESERVED = 0x8000 -} SDL_Keymod; - -#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL) -#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT) -#define KMOD_ALT (KMOD_LALT|KMOD_RALT) -#define KMOD_GUI (KMOD_LGUI|KMOD_RGUI) - -#endif /* SDL_keycode_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_loadso.h b/Dependencies/SDL/Windows/include/SDL_loadso.h deleted file mode 100644 index 89578a9..0000000 --- a/Dependencies/SDL/Windows/include/SDL_loadso.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_loadso.h - * - * System dependent library loading routines - * - * Some things to keep in mind: - * \li These functions only work on C function names. Other languages may - * have name mangling and intrinsic language support that varies from - * compiler to compiler. - * \li Make sure you declare your function pointers with the same calling - * convention as the actual library function. Your code will crash - * mysteriously if you do not do this. - * \li Avoid namespace collisions. If you load a symbol from the library, - * it is not defined whether or not it goes into the global symbol - * namespace for the application. If it does and it conflicts with - * symbols in your code or other shared libraries, you will not get - * the results you expect. :) - */ - -#ifndef SDL_loadso_h_ -#define SDL_loadso_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * This function dynamically loads a shared object and returns a pointer - * to the object handle (or NULL if there was an error). - * The 'sofile' parameter is a system dependent name of the object file. - */ -extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile); - -/** - * Given an object handle, this function looks up the address of the - * named function in the shared object and returns it. This address - * is no longer valid after calling SDL_UnloadObject(). - */ -extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle, - const char *name); - -/** - * Unload a shared object from memory. - */ -extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_loadso_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_log.h b/Dependencies/SDL/Windows/include/SDL_log.h deleted file mode 100644 index c1751fd..0000000 --- a/Dependencies/SDL/Windows/include/SDL_log.h +++ /dev/null @@ -1,211 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_log.h - * - * Simple log messages with categories and priorities. - * - * By default logs are quiet, but if you're debugging SDL you might want: - * - * SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN); - * - * Here's where the messages go on different platforms: - * Windows: debug output stream - * Android: log output - * Others: standard error output (stderr) - */ - -#ifndef SDL_log_h_ -#define SDL_log_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * \brief The maximum size of a log message - * - * Messages longer than the maximum size will be truncated - */ -#define SDL_MAX_LOG_MESSAGE 4096 - -/** - * \brief The predefined log categories - * - * By default the application category is enabled at the INFO level, - * the assert category is enabled at the WARN level, test is enabled - * at the VERBOSE level and all other categories are enabled at the - * CRITICAL level. - */ -typedef enum -{ - SDL_LOG_CATEGORY_APPLICATION, - SDL_LOG_CATEGORY_ERROR, - SDL_LOG_CATEGORY_ASSERT, - SDL_LOG_CATEGORY_SYSTEM, - SDL_LOG_CATEGORY_AUDIO, - SDL_LOG_CATEGORY_VIDEO, - SDL_LOG_CATEGORY_RENDER, - SDL_LOG_CATEGORY_INPUT, - SDL_LOG_CATEGORY_TEST, - - /* Reserved for future SDL library use */ - SDL_LOG_CATEGORY_RESERVED1, - SDL_LOG_CATEGORY_RESERVED2, - SDL_LOG_CATEGORY_RESERVED3, - SDL_LOG_CATEGORY_RESERVED4, - SDL_LOG_CATEGORY_RESERVED5, - SDL_LOG_CATEGORY_RESERVED6, - SDL_LOG_CATEGORY_RESERVED7, - SDL_LOG_CATEGORY_RESERVED8, - SDL_LOG_CATEGORY_RESERVED9, - SDL_LOG_CATEGORY_RESERVED10, - - /* Beyond this point is reserved for application use, e.g. - enum { - MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM, - MYAPP_CATEGORY_AWESOME2, - MYAPP_CATEGORY_AWESOME3, - ... - }; - */ - SDL_LOG_CATEGORY_CUSTOM -} SDL_LogCategory; - -/** - * \brief The predefined log priorities - */ -typedef enum -{ - SDL_LOG_PRIORITY_VERBOSE = 1, - SDL_LOG_PRIORITY_DEBUG, - SDL_LOG_PRIORITY_INFO, - SDL_LOG_PRIORITY_WARN, - SDL_LOG_PRIORITY_ERROR, - SDL_LOG_PRIORITY_CRITICAL, - SDL_NUM_LOG_PRIORITIES -} SDL_LogPriority; - - -/** - * \brief Set the priority of all log categories - */ -extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority); - -/** - * \brief Set the priority of a particular log category - */ -extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category, - SDL_LogPriority priority); - -/** - * \brief Get the priority of a particular log category - */ -extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category); - -/** - * \brief Reset all priorities to default. - * - * \note This is called in SDL_Quit(). - */ -extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void); - -/** - * \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO - */ -extern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_VERBOSE - */ -extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_DEBUG - */ -extern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_INFO - */ -extern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_WARN - */ -extern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_ERROR - */ -extern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_CRITICAL - */ -extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with the specified category and priority. - */ -extern DECLSPEC void SDLCALL SDL_LogMessage(int category, - SDL_LogPriority priority, - SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3); - -/** - * \brief Log a message with the specified category and priority. - */ -extern DECLSPEC void SDLCALL SDL_LogMessageV(int category, - SDL_LogPriority priority, - const char *fmt, va_list ap); - -/** - * \brief The prototype for the log output function - */ -typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message); - -/** - * \brief Get the current log output function. - */ -extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata); - -/** - * \brief This function allows you to replace the default log output - * function with one of your own. - */ -extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_log_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_main.h b/Dependencies/SDL/Windows/include/SDL_main.h deleted file mode 100644 index fcb5c17..0000000 --- a/Dependencies/SDL/Windows/include/SDL_main.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -#ifndef SDL_main_h_ -#define SDL_main_h_ - -#include "SDL_stdinc.h" - -/** - * \file SDL_main.h - * - * Redefine main() on some platforms so that it is called by SDL. - */ - -#ifndef SDL_MAIN_HANDLED -#if defined(__WIN32__) -/* On Windows SDL provides WinMain(), which parses the command line and passes - the arguments to your main function. - - If you provide your own WinMain(), you may define SDL_MAIN_HANDLED - */ -#define SDL_MAIN_AVAILABLE - -#elif defined(__WINRT__) -/* On WinRT, SDL provides a main function that initializes CoreApplication, - creating an instance of IFrameworkView in the process. - - Please note that #include'ing SDL_main.h is not enough to get a main() - function working. In non-XAML apps, the file, - src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled - into the app itself. In XAML apps, the function, SDL_WinRTRunApp must be - called, with a pointer to the Direct3D-hosted XAML control passed in. -*/ -#define SDL_MAIN_NEEDED - -#elif defined(__IPHONEOS__) -/* On iOS SDL provides a main function that creates an application delegate - and starts the iOS application run loop. - - If you link with SDL dynamically on iOS, the main function can't be in a - shared library, so you need to link with libSDLmain.a, which includes a - stub main function that calls into the shared library to start execution. - - See src/video/uikit/SDL_uikitappdelegate.m for more details. - */ -#define SDL_MAIN_NEEDED - -#elif defined(__ANDROID__) -/* On Android SDL provides a Java class in SDLActivity.java that is the - main activity entry point. - - See docs/README-android.md for more details on extending that class. - */ -#define SDL_MAIN_NEEDED - -/* We need to export SDL_main so it can be launched from Java */ -#define SDLMAIN_DECLSPEC DECLSPEC - -#elif defined(__NACL__) -/* On NACL we use ppapi_simple to set up the application helper code, - then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before - starting the user main function. - All user code is run in a separate thread by ppapi_simple, thus - allowing for blocking io to take place via nacl_io -*/ -#define SDL_MAIN_NEEDED - -#endif -#endif /* SDL_MAIN_HANDLED */ - -#ifndef SDLMAIN_DECLSPEC -#define SDLMAIN_DECLSPEC -#endif - -/** - * \file SDL_main.h - * - * The application's main() function must be called with C linkage, - * and should be declared like this: - * \code - * #ifdef __cplusplus - * extern "C" - * #endif - * int main(int argc, char *argv[]) - * { - * } - * \endcode - */ - -#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) -#define main SDL_main -#endif - -#include "begin_code.h" -#ifdef __cplusplus -extern "C" { -#endif - -/** - * The prototype for the application's main() function - */ -typedef int (*SDL_main_func)(int argc, char *argv[]); -extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]); - - -/** - * This is called by the real SDL main function to let the rest of the - * library know that initialization was done properly. - * - * Calling this yourself without knowing what you're doing can cause - * crashes and hard to diagnose problems with your application. - */ -extern DECLSPEC void SDLCALL SDL_SetMainReady(void); - -#ifdef __WIN32__ - -/** - * This can be called to set the application class at startup - */ -extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst); -extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); - -#endif /* __WIN32__ */ - - -#ifdef __WINRT__ - -/** - * \brief Initializes and launches an SDL/WinRT application. - * - * \param mainFunction The SDL app's C-style main(). - * \param reserved Reserved for future use; should be NULL - * \return 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more - * information on the failure. - */ -extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved); - -#endif /* __WINRT__ */ - -#if defined(__IPHONEOS__) - -/** - * \brief Initializes and launches an SDL application. - * - * \param argc The argc parameter from the application's main() function - * \param argv The argv parameter from the application's main() function - * \param mainFunction The SDL app's C-style main(). - * \return the return value from mainFunction - */ -extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction); - -#endif /* __IPHONEOS__ */ - - -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_main_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_messagebox.h b/Dependencies/SDL/Windows/include/SDL_messagebox.h deleted file mode 100644 index 03639ce..0000000 --- a/Dependencies/SDL/Windows/include/SDL_messagebox.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -#ifndef SDL_messagebox_h_ -#define SDL_messagebox_h_ - -#include "SDL_stdinc.h" -#include "SDL_video.h" /* For SDL_Window */ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief SDL_MessageBox flags. If supported will display warning icon, etc. - */ -typedef enum -{ - SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */ - SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */ - SDL_MESSAGEBOX_INFORMATION = 0x00000040, /**< informational dialog */ - SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080, /**< buttons placed left to right */ - SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100 /**< buttons placed right to left */ -} SDL_MessageBoxFlags; - -/** - * \brief Flags for SDL_MessageBoxButtonData. - */ -typedef enum -{ - SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001, /**< Marks the default button when return is hit */ - SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002 /**< Marks the default button when escape is hit */ -} SDL_MessageBoxButtonFlags; - -/** - * \brief Individual button data. - */ -typedef struct -{ - Uint32 flags; /**< ::SDL_MessageBoxButtonFlags */ - int buttonid; /**< User defined button id (value returned via SDL_ShowMessageBox) */ - const char * text; /**< The UTF-8 button text */ -} SDL_MessageBoxButtonData; - -/** - * \brief RGB value used in a message box color scheme - */ -typedef struct -{ - Uint8 r, g, b; -} SDL_MessageBoxColor; - -typedef enum -{ - SDL_MESSAGEBOX_COLOR_BACKGROUND, - SDL_MESSAGEBOX_COLOR_TEXT, - SDL_MESSAGEBOX_COLOR_BUTTON_BORDER, - SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND, - SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED, - SDL_MESSAGEBOX_COLOR_MAX -} SDL_MessageBoxColorType; - -/** - * \brief A set of colors to use for message box dialogs - */ -typedef struct -{ - SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX]; -} SDL_MessageBoxColorScheme; - -/** - * \brief MessageBox structure containing title, text, window, etc. - */ -typedef struct -{ - Uint32 flags; /**< ::SDL_MessageBoxFlags */ - SDL_Window *window; /**< Parent window, can be NULL */ - const char *title; /**< UTF-8 title */ - const char *message; /**< UTF-8 message text */ - - int numbuttons; - const SDL_MessageBoxButtonData *buttons; - - const SDL_MessageBoxColorScheme *colorScheme; /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */ -} SDL_MessageBoxData; - -/** - * \brief Create a modal message box. - * - * \param messageboxdata The SDL_MessageBoxData structure with title, text, etc. - * \param buttonid The pointer to which user id of hit button should be copied. - * - * \return -1 on error, otherwise 0 and buttonid contains user id of button - * hit or -1 if dialog was closed. - * - * \note This function should be called on the thread that created the parent - * window, or on the main thread if the messagebox has no parent. It will - * block execution of that thread until the user clicks a button or - * closes the messagebox. - */ -extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid); - -/** - * \brief Create a simple modal message box - * - * \param flags ::SDL_MessageBoxFlags - * \param title UTF-8 title text - * \param message UTF-8 message text - * \param window The parent window, or NULL for no parent - * - * \return 0 on success, -1 on error - * - * \sa SDL_ShowMessageBox - */ -extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_messagebox_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_metal.h b/Dependencies/SDL/Windows/include/SDL_metal.h deleted file mode 100644 index 3b7eb18..0000000 --- a/Dependencies/SDL/Windows/include/SDL_metal.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_metal.h - * - * Header file for functions to creating Metal layers and views on SDL windows. - */ - -#ifndef SDL_metal_h_ -#define SDL_metal_h_ - -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS). - * - * \note This can be cast directly to an NSView or UIView. - */ -typedef void *SDL_MetalView; - -/** - * \name Metal support functions - */ -/* @{ */ - -/** - * \brief Create a CAMetalLayer-backed NSView/UIView and attach it to the - * specified window. - * - * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on its - * own. It is up to user code to do that. - * - * The returned handle can be casted directly to a NSView or UIView, and the - * CAMetalLayer can be accessed from the view's 'layer' property. - * - * \code - * SDL_MetalView metalview = SDL_Metal_CreateView(window); - * UIView *uiview = (__bridge UIView *)metalview; - * CAMetalLayer *metallayer = (CAMetalLayer *)uiview.layer; - * // [...] - * SDL_Metal_DestroyView(metalview); - * \endcode - * - * \sa SDL_Metal_DestroyView - */ -extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window); - -/** - * \brief Destroy an existing SDL_MetalView object. - * - * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was - * called after SDL_CreateWindow. - * - * \sa SDL_Metal_CreateView - */ -extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view); - -/* @} *//* Metal support functions */ - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_metal_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_mouse.h b/Dependencies/SDL/Windows/include/SDL_mouse.h deleted file mode 100644 index 99b658e..0000000 --- a/Dependencies/SDL/Windows/include/SDL_mouse.h +++ /dev/null @@ -1,302 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_mouse.h - * - * Include file for SDL mouse event handling. - */ - -#ifndef SDL_mouse_h_ -#define SDL_mouse_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct SDL_Cursor SDL_Cursor; /**< Implementation dependent */ - -/** - * \brief Cursor types for SDL_CreateSystemCursor(). - */ -typedef enum -{ - SDL_SYSTEM_CURSOR_ARROW, /**< Arrow */ - SDL_SYSTEM_CURSOR_IBEAM, /**< I-beam */ - SDL_SYSTEM_CURSOR_WAIT, /**< Wait */ - SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair */ - SDL_SYSTEM_CURSOR_WAITARROW, /**< Small wait cursor (or Wait if not available) */ - SDL_SYSTEM_CURSOR_SIZENWSE, /**< Double arrow pointing northwest and southeast */ - SDL_SYSTEM_CURSOR_SIZENESW, /**< Double arrow pointing northeast and southwest */ - SDL_SYSTEM_CURSOR_SIZEWE, /**< Double arrow pointing west and east */ - SDL_SYSTEM_CURSOR_SIZENS, /**< Double arrow pointing north and south */ - SDL_SYSTEM_CURSOR_SIZEALL, /**< Four pointed arrow pointing north, south, east, and west */ - SDL_SYSTEM_CURSOR_NO, /**< Slashed circle or crossbones */ - SDL_SYSTEM_CURSOR_HAND, /**< Hand */ - SDL_NUM_SYSTEM_CURSORS -} SDL_SystemCursor; - -/** - * \brief Scroll direction types for the Scroll event - */ -typedef enum -{ - SDL_MOUSEWHEEL_NORMAL, /**< The scroll direction is normal */ - SDL_MOUSEWHEEL_FLIPPED /**< The scroll direction is flipped / natural */ -} SDL_MouseWheelDirection; - -/* Function prototypes */ - -/** - * \brief Get the window which currently has mouse focus. - */ -extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void); - -/** - * \brief Retrieve the current state of the mouse. - * - * The current button state is returned as a button bitmask, which can - * be tested using the SDL_BUTTON(X) macros, and x and y are set to the - * mouse cursor position relative to the focus window for the currently - * selected mouse. You can pass NULL for either x or y. - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y); - -/** - * \brief Get the current state of the mouse, in relation to the desktop - * - * This works just like SDL_GetMouseState(), but the coordinates will be - * reported relative to the top-left of the desktop. This can be useful if - * you need to track the mouse outside of a specific window and - * SDL_CaptureMouse() doesn't fit your needs. For example, it could be - * useful if you need to track the mouse while dragging a window, where - * coordinates relative to a window might not be in sync at all times. - * - * \note SDL_GetMouseState() returns the mouse position as SDL understands - * it from the last pump of the event queue. This function, however, - * queries the OS for the current mouse position, and as such, might - * be a slightly less efficient function. Unless you know what you're - * doing and have a good reason to use this function, you probably want - * SDL_GetMouseState() instead. - * - * \param x Returns the current X coord, relative to the desktop. Can be NULL. - * \param y Returns the current Y coord, relative to the desktop. Can be NULL. - * \return The current button state as a bitmask, which can be tested using the SDL_BUTTON(X) macros. - * - * \sa SDL_GetMouseState - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y); - -/** - * \brief Retrieve the relative state of the mouse. - * - * The current button state is returned as a button bitmask, which can - * be tested using the SDL_BUTTON(X) macros, and x and y are set to the - * mouse deltas since the last call to SDL_GetRelativeMouseState(). - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y); - -/** - * \brief Moves the mouse to the given position within the window. - * - * \param window The window to move the mouse into, or NULL for the current mouse focus - * \param x The x coordinate within the window - * \param y The y coordinate within the window - * - * \note This function generates a mouse motion event - */ -extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window, - int x, int y); - -/** - * \brief Moves the mouse to the given position in global screen space. - * - * \param x The x coordinate - * \param y The y coordinate - * \return 0 on success, -1 on error (usually: unsupported by a platform). - * - * \note This function generates a mouse motion event - */ -extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y); - -/** - * \brief Set relative mouse mode. - * - * \param enabled Whether or not to enable relative mode - * - * \return 0 on success, or -1 if relative mode is not supported. - * - * While the mouse is in relative mode, the cursor is hidden, and the - * driver will try to report continuous motion in the current window. - * Only relative motion events will be delivered, the mouse position - * will not change. - * - * \note This function will flush any pending mouse motion. - * - * \sa SDL_GetRelativeMouseMode() - */ -extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled); - -/** - * \brief Capture the mouse, to track input outside an SDL window. - * - * \param enabled Whether or not to enable capturing - * - * Capturing enables your app to obtain mouse events globally, instead of - * just within your window. Not all video targets support this function. - * When capturing is enabled, the current window will get all mouse events, - * but unlike relative mode, no change is made to the cursor and it is - * not restrained to your window. - * - * This function may also deny mouse input to other windows--both those in - * your application and others on the system--so you should use this - * function sparingly, and in small bursts. For example, you might want to - * track the mouse while the user is dragging something, until the user - * releases a mouse button. It is not recommended that you capture the mouse - * for long periods of time, such as the entire time your app is running. - * - * While captured, mouse events still report coordinates relative to the - * current (foreground) window, but those coordinates may be outside the - * bounds of the window (including negative values). Capturing is only - * allowed for the foreground window. If the window loses focus while - * capturing, the capture will be disabled automatically. - * - * While capturing is enabled, the current window will have the - * SDL_WINDOW_MOUSE_CAPTURE flag set. - * - * \return 0 on success, or -1 if not supported. - */ -extern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled); - -/** - * \brief Query whether relative mouse mode is enabled. - * - * \sa SDL_SetRelativeMouseMode() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void); - -/** - * \brief Create a cursor, using the specified bitmap data and - * mask (in MSB format). - * - * The cursor width must be a multiple of 8 bits. - * - * The cursor is created in black and white according to the following: - * - * - * - * - * - * - *
data mask resulting pixel on screen
0 1 White
1 1 Black
0 0 Transparent
1 0 Inverted color if possible, black - * if not.
- * - * \sa SDL_FreeCursor() - */ -extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data, - const Uint8 * mask, - int w, int h, int hot_x, - int hot_y); - -/** - * \brief Create a color cursor. - * - * \sa SDL_FreeCursor() - */ -extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface, - int hot_x, - int hot_y); - -/** - * \brief Create a system cursor. - * - * \sa SDL_FreeCursor() - */ -extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id); - -/** - * \brief Set the active cursor. - */ -extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor); - -/** - * \brief Return the active cursor. - */ -extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void); - -/** - * \brief Return the default cursor. - */ -extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void); - -/** - * \brief Frees a cursor created with SDL_CreateCursor() or similar functions. - * - * \sa SDL_CreateCursor() - * \sa SDL_CreateColorCursor() - * \sa SDL_CreateSystemCursor() - */ -extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor); - -/** - * \brief Toggle whether or not the cursor is shown. - * - * \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current - * state. - * - * \return 1 if the cursor is shown, or 0 if the cursor is hidden. - */ -extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle); - -/** - * Used as a mask when testing buttons in buttonstate. - * - Button 1: Left mouse button - * - Button 2: Middle mouse button - * - Button 3: Right mouse button - */ -#define SDL_BUTTON(X) (1 << ((X)-1)) -#define SDL_BUTTON_LEFT 1 -#define SDL_BUTTON_MIDDLE 2 -#define SDL_BUTTON_RIGHT 3 -#define SDL_BUTTON_X1 4 -#define SDL_BUTTON_X2 5 -#define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT) -#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE) -#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT) -#define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1) -#define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2) - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_mouse_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_mutex.h b/Dependencies/SDL/Windows/include/SDL_mutex.h deleted file mode 100644 index 3c5b955..0000000 --- a/Dependencies/SDL/Windows/include/SDL_mutex.h +++ /dev/null @@ -1,251 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -#ifndef SDL_mutex_h_ -#define SDL_mutex_h_ - -/** - * \file SDL_mutex.h - * - * Functions to provide thread synchronization primitives. - */ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Synchronization functions which can time out return this value - * if they time out. - */ -#define SDL_MUTEX_TIMEDOUT 1 - -/** - * This is the timeout value which corresponds to never time out. - */ -#define SDL_MUTEX_MAXWAIT (~(Uint32)0) - - -/** - * \name Mutex functions - */ -/* @{ */ - -/* The SDL mutex structure, defined in SDL_sysmutex.c */ -struct SDL_mutex; -typedef struct SDL_mutex SDL_mutex; - -/** - * Create a mutex, initialized unlocked. - */ -extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void); - -/** - * Lock the mutex. - * - * \return 0, or -1 on error. - */ -#define SDL_mutexP(m) SDL_LockMutex(m) -extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); - -/** - * Try to lock the mutex - * - * \return 0, SDL_MUTEX_TIMEDOUT, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); - -/** - * Unlock the mutex. - * - * \return 0, or -1 on error. - * - * \warning It is an error to unlock a mutex that has not been locked by - * the current thread, and doing so results in undefined behavior. - */ -#define SDL_mutexV(m) SDL_UnlockMutex(m) -extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex); - -/** - * Destroy a mutex. - */ -extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex); - -/* @} *//* Mutex functions */ - - -/** - * \name Semaphore functions - */ -/* @{ */ - -/* The SDL semaphore structure, defined in SDL_syssem.c */ -struct SDL_semaphore; -typedef struct SDL_semaphore SDL_sem; - -/** - * Create a semaphore, initialized with value, returns NULL on failure. - */ -extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value); - -/** - * Destroy a semaphore. - */ -extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem); - -/** - * This function suspends the calling thread until the semaphore pointed - * to by \c sem has a positive count. It then atomically decreases the - * semaphore count. - */ -extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem); - -/** - * Non-blocking variant of SDL_SemWait(). - * - * \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait would - * block, and -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); - -/** - * Variant of SDL_SemWait() with a timeout in milliseconds. - * - * \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait does not - * succeed in the allotted time, and -1 on error. - * - * \warning On some platforms this function is implemented by looping with a - * delay of 1 ms, and so should be avoided if possible. - */ -extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms); - -/** - * Atomically increases the semaphore's count (not blocking). - * - * \return 0, or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem); - -/** - * Returns the current count of the semaphore. - */ -extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem); - -/* @} *//* Semaphore functions */ - - -/** - * \name Condition variable functions - */ -/* @{ */ - -/* The SDL condition variable structure, defined in SDL_syscond.c */ -struct SDL_cond; -typedef struct SDL_cond SDL_cond; - -/** - * Create a condition variable. - * - * Typical use of condition variables: - * - * Thread A: - * SDL_LockMutex(lock); - * while ( ! condition ) { - * SDL_CondWait(cond, lock); - * } - * SDL_UnlockMutex(lock); - * - * Thread B: - * SDL_LockMutex(lock); - * ... - * condition = true; - * ... - * SDL_CondSignal(cond); - * SDL_UnlockMutex(lock); - * - * There is some discussion whether to signal the condition variable - * with the mutex locked or not. There is some potential performance - * benefit to unlocking first on some platforms, but there are some - * potential race conditions depending on how your code is structured. - * - * In general it's safer to signal the condition variable while the - * mutex is locked. - */ -extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void); - -/** - * Destroy a condition variable. - */ -extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond); - -/** - * Restart one of the threads that are waiting on the condition variable. - * - * \return 0 or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond); - -/** - * Restart all threads that are waiting on the condition variable. - * - * \return 0 or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond); - -/** - * Wait on the condition variable, unlocking the provided mutex. - * - * \warning The mutex must be locked before entering this function! - * - * The mutex is re-locked once the condition variable is signaled. - * - * \return 0 when it is signaled, or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex); - -/** - * Waits for at most \c ms milliseconds, and returns 0 if the condition - * variable is signaled, ::SDL_MUTEX_TIMEDOUT if the condition is not - * signaled in the allotted time, and -1 on error. - * - * \warning On some platforms this function is implemented by looping with a - * delay of 1 ms, and so should be avoided if possible. - */ -extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond, - SDL_mutex * mutex, Uint32 ms); - -/* @} *//* Condition variable functions */ - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_mutex_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_name.h b/Dependencies/SDL/Windows/include/SDL_name.h deleted file mode 100644 index a49c488..0000000 --- a/Dependencies/SDL/Windows/include/SDL_name.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -#ifndef SDLname_h_ -#define SDLname_h_ - -#if defined(__STDC__) || defined(__cplusplus) -#define NeedFunctionPrototypes 1 -#endif - -#define SDL_NAME(X) SDL_##X - -#endif /* SDLname_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_opengl.h b/Dependencies/SDL/Windows/include/SDL_opengl.h deleted file mode 100644 index 5cd302c..0000000 --- a/Dependencies/SDL/Windows/include/SDL_opengl.h +++ /dev/null @@ -1,2183 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_opengl.h - * - * This is a simple file to encapsulate the OpenGL API headers. - */ - -/** - * \def NO_SDL_GLEXT - * - * Define this if you have your own version of glext.h and want to disable the - * version included in SDL_opengl.h. - */ - -#ifndef SDL_opengl_h_ -#define SDL_opengl_h_ - -#include "SDL_config.h" - -#ifndef __IPHONEOS__ /* No OpenGL on iOS. */ - -/* - * Mesa 3-D graphics library - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef __gl_h_ -#define __gl_h_ - -#if defined(USE_MGL_NAMESPACE) -#include "gl_mangle.h" -#endif - - -/********************************************************************** - * Begin system-specific stuff. - */ - -#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) -#define __WIN32__ -#endif - -#if defined(__WIN32__) && !defined(__CYGWIN__) -# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ -# define GLAPI __declspec(dllexport) -# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ -# define GLAPI __declspec(dllimport) -# else /* for use with static link lib build of Win32 edition only */ -# define GLAPI extern -# endif /* _STATIC_MESA support */ -# if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */ -# define GLAPIENTRY -# else -# define GLAPIENTRY __stdcall -# endif -#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ -# define GLAPI extern -# define GLAPIENTRY __stdcall -#elif defined(__OS2__) || defined(__EMX__) /* native os/2 opengl */ -# define GLAPI extern -# define GLAPIENTRY _System -# define APIENTRY _System -# if defined(__GNUC__) && !defined(_System) -# define _System -# endif -#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -# define GLAPI __attribute__((visibility("default"))) -# define GLAPIENTRY -#endif /* WIN32 && !CYGWIN */ - -/* - * WINDOWS: Include windows.h here to define APIENTRY. - * It is also useful when applications include this file by - * including only glut.h, since glut.h depends on windows.h. - * Applications needing to include windows.h with parms other - * than "WIN32_LEAN_AND_MEAN" may include windows.h before - * glut.h or gl.h. - */ -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif -#ifndef NOMINMAX /* don't define min() and max(). */ -#define NOMINMAX -#endif -#include -#endif - -#ifndef GLAPI -#define GLAPI extern -#endif - -#ifndef GLAPIENTRY -#define GLAPIENTRY -#endif - -#ifndef APIENTRY -#define APIENTRY GLAPIENTRY -#endif - -/* "P" suffix to be used for a pointer to a function */ -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif - -#ifndef GLAPIENTRYP -#define GLAPIENTRYP GLAPIENTRY * -#endif - -#if defined(PRAGMA_EXPORT_SUPPORTED) -#pragma export on -#endif - -/* - * End system-specific stuff. - **********************************************************************/ - - - -#ifdef __cplusplus -extern "C" { -#endif - - - -#define GL_VERSION_1_1 1 -#define GL_VERSION_1_2 1 -#define GL_VERSION_1_3 1 -#define GL_ARB_imaging 1 - - -/* - * Datatypes - */ -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef void GLvoid; -typedef signed char GLbyte; /* 1-byte signed */ -typedef short GLshort; /* 2-byte signed */ -typedef int GLint; /* 4-byte signed */ -typedef unsigned char GLubyte; /* 1-byte unsigned */ -typedef unsigned short GLushort; /* 2-byte unsigned */ -typedef unsigned int GLuint; /* 4-byte unsigned */ -typedef int GLsizei; /* 4-byte signed */ -typedef float GLfloat; /* single precision float */ -typedef float GLclampf; /* single precision float in [0,1] */ -typedef double GLdouble; /* double precision float */ -typedef double GLclampd; /* double precision float in [0,1] */ - - - -/* - * Constants - */ - -/* Boolean values */ -#define GL_FALSE 0 -#define GL_TRUE 1 - -/* Data types */ -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_2_BYTES 0x1407 -#define GL_3_BYTES 0x1408 -#define GL_4_BYTES 0x1409 -#define GL_DOUBLE 0x140A - -/* Primitives */ -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 -#define GL_QUADS 0x0007 -#define GL_QUAD_STRIP 0x0008 -#define GL_POLYGON 0x0009 - -/* Vertex Arrays */ -#define GL_VERTEX_ARRAY 0x8074 -#define GL_NORMAL_ARRAY 0x8075 -#define GL_COLOR_ARRAY 0x8076 -#define GL_INDEX_ARRAY 0x8077 -#define GL_TEXTURE_COORD_ARRAY 0x8078 -#define GL_EDGE_FLAG_ARRAY 0x8079 -#define GL_VERTEX_ARRAY_SIZE 0x807A -#define GL_VERTEX_ARRAY_TYPE 0x807B -#define GL_VERTEX_ARRAY_STRIDE 0x807C -#define GL_NORMAL_ARRAY_TYPE 0x807E -#define GL_NORMAL_ARRAY_STRIDE 0x807F -#define GL_COLOR_ARRAY_SIZE 0x8081 -#define GL_COLOR_ARRAY_TYPE 0x8082 -#define GL_COLOR_ARRAY_STRIDE 0x8083 -#define GL_INDEX_ARRAY_TYPE 0x8085 -#define GL_INDEX_ARRAY_STRIDE 0x8086 -#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A -#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C -#define GL_VERTEX_ARRAY_POINTER 0x808E -#define GL_NORMAL_ARRAY_POINTER 0x808F -#define GL_COLOR_ARRAY_POINTER 0x8090 -#define GL_INDEX_ARRAY_POINTER 0x8091 -#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 -#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093 -#define GL_V2F 0x2A20 -#define GL_V3F 0x2A21 -#define GL_C4UB_V2F 0x2A22 -#define GL_C4UB_V3F 0x2A23 -#define GL_C3F_V3F 0x2A24 -#define GL_N3F_V3F 0x2A25 -#define GL_C4F_N3F_V3F 0x2A26 -#define GL_T2F_V3F 0x2A27 -#define GL_T4F_V4F 0x2A28 -#define GL_T2F_C4UB_V3F 0x2A29 -#define GL_T2F_C3F_V3F 0x2A2A -#define GL_T2F_N3F_V3F 0x2A2B -#define GL_T2F_C4F_N3F_V3F 0x2A2C -#define GL_T4F_C4F_N3F_V4F 0x2A2D - -/* Matrix Mode */ -#define GL_MATRIX_MODE 0x0BA0 -#define GL_MODELVIEW 0x1700 -#define GL_PROJECTION 0x1701 -#define GL_TEXTURE 0x1702 - -/* Points */ -#define GL_POINT_SMOOTH 0x0B10 -#define GL_POINT_SIZE 0x0B11 -#define GL_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_POINT_SIZE_RANGE 0x0B12 - -/* Lines */ -#define GL_LINE_SMOOTH 0x0B20 -#define GL_LINE_STIPPLE 0x0B24 -#define GL_LINE_STIPPLE_PATTERN 0x0B25 -#define GL_LINE_STIPPLE_REPEAT 0x0B26 -#define GL_LINE_WIDTH 0x0B21 -#define GL_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_LINE_WIDTH_RANGE 0x0B22 - -/* Polygons */ -#define GL_POINT 0x1B00 -#define GL_LINE 0x1B01 -#define GL_FILL 0x1B02 -#define GL_CW 0x0900 -#define GL_CCW 0x0901 -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_POLYGON_MODE 0x0B40 -#define GL_POLYGON_SMOOTH 0x0B41 -#define GL_POLYGON_STIPPLE 0x0B42 -#define GL_EDGE_FLAG 0x0B43 -#define GL_CULL_FACE 0x0B44 -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_POINT 0x2A01 -#define GL_POLYGON_OFFSET_LINE 0x2A02 -#define GL_POLYGON_OFFSET_FILL 0x8037 - -/* Display Lists */ -#define GL_COMPILE 0x1300 -#define GL_COMPILE_AND_EXECUTE 0x1301 -#define GL_LIST_BASE 0x0B32 -#define GL_LIST_INDEX 0x0B33 -#define GL_LIST_MODE 0x0B30 - -/* Depth buffer */ -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 -#define GL_DEPTH_TEST 0x0B71 -#define GL_DEPTH_BITS 0x0D56 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_COMPONENT 0x1902 - -/* Lighting */ -#define GL_LIGHTING 0x0B50 -#define GL_LIGHT0 0x4000 -#define GL_LIGHT1 0x4001 -#define GL_LIGHT2 0x4002 -#define GL_LIGHT3 0x4003 -#define GL_LIGHT4 0x4004 -#define GL_LIGHT5 0x4005 -#define GL_LIGHT6 0x4006 -#define GL_LIGHT7 0x4007 -#define GL_SPOT_EXPONENT 0x1205 -#define GL_SPOT_CUTOFF 0x1206 -#define GL_CONSTANT_ATTENUATION 0x1207 -#define GL_LINEAR_ATTENUATION 0x1208 -#define GL_QUADRATIC_ATTENUATION 0x1209 -#define GL_AMBIENT 0x1200 -#define GL_DIFFUSE 0x1201 -#define GL_SPECULAR 0x1202 -#define GL_SHININESS 0x1601 -#define GL_EMISSION 0x1600 -#define GL_POSITION 0x1203 -#define GL_SPOT_DIRECTION 0x1204 -#define GL_AMBIENT_AND_DIFFUSE 0x1602 -#define GL_COLOR_INDEXES 0x1603 -#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 -#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51 -#define GL_LIGHT_MODEL_AMBIENT 0x0B53 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_SHADE_MODEL 0x0B54 -#define GL_FLAT 0x1D00 -#define GL_SMOOTH 0x1D01 -#define GL_COLOR_MATERIAL 0x0B57 -#define GL_COLOR_MATERIAL_FACE 0x0B55 -#define GL_COLOR_MATERIAL_PARAMETER 0x0B56 -#define GL_NORMALIZE 0x0BA1 - -/* User clipping planes */ -#define GL_CLIP_PLANE0 0x3000 -#define GL_CLIP_PLANE1 0x3001 -#define GL_CLIP_PLANE2 0x3002 -#define GL_CLIP_PLANE3 0x3003 -#define GL_CLIP_PLANE4 0x3004 -#define GL_CLIP_PLANE5 0x3005 - -/* Accumulation buffer */ -#define GL_ACCUM_RED_BITS 0x0D58 -#define GL_ACCUM_GREEN_BITS 0x0D59 -#define GL_ACCUM_BLUE_BITS 0x0D5A -#define GL_ACCUM_ALPHA_BITS 0x0D5B -#define GL_ACCUM_CLEAR_VALUE 0x0B80 -#define GL_ACCUM 0x0100 -#define GL_ADD 0x0104 -#define GL_LOAD 0x0101 -#define GL_MULT 0x0103 -#define GL_RETURN 0x0102 - -/* Alpha testing */ -#define GL_ALPHA_TEST 0x0BC0 -#define GL_ALPHA_TEST_REF 0x0BC2 -#define GL_ALPHA_TEST_FUNC 0x0BC1 - -/* Blending */ -#define GL_BLEND 0x0BE2 -#define GL_BLEND_SRC 0x0BE1 -#define GL_BLEND_DST 0x0BE0 -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 - -/* Render Mode */ -#define GL_FEEDBACK 0x1C01 -#define GL_RENDER 0x1C00 -#define GL_SELECT 0x1C02 - -/* Feedback */ -#define GL_2D 0x0600 -#define GL_3D 0x0601 -#define GL_3D_COLOR 0x0602 -#define GL_3D_COLOR_TEXTURE 0x0603 -#define GL_4D_COLOR_TEXTURE 0x0604 -#define GL_POINT_TOKEN 0x0701 -#define GL_LINE_TOKEN 0x0702 -#define GL_LINE_RESET_TOKEN 0x0707 -#define GL_POLYGON_TOKEN 0x0703 -#define GL_BITMAP_TOKEN 0x0704 -#define GL_DRAW_PIXEL_TOKEN 0x0705 -#define GL_COPY_PIXEL_TOKEN 0x0706 -#define GL_PASS_THROUGH_TOKEN 0x0700 -#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0 -#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1 -#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2 - -/* Selection */ -#define GL_SELECTION_BUFFER_POINTER 0x0DF3 -#define GL_SELECTION_BUFFER_SIZE 0x0DF4 - -/* Fog */ -#define GL_FOG 0x0B60 -#define GL_FOG_MODE 0x0B65 -#define GL_FOG_DENSITY 0x0B62 -#define GL_FOG_COLOR 0x0B66 -#define GL_FOG_INDEX 0x0B61 -#define GL_FOG_START 0x0B63 -#define GL_FOG_END 0x0B64 -#define GL_LINEAR 0x2601 -#define GL_EXP 0x0800 -#define GL_EXP2 0x0801 - -/* Logic Ops */ -#define GL_LOGIC_OP 0x0BF1 -#define GL_INDEX_LOGIC_OP 0x0BF1 -#define GL_COLOR_LOGIC_OP 0x0BF2 -#define GL_LOGIC_OP_MODE 0x0BF0 -#define GL_CLEAR 0x1500 -#define GL_SET 0x150F -#define GL_COPY 0x1503 -#define GL_COPY_INVERTED 0x150C -#define GL_NOOP 0x1505 -#define GL_INVERT 0x150A -#define GL_AND 0x1501 -#define GL_NAND 0x150E -#define GL_OR 0x1507 -#define GL_NOR 0x1508 -#define GL_XOR 0x1506 -#define GL_EQUIV 0x1509 -#define GL_AND_REVERSE 0x1502 -#define GL_AND_INVERTED 0x1504 -#define GL_OR_REVERSE 0x150B -#define GL_OR_INVERTED 0x150D - -/* Stencil */ -#define GL_STENCIL_BITS 0x0D57 -#define GL_STENCIL_TEST 0x0B90 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_INDEX 0x1901 -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 - -/* Buffers, Pixel Drawing/Reading */ -#define GL_NONE 0 -#define GL_LEFT 0x0406 -#define GL_RIGHT 0x0407 -/*GL_FRONT 0x0404 */ -/*GL_BACK 0x0405 */ -/*GL_FRONT_AND_BACK 0x0408 */ -#define GL_FRONT_LEFT 0x0400 -#define GL_FRONT_RIGHT 0x0401 -#define GL_BACK_LEFT 0x0402 -#define GL_BACK_RIGHT 0x0403 -#define GL_AUX0 0x0409 -#define GL_AUX1 0x040A -#define GL_AUX2 0x040B -#define GL_AUX3 0x040C -#define GL_COLOR_INDEX 0x1900 -#define GL_RED 0x1903 -#define GL_GREEN 0x1904 -#define GL_BLUE 0x1905 -#define GL_ALPHA 0x1906 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A -#define GL_ALPHA_BITS 0x0D55 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_INDEX_BITS 0x0D51 -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_AUX_BUFFERS 0x0C00 -#define GL_READ_BUFFER 0x0C02 -#define GL_DRAW_BUFFER 0x0C01 -#define GL_DOUBLEBUFFER 0x0C32 -#define GL_STEREO 0x0C33 -#define GL_BITMAP 0x1A00 -#define GL_COLOR 0x1800 -#define GL_DEPTH 0x1801 -#define GL_STENCIL 0x1802 -#define GL_DITHER 0x0BD0 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 - -/* Implementation limits */ -#define GL_MAX_LIST_NESTING 0x0B31 -#define GL_MAX_EVAL_ORDER 0x0D30 -#define GL_MAX_LIGHTS 0x0D31 -#define GL_MAX_CLIP_PLANES 0x0D32 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_PIXEL_MAP_TABLE 0x0D34 -#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35 -#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 -#define GL_MAX_NAME_STACK_DEPTH 0x0D37 -#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 -#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B - -/* Gets */ -#define GL_ATTRIB_STACK_DEPTH 0x0BB0 -#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_CURRENT_INDEX 0x0B01 -#define GL_CURRENT_COLOR 0x0B00 -#define GL_CURRENT_NORMAL 0x0B02 -#define GL_CURRENT_RASTER_COLOR 0x0B04 -#define GL_CURRENT_RASTER_DISTANCE 0x0B09 -#define GL_CURRENT_RASTER_INDEX 0x0B05 -#define GL_CURRENT_RASTER_POSITION 0x0B07 -#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06 -#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08 -#define GL_CURRENT_TEXTURE_COORDS 0x0B03 -#define GL_INDEX_CLEAR_VALUE 0x0C20 -#define GL_INDEX_MODE 0x0C30 -#define GL_INDEX_WRITEMASK 0x0C21 -#define GL_MODELVIEW_MATRIX 0x0BA6 -#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 -#define GL_NAME_STACK_DEPTH 0x0D70 -#define GL_PROJECTION_MATRIX 0x0BA7 -#define GL_PROJECTION_STACK_DEPTH 0x0BA4 -#define GL_RENDER_MODE 0x0C40 -#define GL_RGBA_MODE 0x0C31 -#define GL_TEXTURE_MATRIX 0x0BA8 -#define GL_TEXTURE_STACK_DEPTH 0x0BA5 -#define GL_VIEWPORT 0x0BA2 - -/* Evaluators */ -#define GL_AUTO_NORMAL 0x0D80 -#define GL_MAP1_COLOR_4 0x0D90 -#define GL_MAP1_INDEX 0x0D91 -#define GL_MAP1_NORMAL 0x0D92 -#define GL_MAP1_TEXTURE_COORD_1 0x0D93 -#define GL_MAP1_TEXTURE_COORD_2 0x0D94 -#define GL_MAP1_TEXTURE_COORD_3 0x0D95 -#define GL_MAP1_TEXTURE_COORD_4 0x0D96 -#define GL_MAP1_VERTEX_3 0x0D97 -#define GL_MAP1_VERTEX_4 0x0D98 -#define GL_MAP2_COLOR_4 0x0DB0 -#define GL_MAP2_INDEX 0x0DB1 -#define GL_MAP2_NORMAL 0x0DB2 -#define GL_MAP2_TEXTURE_COORD_1 0x0DB3 -#define GL_MAP2_TEXTURE_COORD_2 0x0DB4 -#define GL_MAP2_TEXTURE_COORD_3 0x0DB5 -#define GL_MAP2_TEXTURE_COORD_4 0x0DB6 -#define GL_MAP2_VERTEX_3 0x0DB7 -#define GL_MAP2_VERTEX_4 0x0DB8 -#define GL_MAP1_GRID_DOMAIN 0x0DD0 -#define GL_MAP1_GRID_SEGMENTS 0x0DD1 -#define GL_MAP2_GRID_DOMAIN 0x0DD2 -#define GL_MAP2_GRID_SEGMENTS 0x0DD3 -#define GL_COEFF 0x0A00 -#define GL_ORDER 0x0A01 -#define GL_DOMAIN 0x0A02 - -/* Hints */ -#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 -#define GL_POINT_SMOOTH_HINT 0x0C51 -#define GL_LINE_SMOOTH_HINT 0x0C52 -#define GL_POLYGON_SMOOTH_HINT 0x0C53 -#define GL_FOG_HINT 0x0C54 -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 - -/* Scissor box */ -#define GL_SCISSOR_BOX 0x0C10 -#define GL_SCISSOR_TEST 0x0C11 - -/* Pixel Mode / Transfer */ -#define GL_MAP_COLOR 0x0D10 -#define GL_MAP_STENCIL 0x0D11 -#define GL_INDEX_SHIFT 0x0D12 -#define GL_INDEX_OFFSET 0x0D13 -#define GL_RED_SCALE 0x0D14 -#define GL_RED_BIAS 0x0D15 -#define GL_GREEN_SCALE 0x0D18 -#define GL_GREEN_BIAS 0x0D19 -#define GL_BLUE_SCALE 0x0D1A -#define GL_BLUE_BIAS 0x0D1B -#define GL_ALPHA_SCALE 0x0D1C -#define GL_ALPHA_BIAS 0x0D1D -#define GL_DEPTH_SCALE 0x0D1E -#define GL_DEPTH_BIAS 0x0D1F -#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1 -#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0 -#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2 -#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3 -#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4 -#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5 -#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6 -#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7 -#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8 -#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9 -#define GL_PIXEL_MAP_S_TO_S 0x0C71 -#define GL_PIXEL_MAP_I_TO_I 0x0C70 -#define GL_PIXEL_MAP_I_TO_R 0x0C72 -#define GL_PIXEL_MAP_I_TO_G 0x0C73 -#define GL_PIXEL_MAP_I_TO_B 0x0C74 -#define GL_PIXEL_MAP_I_TO_A 0x0C75 -#define GL_PIXEL_MAP_R_TO_R 0x0C76 -#define GL_PIXEL_MAP_G_TO_G 0x0C77 -#define GL_PIXEL_MAP_B_TO_B 0x0C78 -#define GL_PIXEL_MAP_A_TO_A 0x0C79 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_PACK_LSB_FIRST 0x0D01 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SWAP_BYTES 0x0D00 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_UNPACK_LSB_FIRST 0x0CF1 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SWAP_BYTES 0x0CF0 -#define GL_ZOOM_X 0x0D16 -#define GL_ZOOM_Y 0x0D17 - -/* Texture mapping */ -#define GL_TEXTURE_ENV 0x2300 -#define GL_TEXTURE_ENV_MODE 0x2200 -#define GL_TEXTURE_1D 0x0DE0 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_ENV_COLOR 0x2201 -#define GL_TEXTURE_GEN_S 0x0C60 -#define GL_TEXTURE_GEN_T 0x0C61 -#define GL_TEXTURE_GEN_R 0x0C62 -#define GL_TEXTURE_GEN_Q 0x0C63 -#define GL_TEXTURE_GEN_MODE 0x2500 -#define GL_TEXTURE_BORDER_COLOR 0x1004 -#define GL_TEXTURE_WIDTH 0x1000 -#define GL_TEXTURE_HEIGHT 0x1001 -#define GL_TEXTURE_BORDER 0x1005 -#define GL_TEXTURE_COMPONENTS 0x1003 -#define GL_TEXTURE_RED_SIZE 0x805C -#define GL_TEXTURE_GREEN_SIZE 0x805D -#define GL_TEXTURE_BLUE_SIZE 0x805E -#define GL_TEXTURE_ALPHA_SIZE 0x805F -#define GL_TEXTURE_LUMINANCE_SIZE 0x8060 -#define GL_TEXTURE_INTENSITY_SIZE 0x8061 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_OBJECT_LINEAR 0x2401 -#define GL_OBJECT_PLANE 0x2501 -#define GL_EYE_LINEAR 0x2400 -#define GL_EYE_PLANE 0x2502 -#define GL_SPHERE_MAP 0x2402 -#define GL_DECAL 0x2101 -#define GL_MODULATE 0x2100 -#define GL_NEAREST 0x2600 -#define GL_REPEAT 0x2901 -#define GL_CLAMP 0x2900 -#define GL_S 0x2000 -#define GL_T 0x2001 -#define GL_R 0x2002 -#define GL_Q 0x2003 - -/* Utility */ -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 - -/* Errors */ -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_OUT_OF_MEMORY 0x0505 - -/* glPush/PopAttrib bits */ -#define GL_CURRENT_BIT 0x00000001 -#define GL_POINT_BIT 0x00000002 -#define GL_LINE_BIT 0x00000004 -#define GL_POLYGON_BIT 0x00000008 -#define GL_POLYGON_STIPPLE_BIT 0x00000010 -#define GL_PIXEL_MODE_BIT 0x00000020 -#define GL_LIGHTING_BIT 0x00000040 -#define GL_FOG_BIT 0x00000080 -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_ACCUM_BUFFER_BIT 0x00000200 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_VIEWPORT_BIT 0x00000800 -#define GL_TRANSFORM_BIT 0x00001000 -#define GL_ENABLE_BIT 0x00002000 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_HINT_BIT 0x00008000 -#define GL_EVAL_BIT 0x00010000 -#define GL_LIST_BIT 0x00020000 -#define GL_TEXTURE_BIT 0x00040000 -#define GL_SCISSOR_BIT 0x00080000 -#define GL_ALL_ATTRIB_BITS 0x000FFFFF - - -/* OpenGL 1.1 */ -#define GL_PROXY_TEXTURE_1D 0x8063 -#define GL_PROXY_TEXTURE_2D 0x8064 -#define GL_TEXTURE_PRIORITY 0x8066 -#define GL_TEXTURE_RESIDENT 0x8067 -#define GL_TEXTURE_BINDING_1D 0x8068 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 -#define GL_ALPHA4 0x803B -#define GL_ALPHA8 0x803C -#define GL_ALPHA12 0x803D -#define GL_ALPHA16 0x803E -#define GL_LUMINANCE4 0x803F -#define GL_LUMINANCE8 0x8040 -#define GL_LUMINANCE12 0x8041 -#define GL_LUMINANCE16 0x8042 -#define GL_LUMINANCE4_ALPHA4 0x8043 -#define GL_LUMINANCE6_ALPHA2 0x8044 -#define GL_LUMINANCE8_ALPHA8 0x8045 -#define GL_LUMINANCE12_ALPHA4 0x8046 -#define GL_LUMINANCE12_ALPHA12 0x8047 -#define GL_LUMINANCE16_ALPHA16 0x8048 -#define GL_INTENSITY 0x8049 -#define GL_INTENSITY4 0x804A -#define GL_INTENSITY8 0x804B -#define GL_INTENSITY12 0x804C -#define GL_INTENSITY16 0x804D -#define GL_R3_G3_B2 0x2A10 -#define GL_RGB4 0x804F -#define GL_RGB5 0x8050 -#define GL_RGB8 0x8051 -#define GL_RGB10 0x8052 -#define GL_RGB12 0x8053 -#define GL_RGB16 0x8054 -#define GL_RGBA2 0x8055 -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGBA8 0x8058 -#define GL_RGB10_A2 0x8059 -#define GL_RGBA12 0x805A -#define GL_RGBA16 0x805B -#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001 -#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002 -#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF -#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF - - - -/* - * Miscellaneous - */ - -GLAPI void GLAPIENTRY glClearIndex( GLfloat c ); - -GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); - -GLAPI void GLAPIENTRY glClear( GLbitfield mask ); - -GLAPI void GLAPIENTRY glIndexMask( GLuint mask ); - -GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); - -GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref ); - -GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor ); - -GLAPI void GLAPIENTRY glLogicOp( GLenum opcode ); - -GLAPI void GLAPIENTRY glCullFace( GLenum mode ); - -GLAPI void GLAPIENTRY glFrontFace( GLenum mode ); - -GLAPI void GLAPIENTRY glPointSize( GLfloat size ); - -GLAPI void GLAPIENTRY glLineWidth( GLfloat width ); - -GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern ); - -GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode ); - -GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units ); - -GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask ); - -GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask ); - -GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag ); - -GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag ); - -GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height); - -GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation ); - -GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation ); - -GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode ); - -GLAPI void GLAPIENTRY glReadBuffer( GLenum mode ); - -GLAPI void GLAPIENTRY glEnable( GLenum cap ); - -GLAPI void GLAPIENTRY glDisable( GLenum cap ); - -GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap ); - - -GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */ - -GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */ - - -GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params ); - -GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params ); - -GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params ); - -GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask ); - -GLAPI void GLAPIENTRY glPopAttrib( void ); - - -GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */ - -GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */ - - -GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode ); - -GLAPI GLenum GLAPIENTRY glGetError( void ); - -GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name ); - -GLAPI void GLAPIENTRY glFinish( void ); - -GLAPI void GLAPIENTRY glFlush( void ); - -GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode ); - - -/* - * Depth Buffer - */ - -GLAPI void GLAPIENTRY glClearDepth( GLclampd depth ); - -GLAPI void GLAPIENTRY glDepthFunc( GLenum func ); - -GLAPI void GLAPIENTRY glDepthMask( GLboolean flag ); - -GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val ); - - -/* - * Accumulation Buffer - */ - -GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); - -GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value ); - - -/* - * Transformation - */ - -GLAPI void GLAPIENTRY glMatrixMode( GLenum mode ); - -GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble near_val, GLdouble far_val ); - -GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble near_val, GLdouble far_val ); - -GLAPI void GLAPIENTRY glViewport( GLint x, GLint y, - GLsizei width, GLsizei height ); - -GLAPI void GLAPIENTRY glPushMatrix( void ); - -GLAPI void GLAPIENTRY glPopMatrix( void ); - -GLAPI void GLAPIENTRY glLoadIdentity( void ); - -GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m ); -GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m ); - -GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m ); -GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m ); - -GLAPI void GLAPIENTRY glRotated( GLdouble angle, - GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glRotatef( GLfloat angle, - GLfloat x, GLfloat y, GLfloat z ); - -GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z ); - -GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z ); - - -/* - * Display Lists - */ - -GLAPI GLboolean GLAPIENTRY glIsList( GLuint list ); - -GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range ); - -GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range ); - -GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode ); - -GLAPI void GLAPIENTRY glEndList( void ); - -GLAPI void GLAPIENTRY glCallList( GLuint list ); - -GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type, - const GLvoid *lists ); - -GLAPI void GLAPIENTRY glListBase( GLuint base ); - - -/* - * Drawing Functions - */ - -GLAPI void GLAPIENTRY glBegin( GLenum mode ); - -GLAPI void GLAPIENTRY glEnd( void ); - - -GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y ); -GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y ); -GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y ); -GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y ); - -GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z ); -GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z ); -GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z ); - -GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); -GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); -GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w ); -GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w ); - -GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glVertex2iv( const GLint *v ); -GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glVertex3iv( const GLint *v ); -GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glVertex4iv( const GLint *v ); -GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz ); -GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz ); -GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz ); -GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz ); -GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz ); - -GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v ); -GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glNormal3iv( const GLint *v ); -GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glIndexd( GLdouble c ); -GLAPI void GLAPIENTRY glIndexf( GLfloat c ); -GLAPI void GLAPIENTRY glIndexi( GLint c ); -GLAPI void GLAPIENTRY glIndexs( GLshort c ); -GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */ - -GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c ); -GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c ); -GLAPI void GLAPIENTRY glIndexiv( const GLint *c ); -GLAPI void GLAPIENTRY glIndexsv( const GLshort *c ); -GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */ - -GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue ); -GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue ); -GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue ); -GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue ); -GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue ); -GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue ); -GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue ); -GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue ); - -GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green, - GLbyte blue, GLbyte alpha ); -GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green, - GLdouble blue, GLdouble alpha ); -GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green, - GLfloat blue, GLfloat alpha ); -GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green, - GLint blue, GLint alpha ); -GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green, - GLshort blue, GLshort alpha ); -GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha ); -GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green, - GLuint blue, GLuint alpha ); -GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green, - GLushort blue, GLushort alpha ); - - -GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v ); -GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glColor3iv( const GLint *v ); -GLAPI void GLAPIENTRY glColor3sv( const GLshort *v ); -GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v ); -GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v ); -GLAPI void GLAPIENTRY glColor3usv( const GLushort *v ); - -GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v ); -GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glColor4iv( const GLint *v ); -GLAPI void GLAPIENTRY glColor4sv( const GLshort *v ); -GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v ); -GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v ); -GLAPI void GLAPIENTRY glColor4usv( const GLushort *v ); - - -GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s ); -GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s ); -GLAPI void GLAPIENTRY glTexCoord1i( GLint s ); -GLAPI void GLAPIENTRY glTexCoord1s( GLshort s ); - -GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t ); -GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t ); -GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t ); -GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t ); - -GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r ); -GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r ); -GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r ); -GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r ); - -GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ); -GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q ); -GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q ); -GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ); - -GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y ); -GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y ); -GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y ); -GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y ); - -GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z ); -GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z ); -GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z ); - -GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); -GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); -GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w ); -GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w ); - -GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v ); -GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v ); -GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v ); -GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ); -GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); -GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 ); -GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ); - - -GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 ); -GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 ); -GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 ); -GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 ); - - -/* - * Vertex Arrays (1.1) - */ - -GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride, - const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride, - const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params ); - -GLAPI void GLAPIENTRY glArrayElement( GLint i ); - -GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count ); - -GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count, - GLenum type, const GLvoid *indices ); - -GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride, - const GLvoid *pointer ); - -/* - * Lighting - */ - -GLAPI void GLAPIENTRY glShadeModel( GLenum mode ); - -GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param ); -GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname, - const GLfloat *params ); -GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname, - const GLint *params ); - -GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname, - GLfloat *params ); -GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param ); -GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param ); -GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params ); - -GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode ); - - -/* - * Raster functions - */ - -GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor ); - -GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize, - const GLfloat *values ); -GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize, - const GLuint *values ); -GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize, - const GLushort *values ); - -GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values ); -GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values ); -GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values ); - -GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height, - GLfloat xorig, GLfloat yorig, - GLfloat xmove, GLfloat ymove, - const GLubyte *bitmap ); - -GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - GLvoid *pixels ); - -GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum type ); - -/* - * Stenciling - */ - -GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask ); - -GLAPI void GLAPIENTRY glStencilMask( GLuint mask ); - -GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass ); - -GLAPI void GLAPIENTRY glClearStencil( GLint s ); - - - -/* - * Texture mapping - */ - -GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param ); -GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params ); -GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); -GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname, - const GLfloat *params ); -GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname, - const GLint *params ); - -GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target, - GLenum pname, GLfloat *params); -GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target, - GLenum pname, GLint *params ); - -GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level, - GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level, - GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLsizei height, - GLint border, GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level, - GLenum format, GLenum type, - GLvoid *pixels ); - - -/* 1.1 functions */ - -GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures ); - -GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures); - -GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture ); - -GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n, - const GLuint *textures, - const GLclampf *priorities ); - -GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n, - const GLuint *textures, - GLboolean *residences ); - -GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture ); - - -GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level, - GLint xoffset, - GLsizei width, GLenum format, - GLenum type, const GLvoid *pixels ); - - -GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ); - - -GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level, - GLenum internalformat, - GLint x, GLint y, - GLsizei width, GLint border ); - - -GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level, - GLenum internalformat, - GLint x, GLint y, - GLsizei width, GLsizei height, - GLint border ); - - -GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level, - GLint xoffset, GLint x, GLint y, - GLsizei width ); - - -GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint x, GLint y, - GLsizei width, GLsizei height ); - - -/* - * Evaluators - */ - -GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2, - GLint stride, - GLint order, const GLdouble *points ); -GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2, - GLint stride, - GLint order, const GLfloat *points ); - -GLAPI void GLAPIENTRY glMap2d( GLenum target, - GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, - GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, - const GLdouble *points ); -GLAPI void GLAPIENTRY glMap2f( GLenum target, - GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, - GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, - const GLfloat *points ); - -GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v ); -GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v ); -GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v ); - -GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u ); -GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u ); - -GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u ); -GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u ); - -GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v ); -GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v ); - -GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u ); -GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u ); - -GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ); -GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ); - -GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2, - GLint vn, GLdouble v1, GLdouble v2 ); -GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2, - GLint vn, GLfloat v1, GLfloat v2 ); - -GLAPI void GLAPIENTRY glEvalPoint1( GLint i ); - -GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j ); - -GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 ); - -GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); - - -/* - * Fog - */ - -GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param ); - -GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params ); - -GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params ); - - -/* - * Selection and Feedback - */ - -GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ); - -GLAPI void GLAPIENTRY glPassThrough( GLfloat token ); - -GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer ); - -GLAPI void GLAPIENTRY glInitNames( void ); - -GLAPI void GLAPIENTRY glLoadName( GLuint name ); - -GLAPI void GLAPIENTRY glPushName( GLuint name ); - -GLAPI void GLAPIENTRY glPopName( void ); - - - -/* - * OpenGL 1.2 - */ - -#define GL_RESCALE_NORMAL 0x803A -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 -#define GL_SINGLE_COLOR 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR 0x81FA -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_TEXTURE_BINDING_3D 0x806A - -GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start, - GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); - -GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLsizei height, - GLsizei depth, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, - GLenum format, - GLenum type, const GLvoid *pixels); - -GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLint x, - GLint y, GLsizei width, - GLsizei height ); - -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); - - -/* - * GL_ARB_imaging - */ - -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_COLOR_TABLE 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 -#define GL_PROXY_COLOR_TABLE 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 -#define GL_COLOR_TABLE_SCALE 0x80D6 -#define GL_COLOR_TABLE_BIAS 0x80D7 -#define GL_COLOR_TABLE_FORMAT 0x80D8 -#define GL_COLOR_TABLE_WIDTH 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF -#define GL_CONVOLUTION_1D 0x8010 -#define GL_CONVOLUTION_2D 0x8011 -#define GL_SEPARABLE_2D 0x8012 -#define GL_CONVOLUTION_BORDER_MODE 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS 0x8015 -#define GL_REDUCE 0x8016 -#define GL_CONVOLUTION_FORMAT 0x8017 -#define GL_CONVOLUTION_WIDTH 0x8018 -#define GL_CONVOLUTION_HEIGHT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 -#define GL_CONSTANT_BORDER 0x8151 -#define GL_REPLICATE_BORDER 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR 0x8154 -#define GL_COLOR_MATRIX 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB -#define GL_HISTOGRAM 0x8024 -#define GL_PROXY_HISTOGRAM 0x8025 -#define GL_HISTOGRAM_WIDTH 0x8026 -#define GL_HISTOGRAM_FORMAT 0x8027 -#define GL_HISTOGRAM_RED_SIZE 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C -#define GL_HISTOGRAM_SINK 0x802D -#define GL_MINMAX 0x802E -#define GL_MINMAX_FORMAT 0x802F -#define GL_MINMAX_SINK 0x8030 -#define GL_TABLE_TOO_LARGE 0x8031 -#define GL_BLEND_EQUATION 0x8009 -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_FUNC_ADD 0x8006 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_BLEND_COLOR 0x8005 - - -GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat, - GLsizei width, GLenum format, - GLenum type, const GLvoid *table ); - -GLAPI void GLAPIENTRY glColorSubTable( GLenum target, - GLsizei start, GLsizei count, - GLenum format, GLenum type, - const GLvoid *data ); - -GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname, - const GLint *params); - -GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname, - const GLfloat *params); - -GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start, - GLint x, GLint y, GLsizei width ); - -GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width ); - -GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format, - GLenum type, GLvoid *table ); - -GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glBlendEquation( GLenum mode ); - -GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green, - GLclampf blue, GLclampf alpha ); - -GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width, - GLenum internalformat, GLboolean sink ); - -GLAPI void GLAPIENTRY glResetHistogram( GLenum target ); - -GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset, - GLenum format, GLenum type, - GLvoid *values ); - -GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat, - GLboolean sink ); - -GLAPI void GLAPIENTRY glResetMinmax( GLenum target ); - -GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset, - GLenum format, GLenum types, - GLvoid *values ); - -GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target, - GLenum internalformat, GLsizei width, GLenum format, GLenum type, - const GLvoid *image ); - -GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target, - GLenum internalformat, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid *image ); - -GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname, - GLfloat params ); - -GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname, - const GLfloat *params ); - -GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname, - GLint params ); - -GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname, - const GLint *params ); - -GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target, - GLenum internalformat, GLint x, GLint y, GLsizei width ); - -GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target, - GLenum internalformat, GLint x, GLint y, GLsizei width, - GLsizei height); - -GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format, - GLenum type, GLvoid *image ); - -GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target, - GLenum internalformat, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid *row, const GLvoid *column ); - -GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format, - GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); - - - - -/* - * OpenGL 1.3 - */ - -/* multitexture */ -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 -#define GL_MAX_TEXTURE_UNITS 0x84E2 -/* texture_cube_map */ -#define GL_NORMAL_MAP 0x8511 -#define GL_REFLECTION_MAP 0x8512 -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -/* texture_compression */ -#define GL_COMPRESSED_ALPHA 0x84E9 -#define GL_COMPRESSED_LUMINANCE 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB -#define GL_COMPRESSED_INTENSITY 0x84EC -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -/* multisample */ -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_MULTISAMPLE_BIT 0x20000000 -/* transpose_matrix */ -#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 -/* texture_env_combine */ -#define GL_COMBINE 0x8570 -#define GL_COMBINE_RGB 0x8571 -#define GL_COMBINE_ALPHA 0x8572 -#define GL_SOURCE0_RGB 0x8580 -#define GL_SOURCE1_RGB 0x8581 -#define GL_SOURCE2_RGB 0x8582 -#define GL_SOURCE0_ALPHA 0x8588 -#define GL_SOURCE1_ALPHA 0x8589 -#define GL_SOURCE2_ALPHA 0x858A -#define GL_OPERAND0_RGB 0x8590 -#define GL_OPERAND1_RGB 0x8591 -#define GL_OPERAND2_RGB 0x8592 -#define GL_OPERAND0_ALPHA 0x8598 -#define GL_OPERAND1_ALPHA 0x8599 -#define GL_OPERAND2_ALPHA 0x859A -#define GL_RGB_SCALE 0x8573 -#define GL_ADD_SIGNED 0x8574 -#define GL_INTERPOLATE 0x8575 -#define GL_SUBTRACT 0x84E7 -#define GL_CONSTANT 0x8576 -#define GL_PRIMARY_COLOR 0x8577 -#define GL_PREVIOUS 0x8578 -/* texture_env_dot3 */ -#define GL_DOT3_RGB 0x86AE -#define GL_DOT3_RGBA 0x86AF -/* texture_border_clamp */ -#define GL_CLAMP_TO_BORDER 0x812D - -GLAPI void GLAPIENTRY glActiveTexture( GLenum texture ); - -GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture ); - -GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img ); - -GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v ); - - -GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] ); - -GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] ); - -GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] ); - -GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] ); - -GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert ); - - -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); - - - -/* - * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1) - */ -#ifndef GL_ARB_multitexture -#define GL_ARB_multitexture 1 - -#define GL_TEXTURE0_ARB 0x84C0 -#define GL_TEXTURE1_ARB 0x84C1 -#define GL_TEXTURE2_ARB 0x84C2 -#define GL_TEXTURE3_ARB 0x84C3 -#define GL_TEXTURE4_ARB 0x84C4 -#define GL_TEXTURE5_ARB 0x84C5 -#define GL_TEXTURE6_ARB 0x84C6 -#define GL_TEXTURE7_ARB 0x84C7 -#define GL_TEXTURE8_ARB 0x84C8 -#define GL_TEXTURE9_ARB 0x84C9 -#define GL_TEXTURE10_ARB 0x84CA -#define GL_TEXTURE11_ARB 0x84CB -#define GL_TEXTURE12_ARB 0x84CC -#define GL_TEXTURE13_ARB 0x84CD -#define GL_TEXTURE14_ARB 0x84CE -#define GL_TEXTURE15_ARB 0x84CF -#define GL_TEXTURE16_ARB 0x84D0 -#define GL_TEXTURE17_ARB 0x84D1 -#define GL_TEXTURE18_ARB 0x84D2 -#define GL_TEXTURE19_ARB 0x84D3 -#define GL_TEXTURE20_ARB 0x84D4 -#define GL_TEXTURE21_ARB 0x84D5 -#define GL_TEXTURE22_ARB 0x84D6 -#define GL_TEXTURE23_ARB 0x84D7 -#define GL_TEXTURE24_ARB 0x84D8 -#define GL_TEXTURE25_ARB 0x84D9 -#define GL_TEXTURE26_ARB 0x84DA -#define GL_TEXTURE27_ARB 0x84DB -#define GL_TEXTURE28_ARB 0x84DC -#define GL_TEXTURE29_ARB 0x84DD -#define GL_TEXTURE30_ARB 0x84DE -#define GL_TEXTURE31_ARB 0x84DF -#define GL_ACTIVE_TEXTURE_ARB 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 -#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 - -GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture); -GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture); -GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s); -GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s); -GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s); -GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s); -GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v); -GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t); -GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t); -GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t); -GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t); -GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v); -GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r); -GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v); -GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v); - -typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); - -#endif /* GL_ARB_multitexture */ - - - -/* - * Define this token if you want "old-style" header file behaviour (extensions - * defined in gl.h). Otherwise, extensions will be included from glext.h. - */ -#if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY) -#include "SDL_opengl_glext.h" -#endif /* GL_GLEXT_LEGACY */ - - - -/* - * ???. GL_MESA_packed_depth_stencil - * XXX obsolete - */ -#ifndef GL_MESA_packed_depth_stencil -#define GL_MESA_packed_depth_stencil 1 - -#define GL_DEPTH_STENCIL_MESA 0x8750 -#define GL_UNSIGNED_INT_24_8_MESA 0x8751 -#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752 -#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753 -#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754 - -#endif /* GL_MESA_packed_depth_stencil */ - - -#ifndef GL_ATI_blend_equation_separate -#define GL_ATI_blend_equation_separate 1 - -#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D - -GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA ); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA); - -#endif /* GL_ATI_blend_equation_separate */ - - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -typedef void* GLeglImageOES; -#endif - -#ifndef GL_OES_EGL_image -#define GL_OES_EGL_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); -#endif -typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); -#endif - - -/** - ** NOTE!!!!! If you add new functions to this file, or update - ** glext.h be sure to regenerate the gl_mangle.h file. See comments - ** in that file for details. - **/ - - - -/********************************************************************** - * Begin system-specific stuff - */ -#if defined(PRAGMA_EXPORT_SUPPORTED) -#pragma export off -#endif - -/* - * End system-specific stuff - **********************************************************************/ - - -#ifdef __cplusplus -} -#endif - -#endif /* __gl_h_ */ - -#endif /* !__IPHONEOS__ */ - -#endif /* SDL_opengl_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_opengl_glext.h b/Dependencies/SDL/Windows/include/SDL_opengl_glext.h deleted file mode 100644 index 6a402b1..0000000 --- a/Dependencies/SDL/Windows/include/SDL_opengl_glext.h +++ /dev/null @@ -1,11180 +0,0 @@ -#ifndef __glext_h_ -#define __glext_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2014 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 26745 $ on $Date: 2014-05-21 03:12:26 -0700 (Wed, 21 May 2014) $ -*/ - -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif -#ifndef NOMINMAX /* don't define min() and max(). */ -#define NOMINMAX -#endif -#include -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif -#ifndef GLAPI -#define GLAPI extern -#endif - -#define GL_GLEXT_VERSION 20140521 - -/* Generated C header for: - * API: gl - * Profile: compatibility - * Versions considered: .* - * Versions emitted: 1\.[2-9]|[234]\.[0-9] - * Default extensions included: gl - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef GL_VERSION_1_2 -#define GL_VERSION_1_2 1 -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_RESCALE_NORMAL 0x803A -#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 -#define GL_SINGLE_COLOR 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR 0x81FA -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif -#endif /* GL_VERSION_1_2 */ - -#ifndef GL_VERSION_1_3 -#define GL_VERSION_1_3 1 -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_CLAMP_TO_BORDER 0x812D -#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 -#define GL_MAX_TEXTURE_UNITS 0x84E2 -#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 -#define GL_MULTISAMPLE_BIT 0x20000000 -#define GL_NORMAL_MAP 0x8511 -#define GL_REFLECTION_MAP 0x8512 -#define GL_COMPRESSED_ALPHA 0x84E9 -#define GL_COMPRESSED_LUMINANCE 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB -#define GL_COMPRESSED_INTENSITY 0x84EC -#define GL_COMBINE 0x8570 -#define GL_COMBINE_RGB 0x8571 -#define GL_COMBINE_ALPHA 0x8572 -#define GL_SOURCE0_RGB 0x8580 -#define GL_SOURCE1_RGB 0x8581 -#define GL_SOURCE2_RGB 0x8582 -#define GL_SOURCE0_ALPHA 0x8588 -#define GL_SOURCE1_ALPHA 0x8589 -#define GL_SOURCE2_ALPHA 0x858A -#define GL_OPERAND0_RGB 0x8590 -#define GL_OPERAND1_RGB 0x8591 -#define GL_OPERAND2_RGB 0x8592 -#define GL_OPERAND0_ALPHA 0x8598 -#define GL_OPERAND1_ALPHA 0x8599 -#define GL_OPERAND2_ALPHA 0x859A -#define GL_RGB_SCALE 0x8573 -#define GL_ADD_SIGNED 0x8574 -#define GL_INTERPOLATE 0x8575 -#define GL_SUBTRACT 0x84E7 -#define GL_CONSTANT 0x8576 -#define GL_PRIMARY_COLOR 0x8577 -#define GL_PREVIOUS 0x8578 -#define GL_DOT3_RGB 0x86AE -#define GL_DOT3_RGBA 0x86AF -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTexture (GLenum texture); -GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img); -GLAPI void APIENTRY glClientActiveTexture (GLenum texture); -GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s); -GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s); -GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s); -GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s); -GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t); -GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); -GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t); -GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t); -GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r); -GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m); -GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m); -GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m); -GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m); -#endif -#endif /* GL_VERSION_1_3 */ - -#ifndef GL_VERSION_1_4 -#define GL_VERSION_1_4 1 -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_DEPTH_COMPONENT32 0x81A7 -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_LOD_BIAS 0x8501 -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_POINT_SIZE_MIN 0x8126 -#define GL_POINT_SIZE_MAX 0x8127 -#define GL_POINT_DISTANCE_ATTENUATION 0x8129 -#define GL_GENERATE_MIPMAP 0x8191 -#define GL_GENERATE_MIPMAP_HINT 0x8192 -#define GL_FOG_COORDINATE_SOURCE 0x8450 -#define GL_FOG_COORDINATE 0x8451 -#define GL_FRAGMENT_DEPTH 0x8452 -#define GL_CURRENT_FOG_COORDINATE 0x8453 -#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 -#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 -#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 -#define GL_FOG_COORDINATE_ARRAY 0x8457 -#define GL_COLOR_SUM 0x8458 -#define GL_CURRENT_SECONDARY_COLOR 0x8459 -#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A -#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B -#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C -#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D -#define GL_SECONDARY_COLOR_ARRAY 0x845E -#define GL_TEXTURE_FILTER_CONTROL 0x8500 -#define GL_DEPTH_TEXTURE_MODE 0x884B -#define GL_COMPARE_R_TO_TEXTURE 0x884E -#define GL_FUNC_ADD 0x8006 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); -GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); -GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param); -GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params); -GLAPI void APIENTRY glFogCoordf (GLfloat coord); -GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord); -GLAPI void APIENTRY glFogCoordd (GLdouble coord); -GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord); -GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); -GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v); -GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); -GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v); -GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); -GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v); -GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue); -GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v); -GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); -GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v); -GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); -GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v); -GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); -GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v); -GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); -GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v); -GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2iv (const GLint *v); -GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2sv (const GLshort *v); -GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3iv (const GLint *v); -GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3sv (const GLshort *v); -GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GLAPI void APIENTRY glBlendEquation (GLenum mode); -#endif -#endif /* GL_VERSION_1_4 */ - -#ifndef GL_VERSION_1_5 -#define GL_VERSION_1_5 1 -#include -#ifdef __MACOSX__ -typedef long GLsizeiptr; -typedef long GLintptr; -#else -typedef ptrdiff_t GLsizeiptr; -typedef ptrdiff_t GLintptr; -#endif -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_QUERY_COUNTER_BITS 0x8864 -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_READ_ONLY 0x88B8 -#define GL_WRITE_ONLY 0x88B9 -#define GL_READ_WRITE 0x88BA -#define GL_BUFFER_ACCESS 0x88BB -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_DRAW 0x88E0 -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_DRAW 0x88E4 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_SAMPLES_PASSED 0x8914 -#define GL_SRC1_ALPHA 0x8589 -#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 -#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D -#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E -#define GL_FOG_COORD_SRC 0x8450 -#define GL_FOG_COORD 0x8451 -#define GL_CURRENT_FOG_COORD 0x8453 -#define GL_FOG_COORD_ARRAY_TYPE 0x8454 -#define GL_FOG_COORD_ARRAY_STRIDE 0x8455 -#define GL_FOG_COORD_ARRAY_POINTER 0x8456 -#define GL_FOG_COORD_ARRAY 0x8457 -#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D -#define GL_SRC0_RGB 0x8580 -#define GL_SRC1_RGB 0x8581 -#define GL_SRC2_RGB 0x8582 -#define GL_SRC0_ALPHA 0x8588 -#define GL_SRC2_ALPHA 0x858A -typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data); -typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsQuery (GLuint id); -GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id); -GLAPI void APIENTRY glEndQuery (GLenum target); -GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); -GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer); -GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data); -GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access); -GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target); -GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); -#endif -#endif /* GL_VERSION_1_5 */ - -#ifndef GL_VERSION_2_0 -#define GL_VERSION_2_0 1 -typedef char GLchar; -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_MAX_VARYING_FLOATS 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_SHADER_TYPE 0x8B4F -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_1D 0x8B5D -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_SAMPLER_1D_SHADOW 0x8B61 -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_DELETE_STATUS 0x8B80 -#define GL_COMPILE_STATUS 0x8B81 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_UPPER_LEFT 0x8CA2 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 -#define GL_POINT_SPRITE 0x8861 -#define GL_COORD_REPLACE 0x8862 -#define GL_MAX_TEXTURE_COORDS 0x8871 -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); -typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); -typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); -typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader); -GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); -GLAPI void APIENTRY glCompileShader (GLuint shader); -GLAPI GLuint APIENTRY glCreateProgram (void); -GLAPI GLuint APIENTRY glCreateShader (GLenum type); -GLAPI void APIENTRY glDeleteProgram (GLuint program); -GLAPI void APIENTRY glDeleteShader (GLuint shader); -GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader); -GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index); -GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index); -GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); -GLAPI GLboolean APIENTRY glIsProgram (GLuint program); -GLAPI GLboolean APIENTRY glIsShader (GLuint shader); -GLAPI void APIENTRY glLinkProgram (GLuint program); -GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -GLAPI void APIENTRY glUseProgram (GLuint program); -GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0); -GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glUniform1i (GLint location, GLint v0); -GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glValidateProgram (GLuint program); -GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -#endif -#endif /* GL_VERSION_2_0 */ - -#ifndef GL_VERSION_2_1 -#define GL_VERSION_2_1 1 -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB_ALPHA 0x8C42 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_COMPRESSED_SRGB 0x8C48 -#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 -#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F -#define GL_SLUMINANCE_ALPHA 0x8C44 -#define GL_SLUMINANCE8_ALPHA8 0x8C45 -#define GL_SLUMINANCE 0x8C46 -#define GL_SLUMINANCE8 0x8C47 -#define GL_COMPRESSED_SLUMINANCE 0x8C4A -#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#endif -#endif /* GL_VERSION_2_1 */ - -#ifndef GL_VERSION_3_0 -#define GL_VERSION_3_0 1 -typedef unsigned short GLhalf; -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_CLIP_DISTANCE0 0x3000 -#define GL_CLIP_DISTANCE1 0x3001 -#define GL_CLIP_DISTANCE2 0x3002 -#define GL_CLIP_DISTANCE3 0x3003 -#define GL_CLIP_DISTANCE4 0x3004 -#define GL_CLIP_DISTANCE5 0x3005 -#define GL_CLIP_DISTANCE6 0x3006 -#define GL_CLIP_DISTANCE7 0x3007 -#define GL_MAX_CLIP_DISTANCES 0x0D32 -#define GL_MAJOR_VERSION 0x821B -#define GL_MINOR_VERSION 0x821C -#define GL_NUM_EXTENSIONS 0x821D -#define GL_CONTEXT_FLAGS 0x821E -#define GL_COMPRESSED_RED 0x8225 -#define GL_COMPRESSED_RG 0x8226 -#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 -#define GL_RGBA32F 0x8814 -#define GL_RGB32F 0x8815 -#define GL_RGBA16F 0x881A -#define GL_RGB16F 0x881B -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_CLAMP_READ_COLOR 0x891C -#define GL_FIXED_ONLY 0x891D -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_TEXTURE_1D_ARRAY 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_RGB9_E5 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_TEXTURE_SHARED_SIZE 0x8C3F -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_PRIMITIVES_GENERATED 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_RGBA32UI 0x8D70 -#define GL_RGB32UI 0x8D71 -#define GL_RGBA16UI 0x8D76 -#define GL_RGB16UI 0x8D77 -#define GL_RGBA8UI 0x8D7C -#define GL_RGB8UI 0x8D7D -#define GL_RGBA32I 0x8D82 -#define GL_RGB32I 0x8D83 -#define GL_RGBA16I 0x8D88 -#define GL_RGB16I 0x8D89 -#define GL_RGBA8I 0x8D8E -#define GL_RGB8I 0x8D8F -#define GL_RED_INTEGER 0x8D94 -#define GL_GREEN_INTEGER 0x8D95 -#define GL_BLUE_INTEGER 0x8D96 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_BGR_INTEGER 0x8D9A -#define GL_BGRA_INTEGER 0x8D9B -#define GL_SAMPLER_1D_ARRAY 0x8DC0 -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_INT_SAMPLER_1D 0x8DC9 -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_QUERY_WAIT 0x8E13 -#define GL_QUERY_NO_WAIT 0x8E14 -#define GL_QUERY_BY_REGION_WAIT 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_TEXTURE_STENCIL_SIZE 0x88F1 -#define GL_TEXTURE_RED_TYPE 0x8C10 -#define GL_TEXTURE_GREEN_TYPE 0x8C11 -#define GL_TEXTURE_BLUE_TYPE 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE 0x8C13 -#define GL_TEXTURE_DEPTH_TYPE 0x8C16 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_STENCIL_INDEX1 0x8D46 -#define GL_STENCIL_INDEX4 0x8D47 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_STENCIL_INDEX16 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_MAX_SAMPLES 0x8D57 -#define GL_INDEX 0x8222 -#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 -#define GL_TEXTURE_INTENSITY_TYPE 0x8C15 -#define GL_FRAMEBUFFER_SRGB 0x8DB9 -#define GL_HALF_FLOAT 0x140B -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#define GL_COMPRESSED_RED_RGTC1 0x8DBB -#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC -#define GL_COMPRESSED_RG_RGTC2 0x8DBD -#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE -#define GL_RG 0x8227 -#define GL_RG_INTEGER 0x8228 -#define GL_R8 0x8229 -#define GL_R16 0x822A -#define GL_RG8 0x822B -#define GL_RG16 0x822C -#define GL_R16F 0x822D -#define GL_R32F 0x822E -#define GL_RG16F 0x822F -#define GL_RG32F 0x8230 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C -#define GL_VERTEX_ARRAY_BINDING 0x85B5 -#define GL_CLAMP_VERTEX_COLOR 0x891A -#define GL_CLAMP_FRAGMENT_COLOR 0x891B -#define GL_ALPHA_INTEGER 0x8D97 -typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); -typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); -typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); -typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); -GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); -GLAPI void APIENTRY glEnablei (GLenum target, GLuint index); -GLAPI void APIENTRY glDisablei (GLenum target, GLuint index); -GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index); -GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedback (void); -GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp); -GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode); -GLAPI void APIENTRY glEndConditionalRender (void); -GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); -GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x); -GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y); -GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x); -GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); -GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); -GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0); -GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); -GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); -GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index); -GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); -GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer); -GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); -GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target); -GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateMipmap (GLenum target); -GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); -GLAPI void APIENTRY glBindVertexArray (GLuint array); -GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); -GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); -GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array); -#endif -#endif /* GL_VERSION_3_0 */ - -#ifndef GL_VERSION_3_1 -#define GL_VERSION_3_1 1 -#define GL_SAMPLER_2D_RECT 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 -#define GL_SAMPLER_BUFFER 0x8DC2 -#define GL_INT_SAMPLER_2D_RECT 0x8DCD -#define GL_INT_SAMPLER_BUFFER 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 -#define GL_TEXTURE_BUFFER 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D -#define GL_TEXTURE_RECTANGLE 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_R16_SNORM 0x8F98 -#define GL_RG16_SNORM 0x8F99 -#define GL_RGB16_SNORM 0x8F9A -#define GL_RGBA16_SNORM 0x8F9B -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_PRIMITIVE_RESTART 0x8F9D -#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E -#define GL_COPY_READ_BUFFER 0x8F36 -#define GL_COPY_WRITE_BUFFER 0x8F37 -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_INVALID_INDEX 0xFFFFFFFFu -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); -typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index); -GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); -GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -#endif -#endif /* GL_VERSION_3_1 */ - -#ifndef GL_VERSION_3_2 -#define GL_VERSION_3_2 1 -typedef struct __GLsync *GLsync; -#ifndef GLEXT_64_TYPES_DEFINED -/* This code block is duplicated in glxext.h, so must be protected */ -#define GLEXT_64_TYPES_DEFINED -/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ -/* (as used in the GL_EXT_timer_query extension). */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include -#elif defined(__sun__) || defined(__digital__) -#include -#if defined(__STDC__) -#if defined(__arch64__) || defined(_LP64) -typedef long int int64_t; -typedef unsigned long int uint64_t; -#else -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined( __VMS ) || defined(__sgi) -#include -#elif defined(__SCO__) || defined(__USLC__) -#include -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#elif defined(_WIN32) && defined(__GNUC__) -#include -#elif defined(_WIN32) -typedef __int32 int32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -/* Fallback if nothing above works */ -#include -#endif -#endif -typedef uint64_t GLuint64; -typedef int64_t GLint64; -#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 -#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define GL_LINES_ADJACENCY 0x000A -#define GL_LINE_STRIP_ADJACENCY 0x000B -#define GL_TRIANGLES_ADJACENCY 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D -#define GL_PROGRAM_POINT_SIZE 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 -#define GL_GEOMETRY_SHADER 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT 0x8916 -#define GL_GEOMETRY_INPUT_TYPE 0x8917 -#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_CONTEXT_PROFILE_MASK 0x9126 -#define GL_DEPTH_CLAMP 0x864F -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C -#define GL_FIRST_VERTEX_CONVENTION 0x8E4D -#define GL_LAST_VERTEX_CONVENTION 0x8E4E -#define GL_PROVOKING_VERTEX 0x8E4F -#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_OBJECT_TYPE 0x9112 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_STATUS 0x9114 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_UNSIGNALED 0x9118 -#define GL_SIGNALED 0x9119 -#define GL_ALREADY_SIGNALED 0x911A -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_CONDITION_SATISFIED 0x911C -#define GL_WAIT_FAILED 0x911D -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_SAMPLE_POSITION 0x8E50 -#define GL_SAMPLE_MASK 0x8E51 -#define GL_SAMPLE_MASK_VALUE 0x8E52 -#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 -#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 -#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 -#define GL_TEXTURE_SAMPLES 0x9106 -#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 -#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 -#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A -#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B -#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D -#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E -#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F -#define GL_MAX_INTEGER_SAMPLES 0x9110 -typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); -typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode); -typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); -typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); -typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); -typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); -GLAPI void APIENTRY glProvokingVertex (GLenum mode); -GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); -GLAPI GLboolean APIENTRY glIsSync (GLsync sync); -GLAPI void APIENTRY glDeleteSync (GLsync sync); -GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); -GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); -GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); -GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); -#endif -#endif /* GL_VERSION_3_2 */ - -#ifndef GL_VERSION_3_3 -#define GL_VERSION_3_3 1 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -#define GL_SRC1_COLOR 0x88F9 -#define GL_ONE_MINUS_SRC1_COLOR 0x88FA -#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB -#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC -#define GL_ANY_SAMPLES_PASSED 0x8C2F -#define GL_SAMPLER_BINDING 0x8919 -#define GL_RGB10_A2UI 0x906F -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 -#define GL_TIME_ELAPSED 0x88BF -#define GL_TIMESTAMP 0x8E28 -#define GL_INT_2_10_10_10_REV 0x8D9F -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); -typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); -typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); -typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color); -typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color); -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); -GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); -GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler); -GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler); -GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); -GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); -GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); -GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); -GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); -GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); -GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); -GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target); -GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); -GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); -GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color); -GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color); -GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color); -GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color); -GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color); -GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color); -#endif -#endif /* GL_VERSION_3_3 */ - -#ifndef GL_VERSION_4_0 -#define GL_VERSION_4_0 1 -#define GL_SAMPLE_SHADING 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F -#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F -#define GL_DRAW_INDIRECT_BUFFER 0x8F3F -#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 -#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F -#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C -#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D -#define GL_MAX_VERTEX_STREAMS 0x8E71 -#define GL_DOUBLE_VEC2 0x8FFC -#define GL_DOUBLE_VEC3 0x8FFD -#define GL_DOUBLE_VEC4 0x8FFE -#define GL_DOUBLE_MAT2 0x8F46 -#define GL_DOUBLE_MAT3 0x8F47 -#define GL_DOUBLE_MAT4 0x8F48 -#define GL_DOUBLE_MAT2x3 0x8F49 -#define GL_DOUBLE_MAT2x4 0x8F4A -#define GL_DOUBLE_MAT3x2 0x8F4B -#define GL_DOUBLE_MAT3x4 0x8F4C -#define GL_DOUBLE_MAT4x2 0x8F4D -#define GL_DOUBLE_MAT4x3 0x8F4E -#define GL_ACTIVE_SUBROUTINES 0x8DE5 -#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 -#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 -#define GL_MAX_SUBROUTINES 0x8DE7 -#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 -#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A -#define GL_COMPATIBLE_SUBROUTINES 0x8E4B -#define GL_PATCHES 0x000E -#define GL_PATCH_VERTICES 0x8E72 -#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 -#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 -#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 -#define GL_TESS_GEN_MODE 0x8E76 -#define GL_TESS_GEN_SPACING 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 -#define GL_TESS_GEN_POINT_MODE 0x8E79 -#define GL_ISOLINES 0x8E7A -#define GL_FRACTIONAL_ODD 0x8E7B -#define GL_FRACTIONAL_EVEN 0x8E7C -#define GL_MAX_PATCH_VERTICES 0x8E7D -#define GL_MAX_TESS_GEN_LEVEL 0x8E7E -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 -#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 -#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 -#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 -#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 -#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 -#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 -#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A -#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C -#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D -#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E -#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 -#define GL_TESS_EVALUATION_SHADER 0x8E87 -#define GL_TESS_CONTROL_SHADER 0x8E88 -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value); -typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect); -typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); -typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); -typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); -typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); -typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); -typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); -typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); -typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); -typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); -typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMinSampleShading (GLfloat value); -GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); -GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); -GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x); -GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y); -GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params); -GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); -GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); -GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); -GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); -GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); -GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value); -GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values); -GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); -GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); -GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id); -GLAPI void APIENTRY glPauseTransformFeedback (void); -GLAPI void APIENTRY glResumeTransformFeedback (void); -GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id); -GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); -GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); -GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index); -GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); -#endif -#endif /* GL_VERSION_4_0 */ - -#ifndef GL_VERSION_4_1 -#define GL_VERSION_4_1 1 -#define GL_FIXED 0x140C -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_RGB565 0x8D62 -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#define GL_VERTEX_SHADER_BIT 0x00000001 -#define GL_FRAGMENT_SHADER_BIT 0x00000002 -#define GL_GEOMETRY_SHADER_BIT 0x00000004 -#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 -#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 -#define GL_ALL_SHADER_BITS 0xFFFFFFFF -#define GL_PROGRAM_SEPARABLE 0x8258 -#define GL_ACTIVE_PROGRAM 0x8259 -#define GL_PROGRAM_PIPELINE_BINDING 0x825A -#define GL_MAX_VIEWPORTS 0x825B -#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C -#define GL_VIEWPORT_BOUNDS_RANGE 0x825D -#define GL_LAYER_PROVOKING_VERTEX 0x825E -#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F -#define GL_UNDEFINED_VERTEX 0x8260 -typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); -typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); -typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); -typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings); -typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); -typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); -typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f); -typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); -typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReleaseShaderCompiler (void); -GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f); -GLAPI void APIENTRY glClearDepthf (GLfloat d); -GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); -GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); -GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); -GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); -GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); -GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); -GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); -GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); -GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); -GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0); -GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); -GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); -GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v); -GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v); -GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f); -GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data); -GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); -#endif -#endif /* GL_VERSION_4_1 */ - -#ifndef GL_VERSION_4_2 -#define GL_VERSION_4_2 1 -#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 -#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 -#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 -#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A -#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B -#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C -#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D -#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E -#define GL_NUM_SAMPLE_COUNTS 0x9380 -#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC -#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 -#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 -#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 -#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 -#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB -#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE -#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF -#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 -#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 -#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 -#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 -#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC -#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 -#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA -#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 -#define GL_COMMAND_BARRIER_BIT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 -#define GL_ALL_BARRIER_BITS 0xFFFFFFFF -#define GL_MAX_IMAGE_UNITS 0x8F38 -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 -#define GL_IMAGE_BINDING_NAME 0x8F3A -#define GL_IMAGE_BINDING_LEVEL 0x8F3B -#define GL_IMAGE_BINDING_LAYERED 0x8F3C -#define GL_IMAGE_BINDING_LAYER 0x8F3D -#define GL_IMAGE_BINDING_ACCESS 0x8F3E -#define GL_IMAGE_1D 0x904C -#define GL_IMAGE_2D 0x904D -#define GL_IMAGE_3D 0x904E -#define GL_IMAGE_2D_RECT 0x904F -#define GL_IMAGE_CUBE 0x9050 -#define GL_IMAGE_BUFFER 0x9051 -#define GL_IMAGE_1D_ARRAY 0x9052 -#define GL_IMAGE_2D_ARRAY 0x9053 -#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 -#define GL_IMAGE_2D_MULTISAMPLE 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 -#define GL_INT_IMAGE_1D 0x9057 -#define GL_INT_IMAGE_2D 0x9058 -#define GL_INT_IMAGE_3D 0x9059 -#define GL_INT_IMAGE_2D_RECT 0x905A -#define GL_INT_IMAGE_CUBE 0x905B -#define GL_INT_IMAGE_BUFFER 0x905C -#define GL_INT_IMAGE_1D_ARRAY 0x905D -#define GL_INT_IMAGE_2D_ARRAY 0x905E -#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F -#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 -#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 -#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 -#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 -#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C -#define GL_MAX_IMAGE_SAMPLES 0x906D -#define GL_IMAGE_BINDING_FORMAT 0x906E -#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 -#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA -#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB -#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC -#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD -#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE -#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF -#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); -typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); -typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); -GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); -GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); -GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); -GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers); -GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount); -GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); -#endif -#endif /* GL_VERSION_4_2 */ - -#ifndef GL_VERSION_4_3 -#define GL_VERSION_4_3 1 -typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 -#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E -#define GL_COMPRESSED_RGB8_ETC2 0x9274 -#define GL_COMPRESSED_SRGB8_ETC2 0x9275 -#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 -#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 -#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 -#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 -#define GL_COMPRESSED_R11_EAC 0x9270 -#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 -#define GL_COMPRESSED_RG11_EAC 0x9272 -#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A -#define GL_MAX_ELEMENT_INDEX 0x8D6B -#define GL_COMPUTE_SHADER 0x91B9 -#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB -#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC -#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD -#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 -#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 -#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 -#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 -#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 -#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB -#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE -#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF -#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED -#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE -#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF -#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 -#define GL_DEBUG_SOURCE_API 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION 0x824A -#define GL_DEBUG_SOURCE_OTHER 0x824B -#define GL_DEBUG_TYPE_ERROR 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E -#define GL_DEBUG_TYPE_PORTABILITY 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 -#define GL_DEBUG_TYPE_OTHER 0x8251 -#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES 0x9145 -#define GL_DEBUG_SEVERITY_HIGH 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 -#define GL_DEBUG_SEVERITY_LOW 0x9148 -#define GL_DEBUG_TYPE_MARKER 0x8268 -#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 -#define GL_DEBUG_TYPE_POP_GROUP 0x826A -#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B -#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C -#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D -#define GL_BUFFER 0x82E0 -#define GL_SHADER 0x82E1 -#define GL_PROGRAM 0x82E2 -#define GL_QUERY 0x82E3 -#define GL_PROGRAM_PIPELINE 0x82E4 -#define GL_SAMPLER 0x82E6 -#define GL_MAX_LABEL_LENGTH 0x82E8 -#define GL_DEBUG_OUTPUT 0x92E0 -#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 -#define GL_MAX_UNIFORM_LOCATIONS 0x826E -#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 -#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 -#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 -#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 -#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 -#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 -#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 -#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 -#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 -#define GL_INTERNALFORMAT_SUPPORTED 0x826F -#define GL_INTERNALFORMAT_PREFERRED 0x8270 -#define GL_INTERNALFORMAT_RED_SIZE 0x8271 -#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 -#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 -#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 -#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 -#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 -#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 -#define GL_INTERNALFORMAT_RED_TYPE 0x8278 -#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 -#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A -#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B -#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C -#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D -#define GL_MAX_WIDTH 0x827E -#define GL_MAX_HEIGHT 0x827F -#define GL_MAX_DEPTH 0x8280 -#define GL_MAX_LAYERS 0x8281 -#define GL_MAX_COMBINED_DIMENSIONS 0x8282 -#define GL_COLOR_COMPONENTS 0x8283 -#define GL_DEPTH_COMPONENTS 0x8284 -#define GL_STENCIL_COMPONENTS 0x8285 -#define GL_COLOR_RENDERABLE 0x8286 -#define GL_DEPTH_RENDERABLE 0x8287 -#define GL_STENCIL_RENDERABLE 0x8288 -#define GL_FRAMEBUFFER_RENDERABLE 0x8289 -#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A -#define GL_FRAMEBUFFER_BLEND 0x828B -#define GL_READ_PIXELS 0x828C -#define GL_READ_PIXELS_FORMAT 0x828D -#define GL_READ_PIXELS_TYPE 0x828E -#define GL_TEXTURE_IMAGE_FORMAT 0x828F -#define GL_TEXTURE_IMAGE_TYPE 0x8290 -#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 -#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 -#define GL_MIPMAP 0x8293 -#define GL_MANUAL_GENERATE_MIPMAP 0x8294 -#define GL_AUTO_GENERATE_MIPMAP 0x8295 -#define GL_COLOR_ENCODING 0x8296 -#define GL_SRGB_READ 0x8297 -#define GL_SRGB_WRITE 0x8298 -#define GL_FILTER 0x829A -#define GL_VERTEX_TEXTURE 0x829B -#define GL_TESS_CONTROL_TEXTURE 0x829C -#define GL_TESS_EVALUATION_TEXTURE 0x829D -#define GL_GEOMETRY_TEXTURE 0x829E -#define GL_FRAGMENT_TEXTURE 0x829F -#define GL_COMPUTE_TEXTURE 0x82A0 -#define GL_TEXTURE_SHADOW 0x82A1 -#define GL_TEXTURE_GATHER 0x82A2 -#define GL_TEXTURE_GATHER_SHADOW 0x82A3 -#define GL_SHADER_IMAGE_LOAD 0x82A4 -#define GL_SHADER_IMAGE_STORE 0x82A5 -#define GL_SHADER_IMAGE_ATOMIC 0x82A6 -#define GL_IMAGE_TEXEL_SIZE 0x82A7 -#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 -#define GL_IMAGE_PIXEL_FORMAT 0x82A9 -#define GL_IMAGE_PIXEL_TYPE 0x82AA -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF -#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 -#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 -#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 -#define GL_CLEAR_BUFFER 0x82B4 -#define GL_TEXTURE_VIEW 0x82B5 -#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 -#define GL_FULL_SUPPORT 0x82B7 -#define GL_CAVEAT_SUPPORT 0x82B8 -#define GL_IMAGE_CLASS_4_X_32 0x82B9 -#define GL_IMAGE_CLASS_2_X_32 0x82BA -#define GL_IMAGE_CLASS_1_X_32 0x82BB -#define GL_IMAGE_CLASS_4_X_16 0x82BC -#define GL_IMAGE_CLASS_2_X_16 0x82BD -#define GL_IMAGE_CLASS_1_X_16 0x82BE -#define GL_IMAGE_CLASS_4_X_8 0x82BF -#define GL_IMAGE_CLASS_2_X_8 0x82C0 -#define GL_IMAGE_CLASS_1_X_8 0x82C1 -#define GL_IMAGE_CLASS_11_11_10 0x82C2 -#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 -#define GL_VIEW_CLASS_128_BITS 0x82C4 -#define GL_VIEW_CLASS_96_BITS 0x82C5 -#define GL_VIEW_CLASS_64_BITS 0x82C6 -#define GL_VIEW_CLASS_48_BITS 0x82C7 -#define GL_VIEW_CLASS_32_BITS 0x82C8 -#define GL_VIEW_CLASS_24_BITS 0x82C9 -#define GL_VIEW_CLASS_16_BITS 0x82CA -#define GL_VIEW_CLASS_8_BITS 0x82CB -#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC -#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD -#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE -#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF -#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 -#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 -#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 -#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 -#define GL_UNIFORM 0x92E1 -#define GL_UNIFORM_BLOCK 0x92E2 -#define GL_PROGRAM_INPUT 0x92E3 -#define GL_PROGRAM_OUTPUT 0x92E4 -#define GL_BUFFER_VARIABLE 0x92E5 -#define GL_SHADER_STORAGE_BLOCK 0x92E6 -#define GL_VERTEX_SUBROUTINE 0x92E8 -#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 -#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA -#define GL_GEOMETRY_SUBROUTINE 0x92EB -#define GL_FRAGMENT_SUBROUTINE 0x92EC -#define GL_COMPUTE_SUBROUTINE 0x92ED -#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE -#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF -#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 -#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 -#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 -#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 -#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 -#define GL_ACTIVE_RESOURCES 0x92F5 -#define GL_MAX_NAME_LENGTH 0x92F6 -#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 -#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 -#define GL_NAME_LENGTH 0x92F9 -#define GL_TYPE 0x92FA -#define GL_ARRAY_SIZE 0x92FB -#define GL_OFFSET 0x92FC -#define GL_BLOCK_INDEX 0x92FD -#define GL_ARRAY_STRIDE 0x92FE -#define GL_MATRIX_STRIDE 0x92FF -#define GL_IS_ROW_MAJOR 0x9300 -#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 -#define GL_BUFFER_BINDING 0x9302 -#define GL_BUFFER_DATA_SIZE 0x9303 -#define GL_NUM_ACTIVE_VARIABLES 0x9304 -#define GL_ACTIVE_VARIABLES 0x9305 -#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 -#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 -#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 -#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 -#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A -#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B -#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C -#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D -#define GL_LOCATION 0x930E -#define GL_LOCATION_INDEX 0x930F -#define GL_IS_PER_PATCH 0x92E7 -#define GL_SHADER_STORAGE_BUFFER 0x90D2 -#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 -#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 -#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 -#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 -#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 -#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 -#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 -#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA -#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB -#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC -#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD -#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE -#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF -#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 -#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 -#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA -#define GL_TEXTURE_BUFFER_OFFSET 0x919D -#define GL_TEXTURE_BUFFER_SIZE 0x919E -#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F -#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB -#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC -#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD -#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF -#define GL_VERTEX_ATTRIB_BINDING 0x82D4 -#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 -#define GL_VERTEX_BINDING_DIVISOR 0x82D6 -#define GL_VERTEX_BINDING_OFFSET 0x82D7 -#define GL_VERTEX_BINDING_STRIDE 0x82D8 -#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 -#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA -#define GL_VERTEX_BINDING_BUFFER 0x8F4F -#define GL_DISPLAY_LIST 0x82E7 -typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); -typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); -typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); -typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); -typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); -typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); -typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); -typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); -typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); -typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); -typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); -typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect); -GLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); -GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level); -GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer); -GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); -GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); -GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); -GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); -GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); -GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); -GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name); -GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); -GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); -GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); -GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); -GLAPI void APIENTRY glPopDebugGroup (void); -GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); -GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif -#endif /* GL_VERSION_4_3 */ - -#ifndef GL_VERSION_4_4 -#define GL_VERSION_4_4 1 -#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 -#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 -#define GL_TEXTURE_BUFFER_BINDING 0x8C2A -#define GL_MAP_PERSISTENT_BIT 0x0040 -#define GL_MAP_COHERENT_BIT 0x0080 -#define GL_DYNAMIC_STORAGE_BIT 0x0100 -#define GL_CLIENT_STORAGE_BIT 0x0200 -#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 -#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F -#define GL_BUFFER_STORAGE_FLAGS 0x8220 -#define GL_CLEAR_TEXTURE 0x9365 -#define GL_LOCATION_COMPONENT 0x934A -#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B -#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C -#define GL_QUERY_BUFFER 0x9192 -#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 -#define GL_QUERY_BUFFER_BINDING 0x9193 -#define GL_QUERY_RESULT_NO_WAIT 0x9194 -#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 -typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); -typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers); -typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); -typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); -typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers); -typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); -typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); -GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers); -GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); -GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures); -GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers); -GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures); -GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); -#endif -#endif /* GL_VERSION_4_4 */ - -#ifndef GL_ARB_ES2_compatibility -#define GL_ARB_ES2_compatibility 1 -#endif /* GL_ARB_ES2_compatibility */ - -#ifndef GL_ARB_ES3_compatibility -#define GL_ARB_ES3_compatibility 1 -#endif /* GL_ARB_ES3_compatibility */ - -#ifndef GL_ARB_arrays_of_arrays -#define GL_ARB_arrays_of_arrays 1 -#endif /* GL_ARB_arrays_of_arrays */ - -#ifndef GL_ARB_base_instance -#define GL_ARB_base_instance 1 -#endif /* GL_ARB_base_instance */ - -#ifndef GL_ARB_bindless_texture -#define GL_ARB_bindless_texture 1 -typedef uint64_t GLuint64EXT; -#define GL_UNSIGNED_INT64_ARB 0x140F -typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture); -typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle); -typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle); -typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture); -GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler); -GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle); -GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle); -GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access); -GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle); -GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value); -GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value); -GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle); -GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle); -GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x); -GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params); -#endif -#endif /* GL_ARB_bindless_texture */ - -#ifndef GL_ARB_blend_func_extended -#define GL_ARB_blend_func_extended 1 -#endif /* GL_ARB_blend_func_extended */ - -#ifndef GL_ARB_buffer_storage -#define GL_ARB_buffer_storage 1 -#endif /* GL_ARB_buffer_storage */ - -#ifndef GL_ARB_cl_event -#define GL_ARB_cl_event 1 -struct _cl_context; -struct _cl_event; -#define GL_SYNC_CL_EVENT_ARB 0x8240 -#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 -typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); -#endif -#endif /* GL_ARB_cl_event */ - -#ifndef GL_ARB_clear_buffer_object -#define GL_ARB_clear_buffer_object 1 -#endif /* GL_ARB_clear_buffer_object */ - -#ifndef GL_ARB_clear_texture -#define GL_ARB_clear_texture 1 -#endif /* GL_ARB_clear_texture */ - -#ifndef GL_ARB_color_buffer_float -#define GL_ARB_color_buffer_float 1 -#define GL_RGBA_FLOAT_MODE_ARB 0x8820 -#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A -#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B -#define GL_CLAMP_READ_COLOR_ARB 0x891C -#define GL_FIXED_ONLY_ARB 0x891D -typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp); -#endif -#endif /* GL_ARB_color_buffer_float */ - -#ifndef GL_ARB_compatibility -#define GL_ARB_compatibility 1 -#endif /* GL_ARB_compatibility */ - -#ifndef GL_ARB_compressed_texture_pixel_storage -#define GL_ARB_compressed_texture_pixel_storage 1 -#endif /* GL_ARB_compressed_texture_pixel_storage */ - -#ifndef GL_ARB_compute_shader -#define GL_ARB_compute_shader 1 -#define GL_COMPUTE_SHADER_BIT 0x00000020 -#endif /* GL_ARB_compute_shader */ - -#ifndef GL_ARB_compute_variable_group_size -#define GL_ARB_compute_variable_group_size 1 -#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344 -#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB -#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345 -#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z); -#endif -#endif /* GL_ARB_compute_variable_group_size */ - -#ifndef GL_ARB_conservative_depth -#define GL_ARB_conservative_depth 1 -#endif /* GL_ARB_conservative_depth */ - -#ifndef GL_ARB_copy_buffer -#define GL_ARB_copy_buffer 1 -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 -#endif /* GL_ARB_copy_buffer */ - -#ifndef GL_ARB_copy_image -#define GL_ARB_copy_image 1 -#endif /* GL_ARB_copy_image */ - -#ifndef GL_ARB_debug_output -#define GL_ARB_debug_output 1 -typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 -#define GL_DEBUG_SOURCE_API_ARB 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A -#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B -#define GL_DEBUG_TYPE_ERROR_ARB 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E -#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 -#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 -#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 -#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -#endif -#endif /* GL_ARB_debug_output */ - -#ifndef GL_ARB_depth_buffer_float -#define GL_ARB_depth_buffer_float 1 -#endif /* GL_ARB_depth_buffer_float */ - -#ifndef GL_ARB_depth_clamp -#define GL_ARB_depth_clamp 1 -#endif /* GL_ARB_depth_clamp */ - -#ifndef GL_ARB_depth_texture -#define GL_ARB_depth_texture 1 -#define GL_DEPTH_COMPONENT16_ARB 0x81A5 -#define GL_DEPTH_COMPONENT24_ARB 0x81A6 -#define GL_DEPTH_COMPONENT32_ARB 0x81A7 -#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A -#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B -#endif /* GL_ARB_depth_texture */ - -#ifndef GL_ARB_draw_buffers -#define GL_ARB_draw_buffers 1 -#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 -#define GL_DRAW_BUFFER0_ARB 0x8825 -#define GL_DRAW_BUFFER1_ARB 0x8826 -#define GL_DRAW_BUFFER2_ARB 0x8827 -#define GL_DRAW_BUFFER3_ARB 0x8828 -#define GL_DRAW_BUFFER4_ARB 0x8829 -#define GL_DRAW_BUFFER5_ARB 0x882A -#define GL_DRAW_BUFFER6_ARB 0x882B -#define GL_DRAW_BUFFER7_ARB 0x882C -#define GL_DRAW_BUFFER8_ARB 0x882D -#define GL_DRAW_BUFFER9_ARB 0x882E -#define GL_DRAW_BUFFER10_ARB 0x882F -#define GL_DRAW_BUFFER11_ARB 0x8830 -#define GL_DRAW_BUFFER12_ARB 0x8831 -#define GL_DRAW_BUFFER13_ARB 0x8832 -#define GL_DRAW_BUFFER14_ARB 0x8833 -#define GL_DRAW_BUFFER15_ARB 0x8834 -typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs); -#endif -#endif /* GL_ARB_draw_buffers */ - -#ifndef GL_ARB_draw_buffers_blend -#define GL_ARB_draw_buffers_blend 1 -typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif -#endif /* GL_ARB_draw_buffers_blend */ - -#ifndef GL_ARB_draw_elements_base_vertex -#define GL_ARB_draw_elements_base_vertex 1 -#endif /* GL_ARB_draw_elements_base_vertex */ - -#ifndef GL_ARB_draw_indirect -#define GL_ARB_draw_indirect 1 -#endif /* GL_ARB_draw_indirect */ - -#ifndef GL_ARB_draw_instanced -#define GL_ARB_draw_instanced 1 -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#endif -#endif /* GL_ARB_draw_instanced */ - -#ifndef GL_ARB_enhanced_layouts -#define GL_ARB_enhanced_layouts 1 -#endif /* GL_ARB_enhanced_layouts */ - -#ifndef GL_ARB_explicit_attrib_location -#define GL_ARB_explicit_attrib_location 1 -#endif /* GL_ARB_explicit_attrib_location */ - -#ifndef GL_ARB_explicit_uniform_location -#define GL_ARB_explicit_uniform_location 1 -#endif /* GL_ARB_explicit_uniform_location */ - -#ifndef GL_ARB_fragment_coord_conventions -#define GL_ARB_fragment_coord_conventions 1 -#endif /* GL_ARB_fragment_coord_conventions */ - -#ifndef GL_ARB_fragment_layer_viewport -#define GL_ARB_fragment_layer_viewport 1 -#endif /* GL_ARB_fragment_layer_viewport */ - -#ifndef GL_ARB_fragment_program -#define GL_ARB_fragment_program 1 -#define GL_FRAGMENT_PROGRAM_ARB 0x8804 -#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 -#define GL_PROGRAM_LENGTH_ARB 0x8627 -#define GL_PROGRAM_FORMAT_ARB 0x8876 -#define GL_PROGRAM_BINDING_ARB 0x8677 -#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 -#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 -#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 -#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 -#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 -#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 -#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 -#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 -#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 -#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 -#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA -#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB -#define GL_PROGRAM_ATTRIBS_ARB 0x88AC -#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD -#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE -#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF -#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 -#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 -#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 -#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 -#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 -#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 -#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 -#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 -#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A -#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B -#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C -#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D -#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E -#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F -#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 -#define GL_PROGRAM_STRING_ARB 0x8628 -#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B -#define GL_CURRENT_MATRIX_ARB 0x8641 -#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 -#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 -#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F -#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E -#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 -#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 -#define GL_MATRIX0_ARB 0x88C0 -#define GL_MATRIX1_ARB 0x88C1 -#define GL_MATRIX2_ARB 0x88C2 -#define GL_MATRIX3_ARB 0x88C3 -#define GL_MATRIX4_ARB 0x88C4 -#define GL_MATRIX5_ARB 0x88C5 -#define GL_MATRIX6_ARB 0x88C6 -#define GL_MATRIX7_ARB 0x88C7 -#define GL_MATRIX8_ARB 0x88C8 -#define GL_MATRIX9_ARB 0x88C9 -#define GL_MATRIX10_ARB 0x88CA -#define GL_MATRIX11_ARB 0x88CB -#define GL_MATRIX12_ARB 0x88CC -#define GL_MATRIX13_ARB 0x88CD -#define GL_MATRIX14_ARB 0x88CE -#define GL_MATRIX15_ARB 0x88CF -#define GL_MATRIX16_ARB 0x88D0 -#define GL_MATRIX17_ARB 0x88D1 -#define GL_MATRIX18_ARB 0x88D2 -#define GL_MATRIX19_ARB 0x88D3 -#define GL_MATRIX20_ARB 0x88D4 -#define GL_MATRIX21_ARB 0x88D5 -#define GL_MATRIX22_ARB 0x88D6 -#define GL_MATRIX23_ARB 0x88D7 -#define GL_MATRIX24_ARB 0x88D8 -#define GL_MATRIX25_ARB 0x88D9 -#define GL_MATRIX26_ARB 0x88DA -#define GL_MATRIX27_ARB 0x88DB -#define GL_MATRIX28_ARB 0x88DC -#define GL_MATRIX29_ARB 0x88DD -#define GL_MATRIX30_ARB 0x88DE -#define GL_MATRIX31_ARB 0x88DF -typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string); -typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const void *string); -GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program); -GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs); -GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, void *string); -GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program); -#endif -#endif /* GL_ARB_fragment_program */ - -#ifndef GL_ARB_fragment_program_shadow -#define GL_ARB_fragment_program_shadow 1 -#endif /* GL_ARB_fragment_program_shadow */ - -#ifndef GL_ARB_fragment_shader -#define GL_ARB_fragment_shader 1 -#define GL_FRAGMENT_SHADER_ARB 0x8B30 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B -#endif /* GL_ARB_fragment_shader */ - -#ifndef GL_ARB_framebuffer_no_attachments -#define GL_ARB_framebuffer_no_attachments 1 -#endif /* GL_ARB_framebuffer_no_attachments */ - -#ifndef GL_ARB_framebuffer_object -#define GL_ARB_framebuffer_object 1 -#endif /* GL_ARB_framebuffer_object */ - -#ifndef GL_ARB_framebuffer_sRGB -#define GL_ARB_framebuffer_sRGB 1 -#endif /* GL_ARB_framebuffer_sRGB */ - -#ifndef GL_KHR_context_flush_control -#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB -#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC -#endif /* GL_KHR_context_flush_control */ - -#ifndef GL_ARB_geometry_shader4 -#define GL_ARB_geometry_shader4 1 -#define GL_LINES_ADJACENCY_ARB 0x000A -#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B -#define GL_TRIANGLES_ADJACENCY_ARB 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D -#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 -#define GL_GEOMETRY_SHADER_ARB 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA -#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB -#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD -#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value); -GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif -#endif /* GL_ARB_geometry_shader4 */ - -#ifndef GL_ARB_get_program_binary -#define GL_ARB_get_program_binary 1 -#endif /* GL_ARB_get_program_binary */ - -#ifndef GL_ARB_gpu_shader5 -#define GL_ARB_gpu_shader5 1 -#endif /* GL_ARB_gpu_shader5 */ - -#ifndef GL_ARB_gpu_shader_fp64 -#define GL_ARB_gpu_shader_fp64 1 -#endif /* GL_ARB_gpu_shader_fp64 */ - -#ifndef GL_ARB_half_float_pixel -#define GL_ARB_half_float_pixel 1 -typedef unsigned short GLhalfARB; -#define GL_HALF_FLOAT_ARB 0x140B -#endif /* GL_ARB_half_float_pixel */ - -#ifndef GL_ARB_half_float_vertex -#define GL_ARB_half_float_vertex 1 -#endif /* GL_ARB_half_float_vertex */ - -#ifndef GL_ARB_imaging -#define GL_ARB_imaging 1 -#define GL_BLEND_COLOR 0x8005 -#define GL_BLEND_EQUATION 0x8009 -#define GL_CONVOLUTION_1D 0x8010 -#define GL_CONVOLUTION_2D 0x8011 -#define GL_SEPARABLE_2D 0x8012 -#define GL_CONVOLUTION_BORDER_MODE 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS 0x8015 -#define GL_REDUCE 0x8016 -#define GL_CONVOLUTION_FORMAT 0x8017 -#define GL_CONVOLUTION_WIDTH 0x8018 -#define GL_CONVOLUTION_HEIGHT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 -#define GL_HISTOGRAM 0x8024 -#define GL_PROXY_HISTOGRAM 0x8025 -#define GL_HISTOGRAM_WIDTH 0x8026 -#define GL_HISTOGRAM_FORMAT 0x8027 -#define GL_HISTOGRAM_RED_SIZE 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C -#define GL_HISTOGRAM_SINK 0x802D -#define GL_MINMAX 0x802E -#define GL_MINMAX_FORMAT 0x802F -#define GL_MINMAX_SINK 0x8030 -#define GL_TABLE_TOO_LARGE 0x8031 -#define GL_COLOR_MATRIX 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB -#define GL_COLOR_TABLE 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 -#define GL_PROXY_COLOR_TABLE 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 -#define GL_COLOR_TABLE_SCALE 0x80D6 -#define GL_COLOR_TABLE_BIAS 0x80D7 -#define GL_COLOR_TABLE_FORMAT 0x80D8 -#define GL_COLOR_TABLE_WIDTH 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF -#define GL_CONSTANT_BORDER 0x8151 -#define GL_REPLICATE_BORDER 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR 0x8154 -typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); -GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, void *table); -GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); -GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); -GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params); -GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params); -GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image); -GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); -GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); -GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); -GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); -GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glResetHistogram (GLenum target); -GLAPI void APIENTRY glResetMinmax (GLenum target); -#endif -#endif /* GL_ARB_imaging */ - -#ifndef GL_ARB_indirect_parameters -#define GL_ARB_indirect_parameters 1 -#define GL_PARAMETER_BUFFER_ARB 0x80EE -#define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -#endif -#endif /* GL_ARB_indirect_parameters */ - -#ifndef GL_ARB_instanced_arrays -#define GL_ARB_instanced_arrays 1 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor); -#endif -#endif /* GL_ARB_instanced_arrays */ - -#ifndef GL_ARB_internalformat_query -#define GL_ARB_internalformat_query 1 -#endif /* GL_ARB_internalformat_query */ - -#ifndef GL_ARB_internalformat_query2 -#define GL_ARB_internalformat_query2 1 -#define GL_SRGB_DECODE_ARB 0x8299 -#endif /* GL_ARB_internalformat_query2 */ - -#ifndef GL_ARB_invalidate_subdata -#define GL_ARB_invalidate_subdata 1 -#endif /* GL_ARB_invalidate_subdata */ - -#ifndef GL_ARB_map_buffer_alignment -#define GL_ARB_map_buffer_alignment 1 -#endif /* GL_ARB_map_buffer_alignment */ - -#ifndef GL_ARB_map_buffer_range -#define GL_ARB_map_buffer_range 1 -#endif /* GL_ARB_map_buffer_range */ - -#ifndef GL_ARB_matrix_palette -#define GL_ARB_matrix_palette 1 -#define GL_MATRIX_PALETTE_ARB 0x8840 -#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 -#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 -#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 -#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 -#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 -#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 -#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 -#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 -#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 -typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); -typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index); -GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices); -GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices); -GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices); -GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer); -#endif -#endif /* GL_ARB_matrix_palette */ - -#ifndef GL_ARB_multi_bind -#define GL_ARB_multi_bind 1 -#endif /* GL_ARB_multi_bind */ - -#ifndef GL_ARB_multi_draw_indirect -#define GL_ARB_multi_draw_indirect 1 -#endif /* GL_ARB_multi_draw_indirect */ - -#ifndef GL_ARB_multisample -#define GL_ARB_multisample 1 -#define GL_MULTISAMPLE_ARB 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F -#define GL_SAMPLE_COVERAGE_ARB 0x80A0 -#define GL_SAMPLE_BUFFERS_ARB 0x80A8 -#define GL_SAMPLES_ARB 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB -#define GL_MULTISAMPLE_BIT_ARB 0x20000000 -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert); -#endif -#endif /* GL_ARB_multisample */ - -#ifndef GL_ARB_multitexture -#define GL_ARB_multitexture 1 -#define GL_TEXTURE0_ARB 0x84C0 -#define GL_TEXTURE1_ARB 0x84C1 -#define GL_TEXTURE2_ARB 0x84C2 -#define GL_TEXTURE3_ARB 0x84C3 -#define GL_TEXTURE4_ARB 0x84C4 -#define GL_TEXTURE5_ARB 0x84C5 -#define GL_TEXTURE6_ARB 0x84C6 -#define GL_TEXTURE7_ARB 0x84C7 -#define GL_TEXTURE8_ARB 0x84C8 -#define GL_TEXTURE9_ARB 0x84C9 -#define GL_TEXTURE10_ARB 0x84CA -#define GL_TEXTURE11_ARB 0x84CB -#define GL_TEXTURE12_ARB 0x84CC -#define GL_TEXTURE13_ARB 0x84CD -#define GL_TEXTURE14_ARB 0x84CE -#define GL_TEXTURE15_ARB 0x84CF -#define GL_TEXTURE16_ARB 0x84D0 -#define GL_TEXTURE17_ARB 0x84D1 -#define GL_TEXTURE18_ARB 0x84D2 -#define GL_TEXTURE19_ARB 0x84D3 -#define GL_TEXTURE20_ARB 0x84D4 -#define GL_TEXTURE21_ARB 0x84D5 -#define GL_TEXTURE22_ARB 0x84D6 -#define GL_TEXTURE23_ARB 0x84D7 -#define GL_TEXTURE24_ARB 0x84D8 -#define GL_TEXTURE25_ARB 0x84D9 -#define GL_TEXTURE26_ARB 0x84DA -#define GL_TEXTURE27_ARB 0x84DB -#define GL_TEXTURE28_ARB 0x84DC -#define GL_TEXTURE29_ARB 0x84DD -#define GL_TEXTURE30_ARB 0x84DE -#define GL_TEXTURE31_ARB 0x84DF -#define GL_ACTIVE_TEXTURE_ARB 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 -#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 -typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTextureARB (GLenum texture); -GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture); -GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s); -GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s); -GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s); -GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s); -GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t); -GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t); -GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t); -GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t); -GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r); -GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v); -#endif -#endif /* GL_ARB_multitexture */ - -#ifndef GL_ARB_occlusion_query -#define GL_ARB_occlusion_query 1 -#define GL_QUERY_COUNTER_BITS_ARB 0x8864 -#define GL_CURRENT_QUERY_ARB 0x8865 -#define GL_QUERY_RESULT_ARB 0x8866 -#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 -#define GL_SAMPLES_PASSED_ARB 0x8914 -typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id); -GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id); -GLAPI void APIENTRY glEndQueryARB (GLenum target); -GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params); -#endif -#endif /* GL_ARB_occlusion_query */ - -#ifndef GL_ARB_occlusion_query2 -#define GL_ARB_occlusion_query2 1 -#endif /* GL_ARB_occlusion_query2 */ - -#ifndef GL_ARB_pixel_buffer_object -#define GL_ARB_pixel_buffer_object 1 -#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF -#endif /* GL_ARB_pixel_buffer_object */ - -#ifndef GL_ARB_point_parameters -#define GL_ARB_point_parameters 1 -#define GL_POINT_SIZE_MIN_ARB 0x8126 -#define GL_POINT_SIZE_MAX_ARB 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 -#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 -typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params); -#endif -#endif /* GL_ARB_point_parameters */ - -#ifndef GL_ARB_point_sprite -#define GL_ARB_point_sprite 1 -#define GL_POINT_SPRITE_ARB 0x8861 -#define GL_COORD_REPLACE_ARB 0x8862 -#endif /* GL_ARB_point_sprite */ - -#ifndef GL_ARB_program_interface_query -#define GL_ARB_program_interface_query 1 -#endif /* GL_ARB_program_interface_query */ - -#ifndef GL_ARB_provoking_vertex -#define GL_ARB_provoking_vertex 1 -#endif /* GL_ARB_provoking_vertex */ - -#ifndef GL_ARB_query_buffer_object -#define GL_ARB_query_buffer_object 1 -#endif /* GL_ARB_query_buffer_object */ - -#ifndef GL_ARB_robust_buffer_access_behavior -#define GL_ARB_robust_buffer_access_behavior 1 -#endif /* GL_ARB_robust_buffer_access_behavior */ - -#ifndef GL_ARB_robustness -#define GL_ARB_robustness 1 -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 -#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 -#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 -typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); -typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img); -typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img); -typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); -typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); -typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); -typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); -typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); -typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); -typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); -typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); -typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); -typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); -typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); -typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); -GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img); -GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img); -GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); -GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); -GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); -GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); -GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); -GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); -GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); -GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); -GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); -GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); -GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); -GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); -GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); -#endif -#endif /* GL_ARB_robustness */ - -#ifndef GL_ARB_robustness_isolation -#define GL_ARB_robustness_isolation 1 -#endif /* GL_ARB_robustness_isolation */ - -#ifndef GL_ARB_sample_shading -#define GL_ARB_sample_shading 1 -#define GL_SAMPLE_SHADING_ARB 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value); -#endif -#endif /* GL_ARB_sample_shading */ - -#ifndef GL_ARB_sampler_objects -#define GL_ARB_sampler_objects 1 -#endif /* GL_ARB_sampler_objects */ - -#ifndef GL_ARB_seamless_cube_map -#define GL_ARB_seamless_cube_map 1 -#endif /* GL_ARB_seamless_cube_map */ - -#ifndef GL_ARB_seamless_cubemap_per_texture -#define GL_ARB_seamless_cubemap_per_texture 1 -#endif /* GL_ARB_seamless_cubemap_per_texture */ - -#ifndef GL_ARB_separate_shader_objects -#define GL_ARB_separate_shader_objects 1 -#endif /* GL_ARB_separate_shader_objects */ - -#ifndef GL_ARB_shader_atomic_counters -#define GL_ARB_shader_atomic_counters 1 -#endif /* GL_ARB_shader_atomic_counters */ - -#ifndef GL_ARB_shader_bit_encoding -#define GL_ARB_shader_bit_encoding 1 -#endif /* GL_ARB_shader_bit_encoding */ - -#ifndef GL_ARB_shader_draw_parameters -#define GL_ARB_shader_draw_parameters 1 -#endif /* GL_ARB_shader_draw_parameters */ - -#ifndef GL_ARB_shader_group_vote -#define GL_ARB_shader_group_vote 1 -#endif /* GL_ARB_shader_group_vote */ - -#ifndef GL_ARB_shader_image_load_store -#define GL_ARB_shader_image_load_store 1 -#endif /* GL_ARB_shader_image_load_store */ - -#ifndef GL_ARB_shader_image_size -#define GL_ARB_shader_image_size 1 -#endif /* GL_ARB_shader_image_size */ - -#ifndef GL_ARB_shader_objects -#define GL_ARB_shader_objects 1 -#ifdef __APPLE__ -typedef void *GLhandleARB; -#else -typedef unsigned int GLhandleARB; -#endif -typedef char GLcharARB; -#define GL_PROGRAM_OBJECT_ARB 0x8B40 -#define GL_SHADER_OBJECT_ARB 0x8B48 -#define GL_OBJECT_TYPE_ARB 0x8B4E -#define GL_OBJECT_SUBTYPE_ARB 0x8B4F -#define GL_FLOAT_VEC2_ARB 0x8B50 -#define GL_FLOAT_VEC3_ARB 0x8B51 -#define GL_FLOAT_VEC4_ARB 0x8B52 -#define GL_INT_VEC2_ARB 0x8B53 -#define GL_INT_VEC3_ARB 0x8B54 -#define GL_INT_VEC4_ARB 0x8B55 -#define GL_BOOL_ARB 0x8B56 -#define GL_BOOL_VEC2_ARB 0x8B57 -#define GL_BOOL_VEC3_ARB 0x8B58 -#define GL_BOOL_VEC4_ARB 0x8B59 -#define GL_FLOAT_MAT2_ARB 0x8B5A -#define GL_FLOAT_MAT3_ARB 0x8B5B -#define GL_FLOAT_MAT4_ARB 0x8B5C -#define GL_SAMPLER_1D_ARB 0x8B5D -#define GL_SAMPLER_2D_ARB 0x8B5E -#define GL_SAMPLER_3D_ARB 0x8B5F -#define GL_SAMPLER_CUBE_ARB 0x8B60 -#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 -#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 -#define GL_SAMPLER_2D_RECT_ARB 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 -#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 -#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 -#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 -#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 -#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 -#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 -#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 -#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 -#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 -typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); -typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); -typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length); -typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); -typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); -typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); -typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj); -GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname); -GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj); -GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType); -GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length); -GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj); -GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); -GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj); -GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj); -GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj); -GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj); -GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0); -GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0); -GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); -GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); -GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name); -GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params); -GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params); -GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); -#endif -#endif /* GL_ARB_shader_objects */ - -#ifndef GL_ARB_shader_precision -#define GL_ARB_shader_precision 1 -#endif /* GL_ARB_shader_precision */ - -#ifndef GL_ARB_shader_stencil_export -#define GL_ARB_shader_stencil_export 1 -#endif /* GL_ARB_shader_stencil_export */ - -#ifndef GL_ARB_shader_storage_buffer_object -#define GL_ARB_shader_storage_buffer_object 1 -#endif /* GL_ARB_shader_storage_buffer_object */ - -#ifndef GL_ARB_shader_subroutine -#define GL_ARB_shader_subroutine 1 -#endif /* GL_ARB_shader_subroutine */ - -#ifndef GL_ARB_shader_texture_lod -#define GL_ARB_shader_texture_lod 1 -#endif /* GL_ARB_shader_texture_lod */ - -#ifndef GL_ARB_shading_language_100 -#define GL_ARB_shading_language_100 1 -#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C -#endif /* GL_ARB_shading_language_100 */ - -#ifndef GL_ARB_shading_language_420pack -#define GL_ARB_shading_language_420pack 1 -#endif /* GL_ARB_shading_language_420pack */ - -#ifndef GL_ARB_shading_language_include -#define GL_ARB_shading_language_include 1 -#define GL_SHADER_INCLUDE_ARB 0x8DAE -#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 -#define GL_NAMED_STRING_TYPE_ARB 0x8DEA -typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); -typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length); -typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); -typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); -typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); -GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name); -GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length); -GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name); -GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); -GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); -#endif -#endif /* GL_ARB_shading_language_include */ - -#ifndef GL_ARB_shading_language_packing -#define GL_ARB_shading_language_packing 1 -#endif /* GL_ARB_shading_language_packing */ - -#ifndef GL_ARB_shadow -#define GL_ARB_shadow 1 -#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C -#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D -#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E -#endif /* GL_ARB_shadow */ - -#ifndef GL_ARB_shadow_ambient -#define GL_ARB_shadow_ambient 1 -#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF -#endif /* GL_ARB_shadow_ambient */ - -#ifndef GL_ARB_sparse_texture -#define GL_ARB_sparse_texture 1 -#define GL_TEXTURE_SPARSE_ARB 0x91A6 -#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7 -#define GL_MIN_SPARSE_LEVEL_ARB 0x919B -#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8 -#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195 -#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196 -#define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197 -#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198 -#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199 -#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A -#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9 -typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident); -#endif -#endif /* GL_ARB_sparse_texture */ - -#ifndef GL_ARB_stencil_texturing -#define GL_ARB_stencil_texturing 1 -#endif /* GL_ARB_stencil_texturing */ - -#ifndef GL_ARB_sync -#define GL_ARB_sync 1 -#endif /* GL_ARB_sync */ - -#ifndef GL_ARB_tessellation_shader -#define GL_ARB_tessellation_shader 1 -#endif /* GL_ARB_tessellation_shader */ - -#ifndef GL_ARB_texture_border_clamp -#define GL_ARB_texture_border_clamp 1 -#define GL_CLAMP_TO_BORDER_ARB 0x812D -#endif /* GL_ARB_texture_border_clamp */ - -#ifndef GL_ARB_texture_buffer_object -#define GL_ARB_texture_buffer_object 1 -#define GL_TEXTURE_BUFFER_ARB 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D -#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E -typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); -#endif -#endif /* GL_ARB_texture_buffer_object */ - -#ifndef GL_ARB_texture_buffer_object_rgb32 -#define GL_ARB_texture_buffer_object_rgb32 1 -#endif /* GL_ARB_texture_buffer_object_rgb32 */ - -#ifndef GL_ARB_texture_buffer_range -#define GL_ARB_texture_buffer_range 1 -#endif /* GL_ARB_texture_buffer_range */ - -#ifndef GL_ARB_texture_compression -#define GL_ARB_texture_compression 1 -#define GL_COMPRESSED_ALPHA_ARB 0x84E9 -#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB -#define GL_COMPRESSED_INTENSITY_ARB 0x84EC -#define GL_COMPRESSED_RGB_ARB 0x84ED -#define GL_COMPRESSED_RGBA_ARB 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 -#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img); -#endif -#endif /* GL_ARB_texture_compression */ - -#ifndef GL_ARB_texture_compression_bptc -#define GL_ARB_texture_compression_bptc 1 -#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F -#endif /* GL_ARB_texture_compression_bptc */ - -#ifndef GL_ARB_texture_compression_rgtc -#define GL_ARB_texture_compression_rgtc 1 -#endif /* GL_ARB_texture_compression_rgtc */ - -#ifndef GL_ARB_texture_cube_map -#define GL_ARB_texture_cube_map 1 -#define GL_NORMAL_MAP_ARB 0x8511 -#define GL_REFLECTION_MAP_ARB 0x8512 -#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C -#endif /* GL_ARB_texture_cube_map */ - -#ifndef GL_ARB_texture_cube_map_array -#define GL_ARB_texture_cube_map_array 1 -#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F -#endif /* GL_ARB_texture_cube_map_array */ - -#ifndef GL_ARB_texture_env_add -#define GL_ARB_texture_env_add 1 -#endif /* GL_ARB_texture_env_add */ - -#ifndef GL_ARB_texture_env_combine -#define GL_ARB_texture_env_combine 1 -#define GL_COMBINE_ARB 0x8570 -#define GL_COMBINE_RGB_ARB 0x8571 -#define GL_COMBINE_ALPHA_ARB 0x8572 -#define GL_SOURCE0_RGB_ARB 0x8580 -#define GL_SOURCE1_RGB_ARB 0x8581 -#define GL_SOURCE2_RGB_ARB 0x8582 -#define GL_SOURCE0_ALPHA_ARB 0x8588 -#define GL_SOURCE1_ALPHA_ARB 0x8589 -#define GL_SOURCE2_ALPHA_ARB 0x858A -#define GL_OPERAND0_RGB_ARB 0x8590 -#define GL_OPERAND1_RGB_ARB 0x8591 -#define GL_OPERAND2_RGB_ARB 0x8592 -#define GL_OPERAND0_ALPHA_ARB 0x8598 -#define GL_OPERAND1_ALPHA_ARB 0x8599 -#define GL_OPERAND2_ALPHA_ARB 0x859A -#define GL_RGB_SCALE_ARB 0x8573 -#define GL_ADD_SIGNED_ARB 0x8574 -#define GL_INTERPOLATE_ARB 0x8575 -#define GL_SUBTRACT_ARB 0x84E7 -#define GL_CONSTANT_ARB 0x8576 -#define GL_PRIMARY_COLOR_ARB 0x8577 -#define GL_PREVIOUS_ARB 0x8578 -#endif /* GL_ARB_texture_env_combine */ - -#ifndef GL_ARB_texture_env_crossbar -#define GL_ARB_texture_env_crossbar 1 -#endif /* GL_ARB_texture_env_crossbar */ - -#ifndef GL_ARB_texture_env_dot3 -#define GL_ARB_texture_env_dot3 1 -#define GL_DOT3_RGB_ARB 0x86AE -#define GL_DOT3_RGBA_ARB 0x86AF -#endif /* GL_ARB_texture_env_dot3 */ - -#ifndef GL_ARB_texture_float -#define GL_ARB_texture_float 1 -#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 -#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 -#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 -#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 -#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 -#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 -#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 -#define GL_RGBA32F_ARB 0x8814 -#define GL_RGB32F_ARB 0x8815 -#define GL_ALPHA32F_ARB 0x8816 -#define GL_INTENSITY32F_ARB 0x8817 -#define GL_LUMINANCE32F_ARB 0x8818 -#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 -#define GL_RGBA16F_ARB 0x881A -#define GL_RGB16F_ARB 0x881B -#define GL_ALPHA16F_ARB 0x881C -#define GL_INTENSITY16F_ARB 0x881D -#define GL_LUMINANCE16F_ARB 0x881E -#define GL_LUMINANCE_ALPHA16F_ARB 0x881F -#endif /* GL_ARB_texture_float */ - -#ifndef GL_ARB_texture_gather -#define GL_ARB_texture_gather 1 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F -#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F -#endif /* GL_ARB_texture_gather */ - -#ifndef GL_ARB_texture_mirror_clamp_to_edge -#define GL_ARB_texture_mirror_clamp_to_edge 1 -#endif /* GL_ARB_texture_mirror_clamp_to_edge */ - -#ifndef GL_ARB_texture_mirrored_repeat -#define GL_ARB_texture_mirrored_repeat 1 -#define GL_MIRRORED_REPEAT_ARB 0x8370 -#endif /* GL_ARB_texture_mirrored_repeat */ - -#ifndef GL_ARB_texture_multisample -#define GL_ARB_texture_multisample 1 -#endif /* GL_ARB_texture_multisample */ - -#ifndef GL_ARB_texture_non_power_of_two -#define GL_ARB_texture_non_power_of_two 1 -#endif /* GL_ARB_texture_non_power_of_two */ - -#ifndef GL_ARB_texture_query_levels -#define GL_ARB_texture_query_levels 1 -#endif /* GL_ARB_texture_query_levels */ - -#ifndef GL_ARB_texture_query_lod -#define GL_ARB_texture_query_lod 1 -#endif /* GL_ARB_texture_query_lod */ - -#ifndef GL_ARB_texture_rectangle -#define GL_ARB_texture_rectangle 1 -#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 -#endif /* GL_ARB_texture_rectangle */ - -#ifndef GL_ARB_texture_rg -#define GL_ARB_texture_rg 1 -#endif /* GL_ARB_texture_rg */ - -#ifndef GL_ARB_texture_rgb10_a2ui -#define GL_ARB_texture_rgb10_a2ui 1 -#endif /* GL_ARB_texture_rgb10_a2ui */ - -#ifndef GL_ARB_texture_stencil8 -#define GL_ARB_texture_stencil8 1 -#endif /* GL_ARB_texture_stencil8 */ - -#ifndef GL_ARB_texture_storage -#define GL_ARB_texture_storage 1 -#endif /* GL_ARB_texture_storage */ - -#ifndef GL_ARB_texture_storage_multisample -#define GL_ARB_texture_storage_multisample 1 -#endif /* GL_ARB_texture_storage_multisample */ - -#ifndef GL_ARB_texture_swizzle -#define GL_ARB_texture_swizzle 1 -#endif /* GL_ARB_texture_swizzle */ - -#ifndef GL_ARB_texture_view -#define GL_ARB_texture_view 1 -#endif /* GL_ARB_texture_view */ - -#ifndef GL_ARB_timer_query -#define GL_ARB_timer_query 1 -#endif /* GL_ARB_timer_query */ - -#ifndef GL_ARB_transform_feedback2 -#define GL_ARB_transform_feedback2 1 -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#endif /* GL_ARB_transform_feedback2 */ - -#ifndef GL_ARB_transform_feedback3 -#define GL_ARB_transform_feedback3 1 -#endif /* GL_ARB_transform_feedback3 */ - -#ifndef GL_ARB_transform_feedback_instanced -#define GL_ARB_transform_feedback_instanced 1 -#endif /* GL_ARB_transform_feedback_instanced */ - -#ifndef GL_ARB_transpose_matrix -#define GL_ARB_transpose_matrix 1 -#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m); -GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m); -GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m); -GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m); -#endif -#endif /* GL_ARB_transpose_matrix */ - -#ifndef GL_ARB_uniform_buffer_object -#define GL_ARB_uniform_buffer_object 1 -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 -#endif /* GL_ARB_uniform_buffer_object */ - -#ifndef GL_ARB_vertex_array_bgra -#define GL_ARB_vertex_array_bgra 1 -#endif /* GL_ARB_vertex_array_bgra */ - -#ifndef GL_ARB_vertex_array_object -#define GL_ARB_vertex_array_object 1 -#endif /* GL_ARB_vertex_array_object */ - -#ifndef GL_ARB_vertex_attrib_64bit -#define GL_ARB_vertex_attrib_64bit 1 -#endif /* GL_ARB_vertex_attrib_64bit */ - -#ifndef GL_ARB_vertex_attrib_binding -#define GL_ARB_vertex_attrib_binding 1 -#endif /* GL_ARB_vertex_attrib_binding */ - -#ifndef GL_ARB_vertex_blend -#define GL_ARB_vertex_blend 1 -#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 -#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 -#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 -#define GL_VERTEX_BLEND_ARB 0x86A7 -#define GL_CURRENT_WEIGHT_ARB 0x86A8 -#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 -#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA -#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB -#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC -#define GL_WEIGHT_ARRAY_ARB 0x86AD -#define GL_MODELVIEW0_ARB 0x1700 -#define GL_MODELVIEW1_ARB 0x850A -#define GL_MODELVIEW2_ARB 0x8722 -#define GL_MODELVIEW3_ARB 0x8723 -#define GL_MODELVIEW4_ARB 0x8724 -#define GL_MODELVIEW5_ARB 0x8725 -#define GL_MODELVIEW6_ARB 0x8726 -#define GL_MODELVIEW7_ARB 0x8727 -#define GL_MODELVIEW8_ARB 0x8728 -#define GL_MODELVIEW9_ARB 0x8729 -#define GL_MODELVIEW10_ARB 0x872A -#define GL_MODELVIEW11_ARB 0x872B -#define GL_MODELVIEW12_ARB 0x872C -#define GL_MODELVIEW13_ARB 0x872D -#define GL_MODELVIEW14_ARB 0x872E -#define GL_MODELVIEW15_ARB 0x872F -#define GL_MODELVIEW16_ARB 0x8730 -#define GL_MODELVIEW17_ARB 0x8731 -#define GL_MODELVIEW18_ARB 0x8732 -#define GL_MODELVIEW19_ARB 0x8733 -#define GL_MODELVIEW20_ARB 0x8734 -#define GL_MODELVIEW21_ARB 0x8735 -#define GL_MODELVIEW22_ARB 0x8736 -#define GL_MODELVIEW23_ARB 0x8737 -#define GL_MODELVIEW24_ARB 0x8738 -#define GL_MODELVIEW25_ARB 0x8739 -#define GL_MODELVIEW26_ARB 0x873A -#define GL_MODELVIEW27_ARB 0x873B -#define GL_MODELVIEW28_ARB 0x873C -#define GL_MODELVIEW29_ARB 0x873D -#define GL_MODELVIEW30_ARB 0x873E -#define GL_MODELVIEW31_ARB 0x873F -typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); -typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); -typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); -typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); -typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); -typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); -typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights); -GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights); -GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights); -GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights); -GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights); -GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights); -GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights); -GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights); -GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glVertexBlendARB (GLint count); -#endif -#endif /* GL_ARB_vertex_blend */ - -#ifndef GL_ARB_vertex_buffer_object -#define GL_ARB_vertex_buffer_object 1 -#ifdef __MACOSX__ /* The OS X headers haven't caught up with Khronos yet */ -typedef long GLsizeiptrARB; -typedef long GLintptrARB; -#else -typedef ptrdiff_t GLsizeiptrARB; -typedef ptrdiff_t GLintptrARB; -#endif -#define GL_BUFFER_SIZE_ARB 0x8764 -#define GL_BUFFER_USAGE_ARB 0x8765 -#define GL_ARRAY_BUFFER_ARB 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 -#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 -#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 -#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D -#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F -#define GL_READ_ONLY_ARB 0x88B8 -#define GL_WRITE_ONLY_ARB 0x88B9 -#define GL_READ_WRITE_ARB 0x88BA -#define GL_BUFFER_ACCESS_ARB 0x88BB -#define GL_BUFFER_MAPPED_ARB 0x88BC -#define GL_BUFFER_MAP_POINTER_ARB 0x88BD -#define GL_STREAM_DRAW_ARB 0x88E0 -#define GL_STREAM_READ_ARB 0x88E1 -#define GL_STREAM_COPY_ARB 0x88E2 -#define GL_STATIC_DRAW_ARB 0x88E4 -#define GL_STATIC_READ_ARB 0x88E5 -#define GL_STATIC_COPY_ARB 0x88E6 -#define GL_DYNAMIC_DRAW_ARB 0x88E8 -#define GL_DYNAMIC_READ_ARB 0x88E9 -#define GL_DYNAMIC_COPY_ARB 0x88EA -typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data); -typedef void *(APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer); -GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers); -GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers); -GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer); -GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage); -GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data); -GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data); -GLAPI void *APIENTRY glMapBufferARB (GLenum target, GLenum access); -GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target); -GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, void **params); -#endif -#endif /* GL_ARB_vertex_buffer_object */ - -#ifndef GL_ARB_vertex_program -#define GL_ARB_vertex_program 1 -#define GL_COLOR_SUM_ARB 0x8458 -#define GL_VERTEX_PROGRAM_ARB 0x8620 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 -#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 -#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A -#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 -#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 -#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 -#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index); -GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index); -GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, void **pointer); -#endif -#endif /* GL_ARB_vertex_program */ - -#ifndef GL_ARB_vertex_shader -#define GL_ARB_vertex_shader 1 -#define GL_VERTEX_SHADER_ARB 0x8B31 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A -#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D -#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 -#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name); -GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name); -#endif -#endif /* GL_ARB_vertex_shader */ - -#ifndef GL_ARB_vertex_type_10f_11f_11f_rev -#define GL_ARB_vertex_type_10f_11f_11f_rev 1 -#endif /* GL_ARB_vertex_type_10f_11f_11f_rev */ - -#ifndef GL_ARB_vertex_type_2_10_10_10_rev -#define GL_ARB_vertex_type_2_10_10_10_rev 1 -#endif /* GL_ARB_vertex_type_2_10_10_10_rev */ - -#ifndef GL_ARB_viewport_array -#define GL_ARB_viewport_array 1 -#endif /* GL_ARB_viewport_array */ - -#ifndef GL_ARB_window_pos -#define GL_ARB_window_pos 1 -typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v); -GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v); -GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v); -GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v); -#endif -#endif /* GL_ARB_window_pos */ - -#ifndef GL_KHR_debug -#define GL_KHR_debug 1 -#endif /* GL_KHR_debug */ - -#ifndef GL_KHR_texture_compression_astc_hdr -#define GL_KHR_texture_compression_astc_hdr 1 -#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 -#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 -#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 -#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 -#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 -#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 -#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 -#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 -#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 -#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 -#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA -#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB -#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC -#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD -#endif /* GL_KHR_texture_compression_astc_hdr */ - -#ifndef GL_KHR_texture_compression_astc_ldr -#define GL_KHR_texture_compression_astc_ldr 1 -#endif /* GL_KHR_texture_compression_astc_ldr */ - -#ifndef GL_OES_byte_coordinates -#define GL_OES_byte_coordinates 1 -typedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords); -typedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s); -typedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords); -typedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t); -typedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords); -typedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r); -typedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords); -typedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q); -typedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords); -typedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x); -typedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords); -typedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y); -typedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords); -typedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z); -typedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s); -GLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords); -GLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t); -GLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords); -GLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r); -GLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords); -GLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q); -GLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords); -GLAPI void APIENTRY glTexCoord1bOES (GLbyte s); -GLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords); -GLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t); -GLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords); -GLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r); -GLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords); -GLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q); -GLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords); -GLAPI void APIENTRY glVertex2bOES (GLbyte x); -GLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords); -GLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y); -GLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords); -GLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z); -GLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords); -#endif -#endif /* GL_OES_byte_coordinates */ - -#ifndef GL_OES_compressed_paletted_texture -#define GL_OES_compressed_paletted_texture 1 -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 -#endif /* GL_OES_compressed_paletted_texture */ - -#ifndef GL_OES_fixed_point -#define GL_OES_fixed_point 1 -typedef GLint GLfixed; -#define GL_FIXED_OES 0x140C -typedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref); -typedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -typedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth); -typedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation); -typedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -typedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f); -typedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param); -typedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param); -typedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); -typedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation); -typedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params); -typedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); -typedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param); -typedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param); -typedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param); -typedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params); -typedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width); -typedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m); -typedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); -typedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param); -typedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -typedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz); -typedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); -typedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params); -typedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size); -typedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units); -typedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEOESPROC) (GLfixed value, GLboolean invert); -typedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); -typedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param); -typedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); -typedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); -typedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); -typedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); -typedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value); -typedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap); -typedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -typedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -typedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue); -typedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components); -typedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); -typedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u); -typedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v); -typedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); -typedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params); -typedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v); -typedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); -typedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values); -typedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); -typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params); -typedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component); -typedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m); -typedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points); -typedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points); -typedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2); -typedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords); -typedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token); -typedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values); -typedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param); -typedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param); -typedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor); -typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities); -typedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y); -typedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z); -typedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w); -typedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2); -typedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2); -typedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s); -typedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t); -typedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r); -typedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q); -typedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); -typedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); -typedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x); -typedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y); -typedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords); -typedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z); -typedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref); -GLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GLAPI void APIENTRY glClearDepthxOES (GLfixed depth); -GLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation); -GLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f); -GLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param); -GLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param); -GLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); -GLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation); -GLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params); -GLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params); -GLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params); -GLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param); -GLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param); -GLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param); -GLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params); -GLAPI void APIENTRY glLineWidthxOES (GLfixed width); -GLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m); -GLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param); -GLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param); -GLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m); -GLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -GLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz); -GLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); -GLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params); -GLAPI void APIENTRY glPointSizexOES (GLfixed size); -GLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units); -GLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -GLAPI void APIENTRY glSampleCoverageOES (GLfixed value, GLboolean invert); -GLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z); -GLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param); -GLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params); -GLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param); -GLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); -GLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z); -GLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value); -GLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap); -GLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue); -GLAPI void APIENTRY glColor3xvOES (const GLfixed *components); -GLAPI void APIENTRY glColor4xvOES (const GLfixed *components); -GLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param); -GLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); -GLAPI void APIENTRY glEvalCoord1xOES (GLfixed u); -GLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords); -GLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v); -GLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords); -GLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer); -GLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params); -GLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params); -GLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params); -GLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v); -GLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param); -GLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values); -GLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params); -GLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params); -GLAPI void APIENTRY glIndexxOES (GLfixed component); -GLAPI void APIENTRY glIndexxvOES (const GLfixed *component); -GLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m); -GLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points); -GLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points); -GLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2); -GLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2); -GLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m); -GLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s); -GLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords); -GLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t); -GLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords); -GLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r); -GLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords); -GLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords); -GLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords); -GLAPI void APIENTRY glPassThroughxOES (GLfixed token); -GLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values); -GLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param); -GLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param); -GLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor); -GLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities); -GLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y); -GLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords); -GLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z); -GLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords); -GLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w); -GLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords); -GLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2); -GLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2); -GLAPI void APIENTRY glTexCoord1xOES (GLfixed s); -GLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords); -GLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t); -GLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords); -GLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r); -GLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords); -GLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q); -GLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords); -GLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param); -GLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params); -GLAPI void APIENTRY glVertex2xOES (GLfixed x); -GLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords); -GLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y); -GLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords); -GLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z); -GLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords); -#endif -#endif /* GL_OES_fixed_point */ - -#ifndef GL_OES_query_matrix -#define GL_OES_query_matrix 1 -typedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLbitfield APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent); -#endif -#endif /* GL_OES_query_matrix */ - -#ifndef GL_OES_read_format -#define GL_OES_read_format 1 -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B -#endif /* GL_OES_read_format */ - -#ifndef GL_OES_single_precision -#define GL_OES_single_precision 1 -typedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth); -typedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation); -typedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f); -typedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); -typedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation); -typedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClearDepthfOES (GLclampf depth); -GLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation); -GLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f); -GLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); -GLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation); -GLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); -#endif -#endif /* GL_OES_single_precision */ - -#ifndef GL_3DFX_multisample -#define GL_3DFX_multisample 1 -#define GL_MULTISAMPLE_3DFX 0x86B2 -#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 -#define GL_SAMPLES_3DFX 0x86B4 -#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 -#endif /* GL_3DFX_multisample */ - -#ifndef GL_3DFX_tbuffer -#define GL_3DFX_tbuffer 1 -typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask); -#endif -#endif /* GL_3DFX_tbuffer */ - -#ifndef GL_3DFX_texture_compression_FXT1 -#define GL_3DFX_texture_compression_FXT1 1 -#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 -#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 -#endif /* GL_3DFX_texture_compression_FXT1 */ - -#ifndef GL_AMD_blend_minmax_factor -#define GL_AMD_blend_minmax_factor 1 -#define GL_FACTOR_MIN_AMD 0x901C -#define GL_FACTOR_MAX_AMD 0x901D -#endif /* GL_AMD_blend_minmax_factor */ - -#ifndef GL_AMD_conservative_depth -#define GL_AMD_conservative_depth 1 -#endif /* GL_AMD_conservative_depth */ - -#ifndef GL_AMD_debug_output -#define GL_AMD_debug_output 1 -typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); -#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 -#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 -#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 -#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A -#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B -#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C -#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D -#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E -#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F -#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 -typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); -#endif -#endif /* GL_AMD_debug_output */ - -#ifndef GL_AMD_depth_clamp_separate -#define GL_AMD_depth_clamp_separate 1 -#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E -#define GL_DEPTH_CLAMP_FAR_AMD 0x901F -#endif /* GL_AMD_depth_clamp_separate */ - -#ifndef GL_AMD_draw_buffers_blend -#define GL_AMD_draw_buffers_blend 1 -typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -#endif -#endif /* GL_AMD_draw_buffers_blend */ - -#ifndef GL_AMD_gcn_shader -#define GL_AMD_gcn_shader 1 -#endif /* GL_AMD_gcn_shader */ - -#ifndef GL_AMD_gpu_shader_int64 -#define GL_AMD_gpu_shader_int64 1 -typedef int64_t GLint64EXT; -#define GL_INT64_NV 0x140E -#define GL_UNSIGNED_INT64_NV 0x140F -#define GL_INT8_NV 0x8FE0 -#define GL_INT8_VEC2_NV 0x8FE1 -#define GL_INT8_VEC3_NV 0x8FE2 -#define GL_INT8_VEC4_NV 0x8FE3 -#define GL_INT16_NV 0x8FE4 -#define GL_INT16_VEC2_NV 0x8FE5 -#define GL_INT16_VEC3_NV 0x8FE6 -#define GL_INT16_VEC4_NV 0x8FE7 -#define GL_INT64_VEC2_NV 0x8FE9 -#define GL_INT64_VEC3_NV 0x8FEA -#define GL_INT64_VEC4_NV 0x8FEB -#define GL_UNSIGNED_INT8_NV 0x8FEC -#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED -#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE -#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF -#define GL_UNSIGNED_INT16_NV 0x8FF0 -#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 -#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 -#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 -#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 -#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 -#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 -#define GL_FLOAT16_NV 0x8FF8 -#define GL_FLOAT16_VEC2_NV 0x8FF9 -#define GL_FLOAT16_VEC3_NV 0x8FFA -#define GL_FLOAT16_VEC4_NV 0x8FFB -typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); -typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); -typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); -GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); -GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); -GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); -GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); -GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); -GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif -#endif /* GL_AMD_gpu_shader_int64 */ - -#ifndef GL_AMD_interleaved_elements -#define GL_AMD_interleaved_elements 1 -#define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4 -#define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5 -typedef void (APIENTRYP PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribParameteriAMD (GLuint index, GLenum pname, GLint param); -#endif -#endif /* GL_AMD_interleaved_elements */ - -#ifndef GL_AMD_multi_draw_indirect -#define GL_AMD_multi_draw_indirect 1 -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride); -GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride); -#endif -#endif /* GL_AMD_multi_draw_indirect */ - -#ifndef GL_AMD_name_gen_delete -#define GL_AMD_name_gen_delete 1 -#define GL_DATA_BUFFER_AMD 0x9151 -#define GL_PERFORMANCE_MONITOR_AMD 0x9152 -#define GL_QUERY_OBJECT_AMD 0x9153 -#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 -#define GL_SAMPLER_OBJECT_AMD 0x9155 -typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); -typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); -typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); -GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); -GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); -#endif -#endif /* GL_AMD_name_gen_delete */ - -#ifndef GL_AMD_occlusion_query_event -#define GL_AMD_occlusion_query_event 1 -#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F -#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001 -#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002 -#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004 -#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008 -#define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF -typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param); -#endif -#endif /* GL_AMD_occlusion_query_event */ - -#ifndef GL_AMD_performance_monitor -#define GL_AMD_performance_monitor 1 -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFMON_RESULT_AMD 0x8BC6 -typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data); -typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); -typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data); -GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); -GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); -GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor); -GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor); -GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif -#endif /* GL_AMD_performance_monitor */ - -#ifndef GL_AMD_pinned_memory -#define GL_AMD_pinned_memory 1 -#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 -#endif /* GL_AMD_pinned_memory */ - -#ifndef GL_AMD_query_buffer_object -#define GL_AMD_query_buffer_object 1 -#define GL_QUERY_BUFFER_AMD 0x9192 -#define GL_QUERY_BUFFER_BINDING_AMD 0x9193 -#define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194 -#endif /* GL_AMD_query_buffer_object */ - -#ifndef GL_AMD_sample_positions -#define GL_AMD_sample_positions 1 -#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F -typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); -#endif -#endif /* GL_AMD_sample_positions */ - -#ifndef GL_AMD_seamless_cubemap_per_texture -#define GL_AMD_seamless_cubemap_per_texture 1 -#endif /* GL_AMD_seamless_cubemap_per_texture */ - -#ifndef GL_AMD_shader_atomic_counter_ops -#define GL_AMD_shader_atomic_counter_ops 1 -#endif /* GL_AMD_shader_atomic_counter_ops */ - -#ifndef GL_AMD_shader_stencil_export -#define GL_AMD_shader_stencil_export 1 -#endif /* GL_AMD_shader_stencil_export */ - -#ifndef GL_AMD_shader_trinary_minmax -#define GL_AMD_shader_trinary_minmax 1 -#endif /* GL_AMD_shader_trinary_minmax */ - -#ifndef GL_AMD_sparse_texture -#define GL_AMD_sparse_texture 1 -#define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195 -#define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196 -#define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197 -#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198 -#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199 -#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A -#define GL_MIN_SPARSE_LEVEL_AMD 0x919B -#define GL_MIN_LOD_WARNING_AMD 0x919C -#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001 -typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); -typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); -GLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); -#endif -#endif /* GL_AMD_sparse_texture */ - -#ifndef GL_AMD_stencil_operation_extended -#define GL_AMD_stencil_operation_extended 1 -#define GL_SET_AMD 0x874A -#define GL_REPLACE_VALUE_AMD 0x874B -#define GL_STENCIL_OP_VALUE_AMD 0x874C -#define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D -typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value); -#endif -#endif /* GL_AMD_stencil_operation_extended */ - -#ifndef GL_AMD_texture_texture4 -#define GL_AMD_texture_texture4 1 -#endif /* GL_AMD_texture_texture4 */ - -#ifndef GL_AMD_transform_feedback3_lines_triangles -#define GL_AMD_transform_feedback3_lines_triangles 1 -#endif /* GL_AMD_transform_feedback3_lines_triangles */ - -#ifndef GL_AMD_transform_feedback4 -#define GL_AMD_transform_feedback4 1 -#define GL_STREAM_RASTERIZATION_AMD 0x91A0 -#endif /* GL_AMD_transform_feedback4 */ - -#ifndef GL_AMD_vertex_shader_layer -#define GL_AMD_vertex_shader_layer 1 -#endif /* GL_AMD_vertex_shader_layer */ - -#ifndef GL_AMD_vertex_shader_tessellator -#define GL_AMD_vertex_shader_tessellator 1 -#define GL_SAMPLER_BUFFER_AMD 0x9001 -#define GL_INT_SAMPLER_BUFFER_AMD 0x9002 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 -#define GL_TESSELLATION_MODE_AMD 0x9004 -#define GL_TESSELLATION_FACTOR_AMD 0x9005 -#define GL_DISCRETE_AMD 0x9006 -#define GL_CONTINUOUS_AMD 0x9007 -typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor); -typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor); -GLAPI void APIENTRY glTessellationModeAMD (GLenum mode); -#endif -#endif /* GL_AMD_vertex_shader_tessellator */ - -#ifndef GL_AMD_vertex_shader_viewport_index -#define GL_AMD_vertex_shader_viewport_index 1 -#endif /* GL_AMD_vertex_shader_viewport_index */ - -#ifndef GL_APPLE_aux_depth_stencil -#define GL_APPLE_aux_depth_stencil 1 -#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 -#endif /* GL_APPLE_aux_depth_stencil */ - -#ifndef GL_APPLE_client_storage -#define GL_APPLE_client_storage 1 -#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 -#endif /* GL_APPLE_client_storage */ - -#ifndef GL_APPLE_element_array -#define GL_APPLE_element_array 1 -#define GL_ELEMENT_ARRAY_APPLE 0x8A0C -#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D -#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E -typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const void *pointer); -GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count); -GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); -GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); -#endif -#endif /* GL_APPLE_element_array */ - -#ifndef GL_APPLE_fence -#define GL_APPLE_fence 1 -#define GL_DRAW_PIXELS_APPLE 0x8A0A -#define GL_FENCE_APPLE 0x8A0B -typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); -typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); -typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences); -GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences); -GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence); -GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name); -GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name); -#endif -#endif /* GL_APPLE_fence */ - -#ifndef GL_APPLE_float_pixels -#define GL_APPLE_float_pixels 1 -#define GL_HALF_APPLE 0x140B -#define GL_RGBA_FLOAT32_APPLE 0x8814 -#define GL_RGB_FLOAT32_APPLE 0x8815 -#define GL_ALPHA_FLOAT32_APPLE 0x8816 -#define GL_INTENSITY_FLOAT32_APPLE 0x8817 -#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 -#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 -#define GL_RGBA_FLOAT16_APPLE 0x881A -#define GL_RGB_FLOAT16_APPLE 0x881B -#define GL_ALPHA_FLOAT16_APPLE 0x881C -#define GL_INTENSITY_FLOAT16_APPLE 0x881D -#define GL_LUMINANCE_FLOAT16_APPLE 0x881E -#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F -#define GL_COLOR_FLOAT_APPLE 0x8A0F -#endif /* GL_APPLE_float_pixels */ - -#ifndef GL_APPLE_flush_buffer_range -#define GL_APPLE_flush_buffer_range 1 -#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 -#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 -typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size); -#endif -#endif /* GL_APPLE_flush_buffer_range */ - -#ifndef GL_APPLE_object_purgeable -#define GL_APPLE_object_purgeable 1 -#define GL_BUFFER_OBJECT_APPLE 0x85B3 -#define GL_RELEASED_APPLE 0x8A19 -#define GL_VOLATILE_APPLE 0x8A1A -#define GL_RETAINED_APPLE 0x8A1B -#define GL_UNDEFINED_APPLE 0x8A1C -#define GL_PURGEABLE_APPLE 0x8A1D -typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); -typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); -GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); -GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params); -#endif -#endif /* GL_APPLE_object_purgeable */ - -#ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 1 -#define GL_RGB_422_APPLE 0x8A1F -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#define GL_RGB_RAW_422_APPLE 0x8A51 -#endif /* GL_APPLE_rgb_422 */ - -#ifndef GL_APPLE_row_bytes -#define GL_APPLE_row_bytes 1 -#define GL_PACK_ROW_BYTES_APPLE 0x8A15 -#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 -#endif /* GL_APPLE_row_bytes */ - -#ifndef GL_APPLE_specular_vector -#define GL_APPLE_specular_vector 1 -#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 -#endif /* GL_APPLE_specular_vector */ - -#ifndef GL_APPLE_texture_range -#define GL_APPLE_texture_range 1 -#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 -#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 -#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC -#define GL_STORAGE_PRIVATE_APPLE 0x85BD -#define GL_STORAGE_CACHED_APPLE 0x85BE -#define GL_STORAGE_SHARED_APPLE 0x85BF -typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const void *pointer); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const void *pointer); -GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params); -#endif -#endif /* GL_APPLE_texture_range */ - -#ifndef GL_APPLE_transform_hint -#define GL_APPLE_transform_hint 1 -#define GL_TRANSFORM_HINT_APPLE 0x85B1 -#endif /* GL_APPLE_transform_hint */ - -#ifndef GL_APPLE_vertex_array_object -#define GL_APPLE_vertex_array_object 1 -#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array); -GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays); -GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays); -GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array); -#endif -#endif /* GL_APPLE_vertex_array_object */ - -#ifndef GL_APPLE_vertex_array_range -#define GL_APPLE_vertex_array_range 1 -#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E -#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F -#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 -#define GL_STORAGE_CLIENT_APPLE 0x85B4 -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer); -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer); -typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, void *pointer); -GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, void *pointer); -GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param); -#endif -#endif /* GL_APPLE_vertex_array_range */ - -#ifndef GL_APPLE_vertex_program_evaluators -#define GL_APPLE_vertex_program_evaluators 1 -#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 -#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 -#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 -#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 -#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 -#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 -#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 -#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 -#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 -#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); -typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname); -GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname); -GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname); -GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -#endif -#endif /* GL_APPLE_vertex_program_evaluators */ - -#ifndef GL_APPLE_ycbcr_422 -#define GL_APPLE_ycbcr_422 1 -#define GL_YCBCR_422_APPLE 0x85B9 -#endif /* GL_APPLE_ycbcr_422 */ - -#ifndef GL_ATI_draw_buffers -#define GL_ATI_draw_buffers 1 -#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 -#define GL_DRAW_BUFFER0_ATI 0x8825 -#define GL_DRAW_BUFFER1_ATI 0x8826 -#define GL_DRAW_BUFFER2_ATI 0x8827 -#define GL_DRAW_BUFFER3_ATI 0x8828 -#define GL_DRAW_BUFFER4_ATI 0x8829 -#define GL_DRAW_BUFFER5_ATI 0x882A -#define GL_DRAW_BUFFER6_ATI 0x882B -#define GL_DRAW_BUFFER7_ATI 0x882C -#define GL_DRAW_BUFFER8_ATI 0x882D -#define GL_DRAW_BUFFER9_ATI 0x882E -#define GL_DRAW_BUFFER10_ATI 0x882F -#define GL_DRAW_BUFFER11_ATI 0x8830 -#define GL_DRAW_BUFFER12_ATI 0x8831 -#define GL_DRAW_BUFFER13_ATI 0x8832 -#define GL_DRAW_BUFFER14_ATI 0x8833 -#define GL_DRAW_BUFFER15_ATI 0x8834 -typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs); -#endif -#endif /* GL_ATI_draw_buffers */ - -#ifndef GL_ATI_element_array -#define GL_ATI_element_array 1 -#define GL_ELEMENT_ARRAY_ATI 0x8768 -#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 -#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A -typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerATI (GLenum type, const void *pointer); -GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count); -GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count); -#endif -#endif /* GL_ATI_element_array */ - -#ifndef GL_ATI_envmap_bumpmap -#define GL_ATI_envmap_bumpmap 1 -#define GL_BUMP_ROT_MATRIX_ATI 0x8775 -#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 -#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 -#define GL_BUMP_TEX_UNITS_ATI 0x8778 -#define GL_DUDV_ATI 0x8779 -#define GL_DU8DV8_ATI 0x877A -#define GL_BUMP_ENVMAP_ATI 0x877B -#define GL_BUMP_TARGET_ATI 0x877C -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param); -GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param); -GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param); -GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param); -#endif -#endif /* GL_ATI_envmap_bumpmap */ - -#ifndef GL_ATI_fragment_shader -#define GL_ATI_fragment_shader 1 -#define GL_FRAGMENT_SHADER_ATI 0x8920 -#define GL_REG_0_ATI 0x8921 -#define GL_REG_1_ATI 0x8922 -#define GL_REG_2_ATI 0x8923 -#define GL_REG_3_ATI 0x8924 -#define GL_REG_4_ATI 0x8925 -#define GL_REG_5_ATI 0x8926 -#define GL_REG_6_ATI 0x8927 -#define GL_REG_7_ATI 0x8928 -#define GL_REG_8_ATI 0x8929 -#define GL_REG_9_ATI 0x892A -#define GL_REG_10_ATI 0x892B -#define GL_REG_11_ATI 0x892C -#define GL_REG_12_ATI 0x892D -#define GL_REG_13_ATI 0x892E -#define GL_REG_14_ATI 0x892F -#define GL_REG_15_ATI 0x8930 -#define GL_REG_16_ATI 0x8931 -#define GL_REG_17_ATI 0x8932 -#define GL_REG_18_ATI 0x8933 -#define GL_REG_19_ATI 0x8934 -#define GL_REG_20_ATI 0x8935 -#define GL_REG_21_ATI 0x8936 -#define GL_REG_22_ATI 0x8937 -#define GL_REG_23_ATI 0x8938 -#define GL_REG_24_ATI 0x8939 -#define GL_REG_25_ATI 0x893A -#define GL_REG_26_ATI 0x893B -#define GL_REG_27_ATI 0x893C -#define GL_REG_28_ATI 0x893D -#define GL_REG_29_ATI 0x893E -#define GL_REG_30_ATI 0x893F -#define GL_REG_31_ATI 0x8940 -#define GL_CON_0_ATI 0x8941 -#define GL_CON_1_ATI 0x8942 -#define GL_CON_2_ATI 0x8943 -#define GL_CON_3_ATI 0x8944 -#define GL_CON_4_ATI 0x8945 -#define GL_CON_5_ATI 0x8946 -#define GL_CON_6_ATI 0x8947 -#define GL_CON_7_ATI 0x8948 -#define GL_CON_8_ATI 0x8949 -#define GL_CON_9_ATI 0x894A -#define GL_CON_10_ATI 0x894B -#define GL_CON_11_ATI 0x894C -#define GL_CON_12_ATI 0x894D -#define GL_CON_13_ATI 0x894E -#define GL_CON_14_ATI 0x894F -#define GL_CON_15_ATI 0x8950 -#define GL_CON_16_ATI 0x8951 -#define GL_CON_17_ATI 0x8952 -#define GL_CON_18_ATI 0x8953 -#define GL_CON_19_ATI 0x8954 -#define GL_CON_20_ATI 0x8955 -#define GL_CON_21_ATI 0x8956 -#define GL_CON_22_ATI 0x8957 -#define GL_CON_23_ATI 0x8958 -#define GL_CON_24_ATI 0x8959 -#define GL_CON_25_ATI 0x895A -#define GL_CON_26_ATI 0x895B -#define GL_CON_27_ATI 0x895C -#define GL_CON_28_ATI 0x895D -#define GL_CON_29_ATI 0x895E -#define GL_CON_30_ATI 0x895F -#define GL_CON_31_ATI 0x8960 -#define GL_MOV_ATI 0x8961 -#define GL_ADD_ATI 0x8963 -#define GL_MUL_ATI 0x8964 -#define GL_SUB_ATI 0x8965 -#define GL_DOT3_ATI 0x8966 -#define GL_DOT4_ATI 0x8967 -#define GL_MAD_ATI 0x8968 -#define GL_LERP_ATI 0x8969 -#define GL_CND_ATI 0x896A -#define GL_CND0_ATI 0x896B -#define GL_DOT2_ADD_ATI 0x896C -#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D -#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E -#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F -#define GL_NUM_PASSES_ATI 0x8970 -#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 -#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 -#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 -#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 -#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 -#define GL_SWIZZLE_STR_ATI 0x8976 -#define GL_SWIZZLE_STQ_ATI 0x8977 -#define GL_SWIZZLE_STR_DR_ATI 0x8978 -#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 -#define GL_SWIZZLE_STRQ_ATI 0x897A -#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B -#define GL_RED_BIT_ATI 0x00000001 -#define GL_GREEN_BIT_ATI 0x00000002 -#define GL_BLUE_BIT_ATI 0x00000004 -#define GL_2X_BIT_ATI 0x00000001 -#define GL_4X_BIT_ATI 0x00000002 -#define GL_8X_BIT_ATI 0x00000004 -#define GL_HALF_BIT_ATI 0x00000008 -#define GL_QUARTER_BIT_ATI 0x00000010 -#define GL_EIGHTH_BIT_ATI 0x00000020 -#define GL_SATURATE_BIT_ATI 0x00000040 -#define GL_COMP_BIT_ATI 0x00000002 -#define GL_NEGATE_BIT_ATI 0x00000004 -#define GL_BIAS_BIT_ATI 0x00000008 -typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); -typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); -typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range); -GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id); -GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id); -GLAPI void APIENTRY glBeginFragmentShaderATI (void); -GLAPI void APIENTRY glEndFragmentShaderATI (void); -GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle); -GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle); -GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value); -#endif -#endif /* GL_ATI_fragment_shader */ - -#ifndef GL_ATI_map_object_buffer -#define GL_ATI_map_object_buffer 1 -typedef void *(APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void *APIENTRY glMapObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer); -#endif -#endif /* GL_ATI_map_object_buffer */ - -#ifndef GL_ATI_meminfo -#define GL_ATI_meminfo 1 -#define GL_VBO_FREE_MEMORY_ATI 0x87FB -#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC -#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD -#endif /* GL_ATI_meminfo */ - -#ifndef GL_ATI_pixel_format_float -#define GL_ATI_pixel_format_float 1 -#define GL_RGBA_FLOAT_MODE_ATI 0x8820 -#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 -#endif /* GL_ATI_pixel_format_float */ - -#ifndef GL_ATI_pn_triangles -#define GL_ATI_pn_triangles 1 -#define GL_PN_TRIANGLES_ATI 0x87F0 -#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 -#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 -#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 -#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 -#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 -#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 -#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 -#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 -typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param); -GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param); -#endif -#endif /* GL_ATI_pn_triangles */ - -#ifndef GL_ATI_separate_stencil -#define GL_ATI_separate_stencil 1 -#define GL_STENCIL_BACK_FUNC_ATI 0x8800 -#define GL_STENCIL_BACK_FAIL_ATI 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -#endif -#endif /* GL_ATI_separate_stencil */ - -#ifndef GL_ATI_text_fragment_shader -#define GL_ATI_text_fragment_shader 1 -#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 -#endif /* GL_ATI_text_fragment_shader */ - -#ifndef GL_ATI_texture_env_combine3 -#define GL_ATI_texture_env_combine3 1 -#define GL_MODULATE_ADD_ATI 0x8744 -#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 -#define GL_MODULATE_SUBTRACT_ATI 0x8746 -#endif /* GL_ATI_texture_env_combine3 */ - -#ifndef GL_ATI_texture_float -#define GL_ATI_texture_float 1 -#define GL_RGBA_FLOAT32_ATI 0x8814 -#define GL_RGB_FLOAT32_ATI 0x8815 -#define GL_ALPHA_FLOAT32_ATI 0x8816 -#define GL_INTENSITY_FLOAT32_ATI 0x8817 -#define GL_LUMINANCE_FLOAT32_ATI 0x8818 -#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 -#define GL_RGBA_FLOAT16_ATI 0x881A -#define GL_RGB_FLOAT16_ATI 0x881B -#define GL_ALPHA_FLOAT16_ATI 0x881C -#define GL_INTENSITY_FLOAT16_ATI 0x881D -#define GL_LUMINANCE_FLOAT16_ATI 0x881E -#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F -#endif /* GL_ATI_texture_float */ - -#ifndef GL_ATI_texture_mirror_once -#define GL_ATI_texture_mirror_once 1 -#define GL_MIRROR_CLAMP_ATI 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 -#endif /* GL_ATI_texture_mirror_once */ - -#ifndef GL_ATI_vertex_array_object -#define GL_ATI_vertex_array_object 1 -#define GL_STATIC_ATI 0x8760 -#define GL_DYNAMIC_ATI 0x8761 -#define GL_PRESERVE_ATI 0x8762 -#define GL_DISCARD_ATI 0x8763 -#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 -#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 -#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 -#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 -typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage); -typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const void *pointer, GLenum usage); -GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve); -GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params); -GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params); -#endif -#endif /* GL_ATI_vertex_array_object */ - -#ifndef GL_ATI_vertex_attrib_array_object -#define GL_ATI_vertex_attrib_array_object 1 -typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params); -#endif -#endif /* GL_ATI_vertex_attrib_array_object */ - -#ifndef GL_ATI_vertex_streams -#define GL_ATI_vertex_streams 1 -#define GL_MAX_VERTEX_STREAMS_ATI 0x876B -#define GL_VERTEX_STREAM0_ATI 0x876C -#define GL_VERTEX_STREAM1_ATI 0x876D -#define GL_VERTEX_STREAM2_ATI 0x876E -#define GL_VERTEX_STREAM3_ATI 0x876F -#define GL_VERTEX_STREAM4_ATI 0x8770 -#define GL_VERTEX_STREAM5_ATI 0x8771 -#define GL_VERTEX_STREAM6_ATI 0x8772 -#define GL_VERTEX_STREAM7_ATI 0x8773 -#define GL_VERTEX_SOURCE_ATI 0x8774 -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x); -GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x); -GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x); -GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x); -GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y); -GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords); -GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz); -GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream); -GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param); -GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param); -#endif -#endif /* GL_ATI_vertex_streams */ - -#ifndef GL_EXT_422_pixels -#define GL_EXT_422_pixels 1 -#define GL_422_EXT 0x80CC -#define GL_422_REV_EXT 0x80CD -#define GL_422_AVERAGE_EXT 0x80CE -#define GL_422_REV_AVERAGE_EXT 0x80CF -#endif /* GL_EXT_422_pixels */ - -#ifndef GL_EXT_abgr -#define GL_EXT_abgr 1 -#define GL_ABGR_EXT 0x8000 -#endif /* GL_EXT_abgr */ - -#ifndef GL_EXT_bgra -#define GL_EXT_bgra 1 -#define GL_BGR_EXT 0x80E0 -#define GL_BGRA_EXT 0x80E1 -#endif /* GL_EXT_bgra */ - -#ifndef GL_EXT_bindable_uniform -#define GL_EXT_bindable_uniform 1 -#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 -#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 -#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 -#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED -#define GL_UNIFORM_BUFFER_EXT 0x8DEE -#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF -typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); -typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); -typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer); -GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location); -GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location); -#endif -#endif /* GL_EXT_bindable_uniform */ - -#ifndef GL_EXT_blend_color -#define GL_EXT_blend_color 1 -#define GL_CONSTANT_COLOR_EXT 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 -#define GL_CONSTANT_ALPHA_EXT 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 -#define GL_BLEND_COLOR_EXT 0x8005 -typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -#endif -#endif /* GL_EXT_blend_color */ - -#ifndef GL_EXT_blend_equation_separate -#define GL_EXT_blend_equation_separate 1 -#define GL_BLEND_EQUATION_RGB_EXT 0x8009 -#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha); -#endif -#endif /* GL_EXT_blend_equation_separate */ - -#ifndef GL_EXT_blend_func_separate -#define GL_EXT_blend_func_separate 1 -#define GL_BLEND_DST_RGB_EXT 0x80C8 -#define GL_BLEND_SRC_RGB_EXT 0x80C9 -#define GL_BLEND_DST_ALPHA_EXT 0x80CA -#define GL_BLEND_SRC_ALPHA_EXT 0x80CB -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif -#endif /* GL_EXT_blend_func_separate */ - -#ifndef GL_EXT_blend_logic_op -#define GL_EXT_blend_logic_op 1 -#endif /* GL_EXT_blend_logic_op */ - -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#define GL_FUNC_ADD_EXT 0x8006 -#define GL_BLEND_EQUATION_EXT 0x8009 -typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationEXT (GLenum mode); -#endif -#endif /* GL_EXT_blend_minmax */ - -#ifndef GL_EXT_blend_subtract -#define GL_EXT_blend_subtract 1 -#define GL_FUNC_SUBTRACT_EXT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B -#endif /* GL_EXT_blend_subtract */ - -#ifndef GL_EXT_clip_volume_hint -#define GL_EXT_clip_volume_hint 1 -#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 -#endif /* GL_EXT_clip_volume_hint */ - -#ifndef GL_EXT_cmyka -#define GL_EXT_cmyka 1 -#define GL_CMYK_EXT 0x800C -#define GL_CMYKA_EXT 0x800D -#define GL_PACK_CMYK_HINT_EXT 0x800E -#define GL_UNPACK_CMYK_HINT_EXT 0x800F -#endif /* GL_EXT_cmyka */ - -#ifndef GL_EXT_color_subtable -#define GL_EXT_color_subtable 1 -typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -#endif -#endif /* GL_EXT_color_subtable */ - -#ifndef GL_EXT_compiled_vertex_array -#define GL_EXT_compiled_vertex_array 1 -#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 -#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 -typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count); -GLAPI void APIENTRY glUnlockArraysEXT (void); -#endif -#endif /* GL_EXT_compiled_vertex_array */ - -#ifndef GL_EXT_convolution -#define GL_EXT_convolution 1 -#define GL_CONVOLUTION_1D_EXT 0x8010 -#define GL_CONVOLUTION_2D_EXT 0x8011 -#define GL_SEPARABLE_2D_EXT 0x8012 -#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 -#define GL_REDUCE_EXT 0x8016 -#define GL_CONVOLUTION_FORMAT_EXT 0x8017 -#define GL_CONVOLUTION_WIDTH_EXT 0x8018 -#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image); -GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image); -GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params); -GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params); -GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, void *image); -GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span); -GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column); -#endif -#endif /* GL_EXT_convolution */ - -#ifndef GL_EXT_coordinate_frame -#define GL_EXT_coordinate_frame 1 -#define GL_TANGENT_ARRAY_EXT 0x8439 -#define GL_BINORMAL_ARRAY_EXT 0x843A -#define GL_CURRENT_TANGENT_EXT 0x843B -#define GL_CURRENT_BINORMAL_EXT 0x843C -#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E -#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F -#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 -#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 -#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 -#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 -#define GL_MAP1_TANGENT_EXT 0x8444 -#define GL_MAP2_TANGENT_EXT 0x8445 -#define GL_MAP1_BINORMAL_EXT 0x8446 -#define GL_MAP2_BINORMAL_EXT 0x8447 -typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); -typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); -typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); -typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); -typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); -typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); -typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); -typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); -typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); -typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); -typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz); -GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz); -GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz); -GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz); -GLAPI void APIENTRY glTangent3ivEXT (const GLint *v); -GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz); -GLAPI void APIENTRY glTangent3svEXT (const GLshort *v); -GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz); -GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz); -GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz); -GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz); -GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v); -GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz); -GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v); -GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const void *pointer); -#endif -#endif /* GL_EXT_coordinate_frame */ - -#ifndef GL_EXT_copy_texture -#define GL_EXT_copy_texture 1 -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif -#endif /* GL_EXT_copy_texture */ - -#ifndef GL_EXT_cull_vertex -#define GL_EXT_cull_vertex 1 -#define GL_CULL_VERTEX_EXT 0x81AA -#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB -#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC -typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params); -GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params); -#endif -#endif /* GL_EXT_cull_vertex */ - -#ifndef GL_EXT_debug_label -#define GL_EXT_debug_label 1 -#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F -#define GL_PROGRAM_OBJECT_EXT 0x8B40 -#define GL_SHADER_OBJECT_EXT 0x8B48 -#define GL_BUFFER_OBJECT_EXT 0x9151 -#define GL_QUERY_OBJECT_EXT 0x9153 -#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 -typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); -typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); -GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif -#endif /* GL_EXT_debug_label */ - -#ifndef GL_EXT_debug_marker -#define GL_EXT_debug_marker 1 -typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); -GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); -GLAPI void APIENTRY glPopGroupMarkerEXT (void); -#endif -#endif /* GL_EXT_debug_marker */ - -#ifndef GL_EXT_depth_bounds_test -#define GL_EXT_depth_bounds_test 1 -#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 -#define GL_DEPTH_BOUNDS_EXT 0x8891 -typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax); -#endif -#endif /* GL_EXT_depth_bounds_test */ - -#ifndef GL_EXT_direct_state_access -#define GL_EXT_direct_state_access 1 -#define GL_PROGRAM_MATRIX_EXT 0x8E2D -#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E -#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F -typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); -typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); -typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); -typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); -typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data); -typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); -typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img); -typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); -typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); -typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); -typedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); -typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); -typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); -typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array); -typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array); -typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index); -typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param); -typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param); -typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); -typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode); -GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glMatrixPopEXT (GLenum mode); -GLAPI void APIENTRY glMatrixPushEXT (GLenum mode); -GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask); -GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask); -GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); -GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); -GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); -GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); -GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); -GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); -GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); -GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data); -GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index); -GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index); -GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index); -GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); -GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); -GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img); -GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img); -GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); -GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); -GLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access); -GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer); -GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params); -GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); -GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); -GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); -GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); -GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); -GLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params); -GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string); -GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string); -GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); -GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target); -GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); -GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); -GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); -GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); -GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array); -GLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array); -GLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index); -GLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index); -GLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param); -GLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param); -GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param); -GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param); -GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); -GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param); -GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); -GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); -GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex); -GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor); -GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident); -GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor); -#endif -#endif /* GL_EXT_direct_state_access */ - -#ifndef GL_EXT_draw_buffers2 -#define GL_EXT_draw_buffers2 1 -typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -#endif -#endif /* GL_EXT_draw_buffers2 */ - -#ifndef GL_EXT_draw_instanced -#define GL_EXT_draw_instanced 1 -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#endif -#endif /* GL_EXT_draw_instanced */ - -#ifndef GL_EXT_draw_range_elements -#define GL_EXT_draw_range_elements 1 -#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 -#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -#endif -#endif /* GL_EXT_draw_range_elements */ - -#ifndef GL_EXT_fog_coord -#define GL_EXT_fog_coord 1 -#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 -#define GL_FOG_COORDINATE_EXT 0x8451 -#define GL_FRAGMENT_DEPTH_EXT 0x8452 -#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 -#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 -#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 -#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 -#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 -typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord); -GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord); -GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord); -GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord); -GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer); -#endif -#endif /* GL_EXT_fog_coord */ - -#ifndef GL_EXT_framebuffer_blit -#define GL_EXT_framebuffer_blit 1 -#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA -typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif -#endif /* GL_EXT_framebuffer_blit */ - -#ifndef GL_EXT_framebuffer_multisample -#define GL_EXT_framebuffer_multisample 1 -#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 -#define GL_MAX_SAMPLES_EXT 0x8D57 -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif -#endif /* GL_EXT_framebuffer_multisample */ - -#ifndef GL_EXT_framebuffer_multisample_blit_scaled -#define GL_EXT_framebuffer_multisample_blit_scaled 1 -#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA -#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB -#endif /* GL_EXT_framebuffer_multisample_blit_scaled */ - -#ifndef GL_EXT_framebuffer_object -#define GL_EXT_framebuffer_object 1 -#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 -#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 -#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 -#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF -#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 -#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 -#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 -#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 -#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 -#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 -#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 -#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 -#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 -#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 -#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA -#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB -#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC -#define GL_COLOR_ATTACHMENT13_EXT 0x8CED -#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE -#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 -#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 -#define GL_FRAMEBUFFER_EXT 0x8D40 -#define GL_RENDERBUFFER_EXT 0x8D41 -#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 -#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 -#define GL_STENCIL_INDEX1_EXT 0x8D46 -#define GL_STENCIL_INDEX4_EXT 0x8D47 -#define GL_STENCIL_INDEX8_EXT 0x8D48 -#define GL_STENCIL_INDEX16_EXT 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); -typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer); -GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers); -GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer); -GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer); -GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers); -GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers); -GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target); -GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target); -#endif -#endif /* GL_EXT_framebuffer_object */ - -#ifndef GL_EXT_framebuffer_sRGB -#define GL_EXT_framebuffer_sRGB 1 -#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 -#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA -#endif /* GL_EXT_framebuffer_sRGB */ - -#ifndef GL_EXT_geometry_shader4 -#define GL_EXT_geometry_shader4 1 -#define GL_GEOMETRY_SHADER_EXT 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA -#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB -#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD -#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE -#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 -#define GL_LINES_ADJACENCY_EXT 0x000A -#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B -#define GL_TRIANGLES_ADJACENCY_EXT 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 -#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); -#endif -#endif /* GL_EXT_geometry_shader4 */ - -#ifndef GL_EXT_gpu_program_parameters -#define GL_EXT_gpu_program_parameters 1 -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -#endif -#endif /* GL_EXT_gpu_program_parameters */ - -#ifndef GL_EXT_gpu_shader4 -#define GL_EXT_gpu_shader4 1 -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD -#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 -#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 -#define GL_SAMPLER_BUFFER_EXT 0x8DC2 -#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 -#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 -#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 -#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 -#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 -#define GL_INT_SAMPLER_1D_EXT 0x8DC9 -#define GL_INT_SAMPLER_2D_EXT 0x8DCA -#define GL_INT_SAMPLER_3D_EXT 0x8DCB -#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC -#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD -#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE -#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF -#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 -#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905 -typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); -GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name); -GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0); -GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value); -#endif -#endif /* GL_EXT_gpu_shader4 */ - -#ifndef GL_EXT_histogram -#define GL_EXT_histogram 1 -#define GL_HISTOGRAM_EXT 0x8024 -#define GL_PROXY_HISTOGRAM_EXT 0x8025 -#define GL_HISTOGRAM_WIDTH_EXT 0x8026 -#define GL_HISTOGRAM_FORMAT_EXT 0x8027 -#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C -#define GL_HISTOGRAM_SINK_EXT 0x802D -#define GL_MINMAX_EXT 0x802E -#define GL_MINMAX_FORMAT_EXT 0x802F -#define GL_MINMAX_SINK_EXT 0x8030 -#define GL_TABLE_TOO_LARGE_EXT 0x8031 -typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); -GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values); -GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glResetHistogramEXT (GLenum target); -GLAPI void APIENTRY glResetMinmaxEXT (GLenum target); -#endif -#endif /* GL_EXT_histogram */ - -#ifndef GL_EXT_index_array_formats -#define GL_EXT_index_array_formats 1 -#define GL_IUI_V2F_EXT 0x81AD -#define GL_IUI_V3F_EXT 0x81AE -#define GL_IUI_N3F_V2F_EXT 0x81AF -#define GL_IUI_N3F_V3F_EXT 0x81B0 -#define GL_T2F_IUI_V2F_EXT 0x81B1 -#define GL_T2F_IUI_V3F_EXT 0x81B2 -#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 -#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 -#endif /* GL_EXT_index_array_formats */ - -#ifndef GL_EXT_index_func -#define GL_EXT_index_func 1 -#define GL_INDEX_TEST_EXT 0x81B5 -#define GL_INDEX_TEST_FUNC_EXT 0x81B6 -#define GL_INDEX_TEST_REF_EXT 0x81B7 -typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref); -#endif -#endif /* GL_EXT_index_func */ - -#ifndef GL_EXT_index_material -#define GL_EXT_index_material 1 -#define GL_INDEX_MATERIAL_EXT 0x81B8 -#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 -#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA -typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode); -#endif -#endif /* GL_EXT_index_material */ - -#ifndef GL_EXT_index_texture -#define GL_EXT_index_texture 1 -#endif /* GL_EXT_index_texture */ - -#ifndef GL_EXT_light_texture -#define GL_EXT_light_texture 1 -#define GL_FRAGMENT_MATERIAL_EXT 0x8349 -#define GL_FRAGMENT_NORMAL_EXT 0x834A -#define GL_FRAGMENT_COLOR_EXT 0x834C -#define GL_ATTENUATION_EXT 0x834D -#define GL_SHADOW_ATTENUATION_EXT 0x834E -#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F -#define GL_TEXTURE_LIGHT_EXT 0x8350 -#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 -#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 -typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glApplyTextureEXT (GLenum mode); -GLAPI void APIENTRY glTextureLightEXT (GLenum pname); -GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode); -#endif -#endif /* GL_EXT_light_texture */ - -#ifndef GL_EXT_misc_attribute -#define GL_EXT_misc_attribute 1 -#endif /* GL_EXT_misc_attribute */ - -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); -#endif -#endif /* GL_EXT_multi_draw_arrays */ - -#ifndef GL_EXT_multisample -#define GL_EXT_multisample 1 -#define GL_MULTISAMPLE_EXT 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F -#define GL_SAMPLE_MASK_EXT 0x80A0 -#define GL_1PASS_EXT 0x80A1 -#define GL_2PASS_0_EXT 0x80A2 -#define GL_2PASS_1_EXT 0x80A3 -#define GL_4PASS_0_EXT 0x80A4 -#define GL_4PASS_1_EXT 0x80A5 -#define GL_4PASS_2_EXT 0x80A6 -#define GL_4PASS_3_EXT 0x80A7 -#define GL_SAMPLE_BUFFERS_EXT 0x80A8 -#define GL_SAMPLES_EXT 0x80A9 -#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA -#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB -#define GL_SAMPLE_PATTERN_EXT 0x80AC -#define GL_MULTISAMPLE_BIT_EXT 0x20000000 -typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert); -GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern); -#endif -#endif /* GL_EXT_multisample */ - -#ifndef GL_EXT_packed_depth_stencil -#define GL_EXT_packed_depth_stencil 1 -#define GL_DEPTH_STENCIL_EXT 0x84F9 -#define GL_UNSIGNED_INT_24_8_EXT 0x84FA -#define GL_DEPTH24_STENCIL8_EXT 0x88F0 -#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 -#endif /* GL_EXT_packed_depth_stencil */ - -#ifndef GL_EXT_packed_float -#define GL_EXT_packed_float 1 -#define GL_R11F_G11F_B10F_EXT 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B -#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C -#endif /* GL_EXT_packed_float */ - -#ifndef GL_EXT_packed_pixels -#define GL_EXT_packed_pixels 1 -#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 -#endif /* GL_EXT_packed_pixels */ - -#ifndef GL_EXT_paletted_texture -#define GL_EXT_paletted_texture 1 -#define GL_COLOR_INDEX1_EXT 0x80E2 -#define GL_COLOR_INDEX2_EXT 0x80E3 -#define GL_COLOR_INDEX4_EXT 0x80E4 -#define GL_COLOR_INDEX8_EXT 0x80E5 -#define GL_COLOR_INDEX12_EXT 0x80E6 -#define GL_COLOR_INDEX16_EXT 0x80E7 -#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED -typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table); -GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, void *data); -GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -#endif -#endif /* GL_EXT_paletted_texture */ - -#ifndef GL_EXT_pixel_buffer_object -#define GL_EXT_pixel_buffer_object 1 -#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF -#endif /* GL_EXT_pixel_buffer_object */ - -#ifndef GL_EXT_pixel_transform -#define GL_EXT_pixel_transform 1 -#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 -#define GL_PIXEL_MAG_FILTER_EXT 0x8331 -#define GL_PIXEL_MIN_FILTER_EXT 0x8332 -#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 -#define GL_CUBIC_EXT 0x8334 -#define GL_AVERAGE_EXT 0x8335 -#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 -#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 -#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -#endif -#endif /* GL_EXT_pixel_transform */ - -#ifndef GL_EXT_pixel_transform_color_table -#define GL_EXT_pixel_transform_color_table 1 -#endif /* GL_EXT_pixel_transform_color_table */ - -#ifndef GL_EXT_point_parameters -#define GL_EXT_point_parameters 1 -#define GL_POINT_SIZE_MIN_EXT 0x8126 -#define GL_POINT_SIZE_MAX_EXT 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 -#define GL_DISTANCE_ATTENUATION_EXT 0x8129 -typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params); -#endif -#endif /* GL_EXT_point_parameters */ - -#ifndef GL_EXT_polygon_offset -#define GL_EXT_polygon_offset 1 -#define GL_POLYGON_OFFSET_EXT 0x8037 -#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 -#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 -typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias); -#endif -#endif /* GL_EXT_polygon_offset */ - -#ifndef GL_EXT_provoking_vertex -#define GL_EXT_provoking_vertex 1 -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C -#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D -#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E -#define GL_PROVOKING_VERTEX_EXT 0x8E4F -typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode); -#endif -#endif /* GL_EXT_provoking_vertex */ - -#ifndef GL_EXT_rescale_normal -#define GL_EXT_rescale_normal 1 -#define GL_RESCALE_NORMAL_EXT 0x803A -#endif /* GL_EXT_rescale_normal */ - -#ifndef GL_EXT_secondary_color -#define GL_EXT_secondary_color 1 -#define GL_COLOR_SUM_EXT 0x8458 -#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 -#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A -#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B -#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C -#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D -#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue); -GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue); -GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue); -GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue); -GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v); -GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue); -GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v); -GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue); -GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v); -GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue); -GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v); -GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue); -GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v); -GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer); -#endif -#endif /* GL_EXT_secondary_color */ - -#ifndef GL_EXT_separate_shader_objects -#define GL_EXT_separate_shader_objects 1 -#define GL_ACTIVE_PROGRAM_EXT 0x8B8D -typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); -typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program); -GLAPI void APIENTRY glActiveProgramEXT (GLuint program); -GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string); -#endif -#endif /* GL_EXT_separate_shader_objects */ - -#ifndef GL_EXT_separate_specular_color -#define GL_EXT_separate_specular_color 1 -#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 -#define GL_SINGLE_COLOR_EXT 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA -#endif /* GL_EXT_separate_specular_color */ - -#ifndef GL_EXT_shader_image_load_formatted -#define GL_EXT_shader_image_load_formatted 1 -#endif /* GL_EXT_shader_image_load_formatted */ - -#ifndef GL_EXT_shader_image_load_store -#define GL_EXT_shader_image_load_store 1 -#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 -#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A -#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B -#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C -#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D -#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E -#define GL_IMAGE_1D_EXT 0x904C -#define GL_IMAGE_2D_EXT 0x904D -#define GL_IMAGE_3D_EXT 0x904E -#define GL_IMAGE_2D_RECT_EXT 0x904F -#define GL_IMAGE_CUBE_EXT 0x9050 -#define GL_IMAGE_BUFFER_EXT 0x9051 -#define GL_IMAGE_1D_ARRAY_EXT 0x9052 -#define GL_IMAGE_2D_ARRAY_EXT 0x9053 -#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 -#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 -#define GL_INT_IMAGE_1D_EXT 0x9057 -#define GL_INT_IMAGE_2D_EXT 0x9058 -#define GL_INT_IMAGE_3D_EXT 0x9059 -#define GL_INT_IMAGE_2D_RECT_EXT 0x905A -#define GL_INT_IMAGE_CUBE_EXT 0x905B -#define GL_INT_IMAGE_BUFFER_EXT 0x905C -#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D -#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E -#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F -#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 -#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 -#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 -#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 -#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C -#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D -#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 -#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 -#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF -typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); -typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); -GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers); -#endif -#endif /* GL_EXT_shader_image_load_store */ - -#ifndef GL_EXT_shader_integer_mix -#define GL_EXT_shader_integer_mix 1 -#endif /* GL_EXT_shader_integer_mix */ - -#ifndef GL_EXT_shadow_funcs -#define GL_EXT_shadow_funcs 1 -#endif /* GL_EXT_shadow_funcs */ - -#ifndef GL_EXT_shared_texture_palette -#define GL_EXT_shared_texture_palette 1 -#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB -#endif /* GL_EXT_shared_texture_palette */ - -#ifndef GL_EXT_stencil_clear_tag -#define GL_EXT_stencil_clear_tag 1 -#define GL_STENCIL_TAG_BITS_EXT 0x88F2 -#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 -typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag); -#endif -#endif /* GL_EXT_stencil_clear_tag */ - -#ifndef GL_EXT_stencil_two_side -#define GL_EXT_stencil_two_side 1 -#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 -#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 -typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face); -#endif -#endif /* GL_EXT_stencil_two_side */ - -#ifndef GL_EXT_stencil_wrap -#define GL_EXT_stencil_wrap 1 -#define GL_INCR_WRAP_EXT 0x8507 -#define GL_DECR_WRAP_EXT 0x8508 -#endif /* GL_EXT_stencil_wrap */ - -#ifndef GL_EXT_subtexture -#define GL_EXT_subtexture 1 -typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -#endif -#endif /* GL_EXT_subtexture */ - -#ifndef GL_EXT_texture -#define GL_EXT_texture 1 -#define GL_ALPHA4_EXT 0x803B -#define GL_ALPHA8_EXT 0x803C -#define GL_ALPHA12_EXT 0x803D -#define GL_ALPHA16_EXT 0x803E -#define GL_LUMINANCE4_EXT 0x803F -#define GL_LUMINANCE8_EXT 0x8040 -#define GL_LUMINANCE12_EXT 0x8041 -#define GL_LUMINANCE16_EXT 0x8042 -#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 -#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 -#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 -#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 -#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 -#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 -#define GL_INTENSITY_EXT 0x8049 -#define GL_INTENSITY4_EXT 0x804A -#define GL_INTENSITY8_EXT 0x804B -#define GL_INTENSITY12_EXT 0x804C -#define GL_INTENSITY16_EXT 0x804D -#define GL_RGB2_EXT 0x804E -#define GL_RGB4_EXT 0x804F -#define GL_RGB5_EXT 0x8050 -#define GL_RGB8_EXT 0x8051 -#define GL_RGB10_EXT 0x8052 -#define GL_RGB12_EXT 0x8053 -#define GL_RGB16_EXT 0x8054 -#define GL_RGBA2_EXT 0x8055 -#define GL_RGBA4_EXT 0x8056 -#define GL_RGB5_A1_EXT 0x8057 -#define GL_RGBA8_EXT 0x8058 -#define GL_RGB10_A2_EXT 0x8059 -#define GL_RGBA12_EXT 0x805A -#define GL_RGBA16_EXT 0x805B -#define GL_TEXTURE_RED_SIZE_EXT 0x805C -#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D -#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E -#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F -#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 -#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 -#define GL_REPLACE_EXT 0x8062 -#define GL_PROXY_TEXTURE_1D_EXT 0x8063 -#define GL_PROXY_TEXTURE_2D_EXT 0x8064 -#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 -#endif /* GL_EXT_texture */ - -#ifndef GL_EXT_texture3D -#define GL_EXT_texture3D 1 -#define GL_PACK_SKIP_IMAGES_EXT 0x806B -#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C -#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D -#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E -#define GL_TEXTURE_3D_EXT 0x806F -#define GL_PROXY_TEXTURE_3D_EXT 0x8070 -#define GL_TEXTURE_DEPTH_EXT 0x8071 -#define GL_TEXTURE_WRAP_R_EXT 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 -typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -#endif -#endif /* GL_EXT_texture3D */ - -#ifndef GL_EXT_texture_array -#define GL_EXT_texture_array 1 -#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 -#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D -#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF -#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E -#endif /* GL_EXT_texture_array */ - -#ifndef GL_EXT_texture_buffer_object -#define GL_EXT_texture_buffer_object 1 -#define GL_TEXTURE_BUFFER_EXT 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D -#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E -typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); -#endif -#endif /* GL_EXT_texture_buffer_object */ - -#ifndef GL_EXT_texture_compression_latc -#define GL_EXT_texture_compression_latc 1 -#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 -#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 -#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 -#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 -#endif /* GL_EXT_texture_compression_latc */ - -#ifndef GL_EXT_texture_compression_rgtc -#define GL_EXT_texture_compression_rgtc 1 -#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB -#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC -#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD -#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE -#endif /* GL_EXT_texture_compression_rgtc */ - -#ifndef GL_EXT_texture_compression_s3tc -#define GL_EXT_texture_compression_s3tc 1 -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 -#endif /* GL_EXT_texture_compression_s3tc */ - -#ifndef GL_EXT_texture_cube_map -#define GL_EXT_texture_cube_map 1 -#define GL_NORMAL_MAP_EXT 0x8511 -#define GL_REFLECTION_MAP_EXT 0x8512 -#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C -#endif /* GL_EXT_texture_cube_map */ - -#ifndef GL_EXT_texture_env_add -#define GL_EXT_texture_env_add 1 -#endif /* GL_EXT_texture_env_add */ - -#ifndef GL_EXT_texture_env_combine -#define GL_EXT_texture_env_combine 1 -#define GL_COMBINE_EXT 0x8570 -#define GL_COMBINE_RGB_EXT 0x8571 -#define GL_COMBINE_ALPHA_EXT 0x8572 -#define GL_RGB_SCALE_EXT 0x8573 -#define GL_ADD_SIGNED_EXT 0x8574 -#define GL_INTERPOLATE_EXT 0x8575 -#define GL_CONSTANT_EXT 0x8576 -#define GL_PRIMARY_COLOR_EXT 0x8577 -#define GL_PREVIOUS_EXT 0x8578 -#define GL_SOURCE0_RGB_EXT 0x8580 -#define GL_SOURCE1_RGB_EXT 0x8581 -#define GL_SOURCE2_RGB_EXT 0x8582 -#define GL_SOURCE0_ALPHA_EXT 0x8588 -#define GL_SOURCE1_ALPHA_EXT 0x8589 -#define GL_SOURCE2_ALPHA_EXT 0x858A -#define GL_OPERAND0_RGB_EXT 0x8590 -#define GL_OPERAND1_RGB_EXT 0x8591 -#define GL_OPERAND2_RGB_EXT 0x8592 -#define GL_OPERAND0_ALPHA_EXT 0x8598 -#define GL_OPERAND1_ALPHA_EXT 0x8599 -#define GL_OPERAND2_ALPHA_EXT 0x859A -#endif /* GL_EXT_texture_env_combine */ - -#ifndef GL_EXT_texture_env_dot3 -#define GL_EXT_texture_env_dot3 1 -#define GL_DOT3_RGB_EXT 0x8740 -#define GL_DOT3_RGBA_EXT 0x8741 -#endif /* GL_EXT_texture_env_dot3 */ - -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif /* GL_EXT_texture_filter_anisotropic */ - -#ifndef GL_EXT_texture_integer -#define GL_EXT_texture_integer 1 -#define GL_RGBA32UI_EXT 0x8D70 -#define GL_RGB32UI_EXT 0x8D71 -#define GL_ALPHA32UI_EXT 0x8D72 -#define GL_INTENSITY32UI_EXT 0x8D73 -#define GL_LUMINANCE32UI_EXT 0x8D74 -#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 -#define GL_RGBA16UI_EXT 0x8D76 -#define GL_RGB16UI_EXT 0x8D77 -#define GL_ALPHA16UI_EXT 0x8D78 -#define GL_INTENSITY16UI_EXT 0x8D79 -#define GL_LUMINANCE16UI_EXT 0x8D7A -#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B -#define GL_RGBA8UI_EXT 0x8D7C -#define GL_RGB8UI_EXT 0x8D7D -#define GL_ALPHA8UI_EXT 0x8D7E -#define GL_INTENSITY8UI_EXT 0x8D7F -#define GL_LUMINANCE8UI_EXT 0x8D80 -#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 -#define GL_RGBA32I_EXT 0x8D82 -#define GL_RGB32I_EXT 0x8D83 -#define GL_ALPHA32I_EXT 0x8D84 -#define GL_INTENSITY32I_EXT 0x8D85 -#define GL_LUMINANCE32I_EXT 0x8D86 -#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 -#define GL_RGBA16I_EXT 0x8D88 -#define GL_RGB16I_EXT 0x8D89 -#define GL_ALPHA16I_EXT 0x8D8A -#define GL_INTENSITY16I_EXT 0x8D8B -#define GL_LUMINANCE16I_EXT 0x8D8C -#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D -#define GL_RGBA8I_EXT 0x8D8E -#define GL_RGB8I_EXT 0x8D8F -#define GL_ALPHA8I_EXT 0x8D90 -#define GL_INTENSITY8I_EXT 0x8D91 -#define GL_LUMINANCE8I_EXT 0x8D92 -#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 -#define GL_RED_INTEGER_EXT 0x8D94 -#define GL_GREEN_INTEGER_EXT 0x8D95 -#define GL_BLUE_INTEGER_EXT 0x8D96 -#define GL_ALPHA_INTEGER_EXT 0x8D97 -#define GL_RGB_INTEGER_EXT 0x8D98 -#define GL_RGBA_INTEGER_EXT 0x8D99 -#define GL_BGR_INTEGER_EXT 0x8D9A -#define GL_BGRA_INTEGER_EXT 0x8D9B -#define GL_LUMINANCE_INTEGER_EXT 0x8D9C -#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D -#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E -typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); -typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha); -GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha); -#endif -#endif /* GL_EXT_texture_integer */ - -#ifndef GL_EXT_texture_lod_bias -#define GL_EXT_texture_lod_bias 1 -#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD -#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 -#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 -#endif /* GL_EXT_texture_lod_bias */ - -#ifndef GL_EXT_texture_mirror_clamp -#define GL_EXT_texture_mirror_clamp 1 -#define GL_MIRROR_CLAMP_EXT 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 -#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 -#endif /* GL_EXT_texture_mirror_clamp */ - -#ifndef GL_EXT_texture_object -#define GL_EXT_texture_object 1 -#define GL_TEXTURE_PRIORITY_EXT 0x8066 -#define GL_TEXTURE_RESIDENT_EXT 0x8067 -#define GL_TEXTURE_1D_BINDING_EXT 0x8068 -#define GL_TEXTURE_2D_BINDING_EXT 0x8069 -#define GL_TEXTURE_3D_BINDING_EXT 0x806A -typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); -typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); -typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences); -GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture); -GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures); -GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures); -GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture); -GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities); -#endif -#endif /* GL_EXT_texture_object */ - -#ifndef GL_EXT_texture_perturb_normal -#define GL_EXT_texture_perturb_normal 1 -#define GL_PERTURB_EXT 0x85AE -#define GL_TEXTURE_NORMAL_EXT 0x85AF -typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureNormalEXT (GLenum mode); -#endif -#endif /* GL_EXT_texture_perturb_normal */ - -#ifndef GL_EXT_texture_sRGB -#define GL_EXT_texture_sRGB 1 -#define GL_SRGB_EXT 0x8C40 -#define GL_SRGB8_EXT 0x8C41 -#define GL_SRGB_ALPHA_EXT 0x8C42 -#define GL_SRGB8_ALPHA8_EXT 0x8C43 -#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 -#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 -#define GL_SLUMINANCE_EXT 0x8C46 -#define GL_SLUMINANCE8_EXT 0x8C47 -#define GL_COMPRESSED_SRGB_EXT 0x8C48 -#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 -#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A -#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B -#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F -#endif /* GL_EXT_texture_sRGB */ - -#ifndef GL_EXT_texture_sRGB_decode -#define GL_EXT_texture_sRGB_decode 1 -#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 -#define GL_DECODE_EXT 0x8A49 -#define GL_SKIP_DECODE_EXT 0x8A4A -#endif /* GL_EXT_texture_sRGB_decode */ - -#ifndef GL_EXT_texture_shared_exponent -#define GL_EXT_texture_shared_exponent 1 -#define GL_RGB9_E5_EXT 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E -#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F -#endif /* GL_EXT_texture_shared_exponent */ - -#ifndef GL_EXT_texture_snorm -#define GL_EXT_texture_snorm 1 -#define GL_ALPHA_SNORM 0x9010 -#define GL_LUMINANCE_SNORM 0x9011 -#define GL_LUMINANCE_ALPHA_SNORM 0x9012 -#define GL_INTENSITY_SNORM 0x9013 -#define GL_ALPHA8_SNORM 0x9014 -#define GL_LUMINANCE8_SNORM 0x9015 -#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 -#define GL_INTENSITY8_SNORM 0x9017 -#define GL_ALPHA16_SNORM 0x9018 -#define GL_LUMINANCE16_SNORM 0x9019 -#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A -#define GL_INTENSITY16_SNORM 0x901B -#define GL_RED_SNORM 0x8F90 -#define GL_RG_SNORM 0x8F91 -#define GL_RGB_SNORM 0x8F92 -#define GL_RGBA_SNORM 0x8F93 -#endif /* GL_EXT_texture_snorm */ - -#ifndef GL_EXT_texture_swizzle -#define GL_EXT_texture_swizzle 1 -#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 -#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 -#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 -#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 -#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 -#endif /* GL_EXT_texture_swizzle */ - -#ifndef GL_EXT_timer_query -#define GL_EXT_timer_query 1 -#define GL_TIME_ELAPSED_EXT 0x88BF -typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params); -#endif -#endif /* GL_EXT_timer_query */ - -#ifndef GL_EXT_transform_feedback -#define GL_EXT_transform_feedback 1 -#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F -#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C -#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D -#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 -#define GL_RASTERIZER_DISCARD_EXT 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedbackEXT (void); -GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -#endif -#endif /* GL_EXT_transform_feedback */ - -#ifndef GL_EXT_vertex_array -#define GL_EXT_vertex_array 1 -#define GL_VERTEX_ARRAY_EXT 0x8074 -#define GL_NORMAL_ARRAY_EXT 0x8075 -#define GL_COLOR_ARRAY_EXT 0x8076 -#define GL_INDEX_ARRAY_EXT 0x8077 -#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 -#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 -#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A -#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B -#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C -#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D -#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E -#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F -#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 -#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 -#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 -#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 -#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 -#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 -#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 -#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 -#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A -#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B -#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C -#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D -#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E -#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F -#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 -#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 -#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 -#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 -typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); -typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); -typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); -typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, void **params); -typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); -typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glArrayElementEXT (GLint i); -GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); -GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count); -GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer); -GLAPI void APIENTRY glGetPointervEXT (GLenum pname, void **params); -GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer); -GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer); -GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); -GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer); -#endif -#endif /* GL_EXT_vertex_array */ - -#ifndef GL_EXT_vertex_array_bgra -#define GL_EXT_vertex_array_bgra 1 -#endif /* GL_EXT_vertex_array_bgra */ - -#ifndef GL_EXT_vertex_attrib_64bit -#define GL_EXT_vertex_attrib_64bit 1 -#define GL_DOUBLE_VEC2_EXT 0x8FFC -#define GL_DOUBLE_VEC3_EXT 0x8FFD -#define GL_DOUBLE_VEC4_EXT 0x8FFE -#define GL_DOUBLE_MAT2_EXT 0x8F46 -#define GL_DOUBLE_MAT3_EXT 0x8F47 -#define GL_DOUBLE_MAT4_EXT 0x8F48 -#define GL_DOUBLE_MAT2x3_EXT 0x8F49 -#define GL_DOUBLE_MAT2x4_EXT 0x8F4A -#define GL_DOUBLE_MAT3x2_EXT 0x8F4B -#define GL_DOUBLE_MAT3x4_EXT 0x8F4C -#define GL_DOUBLE_MAT4x2_EXT 0x8F4D -#define GL_DOUBLE_MAT4x3_EXT 0x8F4E -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); -#endif -#endif /* GL_EXT_vertex_attrib_64bit */ - -#ifndef GL_EXT_vertex_shader -#define GL_EXT_vertex_shader 1 -#define GL_VERTEX_SHADER_EXT 0x8780 -#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 -#define GL_OP_INDEX_EXT 0x8782 -#define GL_OP_NEGATE_EXT 0x8783 -#define GL_OP_DOT3_EXT 0x8784 -#define GL_OP_DOT4_EXT 0x8785 -#define GL_OP_MUL_EXT 0x8786 -#define GL_OP_ADD_EXT 0x8787 -#define GL_OP_MADD_EXT 0x8788 -#define GL_OP_FRAC_EXT 0x8789 -#define GL_OP_MAX_EXT 0x878A -#define GL_OP_MIN_EXT 0x878B -#define GL_OP_SET_GE_EXT 0x878C -#define GL_OP_SET_LT_EXT 0x878D -#define GL_OP_CLAMP_EXT 0x878E -#define GL_OP_FLOOR_EXT 0x878F -#define GL_OP_ROUND_EXT 0x8790 -#define GL_OP_EXP_BASE_2_EXT 0x8791 -#define GL_OP_LOG_BASE_2_EXT 0x8792 -#define GL_OP_POWER_EXT 0x8793 -#define GL_OP_RECIP_EXT 0x8794 -#define GL_OP_RECIP_SQRT_EXT 0x8795 -#define GL_OP_SUB_EXT 0x8796 -#define GL_OP_CROSS_PRODUCT_EXT 0x8797 -#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 -#define GL_OP_MOV_EXT 0x8799 -#define GL_OUTPUT_VERTEX_EXT 0x879A -#define GL_OUTPUT_COLOR0_EXT 0x879B -#define GL_OUTPUT_COLOR1_EXT 0x879C -#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D -#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E -#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F -#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 -#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 -#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 -#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 -#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 -#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 -#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 -#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 -#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 -#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 -#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA -#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB -#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC -#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD -#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE -#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF -#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 -#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 -#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 -#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 -#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 -#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 -#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 -#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 -#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 -#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 -#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA -#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB -#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC -#define GL_OUTPUT_FOG_EXT 0x87BD -#define GL_SCALAR_EXT 0x87BE -#define GL_VECTOR_EXT 0x87BF -#define GL_MATRIX_EXT 0x87C0 -#define GL_VARIANT_EXT 0x87C1 -#define GL_INVARIANT_EXT 0x87C2 -#define GL_LOCAL_CONSTANT_EXT 0x87C3 -#define GL_LOCAL_EXT 0x87C4 -#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 -#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 -#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 -#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 -#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE -#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF -#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 -#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 -#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 -#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 -#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 -#define GL_X_EXT 0x87D5 -#define GL_Y_EXT 0x87D6 -#define GL_Z_EXT 0x87D7 -#define GL_W_EXT 0x87D8 -#define GL_NEGATIVE_X_EXT 0x87D9 -#define GL_NEGATIVE_Y_EXT 0x87DA -#define GL_NEGATIVE_Z_EXT 0x87DB -#define GL_NEGATIVE_W_EXT 0x87DC -#define GL_ZERO_EXT 0x87DD -#define GL_ONE_EXT 0x87DE -#define GL_NEGATIVE_ONE_EXT 0x87DF -#define GL_NORMALIZED_RANGE_EXT 0x87E0 -#define GL_FULL_RANGE_EXT 0x87E1 -#define GL_CURRENT_VERTEX_EXT 0x87E2 -#define GL_MVP_MATRIX_EXT 0x87E3 -#define GL_VARIANT_VALUE_EXT 0x87E4 -#define GL_VARIANT_DATATYPE_EXT 0x87E5 -#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 -#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 -#define GL_VARIANT_ARRAY_EXT 0x87E8 -#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 -#define GL_INVARIANT_VALUE_EXT 0x87EA -#define GL_INVARIANT_DATATYPE_EXT 0x87EB -#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC -#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED -typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); -typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); -typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); -typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); -typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); -typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr); -typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr); -typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); -typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); -typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); -typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); -typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); -typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); -typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); -typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); -typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr); -typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); -typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); -typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data); -typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginVertexShaderEXT (void); -GLAPI void APIENTRY glEndVertexShaderEXT (void); -GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id); -GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range); -GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id); -GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1); -GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2); -GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); -GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num); -GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num); -GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); -GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const void *addr); -GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const void *addr); -GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr); -GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr); -GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr); -GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr); -GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr); -GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr); -GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr); -GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr); -GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const void *addr); -GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id); -GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id); -GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value); -GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value); -GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value); -GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value); -GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value); -GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap); -GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, void **data); -GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -#endif -#endif /* GL_EXT_vertex_shader */ - -#ifndef GL_EXT_vertex_weighting -#define GL_EXT_vertex_weighting 1 -#define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3 -#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 -#define GL_MODELVIEW0_MATRIX_EXT 0x0BA6 -#define GL_MODELVIEW1_MATRIX_EXT 0x8506 -#define GL_VERTEX_WEIGHTING_EXT 0x8509 -#define GL_MODELVIEW0_EXT 0x1700 -#define GL_MODELVIEW1_EXT 0x850A -#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B -#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C -#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D -#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E -#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F -#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight); -GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight); -GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer); -#endif -#endif /* GL_EXT_vertex_weighting */ - -#ifndef GL_EXT_x11_sync_object -#define GL_EXT_x11_sync_object 1 -#define GL_SYNC_X11_FENCE_EXT 0x90E1 -typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); -#endif -#endif /* GL_EXT_x11_sync_object */ - -#ifndef GL_GREMEDY_frame_terminator -#define GL_GREMEDY_frame_terminator 1 -typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFrameTerminatorGREMEDY (void); -#endif -#endif /* GL_GREMEDY_frame_terminator */ - -#ifndef GL_GREMEDY_string_marker -#define GL_GREMEDY_string_marker 1 -typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const void *string); -#endif -#endif /* GL_GREMEDY_string_marker */ - -#ifndef GL_HP_convolution_border_modes -#define GL_HP_convolution_border_modes 1 -#define GL_IGNORE_BORDER_HP 0x8150 -#define GL_CONSTANT_BORDER_HP 0x8151 -#define GL_REPLICATE_BORDER_HP 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 -#endif /* GL_HP_convolution_border_modes */ - -#ifndef GL_HP_image_transform -#define GL_HP_image_transform 1 -#define GL_IMAGE_SCALE_X_HP 0x8155 -#define GL_IMAGE_SCALE_Y_HP 0x8156 -#define GL_IMAGE_TRANSLATE_X_HP 0x8157 -#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 -#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 -#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A -#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B -#define GL_IMAGE_MAG_FILTER_HP 0x815C -#define GL_IMAGE_MIN_FILTER_HP 0x815D -#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E -#define GL_CUBIC_HP 0x815F -#define GL_AVERAGE_HP 0x8160 -#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 -#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 -#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params); -#endif -#endif /* GL_HP_image_transform */ - -#ifndef GL_HP_occlusion_test -#define GL_HP_occlusion_test 1 -#define GL_OCCLUSION_TEST_HP 0x8165 -#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 -#endif /* GL_HP_occlusion_test */ - -#ifndef GL_HP_texture_lighting -#define GL_HP_texture_lighting 1 -#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 -#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 -#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 -#endif /* GL_HP_texture_lighting */ - -#ifndef GL_IBM_cull_vertex -#define GL_IBM_cull_vertex 1 -#define GL_CULL_VERTEX_IBM 103050 -#endif /* GL_IBM_cull_vertex */ - -#ifndef GL_IBM_multimode_draw_arrays -#define GL_IBM_multimode_draw_arrays 1 -typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride); -#endif -#endif /* GL_IBM_multimode_draw_arrays */ - -#ifndef GL_IBM_rasterpos_clip -#define GL_IBM_rasterpos_clip 1 -#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 -#endif /* GL_IBM_rasterpos_clip */ - -#ifndef GL_IBM_static_data -#define GL_IBM_static_data 1 -#define GL_ALL_STATIC_DATA_IBM 103060 -#define GL_STATIC_VERTEX_ARRAY_IBM 103061 -typedef void (APIENTRYP PFNGLFLUSHSTATICDATAIBMPROC) (GLenum target); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushStaticDataIBM (GLenum target); -#endif -#endif /* GL_IBM_static_data */ - -#ifndef GL_IBM_texture_mirrored_repeat -#define GL_IBM_texture_mirrored_repeat 1 -#define GL_MIRRORED_REPEAT_IBM 0x8370 -#endif /* GL_IBM_texture_mirrored_repeat */ - -#ifndef GL_IBM_vertex_array_lists -#define GL_IBM_vertex_array_lists 1 -#define GL_VERTEX_ARRAY_LIST_IBM 103070 -#define GL_NORMAL_ARRAY_LIST_IBM 103071 -#define GL_COLOR_ARRAY_LIST_IBM 103072 -#define GL_INDEX_ARRAY_LIST_IBM 103073 -#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 -#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 -#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 -#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 -#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 -#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 -#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 -#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 -#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 -#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 -#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 -#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 -typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); -GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); -GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean **pointer, GLint ptrstride); -GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride); -GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride); -GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride); -GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); -GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride); -#endif -#endif /* GL_IBM_vertex_array_lists */ - -#ifndef GL_INGR_blend_func_separate -#define GL_INGR_blend_func_separate 1 -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif -#endif /* GL_INGR_blend_func_separate */ - -#ifndef GL_INGR_color_clamp -#define GL_INGR_color_clamp 1 -#define GL_RED_MIN_CLAMP_INGR 0x8560 -#define GL_GREEN_MIN_CLAMP_INGR 0x8561 -#define GL_BLUE_MIN_CLAMP_INGR 0x8562 -#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 -#define GL_RED_MAX_CLAMP_INGR 0x8564 -#define GL_GREEN_MAX_CLAMP_INGR 0x8565 -#define GL_BLUE_MAX_CLAMP_INGR 0x8566 -#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 -#endif /* GL_INGR_color_clamp */ - -#ifndef GL_INGR_interlace_read -#define GL_INGR_interlace_read 1 -#define GL_INTERLACE_READ_INGR 0x8568 -#endif /* GL_INGR_interlace_read */ - -#ifndef GL_INTEL_fragment_shader_ordering -#define GL_INTEL_fragment_shader_ordering 1 -#endif /* GL_INTEL_fragment_shader_ordering */ - -#ifndef GL_INTEL_map_texture -#define GL_INTEL_map_texture 1 -#define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF -#define GL_LAYOUT_DEFAULT_INTEL 0 -#define GL_LAYOUT_LINEAR_INTEL 1 -#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2 -typedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture); -typedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level); -typedef void *(APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSyncTextureINTEL (GLuint texture); -GLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level); -GLAPI void *APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout); -#endif -#endif /* GL_INTEL_map_texture */ - -#ifndef GL_INTEL_parallel_arrays -#define GL_INTEL_parallel_arrays 1 -#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 -#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 -#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 -#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 -#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 -typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void **pointer); -typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const void **pointer); -GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const void **pointer); -GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const void **pointer); -GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void **pointer); -#endif -#endif /* GL_INTEL_parallel_arrays */ - -#ifndef GL_INTEL_performance_query -#define GL_INTEL_performance_query 1 -#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 -#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 -#define GL_PERFQUERY_WAIT_INTEL 0x83FB -#define GL_PERFQUERY_FLUSH_INTEL 0x83FA -#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 -#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 -#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 -#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 -#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 -#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 -#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 -#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 -#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 -#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA -#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB -#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC -#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD -#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE -#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF -#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 -typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle); -typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle); -typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle); -typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle); -typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId); -typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId); -typedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); -typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); -typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId); -typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle); -GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle); -GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle); -GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle); -GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId); -GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId); -GLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); -GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); -GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId); -GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); -#endif -#endif /* GL_INTEL_performance_query */ - -#ifndef GL_MESAX_texture_stack -#define GL_MESAX_texture_stack 1 -#define GL_TEXTURE_1D_STACK_MESAX 0x8759 -#define GL_TEXTURE_2D_STACK_MESAX 0x875A -#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B -#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C -#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D -#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E -#endif /* GL_MESAX_texture_stack */ - -#ifndef GL_MESA_pack_invert -#define GL_MESA_pack_invert 1 -#define GL_PACK_INVERT_MESA 0x8758 -#endif /* GL_MESA_pack_invert */ - -#ifndef GL_MESA_resize_buffers -#define GL_MESA_resize_buffers 1 -typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glResizeBuffersMESA (void); -#endif -#endif /* GL_MESA_resize_buffers */ - -#ifndef GL_MESA_window_pos -#define GL_MESA_window_pos 1 -typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v); -GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v); -GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v); -#endif -#endif /* GL_MESA_window_pos */ - -#ifndef GL_MESA_ycbcr_texture -#define GL_MESA_ycbcr_texture 1 -#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB -#define GL_YCBCR_MESA 0x8757 -#endif /* GL_MESA_ycbcr_texture */ - -#ifndef GL_NVX_conditional_render -#define GL_NVX_conditional_render 1 -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id); -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id); -GLAPI void APIENTRY glEndConditionalRenderNVX (void); -#endif -#endif /* GL_NVX_conditional_render */ - -#ifndef GL_NVX_gpu_memory_info -#define GL_NVX_gpu_memory_info 1 -#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047 -#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048 -#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049 -#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A -#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B -#endif /* GL_NVX_gpu_memory_info */ - -#ifndef GL_NV_bindless_multi_draw_indirect -#define GL_NV_bindless_multi_draw_indirect 1 -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); -GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); -#endif -#endif /* GL_NV_bindless_multi_draw_indirect */ - -#ifndef GL_NV_bindless_texture -#define GL_NV_bindless_texture 1 -typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture); -typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle); -typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); -typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture); -GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler); -GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle); -GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle); -GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access); -GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle); -GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value); -GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value); -GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle); -GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); -#endif -#endif /* GL_NV_bindless_texture */ - -#ifndef GL_NV_blend_equation_advanced -#define GL_NV_blend_equation_advanced 1 -#define GL_BLEND_OVERLAP_NV 0x9281 -#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 -#define GL_BLUE_NV 0x1905 -#define GL_COLORBURN_NV 0x929A -#define GL_COLORDODGE_NV 0x9299 -#define GL_CONJOINT_NV 0x9284 -#define GL_CONTRAST_NV 0x92A1 -#define GL_DARKEN_NV 0x9297 -#define GL_DIFFERENCE_NV 0x929E -#define GL_DISJOINT_NV 0x9283 -#define GL_DST_ATOP_NV 0x928F -#define GL_DST_IN_NV 0x928B -#define GL_DST_NV 0x9287 -#define GL_DST_OUT_NV 0x928D -#define GL_DST_OVER_NV 0x9289 -#define GL_EXCLUSION_NV 0x92A0 -#define GL_GREEN_NV 0x1904 -#define GL_HARDLIGHT_NV 0x929B -#define GL_HARDMIX_NV 0x92A9 -#define GL_HSL_COLOR_NV 0x92AF -#define GL_HSL_HUE_NV 0x92AD -#define GL_HSL_LUMINOSITY_NV 0x92B0 -#define GL_HSL_SATURATION_NV 0x92AE -#define GL_INVERT_OVG_NV 0x92B4 -#define GL_INVERT_RGB_NV 0x92A3 -#define GL_LIGHTEN_NV 0x9298 -#define GL_LINEARBURN_NV 0x92A5 -#define GL_LINEARDODGE_NV 0x92A4 -#define GL_LINEARLIGHT_NV 0x92A7 -#define GL_MINUS_CLAMPED_NV 0x92B3 -#define GL_MINUS_NV 0x929F -#define GL_MULTIPLY_NV 0x9294 -#define GL_OVERLAY_NV 0x9296 -#define GL_PINLIGHT_NV 0x92A8 -#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2 -#define GL_PLUS_CLAMPED_NV 0x92B1 -#define GL_PLUS_DARKER_NV 0x9292 -#define GL_PLUS_NV 0x9291 -#define GL_RED_NV 0x1903 -#define GL_SCREEN_NV 0x9295 -#define GL_SOFTLIGHT_NV 0x929C -#define GL_SRC_ATOP_NV 0x928E -#define GL_SRC_IN_NV 0x928A -#define GL_SRC_NV 0x9286 -#define GL_SRC_OUT_NV 0x928C -#define GL_SRC_OVER_NV 0x9288 -#define GL_UNCORRELATED_NV 0x9282 -#define GL_VIVIDLIGHT_NV 0x92A6 -#define GL_XOR_NV 0x1506 -typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value); -GLAPI void APIENTRY glBlendBarrierNV (void); -#endif -#endif /* GL_NV_blend_equation_advanced */ - -#ifndef GL_NV_blend_equation_advanced_coherent -#define GL_NV_blend_equation_advanced_coherent 1 -#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 -#endif /* GL_NV_blend_equation_advanced_coherent */ - -#ifndef GL_NV_blend_square -#define GL_NV_blend_square 1 -#endif /* GL_NV_blend_square */ - -#ifndef GL_NV_compute_program5 -#define GL_NV_compute_program5 1 -#define GL_COMPUTE_PROGRAM_NV 0x90FB -#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC -#endif /* GL_NV_compute_program5 */ - -#ifndef GL_NV_conditional_render -#define GL_NV_conditional_render 1 -#define GL_QUERY_WAIT_NV 0x8E13 -#define GL_QUERY_NO_WAIT_NV 0x8E14 -#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); -GLAPI void APIENTRY glEndConditionalRenderNV (void); -#endif -#endif /* GL_NV_conditional_render */ - -#ifndef GL_NV_copy_depth_to_color -#define GL_NV_copy_depth_to_color 1 -#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E -#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F -#endif /* GL_NV_copy_depth_to_color */ - -#ifndef GL_NV_copy_image -#define GL_NV_copy_image 1 -typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -#endif -#endif /* GL_NV_copy_image */ - -#ifndef GL_NV_deep_texture3D -#define GL_NV_deep_texture3D 1 -#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0 -#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1 -#endif /* GL_NV_deep_texture3D */ - -#ifndef GL_NV_depth_buffer_float -#define GL_NV_depth_buffer_float 1 -#define GL_DEPTH_COMPONENT32F_NV 0x8DAB -#define GL_DEPTH32F_STENCIL8_NV 0x8DAC -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD -#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF -typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); -typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glClearDepthdNV (GLdouble depth); -GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); -#endif -#endif /* GL_NV_depth_buffer_float */ - -#ifndef GL_NV_depth_clamp -#define GL_NV_depth_clamp 1 -#define GL_DEPTH_CLAMP_NV 0x864F -#endif /* GL_NV_depth_clamp */ - -#ifndef GL_NV_draw_texture -#define GL_NV_draw_texture 1 -typedef void (APIENTRYP PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); -#endif -#endif /* GL_NV_draw_texture */ - -#ifndef GL_NV_evaluators -#define GL_NV_evaluators 1 -#define GL_EVAL_2D_NV 0x86C0 -#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 -#define GL_MAP_TESSELLATION_NV 0x86C2 -#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 -#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 -#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 -#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 -#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 -#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 -#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 -#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA -#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB -#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC -#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD -#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE -#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF -#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 -#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 -#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 -#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 -#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 -#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 -#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 -#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 -typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points); -typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points); -GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points); -GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode); -#endif -#endif /* GL_NV_evaluators */ - -#ifndef GL_NV_explicit_multisample -#define GL_NV_explicit_multisample 1 -#define GL_SAMPLE_POSITION_NV 0x8E50 -#define GL_SAMPLE_MASK_NV 0x8E51 -#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 -#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 -#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 -#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 -#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 -#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 -#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 -#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 -typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); -typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val); -GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask); -GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer); -#endif -#endif /* GL_NV_explicit_multisample */ - -#ifndef GL_NV_fence -#define GL_NV_fence 1 -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); -GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); -GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence); -GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence); -GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); -GLAPI void APIENTRY glFinishFenceNV (GLuint fence); -GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition); -#endif -#endif /* GL_NV_fence */ - -#ifndef GL_NV_float_buffer -#define GL_NV_float_buffer 1 -#define GL_FLOAT_R_NV 0x8880 -#define GL_FLOAT_RG_NV 0x8881 -#define GL_FLOAT_RGB_NV 0x8882 -#define GL_FLOAT_RGBA_NV 0x8883 -#define GL_FLOAT_R16_NV 0x8884 -#define GL_FLOAT_R32_NV 0x8885 -#define GL_FLOAT_RG16_NV 0x8886 -#define GL_FLOAT_RG32_NV 0x8887 -#define GL_FLOAT_RGB16_NV 0x8888 -#define GL_FLOAT_RGB32_NV 0x8889 -#define GL_FLOAT_RGBA16_NV 0x888A -#define GL_FLOAT_RGBA32_NV 0x888B -#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C -#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D -#define GL_FLOAT_RGBA_MODE_NV 0x888E -#endif /* GL_NV_float_buffer */ - -#ifndef GL_NV_fog_distance -#define GL_NV_fog_distance 1 -#define GL_FOG_DISTANCE_MODE_NV 0x855A -#define GL_EYE_RADIAL_NV 0x855B -#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C -#endif /* GL_NV_fog_distance */ - -#ifndef GL_NV_fragment_program -#define GL_NV_fragment_program 1 -#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 -#define GL_FRAGMENT_PROGRAM_NV 0x8870 -#define GL_MAX_TEXTURE_COORDS_NV 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 -#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 -#define GL_PROGRAM_ERROR_STRING_NV 0x8874 -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); -GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); -GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); -#endif -#endif /* GL_NV_fragment_program */ - -#ifndef GL_NV_fragment_program2 -#define GL_NV_fragment_program2 1 -#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 -#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 -#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 -#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 -#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 -#endif /* GL_NV_fragment_program2 */ - -#ifndef GL_NV_fragment_program4 -#define GL_NV_fragment_program4 1 -#endif /* GL_NV_fragment_program4 */ - -#ifndef GL_NV_fragment_program_option -#define GL_NV_fragment_program_option 1 -#endif /* GL_NV_fragment_program_option */ - -#ifndef GL_NV_framebuffer_multisample_coverage -#define GL_NV_framebuffer_multisample_coverage 1 -#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB -#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 -#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 -#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -#endif -#endif /* GL_NV_framebuffer_multisample_coverage */ - -#ifndef GL_NV_geometry_program4 -#define GL_NV_geometry_program4 1 -#define GL_GEOMETRY_PROGRAM_NV 0x8C26 -#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 -#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 -typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit); -GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif -#endif /* GL_NV_geometry_program4 */ - -#ifndef GL_NV_geometry_shader4 -#define GL_NV_geometry_shader4 1 -#endif /* GL_NV_geometry_shader4 */ - -#ifndef GL_NV_gpu_program4 -#define GL_NV_gpu_program4 1 -#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 -#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 -#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 -#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 -#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 -#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 -#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params); -GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params); -#endif -#endif /* GL_NV_gpu_program4 */ - -#ifndef GL_NV_gpu_program5 -#define GL_NV_gpu_program5 1 -#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C -#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F -#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 -#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 -typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); -#endif -#endif /* GL_NV_gpu_program5 */ - -#ifndef GL_NV_gpu_program5_mem_extended -#define GL_NV_gpu_program5_mem_extended 1 -#endif /* GL_NV_gpu_program5_mem_extended */ - -#ifndef GL_NV_gpu_shader5 -#define GL_NV_gpu_shader5 1 -#endif /* GL_NV_gpu_shader5 */ - -#ifndef GL_NV_half_float -#define GL_NV_half_float 1 -typedef unsigned short GLhalfNV; -#define GL_HALF_FLOAT_NV 0x140B -typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); -typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); -typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); -typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); -typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y); -GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z); -GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); -GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); -GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s); -GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t); -GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r); -GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s); -GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t); -GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); -GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog); -GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog); -GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight); -GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight); -GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x); -GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y); -GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); -GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -#endif -#endif /* GL_NV_half_float */ - -#ifndef GL_NV_light_max_exponent -#define GL_NV_light_max_exponent 1 -#define GL_MAX_SHININESS_NV 0x8504 -#define GL_MAX_SPOT_EXPONENT_NV 0x8505 -#endif /* GL_NV_light_max_exponent */ - -#ifndef GL_NV_multisample_coverage -#define GL_NV_multisample_coverage 1 -#define GL_COLOR_SAMPLES_NV 0x8E20 -#endif /* GL_NV_multisample_coverage */ - -#ifndef GL_NV_multisample_filter_hint -#define GL_NV_multisample_filter_hint 1 -#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 -#endif /* GL_NV_multisample_filter_hint */ - -#ifndef GL_NV_occlusion_query -#define GL_NV_occlusion_query 1 -#define GL_PIXEL_COUNTER_BITS_NV 0x8864 -#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 -#define GL_PIXEL_COUNT_NV 0x8866 -#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 -typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id); -GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id); -GLAPI void APIENTRY glEndOcclusionQueryNV (void); -GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params); -#endif -#endif /* GL_NV_occlusion_query */ - -#ifndef GL_NV_packed_depth_stencil -#define GL_NV_packed_depth_stencil 1 -#define GL_DEPTH_STENCIL_NV 0x84F9 -#define GL_UNSIGNED_INT_24_8_NV 0x84FA -#endif /* GL_NV_packed_depth_stencil */ - -#ifndef GL_NV_parameter_buffer_object -#define GL_NV_parameter_buffer_object 1 -#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 -#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 -#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 -#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 -#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params); -#endif -#endif /* GL_NV_parameter_buffer_object */ - -#ifndef GL_NV_parameter_buffer_object2 -#define GL_NV_parameter_buffer_object2 1 -#endif /* GL_NV_parameter_buffer_object2 */ - -#ifndef GL_NV_path_rendering -#define GL_NV_path_rendering 1 -#define GL_PATH_FORMAT_SVG_NV 0x9070 -#define GL_PATH_FORMAT_PS_NV 0x9071 -#define GL_STANDARD_FONT_NAME_NV 0x9072 -#define GL_SYSTEM_FONT_NAME_NV 0x9073 -#define GL_FILE_NAME_NV 0x9074 -#define GL_PATH_STROKE_WIDTH_NV 0x9075 -#define GL_PATH_END_CAPS_NV 0x9076 -#define GL_PATH_INITIAL_END_CAP_NV 0x9077 -#define GL_PATH_TERMINAL_END_CAP_NV 0x9078 -#define GL_PATH_JOIN_STYLE_NV 0x9079 -#define GL_PATH_MITER_LIMIT_NV 0x907A -#define GL_PATH_DASH_CAPS_NV 0x907B -#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C -#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D -#define GL_PATH_DASH_OFFSET_NV 0x907E -#define GL_PATH_CLIENT_LENGTH_NV 0x907F -#define GL_PATH_FILL_MODE_NV 0x9080 -#define GL_PATH_FILL_MASK_NV 0x9081 -#define GL_PATH_FILL_COVER_MODE_NV 0x9082 -#define GL_PATH_STROKE_COVER_MODE_NV 0x9083 -#define GL_PATH_STROKE_MASK_NV 0x9084 -#define GL_COUNT_UP_NV 0x9088 -#define GL_COUNT_DOWN_NV 0x9089 -#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A -#define GL_CONVEX_HULL_NV 0x908B -#define GL_BOUNDING_BOX_NV 0x908D -#define GL_TRANSLATE_X_NV 0x908E -#define GL_TRANSLATE_Y_NV 0x908F -#define GL_TRANSLATE_2D_NV 0x9090 -#define GL_TRANSLATE_3D_NV 0x9091 -#define GL_AFFINE_2D_NV 0x9092 -#define GL_AFFINE_3D_NV 0x9094 -#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 -#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 -#define GL_UTF8_NV 0x909A -#define GL_UTF16_NV 0x909B -#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C -#define GL_PATH_COMMAND_COUNT_NV 0x909D -#define GL_PATH_COORD_COUNT_NV 0x909E -#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F -#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 -#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 -#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 -#define GL_SQUARE_NV 0x90A3 -#define GL_ROUND_NV 0x90A4 -#define GL_TRIANGULAR_NV 0x90A5 -#define GL_BEVEL_NV 0x90A6 -#define GL_MITER_REVERT_NV 0x90A7 -#define GL_MITER_TRUNCATE_NV 0x90A8 -#define GL_SKIP_MISSING_GLYPH_NV 0x90A9 -#define GL_USE_MISSING_GLYPH_NV 0x90AA -#define GL_PATH_ERROR_POSITION_NV 0x90AB -#define GL_PATH_FOG_GEN_MODE_NV 0x90AC -#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD -#define GL_ADJACENT_PAIRS_NV 0x90AE -#define GL_FIRST_TO_REST_NV 0x90AF -#define GL_PATH_GEN_MODE_NV 0x90B0 -#define GL_PATH_GEN_COEFF_NV 0x90B1 -#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2 -#define GL_PATH_GEN_COMPONENTS_NV 0x90B3 -#define GL_PATH_STENCIL_FUNC_NV 0x90B7 -#define GL_PATH_STENCIL_REF_NV 0x90B8 -#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 -#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD -#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE -#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF -#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 -#define GL_MOVE_TO_RESETS_NV 0x90B5 -#define GL_MOVE_TO_CONTINUES_NV 0x90B6 -#define GL_CLOSE_PATH_NV 0x00 -#define GL_MOVE_TO_NV 0x02 -#define GL_RELATIVE_MOVE_TO_NV 0x03 -#define GL_LINE_TO_NV 0x04 -#define GL_RELATIVE_LINE_TO_NV 0x05 -#define GL_HORIZONTAL_LINE_TO_NV 0x06 -#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 -#define GL_VERTICAL_LINE_TO_NV 0x08 -#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 -#define GL_QUADRATIC_CURVE_TO_NV 0x0A -#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B -#define GL_CUBIC_CURVE_TO_NV 0x0C -#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D -#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E -#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F -#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 -#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 -#define GL_SMALL_CCW_ARC_TO_NV 0x12 -#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 -#define GL_SMALL_CW_ARC_TO_NV 0x14 -#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 -#define GL_LARGE_CCW_ARC_TO_NV 0x16 -#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 -#define GL_LARGE_CW_ARC_TO_NV 0x18 -#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 -#define GL_RESTART_PATH_NV 0xF0 -#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 -#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 -#define GL_RECT_NV 0xF6 -#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 -#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA -#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC -#define GL_ARC_TO_NV 0xFE -#define GL_RELATIVE_ARC_TO_NV 0xFF -#define GL_BOLD_BIT_NV 0x01 -#define GL_ITALIC_BIT_NV 0x02 -#define GL_GLYPH_WIDTH_BIT_NV 0x01 -#define GL_GLYPH_HEIGHT_BIT_NV 0x02 -#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 -#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 -#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 -#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 -#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 -#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 -#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 -#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 -#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 -#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 -#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 -#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 -#define GL_FONT_ASCENDER_BIT_NV 0x00200000 -#define GL_FONT_DESCENDER_BIT_NV 0x00400000 -#define GL_FONT_HEIGHT_BIT_NV 0x00800000 -#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 -#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 -#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 -#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 -#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 -#define GL_PRIMARY_COLOR_NV 0x852C -#define GL_SECONDARY_COLOR_NV 0x852D -typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range); -typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range); -typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path); -typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString); -typedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); -typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath); -typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); -typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value); -typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value); -typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value); -typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray); -typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units); -typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); -typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); -typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); -typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode); -typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); -typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); -typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value); -typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands); -typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords); -typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray); -typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); -typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); -typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value); -typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value); -typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); -typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); -typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); -typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range); -GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range); -GLAPI GLboolean APIENTRY glIsPathNV (GLuint path); -GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); -GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); -GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString); -GLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); -GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath); -GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); -GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value); -GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value); -GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value); -GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value); -GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray); -GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units); -GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask); -GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask); -GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func); -GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); -GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); -GLAPI void APIENTRY glPathFogGenNV (GLenum genMode); -GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); -GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); -GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value); -GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands); -GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords); -GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); -GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); -GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); -GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value); -GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value); -GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); -GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); -GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); -GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); -#endif -#endif /* GL_NV_path_rendering */ - -#ifndef GL_NV_pixel_data_range -#define GL_NV_pixel_data_range 1 -#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 -#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 -#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A -#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B -#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C -#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D -typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const void *pointer); -typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const void *pointer); -GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target); -#endif -#endif /* GL_NV_pixel_data_range */ - -#ifndef GL_NV_point_sprite -#define GL_NV_point_sprite 1 -#define GL_POINT_SPRITE_NV 0x8861 -#define GL_COORD_REPLACE_NV 0x8862 -#define GL_POINT_SPRITE_R_MODE_NV 0x8863 -typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param); -GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params); -#endif -#endif /* GL_NV_point_sprite */ - -#ifndef GL_NV_present_video -#define GL_NV_present_video 1 -#define GL_FRAME_NV 0x8E26 -#define GL_FIELDS_NV 0x8E27 -#define GL_CURRENT_TIME_NV 0x8E28 -#define GL_NUM_FILL_STREAMS_NV 0x8E29 -#define GL_PRESENT_TIME_NV 0x8E2A -#define GL_PRESENT_DURATION_NV 0x8E2B -typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); -typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); -typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); -GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); -GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params); -GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params); -#endif -#endif /* GL_NV_present_video */ - -#ifndef GL_NV_primitive_restart -#define GL_NV_primitive_restart 1 -#define GL_PRIMITIVE_RESTART_NV 0x8558 -#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPrimitiveRestartNV (void); -GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index); -#endif -#endif /* GL_NV_primitive_restart */ - -#ifndef GL_NV_register_combiners -#define GL_NV_register_combiners 1 -#define GL_REGISTER_COMBINERS_NV 0x8522 -#define GL_VARIABLE_A_NV 0x8523 -#define GL_VARIABLE_B_NV 0x8524 -#define GL_VARIABLE_C_NV 0x8525 -#define GL_VARIABLE_D_NV 0x8526 -#define GL_VARIABLE_E_NV 0x8527 -#define GL_VARIABLE_F_NV 0x8528 -#define GL_VARIABLE_G_NV 0x8529 -#define GL_CONSTANT_COLOR0_NV 0x852A -#define GL_CONSTANT_COLOR1_NV 0x852B -#define GL_SPARE0_NV 0x852E -#define GL_SPARE1_NV 0x852F -#define GL_DISCARD_NV 0x8530 -#define GL_E_TIMES_F_NV 0x8531 -#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 -#define GL_UNSIGNED_IDENTITY_NV 0x8536 -#define GL_UNSIGNED_INVERT_NV 0x8537 -#define GL_EXPAND_NORMAL_NV 0x8538 -#define GL_EXPAND_NEGATE_NV 0x8539 -#define GL_HALF_BIAS_NORMAL_NV 0x853A -#define GL_HALF_BIAS_NEGATE_NV 0x853B -#define GL_SIGNED_IDENTITY_NV 0x853C -#define GL_SIGNED_NEGATE_NV 0x853D -#define GL_SCALE_BY_TWO_NV 0x853E -#define GL_SCALE_BY_FOUR_NV 0x853F -#define GL_SCALE_BY_ONE_HALF_NV 0x8540 -#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 -#define GL_COMBINER_INPUT_NV 0x8542 -#define GL_COMBINER_MAPPING_NV 0x8543 -#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 -#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 -#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 -#define GL_COMBINER_MUX_SUM_NV 0x8547 -#define GL_COMBINER_SCALE_NV 0x8548 -#define GL_COMBINER_BIAS_NV 0x8549 -#define GL_COMBINER_AB_OUTPUT_NV 0x854A -#define GL_COMBINER_CD_OUTPUT_NV 0x854B -#define GL_COMBINER_SUM_OUTPUT_NV 0x854C -#define GL_MAX_GENERAL_COMBINERS_NV 0x854D -#define GL_NUM_GENERAL_COMBINERS_NV 0x854E -#define GL_COLOR_SUM_CLAMP_NV 0x854F -#define GL_COMBINER0_NV 0x8550 -#define GL_COMBINER1_NV 0x8551 -#define GL_COMBINER2_NV 0x8552 -#define GL_COMBINER3_NV 0x8553 -#define GL_COMBINER4_NV 0x8554 -#define GL_COMBINER5_NV 0x8555 -#define GL_COMBINER6_NV 0x8556 -#define GL_COMBINER7_NV 0x8557 -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param); -GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params); -GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param); -GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params); -#endif -#endif /* GL_NV_register_combiners */ - -#ifndef GL_NV_register_combiners2 -#define GL_NV_register_combiners2 1 -#define GL_PER_STAGE_CONSTANTS_NV 0x8535 -typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params); -#endif -#endif /* GL_NV_register_combiners2 */ - -#ifndef GL_NV_shader_atomic_counters -#define GL_NV_shader_atomic_counters 1 -#endif /* GL_NV_shader_atomic_counters */ - -#ifndef GL_NV_shader_atomic_float -#define GL_NV_shader_atomic_float 1 -#endif /* GL_NV_shader_atomic_float */ - -#ifndef GL_NV_shader_buffer_load -#define GL_NV_shader_buffer_load 1 -#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D -#define GL_GPU_ADDRESS_NV 0x8F34 -#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 -typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); -typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); -typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); -typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); -typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); -typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); -typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); -typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access); -GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target); -GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target); -GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); -GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer); -GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer); -GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); -GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); -GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); -GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif -#endif /* GL_NV_shader_buffer_load */ - -#ifndef GL_NV_shader_buffer_store -#define GL_NV_shader_buffer_store 1 -#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 -#endif /* GL_NV_shader_buffer_store */ - -#ifndef GL_NV_shader_storage_buffer_object -#define GL_NV_shader_storage_buffer_object 1 -#endif /* GL_NV_shader_storage_buffer_object */ - -#ifndef GL_NV_shader_thread_group -#define GL_NV_shader_thread_group 1 -#define GL_WARP_SIZE_NV 0x9339 -#define GL_WARPS_PER_SM_NV 0x933A -#define GL_SM_COUNT_NV 0x933B -#endif /* GL_NV_shader_thread_group */ - -#ifndef GL_NV_shader_thread_shuffle -#define GL_NV_shader_thread_shuffle 1 -#endif /* GL_NV_shader_thread_shuffle */ - -#ifndef GL_NV_tessellation_program5 -#define GL_NV_tessellation_program5 1 -#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 -#define GL_TESS_CONTROL_PROGRAM_NV 0x891E -#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F -#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 -#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 -#endif /* GL_NV_tessellation_program5 */ - -#ifndef GL_NV_texgen_emboss -#define GL_NV_texgen_emboss 1 -#define GL_EMBOSS_LIGHT_NV 0x855D -#define GL_EMBOSS_CONSTANT_NV 0x855E -#define GL_EMBOSS_MAP_NV 0x855F -#endif /* GL_NV_texgen_emboss */ - -#ifndef GL_NV_texgen_reflection -#define GL_NV_texgen_reflection 1 -#define GL_NORMAL_MAP_NV 0x8511 -#define GL_REFLECTION_MAP_NV 0x8512 -#endif /* GL_NV_texgen_reflection */ - -#ifndef GL_NV_texture_barrier -#define GL_NV_texture_barrier 1 -typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureBarrierNV (void); -#endif -#endif /* GL_NV_texture_barrier */ - -#ifndef GL_NV_texture_compression_vtc -#define GL_NV_texture_compression_vtc 1 -#endif /* GL_NV_texture_compression_vtc */ - -#ifndef GL_NV_texture_env_combine4 -#define GL_NV_texture_env_combine4 1 -#define GL_COMBINE4_NV 0x8503 -#define GL_SOURCE3_RGB_NV 0x8583 -#define GL_SOURCE3_ALPHA_NV 0x858B -#define GL_OPERAND3_RGB_NV 0x8593 -#define GL_OPERAND3_ALPHA_NV 0x859B -#endif /* GL_NV_texture_env_combine4 */ - -#ifndef GL_NV_texture_expand_normal -#define GL_NV_texture_expand_normal 1 -#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F -#endif /* GL_NV_texture_expand_normal */ - -#ifndef GL_NV_texture_multisample -#define GL_NV_texture_multisample 1 -#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 -#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 -typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -#endif -#endif /* GL_NV_texture_multisample */ - -#ifndef GL_NV_texture_rectangle -#define GL_NV_texture_rectangle 1 -#define GL_TEXTURE_RECTANGLE_NV 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 -#endif /* GL_NV_texture_rectangle */ - -#ifndef GL_NV_texture_shader -#define GL_NV_texture_shader 1 -#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C -#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D -#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E -#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 -#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA -#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB -#define GL_DSDT_MAG_INTENSITY_NV 0x86DC -#define GL_SHADER_CONSISTENT_NV 0x86DD -#define GL_TEXTURE_SHADER_NV 0x86DE -#define GL_SHADER_OPERATION_NV 0x86DF -#define GL_CULL_MODES_NV 0x86E0 -#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 -#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 -#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 -#define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1 -#define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2 -#define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3 -#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 -#define GL_CONST_EYE_NV 0x86E5 -#define GL_PASS_THROUGH_NV 0x86E6 -#define GL_CULL_FRAGMENT_NV 0x86E7 -#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 -#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 -#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA -#define GL_DOT_PRODUCT_NV 0x86EC -#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED -#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE -#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 -#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 -#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 -#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 -#define GL_HILO_NV 0x86F4 -#define GL_DSDT_NV 0x86F5 -#define GL_DSDT_MAG_NV 0x86F6 -#define GL_DSDT_MAG_VIB_NV 0x86F7 -#define GL_HILO16_NV 0x86F8 -#define GL_SIGNED_HILO_NV 0x86F9 -#define GL_SIGNED_HILO16_NV 0x86FA -#define GL_SIGNED_RGBA_NV 0x86FB -#define GL_SIGNED_RGBA8_NV 0x86FC -#define GL_SIGNED_RGB_NV 0x86FE -#define GL_SIGNED_RGB8_NV 0x86FF -#define GL_SIGNED_LUMINANCE_NV 0x8701 -#define GL_SIGNED_LUMINANCE8_NV 0x8702 -#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 -#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 -#define GL_SIGNED_ALPHA_NV 0x8705 -#define GL_SIGNED_ALPHA8_NV 0x8706 -#define GL_SIGNED_INTENSITY_NV 0x8707 -#define GL_SIGNED_INTENSITY8_NV 0x8708 -#define GL_DSDT8_NV 0x8709 -#define GL_DSDT8_MAG8_NV 0x870A -#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B -#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C -#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D -#define GL_HI_SCALE_NV 0x870E -#define GL_LO_SCALE_NV 0x870F -#define GL_DS_SCALE_NV 0x8710 -#define GL_DT_SCALE_NV 0x8711 -#define GL_MAGNITUDE_SCALE_NV 0x8712 -#define GL_VIBRANCE_SCALE_NV 0x8713 -#define GL_HI_BIAS_NV 0x8714 -#define GL_LO_BIAS_NV 0x8715 -#define GL_DS_BIAS_NV 0x8716 -#define GL_DT_BIAS_NV 0x8717 -#define GL_MAGNITUDE_BIAS_NV 0x8718 -#define GL_VIBRANCE_BIAS_NV 0x8719 -#define GL_TEXTURE_BORDER_VALUES_NV 0x871A -#define GL_TEXTURE_HI_SIZE_NV 0x871B -#define GL_TEXTURE_LO_SIZE_NV 0x871C -#define GL_TEXTURE_DS_SIZE_NV 0x871D -#define GL_TEXTURE_DT_SIZE_NV 0x871E -#define GL_TEXTURE_MAG_SIZE_NV 0x871F -#endif /* GL_NV_texture_shader */ - -#ifndef GL_NV_texture_shader2 -#define GL_NV_texture_shader2 1 -#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF -#endif /* GL_NV_texture_shader2 */ - -#ifndef GL_NV_texture_shader3 -#define GL_NV_texture_shader3 1 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 -#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 -#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 -#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 -#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 -#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A -#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B -#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C -#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D -#define GL_HILO8_NV 0x885E -#define GL_SIGNED_HILO8_NV 0x885F -#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 -#endif /* GL_NV_texture_shader3 */ - -#ifndef GL_NV_transform_feedback -#define GL_NV_transform_feedback 1 -#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 -#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 -#define GL_TEXTURE_COORD_NV 0x8C79 -#define GL_CLIP_DISTANCE_NV 0x8C7A -#define GL_VERTEX_ID_NV 0x8C7B -#define GL_PRIMITIVE_ID_NV 0x8C7C -#define GL_GENERIC_ATTRIB_NV 0x8C7D -#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 -#define GL_ACTIVE_VARYINGS_NV 0x8C81 -#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 -#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 -#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 -#define GL_PRIMITIVES_GENERATED_NV 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 -#define GL_RASTERIZER_DISCARD_NV 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B -#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C -#define GL_SEPARATE_ATTRIBS_NV 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F -#define GL_LAYER_NV 0x8DAA -#define GL_NEXT_BUFFER_NV -2 -#define GL_SKIP_COMPONENTS4_NV -3 -#define GL_SKIP_COMPONENTS3_NV -4 -#define GL_SKIP_COMPONENTS2_NV -5 -#define GL_SKIP_COMPONENTS1_NV -6 -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); -typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedbackNV (void); -GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode); -GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); -GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name); -GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); -GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); -#endif -#endif /* GL_NV_transform_feedback */ - -#ifndef GL_NV_transform_feedback2 -#define GL_NV_transform_feedback2 1 -#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 -typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); -typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids); -GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids); -GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id); -GLAPI void APIENTRY glPauseTransformFeedbackNV (void); -GLAPI void APIENTRY glResumeTransformFeedbackNV (void); -GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id); -#endif -#endif /* GL_NV_transform_feedback2 */ - -#ifndef GL_NV_vdpau_interop -#define GL_NV_vdpau_interop 1 -typedef GLintptr GLvdpauSurfaceNV; -#define GL_SURFACE_STATE_NV 0x86EB -#define GL_SURFACE_REGISTERED_NV 0x86FD -#define GL_SURFACE_MAPPED_NV 0x8700 -#define GL_WRITE_DISCARD_NV 0x88BE -typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void *getProcAddress); -typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void); -typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); -typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); -typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); -typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); -typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAddress); -GLAPI void APIENTRY glVDPAUFiniNV (void); -GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); -GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); -GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); -GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); -GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); -#endif -#endif /* GL_NV_vdpau_interop */ - -#ifndef GL_NV_vertex_array_range -#define GL_NV_vertex_array_range 1 -#define GL_VERTEX_ARRAY_RANGE_NV 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E -#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F -#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 -#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const void *pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); -GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const void *pointer); -#endif -#endif /* GL_NV_vertex_array_range */ - -#ifndef GL_NV_vertex_array_range2 -#define GL_NV_vertex_array_range2 1 -#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 -#endif /* GL_NV_vertex_array_range2 */ - -#ifndef GL_NV_vertex_attrib_integer_64bit -#define GL_NV_vertex_attrib_integer_64bit 1 -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x); -GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); -GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); -#endif -#endif /* GL_NV_vertex_attrib_integer_64bit */ - -#ifndef GL_NV_vertex_buffer_unified_memory -#define GL_NV_vertex_buffer_unified_memory 1 -#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E -#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F -#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 -#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 -#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 -#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 -#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 -#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 -#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 -#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 -#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 -#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 -#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A -#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B -#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C -#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D -#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E -#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F -#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 -#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 -#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 -#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 -#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 -#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 -#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 -typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); -typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); -typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); -GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride); -GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); -GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); -#endif -#endif /* GL_NV_vertex_buffer_unified_memory */ - -#ifndef GL_NV_vertex_program -#define GL_NV_vertex_program 1 -#define GL_VERTEX_PROGRAM_NV 0x8620 -#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 -#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 -#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 -#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 -#define GL_CURRENT_ATTRIB_NV 0x8626 -#define GL_PROGRAM_LENGTH_NV 0x8627 -#define GL_PROGRAM_STRING_NV 0x8628 -#define GL_MODELVIEW_PROJECTION_NV 0x8629 -#define GL_IDENTITY_NV 0x862A -#define GL_INVERSE_NV 0x862B -#define GL_TRANSPOSE_NV 0x862C -#define GL_INVERSE_TRANSPOSE_NV 0x862D -#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E -#define GL_MAX_TRACK_MATRICES_NV 0x862F -#define GL_MATRIX0_NV 0x8630 -#define GL_MATRIX1_NV 0x8631 -#define GL_MATRIX2_NV 0x8632 -#define GL_MATRIX3_NV 0x8633 -#define GL_MATRIX4_NV 0x8634 -#define GL_MATRIX5_NV 0x8635 -#define GL_MATRIX6_NV 0x8636 -#define GL_MATRIX7_NV 0x8637 -#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 -#define GL_CURRENT_MATRIX_NV 0x8641 -#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 -#define GL_PROGRAM_PARAMETER_NV 0x8644 -#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 -#define GL_PROGRAM_TARGET_NV 0x8646 -#define GL_PROGRAM_RESIDENT_NV 0x8647 -#define GL_TRACK_MATRIX_NV 0x8648 -#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 -#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A -#define GL_PROGRAM_ERROR_POSITION_NV 0x864B -#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 -#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 -#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 -#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 -#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 -#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 -#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 -#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 -#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 -#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 -#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A -#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B -#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C -#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D -#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E -#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F -#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 -#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 -#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 -#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 -#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 -#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 -#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 -#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 -#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 -#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 -#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A -#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B -#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C -#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D -#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E -#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F -#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 -#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 -#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 -#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 -#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 -#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 -#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 -#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 -#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 -#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 -#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A -#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B -#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C -#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D -#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E -#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F -typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); -typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); -typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void **pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences); -GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params); -GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs); -GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program); -GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, void **pointer); -GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id); -GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); -GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); -GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); -GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v); -#endif -#endif /* GL_NV_vertex_program */ - -#ifndef GL_NV_vertex_program1_1 -#define GL_NV_vertex_program1_1 1 -#endif /* GL_NV_vertex_program1_1 */ - -#ifndef GL_NV_vertex_program2 -#define GL_NV_vertex_program2 1 -#endif /* GL_NV_vertex_program2 */ - -#ifndef GL_NV_vertex_program2_option -#define GL_NV_vertex_program2_option 1 -#endif /* GL_NV_vertex_program2_option */ - -#ifndef GL_NV_vertex_program3 -#define GL_NV_vertex_program3 1 -#endif /* GL_NV_vertex_program3 */ - -#ifndef GL_NV_vertex_program4 -#define GL_NV_vertex_program4 1 -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x); -GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y); -GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x); -GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y); -GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params); -#endif -#endif /* GL_NV_vertex_program4 */ - -#ifndef GL_NV_video_capture -#define GL_NV_video_capture 1 -#define GL_VIDEO_BUFFER_NV 0x9020 -#define GL_VIDEO_BUFFER_BINDING_NV 0x9021 -#define GL_FIELD_UPPER_NV 0x9022 -#define GL_FIELD_LOWER_NV 0x9023 -#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 -#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 -#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 -#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 -#define GL_VIDEO_BUFFER_PITCH_NV 0x9028 -#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 -#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A -#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B -#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C -#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D -#define GL_PARTIAL_SUCCESS_NV 0x902E -#define GL_SUCCESS_NV 0x902F -#define GL_FAILURE_NV 0x9030 -#define GL_YCBYCR8_422_NV 0x9031 -#define GL_YCBAYCR8A_4224_NV 0x9032 -#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 -#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 -#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 -#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 -#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 -#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 -#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 -#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A -#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B -#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C -typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot); -typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); -typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); -typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot); -GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); -GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); -GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot); -GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); -GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); -GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); -GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); -#endif -#endif /* GL_NV_video_capture */ - -#ifndef GL_OML_interlace -#define GL_OML_interlace 1 -#define GL_INTERLACE_OML 0x8980 -#define GL_INTERLACE_READ_OML 0x8981 -#endif /* GL_OML_interlace */ - -#ifndef GL_OML_resample -#define GL_OML_resample 1 -#define GL_PACK_RESAMPLE_OML 0x8984 -#define GL_UNPACK_RESAMPLE_OML 0x8985 -#define GL_RESAMPLE_REPLICATE_OML 0x8986 -#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 -#define GL_RESAMPLE_AVERAGE_OML 0x8988 -#define GL_RESAMPLE_DECIMATE_OML 0x8989 -#endif /* GL_OML_resample */ - -#ifndef GL_OML_subsample -#define GL_OML_subsample 1 -#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 -#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 -#endif /* GL_OML_subsample */ - -#ifndef GL_PGI_misc_hints -#define GL_PGI_misc_hints 1 -#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 -#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD -#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE -#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 -#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 -#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 -#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C -#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D -#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E -#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F -#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 -#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 -#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 -#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 -#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 -#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 -#define GL_CLIP_NEAR_HINT_PGI 0x1A220 -#define GL_CLIP_FAR_HINT_PGI 0x1A221 -#define GL_WIDE_LINE_HINT_PGI 0x1A222 -#define GL_BACK_NORMALS_HINT_PGI 0x1A223 -typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode); -#endif -#endif /* GL_PGI_misc_hints */ - -#ifndef GL_PGI_vertex_hints -#define GL_PGI_vertex_hints 1 -#define GL_VERTEX_DATA_HINT_PGI 0x1A22A -#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B -#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C -#define GL_MAX_VERTEX_HINT_PGI 0x1A22D -#define GL_COLOR3_BIT_PGI 0x00010000 -#define GL_COLOR4_BIT_PGI 0x00020000 -#define GL_EDGEFLAG_BIT_PGI 0x00040000 -#define GL_INDEX_BIT_PGI 0x00080000 -#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 -#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 -#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 -#define GL_MAT_EMISSION_BIT_PGI 0x00800000 -#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 -#define GL_MAT_SHININESS_BIT_PGI 0x02000000 -#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 -#define GL_NORMAL_BIT_PGI 0x08000000 -#define GL_TEXCOORD1_BIT_PGI 0x10000000 -#define GL_TEXCOORD2_BIT_PGI 0x20000000 -#define GL_TEXCOORD3_BIT_PGI 0x40000000 -#define GL_TEXCOORD4_BIT_PGI 0x80000000 -#define GL_VERTEX23_BIT_PGI 0x00000004 -#define GL_VERTEX4_BIT_PGI 0x00000008 -#endif /* GL_PGI_vertex_hints */ - -#ifndef GL_REND_screen_coordinates -#define GL_REND_screen_coordinates 1 -#define GL_SCREEN_COORDINATES_REND 0x8490 -#define GL_INVERTED_SCREEN_W_REND 0x8491 -#endif /* GL_REND_screen_coordinates */ - -#ifndef GL_S3_s3tc -#define GL_S3_s3tc 1 -#define GL_RGB_S3TC 0x83A0 -#define GL_RGB4_S3TC 0x83A1 -#define GL_RGBA_S3TC 0x83A2 -#define GL_RGBA4_S3TC 0x83A3 -#define GL_RGBA_DXT5_S3TC 0x83A4 -#define GL_RGBA4_DXT5_S3TC 0x83A5 -#endif /* GL_S3_s3tc */ - -#ifndef GL_SGIS_detail_texture -#define GL_SGIS_detail_texture 1 -#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 -#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 -#define GL_LINEAR_DETAIL_SGIS 0x8097 -#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 -#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 -#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A -#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B -#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C -typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points); -#endif -#endif /* GL_SGIS_detail_texture */ - -#ifndef GL_SGIS_fog_function -#define GL_SGIS_fog_function 1 -#define GL_FOG_FUNC_SGIS 0x812A -#define GL_FOG_FUNC_POINTS_SGIS 0x812B -#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C -typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points); -#endif -#endif /* GL_SGIS_fog_function */ - -#ifndef GL_SGIS_generate_mipmap -#define GL_SGIS_generate_mipmap 1 -#define GL_GENERATE_MIPMAP_SGIS 0x8191 -#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 -#endif /* GL_SGIS_generate_mipmap */ - -#ifndef GL_SGIS_multisample -#define GL_SGIS_multisample 1 -#define GL_MULTISAMPLE_SGIS 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F -#define GL_SAMPLE_MASK_SGIS 0x80A0 -#define GL_1PASS_SGIS 0x80A1 -#define GL_2PASS_0_SGIS 0x80A2 -#define GL_2PASS_1_SGIS 0x80A3 -#define GL_4PASS_0_SGIS 0x80A4 -#define GL_4PASS_1_SGIS 0x80A5 -#define GL_4PASS_2_SGIS 0x80A6 -#define GL_4PASS_3_SGIS 0x80A7 -#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 -#define GL_SAMPLES_SGIS 0x80A9 -#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA -#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB -#define GL_SAMPLE_PATTERN_SGIS 0x80AC -typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert); -GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern); -#endif -#endif /* GL_SGIS_multisample */ - -#ifndef GL_SGIS_pixel_texture -#define GL_SGIS_pixel_texture 1 -#define GL_PIXEL_TEXTURE_SGIS 0x8353 -#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 -#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 -#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param); -GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params); -GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params); -GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params); -#endif -#endif /* GL_SGIS_pixel_texture */ - -#ifndef GL_SGIS_point_line_texgen -#define GL_SGIS_point_line_texgen 1 -#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 -#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 -#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 -#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 -#define GL_EYE_POINT_SGIS 0x81F4 -#define GL_OBJECT_POINT_SGIS 0x81F5 -#define GL_EYE_LINE_SGIS 0x81F6 -#define GL_OBJECT_LINE_SGIS 0x81F7 -#endif /* GL_SGIS_point_line_texgen */ - -#ifndef GL_SGIS_point_parameters -#define GL_SGIS_point_parameters 1 -#define GL_POINT_SIZE_MIN_SGIS 0x8126 -#define GL_POINT_SIZE_MAX_SGIS 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 -#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 -typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params); -#endif -#endif /* GL_SGIS_point_parameters */ - -#ifndef GL_SGIS_sharpen_texture -#define GL_SGIS_sharpen_texture 1 -#define GL_LINEAR_SHARPEN_SGIS 0x80AD -#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE -#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF -#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 -typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points); -#endif -#endif /* GL_SGIS_sharpen_texture */ - -#ifndef GL_SGIS_texture4D -#define GL_SGIS_texture4D 1 -#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 -#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 -#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 -#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 -#define GL_TEXTURE_4D_SGIS 0x8134 -#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 -#define GL_TEXTURE_4DSIZE_SGIS 0x8136 -#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 -#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 -#define GL_TEXTURE_4D_BINDING_SGIS 0x814F -typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels); -#endif -#endif /* GL_SGIS_texture4D */ - -#ifndef GL_SGIS_texture_border_clamp -#define GL_SGIS_texture_border_clamp 1 -#define GL_CLAMP_TO_BORDER_SGIS 0x812D -#endif /* GL_SGIS_texture_border_clamp */ - -#ifndef GL_SGIS_texture_color_mask -#define GL_SGIS_texture_color_mask 1 -#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF -typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -#endif -#endif /* GL_SGIS_texture_color_mask */ - -#ifndef GL_SGIS_texture_edge_clamp -#define GL_SGIS_texture_edge_clamp 1 -#define GL_CLAMP_TO_EDGE_SGIS 0x812F -#endif /* GL_SGIS_texture_edge_clamp */ - -#ifndef GL_SGIS_texture_filter4 -#define GL_SGIS_texture_filter4 1 -#define GL_FILTER4_SGIS 0x8146 -#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 -typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); -typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights); -GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); -#endif -#endif /* GL_SGIS_texture_filter4 */ - -#ifndef GL_SGIS_texture_lod -#define GL_SGIS_texture_lod 1 -#define GL_TEXTURE_MIN_LOD_SGIS 0x813A -#define GL_TEXTURE_MAX_LOD_SGIS 0x813B -#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C -#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D -#endif /* GL_SGIS_texture_lod */ - -#ifndef GL_SGIS_texture_select -#define GL_SGIS_texture_select 1 -#define GL_DUAL_ALPHA4_SGIS 0x8110 -#define GL_DUAL_ALPHA8_SGIS 0x8111 -#define GL_DUAL_ALPHA12_SGIS 0x8112 -#define GL_DUAL_ALPHA16_SGIS 0x8113 -#define GL_DUAL_LUMINANCE4_SGIS 0x8114 -#define GL_DUAL_LUMINANCE8_SGIS 0x8115 -#define GL_DUAL_LUMINANCE12_SGIS 0x8116 -#define GL_DUAL_LUMINANCE16_SGIS 0x8117 -#define GL_DUAL_INTENSITY4_SGIS 0x8118 -#define GL_DUAL_INTENSITY8_SGIS 0x8119 -#define GL_DUAL_INTENSITY12_SGIS 0x811A -#define GL_DUAL_INTENSITY16_SGIS 0x811B -#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C -#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D -#define GL_QUAD_ALPHA4_SGIS 0x811E -#define GL_QUAD_ALPHA8_SGIS 0x811F -#define GL_QUAD_LUMINANCE4_SGIS 0x8120 -#define GL_QUAD_LUMINANCE8_SGIS 0x8121 -#define GL_QUAD_INTENSITY4_SGIS 0x8122 -#define GL_QUAD_INTENSITY8_SGIS 0x8123 -#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 -#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 -#endif /* GL_SGIS_texture_select */ - -#ifndef GL_SGIX_async -#define GL_SGIX_async 1 -#define GL_ASYNC_MARKER_SGIX 0x8329 -typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); -typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); -typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); -typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); -typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); -typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker); -GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp); -GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp); -GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range); -GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range); -GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker); -#endif -#endif /* GL_SGIX_async */ - -#ifndef GL_SGIX_async_histogram -#define GL_SGIX_async_histogram 1 -#define GL_ASYNC_HISTOGRAM_SGIX 0x832C -#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D -#endif /* GL_SGIX_async_histogram */ - -#ifndef GL_SGIX_async_pixel -#define GL_SGIX_async_pixel 1 -#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C -#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D -#define GL_ASYNC_READ_PIXELS_SGIX 0x835E -#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F -#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 -#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 -#endif /* GL_SGIX_async_pixel */ - -#ifndef GL_SGIX_blend_alpha_minmax -#define GL_SGIX_blend_alpha_minmax 1 -#define GL_ALPHA_MIN_SGIX 0x8320 -#define GL_ALPHA_MAX_SGIX 0x8321 -#endif /* GL_SGIX_blend_alpha_minmax */ - -#ifndef GL_SGIX_calligraphic_fragment -#define GL_SGIX_calligraphic_fragment 1 -#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 -#endif /* GL_SGIX_calligraphic_fragment */ - -#ifndef GL_SGIX_clipmap -#define GL_SGIX_clipmap 1 -#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 -#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 -#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 -#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 -#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 -#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 -#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 -#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 -#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 -#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D -#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E -#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F -#endif /* GL_SGIX_clipmap */ - -#ifndef GL_SGIX_convolution_accuracy -#define GL_SGIX_convolution_accuracy 1 -#define GL_CONVOLUTION_HINT_SGIX 0x8316 -#endif /* GL_SGIX_convolution_accuracy */ - -#ifndef GL_SGIX_depth_pass_instrument -#define GL_SGIX_depth_pass_instrument 1 -#endif /* GL_SGIX_depth_pass_instrument */ - -#ifndef GL_SGIX_depth_texture -#define GL_SGIX_depth_texture 1 -#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 -#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 -#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 -#endif /* GL_SGIX_depth_texture */ - -#ifndef GL_SGIX_flush_raster -#define GL_SGIX_flush_raster 1 -typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushRasterSGIX (void); -#endif -#endif /* GL_SGIX_flush_raster */ - -#ifndef GL_SGIX_fog_offset -#define GL_SGIX_fog_offset 1 -#define GL_FOG_OFFSET_SGIX 0x8198 -#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 -#endif /* GL_SGIX_fog_offset */ - -#ifndef GL_SGIX_fragment_lighting -#define GL_SGIX_fragment_lighting 1 -#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 -#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 -#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 -#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 -#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 -#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 -#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 -#define GL_LIGHT_ENV_MODE_SGIX 0x8407 -#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 -#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 -#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A -#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B -#define GL_FRAGMENT_LIGHT0_SGIX 0x840C -#define GL_FRAGMENT_LIGHT1_SGIX 0x840D -#define GL_FRAGMENT_LIGHT2_SGIX 0x840E -#define GL_FRAGMENT_LIGHT3_SGIX 0x840F -#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 -#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 -#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 -#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 -typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode); -GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param); -GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param); -GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params); -GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param); -GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param); -GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params); -GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param); -GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param); -GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params); -GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params); -GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param); -#endif -#endif /* GL_SGIX_fragment_lighting */ - -#ifndef GL_SGIX_framezoom -#define GL_SGIX_framezoom 1 -#define GL_FRAMEZOOM_SGIX 0x818B -#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C -#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D -typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFrameZoomSGIX (GLint factor); -#endif -#endif /* GL_SGIX_framezoom */ - -#ifndef GL_SGIX_igloo_interface -#define GL_SGIX_igloo_interface 1 -typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const void *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const void *params); -#endif -#endif /* GL_SGIX_igloo_interface */ - -#ifndef GL_SGIX_instruments -#define GL_SGIX_instruments 1 -#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 -#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 -typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); -typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); -typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); -typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); -GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer); -GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p); -GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker); -GLAPI void APIENTRY glStartInstrumentsSGIX (void); -GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker); -#endif -#endif /* GL_SGIX_instruments */ - -#ifndef GL_SGIX_interlace -#define GL_SGIX_interlace 1 -#define GL_INTERLACE_SGIX 0x8094 -#endif /* GL_SGIX_interlace */ - -#ifndef GL_SGIX_ir_instrument1 -#define GL_SGIX_ir_instrument1 1 -#define GL_IR_INSTRUMENT1_SGIX 0x817F -#endif /* GL_SGIX_ir_instrument1 */ - -#ifndef GL_SGIX_list_priority -#define GL_SGIX_list_priority 1 -#define GL_LIST_PRIORITY_SGIX 0x8182 -typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params); -GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param); -GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param); -GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params); -#endif -#endif /* GL_SGIX_list_priority */ - -#ifndef GL_SGIX_pixel_texture -#define GL_SGIX_pixel_texture 1 -#define GL_PIXEL_TEX_GEN_SGIX 0x8139 -#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B -typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode); -#endif -#endif /* GL_SGIX_pixel_texture */ - -#ifndef GL_SGIX_pixel_tiles -#define GL_SGIX_pixel_tiles 1 -#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E -#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F -#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 -#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 -#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 -#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 -#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 -#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 -#endif /* GL_SGIX_pixel_tiles */ - -#ifndef GL_SGIX_polynomial_ffd -#define GL_SGIX_polynomial_ffd 1 -#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 -#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 -#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 -#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 -#define GL_DEFORMATIONS_MASK_SGIX 0x8196 -#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); -typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); -GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); -GLAPI void APIENTRY glDeformSGIX (GLbitfield mask); -GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask); -#endif -#endif /* GL_SGIX_polynomial_ffd */ - -#ifndef GL_SGIX_reference_plane -#define GL_SGIX_reference_plane 1 -#define GL_REFERENCE_PLANE_SGIX 0x817D -#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E -typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation); -#endif -#endif /* GL_SGIX_reference_plane */ - -#ifndef GL_SGIX_resample -#define GL_SGIX_resample 1 -#define GL_PACK_RESAMPLE_SGIX 0x842C -#define GL_UNPACK_RESAMPLE_SGIX 0x842D -#define GL_RESAMPLE_REPLICATE_SGIX 0x842E -#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F -#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 -#endif /* GL_SGIX_resample */ - -#ifndef GL_SGIX_scalebias_hint -#define GL_SGIX_scalebias_hint 1 -#define GL_SCALEBIAS_HINT_SGIX 0x8322 -#endif /* GL_SGIX_scalebias_hint */ - -#ifndef GL_SGIX_shadow -#define GL_SGIX_shadow 1 -#define GL_TEXTURE_COMPARE_SGIX 0x819A -#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B -#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C -#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D -#endif /* GL_SGIX_shadow */ - -#ifndef GL_SGIX_shadow_ambient -#define GL_SGIX_shadow_ambient 1 -#define GL_SHADOW_AMBIENT_SGIX 0x80BF -#endif /* GL_SGIX_shadow_ambient */ - -#ifndef GL_SGIX_sprite -#define GL_SGIX_sprite 1 -#define GL_SPRITE_SGIX 0x8148 -#define GL_SPRITE_MODE_SGIX 0x8149 -#define GL_SPRITE_AXIS_SGIX 0x814A -#define GL_SPRITE_TRANSLATION_SGIX 0x814B -#define GL_SPRITE_AXIAL_SGIX 0x814C -#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D -#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param); -GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param); -GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params); -#endif -#endif /* GL_SGIX_sprite */ - -#ifndef GL_SGIX_subsample -#define GL_SGIX_subsample 1 -#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 -#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 -#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 -#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 -#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 -#endif /* GL_SGIX_subsample */ - -#ifndef GL_SGIX_tag_sample_buffer -#define GL_SGIX_tag_sample_buffer 1 -typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTagSampleBufferSGIX (void); -#endif -#endif /* GL_SGIX_tag_sample_buffer */ - -#ifndef GL_SGIX_texture_add_env -#define GL_SGIX_texture_add_env 1 -#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE -#endif /* GL_SGIX_texture_add_env */ - -#ifndef GL_SGIX_texture_coordinate_clamp -#define GL_SGIX_texture_coordinate_clamp 1 -#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 -#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A -#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B -#endif /* GL_SGIX_texture_coordinate_clamp */ - -#ifndef GL_SGIX_texture_lod_bias -#define GL_SGIX_texture_lod_bias 1 -#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E -#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F -#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 -#endif /* GL_SGIX_texture_lod_bias */ - -#ifndef GL_SGIX_texture_multi_buffer -#define GL_SGIX_texture_multi_buffer 1 -#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E -#endif /* GL_SGIX_texture_multi_buffer */ - -#ifndef GL_SGIX_texture_scale_bias -#define GL_SGIX_texture_scale_bias 1 -#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 -#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A -#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B -#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C -#endif /* GL_SGIX_texture_scale_bias */ - -#ifndef GL_SGIX_vertex_preclip -#define GL_SGIX_vertex_preclip 1 -#define GL_VERTEX_PRECLIP_SGIX 0x83EE -#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF -#endif /* GL_SGIX_vertex_preclip */ - -#ifndef GL_SGIX_ycrcb -#define GL_SGIX_ycrcb 1 -#define GL_YCRCB_422_SGIX 0x81BB -#define GL_YCRCB_444_SGIX 0x81BC -#endif /* GL_SGIX_ycrcb */ - -#ifndef GL_SGIX_ycrcb_subsample -#define GL_SGIX_ycrcb_subsample 1 -#endif /* GL_SGIX_ycrcb_subsample */ - -#ifndef GL_SGIX_ycrcba -#define GL_SGIX_ycrcba 1 -#define GL_YCRCB_SGIX 0x8318 -#define GL_YCRCBA_SGIX 0x8319 -#endif /* GL_SGIX_ycrcba */ - -#ifndef GL_SGI_color_matrix -#define GL_SGI_color_matrix 1 -#define GL_COLOR_MATRIX_SGI 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB -#endif /* GL_SGI_color_matrix */ - -#ifndef GL_SGI_color_table -#define GL_SGI_color_table 1 -#define GL_COLOR_TABLE_SGI 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 -#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 -#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 -#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 -#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 -#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF -typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table); -GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, void *table); -GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params); -#endif -#endif /* GL_SGI_color_table */ - -#ifndef GL_SGI_texture_color_table -#define GL_SGI_texture_color_table 1 -#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC -#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD -#endif /* GL_SGI_texture_color_table */ - -#ifndef GL_SUNX_constant_data -#define GL_SUNX_constant_data 1 -#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 -#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 -typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFinishTextureSUNX (void); -#endif -#endif /* GL_SUNX_constant_data */ - -#ifndef GL_SUN_convolution_border_modes -#define GL_SUN_convolution_border_modes 1 -#define GL_WRAP_BORDER_SUN 0x81D4 -#endif /* GL_SUN_convolution_border_modes */ - -#ifndef GL_SUN_global_alpha -#define GL_SUN_global_alpha 1 -#define GL_GLOBAL_ALPHA_SUN 0x81D9 -#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor); -GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor); -GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor); -GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor); -GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor); -GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor); -GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor); -GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor); -#endif -#endif /* GL_SUN_global_alpha */ - -#ifndef GL_SUN_mesh_array -#define GL_SUN_mesh_array 1 -#define GL_QUAD_MESH_SUN 0x8614 -#define GL_TRIANGLE_MESH_SUN 0x8615 -typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width); -#endif -#endif /* GL_SUN_mesh_array */ - -#ifndef GL_SUN_slice_accum -#define GL_SUN_slice_accum 1 -#define GL_SLICE_ACCUM_SUN 0x85CC -#endif /* GL_SUN_slice_accum */ - -#ifndef GL_SUN_triangle_list -#define GL_SUN_triangle_list 1 -#define GL_RESTART_SUN 0x0001 -#define GL_REPLACE_MIDDLE_SUN 0x0002 -#define GL_REPLACE_OLDEST_SUN 0x0003 -#define GL_TRIANGLE_LIST_SUN 0x81D7 -#define GL_REPLACEMENT_CODE_SUN 0x81D8 -#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 -#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 -#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 -#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 -#define GL_R1UI_V3F_SUN 0x85C4 -#define GL_R1UI_C4UB_V3F_SUN 0x85C5 -#define GL_R1UI_C3F_V3F_SUN 0x85C6 -#define GL_R1UI_N3F_V3F_SUN 0x85C7 -#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 -#define GL_R1UI_T2F_V3F_SUN 0x85C9 -#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA -#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void **pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code); -GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code); -GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code); -GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code); -GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code); -GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code); -GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const void **pointer); -#endif -#endif /* GL_SUN_triangle_list */ - -#ifndef GL_SUN_vertex -#define GL_SUN_vertex 1 -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); -GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v); -GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v); -GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -#endif -#endif /* GL_SUN_vertex */ - -#ifndef GL_WIN_phong_shading -#define GL_WIN_phong_shading 1 -#define GL_PHONG_WIN 0x80EA -#define GL_PHONG_HINT_WIN 0x80EB -#endif /* GL_WIN_phong_shading */ - -#ifndef GL_WIN_specular_fog -#define GL_WIN_specular_fog 1 -#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC -#endif /* GL_WIN_specular_fog */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/Dependencies/SDL/Windows/include/SDL_opengles.h b/Dependencies/SDL/Windows/include/SDL_opengles.h deleted file mode 100644 index 5c2a3e6..0000000 --- a/Dependencies/SDL/Windows/include/SDL_opengles.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_opengles.h - * - * This is a simple file to encapsulate the OpenGL ES 1.X API headers. - */ -#include "SDL_config.h" - -#ifdef __IPHONEOS__ -#include -#include -#else -#include -#include -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif diff --git a/Dependencies/SDL/Windows/include/SDL_opengles2.h b/Dependencies/SDL/Windows/include/SDL_opengles2.h deleted file mode 100644 index 00bc180..0000000 --- a/Dependencies/SDL/Windows/include/SDL_opengles2.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_opengles2.h - * - * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. - */ -#include "SDL_config.h" - -#ifndef _MSC_VER - -#ifdef __IPHONEOS__ -#include -#include -#else -#include -#include -#include -#endif - -#else /* _MSC_VER */ - -/* OpenGL ES2 headers for Visual Studio */ -#include "SDL_opengles2_khrplatform.h" -#include "SDL_opengles2_gl2platform.h" -#include "SDL_opengles2_gl2.h" -#include "SDL_opengles2_gl2ext.h" - -#endif /* _MSC_VER */ - -#ifndef APIENTRY -#define APIENTRY GL_APIENTRY -#endif diff --git a/Dependencies/SDL/Windows/include/SDL_opengles2_gl2.h b/Dependencies/SDL/Windows/include/SDL_opengles2_gl2.h deleted file mode 100644 index c62fb0a..0000000 --- a/Dependencies/SDL/Windows/include/SDL_opengles2_gl2.h +++ /dev/null @@ -1,621 +0,0 @@ -#ifndef __gl2_h_ -#define __gl2_h_ - -/* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */ - -/*#include */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/*------------------------------------------------------------------------- - * Data type definitions - *-----------------------------------------------------------------------*/ - -typedef void GLvoid; -typedef char GLchar; -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef khronos_int8_t GLbyte; -typedef short GLshort; -typedef int GLint; -typedef int GLsizei; -typedef khronos_uint8_t GLubyte; -typedef unsigned short GLushort; -typedef unsigned int GLuint; -typedef khronos_float_t GLfloat; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; - -/* GL types for handling large vertex buffer objects */ -typedef khronos_intptr_t GLintptr; -typedef khronos_ssize_t GLsizeiptr; - -/* OpenGL ES core versions */ -#define GL_ES_VERSION_2_0 1 - -/* ClearBufferMask */ -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 - -/* Boolean */ -#define GL_FALSE 0 -#define GL_TRUE 1 - -/* BeginMode */ -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 - -/* AlphaFunction (not supported in ES20) */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* BlendingFactorDest */ -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 - -/* BlendingFactorSrc */ -/* GL_ZERO */ -/* GL_ONE */ -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -/* GL_SRC_ALPHA */ -/* GL_ONE_MINUS_SRC_ALPHA */ -/* GL_DST_ALPHA */ -/* GL_ONE_MINUS_DST_ALPHA */ - -/* BlendEquationSeparate */ -#define GL_FUNC_ADD 0x8006 -#define GL_BLEND_EQUATION 0x8009 -#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ -#define GL_BLEND_EQUATION_ALPHA 0x883D - -/* BlendSubtract */ -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B - -/* Separate Blend Functions */ -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 - -/* Buffer Objects */ -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 - -#define GL_STREAM_DRAW 0x88E0 -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 - -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 - -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 - -/* CullFaceMode */ -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 - -/* DepthFunction */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* EnableCap */ -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_BLEND 0x0BE2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_COVERAGE 0x80A0 - -/* ErrorCode */ -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 - -/* FrontFaceDirection */ -#define GL_CW 0x0900 -#define GL_CCW 0x0901 - -/* GetPName */ -#define GL_LINE_WIDTH 0x0B21 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_VIEWPORT 0x0BA2 -#define GL_SCISSOR_BOX 0x0C10 -/* GL_SCISSOR_TEST */ -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -/* GL_POLYGON_OFFSET_FILL */ -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB - -/* GetTextureParameter */ -/* GL_TEXTURE_MAG_FILTER */ -/* GL_TEXTURE_MIN_FILTER */ -/* GL_TEXTURE_WRAP_S */ -/* GL_TEXTURE_WRAP_T */ - -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 - -/* HintMode */ -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 - -/* HintTarget */ -#define GL_GENERATE_MIPMAP_HINT 0x8192 - -/* DataType */ -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C - -/* PixelFormat */ -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A - -/* PixelType */ -/* GL_UNSIGNED_BYTE */ -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 - -/* Shaders */ -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_SHADER_TYPE 0x8B4F -#define GL_DELETE_STATUS 0x8B80 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D - -/* StencilFunction */ -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 - -/* StencilOp */ -/* GL_ZERO */ -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_INVERT 0x150A -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 - -/* StringName */ -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 - -/* TextureMagFilter */ -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 - -/* TextureMinFilter */ -/* GL_NEAREST */ -/* GL_LINEAR */ -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 - -/* TextureParameterName */ -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 - -/* TextureTarget */ -/* GL_TEXTURE_2D */ -#define GL_TEXTURE 0x1702 - -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C - -/* TextureUnit */ -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 - -/* TextureWrapMode */ -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MIRRORED_REPEAT 0x8370 - -/* Uniform Types */ -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_CUBE 0x8B60 - -/* Vertex Arrays */ -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F - -/* Read Format */ -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B - -/* Shader Source */ -#define GL_COMPILE_STATUS 0x8B81 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_SHADER_COMPILER 0x8DFA - -/* Shader Binary */ -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 - -/* Shader Precision-Specified Types */ -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 - -/* Framebuffer Object. */ -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 - -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGB565 0x8D62 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_STENCIL_INDEX8 0x8D48 - -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 - -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 - -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 - -#define GL_NONE 0 - -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD - -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 - -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 - -/*------------------------------------------------------------------------- - * GL core functions. - *-----------------------------------------------------------------------*/ - -GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); -GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name); -GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode ); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); -GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); -GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth); -GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); -GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); -GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); -GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers); -GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers); -GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures); -GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); -GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); -GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); -GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glDisable (GLenum cap); -GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); -GL_APICALL void GL_APIENTRY glEnable (GLenum cap); -GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glFinish (void); -GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); -GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers); -GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); -GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers); -GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); -GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name); -GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL GLenum GL_APIENTRY glGetError (void); -GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); -GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params); -GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer); -GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); -GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); -GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); -GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); -GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); -GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); -GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); -GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); -GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); -GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x); -GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); - -#ifdef __cplusplus -} -#endif - -#endif /* __gl2_h_ */ - diff --git a/Dependencies/SDL/Windows/include/SDL_opengles2_gl2ext.h b/Dependencies/SDL/Windows/include/SDL_opengles2_gl2ext.h deleted file mode 100644 index e8ca8b1..0000000 --- a/Dependencies/SDL/Windows/include/SDL_opengles2_gl2ext.h +++ /dev/null @@ -1,2050 +0,0 @@ -#ifndef __gl2ext_h_ -#define __gl2ext_h_ - -/* $Revision: 22801 $ on $Date:: 2013-08-21 03:20:48 -0700 #$ */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -#ifndef GL_APIENTRYP -# define GL_APIENTRYP GL_APIENTRY* -#endif - -/* New types shared by several extensions */ - -#ifndef __gl3_h_ -/* These are defined with respect to in the - * Apple extension spec, but they are also used by non-APPLE - * extensions, and in the Khronos header we use the Khronos - * portable types in khrplatform.h, which must be defined. - */ -typedef khronos_int64_t GLint64; -typedef khronos_uint64_t GLuint64; -typedef struct __GLsync *GLsync; -#endif - - -/*------------------------------------------------------------------------* - * OES extension tokens - *------------------------------------------------------------------------*/ - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_ETC1_RGB8_OES 0x8D64 -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_DEPTH_COMPONENT24_OES 0x81A6 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_DEPTH_COMPONENT32_OES 0x81A7 -#endif - -/* GL_OES_depth_texture */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -typedef void* GLeglImageOES; -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -/* GLeglImageOES defined in GL_OES_EGL_image already. */ -#define GL_TEXTURE_EXTERNAL_OES 0x8D65 -#define GL_SAMPLER_EXTERNAL_OES 0x8D66 -#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 -#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_UNSIGNED_INT 0x1405 -#endif - -/* GL_OES_get_program_binary */ -#ifndef GL_OES_get_program_binary -#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE -#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_WRITE_ONLY_OES 0x88B9 -#define GL_BUFFER_ACCESS_OES 0x88BB -#define GL_BUFFER_MAPPED_OES 0x88BC -#define GL_BUFFER_MAP_POINTER_OES 0x88BD -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_DEPTH_STENCIL_OES 0x84F9 -#define GL_UNSIGNED_INT_24_8_OES 0x84FA -#define GL_DEPTH24_STENCIL8_OES 0x88F0 -#endif - -/* GL_OES_required_internalformat */ -#ifndef GL_OES_required_internalformat -#define GL_ALPHA8_OES 0x803C -#define GL_DEPTH_COMPONENT16_OES 0x81A5 -/* reuse GL_DEPTH_COMPONENT24_OES */ -/* reuse GL_DEPTH24_STENCIL8_OES */ -/* reuse GL_DEPTH_COMPONENT32_OES */ -#define GL_LUMINANCE4_ALPHA4_OES 0x8043 -#define GL_LUMINANCE8_ALPHA8_OES 0x8045 -#define GL_LUMINANCE8_OES 0x8040 -#define GL_RGBA4_OES 0x8056 -#define GL_RGB5_A1_OES 0x8057 -#define GL_RGB565_OES 0x8D62 -/* reuse GL_RGB8_OES */ -/* reuse GL_RGBA8_OES */ -/* reuse GL_RGB10_EXT */ -/* reuse GL_RGB10_A2_EXT */ -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_RGB8_OES 0x8051 -#define GL_RGBA8_OES 0x8058 -#endif - -/* GL_OES_standard_derivatives */ -#ifndef GL_OES_standard_derivatives -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_STENCIL_INDEX1_OES 0x8D46 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_STENCIL_INDEX4_OES 0x8D47 -#endif - -#ifndef GL_OES_surfaceless_context -#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219 -#endif - -/* GL_OES_texture_3D */ -#ifndef GL_OES_texture_3D -#define GL_TEXTURE_WRAP_R_OES 0x8072 -#define GL_TEXTURE_3D_OES 0x806F -#define GL_TEXTURE_BINDING_3D_OES 0x806A -#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 -#define GL_SAMPLER_3D_OES 0x8B5F -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 -#endif - -/* GL_OES_texture_float */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_float_linear */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_half_float */ -#ifndef GL_OES_texture_half_float -#define GL_HALF_FLOAT_OES 0x8D61 -#endif - -/* GL_OES_texture_half_float_linear */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_npot */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 -#endif - -/* GL_OES_vertex_half_float */ -/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ - -/* GL_OES_vertex_type_10_10_10_2 */ -#ifndef GL_OES_vertex_type_10_10_10_2 -#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 -#define GL_INT_10_10_10_2_OES 0x8DF7 -#endif - -/*------------------------------------------------------------------------* - * KHR extension tokens - *------------------------------------------------------------------------*/ - -#ifndef GL_KHR_debug -typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245 -#define GL_DEBUG_SOURCE_API_KHR 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A -#define GL_DEBUG_SOURCE_OTHER_KHR 0x824B -#define GL_DEBUG_TYPE_ERROR_KHR 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E -#define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250 -#define GL_DEBUG_TYPE_OTHER_KHR 0x8251 -#define GL_DEBUG_TYPE_MARKER_KHR 0x8268 -#define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269 -#define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A -#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B -#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C -#define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D -#define GL_BUFFER_KHR 0x82E0 -#define GL_SHADER_KHR 0x82E1 -#define GL_PROGRAM_KHR 0x82E2 -#define GL_QUERY_KHR 0x82E3 -/* PROGRAM_PIPELINE only in GL */ -#define GL_SAMPLER_KHR 0x82E6 -/* DISPLAY_LIST only in GL */ -#define GL_MAX_LABEL_LENGTH_KHR 0x82E8 -#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147 -#define GL_DEBUG_SEVERITY_LOW_KHR 0x9148 -#define GL_DEBUG_OUTPUT_KHR 0x92E0 -#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002 -#define GL_STACK_OVERFLOW_KHR 0x0503 -#define GL_STACK_UNDERFLOW_KHR 0x0504 -#endif - -#ifndef GL_KHR_texture_compression_astc_ldr -#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 -#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 -#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 -#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 -#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 -#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 -#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 -#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 -#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 -#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 -#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA -#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB -#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC -#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD -#endif - -/*------------------------------------------------------------------------* - * AMD extension tokens - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_3DC_X_AMD 0x87F9 -#define GL_3DC_XY_AMD 0x87FA -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_ATC_RGB_AMD 0x8C92 -#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 -#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE -#endif - -/* GL_AMD_performance_monitor */ -#ifndef GL_AMD_performance_monitor -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFMON_RESULT_AMD 0x8BC6 -#endif - -/* GL_AMD_program_binary_Z400 */ -#ifndef GL_AMD_program_binary_Z400 -#define GL_Z400_BINARY_AMD 0x8740 -#endif - -/*------------------------------------------------------------------------* - * ANGLE extension tokens - *------------------------------------------------------------------------*/ - -/* GL_ANGLE_depth_texture */ -#ifndef GL_ANGLE_depth_texture -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_DEPTH_STENCIL_OES 0x84F9 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_UNSIGNED_INT 0x1405 -#define GL_UNSIGNED_INT_24_8_OES 0x84FA -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT32_OES 0x81A7 -#define GL_DEPTH24_STENCIL8_OES 0x88F0 -#endif - -/* GL_ANGLE_framebuffer_blit */ -#ifndef GL_ANGLE_framebuffer_blit -#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA -#endif - -/* GL_ANGLE_framebuffer_multisample */ -#ifndef GL_ANGLE_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 -#define GL_MAX_SAMPLES_ANGLE 0x8D57 -#endif - -/* GL_ANGLE_instanced_arrays */ -#ifndef GL_ANGLE_instanced_arrays -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE -#endif - -/* GL_ANGLE_pack_reverse_row_order */ -#ifndef GL_ANGLE_pack_reverse_row_order -#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 -#endif - -/* GL_ANGLE_program_binary */ -#ifndef GL_ANGLE_program_binary -#define GL_PROGRAM_BINARY_ANGLE 0x93A6 -#endif - -/* GL_ANGLE_texture_compression_dxt3 */ -#ifndef GL_ANGLE_texture_compression_dxt3 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2 -#endif - -/* GL_ANGLE_texture_compression_dxt5 */ -#ifndef GL_ANGLE_texture_compression_dxt5 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3 -#endif - -/* GL_ANGLE_texture_usage */ -#ifndef GL_ANGLE_texture_usage -#define GL_TEXTURE_USAGE_ANGLE 0x93A2 -#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3 -#endif - -/* GL_ANGLE_translated_shader_source */ -#ifndef GL_ANGLE_translated_shader_source -#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 -#endif - -/*------------------------------------------------------------------------* - * APPLE extension tokens - *------------------------------------------------------------------------*/ - -/* GL_APPLE_copy_texture_levels */ -/* No new tokens introduced by this extension. */ - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 -#define GL_MAX_SAMPLES_APPLE 0x8D57 -#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA -#endif - -/* GL_APPLE_rgb_422 */ -#ifndef GL_APPLE_rgb_422 -#define GL_RGB_422_APPLE 0x8A1F -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#endif - -/* GL_APPLE_sync */ -#ifndef GL_APPLE_sync - -#define GL_SYNC_OBJECT_APPLE 0x8A53 -#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111 -#define GL_OBJECT_TYPE_APPLE 0x9112 -#define GL_SYNC_CONDITION_APPLE 0x9113 -#define GL_SYNC_STATUS_APPLE 0x9114 -#define GL_SYNC_FLAGS_APPLE 0x9115 -#define GL_SYNC_FENCE_APPLE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117 -#define GL_UNSIGNALED_APPLE 0x9118 -#define GL_SIGNALED_APPLE 0x9119 -#define GL_ALREADY_SIGNALED_APPLE 0x911A -#define GL_TIMEOUT_EXPIRED_APPLE 0x911B -#define GL_CONDITION_SATISFIED_APPLE 0x911C -#define GL_WAIT_FAILED_APPLE 0x911D -#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001 -#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D -#endif - -/*------------------------------------------------------------------------* - * ARM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_ARM_mali_program_binary */ -#ifndef GL_ARM_mali_program_binary -#define GL_MALI_PROGRAM_BINARY_ARM 0x8F61 -#endif - -/* GL_ARM_mali_shader_binary */ -#ifndef GL_ARM_mali_shader_binary -#define GL_MALI_SHADER_BINARY_ARM 0x8F60 -#endif - -/* GL_ARM_rgba8 */ -/* No new tokens introduced by this extension. */ - -/*------------------------------------------------------------------------* - * EXT extension tokens - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#endif - -/* GL_EXT_color_buffer_half_float */ -#ifndef GL_EXT_color_buffer_half_float -#define GL_RGBA16F_EXT 0x881A -#define GL_RGB16F_EXT 0x881B -#define GL_RG16F_EXT 0x822F -#define GL_R16F_EXT 0x822D -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211 -#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17 -#endif - -/* GL_EXT_debug_label */ -#ifndef GL_EXT_debug_label -#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F -#define GL_PROGRAM_OBJECT_EXT 0x8B40 -#define GL_SHADER_OBJECT_EXT 0x8B48 -#define GL_BUFFER_OBJECT_EXT 0x9151 -#define GL_QUERY_OBJECT_EXT 0x9153 -#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 -#endif - -/* GL_EXT_debug_marker */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_COLOR_EXT 0x1800 -#define GL_DEPTH_EXT 0x1801 -#define GL_STENCIL_EXT 0x1802 -#endif - -#ifndef GL_EXT_disjoint_timer_query -#define GL_QUERY_COUNTER_BITS_EXT 0x8864 -#define GL_CURRENT_QUERY_EXT 0x8865 -#define GL_QUERY_RESULT_EXT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 -#define GL_TIME_ELAPSED_EXT 0x88BF -#define GL_TIMESTAMP_EXT 0x8E28 -#define GL_GPU_DISJOINT_EXT 0x8FBB -#endif - -#ifndef GL_EXT_draw_buffers -#define GL_EXT_draw_buffers 1 -#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF -#define GL_MAX_DRAW_BUFFERS_EXT 0x8824 -#define GL_DRAW_BUFFER0_EXT 0x8825 -#define GL_DRAW_BUFFER1_EXT 0x8826 -#define GL_DRAW_BUFFER2_EXT 0x8827 -#define GL_DRAW_BUFFER3_EXT 0x8828 -#define GL_DRAW_BUFFER4_EXT 0x8829 -#define GL_DRAW_BUFFER5_EXT 0x882A -#define GL_DRAW_BUFFER6_EXT 0x882B -#define GL_DRAW_BUFFER7_EXT 0x882C -#define GL_DRAW_BUFFER8_EXT 0x882D -#define GL_DRAW_BUFFER9_EXT 0x882E -#define GL_DRAW_BUFFER10_EXT 0x882F -#define GL_DRAW_BUFFER11_EXT 0x8830 -#define GL_DRAW_BUFFER12_EXT 0x8831 -#define GL_DRAW_BUFFER13_EXT 0x8832 -#define GL_DRAW_BUFFER14_EXT 0x8833 -#define GL_DRAW_BUFFER15_EXT 0x8834 -#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 -#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 -#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 -#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 -#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 -#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 -#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 -#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 -#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 -#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 -#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA -#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB -#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC -#define GL_COLOR_ATTACHMENT13_EXT 0x8CED -#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE -#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -#endif - -/* GL_EXT_map_buffer_range */ -#ifndef GL_EXT_map_buffer_range -#define GL_MAP_READ_BIT_EXT 0x0001 -#define GL_MAP_WRITE_BIT_EXT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020 -#endif - -/* GL_EXT_multisampled_render_to_texture */ -#ifndef GL_EXT_multisampled_render_to_texture -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C -/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */ -#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 -#define GL_MAX_SAMPLES_EXT 0x8D57 -#endif - -/* GL_EXT_multiview_draw_buffers */ -#ifndef GL_EXT_multiview_draw_buffers -#define GL_COLOR_ATTACHMENT_EXT 0x90F0 -#define GL_MULTIVIEW_EXT 0x90F1 -#define GL_DRAW_BUFFER_EXT 0x0C01 -#define GL_READ_BUFFER_EXT 0x0C02 -#define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2 -#endif - -/* GL_EXT_multi_draw_arrays */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_occlusion_query_boolean */ -#ifndef GL_EXT_occlusion_query_boolean -#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A -#define GL_CURRENT_QUERY_EXT 0x8865 -#define GL_QUERY_RESULT_EXT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 -#endif - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_BGRA_EXT 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 -#endif - -/* GL_EXT_robustness */ -#ifndef GL_EXT_robustness -/* reuse GL_NO_ERROR */ -#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253 -#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255 -#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3 -#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256 -#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252 -#define GL_NO_RESET_NOTIFICATION_EXT 0x8261 -#endif - -/* GL_EXT_separate_shader_objects */ -#ifndef GL_EXT_separate_shader_objects -#define GL_VERTEX_SHADER_BIT_EXT 0x00000001 -#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002 -#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF -#define GL_PROGRAM_SEPARABLE_EXT 0x8258 -#define GL_ACTIVE_PROGRAM_EXT 0x8259 -#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A -#endif - -/* GL_EXT_shader_framebuffer_fetch */ -#ifndef GL_EXT_shader_framebuffer_fetch -#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 -#endif - -/* GL_EXT_shader_texture_lod */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_shadow_samplers */ -#ifndef GL_EXT_shadow_samplers -#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C -#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D -#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E -#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62 -#endif - -/* GL_EXT_sRGB */ -#ifndef GL_EXT_sRGB -#define GL_SRGB_EXT 0x8C40 -#define GL_SRGB_ALPHA_EXT 0x8C42 -#define GL_SRGB8_ALPHA8_EXT 0x8C43 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210 -#endif - -/* GL_EXT_sRGB_write_control */ -#ifndef GL_EXT_sRGB_write_control -#define GL_EXT_sRGB_write_control 1 -#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 -#endif - -/* GL_EXT_texture_compression_dxt1 */ -#ifndef GL_EXT_texture_compression_dxt1 -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#endif - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -/* GL_EXT_texture_rg */ -#ifndef GL_EXT_texture_rg -#define GL_RED_EXT 0x1903 -#define GL_RG_EXT 0x8227 -#define GL_R8_EXT 0x8229 -#define GL_RG8_EXT 0x822B -#endif - -/* GL_EXT_texture_sRGB_decode */ -#ifndef GL_EXT_texture_sRGB_decode -#define GL_EXT_texture_sRGB_decode 1 -#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 -#define GL_DECODE_EXT 0x8A49 -#define GL_SKIP_DECODE_EXT 0x8A4A -#endif - -/* GL_EXT_texture_storage */ -#ifndef GL_EXT_texture_storage -#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F -#define GL_ALPHA8_EXT 0x803C -#define GL_LUMINANCE8_EXT 0x8040 -#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 -#define GL_RGBA32F_EXT 0x8814 -#define GL_RGB32F_EXT 0x8815 -#define GL_ALPHA32F_EXT 0x8816 -#define GL_LUMINANCE32F_EXT 0x8818 -#define GL_LUMINANCE_ALPHA32F_EXT 0x8819 -/* reuse GL_RGBA16F_EXT */ -/* reuse GL_RGB16F_EXT */ -#define GL_ALPHA16F_EXT 0x881C -#define GL_LUMINANCE16F_EXT 0x881E -#define GL_LUMINANCE_ALPHA16F_EXT 0x881F -#define GL_RGB10_A2_EXT 0x8059 -#define GL_RGB10_EXT 0x8052 -#define GL_BGRA8_EXT 0x93A1 -#define GL_R8_EXT 0x8229 -#define GL_RG8_EXT 0x822B -#define GL_R32F_EXT 0x822E -#define GL_RG32F_EXT 0x8230 -#define GL_R16F_EXT 0x822D -#define GL_RG16F_EXT 0x822F -#endif - -/* GL_EXT_texture_type_2_10_10_10_REV */ -#ifndef GL_EXT_texture_type_2_10_10_10_REV -#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 -#endif - -/* GL_EXT_unpack_subimage */ -#ifndef GL_EXT_unpack_subimage -#define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2 -#define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4 -#endif - -/*------------------------------------------------------------------------* - * DMP extension tokens - *------------------------------------------------------------------------*/ - -/* GL_DMP_shader_binary */ -#ifndef GL_DMP_shader_binary -#define GL_SHADER_BINARY_DMP 0x9250 -#endif - -/*------------------------------------------------------------------------* - * FJ extension tokens - *------------------------------------------------------------------------*/ - -/* GL_FJ_shader_binary_GCCSO */ -#ifndef GL_FJ_shader_binary_GCCSO -#define GL_GCCSO_SHADER_BINARY_FJ 0x9260 -#endif - -/*------------------------------------------------------------------------* - * IMG extension tokens - *------------------------------------------------------------------------*/ - -/* GL_IMG_program_binary */ -#ifndef GL_IMG_program_binary -#define GL_SGX_PROGRAM_BINARY_IMG 0x9130 -#endif - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_BGRA_IMG 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 -#endif - -/* GL_IMG_shader_binary */ -#ifndef GL_IMG_shader_binary -#define GL_SGX_BINARY_IMG 0x8C0A -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 -#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 -#endif - -/* GL_IMG_texture_compression_pvrtc2 */ -#ifndef GL_IMG_texture_compression_pvrtc2 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138 -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 -#define GL_MAX_SAMPLES_IMG 0x9135 -#define GL_TEXTURE_SAMPLES_IMG 0x9136 -#endif - -/*------------------------------------------------------------------------* - * NV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_NV_coverage_sample */ -#ifndef GL_NV_coverage_sample -#define GL_COVERAGE_COMPONENT_NV 0x8ED0 -#define GL_COVERAGE_COMPONENT4_NV 0x8ED1 -#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2 -#define GL_COVERAGE_BUFFERS_NV 0x8ED3 -#define GL_COVERAGE_SAMPLES_NV 0x8ED4 -#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5 -#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6 -#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7 -#define GL_COVERAGE_BUFFER_BIT_NV 0x00008000 -#endif - -/* GL_NV_depth_nonlinear */ -#ifndef GL_NV_depth_nonlinear -#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C -#endif - -/* GL_NV_draw_buffers */ -#ifndef GL_NV_draw_buffers -#define GL_MAX_DRAW_BUFFERS_NV 0x8824 -#define GL_DRAW_BUFFER0_NV 0x8825 -#define GL_DRAW_BUFFER1_NV 0x8826 -#define GL_DRAW_BUFFER2_NV 0x8827 -#define GL_DRAW_BUFFER3_NV 0x8828 -#define GL_DRAW_BUFFER4_NV 0x8829 -#define GL_DRAW_BUFFER5_NV 0x882A -#define GL_DRAW_BUFFER6_NV 0x882B -#define GL_DRAW_BUFFER7_NV 0x882C -#define GL_DRAW_BUFFER8_NV 0x882D -#define GL_DRAW_BUFFER9_NV 0x882E -#define GL_DRAW_BUFFER10_NV 0x882F -#define GL_DRAW_BUFFER11_NV 0x8830 -#define GL_DRAW_BUFFER12_NV 0x8831 -#define GL_DRAW_BUFFER13_NV 0x8832 -#define GL_DRAW_BUFFER14_NV 0x8833 -#define GL_DRAW_BUFFER15_NV 0x8834 -#define GL_COLOR_ATTACHMENT0_NV 0x8CE0 -#define GL_COLOR_ATTACHMENT1_NV 0x8CE1 -#define GL_COLOR_ATTACHMENT2_NV 0x8CE2 -#define GL_COLOR_ATTACHMENT3_NV 0x8CE3 -#define GL_COLOR_ATTACHMENT4_NV 0x8CE4 -#define GL_COLOR_ATTACHMENT5_NV 0x8CE5 -#define GL_COLOR_ATTACHMENT6_NV 0x8CE6 -#define GL_COLOR_ATTACHMENT7_NV 0x8CE7 -#define GL_COLOR_ATTACHMENT8_NV 0x8CE8 -#define GL_COLOR_ATTACHMENT9_NV 0x8CE9 -#define GL_COLOR_ATTACHMENT10_NV 0x8CEA -#define GL_COLOR_ATTACHMENT11_NV 0x8CEB -#define GL_COLOR_ATTACHMENT12_NV 0x8CEC -#define GL_COLOR_ATTACHMENT13_NV 0x8CED -#define GL_COLOR_ATTACHMENT14_NV 0x8CEE -#define GL_COLOR_ATTACHMENT15_NV 0x8CEF -#endif - -/* GL_NV_draw_instanced */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_fbo_color_attachments */ -#ifndef GL_NV_fbo_color_attachments -#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF -/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */ -#endif - -/* GL_NV_fence */ -#ifndef GL_NV_fence -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -#endif - -/* GL_NV_framebuffer_blit */ -#ifndef GL_NV_framebuffer_blit -#define GL_READ_FRAMEBUFFER_NV 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_NV 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA -#endif - -/* GL_NV_framebuffer_multisample */ -#ifndef GL_NV_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56 -#define GL_MAX_SAMPLES_NV 0x8D57 -#endif - -/* GL_NV_generate_mipmap_sRGB */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_instanced_arrays */ -#ifndef GL_NV_instanced_arrays -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE -#endif - -/* GL_NV_read_buffer */ -#ifndef GL_NV_read_buffer -#define GL_READ_BUFFER_NV 0x0C02 -#endif - -/* GL_NV_read_buffer_front */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_depth */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_depth_stencil */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_stencil */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_shadow_samplers_array */ -#ifndef GL_NV_shadow_samplers_array -#define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4 -#endif - -/* GL_NV_shadow_samplers_cube */ -#ifndef GL_NV_shadow_samplers_cube -#define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5 -#endif - -/* GL_NV_sRGB_formats */ -#ifndef GL_NV_sRGB_formats -#define GL_SLUMINANCE_NV 0x8C46 -#define GL_SLUMINANCE_ALPHA_NV 0x8C44 -#define GL_SRGB8_NV 0x8C41 -#define GL_SLUMINANCE8_NV 0x8C47 -#define GL_SLUMINANCE8_ALPHA8_NV 0x8C45 -#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F -#define GL_ETC1_SRGB8_NV 0x88EE -#endif - -/* GL_NV_texture_border_clamp */ -#ifndef GL_NV_texture_border_clamp -#define GL_TEXTURE_BORDER_COLOR_NV 0x1004 -#define GL_CLAMP_TO_BORDER_NV 0x812D -#endif - -/* GL_NV_texture_compression_s3tc_update */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_texture_npot_2D_mipmap */ -/* No new tokens introduced by this extension. */ - -/*------------------------------------------------------------------------* - * QCOM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_QCOM_alpha_test */ -#ifndef GL_QCOM_alpha_test -#define GL_ALPHA_TEST_QCOM 0x0BC0 -#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1 -#define GL_ALPHA_TEST_REF_QCOM 0x0BC2 -#endif - -/* GL_QCOM_binning_control */ -#ifndef GL_QCOM_binning_control -#define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0 -#define GL_CPU_OPTIMIZED_QCOM 0x8FB1 -#define GL_GPU_OPTIMIZED_QCOM 0x8FB2 -#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3 -#endif - -/* GL_QCOM_driver_control */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 -#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 -#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 -#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 -#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 -#define GL_TEXTURE_TYPE_QCOM 0x8BD7 -#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 -#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 -#define GL_TEXTURE_TARGET_QCOM 0x8BDA -#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB -#define GL_STATE_RESTORE 0x8BDC -#endif - -/* GL_QCOM_extended_get2 */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_WRITEONLY_RENDERING_QCOM 0x8823 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 -#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 -#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 -#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 -#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 -#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 -#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 -#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 -#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 -#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 -#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 -#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 -#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 -#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 -#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 -#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 -#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 -#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 -#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 -#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 -#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 -#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 -#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 -#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 -#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 -#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 -#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 -#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 -#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 -#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 -#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 -#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 -#endif - -/*------------------------------------------------------------------------* - * VIV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_VIV_shader_binary */ -#ifndef GL_VIV_shader_binary -#define GL_SHADER_BINARY_VIV 0x8FC4 -#endif - -/*------------------------------------------------------------------------* - * End of extension tokens, start of corresponding extension functions - *------------------------------------------------------------------------*/ - -/*------------------------------------------------------------------------* - * OES extension functions - *------------------------------------------------------------------------*/ - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_OES_compressed_ETC1_RGB8_texture 1 -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_OES_compressed_paletted_texture 1 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_OES_depth24 1 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_OES_depth32 1 -#endif - -/* GL_OES_depth_texture */ -#ifndef GL_OES_depth_texture -#define GL_OES_depth_texture 1 -#endif - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -#define GL_OES_EGL_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); -#endif -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -#define GL_OES_EGL_image_external 1 -/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */ -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_OES_element_index_uint 1 -#endif - -/* GL_OES_fbo_render_mipmap */ -#ifndef GL_OES_fbo_render_mipmap -#define GL_OES_fbo_render_mipmap 1 -#endif - -/* GL_OES_fragment_precision_high */ -#ifndef GL_OES_fragment_precision_high -#define GL_OES_fragment_precision_high 1 -#endif - -/* GL_OES_get_program_binary */ -#ifndef GL_OES_get_program_binary -#define GL_OES_get_program_binary 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); -#endif -typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_OES_mapbuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); -GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid **params); -#endif -typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); -typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid **params); -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_OES_packed_depth_stencil 1 -#endif - -/* GL_OES_required_internalformat */ -#ifndef GL_OES_required_internalformat -#define GL_OES_required_internalformat 1 -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_OES_rgb8_rgba8 1 -#endif - -/* GL_OES_standard_derivatives */ -#ifndef GL_OES_standard_derivatives -#define GL_OES_standard_derivatives 1 -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_OES_stencil1 1 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_OES_stencil4 1 -#endif - -#ifndef GL_OES_surfaceless_context -#define GL_OES_surfaceless_context 1 -#endif - -/* GL_OES_texture_3D */ -#ifndef GL_OES_texture_3D -#define GL_OES_texture_3D 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -#endif -typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -#endif - -/* GL_OES_texture_float */ -#ifndef GL_OES_texture_float -#define GL_OES_texture_float 1 -#endif - -/* GL_OES_texture_float_linear */ -#ifndef GL_OES_texture_float_linear -#define GL_OES_texture_float_linear 1 -#endif - -/* GL_OES_texture_half_float */ -#ifndef GL_OES_texture_half_float -#define GL_OES_texture_half_float 1 -#endif - -/* GL_OES_texture_half_float_linear */ -#ifndef GL_OES_texture_half_float_linear -#define GL_OES_texture_half_float_linear 1 -#endif - -/* GL_OES_texture_npot */ -#ifndef GL_OES_texture_npot -#define GL_OES_texture_npot 1 -#endif - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_OES_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); -GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); -GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); -#endif -typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); -#endif - -/* GL_OES_vertex_half_float */ -#ifndef GL_OES_vertex_half_float -#define GL_OES_vertex_half_float 1 -#endif - -/* GL_OES_vertex_type_10_10_10_2 */ -#ifndef GL_OES_vertex_type_10_10_10_2 -#define GL_OES_vertex_type_10_10_10_2 1 -#endif - -/*------------------------------------------------------------------------* - * KHR extension functions - *------------------------------------------------------------------------*/ - -#ifndef GL_KHR_debug -#define GL_KHR_debug 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam); -GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message); -GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void); -GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, GLvoid **params); -#endif -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam); -typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); -typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void); -typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, GLvoid **params); -#endif - -#ifndef GL_KHR_texture_compression_astc_ldr -#define GL_KHR_texture_compression_astc_ldr 1 -#endif - - -/*------------------------------------------------------------------------* - * AMD extension functions - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_AMD_compressed_3DC_texture 1 -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_AMD_compressed_ATC_texture 1 -#endif - -/* AMD_performance_monitor */ -#ifndef GL_AMD_performance_monitor -#define GL_AMD_performance_monitor 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); -GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor); -GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); -typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); -typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif - -/* GL_AMD_program_binary_Z400 */ -#ifndef GL_AMD_program_binary_Z400 -#define GL_AMD_program_binary_Z400 1 -#endif - -/*------------------------------------------------------------------------* - * ANGLE extension functions - *------------------------------------------------------------------------*/ - -/* GL_ANGLE_depth_texture */ -#ifndef GL_ANGLE_depth_texture -#define GL_ANGLE_depth_texture 1 -#endif - -/* GL_ANGLE_framebuffer_blit */ -#ifndef GL_ANGLE_framebuffer_blit -#define GL_ANGLE_framebuffer_blit 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif - -/* GL_ANGLE_framebuffer_multisample */ -#ifndef GL_ANGLE_framebuffer_multisample -#define GL_ANGLE_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif - -#ifndef GL_ANGLE_instanced_arrays -#define GL_ANGLE_instanced_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor); -#endif -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor); -#endif - -/* GL_ANGLE_pack_reverse_row_order */ -#ifndef GL_ANGLE_pack_reverse_row_order -#define GL_ANGLE_pack_reverse_row_order 1 -#endif - -/* GL_ANGLE_program_binary */ -#ifndef GL_ANGLE_program_binary -#define GL_ANGLE_program_binary 1 -#endif - -/* GL_ANGLE_texture_compression_dxt3 */ -#ifndef GL_ANGLE_texture_compression_dxt3 -#define GL_ANGLE_texture_compression_dxt3 1 -#endif - -/* GL_ANGLE_texture_compression_dxt5 */ -#ifndef GL_ANGLE_texture_compression_dxt5 -#define GL_ANGLE_texture_compression_dxt5 1 -#endif - -/* GL_ANGLE_texture_usage */ -#ifndef GL_ANGLE_texture_usage -#define GL_ANGLE_texture_usage 1 -#endif - -#ifndef GL_ANGLE_translated_shader_source -#define GL_ANGLE_translated_shader_source 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); -#endif -typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); -#endif - -/*------------------------------------------------------------------------* - * APPLE extension functions - *------------------------------------------------------------------------*/ - -/* GL_APPLE_copy_texture_levels */ -#ifndef GL_APPLE_copy_texture_levels -#define GL_APPLE_copy_texture_levels 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); -#endif -typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); -#endif - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_APPLE_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); -#endif - -/* GL_APPLE_rgb_422 */ -#ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 1 -#endif - -/* GL_APPLE_sync */ -#ifndef GL_APPLE_sync -#define GL_APPLE_sync 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags); -GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync); -GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync); -GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params); -GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#endif -typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync); -typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync); -typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_APPLE_texture_format_BGRA8888 1 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_APPLE_texture_max_level 1 -#endif - -/*------------------------------------------------------------------------* - * ARM extension functions - *------------------------------------------------------------------------*/ - -/* GL_ARM_mali_program_binary */ -#ifndef GL_ARM_mali_program_binary -#define GL_ARM_mali_program_binary 1 -#endif - -/* GL_ARM_mali_shader_binary */ -#ifndef GL_ARM_mali_shader_binary -#define GL_ARM_mali_shader_binary 1 -#endif - -/* GL_ARM_rgba8 */ -#ifndef GL_ARM_rgba8 -#define GL_ARM_rgba8 1 -#endif - -/*------------------------------------------------------------------------* - * EXT extension functions - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#endif - -/* GL_EXT_color_buffer_half_float */ -#ifndef GL_EXT_color_buffer_half_float -#define GL_EXT_color_buffer_half_float 1 -#endif - -/* GL_EXT_debug_label */ -#ifndef GL_EXT_debug_label -#define GL_EXT_debug_label 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif -typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif - -/* GL_EXT_debug_marker */ -#ifndef GL_EXT_debug_marker -#define GL_EXT_debug_marker 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); -GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); -GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void); -#endif -typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); -#endif - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_EXT_discard_framebuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif -typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif - -#ifndef GL_EXT_disjoint_timer_query -#define GL_EXT_disjoint_timer_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids); -GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids); -GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id); -GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target); -GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target); -GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params); -#endif -typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids); -typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id); -typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id); -typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target); -typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params); -#endif /* GL_EXT_disjoint_timer_query */ - -#ifndef GL_EXT_draw_buffers -#define GL_EXT_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs); -#endif -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs); -#endif /* GL_EXT_draw_buffers */ - -/* GL_EXT_map_buffer_range */ -#ifndef GL_EXT_map_buffer_range -#define GL_EXT_map_buffer_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length); -#endif -typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); -#endif - -/* GL_EXT_multisampled_render_to_texture */ -#ifndef GL_EXT_multisampled_render_to_texture -#define GL_EXT_multisampled_render_to_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif - -/* GL_EXT_multiview_draw_buffers */ -#ifndef GL_EXT_multiview_draw_buffers -#define GL_EXT_multiview_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index); -GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices); -GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data); -#endif -typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index); -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices); -typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data); -#endif - -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); -#endif - -/* GL_EXT_occlusion_query_boolean */ -#ifndef GL_EXT_occlusion_query_boolean -#define GL_EXT_occlusion_query_boolean 1 -/* All entry points also exist in GL_EXT_disjoint_timer_query */ -#endif - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_EXT_read_format_bgra 1 -#endif - -/* GL_EXT_robustness */ -#ifndef GL_EXT_robustness -#define GL_EXT_robustness 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void); -GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); -GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params); -#endif -typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void); -typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -#endif - -/* GL_EXT_separate_shader_objects */ -#ifndef GL_EXT_separate_shader_objects -#define GL_EXT_separate_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program); -GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program); -GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings); -GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline); -GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines); -GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines); -GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline); -GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x); -GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y); -GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z); -GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x); -GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline); -GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -#endif -typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program); -typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings); -typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines); -typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines); -typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -#endif - -/* GL_EXT_shader_framebuffer_fetch */ -#ifndef GL_EXT_shader_framebuffer_fetch -#define GL_EXT_shader_framebuffer_fetch 1 -#endif - -/* GL_EXT_shader_texture_lod */ -#ifndef GL_EXT_shader_texture_lod -#define GL_EXT_shader_texture_lod 1 -#endif - -/* GL_EXT_shadow_samplers */ -#ifndef GL_EXT_shadow_samplers -#define GL_EXT_shadow_samplers 1 -#endif - -/* GL_EXT_sRGB */ -#ifndef GL_EXT_sRGB -#define GL_EXT_sRGB 1 -#endif - -/* GL_EXT_texture_compression_dxt1 */ -#ifndef GL_EXT_texture_compression_dxt1 -#define GL_EXT_texture_compression_dxt1 1 -#endif - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_EXT_texture_format_BGRA8888 1 -#endif - -/* GL_EXT_texture_rg */ -#ifndef GL_EXT_texture_rg -#define GL_EXT_texture_rg 1 -#endif - -/* GL_EXT_texture_storage */ -#ifndef GL_EXT_texture_storage -#define GL_EXT_texture_storage 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif - -/* GL_EXT_texture_type_2_10_10_10_REV */ -#ifndef GL_EXT_texture_type_2_10_10_10_REV -#define GL_EXT_texture_type_2_10_10_10_REV 1 -#endif - -/* GL_EXT_unpack_subimage */ -#ifndef GL_EXT_unpack_subimage -#define GL_EXT_unpack_subimage 1 -#endif - -/*------------------------------------------------------------------------* - * DMP extension functions - *------------------------------------------------------------------------*/ - -/* GL_DMP_shader_binary */ -#ifndef GL_DMP_shader_binary -#define GL_DMP_shader_binary 1 -#endif - -/*------------------------------------------------------------------------* - * FJ extension functions - *------------------------------------------------------------------------*/ - -/* GL_FJ_shader_binary_GCCSO */ -#ifndef GL_FJ_shader_binary_GCCSO -#define GL_FJ_shader_binary_GCCSO 1 -#endif - -/*------------------------------------------------------------------------* - * IMG extension functions - *------------------------------------------------------------------------*/ - -/* GL_IMG_program_binary */ -#ifndef GL_IMG_program_binary -#define GL_IMG_program_binary 1 -#endif - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_IMG_read_format 1 -#endif - -/* GL_IMG_shader_binary */ -#ifndef GL_IMG_shader_binary -#define GL_IMG_shader_binary 1 -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_IMG_texture_compression_pvrtc 1 -#endif - -/* GL_IMG_texture_compression_pvrtc2 */ -#ifndef GL_IMG_texture_compression_pvrtc2 -#define GL_IMG_texture_compression_pvrtc2 1 -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_IMG_multisampled_render_to_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif - -/*------------------------------------------------------------------------* - * NV extension functions - *------------------------------------------------------------------------*/ - -/* GL_NV_coverage_sample */ -#ifndef GL_NV_coverage_sample -#define GL_NV_coverage_sample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask); -GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation); -#endif -typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask); -typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation); -#endif - -/* GL_NV_depth_nonlinear */ -#ifndef GL_NV_depth_nonlinear -#define GL_NV_depth_nonlinear 1 -#endif - -/* GL_NV_draw_buffers */ -#ifndef GL_NV_draw_buffers -#define GL_NV_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs); -#endif -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs); -#endif - -/* GL_NV_draw_instanced */ -#ifndef GL_NV_draw_instanced -#define GL_NV_draw_instanced 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif - -/* GL_NV_fbo_color_attachments */ -#ifndef GL_NV_fbo_color_attachments -#define GL_NV_fbo_color_attachments 1 -#endif - -/* GL_NV_fence */ -#ifndef GL_NV_fence -#define GL_NV_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); -GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); -GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence); -GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence); -GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence); -GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition); -#endif -typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#endif - -/* GL_NV_framebuffer_blit */ -#ifndef GL_NV_framebuffer_blit -#define GL_NV_framebuffer_blit 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif - -/* GL_NV_framebuffer_multisample */ -#ifndef GL_NV_framebuffer_multisample -#define GL_NV_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif - -/* GL_NV_generate_mipmap_sRGB */ -#ifndef GL_NV_generate_mipmap_sRGB -#define GL_NV_generate_mipmap_sRGB 1 -#endif - -/* GL_NV_instanced_arrays */ -#ifndef GL_NV_instanced_arrays -#define GL_NV_instanced_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor); -#endif -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor); -#endif - -/* GL_NV_read_buffer */ -#ifndef GL_NV_read_buffer -#define GL_NV_read_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode); -#endif -typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode); -#endif - -/* GL_NV_read_buffer_front */ -#ifndef GL_NV_read_buffer_front -#define GL_NV_read_buffer_front 1 -#endif - -/* GL_NV_read_depth */ -#ifndef GL_NV_read_depth -#define GL_NV_read_depth 1 -#endif - -/* GL_NV_read_depth_stencil */ -#ifndef GL_NV_read_depth_stencil -#define GL_NV_read_depth_stencil 1 -#endif - -/* GL_NV_read_stencil */ -#ifndef GL_NV_read_stencil -#define GL_NV_read_stencil 1 -#endif - -/* GL_NV_shadow_samplers_array */ -#ifndef GL_NV_shadow_samplers_array -#define GL_NV_shadow_samplers_array 1 -#endif - -/* GL_NV_shadow_samplers_cube */ -#ifndef GL_NV_shadow_samplers_cube -#define GL_NV_shadow_samplers_cube 1 -#endif - -/* GL_NV_sRGB_formats */ -#ifndef GL_NV_sRGB_formats -#define GL_NV_sRGB_formats 1 -#endif - -/* GL_NV_texture_border_clamp */ -#ifndef GL_NV_texture_border_clamp -#define GL_NV_texture_border_clamp 1 -#endif - -/* GL_NV_texture_compression_s3tc_update */ -#ifndef GL_NV_texture_compression_s3tc_update -#define GL_NV_texture_compression_s3tc_update 1 -#endif - -/* GL_NV_texture_npot_2D_mipmap */ -#ifndef GL_NV_texture_npot_2D_mipmap -#define GL_NV_texture_npot_2D_mipmap 1 -#endif - -/*------------------------------------------------------------------------* - * QCOM extension functions - *------------------------------------------------------------------------*/ - -/* GL_QCOM_alpha_test */ -#ifndef GL_QCOM_alpha_test -#define GL_QCOM_alpha_test 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref); -#endif -typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref); -#endif - -/* GL_QCOM_binning_control */ -#ifndef GL_QCOM_binning_control -#define GL_QCOM_binning_control 1 -#endif - -/* GL_QCOM_driver_control */ -#ifndef GL_QCOM_driver_control -#define GL_QCOM_driver_control 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); -GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); -GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); -#endif -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -#endif - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_QCOM_extended_get 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); -GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); -#endif - -/* GL_QCOM_extended_get2 */ -#ifndef GL_QCOM_extended_get2 -#define GL_QCOM_extended_get2 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); -GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); -GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_QCOM_perfmon_global_mode 1 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_QCOM_writeonly_rendering 1 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_QCOM_tiled_rendering 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); -#endif -typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); -#endif - -/*------------------------------------------------------------------------* - * VIV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_VIV_shader_binary */ -#ifndef GL_VIV_shader_binary -#define GL_VIV_shader_binary 1 -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __gl2ext_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_opengles2_gl2platform.h b/Dependencies/SDL/Windows/include/SDL_opengles2_gl2platform.h deleted file mode 100644 index c325686..0000000 --- a/Dependencies/SDL/Windows/include/SDL_opengles2_gl2platform.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __gl2platform_h_ -#define __gl2platform_h_ - -/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "OpenGL-ES" component "Registry". - */ - -/*#include */ - -#ifndef GL_APICALL -#define GL_APICALL KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#endif /* __gl2platform_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_opengles2_khrplatform.h b/Dependencies/SDL/Windows/include/SDL_opengles2_khrplatform.h deleted file mode 100644 index c9e6f17..0000000 --- a/Dependencies/SDL/Windows/include/SDL_opengles2_khrplatform.h +++ /dev/null @@ -1,282 +0,0 @@ -#ifndef __khrplatform_h_ -#define __khrplatform_h_ - -/* -** Copyright (c) 2008-2009 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Khronos platform-specific types and definitions. - * - * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $ - * - * Adopters may modify this file to suit their platform. Adopters are - * encouraged to submit platform specific modifications to the Khronos - * group so that they can be included in future versions of this file. - * Please submit changes by sending them to the public Khronos Bugzilla - * (http://khronos.org/bugzilla) by filing a bug against product - * "Khronos (general)" component "Registry". - * - * A predefined template which fills in some of the bug fields can be - * reached using http://tinyurl.com/khrplatform-h-bugreport, but you - * must create a Bugzilla login first. - * - * - * See the Implementer's Guidelines for information about where this file - * should be located on your system and for more details of its use: - * http://www.khronos.org/registry/implementers_guide.pdf - * - * This file should be included as - * #include - * by Khronos client API header files that use its types and defines. - * - * The types in khrplatform.h should only be used to define API-specific types. - * - * Types defined in khrplatform.h: - * khronos_int8_t signed 8 bit - * khronos_uint8_t unsigned 8 bit - * khronos_int16_t signed 16 bit - * khronos_uint16_t unsigned 16 bit - * khronos_int32_t signed 32 bit - * khronos_uint32_t unsigned 32 bit - * khronos_int64_t signed 64 bit - * khronos_uint64_t unsigned 64 bit - * khronos_intptr_t signed same number of bits as a pointer - * khronos_uintptr_t unsigned same number of bits as a pointer - * khronos_ssize_t signed size - * khronos_usize_t unsigned size - * khronos_float_t signed 32 bit floating point - * khronos_time_ns_t unsigned 64 bit time in nanoseconds - * khronos_utime_nanoseconds_t unsigned time interval or absolute time in - * nanoseconds - * khronos_stime_nanoseconds_t signed time interval in nanoseconds - * khronos_boolean_enum_t enumerated boolean type. This should - * only be used as a base type when a client API's boolean type is - * an enum. Client APIs which use an integer or other type for - * booleans cannot use this as the base type for their boolean. - * - * Tokens defined in khrplatform.h: - * - * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. - * - * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. - * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. - * - * Calling convention macros defined in this file: - * KHRONOS_APICALL - * KHRONOS_APIENTRY - * KHRONOS_APIATTRIBUTES - * - * These may be used in function prototypes as: - * - * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( - * int arg1, - * int arg2) KHRONOS_APIATTRIBUTES; - */ - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APICALL - *------------------------------------------------------------------------- - * This precedes the return type of the function in the function prototype. - */ -#if defined(_WIN32) && !defined(__SCITECH_SNAP__) -# define KHRONOS_APICALL __declspec(dllimport) -#elif defined (__SYMBIAN32__) -# define KHRONOS_APICALL IMPORT_C -#else -# define KHRONOS_APICALL -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIENTRY - *------------------------------------------------------------------------- - * This follows the return type of the function and precedes the function - * name in the function prototype. - */ -#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) - /* Win32 but not WinCE */ -# define KHRONOS_APIENTRY __stdcall -#else -# define KHRONOS_APIENTRY -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIATTRIBUTES - *------------------------------------------------------------------------- - * This follows the closing parenthesis of the function prototype arguments. - */ -#if defined (__ARMCC_2__) -#define KHRONOS_APIATTRIBUTES __softfp -#else -#define KHRONOS_APIATTRIBUTES -#endif - -/*------------------------------------------------------------------------- - * basic type definitions - *-----------------------------------------------------------------------*/ -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) - - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__VMS ) || defined(__sgi) - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) - -/* - * Win32 - */ -typedef __int32 khronos_int32_t; -typedef unsigned __int32 khronos_uint32_t; -typedef __int64 khronos_int64_t; -typedef unsigned __int64 khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__sun__) || defined(__digital__) - -/* - * Sun or Digital - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#if defined(__arch64__) || defined(_LP64) -typedef long int khronos_int64_t; -typedef unsigned long int khronos_uint64_t; -#else -typedef long long int khronos_int64_t; -typedef unsigned long long int khronos_uint64_t; -#endif /* __arch64__ */ -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif 0 - -/* - * Hypothetical platform with no float or int64 support - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#define KHRONOS_SUPPORT_INT64 0 -#define KHRONOS_SUPPORT_FLOAT 0 - -#else - -/* - * Generic fallback - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#endif - - -/* - * Types that are (so far) the same on all platforms - */ -typedef signed char khronos_int8_t; -typedef unsigned char khronos_uint8_t; -typedef signed short int khronos_int16_t; -typedef unsigned short int khronos_uint16_t; - -/* - * Types that differ between LLP64 and LP64 architectures - in LLP64, - * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears - * to be the only LLP64 architecture in current use. - */ -#ifdef _WIN64 -typedef signed long long int khronos_intptr_t; -typedef unsigned long long int khronos_uintptr_t; -typedef signed long long int khronos_ssize_t; -typedef unsigned long long int khronos_usize_t; -#else -typedef signed long int khronos_intptr_t; -typedef unsigned long int khronos_uintptr_t; -typedef signed long int khronos_ssize_t; -typedef unsigned long int khronos_usize_t; -#endif - -#if KHRONOS_SUPPORT_FLOAT -/* - * Float type - */ -typedef float khronos_float_t; -#endif - -#if KHRONOS_SUPPORT_INT64 -/* Time types - * - * These types can be used to represent a time interval in nanoseconds or - * an absolute Unadjusted System Time. Unadjusted System Time is the number - * of nanoseconds since some arbitrary system event (e.g. since the last - * time the system booted). The Unadjusted System Time is an unsigned - * 64 bit value that wraps back to 0 every 584 years. Time intervals - * may be either signed or unsigned. - */ -typedef khronos_uint64_t khronos_utime_nanoseconds_t; -typedef khronos_int64_t khronos_stime_nanoseconds_t; -#endif - -/* - * Dummy value used to pad enum types to 32 bits. - */ -#ifndef KHRONOS_MAX_ENUM -#define KHRONOS_MAX_ENUM 0x7FFFFFFF -#endif - -/* - * Enumerated boolean type - * - * Values other than zero should be considered to be true. Therefore - * comparisons should not be made against KHRONOS_TRUE. - */ -typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM -} khronos_boolean_enum_t; - -#endif /* __khrplatform_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_pixels.h b/Dependencies/SDL/Windows/include/SDL_pixels.h deleted file mode 100644 index 1b119e4..0000000 --- a/Dependencies/SDL/Windows/include/SDL_pixels.h +++ /dev/null @@ -1,473 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_pixels.h - * - * Header for the enumerated pixel format definitions. - */ - -#ifndef SDL_pixels_h_ -#define SDL_pixels_h_ - -#include "SDL_stdinc.h" -#include "SDL_endian.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \name Transparency definitions - * - * These define alpha as the opacity of a surface. - */ -/* @{ */ -#define SDL_ALPHA_OPAQUE 255 -#define SDL_ALPHA_TRANSPARENT 0 -/* @} */ - -/** Pixel type. */ -typedef enum -{ - SDL_PIXELTYPE_UNKNOWN, - SDL_PIXELTYPE_INDEX1, - SDL_PIXELTYPE_INDEX4, - SDL_PIXELTYPE_INDEX8, - SDL_PIXELTYPE_PACKED8, - SDL_PIXELTYPE_PACKED16, - SDL_PIXELTYPE_PACKED32, - SDL_PIXELTYPE_ARRAYU8, - SDL_PIXELTYPE_ARRAYU16, - SDL_PIXELTYPE_ARRAYU32, - SDL_PIXELTYPE_ARRAYF16, - SDL_PIXELTYPE_ARRAYF32 -} SDL_PixelType; - -/** Bitmap pixel order, high bit -> low bit. */ -typedef enum -{ - SDL_BITMAPORDER_NONE, - SDL_BITMAPORDER_4321, - SDL_BITMAPORDER_1234 -} SDL_BitmapOrder; - -/** Packed component order, high bit -> low bit. */ -typedef enum -{ - SDL_PACKEDORDER_NONE, - SDL_PACKEDORDER_XRGB, - SDL_PACKEDORDER_RGBX, - SDL_PACKEDORDER_ARGB, - SDL_PACKEDORDER_RGBA, - SDL_PACKEDORDER_XBGR, - SDL_PACKEDORDER_BGRX, - SDL_PACKEDORDER_ABGR, - SDL_PACKEDORDER_BGRA -} SDL_PackedOrder; - -/** Array component order, low byte -> high byte. */ -/* !!! FIXME: in 2.1, make these not overlap differently with - !!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */ -typedef enum -{ - SDL_ARRAYORDER_NONE, - SDL_ARRAYORDER_RGB, - SDL_ARRAYORDER_RGBA, - SDL_ARRAYORDER_ARGB, - SDL_ARRAYORDER_BGR, - SDL_ARRAYORDER_BGRA, - SDL_ARRAYORDER_ABGR -} SDL_ArrayOrder; - -/** Packed component layout. */ -typedef enum -{ - SDL_PACKEDLAYOUT_NONE, - SDL_PACKEDLAYOUT_332, - SDL_PACKEDLAYOUT_4444, - SDL_PACKEDLAYOUT_1555, - SDL_PACKEDLAYOUT_5551, - SDL_PACKEDLAYOUT_565, - SDL_PACKEDLAYOUT_8888, - SDL_PACKEDLAYOUT_2101010, - SDL_PACKEDLAYOUT_1010102 -} SDL_PackedLayout; - -#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D) - -#define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \ - ((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \ - ((bits) << 8) | ((bytes) << 0)) - -#define SDL_PIXELFLAG(X) (((X) >> 28) & 0x0F) -#define SDL_PIXELTYPE(X) (((X) >> 24) & 0x0F) -#define SDL_PIXELORDER(X) (((X) >> 20) & 0x0F) -#define SDL_PIXELLAYOUT(X) (((X) >> 16) & 0x0F) -#define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF) -#define SDL_BYTESPERPIXEL(X) \ - (SDL_ISPIXELFORMAT_FOURCC(X) ? \ - ((((X) == SDL_PIXELFORMAT_YUY2) || \ - ((X) == SDL_PIXELFORMAT_UYVY) || \ - ((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF)) - -#define SDL_ISPIXELFORMAT_INDEXED(format) \ - (!SDL_ISPIXELFORMAT_FOURCC(format) && \ - ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \ - (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \ - (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8))) - -#define SDL_ISPIXELFORMAT_PACKED(format) \ - (!SDL_ISPIXELFORMAT_FOURCC(format) && \ - ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || \ - (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || \ - (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32))) - -#define SDL_ISPIXELFORMAT_ARRAY(format) \ - (!SDL_ISPIXELFORMAT_FOURCC(format) && \ - ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU8) || \ - (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU16) || \ - (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU32) || \ - (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \ - (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32))) - -#define SDL_ISPIXELFORMAT_ALPHA(format) \ - ((SDL_ISPIXELFORMAT_PACKED(format) && \ - ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \ - (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \ - (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \ - (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA))) || \ - (SDL_ISPIXELFORMAT_ARRAY(format) && \ - ((SDL_PIXELORDER(format) == SDL_ARRAYORDER_ARGB) || \ - (SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || \ - (SDL_PIXELORDER(format) == SDL_ARRAYORDER_ABGR) || \ - (SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA)))) - -/* The flag is set to 1 because 0x1? is not in the printable ASCII range */ -#define SDL_ISPIXELFORMAT_FOURCC(format) \ - ((format) && (SDL_PIXELFLAG(format) != 1)) - -/* Note: If you modify this list, update SDL_GetPixelFormatName() */ -typedef enum -{ - SDL_PIXELFORMAT_UNKNOWN, - SDL_PIXELFORMAT_INDEX1LSB = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0, - 1, 0), - SDL_PIXELFORMAT_INDEX1MSB = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0, - 1, 0), - SDL_PIXELFORMAT_INDEX4LSB = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0, - 4, 0), - SDL_PIXELFORMAT_INDEX4MSB = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0, - 4, 0), - SDL_PIXELFORMAT_INDEX8 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1), - SDL_PIXELFORMAT_RGB332 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB, - SDL_PACKEDLAYOUT_332, 8, 1), - SDL_PIXELFORMAT_RGB444 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, - SDL_PACKEDLAYOUT_4444, 12, 2), - SDL_PIXELFORMAT_BGR444 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, - SDL_PACKEDLAYOUT_4444, 12, 2), - SDL_PIXELFORMAT_RGB555 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, - SDL_PACKEDLAYOUT_1555, 15, 2), - SDL_PIXELFORMAT_BGR555 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, - SDL_PACKEDLAYOUT_1555, 15, 2), - SDL_PIXELFORMAT_ARGB4444 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB, - SDL_PACKEDLAYOUT_4444, 16, 2), - SDL_PIXELFORMAT_RGBA4444 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA, - SDL_PACKEDLAYOUT_4444, 16, 2), - SDL_PIXELFORMAT_ABGR4444 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR, - SDL_PACKEDLAYOUT_4444, 16, 2), - SDL_PIXELFORMAT_BGRA4444 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA, - SDL_PACKEDLAYOUT_4444, 16, 2), - SDL_PIXELFORMAT_ARGB1555 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB, - SDL_PACKEDLAYOUT_1555, 16, 2), - SDL_PIXELFORMAT_RGBA5551 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA, - SDL_PACKEDLAYOUT_5551, 16, 2), - SDL_PIXELFORMAT_ABGR1555 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR, - SDL_PACKEDLAYOUT_1555, 16, 2), - SDL_PIXELFORMAT_BGRA5551 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA, - SDL_PACKEDLAYOUT_5551, 16, 2), - SDL_PIXELFORMAT_RGB565 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, - SDL_PACKEDLAYOUT_565, 16, 2), - SDL_PIXELFORMAT_BGR565 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, - SDL_PACKEDLAYOUT_565, 16, 2), - SDL_PIXELFORMAT_RGB24 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0, - 24, 3), - SDL_PIXELFORMAT_BGR24 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0, - 24, 3), - SDL_PIXELFORMAT_RGB888 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB, - SDL_PACKEDLAYOUT_8888, 24, 4), - SDL_PIXELFORMAT_RGBX8888 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX, - SDL_PACKEDLAYOUT_8888, 24, 4), - SDL_PIXELFORMAT_BGR888 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR, - SDL_PACKEDLAYOUT_8888, 24, 4), - SDL_PIXELFORMAT_BGRX8888 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX, - SDL_PACKEDLAYOUT_8888, 24, 4), - SDL_PIXELFORMAT_ARGB8888 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB, - SDL_PACKEDLAYOUT_8888, 32, 4), - SDL_PIXELFORMAT_RGBA8888 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA, - SDL_PACKEDLAYOUT_8888, 32, 4), - SDL_PIXELFORMAT_ABGR8888 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR, - SDL_PACKEDLAYOUT_8888, 32, 4), - SDL_PIXELFORMAT_BGRA8888 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA, - SDL_PACKEDLAYOUT_8888, 32, 4), - SDL_PIXELFORMAT_ARGB2101010 = - SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB, - SDL_PACKEDLAYOUT_2101010, 32, 4), - - /* Aliases for RGBA byte arrays of color data, for the current platform */ -#if SDL_BYTEORDER == SDL_BIG_ENDIAN - SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888, - SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888, - SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888, - SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888, -#else - SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888, - SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888, - SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888, - SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888, -#endif - - SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */ - SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'), - SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */ - SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'), - SDL_PIXELFORMAT_YUY2 = /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */ - SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'), - SDL_PIXELFORMAT_UYVY = /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */ - SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'), - SDL_PIXELFORMAT_YVYU = /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */ - SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'), - SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */ - SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'), - SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */ - SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'), - SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */ - SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ') -} SDL_PixelFormatEnum; - -typedef struct SDL_Color -{ - Uint8 r; - Uint8 g; - Uint8 b; - Uint8 a; -} SDL_Color; -#define SDL_Colour SDL_Color - -typedef struct SDL_Palette -{ - int ncolors; - SDL_Color *colors; - Uint32 version; - int refcount; -} SDL_Palette; - -/** - * \note Everything in the pixel format structure is read-only. - */ -typedef struct SDL_PixelFormat -{ - Uint32 format; - SDL_Palette *palette; - Uint8 BitsPerPixel; - Uint8 BytesPerPixel; - Uint8 padding[2]; - Uint32 Rmask; - Uint32 Gmask; - Uint32 Bmask; - Uint32 Amask; - Uint8 Rloss; - Uint8 Gloss; - Uint8 Bloss; - Uint8 Aloss; - Uint8 Rshift; - Uint8 Gshift; - Uint8 Bshift; - Uint8 Ashift; - int refcount; - struct SDL_PixelFormat *next; -} SDL_PixelFormat; - -/** - * \brief Get the human readable name of a pixel format - */ -extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format); - -/** - * \brief Convert one of the enumerated pixel formats to a bpp and RGBA masks. - * - * \return SDL_TRUE, or SDL_FALSE if the conversion wasn't possible. - * - * \sa SDL_MasksToPixelFormatEnum() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format, - int *bpp, - Uint32 * Rmask, - Uint32 * Gmask, - Uint32 * Bmask, - Uint32 * Amask); - -/** - * \brief Convert a bpp and RGBA masks to an enumerated pixel format. - * - * \return The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion - * wasn't possible. - * - * \sa SDL_PixelFormatEnumToMasks() - */ -extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp, - Uint32 Rmask, - Uint32 Gmask, - Uint32 Bmask, - Uint32 Amask); - -/** - * \brief Create an SDL_PixelFormat structure from a pixel format enum. - */ -extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format); - -/** - * \brief Free an SDL_PixelFormat structure. - */ -extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format); - -/** - * \brief Create a palette structure with the specified number of color - * entries. - * - * \return A new palette, or NULL if there wasn't enough memory. - * - * \note The palette entries are initialized to white. - * - * \sa SDL_FreePalette() - */ -extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors); - -/** - * \brief Set the palette for a pixel format structure. - */ -extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format, - SDL_Palette *palette); - -/** - * \brief Set a range of colors in a palette. - * - * \param palette The palette to modify. - * \param colors An array of colors to copy into the palette. - * \param firstcolor The index of the first palette entry to modify. - * \param ncolors The number of entries to modify. - * - * \return 0 on success, or -1 if not all of the colors could be set. - */ -extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette, - const SDL_Color * colors, - int firstcolor, int ncolors); - -/** - * \brief Free a palette created with SDL_AllocPalette(). - * - * \sa SDL_AllocPalette() - */ -extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette); - -/** - * \brief Maps an RGB triple to an opaque pixel value for a given pixel format. - * - * \sa SDL_MapRGBA - */ -extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format, - Uint8 r, Uint8 g, Uint8 b); - -/** - * \brief Maps an RGBA quadruple to a pixel value for a given pixel format. - * - * \sa SDL_MapRGB - */ -extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format, - Uint8 r, Uint8 g, Uint8 b, - Uint8 a); - -/** - * \brief Get the RGB components from a pixel of the specified format. - * - * \sa SDL_GetRGBA - */ -extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, - const SDL_PixelFormat * format, - Uint8 * r, Uint8 * g, Uint8 * b); - -/** - * \brief Get the RGBA components from a pixel of the specified format. - * - * \sa SDL_GetRGB - */ -extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel, - const SDL_PixelFormat * format, - Uint8 * r, Uint8 * g, Uint8 * b, - Uint8 * a); - -/** - * \brief Calculate a 256 entry gamma ramp for a gamma value. - */ -extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_pixels_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_platform.h b/Dependencies/SDL/Windows/include/SDL_platform.h deleted file mode 100644 index 7166557..0000000 --- a/Dependencies/SDL/Windows/include/SDL_platform.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_platform.h - * - * Try to get a standard set of platform defines. - */ - -#ifndef SDL_platform_h_ -#define SDL_platform_h_ - -#if defined(_AIX) -#undef __AIX__ -#define __AIX__ 1 -#endif -#if defined(__HAIKU__) -#undef __HAIKU__ -#define __HAIKU__ 1 -#endif -#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__) -#undef __BSDI__ -#define __BSDI__ 1 -#endif -#if defined(_arch_dreamcast) -#undef __DREAMCAST__ -#define __DREAMCAST__ 1 -#endif -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -#undef __FREEBSD__ -#define __FREEBSD__ 1 -#endif -#if defined(hpux) || defined(__hpux) || defined(__hpux__) -#undef __HPUX__ -#define __HPUX__ 1 -#endif -#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE) -#undef __IRIX__ -#define __IRIX__ 1 -#endif -#if (defined(linux) || defined(__linux) || defined(__linux__)) -#undef __LINUX__ -#define __LINUX__ 1 -#endif -#if defined(ANDROID) || defined(__ANDROID__) -#undef __ANDROID__ -#undef __LINUX__ /* do we need to do this? */ -#define __ANDROID__ 1 -#endif - -#if defined(__APPLE__) -/* lets us know what version of Mac OS X we're compiling on */ -#include "AvailabilityMacros.h" -#include "TargetConditionals.h" -#if TARGET_OS_TV -#undef __TVOS__ -#define __TVOS__ 1 -#endif -#if TARGET_OS_IPHONE -/* if compiling for iOS */ -#undef __IPHONEOS__ -#define __IPHONEOS__ 1 -#undef __MACOSX__ -#else -/* if not compiling for iOS */ -#undef __MACOSX__ -#define __MACOSX__ 1 -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 -# error SDL for Mac OS X only supports deploying on 10.6 and above. -#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */ -#endif /* TARGET_OS_IPHONE */ -#endif /* defined(__APPLE__) */ - -#if defined(__NetBSD__) -#undef __NETBSD__ -#define __NETBSD__ 1 -#endif -#if defined(__OpenBSD__) -#undef __OPENBSD__ -#define __OPENBSD__ 1 -#endif -#if defined(__OS2__) || defined(__EMX__) -#undef __OS2__ -#define __OS2__ 1 -#endif -#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE) -#undef __OSF__ -#define __OSF__ 1 -#endif -#if defined(__QNXNTO__) -#undef __QNXNTO__ -#define __QNXNTO__ 1 -#endif -#if defined(riscos) || defined(__riscos) || defined(__riscos__) -#undef __RISCOS__ -#define __RISCOS__ 1 -#endif -#if defined(__sun) && defined(__SVR4) -#undef __SOLARIS__ -#define __SOLARIS__ 1 -#endif - -#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) -/* Try to find out if we're compiling for WinRT or non-WinRT */ -#if defined(_MSC_VER) && defined(__has_include) -#if __has_include() -#define HAVE_WINAPIFAMILY_H 1 -#else -#define HAVE_WINAPIFAMILY_H 0 -#endif - -/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */ -#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */ -#define HAVE_WINAPIFAMILY_H 1 -#else -#define HAVE_WINAPIFAMILY_H 0 -#endif - -#if HAVE_WINAPIFAMILY_H -#include -#define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)) -#else -#define WINAPI_FAMILY_WINRT 0 -#endif /* HAVE_WINAPIFAMILY_H */ - -#if WINAPI_FAMILY_WINRT -#undef __WINRT__ -#define __WINRT__ 1 -#else -#undef __WINDOWS__ -#define __WINDOWS__ 1 -#endif -#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */ - -#if defined(__WINDOWS__) -#undef __WIN32__ -#define __WIN32__ 1 -#endif -#if defined(__PSP__) -#undef __PSP__ -#define __PSP__ 1 -#endif - -/* The NACL compiler defines __native_client__ and __pnacl__ - * Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi - */ -#if defined(__native_client__) -#undef __LINUX__ -#undef __NACL__ -#define __NACL__ 1 -#endif -#if defined(__pnacl__) -#undef __LINUX__ -#undef __PNACL__ -#define __PNACL__ 1 -/* PNACL with newlib supports static linking only */ -#define __SDL_NOGETPROCADDR__ -#endif - - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Gets the name of the platform. - */ -extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_platform_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_power.h b/Dependencies/SDL/Windows/include/SDL_power.h deleted file mode 100644 index 39884cc..0000000 --- a/Dependencies/SDL/Windows/include/SDL_power.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -#ifndef SDL_power_h_ -#define SDL_power_h_ - -/** - * \file SDL_power.h - * - * Header for the SDL power management routines. - */ - -#include "SDL_stdinc.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief The basic state for the system's power supply. - */ -typedef enum -{ - SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */ - SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ - SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ - SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */ - SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ -} SDL_PowerState; - - -/** - * \brief Get the current power supply details. - * - * \param secs Seconds of battery life left. You can pass a NULL here if - * you don't care. Will return -1 if we can't determine a - * value, or we're not running on a battery. - * - * \param pct Percentage of battery life left, between 0 and 100. You can - * pass a NULL here if you don't care. Will return -1 if we - * can't determine a value, or we're not running on a battery. - * - * \return The state of the battery (if any). - */ -extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_power_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_quit.h b/Dependencies/SDL/Windows/include/SDL_quit.h deleted file mode 100644 index b2bd5da..0000000 --- a/Dependencies/SDL/Windows/include/SDL_quit.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_quit.h - * - * Include file for SDL quit event handling. - */ - -#ifndef SDL_quit_h_ -#define SDL_quit_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -/** - * \file SDL_quit.h - * - * An ::SDL_QUIT event is generated when the user tries to close the application - * window. If it is ignored or filtered out, the window will remain open. - * If it is not ignored or filtered, it is queued normally and the window - * is allowed to close. When the window is closed, screen updates will - * complete, but have no effect. - * - * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) - * and SIGTERM (system termination request), if handlers do not already - * exist, that generate ::SDL_QUIT events as well. There is no way - * to determine the cause of an ::SDL_QUIT event, but setting a signal - * handler in your application will override the default generation of - * quit events for that signal. - * - * \sa SDL_Quit() - */ - -/* There are no functions directly affecting the quit event */ - -#define SDL_QuitRequested() \ - (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) - -#endif /* SDL_quit_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_rect.h b/Dependencies/SDL/Windows/include/SDL_rect.h deleted file mode 100644 index 47f0d20..0000000 --- a/Dependencies/SDL/Windows/include/SDL_rect.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_rect.h - * - * Header file for SDL_rect definition and management functions. - */ - -#ifndef SDL_rect_h_ -#define SDL_rect_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_pixels.h" -#include "SDL_rwops.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief The structure that defines a point (integer) - * - * \sa SDL_EnclosePoints - * \sa SDL_PointInRect - */ -typedef struct SDL_Point -{ - int x; - int y; -} SDL_Point; - -/** - * \brief The structure that defines a point (floating point) - * - * \sa SDL_EnclosePoints - * \sa SDL_PointInRect - */ -typedef struct SDL_FPoint -{ - float x; - float y; -} SDL_FPoint; - - -/** - * \brief A rectangle, with the origin at the upper left (integer). - * - * \sa SDL_RectEmpty - * \sa SDL_RectEquals - * \sa SDL_HasIntersection - * \sa SDL_IntersectRect - * \sa SDL_UnionRect - * \sa SDL_EnclosePoints - */ -typedef struct SDL_Rect -{ - int x, y; - int w, h; -} SDL_Rect; - - -/** - * \brief A rectangle, with the origin at the upper left (floating point). - */ -typedef struct SDL_FRect -{ - float x; - float y; - float w; - float h; -} SDL_FRect; - - -/** - * \brief Returns true if point resides inside a rectangle. - */ -SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r) -{ - return ( (p->x >= r->x) && (p->x < (r->x + r->w)) && - (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE; -} - -/** - * \brief Returns true if the rectangle has no area. - */ -SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r) -{ - return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE; -} - -/** - * \brief Returns true if the two rectangles are equal. - */ -SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b) -{ - return (a && b && (a->x == b->x) && (a->y == b->y) && - (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE; -} - -/** - * \brief Determine whether two rectangles intersect. - * - * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A, - const SDL_Rect * B); - -/** - * \brief Calculate the intersection of two rectangles. - * - * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A, - const SDL_Rect * B, - SDL_Rect * result); - -/** - * \brief Calculate the union of two rectangles. - */ -extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A, - const SDL_Rect * B, - SDL_Rect * result); - -/** - * \brief Calculate a minimal rectangle enclosing a set of points - * - * \return SDL_TRUE if any points were within the clipping rect - */ -extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points, - int count, - const SDL_Rect * clip, - SDL_Rect * result); - -/** - * \brief Calculate the intersection of a rectangle and line segment. - * - * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect * - rect, int *X1, - int *Y1, int *X2, - int *Y2); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_rect_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_render.h b/Dependencies/SDL/Windows/include/SDL_render.h deleted file mode 100644 index f26fb7e..0000000 --- a/Dependencies/SDL/Windows/include/SDL_render.h +++ /dev/null @@ -1,1158 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_render.h - * - * Header file for SDL 2D rendering functions. - * - * This API supports the following features: - * * single pixel points - * * single pixel lines - * * filled rectangles - * * texture images - * - * The primitives may be drawn in opaque, blended, or additive modes. - * - * The texture images may be drawn in opaque, blended, or additive modes. - * They can have an additional color tint or alpha modulation applied to - * them, and may also be stretched with linear interpolation. - * - * This API is designed to accelerate simple 2D operations. You may - * want more functionality such as polygons and particle effects and - * in that case you should use SDL's OpenGL/Direct3D support or one - * of the many good 3D engines. - * - * These functions must be called from the main thread. - * See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995 - */ - -#ifndef SDL_render_h_ -#define SDL_render_h_ - -#include "SDL_stdinc.h" -#include "SDL_rect.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Flags used when creating a rendering context - */ -typedef enum -{ - SDL_RENDERER_SOFTWARE = 0x00000001, /**< The renderer is a software fallback */ - SDL_RENDERER_ACCELERATED = 0x00000002, /**< The renderer uses hardware - acceleration */ - SDL_RENDERER_PRESENTVSYNC = 0x00000004, /**< Present is synchronized - with the refresh rate */ - SDL_RENDERER_TARGETTEXTURE = 0x00000008 /**< The renderer supports - rendering to texture */ -} SDL_RendererFlags; - -/** - * \brief Information on the capabilities of a render driver or context. - */ -typedef struct SDL_RendererInfo -{ - const char *name; /**< The name of the renderer */ - Uint32 flags; /**< Supported ::SDL_RendererFlags */ - Uint32 num_texture_formats; /**< The number of available texture formats */ - Uint32 texture_formats[16]; /**< The available texture formats */ - int max_texture_width; /**< The maximum texture width */ - int max_texture_height; /**< The maximum texture height */ -} SDL_RendererInfo; - -/** - * \brief The scaling mode for a texture. - */ -typedef enum -{ - SDL_ScaleModeNearest, /**< nearest pixel sampling */ - SDL_ScaleModeLinear, /**< linear filtering */ - SDL_ScaleModeBest /**< anisotropic filtering */ -} SDL_ScaleMode; - -/** - * \brief The access pattern allowed for a texture. - */ -typedef enum -{ - SDL_TEXTUREACCESS_STATIC, /**< Changes rarely, not lockable */ - SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */ - SDL_TEXTUREACCESS_TARGET /**< Texture can be used as a render target */ -} SDL_TextureAccess; - -/** - * \brief The texture channel modulation used in SDL_RenderCopy(). - */ -typedef enum -{ - SDL_TEXTUREMODULATE_NONE = 0x00000000, /**< No modulation */ - SDL_TEXTUREMODULATE_COLOR = 0x00000001, /**< srcC = srcC * color */ - SDL_TEXTUREMODULATE_ALPHA = 0x00000002 /**< srcA = srcA * alpha */ -} SDL_TextureModulate; - -/** - * \brief Flip constants for SDL_RenderCopyEx - */ -typedef enum -{ - SDL_FLIP_NONE = 0x00000000, /**< Do not flip */ - SDL_FLIP_HORIZONTAL = 0x00000001, /**< flip horizontally */ - SDL_FLIP_VERTICAL = 0x00000002 /**< flip vertically */ -} SDL_RendererFlip; - -/** - * \brief A structure representing rendering state - */ -struct SDL_Renderer; -typedef struct SDL_Renderer SDL_Renderer; - -/** - * \brief An efficient driver-specific representation of pixel data - */ -struct SDL_Texture; -typedef struct SDL_Texture SDL_Texture; - - -/* Function prototypes */ - -/** - * \brief Get the number of 2D rendering drivers available for the current - * display. - * - * A render driver is a set of code that handles rendering and texture - * management on a particular display. Normally there is only one, but - * some drivers may have several available with different capabilities. - * - * \sa SDL_GetRenderDriverInfo() - * \sa SDL_CreateRenderer() - */ -extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void); - -/** - * \brief Get information about a specific 2D rendering driver for the current - * display. - * - * \param index The index of the driver to query information about. - * \param info A pointer to an SDL_RendererInfo struct to be filled with - * information on the rendering driver. - * - * \return 0 on success, -1 if the index was out of range. - * - * \sa SDL_CreateRenderer() - */ -extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index, - SDL_RendererInfo * info); - -/** - * \brief Create a window and default renderer - * - * \param width The width of the window - * \param height The height of the window - * \param window_flags The flags used to create the window - * \param window A pointer filled with the window, or NULL on error - * \param renderer A pointer filled with the renderer, or NULL on error - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer( - int width, int height, Uint32 window_flags, - SDL_Window **window, SDL_Renderer **renderer); - - -/** - * \brief Create a 2D rendering context for a window. - * - * \param window The window where rendering is displayed. - * \param index The index of the rendering driver to initialize, or -1 to - * initialize the first one supporting the requested flags. - * \param flags ::SDL_RendererFlags. - * - * \return A valid rendering context or NULL if there was an error. - * - * \sa SDL_CreateSoftwareRenderer() - * \sa SDL_GetRendererInfo() - * \sa SDL_DestroyRenderer() - */ -extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window, - int index, Uint32 flags); - -/** - * \brief Create a 2D software rendering context for a surface. - * - * \param surface The surface where rendering is done. - * - * \return A valid rendering context or NULL if there was an error. - * - * \sa SDL_CreateRenderer() - * \sa SDL_DestroyRenderer() - */ -extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface); - -/** - * \brief Get the renderer associated with a window. - */ -extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window); - -/** - * \brief Get information about a rendering context. - */ -extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer, - SDL_RendererInfo * info); - -/** - * \brief Get the output size in pixels of a rendering context. - */ -extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer, - int *w, int *h); - -/** - * \brief Create a texture for a rendering context. - * - * \param renderer The renderer. - * \param format The format of the texture. - * \param access One of the enumerated values in ::SDL_TextureAccess. - * \param w The width of the texture in pixels. - * \param h The height of the texture in pixels. - * - * \return The created texture is returned, or NULL if no rendering context was - * active, the format was unsupported, or the width or height were out - * of range. - * - * \note The contents of the texture are not defined at creation. - * - * \sa SDL_QueryTexture() - * \sa SDL_UpdateTexture() - * \sa SDL_DestroyTexture() - */ -extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer, - Uint32 format, - int access, int w, - int h); - -/** - * \brief Create a texture from an existing surface. - * - * \param renderer The renderer. - * \param surface The surface containing pixel data used to fill the texture. - * - * \return The created texture is returned, or NULL on error. - * - * \note The surface is not modified or freed by this function. - * - * \sa SDL_QueryTexture() - * \sa SDL_DestroyTexture() - */ -extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface); - -/** - * \brief Query the attributes of a texture - * - * \param texture A texture to be queried. - * \param format A pointer filled in with the raw format of the texture. The - * actual format may differ, but pixel transfers will use this - * format. - * \param access A pointer filled in with the actual access to the texture. - * \param w A pointer filled in with the width of the texture in pixels. - * \param h A pointer filled in with the height of the texture in pixels. - * - * \return 0 on success, or -1 if the texture is not valid. - */ -extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture, - Uint32 * format, int *access, - int *w, int *h); - -/** - * \brief Set an additional color value used in render copy operations. - * - * \param texture The texture to update. - * \param r The red color value multiplied into copy operations. - * \param g The green color value multiplied into copy operations. - * \param b The blue color value multiplied into copy operations. - * - * \return 0 on success, or -1 if the texture is not valid or color modulation - * is not supported. - * - * \sa SDL_GetTextureColorMod() - */ -extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture, - Uint8 r, Uint8 g, Uint8 b); - - -/** - * \brief Get the additional color value used in render copy operations. - * - * \param texture The texture to query. - * \param r A pointer filled in with the current red color value. - * \param g A pointer filled in with the current green color value. - * \param b A pointer filled in with the current blue color value. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \sa SDL_SetTextureColorMod() - */ -extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture, - Uint8 * r, Uint8 * g, - Uint8 * b); - -/** - * \brief Set an additional alpha value used in render copy operations. - * - * \param texture The texture to update. - * \param alpha The alpha value multiplied into copy operations. - * - * \return 0 on success, or -1 if the texture is not valid or alpha modulation - * is not supported. - * - * \sa SDL_GetTextureAlphaMod() - */ -extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture, - Uint8 alpha); - -/** - * \brief Get the additional alpha value used in render copy operations. - * - * \param texture The texture to query. - * \param alpha A pointer filled in with the current alpha value. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \sa SDL_SetTextureAlphaMod() - */ -extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture, - Uint8 * alpha); - -/** - * \brief Set the blend mode used for texture copy operations. - * - * \param texture The texture to update. - * \param blendMode ::SDL_BlendMode to use for texture blending. - * - * \return 0 on success, or -1 if the texture is not valid or the blend mode is - * not supported. - * - * \note If the blend mode is not supported, the closest supported mode is - * chosen. - * - * \sa SDL_GetTextureBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture, - SDL_BlendMode blendMode); - -/** - * \brief Get the blend mode used for texture copy operations. - * - * \param texture The texture to query. - * \param blendMode A pointer filled in with the current blend mode. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \sa SDL_SetTextureBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture, - SDL_BlendMode *blendMode); - -/** - * \brief Set the scale mode used for texture scale operations. - * - * \param texture The texture to update. - * \param scaleMode ::SDL_ScaleMode to use for texture scaling. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \note If the scale mode is not supported, the closest supported mode is - * chosen. - * - * \sa SDL_GetTextureScaleMode() - */ -extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture, - SDL_ScaleMode scaleMode); - -/** - * \brief Get the scale mode used for texture scale operations. - * - * \param texture The texture to query. - * \param scaleMode A pointer filled in with the current scale mode. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \sa SDL_SetTextureScaleMode() - */ -extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture, - SDL_ScaleMode *scaleMode); - -/** - * \brief Update the given texture rectangle with new pixel data. - * - * \param texture The texture to update - * \param rect A pointer to the rectangle of pixels to update, or NULL to - * update the entire texture. - * \param pixels The raw pixel data in the format of the texture. - * \param pitch The number of bytes in a row of pixel data, including padding between lines. - * - * The pixel data must be in the format of the texture. The pixel format can be - * queried with SDL_QueryTexture. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \note This is a fairly slow function. - */ -extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture, - const SDL_Rect * rect, - const void *pixels, int pitch); - -/** - * \brief Update a rectangle within a planar YV12 or IYUV texture with new pixel data. - * - * \param texture The texture to update - * \param rect A pointer to the rectangle of pixels to update, or NULL to - * update the entire texture. - * \param Yplane The raw pixel data for the Y plane. - * \param Ypitch The number of bytes between rows of pixel data for the Y plane. - * \param Uplane The raw pixel data for the U plane. - * \param Upitch The number of bytes between rows of pixel data for the U plane. - * \param Vplane The raw pixel data for the V plane. - * \param Vpitch The number of bytes between rows of pixel data for the V plane. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \note You can use SDL_UpdateTexture() as long as your pixel data is - * a contiguous block of Y and U/V planes in the proper order, but - * this function is available if your pixel data is not contiguous. - */ -extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *Uplane, int Upitch, - const Uint8 *Vplane, int Vpitch); - -/** - * \brief Lock a portion of the texture for write-only pixel access. - * - * \param texture The texture to lock for access, which was created with - * ::SDL_TEXTUREACCESS_STREAMING. - * \param rect A pointer to the rectangle to lock for access. If the rect - * is NULL, the entire texture will be locked. - * \param pixels This is filled in with a pointer to the locked pixels, - * appropriately offset by the locked area. - * \param pitch This is filled in with the pitch of the locked pixels. - * - * \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING. - * - * \sa SDL_UnlockTexture() - */ -extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture, - const SDL_Rect * rect, - void **pixels, int *pitch); - -/** - * \brief Lock a portion of the texture for write-only pixel access. - * Expose it as a SDL surface. - * - * \param texture The texture to lock for access, which was created with - * ::SDL_TEXTUREACCESS_STREAMING. - * \param rect A pointer to the rectangle to lock for access. If the rect - * is NULL, the entire texture will be locked. - * \param surface This is filled in with a SDL surface representing the locked area - * Surface is freed internally after calling SDL_UnlockTexture or SDL_DestroyTexture. - * - * \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING. - * - * \sa SDL_UnlockTexture() - */ -extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture, - const SDL_Rect *rect, - SDL_Surface **surface); - -/** - * \brief Unlock a texture, uploading the changes to video memory, if needed. - * If SDL_LockTextureToSurface() was called for locking, the SDL surface is freed. - * - * \sa SDL_LockTexture() - * \sa SDL_LockTextureToSurface() - */ -extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture); - -/** - * \brief Determines whether a window supports the use of render targets - * - * \param renderer The renderer that will be checked - * - * \return SDL_TRUE if supported, SDL_FALSE if not. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer); - -/** - * \brief Set a texture as the current rendering target. - * - * \param renderer The renderer. - * \param texture The targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target - * - * \return 0 on success, or -1 on error - * - * \sa SDL_GetRenderTarget() - */ -extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer, - SDL_Texture *texture); - -/** - * \brief Get the current render target or NULL for the default render target. - * - * \return The current render target - * - * \sa SDL_SetRenderTarget() - */ -extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer); - -/** - * \brief Set device independent resolution for rendering - * - * \param renderer The renderer for which resolution should be set. - * \param w The width of the logical resolution - * \param h The height of the logical resolution - * - * This function uses the viewport and scaling functionality to allow a fixed logical - * resolution for rendering, regardless of the actual output resolution. If the actual - * output resolution doesn't have the same aspect ratio the output rendering will be - * centered within the output display. - * - * If the output display is a window, mouse events in the window will be filtered - * and scaled so they seem to arrive within the logical resolution. - * - * \note If this function results in scaling or subpixel drawing by the - * rendering backend, it will be handled using the appropriate - * quality hints. - * - * \sa SDL_RenderGetLogicalSize() - * \sa SDL_RenderSetScale() - * \sa SDL_RenderSetViewport() - */ -extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h); - -/** - * \brief Get device independent resolution for rendering - * - * \param renderer The renderer from which resolution should be queried. - * \param w A pointer filled with the width of the logical resolution - * \param h A pointer filled with the height of the logical resolution - * - * \sa SDL_RenderSetLogicalSize() - */ -extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h); - -/** - * \brief Set whether to force integer scales for resolution-independent rendering - * - * \param renderer The renderer for which integer scaling should be set. - * \param enable Enable or disable integer scaling - * - * This function restricts the logical viewport to integer values - that is, when - * a resolution is between two multiples of a logical size, the viewport size is - * rounded down to the lower multiple. - * - * \sa SDL_RenderSetLogicalSize() - */ -extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer, - SDL_bool enable); - -/** - * \brief Get whether integer scales are forced for resolution-independent rendering - * - * \param renderer The renderer from which integer scaling should be queried. - * - * \sa SDL_RenderSetIntegerScale() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer); - -/** - * \brief Set the drawing area for rendering on the current target. - * - * \param renderer The renderer for which the drawing area should be set. - * \param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target. - * - * The x,y of the viewport rect represents the origin for rendering. - * - * \return 0 on success, or -1 on error - * - * \note If the window associated with the renderer is resized, the viewport is automatically reset. - * - * \sa SDL_RenderGetViewport() - * \sa SDL_RenderSetLogicalSize() - */ -extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer, - const SDL_Rect * rect); - -/** - * \brief Get the drawing area for the current target. - * - * \sa SDL_RenderSetViewport() - */ -extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer, - SDL_Rect * rect); - -/** - * \brief Set the clip rectangle for the current target. - * - * \param renderer The renderer for which clip rectangle should be set. - * \param rect A pointer to the rectangle to set as the clip rectangle, - * relative to the viewport, or NULL to disable clipping. - * - * \return 0 on success, or -1 on error - * - * \sa SDL_RenderGetClipRect() - */ -extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer, - const SDL_Rect * rect); - -/** - * \brief Get the clip rectangle for the current target. - * - * \param renderer The renderer from which clip rectangle should be queried. - * \param rect A pointer filled in with the current clip rectangle, or - * an empty rectangle if clipping is disabled. - * - * \sa SDL_RenderSetClipRect() - */ -extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer, - SDL_Rect * rect); - -/** - * \brief Get whether clipping is enabled on the given renderer. - * - * \param renderer The renderer from which clip state should be queried. - * - * \sa SDL_RenderGetClipRect() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer); - - -/** - * \brief Set the drawing scale for rendering on the current target. - * - * \param renderer The renderer for which the drawing scale should be set. - * \param scaleX The horizontal scaling factor - * \param scaleY The vertical scaling factor - * - * The drawing coordinates are scaled by the x/y scaling factors - * before they are used by the renderer. This allows resolution - * independent drawing with a single coordinate system. - * - * \note If this results in scaling or subpixel drawing by the - * rendering backend, it will be handled using the appropriate - * quality hints. For best results use integer scaling factors. - * - * \sa SDL_RenderGetScale() - * \sa SDL_RenderSetLogicalSize() - */ -extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer, - float scaleX, float scaleY); - -/** - * \brief Get the drawing scale for the current target. - * - * \param renderer The renderer from which drawing scale should be queried. - * \param scaleX A pointer filled in with the horizontal scaling factor - * \param scaleY A pointer filled in with the vertical scaling factor - * - * \sa SDL_RenderSetScale() - */ -extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer, - float *scaleX, float *scaleY); - -/** - * \brief Set the color used for drawing operations (Rect, Line and Clear). - * - * \param renderer The renderer for which drawing color should be set. - * \param r The red value used to draw on the rendering target. - * \param g The green value used to draw on the rendering target. - * \param b The blue value used to draw on the rendering target. - * \param a The alpha value used to draw on the rendering target, usually - * ::SDL_ALPHA_OPAQUE (255). - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer, - Uint8 r, Uint8 g, Uint8 b, - Uint8 a); - -/** - * \brief Get the color used for drawing operations (Rect, Line and Clear). - * - * \param renderer The renderer from which drawing color should be queried. - * \param r A pointer to the red value used to draw on the rendering target. - * \param g A pointer to the green value used to draw on the rendering target. - * \param b A pointer to the blue value used to draw on the rendering target. - * \param a A pointer to the alpha value used to draw on the rendering target, - * usually ::SDL_ALPHA_OPAQUE (255). - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer, - Uint8 * r, Uint8 * g, Uint8 * b, - Uint8 * a); - -/** - * \brief Set the blend mode used for drawing operations (Fill and Line). - * - * \param renderer The renderer for which blend mode should be set. - * \param blendMode ::SDL_BlendMode to use for blending. - * - * \return 0 on success, or -1 on error - * - * \note If the blend mode is not supported, the closest supported mode is - * chosen. - * - * \sa SDL_GetRenderDrawBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, - SDL_BlendMode blendMode); - -/** - * \brief Get the blend mode used for drawing operations. - * - * \param renderer The renderer from which blend mode should be queried. - * \param blendMode A pointer filled in with the current blend mode. - * - * \return 0 on success, or -1 on error - * - * \sa SDL_SetRenderDrawBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer, - SDL_BlendMode *blendMode); - -/** - * \brief Clear the current rendering target with the drawing color - * - * This function clears the entire rendering target, ignoring the viewport and - * the clip rectangle. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer); - -/** - * \brief Draw a point on the current rendering target. - * - * \param renderer The renderer which should draw a point. - * \param x The x coordinate of the point. - * \param y The y coordinate of the point. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer, - int x, int y); - -/** - * \brief Draw multiple points on the current rendering target. - * - * \param renderer The renderer which should draw multiple points. - * \param points The points to draw - * \param count The number of points to draw - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer, - const SDL_Point * points, - int count); - -/** - * \brief Draw a line on the current rendering target. - * - * \param renderer The renderer which should draw a line. - * \param x1 The x coordinate of the start point. - * \param y1 The y coordinate of the start point. - * \param x2 The x coordinate of the end point. - * \param y2 The y coordinate of the end point. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer, - int x1, int y1, int x2, int y2); - -/** - * \brief Draw a series of connected lines on the current rendering target. - * - * \param renderer The renderer which should draw multiple lines. - * \param points The points along the lines - * \param count The number of points, drawing count-1 lines - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer, - const SDL_Point * points, - int count); - -/** - * \brief Draw a rectangle on the current rendering target. - * - * \param renderer The renderer which should draw a rectangle. - * \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer, - const SDL_Rect * rect); - -/** - * \brief Draw some number of rectangles on the current rendering target. - * - * \param renderer The renderer which should draw multiple rectangles. - * \param rects A pointer to an array of destination rectangles. - * \param count The number of rectangles. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer, - const SDL_Rect * rects, - int count); - -/** - * \brief Fill a rectangle on the current rendering target with the drawing color. - * - * \param renderer The renderer which should fill a rectangle. - * \param rect A pointer to the destination rectangle, or NULL for the entire - * rendering target. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer, - const SDL_Rect * rect); - -/** - * \brief Fill some number of rectangles on the current rendering target with the drawing color. - * - * \param renderer The renderer which should fill multiple rectangles. - * \param rects A pointer to an array of destination rectangles. - * \param count The number of rectangles. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer, - const SDL_Rect * rects, - int count); - -/** - * \brief Copy a portion of the texture to the current rendering target. - * - * \param renderer The renderer which should copy parts of a texture. - * \param texture The source texture. - * \param srcrect A pointer to the source rectangle, or NULL for the entire - * texture. - * \param dstrect A pointer to the destination rectangle, or NULL for the - * entire rendering target. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, - SDL_Texture * texture, - const SDL_Rect * srcrect, - const SDL_Rect * dstrect); - -/** - * \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center - * - * \param renderer The renderer which should copy parts of a texture. - * \param texture The source texture. - * \param srcrect A pointer to the source rectangle, or NULL for the entire - * texture. - * \param dstrect A pointer to the destination rectangle, or NULL for the - * entire rendering target. - * \param angle An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction - * \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2). - * \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer, - SDL_Texture * texture, - const SDL_Rect * srcrect, - const SDL_Rect * dstrect, - const double angle, - const SDL_Point *center, - const SDL_RendererFlip flip); - - -/** - * \brief Draw a point on the current rendering target. - * - * \param renderer The renderer which should draw a point. - * \param x The x coordinate of the point. - * \param y The y coordinate of the point. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer, - float x, float y); - -/** - * \brief Draw multiple points on the current rendering target. - * - * \param renderer The renderer which should draw multiple points. - * \param points The points to draw - * \param count The number of points to draw - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer, - const SDL_FPoint * points, - int count); - -/** - * \brief Draw a line on the current rendering target. - * - * \param renderer The renderer which should draw a line. - * \param x1 The x coordinate of the start point. - * \param y1 The y coordinate of the start point. - * \param x2 The x coordinate of the end point. - * \param y2 The y coordinate of the end point. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer, - float x1, float y1, float x2, float y2); - -/** - * \brief Draw a series of connected lines on the current rendering target. - * - * \param renderer The renderer which should draw multiple lines. - * \param points The points along the lines - * \param count The number of points, drawing count-1 lines - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer, - const SDL_FPoint * points, - int count); - -/** - * \brief Draw a rectangle on the current rendering target. - * - * \param renderer The renderer which should draw a rectangle. - * \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer, - const SDL_FRect * rect); - -/** - * \brief Draw some number of rectangles on the current rendering target. - * - * \param renderer The renderer which should draw multiple rectangles. - * \param rects A pointer to an array of destination rectangles. - * \param count The number of rectangles. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer, - const SDL_FRect * rects, - int count); - -/** - * \brief Fill a rectangle on the current rendering target with the drawing color. - * - * \param renderer The renderer which should fill a rectangle. - * \param rect A pointer to the destination rectangle, or NULL for the entire - * rendering target. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer, - const SDL_FRect * rect); - -/** - * \brief Fill some number of rectangles on the current rendering target with the drawing color. - * - * \param renderer The renderer which should fill multiple rectangles. - * \param rects A pointer to an array of destination rectangles. - * \param count The number of rectangles. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer, - const SDL_FRect * rects, - int count); - -/** - * \brief Copy a portion of the texture to the current rendering target. - * - * \param renderer The renderer which should copy parts of a texture. - * \param texture The source texture. - * \param srcrect A pointer to the source rectangle, or NULL for the entire - * texture. - * \param dstrect A pointer to the destination rectangle, or NULL for the - * entire rendering target. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer, - SDL_Texture * texture, - const SDL_Rect * srcrect, - const SDL_FRect * dstrect); - -/** - * \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center - * - * \param renderer The renderer which should copy parts of a texture. - * \param texture The source texture. - * \param srcrect A pointer to the source rectangle, or NULL for the entire - * texture. - * \param dstrect A pointer to the destination rectangle, or NULL for the - * entire rendering target. - * \param angle An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction - * \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2). - * \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer, - SDL_Texture * texture, - const SDL_Rect * srcrect, - const SDL_FRect * dstrect, - const double angle, - const SDL_FPoint *center, - const SDL_RendererFlip flip); - -/** - * \brief Read pixels from the current rendering target. - * - * \param renderer The renderer from which pixels should be read. - * \param rect A pointer to the rectangle to read, or NULL for the entire - * render target. - * \param format The desired format of the pixel data, or 0 to use the format - * of the rendering target - * \param pixels A pointer to be filled in with the pixel data - * \param pitch The pitch of the pixels parameter. - * - * \return 0 on success, or -1 if pixel reading is not supported. - * - * \warning This is a very slow operation, and should not be used frequently. - */ -extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer, - const SDL_Rect * rect, - Uint32 format, - void *pixels, int pitch); - -/** - * \brief Update the screen with rendering performed. - */ -extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer); - -/** - * \brief Destroy the specified texture. - * - * \sa SDL_CreateTexture() - * \sa SDL_CreateTextureFromSurface() - */ -extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture); - -/** - * \brief Destroy the rendering context for a window and free associated - * textures. - * - * \sa SDL_CreateRenderer() - */ -extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer); - -/** - * \brief Force the rendering context to flush any pending commands to the - * underlying rendering API. - * - * You do not need to (and in fact, shouldn't) call this function unless - * you are planning to call into OpenGL/Direct3D/Metal/whatever directly - * in addition to using an SDL_Renderer. - * - * This is for a very-specific case: if you are using SDL's render API, - * you asked for a specific renderer backend (OpenGL, Direct3D, etc), - * you set SDL_HINT_RENDER_BATCHING to "1", and you plan to make - * OpenGL/D3D/whatever calls in addition to SDL render API calls. If all of - * this applies, you should call SDL_RenderFlush() between calls to SDL's - * render API and the low-level API you're using in cooperation. - * - * In all other cases, you can ignore this function. This is only here to - * get maximum performance out of a specific situation. In all other cases, - * SDL will do the right thing, perhaps at a performance loss. - * - * This function is first available in SDL 2.0.10, and is not needed in - * 2.0.9 and earlier, as earlier versions did not queue rendering commands - * at all, instead flushing them to the OS immediately. - */ -extern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer); - - -/** - * \brief Bind the texture to the current OpenGL/ES/ES2 context for use with - * OpenGL instructions. - * - * \param texture The SDL texture to bind - * \param texw A pointer to a float that will be filled with the texture width - * \param texh A pointer to a float that will be filled with the texture height - * - * \return 0 on success, or -1 if the operation is not supported - */ -extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh); - -/** - * \brief Unbind a texture from the current OpenGL/ES/ES2 context. - * - * \param texture The SDL texture to unbind - * - * \return 0 on success, or -1 if the operation is not supported - */ -extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture); - -/** - * \brief Get the CAMetalLayer associated with the given Metal renderer - * - * \param renderer The renderer to query - * - * \return CAMetalLayer* on success, or NULL if the renderer isn't a Metal renderer - * - * \sa SDL_RenderGetMetalCommandEncoder() - */ -extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer); - -/** - * \brief Get the Metal command encoder for the current frame - * - * \param renderer The renderer to query - * - * \return id on success, or NULL if the renderer isn't a Metal renderer - * - * \sa SDL_RenderGetMetalLayer() - */ -extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_render_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_revision.h b/Dependencies/SDL/Windows/include/SDL_revision.h deleted file mode 100644 index dfbc057..0000000 --- a/Dependencies/SDL/Windows/include/SDL_revision.h +++ /dev/null @@ -1,2 +0,0 @@ -#define SDL_REVISION "hg-13609:34cc7d3b69d3" -#define SDL_REVISION_NUMBER 13609 diff --git a/Dependencies/SDL/Windows/include/SDL_rwops.h b/Dependencies/SDL/Windows/include/SDL_rwops.h deleted file mode 100644 index 6674f50..0000000 --- a/Dependencies/SDL/Windows/include/SDL_rwops.h +++ /dev/null @@ -1,291 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_rwops.h - * - * This file provides a general interface for SDL to read and write - * data streams. It can easily be extended to files, memory, etc. - */ - -#ifndef SDL_rwops_h_ -#define SDL_rwops_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* RWops Types */ -#define SDL_RWOPS_UNKNOWN 0U /**< Unknown stream type */ -#define SDL_RWOPS_WINFILE 1U /**< Win32 file */ -#define SDL_RWOPS_STDFILE 2U /**< Stdio file */ -#define SDL_RWOPS_JNIFILE 3U /**< Android asset */ -#define SDL_RWOPS_MEMORY 4U /**< Memory stream */ -#define SDL_RWOPS_MEMORY_RO 5U /**< Read-Only memory stream */ - -/** - * This is the read/write operation structure -- very basic. - */ -typedef struct SDL_RWops -{ - /** - * Return the size of the file in this rwops, or -1 if unknown - */ - Sint64 (SDLCALL * size) (struct SDL_RWops * context); - - /** - * Seek to \c offset relative to \c whence, one of stdio's whence values: - * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END - * - * \return the final offset in the data stream, or -1 on error. - */ - Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset, - int whence); - - /** - * Read up to \c maxnum objects each of size \c size from the data - * stream to the area pointed at by \c ptr. - * - * \return the number of objects read, or 0 at error or end of file. - */ - size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr, - size_t size, size_t maxnum); - - /** - * Write exactly \c num objects each of size \c size from the area - * pointed at by \c ptr to data stream. - * - * \return the number of objects written, or 0 at error or end of file. - */ - size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr, - size_t size, size_t num); - - /** - * Close and free an allocated SDL_RWops structure. - * - * \return 0 if successful or -1 on write error when flushing data. - */ - int (SDLCALL * close) (struct SDL_RWops * context); - - Uint32 type; - union - { -#if defined(__ANDROID__) - struct - { - void *fileNameRef; - void *inputStreamRef; - void *readableByteChannelRef; - void *readMethod; - void *assetFileDescriptorRef; - long position; - long size; - long offset; - int fd; - } androidio; -#elif defined(__WIN32__) - struct - { - SDL_bool append; - void *h; - struct - { - void *data; - size_t size; - size_t left; - } buffer; - } windowsio; -#endif - -#ifdef HAVE_STDIO_H - struct - { - SDL_bool autoclose; - FILE *fp; - } stdio; -#endif - struct - { - Uint8 *base; - Uint8 *here; - Uint8 *stop; - } mem; - struct - { - void *data1; - void *data2; - } unknown; - } hidden; - -} SDL_RWops; - - -/** - * \name RWFrom functions - * - * Functions to create SDL_RWops structures from various data streams. - */ -/* @{ */ - -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file, - const char *mode); - -#ifdef HAVE_STDIO_H -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, - SDL_bool autoclose); -#else -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp, - SDL_bool autoclose); -#endif - -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size); -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem, - int size); - -/* @} *//* RWFrom functions */ - - -extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void); -extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area); - -#define RW_SEEK_SET 0 /**< Seek from the beginning of data */ -#define RW_SEEK_CUR 1 /**< Seek relative to current read point */ -#define RW_SEEK_END 2 /**< Seek relative to the end of data */ - -/** - * Return the size of the file in this rwops, or -1 if unknown - */ -extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context); - -/** - * Seek to \c offset relative to \c whence, one of stdio's whence values: - * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END - * - * \return the final offset in the data stream, or -1 on error. - */ -extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context, - Sint64 offset, int whence); - -/** - * Return the current offset in the data stream, or -1 on error. - */ -extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context); - -/** - * Read up to \c maxnum objects each of size \c size from the data - * stream to the area pointed at by \c ptr. - * - * \return the number of objects read, or 0 at error or end of file. - */ -extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context, - void *ptr, size_t size, size_t maxnum); - -/** - * Write exactly \c num objects each of size \c size from the area - * pointed at by \c ptr to data stream. - * - * \return the number of objects written, or 0 at error or end of file. - */ -extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context, - const void *ptr, size_t size, size_t num); - -/** - * Close and free an allocated SDL_RWops structure. - * - * \return 0 if successful or -1 on write error when flushing data. - */ -extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context); - -/** - * Load all the data from an SDL data stream. - * - * The data is allocated with a zero byte at the end (null terminated) - * - * If \c datasize is not NULL, it is filled with the size of the data read. - * - * If \c freesrc is non-zero, the stream will be closed after being read. - * - * The data should be freed with SDL_free(). - * - * \return the data, or NULL if there was an error. - */ -extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize, - int freesrc); - -/** - * Load an entire file. - * - * The data is allocated with a zero byte at the end (null terminated) - * - * If \c datasize is not NULL, it is filled with the size of the data read. - * - * If \c freesrc is non-zero, the stream will be closed after being read. - * - * The data should be freed with SDL_free(). - * - * \return the data, or NULL if there was an error. - */ -extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize); - -/** - * \name Read endian functions - * - * Read an item of the specified endianness and return in native format. - */ -/* @{ */ -extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src); -extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src); -extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src); -extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src); -extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src); -extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src); -extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src); -/* @} *//* Read endian functions */ - -/** - * \name Write endian functions - * - * Write an item of native format to the specified endianness. - */ -/* @{ */ -extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value); -extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value); -extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value); -extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value); -extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value); -extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value); -extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value); -/* @} *//* Write endian functions */ - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_rwops_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_scancode.h b/Dependencies/SDL/Windows/include/SDL_scancode.h deleted file mode 100644 index b19197d..0000000 --- a/Dependencies/SDL/Windows/include/SDL_scancode.h +++ /dev/null @@ -1,413 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_scancode.h - * - * Defines keyboard scancodes. - */ - -#ifndef SDL_scancode_h_ -#define SDL_scancode_h_ - -#include "SDL_stdinc.h" - -/** - * \brief The SDL keyboard scancode representation. - * - * Values of this type are used to represent keyboard keys, among other places - * in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the - * SDL_Event structure. - * - * The values in this enumeration are based on the USB usage page standard: - * https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf - */ -typedef enum -{ - SDL_SCANCODE_UNKNOWN = 0, - - /** - * \name Usage page 0x07 - * - * These values are from usage page 0x07 (USB keyboard page). - */ - /* @{ */ - - SDL_SCANCODE_A = 4, - SDL_SCANCODE_B = 5, - SDL_SCANCODE_C = 6, - SDL_SCANCODE_D = 7, - SDL_SCANCODE_E = 8, - SDL_SCANCODE_F = 9, - SDL_SCANCODE_G = 10, - SDL_SCANCODE_H = 11, - SDL_SCANCODE_I = 12, - SDL_SCANCODE_J = 13, - SDL_SCANCODE_K = 14, - SDL_SCANCODE_L = 15, - SDL_SCANCODE_M = 16, - SDL_SCANCODE_N = 17, - SDL_SCANCODE_O = 18, - SDL_SCANCODE_P = 19, - SDL_SCANCODE_Q = 20, - SDL_SCANCODE_R = 21, - SDL_SCANCODE_S = 22, - SDL_SCANCODE_T = 23, - SDL_SCANCODE_U = 24, - SDL_SCANCODE_V = 25, - SDL_SCANCODE_W = 26, - SDL_SCANCODE_X = 27, - SDL_SCANCODE_Y = 28, - SDL_SCANCODE_Z = 29, - - SDL_SCANCODE_1 = 30, - SDL_SCANCODE_2 = 31, - SDL_SCANCODE_3 = 32, - SDL_SCANCODE_4 = 33, - SDL_SCANCODE_5 = 34, - SDL_SCANCODE_6 = 35, - SDL_SCANCODE_7 = 36, - SDL_SCANCODE_8 = 37, - SDL_SCANCODE_9 = 38, - SDL_SCANCODE_0 = 39, - - SDL_SCANCODE_RETURN = 40, - SDL_SCANCODE_ESCAPE = 41, - SDL_SCANCODE_BACKSPACE = 42, - SDL_SCANCODE_TAB = 43, - SDL_SCANCODE_SPACE = 44, - - SDL_SCANCODE_MINUS = 45, - SDL_SCANCODE_EQUALS = 46, - SDL_SCANCODE_LEFTBRACKET = 47, - SDL_SCANCODE_RIGHTBRACKET = 48, - SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return - * key on ISO keyboards and at the right end - * of the QWERTY row on ANSI keyboards. - * Produces REVERSE SOLIDUS (backslash) and - * VERTICAL LINE in a US layout, REVERSE - * SOLIDUS and VERTICAL LINE in a UK Mac - * layout, NUMBER SIGN and TILDE in a UK - * Windows layout, DOLLAR SIGN and POUND SIGN - * in a Swiss German layout, NUMBER SIGN and - * APOSTROPHE in a German layout, GRAVE - * ACCENT and POUND SIGN in a French Mac - * layout, and ASTERISK and MICRO SIGN in a - * French Windows layout. - */ - SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code - * instead of 49 for the same key, but all - * OSes I've seen treat the two codes - * identically. So, as an implementor, unless - * your keyboard generates both of those - * codes and your OS treats them differently, - * you should generate SDL_SCANCODE_BACKSLASH - * instead of this code. As a user, you - * should not rely on this code because SDL - * will never generate it with most (all?) - * keyboards. - */ - SDL_SCANCODE_SEMICOLON = 51, - SDL_SCANCODE_APOSTROPHE = 52, - SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI - * and ISO keyboards). Produces GRAVE ACCENT and - * TILDE in a US Windows layout and in US and UK - * Mac layouts on ANSI keyboards, GRAVE ACCENT - * and NOT SIGN in a UK Windows layout, SECTION - * SIGN and PLUS-MINUS SIGN in US and UK Mac - * layouts on ISO keyboards, SECTION SIGN and - * DEGREE SIGN in a Swiss German layout (Mac: - * only on ISO keyboards), CIRCUMFLEX ACCENT and - * DEGREE SIGN in a German layout (Mac: only on - * ISO keyboards), SUPERSCRIPT TWO and TILDE in a - * French Windows layout, COMMERCIAL AT and - * NUMBER SIGN in a French Mac layout on ISO - * keyboards, and LESS-THAN SIGN and GREATER-THAN - * SIGN in a Swiss German, German, or French Mac - * layout on ANSI keyboards. - */ - SDL_SCANCODE_COMMA = 54, - SDL_SCANCODE_PERIOD = 55, - SDL_SCANCODE_SLASH = 56, - - SDL_SCANCODE_CAPSLOCK = 57, - - SDL_SCANCODE_F1 = 58, - SDL_SCANCODE_F2 = 59, - SDL_SCANCODE_F3 = 60, - SDL_SCANCODE_F4 = 61, - SDL_SCANCODE_F5 = 62, - SDL_SCANCODE_F6 = 63, - SDL_SCANCODE_F7 = 64, - SDL_SCANCODE_F8 = 65, - SDL_SCANCODE_F9 = 66, - SDL_SCANCODE_F10 = 67, - SDL_SCANCODE_F11 = 68, - SDL_SCANCODE_F12 = 69, - - SDL_SCANCODE_PRINTSCREEN = 70, - SDL_SCANCODE_SCROLLLOCK = 71, - SDL_SCANCODE_PAUSE = 72, - SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but - does send code 73, not 117) */ - SDL_SCANCODE_HOME = 74, - SDL_SCANCODE_PAGEUP = 75, - SDL_SCANCODE_DELETE = 76, - SDL_SCANCODE_END = 77, - SDL_SCANCODE_PAGEDOWN = 78, - SDL_SCANCODE_RIGHT = 79, - SDL_SCANCODE_LEFT = 80, - SDL_SCANCODE_DOWN = 81, - SDL_SCANCODE_UP = 82, - - SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards - */ - SDL_SCANCODE_KP_DIVIDE = 84, - SDL_SCANCODE_KP_MULTIPLY = 85, - SDL_SCANCODE_KP_MINUS = 86, - SDL_SCANCODE_KP_PLUS = 87, - SDL_SCANCODE_KP_ENTER = 88, - SDL_SCANCODE_KP_1 = 89, - SDL_SCANCODE_KP_2 = 90, - SDL_SCANCODE_KP_3 = 91, - SDL_SCANCODE_KP_4 = 92, - SDL_SCANCODE_KP_5 = 93, - SDL_SCANCODE_KP_6 = 94, - SDL_SCANCODE_KP_7 = 95, - SDL_SCANCODE_KP_8 = 96, - SDL_SCANCODE_KP_9 = 97, - SDL_SCANCODE_KP_0 = 98, - SDL_SCANCODE_KP_PERIOD = 99, - - SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO - * keyboards have over ANSI ones, - * located between left shift and Y. - * Produces GRAVE ACCENT and TILDE in a - * US or UK Mac layout, REVERSE SOLIDUS - * (backslash) and VERTICAL LINE in a - * US or UK Windows layout, and - * LESS-THAN SIGN and GREATER-THAN SIGN - * in a Swiss German, German, or French - * layout. */ - SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */ - SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag, - * not a physical key - but some Mac keyboards - * do have a power key. */ - SDL_SCANCODE_KP_EQUALS = 103, - SDL_SCANCODE_F13 = 104, - SDL_SCANCODE_F14 = 105, - SDL_SCANCODE_F15 = 106, - SDL_SCANCODE_F16 = 107, - SDL_SCANCODE_F17 = 108, - SDL_SCANCODE_F18 = 109, - SDL_SCANCODE_F19 = 110, - SDL_SCANCODE_F20 = 111, - SDL_SCANCODE_F21 = 112, - SDL_SCANCODE_F22 = 113, - SDL_SCANCODE_F23 = 114, - SDL_SCANCODE_F24 = 115, - SDL_SCANCODE_EXECUTE = 116, - SDL_SCANCODE_HELP = 117, - SDL_SCANCODE_MENU = 118, - SDL_SCANCODE_SELECT = 119, - SDL_SCANCODE_STOP = 120, - SDL_SCANCODE_AGAIN = 121, /**< redo */ - SDL_SCANCODE_UNDO = 122, - SDL_SCANCODE_CUT = 123, - SDL_SCANCODE_COPY = 124, - SDL_SCANCODE_PASTE = 125, - SDL_SCANCODE_FIND = 126, - SDL_SCANCODE_MUTE = 127, - SDL_SCANCODE_VOLUMEUP = 128, - SDL_SCANCODE_VOLUMEDOWN = 129, -/* not sure whether there's a reason to enable these */ -/* SDL_SCANCODE_LOCKINGCAPSLOCK = 130, */ -/* SDL_SCANCODE_LOCKINGNUMLOCK = 131, */ -/* SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */ - SDL_SCANCODE_KP_COMMA = 133, - SDL_SCANCODE_KP_EQUALSAS400 = 134, - - SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see - footnotes in USB doc */ - SDL_SCANCODE_INTERNATIONAL2 = 136, - SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */ - SDL_SCANCODE_INTERNATIONAL4 = 138, - SDL_SCANCODE_INTERNATIONAL5 = 139, - SDL_SCANCODE_INTERNATIONAL6 = 140, - SDL_SCANCODE_INTERNATIONAL7 = 141, - SDL_SCANCODE_INTERNATIONAL8 = 142, - SDL_SCANCODE_INTERNATIONAL9 = 143, - SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */ - SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */ - SDL_SCANCODE_LANG3 = 146, /**< Katakana */ - SDL_SCANCODE_LANG4 = 147, /**< Hiragana */ - SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */ - SDL_SCANCODE_LANG6 = 149, /**< reserved */ - SDL_SCANCODE_LANG7 = 150, /**< reserved */ - SDL_SCANCODE_LANG8 = 151, /**< reserved */ - SDL_SCANCODE_LANG9 = 152, /**< reserved */ - - SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */ - SDL_SCANCODE_SYSREQ = 154, - SDL_SCANCODE_CANCEL = 155, - SDL_SCANCODE_CLEAR = 156, - SDL_SCANCODE_PRIOR = 157, - SDL_SCANCODE_RETURN2 = 158, - SDL_SCANCODE_SEPARATOR = 159, - SDL_SCANCODE_OUT = 160, - SDL_SCANCODE_OPER = 161, - SDL_SCANCODE_CLEARAGAIN = 162, - SDL_SCANCODE_CRSEL = 163, - SDL_SCANCODE_EXSEL = 164, - - SDL_SCANCODE_KP_00 = 176, - SDL_SCANCODE_KP_000 = 177, - SDL_SCANCODE_THOUSANDSSEPARATOR = 178, - SDL_SCANCODE_DECIMALSEPARATOR = 179, - SDL_SCANCODE_CURRENCYUNIT = 180, - SDL_SCANCODE_CURRENCYSUBUNIT = 181, - SDL_SCANCODE_KP_LEFTPAREN = 182, - SDL_SCANCODE_KP_RIGHTPAREN = 183, - SDL_SCANCODE_KP_LEFTBRACE = 184, - SDL_SCANCODE_KP_RIGHTBRACE = 185, - SDL_SCANCODE_KP_TAB = 186, - SDL_SCANCODE_KP_BACKSPACE = 187, - SDL_SCANCODE_KP_A = 188, - SDL_SCANCODE_KP_B = 189, - SDL_SCANCODE_KP_C = 190, - SDL_SCANCODE_KP_D = 191, - SDL_SCANCODE_KP_E = 192, - SDL_SCANCODE_KP_F = 193, - SDL_SCANCODE_KP_XOR = 194, - SDL_SCANCODE_KP_POWER = 195, - SDL_SCANCODE_KP_PERCENT = 196, - SDL_SCANCODE_KP_LESS = 197, - SDL_SCANCODE_KP_GREATER = 198, - SDL_SCANCODE_KP_AMPERSAND = 199, - SDL_SCANCODE_KP_DBLAMPERSAND = 200, - SDL_SCANCODE_KP_VERTICALBAR = 201, - SDL_SCANCODE_KP_DBLVERTICALBAR = 202, - SDL_SCANCODE_KP_COLON = 203, - SDL_SCANCODE_KP_HASH = 204, - SDL_SCANCODE_KP_SPACE = 205, - SDL_SCANCODE_KP_AT = 206, - SDL_SCANCODE_KP_EXCLAM = 207, - SDL_SCANCODE_KP_MEMSTORE = 208, - SDL_SCANCODE_KP_MEMRECALL = 209, - SDL_SCANCODE_KP_MEMCLEAR = 210, - SDL_SCANCODE_KP_MEMADD = 211, - SDL_SCANCODE_KP_MEMSUBTRACT = 212, - SDL_SCANCODE_KP_MEMMULTIPLY = 213, - SDL_SCANCODE_KP_MEMDIVIDE = 214, - SDL_SCANCODE_KP_PLUSMINUS = 215, - SDL_SCANCODE_KP_CLEAR = 216, - SDL_SCANCODE_KP_CLEARENTRY = 217, - SDL_SCANCODE_KP_BINARY = 218, - SDL_SCANCODE_KP_OCTAL = 219, - SDL_SCANCODE_KP_DECIMAL = 220, - SDL_SCANCODE_KP_HEXADECIMAL = 221, - - SDL_SCANCODE_LCTRL = 224, - SDL_SCANCODE_LSHIFT = 225, - SDL_SCANCODE_LALT = 226, /**< alt, option */ - SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */ - SDL_SCANCODE_RCTRL = 228, - SDL_SCANCODE_RSHIFT = 229, - SDL_SCANCODE_RALT = 230, /**< alt gr, option */ - SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */ - - SDL_SCANCODE_MODE = 257, /**< I'm not sure if this is really not covered - * by any of the above, but since there's a - * special KMOD_MODE for it I'm adding it here - */ - - /* @} *//* Usage page 0x07 */ - - /** - * \name Usage page 0x0C - * - * These values are mapped from usage page 0x0C (USB consumer page). - */ - /* @{ */ - - SDL_SCANCODE_AUDIONEXT = 258, - SDL_SCANCODE_AUDIOPREV = 259, - SDL_SCANCODE_AUDIOSTOP = 260, - SDL_SCANCODE_AUDIOPLAY = 261, - SDL_SCANCODE_AUDIOMUTE = 262, - SDL_SCANCODE_MEDIASELECT = 263, - SDL_SCANCODE_WWW = 264, - SDL_SCANCODE_MAIL = 265, - SDL_SCANCODE_CALCULATOR = 266, - SDL_SCANCODE_COMPUTER = 267, - SDL_SCANCODE_AC_SEARCH = 268, - SDL_SCANCODE_AC_HOME = 269, - SDL_SCANCODE_AC_BACK = 270, - SDL_SCANCODE_AC_FORWARD = 271, - SDL_SCANCODE_AC_STOP = 272, - SDL_SCANCODE_AC_REFRESH = 273, - SDL_SCANCODE_AC_BOOKMARKS = 274, - - /* @} *//* Usage page 0x0C */ - - /** - * \name Walther keys - * - * These are values that Christian Walther added (for mac keyboard?). - */ - /* @{ */ - - SDL_SCANCODE_BRIGHTNESSDOWN = 275, - SDL_SCANCODE_BRIGHTNESSUP = 276, - SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display - switch, video mode switch */ - SDL_SCANCODE_KBDILLUMTOGGLE = 278, - SDL_SCANCODE_KBDILLUMDOWN = 279, - SDL_SCANCODE_KBDILLUMUP = 280, - SDL_SCANCODE_EJECT = 281, - SDL_SCANCODE_SLEEP = 282, - - SDL_SCANCODE_APP1 = 283, - SDL_SCANCODE_APP2 = 284, - - /* @} *//* Walther keys */ - - /** - * \name Usage page 0x0C (additional media keys) - * - * These values are mapped from usage page 0x0C (USB consumer page). - */ - /* @{ */ - - SDL_SCANCODE_AUDIOREWIND = 285, - SDL_SCANCODE_AUDIOFASTFORWARD = 286, - - /* @} *//* Usage page 0x0C (additional media keys) */ - - /* Add any other keys here. */ - - SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes - for array bounds */ -} SDL_Scancode; - -#endif /* SDL_scancode_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_sensor.h b/Dependencies/SDL/Windows/include/SDL_sensor.h deleted file mode 100644 index 5122ee1..0000000 --- a/Dependencies/SDL/Windows/include/SDL_sensor.h +++ /dev/null @@ -1,251 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_sensor.h - * - * Include file for SDL sensor event handling - * - */ - -#ifndef SDL_sensor_h_ -#define SDL_sensor_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -/* *INDENT-OFF* */ -extern "C" { -/* *INDENT-ON* */ -#endif - -/** - * \brief SDL_sensor.h - * - * In order to use these functions, SDL_Init() must have been called - * with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system - * for sensors, and load appropriate drivers. - */ - -struct _SDL_Sensor; -typedef struct _SDL_Sensor SDL_Sensor; - -/** - * This is a unique ID for a sensor for the time it is connected to the system, - * and is never reused for the lifetime of the application. - * - * The ID value starts at 0 and increments from there. The value -1 is an invalid ID. - */ -typedef Sint32 SDL_SensorID; - -/* The different sensors defined by SDL - * - * Additional sensors may be available, using platform dependent semantics. - * - * Hare are the additional Android sensors: - * https://developer.android.com/reference/android/hardware/SensorEvent.html#values - */ -typedef enum -{ - SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */ - SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */ - SDL_SENSOR_ACCEL, /**< Accelerometer */ - SDL_SENSOR_GYRO /**< Gyroscope */ -} SDL_SensorType; - -/** - * Accelerometer sensor - * - * The accelerometer returns the current acceleration in SI meters per - * second squared. This includes gravity, so a device at rest will have - * an acceleration of SDL_STANDARD_GRAVITY straight down. - * - * values[0]: Acceleration on the x axis - * values[1]: Acceleration on the y axis - * values[2]: Acceleration on the z axis - * - * For phones held in portrait mode, the axes are defined as follows: - * -X ... +X : left ... right - * -Y ... +Y : bottom ... top - * -Z ... +Z : farther ... closer - * - * The axis data is not changed when the phone is rotated. - * - * \sa SDL_GetDisplayOrientation() - */ -#define SDL_STANDARD_GRAVITY 9.80665f - -/** - * Gyroscope sensor - * - * The gyroscope returns the current rate of rotation in radians per second. - * The rotation is positive in the counter-clockwise direction. That is, - * an observer looking from a positive location on one of the axes would - * see positive rotation on that axis when it appeared to be rotating - * counter-clockwise. - * - * values[0]: Angular speed around the x axis - * values[1]: Angular speed around the y axis - * values[2]: Angular speed around the z axis - * - * For phones held in portrait mode, the axes are defined as follows: - * -X ... +X : left ... right - * -Y ... +Y : bottom ... top - * -Z ... +Z : farther ... closer - * - * The axis data is not changed when the phone is rotated. - * - * \sa SDL_GetDisplayOrientation() - */ - -/* Function prototypes */ - -/** - * \brief Count the number of sensors attached to the system right now - */ -extern DECLSPEC int SDLCALL SDL_NumSensors(void); - -/** - * \brief Get the implementation dependent name of a sensor. - * - * This can be called before any sensors are opened. - * - * \return The sensor name, or NULL if device_index is out of range. - */ -extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index); - -/** - * \brief Get the type of a sensor. - * - * This can be called before any sensors are opened. - * - * \return The sensor type, or SDL_SENSOR_INVALID if device_index is out of range. - */ -extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index); - -/** - * \brief Get the platform dependent type of a sensor. - * - * This can be called before any sensors are opened. - * - * \return The sensor platform dependent type, or -1 if device_index is out of range. - */ -extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index); - -/** - * \brief Get the instance ID of a sensor. - * - * This can be called before any sensors are opened. - * - * \return The sensor instance ID, or -1 if device_index is out of range. - */ -extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index); - -/** - * \brief Open a sensor for use. - * - * The index passed as an argument refers to the N'th sensor on the system. - * - * \return A sensor identifier, or NULL if an error occurred. - */ -extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index); - -/** - * Return the SDL_Sensor associated with an instance id. - */ -extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id); - -/** - * \brief Get the implementation dependent name of a sensor. - * - * \return The sensor name, or NULL if the sensor is NULL. - */ -extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor); - -/** - * \brief Get the type of a sensor. - * - * This can be called before any sensors are opened. - * - * \return The sensor type, or SDL_SENSOR_INVALID if the sensor is NULL. - */ -extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor); - -/** - * \brief Get the platform dependent type of a sensor. - * - * This can be called before any sensors are opened. - * - * \return The sensor platform dependent type, or -1 if the sensor is NULL. - */ -extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor); - -/** - * \brief Get the instance ID of a sensor. - * - * This can be called before any sensors are opened. - * - * \return The sensor instance ID, or -1 if the sensor is NULL. - */ -extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor); - -/** - * Get the current state of an opened sensor. - * - * The number of values and interpretation of the data is sensor dependent. - * - * \param sensor The sensor to query - * \param data A pointer filled with the current sensor state - * \param num_values The number of values to write to data - * - * \return 0 or -1 if an error occurred. - */ -extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values); - -/** - * Close a sensor previously opened with SDL_SensorOpen() - */ -extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor); - -/** - * Update the current state of the open sensors. - * - * This is called automatically by the event loop if sensor events are enabled. - * - * This needs to be called from the thread that initialized the sensor subsystem. - */ -extern DECLSPEC void SDLCALL SDL_SensorUpdate(void); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -/* *INDENT-OFF* */ -} -/* *INDENT-ON* */ -#endif -#include "close_code.h" - -#endif /* SDL_sensor_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_shape.h b/Dependencies/SDL/Windows/include/SDL_shape.h deleted file mode 100644 index cbd9deb..0000000 --- a/Dependencies/SDL/Windows/include/SDL_shape.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -#ifndef SDL_shape_h_ -#define SDL_shape_h_ - -#include "SDL_stdinc.h" -#include "SDL_pixels.h" -#include "SDL_rect.h" -#include "SDL_surface.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** \file SDL_shape.h - * - * Header file for the shaped window API. - */ - -#define SDL_NONSHAPEABLE_WINDOW -1 -#define SDL_INVALID_SHAPE_ARGUMENT -2 -#define SDL_WINDOW_LACKS_SHAPE -3 - -/** - * \brief Create a window that can be shaped with the specified position, dimensions, and flags. - * - * \param title The title of the window, in UTF-8 encoding. - * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or - * ::SDL_WINDOWPOS_UNDEFINED. - * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or - * ::SDL_WINDOWPOS_UNDEFINED. - * \param w The width of the window. - * \param h The height of the window. - * \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following: - * ::SDL_WINDOW_OPENGL, ::SDL_WINDOW_INPUT_GRABBED, - * ::SDL_WINDOW_HIDDEN, ::SDL_WINDOW_RESIZABLE, - * ::SDL_WINDOW_MAXIMIZED, ::SDL_WINDOW_MINIMIZED, - * ::SDL_WINDOW_BORDERLESS is always set, and ::SDL_WINDOW_FULLSCREEN is always unset. - * - * \return The window created, or NULL if window creation failed. - * - * \sa SDL_DestroyWindow() - */ -extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags); - -/** - * \brief Return whether the given window is a shaped window. - * - * \param window The window to query for being shaped. - * - * \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if the window is unshaped or NULL. - * - * \sa SDL_CreateShapedWindow - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window); - -/** \brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */ -typedef enum { - /** \brief The default mode, a binarized alpha cutoff of 1. */ - ShapeModeDefault, - /** \brief A binarized alpha cutoff with a given integer value. */ - ShapeModeBinarizeAlpha, - /** \brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */ - ShapeModeReverseBinarizeAlpha, - /** \brief A color key is applied. */ - ShapeModeColorKey -} WindowShapeMode; - -#define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha) - -/** \brief A union containing parameters for shaped windows. */ -typedef union { - /** \brief A cutoff alpha value for binarization of the window shape's alpha channel. */ - Uint8 binarizationCutoff; - SDL_Color colorKey; -} SDL_WindowShapeParams; - -/** \brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */ -typedef struct SDL_WindowShapeMode { - /** \brief The mode of these window-shape parameters. */ - WindowShapeMode mode; - /** \brief Window-shape parameters. */ - SDL_WindowShapeParams parameters; -} SDL_WindowShapeMode; - -/** - * \brief Set the shape and parameters of a shaped window. - * - * \param window The shaped window whose parameters should be set. - * \param shape A surface encoding the desired shape for the window. - * \param shape_mode The parameters to set for the shaped window. - * - * \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW - * if the SDL_Window given does not reference a valid shaped window. - * - * \sa SDL_WindowShapeMode - * \sa SDL_GetShapedWindowMode. - */ -extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode); - -/** - * \brief Get the shape parameters of a shaped window. - * - * \param window The shaped window whose parameters should be retrieved. - * \param shape_mode An empty shape-mode structure to fill, or NULL to check whether the window has a shape. - * - * \return 0 if the window has a shape and, provided shape_mode was not NULL, shape_mode has been filled with the mode - * data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if - * the SDL_Window given is a shapeable window currently lacking a shape. - * - * \sa SDL_WindowShapeMode - * \sa SDL_SetWindowShape - */ -extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_shape_h_ */ diff --git a/Dependencies/SDL/Windows/include/SDL_stdinc.h b/Dependencies/SDL/Windows/include/SDL_stdinc.h deleted file mode 100644 index d96e18b..0000000 --- a/Dependencies/SDL/Windows/include/SDL_stdinc.h +++ /dev/null @@ -1,617 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_stdinc.h - * - * This is a general header that includes C language support. - */ - -#ifndef SDL_stdinc_h_ -#define SDL_stdinc_h_ - -#include "SDL_config.h" - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_STDIO_H -#include -#endif -#if defined(STDC_HEADERS) -# include -# include -# include -#else -# if defined(HAVE_STDLIB_H) -# include -# elif defined(HAVE_MALLOC_H) -# include -# endif -# if defined(HAVE_STDDEF_H) -# include -# endif -# if defined(HAVE_STDARG_H) -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H) -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_WCHAR_H -# include -#endif -#if defined(HAVE_INTTYPES_H) -# include -#elif defined(HAVE_STDINT_H) -# include -#endif -#ifdef HAVE_CTYPE_H -# include -#endif -#ifdef HAVE_MATH_H -# if defined(__WINRT__) -/* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on - WinRT. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx - for more information. -*/ -# define _USE_MATH_DEFINES -# endif -# include -#endif -#ifdef HAVE_FLOAT_H -# include -#endif -#if defined(HAVE_ALLOCA) && !defined(alloca) -# if defined(HAVE_ALLOCA_H) -# include -# elif defined(__GNUC__) -# define alloca __builtin_alloca -# elif defined(_MSC_VER) -# include -# define alloca _alloca -# elif defined(__WATCOMC__) -# include -# elif defined(__BORLANDC__) -# include -# elif defined(__DMC__) -# include -# elif defined(__AIX__) -#pragma alloca -# elif defined(__MRC__) -void *alloca(unsigned); -# else -char *alloca(); -# endif -#endif - -/** - * The number of elements in an array. - */ -#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0])) -#define SDL_TABLESIZE(table) SDL_arraysize(table) - -/** - * Macro useful for building other macros with strings in them - * - * e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n") - */ -#define SDL_STRINGIFY_ARG(arg) #arg - -/** - * \name Cast operators - * - * Use proper C++ casts when compiled as C++ to be compatible with the option - * -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above). - */ -/* @{ */ -#ifdef __cplusplus -#define SDL_reinterpret_cast(type, expression) reinterpret_cast(expression) -#define SDL_static_cast(type, expression) static_cast(expression) -#define SDL_const_cast(type, expression) const_cast(expression) -#else -#define SDL_reinterpret_cast(type, expression) ((type)(expression)) -#define SDL_static_cast(type, expression) ((type)(expression)) -#define SDL_const_cast(type, expression) ((type)(expression)) -#endif -/* @} *//* Cast operators */ - -/* Define a four character code as a Uint32 */ -#define SDL_FOURCC(A, B, C, D) \ - ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \ - (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \ - (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \ - (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24)) - -/** - * \name Basic data types - */ -/* @{ */ - -#ifdef __CC_ARM -/* ARM's compiler throws warnings if we use an enum: like "SDL_bool x = a < b;" */ -#define SDL_FALSE 0 -#define SDL_TRUE 1 -typedef int SDL_bool; -#else -typedef enum -{ - SDL_FALSE = 0, - SDL_TRUE = 1 -} SDL_bool; -#endif - -/** - * \brief A signed 8-bit integer type. - */ -#define SDL_MAX_SINT8 ((Sint8)0x7F) /* 127 */ -#define SDL_MIN_SINT8 ((Sint8)(~0x7F)) /* -128 */ -typedef int8_t Sint8; -/** - * \brief An unsigned 8-bit integer type. - */ -#define SDL_MAX_UINT8 ((Uint8)0xFF) /* 255 */ -#define SDL_MIN_UINT8 ((Uint8)0x00) /* 0 */ -typedef uint8_t Uint8; -/** - * \brief A signed 16-bit integer type. - */ -#define SDL_MAX_SINT16 ((Sint16)0x7FFF) /* 32767 */ -#define SDL_MIN_SINT16 ((Sint16)(~0x7FFF)) /* -32768 */ -typedef int16_t Sint16; -/** - * \brief An unsigned 16-bit integer type. - */ -#define SDL_MAX_UINT16 ((Uint16)0xFFFF) /* 65535 */ -#define SDL_MIN_UINT16 ((Uint16)0x0000) /* 0 */ -typedef uint16_t Uint16; -/** - * \brief A signed 32-bit integer type. - */ -#define SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */ -#define SDL_MIN_SINT32 ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */ -typedef int32_t Sint32; -/** - * \brief An unsigned 32-bit integer type. - */ -#define SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) /* 4294967295 */ -#define SDL_MIN_UINT32 ((Uint32)0x00000000) /* 0 */ -typedef uint32_t Uint32; - -/** - * \brief A signed 64-bit integer type. - */ -#define SDL_MAX_SINT64 ((Sint64)0x7FFFFFFFFFFFFFFFll) /* 9223372036854775807 */ -#define SDL_MIN_SINT64 ((Sint64)(~0x7FFFFFFFFFFFFFFFll)) /* -9223372036854775808 */ -typedef int64_t Sint64; -/** - * \brief An unsigned 64-bit integer type. - */ -#define SDL_MAX_UINT64 ((Uint64)0xFFFFFFFFFFFFFFFFull) /* 18446744073709551615 */ -#define SDL_MIN_UINT64 ((Uint64)(0x0000000000000000ull)) /* 0 */ -typedef uint64_t Uint64; - -/* @} *//* Basic data types */ - -/* Make sure we have macros for printing 64 bit values. - * should define these but this is not true all platforms. - * (for example win32) */ -#ifndef SDL_PRIs64 -#ifdef PRIs64 -#define SDL_PRIs64 PRIs64 -#elif defined(__WIN32__) -#define SDL_PRIs64 "I64d" -#elif defined(__LINUX__) && defined(__LP64__) -#define SDL_PRIs64 "ld" -#else -#define SDL_PRIs64 "lld" -#endif -#endif -#ifndef SDL_PRIu64 -#ifdef PRIu64 -#define SDL_PRIu64 PRIu64 -#elif defined(__WIN32__) -#define SDL_PRIu64 "I64u" -#elif defined(__LINUX__) && defined(__LP64__) -#define SDL_PRIu64 "lu" -#else -#define SDL_PRIu64 "llu" -#endif -#endif -#ifndef SDL_PRIx64 -#ifdef PRIx64 -#define SDL_PRIx64 PRIx64 -#elif defined(__WIN32__) -#define SDL_PRIx64 "I64x" -#elif defined(__LINUX__) && defined(__LP64__) -#define SDL_PRIx64 "lx" -#else -#define SDL_PRIx64 "llx" -#endif -#endif -#ifndef SDL_PRIX64 -#ifdef PRIX64 -#define SDL_PRIX64 PRIX64 -#elif defined(__WIN32__) -#define SDL_PRIX64 "I64X" -#elif defined(__LINUX__) && defined(__LP64__) -#define SDL_PRIX64 "lX" -#else -#define SDL_PRIX64 "llX" -#endif -#endif - -/* Annotations to help code analysis tools */ -#ifdef SDL_DISABLE_ANALYZE_MACROS -#define SDL_IN_BYTECAP(x) -#define SDL_INOUT_Z_CAP(x) -#define SDL_OUT_Z_CAP(x) -#define SDL_OUT_CAP(x) -#define SDL_OUT_BYTECAP(x) -#define SDL_OUT_Z_BYTECAP(x) -#define SDL_PRINTF_FORMAT_STRING -#define SDL_SCANF_FORMAT_STRING -#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) -#define SDL_SCANF_VARARG_FUNC( fmtargnumber ) -#else -#if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */ -#include - -#define SDL_IN_BYTECAP(x) _In_bytecount_(x) -#define SDL_INOUT_Z_CAP(x) _Inout_z_cap_(x) -#define SDL_OUT_Z_CAP(x) _Out_z_cap_(x) -#define SDL_OUT_CAP(x) _Out_cap_(x) -#define SDL_OUT_BYTECAP(x) _Out_bytecap_(x) -#define SDL_OUT_Z_BYTECAP(x) _Out_z_bytecap_(x) - -#define SDL_PRINTF_FORMAT_STRING _Printf_format_string_ -#define SDL_SCANF_FORMAT_STRING _Scanf_format_string_impl_ -#else -#define SDL_IN_BYTECAP(x) -#define SDL_INOUT_Z_CAP(x) -#define SDL_OUT_Z_CAP(x) -#define SDL_OUT_CAP(x) -#define SDL_OUT_BYTECAP(x) -#define SDL_OUT_Z_BYTECAP(x) -#define SDL_PRINTF_FORMAT_STRING -#define SDL_SCANF_FORMAT_STRING -#endif -#if defined(__GNUC__) -#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 ))) -#define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 ))) -#else -#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) -#define SDL_SCANF_VARARG_FUNC( fmtargnumber ) -#endif -#endif /* SDL_DISABLE_ANALYZE_MACROS */ - -#define SDL_COMPILE_TIME_ASSERT(name, x) \ - typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1] -/** \cond */ -#ifndef DOXYGEN_SHOULD_IGNORE_THIS -SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1); -SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1); -SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2); -SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2); -SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4); -SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4); -SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8); -SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8); -#endif /* DOXYGEN_SHOULD_IGNORE_THIS */ -/** \endcond */ - -/* Check to make sure enums are the size of ints, for structure packing. - For both Watcom C/C++ and Borland C/C++ the compiler option that makes - enums having the size of an int must be enabled. - This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11). -*/ - -/** \cond */ -#ifndef DOXYGEN_SHOULD_IGNORE_THIS -#if !defined(__ANDROID__) - /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */ -typedef enum -{ - DUMMY_ENUM_VALUE -} SDL_DUMMY_ENUM; - -SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int)); -#endif -#endif /* DOXYGEN_SHOULD_IGNORE_THIS */ -/** \endcond */ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef HAVE_ALLOCA -#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count)) -#define SDL_stack_free(data) -#else -#define SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*(count)) -#define SDL_stack_free(data) SDL_free(data) -#endif - -extern DECLSPEC void *SDLCALL SDL_malloc(size_t size); -extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size); -extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size); -extern DECLSPEC void SDLCALL SDL_free(void *mem); - -typedef void *(SDLCALL *SDL_malloc_func)(size_t size); -typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size); -typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size); -typedef void (SDLCALL *SDL_free_func)(void *mem); - -/** - * \brief Get the current set of SDL memory functions - */ -extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func, - SDL_calloc_func *calloc_func, - SDL_realloc_func *realloc_func, - SDL_free_func *free_func); - -/** - * \brief Replace SDL's memory allocation functions with a custom set - * - * \note If you are replacing SDL's memory functions, you should call - * SDL_GetNumAllocations() and be very careful if it returns non-zero. - * That means that your free function will be called with memory - * allocated by the previous memory allocation functions. - */ -extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func, - SDL_calloc_func calloc_func, - SDL_realloc_func realloc_func, - SDL_free_func free_func); - -/** - * \brief Get the number of outstanding (unfreed) allocations - */ -extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void); - -extern DECLSPEC char *SDLCALL SDL_getenv(const char *name); -extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite); - -extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *)); - -extern DECLSPEC int SDLCALL SDL_abs(int x); - -/* !!! FIXME: these have side effects. You probably shouldn't use them. */ -/* !!! FIXME: Maybe we do forceinline functions of SDL_mini, SDL_minf, etc? */ -#define SDL_min(x, y) (((x) < (y)) ? (x) : (y)) -#define SDL_max(x, y) (((x) > (y)) ? (x) : (y)) - -extern DECLSPEC int SDLCALL SDL_isdigit(int x); -extern DECLSPEC int SDLCALL SDL_isspace(int x); -extern DECLSPEC int SDLCALL SDL_isupper(int x); -extern DECLSPEC int SDLCALL SDL_islower(int x); -extern DECLSPEC int SDLCALL SDL_toupper(int x); -extern DECLSPEC int SDLCALL SDL_tolower(int x); - -extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len); - -#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x))) -#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x))) -#define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x))) - -/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */ -SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords) -{ -#ifdef __APPLE__ - memset_pattern4(dst, &val, dwords * 4); -#elif defined(__GNUC__) && defined(i386) - int u0, u1, u2; - __asm__ __volatile__ ( - "cld \n\t" - "rep ; stosl \n\t" - : "=&D" (u0), "=&a" (u1), "=&c" (u2) - : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords)) - : "memory" - ); -#else - size_t _n = (dwords + 3) / 4; - Uint32 *_p = SDL_static_cast(Uint32 *, dst); - Uint32 _val = (val); - if (dwords == 0) - return; - switch (dwords % 4) - { - case 0: do { *_p++ = _val; /* fallthrough */ - case 3: *_p++ = _val; /* fallthrough */ - case 2: *_p++ = _val; /* fallthrough */ - case 1: *_p++ = _val; /* fallthrough */ - } while ( --_n ); - } -#endif -} - -extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); - -extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); -extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len); - -extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr); -extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); -extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); -extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr); -extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle); - -extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2); -extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen); - -extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str); -extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen); -extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_bytes); -extern DECLSPEC size_t SDLCALL SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen); -extern DECLSPEC char *SDLCALL SDL_strdup(const char *str); -extern DECLSPEC char *SDLCALL SDL_strrev(char *str); -extern DECLSPEC char *SDLCALL SDL_strupr(char *str); -extern DECLSPEC char *SDLCALL SDL_strlwr(char *str); -extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c); -extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c); -extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle); -extern DECLSPEC char *SDLCALL SDL_strtokr(char *s1, const char *s2, char **saveptr); -extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str); - -extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix); -extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix); -extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix); -extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix); -extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix); -extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix); - -extern DECLSPEC int SDLCALL SDL_atoi(const char *str); -extern DECLSPEC double SDLCALL SDL_atof(const char *str); -extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base); -extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base); -extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base); -extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base); -extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp); - -extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2); -extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen); -extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2); -extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len); - -extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) SDL_SCANF_VARARG_FUNC(2); -extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap); -extern DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ... ) SDL_PRINTF_VARARG_FUNC(3); -extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap); - -#ifndef HAVE_M_PI -#ifndef M_PI -#define M_PI 3.14159265358979323846264338327950288 /**< pi */ -#endif -#endif - -extern DECLSPEC double SDLCALL SDL_acos(double x); -extern DECLSPEC float SDLCALL SDL_acosf(float x); -extern DECLSPEC double SDLCALL SDL_asin(double x); -extern DECLSPEC float SDLCALL SDL_asinf(float x); -extern DECLSPEC double SDLCALL SDL_atan(double x); -extern DECLSPEC float SDLCALL SDL_atanf(float x); -extern DECLSPEC double SDLCALL SDL_atan2(double x, double y); -extern DECLSPEC float SDLCALL SDL_atan2f(float x, float y); -extern DECLSPEC double SDLCALL SDL_ceil(double x); -extern DECLSPEC float SDLCALL SDL_ceilf(float x); -extern DECLSPEC double SDLCALL SDL_copysign(double x, double y); -extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y); -extern DECLSPEC double SDLCALL SDL_cos(double x); -extern DECLSPEC float SDLCALL SDL_cosf(float x); -extern DECLSPEC double SDLCALL SDL_exp(double x); -extern DECLSPEC float SDLCALL SDL_expf(float x); -extern DECLSPEC double SDLCALL SDL_fabs(double x); -extern DECLSPEC float SDLCALL SDL_fabsf(float x); -extern DECLSPEC double SDLCALL SDL_floor(double x); -extern DECLSPEC float SDLCALL SDL_floorf(float x); -extern DECLSPEC double SDLCALL SDL_fmod(double x, double y); -extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y); -extern DECLSPEC double SDLCALL SDL_log(double x); -extern DECLSPEC float SDLCALL SDL_logf(float x); -extern DECLSPEC double SDLCALL SDL_log10(double x); -extern DECLSPEC float SDLCALL SDL_log10f(float x); -extern DECLSPEC double SDLCALL SDL_pow(double x, double y); -extern DECLSPEC float SDLCALL SDL_powf(float x, float y); -extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n); -extern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n); -extern DECLSPEC double SDLCALL SDL_sin(double x); -extern DECLSPEC float SDLCALL SDL_sinf(float x); -extern DECLSPEC double SDLCALL SDL_sqrt(double x); -extern DECLSPEC float SDLCALL SDL_sqrtf(float x); -extern DECLSPEC double SDLCALL SDL_tan(double x); -extern DECLSPEC float SDLCALL SDL_tanf(float x); - -/* The SDL implementation of iconv() returns these error codes */ -#define SDL_ICONV_ERROR (size_t)-1 -#define SDL_ICONV_E2BIG (size_t)-2 -#define SDL_ICONV_EILSEQ (size_t)-3 -#define SDL_ICONV_EINVAL (size_t)-4 - -/* SDL_iconv_* are now always real symbols/types, not macros or inlined. */ -typedef struct _SDL_iconv_t *SDL_iconv_t; -extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, - const char *fromcode); -extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd); -extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, - size_t * inbytesleft, char **outbuf, - size_t * outbytesleft); -/** - * This function converts a string between encodings in one pass, returning a - * string that must be freed with SDL_free() or NULL on error. - */ -extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode, - const char *fromcode, - const char *inbuf, - size_t inbytesleft); -#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1) -#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1) -#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1) - -/* force builds using Clang's static analysis tools to use literal C runtime - here, since there are possibly tests that are ineffective otherwise. */ -#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS) -#define SDL_malloc malloc -#define SDL_calloc calloc -#define SDL_realloc realloc -#define SDL_free free -#define SDL_memset memset -#define SDL_memcpy memcpy -#define SDL_memmove memmove -#define SDL_memcmp memcmp -#define SDL_strlen strlen -#define SDL_strlcpy strlcpy -#define SDL_strlcat strlcat -#define SDL_strdup strdup -#define SDL_strchr strchr -#define SDL_strrchr strrchr -#define SDL_strstr strstr -#define SDL_strtokr strtok_r -#define SDL_strcmp strcmp -#define SDL_strncmp strncmp -#define SDL_strcasecmp strcasecmp -#define SDL_strncasecmp strncasecmp -#define SDL_sscanf sscanf -#define SDL_vsscanf vsscanf -#define SDL_snprintf snprintf -#define SDL_vsnprintf vsnprintf -#endif - -SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords) -{ - return SDL_memcpy(dst, src, dwords * 4); -} - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_stdinc_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_surface.h b/Dependencies/SDL/Windows/include/SDL_surface.h deleted file mode 100644 index 0f11d17..0000000 --- a/Dependencies/SDL/Windows/include/SDL_surface.h +++ /dev/null @@ -1,554 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_surface.h - * - * Header file for ::SDL_Surface definition and management functions. - */ - -#ifndef SDL_surface_h_ -#define SDL_surface_h_ - -#include "SDL_stdinc.h" -#include "SDL_pixels.h" -#include "SDL_rect.h" -#include "SDL_blendmode.h" -#include "SDL_rwops.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \name Surface flags - * - * These are the currently supported flags for the ::SDL_Surface. - * - * \internal - * Used internally (read-only). - */ -/* @{ */ -#define SDL_SWSURFACE 0 /**< Just here for compatibility */ -#define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */ -#define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */ -#define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */ -#define SDL_SIMD_ALIGNED 0x00000008 /**< Surface uses aligned memory */ -/* @} *//* Surface flags */ - -/** - * Evaluates to true if the surface needs to be locked before access. - */ -#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0) - -/** - * \brief A collection of pixels used in software blitting. - * - * \note This structure should be treated as read-only, except for \c pixels, - * which, if not NULL, contains the raw pixel data for the surface. - */ -typedef struct SDL_Surface -{ - Uint32 flags; /**< Read-only */ - SDL_PixelFormat *format; /**< Read-only */ - int w, h; /**< Read-only */ - int pitch; /**< Read-only */ - void *pixels; /**< Read-write */ - - /** Application data associated with the surface */ - void *userdata; /**< Read-write */ - - /** information needed for surfaces requiring locks */ - int locked; /**< Read-only */ - void *lock_data; /**< Read-only */ - - /** clipping information */ - SDL_Rect clip_rect; /**< Read-only */ - - /** info for fast blit mapping to other surfaces */ - struct SDL_BlitMap *map; /**< Private */ - - /** Reference count -- used when freeing surface */ - int refcount; /**< Read-mostly */ -} SDL_Surface; - -/** - * \brief The type of function used for surface blitting functions. - */ -typedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect, - struct SDL_Surface * dst, SDL_Rect * dstrect); - -/** - * \brief The formula used for converting between YUV and RGB - */ -typedef enum -{ - SDL_YUV_CONVERSION_JPEG, /**< Full range JPEG */ - SDL_YUV_CONVERSION_BT601, /**< BT.601 (the default) */ - SDL_YUV_CONVERSION_BT709, /**< BT.709 */ - SDL_YUV_CONVERSION_AUTOMATIC /**< BT.601 for SD content, BT.709 for HD content */ -} SDL_YUV_CONVERSION_MODE; - -/** - * Allocate and free an RGB surface. - * - * If the depth is 4 or 8 bits, an empty palette is allocated for the surface. - * If the depth is greater than 8 bits, the pixel format is set using the - * flags '[RGB]mask'. - * - * If the function runs out of memory, it will return NULL. - * - * \param flags The \c flags are obsolete and should be set to 0. - * \param width The width in pixels of the surface to create. - * \param height The height in pixels of the surface to create. - * \param depth The depth in bits of the surface to create. - * \param Rmask The red mask of the surface to create. - * \param Gmask The green mask of the surface to create. - * \param Bmask The blue mask of the surface to create. - * \param Amask The alpha mask of the surface to create. - */ -extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface - (Uint32 flags, int width, int height, int depth, - Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); - -/* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */ -extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat - (Uint32 flags, int width, int height, int depth, Uint32 format); - -extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels, - int width, - int height, - int depth, - int pitch, - Uint32 Rmask, - Uint32 Gmask, - Uint32 Bmask, - Uint32 Amask); -extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom - (void *pixels, int width, int height, int depth, int pitch, Uint32 format); -extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface); - -/** - * \brief Set the palette used by a surface. - * - * \return 0, or -1 if the surface format doesn't use a palette. - * - * \note A single palette can be shared with many surfaces. - */ -extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface, - SDL_Palette * palette); - -/** - * \brief Sets up a surface for directly accessing the pixels. - * - * Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write - * to and read from \c surface->pixels, using the pixel format stored in - * \c surface->format. Once you are done accessing the surface, you should - * use SDL_UnlockSurface() to release it. - * - * Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates - * to 0, then you can read and write to the surface at any time, and the - * pixel format of the surface will not change. - * - * No operating system or library calls should be made between lock/unlock - * pairs, as critical system locks may be held during this time. - * - * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. - * - * \sa SDL_UnlockSurface() - */ -extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface); -/** \sa SDL_LockSurface() */ -extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface); - -/** - * Load a surface from a seekable SDL data stream (memory or file). - * - * If \c freesrc is non-zero, the stream will be closed after being read. - * - * The new surface should be freed with SDL_FreeSurface(). - * - * \return the new surface, or NULL if there was an error. - */ -extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src, - int freesrc); - -/** - * Load a surface from a file. - * - * Convenience macro. - */ -#define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) - -/** - * Save a surface to a seekable SDL data stream (memory or file). - * - * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the - * BMP directly. Other RGB formats with 8-bit or higher get converted to a - * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit - * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are - * not supported. - * - * If \c freedst is non-zero, the stream will be closed after being written. - * - * \return 0 if successful or -1 if there was an error. - */ -extern DECLSPEC int SDLCALL SDL_SaveBMP_RW - (SDL_Surface * surface, SDL_RWops * dst, int freedst); - -/** - * Save a surface to a file. - * - * Convenience macro. - */ -#define SDL_SaveBMP(surface, file) \ - SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) - -/** - * \brief Sets the RLE acceleration hint for a surface. - * - * \return 0 on success, or -1 if the surface is not valid - * - * \note If RLE is enabled, colorkey and alpha blending blits are much faster, - * but the surface must be locked before directly accessing the pixels. - */ -extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface, - int flag); - -/** - * \brief Sets the color key (transparent pixel) in a blittable surface. - * - * \param surface The surface to update - * \param flag Non-zero to enable colorkey and 0 to disable colorkey - * \param key The transparent pixel in the native surface format - * - * \return 0 on success, or -1 if the surface is not valid - * - * You can pass SDL_RLEACCEL to enable RLE accelerated blits. - */ -extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface, - int flag, Uint32 key); - -/** - * \brief Returns whether the surface has a color key - * - * \return SDL_TRUE if the surface has a color key, or SDL_FALSE if the surface is NULL or has no color key - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface); - -/** - * \brief Gets the color key (transparent pixel) in a blittable surface. - * - * \param surface The surface to update - * \param key A pointer filled in with the transparent pixel in the native - * surface format - * - * \return 0 on success, or -1 if the surface is not valid or colorkey is not - * enabled. - */ -extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface, - Uint32 * key); - -/** - * \brief Set an additional color value used in blit operations. - * - * \param surface The surface to update. - * \param r The red color value multiplied into blit operations. - * \param g The green color value multiplied into blit operations. - * \param b The blue color value multiplied into blit operations. - * - * \return 0 on success, or -1 if the surface is not valid. - * - * \sa SDL_GetSurfaceColorMod() - */ -extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface, - Uint8 r, Uint8 g, Uint8 b); - - -/** - * \brief Get the additional color value used in blit operations. - * - * \param surface The surface to query. - * \param r A pointer filled in with the current red color value. - * \param g A pointer filled in with the current green color value. - * \param b A pointer filled in with the current blue color value. - * - * \return 0 on success, or -1 if the surface is not valid. - * - * \sa SDL_SetSurfaceColorMod() - */ -extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface, - Uint8 * r, Uint8 * g, - Uint8 * b); - -/** - * \brief Set an additional alpha value used in blit operations. - * - * \param surface The surface to update. - * \param alpha The alpha value multiplied into blit operations. - * - * \return 0 on success, or -1 if the surface is not valid. - * - * \sa SDL_GetSurfaceAlphaMod() - */ -extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface, - Uint8 alpha); - -/** - * \brief Get the additional alpha value used in blit operations. - * - * \param surface The surface to query. - * \param alpha A pointer filled in with the current alpha value. - * - * \return 0 on success, or -1 if the surface is not valid. - * - * \sa SDL_SetSurfaceAlphaMod() - */ -extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface, - Uint8 * alpha); - -/** - * \brief Set the blend mode used for blit operations. - * - * \param surface The surface to update. - * \param blendMode ::SDL_BlendMode to use for blit blending. - * - * \return 0 on success, or -1 if the parameters are not valid. - * - * \sa SDL_GetSurfaceBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface, - SDL_BlendMode blendMode); - -/** - * \brief Get the blend mode used for blit operations. - * - * \param surface The surface to query. - * \param blendMode A pointer filled in with the current blend mode. - * - * \return 0 on success, or -1 if the surface is not valid. - * - * \sa SDL_SetSurfaceBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface, - SDL_BlendMode *blendMode); - -/** - * Sets the clipping rectangle for the destination surface in a blit. - * - * If the clip rectangle is NULL, clipping will be disabled. - * - * If the clip rectangle doesn't intersect the surface, the function will - * return SDL_FALSE and blits will be completely clipped. Otherwise the - * function returns SDL_TRUE and blits to the surface will be clipped to - * the intersection of the surface area and the clipping rectangle. - * - * Note that blits are automatically clipped to the edges of the source - * and destination surfaces. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface, - const SDL_Rect * rect); - -/** - * Gets the clipping rectangle for the destination surface in a blit. - * - * \c rect must be a pointer to a valid rectangle which will be filled - * with the correct values. - */ -extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface, - SDL_Rect * rect); - -/* - * Creates a new surface identical to the existing surface - */ -extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface); - -/** - * Creates a new surface of the specified format, and then copies and maps - * the given surface to it so the blit of the converted surface will be as - * fast as possible. If this function fails, it returns NULL. - * - * The \c flags parameter is passed to SDL_CreateRGBSurface() and has those - * semantics. You can also pass ::SDL_RLEACCEL in the flags parameter and - * SDL will try to RLE accelerate colorkey and alpha blits in the resulting - * surface. - */ -extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface - (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags); -extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat - (SDL_Surface * src, Uint32 pixel_format, Uint32 flags); - -/** - * \brief Copy a block of pixels of one format to another format - * - * \return 0 on success, or -1 if there was an error - */ -extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, - Uint32 src_format, - const void * src, int src_pitch, - Uint32 dst_format, - void * dst, int dst_pitch); - -/** - * Performs a fast fill of the given rectangle with \c color. - * - * If \c rect is NULL, the whole surface will be filled with \c color. - * - * The color should be a pixel of the format used by the surface, and - * can be generated by the SDL_MapRGB() function. - * - * \return 0 on success, or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_FillRect - (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color); -extern DECLSPEC int SDLCALL SDL_FillRects - (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color); - -/** - * Performs a fast blit from the source surface to the destination surface. - * - * This assumes that the source and destination rectangles are - * the same size. If either \c srcrect or \c dstrect are NULL, the entire - * surface (\c src or \c dst) is copied. The final blit rectangles are saved - * in \c srcrect and \c dstrect after all clipping is performed. - * - * \return If the blit is successful, it returns 0, otherwise it returns -1. - * - * The blit function should not be called on a locked surface. - * - * The blit semantics for surfaces with and without blending and colorkey - * are defined as follows: - * \verbatim - RGBA->RGB: - Source surface blend mode set to SDL_BLENDMODE_BLEND: - alpha-blend (using the source alpha-channel and per-surface alpha) - SDL_SRCCOLORKEY ignored. - Source surface blend mode set to SDL_BLENDMODE_NONE: - copy RGB. - if SDL_SRCCOLORKEY set, only copy the pixels matching the - RGB values of the source color key, ignoring alpha in the - comparison. - - RGB->RGBA: - Source surface blend mode set to SDL_BLENDMODE_BLEND: - alpha-blend (using the source per-surface alpha) - Source surface blend mode set to SDL_BLENDMODE_NONE: - copy RGB, set destination alpha to source per-surface alpha value. - both: - if SDL_SRCCOLORKEY set, only copy the pixels matching the - source color key. - - RGBA->RGBA: - Source surface blend mode set to SDL_BLENDMODE_BLEND: - alpha-blend (using the source alpha-channel and per-surface alpha) - SDL_SRCCOLORKEY ignored. - Source surface blend mode set to SDL_BLENDMODE_NONE: - copy all of RGBA to the destination. - if SDL_SRCCOLORKEY set, only copy the pixels matching the - RGB values of the source color key, ignoring alpha in the - comparison. - - RGB->RGB: - Source surface blend mode set to SDL_BLENDMODE_BLEND: - alpha-blend (using the source per-surface alpha) - Source surface blend mode set to SDL_BLENDMODE_NONE: - copy RGB. - both: - if SDL_SRCCOLORKEY set, only copy the pixels matching the - source color key. - \endverbatim - * - * You should call SDL_BlitSurface() unless you know exactly how SDL - * blitting works internally and how to use the other blit functions. - */ -#define SDL_BlitSurface SDL_UpperBlit - -/** - * This is the public blit function, SDL_BlitSurface(), and it performs - * rectangle validation and clipping before passing it to SDL_LowerBlit() - */ -extern DECLSPEC int SDLCALL SDL_UpperBlit - (SDL_Surface * src, const SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect); - -/** - * This is a semi-private blit function and it performs low-level surface - * blitting only. - */ -extern DECLSPEC int SDLCALL SDL_LowerBlit - (SDL_Surface * src, SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect); - -/** - * \brief Perform a fast, low quality, stretch blit between two surfaces of the - * same pixel format. - * - * \note This function uses a static buffer, and is not thread-safe. - */ -extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src, - const SDL_Rect * srcrect, - SDL_Surface * dst, - const SDL_Rect * dstrect); - -#define SDL_BlitScaled SDL_UpperBlitScaled - -/** - * This is the public scaled blit function, SDL_BlitScaled(), and it performs - * rectangle validation and clipping before passing it to SDL_LowerBlitScaled() - */ -extern DECLSPEC int SDLCALL SDL_UpperBlitScaled - (SDL_Surface * src, const SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect); - -/** - * This is a semi-private blit function and it performs low-level surface - * scaled blitting only. - */ -extern DECLSPEC int SDLCALL SDL_LowerBlitScaled - (SDL_Surface * src, SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect); - -/** - * \brief Set the YUV conversion mode - */ -extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode); - -/** - * \brief Get the YUV conversion mode - */ -extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void); - -/** - * \brief Get the YUV conversion mode, returning the correct mode for the resolution when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC - */ -extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_surface_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_system.h b/Dependencies/SDL/Windows/include/SDL_system.h deleted file mode 100644 index d7974eb..0000000 --- a/Dependencies/SDL/Windows/include/SDL_system.h +++ /dev/null @@ -1,316 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_system.h - * - * Include file for platform specific SDL API functions - */ - -#ifndef SDL_system_h_ -#define SDL_system_h_ - -#include "SDL_stdinc.h" -#include "SDL_keyboard.h" -#include "SDL_render.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - - -/* Platform specific functions for Windows */ -#ifdef __WIN32__ - -/** - \brief Set a function that is called for every windows message, before TranslateMessage() -*/ -typedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam); -extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata); - -/** - \brief Returns the D3D9 adapter index that matches the specified display index. - - This adapter index can be passed to IDirect3D9::CreateDevice and controls - on which monitor a full screen application will appear. -*/ -extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex ); - -typedef struct IDirect3DDevice9 IDirect3DDevice9; -/** - \brief Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer. - - Once you are done using the device, you should release it to avoid a resource leak. - */ -extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer); - -/** - \brief Returns the DXGI Adapter and Output indices for the specified display index. - - These can be passed to EnumAdapters and EnumOutputs respectively to get the objects - required to create a DX10 or DX11 device and swap chain. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex ); - -#endif /* __WIN32__ */ - - -/* Platform specific functions for Linux */ -#ifdef __LINUX__ - -/** - \brief Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available. - - \return 0 on success, or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority); - -#endif /* __LINUX__ */ - -/* Platform specific functions for iOS */ -#ifdef __IPHONEOS__ - -#define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam) -extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam); - -#define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled) -extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled); - -#endif /* __IPHONEOS__ */ - - -/* Platform specific functions for Android */ -#ifdef __ANDROID__ - -/** - \brief Get the JNI environment for the current thread - - This returns JNIEnv*, but the prototype is void* so we don't need jni.h - */ -extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void); - -/** - \brief Get the SDL Activity object for the application - - This returns jobject, but the prototype is void* so we don't need jni.h - The jobject returned by SDL_AndroidGetActivity is a local reference. - It is the caller's responsibility to properly release it - (using env->Push/PopLocalFrame or manually with env->DeleteLocalRef) - */ -extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void); - -/** - \brief Return API level of the current device - - API level 29: Android 10 - API level 28: Android 9 - API level 27: Android 8.1 - API level 26: Android 8.0 - API level 25: Android 7.1 - API level 24: Android 7.0 - API level 23: Android 6.0 - API level 22: Android 5.1 - API level 21: Android 5.0 - API level 20: Android 4.4W - API level 19: Android 4.4 - API level 18: Android 4.3 - API level 17: Android 4.2 - API level 16: Android 4.1 - API level 15: Android 4.0.3 - API level 14: Android 4.0 - API level 13: Android 3.2 - API level 12: Android 3.1 - API level 11: Android 3.0 - API level 10: Android 2.3.3 - */ -extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void); - -/** - \brief Return true if the application is running on Android TV - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void); - -/** - \brief Return true if the application is running on a Chromebook - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void); - -/** - \brief Return true is the application is running on a Samsung DeX docking station - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void); - -/** - \brief Trigger the Android system back button behavior. - */ -extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void); - -/** - See the official Android developer guide for more information: - http://developer.android.com/guide/topics/data/data-storage.html -*/ -#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01 -#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02 - -/** - \brief Get the path used for internal storage for this application. - - This path is unique to your application and cannot be written to - by other applications. - */ -extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void); - -/** - \brief Get the current state of external storage, a bitmask of these values: - SDL_ANDROID_EXTERNAL_STORAGE_READ - SDL_ANDROID_EXTERNAL_STORAGE_WRITE - - If external storage is currently unavailable, this will return 0. -*/ -extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void); - -/** - \brief Get the path used for external storage for this application. - - This path is unique to your application, but is public and can be - written to by other applications. - */ -extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void); - -#endif /* __ANDROID__ */ - -/* Platform specific functions for WinRT */ -#ifdef __WINRT__ - -/** - * \brief WinRT / Windows Phone path types - */ -typedef enum -{ - /** \brief The installed app's root directory. - Files here are likely to be read-only. */ - SDL_WINRT_PATH_INSTALLED_LOCATION, - - /** \brief The app's local data store. Files may be written here */ - SDL_WINRT_PATH_LOCAL_FOLDER, - - /** \brief The app's roaming data store. Unsupported on Windows Phone. - Files written here may be copied to other machines via a network - connection. - */ - SDL_WINRT_PATH_ROAMING_FOLDER, - - /** \brief The app's temporary data store. Unsupported on Windows Phone. - Files written here may be deleted at any time. */ - SDL_WINRT_PATH_TEMP_FOLDER -} SDL_WinRT_Path; - - -/** - * \brief WinRT Device Family - */ -typedef enum -{ - /** \brief Unknown family */ - SDL_WINRT_DEVICEFAMILY_UNKNOWN, - - /** \brief Desktop family*/ - SDL_WINRT_DEVICEFAMILY_DESKTOP, - - /** \brief Mobile family (for example smartphone) */ - SDL_WINRT_DEVICEFAMILY_MOBILE, - - /** \brief XBox family */ - SDL_WINRT_DEVICEFAMILY_XBOX, -} SDL_WinRT_DeviceFamily; - - -/** - * \brief Retrieves a WinRT defined path on the local file system - * - * \note Documentation on most app-specific path types on WinRT - * can be found on MSDN, at the URL: - * http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx - * - * \param pathType The type of path to retrieve. - * \return A UCS-2 string (16-bit, wide-char) containing the path, or NULL - * if the path is not available for any reason. Not all paths are - * available on all versions of Windows. This is especially true on - * Windows Phone. Check the documentation for the given - * SDL_WinRT_Path for more information on which path types are - * supported where. - */ -extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType); - -/** - * \brief Retrieves a WinRT defined path on the local file system - * - * \note Documentation on most app-specific path types on WinRT - * can be found on MSDN, at the URL: - * http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx - * - * \param pathType The type of path to retrieve. - * \return A UTF-8 string (8-bit, multi-byte) containing the path, or NULL - * if the path is not available for any reason. Not all paths are - * available on all versions of Windows. This is especially true on - * Windows Phone. Check the documentation for the given - * SDL_WinRT_Path for more information on which path types are - * supported where. - */ -extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType); - -/** - * \brief Detects the device family of WinRT plattform on runtime - * - * \return Device family - */ -extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily(); - -#endif /* __WINRT__ */ - -/** - \brief Return true if the current device is a tablet. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void); - -/* Functions used by iOS application delegates to notify SDL about state changes */ -extern DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void); -extern DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void); -extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void); -extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void); -extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void); -extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void); -#ifdef __IPHONEOS__ -extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void); -#endif - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_system_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_syswm.h b/Dependencies/SDL/Windows/include/SDL_syswm.h deleted file mode 100644 index e877b2a..0000000 --- a/Dependencies/SDL/Windows/include/SDL_syswm.h +++ /dev/null @@ -1,331 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_syswm.h - * - * Include file for SDL custom system window manager hooks. - */ - -#ifndef SDL_syswm_h_ -#define SDL_syswm_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_video.h" -#include "SDL_version.h" - -/** - * \brief SDL_syswm.h - * - * Your application has access to a special type of event ::SDL_SYSWMEVENT, - * which contains window-manager specific information and arrives whenever - * an unhandled window event occurs. This event is ignored by default, but - * you can enable it with SDL_EventState(). - */ -struct SDL_SysWMinfo; - -#if !defined(SDL_PROTOTYPES_ONLY) - -#if defined(SDL_VIDEO_DRIVER_WINDOWS) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#ifndef NOMINMAX /* don't define min() and max(). */ -#define NOMINMAX -#endif -#include -#endif - -#if defined(SDL_VIDEO_DRIVER_WINRT) -#include -#endif - -/* This is the structure for custom window manager events */ -#if defined(SDL_VIDEO_DRIVER_X11) -#if defined(__APPLE__) && defined(__MACH__) -/* conflicts with Quickdraw.h */ -#define Cursor X11Cursor -#endif - -#include -#include - -#if defined(__APPLE__) && defined(__MACH__) -/* matches the re-define above */ -#undef Cursor -#endif - -#endif /* defined(SDL_VIDEO_DRIVER_X11) */ - -#if defined(SDL_VIDEO_DRIVER_DIRECTFB) -#include -#endif - -#if defined(SDL_VIDEO_DRIVER_COCOA) -#ifdef __OBJC__ -@class NSWindow; -#else -typedef struct _NSWindow NSWindow; -#endif -#endif - -#if defined(SDL_VIDEO_DRIVER_UIKIT) -#ifdef __OBJC__ -#include -#else -typedef struct _UIWindow UIWindow; -typedef struct _UIViewController UIViewController; -#endif -typedef Uint32 GLuint; -#endif - -#if defined(SDL_VIDEO_DRIVER_ANDROID) -typedef struct ANativeWindow ANativeWindow; -typedef void *EGLSurface; -#endif - -#if defined(SDL_VIDEO_DRIVER_VIVANTE) -#include "SDL_egl.h" -#endif -#endif /* SDL_PROTOTYPES_ONLY */ - - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined(SDL_PROTOTYPES_ONLY) -/** - * These are the various supported windowing subsystems - */ -typedef enum -{ - SDL_SYSWM_UNKNOWN, - SDL_SYSWM_WINDOWS, - SDL_SYSWM_X11, - SDL_SYSWM_DIRECTFB, - SDL_SYSWM_COCOA, - SDL_SYSWM_UIKIT, - SDL_SYSWM_WAYLAND, - SDL_SYSWM_MIR, /* no longer available, left for API/ABI compatibility. Remove in 2.1! */ - SDL_SYSWM_WINRT, - SDL_SYSWM_ANDROID, - SDL_SYSWM_VIVANTE, - SDL_SYSWM_OS2, - SDL_SYSWM_HAIKU -} SDL_SYSWM_TYPE; - -/** - * The custom event structure. - */ -struct SDL_SysWMmsg -{ - SDL_version version; - SDL_SYSWM_TYPE subsystem; - union - { -#if defined(SDL_VIDEO_DRIVER_WINDOWS) - struct { - HWND hwnd; /**< The window for the message */ - UINT msg; /**< The type of message */ - WPARAM wParam; /**< WORD message parameter */ - LPARAM lParam; /**< LONG message parameter */ - } win; -#endif -#if defined(SDL_VIDEO_DRIVER_X11) - struct { - XEvent event; - } x11; -#endif -#if defined(SDL_VIDEO_DRIVER_DIRECTFB) - struct { - DFBEvent event; - } dfb; -#endif -#if defined(SDL_VIDEO_DRIVER_COCOA) - struct - { - /* Latest version of Xcode clang complains about empty structs in C v. C++: - error: empty struct has size 0 in C, size 1 in C++ - */ - int dummy; - /* No Cocoa window events yet */ - } cocoa; -#endif -#if defined(SDL_VIDEO_DRIVER_UIKIT) - struct - { - int dummy; - /* No UIKit window events yet */ - } uikit; -#endif -#if defined(SDL_VIDEO_DRIVER_VIVANTE) - struct - { - int dummy; - /* No Vivante window events yet */ - } vivante; -#endif - /* Can't have an empty union */ - int dummy; - } msg; -}; - -/** - * The custom window manager information structure. - * - * When this structure is returned, it holds information about which - * low level system it is using, and will be one of SDL_SYSWM_TYPE. - */ -struct SDL_SysWMinfo -{ - SDL_version version; - SDL_SYSWM_TYPE subsystem; - union - { -#if defined(SDL_VIDEO_DRIVER_WINDOWS) - struct - { - HWND window; /**< The window handle */ - HDC hdc; /**< The window device context */ - HINSTANCE hinstance; /**< The instance handle */ - } win; -#endif -#if defined(SDL_VIDEO_DRIVER_WINRT) - struct - { - IInspectable * window; /**< The WinRT CoreWindow */ - } winrt; -#endif -#if defined(SDL_VIDEO_DRIVER_X11) - struct - { - Display *display; /**< The X11 display */ - Window window; /**< The X11 window */ - } x11; -#endif -#if defined(SDL_VIDEO_DRIVER_DIRECTFB) - struct - { - IDirectFB *dfb; /**< The directfb main interface */ - IDirectFBWindow *window; /**< The directfb window handle */ - IDirectFBSurface *surface; /**< The directfb client surface */ - } dfb; -#endif -#if defined(SDL_VIDEO_DRIVER_COCOA) - struct - { -#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc) - NSWindow __unsafe_unretained *window; /**< The Cocoa window */ -#else - NSWindow *window; /**< The Cocoa window */ -#endif - } cocoa; -#endif -#if defined(SDL_VIDEO_DRIVER_UIKIT) - struct - { -#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc) - UIWindow __unsafe_unretained *window; /**< The UIKit window */ -#else - UIWindow *window; /**< The UIKit window */ -#endif - GLuint framebuffer; /**< The GL view's Framebuffer Object. It must be bound when rendering to the screen using GL. */ - GLuint colorbuffer; /**< The GL view's color Renderbuffer Object. It must be bound when SDL_GL_SwapWindow is called. */ - GLuint resolveFramebuffer; /**< The Framebuffer Object which holds the resolve color Renderbuffer, when MSAA is used. */ - } uikit; -#endif -#if defined(SDL_VIDEO_DRIVER_WAYLAND) - struct - { - struct wl_display *display; /**< Wayland display */ - struct wl_surface *surface; /**< Wayland surface */ - struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */ - } wl; -#endif -#if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */ - struct - { - void *connection; /**< Mir display server connection */ - void *surface; /**< Mir surface */ - } mir; -#endif - -#if defined(SDL_VIDEO_DRIVER_ANDROID) - struct - { - ANativeWindow *window; - EGLSurface surface; - } android; -#endif - -#if defined(SDL_VIDEO_DRIVER_VIVANTE) - struct - { - EGLNativeDisplayType display; - EGLNativeWindowType window; - } vivante; -#endif - - /* Make sure this union is always 64 bytes (8 64-bit pointers). */ - /* Be careful not to overflow this if you add a new target! */ - Uint8 dummy[64]; - } info; -}; - -#endif /* SDL_PROTOTYPES_ONLY */ - -typedef struct SDL_SysWMinfo SDL_SysWMinfo; - -/* Function prototypes */ -/** - * \brief This function allows access to driver-dependent window information. - * - * \param window The window about which information is being requested - * \param info This structure must be initialized with the SDL version, and is - * then filled in with information about the given window. - * - * \return SDL_TRUE if the function is implemented and the version member of - * the \c info struct is valid, SDL_FALSE otherwise. - * - * You typically use this function like this: - * \code - * SDL_SysWMinfo info; - * SDL_VERSION(&info.version); - * if ( SDL_GetWindowWMInfo(window, &info) ) { ... } - * \endcode - */ -extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window, - SDL_SysWMinfo * info); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_syswm_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test.h b/Dependencies/SDL/Windows/include/SDL_test.h deleted file mode 100644 index 7095427..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -#ifndef SDL_test_h_ -#define SDL_test_h_ - -#include "SDL.h" -#include "SDL_test_assert.h" -#include "SDL_test_common.h" -#include "SDL_test_compare.h" -#include "SDL_test_crc32.h" -#include "SDL_test_font.h" -#include "SDL_test_fuzzer.h" -#include "SDL_test_harness.h" -#include "SDL_test_images.h" -#include "SDL_test_log.h" -#include "SDL_test_md5.h" -#include "SDL_test_memory.h" -#include "SDL_test_random.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* Global definitions */ - -/* - * Note: Maximum size of SDLTest log message is less than SDL's limit - * to ensure we can fit additional information such as the timestamp. - */ -#define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584 - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_assert.h b/Dependencies/SDL/Windows/include/SDL_test_assert.h deleted file mode 100644 index 19b9095..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_assert.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_assert.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -/* - * - * Assert API for test code and test cases - * - */ - -#ifndef SDL_test_assert_h_ -#define SDL_test_assert_h_ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Fails the assert. - */ -#define ASSERT_FAIL 0 - -/** - * \brief Passes the assert. - */ -#define ASSERT_PASS 1 - -/** - * \brief Assert that logs and break execution flow on failures. - * - * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). - * \param assertDescription Message to log with the assert describing it. - */ -void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters. - * - * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). - * \param assertDescription Message to log with the assert describing it. - * - * \returns Returns the assertCondition so it can be used to externally to break execution flow if desired. - */ -int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Explicitly pass without checking an assertion condition. Updates assertion counter. - * - * \param assertDescription Message to log with the assert describing it. - */ -void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1); - -/** - * \brief Resets the assert summary counters to zero. - */ -void SDLTest_ResetAssertSummary(void); - -/** - * \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. - */ -void SDLTest_LogAssertSummary(void); - - -/** - * \brief Converts the current assert summary state to a test result. - * - * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT - */ -int SDLTest_AssertSummaryToTestResult(void); - -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_assert_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_common.h b/Dependencies/SDL/Windows/include/SDL_test_common.h deleted file mode 100644 index 3ad2030..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_common.h +++ /dev/null @@ -1,218 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_common.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -/* Ported from original test\common.h file. */ - -#ifndef SDL_test_common_h_ -#define SDL_test_common_h_ - -#include "SDL.h" - -#if defined(__PSP__) -#define DEFAULT_WINDOW_WIDTH 480 -#define DEFAULT_WINDOW_HEIGHT 272 -#else -#define DEFAULT_WINDOW_WIDTH 640 -#define DEFAULT_WINDOW_HEIGHT 480 -#endif - -#define VERBOSE_VIDEO 0x00000001 -#define VERBOSE_MODES 0x00000002 -#define VERBOSE_RENDER 0x00000004 -#define VERBOSE_EVENT 0x00000008 -#define VERBOSE_AUDIO 0x00000010 - -typedef struct -{ - /* SDL init flags */ - char **argv; - Uint32 flags; - Uint32 verbose; - - /* Video info */ - const char *videodriver; - int display; - const char *window_title; - const char *window_icon; - Uint32 window_flags; - int window_x; - int window_y; - int window_w; - int window_h; - int window_minW; - int window_minH; - int window_maxW; - int window_maxH; - int logical_w; - int logical_h; - float scale; - int depth; - int refresh_rate; - int num_windows; - SDL_Window **windows; - - /* Renderer info */ - const char *renderdriver; - Uint32 render_flags; - SDL_bool skip_renderer; - SDL_Renderer **renderers; - SDL_Texture **targets; - - /* Audio info */ - const char *audiodriver; - SDL_AudioSpec audiospec; - - /* GL settings */ - int gl_red_size; - int gl_green_size; - int gl_blue_size; - int gl_alpha_size; - int gl_buffer_size; - int gl_depth_size; - int gl_stencil_size; - int gl_double_buffer; - int gl_accum_red_size; - int gl_accum_green_size; - int gl_accum_blue_size; - int gl_accum_alpha_size; - int gl_stereo; - int gl_multisamplebuffers; - int gl_multisamplesamples; - int gl_retained_backing; - int gl_accelerated; - int gl_major_version; - int gl_minor_version; - int gl_debug; - int gl_profile_mask; -} SDLTest_CommonState; - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* Function prototypes */ - -/** - * \brief Parse command line parameters and create common state. - * - * \param argv Array of command line parameters - * \param flags Flags indicating which subsystem to initialize (i.e. SDL_INIT_VIDEO | SDL_INIT_AUDIO) - * - * \returns Returns a newly allocated common state object. - */ -SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags); - -/** - * \brief Process one common argument. - * - * \param state The common state describing the test window to create. - * \param index The index of the argument to process in argv[]. - * - * \returns The number of arguments processed (i.e. 1 for --fullscreen, 2 for --video [videodriver], or -1 on error. - */ -int SDLTest_CommonArg(SDLTest_CommonState * state, int index); - - -/** - * \brief Logs command line usage info. - * - * This logs the appropriate command line options for the subsystems in use - * plus other common options, and then any application-specific options. - * This uses the SDL_Log() function and splits up output to be friendly to - * 80-character-wide terminals. - * - * \param state The common state describing the test window for the app. - * \param argv0 argv[0], as passed to main/SDL_main. - * \param options an array of strings for application specific options. The last element of the array should be NULL. - */ -void SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options); - -/** - * \brief Returns common usage information - * - * You should (probably) be using SDLTest_CommonLogUsage() instead, but this - * function remains for binary compatibility. Strings returned from this - * function are valid until SDLTest_CommonQuit() is called, in which case - * those strings' memory is freed and can no longer be used. - * - * \param state The common state describing the test window to create. - * \returns String with usage information - */ -const char *SDLTest_CommonUsage(SDLTest_CommonState * state); - -/** - * \brief Open test window. - * - * \param state The common state describing the test window to create. - * - * \returns True if initialization succeeded, false otherwise - */ -SDL_bool SDLTest_CommonInit(SDLTest_CommonState * state); - -/** - * \brief Easy argument handling when test app doesn't need any custom args. - * - * \param state The common state describing the test window to create. - * \param argc argc, as supplied to SDL_main - * \param argv argv, as supplied to SDL_main - * - * \returns False if app should quit, true otherwise. - */ -SDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState * state, const int argc, char **argv); - -/** - * \brief Common event handler for test windows. - * - * \param state The common state used to create test window. - * \param event The event to handle. - * \param done Flag indicating we are done. - * - */ -void SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done); - -/** - * \brief Close test window. - * - * \param state The common state used to create test window. - * - */ -void SDLTest_CommonQuit(SDLTest_CommonState * state); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_common_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_compare.h b/Dependencies/SDL/Windows/include/SDL_test_compare.h deleted file mode 100644 index 38b22bb..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_compare.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_compare.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -/* - - Defines comparison functions (i.e. for surfaces). - -*/ - -#ifndef SDL_test_compare_h_ -#define SDL_test_compare_h_ - -#include "SDL.h" - -#include "SDL_test_images.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Compares a surface and with reference image data for equality - * - * \param surface Surface used in comparison - * \param referenceSurface Test Surface used in comparison - * \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy. - * - * \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ. - */ -int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_compare_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_crc32.h b/Dependencies/SDL/Windows/include/SDL_test_crc32.h deleted file mode 100644 index 611066a..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_crc32.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_crc32.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -/* - - Implements CRC32 calculations (default output is Perl String::CRC32 compatible). - -*/ - -#ifndef SDL_test_crc32_h_ -#define SDL_test_crc32_h_ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - - -/* ------------ Definitions --------- */ - -/* Definition shared by all CRC routines */ - -#ifndef CrcUint32 - #define CrcUint32 unsigned int -#endif -#ifndef CrcUint8 - #define CrcUint8 unsigned char -#endif - -#ifdef ORIGINAL_METHOD - #define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */ -#else - #define CRC32_POLY 0xEDB88320 /* Perl String::CRC32 compatible */ -#endif - -/** - * Data structure for CRC32 (checksum) computation - */ - typedef struct { - CrcUint32 crc32_table[256]; /* CRC table */ - } SDLTest_Crc32Context; - -/* ---------- Function Prototypes ------------- */ - -/** - * \brief Initialize the CRC context - * - * Note: The function initializes the crc table required for all crc calculations. - * - * \param crcContext pointer to context variable - * - * \returns 0 for OK, -1 on error - * - */ - int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext); - - -/** - * \brief calculate a crc32 from a data block - * - * \param crcContext pointer to context variable - * \param inBuf input buffer to checksum - * \param inLen length of input buffer - * \param crc32 pointer to Uint32 to store the final CRC into - * - * \returns 0 for OK, -1 on error - * - */ -int SDLTest_Crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); - -/* Same routine broken down into three steps */ -int SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32); -int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32); -int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); - - -/** - * \brief clean up CRC context - * - * \param crcContext pointer to context variable - * - * \returns 0 for OK, -1 on error - * -*/ - -int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_crc32_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_font.h b/Dependencies/SDL/Windows/include/SDL_test_font.h deleted file mode 100644 index dc4ce6d..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_font.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_font.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -#ifndef SDL_test_font_h_ -#define SDL_test_font_h_ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* Function prototypes */ - -#define FONT_CHARACTER_SIZE 8 - -/** - * \brief Draw a string in the currently set font. - * - * \param renderer The renderer to draw on. - * \param x The X coordinate of the upper left corner of the character. - * \param y The Y coordinate of the upper left corner of the character. - * \param c The character to draw. - * - * \returns Returns 0 on success, -1 on failure. - */ -int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c); - -/** - * \brief Draw a string in the currently set font. - * - * \param renderer The renderer to draw on. - * \param x The X coordinate of the upper left corner of the string. - * \param y The Y coordinate of the upper left corner of the string. - * \param s The string to draw. - * - * \returns Returns 0 on success, -1 on failure. - */ -int SDLTest_DrawString(SDL_Renderer *renderer, int x, int y, const char *s); - - -/** - * \brief Cleanup textures used by font drawing functions. - */ -void SDLTest_CleanupTextDrawing(void); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_font_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_fuzzer.h b/Dependencies/SDL/Windows/include/SDL_test_fuzzer.h deleted file mode 100644 index cb5a17a..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_fuzzer.h +++ /dev/null @@ -1,384 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_fuzzer.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -/* - - Data generators for fuzzing test data in a reproducible way. - -*/ - -#ifndef SDL_test_fuzzer_h_ -#define SDL_test_fuzzer_h_ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - - -/* - Based on GSOC code by Markus Kauppila -*/ - - -/** - * \file - * Note: The fuzzer implementation uses a static instance of random context - * internally which makes it thread-UNsafe. - */ - -/** - * Initializes the fuzzer for a test - * - * \param execKey Execution "Key" that initializes the random number generator uniquely for the test. - * - */ -void SDLTest_FuzzerInit(Uint64 execKey); - - -/** - * Returns a random Uint8 - * - * \returns Generated integer - */ -Uint8 SDLTest_RandomUint8(void); - -/** - * Returns a random Sint8 - * - * \returns Generated signed integer - */ -Sint8 SDLTest_RandomSint8(void); - - -/** - * Returns a random Uint16 - * - * \returns Generated integer - */ -Uint16 SDLTest_RandomUint16(void); - -/** - * Returns a random Sint16 - * - * \returns Generated signed integer - */ -Sint16 SDLTest_RandomSint16(void); - - -/** - * Returns a random integer - * - * \returns Generated integer - */ -Sint32 SDLTest_RandomSint32(void); - - -/** - * Returns a random positive integer - * - * \returns Generated integer - */ -Uint32 SDLTest_RandomUint32(void); - -/** - * Returns random Uint64. - * - * \returns Generated integer - */ -Uint64 SDLTest_RandomUint64(void); - - -/** - * Returns random Sint64. - * - * \returns Generated signed integer - */ -Sint64 SDLTest_RandomSint64(void); - -/** - * \returns random float in range [0.0 - 1.0[ - */ -float SDLTest_RandomUnitFloat(void); - -/** - * \returns random double in range [0.0 - 1.0[ - */ -double SDLTest_RandomUnitDouble(void); - -/** - * \returns random float. - * - */ -float SDLTest_RandomFloat(void); - -/** - * \returns random double. - * - */ -double SDLTest_RandomDouble(void); - -/** - * Returns a random boundary value for Uint8 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomUint8BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 - * RandomUint8BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21 - * RandomUint8BoundaryValue(0, 99, SDL_FALSE) returns 100 - * RandomUint8BoundaryValue(0, 255, SDL_FALSE) returns 0 (error set) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid (=within the bounds) or not? - * - * \returns Random boundary value for the given range and domain or 0 with error set - */ -Uint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain); - -/** - * Returns a random boundary value for Uint16 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomUint16BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 - * RandomUint16BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21 - * RandomUint16BoundaryValue(0, 99, SDL_FALSE) returns 100 - * RandomUint16BoundaryValue(0, 0xFFFF, SDL_FALSE) returns 0 (error set) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid (=within the bounds) or not? - * - * \returns Random boundary value for the given range and domain or 0 with error set - */ -Uint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain); - -/** - * Returns a random boundary value for Uint32 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomUint32BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 - * RandomUint32BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21 - * RandomUint32BoundaryValue(0, 99, SDL_FALSE) returns 100 - * RandomUint32BoundaryValue(0, 0xFFFFFFFF, SDL_FALSE) returns 0 (with error set) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid (=within the bounds) or not? - * - * \returns Random boundary value for the given range and domain or 0 with error set - */ -Uint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain); - -/** - * Returns a random boundary value for Uint64 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomUint64BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 - * RandomUint64BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21 - * RandomUint64BoundaryValue(0, 99, SDL_FALSE) returns 100 - * RandomUint64BoundaryValue(0, 0xFFFFFFFFFFFFFFFF, SDL_FALSE) returns 0 (with error set) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid (=within the bounds) or not? - * - * \returns Random boundary value for the given range and domain or 0 with error set - */ -Uint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain); - -/** - * Returns a random boundary value for Sint8 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomSint8BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20 - * RandomSint8BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9 - * RandomSint8BoundaryValue(SINT8_MIN, 99, SDL_FALSE) returns 100 - * RandomSint8BoundaryValue(SINT8_MIN, SINT8_MAX, SDL_FALSE) returns SINT8_MIN (== error value) with error set - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid (=within the bounds) or not? - * - * \returns Random boundary value for the given range and domain or SINT8_MIN with error set - */ -Sint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain); - - -/** - * Returns a random boundary value for Sint16 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomSint16BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20 - * RandomSint16BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9 - * RandomSint16BoundaryValue(SINT16_MIN, 99, SDL_FALSE) returns 100 - * RandomSint16BoundaryValue(SINT16_MIN, SINT16_MAX, SDL_FALSE) returns SINT16_MIN (== error value) with error set - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid (=within the bounds) or not? - * - * \returns Random boundary value for the given range and domain or SINT16_MIN with error set - */ -Sint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain); - -/** - * Returns a random boundary value for Sint32 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomSint32BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20 - * RandomSint32BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9 - * RandomSint32BoundaryValue(SINT32_MIN, 99, SDL_FALSE) returns 100 - * RandomSint32BoundaryValue(SINT32_MIN, SINT32_MAX, SDL_FALSE) returns SINT32_MIN (== error value) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid (=within the bounds) or not? - * - * \returns Random boundary value for the given range and domain or SINT32_MIN with error set - */ -Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain); - -/** - * Returns a random boundary value for Sint64 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomSint64BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20 - * RandomSint64BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9 - * RandomSint64BoundaryValue(SINT64_MIN, 99, SDL_FALSE) returns 100 - * RandomSint64BoundaryValue(SINT64_MIN, SINT64_MAX, SDL_FALSE) returns SINT64_MIN (== error value) and error set - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid (=within the bounds) or not? - * - * \returns Random boundary value for the given range and domain or SINT64_MIN with error set - */ -Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain); - - -/** - * Returns integer in range [min, max] (inclusive). - * Min and max values can be negative values. - * If Max in smaller than min, then the values are swapped. - * Min and max are the same value, that value will be returned. - * - * \param min Minimum inclusive value of returned random number - * \param max Maximum inclusive value of returned random number - * - * \returns Generated random integer in range - */ -Sint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max); - - -/** - * Generates random null-terminated string. The minimum length for - * the string is 1 character, maximum length for the string is 255 - * characters and it can contain ASCII characters from 32 to 126. - * - * Note: Returned string needs to be deallocated. - * - * \returns Newly allocated random string; or NULL if length was invalid or string could not be allocated. - */ -char * SDLTest_RandomAsciiString(void); - - -/** - * Generates random null-terminated string. The maximum length for - * the string is defined by the maxLength parameter. - * String can contain ASCII characters from 32 to 126. - * - * Note: Returned string needs to be deallocated. - * - * \param maxLength The maximum length of the generated string. - * - * \returns Newly allocated random string; or NULL if maxLength was invalid or string could not be allocated. - */ -char * SDLTest_RandomAsciiStringWithMaximumLength(int maxLength); - - -/** - * Generates random null-terminated string. The length for - * the string is defined by the size parameter. - * String can contain ASCII characters from 32 to 126. - * - * Note: Returned string needs to be deallocated. - * - * \param size The length of the generated string - * - * \returns Newly allocated random string; or NULL if size was invalid or string could not be allocated. - */ -char * SDLTest_RandomAsciiStringOfSize(int size); - -/** - * Returns the invocation count for the fuzzer since last ...FuzzerInit. - */ -int SDLTest_GetFuzzerInvocationCount(void); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_fuzzer_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_harness.h b/Dependencies/SDL/Windows/include/SDL_test_harness.h deleted file mode 100644 index 97d9812..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_harness.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_harness.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -/* - Defines types for test case definitions and the test execution harness API. - - Based on original GSOC code by Markus Kauppila -*/ - -#ifndef SDL_test_h_arness_h -#define SDL_test_h_arness_h - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - - -/* ! Definitions for test case structures */ -#define TEST_ENABLED 1 -#define TEST_DISABLED 0 - -/* ! Definition of all the possible test return values of the test case method */ -#define TEST_ABORTED -1 -#define TEST_STARTED 0 -#define TEST_COMPLETED 1 -#define TEST_SKIPPED 2 - -/* ! Definition of all the possible test results for the harness */ -#define TEST_RESULT_PASSED 0 -#define TEST_RESULT_FAILED 1 -#define TEST_RESULT_NO_ASSERT 2 -#define TEST_RESULT_SKIPPED 3 -#define TEST_RESULT_SETUP_FAILURE 4 - -/* !< Function pointer to a test case setup function (run before every test) */ -typedef void (*SDLTest_TestCaseSetUpFp)(void *arg); - -/* !< Function pointer to a test case function */ -typedef int (*SDLTest_TestCaseFp)(void *arg); - -/* !< Function pointer to a test case teardown function (run after every test) */ -typedef void (*SDLTest_TestCaseTearDownFp)(void *arg); - -/** - * Holds information about a single test case. - */ -typedef struct SDLTest_TestCaseReference { - /* !< Func2Stress */ - SDLTest_TestCaseFp testCase; - /* !< Short name (or function name) "Func2Stress" */ - char *name; - /* !< Long name or full description "This test pushes func2() to the limit." */ - char *description; - /* !< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */ - int enabled; -} SDLTest_TestCaseReference; - -/** - * Holds information about a test suite (multiple test cases). - */ -typedef struct SDLTest_TestSuiteReference { - /* !< "PlatformSuite" */ - char *name; - /* !< The function that is run before each test. NULL skips. */ - SDLTest_TestCaseSetUpFp testSetUp; - /* !< The test cases that are run as part of the suite. Last item should be NULL. */ - const SDLTest_TestCaseReference **testCases; - /* !< The function that is run after each test. NULL skips. */ - SDLTest_TestCaseTearDownFp testTearDown; -} SDLTest_TestSuiteReference; - - -/** - * \brief Generates a random run seed string for the harness. The generated seed will contain alphanumeric characters (0-9A-Z). - * - * Note: The returned string needs to be deallocated by the caller. - * - * \param length The length of the seed string to generate - * - * \returns The generated seed string - */ -char *SDLTest_GenerateRunSeed(const int length); - -/** - * \brief Execute a test suite using the given run seed and execution key. - * - * \param testSuites Suites containing the test case. - * \param userRunSeed Custom run seed provided by user, or NULL to autogenerate one. - * \param userExecKey Custom execution key provided by user, or 0 to autogenerate one. - * \param filter Filter specification. NULL disables. Case sensitive. - * \param testIterations Number of iterations to run each test case. - * - * \returns Test run result; 0 when all tests passed, 1 if any tests failed. - */ -int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_h_arness_h */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_images.h b/Dependencies/SDL/Windows/include/SDL_test_images.h deleted file mode 100644 index 1cc3ee2..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_images.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_images.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -/* - - Defines some images for tests. - -*/ - -#ifndef SDL_test_images_h_ -#define SDL_test_images_h_ - -#include "SDL.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - *Type for test images. - */ -typedef struct SDLTest_SurfaceImage_s { - int width; - int height; - unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ - const char *pixel_data; -} SDLTest_SurfaceImage_t; - -/* Test images */ -SDL_Surface *SDLTest_ImageBlit(void); -SDL_Surface *SDLTest_ImageBlitColor(void); -SDL_Surface *SDLTest_ImageBlitAlpha(void); -SDL_Surface *SDLTest_ImageBlitBlendAdd(void); -SDL_Surface *SDLTest_ImageBlitBlend(void); -SDL_Surface *SDLTest_ImageBlitBlendMod(void); -SDL_Surface *SDLTest_ImageBlitBlendNone(void); -SDL_Surface *SDLTest_ImageBlitBlendAll(void); -SDL_Surface *SDLTest_ImageFace(void); -SDL_Surface *SDLTest_ImagePrimitives(void); -SDL_Surface *SDLTest_ImagePrimitivesBlend(void); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_images_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_log.h b/Dependencies/SDL/Windows/include/SDL_test_log.h deleted file mode 100644 index 6066f90..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_log.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_log.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -/* - * - * Wrapper to log in the TEST category - * - */ - -#ifndef SDL_test_log_h_ -#define SDL_test_log_h_ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Prints given message with a timestamp in the TEST category and INFO priority. - * - * \param fmt Message to be logged - */ -void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); - -/** - * \brief Prints given message with a timestamp in the TEST category and the ERROR priority. - * - * \param fmt Message to be logged - */ -void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_log_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_md5.h b/Dependencies/SDL/Windows/include/SDL_test_md5.h deleted file mode 100644 index b1c51d9..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_md5.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_md5.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -/* - *********************************************************************** - ** Header file for implementation of MD5 ** - ** RSA Data Security, Inc. MD5 Message-Digest Algorithm ** - ** Created: 2/17/90 RLR ** - ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version ** - ** Revised (for MD5): RLR 4/27/91 ** - ** -- G modified to have y&~z instead of y&z ** - ** -- FF, GG, HH modified to add in last register done ** - ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 ** - ** -- distinct additive constant for each step ** - ** -- round 4 added, working mod 7 ** - *********************************************************************** -*/ - -/* - *********************************************************************** - ** Message-digest routines: ** - ** To form the message digest for a message M ** - ** (1) Initialize a context buffer mdContext using MD5Init ** - ** (2) Call MD5Update on mdContext and M ** - ** (3) Call MD5Final on mdContext ** - ** The message digest is now in mdContext->digest[0...15] ** - *********************************************************************** -*/ - -#ifndef SDL_test_md5_h_ -#define SDL_test_md5_h_ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* ------------ Definitions --------- */ - -/* typedef a 32-bit type */ - typedef unsigned long int MD5UINT4; - -/* Data structure for MD5 (Message-Digest) computation */ - typedef struct { - MD5UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ - MD5UINT4 buf[4]; /* scratch buffer */ - unsigned char in[64]; /* input buffer */ - unsigned char digest[16]; /* actual digest after Md5Final call */ - } SDLTest_Md5Context; - -/* ---------- Function Prototypes ------------- */ - -/** - * \brief initialize the context - * - * \param mdContext pointer to context variable - * - * Note: The function initializes the message-digest context - * mdContext. Call before each new use of the context - - * all fields are set to zero. - */ - void SDLTest_Md5Init(SDLTest_Md5Context * mdContext); - - -/** - * \brief update digest from variable length data - * - * \param mdContext pointer to context variable - * \param inBuf pointer to data array/string - * \param inLen length of data array/string - * - * Note: The function updates the message-digest context to account - * for the presence of each of the characters inBuf[0..inLen-1] - * in the message whose digest is being computed. -*/ - - void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf, - unsigned int inLen); - - -/** - * \brief complete digest computation - * - * \param mdContext pointer to context variable - * - * Note: The function terminates the message-digest computation and - * ends with the desired message digest in mdContext.digest[0..15]. - * Always call before using the digest[] variable. -*/ - - void SDLTest_Md5Final(SDLTest_Md5Context * mdContext); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_md5_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_memory.h b/Dependencies/SDL/Windows/include/SDL_test_memory.h deleted file mode 100644 index df69f93..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_memory.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_memory.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -#ifndef SDL_test_memory_h_ -#define SDL_test_memory_h_ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * \brief Start tracking SDL memory allocations - * - * \note This should be called before any other SDL functions for complete tracking coverage - */ -int SDLTest_TrackAllocations(void); - -/** - * \brief Print a log of any outstanding allocations - * - * \note This can be called after SDL_Quit() - */ -void SDLTest_LogAllocations(void); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_memory_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_test_random.h b/Dependencies/SDL/Windows/include/SDL_test_random.h deleted file mode 100644 index 9404e9d..0000000 --- a/Dependencies/SDL/Windows/include/SDL_test_random.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_test_random.h - * - * Include file for SDL test framework. - * - * This code is a part of the SDL2_test library, not the main SDL library. - */ - -/* - - A "32-bit Multiply with carry random number generator. Very fast. - Includes a list of recommended multipliers. - - multiply-with-carry generator: x(n) = a*x(n-1) + carry mod 2^32. - period: (a*2^31)-1 - -*/ - -#ifndef SDL_test_random_h_ -#define SDL_test_random_h_ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* --- Definitions */ - -/* - * Macros that return a random number in a specific format. - */ -#define SDLTest_RandomInt(c) ((int)SDLTest_Random(c)) - -/* - * Context structure for the random number generator state. - */ - typedef struct { - unsigned int a; - unsigned int x; - unsigned int c; - unsigned int ah; - unsigned int al; - } SDLTest_RandomContext; - - -/* --- Function prototypes */ - -/** - * \brief Initialize random number generator with two integers. - * - * Note: The random sequence of numbers returned by ...Random() is the - * same for the same two integers and has a period of 2^31. - * - * \param rndContext pointer to context structure - * \param xi integer that defines the random sequence - * \param ci integer that defines the random sequence - * - */ - void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, - unsigned int ci); - -/** - * \brief Initialize random number generator based on current system time. - * - * \param rndContext pointer to context structure - * - */ - void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext); - - -/** - * \brief Initialize random number generator based on current system time. - * - * Note: ...RandomInit() or ...RandomInitTime() must have been called - * before using this function. - * - * \param rndContext pointer to context structure - * - * \returns A random number (32bit unsigned integer) - * - */ - unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_test_random_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_thread.h b/Dependencies/SDL/Windows/include/SDL_thread.h deleted file mode 100644 index cb53011..0000000 --- a/Dependencies/SDL/Windows/include/SDL_thread.h +++ /dev/null @@ -1,361 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -#ifndef SDL_thread_h_ -#define SDL_thread_h_ - -/** - * \file SDL_thread.h - * - * Header for the SDL thread management routines. - */ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -/* Thread synchronization primitives */ -#include "SDL_atomic.h" -#include "SDL_mutex.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* The SDL thread structure, defined in SDL_thread.c */ -struct SDL_Thread; -typedef struct SDL_Thread SDL_Thread; - -/* The SDL thread ID */ -typedef unsigned long SDL_threadID; - -/* Thread local storage ID, 0 is the invalid ID */ -typedef unsigned int SDL_TLSID; - -/** - * The SDL thread priority. - * - * \note On many systems you require special privileges to set high or time critical priority. - */ -typedef enum { - SDL_THREAD_PRIORITY_LOW, - SDL_THREAD_PRIORITY_NORMAL, - SDL_THREAD_PRIORITY_HIGH, - SDL_THREAD_PRIORITY_TIME_CRITICAL -} SDL_ThreadPriority; - -/** - * The function passed to SDL_CreateThread(). - * It is passed a void* user context parameter and returns an int. - */ -typedef int (SDLCALL * SDL_ThreadFunction) (void *data); - -#if defined(__WIN32__) -/** - * \file SDL_thread.h - * - * We compile SDL into a DLL. This means, that it's the DLL which - * creates a new thread for the calling process with the SDL_CreateThread() - * API. There is a problem with this, that only the RTL of the SDL2.DLL will - * be initialized for those threads, and not the RTL of the calling - * application! - * - * To solve this, we make a little hack here. - * - * We'll always use the caller's _beginthread() and _endthread() APIs to - * start a new thread. This way, if it's the SDL2.DLL which uses this API, - * then the RTL of SDL2.DLL will be used to create the new thread, and if it's - * the application, then the RTL of the application will be used. - * - * So, in short: - * Always use the _beginthread() and _endthread() of the calling runtime - * library! - */ -#define SDL_PASSED_BEGINTHREAD_ENDTHREAD -#include /* _beginthreadex() and _endthreadex() */ - -typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread) - (void *, unsigned, unsigned (__stdcall *func)(void *), - void * /*arg*/, unsigned, unsigned * /* threadID */); -typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); - -#ifndef SDL_beginthread -#define SDL_beginthread _beginthreadex -#endif -#ifndef SDL_endthread -#define SDL_endthread _endthreadex -#endif - -/** - * Create a thread. - */ -extern DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data, - pfnSDL_CurrentBeginThread pfnBeginThread, - pfnSDL_CurrentEndThread pfnEndThread); - -extern DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *), - const char *name, const size_t stacksize, void *data, - pfnSDL_CurrentBeginThread pfnBeginThread, - pfnSDL_CurrentEndThread pfnEndThread); - - -/** - * Create a thread. - */ -#if defined(SDL_CreateThread) && SDL_DYNAMIC_API -#undef SDL_CreateThread -#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) -#undef SDL_CreateThreadWithStackSize -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) -#else -#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)SDL_endthread) -#endif - -#elif defined(__OS2__) -/* - * just like the windows case above: We compile SDL2 - * into a dll with Watcom's runtime statically linked. - */ -#define SDL_PASSED_BEGINTHREAD_ENDTHREAD - -#ifndef __EMX__ -#include -#else -#include -#endif - -typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/); -typedef void (*pfnSDL_CurrentEndThread)(void); - -#ifndef SDL_beginthread -#define SDL_beginthread _beginthread -#endif -#ifndef SDL_endthread -#define SDL_endthread _endthread -#endif - -extern DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data, - pfnSDL_CurrentBeginThread pfnBeginThread, - pfnSDL_CurrentEndThread pfnEndThread); -extern DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data, - pfnSDL_CurrentBeginThread pfnBeginThread, - pfnSDL_CurrentEndThread pfnEndThread); - -#if defined(SDL_CreateThread) && SDL_DYNAMIC_API -#undef SDL_CreateThread -#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) -#undef SDL_CreateThreadWithStackSize -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) -#else -#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) -#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread) -#endif - -#else - -/** - * Create a thread with a default stack size. - * - * This is equivalent to calling: - * SDL_CreateThreadWithStackSize(fn, name, 0, data); - */ -extern DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data); - -/** - * Create a thread. - * - * Thread naming is a little complicated: Most systems have very small - * limits for the string length (Haiku has 32 bytes, Linux currently has 16, - * Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You'll - * have to see what happens with your system's debugger. The name should be - * UTF-8 (but using the naming limits of C identifiers is a better bet). - * There are no requirements for thread naming conventions, so long as the - * string is null-terminated UTF-8, but these guidelines are helpful in - * choosing a name: - * - * http://stackoverflow.com/questions/149932/naming-conventions-for-threads - * - * If a system imposes requirements, SDL will try to munge the string for - * it (truncate, etc), but the original string contents will be available - * from SDL_GetThreadName(). - * - * The size (in bytes) of the new stack can be specified. Zero means "use - * the system default" which might be wildly different between platforms - * (x86 Linux generally defaults to eight megabytes, an embedded device - * might be a few kilobytes instead). - * - * In SDL 2.1, stacksize will be folded into the original SDL_CreateThread - * function. - */ -extern DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data); - -#endif - -/** - * Get the thread name, as it was specified in SDL_CreateThread(). - * This function returns a pointer to a UTF-8 string that names the - * specified thread, or NULL if it doesn't have a name. This is internal - * memory, not to be free()'d by the caller, and remains valid until the - * specified thread is cleaned up by SDL_WaitThread(). - */ -extern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread); - -/** - * Get the thread identifier for the current thread. - */ -extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void); - -/** - * Get the thread identifier for the specified thread. - * - * Equivalent to SDL_ThreadID() if the specified thread is NULL. - */ -extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread); - -/** - * Set the priority for the current thread - */ -extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority); - -/** - * Wait for a thread to finish. Threads that haven't been detached will - * remain (as a "zombie") until this function cleans them up. Not doing so - * is a resource leak. - * - * Once a thread has been cleaned up through this function, the SDL_Thread - * that references it becomes invalid and should not be referenced again. - * As such, only one thread may call SDL_WaitThread() on another. - * - * The return code for the thread function is placed in the area - * pointed to by \c status, if \c status is not NULL. - * - * You may not wait on a thread that has been used in a call to - * SDL_DetachThread(). Use either that function or this one, but not - * both, or behavior is undefined. - * - * It is safe to pass NULL to this function; it is a no-op. - */ -extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status); - -/** - * A thread may be "detached" to signify that it should not remain until - * another thread has called SDL_WaitThread() on it. Detaching a thread - * is useful for long-running threads that nothing needs to synchronize - * with or further manage. When a detached thread is done, it simply - * goes away. - * - * There is no way to recover the return code of a detached thread. If you - * need this, don't detach the thread and instead use SDL_WaitThread(). - * - * Once a thread is detached, you should usually assume the SDL_Thread isn't - * safe to reference again, as it will become invalid immediately upon - * the detached thread's exit, instead of remaining until someone has called - * SDL_WaitThread() to finally clean it up. As such, don't detach the same - * thread more than once. - * - * If a thread has already exited when passed to SDL_DetachThread(), it will - * stop waiting for a call to SDL_WaitThread() and clean up immediately. - * It is not safe to detach a thread that might be used with SDL_WaitThread(). - * - * You may not call SDL_WaitThread() on a thread that has been detached. - * Use either that function or this one, but not both, or behavior is - * undefined. - * - * It is safe to pass NULL to this function; it is a no-op. - */ -extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread); - -/** - * \brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific. - * - * \return The newly created thread local storage identifier, or 0 on error - * - * \code - * static SDL_SpinLock tls_lock; - * static SDL_TLSID thread_local_storage; - * - * void SetMyThreadData(void *value) - * { - * if (!thread_local_storage) { - * SDL_AtomicLock(&tls_lock); - * if (!thread_local_storage) { - * thread_local_storage = SDL_TLSCreate(); - * } - * SDL_AtomicUnlock(&tls_lock); - * } - * SDL_TLSSet(thread_local_storage, value, 0); - * } - * - * void *GetMyThreadData(void) - * { - * return SDL_TLSGet(thread_local_storage); - * } - * \endcode - * - * \sa SDL_TLSGet() - * \sa SDL_TLSSet() - */ -extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void); - -/** - * \brief Get the value associated with a thread local storage ID for the current thread. - * - * \param id The thread local storage ID - * - * \return The value associated with the ID for the current thread, or NULL if no value has been set. - * - * \sa SDL_TLSCreate() - * \sa SDL_TLSSet() - */ -extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id); - -/** - * \brief Set the value associated with a thread local storage ID for the current thread. - * - * \param id The thread local storage ID - * \param value The value to associate with the ID for the current thread - * \param destructor A function called when the thread exits, to free the value. - * - * \return 0 on success, -1 on error - * - * \sa SDL_TLSCreate() - * \sa SDL_TLSGet() - */ -extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void*)); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_thread_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_timer.h b/Dependencies/SDL/Windows/include/SDL_timer.h deleted file mode 100644 index aada717..0000000 --- a/Dependencies/SDL/Windows/include/SDL_timer.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -#ifndef SDL_timer_h_ -#define SDL_timer_h_ - -/** - * \file SDL_timer.h - * - * Header for the SDL time management routines. - */ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Get the number of milliseconds since the SDL library initialization. - * - * \note This value wraps if the program runs for more than ~49 days. - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void); - -/** - * \brief Compare SDL ticks values, and return true if A has passed B - * - * e.g. if you want to wait 100 ms, you could do this: - * Uint32 timeout = SDL_GetTicks() + 100; - * while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) { - * ... do work until timeout has elapsed - * } - */ -#define SDL_TICKS_PASSED(A, B) ((Sint32)((B) - (A)) <= 0) - -/** - * \brief Get the current value of the high resolution counter - */ -extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void); - -/** - * \brief Get the count per second of the high resolution counter - */ -extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void); - -/** - * \brief Wait a specified number of milliseconds before returning. - */ -extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms); - -/** - * Function prototype for the timer callback function. - * - * The callback function is passed the current timer interval and returns - * the next timer interval. If the returned value is the same as the one - * passed in, the periodic alarm continues, otherwise a new alarm is - * scheduled. If the callback returns 0, the periodic alarm is cancelled. - */ -typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param); - -/** - * Definition of the timer ID type. - */ -typedef int SDL_TimerID; - -/** - * \brief Add a new timer to the pool of timers already running. - * - * \return A timer ID, or 0 when an error occurs. - */ -extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, - SDL_TimerCallback callback, - void *param); - -/** - * \brief Remove a timer knowing its ID. - * - * \return A boolean value indicating success or failure. - * - * \warning It is not safe to remove a timer multiple times. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_timer_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_touch.h b/Dependencies/SDL/Windows/include/SDL_touch.h deleted file mode 100644 index fa5a37c..0000000 --- a/Dependencies/SDL/Windows/include/SDL_touch.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_touch.h - * - * Include file for SDL touch event handling. - */ - -#ifndef SDL_touch_h_ -#define SDL_touch_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -typedef Sint64 SDL_TouchID; -typedef Sint64 SDL_FingerID; - -typedef enum -{ - SDL_TOUCH_DEVICE_INVALID = -1, - SDL_TOUCH_DEVICE_DIRECT, /* touch screen with window-relative coordinates */ - SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */ - SDL_TOUCH_DEVICE_INDIRECT_RELATIVE /* trackpad with screen cursor-relative coordinates */ -} SDL_TouchDeviceType; - -typedef struct SDL_Finger -{ - SDL_FingerID id; - float x; - float y; - float pressure; -} SDL_Finger; - -/* Used as the device ID for mouse events simulated with touch input */ -#define SDL_TOUCH_MOUSEID ((Uint32)-1) - -/* Used as the SDL_TouchID for touch events simulated with mouse input */ -#define SDL_MOUSE_TOUCHID ((Sint64)-1) - - -/* Function prototypes */ - -/** - * \brief Get the number of registered touch devices. - */ -extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); - -/** - * \brief Get the touch ID with the given index, or 0 if the index is invalid. - */ -extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); - -/** - * \brief Get the type of the given touch device. - */ -extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID); - -/** - * \brief Get the number of active fingers for a given touch device. - */ -extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID); - -/** - * \brief Get the finger object of the given touch, with the given index. - */ -extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_touch_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_types.h b/Dependencies/SDL/Windows/include/SDL_types.h deleted file mode 100644 index b6bb571..0000000 --- a/Dependencies/SDL/Windows/include/SDL_types.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_types.h - * - * \deprecated - */ - -/* DEPRECATED */ -#include "SDL_stdinc.h" diff --git a/Dependencies/SDL/Windows/include/SDL_version.h b/Dependencies/SDL/Windows/include/SDL_version.h deleted file mode 100644 index c824b1d..0000000 --- a/Dependencies/SDL/Windows/include/SDL_version.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_version.h - * - * This header defines the current SDL version. - */ - -#ifndef SDL_version_h_ -#define SDL_version_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Information the version of SDL in use. - * - * Represents the library's version as three levels: major revision - * (increments with massive changes, additions, and enhancements), - * minor revision (increments with backwards-compatible changes to the - * major revision), and patchlevel (increments with fixes to the minor - * revision). - * - * \sa SDL_VERSION - * \sa SDL_GetVersion - */ -typedef struct SDL_version -{ - Uint8 major; /**< major version */ - Uint8 minor; /**< minor version */ - Uint8 patch; /**< update version */ -} SDL_version; - -/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL -*/ -#define SDL_MAJOR_VERSION 2 -#define SDL_MINOR_VERSION 0 -#define SDL_PATCHLEVEL 12 - -/** - * \brief Macro to determine SDL version program was compiled against. - * - * This macro fills in a SDL_version structure with the version of the - * library you compiled against. This is determined by what header the - * compiler uses. Note that if you dynamically linked the library, you might - * have a slightly newer or older version at runtime. That version can be - * determined with SDL_GetVersion(), which, unlike SDL_VERSION(), - * is not a macro. - * - * \param x A pointer to a SDL_version struct to initialize. - * - * \sa SDL_version - * \sa SDL_GetVersion - */ -#define SDL_VERSION(x) \ -{ \ - (x)->major = SDL_MAJOR_VERSION; \ - (x)->minor = SDL_MINOR_VERSION; \ - (x)->patch = SDL_PATCHLEVEL; \ -} - -/** - * This macro turns the version numbers into a numeric value: - * \verbatim - (1,2,3) -> (1203) - \endverbatim - * - * This assumes that there will never be more than 100 patchlevels. - */ -#define SDL_VERSIONNUM(X, Y, Z) \ - ((X)*1000 + (Y)*100 + (Z)) - -/** - * This is the version number macro for the current SDL version. - */ -#define SDL_COMPILEDVERSION \ - SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) - -/** - * This macro will evaluate to true if compiled with SDL at least X.Y.Z. - */ -#define SDL_VERSION_ATLEAST(X, Y, Z) \ - (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) - -/** - * \brief Get the version of SDL that is linked against your program. - * - * If you are linking to SDL dynamically, then it is possible that the - * current version will be different than the version you compiled against. - * This function returns the current version, while SDL_VERSION() is a - * macro that tells you what version you compiled with. - * - * \code - * SDL_version compiled; - * SDL_version linked; - * - * SDL_VERSION(&compiled); - * SDL_GetVersion(&linked); - * printf("We compiled against SDL version %d.%d.%d ...\n", - * compiled.major, compiled.minor, compiled.patch); - * printf("But we linked against SDL version %d.%d.%d.\n", - * linked.major, linked.minor, linked.patch); - * \endcode - * - * This function may be called safely at any time, even before SDL_Init(). - * - * \sa SDL_VERSION - */ -extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver); - -/** - * \brief Get the code revision of SDL that is linked against your program. - * - * Returns an arbitrary string (a hash value) uniquely identifying the - * exact revision of the SDL library in use, and is only useful in comparing - * against other revisions. It is NOT an incrementing number. - */ -extern DECLSPEC const char *SDLCALL SDL_GetRevision(void); - -/** - * \brief Get the revision number of SDL that is linked against your program. - * - * Returns a number uniquely identifying the exact revision of the SDL - * library in use. It is an incrementing number based on commits to - * hg.libsdl.org. - */ -extern DECLSPEC int SDLCALL SDL_GetRevisionNumber(void); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_version_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_video.h b/Dependencies/SDL/Windows/include/SDL_video.h deleted file mode 100644 index 20d4ce2..0000000 --- a/Dependencies/SDL/Windows/include/SDL_video.h +++ /dev/null @@ -1,1275 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file SDL_video.h - * - * Header file for SDL video functions. - */ - -#ifndef SDL_video_h_ -#define SDL_video_h_ - -#include "SDL_stdinc.h" -#include "SDL_pixels.h" -#include "SDL_rect.h" -#include "SDL_surface.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief The structure that defines a display mode - * - * \sa SDL_GetNumDisplayModes() - * \sa SDL_GetDisplayMode() - * \sa SDL_GetDesktopDisplayMode() - * \sa SDL_GetCurrentDisplayMode() - * \sa SDL_GetClosestDisplayMode() - * \sa SDL_SetWindowDisplayMode() - * \sa SDL_GetWindowDisplayMode() - */ -typedef struct -{ - Uint32 format; /**< pixel format */ - int w; /**< width, in screen coordinates */ - int h; /**< height, in screen coordinates */ - int refresh_rate; /**< refresh rate (or zero for unspecified) */ - void *driverdata; /**< driver-specific data, initialize to 0 */ -} SDL_DisplayMode; - -/** - * \brief The type used to identify a window - * - * \sa SDL_CreateWindow() - * \sa SDL_CreateWindowFrom() - * \sa SDL_DestroyWindow() - * \sa SDL_GetWindowData() - * \sa SDL_GetWindowFlags() - * \sa SDL_GetWindowGrab() - * \sa SDL_GetWindowPosition() - * \sa SDL_GetWindowSize() - * \sa SDL_GetWindowTitle() - * \sa SDL_HideWindow() - * \sa SDL_MaximizeWindow() - * \sa SDL_MinimizeWindow() - * \sa SDL_RaiseWindow() - * \sa SDL_RestoreWindow() - * \sa SDL_SetWindowData() - * \sa SDL_SetWindowFullscreen() - * \sa SDL_SetWindowGrab() - * \sa SDL_SetWindowIcon() - * \sa SDL_SetWindowPosition() - * \sa SDL_SetWindowSize() - * \sa SDL_SetWindowBordered() - * \sa SDL_SetWindowResizable() - * \sa SDL_SetWindowTitle() - * \sa SDL_ShowWindow() - */ -typedef struct SDL_Window SDL_Window; - -/** - * \brief The flags on a window - * - * \sa SDL_GetWindowFlags() - */ -typedef enum -{ - SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */ - SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */ - SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */ - SDL_WINDOW_HIDDEN = 0x00000008, /**< window is not visible */ - SDL_WINDOW_BORDERLESS = 0x00000010, /**< no window decoration */ - SDL_WINDOW_RESIZABLE = 0x00000020, /**< window can be resized */ - SDL_WINDOW_MINIMIZED = 0x00000040, /**< window is minimized */ - SDL_WINDOW_MAXIMIZED = 0x00000080, /**< window is maximized */ - SDL_WINDOW_INPUT_GRABBED = 0x00000100, /**< window has grabbed input focus */ - SDL_WINDOW_INPUT_FOCUS = 0x00000200, /**< window has input focus */ - SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */ - SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ), - SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */ - SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000, /**< window should be created in high-DPI mode if supported. - On macOS NSHighResolutionCapable must be set true in the - application's Info.plist for this to have any effect. */ - SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to INPUT_GRABBED) */ - SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */ - SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */ - SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */ - SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */ - SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu */ - SDL_WINDOW_VULKAN = 0x10000000 /**< window usable for Vulkan surface */ -} SDL_WindowFlags; - -/** - * \brief Used to indicate that you don't care what the window position is. - */ -#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u -#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X)) -#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0) -#define SDL_WINDOWPOS_ISUNDEFINED(X) \ - (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK) - -/** - * \brief Used to indicate that the window position should be centered. - */ -#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u -#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X)) -#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0) -#define SDL_WINDOWPOS_ISCENTERED(X) \ - (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK) - -/** - * \brief Event subtype for window events - */ -typedef enum -{ - SDL_WINDOWEVENT_NONE, /**< Never used */ - SDL_WINDOWEVENT_SHOWN, /**< Window has been shown */ - SDL_WINDOWEVENT_HIDDEN, /**< Window has been hidden */ - SDL_WINDOWEVENT_EXPOSED, /**< Window has been exposed and should be - redrawn */ - SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2 - */ - SDL_WINDOWEVENT_RESIZED, /**< Window has been resized to data1xdata2 */ - SDL_WINDOWEVENT_SIZE_CHANGED, /**< The window size has changed, either as - a result of an API call or through the - system or user changing the window size. */ - SDL_WINDOWEVENT_MINIMIZED, /**< Window has been minimized */ - SDL_WINDOWEVENT_MAXIMIZED, /**< Window has been maximized */ - SDL_WINDOWEVENT_RESTORED, /**< Window has been restored to normal size - and position */ - SDL_WINDOWEVENT_ENTER, /**< Window has gained mouse focus */ - SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */ - SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */ - SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */ - SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */ - SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */ - SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */ -} SDL_WindowEventID; - -/** - * \brief Event subtype for display events - */ -typedef enum -{ - SDL_DISPLAYEVENT_NONE, /**< Never used */ - SDL_DISPLAYEVENT_ORIENTATION /**< Display orientation has changed to data1 */ -} SDL_DisplayEventID; - -typedef enum -{ - SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */ - SDL_ORIENTATION_LANDSCAPE, /**< The display is in landscape mode, with the right side up, relative to portrait mode */ - SDL_ORIENTATION_LANDSCAPE_FLIPPED, /**< The display is in landscape mode, with the left side up, relative to portrait mode */ - SDL_ORIENTATION_PORTRAIT, /**< The display is in portrait mode */ - SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */ -} SDL_DisplayOrientation; - -/** - * \brief An opaque handle to an OpenGL context. - */ -typedef void *SDL_GLContext; - -/** - * \brief OpenGL configuration attributes - */ -typedef enum -{ - SDL_GL_RED_SIZE, - SDL_GL_GREEN_SIZE, - SDL_GL_BLUE_SIZE, - SDL_GL_ALPHA_SIZE, - SDL_GL_BUFFER_SIZE, - SDL_GL_DOUBLEBUFFER, - SDL_GL_DEPTH_SIZE, - SDL_GL_STENCIL_SIZE, - SDL_GL_ACCUM_RED_SIZE, - SDL_GL_ACCUM_GREEN_SIZE, - SDL_GL_ACCUM_BLUE_SIZE, - SDL_GL_ACCUM_ALPHA_SIZE, - SDL_GL_STEREO, - SDL_GL_MULTISAMPLEBUFFERS, - SDL_GL_MULTISAMPLESAMPLES, - SDL_GL_ACCELERATED_VISUAL, - SDL_GL_RETAINED_BACKING, - SDL_GL_CONTEXT_MAJOR_VERSION, - SDL_GL_CONTEXT_MINOR_VERSION, - SDL_GL_CONTEXT_EGL, - SDL_GL_CONTEXT_FLAGS, - SDL_GL_CONTEXT_PROFILE_MASK, - SDL_GL_SHARE_WITH_CURRENT_CONTEXT, - SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, - SDL_GL_CONTEXT_RELEASE_BEHAVIOR, - SDL_GL_CONTEXT_RESET_NOTIFICATION, - SDL_GL_CONTEXT_NO_ERROR -} SDL_GLattr; - -typedef enum -{ - SDL_GL_CONTEXT_PROFILE_CORE = 0x0001, - SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002, - SDL_GL_CONTEXT_PROFILE_ES = 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */ -} SDL_GLprofile; - -typedef enum -{ - SDL_GL_CONTEXT_DEBUG_FLAG = 0x0001, - SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002, - SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = 0x0004, - SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 0x0008 -} SDL_GLcontextFlag; - -typedef enum -{ - SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE = 0x0000, - SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x0001 -} SDL_GLcontextReleaseFlag; - -typedef enum -{ - SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000, - SDL_GL_CONTEXT_RESET_LOSE_CONTEXT = 0x0001 -} SDL_GLContextResetNotification; - -/* Function prototypes */ - -/** - * \brief Get the number of video drivers compiled into SDL - * - * \sa SDL_GetVideoDriver() - */ -extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void); - -/** - * \brief Get the name of a built in video driver. - * - * \note The video drivers are presented in the order in which they are - * normally checked during initialization. - * - * \sa SDL_GetNumVideoDrivers() - */ -extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index); - -/** - * \brief Initialize the video subsystem, optionally specifying a video driver. - * - * \param driver_name Initialize a specific driver by name, or NULL for the - * default video driver. - * - * \return 0 on success, -1 on error - * - * This function initializes the video subsystem; setting up a connection - * to the window manager, etc, and determines the available display modes - * and pixel formats, but does not initialize a window or graphics mode. - * - * \sa SDL_VideoQuit() - */ -extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name); - -/** - * \brief Shuts down the video subsystem. - * - * This function closes all windows, and restores the original video mode. - * - * \sa SDL_VideoInit() - */ -extern DECLSPEC void SDLCALL SDL_VideoQuit(void); - -/** - * \brief Returns the name of the currently initialized video driver. - * - * \return The name of the current video driver or NULL if no driver - * has been initialized - * - * \sa SDL_GetNumVideoDrivers() - * \sa SDL_GetVideoDriver() - */ -extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void); - -/** - * \brief Returns the number of available video displays. - * - * \sa SDL_GetDisplayBounds() - */ -extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void); - -/** - * \brief Get the name of a display in UTF-8 encoding - * - * \return The name of a display, or NULL for an invalid display index. - * - * \sa SDL_GetNumVideoDisplays() - */ -extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex); - -/** - * \brief Get the desktop area represented by a display, with the primary - * display located at 0,0 - * - * \return 0 on success, or -1 if the index is out of range. - * - * \sa SDL_GetNumVideoDisplays() - */ -extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect); - -/** - * \brief Get the usable desktop area represented by a display, with the - * primary display located at 0,0 - * - * This is the same area as SDL_GetDisplayBounds() reports, but with portions - * reserved by the system removed. For example, on Mac OS X, this subtracts - * the area occupied by the menu bar and dock. - * - * Setting a window to be fullscreen generally bypasses these unusable areas, - * so these are good guidelines for the maximum space available to a - * non-fullscreen window. - * - * \return 0 on success, or -1 if the index is out of range. - * - * \sa SDL_GetDisplayBounds() - * \sa SDL_GetNumVideoDisplays() - */ -extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect); - -/** - * \brief Get the dots/pixels-per-inch for a display - * - * \note Diagonal, horizontal and vertical DPI can all be optionally - * returned if the parameter is non-NULL. - * - * \return 0 on success, or -1 if no DPI information is available or the index is out of range. - * - * \sa SDL_GetNumVideoDisplays() - */ -extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi); - -/** - * \brief Get the orientation of a display - * - * \return The orientation of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available. - * - * \sa SDL_GetNumVideoDisplays() - */ -extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex); - -/** - * \brief Returns the number of available display modes. - * - * \sa SDL_GetDisplayMode() - */ -extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex); - -/** - * \brief Fill in information about a specific display mode. - * - * \note The display modes are sorted in this priority: - * \li bits per pixel -> more colors to fewer colors - * \li width -> largest to smallest - * \li height -> largest to smallest - * \li refresh rate -> highest to lowest - * - * \sa SDL_GetNumDisplayModes() - */ -extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex, - SDL_DisplayMode * mode); - -/** - * \brief Fill in information about the desktop display mode. - */ -extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode); - -/** - * \brief Fill in information about the current display mode. - */ -extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode); - - -/** - * \brief Get the closest match to the requested display mode. - * - * \param displayIndex The index of display from which mode should be queried. - * \param mode The desired display mode - * \param closest A pointer to a display mode to be filled in with the closest - * match of the available display modes. - * - * \return The passed in value \c closest, or NULL if no matching video mode - * was available. - * - * The available display modes are scanned, and \c closest is filled in with the - * closest mode matching the requested mode and returned. The mode format and - * refresh_rate default to the desktop mode if they are 0. The modes are - * scanned with size being first priority, format being second priority, and - * finally checking the refresh_rate. If all the available modes are too - * small, then NULL is returned. - * - * \sa SDL_GetNumDisplayModes() - * \sa SDL_GetDisplayMode() - */ -extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest); - -/** - * \brief Get the display index associated with a window. - * - * \return the display index of the display containing the center of the - * window, or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window); - -/** - * \brief Set the display mode used when a fullscreen window is visible. - * - * By default the window's dimensions and the desktop format and refresh rate - * are used. - * - * \param window The window for which the display mode should be set. - * \param mode The mode to use, or NULL for the default mode. - * - * \return 0 on success, or -1 if setting the display mode failed. - * - * \sa SDL_GetWindowDisplayMode() - * \sa SDL_SetWindowFullscreen() - */ -extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window, - const SDL_DisplayMode - * mode); - -/** - * \brief Fill in information about the display mode used when a fullscreen - * window is visible. - * - * \sa SDL_SetWindowDisplayMode() - * \sa SDL_SetWindowFullscreen() - */ -extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window, - SDL_DisplayMode * mode); - -/** - * \brief Get the pixel format associated with the window. - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window); - -/** - * \brief Create a window with the specified position, dimensions, and flags. - * - * \param title The title of the window, in UTF-8 encoding. - * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or - * ::SDL_WINDOWPOS_UNDEFINED. - * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or - * ::SDL_WINDOWPOS_UNDEFINED. - * \param w The width of the window, in screen coordinates. - * \param h The height of the window, in screen coordinates. - * \param flags The flags for the window, a mask of any of the following: - * ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL, - * ::SDL_WINDOW_HIDDEN, ::SDL_WINDOW_BORDERLESS, - * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED, - * ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED, - * ::SDL_WINDOW_ALLOW_HIGHDPI, ::SDL_WINDOW_VULKAN. - * - * \return The created window, or NULL if window creation failed. - * - * If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size - * in pixels may differ from its size in screen coordinates on platforms with - * high-DPI support (e.g. iOS and Mac OS X). Use SDL_GetWindowSize() to query - * the client area's size in screen coordinates, and SDL_GL_GetDrawableSize(), - * SDL_Vulkan_GetDrawableSize(), or SDL_GetRendererOutputSize() to query the - * drawable size in pixels. - * - * If the window is created with any of the SDL_WINDOW_OPENGL or - * SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function - * (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the - * corresponding UnloadLibrary function is called by SDL_DestroyWindow(). - * - * If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver, - * SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail. - * - * \note On non-Apple devices, SDL requires you to either not link to the - * Vulkan loader or link to a dynamic library version. This limitation - * may be removed in a future version of SDL. - * - * \sa SDL_DestroyWindow() - * \sa SDL_GL_LoadLibrary() - * \sa SDL_Vulkan_LoadLibrary() - */ -extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title, - int x, int y, int w, - int h, Uint32 flags); - -/** - * \brief Create an SDL window from an existing native window. - * - * \param data A pointer to driver-dependent window creation data - * - * \return The created window, or NULL if window creation failed. - * - * \sa SDL_DestroyWindow() - */ -extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data); - -/** - * \brief Get the numeric ID of a window, for logging purposes. - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window); - -/** - * \brief Get a window from a stored ID, or NULL if it doesn't exist. - */ -extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id); - -/** - * \brief Get the window flags. - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window); - -/** - * \brief Set the title of a window, in UTF-8 format. - * - * \sa SDL_GetWindowTitle() - */ -extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window, - const char *title); - -/** - * \brief Get the title of a window, in UTF-8 format. - * - * \sa SDL_SetWindowTitle() - */ -extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window); - -/** - * \brief Set the icon for a window. - * - * \param window The window for which the icon should be set. - * \param icon The icon for the window. - */ -extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window, - SDL_Surface * icon); - -/** - * \brief Associate an arbitrary named pointer with a window. - * - * \param window The window to associate with the pointer. - * \param name The name of the pointer. - * \param userdata The associated pointer. - * - * \return The previous value associated with 'name' - * - * \note The name is case-sensitive. - * - * \sa SDL_GetWindowData() - */ -extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window, - const char *name, - void *userdata); - -/** - * \brief Retrieve the data pointer associated with a window. - * - * \param window The window to query. - * \param name The name of the pointer. - * - * \return The value associated with 'name' - * - * \sa SDL_SetWindowData() - */ -extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window, - const char *name); - -/** - * \brief Set the position of a window. - * - * \param window The window to reposition. - * \param x The x coordinate of the window in screen coordinates, or - * ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED. - * \param y The y coordinate of the window in screen coordinates, or - * ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED. - * - * \note The window coordinate origin is the upper left of the display. - * - * \sa SDL_GetWindowPosition() - */ -extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window, - int x, int y); - -/** - * \brief Get the position of a window. - * - * \param window The window to query. - * \param x Pointer to variable for storing the x position, in screen - * coordinates. May be NULL. - * \param y Pointer to variable for storing the y position, in screen - * coordinates. May be NULL. - * - * \sa SDL_SetWindowPosition() - */ -extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window, - int *x, int *y); - -/** - * \brief Set the size of a window's client area. - * - * \param window The window to resize. - * \param w The width of the window, in screen coordinates. Must be >0. - * \param h The height of the window, in screen coordinates. Must be >0. - * - * \note Fullscreen windows automatically match the size of the display mode, - * and you should use SDL_SetWindowDisplayMode() to change their size. - * - * The window size in screen coordinates may differ from the size in pixels, if - * the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with - * high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or - * SDL_GetRendererOutputSize() to get the real client area size in pixels. - * - * \sa SDL_GetWindowSize() - * \sa SDL_SetWindowDisplayMode() - */ -extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w, - int h); - -/** - * \brief Get the size of a window's client area. - * - * \param window The window to query. - * \param w Pointer to variable for storing the width, in screen - * coordinates. May be NULL. - * \param h Pointer to variable for storing the height, in screen - * coordinates. May be NULL. - * - * The window size in screen coordinates may differ from the size in pixels, if - * the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with - * high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or - * SDL_GetRendererOutputSize() to get the real client area size in pixels. - * - * \sa SDL_SetWindowSize() - */ -extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w, - int *h); - -/** - * \brief Get the size of a window's borders (decorations) around the client area. - * - * \param window The window to query. - * \param top Pointer to variable for storing the size of the top border. NULL is permitted. - * \param left Pointer to variable for storing the size of the left border. NULL is permitted. - * \param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted. - * \param right Pointer to variable for storing the size of the right border. NULL is permitted. - * - * \return 0 on success, or -1 if getting this information is not supported. - * - * \note if this function fails (returns -1), the size values will be - * initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as - * if the window in question was borderless. - */ -extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window, - int *top, int *left, - int *bottom, int *right); - -/** - * \brief Set the minimum size of a window's client area. - * - * \param window The window to set a new minimum size. - * \param min_w The minimum width of the window, must be >0 - * \param min_h The minimum height of the window, must be >0 - * - * \note You can't change the minimum size of a fullscreen window, it - * automatically matches the size of the display mode. - * - * \sa SDL_GetWindowMinimumSize() - * \sa SDL_SetWindowMaximumSize() - */ -extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window, - int min_w, int min_h); - -/** - * \brief Get the minimum size of a window's client area. - * - * \param window The window to query. - * \param w Pointer to variable for storing the minimum width, may be NULL - * \param h Pointer to variable for storing the minimum height, may be NULL - * - * \sa SDL_GetWindowMaximumSize() - * \sa SDL_SetWindowMinimumSize() - */ -extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window, - int *w, int *h); - -/** - * \brief Set the maximum size of a window's client area. - * - * \param window The window to set a new maximum size. - * \param max_w The maximum width of the window, must be >0 - * \param max_h The maximum height of the window, must be >0 - * - * \note You can't change the maximum size of a fullscreen window, it - * automatically matches the size of the display mode. - * - * \sa SDL_GetWindowMaximumSize() - * \sa SDL_SetWindowMinimumSize() - */ -extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window, - int max_w, int max_h); - -/** - * \brief Get the maximum size of a window's client area. - * - * \param window The window to query. - * \param w Pointer to variable for storing the maximum width, may be NULL - * \param h Pointer to variable for storing the maximum height, may be NULL - * - * \sa SDL_GetWindowMinimumSize() - * \sa SDL_SetWindowMaximumSize() - */ -extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window, - int *w, int *h); - -/** - * \brief Set the border state of a window. - * - * This will add or remove the window's SDL_WINDOW_BORDERLESS flag and - * add or remove the border from the actual window. This is a no-op if the - * window's border already matches the requested state. - * - * \param window The window of which to change the border state. - * \param bordered SDL_FALSE to remove border, SDL_TRUE to add border. - * - * \note You can't change the border state of a fullscreen window. - * - * \sa SDL_GetWindowFlags() - */ -extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window, - SDL_bool bordered); - -/** - * \brief Set the user-resizable state of a window. - * - * This will add or remove the window's SDL_WINDOW_RESIZABLE flag and - * allow/disallow user resizing of the window. This is a no-op if the - * window's resizable state already matches the requested state. - * - * \param window The window of which to change the resizable state. - * \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow. - * - * \note You can't change the resizable state of a fullscreen window. - * - * \sa SDL_GetWindowFlags() - */ -extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window, - SDL_bool resizable); - -/** - * \brief Show a window. - * - * \sa SDL_HideWindow() - */ -extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window); - -/** - * \brief Hide a window. - * - * \sa SDL_ShowWindow() - */ -extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window); - -/** - * \brief Raise a window above other windows and set the input focus. - */ -extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window); - -/** - * \brief Make a window as large as possible. - * - * \sa SDL_RestoreWindow() - */ -extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window); - -/** - * \brief Minimize a window to an iconic representation. - * - * \sa SDL_RestoreWindow() - */ -extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window); - -/** - * \brief Restore the size and position of a minimized or maximized window. - * - * \sa SDL_MaximizeWindow() - * \sa SDL_MinimizeWindow() - */ -extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window); - -/** - * \brief Set a window's fullscreen state. - * - * \return 0 on success, or -1 if setting the display mode failed. - * - * \sa SDL_SetWindowDisplayMode() - * \sa SDL_GetWindowDisplayMode() - */ -extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, - Uint32 flags); - -/** - * \brief Get the SDL surface associated with the window. - * - * \return The window's framebuffer surface, or NULL on error. - * - * A new surface will be created with the optimal format for the window, - * if necessary. This surface will be freed when the window is destroyed. - * - * \note You may not combine this with 3D or the rendering API on this window. - * - * \sa SDL_UpdateWindowSurface() - * \sa SDL_UpdateWindowSurfaceRects() - */ -extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window); - -/** - * \brief Copy the window surface to the screen. - * - * \return 0 on success, or -1 on error. - * - * \sa SDL_GetWindowSurface() - * \sa SDL_UpdateWindowSurfaceRects() - */ -extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window); - -/** - * \brief Copy a number of rectangles on the window surface to the screen. - * - * \return 0 on success, or -1 on error. - * - * \sa SDL_GetWindowSurface() - * \sa SDL_UpdateWindowSurface() - */ -extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window, - const SDL_Rect * rects, - int numrects); - -/** - * \brief Set a window's input grab mode. - * - * \param window The window for which the input grab mode should be set. - * \param grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input. - * - * If the caller enables a grab while another window is currently grabbed, - * the other window loses its grab in favor of the caller's window. - * - * \sa SDL_GetWindowGrab() - */ -extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window, - SDL_bool grabbed); - -/** - * \brief Get a window's input grab mode. - * - * \return This returns SDL_TRUE if input is grabbed, and SDL_FALSE otherwise. - * - * \sa SDL_SetWindowGrab() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window); - -/** - * \brief Get the window that currently has an input grab enabled. - * - * \return This returns the window if input is grabbed, and NULL otherwise. - * - * \sa SDL_SetWindowGrab() - */ -extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void); - -/** - * \brief Set the brightness (gamma correction) for a window. - * - * \return 0 on success, or -1 if setting the brightness isn't supported. - * - * \sa SDL_GetWindowBrightness() - * \sa SDL_SetWindowGammaRamp() - */ -extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness); - -/** - * \brief Get the brightness (gamma correction) for a window. - * - * \return The last brightness value passed to SDL_SetWindowBrightness() - * - * \sa SDL_SetWindowBrightness() - */ -extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window); - -/** - * \brief Set the opacity for a window - * - * \param window The window which will be made transparent or opaque - * \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be - * clamped internally between 0.0f and 1.0f. - * - * \return 0 on success, or -1 if setting the opacity isn't supported. - * - * \sa SDL_GetWindowOpacity() - */ -extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity); - -/** - * \brief Get the opacity of a window. - * - * If transparency isn't supported on this platform, opacity will be reported - * as 1.0f without error. - * - * \param window The window in question. - * \param out_opacity Opacity (0.0f - transparent, 1.0f - opaque) - * - * \return 0 on success, or -1 on error (invalid window, etc). - * - * \sa SDL_SetWindowOpacity() - */ -extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity); - -/** - * \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name) - * - * \param modal_window The window that should be modal - * \param parent_window The parent window - * - * \return 0 on success, or -1 otherwise. - */ -extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window); - -/** - * \brief Explicitly sets input focus to the window. - * - * You almost certainly want SDL_RaiseWindow() instead of this function. Use - * this with caution, as you might give focus to a window that's completely - * obscured by other windows. - * - * \param window The window that should get the input focus - * - * \return 0 on success, or -1 otherwise. - * \sa SDL_RaiseWindow() - */ -extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window); - -/** - * \brief Set the gamma ramp for a window. - * - * \param window The window for which the gamma ramp should be set. - * \param red The translation table for the red channel, or NULL. - * \param green The translation table for the green channel, or NULL. - * \param blue The translation table for the blue channel, or NULL. - * - * \return 0 on success, or -1 if gamma ramps are unsupported. - * - * Set the gamma translation table for the red, green, and blue channels - * of the video hardware. Each table is an array of 256 16-bit quantities, - * representing a mapping between the input and output for that channel. - * The input is the index into the array, and the output is the 16-bit - * gamma value at that index, scaled to the output color precision. - * - * \sa SDL_GetWindowGammaRamp() - */ -extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window, - const Uint16 * red, - const Uint16 * green, - const Uint16 * blue); - -/** - * \brief Get the gamma ramp for a window. - * - * \param window The window from which the gamma ramp should be queried. - * \param red A pointer to a 256 element array of 16-bit quantities to hold - * the translation table for the red channel, or NULL. - * \param green A pointer to a 256 element array of 16-bit quantities to hold - * the translation table for the green channel, or NULL. - * \param blue A pointer to a 256 element array of 16-bit quantities to hold - * the translation table for the blue channel, or NULL. - * - * \return 0 on success, or -1 if gamma ramps are unsupported. - * - * \sa SDL_SetWindowGammaRamp() - */ -extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window, - Uint16 * red, - Uint16 * green, - Uint16 * blue); - -/** - * \brief Possible return values from the SDL_HitTest callback. - * - * \sa SDL_HitTest - */ -typedef enum -{ - SDL_HITTEST_NORMAL, /**< Region is normal. No special properties. */ - SDL_HITTEST_DRAGGABLE, /**< Region can drag entire window. */ - SDL_HITTEST_RESIZE_TOPLEFT, - SDL_HITTEST_RESIZE_TOP, - SDL_HITTEST_RESIZE_TOPRIGHT, - SDL_HITTEST_RESIZE_RIGHT, - SDL_HITTEST_RESIZE_BOTTOMRIGHT, - SDL_HITTEST_RESIZE_BOTTOM, - SDL_HITTEST_RESIZE_BOTTOMLEFT, - SDL_HITTEST_RESIZE_LEFT -} SDL_HitTestResult; - -/** - * \brief Callback used for hit-testing. - * - * \sa SDL_SetWindowHitTest - */ -typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win, - const SDL_Point *area, - void *data); - -/** - * \brief Provide a callback that decides if a window region has special properties. - * - * Normally windows are dragged and resized by decorations provided by the - * system window manager (a title bar, borders, etc), but for some apps, it - * makes sense to drag them from somewhere else inside the window itself; for - * example, one might have a borderless window that wants to be draggable - * from any part, or simulate its own title bar, etc. - * - * This function lets the app provide a callback that designates pieces of - * a given window as special. This callback is run during event processing - * if we need to tell the OS to treat a region of the window specially; the - * use of this callback is known as "hit testing." - * - * Mouse input may not be delivered to your application if it is within - * a special area; the OS will often apply that input to moving the window or - * resizing the window and not deliver it to the application. - * - * Specifying NULL for a callback disables hit-testing. Hit-testing is - * disabled by default. - * - * Platforms that don't support this functionality will return -1 - * unconditionally, even if you're attempting to disable hit-testing. - * - * Your callback may fire at any time, and its firing does not indicate any - * specific behavior (for example, on Windows, this certainly might fire - * when the OS is deciding whether to drag your window, but it fires for lots - * of other reasons, too, some unrelated to anything you probably care about - * _and when the mouse isn't actually at the location it is testing_). - * Since this can fire at any time, you should try to keep your callback - * efficient, devoid of allocations, etc. - * - * \param window The window to set hit-testing on. - * \param callback The callback to call when doing a hit-test. - * \param callback_data An app-defined void pointer passed to the callback. - * \return 0 on success, -1 on error (including unsupported). - */ -extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window, - SDL_HitTest callback, - void *callback_data); - -/** - * \brief Destroy a window. - */ -extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window); - - -/** - * \brief Returns whether the screensaver is currently enabled (default off). - * - * \sa SDL_EnableScreenSaver() - * \sa SDL_DisableScreenSaver() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void); - -/** - * \brief Allow the screen to be blanked by a screensaver - * - * \sa SDL_IsScreenSaverEnabled() - * \sa SDL_DisableScreenSaver() - */ -extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void); - -/** - * \brief Prevent the screen from being blanked by a screensaver - * - * \sa SDL_IsScreenSaverEnabled() - * \sa SDL_EnableScreenSaver() - */ -extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void); - - -/** - * \name OpenGL support functions - */ -/* @{ */ - -/** - * \brief Dynamically load an OpenGL library. - * - * \param path The platform dependent OpenGL library name, or NULL to open the - * default OpenGL library. - * - * \return 0 on success, or -1 if the library couldn't be loaded. - * - * This should be done after initializing the video driver, but before - * creating any OpenGL windows. If no OpenGL library is loaded, the default - * library will be loaded upon creation of the first OpenGL window. - * - * \note If you do this, you need to retrieve all of the GL functions used in - * your program from the dynamic library using SDL_GL_GetProcAddress(). - * - * \sa SDL_GL_GetProcAddress() - * \sa SDL_GL_UnloadLibrary() - */ -extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path); - -/** - * \brief Get the address of an OpenGL function. - */ -extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc); - -/** - * \brief Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary(). - * - * \sa SDL_GL_LoadLibrary() - */ -extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void); - -/** - * \brief Return true if an OpenGL extension is supported for the current - * context. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char - *extension); - -/** - * \brief Reset all previously set OpenGL context attributes to their default values - */ -extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void); - -/** - * \brief Set an OpenGL window attribute before window creation. - * - * \return 0 on success, or -1 if the attribute could not be set. - */ -extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value); - -/** - * \brief Get the actual value for an attribute from the current context. - * - * \return 0 on success, or -1 if the attribute could not be retrieved. - * The integer at \c value will be modified in either case. - */ -extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value); - -/** - * \brief Create an OpenGL context for use with an OpenGL window, and make it - * current. - * - * \sa SDL_GL_DeleteContext() - */ -extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window * - window); - -/** - * \brief Set up an OpenGL context for rendering into an OpenGL window. - * - * \note The context must have been created with a compatible window. - */ -extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window, - SDL_GLContext context); - -/** - * \brief Get the currently active OpenGL window. - */ -extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void); - -/** - * \brief Get the currently active OpenGL context. - */ -extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void); - -/** - * \brief Get the size of a window's underlying drawable in pixels (for use - * with glViewport). - * - * \param window Window from which the drawable size should be queried - * \param w Pointer to variable for storing the width in pixels, may be NULL - * \param h Pointer to variable for storing the height in pixels, may be NULL - * - * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI - * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a - * platform with high-DPI support (Apple calls this "Retina"), and not disabled - * by the SDL_HINT_VIDEO_HIGHDPI_DISABLED hint. - * - * \sa SDL_GetWindowSize() - * \sa SDL_CreateWindow() - */ -extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w, - int *h); - -/** - * \brief Set the swap interval for the current OpenGL context. - * - * \param interval 0 for immediate updates, 1 for updates synchronized with the - * vertical retrace. If the system supports it, you may - * specify -1 to allow late swaps to happen immediately - * instead of waiting for the next retrace. - * - * \return 0 on success, or -1 if setting the swap interval is not supported. - * - * \sa SDL_GL_GetSwapInterval() - */ -extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval); - -/** - * \brief Get the swap interval for the current OpenGL context. - * - * \return 0 if there is no vertical retrace synchronization, 1 if the buffer - * swap is synchronized with the vertical retrace, and -1 if late - * swaps happen immediately instead of waiting for the next retrace. - * If the system can't determine the swap interval, or there isn't a - * valid current context, this will return 0 as a safe default. - * - * \sa SDL_GL_SetSwapInterval() - */ -extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void); - -/** - * \brief Swap the OpenGL buffers for a window, if double-buffering is - * supported. - */ -extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window); - -/** - * \brief Delete an OpenGL context. - * - * \sa SDL_GL_CreateContext() - */ -extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context); - -/* @} *//* OpenGL support functions */ - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_video_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/Dependencies/SDL/Windows/include/SDL_vulkan.h b/Dependencies/SDL/Windows/include/SDL_vulkan.h deleted file mode 100644 index d69a436..0000000 --- a/Dependencies/SDL/Windows/include/SDL_vulkan.h +++ /dev/null @@ -1,278 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 2017, Mark Callow - - 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. -*/ - -/** - * \file SDL_vulkan.h - * - * Header file for functions to creating Vulkan surfaces on SDL windows. - */ - -#ifndef SDL_vulkan_h_ -#define SDL_vulkan_h_ - -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* Avoid including vulkan.h, don't define VkInstance if it's already included */ -#ifdef VULKAN_H_ -#define NO_SDL_VULKAN_TYPEDEFS -#endif -#ifndef NO_SDL_VULKAN_TYPEDEFS -#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; - -#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) -#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; -#else -#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object; -#endif - -VK_DEFINE_HANDLE(VkInstance) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) - -#endif /* !NO_SDL_VULKAN_TYPEDEFS */ - -typedef VkInstance SDL_vulkanInstance; -typedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */ - -/** - * \name Vulkan support functions - * - * \note SDL_Vulkan_GetInstanceExtensions & SDL_Vulkan_CreateSurface API - * is compatable with Tizen's implementation of Vulkan in SDL. - */ -/* @{ */ - -/** - * \brief Dynamically load a Vulkan loader library. - * - * \param [in] path The platform dependent Vulkan loader library name, or - * \c NULL. - * - * \return \c 0 on success, or \c -1 if the library couldn't be loaded. - * - * If \a path is NULL SDL will use the value of the environment variable - * \c SDL_VULKAN_LIBRARY, if set, otherwise it loads the default Vulkan - * loader library. - * - * This should be called after initializing the video driver, but before - * creating any Vulkan windows. If no Vulkan loader library is loaded, the - * default library will be loaded upon creation of the first Vulkan window. - * - * \note It is fairly common for Vulkan applications to link with \a libvulkan - * instead of explicitly loading it at run time. This will work with - * SDL provided the application links to a dynamic library and both it - * and SDL use the same search path. - * - * \note If you specify a non-NULL \c path, an application should retrieve all - * of the Vulkan functions it uses from the dynamic library using - * \c SDL_Vulkan_GetVkGetInstanceProcAddr() unless you can guarantee - * \c path points to the same vulkan loader library the application - * linked to. - * - * \note On Apple devices, if \a path is NULL, SDL will attempt to find - * the vkGetInstanceProcAddr address within all the mach-o images of - * the current process. This is because it is fairly common for Vulkan - * applications to link with libvulkan (and historically MoltenVK was - * provided as a static library). If it is not found then, on macOS, SDL - * will attempt to load \c vulkan.framework/vulkan, \c libvulkan.1.dylib, - * followed by \c libvulkan.dylib, in that order. - * On iOS SDL will attempt to load \c libvulkan.dylib only. Applications - * using a dynamic framework or .dylib must ensure it is included in its - * application bundle. - * - * \note On non-Apple devices, application linking with a static libvulkan is - * not supported. Either do not link to the Vulkan loader or link to a - * dynamic library version. - * - * \note This function will fail if there are no working Vulkan drivers - * installed. - * - * \sa SDL_Vulkan_GetVkGetInstanceProcAddr() - * \sa SDL_Vulkan_UnloadLibrary() - */ -extern DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path); - -/** - * \brief Get the address of the \c vkGetInstanceProcAddr function. - * - * \note This should be called after either calling SDL_Vulkan_LoadLibrary - * or creating an SDL_Window with the SDL_WINDOW_VULKAN flag. - */ -extern DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void); - -/** - * \brief Unload the Vulkan loader library previously loaded by - * \c SDL_Vulkan_LoadLibrary(). - * - * \sa SDL_Vulkan_LoadLibrary() - */ -extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); - -/** - * \brief Get the names of the Vulkan instance extensions needed to create - * a surface with \c SDL_Vulkan_CreateSurface(). - * - * \param [in] \c NULL or window Window for which the required Vulkan instance - * extensions should be retrieved - * \param [in,out] pCount pointer to an \c unsigned related to the number of - * required Vulkan instance extensions - * \param [out] pNames \c NULL or a pointer to an array to be filled with the - * required Vulkan instance extensions - * - * \return \c SDL_TRUE on success, \c SDL_FALSE on error. - * - * If \a pNames is \c NULL, then the number of required Vulkan instance - * extensions is returned in pCount. Otherwise, \a pCount must point to a - * variable set to the number of elements in the \a pNames array, and on - * return the variable is overwritten with the number of names actually - * written to \a pNames. If \a pCount is less than the number of required - * extensions, at most \a pCount structures will be written. If \a pCount - * is smaller than the number of required extensions, \c SDL_FALSE will be - * returned instead of \c SDL_TRUE, to indicate that not all the required - * extensions were returned. - * - * \note If \c window is not NULL, it will be checked against its creation - * flags to ensure that the Vulkan flag is present. This parameter - * will be removed in a future major release. - * - * \note The returned list of extensions will contain \c VK_KHR_surface - * and zero or more platform specific extensions - * - * \note The extension names queried here must be enabled when calling - * VkCreateInstance, otherwise surface creation will fail. - * - * \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag - * or be \c NULL - * - * \code - * unsigned int count; - * // get count of required extensions - * if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, NULL)) - * handle_error(); - * - * static const char *const additionalExtensions[] = - * { - * VK_EXT_DEBUG_REPORT_EXTENSION_NAME, // example additional extension - * }; - * size_t additionalExtensionsCount = sizeof(additionalExtensions) / sizeof(additionalExtensions[0]); - * size_t extensionCount = count + additionalExtensionsCount; - * const char **names = malloc(sizeof(const char *) * extensionCount); - * if(!names) - * handle_error(); - * - * // get names of required extensions - * if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, names)) - * handle_error(); - * - * // copy additional extensions after required extensions - * for(size_t i = 0; i < additionalExtensionsCount; i++) - * names[i + count] = additionalExtensions[i]; - * - * VkInstanceCreateInfo instanceCreateInfo = {}; - * instanceCreateInfo.enabledExtensionCount = extensionCount; - * instanceCreateInfo.ppEnabledExtensionNames = names; - * // fill in rest of instanceCreateInfo - * - * VkInstance instance; - * // create the Vulkan instance - * VkResult result = vkCreateInstance(&instanceCreateInfo, NULL, &instance); - * free(names); - * \endcode - * - * \sa SDL_Vulkan_CreateSurface() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions( - SDL_Window *window, - unsigned int *pCount, - const char **pNames); - -/** - * \brief Create a Vulkan rendering surface for a window. - * - * \param [in] window SDL_Window to which to attach the rendering surface. - * \param [in] instance handle to the Vulkan instance to use. - * \param [out] surface pointer to a VkSurfaceKHR handle to receive the - * handle of the newly created surface. - * - * \return \c SDL_TRUE on success, \c SDL_FALSE on error. - * - * \code - * VkInstance instance; - * SDL_Window *window; - * - * // create instance and window - * - * // create the Vulkan surface - * VkSurfaceKHR surface; - * if(!SDL_Vulkan_CreateSurface(window, instance, &surface)) - * handle_error(); - * \endcode - * - * \note \a window should have been created with the \c SDL_WINDOW_VULKAN flag. - * - * \note \a instance should have been created with the extensions returned - * by \c SDL_Vulkan_CreateSurface() enabled. - * - * \sa SDL_Vulkan_GetInstanceExtensions() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface( - SDL_Window *window, - VkInstance instance, - VkSurfaceKHR* surface); - -/** - * \brief Get the size of a window's underlying drawable in pixels (for use - * with setting viewport, scissor & etc). - * - * \param window SDL_Window from which the drawable size should be queried - * \param w Pointer to variable for storing the width in pixels, - * may be NULL - * \param h Pointer to variable for storing the height in pixels, - * may be NULL - * - * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI - * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a - * platform with high-DPI support (Apple calls this "Retina"), and not disabled - * by the \c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint. - * - * \note On macOS high-DPI support must be enabled for an application by - * setting NSHighResolutionCapable to true in its Info.plist. - * - * \sa SDL_GetWindowSize() - * \sa SDL_CreateWindow() - */ -extern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window * window, - int *w, int *h); - -/* @} *//* Vulkan support functions */ - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_vulkan_h_ */ diff --git a/Dependencies/SDL/Windows/include/begin_code.h b/Dependencies/SDL/Windows/include/begin_code.h deleted file mode 100644 index 170d69e..0000000 --- a/Dependencies/SDL/Windows/include/begin_code.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file begin_code.h - * - * This file sets things up for C dynamic library function definitions, - * static inlined functions, and structures aligned at 4-byte alignment. - * If you don't like ugly C preprocessor code, don't look at this file. :) - */ - -/* This shouldn't be nested -- included it around code only. */ -#ifdef _begin_code_h -#error Nested inclusion of begin_code.h -#endif -#define _begin_code_h - -#ifndef SDL_DEPRECATED -# if (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */ -# define SDL_DEPRECATED __attribute__((deprecated)) -# else -# define SDL_DEPRECATED -# endif -#endif - -#ifndef SDL_UNUSED -# ifdef __GNUC__ -# define SDL_UNUSED __attribute__((unused)) -# else -# define SDL_UNUSED -# endif -#endif - -/* Some compilers use a special export keyword */ -#ifndef DECLSPEC -# if defined(__WIN32__) || defined(__WINRT__) -# ifdef __BORLANDC__ -# ifdef BUILD_SDL -# define DECLSPEC -# else -# define DECLSPEC __declspec(dllimport) -# endif -# else -# define DECLSPEC __declspec(dllexport) -# endif -# elif defined(__OS2__) -# ifdef BUILD_SDL -# define DECLSPEC __declspec(dllexport) -# else -# define DECLSPEC -# endif -# else -# if defined(__GNUC__) && __GNUC__ >= 4 -# define DECLSPEC __attribute__ ((visibility("default"))) -# else -# define DECLSPEC -# endif -# endif -#endif - -/* By default SDL uses the C calling convention */ -#ifndef SDLCALL -#if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__) -#define SDLCALL __cdecl -#elif defined(__OS2__) || defined(__EMX__) -#define SDLCALL _System -# if defined (__GNUC__) && !defined(_System) -# define _System /* for old EMX/GCC compat. */ -# endif -#else -#define SDLCALL -#endif -#endif /* SDLCALL */ - -/* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */ -#ifdef __SYMBIAN32__ -#undef DECLSPEC -#define DECLSPEC -#endif /* __SYMBIAN32__ */ - -/* Force structure packing at 4 byte alignment. - This is necessary if the header is included in code which has structure - packing set to an alternate value, say for loading structures from disk. - The packing is reset to the previous value in close_code.h - */ -#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) -#ifdef _MSC_VER -#pragma warning(disable: 4103) -#endif -#ifdef __clang__ -#pragma clang diagnostic ignored "-Wpragma-pack" -#endif -#ifdef __BORLANDC__ -#pragma nopackwarning -#endif -#ifdef _M_X64 -/* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */ -#pragma pack(push,8) -#else -#pragma pack(push,4) -#endif -#endif /* Compiler needs structure packing set */ - -#ifndef SDL_INLINE -#if defined(__GNUC__) -#define SDL_INLINE __inline__ -#elif defined(_MSC_VER) || defined(__BORLANDC__) || \ - defined(__DMC__) || defined(__SC__) || \ - defined(__WATCOMC__) || defined(__LCC__) || \ - defined(__DECC) || defined(__CC_ARM) -#define SDL_INLINE __inline -#ifndef __inline__ -#define __inline__ __inline -#endif -#else -#define SDL_INLINE inline -#ifndef __inline__ -#define __inline__ inline -#endif -#endif -#endif /* SDL_INLINE not defined */ - -#ifndef SDL_FORCE_INLINE -#if defined(_MSC_VER) -#define SDL_FORCE_INLINE __forceinline -#elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) ) -#define SDL_FORCE_INLINE __attribute__((always_inline)) static __inline__ -#else -#define SDL_FORCE_INLINE static SDL_INLINE -#endif -#endif /* SDL_FORCE_INLINE not defined */ - -#ifndef SDL_NORETURN -#if defined(__GNUC__) -#define SDL_NORETURN __attribute__((noreturn)) -#elif defined(_MSC_VER) -#define SDL_NORETURN __declspec(noreturn) -#else -#define SDL_NORETURN -#endif -#endif /* SDL_NORETURN not defined */ - -/* Apparently this is needed by several Windows compilers */ -#if !defined(__MACH__) -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif /* NULL */ -#endif /* ! Mac OS X - breaks precompiled headers */ diff --git a/Dependencies/SDL/Windows/include/close_code.h b/Dependencies/SDL/Windows/include/close_code.h deleted file mode 100644 index 6aa411b..0000000 --- a/Dependencies/SDL/Windows/include/close_code.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2020 Sam Lantinga - - 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. -*/ - -/** - * \file close_code.h - * - * This file reverses the effects of begin_code.h and should be included - * after you finish any function and structure declarations in your headers - */ - -#ifndef _begin_code_h -#error close_code.h included without matching begin_code.h -#endif -#undef _begin_code_h - -/* Reset structure packing at previous byte alignment */ -#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) -#ifdef __BORLANDC__ -#pragma nopackwarning -#endif -#pragma pack(pop) -#endif /* Compiler needs structure packing set */ diff --git a/Dependencies/SDL/Windows/lib/x64/SDL2.dll b/Dependencies/SDL/Windows/lib/x64/SDL2.dll deleted file mode 100755 index 3131862..0000000 Binary files a/Dependencies/SDL/Windows/lib/x64/SDL2.dll and /dev/null differ diff --git a/Dependencies/SDL/Windows/lib/x64/SDL2.lib b/Dependencies/SDL/Windows/lib/x64/SDL2.lib deleted file mode 100755 index 545a294..0000000 Binary files a/Dependencies/SDL/Windows/lib/x64/SDL2.lib and /dev/null differ diff --git a/Dependencies/SDL/Windows/lib/x64/SDL2main.lib b/Dependencies/SDL/Windows/lib/x64/SDL2main.lib deleted file mode 100755 index e2d7dda..0000000 Binary files a/Dependencies/SDL/Windows/lib/x64/SDL2main.lib and /dev/null differ diff --git a/Dependencies/SDL/Windows/lib/x64/SDL2test.lib b/Dependencies/SDL/Windows/lib/x64/SDL2test.lib deleted file mode 100755 index df009bd..0000000 Binary files a/Dependencies/SDL/Windows/lib/x64/SDL2test.lib and /dev/null differ diff --git a/Dependencies/SDL/Windows/lib/x86/SDL2.dll b/Dependencies/SDL/Windows/lib/x86/SDL2.dll deleted file mode 100755 index af9f0bb..0000000 Binary files a/Dependencies/SDL/Windows/lib/x86/SDL2.dll and /dev/null differ diff --git a/Dependencies/SDL/Windows/lib/x86/SDL2.lib b/Dependencies/SDL/Windows/lib/x86/SDL2.lib deleted file mode 100755 index 659f816..0000000 Binary files a/Dependencies/SDL/Windows/lib/x86/SDL2.lib and /dev/null differ diff --git a/Dependencies/SDL/Windows/lib/x86/SDL2main.lib b/Dependencies/SDL/Windows/lib/x86/SDL2main.lib deleted file mode 100755 index d607875..0000000 Binary files a/Dependencies/SDL/Windows/lib/x86/SDL2main.lib and /dev/null differ diff --git a/Dependencies/SDL/Windows/lib/x86/SDL2test.lib b/Dependencies/SDL/Windows/lib/x86/SDL2test.lib deleted file mode 100755 index 183e48d..0000000 Binary files a/Dependencies/SDL/Windows/lib/x86/SDL2test.lib and /dev/null differ diff --git a/bin/Data/CrossPlatformSettings_piece_all.glsl b/bin/Data/CrossPlatformSettings_piece_all.glsl deleted file mode 100644 index ea4827e..0000000 --- a/bin/Data/CrossPlatformSettings_piece_all.glsl +++ /dev/null @@ -1,76 +0,0 @@ - -#define min3( a, b, c ) min( a, min( b, c ) ) -#define max3( a, b, c ) max( a, max( b, c ) ) - -#define float2 vec2 -#define float3 vec3 -#define float4 vec4 - -#define int2 ivec2 -#define int3 ivec3 -#define int4 ivec4 - -#define uint2 uvec2 -#define uint3 uvec3 -#define uint4 uvec4 - -#define float2x2 mat2 -#define float3x3 mat3 -#define float4x4 mat4 -#define ogre_float4x3 mat3x4 - -#define ushort uint -#define ushort3 uint3 -#define ushort4 uint4 - -//Short used for read operations. It's an int in GLSL & HLSL. An ushort in Metal -#define rshort int -#define rshort2 int2 -#define rint int -//Short used for write operations. It's an int in GLSL. An ushort in HLSL & Metal -#define wshort2 int2 -#define wshort3 int3 - -#define toFloat3x3( x ) mat3( x ) -#define buildFloat3x3( row0, row1, row2 ) mat3( row0, row1, row2 ) - -#define mul( x, y ) ((x) * (y)) -#define saturate(x) clamp( (x), 0.0, 1.0 ) -#define lerp mix -#define rsqrt inversesqrt -#define INLINE -#define NO_INTERPOLATION_PREFIX flat -#define NO_INTERPOLATION_SUFFIX - -#define PARAMS_ARG_DECL -#define PARAMS_ARG - -#define reversebits bitfieldReverse - -#define OGRE_Sample( tex, sampler, uv ) texture( tex, uv ) -#define OGRE_SampleLevel( tex, sampler, uv, lod ) textureLod( tex, uv, lod ) -#define OGRE_SampleArray2D( tex, sampler, uv, arrayIdx ) texture( tex, vec3( uv, arrayIdx ) ) -#define OGRE_SampleArray2DLevel( tex, sampler, uv, arrayIdx, lod ) textureLod( tex, vec3( uv, arrayIdx ), lod ) -#define OGRE_SampleArrayCubeLevel( tex, sampler, uv, arrayIdx, lod ) textureLod( tex, vec4( uv, arrayIdx ), lod ) -#define OGRE_SampleGrad( tex, sampler, uv, ddx, ddy ) textureGrad( tex, uv, ddx, ddy ) -#define OGRE_SampleArray2DGrad( tex, sampler, uv, arrayIdx, ddx, ddy ) textureGrad( tex, vec3( uv, arrayIdx ), ddx, ddy ) -#define OGRE_ddx( val ) dFdx( val ) -#define OGRE_ddy( val ) dFdy( val ) -#define OGRE_Load2D( tex, iuv, lod ) texelFetch( tex, iuv, lod ) -#define OGRE_LoadArray2D( tex, iuv, arrayIdx, lod ) texelFetch( tex, ivec3( iuv, arrayIdx ), lod ) -#define OGRE_Load2DMS( tex, iuv, subsample ) texelFetch( tex, iuv, subsample ) - -#define OGRE_Load3D( tex, iuv, lod ) texelFetch( tex, ivec3( iuv ), lod ) - -#define OGRE_GatherRed( tex, sampler, uv ) textureGather( tex, uv, 0 ) -#define OGRE_GatherGreen( tex, sampler, uv ) textureGather( tex, uv, 1 ) -#define OGRE_GatherBlue( tex, sampler, uv ) textureGather( tex, uv, 2 ) - -#define bufferFetch1( buffer, idx ) texelFetch( buffer, idx ).x - -#define OGRE_SAMPLER_ARG_DECL( samplerName ) -#define OGRE_SAMPLER_ARG( samplerName ) - -#define OGRE_Texture3D_float4 sampler3D -#define OGRE_OUT_REF( declType, variableName ) out declType variableName -#define OGRE_INOUT_REF( declType, variableName ) inout declType variableName diff --git a/bin/Data/UavCrossPlatform_piece_all.glsl b/bin/Data/UavCrossPlatform_piece_all.glsl deleted file mode 100644 index d69f5a5..0000000 --- a/bin/Data/UavCrossPlatform_piece_all.glsl +++ /dev/null @@ -1,17 +0,0 @@ - -#define OGRE_imageLoad2D( inImage, iuv ) imageLoad( inImage, int2( iuv ) ) -#define OGRE_imageLoad2DArray( inImage, iuvw ) imageLoad( inImage, int3( iuvw ) ) - -#define OGRE_imageWrite2D1( outImage, iuv, value ) imageStore( outImage, int2( iuv ), float4( value, 0, 0, 0 ) ) -#define OGRE_imageWrite2D2( outImage, iuv, value ) imageStore( outImage, int2( iuv ), float4( value, 0, 0 ) ) -#define OGRE_imageWrite2D4( outImage, iuv, value ) imageStore( outImage, int2( iuv ), value ) - -#define OGRE_imageLoad3D( inImage, iuv ) imageLoad( inImage, int3( iuv ) ) - -#define OGRE_imageWrite3D1( outImage, iuv, value ) imageStore( outImage, int3( iuv ), value ) -#define OGRE_imageWrite3D4( outImage, iuv, value ) imageStore( outImage, int3( iuv ), value ) - -#define OGRE_imageWrite2DArray1( outImage, iuvw, value ) imageStore( outImage, int3( iuvw ), value ) -#define OGRE_imageWrite2DArray4( outImage, iuvw, value ) imageStore( outImage, int3( iuvw ), value ) - -#define __sharedOnlyBarrier memoryBarrierShared();barrier(); diff --git a/bin/Data/bc1.glsl b/bin/Data/bc1.glsl deleted file mode 100644 index deb17e7..0000000 --- a/bin/Data/bc1.glsl +++ /dev/null @@ -1,514 +0,0 @@ -#version 430 core - -// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" - -#include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" - -#define FLT_MAX 340282346638528859811704183484516925440.0f - -uniform uint p_numRefinements; - -uniform sampler2D srcTex; - -layout( rg32ui ) uniform restrict writeonly uimage2D dstTexture; - -layout( std430, binding = 1 ) readonly restrict buffer globalBuffer -{ - float2 c_oMatch5[256]; - float2 c_oMatch6[256]; -}; - -layout( local_size_x = 8, // - local_size_y = 8, // - local_size_z = 1 ) in; - -float3 rgb565to888( float rgb565 ) -{ - float3 retVal; - retVal.x = floor( rgb565 / 2048.0f ); - retVal.y = floor( mod( rgb565, 2048.0f ) / 32.0f ); - retVal.z = floor( mod( rgb565, 32.0f ) ); - - // This is the correct 565 to 888 conversion: - // rgb = floor( rgb * ( 255.0f / float3( 31.0f, 63.0f, 31.0f ) ) + 0.5f ) - // - // However stb_dxt follows a different one: - // rb = floor( rb * ( 256 / 32 + 8 / 32 ) ); - // g = floor( g * ( 256 / 64 + 4 / 64 ) ); - // - // I'm not sure exactly why but it's possible this is how the S3TC specifies it should be decoded - // It's quite possible this is the reason: - // http://www.ludicon.com/castano/blog/2009/03/gpu-dxt-decompression/ - // - // Or maybe it's just because it's cheap to do with integer shifts. - // Anyway, we follow stb_dxt's conversion just in case - // (gives almost the same result, with 1 or -1 of difference for a very few values) - // - // Perhaps when we make 888 -> 565 -> 888 it doesn't matter - // because they end up mapping to the original number - - return floor( retVal * float3( 8.25f, 4.0625f, 8.25f ) ); -} - -float rgb888to565( float3 rgbValue ) -{ - rgbValue.rb = floor( rgbValue.rb * 31.0f / 255.0f + 0.5f ); - rgbValue.g = floor( rgbValue.g * 63.0f / 255.0f + 0.5f ); - - return rgbValue.r * 2048.0f + rgbValue.g * 32.0f + rgbValue.b; -} - -// linear interpolation at 1/3 point between a and b, using desired rounding type -float3 lerp13( float3 a, float3 b ) -{ -#ifdef STB_DXT_USE_ROUNDING_BIAS - // with rounding bias - return a + floor( ( b - a ) * ( 1.0f / 3.0f ) + 0.5f ); -#else - // without rounding bias - return floor( ( 2.0f * a + b ) / 3.0f ); -#endif -} - -/// Unpacks a block of 4 colours from two 16-bit endpoints -void EvalColors( out float3 colours[4], float c0, float c1 ) -{ - colours[0] = rgb565to888( c0 ); - colours[1] = rgb565to888( c1 ); - colours[2] = lerp13( colours[0], colours[1] ); - colours[3] = lerp13( colours[1], colours[0] ); -} - -/** The color optimization function. (Clever code, part 1) -@param outMinEndp16 [out] - Minimum endpoint, in RGB565 -@param outMaxEndp16 [out] - Maximum endpoint, in RGB565 -*/ -void OptimizeColorsBlock( const uint srcPixelsBlock[16], out float outMinEndp16, out float outMaxEndp16 ) -{ - // determine color distribution - float3 avgColour; - float3 minColour; - float3 maxColour; - - avgColour = minColour = maxColour = unpackUnorm4x8( srcPixelsBlock[0] ).xyz; - for( int i = 1; i < 16; ++i ) - { - const float3 currColourUnorm = unpackUnorm4x8( srcPixelsBlock[i] ).xyz; - avgColour += currColourUnorm; - minColour = min( minColour, currColourUnorm ); - maxColour = max( maxColour, currColourUnorm ); - } - - avgColour = round( avgColour * 255.0f / 16.0f ); - maxColour *= 255.0f; - minColour *= 255.0f; - - // determine covariance matrix - float cov[6]; - for( int i = 0; i < 6; ++i ) - cov[i] = 0; - - for( int i = 0; i < 16; ++i ) - { - const float3 currColour = unpackUnorm4x8( srcPixelsBlock[i] ).xyz * 255.0f; - float3 rgbDiff = currColour - avgColour; - - cov[0] += rgbDiff.r * rgbDiff.r; - cov[1] += rgbDiff.r * rgbDiff.g; - cov[2] += rgbDiff.r * rgbDiff.b; - cov[3] += rgbDiff.g * rgbDiff.g; - cov[4] += rgbDiff.g * rgbDiff.b; - cov[5] += rgbDiff.b * rgbDiff.b; - } - - // convert covariance matrix to float, find principal axis via power iter - for( int i = 0; i < 6; ++i ) - cov[i] /= 255.0f; - - float3 vF = maxColour - minColour; - - const int nIterPower = 4; - for( int iter = 0; iter < nIterPower; ++iter ) - { - const float r = vF.r * cov[0] + vF.g * cov[1] + vF.b * cov[2]; - const float g = vF.r * cov[1] + vF.g * cov[3] + vF.b * cov[4]; - const float b = vF.r * cov[2] + vF.g * cov[4] + vF.b * cov[5]; - - vF.r = r; - vF.g = g; - vF.b = b; - } - - float magn = max3( abs( vF.r ), abs( vF.g ), abs( vF.b ) ); - float3 v; - - if( magn < 4.0f ) - { // too small, default to luminance - v.r = 299.0f; // JPEG YCbCr luma coefs, scaled by 1000. - v.g = 587.0f; - v.b = 114.0f; - } - else - { - v = trunc( vF * ( 512.0f / magn ) ); - } - - // Pick colors at extreme points - float3 minEndpoint, maxEndpoint; - float minDot = FLT_MAX; - float maxDot = -FLT_MAX; - for( int i = 0; i < 16; ++i ) - { - const float3 currColour = unpackUnorm4x8( srcPixelsBlock[i] ).xyz * 255.0f; - const float dotValue = dot( currColour, v ); - - if( dotValue < minDot ) - { - minDot = dotValue; - minEndpoint = currColour; - } - - if( dotValue > maxDot ) - { - maxDot = dotValue; - maxEndpoint = currColour; - } - } - - outMinEndp16 = rgb888to565( minEndpoint ); - outMaxEndp16 = rgb888to565( maxEndpoint ); -} - -// The color matching function -uint MatchColorsBlock( const uint srcPixelsBlock[16], float3 colour[4] ) -{ - uint mask = 0u; - float3 dir = colour[0] - colour[1]; - float stops[4]; - - for( int i = 0; i < 4; ++i ) - stops[i] = dot( colour[i], dir ); - - // think of the colors as arranged on a line; project point onto that line, then choose - // next color out of available ones. we compute the crossover points for "best color in top - // half"/"best in bottom half" and then the same inside that subinterval. - // - // relying on this 1d approximation isn't always optimal in terms of euclidean distance, - // but it's very close and a lot faster. - // http://cbloomrants.blogspot.com/2008/12/12-08-08-dxtc-summary.html - - float c0Point = trunc( ( stops[1] + stops[3] ) * 0.5f ); - float halfPoint = trunc( ( stops[3] + stops[2] ) * 0.5f ); - float c3Point = trunc( ( stops[2] + stops[0] ) * 0.5f ); - -#ifndef BC1_DITHER - // the version without dithering is straightforward - for( uint i = 16u; i-- > 0u; ) - { - const float3 currColour = unpackUnorm4x8( srcPixelsBlock[i] ).xyz * 255.0f; - - const float dotValue = dot( currColour, dir ); - mask <<= 2u; - - if( dotValue < halfPoint ) - mask |= ( ( dotValue < c0Point ) ? 1u : 3u ); - else - mask |= ( ( dotValue < c3Point ) ? 2u : 0u ); - } -#else - // with floyd-steinberg dithering - float4 ep1 = float4( 0, 0, 0, 0 ); - float4 ep2 = float4( 0, 0, 0, 0 ); - - c0Point *= 16.0f; - halfPoint *= 16.0f; - c3Point *= 16.0f; - - for( uint y = 0u; y < 4u; ++y ) - { - float ditherDot; - uint lmask, step; - - float3 currColour; - float dotValue; - - currColour = unpackUnorm4x8( srcPixelsBlock[y * 4 + 0] ).xyz * 255.0f; - dotValue = dot( currColour, dir ); - - ditherDot = ( dotValue * 16.0f ) + ( 3 * ep2[1] + 5 * ep2[0] ); - if( ditherDot < halfPoint ) - step = ( ditherDot < c0Point ) ? 1u : 3u; - else - step = ( ditherDot < c3Point ) ? 2u : 0u; - ep1[0] = dotValue - stops[step]; - lmask = step; - - currColour = unpackUnorm4x8( srcPixelsBlock[y * 4 + 1] ).xyz * 255.0f; - dotValue = dot( currColour, dir ); - - ditherDot = ( dotValue * 16.0f ) + ( 7 * ep1[0] + 3 * ep2[2] + 5 * ep2[1] + ep2[0] ); - if( ditherDot < halfPoint ) - step = ( ditherDot < c0Point ) ? 1u : 3u; - else - step = ( ditherDot < c3Point ) ? 2u : 0u; - ep1[1] = dotValue - stops[step]; - lmask |= step << 2u; - - currColour = unpackUnorm4x8( srcPixelsBlock[y * 4 + 2] ).xyz * 255.0f; - dotValue = dot( currColour, dir ); - - ditherDot = ( dotValue * 16.0f ) + ( 7 * ep1[1] + 3 * ep2[3] + 5 * ep2[2] + ep2[1] ); - if( ditherDot < halfPoint ) - step = ( ditherDot < c0Point ) ? 1u : 3u; - else - step = ( ditherDot < c3Point ) ? 2u : 0u; - ep1[2] = dotValue - stops[step]; - lmask |= step << 4u; - - currColour = unpackUnorm4x8( srcPixelsBlock[y * 4 + 2] ).xyz * 255.0f; - dotValue = dot( currColour, dir ); - - ditherDot = ( dotValue * 16.0f ) + ( 7 * ep1[2] + 5 * ep2[3] + ep2[2] ); - if( ditherDot < halfPoint ) - step = ( ditherDot < c0Point ) ? 1u : 3u; - else - step = ( ditherDot < c3Point ) ? 2u : 0u; - ep1[3] = dotValue - stops[step]; - lmask |= step << 6u; - - mask |= lmask << ( y * 8u ); - { - float4 tmp = ep1; - ep1 = ep2; - ep2 = tmp; - } // swap - } -#endif - - return mask; -} - -// The refinement function. (Clever code, part 2) -// Tries to optimize colors to suit block contents better. -// (By solving a least squares system via normal equations+Cramer's rule) -bool RefineBlock( const uint srcPixelsBlock[16], uint mask, inout float inOutMinEndp16, - inout float inOutMaxEndp16 ) -{ - float newMin16, newMax16; - const float oldMin = inOutMinEndp16; - const float oldMax = inOutMaxEndp16; - - if( ( mask ^ ( mask << 2u ) ) < 4u ) // all pixels have the same index? - { - // yes, linear system would be singular; solve using optimal - // single-color match on average color - float3 rgbVal = float3( 8.0f / 255.0f, 8.0f / 255.0f, 8.0f / 255.0f ); - for( int i = 0; i < 16; ++i ) - rgbVal += unpackUnorm4x8( srcPixelsBlock[i] ).xyz; - - rgbVal = floor( rgbVal * ( 255.0f / 16.0f ) ); - - newMax16 = c_oMatch5[uint( rgbVal.r )][0] * 2048.0f + // - c_oMatch6[uint( rgbVal.g )][0] * 32.0f + // - c_oMatch5[uint( rgbVal.b )][0]; - newMin16 = c_oMatch5[uint( rgbVal.r )][1] * 2048.0f + // - c_oMatch6[uint( rgbVal.g )][1] * 32.0f + // - c_oMatch5[uint( rgbVal.b )][1]; - } - else - { - const float w1Tab[4] = { 3, 0, 2, 1 }; - const float prods[4] = { 589824.0f, 2304.0f, 262402.0f, 66562.0f }; - // ^some magic to save a lot of multiplies in the accumulating loop... - // (precomputed products of weights for least squares system, accumulated inside one 32-bit - // register) - - float akku = 0.0f; - uint cm = mask; - float3 at1 = float3( 0, 0, 0 ); - float3 at2 = float3( 0, 0, 0 ); - for( int i = 0; i < 16; ++i, cm >>= 2u ) - { - const float3 currColour = unpackUnorm4x8( srcPixelsBlock[i] ).xyz * 255.0f; - - const uint step = cm & 3u; - const float w1 = w1Tab[step]; - akku += prods[step]; - at1 += currColour * w1; - at2 += currColour; - } - - at2 = 3.0f * at2 - at1; - - // extract solutions and decide solvability - const float xx = floor( akku / 65535.0f ); - const float yy = floor( mod( akku, 65535.0f ) / 256.0f ); - const float xy = mod( akku, 256.0f ); - - float2 f_rb_g; - f_rb_g.x = 3.0f * 31.0f / 255.0f / ( xx * yy - xy * xy ); - f_rb_g.y = f_rb_g.x * 63.0f / 31.0f; - - // solve. - const float3 newMaxVal = clamp( floor( ( at1 * yy - at2 * xy ) * f_rb_g.xyx + 0.5f ), - float3( 0.0f, 0.0f, 0.0f ), float3( 31, 63, 31 ) ); - newMax16 = newMaxVal.x * 2048.0f + newMaxVal.y * 32.0f + newMaxVal.z; - - const float3 newMinVal = clamp( floor( ( at2 * xx - at1 * xy ) * f_rb_g.xyx + 0.5f ), - float3( 0.0f, 0.0f, 0.0f ), float3( 31, 63, 31 ) ); - newMin16 = newMinVal.x * 2048.0f + newMinVal.y * 32.0f + newMinVal.z; - } - - inOutMinEndp16 = newMin16; - inOutMaxEndp16 = newMax16; - - return oldMin != newMin16 || oldMax != newMax16; -} - -#ifdef BC1_DITHER -/// Quantizes 'srcValue' which is originally in 888 (full range), -/// converting it to 565 and then back to 888 (quantized) -float3 quant( float3 srcValue ) -{ - srcValue = clamp( srcValue, 0.0f, 255.0f ); - // Convert 888 -> 565 - srcValue = floor( srcValue * float3( 31.0f / 255.0f, 63.0f / 255.0f, 31.0f / 255.0f ) + 0.5f ); - // Convert 565 -> 888 back - srcValue = floor( srcValue * float3( 8.25f, 4.0625f, 8.25f ) ); - - return srcValue; -} - -void DitherBlock( const uint srcPixBlck[16], out uint dthPixBlck[16] ) -{ - float3 ep1[4] = { float3( 0, 0, 0 ), float3( 0, 0, 0 ), float3( 0, 0, 0 ), float3( 0, 0, 0 ) }; - float3 ep2[4] = { float3( 0, 0, 0 ), float3( 0, 0, 0 ), float3( 0, 0, 0 ), float3( 0, 0, 0 ) }; - - for( uint y = 0u; y < 16u; y += 4u ) - { - float3 srcPixel, dithPixel; - - srcPixel = unpackUnorm4x8( srcPixBlck[y + 0u] ).xyz * 255.0f; - dithPixel = quant( srcPixel + trunc( ( 3 * ep2[1] + 5 * ep2[0] ) * ( 1.0f / 16.0f ) ) ); - ep1[0] = srcPixel - dithPixel; - dthPixBlck[y + 0u] = packUnorm4x8( float4( dithPixel * ( 1.0f / 255.0f ), 1.0f ) ); - - srcPixel = unpackUnorm4x8( srcPixBlck[y + 1u] ).xyz * 255.0f; - dithPixel = quant( - srcPixel + trunc( ( 7 * ep1[0] + 3 * ep2[2] + 5 * ep2[1] + ep2[0] ) * ( 1.0f / 16.0f ) ) ); - ep1[1] = srcPixel - dithPixel; - dthPixBlck[y + 1u] = packUnorm4x8( float4( dithPixel * ( 1.0f / 255.0f ), 1.0f ) ); - - srcPixel = unpackUnorm4x8( srcPixBlck[y + 2u] ).xyz * 255.0f; - dithPixel = quant( - srcPixel + trunc( ( 7 * ep1[1] + 3 * ep2[3] + 5 * ep2[2] + ep2[1] ) * ( 1.0f / 16.0f ) ) ); - ep1[2] = srcPixel - dithPixel; - dthPixBlck[y + 2u] = packUnorm4x8( float4( dithPixel * ( 1.0f / 255.0f ), 1.0f ) ); - - srcPixel = unpackUnorm4x8( srcPixBlck[y + 3u] ).xyz * 255.0f; - dithPixel = quant( srcPixel + trunc( ( 7 * ep1[2] + 5 * ep2[3] + ep2[2] ) * ( 1.0f / 16.0f ) ) ); - ep1[3] = srcPixel - dithPixel; - dthPixBlck[y + 3u] = packUnorm4x8( float4( dithPixel * ( 1.0f / 255.0f ), 1.0f ) ); - - // swap( ep1, ep2 ) - for( uint i = 0u; i < 4u; ++i ) - { - float3 tmp = ep1[i]; - ep1[i] = ep2[i]; - ep2[i] = tmp; - } - } -} -#endif - -void main() -{ - uint srcPixelsBlock[16]; - - bool bAllColoursEqual = true; - - // Load the whole 4x4 block - const uint2 pixelsToLoadBase = gl_GlobalInvocationID.xy << 2u; - for( uint i = 0u; i < 16u; ++i ) - { - const uint2 pixelsToLoad = pixelsToLoadBase + uint2( i & 0x03u, i >> 2u ); - const float3 srcPixels0 = OGRE_Load2D( srcTex, int2( pixelsToLoad ), 0 ).xyz; - srcPixelsBlock[i] = packUnorm4x8( float4( srcPixels0, 1.0f ) ); - bAllColoursEqual = bAllColoursEqual && srcPixelsBlock[0] == srcPixelsBlock[i]; - } - - float maxEndp16, minEndp16; - uint mask = 0u; - - if( bAllColoursEqual ) - { - const uint3 rgbVal = uint3( unpackUnorm4x8( srcPixelsBlock[0] ).xyz * 255.0f ); - mask = 0xAAAAAAAAu; - maxEndp16 = - c_oMatch5[rgbVal.r][0] * 2048.0f + c_oMatch6[rgbVal.g][0] * 32.0f + c_oMatch5[rgbVal.b][0]; - minEndp16 = - c_oMatch5[rgbVal.r][1] * 2048.0f + c_oMatch6[rgbVal.g][1] * 32.0f + c_oMatch5[rgbVal.b][1]; - } - else - { -#ifdef BC1_DITHER - uint ditherPixelsBlock[16]; - // first step: compute dithered version for PCA if desired - DitherBlock( srcPixelsBlock, ditherPixelsBlock ); -#else -# define ditherPixelsBlock srcPixelsBlock -#endif - - // second step: pca+map along principal axis - OptimizeColorsBlock( ditherPixelsBlock, minEndp16, maxEndp16 ); - if( minEndp16 != maxEndp16 ) - { - float3 colours[4]; - EvalColors( colours, maxEndp16, minEndp16 ); // Note min/max are inverted - mask = MatchColorsBlock( srcPixelsBlock, colours ); - } - - // third step: refine (multiple times if requested) - bool bStopRefinement = false; - for( uint i = 0u; i < p_numRefinements && !bStopRefinement; ++i ) - { - const uint lastMask = mask; - - if( RefineBlock( ditherPixelsBlock, mask, minEndp16, maxEndp16 ) ) - { - if( minEndp16 != maxEndp16 ) - { - float3 colours[4]; - EvalColors( colours, maxEndp16, minEndp16 ); // Note min/max are inverted - mask = MatchColorsBlock( srcPixelsBlock, colours ); - } - else - { - mask = 0u; - bStopRefinement = true; - } - } - - bStopRefinement = mask == lastMask || bStopRefinement; - } - } - - // write the color block - if( maxEndp16 < minEndp16 ) - { - const float tmpValue = minEndp16; - minEndp16 = maxEndp16; - maxEndp16 = tmpValue; - mask ^= 0x55555555u; - } - - uint2 outputBytes; - outputBytes.x = uint( maxEndp16 ) | ( uint( minEndp16 ) << 16u ); - outputBytes.y = mask; - - uint2 dstUV = gl_GlobalInvocationID.xy; - imageStore( dstTexture, int2( dstUV ), uint4( outputBytes.xy, 0u, 0u ) ); -} diff --git a/bin/Data/bc4.glsl b/bin/Data/bc4.glsl deleted file mode 100644 index 1c8cbe3..0000000 --- a/bin/Data/bc4.glsl +++ /dev/null @@ -1,156 +0,0 @@ -#version 430 core - -// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" - -#include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" - -shared float2 g_minMaxValues[4u * 4u * 4u]; -shared uint2 g_mask[4u * 4u]; - -layout( location = 0 ) uniform float2 params; - -#define p_channelIdx params.x -#define p_useSNorm params.y - -uniform sampler2D srcTex; - -layout( rg32ui ) uniform restrict writeonly uimage2D dstTexture; - -layout( local_size_x = 4, // - local_size_y = 4, // - local_size_z = 4 ) in; - -/// Each block is 16 pixels -/// Each thread works on 4 pixels -/// Therefore each block needs 4 threads, generating 8 masks -/// At the end these 8 masks get merged into 2 and results written to output -/// -/// **Q: Why 4 pixels per thread? Why not 1 pixel per thread? Why not 2? Why not 16?** -/// -/// A: It's a sweetspot. -/// - Very short threads cannot fill expensive GPUs with enough work (dispatch bound) -/// - Lots of threads means lots of synchronization (e.g. evaluating min/max, merging masks) -/// overhead, and also more LDS usage which reduces occupancy. -/// - Long threads (e.g. 1 thread per block) misses parallelism opportunities -void main() -{ - float minVal, maxVal; - float4 srcPixel; - - const uint blockThreadId = gl_LocalInvocationID.x; - - const uint2 pixelsToLoadBase = gl_GlobalInvocationID.yz << 2u; - - for( uint i = 0u; i < 4u; ++i ) - { - const uint2 pixelsToLoad = pixelsToLoadBase + uint2( i, blockThreadId ); - - const float4 value = OGRE_Load2D( srcTex, int2( pixelsToLoad ), 0 ).xyzw; - srcPixel[i] = p_channelIdx == 0 ? value.x : ( p_channelIdx == 1 ? value.y : value.w ); - srcPixel[i] *= 255.0f; - } - - minVal = min3( srcPixel.x, srcPixel.y, srcPixel.z ); - maxVal = max3( srcPixel.x, srcPixel.y, srcPixel.z ); - minVal = min( minVal, srcPixel.w ); - maxVal = max( maxVal, srcPixel.w ); - - const uint minMaxIdxBase = ( gl_LocalInvocationID.z << 4u ) + ( gl_LocalInvocationID.y << 2u ); - const uint maskIdxBase = ( gl_LocalInvocationID.z << 2u ) + gl_LocalInvocationID.y; - - g_minMaxValues[minMaxIdxBase + blockThreadId] = float2( minVal, maxVal ); - g_mask[maskIdxBase] = uint2( 0u, 0u ); - - __sharedOnlyBarrier; - - // Have all 4 threads in the block grab the min/max value by comparing what all 4 threads uploaded - for( uint i = 0u; i < 4u; ++i ) - { - minVal = min( g_minMaxValues[minMaxIdxBase + i].x, minVal ); - maxVal = max( g_minMaxValues[minMaxIdxBase + i].y, maxVal ); - } - - // determine bias and emit color indices - // given the choice of maxVal/minVal, these indices are optimal: - // http://fgiesen.wordpress.com/2009/12/15/dxt5-alpha-block-index-determination/ - float dist = maxVal - minVal; - float dist4 = dist * 4.0f; - float dist2 = dist * 2.0f; - float bias = ( dist < 8 ) ? ( dist - 1 ) : ( trunc( dist * 0.5f ) + 2 ); - bias -= minVal * 7; - - uint mask0 = 0u, mask1 = 0u; - - for( uint i = 0u; i < 4u; ++i ) - { - float a = srcPixel[i] * 7.0f + bias; - - int ind = 0; - - // select index. this is a "linear scale" lerp factor between 0 (val=min) and 7 (val=max). - if( a >= dist4 ) - { - ind = 4; - a -= dist4; - } - - if( a >= dist2 ) - { - ind += 2; - a -= dist2; - } - - if( a >= dist ) - ind += 1; - - // turn linear scale into DXT index (0/1 are extremal pts) - ind = -ind & 7; - ind ^= ( 2 > ind ) ? 1 : 0; - - // write index - const uint bits = 16u + ( ( blockThreadId << 2u ) + i ) * 3u; - if( bits < 32u ) - { - mask0 |= uint( ind ) << bits; - if( bits + 3u > 32u ) - { - mask1 |= uint( ind ) >> ( 32u - bits ); - } - } - else - { - mask1 |= uint( ind ) << ( bits - 32u ); - } - } - - if( mask0 != 0u ) - atomicOr( g_mask[maskIdxBase].x, mask0 ); - if( mask1 != 0u ) - atomicOr( g_mask[maskIdxBase].y, mask1 ); - - __sharedOnlyBarrier; - - if( blockThreadId == 0u ) - { - // Save data - uint2 outputBytes; - - if( p_useSNorm != 0.0f ) - { - outputBytes.x = - packSnorm4x8( float4( maxVal * ( 1.0f / 255.0f ) * 2.0f - 1.0f, - minVal * ( 1.0f / 255.0f ) * 2.0f - 1.0f, 0.0f, 0.0f ) ); - } - else - { - outputBytes.x = packUnorm4x8( - float4( maxVal * ( 1.0f / 255.0f ), minVal * ( 1.0f / 255.0f ), 0.0f, 0.0f ) ); - } - outputBytes.x |= g_mask[maskIdxBase].x; - outputBytes.y = g_mask[maskIdxBase].y; - - uint2 dstUV = gl_GlobalInvocationID.yz; - imageStore( dstTexture, int2( dstUV ), uint4( outputBytes.xy, 0u, 0u ) ); - } -} diff --git a/bin/Data/bc6h.glsl b/bin/Data/bc6h.glsl deleted file mode 100644 index 909a07c..0000000 --- a/bin/Data/bc6h.glsl +++ /dev/null @@ -1,648 +0,0 @@ -#version 430 core - -#include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" - -#define QUALITY - -//SIGNED macro is WIP -//#define SIGNED - -float3 f32tof16( float3 value ) -{ - return float3( packHalf2x16( float2( value.x, 0.0 ) ), - packHalf2x16( float2( value.y, 0.0 ) ), - packHalf2x16( float2( value.z, 0.0 ) ) ); -} - -float3 f16tof32( uint3 value ) -{ - return float3( unpackHalf2x16( value.x ).x, - unpackHalf2x16( value.y ).x, - unpackHalf2x16( value.z ).x ); -} - -float f32tof16( float value ) -{ - return packHalf2x16( float2( value.x, 0.0 ) ); -} - -float f16tof32( uint value ) -{ - return unpackHalf2x16( value.x ).x; -} - -uniform sampler2D srcTexture; - -layout( rgba32ui ) uniform restrict writeonly uimage2D dstTexture; - -layout(location = 0) uniform float2 p_textureSizeRcp; - -const float HALF_MAX = 65504.0f; -const uint PATTERN_NUM = 32u; - -float CalcMSLE( float3 a, float3 b ) -{ - float3 err = log2( ( b + 1.0f ) / ( a + 1.0f ) );; - err = err * err; - return err.x + err.y + err.z; -} - -uint PatternFixupID( uint i ) -{ - uint ret = 15u; - ret = ( ( 3441033216u >> i ) & 0x1u ) != 0 ? 2u : ret; - ret = ( ( 845414400u >> i ) & 0x1u ) != 0 ? 8u : ret; - return ret; -} - -uint Pattern( uint p, uint i ) -{ - uint p2 = p / 2u; - uint p3 = p - p2 * 2u; - - uint enc = 0u; - enc = p2 == 0u ? 2290666700u : enc; - enc = p2 == 1u ? 3972591342u : enc; - enc = p2 == 2u ? 4276930688u : enc; - enc = p2 == 3u ? 3967876808u : enc; - enc = p2 == 4u ? 4293707776u : enc; - enc = p2 == 5u ? 3892379264u : enc; - enc = p2 == 6u ? 4278255592u : enc; - enc = p2 == 7u ? 4026597360u : enc; - enc = p2 == 8u ? 9369360u : enc; - enc = p2 == 9u ? 147747072u : enc; - enc = p2 == 10u ? 1930428556u : enc; - enc = p2 == 11u ? 2362323200u : enc; - enc = p2 == 12u ? 823134348u : enc; - enc = p2 == 13u ? 913073766u : enc; - enc = p2 == 14u ? 267393000u : enc; - enc = p2 == 15u ? 966553998u : enc; - - enc = p3 != 0u ? enc >> 16u : enc; - uint ret = ( enc >> i ) & 0x1u; - return ret; -} - -#ifndef SIGNED -//UF -float3 Quantize7( float3 x ) -{ - return ( f32tof16( x ) * 128.0f ) / ( 0x7bff + 1.0f ); -} - -float3 Quantize9( float3 x ) -{ - return ( f32tof16( x ) * 512.0f ) / ( 0x7bff + 1.0f ); -} - -float3 Quantize10( float3 x ) -{ - return ( f32tof16( x ) * 1024.0f ) / ( 0x7bff + 1.0f ); -} - -float3 Unquantize7( float3 x ) -{ - return ( x * 65536.0f + 0x8000 ) / 128.0f; -} - -float3 Unquantize9( float3 x ) -{ - return ( x * 65536.0f + 0x8000 ) / 512.0f; -} - -float3 Unquantize10( float3 x ) -{ - return ( x * 65536.0f + 0x8000 ) / 1024.0f; -} - -float3 FinishUnquantize( float3 endpoint0Unq, float3 endpoint1Unq, float weight ) -{ - float3 comp = ( endpoint0Unq * ( 64.0f - weight ) + endpoint1Unq * weight + 32.0f ) * ( 31.0f / 4096.0f ); - return f16tof32( uint3( comp ) ); -} -#else -//SF - -float3 cmpSign( float3 value ) -{ - float3 signVal; - signVal.x = value.x >= 0.0f ? 1.0f : -1.0f; - signVal.y = value.y >= 0.0f ? 1.0f : -1.0f; - signVal.z = value.z >= 0.0f ? 1.0f : -1.0f; - return signVal; -} - -float3 Quantize7( float3 x ) -{ - float3 signVal = cmpSign( x ); - return signVal * ( f32tof16( abs( x ) ) * 64.0f ) / ( 0x7bff + 1.0f ); -} - -float3 Quantize9( float3 x ) -{ - float3 signVal = cmpSign( x ); - return signVal * ( f32tof16( abs( x ) ) * 256.0f ) / ( 0x7bff + 1.0f ); -} - -float3 Quantize10( float3 x ) -{ - float3 signVal = cmpSign( x ); - return signVal * ( f32tof16( abs( x ) ) * 512.0f ) / ( 0x7bff + 1.0f ); -} - -float3 Unquantize7( float3 x ) -{ - float3 signVal = sign( x ); - x = abs( x ); - float3 finalVal = signVal * ( x * 32768.0f + 0x4000 ) / 64.0f; - finalVal.x = x.x >= 64.0f ? 32767.0 : finalVal.x; - finalVal.y = x.y >= 64.0f ? 32767.0 : finalVal.y; - finalVal.z = x.z >= 64.0f ? 32767.0 : finalVal.z; - return finalVal; -} - -float3 Unquantize9( float3 x ) -{ - float3 signVal = sign( x ); - x = abs( x ); - float3 finalVal = signVal * ( x * 32768.0f + 0x4000 ) / 256.0f; - finalVal.x = x.x >= 256.0f ? 32767.0 : finalVal.x; - finalVal.y = x.y >= 256.0f ? 32767.0 : finalVal.y; - finalVal.z = x.z >= 256.0f ? 32767.0 : finalVal.z; - return finalVal; -} - -float3 Unquantize10( float3 x ) -{ - float3 signVal = sign( x ); - x = abs( x ); - float3 finalVal = signVal * ( x * 32768.0f + 0x4000 ) / 512.0f; - finalVal.x = x.x >= 512.0f ? 32767.0 : finalVal.x; - finalVal.y = x.y >= 512.0f ? 32767.0 : finalVal.y; - finalVal.z = x.z >= 512.0f ? 32767.0 : finalVal.z; - return finalVal; -} - -float3 FinishUnquantize( float3 endpoint0Unq, float3 endpoint1Unq, float weight ) -{ - float3 comp = ( endpoint0Unq * ( 64.0f - weight ) + endpoint1Unq * weight + 32.0f ) * ( 31.0f / 2048.0f ); - /*float3 signVal; - signVal.x = comp.x >= 0.0f ? 0.0f : 0x8000; - signVal.y = comp.y >= 0.0f ? 0.0f : 0x8000; - signVal.z = comp.z >= 0.0f ? 0.0f : 0x8000;*/ - //return f16tof32( uint3( signVal + abs( comp ) ) ); - return f16tof32( uint3( comp ) ); -} -#endif - -void Swap( inout float3 a, inout float3 b ) -{ - float3 tmp = a; - a = b; - b = tmp; -} - -void Swap( inout float a, inout float b ) -{ - float tmp = a; - a = b; - b = tmp; -} - -uint ComputeIndex3( float texelPos, float endPoint0Pos, float endPoint1Pos ) -{ - float r = ( texelPos - endPoint0Pos ) / ( endPoint1Pos - endPoint0Pos ); - return uint( clamp( r * 6.98182f + 0.00909f + 0.5f, 0.0f, 7.0f ) ); -} - -uint ComputeIndex4( float texelPos, float endPoint0Pos, float endPoint1Pos ) -{ - float r = ( texelPos - endPoint0Pos ) / ( endPoint1Pos - endPoint0Pos ); - return uint( clamp( r * 14.93333f + 0.03333f + 0.5f, 0.0f, 15.0f ) ); -} - -void SignExtend( inout float3 v1, uint mask, uint signFlag ) -{ - int3 v = int3( v1 ); - v.x = ( v.x & int( mask ) ) | ( v.x < 0 ? int( signFlag ) : 0 ); - v.y = ( v.y & int( mask ) ) | ( v.y < 0 ? int( signFlag ) : 0 ); - v.z = ( v.z & int( mask ) ) | ( v.z < 0 ? int( signFlag ) : 0 ); - v1 = v; -} - -void EncodeP1( inout uint4 block, inout float blockMSLE, float3 texels[ 16 ] ) -{ - // compute endpoints (min/max RGB bbox) - float3 blockMin = texels[ 0 ]; - float3 blockMax = texels[ 0 ]; - for ( uint i = 1u; i < 16u; ++i ) - { - blockMin = min( blockMin, texels[ i ] ); - blockMax = max( blockMax, texels[ i ] ); - } - - - // refine endpoints in log2 RGB space - float3 refinedBlockMin = blockMax; - float3 refinedBlockMax = blockMin; - for ( uint i = 0u; i < 16u; ++i ) - { - refinedBlockMin = min( refinedBlockMin, texels[ i ] == blockMin ? refinedBlockMin : texels[ i ] ); - refinedBlockMax = max( refinedBlockMax, texels[ i ] == blockMax ? refinedBlockMax : texels[ i ] ); - } - - float3 logBlockMax = log2( blockMax + 1.0f ); - float3 logBlockMin = log2( blockMin + 1.0f ); - float3 logRefinedBlockMax = log2( refinedBlockMax + 1.0f ); - float3 logRefinedBlockMin = log2( refinedBlockMin + 1.0f ); - float3 logBlockMaxExt = ( logBlockMax - logBlockMin ) * ( 1.0f / 32.0f ); - logBlockMin += min( logRefinedBlockMin - logBlockMin, logBlockMaxExt ); - logBlockMax -= min( logBlockMax - logRefinedBlockMax, logBlockMaxExt ); - blockMin = exp2( logBlockMin ) - 1.0f; - blockMax = exp2( logBlockMax ) - 1.0f; - - float3 blockDir = blockMax - blockMin; - blockDir = blockDir / ( blockDir.x + blockDir.y + blockDir.z ); - - float3 endpoint0 = Quantize10( blockMin ); - float3 endpoint1 = Quantize10( blockMax ); - float endPoint0Pos = f32tof16( dot( blockMin, blockDir ) ); - float endPoint1Pos = f32tof16( dot( blockMax, blockDir ) ); - - - // check if endpoint swap is required - float fixupTexelPos = f32tof16( dot( texels[ 0 ], blockDir ) ); - uint fixupIndex = ComputeIndex4( fixupTexelPos, endPoint0Pos, endPoint1Pos ); - if ( fixupIndex > 7 ) - { - Swap( endPoint0Pos, endPoint1Pos ); - Swap( endpoint0, endpoint1 ); - } - - // compute indices - uint indices[ 16 ] = { 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u }; - for ( uint i = 0u; i < 16u; ++i ) - { - float texelPos = f32tof16( dot( texels[ i ], blockDir ) ); - indices[ i ] = ComputeIndex4( texelPos, endPoint0Pos, endPoint1Pos ); - } - - // compute compression error (MSLE) - float3 endpoint0Unq = Unquantize10( endpoint0 ); - float3 endpoint1Unq = Unquantize10( endpoint1 ); - float msle = 0.0f; - for ( uint i = 0u; i < 16u; ++i ) - { - float weight = floor( ( indices[ i ] * 64.0f ) / 15.0f + 0.5f ); - float3 texelUnc = FinishUnquantize( endpoint0Unq, endpoint1Unq, weight ); - - msle += CalcMSLE( texels[ i ], texelUnc ); - } - - - // encode block for mode 11 - blockMSLE = msle; - block.x = 0x03; - - // endpoints - block.x |= uint( endpoint0.x ) << 5u; - block.x |= uint( endpoint0.y ) << 15u; - block.x |= uint( endpoint0.z ) << 25u; - block.y |= uint( endpoint0.z ) >> 7u; - block.y |= uint( endpoint1.x ) << 3u; - block.y |= uint( endpoint1.y ) << 13u; - block.y |= uint( endpoint1.z ) << 23u; - block.z |= uint( endpoint1.z ) >> 9u; - - // indices - block.z |= indices[ 0 ] << 1u; - block.z |= indices[ 1 ] << 4u; - block.z |= indices[ 2 ] << 8u; - block.z |= indices[ 3 ] << 12u; - block.z |= indices[ 4 ] << 16u; - block.z |= indices[ 5 ] << 20u; - block.z |= indices[ 6 ] << 24u; - block.z |= indices[ 7 ] << 28u; - block.w |= indices[ 8 ] << 0u; - block.w |= indices[ 9 ] << 4u; - block.w |= indices[ 10 ] << 8u; - block.w |= indices[ 11 ] << 12u; - block.w |= indices[ 12 ] << 16u; - block.w |= indices[ 13 ] << 20u; - block.w |= indices[ 14 ] << 24u; - block.w |= indices[ 15 ] << 28u; -} - -void EncodeP2Pattern( inout uint4 block, inout float blockMSLE, uint pattern, float3 texels[ 16 ] ) -{ - float3 p0BlockMin = float3( HALF_MAX, HALF_MAX, HALF_MAX ); - float3 p0BlockMax = float3( 0.0f, 0.0f, 0.0f ); - float3 p1BlockMin = float3( HALF_MAX, HALF_MAX, HALF_MAX ); - float3 p1BlockMax = float3( 0.0f, 0.0f, 0.0f ); - - for ( uint i = 0u; i < 16u; ++i ) - { - uint paletteID = Pattern( pattern, i ); - if ( paletteID == 0 ) - { - p0BlockMin = min( p0BlockMin, texels[ i ] ); - p0BlockMax = max( p0BlockMax, texels[ i ] ); - } - else - { - p1BlockMin = min( p1BlockMin, texels[ i ] ); - p1BlockMax = max( p1BlockMax, texels[ i ] ); - } - } - - float3 p0BlockDir = p0BlockMax - p0BlockMin; - float3 p1BlockDir = p1BlockMax - p1BlockMin; - p0BlockDir = p0BlockDir / ( p0BlockDir.x + p0BlockDir.y + p0BlockDir.z ); - p1BlockDir = p1BlockDir / ( p1BlockDir.x + p1BlockDir.y + p1BlockDir.z ); - - - float p0Endpoint0Pos = f32tof16( dot( p0BlockMin, p0BlockDir ) ); - float p0Endpoint1Pos = f32tof16( dot( p0BlockMax, p0BlockDir ) ); - float p1Endpoint0Pos = f32tof16( dot( p1BlockMin, p1BlockDir ) ); - float p1Endpoint1Pos = f32tof16( dot( p1BlockMax, p1BlockDir ) ); - - - uint fixupID = PatternFixupID( pattern ); - float p0FixupTexelPos = f32tof16( dot( texels[ 0 ], p0BlockDir ) ); - float p1FixupTexelPos = f32tof16( dot( texels[ fixupID ], p1BlockDir ) ); - uint p0FixupIndex = ComputeIndex3( p0FixupTexelPos, p0Endpoint0Pos, p0Endpoint1Pos ); - uint p1FixupIndex = ComputeIndex3( p1FixupTexelPos, p1Endpoint0Pos, p1Endpoint1Pos ); - if ( p0FixupIndex > 3u ) - { - Swap( p0Endpoint0Pos, p0Endpoint1Pos ); - Swap( p0BlockMin, p0BlockMax ); - } - if ( p1FixupIndex > 3u ) - { - Swap( p1Endpoint0Pos, p1Endpoint1Pos ); - Swap( p1BlockMin, p1BlockMax ); - } - - uint indices[ 16 ] = { 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u }; - for ( uint i = 0u; i < 16u; ++i ) - { - float p0TexelPos = f32tof16( dot( texels[ i ], p0BlockDir ) ); - float p1TexelPos = f32tof16( dot( texels[ i ], p1BlockDir ) ); - uint p0Index = ComputeIndex3( p0TexelPos, p0Endpoint0Pos, p0Endpoint1Pos ); - uint p1Index = ComputeIndex3( p1TexelPos, p1Endpoint0Pos, p1Endpoint1Pos ); - - uint paletteID = Pattern( pattern, i ); - indices[ i ] = paletteID == 0u ? p0Index : p1Index; - } - - float3 endpoint760 = floor( Quantize7( p0BlockMin ) ); - float3 endpoint761 = floor( Quantize7( p0BlockMax ) ); - float3 endpoint762 = floor( Quantize7( p1BlockMin ) ); - float3 endpoint763 = floor( Quantize7( p1BlockMax ) ); - - float3 endpoint950 = floor( Quantize9( p0BlockMin ) ); - float3 endpoint951 = floor( Quantize9( p0BlockMax ) ); - float3 endpoint952 = floor( Quantize9( p1BlockMin ) ); - float3 endpoint953 = floor( Quantize9( p1BlockMax ) ); - - endpoint761 = endpoint761 - endpoint760; - endpoint762 = endpoint762 - endpoint760; - endpoint763 = endpoint763 - endpoint760; - - endpoint951 = endpoint951 - endpoint950; - endpoint952 = endpoint952 - endpoint950; - endpoint953 = endpoint953 - endpoint950; - - int maxVal76 = 0x1F; - endpoint761 = clamp( endpoint761, -maxVal76, maxVal76 ); - endpoint762 = clamp( endpoint762, -maxVal76, maxVal76 ); - endpoint763 = clamp( endpoint763, -maxVal76, maxVal76 ); - - int maxVal95 = 0xF; - endpoint951 = clamp( endpoint951, -maxVal95, maxVal95 ); - endpoint952 = clamp( endpoint952, -maxVal95, maxVal95 ); - endpoint953 = clamp( endpoint953, -maxVal95, maxVal95 ); - - float3 endpoint760Unq = Unquantize7( endpoint760 ); - float3 endpoint761Unq = Unquantize7( endpoint760 + endpoint761 ); - float3 endpoint762Unq = Unquantize7( endpoint760 + endpoint762 ); - float3 endpoint763Unq = Unquantize7( endpoint760 + endpoint763 ); - float3 endpoint950Unq = Unquantize9( endpoint950 ); - float3 endpoint951Unq = Unquantize9( endpoint950 + endpoint951 ); - float3 endpoint952Unq = Unquantize9( endpoint950 + endpoint952 ); - float3 endpoint953Unq = Unquantize9( endpoint950 + endpoint953 ); - - float msle76 = 0.0f; - float msle95 = 0.0f; - for ( uint i = 0u; i < 16u; ++i ) - { - uint paletteID = Pattern( pattern, i ); - - float3 tmp760Unq = paletteID == 0u ? endpoint760Unq : endpoint762Unq; - float3 tmp761Unq = paletteID == 0u ? endpoint761Unq : endpoint763Unq; - float3 tmp950Unq = paletteID == 0u ? endpoint950Unq : endpoint952Unq; - float3 tmp951Unq = paletteID == 0u ? endpoint951Unq : endpoint953Unq; - - float weight = floor( ( indices[ i ] * 64.0f ) / 7.0f + 0.5f ); - float3 texelUnc76 = FinishUnquantize( tmp760Unq, tmp761Unq, weight ); - float3 texelUnc95 = FinishUnquantize( tmp950Unq, tmp951Unq, weight ); - - msle76 += CalcMSLE( texels[ i ], texelUnc76 ); - msle95 += CalcMSLE( texels[ i ], texelUnc95 ); - } - - SignExtend( endpoint761, 0x1F, 0x20 ); - SignExtend( endpoint762, 0x1F, 0x20 ); - SignExtend( endpoint763, 0x1F, 0x20 ); - - SignExtend( endpoint951, 0xF, 0x10 ); - SignExtend( endpoint952, 0xF, 0x10 ); - SignExtend( endpoint953, 0xF, 0x10 ); - - // encode block - float p2MSLE = min( msle76, msle95 ); - if ( p2MSLE < blockMSLE ) - { - blockMSLE = p2MSLE; - block = uint4( 0u, 0u, 0u, 0u ); - - if ( p2MSLE == msle76 ) - { - // 7.6 - block.x = 0x1u; - block.x |= ( uint( endpoint762.y ) & 0x20u ) >> 3u; - block.x |= ( uint( endpoint763.y ) & 0x10u ) >> 1u; - block.x |= ( uint( endpoint763.y ) & 0x20u ) >> 1u; - block.x |= uint( endpoint760.x ) << 5u; - block.x |= ( uint( endpoint763.z ) & 0x01u ) << 12u; - block.x |= ( uint( endpoint763.z ) & 0x02u ) << 12u; - block.x |= ( uint( endpoint762.z ) & 0x10u ) << 10u; - block.x |= uint( endpoint760.y ) << 15u; - block.x |= ( uint( endpoint762.z ) & 0x20u ) << 17u; - block.x |= ( uint( endpoint763.z ) & 0x04u ) << 21u; - block.x |= ( uint( endpoint762.y ) & 0x10u ) << 20u; - block.x |= uint( endpoint760.z ) << 25u; - block.y |= ( uint( endpoint763.z ) & 0x08u ) >> 3u; - block.y |= ( uint( endpoint763.z ) & 0x20u ) >> 4u; - block.y |= ( uint( endpoint763.z ) & 0x10u ) >> 2u; - block.y |= uint( endpoint761.x ) << 3u; - block.y |= ( uint( endpoint762.y ) & 0x0Fu ) << 9u; - block.y |= uint( endpoint761.y ) << 13u; - block.y |= ( uint( endpoint763.y ) & 0x0Fu ) << 19u; - block.y |= uint( endpoint761.z ) << 23u; - block.y |= ( uint( endpoint762.z ) & 0x07u ) << 29u; - block.z |= ( uint( endpoint762.z ) & 0x08u ) >> 3u; - block.z |= uint( endpoint762.x ) << 1u; - block.z |= uint( endpoint763.x ) << 7u; - } - else - { - // 9.5 - block.x = 0xEu; - block.x |= uint( endpoint950.x ) << 5u; - block.x |= ( uint( endpoint952.z ) & 0x10u ) << 10u; - block.x |= uint( endpoint950.y ) << 15u; - block.x |= ( uint( endpoint952.y ) & 0x10u ) << 20u; - block.x |= uint( endpoint950.z ) << 25u; - block.y |= uint( endpoint950.z ) >> 7u; - block.y |= ( uint( endpoint953.z ) & 0x10u ) >> 2u; - block.y |= uint( endpoint951.x ) << 3u; - block.y |= ( uint( endpoint953.y ) & 0x10u ) << 4u; - block.y |= ( uint( endpoint952.y ) & 0x0Fu ) << 9u; - block.y |= uint( endpoint951.y ) << 13u; - block.y |= ( uint( endpoint953.z ) & 0x01u ) << 18u; - block.y |= ( uint( endpoint953.y ) & 0x0Fu ) << 19u; - block.y |= uint( endpoint951.z ) << 23u; - block.y |= ( uint( endpoint953.z ) & 0x02u ) << 27u; - block.y |= uint( endpoint952.z ) << 29u; - block.z |= ( uint( endpoint952.z ) & 0x08u ) >> 3u; - block.z |= uint( endpoint952.x ) << 1u; - block.z |= ( uint( endpoint953.z ) & 0x04u ) << 4u; - block.z |= uint( endpoint953.x ) << 7u; - block.z |= ( uint( endpoint953.z ) & 0x08u ) << 9u; - } - - block.z |= pattern << 13u; - uint blockFixupID = PatternFixupID( pattern ); - if ( blockFixupID == 15u ) - { - block.z |= indices[ 0 ] << 18u; - block.z |= indices[ 1 ] << 20u; - block.z |= indices[ 2 ] << 23u; - block.z |= indices[ 3 ] << 26u; - block.z |= indices[ 4 ] << 29u; - block.w |= indices[ 5 ] << 0u; - block.w |= indices[ 6 ] << 3u; - block.w |= indices[ 7 ] << 6u; - block.w |= indices[ 8 ] << 9u; - block.w |= indices[ 9 ] << 12u; - block.w |= indices[ 10 ] << 15u; - block.w |= indices[ 11 ] << 18u; - block.w |= indices[ 12 ] << 21u; - block.w |= indices[ 13 ] << 24u; - block.w |= indices[ 14 ] << 27u; - block.w |= indices[ 15 ] << 30u; - } - else if ( blockFixupID == 2u ) - { - block.z |= indices[ 0 ] << 18u; - block.z |= indices[ 1 ] << 20u; - block.z |= indices[ 2 ] << 23u; - block.z |= indices[ 3 ] << 25u; - block.z |= indices[ 4 ] << 28u; - block.z |= indices[ 5 ] << 31u; - block.w |= indices[ 5 ] >> 1u; - block.w |= indices[ 6 ] << 2u; - block.w |= indices[ 7 ] << 5u; - block.w |= indices[ 8 ] << 8u; - block.w |= indices[ 9 ] << 11u; - block.w |= indices[ 10 ] << 14u; - block.w |= indices[ 11 ] << 17u; - block.w |= indices[ 12 ] << 20u; - block.w |= indices[ 13 ] << 23u; - block.w |= indices[ 14 ] << 26u; - block.w |= indices[ 15 ] << 29u; - } - else - { - block.z |= indices[ 0 ] << 18u; - block.z |= indices[ 1 ] << 20u; - block.z |= indices[ 2 ] << 23u; - block.z |= indices[ 3 ] << 26u; - block.z |= indices[ 4 ] << 29u; - block.w |= indices[ 5 ] << 0u; - block.w |= indices[ 6 ] << 3u; - block.w |= indices[ 7 ] << 6u; - block.w |= indices[ 8 ] << 9u; - block.w |= indices[ 9 ] << 11u; - block.w |= indices[ 10 ] << 14u; - block.w |= indices[ 11 ] << 17u; - block.w |= indices[ 12 ] << 20u; - block.w |= indices[ 13 ] << 23u; - block.w |= indices[ 14 ] << 26u; - block.w |= indices[ 15 ] << 29u; - } - } -} - -layout( local_size_x = 8, - local_size_y = 8, - local_size_z = 1 ) in; - -void main() -{ - // gather texels for current 4x4 block - // 0 1 2 3 - // 4 5 6 7 - // 8 9 10 11 - // 12 13 14 15 - float2 uv = gl_GlobalInvocationID.xy * p_textureSizeRcp * 4.0f - p_textureSizeRcp; - float2 block0UV = uv; - float2 block1UV = uv + float2( 2.0f * p_textureSizeRcp.x, 0.0f ); - float2 block2UV = uv + float2( 0.0f, 2.0f * p_textureSizeRcp.y ); - float2 block3UV = uv + float2( 2.0f * p_textureSizeRcp.x, 2.0f * p_textureSizeRcp.y ); - float4 block0X = OGRE_GatherRed( srcTexture, pointSampler, block0UV ); - float4 block1X = OGRE_GatherRed( srcTexture, pointSampler, block1UV ); - float4 block2X = OGRE_GatherRed( srcTexture, pointSampler, block2UV ); - float4 block3X = OGRE_GatherRed( srcTexture, pointSampler, block3UV ); - float4 block0Y = OGRE_GatherGreen( srcTexture, pointSampler, block0UV ); - float4 block1Y = OGRE_GatherGreen( srcTexture, pointSampler, block1UV ); - float4 block2Y = OGRE_GatherGreen( srcTexture, pointSampler, block2UV ); - float4 block3Y = OGRE_GatherGreen( srcTexture, pointSampler, block3UV ); - float4 block0Z = OGRE_GatherBlue( srcTexture, pointSampler, block0UV ); - float4 block1Z = OGRE_GatherBlue( srcTexture, pointSampler, block1UV ); - float4 block2Z = OGRE_GatherBlue( srcTexture, pointSampler, block2UV ); - float4 block3Z = OGRE_GatherBlue( srcTexture, pointSampler, block3UV ); - - float3 texels[ 16 ]; - texels[ 0 ] = float3( block0X.w, block0Y.w, block0Z.w ); - texels[ 1 ] = float3( block0X.z, block0Y.z, block0Z.z ); - texels[ 2 ] = float3( block1X.w, block1Y.w, block1Z.w ); - texels[ 3 ] = float3( block1X.z, block1Y.z, block1Z.z ); - texels[ 4 ] = float3( block0X.x, block0Y.x, block0Z.x ); - texels[ 5 ] = float3( block0X.y, block0Y.y, block0Z.y ); - texels[ 6 ] = float3( block1X.x, block1Y.x, block1Z.x ); - texels[ 7 ] = float3( block1X.y, block1Y.y, block1Z.y ); - texels[ 8 ] = float3( block2X.w, block2Y.w, block2Z.w ); - texels[ 9 ] = float3( block2X.z, block2Y.z, block2Z.z ); - texels[ 10 ] = float3( block3X.w, block3Y.w, block3Z.w ); - texels[ 11 ] = float3( block3X.z, block3Y.z, block3Z.z ); - texels[ 12 ] = float3( block2X.x, block2Y.x, block2Z.x ); - texels[ 13 ] = float3( block2X.y, block2Y.y, block2Z.y ); - texels[ 14 ] = float3( block3X.x, block3Y.x, block3Z.x ); - texels[ 15 ] = float3( block3X.y, block3Y.y, block3Z.y ); - - uint4 block = uint4( 0u, 0u, 0u, 0u ); - float blockMSLE = 0.0f; - - EncodeP1( block, blockMSLE, texels ); -#ifdef QUALITY - for ( uint i = 0u; i < 32u; ++i ) - { - EncodeP2Pattern( block, blockMSLE, i, texels ); - } -#endif - - imageStore( dstTexture, int2( gl_GlobalInvocationID.xy ), block ); -} diff --git a/bin/Data/dither555.glsl b/bin/Data/dither555.glsl deleted file mode 100644 index be6ba80..0000000 --- a/bin/Data/dither555.glsl +++ /dev/null @@ -1,93 +0,0 @@ -#version 430 core - -// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" - -#include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" - -uniform sampler2D srcTex; - -layout( rgba8 ) uniform restrict writeonly image2D dstTexture; - -layout( local_size_x = 8, // - local_size_y = 8, // - local_size_z = 1 ) in; - -/// Quantizes 'srcValue' which is originally in 888 (full range), -/// converting it to 555 and then back to 888 (quantized) -float3 quant( float3 srcValue ) -{ - srcValue = clamp( srcValue, 0.0f, 255.0f ); - // Convert 888 -> 555 - srcValue = floor( srcValue * 31.0f / 255.0f + 0.5f ); - // Convert 555 -> 888 back - srcValue = floor( srcValue * 8.25f ); - - return srcValue; -} - -void main() -{ - float3 ep1[4] = { float3( 0, 0, 0 ), float3( 0, 0, 0 ), float3( 0, 0, 0 ), float3( 0, 0, 0 ) }; - float3 ep2[4] = { float3( 0, 0, 0 ), float3( 0, 0, 0 ), float3( 0, 0, 0 ), float3( 0, 0, 0 ) }; - - const uint2 pixelsToLoadBase = gl_GlobalInvocationID.xy << 2u; - float3 srcPixel0 = OGRE_Load2D( srcTex, int2( pixelsToLoadBase ), 0 ).xyz * 255.0f; - bool bAllColoursEqual = true; - - for( uint y = 0u; y < 4u; ++y ) - { - float3 srcPixel, dithPixel; - int2 iUV; - - iUV = int2( pixelsToLoadBase + uint2( 0u, y ) ); - srcPixel = OGRE_Load2D( srcTex, iUV, 0 ).xyz * 255.0f; - bAllColoursEqual = bAllColoursEqual && srcPixel0 == srcPixel; - dithPixel = quant( srcPixel + trunc( ( 3 * ep2[1] + 5 * ep2[0] ) * ( 1.0f / 16.0f ) ) ); - ep1[0] = srcPixel - dithPixel; - imageStore( dstTexture, iUV, float4( dithPixel * ( 1.0f / 255.0f ), 1.0f ) ); - - iUV = int2( pixelsToLoadBase + uint2( 1u, y ) ); - srcPixel = OGRE_Load2D( srcTex, iUV, 0 ).xyz * 255.0f; - bAllColoursEqual = bAllColoursEqual && srcPixel0 == srcPixel; - dithPixel = quant( - srcPixel + trunc( ( 7 * ep1[0] + 3 * ep2[2] + 5 * ep2[1] + ep2[0] ) * ( 1.0f / 16.0f ) ) ); - ep1[1] = srcPixel - dithPixel; - imageStore( dstTexture, iUV, float4( dithPixel * ( 1.0f / 255.0f ), 1.0f ) ); - - iUV = int2( pixelsToLoadBase + uint2( 2u, y ) ); - srcPixel = OGRE_Load2D( srcTex, iUV, 0 ).xyz * 255.0f; - bAllColoursEqual = bAllColoursEqual && srcPixel0 == srcPixel; - dithPixel = quant( - srcPixel + trunc( ( 7 * ep1[1] + 3 * ep2[3] + 5 * ep2[2] + ep2[1] ) * ( 1.0f / 16.0f ) ) ); - ep1[2] = srcPixel - dithPixel; - imageStore( dstTexture, iUV, float4( dithPixel * ( 1.0f / 255.0f ), 1.0f ) ); - - iUV = int2( pixelsToLoadBase + uint2( 3u, y ) ); - srcPixel = OGRE_Load2D( srcTex, iUV, 0 ).xyz * 255.0f; - bAllColoursEqual = bAllColoursEqual && srcPixel0 == srcPixel; - dithPixel = quant( srcPixel + trunc( ( 7 * ep1[2] + 5 * ep2[3] + ep2[2] ) * ( 1.0f / 16.0f ) ) ); - ep1[3] = srcPixel - dithPixel; - imageStore( dstTexture, iUV, float4( dithPixel * ( 1.0f / 255.0f ), 1.0f ) ); - - // swap( ep1, ep2 ) - for( uint i = 0u; i < 4u; ++i ) - { - float3 tmp = ep1[i]; - ep1[i] = ep2[i]; - ep2[i] = tmp; - } - } - - if( bAllColoursEqual ) - { - // Oops. All colours were equal. We shouldn't have applied dither. - // Overwrite our changes with a raw copy. - for( uint i = 0u; i < 16u; ++i ) - { - const int2 iUV = int2( pixelsToLoadBase + uint2( i & 0x03u, i >> 2u ) ); - const float3 srcPixels0 = OGRE_Load2D( srcTex, iUV, 0 ).xyz; - imageStore( dstTexture, iUV, float4( srcPixels0, 1.0f ) ); - } - } -} diff --git a/bin/Data/eac.glsl b/bin/Data/eac.glsl deleted file mode 100644 index 697da7e..0000000 --- a/bin/Data/eac.glsl +++ /dev/null @@ -1,318 +0,0 @@ -#version 430 core - -// Define this to use the compressor to generate data for R11 (or RG11) -// Without defining this, the compressor generates data for ETC2_Alpha -// It's almost the same but there are subtle differences -// (they differ on how multiplier = 0 is handled. ETC2_Alpha just forbids it; also -// due to their 8-bit and 11-bit differences, in Alpha mode we can take a shorcut -// if all pixels in the block are of the same value) -// #define R11_EAC - -#ifndef R11_EAC -// Ballot & group vote are both used as optimization (both must be present or none) -// We have a fallback path if it's not supported -# extension GL_ARB_shader_ballot : enable -# extension GL_ARB_shader_group_vote : enable - -# ifdef GL_ARB_shader_ballot -# ifdef GL_ARB_shader_group_vote -# define WARP_SYNC_AVAILABLE -# endif -# endif -#endif - -// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" - -#include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" - -#define FLT_MAX 340282346638528859811704183484516925440.0f - -#define PotentialSolution uint - -#ifdef R11_EAC -# define EAC_FETCH_SWIZZLE r -# define EAC_RANGE 2047.0f -# define EAC_MULTIPLIER_START 0u -#else -# define EAC_FETCH_SWIZZLE a -# define EAC_RANGE 255.0f -# define EAC_MULTIPLIER_START 1u -#endif - -PotentialSolution storePotentialSolution( const float baseCodeword, const int tableIdx, - const float multiplier ) -{ - return packUnorm4x8( float4( baseCodeword, float( tableIdx ), multiplier, 0.0f ) * - ( 1.0f / 255.0f ) ); -} - -void loadPotentialSolution( PotentialSolution potentialSolution, out float baseCodeword, - out uint tableIdx, out float multiplier ) -{ - const float4 val = unpackUnorm4x8( potentialSolution ); - baseCodeword = val.x * 255.0f; - tableIdx = uint( val.y * 255.0f ); - multiplier = val.z * 255.0f; -} - -// For alpha support -const float kEacModifiers[16][8] = { // - { -3, -6, -9, -15, 2, 5, 8, 14 }, // - { -3, -7, -10, -13, 2, 6, 9, 12 }, // - { -2, -5, -8, -13, 1, 4, 7, 12 }, // - { -2, -4, -6, -13, 1, 3, 5, 12 }, // - { -3, -6, -8, -12, 2, 5, 7, 11 }, // - { -3, -7, -9, -11, 2, 6, 8, 10 }, // - { -4, -7, -8, -11, 3, 6, 7, 10 }, // - { -3, -5, -8, -11, 2, 4, 7, 10 }, // - { -2, -6, -8, -10, 1, 5, 7, 9 }, // - { -2, -5, -8, -10, 1, 4, 7, 9 }, // - { -2, -4, -8, -10, 1, 3, 7, 9 }, // - { -2, -5, -7, -10, 1, 4, 6, 9 }, // - { -3, -4, -7, -10, 2, 3, 6, 9 }, // - { -1, -2, -3, -10, 0, 1, 2, 9 }, // - { -4, -6, -8, -9, 3, 5, 7, 8 }, // - { -3, -5, -7, -9, 2, 4, 6, 8 } -}; - -// 2 sets of 16 float3 (rgba8_unorm) for each ETC block -// We use rgba8_unorm encoding because it's 6kb vs 1.5kb of LDS. The former kills occupancy -shared float g_srcPixelsBlock[16]; -shared PotentialSolution g_bestSolution[256]; -shared float g_bestError[256]; -#ifndef R11_EAC -shared bool g_allPixelsEqual; - -layout( location = 0 ) uniform float p_greenChannel; -#endif - -uniform sampler2D srcTex; - -layout( rg32ui ) uniform restrict writeonly uimage2D dstTexture; - -layout( local_size_x = 256, // - local_size_y = 1, // - local_size_z = 1 ) in; - -float calcError( float3 a, float3 b ) -{ - float3 diff = a - b; - return dot( diff, diff ); -} - -float eac_find_best_error( float baseCodeword, float multiplier, const int tableIdx ) -{ - float accumError = 0.0f; - -#ifdef R11_EAC - baseCodeword = baseCodeword * 8.0f + 4.0f; - multiplier = multiplier > 0.0f ? multiplier * 8.0f : 1.0f; -#endif - - for( int i = 0; i < 16; ++i ) - { - const float realV = g_srcPixelsBlock[i]; - float bestError = FLT_MAX; - - // Find modifier index through brute force - for( int j = 0; j < 8 && bestError > 0; ++j ) - { - const float tryValue = - clamp( baseCodeword + kEacModifiers[tableIdx][j] * multiplier, 0.0f, EAC_RANGE ); - const float error = abs( realV - tryValue ); - if( error < bestError ) - bestError = error; - } - - accumError += bestError * bestError; - } - - return accumError; -} - -void eac_pack( float baseCodeword, float multiplier, const uint tableIdx ) -{ - const uint iBaseCodeword = uint( baseCodeword ); - const uint iMultiplier = uint( multiplier ); - -#ifdef R11_EAC - baseCodeword = baseCodeword * 8.0f + 4.0f; - multiplier = multiplier > 0.0f ? multiplier * 8.0f : 1.0f; -#endif - - uint bestIdx[16]; - - for( int i = 0; i < 16; ++i ) - { - const float realV = g_srcPixelsBlock[i]; - float bestError = FLT_MAX; - - // Find modifier index through brute force - for( uint j = 0u; j < 8u && bestError > 0; ++j ) - { - const float tryValue = - clamp( baseCodeword + kEacModifiers[tableIdx][j] * multiplier, 0.0f, EAC_RANGE ); - const float error = abs( realV - tryValue ); - if( error < bestError ) - { - bestError = error; - bestIdx[i] = j; - } - } - } - - uint2 outputBytes; - - // Bits [0; 16) - outputBytes.x = iBaseCodeword | ( tableIdx << 8u ) | ( iMultiplier << 12u ); - // Bits [16; 24) - outputBytes.x |= ( bestIdx[0] << 21u ) | ( bestIdx[1] << 18u ) | ( ( bestIdx[2] & 0x06u ) << 15u ); - // Bits [24; 32) - outputBytes.x |= ( ( bestIdx[2] & 0x01u ) << 31u ) | ( bestIdx[3] << 28u ) | ( bestIdx[4] << 25u ) | - ( ( bestIdx[5] & 0x04u ) << 22u ); - - // Bits [0; 8) - outputBytes.y = ( ( bestIdx[5] & 0x03u ) << 6u ) | ( bestIdx[6] << 3u ) | bestIdx[7]; - // Bits [8; 16) - outputBytes.y |= ( bestIdx[8] << 13u ) | ( bestIdx[9] << 10u ) | ( ( bestIdx[10] & 0x06u ) << 7u ); - // Bits [16; 24) - outputBytes.y |= ( ( bestIdx[10] & 0x01u ) << 23u ) | ( bestIdx[11] << 20u ) | - ( bestIdx[12] << 17u ) | ( ( bestIdx[13] & 0x04u ) << 14u ); - // Bits [24; 32) - outputBytes.y |= - ( ( bestIdx[13] & 0x03u ) << 30u ) | ( bestIdx[14] << 27u ) | ( bestIdx[15] << 24u ); - - const uint2 dstUV = gl_WorkGroupID.xy; - imageStore( dstTexture, int2( dstUV ), uint4( outputBytes.xy, 0u, 0u ) ); -} - -void main() -{ - // We perform a brute force search: - // - // 256 base codewords - // 16 table indices - // 16 multipliers - // 8 possible indices per pixel (16 pixels) - // - // That means we have to try 256*16*16*(8*16) = 8.388.608 variations per block - const uint baseCodeword = gl_LocalInvocationID.x; - - // Load all pixels. We have 256 threads so have the first 16 load 1 pixel each - if( baseCodeword < 16u ) - { - uint2 pixelToLoad = gl_WorkGroupID.xy << 2u; - // Note EAC wants the src pixels transposed! - pixelToLoad.x += baseCodeword >> 2u; //+= baseCodeword / 4 - pixelToLoad.y += baseCodeword & 0x03u; //+= baseCodeword % 4 -#ifdef R11_EAC - float2 value = OGRE_Load2D( srcTex, int2( pixelToLoad ), 0 ).rg; - const float srcPixel = p_greenChannel != 0 ? value.g : value.r; -#else - const float srcPixel = OGRE_Load2D( srcTex, int2( pixelToLoad ), 0 ).a; -#endif - -#ifdef WARP_SYNC_AVAILABLE - if( gl_SubGroupSizeARB >= 16u ) - { - // Check if all pixels are equal (when wavefront optimizations are possible) - const bool bSameValue = readFirstInvocationARB( srcPixel ) == srcPixel; - const bool allPixelsEqual = allInvocationsARB( bSameValue ); - - if( baseCodeword == 0u ) - g_allPixelsEqual = allPixelsEqual; - } -#endif - - g_srcPixelsBlock[baseCodeword] = srcPixel * EAC_RANGE; - } - -#ifndef R11_EAC -# ifdef WARP_SYNC_AVAILABLE - if( gl_SubGroupSizeARB < 16u ) -# endif - { - // Fallback path when shader ballot cannot be used (wavefront size too small) - // Check if all pixels are equal - __sharedOnlyBarrier; - - bool allPixelsEqual = true; - for( uint i = 1u; i < 16u; ++i ) - { - if( g_srcPixelsBlock[0] != g_srcPixelsBlock[i] ) - allPixelsEqual = false; - } - g_allPixelsEqual = allPixelsEqual; - } -#endif - - __sharedOnlyBarrier; - -#ifndef R11_EAC - // In alpha mode, the baseCodeword can represent all 255 values exactly. - // In R11 mode, the 8-bit baseCodeword gets converted to 11 bits, and - // added to the modifier from the table thus we can't take the shortcut - if( g_allPixelsEqual ) - { - if( baseCodeword == 0u ) - { - uint2 outputBytes; - outputBytes.x = uint( ( g_srcPixelsBlock[0] / EAC_RANGE ) * 255.0f ); - outputBytes.y = 0u; - const uint2 dstUV = gl_WorkGroupID.xy; - imageStore( dstTexture, int2( dstUV ), uint4( outputBytes.xy, 0u, 0u ) ); - } - } - else -#endif - { - float bestError = FLT_MAX; - PotentialSolution bestSolution = 0u; - const float fBaseCodeword = float( baseCodeword ); - - for( int tableIdx = 0; tableIdx < 16; ++tableIdx ) - { - for( float multiplier = EAC_MULTIPLIER_START; multiplier < 16; ++multiplier ) - { - const float error = eac_find_best_error( fBaseCodeword, multiplier, tableIdx ); - if( error < bestError ) - { - bestError = error; - bestSolution = storePotentialSolution( fBaseCodeword, tableIdx, multiplier ); - } - } - } - - g_bestError[baseCodeword] = bestError; - g_bestSolution[baseCodeword] = bestSolution; - - __sharedOnlyBarrier; - - // Parallel reduction to find the best solution - const uint iterations = 8u; // 256 threads = 256 reductions = 2⁸ -> 8 iterations - for( uint i = 0u; i < iterations; ++i ) - { - const uint mask = ( 1u << ( i + 1u ) ) - 1u; - const uint idx = 1u << i; - if( ( baseCodeword & mask ) == 0u ) - { - if( g_bestError[baseCodeword + idx] < bestError ) - { - bestError = g_bestError[baseCodeword + idx]; - g_bestError[baseCodeword] = bestError; - g_bestSolution[baseCodeword] = g_bestSolution[baseCodeword + idx]; - } - } - __sharedOnlyBarrier; - } - - if( baseCodeword == 0u ) - { - float bestBaseCodeword, bestMultiplier; - uint bestTableIdx; - loadPotentialSolution( g_bestSolution[0u], bestBaseCodeword, bestTableIdx, bestMultiplier ); - eac_pack( bestBaseCodeword, bestMultiplier, bestTableIdx ); - } - } -} diff --git a/bin/Data/etc1.glsl b/bin/Data/etc1.glsl deleted file mode 100644 index db7c1db..0000000 --- a/bin/Data/etc1.glsl +++ /dev/null @@ -1,849 +0,0 @@ -#version 430 core - -#extension GL_ARB_shader_group_vote : require - -// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" - -#include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" - -#define cETC1ColorDeltaMin -4 -#define cETC1ColorDeltaMax 3 - -#define cETC1IntenModifierNumBits 3 -#define cETC1IntenModifierValues 8 - -#define FLT_MAX 340282346638528859811704183484516925440.0f - -#define cLowQuality 0 -#define cMediumQuality 1 -#define cHighQuality 2 - -// 2 sets of 16 float3 (rgba8_unorm) for each ETC block -// We use rgba8_unorm encoding because it's 6kb vs 1.5kb of LDS. The former kills occupancy -shared uint g_srcPixelsBlock[16 * 2 * 4 * 4]; -shared bool g_allPixelsEqual[4 * 4 * 4]; - -layout( location = 0 ) uniform float4 params; - -#define p_quality params.x -#define p_scanDeltaAbsMin params.y -#define p_scanDeltaAbsMax params.z -#define p_maxRefinementTrials uint( params.w ) - -// srcTex MUST be in rgba8_unorm otherwise severe dataloss could happen (i.e. do NOT use sRGB) -// This is due to packing in g_srcPixelsBlock -uniform sampler2D srcTex; - -layout( rg32ui, binding = 0 ) uniform restrict writeonly uimage2D dstTexture; - -layout( std430, binding = 1 ) readonly restrict buffer globalBuffer -{ - // Given an ETC1 diff/inten_table/selector, and an 8-bit desired color, this table encodes the best - // packed_color in the low byte, and the abs error in the high byte. - float pBuff_etc1_inverse_lookup[2 * 8 * 4][256]; // [diff/inten_table/selector][desired_color] - uint pBuff_color8_to_etc_block_config[]; -}; - -#ifdef OUTPUT_ERROR -// Used by ETC2 to decide between this and T, H and P modes -layout( r32f, binding = 2 ) uniform restrict writeonly image2D dstError; -#endif - -layout( local_size_x = 4, // - local_size_y = 4, // - local_size_z = 4 ) in; - -const float4 g_etc1_inten_tables[cETC1IntenModifierValues] = { - float4( -8, -2, 2, 8 ), float4( -17, -5, 5, 17 ), float4( -29, -9, 9, 29 ), - float4( -42, -13, 13, 42 ), float4( -60, -18, 18, 60 ), float4( -80, -24, 24, 80 ), - float4( -106, -33, 33, 106 ), float4( -183, -47, 47, 183 ) -}; - -struct PotentialSolution -{ - float3 rgbIntLS; // in range [0; limit] - uint intenTable; - - // Has 8 selectors, 8-bits each. - uint selectors[2]; - float error; -}; - -void storeErrorToLds( float error, uint threadId ) -{ - g_srcPixelsBlock[threadId] = floatBitsToUint( error ); -} -float loadErrorFromLds( uint threadId ) -{ - return uintBitsToFloat( g_srcPixelsBlock[threadId] ); -} - -void storeBestBlockThreadIdxToLds( uint bestIdx, uint threadId ) -{ - g_srcPixelsBlock[threadId] = bestIdx; -} -uint loadBestBlockThreadIdxFromLds( uint threadId ) -{ - return g_srcPixelsBlock[threadId]; -} - -float3 getScaledColor( const float3 rgbInt, const bool bUseColor4 ) -{ - const float a = bUseColor4 ? 1.0f : 0.25f; - const float b = bUseColor4 ? 16.0f : 8.0f; - return floor( rgbInt * a ) + rgbInt * b; -} - -float calcError( float3 a, float3 b ) -{ - float3 diff = a - b; - return dot( diff, diff ); -} - -bool evaluate_solution( const uint subblockStart, const float3 blockRgbInt, const bool bUseColor4, - const float3 baseColor5, const bool constrainAgainstBaseColor5, - inout PotentialSolution bestSolution ) -{ - PotentialSolution trialSolution; - - if( constrainAgainstBaseColor5 ) - { - const float3 d = blockRgbInt - baseColor5; - - if( ( min3( d.r, d.g, d.b ) < cETC1ColorDeltaMin ) || // - ( max3( d.r, d.g, d.b ) > cETC1ColorDeltaMax ) ) - { - return false; - } - } - - const float3 baseColor = getScaledColor( blockRgbInt, bUseColor4 ); - - trialSolution.error = FLT_MAX; - - for( uint inten_table = 0u; inten_table < cETC1IntenModifierValues; ++inten_table ) - { - const float4 pIntenTable = g_etc1_inten_tables[inten_table]; - - float3 blockColorsInt[4]; - for( uint s = 0u; s < 4u; s++ ) - { - const float yd = pIntenTable[s]; - blockColorsInt[s] = clamp( baseColor + yd, 0.0f, 255.0f ); - } - - float total_error = 0; - float4 tempSelectors[2]; - - for( uint c = 0u; c < 8u; ++c ) - { - const float3 srcPixel = unpackUnorm4x8( g_srcPixelsBlock[c + subblockStart] ).xyz * 255.0f; - - float best_selector_index = 0; - float best_error = calcError( srcPixel, blockColorsInt[0] ); - - float trial_error = calcError( srcPixel, blockColorsInt[1] ); - if( trial_error < best_error ) - { - best_error = trial_error; - best_selector_index = 1; - } - - trial_error = calcError( srcPixel, blockColorsInt[2] ); - if( trial_error < best_error ) - { - best_error = trial_error; - best_selector_index = 2; - } - - trial_error = calcError( srcPixel, blockColorsInt[3] ); - if( trial_error < best_error ) - { - best_error = trial_error; - best_selector_index = 3; - } - - tempSelectors[c >> 2u][c & 0x03u] = best_selector_index; - - total_error += best_error; - } - - if( total_error < trialSolution.error ) - { - trialSolution.error = total_error; - trialSolution.intenTable = inten_table; - trialSolution.selectors[0] = packUnorm4x8( tempSelectors[0] * ( 1.0f / 255.0f ) ); - trialSolution.selectors[1] = packUnorm4x8( tempSelectors[1] * ( 1.0f / 255.0f ) ); - // trialSolution.valid = true; - } - } - - trialSolution.rgbIntLS = blockRgbInt; - - bool success = false; - if( trialSolution.error < bestSolution.error ) - { - bestSolution = trialSolution; - success = true; - } - - return success; -} - -float getScanDelta( const float iDeltai, const float scanDeltaAbsMin, const float scanDeltaAbsMax ) -{ - const float numAbsDeltas = scanDeltaAbsMax - scanDeltaAbsMin + 1.0f; - - if( iDeltai < numAbsDeltas ) - return -scanDeltaAbsMax + iDeltai; - else - return scanDeltaAbsMin + iDeltai + ( scanDeltaAbsMin == 0.0f ? 1.0f : 0.0f ) - numAbsDeltas; -} - -/** -@brief etc1_optimizer_compute -@param scanDeltaAbsMin -@param scanDeltaAbsMax -@param avgColour -@param avgColourLS - Same as avgColour but in limit space, i.e. range [0; limit] -@param bUseColor4 -@param baseColor5 -@param constrainAgainstBaseColor5 -@param bestSolution -@return - True if we found a solution - False if we failed to find any -*/ -void etc1_optimizer_compute( const float scanDeltaAbsMin, const float scanDeltaAbsMax, - const uint subblockStart, const float3 avgColour, const float3 avgColourLS, - const bool bUseColor4, const float3 baseColor5, - const bool constrainAgainstBaseColor5, - inout PotentialSolution bestSolution ) -{ - // const float numSrcPixels = 8; // Subblock of 2x4 or 4x2 - const float limit = bUseColor4 ? 15 : 31; - - const float scanDeltaSize = - ( scanDeltaAbsMax - scanDeltaAbsMin ) * 2.0f + ( scanDeltaAbsMin == 0.0f ? 1.0f : 2.0f ); - - for( float di = 0; di < scanDeltaSize * scanDeltaSize * scanDeltaSize; ++di ) - { - float3 xyzdi = float3( mod( di, scanDeltaSize ), // - mod( floor( di / scanDeltaSize ), scanDeltaSize ), // - floor( di / ( scanDeltaSize * scanDeltaSize ) ) ); - float3 blockRgbInt = avgColourLS; - blockRgbInt.x = getScanDelta( xyzdi.x, scanDeltaAbsMin, scanDeltaAbsMax ); - blockRgbInt.y = getScanDelta( xyzdi.y, scanDeltaAbsMin, scanDeltaAbsMax ); - blockRgbInt.z = getScanDelta( xyzdi.z, scanDeltaAbsMin, scanDeltaAbsMax ); - const uint maxRefinementTrials = - ( blockRgbInt.x == 0.0f && blockRgbInt.y == 0.0f && blockRgbInt.z == 0.0f ) - ? p_maxRefinementTrials - : 2u; - blockRgbInt += avgColourLS; - - if( blockRgbInt.x >= 0.0f && blockRgbInt.x <= limit && // - blockRgbInt.y >= 0.0f && blockRgbInt.y <= limit && // - blockRgbInt.z >= 0.0f && blockRgbInt.z <= limit ) - { - bool bSuccess = evaluate_solution( subblockStart, blockRgbInt, bUseColor4, baseColor5, - constrainAgainstBaseColor5, bestSolution ); - - if( bSuccess ) - { - // Now we have the input block, the avg. color of the input pixels, a set of trial - // selector indices, and the block color+intensity index. Now, for each component, - // attempt to refine the current solution by solving a simple linear equation. - // So what this means: optimal_block_color = avg_input - avg_inten_delta - // So the optimal block color can be computed by taking the average block color and - // subtracting the current average of the intensity delta. - // Unfortunately, optimal_block_color must then be quantized to 555 or 444 so it's - // not always possible to improve matters using this formula. Also, the formula is - // for unclamped intensity deltas. The actual implementation takes into account - // clamping. - - float4 pSelectors[2]; - pSelectors[0] = unpackUnorm4x8( bestSolution.selectors[0] ) * 255.0f; - pSelectors[1] = unpackUnorm4x8( bestSolution.selectors[1] ) * 255.0f; - - for( uint refinementTrial = 0u; refinementTrial < maxRefinementTrials && bSuccess; - ++refinementTrial ) - { - const float4 pIntenTable = g_etc1_inten_tables[bestSolution.intenTable]; - - float3 deltaSum = float3( 0.0f, 0.0f, 0.0f ); - float3 base_color = getScaledColor( bestSolution.rgbIntLS, bUseColor4 ); - - for( uint r = 0u; r < 8u; ++r ) - { - const uint s = uint( pSelectors[r >> 2u][r & 0x03u] * 255.0f ); - const float yd = pIntenTable[s]; - // Compute actual delta being applied to each pixel, - // taking into account clamping. - deltaSum += clamp( base_color + yd, 0.0, 255.0 ) - base_color; - } - - const float3 avgDelta = deltaSum * 0.125f; - const float3 blockRgbInt1 = clamp( - floor( ( avgColour - avgDelta ) * limit * ( 1.0f / 255.0f ) + 0.5f ), 0, limit ); - - if( ( deltaSum.r == 0.0f && deltaSum.g == 0.0f && deltaSum.b == 0.0f ) || - ( blockRgbInt.r == blockRgbInt1.r && // - blockRgbInt.g == blockRgbInt1.g && // - blockRgbInt.b == blockRgbInt1.b ) || - ( bestSolution.rgbIntLS.r == blockRgbInt1.r && // - bestSolution.rgbIntLS.g == blockRgbInt1.g && // - bestSolution.rgbIntLS.b == blockRgbInt1.b ) || - ( avgColourLS.r == blockRgbInt1.r && // - avgColourLS.g == blockRgbInt1.g && // - avgColourLS.b == blockRgbInt1.b ) ) - { - // Skip refinement - bSuccess = false; - } - else - { - bSuccess = - evaluate_solution( subblockStart, blockRgbInt1, bUseColor4, baseColor5, - constrainAgainstBaseColor5, bestSolution ); - } - } // refinementTrial - } - } - } -} - -/// Replaces g_selector_index_to_etc1[cETC1SelectorValues] from original code -/// const uint8 g_selector_index_to_etc1[cETC1SelectorValues] = { 3, 2, 0, 1 }; -/// -/// Input is in range [0; 4) -/// Return value is in range [0; 4) -float selector_index_to_etc1( float idx ) -{ - return idx < 2.0f ? ( 3.0f - idx ) : ( idx - 2.0f ); -} - -// Packs solid color blocks efficiently using a set of small precomputed tables. -// For random 888 inputs, MSE results are better than Erricson's ETC1 packer in "slow" mode ~9.5% of -// the time, is slightly worse only ~.01% of the time, and is equal the rest of the time. -void pack_etc1_block_solid_color( const float3 srcPixel ) -{ - float bestError = FLT_MAX, bestPacked_c1 = 0, bestPacked_c2 = 0; - uint best_x = 0u, best_i = 0u; - - // For each possible 8-bit value, there is a precomputed list of diff/inten/selector - // configurations that allow that 8-bit value to be encoded with no error. - for( uint i = 0u; i < 3u && bestError > 0; ++i ) - { - const float c0 = srcPixel[i]; - const uint c1 = uint( i == 0u ? srcPixel.y : ( i == 1u ? srcPixel.z : srcPixel.x ) ); - const uint c2 = uint( i == 0u ? srcPixel.z : ( i == 1u ? srcPixel.x : srcPixel.y ) ); - - const float deltaRange = 1.0f; - for( float delta = -deltaRange; delta <= deltaRange && bestError > 0; ++delta ) - { - const float c_plus_delta = clamp( c0 + delta, 0.0f, 255.0f ); - - uint tableOffset; - if( c_plus_delta == 0.0f ) - tableOffset = 0u; - else if( c_plus_delta == 255.0f ) - tableOffset = 33u; - else - tableOffset = uint( 66.0f + ( c_plus_delta - 1.0f ) * 11.0f ); - - const uint numTableEntries = pBuff_color8_to_etc_block_config[tableOffset]; - for( uint j = 0u; j < numTableEntries && bestError > 0; ++j ) - { - const uint x = pBuff_color8_to_etc_block_config[tableOffset + j + 1u]; - - float p1 = pBuff_etc1_inverse_lookup[x & 0xFFu][c1]; - float p2 = pBuff_etc1_inverse_lookup[x & 0xFFu][c2]; - - const float3 diffVal = float3( c_plus_delta - c0, // - floor( p1 * ( 1.0f / 256.0f ) ), // - floor( p2 * ( 1.0f / 256.0f ) ) ); - const float trialError = dot( diffVal, diffVal ); - if( trialError < bestError ) - { - bestError = trialError; - best_x = x; - bestPacked_c1 = mod( p1, 256.0f ); - bestPacked_c2 = mod( p2, 256.0f ); - best_i = i; - } - } - } - } - - const float diff = float( best_x & 1u ); - const float inten = float( ( best_x >> 1u ) & 7u ); - - float4 bytes; - uint2 outputBytes; - - bytes.w = ( inten + ( inten * 8.0f ) ) * 4.0f + diff * 2.0f; - - const float bestPacked_c0 = float( ( best_x >> 8 ) & 255u ); - float3 bestPacked = float3( bestPacked_c0, bestPacked_c1, bestPacked_c2 ); - if( diff != 0.0f ) - bestPacked = bestPacked * 8.0f; - else - bestPacked = bestPacked + bestPacked * 16.0f; - - bytes.xyz = best_i == 0u ? bestPacked.xyz : ( best_i == 1u ? bestPacked.zxy : bestPacked.yzx ); - - const float etc1Selector = selector_index_to_etc1( float( ( best_x >> 4u ) & 3u ) ); - outputBytes.x = packUnorm4x8( bytes * ( 1.0f / 255.0f ) ); - outputBytes.y = ( etc1Selector >= 2u ? 0xFFFFu : 0u ) | - ( ( etc1Selector == 1.0f || etc1Selector == 3.0f ) ? 0xFFFF0000u : 0u ); - - uint2 dstUV = gl_GlobalInvocationID.yz; - imageStore( dstTexture, int2( dstUV ), uint4( outputBytes.xy, 0u, 0u ) ); - -#ifdef OUTPUT_ERROR - imageStore( dstError, int2( dstUV ), float4( bestError, 0.0f, 0.0f, 0.0f ) ); -#endif -} - -void pack_etc1_block_solid_color_constrained( const float3 srcPixel, const bool bUseDiff, - const float3 baseColor5, - inout PotentialSolution bestSolution ) -{ - float bestError = FLT_MAX, bestPacked_c1 = 0, bestPacked_c2 = 0; - uint best_x = 0u, best_i = 0u; - - // For each possible 8-bit value, there is a precomputed list of diff/inten/selector - // configurations that allow that 8-bit value to be encoded with no error. - for( uint i = 0u; i < 3u && bestError > 0; ++i ) - { - const float c0 = srcPixel[i]; - const uint c1 = uint( i == 0u ? srcPixel.y : ( i == 1u ? srcPixel.z : srcPixel.x ) ); - const uint c2 = uint( i == 0u ? srcPixel.z : ( i == 1u ? srcPixel.x : srcPixel.y ) ); - - const float deltaRange = 1.0f; - for( float delta = -deltaRange; delta <= deltaRange && bestError > 0; ++delta ) - { - const float c_plus_delta = clamp( c0 + delta, 0.0f, 255.0f ); - - uint tableOffset; - if( c_plus_delta == 0.0f ) - tableOffset = 0u; - else if( c_plus_delta == 255.0f ) - tableOffset = 33u; - else - tableOffset = uint( 66.0f + ( c_plus_delta - 1.0f ) * 11.0f ); - - const uint numTableEntries = pBuff_color8_to_etc_block_config[tableOffset]; - for( uint j = 0u; j < numTableEntries && bestError > 0; ++j ) - { - const uint x = pBuff_color8_to_etc_block_config[tableOffset + j + 1u]; - const bool bCandidateUsesDiff = ( x & 1u ) != 0u; - - if( bUseDiff == bCandidateUsesDiff ) - { - const float p1 = pBuff_etc1_inverse_lookup[x & 0xFFu][c1]; - const float p2 = pBuff_etc1_inverse_lookup[x & 0xFFu][c2]; - - bool bIsValid = true; - - if( bUseDiff ) - { - const float p0 = float( ( x >> 8u ) & 255u ); - const float3 blockRgbInt = float3( p0, mod( p1, 256.0f ), mod( p2, 256.0f ) ); - const float3 d = blockRgbInt - baseColor5; - - if( ( min3( d.r, d.g, d.b ) < cETC1ColorDeltaMin ) || // - ( max3( d.r, d.g, d.b ) > cETC1ColorDeltaMax ) ) - { - bIsValid = false; - } - } - - const float3 diffVal = float3( c_plus_delta - c0, // - floor( p1 * ( 1.0f / 256.0f ) ), // - floor( p2 * ( 1.0f / 256.0f ) ) ); - const float trialError = dot( diffVal, diffVal ); - if( trialError < bestError && bIsValid ) - { - bestError = trialError; - best_x = x; - bestPacked_c1 = mod( p1, 256.0f ); - bestPacked_c2 = mod( p2, 256.0f ); - best_i = i; - } - } - } - } - } - - bestError *= 8.0f; - - if( bestError < bestSolution.error ) - { - const float bestPacked_c0 = float( ( best_x >> 8 ) & 255u ); - float3 bestPacked = float3( bestPacked_c0, bestPacked_c1, bestPacked_c2 ); - bestSolution.rgbIntLS = - best_i == 0u ? bestPacked.xyz : ( best_i == 1u ? bestPacked.zxy : bestPacked.yzx ); - - bestSolution.selectors[0] = - packUnorm4x8( float4( ( ( best_x >> 4u ) & 3u ) * ( 1.0f / 255.0f ) ) ); - bestSolution.selectors[1] = bestSolution.selectors[0]; - bestSolution.intenTable = ( best_x >> 1u ) & 7u; - } -} - -void main() -{ - // 4 threads per ETC block. Each pair of threads tries a different mode - // combination (flip & useColor4); but we do not split subgroups into 2 threads because - // when bUseColor4 = false, subblock1 depends on subblock0 - // - // In Rich Geldrich's implementation the algorithm would stop if the 1st subgroup error - // is already higher the combined error of the best pair of candidates. - // - // We can't do that because: - // 1. There is no "best candidate" because they're all processed in parallel - // 2. Even if there were, GPUs would very likely loop due to branch divergence - // from different ETC blocks being processed by the same threadgroup - const uint blockThreadId = gl_LocalInvocationID.x; - - const bool bFlip = ( blockThreadId & 0x01u ) != 0u; - const bool bUseColor4 = ( blockThreadId & 0x02u ) != 0u; - - const uint2 pixelsToLoadBase = gl_GlobalInvocationID.yz << 2u; - - // We need to load a block of 4x4 pixels from src (16 pixels), and we have 4 threads per block - // Thus each thread gets to load 4 pixels: - // 4x1 - // 4x1 - // 4x1 - // 4x1 - // and distribute it into shared memory - uint2 pixelsToLoad = pixelsToLoadBase; - pixelsToLoad.y += blockThreadId; - - const float3 srcPixels0 = OGRE_Load2D( srcTex, int2( pixelsToLoad ), 0 ).xyz; - const float3 srcPixels1 = OGRE_Load2D( srcTex, int2( pixelsToLoad + uint2( 1u, 0u ) ), 0 ).xyz; - const float3 srcPixels2 = OGRE_Load2D( srcTex, int2( pixelsToLoad + uint2( 2u, 0u ) ), 0 ).xyz; - const float3 srcPixels3 = OGRE_Load2D( srcTex, int2( pixelsToLoad + uint2( 3u, 0u ) ), 0 ).xyz; - - const uint blockStart = ( gl_LocalInvocationID.y + gl_LocalInvocationID.z * 4u ) * 32u; - // const uint blockStart = ( gl_LocalInvocationIndex & 0x60u ) << 3u; - // Linear (horizontal, aka flip = on) - const uint subblockStartH = blockStart + 16u + ( blockThreadId << 2u ); - g_srcPixelsBlock[subblockStartH + 0u] = packUnorm4x8( float4( srcPixels0, 1.0f ) ); - g_srcPixelsBlock[subblockStartH + 1u] = packUnorm4x8( float4( srcPixels1, 1.0f ) ); - g_srcPixelsBlock[subblockStartH + 2u] = packUnorm4x8( float4( srcPixels2, 1.0f ) ); - g_srcPixelsBlock[subblockStartH + 3u] = packUnorm4x8( float4( srcPixels3, 1.0f ) ); - - // Non-linear (vertical, aka flip = off) - const uint subblockOffset0 = 0u; // subblockIdx = 0 - const uint subblockStart0 = blockStart + subblockOffset0 + blockThreadId; - g_srcPixelsBlock[subblockStart0 + 0u] = packUnorm4x8( float4( srcPixels0, 1.0f ) ); - g_srcPixelsBlock[subblockStart0 + 4u] = packUnorm4x8( float4( srcPixels1, 1.0f ) ); - - const uint subblockOffset1 = 8u; // subblockIdx = 1 - const uint subblockStart1 = blockStart + subblockOffset1 + blockThreadId; - g_srcPixelsBlock[subblockStart1 + 0u] = packUnorm4x8( float4( srcPixels2, 1.0f ) ); - g_srcPixelsBlock[subblockStart1 + 4u] = packUnorm4x8( float4( srcPixels3, 1.0f ) ); - - const uint pixelsEqualBlockStart = ( gl_LocalInvocationID.y + gl_LocalInvocationID.z * 4u ) * 4u; - bool bAllPixelsInThreadEqual = - srcPixels0 == srcPixels1 && srcPixels0 == srcPixels2 && srcPixels0 == srcPixels3; - g_allPixelsEqual[pixelsEqualBlockStart + blockThreadId] = bAllPixelsInThreadEqual; - - __sharedOnlyBarrier; - - if( blockThreadId == 0u ) - { - // Thread 0 finishes checking if all pixels are equal - for( uint i = 1u; i < 4u; ++i ) - { - bAllPixelsInThreadEqual = - bAllPixelsInThreadEqual && g_allPixelsEqual[pixelsEqualBlockStart + i]; - - // All 4 pixels in thread 'i' could be equal. But they may be different from *our* pixels - const float3 otherPixels = unpackUnorm4x8( g_srcPixelsBlock[blockStart + i] ).xyz; - bAllPixelsInThreadEqual = bAllPixelsInThreadEqual && srcPixels0 == otherPixels; - } - g_allPixelsEqual[pixelsEqualBlockStart] = bAllPixelsInThreadEqual; - } - - __sharedOnlyBarrier; - - PotentialSolution results[2]; - for( uint i = 0u; i < 2u; ++i ) - { - results[i].error = FLT_MAX; - results[i].rgbIntLS = float3( 0, 0, 0 ); - results[i].intenTable = 0u; - results[i].selectors[0] = 0u; - results[i].selectors[1] = 0u; - } - - // Check if all colours are equal. If so we can improve quality - const bool bAllColoursEqual = g_allPixelsEqual[pixelsEqualBlockStart]; - if( bAllColoursEqual ) - { - if( blockThreadId == 0u ) - pack_etc1_block_solid_color( srcPixels0 * 255.0f ); - } - - barrier(); // Ensure all threads are done reading from g_allPixelsEqual - - if( !bAllColoursEqual ) - { - // Now check if the subblock has all pixels equal. - // There are 4 subblocks to check (2 flipped and 2 non-flipped) - // so we put all 4 threads to work on each. - const uint subblockIdx = ( blockThreadId & 0x1u ); - const bool bTmpFlip = blockThreadId >= 2u; - - const uint subblockStart = - blockStart + ( bTmpFlip ? 16u : 0u ) + ( subblockIdx == 0u ? 0u : 8u ); - - bool allPixelsInSubblockEqual = true; - - const float3 srcPixel0 = unpackUnorm4x8( g_srcPixelsBlock[subblockStart] ).xyz; - for( uint i = 1u; i < 8u; ++i ) - { - const float3 srcPixel = unpackUnorm4x8( g_srcPixelsBlock[i + subblockStart] ).xyz; - allPixelsInSubblockEqual = allPixelsInSubblockEqual && srcPixel0 == srcPixel; - } - - // g_allPixelsEqual[start + 0] => subblockIdx = 0 + bFlip = false - // g_allPixelsEqual[start + 1] => subblockIdx = 1 + bFlip = false - // g_allPixelsEqual[start + 2] => subblockIdx = 0 + bFlip = true - // g_allPixelsEqual[start + 3] => subblockIdx = 1 + bFlip = true - g_allPixelsEqual[pixelsEqualBlockStart + blockThreadId] = allPixelsInSubblockEqual; - } - - __sharedOnlyBarrier; - - // Unfortunately subblockIdx = 1 depends on subblockIdx = 0 when bUseColor4 = false - for( uint subblockIdx = 0u; subblockIdx < 2u && !bAllColoursEqual; ++subblockIdx ) - { - const bool constrainAgainstBaseColor5 = !bUseColor4 && subblockIdx != 0u; - const float3 baseColor5 = results[0].rgbIntLS; - - const uint subblockStart = blockStart + ( bFlip ? 16u : 0u ) + ( subblockIdx == 0u ? 0u : 8u ); - - // Have all threads compute average. - // - // We don't do parallel reduction because it'd consume too - // much LDS and we don't have access to __shfl_down - float3 avgColour = float3( 0, 0, 0 ); - for( uint i = 0; i < 8u; ++i ) - { - const float3 srcPixel = unpackUnorm4x8( g_srcPixelsBlock[i + subblockStart] ).xyz; - avgColour += srcPixel; - } - avgColour *= 1.0f / 8.0f; - - if( p_quality >= cMediumQuality && ( subblockIdx > 0u || bUseColor4 ) && - g_allPixelsEqual[pixelsEqualBlockStart + subblockIdx + ( bFlip ? 2u : 0u )] ) - { - pack_etc1_block_solid_color_constrained( - unpackUnorm4x8( g_srcPixelsBlock[subblockStart] ).xyz * 255.0f, bUseColor4, baseColor5, - results[subblockIdx] ); - } - - const float limit = bUseColor4 ? 15 : 31; - const float3 avgColourLS = clamp( floor( avgColour * limit + 0.5f ), 0, limit ); - avgColour = avgColour * 255.0f; - - etc1_optimizer_compute( p_scanDeltaAbsMin, p_scanDeltaAbsMax, subblockStart, avgColour, - avgColourLS, bUseColor4, baseColor5, constrainAgainstBaseColor5, - results[subblockIdx] ); - - if( p_quality >= cMediumQuality ) - { - const float refinement_error_thresh0 = 3000; - const float refinement_error_thresh1 = 6000; - if( results[subblockIdx].error > refinement_error_thresh0 ) - { - float scanDeltaAbsMin, scanDeltaAbsMax; - if( p_quality == cMediumQuality ) - { - scanDeltaAbsMin = 2; - scanDeltaAbsMax = 3; - } - else - { - scanDeltaAbsMin = 5; - if( results[subblockIdx].error > refinement_error_thresh1 ) - scanDeltaAbsMax = 8; - else - scanDeltaAbsMax = 5; - } - - etc1_optimizer_compute( scanDeltaAbsMin, scanDeltaAbsMax, subblockStart, avgColour, - avgColourLS, bUseColor4, baseColor5, constrainAgainstBaseColor5, - results[subblockIdx] ); - } - } - } - - // - // IMPORTANT: From now on g_srcPixelsBlock will be used for sync and - // selecting the best result thus its old contents will become garbage - // - - // Ensure execution reaches here; otherwise we could - // overwrite g_srcPixelsBlock while it's in use - barrier(); - - // Save everyone's error to LDS - storeErrorToLds( results[0].error + results[1].error, gl_LocalInvocationIndex ); - __sharedOnlyBarrier; - - if( blockThreadId == 0u ) - { - float bestError = results[0].error + results[1].error; - uint bestErrorThread = 0u; - - // Find the best result - for( uint i = 1u; i < 4u; ++i ) - { - float otherError = loadErrorFromLds( gl_LocalInvocationIndex + i ); - if( otherError < bestError ) - { - bestError = otherError; - bestErrorThread = i; - } - } - - // Write down which thread has the best error in our private LDS region - storeBestBlockThreadIdxToLds( bestErrorThread, gl_LocalInvocationIndex ); - } - - __sharedOnlyBarrier; - - // Load threadIdx with best error which was written down by thread blockThreadId == 0u - const uint blockThreadWithBestError = - loadBestBlockThreadIdxFromLds( gl_LocalInvocationIndex & ~0x03u ); - - if( blockThreadWithBestError == blockThreadId && !bAllColoursEqual ) - { - // This thread was selected as the one with the best result. - // Thus this one (the winner) will write to output - float4 bytes; - if( bUseColor4 ) - { - bytes.xyz = results[1].rgbIntLS + results[0].rgbIntLS * 16.0f; - } - else - { - float3 delta = results[1].rgbIntLS - results[0].rgbIntLS; - if( delta.x < 0.0f ) - delta.x += 8.0f; - if( delta.y < 0.0f ) - delta.y += 8.0f; - if( delta.z < 0.0f ) - delta.z += 8.0f; - - bytes.xyz = delta + results[0].rgbIntLS * 8.0f; - } - - bytes.w = ( results[1].intenTable * 4.0f ) + ( results[0].intenTable * 32.0f ) + - ( bUseColor4 ? 0.0f : 2.0f ) + ( bFlip ? 1.0f : 0.0f ); - - uint2 outputBytes; - outputBytes.x = packUnorm4x8( bytes * ( 1.0f / 255.0f ) ); - - float selector0 = 0, selector1 = 0; - if( bFlip ) - { - // flipped: - // { 0, 0 }, { 1, 0 }, { 2, 0 }, { 3, 0 }, - // { 0, 1 }, { 1, 1 }, { 2, 1 }, { 3, 1 } - // - // { 0, 2 }, { 1, 2 }, { 2, 2 }, { 3, 2 }, - // { 0, 3 }, { 1, 3 }, { 2, 3 }, { 3, 3 } - float4 pSelectors00 = unpackUnorm4x8( results[0].selectors[0] ) * 255.0f; - float4 pSelectors01 = unpackUnorm4x8( results[0].selectors[1] ) * 255.0f; - float4 pSelectors10 = unpackUnorm4x8( results[1].selectors[0] ) * 255.0f; - float4 pSelectors11 = unpackUnorm4x8( results[1].selectors[1] ) * 255.0f; - for( uint x = 4u; x-- > 0u; ) - { - float b, bHalf; - b = selector_index_to_etc1( pSelectors11[x] ); - bHalf = floor( b * 0.5f ); - selector0 = ( selector0 * 2.0f ) + ( b - bHalf * 2.0f ); - selector1 = ( selector1 * 2.0f ) + ( bHalf ); - - b = selector_index_to_etc1( pSelectors10[x] ); - bHalf = floor( b * 0.5f ); - selector0 = ( selector0 * 2.0f ) + ( b - bHalf * 2.0f ); - selector1 = ( selector1 * 2.0f ) + ( bHalf ); - - b = selector_index_to_etc1( pSelectors01[x] ); - bHalf = floor( b * 0.5f ); - selector0 = ( selector0 * 2.0f ) + ( b - bHalf * 2.0f ); - selector1 = ( selector1 * 2.0f ) + ( bHalf ); - - b = selector_index_to_etc1( pSelectors00[x] ); - bHalf = floor( b * 0.5f ); - selector0 = ( selector0 * 2.0f ) + ( b - bHalf * 2.0f ); - selector1 = ( selector1 * 2.0f ) + ( bHalf ); - } - } - else - { - // non-flipped: - // { 0, 0 }, { 0, 1 }, { 0, 2 }, { 0, 3 }, - // { 1, 0 }, { 1, 1 }, { 1, 2 }, { 1, 3 } - // - // { 2, 0 }, { 2, 1 }, { 2, 2 }, { 2, 3 }, - // { 3, 0 }, { 3, 1 }, { 3, 2 }, { 3, 3 } - for( uint subblockIdx = 2u; subblockIdx-- > 0u; ) - { - for( uint i = 2u; i-- > 0u; ) - { - float4 pSelectors = unpackUnorm4x8( results[subblockIdx].selectors[i] ) * 255.0f; - - float b, bHalf; - b = selector_index_to_etc1( pSelectors[3] ); - bHalf = floor( b * 0.5f ); - selector0 = ( selector0 * 2.0f ) + ( b - bHalf * 2.0f ); - selector1 = ( selector1 * 2.0f ) + ( bHalf ); - - b = selector_index_to_etc1( pSelectors[2] ); - bHalf = floor( b * 0.5f ); - selector0 = ( selector0 * 2.0f ) + ( b - bHalf * 2.0f ); - selector1 = ( selector1 * 2.0f ) + ( bHalf ); - - b = selector_index_to_etc1( pSelectors[1] ); - bHalf = floor( b * 0.5f ); - selector0 = ( selector0 * 2.0f ) + ( b - bHalf * 2.0f ); - selector1 = ( selector1 * 2.0f ) + ( bHalf ); - - b = selector_index_to_etc1( pSelectors[0] ); - bHalf = floor( b * 0.5f ); - selector0 = ( selector0 * 2.0f ) + ( b - bHalf * 2.0f ); - selector1 = ( selector1 * 2.0f ) + ( bHalf ); - } - } - } - -#ifdef CHECKING_ORDER - bytes.x = floor( selector1 / 256.0f ); - bytes.y = selector1 - floor( selector1 / 256.0f ) * 256.0f; - bytes.z = floor( selector0 / 256.0f ); - bytes.w = selector0 - floor( selector0 / 256.0f ) * 256.0f; - outputBytes.y = packUnorm4x8( bytes * ( 1.0f / 255.0f ) ); -#else - outputBytes.y = packUnorm2x16( float2( selector1, selector0 ) * ( 1.0f / 65535.0f ) ); - outputBytes.y = packUnorm4x8( unpackUnorm4x8( outputBytes.y ).yxwz ); // Byteswap -#endif - - uint2 dstUV = gl_GlobalInvocationID.yz; - imageStore( dstTexture, int2( dstUV ), uint4( outputBytes.xy, 0u, 0u ) ); -#ifdef OUTPUT_ERROR - imageStore( dstError, int2( dstUV ), - float4( results[0].error + results[1].error, 0.0f, 0.0f, 0.0f ) ); -#endif - } -} diff --git a/bin/Data/etc2_p.glsl b/bin/Data/etc2_p.glsl deleted file mode 100644 index 7e6b543..0000000 --- a/bin/Data/etc2_p.glsl +++ /dev/null @@ -1,361 +0,0 @@ -#version 430 core - -// Planar mode of ETC2 - -// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" - -#include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" - -#define FLT_MAX 340282346638528859811704183484516925440.0f - -uniform sampler2D srcTex; - -layout( rg32ui, binding = 0 ) uniform restrict writeonly uimage2D dstTexture; -layout( r32f, binding = 1 ) uniform restrict writeonly image2D dstError; - -shared float2 g_threadBestCandidates[4u][4u * 4u]; - -#define g_bestCandidates g_threadBestCandidates[gl_LocalInvocationID.z] - -layout( local_size_x = 4, // - local_size_y = 4, // - local_size_z = 4 ) in; - -/* -kPmodeEncoderRG table generated with: - static const int kSigned3bit[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; - #define BITS( byteval, lowbit, highbit ) \ - ( ( ( byteval ) >> ( lowbit ) ) & ( ( 1 << ( ( highbit ) - ( lowbit ) + 1 ) ) - 1 ) ) - #define BIT( byteval, bit ) ( ( ( byteval ) >> ( bit ) ) & 0x1 ) - int main() - { - // kPmodeEncoderRG - for( int GO = 0; GO < 128; GO += 127u ) - { - for( int RO = 0; RO < 64; ++RO ) - { - // RO_6 [2..5] - int R = BITS( RO, 2, 5 ); - // RO_6 [0..1] + GO_7[6] - int dR = ( BITS( RO, 0, 1 ) << 1 ) | BIT( GO, 6 ); - if( !( ( R + kSigned3bit[dR] >= 0 ) && ( R + kSigned3bit[dR] <= 31 ) ) ) - R |= 1 << 4; - assert( ( ( R + kSigned3bit[dR] >= 0 ) && ( R + kSigned3bit[dR] <= 31 ) ) ); - printf( "%i, ", ( R << 3 ) | dR ); - } - } - printf( "\n" ); - return 0; - } -*/ -const float kPmodeEncoderRG[128] = { - 0, 2, 132, 134, 8, 10, 140, 142, 16, 18, 148, 22, 24, 26, 156, 30, 32, 34, 36, - 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, - 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, - 114, 116, 118, 120, 122, 124, 126, 1, 3, 133, 135, 9, 11, 141, 15, 17, 19, 149, 23, - 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, - 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, - 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127 -}; - -// kPmodeEncoderGB is exactly the same -#define kPmodeEncoderGB kPmodeEncoderRG - -/* -kPmodeEncoderB table generated with: - static const int kSigned3bit[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; - #define BITS( byteval, lowbit, highbit ) \ - ( ( ( byteval ) >> ( lowbit ) ) & ( ( 1 << ( ( highbit ) - ( lowbit ) + 1 ) ) - 1 ) ) - int main() - { - for( int BO = 0; BO < 32; ++BO ) - { - if( !( BO & 0x01 ) ) - { - // BO_6[3..4] - int B = BITS( BO, 3, 4 ); - // BO_6[1..2] - int dB = BITS( BO, 1, 2 ); - // B + dB must be outside the range. - for( int Bx = 0; Bx < 8; Bx++ ) - { - for( int dBx = 0; dBx < 2; dBx++ ) - { - int Btry = B | ( Bx << 2 ); - int dBtry = dB | ( dBx << 2 ); - if( ( Btry + kSigned3bit[dBtry] ) < 0 || ( Btry + kSigned3bit[dBtry] > 31 ) ) - { - B = Btry; - dB = dBtry; - break; - } - } - } - assert( !( ( B + kSigned3bit[dB] >= 0 ) && ( B + kSigned3bit[dB] <= 31 ) ) ); - printf( "%i, ", ( B << 3 ) | dB ); - } - } - printf( "\n" ); - return 0; - } -*/ -const float kPmodeEncoderB[16] = { 4, 5, 6, 7, 12, 13, 14, 235, 20, 21, 242, 243, 28, 249, 250, 251 }; - -float3 getSrcPixel( uint idx ) -{ - const uint2 pixelsToLoadBase = - ( ( gl_WorkGroupID.xy << 1u ) + - uint2( gl_LocalInvocationID.z & 0x01u, gl_LocalInvocationID.z >> 1u ) ) - << 2u; - uint2 pixelsToLoad = pixelsToLoadBase; - // Note we are NOT transposing this time! - pixelsToLoad.x += idx & 0x03u; //+= threadId % 4 - pixelsToLoad.y += idx >> 2u; //+= threadId / 4 - const float3 srcPixels0 = OGRE_Load2D( srcTex, int2( pixelsToLoad ), 0 ).xyz; - return srcPixels0; -} - -float3 getSrcPixel( float x, float y ) -{ - const uint2 pixelsToLoadBase = - ( ( gl_WorkGroupID.xy << 1u ) + - uint2( gl_LocalInvocationID.z & 0x01u, gl_LocalInvocationID.z >> 1u ) ) - << 2u; - uint2 pixelsToLoad = pixelsToLoadBase + uint2( float( x ), float( y ) ); - const float3 srcPixels0 = OGRE_Load2D( srcTex, int2( pixelsToLoad ), 0 ).xyz; - return srcPixels0; -} - -/// Converts rgbValue in fp range [0; 1] to integer range [0; 64) in RB and [0; 128) in G channels -float3 rgbFpTo676( const float3 rgbFp ) -{ - return floor( rgbFp * float2( 63.0f, 127.0f ).xyx + 0.5f ); // Convert to 676 -} - -float3 rgb676To888( float3 rgbValue ) -{ - return floor( rgbValue * float2( 4.0625f, 2.0157f ).xyx ); // Convert to 888 -} - -float calcError( const float3 colour0, const float3 colour1 ) -{ - float3 diff = colour0.xyz - colour1.xyz; - return dot( diff, diff ); -} - -float calcErrorPMode( float3 cO, float3 cH, float3 cV ) -{ - float err = 0.0f; - - cO = rgb676To888( cO ); - cH = rgb676To888( cH ); - cV = rgb676To888( cV ); - - for( uint i = 0u; i < 16u; ++i ) - { - const float x = float( i & 0x03u ); // i % 4 - const float y = float( i >> 2u ); // i / 4 - - // Bilinear interpolation using integer arithmetic (i.e. what the HW does) - float3 rgbn = floor( ( 4.0f * cO + x * ( cH - cO ) + y * ( cV - cO ) + 2.0f ) * 0.25f ); - rgbn = clamp( rgbn, 0.0f, 255.0f ); - - err += calcError( getSrcPixel( x, y ) * 255.0f, rgbn ); - } - - return err; -} - -/** -@param cO - xz in range [0; 64) y in range [0; 128) -@param cH - xz in range [0; 64) y in range [0; 128) -@param cV - xz in range [0; 64) y in range [0; 128) -@param srcPixelsBlock -*/ -void etc2_planar_mode_write( const float3 cO, const float3 cH, const float3 cV ) -{ - float4 bytes; - - // cO.r bits [0; 6) - // cO.g bits [6; 7) - bytes.x = kPmodeEncoderRG[uint( cO.x + ( cO.y >= 64.0f ? 64.0f : 0.0f ) )]; - // cO.g bits [0; 6) - // cO.b bits [5; 6) - bytes.y = kPmodeEncoderGB[uint( mod( cO.y, 64.0f ) + ( cO.z >= 32.0f ? 64.0f : 0.0f ) )]; - // cO.b bits [1; 5) - bytes.z = kPmodeEncoderB[uint( mod( floor( cO.z * 0.5f ), 16.0f ) )]; - bytes.w = mod( cO.z, 2.0f ) * 128.0f + floor( cH.x * 0.5f ) * 4.0f + 2.0f + mod( cH.x, 2.0f ); - - uint2 outputBytes; - outputBytes.x = packUnorm4x8( bytes * ( 1.0f / 255.0f ) ); - - bytes.x = cH.y * 2.0f + floor( cH.z * 0.03125f ); - bytes.y = mod( cH.z, 32.0f ) * 8.0f + floor( cV.x * 0.125f ); - bytes.z = mod( cV.x, 8.0f ) * 32.0f + floor( cV.y * 0.25f ); - bytes.w = mod( cV.y, 4.0f ) * 64.0f + cV.z; - - outputBytes.y = packUnorm4x8( bytes * ( 1.0f / 255.0f ) ); - - const uint2 dstUV = ( gl_WorkGroupID.xy << 1u ) + - uint2( gl_LocalInvocationID.z & 0x01u, gl_LocalInvocationID.z >> 1u ); - imageStore( dstTexture, int2( dstUV ), uint4( outputBytes.xy, 0u, 0u ) ); -} - -/** Uses a Simple Linear Regression to find the best curve that fits all 4 samples in a row -@param bVertical -@param yOffset - When bVertical = true, yOffset becomes xOffset -@param startIdx -@param endIdx -@param minEndpoint [out] - Value for cO -@param maxEndpoint [out] - Value for either cH (bVertical = false) or cV (bVertical = true) -*/ -void getCoeffSLR( const bool bVertical, const float yOffset, const float startIdx, const float endIdx, - out float3 minEndpoint, out float3 maxEndpoint ) -{ - float3 srcCol[4]; - float3 avgCol = float3( 0.0f, 0.0f, 0.0f ); - for( float i = 0.0f; i < 4.0f; ++i ) - { - const float idx = clamp( i, startIdx, endIdx ); - float2 uv = float2( idx, yOffset ); - uv = bVertical ? uv.yx : uv.xy; - srcCol[uint( i )] = getSrcPixel( uv.x, uv.y ); - avgCol += srcCol[uint( i )]; - } - - avgCol *= 0.25f; - - float3 abscissaNum = float3( 0.0f, 0.0f, 0.0f ); - float3 abscissaDen = float3( 0.0f, 0.0f, 0.0f ); - - for( float i = 0.0f; i < 4.0f; ++i ) - { - abscissaNum += ( i - 1.5f ) * ( srcCol[uint( i )] - avgCol ); - abscissaDen += ( i - 1.5f ) * ( i - 1.5f ); - } - - const float3 abscissa = abscissaNum / abscissaDen; - const float3 ordinate = avgCol - abscissa * 1.5f; - - minEndpoint = ordinate; - maxEndpoint = ordinate + abscissa * 3.0f; -} - -/** Calculates O, H and V coefficients using SLR (Simple Linear Regression) -@param oIdx - Where to start sampling O from. Must be in range [0; 2) -@param hIdx - Where to end sampling H at. Must be in range [2; 4) -@param vIdx - Where to end sampling V at. Must be in range [2; 4) -@param cO [out] - xz in range [0; 64) y in range [0; 128) -@param cH [out] - xz in range [0; 64) y in range [0; 128) -@param cV [out] - xz in range [0; 64) y in range [0; 128) -*/ -void getCoeffs( const uint2 oIdx, const uint hIdx, const uint vIdx, out float3 cO, out float3 cH, - out float3 cV ) -{ - float3 cOx, cOy; - getCoeffSLR( false, oIdx.y, oIdx.x, hIdx, cOx, cH ); - getCoeffSLR( true, oIdx.x, oIdx.y, vIdx, cOy, cV ); - - // We have two cO produced by each SLR. Just average them together and cross fingers - cO = ( cOx + cOy ) * 0.5f; - - cH = rgbFpTo676( saturate( lerp( cO, cH, 4.0f / 3.0f ) ) ); - cV = rgbFpTo676( saturate( lerp( cO, cV, 4.0f / 3.0f ) ) ); - cO = rgbFpTo676( saturate( cO ) ); -} - -void main() -{ - // P mode is for interpolating slowly varying gradients. - // - // O is at (0,0) - // H is at (4,0) - // V is at (0,4) - // So, H and V are outside the block. - // We extrapolate the values from (0,3) and (3,0). - // - // Some gradients are not possible due to clamping, others due to us having - // only 3 endpoints instead of 4. - // For those gradients, modes other than P may be more suitable. - // - // There is an edge case though: What if we have a smooth gradient, - // but O, H and/or V happens to be an outlier? (e.g. a gradient with a bad pixel or two) - // - // To test these edge case we try several cases: - // O starts at: - // 1. (0,0) - // 2. (0,1) - // 3. (1,0) - // 4. (1,1) - // However the same can happen to H and V, thus we try (before extrapolation): - // 1. H at (3, N) -> original case - // 2. H at (2, N) -> alternate case - // 3. V at (N, 3) -> original case - // 4. V at (N, 2) -> alternate case - // - // 'N' depends on the value of O we're trying - // - // Therefore we will try 4x4 = 16 cases in case our block's border(s) are outliers - // - // One of these tries will only use O(1,1) H(2,1) V(1,2) which means a gradient - // in a 2x2 rectangle and we ignore the outside borders. This is the most distorted - // one and surely another ETC2 mode will handle this case better, but we evaluate it anyway - // - // These 16 cases are handled by 1 thread each. - - const uint2 oIdxStart = uint2( gl_LocalInvocationID.x & 0x1u, gl_LocalInvocationID.x >> 1u ); - const uint hIdxEnd = 3u - ( gl_LocalInvocationID.y & 0x1u ); - const uint vIdxEnd = 3u - ( gl_LocalInvocationID.y >> 1u ); - - float3 cO, cH, cV; - getCoeffs( oIdxStart, hIdxEnd, vIdxEnd, cO, cH, cV ); - - const float err = calcErrorPMode( cO, cH, cV ); - const uint thisThreadLocalIdx = gl_LocalInvocationID.y * 4u + gl_LocalInvocationID.x; - g_bestCandidates[thisThreadLocalIdx] = float2( err, thisThreadLocalIdx ); - - __sharedOnlyBarrier; - - // Parallel reduction to find the thread with the best solution - const uint iterations = 4u; // 16 threads = 16 reductions = 2⁴ -> 4 iterations - for( uint i = 0u; i < iterations; ++i ) - { - const uint mask = ( 1u << ( i + 1u ) ) - 1u; - const uint idx = 1u << i; - if( ( thisThreadLocalIdx & mask ) == 0u ) - { - const uint nextThreadLocalIdx = thisThreadLocalIdx + idx; - const float thisError = g_bestCandidates[thisThreadLocalIdx].x; - const float nextError = g_bestCandidates[nextThreadLocalIdx].x; - if( nextError < thisError ) - { - g_bestCandidates[thisThreadLocalIdx] = - float2( nextError, g_bestCandidates[nextThreadLocalIdx].y ); - } - } - __sharedOnlyBarrier; - } - - if( thisThreadLocalIdx == uint( g_bestCandidates[0u].y ) ) - { - // This thread is the winner! Save the result - const uint2 dstUV = ( gl_WorkGroupID.xy << 1u ) + - uint2( gl_LocalInvocationID.z & 0x01u, gl_LocalInvocationID.z >> 1u ); - imageStore( dstError, int2( dstUV ), float4( err, 0.0f, 0.0f, 0.0f ) ); - - etc2_planar_mode_write( cO, cH, cV ); - } -} diff --git a/bin/Data/etc2_rgb_selector.glsl b/bin/Data/etc2_rgb_selector.glsl deleted file mode 100644 index 22d9fd8..0000000 --- a/bin/Data/etc2_rgb_selector.glsl +++ /dev/null @@ -1,71 +0,0 @@ -#version 430 core - -// RGB and Alpha components of ETC2 RGBA are computed separately. -// -// ETC2 also adds modes T and H (which we compute together) and mode P -// -// This shader will: -// 1. Select the mode with the lowest error -// 2. If not using Alpha, it will output to where P mode was stored (to save VRAM) -// 3. If using Alpha, it will also stitch the alpha and output to another texture -// -// See etc2_rgba_selector.glsl for this shader performing stitching (defines HAS_ALPHA) - -// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" - -#include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" - -layout( local_size_x = 8, // - local_size_y = 8, // - local_size_z = 1 ) in; - -layout( binding = 0 ) uniform sampler2D texErrorEtc1; -layout( binding = 1 ) uniform sampler2D texErrorTh; -layout( binding = 2 ) uniform sampler2D texErrorP; - -layout( binding = 3 ) uniform usampler2D srcEtc1; -layout( binding = 4 ) uniform usampler2D srcThModes; -#ifdef HAS_ALPHA -layout( binding = 5 ) uniform usampler2D srcPMode; -layout( binding = 6 ) uniform usampler2D srcAlpha; - -layout( rgba32ui, binding = 0 ) uniform restrict writeonly uimage2D dstTexture; -# define outputValue uint4( etcAlpha.xy, etcRgb.xy ) -#else -layout( rg32ui, binding = 0 ) uniform restrict uimage2D inOutPMode; -# define srcPMode inOutPMode -# define dstTexture inOutPMode -# define outputValue uint4( etcRgb.xy, 0u, 0u ) -#endif - -void main() -{ - const float errorEtc1 = OGRE_Load2D( texErrorEtc1, int2( gl_GlobalInvocationID.xy ), 0 ).x; - const float errorThModes = OGRE_Load2D( texErrorTh, int2( gl_GlobalInvocationID.xy ), 0 ).x; - const float errorPMode = OGRE_Load2D( texErrorP, int2( gl_GlobalInvocationID.xy ), 0 ).x; - -#ifdef HAS_ALPHA - const uint2 etcAlpha = OGRE_Load2D( srcAlpha, int2( gl_GlobalInvocationID.xy ), 0 ).xy; -#endif - - if( errorEtc1 <= errorThModes && errorEtc1 <= errorPMode ) - { - const uint2 etcRgb = OGRE_Load2D( srcEtc1, int2( gl_GlobalInvocationID.xy ), 0 ).xy; - imageStore( dstTexture, int2( gl_GlobalInvocationID.xy ), outputValue ); - } - else if( errorThModes < errorPMode ) - { - const uint2 etcRgb = OGRE_Load2D( srcThModes, int2( gl_GlobalInvocationID.xy ), 0 ).xy; - imageStore( dstTexture, int2( gl_GlobalInvocationID.xy ), outputValue ); - } - else - { -#ifdef HAS_ALPHA - const uint2 etcRgb = OGRE_Load2D( srcPMode, int2( gl_GlobalInvocationID.xy ), 0 ).xy; -#else - const uint2 etcRgb = OGRE_imageLoad2D( srcPMode, int2( gl_GlobalInvocationID.xy ) ).xy; -#endif - imageStore( dstTexture, int2( gl_GlobalInvocationID.xy ), outputValue ); - } -} diff --git a/bin/Data/etc2_rgba_stitch.glsl b/bin/Data/etc2_rgba_stitch.glsl deleted file mode 100644 index 5a068ab..0000000 --- a/bin/Data/etc2_rgba_stitch.glsl +++ /dev/null @@ -1,26 +0,0 @@ -// RGB and Alpha components of ETC2 RGBA are computed separately. -// This compute shader merely stitches them together to form the final result -// It's also used by RG11 driver to stitch two R11 into one RG11 - -#version 430 core - -// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" - -#include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" - -layout( local_size_x = 8, // - local_size_y = 8, // - local_size_z = 1 ) in; - -layout( binding = 0 ) uniform usampler2D srcRGB; -layout( binding = 1 ) uniform usampler2D srcAlpha; -layout( rgba32ui ) uniform restrict writeonly uimage2D dstTexture; - -void main() -{ - uint2 etcRgb = OGRE_Load2D( srcRGB, int2( gl_GlobalInvocationID.xy ), 0 ).xy; - uint2 etcAlpha = OGRE_Load2D( srcAlpha, int2( gl_GlobalInvocationID.xy ), 0 ).xy; - - imageStore( dstTexture, int2( gl_GlobalInvocationID.xy ), uint4( etcAlpha.xy, etcRgb.xy ) ); -} diff --git a/bin/Data/etc2_th.glsl b/bin/Data/etc2_th.glsl deleted file mode 100644 index cb9f66f..0000000 --- a/bin/Data/etc2_th.glsl +++ /dev/null @@ -1,479 +0,0 @@ -#version 430 core - -// T & H modes of ETC2 - -// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" - -#include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" - -#define FLT_MAX 340282346638528859811704183484516925440.0f - -shared uint g_srcPixelsBlock[16]; -shared float2 g_bestCandidates[120 * 8]; //.x = error; .y = threadId - -uniform sampler2D srcTex; - -layout( rg32ui, binding = 0 ) uniform restrict writeonly uimage2D dstTexture; -layout( r32f, binding = 1 ) uniform restrict writeonly image2D dstError; -layout( rg32ui, binding = 2 ) uniform restrict readonly uimage2DArray c0c1Texture; - -layout( local_size_x = 8, // - local_size_y = 120, // 15 + 14 + 13 + ... + 1 - local_size_z = 1 ) in; - -const float kDistances[8] = { // - 3.0f / 255.0f, // - 6.0f / 255.0f, // - 11.0f / 255.0f, // - 16.0f / 255.0f, // - 23.0f / 255.0f, // - 32.0f / 255.0f, // - 41.0f / 255.0f, // - 64.0f / 255.0f -}; - -/* -kTmodeEncoderR table generated with: - static const int kSigned3bit[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; - int main() - { - for( int r1_4=0;r1_4<16;++r1_4 ) - { - int R = r1_4 >> 2; - int dR = r1_4 & 0x3; - for( int Rx = 0; Rx < 8; Rx++ ) - { - for( int dRx = 0; dRx < 2; dRx++ ) - { - int Rtry = R | ( Rx << 2 ); - int dRtry = dR | ( dRx << 2 ); - if( ( Rtry + kSigned3bit[dRtry] ) < 0 || ( Rtry + kSigned3bit[dRtry] > 31 ) ) - { - R = Rtry; - dR = dRtry; - break; - } - } - } - - if( ( R + kSigned3bit[dR] ) >= 0 && ( R + kSigned3bit[dR] <= 31 ) ) - // this can't happen, should be an assert - return -1; - - printf( "%i, ", ( ( R & 0x1F ) << 3 ) | ( dR & 0x7 ) ); - printf( "\n" ); - } - - return 0; - } -*/ -const float kTmodeEncoderR[16] = { 4, 5, 6, 7, 12, 13, 14, 235, 20, 21, 242, 243, 28, 249, 250, 251 }; - -/* -kHmodeEncoderRG table generated with: - static const int kSigned3bit[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; - int main() - { - for( int r1_4 = 0; r1_4 < 16; ++r1_4 ) - { - for( int g1_4 = 0; g1_4 < 16; ++g1_4 ) - { - if( !( g1_4 & 0x1 ) ) - { - // R1 + G1a. R + [dR] must be inside [0..31]. Scanning all values. Not smart. - int R = r1_4; - int dR = g1_4 >> 1; - if( ( R + kSigned3bit[dR] ) < 0 || ( R + kSigned3bit[dR] > 31 ) ) - R |= ( 1 << 4 ); - - if( ( R + kSigned3bit[dR] ) < 0 || ( R + kSigned3bit[dR] > 31 ) ) - return -1; // wtf? - - printf( "%i, ", ( ( R & 0x1F ) << 3 ) | ( dR & 0x7 ) ); - } - } - } - printf( "\n" ); - return 0; - } -*/ -const float kHmodeEncoderRG[128] = // - { 0, 1, 2, 3, 132, 133, 134, 135, 8, 9, 10, 11, 140, 141, 142, 15, 16, 17, 18, - 19, 148, 149, 22, 23, 24, 25, 26, 27, 156, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127 }; - -/* -kHmodeEncoderGB table generated with: - static const int kSigned3bit[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; - #define BITS( byteval, lowbit, highbit ) \ - ( ( ( byteval ) >> ( lowbit ) ) & ( ( 1 << ( ( highbit ) - ( lowbit ) + 1 ) ) - 1 ) ) - - #define BIT( byteval, bit ) ( ( ( byteval ) >> ( bit ) ) & 0x1 ) - - int main() - { - for( int g1_4 = 0; g1_4 < 2; ++g1_4 ) - { - for( int b1_4 = 0; b1_4 < 16; ++b1_4 ) - { - if( !( b1_4 & 0x1 ) ) - { - // G1b + B1a + B1b[2 msb]. G + dG must be outside the range. - int G = ( g1_4 & 0x1 ) << 1; - G |= BIT( b1_4, 3 ); - int dG = BITS( b1_4, 1, 2 ); - for( int Gx = 0; Gx < 8; Gx++ ) - { - for( int dGx = 0; dGx < 2; dGx++ ) - { - int Gtry = G | ( Gx << 2 ); - int dGtry = dG | ( dGx << 2 ); - if( ( Gtry + kSigned3bit[dGtry] ) < 0 || ( Gtry + kSigned3bit[dGtry] > 31 ) ) - { - G = Gtry; - dG = dGtry; - break; - } - } - } - - if( ( G + kSigned3bit[dG] ) >= 0 && ( G + kSigned3bit[dG] <= 31 ) ) - return -1; // wtf? - - printf( "%i, ", ( ( G & 0x1F ) << 3 ) | ( dG & 0x7 ) ); - } - } - } - - printf( "\n" ); - return 0; - } -*/ -const float kHmodeEncoderGB[16] = // - { 4, 5, 6, 7, 12, 13, 14, 235, 20, 21, 242, 243, 28, 249, 250, 251 }; - -/*float rgb888to444( float3 rgbValue ) -{ - rgbValue = floor( rgbValue * 15.0f / 255.0f + 0.5f ); - return rgbValue.r * 256.0f + rgbValue.g * 16.0f + rgbValue.b; -}*/ -float3 rgb888to444( uint packedRgb ) -{ - float3 rgbValue = unpackUnorm4x8( packedRgb ).xyz; - rgbValue = floor( rgbValue * 15.0f + 0.5f ); - return rgbValue; -} - -/// Quantizes 'srcValue' which is originally in 888 (full range), -/// converting it to 444 and then back to 888 (quantized) -uint quant4( const uint packedRgb ) -{ - float3 rgbValue = unpackUnorm4x8( packedRgb ).xyz; // Range [0; 1] - rgbValue = floor( rgbValue * 15.0f + 0.5f ); // Convert to 444, range [0; 15] - rgbValue = floor( rgbValue * 19.05f ); // Convert to 888, range [0; 255] - return packUnorm4x8( float4( rgbValue * ( 1.0f / 255.0f ), 1.0f ) ); -} - -uint quant4( float3 rgbValue ) -{ - rgbValue = floor( rgbValue * 15.0f / 255.0f + 0.5f ); // Convert to 444 - rgbValue = floor( rgbValue * 19.05f ); // Convert to 888 - return packUnorm4x8( float4( rgbValue * ( 1.0f / 255.0f ), 1.0f ) ); -} - -float calcError( const uint colour0, const uint colour1 ) -{ - float3 diff = unpackUnorm4x8( colour0 ).xyz - unpackUnorm4x8( colour1 ).xyz; - return dot( diff, diff ) * 65025.0f; // 65025 = 255 * 255 -} - -/// Performs: -/// packedRgb = saturate( packedRgb + value ); -/// assuming 'value' is in range [0; 1] -uint addSat( const uint packedRgb, float value ) -{ - float3 rgbValue = unpackUnorm4x8( packedRgb ).xyz; - rgbValue = saturate( rgbValue + value ); - return packUnorm4x8( float4( rgbValue, 1.0f ) ); -} - -float etc2_th_mode_calcError( const bool hMode, const uint c0, const uint c1, float distance ) -{ - uint paintColors[4]; - - if( !hMode ) - { - paintColors[0] = c0; - paintColors[1] = addSat( c1, distance ); - paintColors[2] = c1; - paintColors[3] = addSat( c1, -distance ); - } - else - { - // We don't care about swapping c0 & c1 because we're only calculating error - // and both variations produce the same result - paintColors[0] = addSat( c0, distance ); - paintColors[1] = addSat( c0, -distance ); - paintColors[2] = addSat( c1, distance ); - paintColors[3] = addSat( c1, -distance ); - } - - float errAcc = 0; - for( int k = 0; k < 16; ++k ) - { - float bestDist = FLT_MAX; - for( int idx = 0; idx < 4; ++idx ) - { - const float dist = calcError( g_srcPixelsBlock[k], paintColors[idx] ); - bestDist = min( bestDist, dist ); - } - - errAcc += bestDist; - } - - return errAcc; -} - -uint etc2_gen_header_t_mode( const uint c0, const uint c1, const uint distIdx ) -{ - // 4 bit colors - const float3 rgb0 = rgb888to444( c0 ); - const float3 rgb1 = rgb888to444( c1 ); - - const float fDistIdx = float( distIdx ); - - float4 bytes; - bytes.x = kTmodeEncoderR[uint( rgb0.x )]; - bytes.y = rgb0.y * 16.0f + rgb0.z; // G0, B0 - bytes.z = rgb1.x * 16.0f + rgb1.y; // R1, G1 - bytes.w = rgb1.z * 16.0f + floor( fDistIdx * 0.5f ) * 4.0f + 2.0f + mod( fDistIdx, 2.0f ); - // bytes.w = rgb1.z * 16.0f | ( ( distIdx >> 1u ) << 2u ) | ( 1u << 1u ) | ( distIdx & 0x1u ); - - return packUnorm4x8( bytes * ( 1.0f / 255.0f ) ); -} - -uint etc2_gen_header_h_mode( const uint colour0, const uint colour1, const uint distIdx, - out bool bShouldSwap ) -{ - uint c0, c1; - // Note: if c0 == c1, no big deal because H is not the best choice of mode - if( ( distIdx & 0x01u ) != 0u ) - { - c0 = max( colour0, colour1 ); - c1 = min( colour0, colour1 ); - bShouldSwap = true; - } - else - { - c0 = min( colour0, colour1 ); - c1 = max( colour0, colour1 ); - } - - bShouldSwap = c0 != colour0; - - // 4 bit colors - const float3 rgb0 = rgb888to444( c0 ); - const float3 rgb1 = rgb888to444( c1 ); - - const float fDistIdx = float( distIdx ); - - float4 bytes; - // R0 (4 bits) + G0 (3 bits msb) - bytes.x = kHmodeEncoderRG[uint( rgb0.x * 8.0f + floor( rgb0.y * 0.5f ) )]; - // G0 (1 bit lsb) + B0 (3 bits msb) - bytes.y = kHmodeEncoderGB[uint( mod( rgb0.y, 2.0f ) * 8.0f + floor( rgb0.z * 0.5f ) )]; - // B0 (1 bit lsb) + R1 + G1 (3 bits msb) - bytes.z = mod( rgb0.z, 2.0f ) * 128.0f + rgb1.x * 8.0f + floor( rgb1.y * 0.5f ); - // G1 (1 bit lsb) + B1 + distance (2 bits msb, the 3rd one was implicit in c0 < c1 order) - bytes.w = mod( rgb1.g, 2.0f ) * 128.0f + rgb1.z * 8.0f + 2.0f; - bytes.w += mod( floor( fDistIdx * 0.5f ), 2.0f ) + floor( fDistIdx * ( 1.0f / 4.0f ) ) * 4.0f; - // bytes.w = ( rgb1.g & 0x1 ) << 7 | rgb1.z << 3 | 0x2 | - // ( ( distIdx >> 1u ) & 0x01 ) | ( distIdx & 0x04 ); - - return packUnorm4x8( bytes * ( 1.0f / 255.0f ) ); -} - -void etc2_th_mode_write( const bool hMode, uint c0, uint c1, float distance, uint distIdx ) -{ - uint paintColors[4]; - - uint2 outputBytes; - - if( !hMode ) - { - outputBytes.x = etc2_gen_header_t_mode( c0, c1, distIdx ); - - paintColors[0] = c0; - paintColors[1] = addSat( c1, distance ); - paintColors[2] = c1; - paintColors[3] = addSat( c1, -distance ); - } - else - { - bool bShouldSwap; - outputBytes.x = etc2_gen_header_h_mode( c0, c1, distIdx, bShouldSwap ); - - if( bShouldSwap ) - { - // swap( c0, c1 ) - const uint tmp = c0; - c0 = c1; - c1 = tmp; - } - - paintColors[0] = addSat( c0, distance ); - paintColors[1] = addSat( c0, -distance ); - paintColors[2] = addSat( c1, distance ); - paintColors[3] = addSat( c1, -distance ); - } - - outputBytes.y = 0u; - - for( uint k = 0u; k < 16u; ++k ) - { - float bestDist = FLT_MAX; - uint bestIdx = 0u; - - for( uint idx = 0u; idx < 4u; ++idx ) - { - const float dist = calcError( g_srcPixelsBlock[k], paintColors[idx] ); - if( dist < bestDist ) - { - bestDist = dist; - bestIdx = idx; - } - } - - // When k < 8 write bestIdx to region bits [8; 16) and [24; 32) - // When k >= 8 write bestIdx to region bits [0; 8) and [16; 24) - const uint bitStart0 = k < 8 ? 8u : 0u; - const uint bitStart1 = k < 8 ? 24u : 16u; - outputBytes.y |= ( ( ( bestIdx & 0x2u ) != 0u ? 1u : 0u ) << ( k & 0x7u ) ) << bitStart0; - outputBytes.y |= ( ( bestIdx & 0x1u ) << ( k & 0x7u ) ) << bitStart1; - } - - const uint2 dstUV = gl_WorkGroupID.xy; - imageStore( dstTexture, int2( dstUV ), uint4( outputBytes.xy, 0u, 0u ) ); -} - -void main() -{ - if( gl_LocalInvocationIndex < 16u ) - { - const uint2 pixelsToLoadBase = gl_WorkGroupID.xy << 2u; - uint2 pixelsToLoad = pixelsToLoadBase; - // Note ETC2 wants the src pixels transposed! - pixelsToLoad.x += gl_LocalInvocationIndex >> 2u; //+= threadId / 4 - pixelsToLoad.y += gl_LocalInvocationIndex & 0x03u; //+= threadId % 4 - const float3 srcPixels0 = OGRE_Load2D( srcTex, int2( pixelsToLoad ), 0 ).xyz; - g_srcPixelsBlock[gl_LocalInvocationIndex] = packUnorm4x8( float4( srcPixels0, 1.0f ) ); - } - - __sharedOnlyBarrier; - - // We have 120 potential pairs of colour candidates (some of these candidates may repeat) - // ETC2 has 8 distance modes (3 bits) for each pair (should have high thread convergence) - // - // So we assign 1 thread to each - const uint distIdx = gl_LocalInvocationID.x; - - const uint2 c0c1 = - OGRE_imageLoad2DArray( c0c1Texture, uint3( gl_WorkGroupID.xy, gl_LocalInvocationID.y ) ).xy; - const uint c0 = c0c1.x; - const uint c1 = c0c1.y; - - float minErr = FLT_MAX; - uint bestC0 = 0u; - uint bestC1 = 0u; - bool bestModeIsH; - - float err; - - const float distance = kDistances[distIdx]; - - // T modes (swapping c0 / c1 makes produces different result) - err = etc2_th_mode_calcError( false, c0, c1, distance ); - if( err < minErr ) - { - minErr = err; - bestC0 = c0; - bestC1 = c1; - bestModeIsH = false; - } - - err = etc2_th_mode_calcError( false, c1, c0, distance ); - if( err < minErr ) - { - minErr = err; - bestC0 = c1; - bestC1 = c0; - bestModeIsH = false; - } - - // H mode (swapping c0 / c1 is pointless, and is used in encoding to increase 1 bit) - err = etc2_th_mode_calcError( true, c0, c1, distance ); - if( err < minErr ) - { - minErr = err; - bestC0 = c0; - bestC1 = c1; - bestModeIsH = true; - } - - g_bestCandidates[gl_LocalInvocationIndex] = float2( minErr, gl_LocalInvocationIndex ); - - __sharedOnlyBarrier; - -#if 1 - // Parallel reduction to find the thread with the best solution - // Because 960 != 1024, the last few operations on the last threads will repeat a bit. - // However we don't care because the minimum of 2 values will always be the same. - const uint iterations = 10u; // 960 threads = 960 reductions <= 2¹⁰ -> 10 iterations - for( uint i = 0u; i < iterations; ++i ) - { - const uint mask = ( 1u << ( i + 1u ) ) - 1u; - const uint idx = 1u << i; - if( ( gl_LocalInvocationIndex & mask ) == 0u ) - { - // nextThreadId can overflow (off by 1) since we're not power of 2 - const uint thisThreadId = gl_LocalInvocationIndex; - const uint nextThreadId = min( gl_LocalInvocationIndex + idx, 960u - 1u ); - const float thisError = g_bestCandidates[thisThreadId].x; - const float nextError = g_bestCandidates[nextThreadId].x; - if( nextError < thisError ) - g_bestCandidates[thisThreadId] = float2( nextError, g_bestCandidates[nextThreadId].y ); - } - __sharedOnlyBarrier; - } -#else - // Serial reduction, for ground-truth debugging - if( gl_LocalInvocationIndex == 0u ) - { - for( uint i = 1u; i < 960u; ++i ) - { - const uint thisThreadId = 0u; - const uint nextThreadId = i; - const float thisError = g_bestCandidates[thisThreadId].x; - const float nextError = g_bestCandidates[nextThreadId].x; - if( nextError < thisError ) - g_bestCandidates[thisThreadId] = float2( nextError, nextThreadId ); - } - } - - __sharedOnlyBarrier; -#endif - - if( gl_LocalInvocationIndex == uint( g_bestCandidates[0].y ) ) - { - // This thread is the winner! Save the result - etc2_th_mode_write( bestModeIsH, bestC0, bestC1, kDistances[distIdx], distIdx ); - - const uint2 dstUV = gl_WorkGroupID.xy; - imageStore( dstError, int2( dstUV ), float4( g_bestCandidates[0].x, 0.0f, 0.0f, 0.0f ) ); - } -} diff --git a/bin/Data/etc2_th_find_best_c0c1_k_means.glsl b/bin/Data/etc2_th_find_best_c0c1_k_means.glsl deleted file mode 100644 index 4a35b22..0000000 --- a/bin/Data/etc2_th_find_best_c0c1_k_means.glsl +++ /dev/null @@ -1,201 +0,0 @@ -#version 430 core - -// T & H modes of ETC2 - -// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" - -#include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" - -uniform sampler2D srcTex; - -layout( rg32ui, binding = 0 ) uniform restrict writeonly uimage2DArray dstTexture; - -layout( local_size_x = 120, // - local_size_y = 4, // - local_size_z = 2 ) in; - -/* -kLocalInvocationToPixIdx table generated with: - int main() - { - for( int pix1 = 0; pix1 < 15; pix1++ ) - { - for( int pix2 = pix1 + 1; pix2 < 16; pix2++ ) - printf( "uint2( %iu, %iu ), ", pix1, pix2 ); - } - printf( "\n" ); - return 0; - } -*/ -const uint2 kLocalInvocationToPixIdx[120] = { - uint2( 0u, 1u ), uint2( 0u, 2u ), uint2( 0u, 3u ), uint2( 0u, 4u ), uint2( 0u, 5u ), - uint2( 0u, 6u ), uint2( 0u, 7u ), uint2( 0u, 8u ), uint2( 0u, 9u ), uint2( 0u, 10u ), - uint2( 0u, 11u ), uint2( 0u, 12u ), uint2( 0u, 13u ), uint2( 0u, 14u ), uint2( 0u, 15u ), - uint2( 1u, 2u ), uint2( 1u, 3u ), uint2( 1u, 4u ), uint2( 1u, 5u ), uint2( 1u, 6u ), - uint2( 1u, 7u ), uint2( 1u, 8u ), uint2( 1u, 9u ), uint2( 1u, 10u ), uint2( 1u, 11u ), - uint2( 1u, 12u ), uint2( 1u, 13u ), uint2( 1u, 14u ), uint2( 1u, 15u ), uint2( 2u, 3u ), - uint2( 2u, 4u ), uint2( 2u, 5u ), uint2( 2u, 6u ), uint2( 2u, 7u ), uint2( 2u, 8u ), - uint2( 2u, 9u ), uint2( 2u, 10u ), uint2( 2u, 11u ), uint2( 2u, 12u ), uint2( 2u, 13u ), - uint2( 2u, 14u ), uint2( 2u, 15u ), uint2( 3u, 4u ), uint2( 3u, 5u ), uint2( 3u, 6u ), - uint2( 3u, 7u ), uint2( 3u, 8u ), uint2( 3u, 9u ), uint2( 3u, 10u ), uint2( 3u, 11u ), - uint2( 3u, 12u ), uint2( 3u, 13u ), uint2( 3u, 14u ), uint2( 3u, 15u ), uint2( 4u, 5u ), - uint2( 4u, 6u ), uint2( 4u, 7u ), uint2( 4u, 8u ), uint2( 4u, 9u ), uint2( 4u, 10u ), - uint2( 4u, 11u ), uint2( 4u, 12u ), uint2( 4u, 13u ), uint2( 4u, 14u ), uint2( 4u, 15u ), - uint2( 5u, 6u ), uint2( 5u, 7u ), uint2( 5u, 8u ), uint2( 5u, 9u ), uint2( 5u, 10u ), - uint2( 5u, 11u ), uint2( 5u, 12u ), uint2( 5u, 13u ), uint2( 5u, 14u ), uint2( 5u, 15u ), - uint2( 6u, 7u ), uint2( 6u, 8u ), uint2( 6u, 9u ), uint2( 6u, 10u ), uint2( 6u, 11u ), - uint2( 6u, 12u ), uint2( 6u, 13u ), uint2( 6u, 14u ), uint2( 6u, 15u ), uint2( 7u, 8u ), - uint2( 7u, 9u ), uint2( 7u, 10u ), uint2( 7u, 11u ), uint2( 7u, 12u ), uint2( 7u, 13u ), - uint2( 7u, 14u ), uint2( 7u, 15u ), uint2( 8u, 9u ), uint2( 8u, 10u ), uint2( 8u, 11u ), - uint2( 8u, 12u ), uint2( 8u, 13u ), uint2( 8u, 14u ), uint2( 8u, 15u ), uint2( 9u, 10u ), - uint2( 9u, 11u ), uint2( 9u, 12u ), uint2( 9u, 13u ), uint2( 9u, 14u ), uint2( 9u, 15u ), - uint2( 10u, 11u ), uint2( 10u, 12u ), uint2( 10u, 13u ), uint2( 10u, 14u ), uint2( 10u, 15u ), - uint2( 11u, 12u ), uint2( 11u, 13u ), uint2( 11u, 14u ), uint2( 11u, 15u ), uint2( 12u, 13u ), - uint2( 12u, 14u ), uint2( 12u, 15u ), uint2( 13u, 14u ), uint2( 13u, 15u ), uint2( 14u, 15u ) -}; - -float3 getSrcPixel( uint idx ) -{ - const uint2 pixelsToLoadBase = gl_GlobalInvocationID.yz << 2u; - uint2 pixelsToLoad = pixelsToLoadBase; - // Note ETC2 wants the src pixels transposed! - pixelsToLoad.x += idx >> 2u; //+= threadId / 4 - pixelsToLoad.y += idx & 0x03u; //+= threadId % 4 - const float3 srcPixels0 = OGRE_Load2D( srcTex, int2( pixelsToLoad ), 0 ).xyz; - return srcPixels0; -} - -/// Quantizes 'srcValue' which is originally in 888 (full range), -/// converting it to 444 and then back to 888 (quantized) -uint quant4( const uint packedRgb ) -{ - float3 rgbValue = unpackUnorm4x8( packedRgb ).xyz; // Range [0; 1] - rgbValue = floor( rgbValue * 15.0f + 0.5f ); // Convert to 444, range [0; 15] - rgbValue = floor( rgbValue * 19.05f ); // Convert to 888, range [0; 255] - return packUnorm4x8( float4( rgbValue * ( 1.0f / 255.0f ), 1.0f ) ); -} - -uint quant4( float3 rgbValue ) -{ - rgbValue = floor( rgbValue * 15.0f / 255.0f + 0.5f ); // Convert to 444 - rgbValue = floor( rgbValue * 19.05f ); // Convert to 888 - return packUnorm4x8( float4( rgbValue * ( 1.0f / 255.0f ), 1.0f ) ); -} - -float calcError( const uint colour0, const uint colour1 ) -{ - float3 diff = unpackUnorm4x8( colour0 ).xyz - unpackUnorm4x8( colour1 ).xyz; - return dot( diff, diff ) * 65025.0f; // 65025 = 255 * 255 -} - -float calcError( const uint colour0, const float3 colour1 ) -{ - float3 diff = unpackUnorm4x8( colour0 ).xyz - colour1.xyz; - return dot( diff, diff ) * 65025.0f; // 65025 = 255 * 255 -} - -void block_main_colors_find( out uint outC0, out uint outC1, uint c0, uint c1 ) -{ - const int kMaxIterations = 20; - - bool bestMatchFound = false; - - // k-means complexity is O(n^(d.k+1) log n) - // In this case, n = 16, k = 2, d = 3 so 20 loops - - for( int iter = 0; iter < kMaxIterations && !bestMatchFound; ++iter ) - { - int cluster0_cnt = 0, cluster1_cnt = 0; - int cluster0[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - int cluster1[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - float maxDist0 = 0, maxDist1 = 0; - - // k-means assignment step - for( int k = 0; k < 16; ++k ) - { - const float dist0 = calcError( c0, getSrcPixel( k ) ); - const float dist1 = calcError( c1, getSrcPixel( k ) ); - if( dist0 <= dist1 ) - { - cluster0[cluster0_cnt++] = k; - maxDist0 = max( dist0, maxDist0 ); - } - else - { - cluster1[cluster1_cnt++] = k; - maxDist1 = max( dist1, maxDist1 ); - } - } - - // k-means failed - if( cluster0_cnt == 0 || cluster1_cnt == 0 ) - { - // Actually we did not find the best match. But set this flag to abort - // the loop and keep on going with the original colours (using 'break' - // makes compilers go crazy) - bestMatchFound = true; - } - else - { - float3 rgb0 = float3( 0, 0, 0 ); - float3 rgb1 = float3( 0, 0, 0 ); - - // k-means update step - for( int k = 0; k < cluster0_cnt; ++k ) - rgb0 += getSrcPixel( cluster0[k] ); - - for( int k = 0; k < cluster1_cnt; ++k ) - rgb1 += getSrcPixel( cluster1[k] ); - - rgb0 = floor( rgb0 * ( 255.0f / cluster0_cnt ) + 0.5f ); - rgb1 = floor( rgb1 * ( 255.0f / cluster1_cnt ) + 0.5f ); - - const uint newC0 = quant4( rgb0 ); - const uint newC1 = quant4( rgb1 ); - if( newC0 == c0 && newC1 == c1 ) - { - bestMatchFound = true; - } - else - { - if( newC0 != newC1 ) - { - c0 = newC0; - c1 = newC1; - } - else if( calcError( newC0, c0 ) > calcError( newC1, c1 ) ) - { - c0 = newC0; - } - else - { - c1 = newC1; - } - } - } - } - - outC0 = c0; - outC1 = c1; -} - -void main() -{ - const uint pix0 = kLocalInvocationToPixIdx[gl_LocalInvocationID.x].x; - const uint pix1 = kLocalInvocationToPixIdx[gl_LocalInvocationID.x].y; - - uint c0 = quant4( getSrcPixel( pix0 ) * 255.0f ); - uint c1 = quant4( getSrcPixel( pix1 ) * 255.0f ); - - if( c0 != c1 ) - { - uint newC0, newC1; - block_main_colors_find( newC0, newC1, c0, c1 ); - c0 = newC0; - c1 = newC1; - } - - const uint2 dstUV = gl_GlobalInvocationID.yz; - imageStore( dstTexture, int3( dstUV, gl_LocalInvocationID.x ), uint4( c0, c1, 0u, 0u ) ); -} diff --git a/bin/Data/test_pic.png b/bin/Data/test_pic.png deleted file mode 100755 index ddee1b6..0000000 Binary files a/bin/Data/test_pic.png and /dev/null differ diff --git a/build_Visual_Studio_16_2019_x64.bat b/build_Visual_Studio_16_2019_x64.bat deleted file mode 100644 index 30baed6..0000000 --- a/build_Visual_Studio_16_2019_x64.bat +++ /dev/null @@ -1,36 +0,0 @@ - -@echo off -SETLOCAL - -set GENERATOR="Visual Studio 16 2019" -set PLATFORM=x64 - -set CMAKE_BIN_x86="C:\Program Files (x86)\CMake\bin\cmake.exe" -set CMAKE_BIN_x64="C:\Program Files\CMake\bin\cmake.exe" -IF EXIST %CMAKE_BIN_x64% ( - echo CMake 64-bit detected - set CMAKE_BIN=%CMAKE_BIN_x64% -) ELSE ( - IF EXIST %CMAKE_BIN_x86% ( - echo CMake 32-bit detected - set CMAKE_BIN=%CMAKE_BIN_x86% - ) ELSE ( - echo Cannot detect either %CMAKE_BIN_x86% or - echo %CMAKE_BIN_x64% make sure CMake is installed - EXIT /B 1 - ) -) -echo Using CMake at %CMAKE_BIN% - -mkdir build -cd build -echo --- Building betsy --- -%CMAKE_BIN% -G %GENERATOR% -A %PLATFORM% .. -%CMAKE_BIN% --build . --config Debug -%CMAKE_BIN% --build . --target install --config Debug -%CMAKE_BIN% --build . --config Release -%CMAKE_BIN% --build . --target install --config Release - -echo Done! - -ENDLOCAL \ No newline at end of file diff --git a/cmake/Bootstrap.cmake b/cmake/Bootstrap.cmake new file mode 100644 index 0000000..feda9db --- /dev/null +++ b/cmake/Bootstrap.cmake @@ -0,0 +1,3 @@ +macro( add_recursive dir retVal ) + file( GLOB_RECURSE ${retVal} FOLLOW_SYMLINKS ${dir}/*.h ${dir}/*.cpp ${dir}/*.c ${dir}/*.cc ${dir}/*.inl ) +endmacro() diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt new file mode 100644 index 0000000..16aa223 --- /dev/null +++ b/contrib/CMakeLists.txt @@ -0,0 +1,4 @@ +set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) +set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) +set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) +add_subdirectory(glfw) \ No newline at end of file diff --git a/contrib/glfw b/contrib/glfw new file mode 160000 index 0000000..814b792 --- /dev/null +++ b/contrib/glfw @@ -0,0 +1 @@ +Subproject commit 814b7929c5add4b0541ccad26fb81f28b71dc4d8 diff --git a/contrib/gli b/contrib/gli new file mode 160000 index 0000000..779b99a --- /dev/null +++ b/contrib/gli @@ -0,0 +1 @@ +Subproject commit 779b99ac6656e4d30c3b24e96e0136a59649a869 diff --git a/contrib/stb b/contrib/stb new file mode 160000 index 0000000..af1a5bc --- /dev/null +++ b/contrib/stb @@ -0,0 +1 @@ +Subproject commit af1a5bc352164740c1cc1354942b1c6b72eacb8a diff --git a/data/bricks.jpg b/data/bricks.jpg new file mode 100644 index 0000000..3583508 Binary files /dev/null and b/data/bricks.jpg differ diff --git a/data/bricks_nrm.jpg b/data/bricks_nrm.jpg new file mode 100644 index 0000000..aa6643d Binary files /dev/null and b/data/bricks_nrm.jpg differ diff --git a/Docs/assets/GcnOccupancy.png b/docs/assets/GcnOccupancy.png similarity index 100% rename from Docs/assets/GcnOccupancy.png rename to docs/assets/GcnOccupancy.png diff --git a/Docs/assets/etc1_subblocks.png b/docs/assets/etc1_subblocks.png similarity index 100% rename from Docs/assets/etc1_subblocks.png rename to docs/assets/etc1_subblocks.png diff --git a/Docs/assets/linear-regression.png b/docs/assets/linear-regression.png similarity index 100% rename from Docs/assets/linear-regression.png rename to docs/assets/linear-regression.png diff --git a/Docs/technical_doc_advanced.md b/docs/technical_doc_advanced.md similarity index 100% rename from Docs/technical_doc_advanced.md rename to docs/technical_doc_advanced.md diff --git a/include/CmdLineParams.h b/include/CmdLineParams.h deleted file mode 100644 index 57b8586..0000000 --- a/include/CmdLineParams.h +++ /dev/null @@ -1,36 +0,0 @@ - -#pragma once - -#include -#include - -namespace Codec -{ - enum Codec - { - etc1, - etc2_rgba_etc1, - etc2_rgb, - etc2_rgba, - eac_r11, - eac_rg11, - bc1, - bc3, - bc4, - bc4_snorm, - bc5, - bc5_snorm, - bc6h - }; -} - -struct CmdLineParams -{ - uint8_t quality; - bool dither; - bool usingRenderDoc; - Codec::Codec codec; - std::string filename[2]; - - CmdLineParams() : quality( 0 ), dither( false ), usingRenderDoc( false ), codec( Codec::etc1 ) {} -}; diff --git a/include/CmdLineParamsEnum.h b/include/CmdLineParamsEnum.h deleted file mode 100644 index 835f763..0000000 --- a/include/CmdLineParamsEnum.h +++ /dev/null @@ -1,63 +0,0 @@ -// EnumIterator.py AUTOGENERATED FILE. ** DO NOT EDIT ** Run "python2 Run.py" -#pragma once - -#include -#include -#include "CmdLineParams.h" -namespace Codec -{ -class CodecEnum -{ -public: - struct EnumData - { - Codec enumValue; - std::string enumString; - - EnumData( Codec _enumValue, const std::string &_enumString ); - }; - -private: - static EnumData mSortedByEnum[13+1]; - static EnumData mSortedByString[13+1]; - - struct OrderByEnum; - struct OrderByStr; - -public: - static const EnumData* begin() { return &mSortedByEnum[0]; } - static const EnumData* end() { return &mSortedByEnum[13]; } - - /// Returns the min value reached by this enumerator - static int minValue(); - - /// Returns the max value reached by this enumerator - static int maxValue(); - - /// Returns the number of elements in the enum - static size_t count(); - - /// Returns true if integer value can be represented by the enum. - /// O(1) if enum is contiguous, O(log N) otherwise - static bool isValidValue( int value ); - - /// Only available if the enum is contiguous. Otherwise it's a compiler error - /// It's O(1) - /// Returns empty string if value is not a valid enum value - static const std::string& get( Codec value ); - - /// Always available. O(1) if enum is contiguous, O(log N) otherwise - /// Returns empty string if value is not a valid enum value - static const std::string& find( Codec value ); - - /// Will find the enumerator value based on its string representation. - /// Returns false if the string doesn't match any value, leaving the output - /// 'outValue' untouched (i.e. left uninitialized). - static bool find( const std::string &strValue, Codec &outValue ); - - /// Will find the enumerator value based on its string representation. - /// Throws if the string doesn't match any value. - static Codec find( const std::string &strValue ); -}; -} - diff --git a/include/GL/gl3w.h b/include/GL/gl3w.h index 57c3905..01eab90 100644 --- a/include/GL/gl3w.h +++ b/include/GL/gl3w.h @@ -34,1576 +34,1579 @@ #include #ifndef __gl_h_ -#define __gl_h_ +# define __gl_h_ #endif #ifdef __cplusplus extern "C" { #endif -typedef void (*GL3WglProc)(void); -typedef GL3WglProc (*GL3WGetProcAddressProc)(const char *proc); +typedef void ( *GL3WglProc )( void ); +typedef GL3WglProc ( *GL3WGetProcAddressProc )( const char *proc ); /* gl3w api */ -int gl3wInit(void); -int gl3wInit2(GL3WGetProcAddressProc proc); -int gl3wIsSupported(int major, int minor); -GL3WglProc gl3wGetProcAddress(const char *proc); +int gl3wInit( void ); +int gl3wInit2( GL3WGetProcAddressProc proc ); +int gl3wIsSupported( int major, int minor ); +GL3WglProc gl3wGetProcAddress( const char *proc ); /* gl3w internal state */ -union GL3WProcs { +union GL3WProcs +{ GL3WglProc ptr[772]; - struct { - PFNGLACTIVESHADERPROGRAMPROC ActiveShaderProgram; - PFNGLACTIVETEXTUREPROC ActiveTexture; - PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC ApplyFramebufferAttachmentCMAAINTEL; - PFNGLATTACHSHADERPROC AttachShader; - PFNGLBEGINCONDITIONALRENDERPROC BeginConditionalRender; - PFNGLBEGINPERFMONITORAMDPROC BeginPerfMonitorAMD; - PFNGLBEGINPERFQUERYINTELPROC BeginPerfQueryINTEL; - PFNGLBEGINQUERYPROC BeginQuery; - PFNGLBEGINQUERYINDEXEDPROC BeginQueryIndexed; - PFNGLBEGINTRANSFORMFEEDBACKPROC BeginTransformFeedback; - PFNGLBINDATTRIBLOCATIONPROC BindAttribLocation; - PFNGLBINDBUFFERPROC BindBuffer; - PFNGLBINDBUFFERBASEPROC BindBufferBase; - PFNGLBINDBUFFERRANGEPROC BindBufferRange; - PFNGLBINDBUFFERSBASEPROC BindBuffersBase; - PFNGLBINDBUFFERSRANGEPROC BindBuffersRange; - PFNGLBINDFRAGDATALOCATIONPROC BindFragDataLocation; - PFNGLBINDFRAGDATALOCATIONINDEXEDPROC BindFragDataLocationIndexed; - PFNGLBINDFRAMEBUFFERPROC BindFramebuffer; - PFNGLBINDIMAGETEXTUREPROC BindImageTexture; - PFNGLBINDIMAGETEXTURESPROC BindImageTextures; - PFNGLBINDPROGRAMPIPELINEPROC BindProgramPipeline; - PFNGLBINDRENDERBUFFERPROC BindRenderbuffer; - PFNGLBINDSAMPLERPROC BindSampler; - PFNGLBINDSAMPLERSPROC BindSamplers; - PFNGLBINDTEXTUREPROC BindTexture; - PFNGLBINDTEXTUREUNITPROC BindTextureUnit; - PFNGLBINDTEXTURESPROC BindTextures; - PFNGLBINDTRANSFORMFEEDBACKPROC BindTransformFeedback; - PFNGLBINDVERTEXARRAYPROC BindVertexArray; - PFNGLBINDVERTEXBUFFERPROC BindVertexBuffer; - PFNGLBINDVERTEXBUFFERSPROC BindVertexBuffers; - PFNGLBLENDBARRIERKHRPROC BlendBarrierKHR; - PFNGLBLENDCOLORPROC BlendColor; - PFNGLBLENDEQUATIONPROC BlendEquation; - PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate; - PFNGLBLENDEQUATIONSEPARATEIPROC BlendEquationSeparatei; - PFNGLBLENDEQUATIONSEPARATEIARBPROC BlendEquationSeparateiARB; - PFNGLBLENDEQUATIONIPROC BlendEquationi; - PFNGLBLENDEQUATIONIARBPROC BlendEquationiARB; - PFNGLBLENDFUNCPROC BlendFunc; - PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate; - PFNGLBLENDFUNCSEPARATEIPROC BlendFuncSeparatei; - PFNGLBLENDFUNCSEPARATEIARBPROC BlendFuncSeparateiARB; - PFNGLBLENDFUNCIPROC BlendFunci; - PFNGLBLENDFUNCIARBPROC BlendFunciARB; - PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer; - PFNGLBLITNAMEDFRAMEBUFFERPROC BlitNamedFramebuffer; - PFNGLBUFFERDATAPROC BufferData; - PFNGLBUFFERPAGECOMMITMENTARBPROC BufferPageCommitmentARB; - PFNGLBUFFERSTORAGEPROC BufferStorage; - PFNGLBUFFERSUBDATAPROC BufferSubData; - PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus; - PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC CheckNamedFramebufferStatus; - PFNGLCLAMPCOLORPROC ClampColor; - PFNGLCLEARPROC Clear; - PFNGLCLEARBUFFERDATAPROC ClearBufferData; - PFNGLCLEARBUFFERSUBDATAPROC ClearBufferSubData; - PFNGLCLEARBUFFERFIPROC ClearBufferfi; - PFNGLCLEARBUFFERFVPROC ClearBufferfv; - PFNGLCLEARBUFFERIVPROC ClearBufferiv; - PFNGLCLEARBUFFERUIVPROC ClearBufferuiv; - PFNGLCLEARCOLORPROC ClearColor; - PFNGLCLEARDEPTHPROC ClearDepth; - PFNGLCLEARDEPTHFPROC ClearDepthf; - PFNGLCLEARNAMEDBUFFERDATAPROC ClearNamedBufferData; - PFNGLCLEARNAMEDBUFFERSUBDATAPROC ClearNamedBufferSubData; - PFNGLCLEARNAMEDFRAMEBUFFERFIPROC ClearNamedFramebufferfi; - PFNGLCLEARNAMEDFRAMEBUFFERFVPROC ClearNamedFramebufferfv; - PFNGLCLEARNAMEDFRAMEBUFFERIVPROC ClearNamedFramebufferiv; - PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC ClearNamedFramebufferuiv; - PFNGLCLEARSTENCILPROC ClearStencil; - PFNGLCLEARTEXIMAGEPROC ClearTexImage; - PFNGLCLEARTEXSUBIMAGEPROC ClearTexSubImage; - PFNGLCLIENTWAITSYNCPROC ClientWaitSync; - PFNGLCLIPCONTROLPROC ClipControl; - PFNGLCOLORMASKPROC ColorMask; - PFNGLCOLORMASKIPROC ColorMaski; - PFNGLCOMPILESHADERPROC CompileShader; - PFNGLCOMPILESHADERINCLUDEARBPROC CompileShaderIncludeARB; - PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D; - PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D; - PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D; - PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D; - PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D; - PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC CompressedTextureSubImage1D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC CompressedTextureSubImage2D; - PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC CompressedTextureSubImage3D; - PFNGLCOPYBUFFERSUBDATAPROC CopyBufferSubData; - PFNGLCOPYIMAGESUBDATAPROC CopyImageSubData; - PFNGLCOPYNAMEDBUFFERSUBDATAPROC CopyNamedBufferSubData; - PFNGLCOPYTEXIMAGE1DPROC CopyTexImage1D; - PFNGLCOPYTEXIMAGE2DPROC CopyTexImage2D; - PFNGLCOPYTEXSUBIMAGE1DPROC CopyTexSubImage1D; - PFNGLCOPYTEXSUBIMAGE2DPROC CopyTexSubImage2D; - PFNGLCOPYTEXSUBIMAGE3DPROC CopyTexSubImage3D; - PFNGLCOPYTEXTURESUBIMAGE1DPROC CopyTextureSubImage1D; - PFNGLCOPYTEXTURESUBIMAGE2DPROC CopyTextureSubImage2D; - PFNGLCOPYTEXTURESUBIMAGE3DPROC CopyTextureSubImage3D; - PFNGLCREATEBUFFERSPROC CreateBuffers; - PFNGLCREATEFRAMEBUFFERSPROC CreateFramebuffers; - PFNGLCREATEPERFQUERYINTELPROC CreatePerfQueryINTEL; - PFNGLCREATEPROGRAMPROC CreateProgram; - PFNGLCREATEPROGRAMPIPELINESPROC CreateProgramPipelines; - PFNGLCREATEQUERIESPROC CreateQueries; - PFNGLCREATERENDERBUFFERSPROC CreateRenderbuffers; - PFNGLCREATESAMPLERSPROC CreateSamplers; - PFNGLCREATESHADERPROC CreateShader; - PFNGLCREATESHADERPROGRAMVPROC CreateShaderProgramv; - PFNGLCREATESYNCFROMCLEVENTARBPROC CreateSyncFromCLeventARB; - PFNGLCREATETEXTURESPROC CreateTextures; - PFNGLCREATETRANSFORMFEEDBACKSPROC CreateTransformFeedbacks; - PFNGLCREATEVERTEXARRAYSPROC CreateVertexArrays; - PFNGLCULLFACEPROC CullFace; - PFNGLDEBUGMESSAGECALLBACKPROC DebugMessageCallback; - PFNGLDEBUGMESSAGECALLBACKARBPROC DebugMessageCallbackARB; - PFNGLDEBUGMESSAGECONTROLPROC DebugMessageControl; - PFNGLDEBUGMESSAGECONTROLARBPROC DebugMessageControlARB; - PFNGLDEBUGMESSAGEINSERTPROC DebugMessageInsert; - PFNGLDEBUGMESSAGEINSERTARBPROC DebugMessageInsertARB; - PFNGLDELETEBUFFERSPROC DeleteBuffers; - PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers; - PFNGLDELETENAMEDSTRINGARBPROC DeleteNamedStringARB; - PFNGLDELETEPERFMONITORSAMDPROC DeletePerfMonitorsAMD; - PFNGLDELETEPERFQUERYINTELPROC DeletePerfQueryINTEL; - PFNGLDELETEPROGRAMPROC DeleteProgram; - PFNGLDELETEPROGRAMPIPELINESPROC DeleteProgramPipelines; - PFNGLDELETEQUERIESPROC DeleteQueries; - PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers; - PFNGLDELETESAMPLERSPROC DeleteSamplers; - PFNGLDELETESHADERPROC DeleteShader; - PFNGLDELETESYNCPROC DeleteSync; - PFNGLDELETETEXTURESPROC DeleteTextures; - PFNGLDELETETRANSFORMFEEDBACKSPROC DeleteTransformFeedbacks; - PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays; - PFNGLDEPTHFUNCPROC DepthFunc; - PFNGLDEPTHMASKPROC DepthMask; - PFNGLDEPTHRANGEPROC DepthRange; - PFNGLDEPTHRANGEARRAYVPROC DepthRangeArrayv; - PFNGLDEPTHRANGEINDEXEDPROC DepthRangeIndexed; - PFNGLDEPTHRANGEFPROC DepthRangef; - PFNGLDETACHSHADERPROC DetachShader; - PFNGLDISABLEPROC Disable; - PFNGLDISABLEVERTEXARRAYATTRIBPROC DisableVertexArrayAttrib; - PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray; - PFNGLDISABLEIPROC Disablei; - PFNGLDISPATCHCOMPUTEPROC DispatchCompute; - PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC DispatchComputeGroupSizeARB; - PFNGLDISPATCHCOMPUTEINDIRECTPROC DispatchComputeIndirect; - PFNGLDRAWARRAYSPROC DrawArrays; - PFNGLDRAWARRAYSINDIRECTPROC DrawArraysIndirect; - PFNGLDRAWARRAYSINSTANCEDPROC DrawArraysInstanced; - PFNGLDRAWARRAYSINSTANCEDARBPROC DrawArraysInstancedARB; - PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC DrawArraysInstancedBaseInstance; - PFNGLDRAWBUFFERPROC DrawBuffer; - PFNGLDRAWBUFFERSPROC DrawBuffers; - PFNGLDRAWELEMENTSPROC DrawElements; - PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex; - PFNGLDRAWELEMENTSINDIRECTPROC DrawElementsIndirect; - PFNGLDRAWELEMENTSINSTANCEDPROC DrawElementsInstanced; - PFNGLDRAWELEMENTSINSTANCEDARBPROC DrawElementsInstancedARB; - PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC DrawElementsInstancedBaseInstance; - PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC DrawElementsInstancedBaseVertex; - PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC DrawElementsInstancedBaseVertexBaseInstance; - PFNGLDRAWRANGEELEMENTSPROC DrawRangeElements; - PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC DrawRangeElementsBaseVertex; - PFNGLDRAWTRANSFORMFEEDBACKPROC DrawTransformFeedback; - PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC DrawTransformFeedbackInstanced; - PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC DrawTransformFeedbackStream; - PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC DrawTransformFeedbackStreamInstanced; - PFNGLENABLEPROC Enable; - PFNGLENABLEVERTEXARRAYATTRIBPROC EnableVertexArrayAttrib; - PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray; - PFNGLENABLEIPROC Enablei; - PFNGLENDCONDITIONALRENDERPROC EndConditionalRender; - PFNGLENDPERFMONITORAMDPROC EndPerfMonitorAMD; - PFNGLENDPERFQUERYINTELPROC EndPerfQueryINTEL; - PFNGLENDQUERYPROC EndQuery; - PFNGLENDQUERYINDEXEDPROC EndQueryIndexed; - PFNGLENDTRANSFORMFEEDBACKPROC EndTransformFeedback; - PFNGLEVALUATEDEPTHVALUESARBPROC EvaluateDepthValuesARB; - PFNGLFENCESYNCPROC FenceSync; - PFNGLFINISHPROC Finish; - PFNGLFLUSHPROC Flush; - PFNGLFLUSHMAPPEDBUFFERRANGEPROC FlushMappedBufferRange; - PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC FlushMappedNamedBufferRange; - PFNGLFRAMEBUFFERPARAMETERIPROC FramebufferParameteri; - PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer; - PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC FramebufferSampleLocationsfvARB; - PFNGLFRAMEBUFFERTEXTUREPROC FramebufferTexture; - PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D; - PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D; - PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D; - PFNGLFRAMEBUFFERTEXTUREARBPROC FramebufferTextureARB; - PFNGLFRAMEBUFFERTEXTUREFACEARBPROC FramebufferTextureFaceARB; - PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer; - PFNGLFRAMEBUFFERTEXTURELAYERARBPROC FramebufferTextureLayerARB; - PFNGLFRONTFACEPROC FrontFace; - PFNGLGENBUFFERSPROC GenBuffers; - PFNGLGENFRAMEBUFFERSPROC GenFramebuffers; - PFNGLGENPERFMONITORSAMDPROC GenPerfMonitorsAMD; - PFNGLGENPROGRAMPIPELINESPROC GenProgramPipelines; - PFNGLGENQUERIESPROC GenQueries; - PFNGLGENRENDERBUFFERSPROC GenRenderbuffers; - PFNGLGENSAMPLERSPROC GenSamplers; - PFNGLGENTEXTURESPROC GenTextures; - PFNGLGENTRANSFORMFEEDBACKSPROC GenTransformFeedbacks; - PFNGLGENVERTEXARRAYSPROC GenVertexArrays; - PFNGLGENERATEMIPMAPPROC GenerateMipmap; - PFNGLGENERATETEXTUREMIPMAPPROC GenerateTextureMipmap; - PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC GetActiveAtomicCounterBufferiv; - PFNGLGETACTIVEATTRIBPROC GetActiveAttrib; - PFNGLGETACTIVESUBROUTINENAMEPROC GetActiveSubroutineName; - PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC GetActiveSubroutineUniformName; - PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC GetActiveSubroutineUniformiv; - PFNGLGETACTIVEUNIFORMPROC GetActiveUniform; - PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC GetActiveUniformBlockName; - PFNGLGETACTIVEUNIFORMBLOCKIVPROC GetActiveUniformBlockiv; - PFNGLGETACTIVEUNIFORMNAMEPROC GetActiveUniformName; - PFNGLGETACTIVEUNIFORMSIVPROC GetActiveUniformsiv; - PFNGLGETATTACHEDSHADERSPROC GetAttachedShaders; - PFNGLGETATTRIBLOCATIONPROC GetAttribLocation; - PFNGLGETBOOLEANI_VPROC GetBooleani_v; - PFNGLGETBOOLEANVPROC GetBooleanv; - PFNGLGETBUFFERPARAMETERI64VPROC GetBufferParameteri64v; - PFNGLGETBUFFERPARAMETERIVPROC GetBufferParameteriv; - PFNGLGETBUFFERPOINTERVPROC GetBufferPointerv; - PFNGLGETBUFFERSUBDATAPROC GetBufferSubData; - PFNGLGETCOMPRESSEDTEXIMAGEPROC GetCompressedTexImage; - PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC GetCompressedTextureImage; - PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC GetCompressedTextureSubImage; - PFNGLGETDEBUGMESSAGELOGPROC GetDebugMessageLog; - PFNGLGETDEBUGMESSAGELOGARBPROC GetDebugMessageLogARB; - PFNGLGETDOUBLEI_VPROC GetDoublei_v; - PFNGLGETDOUBLEVPROC GetDoublev; - PFNGLGETERRORPROC GetError; - PFNGLGETFIRSTPERFQUERYIDINTELPROC GetFirstPerfQueryIdINTEL; - PFNGLGETFLOATI_VPROC GetFloati_v; - PFNGLGETFLOATVPROC GetFloatv; - PFNGLGETFRAGDATAINDEXPROC GetFragDataIndex; - PFNGLGETFRAGDATALOCATIONPROC GetFragDataLocation; - PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv; - PFNGLGETFRAMEBUFFERPARAMETERIVPROC GetFramebufferParameteriv; - PFNGLGETGRAPHICSRESETSTATUSPROC GetGraphicsResetStatus; - PFNGLGETGRAPHICSRESETSTATUSARBPROC GetGraphicsResetStatusARB; - PFNGLGETIMAGEHANDLEARBPROC GetImageHandleARB; - PFNGLGETINTEGER64I_VPROC GetInteger64i_v; - PFNGLGETINTEGER64VPROC GetInteger64v; - PFNGLGETINTEGERI_VPROC GetIntegeri_v; - PFNGLGETINTEGERVPROC GetIntegerv; - PFNGLGETINTERNALFORMATI64VPROC GetInternalformati64v; - PFNGLGETINTERNALFORMATIVPROC GetInternalformativ; - PFNGLGETMULTISAMPLEFVPROC GetMultisamplefv; - PFNGLGETNAMEDBUFFERPARAMETERI64VPROC GetNamedBufferParameteri64v; - PFNGLGETNAMEDBUFFERPARAMETERIVPROC GetNamedBufferParameteriv; - PFNGLGETNAMEDBUFFERPOINTERVPROC GetNamedBufferPointerv; - PFNGLGETNAMEDBUFFERSUBDATAPROC GetNamedBufferSubData; - PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetNamedFramebufferAttachmentParameteriv; - PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC GetNamedFramebufferParameteriv; - PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC GetNamedRenderbufferParameteriv; - PFNGLGETNAMEDSTRINGARBPROC GetNamedStringARB; - PFNGLGETNAMEDSTRINGIVARBPROC GetNamedStringivARB; - PFNGLGETNEXTPERFQUERYIDINTELPROC GetNextPerfQueryIdINTEL; - PFNGLGETOBJECTLABELPROC GetObjectLabel; - PFNGLGETOBJECTPTRLABELPROC GetObjectPtrLabel; - PFNGLGETPERFCOUNTERINFOINTELPROC GetPerfCounterInfoINTEL; - PFNGLGETPERFMONITORCOUNTERDATAAMDPROC GetPerfMonitorCounterDataAMD; - PFNGLGETPERFMONITORCOUNTERINFOAMDPROC GetPerfMonitorCounterInfoAMD; - PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC GetPerfMonitorCounterStringAMD; - PFNGLGETPERFMONITORCOUNTERSAMDPROC GetPerfMonitorCountersAMD; - PFNGLGETPERFMONITORGROUPSTRINGAMDPROC GetPerfMonitorGroupStringAMD; - PFNGLGETPERFMONITORGROUPSAMDPROC GetPerfMonitorGroupsAMD; - PFNGLGETPERFQUERYDATAINTELPROC GetPerfQueryDataINTEL; - PFNGLGETPERFQUERYIDBYNAMEINTELPROC GetPerfQueryIdByNameINTEL; - PFNGLGETPERFQUERYINFOINTELPROC GetPerfQueryInfoINTEL; - PFNGLGETPOINTERVPROC GetPointerv; - PFNGLGETPROGRAMBINARYPROC GetProgramBinary; - PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog; - PFNGLGETPROGRAMINTERFACEIVPROC GetProgramInterfaceiv; - PFNGLGETPROGRAMPIPELINEINFOLOGPROC GetProgramPipelineInfoLog; - PFNGLGETPROGRAMPIPELINEIVPROC GetProgramPipelineiv; - PFNGLGETPROGRAMRESOURCEINDEXPROC GetProgramResourceIndex; - PFNGLGETPROGRAMRESOURCELOCATIONPROC GetProgramResourceLocation; - PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC GetProgramResourceLocationIndex; - PFNGLGETPROGRAMRESOURCENAMEPROC GetProgramResourceName; - PFNGLGETPROGRAMRESOURCEIVPROC GetProgramResourceiv; - PFNGLGETPROGRAMSTAGEIVPROC GetProgramStageiv; - PFNGLGETPROGRAMIVPROC GetProgramiv; - PFNGLGETQUERYBUFFEROBJECTI64VPROC GetQueryBufferObjecti64v; - PFNGLGETQUERYBUFFEROBJECTIVPROC GetQueryBufferObjectiv; - PFNGLGETQUERYBUFFEROBJECTUI64VPROC GetQueryBufferObjectui64v; - PFNGLGETQUERYBUFFEROBJECTUIVPROC GetQueryBufferObjectuiv; - PFNGLGETQUERYINDEXEDIVPROC GetQueryIndexediv; - PFNGLGETQUERYOBJECTI64VPROC GetQueryObjecti64v; - PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv; - PFNGLGETQUERYOBJECTUI64VPROC GetQueryObjectui64v; - PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv; - PFNGLGETQUERYIVPROC GetQueryiv; - PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv; - PFNGLGETSAMPLERPARAMETERIIVPROC GetSamplerParameterIiv; - PFNGLGETSAMPLERPARAMETERIUIVPROC GetSamplerParameterIuiv; - PFNGLGETSAMPLERPARAMETERFVPROC GetSamplerParameterfv; - PFNGLGETSAMPLERPARAMETERIVPROC GetSamplerParameteriv; - PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog; - PFNGLGETSHADERPRECISIONFORMATPROC GetShaderPrecisionFormat; - PFNGLGETSHADERSOURCEPROC GetShaderSource; - PFNGLGETSHADERIVPROC GetShaderiv; - PFNGLGETSTRINGPROC GetString; - PFNGLGETSTRINGIPROC GetStringi; - PFNGLGETSUBROUTINEINDEXPROC GetSubroutineIndex; - PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC GetSubroutineUniformLocation; - PFNGLGETSYNCIVPROC GetSynciv; - PFNGLGETTEXIMAGEPROC GetTexImage; - PFNGLGETTEXLEVELPARAMETERFVPROC GetTexLevelParameterfv; - PFNGLGETTEXLEVELPARAMETERIVPROC GetTexLevelParameteriv; - PFNGLGETTEXPARAMETERIIVPROC GetTexParameterIiv; - PFNGLGETTEXPARAMETERIUIVPROC GetTexParameterIuiv; - PFNGLGETTEXPARAMETERFVPROC GetTexParameterfv; - PFNGLGETTEXPARAMETERIVPROC GetTexParameteriv; - PFNGLGETTEXTUREHANDLEARBPROC GetTextureHandleARB; - PFNGLGETTEXTUREIMAGEPROC GetTextureImage; - PFNGLGETTEXTURELEVELPARAMETERFVPROC GetTextureLevelParameterfv; - PFNGLGETTEXTURELEVELPARAMETERIVPROC GetTextureLevelParameteriv; - PFNGLGETTEXTUREPARAMETERIIVPROC GetTextureParameterIiv; - PFNGLGETTEXTUREPARAMETERIUIVPROC GetTextureParameterIuiv; - PFNGLGETTEXTUREPARAMETERFVPROC GetTextureParameterfv; - PFNGLGETTEXTUREPARAMETERIVPROC GetTextureParameteriv; - PFNGLGETTEXTURESAMPLERHANDLEARBPROC GetTextureSamplerHandleARB; - PFNGLGETTEXTURESUBIMAGEPROC GetTextureSubImage; - PFNGLGETTRANSFORMFEEDBACKVARYINGPROC GetTransformFeedbackVarying; - PFNGLGETTRANSFORMFEEDBACKI64_VPROC GetTransformFeedbacki64_v; - PFNGLGETTRANSFORMFEEDBACKI_VPROC GetTransformFeedbacki_v; - PFNGLGETTRANSFORMFEEDBACKIVPROC GetTransformFeedbackiv; - PFNGLGETUNIFORMBLOCKINDEXPROC GetUniformBlockIndex; - PFNGLGETUNIFORMINDICESPROC GetUniformIndices; - PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation; - PFNGLGETUNIFORMSUBROUTINEUIVPROC GetUniformSubroutineuiv; - PFNGLGETUNIFORMDVPROC GetUniformdv; - PFNGLGETUNIFORMFVPROC GetUniformfv; - PFNGLGETUNIFORMI64VARBPROC GetUniformi64vARB; - PFNGLGETUNIFORMIVPROC GetUniformiv; - PFNGLGETUNIFORMUI64VARBPROC GetUniformui64vARB; - PFNGLGETUNIFORMUIVPROC GetUniformuiv; - PFNGLGETVERTEXARRAYINDEXED64IVPROC GetVertexArrayIndexed64iv; - PFNGLGETVERTEXARRAYINDEXEDIVPROC GetVertexArrayIndexediv; - PFNGLGETVERTEXARRAYIVPROC GetVertexArrayiv; - PFNGLGETVERTEXATTRIBIIVPROC GetVertexAttribIiv; - PFNGLGETVERTEXATTRIBIUIVPROC GetVertexAttribIuiv; - PFNGLGETVERTEXATTRIBLDVPROC GetVertexAttribLdv; - PFNGLGETVERTEXATTRIBLUI64VARBPROC GetVertexAttribLui64vARB; - PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv; - PFNGLGETVERTEXATTRIBDVPROC GetVertexAttribdv; - PFNGLGETVERTEXATTRIBFVPROC GetVertexAttribfv; - PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv; - PFNGLGETNCOMPRESSEDTEXIMAGEPROC GetnCompressedTexImage; - PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC GetnCompressedTexImageARB; - PFNGLGETNTEXIMAGEPROC GetnTexImage; - PFNGLGETNTEXIMAGEARBPROC GetnTexImageARB; - PFNGLGETNUNIFORMDVPROC GetnUniformdv; - PFNGLGETNUNIFORMDVARBPROC GetnUniformdvARB; - PFNGLGETNUNIFORMFVPROC GetnUniformfv; - PFNGLGETNUNIFORMFVARBPROC GetnUniformfvARB; - PFNGLGETNUNIFORMI64VARBPROC GetnUniformi64vARB; - PFNGLGETNUNIFORMIVPROC GetnUniformiv; - PFNGLGETNUNIFORMIVARBPROC GetnUniformivARB; - PFNGLGETNUNIFORMUI64VARBPROC GetnUniformui64vARB; - PFNGLGETNUNIFORMUIVPROC GetnUniformuiv; - PFNGLGETNUNIFORMUIVARBPROC GetnUniformuivARB; - PFNGLHINTPROC Hint; - PFNGLINVALIDATEBUFFERDATAPROC InvalidateBufferData; - PFNGLINVALIDATEBUFFERSUBDATAPROC InvalidateBufferSubData; - PFNGLINVALIDATEFRAMEBUFFERPROC InvalidateFramebuffer; - PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC InvalidateNamedFramebufferData; - PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC InvalidateNamedFramebufferSubData; - PFNGLINVALIDATESUBFRAMEBUFFERPROC InvalidateSubFramebuffer; - PFNGLINVALIDATETEXIMAGEPROC InvalidateTexImage; - PFNGLINVALIDATETEXSUBIMAGEPROC InvalidateTexSubImage; - PFNGLISBUFFERPROC IsBuffer; - PFNGLISENABLEDPROC IsEnabled; - PFNGLISENABLEDIPROC IsEnabledi; - PFNGLISFRAMEBUFFERPROC IsFramebuffer; - PFNGLISIMAGEHANDLERESIDENTARBPROC IsImageHandleResidentARB; - PFNGLISNAMEDSTRINGARBPROC IsNamedStringARB; - PFNGLISPROGRAMPROC IsProgram; - PFNGLISPROGRAMPIPELINEPROC IsProgramPipeline; - PFNGLISQUERYPROC IsQuery; - PFNGLISRENDERBUFFERPROC IsRenderbuffer; - PFNGLISSAMPLERPROC IsSampler; - PFNGLISSHADERPROC IsShader; - PFNGLISSYNCPROC IsSync; - PFNGLISTEXTUREPROC IsTexture; - PFNGLISTEXTUREHANDLERESIDENTARBPROC IsTextureHandleResidentARB; - PFNGLISTRANSFORMFEEDBACKPROC IsTransformFeedback; - PFNGLISVERTEXARRAYPROC IsVertexArray; - PFNGLLINEWIDTHPROC LineWidth; - PFNGLLINKPROGRAMPROC LinkProgram; - PFNGLLOGICOPPROC LogicOp; - PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC MakeImageHandleNonResidentARB; - PFNGLMAKEIMAGEHANDLERESIDENTARBPROC MakeImageHandleResidentARB; - PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC MakeTextureHandleNonResidentARB; - PFNGLMAKETEXTUREHANDLERESIDENTARBPROC MakeTextureHandleResidentARB; - PFNGLMAPBUFFERPROC MapBuffer; - PFNGLMAPBUFFERRANGEPROC MapBufferRange; - PFNGLMAPNAMEDBUFFERPROC MapNamedBuffer; - PFNGLMAPNAMEDBUFFERRANGEPROC MapNamedBufferRange; - PFNGLMAXSHADERCOMPILERTHREADSARBPROC MaxShaderCompilerThreadsARB; - PFNGLMEMORYBARRIERPROC MemoryBarrier; - PFNGLMEMORYBARRIERBYREGIONPROC MemoryBarrierByRegion; - PFNGLMINSAMPLESHADINGPROC MinSampleShading; - PFNGLMINSAMPLESHADINGARBPROC MinSampleShadingARB; - PFNGLMULTIDRAWARRAYSPROC MultiDrawArrays; - PFNGLMULTIDRAWARRAYSINDIRECTPROC MultiDrawArraysIndirect; - PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC MultiDrawArraysIndirectCountARB; - PFNGLMULTIDRAWELEMENTSPROC MultiDrawElements; - PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC MultiDrawElementsBaseVertex; - PFNGLMULTIDRAWELEMENTSINDIRECTPROC MultiDrawElementsIndirect; - PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC MultiDrawElementsIndirectCountARB; - PFNGLNAMEDBUFFERDATAPROC NamedBufferData; - PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC NamedBufferPageCommitmentARB; - PFNGLNAMEDBUFFERSTORAGEPROC NamedBufferStorage; - PFNGLNAMEDBUFFERSUBDATAPROC NamedBufferSubData; - PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC NamedFramebufferDrawBuffer; - PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC NamedFramebufferDrawBuffers; - PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC NamedFramebufferParameteri; - PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC NamedFramebufferReadBuffer; - PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC NamedFramebufferRenderbuffer; - PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC NamedFramebufferSampleLocationsfvARB; - PFNGLNAMEDFRAMEBUFFERTEXTUREPROC NamedFramebufferTexture; - PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC NamedFramebufferTextureLayer; - PFNGLNAMEDRENDERBUFFERSTORAGEPROC NamedRenderbufferStorage; - PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC NamedRenderbufferStorageMultisample; - PFNGLNAMEDSTRINGARBPROC NamedStringARB; - PFNGLOBJECTLABELPROC ObjectLabel; - PFNGLOBJECTPTRLABELPROC ObjectPtrLabel; - PFNGLPATCHPARAMETERFVPROC PatchParameterfv; - PFNGLPATCHPARAMETERIPROC PatchParameteri; - PFNGLPAUSETRANSFORMFEEDBACKPROC PauseTransformFeedback; - PFNGLPIXELSTOREFPROC PixelStoref; - PFNGLPIXELSTOREIPROC PixelStorei; - PFNGLPOINTPARAMETERFPROC PointParameterf; - PFNGLPOINTPARAMETERFVPROC PointParameterfv; - PFNGLPOINTPARAMETERIPROC PointParameteri; - PFNGLPOINTPARAMETERIVPROC PointParameteriv; - PFNGLPOINTSIZEPROC PointSize; - PFNGLPOLYGONMODEPROC PolygonMode; - PFNGLPOLYGONOFFSETPROC PolygonOffset; - PFNGLPOPDEBUGGROUPPROC PopDebugGroup; - PFNGLPRIMITIVEBOUNDINGBOXARBPROC PrimitiveBoundingBoxARB; - PFNGLPRIMITIVERESTARTINDEXPROC PrimitiveRestartIndex; - PFNGLPROGRAMBINARYPROC ProgramBinary; - PFNGLPROGRAMPARAMETERIPROC ProgramParameteri; - PFNGLPROGRAMPARAMETERIARBPROC ProgramParameteriARB; - PFNGLPROGRAMUNIFORM1DPROC ProgramUniform1d; - PFNGLPROGRAMUNIFORM1DVPROC ProgramUniform1dv; - PFNGLPROGRAMUNIFORM1FPROC ProgramUniform1f; - PFNGLPROGRAMUNIFORM1FVPROC ProgramUniform1fv; - PFNGLPROGRAMUNIFORM1IPROC ProgramUniform1i; - PFNGLPROGRAMUNIFORM1I64ARBPROC ProgramUniform1i64ARB; - PFNGLPROGRAMUNIFORM1I64VARBPROC ProgramUniform1i64vARB; - PFNGLPROGRAMUNIFORM1IVPROC ProgramUniform1iv; - PFNGLPROGRAMUNIFORM1UIPROC ProgramUniform1ui; - PFNGLPROGRAMUNIFORM1UI64ARBPROC ProgramUniform1ui64ARB; - PFNGLPROGRAMUNIFORM1UI64VARBPROC ProgramUniform1ui64vARB; - PFNGLPROGRAMUNIFORM1UIVPROC ProgramUniform1uiv; - PFNGLPROGRAMUNIFORM2DPROC ProgramUniform2d; - PFNGLPROGRAMUNIFORM2DVPROC ProgramUniform2dv; - PFNGLPROGRAMUNIFORM2FPROC ProgramUniform2f; - PFNGLPROGRAMUNIFORM2FVPROC ProgramUniform2fv; - PFNGLPROGRAMUNIFORM2IPROC ProgramUniform2i; - PFNGLPROGRAMUNIFORM2I64ARBPROC ProgramUniform2i64ARB; - PFNGLPROGRAMUNIFORM2I64VARBPROC ProgramUniform2i64vARB; - PFNGLPROGRAMUNIFORM2IVPROC ProgramUniform2iv; - PFNGLPROGRAMUNIFORM2UIPROC ProgramUniform2ui; - PFNGLPROGRAMUNIFORM2UI64ARBPROC ProgramUniform2ui64ARB; - PFNGLPROGRAMUNIFORM2UI64VARBPROC ProgramUniform2ui64vARB; - PFNGLPROGRAMUNIFORM2UIVPROC ProgramUniform2uiv; - PFNGLPROGRAMUNIFORM3DPROC ProgramUniform3d; - PFNGLPROGRAMUNIFORM3DVPROC ProgramUniform3dv; - PFNGLPROGRAMUNIFORM3FPROC ProgramUniform3f; - PFNGLPROGRAMUNIFORM3FVPROC ProgramUniform3fv; - PFNGLPROGRAMUNIFORM3IPROC ProgramUniform3i; - PFNGLPROGRAMUNIFORM3I64ARBPROC ProgramUniform3i64ARB; - PFNGLPROGRAMUNIFORM3I64VARBPROC ProgramUniform3i64vARB; - PFNGLPROGRAMUNIFORM3IVPROC ProgramUniform3iv; - PFNGLPROGRAMUNIFORM3UIPROC ProgramUniform3ui; - PFNGLPROGRAMUNIFORM3UI64ARBPROC ProgramUniform3ui64ARB; - PFNGLPROGRAMUNIFORM3UI64VARBPROC ProgramUniform3ui64vARB; - PFNGLPROGRAMUNIFORM3UIVPROC ProgramUniform3uiv; - PFNGLPROGRAMUNIFORM4DPROC ProgramUniform4d; - PFNGLPROGRAMUNIFORM4DVPROC ProgramUniform4dv; - PFNGLPROGRAMUNIFORM4FPROC ProgramUniform4f; - PFNGLPROGRAMUNIFORM4FVPROC ProgramUniform4fv; - PFNGLPROGRAMUNIFORM4IPROC ProgramUniform4i; - PFNGLPROGRAMUNIFORM4I64ARBPROC ProgramUniform4i64ARB; - PFNGLPROGRAMUNIFORM4I64VARBPROC ProgramUniform4i64vARB; - PFNGLPROGRAMUNIFORM4IVPROC ProgramUniform4iv; - PFNGLPROGRAMUNIFORM4UIPROC ProgramUniform4ui; - PFNGLPROGRAMUNIFORM4UI64ARBPROC ProgramUniform4ui64ARB; - PFNGLPROGRAMUNIFORM4UI64VARBPROC ProgramUniform4ui64vARB; - PFNGLPROGRAMUNIFORM4UIVPROC ProgramUniform4uiv; - PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC ProgramUniformHandleui64ARB; - PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC ProgramUniformHandleui64vARB; - PFNGLPROGRAMUNIFORMMATRIX2DVPROC ProgramUniformMatrix2dv; - PFNGLPROGRAMUNIFORMMATRIX2FVPROC ProgramUniformMatrix2fv; - PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC ProgramUniformMatrix2x3dv; - PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC ProgramUniformMatrix2x3fv; - PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC ProgramUniformMatrix2x4dv; - PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC ProgramUniformMatrix2x4fv; - PFNGLPROGRAMUNIFORMMATRIX3DVPROC ProgramUniformMatrix3dv; - PFNGLPROGRAMUNIFORMMATRIX3FVPROC ProgramUniformMatrix3fv; - PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC ProgramUniformMatrix3x2dv; - PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC ProgramUniformMatrix3x2fv; - PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC ProgramUniformMatrix3x4dv; - PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC ProgramUniformMatrix3x4fv; - PFNGLPROGRAMUNIFORMMATRIX4DVPROC ProgramUniformMatrix4dv; - PFNGLPROGRAMUNIFORMMATRIX4FVPROC ProgramUniformMatrix4fv; - PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC ProgramUniformMatrix4x2dv; - PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC ProgramUniformMatrix4x2fv; - PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC ProgramUniformMatrix4x3dv; - PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC ProgramUniformMatrix4x3fv; - PFNGLPROVOKINGVERTEXPROC ProvokingVertex; - PFNGLPUSHDEBUGGROUPPROC PushDebugGroup; - PFNGLQUERYCOUNTERPROC QueryCounter; - PFNGLREADBUFFERPROC ReadBuffer; - PFNGLREADPIXELSPROC ReadPixels; - PFNGLREADNPIXELSPROC ReadnPixels; - PFNGLREADNPIXELSARBPROC ReadnPixelsARB; - PFNGLRELEASESHADERCOMPILERPROC ReleaseShaderCompiler; - PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage; - PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample; - PFNGLRESUMETRANSFORMFEEDBACKPROC ResumeTransformFeedback; - PFNGLSAMPLECOVERAGEPROC SampleCoverage; - PFNGLSAMPLEMASKIPROC SampleMaski; - PFNGLSAMPLERPARAMETERIIVPROC SamplerParameterIiv; - PFNGLSAMPLERPARAMETERIUIVPROC SamplerParameterIuiv; - PFNGLSAMPLERPARAMETERFPROC SamplerParameterf; - PFNGLSAMPLERPARAMETERFVPROC SamplerParameterfv; - PFNGLSAMPLERPARAMETERIPROC SamplerParameteri; - PFNGLSAMPLERPARAMETERIVPROC SamplerParameteriv; - PFNGLSCISSORPROC Scissor; - PFNGLSCISSORARRAYVPROC ScissorArrayv; - PFNGLSCISSORINDEXEDPROC ScissorIndexed; - PFNGLSCISSORINDEXEDVPROC ScissorIndexedv; - PFNGLSELECTPERFMONITORCOUNTERSAMDPROC SelectPerfMonitorCountersAMD; - PFNGLSHADERBINARYPROC ShaderBinary; - PFNGLSHADERSOURCEPROC ShaderSource; - PFNGLSHADERSTORAGEBLOCKBINDINGPROC ShaderStorageBlockBinding; - PFNGLSPECIALIZESHADERARBPROC SpecializeShaderARB; - PFNGLSTENCILFUNCPROC StencilFunc; - PFNGLSTENCILFUNCSEPARATEPROC StencilFuncSeparate; - PFNGLSTENCILMASKPROC StencilMask; - PFNGLSTENCILMASKSEPARATEPROC StencilMaskSeparate; - PFNGLSTENCILOPPROC StencilOp; - PFNGLSTENCILOPSEPARATEPROC StencilOpSeparate; - PFNGLTEXBUFFERPROC TexBuffer; - PFNGLTEXBUFFERARBPROC TexBufferARB; - PFNGLTEXBUFFERRANGEPROC TexBufferRange; - PFNGLTEXIMAGE1DPROC TexImage1D; - PFNGLTEXIMAGE2DPROC TexImage2D; - PFNGLTEXIMAGE2DMULTISAMPLEPROC TexImage2DMultisample; - PFNGLTEXIMAGE3DPROC TexImage3D; - PFNGLTEXIMAGE3DMULTISAMPLEPROC TexImage3DMultisample; - PFNGLTEXPAGECOMMITMENTARBPROC TexPageCommitmentARB; - PFNGLTEXPARAMETERIIVPROC TexParameterIiv; - PFNGLTEXPARAMETERIUIVPROC TexParameterIuiv; - PFNGLTEXPARAMETERFPROC TexParameterf; - PFNGLTEXPARAMETERFVPROC TexParameterfv; - PFNGLTEXPARAMETERIPROC TexParameteri; - PFNGLTEXPARAMETERIVPROC TexParameteriv; - PFNGLTEXSTORAGE1DPROC TexStorage1D; - PFNGLTEXSTORAGE2DPROC TexStorage2D; - PFNGLTEXSTORAGE2DMULTISAMPLEPROC TexStorage2DMultisample; - PFNGLTEXSTORAGE3DPROC TexStorage3D; - PFNGLTEXSTORAGE3DMULTISAMPLEPROC TexStorage3DMultisample; - PFNGLTEXSUBIMAGE1DPROC TexSubImage1D; - PFNGLTEXSUBIMAGE2DPROC TexSubImage2D; - PFNGLTEXSUBIMAGE3DPROC TexSubImage3D; - PFNGLTEXTUREBARRIERPROC TextureBarrier; - PFNGLTEXTUREBUFFERPROC TextureBuffer; - PFNGLTEXTUREBUFFERRANGEPROC TextureBufferRange; - PFNGLTEXTUREPARAMETERIIVPROC TextureParameterIiv; - PFNGLTEXTUREPARAMETERIUIVPROC TextureParameterIuiv; - PFNGLTEXTUREPARAMETERFPROC TextureParameterf; - PFNGLTEXTUREPARAMETERFVPROC TextureParameterfv; - PFNGLTEXTUREPARAMETERIPROC TextureParameteri; - PFNGLTEXTUREPARAMETERIVPROC TextureParameteriv; - PFNGLTEXTURESTORAGE1DPROC TextureStorage1D; - PFNGLTEXTURESTORAGE2DPROC TextureStorage2D; - PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC TextureStorage2DMultisample; - PFNGLTEXTURESTORAGE3DPROC TextureStorage3D; - PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC TextureStorage3DMultisample; - PFNGLTEXTURESUBIMAGE1DPROC TextureSubImage1D; - PFNGLTEXTURESUBIMAGE2DPROC TextureSubImage2D; - PFNGLTEXTURESUBIMAGE3DPROC TextureSubImage3D; - PFNGLTEXTUREVIEWPROC TextureView; - PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC TransformFeedbackBufferBase; - PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC TransformFeedbackBufferRange; - PFNGLTRANSFORMFEEDBACKVARYINGSPROC TransformFeedbackVaryings; - PFNGLUNIFORM1DPROC Uniform1d; - PFNGLUNIFORM1DVPROC Uniform1dv; - PFNGLUNIFORM1FPROC Uniform1f; - PFNGLUNIFORM1FVPROC Uniform1fv; - PFNGLUNIFORM1IPROC Uniform1i; - PFNGLUNIFORM1I64ARBPROC Uniform1i64ARB; - PFNGLUNIFORM1I64VARBPROC Uniform1i64vARB; - PFNGLUNIFORM1IVPROC Uniform1iv; - PFNGLUNIFORM1UIPROC Uniform1ui; - PFNGLUNIFORM1UI64ARBPROC Uniform1ui64ARB; - PFNGLUNIFORM1UI64VARBPROC Uniform1ui64vARB; - PFNGLUNIFORM1UIVPROC Uniform1uiv; - PFNGLUNIFORM2DPROC Uniform2d; - PFNGLUNIFORM2DVPROC Uniform2dv; - PFNGLUNIFORM2FPROC Uniform2f; - PFNGLUNIFORM2FVPROC Uniform2fv; - PFNGLUNIFORM2IPROC Uniform2i; - PFNGLUNIFORM2I64ARBPROC Uniform2i64ARB; - PFNGLUNIFORM2I64VARBPROC Uniform2i64vARB; - PFNGLUNIFORM2IVPROC Uniform2iv; - PFNGLUNIFORM2UIPROC Uniform2ui; - PFNGLUNIFORM2UI64ARBPROC Uniform2ui64ARB; - PFNGLUNIFORM2UI64VARBPROC Uniform2ui64vARB; - PFNGLUNIFORM2UIVPROC Uniform2uiv; - PFNGLUNIFORM3DPROC Uniform3d; - PFNGLUNIFORM3DVPROC Uniform3dv; - PFNGLUNIFORM3FPROC Uniform3f; - PFNGLUNIFORM3FVPROC Uniform3fv; - PFNGLUNIFORM3IPROC Uniform3i; - PFNGLUNIFORM3I64ARBPROC Uniform3i64ARB; - PFNGLUNIFORM3I64VARBPROC Uniform3i64vARB; - PFNGLUNIFORM3IVPROC Uniform3iv; - PFNGLUNIFORM3UIPROC Uniform3ui; - PFNGLUNIFORM3UI64ARBPROC Uniform3ui64ARB; - PFNGLUNIFORM3UI64VARBPROC Uniform3ui64vARB; - PFNGLUNIFORM3UIVPROC Uniform3uiv; - PFNGLUNIFORM4DPROC Uniform4d; - PFNGLUNIFORM4DVPROC Uniform4dv; - PFNGLUNIFORM4FPROC Uniform4f; - PFNGLUNIFORM4FVPROC Uniform4fv; - PFNGLUNIFORM4IPROC Uniform4i; - PFNGLUNIFORM4I64ARBPROC Uniform4i64ARB; - PFNGLUNIFORM4I64VARBPROC Uniform4i64vARB; - PFNGLUNIFORM4IVPROC Uniform4iv; - PFNGLUNIFORM4UIPROC Uniform4ui; - PFNGLUNIFORM4UI64ARBPROC Uniform4ui64ARB; - PFNGLUNIFORM4UI64VARBPROC Uniform4ui64vARB; - PFNGLUNIFORM4UIVPROC Uniform4uiv; - PFNGLUNIFORMBLOCKBINDINGPROC UniformBlockBinding; - PFNGLUNIFORMHANDLEUI64ARBPROC UniformHandleui64ARB; - PFNGLUNIFORMHANDLEUI64VARBPROC UniformHandleui64vARB; - PFNGLUNIFORMMATRIX2DVPROC UniformMatrix2dv; - PFNGLUNIFORMMATRIX2FVPROC UniformMatrix2fv; - PFNGLUNIFORMMATRIX2X3DVPROC UniformMatrix2x3dv; - PFNGLUNIFORMMATRIX2X3FVPROC UniformMatrix2x3fv; - PFNGLUNIFORMMATRIX2X4DVPROC UniformMatrix2x4dv; - PFNGLUNIFORMMATRIX2X4FVPROC UniformMatrix2x4fv; - PFNGLUNIFORMMATRIX3DVPROC UniformMatrix3dv; - PFNGLUNIFORMMATRIX3FVPROC UniformMatrix3fv; - PFNGLUNIFORMMATRIX3X2DVPROC UniformMatrix3x2dv; - PFNGLUNIFORMMATRIX3X2FVPROC UniformMatrix3x2fv; - PFNGLUNIFORMMATRIX3X4DVPROC UniformMatrix3x4dv; - PFNGLUNIFORMMATRIX3X4FVPROC UniformMatrix3x4fv; - PFNGLUNIFORMMATRIX4DVPROC UniformMatrix4dv; - PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv; - PFNGLUNIFORMMATRIX4X2DVPROC UniformMatrix4x2dv; - PFNGLUNIFORMMATRIX4X2FVPROC UniformMatrix4x2fv; - PFNGLUNIFORMMATRIX4X3DVPROC UniformMatrix4x3dv; - PFNGLUNIFORMMATRIX4X3FVPROC UniformMatrix4x3fv; - PFNGLUNIFORMSUBROUTINESUIVPROC UniformSubroutinesuiv; - PFNGLUNMAPBUFFERPROC UnmapBuffer; - PFNGLUNMAPNAMEDBUFFERPROC UnmapNamedBuffer; - PFNGLUSEPROGRAMPROC UseProgram; - PFNGLUSEPROGRAMSTAGESPROC UseProgramStages; - PFNGLVALIDATEPROGRAMPROC ValidateProgram; - PFNGLVALIDATEPROGRAMPIPELINEPROC ValidateProgramPipeline; - PFNGLVERTEXARRAYATTRIBBINDINGPROC VertexArrayAttribBinding; - PFNGLVERTEXARRAYATTRIBFORMATPROC VertexArrayAttribFormat; - PFNGLVERTEXARRAYATTRIBIFORMATPROC VertexArrayAttribIFormat; - PFNGLVERTEXARRAYATTRIBLFORMATPROC VertexArrayAttribLFormat; - PFNGLVERTEXARRAYBINDINGDIVISORPROC VertexArrayBindingDivisor; - PFNGLVERTEXARRAYELEMENTBUFFERPROC VertexArrayElementBuffer; - PFNGLVERTEXARRAYVERTEXBUFFERPROC VertexArrayVertexBuffer; - PFNGLVERTEXARRAYVERTEXBUFFERSPROC VertexArrayVertexBuffers; - PFNGLVERTEXATTRIB1DPROC VertexAttrib1d; - PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv; - PFNGLVERTEXATTRIB1FPROC VertexAttrib1f; - PFNGLVERTEXATTRIB1FVPROC VertexAttrib1fv; - PFNGLVERTEXATTRIB1SPROC VertexAttrib1s; - PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv; - PFNGLVERTEXATTRIB2DPROC VertexAttrib2d; - PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv; - PFNGLVERTEXATTRIB2FPROC VertexAttrib2f; - PFNGLVERTEXATTRIB2FVPROC VertexAttrib2fv; - PFNGLVERTEXATTRIB2SPROC VertexAttrib2s; - PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv; - PFNGLVERTEXATTRIB3DPROC VertexAttrib3d; - PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv; - PFNGLVERTEXATTRIB3FPROC VertexAttrib3f; - PFNGLVERTEXATTRIB3FVPROC VertexAttrib3fv; - PFNGLVERTEXATTRIB3SPROC VertexAttrib3s; - PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv; - PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv; - PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv; - PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv; - PFNGLVERTEXATTRIB4NUBPROC VertexAttrib4Nub; - PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv; - PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv; - PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv; - PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv; - PFNGLVERTEXATTRIB4DPROC VertexAttrib4d; - PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv; - PFNGLVERTEXATTRIB4FPROC VertexAttrib4f; - PFNGLVERTEXATTRIB4FVPROC VertexAttrib4fv; - PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv; - PFNGLVERTEXATTRIB4SPROC VertexAttrib4s; - PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv; - PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv; - PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv; - PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv; - PFNGLVERTEXATTRIBBINDINGPROC VertexAttribBinding; - PFNGLVERTEXATTRIBDIVISORPROC VertexAttribDivisor; - PFNGLVERTEXATTRIBDIVISORARBPROC VertexAttribDivisorARB; - PFNGLVERTEXATTRIBFORMATPROC VertexAttribFormat; - PFNGLVERTEXATTRIBI1IPROC VertexAttribI1i; - PFNGLVERTEXATTRIBI1IVPROC VertexAttribI1iv; - PFNGLVERTEXATTRIBI1UIPROC VertexAttribI1ui; - PFNGLVERTEXATTRIBI1UIVPROC VertexAttribI1uiv; - PFNGLVERTEXATTRIBI2IPROC VertexAttribI2i; - PFNGLVERTEXATTRIBI2IVPROC VertexAttribI2iv; - PFNGLVERTEXATTRIBI2UIPROC VertexAttribI2ui; - PFNGLVERTEXATTRIBI2UIVPROC VertexAttribI2uiv; - PFNGLVERTEXATTRIBI3IPROC VertexAttribI3i; - PFNGLVERTEXATTRIBI3IVPROC VertexAttribI3iv; - PFNGLVERTEXATTRIBI3UIPROC VertexAttribI3ui; - PFNGLVERTEXATTRIBI3UIVPROC VertexAttribI3uiv; - PFNGLVERTEXATTRIBI4BVPROC VertexAttribI4bv; - PFNGLVERTEXATTRIBI4IPROC VertexAttribI4i; - PFNGLVERTEXATTRIBI4IVPROC VertexAttribI4iv; - PFNGLVERTEXATTRIBI4SVPROC VertexAttribI4sv; - PFNGLVERTEXATTRIBI4UBVPROC VertexAttribI4ubv; - PFNGLVERTEXATTRIBI4UIPROC VertexAttribI4ui; - PFNGLVERTEXATTRIBI4UIVPROC VertexAttribI4uiv; - PFNGLVERTEXATTRIBI4USVPROC VertexAttribI4usv; - PFNGLVERTEXATTRIBIFORMATPROC VertexAttribIFormat; - PFNGLVERTEXATTRIBIPOINTERPROC VertexAttribIPointer; - PFNGLVERTEXATTRIBL1DPROC VertexAttribL1d; - PFNGLVERTEXATTRIBL1DVPROC VertexAttribL1dv; - PFNGLVERTEXATTRIBL1UI64ARBPROC VertexAttribL1ui64ARB; - PFNGLVERTEXATTRIBL1UI64VARBPROC VertexAttribL1ui64vARB; - PFNGLVERTEXATTRIBL2DPROC VertexAttribL2d; - PFNGLVERTEXATTRIBL2DVPROC VertexAttribL2dv; - PFNGLVERTEXATTRIBL3DPROC VertexAttribL3d; - PFNGLVERTEXATTRIBL3DVPROC VertexAttribL3dv; - PFNGLVERTEXATTRIBL4DPROC VertexAttribL4d; - PFNGLVERTEXATTRIBL4DVPROC VertexAttribL4dv; - PFNGLVERTEXATTRIBLFORMATPROC VertexAttribLFormat; - PFNGLVERTEXATTRIBLPOINTERPROC VertexAttribLPointer; - PFNGLVERTEXATTRIBP1UIPROC VertexAttribP1ui; - PFNGLVERTEXATTRIBP1UIVPROC VertexAttribP1uiv; - PFNGLVERTEXATTRIBP2UIPROC VertexAttribP2ui; - PFNGLVERTEXATTRIBP2UIVPROC VertexAttribP2uiv; - PFNGLVERTEXATTRIBP3UIPROC VertexAttribP3ui; - PFNGLVERTEXATTRIBP3UIVPROC VertexAttribP3uiv; - PFNGLVERTEXATTRIBP4UIPROC VertexAttribP4ui; - PFNGLVERTEXATTRIBP4UIVPROC VertexAttribP4uiv; - PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer; - PFNGLVERTEXBINDINGDIVISORPROC VertexBindingDivisor; - PFNGLVIEWPORTPROC Viewport; - PFNGLVIEWPORTARRAYVPROC ViewportArrayv; - PFNGLVIEWPORTINDEXEDFPROC ViewportIndexedf; - PFNGLVIEWPORTINDEXEDFVPROC ViewportIndexedfv; - PFNGLWAITSYNCPROC WaitSync; + struct + { + PFNGLACTIVESHADERPROGRAMPROC ActiveShaderProgram; + PFNGLACTIVETEXTUREPROC ActiveTexture; + PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC ApplyFramebufferAttachmentCMAAINTEL; + PFNGLATTACHSHADERPROC AttachShader; + PFNGLBEGINCONDITIONALRENDERPROC BeginConditionalRender; + PFNGLBEGINPERFMONITORAMDPROC BeginPerfMonitorAMD; + PFNGLBEGINPERFQUERYINTELPROC BeginPerfQueryINTEL; + PFNGLBEGINQUERYPROC BeginQuery; + PFNGLBEGINQUERYINDEXEDPROC BeginQueryIndexed; + PFNGLBEGINTRANSFORMFEEDBACKPROC BeginTransformFeedback; + PFNGLBINDATTRIBLOCATIONPROC BindAttribLocation; + PFNGLBINDBUFFERPROC BindBuffer; + PFNGLBINDBUFFERBASEPROC BindBufferBase; + PFNGLBINDBUFFERRANGEPROC BindBufferRange; + PFNGLBINDBUFFERSBASEPROC BindBuffersBase; + PFNGLBINDBUFFERSRANGEPROC BindBuffersRange; + PFNGLBINDFRAGDATALOCATIONPROC BindFragDataLocation; + PFNGLBINDFRAGDATALOCATIONINDEXEDPROC BindFragDataLocationIndexed; + PFNGLBINDFRAMEBUFFERPROC BindFramebuffer; + PFNGLBINDIMAGETEXTUREPROC BindImageTexture; + PFNGLBINDIMAGETEXTURESPROC BindImageTextures; + PFNGLBINDPROGRAMPIPELINEPROC BindProgramPipeline; + PFNGLBINDRENDERBUFFERPROC BindRenderbuffer; + PFNGLBINDSAMPLERPROC BindSampler; + PFNGLBINDSAMPLERSPROC BindSamplers; + PFNGLBINDTEXTUREPROC BindTexture; + PFNGLBINDTEXTUREUNITPROC BindTextureUnit; + PFNGLBINDTEXTURESPROC BindTextures; + PFNGLBINDTRANSFORMFEEDBACKPROC BindTransformFeedback; + PFNGLBINDVERTEXARRAYPROC BindVertexArray; + PFNGLBINDVERTEXBUFFERPROC BindVertexBuffer; + PFNGLBINDVERTEXBUFFERSPROC BindVertexBuffers; + PFNGLBLENDBARRIERKHRPROC BlendBarrierKHR; + PFNGLBLENDCOLORPROC BlendColor; + PFNGLBLENDEQUATIONPROC BlendEquation; + PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate; + PFNGLBLENDEQUATIONSEPARATEIPROC BlendEquationSeparatei; + PFNGLBLENDEQUATIONSEPARATEIARBPROC BlendEquationSeparateiARB; + PFNGLBLENDEQUATIONIPROC BlendEquationi; + PFNGLBLENDEQUATIONIARBPROC BlendEquationiARB; + PFNGLBLENDFUNCPROC BlendFunc; + PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate; + PFNGLBLENDFUNCSEPARATEIPROC BlendFuncSeparatei; + PFNGLBLENDFUNCSEPARATEIARBPROC BlendFuncSeparateiARB; + PFNGLBLENDFUNCIPROC BlendFunci; + PFNGLBLENDFUNCIARBPROC BlendFunciARB; + PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer; + PFNGLBLITNAMEDFRAMEBUFFERPROC BlitNamedFramebuffer; + PFNGLBUFFERDATAPROC BufferData; + PFNGLBUFFERPAGECOMMITMENTARBPROC BufferPageCommitmentARB; + PFNGLBUFFERSTORAGEPROC BufferStorage; + PFNGLBUFFERSUBDATAPROC BufferSubData; + PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus; + PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC CheckNamedFramebufferStatus; + PFNGLCLAMPCOLORPROC ClampColor; + PFNGLCLEARPROC Clear; + PFNGLCLEARBUFFERDATAPROC ClearBufferData; + PFNGLCLEARBUFFERSUBDATAPROC ClearBufferSubData; + PFNGLCLEARBUFFERFIPROC ClearBufferfi; + PFNGLCLEARBUFFERFVPROC ClearBufferfv; + PFNGLCLEARBUFFERIVPROC ClearBufferiv; + PFNGLCLEARBUFFERUIVPROC ClearBufferuiv; + PFNGLCLEARCOLORPROC ClearColor; + PFNGLCLEARDEPTHPROC ClearDepth; + PFNGLCLEARDEPTHFPROC ClearDepthf; + PFNGLCLEARNAMEDBUFFERDATAPROC ClearNamedBufferData; + PFNGLCLEARNAMEDBUFFERSUBDATAPROC ClearNamedBufferSubData; + PFNGLCLEARNAMEDFRAMEBUFFERFIPROC ClearNamedFramebufferfi; + PFNGLCLEARNAMEDFRAMEBUFFERFVPROC ClearNamedFramebufferfv; + PFNGLCLEARNAMEDFRAMEBUFFERIVPROC ClearNamedFramebufferiv; + PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC ClearNamedFramebufferuiv; + PFNGLCLEARSTENCILPROC ClearStencil; + PFNGLCLEARTEXIMAGEPROC ClearTexImage; + PFNGLCLEARTEXSUBIMAGEPROC ClearTexSubImage; + PFNGLCLIENTWAITSYNCPROC ClientWaitSync; + PFNGLCLIPCONTROLPROC ClipControl; + PFNGLCOLORMASKPROC ColorMask; + PFNGLCOLORMASKIPROC ColorMaski; + PFNGLCOMPILESHADERPROC CompileShader; + PFNGLCOMPILESHADERINCLUDEARBPROC CompileShaderIncludeARB; + PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D; + PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D; + PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D; + PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D; + PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D; + PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC CompressedTextureSubImage1D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC CompressedTextureSubImage2D; + PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC CompressedTextureSubImage3D; + PFNGLCOPYBUFFERSUBDATAPROC CopyBufferSubData; + PFNGLCOPYIMAGESUBDATAPROC CopyImageSubData; + PFNGLCOPYNAMEDBUFFERSUBDATAPROC CopyNamedBufferSubData; + PFNGLCOPYTEXIMAGE1DPROC CopyTexImage1D; + PFNGLCOPYTEXIMAGE2DPROC CopyTexImage2D; + PFNGLCOPYTEXSUBIMAGE1DPROC CopyTexSubImage1D; + PFNGLCOPYTEXSUBIMAGE2DPROC CopyTexSubImage2D; + PFNGLCOPYTEXSUBIMAGE3DPROC CopyTexSubImage3D; + PFNGLCOPYTEXTURESUBIMAGE1DPROC CopyTextureSubImage1D; + PFNGLCOPYTEXTURESUBIMAGE2DPROC CopyTextureSubImage2D; + PFNGLCOPYTEXTURESUBIMAGE3DPROC CopyTextureSubImage3D; + PFNGLCREATEBUFFERSPROC CreateBuffers; + PFNGLCREATEFRAMEBUFFERSPROC CreateFramebuffers; + PFNGLCREATEPERFQUERYINTELPROC CreatePerfQueryINTEL; + PFNGLCREATEPROGRAMPROC CreateProgram; + PFNGLCREATEPROGRAMPIPELINESPROC CreateProgramPipelines; + PFNGLCREATEQUERIESPROC CreateQueries; + PFNGLCREATERENDERBUFFERSPROC CreateRenderbuffers; + PFNGLCREATESAMPLERSPROC CreateSamplers; + PFNGLCREATESHADERPROC CreateShader; + PFNGLCREATESHADERPROGRAMVPROC CreateShaderProgramv; + PFNGLCREATESYNCFROMCLEVENTARBPROC CreateSyncFromCLeventARB; + PFNGLCREATETEXTURESPROC CreateTextures; + PFNGLCREATETRANSFORMFEEDBACKSPROC CreateTransformFeedbacks; + PFNGLCREATEVERTEXARRAYSPROC CreateVertexArrays; + PFNGLCULLFACEPROC CullFace; + PFNGLDEBUGMESSAGECALLBACKPROC DebugMessageCallback; + PFNGLDEBUGMESSAGECALLBACKARBPROC DebugMessageCallbackARB; + PFNGLDEBUGMESSAGECONTROLPROC DebugMessageControl; + PFNGLDEBUGMESSAGECONTROLARBPROC DebugMessageControlARB; + PFNGLDEBUGMESSAGEINSERTPROC DebugMessageInsert; + PFNGLDEBUGMESSAGEINSERTARBPROC DebugMessageInsertARB; + PFNGLDELETEBUFFERSPROC DeleteBuffers; + PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers; + PFNGLDELETENAMEDSTRINGARBPROC DeleteNamedStringARB; + PFNGLDELETEPERFMONITORSAMDPROC DeletePerfMonitorsAMD; + PFNGLDELETEPERFQUERYINTELPROC DeletePerfQueryINTEL; + PFNGLDELETEPROGRAMPROC DeleteProgram; + PFNGLDELETEPROGRAMPIPELINESPROC DeleteProgramPipelines; + PFNGLDELETEQUERIESPROC DeleteQueries; + PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers; + PFNGLDELETESAMPLERSPROC DeleteSamplers; + PFNGLDELETESHADERPROC DeleteShader; + PFNGLDELETESYNCPROC DeleteSync; + PFNGLDELETETEXTURESPROC DeleteTextures; + PFNGLDELETETRANSFORMFEEDBACKSPROC DeleteTransformFeedbacks; + PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays; + PFNGLDEPTHFUNCPROC DepthFunc; + PFNGLDEPTHMASKPROC DepthMask; + PFNGLDEPTHRANGEPROC DepthRange; + PFNGLDEPTHRANGEARRAYVPROC DepthRangeArrayv; + PFNGLDEPTHRANGEINDEXEDPROC DepthRangeIndexed; + PFNGLDEPTHRANGEFPROC DepthRangef; + PFNGLDETACHSHADERPROC DetachShader; + PFNGLDISABLEPROC Disable; + PFNGLDISABLEVERTEXARRAYATTRIBPROC DisableVertexArrayAttrib; + PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray; + PFNGLDISABLEIPROC Disablei; + PFNGLDISPATCHCOMPUTEPROC DispatchCompute; + PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC DispatchComputeGroupSizeARB; + PFNGLDISPATCHCOMPUTEINDIRECTPROC DispatchComputeIndirect; + PFNGLDRAWARRAYSPROC DrawArrays; + PFNGLDRAWARRAYSINDIRECTPROC DrawArraysIndirect; + PFNGLDRAWARRAYSINSTANCEDPROC DrawArraysInstanced; + PFNGLDRAWARRAYSINSTANCEDARBPROC DrawArraysInstancedARB; + PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC DrawArraysInstancedBaseInstance; + PFNGLDRAWBUFFERPROC DrawBuffer; + PFNGLDRAWBUFFERSPROC DrawBuffers; + PFNGLDRAWELEMENTSPROC DrawElements; + PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex; + PFNGLDRAWELEMENTSINDIRECTPROC DrawElementsIndirect; + PFNGLDRAWELEMENTSINSTANCEDPROC DrawElementsInstanced; + PFNGLDRAWELEMENTSINSTANCEDARBPROC DrawElementsInstancedARB; + PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC DrawElementsInstancedBaseInstance; + PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC DrawElementsInstancedBaseVertex; + PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC DrawElementsInstancedBaseVertexBaseInstance; + PFNGLDRAWRANGEELEMENTSPROC DrawRangeElements; + PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC DrawRangeElementsBaseVertex; + PFNGLDRAWTRANSFORMFEEDBACKPROC DrawTransformFeedback; + PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC DrawTransformFeedbackInstanced; + PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC DrawTransformFeedbackStream; + PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC DrawTransformFeedbackStreamInstanced; + PFNGLENABLEPROC Enable; + PFNGLENABLEVERTEXARRAYATTRIBPROC EnableVertexArrayAttrib; + PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray; + PFNGLENABLEIPROC Enablei; + PFNGLENDCONDITIONALRENDERPROC EndConditionalRender; + PFNGLENDPERFMONITORAMDPROC EndPerfMonitorAMD; + PFNGLENDPERFQUERYINTELPROC EndPerfQueryINTEL; + PFNGLENDQUERYPROC EndQuery; + PFNGLENDQUERYINDEXEDPROC EndQueryIndexed; + PFNGLENDTRANSFORMFEEDBACKPROC EndTransformFeedback; + PFNGLEVALUATEDEPTHVALUESARBPROC EvaluateDepthValuesARB; + PFNGLFENCESYNCPROC FenceSync; + PFNGLFINISHPROC Finish; + PFNGLFLUSHPROC Flush; + PFNGLFLUSHMAPPEDBUFFERRANGEPROC FlushMappedBufferRange; + PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC FlushMappedNamedBufferRange; + PFNGLFRAMEBUFFERPARAMETERIPROC FramebufferParameteri; + PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer; + PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC FramebufferSampleLocationsfvARB; + PFNGLFRAMEBUFFERTEXTUREPROC FramebufferTexture; + PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D; + PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D; + PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D; + PFNGLFRAMEBUFFERTEXTUREARBPROC FramebufferTextureARB; + PFNGLFRAMEBUFFERTEXTUREFACEARBPROC FramebufferTextureFaceARB; + PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer; + PFNGLFRAMEBUFFERTEXTURELAYERARBPROC FramebufferTextureLayerARB; + PFNGLFRONTFACEPROC FrontFace; + PFNGLGENBUFFERSPROC GenBuffers; + PFNGLGENFRAMEBUFFERSPROC GenFramebuffers; + PFNGLGENPERFMONITORSAMDPROC GenPerfMonitorsAMD; + PFNGLGENPROGRAMPIPELINESPROC GenProgramPipelines; + PFNGLGENQUERIESPROC GenQueries; + PFNGLGENRENDERBUFFERSPROC GenRenderbuffers; + PFNGLGENSAMPLERSPROC GenSamplers; + PFNGLGENTEXTURESPROC GenTextures; + PFNGLGENTRANSFORMFEEDBACKSPROC GenTransformFeedbacks; + PFNGLGENVERTEXARRAYSPROC GenVertexArrays; + PFNGLGENERATEMIPMAPPROC GenerateMipmap; + PFNGLGENERATETEXTUREMIPMAPPROC GenerateTextureMipmap; + PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC GetActiveAtomicCounterBufferiv; + PFNGLGETACTIVEATTRIBPROC GetActiveAttrib; + PFNGLGETACTIVESUBROUTINENAMEPROC GetActiveSubroutineName; + PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC GetActiveSubroutineUniformName; + PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC GetActiveSubroutineUniformiv; + PFNGLGETACTIVEUNIFORMPROC GetActiveUniform; + PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC GetActiveUniformBlockName; + PFNGLGETACTIVEUNIFORMBLOCKIVPROC GetActiveUniformBlockiv; + PFNGLGETACTIVEUNIFORMNAMEPROC GetActiveUniformName; + PFNGLGETACTIVEUNIFORMSIVPROC GetActiveUniformsiv; + PFNGLGETATTACHEDSHADERSPROC GetAttachedShaders; + PFNGLGETATTRIBLOCATIONPROC GetAttribLocation; + PFNGLGETBOOLEANI_VPROC GetBooleani_v; + PFNGLGETBOOLEANVPROC GetBooleanv; + PFNGLGETBUFFERPARAMETERI64VPROC GetBufferParameteri64v; + PFNGLGETBUFFERPARAMETERIVPROC GetBufferParameteriv; + PFNGLGETBUFFERPOINTERVPROC GetBufferPointerv; + PFNGLGETBUFFERSUBDATAPROC GetBufferSubData; + PFNGLGETCOMPRESSEDTEXIMAGEPROC GetCompressedTexImage; + PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC GetCompressedTextureImage; + PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC GetCompressedTextureSubImage; + PFNGLGETDEBUGMESSAGELOGPROC GetDebugMessageLog; + PFNGLGETDEBUGMESSAGELOGARBPROC GetDebugMessageLogARB; + PFNGLGETDOUBLEI_VPROC GetDoublei_v; + PFNGLGETDOUBLEVPROC GetDoublev; + PFNGLGETERRORPROC GetError; + PFNGLGETFIRSTPERFQUERYIDINTELPROC GetFirstPerfQueryIdINTEL; + PFNGLGETFLOATI_VPROC GetFloati_v; + PFNGLGETFLOATVPROC GetFloatv; + PFNGLGETFRAGDATAINDEXPROC GetFragDataIndex; + PFNGLGETFRAGDATALOCATIONPROC GetFragDataLocation; + PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv; + PFNGLGETFRAMEBUFFERPARAMETERIVPROC GetFramebufferParameteriv; + PFNGLGETGRAPHICSRESETSTATUSPROC GetGraphicsResetStatus; + PFNGLGETGRAPHICSRESETSTATUSARBPROC GetGraphicsResetStatusARB; + PFNGLGETIMAGEHANDLEARBPROC GetImageHandleARB; + PFNGLGETINTEGER64I_VPROC GetInteger64i_v; + PFNGLGETINTEGER64VPROC GetInteger64v; + PFNGLGETINTEGERI_VPROC GetIntegeri_v; + PFNGLGETINTEGERVPROC GetIntegerv; + PFNGLGETINTERNALFORMATI64VPROC GetInternalformati64v; + PFNGLGETINTERNALFORMATIVPROC GetInternalformativ; + PFNGLGETMULTISAMPLEFVPROC GetMultisamplefv; + PFNGLGETNAMEDBUFFERPARAMETERI64VPROC GetNamedBufferParameteri64v; + PFNGLGETNAMEDBUFFERPARAMETERIVPROC GetNamedBufferParameteriv; + PFNGLGETNAMEDBUFFERPOINTERVPROC GetNamedBufferPointerv; + PFNGLGETNAMEDBUFFERSUBDATAPROC GetNamedBufferSubData; + PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetNamedFramebufferAttachmentParameteriv; + PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC GetNamedFramebufferParameteriv; + PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC GetNamedRenderbufferParameteriv; + PFNGLGETNAMEDSTRINGARBPROC GetNamedStringARB; + PFNGLGETNAMEDSTRINGIVARBPROC GetNamedStringivARB; + PFNGLGETNEXTPERFQUERYIDINTELPROC GetNextPerfQueryIdINTEL; + PFNGLGETOBJECTLABELPROC GetObjectLabel; + PFNGLGETOBJECTPTRLABELPROC GetObjectPtrLabel; + PFNGLGETPERFCOUNTERINFOINTELPROC GetPerfCounterInfoINTEL; + PFNGLGETPERFMONITORCOUNTERDATAAMDPROC GetPerfMonitorCounterDataAMD; + PFNGLGETPERFMONITORCOUNTERINFOAMDPROC GetPerfMonitorCounterInfoAMD; + PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC GetPerfMonitorCounterStringAMD; + PFNGLGETPERFMONITORCOUNTERSAMDPROC GetPerfMonitorCountersAMD; + PFNGLGETPERFMONITORGROUPSTRINGAMDPROC GetPerfMonitorGroupStringAMD; + PFNGLGETPERFMONITORGROUPSAMDPROC GetPerfMonitorGroupsAMD; + PFNGLGETPERFQUERYDATAINTELPROC GetPerfQueryDataINTEL; + PFNGLGETPERFQUERYIDBYNAMEINTELPROC GetPerfQueryIdByNameINTEL; + PFNGLGETPERFQUERYINFOINTELPROC GetPerfQueryInfoINTEL; + PFNGLGETPOINTERVPROC GetPointerv; + PFNGLGETPROGRAMBINARYPROC GetProgramBinary; + PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog; + PFNGLGETPROGRAMINTERFACEIVPROC GetProgramInterfaceiv; + PFNGLGETPROGRAMPIPELINEINFOLOGPROC GetProgramPipelineInfoLog; + PFNGLGETPROGRAMPIPELINEIVPROC GetProgramPipelineiv; + PFNGLGETPROGRAMRESOURCEINDEXPROC GetProgramResourceIndex; + PFNGLGETPROGRAMRESOURCELOCATIONPROC GetProgramResourceLocation; + PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC GetProgramResourceLocationIndex; + PFNGLGETPROGRAMRESOURCENAMEPROC GetProgramResourceName; + PFNGLGETPROGRAMRESOURCEIVPROC GetProgramResourceiv; + PFNGLGETPROGRAMSTAGEIVPROC GetProgramStageiv; + PFNGLGETPROGRAMIVPROC GetProgramiv; + PFNGLGETQUERYBUFFEROBJECTI64VPROC GetQueryBufferObjecti64v; + PFNGLGETQUERYBUFFEROBJECTIVPROC GetQueryBufferObjectiv; + PFNGLGETQUERYBUFFEROBJECTUI64VPROC GetQueryBufferObjectui64v; + PFNGLGETQUERYBUFFEROBJECTUIVPROC GetQueryBufferObjectuiv; + PFNGLGETQUERYINDEXEDIVPROC GetQueryIndexediv; + PFNGLGETQUERYOBJECTI64VPROC GetQueryObjecti64v; + PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv; + PFNGLGETQUERYOBJECTUI64VPROC GetQueryObjectui64v; + PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv; + PFNGLGETQUERYIVPROC GetQueryiv; + PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv; + PFNGLGETSAMPLERPARAMETERIIVPROC GetSamplerParameterIiv; + PFNGLGETSAMPLERPARAMETERIUIVPROC GetSamplerParameterIuiv; + PFNGLGETSAMPLERPARAMETERFVPROC GetSamplerParameterfv; + PFNGLGETSAMPLERPARAMETERIVPROC GetSamplerParameteriv; + PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog; + PFNGLGETSHADERPRECISIONFORMATPROC GetShaderPrecisionFormat; + PFNGLGETSHADERSOURCEPROC GetShaderSource; + PFNGLGETSHADERIVPROC GetShaderiv; + PFNGLGETSTRINGPROC GetString; + PFNGLGETSTRINGIPROC GetStringi; + PFNGLGETSUBROUTINEINDEXPROC GetSubroutineIndex; + PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC GetSubroutineUniformLocation; + PFNGLGETSYNCIVPROC GetSynciv; + PFNGLGETTEXIMAGEPROC GetTexImage; + PFNGLGETTEXLEVELPARAMETERFVPROC GetTexLevelParameterfv; + PFNGLGETTEXLEVELPARAMETERIVPROC GetTexLevelParameteriv; + PFNGLGETTEXPARAMETERIIVPROC GetTexParameterIiv; + PFNGLGETTEXPARAMETERIUIVPROC GetTexParameterIuiv; + PFNGLGETTEXPARAMETERFVPROC GetTexParameterfv; + PFNGLGETTEXPARAMETERIVPROC GetTexParameteriv; + PFNGLGETTEXTUREHANDLEARBPROC GetTextureHandleARB; + PFNGLGETTEXTUREIMAGEPROC GetTextureImage; + PFNGLGETTEXTURELEVELPARAMETERFVPROC GetTextureLevelParameterfv; + PFNGLGETTEXTURELEVELPARAMETERIVPROC GetTextureLevelParameteriv; + PFNGLGETTEXTUREPARAMETERIIVPROC GetTextureParameterIiv; + PFNGLGETTEXTUREPARAMETERIUIVPROC GetTextureParameterIuiv; + PFNGLGETTEXTUREPARAMETERFVPROC GetTextureParameterfv; + PFNGLGETTEXTUREPARAMETERIVPROC GetTextureParameteriv; + PFNGLGETTEXTURESAMPLERHANDLEARBPROC GetTextureSamplerHandleARB; + PFNGLGETTEXTURESUBIMAGEPROC GetTextureSubImage; + PFNGLGETTRANSFORMFEEDBACKVARYINGPROC GetTransformFeedbackVarying; + PFNGLGETTRANSFORMFEEDBACKI64_VPROC GetTransformFeedbacki64_v; + PFNGLGETTRANSFORMFEEDBACKI_VPROC GetTransformFeedbacki_v; + PFNGLGETTRANSFORMFEEDBACKIVPROC GetTransformFeedbackiv; + PFNGLGETUNIFORMBLOCKINDEXPROC GetUniformBlockIndex; + PFNGLGETUNIFORMINDICESPROC GetUniformIndices; + PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation; + PFNGLGETUNIFORMSUBROUTINEUIVPROC GetUniformSubroutineuiv; + PFNGLGETUNIFORMDVPROC GetUniformdv; + PFNGLGETUNIFORMFVPROC GetUniformfv; + PFNGLGETUNIFORMI64VARBPROC GetUniformi64vARB; + PFNGLGETUNIFORMIVPROC GetUniformiv; + PFNGLGETUNIFORMUI64VARBPROC GetUniformui64vARB; + PFNGLGETUNIFORMUIVPROC GetUniformuiv; + PFNGLGETVERTEXARRAYINDEXED64IVPROC GetVertexArrayIndexed64iv; + PFNGLGETVERTEXARRAYINDEXEDIVPROC GetVertexArrayIndexediv; + PFNGLGETVERTEXARRAYIVPROC GetVertexArrayiv; + PFNGLGETVERTEXATTRIBIIVPROC GetVertexAttribIiv; + PFNGLGETVERTEXATTRIBIUIVPROC GetVertexAttribIuiv; + PFNGLGETVERTEXATTRIBLDVPROC GetVertexAttribLdv; + PFNGLGETVERTEXATTRIBLUI64VARBPROC GetVertexAttribLui64vARB; + PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv; + PFNGLGETVERTEXATTRIBDVPROC GetVertexAttribdv; + PFNGLGETVERTEXATTRIBFVPROC GetVertexAttribfv; + PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv; + PFNGLGETNCOMPRESSEDTEXIMAGEPROC GetnCompressedTexImage; + PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC GetnCompressedTexImageARB; + PFNGLGETNTEXIMAGEPROC GetnTexImage; + PFNGLGETNTEXIMAGEARBPROC GetnTexImageARB; + PFNGLGETNUNIFORMDVPROC GetnUniformdv; + PFNGLGETNUNIFORMDVARBPROC GetnUniformdvARB; + PFNGLGETNUNIFORMFVPROC GetnUniformfv; + PFNGLGETNUNIFORMFVARBPROC GetnUniformfvARB; + PFNGLGETNUNIFORMI64VARBPROC GetnUniformi64vARB; + PFNGLGETNUNIFORMIVPROC GetnUniformiv; + PFNGLGETNUNIFORMIVARBPROC GetnUniformivARB; + PFNGLGETNUNIFORMUI64VARBPROC GetnUniformui64vARB; + PFNGLGETNUNIFORMUIVPROC GetnUniformuiv; + PFNGLGETNUNIFORMUIVARBPROC GetnUniformuivARB; + PFNGLHINTPROC Hint; + PFNGLINVALIDATEBUFFERDATAPROC InvalidateBufferData; + PFNGLINVALIDATEBUFFERSUBDATAPROC InvalidateBufferSubData; + PFNGLINVALIDATEFRAMEBUFFERPROC InvalidateFramebuffer; + PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC InvalidateNamedFramebufferData; + PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC InvalidateNamedFramebufferSubData; + PFNGLINVALIDATESUBFRAMEBUFFERPROC InvalidateSubFramebuffer; + PFNGLINVALIDATETEXIMAGEPROC InvalidateTexImage; + PFNGLINVALIDATETEXSUBIMAGEPROC InvalidateTexSubImage; + PFNGLISBUFFERPROC IsBuffer; + PFNGLISENABLEDPROC IsEnabled; + PFNGLISENABLEDIPROC IsEnabledi; + PFNGLISFRAMEBUFFERPROC IsFramebuffer; + PFNGLISIMAGEHANDLERESIDENTARBPROC IsImageHandleResidentARB; + PFNGLISNAMEDSTRINGARBPROC IsNamedStringARB; + PFNGLISPROGRAMPROC IsProgram; + PFNGLISPROGRAMPIPELINEPROC IsProgramPipeline; + PFNGLISQUERYPROC IsQuery; + PFNGLISRENDERBUFFERPROC IsRenderbuffer; + PFNGLISSAMPLERPROC IsSampler; + PFNGLISSHADERPROC IsShader; + PFNGLISSYNCPROC IsSync; + PFNGLISTEXTUREPROC IsTexture; + PFNGLISTEXTUREHANDLERESIDENTARBPROC IsTextureHandleResidentARB; + PFNGLISTRANSFORMFEEDBACKPROC IsTransformFeedback; + PFNGLISVERTEXARRAYPROC IsVertexArray; + PFNGLLINEWIDTHPROC LineWidth; + PFNGLLINKPROGRAMPROC LinkProgram; + PFNGLLOGICOPPROC LogicOp; + PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC MakeImageHandleNonResidentARB; + PFNGLMAKEIMAGEHANDLERESIDENTARBPROC MakeImageHandleResidentARB; + PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC MakeTextureHandleNonResidentARB; + PFNGLMAKETEXTUREHANDLERESIDENTARBPROC MakeTextureHandleResidentARB; + PFNGLMAPBUFFERPROC MapBuffer; + PFNGLMAPBUFFERRANGEPROC MapBufferRange; + PFNGLMAPNAMEDBUFFERPROC MapNamedBuffer; + PFNGLMAPNAMEDBUFFERRANGEPROC MapNamedBufferRange; + PFNGLMAXSHADERCOMPILERTHREADSARBPROC MaxShaderCompilerThreadsARB; + PFNGLMEMORYBARRIERPROC MemoryBarrier; + PFNGLMEMORYBARRIERBYREGIONPROC MemoryBarrierByRegion; + PFNGLMINSAMPLESHADINGPROC MinSampleShading; + PFNGLMINSAMPLESHADINGARBPROC MinSampleShadingARB; + PFNGLMULTIDRAWARRAYSPROC MultiDrawArrays; + PFNGLMULTIDRAWARRAYSINDIRECTPROC MultiDrawArraysIndirect; + PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC MultiDrawArraysIndirectCountARB; + PFNGLMULTIDRAWELEMENTSPROC MultiDrawElements; + PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC MultiDrawElementsBaseVertex; + PFNGLMULTIDRAWELEMENTSINDIRECTPROC MultiDrawElementsIndirect; + PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC MultiDrawElementsIndirectCountARB; + PFNGLNAMEDBUFFERDATAPROC NamedBufferData; + PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC NamedBufferPageCommitmentARB; + PFNGLNAMEDBUFFERSTORAGEPROC NamedBufferStorage; + PFNGLNAMEDBUFFERSUBDATAPROC NamedBufferSubData; + PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC NamedFramebufferDrawBuffer; + PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC NamedFramebufferDrawBuffers; + PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC NamedFramebufferParameteri; + PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC NamedFramebufferReadBuffer; + PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC NamedFramebufferRenderbuffer; + PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC NamedFramebufferSampleLocationsfvARB; + PFNGLNAMEDFRAMEBUFFERTEXTUREPROC NamedFramebufferTexture; + PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC NamedFramebufferTextureLayer; + PFNGLNAMEDRENDERBUFFERSTORAGEPROC NamedRenderbufferStorage; + PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC NamedRenderbufferStorageMultisample; + PFNGLNAMEDSTRINGARBPROC NamedStringARB; + PFNGLOBJECTLABELPROC ObjectLabel; + PFNGLOBJECTPTRLABELPROC ObjectPtrLabel; + PFNGLPATCHPARAMETERFVPROC PatchParameterfv; + PFNGLPATCHPARAMETERIPROC PatchParameteri; + PFNGLPAUSETRANSFORMFEEDBACKPROC PauseTransformFeedback; + PFNGLPIXELSTOREFPROC PixelStoref; + PFNGLPIXELSTOREIPROC PixelStorei; + PFNGLPOINTPARAMETERFPROC PointParameterf; + PFNGLPOINTPARAMETERFVPROC PointParameterfv; + PFNGLPOINTPARAMETERIPROC PointParameteri; + PFNGLPOINTPARAMETERIVPROC PointParameteriv; + PFNGLPOINTSIZEPROC PointSize; + PFNGLPOLYGONMODEPROC PolygonMode; + PFNGLPOLYGONOFFSETPROC PolygonOffset; + PFNGLPOPDEBUGGROUPPROC PopDebugGroup; + PFNGLPRIMITIVEBOUNDINGBOXARBPROC PrimitiveBoundingBoxARB; + PFNGLPRIMITIVERESTARTINDEXPROC PrimitiveRestartIndex; + PFNGLPROGRAMBINARYPROC ProgramBinary; + PFNGLPROGRAMPARAMETERIPROC ProgramParameteri; + PFNGLPROGRAMPARAMETERIARBPROC ProgramParameteriARB; + PFNGLPROGRAMUNIFORM1DPROC ProgramUniform1d; + PFNGLPROGRAMUNIFORM1DVPROC ProgramUniform1dv; + PFNGLPROGRAMUNIFORM1FPROC ProgramUniform1f; + PFNGLPROGRAMUNIFORM1FVPROC ProgramUniform1fv; + PFNGLPROGRAMUNIFORM1IPROC ProgramUniform1i; + PFNGLPROGRAMUNIFORM1I64ARBPROC ProgramUniform1i64ARB; + PFNGLPROGRAMUNIFORM1I64VARBPROC ProgramUniform1i64vARB; + PFNGLPROGRAMUNIFORM1IVPROC ProgramUniform1iv; + PFNGLPROGRAMUNIFORM1UIPROC ProgramUniform1ui; + PFNGLPROGRAMUNIFORM1UI64ARBPROC ProgramUniform1ui64ARB; + PFNGLPROGRAMUNIFORM1UI64VARBPROC ProgramUniform1ui64vARB; + PFNGLPROGRAMUNIFORM1UIVPROC ProgramUniform1uiv; + PFNGLPROGRAMUNIFORM2DPROC ProgramUniform2d; + PFNGLPROGRAMUNIFORM2DVPROC ProgramUniform2dv; + PFNGLPROGRAMUNIFORM2FPROC ProgramUniform2f; + PFNGLPROGRAMUNIFORM2FVPROC ProgramUniform2fv; + PFNGLPROGRAMUNIFORM2IPROC ProgramUniform2i; + PFNGLPROGRAMUNIFORM2I64ARBPROC ProgramUniform2i64ARB; + PFNGLPROGRAMUNIFORM2I64VARBPROC ProgramUniform2i64vARB; + PFNGLPROGRAMUNIFORM2IVPROC ProgramUniform2iv; + PFNGLPROGRAMUNIFORM2UIPROC ProgramUniform2ui; + PFNGLPROGRAMUNIFORM2UI64ARBPROC ProgramUniform2ui64ARB; + PFNGLPROGRAMUNIFORM2UI64VARBPROC ProgramUniform2ui64vARB; + PFNGLPROGRAMUNIFORM2UIVPROC ProgramUniform2uiv; + PFNGLPROGRAMUNIFORM3DPROC ProgramUniform3d; + PFNGLPROGRAMUNIFORM3DVPROC ProgramUniform3dv; + PFNGLPROGRAMUNIFORM3FPROC ProgramUniform3f; + PFNGLPROGRAMUNIFORM3FVPROC ProgramUniform3fv; + PFNGLPROGRAMUNIFORM3IPROC ProgramUniform3i; + PFNGLPROGRAMUNIFORM3I64ARBPROC ProgramUniform3i64ARB; + PFNGLPROGRAMUNIFORM3I64VARBPROC ProgramUniform3i64vARB; + PFNGLPROGRAMUNIFORM3IVPROC ProgramUniform3iv; + PFNGLPROGRAMUNIFORM3UIPROC ProgramUniform3ui; + PFNGLPROGRAMUNIFORM3UI64ARBPROC ProgramUniform3ui64ARB; + PFNGLPROGRAMUNIFORM3UI64VARBPROC ProgramUniform3ui64vARB; + PFNGLPROGRAMUNIFORM3UIVPROC ProgramUniform3uiv; + PFNGLPROGRAMUNIFORM4DPROC ProgramUniform4d; + PFNGLPROGRAMUNIFORM4DVPROC ProgramUniform4dv; + PFNGLPROGRAMUNIFORM4FPROC ProgramUniform4f; + PFNGLPROGRAMUNIFORM4FVPROC ProgramUniform4fv; + PFNGLPROGRAMUNIFORM4IPROC ProgramUniform4i; + PFNGLPROGRAMUNIFORM4I64ARBPROC ProgramUniform4i64ARB; + PFNGLPROGRAMUNIFORM4I64VARBPROC ProgramUniform4i64vARB; + PFNGLPROGRAMUNIFORM4IVPROC ProgramUniform4iv; + PFNGLPROGRAMUNIFORM4UIPROC ProgramUniform4ui; + PFNGLPROGRAMUNIFORM4UI64ARBPROC ProgramUniform4ui64ARB; + PFNGLPROGRAMUNIFORM4UI64VARBPROC ProgramUniform4ui64vARB; + PFNGLPROGRAMUNIFORM4UIVPROC ProgramUniform4uiv; + PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC ProgramUniformHandleui64ARB; + PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC ProgramUniformHandleui64vARB; + PFNGLPROGRAMUNIFORMMATRIX2DVPROC ProgramUniformMatrix2dv; + PFNGLPROGRAMUNIFORMMATRIX2FVPROC ProgramUniformMatrix2fv; + PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC ProgramUniformMatrix2x3dv; + PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC ProgramUniformMatrix2x3fv; + PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC ProgramUniformMatrix2x4dv; + PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC ProgramUniformMatrix2x4fv; + PFNGLPROGRAMUNIFORMMATRIX3DVPROC ProgramUniformMatrix3dv; + PFNGLPROGRAMUNIFORMMATRIX3FVPROC ProgramUniformMatrix3fv; + PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC ProgramUniformMatrix3x2dv; + PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC ProgramUniformMatrix3x2fv; + PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC ProgramUniformMatrix3x4dv; + PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC ProgramUniformMatrix3x4fv; + PFNGLPROGRAMUNIFORMMATRIX4DVPROC ProgramUniformMatrix4dv; + PFNGLPROGRAMUNIFORMMATRIX4FVPROC ProgramUniformMatrix4fv; + PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC ProgramUniformMatrix4x2dv; + PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC ProgramUniformMatrix4x2fv; + PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC ProgramUniformMatrix4x3dv; + PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC ProgramUniformMatrix4x3fv; + PFNGLPROVOKINGVERTEXPROC ProvokingVertex; + PFNGLPUSHDEBUGGROUPPROC PushDebugGroup; + PFNGLQUERYCOUNTERPROC QueryCounter; + PFNGLREADBUFFERPROC ReadBuffer; + PFNGLREADPIXELSPROC ReadPixels; + PFNGLREADNPIXELSPROC ReadnPixels; + PFNGLREADNPIXELSARBPROC ReadnPixelsARB; + PFNGLRELEASESHADERCOMPILERPROC ReleaseShaderCompiler; + PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage; + PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample; + PFNGLRESUMETRANSFORMFEEDBACKPROC ResumeTransformFeedback; + PFNGLSAMPLECOVERAGEPROC SampleCoverage; + PFNGLSAMPLEMASKIPROC SampleMaski; + PFNGLSAMPLERPARAMETERIIVPROC SamplerParameterIiv; + PFNGLSAMPLERPARAMETERIUIVPROC SamplerParameterIuiv; + PFNGLSAMPLERPARAMETERFPROC SamplerParameterf; + PFNGLSAMPLERPARAMETERFVPROC SamplerParameterfv; + PFNGLSAMPLERPARAMETERIPROC SamplerParameteri; + PFNGLSAMPLERPARAMETERIVPROC SamplerParameteriv; + PFNGLSCISSORPROC Scissor; + PFNGLSCISSORARRAYVPROC ScissorArrayv; + PFNGLSCISSORINDEXEDPROC ScissorIndexed; + PFNGLSCISSORINDEXEDVPROC ScissorIndexedv; + PFNGLSELECTPERFMONITORCOUNTERSAMDPROC SelectPerfMonitorCountersAMD; + PFNGLSHADERBINARYPROC ShaderBinary; + PFNGLSHADERSOURCEPROC ShaderSource; + PFNGLSHADERSTORAGEBLOCKBINDINGPROC ShaderStorageBlockBinding; + PFNGLSPECIALIZESHADERARBPROC SpecializeShaderARB; + PFNGLSTENCILFUNCPROC StencilFunc; + PFNGLSTENCILFUNCSEPARATEPROC StencilFuncSeparate; + PFNGLSTENCILMASKPROC StencilMask; + PFNGLSTENCILMASKSEPARATEPROC StencilMaskSeparate; + PFNGLSTENCILOPPROC StencilOp; + PFNGLSTENCILOPSEPARATEPROC StencilOpSeparate; + PFNGLTEXBUFFERPROC TexBuffer; + PFNGLTEXBUFFERARBPROC TexBufferARB; + PFNGLTEXBUFFERRANGEPROC TexBufferRange; + PFNGLTEXIMAGE1DPROC TexImage1D; + PFNGLTEXIMAGE2DPROC TexImage2D; + PFNGLTEXIMAGE2DMULTISAMPLEPROC TexImage2DMultisample; + PFNGLTEXIMAGE3DPROC TexImage3D; + PFNGLTEXIMAGE3DMULTISAMPLEPROC TexImage3DMultisample; + PFNGLTEXPAGECOMMITMENTARBPROC TexPageCommitmentARB; + PFNGLTEXPARAMETERIIVPROC TexParameterIiv; + PFNGLTEXPARAMETERIUIVPROC TexParameterIuiv; + PFNGLTEXPARAMETERFPROC TexParameterf; + PFNGLTEXPARAMETERFVPROC TexParameterfv; + PFNGLTEXPARAMETERIPROC TexParameteri; + PFNGLTEXPARAMETERIVPROC TexParameteriv; + PFNGLTEXSTORAGE1DPROC TexStorage1D; + PFNGLTEXSTORAGE2DPROC TexStorage2D; + PFNGLTEXSTORAGE2DMULTISAMPLEPROC TexStorage2DMultisample; + PFNGLTEXSTORAGE3DPROC TexStorage3D; + PFNGLTEXSTORAGE3DMULTISAMPLEPROC TexStorage3DMultisample; + PFNGLTEXSUBIMAGE1DPROC TexSubImage1D; + PFNGLTEXSUBIMAGE2DPROC TexSubImage2D; + PFNGLTEXSUBIMAGE3DPROC TexSubImage3D; + PFNGLTEXTUREBARRIERPROC TextureBarrier; + PFNGLTEXTUREBUFFERPROC TextureBuffer; + PFNGLTEXTUREBUFFERRANGEPROC TextureBufferRange; + PFNGLTEXTUREPARAMETERIIVPROC TextureParameterIiv; + PFNGLTEXTUREPARAMETERIUIVPROC TextureParameterIuiv; + PFNGLTEXTUREPARAMETERFPROC TextureParameterf; + PFNGLTEXTUREPARAMETERFVPROC TextureParameterfv; + PFNGLTEXTUREPARAMETERIPROC TextureParameteri; + PFNGLTEXTUREPARAMETERIVPROC TextureParameteriv; + PFNGLTEXTURESTORAGE1DPROC TextureStorage1D; + PFNGLTEXTURESTORAGE2DPROC TextureStorage2D; + PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC TextureStorage2DMultisample; + PFNGLTEXTURESTORAGE3DPROC TextureStorage3D; + PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC TextureStorage3DMultisample; + PFNGLTEXTURESUBIMAGE1DPROC TextureSubImage1D; + PFNGLTEXTURESUBIMAGE2DPROC TextureSubImage2D; + PFNGLTEXTURESUBIMAGE3DPROC TextureSubImage3D; + PFNGLTEXTUREVIEWPROC TextureView; + PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC TransformFeedbackBufferBase; + PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC TransformFeedbackBufferRange; + PFNGLTRANSFORMFEEDBACKVARYINGSPROC TransformFeedbackVaryings; + PFNGLUNIFORM1DPROC Uniform1d; + PFNGLUNIFORM1DVPROC Uniform1dv; + PFNGLUNIFORM1FPROC Uniform1f; + PFNGLUNIFORM1FVPROC Uniform1fv; + PFNGLUNIFORM1IPROC Uniform1i; + PFNGLUNIFORM1I64ARBPROC Uniform1i64ARB; + PFNGLUNIFORM1I64VARBPROC Uniform1i64vARB; + PFNGLUNIFORM1IVPROC Uniform1iv; + PFNGLUNIFORM1UIPROC Uniform1ui; + PFNGLUNIFORM1UI64ARBPROC Uniform1ui64ARB; + PFNGLUNIFORM1UI64VARBPROC Uniform1ui64vARB; + PFNGLUNIFORM1UIVPROC Uniform1uiv; + PFNGLUNIFORM2DPROC Uniform2d; + PFNGLUNIFORM2DVPROC Uniform2dv; + PFNGLUNIFORM2FPROC Uniform2f; + PFNGLUNIFORM2FVPROC Uniform2fv; + PFNGLUNIFORM2IPROC Uniform2i; + PFNGLUNIFORM2I64ARBPROC Uniform2i64ARB; + PFNGLUNIFORM2I64VARBPROC Uniform2i64vARB; + PFNGLUNIFORM2IVPROC Uniform2iv; + PFNGLUNIFORM2UIPROC Uniform2ui; + PFNGLUNIFORM2UI64ARBPROC Uniform2ui64ARB; + PFNGLUNIFORM2UI64VARBPROC Uniform2ui64vARB; + PFNGLUNIFORM2UIVPROC Uniform2uiv; + PFNGLUNIFORM3DPROC Uniform3d; + PFNGLUNIFORM3DVPROC Uniform3dv; + PFNGLUNIFORM3FPROC Uniform3f; + PFNGLUNIFORM3FVPROC Uniform3fv; + PFNGLUNIFORM3IPROC Uniform3i; + PFNGLUNIFORM3I64ARBPROC Uniform3i64ARB; + PFNGLUNIFORM3I64VARBPROC Uniform3i64vARB; + PFNGLUNIFORM3IVPROC Uniform3iv; + PFNGLUNIFORM3UIPROC Uniform3ui; + PFNGLUNIFORM3UI64ARBPROC Uniform3ui64ARB; + PFNGLUNIFORM3UI64VARBPROC Uniform3ui64vARB; + PFNGLUNIFORM3UIVPROC Uniform3uiv; + PFNGLUNIFORM4DPROC Uniform4d; + PFNGLUNIFORM4DVPROC Uniform4dv; + PFNGLUNIFORM4FPROC Uniform4f; + PFNGLUNIFORM4FVPROC Uniform4fv; + PFNGLUNIFORM4IPROC Uniform4i; + PFNGLUNIFORM4I64ARBPROC Uniform4i64ARB; + PFNGLUNIFORM4I64VARBPROC Uniform4i64vARB; + PFNGLUNIFORM4IVPROC Uniform4iv; + PFNGLUNIFORM4UIPROC Uniform4ui; + PFNGLUNIFORM4UI64ARBPROC Uniform4ui64ARB; + PFNGLUNIFORM4UI64VARBPROC Uniform4ui64vARB; + PFNGLUNIFORM4UIVPROC Uniform4uiv; + PFNGLUNIFORMBLOCKBINDINGPROC UniformBlockBinding; + PFNGLUNIFORMHANDLEUI64ARBPROC UniformHandleui64ARB; + PFNGLUNIFORMHANDLEUI64VARBPROC UniformHandleui64vARB; + PFNGLUNIFORMMATRIX2DVPROC UniformMatrix2dv; + PFNGLUNIFORMMATRIX2FVPROC UniformMatrix2fv; + PFNGLUNIFORMMATRIX2X3DVPROC UniformMatrix2x3dv; + PFNGLUNIFORMMATRIX2X3FVPROC UniformMatrix2x3fv; + PFNGLUNIFORMMATRIX2X4DVPROC UniformMatrix2x4dv; + PFNGLUNIFORMMATRIX2X4FVPROC UniformMatrix2x4fv; + PFNGLUNIFORMMATRIX3DVPROC UniformMatrix3dv; + PFNGLUNIFORMMATRIX3FVPROC UniformMatrix3fv; + PFNGLUNIFORMMATRIX3X2DVPROC UniformMatrix3x2dv; + PFNGLUNIFORMMATRIX3X2FVPROC UniformMatrix3x2fv; + PFNGLUNIFORMMATRIX3X4DVPROC UniformMatrix3x4dv; + PFNGLUNIFORMMATRIX3X4FVPROC UniformMatrix3x4fv; + PFNGLUNIFORMMATRIX4DVPROC UniformMatrix4dv; + PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv; + PFNGLUNIFORMMATRIX4X2DVPROC UniformMatrix4x2dv; + PFNGLUNIFORMMATRIX4X2FVPROC UniformMatrix4x2fv; + PFNGLUNIFORMMATRIX4X3DVPROC UniformMatrix4x3dv; + PFNGLUNIFORMMATRIX4X3FVPROC UniformMatrix4x3fv; + PFNGLUNIFORMSUBROUTINESUIVPROC UniformSubroutinesuiv; + PFNGLUNMAPBUFFERPROC UnmapBuffer; + PFNGLUNMAPNAMEDBUFFERPROC UnmapNamedBuffer; + PFNGLUSEPROGRAMPROC UseProgram; + PFNGLUSEPROGRAMSTAGESPROC UseProgramStages; + PFNGLVALIDATEPROGRAMPROC ValidateProgram; + PFNGLVALIDATEPROGRAMPIPELINEPROC ValidateProgramPipeline; + PFNGLVERTEXARRAYATTRIBBINDINGPROC VertexArrayAttribBinding; + PFNGLVERTEXARRAYATTRIBFORMATPROC VertexArrayAttribFormat; + PFNGLVERTEXARRAYATTRIBIFORMATPROC VertexArrayAttribIFormat; + PFNGLVERTEXARRAYATTRIBLFORMATPROC VertexArrayAttribLFormat; + PFNGLVERTEXARRAYBINDINGDIVISORPROC VertexArrayBindingDivisor; + PFNGLVERTEXARRAYELEMENTBUFFERPROC VertexArrayElementBuffer; + PFNGLVERTEXARRAYVERTEXBUFFERPROC VertexArrayVertexBuffer; + PFNGLVERTEXARRAYVERTEXBUFFERSPROC VertexArrayVertexBuffers; + PFNGLVERTEXATTRIB1DPROC VertexAttrib1d; + PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv; + PFNGLVERTEXATTRIB1FPROC VertexAttrib1f; + PFNGLVERTEXATTRIB1FVPROC VertexAttrib1fv; + PFNGLVERTEXATTRIB1SPROC VertexAttrib1s; + PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv; + PFNGLVERTEXATTRIB2DPROC VertexAttrib2d; + PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv; + PFNGLVERTEXATTRIB2FPROC VertexAttrib2f; + PFNGLVERTEXATTRIB2FVPROC VertexAttrib2fv; + PFNGLVERTEXATTRIB2SPROC VertexAttrib2s; + PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv; + PFNGLVERTEXATTRIB3DPROC VertexAttrib3d; + PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv; + PFNGLVERTEXATTRIB3FPROC VertexAttrib3f; + PFNGLVERTEXATTRIB3FVPROC VertexAttrib3fv; + PFNGLVERTEXATTRIB3SPROC VertexAttrib3s; + PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv; + PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv; + PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv; + PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv; + PFNGLVERTEXATTRIB4NUBPROC VertexAttrib4Nub; + PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv; + PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv; + PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv; + PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv; + PFNGLVERTEXATTRIB4DPROC VertexAttrib4d; + PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv; + PFNGLVERTEXATTRIB4FPROC VertexAttrib4f; + PFNGLVERTEXATTRIB4FVPROC VertexAttrib4fv; + PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv; + PFNGLVERTEXATTRIB4SPROC VertexAttrib4s; + PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv; + PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv; + PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv; + PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv; + PFNGLVERTEXATTRIBBINDINGPROC VertexAttribBinding; + PFNGLVERTEXATTRIBDIVISORPROC VertexAttribDivisor; + PFNGLVERTEXATTRIBDIVISORARBPROC VertexAttribDivisorARB; + PFNGLVERTEXATTRIBFORMATPROC VertexAttribFormat; + PFNGLVERTEXATTRIBI1IPROC VertexAttribI1i; + PFNGLVERTEXATTRIBI1IVPROC VertexAttribI1iv; + PFNGLVERTEXATTRIBI1UIPROC VertexAttribI1ui; + PFNGLVERTEXATTRIBI1UIVPROC VertexAttribI1uiv; + PFNGLVERTEXATTRIBI2IPROC VertexAttribI2i; + PFNGLVERTEXATTRIBI2IVPROC VertexAttribI2iv; + PFNGLVERTEXATTRIBI2UIPROC VertexAttribI2ui; + PFNGLVERTEXATTRIBI2UIVPROC VertexAttribI2uiv; + PFNGLVERTEXATTRIBI3IPROC VertexAttribI3i; + PFNGLVERTEXATTRIBI3IVPROC VertexAttribI3iv; + PFNGLVERTEXATTRIBI3UIPROC VertexAttribI3ui; + PFNGLVERTEXATTRIBI3UIVPROC VertexAttribI3uiv; + PFNGLVERTEXATTRIBI4BVPROC VertexAttribI4bv; + PFNGLVERTEXATTRIBI4IPROC VertexAttribI4i; + PFNGLVERTEXATTRIBI4IVPROC VertexAttribI4iv; + PFNGLVERTEXATTRIBI4SVPROC VertexAttribI4sv; + PFNGLVERTEXATTRIBI4UBVPROC VertexAttribI4ubv; + PFNGLVERTEXATTRIBI4UIPROC VertexAttribI4ui; + PFNGLVERTEXATTRIBI4UIVPROC VertexAttribI4uiv; + PFNGLVERTEXATTRIBI4USVPROC VertexAttribI4usv; + PFNGLVERTEXATTRIBIFORMATPROC VertexAttribIFormat; + PFNGLVERTEXATTRIBIPOINTERPROC VertexAttribIPointer; + PFNGLVERTEXATTRIBL1DPROC VertexAttribL1d; + PFNGLVERTEXATTRIBL1DVPROC VertexAttribL1dv; + PFNGLVERTEXATTRIBL1UI64ARBPROC VertexAttribL1ui64ARB; + PFNGLVERTEXATTRIBL1UI64VARBPROC VertexAttribL1ui64vARB; + PFNGLVERTEXATTRIBL2DPROC VertexAttribL2d; + PFNGLVERTEXATTRIBL2DVPROC VertexAttribL2dv; + PFNGLVERTEXATTRIBL3DPROC VertexAttribL3d; + PFNGLVERTEXATTRIBL3DVPROC VertexAttribL3dv; + PFNGLVERTEXATTRIBL4DPROC VertexAttribL4d; + PFNGLVERTEXATTRIBL4DVPROC VertexAttribL4dv; + PFNGLVERTEXATTRIBLFORMATPROC VertexAttribLFormat; + PFNGLVERTEXATTRIBLPOINTERPROC VertexAttribLPointer; + PFNGLVERTEXATTRIBP1UIPROC VertexAttribP1ui; + PFNGLVERTEXATTRIBP1UIVPROC VertexAttribP1uiv; + PFNGLVERTEXATTRIBP2UIPROC VertexAttribP2ui; + PFNGLVERTEXATTRIBP2UIVPROC VertexAttribP2uiv; + PFNGLVERTEXATTRIBP3UIPROC VertexAttribP3ui; + PFNGLVERTEXATTRIBP3UIVPROC VertexAttribP3uiv; + PFNGLVERTEXATTRIBP4UIPROC VertexAttribP4ui; + PFNGLVERTEXATTRIBP4UIVPROC VertexAttribP4uiv; + PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer; + PFNGLVERTEXBINDINGDIVISORPROC VertexBindingDivisor; + PFNGLVIEWPORTPROC Viewport; + PFNGLVIEWPORTARRAYVPROC ViewportArrayv; + PFNGLVIEWPORTINDEXEDFPROC ViewportIndexedf; + PFNGLVIEWPORTINDEXEDFVPROC ViewportIndexedfv; + PFNGLWAITSYNCPROC WaitSync; } gl; }; extern union GL3WProcs gl3wProcs; /* OpenGL functions */ -#define glActiveShaderProgram gl3wProcs.gl.ActiveShaderProgram -#define glActiveTexture gl3wProcs.gl.ActiveTexture -#define glApplyFramebufferAttachmentCMAAINTEL gl3wProcs.gl.ApplyFramebufferAttachmentCMAAINTEL -#define glAttachShader gl3wProcs.gl.AttachShader -#define glBeginConditionalRender gl3wProcs.gl.BeginConditionalRender -#define glBeginPerfMonitorAMD gl3wProcs.gl.BeginPerfMonitorAMD -#define glBeginPerfQueryINTEL gl3wProcs.gl.BeginPerfQueryINTEL -#define glBeginQuery gl3wProcs.gl.BeginQuery -#define glBeginQueryIndexed gl3wProcs.gl.BeginQueryIndexed -#define glBeginTransformFeedback gl3wProcs.gl.BeginTransformFeedback -#define glBindAttribLocation gl3wProcs.gl.BindAttribLocation -#define glBindBuffer gl3wProcs.gl.BindBuffer -#define glBindBufferBase gl3wProcs.gl.BindBufferBase -#define glBindBufferRange gl3wProcs.gl.BindBufferRange -#define glBindBuffersBase gl3wProcs.gl.BindBuffersBase -#define glBindBuffersRange gl3wProcs.gl.BindBuffersRange -#define glBindFragDataLocation gl3wProcs.gl.BindFragDataLocation -#define glBindFragDataLocationIndexed gl3wProcs.gl.BindFragDataLocationIndexed -#define glBindFramebuffer gl3wProcs.gl.BindFramebuffer -#define glBindImageTexture gl3wProcs.gl.BindImageTexture -#define glBindImageTextures gl3wProcs.gl.BindImageTextures -#define glBindProgramPipeline gl3wProcs.gl.BindProgramPipeline -#define glBindRenderbuffer gl3wProcs.gl.BindRenderbuffer -#define glBindSampler gl3wProcs.gl.BindSampler -#define glBindSamplers gl3wProcs.gl.BindSamplers -#define glBindTexture gl3wProcs.gl.BindTexture -#define glBindTextureUnit gl3wProcs.gl.BindTextureUnit -#define glBindTextures gl3wProcs.gl.BindTextures -#define glBindTransformFeedback gl3wProcs.gl.BindTransformFeedback -#define glBindVertexArray gl3wProcs.gl.BindVertexArray -#define glBindVertexBuffer gl3wProcs.gl.BindVertexBuffer -#define glBindVertexBuffers gl3wProcs.gl.BindVertexBuffers -#define glBlendBarrierKHR gl3wProcs.gl.BlendBarrierKHR -#define glBlendColor gl3wProcs.gl.BlendColor -#define glBlendEquation gl3wProcs.gl.BlendEquation -#define glBlendEquationSeparate gl3wProcs.gl.BlendEquationSeparate -#define glBlendEquationSeparatei gl3wProcs.gl.BlendEquationSeparatei -#define glBlendEquationSeparateiARB gl3wProcs.gl.BlendEquationSeparateiARB -#define glBlendEquationi gl3wProcs.gl.BlendEquationi -#define glBlendEquationiARB gl3wProcs.gl.BlendEquationiARB -#define glBlendFunc gl3wProcs.gl.BlendFunc -#define glBlendFuncSeparate gl3wProcs.gl.BlendFuncSeparate -#define glBlendFuncSeparatei gl3wProcs.gl.BlendFuncSeparatei -#define glBlendFuncSeparateiARB gl3wProcs.gl.BlendFuncSeparateiARB -#define glBlendFunci gl3wProcs.gl.BlendFunci -#define glBlendFunciARB gl3wProcs.gl.BlendFunciARB -#define glBlitFramebuffer gl3wProcs.gl.BlitFramebuffer -#define glBlitNamedFramebuffer gl3wProcs.gl.BlitNamedFramebuffer -#define glBufferData gl3wProcs.gl.BufferData -#define glBufferPageCommitmentARB gl3wProcs.gl.BufferPageCommitmentARB -#define glBufferStorage gl3wProcs.gl.BufferStorage -#define glBufferSubData gl3wProcs.gl.BufferSubData -#define glCheckFramebufferStatus gl3wProcs.gl.CheckFramebufferStatus -#define glCheckNamedFramebufferStatus gl3wProcs.gl.CheckNamedFramebufferStatus -#define glClampColor gl3wProcs.gl.ClampColor -#define glClear gl3wProcs.gl.Clear -#define glClearBufferData gl3wProcs.gl.ClearBufferData -#define glClearBufferSubData gl3wProcs.gl.ClearBufferSubData -#define glClearBufferfi gl3wProcs.gl.ClearBufferfi -#define glClearBufferfv gl3wProcs.gl.ClearBufferfv -#define glClearBufferiv gl3wProcs.gl.ClearBufferiv -#define glClearBufferuiv gl3wProcs.gl.ClearBufferuiv -#define glClearColor gl3wProcs.gl.ClearColor -#define glClearDepth gl3wProcs.gl.ClearDepth -#define glClearDepthf gl3wProcs.gl.ClearDepthf -#define glClearNamedBufferData gl3wProcs.gl.ClearNamedBufferData -#define glClearNamedBufferSubData gl3wProcs.gl.ClearNamedBufferSubData -#define glClearNamedFramebufferfi gl3wProcs.gl.ClearNamedFramebufferfi -#define glClearNamedFramebufferfv gl3wProcs.gl.ClearNamedFramebufferfv -#define glClearNamedFramebufferiv gl3wProcs.gl.ClearNamedFramebufferiv -#define glClearNamedFramebufferuiv gl3wProcs.gl.ClearNamedFramebufferuiv -#define glClearStencil gl3wProcs.gl.ClearStencil -#define glClearTexImage gl3wProcs.gl.ClearTexImage -#define glClearTexSubImage gl3wProcs.gl.ClearTexSubImage -#define glClientWaitSync gl3wProcs.gl.ClientWaitSync -#define glClipControl gl3wProcs.gl.ClipControl -#define glColorMask gl3wProcs.gl.ColorMask -#define glColorMaski gl3wProcs.gl.ColorMaski -#define glCompileShader gl3wProcs.gl.CompileShader -#define glCompileShaderIncludeARB gl3wProcs.gl.CompileShaderIncludeARB -#define glCompressedTexImage1D gl3wProcs.gl.CompressedTexImage1D -#define glCompressedTexImage2D gl3wProcs.gl.CompressedTexImage2D -#define glCompressedTexImage3D gl3wProcs.gl.CompressedTexImage3D -#define glCompressedTexSubImage1D gl3wProcs.gl.CompressedTexSubImage1D -#define glCompressedTexSubImage2D gl3wProcs.gl.CompressedTexSubImage2D -#define glCompressedTexSubImage3D gl3wProcs.gl.CompressedTexSubImage3D -#define glCompressedTextureSubImage1D gl3wProcs.gl.CompressedTextureSubImage1D -#define glCompressedTextureSubImage2D gl3wProcs.gl.CompressedTextureSubImage2D -#define glCompressedTextureSubImage3D gl3wProcs.gl.CompressedTextureSubImage3D -#define glCopyBufferSubData gl3wProcs.gl.CopyBufferSubData -#define glCopyImageSubData gl3wProcs.gl.CopyImageSubData -#define glCopyNamedBufferSubData gl3wProcs.gl.CopyNamedBufferSubData -#define glCopyTexImage1D gl3wProcs.gl.CopyTexImage1D -#define glCopyTexImage2D gl3wProcs.gl.CopyTexImage2D -#define glCopyTexSubImage1D gl3wProcs.gl.CopyTexSubImage1D -#define glCopyTexSubImage2D gl3wProcs.gl.CopyTexSubImage2D -#define glCopyTexSubImage3D gl3wProcs.gl.CopyTexSubImage3D -#define glCopyTextureSubImage1D gl3wProcs.gl.CopyTextureSubImage1D -#define glCopyTextureSubImage2D gl3wProcs.gl.CopyTextureSubImage2D -#define glCopyTextureSubImage3D gl3wProcs.gl.CopyTextureSubImage3D -#define glCreateBuffers gl3wProcs.gl.CreateBuffers -#define glCreateFramebuffers gl3wProcs.gl.CreateFramebuffers -#define glCreatePerfQueryINTEL gl3wProcs.gl.CreatePerfQueryINTEL -#define glCreateProgram gl3wProcs.gl.CreateProgram -#define glCreateProgramPipelines gl3wProcs.gl.CreateProgramPipelines -#define glCreateQueries gl3wProcs.gl.CreateQueries -#define glCreateRenderbuffers gl3wProcs.gl.CreateRenderbuffers -#define glCreateSamplers gl3wProcs.gl.CreateSamplers -#define glCreateShader gl3wProcs.gl.CreateShader -#define glCreateShaderProgramv gl3wProcs.gl.CreateShaderProgramv -#define glCreateSyncFromCLeventARB gl3wProcs.gl.CreateSyncFromCLeventARB -#define glCreateTextures gl3wProcs.gl.CreateTextures -#define glCreateTransformFeedbacks gl3wProcs.gl.CreateTransformFeedbacks -#define glCreateVertexArrays gl3wProcs.gl.CreateVertexArrays -#define glCullFace gl3wProcs.gl.CullFace -#define glDebugMessageCallback gl3wProcs.gl.DebugMessageCallback -#define glDebugMessageCallbackARB gl3wProcs.gl.DebugMessageCallbackARB -#define glDebugMessageControl gl3wProcs.gl.DebugMessageControl -#define glDebugMessageControlARB gl3wProcs.gl.DebugMessageControlARB -#define glDebugMessageInsert gl3wProcs.gl.DebugMessageInsert -#define glDebugMessageInsertARB gl3wProcs.gl.DebugMessageInsertARB -#define glDeleteBuffers gl3wProcs.gl.DeleteBuffers -#define glDeleteFramebuffers gl3wProcs.gl.DeleteFramebuffers -#define glDeleteNamedStringARB gl3wProcs.gl.DeleteNamedStringARB -#define glDeletePerfMonitorsAMD gl3wProcs.gl.DeletePerfMonitorsAMD -#define glDeletePerfQueryINTEL gl3wProcs.gl.DeletePerfQueryINTEL -#define glDeleteProgram gl3wProcs.gl.DeleteProgram -#define glDeleteProgramPipelines gl3wProcs.gl.DeleteProgramPipelines -#define glDeleteQueries gl3wProcs.gl.DeleteQueries -#define glDeleteRenderbuffers gl3wProcs.gl.DeleteRenderbuffers -#define glDeleteSamplers gl3wProcs.gl.DeleteSamplers -#define glDeleteShader gl3wProcs.gl.DeleteShader -#define glDeleteSync gl3wProcs.gl.DeleteSync -#define glDeleteTextures gl3wProcs.gl.DeleteTextures -#define glDeleteTransformFeedbacks gl3wProcs.gl.DeleteTransformFeedbacks -#define glDeleteVertexArrays gl3wProcs.gl.DeleteVertexArrays -#define glDepthFunc gl3wProcs.gl.DepthFunc -#define glDepthMask gl3wProcs.gl.DepthMask -#define glDepthRange gl3wProcs.gl.DepthRange -#define glDepthRangeArrayv gl3wProcs.gl.DepthRangeArrayv -#define glDepthRangeIndexed gl3wProcs.gl.DepthRangeIndexed -#define glDepthRangef gl3wProcs.gl.DepthRangef -#define glDetachShader gl3wProcs.gl.DetachShader -#define glDisable gl3wProcs.gl.Disable -#define glDisableVertexArrayAttrib gl3wProcs.gl.DisableVertexArrayAttrib -#define glDisableVertexAttribArray gl3wProcs.gl.DisableVertexAttribArray -#define glDisablei gl3wProcs.gl.Disablei -#define glDispatchCompute gl3wProcs.gl.DispatchCompute -#define glDispatchComputeGroupSizeARB gl3wProcs.gl.DispatchComputeGroupSizeARB -#define glDispatchComputeIndirect gl3wProcs.gl.DispatchComputeIndirect -#define glDrawArrays gl3wProcs.gl.DrawArrays -#define glDrawArraysIndirect gl3wProcs.gl.DrawArraysIndirect -#define glDrawArraysInstanced gl3wProcs.gl.DrawArraysInstanced -#define glDrawArraysInstancedARB gl3wProcs.gl.DrawArraysInstancedARB -#define glDrawArraysInstancedBaseInstance gl3wProcs.gl.DrawArraysInstancedBaseInstance -#define glDrawBuffer gl3wProcs.gl.DrawBuffer -#define glDrawBuffers gl3wProcs.gl.DrawBuffers -#define glDrawElements gl3wProcs.gl.DrawElements -#define glDrawElementsBaseVertex gl3wProcs.gl.DrawElementsBaseVertex -#define glDrawElementsIndirect gl3wProcs.gl.DrawElementsIndirect -#define glDrawElementsInstanced gl3wProcs.gl.DrawElementsInstanced -#define glDrawElementsInstancedARB gl3wProcs.gl.DrawElementsInstancedARB -#define glDrawElementsInstancedBaseInstance gl3wProcs.gl.DrawElementsInstancedBaseInstance -#define glDrawElementsInstancedBaseVertex gl3wProcs.gl.DrawElementsInstancedBaseVertex -#define glDrawElementsInstancedBaseVertexBaseInstance gl3wProcs.gl.DrawElementsInstancedBaseVertexBaseInstance -#define glDrawRangeElements gl3wProcs.gl.DrawRangeElements -#define glDrawRangeElementsBaseVertex gl3wProcs.gl.DrawRangeElementsBaseVertex -#define glDrawTransformFeedback gl3wProcs.gl.DrawTransformFeedback -#define glDrawTransformFeedbackInstanced gl3wProcs.gl.DrawTransformFeedbackInstanced -#define glDrawTransformFeedbackStream gl3wProcs.gl.DrawTransformFeedbackStream -#define glDrawTransformFeedbackStreamInstanced gl3wProcs.gl.DrawTransformFeedbackStreamInstanced -#define glEnable gl3wProcs.gl.Enable -#define glEnableVertexArrayAttrib gl3wProcs.gl.EnableVertexArrayAttrib -#define glEnableVertexAttribArray gl3wProcs.gl.EnableVertexAttribArray -#define glEnablei gl3wProcs.gl.Enablei -#define glEndConditionalRender gl3wProcs.gl.EndConditionalRender -#define glEndPerfMonitorAMD gl3wProcs.gl.EndPerfMonitorAMD -#define glEndPerfQueryINTEL gl3wProcs.gl.EndPerfQueryINTEL -#define glEndQuery gl3wProcs.gl.EndQuery -#define glEndQueryIndexed gl3wProcs.gl.EndQueryIndexed -#define glEndTransformFeedback gl3wProcs.gl.EndTransformFeedback -#define glEvaluateDepthValuesARB gl3wProcs.gl.EvaluateDepthValuesARB -#define glFenceSync gl3wProcs.gl.FenceSync -#define glFinish gl3wProcs.gl.Finish -#define glFlush gl3wProcs.gl.Flush -#define glFlushMappedBufferRange gl3wProcs.gl.FlushMappedBufferRange -#define glFlushMappedNamedBufferRange gl3wProcs.gl.FlushMappedNamedBufferRange -#define glFramebufferParameteri gl3wProcs.gl.FramebufferParameteri -#define glFramebufferRenderbuffer gl3wProcs.gl.FramebufferRenderbuffer -#define glFramebufferSampleLocationsfvARB gl3wProcs.gl.FramebufferSampleLocationsfvARB -#define glFramebufferTexture gl3wProcs.gl.FramebufferTexture -#define glFramebufferTexture1D gl3wProcs.gl.FramebufferTexture1D -#define glFramebufferTexture2D gl3wProcs.gl.FramebufferTexture2D -#define glFramebufferTexture3D gl3wProcs.gl.FramebufferTexture3D -#define glFramebufferTextureARB gl3wProcs.gl.FramebufferTextureARB -#define glFramebufferTextureFaceARB gl3wProcs.gl.FramebufferTextureFaceARB -#define glFramebufferTextureLayer gl3wProcs.gl.FramebufferTextureLayer -#define glFramebufferTextureLayerARB gl3wProcs.gl.FramebufferTextureLayerARB -#define glFrontFace gl3wProcs.gl.FrontFace -#define glGenBuffers gl3wProcs.gl.GenBuffers -#define glGenFramebuffers gl3wProcs.gl.GenFramebuffers -#define glGenPerfMonitorsAMD gl3wProcs.gl.GenPerfMonitorsAMD -#define glGenProgramPipelines gl3wProcs.gl.GenProgramPipelines -#define glGenQueries gl3wProcs.gl.GenQueries -#define glGenRenderbuffers gl3wProcs.gl.GenRenderbuffers -#define glGenSamplers gl3wProcs.gl.GenSamplers -#define glGenTextures gl3wProcs.gl.GenTextures -#define glGenTransformFeedbacks gl3wProcs.gl.GenTransformFeedbacks -#define glGenVertexArrays gl3wProcs.gl.GenVertexArrays -#define glGenerateMipmap gl3wProcs.gl.GenerateMipmap -#define glGenerateTextureMipmap gl3wProcs.gl.GenerateTextureMipmap -#define glGetActiveAtomicCounterBufferiv gl3wProcs.gl.GetActiveAtomicCounterBufferiv -#define glGetActiveAttrib gl3wProcs.gl.GetActiveAttrib -#define glGetActiveSubroutineName gl3wProcs.gl.GetActiveSubroutineName -#define glGetActiveSubroutineUniformName gl3wProcs.gl.GetActiveSubroutineUniformName -#define glGetActiveSubroutineUniformiv gl3wProcs.gl.GetActiveSubroutineUniformiv -#define glGetActiveUniform gl3wProcs.gl.GetActiveUniform -#define glGetActiveUniformBlockName gl3wProcs.gl.GetActiveUniformBlockName -#define glGetActiveUniformBlockiv gl3wProcs.gl.GetActiveUniformBlockiv -#define glGetActiveUniformName gl3wProcs.gl.GetActiveUniformName -#define glGetActiveUniformsiv gl3wProcs.gl.GetActiveUniformsiv -#define glGetAttachedShaders gl3wProcs.gl.GetAttachedShaders -#define glGetAttribLocation gl3wProcs.gl.GetAttribLocation -#define glGetBooleani_v gl3wProcs.gl.GetBooleani_v -#define glGetBooleanv gl3wProcs.gl.GetBooleanv -#define glGetBufferParameteri64v gl3wProcs.gl.GetBufferParameteri64v -#define glGetBufferParameteriv gl3wProcs.gl.GetBufferParameteriv -#define glGetBufferPointerv gl3wProcs.gl.GetBufferPointerv -#define glGetBufferSubData gl3wProcs.gl.GetBufferSubData -#define glGetCompressedTexImage gl3wProcs.gl.GetCompressedTexImage -#define glGetCompressedTextureImage gl3wProcs.gl.GetCompressedTextureImage -#define glGetCompressedTextureSubImage gl3wProcs.gl.GetCompressedTextureSubImage -#define glGetDebugMessageLog gl3wProcs.gl.GetDebugMessageLog -#define glGetDebugMessageLogARB gl3wProcs.gl.GetDebugMessageLogARB -#define glGetDoublei_v gl3wProcs.gl.GetDoublei_v -#define glGetDoublev gl3wProcs.gl.GetDoublev -#define glGetError gl3wProcs.gl.GetError -#define glGetFirstPerfQueryIdINTEL gl3wProcs.gl.GetFirstPerfQueryIdINTEL -#define glGetFloati_v gl3wProcs.gl.GetFloati_v -#define glGetFloatv gl3wProcs.gl.GetFloatv -#define glGetFragDataIndex gl3wProcs.gl.GetFragDataIndex -#define glGetFragDataLocation gl3wProcs.gl.GetFragDataLocation -#define glGetFramebufferAttachmentParameteriv gl3wProcs.gl.GetFramebufferAttachmentParameteriv -#define glGetFramebufferParameteriv gl3wProcs.gl.GetFramebufferParameteriv -#define glGetGraphicsResetStatus gl3wProcs.gl.GetGraphicsResetStatus -#define glGetGraphicsResetStatusARB gl3wProcs.gl.GetGraphicsResetStatusARB -#define glGetImageHandleARB gl3wProcs.gl.GetImageHandleARB -#define glGetInteger64i_v gl3wProcs.gl.GetInteger64i_v -#define glGetInteger64v gl3wProcs.gl.GetInteger64v -#define glGetIntegeri_v gl3wProcs.gl.GetIntegeri_v -#define glGetIntegerv gl3wProcs.gl.GetIntegerv -#define glGetInternalformati64v gl3wProcs.gl.GetInternalformati64v -#define glGetInternalformativ gl3wProcs.gl.GetInternalformativ -#define glGetMultisamplefv gl3wProcs.gl.GetMultisamplefv -#define glGetNamedBufferParameteri64v gl3wProcs.gl.GetNamedBufferParameteri64v -#define glGetNamedBufferParameteriv gl3wProcs.gl.GetNamedBufferParameteriv -#define glGetNamedBufferPointerv gl3wProcs.gl.GetNamedBufferPointerv -#define glGetNamedBufferSubData gl3wProcs.gl.GetNamedBufferSubData -#define glGetNamedFramebufferAttachmentParameteriv gl3wProcs.gl.GetNamedFramebufferAttachmentParameteriv -#define glGetNamedFramebufferParameteriv gl3wProcs.gl.GetNamedFramebufferParameteriv -#define glGetNamedRenderbufferParameteriv gl3wProcs.gl.GetNamedRenderbufferParameteriv -#define glGetNamedStringARB gl3wProcs.gl.GetNamedStringARB -#define glGetNamedStringivARB gl3wProcs.gl.GetNamedStringivARB -#define glGetNextPerfQueryIdINTEL gl3wProcs.gl.GetNextPerfQueryIdINTEL -#define glGetObjectLabel gl3wProcs.gl.GetObjectLabel -#define glGetObjectPtrLabel gl3wProcs.gl.GetObjectPtrLabel -#define glGetPerfCounterInfoINTEL gl3wProcs.gl.GetPerfCounterInfoINTEL -#define glGetPerfMonitorCounterDataAMD gl3wProcs.gl.GetPerfMonitorCounterDataAMD -#define glGetPerfMonitorCounterInfoAMD gl3wProcs.gl.GetPerfMonitorCounterInfoAMD -#define glGetPerfMonitorCounterStringAMD gl3wProcs.gl.GetPerfMonitorCounterStringAMD -#define glGetPerfMonitorCountersAMD gl3wProcs.gl.GetPerfMonitorCountersAMD -#define glGetPerfMonitorGroupStringAMD gl3wProcs.gl.GetPerfMonitorGroupStringAMD -#define glGetPerfMonitorGroupsAMD gl3wProcs.gl.GetPerfMonitorGroupsAMD -#define glGetPerfQueryDataINTEL gl3wProcs.gl.GetPerfQueryDataINTEL -#define glGetPerfQueryIdByNameINTEL gl3wProcs.gl.GetPerfQueryIdByNameINTEL -#define glGetPerfQueryInfoINTEL gl3wProcs.gl.GetPerfQueryInfoINTEL -#define glGetPointerv gl3wProcs.gl.GetPointerv -#define glGetProgramBinary gl3wProcs.gl.GetProgramBinary -#define glGetProgramInfoLog gl3wProcs.gl.GetProgramInfoLog -#define glGetProgramInterfaceiv gl3wProcs.gl.GetProgramInterfaceiv -#define glGetProgramPipelineInfoLog gl3wProcs.gl.GetProgramPipelineInfoLog -#define glGetProgramPipelineiv gl3wProcs.gl.GetProgramPipelineiv -#define glGetProgramResourceIndex gl3wProcs.gl.GetProgramResourceIndex -#define glGetProgramResourceLocation gl3wProcs.gl.GetProgramResourceLocation -#define glGetProgramResourceLocationIndex gl3wProcs.gl.GetProgramResourceLocationIndex -#define glGetProgramResourceName gl3wProcs.gl.GetProgramResourceName -#define glGetProgramResourceiv gl3wProcs.gl.GetProgramResourceiv -#define glGetProgramStageiv gl3wProcs.gl.GetProgramStageiv -#define glGetProgramiv gl3wProcs.gl.GetProgramiv -#define glGetQueryBufferObjecti64v gl3wProcs.gl.GetQueryBufferObjecti64v -#define glGetQueryBufferObjectiv gl3wProcs.gl.GetQueryBufferObjectiv -#define glGetQueryBufferObjectui64v gl3wProcs.gl.GetQueryBufferObjectui64v -#define glGetQueryBufferObjectuiv gl3wProcs.gl.GetQueryBufferObjectuiv -#define glGetQueryIndexediv gl3wProcs.gl.GetQueryIndexediv -#define glGetQueryObjecti64v gl3wProcs.gl.GetQueryObjecti64v -#define glGetQueryObjectiv gl3wProcs.gl.GetQueryObjectiv -#define glGetQueryObjectui64v gl3wProcs.gl.GetQueryObjectui64v -#define glGetQueryObjectuiv gl3wProcs.gl.GetQueryObjectuiv -#define glGetQueryiv gl3wProcs.gl.GetQueryiv -#define glGetRenderbufferParameteriv gl3wProcs.gl.GetRenderbufferParameteriv -#define glGetSamplerParameterIiv gl3wProcs.gl.GetSamplerParameterIiv -#define glGetSamplerParameterIuiv gl3wProcs.gl.GetSamplerParameterIuiv -#define glGetSamplerParameterfv gl3wProcs.gl.GetSamplerParameterfv -#define glGetSamplerParameteriv gl3wProcs.gl.GetSamplerParameteriv -#define glGetShaderInfoLog gl3wProcs.gl.GetShaderInfoLog -#define glGetShaderPrecisionFormat gl3wProcs.gl.GetShaderPrecisionFormat -#define glGetShaderSource gl3wProcs.gl.GetShaderSource -#define glGetShaderiv gl3wProcs.gl.GetShaderiv -#define glGetString gl3wProcs.gl.GetString -#define glGetStringi gl3wProcs.gl.GetStringi -#define glGetSubroutineIndex gl3wProcs.gl.GetSubroutineIndex -#define glGetSubroutineUniformLocation gl3wProcs.gl.GetSubroutineUniformLocation -#define glGetSynciv gl3wProcs.gl.GetSynciv -#define glGetTexImage gl3wProcs.gl.GetTexImage -#define glGetTexLevelParameterfv gl3wProcs.gl.GetTexLevelParameterfv -#define glGetTexLevelParameteriv gl3wProcs.gl.GetTexLevelParameteriv -#define glGetTexParameterIiv gl3wProcs.gl.GetTexParameterIiv -#define glGetTexParameterIuiv gl3wProcs.gl.GetTexParameterIuiv -#define glGetTexParameterfv gl3wProcs.gl.GetTexParameterfv -#define glGetTexParameteriv gl3wProcs.gl.GetTexParameteriv -#define glGetTextureHandleARB gl3wProcs.gl.GetTextureHandleARB -#define glGetTextureImage gl3wProcs.gl.GetTextureImage -#define glGetTextureLevelParameterfv gl3wProcs.gl.GetTextureLevelParameterfv -#define glGetTextureLevelParameteriv gl3wProcs.gl.GetTextureLevelParameteriv -#define glGetTextureParameterIiv gl3wProcs.gl.GetTextureParameterIiv -#define glGetTextureParameterIuiv gl3wProcs.gl.GetTextureParameterIuiv -#define glGetTextureParameterfv gl3wProcs.gl.GetTextureParameterfv -#define glGetTextureParameteriv gl3wProcs.gl.GetTextureParameteriv -#define glGetTextureSamplerHandleARB gl3wProcs.gl.GetTextureSamplerHandleARB -#define glGetTextureSubImage gl3wProcs.gl.GetTextureSubImage -#define glGetTransformFeedbackVarying gl3wProcs.gl.GetTransformFeedbackVarying -#define glGetTransformFeedbacki64_v gl3wProcs.gl.GetTransformFeedbacki64_v -#define glGetTransformFeedbacki_v gl3wProcs.gl.GetTransformFeedbacki_v -#define glGetTransformFeedbackiv gl3wProcs.gl.GetTransformFeedbackiv -#define glGetUniformBlockIndex gl3wProcs.gl.GetUniformBlockIndex -#define glGetUniformIndices gl3wProcs.gl.GetUniformIndices -#define glGetUniformLocation gl3wProcs.gl.GetUniformLocation -#define glGetUniformSubroutineuiv gl3wProcs.gl.GetUniformSubroutineuiv -#define glGetUniformdv gl3wProcs.gl.GetUniformdv -#define glGetUniformfv gl3wProcs.gl.GetUniformfv -#define glGetUniformi64vARB gl3wProcs.gl.GetUniformi64vARB -#define glGetUniformiv gl3wProcs.gl.GetUniformiv -#define glGetUniformui64vARB gl3wProcs.gl.GetUniformui64vARB -#define glGetUniformuiv gl3wProcs.gl.GetUniformuiv -#define glGetVertexArrayIndexed64iv gl3wProcs.gl.GetVertexArrayIndexed64iv -#define glGetVertexArrayIndexediv gl3wProcs.gl.GetVertexArrayIndexediv -#define glGetVertexArrayiv gl3wProcs.gl.GetVertexArrayiv -#define glGetVertexAttribIiv gl3wProcs.gl.GetVertexAttribIiv -#define glGetVertexAttribIuiv gl3wProcs.gl.GetVertexAttribIuiv -#define glGetVertexAttribLdv gl3wProcs.gl.GetVertexAttribLdv -#define glGetVertexAttribLui64vARB gl3wProcs.gl.GetVertexAttribLui64vARB -#define glGetVertexAttribPointerv gl3wProcs.gl.GetVertexAttribPointerv -#define glGetVertexAttribdv gl3wProcs.gl.GetVertexAttribdv -#define glGetVertexAttribfv gl3wProcs.gl.GetVertexAttribfv -#define glGetVertexAttribiv gl3wProcs.gl.GetVertexAttribiv -#define glGetnCompressedTexImage gl3wProcs.gl.GetnCompressedTexImage -#define glGetnCompressedTexImageARB gl3wProcs.gl.GetnCompressedTexImageARB -#define glGetnTexImage gl3wProcs.gl.GetnTexImage -#define glGetnTexImageARB gl3wProcs.gl.GetnTexImageARB -#define glGetnUniformdv gl3wProcs.gl.GetnUniformdv -#define glGetnUniformdvARB gl3wProcs.gl.GetnUniformdvARB -#define glGetnUniformfv gl3wProcs.gl.GetnUniformfv -#define glGetnUniformfvARB gl3wProcs.gl.GetnUniformfvARB -#define glGetnUniformi64vARB gl3wProcs.gl.GetnUniformi64vARB -#define glGetnUniformiv gl3wProcs.gl.GetnUniformiv -#define glGetnUniformivARB gl3wProcs.gl.GetnUniformivARB -#define glGetnUniformui64vARB gl3wProcs.gl.GetnUniformui64vARB -#define glGetnUniformuiv gl3wProcs.gl.GetnUniformuiv -#define glGetnUniformuivARB gl3wProcs.gl.GetnUniformuivARB -#define glHint gl3wProcs.gl.Hint -#define glInvalidateBufferData gl3wProcs.gl.InvalidateBufferData -#define glInvalidateBufferSubData gl3wProcs.gl.InvalidateBufferSubData -#define glInvalidateFramebuffer gl3wProcs.gl.InvalidateFramebuffer -#define glInvalidateNamedFramebufferData gl3wProcs.gl.InvalidateNamedFramebufferData -#define glInvalidateNamedFramebufferSubData gl3wProcs.gl.InvalidateNamedFramebufferSubData -#define glInvalidateSubFramebuffer gl3wProcs.gl.InvalidateSubFramebuffer -#define glInvalidateTexImage gl3wProcs.gl.InvalidateTexImage -#define glInvalidateTexSubImage gl3wProcs.gl.InvalidateTexSubImage -#define glIsBuffer gl3wProcs.gl.IsBuffer -#define glIsEnabled gl3wProcs.gl.IsEnabled -#define glIsEnabledi gl3wProcs.gl.IsEnabledi -#define glIsFramebuffer gl3wProcs.gl.IsFramebuffer -#define glIsImageHandleResidentARB gl3wProcs.gl.IsImageHandleResidentARB -#define glIsNamedStringARB gl3wProcs.gl.IsNamedStringARB -#define glIsProgram gl3wProcs.gl.IsProgram -#define glIsProgramPipeline gl3wProcs.gl.IsProgramPipeline -#define glIsQuery gl3wProcs.gl.IsQuery -#define glIsRenderbuffer gl3wProcs.gl.IsRenderbuffer -#define glIsSampler gl3wProcs.gl.IsSampler -#define glIsShader gl3wProcs.gl.IsShader -#define glIsSync gl3wProcs.gl.IsSync -#define glIsTexture gl3wProcs.gl.IsTexture -#define glIsTextureHandleResidentARB gl3wProcs.gl.IsTextureHandleResidentARB -#define glIsTransformFeedback gl3wProcs.gl.IsTransformFeedback -#define glIsVertexArray gl3wProcs.gl.IsVertexArray -#define glLineWidth gl3wProcs.gl.LineWidth -#define glLinkProgram gl3wProcs.gl.LinkProgram -#define glLogicOp gl3wProcs.gl.LogicOp -#define glMakeImageHandleNonResidentARB gl3wProcs.gl.MakeImageHandleNonResidentARB -#define glMakeImageHandleResidentARB gl3wProcs.gl.MakeImageHandleResidentARB -#define glMakeTextureHandleNonResidentARB gl3wProcs.gl.MakeTextureHandleNonResidentARB -#define glMakeTextureHandleResidentARB gl3wProcs.gl.MakeTextureHandleResidentARB -#define glMapBuffer gl3wProcs.gl.MapBuffer -#define glMapBufferRange gl3wProcs.gl.MapBufferRange -#define glMapNamedBuffer gl3wProcs.gl.MapNamedBuffer -#define glMapNamedBufferRange gl3wProcs.gl.MapNamedBufferRange -#define glMaxShaderCompilerThreadsARB gl3wProcs.gl.MaxShaderCompilerThreadsARB -#define glMemoryBarrier gl3wProcs.gl.MemoryBarrier -#define glMemoryBarrierByRegion gl3wProcs.gl.MemoryBarrierByRegion -#define glMinSampleShading gl3wProcs.gl.MinSampleShading -#define glMinSampleShadingARB gl3wProcs.gl.MinSampleShadingARB -#define glMultiDrawArrays gl3wProcs.gl.MultiDrawArrays -#define glMultiDrawArraysIndirect gl3wProcs.gl.MultiDrawArraysIndirect -#define glMultiDrawArraysIndirectCountARB gl3wProcs.gl.MultiDrawArraysIndirectCountARB -#define glMultiDrawElements gl3wProcs.gl.MultiDrawElements -#define glMultiDrawElementsBaseVertex gl3wProcs.gl.MultiDrawElementsBaseVertex -#define glMultiDrawElementsIndirect gl3wProcs.gl.MultiDrawElementsIndirect -#define glMultiDrawElementsIndirectCountARB gl3wProcs.gl.MultiDrawElementsIndirectCountARB -#define glNamedBufferData gl3wProcs.gl.NamedBufferData -#define glNamedBufferPageCommitmentARB gl3wProcs.gl.NamedBufferPageCommitmentARB -#define glNamedBufferStorage gl3wProcs.gl.NamedBufferStorage -#define glNamedBufferSubData gl3wProcs.gl.NamedBufferSubData -#define glNamedFramebufferDrawBuffer gl3wProcs.gl.NamedFramebufferDrawBuffer -#define glNamedFramebufferDrawBuffers gl3wProcs.gl.NamedFramebufferDrawBuffers -#define glNamedFramebufferParameteri gl3wProcs.gl.NamedFramebufferParameteri -#define glNamedFramebufferReadBuffer gl3wProcs.gl.NamedFramebufferReadBuffer -#define glNamedFramebufferRenderbuffer gl3wProcs.gl.NamedFramebufferRenderbuffer -#define glNamedFramebufferSampleLocationsfvARB gl3wProcs.gl.NamedFramebufferSampleLocationsfvARB -#define glNamedFramebufferTexture gl3wProcs.gl.NamedFramebufferTexture -#define glNamedFramebufferTextureLayer gl3wProcs.gl.NamedFramebufferTextureLayer -#define glNamedRenderbufferStorage gl3wProcs.gl.NamedRenderbufferStorage -#define glNamedRenderbufferStorageMultisample gl3wProcs.gl.NamedRenderbufferStorageMultisample -#define glNamedStringARB gl3wProcs.gl.NamedStringARB -#define glObjectLabel gl3wProcs.gl.ObjectLabel -#define glObjectPtrLabel gl3wProcs.gl.ObjectPtrLabel -#define glPatchParameterfv gl3wProcs.gl.PatchParameterfv -#define glPatchParameteri gl3wProcs.gl.PatchParameteri -#define glPauseTransformFeedback gl3wProcs.gl.PauseTransformFeedback -#define glPixelStoref gl3wProcs.gl.PixelStoref -#define glPixelStorei gl3wProcs.gl.PixelStorei -#define glPointParameterf gl3wProcs.gl.PointParameterf -#define glPointParameterfv gl3wProcs.gl.PointParameterfv -#define glPointParameteri gl3wProcs.gl.PointParameteri -#define glPointParameteriv gl3wProcs.gl.PointParameteriv -#define glPointSize gl3wProcs.gl.PointSize -#define glPolygonMode gl3wProcs.gl.PolygonMode -#define glPolygonOffset gl3wProcs.gl.PolygonOffset -#define glPopDebugGroup gl3wProcs.gl.PopDebugGroup -#define glPrimitiveBoundingBoxARB gl3wProcs.gl.PrimitiveBoundingBoxARB -#define glPrimitiveRestartIndex gl3wProcs.gl.PrimitiveRestartIndex -#define glProgramBinary gl3wProcs.gl.ProgramBinary -#define glProgramParameteri gl3wProcs.gl.ProgramParameteri -#define glProgramParameteriARB gl3wProcs.gl.ProgramParameteriARB -#define glProgramUniform1d gl3wProcs.gl.ProgramUniform1d -#define glProgramUniform1dv gl3wProcs.gl.ProgramUniform1dv -#define glProgramUniform1f gl3wProcs.gl.ProgramUniform1f -#define glProgramUniform1fv gl3wProcs.gl.ProgramUniform1fv -#define glProgramUniform1i gl3wProcs.gl.ProgramUniform1i -#define glProgramUniform1i64ARB gl3wProcs.gl.ProgramUniform1i64ARB -#define glProgramUniform1i64vARB gl3wProcs.gl.ProgramUniform1i64vARB -#define glProgramUniform1iv gl3wProcs.gl.ProgramUniform1iv -#define glProgramUniform1ui gl3wProcs.gl.ProgramUniform1ui -#define glProgramUniform1ui64ARB gl3wProcs.gl.ProgramUniform1ui64ARB -#define glProgramUniform1ui64vARB gl3wProcs.gl.ProgramUniform1ui64vARB -#define glProgramUniform1uiv gl3wProcs.gl.ProgramUniform1uiv -#define glProgramUniform2d gl3wProcs.gl.ProgramUniform2d -#define glProgramUniform2dv gl3wProcs.gl.ProgramUniform2dv -#define glProgramUniform2f gl3wProcs.gl.ProgramUniform2f -#define glProgramUniform2fv gl3wProcs.gl.ProgramUniform2fv -#define glProgramUniform2i gl3wProcs.gl.ProgramUniform2i -#define glProgramUniform2i64ARB gl3wProcs.gl.ProgramUniform2i64ARB -#define glProgramUniform2i64vARB gl3wProcs.gl.ProgramUniform2i64vARB -#define glProgramUniform2iv gl3wProcs.gl.ProgramUniform2iv -#define glProgramUniform2ui gl3wProcs.gl.ProgramUniform2ui -#define glProgramUniform2ui64ARB gl3wProcs.gl.ProgramUniform2ui64ARB -#define glProgramUniform2ui64vARB gl3wProcs.gl.ProgramUniform2ui64vARB -#define glProgramUniform2uiv gl3wProcs.gl.ProgramUniform2uiv -#define glProgramUniform3d gl3wProcs.gl.ProgramUniform3d -#define glProgramUniform3dv gl3wProcs.gl.ProgramUniform3dv -#define glProgramUniform3f gl3wProcs.gl.ProgramUniform3f -#define glProgramUniform3fv gl3wProcs.gl.ProgramUniform3fv -#define glProgramUniform3i gl3wProcs.gl.ProgramUniform3i -#define glProgramUniform3i64ARB gl3wProcs.gl.ProgramUniform3i64ARB -#define glProgramUniform3i64vARB gl3wProcs.gl.ProgramUniform3i64vARB -#define glProgramUniform3iv gl3wProcs.gl.ProgramUniform3iv -#define glProgramUniform3ui gl3wProcs.gl.ProgramUniform3ui -#define glProgramUniform3ui64ARB gl3wProcs.gl.ProgramUniform3ui64ARB -#define glProgramUniform3ui64vARB gl3wProcs.gl.ProgramUniform3ui64vARB -#define glProgramUniform3uiv gl3wProcs.gl.ProgramUniform3uiv -#define glProgramUniform4d gl3wProcs.gl.ProgramUniform4d -#define glProgramUniform4dv gl3wProcs.gl.ProgramUniform4dv -#define glProgramUniform4f gl3wProcs.gl.ProgramUniform4f -#define glProgramUniform4fv gl3wProcs.gl.ProgramUniform4fv -#define glProgramUniform4i gl3wProcs.gl.ProgramUniform4i -#define glProgramUniform4i64ARB gl3wProcs.gl.ProgramUniform4i64ARB -#define glProgramUniform4i64vARB gl3wProcs.gl.ProgramUniform4i64vARB -#define glProgramUniform4iv gl3wProcs.gl.ProgramUniform4iv -#define glProgramUniform4ui gl3wProcs.gl.ProgramUniform4ui -#define glProgramUniform4ui64ARB gl3wProcs.gl.ProgramUniform4ui64ARB -#define glProgramUniform4ui64vARB gl3wProcs.gl.ProgramUniform4ui64vARB -#define glProgramUniform4uiv gl3wProcs.gl.ProgramUniform4uiv -#define glProgramUniformHandleui64ARB gl3wProcs.gl.ProgramUniformHandleui64ARB -#define glProgramUniformHandleui64vARB gl3wProcs.gl.ProgramUniformHandleui64vARB -#define glProgramUniformMatrix2dv gl3wProcs.gl.ProgramUniformMatrix2dv -#define glProgramUniformMatrix2fv gl3wProcs.gl.ProgramUniformMatrix2fv -#define glProgramUniformMatrix2x3dv gl3wProcs.gl.ProgramUniformMatrix2x3dv -#define glProgramUniformMatrix2x3fv gl3wProcs.gl.ProgramUniformMatrix2x3fv -#define glProgramUniformMatrix2x4dv gl3wProcs.gl.ProgramUniformMatrix2x4dv -#define glProgramUniformMatrix2x4fv gl3wProcs.gl.ProgramUniformMatrix2x4fv -#define glProgramUniformMatrix3dv gl3wProcs.gl.ProgramUniformMatrix3dv -#define glProgramUniformMatrix3fv gl3wProcs.gl.ProgramUniformMatrix3fv -#define glProgramUniformMatrix3x2dv gl3wProcs.gl.ProgramUniformMatrix3x2dv -#define glProgramUniformMatrix3x2fv gl3wProcs.gl.ProgramUniformMatrix3x2fv -#define glProgramUniformMatrix3x4dv gl3wProcs.gl.ProgramUniformMatrix3x4dv -#define glProgramUniformMatrix3x4fv gl3wProcs.gl.ProgramUniformMatrix3x4fv -#define glProgramUniformMatrix4dv gl3wProcs.gl.ProgramUniformMatrix4dv -#define glProgramUniformMatrix4fv gl3wProcs.gl.ProgramUniformMatrix4fv -#define glProgramUniformMatrix4x2dv gl3wProcs.gl.ProgramUniformMatrix4x2dv -#define glProgramUniformMatrix4x2fv gl3wProcs.gl.ProgramUniformMatrix4x2fv -#define glProgramUniformMatrix4x3dv gl3wProcs.gl.ProgramUniformMatrix4x3dv -#define glProgramUniformMatrix4x3fv gl3wProcs.gl.ProgramUniformMatrix4x3fv -#define glProvokingVertex gl3wProcs.gl.ProvokingVertex -#define glPushDebugGroup gl3wProcs.gl.PushDebugGroup -#define glQueryCounter gl3wProcs.gl.QueryCounter -#define glReadBuffer gl3wProcs.gl.ReadBuffer -#define glReadPixels gl3wProcs.gl.ReadPixels -#define glReadnPixels gl3wProcs.gl.ReadnPixels -#define glReadnPixelsARB gl3wProcs.gl.ReadnPixelsARB -#define glReleaseShaderCompiler gl3wProcs.gl.ReleaseShaderCompiler -#define glRenderbufferStorage gl3wProcs.gl.RenderbufferStorage -#define glRenderbufferStorageMultisample gl3wProcs.gl.RenderbufferStorageMultisample -#define glResumeTransformFeedback gl3wProcs.gl.ResumeTransformFeedback -#define glSampleCoverage gl3wProcs.gl.SampleCoverage -#define glSampleMaski gl3wProcs.gl.SampleMaski -#define glSamplerParameterIiv gl3wProcs.gl.SamplerParameterIiv -#define glSamplerParameterIuiv gl3wProcs.gl.SamplerParameterIuiv -#define glSamplerParameterf gl3wProcs.gl.SamplerParameterf -#define glSamplerParameterfv gl3wProcs.gl.SamplerParameterfv -#define glSamplerParameteri gl3wProcs.gl.SamplerParameteri -#define glSamplerParameteriv gl3wProcs.gl.SamplerParameteriv -#define glScissor gl3wProcs.gl.Scissor -#define glScissorArrayv gl3wProcs.gl.ScissorArrayv -#define glScissorIndexed gl3wProcs.gl.ScissorIndexed -#define glScissorIndexedv gl3wProcs.gl.ScissorIndexedv -#define glSelectPerfMonitorCountersAMD gl3wProcs.gl.SelectPerfMonitorCountersAMD -#define glShaderBinary gl3wProcs.gl.ShaderBinary -#define glShaderSource gl3wProcs.gl.ShaderSource -#define glShaderStorageBlockBinding gl3wProcs.gl.ShaderStorageBlockBinding -#define glSpecializeShaderARB gl3wProcs.gl.SpecializeShaderARB -#define glStencilFunc gl3wProcs.gl.StencilFunc -#define glStencilFuncSeparate gl3wProcs.gl.StencilFuncSeparate -#define glStencilMask gl3wProcs.gl.StencilMask -#define glStencilMaskSeparate gl3wProcs.gl.StencilMaskSeparate -#define glStencilOp gl3wProcs.gl.StencilOp -#define glStencilOpSeparate gl3wProcs.gl.StencilOpSeparate -#define glTexBuffer gl3wProcs.gl.TexBuffer -#define glTexBufferARB gl3wProcs.gl.TexBufferARB -#define glTexBufferRange gl3wProcs.gl.TexBufferRange -#define glTexImage1D gl3wProcs.gl.TexImage1D -#define glTexImage2D gl3wProcs.gl.TexImage2D -#define glTexImage2DMultisample gl3wProcs.gl.TexImage2DMultisample -#define glTexImage3D gl3wProcs.gl.TexImage3D -#define glTexImage3DMultisample gl3wProcs.gl.TexImage3DMultisample -#define glTexPageCommitmentARB gl3wProcs.gl.TexPageCommitmentARB -#define glTexParameterIiv gl3wProcs.gl.TexParameterIiv -#define glTexParameterIuiv gl3wProcs.gl.TexParameterIuiv -#define glTexParameterf gl3wProcs.gl.TexParameterf -#define glTexParameterfv gl3wProcs.gl.TexParameterfv -#define glTexParameteri gl3wProcs.gl.TexParameteri -#define glTexParameteriv gl3wProcs.gl.TexParameteriv -#define glTexStorage1D gl3wProcs.gl.TexStorage1D -#define glTexStorage2D gl3wProcs.gl.TexStorage2D -#define glTexStorage2DMultisample gl3wProcs.gl.TexStorage2DMultisample -#define glTexStorage3D gl3wProcs.gl.TexStorage3D -#define glTexStorage3DMultisample gl3wProcs.gl.TexStorage3DMultisample -#define glTexSubImage1D gl3wProcs.gl.TexSubImage1D -#define glTexSubImage2D gl3wProcs.gl.TexSubImage2D -#define glTexSubImage3D gl3wProcs.gl.TexSubImage3D -#define glTextureBarrier gl3wProcs.gl.TextureBarrier -#define glTextureBuffer gl3wProcs.gl.TextureBuffer -#define glTextureBufferRange gl3wProcs.gl.TextureBufferRange -#define glTextureParameterIiv gl3wProcs.gl.TextureParameterIiv -#define glTextureParameterIuiv gl3wProcs.gl.TextureParameterIuiv -#define glTextureParameterf gl3wProcs.gl.TextureParameterf -#define glTextureParameterfv gl3wProcs.gl.TextureParameterfv -#define glTextureParameteri gl3wProcs.gl.TextureParameteri -#define glTextureParameteriv gl3wProcs.gl.TextureParameteriv -#define glTextureStorage1D gl3wProcs.gl.TextureStorage1D -#define glTextureStorage2D gl3wProcs.gl.TextureStorage2D -#define glTextureStorage2DMultisample gl3wProcs.gl.TextureStorage2DMultisample -#define glTextureStorage3D gl3wProcs.gl.TextureStorage3D -#define glTextureStorage3DMultisample gl3wProcs.gl.TextureStorage3DMultisample -#define glTextureSubImage1D gl3wProcs.gl.TextureSubImage1D -#define glTextureSubImage2D gl3wProcs.gl.TextureSubImage2D -#define glTextureSubImage3D gl3wProcs.gl.TextureSubImage3D -#define glTextureView gl3wProcs.gl.TextureView -#define glTransformFeedbackBufferBase gl3wProcs.gl.TransformFeedbackBufferBase -#define glTransformFeedbackBufferRange gl3wProcs.gl.TransformFeedbackBufferRange -#define glTransformFeedbackVaryings gl3wProcs.gl.TransformFeedbackVaryings -#define glUniform1d gl3wProcs.gl.Uniform1d -#define glUniform1dv gl3wProcs.gl.Uniform1dv -#define glUniform1f gl3wProcs.gl.Uniform1f -#define glUniform1fv gl3wProcs.gl.Uniform1fv -#define glUniform1i gl3wProcs.gl.Uniform1i -#define glUniform1i64ARB gl3wProcs.gl.Uniform1i64ARB -#define glUniform1i64vARB gl3wProcs.gl.Uniform1i64vARB -#define glUniform1iv gl3wProcs.gl.Uniform1iv -#define glUniform1ui gl3wProcs.gl.Uniform1ui -#define glUniform1ui64ARB gl3wProcs.gl.Uniform1ui64ARB -#define glUniform1ui64vARB gl3wProcs.gl.Uniform1ui64vARB -#define glUniform1uiv gl3wProcs.gl.Uniform1uiv -#define glUniform2d gl3wProcs.gl.Uniform2d -#define glUniform2dv gl3wProcs.gl.Uniform2dv -#define glUniform2f gl3wProcs.gl.Uniform2f -#define glUniform2fv gl3wProcs.gl.Uniform2fv -#define glUniform2i gl3wProcs.gl.Uniform2i -#define glUniform2i64ARB gl3wProcs.gl.Uniform2i64ARB -#define glUniform2i64vARB gl3wProcs.gl.Uniform2i64vARB -#define glUniform2iv gl3wProcs.gl.Uniform2iv -#define glUniform2ui gl3wProcs.gl.Uniform2ui -#define glUniform2ui64ARB gl3wProcs.gl.Uniform2ui64ARB -#define glUniform2ui64vARB gl3wProcs.gl.Uniform2ui64vARB -#define glUniform2uiv gl3wProcs.gl.Uniform2uiv -#define glUniform3d gl3wProcs.gl.Uniform3d -#define glUniform3dv gl3wProcs.gl.Uniform3dv -#define glUniform3f gl3wProcs.gl.Uniform3f -#define glUniform3fv gl3wProcs.gl.Uniform3fv -#define glUniform3i gl3wProcs.gl.Uniform3i -#define glUniform3i64ARB gl3wProcs.gl.Uniform3i64ARB -#define glUniform3i64vARB gl3wProcs.gl.Uniform3i64vARB -#define glUniform3iv gl3wProcs.gl.Uniform3iv -#define glUniform3ui gl3wProcs.gl.Uniform3ui -#define glUniform3ui64ARB gl3wProcs.gl.Uniform3ui64ARB -#define glUniform3ui64vARB gl3wProcs.gl.Uniform3ui64vARB -#define glUniform3uiv gl3wProcs.gl.Uniform3uiv -#define glUniform4d gl3wProcs.gl.Uniform4d -#define glUniform4dv gl3wProcs.gl.Uniform4dv -#define glUniform4f gl3wProcs.gl.Uniform4f -#define glUniform4fv gl3wProcs.gl.Uniform4fv -#define glUniform4i gl3wProcs.gl.Uniform4i -#define glUniform4i64ARB gl3wProcs.gl.Uniform4i64ARB -#define glUniform4i64vARB gl3wProcs.gl.Uniform4i64vARB -#define glUniform4iv gl3wProcs.gl.Uniform4iv -#define glUniform4ui gl3wProcs.gl.Uniform4ui -#define glUniform4ui64ARB gl3wProcs.gl.Uniform4ui64ARB -#define glUniform4ui64vARB gl3wProcs.gl.Uniform4ui64vARB -#define glUniform4uiv gl3wProcs.gl.Uniform4uiv -#define glUniformBlockBinding gl3wProcs.gl.UniformBlockBinding -#define glUniformHandleui64ARB gl3wProcs.gl.UniformHandleui64ARB -#define glUniformHandleui64vARB gl3wProcs.gl.UniformHandleui64vARB -#define glUniformMatrix2dv gl3wProcs.gl.UniformMatrix2dv -#define glUniformMatrix2fv gl3wProcs.gl.UniformMatrix2fv -#define glUniformMatrix2x3dv gl3wProcs.gl.UniformMatrix2x3dv -#define glUniformMatrix2x3fv gl3wProcs.gl.UniformMatrix2x3fv -#define glUniformMatrix2x4dv gl3wProcs.gl.UniformMatrix2x4dv -#define glUniformMatrix2x4fv gl3wProcs.gl.UniformMatrix2x4fv -#define glUniformMatrix3dv gl3wProcs.gl.UniformMatrix3dv -#define glUniformMatrix3fv gl3wProcs.gl.UniformMatrix3fv -#define glUniformMatrix3x2dv gl3wProcs.gl.UniformMatrix3x2dv -#define glUniformMatrix3x2fv gl3wProcs.gl.UniformMatrix3x2fv -#define glUniformMatrix3x4dv gl3wProcs.gl.UniformMatrix3x4dv -#define glUniformMatrix3x4fv gl3wProcs.gl.UniformMatrix3x4fv -#define glUniformMatrix4dv gl3wProcs.gl.UniformMatrix4dv -#define glUniformMatrix4fv gl3wProcs.gl.UniformMatrix4fv -#define glUniformMatrix4x2dv gl3wProcs.gl.UniformMatrix4x2dv -#define glUniformMatrix4x2fv gl3wProcs.gl.UniformMatrix4x2fv -#define glUniformMatrix4x3dv gl3wProcs.gl.UniformMatrix4x3dv -#define glUniformMatrix4x3fv gl3wProcs.gl.UniformMatrix4x3fv -#define glUniformSubroutinesuiv gl3wProcs.gl.UniformSubroutinesuiv -#define glUnmapBuffer gl3wProcs.gl.UnmapBuffer -#define glUnmapNamedBuffer gl3wProcs.gl.UnmapNamedBuffer -#define glUseProgram gl3wProcs.gl.UseProgram -#define glUseProgramStages gl3wProcs.gl.UseProgramStages -#define glValidateProgram gl3wProcs.gl.ValidateProgram -#define glValidateProgramPipeline gl3wProcs.gl.ValidateProgramPipeline -#define glVertexArrayAttribBinding gl3wProcs.gl.VertexArrayAttribBinding -#define glVertexArrayAttribFormat gl3wProcs.gl.VertexArrayAttribFormat -#define glVertexArrayAttribIFormat gl3wProcs.gl.VertexArrayAttribIFormat -#define glVertexArrayAttribLFormat gl3wProcs.gl.VertexArrayAttribLFormat -#define glVertexArrayBindingDivisor gl3wProcs.gl.VertexArrayBindingDivisor -#define glVertexArrayElementBuffer gl3wProcs.gl.VertexArrayElementBuffer -#define glVertexArrayVertexBuffer gl3wProcs.gl.VertexArrayVertexBuffer -#define glVertexArrayVertexBuffers gl3wProcs.gl.VertexArrayVertexBuffers -#define glVertexAttrib1d gl3wProcs.gl.VertexAttrib1d -#define glVertexAttrib1dv gl3wProcs.gl.VertexAttrib1dv -#define glVertexAttrib1f gl3wProcs.gl.VertexAttrib1f -#define glVertexAttrib1fv gl3wProcs.gl.VertexAttrib1fv -#define glVertexAttrib1s gl3wProcs.gl.VertexAttrib1s -#define glVertexAttrib1sv gl3wProcs.gl.VertexAttrib1sv -#define glVertexAttrib2d gl3wProcs.gl.VertexAttrib2d -#define glVertexAttrib2dv gl3wProcs.gl.VertexAttrib2dv -#define glVertexAttrib2f gl3wProcs.gl.VertexAttrib2f -#define glVertexAttrib2fv gl3wProcs.gl.VertexAttrib2fv -#define glVertexAttrib2s gl3wProcs.gl.VertexAttrib2s -#define glVertexAttrib2sv gl3wProcs.gl.VertexAttrib2sv -#define glVertexAttrib3d gl3wProcs.gl.VertexAttrib3d -#define glVertexAttrib3dv gl3wProcs.gl.VertexAttrib3dv -#define glVertexAttrib3f gl3wProcs.gl.VertexAttrib3f -#define glVertexAttrib3fv gl3wProcs.gl.VertexAttrib3fv -#define glVertexAttrib3s gl3wProcs.gl.VertexAttrib3s -#define glVertexAttrib3sv gl3wProcs.gl.VertexAttrib3sv -#define glVertexAttrib4Nbv gl3wProcs.gl.VertexAttrib4Nbv -#define glVertexAttrib4Niv gl3wProcs.gl.VertexAttrib4Niv -#define glVertexAttrib4Nsv gl3wProcs.gl.VertexAttrib4Nsv -#define glVertexAttrib4Nub gl3wProcs.gl.VertexAttrib4Nub -#define glVertexAttrib4Nubv gl3wProcs.gl.VertexAttrib4Nubv -#define glVertexAttrib4Nuiv gl3wProcs.gl.VertexAttrib4Nuiv -#define glVertexAttrib4Nusv gl3wProcs.gl.VertexAttrib4Nusv -#define glVertexAttrib4bv gl3wProcs.gl.VertexAttrib4bv -#define glVertexAttrib4d gl3wProcs.gl.VertexAttrib4d -#define glVertexAttrib4dv gl3wProcs.gl.VertexAttrib4dv -#define glVertexAttrib4f gl3wProcs.gl.VertexAttrib4f -#define glVertexAttrib4fv gl3wProcs.gl.VertexAttrib4fv -#define glVertexAttrib4iv gl3wProcs.gl.VertexAttrib4iv -#define glVertexAttrib4s gl3wProcs.gl.VertexAttrib4s -#define glVertexAttrib4sv gl3wProcs.gl.VertexAttrib4sv -#define glVertexAttrib4ubv gl3wProcs.gl.VertexAttrib4ubv -#define glVertexAttrib4uiv gl3wProcs.gl.VertexAttrib4uiv -#define glVertexAttrib4usv gl3wProcs.gl.VertexAttrib4usv -#define glVertexAttribBinding gl3wProcs.gl.VertexAttribBinding -#define glVertexAttribDivisor gl3wProcs.gl.VertexAttribDivisor -#define glVertexAttribDivisorARB gl3wProcs.gl.VertexAttribDivisorARB -#define glVertexAttribFormat gl3wProcs.gl.VertexAttribFormat -#define glVertexAttribI1i gl3wProcs.gl.VertexAttribI1i -#define glVertexAttribI1iv gl3wProcs.gl.VertexAttribI1iv -#define glVertexAttribI1ui gl3wProcs.gl.VertexAttribI1ui -#define glVertexAttribI1uiv gl3wProcs.gl.VertexAttribI1uiv -#define glVertexAttribI2i gl3wProcs.gl.VertexAttribI2i -#define glVertexAttribI2iv gl3wProcs.gl.VertexAttribI2iv -#define glVertexAttribI2ui gl3wProcs.gl.VertexAttribI2ui -#define glVertexAttribI2uiv gl3wProcs.gl.VertexAttribI2uiv -#define glVertexAttribI3i gl3wProcs.gl.VertexAttribI3i -#define glVertexAttribI3iv gl3wProcs.gl.VertexAttribI3iv -#define glVertexAttribI3ui gl3wProcs.gl.VertexAttribI3ui -#define glVertexAttribI3uiv gl3wProcs.gl.VertexAttribI3uiv -#define glVertexAttribI4bv gl3wProcs.gl.VertexAttribI4bv -#define glVertexAttribI4i gl3wProcs.gl.VertexAttribI4i -#define glVertexAttribI4iv gl3wProcs.gl.VertexAttribI4iv -#define glVertexAttribI4sv gl3wProcs.gl.VertexAttribI4sv -#define glVertexAttribI4ubv gl3wProcs.gl.VertexAttribI4ubv -#define glVertexAttribI4ui gl3wProcs.gl.VertexAttribI4ui -#define glVertexAttribI4uiv gl3wProcs.gl.VertexAttribI4uiv -#define glVertexAttribI4usv gl3wProcs.gl.VertexAttribI4usv -#define glVertexAttribIFormat gl3wProcs.gl.VertexAttribIFormat -#define glVertexAttribIPointer gl3wProcs.gl.VertexAttribIPointer -#define glVertexAttribL1d gl3wProcs.gl.VertexAttribL1d -#define glVertexAttribL1dv gl3wProcs.gl.VertexAttribL1dv -#define glVertexAttribL1ui64ARB gl3wProcs.gl.VertexAttribL1ui64ARB -#define glVertexAttribL1ui64vARB gl3wProcs.gl.VertexAttribL1ui64vARB -#define glVertexAttribL2d gl3wProcs.gl.VertexAttribL2d -#define glVertexAttribL2dv gl3wProcs.gl.VertexAttribL2dv -#define glVertexAttribL3d gl3wProcs.gl.VertexAttribL3d -#define glVertexAttribL3dv gl3wProcs.gl.VertexAttribL3dv -#define glVertexAttribL4d gl3wProcs.gl.VertexAttribL4d -#define glVertexAttribL4dv gl3wProcs.gl.VertexAttribL4dv -#define glVertexAttribLFormat gl3wProcs.gl.VertexAttribLFormat -#define glVertexAttribLPointer gl3wProcs.gl.VertexAttribLPointer -#define glVertexAttribP1ui gl3wProcs.gl.VertexAttribP1ui -#define glVertexAttribP1uiv gl3wProcs.gl.VertexAttribP1uiv -#define glVertexAttribP2ui gl3wProcs.gl.VertexAttribP2ui -#define glVertexAttribP2uiv gl3wProcs.gl.VertexAttribP2uiv -#define glVertexAttribP3ui gl3wProcs.gl.VertexAttribP3ui -#define glVertexAttribP3uiv gl3wProcs.gl.VertexAttribP3uiv -#define glVertexAttribP4ui gl3wProcs.gl.VertexAttribP4ui -#define glVertexAttribP4uiv gl3wProcs.gl.VertexAttribP4uiv -#define glVertexAttribPointer gl3wProcs.gl.VertexAttribPointer -#define glVertexBindingDivisor gl3wProcs.gl.VertexBindingDivisor -#define glViewport gl3wProcs.gl.Viewport -#define glViewportArrayv gl3wProcs.gl.ViewportArrayv -#define glViewportIndexedf gl3wProcs.gl.ViewportIndexedf -#define glViewportIndexedfv gl3wProcs.gl.ViewportIndexedfv -#define glWaitSync gl3wProcs.gl.WaitSync +#define glActiveShaderProgram gl3wProcs.gl.ActiveShaderProgram +#define glActiveTexture gl3wProcs.gl.ActiveTexture +#define glApplyFramebufferAttachmentCMAAINTEL gl3wProcs.gl.ApplyFramebufferAttachmentCMAAINTEL +#define glAttachShader gl3wProcs.gl.AttachShader +#define glBeginConditionalRender gl3wProcs.gl.BeginConditionalRender +#define glBeginPerfMonitorAMD gl3wProcs.gl.BeginPerfMonitorAMD +#define glBeginPerfQueryINTEL gl3wProcs.gl.BeginPerfQueryINTEL +#define glBeginQuery gl3wProcs.gl.BeginQuery +#define glBeginQueryIndexed gl3wProcs.gl.BeginQueryIndexed +#define glBeginTransformFeedback gl3wProcs.gl.BeginTransformFeedback +#define glBindAttribLocation gl3wProcs.gl.BindAttribLocation +#define glBindBuffer gl3wProcs.gl.BindBuffer +#define glBindBufferBase gl3wProcs.gl.BindBufferBase +#define glBindBufferRange gl3wProcs.gl.BindBufferRange +#define glBindBuffersBase gl3wProcs.gl.BindBuffersBase +#define glBindBuffersRange gl3wProcs.gl.BindBuffersRange +#define glBindFragDataLocation gl3wProcs.gl.BindFragDataLocation +#define glBindFragDataLocationIndexed gl3wProcs.gl.BindFragDataLocationIndexed +#define glBindFramebuffer gl3wProcs.gl.BindFramebuffer +#define glBindImageTexture gl3wProcs.gl.BindImageTexture +#define glBindImageTextures gl3wProcs.gl.BindImageTextures +#define glBindProgramPipeline gl3wProcs.gl.BindProgramPipeline +#define glBindRenderbuffer gl3wProcs.gl.BindRenderbuffer +#define glBindSampler gl3wProcs.gl.BindSampler +#define glBindSamplers gl3wProcs.gl.BindSamplers +#define glBindTexture gl3wProcs.gl.BindTexture +#define glBindTextureUnit gl3wProcs.gl.BindTextureUnit +#define glBindTextures gl3wProcs.gl.BindTextures +#define glBindTransformFeedback gl3wProcs.gl.BindTransformFeedback +#define glBindVertexArray gl3wProcs.gl.BindVertexArray +#define glBindVertexBuffer gl3wProcs.gl.BindVertexBuffer +#define glBindVertexBuffers gl3wProcs.gl.BindVertexBuffers +#define glBlendBarrierKHR gl3wProcs.gl.BlendBarrierKHR +#define glBlendColor gl3wProcs.gl.BlendColor +#define glBlendEquation gl3wProcs.gl.BlendEquation +#define glBlendEquationSeparate gl3wProcs.gl.BlendEquationSeparate +#define glBlendEquationSeparatei gl3wProcs.gl.BlendEquationSeparatei +#define glBlendEquationSeparateiARB gl3wProcs.gl.BlendEquationSeparateiARB +#define glBlendEquationi gl3wProcs.gl.BlendEquationi +#define glBlendEquationiARB gl3wProcs.gl.BlendEquationiARB +#define glBlendFunc gl3wProcs.gl.BlendFunc +#define glBlendFuncSeparate gl3wProcs.gl.BlendFuncSeparate +#define glBlendFuncSeparatei gl3wProcs.gl.BlendFuncSeparatei +#define glBlendFuncSeparateiARB gl3wProcs.gl.BlendFuncSeparateiARB +#define glBlendFunci gl3wProcs.gl.BlendFunci +#define glBlendFunciARB gl3wProcs.gl.BlendFunciARB +#define glBlitFramebuffer gl3wProcs.gl.BlitFramebuffer +#define glBlitNamedFramebuffer gl3wProcs.gl.BlitNamedFramebuffer +#define glBufferData gl3wProcs.gl.BufferData +#define glBufferPageCommitmentARB gl3wProcs.gl.BufferPageCommitmentARB +#define glBufferStorage gl3wProcs.gl.BufferStorage +#define glBufferSubData gl3wProcs.gl.BufferSubData +#define glCheckFramebufferStatus gl3wProcs.gl.CheckFramebufferStatus +#define glCheckNamedFramebufferStatus gl3wProcs.gl.CheckNamedFramebufferStatus +#define glClampColor gl3wProcs.gl.ClampColor +#define glClear gl3wProcs.gl.Clear +#define glClearBufferData gl3wProcs.gl.ClearBufferData +#define glClearBufferSubData gl3wProcs.gl.ClearBufferSubData +#define glClearBufferfi gl3wProcs.gl.ClearBufferfi +#define glClearBufferfv gl3wProcs.gl.ClearBufferfv +#define glClearBufferiv gl3wProcs.gl.ClearBufferiv +#define glClearBufferuiv gl3wProcs.gl.ClearBufferuiv +#define glClearColor gl3wProcs.gl.ClearColor +#define glClearDepth gl3wProcs.gl.ClearDepth +#define glClearDepthf gl3wProcs.gl.ClearDepthf +#define glClearNamedBufferData gl3wProcs.gl.ClearNamedBufferData +#define glClearNamedBufferSubData gl3wProcs.gl.ClearNamedBufferSubData +#define glClearNamedFramebufferfi gl3wProcs.gl.ClearNamedFramebufferfi +#define glClearNamedFramebufferfv gl3wProcs.gl.ClearNamedFramebufferfv +#define glClearNamedFramebufferiv gl3wProcs.gl.ClearNamedFramebufferiv +#define glClearNamedFramebufferuiv gl3wProcs.gl.ClearNamedFramebufferuiv +#define glClearStencil gl3wProcs.gl.ClearStencil +#define glClearTexImage gl3wProcs.gl.ClearTexImage +#define glClearTexSubImage gl3wProcs.gl.ClearTexSubImage +#define glClientWaitSync gl3wProcs.gl.ClientWaitSync +#define glClipControl gl3wProcs.gl.ClipControl +#define glColorMask gl3wProcs.gl.ColorMask +#define glColorMaski gl3wProcs.gl.ColorMaski +#define glCompileShader gl3wProcs.gl.CompileShader +#define glCompileShaderIncludeARB gl3wProcs.gl.CompileShaderIncludeARB +#define glCompressedTexImage1D gl3wProcs.gl.CompressedTexImage1D +#define glCompressedTexImage2D gl3wProcs.gl.CompressedTexImage2D +#define glCompressedTexImage3D gl3wProcs.gl.CompressedTexImage3D +#define glCompressedTexSubImage1D gl3wProcs.gl.CompressedTexSubImage1D +#define glCompressedTexSubImage2D gl3wProcs.gl.CompressedTexSubImage2D +#define glCompressedTexSubImage3D gl3wProcs.gl.CompressedTexSubImage3D +#define glCompressedTextureSubImage1D gl3wProcs.gl.CompressedTextureSubImage1D +#define glCompressedTextureSubImage2D gl3wProcs.gl.CompressedTextureSubImage2D +#define glCompressedTextureSubImage3D gl3wProcs.gl.CompressedTextureSubImage3D +#define glCopyBufferSubData gl3wProcs.gl.CopyBufferSubData +#define glCopyImageSubData gl3wProcs.gl.CopyImageSubData +#define glCopyNamedBufferSubData gl3wProcs.gl.CopyNamedBufferSubData +#define glCopyTexImage1D gl3wProcs.gl.CopyTexImage1D +#define glCopyTexImage2D gl3wProcs.gl.CopyTexImage2D +#define glCopyTexSubImage1D gl3wProcs.gl.CopyTexSubImage1D +#define glCopyTexSubImage2D gl3wProcs.gl.CopyTexSubImage2D +#define glCopyTexSubImage3D gl3wProcs.gl.CopyTexSubImage3D +#define glCopyTextureSubImage1D gl3wProcs.gl.CopyTextureSubImage1D +#define glCopyTextureSubImage2D gl3wProcs.gl.CopyTextureSubImage2D +#define glCopyTextureSubImage3D gl3wProcs.gl.CopyTextureSubImage3D +#define glCreateBuffers gl3wProcs.gl.CreateBuffers +#define glCreateFramebuffers gl3wProcs.gl.CreateFramebuffers +#define glCreatePerfQueryINTEL gl3wProcs.gl.CreatePerfQueryINTEL +#define glCreateProgram gl3wProcs.gl.CreateProgram +#define glCreateProgramPipelines gl3wProcs.gl.CreateProgramPipelines +#define glCreateQueries gl3wProcs.gl.CreateQueries +#define glCreateRenderbuffers gl3wProcs.gl.CreateRenderbuffers +#define glCreateSamplers gl3wProcs.gl.CreateSamplers +#define glCreateShader gl3wProcs.gl.CreateShader +#define glCreateShaderProgramv gl3wProcs.gl.CreateShaderProgramv +#define glCreateSyncFromCLeventARB gl3wProcs.gl.CreateSyncFromCLeventARB +#define glCreateTextures gl3wProcs.gl.CreateTextures +#define glCreateTransformFeedbacks gl3wProcs.gl.CreateTransformFeedbacks +#define glCreateVertexArrays gl3wProcs.gl.CreateVertexArrays +#define glCullFace gl3wProcs.gl.CullFace +#define glDebugMessageCallback gl3wProcs.gl.DebugMessageCallback +#define glDebugMessageCallbackARB gl3wProcs.gl.DebugMessageCallbackARB +#define glDebugMessageControl gl3wProcs.gl.DebugMessageControl +#define glDebugMessageControlARB gl3wProcs.gl.DebugMessageControlARB +#define glDebugMessageInsert gl3wProcs.gl.DebugMessageInsert +#define glDebugMessageInsertARB gl3wProcs.gl.DebugMessageInsertARB +#define glDeleteBuffers gl3wProcs.gl.DeleteBuffers +#define glDeleteFramebuffers gl3wProcs.gl.DeleteFramebuffers +#define glDeleteNamedStringARB gl3wProcs.gl.DeleteNamedStringARB +#define glDeletePerfMonitorsAMD gl3wProcs.gl.DeletePerfMonitorsAMD +#define glDeletePerfQueryINTEL gl3wProcs.gl.DeletePerfQueryINTEL +#define glDeleteProgram gl3wProcs.gl.DeleteProgram +#define glDeleteProgramPipelines gl3wProcs.gl.DeleteProgramPipelines +#define glDeleteQueries gl3wProcs.gl.DeleteQueries +#define glDeleteRenderbuffers gl3wProcs.gl.DeleteRenderbuffers +#define glDeleteSamplers gl3wProcs.gl.DeleteSamplers +#define glDeleteShader gl3wProcs.gl.DeleteShader +#define glDeleteSync gl3wProcs.gl.DeleteSync +#define glDeleteTextures gl3wProcs.gl.DeleteTextures +#define glDeleteTransformFeedbacks gl3wProcs.gl.DeleteTransformFeedbacks +#define glDeleteVertexArrays gl3wProcs.gl.DeleteVertexArrays +#define glDepthFunc gl3wProcs.gl.DepthFunc +#define glDepthMask gl3wProcs.gl.DepthMask +#define glDepthRange gl3wProcs.gl.DepthRange +#define glDepthRangeArrayv gl3wProcs.gl.DepthRangeArrayv +#define glDepthRangeIndexed gl3wProcs.gl.DepthRangeIndexed +#define glDepthRangef gl3wProcs.gl.DepthRangef +#define glDetachShader gl3wProcs.gl.DetachShader +#define glDisable gl3wProcs.gl.Disable +#define glDisableVertexArrayAttrib gl3wProcs.gl.DisableVertexArrayAttrib +#define glDisableVertexAttribArray gl3wProcs.gl.DisableVertexAttribArray +#define glDisablei gl3wProcs.gl.Disablei +#define glDispatchCompute gl3wProcs.gl.DispatchCompute +#define glDispatchComputeGroupSizeARB gl3wProcs.gl.DispatchComputeGroupSizeARB +#define glDispatchComputeIndirect gl3wProcs.gl.DispatchComputeIndirect +#define glDrawArrays gl3wProcs.gl.DrawArrays +#define glDrawArraysIndirect gl3wProcs.gl.DrawArraysIndirect +#define glDrawArraysInstanced gl3wProcs.gl.DrawArraysInstanced +#define glDrawArraysInstancedARB gl3wProcs.gl.DrawArraysInstancedARB +#define glDrawArraysInstancedBaseInstance gl3wProcs.gl.DrawArraysInstancedBaseInstance +#define glDrawBuffer gl3wProcs.gl.DrawBuffer +#define glDrawBuffers gl3wProcs.gl.DrawBuffers +#define glDrawElements gl3wProcs.gl.DrawElements +#define glDrawElementsBaseVertex gl3wProcs.gl.DrawElementsBaseVertex +#define glDrawElementsIndirect gl3wProcs.gl.DrawElementsIndirect +#define glDrawElementsInstanced gl3wProcs.gl.DrawElementsInstanced +#define glDrawElementsInstancedARB gl3wProcs.gl.DrawElementsInstancedARB +#define glDrawElementsInstancedBaseInstance gl3wProcs.gl.DrawElementsInstancedBaseInstance +#define glDrawElementsInstancedBaseVertex gl3wProcs.gl.DrawElementsInstancedBaseVertex +#define glDrawElementsInstancedBaseVertexBaseInstance \ + gl3wProcs.gl.DrawElementsInstancedBaseVertexBaseInstance +#define glDrawRangeElements gl3wProcs.gl.DrawRangeElements +#define glDrawRangeElementsBaseVertex gl3wProcs.gl.DrawRangeElementsBaseVertex +#define glDrawTransformFeedback gl3wProcs.gl.DrawTransformFeedback +#define glDrawTransformFeedbackInstanced gl3wProcs.gl.DrawTransformFeedbackInstanced +#define glDrawTransformFeedbackStream gl3wProcs.gl.DrawTransformFeedbackStream +#define glDrawTransformFeedbackStreamInstanced gl3wProcs.gl.DrawTransformFeedbackStreamInstanced +#define glEnable gl3wProcs.gl.Enable +#define glEnableVertexArrayAttrib gl3wProcs.gl.EnableVertexArrayAttrib +#define glEnableVertexAttribArray gl3wProcs.gl.EnableVertexAttribArray +#define glEnablei gl3wProcs.gl.Enablei +#define glEndConditionalRender gl3wProcs.gl.EndConditionalRender +#define glEndPerfMonitorAMD gl3wProcs.gl.EndPerfMonitorAMD +#define glEndPerfQueryINTEL gl3wProcs.gl.EndPerfQueryINTEL +#define glEndQuery gl3wProcs.gl.EndQuery +#define glEndQueryIndexed gl3wProcs.gl.EndQueryIndexed +#define glEndTransformFeedback gl3wProcs.gl.EndTransformFeedback +#define glEvaluateDepthValuesARB gl3wProcs.gl.EvaluateDepthValuesARB +#define glFenceSync gl3wProcs.gl.FenceSync +#define glFinish gl3wProcs.gl.Finish +#define glFlush gl3wProcs.gl.Flush +#define glFlushMappedBufferRange gl3wProcs.gl.FlushMappedBufferRange +#define glFlushMappedNamedBufferRange gl3wProcs.gl.FlushMappedNamedBufferRange +#define glFramebufferParameteri gl3wProcs.gl.FramebufferParameteri +#define glFramebufferRenderbuffer gl3wProcs.gl.FramebufferRenderbuffer +#define glFramebufferSampleLocationsfvARB gl3wProcs.gl.FramebufferSampleLocationsfvARB +#define glFramebufferTexture gl3wProcs.gl.FramebufferTexture +#define glFramebufferTexture1D gl3wProcs.gl.FramebufferTexture1D +#define glFramebufferTexture2D gl3wProcs.gl.FramebufferTexture2D +#define glFramebufferTexture3D gl3wProcs.gl.FramebufferTexture3D +#define glFramebufferTextureARB gl3wProcs.gl.FramebufferTextureARB +#define glFramebufferTextureFaceARB gl3wProcs.gl.FramebufferTextureFaceARB +#define glFramebufferTextureLayer gl3wProcs.gl.FramebufferTextureLayer +#define glFramebufferTextureLayerARB gl3wProcs.gl.FramebufferTextureLayerARB +#define glFrontFace gl3wProcs.gl.FrontFace +#define glGenBuffers gl3wProcs.gl.GenBuffers +#define glGenFramebuffers gl3wProcs.gl.GenFramebuffers +#define glGenPerfMonitorsAMD gl3wProcs.gl.GenPerfMonitorsAMD +#define glGenProgramPipelines gl3wProcs.gl.GenProgramPipelines +#define glGenQueries gl3wProcs.gl.GenQueries +#define glGenRenderbuffers gl3wProcs.gl.GenRenderbuffers +#define glGenSamplers gl3wProcs.gl.GenSamplers +#define glGenTextures gl3wProcs.gl.GenTextures +#define glGenTransformFeedbacks gl3wProcs.gl.GenTransformFeedbacks +#define glGenVertexArrays gl3wProcs.gl.GenVertexArrays +#define glGenerateMipmap gl3wProcs.gl.GenerateMipmap +#define glGenerateTextureMipmap gl3wProcs.gl.GenerateTextureMipmap +#define glGetActiveAtomicCounterBufferiv gl3wProcs.gl.GetActiveAtomicCounterBufferiv +#define glGetActiveAttrib gl3wProcs.gl.GetActiveAttrib +#define glGetActiveSubroutineName gl3wProcs.gl.GetActiveSubroutineName +#define glGetActiveSubroutineUniformName gl3wProcs.gl.GetActiveSubroutineUniformName +#define glGetActiveSubroutineUniformiv gl3wProcs.gl.GetActiveSubroutineUniformiv +#define glGetActiveUniform gl3wProcs.gl.GetActiveUniform +#define glGetActiveUniformBlockName gl3wProcs.gl.GetActiveUniformBlockName +#define glGetActiveUniformBlockiv gl3wProcs.gl.GetActiveUniformBlockiv +#define glGetActiveUniformName gl3wProcs.gl.GetActiveUniformName +#define glGetActiveUniformsiv gl3wProcs.gl.GetActiveUniformsiv +#define glGetAttachedShaders gl3wProcs.gl.GetAttachedShaders +#define glGetAttribLocation gl3wProcs.gl.GetAttribLocation +#define glGetBooleani_v gl3wProcs.gl.GetBooleani_v +#define glGetBooleanv gl3wProcs.gl.GetBooleanv +#define glGetBufferParameteri64v gl3wProcs.gl.GetBufferParameteri64v +#define glGetBufferParameteriv gl3wProcs.gl.GetBufferParameteriv +#define glGetBufferPointerv gl3wProcs.gl.GetBufferPointerv +#define glGetBufferSubData gl3wProcs.gl.GetBufferSubData +#define glGetCompressedTexImage gl3wProcs.gl.GetCompressedTexImage +#define glGetCompressedTextureImage gl3wProcs.gl.GetCompressedTextureImage +#define glGetCompressedTextureSubImage gl3wProcs.gl.GetCompressedTextureSubImage +#define glGetDebugMessageLog gl3wProcs.gl.GetDebugMessageLog +#define glGetDebugMessageLogARB gl3wProcs.gl.GetDebugMessageLogARB +#define glGetDoublei_v gl3wProcs.gl.GetDoublei_v +#define glGetDoublev gl3wProcs.gl.GetDoublev +#define glGetError gl3wProcs.gl.GetError +#define glGetFirstPerfQueryIdINTEL gl3wProcs.gl.GetFirstPerfQueryIdINTEL +#define glGetFloati_v gl3wProcs.gl.GetFloati_v +#define glGetFloatv gl3wProcs.gl.GetFloatv +#define glGetFragDataIndex gl3wProcs.gl.GetFragDataIndex +#define glGetFragDataLocation gl3wProcs.gl.GetFragDataLocation +#define glGetFramebufferAttachmentParameteriv gl3wProcs.gl.GetFramebufferAttachmentParameteriv +#define glGetFramebufferParameteriv gl3wProcs.gl.GetFramebufferParameteriv +#define glGetGraphicsResetStatus gl3wProcs.gl.GetGraphicsResetStatus +#define glGetGraphicsResetStatusARB gl3wProcs.gl.GetGraphicsResetStatusARB +#define glGetImageHandleARB gl3wProcs.gl.GetImageHandleARB +#define glGetInteger64i_v gl3wProcs.gl.GetInteger64i_v +#define glGetInteger64v gl3wProcs.gl.GetInteger64v +#define glGetIntegeri_v gl3wProcs.gl.GetIntegeri_v +#define glGetIntegerv gl3wProcs.gl.GetIntegerv +#define glGetInternalformati64v gl3wProcs.gl.GetInternalformati64v +#define glGetInternalformativ gl3wProcs.gl.GetInternalformativ +#define glGetMultisamplefv gl3wProcs.gl.GetMultisamplefv +#define glGetNamedBufferParameteri64v gl3wProcs.gl.GetNamedBufferParameteri64v +#define glGetNamedBufferParameteriv gl3wProcs.gl.GetNamedBufferParameteriv +#define glGetNamedBufferPointerv gl3wProcs.gl.GetNamedBufferPointerv +#define glGetNamedBufferSubData gl3wProcs.gl.GetNamedBufferSubData +#define glGetNamedFramebufferAttachmentParameteriv gl3wProcs.gl.GetNamedFramebufferAttachmentParameteriv +#define glGetNamedFramebufferParameteriv gl3wProcs.gl.GetNamedFramebufferParameteriv +#define glGetNamedRenderbufferParameteriv gl3wProcs.gl.GetNamedRenderbufferParameteriv +#define glGetNamedStringARB gl3wProcs.gl.GetNamedStringARB +#define glGetNamedStringivARB gl3wProcs.gl.GetNamedStringivARB +#define glGetNextPerfQueryIdINTEL gl3wProcs.gl.GetNextPerfQueryIdINTEL +#define glGetObjectLabel gl3wProcs.gl.GetObjectLabel +#define glGetObjectPtrLabel gl3wProcs.gl.GetObjectPtrLabel +#define glGetPerfCounterInfoINTEL gl3wProcs.gl.GetPerfCounterInfoINTEL +#define glGetPerfMonitorCounterDataAMD gl3wProcs.gl.GetPerfMonitorCounterDataAMD +#define glGetPerfMonitorCounterInfoAMD gl3wProcs.gl.GetPerfMonitorCounterInfoAMD +#define glGetPerfMonitorCounterStringAMD gl3wProcs.gl.GetPerfMonitorCounterStringAMD +#define glGetPerfMonitorCountersAMD gl3wProcs.gl.GetPerfMonitorCountersAMD +#define glGetPerfMonitorGroupStringAMD gl3wProcs.gl.GetPerfMonitorGroupStringAMD +#define glGetPerfMonitorGroupsAMD gl3wProcs.gl.GetPerfMonitorGroupsAMD +#define glGetPerfQueryDataINTEL gl3wProcs.gl.GetPerfQueryDataINTEL +#define glGetPerfQueryIdByNameINTEL gl3wProcs.gl.GetPerfQueryIdByNameINTEL +#define glGetPerfQueryInfoINTEL gl3wProcs.gl.GetPerfQueryInfoINTEL +#define glGetPointerv gl3wProcs.gl.GetPointerv +#define glGetProgramBinary gl3wProcs.gl.GetProgramBinary +#define glGetProgramInfoLog gl3wProcs.gl.GetProgramInfoLog +#define glGetProgramInterfaceiv gl3wProcs.gl.GetProgramInterfaceiv +#define glGetProgramPipelineInfoLog gl3wProcs.gl.GetProgramPipelineInfoLog +#define glGetProgramPipelineiv gl3wProcs.gl.GetProgramPipelineiv +#define glGetProgramResourceIndex gl3wProcs.gl.GetProgramResourceIndex +#define glGetProgramResourceLocation gl3wProcs.gl.GetProgramResourceLocation +#define glGetProgramResourceLocationIndex gl3wProcs.gl.GetProgramResourceLocationIndex +#define glGetProgramResourceName gl3wProcs.gl.GetProgramResourceName +#define glGetProgramResourceiv gl3wProcs.gl.GetProgramResourceiv +#define glGetProgramStageiv gl3wProcs.gl.GetProgramStageiv +#define glGetProgramiv gl3wProcs.gl.GetProgramiv +#define glGetQueryBufferObjecti64v gl3wProcs.gl.GetQueryBufferObjecti64v +#define glGetQueryBufferObjectiv gl3wProcs.gl.GetQueryBufferObjectiv +#define glGetQueryBufferObjectui64v gl3wProcs.gl.GetQueryBufferObjectui64v +#define glGetQueryBufferObjectuiv gl3wProcs.gl.GetQueryBufferObjectuiv +#define glGetQueryIndexediv gl3wProcs.gl.GetQueryIndexediv +#define glGetQueryObjecti64v gl3wProcs.gl.GetQueryObjecti64v +#define glGetQueryObjectiv gl3wProcs.gl.GetQueryObjectiv +#define glGetQueryObjectui64v gl3wProcs.gl.GetQueryObjectui64v +#define glGetQueryObjectuiv gl3wProcs.gl.GetQueryObjectuiv +#define glGetQueryiv gl3wProcs.gl.GetQueryiv +#define glGetRenderbufferParameteriv gl3wProcs.gl.GetRenderbufferParameteriv +#define glGetSamplerParameterIiv gl3wProcs.gl.GetSamplerParameterIiv +#define glGetSamplerParameterIuiv gl3wProcs.gl.GetSamplerParameterIuiv +#define glGetSamplerParameterfv gl3wProcs.gl.GetSamplerParameterfv +#define glGetSamplerParameteriv gl3wProcs.gl.GetSamplerParameteriv +#define glGetShaderInfoLog gl3wProcs.gl.GetShaderInfoLog +#define glGetShaderPrecisionFormat gl3wProcs.gl.GetShaderPrecisionFormat +#define glGetShaderSource gl3wProcs.gl.GetShaderSource +#define glGetShaderiv gl3wProcs.gl.GetShaderiv +#define glGetString gl3wProcs.gl.GetString +#define glGetStringi gl3wProcs.gl.GetStringi +#define glGetSubroutineIndex gl3wProcs.gl.GetSubroutineIndex +#define glGetSubroutineUniformLocation gl3wProcs.gl.GetSubroutineUniformLocation +#define glGetSynciv gl3wProcs.gl.GetSynciv +#define glGetTexImage gl3wProcs.gl.GetTexImage +#define glGetTexLevelParameterfv gl3wProcs.gl.GetTexLevelParameterfv +#define glGetTexLevelParameteriv gl3wProcs.gl.GetTexLevelParameteriv +#define glGetTexParameterIiv gl3wProcs.gl.GetTexParameterIiv +#define glGetTexParameterIuiv gl3wProcs.gl.GetTexParameterIuiv +#define glGetTexParameterfv gl3wProcs.gl.GetTexParameterfv +#define glGetTexParameteriv gl3wProcs.gl.GetTexParameteriv +#define glGetTextureHandleARB gl3wProcs.gl.GetTextureHandleARB +#define glGetTextureImage gl3wProcs.gl.GetTextureImage +#define glGetTextureLevelParameterfv gl3wProcs.gl.GetTextureLevelParameterfv +#define glGetTextureLevelParameteriv gl3wProcs.gl.GetTextureLevelParameteriv +#define glGetTextureParameterIiv gl3wProcs.gl.GetTextureParameterIiv +#define glGetTextureParameterIuiv gl3wProcs.gl.GetTextureParameterIuiv +#define glGetTextureParameterfv gl3wProcs.gl.GetTextureParameterfv +#define glGetTextureParameteriv gl3wProcs.gl.GetTextureParameteriv +#define glGetTextureSamplerHandleARB gl3wProcs.gl.GetTextureSamplerHandleARB +#define glGetTextureSubImage gl3wProcs.gl.GetTextureSubImage +#define glGetTransformFeedbackVarying gl3wProcs.gl.GetTransformFeedbackVarying +#define glGetTransformFeedbacki64_v gl3wProcs.gl.GetTransformFeedbacki64_v +#define glGetTransformFeedbacki_v gl3wProcs.gl.GetTransformFeedbacki_v +#define glGetTransformFeedbackiv gl3wProcs.gl.GetTransformFeedbackiv +#define glGetUniformBlockIndex gl3wProcs.gl.GetUniformBlockIndex +#define glGetUniformIndices gl3wProcs.gl.GetUniformIndices +#define glGetUniformLocation gl3wProcs.gl.GetUniformLocation +#define glGetUniformSubroutineuiv gl3wProcs.gl.GetUniformSubroutineuiv +#define glGetUniformdv gl3wProcs.gl.GetUniformdv +#define glGetUniformfv gl3wProcs.gl.GetUniformfv +#define glGetUniformi64vARB gl3wProcs.gl.GetUniformi64vARB +#define glGetUniformiv gl3wProcs.gl.GetUniformiv +#define glGetUniformui64vARB gl3wProcs.gl.GetUniformui64vARB +#define glGetUniformuiv gl3wProcs.gl.GetUniformuiv +#define glGetVertexArrayIndexed64iv gl3wProcs.gl.GetVertexArrayIndexed64iv +#define glGetVertexArrayIndexediv gl3wProcs.gl.GetVertexArrayIndexediv +#define glGetVertexArrayiv gl3wProcs.gl.GetVertexArrayiv +#define glGetVertexAttribIiv gl3wProcs.gl.GetVertexAttribIiv +#define glGetVertexAttribIuiv gl3wProcs.gl.GetVertexAttribIuiv +#define glGetVertexAttribLdv gl3wProcs.gl.GetVertexAttribLdv +#define glGetVertexAttribLui64vARB gl3wProcs.gl.GetVertexAttribLui64vARB +#define glGetVertexAttribPointerv gl3wProcs.gl.GetVertexAttribPointerv +#define glGetVertexAttribdv gl3wProcs.gl.GetVertexAttribdv +#define glGetVertexAttribfv gl3wProcs.gl.GetVertexAttribfv +#define glGetVertexAttribiv gl3wProcs.gl.GetVertexAttribiv +#define glGetnCompressedTexImage gl3wProcs.gl.GetnCompressedTexImage +#define glGetnCompressedTexImageARB gl3wProcs.gl.GetnCompressedTexImageARB +#define glGetnTexImage gl3wProcs.gl.GetnTexImage +#define glGetnTexImageARB gl3wProcs.gl.GetnTexImageARB +#define glGetnUniformdv gl3wProcs.gl.GetnUniformdv +#define glGetnUniformdvARB gl3wProcs.gl.GetnUniformdvARB +#define glGetnUniformfv gl3wProcs.gl.GetnUniformfv +#define glGetnUniformfvARB gl3wProcs.gl.GetnUniformfvARB +#define glGetnUniformi64vARB gl3wProcs.gl.GetnUniformi64vARB +#define glGetnUniformiv gl3wProcs.gl.GetnUniformiv +#define glGetnUniformivARB gl3wProcs.gl.GetnUniformivARB +#define glGetnUniformui64vARB gl3wProcs.gl.GetnUniformui64vARB +#define glGetnUniformuiv gl3wProcs.gl.GetnUniformuiv +#define glGetnUniformuivARB gl3wProcs.gl.GetnUniformuivARB +#define glHint gl3wProcs.gl.Hint +#define glInvalidateBufferData gl3wProcs.gl.InvalidateBufferData +#define glInvalidateBufferSubData gl3wProcs.gl.InvalidateBufferSubData +#define glInvalidateFramebuffer gl3wProcs.gl.InvalidateFramebuffer +#define glInvalidateNamedFramebufferData gl3wProcs.gl.InvalidateNamedFramebufferData +#define glInvalidateNamedFramebufferSubData gl3wProcs.gl.InvalidateNamedFramebufferSubData +#define glInvalidateSubFramebuffer gl3wProcs.gl.InvalidateSubFramebuffer +#define glInvalidateTexImage gl3wProcs.gl.InvalidateTexImage +#define glInvalidateTexSubImage gl3wProcs.gl.InvalidateTexSubImage +#define glIsBuffer gl3wProcs.gl.IsBuffer +#define glIsEnabled gl3wProcs.gl.IsEnabled +#define glIsEnabledi gl3wProcs.gl.IsEnabledi +#define glIsFramebuffer gl3wProcs.gl.IsFramebuffer +#define glIsImageHandleResidentARB gl3wProcs.gl.IsImageHandleResidentARB +#define glIsNamedStringARB gl3wProcs.gl.IsNamedStringARB +#define glIsProgram gl3wProcs.gl.IsProgram +#define glIsProgramPipeline gl3wProcs.gl.IsProgramPipeline +#define glIsQuery gl3wProcs.gl.IsQuery +#define glIsRenderbuffer gl3wProcs.gl.IsRenderbuffer +#define glIsSampler gl3wProcs.gl.IsSampler +#define glIsShader gl3wProcs.gl.IsShader +#define glIsSync gl3wProcs.gl.IsSync +#define glIsTexture gl3wProcs.gl.IsTexture +#define glIsTextureHandleResidentARB gl3wProcs.gl.IsTextureHandleResidentARB +#define glIsTransformFeedback gl3wProcs.gl.IsTransformFeedback +#define glIsVertexArray gl3wProcs.gl.IsVertexArray +#define glLineWidth gl3wProcs.gl.LineWidth +#define glLinkProgram gl3wProcs.gl.LinkProgram +#define glLogicOp gl3wProcs.gl.LogicOp +#define glMakeImageHandleNonResidentARB gl3wProcs.gl.MakeImageHandleNonResidentARB +#define glMakeImageHandleResidentARB gl3wProcs.gl.MakeImageHandleResidentARB +#define glMakeTextureHandleNonResidentARB gl3wProcs.gl.MakeTextureHandleNonResidentARB +#define glMakeTextureHandleResidentARB gl3wProcs.gl.MakeTextureHandleResidentARB +#define glMapBuffer gl3wProcs.gl.MapBuffer +#define glMapBufferRange gl3wProcs.gl.MapBufferRange +#define glMapNamedBuffer gl3wProcs.gl.MapNamedBuffer +#define glMapNamedBufferRange gl3wProcs.gl.MapNamedBufferRange +#define glMaxShaderCompilerThreadsARB gl3wProcs.gl.MaxShaderCompilerThreadsARB +#define glMemoryBarrier gl3wProcs.gl.MemoryBarrier +#define glMemoryBarrierByRegion gl3wProcs.gl.MemoryBarrierByRegion +#define glMinSampleShading gl3wProcs.gl.MinSampleShading +#define glMinSampleShadingARB gl3wProcs.gl.MinSampleShadingARB +#define glMultiDrawArrays gl3wProcs.gl.MultiDrawArrays +#define glMultiDrawArraysIndirect gl3wProcs.gl.MultiDrawArraysIndirect +#define glMultiDrawArraysIndirectCountARB gl3wProcs.gl.MultiDrawArraysIndirectCountARB +#define glMultiDrawElements gl3wProcs.gl.MultiDrawElements +#define glMultiDrawElementsBaseVertex gl3wProcs.gl.MultiDrawElementsBaseVertex +#define glMultiDrawElementsIndirect gl3wProcs.gl.MultiDrawElementsIndirect +#define glMultiDrawElementsIndirectCountARB gl3wProcs.gl.MultiDrawElementsIndirectCountARB +#define glNamedBufferData gl3wProcs.gl.NamedBufferData +#define glNamedBufferPageCommitmentARB gl3wProcs.gl.NamedBufferPageCommitmentARB +#define glNamedBufferStorage gl3wProcs.gl.NamedBufferStorage +#define glNamedBufferSubData gl3wProcs.gl.NamedBufferSubData +#define glNamedFramebufferDrawBuffer gl3wProcs.gl.NamedFramebufferDrawBuffer +#define glNamedFramebufferDrawBuffers gl3wProcs.gl.NamedFramebufferDrawBuffers +#define glNamedFramebufferParameteri gl3wProcs.gl.NamedFramebufferParameteri +#define glNamedFramebufferReadBuffer gl3wProcs.gl.NamedFramebufferReadBuffer +#define glNamedFramebufferRenderbuffer gl3wProcs.gl.NamedFramebufferRenderbuffer +#define glNamedFramebufferSampleLocationsfvARB gl3wProcs.gl.NamedFramebufferSampleLocationsfvARB +#define glNamedFramebufferTexture gl3wProcs.gl.NamedFramebufferTexture +#define glNamedFramebufferTextureLayer gl3wProcs.gl.NamedFramebufferTextureLayer +#define glNamedRenderbufferStorage gl3wProcs.gl.NamedRenderbufferStorage +#define glNamedRenderbufferStorageMultisample gl3wProcs.gl.NamedRenderbufferStorageMultisample +#define glNamedStringARB gl3wProcs.gl.NamedStringARB +#define glObjectLabel gl3wProcs.gl.ObjectLabel +#define glObjectPtrLabel gl3wProcs.gl.ObjectPtrLabel +#define glPatchParameterfv gl3wProcs.gl.PatchParameterfv +#define glPatchParameteri gl3wProcs.gl.PatchParameteri +#define glPauseTransformFeedback gl3wProcs.gl.PauseTransformFeedback +#define glPixelStoref gl3wProcs.gl.PixelStoref +#define glPixelStorei gl3wProcs.gl.PixelStorei +#define glPointParameterf gl3wProcs.gl.PointParameterf +#define glPointParameterfv gl3wProcs.gl.PointParameterfv +#define glPointParameteri gl3wProcs.gl.PointParameteri +#define glPointParameteriv gl3wProcs.gl.PointParameteriv +#define glPointSize gl3wProcs.gl.PointSize +#define glPolygonMode gl3wProcs.gl.PolygonMode +#define glPolygonOffset gl3wProcs.gl.PolygonOffset +#define glPopDebugGroup gl3wProcs.gl.PopDebugGroup +#define glPrimitiveBoundingBoxARB gl3wProcs.gl.PrimitiveBoundingBoxARB +#define glPrimitiveRestartIndex gl3wProcs.gl.PrimitiveRestartIndex +#define glProgramBinary gl3wProcs.gl.ProgramBinary +#define glProgramParameteri gl3wProcs.gl.ProgramParameteri +#define glProgramParameteriARB gl3wProcs.gl.ProgramParameteriARB +#define glProgramUniform1d gl3wProcs.gl.ProgramUniform1d +#define glProgramUniform1dv gl3wProcs.gl.ProgramUniform1dv +#define glProgramUniform1f gl3wProcs.gl.ProgramUniform1f +#define glProgramUniform1fv gl3wProcs.gl.ProgramUniform1fv +#define glProgramUniform1i gl3wProcs.gl.ProgramUniform1i +#define glProgramUniform1i64ARB gl3wProcs.gl.ProgramUniform1i64ARB +#define glProgramUniform1i64vARB gl3wProcs.gl.ProgramUniform1i64vARB +#define glProgramUniform1iv gl3wProcs.gl.ProgramUniform1iv +#define glProgramUniform1ui gl3wProcs.gl.ProgramUniform1ui +#define glProgramUniform1ui64ARB gl3wProcs.gl.ProgramUniform1ui64ARB +#define glProgramUniform1ui64vARB gl3wProcs.gl.ProgramUniform1ui64vARB +#define glProgramUniform1uiv gl3wProcs.gl.ProgramUniform1uiv +#define glProgramUniform2d gl3wProcs.gl.ProgramUniform2d +#define glProgramUniform2dv gl3wProcs.gl.ProgramUniform2dv +#define glProgramUniform2f gl3wProcs.gl.ProgramUniform2f +#define glProgramUniform2fv gl3wProcs.gl.ProgramUniform2fv +#define glProgramUniform2i gl3wProcs.gl.ProgramUniform2i +#define glProgramUniform2i64ARB gl3wProcs.gl.ProgramUniform2i64ARB +#define glProgramUniform2i64vARB gl3wProcs.gl.ProgramUniform2i64vARB +#define glProgramUniform2iv gl3wProcs.gl.ProgramUniform2iv +#define glProgramUniform2ui gl3wProcs.gl.ProgramUniform2ui +#define glProgramUniform2ui64ARB gl3wProcs.gl.ProgramUniform2ui64ARB +#define glProgramUniform2ui64vARB gl3wProcs.gl.ProgramUniform2ui64vARB +#define glProgramUniform2uiv gl3wProcs.gl.ProgramUniform2uiv +#define glProgramUniform3d gl3wProcs.gl.ProgramUniform3d +#define glProgramUniform3dv gl3wProcs.gl.ProgramUniform3dv +#define glProgramUniform3f gl3wProcs.gl.ProgramUniform3f +#define glProgramUniform3fv gl3wProcs.gl.ProgramUniform3fv +#define glProgramUniform3i gl3wProcs.gl.ProgramUniform3i +#define glProgramUniform3i64ARB gl3wProcs.gl.ProgramUniform3i64ARB +#define glProgramUniform3i64vARB gl3wProcs.gl.ProgramUniform3i64vARB +#define glProgramUniform3iv gl3wProcs.gl.ProgramUniform3iv +#define glProgramUniform3ui gl3wProcs.gl.ProgramUniform3ui +#define glProgramUniform3ui64ARB gl3wProcs.gl.ProgramUniform3ui64ARB +#define glProgramUniform3ui64vARB gl3wProcs.gl.ProgramUniform3ui64vARB +#define glProgramUniform3uiv gl3wProcs.gl.ProgramUniform3uiv +#define glProgramUniform4d gl3wProcs.gl.ProgramUniform4d +#define glProgramUniform4dv gl3wProcs.gl.ProgramUniform4dv +#define glProgramUniform4f gl3wProcs.gl.ProgramUniform4f +#define glProgramUniform4fv gl3wProcs.gl.ProgramUniform4fv +#define glProgramUniform4i gl3wProcs.gl.ProgramUniform4i +#define glProgramUniform4i64ARB gl3wProcs.gl.ProgramUniform4i64ARB +#define glProgramUniform4i64vARB gl3wProcs.gl.ProgramUniform4i64vARB +#define glProgramUniform4iv gl3wProcs.gl.ProgramUniform4iv +#define glProgramUniform4ui gl3wProcs.gl.ProgramUniform4ui +#define glProgramUniform4ui64ARB gl3wProcs.gl.ProgramUniform4ui64ARB +#define glProgramUniform4ui64vARB gl3wProcs.gl.ProgramUniform4ui64vARB +#define glProgramUniform4uiv gl3wProcs.gl.ProgramUniform4uiv +#define glProgramUniformHandleui64ARB gl3wProcs.gl.ProgramUniformHandleui64ARB +#define glProgramUniformHandleui64vARB gl3wProcs.gl.ProgramUniformHandleui64vARB +#define glProgramUniformMatrix2dv gl3wProcs.gl.ProgramUniformMatrix2dv +#define glProgramUniformMatrix2fv gl3wProcs.gl.ProgramUniformMatrix2fv +#define glProgramUniformMatrix2x3dv gl3wProcs.gl.ProgramUniformMatrix2x3dv +#define glProgramUniformMatrix2x3fv gl3wProcs.gl.ProgramUniformMatrix2x3fv +#define glProgramUniformMatrix2x4dv gl3wProcs.gl.ProgramUniformMatrix2x4dv +#define glProgramUniformMatrix2x4fv gl3wProcs.gl.ProgramUniformMatrix2x4fv +#define glProgramUniformMatrix3dv gl3wProcs.gl.ProgramUniformMatrix3dv +#define glProgramUniformMatrix3fv gl3wProcs.gl.ProgramUniformMatrix3fv +#define glProgramUniformMatrix3x2dv gl3wProcs.gl.ProgramUniformMatrix3x2dv +#define glProgramUniformMatrix3x2fv gl3wProcs.gl.ProgramUniformMatrix3x2fv +#define glProgramUniformMatrix3x4dv gl3wProcs.gl.ProgramUniformMatrix3x4dv +#define glProgramUniformMatrix3x4fv gl3wProcs.gl.ProgramUniformMatrix3x4fv +#define glProgramUniformMatrix4dv gl3wProcs.gl.ProgramUniformMatrix4dv +#define glProgramUniformMatrix4fv gl3wProcs.gl.ProgramUniformMatrix4fv +#define glProgramUniformMatrix4x2dv gl3wProcs.gl.ProgramUniformMatrix4x2dv +#define glProgramUniformMatrix4x2fv gl3wProcs.gl.ProgramUniformMatrix4x2fv +#define glProgramUniformMatrix4x3dv gl3wProcs.gl.ProgramUniformMatrix4x3dv +#define glProgramUniformMatrix4x3fv gl3wProcs.gl.ProgramUniformMatrix4x3fv +#define glProvokingVertex gl3wProcs.gl.ProvokingVertex +#define glPushDebugGroup gl3wProcs.gl.PushDebugGroup +#define glQueryCounter gl3wProcs.gl.QueryCounter +#define glReadBuffer gl3wProcs.gl.ReadBuffer +#define glReadPixels gl3wProcs.gl.ReadPixels +#define glReadnPixels gl3wProcs.gl.ReadnPixels +#define glReadnPixelsARB gl3wProcs.gl.ReadnPixelsARB +#define glReleaseShaderCompiler gl3wProcs.gl.ReleaseShaderCompiler +#define glRenderbufferStorage gl3wProcs.gl.RenderbufferStorage +#define glRenderbufferStorageMultisample gl3wProcs.gl.RenderbufferStorageMultisample +#define glResumeTransformFeedback gl3wProcs.gl.ResumeTransformFeedback +#define glSampleCoverage gl3wProcs.gl.SampleCoverage +#define glSampleMaski gl3wProcs.gl.SampleMaski +#define glSamplerParameterIiv gl3wProcs.gl.SamplerParameterIiv +#define glSamplerParameterIuiv gl3wProcs.gl.SamplerParameterIuiv +#define glSamplerParameterf gl3wProcs.gl.SamplerParameterf +#define glSamplerParameterfv gl3wProcs.gl.SamplerParameterfv +#define glSamplerParameteri gl3wProcs.gl.SamplerParameteri +#define glSamplerParameteriv gl3wProcs.gl.SamplerParameteriv +#define glScissor gl3wProcs.gl.Scissor +#define glScissorArrayv gl3wProcs.gl.ScissorArrayv +#define glScissorIndexed gl3wProcs.gl.ScissorIndexed +#define glScissorIndexedv gl3wProcs.gl.ScissorIndexedv +#define glSelectPerfMonitorCountersAMD gl3wProcs.gl.SelectPerfMonitorCountersAMD +#define glShaderBinary gl3wProcs.gl.ShaderBinary +#define glShaderSource gl3wProcs.gl.ShaderSource +#define glShaderStorageBlockBinding gl3wProcs.gl.ShaderStorageBlockBinding +#define glSpecializeShaderARB gl3wProcs.gl.SpecializeShaderARB +#define glStencilFunc gl3wProcs.gl.StencilFunc +#define glStencilFuncSeparate gl3wProcs.gl.StencilFuncSeparate +#define glStencilMask gl3wProcs.gl.StencilMask +#define glStencilMaskSeparate gl3wProcs.gl.StencilMaskSeparate +#define glStencilOp gl3wProcs.gl.StencilOp +#define glStencilOpSeparate gl3wProcs.gl.StencilOpSeparate +#define glTexBuffer gl3wProcs.gl.TexBuffer +#define glTexBufferARB gl3wProcs.gl.TexBufferARB +#define glTexBufferRange gl3wProcs.gl.TexBufferRange +#define glTexImage1D gl3wProcs.gl.TexImage1D +#define glTexImage2D gl3wProcs.gl.TexImage2D +#define glTexImage2DMultisample gl3wProcs.gl.TexImage2DMultisample +#define glTexImage3D gl3wProcs.gl.TexImage3D +#define glTexImage3DMultisample gl3wProcs.gl.TexImage3DMultisample +#define glTexPageCommitmentARB gl3wProcs.gl.TexPageCommitmentARB +#define glTexParameterIiv gl3wProcs.gl.TexParameterIiv +#define glTexParameterIuiv gl3wProcs.gl.TexParameterIuiv +#define glTexParameterf gl3wProcs.gl.TexParameterf +#define glTexParameterfv gl3wProcs.gl.TexParameterfv +#define glTexParameteri gl3wProcs.gl.TexParameteri +#define glTexParameteriv gl3wProcs.gl.TexParameteriv +#define glTexStorage1D gl3wProcs.gl.TexStorage1D +#define glTexStorage2D gl3wProcs.gl.TexStorage2D +#define glTexStorage2DMultisample gl3wProcs.gl.TexStorage2DMultisample +#define glTexStorage3D gl3wProcs.gl.TexStorage3D +#define glTexStorage3DMultisample gl3wProcs.gl.TexStorage3DMultisample +#define glTexSubImage1D gl3wProcs.gl.TexSubImage1D +#define glTexSubImage2D gl3wProcs.gl.TexSubImage2D +#define glTexSubImage3D gl3wProcs.gl.TexSubImage3D +#define glTextureBarrier gl3wProcs.gl.TextureBarrier +#define glTextureBuffer gl3wProcs.gl.TextureBuffer +#define glTextureBufferRange gl3wProcs.gl.TextureBufferRange +#define glTextureParameterIiv gl3wProcs.gl.TextureParameterIiv +#define glTextureParameterIuiv gl3wProcs.gl.TextureParameterIuiv +#define glTextureParameterf gl3wProcs.gl.TextureParameterf +#define glTextureParameterfv gl3wProcs.gl.TextureParameterfv +#define glTextureParameteri gl3wProcs.gl.TextureParameteri +#define glTextureParameteriv gl3wProcs.gl.TextureParameteriv +#define glTextureStorage1D gl3wProcs.gl.TextureStorage1D +#define glTextureStorage2D gl3wProcs.gl.TextureStorage2D +#define glTextureStorage2DMultisample gl3wProcs.gl.TextureStorage2DMultisample +#define glTextureStorage3D gl3wProcs.gl.TextureStorage3D +#define glTextureStorage3DMultisample gl3wProcs.gl.TextureStorage3DMultisample +#define glTextureSubImage1D gl3wProcs.gl.TextureSubImage1D +#define glTextureSubImage2D gl3wProcs.gl.TextureSubImage2D +#define glTextureSubImage3D gl3wProcs.gl.TextureSubImage3D +#define glTextureView gl3wProcs.gl.TextureView +#define glTransformFeedbackBufferBase gl3wProcs.gl.TransformFeedbackBufferBase +#define glTransformFeedbackBufferRange gl3wProcs.gl.TransformFeedbackBufferRange +#define glTransformFeedbackVaryings gl3wProcs.gl.TransformFeedbackVaryings +#define glUniform1d gl3wProcs.gl.Uniform1d +#define glUniform1dv gl3wProcs.gl.Uniform1dv +#define glUniform1f gl3wProcs.gl.Uniform1f +#define glUniform1fv gl3wProcs.gl.Uniform1fv +#define glUniform1i gl3wProcs.gl.Uniform1i +#define glUniform1i64ARB gl3wProcs.gl.Uniform1i64ARB +#define glUniform1i64vARB gl3wProcs.gl.Uniform1i64vARB +#define glUniform1iv gl3wProcs.gl.Uniform1iv +#define glUniform1ui gl3wProcs.gl.Uniform1ui +#define glUniform1ui64ARB gl3wProcs.gl.Uniform1ui64ARB +#define glUniform1ui64vARB gl3wProcs.gl.Uniform1ui64vARB +#define glUniform1uiv gl3wProcs.gl.Uniform1uiv +#define glUniform2d gl3wProcs.gl.Uniform2d +#define glUniform2dv gl3wProcs.gl.Uniform2dv +#define glUniform2f gl3wProcs.gl.Uniform2f +#define glUniform2fv gl3wProcs.gl.Uniform2fv +#define glUniform2i gl3wProcs.gl.Uniform2i +#define glUniform2i64ARB gl3wProcs.gl.Uniform2i64ARB +#define glUniform2i64vARB gl3wProcs.gl.Uniform2i64vARB +#define glUniform2iv gl3wProcs.gl.Uniform2iv +#define glUniform2ui gl3wProcs.gl.Uniform2ui +#define glUniform2ui64ARB gl3wProcs.gl.Uniform2ui64ARB +#define glUniform2ui64vARB gl3wProcs.gl.Uniform2ui64vARB +#define glUniform2uiv gl3wProcs.gl.Uniform2uiv +#define glUniform3d gl3wProcs.gl.Uniform3d +#define glUniform3dv gl3wProcs.gl.Uniform3dv +#define glUniform3f gl3wProcs.gl.Uniform3f +#define glUniform3fv gl3wProcs.gl.Uniform3fv +#define glUniform3i gl3wProcs.gl.Uniform3i +#define glUniform3i64ARB gl3wProcs.gl.Uniform3i64ARB +#define glUniform3i64vARB gl3wProcs.gl.Uniform3i64vARB +#define glUniform3iv gl3wProcs.gl.Uniform3iv +#define glUniform3ui gl3wProcs.gl.Uniform3ui +#define glUniform3ui64ARB gl3wProcs.gl.Uniform3ui64ARB +#define glUniform3ui64vARB gl3wProcs.gl.Uniform3ui64vARB +#define glUniform3uiv gl3wProcs.gl.Uniform3uiv +#define glUniform4d gl3wProcs.gl.Uniform4d +#define glUniform4dv gl3wProcs.gl.Uniform4dv +#define glUniform4f gl3wProcs.gl.Uniform4f +#define glUniform4fv gl3wProcs.gl.Uniform4fv +#define glUniform4i gl3wProcs.gl.Uniform4i +#define glUniform4i64ARB gl3wProcs.gl.Uniform4i64ARB +#define glUniform4i64vARB gl3wProcs.gl.Uniform4i64vARB +#define glUniform4iv gl3wProcs.gl.Uniform4iv +#define glUniform4ui gl3wProcs.gl.Uniform4ui +#define glUniform4ui64ARB gl3wProcs.gl.Uniform4ui64ARB +#define glUniform4ui64vARB gl3wProcs.gl.Uniform4ui64vARB +#define glUniform4uiv gl3wProcs.gl.Uniform4uiv +#define glUniformBlockBinding gl3wProcs.gl.UniformBlockBinding +#define glUniformHandleui64ARB gl3wProcs.gl.UniformHandleui64ARB +#define glUniformHandleui64vARB gl3wProcs.gl.UniformHandleui64vARB +#define glUniformMatrix2dv gl3wProcs.gl.UniformMatrix2dv +#define glUniformMatrix2fv gl3wProcs.gl.UniformMatrix2fv +#define glUniformMatrix2x3dv gl3wProcs.gl.UniformMatrix2x3dv +#define glUniformMatrix2x3fv gl3wProcs.gl.UniformMatrix2x3fv +#define glUniformMatrix2x4dv gl3wProcs.gl.UniformMatrix2x4dv +#define glUniformMatrix2x4fv gl3wProcs.gl.UniformMatrix2x4fv +#define glUniformMatrix3dv gl3wProcs.gl.UniformMatrix3dv +#define glUniformMatrix3fv gl3wProcs.gl.UniformMatrix3fv +#define glUniformMatrix3x2dv gl3wProcs.gl.UniformMatrix3x2dv +#define glUniformMatrix3x2fv gl3wProcs.gl.UniformMatrix3x2fv +#define glUniformMatrix3x4dv gl3wProcs.gl.UniformMatrix3x4dv +#define glUniformMatrix3x4fv gl3wProcs.gl.UniformMatrix3x4fv +#define glUniformMatrix4dv gl3wProcs.gl.UniformMatrix4dv +#define glUniformMatrix4fv gl3wProcs.gl.UniformMatrix4fv +#define glUniformMatrix4x2dv gl3wProcs.gl.UniformMatrix4x2dv +#define glUniformMatrix4x2fv gl3wProcs.gl.UniformMatrix4x2fv +#define glUniformMatrix4x3dv gl3wProcs.gl.UniformMatrix4x3dv +#define glUniformMatrix4x3fv gl3wProcs.gl.UniformMatrix4x3fv +#define glUniformSubroutinesuiv gl3wProcs.gl.UniformSubroutinesuiv +#define glUnmapBuffer gl3wProcs.gl.UnmapBuffer +#define glUnmapNamedBuffer gl3wProcs.gl.UnmapNamedBuffer +#define glUseProgram gl3wProcs.gl.UseProgram +#define glUseProgramStages gl3wProcs.gl.UseProgramStages +#define glValidateProgram gl3wProcs.gl.ValidateProgram +#define glValidateProgramPipeline gl3wProcs.gl.ValidateProgramPipeline +#define glVertexArrayAttribBinding gl3wProcs.gl.VertexArrayAttribBinding +#define glVertexArrayAttribFormat gl3wProcs.gl.VertexArrayAttribFormat +#define glVertexArrayAttribIFormat gl3wProcs.gl.VertexArrayAttribIFormat +#define glVertexArrayAttribLFormat gl3wProcs.gl.VertexArrayAttribLFormat +#define glVertexArrayBindingDivisor gl3wProcs.gl.VertexArrayBindingDivisor +#define glVertexArrayElementBuffer gl3wProcs.gl.VertexArrayElementBuffer +#define glVertexArrayVertexBuffer gl3wProcs.gl.VertexArrayVertexBuffer +#define glVertexArrayVertexBuffers gl3wProcs.gl.VertexArrayVertexBuffers +#define glVertexAttrib1d gl3wProcs.gl.VertexAttrib1d +#define glVertexAttrib1dv gl3wProcs.gl.VertexAttrib1dv +#define glVertexAttrib1f gl3wProcs.gl.VertexAttrib1f +#define glVertexAttrib1fv gl3wProcs.gl.VertexAttrib1fv +#define glVertexAttrib1s gl3wProcs.gl.VertexAttrib1s +#define glVertexAttrib1sv gl3wProcs.gl.VertexAttrib1sv +#define glVertexAttrib2d gl3wProcs.gl.VertexAttrib2d +#define glVertexAttrib2dv gl3wProcs.gl.VertexAttrib2dv +#define glVertexAttrib2f gl3wProcs.gl.VertexAttrib2f +#define glVertexAttrib2fv gl3wProcs.gl.VertexAttrib2fv +#define glVertexAttrib2s gl3wProcs.gl.VertexAttrib2s +#define glVertexAttrib2sv gl3wProcs.gl.VertexAttrib2sv +#define glVertexAttrib3d gl3wProcs.gl.VertexAttrib3d +#define glVertexAttrib3dv gl3wProcs.gl.VertexAttrib3dv +#define glVertexAttrib3f gl3wProcs.gl.VertexAttrib3f +#define glVertexAttrib3fv gl3wProcs.gl.VertexAttrib3fv +#define glVertexAttrib3s gl3wProcs.gl.VertexAttrib3s +#define glVertexAttrib3sv gl3wProcs.gl.VertexAttrib3sv +#define glVertexAttrib4Nbv gl3wProcs.gl.VertexAttrib4Nbv +#define glVertexAttrib4Niv gl3wProcs.gl.VertexAttrib4Niv +#define glVertexAttrib4Nsv gl3wProcs.gl.VertexAttrib4Nsv +#define glVertexAttrib4Nub gl3wProcs.gl.VertexAttrib4Nub +#define glVertexAttrib4Nubv gl3wProcs.gl.VertexAttrib4Nubv +#define glVertexAttrib4Nuiv gl3wProcs.gl.VertexAttrib4Nuiv +#define glVertexAttrib4Nusv gl3wProcs.gl.VertexAttrib4Nusv +#define glVertexAttrib4bv gl3wProcs.gl.VertexAttrib4bv +#define glVertexAttrib4d gl3wProcs.gl.VertexAttrib4d +#define glVertexAttrib4dv gl3wProcs.gl.VertexAttrib4dv +#define glVertexAttrib4f gl3wProcs.gl.VertexAttrib4f +#define glVertexAttrib4fv gl3wProcs.gl.VertexAttrib4fv +#define glVertexAttrib4iv gl3wProcs.gl.VertexAttrib4iv +#define glVertexAttrib4s gl3wProcs.gl.VertexAttrib4s +#define glVertexAttrib4sv gl3wProcs.gl.VertexAttrib4sv +#define glVertexAttrib4ubv gl3wProcs.gl.VertexAttrib4ubv +#define glVertexAttrib4uiv gl3wProcs.gl.VertexAttrib4uiv +#define glVertexAttrib4usv gl3wProcs.gl.VertexAttrib4usv +#define glVertexAttribBinding gl3wProcs.gl.VertexAttribBinding +#define glVertexAttribDivisor gl3wProcs.gl.VertexAttribDivisor +#define glVertexAttribDivisorARB gl3wProcs.gl.VertexAttribDivisorARB +#define glVertexAttribFormat gl3wProcs.gl.VertexAttribFormat +#define glVertexAttribI1i gl3wProcs.gl.VertexAttribI1i +#define glVertexAttribI1iv gl3wProcs.gl.VertexAttribI1iv +#define glVertexAttribI1ui gl3wProcs.gl.VertexAttribI1ui +#define glVertexAttribI1uiv gl3wProcs.gl.VertexAttribI1uiv +#define glVertexAttribI2i gl3wProcs.gl.VertexAttribI2i +#define glVertexAttribI2iv gl3wProcs.gl.VertexAttribI2iv +#define glVertexAttribI2ui gl3wProcs.gl.VertexAttribI2ui +#define glVertexAttribI2uiv gl3wProcs.gl.VertexAttribI2uiv +#define glVertexAttribI3i gl3wProcs.gl.VertexAttribI3i +#define glVertexAttribI3iv gl3wProcs.gl.VertexAttribI3iv +#define glVertexAttribI3ui gl3wProcs.gl.VertexAttribI3ui +#define glVertexAttribI3uiv gl3wProcs.gl.VertexAttribI3uiv +#define glVertexAttribI4bv gl3wProcs.gl.VertexAttribI4bv +#define glVertexAttribI4i gl3wProcs.gl.VertexAttribI4i +#define glVertexAttribI4iv gl3wProcs.gl.VertexAttribI4iv +#define glVertexAttribI4sv gl3wProcs.gl.VertexAttribI4sv +#define glVertexAttribI4ubv gl3wProcs.gl.VertexAttribI4ubv +#define glVertexAttribI4ui gl3wProcs.gl.VertexAttribI4ui +#define glVertexAttribI4uiv gl3wProcs.gl.VertexAttribI4uiv +#define glVertexAttribI4usv gl3wProcs.gl.VertexAttribI4usv +#define glVertexAttribIFormat gl3wProcs.gl.VertexAttribIFormat +#define glVertexAttribIPointer gl3wProcs.gl.VertexAttribIPointer +#define glVertexAttribL1d gl3wProcs.gl.VertexAttribL1d +#define glVertexAttribL1dv gl3wProcs.gl.VertexAttribL1dv +#define glVertexAttribL1ui64ARB gl3wProcs.gl.VertexAttribL1ui64ARB +#define glVertexAttribL1ui64vARB gl3wProcs.gl.VertexAttribL1ui64vARB +#define glVertexAttribL2d gl3wProcs.gl.VertexAttribL2d +#define glVertexAttribL2dv gl3wProcs.gl.VertexAttribL2dv +#define glVertexAttribL3d gl3wProcs.gl.VertexAttribL3d +#define glVertexAttribL3dv gl3wProcs.gl.VertexAttribL3dv +#define glVertexAttribL4d gl3wProcs.gl.VertexAttribL4d +#define glVertexAttribL4dv gl3wProcs.gl.VertexAttribL4dv +#define glVertexAttribLFormat gl3wProcs.gl.VertexAttribLFormat +#define glVertexAttribLPointer gl3wProcs.gl.VertexAttribLPointer +#define glVertexAttribP1ui gl3wProcs.gl.VertexAttribP1ui +#define glVertexAttribP1uiv gl3wProcs.gl.VertexAttribP1uiv +#define glVertexAttribP2ui gl3wProcs.gl.VertexAttribP2ui +#define glVertexAttribP2uiv gl3wProcs.gl.VertexAttribP2uiv +#define glVertexAttribP3ui gl3wProcs.gl.VertexAttribP3ui +#define glVertexAttribP3uiv gl3wProcs.gl.VertexAttribP3uiv +#define glVertexAttribP4ui gl3wProcs.gl.VertexAttribP4ui +#define glVertexAttribP4uiv gl3wProcs.gl.VertexAttribP4uiv +#define glVertexAttribPointer gl3wProcs.gl.VertexAttribPointer +#define glVertexBindingDivisor gl3wProcs.gl.VertexBindingDivisor +#define glViewport gl3wProcs.gl.Viewport +#define glViewportArrayv gl3wProcs.gl.ViewportArrayv +#define glViewportIndexedf gl3wProcs.gl.ViewportIndexedf +#define glViewportIndexedfv gl3wProcs.gl.ViewportIndexedfv +#define glWaitSync gl3wProcs.gl.WaitSync #ifdef __cplusplus } diff --git a/include/GL/glcorearb.h b/include/GL/glcorearb.h index 1f4d64e..c55b2c4 100644 --- a/include/GL/glcorearb.h +++ b/include/GL/glcorearb.h @@ -34,21 +34,21 @@ extern "C" { ** https://github.com/KhronosGroup/OpenGL-Registry */ -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif -#include +#if defined( _WIN32 ) && !defined( APIENTRY ) && !defined( __CYGWIN__ ) && !defined( __SCITECH_SNAP__ ) +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 +# endif +# include #endif #ifndef APIENTRY -#define APIENTRY +# define APIENTRY #endif #ifndef APIENTRYP -#define APIENTRYP APIENTRY * +# define APIENTRYP APIENTRY * #endif #ifndef GLAPI -#define GLAPI extern +# define GLAPI extern #endif /* glcorearb.h is for use with OpenGL core profile implementations. @@ -56,7 +56,7 @@ extern "C" { ** included as . ** ** glcorearb.h includes only APIs in the latest OpenGL core profile -** implementation together with APIs in newer ARB extensions which +** implementation together with APIs in newer ARB extensions which ** can be supported by the core profile. It does not, and never will ** include functionality removed from the core profile, such as ** fixed-function vertex and fragment processing. @@ -76,5516 +76,7303 @@ extern "C" { */ #ifndef GL_VERSION_1_0 -#define GL_VERSION_1_0 1 -typedef void GLvoid; -typedef unsigned int GLenum; -typedef float GLfloat; -typedef int GLint; -typedef int GLsizei; -typedef unsigned int GLbitfield; -typedef double GLdouble; -typedef unsigned int GLuint; +# define GL_VERSION_1_0 1 +typedef void GLvoid; +typedef unsigned int GLenum; +typedef float GLfloat; +typedef int GLint; +typedef int GLsizei; +typedef unsigned int GLbitfield; +typedef double GLdouble; +typedef unsigned int GLuint; typedef unsigned char GLboolean; typedef unsigned char GLubyte; -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_FALSE 0 -#define GL_TRUE 1 -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 -#define GL_QUADS 0x0007 -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -#define GL_NONE 0 -#define GL_FRONT_LEFT 0x0400 -#define GL_FRONT_RIGHT 0x0401 -#define GL_BACK_LEFT 0x0402 -#define GL_BACK_RIGHT 0x0403 -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_LEFT 0x0406 -#define GL_RIGHT 0x0407 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 -#define GL_CW 0x0900 -#define GL_CCW 0x0901 -#define GL_POINT_SIZE 0x0B11 -#define GL_POINT_SIZE_RANGE 0x0B12 -#define GL_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_LINE_SMOOTH 0x0B20 -#define GL_LINE_WIDTH 0x0B21 -#define GL_LINE_WIDTH_RANGE 0x0B22 -#define GL_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_POLYGON_MODE 0x0B40 -#define GL_POLYGON_SMOOTH 0x0B41 -#define GL_CULL_FACE 0x0B44 -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_TEST 0x0B71 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_TEST 0x0B90 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_VIEWPORT 0x0BA2 -#define GL_DITHER 0x0BD0 -#define GL_BLEND_DST 0x0BE0 -#define GL_BLEND_SRC 0x0BE1 -#define GL_BLEND 0x0BE2 -#define GL_LOGIC_OP_MODE 0x0BF0 -#define GL_DRAW_BUFFER 0x0C01 -#define GL_READ_BUFFER 0x0C02 -#define GL_SCISSOR_BOX 0x0C10 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_DOUBLEBUFFER 0x0C32 -#define GL_STEREO 0x0C33 -#define GL_LINE_SMOOTH_HINT 0x0C52 -#define GL_POLYGON_SMOOTH_HINT 0x0C53 -#define GL_UNPACK_SWAP_BYTES 0x0CF0 -#define GL_UNPACK_LSB_FIRST 0x0CF1 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_SWAP_BYTES 0x0D00 -#define GL_PACK_LSB_FIRST 0x0D01 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_TEXTURE_1D 0x0DE0 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_TEXTURE_WIDTH 0x1000 -#define GL_TEXTURE_HEIGHT 0x1001 -#define GL_TEXTURE_BORDER_COLOR 0x1004 -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_CLEAR 0x1500 -#define GL_AND 0x1501 -#define GL_AND_REVERSE 0x1502 -#define GL_COPY 0x1503 -#define GL_AND_INVERTED 0x1504 -#define GL_NOOP 0x1505 -#define GL_XOR 0x1506 -#define GL_OR 0x1507 -#define GL_NOR 0x1508 -#define GL_EQUIV 0x1509 -#define GL_INVERT 0x150A -#define GL_OR_REVERSE 0x150B -#define GL_COPY_INVERTED 0x150C -#define GL_OR_INVERTED 0x150D -#define GL_NAND 0x150E -#define GL_SET 0x150F -#define GL_TEXTURE 0x1702 -#define GL_COLOR 0x1800 -#define GL_DEPTH 0x1801 -#define GL_STENCIL 0x1802 -#define GL_STENCIL_INDEX 0x1901 -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_RED 0x1903 -#define GL_GREEN 0x1904 -#define GL_BLUE 0x1905 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_POINT 0x1B00 -#define GL_LINE 0x1B01 -#define GL_FILL 0x1B02 -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_REPEAT 0x2901 -typedef void (APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); -typedef void (APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); -typedef void (APIENTRYP PFNGLPOINTSIZEPROC) (GLfloat size); -typedef void (APIENTRYP PFNGLPOLYGONMODEPROC) (GLenum face, GLenum mode); -typedef void (APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLDRAWBUFFERPROC) (GLenum buf); -typedef void (APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); -typedef void (APIENTRYP PFNGLCLEARDEPTHPROC) (GLdouble depth); -typedef void (APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); -typedef void (APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -typedef void (APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); -typedef void (APIENTRYP PFNGLDISABLEPROC) (GLenum cap); -typedef void (APIENTRYP PFNGLENABLEPROC) (GLenum cap); -typedef void (APIENTRYP PFNGLFINISHPROC) (void); -typedef void (APIENTRYP PFNGLFLUSHPROC) (void); -typedef void (APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); -typedef void (APIENTRYP PFNGLLOGICOPPROC) (GLenum opcode); -typedef void (APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); -typedef void (APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); -typedef void (APIENTRYP PFNGLPIXELSTOREFPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLREADBUFFERPROC) (GLenum src); -typedef void (APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -typedef void (APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); -typedef void (APIENTRYP PFNGLGETDOUBLEVPROC) (GLenum pname, GLdouble *data); -typedef GLenum (APIENTRYP PFNGLGETERRORPROC) (void); -typedef void (APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); -typedef void (APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); -typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); -typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) (GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); -typedef void (APIENTRYP PFNGLDEPTHRANGEPROC) (GLdouble near, GLdouble far); -typedef void (APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCullFace (GLenum mode); -GLAPI void APIENTRY glFrontFace (GLenum mode); -GLAPI void APIENTRY glHint (GLenum target, GLenum mode); -GLAPI void APIENTRY glLineWidth (GLfloat width); -GLAPI void APIENTRY glPointSize (GLfloat size); -GLAPI void APIENTRY glPolygonMode (GLenum face, GLenum mode); -GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glDrawBuffer (GLenum buf); -GLAPI void APIENTRY glClear (GLbitfield mask); -GLAPI void APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GLAPI void APIENTRY glClearStencil (GLint s); -GLAPI void APIENTRY glClearDepth (GLdouble depth); -GLAPI void APIENTRY glStencilMask (GLuint mask); -GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GLAPI void APIENTRY glDepthMask (GLboolean flag); -GLAPI void APIENTRY glDisable (GLenum cap); -GLAPI void APIENTRY glEnable (GLenum cap); -GLAPI void APIENTRY glFinish (void); -GLAPI void APIENTRY glFlush (void); -GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GLAPI void APIENTRY glLogicOp (GLenum opcode); -GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GLAPI void APIENTRY glDepthFunc (GLenum func); -GLAPI void APIENTRY glPixelStoref (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param); -GLAPI void APIENTRY glReadBuffer (GLenum src); -GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -GLAPI void APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); -GLAPI void APIENTRY glGetDoublev (GLenum pname, GLdouble *data); -GLAPI GLenum APIENTRY glGetError (void); -GLAPI void APIENTRY glGetFloatv (GLenum pname, GLfloat *data); -GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *data); -GLAPI const GLubyte *APIENTRY glGetString (GLenum name); -GLAPI void APIENTRY glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -GLAPI void APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY glIsEnabled (GLenum cap); -GLAPI void APIENTRY glDepthRange (GLdouble near, GLdouble far); -GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); -#endif +# define GL_DEPTH_BUFFER_BIT 0x00000100 +# define GL_STENCIL_BUFFER_BIT 0x00000400 +# define GL_COLOR_BUFFER_BIT 0x00004000 +# define GL_FALSE 0 +# define GL_TRUE 1 +# define GL_POINTS 0x0000 +# define GL_LINES 0x0001 +# define GL_LINE_LOOP 0x0002 +# define GL_LINE_STRIP 0x0003 +# define GL_TRIANGLES 0x0004 +# define GL_TRIANGLE_STRIP 0x0005 +# define GL_TRIANGLE_FAN 0x0006 +# define GL_QUADS 0x0007 +# define GL_NEVER 0x0200 +# define GL_LESS 0x0201 +# define GL_EQUAL 0x0202 +# define GL_LEQUAL 0x0203 +# define GL_GREATER 0x0204 +# define GL_NOTEQUAL 0x0205 +# define GL_GEQUAL 0x0206 +# define GL_ALWAYS 0x0207 +# define GL_ZERO 0 +# define GL_ONE 1 +# define GL_SRC_COLOR 0x0300 +# define GL_ONE_MINUS_SRC_COLOR 0x0301 +# define GL_SRC_ALPHA 0x0302 +# define GL_ONE_MINUS_SRC_ALPHA 0x0303 +# define GL_DST_ALPHA 0x0304 +# define GL_ONE_MINUS_DST_ALPHA 0x0305 +# define GL_DST_COLOR 0x0306 +# define GL_ONE_MINUS_DST_COLOR 0x0307 +# define GL_SRC_ALPHA_SATURATE 0x0308 +# define GL_NONE 0 +# define GL_FRONT_LEFT 0x0400 +# define GL_FRONT_RIGHT 0x0401 +# define GL_BACK_LEFT 0x0402 +# define GL_BACK_RIGHT 0x0403 +# define GL_FRONT 0x0404 +# define GL_BACK 0x0405 +# define GL_LEFT 0x0406 +# define GL_RIGHT 0x0407 +# define GL_FRONT_AND_BACK 0x0408 +# define GL_NO_ERROR 0 +# define GL_INVALID_ENUM 0x0500 +# define GL_INVALID_VALUE 0x0501 +# define GL_INVALID_OPERATION 0x0502 +# define GL_OUT_OF_MEMORY 0x0505 +# define GL_CW 0x0900 +# define GL_CCW 0x0901 +# define GL_POINT_SIZE 0x0B11 +# define GL_POINT_SIZE_RANGE 0x0B12 +# define GL_POINT_SIZE_GRANULARITY 0x0B13 +# define GL_LINE_SMOOTH 0x0B20 +# define GL_LINE_WIDTH 0x0B21 +# define GL_LINE_WIDTH_RANGE 0x0B22 +# define GL_LINE_WIDTH_GRANULARITY 0x0B23 +# define GL_POLYGON_MODE 0x0B40 +# define GL_POLYGON_SMOOTH 0x0B41 +# define GL_CULL_FACE 0x0B44 +# define GL_CULL_FACE_MODE 0x0B45 +# define GL_FRONT_FACE 0x0B46 +# define GL_DEPTH_RANGE 0x0B70 +# define GL_DEPTH_TEST 0x0B71 +# define GL_DEPTH_WRITEMASK 0x0B72 +# define GL_DEPTH_CLEAR_VALUE 0x0B73 +# define GL_DEPTH_FUNC 0x0B74 +# define GL_STENCIL_TEST 0x0B90 +# define GL_STENCIL_CLEAR_VALUE 0x0B91 +# define GL_STENCIL_FUNC 0x0B92 +# define GL_STENCIL_VALUE_MASK 0x0B93 +# define GL_STENCIL_FAIL 0x0B94 +# define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +# define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +# define GL_STENCIL_REF 0x0B97 +# define GL_STENCIL_WRITEMASK 0x0B98 +# define GL_VIEWPORT 0x0BA2 +# define GL_DITHER 0x0BD0 +# define GL_BLEND_DST 0x0BE0 +# define GL_BLEND_SRC 0x0BE1 +# define GL_BLEND 0x0BE2 +# define GL_LOGIC_OP_MODE 0x0BF0 +# define GL_DRAW_BUFFER 0x0C01 +# define GL_READ_BUFFER 0x0C02 +# define GL_SCISSOR_BOX 0x0C10 +# define GL_SCISSOR_TEST 0x0C11 +# define GL_COLOR_CLEAR_VALUE 0x0C22 +# define GL_COLOR_WRITEMASK 0x0C23 +# define GL_DOUBLEBUFFER 0x0C32 +# define GL_STEREO 0x0C33 +# define GL_LINE_SMOOTH_HINT 0x0C52 +# define GL_POLYGON_SMOOTH_HINT 0x0C53 +# define GL_UNPACK_SWAP_BYTES 0x0CF0 +# define GL_UNPACK_LSB_FIRST 0x0CF1 +# define GL_UNPACK_ROW_LENGTH 0x0CF2 +# define GL_UNPACK_SKIP_ROWS 0x0CF3 +# define GL_UNPACK_SKIP_PIXELS 0x0CF4 +# define GL_UNPACK_ALIGNMENT 0x0CF5 +# define GL_PACK_SWAP_BYTES 0x0D00 +# define GL_PACK_LSB_FIRST 0x0D01 +# define GL_PACK_ROW_LENGTH 0x0D02 +# define GL_PACK_SKIP_ROWS 0x0D03 +# define GL_PACK_SKIP_PIXELS 0x0D04 +# define GL_PACK_ALIGNMENT 0x0D05 +# define GL_MAX_TEXTURE_SIZE 0x0D33 +# define GL_MAX_VIEWPORT_DIMS 0x0D3A +# define GL_SUBPIXEL_BITS 0x0D50 +# define GL_TEXTURE_1D 0x0DE0 +# define GL_TEXTURE_2D 0x0DE1 +# define GL_TEXTURE_WIDTH 0x1000 +# define GL_TEXTURE_HEIGHT 0x1001 +# define GL_TEXTURE_BORDER_COLOR 0x1004 +# define GL_DONT_CARE 0x1100 +# define GL_FASTEST 0x1101 +# define GL_NICEST 0x1102 +# define GL_BYTE 0x1400 +# define GL_UNSIGNED_BYTE 0x1401 +# define GL_SHORT 0x1402 +# define GL_UNSIGNED_SHORT 0x1403 +# define GL_INT 0x1404 +# define GL_UNSIGNED_INT 0x1405 +# define GL_FLOAT 0x1406 +# define GL_STACK_OVERFLOW 0x0503 +# define GL_STACK_UNDERFLOW 0x0504 +# define GL_CLEAR 0x1500 +# define GL_AND 0x1501 +# define GL_AND_REVERSE 0x1502 +# define GL_COPY 0x1503 +# define GL_AND_INVERTED 0x1504 +# define GL_NOOP 0x1505 +# define GL_XOR 0x1506 +# define GL_OR 0x1507 +# define GL_NOR 0x1508 +# define GL_EQUIV 0x1509 +# define GL_INVERT 0x150A +# define GL_OR_REVERSE 0x150B +# define GL_COPY_INVERTED 0x150C +# define GL_OR_INVERTED 0x150D +# define GL_NAND 0x150E +# define GL_SET 0x150F +# define GL_TEXTURE 0x1702 +# define GL_COLOR 0x1800 +# define GL_DEPTH 0x1801 +# define GL_STENCIL 0x1802 +# define GL_STENCIL_INDEX 0x1901 +# define GL_DEPTH_COMPONENT 0x1902 +# define GL_RED 0x1903 +# define GL_GREEN 0x1904 +# define GL_BLUE 0x1905 +# define GL_ALPHA 0x1906 +# define GL_RGB 0x1907 +# define GL_RGBA 0x1908 +# define GL_POINT 0x1B00 +# define GL_LINE 0x1B01 +# define GL_FILL 0x1B02 +# define GL_KEEP 0x1E00 +# define GL_REPLACE 0x1E01 +# define GL_INCR 0x1E02 +# define GL_DECR 0x1E03 +# define GL_VENDOR 0x1F00 +# define GL_RENDERER 0x1F01 +# define GL_VERSION 0x1F02 +# define GL_EXTENSIONS 0x1F03 +# define GL_NEAREST 0x2600 +# define GL_LINEAR 0x2601 +# define GL_NEAREST_MIPMAP_NEAREST 0x2700 +# define GL_LINEAR_MIPMAP_NEAREST 0x2701 +# define GL_NEAREST_MIPMAP_LINEAR 0x2702 +# define GL_LINEAR_MIPMAP_LINEAR 0x2703 +# define GL_TEXTURE_MAG_FILTER 0x2800 +# define GL_TEXTURE_MIN_FILTER 0x2801 +# define GL_TEXTURE_WRAP_S 0x2802 +# define GL_TEXTURE_WRAP_T 0x2803 +# define GL_REPEAT 0x2901 +typedef void( APIENTRYP PFNGLCULLFACEPROC )( GLenum mode ); +typedef void( APIENTRYP PFNGLFRONTFACEPROC )( GLenum mode ); +typedef void( APIENTRYP PFNGLHINTPROC )( GLenum target, GLenum mode ); +typedef void( APIENTRYP PFNGLLINEWIDTHPROC )( GLfloat width ); +typedef void( APIENTRYP PFNGLPOINTSIZEPROC )( GLfloat size ); +typedef void( APIENTRYP PFNGLPOLYGONMODEPROC )( GLenum face, GLenum mode ); +typedef void( APIENTRYP PFNGLSCISSORPROC )( GLint x, GLint y, GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLTEXPARAMETERFPROC )( GLenum target, GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLTEXPARAMETERFVPROC )( GLenum target, GLenum pname, const GLfloat *params ); +typedef void( APIENTRYP PFNGLTEXPARAMETERIPROC )( GLenum target, GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLTEXPARAMETERIVPROC )( GLenum target, GLenum pname, const GLint *params ); +typedef void( APIENTRYP PFNGLTEXIMAGE1DPROC )( GLenum target, GLint level, GLint internalformat, + GLsizei width, GLint border, GLenum format, GLenum type, + const void *pixels ); +typedef void( APIENTRYP PFNGLTEXIMAGE2DPROC )( GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLint border, + GLenum format, GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLDRAWBUFFERPROC )( GLenum buf ); +typedef void( APIENTRYP PFNGLCLEARPROC )( GLbitfield mask ); +typedef void( APIENTRYP PFNGLCLEARCOLORPROC )( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); +typedef void( APIENTRYP PFNGLCLEARSTENCILPROC )( GLint s ); +typedef void( APIENTRYP PFNGLCLEARDEPTHPROC )( GLdouble depth ); +typedef void( APIENTRYP PFNGLSTENCILMASKPROC )( GLuint mask ); +typedef void( APIENTRYP PFNGLCOLORMASKPROC )( GLboolean red, GLboolean green, GLboolean blue, + GLboolean alpha ); +typedef void( APIENTRYP PFNGLDEPTHMASKPROC )( GLboolean flag ); +typedef void( APIENTRYP PFNGLDISABLEPROC )( GLenum cap ); +typedef void( APIENTRYP PFNGLENABLEPROC )( GLenum cap ); +typedef void( APIENTRYP PFNGLFINISHPROC )( void ); +typedef void( APIENTRYP PFNGLFLUSHPROC )( void ); +typedef void( APIENTRYP PFNGLBLENDFUNCPROC )( GLenum sfactor, GLenum dfactor ); +typedef void( APIENTRYP PFNGLLOGICOPPROC )( GLenum opcode ); +typedef void( APIENTRYP PFNGLSTENCILFUNCPROC )( GLenum func, GLint ref, GLuint mask ); +typedef void( APIENTRYP PFNGLSTENCILOPPROC )( GLenum fail, GLenum zfail, GLenum zpass ); +typedef void( APIENTRYP PFNGLDEPTHFUNCPROC )( GLenum func ); +typedef void( APIENTRYP PFNGLPIXELSTOREFPROC )( GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLPIXELSTOREIPROC )( GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLREADBUFFERPROC )( GLenum src ); +typedef void( APIENTRYP PFNGLREADPIXELSPROC )( GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, void *pixels ); +typedef void( APIENTRYP PFNGLGETBOOLEANVPROC )( GLenum pname, GLboolean *data ); +typedef void( APIENTRYP PFNGLGETDOUBLEVPROC )( GLenum pname, GLdouble *data ); +typedef GLenum( APIENTRYP PFNGLGETERRORPROC )( void ); +typedef void( APIENTRYP PFNGLGETFLOATVPROC )( GLenum pname, GLfloat *data ); +typedef void( APIENTRYP PFNGLGETINTEGERVPROC )( GLenum pname, GLint *data ); +typedef const GLubyte *( APIENTRYP PFNGLGETSTRINGPROC )( GLenum name ); +typedef void( APIENTRYP PFNGLGETTEXIMAGEPROC )( GLenum target, GLint level, GLenum format, GLenum type, + void *pixels ); +typedef void( APIENTRYP PFNGLGETTEXPARAMETERFVPROC )( GLenum target, GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETTEXPARAMETERIVPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC )( GLenum target, GLint level, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC )( GLenum target, GLint level, GLenum pname, + GLint *params ); +typedef GLboolean( APIENTRYP PFNGLISENABLEDPROC )( GLenum cap ); +typedef void( APIENTRYP PFNGLDEPTHRANGEPROC )( GLdouble near, GLdouble far ); +typedef void( APIENTRYP PFNGLVIEWPORTPROC )( GLint x, GLint y, GLsizei width, GLsizei height ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCullFace( GLenum mode ); +GLAPI void APIENTRY glFrontFace( GLenum mode ); +GLAPI void APIENTRY glHint( GLenum target, GLenum mode ); +GLAPI void APIENTRY glLineWidth( GLfloat width ); +GLAPI void APIENTRY glPointSize( GLfloat size ); +GLAPI void APIENTRY glPolygonMode( GLenum face, GLenum mode ); +GLAPI void APIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height ); +GLAPI void APIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glTexParameterfv( GLenum target, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glTexParameteriv( GLenum target, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glTexImage1D( GLenum target, GLint level, GLint internalformat, GLsizei width, + GLint border, GLenum format, GLenum type, const void *pixels ); +GLAPI void APIENTRY glTexImage2D( GLenum target, GLint level, GLint internalformat, GLsizei width, + GLsizei height, GLint border, GLenum format, GLenum type, + const void *pixels ); +GLAPI void APIENTRY glDrawBuffer( GLenum buf ); +GLAPI void APIENTRY glClear( GLbitfield mask ); +GLAPI void APIENTRY glClearColor( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); +GLAPI void APIENTRY glClearStencil( GLint s ); +GLAPI void APIENTRY glClearDepth( GLdouble depth ); +GLAPI void APIENTRY glStencilMask( GLuint mask ); +GLAPI void APIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); +GLAPI void APIENTRY glDepthMask( GLboolean flag ); +GLAPI void APIENTRY glDisable( GLenum cap ); +GLAPI void APIENTRY glEnable( GLenum cap ); +GLAPI void APIENTRY glFinish( void ); +GLAPI void APIENTRY glFlush( void ); +GLAPI void APIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor ); +GLAPI void APIENTRY glLogicOp( GLenum opcode ); +GLAPI void APIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask ); +GLAPI void APIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass ); +GLAPI void APIENTRY glDepthFunc( GLenum func ); +GLAPI void APIENTRY glPixelStoref( GLenum pname, GLfloat param ); +GLAPI void APIENTRY glPixelStorei( GLenum pname, GLint param ); +GLAPI void APIENTRY glReadBuffer( GLenum src ); +GLAPI void APIENTRY glReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, + GLenum type, void *pixels ); +GLAPI void APIENTRY glGetBooleanv( GLenum pname, GLboolean *data ); +GLAPI void APIENTRY glGetDoublev( GLenum pname, GLdouble *data ); +GLAPI GLenum APIENTRY glGetError( void ); +GLAPI void APIENTRY glGetFloatv( GLenum pname, GLfloat *data ); +GLAPI void APIENTRY glGetIntegerv( GLenum pname, GLint *data ); +GLAPI const GLubyte *APIENTRY glGetString( GLenum name ); +GLAPI void APIENTRY glGetTexImage( GLenum target, GLint level, GLenum format, GLenum type, + void *pixels ); +GLAPI void APIENTRY glGetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetTexParameteriv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetTexLevelParameterfv( GLenum target, GLint level, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetTexLevelParameteriv( GLenum target, GLint level, GLenum pname, GLint *params ); +GLAPI GLboolean APIENTRY glIsEnabled( GLenum cap ); +GLAPI void APIENTRY glDepthRange( GLdouble near, GLdouble far ); +GLAPI void APIENTRY glViewport( GLint x, GLint y, GLsizei width, GLsizei height ); +# endif #endif /* GL_VERSION_1_0 */ #ifndef GL_VERSION_1_1 -#define GL_VERSION_1_1 1 -typedef float GLclampf; +# define GL_VERSION_1_1 1 +typedef float GLclampf; typedef double GLclampd; -#define GL_COLOR_LOGIC_OP 0x0BF2 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_POINT 0x2A01 -#define GL_POLYGON_OFFSET_LINE 0x2A02 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_1D 0x8068 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 -#define GL_TEXTURE_RED_SIZE 0x805C -#define GL_TEXTURE_GREEN_SIZE 0x805D -#define GL_TEXTURE_BLUE_SIZE 0x805E -#define GL_TEXTURE_ALPHA_SIZE 0x805F -#define GL_DOUBLE 0x140A -#define GL_PROXY_TEXTURE_1D 0x8063 -#define GL_PROXY_TEXTURE_2D 0x8064 -#define GL_R3_G3_B2 0x2A10 -#define GL_RGB4 0x804F -#define GL_RGB5 0x8050 -#define GL_RGB8 0x8051 -#define GL_RGB10 0x8052 -#define GL_RGB12 0x8053 -#define GL_RGB16 0x8054 -#define GL_RGBA2 0x8055 -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGBA8 0x8058 -#define GL_RGB10_A2 0x8059 -#define GL_RGBA12 0x805A -#define GL_RGBA16 0x805B -#define GL_VERTEX_ARRAY 0x8074 -typedef void (APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); -typedef void (APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params); -typedef void (APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); -typedef void (APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); -GLAPI void APIENTRY glGetPointerv (GLenum pname, void **params); -GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GLAPI void APIENTRY glCopyTexImage1D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture); -GLAPI void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); -GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures); -GLAPI GLboolean APIENTRY glIsTexture (GLuint texture); -#endif +# define GL_COLOR_LOGIC_OP 0x0BF2 +# define GL_POLYGON_OFFSET_UNITS 0x2A00 +# define GL_POLYGON_OFFSET_POINT 0x2A01 +# define GL_POLYGON_OFFSET_LINE 0x2A02 +# define GL_POLYGON_OFFSET_FILL 0x8037 +# define GL_POLYGON_OFFSET_FACTOR 0x8038 +# define GL_TEXTURE_BINDING_1D 0x8068 +# define GL_TEXTURE_BINDING_2D 0x8069 +# define GL_TEXTURE_INTERNAL_FORMAT 0x1003 +# define GL_TEXTURE_RED_SIZE 0x805C +# define GL_TEXTURE_GREEN_SIZE 0x805D +# define GL_TEXTURE_BLUE_SIZE 0x805E +# define GL_TEXTURE_ALPHA_SIZE 0x805F +# define GL_DOUBLE 0x140A +# define GL_PROXY_TEXTURE_1D 0x8063 +# define GL_PROXY_TEXTURE_2D 0x8064 +# define GL_R3_G3_B2 0x2A10 +# define GL_RGB4 0x804F +# define GL_RGB5 0x8050 +# define GL_RGB8 0x8051 +# define GL_RGB10 0x8052 +# define GL_RGB12 0x8053 +# define GL_RGB16 0x8054 +# define GL_RGBA2 0x8055 +# define GL_RGBA4 0x8056 +# define GL_RGB5_A1 0x8057 +# define GL_RGBA8 0x8058 +# define GL_RGB10_A2 0x8059 +# define GL_RGBA12 0x805A +# define GL_RGBA16 0x805B +# define GL_VERTEX_ARRAY 0x8074 +typedef void( APIENTRYP PFNGLDRAWARRAYSPROC )( GLenum mode, GLint first, GLsizei count ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSPROC )( GLenum mode, GLsizei count, GLenum type, + const void *indices ); +typedef void( APIENTRYP PFNGLGETPOINTERVPROC )( GLenum pname, void **params ); +typedef void( APIENTRYP PFNGLPOLYGONOFFSETPROC )( GLfloat factor, GLfloat units ); +typedef void( APIENTRYP PFNGLCOPYTEXIMAGE1DPROC )( GLenum target, GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, GLint border ); +typedef void( APIENTRYP PFNGLCOPYTEXIMAGE2DPROC )( GLenum target, GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, GLsizei height, + GLint border ); +typedef void( APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC )( GLenum target, GLint level, GLint xoffset, GLint x, + GLint y, GLsizei width ); +typedef void( APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint x, GLint y, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLTEXSUBIMAGE1DPROC )( GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLenum type, + const void *pixels ); +typedef void( APIENTRYP PFNGLTEXSUBIMAGE2DPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLBINDTEXTUREPROC )( GLenum target, GLuint texture ); +typedef void( APIENTRYP PFNGLDELETETEXTURESPROC )( GLsizei n, const GLuint *textures ); +typedef void( APIENTRYP PFNGLGENTEXTURESPROC )( GLsizei n, GLuint *textures ); +typedef GLboolean( APIENTRYP PFNGLISTEXTUREPROC )( GLuint texture ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count ); +GLAPI void APIENTRY glDrawElements( GLenum mode, GLsizei count, GLenum type, const void *indices ); +GLAPI void APIENTRY glGetPointerv( GLenum pname, void **params ); +GLAPI void APIENTRY glPolygonOffset( GLfloat factor, GLfloat units ); +GLAPI void APIENTRY glCopyTexImage1D( GLenum target, GLint level, GLenum internalformat, GLint x, + GLint y, GLsizei width, GLint border ); +GLAPI void APIENTRY glCopyTexImage2D( GLenum target, GLint level, GLenum internalformat, GLint x, + GLint y, GLsizei width, GLsizei height, GLint border ); +GLAPI void APIENTRY glCopyTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, + GLsizei width ); +GLAPI void APIENTRY glCopyTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint x, GLint y, GLsizei width, GLsizei height ); +GLAPI void APIENTRY glTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, + GLenum format, GLenum type, const void *pixels ); +GLAPI void APIENTRY glTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, + const void *pixels ); +GLAPI void APIENTRY glBindTexture( GLenum target, GLuint texture ); +GLAPI void APIENTRY glDeleteTextures( GLsizei n, const GLuint *textures ); +GLAPI void APIENTRY glGenTextures( GLsizei n, GLuint *textures ); +GLAPI GLboolean APIENTRY glIsTexture( GLuint texture ); +# endif #endif /* GL_VERSION_1_1 */ #ifndef GL_VERSION_1_2 -#define GL_VERSION_1_2 1 -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif +# define GL_VERSION_1_2 1 +# define GL_UNSIGNED_BYTE_3_3_2 0x8032 +# define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +# define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +# define GL_UNSIGNED_INT_8_8_8_8 0x8035 +# define GL_UNSIGNED_INT_10_10_10_2 0x8036 +# define GL_TEXTURE_BINDING_3D 0x806A +# define GL_PACK_SKIP_IMAGES 0x806B +# define GL_PACK_IMAGE_HEIGHT 0x806C +# define GL_UNPACK_SKIP_IMAGES 0x806D +# define GL_UNPACK_IMAGE_HEIGHT 0x806E +# define GL_TEXTURE_3D 0x806F +# define GL_PROXY_TEXTURE_3D 0x8070 +# define GL_TEXTURE_DEPTH 0x8071 +# define GL_TEXTURE_WRAP_R 0x8072 +# define GL_MAX_3D_TEXTURE_SIZE 0x8073 +# define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +# define GL_UNSIGNED_SHORT_5_6_5 0x8363 +# define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +# define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +# define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +# define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +# define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +# define GL_BGR 0x80E0 +# define GL_BGRA 0x80E1 +# define GL_MAX_ELEMENTS_VERTICES 0x80E8 +# define GL_MAX_ELEMENTS_INDICES 0x80E9 +# define GL_CLAMP_TO_EDGE 0x812F +# define GL_TEXTURE_MIN_LOD 0x813A +# define GL_TEXTURE_MAX_LOD 0x813B +# define GL_TEXTURE_BASE_LEVEL 0x813C +# define GL_TEXTURE_MAX_LEVEL 0x813D +# define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +# define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +# define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +# define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +# define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +typedef void( APIENTRYP PFNGLDRAWRANGEELEMENTSPROC )( GLenum mode, GLuint start, GLuint end, + GLsizei count, GLenum type, const void *indices ); +typedef void( APIENTRYP PFNGLTEXIMAGE3DPROC )( GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLenum format, GLenum type, + const void *pixels ); +typedef void( APIENTRYP PFNGLTEXSUBIMAGE3DPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint x, GLint y, + GLsizei width, GLsizei height ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, + GLenum type, const void *indices ); +GLAPI void APIENTRY glTexImage3D( GLenum target, GLint level, GLint internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, GLenum format, + GLenum type, const void *pixels ); +GLAPI void APIENTRY glTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, const void *pixels ); +GLAPI void APIENTRY glCopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, GLint y, GLsizei width, + GLsizei height ); +# endif #endif /* GL_VERSION_1_2 */ #ifndef GL_VERSION_1_3 -#define GL_VERSION_1_3 1 -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_CLAMP_TO_BORDER 0x812D -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTexture (GLenum texture); -GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img); -#endif +# define GL_VERSION_1_3 1 +# define GL_TEXTURE0 0x84C0 +# define GL_TEXTURE1 0x84C1 +# define GL_TEXTURE2 0x84C2 +# define GL_TEXTURE3 0x84C3 +# define GL_TEXTURE4 0x84C4 +# define GL_TEXTURE5 0x84C5 +# define GL_TEXTURE6 0x84C6 +# define GL_TEXTURE7 0x84C7 +# define GL_TEXTURE8 0x84C8 +# define GL_TEXTURE9 0x84C9 +# define GL_TEXTURE10 0x84CA +# define GL_TEXTURE11 0x84CB +# define GL_TEXTURE12 0x84CC +# define GL_TEXTURE13 0x84CD +# define GL_TEXTURE14 0x84CE +# define GL_TEXTURE15 0x84CF +# define GL_TEXTURE16 0x84D0 +# define GL_TEXTURE17 0x84D1 +# define GL_TEXTURE18 0x84D2 +# define GL_TEXTURE19 0x84D3 +# define GL_TEXTURE20 0x84D4 +# define GL_TEXTURE21 0x84D5 +# define GL_TEXTURE22 0x84D6 +# define GL_TEXTURE23 0x84D7 +# define GL_TEXTURE24 0x84D8 +# define GL_TEXTURE25 0x84D9 +# define GL_TEXTURE26 0x84DA +# define GL_TEXTURE27 0x84DB +# define GL_TEXTURE28 0x84DC +# define GL_TEXTURE29 0x84DD +# define GL_TEXTURE30 0x84DE +# define GL_TEXTURE31 0x84DF +# define GL_ACTIVE_TEXTURE 0x84E0 +# define GL_MULTISAMPLE 0x809D +# define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +# define GL_SAMPLE_ALPHA_TO_ONE 0x809F +# define GL_SAMPLE_COVERAGE 0x80A0 +# define GL_SAMPLE_BUFFERS 0x80A8 +# define GL_SAMPLES 0x80A9 +# define GL_SAMPLE_COVERAGE_VALUE 0x80AA +# define GL_SAMPLE_COVERAGE_INVERT 0x80AB +# define GL_TEXTURE_CUBE_MAP 0x8513 +# define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +# define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +# define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +# define GL_COMPRESSED_RGB 0x84ED +# define GL_COMPRESSED_RGBA 0x84EE +# define GL_TEXTURE_COMPRESSION_HINT 0x84EF +# define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +# define GL_TEXTURE_COMPRESSED 0x86A1 +# define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +# define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +# define GL_CLAMP_TO_BORDER 0x812D +typedef void( APIENTRYP PFNGLACTIVETEXTUREPROC )( GLenum texture ); +typedef void( APIENTRYP PFNGLSAMPLECOVERAGEPROC )( GLfloat value, GLboolean invert ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC )( GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, + GLsizei imageSize, const void *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC )( GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLint border, GLsizei imageSize, + const void *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC )( GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLint border, GLsizei imageSize, + const void *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLsizei imageSize, const void *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLsizei imageSize, + const void *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC )( GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, + GLsizei imageSize, const void *data ); +typedef void( APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC )( GLenum target, GLint level, void *img ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTexture( GLenum texture ); +GLAPI void APIENTRY glSampleCoverage( GLfloat value, GLboolean invert ); +GLAPI void APIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth, GLint border, + GLsizei imageSize, const void *data ); +GLAPI void APIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const void *data ); +GLAPI void APIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLint border, GLsizei imageSize, + const void *data ); +GLAPI void APIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLsizei imageSize, + const void *data ); +GLAPI void APIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, + GLsizei imageSize, const void *data ); +GLAPI void APIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, + GLenum format, GLsizei imageSize, const void *data ); +GLAPI void APIENTRY glGetCompressedTexImage( GLenum target, GLint level, void *img ); +# endif #endif /* GL_VERSION_1_3 */ #ifndef GL_VERSION_1_4 -#define GL_VERSION_1_4 1 -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_DEPTH_COMPONENT32 0x81A7 -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_LOD_BIAS 0x8501 -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_FUNC_ADD 0x8006 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); -GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); -GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param); -GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params); -GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GLAPI void APIENTRY glBlendEquation (GLenum mode); -#endif +# define GL_VERSION_1_4 1 +# define GL_BLEND_DST_RGB 0x80C8 +# define GL_BLEND_SRC_RGB 0x80C9 +# define GL_BLEND_DST_ALPHA 0x80CA +# define GL_BLEND_SRC_ALPHA 0x80CB +# define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +# define GL_DEPTH_COMPONENT16 0x81A5 +# define GL_DEPTH_COMPONENT24 0x81A6 +# define GL_DEPTH_COMPONENT32 0x81A7 +# define GL_MIRRORED_REPEAT 0x8370 +# define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +# define GL_TEXTURE_LOD_BIAS 0x8501 +# define GL_INCR_WRAP 0x8507 +# define GL_DECR_WRAP 0x8508 +# define GL_TEXTURE_DEPTH_SIZE 0x884A +# define GL_TEXTURE_COMPARE_MODE 0x884C +# define GL_TEXTURE_COMPARE_FUNC 0x884D +# define GL_FUNC_ADD 0x8006 +# define GL_FUNC_SUBTRACT 0x800A +# define GL_FUNC_REVERSE_SUBTRACT 0x800B +# define GL_MIN 0x8007 +# define GL_MAX 0x8008 +# define GL_CONSTANT_COLOR 0x8001 +# define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +# define GL_CONSTANT_ALPHA 0x8003 +# define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +typedef void( APIENTRYP PFNGLBLENDFUNCSEPARATEPROC )( GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorAlpha, GLenum dfactorAlpha ); +typedef void( APIENTRYP PFNGLMULTIDRAWARRAYSPROC )( GLenum mode, const GLint *first, + const GLsizei *count, GLsizei drawcount ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTSPROC )( GLenum mode, const GLsizei *count, GLenum type, + const void *const *indices, GLsizei drawcount ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERFPROC )( GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERFVPROC )( GLenum pname, const GLfloat *params ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERIPROC )( GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERIVPROC )( GLenum pname, const GLint *params ); +typedef void( APIENTRYP PFNGLBLENDCOLORPROC )( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); +typedef void( APIENTRYP PFNGLBLENDEQUATIONPROC )( GLenum mode ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparate( GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, + GLenum dfactorAlpha ); +GLAPI void APIENTRY glMultiDrawArrays( GLenum mode, const GLint *first, const GLsizei *count, + GLsizei drawcount ); +GLAPI void APIENTRY glMultiDrawElements( GLenum mode, const GLsizei *count, GLenum type, + const void *const *indices, GLsizei drawcount ); +GLAPI void APIENTRY glPointParameterf( GLenum pname, GLfloat param ); +GLAPI void APIENTRY glPointParameterfv( GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glPointParameteri( GLenum pname, GLint param ); +GLAPI void APIENTRY glPointParameteriv( GLenum pname, const GLint *params ); +GLAPI void APIENTRY glBlendColor( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); +GLAPI void APIENTRY glBlendEquation( GLenum mode ); +# endif #endif /* GL_VERSION_1_4 */ #ifndef GL_VERSION_1_5 -#define GL_VERSION_1_5 1 -#include +# define GL_VERSION_1_5 1 +# include typedef ptrdiff_t GLsizeiptr; typedef ptrdiff_t GLintptr; -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_QUERY_COUNTER_BITS 0x8864 -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_READ_ONLY 0x88B8 -#define GL_WRITE_ONLY 0x88B9 -#define GL_READ_WRITE 0x88BA -#define GL_BUFFER_ACCESS 0x88BB -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_DRAW 0x88E0 -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_DRAW 0x88E4 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_SAMPLES_PASSED 0x8914 -#define GL_SRC1_ALPHA 0x8589 -typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data); -typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsQuery (GLuint id); -GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id); -GLAPI void APIENTRY glEndQuery (GLenum target); -GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); -GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer); -GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data); -GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access); -GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target); -GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); -#endif +# define GL_BUFFER_SIZE 0x8764 +# define GL_BUFFER_USAGE 0x8765 +# define GL_QUERY_COUNTER_BITS 0x8864 +# define GL_CURRENT_QUERY 0x8865 +# define GL_QUERY_RESULT 0x8866 +# define GL_QUERY_RESULT_AVAILABLE 0x8867 +# define GL_ARRAY_BUFFER 0x8892 +# define GL_ELEMENT_ARRAY_BUFFER 0x8893 +# define GL_ARRAY_BUFFER_BINDING 0x8894 +# define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +# define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +# define GL_READ_ONLY 0x88B8 +# define GL_WRITE_ONLY 0x88B9 +# define GL_READ_WRITE 0x88BA +# define GL_BUFFER_ACCESS 0x88BB +# define GL_BUFFER_MAPPED 0x88BC +# define GL_BUFFER_MAP_POINTER 0x88BD +# define GL_STREAM_DRAW 0x88E0 +# define GL_STREAM_READ 0x88E1 +# define GL_STREAM_COPY 0x88E2 +# define GL_STATIC_DRAW 0x88E4 +# define GL_STATIC_READ 0x88E5 +# define GL_STATIC_COPY 0x88E6 +# define GL_DYNAMIC_DRAW 0x88E8 +# define GL_DYNAMIC_READ 0x88E9 +# define GL_DYNAMIC_COPY 0x88EA +# define GL_SAMPLES_PASSED 0x8914 +# define GL_SRC1_ALPHA 0x8589 +typedef void( APIENTRYP PFNGLGENQUERIESPROC )( GLsizei n, GLuint *ids ); +typedef void( APIENTRYP PFNGLDELETEQUERIESPROC )( GLsizei n, const GLuint *ids ); +typedef GLboolean( APIENTRYP PFNGLISQUERYPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLBEGINQUERYPROC )( GLenum target, GLuint id ); +typedef void( APIENTRYP PFNGLENDQUERYPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLGETQUERYIVPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETQUERYOBJECTIVPROC )( GLuint id, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETQUERYOBJECTUIVPROC )( GLuint id, GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLBINDBUFFERPROC )( GLenum target, GLuint buffer ); +typedef void( APIENTRYP PFNGLDELETEBUFFERSPROC )( GLsizei n, const GLuint *buffers ); +typedef void( APIENTRYP PFNGLGENBUFFERSPROC )( GLsizei n, GLuint *buffers ); +typedef GLboolean( APIENTRYP PFNGLISBUFFERPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLBUFFERDATAPROC )( GLenum target, GLsizeiptr size, const void *data, + GLenum usage ); +typedef void( APIENTRYP PFNGLBUFFERSUBDATAPROC )( GLenum target, GLintptr offset, GLsizeiptr size, + const void *data ); +typedef void( APIENTRYP PFNGLGETBUFFERSUBDATAPROC )( GLenum target, GLintptr offset, GLsizeiptr size, + void *data ); +typedef void *( APIENTRYP PFNGLMAPBUFFERPROC )( GLenum target, GLenum access ); +typedef GLboolean( APIENTRYP PFNGLUNMAPBUFFERPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETBUFFERPOINTERVPROC )( GLenum target, GLenum pname, void **params ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueries( GLsizei n, GLuint *ids ); +GLAPI void APIENTRY glDeleteQueries( GLsizei n, const GLuint *ids ); +GLAPI GLboolean APIENTRY glIsQuery( GLuint id ); +GLAPI void APIENTRY glBeginQuery( GLenum target, GLuint id ); +GLAPI void APIENTRY glEndQuery( GLenum target ); +GLAPI void APIENTRY glGetQueryiv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetQueryObjectiv( GLuint id, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetQueryObjectuiv( GLuint id, GLenum pname, GLuint *params ); +GLAPI void APIENTRY glBindBuffer( GLenum target, GLuint buffer ); +GLAPI void APIENTRY glDeleteBuffers( GLsizei n, const GLuint *buffers ); +GLAPI void APIENTRY glGenBuffers( GLsizei n, GLuint *buffers ); +GLAPI GLboolean APIENTRY glIsBuffer( GLuint buffer ); +GLAPI void APIENTRY glBufferData( GLenum target, GLsizeiptr size, const void *data, GLenum usage ); +GLAPI void APIENTRY glBufferSubData( GLenum target, GLintptr offset, GLsizeiptr size, const void *data ); +GLAPI void APIENTRY glGetBufferSubData( GLenum target, GLintptr offset, GLsizeiptr size, void *data ); +GLAPI void *APIENTRY glMapBuffer( GLenum target, GLenum access ); +GLAPI GLboolean APIENTRY glUnmapBuffer( GLenum target ); +GLAPI void APIENTRY glGetBufferParameteriv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetBufferPointerv( GLenum target, GLenum pname, void **params ); +# endif #endif /* GL_VERSION_1_5 */ #ifndef GL_VERSION_2_0 -#define GL_VERSION_2_0 1 -typedef char GLchar; -typedef short GLshort; -typedef signed char GLbyte; +# define GL_VERSION_2_0 1 +typedef char GLchar; +typedef short GLshort; +typedef signed char GLbyte; typedef unsigned short GLushort; -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_MAX_VARYING_FLOATS 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_SHADER_TYPE 0x8B4F -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_1D 0x8B5D -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_SAMPLER_1D_SHADOW 0x8B61 -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_DELETE_STATUS 0x8B80 -#define GL_COMPILE_STATUS 0x8B81 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_UPPER_LEFT 0x8CA2 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); -typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); -typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); -typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader); -GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); -GLAPI void APIENTRY glCompileShader (GLuint shader); -GLAPI GLuint APIENTRY glCreateProgram (void); -GLAPI GLuint APIENTRY glCreateShader (GLenum type); -GLAPI void APIENTRY glDeleteProgram (GLuint program); -GLAPI void APIENTRY glDeleteShader (GLuint shader); -GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader); -GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index); -GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index); -GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); -GLAPI GLboolean APIENTRY glIsProgram (GLuint program); -GLAPI GLboolean APIENTRY glIsShader (GLuint shader); -GLAPI void APIENTRY glLinkProgram (GLuint program); -GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -GLAPI void APIENTRY glUseProgram (GLuint program); -GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0); -GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glUniform1i (GLint location, GLint v0); -GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glValidateProgram (GLuint program); -GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -#endif +# define GL_BLEND_EQUATION_RGB 0x8009 +# define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +# define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +# define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +# define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +# define GL_CURRENT_VERTEX_ATTRIB 0x8626 +# define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +# define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +# define GL_STENCIL_BACK_FUNC 0x8800 +# define GL_STENCIL_BACK_FAIL 0x8801 +# define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +# define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +# define GL_MAX_DRAW_BUFFERS 0x8824 +# define GL_DRAW_BUFFER0 0x8825 +# define GL_DRAW_BUFFER1 0x8826 +# define GL_DRAW_BUFFER2 0x8827 +# define GL_DRAW_BUFFER3 0x8828 +# define GL_DRAW_BUFFER4 0x8829 +# define GL_DRAW_BUFFER5 0x882A +# define GL_DRAW_BUFFER6 0x882B +# define GL_DRAW_BUFFER7 0x882C +# define GL_DRAW_BUFFER8 0x882D +# define GL_DRAW_BUFFER9 0x882E +# define GL_DRAW_BUFFER10 0x882F +# define GL_DRAW_BUFFER11 0x8830 +# define GL_DRAW_BUFFER12 0x8831 +# define GL_DRAW_BUFFER13 0x8832 +# define GL_DRAW_BUFFER14 0x8833 +# define GL_DRAW_BUFFER15 0x8834 +# define GL_BLEND_EQUATION_ALPHA 0x883D +# define GL_MAX_VERTEX_ATTRIBS 0x8869 +# define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +# define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +# define GL_FRAGMENT_SHADER 0x8B30 +# define GL_VERTEX_SHADER 0x8B31 +# define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +# define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +# define GL_MAX_VARYING_FLOATS 0x8B4B +# define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +# define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +# define GL_SHADER_TYPE 0x8B4F +# define GL_FLOAT_VEC2 0x8B50 +# define GL_FLOAT_VEC3 0x8B51 +# define GL_FLOAT_VEC4 0x8B52 +# define GL_INT_VEC2 0x8B53 +# define GL_INT_VEC3 0x8B54 +# define GL_INT_VEC4 0x8B55 +# define GL_BOOL 0x8B56 +# define GL_BOOL_VEC2 0x8B57 +# define GL_BOOL_VEC3 0x8B58 +# define GL_BOOL_VEC4 0x8B59 +# define GL_FLOAT_MAT2 0x8B5A +# define GL_FLOAT_MAT3 0x8B5B +# define GL_FLOAT_MAT4 0x8B5C +# define GL_SAMPLER_1D 0x8B5D +# define GL_SAMPLER_2D 0x8B5E +# define GL_SAMPLER_3D 0x8B5F +# define GL_SAMPLER_CUBE 0x8B60 +# define GL_SAMPLER_1D_SHADOW 0x8B61 +# define GL_SAMPLER_2D_SHADOW 0x8B62 +# define GL_DELETE_STATUS 0x8B80 +# define GL_COMPILE_STATUS 0x8B81 +# define GL_LINK_STATUS 0x8B82 +# define GL_VALIDATE_STATUS 0x8B83 +# define GL_INFO_LOG_LENGTH 0x8B84 +# define GL_ATTACHED_SHADERS 0x8B85 +# define GL_ACTIVE_UNIFORMS 0x8B86 +# define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +# define GL_SHADER_SOURCE_LENGTH 0x8B88 +# define GL_ACTIVE_ATTRIBUTES 0x8B89 +# define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +# define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +# define GL_SHADING_LANGUAGE_VERSION 0x8B8C +# define GL_CURRENT_PROGRAM 0x8B8D +# define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +# define GL_LOWER_LEFT 0x8CA1 +# define GL_UPPER_LEFT 0x8CA2 +# define GL_STENCIL_BACK_REF 0x8CA3 +# define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +# define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +typedef void( APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC )( GLenum modeRGB, GLenum modeAlpha ); +typedef void( APIENTRYP PFNGLDRAWBUFFERSPROC )( GLsizei n, const GLenum *bufs ); +typedef void( APIENTRYP PFNGLSTENCILOPSEPARATEPROC )( GLenum face, GLenum sfail, GLenum dpfail, + GLenum dppass ); +typedef void( APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC )( GLenum face, GLenum func, GLint ref, + GLuint mask ); +typedef void( APIENTRYP PFNGLSTENCILMASKSEPARATEPROC )( GLenum face, GLuint mask ); +typedef void( APIENTRYP PFNGLATTACHSHADERPROC )( GLuint program, GLuint shader ); +typedef void( APIENTRYP PFNGLBINDATTRIBLOCATIONPROC )( GLuint program, GLuint index, + const GLchar *name ); +typedef void( APIENTRYP PFNGLCOMPILESHADERPROC )( GLuint shader ); +typedef GLuint( APIENTRYP PFNGLCREATEPROGRAMPROC )( void ); +typedef GLuint( APIENTRYP PFNGLCREATESHADERPROC )( GLenum type ); +typedef void( APIENTRYP PFNGLDELETEPROGRAMPROC )( GLuint program ); +typedef void( APIENTRYP PFNGLDELETESHADERPROC )( GLuint shader ); +typedef void( APIENTRYP PFNGLDETACHSHADERPROC )( GLuint program, GLuint shader ); +typedef void( APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC )( GLuint index ); +typedef void( APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC )( GLuint index ); +typedef void( APIENTRYP PFNGLGETACTIVEATTRIBPROC )( GLuint program, GLuint index, GLsizei bufSize, + GLsizei *length, GLint *size, GLenum *type, + GLchar *name ); +typedef void( APIENTRYP PFNGLGETACTIVEUNIFORMPROC )( GLuint program, GLuint index, GLsizei bufSize, + GLsizei *length, GLint *size, GLenum *type, + GLchar *name ); +typedef void( APIENTRYP PFNGLGETATTACHEDSHADERSPROC )( GLuint program, GLsizei maxCount, GLsizei *count, + GLuint *shaders ); +typedef GLint( APIENTRYP PFNGLGETATTRIBLOCATIONPROC )( GLuint program, const GLchar *name ); +typedef void( APIENTRYP PFNGLGETPROGRAMIVPROC )( GLuint program, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMINFOLOGPROC )( GLuint program, GLsizei bufSize, GLsizei *length, + GLchar *infoLog ); +typedef void( APIENTRYP PFNGLGETSHADERIVPROC )( GLuint shader, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETSHADERINFOLOGPROC )( GLuint shader, GLsizei bufSize, GLsizei *length, + GLchar *infoLog ); +typedef void( APIENTRYP PFNGLGETSHADERSOURCEPROC )( GLuint shader, GLsizei bufSize, GLsizei *length, + GLchar *source ); +typedef GLint( APIENTRYP PFNGLGETUNIFORMLOCATIONPROC )( GLuint program, const GLchar *name ); +typedef void( APIENTRYP PFNGLGETUNIFORMFVPROC )( GLuint program, GLint location, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETUNIFORMIVPROC )( GLuint program, GLint location, GLint *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBDVPROC )( GLuint index, GLenum pname, GLdouble *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBFVPROC )( GLuint index, GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBIVPROC )( GLuint index, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC )( GLuint index, GLenum pname, void **pointer ); +typedef GLboolean( APIENTRYP PFNGLISPROGRAMPROC )( GLuint program ); +typedef GLboolean( APIENTRYP PFNGLISSHADERPROC )( GLuint shader ); +typedef void( APIENTRYP PFNGLLINKPROGRAMPROC )( GLuint program ); +typedef void( APIENTRYP PFNGLSHADERSOURCEPROC )( GLuint shader, GLsizei count, + const GLchar *const *string, const GLint *length ); +typedef void( APIENTRYP PFNGLUSEPROGRAMPROC )( GLuint program ); +typedef void( APIENTRYP PFNGLUNIFORM1FPROC )( GLint location, GLfloat v0 ); +typedef void( APIENTRYP PFNGLUNIFORM2FPROC )( GLint location, GLfloat v0, GLfloat v1 ); +typedef void( APIENTRYP PFNGLUNIFORM3FPROC )( GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ); +typedef void( APIENTRYP PFNGLUNIFORM4FPROC )( GLint location, GLfloat v0, GLfloat v1, GLfloat v2, + GLfloat v3 ); +typedef void( APIENTRYP PFNGLUNIFORM1IPROC )( GLint location, GLint v0 ); +typedef void( APIENTRYP PFNGLUNIFORM2IPROC )( GLint location, GLint v0, GLint v1 ); +typedef void( APIENTRYP PFNGLUNIFORM3IPROC )( GLint location, GLint v0, GLint v1, GLint v2 ); +typedef void( APIENTRYP PFNGLUNIFORM4IPROC )( GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ); +typedef void( APIENTRYP PFNGLUNIFORM1FVPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM2FVPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM3FVPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM4FVPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM1IVPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORM2IVPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORM3IVPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORM4IVPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2FVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3FVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4FVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLVALIDATEPROGRAMPROC )( GLuint program ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1DPROC )( GLuint index, GLdouble x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1FPROC )( GLuint index, GLfloat x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1FVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1SPROC )( GLuint index, GLshort x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1SVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2DPROC )( GLuint index, GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2FPROC )( GLuint index, GLfloat x, GLfloat y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2FVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2SPROC )( GLuint index, GLshort x, GLshort y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2SVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3DPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3FPROC )( GLuint index, GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3FVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3SPROC )( GLuint index, GLshort x, GLshort y, GLshort z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3SVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NBVPROC )( GLuint index, const GLbyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NIVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NSVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUBPROC )( GLuint index, GLubyte x, GLubyte y, GLubyte z, + GLubyte w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC )( GLuint index, const GLubyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC )( GLuint index, const GLushort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4BVPROC )( GLuint index, const GLbyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4DPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z, + GLdouble w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4FPROC )( GLuint index, GLfloat x, GLfloat y, GLfloat z, + GLfloat w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4FVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4IVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4SPROC )( GLuint index, GLshort x, GLshort y, GLshort z, + GLshort w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4SVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4UBVPROC )( GLuint index, const GLubyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4UIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4USVPROC )( GLuint index, const GLushort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC )( GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, + const void *pointer ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparate( GLenum modeRGB, GLenum modeAlpha ); +GLAPI void APIENTRY glDrawBuffers( GLsizei n, const GLenum *bufs ); +GLAPI void APIENTRY glStencilOpSeparate( GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass ); +GLAPI void APIENTRY glStencilFuncSeparate( GLenum face, GLenum func, GLint ref, GLuint mask ); +GLAPI void APIENTRY glStencilMaskSeparate( GLenum face, GLuint mask ); +GLAPI void APIENTRY glAttachShader( GLuint program, GLuint shader ); +GLAPI void APIENTRY glBindAttribLocation( GLuint program, GLuint index, const GLchar *name ); +GLAPI void APIENTRY glCompileShader( GLuint shader ); +GLAPI GLuint APIENTRY glCreateProgram( void ); +GLAPI GLuint APIENTRY glCreateShader( GLenum type ); +GLAPI void APIENTRY glDeleteProgram( GLuint program ); +GLAPI void APIENTRY glDeleteShader( GLuint shader ); +GLAPI void APIENTRY glDetachShader( GLuint program, GLuint shader ); +GLAPI void APIENTRY glDisableVertexAttribArray( GLuint index ); +GLAPI void APIENTRY glEnableVertexAttribArray( GLuint index ); +GLAPI void APIENTRY glGetActiveAttrib( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, + GLint *size, GLenum *type, GLchar *name ); +GLAPI void APIENTRY glGetActiveUniform( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, + GLint *size, GLenum *type, GLchar *name ); +GLAPI void APIENTRY glGetAttachedShaders( GLuint program, GLsizei maxCount, GLsizei *count, + GLuint *shaders ); +GLAPI GLint APIENTRY glGetAttribLocation( GLuint program, const GLchar *name ); +GLAPI void APIENTRY glGetProgramiv( GLuint program, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetProgramInfoLog( GLuint program, GLsizei bufSize, GLsizei *length, + GLchar *infoLog ); +GLAPI void APIENTRY glGetShaderiv( GLuint shader, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetShaderInfoLog( GLuint shader, GLsizei bufSize, GLsizei *length, + GLchar *infoLog ); +GLAPI void APIENTRY glGetShaderSource( GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source ); +GLAPI GLint APIENTRY glGetUniformLocation( GLuint program, const GLchar *name ); +GLAPI void APIENTRY glGetUniformfv( GLuint program, GLint location, GLfloat *params ); +GLAPI void APIENTRY glGetUniformiv( GLuint program, GLint location, GLint *params ); +GLAPI void APIENTRY glGetVertexAttribdv( GLuint index, GLenum pname, GLdouble *params ); +GLAPI void APIENTRY glGetVertexAttribfv( GLuint index, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetVertexAttribiv( GLuint index, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetVertexAttribPointerv( GLuint index, GLenum pname, void **pointer ); +GLAPI GLboolean APIENTRY glIsProgram( GLuint program ); +GLAPI GLboolean APIENTRY glIsShader( GLuint shader ); +GLAPI void APIENTRY glLinkProgram( GLuint program ); +GLAPI void APIENTRY glShaderSource( GLuint shader, GLsizei count, const GLchar *const *string, + const GLint *length ); +GLAPI void APIENTRY glUseProgram( GLuint program ); +GLAPI void APIENTRY glUniform1f( GLint location, GLfloat v0 ); +GLAPI void APIENTRY glUniform2f( GLint location, GLfloat v0, GLfloat v1 ); +GLAPI void APIENTRY glUniform3f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ); +GLAPI void APIENTRY glUniform4f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ); +GLAPI void APIENTRY glUniform1i( GLint location, GLint v0 ); +GLAPI void APIENTRY glUniform2i( GLint location, GLint v0, GLint v1 ); +GLAPI void APIENTRY glUniform3i( GLint location, GLint v0, GLint v1, GLint v2 ); +GLAPI void APIENTRY glUniform4i( GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ); +GLAPI void APIENTRY glUniform1fv( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform2fv( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform3fv( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform4fv( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform1iv( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniform2iv( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniform3iv( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniform4iv( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniformMatrix2fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix3fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix4fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glValidateProgram( GLuint program ); +GLAPI void APIENTRY glVertexAttrib1d( GLuint index, GLdouble x ); +GLAPI void APIENTRY glVertexAttrib1dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib1f( GLuint index, GLfloat x ); +GLAPI void APIENTRY glVertexAttrib1fv( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib1s( GLuint index, GLshort x ); +GLAPI void APIENTRY glVertexAttrib1sv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib2d( GLuint index, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glVertexAttrib2dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib2f( GLuint index, GLfloat x, GLfloat y ); +GLAPI void APIENTRY glVertexAttrib2fv( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib2s( GLuint index, GLshort x, GLshort y ); +GLAPI void APIENTRY glVertexAttrib2sv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib3d( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glVertexAttrib3dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib3f( GLuint index, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glVertexAttrib3fv( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib3s( GLuint index, GLshort x, GLshort y, GLshort z ); +GLAPI void APIENTRY glVertexAttrib3sv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib4Nbv( GLuint index, const GLbyte *v ); +GLAPI void APIENTRY glVertexAttrib4Niv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttrib4Nsv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib4Nub( GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w ); +GLAPI void APIENTRY glVertexAttrib4Nubv( GLuint index, const GLubyte *v ); +GLAPI void APIENTRY glVertexAttrib4Nuiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttrib4Nusv( GLuint index, const GLushort *v ); +GLAPI void APIENTRY glVertexAttrib4bv( GLuint index, const GLbyte *v ); +GLAPI void APIENTRY glVertexAttrib4d( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glVertexAttrib4dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib4f( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +GLAPI void APIENTRY glVertexAttrib4fv( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib4iv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttrib4s( GLuint index, GLshort x, GLshort y, GLshort z, GLshort w ); +GLAPI void APIENTRY glVertexAttrib4sv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib4ubv( GLuint index, const GLubyte *v ); +GLAPI void APIENTRY glVertexAttrib4uiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttrib4usv( GLuint index, const GLushort *v ); +GLAPI void APIENTRY glVertexAttribPointer( GLuint index, GLint size, GLenum type, GLboolean normalized, + GLsizei stride, const void *pointer ); +# endif #endif /* GL_VERSION_2_0 */ #ifndef GL_VERSION_2_1 -#define GL_VERSION_2_1 1 -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB_ALPHA 0x8C42 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_COMPRESSED_SRGB 0x8C48 -#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#endif +# define GL_VERSION_2_1 1 +# define GL_PIXEL_PACK_BUFFER 0x88EB +# define GL_PIXEL_UNPACK_BUFFER 0x88EC +# define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +# define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +# define GL_FLOAT_MAT2x3 0x8B65 +# define GL_FLOAT_MAT2x4 0x8B66 +# define GL_FLOAT_MAT3x2 0x8B67 +# define GL_FLOAT_MAT3x4 0x8B68 +# define GL_FLOAT_MAT4x2 0x8B69 +# define GL_FLOAT_MAT4x3 0x8B6A +# define GL_SRGB 0x8C40 +# define GL_SRGB8 0x8C41 +# define GL_SRGB_ALPHA 0x8C42 +# define GL_SRGB8_ALPHA8 0x8C43 +# define GL_COMPRESSED_SRGB 0x8C48 +# define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformMatrix2x3fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix3x2fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix2x4fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix4x2fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix3x4fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix4x3fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +# endif #endif /* GL_VERSION_2_1 */ #ifndef GL_VERSION_3_0 -#define GL_VERSION_3_0 1 +# define GL_VERSION_3_0 1 typedef unsigned short GLhalf; -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_CLIP_DISTANCE0 0x3000 -#define GL_CLIP_DISTANCE1 0x3001 -#define GL_CLIP_DISTANCE2 0x3002 -#define GL_CLIP_DISTANCE3 0x3003 -#define GL_CLIP_DISTANCE4 0x3004 -#define GL_CLIP_DISTANCE5 0x3005 -#define GL_CLIP_DISTANCE6 0x3006 -#define GL_CLIP_DISTANCE7 0x3007 -#define GL_MAX_CLIP_DISTANCES 0x0D32 -#define GL_MAJOR_VERSION 0x821B -#define GL_MINOR_VERSION 0x821C -#define GL_NUM_EXTENSIONS 0x821D -#define GL_CONTEXT_FLAGS 0x821E -#define GL_COMPRESSED_RED 0x8225 -#define GL_COMPRESSED_RG 0x8226 -#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 -#define GL_RGBA32F 0x8814 -#define GL_RGB32F 0x8815 -#define GL_RGBA16F 0x881A -#define GL_RGB16F 0x881B -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_CLAMP_READ_COLOR 0x891C -#define GL_FIXED_ONLY 0x891D -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_TEXTURE_1D_ARRAY 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_RGB9_E5 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_TEXTURE_SHARED_SIZE 0x8C3F -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_PRIMITIVES_GENERATED 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_RGBA32UI 0x8D70 -#define GL_RGB32UI 0x8D71 -#define GL_RGBA16UI 0x8D76 -#define GL_RGB16UI 0x8D77 -#define GL_RGBA8UI 0x8D7C -#define GL_RGB8UI 0x8D7D -#define GL_RGBA32I 0x8D82 -#define GL_RGB32I 0x8D83 -#define GL_RGBA16I 0x8D88 -#define GL_RGB16I 0x8D89 -#define GL_RGBA8I 0x8D8E -#define GL_RGB8I 0x8D8F -#define GL_RED_INTEGER 0x8D94 -#define GL_GREEN_INTEGER 0x8D95 -#define GL_BLUE_INTEGER 0x8D96 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_BGR_INTEGER 0x8D9A -#define GL_BGRA_INTEGER 0x8D9B -#define GL_SAMPLER_1D_ARRAY 0x8DC0 -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_INT_SAMPLER_1D 0x8DC9 -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_QUERY_WAIT 0x8E13 -#define GL_QUERY_NO_WAIT 0x8E14 -#define GL_QUERY_BY_REGION_WAIT 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_TEXTURE_STENCIL_SIZE 0x88F1 -#define GL_TEXTURE_RED_TYPE 0x8C10 -#define GL_TEXTURE_GREEN_TYPE 0x8C11 -#define GL_TEXTURE_BLUE_TYPE 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE 0x8C13 -#define GL_TEXTURE_DEPTH_TYPE 0x8C16 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_COLOR_ATTACHMENT16 0x8CF0 -#define GL_COLOR_ATTACHMENT17 0x8CF1 -#define GL_COLOR_ATTACHMENT18 0x8CF2 -#define GL_COLOR_ATTACHMENT19 0x8CF3 -#define GL_COLOR_ATTACHMENT20 0x8CF4 -#define GL_COLOR_ATTACHMENT21 0x8CF5 -#define GL_COLOR_ATTACHMENT22 0x8CF6 -#define GL_COLOR_ATTACHMENT23 0x8CF7 -#define GL_COLOR_ATTACHMENT24 0x8CF8 -#define GL_COLOR_ATTACHMENT25 0x8CF9 -#define GL_COLOR_ATTACHMENT26 0x8CFA -#define GL_COLOR_ATTACHMENT27 0x8CFB -#define GL_COLOR_ATTACHMENT28 0x8CFC -#define GL_COLOR_ATTACHMENT29 0x8CFD -#define GL_COLOR_ATTACHMENT30 0x8CFE -#define GL_COLOR_ATTACHMENT31 0x8CFF -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_STENCIL_INDEX1 0x8D46 -#define GL_STENCIL_INDEX4 0x8D47 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_STENCIL_INDEX16 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_MAX_SAMPLES 0x8D57 -#define GL_FRAMEBUFFER_SRGB 0x8DB9 -#define GL_HALF_FLOAT 0x140B -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#define GL_COMPRESSED_RED_RGTC1 0x8DBB -#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC -#define GL_COMPRESSED_RG_RGTC2 0x8DBD -#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE -#define GL_RG 0x8227 -#define GL_RG_INTEGER 0x8228 -#define GL_R8 0x8229 -#define GL_R16 0x822A -#define GL_RG8 0x822B -#define GL_RG16 0x822C -#define GL_R16F 0x822D -#define GL_R32F 0x822E -#define GL_RG16F 0x822F -#define GL_RG32F 0x8230 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C -#define GL_VERTEX_ARRAY_BINDING 0x85B5 -typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); -typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); -typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); -typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); -GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); -GLAPI void APIENTRY glEnablei (GLenum target, GLuint index); -GLAPI void APIENTRY glDisablei (GLenum target, GLuint index); -GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index); -GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedback (void); -GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp); -GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode); -GLAPI void APIENTRY glEndConditionalRender (void); -GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); -GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x); -GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y); -GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x); -GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); -GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); -GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0); -GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); -GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); -GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index); -GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); -GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer); -GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); -GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target); -GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateMipmap (GLenum target); -GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); -GLAPI void APIENTRY glBindVertexArray (GLuint array); -GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); -GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); -GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array); -#endif +# define GL_COMPARE_REF_TO_TEXTURE 0x884E +# define GL_CLIP_DISTANCE0 0x3000 +# define GL_CLIP_DISTANCE1 0x3001 +# define GL_CLIP_DISTANCE2 0x3002 +# define GL_CLIP_DISTANCE3 0x3003 +# define GL_CLIP_DISTANCE4 0x3004 +# define GL_CLIP_DISTANCE5 0x3005 +# define GL_CLIP_DISTANCE6 0x3006 +# define GL_CLIP_DISTANCE7 0x3007 +# define GL_MAX_CLIP_DISTANCES 0x0D32 +# define GL_MAJOR_VERSION 0x821B +# define GL_MINOR_VERSION 0x821C +# define GL_NUM_EXTENSIONS 0x821D +# define GL_CONTEXT_FLAGS 0x821E +# define GL_COMPRESSED_RED 0x8225 +# define GL_COMPRESSED_RG 0x8226 +# define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 +# define GL_RGBA32F 0x8814 +# define GL_RGB32F 0x8815 +# define GL_RGBA16F 0x881A +# define GL_RGB16F 0x881B +# define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +# define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +# define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +# define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +# define GL_CLAMP_READ_COLOR 0x891C +# define GL_FIXED_ONLY 0x891D +# define GL_MAX_VARYING_COMPONENTS 0x8B4B +# define GL_TEXTURE_1D_ARRAY 0x8C18 +# define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +# define GL_TEXTURE_2D_ARRAY 0x8C1A +# define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +# define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +# define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +# define GL_R11F_G11F_B10F 0x8C3A +# define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +# define GL_RGB9_E5 0x8C3D +# define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +# define GL_TEXTURE_SHARED_SIZE 0x8C3F +# define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +# define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +# define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +# define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +# define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +# define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +# define GL_PRIMITIVES_GENERATED 0x8C87 +# define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +# define GL_RASTERIZER_DISCARD 0x8C89 +# define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +# define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +# define GL_INTERLEAVED_ATTRIBS 0x8C8C +# define GL_SEPARATE_ATTRIBS 0x8C8D +# define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +# define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +# define GL_RGBA32UI 0x8D70 +# define GL_RGB32UI 0x8D71 +# define GL_RGBA16UI 0x8D76 +# define GL_RGB16UI 0x8D77 +# define GL_RGBA8UI 0x8D7C +# define GL_RGB8UI 0x8D7D +# define GL_RGBA32I 0x8D82 +# define GL_RGB32I 0x8D83 +# define GL_RGBA16I 0x8D88 +# define GL_RGB16I 0x8D89 +# define GL_RGBA8I 0x8D8E +# define GL_RGB8I 0x8D8F +# define GL_RED_INTEGER 0x8D94 +# define GL_GREEN_INTEGER 0x8D95 +# define GL_BLUE_INTEGER 0x8D96 +# define GL_RGB_INTEGER 0x8D98 +# define GL_RGBA_INTEGER 0x8D99 +# define GL_BGR_INTEGER 0x8D9A +# define GL_BGRA_INTEGER 0x8D9B +# define GL_SAMPLER_1D_ARRAY 0x8DC0 +# define GL_SAMPLER_2D_ARRAY 0x8DC1 +# define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +# define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +# define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +# define GL_UNSIGNED_INT_VEC2 0x8DC6 +# define GL_UNSIGNED_INT_VEC3 0x8DC7 +# define GL_UNSIGNED_INT_VEC4 0x8DC8 +# define GL_INT_SAMPLER_1D 0x8DC9 +# define GL_INT_SAMPLER_2D 0x8DCA +# define GL_INT_SAMPLER_3D 0x8DCB +# define GL_INT_SAMPLER_CUBE 0x8DCC +# define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +# define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +# define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +# define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +# define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +# define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +# define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +# define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +# define GL_QUERY_WAIT 0x8E13 +# define GL_QUERY_NO_WAIT 0x8E14 +# define GL_QUERY_BY_REGION_WAIT 0x8E15 +# define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +# define GL_BUFFER_ACCESS_FLAGS 0x911F +# define GL_BUFFER_MAP_LENGTH 0x9120 +# define GL_BUFFER_MAP_OFFSET 0x9121 +# define GL_DEPTH_COMPONENT32F 0x8CAC +# define GL_DEPTH32F_STENCIL8 0x8CAD +# define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +# define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +# define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +# define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +# define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +# define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +# define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +# define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +# define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +# define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +# define GL_FRAMEBUFFER_DEFAULT 0x8218 +# define GL_FRAMEBUFFER_UNDEFINED 0x8219 +# define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +# define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +# define GL_DEPTH_STENCIL 0x84F9 +# define GL_UNSIGNED_INT_24_8 0x84FA +# define GL_DEPTH24_STENCIL8 0x88F0 +# define GL_TEXTURE_STENCIL_SIZE 0x88F1 +# define GL_TEXTURE_RED_TYPE 0x8C10 +# define GL_TEXTURE_GREEN_TYPE 0x8C11 +# define GL_TEXTURE_BLUE_TYPE 0x8C12 +# define GL_TEXTURE_ALPHA_TYPE 0x8C13 +# define GL_TEXTURE_DEPTH_TYPE 0x8C16 +# define GL_UNSIGNED_NORMALIZED 0x8C17 +# define GL_FRAMEBUFFER_BINDING 0x8CA6 +# define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 +# define GL_RENDERBUFFER_BINDING 0x8CA7 +# define GL_READ_FRAMEBUFFER 0x8CA8 +# define GL_DRAW_FRAMEBUFFER 0x8CA9 +# define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +# define GL_RENDERBUFFER_SAMPLES 0x8CAB +# define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +# define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +# define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +# define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +# define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +# define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +# define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +# define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +# define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +# define GL_COLOR_ATTACHMENT0 0x8CE0 +# define GL_COLOR_ATTACHMENT1 0x8CE1 +# define GL_COLOR_ATTACHMENT2 0x8CE2 +# define GL_COLOR_ATTACHMENT3 0x8CE3 +# define GL_COLOR_ATTACHMENT4 0x8CE4 +# define GL_COLOR_ATTACHMENT5 0x8CE5 +# define GL_COLOR_ATTACHMENT6 0x8CE6 +# define GL_COLOR_ATTACHMENT7 0x8CE7 +# define GL_COLOR_ATTACHMENT8 0x8CE8 +# define GL_COLOR_ATTACHMENT9 0x8CE9 +# define GL_COLOR_ATTACHMENT10 0x8CEA +# define GL_COLOR_ATTACHMENT11 0x8CEB +# define GL_COLOR_ATTACHMENT12 0x8CEC +# define GL_COLOR_ATTACHMENT13 0x8CED +# define GL_COLOR_ATTACHMENT14 0x8CEE +# define GL_COLOR_ATTACHMENT15 0x8CEF +# define GL_COLOR_ATTACHMENT16 0x8CF0 +# define GL_COLOR_ATTACHMENT17 0x8CF1 +# define GL_COLOR_ATTACHMENT18 0x8CF2 +# define GL_COLOR_ATTACHMENT19 0x8CF3 +# define GL_COLOR_ATTACHMENT20 0x8CF4 +# define GL_COLOR_ATTACHMENT21 0x8CF5 +# define GL_COLOR_ATTACHMENT22 0x8CF6 +# define GL_COLOR_ATTACHMENT23 0x8CF7 +# define GL_COLOR_ATTACHMENT24 0x8CF8 +# define GL_COLOR_ATTACHMENT25 0x8CF9 +# define GL_COLOR_ATTACHMENT26 0x8CFA +# define GL_COLOR_ATTACHMENT27 0x8CFB +# define GL_COLOR_ATTACHMENT28 0x8CFC +# define GL_COLOR_ATTACHMENT29 0x8CFD +# define GL_COLOR_ATTACHMENT30 0x8CFE +# define GL_COLOR_ATTACHMENT31 0x8CFF +# define GL_DEPTH_ATTACHMENT 0x8D00 +# define GL_STENCIL_ATTACHMENT 0x8D20 +# define GL_FRAMEBUFFER 0x8D40 +# define GL_RENDERBUFFER 0x8D41 +# define GL_RENDERBUFFER_WIDTH 0x8D42 +# define GL_RENDERBUFFER_HEIGHT 0x8D43 +# define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +# define GL_STENCIL_INDEX1 0x8D46 +# define GL_STENCIL_INDEX4 0x8D47 +# define GL_STENCIL_INDEX8 0x8D48 +# define GL_STENCIL_INDEX16 0x8D49 +# define GL_RENDERBUFFER_RED_SIZE 0x8D50 +# define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +# define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +# define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +# define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +# define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +# define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +# define GL_MAX_SAMPLES 0x8D57 +# define GL_FRAMEBUFFER_SRGB 0x8DB9 +# define GL_HALF_FLOAT 0x140B +# define GL_MAP_READ_BIT 0x0001 +# define GL_MAP_WRITE_BIT 0x0002 +# define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +# define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +# define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +# define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +# define GL_COMPRESSED_RED_RGTC1 0x8DBB +# define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC +# define GL_COMPRESSED_RG_RGTC2 0x8DBD +# define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE +# define GL_RG 0x8227 +# define GL_RG_INTEGER 0x8228 +# define GL_R8 0x8229 +# define GL_R16 0x822A +# define GL_RG8 0x822B +# define GL_RG16 0x822C +# define GL_R16F 0x822D +# define GL_R32F 0x822E +# define GL_RG16F 0x822F +# define GL_RG32F 0x8230 +# define GL_R8I 0x8231 +# define GL_R8UI 0x8232 +# define GL_R16I 0x8233 +# define GL_R16UI 0x8234 +# define GL_R32I 0x8235 +# define GL_R32UI 0x8236 +# define GL_RG8I 0x8237 +# define GL_RG8UI 0x8238 +# define GL_RG16I 0x8239 +# define GL_RG16UI 0x823A +# define GL_RG32I 0x823B +# define GL_RG32UI 0x823C +# define GL_VERTEX_ARRAY_BINDING 0x85B5 +typedef void( APIENTRYP PFNGLCOLORMASKIPROC )( GLuint index, GLboolean r, GLboolean g, GLboolean b, + GLboolean a ); +typedef void( APIENTRYP PFNGLGETBOOLEANI_VPROC )( GLenum target, GLuint index, GLboolean *data ); +typedef void( APIENTRYP PFNGLGETINTEGERI_VPROC )( GLenum target, GLuint index, GLint *data ); +typedef void( APIENTRYP PFNGLENABLEIPROC )( GLenum target, GLuint index ); +typedef void( APIENTRYP PFNGLDISABLEIPROC )( GLenum target, GLuint index ); +typedef GLboolean( APIENTRYP PFNGLISENABLEDIPROC )( GLenum target, GLuint index ); +typedef void( APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC )( GLenum primitiveMode ); +typedef void( APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC )( void ); +typedef void( APIENTRYP PFNGLBINDBUFFERRANGEPROC )( GLenum target, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +typedef void( APIENTRYP PFNGLBINDBUFFERBASEPROC )( GLenum target, GLuint index, GLuint buffer ); +typedef void( APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC )( GLuint program, GLsizei count, + const GLchar *const *varyings, + GLenum bufferMode ); +typedef void( APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC )( GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, + GLsizei *size, GLenum *type, + GLchar *name ); +typedef void( APIENTRYP PFNGLCLAMPCOLORPROC )( GLenum target, GLenum clamp ); +typedef void( APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC )( GLuint id, GLenum mode ); +typedef void( APIENTRYP PFNGLENDCONDITIONALRENDERPROC )( void ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC )( GLuint index, GLint size, GLenum type, + GLsizei stride, const void *pointer ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC )( GLuint index, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC )( GLuint index, GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1IPROC )( GLuint index, GLint x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2IPROC )( GLuint index, GLint x, GLint y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3IPROC )( GLuint index, GLint x, GLint y, GLint z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4IPROC )( GLuint index, GLint x, GLint y, GLint z, GLint w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1UIPROC )( GLuint index, GLuint x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2UIPROC )( GLuint index, GLuint x, GLuint y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3UIPROC )( GLuint index, GLuint x, GLuint y, GLuint z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4UIPROC )( GLuint index, GLuint x, GLuint y, GLuint z, + GLuint w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1IVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2IVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3IVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4IVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4BVPROC )( GLuint index, const GLbyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4SVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC )( GLuint index, const GLubyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4USVPROC )( GLuint index, const GLushort *v ); +typedef void( APIENTRYP PFNGLGETUNIFORMUIVPROC )( GLuint program, GLint location, GLuint *params ); +typedef void( APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC )( GLuint program, GLuint color, + const GLchar *name ); +typedef GLint( APIENTRYP PFNGLGETFRAGDATALOCATIONPROC )( GLuint program, const GLchar *name ); +typedef void( APIENTRYP PFNGLUNIFORM1UIPROC )( GLint location, GLuint v0 ); +typedef void( APIENTRYP PFNGLUNIFORM2UIPROC )( GLint location, GLuint v0, GLuint v1 ); +typedef void( APIENTRYP PFNGLUNIFORM3UIPROC )( GLint location, GLuint v0, GLuint v1, GLuint v2 ); +typedef void( APIENTRYP PFNGLUNIFORM4UIPROC )( GLint location, GLuint v0, GLuint v1, GLuint v2, + GLuint v3 ); +typedef void( APIENTRYP PFNGLUNIFORM1UIVPROC )( GLint location, GLsizei count, const GLuint *value ); +typedef void( APIENTRYP PFNGLUNIFORM2UIVPROC )( GLint location, GLsizei count, const GLuint *value ); +typedef void( APIENTRYP PFNGLUNIFORM3UIVPROC )( GLint location, GLsizei count, const GLuint *value ); +typedef void( APIENTRYP PFNGLUNIFORM4UIVPROC )( GLint location, GLsizei count, const GLuint *value ); +typedef void( APIENTRYP PFNGLTEXPARAMETERIIVPROC )( GLenum target, GLenum pname, const GLint *params ); +typedef void( APIENTRYP PFNGLTEXPARAMETERIUIVPROC )( GLenum target, GLenum pname, const GLuint *params ); +typedef void( APIENTRYP PFNGLGETTEXPARAMETERIIVPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC )( GLenum target, GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLCLEARBUFFERIVPROC )( GLenum buffer, GLint drawbuffer, const GLint *value ); +typedef void( APIENTRYP PFNGLCLEARBUFFERUIVPROC )( GLenum buffer, GLint drawbuffer, + const GLuint *value ); +typedef void( APIENTRYP PFNGLCLEARBUFFERFVPROC )( GLenum buffer, GLint drawbuffer, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLCLEARBUFFERFIPROC )( GLenum buffer, GLint drawbuffer, GLfloat depth, + GLint stencil ); +typedef const GLubyte *( APIENTRYP PFNGLGETSTRINGIPROC )( GLenum name, GLuint index ); +typedef GLboolean( APIENTRYP PFNGLISRENDERBUFFERPROC )( GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLBINDRENDERBUFFERPROC )( GLenum target, GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLDELETERENDERBUFFERSPROC )( GLsizei n, const GLuint *renderbuffers ); +typedef void( APIENTRYP PFNGLGENRENDERBUFFERSPROC )( GLsizei n, GLuint *renderbuffers ); +typedef void( APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC )( GLenum target, GLenum internalformat, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef GLboolean( APIENTRYP PFNGLISFRAMEBUFFERPROC )( GLuint framebuffer ); +typedef void( APIENTRYP PFNGLBINDFRAMEBUFFERPROC )( GLenum target, GLuint framebuffer ); +typedef void( APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC )( GLsizei n, const GLuint *framebuffers ); +typedef void( APIENTRYP PFNGLGENFRAMEBUFFERSPROC )( GLsizei n, GLuint *framebuffers ); +typedef GLenum( APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC )( GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC )( GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC )( GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level, + GLint zoffset ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC )( GLenum target, GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC )( GLenum target, GLenum attachment, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGENERATEMIPMAPPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLBLITFRAMEBUFFERPROC )( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter ); +typedef void( APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC )( GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level, GLint layer ); +typedef void *( APIENTRYP PFNGLMAPBUFFERRANGEPROC )( GLenum target, GLintptr offset, GLsizeiptr length, + GLbitfield access ); +typedef void( APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC )( GLenum target, GLintptr offset, + GLsizeiptr length ); +typedef void( APIENTRYP PFNGLBINDVERTEXARRAYPROC )( GLuint array ); +typedef void( APIENTRYP PFNGLDELETEVERTEXARRAYSPROC )( GLsizei n, const GLuint *arrays ); +typedef void( APIENTRYP PFNGLGENVERTEXARRAYSPROC )( GLsizei n, GLuint *arrays ); +typedef GLboolean( APIENTRYP PFNGLISVERTEXARRAYPROC )( GLuint array ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaski( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a ); +GLAPI void APIENTRY glGetBooleani_v( GLenum target, GLuint index, GLboolean *data ); +GLAPI void APIENTRY glGetIntegeri_v( GLenum target, GLuint index, GLint *data ); +GLAPI void APIENTRY glEnablei( GLenum target, GLuint index ); +GLAPI void APIENTRY glDisablei( GLenum target, GLuint index ); +GLAPI GLboolean APIENTRY glIsEnabledi( GLenum target, GLuint index ); +GLAPI void APIENTRY glBeginTransformFeedback( GLenum primitiveMode ); +GLAPI void APIENTRY glEndTransformFeedback( void ); +GLAPI void APIENTRY glBindBufferRange( GLenum target, GLuint index, GLuint buffer, GLintptr offset, + GLsizeiptr size ); +GLAPI void APIENTRY glBindBufferBase( GLenum target, GLuint index, GLuint buffer ); +GLAPI void APIENTRY glTransformFeedbackVaryings( GLuint program, GLsizei count, + const GLchar *const *varyings, GLenum bufferMode ); +GLAPI void APIENTRY glGetTransformFeedbackVarying( GLuint program, GLuint index, GLsizei bufSize, + GLsizei *length, GLsizei *size, GLenum *type, + GLchar *name ); +GLAPI void APIENTRY glClampColor( GLenum target, GLenum clamp ); +GLAPI void APIENTRY glBeginConditionalRender( GLuint id, GLenum mode ); +GLAPI void APIENTRY glEndConditionalRender( void ); +GLAPI void APIENTRY glVertexAttribIPointer( GLuint index, GLint size, GLenum type, GLsizei stride, + const void *pointer ); +GLAPI void APIENTRY glGetVertexAttribIiv( GLuint index, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetVertexAttribIuiv( GLuint index, GLenum pname, GLuint *params ); +GLAPI void APIENTRY glVertexAttribI1i( GLuint index, GLint x ); +GLAPI void APIENTRY glVertexAttribI2i( GLuint index, GLint x, GLint y ); +GLAPI void APIENTRY glVertexAttribI3i( GLuint index, GLint x, GLint y, GLint z ); +GLAPI void APIENTRY glVertexAttribI4i( GLuint index, GLint x, GLint y, GLint z, GLint w ); +GLAPI void APIENTRY glVertexAttribI1ui( GLuint index, GLuint x ); +GLAPI void APIENTRY glVertexAttribI2ui( GLuint index, GLuint x, GLuint y ); +GLAPI void APIENTRY glVertexAttribI3ui( GLuint index, GLuint x, GLuint y, GLuint z ); +GLAPI void APIENTRY glVertexAttribI4ui( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ); +GLAPI void APIENTRY glVertexAttribI1iv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI2iv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI3iv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI4iv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI1uiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI2uiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI3uiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI4uiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI4bv( GLuint index, const GLbyte *v ); +GLAPI void APIENTRY glVertexAttribI4sv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttribI4ubv( GLuint index, const GLubyte *v ); +GLAPI void APIENTRY glVertexAttribI4usv( GLuint index, const GLushort *v ); +GLAPI void APIENTRY glGetUniformuiv( GLuint program, GLint location, GLuint *params ); +GLAPI void APIENTRY glBindFragDataLocation( GLuint program, GLuint color, const GLchar *name ); +GLAPI GLint APIENTRY glGetFragDataLocation( GLuint program, const GLchar *name ); +GLAPI void APIENTRY glUniform1ui( GLint location, GLuint v0 ); +GLAPI void APIENTRY glUniform2ui( GLint location, GLuint v0, GLuint v1 ); +GLAPI void APIENTRY glUniform3ui( GLint location, GLuint v0, GLuint v1, GLuint v2 ); +GLAPI void APIENTRY glUniform4ui( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ); +GLAPI void APIENTRY glUniform1uiv( GLint location, GLsizei count, const GLuint *value ); +GLAPI void APIENTRY glUniform2uiv( GLint location, GLsizei count, const GLuint *value ); +GLAPI void APIENTRY glUniform3uiv( GLint location, GLsizei count, const GLuint *value ); +GLAPI void APIENTRY glUniform4uiv( GLint location, GLsizei count, const GLuint *value ); +GLAPI void APIENTRY glTexParameterIiv( GLenum target, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glTexParameterIuiv( GLenum target, GLenum pname, const GLuint *params ); +GLAPI void APIENTRY glGetTexParameterIiv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetTexParameterIuiv( GLenum target, GLenum pname, GLuint *params ); +GLAPI void APIENTRY glClearBufferiv( GLenum buffer, GLint drawbuffer, const GLint *value ); +GLAPI void APIENTRY glClearBufferuiv( GLenum buffer, GLint drawbuffer, const GLuint *value ); +GLAPI void APIENTRY glClearBufferfv( GLenum buffer, GLint drawbuffer, const GLfloat *value ); +GLAPI void APIENTRY glClearBufferfi( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ); +GLAPI const GLubyte *APIENTRY glGetStringi( GLenum name, GLuint index ); +GLAPI GLboolean APIENTRY glIsRenderbuffer( GLuint renderbuffer ); +GLAPI void APIENTRY glBindRenderbuffer( GLenum target, GLuint renderbuffer ); +GLAPI void APIENTRY glDeleteRenderbuffers( GLsizei n, const GLuint *renderbuffers ); +GLAPI void APIENTRY glGenRenderbuffers( GLsizei n, GLuint *renderbuffers ); +GLAPI void APIENTRY glRenderbufferStorage( GLenum target, GLenum internalformat, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glGetRenderbufferParameteriv( GLenum target, GLenum pname, GLint *params ); +GLAPI GLboolean APIENTRY glIsFramebuffer( GLuint framebuffer ); +GLAPI void APIENTRY glBindFramebuffer( GLenum target, GLuint framebuffer ); +GLAPI void APIENTRY glDeleteFramebuffers( GLsizei n, const GLuint *framebuffers ); +GLAPI void APIENTRY glGenFramebuffers( GLsizei n, GLuint *framebuffers ); +GLAPI GLenum APIENTRY glCheckFramebufferStatus( GLenum target ); +GLAPI void APIENTRY glFramebufferTexture1D( GLenum target, GLenum attachment, GLenum textarget, + GLuint texture, GLint level ); +GLAPI void APIENTRY glFramebufferTexture2D( GLenum target, GLenum attachment, GLenum textarget, + GLuint texture, GLint level ); +GLAPI void APIENTRY glFramebufferTexture3D( GLenum target, GLenum attachment, GLenum textarget, + GLuint texture, GLint level, GLint zoffset ); +GLAPI void APIENTRY glFramebufferRenderbuffer( GLenum target, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer ); +GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv( GLenum target, GLenum attachment, + GLenum pname, GLint *params ); +GLAPI void APIENTRY glGenerateMipmap( GLenum target ); +GLAPI void APIENTRY glBlitFramebuffer( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, + GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, + GLenum filter ); +GLAPI void APIENTRY glRenderbufferStorageMultisample( GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glFramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, + GLint level, GLint layer ); +GLAPI void *APIENTRY glMapBufferRange( GLenum target, GLintptr offset, GLsizeiptr length, + GLbitfield access ); +GLAPI void APIENTRY glFlushMappedBufferRange( GLenum target, GLintptr offset, GLsizeiptr length ); +GLAPI void APIENTRY glBindVertexArray( GLuint array ); +GLAPI void APIENTRY glDeleteVertexArrays( GLsizei n, const GLuint *arrays ); +GLAPI void APIENTRY glGenVertexArrays( GLsizei n, GLuint *arrays ); +GLAPI GLboolean APIENTRY glIsVertexArray( GLuint array ); +# endif #endif /* GL_VERSION_3_0 */ #ifndef GL_VERSION_3_1 -#define GL_VERSION_3_1 1 -#define GL_SAMPLER_2D_RECT 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 -#define GL_SAMPLER_BUFFER 0x8DC2 -#define GL_INT_SAMPLER_2D_RECT 0x8DCD -#define GL_INT_SAMPLER_BUFFER 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 -#define GL_TEXTURE_BUFFER 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D -#define GL_TEXTURE_RECTANGLE 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_R16_SNORM 0x8F98 -#define GL_RG16_SNORM 0x8F99 -#define GL_RGB16_SNORM 0x8F9A -#define GL_RGBA16_SNORM 0x8F9B -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_PRIMITIVE_RESTART 0x8F9D -#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E -#define GL_COPY_READ_BUFFER 0x8F36 -#define GL_COPY_WRITE_BUFFER 0x8F37 -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_INVALID_INDEX 0xFFFFFFFFu -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); -typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index); -GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); -GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -#endif +# define GL_VERSION_3_1 1 +# define GL_SAMPLER_2D_RECT 0x8B63 +# define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 +# define GL_SAMPLER_BUFFER 0x8DC2 +# define GL_INT_SAMPLER_2D_RECT 0x8DCD +# define GL_INT_SAMPLER_BUFFER 0x8DD0 +# define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 +# define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +# define GL_TEXTURE_BUFFER 0x8C2A +# define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +# define GL_TEXTURE_BINDING_BUFFER 0x8C2C +# define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +# define GL_TEXTURE_RECTANGLE 0x84F5 +# define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +# define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +# define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +# define GL_R8_SNORM 0x8F94 +# define GL_RG8_SNORM 0x8F95 +# define GL_RGB8_SNORM 0x8F96 +# define GL_RGBA8_SNORM 0x8F97 +# define GL_R16_SNORM 0x8F98 +# define GL_RG16_SNORM 0x8F99 +# define GL_RGB16_SNORM 0x8F9A +# define GL_RGBA16_SNORM 0x8F9B +# define GL_SIGNED_NORMALIZED 0x8F9C +# define GL_PRIMITIVE_RESTART 0x8F9D +# define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +# define GL_COPY_READ_BUFFER 0x8F36 +# define GL_COPY_WRITE_BUFFER 0x8F37 +# define GL_UNIFORM_BUFFER 0x8A11 +# define GL_UNIFORM_BUFFER_BINDING 0x8A28 +# define GL_UNIFORM_BUFFER_START 0x8A29 +# define GL_UNIFORM_BUFFER_SIZE 0x8A2A +# define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +# define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +# define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +# define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +# define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +# define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +# define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +# define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +# define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +# define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +# define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +# define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +# define GL_UNIFORM_TYPE 0x8A37 +# define GL_UNIFORM_SIZE 0x8A38 +# define GL_UNIFORM_NAME_LENGTH 0x8A39 +# define GL_UNIFORM_BLOCK_INDEX 0x8A3A +# define GL_UNIFORM_OFFSET 0x8A3B +# define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +# define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +# define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +# define GL_UNIFORM_BLOCK_BINDING 0x8A3F +# define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +# define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +# define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +# define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +# define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +# define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 +# define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +# define GL_INVALID_INDEX 0xFFFFFFFFu +typedef void( APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC )( GLenum mode, GLint first, GLsizei count, + GLsizei instancecount ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC )( GLenum mode, GLsizei count, GLenum type, + const void *indices, GLsizei instancecount ); +typedef void( APIENTRYP PFNGLTEXBUFFERPROC )( GLenum target, GLenum internalformat, GLuint buffer ); +typedef void( APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC )( GLuint index ); +typedef void( APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC )( GLenum readTarget, GLenum writeTarget, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size ); +typedef void( APIENTRYP PFNGLGETUNIFORMINDICESPROC )( GLuint program, GLsizei uniformCount, + const GLchar *const *uniformNames, + GLuint * uniformIndices ); +typedef void( APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC )( GLuint program, GLsizei uniformCount, + const GLuint *uniformIndices, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC )( GLuint program, GLuint uniformIndex, + GLsizei bufSize, GLsizei *length, + GLchar *uniformName ); +typedef GLuint( APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC )( GLuint program, + const GLchar *uniformBlockName ); +typedef void( APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC )( GLuint program, GLuint uniformBlockIndex, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC )( GLuint program, GLuint uniformBlockIndex, + GLsizei bufSize, GLsizei *length, + GLchar *uniformBlockName ); +typedef void( APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC )( GLuint program, GLuint uniformBlockIndex, + GLuint uniformBlockBinding ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstanced( GLenum mode, GLint first, GLsizei count, + GLsizei instancecount ); +GLAPI void APIENTRY glDrawElementsInstanced( GLenum mode, GLsizei count, GLenum type, + const void *indices, GLsizei instancecount ); +GLAPI void APIENTRY glTexBuffer( GLenum target, GLenum internalformat, GLuint buffer ); +GLAPI void APIENTRY glPrimitiveRestartIndex( GLuint index ); +GLAPI void APIENTRY glCopyBufferSubData( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, + GLintptr writeOffset, GLsizeiptr size ); +GLAPI void APIENTRY glGetUniformIndices( GLuint program, GLsizei uniformCount, + const GLchar *const *uniformNames, GLuint *uniformIndices ); +GLAPI void APIENTRY glGetActiveUniformsiv( GLuint program, GLsizei uniformCount, + const GLuint *uniformIndices, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetActiveUniformName( GLuint program, GLuint uniformIndex, GLsizei bufSize, + GLsizei *length, GLchar *uniformName ); +GLAPI GLuint APIENTRY glGetUniformBlockIndex( GLuint program, const GLchar *uniformBlockName ); +GLAPI void APIENTRY glGetActiveUniformBlockiv( GLuint program, GLuint uniformBlockIndex, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetActiveUniformBlockName( GLuint program, GLuint uniformBlockIndex, + GLsizei bufSize, GLsizei *length, + GLchar *uniformBlockName ); +GLAPI void APIENTRY glUniformBlockBinding( GLuint program, GLuint uniformBlockIndex, + GLuint uniformBlockBinding ); +# endif #endif /* GL_VERSION_3_1 */ #ifndef GL_VERSION_3_2 -#define GL_VERSION_3_2 1 +# define GL_VERSION_3_2 1 typedef struct __GLsync *GLsync; -#ifndef GLEXT_64_TYPES_DEFINED +# ifndef GLEXT_64_TYPES_DEFINED /* This code block is duplicated in glxext.h, so must be protected */ -#define GLEXT_64_TYPES_DEFINED +# define GLEXT_64_TYPES_DEFINED /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ /* (as used in the GL_EXT_timer_query extension). */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include -#elif defined(__sun__) || defined(__digital__) -#include -#if defined(__STDC__) -#if defined(__arch64__) || defined(_LP64) -typedef long int int64_t; +# if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L +# include +# elif defined( __sun__ ) || defined( __digital__ ) +# include +# if defined( __STDC__ ) +# if defined( __arch64__ ) || defined( _LP64 ) +typedef long int int64_t; typedef unsigned long int uint64_t; -#else -typedef long long int int64_t; +# else +typedef long long int int64_t; typedef unsigned long long int uint64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined( __VMS ) || defined(__sgi) -#include -#elif defined(__SCO__) || defined(__USLC__) -#include -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; +# endif /* __arch64__ */ +# endif /* __STDC__ */ +# elif defined( __VMS ) || defined( __sgi ) +# include +# elif defined( __SCO__ ) || defined( __USLC__ ) +# include +# elif defined( __UNIXOS2__ ) || defined( __SOL64__ ) +typedef long int int32_t; +typedef long long int int64_t; typedef unsigned long long int uint64_t; -#elif defined(_WIN32) && defined(__GNUC__) -#include -#elif defined(_WIN32) -typedef __int32 int32_t; -typedef __int64 int64_t; +# elif defined( _WIN32 ) && defined( __GNUC__ ) +# include +# elif defined( _WIN32 ) +typedef __int32 int32_t; +typedef __int64 int64_t; typedef unsigned __int64 uint64_t; -#else +# else /* Fallback if nothing above works */ -#include -#endif -#endif +# include +# endif +# endif typedef uint64_t GLuint64; -typedef int64_t GLint64; -#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 -#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define GL_LINES_ADJACENCY 0x000A -#define GL_LINE_STRIP_ADJACENCY 0x000B -#define GL_TRIANGLES_ADJACENCY 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D -#define GL_PROGRAM_POINT_SIZE 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 -#define GL_GEOMETRY_SHADER 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT 0x8916 -#define GL_GEOMETRY_INPUT_TYPE 0x8917 -#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_CONTEXT_PROFILE_MASK 0x9126 -#define GL_DEPTH_CLAMP 0x864F -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C -#define GL_FIRST_VERTEX_CONVENTION 0x8E4D -#define GL_LAST_VERTEX_CONVENTION 0x8E4E -#define GL_PROVOKING_VERTEX 0x8E4F -#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_OBJECT_TYPE 0x9112 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_STATUS 0x9114 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_UNSIGNALED 0x9118 -#define GL_SIGNALED 0x9119 -#define GL_ALREADY_SIGNALED 0x911A -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_CONDITION_SATISFIED 0x911C -#define GL_WAIT_FAILED 0x911D -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_SAMPLE_POSITION 0x8E50 -#define GL_SAMPLE_MASK 0x8E51 -#define GL_SAMPLE_MASK_VALUE 0x8E52 -#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 -#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 -#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 -#define GL_TEXTURE_SAMPLES 0x9106 -#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 -#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 -#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A -#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B -#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D -#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E -#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F -#define GL_MAX_INTEGER_SAMPLES 0x9110 -typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); -typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode); -typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); -typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); -typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); -typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); -GLAPI void APIENTRY glProvokingVertex (GLenum mode); -GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); -GLAPI GLboolean APIENTRY glIsSync (GLsync sync); -GLAPI void APIENTRY glDeleteSync (GLsync sync); -GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); -GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); -GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); -GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); -#endif +typedef int64_t GLint64; +# define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 +# define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 +# define GL_LINES_ADJACENCY 0x000A +# define GL_LINE_STRIP_ADJACENCY 0x000B +# define GL_TRIANGLES_ADJACENCY 0x000C +# define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +# define GL_PROGRAM_POINT_SIZE 0x8642 +# define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +# define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +# define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +# define GL_GEOMETRY_SHADER 0x8DD9 +# define GL_GEOMETRY_VERTICES_OUT 0x8916 +# define GL_GEOMETRY_INPUT_TYPE 0x8917 +# define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +# define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +# define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +# define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +# define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +# define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +# define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +# define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +# define GL_CONTEXT_PROFILE_MASK 0x9126 +# define GL_DEPTH_CLAMP 0x864F +# define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C +# define GL_FIRST_VERTEX_CONVENTION 0x8E4D +# define GL_LAST_VERTEX_CONVENTION 0x8E4E +# define GL_PROVOKING_VERTEX 0x8E4F +# define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F +# define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +# define GL_OBJECT_TYPE 0x9112 +# define GL_SYNC_CONDITION 0x9113 +# define GL_SYNC_STATUS 0x9114 +# define GL_SYNC_FLAGS 0x9115 +# define GL_SYNC_FENCE 0x9116 +# define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +# define GL_UNSIGNALED 0x9118 +# define GL_SIGNALED 0x9119 +# define GL_ALREADY_SIGNALED 0x911A +# define GL_TIMEOUT_EXPIRED 0x911B +# define GL_CONDITION_SATISFIED 0x911C +# define GL_WAIT_FAILED 0x911D +# define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull +# define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +# define GL_SAMPLE_POSITION 0x8E50 +# define GL_SAMPLE_MASK 0x8E51 +# define GL_SAMPLE_MASK_VALUE 0x8E52 +# define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +# define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +# define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 +# define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +# define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 +# define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +# define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 +# define GL_TEXTURE_SAMPLES 0x9106 +# define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +# define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +# define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +# define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +# define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B +# define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C +# define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D +# define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +# define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +# define GL_MAX_INTEGER_SAMPLES 0x9110 +typedef void( APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC )( GLenum mode, GLsizei count, GLenum type, + const void *indices, GLint basevertex ); +typedef void( APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC )( GLenum mode, GLuint start, GLuint end, + GLsizei count, GLenum type, + const void *indices, GLint basevertex ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC )( GLenum mode, GLsizei count, + GLenum type, const void *indices, + GLsizei instancecount, + GLint basevertex ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC )( GLenum mode, const GLsizei *count, + GLenum type, const void *const *indices, + GLsizei drawcount, + const GLint *basevertex ); +typedef void( APIENTRYP PFNGLPROVOKINGVERTEXPROC )( GLenum mode ); +typedef GLsync( APIENTRYP PFNGLFENCESYNCPROC )( GLenum condition, GLbitfield flags ); +typedef GLboolean( APIENTRYP PFNGLISSYNCPROC )( GLsync sync ); +typedef void( APIENTRYP PFNGLDELETESYNCPROC )( GLsync sync ); +typedef GLenum( APIENTRYP PFNGLCLIENTWAITSYNCPROC )( GLsync sync, GLbitfield flags, GLuint64 timeout ); +typedef void( APIENTRYP PFNGLWAITSYNCPROC )( GLsync sync, GLbitfield flags, GLuint64 timeout ); +typedef void( APIENTRYP PFNGLGETINTEGER64VPROC )( GLenum pname, GLint64 *data ); +typedef void( APIENTRYP PFNGLGETSYNCIVPROC )( GLsync sync, GLenum pname, GLsizei bufSize, + GLsizei *length, GLint *values ); +typedef void( APIENTRYP PFNGLGETINTEGER64I_VPROC )( GLenum target, GLuint index, GLint64 *data ); +typedef void( APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC )( GLenum target, GLenum pname, + GLint64 *params ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC )( GLenum target, GLenum attachment, GLuint texture, + GLint level ); +typedef void( APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC )( GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC )( GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLGETMULTISAMPLEFVPROC )( GLenum pname, GLuint index, GLfloat *val ); +typedef void( APIENTRYP PFNGLSAMPLEMASKIPROC )( GLuint maskNumber, GLbitfield mask ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawElementsBaseVertex( GLenum mode, GLsizei count, GLenum type, + const void *indices, GLint basevertex ); +GLAPI void APIENTRY glDrawRangeElementsBaseVertex( GLenum mode, GLuint start, GLuint end, GLsizei count, + GLenum type, const void *indices, GLint basevertex ); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertex( GLenum mode, GLsizei count, GLenum type, + const void *indices, GLsizei instancecount, + GLint basevertex ); +GLAPI void APIENTRY glMultiDrawElementsBaseVertex( GLenum mode, const GLsizei *count, GLenum type, + const void *const *indices, GLsizei drawcount, + const GLint *basevertex ); +GLAPI void APIENTRY glProvokingVertex( GLenum mode ); +GLAPI GLsync APIENTRY glFenceSync( GLenum condition, GLbitfield flags ); +GLAPI GLboolean APIENTRY glIsSync( GLsync sync ); +GLAPI void APIENTRY glDeleteSync( GLsync sync ); +GLAPI GLenum APIENTRY glClientWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout ); +GLAPI void APIENTRY glWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout ); +GLAPI void APIENTRY glGetInteger64v( GLenum pname, GLint64 *data ); +GLAPI void APIENTRY glGetSynciv( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, + GLint *values ); +GLAPI void APIENTRY glGetInteger64i_v( GLenum target, GLuint index, GLint64 *data ); +GLAPI void APIENTRY glGetBufferParameteri64v( GLenum target, GLenum pname, GLint64 *params ); +GLAPI void APIENTRY glFramebufferTexture( GLenum target, GLenum attachment, GLuint texture, + GLint level ); +GLAPI void APIENTRY glTexImage2DMultisample( GLenum target, GLsizei samples, GLenum internalformat, + GLsizei width, GLsizei height, + GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glTexImage3DMultisample( GLenum target, GLsizei samples, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glGetMultisamplefv( GLenum pname, GLuint index, GLfloat *val ); +GLAPI void APIENTRY glSampleMaski( GLuint maskNumber, GLbitfield mask ); +# endif #endif /* GL_VERSION_3_2 */ #ifndef GL_VERSION_3_3 -#define GL_VERSION_3_3 1 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -#define GL_SRC1_COLOR 0x88F9 -#define GL_ONE_MINUS_SRC1_COLOR 0x88FA -#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB -#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC -#define GL_ANY_SAMPLES_PASSED 0x8C2F -#define GL_SAMPLER_BINDING 0x8919 -#define GL_RGB10_A2UI 0x906F -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 -#define GL_TIME_ELAPSED 0x88BF -#define GL_TIMESTAMP 0x8E28 -#define GL_INT_2_10_10_10_REV 0x8D9F -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); -typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); -typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); -typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); -GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); -GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler); -GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler); -GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); -GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); -GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); -GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); -GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); -GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); -GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); -GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target); -GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); -GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); -GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -#endif +# define GL_VERSION_3_3 1 +# define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +# define GL_SRC1_COLOR 0x88F9 +# define GL_ONE_MINUS_SRC1_COLOR 0x88FA +# define GL_ONE_MINUS_SRC1_ALPHA 0x88FB +# define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC +# define GL_ANY_SAMPLES_PASSED 0x8C2F +# define GL_SAMPLER_BINDING 0x8919 +# define GL_RGB10_A2UI 0x906F +# define GL_TEXTURE_SWIZZLE_R 0x8E42 +# define GL_TEXTURE_SWIZZLE_G 0x8E43 +# define GL_TEXTURE_SWIZZLE_B 0x8E44 +# define GL_TEXTURE_SWIZZLE_A 0x8E45 +# define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 +# define GL_TIME_ELAPSED 0x88BF +# define GL_TIMESTAMP 0x8E28 +# define GL_INT_2_10_10_10_REV 0x8D9F +typedef void( APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC )( GLuint program, GLuint colorNumber, + GLuint index, const GLchar *name ); +typedef GLint( APIENTRYP PFNGLGETFRAGDATAINDEXPROC )( GLuint program, const GLchar *name ); +typedef void( APIENTRYP PFNGLGENSAMPLERSPROC )( GLsizei count, GLuint *samplers ); +typedef void( APIENTRYP PFNGLDELETESAMPLERSPROC )( GLsizei count, const GLuint *samplers ); +typedef GLboolean( APIENTRYP PFNGLISSAMPLERPROC )( GLuint sampler ); +typedef void( APIENTRYP PFNGLBINDSAMPLERPROC )( GLuint unit, GLuint sampler ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERIPROC )( GLuint sampler, GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERIVPROC )( GLuint sampler, GLenum pname, + const GLint *param ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERFPROC )( GLuint sampler, GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERFVPROC )( GLuint sampler, GLenum pname, + const GLfloat *param ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC )( GLuint sampler, GLenum pname, + const GLint *param ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC )( GLuint sampler, GLenum pname, + const GLuint *param ); +typedef void( APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC )( GLuint sampler, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC )( GLuint sampler, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC )( GLuint sampler, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC )( GLuint sampler, GLenum pname, + GLuint *params ); +typedef void( APIENTRYP PFNGLQUERYCOUNTERPROC )( GLuint id, GLenum target ); +typedef void( APIENTRYP PFNGLGETQUERYOBJECTI64VPROC )( GLuint id, GLenum pname, GLint64 *params ); +typedef void( APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC )( GLuint id, GLenum pname, GLuint64 *params ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC )( GLuint index, GLuint divisor ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP1UIPROC )( GLuint index, GLenum type, GLboolean normalized, + GLuint value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC )( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP2UIPROC )( GLuint index, GLenum type, GLboolean normalized, + GLuint value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC )( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP3UIPROC )( GLuint index, GLenum type, GLboolean normalized, + GLuint value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC )( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP4UIPROC )( GLuint index, GLenum type, GLboolean normalized, + GLuint value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC )( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindFragDataLocationIndexed( GLuint program, GLuint colorNumber, GLuint index, + const GLchar *name ); +GLAPI GLint APIENTRY glGetFragDataIndex( GLuint program, const GLchar *name ); +GLAPI void APIENTRY glGenSamplers( GLsizei count, GLuint *samplers ); +GLAPI void APIENTRY glDeleteSamplers( GLsizei count, const GLuint *samplers ); +GLAPI GLboolean APIENTRY glIsSampler( GLuint sampler ); +GLAPI void APIENTRY glBindSampler( GLuint unit, GLuint sampler ); +GLAPI void APIENTRY glSamplerParameteri( GLuint sampler, GLenum pname, GLint param ); +GLAPI void APIENTRY glSamplerParameteriv( GLuint sampler, GLenum pname, const GLint *param ); +GLAPI void APIENTRY glSamplerParameterf( GLuint sampler, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glSamplerParameterfv( GLuint sampler, GLenum pname, const GLfloat *param ); +GLAPI void APIENTRY glSamplerParameterIiv( GLuint sampler, GLenum pname, const GLint *param ); +GLAPI void APIENTRY glSamplerParameterIuiv( GLuint sampler, GLenum pname, const GLuint *param ); +GLAPI void APIENTRY glGetSamplerParameteriv( GLuint sampler, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetSamplerParameterIiv( GLuint sampler, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetSamplerParameterfv( GLuint sampler, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetSamplerParameterIuiv( GLuint sampler, GLenum pname, GLuint *params ); +GLAPI void APIENTRY glQueryCounter( GLuint id, GLenum target ); +GLAPI void APIENTRY glGetQueryObjecti64v( GLuint id, GLenum pname, GLint64 *params ); +GLAPI void APIENTRY glGetQueryObjectui64v( GLuint id, GLenum pname, GLuint64 *params ); +GLAPI void APIENTRY glVertexAttribDivisor( GLuint index, GLuint divisor ); +GLAPI void APIENTRY glVertexAttribP1ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ); +GLAPI void APIENTRY glVertexAttribP1uiv( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +GLAPI void APIENTRY glVertexAttribP2ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ); +GLAPI void APIENTRY glVertexAttribP2uiv( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +GLAPI void APIENTRY glVertexAttribP3ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ); +GLAPI void APIENTRY glVertexAttribP3uiv( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +GLAPI void APIENTRY glVertexAttribP4ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ); +GLAPI void APIENTRY glVertexAttribP4uiv( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +# endif #endif /* GL_VERSION_3_3 */ #ifndef GL_VERSION_4_0 -#define GL_VERSION_4_0 1 -#define GL_SAMPLE_SHADING 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F -#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F -#define GL_DRAW_INDIRECT_BUFFER 0x8F3F -#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 -#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F -#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C -#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D -#define GL_MAX_VERTEX_STREAMS 0x8E71 -#define GL_DOUBLE_VEC2 0x8FFC -#define GL_DOUBLE_VEC3 0x8FFD -#define GL_DOUBLE_VEC4 0x8FFE -#define GL_DOUBLE_MAT2 0x8F46 -#define GL_DOUBLE_MAT3 0x8F47 -#define GL_DOUBLE_MAT4 0x8F48 -#define GL_DOUBLE_MAT2x3 0x8F49 -#define GL_DOUBLE_MAT2x4 0x8F4A -#define GL_DOUBLE_MAT3x2 0x8F4B -#define GL_DOUBLE_MAT3x4 0x8F4C -#define GL_DOUBLE_MAT4x2 0x8F4D -#define GL_DOUBLE_MAT4x3 0x8F4E -#define GL_ACTIVE_SUBROUTINES 0x8DE5 -#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 -#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 -#define GL_MAX_SUBROUTINES 0x8DE7 -#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 -#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A -#define GL_COMPATIBLE_SUBROUTINES 0x8E4B -#define GL_PATCHES 0x000E -#define GL_PATCH_VERTICES 0x8E72 -#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 -#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 -#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 -#define GL_TESS_GEN_MODE 0x8E76 -#define GL_TESS_GEN_SPACING 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 -#define GL_TESS_GEN_POINT_MODE 0x8E79 -#define GL_ISOLINES 0x8E7A -#define GL_FRACTIONAL_ODD 0x8E7B -#define GL_FRACTIONAL_EVEN 0x8E7C -#define GL_MAX_PATCH_VERTICES 0x8E7D -#define GL_MAX_TESS_GEN_LEVEL 0x8E7E -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 -#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 -#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 -#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 -#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 -#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 -#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 -#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A -#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C -#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D -#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E -#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 -#define GL_TESS_EVALUATION_SHADER 0x8E87 -#define GL_TESS_CONTROL_SHADER 0x8E88 -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value); -typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect); -typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); -typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); -typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); -typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); -typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); -typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); -typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); -typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); -typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); -typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMinSampleShading (GLfloat value); -GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); -GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); -GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x); -GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y); -GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params); -GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); -GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); -GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); -GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); -GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); -GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value); -GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values); -GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); -GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); -GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id); -GLAPI void APIENTRY glPauseTransformFeedback (void); -GLAPI void APIENTRY glResumeTransformFeedback (void); -GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id); -GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); -GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); -GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index); -GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); -#endif +# define GL_VERSION_4_0 1 +# define GL_SAMPLE_SHADING 0x8C36 +# define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +# define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +# define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +# define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +# define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +# define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +# define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +# define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +# define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +# define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +# define GL_DRAW_INDIRECT_BUFFER 0x8F3F +# define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +# define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F +# define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A +# define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B +# define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C +# define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D +# define GL_MAX_VERTEX_STREAMS 0x8E71 +# define GL_DOUBLE_VEC2 0x8FFC +# define GL_DOUBLE_VEC3 0x8FFD +# define GL_DOUBLE_VEC4 0x8FFE +# define GL_DOUBLE_MAT2 0x8F46 +# define GL_DOUBLE_MAT3 0x8F47 +# define GL_DOUBLE_MAT4 0x8F48 +# define GL_DOUBLE_MAT2x3 0x8F49 +# define GL_DOUBLE_MAT2x4 0x8F4A +# define GL_DOUBLE_MAT3x2 0x8F4B +# define GL_DOUBLE_MAT3x4 0x8F4C +# define GL_DOUBLE_MAT4x2 0x8F4D +# define GL_DOUBLE_MAT4x3 0x8F4E +# define GL_ACTIVE_SUBROUTINES 0x8DE5 +# define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 +# define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 +# define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 +# define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 +# define GL_MAX_SUBROUTINES 0x8DE7 +# define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 +# define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A +# define GL_COMPATIBLE_SUBROUTINES 0x8E4B +# define GL_PATCHES 0x000E +# define GL_PATCH_VERTICES 0x8E72 +# define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 +# define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 +# define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 +# define GL_TESS_GEN_MODE 0x8E76 +# define GL_TESS_GEN_SPACING 0x8E77 +# define GL_TESS_GEN_VERTEX_ORDER 0x8E78 +# define GL_TESS_GEN_POINT_MODE 0x8E79 +# define GL_ISOLINES 0x8E7A +# define GL_FRACTIONAL_ODD 0x8E7B +# define GL_FRACTIONAL_EVEN 0x8E7C +# define GL_MAX_PATCH_VERTICES 0x8E7D +# define GL_MAX_TESS_GEN_LEVEL 0x8E7E +# define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F +# define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 +# define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 +# define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 +# define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 +# define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 +# define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 +# define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 +# define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 +# define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A +# define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C +# define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D +# define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E +# define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F +# define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 +# define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 +# define GL_TESS_EVALUATION_SHADER 0x8E87 +# define GL_TESS_CONTROL_SHADER 0x8E88 +# define GL_TRANSFORM_FEEDBACK 0x8E22 +# define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 +# define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 +# define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +# define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 +typedef void( APIENTRYP PFNGLMINSAMPLESHADINGPROC )( GLfloat value ); +typedef void( APIENTRYP PFNGLBLENDEQUATIONIPROC )( GLuint buf, GLenum mode ); +typedef void( APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC )( GLuint buf, GLenum modeRGB, + GLenum modeAlpha ); +typedef void( APIENTRYP PFNGLBLENDFUNCIPROC )( GLuint buf, GLenum src, GLenum dst ); +typedef void( APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC )( GLuint buf, GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha ); +typedef void( APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC )( GLenum mode, const void *indirect ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC )( GLenum mode, GLenum type, + const void *indirect ); +typedef void( APIENTRYP PFNGLUNIFORM1DPROC )( GLint location, GLdouble x ); +typedef void( APIENTRYP PFNGLUNIFORM2DPROC )( GLint location, GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLUNIFORM3DPROC )( GLint location, GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLUNIFORM4DPROC )( GLint location, GLdouble x, GLdouble y, GLdouble z, + GLdouble w ); +typedef void( APIENTRYP PFNGLUNIFORM1DVPROC )( GLint location, GLsizei count, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORM2DVPROC )( GLint location, GLsizei count, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORM3DVPROC )( GLint location, GLsizei count, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORM4DVPROC )( GLint location, GLsizei count, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2DVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3DVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4DVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLGETUNIFORMDVPROC )( GLuint program, GLint location, GLdouble *params ); +typedef GLint( APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC )( GLuint program, GLenum shadertype, + const GLchar *name ); +typedef GLuint( APIENTRYP PFNGLGETSUBROUTINEINDEXPROC )( GLuint program, GLenum shadertype, + const GLchar *name ); +typedef void( APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC )( GLuint program, GLenum shadertype, + GLuint index, GLenum pname, + GLint *values ); +typedef void( APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC )( GLuint program, GLenum shadertype, + GLuint index, GLsizei bufsize, + GLsizei *length, GLchar *name ); +typedef void( APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC )( GLuint program, GLenum shadertype, + GLuint index, GLsizei bufsize, + GLsizei *length, GLchar *name ); +typedef void( APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC )( GLenum shadertype, GLsizei count, + const GLuint *indices ); +typedef void( APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC )( GLenum shadertype, GLint location, + GLuint *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC )( GLuint program, GLenum shadertype, GLenum pname, + GLint *values ); +typedef void( APIENTRYP PFNGLPATCHPARAMETERIPROC )( GLenum pname, GLint value ); +typedef void( APIENTRYP PFNGLPATCHPARAMETERFVPROC )( GLenum pname, const GLfloat *values ); +typedef void( APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC )( GLenum target, GLuint id ); +typedef void( APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC )( GLsizei n, const GLuint *ids ); +typedef void( APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC )( GLsizei n, GLuint *ids ); +typedef GLboolean( APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC )( void ); +typedef void( APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC )( void ); +typedef void( APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC )( GLenum mode, GLuint id ); +typedef void( APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC )( GLenum mode, GLuint id, GLuint stream ); +typedef void( APIENTRYP PFNGLBEGINQUERYINDEXEDPROC )( GLenum target, GLuint index, GLuint id ); +typedef void( APIENTRYP PFNGLENDQUERYINDEXEDPROC )( GLenum target, GLuint index ); +typedef void( APIENTRYP PFNGLGETQUERYINDEXEDIVPROC )( GLenum target, GLuint index, GLenum pname, + GLint *params ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShading( GLfloat value ); +GLAPI void APIENTRY glBlendEquationi( GLuint buf, GLenum mode ); +GLAPI void APIENTRY glBlendEquationSeparatei( GLuint buf, GLenum modeRGB, GLenum modeAlpha ); +GLAPI void APIENTRY glBlendFunci( GLuint buf, GLenum src, GLenum dst ); +GLAPI void APIENTRY glBlendFuncSeparatei( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, + GLenum dstAlpha ); +GLAPI void APIENTRY glDrawArraysIndirect( GLenum mode, const void *indirect ); +GLAPI void APIENTRY glDrawElementsIndirect( GLenum mode, GLenum type, const void *indirect ); +GLAPI void APIENTRY glUniform1d( GLint location, GLdouble x ); +GLAPI void APIENTRY glUniform2d( GLint location, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glUniform3d( GLint location, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glUniform4d( GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glUniform1dv( GLint location, GLsizei count, const GLdouble *value ); +GLAPI void APIENTRY glUniform2dv( GLint location, GLsizei count, const GLdouble *value ); +GLAPI void APIENTRY glUniform3dv( GLint location, GLsizei count, const GLdouble *value ); +GLAPI void APIENTRY glUniform4dv( GLint location, GLsizei count, const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix2dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix3dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix4dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix2x3dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix2x4dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix3x2dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix3x4dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix4x2dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix4x3dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glGetUniformdv( GLuint program, GLint location, GLdouble *params ); +GLAPI GLint APIENTRY glGetSubroutineUniformLocation( GLuint program, GLenum shadertype, + const GLchar *name ); +GLAPI GLuint APIENTRY glGetSubroutineIndex( GLuint program, GLenum shadertype, const GLchar *name ); +GLAPI void APIENTRY glGetActiveSubroutineUniformiv( GLuint program, GLenum shadertype, GLuint index, + GLenum pname, GLint *values ); +GLAPI void APIENTRY glGetActiveSubroutineUniformName( GLuint program, GLenum shadertype, GLuint index, + GLsizei bufsize, GLsizei *length, GLchar *name ); +GLAPI void APIENTRY glGetActiveSubroutineName( GLuint program, GLenum shadertype, GLuint index, + GLsizei bufsize, GLsizei *length, GLchar *name ); +GLAPI void APIENTRY glUniformSubroutinesuiv( GLenum shadertype, GLsizei count, const GLuint *indices ); +GLAPI void APIENTRY glGetUniformSubroutineuiv( GLenum shadertype, GLint location, GLuint *params ); +GLAPI void APIENTRY glGetProgramStageiv( GLuint program, GLenum shadertype, GLenum pname, + GLint *values ); +GLAPI void APIENTRY glPatchParameteri( GLenum pname, GLint value ); +GLAPI void APIENTRY glPatchParameterfv( GLenum pname, const GLfloat *values ); +GLAPI void APIENTRY glBindTransformFeedback( GLenum target, GLuint id ); +GLAPI void APIENTRY glDeleteTransformFeedbacks( GLsizei n, const GLuint *ids ); +GLAPI void APIENTRY glGenTransformFeedbacks( GLsizei n, GLuint *ids ); +GLAPI GLboolean APIENTRY glIsTransformFeedback( GLuint id ); +GLAPI void APIENTRY glPauseTransformFeedback( void ); +GLAPI void APIENTRY glResumeTransformFeedback( void ); +GLAPI void APIENTRY glDrawTransformFeedback( GLenum mode, GLuint id ); +GLAPI void APIENTRY glDrawTransformFeedbackStream( GLenum mode, GLuint id, GLuint stream ); +GLAPI void APIENTRY glBeginQueryIndexed( GLenum target, GLuint index, GLuint id ); +GLAPI void APIENTRY glEndQueryIndexed( GLenum target, GLuint index ); +GLAPI void APIENTRY glGetQueryIndexediv( GLenum target, GLuint index, GLenum pname, GLint *params ); +# endif #endif /* GL_VERSION_4_0 */ #ifndef GL_VERSION_4_1 -#define GL_VERSION_4_1 1 -#define GL_FIXED 0x140C -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_RGB565 0x8D62 -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#define GL_VERTEX_SHADER_BIT 0x00000001 -#define GL_FRAGMENT_SHADER_BIT 0x00000002 -#define GL_GEOMETRY_SHADER_BIT 0x00000004 -#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 -#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 -#define GL_ALL_SHADER_BITS 0xFFFFFFFF -#define GL_PROGRAM_SEPARABLE 0x8258 -#define GL_ACTIVE_PROGRAM 0x8259 -#define GL_PROGRAM_PIPELINE_BINDING 0x825A -#define GL_MAX_VIEWPORTS 0x825B -#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C -#define GL_VIEWPORT_BOUNDS_RANGE 0x825D -#define GL_LAYER_PROVOKING_VERTEX 0x825E -#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F -#define GL_UNDEFINED_VERTEX 0x8260 -typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); -typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); -typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); -typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings); -typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); -typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); -typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f); -typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); -typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReleaseShaderCompiler (void); -GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f); -GLAPI void APIENTRY glClearDepthf (GLfloat d); -GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); -GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); -GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); -GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); -GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); -GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); -GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); -GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); -GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); -GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0); -GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); -GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); -GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v); -GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v); -GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f); -GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data); -GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); -#endif +# define GL_VERSION_4_1 1 +# define GL_FIXED 0x140C +# define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +# define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +# define GL_LOW_FLOAT 0x8DF0 +# define GL_MEDIUM_FLOAT 0x8DF1 +# define GL_HIGH_FLOAT 0x8DF2 +# define GL_LOW_INT 0x8DF3 +# define GL_MEDIUM_INT 0x8DF4 +# define GL_HIGH_INT 0x8DF5 +# define GL_SHADER_COMPILER 0x8DFA +# define GL_SHADER_BINARY_FORMATS 0x8DF8 +# define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +# define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +# define GL_MAX_VARYING_VECTORS 0x8DFC +# define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +# define GL_RGB565 0x8D62 +# define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +# define GL_PROGRAM_BINARY_LENGTH 0x8741 +# define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +# define GL_PROGRAM_BINARY_FORMATS 0x87FF +# define GL_VERTEX_SHADER_BIT 0x00000001 +# define GL_FRAGMENT_SHADER_BIT 0x00000002 +# define GL_GEOMETRY_SHADER_BIT 0x00000004 +# define GL_TESS_CONTROL_SHADER_BIT 0x00000008 +# define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 +# define GL_ALL_SHADER_BITS 0xFFFFFFFF +# define GL_PROGRAM_SEPARABLE 0x8258 +# define GL_ACTIVE_PROGRAM 0x8259 +# define GL_PROGRAM_PIPELINE_BINDING 0x825A +# define GL_MAX_VIEWPORTS 0x825B +# define GL_VIEWPORT_SUBPIXEL_BITS 0x825C +# define GL_VIEWPORT_BOUNDS_RANGE 0x825D +# define GL_LAYER_PROVOKING_VERTEX 0x825E +# define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F +# define GL_UNDEFINED_VERTEX 0x8260 +typedef void( APIENTRYP PFNGLRELEASESHADERCOMPILERPROC )( void ); +typedef void( APIENTRYP PFNGLSHADERBINARYPROC )( GLsizei count, const GLuint *shaders, + GLenum binaryformat, const void *binary, + GLsizei length ); +typedef void( APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC )( GLenum shadertype, GLenum precisiontype, + GLint *range, GLint *precision ); +typedef void( APIENTRYP PFNGLDEPTHRANGEFPROC )( GLfloat n, GLfloat f ); +typedef void( APIENTRYP PFNGLCLEARDEPTHFPROC )( GLfloat d ); +typedef void( APIENTRYP PFNGLGETPROGRAMBINARYPROC )( GLuint program, GLsizei bufSize, GLsizei *length, + GLenum *binaryFormat, void *binary ); +typedef void( APIENTRYP PFNGLPROGRAMBINARYPROC )( GLuint program, GLenum binaryFormat, + const void *binary, GLsizei length ); +typedef void( APIENTRYP PFNGLPROGRAMPARAMETERIPROC )( GLuint program, GLenum pname, GLint value ); +typedef void( APIENTRYP PFNGLUSEPROGRAMSTAGESPROC )( GLuint pipeline, GLbitfield stages, + GLuint program ); +typedef void( APIENTRYP PFNGLACTIVESHADERPROGRAMPROC )( GLuint pipeline, GLuint program ); +typedef GLuint( APIENTRYP PFNGLCREATESHADERPROGRAMVPROC )( GLenum type, GLsizei count, + const GLchar *const *strings ); +typedef void( APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC )( GLuint pipeline ); +typedef void( APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC )( GLsizei n, const GLuint *pipelines ); +typedef void( APIENTRYP PFNGLGENPROGRAMPIPELINESPROC )( GLsizei n, GLuint *pipelines ); +typedef GLboolean( APIENTRYP PFNGLISPROGRAMPIPELINEPROC )( GLuint pipeline ); +typedef void( APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC )( GLuint pipeline, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1IPROC )( GLuint program, GLint location, GLint v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1FPROC )( GLuint program, GLint location, GLfloat v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1DPROC )( GLuint program, GLint location, GLdouble v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC )( GLuint program, GLint location, GLuint v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2IPROC )( GLuint program, GLint location, GLint v0, + GLint v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2FPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2DPROC )( GLuint program, GLint location, GLdouble v0, + GLdouble v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3IPROC )( GLuint program, GLint location, GLint v0, GLint v1, + GLint v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3FPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3DPROC )( GLuint program, GLint location, GLdouble v0, + GLdouble v1, GLdouble v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4IPROC )( GLuint program, GLint location, GLint v0, GLint v1, + GLint v2, GLint v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4FPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2, GLfloat v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4DPROC )( GLuint program, GLint location, GLdouble v0, + GLdouble v1, GLdouble v2, GLdouble v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2, GLuint v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC )( GLuint pipeline ); +typedef void( APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC )( GLuint pipeline, GLsizei bufSize, + GLsizei *length, GLchar *infoLog ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1DPROC )( GLuint index, GLdouble x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2DPROC )( GLuint index, GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3DPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4DPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z, + GLdouble w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC )( GLuint index, GLint size, GLenum type, + GLsizei stride, const void *pointer ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC )( GLuint index, GLenum pname, GLdouble *params ); +typedef void( APIENTRYP PFNGLVIEWPORTARRAYVPROC )( GLuint first, GLsizei count, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVIEWPORTINDEXEDFPROC )( GLuint index, GLfloat x, GLfloat y, GLfloat w, + GLfloat h ); +typedef void( APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLSCISSORARRAYVPROC )( GLuint first, GLsizei count, const GLint *v ); +typedef void( APIENTRYP PFNGLSCISSORINDEXEDPROC )( GLuint index, GLint left, GLint bottom, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLSCISSORINDEXEDVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLDEPTHRANGEARRAYVPROC )( GLuint first, GLsizei count, const GLdouble *v ); +typedef void( APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC )( GLuint index, GLdouble n, GLdouble f ); +typedef void( APIENTRYP PFNGLGETFLOATI_VPROC )( GLenum target, GLuint index, GLfloat *data ); +typedef void( APIENTRYP PFNGLGETDOUBLEI_VPROC )( GLenum target, GLuint index, GLdouble *data ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReleaseShaderCompiler( void ); +GLAPI void APIENTRY glShaderBinary( GLsizei count, const GLuint *shaders, GLenum binaryformat, + const void *binary, GLsizei length ); +GLAPI void APIENTRY glGetShaderPrecisionFormat( GLenum shadertype, GLenum precisiontype, GLint *range, + GLint *precision ); +GLAPI void APIENTRY glDepthRangef( GLfloat n, GLfloat f ); +GLAPI void APIENTRY glClearDepthf( GLfloat d ); +GLAPI void APIENTRY glGetProgramBinary( GLuint program, GLsizei bufSize, GLsizei *length, + GLenum *binaryFormat, void *binary ); +GLAPI void APIENTRY glProgramBinary( GLuint program, GLenum binaryFormat, const void *binary, + GLsizei length ); +GLAPI void APIENTRY glProgramParameteri( GLuint program, GLenum pname, GLint value ); +GLAPI void APIENTRY glUseProgramStages( GLuint pipeline, GLbitfield stages, GLuint program ); +GLAPI void APIENTRY glActiveShaderProgram( GLuint pipeline, GLuint program ); +GLAPI GLuint APIENTRY glCreateShaderProgramv( GLenum type, GLsizei count, const GLchar *const *strings ); +GLAPI void APIENTRY glBindProgramPipeline( GLuint pipeline ); +GLAPI void APIENTRY glDeleteProgramPipelines( GLsizei n, const GLuint *pipelines ); +GLAPI void APIENTRY glGenProgramPipelines( GLsizei n, GLuint *pipelines ); +GLAPI GLboolean APIENTRY glIsProgramPipeline( GLuint pipeline ); +GLAPI void APIENTRY glGetProgramPipelineiv( GLuint pipeline, GLenum pname, GLint *params ); +GLAPI void APIENTRY glProgramUniform1i( GLuint program, GLint location, GLint v0 ); +GLAPI void APIENTRY glProgramUniform1iv( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform1f( GLuint program, GLint location, GLfloat v0 ); +GLAPI void APIENTRY glProgramUniform1fv( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform1d( GLuint program, GLint location, GLdouble v0 ); +GLAPI void APIENTRY glProgramUniform1dv( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform1ui( GLuint program, GLint location, GLuint v0 ); +GLAPI void APIENTRY glProgramUniform1uiv( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform2i( GLuint program, GLint location, GLint v0, GLint v1 ); +GLAPI void APIENTRY glProgramUniform2iv( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform2f( GLuint program, GLint location, GLfloat v0, GLfloat v1 ); +GLAPI void APIENTRY glProgramUniform2fv( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform2d( GLuint program, GLint location, GLdouble v0, GLdouble v1 ); +GLAPI void APIENTRY glProgramUniform2dv( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform2ui( GLuint program, GLint location, GLuint v0, GLuint v1 ); +GLAPI void APIENTRY glProgramUniform2uiv( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform3i( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 ); +GLAPI void APIENTRY glProgramUniform3iv( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform3f( GLuint program, GLint location, GLfloat v0, GLfloat v1, + GLfloat v2 ); +GLAPI void APIENTRY glProgramUniform3fv( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform3d( GLuint program, GLint location, GLdouble v0, GLdouble v1, + GLdouble v2 ); +GLAPI void APIENTRY glProgramUniform3dv( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform3ui( GLuint program, GLint location, GLuint v0, GLuint v1, + GLuint v2 ); +GLAPI void APIENTRY glProgramUniform3uiv( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform4i( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, + GLint v3 ); +GLAPI void APIENTRY glProgramUniform4iv( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform4f( GLuint program, GLint location, GLfloat v0, GLfloat v1, + GLfloat v2, GLfloat v3 ); +GLAPI void APIENTRY glProgramUniform4fv( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform4d( GLuint program, GLint location, GLdouble v0, GLdouble v1, + GLdouble v2, GLdouble v3 ); +GLAPI void APIENTRY glProgramUniform4dv( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform4ui( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, + GLuint v3 ); +GLAPI void APIENTRY glProgramUniform4uiv( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniformMatrix2fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix2dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x3fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x2fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x4fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x2fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x4fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x3fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x3dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x2dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x4dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x2dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x4dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x3dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glValidateProgramPipeline( GLuint pipeline ); +GLAPI void APIENTRY glGetProgramPipelineInfoLog( GLuint pipeline, GLsizei bufSize, GLsizei *length, + GLchar *infoLog ); +GLAPI void APIENTRY glVertexAttribL1d( GLuint index, GLdouble x ); +GLAPI void APIENTRY glVertexAttribL2d( GLuint index, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glVertexAttribL3d( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glVertexAttribL4d( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glVertexAttribL1dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribL2dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribL3dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribL4dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribLPointer( GLuint index, GLint size, GLenum type, GLsizei stride, + const void *pointer ); +GLAPI void APIENTRY glGetVertexAttribLdv( GLuint index, GLenum pname, GLdouble *params ); +GLAPI void APIENTRY glViewportArrayv( GLuint first, GLsizei count, const GLfloat *v ); +GLAPI void APIENTRY glViewportIndexedf( GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h ); +GLAPI void APIENTRY glViewportIndexedfv( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glScissorArrayv( GLuint first, GLsizei count, const GLint *v ); +GLAPI void APIENTRY glScissorIndexed( GLuint index, GLint left, GLint bottom, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glScissorIndexedv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glDepthRangeArrayv( GLuint first, GLsizei count, const GLdouble *v ); +GLAPI void APIENTRY glDepthRangeIndexed( GLuint index, GLdouble n, GLdouble f ); +GLAPI void APIENTRY glGetFloati_v( GLenum target, GLuint index, GLfloat *data ); +GLAPI void APIENTRY glGetDoublei_v( GLenum target, GLuint index, GLdouble *data ); +# endif #endif /* GL_VERSION_4_1 */ #ifndef GL_VERSION_4_2 -#define GL_VERSION_4_2 1 -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 -#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 -#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 -#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A -#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B -#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C -#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D -#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E -#define GL_NUM_SAMPLE_COUNTS 0x9380 -#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC -#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 -#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 -#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 -#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 -#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB -#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE -#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF -#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 -#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 -#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 -#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 -#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC -#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 -#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA -#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 -#define GL_COMMAND_BARRIER_BIT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 -#define GL_ALL_BARRIER_BITS 0xFFFFFFFF -#define GL_MAX_IMAGE_UNITS 0x8F38 -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 -#define GL_IMAGE_BINDING_NAME 0x8F3A -#define GL_IMAGE_BINDING_LEVEL 0x8F3B -#define GL_IMAGE_BINDING_LAYERED 0x8F3C -#define GL_IMAGE_BINDING_LAYER 0x8F3D -#define GL_IMAGE_BINDING_ACCESS 0x8F3E -#define GL_IMAGE_1D 0x904C -#define GL_IMAGE_2D 0x904D -#define GL_IMAGE_3D 0x904E -#define GL_IMAGE_2D_RECT 0x904F -#define GL_IMAGE_CUBE 0x9050 -#define GL_IMAGE_BUFFER 0x9051 -#define GL_IMAGE_1D_ARRAY 0x9052 -#define GL_IMAGE_2D_ARRAY 0x9053 -#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 -#define GL_IMAGE_2D_MULTISAMPLE 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 -#define GL_INT_IMAGE_1D 0x9057 -#define GL_INT_IMAGE_2D 0x9058 -#define GL_INT_IMAGE_3D 0x9059 -#define GL_INT_IMAGE_2D_RECT 0x905A -#define GL_INT_IMAGE_CUBE 0x905B -#define GL_INT_IMAGE_BUFFER 0x905C -#define GL_INT_IMAGE_1D_ARRAY 0x905D -#define GL_INT_IMAGE_2D_ARRAY 0x905E -#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F -#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 -#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 -#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 -#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 -#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C -#define GL_MAX_IMAGE_SAMPLES 0x906D -#define GL_IMAGE_BINDING_FORMAT 0x906E -#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 -#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA -#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB -#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC -#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD -#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE -#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF -#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); -typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); -typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); -GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); -GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); -GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); -GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers); -GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount); -GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); -#endif +# define GL_VERSION_4_2 1 +# define GL_COPY_READ_BUFFER_BINDING 0x8F36 +# define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +# define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +# define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +# define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 +# define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 +# define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 +# define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A +# define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B +# define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C +# define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D +# define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E +# define GL_NUM_SAMPLE_COUNTS 0x9380 +# define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC +# define GL_ATOMIC_COUNTER_BUFFER 0x92C0 +# define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 +# define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 +# define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 +# define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 +# define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 +# define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB +# define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC +# define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD +# define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE +# define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF +# define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 +# define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 +# define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 +# define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 +# define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 +# define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 +# define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 +# define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 +# define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 +# define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC +# define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 +# define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA +# define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB +# define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 +# define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 +# define GL_UNIFORM_BARRIER_BIT 0x00000004 +# define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 +# define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 +# define GL_COMMAND_BARRIER_BIT 0x00000040 +# define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 +# define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 +# define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 +# define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 +# define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 +# define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 +# define GL_ALL_BARRIER_BITS 0xFFFFFFFF +# define GL_MAX_IMAGE_UNITS 0x8F38 +# define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 +# define GL_IMAGE_BINDING_NAME 0x8F3A +# define GL_IMAGE_BINDING_LEVEL 0x8F3B +# define GL_IMAGE_BINDING_LAYERED 0x8F3C +# define GL_IMAGE_BINDING_LAYER 0x8F3D +# define GL_IMAGE_BINDING_ACCESS 0x8F3E +# define GL_IMAGE_1D 0x904C +# define GL_IMAGE_2D 0x904D +# define GL_IMAGE_3D 0x904E +# define GL_IMAGE_2D_RECT 0x904F +# define GL_IMAGE_CUBE 0x9050 +# define GL_IMAGE_BUFFER 0x9051 +# define GL_IMAGE_1D_ARRAY 0x9052 +# define GL_IMAGE_2D_ARRAY 0x9053 +# define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 +# define GL_IMAGE_2D_MULTISAMPLE 0x9055 +# define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 +# define GL_INT_IMAGE_1D 0x9057 +# define GL_INT_IMAGE_2D 0x9058 +# define GL_INT_IMAGE_3D 0x9059 +# define GL_INT_IMAGE_2D_RECT 0x905A +# define GL_INT_IMAGE_CUBE 0x905B +# define GL_INT_IMAGE_BUFFER 0x905C +# define GL_INT_IMAGE_1D_ARRAY 0x905D +# define GL_INT_IMAGE_2D_ARRAY 0x905E +# define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F +# define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 +# define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 +# define GL_UNSIGNED_INT_IMAGE_1D 0x9062 +# define GL_UNSIGNED_INT_IMAGE_2D 0x9063 +# define GL_UNSIGNED_INT_IMAGE_3D 0x9064 +# define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 +# define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 +# define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 +# define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 +# define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 +# define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A +# define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B +# define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C +# define GL_MAX_IMAGE_SAMPLES 0x906D +# define GL_IMAGE_BINDING_FORMAT 0x906E +# define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 +# define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 +# define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 +# define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA +# define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB +# define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC +# define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD +# define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE +# define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +# define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C +# define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D +# define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E +# define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F +# define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +typedef void( APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC )( GLenum mode, GLint first, + GLsizei count, GLsizei instancecount, + GLuint baseinstance ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC )( GLenum mode, GLsizei count, + GLenum type, const void *indices, + GLsizei instancecount, + GLuint baseinstance ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC )( + GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, + GLint basevertex, GLuint baseinstance ); +typedef void( APIENTRYP PFNGLGETINTERNALFORMATIVPROC )( GLenum target, GLenum internalformat, + GLenum pname, GLsizei bufSize, GLint *params ); +typedef void( APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC )( GLuint program, GLuint bufferIndex, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLBINDIMAGETEXTUREPROC )( GLuint unit, GLuint texture, GLint level, + GLboolean layered, GLint layer, GLenum access, + GLenum format ); +typedef void( APIENTRYP PFNGLMEMORYBARRIERPROC )( GLbitfield barriers ); +typedef void( APIENTRYP PFNGLTEXSTORAGE1DPROC )( GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width ); +typedef void( APIENTRYP PFNGLTEXSTORAGE2DPROC )( GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLTEXSTORAGE3DPROC )( GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth ); +typedef void( APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC )( GLenum mode, GLuint id, + GLsizei instancecount ); +typedef void( APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC )( GLenum mode, GLuint id, + GLuint stream, + GLsizei instancecount ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedBaseInstance( GLenum mode, GLint first, GLsizei count, + GLsizei instancecount, GLuint baseinstance ); +GLAPI void APIENTRY glDrawElementsInstancedBaseInstance( GLenum mode, GLsizei count, GLenum type, + const void *indices, GLsizei instancecount, + GLuint baseinstance ); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance( GLenum mode, GLsizei count, + GLenum type, const void *indices, + GLsizei instancecount, + GLint basevertex, + GLuint baseinstance ); +GLAPI void APIENTRY glGetInternalformativ( GLenum target, GLenum internalformat, GLenum pname, + GLsizei bufSize, GLint *params ); +GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv( GLuint program, GLuint bufferIndex, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glBindImageTexture( GLuint unit, GLuint texture, GLint level, GLboolean layered, + GLint layer, GLenum access, GLenum format ); +GLAPI void APIENTRY glMemoryBarrier( GLbitfield barriers ); +GLAPI void APIENTRY glTexStorage1D( GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width ); +GLAPI void APIENTRY glTexStorage2D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glTexStorage3D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth ); +GLAPI void APIENTRY glDrawTransformFeedbackInstanced( GLenum mode, GLuint id, GLsizei instancecount ); +GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced( GLenum mode, GLuint id, GLuint stream, + GLsizei instancecount ); +# endif #endif /* GL_VERSION_4_2 */ #ifndef GL_VERSION_4_3 -#define GL_VERSION_4_3 1 -typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 -#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E -#define GL_COMPRESSED_RGB8_ETC2 0x9274 -#define GL_COMPRESSED_SRGB8_ETC2 0x9275 -#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 -#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 -#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 -#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 -#define GL_COMPRESSED_R11_EAC 0x9270 -#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 -#define GL_COMPRESSED_RG11_EAC 0x9272 -#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A -#define GL_MAX_ELEMENT_INDEX 0x8D6B -#define GL_COMPUTE_SHADER 0x91B9 -#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB -#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC -#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD -#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 -#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 -#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 -#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 -#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 -#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB -#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE -#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF -#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED -#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE -#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF -#define GL_COMPUTE_SHADER_BIT 0x00000020 -#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 -#define GL_DEBUG_SOURCE_API 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION 0x824A -#define GL_DEBUG_SOURCE_OTHER 0x824B -#define GL_DEBUG_TYPE_ERROR 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E -#define GL_DEBUG_TYPE_PORTABILITY 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 -#define GL_DEBUG_TYPE_OTHER 0x8251 -#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES 0x9145 -#define GL_DEBUG_SEVERITY_HIGH 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 -#define GL_DEBUG_SEVERITY_LOW 0x9148 -#define GL_DEBUG_TYPE_MARKER 0x8268 -#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 -#define GL_DEBUG_TYPE_POP_GROUP 0x826A -#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B -#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C -#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D -#define GL_BUFFER 0x82E0 -#define GL_SHADER 0x82E1 -#define GL_PROGRAM 0x82E2 -#define GL_QUERY 0x82E3 -#define GL_PROGRAM_PIPELINE 0x82E4 -#define GL_SAMPLER 0x82E6 -#define GL_MAX_LABEL_LENGTH 0x82E8 -#define GL_DEBUG_OUTPUT 0x92E0 -#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 -#define GL_MAX_UNIFORM_LOCATIONS 0x826E -#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 -#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 -#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 -#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 -#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 -#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 -#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 -#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 -#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 -#define GL_INTERNALFORMAT_SUPPORTED 0x826F -#define GL_INTERNALFORMAT_PREFERRED 0x8270 -#define GL_INTERNALFORMAT_RED_SIZE 0x8271 -#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 -#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 -#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 -#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 -#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 -#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 -#define GL_INTERNALFORMAT_RED_TYPE 0x8278 -#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 -#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A -#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B -#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C -#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D -#define GL_MAX_WIDTH 0x827E -#define GL_MAX_HEIGHT 0x827F -#define GL_MAX_DEPTH 0x8280 -#define GL_MAX_LAYERS 0x8281 -#define GL_MAX_COMBINED_DIMENSIONS 0x8282 -#define GL_COLOR_COMPONENTS 0x8283 -#define GL_DEPTH_COMPONENTS 0x8284 -#define GL_STENCIL_COMPONENTS 0x8285 -#define GL_COLOR_RENDERABLE 0x8286 -#define GL_DEPTH_RENDERABLE 0x8287 -#define GL_STENCIL_RENDERABLE 0x8288 -#define GL_FRAMEBUFFER_RENDERABLE 0x8289 -#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A -#define GL_FRAMEBUFFER_BLEND 0x828B -#define GL_READ_PIXELS 0x828C -#define GL_READ_PIXELS_FORMAT 0x828D -#define GL_READ_PIXELS_TYPE 0x828E -#define GL_TEXTURE_IMAGE_FORMAT 0x828F -#define GL_TEXTURE_IMAGE_TYPE 0x8290 -#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 -#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 -#define GL_MIPMAP 0x8293 -#define GL_MANUAL_GENERATE_MIPMAP 0x8294 -#define GL_AUTO_GENERATE_MIPMAP 0x8295 -#define GL_COLOR_ENCODING 0x8296 -#define GL_SRGB_READ 0x8297 -#define GL_SRGB_WRITE 0x8298 -#define GL_FILTER 0x829A -#define GL_VERTEX_TEXTURE 0x829B -#define GL_TESS_CONTROL_TEXTURE 0x829C -#define GL_TESS_EVALUATION_TEXTURE 0x829D -#define GL_GEOMETRY_TEXTURE 0x829E -#define GL_FRAGMENT_TEXTURE 0x829F -#define GL_COMPUTE_TEXTURE 0x82A0 -#define GL_TEXTURE_SHADOW 0x82A1 -#define GL_TEXTURE_GATHER 0x82A2 -#define GL_TEXTURE_GATHER_SHADOW 0x82A3 -#define GL_SHADER_IMAGE_LOAD 0x82A4 -#define GL_SHADER_IMAGE_STORE 0x82A5 -#define GL_SHADER_IMAGE_ATOMIC 0x82A6 -#define GL_IMAGE_TEXEL_SIZE 0x82A7 -#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 -#define GL_IMAGE_PIXEL_FORMAT 0x82A9 -#define GL_IMAGE_PIXEL_TYPE 0x82AA -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF -#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 -#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 -#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 -#define GL_CLEAR_BUFFER 0x82B4 -#define GL_TEXTURE_VIEW 0x82B5 -#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 -#define GL_FULL_SUPPORT 0x82B7 -#define GL_CAVEAT_SUPPORT 0x82B8 -#define GL_IMAGE_CLASS_4_X_32 0x82B9 -#define GL_IMAGE_CLASS_2_X_32 0x82BA -#define GL_IMAGE_CLASS_1_X_32 0x82BB -#define GL_IMAGE_CLASS_4_X_16 0x82BC -#define GL_IMAGE_CLASS_2_X_16 0x82BD -#define GL_IMAGE_CLASS_1_X_16 0x82BE -#define GL_IMAGE_CLASS_4_X_8 0x82BF -#define GL_IMAGE_CLASS_2_X_8 0x82C0 -#define GL_IMAGE_CLASS_1_X_8 0x82C1 -#define GL_IMAGE_CLASS_11_11_10 0x82C2 -#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 -#define GL_VIEW_CLASS_128_BITS 0x82C4 -#define GL_VIEW_CLASS_96_BITS 0x82C5 -#define GL_VIEW_CLASS_64_BITS 0x82C6 -#define GL_VIEW_CLASS_48_BITS 0x82C7 -#define GL_VIEW_CLASS_32_BITS 0x82C8 -#define GL_VIEW_CLASS_24_BITS 0x82C9 -#define GL_VIEW_CLASS_16_BITS 0x82CA -#define GL_VIEW_CLASS_8_BITS 0x82CB -#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC -#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD -#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE -#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF -#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 -#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 -#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 -#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 -#define GL_UNIFORM 0x92E1 -#define GL_UNIFORM_BLOCK 0x92E2 -#define GL_PROGRAM_INPUT 0x92E3 -#define GL_PROGRAM_OUTPUT 0x92E4 -#define GL_BUFFER_VARIABLE 0x92E5 -#define GL_SHADER_STORAGE_BLOCK 0x92E6 -#define GL_VERTEX_SUBROUTINE 0x92E8 -#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 -#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA -#define GL_GEOMETRY_SUBROUTINE 0x92EB -#define GL_FRAGMENT_SUBROUTINE 0x92EC -#define GL_COMPUTE_SUBROUTINE 0x92ED -#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE -#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF -#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 -#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 -#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 -#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 -#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 -#define GL_ACTIVE_RESOURCES 0x92F5 -#define GL_MAX_NAME_LENGTH 0x92F6 -#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 -#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 -#define GL_NAME_LENGTH 0x92F9 -#define GL_TYPE 0x92FA -#define GL_ARRAY_SIZE 0x92FB -#define GL_OFFSET 0x92FC -#define GL_BLOCK_INDEX 0x92FD -#define GL_ARRAY_STRIDE 0x92FE -#define GL_MATRIX_STRIDE 0x92FF -#define GL_IS_ROW_MAJOR 0x9300 -#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 -#define GL_BUFFER_BINDING 0x9302 -#define GL_BUFFER_DATA_SIZE 0x9303 -#define GL_NUM_ACTIVE_VARIABLES 0x9304 -#define GL_ACTIVE_VARIABLES 0x9305 -#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 -#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 -#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 -#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 -#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A -#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B -#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C -#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D -#define GL_LOCATION 0x930E -#define GL_LOCATION_INDEX 0x930F -#define GL_IS_PER_PATCH 0x92E7 -#define GL_SHADER_STORAGE_BUFFER 0x90D2 -#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 -#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 -#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 -#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 -#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 -#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 -#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 -#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA -#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB -#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC -#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD -#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE -#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF -#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 -#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 -#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA -#define GL_TEXTURE_BUFFER_OFFSET 0x919D -#define GL_TEXTURE_BUFFER_SIZE 0x919E -#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F -#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB -#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC -#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD -#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF -#define GL_VERTEX_ATTRIB_BINDING 0x82D4 -#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 -#define GL_VERTEX_BINDING_DIVISOR 0x82D6 -#define GL_VERTEX_BINDING_OFFSET 0x82D7 -#define GL_VERTEX_BINDING_STRIDE 0x82D8 -#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 -#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA -#define GL_VERTEX_BINDING_BUFFER 0x8F4F -typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); -typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); -typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); -typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); -typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); -typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); -typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); -typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); -typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); -typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); -typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); -typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect); -GLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); -GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level); -GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer); -GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); -GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); -GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); -GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); -GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); -GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); -GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name); -GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); -GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); -GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); -GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); -GLAPI void APIENTRY glPopDebugGroup (void); -GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); -GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif +# define GL_VERSION_4_3 1 +typedef void( APIENTRY *GLDEBUGPROC )( GLenum source, GLenum type, GLuint id, GLenum severity, + GLsizei length, const GLchar *message, const void *userParam ); +# define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 +# define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E +# define GL_COMPRESSED_RGB8_ETC2 0x9274 +# define GL_COMPRESSED_SRGB8_ETC2 0x9275 +# define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +# define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +# define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +# define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +# define GL_COMPRESSED_R11_EAC 0x9270 +# define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +# define GL_COMPRESSED_RG11_EAC 0x9272 +# define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +# define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +# define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +# define GL_MAX_ELEMENT_INDEX 0x8D6B +# define GL_COMPUTE_SHADER 0x91B9 +# define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB +# define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC +# define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD +# define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 +# define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 +# define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 +# define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 +# define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 +# define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB +# define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE +# define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF +# define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 +# define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED +# define GL_DISPATCH_INDIRECT_BUFFER 0x90EE +# define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF +# define GL_COMPUTE_SHADER_BIT 0x00000020 +# define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 +# define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 +# define GL_DEBUG_CALLBACK_FUNCTION 0x8244 +# define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 +# define GL_DEBUG_SOURCE_API 0x8246 +# define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 +# define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 +# define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 +# define GL_DEBUG_SOURCE_APPLICATION 0x824A +# define GL_DEBUG_SOURCE_OTHER 0x824B +# define GL_DEBUG_TYPE_ERROR 0x824C +# define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D +# define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E +# define GL_DEBUG_TYPE_PORTABILITY 0x824F +# define GL_DEBUG_TYPE_PERFORMANCE 0x8250 +# define GL_DEBUG_TYPE_OTHER 0x8251 +# define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 +# define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 +# define GL_DEBUG_LOGGED_MESSAGES 0x9145 +# define GL_DEBUG_SEVERITY_HIGH 0x9146 +# define GL_DEBUG_SEVERITY_MEDIUM 0x9147 +# define GL_DEBUG_SEVERITY_LOW 0x9148 +# define GL_DEBUG_TYPE_MARKER 0x8268 +# define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 +# define GL_DEBUG_TYPE_POP_GROUP 0x826A +# define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B +# define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C +# define GL_DEBUG_GROUP_STACK_DEPTH 0x826D +# define GL_BUFFER 0x82E0 +# define GL_SHADER 0x82E1 +# define GL_PROGRAM 0x82E2 +# define GL_QUERY 0x82E3 +# define GL_PROGRAM_PIPELINE 0x82E4 +# define GL_SAMPLER 0x82E6 +# define GL_MAX_LABEL_LENGTH 0x82E8 +# define GL_DEBUG_OUTPUT 0x92E0 +# define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +# define GL_MAX_UNIFORM_LOCATIONS 0x826E +# define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 +# define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 +# define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 +# define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 +# define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 +# define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 +# define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 +# define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 +# define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 +# define GL_INTERNALFORMAT_SUPPORTED 0x826F +# define GL_INTERNALFORMAT_PREFERRED 0x8270 +# define GL_INTERNALFORMAT_RED_SIZE 0x8271 +# define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 +# define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 +# define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 +# define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 +# define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 +# define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 +# define GL_INTERNALFORMAT_RED_TYPE 0x8278 +# define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 +# define GL_INTERNALFORMAT_BLUE_TYPE 0x827A +# define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B +# define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C +# define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D +# define GL_MAX_WIDTH 0x827E +# define GL_MAX_HEIGHT 0x827F +# define GL_MAX_DEPTH 0x8280 +# define GL_MAX_LAYERS 0x8281 +# define GL_MAX_COMBINED_DIMENSIONS 0x8282 +# define GL_COLOR_COMPONENTS 0x8283 +# define GL_DEPTH_COMPONENTS 0x8284 +# define GL_STENCIL_COMPONENTS 0x8285 +# define GL_COLOR_RENDERABLE 0x8286 +# define GL_DEPTH_RENDERABLE 0x8287 +# define GL_STENCIL_RENDERABLE 0x8288 +# define GL_FRAMEBUFFER_RENDERABLE 0x8289 +# define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A +# define GL_FRAMEBUFFER_BLEND 0x828B +# define GL_READ_PIXELS 0x828C +# define GL_READ_PIXELS_FORMAT 0x828D +# define GL_READ_PIXELS_TYPE 0x828E +# define GL_TEXTURE_IMAGE_FORMAT 0x828F +# define GL_TEXTURE_IMAGE_TYPE 0x8290 +# define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 +# define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 +# define GL_MIPMAP 0x8293 +# define GL_MANUAL_GENERATE_MIPMAP 0x8294 +# define GL_AUTO_GENERATE_MIPMAP 0x8295 +# define GL_COLOR_ENCODING 0x8296 +# define GL_SRGB_READ 0x8297 +# define GL_SRGB_WRITE 0x8298 +# define GL_FILTER 0x829A +# define GL_VERTEX_TEXTURE 0x829B +# define GL_TESS_CONTROL_TEXTURE 0x829C +# define GL_TESS_EVALUATION_TEXTURE 0x829D +# define GL_GEOMETRY_TEXTURE 0x829E +# define GL_FRAGMENT_TEXTURE 0x829F +# define GL_COMPUTE_TEXTURE 0x82A0 +# define GL_TEXTURE_SHADOW 0x82A1 +# define GL_TEXTURE_GATHER 0x82A2 +# define GL_TEXTURE_GATHER_SHADOW 0x82A3 +# define GL_SHADER_IMAGE_LOAD 0x82A4 +# define GL_SHADER_IMAGE_STORE 0x82A5 +# define GL_SHADER_IMAGE_ATOMIC 0x82A6 +# define GL_IMAGE_TEXEL_SIZE 0x82A7 +# define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 +# define GL_IMAGE_PIXEL_FORMAT 0x82A9 +# define GL_IMAGE_PIXEL_TYPE 0x82AA +# define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC +# define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD +# define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE +# define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF +# define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 +# define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 +# define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 +# define GL_CLEAR_BUFFER 0x82B4 +# define GL_TEXTURE_VIEW 0x82B5 +# define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 +# define GL_FULL_SUPPORT 0x82B7 +# define GL_CAVEAT_SUPPORT 0x82B8 +# define GL_IMAGE_CLASS_4_X_32 0x82B9 +# define GL_IMAGE_CLASS_2_X_32 0x82BA +# define GL_IMAGE_CLASS_1_X_32 0x82BB +# define GL_IMAGE_CLASS_4_X_16 0x82BC +# define GL_IMAGE_CLASS_2_X_16 0x82BD +# define GL_IMAGE_CLASS_1_X_16 0x82BE +# define GL_IMAGE_CLASS_4_X_8 0x82BF +# define GL_IMAGE_CLASS_2_X_8 0x82C0 +# define GL_IMAGE_CLASS_1_X_8 0x82C1 +# define GL_IMAGE_CLASS_11_11_10 0x82C2 +# define GL_IMAGE_CLASS_10_10_10_2 0x82C3 +# define GL_VIEW_CLASS_128_BITS 0x82C4 +# define GL_VIEW_CLASS_96_BITS 0x82C5 +# define GL_VIEW_CLASS_64_BITS 0x82C6 +# define GL_VIEW_CLASS_48_BITS 0x82C7 +# define GL_VIEW_CLASS_32_BITS 0x82C8 +# define GL_VIEW_CLASS_24_BITS 0x82C9 +# define GL_VIEW_CLASS_16_BITS 0x82CA +# define GL_VIEW_CLASS_8_BITS 0x82CB +# define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC +# define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD +# define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE +# define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF +# define GL_VIEW_CLASS_RGTC1_RED 0x82D0 +# define GL_VIEW_CLASS_RGTC2_RG 0x82D1 +# define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 +# define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 +# define GL_UNIFORM 0x92E1 +# define GL_UNIFORM_BLOCK 0x92E2 +# define GL_PROGRAM_INPUT 0x92E3 +# define GL_PROGRAM_OUTPUT 0x92E4 +# define GL_BUFFER_VARIABLE 0x92E5 +# define GL_SHADER_STORAGE_BLOCK 0x92E6 +# define GL_VERTEX_SUBROUTINE 0x92E8 +# define GL_TESS_CONTROL_SUBROUTINE 0x92E9 +# define GL_TESS_EVALUATION_SUBROUTINE 0x92EA +# define GL_GEOMETRY_SUBROUTINE 0x92EB +# define GL_FRAGMENT_SUBROUTINE 0x92EC +# define GL_COMPUTE_SUBROUTINE 0x92ED +# define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE +# define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF +# define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 +# define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 +# define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 +# define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 +# define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 +# define GL_ACTIVE_RESOURCES 0x92F5 +# define GL_MAX_NAME_LENGTH 0x92F6 +# define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 +# define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 +# define GL_NAME_LENGTH 0x92F9 +# define GL_TYPE 0x92FA +# define GL_ARRAY_SIZE 0x92FB +# define GL_OFFSET 0x92FC +# define GL_BLOCK_INDEX 0x92FD +# define GL_ARRAY_STRIDE 0x92FE +# define GL_MATRIX_STRIDE 0x92FF +# define GL_IS_ROW_MAJOR 0x9300 +# define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 +# define GL_BUFFER_BINDING 0x9302 +# define GL_BUFFER_DATA_SIZE 0x9303 +# define GL_NUM_ACTIVE_VARIABLES 0x9304 +# define GL_ACTIVE_VARIABLES 0x9305 +# define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 +# define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 +# define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 +# define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 +# define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A +# define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B +# define GL_TOP_LEVEL_ARRAY_SIZE 0x930C +# define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D +# define GL_LOCATION 0x930E +# define GL_LOCATION_INDEX 0x930F +# define GL_IS_PER_PATCH 0x92E7 +# define GL_SHADER_STORAGE_BUFFER 0x90D2 +# define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 +# define GL_SHADER_STORAGE_BUFFER_START 0x90D4 +# define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 +# define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 +# define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 +# define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 +# define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 +# define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA +# define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB +# define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC +# define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD +# define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE +# define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF +# define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 +# define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 +# define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA +# define GL_TEXTURE_BUFFER_OFFSET 0x919D +# define GL_TEXTURE_BUFFER_SIZE 0x919E +# define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F +# define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB +# define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC +# define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD +# define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE +# define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +# define GL_VERTEX_ATTRIB_BINDING 0x82D4 +# define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 +# define GL_VERTEX_BINDING_DIVISOR 0x82D6 +# define GL_VERTEX_BINDING_OFFSET 0x82D7 +# define GL_VERTEX_BINDING_STRIDE 0x82D8 +# define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 +# define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +# define GL_VERTEX_BINDING_BUFFER 0x8F4F +typedef void( APIENTRYP PFNGLCLEARBUFFERDATAPROC )( GLenum target, GLenum internalformat, GLenum format, + GLenum type, const void *data ); +typedef void( APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC )( GLenum target, GLenum internalformat, + GLintptr offset, GLsizeiptr size, GLenum format, + GLenum type, const void *data ); +typedef void( APIENTRYP PFNGLDISPATCHCOMPUTEPROC )( GLuint num_groups_x, GLuint num_groups_y, + GLuint num_groups_z ); +typedef void( APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC )( GLintptr indirect ); +typedef void( APIENTRYP PFNGLCOPYIMAGESUBDATAPROC )( GLuint srcName, GLenum srcTarget, GLint srcLevel, + GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, + GLenum dstTarget, GLint dstLevel, GLint dstX, + GLint dstY, GLint dstZ, GLsizei srcWidth, + GLsizei srcHeight, GLsizei srcDepth ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC )( GLenum target, GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETINTERNALFORMATI64VPROC )( GLenum target, GLenum internalformat, + GLenum pname, GLsizei bufSize, + GLint64 *params ); +typedef void( APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC )( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth ); +typedef void( APIENTRYP PFNGLINVALIDATETEXIMAGEPROC )( GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr length ); +typedef void( APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC )( GLenum target, GLsizei numAttachments, + const GLenum *attachments ); +typedef void( APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC )( GLenum target, GLsizei numAttachments, + const GLenum *attachments, GLint x, GLint y, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC )( GLenum mode, const void *indirect, + GLsizei drawcount, GLsizei stride ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC )( GLenum mode, GLenum type, + const void *indirect, GLsizei drawcount, + GLsizei stride ); +typedef void( APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC )( GLuint program, GLenum programInterface, + GLenum pname, GLint *params ); +typedef GLuint( APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC )( GLuint program, GLenum programInterface, + const GLchar *name ); +typedef void( APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC )( GLuint program, GLenum programInterface, + GLuint index, GLsizei bufSize, + GLsizei *length, GLchar *name ); +typedef void( APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC )( GLuint program, GLenum programInterface, + GLuint index, GLsizei propCount, + const GLenum *props, GLsizei bufSize, + GLsizei *length, GLint *params ); +typedef GLint( APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC )( GLuint program, GLenum programInterface, + const GLchar *name ); +typedef GLint( APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC )( GLuint program, + GLenum programInterface, + const GLchar *name ); +typedef void( APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC )( GLuint program, GLuint storageBlockIndex, + GLuint storageBlockBinding ); +typedef void( APIENTRYP PFNGLTEXBUFFERRANGEPROC )( GLenum target, GLenum internalformat, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +typedef void( APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC )( GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC )( GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLTEXTUREVIEWPROC )( GLuint texture, GLenum target, GLuint origtexture, + GLenum internalformat, GLuint minlevel, GLuint numlevels, + GLuint minlayer, GLuint numlayers ); +typedef void( APIENTRYP PFNGLBINDVERTEXBUFFERPROC )( GLuint bindingindex, GLuint buffer, GLintptr offset, + GLsizei stride ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBFORMATPROC )( GLuint attribindex, GLint size, GLenum type, + GLboolean normalized, GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC )( GLuint attribindex, GLint size, GLenum type, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC )( GLuint attribindex, GLint size, GLenum type, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC )( GLuint attribindex, GLuint bindingindex ); +typedef void( APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC )( GLuint bindingindex, GLuint divisor ); +typedef void( APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC )( GLenum source, GLenum type, GLenum severity, + GLsizei count, const GLuint *ids, + GLboolean enabled ); +typedef void( APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC )( GLenum source, GLenum type, GLuint id, + GLenum severity, GLsizei length, + const GLchar *buf ); +typedef void( APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC )( GLDEBUGPROC callback, const void *userParam ); +typedef GLuint( APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC )( GLuint count, GLsizei bufSize, GLenum *sources, + GLenum *types, GLuint *ids, GLenum *severities, + GLsizei *lengths, GLchar *messageLog ); +typedef void( APIENTRYP PFNGLPUSHDEBUGGROUPPROC )( GLenum source, GLuint id, GLsizei length, + const GLchar *message ); +typedef void( APIENTRYP PFNGLPOPDEBUGGROUPPROC )( void ); +typedef void( APIENTRYP PFNGLOBJECTLABELPROC )( GLenum identifier, GLuint name, GLsizei length, + const GLchar *label ); +typedef void( APIENTRYP PFNGLGETOBJECTLABELPROC )( GLenum identifier, GLuint name, GLsizei bufSize, + GLsizei *length, GLchar *label ); +typedef void( APIENTRYP PFNGLOBJECTPTRLABELPROC )( const void *ptr, GLsizei length, + const GLchar *label ); +typedef void( APIENTRYP PFNGLGETOBJECTPTRLABELPROC )( const void *ptr, GLsizei bufSize, GLsizei *length, + GLchar *label ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClearBufferData( GLenum target, GLenum internalformat, GLenum format, GLenum type, + const void *data ); +GLAPI void APIENTRY glClearBufferSubData( GLenum target, GLenum internalformat, GLintptr offset, + GLsizeiptr size, GLenum format, GLenum type, + const void *data ); +GLAPI void APIENTRY glDispatchCompute( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z ); +GLAPI void APIENTRY glDispatchComputeIndirect( GLintptr indirect ); +GLAPI void APIENTRY glCopyImageSubData( GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, + GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, + GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, + GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth ); +GLAPI void APIENTRY glFramebufferParameteri( GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glGetFramebufferParameteriv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetInternalformati64v( GLenum target, GLenum internalformat, GLenum pname, + GLsizei bufSize, GLint64 *params ); +GLAPI void APIENTRY glInvalidateTexSubImage( GLuint texture, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth ); +GLAPI void APIENTRY glInvalidateTexImage( GLuint texture, GLint level ); +GLAPI void APIENTRY glInvalidateBufferSubData( GLuint buffer, GLintptr offset, GLsizeiptr length ); +GLAPI void APIENTRY glInvalidateBufferData( GLuint buffer ); +GLAPI void APIENTRY glInvalidateFramebuffer( GLenum target, GLsizei numAttachments, + const GLenum *attachments ); +GLAPI void APIENTRY glInvalidateSubFramebuffer( GLenum target, GLsizei numAttachments, + const GLenum *attachments, GLint x, GLint y, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glMultiDrawArraysIndirect( GLenum mode, const void *indirect, GLsizei drawcount, + GLsizei stride ); +GLAPI void APIENTRY glMultiDrawElementsIndirect( GLenum mode, GLenum type, const void *indirect, + GLsizei drawcount, GLsizei stride ); +GLAPI void APIENTRY glGetProgramInterfaceiv( GLuint program, GLenum programInterface, GLenum pname, + GLint *params ); +GLAPI GLuint APIENTRY glGetProgramResourceIndex( GLuint program, GLenum programInterface, + const GLchar *name ); +GLAPI void APIENTRY glGetProgramResourceName( GLuint program, GLenum programInterface, GLuint index, + GLsizei bufSize, GLsizei *length, GLchar *name ); +GLAPI void APIENTRY glGetProgramResourceiv( GLuint program, GLenum programInterface, GLuint index, + GLsizei propCount, const GLenum *props, GLsizei bufSize, + GLsizei *length, GLint *params ); +GLAPI GLint APIENTRY glGetProgramResourceLocation( GLuint program, GLenum programInterface, + const GLchar *name ); +GLAPI GLint APIENTRY glGetProgramResourceLocationIndex( GLuint program, GLenum programInterface, + const GLchar *name ); +GLAPI void APIENTRY glShaderStorageBlockBinding( GLuint program, GLuint storageBlockIndex, + GLuint storageBlockBinding ); +GLAPI void APIENTRY glTexBufferRange( GLenum target, GLenum internalformat, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +GLAPI void APIENTRY glTexStorage2DMultisample( GLenum target, GLsizei samples, GLenum internalformat, + GLsizei width, GLsizei height, + GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glTexStorage3DMultisample( GLenum target, GLsizei samples, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glTextureView( GLuint texture, GLenum target, GLuint origtexture, + GLenum internalformat, GLuint minlevel, GLuint numlevels, + GLuint minlayer, GLuint numlayers ); +GLAPI void APIENTRY glBindVertexBuffer( GLuint bindingindex, GLuint buffer, GLintptr offset, + GLsizei stride ); +GLAPI void APIENTRY glVertexAttribFormat( GLuint attribindex, GLint size, GLenum type, + GLboolean normalized, GLuint relativeoffset ); +GLAPI void APIENTRY glVertexAttribIFormat( GLuint attribindex, GLint size, GLenum type, + GLuint relativeoffset ); +GLAPI void APIENTRY glVertexAttribLFormat( GLuint attribindex, GLint size, GLenum type, + GLuint relativeoffset ); +GLAPI void APIENTRY glVertexAttribBinding( GLuint attribindex, GLuint bindingindex ); +GLAPI void APIENTRY glVertexBindingDivisor( GLuint bindingindex, GLuint divisor ); +GLAPI void APIENTRY glDebugMessageControl( GLenum source, GLenum type, GLenum severity, GLsizei count, + const GLuint *ids, GLboolean enabled ); +GLAPI void APIENTRY glDebugMessageInsert( GLenum source, GLenum type, GLuint id, GLenum severity, + GLsizei length, const GLchar *buf ); +GLAPI void APIENTRY glDebugMessageCallback( GLDEBUGPROC callback, const void *userParam ); +GLAPI GLuint APIENTRY glGetDebugMessageLog( GLuint count, GLsizei bufSize, GLenum *sources, + GLenum *types, GLuint *ids, GLenum *severities, + GLsizei *lengths, GLchar *messageLog ); +GLAPI void APIENTRY glPushDebugGroup( GLenum source, GLuint id, GLsizei length, const GLchar *message ); +GLAPI void APIENTRY glPopDebugGroup( void ); +GLAPI void APIENTRY glObjectLabel( GLenum identifier, GLuint name, GLsizei length, const GLchar *label ); +GLAPI void APIENTRY glGetObjectLabel( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, + GLchar *label ); +GLAPI void APIENTRY glObjectPtrLabel( const void *ptr, GLsizei length, const GLchar *label ); +GLAPI void APIENTRY glGetObjectPtrLabel( const void *ptr, GLsizei bufSize, GLsizei *length, + GLchar *label ); +# endif #endif /* GL_VERSION_4_3 */ #ifndef GL_VERSION_4_4 -#define GL_VERSION_4_4 1 -#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 -#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 -#define GL_TEXTURE_BUFFER_BINDING 0x8C2A -#define GL_MAP_PERSISTENT_BIT 0x0040 -#define GL_MAP_COHERENT_BIT 0x0080 -#define GL_DYNAMIC_STORAGE_BIT 0x0100 -#define GL_CLIENT_STORAGE_BIT 0x0200 -#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 -#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F -#define GL_BUFFER_STORAGE_FLAGS 0x8220 -#define GL_CLEAR_TEXTURE 0x9365 -#define GL_LOCATION_COMPONENT 0x934A -#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B -#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C -#define GL_QUERY_BUFFER 0x9192 -#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 -#define GL_QUERY_BUFFER_BINDING 0x9193 -#define GL_QUERY_RESULT_NO_WAIT 0x9194 -#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 -typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); -typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers); -typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); -typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); -typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers); -typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures); -typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); -GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers); -GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); -GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures); -GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers); -GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures); -GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); -#endif +# define GL_VERSION_4_4 1 +# define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 +# define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 +# define GL_TEXTURE_BUFFER_BINDING 0x8C2A +# define GL_MAP_PERSISTENT_BIT 0x0040 +# define GL_MAP_COHERENT_BIT 0x0080 +# define GL_DYNAMIC_STORAGE_BIT 0x0100 +# define GL_CLIENT_STORAGE_BIT 0x0200 +# define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 +# define GL_BUFFER_IMMUTABLE_STORAGE 0x821F +# define GL_BUFFER_STORAGE_FLAGS 0x8220 +# define GL_CLEAR_TEXTURE 0x9365 +# define GL_LOCATION_COMPONENT 0x934A +# define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B +# define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C +# define GL_QUERY_BUFFER 0x9192 +# define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 +# define GL_QUERY_BUFFER_BINDING 0x9193 +# define GL_QUERY_RESULT_NO_WAIT 0x9194 +# define GL_MIRROR_CLAMP_TO_EDGE 0x8743 +typedef void( APIENTRYP PFNGLBUFFERSTORAGEPROC )( GLenum target, GLsizeiptr size, const void *data, + GLbitfield flags ); +typedef void( APIENTRYP PFNGLCLEARTEXIMAGEPROC )( GLuint texture, GLint level, GLenum format, + GLenum type, const void *data ); +typedef void( APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC )( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLenum type, const void *data ); +typedef void( APIENTRYP PFNGLBINDBUFFERSBASEPROC )( GLenum target, GLuint first, GLsizei count, + const GLuint *buffers ); +typedef void( APIENTRYP PFNGLBINDBUFFERSRANGEPROC )( GLenum target, GLuint first, GLsizei count, + const GLuint *buffers, const GLintptr *offsets, + const GLsizeiptr *sizes ); +typedef void( APIENTRYP PFNGLBINDTEXTURESPROC )( GLuint first, GLsizei count, const GLuint *textures ); +typedef void( APIENTRYP PFNGLBINDSAMPLERSPROC )( GLuint first, GLsizei count, const GLuint *samplers ); +typedef void( APIENTRYP PFNGLBINDIMAGETEXTURESPROC )( GLuint first, GLsizei count, + const GLuint *textures ); +typedef void( APIENTRYP PFNGLBINDVERTEXBUFFERSPROC )( GLuint first, GLsizei count, const GLuint *buffers, + const GLintptr *offsets, const GLsizei *strides ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferStorage( GLenum target, GLsizeiptr size, const void *data, + GLbitfield flags ); +GLAPI void APIENTRY glClearTexImage( GLuint texture, GLint level, GLenum format, GLenum type, + const void *data ); +GLAPI void APIENTRY glClearTexSubImage( GLuint texture, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, const void *data ); +GLAPI void APIENTRY glBindBuffersBase( GLenum target, GLuint first, GLsizei count, + const GLuint *buffers ); +GLAPI void APIENTRY glBindBuffersRange( GLenum target, GLuint first, GLsizei count, + const GLuint *buffers, const GLintptr *offsets, + const GLsizeiptr *sizes ); +GLAPI void APIENTRY glBindTextures( GLuint first, GLsizei count, const GLuint *textures ); +GLAPI void APIENTRY glBindSamplers( GLuint first, GLsizei count, const GLuint *samplers ); +GLAPI void APIENTRY glBindImageTextures( GLuint first, GLsizei count, const GLuint *textures ); +GLAPI void APIENTRY glBindVertexBuffers( GLuint first, GLsizei count, const GLuint *buffers, + const GLintptr *offsets, const GLsizei *strides ); +# endif #endif /* GL_VERSION_4_4 */ #ifndef GL_VERSION_4_5 -#define GL_VERSION_4_5 1 -#define GL_CONTEXT_LOST 0x0507 -#define GL_NEGATIVE_ONE_TO_ONE 0x935E -#define GL_ZERO_TO_ONE 0x935F -#define GL_CLIP_ORIGIN 0x935C -#define GL_CLIP_DEPTH_MODE 0x935D -#define GL_QUERY_WAIT_INVERTED 0x8E17 -#define GL_QUERY_NO_WAIT_INVERTED 0x8E18 -#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 -#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A -#define GL_MAX_CULL_DISTANCES 0x82F9 -#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA -#define GL_TEXTURE_TARGET 0x1006 -#define GL_QUERY_TARGET 0x82EA -#define GL_GUILTY_CONTEXT_RESET 0x8253 -#define GL_INNOCENT_CONTEXT_RESET 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET 0x8255 -#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 -#define GL_LOSE_CONTEXT_ON_RESET 0x8252 -#define GL_NO_RESET_NOTIFICATION 0x8261 -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 -#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB -#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC -typedef void (APIENTRYP PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth); -typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC) (GLuint xfb, GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param); -typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); -typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); -typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); -typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access); -typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void **params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); -typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) (GLuint framebuffer, GLenum buf); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) (GLuint framebuffer, GLenum src); -typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments); -typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) (GLuint framebuffer, GLenum target); -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) (GLuint framebuffer, GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint *textures); -typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC) (GLuint texture, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC) (GLuint texture, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC) (GLuint texture); -typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC) (GLuint unit, GLuint texture); -typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLsizei bufSize, void *pixels); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC) (GLuint texture, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC) (GLuint texture, GLint level, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); -typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index); -typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index); -typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC) (GLuint vaobj, GLuint buffer); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC) (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); -typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC) (GLuint vaobj, GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param); -typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC) (GLsizei n, GLuint *samplers); -typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); -typedef void (APIENTRYP PFNGLCREATEQUERIESPROC) (GLenum target, GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers); -typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); -typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void); -typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLsizei bufSize, void *pixels); -typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -typedef void (APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClipControl (GLenum origin, GLenum depth); -GLAPI void APIENTRY glCreateTransformFeedbacks (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glTransformFeedbackBufferBase (GLuint xfb, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glGetTransformFeedbackiv (GLuint xfb, GLenum pname, GLint *param); -GLAPI void APIENTRY glGetTransformFeedbacki_v (GLuint xfb, GLenum pname, GLuint index, GLint *param); -GLAPI void APIENTRY glGetTransformFeedbacki64_v (GLuint xfb, GLenum pname, GLuint index, GLint64 *param); -GLAPI void APIENTRY glCreateBuffers (GLsizei n, GLuint *buffers); -GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); -GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); -GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); -GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI void APIENTRY glClearNamedBufferData (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -GLAPI void *APIENTRY glMapNamedBuffer (GLuint buffer, GLenum access); -GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI GLboolean APIENTRY glUnmapNamedBuffer (GLuint buffer); -GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI void APIENTRY glGetNamedBufferParameteriv (GLuint buffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetNamedBufferParameteri64v (GLuint buffer, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glGetNamedBufferPointerv (GLuint buffer, GLenum pname, void **params); -GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); -GLAPI void APIENTRY glCreateFramebuffers (GLsizei n, GLuint *framebuffers); -GLAPI void APIENTRY glNamedFramebufferRenderbuffer (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glNamedFramebufferParameteri (GLuint framebuffer, GLenum pname, GLint param); -GLAPI void APIENTRY glNamedFramebufferTexture (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTextureLayer (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glNamedFramebufferDrawBuffer (GLuint framebuffer, GLenum buf); -GLAPI void APIENTRY glNamedFramebufferDrawBuffers (GLuint framebuffer, GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY glNamedFramebufferReadBuffer (GLuint framebuffer, GLenum src); -GLAPI void APIENTRY glInvalidateNamedFramebufferData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments); -GLAPI void APIENTRY glInvalidateNamedFramebufferSubData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glClearNamedFramebufferiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); -GLAPI void APIENTRY glClearNamedFramebufferuiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); -GLAPI void APIENTRY glClearNamedFramebufferfv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI void APIENTRY glClearNamedFramebufferfi (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GLAPI void APIENTRY glBlitNamedFramebuffer (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GLAPI GLenum APIENTRY glCheckNamedFramebufferStatus (GLuint framebuffer, GLenum target); -GLAPI void APIENTRY glGetNamedFramebufferParameteriv (GLuint framebuffer, GLenum pname, GLint *param); -GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameteriv (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glCreateRenderbuffers (GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY glNamedRenderbufferStorage (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetNamedRenderbufferParameteriv (GLuint renderbuffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glCreateTextures (GLenum target, GLsizei n, GLuint *textures); -GLAPI void APIENTRY glTextureBuffer (GLuint texture, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glTextureStorage1D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI void APIENTRY glTextureStorage2D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTextureStorage3D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY glTextureStorage2DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTextureStorage3DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glCompressedTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCompressedTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GLAPI void APIENTRY glCopyTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glCopyTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTextureParameterf (GLuint texture, GLenum pname, GLfloat param); -GLAPI void APIENTRY glTextureParameterfv (GLuint texture, GLenum pname, const GLfloat *param); -GLAPI void APIENTRY glTextureParameteri (GLuint texture, GLenum pname, GLint param); -GLAPI void APIENTRY glTextureParameterIiv (GLuint texture, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTextureParameterIuiv (GLuint texture, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glTextureParameteriv (GLuint texture, GLenum pname, const GLint *param); -GLAPI void APIENTRY glGenerateTextureMipmap (GLuint texture); -GLAPI void APIENTRY glBindTextureUnit (GLuint unit, GLuint texture); -GLAPI void APIENTRY glGetTextureImage (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -GLAPI void APIENTRY glGetCompressedTextureImage (GLuint texture, GLint level, GLsizei bufSize, void *pixels); -GLAPI void APIENTRY glGetTextureLevelParameterfv (GLuint texture, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureLevelParameteriv (GLuint texture, GLint level, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureParameterfv (GLuint texture, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureParameterIiv (GLuint texture, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureParameterIuiv (GLuint texture, GLenum pname, GLuint *params); -GLAPI void APIENTRY glGetTextureParameteriv (GLuint texture, GLenum pname, GLint *params); -GLAPI void APIENTRY glCreateVertexArrays (GLsizei n, GLuint *arrays); -GLAPI void APIENTRY glDisableVertexArrayAttrib (GLuint vaobj, GLuint index); -GLAPI void APIENTRY glEnableVertexArrayAttrib (GLuint vaobj, GLuint index); -GLAPI void APIENTRY glVertexArrayElementBuffer (GLuint vaobj, GLuint buffer); -GLAPI void APIENTRY glVertexArrayVertexBuffer (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GLAPI void APIENTRY glVertexArrayVertexBuffers (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); -GLAPI void APIENTRY glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex); -GLAPI void APIENTRY glVertexArrayAttribFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayAttribIFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayAttribLFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayBindingDivisor (GLuint vaobj, GLuint bindingindex, GLuint divisor); -GLAPI void APIENTRY glGetVertexArrayiv (GLuint vaobj, GLenum pname, GLint *param); -GLAPI void APIENTRY glGetVertexArrayIndexediv (GLuint vaobj, GLuint index, GLenum pname, GLint *param); -GLAPI void APIENTRY glGetVertexArrayIndexed64iv (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param); -GLAPI void APIENTRY glCreateSamplers (GLsizei n, GLuint *samplers); -GLAPI void APIENTRY glCreateProgramPipelines (GLsizei n, GLuint *pipelines); -GLAPI void APIENTRY glCreateQueries (GLenum target, GLsizei n, GLuint *ids); -GLAPI void APIENTRY glGetQueryBufferObjecti64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI void APIENTRY glGetQueryBufferObjectiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI void APIENTRY glGetQueryBufferObjectui64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI void APIENTRY glGetQueryBufferObjectuiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI void APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); -GLAPI void APIENTRY glGetTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -GLAPI void APIENTRY glGetCompressedTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); -GLAPI GLenum APIENTRY glGetGraphicsResetStatus (void); -GLAPI void APIENTRY glGetnCompressedTexImage (GLenum target, GLint lod, GLsizei bufSize, void *pixels); -GLAPI void APIENTRY glGetnTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -GLAPI void APIENTRY glGetnUniformdv (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -GLAPI void APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GLAPI void APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params); -GLAPI void APIENTRY glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -GLAPI void APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GLAPI void APIENTRY glTextureBarrier (void); -#endif +# define GL_VERSION_4_5 1 +# define GL_CONTEXT_LOST 0x0507 +# define GL_NEGATIVE_ONE_TO_ONE 0x935E +# define GL_ZERO_TO_ONE 0x935F +# define GL_CLIP_ORIGIN 0x935C +# define GL_CLIP_DEPTH_MODE 0x935D +# define GL_QUERY_WAIT_INVERTED 0x8E17 +# define GL_QUERY_NO_WAIT_INVERTED 0x8E18 +# define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 +# define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A +# define GL_MAX_CULL_DISTANCES 0x82F9 +# define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA +# define GL_TEXTURE_TARGET 0x1006 +# define GL_QUERY_TARGET 0x82EA +# define GL_GUILTY_CONTEXT_RESET 0x8253 +# define GL_INNOCENT_CONTEXT_RESET 0x8254 +# define GL_UNKNOWN_CONTEXT_RESET 0x8255 +# define GL_RESET_NOTIFICATION_STRATEGY 0x8256 +# define GL_LOSE_CONTEXT_ON_RESET 0x8252 +# define GL_NO_RESET_NOTIFICATION 0x8261 +# define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 +# define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB +# define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC +typedef void( APIENTRYP PFNGLCLIPCONTROLPROC )( GLenum origin, GLenum depth ); +typedef void( APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC )( GLsizei n, GLuint *ids ); +typedef void( APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC )( GLuint xfb, GLuint index, + GLuint buffer ); +typedef void( APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC )( GLuint xfb, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +typedef void( APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC )( GLuint xfb, GLenum pname, GLint *param ); +typedef void( APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC )( GLuint xfb, GLenum pname, GLuint index, + GLint *param ); +typedef void( APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC )( GLuint xfb, GLenum pname, GLuint index, + GLint64 *param ); +typedef void( APIENTRYP PFNGLCREATEBUFFERSPROC )( GLsizei n, GLuint *buffers ); +typedef void( APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC )( GLuint buffer, GLsizeiptr size, const void *data, + GLbitfield flags ); +typedef void( APIENTRYP PFNGLNAMEDBUFFERDATAPROC )( GLuint buffer, GLsizeiptr size, const void *data, + GLenum usage ); +typedef void( APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC )( GLuint buffer, GLintptr offset, GLsizeiptr size, + const void *data ); +typedef void( APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC )( GLuint readBuffer, GLuint writeBuffer, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size ); +typedef void( APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC )( GLuint buffer, GLenum internalformat, + GLenum format, GLenum type, const void *data ); +typedef void( APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC )( GLuint buffer, GLenum internalformat, + GLintptr offset, GLsizeiptr size, + GLenum format, GLenum type, + const void *data ); +typedef void *( APIENTRYP PFNGLMAPNAMEDBUFFERPROC )( GLuint buffer, GLenum access ); +typedef void *( APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr length, GLbitfield access ); +typedef GLboolean( APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr length ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC )( GLuint buffer, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC )( GLuint buffer, GLenum pname, + GLint64 *params ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC )( GLuint buffer, GLenum pname, void **params ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr size, void *data ); +typedef void( APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC )( GLsizei n, GLuint *framebuffers ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC )( GLuint framebuffer, GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC )( GLuint framebuffer, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC )( GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC )( GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level, + GLint layer ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC )( GLuint framebuffer, GLenum buf ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC )( GLuint framebuffer, GLsizei n, + const GLenum *bufs ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC )( GLuint framebuffer, GLenum src ); +typedef void( APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC )( GLuint framebuffer, + GLsizei numAttachments, + const GLenum *attachments ); +typedef void( APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC )( GLuint framebuffer, + GLsizei numAttachments, + const GLenum *attachments, GLint x, + GLint y, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC )( GLuint framebuffer, GLenum buffer, + GLint drawbuffer, const GLint *value ); +typedef void( APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC )( GLuint framebuffer, GLenum buffer, + GLint drawbuffer, const GLuint *value ); +typedef void( APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC )( GLuint framebuffer, GLenum buffer, + GLint drawbuffer, const GLfloat *value ); +typedef void( APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC )( GLuint framebuffer, GLenum buffer, + GLint drawbuffer, GLfloat depth, + GLint stencil ); +typedef void( APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC )( GLuint readFramebuffer, GLuint drawFramebuffer, + GLint srcX0, GLint srcY0, GLint srcX1, + GLint srcY1, GLint dstX0, GLint dstY0, + GLint dstX1, GLint dstY1, GLbitfield mask, + GLenum filter ); +typedef GLenum( APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC )( GLuint framebuffer, GLenum target ); +typedef void( APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC )( GLuint framebuffer, GLenum pname, + GLint *param ); +typedef void( APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC )( GLuint framebuffer, + GLenum attachment, + GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLCREATERENDERBUFFERSPROC )( GLsizei n, GLuint *renderbuffers ); +typedef void( APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC )( GLuint renderbuffer, GLenum internalformat, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC )( GLuint renderbuffer, + GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC )( GLuint renderbuffer, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLCREATETEXTURESPROC )( GLenum target, GLsizei n, GLuint *textures ); +typedef void( APIENTRYP PFNGLTEXTUREBUFFERPROC )( GLuint texture, GLenum internalformat, GLuint buffer ); +typedef void( APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC )( GLuint texture, GLenum internalformat, + GLuint buffer, GLintptr offset, GLsizeiptr size ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE1DPROC )( GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE2DPROC )( GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE3DPROC )( GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC )( GLuint texture, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC )( GLuint texture, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC )( GLuint texture, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLenum type, + const void *pixels ); +typedef void( APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC )( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC )( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC )( GLuint texture, GLint level, + GLint xoffset, GLsizei width, + GLenum format, GLsizei imageSize, + const void *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC )( GLuint texture, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLsizei imageSize, + const void *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC )( + GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data ); +typedef void( APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC )( GLuint texture, GLint level, GLint xoffset, + GLint x, GLint y, GLsizei width ); +typedef void( APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC )( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint x, GLint y, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC )( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint x, GLint y, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERFPROC )( GLuint texture, GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERFVPROC )( GLuint texture, GLenum pname, + const GLfloat *param ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIPROC )( GLuint texture, GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC )( GLuint texture, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC )( GLuint texture, GLenum pname, + const GLuint *params ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIVPROC )( GLuint texture, GLenum pname, + const GLint *param ); +typedef void( APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC )( GLuint texture ); +typedef void( APIENTRYP PFNGLBINDTEXTUREUNITPROC )( GLuint unit, GLuint texture ); +typedef void( APIENTRYP PFNGLGETTEXTUREIMAGEPROC )( GLuint texture, GLint level, GLenum format, + GLenum type, GLsizei bufSize, void *pixels ); +typedef void( APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC )( GLuint texture, GLint level, + GLsizei bufSize, void *pixels ); +typedef void( APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC )( GLuint texture, GLint level, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC )( GLuint texture, GLint level, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC )( GLuint texture, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC )( GLuint texture, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC )( GLuint texture, GLenum pname, + GLuint *params ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC )( GLuint texture, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLCREATEVERTEXARRAYSPROC )( GLsizei n, GLuint *arrays ); +typedef void( APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC )( GLuint vaobj, GLuint index ); +typedef void( APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC )( GLuint vaobj, GLuint index ); +typedef void( APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC )( GLuint vaobj, GLuint buffer ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC )( GLuint vaobj, GLuint bindingindex, + GLuint buffer, GLintptr offset, + GLsizei stride ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC )( GLuint vaobj, GLuint first, GLsizei count, + const GLuint * buffers, + const GLintptr *offsets, + const GLsizei * strides ); +typedef void( APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC )( GLuint vaobj, GLuint attribindex, + GLuint bindingindex ); +typedef void( APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC )( GLuint vaobj, GLuint attribindex, GLint size, + GLenum type, GLboolean normalized, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC )( GLuint vaobj, GLuint attribindex, + GLint size, GLenum type, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC )( GLuint vaobj, GLuint attribindex, + GLint size, GLenum type, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC )( GLuint vaobj, GLuint bindingindex, + GLuint divisor ); +typedef void( APIENTRYP PFNGLGETVERTEXARRAYIVPROC )( GLuint vaobj, GLenum pname, GLint *param ); +typedef void( APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC )( GLuint vaobj, GLuint index, GLenum pname, + GLint *param ); +typedef void( APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC )( GLuint vaobj, GLuint index, GLenum pname, + GLint64 *param ); +typedef void( APIENTRYP PFNGLCREATESAMPLERSPROC )( GLsizei n, GLuint *samplers ); +typedef void( APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC )( GLsizei n, GLuint *pipelines ); +typedef void( APIENTRYP PFNGLCREATEQUERIESPROC )( GLenum target, GLsizei n, GLuint *ids ); +typedef void( APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC )( GLuint id, GLuint buffer, GLenum pname, + GLintptr offset ); +typedef void( APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC )( GLuint id, GLuint buffer, GLenum pname, + GLintptr offset ); +typedef void( APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC )( GLuint id, GLuint buffer, GLenum pname, + GLintptr offset ); +typedef void( APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC )( GLuint id, GLuint buffer, GLenum pname, + GLintptr offset ); +typedef void( APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC )( GLbitfield barriers ); +typedef void( APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC )( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLenum type, GLsizei bufSize, void *pixels ); +typedef void( APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC )( GLuint texture, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLsizei bufSize, void *pixels ); +typedef GLenum( APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC )( void ); +typedef void( APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC )( GLenum target, GLint lod, GLsizei bufSize, + void *pixels ); +typedef void( APIENTRYP PFNGLGETNTEXIMAGEPROC )( GLenum target, GLint level, GLenum format, GLenum type, + GLsizei bufSize, void *pixels ); +typedef void( APIENTRYP PFNGLGETNUNIFORMDVPROC )( GLuint program, GLint location, GLsizei bufSize, + GLdouble *params ); +typedef void( APIENTRYP PFNGLGETNUNIFORMFVPROC )( GLuint program, GLint location, GLsizei bufSize, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETNUNIFORMIVPROC )( GLuint program, GLint location, GLsizei bufSize, + GLint *params ); +typedef void( APIENTRYP PFNGLGETNUNIFORMUIVPROC )( GLuint program, GLint location, GLsizei bufSize, + GLuint *params ); +typedef void( APIENTRYP PFNGLREADNPIXELSPROC )( GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, GLsizei bufSize, + void *data ); +typedef void( APIENTRYP PFNGLTEXTUREBARRIERPROC )( void ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClipControl( GLenum origin, GLenum depth ); +GLAPI void APIENTRY glCreateTransformFeedbacks( GLsizei n, GLuint *ids ); +GLAPI void APIENTRY glTransformFeedbackBufferBase( GLuint xfb, GLuint index, GLuint buffer ); +GLAPI void APIENTRY glTransformFeedbackBufferRange( GLuint xfb, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +GLAPI void APIENTRY glGetTransformFeedbackiv( GLuint xfb, GLenum pname, GLint *param ); +GLAPI void APIENTRY glGetTransformFeedbacki_v( GLuint xfb, GLenum pname, GLuint index, GLint *param ); +GLAPI void APIENTRY glGetTransformFeedbacki64_v( GLuint xfb, GLenum pname, GLuint index, + GLint64 *param ); +GLAPI void APIENTRY glCreateBuffers( GLsizei n, GLuint *buffers ); +GLAPI void APIENTRY glNamedBufferStorage( GLuint buffer, GLsizeiptr size, const void *data, + GLbitfield flags ); +GLAPI void APIENTRY glNamedBufferData( GLuint buffer, GLsizeiptr size, const void *data, GLenum usage ); +GLAPI void APIENTRY glNamedBufferSubData( GLuint buffer, GLintptr offset, GLsizeiptr size, + const void *data ); +GLAPI void APIENTRY glCopyNamedBufferSubData( GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, + GLintptr writeOffset, GLsizeiptr size ); +GLAPI void APIENTRY glClearNamedBufferData( GLuint buffer, GLenum internalformat, GLenum format, + GLenum type, const void *data ); +GLAPI void APIENTRY glClearNamedBufferSubData( GLuint buffer, GLenum internalformat, GLintptr offset, + GLsizeiptr size, GLenum format, GLenum type, + const void *data ); +GLAPI void *APIENTRY glMapNamedBuffer( GLuint buffer, GLenum access ); +GLAPI void *APIENTRY glMapNamedBufferRange( GLuint buffer, GLintptr offset, GLsizeiptr length, + GLbitfield access ); +GLAPI GLboolean APIENTRY glUnmapNamedBuffer( GLuint buffer ); +GLAPI void APIENTRY glFlushMappedNamedBufferRange( GLuint buffer, GLintptr offset, GLsizeiptr length ); +GLAPI void APIENTRY glGetNamedBufferParameteriv( GLuint buffer, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetNamedBufferParameteri64v( GLuint buffer, GLenum pname, GLint64 *params ); +GLAPI void APIENTRY glGetNamedBufferPointerv( GLuint buffer, GLenum pname, void **params ); +GLAPI void APIENTRY glGetNamedBufferSubData( GLuint buffer, GLintptr offset, GLsizeiptr size, + void *data ); +GLAPI void APIENTRY glCreateFramebuffers( GLsizei n, GLuint *framebuffers ); +GLAPI void APIENTRY glNamedFramebufferRenderbuffer( GLuint framebuffer, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer ); +GLAPI void APIENTRY glNamedFramebufferParameteri( GLuint framebuffer, GLenum pname, GLint param ); +GLAPI void APIENTRY glNamedFramebufferTexture( GLuint framebuffer, GLenum attachment, GLuint texture, + GLint level ); +GLAPI void APIENTRY glNamedFramebufferTextureLayer( GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level, GLint layer ); +GLAPI void APIENTRY glNamedFramebufferDrawBuffer( GLuint framebuffer, GLenum buf ); +GLAPI void APIENTRY glNamedFramebufferDrawBuffers( GLuint framebuffer, GLsizei n, const GLenum *bufs ); +GLAPI void APIENTRY glNamedFramebufferReadBuffer( GLuint framebuffer, GLenum src ); +GLAPI void APIENTRY glInvalidateNamedFramebufferData( GLuint framebuffer, GLsizei numAttachments, + const GLenum *attachments ); +GLAPI void APIENTRY glInvalidateNamedFramebufferSubData( GLuint framebuffer, GLsizei numAttachments, + const GLenum *attachments, GLint x, GLint y, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glClearNamedFramebufferiv( GLuint framebuffer, GLenum buffer, GLint drawbuffer, + const GLint *value ); +GLAPI void APIENTRY glClearNamedFramebufferuiv( GLuint framebuffer, GLenum buffer, GLint drawbuffer, + const GLuint *value ); +GLAPI void APIENTRY glClearNamedFramebufferfv( GLuint framebuffer, GLenum buffer, GLint drawbuffer, + const GLfloat *value ); +GLAPI void APIENTRY glClearNamedFramebufferfi( GLuint framebuffer, GLenum buffer, GLint drawbuffer, + GLfloat depth, GLint stencil ); +GLAPI void APIENTRY glBlitNamedFramebuffer( GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, + GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, + GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, + GLenum filter ); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatus( GLuint framebuffer, GLenum target ); +GLAPI void APIENTRY glGetNamedFramebufferParameteriv( GLuint framebuffer, GLenum pname, GLint *param ); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameteriv( GLuint framebuffer, GLenum attachment, + GLenum pname, GLint *params ); +GLAPI void APIENTRY glCreateRenderbuffers( GLsizei n, GLuint *renderbuffers ); +GLAPI void APIENTRY glNamedRenderbufferStorage( GLuint renderbuffer, GLenum internalformat, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisample( GLuint renderbuffer, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glGetNamedRenderbufferParameteriv( GLuint renderbuffer, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glCreateTextures( GLenum target, GLsizei n, GLuint *textures ); +GLAPI void APIENTRY glTextureBuffer( GLuint texture, GLenum internalformat, GLuint buffer ); +GLAPI void APIENTRY glTextureBufferRange( GLuint texture, GLenum internalformat, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +GLAPI void APIENTRY glTextureStorage1D( GLuint texture, GLsizei levels, GLenum internalformat, + GLsizei width ); +GLAPI void APIENTRY glTextureStorage2D( GLuint texture, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glTextureStorage3D( GLuint texture, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth ); +GLAPI void APIENTRY glTextureStorage2DMultisample( GLuint texture, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height, + GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glTextureStorage3DMultisample( GLuint texture, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glTextureSubImage1D( GLuint texture, GLint level, GLint xoffset, GLsizei width, + GLenum format, GLenum type, const void *pixels ); +GLAPI void APIENTRY glTextureSubImage2D( GLuint texture, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, + const void *pixels ); +GLAPI void APIENTRY glTextureSubImage3D( GLuint texture, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, const void *pixels ); +GLAPI void APIENTRY glCompressedTextureSubImage1D( GLuint texture, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLsizei imageSize, + const void *data ); +GLAPI void APIENTRY glCompressedTextureSubImage2D( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLsizei imageSize, const void *data ); +GLAPI void APIENTRY glCompressedTextureSubImage3D( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLsizei imageSize, const void *data ); +GLAPI void APIENTRY glCopyTextureSubImage1D( GLuint texture, GLint level, GLint xoffset, GLint x, + GLint y, GLsizei width ); +GLAPI void APIENTRY glCopyTextureSubImage2D( GLuint texture, GLint level, GLint xoffset, GLint yoffset, + GLint x, GLint y, GLsizei width, GLsizei height ); +GLAPI void APIENTRY glCopyTextureSubImage3D( GLuint texture, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, GLint y, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glTextureParameterf( GLuint texture, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glTextureParameterfv( GLuint texture, GLenum pname, const GLfloat *param ); +GLAPI void APIENTRY glTextureParameteri( GLuint texture, GLenum pname, GLint param ); +GLAPI void APIENTRY glTextureParameterIiv( GLuint texture, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glTextureParameterIuiv( GLuint texture, GLenum pname, const GLuint *params ); +GLAPI void APIENTRY glTextureParameteriv( GLuint texture, GLenum pname, const GLint *param ); +GLAPI void APIENTRY glGenerateTextureMipmap( GLuint texture ); +GLAPI void APIENTRY glBindTextureUnit( GLuint unit, GLuint texture ); +GLAPI void APIENTRY glGetTextureImage( GLuint texture, GLint level, GLenum format, GLenum type, + GLsizei bufSize, void *pixels ); +GLAPI void APIENTRY glGetCompressedTextureImage( GLuint texture, GLint level, GLsizei bufSize, + void *pixels ); +GLAPI void APIENTRY glGetTextureLevelParameterfv( GLuint texture, GLint level, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetTextureLevelParameteriv( GLuint texture, GLint level, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetTextureParameterfv( GLuint texture, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetTextureParameterIiv( GLuint texture, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetTextureParameterIuiv( GLuint texture, GLenum pname, GLuint *params ); +GLAPI void APIENTRY glGetTextureParameteriv( GLuint texture, GLenum pname, GLint *params ); +GLAPI void APIENTRY glCreateVertexArrays( GLsizei n, GLuint *arrays ); +GLAPI void APIENTRY glDisableVertexArrayAttrib( GLuint vaobj, GLuint index ); +GLAPI void APIENTRY glEnableVertexArrayAttrib( GLuint vaobj, GLuint index ); +GLAPI void APIENTRY glVertexArrayElementBuffer( GLuint vaobj, GLuint buffer ); +GLAPI void APIENTRY glVertexArrayVertexBuffer( GLuint vaobj, GLuint bindingindex, GLuint buffer, + GLintptr offset, GLsizei stride ); +GLAPI void APIENTRY glVertexArrayVertexBuffers( GLuint vaobj, GLuint first, GLsizei count, + const GLuint *buffers, const GLintptr *offsets, + const GLsizei *strides ); +GLAPI void APIENTRY glVertexArrayAttribBinding( GLuint vaobj, GLuint attribindex, GLuint bindingindex ); +GLAPI void APIENTRY glVertexArrayAttribFormat( GLuint vaobj, GLuint attribindex, GLint size, GLenum type, + GLboolean normalized, GLuint relativeoffset ); +GLAPI void APIENTRY glVertexArrayAttribIFormat( GLuint vaobj, GLuint attribindex, GLint size, + GLenum type, GLuint relativeoffset ); +GLAPI void APIENTRY glVertexArrayAttribLFormat( GLuint vaobj, GLuint attribindex, GLint size, + GLenum type, GLuint relativeoffset ); +GLAPI void APIENTRY glVertexArrayBindingDivisor( GLuint vaobj, GLuint bindingindex, GLuint divisor ); +GLAPI void APIENTRY glGetVertexArrayiv( GLuint vaobj, GLenum pname, GLint *param ); +GLAPI void APIENTRY glGetVertexArrayIndexediv( GLuint vaobj, GLuint index, GLenum pname, GLint *param ); +GLAPI void APIENTRY glGetVertexArrayIndexed64iv( GLuint vaobj, GLuint index, GLenum pname, + GLint64 *param ); +GLAPI void APIENTRY glCreateSamplers( GLsizei n, GLuint *samplers ); +GLAPI void APIENTRY glCreateProgramPipelines( GLsizei n, GLuint *pipelines ); +GLAPI void APIENTRY glCreateQueries( GLenum target, GLsizei n, GLuint *ids ); +GLAPI void APIENTRY glGetQueryBufferObjecti64v( GLuint id, GLuint buffer, GLenum pname, + GLintptr offset ); +GLAPI void APIENTRY glGetQueryBufferObjectiv( GLuint id, GLuint buffer, GLenum pname, GLintptr offset ); +GLAPI void APIENTRY glGetQueryBufferObjectui64v( GLuint id, GLuint buffer, GLenum pname, + GLintptr offset ); +GLAPI void APIENTRY glGetQueryBufferObjectuiv( GLuint id, GLuint buffer, GLenum pname, GLintptr offset ); +GLAPI void APIENTRY glMemoryBarrierByRegion( GLbitfield barriers ); +GLAPI void APIENTRY glGetTextureSubImage( GLuint texture, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, GLsizei bufSize, void *pixels ); +GLAPI void APIENTRY glGetCompressedTextureSubImage( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLsizei bufSize, + void *pixels ); +GLAPI GLenum APIENTRY glGetGraphicsResetStatus( void ); +GLAPI void APIENTRY glGetnCompressedTexImage( GLenum target, GLint lod, GLsizei bufSize, void *pixels ); +GLAPI void APIENTRY glGetnTexImage( GLenum target, GLint level, GLenum format, GLenum type, + GLsizei bufSize, void *pixels ); +GLAPI void APIENTRY glGetnUniformdv( GLuint program, GLint location, GLsizei bufSize, GLdouble *params ); +GLAPI void APIENTRY glGetnUniformfv( GLuint program, GLint location, GLsizei bufSize, GLfloat *params ); +GLAPI void APIENTRY glGetnUniformiv( GLuint program, GLint location, GLsizei bufSize, GLint *params ); +GLAPI void APIENTRY glGetnUniformuiv( GLuint program, GLint location, GLsizei bufSize, GLuint *params ); +GLAPI void APIENTRY glReadnPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, + GLenum type, GLsizei bufSize, void *data ); +GLAPI void APIENTRY glTextureBarrier( void ); +# endif #endif /* GL_VERSION_4_5 */ #ifndef GL_ARB_ES2_compatibility -#define GL_ARB_ES2_compatibility 1 +# define GL_ARB_ES2_compatibility 1 #endif /* GL_ARB_ES2_compatibility */ #ifndef GL_ARB_ES3_1_compatibility -#define GL_ARB_ES3_1_compatibility 1 +# define GL_ARB_ES3_1_compatibility 1 #endif /* GL_ARB_ES3_1_compatibility */ #ifndef GL_ARB_ES3_2_compatibility -#define GL_ARB_ES3_2_compatibility 1 -#define GL_PRIMITIVE_BOUNDING_BOX_ARB 0x92BE -#define GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB 0x9381 -#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB 0x9382 -typedef void (APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXARBPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPrimitiveBoundingBoxARB (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); -#endif +# define GL_ARB_ES3_2_compatibility 1 +# define GL_PRIMITIVE_BOUNDING_BOX_ARB 0x92BE +# define GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB 0x9381 +# define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB 0x9382 +typedef void( APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXARBPROC )( GLfloat minX, GLfloat minY, GLfloat minZ, + GLfloat minW, GLfloat maxX, GLfloat maxY, + GLfloat maxZ, GLfloat maxW ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPrimitiveBoundingBoxARB( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, + GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW ); +# endif #endif /* GL_ARB_ES3_2_compatibility */ #ifndef GL_ARB_ES3_compatibility -#define GL_ARB_ES3_compatibility 1 +# define GL_ARB_ES3_compatibility 1 #endif /* GL_ARB_ES3_compatibility */ #ifndef GL_ARB_arrays_of_arrays -#define GL_ARB_arrays_of_arrays 1 +# define GL_ARB_arrays_of_arrays 1 #endif /* GL_ARB_arrays_of_arrays */ #ifndef GL_ARB_base_instance -#define GL_ARB_base_instance 1 +# define GL_ARB_base_instance 1 #endif /* GL_ARB_base_instance */ #ifndef GL_ARB_bindless_texture -#define GL_ARB_bindless_texture 1 +# define GL_ARB_bindless_texture 1 typedef uint64_t GLuint64EXT; -#define GL_UNSIGNED_INT64_ARB 0x140F -typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture); -typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle); -typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle); -typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture); -GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler); -GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle); -GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle); -GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access); -GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle); -GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value); -GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value); -GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle); -GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle); -GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x); -GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params); -#endif +# define GL_UNSIGNED_INT64_ARB 0x140F +typedef GLuint64( APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC )( GLuint texture ); +typedef GLuint64( APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC )( GLuint texture, GLuint sampler ); +typedef void( APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC )( GLuint64 handle ); +typedef void( APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC )( GLuint64 handle ); +typedef GLuint64( APIENTRYP PFNGLGETIMAGEHANDLEARBPROC )( GLuint texture, GLint level, GLboolean layered, + GLint layer, GLenum format ); +typedef void( APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC )( GLuint64 handle, GLenum access ); +typedef void( APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC )( GLuint64 handle ); +typedef void( APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC )( GLint location, GLuint64 value ); +typedef void( APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC )( GLint location, GLsizei count, + const GLuint64 *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC )( GLuint program, GLint location, + GLuint64 value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC )( GLuint program, GLint location, + GLsizei count, const GLuint64 *values ); +typedef GLboolean( APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC )( GLuint64 handle ); +typedef GLboolean( APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC )( GLuint64 handle ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC )( GLuint index, GLuint64EXT x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC )( GLuint index, const GLuint64EXT *v ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC )( GLuint index, GLenum pname, + GLuint64EXT *params ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint64 APIENTRY glGetTextureHandleARB( GLuint texture ); +GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB( GLuint texture, GLuint sampler ); +GLAPI void APIENTRY glMakeTextureHandleResidentARB( GLuint64 handle ); +GLAPI void APIENTRY glMakeTextureHandleNonResidentARB( GLuint64 handle ); +GLAPI GLuint64 APIENTRY glGetImageHandleARB( GLuint texture, GLint level, GLboolean layered, GLint layer, + GLenum format ); +GLAPI void APIENTRY glMakeImageHandleResidentARB( GLuint64 handle, GLenum access ); +GLAPI void APIENTRY glMakeImageHandleNonResidentARB( GLuint64 handle ); +GLAPI void APIENTRY glUniformHandleui64ARB( GLint location, GLuint64 value ); +GLAPI void APIENTRY glUniformHandleui64vARB( GLint location, GLsizei count, const GLuint64 *value ); +GLAPI void APIENTRY glProgramUniformHandleui64ARB( GLuint program, GLint location, GLuint64 value ); +GLAPI void APIENTRY glProgramUniformHandleui64vARB( GLuint program, GLint location, GLsizei count, + const GLuint64 *values ); +GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB( GLuint64 handle ); +GLAPI GLboolean APIENTRY glIsImageHandleResidentARB( GLuint64 handle ); +GLAPI void APIENTRY glVertexAttribL1ui64ARB( GLuint index, GLuint64EXT x ); +GLAPI void APIENTRY glVertexAttribL1ui64vARB( GLuint index, const GLuint64EXT *v ); +GLAPI void APIENTRY glGetVertexAttribLui64vARB( GLuint index, GLenum pname, GLuint64EXT *params ); +# endif #endif /* GL_ARB_bindless_texture */ #ifndef GL_ARB_blend_func_extended -#define GL_ARB_blend_func_extended 1 +# define GL_ARB_blend_func_extended 1 #endif /* GL_ARB_blend_func_extended */ #ifndef GL_ARB_buffer_storage -#define GL_ARB_buffer_storage 1 +# define GL_ARB_buffer_storage 1 #endif /* GL_ARB_buffer_storage */ #ifndef GL_ARB_cl_event -#define GL_ARB_cl_event 1 +# define GL_ARB_cl_event 1 struct _cl_context; struct _cl_event; -#define GL_SYNC_CL_EVENT_ARB 0x8240 -#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 -typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags); -#endif +# define GL_SYNC_CL_EVENT_ARB 0x8240 +# define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 +typedef GLsync( APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC )( struct _cl_context *context, + struct _cl_event * event, + GLbitfield flags ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB( struct _cl_context *context, struct _cl_event *event, + GLbitfield flags ); +# endif #endif /* GL_ARB_cl_event */ #ifndef GL_ARB_clear_buffer_object -#define GL_ARB_clear_buffer_object 1 +# define GL_ARB_clear_buffer_object 1 #endif /* GL_ARB_clear_buffer_object */ #ifndef GL_ARB_clear_texture -#define GL_ARB_clear_texture 1 +# define GL_ARB_clear_texture 1 #endif /* GL_ARB_clear_texture */ #ifndef GL_ARB_clip_control -#define GL_ARB_clip_control 1 +# define GL_ARB_clip_control 1 #endif /* GL_ARB_clip_control */ #ifndef GL_ARB_compressed_texture_pixel_storage -#define GL_ARB_compressed_texture_pixel_storage 1 +# define GL_ARB_compressed_texture_pixel_storage 1 #endif /* GL_ARB_compressed_texture_pixel_storage */ #ifndef GL_ARB_compute_shader -#define GL_ARB_compute_shader 1 +# define GL_ARB_compute_shader 1 #endif /* GL_ARB_compute_shader */ #ifndef GL_ARB_compute_variable_group_size -#define GL_ARB_compute_variable_group_size 1 -#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344 -#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB -#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345 -#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z); -#endif +# define GL_ARB_compute_variable_group_size 1 +# define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344 +# define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB +# define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345 +# define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF +typedef void( APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC )( GLuint num_groups_x, GLuint num_groups_y, + GLuint num_groups_z, GLuint group_size_x, + GLuint group_size_y, + GLuint group_size_z ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDispatchComputeGroupSizeARB( GLuint num_groups_x, GLuint num_groups_y, + GLuint num_groups_z, GLuint group_size_x, + GLuint group_size_y, GLuint group_size_z ); +# endif #endif /* GL_ARB_compute_variable_group_size */ #ifndef GL_ARB_conditional_render_inverted -#define GL_ARB_conditional_render_inverted 1 +# define GL_ARB_conditional_render_inverted 1 #endif /* GL_ARB_conditional_render_inverted */ #ifndef GL_ARB_conservative_depth -#define GL_ARB_conservative_depth 1 +# define GL_ARB_conservative_depth 1 #endif /* GL_ARB_conservative_depth */ #ifndef GL_ARB_copy_buffer -#define GL_ARB_copy_buffer 1 +# define GL_ARB_copy_buffer 1 #endif /* GL_ARB_copy_buffer */ #ifndef GL_ARB_copy_image -#define GL_ARB_copy_image 1 +# define GL_ARB_copy_image 1 #endif /* GL_ARB_copy_image */ #ifndef GL_ARB_cull_distance -#define GL_ARB_cull_distance 1 +# define GL_ARB_cull_distance 1 #endif /* GL_ARB_cull_distance */ #ifndef GL_ARB_debug_output -#define GL_ARB_debug_output 1 -typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 -#define GL_DEBUG_SOURCE_API_ARB 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A -#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B -#define GL_DEBUG_TYPE_ERROR_ARB 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E -#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 -#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 -#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 -#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -#endif +# define GL_ARB_debug_output 1 +typedef void( APIENTRY *GLDEBUGPROCARB )( GLenum source, GLenum type, GLuint id, GLenum severity, + GLsizei length, const GLchar *message, const void *userParam ); +# define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 +# define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 +# define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 +# define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 +# define GL_DEBUG_SOURCE_API_ARB 0x8246 +# define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 +# define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 +# define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 +# define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A +# define GL_DEBUG_SOURCE_OTHER_ARB 0x824B +# define GL_DEBUG_TYPE_ERROR_ARB 0x824C +# define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D +# define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E +# define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F +# define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 +# define GL_DEBUG_TYPE_OTHER_ARB 0x8251 +# define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 +# define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 +# define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 +# define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 +# define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 +# define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 +typedef void( APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC )( GLenum source, GLenum type, GLenum severity, + GLsizei count, const GLuint *ids, + GLboolean enabled ); +typedef void( APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC )( GLenum source, GLenum type, GLuint id, + GLenum severity, GLsizei length, + const GLchar *buf ); +typedef void( APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC )( GLDEBUGPROCARB callback, + const void * userParam ); +typedef GLuint( APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC )( GLuint count, GLsizei bufSize, + GLenum *sources, GLenum *types, GLuint *ids, + GLenum *severities, GLsizei *lengths, + GLchar *messageLog ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageControlARB( GLenum source, GLenum type, GLenum severity, GLsizei count, + const GLuint *ids, GLboolean enabled ); +GLAPI void APIENTRY glDebugMessageInsertARB( GLenum source, GLenum type, GLuint id, GLenum severity, + GLsizei length, const GLchar *buf ); +GLAPI void APIENTRY glDebugMessageCallbackARB( GLDEBUGPROCARB callback, const void *userParam ); +GLAPI GLuint APIENTRY glGetDebugMessageLogARB( GLuint count, GLsizei bufSize, GLenum *sources, + GLenum *types, GLuint *ids, GLenum *severities, + GLsizei *lengths, GLchar *messageLog ); +# endif #endif /* GL_ARB_debug_output */ #ifndef GL_ARB_depth_buffer_float -#define GL_ARB_depth_buffer_float 1 +# define GL_ARB_depth_buffer_float 1 #endif /* GL_ARB_depth_buffer_float */ #ifndef GL_ARB_depth_clamp -#define GL_ARB_depth_clamp 1 +# define GL_ARB_depth_clamp 1 #endif /* GL_ARB_depth_clamp */ #ifndef GL_ARB_derivative_control -#define GL_ARB_derivative_control 1 +# define GL_ARB_derivative_control 1 #endif /* GL_ARB_derivative_control */ #ifndef GL_ARB_direct_state_access -#define GL_ARB_direct_state_access 1 +# define GL_ARB_direct_state_access 1 #endif /* GL_ARB_direct_state_access */ #ifndef GL_ARB_draw_buffers_blend -#define GL_ARB_draw_buffers_blend 1 -typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif +# define GL_ARB_draw_buffers_blend 1 +typedef void( APIENTRYP PFNGLBLENDEQUATIONIARBPROC )( GLuint buf, GLenum mode ); +typedef void( APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC )( GLuint buf, GLenum modeRGB, + GLenum modeAlpha ); +typedef void( APIENTRYP PFNGLBLENDFUNCIARBPROC )( GLuint buf, GLenum src, GLenum dst ); +typedef void( APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC )( GLuint buf, GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationiARB( GLuint buf, GLenum mode ); +GLAPI void APIENTRY glBlendEquationSeparateiARB( GLuint buf, GLenum modeRGB, GLenum modeAlpha ); +GLAPI void APIENTRY glBlendFunciARB( GLuint buf, GLenum src, GLenum dst ); +GLAPI void APIENTRY glBlendFuncSeparateiARB( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, + GLenum dstAlpha ); +# endif #endif /* GL_ARB_draw_buffers_blend */ #ifndef GL_ARB_draw_elements_base_vertex -#define GL_ARB_draw_elements_base_vertex 1 +# define GL_ARB_draw_elements_base_vertex 1 #endif /* GL_ARB_draw_elements_base_vertex */ #ifndef GL_ARB_draw_indirect -#define GL_ARB_draw_indirect 1 +# define GL_ARB_draw_indirect 1 #endif /* GL_ARB_draw_indirect */ #ifndef GL_ARB_draw_instanced -#define GL_ARB_draw_instanced 1 -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#endif +# define GL_ARB_draw_instanced 1 +typedef void( APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC )( GLenum mode, GLint first, GLsizei count, + GLsizei primcount ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC )( GLenum mode, GLsizei count, GLenum type, + const void *indices, GLsizei primcount ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedARB( GLenum mode, GLint first, GLsizei count, + GLsizei primcount ); +GLAPI void APIENTRY glDrawElementsInstancedARB( GLenum mode, GLsizei count, GLenum type, + const void *indices, GLsizei primcount ); +# endif #endif /* GL_ARB_draw_instanced */ #ifndef GL_ARB_enhanced_layouts -#define GL_ARB_enhanced_layouts 1 +# define GL_ARB_enhanced_layouts 1 #endif /* GL_ARB_enhanced_layouts */ #ifndef GL_ARB_explicit_attrib_location -#define GL_ARB_explicit_attrib_location 1 +# define GL_ARB_explicit_attrib_location 1 #endif /* GL_ARB_explicit_attrib_location */ #ifndef GL_ARB_explicit_uniform_location -#define GL_ARB_explicit_uniform_location 1 +# define GL_ARB_explicit_uniform_location 1 #endif /* GL_ARB_explicit_uniform_location */ #ifndef GL_ARB_fragment_coord_conventions -#define GL_ARB_fragment_coord_conventions 1 +# define GL_ARB_fragment_coord_conventions 1 #endif /* GL_ARB_fragment_coord_conventions */ #ifndef GL_ARB_fragment_layer_viewport -#define GL_ARB_fragment_layer_viewport 1 +# define GL_ARB_fragment_layer_viewport 1 #endif /* GL_ARB_fragment_layer_viewport */ #ifndef GL_ARB_fragment_shader_interlock -#define GL_ARB_fragment_shader_interlock 1 +# define GL_ARB_fragment_shader_interlock 1 #endif /* GL_ARB_fragment_shader_interlock */ #ifndef GL_ARB_framebuffer_no_attachments -#define GL_ARB_framebuffer_no_attachments 1 +# define GL_ARB_framebuffer_no_attachments 1 #endif /* GL_ARB_framebuffer_no_attachments */ #ifndef GL_ARB_framebuffer_object -#define GL_ARB_framebuffer_object 1 +# define GL_ARB_framebuffer_object 1 #endif /* GL_ARB_framebuffer_object */ #ifndef GL_ARB_framebuffer_sRGB -#define GL_ARB_framebuffer_sRGB 1 +# define GL_ARB_framebuffer_sRGB 1 #endif /* GL_ARB_framebuffer_sRGB */ #ifndef GL_ARB_geometry_shader4 -#define GL_ARB_geometry_shader4 1 -#define GL_LINES_ADJACENCY_ARB 0x000A -#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B -#define GL_TRIANGLES_ADJACENCY_ARB 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D -#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 -#define GL_GEOMETRY_SHADER_ARB 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA -#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB -#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD -#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value); -GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif +# define GL_ARB_geometry_shader4 1 +# define GL_LINES_ADJACENCY_ARB 0x000A +# define GL_LINE_STRIP_ADJACENCY_ARB 0x000B +# define GL_TRIANGLES_ADJACENCY_ARB 0x000C +# define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D +# define GL_PROGRAM_POINT_SIZE_ARB 0x8642 +# define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 +# define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 +# define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 +# define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 +# define GL_GEOMETRY_SHADER_ARB 0x8DD9 +# define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA +# define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB +# define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC +# define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD +# define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE +# define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF +# define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 +# define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 +typedef void( APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC )( GLuint program, GLenum pname, GLint value ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level, + GLint layer ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level, GLenum face ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriARB( GLuint program, GLenum pname, GLint value ); +GLAPI void APIENTRY glFramebufferTextureARB( GLenum target, GLenum attachment, GLuint texture, + GLint level ); +GLAPI void APIENTRY glFramebufferTextureLayerARB( GLenum target, GLenum attachment, GLuint texture, + GLint level, GLint layer ); +GLAPI void APIENTRY glFramebufferTextureFaceARB( GLenum target, GLenum attachment, GLuint texture, + GLint level, GLenum face ); +# endif #endif /* GL_ARB_geometry_shader4 */ #ifndef GL_ARB_get_program_binary -#define GL_ARB_get_program_binary 1 +# define GL_ARB_get_program_binary 1 #endif /* GL_ARB_get_program_binary */ #ifndef GL_ARB_get_texture_sub_image -#define GL_ARB_get_texture_sub_image 1 +# define GL_ARB_get_texture_sub_image 1 #endif /* GL_ARB_get_texture_sub_image */ #ifndef GL_ARB_gl_spirv -#define GL_ARB_gl_spirv 1 -#define GL_SHADER_BINARY_FORMAT_SPIR_V_ARB 0x9551 -#define GL_SPIR_V_BINARY_ARB 0x9552 -typedef void (APIENTRYP PFNGLSPECIALIZESHADERARBPROC) (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSpecializeShaderARB (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); -#endif +# define GL_ARB_gl_spirv 1 +# define GL_SHADER_BINARY_FORMAT_SPIR_V_ARB 0x9551 +# define GL_SPIR_V_BINARY_ARB 0x9552 +typedef void( APIENTRYP PFNGLSPECIALIZESHADERARBPROC )( GLuint shader, const GLchar *pEntryPoint, + GLuint numSpecializationConstants, + const GLuint *pConstantIndex, + const GLuint *pConstantValue ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpecializeShaderARB( GLuint shader, const GLchar *pEntryPoint, + GLuint numSpecializationConstants, + const GLuint *pConstantIndex, const GLuint *pConstantValue ); +# endif #endif /* GL_ARB_gl_spirv */ #ifndef GL_ARB_gpu_shader5 -#define GL_ARB_gpu_shader5 1 +# define GL_ARB_gpu_shader5 1 #endif /* GL_ARB_gpu_shader5 */ #ifndef GL_ARB_gpu_shader_fp64 -#define GL_ARB_gpu_shader_fp64 1 +# define GL_ARB_gpu_shader_fp64 1 #endif /* GL_ARB_gpu_shader_fp64 */ #ifndef GL_ARB_gpu_shader_int64 -#define GL_ARB_gpu_shader_int64 1 -#define GL_INT64_ARB 0x140E -#define GL_INT64_VEC2_ARB 0x8FE9 -#define GL_INT64_VEC3_ARB 0x8FEA -#define GL_INT64_VEC4_ARB 0x8FEB -#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5 -#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6 -#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7 -typedef void (APIENTRYP PFNGLUNIFORM1I64ARBPROC) (GLint location, GLint64 x); -typedef void (APIENTRYP PFNGLUNIFORM2I64ARBPROC) (GLint location, GLint64 x, GLint64 y); -typedef void (APIENTRYP PFNGLUNIFORM3I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z); -typedef void (APIENTRYP PFNGLUNIFORM4I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); -typedef void (APIENTRYP PFNGLUNIFORM1I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); -typedef void (APIENTRYP PFNGLUNIFORM2I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); -typedef void (APIENTRYP PFNGLUNIFORM3I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); -typedef void (APIENTRYP PFNGLUNIFORM4I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); -typedef void (APIENTRYP PFNGLUNIFORM1UI64ARBPROC) (GLint location, GLuint64 x); -typedef void (APIENTRYP PFNGLUNIFORM2UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y); -typedef void (APIENTRYP PFNGLUNIFORM3UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z); -typedef void (APIENTRYP PFNGLUNIFORM4UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); -typedef void (APIENTRYP PFNGLUNIFORM1UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLUNIFORM2UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLUNIFORM3UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLUNIFORM4UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLGETUNIFORMI64VARBPROC) (GLuint program, GLint location, GLint64 *params); -typedef void (APIENTRYP PFNGLGETUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLuint64 *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint64 *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64ARBPROC) (GLuint program, GLint location, GLint64 x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64ARBPROC) (GLuint program, GLint location, GLuint64 x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniform1i64ARB (GLint location, GLint64 x); -GLAPI void APIENTRY glUniform2i64ARB (GLint location, GLint64 x, GLint64 y); -GLAPI void APIENTRY glUniform3i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z); -GLAPI void APIENTRY glUniform4i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); -GLAPI void APIENTRY glUniform1i64vARB (GLint location, GLsizei count, const GLint64 *value); -GLAPI void APIENTRY glUniform2i64vARB (GLint location, GLsizei count, const GLint64 *value); -GLAPI void APIENTRY glUniform3i64vARB (GLint location, GLsizei count, const GLint64 *value); -GLAPI void APIENTRY glUniform4i64vARB (GLint location, GLsizei count, const GLint64 *value); -GLAPI void APIENTRY glUniform1ui64ARB (GLint location, GLuint64 x); -GLAPI void APIENTRY glUniform2ui64ARB (GLint location, GLuint64 x, GLuint64 y); -GLAPI void APIENTRY glUniform3ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z); -GLAPI void APIENTRY glUniform4ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); -GLAPI void APIENTRY glUniform1ui64vARB (GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glUniform2ui64vARB (GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glUniform3ui64vARB (GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glUniform4ui64vARB (GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glGetUniformi64vARB (GLuint program, GLint location, GLint64 *params); -GLAPI void APIENTRY glGetUniformui64vARB (GLuint program, GLint location, GLuint64 *params); -GLAPI void APIENTRY glGetnUniformi64vARB (GLuint program, GLint location, GLsizei bufSize, GLint64 *params); -GLAPI void APIENTRY glGetnUniformui64vARB (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params); -GLAPI void APIENTRY glProgramUniform1i64ARB (GLuint program, GLint location, GLint64 x); -GLAPI void APIENTRY glProgramUniform2i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y); -GLAPI void APIENTRY glProgramUniform3i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z); -GLAPI void APIENTRY glProgramUniform4i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); -GLAPI void APIENTRY glProgramUniform1i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); -GLAPI void APIENTRY glProgramUniform2i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); -GLAPI void APIENTRY glProgramUniform3i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); -GLAPI void APIENTRY glProgramUniform4i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); -GLAPI void APIENTRY glProgramUniform1ui64ARB (GLuint program, GLint location, GLuint64 x); -GLAPI void APIENTRY glProgramUniform2ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y); -GLAPI void APIENTRY glProgramUniform3ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z); -GLAPI void APIENTRY glProgramUniform4ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); -GLAPI void APIENTRY glProgramUniform1ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glProgramUniform2ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glProgramUniform3ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glProgramUniform4ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); -#endif +# define GL_ARB_gpu_shader_int64 1 +# define GL_INT64_ARB 0x140E +# define GL_INT64_VEC2_ARB 0x8FE9 +# define GL_INT64_VEC3_ARB 0x8FEA +# define GL_INT64_VEC4_ARB 0x8FEB +# define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5 +# define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6 +# define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7 +typedef void( APIENTRYP PFNGLUNIFORM1I64ARBPROC )( GLint location, GLint64 x ); +typedef void( APIENTRYP PFNGLUNIFORM2I64ARBPROC )( GLint location, GLint64 x, GLint64 y ); +typedef void( APIENTRYP PFNGLUNIFORM3I64ARBPROC )( GLint location, GLint64 x, GLint64 y, GLint64 z ); +typedef void( APIENTRYP PFNGLUNIFORM4I64ARBPROC )( GLint location, GLint64 x, GLint64 y, GLint64 z, + GLint64 w ); +typedef void( APIENTRYP PFNGLUNIFORM1I64VARBPROC )( GLint location, GLsizei count, + const GLint64 *value ); +typedef void( APIENTRYP PFNGLUNIFORM2I64VARBPROC )( GLint location, GLsizei count, + const GLint64 *value ); +typedef void( APIENTRYP PFNGLUNIFORM3I64VARBPROC )( GLint location, GLsizei count, + const GLint64 *value ); +typedef void( APIENTRYP PFNGLUNIFORM4I64VARBPROC )( GLint location, GLsizei count, + const GLint64 *value ); +typedef void( APIENTRYP PFNGLUNIFORM1UI64ARBPROC )( GLint location, GLuint64 x ); +typedef void( APIENTRYP PFNGLUNIFORM2UI64ARBPROC )( GLint location, GLuint64 x, GLuint64 y ); +typedef void( APIENTRYP PFNGLUNIFORM3UI64ARBPROC )( GLint location, GLuint64 x, GLuint64 y, GLuint64 z ); +typedef void( APIENTRYP PFNGLUNIFORM4UI64ARBPROC )( GLint location, GLuint64 x, GLuint64 y, GLuint64 z, + GLuint64 w ); +typedef void( APIENTRYP PFNGLUNIFORM1UI64VARBPROC )( GLint location, GLsizei count, + const GLuint64 *value ); +typedef void( APIENTRYP PFNGLUNIFORM2UI64VARBPROC )( GLint location, GLsizei count, + const GLuint64 *value ); +typedef void( APIENTRYP PFNGLUNIFORM3UI64VARBPROC )( GLint location, GLsizei count, + const GLuint64 *value ); +typedef void( APIENTRYP PFNGLUNIFORM4UI64VARBPROC )( GLint location, GLsizei count, + const GLuint64 *value ); +typedef void( APIENTRYP PFNGLGETUNIFORMI64VARBPROC )( GLuint program, GLint location, GLint64 *params ); +typedef void( APIENTRYP PFNGLGETUNIFORMUI64VARBPROC )( GLuint program, GLint location, + GLuint64 *params ); +typedef void( APIENTRYP PFNGLGETNUNIFORMI64VARBPROC )( GLuint program, GLint location, GLsizei bufSize, + GLint64 *params ); +typedef void( APIENTRYP PFNGLGETNUNIFORMUI64VARBPROC )( GLuint program, GLint location, GLsizei bufSize, + GLuint64 *params ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1I64ARBPROC )( GLuint program, GLint location, GLint64 x ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2I64ARBPROC )( GLuint program, GLint location, GLint64 x, + GLint64 y ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3I64ARBPROC )( GLuint program, GLint location, GLint64 x, + GLint64 y, GLint64 z ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4I64ARBPROC )( GLuint program, GLint location, GLint64 x, + GLint64 y, GLint64 z, GLint64 w ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1I64VARBPROC )( GLuint program, GLint location, GLsizei count, + const GLint64 *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2I64VARBPROC )( GLuint program, GLint location, GLsizei count, + const GLint64 *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3I64VARBPROC )( GLuint program, GLint location, GLsizei count, + const GLint64 *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4I64VARBPROC )( GLuint program, GLint location, GLsizei count, + const GLint64 *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UI64ARBPROC )( GLuint program, GLint location, GLuint64 x ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UI64ARBPROC )( GLuint program, GLint location, GLuint64 x, + GLuint64 y ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UI64ARBPROC )( GLuint program, GLint location, GLuint64 x, + GLuint64 y, GLuint64 z ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UI64ARBPROC )( GLuint program, GLint location, GLuint64 x, + GLuint64 y, GLuint64 z, GLuint64 w ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UI64VARBPROC )( GLuint program, GLint location, + GLsizei count, const GLuint64 *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UI64VARBPROC )( GLuint program, GLint location, + GLsizei count, const GLuint64 *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UI64VARBPROC )( GLuint program, GLint location, + GLsizei count, const GLuint64 *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UI64VARBPROC )( GLuint program, GLint location, + GLsizei count, const GLuint64 *value ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64ARB( GLint location, GLint64 x ); +GLAPI void APIENTRY glUniform2i64ARB( GLint location, GLint64 x, GLint64 y ); +GLAPI void APIENTRY glUniform3i64ARB( GLint location, GLint64 x, GLint64 y, GLint64 z ); +GLAPI void APIENTRY glUniform4i64ARB( GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w ); +GLAPI void APIENTRY glUniform1i64vARB( GLint location, GLsizei count, const GLint64 *value ); +GLAPI void APIENTRY glUniform2i64vARB( GLint location, GLsizei count, const GLint64 *value ); +GLAPI void APIENTRY glUniform3i64vARB( GLint location, GLsizei count, const GLint64 *value ); +GLAPI void APIENTRY glUniform4i64vARB( GLint location, GLsizei count, const GLint64 *value ); +GLAPI void APIENTRY glUniform1ui64ARB( GLint location, GLuint64 x ); +GLAPI void APIENTRY glUniform2ui64ARB( GLint location, GLuint64 x, GLuint64 y ); +GLAPI void APIENTRY glUniform3ui64ARB( GLint location, GLuint64 x, GLuint64 y, GLuint64 z ); +GLAPI void APIENTRY glUniform4ui64ARB( GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w ); +GLAPI void APIENTRY glUniform1ui64vARB( GLint location, GLsizei count, const GLuint64 *value ); +GLAPI void APIENTRY glUniform2ui64vARB( GLint location, GLsizei count, const GLuint64 *value ); +GLAPI void APIENTRY glUniform3ui64vARB( GLint location, GLsizei count, const GLuint64 *value ); +GLAPI void APIENTRY glUniform4ui64vARB( GLint location, GLsizei count, const GLuint64 *value ); +GLAPI void APIENTRY glGetUniformi64vARB( GLuint program, GLint location, GLint64 *params ); +GLAPI void APIENTRY glGetUniformui64vARB( GLuint program, GLint location, GLuint64 *params ); +GLAPI void APIENTRY glGetnUniformi64vARB( GLuint program, GLint location, GLsizei bufSize, + GLint64 *params ); +GLAPI void APIENTRY glGetnUniformui64vARB( GLuint program, GLint location, GLsizei bufSize, + GLuint64 *params ); +GLAPI void APIENTRY glProgramUniform1i64ARB( GLuint program, GLint location, GLint64 x ); +GLAPI void APIENTRY glProgramUniform2i64ARB( GLuint program, GLint location, GLint64 x, GLint64 y ); +GLAPI void APIENTRY glProgramUniform3i64ARB( GLuint program, GLint location, GLint64 x, GLint64 y, + GLint64 z ); +GLAPI void APIENTRY glProgramUniform4i64ARB( GLuint program, GLint location, GLint64 x, GLint64 y, + GLint64 z, GLint64 w ); +GLAPI void APIENTRY glProgramUniform1i64vARB( GLuint program, GLint location, GLsizei count, + const GLint64 *value ); +GLAPI void APIENTRY glProgramUniform2i64vARB( GLuint program, GLint location, GLsizei count, + const GLint64 *value ); +GLAPI void APIENTRY glProgramUniform3i64vARB( GLuint program, GLint location, GLsizei count, + const GLint64 *value ); +GLAPI void APIENTRY glProgramUniform4i64vARB( GLuint program, GLint location, GLsizei count, + const GLint64 *value ); +GLAPI void APIENTRY glProgramUniform1ui64ARB( GLuint program, GLint location, GLuint64 x ); +GLAPI void APIENTRY glProgramUniform2ui64ARB( GLuint program, GLint location, GLuint64 x, GLuint64 y ); +GLAPI void APIENTRY glProgramUniform3ui64ARB( GLuint program, GLint location, GLuint64 x, GLuint64 y, + GLuint64 z ); +GLAPI void APIENTRY glProgramUniform4ui64ARB( GLuint program, GLint location, GLuint64 x, GLuint64 y, + GLuint64 z, GLuint64 w ); +GLAPI void APIENTRY glProgramUniform1ui64vARB( GLuint program, GLint location, GLsizei count, + const GLuint64 *value ); +GLAPI void APIENTRY glProgramUniform2ui64vARB( GLuint program, GLint location, GLsizei count, + const GLuint64 *value ); +GLAPI void APIENTRY glProgramUniform3ui64vARB( GLuint program, GLint location, GLsizei count, + const GLuint64 *value ); +GLAPI void APIENTRY glProgramUniform4ui64vARB( GLuint program, GLint location, GLsizei count, + const GLuint64 *value ); +# endif #endif /* GL_ARB_gpu_shader_int64 */ #ifndef GL_ARB_half_float_vertex -#define GL_ARB_half_float_vertex 1 +# define GL_ARB_half_float_vertex 1 #endif /* GL_ARB_half_float_vertex */ #ifndef GL_ARB_imaging -#define GL_ARB_imaging 1 -#define GL_BLEND_COLOR 0x8005 -#define GL_BLEND_EQUATION 0x8009 +# define GL_ARB_imaging 1 +# define GL_BLEND_COLOR 0x8005 +# define GL_BLEND_EQUATION 0x8009 #endif /* GL_ARB_imaging */ #ifndef GL_ARB_indirect_parameters -#define GL_ARB_indirect_parameters 1 -#define GL_PARAMETER_BUFFER_ARB 0x80EE -#define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -#endif +# define GL_ARB_indirect_parameters 1 +# define GL_PARAMETER_BUFFER_ARB 0x80EE +# define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF +typedef void( APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC )( GLenum mode, GLintptr indirect, + GLintptr drawcount, + GLsizei maxdrawcount, + GLsizei stride ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC )( GLenum mode, GLenum type, + GLintptr indirect, + GLintptr drawcount, + GLsizei maxdrawcount, + GLsizei stride ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB( GLenum mode, GLintptr indirect, + GLintptr drawcount, GLsizei maxdrawcount, + GLsizei stride ); +GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB( GLenum mode, GLenum type, GLintptr indirect, + GLintptr drawcount, GLsizei maxdrawcount, + GLsizei stride ); +# endif #endif /* GL_ARB_indirect_parameters */ #ifndef GL_ARB_instanced_arrays -#define GL_ARB_instanced_arrays 1 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor); -#endif +# define GL_ARB_instanced_arrays 1 +# define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE +typedef void( APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC )( GLuint index, GLuint divisor ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisorARB( GLuint index, GLuint divisor ); +# endif #endif /* GL_ARB_instanced_arrays */ #ifndef GL_ARB_internalformat_query -#define GL_ARB_internalformat_query 1 +# define GL_ARB_internalformat_query 1 #endif /* GL_ARB_internalformat_query */ #ifndef GL_ARB_internalformat_query2 -#define GL_ARB_internalformat_query2 1 -#define GL_SRGB_DECODE_ARB 0x8299 +# define GL_ARB_internalformat_query2 1 +# define GL_SRGB_DECODE_ARB 0x8299 #endif /* GL_ARB_internalformat_query2 */ #ifndef GL_ARB_invalidate_subdata -#define GL_ARB_invalidate_subdata 1 +# define GL_ARB_invalidate_subdata 1 #endif /* GL_ARB_invalidate_subdata */ #ifndef GL_ARB_map_buffer_alignment -#define GL_ARB_map_buffer_alignment 1 +# define GL_ARB_map_buffer_alignment 1 #endif /* GL_ARB_map_buffer_alignment */ #ifndef GL_ARB_map_buffer_range -#define GL_ARB_map_buffer_range 1 +# define GL_ARB_map_buffer_range 1 #endif /* GL_ARB_map_buffer_range */ #ifndef GL_ARB_multi_bind -#define GL_ARB_multi_bind 1 +# define GL_ARB_multi_bind 1 #endif /* GL_ARB_multi_bind */ #ifndef GL_ARB_multi_draw_indirect -#define GL_ARB_multi_draw_indirect 1 +# define GL_ARB_multi_draw_indirect 1 #endif /* GL_ARB_multi_draw_indirect */ #ifndef GL_ARB_occlusion_query2 -#define GL_ARB_occlusion_query2 1 +# define GL_ARB_occlusion_query2 1 #endif /* GL_ARB_occlusion_query2 */ #ifndef GL_ARB_parallel_shader_compile -#define GL_ARB_parallel_shader_compile 1 -#define GL_MAX_SHADER_COMPILER_THREADS_ARB 0x91B0 -#define GL_COMPLETION_STATUS_ARB 0x91B1 -typedef void (APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSARBPROC) (GLuint count); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMaxShaderCompilerThreadsARB (GLuint count); -#endif +# define GL_ARB_parallel_shader_compile 1 +# define GL_MAX_SHADER_COMPILER_THREADS_ARB 0x91B0 +# define GL_COMPLETION_STATUS_ARB 0x91B1 +typedef void( APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSARBPROC )( GLuint count ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMaxShaderCompilerThreadsARB( GLuint count ); +# endif #endif /* GL_ARB_parallel_shader_compile */ #ifndef GL_ARB_pipeline_statistics_query -#define GL_ARB_pipeline_statistics_query 1 -#define GL_VERTICES_SUBMITTED_ARB 0x82EE -#define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF -#define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0 -#define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1 -#define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2 -#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3 -#define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4 -#define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5 -#define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6 -#define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7 +# define GL_ARB_pipeline_statistics_query 1 +# define GL_VERTICES_SUBMITTED_ARB 0x82EE +# define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF +# define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0 +# define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1 +# define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2 +# define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3 +# define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4 +# define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5 +# define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6 +# define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7 #endif /* GL_ARB_pipeline_statistics_query */ #ifndef GL_ARB_pixel_buffer_object -#define GL_ARB_pixel_buffer_object 1 -#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF +# define GL_ARB_pixel_buffer_object 1 +# define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +# define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +# define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +# define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF #endif /* GL_ARB_pixel_buffer_object */ #ifndef GL_ARB_post_depth_coverage -#define GL_ARB_post_depth_coverage 1 +# define GL_ARB_post_depth_coverage 1 #endif /* GL_ARB_post_depth_coverage */ #ifndef GL_ARB_program_interface_query -#define GL_ARB_program_interface_query 1 +# define GL_ARB_program_interface_query 1 #endif /* GL_ARB_program_interface_query */ #ifndef GL_ARB_provoking_vertex -#define GL_ARB_provoking_vertex 1 +# define GL_ARB_provoking_vertex 1 #endif /* GL_ARB_provoking_vertex */ #ifndef GL_ARB_query_buffer_object -#define GL_ARB_query_buffer_object 1 +# define GL_ARB_query_buffer_object 1 #endif /* GL_ARB_query_buffer_object */ #ifndef GL_ARB_robust_buffer_access_behavior -#define GL_ARB_robust_buffer_access_behavior 1 +# define GL_ARB_robust_buffer_access_behavior 1 #endif /* GL_ARB_robust_buffer_access_behavior */ #ifndef GL_ARB_robustness -#define GL_ARB_robustness 1 -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 -#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 -#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 -typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); -typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img); -typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img); -typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); -GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img); -GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img); -GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); -GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -#endif +# define GL_ARB_robustness 1 +# define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 +# define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +# define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 +# define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 +# define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 +# define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +# define GL_NO_RESET_NOTIFICATION_ARB 0x8261 +typedef GLenum( APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC )( void ); +typedef void( APIENTRYP PFNGLGETNTEXIMAGEARBPROC )( GLenum target, GLint level, GLenum format, + GLenum type, GLsizei bufSize, void *img ); +typedef void( APIENTRYP PFNGLREADNPIXELSARBPROC )( GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, GLsizei bufSize, + void *data ); +typedef void( APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC )( GLenum target, GLint lod, GLsizei bufSize, + void *img ); +typedef void( APIENTRYP PFNGLGETNUNIFORMFVARBPROC )( GLuint program, GLint location, GLsizei bufSize, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETNUNIFORMIVARBPROC )( GLuint program, GLint location, GLsizei bufSize, + GLint *params ); +typedef void( APIENTRYP PFNGLGETNUNIFORMUIVARBPROC )( GLuint program, GLint location, GLsizei bufSize, + GLuint *params ); +typedef void( APIENTRYP PFNGLGETNUNIFORMDVARBPROC )( GLuint program, GLint location, GLsizei bufSize, + GLdouble *params ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB( void ); +GLAPI void APIENTRY glGetnTexImageARB( GLenum target, GLint level, GLenum format, GLenum type, + GLsizei bufSize, void *img ); +GLAPI void APIENTRY glReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, + GLenum type, GLsizei bufSize, void *data ); +GLAPI void APIENTRY glGetnCompressedTexImageARB( GLenum target, GLint lod, GLsizei bufSize, void *img ); +GLAPI void APIENTRY glGetnUniformfvARB( GLuint program, GLint location, GLsizei bufSize, + GLfloat *params ); +GLAPI void APIENTRY glGetnUniformivARB( GLuint program, GLint location, GLsizei bufSize, GLint *params ); +GLAPI void APIENTRY glGetnUniformuivARB( GLuint program, GLint location, GLsizei bufSize, + GLuint *params ); +GLAPI void APIENTRY glGetnUniformdvARB( GLuint program, GLint location, GLsizei bufSize, + GLdouble *params ); +# endif #endif /* GL_ARB_robustness */ #ifndef GL_ARB_robustness_isolation -#define GL_ARB_robustness_isolation 1 +# define GL_ARB_robustness_isolation 1 #endif /* GL_ARB_robustness_isolation */ #ifndef GL_ARB_sample_locations -#define GL_ARB_sample_locations 1 -#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB 0x933D -#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB 0x933E -#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB 0x933F -#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB 0x9340 -#define GL_SAMPLE_LOCATION_ARB 0x8E50 -#define GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB 0x9341 -#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB 0x9342 -#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB 0x9343 -typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLEVALUATEDEPTHVALUESARBPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFramebufferSampleLocationsfvARB (GLenum target, GLuint start, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvARB (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glEvaluateDepthValuesARB (void); -#endif +# define GL_ARB_sample_locations 1 +# define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB 0x933D +# define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB 0x933E +# define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB 0x933F +# define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB 0x9340 +# define GL_SAMPLE_LOCATION_ARB 0x8E50 +# define GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB 0x9341 +# define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB 0x9342 +# define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB 0x9343 +typedef void( APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC )( GLenum target, GLuint start, + GLsizei count, const GLfloat *v ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC )( GLuint framebuffer, + GLuint start, GLsizei count, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLEVALUATEDEPTHVALUESARBPROC )( void ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferSampleLocationsfvARB( GLenum target, GLuint start, GLsizei count, + const GLfloat *v ); +GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvARB( GLuint framebuffer, GLuint start, + GLsizei count, const GLfloat *v ); +GLAPI void APIENTRY glEvaluateDepthValuesARB( void ); +# endif #endif /* GL_ARB_sample_locations */ #ifndef GL_ARB_sample_shading -#define GL_ARB_sample_shading 1 -#define GL_SAMPLE_SHADING_ARB 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value); -#endif +# define GL_ARB_sample_shading 1 +# define GL_SAMPLE_SHADING_ARB 0x8C36 +# define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 +typedef void( APIENTRYP PFNGLMINSAMPLESHADINGARBPROC )( GLfloat value ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShadingARB( GLfloat value ); +# endif #endif /* GL_ARB_sample_shading */ #ifndef GL_ARB_sampler_objects -#define GL_ARB_sampler_objects 1 +# define GL_ARB_sampler_objects 1 #endif /* GL_ARB_sampler_objects */ #ifndef GL_ARB_seamless_cube_map -#define GL_ARB_seamless_cube_map 1 +# define GL_ARB_seamless_cube_map 1 #endif /* GL_ARB_seamless_cube_map */ #ifndef GL_ARB_seamless_cubemap_per_texture -#define GL_ARB_seamless_cubemap_per_texture 1 +# define GL_ARB_seamless_cubemap_per_texture 1 #endif /* GL_ARB_seamless_cubemap_per_texture */ #ifndef GL_ARB_separate_shader_objects -#define GL_ARB_separate_shader_objects 1 +# define GL_ARB_separate_shader_objects 1 #endif /* GL_ARB_separate_shader_objects */ #ifndef GL_ARB_shader_atomic_counter_ops -#define GL_ARB_shader_atomic_counter_ops 1 +# define GL_ARB_shader_atomic_counter_ops 1 #endif /* GL_ARB_shader_atomic_counter_ops */ #ifndef GL_ARB_shader_atomic_counters -#define GL_ARB_shader_atomic_counters 1 +# define GL_ARB_shader_atomic_counters 1 #endif /* GL_ARB_shader_atomic_counters */ #ifndef GL_ARB_shader_ballot -#define GL_ARB_shader_ballot 1 +# define GL_ARB_shader_ballot 1 #endif /* GL_ARB_shader_ballot */ #ifndef GL_ARB_shader_bit_encoding -#define GL_ARB_shader_bit_encoding 1 +# define GL_ARB_shader_bit_encoding 1 #endif /* GL_ARB_shader_bit_encoding */ #ifndef GL_ARB_shader_clock -#define GL_ARB_shader_clock 1 +# define GL_ARB_shader_clock 1 #endif /* GL_ARB_shader_clock */ #ifndef GL_ARB_shader_draw_parameters -#define GL_ARB_shader_draw_parameters 1 +# define GL_ARB_shader_draw_parameters 1 #endif /* GL_ARB_shader_draw_parameters */ #ifndef GL_ARB_shader_group_vote -#define GL_ARB_shader_group_vote 1 +# define GL_ARB_shader_group_vote 1 #endif /* GL_ARB_shader_group_vote */ #ifndef GL_ARB_shader_image_load_store -#define GL_ARB_shader_image_load_store 1 +# define GL_ARB_shader_image_load_store 1 #endif /* GL_ARB_shader_image_load_store */ #ifndef GL_ARB_shader_image_size -#define GL_ARB_shader_image_size 1 +# define GL_ARB_shader_image_size 1 #endif /* GL_ARB_shader_image_size */ #ifndef GL_ARB_shader_precision -#define GL_ARB_shader_precision 1 +# define GL_ARB_shader_precision 1 #endif /* GL_ARB_shader_precision */ #ifndef GL_ARB_shader_stencil_export -#define GL_ARB_shader_stencil_export 1 +# define GL_ARB_shader_stencil_export 1 #endif /* GL_ARB_shader_stencil_export */ #ifndef GL_ARB_shader_storage_buffer_object -#define GL_ARB_shader_storage_buffer_object 1 +# define GL_ARB_shader_storage_buffer_object 1 #endif /* GL_ARB_shader_storage_buffer_object */ #ifndef GL_ARB_shader_subroutine -#define GL_ARB_shader_subroutine 1 +# define GL_ARB_shader_subroutine 1 #endif /* GL_ARB_shader_subroutine */ #ifndef GL_ARB_shader_texture_image_samples -#define GL_ARB_shader_texture_image_samples 1 +# define GL_ARB_shader_texture_image_samples 1 #endif /* GL_ARB_shader_texture_image_samples */ #ifndef GL_ARB_shader_viewport_layer_array -#define GL_ARB_shader_viewport_layer_array 1 +# define GL_ARB_shader_viewport_layer_array 1 #endif /* GL_ARB_shader_viewport_layer_array */ #ifndef GL_ARB_shading_language_420pack -#define GL_ARB_shading_language_420pack 1 +# define GL_ARB_shading_language_420pack 1 #endif /* GL_ARB_shading_language_420pack */ #ifndef GL_ARB_shading_language_include -#define GL_ARB_shading_language_include 1 -#define GL_SHADER_INCLUDE_ARB 0x8DAE -#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 -#define GL_NAMED_STRING_TYPE_ARB 0x8DEA -typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); -typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length); -typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); -typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); -typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); -GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name); -GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length); -GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name); -GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); -GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); -#endif +# define GL_ARB_shading_language_include 1 +# define GL_SHADER_INCLUDE_ARB 0x8DAE +# define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 +# define GL_NAMED_STRING_TYPE_ARB 0x8DEA +typedef void( APIENTRYP PFNGLNAMEDSTRINGARBPROC )( GLenum type, GLint namelen, const GLchar *name, + GLint stringlen, const GLchar *string ); +typedef void( APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC )( GLint namelen, const GLchar *name ); +typedef void( APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC )( GLuint shader, GLsizei count, + const GLchar *const *path, + const GLint * length ); +typedef GLboolean( APIENTRYP PFNGLISNAMEDSTRINGARBPROC )( GLint namelen, const GLchar *name ); +typedef void( APIENTRYP PFNGLGETNAMEDSTRINGARBPROC )( GLint namelen, const GLchar *name, GLsizei bufSize, + GLint *stringlen, GLchar *string ); +typedef void( APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC )( GLint namelen, const GLchar *name, GLenum pname, + GLint *params ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glNamedStringARB( GLenum type, GLint namelen, const GLchar *name, GLint stringlen, + const GLchar *string ); +GLAPI void APIENTRY glDeleteNamedStringARB( GLint namelen, const GLchar *name ); +GLAPI void APIENTRY glCompileShaderIncludeARB( GLuint shader, GLsizei count, const GLchar *const *path, + const GLint *length ); +GLAPI GLboolean APIENTRY glIsNamedStringARB( GLint namelen, const GLchar *name ); +GLAPI void APIENTRY glGetNamedStringARB( GLint namelen, const GLchar *name, GLsizei bufSize, + GLint *stringlen, GLchar *string ); +GLAPI void APIENTRY glGetNamedStringivARB( GLint namelen, const GLchar *name, GLenum pname, + GLint *params ); +# endif #endif /* GL_ARB_shading_language_include */ #ifndef GL_ARB_shading_language_packing -#define GL_ARB_shading_language_packing 1 +# define GL_ARB_shading_language_packing 1 #endif /* GL_ARB_shading_language_packing */ #ifndef GL_ARB_sparse_buffer -#define GL_ARB_sparse_buffer 1 -#define GL_SPARSE_STORAGE_BIT_ARB 0x0400 -#define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8 -typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTARBPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit); -typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); -typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferPageCommitmentARB (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit); -GLAPI void APIENTRY glNamedBufferPageCommitmentEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); -GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); -#endif +# define GL_ARB_sparse_buffer 1 +# define GL_SPARSE_STORAGE_BIT_ARB 0x0400 +# define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8 +typedef void( APIENTRYP PFNGLBUFFERPAGECOMMITMENTARBPROC )( GLenum target, GLintptr offset, + GLsizeiptr size, GLboolean commit ); +typedef void( APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr size, GLboolean commit ); +typedef void( APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr size, GLboolean commit ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferPageCommitmentARB( GLenum target, GLintptr offset, GLsizeiptr size, + GLboolean commit ); +GLAPI void APIENTRY glNamedBufferPageCommitmentEXT( GLuint buffer, GLintptr offset, GLsizeiptr size, + GLboolean commit ); +GLAPI void APIENTRY glNamedBufferPageCommitmentARB( GLuint buffer, GLintptr offset, GLsizeiptr size, + GLboolean commit ); +# endif #endif /* GL_ARB_sparse_buffer */ #ifndef GL_ARB_sparse_texture -#define GL_ARB_sparse_texture 1 -#define GL_TEXTURE_SPARSE_ARB 0x91A6 -#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7 -#define GL_NUM_SPARSE_LEVELS_ARB 0x91AA -#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8 -#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195 -#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196 -#define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197 -#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198 -#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199 -#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A -#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9 -typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); -#endif +# define GL_ARB_sparse_texture 1 +# define GL_TEXTURE_SPARSE_ARB 0x91A6 +# define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7 +# define GL_NUM_SPARSE_LEVELS_ARB 0x91AA +# define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8 +# define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195 +# define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196 +# define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197 +# define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198 +# define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199 +# define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A +# define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9 +typedef void( APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean commit ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexPageCommitmentARB( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLboolean commit ); +# endif #endif /* GL_ARB_sparse_texture */ #ifndef GL_ARB_sparse_texture2 -#define GL_ARB_sparse_texture2 1 +# define GL_ARB_sparse_texture2 1 #endif /* GL_ARB_sparse_texture2 */ #ifndef GL_ARB_sparse_texture_clamp -#define GL_ARB_sparse_texture_clamp 1 +# define GL_ARB_sparse_texture_clamp 1 #endif /* GL_ARB_sparse_texture_clamp */ #ifndef GL_ARB_stencil_texturing -#define GL_ARB_stencil_texturing 1 +# define GL_ARB_stencil_texturing 1 #endif /* GL_ARB_stencil_texturing */ #ifndef GL_ARB_sync -#define GL_ARB_sync 1 +# define GL_ARB_sync 1 #endif /* GL_ARB_sync */ #ifndef GL_ARB_tessellation_shader -#define GL_ARB_tessellation_shader 1 +# define GL_ARB_tessellation_shader 1 #endif /* GL_ARB_tessellation_shader */ #ifndef GL_ARB_texture_barrier -#define GL_ARB_texture_barrier 1 +# define GL_ARB_texture_barrier 1 #endif /* GL_ARB_texture_barrier */ #ifndef GL_ARB_texture_border_clamp -#define GL_ARB_texture_border_clamp 1 -#define GL_CLAMP_TO_BORDER_ARB 0x812D +# define GL_ARB_texture_border_clamp 1 +# define GL_CLAMP_TO_BORDER_ARB 0x812D #endif /* GL_ARB_texture_border_clamp */ #ifndef GL_ARB_texture_buffer_object -#define GL_ARB_texture_buffer_object 1 -#define GL_TEXTURE_BUFFER_ARB 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D -#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E -typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); -#endif +# define GL_ARB_texture_buffer_object 1 +# define GL_TEXTURE_BUFFER_ARB 0x8C2A +# define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B +# define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C +# define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D +# define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E +typedef void( APIENTRYP PFNGLTEXBUFFERARBPROC )( GLenum target, GLenum internalformat, GLuint buffer ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferARB( GLenum target, GLenum internalformat, GLuint buffer ); +# endif #endif /* GL_ARB_texture_buffer_object */ #ifndef GL_ARB_texture_buffer_object_rgb32 -#define GL_ARB_texture_buffer_object_rgb32 1 +# define GL_ARB_texture_buffer_object_rgb32 1 #endif /* GL_ARB_texture_buffer_object_rgb32 */ #ifndef GL_ARB_texture_buffer_range -#define GL_ARB_texture_buffer_range 1 +# define GL_ARB_texture_buffer_range 1 #endif /* GL_ARB_texture_buffer_range */ #ifndef GL_ARB_texture_compression_bptc -#define GL_ARB_texture_compression_bptc 1 -#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F +# define GL_ARB_texture_compression_bptc 1 +# define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C +# define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D +# define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E +# define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F #endif /* GL_ARB_texture_compression_bptc */ #ifndef GL_ARB_texture_compression_rgtc -#define GL_ARB_texture_compression_rgtc 1 +# define GL_ARB_texture_compression_rgtc 1 #endif /* GL_ARB_texture_compression_rgtc */ #ifndef GL_ARB_texture_cube_map_array -#define GL_ARB_texture_cube_map_array 1 -#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F +# define GL_ARB_texture_cube_map_array 1 +# define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 +# define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A +# define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B +# define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C +# define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D +# define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E +# define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F #endif /* GL_ARB_texture_cube_map_array */ #ifndef GL_ARB_texture_filter_minmax -#define GL_ARB_texture_filter_minmax 1 -#define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366 -#define GL_WEIGHTED_AVERAGE_ARB 0x9367 +# define GL_ARB_texture_filter_minmax 1 +# define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366 +# define GL_WEIGHTED_AVERAGE_ARB 0x9367 #endif /* GL_ARB_texture_filter_minmax */ #ifndef GL_ARB_texture_gather -#define GL_ARB_texture_gather 1 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F -#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F +# define GL_ARB_texture_gather 1 +# define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E +# define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F +# define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F #endif /* GL_ARB_texture_gather */ #ifndef GL_ARB_texture_mirror_clamp_to_edge -#define GL_ARB_texture_mirror_clamp_to_edge 1 +# define GL_ARB_texture_mirror_clamp_to_edge 1 #endif /* GL_ARB_texture_mirror_clamp_to_edge */ #ifndef GL_ARB_texture_mirrored_repeat -#define GL_ARB_texture_mirrored_repeat 1 -#define GL_MIRRORED_REPEAT_ARB 0x8370 +# define GL_ARB_texture_mirrored_repeat 1 +# define GL_MIRRORED_REPEAT_ARB 0x8370 #endif /* GL_ARB_texture_mirrored_repeat */ #ifndef GL_ARB_texture_multisample -#define GL_ARB_texture_multisample 1 +# define GL_ARB_texture_multisample 1 #endif /* GL_ARB_texture_multisample */ #ifndef GL_ARB_texture_non_power_of_two -#define GL_ARB_texture_non_power_of_two 1 +# define GL_ARB_texture_non_power_of_two 1 #endif /* GL_ARB_texture_non_power_of_two */ #ifndef GL_ARB_texture_query_levels -#define GL_ARB_texture_query_levels 1 +# define GL_ARB_texture_query_levels 1 #endif /* GL_ARB_texture_query_levels */ #ifndef GL_ARB_texture_query_lod -#define GL_ARB_texture_query_lod 1 +# define GL_ARB_texture_query_lod 1 #endif /* GL_ARB_texture_query_lod */ #ifndef GL_ARB_texture_rg -#define GL_ARB_texture_rg 1 +# define GL_ARB_texture_rg 1 #endif /* GL_ARB_texture_rg */ #ifndef GL_ARB_texture_rgb10_a2ui -#define GL_ARB_texture_rgb10_a2ui 1 +# define GL_ARB_texture_rgb10_a2ui 1 #endif /* GL_ARB_texture_rgb10_a2ui */ #ifndef GL_ARB_texture_stencil8 -#define GL_ARB_texture_stencil8 1 +# define GL_ARB_texture_stencil8 1 #endif /* GL_ARB_texture_stencil8 */ #ifndef GL_ARB_texture_storage -#define GL_ARB_texture_storage 1 +# define GL_ARB_texture_storage 1 #endif /* GL_ARB_texture_storage */ #ifndef GL_ARB_texture_storage_multisample -#define GL_ARB_texture_storage_multisample 1 +# define GL_ARB_texture_storage_multisample 1 #endif /* GL_ARB_texture_storage_multisample */ #ifndef GL_ARB_texture_swizzle -#define GL_ARB_texture_swizzle 1 +# define GL_ARB_texture_swizzle 1 #endif /* GL_ARB_texture_swizzle */ #ifndef GL_ARB_texture_view -#define GL_ARB_texture_view 1 +# define GL_ARB_texture_view 1 #endif /* GL_ARB_texture_view */ #ifndef GL_ARB_timer_query -#define GL_ARB_timer_query 1 +# define GL_ARB_timer_query 1 #endif /* GL_ARB_timer_query */ #ifndef GL_ARB_transform_feedback2 -#define GL_ARB_transform_feedback2 1 +# define GL_ARB_transform_feedback2 1 #endif /* GL_ARB_transform_feedback2 */ #ifndef GL_ARB_transform_feedback3 -#define GL_ARB_transform_feedback3 1 +# define GL_ARB_transform_feedback3 1 #endif /* GL_ARB_transform_feedback3 */ #ifndef GL_ARB_transform_feedback_instanced -#define GL_ARB_transform_feedback_instanced 1 +# define GL_ARB_transform_feedback_instanced 1 #endif /* GL_ARB_transform_feedback_instanced */ #ifndef GL_ARB_transform_feedback_overflow_query -#define GL_ARB_transform_feedback_overflow_query 1 -#define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC -#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED +# define GL_ARB_transform_feedback_overflow_query 1 +# define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC +# define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED #endif /* GL_ARB_transform_feedback_overflow_query */ #ifndef GL_ARB_uniform_buffer_object -#define GL_ARB_uniform_buffer_object 1 +# define GL_ARB_uniform_buffer_object 1 #endif /* GL_ARB_uniform_buffer_object */ #ifndef GL_ARB_vertex_array_bgra -#define GL_ARB_vertex_array_bgra 1 +# define GL_ARB_vertex_array_bgra 1 #endif /* GL_ARB_vertex_array_bgra */ #ifndef GL_ARB_vertex_array_object -#define GL_ARB_vertex_array_object 1 +# define GL_ARB_vertex_array_object 1 #endif /* GL_ARB_vertex_array_object */ #ifndef GL_ARB_vertex_attrib_64bit -#define GL_ARB_vertex_attrib_64bit 1 +# define GL_ARB_vertex_attrib_64bit 1 #endif /* GL_ARB_vertex_attrib_64bit */ #ifndef GL_ARB_vertex_attrib_binding -#define GL_ARB_vertex_attrib_binding 1 +# define GL_ARB_vertex_attrib_binding 1 #endif /* GL_ARB_vertex_attrib_binding */ #ifndef GL_ARB_vertex_type_10f_11f_11f_rev -#define GL_ARB_vertex_type_10f_11f_11f_rev 1 +# define GL_ARB_vertex_type_10f_11f_11f_rev 1 #endif /* GL_ARB_vertex_type_10f_11f_11f_rev */ #ifndef GL_ARB_vertex_type_2_10_10_10_rev -#define GL_ARB_vertex_type_2_10_10_10_rev 1 +# define GL_ARB_vertex_type_2_10_10_10_rev 1 #endif /* GL_ARB_vertex_type_2_10_10_10_rev */ #ifndef GL_ARB_viewport_array -#define GL_ARB_viewport_array 1 +# define GL_ARB_viewport_array 1 #endif /* GL_ARB_viewport_array */ #ifndef GL_KHR_blend_equation_advanced -#define GL_KHR_blend_equation_advanced 1 -#define GL_MULTIPLY_KHR 0x9294 -#define GL_SCREEN_KHR 0x9295 -#define GL_OVERLAY_KHR 0x9296 -#define GL_DARKEN_KHR 0x9297 -#define GL_LIGHTEN_KHR 0x9298 -#define GL_COLORDODGE_KHR 0x9299 -#define GL_COLORBURN_KHR 0x929A -#define GL_HARDLIGHT_KHR 0x929B -#define GL_SOFTLIGHT_KHR 0x929C -#define GL_DIFFERENCE_KHR 0x929E -#define GL_EXCLUSION_KHR 0x92A0 -#define GL_HSL_HUE_KHR 0x92AD -#define GL_HSL_SATURATION_KHR 0x92AE -#define GL_HSL_COLOR_KHR 0x92AF -#define GL_HSL_LUMINOSITY_KHR 0x92B0 -typedef void (APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendBarrierKHR (void); -#endif +# define GL_KHR_blend_equation_advanced 1 +# define GL_MULTIPLY_KHR 0x9294 +# define GL_SCREEN_KHR 0x9295 +# define GL_OVERLAY_KHR 0x9296 +# define GL_DARKEN_KHR 0x9297 +# define GL_LIGHTEN_KHR 0x9298 +# define GL_COLORDODGE_KHR 0x9299 +# define GL_COLORBURN_KHR 0x929A +# define GL_HARDLIGHT_KHR 0x929B +# define GL_SOFTLIGHT_KHR 0x929C +# define GL_DIFFERENCE_KHR 0x929E +# define GL_EXCLUSION_KHR 0x92A0 +# define GL_HSL_HUE_KHR 0x92AD +# define GL_HSL_SATURATION_KHR 0x92AE +# define GL_HSL_COLOR_KHR 0x92AF +# define GL_HSL_LUMINOSITY_KHR 0x92B0 +typedef void( APIENTRYP PFNGLBLENDBARRIERKHRPROC )( void ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendBarrierKHR( void ); +# endif #endif /* GL_KHR_blend_equation_advanced */ #ifndef GL_KHR_blend_equation_advanced_coherent -#define GL_KHR_blend_equation_advanced_coherent 1 -#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285 +# define GL_KHR_blend_equation_advanced_coherent 1 +# define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285 #endif /* GL_KHR_blend_equation_advanced_coherent */ #ifndef GL_KHR_context_flush_control -#define GL_KHR_context_flush_control 1 +# define GL_KHR_context_flush_control 1 #endif /* GL_KHR_context_flush_control */ #ifndef GL_KHR_debug -#define GL_KHR_debug 1 +# define GL_KHR_debug 1 #endif /* GL_KHR_debug */ #ifndef GL_KHR_no_error -#define GL_KHR_no_error 1 -#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 +# define GL_KHR_no_error 1 +# define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 #endif /* GL_KHR_no_error */ #ifndef GL_KHR_robust_buffer_access_behavior -#define GL_KHR_robust_buffer_access_behavior 1 +# define GL_KHR_robust_buffer_access_behavior 1 #endif /* GL_KHR_robust_buffer_access_behavior */ #ifndef GL_KHR_robustness -#define GL_KHR_robustness 1 -#define GL_CONTEXT_ROBUST_ACCESS 0x90F3 +# define GL_KHR_robustness 1 +# define GL_CONTEXT_ROBUST_ACCESS 0x90F3 #endif /* GL_KHR_robustness */ #ifndef GL_KHR_texture_compression_astc_hdr -#define GL_KHR_texture_compression_astc_hdr 1 -#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 -#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 -#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 -#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 -#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 -#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 -#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 -#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 -#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 -#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 -#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA -#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB -#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC -#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD +# define GL_KHR_texture_compression_astc_hdr 1 +# define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 +# define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 +# define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 +# define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 +# define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 +# define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 +# define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 +# define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 +# define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 +# define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 +# define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA +# define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB +# define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC +# define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD #endif /* GL_KHR_texture_compression_astc_hdr */ #ifndef GL_KHR_texture_compression_astc_ldr -#define GL_KHR_texture_compression_astc_ldr 1 +# define GL_KHR_texture_compression_astc_ldr 1 #endif /* GL_KHR_texture_compression_astc_ldr */ #ifndef GL_KHR_texture_compression_astc_sliced_3d -#define GL_KHR_texture_compression_astc_sliced_3d 1 +# define GL_KHR_texture_compression_astc_sliced_3d 1 #endif /* GL_KHR_texture_compression_astc_sliced_3d */ #ifndef GL_AMD_performance_monitor -#define GL_AMD_performance_monitor 1 -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFMON_RESULT_AMD 0x8BC6 -typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data); -typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); -typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data); -GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); -GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); -GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor); -GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor); -GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif +# define GL_AMD_performance_monitor 1 +# define GL_COUNTER_TYPE_AMD 0x8BC0 +# define GL_COUNTER_RANGE_AMD 0x8BC1 +# define GL_UNSIGNED_INT64_AMD 0x8BC2 +# define GL_PERCENTAGE_AMD 0x8BC3 +# define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +# define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +# define GL_PERFMON_RESULT_AMD 0x8BC6 +typedef void( APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC )( GLint *numGroups, GLsizei groupsSize, + GLuint *groups ); +typedef void( APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC )( GLuint group, GLint *numCounters, + GLint * maxActiveCounters, + GLsizei counterSize, GLuint *counters ); +typedef void( APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC )( GLuint group, GLsizei bufSize, + GLsizei *length, GLchar *groupString ); +typedef void( APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC )( GLuint group, GLuint counter, + GLsizei bufSize, GLsizei *length, + GLchar *counterString ); +typedef void( APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC )( GLuint group, GLuint counter, + GLenum pname, void *data ); +typedef void( APIENTRYP PFNGLGENPERFMONITORSAMDPROC )( GLsizei n, GLuint *monitors ); +typedef void( APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC )( GLsizei n, GLuint *monitors ); +typedef void( APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC )( GLuint monitor, GLboolean enable, + GLuint group, GLint numCounters, + GLuint *counterList ); +typedef void( APIENTRYP PFNGLBEGINPERFMONITORAMDPROC )( GLuint monitor ); +typedef void( APIENTRYP PFNGLENDPERFMONITORAMDPROC )( GLuint monitor ); +typedef void( APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC )( GLuint monitor, GLenum pname, + GLsizei dataSize, GLuint *data, + GLint *bytesWritten ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetPerfMonitorGroupsAMD( GLint *numGroups, GLsizei groupsSize, GLuint *groups ); +GLAPI void APIENTRY glGetPerfMonitorCountersAMD( GLuint group, GLint *numCounters, + GLint *maxActiveCounters, GLsizei counterSize, + GLuint *counters ); +GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD( GLuint group, GLsizei bufSize, GLsizei *length, + GLchar *groupString ); +GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD( GLuint group, GLuint counter, GLsizei bufSize, + GLsizei *length, GLchar *counterString ); +GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD( GLuint group, GLuint counter, GLenum pname, + void *data ); +GLAPI void APIENTRY glGenPerfMonitorsAMD( GLsizei n, GLuint *monitors ); +GLAPI void APIENTRY glDeletePerfMonitorsAMD( GLsizei n, GLuint *monitors ); +GLAPI void APIENTRY glSelectPerfMonitorCountersAMD( GLuint monitor, GLboolean enable, GLuint group, + GLint numCounters, GLuint *counterList ); +GLAPI void APIENTRY glBeginPerfMonitorAMD( GLuint monitor ); +GLAPI void APIENTRY glEndPerfMonitorAMD( GLuint monitor ); +GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD( GLuint monitor, GLenum pname, GLsizei dataSize, + GLuint *data, GLint *bytesWritten ); +# endif #endif /* GL_AMD_performance_monitor */ #ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 1 -#define GL_RGB_422_APPLE 0x8A1F -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#define GL_RGB_RAW_422_APPLE 0x8A51 +# define GL_APPLE_rgb_422 1 +# define GL_RGB_422_APPLE 0x8A1F +# define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +# define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +# define GL_RGB_RAW_422_APPLE 0x8A51 #endif /* GL_APPLE_rgb_422 */ #ifndef GL_EXT_debug_label -#define GL_EXT_debug_label 1 -#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F -#define GL_PROGRAM_OBJECT_EXT 0x8B40 -#define GL_SHADER_OBJECT_EXT 0x8B48 -#define GL_BUFFER_OBJECT_EXT 0x9151 -#define GL_QUERY_OBJECT_EXT 0x9153 -#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 -typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); -typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); -GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif +# define GL_EXT_debug_label 1 +# define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F +# define GL_PROGRAM_OBJECT_EXT 0x8B40 +# define GL_SHADER_OBJECT_EXT 0x8B48 +# define GL_BUFFER_OBJECT_EXT 0x9151 +# define GL_QUERY_OBJECT_EXT 0x9153 +# define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 +typedef void( APIENTRYP PFNGLLABELOBJECTEXTPROC )( GLenum type, GLuint object, GLsizei length, + const GLchar *label ); +typedef void( APIENTRYP PFNGLGETOBJECTLABELEXTPROC )( GLenum type, GLuint object, GLsizei bufSize, + GLsizei *length, GLchar *label ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLabelObjectEXT( GLenum type, GLuint object, GLsizei length, const GLchar *label ); +GLAPI void APIENTRY glGetObjectLabelEXT( GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, + GLchar *label ); +# endif #endif /* GL_EXT_debug_label */ #ifndef GL_EXT_debug_marker -#define GL_EXT_debug_marker 1 -typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); -GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); -GLAPI void APIENTRY glPopGroupMarkerEXT (void); -#endif +# define GL_EXT_debug_marker 1 +typedef void( APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC )( GLsizei length, const GLchar *marker ); +typedef void( APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC )( GLsizei length, const GLchar *marker ); +typedef void( APIENTRYP PFNGLPOPGROUPMARKEREXTPROC )( void ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glInsertEventMarkerEXT( GLsizei length, const GLchar *marker ); +GLAPI void APIENTRY glPushGroupMarkerEXT( GLsizei length, const GLchar *marker ); +GLAPI void APIENTRY glPopGroupMarkerEXT( void ); +# endif #endif /* GL_EXT_debug_marker */ #ifndef GL_EXT_direct_state_access -#define GL_EXT_direct_state_access 1 -#define GL_PROGRAM_MATRIX_EXT 0x8E2D -#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E -#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F -typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); -typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); -typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); -typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); -typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data); -typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); -typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img); -typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); -typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); -typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); -typedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); -typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); -typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); -typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array); -typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array); -typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index); -typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param); -typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param); -typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); -typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode); -GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glMatrixPopEXT (GLenum mode); -GLAPI void APIENTRY glMatrixPushEXT (GLenum mode); -GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask); -GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask); -GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); -GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); -GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); -GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); -GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); -GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); -GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); -GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data); -GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index); -GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index); -GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index); -GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); -GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); -GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img); -GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits); -GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img); -GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); -GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); -GLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access); -GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer); -GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params); -GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); -GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); -GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); -GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); -GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); -GLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params); -GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string); -GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string); -GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); -GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target); -GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); -GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); -GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); -GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); -GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array); -GLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array); -GLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index); -GLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index); -GLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param); -GLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param); -GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param); -GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param); -GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); -GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param); -GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); -GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); -GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex); -GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor); -GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); -GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor); -#endif +# define GL_EXT_direct_state_access 1 +# define GL_PROGRAM_MATRIX_EXT 0x8E2D +# define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E +# define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F +typedef void( APIENTRYP PFNGLMATRIXLOADFEXTPROC )( GLenum mode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXLOADDEXTPROC )( GLenum mode, const GLdouble *m ); +typedef void( APIENTRYP PFNGLMATRIXMULTFEXTPROC )( GLenum mode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXMULTDEXTPROC )( GLenum mode, const GLdouble *m ); +typedef void( APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC )( GLenum mode ); +typedef void( APIENTRYP PFNGLMATRIXROTATEFEXTPROC )( GLenum mode, GLfloat angle, GLfloat x, GLfloat y, + GLfloat z ); +typedef void( APIENTRYP PFNGLMATRIXROTATEDEXTPROC )( GLenum mode, GLdouble angle, GLdouble x, GLdouble y, + GLdouble z ); +typedef void( APIENTRYP PFNGLMATRIXSCALEFEXTPROC )( GLenum mode, GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLMATRIXSCALEDEXTPROC )( GLenum mode, GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC )( GLenum mode, GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC )( GLenum mode, GLdouble x, GLdouble y, + GLdouble z ); +typedef void( APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC )( GLenum mode, GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, GLdouble zNear, + GLdouble zFar ); +typedef void( APIENTRYP PFNGLMATRIXORTHOEXTPROC )( GLenum mode, GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, GLdouble zNear, + GLdouble zFar ); +typedef void( APIENTRYP PFNGLMATRIXPOPEXTPROC )( GLenum mode ); +typedef void( APIENTRYP PFNGLMATRIXPUSHEXTPROC )( GLenum mode ); +typedef void( APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC )( GLbitfield mask ); +typedef void( APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC )( GLbitfield mask ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC )( GLuint texture, GLenum target, GLenum pname, + GLfloat param ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC )( GLuint texture, GLenum target, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint internalformat, GLsizei width, GLint border, + GLenum format, GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint internalformat, GLsizei width, + GLsizei height, GLint border, GLenum format, + GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLsizei width, GLenum format, + GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLenum type, + const void *pixels ); +typedef void( APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLint border ); +typedef void( APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLsizei height, GLint border ); +typedef void( APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width ); +typedef void( APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, + GLint y, GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC )( GLuint texture, GLenum target, GLint level, + GLenum format, GLenum type, void *pixels ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC )( GLuint texture, GLenum target, + GLint level, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC )( GLuint texture, GLenum target, + GLint level, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, + GLenum format, GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, + const void *pixels ); +typedef void( APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLint x, GLint y, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC )( GLenum texunit, GLenum target, GLuint texture ); +typedef void( APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC )( GLenum texunit, GLint size, GLenum type, + GLsizei stride, const void *pointer ); +typedef void( APIENTRYP PFNGLMULTITEXENVFEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLfloat param ); +typedef void( APIENTRYP PFNGLMULTITEXENVFVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLMULTITEXENVIEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLMULTITEXENVIVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLMULTITEXGENDEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLdouble param ); +typedef void( APIENTRYP PFNGLMULTITEXGENDVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + const GLdouble *params ); +typedef void( APIENTRYP PFNGLMULTITEXGENFEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLfloat param ); +typedef void( APIENTRYP PFNGLMULTITEXGENFVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLMULTITEXGENIEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLMULTITEXGENIVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLdouble *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLfloat param ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint internalformat, GLsizei width, GLint border, + GLenum format, GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint internalformat, GLsizei width, + GLsizei height, GLint border, GLenum format, + GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLsizei width, GLenum format, + GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLenum type, + const void *pixels ); +typedef void( APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLint border ); +typedef void( APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLsizei height, GLint border ); +typedef void( APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width ); +typedef void( APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, + GLint y, GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLenum format, GLenum type, void *pixels ); +typedef void( APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC )( GLenum texunit, GLenum target, + GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC )( GLenum texunit, GLenum target, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, + GLenum format, GLenum type, const void *pixels ); +typedef void( APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, + const void *pixels ); +typedef void( APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, GLint y, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC )( GLenum array, GLuint index ); +typedef void( APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC )( GLenum array, GLuint index ); +typedef void( APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC )( GLenum target, GLuint index, GLfloat *data ); +typedef void( APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC )( GLenum target, GLuint index, GLdouble *data ); +typedef void( APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC )( GLenum target, GLuint index, void **data ); +typedef void( APIENTRYP PFNGLENABLEINDEXEDEXTPROC )( GLenum target, GLuint index ); +typedef void( APIENTRYP PFNGLDISABLEINDEXEDEXTPROC )( GLenum target, GLuint index ); +typedef GLboolean( APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC )( GLenum target, GLuint index ); +typedef void( APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC )( GLenum target, GLuint index, GLint *data ); +typedef void( APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC )( GLenum target, GLuint index, GLboolean *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC )( GLuint texture, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLsizei height, + GLsizei depth, GLint border, + GLsizei imageSize, const void *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC )( GLuint texture, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLsizei height, + GLint border, GLsizei imageSize, + const void *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC )( GLuint texture, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLint border, + GLsizei imageSize, const void *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC )( + GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC )( GLuint texture, GLenum target, + GLint level, GLint xoffset, + GLint yoffset, GLsizei width, + GLsizei height, GLenum format, + GLsizei imageSize, const void *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC )( GLuint texture, GLenum target, + GLint level, GLint xoffset, + GLsizei width, GLenum format, + GLsizei imageSize, const void *bits ); +typedef void( APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC )( GLuint texture, GLenum target, + GLint lod, void *img ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLsizei height, + GLsizei depth, GLint border, + GLsizei imageSize, const void *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLsizei height, + GLint border, GLsizei imageSize, + const void *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLint border, + GLsizei imageSize, const void *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC )( + GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC )( + GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLsizei imageSize, const void *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLint xoffset, + GLsizei width, GLenum format, + GLsizei imageSize, + const void *bits ); +typedef void( APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC )( GLenum texunit, GLenum target, + GLint lod, void *img ); +typedef void( APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC )( GLenum mode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC )( GLenum mode, const GLdouble *m ); +typedef void( APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC )( GLenum mode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC )( GLenum mode, const GLdouble *m ); +typedef void( APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC )( GLuint buffer, GLsizeiptr size, const void *data, + GLenum usage ); +typedef void( APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr size, const void *data ); +typedef void *( APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC )( GLuint buffer, GLenum access ); +typedef GLboolean( APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC )( GLuint buffer, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC )( GLuint buffer, GLenum pname, + void **params ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr size, void *data ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC )( GLuint program, GLint location, GLfloat v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2, GLfloat v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC )( GLuint program, GLint location, GLint v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC )( GLuint program, GLint location, GLint v0, + GLint v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC )( GLuint program, GLint location, GLint v0, + GLint v1, GLint v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC )( GLuint program, GLint location, GLint v0, + GLint v1, GLint v2, GLint v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLTEXTUREBUFFEREXTPROC )( GLuint texture, GLenum target, + GLenum internalformat, GLuint buffer ); +typedef void( APIENTRYP PFNGLMULTITEXBUFFEREXTPROC )( GLenum texunit, GLenum target, + GLenum internalformat, GLuint buffer ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + const GLuint *params ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC )( GLuint texture, GLenum target, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC )( GLuint texture, GLenum target, + GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLuint *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC )( GLenum texunit, GLenum target, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC )( GLenum texunit, GLenum target, + GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC )( GLuint program, GLint location, GLuint v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2, GLuint v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLsizei count, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC )( GLuint program, GLenum target, + GLuint index, GLint x, GLint y, + GLint z, GLint w ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC )( GLuint program, GLenum target, + GLuint index, + const GLint *params ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLsizei count, + const GLint *params ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC )( GLuint program, GLenum target, + GLuint index, GLuint x, GLuint y, + GLuint z, GLuint w ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC )( GLuint program, GLenum target, + GLuint index, + const GLuint *params ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLsizei count, + const GLuint *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLint *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLuint *params ); +typedef void( APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC )( GLenum array, GLuint index ); +typedef void( APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC )( GLenum array, GLuint index ); +typedef void( APIENTRYP PFNGLGETFLOATI_VEXTPROC )( GLenum pname, GLuint index, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETDOUBLEI_VEXTPROC )( GLenum pname, GLuint index, GLdouble *params ); +typedef void( APIENTRYP PFNGLGETPOINTERI_VEXTPROC )( GLenum pname, GLuint index, void **params ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC )( GLuint program, GLenum target, GLenum format, + GLsizei len, const void *string ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC )( GLuint program, GLenum target, + GLuint index, GLdouble x, GLdouble y, + GLdouble z, GLdouble w ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC )( GLuint program, GLenum target, + GLuint index, + const GLdouble *params ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC )( GLuint program, GLenum target, + GLuint index, GLfloat x, GLfloat y, + GLfloat z, GLfloat w ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC )( GLuint program, GLenum target, + GLuint index, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLdouble *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC )( GLuint program, GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC )( GLuint program, GLenum target, GLenum pname, + void *string ); +typedef void( APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC )( GLuint renderbuffer, + GLenum internalformat, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC )( GLuint renderbuffer, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC )( + GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC )( + GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, + GLsizei width, GLsizei height ); +typedef GLenum( APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC )( GLuint framebuffer, GLenum target ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC )( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC )( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC )( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level, GLint zoffset ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC )( GLuint framebuffer, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC )( GLuint framebuffer, + GLenum attachment, + GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC )( GLuint texture, GLenum target ); +typedef void( APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC )( GLenum texunit, GLenum target ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC )( GLuint framebuffer, GLenum mode ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC )( GLuint framebuffer, GLsizei n, + const GLenum *bufs ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC )( GLuint framebuffer, GLenum mode ); +typedef void( APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC )( GLuint framebuffer, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC )( GLuint readBuffer, GLuint writeBuffer, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC )( GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC )( GLuint framebuffer, + GLenum attachment, GLuint texture, + GLint level, GLint layer ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC )( GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level, + GLenum face ); +typedef void( APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC )( GLuint texture, GLenum target, + GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC )( GLenum texunit, GLenum target, + GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC )( GLuint vaobj, GLuint buffer, GLint size, + GLenum type, GLsizei stride, + GLintptr offset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC )( GLuint vaobj, GLuint buffer, GLint size, + GLenum type, GLsizei stride, + GLintptr offset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC )( GLuint vaobj, GLuint buffer, + GLsizei stride, GLintptr offset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC )( GLuint vaobj, GLuint buffer, GLenum type, + GLsizei stride, GLintptr offset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC )( GLuint vaobj, GLuint buffer, GLenum type, + GLsizei stride, GLintptr offset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC )( GLuint vaobj, GLuint buffer, GLint size, + GLenum type, GLsizei stride, + GLintptr offset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC )( GLuint vaobj, GLuint buffer, + GLenum texunit, GLint size, + GLenum type, GLsizei stride, + GLintptr offset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC )( GLuint vaobj, GLuint buffer, + GLenum type, GLsizei stride, + GLintptr offset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC )( GLuint vaobj, GLuint buffer, + GLint size, GLenum type, + GLsizei stride, GLintptr offset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC )( GLuint vaobj, GLuint buffer, + GLuint index, GLint size, + GLenum type, GLboolean normalized, + GLsizei stride, GLintptr offset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC )( GLuint vaobj, GLuint buffer, + GLuint index, GLint size, + GLenum type, GLsizei stride, + GLintptr offset ); +typedef void( APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC )( GLuint vaobj, GLenum array ); +typedef void( APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC )( GLuint vaobj, GLenum array ); +typedef void( APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC )( GLuint vaobj, GLuint index ); +typedef void( APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC )( GLuint vaobj, GLuint index ); +typedef void( APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC )( GLuint vaobj, GLenum pname, GLint *param ); +typedef void( APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC )( GLuint vaobj, GLenum pname, void **param ); +typedef void( APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC )( GLuint vaobj, GLuint index, GLenum pname, + GLint *param ); +typedef void( APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC )( GLuint vaobj, GLuint index, GLenum pname, + void **param ); +typedef void *( APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr length, GLbitfield access ); +typedef void( APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr length ); +typedef void( APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC )( GLuint buffer, GLsizeiptr size, + const void *data, GLbitfield flags ); +typedef void( APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC )( GLuint buffer, GLenum internalformat, + GLenum format, GLenum type, + const void *data ); +typedef void( APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC )( GLuint buffer, GLenum internalformat, + GLsizeiptr offset, GLsizeiptr size, + GLenum format, GLenum type, + const void *data ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC )( GLuint framebuffer, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC )( GLuint framebuffer, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC )( GLuint program, GLint location, GLdouble x ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC )( GLuint program, GLint location, GLdouble x, + GLdouble y ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC )( GLuint program, GLint location, GLdouble x, + GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC )( GLuint program, GLint location, GLdouble x, + GLdouble y, GLdouble z, GLdouble w ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC )( GLuint texture, GLenum target, + GLenum internalformat, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC )( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC )( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC )( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC )( GLuint texture, GLenum target, + GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC )( GLuint texture, GLenum target, + GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC )( GLuint vaobj, GLuint bindingindex, + GLuint buffer, GLintptr offset, + GLsizei stride ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC )( GLuint vaobj, GLuint attribindex, + GLint size, GLenum type, + GLboolean normalized, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC )( GLuint vaobj, GLuint attribindex, + GLint size, GLenum type, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC )( GLuint vaobj, GLuint attribindex, + GLint size, GLenum type, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC )( GLuint vaobj, GLuint attribindex, + GLuint bindingindex ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC )( GLuint vaobj, GLuint bindingindex, + GLuint divisor ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC )( GLuint vaobj, GLuint buffer, + GLuint index, GLint size, + GLenum type, GLsizei stride, + GLintptr offset ); +typedef void( APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC )( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean commit ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC )( GLuint vaobj, GLuint index, + GLuint divisor ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMatrixLoadfEXT( GLenum mode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixLoaddEXT( GLenum mode, const GLdouble *m ); +GLAPI void APIENTRY glMatrixMultfEXT( GLenum mode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixMultdEXT( GLenum mode, const GLdouble *m ); +GLAPI void APIENTRY glMatrixLoadIdentityEXT( GLenum mode ); +GLAPI void APIENTRY glMatrixRotatefEXT( GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glMatrixRotatedEXT( GLenum mode, GLdouble angle, GLdouble x, GLdouble y, + GLdouble z ); +GLAPI void APIENTRY glMatrixScalefEXT( GLenum mode, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glMatrixScaledEXT( GLenum mode, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glMatrixTranslatefEXT( GLenum mode, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glMatrixTranslatedEXT( GLenum mode, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glMatrixFrustumEXT( GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, + GLdouble top, GLdouble zNear, GLdouble zFar ); +GLAPI void APIENTRY glMatrixOrthoEXT( GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, + GLdouble top, GLdouble zNear, GLdouble zFar ); +GLAPI void APIENTRY glMatrixPopEXT( GLenum mode ); +GLAPI void APIENTRY glMatrixPushEXT( GLenum mode ); +GLAPI void APIENTRY glClientAttribDefaultEXT( GLbitfield mask ); +GLAPI void APIENTRY glPushClientAttribDefaultEXT( GLbitfield mask ); +GLAPI void APIENTRY glTextureParameterfEXT( GLuint texture, GLenum target, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glTextureParameterfvEXT( GLuint texture, GLenum target, GLenum pname, + const GLfloat *params ); +GLAPI void APIENTRY glTextureParameteriEXT( GLuint texture, GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glTextureParameterivEXT( GLuint texture, GLenum target, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glTextureImage1DEXT( GLuint texture, GLenum target, GLint level, + GLint internalformat, GLsizei width, GLint border, + GLenum format, GLenum type, const void *pixels ); +GLAPI void APIENTRY glTextureImage2DEXT( GLuint texture, GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, const void *pixels ); +GLAPI void APIENTRY glTextureSubImage1DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLenum type, + const void *pixels ); +GLAPI void APIENTRY glTextureSubImage2DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, GLenum format, + GLenum type, const void *pixels ); +GLAPI void APIENTRY glCopyTextureImage1DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLint border ); +GLAPI void APIENTRY glCopyTextureImage2DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLsizei height, GLint border ); +GLAPI void APIENTRY glCopyTextureSubImage1DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, GLsizei width ); +GLAPI void APIENTRY glCopyTextureSubImage2DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glGetTextureImageEXT( GLuint texture, GLenum target, GLint level, GLenum format, + GLenum type, void *pixels ); +GLAPI void APIENTRY glGetTextureParameterfvEXT( GLuint texture, GLenum target, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetTextureParameterivEXT( GLuint texture, GLenum target, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetTextureLevelParameterfvEXT( GLuint texture, GLenum target, GLint level, + GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetTextureLevelParameterivEXT( GLuint texture, GLenum target, GLint level, + GLenum pname, GLint *params ); +GLAPI void APIENTRY glTextureImage3DEXT( GLuint texture, GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLenum format, GLenum type, + const void *pixels ); +GLAPI void APIENTRY glTextureSubImage3DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, + const void *pixels ); +GLAPI void APIENTRY glCopyTextureSubImage3DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLint x, + GLint y, GLsizei width, GLsizei height ); +GLAPI void APIENTRY glBindMultiTextureEXT( GLenum texunit, GLenum target, GLuint texture ); +GLAPI void APIENTRY glMultiTexCoordPointerEXT( GLenum texunit, GLint size, GLenum type, GLsizei stride, + const void *pointer ); +GLAPI void APIENTRY glMultiTexEnvfEXT( GLenum texunit, GLenum target, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glMultiTexEnvfvEXT( GLenum texunit, GLenum target, GLenum pname, + const GLfloat *params ); +GLAPI void APIENTRY glMultiTexEnviEXT( GLenum texunit, GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glMultiTexEnvivEXT( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glMultiTexGendEXT( GLenum texunit, GLenum coord, GLenum pname, GLdouble param ); +GLAPI void APIENTRY glMultiTexGendvEXT( GLenum texunit, GLenum coord, GLenum pname, + const GLdouble *params ); +GLAPI void APIENTRY glMultiTexGenfEXT( GLenum texunit, GLenum coord, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glMultiTexGenfvEXT( GLenum texunit, GLenum coord, GLenum pname, + const GLfloat *params ); +GLAPI void APIENTRY glMultiTexGeniEXT( GLenum texunit, GLenum coord, GLenum pname, GLint param ); +GLAPI void APIENTRY glMultiTexGenivEXT( GLenum texunit, GLenum coord, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glGetMultiTexEnvfvEXT( GLenum texunit, GLenum target, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetMultiTexEnvivEXT( GLenum texunit, GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetMultiTexGendvEXT( GLenum texunit, GLenum coord, GLenum pname, + GLdouble *params ); +GLAPI void APIENTRY glGetMultiTexGenfvEXT( GLenum texunit, GLenum coord, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetMultiTexGenivEXT( GLenum texunit, GLenum coord, GLenum pname, GLint *params ); +GLAPI void APIENTRY glMultiTexParameteriEXT( GLenum texunit, GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glMultiTexParameterivEXT( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glMultiTexParameterfEXT( GLenum texunit, GLenum target, GLenum pname, + GLfloat param ); +GLAPI void APIENTRY glMultiTexParameterfvEXT( GLenum texunit, GLenum target, GLenum pname, + const GLfloat *params ); +GLAPI void APIENTRY glMultiTexImage1DEXT( GLenum texunit, GLenum target, GLint level, + GLint internalformat, GLsizei width, GLint border, + GLenum format, GLenum type, const void *pixels ); +GLAPI void APIENTRY glMultiTexImage2DEXT( GLenum texunit, GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, const void *pixels ); +GLAPI void APIENTRY glMultiTexSubImage1DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLenum type, + const void *pixels ); +GLAPI void APIENTRY glMultiTexSubImage2DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, GLenum format, + GLenum type, const void *pixels ); +GLAPI void APIENTRY glCopyMultiTexImage1DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLint border ); +GLAPI void APIENTRY glCopyMultiTexImage2DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLsizei height, GLint border ); +GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, GLsizei width ); +GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glGetMultiTexImageEXT( GLenum texunit, GLenum target, GLint level, GLenum format, + GLenum type, void *pixels ); +GLAPI void APIENTRY glGetMultiTexParameterfvEXT( GLenum texunit, GLenum target, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetMultiTexParameterivEXT( GLenum texunit, GLenum target, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT( GLenum texunit, GLenum target, GLint level, + GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT( GLenum texunit, GLenum target, GLint level, + GLenum pname, GLint *params ); +GLAPI void APIENTRY glMultiTexImage3DEXT( GLenum texunit, GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLenum format, GLenum type, + const void *pixels ); +GLAPI void APIENTRY glMultiTexSubImage3DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, + const void *pixels ); +GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLint x, + GLint y, GLsizei width, GLsizei height ); +GLAPI void APIENTRY glEnableClientStateIndexedEXT( GLenum array, GLuint index ); +GLAPI void APIENTRY glDisableClientStateIndexedEXT( GLenum array, GLuint index ); +GLAPI void APIENTRY glGetFloatIndexedvEXT( GLenum target, GLuint index, GLfloat *data ); +GLAPI void APIENTRY glGetDoubleIndexedvEXT( GLenum target, GLuint index, GLdouble *data ); +GLAPI void APIENTRY glGetPointerIndexedvEXT( GLenum target, GLuint index, void **data ); +GLAPI void APIENTRY glEnableIndexedEXT( GLenum target, GLuint index ); +GLAPI void APIENTRY glDisableIndexedEXT( GLenum target, GLuint index ); +GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT( GLenum target, GLuint index ); +GLAPI void APIENTRY glGetIntegerIndexedvEXT( GLenum target, GLuint index, GLint *data ); +GLAPI void APIENTRY glGetBooleanIndexedvEXT( GLenum target, GLuint index, GLboolean *data ); +GLAPI void APIENTRY glCompressedTextureImage3DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLsizei imageSize, + const void *bits ); +GLAPI void APIENTRY glCompressedTextureImage2DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLint border, GLsizei imageSize, const void *bits ); +GLAPI void APIENTRY glCompressedTextureImage1DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLint border, + GLsizei imageSize, const void *bits ); +GLAPI void APIENTRY glCompressedTextureSubImage3DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, + const void *bits ); +GLAPI void APIENTRY glCompressedTextureSubImage2DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLsizei imageSize, + const void *bits ); +GLAPI void APIENTRY glCompressedTextureSubImage1DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLsizei width, GLenum format, + GLsizei imageSize, const void *bits ); +GLAPI void APIENTRY glGetCompressedTextureImageEXT( GLuint texture, GLenum target, GLint lod, + void *img ); +GLAPI void APIENTRY glCompressedMultiTexImage3DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLsizei imageSize, + const void *bits ); +GLAPI void APIENTRY glCompressedMultiTexImage2DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLint border, GLsizei imageSize, const void *bits ); +GLAPI void APIENTRY glCompressedMultiTexImage1DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLint border, + GLsizei imageSize, const void *bits ); +GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, + const void *bits ); +GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLsizei imageSize, + const void *bits ); +GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLsizei width, GLenum format, + GLsizei imageSize, const void *bits ); +GLAPI void APIENTRY glGetCompressedMultiTexImageEXT( GLenum texunit, GLenum target, GLint lod, + void *img ); +GLAPI void APIENTRY glMatrixLoadTransposefEXT( GLenum mode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixLoadTransposedEXT( GLenum mode, const GLdouble *m ); +GLAPI void APIENTRY glMatrixMultTransposefEXT( GLenum mode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixMultTransposedEXT( GLenum mode, const GLdouble *m ); +GLAPI void APIENTRY glNamedBufferDataEXT( GLuint buffer, GLsizeiptr size, const void *data, + GLenum usage ); +GLAPI void APIENTRY glNamedBufferSubDataEXT( GLuint buffer, GLintptr offset, GLsizeiptr size, + const void *data ); +GLAPI void *APIENTRY glMapNamedBufferEXT( GLuint buffer, GLenum access ); +GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT( GLuint buffer ); +GLAPI void APIENTRY glGetNamedBufferParameterivEXT( GLuint buffer, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetNamedBufferPointervEXT( GLuint buffer, GLenum pname, void **params ); +GLAPI void APIENTRY glGetNamedBufferSubDataEXT( GLuint buffer, GLintptr offset, GLsizeiptr size, + void *data ); +GLAPI void APIENTRY glProgramUniform1fEXT( GLuint program, GLint location, GLfloat v0 ); +GLAPI void APIENTRY glProgramUniform2fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1 ); +GLAPI void APIENTRY glProgramUniform3fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1, + GLfloat v2 ); +GLAPI void APIENTRY glProgramUniform4fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1, + GLfloat v2, GLfloat v3 ); +GLAPI void APIENTRY glProgramUniform1iEXT( GLuint program, GLint location, GLint v0 ); +GLAPI void APIENTRY glProgramUniform2iEXT( GLuint program, GLint location, GLint v0, GLint v1 ); +GLAPI void APIENTRY glProgramUniform3iEXT( GLuint program, GLint location, GLint v0, GLint v1, + GLint v2 ); +GLAPI void APIENTRY glProgramUniform4iEXT( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, + GLint v3 ); +GLAPI void APIENTRY glProgramUniform1fvEXT( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform2fvEXT( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform3fvEXT( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform4fvEXT( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform1ivEXT( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform2ivEXT( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform3ivEXT( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform4ivEXT( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniformMatrix2fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glTextureBufferEXT( GLuint texture, GLenum target, GLenum internalformat, + GLuint buffer ); +GLAPI void APIENTRY glMultiTexBufferEXT( GLenum texunit, GLenum target, GLenum internalformat, + GLuint buffer ); +GLAPI void APIENTRY glTextureParameterIivEXT( GLuint texture, GLenum target, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glTextureParameterIuivEXT( GLuint texture, GLenum target, GLenum pname, + const GLuint *params ); +GLAPI void APIENTRY glGetTextureParameterIivEXT( GLuint texture, GLenum target, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetTextureParameterIuivEXT( GLuint texture, GLenum target, GLenum pname, + GLuint *params ); +GLAPI void APIENTRY glMultiTexParameterIivEXT( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glMultiTexParameterIuivEXT( GLenum texunit, GLenum target, GLenum pname, + const GLuint *params ); +GLAPI void APIENTRY glGetMultiTexParameterIivEXT( GLenum texunit, GLenum target, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetMultiTexParameterIuivEXT( GLenum texunit, GLenum target, GLenum pname, + GLuint *params ); +GLAPI void APIENTRY glProgramUniform1uiEXT( GLuint program, GLint location, GLuint v0 ); +GLAPI void APIENTRY glProgramUniform2uiEXT( GLuint program, GLint location, GLuint v0, GLuint v1 ); +GLAPI void APIENTRY glProgramUniform3uiEXT( GLuint program, GLint location, GLuint v0, GLuint v1, + GLuint v2 ); +GLAPI void APIENTRY glProgramUniform4uiEXT( GLuint program, GLint location, GLuint v0, GLuint v1, + GLuint v2, GLuint v3 ); +GLAPI void APIENTRY glProgramUniform1uivEXT( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform2uivEXT( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform3uivEXT( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform4uivEXT( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT( GLuint program, GLenum target, GLuint index, + GLsizei count, const GLfloat *params ); +GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT( GLuint program, GLenum target, GLuint index, + GLint x, GLint y, GLint z, GLint w ); +GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT( GLuint program, GLenum target, GLuint index, + const GLint *params ); +GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT( GLuint program, GLenum target, GLuint index, + GLsizei count, const GLint *params ); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT( GLuint program, GLenum target, GLuint index, + GLuint x, GLuint y, GLuint z, GLuint w ); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT( GLuint program, GLenum target, GLuint index, + const GLuint *params ); +GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT( GLuint program, GLenum target, GLuint index, + GLsizei count, const GLuint *params ); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT( GLuint program, GLenum target, GLuint index, + GLint *params ); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT( GLuint program, GLenum target, GLuint index, + GLuint *params ); +GLAPI void APIENTRY glEnableClientStateiEXT( GLenum array, GLuint index ); +GLAPI void APIENTRY glDisableClientStateiEXT( GLenum array, GLuint index ); +GLAPI void APIENTRY glGetFloati_vEXT( GLenum pname, GLuint index, GLfloat *params ); +GLAPI void APIENTRY glGetDoublei_vEXT( GLenum pname, GLuint index, GLdouble *params ); +GLAPI void APIENTRY glGetPointeri_vEXT( GLenum pname, GLuint index, void **params ); +GLAPI void APIENTRY glNamedProgramStringEXT( GLuint program, GLenum target, GLenum format, GLsizei len, + const void *string ); +GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT( GLuint program, GLenum target, GLuint index, + GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT( GLuint program, GLenum target, GLuint index, + const GLdouble *params ); +GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT( GLuint program, GLenum target, GLuint index, + GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT( GLuint program, GLenum target, GLuint index, + const GLfloat *params ); +GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT( GLuint program, GLenum target, GLuint index, + GLdouble *params ); +GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT( GLuint program, GLenum target, GLuint index, + GLfloat *params ); +GLAPI void APIENTRY glGetNamedProgramivEXT( GLuint program, GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetNamedProgramStringEXT( GLuint program, GLenum target, GLenum pname, + void *string ); +GLAPI void APIENTRY glNamedRenderbufferStorageEXT( GLuint renderbuffer, GLenum internalformat, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT( GLuint renderbuffer, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT( GLuint renderbuffer, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT( GLuint renderbuffer, + GLsizei coverageSamples, + GLsizei colorSamples, + GLenum internalformat, + GLsizei width, GLsizei height ); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT( GLuint framebuffer, GLenum target ); +GLAPI void APIENTRY glNamedFramebufferTexture1DEXT( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, GLint level ); +GLAPI void APIENTRY glNamedFramebufferTexture2DEXT( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, GLint level ); +GLAPI void APIENTRY glNamedFramebufferTexture3DEXT( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, GLint level, + GLint zoffset ); +GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT( GLuint framebuffer, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer ); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT( GLuint framebuffer, GLenum attachment, + GLenum pname, GLint *params ); +GLAPI void APIENTRY glGenerateTextureMipmapEXT( GLuint texture, GLenum target ); +GLAPI void APIENTRY glGenerateMultiTexMipmapEXT( GLenum texunit, GLenum target ); +GLAPI void APIENTRY glFramebufferDrawBufferEXT( GLuint framebuffer, GLenum mode ); +GLAPI void APIENTRY glFramebufferDrawBuffersEXT( GLuint framebuffer, GLsizei n, const GLenum *bufs ); +GLAPI void APIENTRY glFramebufferReadBufferEXT( GLuint framebuffer, GLenum mode ); +GLAPI void APIENTRY glGetFramebufferParameterivEXT( GLuint framebuffer, GLenum pname, GLint *params ); +GLAPI void APIENTRY glNamedCopyBufferSubDataEXT( GLuint readBuffer, GLuint writeBuffer, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size ); +GLAPI void APIENTRY glNamedFramebufferTextureEXT( GLuint framebuffer, GLenum attachment, GLuint texture, + GLint level ); +GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT( GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level, GLint layer ); +GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT( GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level, GLenum face ); +GLAPI void APIENTRY glTextureRenderbufferEXT( GLuint texture, GLenum target, GLuint renderbuffer ); +GLAPI void APIENTRY glMultiTexRenderbufferEXT( GLenum texunit, GLenum target, GLuint renderbuffer ); +GLAPI void APIENTRY glVertexArrayVertexOffsetEXT( GLuint vaobj, GLuint buffer, GLint size, GLenum type, + GLsizei stride, GLintptr offset ); +GLAPI void APIENTRY glVertexArrayColorOffsetEXT( GLuint vaobj, GLuint buffer, GLint size, GLenum type, + GLsizei stride, GLintptr offset ); +GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT( GLuint vaobj, GLuint buffer, GLsizei stride, + GLintptr offset ); +GLAPI void APIENTRY glVertexArrayIndexOffsetEXT( GLuint vaobj, GLuint buffer, GLenum type, + GLsizei stride, GLintptr offset ); +GLAPI void APIENTRY glVertexArrayNormalOffsetEXT( GLuint vaobj, GLuint buffer, GLenum type, + GLsizei stride, GLintptr offset ); +GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT( GLuint vaobj, GLuint buffer, GLint size, GLenum type, + GLsizei stride, GLintptr offset ); +GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT( GLuint vaobj, GLuint buffer, GLenum texunit, + GLint size, GLenum type, GLsizei stride, + GLintptr offset ); +GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT( GLuint vaobj, GLuint buffer, GLenum type, + GLsizei stride, GLintptr offset ); +GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT( GLuint vaobj, GLuint buffer, GLint size, + GLenum type, GLsizei stride, GLintptr offset ); +GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT( GLuint vaobj, GLuint buffer, GLuint index, + GLint size, GLenum type, GLboolean normalized, + GLsizei stride, GLintptr offset ); +GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT( GLuint vaobj, GLuint buffer, GLuint index, + GLint size, GLenum type, GLsizei stride, + GLintptr offset ); +GLAPI void APIENTRY glEnableVertexArrayEXT( GLuint vaobj, GLenum array ); +GLAPI void APIENTRY glDisableVertexArrayEXT( GLuint vaobj, GLenum array ); +GLAPI void APIENTRY glEnableVertexArrayAttribEXT( GLuint vaobj, GLuint index ); +GLAPI void APIENTRY glDisableVertexArrayAttribEXT( GLuint vaobj, GLuint index ); +GLAPI void APIENTRY glGetVertexArrayIntegervEXT( GLuint vaobj, GLenum pname, GLint *param ); +GLAPI void APIENTRY glGetVertexArrayPointervEXT( GLuint vaobj, GLenum pname, void **param ); +GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT( GLuint vaobj, GLuint index, GLenum pname, + GLint *param ); +GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT( GLuint vaobj, GLuint index, GLenum pname, + void **param ); +GLAPI void *APIENTRY glMapNamedBufferRangeEXT( GLuint buffer, GLintptr offset, GLsizeiptr length, + GLbitfield access ); +GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT( GLuint buffer, GLintptr offset, + GLsizeiptr length ); +GLAPI void APIENTRY glNamedBufferStorageEXT( GLuint buffer, GLsizeiptr size, const void *data, + GLbitfield flags ); +GLAPI void APIENTRY glClearNamedBufferDataEXT( GLuint buffer, GLenum internalformat, GLenum format, + GLenum type, const void *data ); +GLAPI void APIENTRY glClearNamedBufferSubDataEXT( GLuint buffer, GLenum internalformat, + GLsizeiptr offset, GLsizeiptr size, GLenum format, + GLenum type, const void *data ); +GLAPI void APIENTRY glNamedFramebufferParameteriEXT( GLuint framebuffer, GLenum pname, GLint param ); +GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT( GLuint framebuffer, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glProgramUniform1dEXT( GLuint program, GLint location, GLdouble x ); +GLAPI void APIENTRY glProgramUniform2dEXT( GLuint program, GLint location, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glProgramUniform3dEXT( GLuint program, GLint location, GLdouble x, GLdouble y, + GLdouble z ); +GLAPI void APIENTRY glProgramUniform4dEXT( GLuint program, GLint location, GLdouble x, GLdouble y, + GLdouble z, GLdouble w ); +GLAPI void APIENTRY glProgramUniform1dvEXT( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform2dvEXT( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform3dvEXT( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform4dvEXT( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix2dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glTextureBufferRangeEXT( GLuint texture, GLenum target, GLenum internalformat, + GLuint buffer, GLintptr offset, GLsizeiptr size ); +GLAPI void APIENTRY glTextureStorage1DEXT( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width ); +GLAPI void APIENTRY glTextureStorage2DEXT( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height ); +GLAPI void APIENTRY glTextureStorage3DEXT( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth ); +GLAPI void APIENTRY glTextureStorage2DMultisampleEXT( GLuint texture, GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glTextureStorage3DMultisampleEXT( GLuint texture, GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT( GLuint vaobj, GLuint bindingindex, GLuint buffer, + GLintptr offset, GLsizei stride ); +GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT( GLuint vaobj, GLuint attribindex, GLint size, + GLenum type, GLboolean normalized, + GLuint relativeoffset ); +GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT( GLuint vaobj, GLuint attribindex, GLint size, + GLenum type, GLuint relativeoffset ); +GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT( GLuint vaobj, GLuint attribindex, GLint size, + GLenum type, GLuint relativeoffset ); +GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT( GLuint vaobj, GLuint attribindex, + GLuint bindingindex ); +GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT( GLuint vaobj, GLuint bindingindex, + GLuint divisor ); +GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT( GLuint vaobj, GLuint buffer, GLuint index, + GLint size, GLenum type, GLsizei stride, + GLintptr offset ); +GLAPI void APIENTRY glTexturePageCommitmentEXT( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLboolean commit ); +GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT( GLuint vaobj, GLuint index, GLuint divisor ); +# endif #endif /* GL_EXT_direct_state_access */ #ifndef GL_EXT_draw_instanced -#define GL_EXT_draw_instanced 1 -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#endif +# define GL_EXT_draw_instanced 1 +typedef void( APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC )( GLenum mode, GLint start, GLsizei count, + GLsizei primcount ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC )( GLenum mode, GLsizei count, GLenum type, + const void *indices, GLsizei primcount ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedEXT( GLenum mode, GLint start, GLsizei count, + GLsizei primcount ); +GLAPI void APIENTRY glDrawElementsInstancedEXT( GLenum mode, GLsizei count, GLenum type, + const void *indices, GLsizei primcount ); +# endif #endif /* GL_EXT_draw_instanced */ #ifndef GL_EXT_polygon_offset_clamp -#define GL_EXT_polygon_offset_clamp 1 -#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B -typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPolygonOffsetClampEXT (GLfloat factor, GLfloat units, GLfloat clamp); -#endif +# define GL_EXT_polygon_offset_clamp 1 +# define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B +typedef void( APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC )( GLfloat factor, GLfloat units, GLfloat clamp ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPolygonOffsetClampEXT( GLfloat factor, GLfloat units, GLfloat clamp ); +# endif #endif /* GL_EXT_polygon_offset_clamp */ #ifndef GL_EXT_post_depth_coverage -#define GL_EXT_post_depth_coverage 1 +# define GL_EXT_post_depth_coverage 1 #endif /* GL_EXT_post_depth_coverage */ #ifndef GL_EXT_raster_multisample -#define GL_EXT_raster_multisample 1 -#define GL_RASTER_MULTISAMPLE_EXT 0x9327 -#define GL_RASTER_SAMPLES_EXT 0x9328 -#define GL_MAX_RASTER_SAMPLES_EXT 0x9329 -#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A -#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B -#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C -typedef void (APIENTRYP PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glRasterSamplesEXT (GLuint samples, GLboolean fixedsamplelocations); -#endif +# define GL_EXT_raster_multisample 1 +# define GL_RASTER_MULTISAMPLE_EXT 0x9327 +# define GL_RASTER_SAMPLES_EXT 0x9328 +# define GL_MAX_RASTER_SAMPLES_EXT 0x9329 +# define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A +# define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B +# define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C +typedef void( APIENTRYP PFNGLRASTERSAMPLESEXTPROC )( GLuint samples, GLboolean fixedsamplelocations ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRasterSamplesEXT( GLuint samples, GLboolean fixedsamplelocations ); +# endif #endif /* GL_EXT_raster_multisample */ #ifndef GL_EXT_separate_shader_objects -#define GL_EXT_separate_shader_objects 1 -#define GL_ACTIVE_PROGRAM_EXT 0x8B8D -typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); -typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program); -GLAPI void APIENTRY glActiveProgramEXT (GLuint program); -GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string); -#endif +# define GL_EXT_separate_shader_objects 1 +# define GL_ACTIVE_PROGRAM_EXT 0x8B8D +typedef void( APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC )( GLenum type, GLuint program ); +typedef void( APIENTRYP PFNGLACTIVEPROGRAMEXTPROC )( GLuint program ); +typedef GLuint( APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC )( GLenum type, const GLchar *string ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUseShaderProgramEXT( GLenum type, GLuint program ); +GLAPI void APIENTRY glActiveProgramEXT( GLuint program ); +GLAPI GLuint APIENTRY glCreateShaderProgramEXT( GLenum type, const GLchar *string ); +# endif #endif /* GL_EXT_separate_shader_objects */ #ifndef GL_EXT_shader_integer_mix -#define GL_EXT_shader_integer_mix 1 +# define GL_EXT_shader_integer_mix 1 #endif /* GL_EXT_shader_integer_mix */ #ifndef GL_EXT_texture_compression_s3tc -#define GL_EXT_texture_compression_s3tc 1 -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +# define GL_EXT_texture_compression_s3tc 1 +# define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +# define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +# define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +# define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 #endif /* GL_EXT_texture_compression_s3tc */ #ifndef GL_EXT_texture_filter_minmax -#define GL_EXT_texture_filter_minmax 1 +# define GL_EXT_texture_filter_minmax 1 #endif /* GL_EXT_texture_filter_minmax */ #ifndef GL_EXT_texture_sRGB_decode -#define GL_EXT_texture_sRGB_decode 1 -#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 -#define GL_DECODE_EXT 0x8A49 -#define GL_SKIP_DECODE_EXT 0x8A4A +# define GL_EXT_texture_sRGB_decode 1 +# define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 +# define GL_DECODE_EXT 0x8A49 +# define GL_SKIP_DECODE_EXT 0x8A4A #endif /* GL_EXT_texture_sRGB_decode */ #ifndef GL_EXT_window_rectangles -#define GL_EXT_window_rectangles 1 -#define GL_INCLUSIVE_EXT 0x8F10 -#define GL_EXCLUSIVE_EXT 0x8F11 -#define GL_WINDOW_RECTANGLE_EXT 0x8F12 -#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 -#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 -#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 -typedef void (APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowRectanglesEXT (GLenum mode, GLsizei count, const GLint *box); -#endif +# define GL_EXT_window_rectangles 1 +# define GL_INCLUSIVE_EXT 0x8F10 +# define GL_EXCLUSIVE_EXT 0x8F11 +# define GL_WINDOW_RECTANGLE_EXT 0x8F12 +# define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 +# define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 +# define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 +typedef void( APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC )( GLenum mode, GLsizei count, const GLint *box ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowRectanglesEXT( GLenum mode, GLsizei count, const GLint *box ); +# endif #endif /* GL_EXT_window_rectangles */ #ifndef GL_INTEL_conservative_rasterization -#define GL_INTEL_conservative_rasterization 1 -#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE +# define GL_INTEL_conservative_rasterization 1 +# define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE #endif /* GL_INTEL_conservative_rasterization */ #ifndef GL_INTEL_framebuffer_CMAA -#define GL_INTEL_framebuffer_CMAA 1 -typedef void (APIENTRYP PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glApplyFramebufferAttachmentCMAAINTEL (void); -#endif +# define GL_INTEL_framebuffer_CMAA 1 +typedef void( APIENTRYP PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC )( void ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glApplyFramebufferAttachmentCMAAINTEL( void ); +# endif #endif /* GL_INTEL_framebuffer_CMAA */ #ifndef GL_INTEL_performance_query -#define GL_INTEL_performance_query 1 -#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 -#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 -#define GL_PERFQUERY_WAIT_INTEL 0x83FB -#define GL_PERFQUERY_FLUSH_INTEL 0x83FA -#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 -#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 -#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 -#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 -#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 -#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 -#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 -#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 -#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 -#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA -#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB -#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC -#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD -#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE -#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF -#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 -typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle); -typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle); -typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle); -typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle); -typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId); -typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId); -typedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); -typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); -typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId); -typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle); -GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle); -GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle); -GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle); -GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId); -GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId); -GLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); -GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); -GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId); -GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); -#endif +# define GL_INTEL_performance_query 1 +# define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 +# define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 +# define GL_PERFQUERY_WAIT_INTEL 0x83FB +# define GL_PERFQUERY_FLUSH_INTEL 0x83FA +# define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 +# define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 +# define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 +# define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 +# define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 +# define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 +# define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 +# define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 +# define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 +# define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA +# define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB +# define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC +# define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD +# define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE +# define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF +# define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 +typedef void( APIENTRYP PFNGLBEGINPERFQUERYINTELPROC )( GLuint queryHandle ); +typedef void( APIENTRYP PFNGLCREATEPERFQUERYINTELPROC )( GLuint queryId, GLuint *queryHandle ); +typedef void( APIENTRYP PFNGLDELETEPERFQUERYINTELPROC )( GLuint queryHandle ); +typedef void( APIENTRYP PFNGLENDPERFQUERYINTELPROC )( GLuint queryHandle ); +typedef void( APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC )( GLuint *queryId ); +typedef void( APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC )( GLuint queryId, GLuint *nextQueryId ); +typedef void( APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC )( + GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, + GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, + GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue ); +typedef void( APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC )( GLuint queryHandle, GLuint flags, + GLsizei dataSize, GLvoid *data, + GLuint *bytesWritten ); +typedef void( APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC )( GLchar *queryName, GLuint *queryId ); +typedef void( APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC )( GLuint queryId, GLuint queryNameLength, + GLchar *queryName, GLuint *dataSize, + GLuint *noCounters, GLuint *noInstances, + GLuint *capsMask ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginPerfQueryINTEL( GLuint queryHandle ); +GLAPI void APIENTRY glCreatePerfQueryINTEL( GLuint queryId, GLuint *queryHandle ); +GLAPI void APIENTRY glDeletePerfQueryINTEL( GLuint queryHandle ); +GLAPI void APIENTRY glEndPerfQueryINTEL( GLuint queryHandle ); +GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL( GLuint *queryId ); +GLAPI void APIENTRY glGetNextPerfQueryIdINTEL( GLuint queryId, GLuint *nextQueryId ); +GLAPI void APIENTRY glGetPerfCounterInfoINTEL( GLuint queryId, GLuint counterId, + GLuint counterNameLength, GLchar *counterName, + GLuint counterDescLength, GLchar *counterDesc, + GLuint *counterOffset, GLuint *counterDataSize, + GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, + GLuint64 *rawCounterMaxValue ); +GLAPI void APIENTRY glGetPerfQueryDataINTEL( GLuint queryHandle, GLuint flags, GLsizei dataSize, + GLvoid *data, GLuint *bytesWritten ); +GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL( GLchar *queryName, GLuint *queryId ); +GLAPI void APIENTRY glGetPerfQueryInfoINTEL( GLuint queryId, GLuint queryNameLength, GLchar *queryName, + GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, + GLuint *capsMask ); +# endif #endif /* GL_INTEL_performance_query */ #ifndef GL_NV_bindless_multi_draw_indirect -#define GL_NV_bindless_multi_draw_indirect 1 -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); -GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); -#endif +# define GL_NV_bindless_multi_draw_indirect 1 +typedef void( APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC )( GLenum mode, const void *indirect, + GLsizei drawCount, GLsizei stride, + GLint vertexBufferCount ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC )( GLenum mode, GLenum type, + const void *indirect, + GLsizei drawCount, + GLsizei stride, + GLint vertexBufferCount ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV( GLenum mode, const void *indirect, + GLsizei drawCount, GLsizei stride, + GLint vertexBufferCount ); +GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV( GLenum mode, GLenum type, + const void *indirect, GLsizei drawCount, + GLsizei stride, GLint vertexBufferCount ); +# endif #endif /* GL_NV_bindless_multi_draw_indirect */ #ifndef GL_NV_bindless_multi_draw_indirect_count -#define GL_NV_bindless_multi_draw_indirect_count 1 -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessCountNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); -GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessCountNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount); -#endif +# define GL_NV_bindless_multi_draw_indirect_count 1 +typedef void( APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC )( + GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, + GLint vertexBufferCount ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC )( + GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, + GLsizei stride, GLint vertexBufferCount ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessCountNV( GLenum mode, const void *indirect, + GLsizei drawCount, GLsizei maxDrawCount, + GLsizei stride, GLint vertexBufferCount ); +GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessCountNV( GLenum mode, GLenum type, + const void *indirect, GLsizei drawCount, + GLsizei maxDrawCount, GLsizei stride, + GLint vertexBufferCount ); +# endif #endif /* GL_NV_bindless_multi_draw_indirect_count */ #ifndef GL_NV_bindless_texture -#define GL_NV_bindless_texture 1 -typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture); -typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle); -typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); -typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture); -GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler); -GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle); -GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle); -GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access); -GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle); -GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value); -GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value); -GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle); -GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); -#endif +# define GL_NV_bindless_texture 1 +typedef GLuint64( APIENTRYP PFNGLGETTEXTUREHANDLENVPROC )( GLuint texture ); +typedef GLuint64( APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC )( GLuint texture, GLuint sampler ); +typedef void( APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC )( GLuint64 handle ); +typedef void( APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC )( GLuint64 handle ); +typedef GLuint64( APIENTRYP PFNGLGETIMAGEHANDLENVPROC )( GLuint texture, GLint level, GLboolean layered, + GLint layer, GLenum format ); +typedef void( APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC )( GLuint64 handle, GLenum access ); +typedef void( APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC )( GLuint64 handle ); +typedef void( APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC )( GLint location, GLuint64 value ); +typedef void( APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC )( GLint location, GLsizei count, + const GLuint64 *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC )( GLuint program, GLint location, + GLuint64 value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC )( GLuint program, GLint location, + GLsizei count, const GLuint64 *values ); +typedef GLboolean( APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC )( GLuint64 handle ); +typedef GLboolean( APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC )( GLuint64 handle ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint64 APIENTRY glGetTextureHandleNV( GLuint texture ); +GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV( GLuint texture, GLuint sampler ); +GLAPI void APIENTRY glMakeTextureHandleResidentNV( GLuint64 handle ); +GLAPI void APIENTRY glMakeTextureHandleNonResidentNV( GLuint64 handle ); +GLAPI GLuint64 APIENTRY glGetImageHandleNV( GLuint texture, GLint level, GLboolean layered, GLint layer, + GLenum format ); +GLAPI void APIENTRY glMakeImageHandleResidentNV( GLuint64 handle, GLenum access ); +GLAPI void APIENTRY glMakeImageHandleNonResidentNV( GLuint64 handle ); +GLAPI void APIENTRY glUniformHandleui64NV( GLint location, GLuint64 value ); +GLAPI void APIENTRY glUniformHandleui64vNV( GLint location, GLsizei count, const GLuint64 *value ); +GLAPI void APIENTRY glProgramUniformHandleui64NV( GLuint program, GLint location, GLuint64 value ); +GLAPI void APIENTRY glProgramUniformHandleui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64 *values ); +GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV( GLuint64 handle ); +GLAPI GLboolean APIENTRY glIsImageHandleResidentNV( GLuint64 handle ); +# endif #endif /* GL_NV_bindless_texture */ #ifndef GL_NV_blend_equation_advanced -#define GL_NV_blend_equation_advanced 1 -#define GL_BLEND_OVERLAP_NV 0x9281 -#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 -#define GL_BLUE_NV 0x1905 -#define GL_COLORBURN_NV 0x929A -#define GL_COLORDODGE_NV 0x9299 -#define GL_CONJOINT_NV 0x9284 -#define GL_CONTRAST_NV 0x92A1 -#define GL_DARKEN_NV 0x9297 -#define GL_DIFFERENCE_NV 0x929E -#define GL_DISJOINT_NV 0x9283 -#define GL_DST_ATOP_NV 0x928F -#define GL_DST_IN_NV 0x928B -#define GL_DST_NV 0x9287 -#define GL_DST_OUT_NV 0x928D -#define GL_DST_OVER_NV 0x9289 -#define GL_EXCLUSION_NV 0x92A0 -#define GL_GREEN_NV 0x1904 -#define GL_HARDLIGHT_NV 0x929B -#define GL_HARDMIX_NV 0x92A9 -#define GL_HSL_COLOR_NV 0x92AF -#define GL_HSL_HUE_NV 0x92AD -#define GL_HSL_LUMINOSITY_NV 0x92B0 -#define GL_HSL_SATURATION_NV 0x92AE -#define GL_INVERT_OVG_NV 0x92B4 -#define GL_INVERT_RGB_NV 0x92A3 -#define GL_LIGHTEN_NV 0x9298 -#define GL_LINEARBURN_NV 0x92A5 -#define GL_LINEARDODGE_NV 0x92A4 -#define GL_LINEARLIGHT_NV 0x92A7 -#define GL_MINUS_CLAMPED_NV 0x92B3 -#define GL_MINUS_NV 0x929F -#define GL_MULTIPLY_NV 0x9294 -#define GL_OVERLAY_NV 0x9296 -#define GL_PINLIGHT_NV 0x92A8 -#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2 -#define GL_PLUS_CLAMPED_NV 0x92B1 -#define GL_PLUS_DARKER_NV 0x9292 -#define GL_PLUS_NV 0x9291 -#define GL_RED_NV 0x1903 -#define GL_SCREEN_NV 0x9295 -#define GL_SOFTLIGHT_NV 0x929C -#define GL_SRC_ATOP_NV 0x928E -#define GL_SRC_IN_NV 0x928A -#define GL_SRC_NV 0x9286 -#define GL_SRC_OUT_NV 0x928C -#define GL_SRC_OVER_NV 0x9288 -#define GL_UNCORRELATED_NV 0x9282 -#define GL_VIVIDLIGHT_NV 0x92A6 -#define GL_XOR_NV 0x1506 -typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value); -GLAPI void APIENTRY glBlendBarrierNV (void); -#endif +# define GL_NV_blend_equation_advanced 1 +# define GL_BLEND_OVERLAP_NV 0x9281 +# define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 +# define GL_BLUE_NV 0x1905 +# define GL_COLORBURN_NV 0x929A +# define GL_COLORDODGE_NV 0x9299 +# define GL_CONJOINT_NV 0x9284 +# define GL_CONTRAST_NV 0x92A1 +# define GL_DARKEN_NV 0x9297 +# define GL_DIFFERENCE_NV 0x929E +# define GL_DISJOINT_NV 0x9283 +# define GL_DST_ATOP_NV 0x928F +# define GL_DST_IN_NV 0x928B +# define GL_DST_NV 0x9287 +# define GL_DST_OUT_NV 0x928D +# define GL_DST_OVER_NV 0x9289 +# define GL_EXCLUSION_NV 0x92A0 +# define GL_GREEN_NV 0x1904 +# define GL_HARDLIGHT_NV 0x929B +# define GL_HARDMIX_NV 0x92A9 +# define GL_HSL_COLOR_NV 0x92AF +# define GL_HSL_HUE_NV 0x92AD +# define GL_HSL_LUMINOSITY_NV 0x92B0 +# define GL_HSL_SATURATION_NV 0x92AE +# define GL_INVERT_OVG_NV 0x92B4 +# define GL_INVERT_RGB_NV 0x92A3 +# define GL_LIGHTEN_NV 0x9298 +# define GL_LINEARBURN_NV 0x92A5 +# define GL_LINEARDODGE_NV 0x92A4 +# define GL_LINEARLIGHT_NV 0x92A7 +# define GL_MINUS_CLAMPED_NV 0x92B3 +# define GL_MINUS_NV 0x929F +# define GL_MULTIPLY_NV 0x9294 +# define GL_OVERLAY_NV 0x9296 +# define GL_PINLIGHT_NV 0x92A8 +# define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2 +# define GL_PLUS_CLAMPED_NV 0x92B1 +# define GL_PLUS_DARKER_NV 0x9292 +# define GL_PLUS_NV 0x9291 +# define GL_RED_NV 0x1903 +# define GL_SCREEN_NV 0x9295 +# define GL_SOFTLIGHT_NV 0x929C +# define GL_SRC_ATOP_NV 0x928E +# define GL_SRC_IN_NV 0x928A +# define GL_SRC_NV 0x9286 +# define GL_SRC_OUT_NV 0x928C +# define GL_SRC_OVER_NV 0x9288 +# define GL_UNCORRELATED_NV 0x9282 +# define GL_VIVIDLIGHT_NV 0x92A6 +# define GL_XOR_NV 0x1506 +typedef void( APIENTRYP PFNGLBLENDPARAMETERINVPROC )( GLenum pname, GLint value ); +typedef void( APIENTRYP PFNGLBLENDBARRIERNVPROC )( void ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendParameteriNV( GLenum pname, GLint value ); +GLAPI void APIENTRY glBlendBarrierNV( void ); +# endif #endif /* GL_NV_blend_equation_advanced */ #ifndef GL_NV_blend_equation_advanced_coherent -#define GL_NV_blend_equation_advanced_coherent 1 -#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 +# define GL_NV_blend_equation_advanced_coherent 1 +# define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 #endif /* GL_NV_blend_equation_advanced_coherent */ #ifndef GL_NV_clip_space_w_scaling -#define GL_NV_clip_space_w_scaling 1 -#define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C -#define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D -#define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E -typedef void (APIENTRYP PFNGLVIEWPORTPOSITIONWSCALENVPROC) (GLuint index, GLfloat xcoeff, GLfloat ycoeff); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glViewportPositionWScaleNV (GLuint index, GLfloat xcoeff, GLfloat ycoeff); -#endif +# define GL_NV_clip_space_w_scaling 1 +# define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C +# define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D +# define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E +typedef void( APIENTRYP PFNGLVIEWPORTPOSITIONWSCALENVPROC )( GLuint index, GLfloat xcoeff, + GLfloat ycoeff ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportPositionWScaleNV( GLuint index, GLfloat xcoeff, GLfloat ycoeff ); +# endif #endif /* GL_NV_clip_space_w_scaling */ #ifndef GL_NV_command_list -#define GL_NV_command_list 1 -#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000 -#define GL_NOP_COMMAND_NV 0x0001 -#define GL_DRAW_ELEMENTS_COMMAND_NV 0x0002 -#define GL_DRAW_ARRAYS_COMMAND_NV 0x0003 -#define GL_DRAW_ELEMENTS_STRIP_COMMAND_NV 0x0004 -#define GL_DRAW_ARRAYS_STRIP_COMMAND_NV 0x0005 -#define GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV 0x0006 -#define GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV 0x0007 -#define GL_ELEMENT_ADDRESS_COMMAND_NV 0x0008 -#define GL_ATTRIBUTE_ADDRESS_COMMAND_NV 0x0009 -#define GL_UNIFORM_ADDRESS_COMMAND_NV 0x000A -#define GL_BLEND_COLOR_COMMAND_NV 0x000B -#define GL_STENCIL_REF_COMMAND_NV 0x000C -#define GL_LINE_WIDTH_COMMAND_NV 0x000D -#define GL_POLYGON_OFFSET_COMMAND_NV 0x000E -#define GL_ALPHA_REF_COMMAND_NV 0x000F -#define GL_VIEWPORT_COMMAND_NV 0x0010 -#define GL_SCISSOR_COMMAND_NV 0x0011 -#define GL_FRONT_FACE_COMMAND_NV 0x0012 -typedef void (APIENTRYP PFNGLCREATESTATESNVPROC) (GLsizei n, GLuint *states); -typedef void (APIENTRYP PFNGLDELETESTATESNVPROC) (GLsizei n, const GLuint *states); -typedef GLboolean (APIENTRYP PFNGLISSTATENVPROC) (GLuint state); -typedef void (APIENTRYP PFNGLSTATECAPTURENVPROC) (GLuint state, GLenum mode); -typedef GLuint (APIENTRYP PFNGLGETCOMMANDHEADERNVPROC) (GLenum tokenID, GLuint size); -typedef GLushort (APIENTRYP PFNGLGETSTAGEINDEXNVPROC) (GLenum shadertype); -typedef void (APIENTRYP PFNGLDRAWCOMMANDSNVPROC) (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count); -typedef void (APIENTRYP PFNGLDRAWCOMMANDSADDRESSNVPROC) (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count); -typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESNVPROC) (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); -typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESADDRESSNVPROC) (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); -typedef void (APIENTRYP PFNGLCREATECOMMANDLISTSNVPROC) (GLsizei n, GLuint *lists); -typedef void (APIENTRYP PFNGLDELETECOMMANDLISTSNVPROC) (GLsizei n, const GLuint *lists); -typedef GLboolean (APIENTRYP PFNGLISCOMMANDLISTNVPROC) (GLuint list); -typedef void (APIENTRYP PFNGLLISTDRAWCOMMANDSSTATESCLIENTNVPROC) (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); -typedef void (APIENTRYP PFNGLCOMMANDLISTSEGMENTSNVPROC) (GLuint list, GLuint segments); -typedef void (APIENTRYP PFNGLCOMPILECOMMANDLISTNVPROC) (GLuint list); -typedef void (APIENTRYP PFNGLCALLCOMMANDLISTNVPROC) (GLuint list); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCreateStatesNV (GLsizei n, GLuint *states); -GLAPI void APIENTRY glDeleteStatesNV (GLsizei n, const GLuint *states); -GLAPI GLboolean APIENTRY glIsStateNV (GLuint state); -GLAPI void APIENTRY glStateCaptureNV (GLuint state, GLenum mode); -GLAPI GLuint APIENTRY glGetCommandHeaderNV (GLenum tokenID, GLuint size); -GLAPI GLushort APIENTRY glGetStageIndexNV (GLenum shadertype); -GLAPI void APIENTRY glDrawCommandsNV (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count); -GLAPI void APIENTRY glDrawCommandsAddressNV (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count); -GLAPI void APIENTRY glDrawCommandsStatesNV (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); -GLAPI void APIENTRY glDrawCommandsStatesAddressNV (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); -GLAPI void APIENTRY glCreateCommandListsNV (GLsizei n, GLuint *lists); -GLAPI void APIENTRY glDeleteCommandListsNV (GLsizei n, const GLuint *lists); -GLAPI GLboolean APIENTRY glIsCommandListNV (GLuint list); -GLAPI void APIENTRY glListDrawCommandsStatesClientNV (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); -GLAPI void APIENTRY glCommandListSegmentsNV (GLuint list, GLuint segments); -GLAPI void APIENTRY glCompileCommandListNV (GLuint list); -GLAPI void APIENTRY glCallCommandListNV (GLuint list); -#endif +# define GL_NV_command_list 1 +# define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000 +# define GL_NOP_COMMAND_NV 0x0001 +# define GL_DRAW_ELEMENTS_COMMAND_NV 0x0002 +# define GL_DRAW_ARRAYS_COMMAND_NV 0x0003 +# define GL_DRAW_ELEMENTS_STRIP_COMMAND_NV 0x0004 +# define GL_DRAW_ARRAYS_STRIP_COMMAND_NV 0x0005 +# define GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV 0x0006 +# define GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV 0x0007 +# define GL_ELEMENT_ADDRESS_COMMAND_NV 0x0008 +# define GL_ATTRIBUTE_ADDRESS_COMMAND_NV 0x0009 +# define GL_UNIFORM_ADDRESS_COMMAND_NV 0x000A +# define GL_BLEND_COLOR_COMMAND_NV 0x000B +# define GL_STENCIL_REF_COMMAND_NV 0x000C +# define GL_LINE_WIDTH_COMMAND_NV 0x000D +# define GL_POLYGON_OFFSET_COMMAND_NV 0x000E +# define GL_ALPHA_REF_COMMAND_NV 0x000F +# define GL_VIEWPORT_COMMAND_NV 0x0010 +# define GL_SCISSOR_COMMAND_NV 0x0011 +# define GL_FRONT_FACE_COMMAND_NV 0x0012 +typedef void( APIENTRYP PFNGLCREATESTATESNVPROC )( GLsizei n, GLuint *states ); +typedef void( APIENTRYP PFNGLDELETESTATESNVPROC )( GLsizei n, const GLuint *states ); +typedef GLboolean( APIENTRYP PFNGLISSTATENVPROC )( GLuint state ); +typedef void( APIENTRYP PFNGLSTATECAPTURENVPROC )( GLuint state, GLenum mode ); +typedef GLuint( APIENTRYP PFNGLGETCOMMANDHEADERNVPROC )( GLenum tokenID, GLuint size ); +typedef GLushort( APIENTRYP PFNGLGETSTAGEINDEXNVPROC )( GLenum shadertype ); +typedef void( APIENTRYP PFNGLDRAWCOMMANDSNVPROC )( GLenum primitiveMode, GLuint buffer, + const GLintptr *indirects, const GLsizei *sizes, + GLuint count ); +typedef void( APIENTRYP PFNGLDRAWCOMMANDSADDRESSNVPROC )( GLenum primitiveMode, + const GLuint64 *indirects, + const GLsizei *sizes, GLuint count ); +typedef void( APIENTRYP PFNGLDRAWCOMMANDSSTATESNVPROC )( GLuint buffer, const GLintptr *indirects, + const GLsizei *sizes, const GLuint *states, + const GLuint *fbos, GLuint count ); +typedef void( APIENTRYP PFNGLDRAWCOMMANDSSTATESADDRESSNVPROC )( const GLuint64 *indirects, + const GLsizei * sizes, + const GLuint *states, const GLuint *fbos, + GLuint count ); +typedef void( APIENTRYP PFNGLCREATECOMMANDLISTSNVPROC )( GLsizei n, GLuint *lists ); +typedef void( APIENTRYP PFNGLDELETECOMMANDLISTSNVPROC )( GLsizei n, const GLuint *lists ); +typedef GLboolean( APIENTRYP PFNGLISCOMMANDLISTNVPROC )( GLuint list ); +typedef void( APIENTRYP PFNGLLISTDRAWCOMMANDSSTATESCLIENTNVPROC )( GLuint list, GLuint segment, + const void ** indirects, + const GLsizei *sizes, + const GLuint * states, + const GLuint *fbos, GLuint count ); +typedef void( APIENTRYP PFNGLCOMMANDLISTSEGMENTSNVPROC )( GLuint list, GLuint segments ); +typedef void( APIENTRYP PFNGLCOMPILECOMMANDLISTNVPROC )( GLuint list ); +typedef void( APIENTRYP PFNGLCALLCOMMANDLISTNVPROC )( GLuint list ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCreateStatesNV( GLsizei n, GLuint *states ); +GLAPI void APIENTRY glDeleteStatesNV( GLsizei n, const GLuint *states ); +GLAPI GLboolean APIENTRY glIsStateNV( GLuint state ); +GLAPI void APIENTRY glStateCaptureNV( GLuint state, GLenum mode ); +GLAPI GLuint APIENTRY glGetCommandHeaderNV( GLenum tokenID, GLuint size ); +GLAPI GLushort APIENTRY glGetStageIndexNV( GLenum shadertype ); +GLAPI void APIENTRY glDrawCommandsNV( GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, + const GLsizei *sizes, GLuint count ); +GLAPI void APIENTRY glDrawCommandsAddressNV( GLenum primitiveMode, const GLuint64 *indirects, + const GLsizei *sizes, GLuint count ); +GLAPI void APIENTRY glDrawCommandsStatesNV( GLuint buffer, const GLintptr *indirects, + const GLsizei *sizes, const GLuint *states, + const GLuint *fbos, GLuint count ); +GLAPI void APIENTRY glDrawCommandsStatesAddressNV( const GLuint64 *indirects, const GLsizei *sizes, + const GLuint *states, const GLuint *fbos, + GLuint count ); +GLAPI void APIENTRY glCreateCommandListsNV( GLsizei n, GLuint *lists ); +GLAPI void APIENTRY glDeleteCommandListsNV( GLsizei n, const GLuint *lists ); +GLAPI GLboolean APIENTRY glIsCommandListNV( GLuint list ); +GLAPI void APIENTRY glListDrawCommandsStatesClientNV( GLuint list, GLuint segment, + const void **indirects, const GLsizei *sizes, + const GLuint *states, const GLuint *fbos, + GLuint count ); +GLAPI void APIENTRY glCommandListSegmentsNV( GLuint list, GLuint segments ); +GLAPI void APIENTRY glCompileCommandListNV( GLuint list ); +GLAPI void APIENTRY glCallCommandListNV( GLuint list ); +# endif #endif /* GL_NV_command_list */ #ifndef GL_NV_conditional_render -#define GL_NV_conditional_render 1 -#define GL_QUERY_WAIT_NV 0x8E13 -#define GL_QUERY_NO_WAIT_NV 0x8E14 -#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); -GLAPI void APIENTRY glEndConditionalRenderNV (void); -#endif +# define GL_NV_conditional_render 1 +# define GL_QUERY_WAIT_NV 0x8E13 +# define GL_QUERY_NO_WAIT_NV 0x8E14 +# define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +# define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +typedef void( APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC )( GLuint id, GLenum mode ); +typedef void( APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC )( void ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginConditionalRenderNV( GLuint id, GLenum mode ); +GLAPI void APIENTRY glEndConditionalRenderNV( void ); +# endif #endif /* GL_NV_conditional_render */ #ifndef GL_NV_conservative_raster -#define GL_NV_conservative_raster 1 -#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 -#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 -#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 -#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 -typedef void (APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSubpixelPrecisionBiasNV (GLuint xbits, GLuint ybits); -#endif +# define GL_NV_conservative_raster 1 +# define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 +# define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 +# define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 +# define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 +typedef void( APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC )( GLuint xbits, GLuint ybits ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSubpixelPrecisionBiasNV( GLuint xbits, GLuint ybits ); +# endif #endif /* GL_NV_conservative_raster */ #ifndef GL_NV_conservative_raster_dilate -#define GL_NV_conservative_raster_dilate 1 -#define GL_CONSERVATIVE_RASTER_DILATE_NV 0x9379 -#define GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV 0x937A -#define GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV 0x937B -typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERFNVPROC) (GLenum pname, GLfloat value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glConservativeRasterParameterfNV (GLenum pname, GLfloat value); -#endif +# define GL_NV_conservative_raster_dilate 1 +# define GL_CONSERVATIVE_RASTER_DILATE_NV 0x9379 +# define GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV 0x937A +# define GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV 0x937B +typedef void( APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERFNVPROC )( GLenum pname, GLfloat value ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConservativeRasterParameterfNV( GLenum pname, GLfloat value ); +# endif #endif /* GL_NV_conservative_raster_dilate */ #ifndef GL_NV_conservative_raster_pre_snap_triangles -#define GL_NV_conservative_raster_pre_snap_triangles 1 -#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D -#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E -#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F -typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param); -#endif +# define GL_NV_conservative_raster_pre_snap_triangles 1 +# define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D +# define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E +# define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F +typedef void( APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC )( GLenum pname, GLint param ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConservativeRasterParameteriNV( GLenum pname, GLint param ); +# endif #endif /* GL_NV_conservative_raster_pre_snap_triangles */ #ifndef GL_NV_draw_vulkan_image -#define GL_NV_draw_vulkan_image 1 -typedef void (APIENTRY *GLVULKANPROCNV)(void); -typedef void (APIENTRYP PFNGLDRAWVKIMAGENVPROC) (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); -typedef GLVULKANPROCNV (APIENTRYP PFNGLGETVKPROCADDRNVPROC) (const GLchar *name); -typedef void (APIENTRYP PFNGLWAITVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); -typedef void (APIENTRYP PFNGLSIGNALVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); -typedef void (APIENTRYP PFNGLSIGNALVKFENCENVPROC) (GLuint64 vkFence); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawVkImageNV (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); -GLAPI GLVULKANPROCNV APIENTRY glGetVkProcAddrNV (const GLchar *name); -GLAPI void APIENTRY glWaitVkSemaphoreNV (GLuint64 vkSemaphore); -GLAPI void APIENTRY glSignalVkSemaphoreNV (GLuint64 vkSemaphore); -GLAPI void APIENTRY glSignalVkFenceNV (GLuint64 vkFence); -#endif +# define GL_NV_draw_vulkan_image 1 +typedef void( APIENTRY *GLVULKANPROCNV )( void ); +typedef void( APIENTRYP PFNGLDRAWVKIMAGENVPROC )( GLuint64 vkImage, GLuint sampler, GLfloat x0, + GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, + GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1 ); +typedef GLVULKANPROCNV( APIENTRYP PFNGLGETVKPROCADDRNVPROC )( const GLchar *name ); +typedef void( APIENTRYP PFNGLWAITVKSEMAPHORENVPROC )( GLuint64 vkSemaphore ); +typedef void( APIENTRYP PFNGLSIGNALVKSEMAPHORENVPROC )( GLuint64 vkSemaphore ); +typedef void( APIENTRYP PFNGLSIGNALVKFENCENVPROC )( GLuint64 vkFence ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawVkImageNV( GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, + GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, + GLfloat s1, GLfloat t1 ); +GLAPI GLVULKANPROCNV APIENTRY glGetVkProcAddrNV( const GLchar *name ); +GLAPI void APIENTRY glWaitVkSemaphoreNV( GLuint64 vkSemaphore ); +GLAPI void APIENTRY glSignalVkSemaphoreNV( GLuint64 vkSemaphore ); +GLAPI void APIENTRY glSignalVkFenceNV( GLuint64 vkFence ); +# endif #endif /* GL_NV_draw_vulkan_image */ #ifndef GL_NV_fill_rectangle -#define GL_NV_fill_rectangle 1 -#define GL_FILL_RECTANGLE_NV 0x933C +# define GL_NV_fill_rectangle 1 +# define GL_FILL_RECTANGLE_NV 0x933C #endif /* GL_NV_fill_rectangle */ #ifndef GL_NV_fragment_coverage_to_color -#define GL_NV_fragment_coverage_to_color 1 -#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD -#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE -typedef void (APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFragmentCoverageColorNV (GLuint color); -#endif +# define GL_NV_fragment_coverage_to_color 1 +# define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD +# define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE +typedef void( APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC )( GLuint color ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFragmentCoverageColorNV( GLuint color ); +# endif #endif /* GL_NV_fragment_coverage_to_color */ #ifndef GL_NV_fragment_shader_interlock -#define GL_NV_fragment_shader_interlock 1 +# define GL_NV_fragment_shader_interlock 1 #endif /* GL_NV_fragment_shader_interlock */ #ifndef GL_NV_framebuffer_mixed_samples -#define GL_NV_framebuffer_mixed_samples 1 -#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 -#define GL_COLOR_SAMPLES_NV 0x8E20 -#define GL_DEPTH_SAMPLES_NV 0x932D -#define GL_STENCIL_SAMPLES_NV 0x932E -#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F -#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 -#define GL_COVERAGE_MODULATION_NV 0x9332 -#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 -typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat *v); -typedef void (APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufsize, GLfloat *v); -typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCoverageModulationTableNV (GLsizei n, const GLfloat *v); -GLAPI void APIENTRY glGetCoverageModulationTableNV (GLsizei bufsize, GLfloat *v); -GLAPI void APIENTRY glCoverageModulationNV (GLenum components); -#endif +# define GL_NV_framebuffer_mixed_samples 1 +# define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 +# define GL_COLOR_SAMPLES_NV 0x8E20 +# define GL_DEPTH_SAMPLES_NV 0x932D +# define GL_STENCIL_SAMPLES_NV 0x932E +# define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F +# define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 +# define GL_COVERAGE_MODULATION_NV 0x9332 +# define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 +typedef void( APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC )( GLsizei n, const GLfloat *v ); +typedef void( APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC )( GLsizei bufsize, GLfloat *v ); +typedef void( APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC )( GLenum components ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCoverageModulationTableNV( GLsizei n, const GLfloat *v ); +GLAPI void APIENTRY glGetCoverageModulationTableNV( GLsizei bufsize, GLfloat *v ); +GLAPI void APIENTRY glCoverageModulationNV( GLenum components ); +# endif #endif /* GL_NV_framebuffer_mixed_samples */ #ifndef GL_NV_framebuffer_multisample_coverage -#define GL_NV_framebuffer_multisample_coverage 1 -#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB -#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 -#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 -#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -#endif +# define GL_NV_framebuffer_multisample_coverage 1 +# define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB +# define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 +# define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 +# define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 +typedef void( APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC )( + GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, + GLsizei height ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV( GLenum target, GLsizei coverageSamples, + GLsizei colorSamples, + GLenum internalformat, GLsizei width, + GLsizei height ); +# endif #endif /* GL_NV_framebuffer_multisample_coverage */ #ifndef GL_NV_geometry_shader_passthrough -#define GL_NV_geometry_shader_passthrough 1 +# define GL_NV_geometry_shader_passthrough 1 #endif /* GL_NV_geometry_shader_passthrough */ #ifndef GL_NV_gpu_shader5 -#define GL_NV_gpu_shader5 1 +# define GL_NV_gpu_shader5 1 typedef int64_t GLint64EXT; -#define GL_INT64_NV 0x140E -#define GL_UNSIGNED_INT64_NV 0x140F -#define GL_INT8_NV 0x8FE0 -#define GL_INT8_VEC2_NV 0x8FE1 -#define GL_INT8_VEC3_NV 0x8FE2 -#define GL_INT8_VEC4_NV 0x8FE3 -#define GL_INT16_NV 0x8FE4 -#define GL_INT16_VEC2_NV 0x8FE5 -#define GL_INT16_VEC3_NV 0x8FE6 -#define GL_INT16_VEC4_NV 0x8FE7 -#define GL_INT64_VEC2_NV 0x8FE9 -#define GL_INT64_VEC3_NV 0x8FEA -#define GL_INT64_VEC4_NV 0x8FEB -#define GL_UNSIGNED_INT8_NV 0x8FEC -#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED -#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE -#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF -#define GL_UNSIGNED_INT16_NV 0x8FF0 -#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 -#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 -#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 -#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 -#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 -#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 -#define GL_FLOAT16_NV 0x8FF8 -#define GL_FLOAT16_VEC2_NV 0x8FF9 -#define GL_FLOAT16_VEC3_NV 0x8FFA -#define GL_FLOAT16_VEC4_NV 0x8FFB -typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); -typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); -typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); -GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); -GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); -GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); -GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); -GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif +# define GL_INT64_NV 0x140E +# define GL_UNSIGNED_INT64_NV 0x140F +# define GL_INT8_NV 0x8FE0 +# define GL_INT8_VEC2_NV 0x8FE1 +# define GL_INT8_VEC3_NV 0x8FE2 +# define GL_INT8_VEC4_NV 0x8FE3 +# define GL_INT16_NV 0x8FE4 +# define GL_INT16_VEC2_NV 0x8FE5 +# define GL_INT16_VEC3_NV 0x8FE6 +# define GL_INT16_VEC4_NV 0x8FE7 +# define GL_INT64_VEC2_NV 0x8FE9 +# define GL_INT64_VEC3_NV 0x8FEA +# define GL_INT64_VEC4_NV 0x8FEB +# define GL_UNSIGNED_INT8_NV 0x8FEC +# define GL_UNSIGNED_INT8_VEC2_NV 0x8FED +# define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE +# define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF +# define GL_UNSIGNED_INT16_NV 0x8FF0 +# define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 +# define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 +# define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 +# define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 +# define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 +# define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 +# define GL_FLOAT16_NV 0x8FF8 +# define GL_FLOAT16_VEC2_NV 0x8FF9 +# define GL_FLOAT16_VEC3_NV 0x8FFA +# define GL_FLOAT16_VEC4_NV 0x8FFB +typedef void( APIENTRYP PFNGLUNIFORM1I64NVPROC )( GLint location, GLint64EXT x ); +typedef void( APIENTRYP PFNGLUNIFORM2I64NVPROC )( GLint location, GLint64EXT x, GLint64EXT y ); +typedef void( APIENTRYP PFNGLUNIFORM3I64NVPROC )( GLint location, GLint64EXT x, GLint64EXT y, + GLint64EXT z ); +typedef void( APIENTRYP PFNGLUNIFORM4I64NVPROC )( GLint location, GLint64EXT x, GLint64EXT y, + GLint64EXT z, GLint64EXT w ); +typedef void( APIENTRYP PFNGLUNIFORM1I64VNVPROC )( GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM2I64VNVPROC )( GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM3I64VNVPROC )( GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM4I64VNVPROC )( GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM1UI64NVPROC )( GLint location, GLuint64EXT x ); +typedef void( APIENTRYP PFNGLUNIFORM2UI64NVPROC )( GLint location, GLuint64EXT x, GLuint64EXT y ); +typedef void( APIENTRYP PFNGLUNIFORM3UI64NVPROC )( GLint location, GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z ); +typedef void( APIENTRYP PFNGLUNIFORM4UI64NVPROC )( GLint location, GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z, GLuint64EXT w ); +typedef void( APIENTRYP PFNGLUNIFORM1UI64VNVPROC )( GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM2UI64VNVPROC )( GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM3UI64VNVPROC )( GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM4UI64VNVPROC )( GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLGETUNIFORMI64VNVPROC )( GLuint program, GLint location, + GLint64EXT *params ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC )( GLuint program, GLint location, GLint64EXT x ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC )( GLuint program, GLint location, GLint64EXT x, + GLint64EXT y ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC )( GLuint program, GLint location, GLint64EXT x, + GLint64EXT y, GLint64EXT z ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC )( GLuint program, GLint location, GLint64EXT x, + GLint64EXT y, GLint64EXT z, GLint64EXT w ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC )( GLuint program, GLint location, + GLuint64EXT x ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC )( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC )( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y, GLuint64EXT z ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC )( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y, GLuint64EXT z, GLuint64EXT w ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64NV( GLint location, GLint64EXT x ); +GLAPI void APIENTRY glUniform2i64NV( GLint location, GLint64EXT x, GLint64EXT y ); +GLAPI void APIENTRY glUniform3i64NV( GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z ); +GLAPI void APIENTRY glUniform4i64NV( GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, + GLint64EXT w ); +GLAPI void APIENTRY glUniform1i64vNV( GLint location, GLsizei count, const GLint64EXT *value ); +GLAPI void APIENTRY glUniform2i64vNV( GLint location, GLsizei count, const GLint64EXT *value ); +GLAPI void APIENTRY glUniform3i64vNV( GLint location, GLsizei count, const GLint64EXT *value ); +GLAPI void APIENTRY glUniform4i64vNV( GLint location, GLsizei count, const GLint64EXT *value ); +GLAPI void APIENTRY glUniform1ui64NV( GLint location, GLuint64EXT x ); +GLAPI void APIENTRY glUniform2ui64NV( GLint location, GLuint64EXT x, GLuint64EXT y ); +GLAPI void APIENTRY glUniform3ui64NV( GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z ); +GLAPI void APIENTRY glUniform4ui64NV( GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, + GLuint64EXT w ); +GLAPI void APIENTRY glUniform1ui64vNV( GLint location, GLsizei count, const GLuint64EXT *value ); +GLAPI void APIENTRY glUniform2ui64vNV( GLint location, GLsizei count, const GLuint64EXT *value ); +GLAPI void APIENTRY glUniform3ui64vNV( GLint location, GLsizei count, const GLuint64EXT *value ); +GLAPI void APIENTRY glUniform4ui64vNV( GLint location, GLsizei count, const GLuint64EXT *value ); +GLAPI void APIENTRY glGetUniformi64vNV( GLuint program, GLint location, GLint64EXT *params ); +GLAPI void APIENTRY glProgramUniform1i64NV( GLuint program, GLint location, GLint64EXT x ); +GLAPI void APIENTRY glProgramUniform2i64NV( GLuint program, GLint location, GLint64EXT x, GLint64EXT y ); +GLAPI void APIENTRY glProgramUniform3i64NV( GLuint program, GLint location, GLint64EXT x, GLint64EXT y, + GLint64EXT z ); +GLAPI void APIENTRY glProgramUniform4i64NV( GLuint program, GLint location, GLint64EXT x, GLint64EXT y, + GLint64EXT z, GLint64EXT w ); +GLAPI void APIENTRY glProgramUniform1i64vNV( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +GLAPI void APIENTRY glProgramUniform2i64vNV( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +GLAPI void APIENTRY glProgramUniform3i64vNV( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +GLAPI void APIENTRY glProgramUniform4i64vNV( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +GLAPI void APIENTRY glProgramUniform1ui64NV( GLuint program, GLint location, GLuint64EXT x ); +GLAPI void APIENTRY glProgramUniform2ui64NV( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y ); +GLAPI void APIENTRY glProgramUniform3ui64NV( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y, GLuint64EXT z ); +GLAPI void APIENTRY glProgramUniform4ui64NV( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y, GLuint64EXT z, GLuint64EXT w ); +GLAPI void APIENTRY glProgramUniform1ui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +GLAPI void APIENTRY glProgramUniform2ui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +GLAPI void APIENTRY glProgramUniform3ui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +GLAPI void APIENTRY glProgramUniform4ui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +# endif #endif /* GL_NV_gpu_shader5 */ #ifndef GL_NV_internalformat_sample_query -#define GL_NV_internalformat_sample_query 1 -#define GL_MULTISAMPLES_NV 0x9371 -#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 -#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 -#define GL_CONFORMANT_NV 0x9374 -typedef void (APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params); -#endif +# define GL_NV_internalformat_sample_query 1 +# define GL_MULTISAMPLES_NV 0x9371 +# define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 +# define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 +# define GL_CONFORMANT_NV 0x9374 +typedef void( APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC )( GLenum target, GLenum internalformat, + GLsizei samples, GLenum pname, + GLsizei bufSize, GLint *params ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInternalformatSampleivNV( GLenum target, GLenum internalformat, GLsizei samples, + GLenum pname, GLsizei bufSize, GLint *params ); +# endif #endif /* GL_NV_internalformat_sample_query */ #ifndef GL_NV_path_rendering -#define GL_NV_path_rendering 1 -#define GL_PATH_FORMAT_SVG_NV 0x9070 -#define GL_PATH_FORMAT_PS_NV 0x9071 -#define GL_STANDARD_FONT_NAME_NV 0x9072 -#define GL_SYSTEM_FONT_NAME_NV 0x9073 -#define GL_FILE_NAME_NV 0x9074 -#define GL_PATH_STROKE_WIDTH_NV 0x9075 -#define GL_PATH_END_CAPS_NV 0x9076 -#define GL_PATH_INITIAL_END_CAP_NV 0x9077 -#define GL_PATH_TERMINAL_END_CAP_NV 0x9078 -#define GL_PATH_JOIN_STYLE_NV 0x9079 -#define GL_PATH_MITER_LIMIT_NV 0x907A -#define GL_PATH_DASH_CAPS_NV 0x907B -#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C -#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D -#define GL_PATH_DASH_OFFSET_NV 0x907E -#define GL_PATH_CLIENT_LENGTH_NV 0x907F -#define GL_PATH_FILL_MODE_NV 0x9080 -#define GL_PATH_FILL_MASK_NV 0x9081 -#define GL_PATH_FILL_COVER_MODE_NV 0x9082 -#define GL_PATH_STROKE_COVER_MODE_NV 0x9083 -#define GL_PATH_STROKE_MASK_NV 0x9084 -#define GL_COUNT_UP_NV 0x9088 -#define GL_COUNT_DOWN_NV 0x9089 -#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A -#define GL_CONVEX_HULL_NV 0x908B -#define GL_BOUNDING_BOX_NV 0x908D -#define GL_TRANSLATE_X_NV 0x908E -#define GL_TRANSLATE_Y_NV 0x908F -#define GL_TRANSLATE_2D_NV 0x9090 -#define GL_TRANSLATE_3D_NV 0x9091 -#define GL_AFFINE_2D_NV 0x9092 -#define GL_AFFINE_3D_NV 0x9094 -#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 -#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 -#define GL_UTF8_NV 0x909A -#define GL_UTF16_NV 0x909B -#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C -#define GL_PATH_COMMAND_COUNT_NV 0x909D -#define GL_PATH_COORD_COUNT_NV 0x909E -#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F -#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 -#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 -#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 -#define GL_SQUARE_NV 0x90A3 -#define GL_ROUND_NV 0x90A4 -#define GL_TRIANGULAR_NV 0x90A5 -#define GL_BEVEL_NV 0x90A6 -#define GL_MITER_REVERT_NV 0x90A7 -#define GL_MITER_TRUNCATE_NV 0x90A8 -#define GL_SKIP_MISSING_GLYPH_NV 0x90A9 -#define GL_USE_MISSING_GLYPH_NV 0x90AA -#define GL_PATH_ERROR_POSITION_NV 0x90AB -#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD -#define GL_ADJACENT_PAIRS_NV 0x90AE -#define GL_FIRST_TO_REST_NV 0x90AF -#define GL_PATH_GEN_MODE_NV 0x90B0 -#define GL_PATH_GEN_COEFF_NV 0x90B1 -#define GL_PATH_GEN_COMPONENTS_NV 0x90B3 -#define GL_PATH_STENCIL_FUNC_NV 0x90B7 -#define GL_PATH_STENCIL_REF_NV 0x90B8 -#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 -#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD -#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE -#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF -#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 -#define GL_MOVE_TO_RESETS_NV 0x90B5 -#define GL_MOVE_TO_CONTINUES_NV 0x90B6 -#define GL_CLOSE_PATH_NV 0x00 -#define GL_MOVE_TO_NV 0x02 -#define GL_RELATIVE_MOVE_TO_NV 0x03 -#define GL_LINE_TO_NV 0x04 -#define GL_RELATIVE_LINE_TO_NV 0x05 -#define GL_HORIZONTAL_LINE_TO_NV 0x06 -#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 -#define GL_VERTICAL_LINE_TO_NV 0x08 -#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 -#define GL_QUADRATIC_CURVE_TO_NV 0x0A -#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B -#define GL_CUBIC_CURVE_TO_NV 0x0C -#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D -#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E -#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F -#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 -#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 -#define GL_SMALL_CCW_ARC_TO_NV 0x12 -#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 -#define GL_SMALL_CW_ARC_TO_NV 0x14 -#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 -#define GL_LARGE_CCW_ARC_TO_NV 0x16 -#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 -#define GL_LARGE_CW_ARC_TO_NV 0x18 -#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 -#define GL_RESTART_PATH_NV 0xF0 -#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 -#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 -#define GL_RECT_NV 0xF6 -#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 -#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA -#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC -#define GL_ARC_TO_NV 0xFE -#define GL_RELATIVE_ARC_TO_NV 0xFF -#define GL_BOLD_BIT_NV 0x01 -#define GL_ITALIC_BIT_NV 0x02 -#define GL_GLYPH_WIDTH_BIT_NV 0x01 -#define GL_GLYPH_HEIGHT_BIT_NV 0x02 -#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 -#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 -#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 -#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 -#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 -#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 -#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 -#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 -#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 -#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 -#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 -#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 -#define GL_FONT_ASCENDER_BIT_NV 0x00200000 -#define GL_FONT_DESCENDER_BIT_NV 0x00400000 -#define GL_FONT_HEIGHT_BIT_NV 0x00800000 -#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 -#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 -#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 -#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 -#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 -#define GL_ROUNDED_RECT_NV 0xE8 -#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 -#define GL_ROUNDED_RECT2_NV 0xEA -#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB -#define GL_ROUNDED_RECT4_NV 0xEC -#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED -#define GL_ROUNDED_RECT8_NV 0xEE -#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF -#define GL_RELATIVE_RECT_NV 0xF7 -#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368 -#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369 -#define GL_FONT_UNAVAILABLE_NV 0x936A -#define GL_FONT_UNINTELLIGIBLE_NV 0x936B -#define GL_CONIC_CURVE_TO_NV 0x1A -#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B -#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000 -#define GL_STANDARD_FONT_FORMAT_NV 0x936C -#define GL_PATH_PROJECTION_NV 0x1701 -#define GL_PATH_MODELVIEW_NV 0x1700 -#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 -#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6 -#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36 -#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3 -#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4 -#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7 -#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38 -#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4 -#define GL_FRAGMENT_INPUT_NV 0x936D -typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range); -typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range); -typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path); -typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString); -typedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); -typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath); -typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); -typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value); -typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value); -typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value); -typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray); -typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units); -typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); -typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); -typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); -typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value); -typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands); -typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords); -typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray); -typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); -typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); -typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); -typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); -typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); -typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); -typedef void (APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); -typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode); -typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); -typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef GLenum (APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); -typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range); -GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range); -GLAPI GLboolean APIENTRY glIsPathNV (GLuint path); -GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); -GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); -GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString); -GLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); -GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath); -GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); -GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value); -GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value); -GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value); -GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value); -GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray); -GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units); -GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask); -GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask); -GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func); -GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); -GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); -GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value); -GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands); -GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords); -GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); -GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); -GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); -GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); -GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); -GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); -GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); -GLAPI void APIENTRY glMatrixLoad3x2fNV (GLenum matrixMode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoad3x3fNV (GLenum matrixMode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoadTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMult3x2fNV (GLenum matrixMode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMult3x3fNV (GLenum matrixMode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMultTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); -GLAPI void APIENTRY glStencilThenCoverFillPathNV (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); -GLAPI void APIENTRY glStencilThenCoverStrokePathNV (GLuint path, GLint reference, GLuint mask, GLenum coverMode); -GLAPI void APIENTRY glStencilThenCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glStencilThenCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GLAPI GLenum APIENTRY glPathGlyphIndexRangeNV (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); -GLAPI GLenum APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GLAPI GLenum APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GLAPI void APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); -GLAPI void APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params); -#endif +# define GL_NV_path_rendering 1 +# define GL_PATH_FORMAT_SVG_NV 0x9070 +# define GL_PATH_FORMAT_PS_NV 0x9071 +# define GL_STANDARD_FONT_NAME_NV 0x9072 +# define GL_SYSTEM_FONT_NAME_NV 0x9073 +# define GL_FILE_NAME_NV 0x9074 +# define GL_PATH_STROKE_WIDTH_NV 0x9075 +# define GL_PATH_END_CAPS_NV 0x9076 +# define GL_PATH_INITIAL_END_CAP_NV 0x9077 +# define GL_PATH_TERMINAL_END_CAP_NV 0x9078 +# define GL_PATH_JOIN_STYLE_NV 0x9079 +# define GL_PATH_MITER_LIMIT_NV 0x907A +# define GL_PATH_DASH_CAPS_NV 0x907B +# define GL_PATH_INITIAL_DASH_CAP_NV 0x907C +# define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D +# define GL_PATH_DASH_OFFSET_NV 0x907E +# define GL_PATH_CLIENT_LENGTH_NV 0x907F +# define GL_PATH_FILL_MODE_NV 0x9080 +# define GL_PATH_FILL_MASK_NV 0x9081 +# define GL_PATH_FILL_COVER_MODE_NV 0x9082 +# define GL_PATH_STROKE_COVER_MODE_NV 0x9083 +# define GL_PATH_STROKE_MASK_NV 0x9084 +# define GL_COUNT_UP_NV 0x9088 +# define GL_COUNT_DOWN_NV 0x9089 +# define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A +# define GL_CONVEX_HULL_NV 0x908B +# define GL_BOUNDING_BOX_NV 0x908D +# define GL_TRANSLATE_X_NV 0x908E +# define GL_TRANSLATE_Y_NV 0x908F +# define GL_TRANSLATE_2D_NV 0x9090 +# define GL_TRANSLATE_3D_NV 0x9091 +# define GL_AFFINE_2D_NV 0x9092 +# define GL_AFFINE_3D_NV 0x9094 +# define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 +# define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 +# define GL_UTF8_NV 0x909A +# define GL_UTF16_NV 0x909B +# define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C +# define GL_PATH_COMMAND_COUNT_NV 0x909D +# define GL_PATH_COORD_COUNT_NV 0x909E +# define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F +# define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 +# define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 +# define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 +# define GL_SQUARE_NV 0x90A3 +# define GL_ROUND_NV 0x90A4 +# define GL_TRIANGULAR_NV 0x90A5 +# define GL_BEVEL_NV 0x90A6 +# define GL_MITER_REVERT_NV 0x90A7 +# define GL_MITER_TRUNCATE_NV 0x90A8 +# define GL_SKIP_MISSING_GLYPH_NV 0x90A9 +# define GL_USE_MISSING_GLYPH_NV 0x90AA +# define GL_PATH_ERROR_POSITION_NV 0x90AB +# define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD +# define GL_ADJACENT_PAIRS_NV 0x90AE +# define GL_FIRST_TO_REST_NV 0x90AF +# define GL_PATH_GEN_MODE_NV 0x90B0 +# define GL_PATH_GEN_COEFF_NV 0x90B1 +# define GL_PATH_GEN_COMPONENTS_NV 0x90B3 +# define GL_PATH_STENCIL_FUNC_NV 0x90B7 +# define GL_PATH_STENCIL_REF_NV 0x90B8 +# define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 +# define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD +# define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE +# define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF +# define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 +# define GL_MOVE_TO_RESETS_NV 0x90B5 +# define GL_MOVE_TO_CONTINUES_NV 0x90B6 +# define GL_CLOSE_PATH_NV 0x00 +# define GL_MOVE_TO_NV 0x02 +# define GL_RELATIVE_MOVE_TO_NV 0x03 +# define GL_LINE_TO_NV 0x04 +# define GL_RELATIVE_LINE_TO_NV 0x05 +# define GL_HORIZONTAL_LINE_TO_NV 0x06 +# define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 +# define GL_VERTICAL_LINE_TO_NV 0x08 +# define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 +# define GL_QUADRATIC_CURVE_TO_NV 0x0A +# define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B +# define GL_CUBIC_CURVE_TO_NV 0x0C +# define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D +# define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E +# define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F +# define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 +# define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 +# define GL_SMALL_CCW_ARC_TO_NV 0x12 +# define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 +# define GL_SMALL_CW_ARC_TO_NV 0x14 +# define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 +# define GL_LARGE_CCW_ARC_TO_NV 0x16 +# define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 +# define GL_LARGE_CW_ARC_TO_NV 0x18 +# define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 +# define GL_RESTART_PATH_NV 0xF0 +# define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 +# define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 +# define GL_RECT_NV 0xF6 +# define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 +# define GL_CIRCULAR_CW_ARC_TO_NV 0xFA +# define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC +# define GL_ARC_TO_NV 0xFE +# define GL_RELATIVE_ARC_TO_NV 0xFF +# define GL_BOLD_BIT_NV 0x01 +# define GL_ITALIC_BIT_NV 0x02 +# define GL_GLYPH_WIDTH_BIT_NV 0x01 +# define GL_GLYPH_HEIGHT_BIT_NV 0x02 +# define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 +# define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 +# define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 +# define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 +# define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 +# define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 +# define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 +# define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 +# define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 +# define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 +# define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 +# define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 +# define GL_FONT_ASCENDER_BIT_NV 0x00200000 +# define GL_FONT_DESCENDER_BIT_NV 0x00400000 +# define GL_FONT_HEIGHT_BIT_NV 0x00800000 +# define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 +# define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 +# define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 +# define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 +# define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 +# define GL_ROUNDED_RECT_NV 0xE8 +# define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 +# define GL_ROUNDED_RECT2_NV 0xEA +# define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB +# define GL_ROUNDED_RECT4_NV 0xEC +# define GL_RELATIVE_ROUNDED_RECT4_NV 0xED +# define GL_ROUNDED_RECT8_NV 0xEE +# define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF +# define GL_RELATIVE_RECT_NV 0xF7 +# define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368 +# define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369 +# define GL_FONT_UNAVAILABLE_NV 0x936A +# define GL_FONT_UNINTELLIGIBLE_NV 0x936B +# define GL_CONIC_CURVE_TO_NV 0x1A +# define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B +# define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000 +# define GL_STANDARD_FONT_FORMAT_NV 0x936C +# define GL_PATH_PROJECTION_NV 0x1701 +# define GL_PATH_MODELVIEW_NV 0x1700 +# define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 +# define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6 +# define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36 +# define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3 +# define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4 +# define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7 +# define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38 +# define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4 +# define GL_FRAGMENT_INPUT_NV 0x936D +typedef GLuint( APIENTRYP PFNGLGENPATHSNVPROC )( GLsizei range ); +typedef void( APIENTRYP PFNGLDELETEPATHSNVPROC )( GLuint path, GLsizei range ); +typedef GLboolean( APIENTRYP PFNGLISPATHNVPROC )( GLuint path ); +typedef void( APIENTRYP PFNGLPATHCOMMANDSNVPROC )( GLuint path, GLsizei numCommands, + const GLubyte *commands, GLsizei numCoords, + GLenum coordType, const void *coords ); +typedef void( APIENTRYP PFNGLPATHCOORDSNVPROC )( GLuint path, GLsizei numCoords, GLenum coordType, + const void *coords ); +typedef void( APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC )( GLuint path, GLsizei commandStart, + GLsizei commandsToDelete, GLsizei numCommands, + const GLubyte *commands, GLsizei numCoords, + GLenum coordType, const void *coords ); +typedef void( APIENTRYP PFNGLPATHSUBCOORDSNVPROC )( GLuint path, GLsizei coordStart, GLsizei numCoords, + GLenum coordType, const void *coords ); +typedef void( APIENTRYP PFNGLPATHSTRINGNVPROC )( GLuint path, GLenum format, GLsizei length, + const void *pathString ); +typedef void( APIENTRYP PFNGLPATHGLYPHSNVPROC )( GLuint firstPathName, GLenum fontTarget, + const void *fontName, GLbitfield fontStyle, + GLsizei numGlyphs, GLenum type, const void *charcodes, + GLenum handleMissingGlyphs, + GLuint pathParameterTemplate, GLfloat emScale ); +typedef void( APIENTRYP PFNGLPATHGLYPHRANGENVPROC )( GLuint firstPathName, GLenum fontTarget, + const void *fontName, GLbitfield fontStyle, + GLuint firstGlyph, GLsizei numGlyphs, + GLenum handleMissingGlyphs, + GLuint pathParameterTemplate, GLfloat emScale ); +typedef void( APIENTRYP PFNGLWEIGHTPATHSNVPROC )( GLuint resultPath, GLsizei numPaths, + const GLuint *paths, const GLfloat *weights ); +typedef void( APIENTRYP PFNGLCOPYPATHNVPROC )( GLuint resultPath, GLuint srcPath ); +typedef void( APIENTRYP PFNGLINTERPOLATEPATHSNVPROC )( GLuint resultPath, GLuint pathA, GLuint pathB, + GLfloat weight ); +typedef void( APIENTRYP PFNGLTRANSFORMPATHNVPROC )( GLuint resultPath, GLuint srcPath, + GLenum transformType, + const GLfloat *transformValues ); +typedef void( APIENTRYP PFNGLPATHPARAMETERIVNVPROC )( GLuint path, GLenum pname, const GLint *value ); +typedef void( APIENTRYP PFNGLPATHPARAMETERINVPROC )( GLuint path, GLenum pname, GLint value ); +typedef void( APIENTRYP PFNGLPATHPARAMETERFVNVPROC )( GLuint path, GLenum pname, const GLfloat *value ); +typedef void( APIENTRYP PFNGLPATHPARAMETERFNVPROC )( GLuint path, GLenum pname, GLfloat value ); +typedef void( APIENTRYP PFNGLPATHDASHARRAYNVPROC )( GLuint path, GLsizei dashCount, + const GLfloat *dashArray ); +typedef void( APIENTRYP PFNGLPATHSTENCILFUNCNVPROC )( GLenum func, GLint ref, GLuint mask ); +typedef void( APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC )( GLfloat factor, GLfloat units ); +typedef void( APIENTRYP PFNGLSTENCILFILLPATHNVPROC )( GLuint path, GLenum fillMode, GLuint mask ); +typedef void( APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC )( GLuint path, GLint reference, GLuint mask ); +typedef void( APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC )( GLsizei numPaths, GLenum pathNameType, + const void *paths, GLuint pathBase, + GLenum fillMode, GLuint mask, + GLenum transformType, + const GLfloat *transformValues ); +typedef void( APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC )( GLsizei numPaths, GLenum pathNameType, + const void *paths, GLuint pathBase, + GLint reference, GLuint mask, + GLenum transformType, + const GLfloat *transformValues ); +typedef void( APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC )( GLenum func ); +typedef void( APIENTRYP PFNGLCOVERFILLPATHNVPROC )( GLuint path, GLenum coverMode ); +typedef void( APIENTRYP PFNGLCOVERSTROKEPATHNVPROC )( GLuint path, GLenum coverMode ); +typedef void( APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC )( GLsizei numPaths, GLenum pathNameType, + const void *paths, GLuint pathBase, + GLenum coverMode, GLenum transformType, + const GLfloat *transformValues ); +typedef void( APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC )( GLsizei numPaths, GLenum pathNameType, + const void *paths, GLuint pathBase, + GLenum coverMode, GLenum transformType, + const GLfloat *transformValues ); +typedef void( APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC )( GLuint path, GLenum pname, GLint *value ); +typedef void( APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC )( GLuint path, GLenum pname, GLfloat *value ); +typedef void( APIENTRYP PFNGLGETPATHCOMMANDSNVPROC )( GLuint path, GLubyte *commands ); +typedef void( APIENTRYP PFNGLGETPATHCOORDSNVPROC )( GLuint path, GLfloat *coords ); +typedef void( APIENTRYP PFNGLGETPATHDASHARRAYNVPROC )( GLuint path, GLfloat *dashArray ); +typedef void( APIENTRYP PFNGLGETPATHMETRICSNVPROC )( GLbitfield metricQueryMask, GLsizei numPaths, + GLenum pathNameType, const void *paths, + GLuint pathBase, GLsizei stride, GLfloat *metrics ); +typedef void( APIENTRYP PFNGLGETPATHMETRICRANGENVPROC )( GLbitfield metricQueryMask, + GLuint firstPathName, GLsizei numPaths, + GLsizei stride, GLfloat *metrics ); +typedef void( APIENTRYP PFNGLGETPATHSPACINGNVPROC )( GLenum pathListMode, GLsizei numPaths, + GLenum pathNameType, const void *paths, + GLuint pathBase, GLfloat advanceScale, + GLfloat kerningScale, GLenum transformType, + GLfloat *returnedSpacing ); +typedef GLboolean( APIENTRYP PFNGLISPOINTINFILLPATHNVPROC )( GLuint path, GLuint mask, GLfloat x, + GLfloat y ); +typedef GLboolean( APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC )( GLuint path, GLfloat x, GLfloat y ); +typedef GLfloat( APIENTRYP PFNGLGETPATHLENGTHNVPROC )( GLuint path, GLsizei startSegment, + GLsizei numSegments ); +typedef GLboolean( APIENTRYP PFNGLPOINTALONGPATHNVPROC )( GLuint path, GLsizei startSegment, + GLsizei numSegments, GLfloat distance, + GLfloat *x, GLfloat *y, GLfloat *tangentX, + GLfloat *tangentY ); +typedef void( APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC )( GLenum matrixMode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC )( GLenum matrixMode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC )( GLenum matrixMode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXMULT3X2FNVPROC )( GLenum matrixMode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXMULT3X3FNVPROC )( GLenum matrixMode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC )( GLenum matrixMode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC )( GLuint path, GLenum fillMode, GLuint mask, + GLenum coverMode ); +typedef void( APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC )( GLuint path, GLint reference, + GLuint mask, GLenum coverMode ); +typedef void( APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC )( + GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, + GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues ); +typedef void( APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC )( + GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, + GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues ); +typedef GLenum( APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC )( GLenum fontTarget, const void *fontName, + GLbitfield fontStyle, + GLuint pathParameterTemplate, + GLfloat emScale, GLuint baseAndCount[2] ); +typedef GLenum( APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC )( GLuint firstPathName, GLenum fontTarget, + const void *fontName, GLbitfield fontStyle, + GLuint firstGlyphIndex, GLsizei numGlyphs, + GLuint pathParameterTemplate, + GLfloat emScale ); +typedef GLenum( APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC )( + GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, + GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, + GLfloat emScale ); +typedef void( APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC )( GLuint program, GLint location, + GLenum genMode, GLint components, + const GLfloat *coeffs ); +typedef void( APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC )( GLuint program, GLenum programInterface, + GLuint index, GLsizei propCount, + const GLenum *props, GLsizei bufSize, + GLsizei *length, GLfloat *params ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenPathsNV( GLsizei range ); +GLAPI void APIENTRY glDeletePathsNV( GLuint path, GLsizei range ); +GLAPI GLboolean APIENTRY glIsPathNV( GLuint path ); +GLAPI void APIENTRY glPathCommandsNV( GLuint path, GLsizei numCommands, const GLubyte *commands, + GLsizei numCoords, GLenum coordType, const void *coords ); +GLAPI void APIENTRY glPathCoordsNV( GLuint path, GLsizei numCoords, GLenum coordType, + const void *coords ); +GLAPI void APIENTRY glPathSubCommandsNV( GLuint path, GLsizei commandStart, GLsizei commandsToDelete, + GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, + GLenum coordType, const void *coords ); +GLAPI void APIENTRY glPathSubCoordsNV( GLuint path, GLsizei coordStart, GLsizei numCoords, + GLenum coordType, const void *coords ); +GLAPI void APIENTRY glPathStringNV( GLuint path, GLenum format, GLsizei length, const void *pathString ); +GLAPI void APIENTRY glPathGlyphsNV( GLuint firstPathName, GLenum fontTarget, const void *fontName, + GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, + const void *charcodes, GLenum handleMissingGlyphs, + GLuint pathParameterTemplate, GLfloat emScale ); +GLAPI void APIENTRY glPathGlyphRangeNV( GLuint firstPathName, GLenum fontTarget, const void *fontName, + GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, + GLenum handleMissingGlyphs, GLuint pathParameterTemplate, + GLfloat emScale ); +GLAPI void APIENTRY glWeightPathsNV( GLuint resultPath, GLsizei numPaths, const GLuint *paths, + const GLfloat *weights ); +GLAPI void APIENTRY glCopyPathNV( GLuint resultPath, GLuint srcPath ); +GLAPI void APIENTRY glInterpolatePathsNV( GLuint resultPath, GLuint pathA, GLuint pathB, + GLfloat weight ); +GLAPI void APIENTRY glTransformPathNV( GLuint resultPath, GLuint srcPath, GLenum transformType, + const GLfloat *transformValues ); +GLAPI void APIENTRY glPathParameterivNV( GLuint path, GLenum pname, const GLint *value ); +GLAPI void APIENTRY glPathParameteriNV( GLuint path, GLenum pname, GLint value ); +GLAPI void APIENTRY glPathParameterfvNV( GLuint path, GLenum pname, const GLfloat *value ); +GLAPI void APIENTRY glPathParameterfNV( GLuint path, GLenum pname, GLfloat value ); +GLAPI void APIENTRY glPathDashArrayNV( GLuint path, GLsizei dashCount, const GLfloat *dashArray ); +GLAPI void APIENTRY glPathStencilFuncNV( GLenum func, GLint ref, GLuint mask ); +GLAPI void APIENTRY glPathStencilDepthOffsetNV( GLfloat factor, GLfloat units ); +GLAPI void APIENTRY glStencilFillPathNV( GLuint path, GLenum fillMode, GLuint mask ); +GLAPI void APIENTRY glStencilStrokePathNV( GLuint path, GLint reference, GLuint mask ); +GLAPI void APIENTRY glStencilFillPathInstancedNV( GLsizei numPaths, GLenum pathNameType, + const void *paths, GLuint pathBase, GLenum fillMode, + GLuint mask, GLenum transformType, + const GLfloat *transformValues ); +GLAPI void APIENTRY glStencilStrokePathInstancedNV( GLsizei numPaths, GLenum pathNameType, + const void *paths, GLuint pathBase, GLint reference, + GLuint mask, GLenum transformType, + const GLfloat *transformValues ); +GLAPI void APIENTRY glPathCoverDepthFuncNV( GLenum func ); +GLAPI void APIENTRY glCoverFillPathNV( GLuint path, GLenum coverMode ); +GLAPI void APIENTRY glCoverStrokePathNV( GLuint path, GLenum coverMode ); +GLAPI void APIENTRY glCoverFillPathInstancedNV( GLsizei numPaths, GLenum pathNameType, const void *paths, + GLuint pathBase, GLenum coverMode, GLenum transformType, + const GLfloat *transformValues ); +GLAPI void APIENTRY glCoverStrokePathInstancedNV( GLsizei numPaths, GLenum pathNameType, + const void *paths, GLuint pathBase, GLenum coverMode, + GLenum transformType, const GLfloat *transformValues ); +GLAPI void APIENTRY glGetPathParameterivNV( GLuint path, GLenum pname, GLint *value ); +GLAPI void APIENTRY glGetPathParameterfvNV( GLuint path, GLenum pname, GLfloat *value ); +GLAPI void APIENTRY glGetPathCommandsNV( GLuint path, GLubyte *commands ); +GLAPI void APIENTRY glGetPathCoordsNV( GLuint path, GLfloat *coords ); +GLAPI void APIENTRY glGetPathDashArrayNV( GLuint path, GLfloat *dashArray ); +GLAPI void APIENTRY glGetPathMetricsNV( GLbitfield metricQueryMask, GLsizei numPaths, + GLenum pathNameType, const void *paths, GLuint pathBase, + GLsizei stride, GLfloat *metrics ); +GLAPI void APIENTRY glGetPathMetricRangeNV( GLbitfield metricQueryMask, GLuint firstPathName, + GLsizei numPaths, GLsizei stride, GLfloat *metrics ); +GLAPI void APIENTRY glGetPathSpacingNV( GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, + const void *paths, GLuint pathBase, GLfloat advanceScale, + GLfloat kerningScale, GLenum transformType, + GLfloat *returnedSpacing ); +GLAPI GLboolean APIENTRY glIsPointInFillPathNV( GLuint path, GLuint mask, GLfloat x, GLfloat y ); +GLAPI GLboolean APIENTRY glIsPointInStrokePathNV( GLuint path, GLfloat x, GLfloat y ); +GLAPI GLfloat APIENTRY glGetPathLengthNV( GLuint path, GLsizei startSegment, GLsizei numSegments ); +GLAPI GLboolean APIENTRY glPointAlongPathNV( GLuint path, GLsizei startSegment, GLsizei numSegments, + GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, + GLfloat *tangentY ); +GLAPI void APIENTRY glMatrixLoad3x2fNV( GLenum matrixMode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixLoad3x3fNV( GLenum matrixMode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixLoadTranspose3x3fNV( GLenum matrixMode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixMult3x2fNV( GLenum matrixMode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixMult3x3fNV( GLenum matrixMode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixMultTranspose3x3fNV( GLenum matrixMode, const GLfloat *m ); +GLAPI void APIENTRY glStencilThenCoverFillPathNV( GLuint path, GLenum fillMode, GLuint mask, + GLenum coverMode ); +GLAPI void APIENTRY glStencilThenCoverStrokePathNV( GLuint path, GLint reference, GLuint mask, + GLenum coverMode ); +GLAPI void APIENTRY glStencilThenCoverFillPathInstancedNV( GLsizei numPaths, GLenum pathNameType, + const void *paths, GLuint pathBase, + GLenum fillMode, GLuint mask, + GLenum coverMode, GLenum transformType, + const GLfloat *transformValues ); +GLAPI void APIENTRY glStencilThenCoverStrokePathInstancedNV( GLsizei numPaths, GLenum pathNameType, + const void *paths, GLuint pathBase, + GLint reference, GLuint mask, + GLenum coverMode, GLenum transformType, + const GLfloat *transformValues ); +GLAPI GLenum APIENTRY glPathGlyphIndexRangeNV( GLenum fontTarget, const void *fontName, + GLbitfield fontStyle, GLuint pathParameterTemplate, + GLfloat emScale, GLuint baseAndCount[2] ); +GLAPI GLenum APIENTRY glPathGlyphIndexArrayNV( GLuint firstPathName, GLenum fontTarget, + const void *fontName, GLbitfield fontStyle, + GLuint firstGlyphIndex, GLsizei numGlyphs, + GLuint pathParameterTemplate, GLfloat emScale ); +GLAPI GLenum APIENTRY glPathMemoryGlyphIndexArrayNV( GLuint firstPathName, GLenum fontTarget, + GLsizeiptr fontSize, const void *fontData, + GLsizei faceIndex, GLuint firstGlyphIndex, + GLsizei numGlyphs, GLuint pathParameterTemplate, + GLfloat emScale ); +GLAPI void APIENTRY glProgramPathFragmentInputGenNV( GLuint program, GLint location, GLenum genMode, + GLint components, const GLfloat *coeffs ); +GLAPI void APIENTRY glGetProgramResourcefvNV( GLuint program, GLenum programInterface, GLuint index, + GLsizei propCount, const GLenum *props, GLsizei bufSize, + GLsizei *length, GLfloat *params ); +# endif #endif /* GL_NV_path_rendering */ #ifndef GL_NV_path_rendering_shared_edge -#define GL_NV_path_rendering_shared_edge 1 -#define GL_SHARED_EDGE_NV 0xC0 +# define GL_NV_path_rendering_shared_edge 1 +# define GL_SHARED_EDGE_NV 0xC0 #endif /* GL_NV_path_rendering_shared_edge */ #ifndef GL_NV_sample_locations -#define GL_NV_sample_locations 1 -#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D -#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E -#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F -#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 -#define GL_SAMPLE_LOCATION_NV 0x8E50 -#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 -#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 -#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 -typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glResolveDepthValuesNV (void); -#endif +# define GL_NV_sample_locations 1 +# define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D +# define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E +# define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F +# define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 +# define GL_SAMPLE_LOCATION_NV 0x8E50 +# define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 +# define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 +# define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 +typedef void( APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC )( GLenum target, GLuint start, + GLsizei count, const GLfloat *v ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC )( GLuint framebuffer, GLuint start, + GLsizei count, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC )( void ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferSampleLocationsfvNV( GLenum target, GLuint start, GLsizei count, + const GLfloat *v ); +GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvNV( GLuint framebuffer, GLuint start, + GLsizei count, const GLfloat *v ); +GLAPI void APIENTRY glResolveDepthValuesNV( void ); +# endif #endif /* GL_NV_sample_locations */ #ifndef GL_NV_sample_mask_override_coverage -#define GL_NV_sample_mask_override_coverage 1 +# define GL_NV_sample_mask_override_coverage 1 #endif /* GL_NV_sample_mask_override_coverage */ #ifndef GL_NV_shader_atomic_counters -#define GL_NV_shader_atomic_counters 1 +# define GL_NV_shader_atomic_counters 1 #endif /* GL_NV_shader_atomic_counters */ #ifndef GL_NV_shader_atomic_float -#define GL_NV_shader_atomic_float 1 +# define GL_NV_shader_atomic_float 1 #endif /* GL_NV_shader_atomic_float */ #ifndef GL_NV_shader_atomic_float64 -#define GL_NV_shader_atomic_float64 1 +# define GL_NV_shader_atomic_float64 1 #endif /* GL_NV_shader_atomic_float64 */ #ifndef GL_NV_shader_atomic_fp16_vector -#define GL_NV_shader_atomic_fp16_vector 1 +# define GL_NV_shader_atomic_fp16_vector 1 #endif /* GL_NV_shader_atomic_fp16_vector */ #ifndef GL_NV_shader_atomic_int64 -#define GL_NV_shader_atomic_int64 1 +# define GL_NV_shader_atomic_int64 1 #endif /* GL_NV_shader_atomic_int64 */ #ifndef GL_NV_shader_buffer_load -#define GL_NV_shader_buffer_load 1 -#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D -#define GL_GPU_ADDRESS_NV 0x8F34 -#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 -typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); -typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); -typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); -typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); -typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); -typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); -typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); -typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access); -GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target); -GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target); -GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); -GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer); -GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer); -GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); -GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); -GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); -GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); -GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif +# define GL_NV_shader_buffer_load 1 +# define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D +# define GL_GPU_ADDRESS_NV 0x8F34 +# define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 +typedef void( APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC )( GLenum target, GLenum access ); +typedef void( APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC )( GLenum target ); +typedef GLboolean( APIENTRYP PFNGLISBUFFERRESIDENTNVPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC )( GLuint buffer, GLenum access ); +typedef void( APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC )( GLuint buffer ); +typedef GLboolean( APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC )( GLenum target, GLenum pname, + GLuint64EXT *params ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC )( GLuint buffer, GLenum pname, + GLuint64EXT *params ); +typedef void( APIENTRYP PFNGLGETINTEGERUI64VNVPROC )( GLenum value, GLuint64EXT *result ); +typedef void( APIENTRYP PFNGLUNIFORMUI64NVPROC )( GLint location, GLuint64EXT value ); +typedef void( APIENTRYP PFNGLUNIFORMUI64VNVPROC )( GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLGETUNIFORMUI64VNVPROC )( GLuint program, GLint location, + GLuint64EXT *params ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC )( GLuint program, GLint location, + GLuint64EXT value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMakeBufferResidentNV( GLenum target, GLenum access ); +GLAPI void APIENTRY glMakeBufferNonResidentNV( GLenum target ); +GLAPI GLboolean APIENTRY glIsBufferResidentNV( GLenum target ); +GLAPI void APIENTRY glMakeNamedBufferResidentNV( GLuint buffer, GLenum access ); +GLAPI void APIENTRY glMakeNamedBufferNonResidentNV( GLuint buffer ); +GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV( GLuint buffer ); +GLAPI void APIENTRY glGetBufferParameterui64vNV( GLenum target, GLenum pname, GLuint64EXT *params ); +GLAPI void APIENTRY glGetNamedBufferParameterui64vNV( GLuint buffer, GLenum pname, GLuint64EXT *params ); +GLAPI void APIENTRY glGetIntegerui64vNV( GLenum value, GLuint64EXT *result ); +GLAPI void APIENTRY glUniformui64NV( GLint location, GLuint64EXT value ); +GLAPI void APIENTRY glUniformui64vNV( GLint location, GLsizei count, const GLuint64EXT *value ); +GLAPI void APIENTRY glGetUniformui64vNV( GLuint program, GLint location, GLuint64EXT *params ); +GLAPI void APIENTRY glProgramUniformui64NV( GLuint program, GLint location, GLuint64EXT value ); +GLAPI void APIENTRY glProgramUniformui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +# endif #endif /* GL_NV_shader_buffer_load */ #ifndef GL_NV_shader_buffer_store -#define GL_NV_shader_buffer_store 1 -#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 +# define GL_NV_shader_buffer_store 1 +# define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 #endif /* GL_NV_shader_buffer_store */ #ifndef GL_NV_shader_thread_group -#define GL_NV_shader_thread_group 1 -#define GL_WARP_SIZE_NV 0x9339 -#define GL_WARPS_PER_SM_NV 0x933A -#define GL_SM_COUNT_NV 0x933B +# define GL_NV_shader_thread_group 1 +# define GL_WARP_SIZE_NV 0x9339 +# define GL_WARPS_PER_SM_NV 0x933A +# define GL_SM_COUNT_NV 0x933B #endif /* GL_NV_shader_thread_group */ #ifndef GL_NV_shader_thread_shuffle -#define GL_NV_shader_thread_shuffle 1 +# define GL_NV_shader_thread_shuffle 1 #endif /* GL_NV_shader_thread_shuffle */ #ifndef GL_NV_stereo_view_rendering -#define GL_NV_stereo_view_rendering 1 +# define GL_NV_stereo_view_rendering 1 #endif /* GL_NV_stereo_view_rendering */ #ifndef GL_NV_texture_barrier -#define GL_NV_texture_barrier 1 -typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureBarrierNV (void); -#endif +# define GL_NV_texture_barrier 1 +typedef void( APIENTRYP PFNGLTEXTUREBARRIERNVPROC )( void ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureBarrierNV( void ); +# endif #endif /* GL_NV_texture_barrier */ #ifndef GL_NV_uniform_buffer_unified_memory -#define GL_NV_uniform_buffer_unified_memory 1 -#define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E -#define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F -#define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370 +# define GL_NV_uniform_buffer_unified_memory 1 +# define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E +# define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F +# define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370 #endif /* GL_NV_uniform_buffer_unified_memory */ #ifndef GL_NV_vertex_attrib_integer_64bit -#define GL_NV_vertex_attrib_integer_64bit 1 -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x); -GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); -GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); -#endif +# define GL_NV_vertex_attrib_integer_64bit 1 +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC )( GLuint index, GLint64EXT x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC )( GLuint index, GLint64EXT x, GLint64EXT y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC )( GLuint index, GLint64EXT x, GLint64EXT y, + GLint64EXT z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC )( GLuint index, GLint64EXT x, GLint64EXT y, + GLint64EXT z, GLint64EXT w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC )( GLuint index, const GLint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC )( GLuint index, const GLint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC )( GLuint index, const GLint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC )( GLuint index, const GLint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC )( GLuint index, GLuint64EXT x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC )( GLuint index, GLuint64EXT x, GLuint64EXT y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC )( GLuint index, GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC )( GLuint index, GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z, GLuint64EXT w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC )( GLuint index, const GLuint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC )( GLuint index, const GLuint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC )( GLuint index, const GLuint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC )( GLuint index, const GLuint64EXT *v ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC )( GLuint index, GLenum pname, + GLint64EXT *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC )( GLuint index, GLenum pname, + GLuint64EXT *params ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC )( GLuint index, GLint size, GLenum type, + GLsizei stride ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1i64NV( GLuint index, GLint64EXT x ); +GLAPI void APIENTRY glVertexAttribL2i64NV( GLuint index, GLint64EXT x, GLint64EXT y ); +GLAPI void APIENTRY glVertexAttribL3i64NV( GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z ); +GLAPI void APIENTRY glVertexAttribL4i64NV( GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, + GLint64EXT w ); +GLAPI void APIENTRY glVertexAttribL1i64vNV( GLuint index, const GLint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL2i64vNV( GLuint index, const GLint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL3i64vNV( GLuint index, const GLint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL4i64vNV( GLuint index, const GLint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL1ui64NV( GLuint index, GLuint64EXT x ); +GLAPI void APIENTRY glVertexAttribL2ui64NV( GLuint index, GLuint64EXT x, GLuint64EXT y ); +GLAPI void APIENTRY glVertexAttribL3ui64NV( GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z ); +GLAPI void APIENTRY glVertexAttribL4ui64NV( GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, + GLuint64EXT w ); +GLAPI void APIENTRY glVertexAttribL1ui64vNV( GLuint index, const GLuint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL2ui64vNV( GLuint index, const GLuint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL3ui64vNV( GLuint index, const GLuint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL4ui64vNV( GLuint index, const GLuint64EXT *v ); +GLAPI void APIENTRY glGetVertexAttribLi64vNV( GLuint index, GLenum pname, GLint64EXT *params ); +GLAPI void APIENTRY glGetVertexAttribLui64vNV( GLuint index, GLenum pname, GLuint64EXT *params ); +GLAPI void APIENTRY glVertexAttribLFormatNV( GLuint index, GLint size, GLenum type, GLsizei stride ); +# endif #endif /* GL_NV_vertex_attrib_integer_64bit */ #ifndef GL_NV_vertex_buffer_unified_memory -#define GL_NV_vertex_buffer_unified_memory 1 -#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E -#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F -#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 -#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 -#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 -#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 -#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 -#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 -#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 -#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 -#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 -#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 -#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A -#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B -#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C -#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D -#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E -#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F -#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 -#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 -#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 -#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 -#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 -#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 -#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 -typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); -typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); -typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); -GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride); -GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); -GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); -#endif +# define GL_NV_vertex_buffer_unified_memory 1 +# define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E +# define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F +# define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 +# define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 +# define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 +# define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 +# define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 +# define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 +# define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 +# define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 +# define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 +# define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 +# define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A +# define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B +# define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C +# define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D +# define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E +# define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F +# define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 +# define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 +# define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 +# define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 +# define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 +# define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 +# define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 +typedef void( APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC )( GLenum pname, GLuint index, GLuint64EXT address, + GLsizeiptr length ); +typedef void( APIENTRYP PFNGLVERTEXFORMATNVPROC )( GLint size, GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLNORMALFORMATNVPROC )( GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLCOLORFORMATNVPROC )( GLint size, GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLINDEXFORMATNVPROC )( GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLTEXCOORDFORMATNVPROC )( GLint size, GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLEDGEFLAGFORMATNVPROC )( GLsizei stride ); +typedef void( APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC )( GLint size, GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLFOGCOORDFORMATNVPROC )( GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC )( GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC )( GLuint index, GLint size, GLenum type, + GLsizei stride ); +typedef void( APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC )( GLenum value, GLuint index, + GLuint64EXT *result ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferAddressRangeNV( GLenum pname, GLuint index, GLuint64EXT address, + GLsizeiptr length ); +GLAPI void APIENTRY glVertexFormatNV( GLint size, GLenum type, GLsizei stride ); +GLAPI void APIENTRY glNormalFormatNV( GLenum type, GLsizei stride ); +GLAPI void APIENTRY glColorFormatNV( GLint size, GLenum type, GLsizei stride ); +GLAPI void APIENTRY glIndexFormatNV( GLenum type, GLsizei stride ); +GLAPI void APIENTRY glTexCoordFormatNV( GLint size, GLenum type, GLsizei stride ); +GLAPI void APIENTRY glEdgeFlagFormatNV( GLsizei stride ); +GLAPI void APIENTRY glSecondaryColorFormatNV( GLint size, GLenum type, GLsizei stride ); +GLAPI void APIENTRY glFogCoordFormatNV( GLenum type, GLsizei stride ); +GLAPI void APIENTRY glVertexAttribFormatNV( GLuint index, GLint size, GLenum type, GLboolean normalized, + GLsizei stride ); +GLAPI void APIENTRY glVertexAttribIFormatNV( GLuint index, GLint size, GLenum type, GLsizei stride ); +GLAPI void APIENTRY glGetIntegerui64i_vNV( GLenum value, GLuint index, GLuint64EXT *result ); +# endif #endif /* GL_NV_vertex_buffer_unified_memory */ #ifndef GL_NV_viewport_array2 -#define GL_NV_viewport_array2 1 +# define GL_NV_viewport_array2 1 #endif /* GL_NV_viewport_array2 */ #ifndef GL_NV_viewport_swizzle -#define GL_NV_viewport_swizzle 1 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350 -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352 -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354 -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356 -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357 -#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358 -#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359 -#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A -#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B -typedef void (APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC) (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); -#endif +# define GL_NV_viewport_swizzle 1 +# define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350 +# define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351 +# define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352 +# define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353 +# define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354 +# define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355 +# define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356 +# define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357 +# define GL_VIEWPORT_SWIZZLE_X_NV 0x9358 +# define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359 +# define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A +# define GL_VIEWPORT_SWIZZLE_W_NV 0x935B +typedef void( APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC )( GLuint index, GLenum swizzlex, GLenum swizzley, + GLenum swizzlez, GLenum swizzlew ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportSwizzleNV( GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, + GLenum swizzlew ); +# endif #endif /* GL_NV_viewport_swizzle */ #ifndef GL_OVR_multiview -#define GL_OVR_multiview 1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 -#define GL_MAX_VIEWS_OVR 0x9631 -#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); -#endif +# define GL_OVR_multiview 1 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 +# define GL_MAX_VIEWS_OVR 0x9631 +# define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level, + GLint baseViewIndex, + GLsizei numViews ); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferTextureMultiviewOVR( GLenum target, GLenum attachment, GLuint texture, + GLint level, GLint baseViewIndex, + GLsizei numViews ); +# endif #endif /* GL_OVR_multiview */ #ifndef GL_OVR_multiview2 -#define GL_OVR_multiview2 1 +# define GL_OVR_multiview2 1 #endif /* GL_OVR_multiview2 */ #ifdef __cplusplus diff --git a/include/GL/glext.h b/include/GL/glext.h index 0b91386..5829d47 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -7,7 +7,7 @@ extern "C" { /* ** Copyright (c) 2007-2013 The Khronos Group Inc. -** +** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, including @@ -15,10 +15,10 @@ extern "C" { ** distribute, sublicense, and/or sell copies of the Materials, and to ** permit persons to whom the Materials are furnished to do so, subject to ** the following conditions: -** +** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Materials. -** +** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -34,553 +34,553 @@ extern "C" { #define GL_GLEXT_VERSION 85 /* Function declaration macros - to move into glplatform.h */ -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define WIN32_LEAN_AND_MEAN 1 -#include +#if defined( _WIN32 ) && !defined( APIENTRY ) && !defined( __CYGWIN__ ) && !defined( __SCITECH_SNAP__ ) +# define WIN32_LEAN_AND_MEAN 1 +# include #endif #ifndef APIENTRY -#define APIENTRY +# define APIENTRY #endif #ifndef APIENTRYP -#define APIENTRYP APIENTRY * +# define APIENTRYP APIENTRY * #endif #ifndef GLAPI -#define GLAPI extern +# define GLAPI extern #endif /*************************************************************/ #ifndef GL_VERSION_1_2 -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_RESCALE_NORMAL 0x803A -#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 -#define GL_SINGLE_COLOR 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR 0x81FA -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +# define GL_UNSIGNED_BYTE_3_3_2 0x8032 +# define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +# define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +# define GL_UNSIGNED_INT_8_8_8_8 0x8035 +# define GL_UNSIGNED_INT_10_10_10_2 0x8036 +# define GL_TEXTURE_BINDING_3D 0x806A +# define GL_PACK_SKIP_IMAGES 0x806B +# define GL_PACK_IMAGE_HEIGHT 0x806C +# define GL_UNPACK_SKIP_IMAGES 0x806D +# define GL_UNPACK_IMAGE_HEIGHT 0x806E +# define GL_TEXTURE_3D 0x806F +# define GL_PROXY_TEXTURE_3D 0x8070 +# define GL_TEXTURE_DEPTH 0x8071 +# define GL_TEXTURE_WRAP_R 0x8072 +# define GL_MAX_3D_TEXTURE_SIZE 0x8073 +# define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +# define GL_UNSIGNED_SHORT_5_6_5 0x8363 +# define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +# define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +# define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +# define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +# define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +# define GL_BGR 0x80E0 +# define GL_BGRA 0x80E1 +# define GL_MAX_ELEMENTS_VERTICES 0x80E8 +# define GL_MAX_ELEMENTS_INDICES 0x80E9 +# define GL_CLAMP_TO_EDGE 0x812F +# define GL_TEXTURE_MIN_LOD 0x813A +# define GL_TEXTURE_MAX_LOD 0x813B +# define GL_TEXTURE_BASE_LEVEL 0x813C +# define GL_TEXTURE_MAX_LEVEL 0x813D +# define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +# define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +# define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +# define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +# define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +# define GL_RESCALE_NORMAL 0x803A +# define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +# define GL_SINGLE_COLOR 0x81F9 +# define GL_SEPARATE_SPECULAR_COLOR 0x81FA +# define GL_ALIASED_POINT_SIZE_RANGE 0x846D #endif #ifndef GL_ARB_imaging -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 -#define GL_FUNC_ADD 0x8006 -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_BLEND_EQUATION 0x8009 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_CONVOLUTION_1D 0x8010 -#define GL_CONVOLUTION_2D 0x8011 -#define GL_SEPARABLE_2D 0x8012 -#define GL_CONVOLUTION_BORDER_MODE 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS 0x8015 -#define GL_REDUCE 0x8016 -#define GL_CONVOLUTION_FORMAT 0x8017 -#define GL_CONVOLUTION_WIDTH 0x8018 -#define GL_CONVOLUTION_HEIGHT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 -#define GL_HISTOGRAM 0x8024 -#define GL_PROXY_HISTOGRAM 0x8025 -#define GL_HISTOGRAM_WIDTH 0x8026 -#define GL_HISTOGRAM_FORMAT 0x8027 -#define GL_HISTOGRAM_RED_SIZE 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C -#define GL_HISTOGRAM_SINK 0x802D -#define GL_MINMAX 0x802E -#define GL_MINMAX_FORMAT 0x802F -#define GL_MINMAX_SINK 0x8030 -#define GL_TABLE_TOO_LARGE 0x8031 -#define GL_COLOR_MATRIX 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB -#define GL_COLOR_TABLE 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 -#define GL_PROXY_COLOR_TABLE 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 -#define GL_COLOR_TABLE_SCALE 0x80D6 -#define GL_COLOR_TABLE_BIAS 0x80D7 -#define GL_COLOR_TABLE_FORMAT 0x80D8 -#define GL_COLOR_TABLE_WIDTH 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF -#define GL_CONSTANT_BORDER 0x8151 -#define GL_REPLICATE_BORDER 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR 0x8154 +# define GL_CONSTANT_COLOR 0x8001 +# define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +# define GL_CONSTANT_ALPHA 0x8003 +# define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +# define GL_BLEND_COLOR 0x8005 +# define GL_FUNC_ADD 0x8006 +# define GL_MIN 0x8007 +# define GL_MAX 0x8008 +# define GL_BLEND_EQUATION 0x8009 +# define GL_FUNC_SUBTRACT 0x800A +# define GL_FUNC_REVERSE_SUBTRACT 0x800B +# define GL_CONVOLUTION_1D 0x8010 +# define GL_CONVOLUTION_2D 0x8011 +# define GL_SEPARABLE_2D 0x8012 +# define GL_CONVOLUTION_BORDER_MODE 0x8013 +# define GL_CONVOLUTION_FILTER_SCALE 0x8014 +# define GL_CONVOLUTION_FILTER_BIAS 0x8015 +# define GL_REDUCE 0x8016 +# define GL_CONVOLUTION_FORMAT 0x8017 +# define GL_CONVOLUTION_WIDTH 0x8018 +# define GL_CONVOLUTION_HEIGHT 0x8019 +# define GL_MAX_CONVOLUTION_WIDTH 0x801A +# define GL_MAX_CONVOLUTION_HEIGHT 0x801B +# define GL_POST_CONVOLUTION_RED_SCALE 0x801C +# define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +# define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +# define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +# define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +# define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +# define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +# define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +# define GL_HISTOGRAM 0x8024 +# define GL_PROXY_HISTOGRAM 0x8025 +# define GL_HISTOGRAM_WIDTH 0x8026 +# define GL_HISTOGRAM_FORMAT 0x8027 +# define GL_HISTOGRAM_RED_SIZE 0x8028 +# define GL_HISTOGRAM_GREEN_SIZE 0x8029 +# define GL_HISTOGRAM_BLUE_SIZE 0x802A +# define GL_HISTOGRAM_ALPHA_SIZE 0x802B +# define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +# define GL_HISTOGRAM_SINK 0x802D +# define GL_MINMAX 0x802E +# define GL_MINMAX_FORMAT 0x802F +# define GL_MINMAX_SINK 0x8030 +# define GL_TABLE_TOO_LARGE 0x8031 +# define GL_COLOR_MATRIX 0x80B1 +# define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +# define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +# define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +# define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +# define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +# define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +# define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +# define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +# define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +# define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +# define GL_COLOR_TABLE 0x80D0 +# define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +# define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +# define GL_PROXY_COLOR_TABLE 0x80D3 +# define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +# define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +# define GL_COLOR_TABLE_SCALE 0x80D6 +# define GL_COLOR_TABLE_BIAS 0x80D7 +# define GL_COLOR_TABLE_FORMAT 0x80D8 +# define GL_COLOR_TABLE_WIDTH 0x80D9 +# define GL_COLOR_TABLE_RED_SIZE 0x80DA +# define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +# define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +# define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +# define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +# define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +# define GL_CONSTANT_BORDER 0x8151 +# define GL_REPLICATE_BORDER 0x8153 +# define GL_CONVOLUTION_BORDER_COLOR 0x8154 #endif #ifndef GL_VERSION_1_3 -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_CLAMP_TO_BORDER 0x812D -#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 -#define GL_MAX_TEXTURE_UNITS 0x84E2 -#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 -#define GL_MULTISAMPLE_BIT 0x20000000 -#define GL_NORMAL_MAP 0x8511 -#define GL_REFLECTION_MAP 0x8512 -#define GL_COMPRESSED_ALPHA 0x84E9 -#define GL_COMPRESSED_LUMINANCE 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB -#define GL_COMPRESSED_INTENSITY 0x84EC -#define GL_COMBINE 0x8570 -#define GL_COMBINE_RGB 0x8571 -#define GL_COMBINE_ALPHA 0x8572 -#define GL_SOURCE0_RGB 0x8580 -#define GL_SOURCE1_RGB 0x8581 -#define GL_SOURCE2_RGB 0x8582 -#define GL_SOURCE0_ALPHA 0x8588 -#define GL_SOURCE1_ALPHA 0x8589 -#define GL_SOURCE2_ALPHA 0x858A -#define GL_OPERAND0_RGB 0x8590 -#define GL_OPERAND1_RGB 0x8591 -#define GL_OPERAND2_RGB 0x8592 -#define GL_OPERAND0_ALPHA 0x8598 -#define GL_OPERAND1_ALPHA 0x8599 -#define GL_OPERAND2_ALPHA 0x859A -#define GL_RGB_SCALE 0x8573 -#define GL_ADD_SIGNED 0x8574 -#define GL_INTERPOLATE 0x8575 -#define GL_SUBTRACT 0x84E7 -#define GL_CONSTANT 0x8576 -#define GL_PRIMARY_COLOR 0x8577 -#define GL_PREVIOUS 0x8578 -#define GL_DOT3_RGB 0x86AE -#define GL_DOT3_RGBA 0x86AF +# define GL_TEXTURE0 0x84C0 +# define GL_TEXTURE1 0x84C1 +# define GL_TEXTURE2 0x84C2 +# define GL_TEXTURE3 0x84C3 +# define GL_TEXTURE4 0x84C4 +# define GL_TEXTURE5 0x84C5 +# define GL_TEXTURE6 0x84C6 +# define GL_TEXTURE7 0x84C7 +# define GL_TEXTURE8 0x84C8 +# define GL_TEXTURE9 0x84C9 +# define GL_TEXTURE10 0x84CA +# define GL_TEXTURE11 0x84CB +# define GL_TEXTURE12 0x84CC +# define GL_TEXTURE13 0x84CD +# define GL_TEXTURE14 0x84CE +# define GL_TEXTURE15 0x84CF +# define GL_TEXTURE16 0x84D0 +# define GL_TEXTURE17 0x84D1 +# define GL_TEXTURE18 0x84D2 +# define GL_TEXTURE19 0x84D3 +# define GL_TEXTURE20 0x84D4 +# define GL_TEXTURE21 0x84D5 +# define GL_TEXTURE22 0x84D6 +# define GL_TEXTURE23 0x84D7 +# define GL_TEXTURE24 0x84D8 +# define GL_TEXTURE25 0x84D9 +# define GL_TEXTURE26 0x84DA +# define GL_TEXTURE27 0x84DB +# define GL_TEXTURE28 0x84DC +# define GL_TEXTURE29 0x84DD +# define GL_TEXTURE30 0x84DE +# define GL_TEXTURE31 0x84DF +# define GL_ACTIVE_TEXTURE 0x84E0 +# define GL_MULTISAMPLE 0x809D +# define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +# define GL_SAMPLE_ALPHA_TO_ONE 0x809F +# define GL_SAMPLE_COVERAGE 0x80A0 +# define GL_SAMPLE_BUFFERS 0x80A8 +# define GL_SAMPLES 0x80A9 +# define GL_SAMPLE_COVERAGE_VALUE 0x80AA +# define GL_SAMPLE_COVERAGE_INVERT 0x80AB +# define GL_TEXTURE_CUBE_MAP 0x8513 +# define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +# define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +# define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +# define GL_COMPRESSED_RGB 0x84ED +# define GL_COMPRESSED_RGBA 0x84EE +# define GL_TEXTURE_COMPRESSION_HINT 0x84EF +# define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +# define GL_TEXTURE_COMPRESSED 0x86A1 +# define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +# define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +# define GL_CLAMP_TO_BORDER 0x812D +# define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +# define GL_MAX_TEXTURE_UNITS 0x84E2 +# define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 +# define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 +# define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 +# define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 +# define GL_MULTISAMPLE_BIT 0x20000000 +# define GL_NORMAL_MAP 0x8511 +# define GL_REFLECTION_MAP 0x8512 +# define GL_COMPRESSED_ALPHA 0x84E9 +# define GL_COMPRESSED_LUMINANCE 0x84EA +# define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB +# define GL_COMPRESSED_INTENSITY 0x84EC +# define GL_COMBINE 0x8570 +# define GL_COMBINE_RGB 0x8571 +# define GL_COMBINE_ALPHA 0x8572 +# define GL_SOURCE0_RGB 0x8580 +# define GL_SOURCE1_RGB 0x8581 +# define GL_SOURCE2_RGB 0x8582 +# define GL_SOURCE0_ALPHA 0x8588 +# define GL_SOURCE1_ALPHA 0x8589 +# define GL_SOURCE2_ALPHA 0x858A +# define GL_OPERAND0_RGB 0x8590 +# define GL_OPERAND1_RGB 0x8591 +# define GL_OPERAND2_RGB 0x8592 +# define GL_OPERAND0_ALPHA 0x8598 +# define GL_OPERAND1_ALPHA 0x8599 +# define GL_OPERAND2_ALPHA 0x859A +# define GL_RGB_SCALE 0x8573 +# define GL_ADD_SIGNED 0x8574 +# define GL_INTERPOLATE 0x8575 +# define GL_SUBTRACT 0x84E7 +# define GL_CONSTANT 0x8576 +# define GL_PRIMARY_COLOR 0x8577 +# define GL_PREVIOUS 0x8578 +# define GL_DOT3_RGB 0x86AE +# define GL_DOT3_RGBA 0x86AF #endif #ifndef GL_VERSION_1_4 -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_DEPTH_COMPONENT32 0x81A7 -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_LOD_BIAS 0x8501 -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_POINT_SIZE_MIN 0x8126 -#define GL_POINT_SIZE_MAX 0x8127 -#define GL_POINT_DISTANCE_ATTENUATION 0x8129 -#define GL_GENERATE_MIPMAP 0x8191 -#define GL_GENERATE_MIPMAP_HINT 0x8192 -#define GL_FOG_COORDINATE_SOURCE 0x8450 -#define GL_FOG_COORDINATE 0x8451 -#define GL_FRAGMENT_DEPTH 0x8452 -#define GL_CURRENT_FOG_COORDINATE 0x8453 -#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 -#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 -#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 -#define GL_FOG_COORDINATE_ARRAY 0x8457 -#define GL_COLOR_SUM 0x8458 -#define GL_CURRENT_SECONDARY_COLOR 0x8459 -#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A -#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B -#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C -#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D -#define GL_SECONDARY_COLOR_ARRAY 0x845E -#define GL_TEXTURE_FILTER_CONTROL 0x8500 -#define GL_DEPTH_TEXTURE_MODE 0x884B -#define GL_COMPARE_R_TO_TEXTURE 0x884E +# define GL_BLEND_DST_RGB 0x80C8 +# define GL_BLEND_SRC_RGB 0x80C9 +# define GL_BLEND_DST_ALPHA 0x80CA +# define GL_BLEND_SRC_ALPHA 0x80CB +# define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +# define GL_DEPTH_COMPONENT16 0x81A5 +# define GL_DEPTH_COMPONENT24 0x81A6 +# define GL_DEPTH_COMPONENT32 0x81A7 +# define GL_MIRRORED_REPEAT 0x8370 +# define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +# define GL_TEXTURE_LOD_BIAS 0x8501 +# define GL_INCR_WRAP 0x8507 +# define GL_DECR_WRAP 0x8508 +# define GL_TEXTURE_DEPTH_SIZE 0x884A +# define GL_TEXTURE_COMPARE_MODE 0x884C +# define GL_TEXTURE_COMPARE_FUNC 0x884D +# define GL_POINT_SIZE_MIN 0x8126 +# define GL_POINT_SIZE_MAX 0x8127 +# define GL_POINT_DISTANCE_ATTENUATION 0x8129 +# define GL_GENERATE_MIPMAP 0x8191 +# define GL_GENERATE_MIPMAP_HINT 0x8192 +# define GL_FOG_COORDINATE_SOURCE 0x8450 +# define GL_FOG_COORDINATE 0x8451 +# define GL_FRAGMENT_DEPTH 0x8452 +# define GL_CURRENT_FOG_COORDINATE 0x8453 +# define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 +# define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 +# define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 +# define GL_FOG_COORDINATE_ARRAY 0x8457 +# define GL_COLOR_SUM 0x8458 +# define GL_CURRENT_SECONDARY_COLOR 0x8459 +# define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A +# define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B +# define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C +# define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D +# define GL_SECONDARY_COLOR_ARRAY 0x845E +# define GL_TEXTURE_FILTER_CONTROL 0x8500 +# define GL_DEPTH_TEXTURE_MODE 0x884B +# define GL_COMPARE_R_TO_TEXTURE 0x884E #endif #ifndef GL_VERSION_1_5 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_QUERY_COUNTER_BITS 0x8864 -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_READ_ONLY 0x88B8 -#define GL_WRITE_ONLY 0x88B9 -#define GL_READ_WRITE 0x88BA -#define GL_BUFFER_ACCESS 0x88BB -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_DRAW 0x88E0 -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_DRAW 0x88E4 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_SAMPLES_PASSED 0x8914 -#define GL_SRC1_ALPHA 0x8589 -#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 -#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D -#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E -#define GL_FOG_COORD_SRC 0x8450 -#define GL_FOG_COORD 0x8451 -#define GL_CURRENT_FOG_COORD 0x8453 -#define GL_FOG_COORD_ARRAY_TYPE 0x8454 -#define GL_FOG_COORD_ARRAY_STRIDE 0x8455 -#define GL_FOG_COORD_ARRAY_POINTER 0x8456 -#define GL_FOG_COORD_ARRAY 0x8457 -#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D -#define GL_SRC0_RGB 0x8580 -#define GL_SRC1_RGB 0x8581 -#define GL_SRC2_RGB 0x8582 -#define GL_SRC0_ALPHA 0x8588 -#define GL_SRC2_ALPHA 0x858A +# define GL_BUFFER_SIZE 0x8764 +# define GL_BUFFER_USAGE 0x8765 +# define GL_QUERY_COUNTER_BITS 0x8864 +# define GL_CURRENT_QUERY 0x8865 +# define GL_QUERY_RESULT 0x8866 +# define GL_QUERY_RESULT_AVAILABLE 0x8867 +# define GL_ARRAY_BUFFER 0x8892 +# define GL_ELEMENT_ARRAY_BUFFER 0x8893 +# define GL_ARRAY_BUFFER_BINDING 0x8894 +# define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +# define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +# define GL_READ_ONLY 0x88B8 +# define GL_WRITE_ONLY 0x88B9 +# define GL_READ_WRITE 0x88BA +# define GL_BUFFER_ACCESS 0x88BB +# define GL_BUFFER_MAPPED 0x88BC +# define GL_BUFFER_MAP_POINTER 0x88BD +# define GL_STREAM_DRAW 0x88E0 +# define GL_STREAM_READ 0x88E1 +# define GL_STREAM_COPY 0x88E2 +# define GL_STATIC_DRAW 0x88E4 +# define GL_STATIC_READ 0x88E5 +# define GL_STATIC_COPY 0x88E6 +# define GL_DYNAMIC_DRAW 0x88E8 +# define GL_DYNAMIC_READ 0x88E9 +# define GL_DYNAMIC_COPY 0x88EA +# define GL_SAMPLES_PASSED 0x8914 +# define GL_SRC1_ALPHA 0x8589 +# define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +# define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +# define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +# define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 +# define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +# define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B +# define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C +# define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D +# define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E +# define GL_FOG_COORD_SRC 0x8450 +# define GL_FOG_COORD 0x8451 +# define GL_CURRENT_FOG_COORD 0x8453 +# define GL_FOG_COORD_ARRAY_TYPE 0x8454 +# define GL_FOG_COORD_ARRAY_STRIDE 0x8455 +# define GL_FOG_COORD_ARRAY_POINTER 0x8456 +# define GL_FOG_COORD_ARRAY 0x8457 +# define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D +# define GL_SRC0_RGB 0x8580 +# define GL_SRC1_RGB 0x8581 +# define GL_SRC2_RGB 0x8582 +# define GL_SRC0_ALPHA 0x8588 +# define GL_SRC2_ALPHA 0x858A #endif #ifndef GL_VERSION_2_0 -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_MAX_VARYING_FLOATS 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_SHADER_TYPE 0x8B4F -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_1D 0x8B5D -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_SAMPLER_1D_SHADOW 0x8B61 -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_DELETE_STATUS 0x8B80 -#define GL_COMPILE_STATUS 0x8B81 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_UPPER_LEFT 0x8CA2 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 -#define GL_POINT_SPRITE 0x8861 -#define GL_COORD_REPLACE 0x8862 -#define GL_MAX_TEXTURE_COORDS 0x8871 +# define GL_BLEND_EQUATION_RGB 0x8009 +# define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +# define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +# define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +# define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +# define GL_CURRENT_VERTEX_ATTRIB 0x8626 +# define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +# define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +# define GL_STENCIL_BACK_FUNC 0x8800 +# define GL_STENCIL_BACK_FAIL 0x8801 +# define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +# define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +# define GL_MAX_DRAW_BUFFERS 0x8824 +# define GL_DRAW_BUFFER0 0x8825 +# define GL_DRAW_BUFFER1 0x8826 +# define GL_DRAW_BUFFER2 0x8827 +# define GL_DRAW_BUFFER3 0x8828 +# define GL_DRAW_BUFFER4 0x8829 +# define GL_DRAW_BUFFER5 0x882A +# define GL_DRAW_BUFFER6 0x882B +# define GL_DRAW_BUFFER7 0x882C +# define GL_DRAW_BUFFER8 0x882D +# define GL_DRAW_BUFFER9 0x882E +# define GL_DRAW_BUFFER10 0x882F +# define GL_DRAW_BUFFER11 0x8830 +# define GL_DRAW_BUFFER12 0x8831 +# define GL_DRAW_BUFFER13 0x8832 +# define GL_DRAW_BUFFER14 0x8833 +# define GL_DRAW_BUFFER15 0x8834 +# define GL_BLEND_EQUATION_ALPHA 0x883D +# define GL_MAX_VERTEX_ATTRIBS 0x8869 +# define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +# define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +# define GL_FRAGMENT_SHADER 0x8B30 +# define GL_VERTEX_SHADER 0x8B31 +# define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +# define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +# define GL_MAX_VARYING_FLOATS 0x8B4B +# define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +# define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +# define GL_SHADER_TYPE 0x8B4F +# define GL_FLOAT_VEC2 0x8B50 +# define GL_FLOAT_VEC3 0x8B51 +# define GL_FLOAT_VEC4 0x8B52 +# define GL_INT_VEC2 0x8B53 +# define GL_INT_VEC3 0x8B54 +# define GL_INT_VEC4 0x8B55 +# define GL_BOOL 0x8B56 +# define GL_BOOL_VEC2 0x8B57 +# define GL_BOOL_VEC3 0x8B58 +# define GL_BOOL_VEC4 0x8B59 +# define GL_FLOAT_MAT2 0x8B5A +# define GL_FLOAT_MAT3 0x8B5B +# define GL_FLOAT_MAT4 0x8B5C +# define GL_SAMPLER_1D 0x8B5D +# define GL_SAMPLER_2D 0x8B5E +# define GL_SAMPLER_3D 0x8B5F +# define GL_SAMPLER_CUBE 0x8B60 +# define GL_SAMPLER_1D_SHADOW 0x8B61 +# define GL_SAMPLER_2D_SHADOW 0x8B62 +# define GL_DELETE_STATUS 0x8B80 +# define GL_COMPILE_STATUS 0x8B81 +# define GL_LINK_STATUS 0x8B82 +# define GL_VALIDATE_STATUS 0x8B83 +# define GL_INFO_LOG_LENGTH 0x8B84 +# define GL_ATTACHED_SHADERS 0x8B85 +# define GL_ACTIVE_UNIFORMS 0x8B86 +# define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +# define GL_SHADER_SOURCE_LENGTH 0x8B88 +# define GL_ACTIVE_ATTRIBUTES 0x8B89 +# define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +# define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +# define GL_SHADING_LANGUAGE_VERSION 0x8B8C +# define GL_CURRENT_PROGRAM 0x8B8D +# define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +# define GL_LOWER_LEFT 0x8CA1 +# define GL_UPPER_LEFT 0x8CA2 +# define GL_STENCIL_BACK_REF 0x8CA3 +# define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +# define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +# define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 +# define GL_POINT_SPRITE 0x8861 +# define GL_COORD_REPLACE 0x8862 +# define GL_MAX_TEXTURE_COORDS 0x8871 #endif #ifndef GL_VERSION_2_1 -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB_ALPHA 0x8C42 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_COMPRESSED_SRGB 0x8C48 -#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 -#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F -#define GL_SLUMINANCE_ALPHA 0x8C44 -#define GL_SLUMINANCE8_ALPHA8 0x8C45 -#define GL_SLUMINANCE 0x8C46 -#define GL_SLUMINANCE8 0x8C47 -#define GL_COMPRESSED_SLUMINANCE 0x8C4A -#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B +# define GL_PIXEL_PACK_BUFFER 0x88EB +# define GL_PIXEL_UNPACK_BUFFER 0x88EC +# define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +# define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +# define GL_FLOAT_MAT2x3 0x8B65 +# define GL_FLOAT_MAT2x4 0x8B66 +# define GL_FLOAT_MAT3x2 0x8B67 +# define GL_FLOAT_MAT3x4 0x8B68 +# define GL_FLOAT_MAT4x2 0x8B69 +# define GL_FLOAT_MAT4x3 0x8B6A +# define GL_SRGB 0x8C40 +# define GL_SRGB8 0x8C41 +# define GL_SRGB_ALPHA 0x8C42 +# define GL_SRGB8_ALPHA8 0x8C43 +# define GL_COMPRESSED_SRGB 0x8C48 +# define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +# define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F +# define GL_SLUMINANCE_ALPHA 0x8C44 +# define GL_SLUMINANCE8_ALPHA8 0x8C45 +# define GL_SLUMINANCE 0x8C46 +# define GL_SLUMINANCE8 0x8C47 +# define GL_COMPRESSED_SLUMINANCE 0x8C4A +# define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B #endif #ifndef GL_VERSION_3_0 -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_CLIP_DISTANCE0 0x3000 -#define GL_CLIP_DISTANCE1 0x3001 -#define GL_CLIP_DISTANCE2 0x3002 -#define GL_CLIP_DISTANCE3 0x3003 -#define GL_CLIP_DISTANCE4 0x3004 -#define GL_CLIP_DISTANCE5 0x3005 -#define GL_CLIP_DISTANCE6 0x3006 -#define GL_CLIP_DISTANCE7 0x3007 -#define GL_MAX_CLIP_DISTANCES 0x0D32 -#define GL_MAJOR_VERSION 0x821B -#define GL_MINOR_VERSION 0x821C -#define GL_NUM_EXTENSIONS 0x821D -#define GL_CONTEXT_FLAGS 0x821E -#define GL_COMPRESSED_RED 0x8225 -#define GL_COMPRESSED_RG 0x8226 -#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 -#define GL_RGBA32F 0x8814 -#define GL_RGB32F 0x8815 -#define GL_RGBA16F 0x881A -#define GL_RGB16F 0x881B -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_CLAMP_READ_COLOR 0x891C -#define GL_FIXED_ONLY 0x891D -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_TEXTURE_1D_ARRAY 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_RGB9_E5 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_TEXTURE_SHARED_SIZE 0x8C3F -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_PRIMITIVES_GENERATED 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_RGBA32UI 0x8D70 -#define GL_RGB32UI 0x8D71 -#define GL_RGBA16UI 0x8D76 -#define GL_RGB16UI 0x8D77 -#define GL_RGBA8UI 0x8D7C -#define GL_RGB8UI 0x8D7D -#define GL_RGBA32I 0x8D82 -#define GL_RGB32I 0x8D83 -#define GL_RGBA16I 0x8D88 -#define GL_RGB16I 0x8D89 -#define GL_RGBA8I 0x8D8E -#define GL_RGB8I 0x8D8F -#define GL_RED_INTEGER 0x8D94 -#define GL_GREEN_INTEGER 0x8D95 -#define GL_BLUE_INTEGER 0x8D96 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_BGR_INTEGER 0x8D9A -#define GL_BGRA_INTEGER 0x8D9B -#define GL_SAMPLER_1D_ARRAY 0x8DC0 -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_INT_SAMPLER_1D 0x8DC9 -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_QUERY_WAIT 0x8E13 -#define GL_QUERY_NO_WAIT 0x8E14 -#define GL_QUERY_BY_REGION_WAIT 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 +# define GL_COMPARE_REF_TO_TEXTURE 0x884E +# define GL_CLIP_DISTANCE0 0x3000 +# define GL_CLIP_DISTANCE1 0x3001 +# define GL_CLIP_DISTANCE2 0x3002 +# define GL_CLIP_DISTANCE3 0x3003 +# define GL_CLIP_DISTANCE4 0x3004 +# define GL_CLIP_DISTANCE5 0x3005 +# define GL_CLIP_DISTANCE6 0x3006 +# define GL_CLIP_DISTANCE7 0x3007 +# define GL_MAX_CLIP_DISTANCES 0x0D32 +# define GL_MAJOR_VERSION 0x821B +# define GL_MINOR_VERSION 0x821C +# define GL_NUM_EXTENSIONS 0x821D +# define GL_CONTEXT_FLAGS 0x821E +# define GL_COMPRESSED_RED 0x8225 +# define GL_COMPRESSED_RG 0x8226 +# define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 +# define GL_RGBA32F 0x8814 +# define GL_RGB32F 0x8815 +# define GL_RGBA16F 0x881A +# define GL_RGB16F 0x881B +# define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +# define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +# define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +# define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +# define GL_CLAMP_READ_COLOR 0x891C +# define GL_FIXED_ONLY 0x891D +# define GL_MAX_VARYING_COMPONENTS 0x8B4B +# define GL_TEXTURE_1D_ARRAY 0x8C18 +# define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +# define GL_TEXTURE_2D_ARRAY 0x8C1A +# define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +# define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +# define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +# define GL_R11F_G11F_B10F 0x8C3A +# define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +# define GL_RGB9_E5 0x8C3D +# define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +# define GL_TEXTURE_SHARED_SIZE 0x8C3F +# define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +# define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +# define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +# define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +# define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +# define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +# define GL_PRIMITIVES_GENERATED 0x8C87 +# define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +# define GL_RASTERIZER_DISCARD 0x8C89 +# define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +# define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +# define GL_INTERLEAVED_ATTRIBS 0x8C8C +# define GL_SEPARATE_ATTRIBS 0x8C8D +# define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +# define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +# define GL_RGBA32UI 0x8D70 +# define GL_RGB32UI 0x8D71 +# define GL_RGBA16UI 0x8D76 +# define GL_RGB16UI 0x8D77 +# define GL_RGBA8UI 0x8D7C +# define GL_RGB8UI 0x8D7D +# define GL_RGBA32I 0x8D82 +# define GL_RGB32I 0x8D83 +# define GL_RGBA16I 0x8D88 +# define GL_RGB16I 0x8D89 +# define GL_RGBA8I 0x8D8E +# define GL_RGB8I 0x8D8F +# define GL_RED_INTEGER 0x8D94 +# define GL_GREEN_INTEGER 0x8D95 +# define GL_BLUE_INTEGER 0x8D96 +# define GL_RGB_INTEGER 0x8D98 +# define GL_RGBA_INTEGER 0x8D99 +# define GL_BGR_INTEGER 0x8D9A +# define GL_BGRA_INTEGER 0x8D9B +# define GL_SAMPLER_1D_ARRAY 0x8DC0 +# define GL_SAMPLER_2D_ARRAY 0x8DC1 +# define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +# define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +# define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +# define GL_UNSIGNED_INT_VEC2 0x8DC6 +# define GL_UNSIGNED_INT_VEC3 0x8DC7 +# define GL_UNSIGNED_INT_VEC4 0x8DC8 +# define GL_INT_SAMPLER_1D 0x8DC9 +# define GL_INT_SAMPLER_2D 0x8DCA +# define GL_INT_SAMPLER_3D 0x8DCB +# define GL_INT_SAMPLER_CUBE 0x8DCC +# define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +# define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +# define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +# define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +# define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +# define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +# define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +# define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +# define GL_QUERY_WAIT 0x8E13 +# define GL_QUERY_NO_WAIT 0x8E14 +# define GL_QUERY_BY_REGION_WAIT 0x8E15 +# define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +# define GL_BUFFER_ACCESS_FLAGS 0x911F +# define GL_BUFFER_MAP_LENGTH 0x9120 +# define GL_BUFFER_MAP_OFFSET 0x9121 /* Reuse tokens from ARB_depth_buffer_float */ /* reuse GL_DEPTH_COMPONENT32F */ /* reuse GL_DEPTH32F_STENCIL8 */ @@ -705,45 +705,45 @@ extern "C" { /* reuse GL_RG32UI */ /* Reuse tokens from ARB_vertex_array_object */ /* reuse GL_VERTEX_ARRAY_BINDING */ -#define GL_CLAMP_VERTEX_COLOR 0x891A -#define GL_CLAMP_FRAGMENT_COLOR 0x891B -#define GL_ALPHA_INTEGER 0x8D97 +# define GL_CLAMP_VERTEX_COLOR 0x891A +# define GL_CLAMP_FRAGMENT_COLOR 0x891B +# define GL_ALPHA_INTEGER 0x8D97 /* Reuse tokens from ARB_framebuffer_object */ /* reuse GL_TEXTURE_LUMINANCE_TYPE */ /* reuse GL_TEXTURE_INTENSITY_TYPE */ #endif #ifndef GL_VERSION_3_1 -#define GL_SAMPLER_2D_RECT 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 -#define GL_SAMPLER_BUFFER 0x8DC2 -#define GL_INT_SAMPLER_2D_RECT 0x8DCD -#define GL_INT_SAMPLER_BUFFER 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 -#define GL_TEXTURE_BUFFER 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D -#define GL_TEXTURE_RECTANGLE 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 -#define GL_RED_SNORM 0x8F90 -#define GL_RG_SNORM 0x8F91 -#define GL_RGB_SNORM 0x8F92 -#define GL_RGBA_SNORM 0x8F93 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_R16_SNORM 0x8F98 -#define GL_RG16_SNORM 0x8F99 -#define GL_RGB16_SNORM 0x8F9A -#define GL_RGBA16_SNORM 0x8F9B -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_PRIMITIVE_RESTART 0x8F9D -#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +# define GL_SAMPLER_2D_RECT 0x8B63 +# define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 +# define GL_SAMPLER_BUFFER 0x8DC2 +# define GL_INT_SAMPLER_2D_RECT 0x8DCD +# define GL_INT_SAMPLER_BUFFER 0x8DD0 +# define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 +# define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +# define GL_TEXTURE_BUFFER 0x8C2A +# define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +# define GL_TEXTURE_BINDING_BUFFER 0x8C2C +# define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +# define GL_TEXTURE_RECTANGLE 0x84F5 +# define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +# define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +# define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +# define GL_RED_SNORM 0x8F90 +# define GL_RG_SNORM 0x8F91 +# define GL_RGB_SNORM 0x8F92 +# define GL_RGBA_SNORM 0x8F93 +# define GL_R8_SNORM 0x8F94 +# define GL_RG8_SNORM 0x8F95 +# define GL_RGB8_SNORM 0x8F96 +# define GL_RGBA8_SNORM 0x8F97 +# define GL_R16_SNORM 0x8F98 +# define GL_RG16_SNORM 0x8F99 +# define GL_RGB16_SNORM 0x8F9A +# define GL_RGBA16_SNORM 0x8F9B +# define GL_SIGNED_NORMALIZED 0x8F9C +# define GL_PRIMITIVE_RESTART 0x8F9D +# define GL_PRIMITIVE_RESTART_INDEX 0x8F9E /* Reuse tokens from ARB_copy_buffer */ /* reuse GL_COPY_READ_BUFFER */ /* reuse GL_COPY_WRITE_BUFFER */ @@ -782,28 +782,28 @@ extern "C" { #endif #ifndef GL_VERSION_3_2 -#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 -#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define GL_LINES_ADJACENCY 0x000A -#define GL_LINE_STRIP_ADJACENCY 0x000B -#define GL_TRIANGLES_ADJACENCY 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D -#define GL_PROGRAM_POINT_SIZE 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 -#define GL_GEOMETRY_SHADER 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT 0x8916 -#define GL_GEOMETRY_INPUT_TYPE 0x8917 -#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_CONTEXT_PROFILE_MASK 0x9126 +# define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 +# define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 +# define GL_LINES_ADJACENCY 0x000A +# define GL_LINE_STRIP_ADJACENCY 0x000B +# define GL_TRIANGLES_ADJACENCY 0x000C +# define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +# define GL_PROGRAM_POINT_SIZE 0x8642 +# define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +# define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +# define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +# define GL_GEOMETRY_SHADER 0x8DD9 +# define GL_GEOMETRY_VERTICES_OUT 0x8916 +# define GL_GEOMETRY_INPUT_TYPE 0x8917 +# define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +# define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +# define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +# define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +# define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +# define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +# define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +# define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +# define GL_CONTEXT_PROFILE_MASK 0x9126 /* reuse GL_MAX_VARYING_COMPONENTS */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ /* Reuse tokens from ARB_depth_clamp */ @@ -860,7 +860,7 @@ extern "C" { #endif #ifndef GL_VERSION_3_3 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +# define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE /* Reuse tokens from ARB_blend_func_extended */ /* reuse GL_SRC1_COLOR */ /* reuse GL_ONE_MINUS_SRC1_COLOR */ @@ -888,17 +888,17 @@ extern "C" { #endif #ifndef GL_VERSION_4_0 -#define GL_SAMPLE_SHADING 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F -#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +# define GL_SAMPLE_SHADING 0x8C36 +# define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +# define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +# define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +# define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +# define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +# define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +# define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +# define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +# define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +# define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F /* Reuse tokens from ARB_texture_query_lod (none) */ /* Reuse tokens from ARB_draw_buffers_blend (none) */ /* Reuse tokens from ARB_draw_indirect */ @@ -1141,8 +1141,8 @@ extern "C" { #endif #ifndef GL_VERSION_4_3 -#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 -#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E +# define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 +# define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E /* Reuse tokens from ARB_arrays_of_arrays (none, GLSL only) */ /* Reuse tokens from ARB_fragment_layer_viewport (none, GLSL only) */ /* Reuse tokens from ARB_shader_image_size (none, GLSL only) */ @@ -1425,714 +1425,714 @@ extern "C" { #endif #ifndef GL_ARB_multitexture -#define GL_TEXTURE0_ARB 0x84C0 -#define GL_TEXTURE1_ARB 0x84C1 -#define GL_TEXTURE2_ARB 0x84C2 -#define GL_TEXTURE3_ARB 0x84C3 -#define GL_TEXTURE4_ARB 0x84C4 -#define GL_TEXTURE5_ARB 0x84C5 -#define GL_TEXTURE6_ARB 0x84C6 -#define GL_TEXTURE7_ARB 0x84C7 -#define GL_TEXTURE8_ARB 0x84C8 -#define GL_TEXTURE9_ARB 0x84C9 -#define GL_TEXTURE10_ARB 0x84CA -#define GL_TEXTURE11_ARB 0x84CB -#define GL_TEXTURE12_ARB 0x84CC -#define GL_TEXTURE13_ARB 0x84CD -#define GL_TEXTURE14_ARB 0x84CE -#define GL_TEXTURE15_ARB 0x84CF -#define GL_TEXTURE16_ARB 0x84D0 -#define GL_TEXTURE17_ARB 0x84D1 -#define GL_TEXTURE18_ARB 0x84D2 -#define GL_TEXTURE19_ARB 0x84D3 -#define GL_TEXTURE20_ARB 0x84D4 -#define GL_TEXTURE21_ARB 0x84D5 -#define GL_TEXTURE22_ARB 0x84D6 -#define GL_TEXTURE23_ARB 0x84D7 -#define GL_TEXTURE24_ARB 0x84D8 -#define GL_TEXTURE25_ARB 0x84D9 -#define GL_TEXTURE26_ARB 0x84DA -#define GL_TEXTURE27_ARB 0x84DB -#define GL_TEXTURE28_ARB 0x84DC -#define GL_TEXTURE29_ARB 0x84DD -#define GL_TEXTURE30_ARB 0x84DE -#define GL_TEXTURE31_ARB 0x84DF -#define GL_ACTIVE_TEXTURE_ARB 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 -#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +# define GL_TEXTURE0_ARB 0x84C0 +# define GL_TEXTURE1_ARB 0x84C1 +# define GL_TEXTURE2_ARB 0x84C2 +# define GL_TEXTURE3_ARB 0x84C3 +# define GL_TEXTURE4_ARB 0x84C4 +# define GL_TEXTURE5_ARB 0x84C5 +# define GL_TEXTURE6_ARB 0x84C6 +# define GL_TEXTURE7_ARB 0x84C7 +# define GL_TEXTURE8_ARB 0x84C8 +# define GL_TEXTURE9_ARB 0x84C9 +# define GL_TEXTURE10_ARB 0x84CA +# define GL_TEXTURE11_ARB 0x84CB +# define GL_TEXTURE12_ARB 0x84CC +# define GL_TEXTURE13_ARB 0x84CD +# define GL_TEXTURE14_ARB 0x84CE +# define GL_TEXTURE15_ARB 0x84CF +# define GL_TEXTURE16_ARB 0x84D0 +# define GL_TEXTURE17_ARB 0x84D1 +# define GL_TEXTURE18_ARB 0x84D2 +# define GL_TEXTURE19_ARB 0x84D3 +# define GL_TEXTURE20_ARB 0x84D4 +# define GL_TEXTURE21_ARB 0x84D5 +# define GL_TEXTURE22_ARB 0x84D6 +# define GL_TEXTURE23_ARB 0x84D7 +# define GL_TEXTURE24_ARB 0x84D8 +# define GL_TEXTURE25_ARB 0x84D9 +# define GL_TEXTURE26_ARB 0x84DA +# define GL_TEXTURE27_ARB 0x84DB +# define GL_TEXTURE28_ARB 0x84DC +# define GL_TEXTURE29_ARB 0x84DD +# define GL_TEXTURE30_ARB 0x84DE +# define GL_TEXTURE31_ARB 0x84DF +# define GL_ACTIVE_TEXTURE_ARB 0x84E0 +# define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +# define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 #endif #ifndef GL_ARB_transpose_matrix -#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 +# define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +# define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +# define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +# define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 #endif #ifndef GL_ARB_multisample -#define GL_MULTISAMPLE_ARB 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F -#define GL_SAMPLE_COVERAGE_ARB 0x80A0 -#define GL_SAMPLE_BUFFERS_ARB 0x80A8 -#define GL_SAMPLES_ARB 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB -#define GL_MULTISAMPLE_BIT_ARB 0x20000000 +# define GL_MULTISAMPLE_ARB 0x809D +# define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +# define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +# define GL_SAMPLE_COVERAGE_ARB 0x80A0 +# define GL_SAMPLE_BUFFERS_ARB 0x80A8 +# define GL_SAMPLES_ARB 0x80A9 +# define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +# define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +# define GL_MULTISAMPLE_BIT_ARB 0x20000000 #endif #ifndef GL_ARB_texture_env_add #endif #ifndef GL_ARB_texture_cube_map -#define GL_NORMAL_MAP_ARB 0x8511 -#define GL_REFLECTION_MAP_ARB 0x8512 -#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C +# define GL_NORMAL_MAP_ARB 0x8511 +# define GL_REFLECTION_MAP_ARB 0x8512 +# define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +# define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +# define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +# define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C #endif #ifndef GL_ARB_texture_compression -#define GL_COMPRESSED_ALPHA_ARB 0x84E9 -#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB -#define GL_COMPRESSED_INTENSITY_ARB 0x84EC -#define GL_COMPRESSED_RGB_ARB 0x84ED -#define GL_COMPRESSED_RGBA_ARB 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 -#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 +# define GL_COMPRESSED_ALPHA_ARB 0x84E9 +# define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +# define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +# define GL_COMPRESSED_INTENSITY_ARB 0x84EC +# define GL_COMPRESSED_RGB_ARB 0x84ED +# define GL_COMPRESSED_RGBA_ARB 0x84EE +# define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +# define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 +# define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +# define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +# define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 #endif #ifndef GL_ARB_texture_border_clamp -#define GL_CLAMP_TO_BORDER_ARB 0x812D +# define GL_CLAMP_TO_BORDER_ARB 0x812D #endif #ifndef GL_ARB_point_parameters -#define GL_POINT_SIZE_MIN_ARB 0x8126 -#define GL_POINT_SIZE_MAX_ARB 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 -#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 +# define GL_POINT_SIZE_MIN_ARB 0x8126 +# define GL_POINT_SIZE_MAX_ARB 0x8127 +# define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +# define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 #endif #ifndef GL_ARB_vertex_blend -#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 -#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 -#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 -#define GL_VERTEX_BLEND_ARB 0x86A7 -#define GL_CURRENT_WEIGHT_ARB 0x86A8 -#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 -#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA -#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB -#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC -#define GL_WEIGHT_ARRAY_ARB 0x86AD -#define GL_MODELVIEW0_ARB 0x1700 -#define GL_MODELVIEW1_ARB 0x850A -#define GL_MODELVIEW2_ARB 0x8722 -#define GL_MODELVIEW3_ARB 0x8723 -#define GL_MODELVIEW4_ARB 0x8724 -#define GL_MODELVIEW5_ARB 0x8725 -#define GL_MODELVIEW6_ARB 0x8726 -#define GL_MODELVIEW7_ARB 0x8727 -#define GL_MODELVIEW8_ARB 0x8728 -#define GL_MODELVIEW9_ARB 0x8729 -#define GL_MODELVIEW10_ARB 0x872A -#define GL_MODELVIEW11_ARB 0x872B -#define GL_MODELVIEW12_ARB 0x872C -#define GL_MODELVIEW13_ARB 0x872D -#define GL_MODELVIEW14_ARB 0x872E -#define GL_MODELVIEW15_ARB 0x872F -#define GL_MODELVIEW16_ARB 0x8730 -#define GL_MODELVIEW17_ARB 0x8731 -#define GL_MODELVIEW18_ARB 0x8732 -#define GL_MODELVIEW19_ARB 0x8733 -#define GL_MODELVIEW20_ARB 0x8734 -#define GL_MODELVIEW21_ARB 0x8735 -#define GL_MODELVIEW22_ARB 0x8736 -#define GL_MODELVIEW23_ARB 0x8737 -#define GL_MODELVIEW24_ARB 0x8738 -#define GL_MODELVIEW25_ARB 0x8739 -#define GL_MODELVIEW26_ARB 0x873A -#define GL_MODELVIEW27_ARB 0x873B -#define GL_MODELVIEW28_ARB 0x873C -#define GL_MODELVIEW29_ARB 0x873D -#define GL_MODELVIEW30_ARB 0x873E -#define GL_MODELVIEW31_ARB 0x873F +# define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +# define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +# define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +# define GL_VERTEX_BLEND_ARB 0x86A7 +# define GL_CURRENT_WEIGHT_ARB 0x86A8 +# define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +# define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +# define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +# define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +# define GL_WEIGHT_ARRAY_ARB 0x86AD +# define GL_MODELVIEW0_ARB 0x1700 +# define GL_MODELVIEW1_ARB 0x850A +# define GL_MODELVIEW2_ARB 0x8722 +# define GL_MODELVIEW3_ARB 0x8723 +# define GL_MODELVIEW4_ARB 0x8724 +# define GL_MODELVIEW5_ARB 0x8725 +# define GL_MODELVIEW6_ARB 0x8726 +# define GL_MODELVIEW7_ARB 0x8727 +# define GL_MODELVIEW8_ARB 0x8728 +# define GL_MODELVIEW9_ARB 0x8729 +# define GL_MODELVIEW10_ARB 0x872A +# define GL_MODELVIEW11_ARB 0x872B +# define GL_MODELVIEW12_ARB 0x872C +# define GL_MODELVIEW13_ARB 0x872D +# define GL_MODELVIEW14_ARB 0x872E +# define GL_MODELVIEW15_ARB 0x872F +# define GL_MODELVIEW16_ARB 0x8730 +# define GL_MODELVIEW17_ARB 0x8731 +# define GL_MODELVIEW18_ARB 0x8732 +# define GL_MODELVIEW19_ARB 0x8733 +# define GL_MODELVIEW20_ARB 0x8734 +# define GL_MODELVIEW21_ARB 0x8735 +# define GL_MODELVIEW22_ARB 0x8736 +# define GL_MODELVIEW23_ARB 0x8737 +# define GL_MODELVIEW24_ARB 0x8738 +# define GL_MODELVIEW25_ARB 0x8739 +# define GL_MODELVIEW26_ARB 0x873A +# define GL_MODELVIEW27_ARB 0x873B +# define GL_MODELVIEW28_ARB 0x873C +# define GL_MODELVIEW29_ARB 0x873D +# define GL_MODELVIEW30_ARB 0x873E +# define GL_MODELVIEW31_ARB 0x873F #endif #ifndef GL_ARB_matrix_palette -#define GL_MATRIX_PALETTE_ARB 0x8840 -#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 -#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 -#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 -#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 -#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 -#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 -#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 -#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 -#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 +# define GL_MATRIX_PALETTE_ARB 0x8840 +# define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +# define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +# define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +# define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +# define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +# define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +# define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +# define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +# define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 #endif #ifndef GL_ARB_texture_env_combine -#define GL_COMBINE_ARB 0x8570 -#define GL_COMBINE_RGB_ARB 0x8571 -#define GL_COMBINE_ALPHA_ARB 0x8572 -#define GL_SOURCE0_RGB_ARB 0x8580 -#define GL_SOURCE1_RGB_ARB 0x8581 -#define GL_SOURCE2_RGB_ARB 0x8582 -#define GL_SOURCE0_ALPHA_ARB 0x8588 -#define GL_SOURCE1_ALPHA_ARB 0x8589 -#define GL_SOURCE2_ALPHA_ARB 0x858A -#define GL_OPERAND0_RGB_ARB 0x8590 -#define GL_OPERAND1_RGB_ARB 0x8591 -#define GL_OPERAND2_RGB_ARB 0x8592 -#define GL_OPERAND0_ALPHA_ARB 0x8598 -#define GL_OPERAND1_ALPHA_ARB 0x8599 -#define GL_OPERAND2_ALPHA_ARB 0x859A -#define GL_RGB_SCALE_ARB 0x8573 -#define GL_ADD_SIGNED_ARB 0x8574 -#define GL_INTERPOLATE_ARB 0x8575 -#define GL_SUBTRACT_ARB 0x84E7 -#define GL_CONSTANT_ARB 0x8576 -#define GL_PRIMARY_COLOR_ARB 0x8577 -#define GL_PREVIOUS_ARB 0x8578 +# define GL_COMBINE_ARB 0x8570 +# define GL_COMBINE_RGB_ARB 0x8571 +# define GL_COMBINE_ALPHA_ARB 0x8572 +# define GL_SOURCE0_RGB_ARB 0x8580 +# define GL_SOURCE1_RGB_ARB 0x8581 +# define GL_SOURCE2_RGB_ARB 0x8582 +# define GL_SOURCE0_ALPHA_ARB 0x8588 +# define GL_SOURCE1_ALPHA_ARB 0x8589 +# define GL_SOURCE2_ALPHA_ARB 0x858A +# define GL_OPERAND0_RGB_ARB 0x8590 +# define GL_OPERAND1_RGB_ARB 0x8591 +# define GL_OPERAND2_RGB_ARB 0x8592 +# define GL_OPERAND0_ALPHA_ARB 0x8598 +# define GL_OPERAND1_ALPHA_ARB 0x8599 +# define GL_OPERAND2_ALPHA_ARB 0x859A +# define GL_RGB_SCALE_ARB 0x8573 +# define GL_ADD_SIGNED_ARB 0x8574 +# define GL_INTERPOLATE_ARB 0x8575 +# define GL_SUBTRACT_ARB 0x84E7 +# define GL_CONSTANT_ARB 0x8576 +# define GL_PRIMARY_COLOR_ARB 0x8577 +# define GL_PREVIOUS_ARB 0x8578 #endif #ifndef GL_ARB_texture_env_crossbar #endif #ifndef GL_ARB_texture_env_dot3 -#define GL_DOT3_RGB_ARB 0x86AE -#define GL_DOT3_RGBA_ARB 0x86AF +# define GL_DOT3_RGB_ARB 0x86AE +# define GL_DOT3_RGBA_ARB 0x86AF #endif #ifndef GL_ARB_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_ARB 0x8370 +# define GL_MIRRORED_REPEAT_ARB 0x8370 #endif #ifndef GL_ARB_depth_texture -#define GL_DEPTH_COMPONENT16_ARB 0x81A5 -#define GL_DEPTH_COMPONENT24_ARB 0x81A6 -#define GL_DEPTH_COMPONENT32_ARB 0x81A7 -#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A -#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B +# define GL_DEPTH_COMPONENT16_ARB 0x81A5 +# define GL_DEPTH_COMPONENT24_ARB 0x81A6 +# define GL_DEPTH_COMPONENT32_ARB 0x81A7 +# define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +# define GL_DEPTH_TEXTURE_MODE_ARB 0x884B #endif #ifndef GL_ARB_shadow -#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C -#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D -#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E +# define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +# define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +# define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E #endif #ifndef GL_ARB_shadow_ambient -#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF +# define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF #endif #ifndef GL_ARB_window_pos #endif #ifndef GL_ARB_vertex_program -#define GL_COLOR_SUM_ARB 0x8458 -#define GL_VERTEX_PROGRAM_ARB 0x8620 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 -#define GL_PROGRAM_LENGTH_ARB 0x8627 -#define GL_PROGRAM_STRING_ARB 0x8628 -#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E -#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F -#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 -#define GL_CURRENT_MATRIX_ARB 0x8641 -#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 -#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B -#define GL_PROGRAM_BINDING_ARB 0x8677 -#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A -#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 -#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 -#define GL_PROGRAM_FORMAT_ARB 0x8876 -#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 -#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 -#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 -#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 -#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 -#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 -#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 -#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 -#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 -#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 -#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA -#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB -#define GL_PROGRAM_ATTRIBS_ARB 0x88AC -#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD -#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE -#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF -#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 -#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 -#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 -#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 -#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 -#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 -#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 -#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 -#define GL_MATRIX0_ARB 0x88C0 -#define GL_MATRIX1_ARB 0x88C1 -#define GL_MATRIX2_ARB 0x88C2 -#define GL_MATRIX3_ARB 0x88C3 -#define GL_MATRIX4_ARB 0x88C4 -#define GL_MATRIX5_ARB 0x88C5 -#define GL_MATRIX6_ARB 0x88C6 -#define GL_MATRIX7_ARB 0x88C7 -#define GL_MATRIX8_ARB 0x88C8 -#define GL_MATRIX9_ARB 0x88C9 -#define GL_MATRIX10_ARB 0x88CA -#define GL_MATRIX11_ARB 0x88CB -#define GL_MATRIX12_ARB 0x88CC -#define GL_MATRIX13_ARB 0x88CD -#define GL_MATRIX14_ARB 0x88CE -#define GL_MATRIX15_ARB 0x88CF -#define GL_MATRIX16_ARB 0x88D0 -#define GL_MATRIX17_ARB 0x88D1 -#define GL_MATRIX18_ARB 0x88D2 -#define GL_MATRIX19_ARB 0x88D3 -#define GL_MATRIX20_ARB 0x88D4 -#define GL_MATRIX21_ARB 0x88D5 -#define GL_MATRIX22_ARB 0x88D6 -#define GL_MATRIX23_ARB 0x88D7 -#define GL_MATRIX24_ARB 0x88D8 -#define GL_MATRIX25_ARB 0x88D9 -#define GL_MATRIX26_ARB 0x88DA -#define GL_MATRIX27_ARB 0x88DB -#define GL_MATRIX28_ARB 0x88DC -#define GL_MATRIX29_ARB 0x88DD -#define GL_MATRIX30_ARB 0x88DE -#define GL_MATRIX31_ARB 0x88DF +# define GL_COLOR_SUM_ARB 0x8458 +# define GL_VERTEX_PROGRAM_ARB 0x8620 +# define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +# define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +# define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +# define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +# define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +# define GL_PROGRAM_LENGTH_ARB 0x8627 +# define GL_PROGRAM_STRING_ARB 0x8628 +# define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +# define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +# define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +# define GL_CURRENT_MATRIX_ARB 0x8641 +# define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +# define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +# define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +# define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +# define GL_PROGRAM_BINDING_ARB 0x8677 +# define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +# define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +# define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +# define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +# define GL_PROGRAM_FORMAT_ARB 0x8876 +# define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +# define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +# define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +# define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +# define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +# define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +# define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +# define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +# define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +# define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +# define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +# define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +# define GL_PROGRAM_ATTRIBS_ARB 0x88AC +# define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +# define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +# define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +# define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +# define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +# define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +# define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +# define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +# define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +# define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +# define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +# define GL_MATRIX0_ARB 0x88C0 +# define GL_MATRIX1_ARB 0x88C1 +# define GL_MATRIX2_ARB 0x88C2 +# define GL_MATRIX3_ARB 0x88C3 +# define GL_MATRIX4_ARB 0x88C4 +# define GL_MATRIX5_ARB 0x88C5 +# define GL_MATRIX6_ARB 0x88C6 +# define GL_MATRIX7_ARB 0x88C7 +# define GL_MATRIX8_ARB 0x88C8 +# define GL_MATRIX9_ARB 0x88C9 +# define GL_MATRIX10_ARB 0x88CA +# define GL_MATRIX11_ARB 0x88CB +# define GL_MATRIX12_ARB 0x88CC +# define GL_MATRIX13_ARB 0x88CD +# define GL_MATRIX14_ARB 0x88CE +# define GL_MATRIX15_ARB 0x88CF +# define GL_MATRIX16_ARB 0x88D0 +# define GL_MATRIX17_ARB 0x88D1 +# define GL_MATRIX18_ARB 0x88D2 +# define GL_MATRIX19_ARB 0x88D3 +# define GL_MATRIX20_ARB 0x88D4 +# define GL_MATRIX21_ARB 0x88D5 +# define GL_MATRIX22_ARB 0x88D6 +# define GL_MATRIX23_ARB 0x88D7 +# define GL_MATRIX24_ARB 0x88D8 +# define GL_MATRIX25_ARB 0x88D9 +# define GL_MATRIX26_ARB 0x88DA +# define GL_MATRIX27_ARB 0x88DB +# define GL_MATRIX28_ARB 0x88DC +# define GL_MATRIX29_ARB 0x88DD +# define GL_MATRIX30_ARB 0x88DE +# define GL_MATRIX31_ARB 0x88DF #endif #ifndef GL_ARB_fragment_program -#define GL_FRAGMENT_PROGRAM_ARB 0x8804 -#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 -#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 -#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 -#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 -#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 -#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A -#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B -#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C -#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D -#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E -#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F -#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 -#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +# define GL_FRAGMENT_PROGRAM_ARB 0x8804 +# define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +# define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +# define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +# define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +# define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +# define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +# define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +# define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +# define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +# define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +# define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +# define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +# define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +# define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 #endif #ifndef GL_ARB_vertex_buffer_object -#define GL_BUFFER_SIZE_ARB 0x8764 -#define GL_BUFFER_USAGE_ARB 0x8765 -#define GL_ARRAY_BUFFER_ARB 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 -#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 -#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 -#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D -#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F -#define GL_READ_ONLY_ARB 0x88B8 -#define GL_WRITE_ONLY_ARB 0x88B9 -#define GL_READ_WRITE_ARB 0x88BA -#define GL_BUFFER_ACCESS_ARB 0x88BB -#define GL_BUFFER_MAPPED_ARB 0x88BC -#define GL_BUFFER_MAP_POINTER_ARB 0x88BD -#define GL_STREAM_DRAW_ARB 0x88E0 -#define GL_STREAM_READ_ARB 0x88E1 -#define GL_STREAM_COPY_ARB 0x88E2 -#define GL_STATIC_DRAW_ARB 0x88E4 -#define GL_STATIC_READ_ARB 0x88E5 -#define GL_STATIC_COPY_ARB 0x88E6 -#define GL_DYNAMIC_DRAW_ARB 0x88E8 -#define GL_DYNAMIC_READ_ARB 0x88E9 -#define GL_DYNAMIC_COPY_ARB 0x88EA +# define GL_BUFFER_SIZE_ARB 0x8764 +# define GL_BUFFER_USAGE_ARB 0x8765 +# define GL_ARRAY_BUFFER_ARB 0x8892 +# define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +# define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +# define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +# define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +# define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +# define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +# define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +# define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +# define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +# define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +# define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +# define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +# define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +# define GL_READ_ONLY_ARB 0x88B8 +# define GL_WRITE_ONLY_ARB 0x88B9 +# define GL_READ_WRITE_ARB 0x88BA +# define GL_BUFFER_ACCESS_ARB 0x88BB +# define GL_BUFFER_MAPPED_ARB 0x88BC +# define GL_BUFFER_MAP_POINTER_ARB 0x88BD +# define GL_STREAM_DRAW_ARB 0x88E0 +# define GL_STREAM_READ_ARB 0x88E1 +# define GL_STREAM_COPY_ARB 0x88E2 +# define GL_STATIC_DRAW_ARB 0x88E4 +# define GL_STATIC_READ_ARB 0x88E5 +# define GL_STATIC_COPY_ARB 0x88E6 +# define GL_DYNAMIC_DRAW_ARB 0x88E8 +# define GL_DYNAMIC_READ_ARB 0x88E9 +# define GL_DYNAMIC_COPY_ARB 0x88EA #endif #ifndef GL_ARB_occlusion_query -#define GL_QUERY_COUNTER_BITS_ARB 0x8864 -#define GL_CURRENT_QUERY_ARB 0x8865 -#define GL_QUERY_RESULT_ARB 0x8866 -#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 -#define GL_SAMPLES_PASSED_ARB 0x8914 +# define GL_QUERY_COUNTER_BITS_ARB 0x8864 +# define GL_CURRENT_QUERY_ARB 0x8865 +# define GL_QUERY_RESULT_ARB 0x8866 +# define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +# define GL_SAMPLES_PASSED_ARB 0x8914 #endif #ifndef GL_ARB_shader_objects -#define GL_PROGRAM_OBJECT_ARB 0x8B40 -#define GL_SHADER_OBJECT_ARB 0x8B48 -#define GL_OBJECT_TYPE_ARB 0x8B4E -#define GL_OBJECT_SUBTYPE_ARB 0x8B4F -#define GL_FLOAT_VEC2_ARB 0x8B50 -#define GL_FLOAT_VEC3_ARB 0x8B51 -#define GL_FLOAT_VEC4_ARB 0x8B52 -#define GL_INT_VEC2_ARB 0x8B53 -#define GL_INT_VEC3_ARB 0x8B54 -#define GL_INT_VEC4_ARB 0x8B55 -#define GL_BOOL_ARB 0x8B56 -#define GL_BOOL_VEC2_ARB 0x8B57 -#define GL_BOOL_VEC3_ARB 0x8B58 -#define GL_BOOL_VEC4_ARB 0x8B59 -#define GL_FLOAT_MAT2_ARB 0x8B5A -#define GL_FLOAT_MAT3_ARB 0x8B5B -#define GL_FLOAT_MAT4_ARB 0x8B5C -#define GL_SAMPLER_1D_ARB 0x8B5D -#define GL_SAMPLER_2D_ARB 0x8B5E -#define GL_SAMPLER_3D_ARB 0x8B5F -#define GL_SAMPLER_CUBE_ARB 0x8B60 -#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 -#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 -#define GL_SAMPLER_2D_RECT_ARB 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 -#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 -#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 -#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 -#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 -#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 -#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 -#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 -#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 -#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 +# define GL_PROGRAM_OBJECT_ARB 0x8B40 +# define GL_SHADER_OBJECT_ARB 0x8B48 +# define GL_OBJECT_TYPE_ARB 0x8B4E +# define GL_OBJECT_SUBTYPE_ARB 0x8B4F +# define GL_FLOAT_VEC2_ARB 0x8B50 +# define GL_FLOAT_VEC3_ARB 0x8B51 +# define GL_FLOAT_VEC4_ARB 0x8B52 +# define GL_INT_VEC2_ARB 0x8B53 +# define GL_INT_VEC3_ARB 0x8B54 +# define GL_INT_VEC4_ARB 0x8B55 +# define GL_BOOL_ARB 0x8B56 +# define GL_BOOL_VEC2_ARB 0x8B57 +# define GL_BOOL_VEC3_ARB 0x8B58 +# define GL_BOOL_VEC4_ARB 0x8B59 +# define GL_FLOAT_MAT2_ARB 0x8B5A +# define GL_FLOAT_MAT3_ARB 0x8B5B +# define GL_FLOAT_MAT4_ARB 0x8B5C +# define GL_SAMPLER_1D_ARB 0x8B5D +# define GL_SAMPLER_2D_ARB 0x8B5E +# define GL_SAMPLER_3D_ARB 0x8B5F +# define GL_SAMPLER_CUBE_ARB 0x8B60 +# define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +# define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +# define GL_SAMPLER_2D_RECT_ARB 0x8B63 +# define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +# define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +# define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +# define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +# define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +# define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +# define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +# define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +# define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +# define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 #endif #ifndef GL_ARB_vertex_shader -#define GL_VERTEX_SHADER_ARB 0x8B31 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A -#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D -#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 -#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A +# define GL_VERTEX_SHADER_ARB 0x8B31 +# define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +# define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +# define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +# define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +# define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +# define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A #endif #ifndef GL_ARB_fragment_shader -#define GL_FRAGMENT_SHADER_ARB 0x8B30 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B +# define GL_FRAGMENT_SHADER_ARB 0x8B30 +# define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +# define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B #endif #ifndef GL_ARB_shading_language_100 -#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C +# define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C #endif #ifndef GL_ARB_texture_non_power_of_two #endif #ifndef GL_ARB_point_sprite -#define GL_POINT_SPRITE_ARB 0x8861 -#define GL_COORD_REPLACE_ARB 0x8862 +# define GL_POINT_SPRITE_ARB 0x8861 +# define GL_COORD_REPLACE_ARB 0x8862 #endif #ifndef GL_ARB_fragment_program_shadow #endif #ifndef GL_ARB_draw_buffers -#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 -#define GL_DRAW_BUFFER0_ARB 0x8825 -#define GL_DRAW_BUFFER1_ARB 0x8826 -#define GL_DRAW_BUFFER2_ARB 0x8827 -#define GL_DRAW_BUFFER3_ARB 0x8828 -#define GL_DRAW_BUFFER4_ARB 0x8829 -#define GL_DRAW_BUFFER5_ARB 0x882A -#define GL_DRAW_BUFFER6_ARB 0x882B -#define GL_DRAW_BUFFER7_ARB 0x882C -#define GL_DRAW_BUFFER8_ARB 0x882D -#define GL_DRAW_BUFFER9_ARB 0x882E -#define GL_DRAW_BUFFER10_ARB 0x882F -#define GL_DRAW_BUFFER11_ARB 0x8830 -#define GL_DRAW_BUFFER12_ARB 0x8831 -#define GL_DRAW_BUFFER13_ARB 0x8832 -#define GL_DRAW_BUFFER14_ARB 0x8833 -#define GL_DRAW_BUFFER15_ARB 0x8834 +# define GL_MAX_DRAW_BUFFERS_ARB 0x8824 +# define GL_DRAW_BUFFER0_ARB 0x8825 +# define GL_DRAW_BUFFER1_ARB 0x8826 +# define GL_DRAW_BUFFER2_ARB 0x8827 +# define GL_DRAW_BUFFER3_ARB 0x8828 +# define GL_DRAW_BUFFER4_ARB 0x8829 +# define GL_DRAW_BUFFER5_ARB 0x882A +# define GL_DRAW_BUFFER6_ARB 0x882B +# define GL_DRAW_BUFFER7_ARB 0x882C +# define GL_DRAW_BUFFER8_ARB 0x882D +# define GL_DRAW_BUFFER9_ARB 0x882E +# define GL_DRAW_BUFFER10_ARB 0x882F +# define GL_DRAW_BUFFER11_ARB 0x8830 +# define GL_DRAW_BUFFER12_ARB 0x8831 +# define GL_DRAW_BUFFER13_ARB 0x8832 +# define GL_DRAW_BUFFER14_ARB 0x8833 +# define GL_DRAW_BUFFER15_ARB 0x8834 #endif #ifndef GL_ARB_texture_rectangle -#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +# define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +# define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +# define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 +# define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 #endif #ifndef GL_ARB_color_buffer_float -#define GL_RGBA_FLOAT_MODE_ARB 0x8820 -#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A -#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B -#define GL_CLAMP_READ_COLOR_ARB 0x891C -#define GL_FIXED_ONLY_ARB 0x891D +# define GL_RGBA_FLOAT_MODE_ARB 0x8820 +# define GL_CLAMP_VERTEX_COLOR_ARB 0x891A +# define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B +# define GL_CLAMP_READ_COLOR_ARB 0x891C +# define GL_FIXED_ONLY_ARB 0x891D #endif #ifndef GL_ARB_half_float_pixel -#define GL_HALF_FLOAT_ARB 0x140B +# define GL_HALF_FLOAT_ARB 0x140B #endif #ifndef GL_ARB_texture_float -#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 -#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 -#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 -#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 -#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 -#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 -#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 -#define GL_RGBA32F_ARB 0x8814 -#define GL_RGB32F_ARB 0x8815 -#define GL_ALPHA32F_ARB 0x8816 -#define GL_INTENSITY32F_ARB 0x8817 -#define GL_LUMINANCE32F_ARB 0x8818 -#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 -#define GL_RGBA16F_ARB 0x881A -#define GL_RGB16F_ARB 0x881B -#define GL_ALPHA16F_ARB 0x881C -#define GL_INTENSITY16F_ARB 0x881D -#define GL_LUMINANCE16F_ARB 0x881E -#define GL_LUMINANCE_ALPHA16F_ARB 0x881F +# define GL_TEXTURE_RED_TYPE_ARB 0x8C10 +# define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 +# define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 +# define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 +# define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 +# define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 +# define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 +# define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 +# define GL_RGBA32F_ARB 0x8814 +# define GL_RGB32F_ARB 0x8815 +# define GL_ALPHA32F_ARB 0x8816 +# define GL_INTENSITY32F_ARB 0x8817 +# define GL_LUMINANCE32F_ARB 0x8818 +# define GL_LUMINANCE_ALPHA32F_ARB 0x8819 +# define GL_RGBA16F_ARB 0x881A +# define GL_RGB16F_ARB 0x881B +# define GL_ALPHA16F_ARB 0x881C +# define GL_INTENSITY16F_ARB 0x881D +# define GL_LUMINANCE16F_ARB 0x881E +# define GL_LUMINANCE_ALPHA16F_ARB 0x881F #endif #ifndef GL_ARB_pixel_buffer_object -#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF +# define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +# define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +# define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +# define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF #endif #ifndef GL_ARB_depth_buffer_float -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +# define GL_DEPTH_COMPONENT32F 0x8CAC +# define GL_DEPTH32F_STENCIL8 0x8CAD +# define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD #endif #ifndef GL_ARB_draw_instanced #endif #ifndef GL_ARB_framebuffer_object -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_TEXTURE_STENCIL_SIZE 0x88F1 -#define GL_TEXTURE_RED_TYPE 0x8C10 -#define GL_TEXTURE_GREEN_TYPE 0x8C11 -#define GL_TEXTURE_BLUE_TYPE 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE 0x8C13 -#define GL_TEXTURE_DEPTH_TYPE 0x8C16 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_STENCIL_INDEX1 0x8D46 -#define GL_STENCIL_INDEX4 0x8D47 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_STENCIL_INDEX16 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_MAX_SAMPLES 0x8D57 -#define GL_INDEX 0x8222 -#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 -#define GL_TEXTURE_INTENSITY_TYPE 0x8C15 +# define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +# define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +# define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +# define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +# define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +# define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +# define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +# define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +# define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +# define GL_FRAMEBUFFER_DEFAULT 0x8218 +# define GL_FRAMEBUFFER_UNDEFINED 0x8219 +# define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +# define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +# define GL_DEPTH_STENCIL 0x84F9 +# define GL_UNSIGNED_INT_24_8 0x84FA +# define GL_DEPTH24_STENCIL8 0x88F0 +# define GL_TEXTURE_STENCIL_SIZE 0x88F1 +# define GL_TEXTURE_RED_TYPE 0x8C10 +# define GL_TEXTURE_GREEN_TYPE 0x8C11 +# define GL_TEXTURE_BLUE_TYPE 0x8C12 +# define GL_TEXTURE_ALPHA_TYPE 0x8C13 +# define GL_TEXTURE_DEPTH_TYPE 0x8C16 +# define GL_UNSIGNED_NORMALIZED 0x8C17 +# define GL_FRAMEBUFFER_BINDING 0x8CA6 +# define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING +# define GL_RENDERBUFFER_BINDING 0x8CA7 +# define GL_READ_FRAMEBUFFER 0x8CA8 +# define GL_DRAW_FRAMEBUFFER 0x8CA9 +# define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +# define GL_RENDERBUFFER_SAMPLES 0x8CAB +# define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +# define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +# define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +# define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +# define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +# define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +# define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +# define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +# define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +# define GL_COLOR_ATTACHMENT0 0x8CE0 +# define GL_COLOR_ATTACHMENT1 0x8CE1 +# define GL_COLOR_ATTACHMENT2 0x8CE2 +# define GL_COLOR_ATTACHMENT3 0x8CE3 +# define GL_COLOR_ATTACHMENT4 0x8CE4 +# define GL_COLOR_ATTACHMENT5 0x8CE5 +# define GL_COLOR_ATTACHMENT6 0x8CE6 +# define GL_COLOR_ATTACHMENT7 0x8CE7 +# define GL_COLOR_ATTACHMENT8 0x8CE8 +# define GL_COLOR_ATTACHMENT9 0x8CE9 +# define GL_COLOR_ATTACHMENT10 0x8CEA +# define GL_COLOR_ATTACHMENT11 0x8CEB +# define GL_COLOR_ATTACHMENT12 0x8CEC +# define GL_COLOR_ATTACHMENT13 0x8CED +# define GL_COLOR_ATTACHMENT14 0x8CEE +# define GL_COLOR_ATTACHMENT15 0x8CEF +# define GL_DEPTH_ATTACHMENT 0x8D00 +# define GL_STENCIL_ATTACHMENT 0x8D20 +# define GL_FRAMEBUFFER 0x8D40 +# define GL_RENDERBUFFER 0x8D41 +# define GL_RENDERBUFFER_WIDTH 0x8D42 +# define GL_RENDERBUFFER_HEIGHT 0x8D43 +# define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +# define GL_STENCIL_INDEX1 0x8D46 +# define GL_STENCIL_INDEX4 0x8D47 +# define GL_STENCIL_INDEX8 0x8D48 +# define GL_STENCIL_INDEX16 0x8D49 +# define GL_RENDERBUFFER_RED_SIZE 0x8D50 +# define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +# define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +# define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +# define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +# define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +# define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +# define GL_MAX_SAMPLES 0x8D57 +# define GL_INDEX 0x8222 +# define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 +# define GL_TEXTURE_INTENSITY_TYPE 0x8C15 #endif #ifndef GL_ARB_framebuffer_sRGB -#define GL_FRAMEBUFFER_SRGB 0x8DB9 +# define GL_FRAMEBUFFER_SRGB 0x8DB9 #endif #ifndef GL_ARB_geometry_shader4 -#define GL_LINES_ADJACENCY_ARB 0x000A -#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B -#define GL_TRIANGLES_ADJACENCY_ARB 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D -#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 -#define GL_GEOMETRY_SHADER_ARB 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA -#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB -#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD -#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 +# define GL_LINES_ADJACENCY_ARB 0x000A +# define GL_LINE_STRIP_ADJACENCY_ARB 0x000B +# define GL_TRIANGLES_ADJACENCY_ARB 0x000C +# define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D +# define GL_PROGRAM_POINT_SIZE_ARB 0x8642 +# define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 +# define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 +# define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 +# define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 +# define GL_GEOMETRY_SHADER_ARB 0x8DD9 +# define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA +# define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB +# define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC +# define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD +# define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE +# define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF +# define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 +# define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 /* reuse GL_MAX_VARYING_COMPONENTS */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ #endif #ifndef GL_ARB_half_float_vertex -#define GL_HALF_FLOAT 0x140B +# define GL_HALF_FLOAT 0x140B #endif #ifndef GL_ARB_instanced_arrays -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE +# define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE #endif #ifndef GL_ARB_map_buffer_range -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +# define GL_MAP_READ_BIT 0x0001 +# define GL_MAP_WRITE_BIT 0x0002 +# define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +# define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +# define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +# define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 #endif #ifndef GL_ARB_texture_buffer_object -#define GL_TEXTURE_BUFFER_ARB 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D -#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E +# define GL_TEXTURE_BUFFER_ARB 0x8C2A +# define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B +# define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C +# define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D +# define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E #endif #ifndef GL_ARB_texture_compression_rgtc -#define GL_COMPRESSED_RED_RGTC1 0x8DBB -#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC -#define GL_COMPRESSED_RG_RGTC2 0x8DBD -#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE +# define GL_COMPRESSED_RED_RGTC1 0x8DBB +# define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC +# define GL_COMPRESSED_RG_RGTC2 0x8DBD +# define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE #endif #ifndef GL_ARB_texture_rg -#define GL_RG 0x8227 -#define GL_RG_INTEGER 0x8228 -#define GL_R8 0x8229 -#define GL_R16 0x822A -#define GL_RG8 0x822B -#define GL_RG16 0x822C -#define GL_R16F 0x822D -#define GL_R32F 0x822E -#define GL_RG16F 0x822F -#define GL_RG32F 0x8230 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C +# define GL_RG 0x8227 +# define GL_RG_INTEGER 0x8228 +# define GL_R8 0x8229 +# define GL_R16 0x822A +# define GL_RG8 0x822B +# define GL_RG16 0x822C +# define GL_R16F 0x822D +# define GL_R32F 0x822E +# define GL_RG16F 0x822F +# define GL_RG32F 0x8230 +# define GL_R8I 0x8231 +# define GL_R8UI 0x8232 +# define GL_R16I 0x8233 +# define GL_R16UI 0x8234 +# define GL_R32I 0x8235 +# define GL_R32UI 0x8236 +# define GL_RG8I 0x8237 +# define GL_RG8UI 0x8238 +# define GL_RG16I 0x8239 +# define GL_RG16UI 0x823A +# define GL_RG32I 0x823B +# define GL_RG32UI 0x823C #endif #ifndef GL_ARB_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING 0x85B5 +# define GL_VERTEX_ARRAY_BINDING 0x85B5 #endif #ifndef GL_ARB_uniform_buffer_object -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_INVALID_INDEX 0xFFFFFFFFu +# define GL_UNIFORM_BUFFER 0x8A11 +# define GL_UNIFORM_BUFFER_BINDING 0x8A28 +# define GL_UNIFORM_BUFFER_START 0x8A29 +# define GL_UNIFORM_BUFFER_SIZE 0x8A2A +# define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +# define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +# define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +# define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +# define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +# define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +# define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +# define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +# define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +# define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +# define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +# define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +# define GL_UNIFORM_TYPE 0x8A37 +# define GL_UNIFORM_SIZE 0x8A38 +# define GL_UNIFORM_NAME_LENGTH 0x8A39 +# define GL_UNIFORM_BLOCK_INDEX 0x8A3A +# define GL_UNIFORM_OFFSET 0x8A3B +# define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +# define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +# define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +# define GL_UNIFORM_BLOCK_BINDING 0x8A3F +# define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +# define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +# define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +# define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +# define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +# define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 +# define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +# define GL_INVALID_INDEX 0xFFFFFFFFu #endif #ifndef GL_ARB_compatibility @@ -2140,17 +2140,17 @@ extern "C" { #endif #ifndef GL_ARB_copy_buffer -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_READ_BUFFER GL_COPY_READ_BUFFER_BINDING -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 -#define GL_COPY_WRITE_BUFFER GL_COPY_WRITE_BUFFER_BINDING +# define GL_COPY_READ_BUFFER_BINDING 0x8F36 +# define GL_COPY_READ_BUFFER GL_COPY_READ_BUFFER_BINDING +# define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +# define GL_COPY_WRITE_BUFFER GL_COPY_WRITE_BUFFER_BINDING #endif #ifndef GL_ARB_shader_texture_lod #endif #ifndef GL_ARB_depth_clamp -#define GL_DEPTH_CLAMP 0x864F +# define GL_DEPTH_CLAMP 0x864F #endif #ifndef GL_ARB_draw_elements_base_vertex @@ -2160,56 +2160,56 @@ extern "C" { #endif #ifndef GL_ARB_provoking_vertex -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C -#define GL_FIRST_VERTEX_CONVENTION 0x8E4D -#define GL_LAST_VERTEX_CONVENTION 0x8E4E -#define GL_PROVOKING_VERTEX 0x8E4F +# define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C +# define GL_FIRST_VERTEX_CONVENTION 0x8E4D +# define GL_LAST_VERTEX_CONVENTION 0x8E4E +# define GL_PROVOKING_VERTEX 0x8E4F #endif #ifndef GL_ARB_seamless_cube_map -#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F +# define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F #endif #ifndef GL_ARB_sync -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_OBJECT_TYPE 0x9112 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_STATUS 0x9114 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_UNSIGNALED 0x9118 -#define GL_SIGNALED 0x9119 -#define GL_ALREADY_SIGNALED 0x911A -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_CONDITION_SATISFIED 0x911C -#define GL_WAIT_FAILED 0x911D -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull +# define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +# define GL_OBJECT_TYPE 0x9112 +# define GL_SYNC_CONDITION 0x9113 +# define GL_SYNC_STATUS 0x9114 +# define GL_SYNC_FLAGS 0x9115 +# define GL_SYNC_FENCE 0x9116 +# define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +# define GL_UNSIGNALED 0x9118 +# define GL_SIGNALED 0x9119 +# define GL_ALREADY_SIGNALED 0x911A +# define GL_TIMEOUT_EXPIRED 0x911B +# define GL_CONDITION_SATISFIED 0x911C +# define GL_WAIT_FAILED 0x911D +# define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +# define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull #endif #ifndef GL_ARB_texture_multisample -#define GL_SAMPLE_POSITION 0x8E50 -#define GL_SAMPLE_MASK 0x8E51 -#define GL_SAMPLE_MASK_VALUE 0x8E52 -#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 -#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 -#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 -#define GL_TEXTURE_SAMPLES 0x9106 -#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 -#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 -#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A -#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B -#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D -#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E -#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F -#define GL_MAX_INTEGER_SAMPLES 0x9110 +# define GL_SAMPLE_POSITION 0x8E50 +# define GL_SAMPLE_MASK 0x8E51 +# define GL_SAMPLE_MASK_VALUE 0x8E52 +# define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +# define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +# define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 +# define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +# define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 +# define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +# define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 +# define GL_TEXTURE_SAMPLES 0x9106 +# define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +# define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +# define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +# define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +# define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B +# define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C +# define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D +# define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +# define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +# define GL_MAX_INTEGER_SAMPLES 0x9110 #endif #ifndef GL_ARB_vertex_array_bgra @@ -2220,168 +2220,168 @@ extern "C" { #endif #ifndef GL_ARB_sample_shading -#define GL_SAMPLE_SHADING_ARB 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 +# define GL_SAMPLE_SHADING_ARB 0x8C36 +# define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 #endif #ifndef GL_ARB_texture_cube_map_array -#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F +# define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 +# define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A +# define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B +# define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C +# define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D +# define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E +# define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F #endif #ifndef GL_ARB_texture_gather -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F -#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F +# define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E +# define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F +# define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F #endif #ifndef GL_ARB_texture_query_lod #endif #ifndef GL_ARB_shading_language_include -#define GL_SHADER_INCLUDE_ARB 0x8DAE -#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 -#define GL_NAMED_STRING_TYPE_ARB 0x8DEA +# define GL_SHADER_INCLUDE_ARB 0x8DAE +# define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 +# define GL_NAMED_STRING_TYPE_ARB 0x8DEA #endif #ifndef GL_ARB_texture_compression_bptc -#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F +# define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C +# define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D +# define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E +# define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F #endif #ifndef GL_ARB_blend_func_extended -#define GL_SRC1_COLOR 0x88F9 +# define GL_SRC1_COLOR 0x88F9 /* reuse GL_SRC1_ALPHA */ -#define GL_ONE_MINUS_SRC1_COLOR 0x88FA -#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB -#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC +# define GL_ONE_MINUS_SRC1_COLOR 0x88FA +# define GL_ONE_MINUS_SRC1_ALPHA 0x88FB +# define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC #endif #ifndef GL_ARB_explicit_attrib_location #endif #ifndef GL_ARB_occlusion_query2 -#define GL_ANY_SAMPLES_PASSED 0x8C2F +# define GL_ANY_SAMPLES_PASSED 0x8C2F #endif #ifndef GL_ARB_sampler_objects -#define GL_SAMPLER_BINDING 0x8919 +# define GL_SAMPLER_BINDING 0x8919 #endif #ifndef GL_ARB_shader_bit_encoding #endif #ifndef GL_ARB_texture_rgb10_a2ui -#define GL_RGB10_A2UI 0x906F +# define GL_RGB10_A2UI 0x906F #endif #ifndef GL_ARB_texture_swizzle -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 +# define GL_TEXTURE_SWIZZLE_R 0x8E42 +# define GL_TEXTURE_SWIZZLE_G 0x8E43 +# define GL_TEXTURE_SWIZZLE_B 0x8E44 +# define GL_TEXTURE_SWIZZLE_A 0x8E45 +# define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 #endif #ifndef GL_ARB_timer_query -#define GL_TIME_ELAPSED 0x88BF -#define GL_TIMESTAMP 0x8E28 +# define GL_TIME_ELAPSED 0x88BF +# define GL_TIMESTAMP 0x8E28 #endif #ifndef GL_ARB_vertex_type_2_10_10_10_rev /* reuse GL_UNSIGNED_INT_2_10_10_10_REV */ -#define GL_INT_2_10_10_10_REV 0x8D9F +# define GL_INT_2_10_10_10_REV 0x8D9F #endif #ifndef GL_ARB_draw_indirect -#define GL_DRAW_INDIRECT_BUFFER 0x8F3F -#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +# define GL_DRAW_INDIRECT_BUFFER 0x8F3F +# define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 #endif #ifndef GL_ARB_gpu_shader5 -#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F -#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C -#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D +# define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F +# define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A +# define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B +# define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C +# define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D /* reuse GL_MAX_VERTEX_STREAMS */ #endif #ifndef GL_ARB_gpu_shader_fp64 /* reuse GL_DOUBLE */ -#define GL_DOUBLE_VEC2 0x8FFC -#define GL_DOUBLE_VEC3 0x8FFD -#define GL_DOUBLE_VEC4 0x8FFE -#define GL_DOUBLE_MAT2 0x8F46 -#define GL_DOUBLE_MAT3 0x8F47 -#define GL_DOUBLE_MAT4 0x8F48 -#define GL_DOUBLE_MAT2x3 0x8F49 -#define GL_DOUBLE_MAT2x4 0x8F4A -#define GL_DOUBLE_MAT3x2 0x8F4B -#define GL_DOUBLE_MAT3x4 0x8F4C -#define GL_DOUBLE_MAT4x2 0x8F4D -#define GL_DOUBLE_MAT4x3 0x8F4E +# define GL_DOUBLE_VEC2 0x8FFC +# define GL_DOUBLE_VEC3 0x8FFD +# define GL_DOUBLE_VEC4 0x8FFE +# define GL_DOUBLE_MAT2 0x8F46 +# define GL_DOUBLE_MAT3 0x8F47 +# define GL_DOUBLE_MAT4 0x8F48 +# define GL_DOUBLE_MAT2x3 0x8F49 +# define GL_DOUBLE_MAT2x4 0x8F4A +# define GL_DOUBLE_MAT3x2 0x8F4B +# define GL_DOUBLE_MAT3x4 0x8F4C +# define GL_DOUBLE_MAT4x2 0x8F4D +# define GL_DOUBLE_MAT4x3 0x8F4E #endif #ifndef GL_ARB_shader_subroutine -#define GL_ACTIVE_SUBROUTINES 0x8DE5 -#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 -#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 -#define GL_MAX_SUBROUTINES 0x8DE7 -#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 -#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A -#define GL_COMPATIBLE_SUBROUTINES 0x8E4B +# define GL_ACTIVE_SUBROUTINES 0x8DE5 +# define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 +# define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 +# define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 +# define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 +# define GL_MAX_SUBROUTINES 0x8DE7 +# define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 +# define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A +# define GL_COMPATIBLE_SUBROUTINES 0x8E4B /* reuse GL_UNIFORM_SIZE */ /* reuse GL_UNIFORM_NAME_LENGTH */ #endif #ifndef GL_ARB_tessellation_shader -#define GL_PATCHES 0x000E -#define GL_PATCH_VERTICES 0x8E72 -#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 -#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 -#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 -#define GL_TESS_GEN_MODE 0x8E76 -#define GL_TESS_GEN_SPACING 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 -#define GL_TESS_GEN_POINT_MODE 0x8E79 +# define GL_PATCHES 0x000E +# define GL_PATCH_VERTICES 0x8E72 +# define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 +# define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 +# define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 +# define GL_TESS_GEN_MODE 0x8E76 +# define GL_TESS_GEN_SPACING 0x8E77 +# define GL_TESS_GEN_VERTEX_ORDER 0x8E78 +# define GL_TESS_GEN_POINT_MODE 0x8E79 /* reuse GL_TRIANGLES */ /* reuse GL_QUADS */ -#define GL_ISOLINES 0x8E7A +# define GL_ISOLINES 0x8E7A /* reuse GL_EQUAL */ -#define GL_FRACTIONAL_ODD 0x8E7B -#define GL_FRACTIONAL_EVEN 0x8E7C +# define GL_FRACTIONAL_ODD 0x8E7B +# define GL_FRACTIONAL_EVEN 0x8E7C /* reuse GL_CCW */ /* reuse GL_CW */ -#define GL_MAX_PATCH_VERTICES 0x8E7D -#define GL_MAX_TESS_GEN_LEVEL 0x8E7E -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 -#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 -#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 -#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 -#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 -#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 -#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 -#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A -#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C -#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D -#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E -#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 -#define GL_TESS_EVALUATION_SHADER 0x8E87 -#define GL_TESS_CONTROL_SHADER 0x8E88 +# define GL_MAX_PATCH_VERTICES 0x8E7D +# define GL_MAX_TESS_GEN_LEVEL 0x8E7E +# define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F +# define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 +# define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 +# define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 +# define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 +# define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 +# define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 +# define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 +# define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 +# define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A +# define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C +# define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D +# define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E +# define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F +# define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 +# define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 +# define GL_TESS_EVALUATION_SHADER 0x8E87 +# define GL_TESS_CONTROL_SHADER 0x8E88 #endif #ifndef GL_ARB_texture_buffer_object_rgb32 @@ -2391,55 +2391,55 @@ extern "C" { #endif #ifndef GL_ARB_transform_feedback2 -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED GL_TRANSFORM_FEEDBACK_PAUSED -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE GL_TRANSFORM_FEEDBACK_ACTIVE -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +# define GL_TRANSFORM_FEEDBACK 0x8E22 +# define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +# define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED GL_TRANSFORM_FEEDBACK_PAUSED +# define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +# define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE GL_TRANSFORM_FEEDBACK_ACTIVE +# define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 #endif #ifndef GL_ARB_transform_feedback3 -#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 -#define GL_MAX_VERTEX_STREAMS 0x8E71 +# define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 +# define GL_MAX_VERTEX_STREAMS 0x8E71 #endif #ifndef GL_ARB_ES2_compatibility -#define GL_FIXED 0x140C -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_RGB565 0x8D62 +# define GL_FIXED 0x140C +# define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +# define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +# define GL_LOW_FLOAT 0x8DF0 +# define GL_MEDIUM_FLOAT 0x8DF1 +# define GL_HIGH_FLOAT 0x8DF2 +# define GL_LOW_INT 0x8DF3 +# define GL_MEDIUM_INT 0x8DF4 +# define GL_HIGH_INT 0x8DF5 +# define GL_SHADER_COMPILER 0x8DFA +# define GL_SHADER_BINARY_FORMATS 0x8DF8 +# define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +# define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +# define GL_MAX_VARYING_VECTORS 0x8DFC +# define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +# define GL_RGB565 0x8D62 #endif #ifndef GL_ARB_get_program_binary -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_PROGRAM_BINARY_FORMATS 0x87FF +# define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +# define GL_PROGRAM_BINARY_LENGTH 0x8741 +# define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +# define GL_PROGRAM_BINARY_FORMATS 0x87FF #endif #ifndef GL_ARB_separate_shader_objects -#define GL_VERTEX_SHADER_BIT 0x00000001 -#define GL_FRAGMENT_SHADER_BIT 0x00000002 -#define GL_GEOMETRY_SHADER_BIT 0x00000004 -#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 -#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 -#define GL_ALL_SHADER_BITS 0xFFFFFFFF -#define GL_PROGRAM_SEPARABLE 0x8258 -#define GL_ACTIVE_PROGRAM 0x8259 -#define GL_PROGRAM_PIPELINE_BINDING 0x825A +# define GL_VERTEX_SHADER_BIT 0x00000001 +# define GL_FRAGMENT_SHADER_BIT 0x00000002 +# define GL_GEOMETRY_SHADER_BIT 0x00000004 +# define GL_TESS_CONTROL_SHADER_BIT 0x00000008 +# define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 +# define GL_ALL_SHADER_BITS 0xFFFFFFFF +# define GL_PROGRAM_SEPARABLE 0x8258 +# define GL_ACTIVE_PROGRAM 0x8259 +# define GL_PROGRAM_PIPELINE_BINDING 0x825A #endif #ifndef GL_ARB_shader_precision @@ -2466,56 +2466,56 @@ extern "C" { /* reuse GL_VIEWPORT */ /* reuse GL_DEPTH_RANGE */ /* reuse GL_SCISSOR_TEST */ -#define GL_MAX_VIEWPORTS 0x825B -#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C -#define GL_VIEWPORT_BOUNDS_RANGE 0x825D -#define GL_LAYER_PROVOKING_VERTEX 0x825E -#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F -#define GL_UNDEFINED_VERTEX 0x8260 +# define GL_MAX_VIEWPORTS 0x825B +# define GL_VIEWPORT_SUBPIXEL_BITS 0x825C +# define GL_VIEWPORT_BOUNDS_RANGE 0x825D +# define GL_LAYER_PROVOKING_VERTEX 0x825E +# define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F +# define GL_UNDEFINED_VERTEX 0x8260 /* reuse GL_FIRST_VERTEX_CONVENTION */ /* reuse GL_LAST_VERTEX_CONVENTION */ /* reuse GL_PROVOKING_VERTEX */ #endif #ifndef GL_ARB_cl_event -#define GL_SYNC_CL_EVENT_ARB 0x8240 -#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 +# define GL_SYNC_CL_EVENT_ARB 0x8240 +# define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 #endif #ifndef GL_ARB_debug_output -#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 -#define GL_DEBUG_SOURCE_API_ARB 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A -#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B -#define GL_DEBUG_TYPE_ERROR_ARB 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E -#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 -#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 -#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 -#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 +# define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 +# define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 +# define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 +# define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 +# define GL_DEBUG_SOURCE_API_ARB 0x8246 +# define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 +# define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 +# define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 +# define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A +# define GL_DEBUG_SOURCE_OTHER_ARB 0x824B +# define GL_DEBUG_TYPE_ERROR_ARB 0x824C +# define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D +# define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E +# define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F +# define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 +# define GL_DEBUG_TYPE_OTHER_ARB 0x8251 +# define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 +# define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 +# define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 +# define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 +# define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 +# define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 #endif #ifndef GL_ARB_robustness /* reuse GL_NO_ERROR */ -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 -#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 -#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 +# define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 +# define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +# define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 +# define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 +# define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 +# define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +# define GL_NO_RESET_NOTIFICATION_ARB 0x8261 #endif #ifndef GL_ARB_shader_stencil_export @@ -2531,204 +2531,204 @@ extern "C" { #endif #ifndef GL_ARB_compressed_texture_pixel_storage -#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 -#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 -#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 -#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A -#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B -#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C -#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D -#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E +# define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 +# define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 +# define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 +# define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A +# define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B +# define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C +# define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D +# define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E #endif #ifndef GL_ARB_conservative_depth #endif #ifndef GL_ARB_internalformat_query -#define GL_NUM_SAMPLE_COUNTS 0x9380 +# define GL_NUM_SAMPLE_COUNTS 0x9380 #endif #ifndef GL_ARB_map_buffer_alignment -#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC +# define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC #endif #ifndef GL_ARB_shader_atomic_counters -#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 -#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 -#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 -#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 -#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB -#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE -#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF -#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 -#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 -#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 -#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 -#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC -#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 -#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA -#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB +# define GL_ATOMIC_COUNTER_BUFFER 0x92C0 +# define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 +# define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 +# define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 +# define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 +# define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 +# define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB +# define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC +# define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD +# define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE +# define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF +# define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 +# define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 +# define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 +# define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 +# define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 +# define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 +# define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 +# define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 +# define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 +# define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC +# define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 +# define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA +# define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB #endif #ifndef GL_ARB_shader_image_load_store -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 -#define GL_COMMAND_BARRIER_BIT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 -#define GL_ALL_BARRIER_BITS 0xFFFFFFFF -#define GL_MAX_IMAGE_UNITS 0x8F38 -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 -#define GL_IMAGE_BINDING_NAME 0x8F3A -#define GL_IMAGE_BINDING_LEVEL 0x8F3B -#define GL_IMAGE_BINDING_LAYERED 0x8F3C -#define GL_IMAGE_BINDING_LAYER 0x8F3D -#define GL_IMAGE_BINDING_ACCESS 0x8F3E -#define GL_IMAGE_1D 0x904C -#define GL_IMAGE_2D 0x904D -#define GL_IMAGE_3D 0x904E -#define GL_IMAGE_2D_RECT 0x904F -#define GL_IMAGE_CUBE 0x9050 -#define GL_IMAGE_BUFFER 0x9051 -#define GL_IMAGE_1D_ARRAY 0x9052 -#define GL_IMAGE_2D_ARRAY 0x9053 -#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 -#define GL_IMAGE_2D_MULTISAMPLE 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 -#define GL_INT_IMAGE_1D 0x9057 -#define GL_INT_IMAGE_2D 0x9058 -#define GL_INT_IMAGE_3D 0x9059 -#define GL_INT_IMAGE_2D_RECT 0x905A -#define GL_INT_IMAGE_CUBE 0x905B -#define GL_INT_IMAGE_BUFFER 0x905C -#define GL_INT_IMAGE_1D_ARRAY 0x905D -#define GL_INT_IMAGE_2D_ARRAY 0x905E -#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F -#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 -#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 -#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 -#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 -#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C -#define GL_MAX_IMAGE_SAMPLES 0x906D -#define GL_IMAGE_BINDING_FORMAT 0x906E -#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 -#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA -#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB -#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC -#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD -#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE -#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +# define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 +# define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 +# define GL_UNIFORM_BARRIER_BIT 0x00000004 +# define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 +# define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 +# define GL_COMMAND_BARRIER_BIT 0x00000040 +# define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 +# define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 +# define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 +# define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 +# define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 +# define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 +# define GL_ALL_BARRIER_BITS 0xFFFFFFFF +# define GL_MAX_IMAGE_UNITS 0x8F38 +# define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 +# define GL_IMAGE_BINDING_NAME 0x8F3A +# define GL_IMAGE_BINDING_LEVEL 0x8F3B +# define GL_IMAGE_BINDING_LAYERED 0x8F3C +# define GL_IMAGE_BINDING_LAYER 0x8F3D +# define GL_IMAGE_BINDING_ACCESS 0x8F3E +# define GL_IMAGE_1D 0x904C +# define GL_IMAGE_2D 0x904D +# define GL_IMAGE_3D 0x904E +# define GL_IMAGE_2D_RECT 0x904F +# define GL_IMAGE_CUBE 0x9050 +# define GL_IMAGE_BUFFER 0x9051 +# define GL_IMAGE_1D_ARRAY 0x9052 +# define GL_IMAGE_2D_ARRAY 0x9053 +# define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 +# define GL_IMAGE_2D_MULTISAMPLE 0x9055 +# define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 +# define GL_INT_IMAGE_1D 0x9057 +# define GL_INT_IMAGE_2D 0x9058 +# define GL_INT_IMAGE_3D 0x9059 +# define GL_INT_IMAGE_2D_RECT 0x905A +# define GL_INT_IMAGE_CUBE 0x905B +# define GL_INT_IMAGE_BUFFER 0x905C +# define GL_INT_IMAGE_1D_ARRAY 0x905D +# define GL_INT_IMAGE_2D_ARRAY 0x905E +# define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F +# define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 +# define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 +# define GL_UNSIGNED_INT_IMAGE_1D 0x9062 +# define GL_UNSIGNED_INT_IMAGE_2D 0x9063 +# define GL_UNSIGNED_INT_IMAGE_3D 0x9064 +# define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 +# define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 +# define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 +# define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 +# define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 +# define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A +# define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B +# define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C +# define GL_MAX_IMAGE_SAMPLES 0x906D +# define GL_IMAGE_BINDING_FORMAT 0x906E +# define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 +# define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 +# define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 +# define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA +# define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB +# define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC +# define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD +# define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE +# define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF #endif #ifndef GL_ARB_shading_language_packing #endif #ifndef GL_ARB_texture_storage -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +# define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F #endif #ifndef GL_KHR_texture_compression_astc_ldr -#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 -#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 -#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 -#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 -#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 -#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 -#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 -#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 -#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 -#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 -#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA -#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB -#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC -#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD +# define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 +# define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 +# define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 +# define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 +# define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 +# define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 +# define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 +# define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 +# define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 +# define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 +# define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA +# define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB +# define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC +# define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC +# define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD #endif #ifndef GL_KHR_debug -#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 -#define GL_DEBUG_SOURCE_API 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION 0x824A -#define GL_DEBUG_SOURCE_OTHER 0x824B -#define GL_DEBUG_TYPE_ERROR 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E -#define GL_DEBUG_TYPE_PORTABILITY 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 -#define GL_DEBUG_TYPE_OTHER 0x8251 -#define GL_DEBUG_TYPE_MARKER 0x8268 -#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 -#define GL_DEBUG_TYPE_POP_GROUP 0x826A -#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B -#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C -#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D -#define GL_BUFFER 0x82E0 -#define GL_SHADER 0x82E1 -#define GL_PROGRAM 0x82E2 -#define GL_QUERY 0x82E3 -#define GL_PROGRAM_PIPELINE 0x82E4 -#define GL_SAMPLER 0x82E6 -#define GL_DISPLAY_LIST 0x82E7 +# define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 +# define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 +# define GL_DEBUG_CALLBACK_FUNCTION 0x8244 +# define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 +# define GL_DEBUG_SOURCE_API 0x8246 +# define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 +# define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 +# define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 +# define GL_DEBUG_SOURCE_APPLICATION 0x824A +# define GL_DEBUG_SOURCE_OTHER 0x824B +# define GL_DEBUG_TYPE_ERROR 0x824C +# define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D +# define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E +# define GL_DEBUG_TYPE_PORTABILITY 0x824F +# define GL_DEBUG_TYPE_PERFORMANCE 0x8250 +# define GL_DEBUG_TYPE_OTHER 0x8251 +# define GL_DEBUG_TYPE_MARKER 0x8268 +# define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 +# define GL_DEBUG_TYPE_POP_GROUP 0x826A +# define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B +# define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C +# define GL_DEBUG_GROUP_STACK_DEPTH 0x826D +# define GL_BUFFER 0x82E0 +# define GL_SHADER 0x82E1 +# define GL_PROGRAM 0x82E2 +# define GL_QUERY 0x82E3 +# define GL_PROGRAM_PIPELINE 0x82E4 +# define GL_SAMPLER 0x82E6 +# define GL_DISPLAY_LIST 0x82E7 /* DISPLAY_LIST used in compatibility profile only */ -#define GL_MAX_LABEL_LENGTH 0x82E8 -#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES 0x9145 -#define GL_DEBUG_SEVERITY_HIGH 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 -#define GL_DEBUG_SEVERITY_LOW 0x9148 -#define GL_DEBUG_OUTPUT 0x92E0 -#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +# define GL_MAX_LABEL_LENGTH 0x82E8 +# define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 +# define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 +# define GL_DEBUG_LOGGED_MESSAGES 0x9145 +# define GL_DEBUG_SEVERITY_HIGH 0x9146 +# define GL_DEBUG_SEVERITY_MEDIUM 0x9147 +# define GL_DEBUG_SEVERITY_LOW 0x9148 +# define GL_DEBUG_OUTPUT 0x92E0 +# define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 /* reuse GL_STACK_UNDERFLOW */ /* reuse GL_STACK_OVERFLOW */ #endif @@ -2740,83 +2740,83 @@ extern "C" { #endif #ifndef GL_ARB_compute_shader -#define GL_COMPUTE_SHADER 0x91B9 -#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB -#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC -#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD -#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 -#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 -#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 -#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 -#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 -#define GL_MAX_COMPUTE_LOCAL_INVOCATIONS 0x90EB -#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE -#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF -#define GL_COMPUTE_LOCAL_WORK_SIZE 0x8267 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED -#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE -#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF -#define GL_COMPUTE_SHADER_BIT 0x00000020 +# define GL_COMPUTE_SHADER 0x91B9 +# define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB +# define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC +# define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD +# define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 +# define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 +# define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 +# define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 +# define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 +# define GL_MAX_COMPUTE_LOCAL_INVOCATIONS 0x90EB +# define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE +# define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF +# define GL_COMPUTE_LOCAL_WORK_SIZE 0x8267 +# define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC +# define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED +# define GL_DISPATCH_INDIRECT_BUFFER 0x90EE +# define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF +# define GL_COMPUTE_SHADER_BIT 0x00000020 #endif #ifndef GL_ARB_copy_image #endif #ifndef GL_ARB_texture_view -#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB -#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC -#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD -#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +# define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB +# define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC +# define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD +# define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE +# define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF #endif #ifndef GL_ARB_vertex_attrib_binding -#define GL_VERTEX_ATTRIB_BINDING 0x82D4 -#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 -#define GL_VERTEX_BINDING_DIVISOR 0x82D6 -#define GL_VERTEX_BINDING_OFFSET 0x82D7 -#define GL_VERTEX_BINDING_STRIDE 0x82D8 -#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 -#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +# define GL_VERTEX_ATTRIB_BINDING 0x82D4 +# define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 +# define GL_VERTEX_BINDING_DIVISOR 0x82D6 +# define GL_VERTEX_BINDING_OFFSET 0x82D7 +# define GL_VERTEX_BINDING_STRIDE 0x82D8 +# define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 +# define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA #endif #ifndef GL_ARB_robustness_isolation #endif #ifndef GL_ARB_ES3_compatibility -#define GL_COMPRESSED_RGB8_ETC2 0x9274 -#define GL_COMPRESSED_SRGB8_ETC2 0x9275 -#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 -#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 -#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 -#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 -#define GL_COMPRESSED_R11_EAC 0x9270 -#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 -#define GL_COMPRESSED_RG11_EAC 0x9272 -#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A -#define GL_MAX_ELEMENT_INDEX 0x8D6B +# define GL_COMPRESSED_RGB8_ETC2 0x9274 +# define GL_COMPRESSED_SRGB8_ETC2 0x9275 +# define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +# define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +# define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +# define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +# define GL_COMPRESSED_R11_EAC 0x9270 +# define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +# define GL_COMPRESSED_RG11_EAC 0x9272 +# define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +# define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +# define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +# define GL_MAX_ELEMENT_INDEX 0x8D6B #endif #ifndef GL_ARB_explicit_uniform_location -#define GL_MAX_UNIFORM_LOCATIONS 0x826E +# define GL_MAX_UNIFORM_LOCATIONS 0x826E #endif #ifndef GL_ARB_fragment_layer_viewport #endif #ifndef GL_ARB_framebuffer_no_attachments -#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 -#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 -#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 -#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 -#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 -#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 -#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 -#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 -#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 +# define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 +# define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 +# define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 +# define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 +# define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 +# define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 +# define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 +# define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 +# define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 #endif #ifndef GL_ARB_internalformat_query2 @@ -2836,105 +2836,105 @@ extern "C" { /* reuse GL_TEXTURE_2D_MULTISAMPLE */ /* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */ /* reuse GL_TEXTURE_COMPRESSED */ -#define GL_INTERNALFORMAT_SUPPORTED 0x826F -#define GL_INTERNALFORMAT_PREFERRED 0x8270 -#define GL_INTERNALFORMAT_RED_SIZE 0x8271 -#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 -#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 -#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 -#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 -#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 -#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 -#define GL_INTERNALFORMAT_RED_TYPE 0x8278 -#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 -#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A -#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B -#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C -#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D -#define GL_MAX_WIDTH 0x827E -#define GL_MAX_HEIGHT 0x827F -#define GL_MAX_DEPTH 0x8280 -#define GL_MAX_LAYERS 0x8281 -#define GL_MAX_COMBINED_DIMENSIONS 0x8282 -#define GL_COLOR_COMPONENTS 0x8283 -#define GL_DEPTH_COMPONENTS 0x8284 -#define GL_STENCIL_COMPONENTS 0x8285 -#define GL_COLOR_RENDERABLE 0x8286 -#define GL_DEPTH_RENDERABLE 0x8287 -#define GL_STENCIL_RENDERABLE 0x8288 -#define GL_FRAMEBUFFER_RENDERABLE 0x8289 -#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A -#define GL_FRAMEBUFFER_BLEND 0x828B -#define GL_READ_PIXELS 0x828C -#define GL_READ_PIXELS_FORMAT 0x828D -#define GL_READ_PIXELS_TYPE 0x828E -#define GL_TEXTURE_IMAGE_FORMAT 0x828F -#define GL_TEXTURE_IMAGE_TYPE 0x8290 -#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 -#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 -#define GL_MIPMAP 0x8293 -#define GL_MANUAL_GENERATE_MIPMAP 0x8294 -#define GL_AUTO_GENERATE_MIPMAP 0x8295 -#define GL_COLOR_ENCODING 0x8296 -#define GL_SRGB_READ 0x8297 -#define GL_SRGB_WRITE 0x8298 -#define GL_SRGB_DECODE_ARB 0x8299 -#define GL_FILTER 0x829A -#define GL_VERTEX_TEXTURE 0x829B -#define GL_TESS_CONTROL_TEXTURE 0x829C -#define GL_TESS_EVALUATION_TEXTURE 0x829D -#define GL_GEOMETRY_TEXTURE 0x829E -#define GL_FRAGMENT_TEXTURE 0x829F -#define GL_COMPUTE_TEXTURE 0x82A0 -#define GL_TEXTURE_SHADOW 0x82A1 -#define GL_TEXTURE_GATHER 0x82A2 -#define GL_TEXTURE_GATHER_SHADOW 0x82A3 -#define GL_SHADER_IMAGE_LOAD 0x82A4 -#define GL_SHADER_IMAGE_STORE 0x82A5 -#define GL_SHADER_IMAGE_ATOMIC 0x82A6 -#define GL_IMAGE_TEXEL_SIZE 0x82A7 -#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 -#define GL_IMAGE_PIXEL_FORMAT 0x82A9 -#define GL_IMAGE_PIXEL_TYPE 0x82AA -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF -#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 -#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 -#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 -#define GL_CLEAR_BUFFER 0x82B4 -#define GL_TEXTURE_VIEW 0x82B5 -#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 -#define GL_FULL_SUPPORT 0x82B7 -#define GL_CAVEAT_SUPPORT 0x82B8 -#define GL_IMAGE_CLASS_4_X_32 0x82B9 -#define GL_IMAGE_CLASS_2_X_32 0x82BA -#define GL_IMAGE_CLASS_1_X_32 0x82BB -#define GL_IMAGE_CLASS_4_X_16 0x82BC -#define GL_IMAGE_CLASS_2_X_16 0x82BD -#define GL_IMAGE_CLASS_1_X_16 0x82BE -#define GL_IMAGE_CLASS_4_X_8 0x82BF -#define GL_IMAGE_CLASS_2_X_8 0x82C0 -#define GL_IMAGE_CLASS_1_X_8 0x82C1 -#define GL_IMAGE_CLASS_11_11_10 0x82C2 -#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 -#define GL_VIEW_CLASS_128_BITS 0x82C4 -#define GL_VIEW_CLASS_96_BITS 0x82C5 -#define GL_VIEW_CLASS_64_BITS 0x82C6 -#define GL_VIEW_CLASS_48_BITS 0x82C7 -#define GL_VIEW_CLASS_32_BITS 0x82C8 -#define GL_VIEW_CLASS_24_BITS 0x82C9 -#define GL_VIEW_CLASS_16_BITS 0x82CA -#define GL_VIEW_CLASS_8_BITS 0x82CB -#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC -#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD -#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE -#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF -#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 -#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 -#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 -#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 +# define GL_INTERNALFORMAT_SUPPORTED 0x826F +# define GL_INTERNALFORMAT_PREFERRED 0x8270 +# define GL_INTERNALFORMAT_RED_SIZE 0x8271 +# define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 +# define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 +# define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 +# define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 +# define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 +# define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 +# define GL_INTERNALFORMAT_RED_TYPE 0x8278 +# define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 +# define GL_INTERNALFORMAT_BLUE_TYPE 0x827A +# define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B +# define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C +# define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D +# define GL_MAX_WIDTH 0x827E +# define GL_MAX_HEIGHT 0x827F +# define GL_MAX_DEPTH 0x8280 +# define GL_MAX_LAYERS 0x8281 +# define GL_MAX_COMBINED_DIMENSIONS 0x8282 +# define GL_COLOR_COMPONENTS 0x8283 +# define GL_DEPTH_COMPONENTS 0x8284 +# define GL_STENCIL_COMPONENTS 0x8285 +# define GL_COLOR_RENDERABLE 0x8286 +# define GL_DEPTH_RENDERABLE 0x8287 +# define GL_STENCIL_RENDERABLE 0x8288 +# define GL_FRAMEBUFFER_RENDERABLE 0x8289 +# define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A +# define GL_FRAMEBUFFER_BLEND 0x828B +# define GL_READ_PIXELS 0x828C +# define GL_READ_PIXELS_FORMAT 0x828D +# define GL_READ_PIXELS_TYPE 0x828E +# define GL_TEXTURE_IMAGE_FORMAT 0x828F +# define GL_TEXTURE_IMAGE_TYPE 0x8290 +# define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 +# define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 +# define GL_MIPMAP 0x8293 +# define GL_MANUAL_GENERATE_MIPMAP 0x8294 +# define GL_AUTO_GENERATE_MIPMAP 0x8295 +# define GL_COLOR_ENCODING 0x8296 +# define GL_SRGB_READ 0x8297 +# define GL_SRGB_WRITE 0x8298 +# define GL_SRGB_DECODE_ARB 0x8299 +# define GL_FILTER 0x829A +# define GL_VERTEX_TEXTURE 0x829B +# define GL_TESS_CONTROL_TEXTURE 0x829C +# define GL_TESS_EVALUATION_TEXTURE 0x829D +# define GL_GEOMETRY_TEXTURE 0x829E +# define GL_FRAGMENT_TEXTURE 0x829F +# define GL_COMPUTE_TEXTURE 0x82A0 +# define GL_TEXTURE_SHADOW 0x82A1 +# define GL_TEXTURE_GATHER 0x82A2 +# define GL_TEXTURE_GATHER_SHADOW 0x82A3 +# define GL_SHADER_IMAGE_LOAD 0x82A4 +# define GL_SHADER_IMAGE_STORE 0x82A5 +# define GL_SHADER_IMAGE_ATOMIC 0x82A6 +# define GL_IMAGE_TEXEL_SIZE 0x82A7 +# define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 +# define GL_IMAGE_PIXEL_FORMAT 0x82A9 +# define GL_IMAGE_PIXEL_TYPE 0x82AA +# define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC +# define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD +# define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE +# define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF +# define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 +# define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 +# define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 +# define GL_CLEAR_BUFFER 0x82B4 +# define GL_TEXTURE_VIEW 0x82B5 +# define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 +# define GL_FULL_SUPPORT 0x82B7 +# define GL_CAVEAT_SUPPORT 0x82B8 +# define GL_IMAGE_CLASS_4_X_32 0x82B9 +# define GL_IMAGE_CLASS_2_X_32 0x82BA +# define GL_IMAGE_CLASS_1_X_32 0x82BB +# define GL_IMAGE_CLASS_4_X_16 0x82BC +# define GL_IMAGE_CLASS_2_X_16 0x82BD +# define GL_IMAGE_CLASS_1_X_16 0x82BE +# define GL_IMAGE_CLASS_4_X_8 0x82BF +# define GL_IMAGE_CLASS_2_X_8 0x82C0 +# define GL_IMAGE_CLASS_1_X_8 0x82C1 +# define GL_IMAGE_CLASS_11_11_10 0x82C2 +# define GL_IMAGE_CLASS_10_10_10_2 0x82C3 +# define GL_VIEW_CLASS_128_BITS 0x82C4 +# define GL_VIEW_CLASS_96_BITS 0x82C5 +# define GL_VIEW_CLASS_64_BITS 0x82C6 +# define GL_VIEW_CLASS_48_BITS 0x82C7 +# define GL_VIEW_CLASS_32_BITS 0x82C8 +# define GL_VIEW_CLASS_24_BITS 0x82C9 +# define GL_VIEW_CLASS_16_BITS 0x82CA +# define GL_VIEW_CLASS_8_BITS 0x82CB +# define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC +# define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD +# define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE +# define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF +# define GL_VIEW_CLASS_RGTC1_RED 0x82D0 +# define GL_VIEW_CLASS_RGTC2_RG 0x82D1 +# define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 +# define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 #endif #ifndef GL_ARB_invalidate_subdata @@ -2944,54 +2944,54 @@ extern "C" { #endif #ifndef GL_ARB_program_interface_query -#define GL_UNIFORM 0x92E1 -#define GL_UNIFORM_BLOCK 0x92E2 -#define GL_PROGRAM_INPUT 0x92E3 -#define GL_PROGRAM_OUTPUT 0x92E4 -#define GL_BUFFER_VARIABLE 0x92E5 -#define GL_SHADER_STORAGE_BLOCK 0x92E6 +# define GL_UNIFORM 0x92E1 +# define GL_UNIFORM_BLOCK 0x92E2 +# define GL_PROGRAM_INPUT 0x92E3 +# define GL_PROGRAM_OUTPUT 0x92E4 +# define GL_BUFFER_VARIABLE 0x92E5 +# define GL_SHADER_STORAGE_BLOCK 0x92E6 /* reuse GL_ATOMIC_COUNTER_BUFFER */ -#define GL_VERTEX_SUBROUTINE 0x92E8 -#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 -#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA -#define GL_GEOMETRY_SUBROUTINE 0x92EB -#define GL_FRAGMENT_SUBROUTINE 0x92EC -#define GL_COMPUTE_SUBROUTINE 0x92ED -#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE -#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF -#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 -#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 -#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 -#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 -#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 -#define GL_ACTIVE_RESOURCES 0x92F5 -#define GL_MAX_NAME_LENGTH 0x92F6 -#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 -#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 -#define GL_NAME_LENGTH 0x92F9 -#define GL_TYPE 0x92FA -#define GL_ARRAY_SIZE 0x92FB -#define GL_OFFSET 0x92FC -#define GL_BLOCK_INDEX 0x92FD -#define GL_ARRAY_STRIDE 0x92FE -#define GL_MATRIX_STRIDE 0x92FF -#define GL_IS_ROW_MAJOR 0x9300 -#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 -#define GL_BUFFER_BINDING 0x9302 -#define GL_BUFFER_DATA_SIZE 0x9303 -#define GL_NUM_ACTIVE_VARIABLES 0x9304 -#define GL_ACTIVE_VARIABLES 0x9305 -#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 -#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 -#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 -#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 -#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A -#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B -#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C -#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D -#define GL_LOCATION 0x930E -#define GL_LOCATION_INDEX 0x930F -#define GL_IS_PER_PATCH 0x92E7 +# define GL_VERTEX_SUBROUTINE 0x92E8 +# define GL_TESS_CONTROL_SUBROUTINE 0x92E9 +# define GL_TESS_EVALUATION_SUBROUTINE 0x92EA +# define GL_GEOMETRY_SUBROUTINE 0x92EB +# define GL_FRAGMENT_SUBROUTINE 0x92EC +# define GL_COMPUTE_SUBROUTINE 0x92ED +# define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE +# define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF +# define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 +# define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 +# define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 +# define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 +# define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 +# define GL_ACTIVE_RESOURCES 0x92F5 +# define GL_MAX_NAME_LENGTH 0x92F6 +# define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 +# define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 +# define GL_NAME_LENGTH 0x92F9 +# define GL_TYPE 0x92FA +# define GL_ARRAY_SIZE 0x92FB +# define GL_OFFSET 0x92FC +# define GL_BLOCK_INDEX 0x92FD +# define GL_ARRAY_STRIDE 0x92FE +# define GL_MATRIX_STRIDE 0x92FF +# define GL_IS_ROW_MAJOR 0x9300 +# define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 +# define GL_BUFFER_BINDING 0x9302 +# define GL_BUFFER_DATA_SIZE 0x9303 +# define GL_NUM_ACTIVE_VARIABLES 0x9304 +# define GL_ACTIVE_VARIABLES 0x9305 +# define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 +# define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 +# define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 +# define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 +# define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A +# define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B +# define GL_TOP_LEVEL_ARRAY_SIZE 0x930C +# define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D +# define GL_LOCATION 0x930E +# define GL_LOCATION_INDEX 0x930F +# define GL_IS_PER_PATCH 0x92E7 /* reuse GL_NUM_COMPATIBLE_SUBROUTINES */ /* reuse GL_COMPATIBLE_SUBROUTINES */ #endif @@ -3003,33 +3003,33 @@ extern "C" { #endif #ifndef GL_ARB_shader_storage_buffer_object -#define GL_SHADER_STORAGE_BUFFER 0x90D2 -#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 -#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 -#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 -#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 -#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 -#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 -#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 -#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA -#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB -#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC -#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD -#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE -#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF -#define GL_SHADER_STORAGE_BARRIER_BIT 0x2000 -#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS +# define GL_SHADER_STORAGE_BUFFER 0x90D2 +# define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 +# define GL_SHADER_STORAGE_BUFFER_START 0x90D4 +# define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 +# define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 +# define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 +# define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 +# define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 +# define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA +# define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB +# define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC +# define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD +# define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE +# define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF +# define GL_SHADER_STORAGE_BARRIER_BIT 0x2000 +# define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS /* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */ #endif #ifndef GL_ARB_stencil_texturing -#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA +# define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA #endif #ifndef GL_ARB_texture_buffer_range -#define GL_TEXTURE_BUFFER_OFFSET 0x919D -#define GL_TEXTURE_BUFFER_SIZE 0x919E -#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F +# define GL_TEXTURE_BUFFER_OFFSET 0x919D +# define GL_TEXTURE_BUFFER_SIZE 0x919E +# define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F #endif #ifndef GL_ARB_texture_query_levels @@ -3039,84 +3039,84 @@ extern "C" { #endif #ifndef GL_EXT_abgr -#define GL_ABGR_EXT 0x8000 +# define GL_ABGR_EXT 0x8000 #endif #ifndef GL_EXT_blend_color -#define GL_CONSTANT_COLOR_EXT 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 -#define GL_CONSTANT_ALPHA_EXT 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 -#define GL_BLEND_COLOR_EXT 0x8005 +# define GL_CONSTANT_COLOR_EXT 0x8001 +# define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 +# define GL_CONSTANT_ALPHA_EXT 0x8003 +# define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 +# define GL_BLEND_COLOR_EXT 0x8005 #endif #ifndef GL_EXT_polygon_offset -#define GL_POLYGON_OFFSET_EXT 0x8037 -#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 -#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 +# define GL_POLYGON_OFFSET_EXT 0x8037 +# define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 +# define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 #endif #ifndef GL_EXT_texture -#define GL_ALPHA4_EXT 0x803B -#define GL_ALPHA8_EXT 0x803C -#define GL_ALPHA12_EXT 0x803D -#define GL_ALPHA16_EXT 0x803E -#define GL_LUMINANCE4_EXT 0x803F -#define GL_LUMINANCE8_EXT 0x8040 -#define GL_LUMINANCE12_EXT 0x8041 -#define GL_LUMINANCE16_EXT 0x8042 -#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 -#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 -#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 -#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 -#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 -#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 -#define GL_INTENSITY_EXT 0x8049 -#define GL_INTENSITY4_EXT 0x804A -#define GL_INTENSITY8_EXT 0x804B -#define GL_INTENSITY12_EXT 0x804C -#define GL_INTENSITY16_EXT 0x804D -#define GL_RGB2_EXT 0x804E -#define GL_RGB4_EXT 0x804F -#define GL_RGB5_EXT 0x8050 -#define GL_RGB8_EXT 0x8051 -#define GL_RGB10_EXT 0x8052 -#define GL_RGB12_EXT 0x8053 -#define GL_RGB16_EXT 0x8054 -#define GL_RGBA2_EXT 0x8055 -#define GL_RGBA4_EXT 0x8056 -#define GL_RGB5_A1_EXT 0x8057 -#define GL_RGBA8_EXT 0x8058 -#define GL_RGB10_A2_EXT 0x8059 -#define GL_RGBA12_EXT 0x805A -#define GL_RGBA16_EXT 0x805B -#define GL_TEXTURE_RED_SIZE_EXT 0x805C -#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D -#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E -#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F -#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 -#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 -#define GL_REPLACE_EXT 0x8062 -#define GL_PROXY_TEXTURE_1D_EXT 0x8063 -#define GL_PROXY_TEXTURE_2D_EXT 0x8064 -#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 +# define GL_ALPHA4_EXT 0x803B +# define GL_ALPHA8_EXT 0x803C +# define GL_ALPHA12_EXT 0x803D +# define GL_ALPHA16_EXT 0x803E +# define GL_LUMINANCE4_EXT 0x803F +# define GL_LUMINANCE8_EXT 0x8040 +# define GL_LUMINANCE12_EXT 0x8041 +# define GL_LUMINANCE16_EXT 0x8042 +# define GL_LUMINANCE4_ALPHA4_EXT 0x8043 +# define GL_LUMINANCE6_ALPHA2_EXT 0x8044 +# define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +# define GL_LUMINANCE12_ALPHA4_EXT 0x8046 +# define GL_LUMINANCE12_ALPHA12_EXT 0x8047 +# define GL_LUMINANCE16_ALPHA16_EXT 0x8048 +# define GL_INTENSITY_EXT 0x8049 +# define GL_INTENSITY4_EXT 0x804A +# define GL_INTENSITY8_EXT 0x804B +# define GL_INTENSITY12_EXT 0x804C +# define GL_INTENSITY16_EXT 0x804D +# define GL_RGB2_EXT 0x804E +# define GL_RGB4_EXT 0x804F +# define GL_RGB5_EXT 0x8050 +# define GL_RGB8_EXT 0x8051 +# define GL_RGB10_EXT 0x8052 +# define GL_RGB12_EXT 0x8053 +# define GL_RGB16_EXT 0x8054 +# define GL_RGBA2_EXT 0x8055 +# define GL_RGBA4_EXT 0x8056 +# define GL_RGB5_A1_EXT 0x8057 +# define GL_RGBA8_EXT 0x8058 +# define GL_RGB10_A2_EXT 0x8059 +# define GL_RGBA12_EXT 0x805A +# define GL_RGBA16_EXT 0x805B +# define GL_TEXTURE_RED_SIZE_EXT 0x805C +# define GL_TEXTURE_GREEN_SIZE_EXT 0x805D +# define GL_TEXTURE_BLUE_SIZE_EXT 0x805E +# define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F +# define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 +# define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 +# define GL_REPLACE_EXT 0x8062 +# define GL_PROXY_TEXTURE_1D_EXT 0x8063 +# define GL_PROXY_TEXTURE_2D_EXT 0x8064 +# define GL_TEXTURE_TOO_LARGE_EXT 0x8065 #endif #ifndef GL_EXT_texture3D -#define GL_PACK_SKIP_IMAGES_EXT 0x806B -#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C -#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D -#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E -#define GL_TEXTURE_3D_EXT 0x806F -#define GL_PROXY_TEXTURE_3D_EXT 0x8070 -#define GL_TEXTURE_DEPTH_EXT 0x8071 -#define GL_TEXTURE_WRAP_R_EXT 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 +# define GL_PACK_SKIP_IMAGES_EXT 0x806B +# define GL_PACK_IMAGE_HEIGHT_EXT 0x806C +# define GL_UNPACK_SKIP_IMAGES_EXT 0x806D +# define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E +# define GL_TEXTURE_3D_EXT 0x806F +# define GL_PROXY_TEXTURE_3D_EXT 0x8070 +# define GL_TEXTURE_DEPTH_EXT 0x8071 +# define GL_TEXTURE_WRAP_R_EXT 0x8072 +# define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 #endif #ifndef GL_SGIS_texture_filter4 -#define GL_FILTER4_SGIS 0x8146 -#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 +# define GL_FILTER4_SGIS 0x8146 +# define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 #endif #ifndef GL_EXT_subtexture @@ -3126,967 +3126,967 @@ extern "C" { #endif #ifndef GL_EXT_histogram -#define GL_HISTOGRAM_EXT 0x8024 -#define GL_PROXY_HISTOGRAM_EXT 0x8025 -#define GL_HISTOGRAM_WIDTH_EXT 0x8026 -#define GL_HISTOGRAM_FORMAT_EXT 0x8027 -#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C -#define GL_HISTOGRAM_SINK_EXT 0x802D -#define GL_MINMAX_EXT 0x802E -#define GL_MINMAX_FORMAT_EXT 0x802F -#define GL_MINMAX_SINK_EXT 0x8030 -#define GL_TABLE_TOO_LARGE_EXT 0x8031 +# define GL_HISTOGRAM_EXT 0x8024 +# define GL_PROXY_HISTOGRAM_EXT 0x8025 +# define GL_HISTOGRAM_WIDTH_EXT 0x8026 +# define GL_HISTOGRAM_FORMAT_EXT 0x8027 +# define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 +# define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 +# define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A +# define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B +# define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C +# define GL_HISTOGRAM_SINK_EXT 0x802D +# define GL_MINMAX_EXT 0x802E +# define GL_MINMAX_FORMAT_EXT 0x802F +# define GL_MINMAX_SINK_EXT 0x8030 +# define GL_TABLE_TOO_LARGE_EXT 0x8031 #endif #ifndef GL_EXT_convolution -#define GL_CONVOLUTION_1D_EXT 0x8010 -#define GL_CONVOLUTION_2D_EXT 0x8011 -#define GL_SEPARABLE_2D_EXT 0x8012 -#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 -#define GL_REDUCE_EXT 0x8016 -#define GL_CONVOLUTION_FORMAT_EXT 0x8017 -#define GL_CONVOLUTION_WIDTH_EXT 0x8018 -#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 +# define GL_CONVOLUTION_1D_EXT 0x8010 +# define GL_CONVOLUTION_2D_EXT 0x8011 +# define GL_SEPARABLE_2D_EXT 0x8012 +# define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 +# define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 +# define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 +# define GL_REDUCE_EXT 0x8016 +# define GL_CONVOLUTION_FORMAT_EXT 0x8017 +# define GL_CONVOLUTION_WIDTH_EXT 0x8018 +# define GL_CONVOLUTION_HEIGHT_EXT 0x8019 +# define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A +# define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B +# define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C +# define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D +# define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E +# define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F +# define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 +# define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 +# define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 +# define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 #endif #ifndef GL_SGI_color_matrix -#define GL_COLOR_MATRIX_SGI 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB +# define GL_COLOR_MATRIX_SGI 0x80B1 +# define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 +# define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 +# define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 +# define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 +# define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 +# define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 +# define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 +# define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 +# define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA +# define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB #endif #ifndef GL_SGI_color_table -#define GL_COLOR_TABLE_SGI 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 -#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 -#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 -#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 -#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 -#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF +# define GL_COLOR_TABLE_SGI 0x80D0 +# define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 +# define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 +# define GL_PROXY_COLOR_TABLE_SGI 0x80D3 +# define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 +# define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 +# define GL_COLOR_TABLE_SCALE_SGI 0x80D6 +# define GL_COLOR_TABLE_BIAS_SGI 0x80D7 +# define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 +# define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 +# define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA +# define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB +# define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC +# define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD +# define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE +# define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF #endif #ifndef GL_SGIS_pixel_texture -#define GL_PIXEL_TEXTURE_SGIS 0x8353 -#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 -#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 -#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 +# define GL_PIXEL_TEXTURE_SGIS 0x8353 +# define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 +# define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 +# define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 #endif #ifndef GL_SGIX_pixel_texture -#define GL_PIXEL_TEX_GEN_SGIX 0x8139 -#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B +# define GL_PIXEL_TEX_GEN_SGIX 0x8139 +# define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B #endif #ifndef GL_SGIS_texture4D -#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 -#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 -#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 -#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 -#define GL_TEXTURE_4D_SGIS 0x8134 -#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 -#define GL_TEXTURE_4DSIZE_SGIS 0x8136 -#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 -#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 -#define GL_TEXTURE_4D_BINDING_SGIS 0x814F +# define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 +# define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 +# define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 +# define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 +# define GL_TEXTURE_4D_SGIS 0x8134 +# define GL_PROXY_TEXTURE_4D_SGIS 0x8135 +# define GL_TEXTURE_4DSIZE_SGIS 0x8136 +# define GL_TEXTURE_WRAP_Q_SGIS 0x8137 +# define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 +# define GL_TEXTURE_4D_BINDING_SGIS 0x814F #endif #ifndef GL_SGI_texture_color_table -#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC -#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD +# define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC +# define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD #endif #ifndef GL_EXT_cmyka -#define GL_CMYK_EXT 0x800C -#define GL_CMYKA_EXT 0x800D -#define GL_PACK_CMYK_HINT_EXT 0x800E -#define GL_UNPACK_CMYK_HINT_EXT 0x800F +# define GL_CMYK_EXT 0x800C +# define GL_CMYKA_EXT 0x800D +# define GL_PACK_CMYK_HINT_EXT 0x800E +# define GL_UNPACK_CMYK_HINT_EXT 0x800F #endif #ifndef GL_EXT_texture_object -#define GL_TEXTURE_PRIORITY_EXT 0x8066 -#define GL_TEXTURE_RESIDENT_EXT 0x8067 -#define GL_TEXTURE_1D_BINDING_EXT 0x8068 -#define GL_TEXTURE_2D_BINDING_EXT 0x8069 -#define GL_TEXTURE_3D_BINDING_EXT 0x806A +# define GL_TEXTURE_PRIORITY_EXT 0x8066 +# define GL_TEXTURE_RESIDENT_EXT 0x8067 +# define GL_TEXTURE_1D_BINDING_EXT 0x8068 +# define GL_TEXTURE_2D_BINDING_EXT 0x8069 +# define GL_TEXTURE_3D_BINDING_EXT 0x806A #endif #ifndef GL_SGIS_detail_texture -#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 -#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 -#define GL_LINEAR_DETAIL_SGIS 0x8097 -#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 -#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 -#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A -#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B -#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C +# define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 +# define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 +# define GL_LINEAR_DETAIL_SGIS 0x8097 +# define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 +# define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 +# define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A +# define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B +# define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C #endif #ifndef GL_SGIS_sharpen_texture -#define GL_LINEAR_SHARPEN_SGIS 0x80AD -#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE -#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF -#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 +# define GL_LINEAR_SHARPEN_SGIS 0x80AD +# define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE +# define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF +# define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 #endif #ifndef GL_EXT_packed_pixels -#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 +# define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 +# define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 +# define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 +# define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 +# define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 #endif #ifndef GL_SGIS_texture_lod -#define GL_TEXTURE_MIN_LOD_SGIS 0x813A -#define GL_TEXTURE_MAX_LOD_SGIS 0x813B -#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C -#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D +# define GL_TEXTURE_MIN_LOD_SGIS 0x813A +# define GL_TEXTURE_MAX_LOD_SGIS 0x813B +# define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C +# define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D #endif #ifndef GL_SGIS_multisample -#define GL_MULTISAMPLE_SGIS 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F -#define GL_SAMPLE_MASK_SGIS 0x80A0 -#define GL_1PASS_SGIS 0x80A1 -#define GL_2PASS_0_SGIS 0x80A2 -#define GL_2PASS_1_SGIS 0x80A3 -#define GL_4PASS_0_SGIS 0x80A4 -#define GL_4PASS_1_SGIS 0x80A5 -#define GL_4PASS_2_SGIS 0x80A6 -#define GL_4PASS_3_SGIS 0x80A7 -#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 -#define GL_SAMPLES_SGIS 0x80A9 -#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA -#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB -#define GL_SAMPLE_PATTERN_SGIS 0x80AC +# define GL_MULTISAMPLE_SGIS 0x809D +# define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E +# define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F +# define GL_SAMPLE_MASK_SGIS 0x80A0 +# define GL_1PASS_SGIS 0x80A1 +# define GL_2PASS_0_SGIS 0x80A2 +# define GL_2PASS_1_SGIS 0x80A3 +# define GL_4PASS_0_SGIS 0x80A4 +# define GL_4PASS_1_SGIS 0x80A5 +# define GL_4PASS_2_SGIS 0x80A6 +# define GL_4PASS_3_SGIS 0x80A7 +# define GL_SAMPLE_BUFFERS_SGIS 0x80A8 +# define GL_SAMPLES_SGIS 0x80A9 +# define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA +# define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB +# define GL_SAMPLE_PATTERN_SGIS 0x80AC #endif #ifndef GL_EXT_rescale_normal -#define GL_RESCALE_NORMAL_EXT 0x803A +# define GL_RESCALE_NORMAL_EXT 0x803A #endif #ifndef GL_EXT_vertex_array -#define GL_VERTEX_ARRAY_EXT 0x8074 -#define GL_NORMAL_ARRAY_EXT 0x8075 -#define GL_COLOR_ARRAY_EXT 0x8076 -#define GL_INDEX_ARRAY_EXT 0x8077 -#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 -#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 -#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A -#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B -#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C -#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D -#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E -#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F -#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 -#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 -#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 -#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 -#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 -#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 -#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 -#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 -#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A -#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B -#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C -#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D -#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E -#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F -#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 -#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 -#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 -#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 +# define GL_VERTEX_ARRAY_EXT 0x8074 +# define GL_NORMAL_ARRAY_EXT 0x8075 +# define GL_COLOR_ARRAY_EXT 0x8076 +# define GL_INDEX_ARRAY_EXT 0x8077 +# define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 +# define GL_EDGE_FLAG_ARRAY_EXT 0x8079 +# define GL_VERTEX_ARRAY_SIZE_EXT 0x807A +# define GL_VERTEX_ARRAY_TYPE_EXT 0x807B +# define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C +# define GL_VERTEX_ARRAY_COUNT_EXT 0x807D +# define GL_NORMAL_ARRAY_TYPE_EXT 0x807E +# define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F +# define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 +# define GL_COLOR_ARRAY_SIZE_EXT 0x8081 +# define GL_COLOR_ARRAY_TYPE_EXT 0x8082 +# define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 +# define GL_COLOR_ARRAY_COUNT_EXT 0x8084 +# define GL_INDEX_ARRAY_TYPE_EXT 0x8085 +# define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 +# define GL_INDEX_ARRAY_COUNT_EXT 0x8087 +# define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 +# define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 +# define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A +# define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B +# define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C +# define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D +# define GL_VERTEX_ARRAY_POINTER_EXT 0x808E +# define GL_NORMAL_ARRAY_POINTER_EXT 0x808F +# define GL_COLOR_ARRAY_POINTER_EXT 0x8090 +# define GL_INDEX_ARRAY_POINTER_EXT 0x8091 +# define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 +# define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 #endif #ifndef GL_EXT_misc_attribute #endif #ifndef GL_SGIS_generate_mipmap -#define GL_GENERATE_MIPMAP_SGIS 0x8191 -#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 +# define GL_GENERATE_MIPMAP_SGIS 0x8191 +# define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 #endif #ifndef GL_SGIX_clipmap -#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 -#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 -#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 -#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 -#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 -#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 -#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 -#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 -#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 -#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D -#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E -#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F +# define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 +# define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 +# define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 +# define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 +# define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 +# define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 +# define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 +# define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 +# define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 +# define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D +# define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E +# define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F #endif #ifndef GL_SGIX_shadow -#define GL_TEXTURE_COMPARE_SGIX 0x819A -#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B -#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C -#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D +# define GL_TEXTURE_COMPARE_SGIX 0x819A +# define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B +# define GL_TEXTURE_LEQUAL_R_SGIX 0x819C +# define GL_TEXTURE_GEQUAL_R_SGIX 0x819D #endif #ifndef GL_SGIS_texture_edge_clamp -#define GL_CLAMP_TO_EDGE_SGIS 0x812F +# define GL_CLAMP_TO_EDGE_SGIS 0x812F #endif #ifndef GL_SGIS_texture_border_clamp -#define GL_CLAMP_TO_BORDER_SGIS 0x812D +# define GL_CLAMP_TO_BORDER_SGIS 0x812D #endif #ifndef GL_EXT_blend_minmax -#define GL_FUNC_ADD_EXT 0x8006 -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#define GL_BLEND_EQUATION_EXT 0x8009 +# define GL_FUNC_ADD_EXT 0x8006 +# define GL_MIN_EXT 0x8007 +# define GL_MAX_EXT 0x8008 +# define GL_BLEND_EQUATION_EXT 0x8009 #endif #ifndef GL_EXT_blend_subtract -#define GL_FUNC_SUBTRACT_EXT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B +# define GL_FUNC_SUBTRACT_EXT 0x800A +# define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B #endif #ifndef GL_EXT_blend_logic_op #endif #ifndef GL_SGIX_interlace -#define GL_INTERLACE_SGIX 0x8094 +# define GL_INTERLACE_SGIX 0x8094 #endif #ifndef GL_SGIX_pixel_tiles -#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E -#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F -#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 -#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 -#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 -#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 -#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 -#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 +# define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E +# define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F +# define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 +# define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 +# define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 +# define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 +# define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 +# define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 #endif #ifndef GL_SGIS_texture_select -#define GL_DUAL_ALPHA4_SGIS 0x8110 -#define GL_DUAL_ALPHA8_SGIS 0x8111 -#define GL_DUAL_ALPHA12_SGIS 0x8112 -#define GL_DUAL_ALPHA16_SGIS 0x8113 -#define GL_DUAL_LUMINANCE4_SGIS 0x8114 -#define GL_DUAL_LUMINANCE8_SGIS 0x8115 -#define GL_DUAL_LUMINANCE12_SGIS 0x8116 -#define GL_DUAL_LUMINANCE16_SGIS 0x8117 -#define GL_DUAL_INTENSITY4_SGIS 0x8118 -#define GL_DUAL_INTENSITY8_SGIS 0x8119 -#define GL_DUAL_INTENSITY12_SGIS 0x811A -#define GL_DUAL_INTENSITY16_SGIS 0x811B -#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C -#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D -#define GL_QUAD_ALPHA4_SGIS 0x811E -#define GL_QUAD_ALPHA8_SGIS 0x811F -#define GL_QUAD_LUMINANCE4_SGIS 0x8120 -#define GL_QUAD_LUMINANCE8_SGIS 0x8121 -#define GL_QUAD_INTENSITY4_SGIS 0x8122 -#define GL_QUAD_INTENSITY8_SGIS 0x8123 -#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 -#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 +# define GL_DUAL_ALPHA4_SGIS 0x8110 +# define GL_DUAL_ALPHA8_SGIS 0x8111 +# define GL_DUAL_ALPHA12_SGIS 0x8112 +# define GL_DUAL_ALPHA16_SGIS 0x8113 +# define GL_DUAL_LUMINANCE4_SGIS 0x8114 +# define GL_DUAL_LUMINANCE8_SGIS 0x8115 +# define GL_DUAL_LUMINANCE12_SGIS 0x8116 +# define GL_DUAL_LUMINANCE16_SGIS 0x8117 +# define GL_DUAL_INTENSITY4_SGIS 0x8118 +# define GL_DUAL_INTENSITY8_SGIS 0x8119 +# define GL_DUAL_INTENSITY12_SGIS 0x811A +# define GL_DUAL_INTENSITY16_SGIS 0x811B +# define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C +# define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D +# define GL_QUAD_ALPHA4_SGIS 0x811E +# define GL_QUAD_ALPHA8_SGIS 0x811F +# define GL_QUAD_LUMINANCE4_SGIS 0x8120 +# define GL_QUAD_LUMINANCE8_SGIS 0x8121 +# define GL_QUAD_INTENSITY4_SGIS 0x8122 +# define GL_QUAD_INTENSITY8_SGIS 0x8123 +# define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 +# define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 #endif #ifndef GL_SGIX_sprite -#define GL_SPRITE_SGIX 0x8148 -#define GL_SPRITE_MODE_SGIX 0x8149 -#define GL_SPRITE_AXIS_SGIX 0x814A -#define GL_SPRITE_TRANSLATION_SGIX 0x814B -#define GL_SPRITE_AXIAL_SGIX 0x814C -#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D -#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E +# define GL_SPRITE_SGIX 0x8148 +# define GL_SPRITE_MODE_SGIX 0x8149 +# define GL_SPRITE_AXIS_SGIX 0x814A +# define GL_SPRITE_TRANSLATION_SGIX 0x814B +# define GL_SPRITE_AXIAL_SGIX 0x814C +# define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D +# define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E #endif #ifndef GL_SGIX_texture_multi_buffer -#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E +# define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E #endif #ifndef GL_EXT_point_parameters -#define GL_POINT_SIZE_MIN_EXT 0x8126 -#define GL_POINT_SIZE_MAX_EXT 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 -#define GL_DISTANCE_ATTENUATION_EXT 0x8129 +# define GL_POINT_SIZE_MIN_EXT 0x8126 +# define GL_POINT_SIZE_MAX_EXT 0x8127 +# define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 +# define GL_DISTANCE_ATTENUATION_EXT 0x8129 #endif #ifndef GL_SGIS_point_parameters -#define GL_POINT_SIZE_MIN_SGIS 0x8126 -#define GL_POINT_SIZE_MAX_SGIS 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 -#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 +# define GL_POINT_SIZE_MIN_SGIS 0x8126 +# define GL_POINT_SIZE_MAX_SGIS 0x8127 +# define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 +# define GL_DISTANCE_ATTENUATION_SGIS 0x8129 #endif #ifndef GL_SGIX_instruments -#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 -#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 +# define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 +# define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 #endif #ifndef GL_SGIX_texture_scale_bias -#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 -#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A -#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B -#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C +# define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 +# define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A +# define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B +# define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C #endif #ifndef GL_SGIX_framezoom -#define GL_FRAMEZOOM_SGIX 0x818B -#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C -#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D +# define GL_FRAMEZOOM_SGIX 0x818B +# define GL_FRAMEZOOM_FACTOR_SGIX 0x818C +# define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D #endif #ifndef GL_SGIX_tag_sample_buffer #endif #ifndef GL_FfdMaskSGIX -#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 -#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 +# define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 +# define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 #endif #ifndef GL_SGIX_polynomial_ffd -#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 -#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 -#define GL_DEFORMATIONS_MASK_SGIX 0x8196 -#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 +# define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 +# define GL_TEXTURE_DEFORMATION_SGIX 0x8195 +# define GL_DEFORMATIONS_MASK_SGIX 0x8196 +# define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 #endif #ifndef GL_SGIX_reference_plane -#define GL_REFERENCE_PLANE_SGIX 0x817D -#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E +# define GL_REFERENCE_PLANE_SGIX 0x817D +# define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E #endif #ifndef GL_SGIX_flush_raster #endif #ifndef GL_SGIX_depth_texture -#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 -#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 -#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 +# define GL_DEPTH_COMPONENT16_SGIX 0x81A5 +# define GL_DEPTH_COMPONENT24_SGIX 0x81A6 +# define GL_DEPTH_COMPONENT32_SGIX 0x81A7 #endif #ifndef GL_SGIS_fog_function -#define GL_FOG_FUNC_SGIS 0x812A -#define GL_FOG_FUNC_POINTS_SGIS 0x812B -#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C +# define GL_FOG_FUNC_SGIS 0x812A +# define GL_FOG_FUNC_POINTS_SGIS 0x812B +# define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C #endif #ifndef GL_SGIX_fog_offset -#define GL_FOG_OFFSET_SGIX 0x8198 -#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 +# define GL_FOG_OFFSET_SGIX 0x8198 +# define GL_FOG_OFFSET_VALUE_SGIX 0x8199 #endif #ifndef GL_HP_image_transform -#define GL_IMAGE_SCALE_X_HP 0x8155 -#define GL_IMAGE_SCALE_Y_HP 0x8156 -#define GL_IMAGE_TRANSLATE_X_HP 0x8157 -#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 -#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 -#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A -#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B -#define GL_IMAGE_MAG_FILTER_HP 0x815C -#define GL_IMAGE_MIN_FILTER_HP 0x815D -#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E -#define GL_CUBIC_HP 0x815F -#define GL_AVERAGE_HP 0x8160 -#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 -#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 -#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 +# define GL_IMAGE_SCALE_X_HP 0x8155 +# define GL_IMAGE_SCALE_Y_HP 0x8156 +# define GL_IMAGE_TRANSLATE_X_HP 0x8157 +# define GL_IMAGE_TRANSLATE_Y_HP 0x8158 +# define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 +# define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A +# define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B +# define GL_IMAGE_MAG_FILTER_HP 0x815C +# define GL_IMAGE_MIN_FILTER_HP 0x815D +# define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E +# define GL_CUBIC_HP 0x815F +# define GL_AVERAGE_HP 0x8160 +# define GL_IMAGE_TRANSFORM_2D_HP 0x8161 +# define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 +# define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 #endif #ifndef GL_HP_convolution_border_modes -#define GL_IGNORE_BORDER_HP 0x8150 -#define GL_CONSTANT_BORDER_HP 0x8151 -#define GL_REPLICATE_BORDER_HP 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 +# define GL_IGNORE_BORDER_HP 0x8150 +# define GL_CONSTANT_BORDER_HP 0x8151 +# define GL_REPLICATE_BORDER_HP 0x8153 +# define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 #endif #ifndef GL_INGR_palette_buffer #endif #ifndef GL_SGIX_texture_add_env -#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE +# define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE #endif #ifndef GL_EXT_color_subtable #endif #ifndef GL_PGI_vertex_hints -#define GL_VERTEX_DATA_HINT_PGI 0x1A22A -#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B -#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C -#define GL_MAX_VERTEX_HINT_PGI 0x1A22D -#define GL_COLOR3_BIT_PGI 0x00010000 -#define GL_COLOR4_BIT_PGI 0x00020000 -#define GL_EDGEFLAG_BIT_PGI 0x00040000 -#define GL_INDEX_BIT_PGI 0x00080000 -#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 -#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 -#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 -#define GL_MAT_EMISSION_BIT_PGI 0x00800000 -#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 -#define GL_MAT_SHININESS_BIT_PGI 0x02000000 -#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 -#define GL_NORMAL_BIT_PGI 0x08000000 -#define GL_TEXCOORD1_BIT_PGI 0x10000000 -#define GL_TEXCOORD2_BIT_PGI 0x20000000 -#define GL_TEXCOORD3_BIT_PGI 0x40000000 -#define GL_TEXCOORD4_BIT_PGI 0x80000000 -#define GL_VERTEX23_BIT_PGI 0x00000004 -#define GL_VERTEX4_BIT_PGI 0x00000008 +# define GL_VERTEX_DATA_HINT_PGI 0x1A22A +# define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B +# define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C +# define GL_MAX_VERTEX_HINT_PGI 0x1A22D +# define GL_COLOR3_BIT_PGI 0x00010000 +# define GL_COLOR4_BIT_PGI 0x00020000 +# define GL_EDGEFLAG_BIT_PGI 0x00040000 +# define GL_INDEX_BIT_PGI 0x00080000 +# define GL_MAT_AMBIENT_BIT_PGI 0x00100000 +# define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 +# define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 +# define GL_MAT_EMISSION_BIT_PGI 0x00800000 +# define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 +# define GL_MAT_SHININESS_BIT_PGI 0x02000000 +# define GL_MAT_SPECULAR_BIT_PGI 0x04000000 +# define GL_NORMAL_BIT_PGI 0x08000000 +# define GL_TEXCOORD1_BIT_PGI 0x10000000 +# define GL_TEXCOORD2_BIT_PGI 0x20000000 +# define GL_TEXCOORD3_BIT_PGI 0x40000000 +# define GL_TEXCOORD4_BIT_PGI 0x80000000 +# define GL_VERTEX23_BIT_PGI 0x00000004 +# define GL_VERTEX4_BIT_PGI 0x00000008 #endif #ifndef GL_PGI_misc_hints -#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 -#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD -#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE -#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 -#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 -#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 -#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C -#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D -#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E -#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F -#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 -#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 -#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 -#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 -#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 -#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 -#define GL_CLIP_NEAR_HINT_PGI 0x1A220 -#define GL_CLIP_FAR_HINT_PGI 0x1A221 -#define GL_WIDE_LINE_HINT_PGI 0x1A222 -#define GL_BACK_NORMALS_HINT_PGI 0x1A223 +# define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 +# define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD +# define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE +# define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 +# define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 +# define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 +# define GL_ALWAYS_FAST_HINT_PGI 0x1A20C +# define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D +# define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E +# define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F +# define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 +# define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 +# define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 +# define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 +# define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 +# define GL_FULL_STIPPLE_HINT_PGI 0x1A219 +# define GL_CLIP_NEAR_HINT_PGI 0x1A220 +# define GL_CLIP_FAR_HINT_PGI 0x1A221 +# define GL_WIDE_LINE_HINT_PGI 0x1A222 +# define GL_BACK_NORMALS_HINT_PGI 0x1A223 #endif #ifndef GL_EXT_paletted_texture -#define GL_COLOR_INDEX1_EXT 0x80E2 -#define GL_COLOR_INDEX2_EXT 0x80E3 -#define GL_COLOR_INDEX4_EXT 0x80E4 -#define GL_COLOR_INDEX8_EXT 0x80E5 -#define GL_COLOR_INDEX12_EXT 0x80E6 -#define GL_COLOR_INDEX16_EXT 0x80E7 -#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED +# define GL_COLOR_INDEX1_EXT 0x80E2 +# define GL_COLOR_INDEX2_EXT 0x80E3 +# define GL_COLOR_INDEX4_EXT 0x80E4 +# define GL_COLOR_INDEX8_EXT 0x80E5 +# define GL_COLOR_INDEX12_EXT 0x80E6 +# define GL_COLOR_INDEX16_EXT 0x80E7 +# define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED #endif #ifndef GL_EXT_clip_volume_hint -#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 +# define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 #endif #ifndef GL_SGIX_list_priority -#define GL_LIST_PRIORITY_SGIX 0x8182 +# define GL_LIST_PRIORITY_SGIX 0x8182 #endif #ifndef GL_SGIX_ir_instrument1 -#define GL_IR_INSTRUMENT1_SGIX 0x817F +# define GL_IR_INSTRUMENT1_SGIX 0x817F #endif #ifndef GL_SGIX_calligraphic_fragment -#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 +# define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 #endif #ifndef GL_SGIX_texture_lod_bias -#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E -#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F -#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 +# define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E +# define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F +# define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 #endif #ifndef GL_SGIX_shadow_ambient -#define GL_SHADOW_AMBIENT_SGIX 0x80BF +# define GL_SHADOW_AMBIENT_SGIX 0x80BF #endif #ifndef GL_EXT_index_texture #endif #ifndef GL_EXT_index_material -#define GL_INDEX_MATERIAL_EXT 0x81B8 -#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 -#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA +# define GL_INDEX_MATERIAL_EXT 0x81B8 +# define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 +# define GL_INDEX_MATERIAL_FACE_EXT 0x81BA #endif #ifndef GL_EXT_index_func -#define GL_INDEX_TEST_EXT 0x81B5 -#define GL_INDEX_TEST_FUNC_EXT 0x81B6 -#define GL_INDEX_TEST_REF_EXT 0x81B7 +# define GL_INDEX_TEST_EXT 0x81B5 +# define GL_INDEX_TEST_FUNC_EXT 0x81B6 +# define GL_INDEX_TEST_REF_EXT 0x81B7 #endif #ifndef GL_EXT_index_array_formats -#define GL_IUI_V2F_EXT 0x81AD -#define GL_IUI_V3F_EXT 0x81AE -#define GL_IUI_N3F_V2F_EXT 0x81AF -#define GL_IUI_N3F_V3F_EXT 0x81B0 -#define GL_T2F_IUI_V2F_EXT 0x81B1 -#define GL_T2F_IUI_V3F_EXT 0x81B2 -#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 -#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 +# define GL_IUI_V2F_EXT 0x81AD +# define GL_IUI_V3F_EXT 0x81AE +# define GL_IUI_N3F_V2F_EXT 0x81AF +# define GL_IUI_N3F_V3F_EXT 0x81B0 +# define GL_T2F_IUI_V2F_EXT 0x81B1 +# define GL_T2F_IUI_V3F_EXT 0x81B2 +# define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 +# define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 #endif #ifndef GL_EXT_compiled_vertex_array -#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 -#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 +# define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 +# define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 #endif #ifndef GL_EXT_cull_vertex -#define GL_CULL_VERTEX_EXT 0x81AA -#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB -#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC +# define GL_CULL_VERTEX_EXT 0x81AA +# define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB +# define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC #endif #ifndef GL_SGIX_ycrcb -#define GL_YCRCB_422_SGIX 0x81BB -#define GL_YCRCB_444_SGIX 0x81BC +# define GL_YCRCB_422_SGIX 0x81BB +# define GL_YCRCB_444_SGIX 0x81BC #endif #ifndef GL_SGIX_fragment_lighting -#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 -#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 -#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 -#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 -#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 -#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 -#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 -#define GL_LIGHT_ENV_MODE_SGIX 0x8407 -#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 -#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 -#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A -#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B -#define GL_FRAGMENT_LIGHT0_SGIX 0x840C -#define GL_FRAGMENT_LIGHT1_SGIX 0x840D -#define GL_FRAGMENT_LIGHT2_SGIX 0x840E -#define GL_FRAGMENT_LIGHT3_SGIX 0x840F -#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 -#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 -#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 -#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 +# define GL_FRAGMENT_LIGHTING_SGIX 0x8400 +# define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 +# define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 +# define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 +# define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 +# define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 +# define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 +# define GL_LIGHT_ENV_MODE_SGIX 0x8407 +# define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 +# define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 +# define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A +# define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B +# define GL_FRAGMENT_LIGHT0_SGIX 0x840C +# define GL_FRAGMENT_LIGHT1_SGIX 0x840D +# define GL_FRAGMENT_LIGHT2_SGIX 0x840E +# define GL_FRAGMENT_LIGHT3_SGIX 0x840F +# define GL_FRAGMENT_LIGHT4_SGIX 0x8410 +# define GL_FRAGMENT_LIGHT5_SGIX 0x8411 +# define GL_FRAGMENT_LIGHT6_SGIX 0x8412 +# define GL_FRAGMENT_LIGHT7_SGIX 0x8413 #endif #ifndef GL_IBM_rasterpos_clip -#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 +# define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 #endif #ifndef GL_HP_texture_lighting -#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 -#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 -#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 +# define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 +# define GL_TEXTURE_POST_SPECULAR_HP 0x8168 +# define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 #endif #ifndef GL_EXT_draw_range_elements -#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 -#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 +# define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 +# define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 #endif #ifndef GL_WIN_phong_shading -#define GL_PHONG_WIN 0x80EA -#define GL_PHONG_HINT_WIN 0x80EB +# define GL_PHONG_WIN 0x80EA +# define GL_PHONG_HINT_WIN 0x80EB #endif #ifndef GL_WIN_specular_fog -#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC +# define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC #endif #ifndef GL_EXT_light_texture -#define GL_FRAGMENT_MATERIAL_EXT 0x8349 -#define GL_FRAGMENT_NORMAL_EXT 0x834A -#define GL_FRAGMENT_COLOR_EXT 0x834C -#define GL_ATTENUATION_EXT 0x834D -#define GL_SHADOW_ATTENUATION_EXT 0x834E -#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F -#define GL_TEXTURE_LIGHT_EXT 0x8350 -#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 -#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 +# define GL_FRAGMENT_MATERIAL_EXT 0x8349 +# define GL_FRAGMENT_NORMAL_EXT 0x834A +# define GL_FRAGMENT_COLOR_EXT 0x834C +# define GL_ATTENUATION_EXT 0x834D +# define GL_SHADOW_ATTENUATION_EXT 0x834E +# define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F +# define GL_TEXTURE_LIGHT_EXT 0x8350 +# define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 +# define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 /* reuse GL_FRAGMENT_DEPTH_EXT */ #endif #ifndef GL_SGIX_blend_alpha_minmax -#define GL_ALPHA_MIN_SGIX 0x8320 -#define GL_ALPHA_MAX_SGIX 0x8321 +# define GL_ALPHA_MIN_SGIX 0x8320 +# define GL_ALPHA_MAX_SGIX 0x8321 #endif #ifndef GL_SGIX_impact_pixel_texture -#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 -#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 -#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 -#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 -#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 -#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 -#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A +# define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 +# define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 +# define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 +# define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 +# define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 +# define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 +# define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A #endif #ifndef GL_EXT_bgra -#define GL_BGR_EXT 0x80E0 -#define GL_BGRA_EXT 0x80E1 +# define GL_BGR_EXT 0x80E0 +# define GL_BGRA_EXT 0x80E1 #endif #ifndef GL_SGIX_async -#define GL_ASYNC_MARKER_SGIX 0x8329 +# define GL_ASYNC_MARKER_SGIX 0x8329 #endif #ifndef GL_SGIX_async_pixel -#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C -#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D -#define GL_ASYNC_READ_PIXELS_SGIX 0x835E -#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F -#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 -#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 +# define GL_ASYNC_TEX_IMAGE_SGIX 0x835C +# define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D +# define GL_ASYNC_READ_PIXELS_SGIX 0x835E +# define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F +# define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 +# define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 #endif #ifndef GL_SGIX_async_histogram -#define GL_ASYNC_HISTOGRAM_SGIX 0x832C -#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D +# define GL_ASYNC_HISTOGRAM_SGIX 0x832C +# define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D #endif #ifndef GL_INTEL_texture_scissor #endif #ifndef GL_INTEL_parallel_arrays -#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 -#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 -#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 -#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 -#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 +# define GL_PARALLEL_ARRAYS_INTEL 0x83F4 +# define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 +# define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 +# define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 +# define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 #endif #ifndef GL_HP_occlusion_test -#define GL_OCCLUSION_TEST_HP 0x8165 -#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 +# define GL_OCCLUSION_TEST_HP 0x8165 +# define GL_OCCLUSION_TEST_RESULT_HP 0x8166 #endif #ifndef GL_EXT_pixel_transform -#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 -#define GL_PIXEL_MAG_FILTER_EXT 0x8331 -#define GL_PIXEL_MIN_FILTER_EXT 0x8332 -#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 -#define GL_CUBIC_EXT 0x8334 -#define GL_AVERAGE_EXT 0x8335 -#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 -#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 -#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 +# define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 +# define GL_PIXEL_MAG_FILTER_EXT 0x8331 +# define GL_PIXEL_MIN_FILTER_EXT 0x8332 +# define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 +# define GL_CUBIC_EXT 0x8334 +# define GL_AVERAGE_EXT 0x8335 +# define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 +# define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 +# define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 #endif #ifndef GL_EXT_pixel_transform_color_table #endif #ifndef GL_EXT_shared_texture_palette -#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB +# define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB #endif #ifndef GL_EXT_separate_specular_color -#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 -#define GL_SINGLE_COLOR_EXT 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA +# define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 +# define GL_SINGLE_COLOR_EXT 0x81F9 +# define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA #endif #ifndef GL_EXT_secondary_color -#define GL_COLOR_SUM_EXT 0x8458 -#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 -#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A -#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B -#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C -#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D -#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E +# define GL_COLOR_SUM_EXT 0x8458 +# define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 +# define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A +# define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B +# define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C +# define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D +# define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E #endif #ifndef GL_EXT_texture_perturb_normal -#define GL_PERTURB_EXT 0x85AE -#define GL_TEXTURE_NORMAL_EXT 0x85AF +# define GL_PERTURB_EXT 0x85AE +# define GL_TEXTURE_NORMAL_EXT 0x85AF #endif #ifndef GL_EXT_multi_draw_arrays #endif #ifndef GL_EXT_fog_coord -#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 -#define GL_FOG_COORDINATE_EXT 0x8451 -#define GL_FRAGMENT_DEPTH_EXT 0x8452 -#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 -#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 -#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 -#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 -#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 +# define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 +# define GL_FOG_COORDINATE_EXT 0x8451 +# define GL_FRAGMENT_DEPTH_EXT 0x8452 +# define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 +# define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 +# define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 +# define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 +# define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 #endif #ifndef GL_REND_screen_coordinates -#define GL_SCREEN_COORDINATES_REND 0x8490 -#define GL_INVERTED_SCREEN_W_REND 0x8491 +# define GL_SCREEN_COORDINATES_REND 0x8490 +# define GL_INVERTED_SCREEN_W_REND 0x8491 #endif #ifndef GL_EXT_coordinate_frame -#define GL_TANGENT_ARRAY_EXT 0x8439 -#define GL_BINORMAL_ARRAY_EXT 0x843A -#define GL_CURRENT_TANGENT_EXT 0x843B -#define GL_CURRENT_BINORMAL_EXT 0x843C -#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E -#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F -#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 -#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 -#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 -#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 -#define GL_MAP1_TANGENT_EXT 0x8444 -#define GL_MAP2_TANGENT_EXT 0x8445 -#define GL_MAP1_BINORMAL_EXT 0x8446 -#define GL_MAP2_BINORMAL_EXT 0x8447 +# define GL_TANGENT_ARRAY_EXT 0x8439 +# define GL_BINORMAL_ARRAY_EXT 0x843A +# define GL_CURRENT_TANGENT_EXT 0x843B +# define GL_CURRENT_BINORMAL_EXT 0x843C +# define GL_TANGENT_ARRAY_TYPE_EXT 0x843E +# define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F +# define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 +# define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 +# define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 +# define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 +# define GL_MAP1_TANGENT_EXT 0x8444 +# define GL_MAP2_TANGENT_EXT 0x8445 +# define GL_MAP1_BINORMAL_EXT 0x8446 +# define GL_MAP2_BINORMAL_EXT 0x8447 #endif #ifndef GL_EXT_texture_env_combine -#define GL_COMBINE_EXT 0x8570 -#define GL_COMBINE_RGB_EXT 0x8571 -#define GL_COMBINE_ALPHA_EXT 0x8572 -#define GL_RGB_SCALE_EXT 0x8573 -#define GL_ADD_SIGNED_EXT 0x8574 -#define GL_INTERPOLATE_EXT 0x8575 -#define GL_CONSTANT_EXT 0x8576 -#define GL_PRIMARY_COLOR_EXT 0x8577 -#define GL_PREVIOUS_EXT 0x8578 -#define GL_SOURCE0_RGB_EXT 0x8580 -#define GL_SOURCE1_RGB_EXT 0x8581 -#define GL_SOURCE2_RGB_EXT 0x8582 -#define GL_SOURCE0_ALPHA_EXT 0x8588 -#define GL_SOURCE1_ALPHA_EXT 0x8589 -#define GL_SOURCE2_ALPHA_EXT 0x858A -#define GL_OPERAND0_RGB_EXT 0x8590 -#define GL_OPERAND1_RGB_EXT 0x8591 -#define GL_OPERAND2_RGB_EXT 0x8592 -#define GL_OPERAND0_ALPHA_EXT 0x8598 -#define GL_OPERAND1_ALPHA_EXT 0x8599 -#define GL_OPERAND2_ALPHA_EXT 0x859A +# define GL_COMBINE_EXT 0x8570 +# define GL_COMBINE_RGB_EXT 0x8571 +# define GL_COMBINE_ALPHA_EXT 0x8572 +# define GL_RGB_SCALE_EXT 0x8573 +# define GL_ADD_SIGNED_EXT 0x8574 +# define GL_INTERPOLATE_EXT 0x8575 +# define GL_CONSTANT_EXT 0x8576 +# define GL_PRIMARY_COLOR_EXT 0x8577 +# define GL_PREVIOUS_EXT 0x8578 +# define GL_SOURCE0_RGB_EXT 0x8580 +# define GL_SOURCE1_RGB_EXT 0x8581 +# define GL_SOURCE2_RGB_EXT 0x8582 +# define GL_SOURCE0_ALPHA_EXT 0x8588 +# define GL_SOURCE1_ALPHA_EXT 0x8589 +# define GL_SOURCE2_ALPHA_EXT 0x858A +# define GL_OPERAND0_RGB_EXT 0x8590 +# define GL_OPERAND1_RGB_EXT 0x8591 +# define GL_OPERAND2_RGB_EXT 0x8592 +# define GL_OPERAND0_ALPHA_EXT 0x8598 +# define GL_OPERAND1_ALPHA_EXT 0x8599 +# define GL_OPERAND2_ALPHA_EXT 0x859A #endif #ifndef GL_APPLE_specular_vector -#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 +# define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 #endif #ifndef GL_APPLE_transform_hint -#define GL_TRANSFORM_HINT_APPLE 0x85B1 +# define GL_TRANSFORM_HINT_APPLE 0x85B1 #endif #ifndef GL_SGIX_fog_scale -#define GL_FOG_SCALE_SGIX 0x81FC -#define GL_FOG_SCALE_VALUE_SGIX 0x81FD +# define GL_FOG_SCALE_SGIX 0x81FC +# define GL_FOG_SCALE_VALUE_SGIX 0x81FD #endif #ifndef GL_SUNX_constant_data -#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 -#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 +# define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 +# define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 #endif #ifndef GL_SUN_global_alpha -#define GL_GLOBAL_ALPHA_SUN 0x81D9 -#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA +# define GL_GLOBAL_ALPHA_SUN 0x81D9 +# define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA #endif #ifndef GL_SUN_triangle_list -#define GL_RESTART_SUN 0x0001 -#define GL_REPLACE_MIDDLE_SUN 0x0002 -#define GL_REPLACE_OLDEST_SUN 0x0003 -#define GL_TRIANGLE_LIST_SUN 0x81D7 -#define GL_REPLACEMENT_CODE_SUN 0x81D8 -#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 -#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 -#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 -#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 -#define GL_R1UI_V3F_SUN 0x85C4 -#define GL_R1UI_C4UB_V3F_SUN 0x85C5 -#define GL_R1UI_C3F_V3F_SUN 0x85C6 -#define GL_R1UI_N3F_V3F_SUN 0x85C7 -#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 -#define GL_R1UI_T2F_V3F_SUN 0x85C9 -#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA -#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB +# define GL_RESTART_SUN 0x0001 +# define GL_REPLACE_MIDDLE_SUN 0x0002 +# define GL_REPLACE_OLDEST_SUN 0x0003 +# define GL_TRIANGLE_LIST_SUN 0x81D7 +# define GL_REPLACEMENT_CODE_SUN 0x81D8 +# define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 +# define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 +# define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 +# define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 +# define GL_R1UI_V3F_SUN 0x85C4 +# define GL_R1UI_C4UB_V3F_SUN 0x85C5 +# define GL_R1UI_C3F_V3F_SUN 0x85C6 +# define GL_R1UI_N3F_V3F_SUN 0x85C7 +# define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 +# define GL_R1UI_T2F_V3F_SUN 0x85C9 +# define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA +# define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB #endif #ifndef GL_SUN_vertex #endif #ifndef GL_EXT_blend_func_separate -#define GL_BLEND_DST_RGB_EXT 0x80C8 -#define GL_BLEND_SRC_RGB_EXT 0x80C9 -#define GL_BLEND_DST_ALPHA_EXT 0x80CA -#define GL_BLEND_SRC_ALPHA_EXT 0x80CB +# define GL_BLEND_DST_RGB_EXT 0x80C8 +# define GL_BLEND_SRC_RGB_EXT 0x80C9 +# define GL_BLEND_DST_ALPHA_EXT 0x80CA +# define GL_BLEND_SRC_ALPHA_EXT 0x80CB #endif #ifndef GL_INGR_color_clamp -#define GL_RED_MIN_CLAMP_INGR 0x8560 -#define GL_GREEN_MIN_CLAMP_INGR 0x8561 -#define GL_BLUE_MIN_CLAMP_INGR 0x8562 -#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 -#define GL_RED_MAX_CLAMP_INGR 0x8564 -#define GL_GREEN_MAX_CLAMP_INGR 0x8565 -#define GL_BLUE_MAX_CLAMP_INGR 0x8566 -#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 +# define GL_RED_MIN_CLAMP_INGR 0x8560 +# define GL_GREEN_MIN_CLAMP_INGR 0x8561 +# define GL_BLUE_MIN_CLAMP_INGR 0x8562 +# define GL_ALPHA_MIN_CLAMP_INGR 0x8563 +# define GL_RED_MAX_CLAMP_INGR 0x8564 +# define GL_GREEN_MAX_CLAMP_INGR 0x8565 +# define GL_BLUE_MAX_CLAMP_INGR 0x8566 +# define GL_ALPHA_MAX_CLAMP_INGR 0x8567 #endif #ifndef GL_INGR_interlace_read -#define GL_INTERLACE_READ_INGR 0x8568 +# define GL_INTERLACE_READ_INGR 0x8568 #endif #ifndef GL_EXT_stencil_wrap -#define GL_INCR_WRAP_EXT 0x8507 -#define GL_DECR_WRAP_EXT 0x8508 +# define GL_INCR_WRAP_EXT 0x8507 +# define GL_DECR_WRAP_EXT 0x8508 #endif #ifndef GL_EXT_422_pixels -#define GL_422_EXT 0x80CC -#define GL_422_REV_EXT 0x80CD -#define GL_422_AVERAGE_EXT 0x80CE -#define GL_422_REV_AVERAGE_EXT 0x80CF +# define GL_422_EXT 0x80CC +# define GL_422_REV_EXT 0x80CD +# define GL_422_AVERAGE_EXT 0x80CE +# define GL_422_REV_AVERAGE_EXT 0x80CF #endif #ifndef GL_NV_texgen_reflection -#define GL_NORMAL_MAP_NV 0x8511 -#define GL_REFLECTION_MAP_NV 0x8512 +# define GL_NORMAL_MAP_NV 0x8511 +# define GL_REFLECTION_MAP_NV 0x8512 #endif #ifndef GL_EXT_texture_cube_map -#define GL_NORMAL_MAP_EXT 0x8511 -#define GL_REFLECTION_MAP_EXT 0x8512 -#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C +# define GL_NORMAL_MAP_EXT 0x8511 +# define GL_REFLECTION_MAP_EXT 0x8512 +# define GL_TEXTURE_CUBE_MAP_EXT 0x8513 +# define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 +# define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 +# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A +# define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B +# define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C #endif #ifndef GL_SUN_convolution_border_modes -#define GL_WRAP_BORDER_SUN 0x81D4 +# define GL_WRAP_BORDER_SUN 0x81D4 #endif #ifndef GL_EXT_texture_env_add #endif #ifndef GL_EXT_texture_lod_bias -#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD -#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 -#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +# define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +# define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +# define GL_TEXTURE_LOD_BIAS_EXT 0x8501 #endif #ifndef GL_EXT_texture_filter_anisotropic -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +# define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +# define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF #endif #ifndef GL_EXT_vertex_weighting -#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH -#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 -#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX -#define GL_MODELVIEW1_MATRIX_EXT 0x8506 -#define GL_VERTEX_WEIGHTING_EXT 0x8509 -#define GL_MODELVIEW0_EXT GL_MODELVIEW -#define GL_MODELVIEW1_EXT 0x850A -#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B -#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C -#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D -#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E -#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F -#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 +# define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH +# define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 +# define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX +# define GL_MODELVIEW1_MATRIX_EXT 0x8506 +# define GL_VERTEX_WEIGHTING_EXT 0x8509 +# define GL_MODELVIEW0_EXT GL_MODELVIEW +# define GL_MODELVIEW1_EXT 0x850A +# define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B +# define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C +# define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D +# define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E +# define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F +# define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 #endif #ifndef GL_NV_light_max_exponent -#define GL_MAX_SHININESS_NV 0x8504 -#define GL_MAX_SPOT_EXPONENT_NV 0x8505 +# define GL_MAX_SHININESS_NV 0x8504 +# define GL_MAX_SPOT_EXPONENT_NV 0x8505 #endif #ifndef GL_NV_vertex_array_range -#define GL_VERTEX_ARRAY_RANGE_NV 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E -#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F -#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 -#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 +# define GL_VERTEX_ARRAY_RANGE_NV 0x851D +# define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E +# define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F +# define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 +# define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 #endif #ifndef GL_NV_register_combiners -#define GL_REGISTER_COMBINERS_NV 0x8522 -#define GL_VARIABLE_A_NV 0x8523 -#define GL_VARIABLE_B_NV 0x8524 -#define GL_VARIABLE_C_NV 0x8525 -#define GL_VARIABLE_D_NV 0x8526 -#define GL_VARIABLE_E_NV 0x8527 -#define GL_VARIABLE_F_NV 0x8528 -#define GL_VARIABLE_G_NV 0x8529 -#define GL_CONSTANT_COLOR0_NV 0x852A -#define GL_CONSTANT_COLOR1_NV 0x852B -#define GL_PRIMARY_COLOR_NV 0x852C -#define GL_SECONDARY_COLOR_NV 0x852D -#define GL_SPARE0_NV 0x852E -#define GL_SPARE1_NV 0x852F -#define GL_DISCARD_NV 0x8530 -#define GL_E_TIMES_F_NV 0x8531 -#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 -#define GL_UNSIGNED_IDENTITY_NV 0x8536 -#define GL_UNSIGNED_INVERT_NV 0x8537 -#define GL_EXPAND_NORMAL_NV 0x8538 -#define GL_EXPAND_NEGATE_NV 0x8539 -#define GL_HALF_BIAS_NORMAL_NV 0x853A -#define GL_HALF_BIAS_NEGATE_NV 0x853B -#define GL_SIGNED_IDENTITY_NV 0x853C -#define GL_SIGNED_NEGATE_NV 0x853D -#define GL_SCALE_BY_TWO_NV 0x853E -#define GL_SCALE_BY_FOUR_NV 0x853F -#define GL_SCALE_BY_ONE_HALF_NV 0x8540 -#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 -#define GL_COMBINER_INPUT_NV 0x8542 -#define GL_COMBINER_MAPPING_NV 0x8543 -#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 -#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 -#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 -#define GL_COMBINER_MUX_SUM_NV 0x8547 -#define GL_COMBINER_SCALE_NV 0x8548 -#define GL_COMBINER_BIAS_NV 0x8549 -#define GL_COMBINER_AB_OUTPUT_NV 0x854A -#define GL_COMBINER_CD_OUTPUT_NV 0x854B -#define GL_COMBINER_SUM_OUTPUT_NV 0x854C -#define GL_MAX_GENERAL_COMBINERS_NV 0x854D -#define GL_NUM_GENERAL_COMBINERS_NV 0x854E -#define GL_COLOR_SUM_CLAMP_NV 0x854F -#define GL_COMBINER0_NV 0x8550 -#define GL_COMBINER1_NV 0x8551 -#define GL_COMBINER2_NV 0x8552 -#define GL_COMBINER3_NV 0x8553 -#define GL_COMBINER4_NV 0x8554 -#define GL_COMBINER5_NV 0x8555 -#define GL_COMBINER6_NV 0x8556 -#define GL_COMBINER7_NV 0x8557 +# define GL_REGISTER_COMBINERS_NV 0x8522 +# define GL_VARIABLE_A_NV 0x8523 +# define GL_VARIABLE_B_NV 0x8524 +# define GL_VARIABLE_C_NV 0x8525 +# define GL_VARIABLE_D_NV 0x8526 +# define GL_VARIABLE_E_NV 0x8527 +# define GL_VARIABLE_F_NV 0x8528 +# define GL_VARIABLE_G_NV 0x8529 +# define GL_CONSTANT_COLOR0_NV 0x852A +# define GL_CONSTANT_COLOR1_NV 0x852B +# define GL_PRIMARY_COLOR_NV 0x852C +# define GL_SECONDARY_COLOR_NV 0x852D +# define GL_SPARE0_NV 0x852E +# define GL_SPARE1_NV 0x852F +# define GL_DISCARD_NV 0x8530 +# define GL_E_TIMES_F_NV 0x8531 +# define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 +# define GL_UNSIGNED_IDENTITY_NV 0x8536 +# define GL_UNSIGNED_INVERT_NV 0x8537 +# define GL_EXPAND_NORMAL_NV 0x8538 +# define GL_EXPAND_NEGATE_NV 0x8539 +# define GL_HALF_BIAS_NORMAL_NV 0x853A +# define GL_HALF_BIAS_NEGATE_NV 0x853B +# define GL_SIGNED_IDENTITY_NV 0x853C +# define GL_SIGNED_NEGATE_NV 0x853D +# define GL_SCALE_BY_TWO_NV 0x853E +# define GL_SCALE_BY_FOUR_NV 0x853F +# define GL_SCALE_BY_ONE_HALF_NV 0x8540 +# define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 +# define GL_COMBINER_INPUT_NV 0x8542 +# define GL_COMBINER_MAPPING_NV 0x8543 +# define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 +# define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 +# define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 +# define GL_COMBINER_MUX_SUM_NV 0x8547 +# define GL_COMBINER_SCALE_NV 0x8548 +# define GL_COMBINER_BIAS_NV 0x8549 +# define GL_COMBINER_AB_OUTPUT_NV 0x854A +# define GL_COMBINER_CD_OUTPUT_NV 0x854B +# define GL_COMBINER_SUM_OUTPUT_NV 0x854C +# define GL_MAX_GENERAL_COMBINERS_NV 0x854D +# define GL_NUM_GENERAL_COMBINERS_NV 0x854E +# define GL_COLOR_SUM_CLAMP_NV 0x854F +# define GL_COMBINER0_NV 0x8550 +# define GL_COMBINER1_NV 0x8551 +# define GL_COMBINER2_NV 0x8552 +# define GL_COMBINER3_NV 0x8553 +# define GL_COMBINER4_NV 0x8554 +# define GL_COMBINER5_NV 0x8555 +# define GL_COMBINER6_NV 0x8556 +# define GL_COMBINER7_NV 0x8557 /* reuse GL_TEXTURE0_ARB */ /* reuse GL_TEXTURE1_ARB */ /* reuse GL_ZERO */ @@ -4095,27 +4095,27 @@ extern "C" { #endif #ifndef GL_NV_fog_distance -#define GL_FOG_DISTANCE_MODE_NV 0x855A -#define GL_EYE_RADIAL_NV 0x855B -#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C +# define GL_FOG_DISTANCE_MODE_NV 0x855A +# define GL_EYE_RADIAL_NV 0x855B +# define GL_EYE_PLANE_ABSOLUTE_NV 0x855C /* reuse GL_EYE_PLANE */ #endif #ifndef GL_NV_texgen_emboss -#define GL_EMBOSS_LIGHT_NV 0x855D -#define GL_EMBOSS_CONSTANT_NV 0x855E -#define GL_EMBOSS_MAP_NV 0x855F +# define GL_EMBOSS_LIGHT_NV 0x855D +# define GL_EMBOSS_CONSTANT_NV 0x855E +# define GL_EMBOSS_MAP_NV 0x855F #endif #ifndef GL_NV_blend_square #endif #ifndef GL_NV_texture_env_combine4 -#define GL_COMBINE4_NV 0x8503 -#define GL_SOURCE3_RGB_NV 0x8583 -#define GL_SOURCE3_ALPHA_NV 0x858B -#define GL_OPERAND3_RGB_NV 0x8593 -#define GL_OPERAND3_ALPHA_NV 0x859B +# define GL_COMBINE4_NV 0x8503 +# define GL_SOURCE3_RGB_NV 0x8583 +# define GL_SOURCE3_ALPHA_NV 0x858B +# define GL_OPERAND3_RGB_NV 0x8593 +# define GL_OPERAND3_ALPHA_NV 0x859B #endif #ifndef GL_MESA_resize_buffers @@ -4125,724 +4125,724 @@ extern "C" { #endif #ifndef GL_EXT_texture_compression_s3tc -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +# define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +# define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +# define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +# define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 #endif #ifndef GL_AMD_compressed_ATC_texture -#define ATC_RGB_AMD 0x8C92 -#define ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 -#define ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE +# define ATC_RGB_AMD 0x8C92 +# define ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 +# define ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE #endif #ifndef GL_IBM_cull_vertex -#define GL_CULL_VERTEX_IBM 103050 +# define GL_CULL_VERTEX_IBM 103050 #endif #ifndef GL_IBM_multimode_draw_arrays #endif #ifndef GL_IBM_vertex_array_lists -#define GL_VERTEX_ARRAY_LIST_IBM 103070 -#define GL_NORMAL_ARRAY_LIST_IBM 103071 -#define GL_COLOR_ARRAY_LIST_IBM 103072 -#define GL_INDEX_ARRAY_LIST_IBM 103073 -#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 -#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 -#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 -#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 -#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 -#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 -#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 -#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 -#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 -#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 -#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 -#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 +# define GL_VERTEX_ARRAY_LIST_IBM 103070 +# define GL_NORMAL_ARRAY_LIST_IBM 103071 +# define GL_COLOR_ARRAY_LIST_IBM 103072 +# define GL_INDEX_ARRAY_LIST_IBM 103073 +# define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 +# define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 +# define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 +# define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 +# define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 +# define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 +# define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 +# define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 +# define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 +# define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 +# define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 +# define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 #endif #ifndef GL_SGIX_subsample -#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 -#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 -#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 -#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 -#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 +# define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 +# define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 +# define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 +# define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 +# define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 #endif #ifndef GL_SGIX_ycrcb_subsample #endif #ifndef GL_SGIX_ycrcba -#define GL_YCRCB_SGIX 0x8318 -#define GL_YCRCBA_SGIX 0x8319 +# define GL_YCRCB_SGIX 0x8318 +# define GL_YCRCBA_SGIX 0x8319 #endif #ifndef GL_SGI_depth_pass_instrument -#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 -#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 -#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 +# define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 +# define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 +# define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 #endif #ifndef GL_3DFX_texture_compression_FXT1 -#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 -#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 +# define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 +# define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 #endif #ifndef GL_3DFX_multisample -#define GL_MULTISAMPLE_3DFX 0x86B2 -#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 -#define GL_SAMPLES_3DFX 0x86B4 -#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 +# define GL_MULTISAMPLE_3DFX 0x86B2 +# define GL_SAMPLE_BUFFERS_3DFX 0x86B3 +# define GL_SAMPLES_3DFX 0x86B4 +# define GL_MULTISAMPLE_BIT_3DFX 0x20000000 #endif #ifndef GL_3DFX_tbuffer #endif #ifndef GL_EXT_multisample -#define GL_MULTISAMPLE_EXT 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F -#define GL_SAMPLE_MASK_EXT 0x80A0 -#define GL_1PASS_EXT 0x80A1 -#define GL_2PASS_0_EXT 0x80A2 -#define GL_2PASS_1_EXT 0x80A3 -#define GL_4PASS_0_EXT 0x80A4 -#define GL_4PASS_1_EXT 0x80A5 -#define GL_4PASS_2_EXT 0x80A6 -#define GL_4PASS_3_EXT 0x80A7 -#define GL_SAMPLE_BUFFERS_EXT 0x80A8 -#define GL_SAMPLES_EXT 0x80A9 -#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA -#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB -#define GL_SAMPLE_PATTERN_EXT 0x80AC -#define GL_MULTISAMPLE_BIT_EXT 0x20000000 +# define GL_MULTISAMPLE_EXT 0x809D +# define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E +# define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +# define GL_SAMPLE_MASK_EXT 0x80A0 +# define GL_1PASS_EXT 0x80A1 +# define GL_2PASS_0_EXT 0x80A2 +# define GL_2PASS_1_EXT 0x80A3 +# define GL_4PASS_0_EXT 0x80A4 +# define GL_4PASS_1_EXT 0x80A5 +# define GL_4PASS_2_EXT 0x80A6 +# define GL_4PASS_3_EXT 0x80A7 +# define GL_SAMPLE_BUFFERS_EXT 0x80A8 +# define GL_SAMPLES_EXT 0x80A9 +# define GL_SAMPLE_MASK_VALUE_EXT 0x80AA +# define GL_SAMPLE_MASK_INVERT_EXT 0x80AB +# define GL_SAMPLE_PATTERN_EXT 0x80AC +# define GL_MULTISAMPLE_BIT_EXT 0x20000000 #endif #ifndef GL_SGIX_vertex_preclip -#define GL_VERTEX_PRECLIP_SGIX 0x83EE -#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF +# define GL_VERTEX_PRECLIP_SGIX 0x83EE +# define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF #endif #ifndef GL_SGIX_convolution_accuracy -#define GL_CONVOLUTION_HINT_SGIX 0x8316 +# define GL_CONVOLUTION_HINT_SGIX 0x8316 #endif #ifndef GL_SGIX_resample -#define GL_PACK_RESAMPLE_SGIX 0x842C -#define GL_UNPACK_RESAMPLE_SGIX 0x842D -#define GL_RESAMPLE_REPLICATE_SGIX 0x842E -#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F -#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 +# define GL_PACK_RESAMPLE_SGIX 0x842C +# define GL_UNPACK_RESAMPLE_SGIX 0x842D +# define GL_RESAMPLE_REPLICATE_SGIX 0x842E +# define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F +# define GL_RESAMPLE_DECIMATE_SGIX 0x8430 #endif #ifndef GL_SGIS_point_line_texgen -#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 -#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 -#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 -#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 -#define GL_EYE_POINT_SGIS 0x81F4 -#define GL_OBJECT_POINT_SGIS 0x81F5 -#define GL_EYE_LINE_SGIS 0x81F6 -#define GL_OBJECT_LINE_SGIS 0x81F7 +# define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 +# define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 +# define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 +# define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 +# define GL_EYE_POINT_SGIS 0x81F4 +# define GL_OBJECT_POINT_SGIS 0x81F5 +# define GL_EYE_LINE_SGIS 0x81F6 +# define GL_OBJECT_LINE_SGIS 0x81F7 #endif #ifndef GL_SGIS_texture_color_mask -#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF +# define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF #endif #ifndef GL_EXT_texture_env_dot3 -#define GL_DOT3_RGB_EXT 0x8740 -#define GL_DOT3_RGBA_EXT 0x8741 +# define GL_DOT3_RGB_EXT 0x8740 +# define GL_DOT3_RGBA_EXT 0x8741 #endif #ifndef GL_ATI_texture_mirror_once -#define GL_MIRROR_CLAMP_ATI 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 +# define GL_MIRROR_CLAMP_ATI 0x8742 +# define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 #endif #ifndef GL_NV_fence -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 +# define GL_ALL_COMPLETED_NV 0x84F2 +# define GL_FENCE_STATUS_NV 0x84F3 +# define GL_FENCE_CONDITION_NV 0x84F4 #endif #ifndef GL_IBM_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_IBM 0x8370 +# define GL_MIRRORED_REPEAT_IBM 0x8370 #endif #ifndef GL_NV_evaluators -#define GL_EVAL_2D_NV 0x86C0 -#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 -#define GL_MAP_TESSELLATION_NV 0x86C2 -#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 -#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 -#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 -#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 -#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 -#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 -#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 -#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA -#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB -#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC -#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD -#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE -#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF -#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 -#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 -#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 -#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 -#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 -#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 -#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 -#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 +# define GL_EVAL_2D_NV 0x86C0 +# define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 +# define GL_MAP_TESSELLATION_NV 0x86C2 +# define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 +# define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 +# define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 +# define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 +# define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 +# define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 +# define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 +# define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA +# define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB +# define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC +# define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD +# define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE +# define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF +# define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 +# define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 +# define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 +# define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 +# define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 +# define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 +# define GL_MAX_MAP_TESSELLATION_NV 0x86D6 +# define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 #endif #ifndef GL_NV_packed_depth_stencil -#define GL_DEPTH_STENCIL_NV 0x84F9 -#define GL_UNSIGNED_INT_24_8_NV 0x84FA +# define GL_DEPTH_STENCIL_NV 0x84F9 +# define GL_UNSIGNED_INT_24_8_NV 0x84FA #endif #ifndef GL_NV_register_combiners2 -#define GL_PER_STAGE_CONSTANTS_NV 0x8535 +# define GL_PER_STAGE_CONSTANTS_NV 0x8535 #endif #ifndef GL_NV_texture_compression_vtc #endif #ifndef GL_NV_texture_rectangle -#define GL_TEXTURE_RECTANGLE_NV 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 +# define GL_TEXTURE_RECTANGLE_NV 0x84F5 +# define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 +# define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 +# define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 #endif #ifndef GL_NV_texture_shader -#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C -#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D -#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E -#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 -#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA -#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB -#define GL_DSDT_MAG_INTENSITY_NV 0x86DC -#define GL_SHADER_CONSISTENT_NV 0x86DD -#define GL_TEXTURE_SHADER_NV 0x86DE -#define GL_SHADER_OPERATION_NV 0x86DF -#define GL_CULL_MODES_NV 0x86E0 -#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 -#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 -#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 -#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV -#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV -#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV -#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 -#define GL_CONST_EYE_NV 0x86E5 -#define GL_PASS_THROUGH_NV 0x86E6 -#define GL_CULL_FRAGMENT_NV 0x86E7 -#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 -#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 -#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA -#define GL_DOT_PRODUCT_NV 0x86EC -#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED -#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE -#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 -#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 -#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 -#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 -#define GL_HILO_NV 0x86F4 -#define GL_DSDT_NV 0x86F5 -#define GL_DSDT_MAG_NV 0x86F6 -#define GL_DSDT_MAG_VIB_NV 0x86F7 -#define GL_HILO16_NV 0x86F8 -#define GL_SIGNED_HILO_NV 0x86F9 -#define GL_SIGNED_HILO16_NV 0x86FA -#define GL_SIGNED_RGBA_NV 0x86FB -#define GL_SIGNED_RGBA8_NV 0x86FC -#define GL_SIGNED_RGB_NV 0x86FE -#define GL_SIGNED_RGB8_NV 0x86FF -#define GL_SIGNED_LUMINANCE_NV 0x8701 -#define GL_SIGNED_LUMINANCE8_NV 0x8702 -#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 -#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 -#define GL_SIGNED_ALPHA_NV 0x8705 -#define GL_SIGNED_ALPHA8_NV 0x8706 -#define GL_SIGNED_INTENSITY_NV 0x8707 -#define GL_SIGNED_INTENSITY8_NV 0x8708 -#define GL_DSDT8_NV 0x8709 -#define GL_DSDT8_MAG8_NV 0x870A -#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B -#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C -#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D -#define GL_HI_SCALE_NV 0x870E -#define GL_LO_SCALE_NV 0x870F -#define GL_DS_SCALE_NV 0x8710 -#define GL_DT_SCALE_NV 0x8711 -#define GL_MAGNITUDE_SCALE_NV 0x8712 -#define GL_VIBRANCE_SCALE_NV 0x8713 -#define GL_HI_BIAS_NV 0x8714 -#define GL_LO_BIAS_NV 0x8715 -#define GL_DS_BIAS_NV 0x8716 -#define GL_DT_BIAS_NV 0x8717 -#define GL_MAGNITUDE_BIAS_NV 0x8718 -#define GL_VIBRANCE_BIAS_NV 0x8719 -#define GL_TEXTURE_BORDER_VALUES_NV 0x871A -#define GL_TEXTURE_HI_SIZE_NV 0x871B -#define GL_TEXTURE_LO_SIZE_NV 0x871C -#define GL_TEXTURE_DS_SIZE_NV 0x871D -#define GL_TEXTURE_DT_SIZE_NV 0x871E -#define GL_TEXTURE_MAG_SIZE_NV 0x871F +# define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +# define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +# define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E +# define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +# define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +# define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +# define GL_DSDT_MAG_INTENSITY_NV 0x86DC +# define GL_SHADER_CONSISTENT_NV 0x86DD +# define GL_TEXTURE_SHADER_NV 0x86DE +# define GL_SHADER_OPERATION_NV 0x86DF +# define GL_CULL_MODES_NV 0x86E0 +# define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 +# define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 +# define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 +# define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV +# define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV +# define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV +# define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 +# define GL_CONST_EYE_NV 0x86E5 +# define GL_PASS_THROUGH_NV 0x86E6 +# define GL_CULL_FRAGMENT_NV 0x86E7 +# define GL_OFFSET_TEXTURE_2D_NV 0x86E8 +# define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 +# define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA +# define GL_DOT_PRODUCT_NV 0x86EC +# define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED +# define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE +# define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 +# define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 +# define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 +# define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 +# define GL_HILO_NV 0x86F4 +# define GL_DSDT_NV 0x86F5 +# define GL_DSDT_MAG_NV 0x86F6 +# define GL_DSDT_MAG_VIB_NV 0x86F7 +# define GL_HILO16_NV 0x86F8 +# define GL_SIGNED_HILO_NV 0x86F9 +# define GL_SIGNED_HILO16_NV 0x86FA +# define GL_SIGNED_RGBA_NV 0x86FB +# define GL_SIGNED_RGBA8_NV 0x86FC +# define GL_SIGNED_RGB_NV 0x86FE +# define GL_SIGNED_RGB8_NV 0x86FF +# define GL_SIGNED_LUMINANCE_NV 0x8701 +# define GL_SIGNED_LUMINANCE8_NV 0x8702 +# define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +# define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +# define GL_SIGNED_ALPHA_NV 0x8705 +# define GL_SIGNED_ALPHA8_NV 0x8706 +# define GL_SIGNED_INTENSITY_NV 0x8707 +# define GL_SIGNED_INTENSITY8_NV 0x8708 +# define GL_DSDT8_NV 0x8709 +# define GL_DSDT8_MAG8_NV 0x870A +# define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +# define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +# define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +# define GL_HI_SCALE_NV 0x870E +# define GL_LO_SCALE_NV 0x870F +# define GL_DS_SCALE_NV 0x8710 +# define GL_DT_SCALE_NV 0x8711 +# define GL_MAGNITUDE_SCALE_NV 0x8712 +# define GL_VIBRANCE_SCALE_NV 0x8713 +# define GL_HI_BIAS_NV 0x8714 +# define GL_LO_BIAS_NV 0x8715 +# define GL_DS_BIAS_NV 0x8716 +# define GL_DT_BIAS_NV 0x8717 +# define GL_MAGNITUDE_BIAS_NV 0x8718 +# define GL_VIBRANCE_BIAS_NV 0x8719 +# define GL_TEXTURE_BORDER_VALUES_NV 0x871A +# define GL_TEXTURE_HI_SIZE_NV 0x871B +# define GL_TEXTURE_LO_SIZE_NV 0x871C +# define GL_TEXTURE_DS_SIZE_NV 0x871D +# define GL_TEXTURE_DT_SIZE_NV 0x871E +# define GL_TEXTURE_MAG_SIZE_NV 0x871F #endif #ifndef GL_NV_texture_shader2 -#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF +# define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF #endif #ifndef GL_NV_vertex_array_range2 -#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 +# define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 #endif #ifndef GL_NV_vertex_program -#define GL_VERTEX_PROGRAM_NV 0x8620 -#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 -#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 -#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 -#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 -#define GL_CURRENT_ATTRIB_NV 0x8626 -#define GL_PROGRAM_LENGTH_NV 0x8627 -#define GL_PROGRAM_STRING_NV 0x8628 -#define GL_MODELVIEW_PROJECTION_NV 0x8629 -#define GL_IDENTITY_NV 0x862A -#define GL_INVERSE_NV 0x862B -#define GL_TRANSPOSE_NV 0x862C -#define GL_INVERSE_TRANSPOSE_NV 0x862D -#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E -#define GL_MAX_TRACK_MATRICES_NV 0x862F -#define GL_MATRIX0_NV 0x8630 -#define GL_MATRIX1_NV 0x8631 -#define GL_MATRIX2_NV 0x8632 -#define GL_MATRIX3_NV 0x8633 -#define GL_MATRIX4_NV 0x8634 -#define GL_MATRIX5_NV 0x8635 -#define GL_MATRIX6_NV 0x8636 -#define GL_MATRIX7_NV 0x8637 -#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 -#define GL_CURRENT_MATRIX_NV 0x8641 -#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 -#define GL_PROGRAM_PARAMETER_NV 0x8644 -#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 -#define GL_PROGRAM_TARGET_NV 0x8646 -#define GL_PROGRAM_RESIDENT_NV 0x8647 -#define GL_TRACK_MATRIX_NV 0x8648 -#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 -#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A -#define GL_PROGRAM_ERROR_POSITION_NV 0x864B -#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 -#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 -#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 -#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 -#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 -#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 -#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 -#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 -#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 -#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 -#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A -#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B -#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C -#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D -#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E -#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F -#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 -#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 -#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 -#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 -#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 -#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 -#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 -#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 -#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 -#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 -#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A -#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B -#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C -#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D -#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E -#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F -#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 -#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 -#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 -#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 -#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 -#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 -#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 -#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 -#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 -#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 -#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A -#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B -#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C -#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D -#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E -#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F +# define GL_VERTEX_PROGRAM_NV 0x8620 +# define GL_VERTEX_STATE_PROGRAM_NV 0x8621 +# define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 +# define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 +# define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 +# define GL_CURRENT_ATTRIB_NV 0x8626 +# define GL_PROGRAM_LENGTH_NV 0x8627 +# define GL_PROGRAM_STRING_NV 0x8628 +# define GL_MODELVIEW_PROJECTION_NV 0x8629 +# define GL_IDENTITY_NV 0x862A +# define GL_INVERSE_NV 0x862B +# define GL_TRANSPOSE_NV 0x862C +# define GL_INVERSE_TRANSPOSE_NV 0x862D +# define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E +# define GL_MAX_TRACK_MATRICES_NV 0x862F +# define GL_MATRIX0_NV 0x8630 +# define GL_MATRIX1_NV 0x8631 +# define GL_MATRIX2_NV 0x8632 +# define GL_MATRIX3_NV 0x8633 +# define GL_MATRIX4_NV 0x8634 +# define GL_MATRIX5_NV 0x8635 +# define GL_MATRIX6_NV 0x8636 +# define GL_MATRIX7_NV 0x8637 +# define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +# define GL_CURRENT_MATRIX_NV 0x8641 +# define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +# define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +# define GL_PROGRAM_PARAMETER_NV 0x8644 +# define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +# define GL_PROGRAM_TARGET_NV 0x8646 +# define GL_PROGRAM_RESIDENT_NV 0x8647 +# define GL_TRACK_MATRIX_NV 0x8648 +# define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +# define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +# define GL_PROGRAM_ERROR_POSITION_NV 0x864B +# define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 +# define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 +# define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 +# define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 +# define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 +# define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 +# define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 +# define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 +# define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 +# define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 +# define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A +# define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B +# define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C +# define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D +# define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E +# define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F +# define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 +# define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 +# define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 +# define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 +# define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 +# define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 +# define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 +# define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 +# define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 +# define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 +# define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A +# define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B +# define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C +# define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D +# define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E +# define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F +# define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 +# define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 +# define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 +# define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 +# define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 +# define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 +# define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 +# define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 +# define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 +# define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 +# define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A +# define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B +# define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C +# define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D +# define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E +# define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F #endif #ifndef GL_SGIX_texture_coordinate_clamp -#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 -#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A -#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B +# define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 +# define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A +# define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B #endif #ifndef GL_SGIX_scalebias_hint -#define GL_SCALEBIAS_HINT_SGIX 0x8322 +# define GL_SCALEBIAS_HINT_SGIX 0x8322 #endif #ifndef GL_OML_interlace -#define GL_INTERLACE_OML 0x8980 -#define GL_INTERLACE_READ_OML 0x8981 +# define GL_INTERLACE_OML 0x8980 +# define GL_INTERLACE_READ_OML 0x8981 #endif #ifndef GL_OML_subsample -#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 -#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 +# define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 +# define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 #endif #ifndef GL_OML_resample -#define GL_PACK_RESAMPLE_OML 0x8984 -#define GL_UNPACK_RESAMPLE_OML 0x8985 -#define GL_RESAMPLE_REPLICATE_OML 0x8986 -#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 -#define GL_RESAMPLE_AVERAGE_OML 0x8988 -#define GL_RESAMPLE_DECIMATE_OML 0x8989 +# define GL_PACK_RESAMPLE_OML 0x8984 +# define GL_UNPACK_RESAMPLE_OML 0x8985 +# define GL_RESAMPLE_REPLICATE_OML 0x8986 +# define GL_RESAMPLE_ZERO_FILL_OML 0x8987 +# define GL_RESAMPLE_AVERAGE_OML 0x8988 +# define GL_RESAMPLE_DECIMATE_OML 0x8989 #endif #ifndef GL_NV_copy_depth_to_color -#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E -#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F +# define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E +# define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F #endif #ifndef GL_ATI_envmap_bumpmap -#define GL_BUMP_ROT_MATRIX_ATI 0x8775 -#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 -#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 -#define GL_BUMP_TEX_UNITS_ATI 0x8778 -#define GL_DUDV_ATI 0x8779 -#define GL_DU8DV8_ATI 0x877A -#define GL_BUMP_ENVMAP_ATI 0x877B -#define GL_BUMP_TARGET_ATI 0x877C +# define GL_BUMP_ROT_MATRIX_ATI 0x8775 +# define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 +# define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 +# define GL_BUMP_TEX_UNITS_ATI 0x8778 +# define GL_DUDV_ATI 0x8779 +# define GL_DU8DV8_ATI 0x877A +# define GL_BUMP_ENVMAP_ATI 0x877B +# define GL_BUMP_TARGET_ATI 0x877C #endif #ifndef GL_ATI_fragment_shader -#define GL_FRAGMENT_SHADER_ATI 0x8920 -#define GL_REG_0_ATI 0x8921 -#define GL_REG_1_ATI 0x8922 -#define GL_REG_2_ATI 0x8923 -#define GL_REG_3_ATI 0x8924 -#define GL_REG_4_ATI 0x8925 -#define GL_REG_5_ATI 0x8926 -#define GL_REG_6_ATI 0x8927 -#define GL_REG_7_ATI 0x8928 -#define GL_REG_8_ATI 0x8929 -#define GL_REG_9_ATI 0x892A -#define GL_REG_10_ATI 0x892B -#define GL_REG_11_ATI 0x892C -#define GL_REG_12_ATI 0x892D -#define GL_REG_13_ATI 0x892E -#define GL_REG_14_ATI 0x892F -#define GL_REG_15_ATI 0x8930 -#define GL_REG_16_ATI 0x8931 -#define GL_REG_17_ATI 0x8932 -#define GL_REG_18_ATI 0x8933 -#define GL_REG_19_ATI 0x8934 -#define GL_REG_20_ATI 0x8935 -#define GL_REG_21_ATI 0x8936 -#define GL_REG_22_ATI 0x8937 -#define GL_REG_23_ATI 0x8938 -#define GL_REG_24_ATI 0x8939 -#define GL_REG_25_ATI 0x893A -#define GL_REG_26_ATI 0x893B -#define GL_REG_27_ATI 0x893C -#define GL_REG_28_ATI 0x893D -#define GL_REG_29_ATI 0x893E -#define GL_REG_30_ATI 0x893F -#define GL_REG_31_ATI 0x8940 -#define GL_CON_0_ATI 0x8941 -#define GL_CON_1_ATI 0x8942 -#define GL_CON_2_ATI 0x8943 -#define GL_CON_3_ATI 0x8944 -#define GL_CON_4_ATI 0x8945 -#define GL_CON_5_ATI 0x8946 -#define GL_CON_6_ATI 0x8947 -#define GL_CON_7_ATI 0x8948 -#define GL_CON_8_ATI 0x8949 -#define GL_CON_9_ATI 0x894A -#define GL_CON_10_ATI 0x894B -#define GL_CON_11_ATI 0x894C -#define GL_CON_12_ATI 0x894D -#define GL_CON_13_ATI 0x894E -#define GL_CON_14_ATI 0x894F -#define GL_CON_15_ATI 0x8950 -#define GL_CON_16_ATI 0x8951 -#define GL_CON_17_ATI 0x8952 -#define GL_CON_18_ATI 0x8953 -#define GL_CON_19_ATI 0x8954 -#define GL_CON_20_ATI 0x8955 -#define GL_CON_21_ATI 0x8956 -#define GL_CON_22_ATI 0x8957 -#define GL_CON_23_ATI 0x8958 -#define GL_CON_24_ATI 0x8959 -#define GL_CON_25_ATI 0x895A -#define GL_CON_26_ATI 0x895B -#define GL_CON_27_ATI 0x895C -#define GL_CON_28_ATI 0x895D -#define GL_CON_29_ATI 0x895E -#define GL_CON_30_ATI 0x895F -#define GL_CON_31_ATI 0x8960 -#define GL_MOV_ATI 0x8961 -#define GL_ADD_ATI 0x8963 -#define GL_MUL_ATI 0x8964 -#define GL_SUB_ATI 0x8965 -#define GL_DOT3_ATI 0x8966 -#define GL_DOT4_ATI 0x8967 -#define GL_MAD_ATI 0x8968 -#define GL_LERP_ATI 0x8969 -#define GL_CND_ATI 0x896A -#define GL_CND0_ATI 0x896B -#define GL_DOT2_ADD_ATI 0x896C -#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D -#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E -#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F -#define GL_NUM_PASSES_ATI 0x8970 -#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 -#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 -#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 -#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 -#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 -#define GL_SWIZZLE_STR_ATI 0x8976 -#define GL_SWIZZLE_STQ_ATI 0x8977 -#define GL_SWIZZLE_STR_DR_ATI 0x8978 -#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 -#define GL_SWIZZLE_STRQ_ATI 0x897A -#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B -#define GL_RED_BIT_ATI 0x00000001 -#define GL_GREEN_BIT_ATI 0x00000002 -#define GL_BLUE_BIT_ATI 0x00000004 -#define GL_2X_BIT_ATI 0x00000001 -#define GL_4X_BIT_ATI 0x00000002 -#define GL_8X_BIT_ATI 0x00000004 -#define GL_HALF_BIT_ATI 0x00000008 -#define GL_QUARTER_BIT_ATI 0x00000010 -#define GL_EIGHTH_BIT_ATI 0x00000020 -#define GL_SATURATE_BIT_ATI 0x00000040 -#define GL_COMP_BIT_ATI 0x00000002 -#define GL_NEGATE_BIT_ATI 0x00000004 -#define GL_BIAS_BIT_ATI 0x00000008 +# define GL_FRAGMENT_SHADER_ATI 0x8920 +# define GL_REG_0_ATI 0x8921 +# define GL_REG_1_ATI 0x8922 +# define GL_REG_2_ATI 0x8923 +# define GL_REG_3_ATI 0x8924 +# define GL_REG_4_ATI 0x8925 +# define GL_REG_5_ATI 0x8926 +# define GL_REG_6_ATI 0x8927 +# define GL_REG_7_ATI 0x8928 +# define GL_REG_8_ATI 0x8929 +# define GL_REG_9_ATI 0x892A +# define GL_REG_10_ATI 0x892B +# define GL_REG_11_ATI 0x892C +# define GL_REG_12_ATI 0x892D +# define GL_REG_13_ATI 0x892E +# define GL_REG_14_ATI 0x892F +# define GL_REG_15_ATI 0x8930 +# define GL_REG_16_ATI 0x8931 +# define GL_REG_17_ATI 0x8932 +# define GL_REG_18_ATI 0x8933 +# define GL_REG_19_ATI 0x8934 +# define GL_REG_20_ATI 0x8935 +# define GL_REG_21_ATI 0x8936 +# define GL_REG_22_ATI 0x8937 +# define GL_REG_23_ATI 0x8938 +# define GL_REG_24_ATI 0x8939 +# define GL_REG_25_ATI 0x893A +# define GL_REG_26_ATI 0x893B +# define GL_REG_27_ATI 0x893C +# define GL_REG_28_ATI 0x893D +# define GL_REG_29_ATI 0x893E +# define GL_REG_30_ATI 0x893F +# define GL_REG_31_ATI 0x8940 +# define GL_CON_0_ATI 0x8941 +# define GL_CON_1_ATI 0x8942 +# define GL_CON_2_ATI 0x8943 +# define GL_CON_3_ATI 0x8944 +# define GL_CON_4_ATI 0x8945 +# define GL_CON_5_ATI 0x8946 +# define GL_CON_6_ATI 0x8947 +# define GL_CON_7_ATI 0x8948 +# define GL_CON_8_ATI 0x8949 +# define GL_CON_9_ATI 0x894A +# define GL_CON_10_ATI 0x894B +# define GL_CON_11_ATI 0x894C +# define GL_CON_12_ATI 0x894D +# define GL_CON_13_ATI 0x894E +# define GL_CON_14_ATI 0x894F +# define GL_CON_15_ATI 0x8950 +# define GL_CON_16_ATI 0x8951 +# define GL_CON_17_ATI 0x8952 +# define GL_CON_18_ATI 0x8953 +# define GL_CON_19_ATI 0x8954 +# define GL_CON_20_ATI 0x8955 +# define GL_CON_21_ATI 0x8956 +# define GL_CON_22_ATI 0x8957 +# define GL_CON_23_ATI 0x8958 +# define GL_CON_24_ATI 0x8959 +# define GL_CON_25_ATI 0x895A +# define GL_CON_26_ATI 0x895B +# define GL_CON_27_ATI 0x895C +# define GL_CON_28_ATI 0x895D +# define GL_CON_29_ATI 0x895E +# define GL_CON_30_ATI 0x895F +# define GL_CON_31_ATI 0x8960 +# define GL_MOV_ATI 0x8961 +# define GL_ADD_ATI 0x8963 +# define GL_MUL_ATI 0x8964 +# define GL_SUB_ATI 0x8965 +# define GL_DOT3_ATI 0x8966 +# define GL_DOT4_ATI 0x8967 +# define GL_MAD_ATI 0x8968 +# define GL_LERP_ATI 0x8969 +# define GL_CND_ATI 0x896A +# define GL_CND0_ATI 0x896B +# define GL_DOT2_ADD_ATI 0x896C +# define GL_SECONDARY_INTERPOLATOR_ATI 0x896D +# define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E +# define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F +# define GL_NUM_PASSES_ATI 0x8970 +# define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 +# define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 +# define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 +# define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 +# define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 +# define GL_SWIZZLE_STR_ATI 0x8976 +# define GL_SWIZZLE_STQ_ATI 0x8977 +# define GL_SWIZZLE_STR_DR_ATI 0x8978 +# define GL_SWIZZLE_STQ_DQ_ATI 0x8979 +# define GL_SWIZZLE_STRQ_ATI 0x897A +# define GL_SWIZZLE_STRQ_DQ_ATI 0x897B +# define GL_RED_BIT_ATI 0x00000001 +# define GL_GREEN_BIT_ATI 0x00000002 +# define GL_BLUE_BIT_ATI 0x00000004 +# define GL_2X_BIT_ATI 0x00000001 +# define GL_4X_BIT_ATI 0x00000002 +# define GL_8X_BIT_ATI 0x00000004 +# define GL_HALF_BIT_ATI 0x00000008 +# define GL_QUARTER_BIT_ATI 0x00000010 +# define GL_EIGHTH_BIT_ATI 0x00000020 +# define GL_SATURATE_BIT_ATI 0x00000040 +# define GL_COMP_BIT_ATI 0x00000002 +# define GL_NEGATE_BIT_ATI 0x00000004 +# define GL_BIAS_BIT_ATI 0x00000008 #endif #ifndef GL_ATI_pn_triangles -#define GL_PN_TRIANGLES_ATI 0x87F0 -#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 -#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 -#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 -#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 -#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 -#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 -#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 -#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 +# define GL_PN_TRIANGLES_ATI 0x87F0 +# define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 +# define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 +# define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 +# define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 +# define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 +# define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 +# define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 +# define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 #endif #ifndef GL_ATI_vertex_array_object -#define GL_STATIC_ATI 0x8760 -#define GL_DYNAMIC_ATI 0x8761 -#define GL_PRESERVE_ATI 0x8762 -#define GL_DISCARD_ATI 0x8763 -#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 -#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 -#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 -#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 +# define GL_STATIC_ATI 0x8760 +# define GL_DYNAMIC_ATI 0x8761 +# define GL_PRESERVE_ATI 0x8762 +# define GL_DISCARD_ATI 0x8763 +# define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 +# define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 +# define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 +# define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 #endif #ifndef GL_EXT_vertex_shader -#define GL_VERTEX_SHADER_EXT 0x8780 -#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 -#define GL_OP_INDEX_EXT 0x8782 -#define GL_OP_NEGATE_EXT 0x8783 -#define GL_OP_DOT3_EXT 0x8784 -#define GL_OP_DOT4_EXT 0x8785 -#define GL_OP_MUL_EXT 0x8786 -#define GL_OP_ADD_EXT 0x8787 -#define GL_OP_MADD_EXT 0x8788 -#define GL_OP_FRAC_EXT 0x8789 -#define GL_OP_MAX_EXT 0x878A -#define GL_OP_MIN_EXT 0x878B -#define GL_OP_SET_GE_EXT 0x878C -#define GL_OP_SET_LT_EXT 0x878D -#define GL_OP_CLAMP_EXT 0x878E -#define GL_OP_FLOOR_EXT 0x878F -#define GL_OP_ROUND_EXT 0x8790 -#define GL_OP_EXP_BASE_2_EXT 0x8791 -#define GL_OP_LOG_BASE_2_EXT 0x8792 -#define GL_OP_POWER_EXT 0x8793 -#define GL_OP_RECIP_EXT 0x8794 -#define GL_OP_RECIP_SQRT_EXT 0x8795 -#define GL_OP_SUB_EXT 0x8796 -#define GL_OP_CROSS_PRODUCT_EXT 0x8797 -#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 -#define GL_OP_MOV_EXT 0x8799 -#define GL_OUTPUT_VERTEX_EXT 0x879A -#define GL_OUTPUT_COLOR0_EXT 0x879B -#define GL_OUTPUT_COLOR1_EXT 0x879C -#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D -#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E -#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F -#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 -#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 -#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 -#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 -#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 -#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 -#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 -#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 -#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 -#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 -#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA -#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB -#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC -#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD -#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE -#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF -#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 -#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 -#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 -#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 -#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 -#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 -#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 -#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 -#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 -#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 -#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA -#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB -#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC -#define GL_OUTPUT_FOG_EXT 0x87BD -#define GL_SCALAR_EXT 0x87BE -#define GL_VECTOR_EXT 0x87BF -#define GL_MATRIX_EXT 0x87C0 -#define GL_VARIANT_EXT 0x87C1 -#define GL_INVARIANT_EXT 0x87C2 -#define GL_LOCAL_CONSTANT_EXT 0x87C3 -#define GL_LOCAL_EXT 0x87C4 -#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 -#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 -#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 -#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 -#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE -#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF -#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 -#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 -#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 -#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 -#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 -#define GL_X_EXT 0x87D5 -#define GL_Y_EXT 0x87D6 -#define GL_Z_EXT 0x87D7 -#define GL_W_EXT 0x87D8 -#define GL_NEGATIVE_X_EXT 0x87D9 -#define GL_NEGATIVE_Y_EXT 0x87DA -#define GL_NEGATIVE_Z_EXT 0x87DB -#define GL_NEGATIVE_W_EXT 0x87DC -#define GL_ZERO_EXT 0x87DD -#define GL_ONE_EXT 0x87DE -#define GL_NEGATIVE_ONE_EXT 0x87DF -#define GL_NORMALIZED_RANGE_EXT 0x87E0 -#define GL_FULL_RANGE_EXT 0x87E1 -#define GL_CURRENT_VERTEX_EXT 0x87E2 -#define GL_MVP_MATRIX_EXT 0x87E3 -#define GL_VARIANT_VALUE_EXT 0x87E4 -#define GL_VARIANT_DATATYPE_EXT 0x87E5 -#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 -#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 -#define GL_VARIANT_ARRAY_EXT 0x87E8 -#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 -#define GL_INVARIANT_VALUE_EXT 0x87EA -#define GL_INVARIANT_DATATYPE_EXT 0x87EB -#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC -#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED +# define GL_VERTEX_SHADER_EXT 0x8780 +# define GL_VERTEX_SHADER_BINDING_EXT 0x8781 +# define GL_OP_INDEX_EXT 0x8782 +# define GL_OP_NEGATE_EXT 0x8783 +# define GL_OP_DOT3_EXT 0x8784 +# define GL_OP_DOT4_EXT 0x8785 +# define GL_OP_MUL_EXT 0x8786 +# define GL_OP_ADD_EXT 0x8787 +# define GL_OP_MADD_EXT 0x8788 +# define GL_OP_FRAC_EXT 0x8789 +# define GL_OP_MAX_EXT 0x878A +# define GL_OP_MIN_EXT 0x878B +# define GL_OP_SET_GE_EXT 0x878C +# define GL_OP_SET_LT_EXT 0x878D +# define GL_OP_CLAMP_EXT 0x878E +# define GL_OP_FLOOR_EXT 0x878F +# define GL_OP_ROUND_EXT 0x8790 +# define GL_OP_EXP_BASE_2_EXT 0x8791 +# define GL_OP_LOG_BASE_2_EXT 0x8792 +# define GL_OP_POWER_EXT 0x8793 +# define GL_OP_RECIP_EXT 0x8794 +# define GL_OP_RECIP_SQRT_EXT 0x8795 +# define GL_OP_SUB_EXT 0x8796 +# define GL_OP_CROSS_PRODUCT_EXT 0x8797 +# define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 +# define GL_OP_MOV_EXT 0x8799 +# define GL_OUTPUT_VERTEX_EXT 0x879A +# define GL_OUTPUT_COLOR0_EXT 0x879B +# define GL_OUTPUT_COLOR1_EXT 0x879C +# define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D +# define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E +# define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F +# define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 +# define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 +# define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 +# define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 +# define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 +# define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 +# define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 +# define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 +# define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 +# define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 +# define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA +# define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB +# define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC +# define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD +# define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE +# define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF +# define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 +# define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 +# define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 +# define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 +# define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 +# define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 +# define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 +# define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 +# define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 +# define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 +# define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA +# define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB +# define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC +# define GL_OUTPUT_FOG_EXT 0x87BD +# define GL_SCALAR_EXT 0x87BE +# define GL_VECTOR_EXT 0x87BF +# define GL_MATRIX_EXT 0x87C0 +# define GL_VARIANT_EXT 0x87C1 +# define GL_INVARIANT_EXT 0x87C2 +# define GL_LOCAL_CONSTANT_EXT 0x87C3 +# define GL_LOCAL_EXT 0x87C4 +# define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 +# define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 +# define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 +# define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 +# define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 +# define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA +# define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB +# define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC +# define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD +# define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE +# define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF +# define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 +# define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 +# define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 +# define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 +# define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 +# define GL_X_EXT 0x87D5 +# define GL_Y_EXT 0x87D6 +# define GL_Z_EXT 0x87D7 +# define GL_W_EXT 0x87D8 +# define GL_NEGATIVE_X_EXT 0x87D9 +# define GL_NEGATIVE_Y_EXT 0x87DA +# define GL_NEGATIVE_Z_EXT 0x87DB +# define GL_NEGATIVE_W_EXT 0x87DC +# define GL_ZERO_EXT 0x87DD +# define GL_ONE_EXT 0x87DE +# define GL_NEGATIVE_ONE_EXT 0x87DF +# define GL_NORMALIZED_RANGE_EXT 0x87E0 +# define GL_FULL_RANGE_EXT 0x87E1 +# define GL_CURRENT_VERTEX_EXT 0x87E2 +# define GL_MVP_MATRIX_EXT 0x87E3 +# define GL_VARIANT_VALUE_EXT 0x87E4 +# define GL_VARIANT_DATATYPE_EXT 0x87E5 +# define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 +# define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 +# define GL_VARIANT_ARRAY_EXT 0x87E8 +# define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 +# define GL_INVARIANT_VALUE_EXT 0x87EA +# define GL_INVARIANT_DATATYPE_EXT 0x87EB +# define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC +# define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED #endif #ifndef GL_ATI_vertex_streams -#define GL_MAX_VERTEX_STREAMS_ATI 0x876B -#define GL_VERTEX_STREAM0_ATI 0x876C -#define GL_VERTEX_STREAM1_ATI 0x876D -#define GL_VERTEX_STREAM2_ATI 0x876E -#define GL_VERTEX_STREAM3_ATI 0x876F -#define GL_VERTEX_STREAM4_ATI 0x8770 -#define GL_VERTEX_STREAM5_ATI 0x8771 -#define GL_VERTEX_STREAM6_ATI 0x8772 -#define GL_VERTEX_STREAM7_ATI 0x8773 -#define GL_VERTEX_SOURCE_ATI 0x8774 +# define GL_MAX_VERTEX_STREAMS_ATI 0x876B +# define GL_VERTEX_STREAM0_ATI 0x876C +# define GL_VERTEX_STREAM1_ATI 0x876D +# define GL_VERTEX_STREAM2_ATI 0x876E +# define GL_VERTEX_STREAM3_ATI 0x876F +# define GL_VERTEX_STREAM4_ATI 0x8770 +# define GL_VERTEX_STREAM5_ATI 0x8771 +# define GL_VERTEX_STREAM6_ATI 0x8772 +# define GL_VERTEX_STREAM7_ATI 0x8773 +# define GL_VERTEX_SOURCE_ATI 0x8774 #endif #ifndef GL_ATI_element_array -#define GL_ELEMENT_ARRAY_ATI 0x8768 -#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 -#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A +# define GL_ELEMENT_ARRAY_ATI 0x8768 +# define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +# define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A #endif #ifndef GL_SUN_mesh_array -#define GL_QUAD_MESH_SUN 0x8614 -#define GL_TRIANGLE_MESH_SUN 0x8615 +# define GL_QUAD_MESH_SUN 0x8614 +# define GL_TRIANGLE_MESH_SUN 0x8615 #endif #ifndef GL_SUN_slice_accum -#define GL_SLICE_ACCUM_SUN 0x85CC +# define GL_SLICE_ACCUM_SUN 0x85CC #endif #ifndef GL_NV_multisample_filter_hint -#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 +# define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 #endif #ifndef GL_NV_depth_clamp -#define GL_DEPTH_CLAMP_NV 0x864F +# define GL_DEPTH_CLAMP_NV 0x864F #endif #ifndef GL_NV_occlusion_query -#define GL_PIXEL_COUNTER_BITS_NV 0x8864 -#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 -#define GL_PIXEL_COUNT_NV 0x8866 -#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 +# define GL_PIXEL_COUNTER_BITS_NV 0x8864 +# define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +# define GL_PIXEL_COUNT_NV 0x8866 +# define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 #endif #ifndef GL_NV_point_sprite -#define GL_POINT_SPRITE_NV 0x8861 -#define GL_COORD_REPLACE_NV 0x8862 -#define GL_POINT_SPRITE_R_MODE_NV 0x8863 +# define GL_POINT_SPRITE_NV 0x8861 +# define GL_COORD_REPLACE_NV 0x8862 +# define GL_POINT_SPRITE_R_MODE_NV 0x8863 #endif #ifndef GL_NV_texture_shader3 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 -#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 -#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 -#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 -#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 -#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A -#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B -#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C -#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D -#define GL_HILO8_NV 0x885E -#define GL_SIGNED_HILO8_NV 0x885F -#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 +# define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +# define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +# define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +# define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +# define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +# define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +# define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +# define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +# define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +# define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +# define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +# define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +# define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +# define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +# define GL_HILO8_NV 0x885E +# define GL_SIGNED_HILO8_NV 0x885F +# define GL_FORCE_BLUE_TO_ONE_NV 0x8860 #endif #ifndef GL_NV_vertex_program1_1 @@ -4852,151 +4852,151 @@ extern "C" { #endif #ifndef GL_EXT_stencil_two_side -#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 -#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 +# define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 +# define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 #endif #ifndef GL_ATI_text_fragment_shader -#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 +# define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 #endif #ifndef GL_APPLE_client_storage -#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 +# define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 #endif #ifndef GL_APPLE_element_array -#define GL_ELEMENT_ARRAY_APPLE 0x8A0C -#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D -#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E +# define GL_ELEMENT_ARRAY_APPLE 0x8A0C +# define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D +# define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E #endif #ifndef GL_APPLE_fence -#define GL_DRAW_PIXELS_APPLE 0x8A0A -#define GL_FENCE_APPLE 0x8A0B +# define GL_DRAW_PIXELS_APPLE 0x8A0A +# define GL_FENCE_APPLE 0x8A0B #endif #ifndef GL_APPLE_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 +# define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 #endif #ifndef GL_APPLE_vertex_array_range -#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E -#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F -#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 -#define GL_STORAGE_CLIENT_APPLE 0x85B4 -#define GL_STORAGE_CACHED_APPLE 0x85BE -#define GL_STORAGE_SHARED_APPLE 0x85BF +# define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D +# define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E +# define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F +# define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +# define GL_STORAGE_CLIENT_APPLE 0x85B4 +# define GL_STORAGE_CACHED_APPLE 0x85BE +# define GL_STORAGE_SHARED_APPLE 0x85BF #endif #ifndef GL_APPLE_ycbcr_422 -#define GL_YCBCR_422_APPLE 0x85B9 -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +# define GL_YCBCR_422_APPLE 0x85B9 +# define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +# define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB #endif #ifndef GL_S3_s3tc -#define GL_RGB_S3TC 0x83A0 -#define GL_RGB4_S3TC 0x83A1 -#define GL_RGBA_S3TC 0x83A2 -#define GL_RGBA4_S3TC 0x83A3 -#define GL_RGBA_DXT5_S3TC 0x83A4 -#define GL_RGBA4_DXT5_S3TC 0x83A5 +# define GL_RGB_S3TC 0x83A0 +# define GL_RGB4_S3TC 0x83A1 +# define GL_RGBA_S3TC 0x83A2 +# define GL_RGBA4_S3TC 0x83A3 +# define GL_RGBA_DXT5_S3TC 0x83A4 +# define GL_RGBA4_DXT5_S3TC 0x83A5 #endif #ifndef GL_ATI_draw_buffers -#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 -#define GL_DRAW_BUFFER0_ATI 0x8825 -#define GL_DRAW_BUFFER1_ATI 0x8826 -#define GL_DRAW_BUFFER2_ATI 0x8827 -#define GL_DRAW_BUFFER3_ATI 0x8828 -#define GL_DRAW_BUFFER4_ATI 0x8829 -#define GL_DRAW_BUFFER5_ATI 0x882A -#define GL_DRAW_BUFFER6_ATI 0x882B -#define GL_DRAW_BUFFER7_ATI 0x882C -#define GL_DRAW_BUFFER8_ATI 0x882D -#define GL_DRAW_BUFFER9_ATI 0x882E -#define GL_DRAW_BUFFER10_ATI 0x882F -#define GL_DRAW_BUFFER11_ATI 0x8830 -#define GL_DRAW_BUFFER12_ATI 0x8831 -#define GL_DRAW_BUFFER13_ATI 0x8832 -#define GL_DRAW_BUFFER14_ATI 0x8833 -#define GL_DRAW_BUFFER15_ATI 0x8834 +# define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +# define GL_DRAW_BUFFER0_ATI 0x8825 +# define GL_DRAW_BUFFER1_ATI 0x8826 +# define GL_DRAW_BUFFER2_ATI 0x8827 +# define GL_DRAW_BUFFER3_ATI 0x8828 +# define GL_DRAW_BUFFER4_ATI 0x8829 +# define GL_DRAW_BUFFER5_ATI 0x882A +# define GL_DRAW_BUFFER6_ATI 0x882B +# define GL_DRAW_BUFFER7_ATI 0x882C +# define GL_DRAW_BUFFER8_ATI 0x882D +# define GL_DRAW_BUFFER9_ATI 0x882E +# define GL_DRAW_BUFFER10_ATI 0x882F +# define GL_DRAW_BUFFER11_ATI 0x8830 +# define GL_DRAW_BUFFER12_ATI 0x8831 +# define GL_DRAW_BUFFER13_ATI 0x8832 +# define GL_DRAW_BUFFER14_ATI 0x8833 +# define GL_DRAW_BUFFER15_ATI 0x8834 #endif #ifndef GL_ATI_pixel_format_float -#define GL_RGBA_FLOAT_MODE_ATI 0x8820 -#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 +# define GL_RGBA_FLOAT_MODE_ATI 0x8820 +# define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 #endif #ifndef GL_ATI_texture_env_combine3 -#define GL_MODULATE_ADD_ATI 0x8744 -#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 -#define GL_MODULATE_SUBTRACT_ATI 0x8746 +# define GL_MODULATE_ADD_ATI 0x8744 +# define GL_MODULATE_SIGNED_ADD_ATI 0x8745 +# define GL_MODULATE_SUBTRACT_ATI 0x8746 #endif #ifndef GL_ATI_texture_float -#define GL_RGBA_FLOAT32_ATI 0x8814 -#define GL_RGB_FLOAT32_ATI 0x8815 -#define GL_ALPHA_FLOAT32_ATI 0x8816 -#define GL_INTENSITY_FLOAT32_ATI 0x8817 -#define GL_LUMINANCE_FLOAT32_ATI 0x8818 -#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 -#define GL_RGBA_FLOAT16_ATI 0x881A -#define GL_RGB_FLOAT16_ATI 0x881B -#define GL_ALPHA_FLOAT16_ATI 0x881C -#define GL_INTENSITY_FLOAT16_ATI 0x881D -#define GL_LUMINANCE_FLOAT16_ATI 0x881E -#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F +# define GL_RGBA_FLOAT32_ATI 0x8814 +# define GL_RGB_FLOAT32_ATI 0x8815 +# define GL_ALPHA_FLOAT32_ATI 0x8816 +# define GL_INTENSITY_FLOAT32_ATI 0x8817 +# define GL_LUMINANCE_FLOAT32_ATI 0x8818 +# define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +# define GL_RGBA_FLOAT16_ATI 0x881A +# define GL_RGB_FLOAT16_ATI 0x881B +# define GL_ALPHA_FLOAT16_ATI 0x881C +# define GL_INTENSITY_FLOAT16_ATI 0x881D +# define GL_LUMINANCE_FLOAT16_ATI 0x881E +# define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F #endif #ifndef GL_NV_float_buffer -#define GL_FLOAT_R_NV 0x8880 -#define GL_FLOAT_RG_NV 0x8881 -#define GL_FLOAT_RGB_NV 0x8882 -#define GL_FLOAT_RGBA_NV 0x8883 -#define GL_FLOAT_R16_NV 0x8884 -#define GL_FLOAT_R32_NV 0x8885 -#define GL_FLOAT_RG16_NV 0x8886 -#define GL_FLOAT_RG32_NV 0x8887 -#define GL_FLOAT_RGB16_NV 0x8888 -#define GL_FLOAT_RGB32_NV 0x8889 -#define GL_FLOAT_RGBA16_NV 0x888A -#define GL_FLOAT_RGBA32_NV 0x888B -#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C -#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D -#define GL_FLOAT_RGBA_MODE_NV 0x888E +# define GL_FLOAT_R_NV 0x8880 +# define GL_FLOAT_RG_NV 0x8881 +# define GL_FLOAT_RGB_NV 0x8882 +# define GL_FLOAT_RGBA_NV 0x8883 +# define GL_FLOAT_R16_NV 0x8884 +# define GL_FLOAT_R32_NV 0x8885 +# define GL_FLOAT_RG16_NV 0x8886 +# define GL_FLOAT_RG32_NV 0x8887 +# define GL_FLOAT_RGB16_NV 0x8888 +# define GL_FLOAT_RGB32_NV 0x8889 +# define GL_FLOAT_RGBA16_NV 0x888A +# define GL_FLOAT_RGBA32_NV 0x888B +# define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +# define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +# define GL_FLOAT_RGBA_MODE_NV 0x888E #endif #ifndef GL_NV_fragment_program -#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 -#define GL_FRAGMENT_PROGRAM_NV 0x8870 -#define GL_MAX_TEXTURE_COORDS_NV 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 -#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 -#define GL_PROGRAM_ERROR_STRING_NV 0x8874 +# define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 +# define GL_FRAGMENT_PROGRAM_NV 0x8870 +# define GL_MAX_TEXTURE_COORDS_NV 0x8871 +# define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 +# define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 +# define GL_PROGRAM_ERROR_STRING_NV 0x8874 #endif #ifndef GL_NV_half_float -#define GL_HALF_FLOAT_NV 0x140B +# define GL_HALF_FLOAT_NV 0x140B #endif #ifndef GL_NV_pixel_data_range -#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 -#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 -#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A -#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B -#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C -#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D +# define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 +# define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 +# define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A +# define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B +# define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C +# define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D #endif #ifndef GL_NV_primitive_restart -#define GL_PRIMITIVE_RESTART_NV 0x8558 -#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 +# define GL_PRIMITIVE_RESTART_NV 0x8558 +# define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 #endif #ifndef GL_NV_texture_expand_normal -#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F +# define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F #endif #ifndef GL_NV_vertex_program2 @@ -5006,62 +5006,62 @@ extern "C" { #endif #ifndef GL_ATI_separate_stencil -#define GL_STENCIL_BACK_FUNC_ATI 0x8800 -#define GL_STENCIL_BACK_FAIL_ATI 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 +# define GL_STENCIL_BACK_FUNC_ATI 0x8800 +# define GL_STENCIL_BACK_FAIL_ATI 0x8801 +# define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 +# define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 #endif #ifndef GL_ATI_vertex_attrib_array_object #endif #ifndef GL_OES_read_format -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +# define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +# define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B #endif #ifndef GL_EXT_depth_bounds_test -#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 -#define GL_DEPTH_BOUNDS_EXT 0x8891 +# define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 +# define GL_DEPTH_BOUNDS_EXT 0x8891 #endif #ifndef GL_EXT_texture_mirror_clamp -#define GL_MIRROR_CLAMP_EXT 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 -#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 +# define GL_MIRROR_CLAMP_EXT 0x8742 +# define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +# define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 #endif #ifndef GL_EXT_blend_equation_separate -#define GL_BLEND_EQUATION_RGB_EXT 0x8009 -#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D +# define GL_BLEND_EQUATION_RGB_EXT 0x8009 +# define GL_BLEND_EQUATION_ALPHA_EXT 0x883D #endif #ifndef GL_MESA_pack_invert -#define GL_PACK_INVERT_MESA 0x8758 +# define GL_PACK_INVERT_MESA 0x8758 #endif #ifndef GL_MESA_ycbcr_texture -#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB -#define GL_YCBCR_MESA 0x8757 +# define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA +# define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB +# define GL_YCBCR_MESA 0x8757 #endif #ifndef GL_EXT_pixel_buffer_object -#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF +# define GL_PIXEL_PACK_BUFFER_EXT 0x88EB +# define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC +# define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED +# define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF #endif #ifndef GL_NV_fragment_program_option #endif #ifndef GL_NV_fragment_program2 -#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 -#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 -#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 -#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 -#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 +# define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +# define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 +# define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 +# define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 +# define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 #endif #ifndef GL_NV_vertex_program2_option @@ -5074,169 +5074,169 @@ extern "C" { #endif #ifndef GL_EXT_framebuffer_object -#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 -#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 -#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 -#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF -#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 -#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 -#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 -#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 -#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 -#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 -#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 -#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 -#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 -#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 -#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA -#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB -#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC -#define GL_COLOR_ATTACHMENT13_EXT 0x8CED -#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE -#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 -#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 -#define GL_FRAMEBUFFER_EXT 0x8D40 -#define GL_RENDERBUFFER_EXT 0x8D41 -#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 -#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 -#define GL_STENCIL_INDEX1_EXT 0x8D46 -#define GL_STENCIL_INDEX4_EXT 0x8D47 -#define GL_STENCIL_INDEX8_EXT 0x8D48 -#define GL_STENCIL_INDEX16_EXT 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 +# define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 +# define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 +# define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 +# define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 +# define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 +# define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 +# define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 +# define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 +# define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 +# define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 +# define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA +# define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB +# define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC +# define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD +# define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF +# define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 +# define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 +# define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 +# define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 +# define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 +# define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 +# define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 +# define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 +# define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 +# define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 +# define GL_COLOR_ATTACHMENT10_EXT 0x8CEA +# define GL_COLOR_ATTACHMENT11_EXT 0x8CEB +# define GL_COLOR_ATTACHMENT12_EXT 0x8CEC +# define GL_COLOR_ATTACHMENT13_EXT 0x8CED +# define GL_COLOR_ATTACHMENT14_EXT 0x8CEE +# define GL_COLOR_ATTACHMENT15_EXT 0x8CEF +# define GL_DEPTH_ATTACHMENT_EXT 0x8D00 +# define GL_STENCIL_ATTACHMENT_EXT 0x8D20 +# define GL_FRAMEBUFFER_EXT 0x8D40 +# define GL_RENDERBUFFER_EXT 0x8D41 +# define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 +# define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 +# define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 +# define GL_STENCIL_INDEX1_EXT 0x8D46 +# define GL_STENCIL_INDEX4_EXT 0x8D47 +# define GL_STENCIL_INDEX8_EXT 0x8D48 +# define GL_STENCIL_INDEX16_EXT 0x8D49 +# define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 +# define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 +# define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 +# define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 +# define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 +# define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 #endif #ifndef GL_GREMEDY_string_marker #endif #ifndef GL_EXT_packed_depth_stencil -#define GL_DEPTH_STENCIL_EXT 0x84F9 -#define GL_UNSIGNED_INT_24_8_EXT 0x84FA -#define GL_DEPTH24_STENCIL8_EXT 0x88F0 -#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 +# define GL_DEPTH_STENCIL_EXT 0x84F9 +# define GL_UNSIGNED_INT_24_8_EXT 0x84FA +# define GL_DEPTH24_STENCIL8_EXT 0x88F0 +# define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 #endif #ifndef GL_EXT_stencil_clear_tag -#define GL_STENCIL_TAG_BITS_EXT 0x88F2 -#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 +# define GL_STENCIL_TAG_BITS_EXT 0x88F2 +# define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 #endif #ifndef GL_EXT_texture_sRGB -#define GL_SRGB_EXT 0x8C40 -#define GL_SRGB8_EXT 0x8C41 -#define GL_SRGB_ALPHA_EXT 0x8C42 -#define GL_SRGB8_ALPHA8_EXT 0x8C43 -#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 -#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 -#define GL_SLUMINANCE_EXT 0x8C46 -#define GL_SLUMINANCE8_EXT 0x8C47 -#define GL_COMPRESSED_SRGB_EXT 0x8C48 -#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 -#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A -#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B -#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F +# define GL_SRGB_EXT 0x8C40 +# define GL_SRGB8_EXT 0x8C41 +# define GL_SRGB_ALPHA_EXT 0x8C42 +# define GL_SRGB8_ALPHA8_EXT 0x8C43 +# define GL_SLUMINANCE_ALPHA_EXT 0x8C44 +# define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 +# define GL_SLUMINANCE_EXT 0x8C46 +# define GL_SLUMINANCE8_EXT 0x8C47 +# define GL_COMPRESSED_SRGB_EXT 0x8C48 +# define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 +# define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A +# define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B +# define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C +# define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D +# define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E +# define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F #endif #ifndef GL_EXT_framebuffer_blit -#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT -#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA +# define GL_READ_FRAMEBUFFER_EXT 0x8CA8 +# define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 +# define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT +# define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA #endif #ifndef GL_EXT_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 -#define GL_MAX_SAMPLES_EXT 0x8D57 +# define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +# define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +# define GL_MAX_SAMPLES_EXT 0x8D57 #endif #ifndef GL_MESAX_texture_stack -#define GL_TEXTURE_1D_STACK_MESAX 0x8759 -#define GL_TEXTURE_2D_STACK_MESAX 0x875A -#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B -#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C -#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D -#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E +# define GL_TEXTURE_1D_STACK_MESAX 0x8759 +# define GL_TEXTURE_2D_STACK_MESAX 0x875A +# define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B +# define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C +# define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D +# define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E #endif #ifndef GL_EXT_timer_query -#define GL_TIME_ELAPSED_EXT 0x88BF +# define GL_TIME_ELAPSED_EXT 0x88BF #endif #ifndef GL_EXT_gpu_program_parameters #endif #ifndef GL_APPLE_flush_buffer_range -#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 -#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 +# define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 +# define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 #endif #ifndef GL_NV_gpu_program4 -#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 -#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 -#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 -#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 -#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 -#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 -#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 +# define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 +# define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 +# define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 +# define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 +# define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 +# define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 +# define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 +# define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 #endif #ifndef GL_NV_geometry_program4 -#define GL_LINES_ADJACENCY_EXT 0x000A -#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B -#define GL_TRIANGLES_ADJACENCY_EXT 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D -#define GL_GEOMETRY_PROGRAM_NV 0x8C26 -#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 -#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 -#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA -#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB -#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 -#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 +# define GL_LINES_ADJACENCY_EXT 0x000A +# define GL_LINE_STRIP_ADJACENCY_EXT 0x000B +# define GL_TRIANGLES_ADJACENCY_EXT 0x000C +# define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D +# define GL_GEOMETRY_PROGRAM_NV 0x8C26 +# define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 +# define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 +# define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA +# define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB +# define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC +# define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 +# define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 +# define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 +# define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 +# define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +# define GL_PROGRAM_POINT_SIZE_EXT 0x8642 #endif #ifndef GL_EXT_geometry_shader4 -#define GL_GEOMETRY_SHADER_EXT 0x8DD9 +# define GL_GEOMETRY_SHADER_EXT 0x8DD9 /* reuse GL_GEOMETRY_VERTICES_OUT_EXT */ /* reuse GL_GEOMETRY_INPUT_TYPE_EXT */ /* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */ /* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */ -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD -#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE -#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 +# define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD +# define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE +# define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B +# define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF +# define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 +# define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 /* reuse GL_LINES_ADJACENCY_EXT */ /* reuse GL_LINE_STRIP_ADJACENCY_EXT */ /* reuse GL_TRIANGLES_ADJACENCY_EXT */ @@ -5249,256 +5249,256 @@ extern "C" { #endif #ifndef GL_NV_vertex_program4 -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD +# define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD #endif #ifndef GL_EXT_gpu_shader4 -#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 -#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 -#define GL_SAMPLER_BUFFER_EXT 0x8DC2 -#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 -#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 -#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 -#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 -#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 -#define GL_INT_SAMPLER_1D_EXT 0x8DC9 -#define GL_INT_SAMPLER_2D_EXT 0x8DCA -#define GL_INT_SAMPLER_3D_EXT 0x8DCB -#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC -#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD -#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE -#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF -#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 +# define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 +# define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 +# define GL_SAMPLER_BUFFER_EXT 0x8DC2 +# define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 +# define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 +# define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 +# define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 +# define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 +# define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 +# define GL_INT_SAMPLER_1D_EXT 0x8DC9 +# define GL_INT_SAMPLER_2D_EXT 0x8DCA +# define GL_INT_SAMPLER_3D_EXT 0x8DCB +# define GL_INT_SAMPLER_CUBE_EXT 0x8DCC +# define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD +# define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE +# define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF +# define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 +# define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 +# define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 +# define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 +# define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 +# define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 +# define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 +# define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 +# define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 #endif #ifndef GL_EXT_draw_instanced #endif #ifndef GL_EXT_packed_float -#define GL_R11F_G11F_B10F_EXT 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B -#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C +# define GL_R11F_G11F_B10F_EXT 0x8C3A +# define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B +# define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C #endif #ifndef GL_EXT_texture_array -#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 -#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D -#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF -#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E +# define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +# define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +# define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +# define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +# define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +# define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +# define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +# define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ #endif #ifndef GL_EXT_texture_buffer_object -#define GL_TEXTURE_BUFFER_EXT 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D -#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E +# define GL_TEXTURE_BUFFER_EXT 0x8C2A +# define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B +# define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C +# define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D +# define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E #endif #ifndef GL_EXT_texture_compression_latc -#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 -#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 -#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 -#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 +# define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 +# define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 +# define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 +# define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 #endif #ifndef GL_EXT_texture_compression_rgtc -#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB -#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC -#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD -#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE +# define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB +# define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC +# define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD +# define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE #endif #ifndef GL_EXT_texture_shared_exponent -#define GL_RGB9_E5_EXT 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E -#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F +# define GL_RGB9_E5_EXT 0x8C3D +# define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E +# define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F #endif #ifndef GL_NV_depth_buffer_float -#define GL_DEPTH_COMPONENT32F_NV 0x8DAB -#define GL_DEPTH32F_STENCIL8_NV 0x8DAC -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD -#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF +# define GL_DEPTH_COMPONENT32F_NV 0x8DAB +# define GL_DEPTH32F_STENCIL8_NV 0x8DAC +# define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD +# define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF #endif #ifndef GL_NV_fragment_program4 #endif #ifndef GL_NV_framebuffer_multisample_coverage -#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB -#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 -#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 -#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 +# define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB +# define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 +# define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 +# define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 #endif #ifndef GL_EXT_framebuffer_sRGB -#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 -#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA +# define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 +# define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA #endif #ifndef GL_NV_geometry_shader4 #endif #ifndef GL_NV_parameter_buffer_object -#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 -#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 -#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 -#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 -#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 +# define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 +# define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 +# define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 +# define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 +# define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 #endif #ifndef GL_EXT_draw_buffers2 #endif #ifndef GL_NV_transform_feedback -#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 -#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 -#define GL_TEXTURE_COORD_NV 0x8C79 -#define GL_CLIP_DISTANCE_NV 0x8C7A -#define GL_VERTEX_ID_NV 0x8C7B -#define GL_PRIMITIVE_ID_NV 0x8C7C -#define GL_GENERIC_ATTRIB_NV 0x8C7D -#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 -#define GL_ACTIVE_VARYINGS_NV 0x8C81 -#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 -#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 -#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 -#define GL_PRIMITIVES_GENERATED_NV 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 -#define GL_RASTERIZER_DISCARD_NV 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B -#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C -#define GL_SEPARATE_ATTRIBS_NV 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F -#define GL_LAYER_NV 0x8DAA -#define GL_NEXT_BUFFER_NV -2 -#define GL_SKIP_COMPONENTS4_NV -3 -#define GL_SKIP_COMPONENTS3_NV -4 -#define GL_SKIP_COMPONENTS2_NV -5 -#define GL_SKIP_COMPONENTS1_NV -6 +# define GL_BACK_PRIMARY_COLOR_NV 0x8C77 +# define GL_BACK_SECONDARY_COLOR_NV 0x8C78 +# define GL_TEXTURE_COORD_NV 0x8C79 +# define GL_CLIP_DISTANCE_NV 0x8C7A +# define GL_VERTEX_ID_NV 0x8C7B +# define GL_PRIMITIVE_ID_NV 0x8C7C +# define GL_GENERIC_ATTRIB_NV 0x8C7D +# define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E +# define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F +# define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 +# define GL_ACTIVE_VARYINGS_NV 0x8C81 +# define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 +# define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 +# define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 +# define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 +# define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 +# define GL_PRIMITIVES_GENERATED_NV 0x8C87 +# define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 +# define GL_RASTERIZER_DISCARD_NV 0x8C89 +# define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A +# define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B +# define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C +# define GL_SEPARATE_ATTRIBS_NV 0x8C8D +# define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E +# define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F +# define GL_LAYER_NV 0x8DAA +# define GL_NEXT_BUFFER_NV -2 +# define GL_SKIP_COMPONENTS4_NV -3 +# define GL_SKIP_COMPONENTS3_NV -4 +# define GL_SKIP_COMPONENTS2_NV -5 +# define GL_SKIP_COMPONENTS1_NV -6 #endif #ifndef GL_EXT_bindable_uniform -#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 -#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 -#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 -#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED -#define GL_UNIFORM_BUFFER_EXT 0x8DEE -#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF +# define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 +# define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 +# define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 +# define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED +# define GL_UNIFORM_BUFFER_EXT 0x8DEE +# define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF #endif #ifndef GL_EXT_texture_integer -#define GL_RGBA32UI_EXT 0x8D70 -#define GL_RGB32UI_EXT 0x8D71 -#define GL_ALPHA32UI_EXT 0x8D72 -#define GL_INTENSITY32UI_EXT 0x8D73 -#define GL_LUMINANCE32UI_EXT 0x8D74 -#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 -#define GL_RGBA16UI_EXT 0x8D76 -#define GL_RGB16UI_EXT 0x8D77 -#define GL_ALPHA16UI_EXT 0x8D78 -#define GL_INTENSITY16UI_EXT 0x8D79 -#define GL_LUMINANCE16UI_EXT 0x8D7A -#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B -#define GL_RGBA8UI_EXT 0x8D7C -#define GL_RGB8UI_EXT 0x8D7D -#define GL_ALPHA8UI_EXT 0x8D7E -#define GL_INTENSITY8UI_EXT 0x8D7F -#define GL_LUMINANCE8UI_EXT 0x8D80 -#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 -#define GL_RGBA32I_EXT 0x8D82 -#define GL_RGB32I_EXT 0x8D83 -#define GL_ALPHA32I_EXT 0x8D84 -#define GL_INTENSITY32I_EXT 0x8D85 -#define GL_LUMINANCE32I_EXT 0x8D86 -#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 -#define GL_RGBA16I_EXT 0x8D88 -#define GL_RGB16I_EXT 0x8D89 -#define GL_ALPHA16I_EXT 0x8D8A -#define GL_INTENSITY16I_EXT 0x8D8B -#define GL_LUMINANCE16I_EXT 0x8D8C -#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D -#define GL_RGBA8I_EXT 0x8D8E -#define GL_RGB8I_EXT 0x8D8F -#define GL_ALPHA8I_EXT 0x8D90 -#define GL_INTENSITY8I_EXT 0x8D91 -#define GL_LUMINANCE8I_EXT 0x8D92 -#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 -#define GL_RED_INTEGER_EXT 0x8D94 -#define GL_GREEN_INTEGER_EXT 0x8D95 -#define GL_BLUE_INTEGER_EXT 0x8D96 -#define GL_ALPHA_INTEGER_EXT 0x8D97 -#define GL_RGB_INTEGER_EXT 0x8D98 -#define GL_RGBA_INTEGER_EXT 0x8D99 -#define GL_BGR_INTEGER_EXT 0x8D9A -#define GL_BGRA_INTEGER_EXT 0x8D9B -#define GL_LUMINANCE_INTEGER_EXT 0x8D9C -#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D -#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E +# define GL_RGBA32UI_EXT 0x8D70 +# define GL_RGB32UI_EXT 0x8D71 +# define GL_ALPHA32UI_EXT 0x8D72 +# define GL_INTENSITY32UI_EXT 0x8D73 +# define GL_LUMINANCE32UI_EXT 0x8D74 +# define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 +# define GL_RGBA16UI_EXT 0x8D76 +# define GL_RGB16UI_EXT 0x8D77 +# define GL_ALPHA16UI_EXT 0x8D78 +# define GL_INTENSITY16UI_EXT 0x8D79 +# define GL_LUMINANCE16UI_EXT 0x8D7A +# define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B +# define GL_RGBA8UI_EXT 0x8D7C +# define GL_RGB8UI_EXT 0x8D7D +# define GL_ALPHA8UI_EXT 0x8D7E +# define GL_INTENSITY8UI_EXT 0x8D7F +# define GL_LUMINANCE8UI_EXT 0x8D80 +# define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 +# define GL_RGBA32I_EXT 0x8D82 +# define GL_RGB32I_EXT 0x8D83 +# define GL_ALPHA32I_EXT 0x8D84 +# define GL_INTENSITY32I_EXT 0x8D85 +# define GL_LUMINANCE32I_EXT 0x8D86 +# define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 +# define GL_RGBA16I_EXT 0x8D88 +# define GL_RGB16I_EXT 0x8D89 +# define GL_ALPHA16I_EXT 0x8D8A +# define GL_INTENSITY16I_EXT 0x8D8B +# define GL_LUMINANCE16I_EXT 0x8D8C +# define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D +# define GL_RGBA8I_EXT 0x8D8E +# define GL_RGB8I_EXT 0x8D8F +# define GL_ALPHA8I_EXT 0x8D90 +# define GL_INTENSITY8I_EXT 0x8D91 +# define GL_LUMINANCE8I_EXT 0x8D92 +# define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 +# define GL_RED_INTEGER_EXT 0x8D94 +# define GL_GREEN_INTEGER_EXT 0x8D95 +# define GL_BLUE_INTEGER_EXT 0x8D96 +# define GL_ALPHA_INTEGER_EXT 0x8D97 +# define GL_RGB_INTEGER_EXT 0x8D98 +# define GL_RGBA_INTEGER_EXT 0x8D99 +# define GL_BGR_INTEGER_EXT 0x8D9A +# define GL_BGRA_INTEGER_EXT 0x8D9B +# define GL_LUMINANCE_INTEGER_EXT 0x8D9C +# define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D +# define GL_RGBA_INTEGER_MODE_EXT 0x8D9E #endif #ifndef GL_GREMEDY_frame_terminator #endif #ifndef GL_NV_conditional_render -#define GL_QUERY_WAIT_NV 0x8E13 -#define GL_QUERY_NO_WAIT_NV 0x8E14 -#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +# define GL_QUERY_WAIT_NV 0x8E13 +# define GL_QUERY_NO_WAIT_NV 0x8E14 +# define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +# define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 #endif #ifndef GL_NV_present_video -#define GL_FRAME_NV 0x8E26 -#define GL_FIELDS_NV 0x8E27 -#define GL_CURRENT_TIME_NV 0x8E28 -#define GL_NUM_FILL_STREAMS_NV 0x8E29 -#define GL_PRESENT_TIME_NV 0x8E2A -#define GL_PRESENT_DURATION_NV 0x8E2B +# define GL_FRAME_NV 0x8E26 +# define GL_FIELDS_NV 0x8E27 +# define GL_CURRENT_TIME_NV 0x8E28 +# define GL_NUM_FILL_STREAMS_NV 0x8E29 +# define GL_PRESENT_TIME_NV 0x8E2A +# define GL_PRESENT_DURATION_NV 0x8E2B #endif #ifndef GL_EXT_transform_feedback -#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F -#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C -#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D -#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 -#define GL_RASTERIZER_DISCARD_EXT 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 +# define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E +# define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 +# define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 +# define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F +# define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C +# define GL_SEPARATE_ATTRIBS_EXT 0x8C8D +# define GL_PRIMITIVES_GENERATED_EXT 0x8C87 +# define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 +# define GL_RASTERIZER_DISCARD_EXT 0x8C89 +# define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A +# define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B +# define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 +# define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 +# define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F +# define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 #endif #ifndef GL_EXT_direct_state_access -#define GL_PROGRAM_MATRIX_EXT 0x8E2D -#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E -#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F +# define GL_PROGRAM_MATRIX_EXT 0x8E2D +# define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E +# define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F #endif #ifndef GL_EXT_vertex_array_bgra @@ -5506,82 +5506,82 @@ extern "C" { #endif #ifndef GL_EXT_texture_swizzle -#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 -#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 -#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 -#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 -#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 +# define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 +# define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 +# define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 +# define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 +# define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 #endif #ifndef GL_NV_explicit_multisample -#define GL_SAMPLE_POSITION_NV 0x8E50 -#define GL_SAMPLE_MASK_NV 0x8E51 -#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 -#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 -#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 -#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 -#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 -#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 -#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 -#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 +# define GL_SAMPLE_POSITION_NV 0x8E50 +# define GL_SAMPLE_MASK_NV 0x8E51 +# define GL_SAMPLE_MASK_VALUE_NV 0x8E52 +# define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 +# define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 +# define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 +# define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 +# define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 +# define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 +# define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 #endif #ifndef GL_NV_transform_feedback2 -#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 +# define GL_TRANSFORM_FEEDBACK_NV 0x8E22 +# define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 +# define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 +# define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 #endif #ifndef GL_ATI_meminfo -#define GL_VBO_FREE_MEMORY_ATI 0x87FB -#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC -#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD +# define GL_VBO_FREE_MEMORY_ATI 0x87FB +# define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC +# define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD #endif #ifndef GL_AMD_performance_monitor -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFMON_RESULT_AMD 0x8BC6 +# define GL_COUNTER_TYPE_AMD 0x8BC0 +# define GL_COUNTER_RANGE_AMD 0x8BC1 +# define GL_UNSIGNED_INT64_AMD 0x8BC2 +# define GL_PERCENTAGE_AMD 0x8BC3 +# define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +# define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +# define GL_PERFMON_RESULT_AMD 0x8BC6 #endif #ifndef GL_AMD_texture_texture4 #endif #ifndef GL_AMD_vertex_shader_tesselator -#define GL_SAMPLER_BUFFER_AMD 0x9001 -#define GL_INT_SAMPLER_BUFFER_AMD 0x9002 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 -#define GL_TESSELLATION_MODE_AMD 0x9004 -#define GL_TESSELLATION_FACTOR_AMD 0x9005 -#define GL_DISCRETE_AMD 0x9006 -#define GL_CONTINUOUS_AMD 0x9007 +# define GL_SAMPLER_BUFFER_AMD 0x9001 +# define GL_INT_SAMPLER_BUFFER_AMD 0x9002 +# define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 +# define GL_TESSELLATION_MODE_AMD 0x9004 +# define GL_TESSELLATION_FACTOR_AMD 0x9005 +# define GL_DISCRETE_AMD 0x9006 +# define GL_CONTINUOUS_AMD 0x9007 #endif #ifndef GL_EXT_provoking_vertex -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C -#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D -#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E -#define GL_PROVOKING_VERTEX_EXT 0x8E4F +# define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C +# define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D +# define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E +# define GL_PROVOKING_VERTEX_EXT 0x8E4F #endif #ifndef GL_EXT_texture_snorm -#define GL_ALPHA_SNORM 0x9010 -#define GL_LUMINANCE_SNORM 0x9011 -#define GL_LUMINANCE_ALPHA_SNORM 0x9012 -#define GL_INTENSITY_SNORM 0x9013 -#define GL_ALPHA8_SNORM 0x9014 -#define GL_LUMINANCE8_SNORM 0x9015 -#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 -#define GL_INTENSITY8_SNORM 0x9017 -#define GL_ALPHA16_SNORM 0x9018 -#define GL_LUMINANCE16_SNORM 0x9019 -#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A -#define GL_INTENSITY16_SNORM 0x901B +# define GL_ALPHA_SNORM 0x9010 +# define GL_LUMINANCE_SNORM 0x9011 +# define GL_LUMINANCE_ALPHA_SNORM 0x9012 +# define GL_INTENSITY_SNORM 0x9013 +# define GL_ALPHA8_SNORM 0x9014 +# define GL_LUMINANCE8_SNORM 0x9015 +# define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 +# define GL_INTENSITY8_SNORM 0x9017 +# define GL_ALPHA16_SNORM 0x9018 +# define GL_LUMINANCE16_SNORM 0x9019 +# define GL_LUMINANCE16_ALPHA16_SNORM 0x901A +# define GL_INTENSITY16_SNORM 0x901B /* reuse GL_RED_SNORM */ /* reuse GL_RG_SNORM */ /* reuse GL_RGB_SNORM */ @@ -5601,142 +5601,142 @@ extern "C" { #endif #ifndef GL_APPLE_texture_range -#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 -#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 -#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC -#define GL_STORAGE_PRIVATE_APPLE 0x85BD +# define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 +# define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 +# define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC +# define GL_STORAGE_PRIVATE_APPLE 0x85BD /* reuse GL_STORAGE_CACHED_APPLE */ /* reuse GL_STORAGE_SHARED_APPLE */ #endif #ifndef GL_APPLE_float_pixels -#define GL_HALF_APPLE 0x140B -#define GL_RGBA_FLOAT32_APPLE 0x8814 -#define GL_RGB_FLOAT32_APPLE 0x8815 -#define GL_ALPHA_FLOAT32_APPLE 0x8816 -#define GL_INTENSITY_FLOAT32_APPLE 0x8817 -#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 -#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 -#define GL_RGBA_FLOAT16_APPLE 0x881A -#define GL_RGB_FLOAT16_APPLE 0x881B -#define GL_ALPHA_FLOAT16_APPLE 0x881C -#define GL_INTENSITY_FLOAT16_APPLE 0x881D -#define GL_LUMINANCE_FLOAT16_APPLE 0x881E -#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F -#define GL_COLOR_FLOAT_APPLE 0x8A0F +# define GL_HALF_APPLE 0x140B +# define GL_RGBA_FLOAT32_APPLE 0x8814 +# define GL_RGB_FLOAT32_APPLE 0x8815 +# define GL_ALPHA_FLOAT32_APPLE 0x8816 +# define GL_INTENSITY_FLOAT32_APPLE 0x8817 +# define GL_LUMINANCE_FLOAT32_APPLE 0x8818 +# define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 +# define GL_RGBA_FLOAT16_APPLE 0x881A +# define GL_RGB_FLOAT16_APPLE 0x881B +# define GL_ALPHA_FLOAT16_APPLE 0x881C +# define GL_INTENSITY_FLOAT16_APPLE 0x881D +# define GL_LUMINANCE_FLOAT16_APPLE 0x881E +# define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F +# define GL_COLOR_FLOAT_APPLE 0x8A0F #endif #ifndef GL_APPLE_vertex_program_evaluators -#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 -#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 -#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 -#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 -#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 -#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 -#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 -#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 -#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 -#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 +# define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 +# define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 +# define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 +# define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 +# define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 +# define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 +# define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 +# define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 +# define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 +# define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 #endif #ifndef GL_APPLE_aux_depth_stencil -#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 +# define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 #endif #ifndef GL_APPLE_object_purgeable -#define GL_BUFFER_OBJECT_APPLE 0x85B3 -#define GL_RELEASED_APPLE 0x8A19 -#define GL_VOLATILE_APPLE 0x8A1A -#define GL_RETAINED_APPLE 0x8A1B -#define GL_UNDEFINED_APPLE 0x8A1C -#define GL_PURGEABLE_APPLE 0x8A1D +# define GL_BUFFER_OBJECT_APPLE 0x85B3 +# define GL_RELEASED_APPLE 0x8A19 +# define GL_VOLATILE_APPLE 0x8A1A +# define GL_RETAINED_APPLE 0x8A1B +# define GL_UNDEFINED_APPLE 0x8A1C +# define GL_PURGEABLE_APPLE 0x8A1D #endif #ifndef GL_APPLE_row_bytes -#define GL_PACK_ROW_BYTES_APPLE 0x8A15 -#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 +# define GL_PACK_ROW_BYTES_APPLE 0x8A15 +# define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 #endif #ifndef GL_APPLE_rgb_422 -#define GL_RGB_422_APPLE 0x8A1F +# define GL_RGB_422_APPLE 0x8A1F /* reuse GL_UNSIGNED_SHORT_8_8_APPLE */ /* reuse GL_UNSIGNED_SHORT_8_8_REV_APPLE */ #endif #ifndef GL_NV_video_capture -#define GL_VIDEO_BUFFER_NV 0x9020 -#define GL_VIDEO_BUFFER_BINDING_NV 0x9021 -#define GL_FIELD_UPPER_NV 0x9022 -#define GL_FIELD_LOWER_NV 0x9023 -#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 -#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 -#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 -#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 -#define GL_VIDEO_BUFFER_PITCH_NV 0x9028 -#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 -#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A -#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B -#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C -#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D -#define GL_PARTIAL_SUCCESS_NV 0x902E -#define GL_SUCCESS_NV 0x902F -#define GL_FAILURE_NV 0x9030 -#define GL_YCBYCR8_422_NV 0x9031 -#define GL_YCBAYCR8A_4224_NV 0x9032 -#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 -#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 -#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 -#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 -#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 -#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 -#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 -#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A -#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B -#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C +# define GL_VIDEO_BUFFER_NV 0x9020 +# define GL_VIDEO_BUFFER_BINDING_NV 0x9021 +# define GL_FIELD_UPPER_NV 0x9022 +# define GL_FIELD_LOWER_NV 0x9023 +# define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 +# define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 +# define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 +# define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 +# define GL_VIDEO_BUFFER_PITCH_NV 0x9028 +# define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 +# define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A +# define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B +# define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C +# define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D +# define GL_PARTIAL_SUCCESS_NV 0x902E +# define GL_SUCCESS_NV 0x902F +# define GL_FAILURE_NV 0x9030 +# define GL_YCBYCR8_422_NV 0x9031 +# define GL_YCBAYCR8A_4224_NV 0x9032 +# define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 +# define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 +# define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 +# define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 +# define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 +# define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 +# define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 +# define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A +# define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B +# define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C #endif #ifndef GL_NV_copy_image #endif #ifndef GL_EXT_separate_shader_objects -#define GL_ACTIVE_PROGRAM_EXT 0x8B8D +# define GL_ACTIVE_PROGRAM_EXT 0x8B8D #endif #ifndef GL_NV_parameter_buffer_object2 #endif #ifndef GL_NV_shader_buffer_load -#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D -#define GL_GPU_ADDRESS_NV 0x8F34 -#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 +# define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D +# define GL_GPU_ADDRESS_NV 0x8F34 +# define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 #endif #ifndef GL_NV_vertex_buffer_unified_memory -#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E -#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F -#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 -#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 -#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 -#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 -#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 -#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 -#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 -#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 -#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 -#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 -#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A -#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B -#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C -#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D -#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E -#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F -#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 -#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 -#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 -#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 -#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 -#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 -#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 +# define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E +# define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F +# define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 +# define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 +# define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 +# define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 +# define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 +# define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 +# define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 +# define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 +# define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 +# define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 +# define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A +# define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B +# define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C +# define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D +# define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E +# define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F +# define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 +# define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 +# define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 +# define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 +# define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 +# define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 +# define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 #endif #ifndef GL_NV_texture_barrier @@ -5753,134 +5753,134 @@ extern "C" { #endif #ifndef GL_EXT_shader_image_load_store -#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 -#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A -#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B -#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C -#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D -#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E -#define GL_IMAGE_1D_EXT 0x904C -#define GL_IMAGE_2D_EXT 0x904D -#define GL_IMAGE_3D_EXT 0x904E -#define GL_IMAGE_2D_RECT_EXT 0x904F -#define GL_IMAGE_CUBE_EXT 0x9050 -#define GL_IMAGE_BUFFER_EXT 0x9051 -#define GL_IMAGE_1D_ARRAY_EXT 0x9052 -#define GL_IMAGE_2D_ARRAY_EXT 0x9053 -#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 -#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 -#define GL_INT_IMAGE_1D_EXT 0x9057 -#define GL_INT_IMAGE_2D_EXT 0x9058 -#define GL_INT_IMAGE_3D_EXT 0x9059 -#define GL_INT_IMAGE_2D_RECT_EXT 0x905A -#define GL_INT_IMAGE_CUBE_EXT 0x905B -#define GL_INT_IMAGE_BUFFER_EXT 0x905C -#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D -#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E -#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F -#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 -#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 -#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 -#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 -#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C -#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D -#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 -#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 -#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF +# define GL_MAX_IMAGE_UNITS_EXT 0x8F38 +# define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 +# define GL_IMAGE_BINDING_NAME_EXT 0x8F3A +# define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B +# define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C +# define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D +# define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E +# define GL_IMAGE_1D_EXT 0x904C +# define GL_IMAGE_2D_EXT 0x904D +# define GL_IMAGE_3D_EXT 0x904E +# define GL_IMAGE_2D_RECT_EXT 0x904F +# define GL_IMAGE_CUBE_EXT 0x9050 +# define GL_IMAGE_BUFFER_EXT 0x9051 +# define GL_IMAGE_1D_ARRAY_EXT 0x9052 +# define GL_IMAGE_2D_ARRAY_EXT 0x9053 +# define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 +# define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 +# define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 +# define GL_INT_IMAGE_1D_EXT 0x9057 +# define GL_INT_IMAGE_2D_EXT 0x9058 +# define GL_INT_IMAGE_3D_EXT 0x9059 +# define GL_INT_IMAGE_2D_RECT_EXT 0x905A +# define GL_INT_IMAGE_CUBE_EXT 0x905B +# define GL_INT_IMAGE_BUFFER_EXT 0x905C +# define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D +# define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E +# define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F +# define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 +# define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 +# define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 +# define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 +# define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 +# define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 +# define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 +# define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 +# define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 +# define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 +# define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A +# define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B +# define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C +# define GL_MAX_IMAGE_SAMPLES_EXT 0x906D +# define GL_IMAGE_BINDING_FORMAT_EXT 0x906E +# define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 +# define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 +# define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 +# define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 +# define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 +# define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 +# define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 +# define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 +# define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 +# define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 +# define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 +# define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 +# define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF #endif #ifndef GL_EXT_vertex_attrib_64bit /* reuse GL_DOUBLE */ -#define GL_DOUBLE_VEC2_EXT 0x8FFC -#define GL_DOUBLE_VEC3_EXT 0x8FFD -#define GL_DOUBLE_VEC4_EXT 0x8FFE -#define GL_DOUBLE_MAT2_EXT 0x8F46 -#define GL_DOUBLE_MAT3_EXT 0x8F47 -#define GL_DOUBLE_MAT4_EXT 0x8F48 -#define GL_DOUBLE_MAT2x3_EXT 0x8F49 -#define GL_DOUBLE_MAT2x4_EXT 0x8F4A -#define GL_DOUBLE_MAT3x2_EXT 0x8F4B -#define GL_DOUBLE_MAT3x4_EXT 0x8F4C -#define GL_DOUBLE_MAT4x2_EXT 0x8F4D -#define GL_DOUBLE_MAT4x3_EXT 0x8F4E +# define GL_DOUBLE_VEC2_EXT 0x8FFC +# define GL_DOUBLE_VEC3_EXT 0x8FFD +# define GL_DOUBLE_VEC4_EXT 0x8FFE +# define GL_DOUBLE_MAT2_EXT 0x8F46 +# define GL_DOUBLE_MAT3_EXT 0x8F47 +# define GL_DOUBLE_MAT4_EXT 0x8F48 +# define GL_DOUBLE_MAT2x3_EXT 0x8F49 +# define GL_DOUBLE_MAT2x4_EXT 0x8F4A +# define GL_DOUBLE_MAT3x2_EXT 0x8F4B +# define GL_DOUBLE_MAT3x4_EXT 0x8F4C +# define GL_DOUBLE_MAT4x2_EXT 0x8F4D +# define GL_DOUBLE_MAT4x3_EXT 0x8F4E #endif #ifndef GL_NV_gpu_program5 -#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C -#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F -#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 -#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 +# define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A +# define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B +# define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C +# define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D +# define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E +# define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F +# define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 +# define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 #endif #ifndef GL_NV_gpu_shader5 -#define GL_INT64_NV 0x140E -#define GL_UNSIGNED_INT64_NV 0x140F -#define GL_INT8_NV 0x8FE0 -#define GL_INT8_VEC2_NV 0x8FE1 -#define GL_INT8_VEC3_NV 0x8FE2 -#define GL_INT8_VEC4_NV 0x8FE3 -#define GL_INT16_NV 0x8FE4 -#define GL_INT16_VEC2_NV 0x8FE5 -#define GL_INT16_VEC3_NV 0x8FE6 -#define GL_INT16_VEC4_NV 0x8FE7 -#define GL_INT64_VEC2_NV 0x8FE9 -#define GL_INT64_VEC3_NV 0x8FEA -#define GL_INT64_VEC4_NV 0x8FEB -#define GL_UNSIGNED_INT8_NV 0x8FEC -#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED -#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE -#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF -#define GL_UNSIGNED_INT16_NV 0x8FF0 -#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 -#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 -#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 -#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 -#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 -#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 -#define GL_FLOAT16_NV 0x8FF8 -#define GL_FLOAT16_VEC2_NV 0x8FF9 -#define GL_FLOAT16_VEC3_NV 0x8FFA -#define GL_FLOAT16_VEC4_NV 0x8FFB +# define GL_INT64_NV 0x140E +# define GL_UNSIGNED_INT64_NV 0x140F +# define GL_INT8_NV 0x8FE0 +# define GL_INT8_VEC2_NV 0x8FE1 +# define GL_INT8_VEC3_NV 0x8FE2 +# define GL_INT8_VEC4_NV 0x8FE3 +# define GL_INT16_NV 0x8FE4 +# define GL_INT16_VEC2_NV 0x8FE5 +# define GL_INT16_VEC3_NV 0x8FE6 +# define GL_INT16_VEC4_NV 0x8FE7 +# define GL_INT64_VEC2_NV 0x8FE9 +# define GL_INT64_VEC3_NV 0x8FEA +# define GL_INT64_VEC4_NV 0x8FEB +# define GL_UNSIGNED_INT8_NV 0x8FEC +# define GL_UNSIGNED_INT8_VEC2_NV 0x8FED +# define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE +# define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF +# define GL_UNSIGNED_INT16_NV 0x8FF0 +# define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 +# define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 +# define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 +# define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 +# define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 +# define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 +# define GL_FLOAT16_NV 0x8FF8 +# define GL_FLOAT16_VEC2_NV 0x8FF9 +# define GL_FLOAT16_VEC3_NV 0x8FFA +# define GL_FLOAT16_VEC4_NV 0x8FFB /* reuse GL_PATCHES */ #endif #ifndef GL_NV_shader_buffer_store -#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 +# define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 /* reuse GL_READ_WRITE */ /* reuse GL_WRITE_ONLY */ #endif #ifndef GL_NV_tessellation_program5 -#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 -#define GL_TESS_CONTROL_PROGRAM_NV 0x891E -#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F -#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 -#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 +# define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 +# define GL_TESS_CONTROL_PROGRAM_NV 0x891E +# define GL_TESS_EVALUATION_PROGRAM_NV 0x891F +# define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 +# define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 #endif #ifndef GL_NV_vertex_attrib_integer_64bit @@ -5889,229 +5889,229 @@ extern "C" { #endif #ifndef GL_NV_multisample_coverage -#define GL_COVERAGE_SAMPLES_NV 0x80A9 -#define GL_COLOR_SAMPLES_NV 0x8E20 +# define GL_COVERAGE_SAMPLES_NV 0x80A9 +# define GL_COLOR_SAMPLES_NV 0x8E20 #endif #ifndef GL_AMD_name_gen_delete -#define GL_DATA_BUFFER_AMD 0x9151 -#define GL_PERFORMANCE_MONITOR_AMD 0x9152 -#define GL_QUERY_OBJECT_AMD 0x9153 -#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 -#define GL_SAMPLER_OBJECT_AMD 0x9155 +# define GL_DATA_BUFFER_AMD 0x9151 +# define GL_PERFORMANCE_MONITOR_AMD 0x9152 +# define GL_QUERY_OBJECT_AMD 0x9153 +# define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 +# define GL_SAMPLER_OBJECT_AMD 0x9155 #endif #ifndef GL_AMD_debug_output -#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 -#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 -#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 -#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A -#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B -#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C -#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D -#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E -#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F -#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 +# define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143 +# define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 +# define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 +# define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 +# define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 +# define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 +# define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 +# define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A +# define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B +# define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C +# define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D +# define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E +# define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F +# define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 #endif #ifndef GL_NV_vdpau_interop -#define GL_SURFACE_STATE_NV 0x86EB -#define GL_SURFACE_REGISTERED_NV 0x86FD -#define GL_SURFACE_MAPPED_NV 0x8700 -#define GL_WRITE_DISCARD_NV 0x88BE +# define GL_SURFACE_STATE_NV 0x86EB +# define GL_SURFACE_REGISTERED_NV 0x86FD +# define GL_SURFACE_MAPPED_NV 0x8700 +# define GL_WRITE_DISCARD_NV 0x88BE #endif #ifndef GL_AMD_transform_feedback3_lines_triangles #endif #ifndef GL_AMD_depth_clamp_separate -#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E -#define GL_DEPTH_CLAMP_FAR_AMD 0x901F +# define GL_DEPTH_CLAMP_NEAR_AMD 0x901E +# define GL_DEPTH_CLAMP_FAR_AMD 0x901F #endif #ifndef GL_EXT_texture_sRGB_decode -#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 -#define GL_DECODE_EXT 0x8A49 -#define GL_SKIP_DECODE_EXT 0x8A4A +# define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 +# define GL_DECODE_EXT 0x8A49 +# define GL_SKIP_DECODE_EXT 0x8A4A #endif #ifndef GL_NV_texture_multisample -#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 -#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 +# define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 +# define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 #endif #ifndef GL_AMD_blend_minmax_factor -#define GL_FACTOR_MIN_AMD 0x901C -#define GL_FACTOR_MAX_AMD 0x901D +# define GL_FACTOR_MIN_AMD 0x901C +# define GL_FACTOR_MAX_AMD 0x901D #endif #ifndef GL_AMD_sample_positions -#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F +# define GL_SUBSAMPLE_DISTANCE_AMD 0x883F #endif #ifndef GL_EXT_x11_sync_object -#define GL_SYNC_X11_FENCE_EXT 0x90E1 +# define GL_SYNC_X11_FENCE_EXT 0x90E1 #endif #ifndef GL_AMD_multi_draw_indirect #endif #ifndef GL_EXT_framebuffer_multisample_blit_scaled -#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA -#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB +# define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA +# define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB #endif #ifndef GL_NV_path_rendering -#define GL_PATH_FORMAT_SVG_NV 0x9070 -#define GL_PATH_FORMAT_PS_NV 0x9071 -#define GL_STANDARD_FONT_NAME_NV 0x9072 -#define GL_SYSTEM_FONT_NAME_NV 0x9073 -#define GL_FILE_NAME_NV 0x9074 -#define GL_PATH_STROKE_WIDTH_NV 0x9075 -#define GL_PATH_END_CAPS_NV 0x9076 -#define GL_PATH_INITIAL_END_CAP_NV 0x9077 -#define GL_PATH_TERMINAL_END_CAP_NV 0x9078 -#define GL_PATH_JOIN_STYLE_NV 0x9079 -#define GL_PATH_MITER_LIMIT_NV 0x907A -#define GL_PATH_DASH_CAPS_NV 0x907B -#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C -#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D -#define GL_PATH_DASH_OFFSET_NV 0x907E -#define GL_PATH_CLIENT_LENGTH_NV 0x907F -#define GL_PATH_FILL_MODE_NV 0x9080 -#define GL_PATH_FILL_MASK_NV 0x9081 -#define GL_PATH_FILL_COVER_MODE_NV 0x9082 -#define GL_PATH_STROKE_COVER_MODE_NV 0x9083 -#define GL_PATH_STROKE_MASK_NV 0x9084 -#define GL_PATH_SAMPLE_QUALITY_NV 0x9085 -#define GL_PATH_STROKE_BOUND_NV 0x9086 -#define GL_PATH_STROKE_OVERSAMPLE_COUNT_NV 0x9087 -#define GL_COUNT_UP_NV 0x9088 -#define GL_COUNT_DOWN_NV 0x9089 -#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A -#define GL_CONVEX_HULL_NV 0x908B -#define GL_MULTI_HULLS_NV 0x908C -#define GL_BOUNDING_BOX_NV 0x908D -#define GL_TRANSLATE_X_NV 0x908E -#define GL_TRANSLATE_Y_NV 0x908F -#define GL_TRANSLATE_2D_NV 0x9090 -#define GL_TRANSLATE_3D_NV 0x9091 -#define GL_AFFINE_2D_NV 0x9092 -#define GL_PROJECTIVE_2D_NV 0x9093 -#define GL_AFFINE_3D_NV 0x9094 -#define GL_PROJECTIVE_3D_NV 0x9095 -#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 -#define GL_TRANSPOSE_PROJECTIVE_2D_NV 0x9097 -#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 -#define GL_TRANSPOSE_PROJECTIVE_3D_NV 0x9099 -#define GL_UTF8_NV 0x909A -#define GL_UTF16_NV 0x909B -#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C -#define GL_PATH_COMMAND_COUNT_NV 0x909D -#define GL_PATH_COORD_COUNT_NV 0x909E -#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F -#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 -#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 -#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 -#define GL_SQUARE_NV 0x90A3 -#define GL_ROUND_NV 0x90A4 -#define GL_TRIANGULAR_NV 0x90A5 -#define GL_BEVEL_NV 0x90A6 -#define GL_MITER_REVERT_NV 0x90A7 -#define GL_MITER_TRUNCATE_NV 0x90A8 -#define GL_SKIP_MISSING_GLYPH_NV 0x90A9 -#define GL_USE_MISSING_GLYPH_NV 0x90AA -#define GL_PATH_ERROR_POSITION_NV 0x90AB -#define GL_PATH_FOG_GEN_MODE_NV 0x90AC -#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD -#define GL_ADJACENT_PAIRS_NV 0x90AE -#define GL_FIRST_TO_REST_NV 0x90AF -#define GL_PATH_GEN_MODE_NV 0x90B0 -#define GL_PATH_GEN_COEFF_NV 0x90B1 -#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2 -#define GL_PATH_GEN_COMPONENTS_NV 0x90B3 -#define GL_PATH_STENCIL_FUNC_NV 0x90B7 -#define GL_PATH_STENCIL_REF_NV 0x90B8 -#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 -#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD -#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE -#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF -#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 -#define GL_MOVE_TO_RESETS_NV 0x90B5 -#define GL_MOVE_TO_CONTINUES_NV 0x90B6 -#define GL_CLOSE_PATH_NV 0x00 -#define GL_MOVE_TO_NV 0x02 -#define GL_RELATIVE_MOVE_TO_NV 0x03 -#define GL_LINE_TO_NV 0x04 -#define GL_RELATIVE_LINE_TO_NV 0x05 -#define GL_HORIZONTAL_LINE_TO_NV 0x06 -#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 -#define GL_VERTICAL_LINE_TO_NV 0x08 -#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 -#define GL_QUADRATIC_CURVE_TO_NV 0x0A -#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B -#define GL_CUBIC_CURVE_TO_NV 0x0C -#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D -#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E -#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F -#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 -#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 -#define GL_SMALL_CCW_ARC_TO_NV 0x12 -#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 -#define GL_SMALL_CW_ARC_TO_NV 0x14 -#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 -#define GL_LARGE_CCW_ARC_TO_NV 0x16 -#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 -#define GL_LARGE_CW_ARC_TO_NV 0x18 -#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 -#define GL_RESTART_PATH_NV 0xF0 -#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 -#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 -#define GL_RECT_NV 0xF6 -#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 -#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA -#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC -#define GL_ARC_TO_NV 0xFE -#define GL_RELATIVE_ARC_TO_NV 0xFF -#define GL_BOLD_BIT_NV 0x01 -#define GL_ITALIC_BIT_NV 0x02 -#define GL_GLYPH_WIDTH_BIT_NV 0x01 -#define GL_GLYPH_HEIGHT_BIT_NV 0x02 -#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 -#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 -#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 -#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 -#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 -#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 -#define GL_GLYPH_HAS_KERNING_NV 0x100 -#define GL_FONT_X_MIN_BOUNDS_NV 0x00010000 -#define GL_FONT_Y_MIN_BOUNDS_NV 0x00020000 -#define GL_FONT_X_MAX_BOUNDS_NV 0x00040000 -#define GL_FONT_Y_MAX_BOUNDS_NV 0x00080000 -#define GL_FONT_UNITS_PER_EM_NV 0x00100000 -#define GL_FONT_ASCENDER_NV 0x00200000 -#define GL_FONT_DESCENDER_NV 0x00400000 -#define GL_FONT_HEIGHT_NV 0x00800000 -#define GL_FONT_MAX_ADVANCE_WIDTH_NV 0x01000000 -#define GL_FONT_MAX_ADVANCE_HEIGHT_NV 0x02000000 -#define GL_FONT_UNDERLINE_POSITION_NV 0x04000000 -#define GL_FONT_UNDERLINE_THICKNESS_NV 0x08000000 -#define GL_FONT_HAS_KERNING_NV 0x10000000 +# define GL_PATH_FORMAT_SVG_NV 0x9070 +# define GL_PATH_FORMAT_PS_NV 0x9071 +# define GL_STANDARD_FONT_NAME_NV 0x9072 +# define GL_SYSTEM_FONT_NAME_NV 0x9073 +# define GL_FILE_NAME_NV 0x9074 +# define GL_PATH_STROKE_WIDTH_NV 0x9075 +# define GL_PATH_END_CAPS_NV 0x9076 +# define GL_PATH_INITIAL_END_CAP_NV 0x9077 +# define GL_PATH_TERMINAL_END_CAP_NV 0x9078 +# define GL_PATH_JOIN_STYLE_NV 0x9079 +# define GL_PATH_MITER_LIMIT_NV 0x907A +# define GL_PATH_DASH_CAPS_NV 0x907B +# define GL_PATH_INITIAL_DASH_CAP_NV 0x907C +# define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D +# define GL_PATH_DASH_OFFSET_NV 0x907E +# define GL_PATH_CLIENT_LENGTH_NV 0x907F +# define GL_PATH_FILL_MODE_NV 0x9080 +# define GL_PATH_FILL_MASK_NV 0x9081 +# define GL_PATH_FILL_COVER_MODE_NV 0x9082 +# define GL_PATH_STROKE_COVER_MODE_NV 0x9083 +# define GL_PATH_STROKE_MASK_NV 0x9084 +# define GL_PATH_SAMPLE_QUALITY_NV 0x9085 +# define GL_PATH_STROKE_BOUND_NV 0x9086 +# define GL_PATH_STROKE_OVERSAMPLE_COUNT_NV 0x9087 +# define GL_COUNT_UP_NV 0x9088 +# define GL_COUNT_DOWN_NV 0x9089 +# define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A +# define GL_CONVEX_HULL_NV 0x908B +# define GL_MULTI_HULLS_NV 0x908C +# define GL_BOUNDING_BOX_NV 0x908D +# define GL_TRANSLATE_X_NV 0x908E +# define GL_TRANSLATE_Y_NV 0x908F +# define GL_TRANSLATE_2D_NV 0x9090 +# define GL_TRANSLATE_3D_NV 0x9091 +# define GL_AFFINE_2D_NV 0x9092 +# define GL_PROJECTIVE_2D_NV 0x9093 +# define GL_AFFINE_3D_NV 0x9094 +# define GL_PROJECTIVE_3D_NV 0x9095 +# define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 +# define GL_TRANSPOSE_PROJECTIVE_2D_NV 0x9097 +# define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 +# define GL_TRANSPOSE_PROJECTIVE_3D_NV 0x9099 +# define GL_UTF8_NV 0x909A +# define GL_UTF16_NV 0x909B +# define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C +# define GL_PATH_COMMAND_COUNT_NV 0x909D +# define GL_PATH_COORD_COUNT_NV 0x909E +# define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F +# define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 +# define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 +# define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 +# define GL_SQUARE_NV 0x90A3 +# define GL_ROUND_NV 0x90A4 +# define GL_TRIANGULAR_NV 0x90A5 +# define GL_BEVEL_NV 0x90A6 +# define GL_MITER_REVERT_NV 0x90A7 +# define GL_MITER_TRUNCATE_NV 0x90A8 +# define GL_SKIP_MISSING_GLYPH_NV 0x90A9 +# define GL_USE_MISSING_GLYPH_NV 0x90AA +# define GL_PATH_ERROR_POSITION_NV 0x90AB +# define GL_PATH_FOG_GEN_MODE_NV 0x90AC +# define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD +# define GL_ADJACENT_PAIRS_NV 0x90AE +# define GL_FIRST_TO_REST_NV 0x90AF +# define GL_PATH_GEN_MODE_NV 0x90B0 +# define GL_PATH_GEN_COEFF_NV 0x90B1 +# define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2 +# define GL_PATH_GEN_COMPONENTS_NV 0x90B3 +# define GL_PATH_STENCIL_FUNC_NV 0x90B7 +# define GL_PATH_STENCIL_REF_NV 0x90B8 +# define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 +# define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD +# define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE +# define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF +# define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 +# define GL_MOVE_TO_RESETS_NV 0x90B5 +# define GL_MOVE_TO_CONTINUES_NV 0x90B6 +# define GL_CLOSE_PATH_NV 0x00 +# define GL_MOVE_TO_NV 0x02 +# define GL_RELATIVE_MOVE_TO_NV 0x03 +# define GL_LINE_TO_NV 0x04 +# define GL_RELATIVE_LINE_TO_NV 0x05 +# define GL_HORIZONTAL_LINE_TO_NV 0x06 +# define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 +# define GL_VERTICAL_LINE_TO_NV 0x08 +# define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 +# define GL_QUADRATIC_CURVE_TO_NV 0x0A +# define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B +# define GL_CUBIC_CURVE_TO_NV 0x0C +# define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D +# define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E +# define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F +# define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 +# define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 +# define GL_SMALL_CCW_ARC_TO_NV 0x12 +# define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 +# define GL_SMALL_CW_ARC_TO_NV 0x14 +# define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 +# define GL_LARGE_CCW_ARC_TO_NV 0x16 +# define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 +# define GL_LARGE_CW_ARC_TO_NV 0x18 +# define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 +# define GL_RESTART_PATH_NV 0xF0 +# define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 +# define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 +# define GL_RECT_NV 0xF6 +# define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 +# define GL_CIRCULAR_CW_ARC_TO_NV 0xFA +# define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC +# define GL_ARC_TO_NV 0xFE +# define GL_RELATIVE_ARC_TO_NV 0xFF +# define GL_BOLD_BIT_NV 0x01 +# define GL_ITALIC_BIT_NV 0x02 +# define GL_GLYPH_WIDTH_BIT_NV 0x01 +# define GL_GLYPH_HEIGHT_BIT_NV 0x02 +# define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 +# define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 +# define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 +# define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 +# define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 +# define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 +# define GL_GLYPH_HAS_KERNING_NV 0x100 +# define GL_FONT_X_MIN_BOUNDS_NV 0x00010000 +# define GL_FONT_Y_MIN_BOUNDS_NV 0x00020000 +# define GL_FONT_X_MAX_BOUNDS_NV 0x00040000 +# define GL_FONT_Y_MAX_BOUNDS_NV 0x00080000 +# define GL_FONT_UNITS_PER_EM_NV 0x00100000 +# define GL_FONT_ASCENDER_NV 0x00200000 +# define GL_FONT_DESCENDER_NV 0x00400000 +# define GL_FONT_HEIGHT_NV 0x00800000 +# define GL_FONT_MAX_ADVANCE_WIDTH_NV 0x01000000 +# define GL_FONT_MAX_ADVANCE_HEIGHT_NV 0x02000000 +# define GL_FONT_UNDERLINE_POSITION_NV 0x04000000 +# define GL_FONT_UNDERLINE_THICKNESS_NV 0x08000000 +# define GL_FONT_HAS_KERNING_NV 0x10000000 #endif #ifndef GL_AMD_pinned_memory -#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 +# define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 #endif #ifndef GL_AMD_stencil_operation_extended -#define GL_SET_AMD 0x874A -#define GL_REPLACE_VALUE_AMD 0x874B -#define GL_STENCIL_OP_VALUE_AMD 0x874C -#define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D +# define GL_SET_AMD 0x874A +# define GL_REPLACE_VALUE_AMD 0x874B +# define GL_STENCIL_OP_VALUE_AMD 0x874C +# define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D #endif #ifndef GL_AMD_vertex_shader_viewport_index @@ -6127,24 +6127,23 @@ extern "C" { #endif #ifndef GL_AMD_query_buffer_object -#define GL_QUERY_BUFFER_AMD 0x9192 -#define GL_QUERY_BUFFER_BINDING_AMD 0x9193 -#define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194 +# define GL_QUERY_BUFFER_AMD 0x9192 +# define GL_QUERY_BUFFER_BINDING_AMD 0x9193 +# define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194 #endif #ifndef GL_AMD_sparse_texture -#define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195 -#define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196 -#define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197 -#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198 -#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199 -#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A -#define GL_MIN_SPARSE_LEVEL_AMD 0x919B -#define GL_MIN_LOD_WARNING_AMD 0x919C -#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001 +# define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195 +# define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196 +# define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197 +# define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198 +# define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199 +# define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A +# define GL_MIN_SPARSE_LEVEL_AMD 0x919B +# define GL_MIN_LOD_WARNING_AMD 0x919C +# define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001 #endif - /*************************************************************/ #include @@ -6167,7 +6166,7 @@ typedef ptrdiff_t GLsizeiptrARB; #ifndef GL_ARB_shader_objects /* GL types for program/shader text and shader object handles */ -typedef char GLcharARB; +typedef char GLcharARB; typedef unsigned int GLhandleARB; #endif @@ -6182,50 +6181,50 @@ typedef unsigned short GLhalfNV; #ifndef GLEXT_64_TYPES_DEFINED /* This code block is duplicated in glxext.h, so must be protected */ -#define GLEXT_64_TYPES_DEFINED +# define GLEXT_64_TYPES_DEFINED /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ /* (as used in the GL_EXT_timer_query extension). */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include -#elif defined(__sun__) || defined(__digital__) -#include -#if defined(__STDC__) -#if defined(__arch64__) || defined(_LP64) -typedef long int int64_t; +# if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L +# include +# elif defined( __sun__ ) || defined( __digital__ ) +# include +# if defined( __STDC__ ) +# if defined( __arch64__ ) || defined( _LP64 ) +typedef long int int64_t; typedef unsigned long int uint64_t; -#else -typedef long long int int64_t; +# else +typedef long long int int64_t; typedef unsigned long long int uint64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined( __VMS ) || defined(__sgi) -#include -#elif defined(__SCO__) || defined(__USLC__) -#include -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; +# endif /* __arch64__ */ +# endif /* __STDC__ */ +# elif defined( __VMS ) || defined( __sgi ) +# include +# elif defined( __SCO__ ) || defined( __USLC__ ) +# include +# elif defined( __UNIXOS2__ ) || defined( __SOL64__ ) +typedef long int int32_t; +typedef long long int int64_t; typedef unsigned long long int uint64_t; -#elif defined(_WIN32) && defined(__GNUC__) -#include -#elif defined(_WIN32) -typedef __int32 int32_t; -typedef __int64 int64_t; +# elif defined( _WIN32 ) && defined( __GNUC__ ) +# include +# elif defined( _WIN32 ) +typedef __int32 int32_t; +typedef __int64 int64_t; typedef unsigned __int64 uint64_t; -#else +# else /* Fallback if nothing above works */ -#include -#endif +# include +# endif #endif #ifndef GL_EXT_timer_query -typedef int64_t GLint64EXT; +typedef int64_t GLint64EXT; typedef uint64_t GLuint64EXT; #endif #ifndef GL_ARB_sync -typedef int64_t GLint64; -typedef uint64_t GLuint64; +typedef int64_t GLint64; +typedef uint64_t GLuint64; typedef struct __GLsync *GLsync; #endif @@ -6236,15 +6235,18 @@ struct _cl_event; #endif #ifndef GL_ARB_debug_output -typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +typedef void( APIENTRY *GLDEBUGPROCARB )( GLenum source, GLenum type, GLuint id, GLenum severity, + GLsizei length, const GLchar *message, GLvoid *userParam ); #endif #ifndef GL_AMD_debug_output -typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +typedef void( APIENTRY *GLDEBUGPROCAMD )( GLuint id, GLenum category, GLenum severity, GLsizei length, + const GLchar *message, GLvoid *userParam ); #endif #ifndef GL_KHR_debug -typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +typedef void( APIENTRY *GLDEBUGPROC )( GLenum source, GLenum type, GLuint id, GLenum severity, + GLsizei length, const GLchar *message, GLvoid *userParam ); #endif #ifndef GL_NV_vdpau_interop @@ -6252,697 +6254,871 @@ typedef GLintptr GLvdpauSurfaceNV; #endif #ifndef GL_VERSION_1_2 -#define GL_VERSION_1_2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GLAPI void APIENTRY glBlendEquation (GLenum mode); -GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table); -GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params); -GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params); -GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image); -GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glResetHistogram (GLenum target); -GLAPI void APIENTRY glResetMinmax (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); +# define GL_VERSION_1_2 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendColor( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); +GLAPI void APIENTRY glBlendEquation( GLenum mode ); +GLAPI void APIENTRY glDrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, + GLenum type, const GLvoid *indices ); +GLAPI void APIENTRY glTexImage3D( GLenum target, GLint level, GLint internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, GLenum format, + GLenum type, const GLvoid *pixels ); +GLAPI void APIENTRY glTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, const GLvoid *pixels ); +GLAPI void APIENTRY glCopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, GLint y, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glColorTable( GLenum target, GLenum internalformat, GLsizei width, GLenum format, + GLenum type, const GLvoid *table ); +GLAPI void APIENTRY glColorTableParameterfv( GLenum target, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glColorTableParameteriv( GLenum target, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glCopyColorTable( GLenum target, GLenum internalformat, GLint x, GLint y, + GLsizei width ); +GLAPI void APIENTRY glGetColorTable( GLenum target, GLenum format, GLenum type, GLvoid *table ); +GLAPI void APIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glColorSubTable( GLenum target, GLsizei start, GLsizei count, GLenum format, + GLenum type, const GLvoid *data ); +GLAPI void APIENTRY glCopyColorSubTable( GLenum target, GLsizei start, GLint x, GLint y, GLsizei width ); +GLAPI void APIENTRY glConvolutionFilter1D( GLenum target, GLenum internalformat, GLsizei width, + GLenum format, GLenum type, const GLvoid *image ); +GLAPI void APIENTRY glConvolutionFilter2D( GLenum target, GLenum internalformat, GLsizei width, + GLsizei height, GLenum format, GLenum type, + const GLvoid *image ); +GLAPI void APIENTRY glConvolutionParameterf( GLenum target, GLenum pname, GLfloat params ); +GLAPI void APIENTRY glConvolutionParameterfv( GLenum target, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glConvolutionParameteri( GLenum target, GLenum pname, GLint params ); +GLAPI void APIENTRY glConvolutionParameteriv( GLenum target, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glCopyConvolutionFilter1D( GLenum target, GLenum internalformat, GLint x, GLint y, + GLsizei width ); +GLAPI void APIENTRY glCopyConvolutionFilter2D( GLenum target, GLenum internalformat, GLint x, GLint y, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glGetConvolutionFilter( GLenum target, GLenum format, GLenum type, GLvoid *image ); +GLAPI void APIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetSeparableFilter( GLenum target, GLenum format, GLenum type, GLvoid *row, + GLvoid *column, GLvoid *span ); +GLAPI void APIENTRY glSeparableFilter2D( GLenum target, GLenum internalformat, GLsizei width, + GLsizei height, GLenum format, GLenum type, const GLvoid *row, + const GLvoid *column ); +GLAPI void APIENTRY glGetHistogram( GLenum target, GLboolean reset, GLenum format, GLenum type, + GLvoid *values ); +GLAPI void APIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetMinmax( GLenum target, GLboolean reset, GLenum format, GLenum type, + GLvoid *values ); +GLAPI void APIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glHistogram( GLenum target, GLsizei width, GLenum internalformat, GLboolean sink ); +GLAPI void APIENTRY glMinmax( GLenum target, GLenum internalformat, GLboolean sink ); +GLAPI void APIENTRY glResetHistogram( GLenum target ); +GLAPI void APIENTRY glResetMinmax( GLenum target ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBLENDCOLORPROC )( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); +typedef void( APIENTRYP PFNGLBLENDEQUATIONPROC )( GLenum mode ); +typedef void( APIENTRYP PFNGLDRAWRANGEELEMENTSPROC )( GLenum mode, GLuint start, GLuint end, + GLsizei count, GLenum type, + const GLvoid *indices ); +typedef void( APIENTRYP PFNGLTEXIMAGE3DPROC )( GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLTEXSUBIMAGE3DPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLenum type, const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint x, GLint y, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLCOLORTABLEPROC )( GLenum target, GLenum internalformat, GLsizei width, + GLenum format, GLenum type, const GLvoid *table ); +typedef void( APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC )( GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC )( GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLCOPYCOLORTABLEPROC )( GLenum target, GLenum internalformat, GLint x, + GLint y, GLsizei width ); +typedef void( APIENTRYP PFNGLGETCOLORTABLEPROC )( GLenum target, GLenum format, GLenum type, + GLvoid *table ); +typedef void( APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC )( GLenum target, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLCOLORSUBTABLEPROC )( GLenum target, GLsizei start, GLsizei count, + GLenum format, GLenum type, const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC )( GLenum target, GLsizei start, GLint x, GLint y, + GLsizei width ); +typedef void( APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC )( GLenum target, GLenum internalformat, + GLsizei width, GLenum format, GLenum type, + const GLvoid *image ); +typedef void( APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC )( GLenum target, GLenum internalformat, + GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *image ); +typedef void( APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC )( GLenum target, GLenum pname, GLfloat params ); +typedef void( APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC )( GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC )( GLenum target, GLenum pname, GLint params ); +typedef void( APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC )( GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC )( GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width ); +typedef void( APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC )( GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC )( GLenum target, GLenum format, GLenum type, + GLvoid *image ); +typedef void( APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC )( GLenum target, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETSEPARABLEFILTERPROC )( GLenum target, GLenum format, GLenum type, + GLvoid *row, GLvoid *column, GLvoid *span ); +typedef void( APIENTRYP PFNGLSEPARABLEFILTER2DPROC )( GLenum target, GLenum internalformat, + GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *row, + const GLvoid *column ); +typedef void( APIENTRYP PFNGLGETHISTOGRAMPROC )( GLenum target, GLboolean reset, GLenum format, + GLenum type, GLvoid *values ); +typedef void( APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC )( GLenum target, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETMINMAXPROC )( GLenum target, GLboolean reset, GLenum format, GLenum type, + GLvoid *values ); +typedef void( APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC )( GLenum target, GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLHISTOGRAMPROC )( GLenum target, GLsizei width, GLenum internalformat, + GLboolean sink ); +typedef void( APIENTRYP PFNGLMINMAXPROC )( GLenum target, GLenum internalformat, GLboolean sink ); +typedef void( APIENTRYP PFNGLRESETHISTOGRAMPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLRESETMINMAXPROC )( GLenum target ); #endif #ifndef GL_VERSION_1_3 -#define GL_VERSION_1_3 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTexture (GLenum texture); -GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, GLvoid *img); -GLAPI void APIENTRY glClientActiveTexture (GLenum texture); -GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s); -GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s); -GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s); -GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s); -GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t); -GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); -GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t); -GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t); -GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r); -GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m); -GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m); -GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m); -GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); +# define GL_VERSION_1_3 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTexture( GLenum texture ); +GLAPI void APIENTRY glSampleCoverage( GLfloat value, GLboolean invert ); +GLAPI void APIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth, GLint border, + GLsizei imageSize, const GLvoid *data ); +GLAPI void APIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const GLvoid *data ); +GLAPI void APIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLint border, GLsizei imageSize, + const GLvoid *data ); +GLAPI void APIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLsizei imageSize, + const GLvoid *data ); +GLAPI void APIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, + GLsizei imageSize, const GLvoid *data ); +GLAPI void APIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, + GLenum format, GLsizei imageSize, const GLvoid *data ); +GLAPI void APIENTRY glGetCompressedTexImage( GLenum target, GLint level, GLvoid *img ); +GLAPI void APIENTRY glClientActiveTexture( GLenum texture ); +GLAPI void APIENTRY glMultiTexCoord1d( GLenum target, GLdouble s ); +GLAPI void APIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v ); +GLAPI void APIENTRY glMultiTexCoord1f( GLenum target, GLfloat s ); +GLAPI void APIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v ); +GLAPI void APIENTRY glMultiTexCoord1i( GLenum target, GLint s ); +GLAPI void APIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v ); +GLAPI void APIENTRY glMultiTexCoord1s( GLenum target, GLshort s ); +GLAPI void APIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v ); +GLAPI void APIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t ); +GLAPI void APIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v ); +GLAPI void APIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t ); +GLAPI void APIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v ); +GLAPI void APIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t ); +GLAPI void APIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v ); +GLAPI void APIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t ); +GLAPI void APIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v ); +GLAPI void APIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r ); +GLAPI void APIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v ); +GLAPI void APIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r ); +GLAPI void APIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v ); +GLAPI void APIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r ); +GLAPI void APIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v ); +GLAPI void APIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r ); +GLAPI void APIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v ); +GLAPI void APIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); +GLAPI void APIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v ); +GLAPI void APIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +GLAPI void APIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v ); +GLAPI void APIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q ); +GLAPI void APIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v ); +GLAPI void APIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); +GLAPI void APIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v ); +GLAPI void APIENTRY glLoadTransposeMatrixf( const GLfloat *m ); +GLAPI void APIENTRY glLoadTransposeMatrixd( const GLdouble *m ); +GLAPI void APIENTRY glMultTransposeMatrixf( const GLfloat *m ); +GLAPI void APIENTRY glMultTransposeMatrixd( const GLdouble *m ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLACTIVETEXTUREPROC )( GLenum texture ); +typedef void( APIENTRYP PFNGLSAMPLECOVERAGEPROC )( GLfloat value, GLboolean invert ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC )( GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, + GLsizei imageSize, const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC )( GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLint border, GLsizei imageSize, + const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC )( GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLint border, GLsizei imageSize, + const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLsizei imageSize, const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLsizei imageSize, + const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC )( GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, + GLsizei imageSize, const GLvoid *data ); +typedef void( APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC )( GLenum target, GLint level, GLvoid *img ); +typedef void( APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC )( GLenum texture ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1DPROC )( GLenum target, GLdouble s ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1DVPROC )( GLenum target, const GLdouble *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1FPROC )( GLenum target, GLfloat s ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1FVPROC )( GLenum target, const GLfloat *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1IPROC )( GLenum target, GLint s ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1IVPROC )( GLenum target, const GLint *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1SPROC )( GLenum target, GLshort s ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1SVPROC )( GLenum target, const GLshort *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2DPROC )( GLenum target, GLdouble s, GLdouble t ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2DVPROC )( GLenum target, const GLdouble *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2FPROC )( GLenum target, GLfloat s, GLfloat t ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2FVPROC )( GLenum target, const GLfloat *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2IPROC )( GLenum target, GLint s, GLint t ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2IVPROC )( GLenum target, const GLint *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2SPROC )( GLenum target, GLshort s, GLshort t ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2SVPROC )( GLenum target, const GLshort *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3DPROC )( GLenum target, GLdouble s, GLdouble t, GLdouble r ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3DVPROC )( GLenum target, const GLdouble *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3FPROC )( GLenum target, GLfloat s, GLfloat t, GLfloat r ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3FVPROC )( GLenum target, const GLfloat *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3IPROC )( GLenum target, GLint s, GLint t, GLint r ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3IVPROC )( GLenum target, const GLint *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3SPROC )( GLenum target, GLshort s, GLshort t, GLshort r ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3SVPROC )( GLenum target, const GLshort *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4DPROC )( GLenum target, GLdouble s, GLdouble t, GLdouble r, + GLdouble q ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4DVPROC )( GLenum target, const GLdouble *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4FPROC )( GLenum target, GLfloat s, GLfloat t, GLfloat r, + GLfloat q ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4FVPROC )( GLenum target, const GLfloat *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4IPROC )( GLenum target, GLint s, GLint t, GLint r, GLint q ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4IVPROC )( GLenum target, const GLint *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4SPROC )( GLenum target, GLshort s, GLshort t, GLshort r, + GLshort q ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4SVPROC )( GLenum target, const GLshort *v ); +typedef void( APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC )( const GLfloat *m ); +typedef void( APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC )( const GLdouble *m ); +typedef void( APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC )( const GLfloat *m ); +typedef void( APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC )( const GLdouble *m ); #endif #ifndef GL_VERSION_1_4 -#define GL_VERSION_1_4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); -GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount); -GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param); -GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params); -GLAPI void APIENTRY glFogCoordf (GLfloat coord); -GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord); -GLAPI void APIENTRY glFogCoordd (GLdouble coord); -GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord); -GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); -GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v); -GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); -GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v); -GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); -GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v); -GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue); -GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v); -GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); -GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v); -GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); -GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v); -GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); -GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v); -GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); -GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v); -GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2iv (const GLint *v); -GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2sv (const GLshort *v); -GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3iv (const GLint *v); -GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3sv (const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); +# define GL_VERSION_1_4 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparate( GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, + GLenum dfactorAlpha ); +GLAPI void APIENTRY glMultiDrawArrays( GLenum mode, const GLint *first, const GLsizei *count, + GLsizei drawcount ); +GLAPI void APIENTRY glMultiDrawElements( GLenum mode, const GLsizei *count, GLenum type, + const GLvoid *const *indices, GLsizei drawcount ); +GLAPI void APIENTRY glPointParameterf( GLenum pname, GLfloat param ); +GLAPI void APIENTRY glPointParameterfv( GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glPointParameteri( GLenum pname, GLint param ); +GLAPI void APIENTRY glPointParameteriv( GLenum pname, const GLint *params ); +GLAPI void APIENTRY glFogCoordf( GLfloat coord ); +GLAPI void APIENTRY glFogCoordfv( const GLfloat *coord ); +GLAPI void APIENTRY glFogCoordd( GLdouble coord ); +GLAPI void APIENTRY glFogCoorddv( const GLdouble *coord ); +GLAPI void APIENTRY glFogCoordPointer( GLenum type, GLsizei stride, const GLvoid *pointer ); +GLAPI void APIENTRY glSecondaryColor3b( GLbyte red, GLbyte green, GLbyte blue ); +GLAPI void APIENTRY glSecondaryColor3bv( const GLbyte *v ); +GLAPI void APIENTRY glSecondaryColor3d( GLdouble red, GLdouble green, GLdouble blue ); +GLAPI void APIENTRY glSecondaryColor3dv( const GLdouble *v ); +GLAPI void APIENTRY glSecondaryColor3f( GLfloat red, GLfloat green, GLfloat blue ); +GLAPI void APIENTRY glSecondaryColor3fv( const GLfloat *v ); +GLAPI void APIENTRY glSecondaryColor3i( GLint red, GLint green, GLint blue ); +GLAPI void APIENTRY glSecondaryColor3iv( const GLint *v ); +GLAPI void APIENTRY glSecondaryColor3s( GLshort red, GLshort green, GLshort blue ); +GLAPI void APIENTRY glSecondaryColor3sv( const GLshort *v ); +GLAPI void APIENTRY glSecondaryColor3ub( GLubyte red, GLubyte green, GLubyte blue ); +GLAPI void APIENTRY glSecondaryColor3ubv( const GLubyte *v ); +GLAPI void APIENTRY glSecondaryColor3ui( GLuint red, GLuint green, GLuint blue ); +GLAPI void APIENTRY glSecondaryColor3uiv( const GLuint *v ); +GLAPI void APIENTRY glSecondaryColor3us( GLushort red, GLushort green, GLushort blue ); +GLAPI void APIENTRY glSecondaryColor3usv( const GLushort *v ); +GLAPI void APIENTRY glSecondaryColorPointer( GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); +GLAPI void APIENTRY glWindowPos2d( GLdouble x, GLdouble y ); +GLAPI void APIENTRY glWindowPos2dv( const GLdouble *v ); +GLAPI void APIENTRY glWindowPos2f( GLfloat x, GLfloat y ); +GLAPI void APIENTRY glWindowPos2fv( const GLfloat *v ); +GLAPI void APIENTRY glWindowPos2i( GLint x, GLint y ); +GLAPI void APIENTRY glWindowPos2iv( const GLint *v ); +GLAPI void APIENTRY glWindowPos2s( GLshort x, GLshort y ); +GLAPI void APIENTRY glWindowPos2sv( const GLshort *v ); +GLAPI void APIENTRY glWindowPos3d( GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glWindowPos3dv( const GLdouble *v ); +GLAPI void APIENTRY glWindowPos3f( GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glWindowPos3fv( const GLfloat *v ); +GLAPI void APIENTRY glWindowPos3i( GLint x, GLint y, GLint z ); +GLAPI void APIENTRY glWindowPos3iv( const GLint *v ); +GLAPI void APIENTRY glWindowPos3s( GLshort x, GLshort y, GLshort z ); +GLAPI void APIENTRY glWindowPos3sv( const GLshort *v ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBLENDFUNCSEPARATEPROC )( GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorAlpha, GLenum dfactorAlpha ); +typedef void( APIENTRYP PFNGLMULTIDRAWARRAYSPROC )( GLenum mode, const GLint *first, + const GLsizei *count, GLsizei drawcount ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTSPROC )( GLenum mode, const GLsizei *count, GLenum type, + const GLvoid *const *indices, GLsizei drawcount ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERFPROC )( GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERFVPROC )( GLenum pname, const GLfloat *params ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERIPROC )( GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERIVPROC )( GLenum pname, const GLint *params ); +typedef void( APIENTRYP PFNGLFOGCOORDFPROC )( GLfloat coord ); +typedef void( APIENTRYP PFNGLFOGCOORDFVPROC )( const GLfloat *coord ); +typedef void( APIENTRYP PFNGLFOGCOORDDPROC )( GLdouble coord ); +typedef void( APIENTRYP PFNGLFOGCOORDDVPROC )( const GLdouble *coord ); +typedef void( APIENTRYP PFNGLFOGCOORDPOINTERPROC )( GLenum type, GLsizei stride, const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3BPROC )( GLbyte red, GLbyte green, GLbyte blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3BVPROC )( const GLbyte *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3DPROC )( GLdouble red, GLdouble green, GLdouble blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3DVPROC )( const GLdouble *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3FPROC )( GLfloat red, GLfloat green, GLfloat blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3FVPROC )( const GLfloat *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3IPROC )( GLint red, GLint green, GLint blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3IVPROC )( const GLint *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3SPROC )( GLshort red, GLshort green, GLshort blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3SVPROC )( const GLshort *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3UBPROC )( GLubyte red, GLubyte green, GLubyte blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC )( const GLubyte *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3UIPROC )( GLuint red, GLuint green, GLuint blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC )( const GLuint *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3USPROC )( GLushort red, GLushort green, GLushort blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3USVPROC )( const GLushort *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC )( GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLWINDOWPOS2DPROC )( GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2DVPROC )( const GLdouble *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS2FPROC )( GLfloat x, GLfloat y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2FVPROC )( const GLfloat *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS2IPROC )( GLint x, GLint y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2IVPROC )( const GLint *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS2SPROC )( GLshort x, GLshort y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2SVPROC )( const GLshort *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3DPROC )( GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3DVPROC )( const GLdouble *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3FPROC )( GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3FVPROC )( const GLfloat *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3IPROC )( GLint x, GLint y, GLint z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3IVPROC )( const GLint *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3SPROC )( GLshort x, GLshort y, GLshort z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3SVPROC )( const GLshort *v ); #endif #ifndef GL_VERSION_1_5 -#define GL_VERSION_1_5 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsQuery (GLuint id); -GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id); -GLAPI void APIENTRY glEndQuery (GLenum target); -GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); -GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer); -GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); -GLAPI GLvoid* APIENTRY glMapBuffer (GLenum target, GLenum access); -GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target); -GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); +# define GL_VERSION_1_5 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueries( GLsizei n, GLuint *ids ); +GLAPI void APIENTRY glDeleteQueries( GLsizei n, const GLuint *ids ); +GLAPI GLboolean APIENTRY glIsQuery( GLuint id ); +GLAPI void APIENTRY glBeginQuery( GLenum target, GLuint id ); +GLAPI void APIENTRY glEndQuery( GLenum target ); +GLAPI void APIENTRY glGetQueryiv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetQueryObjectiv( GLuint id, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetQueryObjectuiv( GLuint id, GLenum pname, GLuint *params ); +GLAPI void APIENTRY glBindBuffer( GLenum target, GLuint buffer ); +GLAPI void APIENTRY glDeleteBuffers( GLsizei n, const GLuint *buffers ); +GLAPI void APIENTRY glGenBuffers( GLsizei n, GLuint *buffers ); +GLAPI GLboolean APIENTRY glIsBuffer( GLuint buffer ); +GLAPI void APIENTRY glBufferData( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage ); +GLAPI void APIENTRY glBufferSubData( GLenum target, GLintptr offset, GLsizeiptr size, + const GLvoid *data ); +GLAPI void APIENTRY glGetBufferSubData( GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data ); +GLAPI GLvoid *APIENTRY glMapBuffer( GLenum target, GLenum access ); +GLAPI GLboolean APIENTRY glUnmapBuffer( GLenum target ); +GLAPI void APIENTRY glGetBufferParameteriv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetBufferPointerv( GLenum target, GLenum pname, GLvoid **params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGENQUERIESPROC )( GLsizei n, GLuint *ids ); +typedef void( APIENTRYP PFNGLDELETEQUERIESPROC )( GLsizei n, const GLuint *ids ); +typedef GLboolean( APIENTRYP PFNGLISQUERYPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLBEGINQUERYPROC )( GLenum target, GLuint id ); +typedef void( APIENTRYP PFNGLENDQUERYPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLGETQUERYIVPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETQUERYOBJECTIVPROC )( GLuint id, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETQUERYOBJECTUIVPROC )( GLuint id, GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLBINDBUFFERPROC )( GLenum target, GLuint buffer ); +typedef void( APIENTRYP PFNGLDELETEBUFFERSPROC )( GLsizei n, const GLuint *buffers ); +typedef void( APIENTRYP PFNGLGENBUFFERSPROC )( GLsizei n, GLuint *buffers ); +typedef GLboolean( APIENTRYP PFNGLISBUFFERPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLBUFFERDATAPROC )( GLenum target, GLsizeiptr size, const GLvoid *data, + GLenum usage ); +typedef void( APIENTRYP PFNGLBUFFERSUBDATAPROC )( GLenum target, GLintptr offset, GLsizeiptr size, + const GLvoid *data ); +typedef void( APIENTRYP PFNGLGETBUFFERSUBDATAPROC )( GLenum target, GLintptr offset, GLsizeiptr size, + GLvoid *data ); +typedef GLvoid *( APIENTRYP PFNGLMAPBUFFERPROC )( GLenum target, GLenum access ); +typedef GLboolean( APIENTRYP PFNGLUNMAPBUFFERPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETBUFFERPOINTERVPROC )( GLenum target, GLenum pname, GLvoid **params ); #endif #ifndef GL_VERSION_2_0 -#define GL_VERSION_2_0 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader); -GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); -GLAPI void APIENTRY glCompileShader (GLuint shader); -GLAPI GLuint APIENTRY glCreateProgram (void); -GLAPI GLuint APIENTRY glCreateShader (GLenum type); -GLAPI void APIENTRY glDeleteProgram (GLuint program); -GLAPI void APIENTRY glDeleteShader (GLuint shader); -GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader); -GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index); -GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index); -GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); -GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer); -GLAPI GLboolean APIENTRY glIsProgram (GLuint program); -GLAPI GLboolean APIENTRY glIsShader (GLuint shader); -GLAPI void APIENTRY glLinkProgram (GLuint program); -GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length); -GLAPI void APIENTRY glUseProgram (GLuint program); -GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0); -GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glUniform1i (GLint location, GLint v0); -GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glValidateProgram (GLuint program); -GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); -typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); -typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); -typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length); -typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +# define GL_VERSION_2_0 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparate( GLenum modeRGB, GLenum modeAlpha ); +GLAPI void APIENTRY glDrawBuffers( GLsizei n, const GLenum *bufs ); +GLAPI void APIENTRY glStencilOpSeparate( GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass ); +GLAPI void APIENTRY glStencilFuncSeparate( GLenum face, GLenum func, GLint ref, GLuint mask ); +GLAPI void APIENTRY glStencilMaskSeparate( GLenum face, GLuint mask ); +GLAPI void APIENTRY glAttachShader( GLuint program, GLuint shader ); +GLAPI void APIENTRY glBindAttribLocation( GLuint program, GLuint index, const GLchar *name ); +GLAPI void APIENTRY glCompileShader( GLuint shader ); +GLAPI GLuint APIENTRY glCreateProgram( void ); +GLAPI GLuint APIENTRY glCreateShader( GLenum type ); +GLAPI void APIENTRY glDeleteProgram( GLuint program ); +GLAPI void APIENTRY glDeleteShader( GLuint shader ); +GLAPI void APIENTRY glDetachShader( GLuint program, GLuint shader ); +GLAPI void APIENTRY glDisableVertexAttribArray( GLuint index ); +GLAPI void APIENTRY glEnableVertexAttribArray( GLuint index ); +GLAPI void APIENTRY glGetActiveAttrib( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, + GLint *size, GLenum *type, GLchar *name ); +GLAPI void APIENTRY glGetActiveUniform( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, + GLint *size, GLenum *type, GLchar *name ); +GLAPI void APIENTRY glGetAttachedShaders( GLuint program, GLsizei maxCount, GLsizei *count, + GLuint *obj ); +GLAPI GLint APIENTRY glGetAttribLocation( GLuint program, const GLchar *name ); +GLAPI void APIENTRY glGetProgramiv( GLuint program, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetProgramInfoLog( GLuint program, GLsizei bufSize, GLsizei *length, + GLchar *infoLog ); +GLAPI void APIENTRY glGetShaderiv( GLuint shader, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetShaderInfoLog( GLuint shader, GLsizei bufSize, GLsizei *length, + GLchar *infoLog ); +GLAPI void APIENTRY glGetShaderSource( GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source ); +GLAPI GLint APIENTRY glGetUniformLocation( GLuint program, const GLchar *name ); +GLAPI void APIENTRY glGetUniformfv( GLuint program, GLint location, GLfloat *params ); +GLAPI void APIENTRY glGetUniformiv( GLuint program, GLint location, GLint *params ); +GLAPI void APIENTRY glGetVertexAttribdv( GLuint index, GLenum pname, GLdouble *params ); +GLAPI void APIENTRY glGetVertexAttribfv( GLuint index, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetVertexAttribiv( GLuint index, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetVertexAttribPointerv( GLuint index, GLenum pname, GLvoid **pointer ); +GLAPI GLboolean APIENTRY glIsProgram( GLuint program ); +GLAPI GLboolean APIENTRY glIsShader( GLuint shader ); +GLAPI void APIENTRY glLinkProgram( GLuint program ); +GLAPI void APIENTRY glShaderSource( GLuint shader, GLsizei count, const GLchar *const *string, + const GLint *length ); +GLAPI void APIENTRY glUseProgram( GLuint program ); +GLAPI void APIENTRY glUniform1f( GLint location, GLfloat v0 ); +GLAPI void APIENTRY glUniform2f( GLint location, GLfloat v0, GLfloat v1 ); +GLAPI void APIENTRY glUniform3f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ); +GLAPI void APIENTRY glUniform4f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ); +GLAPI void APIENTRY glUniform1i( GLint location, GLint v0 ); +GLAPI void APIENTRY glUniform2i( GLint location, GLint v0, GLint v1 ); +GLAPI void APIENTRY glUniform3i( GLint location, GLint v0, GLint v1, GLint v2 ); +GLAPI void APIENTRY glUniform4i( GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ); +GLAPI void APIENTRY glUniform1fv( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform2fv( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform3fv( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform4fv( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform1iv( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniform2iv( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniform3iv( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniform4iv( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniformMatrix2fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix3fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix4fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glValidateProgram( GLuint program ); +GLAPI void APIENTRY glVertexAttrib1d( GLuint index, GLdouble x ); +GLAPI void APIENTRY glVertexAttrib1dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib1f( GLuint index, GLfloat x ); +GLAPI void APIENTRY glVertexAttrib1fv( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib1s( GLuint index, GLshort x ); +GLAPI void APIENTRY glVertexAttrib1sv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib2d( GLuint index, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glVertexAttrib2dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib2f( GLuint index, GLfloat x, GLfloat y ); +GLAPI void APIENTRY glVertexAttrib2fv( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib2s( GLuint index, GLshort x, GLshort y ); +GLAPI void APIENTRY glVertexAttrib2sv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib3d( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glVertexAttrib3dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib3f( GLuint index, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glVertexAttrib3fv( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib3s( GLuint index, GLshort x, GLshort y, GLshort z ); +GLAPI void APIENTRY glVertexAttrib3sv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib4Nbv( GLuint index, const GLbyte *v ); +GLAPI void APIENTRY glVertexAttrib4Niv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttrib4Nsv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib4Nub( GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w ); +GLAPI void APIENTRY glVertexAttrib4Nubv( GLuint index, const GLubyte *v ); +GLAPI void APIENTRY glVertexAttrib4Nuiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttrib4Nusv( GLuint index, const GLushort *v ); +GLAPI void APIENTRY glVertexAttrib4bv( GLuint index, const GLbyte *v ); +GLAPI void APIENTRY glVertexAttrib4d( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glVertexAttrib4dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib4f( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +GLAPI void APIENTRY glVertexAttrib4fv( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib4iv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttrib4s( GLuint index, GLshort x, GLshort y, GLshort z, GLshort w ); +GLAPI void APIENTRY glVertexAttrib4sv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib4ubv( GLuint index, const GLubyte *v ); +GLAPI void APIENTRY glVertexAttrib4uiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttrib4usv( GLuint index, const GLushort *v ); +GLAPI void APIENTRY glVertexAttribPointer( GLuint index, GLint size, GLenum type, GLboolean normalized, + GLsizei stride, const GLvoid *pointer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC )( GLenum modeRGB, GLenum modeAlpha ); +typedef void( APIENTRYP PFNGLDRAWBUFFERSPROC )( GLsizei n, const GLenum *bufs ); +typedef void( APIENTRYP PFNGLSTENCILOPSEPARATEPROC )( GLenum face, GLenum sfail, GLenum dpfail, + GLenum dppass ); +typedef void( APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC )( GLenum face, GLenum func, GLint ref, + GLuint mask ); +typedef void( APIENTRYP PFNGLSTENCILMASKSEPARATEPROC )( GLenum face, GLuint mask ); +typedef void( APIENTRYP PFNGLATTACHSHADERPROC )( GLuint program, GLuint shader ); +typedef void( APIENTRYP PFNGLBINDATTRIBLOCATIONPROC )( GLuint program, GLuint index, + const GLchar *name ); +typedef void( APIENTRYP PFNGLCOMPILESHADERPROC )( GLuint shader ); +typedef GLuint( APIENTRYP PFNGLCREATEPROGRAMPROC )( void ); +typedef GLuint( APIENTRYP PFNGLCREATESHADERPROC )( GLenum type ); +typedef void( APIENTRYP PFNGLDELETEPROGRAMPROC )( GLuint program ); +typedef void( APIENTRYP PFNGLDELETESHADERPROC )( GLuint shader ); +typedef void( APIENTRYP PFNGLDETACHSHADERPROC )( GLuint program, GLuint shader ); +typedef void( APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC )( GLuint index ); +typedef void( APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC )( GLuint index ); +typedef void( APIENTRYP PFNGLGETACTIVEATTRIBPROC )( GLuint program, GLuint index, GLsizei bufSize, + GLsizei *length, GLint *size, GLenum *type, + GLchar *name ); +typedef void( APIENTRYP PFNGLGETACTIVEUNIFORMPROC )( GLuint program, GLuint index, GLsizei bufSize, + GLsizei *length, GLint *size, GLenum *type, + GLchar *name ); +typedef void( APIENTRYP PFNGLGETATTACHEDSHADERSPROC )( GLuint program, GLsizei maxCount, GLsizei *count, + GLuint *obj ); +typedef GLint( APIENTRYP PFNGLGETATTRIBLOCATIONPROC )( GLuint program, const GLchar *name ); +typedef void( APIENTRYP PFNGLGETPROGRAMIVPROC )( GLuint program, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMINFOLOGPROC )( GLuint program, GLsizei bufSize, GLsizei *length, + GLchar *infoLog ); +typedef void( APIENTRYP PFNGLGETSHADERIVPROC )( GLuint shader, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETSHADERINFOLOGPROC )( GLuint shader, GLsizei bufSize, GLsizei *length, + GLchar *infoLog ); +typedef void( APIENTRYP PFNGLGETSHADERSOURCEPROC )( GLuint shader, GLsizei bufSize, GLsizei *length, + GLchar *source ); +typedef GLint( APIENTRYP PFNGLGETUNIFORMLOCATIONPROC )( GLuint program, const GLchar *name ); +typedef void( APIENTRYP PFNGLGETUNIFORMFVPROC )( GLuint program, GLint location, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETUNIFORMIVPROC )( GLuint program, GLint location, GLint *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBDVPROC )( GLuint index, GLenum pname, GLdouble *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBFVPROC )( GLuint index, GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBIVPROC )( GLuint index, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC )( GLuint index, GLenum pname, + GLvoid **pointer ); +typedef GLboolean( APIENTRYP PFNGLISPROGRAMPROC )( GLuint program ); +typedef GLboolean( APIENTRYP PFNGLISSHADERPROC )( GLuint shader ); +typedef void( APIENTRYP PFNGLLINKPROGRAMPROC )( GLuint program ); +typedef void( APIENTRYP PFNGLSHADERSOURCEPROC )( GLuint shader, GLsizei count, + const GLchar *const *string, const GLint *length ); +typedef void( APIENTRYP PFNGLUSEPROGRAMPROC )( GLuint program ); +typedef void( APIENTRYP PFNGLUNIFORM1FPROC )( GLint location, GLfloat v0 ); +typedef void( APIENTRYP PFNGLUNIFORM2FPROC )( GLint location, GLfloat v0, GLfloat v1 ); +typedef void( APIENTRYP PFNGLUNIFORM3FPROC )( GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ); +typedef void( APIENTRYP PFNGLUNIFORM4FPROC )( GLint location, GLfloat v0, GLfloat v1, GLfloat v2, + GLfloat v3 ); +typedef void( APIENTRYP PFNGLUNIFORM1IPROC )( GLint location, GLint v0 ); +typedef void( APIENTRYP PFNGLUNIFORM2IPROC )( GLint location, GLint v0, GLint v1 ); +typedef void( APIENTRYP PFNGLUNIFORM3IPROC )( GLint location, GLint v0, GLint v1, GLint v2 ); +typedef void( APIENTRYP PFNGLUNIFORM4IPROC )( GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ); +typedef void( APIENTRYP PFNGLUNIFORM1FVPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM2FVPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM3FVPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM4FVPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM1IVPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORM2IVPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORM3IVPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORM4IVPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2FVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3FVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4FVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLVALIDATEPROGRAMPROC )( GLuint program ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1DPROC )( GLuint index, GLdouble x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1FPROC )( GLuint index, GLfloat x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1FVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1SPROC )( GLuint index, GLshort x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1SVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2DPROC )( GLuint index, GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2FPROC )( GLuint index, GLfloat x, GLfloat y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2FVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2SPROC )( GLuint index, GLshort x, GLshort y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2SVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3DPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3FPROC )( GLuint index, GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3FVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3SPROC )( GLuint index, GLshort x, GLshort y, GLshort z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3SVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NBVPROC )( GLuint index, const GLbyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NIVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NSVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUBPROC )( GLuint index, GLubyte x, GLubyte y, GLubyte z, + GLubyte w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC )( GLuint index, const GLubyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC )( GLuint index, const GLushort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4BVPROC )( GLuint index, const GLbyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4DPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z, + GLdouble w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4FPROC )( GLuint index, GLfloat x, GLfloat y, GLfloat z, + GLfloat w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4FVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4IVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4SPROC )( GLuint index, GLshort x, GLshort y, GLshort z, + GLshort w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4SVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4UBVPROC )( GLuint index, const GLubyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4UIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4USVPROC )( GLuint index, const GLushort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC )( GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, + const GLvoid *pointer ); #endif #ifndef GL_VERSION_2_1 -#define GL_VERSION_2_1 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +# define GL_VERSION_2_1 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformMatrix2x3fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix3x2fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix2x4fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix4x2fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix3x4fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix4x3fv( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); #endif #ifndef GL_VERSION_3_0 -#define GL_VERSION_3_0 1 +# define GL_VERSION_3_0 1 /* OpenGL 3.0 also reuses entry points from these extensions: */ /* ARB_framebuffer_object */ /* ARB_map_buffer_range */ /* ARB_vertex_array_object */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); -GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); -GLAPI void APIENTRY glEnablei (GLenum target, GLuint index); -GLAPI void APIENTRY glDisablei (GLenum target, GLuint index); -GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index); -GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedback (void); -GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode); -GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp); -GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode); -GLAPI void APIENTRY glEndConditionalRender (void); -GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); -GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x); -GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y); -GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x); -GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); -GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); -GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0); -GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); -GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); -GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GLAPI const GLubyte * APIENTRY glGetStringi (GLenum name, GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); -typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaski( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a ); +GLAPI void APIENTRY glGetBooleani_v( GLenum target, GLuint index, GLboolean *data ); +GLAPI void APIENTRY glGetIntegeri_v( GLenum target, GLuint index, GLint *data ); +GLAPI void APIENTRY glEnablei( GLenum target, GLuint index ); +GLAPI void APIENTRY glDisablei( GLenum target, GLuint index ); +GLAPI GLboolean APIENTRY glIsEnabledi( GLenum target, GLuint index ); +GLAPI void APIENTRY glBeginTransformFeedback( GLenum primitiveMode ); +GLAPI void APIENTRY glEndTransformFeedback( void ); +GLAPI void APIENTRY glBindBufferRange( GLenum target, GLuint index, GLuint buffer, GLintptr offset, + GLsizeiptr size ); +GLAPI void APIENTRY glBindBufferBase( GLenum target, GLuint index, GLuint buffer ); +GLAPI void APIENTRY glTransformFeedbackVaryings( GLuint program, GLsizei count, + const GLchar *const *varyings, GLenum bufferMode ); +GLAPI void APIENTRY glGetTransformFeedbackVarying( GLuint program, GLuint index, GLsizei bufSize, + GLsizei *length, GLsizei *size, GLenum *type, + GLchar *name ); +GLAPI void APIENTRY glClampColor( GLenum target, GLenum clamp ); +GLAPI void APIENTRY glBeginConditionalRender( GLuint id, GLenum mode ); +GLAPI void APIENTRY glEndConditionalRender( void ); +GLAPI void APIENTRY glVertexAttribIPointer( GLuint index, GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); +GLAPI void APIENTRY glGetVertexAttribIiv( GLuint index, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetVertexAttribIuiv( GLuint index, GLenum pname, GLuint *params ); +GLAPI void APIENTRY glVertexAttribI1i( GLuint index, GLint x ); +GLAPI void APIENTRY glVertexAttribI2i( GLuint index, GLint x, GLint y ); +GLAPI void APIENTRY glVertexAttribI3i( GLuint index, GLint x, GLint y, GLint z ); +GLAPI void APIENTRY glVertexAttribI4i( GLuint index, GLint x, GLint y, GLint z, GLint w ); +GLAPI void APIENTRY glVertexAttribI1ui( GLuint index, GLuint x ); +GLAPI void APIENTRY glVertexAttribI2ui( GLuint index, GLuint x, GLuint y ); +GLAPI void APIENTRY glVertexAttribI3ui( GLuint index, GLuint x, GLuint y, GLuint z ); +GLAPI void APIENTRY glVertexAttribI4ui( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ); +GLAPI void APIENTRY glVertexAttribI1iv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI2iv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI3iv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI4iv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI1uiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI2uiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI3uiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI4uiv( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI4bv( GLuint index, const GLbyte *v ); +GLAPI void APIENTRY glVertexAttribI4sv( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttribI4ubv( GLuint index, const GLubyte *v ); +GLAPI void APIENTRY glVertexAttribI4usv( GLuint index, const GLushort *v ); +GLAPI void APIENTRY glGetUniformuiv( GLuint program, GLint location, GLuint *params ); +GLAPI void APIENTRY glBindFragDataLocation( GLuint program, GLuint color, const GLchar *name ); +GLAPI GLint APIENTRY glGetFragDataLocation( GLuint program, const GLchar *name ); +GLAPI void APIENTRY glUniform1ui( GLint location, GLuint v0 ); +GLAPI void APIENTRY glUniform2ui( GLint location, GLuint v0, GLuint v1 ); +GLAPI void APIENTRY glUniform3ui( GLint location, GLuint v0, GLuint v1, GLuint v2 ); +GLAPI void APIENTRY glUniform4ui( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ); +GLAPI void APIENTRY glUniform1uiv( GLint location, GLsizei count, const GLuint *value ); +GLAPI void APIENTRY glUniform2uiv( GLint location, GLsizei count, const GLuint *value ); +GLAPI void APIENTRY glUniform3uiv( GLint location, GLsizei count, const GLuint *value ); +GLAPI void APIENTRY glUniform4uiv( GLint location, GLsizei count, const GLuint *value ); +GLAPI void APIENTRY glTexParameterIiv( GLenum target, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glTexParameterIuiv( GLenum target, GLenum pname, const GLuint *params ); +GLAPI void APIENTRY glGetTexParameterIiv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetTexParameterIuiv( GLenum target, GLenum pname, GLuint *params ); +GLAPI void APIENTRY glClearBufferiv( GLenum buffer, GLint drawbuffer, const GLint *value ); +GLAPI void APIENTRY glClearBufferuiv( GLenum buffer, GLint drawbuffer, const GLuint *value ); +GLAPI void APIENTRY glClearBufferfv( GLenum buffer, GLint drawbuffer, const GLfloat *value ); +GLAPI void APIENTRY glClearBufferfi( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ); +GLAPI const GLubyte *APIENTRY glGetStringi( GLenum name, GLuint index ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOLORMASKIPROC )( GLuint index, GLboolean r, GLboolean g, GLboolean b, + GLboolean a ); +typedef void( APIENTRYP PFNGLGETBOOLEANI_VPROC )( GLenum target, GLuint index, GLboolean *data ); +typedef void( APIENTRYP PFNGLGETINTEGERI_VPROC )( GLenum target, GLuint index, GLint *data ); +typedef void( APIENTRYP PFNGLENABLEIPROC )( GLenum target, GLuint index ); +typedef void( APIENTRYP PFNGLDISABLEIPROC )( GLenum target, GLuint index ); +typedef GLboolean( APIENTRYP PFNGLISENABLEDIPROC )( GLenum target, GLuint index ); +typedef void( APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC )( GLenum primitiveMode ); +typedef void( APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC )( void ); +typedef void( APIENTRYP PFNGLBINDBUFFERRANGEPROC )( GLenum target, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +typedef void( APIENTRYP PFNGLBINDBUFFERBASEPROC )( GLenum target, GLuint index, GLuint buffer ); +typedef void( APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC )( GLuint program, GLsizei count, + const GLchar *const *varyings, + GLenum bufferMode ); +typedef void( APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC )( GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, + GLsizei *size, GLenum *type, + GLchar *name ); +typedef void( APIENTRYP PFNGLCLAMPCOLORPROC )( GLenum target, GLenum clamp ); +typedef void( APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC )( GLuint id, GLenum mode ); +typedef void( APIENTRYP PFNGLENDCONDITIONALRENDERPROC )( void ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC )( GLuint index, GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC )( GLuint index, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC )( GLuint index, GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1IPROC )( GLuint index, GLint x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2IPROC )( GLuint index, GLint x, GLint y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3IPROC )( GLuint index, GLint x, GLint y, GLint z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4IPROC )( GLuint index, GLint x, GLint y, GLint z, GLint w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1UIPROC )( GLuint index, GLuint x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2UIPROC )( GLuint index, GLuint x, GLuint y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3UIPROC )( GLuint index, GLuint x, GLuint y, GLuint z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4UIPROC )( GLuint index, GLuint x, GLuint y, GLuint z, + GLuint w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1IVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2IVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3IVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4IVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4BVPROC )( GLuint index, const GLbyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4SVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC )( GLuint index, const GLubyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4USVPROC )( GLuint index, const GLushort *v ); +typedef void( APIENTRYP PFNGLGETUNIFORMUIVPROC )( GLuint program, GLint location, GLuint *params ); +typedef void( APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC )( GLuint program, GLuint color, + const GLchar *name ); +typedef GLint( APIENTRYP PFNGLGETFRAGDATALOCATIONPROC )( GLuint program, const GLchar *name ); +typedef void( APIENTRYP PFNGLUNIFORM1UIPROC )( GLint location, GLuint v0 ); +typedef void( APIENTRYP PFNGLUNIFORM2UIPROC )( GLint location, GLuint v0, GLuint v1 ); +typedef void( APIENTRYP PFNGLUNIFORM3UIPROC )( GLint location, GLuint v0, GLuint v1, GLuint v2 ); +typedef void( APIENTRYP PFNGLUNIFORM4UIPROC )( GLint location, GLuint v0, GLuint v1, GLuint v2, + GLuint v3 ); +typedef void( APIENTRYP PFNGLUNIFORM1UIVPROC )( GLint location, GLsizei count, const GLuint *value ); +typedef void( APIENTRYP PFNGLUNIFORM2UIVPROC )( GLint location, GLsizei count, const GLuint *value ); +typedef void( APIENTRYP PFNGLUNIFORM3UIVPROC )( GLint location, GLsizei count, const GLuint *value ); +typedef void( APIENTRYP PFNGLUNIFORM4UIVPROC )( GLint location, GLsizei count, const GLuint *value ); +typedef void( APIENTRYP PFNGLTEXPARAMETERIIVPROC )( GLenum target, GLenum pname, const GLint *params ); +typedef void( APIENTRYP PFNGLTEXPARAMETERIUIVPROC )( GLenum target, GLenum pname, const GLuint *params ); +typedef void( APIENTRYP PFNGLGETTEXPARAMETERIIVPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC )( GLenum target, GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLCLEARBUFFERIVPROC )( GLenum buffer, GLint drawbuffer, const GLint *value ); +typedef void( APIENTRYP PFNGLCLEARBUFFERUIVPROC )( GLenum buffer, GLint drawbuffer, + const GLuint *value ); +typedef void( APIENTRYP PFNGLCLEARBUFFERFVPROC )( GLenum buffer, GLint drawbuffer, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLCLEARBUFFERFIPROC )( GLenum buffer, GLint drawbuffer, GLfloat depth, + GLint stencil ); +typedef const GLubyte *( APIENTRYP PFNGLGETSTRINGIPROC )( GLenum name, GLuint index ); #endif #ifndef GL_VERSION_3_1 -#define GL_VERSION_3_1 1 +# define GL_VERSION_3_1 1 /* OpenGL 3.1 also reuses entry points from these extensions: */ /* ARB_copy_buffer */ /* ARB_uniform_buffer_object */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount); -GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount); -typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstanced( GLenum mode, GLint first, GLsizei count, + GLsizei instancecount ); +GLAPI void APIENTRY glDrawElementsInstanced( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLsizei instancecount ); +GLAPI void APIENTRY glTexBuffer( GLenum target, GLenum internalformat, GLuint buffer ); +GLAPI void APIENTRY glPrimitiveRestartIndex( GLuint index ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC )( GLenum mode, GLint first, GLsizei count, + GLsizei instancecount ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC )( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLsizei instancecount ); +typedef void( APIENTRYP PFNGLTEXBUFFERPROC )( GLenum target, GLenum internalformat, GLuint buffer ); +typedef void( APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC )( GLuint index ); #endif #ifndef GL_VERSION_3_2 -#define GL_VERSION_3_2 1 +# define GL_VERSION_3_2 1 /* OpenGL 3.2 also reuses entry points from these extensions: */ /* ARB_draw_elements_base_vertex */ /* ARB_provoking_vertex */ /* ARB_sync */ /* ARB_texture_multisample */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); -GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInteger64i_v( GLenum target, GLuint index, GLint64 *data ); +GLAPI void APIENTRY glGetBufferParameteri64v( GLenum target, GLenum pname, GLint64 *params ); +GLAPI void APIENTRY glFramebufferTexture( GLenum target, GLenum attachment, GLuint texture, + GLint level ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETINTEGER64I_VPROC )( GLenum target, GLuint index, GLint64 *data ); +typedef void( APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC )( GLenum target, GLenum pname, + GLint64 *params ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC )( GLenum target, GLenum attachment, GLuint texture, + GLint level ); #endif #ifndef GL_VERSION_3_3 -#define GL_VERSION_3_3 1 +# define GL_VERSION_3_3 1 /* OpenGL 3.3 also reuses entry points from these extensions: */ /* ARB_blend_func_extended */ /* ARB_sampler_objects */ @@ -6953,14 +7129,14 @@ typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum atta /* ARB_texture_swizzle (no entry points) */ /* ARB_timer_query */ /* ARB_vertex_type_2_10_10_10_rev */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisor( GLuint index, GLuint divisor ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC )( GLuint index, GLuint divisor ); #endif #ifndef GL_VERSION_4_0 -#define GL_VERSION_4_0 1 +# define GL_VERSION_4_0 1 /* OpenGL 4.0 also reuses entry points from these extensions: */ /* ARB_texture_query_lod (no entry points) */ /* ARB_draw_indirect */ @@ -6973,22 +7149,25 @@ typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divi /* ARB_texture_gather (no entry points) */ /* ARB_transform_feedback2 */ /* ARB_transform_feedback3 */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMinSampleShading (GLfloat value); -GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value); -typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShading( GLfloat value ); +GLAPI void APIENTRY glBlendEquationi( GLuint buf, GLenum mode ); +GLAPI void APIENTRY glBlendEquationSeparatei( GLuint buf, GLenum modeRGB, GLenum modeAlpha ); +GLAPI void APIENTRY glBlendFunci( GLuint buf, GLenum src, GLenum dst ); +GLAPI void APIENTRY glBlendFuncSeparatei( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, + GLenum dstAlpha ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLMINSAMPLESHADINGPROC )( GLfloat value ); +typedef void( APIENTRYP PFNGLBLENDEQUATIONIPROC )( GLuint buf, GLenum mode ); +typedef void( APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC )( GLuint buf, GLenum modeRGB, + GLenum modeAlpha ); +typedef void( APIENTRYP PFNGLBLENDFUNCIPROC )( GLuint buf, GLenum src, GLenum dst ); +typedef void( APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC )( GLuint buf, GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha ); #endif #ifndef GL_VERSION_4_1 -#define GL_VERSION_4_1 1 +# define GL_VERSION_4_1 1 /* OpenGL 4.1 reuses entry points from these extensions: */ /* ARB_ES2_compatibility */ /* ARB_get_program_binary */ @@ -6999,7 +7178,7 @@ typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, #endif #ifndef GL_VERSION_4_2 -#define GL_VERSION_4_2 1 +# define GL_VERSION_4_2 1 /* OpenGL 4.2 reuses entry points from these extensions: */ /* ARB_base_instance */ /* ARB_shading_language_420pack (no entry points) */ @@ -7015,7 +7194,7 @@ typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, #endif #ifndef GL_VERSION_4_3 -#define GL_VERSION_4_3 1 +# define GL_VERSION_4_3 1 /* OpenGL 4.3 reuses entry points from these extensions: */ /* ARB_arrays_of_arrays (no entry points, GLSL only) */ /* ARB_fragment_layer_viewport (no entry points, GLSL only) */ @@ -7042,5703 +7221,7710 @@ typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, #endif #ifndef GL_ARB_multitexture -#define GL_ARB_multitexture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTextureARB (GLenum texture); -GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture); -GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s); -GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s); -GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s); -GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s); -GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t); -GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t); -GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t); -GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t); -GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r); -GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); +# define GL_ARB_multitexture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTextureARB( GLenum texture ); +GLAPI void APIENTRY glClientActiveTextureARB( GLenum texture ); +GLAPI void APIENTRY glMultiTexCoord1dARB( GLenum target, GLdouble s ); +GLAPI void APIENTRY glMultiTexCoord1dvARB( GLenum target, const GLdouble *v ); +GLAPI void APIENTRY glMultiTexCoord1fARB( GLenum target, GLfloat s ); +GLAPI void APIENTRY glMultiTexCoord1fvARB( GLenum target, const GLfloat *v ); +GLAPI void APIENTRY glMultiTexCoord1iARB( GLenum target, GLint s ); +GLAPI void APIENTRY glMultiTexCoord1ivARB( GLenum target, const GLint *v ); +GLAPI void APIENTRY glMultiTexCoord1sARB( GLenum target, GLshort s ); +GLAPI void APIENTRY glMultiTexCoord1svARB( GLenum target, const GLshort *v ); +GLAPI void APIENTRY glMultiTexCoord2dARB( GLenum target, GLdouble s, GLdouble t ); +GLAPI void APIENTRY glMultiTexCoord2dvARB( GLenum target, const GLdouble *v ); +GLAPI void APIENTRY glMultiTexCoord2fARB( GLenum target, GLfloat s, GLfloat t ); +GLAPI void APIENTRY glMultiTexCoord2fvARB( GLenum target, const GLfloat *v ); +GLAPI void APIENTRY glMultiTexCoord2iARB( GLenum target, GLint s, GLint t ); +GLAPI void APIENTRY glMultiTexCoord2ivARB( GLenum target, const GLint *v ); +GLAPI void APIENTRY glMultiTexCoord2sARB( GLenum target, GLshort s, GLshort t ); +GLAPI void APIENTRY glMultiTexCoord2svARB( GLenum target, const GLshort *v ); +GLAPI void APIENTRY glMultiTexCoord3dARB( GLenum target, GLdouble s, GLdouble t, GLdouble r ); +GLAPI void APIENTRY glMultiTexCoord3dvARB( GLenum target, const GLdouble *v ); +GLAPI void APIENTRY glMultiTexCoord3fARB( GLenum target, GLfloat s, GLfloat t, GLfloat r ); +GLAPI void APIENTRY glMultiTexCoord3fvARB( GLenum target, const GLfloat *v ); +GLAPI void APIENTRY glMultiTexCoord3iARB( GLenum target, GLint s, GLint t, GLint r ); +GLAPI void APIENTRY glMultiTexCoord3ivARB( GLenum target, const GLint *v ); +GLAPI void APIENTRY glMultiTexCoord3sARB( GLenum target, GLshort s, GLshort t, GLshort r ); +GLAPI void APIENTRY glMultiTexCoord3svARB( GLenum target, const GLshort *v ); +GLAPI void APIENTRY glMultiTexCoord4dARB( GLenum target, GLdouble s, GLdouble t, GLdouble r, + GLdouble q ); +GLAPI void APIENTRY glMultiTexCoord4dvARB( GLenum target, const GLdouble *v ); +GLAPI void APIENTRY glMultiTexCoord4fARB( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +GLAPI void APIENTRY glMultiTexCoord4fvARB( GLenum target, const GLfloat *v ); +GLAPI void APIENTRY glMultiTexCoord4iARB( GLenum target, GLint s, GLint t, GLint r, GLint q ); +GLAPI void APIENTRY glMultiTexCoord4ivARB( GLenum target, const GLint *v ); +GLAPI void APIENTRY glMultiTexCoord4sARB( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); +GLAPI void APIENTRY glMultiTexCoord4svARB( GLenum target, const GLshort *v ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLACTIVETEXTUREARBPROC )( GLenum texture ); +typedef void( APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC )( GLenum texture ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1DARBPROC )( GLenum target, GLdouble s ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC )( GLenum target, const GLdouble *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1FARBPROC )( GLenum target, GLfloat s ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC )( GLenum target, const GLfloat *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1IARBPROC )( GLenum target, GLint s ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC )( GLenum target, const GLint *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1SARBPROC )( GLenum target, GLshort s ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC )( GLenum target, const GLshort *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2DARBPROC )( GLenum target, GLdouble s, GLdouble t ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC )( GLenum target, const GLdouble *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2FARBPROC )( GLenum target, GLfloat s, GLfloat t ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC )( GLenum target, const GLfloat *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2IARBPROC )( GLenum target, GLint s, GLint t ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC )( GLenum target, const GLint *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2SARBPROC )( GLenum target, GLshort s, GLshort t ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC )( GLenum target, const GLshort *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3DARBPROC )( GLenum target, GLdouble s, GLdouble t, + GLdouble r ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC )( GLenum target, const GLdouble *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3FARBPROC )( GLenum target, GLfloat s, GLfloat t, GLfloat r ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC )( GLenum target, const GLfloat *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3IARBPROC )( GLenum target, GLint s, GLint t, GLint r ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC )( GLenum target, const GLint *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3SARBPROC )( GLenum target, GLshort s, GLshort t, GLshort r ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC )( GLenum target, const GLshort *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4DARBPROC )( GLenum target, GLdouble s, GLdouble t, GLdouble r, + GLdouble q ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC )( GLenum target, const GLdouble *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4FARBPROC )( GLenum target, GLfloat s, GLfloat t, GLfloat r, + GLfloat q ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC )( GLenum target, const GLfloat *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4IARBPROC )( GLenum target, GLint s, GLint t, GLint r, + GLint q ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC )( GLenum target, const GLint *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4SARBPROC )( GLenum target, GLshort s, GLshort t, GLshort r, + GLshort q ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC )( GLenum target, const GLshort *v ); #endif #ifndef GL_ARB_transpose_matrix -#define GL_ARB_transpose_matrix 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m); -GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m); -GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m); -GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +# define GL_ARB_transpose_matrix 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLoadTransposeMatrixfARB( const GLfloat *m ); +GLAPI void APIENTRY glLoadTransposeMatrixdARB( const GLdouble *m ); +GLAPI void APIENTRY glMultTransposeMatrixfARB( const GLfloat *m ); +GLAPI void APIENTRY glMultTransposeMatrixdARB( const GLdouble *m ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC )( const GLfloat *m ); +typedef void( APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC )( const GLdouble *m ); +typedef void( APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC )( const GLfloat *m ); +typedef void( APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC )( const GLdouble *m ); #endif #ifndef GL_ARB_multisample -#define GL_ARB_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert); +# define GL_ARB_multisample 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleCoverageARB( GLfloat value, GLboolean invert ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSAMPLECOVERAGEARBPROC )( GLfloat value, GLboolean invert ); #endif #ifndef GL_ARB_texture_env_add -#define GL_ARB_texture_env_add 1 +# define GL_ARB_texture_env_add 1 #endif #ifndef GL_ARB_texture_cube_map -#define GL_ARB_texture_cube_map 1 +# define GL_ARB_texture_cube_map 1 #endif #ifndef GL_ARB_texture_compression -#define GL_ARB_texture_compression 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); +# define GL_ARB_texture_compression 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCompressedTexImage3DARB( GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLsizei imageSize, const GLvoid *data ); +GLAPI void APIENTRY glCompressedTexImage2DARB( GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const GLvoid *data ); +GLAPI void APIENTRY glCompressedTexImage1DARB( GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLint border, GLsizei imageSize, + const GLvoid *data ); +GLAPI void APIENTRY glCompressedTexSubImage3DARB( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLsizei imageSize, const GLvoid *data ); +GLAPI void APIENTRY glCompressedTexSubImage2DARB( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLsizei imageSize, const GLvoid *data ); +GLAPI void APIENTRY glCompressedTexSubImage1DARB( GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLsizei imageSize, + const GLvoid *data ); +GLAPI void APIENTRY glGetCompressedTexImageARB( GLenum target, GLint level, GLvoid *img ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC )( GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, + GLsizei imageSize, const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC )( GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLint border, + GLsizei imageSize, const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC )( GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLint border, GLsizei imageSize, + const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, + GLsizei depth, GLenum format, + GLsizei imageSize, const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, + GLsizei height, GLenum format, + GLsizei imageSize, const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC )( GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, + GLsizei imageSize, const GLvoid *data ); +typedef void( APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC )( GLenum target, GLint level, GLvoid *img ); #endif #ifndef GL_ARB_texture_border_clamp -#define GL_ARB_texture_border_clamp 1 +# define GL_ARB_texture_border_clamp 1 #endif #ifndef GL_ARB_point_parameters -#define GL_ARB_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); +# define GL_ARB_point_parameters 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfARB( GLenum pname, GLfloat param ); +GLAPI void APIENTRY glPointParameterfvARB( GLenum pname, const GLfloat *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPOINTPARAMETERFARBPROC )( GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERFVARBPROC )( GLenum pname, const GLfloat *params ); #endif #ifndef GL_ARB_vertex_blend -#define GL_ARB_vertex_blend 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights); -GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights); -GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights); -GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights); -GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights); -GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights); -GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights); -GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights); -GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glVertexBlendARB (GLint count); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); -typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); -typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); -typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); -typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); -typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); -typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); +# define GL_ARB_vertex_blend 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWeightbvARB( GLint size, const GLbyte *weights ); +GLAPI void APIENTRY glWeightsvARB( GLint size, const GLshort *weights ); +GLAPI void APIENTRY glWeightivARB( GLint size, const GLint *weights ); +GLAPI void APIENTRY glWeightfvARB( GLint size, const GLfloat *weights ); +GLAPI void APIENTRY glWeightdvARB( GLint size, const GLdouble *weights ); +GLAPI void APIENTRY glWeightubvARB( GLint size, const GLubyte *weights ); +GLAPI void APIENTRY glWeightusvARB( GLint size, const GLushort *weights ); +GLAPI void APIENTRY glWeightuivARB( GLint size, const GLuint *weights ); +GLAPI void APIENTRY glWeightPointerARB( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ); +GLAPI void APIENTRY glVertexBlendARB( GLint count ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLWEIGHTBVARBPROC )( GLint size, const GLbyte *weights ); +typedef void( APIENTRYP PFNGLWEIGHTSVARBPROC )( GLint size, const GLshort *weights ); +typedef void( APIENTRYP PFNGLWEIGHTIVARBPROC )( GLint size, const GLint *weights ); +typedef void( APIENTRYP PFNGLWEIGHTFVARBPROC )( GLint size, const GLfloat *weights ); +typedef void( APIENTRYP PFNGLWEIGHTDVARBPROC )( GLint size, const GLdouble *weights ); +typedef void( APIENTRYP PFNGLWEIGHTUBVARBPROC )( GLint size, const GLubyte *weights ); +typedef void( APIENTRYP PFNGLWEIGHTUSVARBPROC )( GLint size, const GLushort *weights ); +typedef void( APIENTRYP PFNGLWEIGHTUIVARBPROC )( GLint size, const GLuint *weights ); +typedef void( APIENTRYP PFNGLWEIGHTPOINTERARBPROC )( GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLVERTEXBLENDARBPROC )( GLint count ); #endif #ifndef GL_ARB_matrix_palette -#define GL_ARB_matrix_palette 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index); -GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices); -GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices); -GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices); -GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); -typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +# define GL_ARB_matrix_palette 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCurrentPaletteMatrixARB( GLint index ); +GLAPI void APIENTRY glMatrixIndexubvARB( GLint size, const GLubyte *indices ); +GLAPI void APIENTRY glMatrixIndexusvARB( GLint size, const GLushort *indices ); +GLAPI void APIENTRY glMatrixIndexuivARB( GLint size, const GLuint *indices ); +GLAPI void APIENTRY glMatrixIndexPointerARB( GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC )( GLint index ); +typedef void( APIENTRYP PFNGLMATRIXINDEXUBVARBPROC )( GLint size, const GLubyte *indices ); +typedef void( APIENTRYP PFNGLMATRIXINDEXUSVARBPROC )( GLint size, const GLushort *indices ); +typedef void( APIENTRYP PFNGLMATRIXINDEXUIVARBPROC )( GLint size, const GLuint *indices ); +typedef void( APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC )( GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); #endif #ifndef GL_ARB_texture_env_combine -#define GL_ARB_texture_env_combine 1 +# define GL_ARB_texture_env_combine 1 #endif #ifndef GL_ARB_texture_env_crossbar -#define GL_ARB_texture_env_crossbar 1 +# define GL_ARB_texture_env_crossbar 1 #endif #ifndef GL_ARB_texture_env_dot3 -#define GL_ARB_texture_env_dot3 1 +# define GL_ARB_texture_env_dot3 1 #endif #ifndef GL_ARB_texture_mirrored_repeat -#define GL_ARB_texture_mirrored_repeat 1 +# define GL_ARB_texture_mirrored_repeat 1 #endif #ifndef GL_ARB_depth_texture -#define GL_ARB_depth_texture 1 +# define GL_ARB_depth_texture 1 #endif #ifndef GL_ARB_shadow -#define GL_ARB_shadow 1 +# define GL_ARB_shadow 1 #endif #ifndef GL_ARB_shadow_ambient -#define GL_ARB_shadow_ambient 1 +# define GL_ARB_shadow_ambient 1 #endif #ifndef GL_ARB_window_pos -#define GL_ARB_window_pos 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v); -GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v); -GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v); -GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); +# define GL_ARB_window_pos 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dARB( GLdouble x, GLdouble y ); +GLAPI void APIENTRY glWindowPos2dvARB( const GLdouble *v ); +GLAPI void APIENTRY glWindowPos2fARB( GLfloat x, GLfloat y ); +GLAPI void APIENTRY glWindowPos2fvARB( const GLfloat *v ); +GLAPI void APIENTRY glWindowPos2iARB( GLint x, GLint y ); +GLAPI void APIENTRY glWindowPos2ivARB( const GLint *v ); +GLAPI void APIENTRY glWindowPos2sARB( GLshort x, GLshort y ); +GLAPI void APIENTRY glWindowPos2svARB( const GLshort *v ); +GLAPI void APIENTRY glWindowPos3dARB( GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glWindowPos3dvARB( const GLdouble *v ); +GLAPI void APIENTRY glWindowPos3fARB( GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glWindowPos3fvARB( const GLfloat *v ); +GLAPI void APIENTRY glWindowPos3iARB( GLint x, GLint y, GLint z ); +GLAPI void APIENTRY glWindowPos3ivARB( const GLint *v ); +GLAPI void APIENTRY glWindowPos3sARB( GLshort x, GLshort y, GLshort z ); +GLAPI void APIENTRY glWindowPos3svARB( const GLshort *v ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLWINDOWPOS2DARBPROC )( GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2DVARBPROC )( const GLdouble *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS2FARBPROC )( GLfloat x, GLfloat y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2FVARBPROC )( const GLfloat *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS2IARBPROC )( GLint x, GLint y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2IVARBPROC )( const GLint *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS2SARBPROC )( GLshort x, GLshort y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2SVARBPROC )( const GLshort *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3DARBPROC )( GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3DVARBPROC )( const GLdouble *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3FARBPROC )( GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3FVARBPROC )( const GLfloat *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3IARBPROC )( GLint x, GLint y, GLint z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3IVARBPROC )( const GLint *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3SARBPROC )( GLshort x, GLshort y, GLshort z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3SVARBPROC )( const GLshort *v ); #endif #ifndef GL_ARB_vertex_program -#define GL_ARB_vertex_program 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index); -GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index); -GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string); -GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program); -GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs); -GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string); -GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer); -GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); -typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); +# define GL_ARB_vertex_program 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttrib1dARB( GLuint index, GLdouble x ); +GLAPI void APIENTRY glVertexAttrib1dvARB( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib1fARB( GLuint index, GLfloat x ); +GLAPI void APIENTRY glVertexAttrib1fvARB( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib1sARB( GLuint index, GLshort x ); +GLAPI void APIENTRY glVertexAttrib1svARB( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib2dARB( GLuint index, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glVertexAttrib2dvARB( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y ); +GLAPI void APIENTRY glVertexAttrib2fvARB( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib2sARB( GLuint index, GLshort x, GLshort y ); +GLAPI void APIENTRY glVertexAttrib2svARB( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib3dARB( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glVertexAttrib3dvARB( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib3fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glVertexAttrib3fvARB( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib3sARB( GLuint index, GLshort x, GLshort y, GLshort z ); +GLAPI void APIENTRY glVertexAttrib3svARB( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib4NbvARB( GLuint index, const GLbyte *v ); +GLAPI void APIENTRY glVertexAttrib4NivARB( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttrib4NsvARB( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib4NubARB( GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w ); +GLAPI void APIENTRY glVertexAttrib4NubvARB( GLuint index, const GLubyte *v ); +GLAPI void APIENTRY glVertexAttrib4NuivARB( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttrib4NusvARB( GLuint index, const GLushort *v ); +GLAPI void APIENTRY glVertexAttrib4bvARB( GLuint index, const GLbyte *v ); +GLAPI void APIENTRY glVertexAttrib4dARB( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glVertexAttrib4dvARB( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib4fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +GLAPI void APIENTRY glVertexAttrib4fvARB( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib4ivARB( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttrib4sARB( GLuint index, GLshort x, GLshort y, GLshort z, GLshort w ); +GLAPI void APIENTRY glVertexAttrib4svARB( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib4ubvARB( GLuint index, const GLubyte *v ); +GLAPI void APIENTRY glVertexAttrib4uivARB( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttrib4usvARB( GLuint index, const GLushort *v ); +GLAPI void APIENTRY glVertexAttribPointerARB( GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, + const GLvoid *pointer ); +GLAPI void APIENTRY glEnableVertexAttribArrayARB( GLuint index ); +GLAPI void APIENTRY glDisableVertexAttribArrayARB( GLuint index ); +GLAPI void APIENTRY glProgramStringARB( GLenum target, GLenum format, GLsizei len, + const GLvoid *string ); +GLAPI void APIENTRY glBindProgramARB( GLenum target, GLuint program ); +GLAPI void APIENTRY glDeleteProgramsARB( GLsizei n, const GLuint *programs ); +GLAPI void APIENTRY glGenProgramsARB( GLsizei n, GLuint *programs ); +GLAPI void APIENTRY glProgramEnvParameter4dARB( GLenum target, GLuint index, GLdouble x, GLdouble y, + GLdouble z, GLdouble w ); +GLAPI void APIENTRY glProgramEnvParameter4dvARB( GLenum target, GLuint index, const GLdouble *params ); +GLAPI void APIENTRY glProgramEnvParameter4fARB( GLenum target, GLuint index, GLfloat x, GLfloat y, + GLfloat z, GLfloat w ); +GLAPI void APIENTRY glProgramEnvParameter4fvARB( GLenum target, GLuint index, const GLfloat *params ); +GLAPI void APIENTRY glProgramLocalParameter4dARB( GLenum target, GLuint index, GLdouble x, GLdouble y, + GLdouble z, GLdouble w ); +GLAPI void APIENTRY glProgramLocalParameter4dvARB( GLenum target, GLuint index, const GLdouble *params ); +GLAPI void APIENTRY glProgramLocalParameter4fARB( GLenum target, GLuint index, GLfloat x, GLfloat y, + GLfloat z, GLfloat w ); +GLAPI void APIENTRY glProgramLocalParameter4fvARB( GLenum target, GLuint index, const GLfloat *params ); +GLAPI void APIENTRY glGetProgramEnvParameterdvARB( GLenum target, GLuint index, GLdouble *params ); +GLAPI void APIENTRY glGetProgramEnvParameterfvARB( GLenum target, GLuint index, GLfloat *params ); +GLAPI void APIENTRY glGetProgramLocalParameterdvARB( GLenum target, GLuint index, GLdouble *params ); +GLAPI void APIENTRY glGetProgramLocalParameterfvARB( GLenum target, GLuint index, GLfloat *params ); +GLAPI void APIENTRY glGetProgramivARB( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetProgramStringARB( GLenum target, GLenum pname, GLvoid *string ); +GLAPI void APIENTRY glGetVertexAttribdvARB( GLuint index, GLenum pname, GLdouble *params ); +GLAPI void APIENTRY glGetVertexAttribfvARB( GLuint index, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetVertexAttribivARB( GLuint index, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetVertexAttribPointervARB( GLuint index, GLenum pname, GLvoid **pointer ); +GLAPI GLboolean APIENTRY glIsProgramARB( GLuint program ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXATTRIB1DARBPROC )( GLuint index, GLdouble x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1FARBPROC )( GLuint index, GLfloat x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1SARBPROC )( GLuint index, GLshort x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2DARBPROC )( GLuint index, GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2FARBPROC )( GLuint index, GLfloat x, GLfloat y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2SARBPROC )( GLuint index, GLshort x, GLshort y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3DARBPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3FARBPROC )( GLuint index, GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3SARBPROC )( GLuint index, GLshort x, GLshort y, GLshort z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC )( GLuint index, const GLbyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC )( GLuint index, GLubyte x, GLubyte y, GLubyte z, + GLubyte w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC )( GLuint index, const GLubyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC )( GLuint index, const GLushort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC )( GLuint index, const GLbyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4DARBPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z, + GLdouble w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4FARBPROC )( GLuint index, GLfloat x, GLfloat y, GLfloat z, + GLfloat w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4SARBPROC )( GLuint index, GLshort x, GLshort y, GLshort z, + GLshort w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC )( GLuint index, const GLubyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC )( GLuint index, const GLushort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC )( GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, + const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC )( GLuint index ); +typedef void( APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC )( GLuint index ); +typedef void( APIENTRYP PFNGLPROGRAMSTRINGARBPROC )( GLenum target, GLenum format, GLsizei len, + const GLvoid *string ); +typedef void( APIENTRYP PFNGLBINDPROGRAMARBPROC )( GLenum target, GLuint program ); +typedef void( APIENTRYP PFNGLDELETEPROGRAMSARBPROC )( GLsizei n, const GLuint *programs ); +typedef void( APIENTRYP PFNGLGENPROGRAMSARBPROC )( GLsizei n, GLuint *programs ); +typedef void( APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC )( GLenum target, GLuint index, GLdouble x, + GLdouble y, GLdouble z, GLdouble w ); +typedef void( APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC )( GLenum target, GLuint index, + const GLdouble *params ); +typedef void( APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC )( GLenum target, GLuint index, GLfloat x, + GLfloat y, GLfloat z, GLfloat w ); +typedef void( APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC )( GLenum target, GLuint index, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC )( GLenum target, GLuint index, GLdouble x, + GLdouble y, GLdouble z, GLdouble w ); +typedef void( APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC )( GLenum target, GLuint index, + const GLdouble *params ); +typedef void( APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC )( GLenum target, GLuint index, GLfloat x, + GLfloat y, GLfloat z, GLfloat w ); +typedef void( APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC )( GLenum target, GLuint index, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC )( GLenum target, GLuint index, + GLdouble *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC )( GLenum target, GLuint index, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC )( GLenum target, GLuint index, + GLdouble *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC )( GLenum target, GLuint index, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMIVARBPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC )( GLenum target, GLenum pname, GLvoid *string ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC )( GLuint index, GLenum pname, GLdouble *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC )( GLuint index, GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC )( GLuint index, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC )( GLuint index, GLenum pname, + GLvoid **pointer ); +typedef GLboolean( APIENTRYP PFNGLISPROGRAMARBPROC )( GLuint program ); #endif #ifndef GL_ARB_fragment_program -#define GL_ARB_fragment_program 1 +# define GL_ARB_fragment_program 1 /* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ #endif #ifndef GL_ARB_vertex_buffer_object -#define GL_ARB_vertex_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer); -GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers); -GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers); -GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer); -GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); -GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); -GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); -GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum target, GLenum access); -GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target); -GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); +# define GL_ARB_vertex_buffer_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindBufferARB( GLenum target, GLuint buffer ); +GLAPI void APIENTRY glDeleteBuffersARB( GLsizei n, const GLuint *buffers ); +GLAPI void APIENTRY glGenBuffersARB( GLsizei n, GLuint *buffers ); +GLAPI GLboolean APIENTRY glIsBufferARB( GLuint buffer ); +GLAPI void APIENTRY glBufferDataARB( GLenum target, GLsizeiptrARB size, const GLvoid *data, + GLenum usage ); +GLAPI void APIENTRY glBufferSubDataARB( GLenum target, GLintptrARB offset, GLsizeiptrARB size, + const GLvoid *data ); +GLAPI void APIENTRY glGetBufferSubDataARB( GLenum target, GLintptrARB offset, GLsizeiptrARB size, + GLvoid *data ); +GLAPI GLvoid *APIENTRY glMapBufferARB( GLenum target, GLenum access ); +GLAPI GLboolean APIENTRY glUnmapBufferARB( GLenum target ); +GLAPI void APIENTRY glGetBufferParameterivARB( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetBufferPointervARB( GLenum target, GLenum pname, GLvoid **params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBINDBUFFERARBPROC )( GLenum target, GLuint buffer ); +typedef void( APIENTRYP PFNGLDELETEBUFFERSARBPROC )( GLsizei n, const GLuint *buffers ); +typedef void( APIENTRYP PFNGLGENBUFFERSARBPROC )( GLsizei n, GLuint *buffers ); +typedef GLboolean( APIENTRYP PFNGLISBUFFERARBPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLBUFFERDATAARBPROC )( GLenum target, GLsizeiptrARB size, const GLvoid *data, + GLenum usage ); +typedef void( APIENTRYP PFNGLBUFFERSUBDATAARBPROC )( GLenum target, GLintptrARB offset, + GLsizeiptrARB size, const GLvoid *data ); +typedef void( APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC )( GLenum target, GLintptrARB offset, + GLsizeiptrARB size, GLvoid *data ); +typedef GLvoid *( APIENTRYP PFNGLMAPBUFFERARBPROC )( GLenum target, GLenum access ); +typedef GLboolean( APIENTRYP PFNGLUNMAPBUFFERARBPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC )( GLenum target, GLenum pname, GLvoid **params ); #endif #ifndef GL_ARB_occlusion_query -#define GL_ARB_occlusion_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id); -GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id); -GLAPI void APIENTRY glEndQueryARB (GLenum target); -GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); +# define GL_ARB_occlusion_query 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueriesARB( GLsizei n, GLuint *ids ); +GLAPI void APIENTRY glDeleteQueriesARB( GLsizei n, const GLuint *ids ); +GLAPI GLboolean APIENTRY glIsQueryARB( GLuint id ); +GLAPI void APIENTRY glBeginQueryARB( GLenum target, GLuint id ); +GLAPI void APIENTRY glEndQueryARB( GLenum target ); +GLAPI void APIENTRY glGetQueryivARB( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetQueryObjectivARB( GLuint id, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetQueryObjectuivARB( GLuint id, GLenum pname, GLuint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGENQUERIESARBPROC )( GLsizei n, GLuint *ids ); +typedef void( APIENTRYP PFNGLDELETEQUERIESARBPROC )( GLsizei n, const GLuint *ids ); +typedef GLboolean( APIENTRYP PFNGLISQUERYARBPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLBEGINQUERYARBPROC )( GLenum target, GLuint id ); +typedef void( APIENTRYP PFNGLENDQUERYARBPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLGETQUERYIVARBPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC )( GLuint id, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC )( GLuint id, GLenum pname, GLuint *params ); #endif #ifndef GL_ARB_shader_objects -#define GL_ARB_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj); -GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname); -GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj); -GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType); -GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); -GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj); -GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); -GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj); -GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj); -GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj); -GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj); -GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0); -GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0); -GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); -GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); -GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name); -GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params); -GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params); -GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); -typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); -typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); -typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); -typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); -typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); -typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +# define GL_ARB_shader_objects 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteObjectARB( GLhandleARB obj ); +GLAPI GLhandleARB APIENTRY glGetHandleARB( GLenum pname ); +GLAPI void APIENTRY glDetachObjectARB( GLhandleARB containerObj, GLhandleARB attachedObj ); +GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB( GLenum shaderType ); +GLAPI void APIENTRY glShaderSourceARB( GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, + const GLint *length ); +GLAPI void APIENTRY glCompileShaderARB( GLhandleARB shaderObj ); +GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB( void ); +GLAPI void APIENTRY glAttachObjectARB( GLhandleARB containerObj, GLhandleARB obj ); +GLAPI void APIENTRY glLinkProgramARB( GLhandleARB programObj ); +GLAPI void APIENTRY glUseProgramObjectARB( GLhandleARB programObj ); +GLAPI void APIENTRY glValidateProgramARB( GLhandleARB programObj ); +GLAPI void APIENTRY glUniform1fARB( GLint location, GLfloat v0 ); +GLAPI void APIENTRY glUniform2fARB( GLint location, GLfloat v0, GLfloat v1 ); +GLAPI void APIENTRY glUniform3fARB( GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ); +GLAPI void APIENTRY glUniform4fARB( GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ); +GLAPI void APIENTRY glUniform1iARB( GLint location, GLint v0 ); +GLAPI void APIENTRY glUniform2iARB( GLint location, GLint v0, GLint v1 ); +GLAPI void APIENTRY glUniform3iARB( GLint location, GLint v0, GLint v1, GLint v2 ); +GLAPI void APIENTRY glUniform4iARB( GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ); +GLAPI void APIENTRY glUniform1fvARB( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform2fvARB( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform3fvARB( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform4fvARB( GLint location, GLsizei count, const GLfloat *value ); +GLAPI void APIENTRY glUniform1ivARB( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniform2ivARB( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniform3ivARB( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniform4ivARB( GLint location, GLsizei count, const GLint *value ); +GLAPI void APIENTRY glUniformMatrix2fvARB( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix3fvARB( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glUniformMatrix4fvARB( GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value ); +GLAPI void APIENTRY glGetObjectParameterfvARB( GLhandleARB obj, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetObjectParameterivARB( GLhandleARB obj, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetInfoLogARB( GLhandleARB obj, GLsizei maxLength, GLsizei *length, + GLcharARB *infoLog ); +GLAPI void APIENTRY glGetAttachedObjectsARB( GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, + GLhandleARB *obj ); +GLAPI GLint APIENTRY glGetUniformLocationARB( GLhandleARB programObj, const GLcharARB *name ); +GLAPI void APIENTRY glGetActiveUniformARB( GLhandleARB programObj, GLuint index, GLsizei maxLength, + GLsizei *length, GLint *size, GLenum *type, GLcharARB *name ); +GLAPI void APIENTRY glGetUniformfvARB( GLhandleARB programObj, GLint location, GLfloat *params ); +GLAPI void APIENTRY glGetUniformivARB( GLhandleARB programObj, GLint location, GLint *params ); +GLAPI void APIENTRY glGetShaderSourceARB( GLhandleARB obj, GLsizei maxLength, GLsizei *length, + GLcharARB *source ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDELETEOBJECTARBPROC )( GLhandleARB obj ); +typedef GLhandleARB( APIENTRYP PFNGLGETHANDLEARBPROC )( GLenum pname ); +typedef void( APIENTRYP PFNGLDETACHOBJECTARBPROC )( GLhandleARB containerObj, GLhandleARB attachedObj ); +typedef GLhandleARB( APIENTRYP PFNGLCREATESHADEROBJECTARBPROC )( GLenum shaderType ); +typedef void( APIENTRYP PFNGLSHADERSOURCEARBPROC )( GLhandleARB shaderObj, GLsizei count, + const GLcharARB **string, const GLint *length ); +typedef void( APIENTRYP PFNGLCOMPILESHADERARBPROC )( GLhandleARB shaderObj ); +typedef GLhandleARB( APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC )( void ); +typedef void( APIENTRYP PFNGLATTACHOBJECTARBPROC )( GLhandleARB containerObj, GLhandleARB obj ); +typedef void( APIENTRYP PFNGLLINKPROGRAMARBPROC )( GLhandleARB programObj ); +typedef void( APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC )( GLhandleARB programObj ); +typedef void( APIENTRYP PFNGLVALIDATEPROGRAMARBPROC )( GLhandleARB programObj ); +typedef void( APIENTRYP PFNGLUNIFORM1FARBPROC )( GLint location, GLfloat v0 ); +typedef void( APIENTRYP PFNGLUNIFORM2FARBPROC )( GLint location, GLfloat v0, GLfloat v1 ); +typedef void( APIENTRYP PFNGLUNIFORM3FARBPROC )( GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ); +typedef void( APIENTRYP PFNGLUNIFORM4FARBPROC )( GLint location, GLfloat v0, GLfloat v1, GLfloat v2, + GLfloat v3 ); +typedef void( APIENTRYP PFNGLUNIFORM1IARBPROC )( GLint location, GLint v0 ); +typedef void( APIENTRYP PFNGLUNIFORM2IARBPROC )( GLint location, GLint v0, GLint v1 ); +typedef void( APIENTRYP PFNGLUNIFORM3IARBPROC )( GLint location, GLint v0, GLint v1, GLint v2 ); +typedef void( APIENTRYP PFNGLUNIFORM4IARBPROC )( GLint location, GLint v0, GLint v1, GLint v2, + GLint v3 ); +typedef void( APIENTRYP PFNGLUNIFORM1FVARBPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM2FVARBPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM3FVARBPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM4FVARBPROC )( GLint location, GLsizei count, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORM1IVARBPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORM2IVARBPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORM3IVARBPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORM4IVARBPROC )( GLint location, GLsizei count, const GLint *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +typedef void( APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC )( GLhandleARB obj, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC )( GLhandleARB obj, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETINFOLOGARBPROC )( GLhandleARB obj, GLsizei maxLength, GLsizei *length, + GLcharARB *infoLog ); +typedef void( APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC )( GLhandleARB containerObj, GLsizei maxCount, + GLsizei *count, GLhandleARB *obj ); +typedef GLint( APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC )( GLhandleARB programObj, + const GLcharARB *name ); +typedef void( APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC )( GLhandleARB programObj, GLuint index, + GLsizei maxLength, GLsizei *length, GLint *size, + GLenum *type, GLcharARB *name ); +typedef void( APIENTRYP PFNGLGETUNIFORMFVARBPROC )( GLhandleARB programObj, GLint location, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETUNIFORMIVARBPROC )( GLhandleARB programObj, GLint location, + GLint *params ); +typedef void( APIENTRYP PFNGLGETSHADERSOURCEARBPROC )( GLhandleARB obj, GLsizei maxLength, + GLsizei *length, GLcharARB *source ); #endif #ifndef GL_ARB_vertex_shader -#define GL_ARB_vertex_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name); -GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +# define GL_ARB_vertex_shader 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindAttribLocationARB( GLhandleARB programObj, GLuint index, + const GLcharARB *name ); +GLAPI void APIENTRY glGetActiveAttribARB( GLhandleARB programObj, GLuint index, GLsizei maxLength, + GLsizei *length, GLint *size, GLenum *type, GLcharARB *name ); +GLAPI GLint APIENTRY glGetAttribLocationARB( GLhandleARB programObj, const GLcharARB *name ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC )( GLhandleARB programObj, GLuint index, + const GLcharARB *name ); +typedef void( APIENTRYP PFNGLGETACTIVEATTRIBARBPROC )( GLhandleARB programObj, GLuint index, + GLsizei maxLength, GLsizei *length, GLint *size, + GLenum *type, GLcharARB *name ); +typedef GLint( APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC )( GLhandleARB programObj, + const GLcharARB *name ); #endif #ifndef GL_ARB_fragment_shader -#define GL_ARB_fragment_shader 1 +# define GL_ARB_fragment_shader 1 #endif #ifndef GL_ARB_shading_language_100 -#define GL_ARB_shading_language_100 1 +# define GL_ARB_shading_language_100 1 #endif #ifndef GL_ARB_texture_non_power_of_two -#define GL_ARB_texture_non_power_of_two 1 +# define GL_ARB_texture_non_power_of_two 1 #endif #ifndef GL_ARB_point_sprite -#define GL_ARB_point_sprite 1 +# define GL_ARB_point_sprite 1 #endif #ifndef GL_ARB_fragment_program_shadow -#define GL_ARB_fragment_program_shadow 1 +# define GL_ARB_fragment_program_shadow 1 #endif #ifndef GL_ARB_draw_buffers -#define GL_ARB_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); +# define GL_ARB_draw_buffers 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersARB( GLsizei n, const GLenum *bufs ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWBUFFERSARBPROC )( GLsizei n, const GLenum *bufs ); #endif #ifndef GL_ARB_texture_rectangle -#define GL_ARB_texture_rectangle 1 +# define GL_ARB_texture_rectangle 1 #endif #ifndef GL_ARB_color_buffer_float -#define GL_ARB_color_buffer_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); +# define GL_ARB_color_buffer_float 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClampColorARB( GLenum target, GLenum clamp ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCLAMPCOLORARBPROC )( GLenum target, GLenum clamp ); #endif #ifndef GL_ARB_half_float_pixel -#define GL_ARB_half_float_pixel 1 +# define GL_ARB_half_float_pixel 1 #endif #ifndef GL_ARB_texture_float -#define GL_ARB_texture_float 1 +# define GL_ARB_texture_float 1 #endif #ifndef GL_ARB_pixel_buffer_object -#define GL_ARB_pixel_buffer_object 1 +# define GL_ARB_pixel_buffer_object 1 #endif #ifndef GL_ARB_depth_buffer_float -#define GL_ARB_depth_buffer_float 1 +# define GL_ARB_depth_buffer_float 1 #endif #ifndef GL_ARB_draw_instanced -#define GL_ARB_draw_instanced 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +# define GL_ARB_draw_instanced 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedARB( GLenum mode, GLint first, GLsizei count, + GLsizei primcount ); +GLAPI void APIENTRY glDrawElementsInstancedARB( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLsizei primcount ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC )( GLenum mode, GLint first, GLsizei count, + GLsizei primcount ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC )( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLsizei primcount ); #endif #ifndef GL_ARB_framebuffer_object -#define GL_ARB_framebuffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); -GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer); -GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); -GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target); -GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateMipmap (GLenum target); -GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); -typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); -typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +# define GL_ARB_framebuffer_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glIsRenderbuffer( GLuint renderbuffer ); +GLAPI void APIENTRY glBindRenderbuffer( GLenum target, GLuint renderbuffer ); +GLAPI void APIENTRY glDeleteRenderbuffers( GLsizei n, const GLuint *renderbuffers ); +GLAPI void APIENTRY glGenRenderbuffers( GLsizei n, GLuint *renderbuffers ); +GLAPI void APIENTRY glRenderbufferStorage( GLenum target, GLenum internalformat, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glGetRenderbufferParameteriv( GLenum target, GLenum pname, GLint *params ); +GLAPI GLboolean APIENTRY glIsFramebuffer( GLuint framebuffer ); +GLAPI void APIENTRY glBindFramebuffer( GLenum target, GLuint framebuffer ); +GLAPI void APIENTRY glDeleteFramebuffers( GLsizei n, const GLuint *framebuffers ); +GLAPI void APIENTRY glGenFramebuffers( GLsizei n, GLuint *framebuffers ); +GLAPI GLenum APIENTRY glCheckFramebufferStatus( GLenum target ); +GLAPI void APIENTRY glFramebufferTexture1D( GLenum target, GLenum attachment, GLenum textarget, + GLuint texture, GLint level ); +GLAPI void APIENTRY glFramebufferTexture2D( GLenum target, GLenum attachment, GLenum textarget, + GLuint texture, GLint level ); +GLAPI void APIENTRY glFramebufferTexture3D( GLenum target, GLenum attachment, GLenum textarget, + GLuint texture, GLint level, GLint zoffset ); +GLAPI void APIENTRY glFramebufferRenderbuffer( GLenum target, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer ); +GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv( GLenum target, GLenum attachment, + GLenum pname, GLint *params ); +GLAPI void APIENTRY glGenerateMipmap( GLenum target ); +GLAPI void APIENTRY glBlitFramebuffer( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, + GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, + GLenum filter ); +GLAPI void APIENTRY glRenderbufferStorageMultisample( GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glFramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, + GLint level, GLint layer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean( APIENTRYP PFNGLISRENDERBUFFERPROC )( GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLBINDRENDERBUFFERPROC )( GLenum target, GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLDELETERENDERBUFFERSPROC )( GLsizei n, const GLuint *renderbuffers ); +typedef void( APIENTRYP PFNGLGENRENDERBUFFERSPROC )( GLsizei n, GLuint *renderbuffers ); +typedef void( APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC )( GLenum target, GLenum internalformat, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef GLboolean( APIENTRYP PFNGLISFRAMEBUFFERPROC )( GLuint framebuffer ); +typedef void( APIENTRYP PFNGLBINDFRAMEBUFFERPROC )( GLenum target, GLuint framebuffer ); +typedef void( APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC )( GLsizei n, const GLuint *framebuffers ); +typedef void( APIENTRYP PFNGLGENFRAMEBUFFERSPROC )( GLsizei n, GLuint *framebuffers ); +typedef GLenum( APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC )( GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC )( GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC )( GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level, + GLint zoffset ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC )( GLenum target, GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC )( GLenum target, GLenum attachment, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGENERATEMIPMAPPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLBLITFRAMEBUFFERPROC )( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter ); +typedef void( APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC )( GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level, GLint layer ); #endif #ifndef GL_ARB_framebuffer_sRGB -#define GL_ARB_framebuffer_sRGB 1 +# define GL_ARB_framebuffer_sRGB 1 #endif #ifndef GL_ARB_geometry_shader4 -#define GL_ARB_geometry_shader4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value); -GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +# define GL_ARB_geometry_shader4 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriARB( GLuint program, GLenum pname, GLint value ); +GLAPI void APIENTRY glFramebufferTextureARB( GLenum target, GLenum attachment, GLuint texture, + GLint level ); +GLAPI void APIENTRY glFramebufferTextureLayerARB( GLenum target, GLenum attachment, GLuint texture, + GLint level, GLint layer ); +GLAPI void APIENTRY glFramebufferTextureFaceARB( GLenum target, GLenum attachment, GLuint texture, + GLint level, GLenum face ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC )( GLuint program, GLenum pname, GLint value ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level, + GLint layer ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level, GLenum face ); #endif #ifndef GL_ARB_half_float_vertex -#define GL_ARB_half_float_vertex 1 +# define GL_ARB_half_float_vertex 1 #endif #ifndef GL_ARB_instanced_arrays -#define GL_ARB_instanced_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); +# define GL_ARB_instanced_arrays 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisorARB( GLuint index, GLuint divisor ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC )( GLuint index, GLuint divisor ); #endif #ifndef GL_ARB_map_buffer_range -#define GL_ARB_map_buffer_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLvoid* APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +# define GL_ARB_map_buffer_range 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLvoid *APIENTRY glMapBufferRange( GLenum target, GLintptr offset, GLsizeiptr length, + GLbitfield access ); +GLAPI void APIENTRY glFlushMappedBufferRange( GLenum target, GLintptr offset, GLsizeiptr length ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLvoid *( APIENTRYP PFNGLMAPBUFFERRANGEPROC )( GLenum target, GLintptr offset, GLsizeiptr length, + GLbitfield access ); +typedef void( APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC )( GLenum target, GLintptr offset, + GLsizeiptr length ); #endif #ifndef GL_ARB_texture_buffer_object -#define GL_ARB_texture_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); +# define GL_ARB_texture_buffer_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferARB( GLenum target, GLenum internalformat, GLuint buffer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXBUFFERARBPROC )( GLenum target, GLenum internalformat, GLuint buffer ); #endif #ifndef GL_ARB_texture_compression_rgtc -#define GL_ARB_texture_compression_rgtc 1 +# define GL_ARB_texture_compression_rgtc 1 #endif #ifndef GL_ARB_texture_rg -#define GL_ARB_texture_rg 1 +# define GL_ARB_texture_rg 1 #endif #ifndef GL_ARB_vertex_array_object -#define GL_ARB_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindVertexArray (GLuint array); -GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); -GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); -GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); +# define GL_ARB_vertex_array_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexArray( GLuint array ); +GLAPI void APIENTRY glDeleteVertexArrays( GLsizei n, const GLuint *arrays ); +GLAPI void APIENTRY glGenVertexArrays( GLsizei n, GLuint *arrays ); +GLAPI GLboolean APIENTRY glIsVertexArray( GLuint array ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBINDVERTEXARRAYPROC )( GLuint array ); +typedef void( APIENTRYP PFNGLDELETEVERTEXARRAYSPROC )( GLsizei n, const GLuint *arrays ); +typedef void( APIENTRYP PFNGLGENVERTEXARRAYSPROC )( GLsizei n, GLuint *arrays ); +typedef GLboolean( APIENTRYP PFNGLISVERTEXARRAYPROC )( GLuint array ); #endif #ifndef GL_ARB_uniform_buffer_object -#define GL_ARB_uniform_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices); -GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); -GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +# define GL_ARB_uniform_buffer_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUniformIndices( GLuint program, GLsizei uniformCount, + const GLchar *const *uniformNames, GLuint *uniformIndices ); +GLAPI void APIENTRY glGetActiveUniformsiv( GLuint program, GLsizei uniformCount, + const GLuint *uniformIndices, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetActiveUniformName( GLuint program, GLuint uniformIndex, GLsizei bufSize, + GLsizei *length, GLchar *uniformName ); +GLAPI GLuint APIENTRY glGetUniformBlockIndex( GLuint program, const GLchar *uniformBlockName ); +GLAPI void APIENTRY glGetActiveUniformBlockiv( GLuint program, GLuint uniformBlockIndex, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetActiveUniformBlockName( GLuint program, GLuint uniformBlockIndex, + GLsizei bufSize, GLsizei *length, + GLchar *uniformBlockName ); +GLAPI void APIENTRY glUniformBlockBinding( GLuint program, GLuint uniformBlockIndex, + GLuint uniformBlockBinding ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETUNIFORMINDICESPROC )( GLuint program, GLsizei uniformCount, + const GLchar *const *uniformNames, + GLuint * uniformIndices ); +typedef void( APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC )( GLuint program, GLsizei uniformCount, + const GLuint *uniformIndices, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC )( GLuint program, GLuint uniformIndex, + GLsizei bufSize, GLsizei *length, + GLchar *uniformName ); +typedef GLuint( APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC )( GLuint program, + const GLchar *uniformBlockName ); +typedef void( APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC )( GLuint program, GLuint uniformBlockIndex, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC )( GLuint program, GLuint uniformBlockIndex, + GLsizei bufSize, GLsizei *length, + GLchar *uniformBlockName ); +typedef void( APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC )( GLuint program, GLuint uniformBlockIndex, + GLuint uniformBlockBinding ); #endif #ifndef GL_ARB_compatibility -#define GL_ARB_compatibility 1 +# define GL_ARB_compatibility 1 #endif #ifndef GL_ARB_copy_buffer -#define GL_ARB_copy_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +# define GL_ARB_copy_buffer 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyBufferSubData( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, + GLintptr writeOffset, GLsizeiptr size ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC )( GLenum readTarget, GLenum writeTarget, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size ); #endif #ifndef GL_ARB_shader_texture_lod -#define GL_ARB_shader_texture_lod 1 +# define GL_ARB_shader_texture_lod 1 #endif #ifndef GL_ARB_depth_clamp -#define GL_ARB_depth_clamp 1 +# define GL_ARB_depth_clamp 1 #endif #ifndef GL_ARB_draw_elements_base_vertex -#define GL_ARB_draw_elements_base_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount, GLint basevertex); -GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount, const GLint *basevertex); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount, GLint basevertex); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount, const GLint *basevertex); +# define GL_ARB_draw_elements_base_vertex 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawElementsBaseVertex( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLint basevertex ); +GLAPI void APIENTRY glDrawRangeElementsBaseVertex( GLenum mode, GLuint start, GLuint end, GLsizei count, + GLenum type, const GLvoid *indices, + GLint basevertex ); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertex( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLsizei instancecount, + GLint basevertex ); +GLAPI void APIENTRY glMultiDrawElementsBaseVertex( GLenum mode, const GLsizei *count, GLenum type, + const GLvoid *const *indices, GLsizei drawcount, + const GLint *basevertex ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC )( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLint basevertex ); +typedef void( APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC )( GLenum mode, GLuint start, GLuint end, + GLsizei count, GLenum type, + const GLvoid *indices, + GLint basevertex ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC )( GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, + GLsizei instancecount, + GLint basevertex ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC )( GLenum mode, const GLsizei *count, + GLenum type, + const GLvoid *const *indices, + GLsizei drawcount, + const GLint * basevertex ); #endif #ifndef GL_ARB_fragment_coord_conventions -#define GL_ARB_fragment_coord_conventions 1 +# define GL_ARB_fragment_coord_conventions 1 #endif #ifndef GL_ARB_provoking_vertex -#define GL_ARB_provoking_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProvokingVertex (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode); +# define GL_ARB_provoking_vertex 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProvokingVertex( GLenum mode ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPROVOKINGVERTEXPROC )( GLenum mode ); #endif #ifndef GL_ARB_seamless_cube_map -#define GL_ARB_seamless_cube_map 1 +# define GL_ARB_seamless_cube_map 1 #endif #ifndef GL_ARB_sync -#define GL_ARB_sync 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); -GLAPI GLboolean APIENTRY glIsSync (GLsync sync); -GLAPI void APIENTRY glDeleteSync (GLsync sync); -GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *params); -GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); -typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); -typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +# define GL_ARB_sync 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glFenceSync( GLenum condition, GLbitfield flags ); +GLAPI GLboolean APIENTRY glIsSync( GLsync sync ); +GLAPI void APIENTRY glDeleteSync( GLsync sync ); +GLAPI GLenum APIENTRY glClientWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout ); +GLAPI void APIENTRY glWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout ); +GLAPI void APIENTRY glGetInteger64v( GLenum pname, GLint64 *params ); +GLAPI void APIENTRY glGetSynciv( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, + GLint *values ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLsync( APIENTRYP PFNGLFENCESYNCPROC )( GLenum condition, GLbitfield flags ); +typedef GLboolean( APIENTRYP PFNGLISSYNCPROC )( GLsync sync ); +typedef void( APIENTRYP PFNGLDELETESYNCPROC )( GLsync sync ); +typedef GLenum( APIENTRYP PFNGLCLIENTWAITSYNCPROC )( GLsync sync, GLbitfield flags, GLuint64 timeout ); +typedef void( APIENTRYP PFNGLWAITSYNCPROC )( GLsync sync, GLbitfield flags, GLuint64 timeout ); +typedef void( APIENTRYP PFNGLGETINTEGER64VPROC )( GLenum pname, GLint64 *params ); +typedef void( APIENTRYP PFNGLGETSYNCIVPROC )( GLsync sync, GLenum pname, GLsizei bufSize, + GLsizei *length, GLint *values ); #endif #ifndef GL_ARB_texture_multisample -#define GL_ARB_texture_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); -GLAPI void APIENTRY glSampleMaski (GLuint index, GLbitfield mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask); +# define GL_ARB_texture_multisample 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage2DMultisample( GLenum target, GLsizei samples, GLint internalformat, + GLsizei width, GLsizei height, + GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glTexImage3DMultisample( GLenum target, GLsizei samples, GLint internalformat, + GLsizei width, GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glGetMultisamplefv( GLenum pname, GLuint index, GLfloat *val ); +GLAPI void APIENTRY glSampleMaski( GLuint index, GLbitfield mask ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC )( GLenum target, GLsizei samples, + GLint internalformat, GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC )( GLenum target, GLsizei samples, + GLint internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLGETMULTISAMPLEFVPROC )( GLenum pname, GLuint index, GLfloat *val ); +typedef void( APIENTRYP PFNGLSAMPLEMASKIPROC )( GLuint index, GLbitfield mask ); #endif #ifndef GL_ARB_vertex_array_bgra -#define GL_ARB_vertex_array_bgra 1 +# define GL_ARB_vertex_array_bgra 1 #endif #ifndef GL_ARB_draw_buffers_blend -#define GL_ARB_draw_buffers_blend 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +# define GL_ARB_draw_buffers_blend 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationiARB( GLuint buf, GLenum mode ); +GLAPI void APIENTRY glBlendEquationSeparateiARB( GLuint buf, GLenum modeRGB, GLenum modeAlpha ); +GLAPI void APIENTRY glBlendFunciARB( GLuint buf, GLenum src, GLenum dst ); +GLAPI void APIENTRY glBlendFuncSeparateiARB( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, + GLenum dstAlpha ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBLENDEQUATIONIARBPROC )( GLuint buf, GLenum mode ); +typedef void( APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC )( GLuint buf, GLenum modeRGB, + GLenum modeAlpha ); +typedef void( APIENTRYP PFNGLBLENDFUNCIARBPROC )( GLuint buf, GLenum src, GLenum dst ); +typedef void( APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC )( GLuint buf, GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha ); #endif #ifndef GL_ARB_sample_shading -#define GL_ARB_sample_shading 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value); +# define GL_ARB_sample_shading 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShadingARB( GLfloat value ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLMINSAMPLESHADINGARBPROC )( GLfloat value ); #endif #ifndef GL_ARB_texture_cube_map_array -#define GL_ARB_texture_cube_map_array 1 +# define GL_ARB_texture_cube_map_array 1 #endif #ifndef GL_ARB_texture_gather -#define GL_ARB_texture_gather 1 +# define GL_ARB_texture_gather 1 #endif #ifndef GL_ARB_texture_query_lod -#define GL_ARB_texture_query_lod 1 +# define GL_ARB_texture_query_lod 1 #endif #ifndef GL_ARB_shading_language_include -#define GL_ARB_shading_language_include 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); -GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name); -GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); -GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name); -GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); -GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); -typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); -typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); -typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); -typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +# define GL_ARB_shading_language_include 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glNamedStringARB( GLenum type, GLint namelen, const GLchar *name, GLint stringlen, + const GLchar *string ); +GLAPI void APIENTRY glDeleteNamedStringARB( GLint namelen, const GLchar *name ); +GLAPI void APIENTRY glCompileShaderIncludeARB( GLuint shader, GLsizei count, const GLchar **path, + const GLint *length ); +GLAPI GLboolean APIENTRY glIsNamedStringARB( GLint namelen, const GLchar *name ); +GLAPI void APIENTRY glGetNamedStringARB( GLint namelen, const GLchar *name, GLsizei bufSize, + GLint *stringlen, GLchar *string ); +GLAPI void APIENTRY glGetNamedStringivARB( GLint namelen, const GLchar *name, GLenum pname, + GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLNAMEDSTRINGARBPROC )( GLenum type, GLint namelen, const GLchar *name, + GLint stringlen, const GLchar *string ); +typedef void( APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC )( GLint namelen, const GLchar *name ); +typedef void( APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC )( GLuint shader, GLsizei count, + const GLchar **path, const GLint *length ); +typedef GLboolean( APIENTRYP PFNGLISNAMEDSTRINGARBPROC )( GLint namelen, const GLchar *name ); +typedef void( APIENTRYP PFNGLGETNAMEDSTRINGARBPROC )( GLint namelen, const GLchar *name, GLsizei bufSize, + GLint *stringlen, GLchar *string ); +typedef void( APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC )( GLint namelen, const GLchar *name, GLenum pname, + GLint *params ); #endif #ifndef GL_ARB_texture_compression_bptc -#define GL_ARB_texture_compression_bptc 1 +# define GL_ARB_texture_compression_bptc 1 #endif #ifndef GL_ARB_blend_func_extended -#define GL_ARB_blend_func_extended 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); +# define GL_ARB_blend_func_extended 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindFragDataLocationIndexed( GLuint program, GLuint colorNumber, GLuint index, + const GLchar *name ); +GLAPI GLint APIENTRY glGetFragDataIndex( GLuint program, const GLchar *name ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC )( GLuint program, GLuint colorNumber, + GLuint index, const GLchar *name ); +typedef GLint( APIENTRYP PFNGLGETFRAGDATAINDEXPROC )( GLuint program, const GLchar *name ); #endif #ifndef GL_ARB_explicit_attrib_location -#define GL_ARB_explicit_attrib_location 1 +# define GL_ARB_explicit_attrib_location 1 #endif #ifndef GL_ARB_occlusion_query2 -#define GL_ARB_occlusion_query2 1 +# define GL_ARB_occlusion_query2 1 #endif #ifndef GL_ARB_sampler_objects -#define GL_ARB_sampler_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); -GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); -GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler); -GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler); -GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); -GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); -GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); -GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); -GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); -GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); -GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); -typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); -typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); -typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); +# define GL_ARB_sampler_objects 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenSamplers( GLsizei count, GLuint *samplers ); +GLAPI void APIENTRY glDeleteSamplers( GLsizei count, const GLuint *samplers ); +GLAPI GLboolean APIENTRY glIsSampler( GLuint sampler ); +GLAPI void APIENTRY glBindSampler( GLuint unit, GLuint sampler ); +GLAPI void APIENTRY glSamplerParameteri( GLuint sampler, GLenum pname, GLint param ); +GLAPI void APIENTRY glSamplerParameteriv( GLuint sampler, GLenum pname, const GLint *param ); +GLAPI void APIENTRY glSamplerParameterf( GLuint sampler, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glSamplerParameterfv( GLuint sampler, GLenum pname, const GLfloat *param ); +GLAPI void APIENTRY glSamplerParameterIiv( GLuint sampler, GLenum pname, const GLint *param ); +GLAPI void APIENTRY glSamplerParameterIuiv( GLuint sampler, GLenum pname, const GLuint *param ); +GLAPI void APIENTRY glGetSamplerParameteriv( GLuint sampler, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetSamplerParameterIiv( GLuint sampler, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetSamplerParameterfv( GLuint sampler, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetSamplerParameterIuiv( GLuint sampler, GLenum pname, GLuint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGENSAMPLERSPROC )( GLsizei count, GLuint *samplers ); +typedef void( APIENTRYP PFNGLDELETESAMPLERSPROC )( GLsizei count, const GLuint *samplers ); +typedef GLboolean( APIENTRYP PFNGLISSAMPLERPROC )( GLuint sampler ); +typedef void( APIENTRYP PFNGLBINDSAMPLERPROC )( GLuint unit, GLuint sampler ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERIPROC )( GLuint sampler, GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERIVPROC )( GLuint sampler, GLenum pname, + const GLint *param ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERFPROC )( GLuint sampler, GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERFVPROC )( GLuint sampler, GLenum pname, + const GLfloat *param ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC )( GLuint sampler, GLenum pname, + const GLint *param ); +typedef void( APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC )( GLuint sampler, GLenum pname, + const GLuint *param ); +typedef void( APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC )( GLuint sampler, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC )( GLuint sampler, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC )( GLuint sampler, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC )( GLuint sampler, GLenum pname, + GLuint *params ); #endif #ifndef GL_ARB_shader_bit_encoding -#define GL_ARB_shader_bit_encoding 1 +# define GL_ARB_shader_bit_encoding 1 #endif #ifndef GL_ARB_texture_rgb10_a2ui -#define GL_ARB_texture_rgb10_a2ui 1 +# define GL_ARB_texture_rgb10_a2ui 1 #endif #ifndef GL_ARB_texture_swizzle -#define GL_ARB_texture_swizzle 1 +# define GL_ARB_texture_swizzle 1 #endif #ifndef GL_ARB_timer_query -#define GL_ARB_timer_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target); -GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); +# define GL_ARB_timer_query 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glQueryCounter( GLuint id, GLenum target ); +GLAPI void APIENTRY glGetQueryObjecti64v( GLuint id, GLenum pname, GLint64 *params ); +GLAPI void APIENTRY glGetQueryObjectui64v( GLuint id, GLenum pname, GLuint64 *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLQUERYCOUNTERPROC )( GLuint id, GLenum target ); +typedef void( APIENTRYP PFNGLGETQUERYOBJECTI64VPROC )( GLuint id, GLenum pname, GLint64 *params ); +typedef void( APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC )( GLuint id, GLenum pname, GLuint64 *params ); #endif #ifndef GL_ARB_vertex_type_2_10_10_10_rev -#define GL_ARB_vertex_type_2_10_10_10_rev 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color); -GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color); -GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color); -GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color); -GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color); -GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color); -GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color); -typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color); -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +# define GL_ARB_vertex_type_2_10_10_10_rev 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexP2ui( GLenum type, GLuint value ); +GLAPI void APIENTRY glVertexP2uiv( GLenum type, const GLuint *value ); +GLAPI void APIENTRY glVertexP3ui( GLenum type, GLuint value ); +GLAPI void APIENTRY glVertexP3uiv( GLenum type, const GLuint *value ); +GLAPI void APIENTRY glVertexP4ui( GLenum type, GLuint value ); +GLAPI void APIENTRY glVertexP4uiv( GLenum type, const GLuint *value ); +GLAPI void APIENTRY glTexCoordP1ui( GLenum type, GLuint coords ); +GLAPI void APIENTRY glTexCoordP1uiv( GLenum type, const GLuint *coords ); +GLAPI void APIENTRY glTexCoordP2ui( GLenum type, GLuint coords ); +GLAPI void APIENTRY glTexCoordP2uiv( GLenum type, const GLuint *coords ); +GLAPI void APIENTRY glTexCoordP3ui( GLenum type, GLuint coords ); +GLAPI void APIENTRY glTexCoordP3uiv( GLenum type, const GLuint *coords ); +GLAPI void APIENTRY glTexCoordP4ui( GLenum type, GLuint coords ); +GLAPI void APIENTRY glTexCoordP4uiv( GLenum type, const GLuint *coords ); +GLAPI void APIENTRY glMultiTexCoordP1ui( GLenum texture, GLenum type, GLuint coords ); +GLAPI void APIENTRY glMultiTexCoordP1uiv( GLenum texture, GLenum type, const GLuint *coords ); +GLAPI void APIENTRY glMultiTexCoordP2ui( GLenum texture, GLenum type, GLuint coords ); +GLAPI void APIENTRY glMultiTexCoordP2uiv( GLenum texture, GLenum type, const GLuint *coords ); +GLAPI void APIENTRY glMultiTexCoordP3ui( GLenum texture, GLenum type, GLuint coords ); +GLAPI void APIENTRY glMultiTexCoordP3uiv( GLenum texture, GLenum type, const GLuint *coords ); +GLAPI void APIENTRY glMultiTexCoordP4ui( GLenum texture, GLenum type, GLuint coords ); +GLAPI void APIENTRY glMultiTexCoordP4uiv( GLenum texture, GLenum type, const GLuint *coords ); +GLAPI void APIENTRY glNormalP3ui( GLenum type, GLuint coords ); +GLAPI void APIENTRY glNormalP3uiv( GLenum type, const GLuint *coords ); +GLAPI void APIENTRY glColorP3ui( GLenum type, GLuint color ); +GLAPI void APIENTRY glColorP3uiv( GLenum type, const GLuint *color ); +GLAPI void APIENTRY glColorP4ui( GLenum type, GLuint color ); +GLAPI void APIENTRY glColorP4uiv( GLenum type, const GLuint *color ); +GLAPI void APIENTRY glSecondaryColorP3ui( GLenum type, GLuint color ); +GLAPI void APIENTRY glSecondaryColorP3uiv( GLenum type, const GLuint *color ); +GLAPI void APIENTRY glVertexAttribP1ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ); +GLAPI void APIENTRY glVertexAttribP1uiv( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +GLAPI void APIENTRY glVertexAttribP2ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ); +GLAPI void APIENTRY glVertexAttribP2uiv( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +GLAPI void APIENTRY glVertexAttribP3ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ); +GLAPI void APIENTRY glVertexAttribP3uiv( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +GLAPI void APIENTRY glVertexAttribP4ui( GLuint index, GLenum type, GLboolean normalized, GLuint value ); +GLAPI void APIENTRY glVertexAttribP4uiv( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXP2UIPROC )( GLenum type, GLuint value ); +typedef void( APIENTRYP PFNGLVERTEXP2UIVPROC )( GLenum type, const GLuint *value ); +typedef void( APIENTRYP PFNGLVERTEXP3UIPROC )( GLenum type, GLuint value ); +typedef void( APIENTRYP PFNGLVERTEXP3UIVPROC )( GLenum type, const GLuint *value ); +typedef void( APIENTRYP PFNGLVERTEXP4UIPROC )( GLenum type, GLuint value ); +typedef void( APIENTRYP PFNGLVERTEXP4UIVPROC )( GLenum type, const GLuint *value ); +typedef void( APIENTRYP PFNGLTEXCOORDP1UIPROC )( GLenum type, GLuint coords ); +typedef void( APIENTRYP PFNGLTEXCOORDP1UIVPROC )( GLenum type, const GLuint *coords ); +typedef void( APIENTRYP PFNGLTEXCOORDP2UIPROC )( GLenum type, GLuint coords ); +typedef void( APIENTRYP PFNGLTEXCOORDP2UIVPROC )( GLenum type, const GLuint *coords ); +typedef void( APIENTRYP PFNGLTEXCOORDP3UIPROC )( GLenum type, GLuint coords ); +typedef void( APIENTRYP PFNGLTEXCOORDP3UIVPROC )( GLenum type, const GLuint *coords ); +typedef void( APIENTRYP PFNGLTEXCOORDP4UIPROC )( GLenum type, GLuint coords ); +typedef void( APIENTRYP PFNGLTEXCOORDP4UIVPROC )( GLenum type, const GLuint *coords ); +typedef void( APIENTRYP PFNGLMULTITEXCOORDP1UIPROC )( GLenum texture, GLenum type, GLuint coords ); +typedef void( APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC )( GLenum texture, GLenum type, + const GLuint *coords ); +typedef void( APIENTRYP PFNGLMULTITEXCOORDP2UIPROC )( GLenum texture, GLenum type, GLuint coords ); +typedef void( APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC )( GLenum texture, GLenum type, + const GLuint *coords ); +typedef void( APIENTRYP PFNGLMULTITEXCOORDP3UIPROC )( GLenum texture, GLenum type, GLuint coords ); +typedef void( APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC )( GLenum texture, GLenum type, + const GLuint *coords ); +typedef void( APIENTRYP PFNGLMULTITEXCOORDP4UIPROC )( GLenum texture, GLenum type, GLuint coords ); +typedef void( APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC )( GLenum texture, GLenum type, + const GLuint *coords ); +typedef void( APIENTRYP PFNGLNORMALP3UIPROC )( GLenum type, GLuint coords ); +typedef void( APIENTRYP PFNGLNORMALP3UIVPROC )( GLenum type, const GLuint *coords ); +typedef void( APIENTRYP PFNGLCOLORP3UIPROC )( GLenum type, GLuint color ); +typedef void( APIENTRYP PFNGLCOLORP3UIVPROC )( GLenum type, const GLuint *color ); +typedef void( APIENTRYP PFNGLCOLORP4UIPROC )( GLenum type, GLuint color ); +typedef void( APIENTRYP PFNGLCOLORP4UIVPROC )( GLenum type, const GLuint *color ); +typedef void( APIENTRYP PFNGLSECONDARYCOLORP3UIPROC )( GLenum type, GLuint color ); +typedef void( APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC )( GLenum type, const GLuint *color ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP1UIPROC )( GLuint index, GLenum type, GLboolean normalized, + GLuint value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC )( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP2UIPROC )( GLuint index, GLenum type, GLboolean normalized, + GLuint value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC )( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP3UIPROC )( GLuint index, GLenum type, GLboolean normalized, + GLuint value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC )( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP4UIPROC )( GLuint index, GLenum type, GLboolean normalized, + GLuint value ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC )( GLuint index, GLenum type, GLboolean normalized, + const GLuint *value ); #endif #ifndef GL_ARB_draw_indirect -#define GL_ARB_draw_indirect 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const GLvoid *indirect); -GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const GLvoid *indirect); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid *indirect); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect); +# define GL_ARB_draw_indirect 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysIndirect( GLenum mode, const GLvoid *indirect ); +GLAPI void APIENTRY glDrawElementsIndirect( GLenum mode, GLenum type, const GLvoid *indirect ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC )( GLenum mode, const GLvoid *indirect ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC )( GLenum mode, GLenum type, + const GLvoid *indirect ); #endif #ifndef GL_ARB_gpu_shader5 -#define GL_ARB_gpu_shader5 1 +# define GL_ARB_gpu_shader5 1 #endif #ifndef GL_ARB_gpu_shader_fp64 -#define GL_ARB_gpu_shader_fp64 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x); -GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y); -GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); -typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); +# define GL_ARB_gpu_shader_fp64 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1d( GLint location, GLdouble x ); +GLAPI void APIENTRY glUniform2d( GLint location, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glUniform3d( GLint location, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glUniform4d( GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glUniform1dv( GLint location, GLsizei count, const GLdouble *value ); +GLAPI void APIENTRY glUniform2dv( GLint location, GLsizei count, const GLdouble *value ); +GLAPI void APIENTRY glUniform3dv( GLint location, GLsizei count, const GLdouble *value ); +GLAPI void APIENTRY glUniform4dv( GLint location, GLsizei count, const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix2dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix3dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix4dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix2x3dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix2x4dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix3x2dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix3x4dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix4x2dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glUniformMatrix4x3dv( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +GLAPI void APIENTRY glGetUniformdv( GLuint program, GLint location, GLdouble *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLUNIFORM1DPROC )( GLint location, GLdouble x ); +typedef void( APIENTRYP PFNGLUNIFORM2DPROC )( GLint location, GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLUNIFORM3DPROC )( GLint location, GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLUNIFORM4DPROC )( GLint location, GLdouble x, GLdouble y, GLdouble z, + GLdouble w ); +typedef void( APIENTRYP PFNGLUNIFORM1DVPROC )( GLint location, GLsizei count, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORM2DVPROC )( GLint location, GLsizei count, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORM3DVPROC )( GLint location, GLsizei count, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORM4DVPROC )( GLint location, GLsizei count, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2DVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3DVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4DVPROC )( GLint location, GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC )( GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +typedef void( APIENTRYP PFNGLGETUNIFORMDVPROC )( GLuint program, GLint location, GLdouble *params ); #endif #ifndef GL_ARB_shader_subroutine -#define GL_ARB_shader_subroutine 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); -GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); -GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); -GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); -GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); -typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); -typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +# define GL_ARB_shader_subroutine 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLint APIENTRY glGetSubroutineUniformLocation( GLuint program, GLenum shadertype, + const GLchar *name ); +GLAPI GLuint APIENTRY glGetSubroutineIndex( GLuint program, GLenum shadertype, const GLchar *name ); +GLAPI void APIENTRY glGetActiveSubroutineUniformiv( GLuint program, GLenum shadertype, GLuint index, + GLenum pname, GLint *values ); +GLAPI void APIENTRY glGetActiveSubroutineUniformName( GLuint program, GLenum shadertype, GLuint index, + GLsizei bufsize, GLsizei *length, GLchar *name ); +GLAPI void APIENTRY glGetActiveSubroutineName( GLuint program, GLenum shadertype, GLuint index, + GLsizei bufsize, GLsizei *length, GLchar *name ); +GLAPI void APIENTRY glUniformSubroutinesuiv( GLenum shadertype, GLsizei count, const GLuint *indices ); +GLAPI void APIENTRY glGetUniformSubroutineuiv( GLenum shadertype, GLint location, GLuint *params ); +GLAPI void APIENTRY glGetProgramStageiv( GLuint program, GLenum shadertype, GLenum pname, + GLint *values ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLint( APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC )( GLuint program, GLenum shadertype, + const GLchar *name ); +typedef GLuint( APIENTRYP PFNGLGETSUBROUTINEINDEXPROC )( GLuint program, GLenum shadertype, + const GLchar *name ); +typedef void( APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC )( GLuint program, GLenum shadertype, + GLuint index, GLenum pname, + GLint *values ); +typedef void( APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC )( GLuint program, GLenum shadertype, + GLuint index, GLsizei bufsize, + GLsizei *length, GLchar *name ); +typedef void( APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC )( GLuint program, GLenum shadertype, + GLuint index, GLsizei bufsize, + GLsizei *length, GLchar *name ); +typedef void( APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC )( GLenum shadertype, GLsizei count, + const GLuint *indices ); +typedef void( APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC )( GLenum shadertype, GLint location, + GLuint *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC )( GLuint program, GLenum shadertype, GLenum pname, + GLint *values ); #endif #ifndef GL_ARB_tessellation_shader -#define GL_ARB_tessellation_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value); -GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); +# define GL_ARB_tessellation_shader 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPatchParameteri( GLenum pname, GLint value ); +GLAPI void APIENTRY glPatchParameterfv( GLenum pname, const GLfloat *values ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPATCHPARAMETERIPROC )( GLenum pname, GLint value ); +typedef void( APIENTRYP PFNGLPATCHPARAMETERFVPROC )( GLenum pname, const GLfloat *values ); #endif #ifndef GL_ARB_texture_buffer_object_rgb32 -#define GL_ARB_texture_buffer_object_rgb32 1 +# define GL_ARB_texture_buffer_object_rgb32 1 #endif #ifndef GL_ARB_transform_feedback2 -#define GL_ARB_transform_feedback2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); -GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); -GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id); -GLAPI void APIENTRY glPauseTransformFeedback (void); -GLAPI void APIENTRY glResumeTransformFeedback (void); -GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); -typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); -typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); +# define GL_ARB_transform_feedback2 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindTransformFeedback( GLenum target, GLuint id ); +GLAPI void APIENTRY glDeleteTransformFeedbacks( GLsizei n, const GLuint *ids ); +GLAPI void APIENTRY glGenTransformFeedbacks( GLsizei n, GLuint *ids ); +GLAPI GLboolean APIENTRY glIsTransformFeedback( GLuint id ); +GLAPI void APIENTRY glPauseTransformFeedback( void ); +GLAPI void APIENTRY glResumeTransformFeedback( void ); +GLAPI void APIENTRY glDrawTransformFeedback( GLenum mode, GLuint id ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC )( GLenum target, GLuint id ); +typedef void( APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC )( GLsizei n, const GLuint *ids ); +typedef void( APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC )( GLsizei n, GLuint *ids ); +typedef GLboolean( APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC )( void ); +typedef void( APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC )( void ); +typedef void( APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC )( GLenum mode, GLuint id ); #endif #ifndef GL_ARB_transform_feedback3 -#define GL_ARB_transform_feedback3 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); -GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); -GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index); -GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); -typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +# define GL_ARB_transform_feedback3 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawTransformFeedbackStream( GLenum mode, GLuint id, GLuint stream ); +GLAPI void APIENTRY glBeginQueryIndexed( GLenum target, GLuint index, GLuint id ); +GLAPI void APIENTRY glEndQueryIndexed( GLenum target, GLuint index ); +GLAPI void APIENTRY glGetQueryIndexediv( GLenum target, GLuint index, GLenum pname, GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC )( GLenum mode, GLuint id, GLuint stream ); +typedef void( APIENTRYP PFNGLBEGINQUERYINDEXEDPROC )( GLenum target, GLuint index, GLuint id ); +typedef void( APIENTRYP PFNGLENDQUERYINDEXEDPROC )( GLenum target, GLuint index ); +typedef void( APIENTRYP PFNGLGETQUERYINDEXEDIVPROC )( GLenum target, GLuint index, GLenum pname, + GLint *params ); #endif #ifndef GL_ARB_ES2_compatibility -#define GL_ARB_ES2_compatibility 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReleaseShaderCompiler (void); -GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); -GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f); -GLAPI void APIENTRY glClearDepthf (GLfloat d); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); -typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); -typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); -typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); +# define GL_ARB_ES2_compatibility 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReleaseShaderCompiler( void ); +GLAPI void APIENTRY glShaderBinary( GLsizei count, const GLuint *shaders, GLenum binaryformat, + const GLvoid *binary, GLsizei length ); +GLAPI void APIENTRY glGetShaderPrecisionFormat( GLenum shadertype, GLenum precisiontype, GLint *range, + GLint *precision ); +GLAPI void APIENTRY glDepthRangef( GLfloat n, GLfloat f ); +GLAPI void APIENTRY glClearDepthf( GLfloat d ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLRELEASESHADERCOMPILERPROC )( void ); +typedef void( APIENTRYP PFNGLSHADERBINARYPROC )( GLsizei count, const GLuint *shaders, + GLenum binaryformat, const GLvoid *binary, + GLsizei length ); +typedef void( APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC )( GLenum shadertype, GLenum precisiontype, + GLint *range, GLint *precision ); +typedef void( APIENTRYP PFNGLDEPTHRANGEFPROC )( GLfloat n, GLfloat f ); +typedef void( APIENTRYP PFNGLCLEARDEPTHFPROC )( GLfloat d ); #endif #ifndef GL_ARB_get_program_binary -#define GL_ARB_get_program_binary 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); -GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); +# define GL_ARB_get_program_binary 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetProgramBinary( GLuint program, GLsizei bufSize, GLsizei *length, + GLenum *binaryFormat, GLvoid *binary ); +GLAPI void APIENTRY glProgramBinary( GLuint program, GLenum binaryFormat, const GLvoid *binary, + GLsizei length ); +GLAPI void APIENTRY glProgramParameteri( GLuint program, GLenum pname, GLint value ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETPROGRAMBINARYPROC )( GLuint program, GLsizei bufSize, GLsizei *length, + GLenum *binaryFormat, GLvoid *binary ); +typedef void( APIENTRYP PFNGLPROGRAMBINARYPROC )( GLuint program, GLenum binaryFormat, + const GLvoid *binary, GLsizei length ); +typedef void( APIENTRYP PFNGLPROGRAMPARAMETERIPROC )( GLuint program, GLenum pname, GLint value ); #endif #ifndef GL_ARB_separate_shader_objects -#define GL_ARB_separate_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); -GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); -GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* const *strings); -GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); -GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); -GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); -GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); -GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); -GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0); -GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); -GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); -GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* const *strings); -typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); -typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +# define GL_ARB_separate_shader_objects 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUseProgramStages( GLuint pipeline, GLbitfield stages, GLuint program ); +GLAPI void APIENTRY glActiveShaderProgram( GLuint pipeline, GLuint program ); +GLAPI GLuint APIENTRY glCreateShaderProgramv( GLenum type, GLsizei count, const GLchar *const *strings ); +GLAPI void APIENTRY glBindProgramPipeline( GLuint pipeline ); +GLAPI void APIENTRY glDeleteProgramPipelines( GLsizei n, const GLuint *pipelines ); +GLAPI void APIENTRY glGenProgramPipelines( GLsizei n, GLuint *pipelines ); +GLAPI GLboolean APIENTRY glIsProgramPipeline( GLuint pipeline ); +GLAPI void APIENTRY glGetProgramPipelineiv( GLuint pipeline, GLenum pname, GLint *params ); +GLAPI void APIENTRY glProgramUniform1i( GLuint program, GLint location, GLint v0 ); +GLAPI void APIENTRY glProgramUniform1iv( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform1f( GLuint program, GLint location, GLfloat v0 ); +GLAPI void APIENTRY glProgramUniform1fv( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform1d( GLuint program, GLint location, GLdouble v0 ); +GLAPI void APIENTRY glProgramUniform1dv( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform1ui( GLuint program, GLint location, GLuint v0 ); +GLAPI void APIENTRY glProgramUniform1uiv( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform2i( GLuint program, GLint location, GLint v0, GLint v1 ); +GLAPI void APIENTRY glProgramUniform2iv( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform2f( GLuint program, GLint location, GLfloat v0, GLfloat v1 ); +GLAPI void APIENTRY glProgramUniform2fv( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform2d( GLuint program, GLint location, GLdouble v0, GLdouble v1 ); +GLAPI void APIENTRY glProgramUniform2dv( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform2ui( GLuint program, GLint location, GLuint v0, GLuint v1 ); +GLAPI void APIENTRY glProgramUniform2uiv( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform3i( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 ); +GLAPI void APIENTRY glProgramUniform3iv( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform3f( GLuint program, GLint location, GLfloat v0, GLfloat v1, + GLfloat v2 ); +GLAPI void APIENTRY glProgramUniform3fv( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform3d( GLuint program, GLint location, GLdouble v0, GLdouble v1, + GLdouble v2 ); +GLAPI void APIENTRY glProgramUniform3dv( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform3ui( GLuint program, GLint location, GLuint v0, GLuint v1, + GLuint v2 ); +GLAPI void APIENTRY glProgramUniform3uiv( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform4i( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, + GLint v3 ); +GLAPI void APIENTRY glProgramUniform4iv( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform4f( GLuint program, GLint location, GLfloat v0, GLfloat v1, + GLfloat v2, GLfloat v3 ); +GLAPI void APIENTRY glProgramUniform4fv( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform4d( GLuint program, GLint location, GLdouble v0, GLdouble v1, + GLdouble v2, GLdouble v3 ); +GLAPI void APIENTRY glProgramUniform4dv( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform4ui( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, + GLuint v3 ); +GLAPI void APIENTRY glProgramUniform4uiv( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniformMatrix2fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix2dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x3fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x2fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x4fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x2fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x4fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x3fv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x3dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x2dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x4dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x2dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x4dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x3dv( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glValidateProgramPipeline( GLuint pipeline ); +GLAPI void APIENTRY glGetProgramPipelineInfoLog( GLuint pipeline, GLsizei bufSize, GLsizei *length, + GLchar *infoLog ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLUSEPROGRAMSTAGESPROC )( GLuint pipeline, GLbitfield stages, + GLuint program ); +typedef void( APIENTRYP PFNGLACTIVESHADERPROGRAMPROC )( GLuint pipeline, GLuint program ); +typedef GLuint( APIENTRYP PFNGLCREATESHADERPROGRAMVPROC )( GLenum type, GLsizei count, + const GLchar *const *strings ); +typedef void( APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC )( GLuint pipeline ); +typedef void( APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC )( GLsizei n, const GLuint *pipelines ); +typedef void( APIENTRYP PFNGLGENPROGRAMPIPELINESPROC )( GLsizei n, GLuint *pipelines ); +typedef GLboolean( APIENTRYP PFNGLISPROGRAMPIPELINEPROC )( GLuint pipeline ); +typedef void( APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC )( GLuint pipeline, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1IPROC )( GLuint program, GLint location, GLint v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1FPROC )( GLuint program, GLint location, GLfloat v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1DPROC )( GLuint program, GLint location, GLdouble v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC )( GLuint program, GLint location, GLuint v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2IPROC )( GLuint program, GLint location, GLint v0, + GLint v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2FPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2DPROC )( GLuint program, GLint location, GLdouble v0, + GLdouble v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3IPROC )( GLuint program, GLint location, GLint v0, GLint v1, + GLint v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3FPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3DPROC )( GLuint program, GLint location, GLdouble v0, + GLdouble v1, GLdouble v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4IPROC )( GLuint program, GLint location, GLint v0, GLint v1, + GLint v2, GLint v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4FPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2, GLfloat v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4DPROC )( GLuint program, GLint location, GLdouble v0, + GLdouble v1, GLdouble v2, GLdouble v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2, GLuint v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC )( GLuint pipeline ); +typedef void( APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC )( GLuint pipeline, GLsizei bufSize, + GLsizei *length, GLchar *infoLog ); #endif #ifndef GL_ARB_vertex_attrib_64bit -#define GL_ARB_vertex_attrib_64bit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); +# define GL_ARB_vertex_attrib_64bit 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1d( GLuint index, GLdouble x ); +GLAPI void APIENTRY glVertexAttribL2d( GLuint index, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glVertexAttribL3d( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glVertexAttribL4d( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glVertexAttribL1dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribL2dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribL3dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribL4dv( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribLPointer( GLuint index, GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); +GLAPI void APIENTRY glGetVertexAttribLdv( GLuint index, GLenum pname, GLdouble *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1DPROC )( GLuint index, GLdouble x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2DPROC )( GLuint index, GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3DPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4DPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z, + GLdouble w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4DVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC )( GLuint index, GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC )( GLuint index, GLenum pname, GLdouble *params ); #endif #ifndef GL_ARB_viewport_array -#define GL_ARB_viewport_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v); -GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v); -GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f); -GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data); -GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); -typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f); -typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); -typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); +# define GL_ARB_viewport_array 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportArrayv( GLuint first, GLsizei count, const GLfloat *v ); +GLAPI void APIENTRY glViewportIndexedf( GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h ); +GLAPI void APIENTRY glViewportIndexedfv( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glScissorArrayv( GLuint first, GLsizei count, const GLint *v ); +GLAPI void APIENTRY glScissorIndexed( GLuint index, GLint left, GLint bottom, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glScissorIndexedv( GLuint index, const GLint *v ); +GLAPI void APIENTRY glDepthRangeArrayv( GLuint first, GLsizei count, const GLdouble *v ); +GLAPI void APIENTRY glDepthRangeIndexed( GLuint index, GLdouble n, GLdouble f ); +GLAPI void APIENTRY glGetFloati_v( GLenum target, GLuint index, GLfloat *data ); +GLAPI void APIENTRY glGetDoublei_v( GLenum target, GLuint index, GLdouble *data ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVIEWPORTARRAYVPROC )( GLuint first, GLsizei count, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVIEWPORTINDEXEDFPROC )( GLuint index, GLfloat x, GLfloat y, GLfloat w, + GLfloat h ); +typedef void( APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLSCISSORARRAYVPROC )( GLuint first, GLsizei count, const GLint *v ); +typedef void( APIENTRYP PFNGLSCISSORINDEXEDPROC )( GLuint index, GLint left, GLint bottom, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLSCISSORINDEXEDVPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLDEPTHRANGEARRAYVPROC )( GLuint first, GLsizei count, const GLdouble *v ); +typedef void( APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC )( GLuint index, GLdouble n, GLdouble f ); +typedef void( APIENTRYP PFNGLGETFLOATI_VPROC )( GLenum target, GLuint index, GLfloat *data ); +typedef void( APIENTRYP PFNGLGETDOUBLEI_VPROC )( GLenum target, GLuint index, GLdouble *data ); #endif #ifndef GL_ARB_cl_event -#define GL_ARB_cl_event 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); +# define GL_ARB_cl_event 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB( struct _cl_context *context, struct _cl_event *event, + GLbitfield flags ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLsync( APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC )( struct _cl_context *context, + struct _cl_event * event, + GLbitfield flags ); #endif #ifndef GL_ARB_debug_output -#define GL_ARB_debug_output 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +# define GL_ARB_debug_output 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageControlARB( GLenum source, GLenum type, GLenum severity, GLsizei count, + const GLuint *ids, GLboolean enabled ); +GLAPI void APIENTRY glDebugMessageInsertARB( GLenum source, GLenum type, GLuint id, GLenum severity, + GLsizei length, const GLchar *buf ); +GLAPI void APIENTRY glDebugMessageCallbackARB( GLDEBUGPROCARB callback, const GLvoid *userParam ); +GLAPI GLuint APIENTRY glGetDebugMessageLogARB( GLuint count, GLsizei bufsize, GLenum *sources, + GLenum *types, GLuint *ids, GLenum *severities, + GLsizei *lengths, GLchar *messageLog ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC )( GLenum source, GLenum type, GLenum severity, + GLsizei count, const GLuint *ids, + GLboolean enabled ); +typedef void( APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC )( GLenum source, GLenum type, GLuint id, + GLenum severity, GLsizei length, + const GLchar *buf ); +typedef void( APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC )( GLDEBUGPROCARB callback, + const GLvoid * userParam ); +typedef GLuint( APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC )( GLuint count, GLsizei bufsize, + GLenum *sources, GLenum *types, GLuint *ids, + GLenum *severities, GLsizei *lengths, + GLchar *messageLog ); #endif #ifndef GL_ARB_robustness -#define GL_ARB_robustness 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); -GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); -GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); -GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); -GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); -GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); -GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); -GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); -GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); -GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); -GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); -GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); -GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); -GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); -GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); -GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); -typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); -typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); -typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); -typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); -typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); -typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); -typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); -typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); -typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); -typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); -typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); -typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); -typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +# define GL_ARB_robustness 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB( void ); +GLAPI void APIENTRY glGetnMapdvARB( GLenum target, GLenum query, GLsizei bufSize, GLdouble *v ); +GLAPI void APIENTRY glGetnMapfvARB( GLenum target, GLenum query, GLsizei bufSize, GLfloat *v ); +GLAPI void APIENTRY glGetnMapivARB( GLenum target, GLenum query, GLsizei bufSize, GLint *v ); +GLAPI void APIENTRY glGetnPixelMapfvARB( GLenum map, GLsizei bufSize, GLfloat *values ); +GLAPI void APIENTRY glGetnPixelMapuivARB( GLenum map, GLsizei bufSize, GLuint *values ); +GLAPI void APIENTRY glGetnPixelMapusvARB( GLenum map, GLsizei bufSize, GLushort *values ); +GLAPI void APIENTRY glGetnPolygonStippleARB( GLsizei bufSize, GLubyte *pattern ); +GLAPI void APIENTRY glGetnColorTableARB( GLenum target, GLenum format, GLenum type, GLsizei bufSize, + GLvoid *table ); +GLAPI void APIENTRY glGetnConvolutionFilterARB( GLenum target, GLenum format, GLenum type, + GLsizei bufSize, GLvoid *image ); +GLAPI void APIENTRY glGetnSeparableFilterARB( GLenum target, GLenum format, GLenum type, + GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, + GLvoid *column, GLvoid *span ); +GLAPI void APIENTRY glGetnHistogramARB( GLenum target, GLboolean reset, GLenum format, GLenum type, + GLsizei bufSize, GLvoid *values ); +GLAPI void APIENTRY glGetnMinmaxARB( GLenum target, GLboolean reset, GLenum format, GLenum type, + GLsizei bufSize, GLvoid *values ); +GLAPI void APIENTRY glGetnTexImageARB( GLenum target, GLint level, GLenum format, GLenum type, + GLsizei bufSize, GLvoid *img ); +GLAPI void APIENTRY glReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, + GLenum type, GLsizei bufSize, GLvoid *data ); +GLAPI void APIENTRY glGetnCompressedTexImageARB( GLenum target, GLint lod, GLsizei bufSize, + GLvoid *img ); +GLAPI void APIENTRY glGetnUniformfvARB( GLuint program, GLint location, GLsizei bufSize, + GLfloat *params ); +GLAPI void APIENTRY glGetnUniformivARB( GLuint program, GLint location, GLsizei bufSize, GLint *params ); +GLAPI void APIENTRY glGetnUniformuivARB( GLuint program, GLint location, GLsizei bufSize, + GLuint *params ); +GLAPI void APIENTRY glGetnUniformdvARB( GLuint program, GLint location, GLsizei bufSize, + GLdouble *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLenum( APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC )( void ); +typedef void( APIENTRYP PFNGLGETNMAPDVARBPROC )( GLenum target, GLenum query, GLsizei bufSize, + GLdouble *v ); +typedef void( APIENTRYP PFNGLGETNMAPFVARBPROC )( GLenum target, GLenum query, GLsizei bufSize, + GLfloat *v ); +typedef void( APIENTRYP PFNGLGETNMAPIVARBPROC )( GLenum target, GLenum query, GLsizei bufSize, + GLint *v ); +typedef void( APIENTRYP PFNGLGETNPIXELMAPFVARBPROC )( GLenum map, GLsizei bufSize, GLfloat *values ); +typedef void( APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC )( GLenum map, GLsizei bufSize, GLuint *values ); +typedef void( APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC )( GLenum map, GLsizei bufSize, GLushort *values ); +typedef void( APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC )( GLsizei bufSize, GLubyte *pattern ); +typedef void( APIENTRYP PFNGLGETNCOLORTABLEARBPROC )( GLenum target, GLenum format, GLenum type, + GLsizei bufSize, GLvoid *table ); +typedef void( APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC )( GLenum target, GLenum format, GLenum type, + GLsizei bufSize, GLvoid *image ); +typedef void( APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC )( GLenum target, GLenum format, GLenum type, + GLsizei rowBufSize, GLvoid *row, + GLsizei columnBufSize, GLvoid *column, + GLvoid *span ); +typedef void( APIENTRYP PFNGLGETNHISTOGRAMARBPROC )( GLenum target, GLboolean reset, GLenum format, + GLenum type, GLsizei bufSize, GLvoid *values ); +typedef void( APIENTRYP PFNGLGETNMINMAXARBPROC )( GLenum target, GLboolean reset, GLenum format, + GLenum type, GLsizei bufSize, GLvoid *values ); +typedef void( APIENTRYP PFNGLGETNTEXIMAGEARBPROC )( GLenum target, GLint level, GLenum format, + GLenum type, GLsizei bufSize, GLvoid *img ); +typedef void( APIENTRYP PFNGLREADNPIXELSARBPROC )( GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, GLsizei bufSize, + GLvoid *data ); +typedef void( APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC )( GLenum target, GLint lod, GLsizei bufSize, + GLvoid *img ); +typedef void( APIENTRYP PFNGLGETNUNIFORMFVARBPROC )( GLuint program, GLint location, GLsizei bufSize, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETNUNIFORMIVARBPROC )( GLuint program, GLint location, GLsizei bufSize, + GLint *params ); +typedef void( APIENTRYP PFNGLGETNUNIFORMUIVARBPROC )( GLuint program, GLint location, GLsizei bufSize, + GLuint *params ); +typedef void( APIENTRYP PFNGLGETNUNIFORMDVARBPROC )( GLuint program, GLint location, GLsizei bufSize, + GLdouble *params ); #endif #ifndef GL_ARB_shader_stencil_export -#define GL_ARB_shader_stencil_export 1 +# define GL_ARB_shader_stencil_export 1 #endif #ifndef GL_ARB_base_instance -#define GL_ARB_base_instance 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); -GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); -GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +# define GL_ARB_base_instance 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedBaseInstance( GLenum mode, GLint first, GLsizei count, + GLsizei instancecount, GLuint baseinstance ); +GLAPI void APIENTRY glDrawElementsInstancedBaseInstance( GLenum mode, GLsizei count, GLenum type, + const void *indices, GLsizei instancecount, + GLuint baseinstance ); +GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance( GLenum mode, GLsizei count, + GLenum type, const void *indices, + GLsizei instancecount, + GLint basevertex, + GLuint baseinstance ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC )( GLenum mode, GLint first, + GLsizei count, GLsizei instancecount, + GLuint baseinstance ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC )( GLenum mode, GLsizei count, + GLenum type, const void *indices, + GLsizei instancecount, + GLuint baseinstance ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC )( + GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, + GLint basevertex, GLuint baseinstance ); #endif #ifndef GL_ARB_shading_language_420pack -#define GL_ARB_shading_language_420pack 1 +# define GL_ARB_shading_language_420pack 1 #endif #ifndef GL_ARB_transform_feedback_instanced -#define GL_ARB_transform_feedback_instanced 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount); -GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); +# define GL_ARB_transform_feedback_instanced 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawTransformFeedbackInstanced( GLenum mode, GLuint id, GLsizei instancecount ); +GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced( GLenum mode, GLuint id, GLuint stream, + GLsizei instancecount ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC )( GLenum mode, GLuint id, + GLsizei instancecount ); +typedef void( APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC )( GLenum mode, GLuint id, + GLuint stream, + GLsizei instancecount ); #endif #ifndef GL_ARB_compressed_texture_pixel_storage -#define GL_ARB_compressed_texture_pixel_storage 1 +# define GL_ARB_compressed_texture_pixel_storage 1 #endif #ifndef GL_ARB_conservative_depth -#define GL_ARB_conservative_depth 1 +# define GL_ARB_conservative_depth 1 #endif #ifndef GL_ARB_internalformat_query -#define GL_ARB_internalformat_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +# define GL_ARB_internalformat_query 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInternalformativ( GLenum target, GLenum internalformat, GLenum pname, + GLsizei bufSize, GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETINTERNALFORMATIVPROC )( GLenum target, GLenum internalformat, + GLenum pname, GLsizei bufSize, GLint *params ); #endif #ifndef GL_ARB_map_buffer_alignment -#define GL_ARB_map_buffer_alignment 1 +# define GL_ARB_map_buffer_alignment 1 #endif #ifndef GL_ARB_shader_atomic_counters -#define GL_ARB_shader_atomic_counters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +# define GL_ARB_shader_atomic_counters 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv( GLuint program, GLuint bufferIndex, GLenum pname, + GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC )( GLuint program, GLuint bufferIndex, + GLenum pname, GLint *params ); #endif #ifndef GL_ARB_shader_image_load_store -#define GL_ARB_shader_image_load_store 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); +# define GL_ARB_shader_image_load_store 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindImageTexture( GLuint unit, GLuint texture, GLint level, GLboolean layered, + GLint layer, GLenum access, GLenum format ); +GLAPI void APIENTRY glMemoryBarrier( GLbitfield barriers ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBINDIMAGETEXTUREPROC )( GLuint unit, GLuint texture, GLint level, + GLboolean layered, GLint layer, GLenum access, + GLenum format ); +typedef void( APIENTRYP PFNGLMEMORYBARRIERPROC )( GLbitfield barriers ); #endif #ifndef GL_ARB_shading_language_packing -#define GL_ARB_shading_language_packing 1 +# define GL_ARB_shading_language_packing 1 #endif #ifndef GL_ARB_texture_storage -#define GL_ARB_texture_storage 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +# define GL_ARB_texture_storage 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexStorage1D( GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width ); +GLAPI void APIENTRY glTexStorage2D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glTexStorage3D( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth ); +GLAPI void APIENTRY glTextureStorage1DEXT( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width ); +GLAPI void APIENTRY glTextureStorage2DEXT( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height ); +GLAPI void APIENTRY glTextureStorage3DEXT( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXSTORAGE1DPROC )( GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width ); +typedef void( APIENTRYP PFNGLTEXSTORAGE2DPROC )( GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLTEXSTORAGE3DPROC )( GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC )( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC )( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC )( GLuint texture, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth ); #endif #ifndef GL_KHR_texture_compression_astc_ldr -#define GL_KHR_texture_compression_astc_ldr 1 +# define GL_KHR_texture_compression_astc_ldr 1 #endif #ifndef GL_KHR_debug -#define GL_KHR_debug 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); -GLAPI void APIENTRY glPopDebugGroup (void); -GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); -GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); -typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); -typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); -typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +# define GL_KHR_debug 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageControl( GLenum source, GLenum type, GLenum severity, GLsizei count, + const GLuint *ids, GLboolean enabled ); +GLAPI void APIENTRY glDebugMessageInsert( GLenum source, GLenum type, GLuint id, GLenum severity, + GLsizei length, const GLchar *buf ); +GLAPI void APIENTRY glDebugMessageCallback( GLDEBUGPROC callback, const void *userParam ); +GLAPI GLuint APIENTRY glGetDebugMessageLog( GLuint count, GLsizei bufsize, GLenum *sources, + GLenum *types, GLuint *ids, GLenum *severities, + GLsizei *lengths, GLchar *messageLog ); +GLAPI void APIENTRY glPushDebugGroup( GLenum source, GLuint id, GLsizei length, const GLchar *message ); +GLAPI void APIENTRY glPopDebugGroup( void ); +GLAPI void APIENTRY glObjectLabel( GLenum identifier, GLuint name, GLsizei length, const GLchar *label ); +GLAPI void APIENTRY glGetObjectLabel( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, + GLchar *label ); +GLAPI void APIENTRY glObjectPtrLabel( const void *ptr, GLsizei length, const GLchar *label ); +GLAPI void APIENTRY glGetObjectPtrLabel( const void *ptr, GLsizei bufSize, GLsizei *length, + GLchar *label ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC )( GLenum source, GLenum type, GLenum severity, + GLsizei count, const GLuint *ids, + GLboolean enabled ); +typedef void( APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC )( GLenum source, GLenum type, GLuint id, + GLenum severity, GLsizei length, + const GLchar *buf ); +typedef void( APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC )( GLDEBUGPROC callback, const void *userParam ); +typedef GLuint( APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC )( GLuint count, GLsizei bufsize, GLenum *sources, + GLenum *types, GLuint *ids, GLenum *severities, + GLsizei *lengths, GLchar *messageLog ); +typedef void( APIENTRYP PFNGLPUSHDEBUGGROUPPROC )( GLenum source, GLuint id, GLsizei length, + const GLchar *message ); +typedef void( APIENTRYP PFNGLPOPDEBUGGROUPPROC )( void ); +typedef void( APIENTRYP PFNGLOBJECTLABELPROC )( GLenum identifier, GLuint name, GLsizei length, + const GLchar *label ); +typedef void( APIENTRYP PFNGLGETOBJECTLABELPROC )( GLenum identifier, GLuint name, GLsizei bufSize, + GLsizei *length, GLchar *label ); +typedef void( APIENTRYP PFNGLOBJECTPTRLABELPROC )( const void *ptr, GLsizei length, + const GLchar *label ); +typedef void( APIENTRYP PFNGLGETOBJECTPTRLABELPROC )( const void *ptr, GLsizei bufSize, GLsizei *length, + GLchar *label ); #endif #ifndef GL_ARB_arrays_of_arrays -#define GL_ARB_arrays_of_arrays 1 +# define GL_ARB_arrays_of_arrays 1 #endif #ifndef GL_ARB_clear_buffer_object -#define GL_ARB_clear_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); +# define GL_ARB_clear_buffer_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClearBufferData( GLenum target, GLenum internalformat, GLenum format, GLenum type, + const void *data ); +GLAPI void APIENTRY glClearBufferSubData( GLenum target, GLenum internalformat, GLintptr offset, + GLsizeiptr size, GLenum format, GLenum type, + const void *data ); +GLAPI void APIENTRY glClearNamedBufferDataEXT( GLuint buffer, GLenum internalformat, GLenum format, + GLenum type, const void *data ); +GLAPI void APIENTRY glClearNamedBufferSubDataEXT( GLuint buffer, GLenum internalformat, GLenum format, + GLenum type, GLsizeiptr offset, GLsizeiptr size, + const void *data ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCLEARBUFFERDATAPROC )( GLenum target, GLenum internalformat, GLenum format, + GLenum type, const void *data ); +typedef void( APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC )( GLenum target, GLenum internalformat, + GLintptr offset, GLsizeiptr size, GLenum format, + GLenum type, const void *data ); +typedef void( APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC )( GLuint buffer, GLenum internalformat, + GLenum format, GLenum type, + const void *data ); +typedef void( APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC )( GLuint buffer, GLenum internalformat, + GLenum format, GLenum type, + GLsizeiptr offset, GLsizeiptr size, + const void *data ); #endif #ifndef GL_ARB_compute_shader -#define GL_ARB_compute_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); +# define GL_ARB_compute_shader 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDispatchCompute( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z ); +GLAPI void APIENTRY glDispatchComputeIndirect( GLintptr indirect ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDISPATCHCOMPUTEPROC )( GLuint num_groups_x, GLuint num_groups_y, + GLuint num_groups_z ); +typedef void( APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC )( GLintptr indirect ); #endif #ifndef GL_ARB_copy_image -#define GL_ARB_copy_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +# define GL_ARB_copy_image 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyImageSubData( GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, + GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, + GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, + GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOPYIMAGESUBDATAPROC )( GLuint srcName, GLenum srcTarget, GLint srcLevel, + GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, + GLenum dstTarget, GLint dstLevel, GLint dstX, + GLint dstY, GLint dstZ, GLsizei srcWidth, + GLsizei srcHeight, GLsizei srcDepth ); #endif #ifndef GL_ARB_texture_view -#define GL_ARB_texture_view 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +# define GL_ARB_texture_view 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureView( GLuint texture, GLenum target, GLuint origtexture, + GLenum internalformat, GLuint minlevel, GLuint numlevels, + GLuint minlayer, GLuint numlayers ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXTUREVIEWPROC )( GLuint texture, GLenum target, GLuint origtexture, + GLenum internalformat, GLuint minlevel, GLuint numlevels, + GLuint minlayer, GLuint numlayers ); #endif #ifndef GL_ARB_vertex_attrib_binding -#define GL_ARB_vertex_attrib_binding 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); -GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); -GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex); -GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); -typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); -typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); +# define GL_ARB_vertex_attrib_binding 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexBuffer( GLuint bindingindex, GLuint buffer, GLintptr offset, + GLsizei stride ); +GLAPI void APIENTRY glVertexAttribFormat( GLuint attribindex, GLint size, GLenum type, + GLboolean normalized, GLuint relativeoffset ); +GLAPI void APIENTRY glVertexAttribIFormat( GLuint attribindex, GLint size, GLenum type, + GLuint relativeoffset ); +GLAPI void APIENTRY glVertexAttribLFormat( GLuint attribindex, GLint size, GLenum type, + GLuint relativeoffset ); +GLAPI void APIENTRY glVertexAttribBinding( GLuint attribindex, GLuint bindingindex ); +GLAPI void APIENTRY glVertexBindingDivisor( GLuint bindingindex, GLuint divisor ); +GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT( GLuint vaobj, GLuint bindingindex, GLuint buffer, + GLintptr offset, GLsizei stride ); +GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT( GLuint vaobj, GLuint attribindex, GLint size, + GLenum type, GLboolean normalized, + GLuint relativeoffset ); +GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT( GLuint vaobj, GLuint attribindex, GLint size, + GLenum type, GLuint relativeoffset ); +GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT( GLuint vaobj, GLuint attribindex, GLint size, + GLenum type, GLuint relativeoffset ); +GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT( GLuint vaobj, GLuint attribindex, + GLuint bindingindex ); +GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT( GLuint vaobj, GLuint bindingindex, + GLuint divisor ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBINDVERTEXBUFFERPROC )( GLuint bindingindex, GLuint buffer, GLintptr offset, + GLsizei stride ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBFORMATPROC )( GLuint attribindex, GLint size, GLenum type, + GLboolean normalized, GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC )( GLuint attribindex, GLint size, GLenum type, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC )( GLuint attribindex, GLint size, GLenum type, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC )( GLuint attribindex, GLuint bindingindex ); +typedef void( APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC )( GLuint bindingindex, GLuint divisor ); +typedef void( APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC )( GLuint vaobj, GLuint bindingindex, + GLuint buffer, GLintptr offset, + GLsizei stride ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC )( GLuint vaobj, GLuint attribindex, + GLint size, GLenum type, + GLboolean normalized, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC )( GLuint vaobj, GLuint attribindex, + GLint size, GLenum type, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC )( GLuint vaobj, GLuint attribindex, + GLint size, GLenum type, + GLuint relativeoffset ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC )( GLuint vaobj, GLuint attribindex, + GLuint bindingindex ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC )( GLuint vaobj, GLuint bindingindex, + GLuint divisor ); #endif #ifndef GL_ARB_robustness_isolation -#define GL_ARB_robustness_isolation 1 +# define GL_ARB_robustness_isolation 1 #endif #ifndef GL_ARB_ES3_compatibility -#define GL_ARB_ES3_compatibility 1 +# define GL_ARB_ES3_compatibility 1 #endif #ifndef GL_ARB_explicit_uniform_location -#define GL_ARB_explicit_uniform_location 1 +# define GL_ARB_explicit_uniform_location 1 #endif #ifndef GL_ARB_fragment_layer_viewport -#define GL_ARB_fragment_layer_viewport 1 +# define GL_ARB_fragment_layer_viewport 1 #endif #ifndef GL_ARB_framebuffer_no_attachments -#define GL_ARB_framebuffer_no_attachments 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param); -GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +# define GL_ARB_framebuffer_no_attachments 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferParameteri( GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glGetFramebufferParameteriv( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glNamedFramebufferParameteriEXT( GLuint framebuffer, GLenum pname, GLint param ); +GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT( GLuint framebuffer, GLenum pname, + GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC )( GLenum target, GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC )( GLuint framebuffer, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC )( GLuint framebuffer, GLenum pname, + GLint *params ); #endif #ifndef GL_ARB_internalformat_query2 -#define GL_ARB_internalformat_query2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); +# define GL_ARB_internalformat_query2 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInternalformati64v( GLenum target, GLenum internalformat, GLenum pname, + GLsizei bufSize, GLint64 *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETINTERNALFORMATI64VPROC )( GLenum target, GLenum internalformat, + GLenum pname, GLsizei bufSize, + GLint64 *params ); #endif #ifndef GL_ARB_invalidate_subdata -#define GL_ARB_invalidate_subdata 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level); -GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer); -GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); -GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); -typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); -typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +# define GL_ARB_invalidate_subdata 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glInvalidateTexSubImage( GLuint texture, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth ); +GLAPI void APIENTRY glInvalidateTexImage( GLuint texture, GLint level ); +GLAPI void APIENTRY glInvalidateBufferSubData( GLuint buffer, GLintptr offset, GLsizeiptr length ); +GLAPI void APIENTRY glInvalidateBufferData( GLuint buffer ); +GLAPI void APIENTRY glInvalidateFramebuffer( GLenum target, GLsizei numAttachments, + const GLenum *attachments ); +GLAPI void APIENTRY glInvalidateSubFramebuffer( GLenum target, GLsizei numAttachments, + const GLenum *attachments, GLint x, GLint y, + GLsizei width, GLsizei height ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC )( GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth ); +typedef void( APIENTRYP PFNGLINVALIDATETEXIMAGEPROC )( GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr length ); +typedef void( APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC )( GLenum target, GLsizei numAttachments, + const GLenum *attachments ); +typedef void( APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC )( GLenum target, GLsizei numAttachments, + const GLenum *attachments, GLint x, GLint y, + GLsizei width, GLsizei height ); #endif #ifndef GL_ARB_multi_draw_indirect -#define GL_ARB_multi_draw_indirect 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); -GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +# define GL_ARB_multi_draw_indirect 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirect( GLenum mode, const void *indirect, GLsizei drawcount, + GLsizei stride ); +GLAPI void APIENTRY glMultiDrawElementsIndirect( GLenum mode, GLenum type, const void *indirect, + GLsizei drawcount, GLsizei stride ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC )( GLenum mode, const void *indirect, + GLsizei drawcount, GLsizei stride ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC )( GLenum mode, GLenum type, + const void *indirect, GLsizei drawcount, + GLsizei stride ); #endif #ifndef GL_ARB_program_interface_query -#define GL_ARB_program_interface_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); -GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); -GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); -GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); -typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +# define GL_ARB_program_interface_query 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetProgramInterfaceiv( GLuint program, GLenum programInterface, GLenum pname, + GLint *params ); +GLAPI GLuint APIENTRY glGetProgramResourceIndex( GLuint program, GLenum programInterface, + const GLchar *name ); +GLAPI void APIENTRY glGetProgramResourceName( GLuint program, GLenum programInterface, GLuint index, + GLsizei bufSize, GLsizei *length, GLchar *name ); +GLAPI void APIENTRY glGetProgramResourceiv( GLuint program, GLenum programInterface, GLuint index, + GLsizei propCount, const GLenum *props, GLsizei bufSize, + GLsizei *length, GLint *params ); +GLAPI GLint APIENTRY glGetProgramResourceLocation( GLuint program, GLenum programInterface, + const GLchar *name ); +GLAPI GLint APIENTRY glGetProgramResourceLocationIndex( GLuint program, GLenum programInterface, + const GLchar *name ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC )( GLuint program, GLenum programInterface, + GLenum pname, GLint *params ); +typedef GLuint( APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC )( GLuint program, GLenum programInterface, + const GLchar *name ); +typedef void( APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC )( GLuint program, GLenum programInterface, + GLuint index, GLsizei bufSize, + GLsizei *length, GLchar *name ); +typedef void( APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC )( GLuint program, GLenum programInterface, + GLuint index, GLsizei propCount, + const GLenum *props, GLsizei bufSize, + GLsizei *length, GLint *params ); +typedef GLint( APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC )( GLuint program, GLenum programInterface, + const GLchar *name ); +typedef GLint( APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC )( GLuint program, + GLenum programInterface, + const GLchar *name ); #endif #ifndef GL_ARB_robust_buffer_access_behavior -#define GL_ARB_robust_buffer_access_behavior 1 +# define GL_ARB_robust_buffer_access_behavior 1 #endif #ifndef GL_ARB_shader_image_size -#define GL_ARB_shader_image_size 1 +# define GL_ARB_shader_image_size 1 #endif #ifndef GL_ARB_shader_storage_buffer_object -#define GL_ARB_shader_storage_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +# define GL_ARB_shader_storage_buffer_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glShaderStorageBlockBinding( GLuint program, GLuint storageBlockIndex, + GLuint storageBlockBinding ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC )( GLuint program, GLuint storageBlockIndex, + GLuint storageBlockBinding ); #endif #ifndef GL_ARB_stencil_texturing -#define GL_ARB_stencil_texturing 1 +# define GL_ARB_stencil_texturing 1 #endif #ifndef GL_ARB_texture_buffer_range -#define GL_ARB_texture_buffer_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +# define GL_ARB_texture_buffer_range 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferRange( GLenum target, GLenum internalformat, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +GLAPI void APIENTRY glTextureBufferRangeEXT( GLuint texture, GLenum target, GLenum internalformat, + GLuint buffer, GLintptr offset, GLsizeiptr size ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXBUFFERRANGEPROC )( GLenum target, GLenum internalformat, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +typedef void( APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC )( GLuint texture, GLenum target, + GLenum internalformat, GLuint buffer, + GLintptr offset, GLsizeiptr size ); #endif #ifndef GL_ARB_texture_query_levels -#define GL_ARB_texture_query_levels 1 +# define GL_ARB_texture_query_levels 1 #endif #ifndef GL_ARB_texture_storage_multisample -#define GL_ARB_texture_storage_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +# define GL_ARB_texture_storage_multisample 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexStorage2DMultisample( GLenum target, GLsizei samples, GLenum internalformat, + GLsizei width, GLsizei height, + GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glTexStorage3DMultisample( GLenum target, GLsizei samples, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glTextureStorage2DMultisampleEXT( GLuint texture, GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLboolean fixedsamplelocations ); +GLAPI void APIENTRY glTextureStorage3DMultisampleEXT( GLuint texture, GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC )( GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC )( GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC )( GLuint texture, GLenum target, + GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, + GLboolean fixedsamplelocations ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC )( GLuint texture, GLenum target, + GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations ); #endif #ifndef GL_EXT_abgr -#define GL_EXT_abgr 1 +# define GL_EXT_abgr 1 #endif #ifndef GL_EXT_blend_color -#define GL_EXT_blend_color 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +# define GL_EXT_blend_color 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendColorEXT( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBLENDCOLOREXTPROC )( GLfloat red, GLfloat green, GLfloat blue, + GLfloat alpha ); #endif #ifndef GL_EXT_polygon_offset -#define GL_EXT_polygon_offset 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); +# define GL_EXT_polygon_offset 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPolygonOffsetEXT( GLfloat factor, GLfloat bias ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPOLYGONOFFSETEXTPROC )( GLfloat factor, GLfloat bias ); #endif #ifndef GL_EXT_texture -#define GL_EXT_texture 1 +# define GL_EXT_texture 1 #endif #ifndef GL_EXT_texture3D -#define GL_EXT_texture3D 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +# define GL_EXT_texture3D 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage3DEXT( GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, GLenum format, + GLenum type, const GLvoid *pixels ); +GLAPI void APIENTRY glTexSubImage3DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, const GLvoid *pixels ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXIMAGE3DEXTPROC )( GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, + GLenum type, const GLvoid *pixels ); #endif #ifndef GL_SGIS_texture_filter4 -#define GL_SGIS_texture_filter4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights); -GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); -typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); +# define GL_SGIS_texture_filter4 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetTexFilterFuncSGIS( GLenum target, GLenum filter, GLfloat *weights ); +GLAPI void APIENTRY glTexFilterFuncSGIS( GLenum target, GLenum filter, GLsizei n, + const GLfloat *weights ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC )( GLenum target, GLenum filter, + GLfloat *weights ); +typedef void( APIENTRYP PFNGLTEXFILTERFUNCSGISPROC )( GLenum target, GLenum filter, GLsizei n, + const GLfloat *weights ); #endif #ifndef GL_EXT_subtexture -#define GL_EXT_subtexture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +# define GL_EXT_subtexture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexSubImage1DEXT( GLenum target, GLint level, GLint xoffset, GLsizei width, + GLenum format, GLenum type, const GLvoid *pixels ); +GLAPI void APIENTRY glTexSubImage2DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, + const GLvoid *pixels ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC )( GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLenum type, + const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLenum type, const GLvoid *pixels ); #endif #ifndef GL_EXT_copy_texture -#define GL_EXT_copy_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +# define GL_EXT_copy_texture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyTexImage1DEXT( GLenum target, GLint level, GLenum internalformat, GLint x, + GLint y, GLsizei width, GLint border ); +GLAPI void APIENTRY glCopyTexImage2DEXT( GLenum target, GLint level, GLenum internalformat, GLint x, + GLint y, GLsizei width, GLsizei height, GLint border ); +GLAPI void APIENTRY glCopyTexSubImage1DEXT( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, + GLsizei width ); +GLAPI void APIENTRY glCopyTexSubImage2DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint x, GLint y, GLsizei width, GLsizei height ); +GLAPI void APIENTRY glCopyTexSubImage3DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, GLint y, GLsizei width, + GLsizei height ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC )( GLenum target, GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, GLint border ); +typedef void( APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC )( GLenum target, GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, GLsizei height, + GLint border ); +typedef void( APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC )( GLenum target, GLint level, GLint xoffset, + GLint x, GLint y, GLsizei width ); +typedef void( APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint x, GLint y, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint x, GLint y, + GLsizei width, GLsizei height ); #endif #ifndef GL_EXT_histogram -#define GL_EXT_histogram 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glResetHistogramEXT (GLenum target); -GLAPI void APIENTRY glResetMinmaxEXT (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); +# define GL_EXT_histogram 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetHistogramEXT( GLenum target, GLboolean reset, GLenum format, GLenum type, + GLvoid *values ); +GLAPI void APIENTRY glGetHistogramParameterfvEXT( GLenum target, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetHistogramParameterivEXT( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetMinmaxEXT( GLenum target, GLboolean reset, GLenum format, GLenum type, + GLvoid *values ); +GLAPI void APIENTRY glGetMinmaxParameterfvEXT( GLenum target, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetMinmaxParameterivEXT( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glHistogramEXT( GLenum target, GLsizei width, GLenum internalformat, + GLboolean sink ); +GLAPI void APIENTRY glMinmaxEXT( GLenum target, GLenum internalformat, GLboolean sink ); +GLAPI void APIENTRY glResetHistogramEXT( GLenum target ); +GLAPI void APIENTRY glResetMinmaxEXT( GLenum target ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETHISTOGRAMEXTPROC )( GLenum target, GLboolean reset, GLenum format, + GLenum type, GLvoid *values ); +typedef void( APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC )( GLenum target, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETMINMAXEXTPROC )( GLenum target, GLboolean reset, GLenum format, + GLenum type, GLvoid *values ); +typedef void( APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC )( GLenum target, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLHISTOGRAMEXTPROC )( GLenum target, GLsizei width, GLenum internalformat, + GLboolean sink ); +typedef void( APIENTRYP PFNGLMINMAXEXTPROC )( GLenum target, GLenum internalformat, GLboolean sink ); +typedef void( APIENTRYP PFNGLRESETHISTOGRAMEXTPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLRESETMINMAXEXTPROC )( GLenum target ); #endif #ifndef GL_EXT_convolution -#define GL_EXT_convolution 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params); -GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params); -GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *image); -GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +# define GL_EXT_convolution 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConvolutionFilter1DEXT( GLenum target, GLenum internalformat, GLsizei width, + GLenum format, GLenum type, const GLvoid *image ); +GLAPI void APIENTRY glConvolutionFilter2DEXT( GLenum target, GLenum internalformat, GLsizei width, + GLsizei height, GLenum format, GLenum type, + const GLvoid *image ); +GLAPI void APIENTRY glConvolutionParameterfEXT( GLenum target, GLenum pname, GLfloat params ); +GLAPI void APIENTRY glConvolutionParameterfvEXT( GLenum target, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glConvolutionParameteriEXT( GLenum target, GLenum pname, GLint params ); +GLAPI void APIENTRY glConvolutionParameterivEXT( GLenum target, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glCopyConvolutionFilter1DEXT( GLenum target, GLenum internalformat, GLint x, GLint y, + GLsizei width ); +GLAPI void APIENTRY glCopyConvolutionFilter2DEXT( GLenum target, GLenum internalformat, GLint x, GLint y, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glGetConvolutionFilterEXT( GLenum target, GLenum format, GLenum type, + GLvoid *image ); +GLAPI void APIENTRY glGetConvolutionParameterfvEXT( GLenum target, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetConvolutionParameterivEXT( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetSeparableFilterEXT( GLenum target, GLenum format, GLenum type, GLvoid *row, + GLvoid *column, GLvoid *span ); +GLAPI void APIENTRY glSeparableFilter2DEXT( GLenum target, GLenum internalformat, GLsizei width, + GLsizei height, GLenum format, GLenum type, + const GLvoid *row, const GLvoid *column ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC )( GLenum target, GLenum internalformat, + GLsizei width, GLenum format, GLenum type, + const GLvoid *image ); +typedef void( APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC )( GLenum target, GLenum internalformat, + GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *image ); +typedef void( APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC )( GLenum target, GLenum pname, + GLfloat params ); +typedef void( APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC )( GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC )( GLenum target, GLenum pname, GLint params ); +typedef void( APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC )( GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC )( GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width ); +typedef void( APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC )( GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC )( GLenum target, GLenum format, GLenum type, + GLvoid *image ); +typedef void( APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC )( GLenum target, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC )( GLenum target, GLenum format, GLenum type, + GLvoid *row, GLvoid *column, GLvoid *span ); +typedef void( APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC )( GLenum target, GLenum internalformat, + GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *row, + const GLvoid *column ); #endif #ifndef GL_SGI_color_matrix -#define GL_SGI_color_matrix 1 +# define GL_SGI_color_matrix 1 #endif #ifndef GL_SGI_color_table -#define GL_SGI_color_table 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, GLvoid *table); -GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); +# define GL_SGI_color_table 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTableSGI( GLenum target, GLenum internalformat, GLsizei width, GLenum format, + GLenum type, const GLvoid *table ); +GLAPI void APIENTRY glColorTableParameterfvSGI( GLenum target, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glColorTableParameterivSGI( GLenum target, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glCopyColorTableSGI( GLenum target, GLenum internalformat, GLint x, GLint y, + GLsizei width ); +GLAPI void APIENTRY glGetColorTableSGI( GLenum target, GLenum format, GLenum type, GLvoid *table ); +GLAPI void APIENTRY glGetColorTableParameterfvSGI( GLenum target, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetColorTableParameterivSGI( GLenum target, GLenum pname, GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOLORTABLESGIPROC )( GLenum target, GLenum internalformat, GLsizei width, + GLenum format, GLenum type, const GLvoid *table ); +typedef void( APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC )( GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC )( GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLCOPYCOLORTABLESGIPROC )( GLenum target, GLenum internalformat, GLint x, + GLint y, GLsizei width ); +typedef void( APIENTRYP PFNGLGETCOLORTABLESGIPROC )( GLenum target, GLenum format, GLenum type, + GLvoid *table ); +typedef void( APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC )( GLenum target, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC )( GLenum target, GLenum pname, + GLint *params ); #endif #ifndef GL_SGIX_pixel_texture -#define GL_SGIX_pixel_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); +# define GL_SGIX_pixel_texture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTexGenSGIX( GLenum mode ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPIXELTEXGENSGIXPROC )( GLenum mode ); #endif #ifndef GL_SGIS_pixel_texture -#define GL_SGIS_pixel_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param); -GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params); -GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params); -GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); +# define GL_SGIS_pixel_texture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTexGenParameteriSGIS( GLenum pname, GLint param ); +GLAPI void APIENTRY glPixelTexGenParameterivSGIS( GLenum pname, const GLint *params ); +GLAPI void APIENTRY glPixelTexGenParameterfSGIS( GLenum pname, GLfloat param ); +GLAPI void APIENTRY glPixelTexGenParameterfvSGIS( GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS( GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS( GLenum pname, GLfloat *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC )( GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC )( GLenum pname, const GLint *params ); +typedef void( APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC )( GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC )( GLenum pname, const GLfloat *params ); +typedef void( APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC )( GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC )( GLenum pname, GLfloat *params ); #endif #ifndef GL_SGIS_texture4D -#define GL_SGIS_texture4D 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); +# define GL_SGIS_texture4D 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage4DSGIS( GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLsizei size4d, GLint border, + GLenum format, GLenum type, const GLvoid *pixels ); +GLAPI void APIENTRY glTexSubImage4DSGIS( GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLint woffset, GLsizei width, GLsizei height, + GLsizei depth, GLsizei size4d, GLenum format, GLenum type, + const GLvoid *pixels ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXIMAGE4DSGISPROC )( GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth, + GLsizei size4d, GLint border, GLenum format, + GLenum type, const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC )( GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint woffset, + GLsizei width, GLsizei height, GLsizei depth, + GLsizei size4d, GLenum format, GLenum type, + const GLvoid *pixels ); #endif #ifndef GL_SGI_texture_color_table -#define GL_SGI_texture_color_table 1 +# define GL_SGI_texture_color_table 1 #endif #ifndef GL_EXT_cmyka -#define GL_EXT_cmyka 1 +# define GL_EXT_cmyka 1 #endif #ifndef GL_EXT_texture_object -#define GL_EXT_texture_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences); -GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture); -GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures); -GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures); -GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture); -GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); -typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); -typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); +# define GL_EXT_texture_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreTexturesResidentEXT( GLsizei n, const GLuint *textures, + GLboolean *residences ); +GLAPI void APIENTRY glBindTextureEXT( GLenum target, GLuint texture ); +GLAPI void APIENTRY glDeleteTexturesEXT( GLsizei n, const GLuint *textures ); +GLAPI void APIENTRY glGenTexturesEXT( GLsizei n, GLuint *textures ); +GLAPI GLboolean APIENTRY glIsTextureEXT( GLuint texture ); +GLAPI void APIENTRY glPrioritizeTexturesEXT( GLsizei n, const GLuint *textures, + const GLclampf *priorities ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean( APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC )( GLsizei n, const GLuint *textures, + GLboolean *residences ); +typedef void( APIENTRYP PFNGLBINDTEXTUREEXTPROC )( GLenum target, GLuint texture ); +typedef void( APIENTRYP PFNGLDELETETEXTURESEXTPROC )( GLsizei n, const GLuint *textures ); +typedef void( APIENTRYP PFNGLGENTEXTURESEXTPROC )( GLsizei n, GLuint *textures ); +typedef GLboolean( APIENTRYP PFNGLISTEXTUREEXTPROC )( GLuint texture ); +typedef void( APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC )( GLsizei n, const GLuint *textures, + const GLclampf *priorities ); #endif #ifndef GL_SGIS_detail_texture -#define GL_SGIS_detail_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +# define GL_SGIS_detail_texture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDetailTexFuncSGIS( GLenum target, GLsizei n, const GLfloat *points ); +GLAPI void APIENTRY glGetDetailTexFuncSGIS( GLenum target, GLfloat *points ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDETAILTEXFUNCSGISPROC )( GLenum target, GLsizei n, const GLfloat *points ); +typedef void( APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC )( GLenum target, GLfloat *points ); #endif #ifndef GL_SGIS_sharpen_texture -#define GL_SGIS_sharpen_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +# define GL_SGIS_sharpen_texture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSharpenTexFuncSGIS( GLenum target, GLsizei n, const GLfloat *points ); +GLAPI void APIENTRY glGetSharpenTexFuncSGIS( GLenum target, GLfloat *points ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC )( GLenum target, GLsizei n, const GLfloat *points ); +typedef void( APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC )( GLenum target, GLfloat *points ); #endif #ifndef GL_EXT_packed_pixels -#define GL_EXT_packed_pixels 1 +# define GL_EXT_packed_pixels 1 #endif #ifndef GL_SGIS_texture_lod -#define GL_SGIS_texture_lod 1 +# define GL_SGIS_texture_lod 1 #endif #ifndef GL_SGIS_multisample -#define GL_SGIS_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert); -GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); +# define GL_SGIS_multisample 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskSGIS( GLclampf value, GLboolean invert ); +GLAPI void APIENTRY glSamplePatternSGIS( GLenum pattern ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSAMPLEMASKSGISPROC )( GLclampf value, GLboolean invert ); +typedef void( APIENTRYP PFNGLSAMPLEPATTERNSGISPROC )( GLenum pattern ); #endif #ifndef GL_EXT_rescale_normal -#define GL_EXT_rescale_normal 1 +# define GL_EXT_rescale_normal 1 #endif #ifndef GL_EXT_vertex_array -#define GL_EXT_vertex_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glArrayElementEXT (GLint i); -GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count); -GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer); -GLAPI void APIENTRY glGetPointervEXT (GLenum pname, GLvoid* *params); -GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); -typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); -typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); -typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +# define GL_EXT_vertex_array 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glArrayElementEXT( GLint i ); +GLAPI void APIENTRY glColorPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, + const GLvoid *pointer ); +GLAPI void APIENTRY glDrawArraysEXT( GLenum mode, GLint first, GLsizei count ); +GLAPI void APIENTRY glEdgeFlagPointerEXT( GLsizei stride, GLsizei count, const GLboolean *pointer ); +GLAPI void APIENTRY glGetPointervEXT( GLenum pname, GLvoid **params ); +GLAPI void APIENTRY glIndexPointerEXT( GLenum type, GLsizei stride, GLsizei count, + const GLvoid *pointer ); +GLAPI void APIENTRY glNormalPointerEXT( GLenum type, GLsizei stride, GLsizei count, + const GLvoid *pointer ); +GLAPI void APIENTRY glTexCoordPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, + const GLvoid *pointer ); +GLAPI void APIENTRY glVertexPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, + const GLvoid *pointer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLARRAYELEMENTEXTPROC )( GLint i ); +typedef void( APIENTRYP PFNGLCOLORPOINTEREXTPROC )( GLint size, GLenum type, GLsizei stride, + GLsizei count, const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLDRAWARRAYSEXTPROC )( GLenum mode, GLint first, GLsizei count ); +typedef void( APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC )( GLsizei stride, GLsizei count, + const GLboolean *pointer ); +typedef void( APIENTRYP PFNGLGETPOINTERVEXTPROC )( GLenum pname, GLvoid **params ); +typedef void( APIENTRYP PFNGLINDEXPOINTEREXTPROC )( GLenum type, GLsizei stride, GLsizei count, + const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLNORMALPOINTEREXTPROC )( GLenum type, GLsizei stride, GLsizei count, + const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC )( GLint size, GLenum type, GLsizei stride, + GLsizei count, const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLVERTEXPOINTEREXTPROC )( GLint size, GLenum type, GLsizei stride, + GLsizei count, const GLvoid *pointer ); #endif #ifndef GL_EXT_misc_attribute -#define GL_EXT_misc_attribute 1 +# define GL_EXT_misc_attribute 1 #endif #ifndef GL_SGIS_generate_mipmap -#define GL_SGIS_generate_mipmap 1 +# define GL_SGIS_generate_mipmap 1 #endif #ifndef GL_SGIX_clipmap -#define GL_SGIX_clipmap 1 +# define GL_SGIX_clipmap 1 #endif #ifndef GL_SGIX_shadow -#define GL_SGIX_shadow 1 +# define GL_SGIX_shadow 1 #endif #ifndef GL_SGIS_texture_edge_clamp -#define GL_SGIS_texture_edge_clamp 1 +# define GL_SGIS_texture_edge_clamp 1 #endif #ifndef GL_SGIS_texture_border_clamp -#define GL_SGIS_texture_border_clamp 1 +# define GL_SGIS_texture_border_clamp 1 #endif #ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationEXT (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); +# define GL_EXT_blend_minmax 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationEXT( GLenum mode ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBLENDEQUATIONEXTPROC )( GLenum mode ); #endif #ifndef GL_EXT_blend_subtract -#define GL_EXT_blend_subtract 1 +# define GL_EXT_blend_subtract 1 #endif #ifndef GL_EXT_blend_logic_op -#define GL_EXT_blend_logic_op 1 +# define GL_EXT_blend_logic_op 1 #endif #ifndef GL_SGIX_interlace -#define GL_SGIX_interlace 1 +# define GL_SGIX_interlace 1 #endif #ifndef GL_SGIX_pixel_tiles -#define GL_SGIX_pixel_tiles 1 +# define GL_SGIX_pixel_tiles 1 #endif #ifndef GL_SGIX_texture_select -#define GL_SGIX_texture_select 1 +# define GL_SGIX_texture_select 1 #endif #ifndef GL_SGIX_sprite -#define GL_SGIX_sprite 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param); -GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param); -GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); +# define GL_SGIX_sprite 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpriteParameterfSGIX( GLenum pname, GLfloat param ); +GLAPI void APIENTRY glSpriteParameterfvSGIX( GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glSpriteParameteriSGIX( GLenum pname, GLint param ); +GLAPI void APIENTRY glSpriteParameterivSGIX( GLenum pname, const GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC )( GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC )( GLenum pname, const GLfloat *params ); +typedef void( APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC )( GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC )( GLenum pname, const GLint *params ); #endif #ifndef GL_SGIX_texture_multi_buffer -#define GL_SGIX_texture_multi_buffer 1 +# define GL_SGIX_texture_multi_buffer 1 #endif #ifndef GL_EXT_point_parameters -#define GL_EXT_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); +# define GL_EXT_point_parameters 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfEXT( GLenum pname, GLfloat param ); +GLAPI void APIENTRY glPointParameterfvEXT( GLenum pname, const GLfloat *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPOINTPARAMETERFEXTPROC )( GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC )( GLenum pname, const GLfloat *params ); #endif #ifndef GL_SGIS_point_parameters -#define GL_SGIS_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +# define GL_SGIS_point_parameters 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfSGIS( GLenum pname, GLfloat param ); +GLAPI void APIENTRY glPointParameterfvSGIS( GLenum pname, const GLfloat *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPOINTPARAMETERFSGISPROC )( GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC )( GLenum pname, const GLfloat *params ); #endif #ifndef GL_SGIX_instruments -#define GL_SGIX_instruments 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); -GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer); -GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p); -GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker); -GLAPI void APIENTRY glStartInstrumentsSGIX (void); -GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); -typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); -typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); -typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); +# define GL_SGIX_instruments 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLint APIENTRY glGetInstrumentsSGIX( void ); +GLAPI void APIENTRY glInstrumentsBufferSGIX( GLsizei size, GLint *buffer ); +GLAPI GLint APIENTRY glPollInstrumentsSGIX( GLint *marker_p ); +GLAPI void APIENTRY glReadInstrumentsSGIX( GLint marker ); +GLAPI void APIENTRY glStartInstrumentsSGIX( void ); +GLAPI void APIENTRY glStopInstrumentsSGIX( GLint marker ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLint( APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC )( void ); +typedef void( APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC )( GLsizei size, GLint *buffer ); +typedef GLint( APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC )( GLint *marker_p ); +typedef void( APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC )( GLint marker ); +typedef void( APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC )( void ); +typedef void( APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC )( GLint marker ); #endif #ifndef GL_SGIX_texture_scale_bias -#define GL_SGIX_texture_scale_bias 1 +# define GL_SGIX_texture_scale_bias 1 #endif #ifndef GL_SGIX_framezoom -#define GL_SGIX_framezoom 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFrameZoomSGIX (GLint factor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); +# define GL_SGIX_framezoom 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFrameZoomSGIX( GLint factor ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLFRAMEZOOMSGIXPROC )( GLint factor ); #endif #ifndef GL_SGIX_tag_sample_buffer -#define GL_SGIX_tag_sample_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTagSampleBufferSGIX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); +# define GL_SGIX_tag_sample_buffer 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTagSampleBufferSGIX( void ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC )( void ); #endif #ifndef GL_SGIX_polynomial_ffd -#define GL_SGIX_polynomial_ffd 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); -GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); -GLAPI void APIENTRY glDeformSGIX (GLbitfield mask); -GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); -typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); +# define GL_SGIX_polynomial_ffd 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeformationMap3dSGIX( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, + GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, + GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, + GLint worder, const GLdouble *points ); +GLAPI void APIENTRY glDeformationMap3fSGIX( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, + GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, + GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, + GLint worder, const GLfloat *points ); +GLAPI void APIENTRY glDeformSGIX( GLbitfield mask ); +GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX( GLbitfield mask ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC )( GLenum target, GLdouble u1, GLdouble u2, + GLint ustride, GLint uorder, GLdouble v1, + GLdouble v2, GLint vstride, GLint vorder, + GLdouble w1, GLdouble w2, GLint wstride, + GLint worder, const GLdouble *points ); +typedef void( APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC )( GLenum target, GLfloat u1, GLfloat u2, + GLint ustride, GLint uorder, GLfloat v1, + GLfloat v2, GLint vstride, GLint vorder, + GLfloat w1, GLfloat w2, GLint wstride, + GLint worder, const GLfloat *points ); +typedef void( APIENTRYP PFNGLDEFORMSGIXPROC )( GLbitfield mask ); +typedef void( APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC )( GLbitfield mask ); #endif #ifndef GL_SGIX_reference_plane -#define GL_SGIX_reference_plane 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); +# define GL_SGIX_reference_plane 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReferencePlaneSGIX( const GLdouble *equation ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLREFERENCEPLANESGIXPROC )( const GLdouble *equation ); #endif #ifndef GL_SGIX_flush_raster -#define GL_SGIX_flush_raster 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushRasterSGIX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); +# define GL_SGIX_flush_raster 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushRasterSGIX( void ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLFLUSHRASTERSGIXPROC )( void ); #endif #ifndef GL_SGIX_depth_texture -#define GL_SGIX_depth_texture 1 +# define GL_SGIX_depth_texture 1 #endif #ifndef GL_SGIS_fog_function -#define GL_SGIS_fog_function 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); +# define GL_SGIS_fog_function 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogFuncSGIS( GLsizei n, const GLfloat *points ); +GLAPI void APIENTRY glGetFogFuncSGIS( GLfloat *points ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLFOGFUNCSGISPROC )( GLsizei n, const GLfloat *points ); +typedef void( APIENTRYP PFNGLGETFOGFUNCSGISPROC )( GLfloat *points ); #endif #ifndef GL_SGIX_fog_offset -#define GL_SGIX_fog_offset 1 +# define GL_SGIX_fog_offset 1 #endif #ifndef GL_HP_image_transform -#define GL_HP_image_transform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); +# define GL_HP_image_transform 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImageTransformParameteriHP( GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glImageTransformParameterfHP( GLenum target, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glImageTransformParameterivHP( GLenum target, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glImageTransformParameterfvHP( GLenum target, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glGetImageTransformParameterivHP( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetImageTransformParameterfvHP( GLenum target, GLenum pname, GLfloat *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC )( GLenum target, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC )( GLenum target, GLenum pname, + GLfloat param ); +typedef void( APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC )( GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC )( GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC )( GLenum target, GLenum pname, + GLfloat *params ); #endif #ifndef GL_HP_convolution_border_modes -#define GL_HP_convolution_border_modes 1 +# define GL_HP_convolution_border_modes 1 #endif #ifndef GL_SGIX_texture_add_env -#define GL_SGIX_texture_add_env 1 +# define GL_SGIX_texture_add_env 1 #endif #ifndef GL_EXT_color_subtable -#define GL_EXT_color_subtable 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +# define GL_EXT_color_subtable 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorSubTableEXT( GLenum target, GLsizei start, GLsizei count, GLenum format, + GLenum type, const GLvoid *data ); +GLAPI void APIENTRY glCopyColorSubTableEXT( GLenum target, GLsizei start, GLint x, GLint y, + GLsizei width ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOLORSUBTABLEEXTPROC )( GLenum target, GLsizei start, GLsizei count, + GLenum format, GLenum type, const GLvoid *data ); +typedef void( APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC )( GLenum target, GLsizei start, GLint x, GLint y, + GLsizei width ); #endif #ifndef GL_PGI_vertex_hints -#define GL_PGI_vertex_hints 1 +# define GL_PGI_vertex_hints 1 #endif #ifndef GL_PGI_misc_hints -#define GL_PGI_misc_hints 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); +# define GL_PGI_misc_hints 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glHintPGI( GLenum target, GLint mode ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLHINTPGIPROC )( GLenum target, GLint mode ); #endif #ifndef GL_EXT_paletted_texture -#define GL_EXT_paletted_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *data); -GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +# define GL_EXT_paletted_texture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTableEXT( GLenum target, GLenum internalFormat, GLsizei width, GLenum format, + GLenum type, const GLvoid *table ); +GLAPI void APIENTRY glGetColorTableEXT( GLenum target, GLenum format, GLenum type, GLvoid *data ); +GLAPI void APIENTRY glGetColorTableParameterivEXT( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetColorTableParameterfvEXT( GLenum target, GLenum pname, GLfloat *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOLORTABLEEXTPROC )( GLenum target, GLenum internalFormat, GLsizei width, + GLenum format, GLenum type, const GLvoid *table ); +typedef void( APIENTRYP PFNGLGETCOLORTABLEEXTPROC )( GLenum target, GLenum format, GLenum type, + GLvoid *data ); +typedef void( APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC )( GLenum target, GLenum pname, + GLfloat *params ); #endif #ifndef GL_EXT_clip_volume_hint -#define GL_EXT_clip_volume_hint 1 +# define GL_EXT_clip_volume_hint 1 #endif #ifndef GL_SGIX_list_priority -#define GL_SGIX_list_priority 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params); -GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param); -GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param); -GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); +# define GL_SGIX_list_priority 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetListParameterfvSGIX( GLuint list, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetListParameterivSGIX( GLuint list, GLenum pname, GLint *params ); +GLAPI void APIENTRY glListParameterfSGIX( GLuint list, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glListParameterfvSGIX( GLuint list, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glListParameteriSGIX( GLuint list, GLenum pname, GLint param ); +GLAPI void APIENTRY glListParameterivSGIX( GLuint list, GLenum pname, const GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC )( GLuint list, GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC )( GLuint list, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLLISTPARAMETERFSGIXPROC )( GLuint list, GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC )( GLuint list, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLLISTPARAMETERISGIXPROC )( GLuint list, GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC )( GLuint list, GLenum pname, const GLint *params ); #endif #ifndef GL_SGIX_ir_instrument1 -#define GL_SGIX_ir_instrument1 1 +# define GL_SGIX_ir_instrument1 1 #endif #ifndef GL_SGIX_calligraphic_fragment -#define GL_SGIX_calligraphic_fragment 1 +# define GL_SGIX_calligraphic_fragment 1 #endif #ifndef GL_SGIX_texture_lod_bias -#define GL_SGIX_texture_lod_bias 1 +# define GL_SGIX_texture_lod_bias 1 #endif #ifndef GL_SGIX_shadow_ambient -#define GL_SGIX_shadow_ambient 1 +# define GL_SGIX_shadow_ambient 1 #endif #ifndef GL_EXT_index_texture -#define GL_EXT_index_texture 1 +# define GL_EXT_index_texture 1 #endif #ifndef GL_EXT_index_material -#define GL_EXT_index_material 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); +# define GL_EXT_index_material 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexMaterialEXT( GLenum face, GLenum mode ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLINDEXMATERIALEXTPROC )( GLenum face, GLenum mode ); #endif #ifndef GL_EXT_index_func -#define GL_EXT_index_func 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); +# define GL_EXT_index_func 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexFuncEXT( GLenum func, GLclampf ref ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLINDEXFUNCEXTPROC )( GLenum func, GLclampf ref ); #endif #ifndef GL_EXT_index_array_formats -#define GL_EXT_index_array_formats 1 +# define GL_EXT_index_array_formats 1 #endif #ifndef GL_EXT_compiled_vertex_array -#define GL_EXT_compiled_vertex_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count); -GLAPI void APIENTRY glUnlockArraysEXT (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); +# define GL_EXT_compiled_vertex_array 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLockArraysEXT( GLint first, GLsizei count ); +GLAPI void APIENTRY glUnlockArraysEXT( void ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLLOCKARRAYSEXTPROC )( GLint first, GLsizei count ); +typedef void( APIENTRYP PFNGLUNLOCKARRAYSEXTPROC )( void ); #endif #ifndef GL_EXT_cull_vertex -#define GL_EXT_cull_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params); -GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); +# define GL_EXT_cull_vertex 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCullParameterdvEXT( GLenum pname, GLdouble *params ); +GLAPI void APIENTRY glCullParameterfvEXT( GLenum pname, GLfloat *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCULLPARAMETERDVEXTPROC )( GLenum pname, GLdouble *params ); +typedef void( APIENTRYP PFNGLCULLPARAMETERFVEXTPROC )( GLenum pname, GLfloat *params ); #endif #ifndef GL_SGIX_ycrcb -#define GL_SGIX_ycrcb 1 +# define GL_SGIX_ycrcb 1 #endif #ifndef GL_SGIX_fragment_lighting -#define GL_SGIX_fragment_lighting 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode); -GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param); -GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param); -GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params); -GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param); -GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param); -GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params); -GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param); -GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param); -GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params); -GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params); -GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); +# define GL_SGIX_fragment_lighting 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFragmentColorMaterialSGIX( GLenum face, GLenum mode ); +GLAPI void APIENTRY glFragmentLightfSGIX( GLenum light, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glFragmentLightfvSGIX( GLenum light, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glFragmentLightiSGIX( GLenum light, GLenum pname, GLint param ); +GLAPI void APIENTRY glFragmentLightivSGIX( GLenum light, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glFragmentLightModelfSGIX( GLenum pname, GLfloat param ); +GLAPI void APIENTRY glFragmentLightModelfvSGIX( GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glFragmentLightModeliSGIX( GLenum pname, GLint param ); +GLAPI void APIENTRY glFragmentLightModelivSGIX( GLenum pname, const GLint *params ); +GLAPI void APIENTRY glFragmentMaterialfSGIX( GLenum face, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glFragmentMaterialfvSGIX( GLenum face, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glFragmentMaterialiSGIX( GLenum face, GLenum pname, GLint param ); +GLAPI void APIENTRY glFragmentMaterialivSGIX( GLenum face, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glGetFragmentLightfvSGIX( GLenum light, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetFragmentLightivSGIX( GLenum light, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetFragmentMaterialfvSGIX( GLenum face, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetFragmentMaterialivSGIX( GLenum face, GLenum pname, GLint *params ); +GLAPI void APIENTRY glLightEnviSGIX( GLenum pname, GLint param ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC )( GLenum face, GLenum mode ); +typedef void( APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC )( GLenum light, GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC )( GLenum light, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC )( GLenum light, GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC )( GLenum light, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC )( GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC )( GLenum pname, const GLfloat *params ); +typedef void( APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC )( GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC )( GLenum pname, const GLint *params ); +typedef void( APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC )( GLenum face, GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC )( GLenum face, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC )( GLenum face, GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC )( GLenum face, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC )( GLenum light, GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC )( GLenum light, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC )( GLenum face, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC )( GLenum face, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLLIGHTENVISGIXPROC )( GLenum pname, GLint param ); #endif #ifndef GL_IBM_rasterpos_clip -#define GL_IBM_rasterpos_clip 1 +# define GL_IBM_rasterpos_clip 1 #endif #ifndef GL_HP_texture_lighting -#define GL_HP_texture_lighting 1 +# define GL_HP_texture_lighting 1 #endif #ifndef GL_EXT_draw_range_elements -#define GL_EXT_draw_range_elements 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +# define GL_EXT_draw_range_elements 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawRangeElementsEXT( GLenum mode, GLuint start, GLuint end, GLsizei count, + GLenum type, const GLvoid *indices ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC )( GLenum mode, GLuint start, GLuint end, + GLsizei count, GLenum type, + const GLvoid *indices ); #endif #ifndef GL_WIN_phong_shading -#define GL_WIN_phong_shading 1 +# define GL_WIN_phong_shading 1 #endif #ifndef GL_WIN_specular_fog -#define GL_WIN_specular_fog 1 +# define GL_WIN_specular_fog 1 #endif #ifndef GL_EXT_light_texture -#define GL_EXT_light_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glApplyTextureEXT (GLenum mode); -GLAPI void APIENTRY glTextureLightEXT (GLenum pname); -GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +# define GL_EXT_light_texture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glApplyTextureEXT( GLenum mode ); +GLAPI void APIENTRY glTextureLightEXT( GLenum pname ); +GLAPI void APIENTRY glTextureMaterialEXT( GLenum face, GLenum mode ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLAPPLYTEXTUREEXTPROC )( GLenum mode ); +typedef void( APIENTRYP PFNGLTEXTURELIGHTEXTPROC )( GLenum pname ); +typedef void( APIENTRYP PFNGLTEXTUREMATERIALEXTPROC )( GLenum face, GLenum mode ); #endif #ifndef GL_SGIX_blend_alpha_minmax -#define GL_SGIX_blend_alpha_minmax 1 +# define GL_SGIX_blend_alpha_minmax 1 #endif #ifndef GL_EXT_bgra -#define GL_EXT_bgra 1 +# define GL_EXT_bgra 1 #endif #ifndef GL_SGIX_async -#define GL_SGIX_async 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker); -GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp); -GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp); -GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range); -GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range); -GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); -typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); -typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); -typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); -typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); -typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +# define GL_SGIX_async 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glAsyncMarkerSGIX( GLuint marker ); +GLAPI GLint APIENTRY glFinishAsyncSGIX( GLuint *markerp ); +GLAPI GLint APIENTRY glPollAsyncSGIX( GLuint *markerp ); +GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX( GLsizei range ); +GLAPI void APIENTRY glDeleteAsyncMarkersSGIX( GLuint marker, GLsizei range ); +GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX( GLuint marker ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLASYNCMARKERSGIXPROC )( GLuint marker ); +typedef GLint( APIENTRYP PFNGLFINISHASYNCSGIXPROC )( GLuint *markerp ); +typedef GLint( APIENTRYP PFNGLPOLLASYNCSGIXPROC )( GLuint *markerp ); +typedef GLuint( APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC )( GLsizei range ); +typedef void( APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC )( GLuint marker, GLsizei range ); +typedef GLboolean( APIENTRYP PFNGLISASYNCMARKERSGIXPROC )( GLuint marker ); #endif #ifndef GL_SGIX_async_pixel -#define GL_SGIX_async_pixel 1 +# define GL_SGIX_async_pixel 1 #endif #ifndef GL_SGIX_async_histogram -#define GL_SGIX_async_histogram 1 +# define GL_SGIX_async_histogram 1 #endif #ifndef GL_INTEL_parallel_arrays -#define GL_INTEL_parallel_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); -GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const GLvoid* *pointer); -GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); -GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +# define GL_INTEL_parallel_arrays 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexPointervINTEL( GLint size, GLenum type, const GLvoid **pointer ); +GLAPI void APIENTRY glNormalPointervINTEL( GLenum type, const GLvoid **pointer ); +GLAPI void APIENTRY glColorPointervINTEL( GLint size, GLenum type, const GLvoid **pointer ); +GLAPI void APIENTRY glTexCoordPointervINTEL( GLint size, GLenum type, const GLvoid **pointer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXPOINTERVINTELPROC )( GLint size, GLenum type, + const GLvoid **pointer ); +typedef void( APIENTRYP PFNGLNORMALPOINTERVINTELPROC )( GLenum type, const GLvoid **pointer ); +typedef void( APIENTRYP PFNGLCOLORPOINTERVINTELPROC )( GLint size, GLenum type, const GLvoid **pointer ); +typedef void( APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC )( GLint size, GLenum type, + const GLvoid **pointer ); #endif #ifndef GL_HP_occlusion_test -#define GL_HP_occlusion_test 1 +# define GL_HP_occlusion_test 1 #endif #ifndef GL_EXT_pixel_transform -#define GL_EXT_pixel_transform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +# define GL_EXT_pixel_transform 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTransformParameteriEXT( GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glPixelTransformParameterfEXT( GLenum target, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glPixelTransformParameterivEXT( GLenum target, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glPixelTransformParameterfvEXT( GLenum target, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glGetPixelTransformParameterivEXT( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetPixelTransformParameterfvEXT( GLenum target, GLenum pname, GLfloat *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC )( GLenum target, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC )( GLenum target, GLenum pname, + GLfloat param ); +typedef void( APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC )( GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC )( GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC )( GLenum target, GLenum pname, + GLfloat *params ); #endif #ifndef GL_EXT_pixel_transform_color_table -#define GL_EXT_pixel_transform_color_table 1 +# define GL_EXT_pixel_transform_color_table 1 #endif #ifndef GL_EXT_shared_texture_palette -#define GL_EXT_shared_texture_palette 1 +# define GL_EXT_shared_texture_palette 1 #endif #ifndef GL_EXT_separate_specular_color -#define GL_EXT_separate_specular_color 1 +# define GL_EXT_separate_specular_color 1 #endif #ifndef GL_EXT_secondary_color -#define GL_EXT_secondary_color 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue); -GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue); -GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue); -GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue); -GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v); -GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue); -GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v); -GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue); -GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v); -GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue); -GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v); -GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue); -GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v); -GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +# define GL_EXT_secondary_color 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSecondaryColor3bEXT( GLbyte red, GLbyte green, GLbyte blue ); +GLAPI void APIENTRY glSecondaryColor3bvEXT( const GLbyte *v ); +GLAPI void APIENTRY glSecondaryColor3dEXT( GLdouble red, GLdouble green, GLdouble blue ); +GLAPI void APIENTRY glSecondaryColor3dvEXT( const GLdouble *v ); +GLAPI void APIENTRY glSecondaryColor3fEXT( GLfloat red, GLfloat green, GLfloat blue ); +GLAPI void APIENTRY glSecondaryColor3fvEXT( const GLfloat *v ); +GLAPI void APIENTRY glSecondaryColor3iEXT( GLint red, GLint green, GLint blue ); +GLAPI void APIENTRY glSecondaryColor3ivEXT( const GLint *v ); +GLAPI void APIENTRY glSecondaryColor3sEXT( GLshort red, GLshort green, GLshort blue ); +GLAPI void APIENTRY glSecondaryColor3svEXT( const GLshort *v ); +GLAPI void APIENTRY glSecondaryColor3ubEXT( GLubyte red, GLubyte green, GLubyte blue ); +GLAPI void APIENTRY glSecondaryColor3ubvEXT( const GLubyte *v ); +GLAPI void APIENTRY glSecondaryColor3uiEXT( GLuint red, GLuint green, GLuint blue ); +GLAPI void APIENTRY glSecondaryColor3uivEXT( const GLuint *v ); +GLAPI void APIENTRY glSecondaryColor3usEXT( GLushort red, GLushort green, GLushort blue ); +GLAPI void APIENTRY glSecondaryColor3usvEXT( const GLushort *v ); +GLAPI void APIENTRY glSecondaryColorPointerEXT( GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC )( GLbyte red, GLbyte green, GLbyte blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC )( const GLbyte *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC )( GLdouble red, GLdouble green, GLdouble blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC )( const GLdouble *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC )( GLfloat red, GLfloat green, GLfloat blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC )( const GLfloat *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC )( GLint red, GLint green, GLint blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC )( const GLint *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC )( GLshort red, GLshort green, GLshort blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC )( const GLshort *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC )( GLubyte red, GLubyte green, GLubyte blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC )( const GLubyte *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC )( GLuint red, GLuint green, GLuint blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC )( const GLuint *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC )( GLushort red, GLushort green, GLushort blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC )( const GLushort *v ); +typedef void( APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC )( GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); #endif #ifndef GL_EXT_texture_perturb_normal -#define GL_EXT_texture_perturb_normal 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureNormalEXT (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); +# define GL_EXT_texture_perturb_normal 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureNormalEXT( GLenum mode ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXTURENORMALEXTPROC )( GLenum mode ); #endif #ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +# define GL_EXT_multi_draw_arrays 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysEXT( GLenum mode, const GLint *first, const GLsizei *count, + GLsizei primcount ); +GLAPI void APIENTRY glMultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type, + const GLvoid **indices, GLsizei primcount ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC )( GLenum mode, const GLint *first, + const GLsizei *count, GLsizei primcount ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC )( GLenum mode, const GLsizei *count, GLenum type, + const GLvoid **indices, GLsizei primcount ); #endif #ifndef GL_EXT_fog_coord -#define GL_EXT_fog_coord 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord); -GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord); -GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord); -GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord); -GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +# define GL_EXT_fog_coord 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogCoordfEXT( GLfloat coord ); +GLAPI void APIENTRY glFogCoordfvEXT( const GLfloat *coord ); +GLAPI void APIENTRY glFogCoorddEXT( GLdouble coord ); +GLAPI void APIENTRY glFogCoorddvEXT( const GLdouble *coord ); +GLAPI void APIENTRY glFogCoordPointerEXT( GLenum type, GLsizei stride, const GLvoid *pointer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLFOGCOORDFEXTPROC )( GLfloat coord ); +typedef void( APIENTRYP PFNGLFOGCOORDFVEXTPROC )( const GLfloat *coord ); +typedef void( APIENTRYP PFNGLFOGCOORDDEXTPROC )( GLdouble coord ); +typedef void( APIENTRYP PFNGLFOGCOORDDVEXTPROC )( const GLdouble *coord ); +typedef void( APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC )( GLenum type, GLsizei stride, + const GLvoid *pointer ); #endif #ifndef GL_REND_screen_coordinates -#define GL_REND_screen_coordinates 1 +# define GL_REND_screen_coordinates 1 #endif #ifndef GL_EXT_coordinate_frame -#define GL_EXT_coordinate_frame 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz); -GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz); -GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz); -GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz); -GLAPI void APIENTRY glTangent3ivEXT (const GLint *v); -GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz); -GLAPI void APIENTRY glTangent3svEXT (const GLshort *v); -GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz); -GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz); -GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz); -GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz); -GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v); -GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz); -GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v); -GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); -typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); -typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); -typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); -typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); -typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); -typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); -typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); -typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); -typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); -typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +# define GL_EXT_coordinate_frame 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTangent3bEXT( GLbyte tx, GLbyte ty, GLbyte tz ); +GLAPI void APIENTRY glTangent3bvEXT( const GLbyte *v ); +GLAPI void APIENTRY glTangent3dEXT( GLdouble tx, GLdouble ty, GLdouble tz ); +GLAPI void APIENTRY glTangent3dvEXT( const GLdouble *v ); +GLAPI void APIENTRY glTangent3fEXT( GLfloat tx, GLfloat ty, GLfloat tz ); +GLAPI void APIENTRY glTangent3fvEXT( const GLfloat *v ); +GLAPI void APIENTRY glTangent3iEXT( GLint tx, GLint ty, GLint tz ); +GLAPI void APIENTRY glTangent3ivEXT( const GLint *v ); +GLAPI void APIENTRY glTangent3sEXT( GLshort tx, GLshort ty, GLshort tz ); +GLAPI void APIENTRY glTangent3svEXT( const GLshort *v ); +GLAPI void APIENTRY glBinormal3bEXT( GLbyte bx, GLbyte by, GLbyte bz ); +GLAPI void APIENTRY glBinormal3bvEXT( const GLbyte *v ); +GLAPI void APIENTRY glBinormal3dEXT( GLdouble bx, GLdouble by, GLdouble bz ); +GLAPI void APIENTRY glBinormal3dvEXT( const GLdouble *v ); +GLAPI void APIENTRY glBinormal3fEXT( GLfloat bx, GLfloat by, GLfloat bz ); +GLAPI void APIENTRY glBinormal3fvEXT( const GLfloat *v ); +GLAPI void APIENTRY glBinormal3iEXT( GLint bx, GLint by, GLint bz ); +GLAPI void APIENTRY glBinormal3ivEXT( const GLint *v ); +GLAPI void APIENTRY glBinormal3sEXT( GLshort bx, GLshort by, GLshort bz ); +GLAPI void APIENTRY glBinormal3svEXT( const GLshort *v ); +GLAPI void APIENTRY glTangentPointerEXT( GLenum type, GLsizei stride, const GLvoid *pointer ); +GLAPI void APIENTRY glBinormalPointerEXT( GLenum type, GLsizei stride, const GLvoid *pointer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTANGENT3BEXTPROC )( GLbyte tx, GLbyte ty, GLbyte tz ); +typedef void( APIENTRYP PFNGLTANGENT3BVEXTPROC )( const GLbyte *v ); +typedef void( APIENTRYP PFNGLTANGENT3DEXTPROC )( GLdouble tx, GLdouble ty, GLdouble tz ); +typedef void( APIENTRYP PFNGLTANGENT3DVEXTPROC )( const GLdouble *v ); +typedef void( APIENTRYP PFNGLTANGENT3FEXTPROC )( GLfloat tx, GLfloat ty, GLfloat tz ); +typedef void( APIENTRYP PFNGLTANGENT3FVEXTPROC )( const GLfloat *v ); +typedef void( APIENTRYP PFNGLTANGENT3IEXTPROC )( GLint tx, GLint ty, GLint tz ); +typedef void( APIENTRYP PFNGLTANGENT3IVEXTPROC )( const GLint *v ); +typedef void( APIENTRYP PFNGLTANGENT3SEXTPROC )( GLshort tx, GLshort ty, GLshort tz ); +typedef void( APIENTRYP PFNGLTANGENT3SVEXTPROC )( const GLshort *v ); +typedef void( APIENTRYP PFNGLBINORMAL3BEXTPROC )( GLbyte bx, GLbyte by, GLbyte bz ); +typedef void( APIENTRYP PFNGLBINORMAL3BVEXTPROC )( const GLbyte *v ); +typedef void( APIENTRYP PFNGLBINORMAL3DEXTPROC )( GLdouble bx, GLdouble by, GLdouble bz ); +typedef void( APIENTRYP PFNGLBINORMAL3DVEXTPROC )( const GLdouble *v ); +typedef void( APIENTRYP PFNGLBINORMAL3FEXTPROC )( GLfloat bx, GLfloat by, GLfloat bz ); +typedef void( APIENTRYP PFNGLBINORMAL3FVEXTPROC )( const GLfloat *v ); +typedef void( APIENTRYP PFNGLBINORMAL3IEXTPROC )( GLint bx, GLint by, GLint bz ); +typedef void( APIENTRYP PFNGLBINORMAL3IVEXTPROC )( const GLint *v ); +typedef void( APIENTRYP PFNGLBINORMAL3SEXTPROC )( GLshort bx, GLshort by, GLshort bz ); +typedef void( APIENTRYP PFNGLBINORMAL3SVEXTPROC )( const GLshort *v ); +typedef void( APIENTRYP PFNGLTANGENTPOINTEREXTPROC )( GLenum type, GLsizei stride, + const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLBINORMALPOINTEREXTPROC )( GLenum type, GLsizei stride, + const GLvoid *pointer ); #endif #ifndef GL_EXT_texture_env_combine -#define GL_EXT_texture_env_combine 1 +# define GL_EXT_texture_env_combine 1 #endif #ifndef GL_APPLE_specular_vector -#define GL_APPLE_specular_vector 1 +# define GL_APPLE_specular_vector 1 #endif #ifndef GL_APPLE_transform_hint -#define GL_APPLE_transform_hint 1 +# define GL_APPLE_transform_hint 1 #endif #ifndef GL_SGIX_fog_scale -#define GL_SGIX_fog_scale 1 +# define GL_SGIX_fog_scale 1 #endif #ifndef GL_SUNX_constant_data -#define GL_SUNX_constant_data 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFinishTextureSUNX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); +# define GL_SUNX_constant_data 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFinishTextureSUNX( void ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLFINISHTEXTURESUNXPROC )( void ); #endif #ifndef GL_SUN_global_alpha -#define GL_SUN_global_alpha 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor); -GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor); -GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor); -GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor); -GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor); -GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor); -GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor); -GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); +# define GL_SUN_global_alpha 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGlobalAlphaFactorbSUN( GLbyte factor ); +GLAPI void APIENTRY glGlobalAlphaFactorsSUN( GLshort factor ); +GLAPI void APIENTRY glGlobalAlphaFactoriSUN( GLint factor ); +GLAPI void APIENTRY glGlobalAlphaFactorfSUN( GLfloat factor ); +GLAPI void APIENTRY glGlobalAlphaFactordSUN( GLdouble factor ); +GLAPI void APIENTRY glGlobalAlphaFactorubSUN( GLubyte factor ); +GLAPI void APIENTRY glGlobalAlphaFactorusSUN( GLushort factor ); +GLAPI void APIENTRY glGlobalAlphaFactoruiSUN( GLuint factor ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC )( GLbyte factor ); +typedef void( APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC )( GLshort factor ); +typedef void( APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC )( GLint factor ); +typedef void( APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC )( GLfloat factor ); +typedef void( APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC )( GLdouble factor ); +typedef void( APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC )( GLubyte factor ); +typedef void( APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC )( GLushort factor ); +typedef void( APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC )( GLuint factor ); #endif #ifndef GL_SUN_triangle_list -#define GL_SUN_triangle_list 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code); -GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code); -GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code); -GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code); -GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code); -GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code); -GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const GLvoid* *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); +# define GL_SUN_triangle_list 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReplacementCodeuiSUN( GLuint code ); +GLAPI void APIENTRY glReplacementCodeusSUN( GLushort code ); +GLAPI void APIENTRY glReplacementCodeubSUN( GLubyte code ); +GLAPI void APIENTRY glReplacementCodeuivSUN( const GLuint *code ); +GLAPI void APIENTRY glReplacementCodeusvSUN( const GLushort *code ); +GLAPI void APIENTRY glReplacementCodeubvSUN( const GLubyte *code ); +GLAPI void APIENTRY glReplacementCodePointerSUN( GLenum type, GLsizei stride, const GLvoid **pointer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC )( GLuint code ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC )( GLushort code ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC )( GLubyte code ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC )( const GLuint *code ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC )( const GLushort *code ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC )( const GLubyte *code ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC )( GLenum type, GLsizei stride, + const GLvoid **pointer ); #endif #ifndef GL_SUN_vertex -#define GL_SUN_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); -GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v); -GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v); -GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +# define GL_SUN_vertex 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColor4ubVertex2fSUN( GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, + GLfloat y ); +GLAPI void APIENTRY glColor4ubVertex2fvSUN( const GLubyte *c, const GLfloat *v ); +GLAPI void APIENTRY glColor4ubVertex3fSUN( GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, + GLfloat y, GLfloat z ); +GLAPI void APIENTRY glColor4ubVertex3fvSUN( const GLubyte *c, const GLfloat *v ); +GLAPI void APIENTRY glColor3fVertex3fSUN( GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, + GLfloat z ); +GLAPI void APIENTRY glColor3fVertex3fvSUN( const GLfloat *c, const GLfloat *v ); +GLAPI void APIENTRY glNormal3fVertex3fSUN( GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, + GLfloat z ); +GLAPI void APIENTRY glNormal3fVertex3fvSUN( const GLfloat *n, const GLfloat *v ); +GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN( GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, + GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, + GLfloat z ); +GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN( const GLfloat *c, const GLfloat *n, + const GLfloat *v ); +GLAPI void APIENTRY glTexCoord2fVertex3fSUN( GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glTexCoord2fVertex3fvSUN( const GLfloat *tc, const GLfloat *v ); +GLAPI void APIENTRY glTexCoord4fVertex4fSUN( GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, + GLfloat y, GLfloat z, GLfloat w ); +GLAPI void APIENTRY glTexCoord4fVertex4fvSUN( const GLfloat *tc, const GLfloat *v ); +GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN( GLfloat s, GLfloat t, GLubyte r, GLubyte g, + GLubyte b, GLubyte a, GLfloat x, GLfloat y, + GLfloat z ); +GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN( const GLfloat *tc, const GLubyte *c, + const GLfloat *v ); +GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN( GLfloat s, GLfloat t, GLfloat r, GLfloat g, + GLfloat b, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN( const GLfloat *tc, const GLfloat *c, + const GLfloat *v ); +GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN( GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, + GLfloat nz, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN( const GLfloat *tc, const GLfloat *n, + const GLfloat *v ); +GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN( GLfloat s, GLfloat t, GLfloat r, GLfloat g, + GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, + GLfloat nz, GLfloat x, GLfloat y, + GLfloat z ); +GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN( const GLfloat *tc, const GLfloat *c, + const GLfloat *n, const GLfloat *v ); +GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN( GLfloat s, GLfloat t, GLfloat p, GLfloat q, + GLfloat r, GLfloat g, GLfloat b, GLfloat a, + GLfloat nx, GLfloat ny, GLfloat nz, + GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN( const GLfloat *tc, const GLfloat *c, + const GLfloat *n, const GLfloat *v ); +GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN( GLuint rc, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN( const GLuint *rc, const GLfloat *v ); +GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN( GLuint rc, GLubyte r, GLubyte g, GLubyte b, + GLubyte a, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN( const GLuint *rc, const GLubyte *c, + const GLfloat *v ); +GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN( GLuint rc, GLfloat r, GLfloat g, GLfloat b, + GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN( const GLuint *rc, const GLfloat *c, + const GLfloat *v ); +GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN( GLuint rc, GLfloat nx, GLfloat ny, + GLfloat nz, GLfloat x, GLfloat y, + GLfloat z ); +GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN( const GLuint *rc, const GLfloat *n, + const GLfloat *v ); +GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN( GLuint rc, GLfloat r, GLfloat g, + GLfloat b, GLfloat a, GLfloat nx, + GLfloat ny, GLfloat nz, GLfloat x, + GLfloat y, GLfloat z ); +GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN( const GLuint *rc, const GLfloat *c, + const GLfloat *n, const GLfloat *v ); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN( GLuint rc, GLfloat s, GLfloat t, GLfloat x, + GLfloat y, GLfloat z ); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN( const GLuint *rc, const GLfloat *tc, + const GLfloat *v ); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN( GLuint rc, GLfloat s, GLfloat t, + GLfloat nx, GLfloat ny, GLfloat nz, + GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN( const GLuint * rc, + const GLfloat *tc, + const GLfloat *n, + const GLfloat *v ); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN( + GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, + GLfloat nz, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN( + const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC )( GLubyte r, GLubyte g, GLubyte b, GLubyte a, + GLfloat x, GLfloat y ); +typedef void( APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC )( const GLubyte *c, const GLfloat *v ); +typedef void( APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC )( GLubyte r, GLubyte g, GLubyte b, GLubyte a, + GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC )( const GLubyte *c, const GLfloat *v ); +typedef void( APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC )( GLfloat r, GLfloat g, GLfloat b, GLfloat x, + GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC )( const GLfloat *c, const GLfloat *v ); +typedef void( APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC )( GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, + GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC )( const GLfloat *n, const GLfloat *v ); +typedef void( APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC )( GLfloat r, GLfloat g, GLfloat b, + GLfloat a, GLfloat nx, GLfloat ny, + GLfloat nz, GLfloat x, GLfloat y, + GLfloat z ); +typedef void( APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC )( const GLfloat *c, const GLfloat *n, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC )( GLfloat s, GLfloat t, GLfloat x, GLfloat y, + GLfloat z ); +typedef void( APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC )( const GLfloat *tc, const GLfloat *v ); +typedef void( APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC )( GLfloat s, GLfloat t, GLfloat p, GLfloat q, + GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +typedef void( APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC )( const GLfloat *tc, const GLfloat *v ); +typedef void( APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC )( GLfloat s, GLfloat t, GLubyte r, + GLubyte g, GLubyte b, GLubyte a, + GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC )( const GLfloat *tc, const GLubyte *c, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC )( GLfloat s, GLfloat t, GLfloat r, + GLfloat g, GLfloat b, GLfloat x, + GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC )( const GLfloat *tc, const GLfloat *c, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC )( GLfloat s, GLfloat t, GLfloat nx, + GLfloat ny, GLfloat nz, GLfloat x, + GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC )( const GLfloat *tc, const GLfloat *n, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC )( GLfloat s, GLfloat t, GLfloat r, + GLfloat g, GLfloat b, GLfloat a, + GLfloat nx, GLfloat ny, + GLfloat nz, GLfloat x, + GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC )( const GLfloat *tc, + const GLfloat *c, + const GLfloat *n, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC )( + GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, + GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +typedef void( APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC )( const GLfloat *tc, + const GLfloat *c, + const GLfloat *n, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC )( GLuint rc, GLfloat x, GLfloat y, + GLfloat z ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC )( const GLuint *rc, const GLfloat *v ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC )( GLuint rc, GLubyte r, GLubyte g, + GLubyte b, GLubyte a, GLfloat x, + GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC )( const GLuint * rc, + const GLubyte *c, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC )( GLuint rc, GLfloat r, GLfloat g, + GLfloat b, GLfloat x, GLfloat y, + GLfloat z ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC )( const GLuint * rc, + const GLfloat *c, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC )( GLuint rc, GLfloat nx, + GLfloat ny, GLfloat nz, + GLfloat x, GLfloat y, + GLfloat z ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC )( const GLuint * rc, + const GLfloat *n, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC )( + GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, + GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC )( const GLuint * rc, + const GLfloat *c, + const GLfloat *n, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC )( GLuint rc, GLfloat s, + GLfloat t, GLfloat x, + GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC )( const GLuint * rc, + const GLfloat *tc, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC )( + GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, + GLfloat z ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC )( const GLuint * rc, + const GLfloat *tc, + const GLfloat *n, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC )( + GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, + GLfloat nz, GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC )( + const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v ); #endif #ifndef GL_EXT_blend_func_separate -#define GL_EXT_blend_func_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +# define GL_EXT_blend_func_separate 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, + GLenum dfactorAlpha ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC )( GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorAlpha, GLenum dfactorAlpha ); #endif #ifndef GL_INGR_blend_func_separate -#define GL_INGR_blend_func_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +# define GL_INGR_blend_func_separate 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateINGR( GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, + GLenum dfactorAlpha ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC )( GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorAlpha, GLenum dfactorAlpha ); #endif #ifndef GL_INGR_color_clamp -#define GL_INGR_color_clamp 1 +# define GL_INGR_color_clamp 1 #endif #ifndef GL_INGR_interlace_read -#define GL_INGR_interlace_read 1 +# define GL_INGR_interlace_read 1 #endif #ifndef GL_EXT_stencil_wrap -#define GL_EXT_stencil_wrap 1 +# define GL_EXT_stencil_wrap 1 #endif #ifndef GL_EXT_422_pixels -#define GL_EXT_422_pixels 1 +# define GL_EXT_422_pixels 1 #endif #ifndef GL_NV_texgen_reflection -#define GL_NV_texgen_reflection 1 +# define GL_NV_texgen_reflection 1 #endif #ifndef GL_SUN_convolution_border_modes -#define GL_SUN_convolution_border_modes 1 +# define GL_SUN_convolution_border_modes 1 #endif #ifndef GL_EXT_texture_env_add -#define GL_EXT_texture_env_add 1 +# define GL_EXT_texture_env_add 1 #endif #ifndef GL_EXT_texture_lod_bias -#define GL_EXT_texture_lod_bias 1 +# define GL_EXT_texture_lod_bias 1 #endif #ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 +# define GL_EXT_texture_filter_anisotropic 1 #endif #ifndef GL_EXT_vertex_weighting -#define GL_EXT_vertex_weighting 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight); -GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight); -GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +# define GL_EXT_vertex_weighting 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexWeightfEXT( GLfloat weight ); +GLAPI void APIENTRY glVertexWeightfvEXT( const GLfloat *weight ); +GLAPI void APIENTRY glVertexWeightPointerEXT( GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC )( GLfloat weight ); +typedef void( APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC )( const GLfloat *weight ); +typedef void( APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC )( GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); #endif #ifndef GL_NV_light_max_exponent -#define GL_NV_light_max_exponent 1 +# define GL_NV_light_max_exponent 1 #endif #ifndef GL_NV_vertex_array_range -#define GL_NV_vertex_array_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); -GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); +# define GL_NV_vertex_array_range 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushVertexArrayRangeNV( void ); +GLAPI void APIENTRY glVertexArrayRangeNV( GLsizei length, const GLvoid *pointer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC )( void ); +typedef void( APIENTRYP PFNGLVERTEXARRAYRANGENVPROC )( GLsizei length, const GLvoid *pointer ); #endif #ifndef GL_NV_register_combiners -#define GL_NV_register_combiners 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param); -GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params); -GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param); -GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); +# define GL_NV_register_combiners 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerParameterfvNV( GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glCombinerParameterfNV( GLenum pname, GLfloat param ); +GLAPI void APIENTRY glCombinerParameterivNV( GLenum pname, const GLint *params ); +GLAPI void APIENTRY glCombinerParameteriNV( GLenum pname, GLint param ); +GLAPI void APIENTRY glCombinerInputNV( GLenum stage, GLenum portion, GLenum variable, GLenum input, + GLenum mapping, GLenum componentUsage ); +GLAPI void APIENTRY glCombinerOutputNV( GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, + GLenum sumOutput, GLenum scale, GLenum bias, + GLboolean abDotProduct, GLboolean cdDotProduct, + GLboolean muxSum ); +GLAPI void APIENTRY glFinalCombinerInputNV( GLenum variable, GLenum input, GLenum mapping, + GLenum componentUsage ); +GLAPI void APIENTRY glGetCombinerInputParameterfvNV( GLenum stage, GLenum portion, GLenum variable, + GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetCombinerInputParameterivNV( GLenum stage, GLenum portion, GLenum variable, + GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetCombinerOutputParameterfvNV( GLenum stage, GLenum portion, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetCombinerOutputParameterivNV( GLenum stage, GLenum portion, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV( GLenum variable, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV( GLenum variable, GLenum pname, GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC )( GLenum pname, const GLfloat *params ); +typedef void( APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC )( GLenum pname, GLfloat param ); +typedef void( APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC )( GLenum pname, const GLint *params ); +typedef void( APIENTRYP PFNGLCOMBINERPARAMETERINVPROC )( GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLCOMBINERINPUTNVPROC )( GLenum stage, GLenum portion, GLenum variable, + GLenum input, GLenum mapping, + GLenum componentUsage ); +typedef void( APIENTRYP PFNGLCOMBINEROUTPUTNVPROC )( GLenum stage, GLenum portion, GLenum abOutput, + GLenum cdOutput, GLenum sumOutput, GLenum scale, + GLenum bias, GLboolean abDotProduct, + GLboolean cdDotProduct, GLboolean muxSum ); +typedef void( APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC )( GLenum variable, GLenum input, GLenum mapping, + GLenum componentUsage ); +typedef void( APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC )( GLenum stage, GLenum portion, + GLenum variable, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC )( GLenum stage, GLenum portion, + GLenum variable, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC )( GLenum stage, GLenum portion, + GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC )( GLenum stage, GLenum portion, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC )( GLenum variable, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC )( GLenum variable, GLenum pname, + GLint *params ); #endif #ifndef GL_NV_fog_distance -#define GL_NV_fog_distance 1 +# define GL_NV_fog_distance 1 #endif #ifndef GL_NV_texgen_emboss -#define GL_NV_texgen_emboss 1 +# define GL_NV_texgen_emboss 1 #endif #ifndef GL_NV_blend_square -#define GL_NV_blend_square 1 +# define GL_NV_blend_square 1 #endif #ifndef GL_NV_texture_env_combine4 -#define GL_NV_texture_env_combine4 1 +# define GL_NV_texture_env_combine4 1 #endif #ifndef GL_MESA_resize_buffers -#define GL_MESA_resize_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glResizeBuffersMESA (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); +# define GL_MESA_resize_buffers 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glResizeBuffersMESA( void ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLRESIZEBUFFERSMESAPROC )( void ); #endif #ifndef GL_MESA_window_pos -#define GL_MESA_window_pos 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v); -GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v); -GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); +# define GL_MESA_window_pos 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dMESA( GLdouble x, GLdouble y ); +GLAPI void APIENTRY glWindowPos2dvMESA( const GLdouble *v ); +GLAPI void APIENTRY glWindowPos2fMESA( GLfloat x, GLfloat y ); +GLAPI void APIENTRY glWindowPos2fvMESA( const GLfloat *v ); +GLAPI void APIENTRY glWindowPos2iMESA( GLint x, GLint y ); +GLAPI void APIENTRY glWindowPos2ivMESA( const GLint *v ); +GLAPI void APIENTRY glWindowPos2sMESA( GLshort x, GLshort y ); +GLAPI void APIENTRY glWindowPos2svMESA( const GLshort *v ); +GLAPI void APIENTRY glWindowPos3dMESA( GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glWindowPos3dvMESA( const GLdouble *v ); +GLAPI void APIENTRY glWindowPos3fMESA( GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glWindowPos3fvMESA( const GLfloat *v ); +GLAPI void APIENTRY glWindowPos3iMESA( GLint x, GLint y, GLint z ); +GLAPI void APIENTRY glWindowPos3ivMESA( const GLint *v ); +GLAPI void APIENTRY glWindowPos3sMESA( GLshort x, GLshort y, GLshort z ); +GLAPI void APIENTRY glWindowPos3svMESA( const GLshort *v ); +GLAPI void APIENTRY glWindowPos4dMESA( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glWindowPos4dvMESA( const GLdouble *v ); +GLAPI void APIENTRY glWindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +GLAPI void APIENTRY glWindowPos4fvMESA( const GLfloat *v ); +GLAPI void APIENTRY glWindowPos4iMESA( GLint x, GLint y, GLint z, GLint w ); +GLAPI void APIENTRY glWindowPos4ivMESA( const GLint *v ); +GLAPI void APIENTRY glWindowPos4sMESA( GLshort x, GLshort y, GLshort z, GLshort w ); +GLAPI void APIENTRY glWindowPos4svMESA( const GLshort *v ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLWINDOWPOS2DMESAPROC )( GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2DVMESAPROC )( const GLdouble *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS2FMESAPROC )( GLfloat x, GLfloat y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2FVMESAPROC )( const GLfloat *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS2IMESAPROC )( GLint x, GLint y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2IVMESAPROC )( const GLint *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS2SMESAPROC )( GLshort x, GLshort y ); +typedef void( APIENTRYP PFNGLWINDOWPOS2SVMESAPROC )( const GLshort *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3DMESAPROC )( GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3DVMESAPROC )( const GLdouble *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3FMESAPROC )( GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3FVMESAPROC )( const GLfloat *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3IMESAPROC )( GLint x, GLint y, GLint z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3IVMESAPROC )( const GLint *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS3SMESAPROC )( GLshort x, GLshort y, GLshort z ); +typedef void( APIENTRYP PFNGLWINDOWPOS3SVMESAPROC )( const GLshort *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS4DMESAPROC )( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +typedef void( APIENTRYP PFNGLWINDOWPOS4DVMESAPROC )( const GLdouble *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS4FMESAPROC )( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +typedef void( APIENTRYP PFNGLWINDOWPOS4FVMESAPROC )( const GLfloat *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS4IMESAPROC )( GLint x, GLint y, GLint z, GLint w ); +typedef void( APIENTRYP PFNGLWINDOWPOS4IVMESAPROC )( const GLint *v ); +typedef void( APIENTRYP PFNGLWINDOWPOS4SMESAPROC )( GLshort x, GLshort y, GLshort z, GLshort w ); +typedef void( APIENTRYP PFNGLWINDOWPOS4SVMESAPROC )( const GLshort *v ); #endif #ifndef GL_IBM_cull_vertex -#define GL_IBM_cull_vertex 1 +# define GL_IBM_cull_vertex 1 #endif #ifndef GL_IBM_multimode_draw_arrays -#define GL_IBM_multimode_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); +# define GL_IBM_multimode_draw_arrays 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiModeDrawArraysIBM( const GLenum *mode, const GLint *first, + const GLsizei *count, GLsizei primcount, + GLint modestride ); +GLAPI void APIENTRY glMultiModeDrawElementsIBM( const GLenum *mode, const GLsizei *count, GLenum type, + const GLvoid *const *indices, GLsizei primcount, + GLint modestride ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC )( const GLenum *mode, const GLint *first, + const GLsizei *count, GLsizei primcount, + GLint modestride ); +typedef void( APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC )( const GLenum *mode, const GLsizei *count, + GLenum type, const GLvoid *const *indices, + GLsizei primcount, GLint modestride ); #endif #ifndef GL_IBM_vertex_array_lists -#define GL_IBM_vertex_array_lists 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean* *pointer, GLint ptrstride); -GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +# define GL_IBM_vertex_array_lists 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorPointerListIBM( GLint size, GLenum type, GLint stride, const GLvoid **pointer, + GLint ptrstride ); +GLAPI void APIENTRY glSecondaryColorPointerListIBM( GLint size, GLenum type, GLint stride, + const GLvoid **pointer, GLint ptrstride ); +GLAPI void APIENTRY glEdgeFlagPointerListIBM( GLint stride, const GLboolean **pointer, GLint ptrstride ); +GLAPI void APIENTRY glFogCoordPointerListIBM( GLenum type, GLint stride, const GLvoid **pointer, + GLint ptrstride ); +GLAPI void APIENTRY glIndexPointerListIBM( GLenum type, GLint stride, const GLvoid **pointer, + GLint ptrstride ); +GLAPI void APIENTRY glNormalPointerListIBM( GLenum type, GLint stride, const GLvoid **pointer, + GLint ptrstride ); +GLAPI void APIENTRY glTexCoordPointerListIBM( GLint size, GLenum type, GLint stride, + const GLvoid **pointer, GLint ptrstride ); +GLAPI void APIENTRY glVertexPointerListIBM( GLint size, GLenum type, GLint stride, + const GLvoid **pointer, GLint ptrstride ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC )( GLint size, GLenum type, GLint stride, + const GLvoid **pointer, GLint ptrstride ); +typedef void( APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC )( GLint size, GLenum type, GLint stride, + const GLvoid **pointer, + GLint ptrstride ); +typedef void( APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC )( GLint stride, const GLboolean **pointer, + GLint ptrstride ); +typedef void( APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC )( GLenum type, GLint stride, + const GLvoid **pointer, GLint ptrstride ); +typedef void( APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC )( GLenum type, GLint stride, + const GLvoid **pointer, GLint ptrstride ); +typedef void( APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC )( GLenum type, GLint stride, + const GLvoid **pointer, GLint ptrstride ); +typedef void( APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC )( GLint size, GLenum type, GLint stride, + const GLvoid **pointer, GLint ptrstride ); +typedef void( APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC )( GLint size, GLenum type, GLint stride, + const GLvoid **pointer, GLint ptrstride ); #endif #ifndef GL_SGIX_subsample -#define GL_SGIX_subsample 1 +# define GL_SGIX_subsample 1 #endif #ifndef GL_SGIX_ycrcba -#define GL_SGIX_ycrcba 1 +# define GL_SGIX_ycrcba 1 #endif #ifndef GL_SGIX_ycrcb_subsample -#define GL_SGIX_ycrcb_subsample 1 +# define GL_SGIX_ycrcb_subsample 1 #endif #ifndef GL_SGIX_depth_pass_instrument -#define GL_SGIX_depth_pass_instrument 1 +# define GL_SGIX_depth_pass_instrument 1 #endif #ifndef GL_3DFX_texture_compression_FXT1 -#define GL_3DFX_texture_compression_FXT1 1 +# define GL_3DFX_texture_compression_FXT1 1 #endif #ifndef GL_3DFX_multisample -#define GL_3DFX_multisample 1 +# define GL_3DFX_multisample 1 #endif #ifndef GL_3DFX_tbuffer -#define GL_3DFX_tbuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); +# define GL_3DFX_tbuffer 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTbufferMask3DFX( GLuint mask ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTBUFFERMASK3DFXPROC )( GLuint mask ); #endif #ifndef GL_EXT_multisample -#define GL_EXT_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert); -GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); +# define GL_EXT_multisample 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskEXT( GLclampf value, GLboolean invert ); +GLAPI void APIENTRY glSamplePatternEXT( GLenum pattern ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSAMPLEMASKEXTPROC )( GLclampf value, GLboolean invert ); +typedef void( APIENTRYP PFNGLSAMPLEPATTERNEXTPROC )( GLenum pattern ); #endif #ifndef GL_SGIX_vertex_preclip -#define GL_SGIX_vertex_preclip 1 +# define GL_SGIX_vertex_preclip 1 #endif #ifndef GL_SGIX_convolution_accuracy -#define GL_SGIX_convolution_accuracy 1 +# define GL_SGIX_convolution_accuracy 1 #endif #ifndef GL_SGIX_resample -#define GL_SGIX_resample 1 +# define GL_SGIX_resample 1 #endif #ifndef GL_SGIS_point_line_texgen -#define GL_SGIS_point_line_texgen 1 +# define GL_SGIS_point_line_texgen 1 #endif #ifndef GL_SGIS_texture_color_mask -#define GL_SGIS_texture_color_mask 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +# define GL_SGIS_texture_color_mask 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureColorMaskSGIS( GLboolean red, GLboolean green, GLboolean blue, + GLboolean alpha ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC )( GLboolean red, GLboolean green, GLboolean blue, + GLboolean alpha ); #endif #ifndef GL_SGIX_igloo_interface -#define GL_SGIX_igloo_interface 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const GLvoid *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); +# define GL_SGIX_igloo_interface 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIglooInterfaceSGIX( GLenum pname, const GLvoid *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLIGLOOINTERFACESGIXPROC )( GLenum pname, const GLvoid *params ); #endif #ifndef GL_EXT_texture_env_dot3 -#define GL_EXT_texture_env_dot3 1 +# define GL_EXT_texture_env_dot3 1 #endif #ifndef GL_ATI_texture_mirror_once -#define GL_ATI_texture_mirror_once 1 +# define GL_ATI_texture_mirror_once 1 #endif #ifndef GL_NV_fence -#define GL_NV_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); -GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); -GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence); -GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence); -GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); -GLAPI void APIENTRY glFinishFenceNV (GLuint fence); -GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +# define GL_NV_fence 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteFencesNV( GLsizei n, const GLuint *fences ); +GLAPI void APIENTRY glGenFencesNV( GLsizei n, GLuint *fences ); +GLAPI GLboolean APIENTRY glIsFenceNV( GLuint fence ); +GLAPI GLboolean APIENTRY glTestFenceNV( GLuint fence ); +GLAPI void APIENTRY glGetFenceivNV( GLuint fence, GLenum pname, GLint *params ); +GLAPI void APIENTRY glFinishFenceNV( GLuint fence ); +GLAPI void APIENTRY glSetFenceNV( GLuint fence, GLenum condition ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDELETEFENCESNVPROC )( GLsizei n, const GLuint *fences ); +typedef void( APIENTRYP PFNGLGENFENCESNVPROC )( GLsizei n, GLuint *fences ); +typedef GLboolean( APIENTRYP PFNGLISFENCENVPROC )( GLuint fence ); +typedef GLboolean( APIENTRYP PFNGLTESTFENCENVPROC )( GLuint fence ); +typedef void( APIENTRYP PFNGLGETFENCEIVNVPROC )( GLuint fence, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLFINISHFENCENVPROC )( GLuint fence ); +typedef void( APIENTRYP PFNGLSETFENCENVPROC )( GLuint fence, GLenum condition ); #endif #ifndef GL_NV_evaluators -#define GL_NV_evaluators 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); -GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); -GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); -typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +# define GL_NV_evaluators 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMapControlPointsNV( GLenum target, GLuint index, GLenum type, GLsizei ustride, + GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, + const GLvoid *points ); +GLAPI void APIENTRY glMapParameterivNV( GLenum target, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glMapParameterfvNV( GLenum target, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glGetMapControlPointsNV( GLenum target, GLuint index, GLenum type, GLsizei ustride, + GLsizei vstride, GLboolean packed, GLvoid *points ); +GLAPI void APIENTRY glGetMapParameterivNV( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetMapParameterfvNV( GLenum target, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetMapAttribParameterivNV( GLenum target, GLuint index, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetMapAttribParameterfvNV( GLenum target, GLuint index, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glEvalMapsNV( GLenum target, GLenum mode ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC )( GLenum target, GLuint index, GLenum type, + GLsizei ustride, GLsizei vstride, GLint uorder, + GLint vorder, GLboolean packed, + const GLvoid *points ); +typedef void( APIENTRYP PFNGLMAPPARAMETERIVNVPROC )( GLenum target, GLenum pname, const GLint *params ); +typedef void( APIENTRYP PFNGLMAPPARAMETERFVNVPROC )( GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC )( GLenum target, GLuint index, GLenum type, + GLsizei ustride, GLsizei vstride, + GLboolean packed, GLvoid *points ); +typedef void( APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC )( GLenum target, GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC )( GLenum target, GLuint index, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC )( GLenum target, GLuint index, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLEVALMAPSNVPROC )( GLenum target, GLenum mode ); #endif #ifndef GL_NV_packed_depth_stencil -#define GL_NV_packed_depth_stencil 1 +# define GL_NV_packed_depth_stencil 1 #endif #ifndef GL_NV_register_combiners2 -#define GL_NV_register_combiners2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); +# define GL_NV_register_combiners2 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerStageParameterfvNV( GLenum stage, GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glGetCombinerStageParameterfvNV( GLenum stage, GLenum pname, GLfloat *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC )( GLenum stage, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC )( GLenum stage, GLenum pname, + GLfloat *params ); #endif #ifndef GL_NV_texture_compression_vtc -#define GL_NV_texture_compression_vtc 1 +# define GL_NV_texture_compression_vtc 1 #endif #ifndef GL_NV_texture_rectangle -#define GL_NV_texture_rectangle 1 +# define GL_NV_texture_rectangle 1 #endif #ifndef GL_NV_texture_shader -#define GL_NV_texture_shader 1 +# define GL_NV_texture_shader 1 #endif #ifndef GL_NV_texture_shader2 -#define GL_NV_texture_shader2 1 +# define GL_NV_texture_shader2 1 #endif #ifndef GL_NV_vertex_array_range2 -#define GL_NV_vertex_array_range2 1 +# define GL_NV_vertex_array_range2 1 #endif #ifndef GL_NV_vertex_program -#define GL_NV_vertex_program 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences); -GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params); -GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs); -GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program); -GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, GLvoid* *pointer); -GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id); -GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); -GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); -GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); -GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); -typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); -typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); +# define GL_NV_vertex_program 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreProgramsResidentNV( GLsizei n, const GLuint *programs, + GLboolean *residences ); +GLAPI void APIENTRY glBindProgramNV( GLenum target, GLuint id ); +GLAPI void APIENTRY glDeleteProgramsNV( GLsizei n, const GLuint *programs ); +GLAPI void APIENTRY glExecuteProgramNV( GLenum target, GLuint id, const GLfloat *params ); +GLAPI void APIENTRY glGenProgramsNV( GLsizei n, GLuint *programs ); +GLAPI void APIENTRY glGetProgramParameterdvNV( GLenum target, GLuint index, GLenum pname, + GLdouble *params ); +GLAPI void APIENTRY glGetProgramParameterfvNV( GLenum target, GLuint index, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetProgramivNV( GLuint id, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetProgramStringNV( GLuint id, GLenum pname, GLubyte *program ); +GLAPI void APIENTRY glGetTrackMatrixivNV( GLenum target, GLuint address, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetVertexAttribdvNV( GLuint index, GLenum pname, GLdouble *params ); +GLAPI void APIENTRY glGetVertexAttribfvNV( GLuint index, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetVertexAttribivNV( GLuint index, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetVertexAttribPointervNV( GLuint index, GLenum pname, GLvoid **pointer ); +GLAPI GLboolean APIENTRY glIsProgramNV( GLuint id ); +GLAPI void APIENTRY glLoadProgramNV( GLenum target, GLuint id, GLsizei len, const GLubyte *program ); +GLAPI void APIENTRY glProgramParameter4dNV( GLenum target, GLuint index, GLdouble x, GLdouble y, + GLdouble z, GLdouble w ); +GLAPI void APIENTRY glProgramParameter4dvNV( GLenum target, GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glProgramParameter4fNV( GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, + GLfloat w ); +GLAPI void APIENTRY glProgramParameter4fvNV( GLenum target, GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glProgramParameters4dvNV( GLenum target, GLuint index, GLsizei count, + const GLdouble *v ); +GLAPI void APIENTRY glProgramParameters4fvNV( GLenum target, GLuint index, GLsizei count, + const GLfloat *v ); +GLAPI void APIENTRY glRequestResidentProgramsNV( GLsizei n, const GLuint *programs ); +GLAPI void APIENTRY glTrackMatrixNV( GLenum target, GLuint address, GLenum matrix, GLenum transform ); +GLAPI void APIENTRY glVertexAttribPointerNV( GLuint index, GLint fsize, GLenum type, GLsizei stride, + const GLvoid *pointer ); +GLAPI void APIENTRY glVertexAttrib1dNV( GLuint index, GLdouble x ); +GLAPI void APIENTRY glVertexAttrib1dvNV( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib1fNV( GLuint index, GLfloat x ); +GLAPI void APIENTRY glVertexAttrib1fvNV( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib1sNV( GLuint index, GLshort x ); +GLAPI void APIENTRY glVertexAttrib1svNV( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib2dNV( GLuint index, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glVertexAttrib2dvNV( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y ); +GLAPI void APIENTRY glVertexAttrib2fvNV( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib2sNV( GLuint index, GLshort x, GLshort y ); +GLAPI void APIENTRY glVertexAttrib2svNV( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib3dNV( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glVertexAttrib3dvNV( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib3fNV( GLuint index, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glVertexAttrib3fvNV( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib3sNV( GLuint index, GLshort x, GLshort y, GLshort z ); +GLAPI void APIENTRY glVertexAttrib3svNV( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib4dNV( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glVertexAttrib4dvNV( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +GLAPI void APIENTRY glVertexAttrib4fvNV( GLuint index, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttrib4sNV( GLuint index, GLshort x, GLshort y, GLshort z, GLshort w ); +GLAPI void APIENTRY glVertexAttrib4svNV( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttrib4ubNV( GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w ); +GLAPI void APIENTRY glVertexAttrib4ubvNV( GLuint index, const GLubyte *v ); +GLAPI void APIENTRY glVertexAttribs1dvNV( GLuint index, GLsizei count, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribs1fvNV( GLuint index, GLsizei count, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttribs1svNV( GLuint index, GLsizei count, const GLshort *v ); +GLAPI void APIENTRY glVertexAttribs2dvNV( GLuint index, GLsizei count, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribs2fvNV( GLuint index, GLsizei count, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttribs2svNV( GLuint index, GLsizei count, const GLshort *v ); +GLAPI void APIENTRY glVertexAttribs3dvNV( GLuint index, GLsizei count, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribs3fvNV( GLuint index, GLsizei count, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttribs3svNV( GLuint index, GLsizei count, const GLshort *v ); +GLAPI void APIENTRY glVertexAttribs4dvNV( GLuint index, GLsizei count, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribs4fvNV( GLuint index, GLsizei count, const GLfloat *v ); +GLAPI void APIENTRY glVertexAttribs4svNV( GLuint index, GLsizei count, const GLshort *v ); +GLAPI void APIENTRY glVertexAttribs4ubvNV( GLuint index, GLsizei count, const GLubyte *v ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean( APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC )( GLsizei n, const GLuint *programs, + GLboolean *residences ); +typedef void( APIENTRYP PFNGLBINDPROGRAMNVPROC )( GLenum target, GLuint id ); +typedef void( APIENTRYP PFNGLDELETEPROGRAMSNVPROC )( GLsizei n, const GLuint *programs ); +typedef void( APIENTRYP PFNGLEXECUTEPROGRAMNVPROC )( GLenum target, GLuint id, const GLfloat *params ); +typedef void( APIENTRYP PFNGLGENPROGRAMSNVPROC )( GLsizei n, GLuint *programs ); +typedef void( APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC )( GLenum target, GLuint index, GLenum pname, + GLdouble *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC )( GLenum target, GLuint index, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMIVNVPROC )( GLuint id, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC )( GLuint id, GLenum pname, GLubyte *program ); +typedef void( APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC )( GLenum target, GLuint address, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC )( GLuint index, GLenum pname, GLdouble *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC )( GLuint index, GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC )( GLuint index, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC )( GLuint index, GLenum pname, + GLvoid **pointer ); +typedef GLboolean( APIENTRYP PFNGLISPROGRAMNVPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLLOADPROGRAMNVPROC )( GLenum target, GLuint id, GLsizei len, + const GLubyte *program ); +typedef void( APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC )( GLenum target, GLuint index, GLdouble x, + GLdouble y, GLdouble z, GLdouble w ); +typedef void( APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC )( GLenum target, GLuint index, + const GLdouble *v ); +typedef void( APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC )( GLenum target, GLuint index, GLfloat x, + GLfloat y, GLfloat z, GLfloat w ); +typedef void( APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC )( GLenum target, GLuint index, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC )( GLenum target, GLuint index, GLsizei count, + const GLdouble *v ); +typedef void( APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC )( GLenum target, GLuint index, GLsizei count, + const GLfloat *v ); +typedef void( APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC )( GLsizei n, const GLuint *programs ); +typedef void( APIENTRYP PFNGLTRACKMATRIXNVPROC )( GLenum target, GLuint address, GLenum matrix, + GLenum transform ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC )( GLuint index, GLint fsize, GLenum type, + GLsizei stride, const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1DNVPROC )( GLuint index, GLdouble x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1FNVPROC )( GLuint index, GLfloat x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1SNVPROC )( GLuint index, GLshort x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2DNVPROC )( GLuint index, GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2FNVPROC )( GLuint index, GLfloat x, GLfloat y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2SNVPROC )( GLuint index, GLshort x, GLshort y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3DNVPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3FNVPROC )( GLuint index, GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3SNVPROC )( GLuint index, GLshort x, GLshort y, GLshort z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4DNVPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z, + GLdouble w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4FNVPROC )( GLuint index, GLfloat x, GLfloat y, GLfloat z, + GLfloat w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC )( GLuint index, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4SNVPROC )( GLuint index, GLshort x, GLshort y, GLshort z, + GLshort w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC )( GLuint index, GLubyte x, GLubyte y, GLubyte z, + GLubyte w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC )( GLuint index, const GLubyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC )( GLuint index, GLsizei count, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC )( GLuint index, GLsizei count, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC )( GLuint index, GLsizei count, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC )( GLuint index, GLsizei count, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC )( GLuint index, GLsizei count, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC )( GLuint index, GLsizei count, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC )( GLuint index, GLsizei count, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC )( GLuint index, GLsizei count, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC )( GLuint index, GLsizei count, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC )( GLuint index, GLsizei count, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC )( GLuint index, GLsizei count, const GLfloat *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC )( GLuint index, GLsizei count, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC )( GLuint index, GLsizei count, const GLubyte *v ); #endif #ifndef GL_SGIX_texture_coordinate_clamp -#define GL_SGIX_texture_coordinate_clamp 1 +# define GL_SGIX_texture_coordinate_clamp 1 #endif #ifndef GL_SGIX_scalebias_hint -#define GL_SGIX_scalebias_hint 1 +# define GL_SGIX_scalebias_hint 1 #endif #ifndef GL_OML_interlace -#define GL_OML_interlace 1 +# define GL_OML_interlace 1 #endif #ifndef GL_OML_subsample -#define GL_OML_subsample 1 +# define GL_OML_subsample 1 #endif #ifndef GL_OML_resample -#define GL_OML_resample 1 +# define GL_OML_resample 1 #endif #ifndef GL_NV_copy_depth_to_color -#define GL_NV_copy_depth_to_color 1 +# define GL_NV_copy_depth_to_color 1 #endif #ifndef GL_ATI_envmap_bumpmap -#define GL_ATI_envmap_bumpmap 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param); -GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param); -GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param); -GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); +# define GL_ATI_envmap_bumpmap 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBumpParameterivATI( GLenum pname, const GLint *param ); +GLAPI void APIENTRY glTexBumpParameterfvATI( GLenum pname, const GLfloat *param ); +GLAPI void APIENTRY glGetTexBumpParameterivATI( GLenum pname, GLint *param ); +GLAPI void APIENTRY glGetTexBumpParameterfvATI( GLenum pname, GLfloat *param ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC )( GLenum pname, const GLint *param ); +typedef void( APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC )( GLenum pname, const GLfloat *param ); +typedef void( APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC )( GLenum pname, GLint *param ); +typedef void( APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC )( GLenum pname, GLfloat *param ); #endif #ifndef GL_ATI_fragment_shader -#define GL_ATI_fragment_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range); -GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id); -GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id); -GLAPI void APIENTRY glBeginFragmentShaderATI (void); -GLAPI void APIENTRY glEndFragmentShaderATI (void); -GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle); -GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle); -GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); -typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); -typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); +# define GL_ATI_fragment_shader 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenFragmentShadersATI( GLuint range ); +GLAPI void APIENTRY glBindFragmentShaderATI( GLuint id ); +GLAPI void APIENTRY glDeleteFragmentShaderATI( GLuint id ); +GLAPI void APIENTRY glBeginFragmentShaderATI( void ); +GLAPI void APIENTRY glEndFragmentShaderATI( void ); +GLAPI void APIENTRY glPassTexCoordATI( GLuint dst, GLuint coord, GLenum swizzle ); +GLAPI void APIENTRY glSampleMapATI( GLuint dst, GLuint interp, GLenum swizzle ); +GLAPI void APIENTRY glColorFragmentOp1ATI( GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, + GLuint arg1, GLuint arg1Rep, GLuint arg1Mod ); +GLAPI void APIENTRY glColorFragmentOp2ATI( GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, + GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, + GLuint arg2Rep, GLuint arg2Mod ); +GLAPI void APIENTRY glColorFragmentOp3ATI( GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, + GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, + GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, + GLuint arg3Mod ); +GLAPI void APIENTRY glAlphaFragmentOp1ATI( GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, + GLuint arg1Rep, GLuint arg1Mod ); +GLAPI void APIENTRY glAlphaFragmentOp2ATI( GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, + GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, + GLuint arg2Mod ); +GLAPI void APIENTRY glAlphaFragmentOp3ATI( GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, + GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, + GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod ); +GLAPI void APIENTRY glSetFragmentShaderConstantATI( GLuint dst, const GLfloat *value ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint( APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC )( GLuint range ); +typedef void( APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC )( void ); +typedef void( APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC )( void ); +typedef void( APIENTRYP PFNGLPASSTEXCOORDATIPROC )( GLuint dst, GLuint coord, GLenum swizzle ); +typedef void( APIENTRYP PFNGLSAMPLEMAPATIPROC )( GLuint dst, GLuint interp, GLenum swizzle ); +typedef void( APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC )( GLenum op, GLuint dst, GLuint dstMask, + GLuint dstMod, GLuint arg1, GLuint arg1Rep, + GLuint arg1Mod ); +typedef void( APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC )( GLenum op, GLuint dst, GLuint dstMask, + GLuint dstMod, GLuint arg1, GLuint arg1Rep, + GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, + GLuint arg2Mod ); +typedef void( APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC )( GLenum op, GLuint dst, GLuint dstMask, + GLuint dstMod, GLuint arg1, GLuint arg1Rep, + GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, + GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, + GLuint arg3Mod ); +typedef void( APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC )( GLenum op, GLuint dst, GLuint dstMod, + GLuint arg1, GLuint arg1Rep, GLuint arg1Mod ); +typedef void( APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC )( GLenum op, GLuint dst, GLuint dstMod, + GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, + GLuint arg2, GLuint arg2Rep, GLuint arg2Mod ); +typedef void( APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC )( GLenum op, GLuint dst, GLuint dstMod, + GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, + GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, + GLuint arg3, GLuint arg3Rep, GLuint arg3Mod ); +typedef void( APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC )( GLuint dst, const GLfloat *value ); #endif #ifndef GL_ATI_pn_triangles -#define GL_ATI_pn_triangles 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param); -GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); +# define GL_ATI_pn_triangles 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPNTrianglesiATI( GLenum pname, GLint param ); +GLAPI void APIENTRY glPNTrianglesfATI( GLenum pname, GLfloat param ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPNTRIANGLESIATIPROC )( GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLPNTRIANGLESFATIPROC )( GLenum pname, GLfloat param ); #endif #ifndef GL_ATI_vertex_array_object -#define GL_ATI_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const GLvoid *pointer, GLenum usage); -GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); -GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params); -GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); -typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); +# define GL_ATI_vertex_array_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glNewObjectBufferATI( GLsizei size, const GLvoid *pointer, GLenum usage ); +GLAPI GLboolean APIENTRY glIsObjectBufferATI( GLuint buffer ); +GLAPI void APIENTRY glUpdateObjectBufferATI( GLuint buffer, GLuint offset, GLsizei size, + const GLvoid *pointer, GLenum preserve ); +GLAPI void APIENTRY glGetObjectBufferfvATI( GLuint buffer, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetObjectBufferivATI( GLuint buffer, GLenum pname, GLint *params ); +GLAPI void APIENTRY glFreeObjectBufferATI( GLuint buffer ); +GLAPI void APIENTRY glArrayObjectATI( GLenum array, GLint size, GLenum type, GLsizei stride, + GLuint buffer, GLuint offset ); +GLAPI void APIENTRY glGetArrayObjectfvATI( GLenum array, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetArrayObjectivATI( GLenum array, GLenum pname, GLint *params ); +GLAPI void APIENTRY glVariantArrayObjectATI( GLuint id, GLenum type, GLsizei stride, GLuint buffer, + GLuint offset ); +GLAPI void APIENTRY glGetVariantArrayObjectfvATI( GLuint id, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetVariantArrayObjectivATI( GLuint id, GLenum pname, GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint( APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC )( GLsizei size, const GLvoid *pointer, + GLenum usage ); +typedef GLboolean( APIENTRYP PFNGLISOBJECTBUFFERATIPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC )( GLuint buffer, GLuint offset, GLsizei size, + const GLvoid *pointer, GLenum preserve ); +typedef void( APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC )( GLuint buffer, GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC )( GLuint buffer, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLARRAYOBJECTATIPROC )( GLenum array, GLint size, GLenum type, GLsizei stride, + GLuint buffer, GLuint offset ); +typedef void( APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC )( GLenum array, GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC )( GLenum array, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC )( GLuint id, GLenum type, GLsizei stride, + GLuint buffer, GLuint offset ); +typedef void( APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC )( GLuint id, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC )( GLuint id, GLenum pname, GLint *params ); #endif #ifndef GL_EXT_vertex_shader -#define GL_EXT_vertex_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginVertexShaderEXT (void); -GLAPI void APIENTRY glEndVertexShaderEXT (void); -GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id); -GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range); -GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id); -GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1); -GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2); -GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); -GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num); -GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num); -GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); -GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const GLvoid *addr); -GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const GLvoid *addr); -GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr); -GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr); -GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr); -GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr); -GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr); -GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr); -GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr); -GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr); -GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); -GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id); -GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id); -GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value); -GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value); -GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value); -GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value); -GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value); -GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap); -GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, GLvoid* *data); -GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); -typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); -typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); -typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); -typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); -typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); -typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); -typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); -typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); -typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); -typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); -typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); -typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); -typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); -typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); -typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); -typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); -typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); -typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); -typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +# define GL_EXT_vertex_shader 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginVertexShaderEXT( void ); +GLAPI void APIENTRY glEndVertexShaderEXT( void ); +GLAPI void APIENTRY glBindVertexShaderEXT( GLuint id ); +GLAPI GLuint APIENTRY glGenVertexShadersEXT( GLuint range ); +GLAPI void APIENTRY glDeleteVertexShaderEXT( GLuint id ); +GLAPI void APIENTRY glShaderOp1EXT( GLenum op, GLuint res, GLuint arg1 ); +GLAPI void APIENTRY glShaderOp2EXT( GLenum op, GLuint res, GLuint arg1, GLuint arg2 ); +GLAPI void APIENTRY glShaderOp3EXT( GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3 ); +GLAPI void APIENTRY glSwizzleEXT( GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, + GLenum outW ); +GLAPI void APIENTRY glWriteMaskEXT( GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, + GLenum outW ); +GLAPI void APIENTRY glInsertComponentEXT( GLuint res, GLuint src, GLuint num ); +GLAPI void APIENTRY glExtractComponentEXT( GLuint res, GLuint src, GLuint num ); +GLAPI GLuint APIENTRY glGenSymbolsEXT( GLenum datatype, GLenum storagetype, GLenum range, + GLuint components ); +GLAPI void APIENTRY glSetInvariantEXT( GLuint id, GLenum type, const GLvoid *addr ); +GLAPI void APIENTRY glSetLocalConstantEXT( GLuint id, GLenum type, const GLvoid *addr ); +GLAPI void APIENTRY glVariantbvEXT( GLuint id, const GLbyte *addr ); +GLAPI void APIENTRY glVariantsvEXT( GLuint id, const GLshort *addr ); +GLAPI void APIENTRY glVariantivEXT( GLuint id, const GLint *addr ); +GLAPI void APIENTRY glVariantfvEXT( GLuint id, const GLfloat *addr ); +GLAPI void APIENTRY glVariantdvEXT( GLuint id, const GLdouble *addr ); +GLAPI void APIENTRY glVariantubvEXT( GLuint id, const GLubyte *addr ); +GLAPI void APIENTRY glVariantusvEXT( GLuint id, const GLushort *addr ); +GLAPI void APIENTRY glVariantuivEXT( GLuint id, const GLuint *addr ); +GLAPI void APIENTRY glVariantPointerEXT( GLuint id, GLenum type, GLuint stride, const GLvoid *addr ); +GLAPI void APIENTRY glEnableVariantClientStateEXT( GLuint id ); +GLAPI void APIENTRY glDisableVariantClientStateEXT( GLuint id ); +GLAPI GLuint APIENTRY glBindLightParameterEXT( GLenum light, GLenum value ); +GLAPI GLuint APIENTRY glBindMaterialParameterEXT( GLenum face, GLenum value ); +GLAPI GLuint APIENTRY glBindTexGenParameterEXT( GLenum unit, GLenum coord, GLenum value ); +GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT( GLenum unit, GLenum value ); +GLAPI GLuint APIENTRY glBindParameterEXT( GLenum value ); +GLAPI GLboolean APIENTRY glIsVariantEnabledEXT( GLuint id, GLenum cap ); +GLAPI void APIENTRY glGetVariantBooleanvEXT( GLuint id, GLenum value, GLboolean *data ); +GLAPI void APIENTRY glGetVariantIntegervEXT( GLuint id, GLenum value, GLint *data ); +GLAPI void APIENTRY glGetVariantFloatvEXT( GLuint id, GLenum value, GLfloat *data ); +GLAPI void APIENTRY glGetVariantPointervEXT( GLuint id, GLenum value, GLvoid **data ); +GLAPI void APIENTRY glGetInvariantBooleanvEXT( GLuint id, GLenum value, GLboolean *data ); +GLAPI void APIENTRY glGetInvariantIntegervEXT( GLuint id, GLenum value, GLint *data ); +GLAPI void APIENTRY glGetInvariantFloatvEXT( GLuint id, GLenum value, GLfloat *data ); +GLAPI void APIENTRY glGetLocalConstantBooleanvEXT( GLuint id, GLenum value, GLboolean *data ); +GLAPI void APIENTRY glGetLocalConstantIntegervEXT( GLuint id, GLenum value, GLint *data ); +GLAPI void APIENTRY glGetLocalConstantFloatvEXT( GLuint id, GLenum value, GLfloat *data ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC )( void ); +typedef void( APIENTRYP PFNGLENDVERTEXSHADEREXTPROC )( void ); +typedef void( APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC )( GLuint id ); +typedef GLuint( APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC )( GLuint range ); +typedef void( APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLSHADEROP1EXTPROC )( GLenum op, GLuint res, GLuint arg1 ); +typedef void( APIENTRYP PFNGLSHADEROP2EXTPROC )( GLenum op, GLuint res, GLuint arg1, GLuint arg2 ); +typedef void( APIENTRYP PFNGLSHADEROP3EXTPROC )( GLenum op, GLuint res, GLuint arg1, GLuint arg2, + GLuint arg3 ); +typedef void( APIENTRYP PFNGLSWIZZLEEXTPROC )( GLuint res, GLuint in, GLenum outX, GLenum outY, + GLenum outZ, GLenum outW ); +typedef void( APIENTRYP PFNGLWRITEMASKEXTPROC )( GLuint res, GLuint in, GLenum outX, GLenum outY, + GLenum outZ, GLenum outW ); +typedef void( APIENTRYP PFNGLINSERTCOMPONENTEXTPROC )( GLuint res, GLuint src, GLuint num ); +typedef void( APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC )( GLuint res, GLuint src, GLuint num ); +typedef GLuint( APIENTRYP PFNGLGENSYMBOLSEXTPROC )( GLenum datatype, GLenum storagetype, GLenum range, + GLuint components ); +typedef void( APIENTRYP PFNGLSETINVARIANTEXTPROC )( GLuint id, GLenum type, const GLvoid *addr ); +typedef void( APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC )( GLuint id, GLenum type, const GLvoid *addr ); +typedef void( APIENTRYP PFNGLVARIANTBVEXTPROC )( GLuint id, const GLbyte *addr ); +typedef void( APIENTRYP PFNGLVARIANTSVEXTPROC )( GLuint id, const GLshort *addr ); +typedef void( APIENTRYP PFNGLVARIANTIVEXTPROC )( GLuint id, const GLint *addr ); +typedef void( APIENTRYP PFNGLVARIANTFVEXTPROC )( GLuint id, const GLfloat *addr ); +typedef void( APIENTRYP PFNGLVARIANTDVEXTPROC )( GLuint id, const GLdouble *addr ); +typedef void( APIENTRYP PFNGLVARIANTUBVEXTPROC )( GLuint id, const GLubyte *addr ); +typedef void( APIENTRYP PFNGLVARIANTUSVEXTPROC )( GLuint id, const GLushort *addr ); +typedef void( APIENTRYP PFNGLVARIANTUIVEXTPROC )( GLuint id, const GLuint *addr ); +typedef void( APIENTRYP PFNGLVARIANTPOINTEREXTPROC )( GLuint id, GLenum type, GLuint stride, + const GLvoid *addr ); +typedef void( APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC )( GLuint id ); +typedef GLuint( APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC )( GLenum light, GLenum value ); +typedef GLuint( APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC )( GLenum face, GLenum value ); +typedef GLuint( APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC )( GLenum unit, GLenum coord, GLenum value ); +typedef GLuint( APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC )( GLenum unit, GLenum value ); +typedef GLuint( APIENTRYP PFNGLBINDPARAMETEREXTPROC )( GLenum value ); +typedef GLboolean( APIENTRYP PFNGLISVARIANTENABLEDEXTPROC )( GLuint id, GLenum cap ); +typedef void( APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC )( GLuint id, GLenum value, GLboolean *data ); +typedef void( APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC )( GLuint id, GLenum value, GLint *data ); +typedef void( APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC )( GLuint id, GLenum value, GLfloat *data ); +typedef void( APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC )( GLuint id, GLenum value, GLvoid **data ); +typedef void( APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC )( GLuint id, GLenum value, GLboolean *data ); +typedef void( APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC )( GLuint id, GLenum value, GLint *data ); +typedef void( APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC )( GLuint id, GLenum value, GLfloat *data ); +typedef void( APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC )( GLuint id, GLenum value, + GLboolean *data ); +typedef void( APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC )( GLuint id, GLenum value, GLint *data ); +typedef void( APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC )( GLuint id, GLenum value, GLfloat *data ); #endif #ifndef GL_ATI_vertex_streams -#define GL_ATI_vertex_streams 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x); -GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x); -GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x); -GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x); -GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y); -GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords); -GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz); -GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream); -GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param); -GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); +# define GL_ATI_vertex_streams 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexStream1sATI( GLenum stream, GLshort x ); +GLAPI void APIENTRY glVertexStream1svATI( GLenum stream, const GLshort *coords ); +GLAPI void APIENTRY glVertexStream1iATI( GLenum stream, GLint x ); +GLAPI void APIENTRY glVertexStream1ivATI( GLenum stream, const GLint *coords ); +GLAPI void APIENTRY glVertexStream1fATI( GLenum stream, GLfloat x ); +GLAPI void APIENTRY glVertexStream1fvATI( GLenum stream, const GLfloat *coords ); +GLAPI void APIENTRY glVertexStream1dATI( GLenum stream, GLdouble x ); +GLAPI void APIENTRY glVertexStream1dvATI( GLenum stream, const GLdouble *coords ); +GLAPI void APIENTRY glVertexStream2sATI( GLenum stream, GLshort x, GLshort y ); +GLAPI void APIENTRY glVertexStream2svATI( GLenum stream, const GLshort *coords ); +GLAPI void APIENTRY glVertexStream2iATI( GLenum stream, GLint x, GLint y ); +GLAPI void APIENTRY glVertexStream2ivATI( GLenum stream, const GLint *coords ); +GLAPI void APIENTRY glVertexStream2fATI( GLenum stream, GLfloat x, GLfloat y ); +GLAPI void APIENTRY glVertexStream2fvATI( GLenum stream, const GLfloat *coords ); +GLAPI void APIENTRY glVertexStream2dATI( GLenum stream, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glVertexStream2dvATI( GLenum stream, const GLdouble *coords ); +GLAPI void APIENTRY glVertexStream3sATI( GLenum stream, GLshort x, GLshort y, GLshort z ); +GLAPI void APIENTRY glVertexStream3svATI( GLenum stream, const GLshort *coords ); +GLAPI void APIENTRY glVertexStream3iATI( GLenum stream, GLint x, GLint y, GLint z ); +GLAPI void APIENTRY glVertexStream3ivATI( GLenum stream, const GLint *coords ); +GLAPI void APIENTRY glVertexStream3fATI( GLenum stream, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glVertexStream3fvATI( GLenum stream, const GLfloat *coords ); +GLAPI void APIENTRY glVertexStream3dATI( GLenum stream, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glVertexStream3dvATI( GLenum stream, const GLdouble *coords ); +GLAPI void APIENTRY glVertexStream4sATI( GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w ); +GLAPI void APIENTRY glVertexStream4svATI( GLenum stream, const GLshort *coords ); +GLAPI void APIENTRY glVertexStream4iATI( GLenum stream, GLint x, GLint y, GLint z, GLint w ); +GLAPI void APIENTRY glVertexStream4ivATI( GLenum stream, const GLint *coords ); +GLAPI void APIENTRY glVertexStream4fATI( GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +GLAPI void APIENTRY glVertexStream4fvATI( GLenum stream, const GLfloat *coords ); +GLAPI void APIENTRY glVertexStream4dATI( GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glVertexStream4dvATI( GLenum stream, const GLdouble *coords ); +GLAPI void APIENTRY glNormalStream3bATI( GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz ); +GLAPI void APIENTRY glNormalStream3bvATI( GLenum stream, const GLbyte *coords ); +GLAPI void APIENTRY glNormalStream3sATI( GLenum stream, GLshort nx, GLshort ny, GLshort nz ); +GLAPI void APIENTRY glNormalStream3svATI( GLenum stream, const GLshort *coords ); +GLAPI void APIENTRY glNormalStream3iATI( GLenum stream, GLint nx, GLint ny, GLint nz ); +GLAPI void APIENTRY glNormalStream3ivATI( GLenum stream, const GLint *coords ); +GLAPI void APIENTRY glNormalStream3fATI( GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz ); +GLAPI void APIENTRY glNormalStream3fvATI( GLenum stream, const GLfloat *coords ); +GLAPI void APIENTRY glNormalStream3dATI( GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz ); +GLAPI void APIENTRY glNormalStream3dvATI( GLenum stream, const GLdouble *coords ); +GLAPI void APIENTRY glClientActiveVertexStreamATI( GLenum stream ); +GLAPI void APIENTRY glVertexBlendEnviATI( GLenum pname, GLint param ); +GLAPI void APIENTRY glVertexBlendEnvfATI( GLenum pname, GLfloat param ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXSTREAM1SATIPROC )( GLenum stream, GLshort x ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC )( GLenum stream, const GLshort *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM1IATIPROC )( GLenum stream, GLint x ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC )( GLenum stream, const GLint *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM1FATIPROC )( GLenum stream, GLfloat x ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC )( GLenum stream, const GLfloat *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM1DATIPROC )( GLenum stream, GLdouble x ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC )( GLenum stream, const GLdouble *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM2SATIPROC )( GLenum stream, GLshort x, GLshort y ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC )( GLenum stream, const GLshort *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM2IATIPROC )( GLenum stream, GLint x, GLint y ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC )( GLenum stream, const GLint *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM2FATIPROC )( GLenum stream, GLfloat x, GLfloat y ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC )( GLenum stream, const GLfloat *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM2DATIPROC )( GLenum stream, GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC )( GLenum stream, const GLdouble *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM3SATIPROC )( GLenum stream, GLshort x, GLshort y, GLshort z ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC )( GLenum stream, const GLshort *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM3IATIPROC )( GLenum stream, GLint x, GLint y, GLint z ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC )( GLenum stream, const GLint *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM3FATIPROC )( GLenum stream, GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC )( GLenum stream, const GLfloat *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM3DATIPROC )( GLenum stream, GLdouble x, GLdouble y, + GLdouble z ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC )( GLenum stream, const GLdouble *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM4SATIPROC )( GLenum stream, GLshort x, GLshort y, GLshort z, + GLshort w ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC )( GLenum stream, const GLshort *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM4IATIPROC )( GLenum stream, GLint x, GLint y, GLint z, + GLint w ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC )( GLenum stream, const GLint *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM4FATIPROC )( GLenum stream, GLfloat x, GLfloat y, GLfloat z, + GLfloat w ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC )( GLenum stream, const GLfloat *coords ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM4DATIPROC )( GLenum stream, GLdouble x, GLdouble y, GLdouble z, + GLdouble w ); +typedef void( APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC )( GLenum stream, const GLdouble *coords ); +typedef void( APIENTRYP PFNGLNORMALSTREAM3BATIPROC )( GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz ); +typedef void( APIENTRYP PFNGLNORMALSTREAM3BVATIPROC )( GLenum stream, const GLbyte *coords ); +typedef void( APIENTRYP PFNGLNORMALSTREAM3SATIPROC )( GLenum stream, GLshort nx, GLshort ny, + GLshort nz ); +typedef void( APIENTRYP PFNGLNORMALSTREAM3SVATIPROC )( GLenum stream, const GLshort *coords ); +typedef void( APIENTRYP PFNGLNORMALSTREAM3IATIPROC )( GLenum stream, GLint nx, GLint ny, GLint nz ); +typedef void( APIENTRYP PFNGLNORMALSTREAM3IVATIPROC )( GLenum stream, const GLint *coords ); +typedef void( APIENTRYP PFNGLNORMALSTREAM3FATIPROC )( GLenum stream, GLfloat nx, GLfloat ny, + GLfloat nz ); +typedef void( APIENTRYP PFNGLNORMALSTREAM3FVATIPROC )( GLenum stream, const GLfloat *coords ); +typedef void( APIENTRYP PFNGLNORMALSTREAM3DATIPROC )( GLenum stream, GLdouble nx, GLdouble ny, + GLdouble nz ); +typedef void( APIENTRYP PFNGLNORMALSTREAM3DVATIPROC )( GLenum stream, const GLdouble *coords ); +typedef void( APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC )( GLenum stream ); +typedef void( APIENTRYP PFNGLVERTEXBLENDENVIATIPROC )( GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLVERTEXBLENDENVFATIPROC )( GLenum pname, GLfloat param ); #endif #ifndef GL_ATI_element_array -#define GL_ATI_element_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerATI (GLenum type, const GLvoid *pointer); -GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count); -GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); +# define GL_ATI_element_array 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerATI( GLenum type, const GLvoid *pointer ); +GLAPI void APIENTRY glDrawElementArrayATI( GLenum mode, GLsizei count ); +GLAPI void APIENTRY glDrawRangeElementArrayATI( GLenum mode, GLuint start, GLuint end, GLsizei count ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLELEMENTPOINTERATIPROC )( GLenum type, const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC )( GLenum mode, GLsizei count ); +typedef void( APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC )( GLenum mode, GLuint start, GLuint end, + GLsizei count ); #endif #ifndef GL_SUN_mesh_array -#define GL_SUN_mesh_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +# define GL_SUN_mesh_array 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawMeshArraysSUN( GLenum mode, GLint first, GLsizei count, GLsizei width ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC )( GLenum mode, GLint first, GLsizei count, + GLsizei width ); #endif #ifndef GL_SUN_slice_accum -#define GL_SUN_slice_accum 1 +# define GL_SUN_slice_accum 1 #endif #ifndef GL_NV_multisample_filter_hint -#define GL_NV_multisample_filter_hint 1 +# define GL_NV_multisample_filter_hint 1 #endif #ifndef GL_NV_depth_clamp -#define GL_NV_depth_clamp 1 +# define GL_NV_depth_clamp 1 #endif #ifndef GL_NV_occlusion_query -#define GL_NV_occlusion_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id); -GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id); -GLAPI void APIENTRY glEndOcclusionQueryNV (void); -GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); +# define GL_NV_occlusion_query 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenOcclusionQueriesNV( GLsizei n, GLuint *ids ); +GLAPI void APIENTRY glDeleteOcclusionQueriesNV( GLsizei n, const GLuint *ids ); +GLAPI GLboolean APIENTRY glIsOcclusionQueryNV( GLuint id ); +GLAPI void APIENTRY glBeginOcclusionQueryNV( GLuint id ); +GLAPI void APIENTRY glEndOcclusionQueryNV( void ); +GLAPI void APIENTRY glGetOcclusionQueryivNV( GLuint id, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetOcclusionQueryuivNV( GLuint id, GLenum pname, GLuint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC )( GLsizei n, GLuint *ids ); +typedef void( APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC )( GLsizei n, const GLuint *ids ); +typedef GLboolean( APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC )( void ); +typedef void( APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC )( GLuint id, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC )( GLuint id, GLenum pname, GLuint *params ); #endif #ifndef GL_NV_point_sprite -#define GL_NV_point_sprite 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param); -GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +# define GL_NV_point_sprite 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameteriNV( GLenum pname, GLint param ); +GLAPI void APIENTRY glPointParameterivNV( GLenum pname, const GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPOINTPARAMETERINVPROC )( GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLPOINTPARAMETERIVNVPROC )( GLenum pname, const GLint *params ); #endif #ifndef GL_NV_texture_shader3 -#define GL_NV_texture_shader3 1 +# define GL_NV_texture_shader3 1 #endif #ifndef GL_NV_vertex_program1_1 -#define GL_NV_vertex_program1_1 1 +# define GL_NV_vertex_program1_1 1 #endif #ifndef GL_EXT_shadow_funcs -#define GL_EXT_shadow_funcs 1 +# define GL_EXT_shadow_funcs 1 #endif #ifndef GL_EXT_stencil_two_side -#define GL_EXT_stencil_two_side 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +# define GL_EXT_stencil_two_side 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveStencilFaceEXT( GLenum face ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC )( GLenum face ); #endif #ifndef GL_ATI_text_fragment_shader -#define GL_ATI_text_fragment_shader 1 +# define GL_ATI_text_fragment_shader 1 #endif #ifndef GL_APPLE_client_storage -#define GL_APPLE_client_storage 1 +# define GL_APPLE_client_storage 1 #endif #ifndef GL_APPLE_element_array -#define GL_APPLE_element_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const GLvoid *pointer); -GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count); -GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); -GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +# define GL_APPLE_element_array 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerAPPLE( GLenum type, const GLvoid *pointer ); +GLAPI void APIENTRY glDrawElementArrayAPPLE( GLenum mode, GLint first, GLsizei count ); +GLAPI void APIENTRY glDrawRangeElementArrayAPPLE( GLenum mode, GLuint start, GLuint end, GLint first, + GLsizei count ); +GLAPI void APIENTRY glMultiDrawElementArrayAPPLE( GLenum mode, const GLint *first, const GLsizei *count, + GLsizei primcount ); +GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE( GLenum mode, GLuint start, GLuint end, + const GLint *first, const GLsizei *count, + GLsizei primcount ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC )( GLenum type, const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC )( GLenum mode, GLint first, GLsizei count ); +typedef void( APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC )( GLenum mode, GLuint start, GLuint end, + GLint first, GLsizei count ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC )( GLenum mode, const GLint *first, + const GLsizei *count, GLsizei primcount ); +typedef void( APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC )( GLenum mode, GLuint start, + GLuint end, const GLint *first, + const GLsizei *count, + GLsizei primcount ); #endif #ifndef GL_APPLE_fence -#define GL_APPLE_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences); -GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences); -GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence); -GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name); -GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); -typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); -typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); +# define GL_APPLE_fence 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenFencesAPPLE( GLsizei n, GLuint *fences ); +GLAPI void APIENTRY glDeleteFencesAPPLE( GLsizei n, const GLuint *fences ); +GLAPI void APIENTRY glSetFenceAPPLE( GLuint fence ); +GLAPI GLboolean APIENTRY glIsFenceAPPLE( GLuint fence ); +GLAPI GLboolean APIENTRY glTestFenceAPPLE( GLuint fence ); +GLAPI void APIENTRY glFinishFenceAPPLE( GLuint fence ); +GLAPI GLboolean APIENTRY glTestObjectAPPLE( GLenum object, GLuint name ); +GLAPI void APIENTRY glFinishObjectAPPLE( GLenum object, GLint name ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGENFENCESAPPLEPROC )( GLsizei n, GLuint *fences ); +typedef void( APIENTRYP PFNGLDELETEFENCESAPPLEPROC )( GLsizei n, const GLuint *fences ); +typedef void( APIENTRYP PFNGLSETFENCEAPPLEPROC )( GLuint fence ); +typedef GLboolean( APIENTRYP PFNGLISFENCEAPPLEPROC )( GLuint fence ); +typedef GLboolean( APIENTRYP PFNGLTESTFENCEAPPLEPROC )( GLuint fence ); +typedef void( APIENTRYP PFNGLFINISHFENCEAPPLEPROC )( GLuint fence ); +typedef GLboolean( APIENTRYP PFNGLTESTOBJECTAPPLEPROC )( GLenum object, GLuint name ); +typedef void( APIENTRYP PFNGLFINISHOBJECTAPPLEPROC )( GLenum object, GLint name ); #endif #ifndef GL_APPLE_vertex_array_object -#define GL_APPLE_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array); -GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays); -GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays); -GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); +# define GL_APPLE_vertex_array_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexArrayAPPLE( GLuint array ); +GLAPI void APIENTRY glDeleteVertexArraysAPPLE( GLsizei n, const GLuint *arrays ); +GLAPI void APIENTRY glGenVertexArraysAPPLE( GLsizei n, GLuint *arrays ); +GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE( GLuint array ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC )( GLuint array ); +typedef void( APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC )( GLsizei n, const GLuint *arrays ); +typedef void( APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC )( GLsizei n, GLuint *arrays ); +typedef GLboolean( APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC )( GLuint array ); #endif #ifndef GL_APPLE_vertex_array_range -#define GL_APPLE_vertex_array_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); -GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); -GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +# define GL_APPLE_vertex_array_range 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexArrayRangeAPPLE( GLsizei length, GLvoid *pointer ); +GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE( GLsizei length, GLvoid *pointer ); +GLAPI void APIENTRY glVertexArrayParameteriAPPLE( GLenum pname, GLint param ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC )( GLsizei length, GLvoid *pointer ); +typedef void( APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC )( GLsizei length, GLvoid *pointer ); +typedef void( APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC )( GLenum pname, GLint param ); #endif #ifndef GL_APPLE_ycbcr_422 -#define GL_APPLE_ycbcr_422 1 +# define GL_APPLE_ycbcr_422 1 #endif #ifndef GL_S3_s3tc -#define GL_S3_s3tc 1 +# define GL_S3_s3tc 1 #endif #ifndef GL_ATI_draw_buffers -#define GL_ATI_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); +# define GL_ATI_draw_buffers 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersATI( GLsizei n, const GLenum *bufs ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWBUFFERSATIPROC )( GLsizei n, const GLenum *bufs ); #endif #ifndef GL_ATI_pixel_format_float -#define GL_ATI_pixel_format_float 1 +# define GL_ATI_pixel_format_float 1 /* This is really a WGL extension, but defines some associated GL enums. * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string. */ #endif #ifndef GL_ATI_texture_env_combine3 -#define GL_ATI_texture_env_combine3 1 +# define GL_ATI_texture_env_combine3 1 #endif #ifndef GL_ATI_texture_float -#define GL_ATI_texture_float 1 +# define GL_ATI_texture_float 1 #endif #ifndef GL_NV_float_buffer -#define GL_NV_float_buffer 1 +# define GL_NV_float_buffer 1 #endif #ifndef GL_NV_fragment_program -#define GL_NV_fragment_program 1 +# define GL_NV_fragment_program 1 /* Some NV_fragment_program entry points are shared with ARB_vertex_program. */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); -GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); -GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramNamedParameter4fNV( GLuint id, GLsizei len, const GLubyte *name, GLfloat x, + GLfloat y, GLfloat z, GLfloat w ); +GLAPI void APIENTRY glProgramNamedParameter4dNV( GLuint id, GLsizei len, const GLubyte *name, GLdouble x, + GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glProgramNamedParameter4fvNV( GLuint id, GLsizei len, const GLubyte *name, + const GLfloat *v ); +GLAPI void APIENTRY glProgramNamedParameter4dvNV( GLuint id, GLsizei len, const GLubyte *name, + const GLdouble *v ); +GLAPI void APIENTRY glGetProgramNamedParameterfvNV( GLuint id, GLsizei len, const GLubyte *name, + GLfloat *params ); +GLAPI void APIENTRY glGetProgramNamedParameterdvNV( GLuint id, GLsizei len, const GLubyte *name, + GLdouble *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC )( GLuint id, GLsizei len, + const GLubyte *name, GLfloat x, GLfloat y, + GLfloat z, GLfloat w ); +typedef void( APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC )( GLuint id, GLsizei len, + const GLubyte *name, GLdouble x, + GLdouble y, GLdouble z, GLdouble w ); +typedef void( APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC )( GLuint id, GLsizei len, + const GLubyte *name, const GLfloat *v ); +typedef void( APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC )( GLuint id, GLsizei len, + const GLubyte *name, const GLdouble *v ); +typedef void( APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC )( GLuint id, GLsizei len, + const GLubyte *name, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC )( GLuint id, GLsizei len, + const GLubyte *name, GLdouble *params ); #endif #ifndef GL_NV_half_float -#define GL_NV_half_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y); -GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z); -GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); -GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); -GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s); -GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t); -GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r); -GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s); -GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t); -GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); -GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog); -GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog); -GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight); -GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight); -GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x); -GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y); -GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); -GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); -typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); -typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); -typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); -typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +# define GL_NV_half_float 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertex2hNV( GLhalfNV x, GLhalfNV y ); +GLAPI void APIENTRY glVertex2hvNV( const GLhalfNV *v ); +GLAPI void APIENTRY glVertex3hNV( GLhalfNV x, GLhalfNV y, GLhalfNV z ); +GLAPI void APIENTRY glVertex3hvNV( const GLhalfNV *v ); +GLAPI void APIENTRY glVertex4hNV( GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w ); +GLAPI void APIENTRY glVertex4hvNV( const GLhalfNV *v ); +GLAPI void APIENTRY glNormal3hNV( GLhalfNV nx, GLhalfNV ny, GLhalfNV nz ); +GLAPI void APIENTRY glNormal3hvNV( const GLhalfNV *v ); +GLAPI void APIENTRY glColor3hNV( GLhalfNV red, GLhalfNV green, GLhalfNV blue ); +GLAPI void APIENTRY glColor3hvNV( const GLhalfNV *v ); +GLAPI void APIENTRY glColor4hNV( GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha ); +GLAPI void APIENTRY glColor4hvNV( const GLhalfNV *v ); +GLAPI void APIENTRY glTexCoord1hNV( GLhalfNV s ); +GLAPI void APIENTRY glTexCoord1hvNV( const GLhalfNV *v ); +GLAPI void APIENTRY glTexCoord2hNV( GLhalfNV s, GLhalfNV t ); +GLAPI void APIENTRY glTexCoord2hvNV( const GLhalfNV *v ); +GLAPI void APIENTRY glTexCoord3hNV( GLhalfNV s, GLhalfNV t, GLhalfNV r ); +GLAPI void APIENTRY glTexCoord3hvNV( const GLhalfNV *v ); +GLAPI void APIENTRY glTexCoord4hNV( GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q ); +GLAPI void APIENTRY glTexCoord4hvNV( const GLhalfNV *v ); +GLAPI void APIENTRY glMultiTexCoord1hNV( GLenum target, GLhalfNV s ); +GLAPI void APIENTRY glMultiTexCoord1hvNV( GLenum target, const GLhalfNV *v ); +GLAPI void APIENTRY glMultiTexCoord2hNV( GLenum target, GLhalfNV s, GLhalfNV t ); +GLAPI void APIENTRY glMultiTexCoord2hvNV( GLenum target, const GLhalfNV *v ); +GLAPI void APIENTRY glMultiTexCoord3hNV( GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r ); +GLAPI void APIENTRY glMultiTexCoord3hvNV( GLenum target, const GLhalfNV *v ); +GLAPI void APIENTRY glMultiTexCoord4hNV( GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q ); +GLAPI void APIENTRY glMultiTexCoord4hvNV( GLenum target, const GLhalfNV *v ); +GLAPI void APIENTRY glFogCoordhNV( GLhalfNV fog ); +GLAPI void APIENTRY glFogCoordhvNV( const GLhalfNV *fog ); +GLAPI void APIENTRY glSecondaryColor3hNV( GLhalfNV red, GLhalfNV green, GLhalfNV blue ); +GLAPI void APIENTRY glSecondaryColor3hvNV( const GLhalfNV *v ); +GLAPI void APIENTRY glVertexWeighthNV( GLhalfNV weight ); +GLAPI void APIENTRY glVertexWeighthvNV( const GLhalfNV *weight ); +GLAPI void APIENTRY glVertexAttrib1hNV( GLuint index, GLhalfNV x ); +GLAPI void APIENTRY glVertexAttrib1hvNV( GLuint index, const GLhalfNV *v ); +GLAPI void APIENTRY glVertexAttrib2hNV( GLuint index, GLhalfNV x, GLhalfNV y ); +GLAPI void APIENTRY glVertexAttrib2hvNV( GLuint index, const GLhalfNV *v ); +GLAPI void APIENTRY glVertexAttrib3hNV( GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z ); +GLAPI void APIENTRY glVertexAttrib3hvNV( GLuint index, const GLhalfNV *v ); +GLAPI void APIENTRY glVertexAttrib4hNV( GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w ); +GLAPI void APIENTRY glVertexAttrib4hvNV( GLuint index, const GLhalfNV *v ); +GLAPI void APIENTRY glVertexAttribs1hvNV( GLuint index, GLsizei n, const GLhalfNV *v ); +GLAPI void APIENTRY glVertexAttribs2hvNV( GLuint index, GLsizei n, const GLhalfNV *v ); +GLAPI void APIENTRY glVertexAttribs3hvNV( GLuint index, GLsizei n, const GLhalfNV *v ); +GLAPI void APIENTRY glVertexAttribs4hvNV( GLuint index, GLsizei n, const GLhalfNV *v ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEX2HNVPROC )( GLhalfNV x, GLhalfNV y ); +typedef void( APIENTRYP PFNGLVERTEX2HVNVPROC )( const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLVERTEX3HNVPROC )( GLhalfNV x, GLhalfNV y, GLhalfNV z ); +typedef void( APIENTRYP PFNGLVERTEX3HVNVPROC )( const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLVERTEX4HNVPROC )( GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w ); +typedef void( APIENTRYP PFNGLVERTEX4HVNVPROC )( const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLNORMAL3HNVPROC )( GLhalfNV nx, GLhalfNV ny, GLhalfNV nz ); +typedef void( APIENTRYP PFNGLNORMAL3HVNVPROC )( const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLCOLOR3HNVPROC )( GLhalfNV red, GLhalfNV green, GLhalfNV blue ); +typedef void( APIENTRYP PFNGLCOLOR3HVNVPROC )( const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLCOLOR4HNVPROC )( GLhalfNV red, GLhalfNV green, GLhalfNV blue, + GLhalfNV alpha ); +typedef void( APIENTRYP PFNGLCOLOR4HVNVPROC )( const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLTEXCOORD1HNVPROC )( GLhalfNV s ); +typedef void( APIENTRYP PFNGLTEXCOORD1HVNVPROC )( const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLTEXCOORD2HNVPROC )( GLhalfNV s, GLhalfNV t ); +typedef void( APIENTRYP PFNGLTEXCOORD2HVNVPROC )( const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLTEXCOORD3HNVPROC )( GLhalfNV s, GLhalfNV t, GLhalfNV r ); +typedef void( APIENTRYP PFNGLTEXCOORD3HVNVPROC )( const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLTEXCOORD4HNVPROC )( GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q ); +typedef void( APIENTRYP PFNGLTEXCOORD4HVNVPROC )( const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1HNVPROC )( GLenum target, GLhalfNV s ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC )( GLenum target, const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2HNVPROC )( GLenum target, GLhalfNV s, GLhalfNV t ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC )( GLenum target, const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3HNVPROC )( GLenum target, GLhalfNV s, GLhalfNV t, + GLhalfNV r ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC )( GLenum target, const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4HNVPROC )( GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, + GLhalfNV q ); +typedef void( APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC )( GLenum target, const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLFOGCOORDHNVPROC )( GLhalfNV fog ); +typedef void( APIENTRYP PFNGLFOGCOORDHVNVPROC )( const GLhalfNV *fog ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC )( GLhalfNV red, GLhalfNV green, GLhalfNV blue ); +typedef void( APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC )( const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLVERTEXWEIGHTHNVPROC )( GLhalfNV weight ); +typedef void( APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC )( const GLhalfNV *weight ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1HNVPROC )( GLuint index, GLhalfNV x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC )( GLuint index, const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2HNVPROC )( GLuint index, GLhalfNV x, GLhalfNV y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC )( GLuint index, const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3HNVPROC )( GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC )( GLuint index, const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4HNVPROC )( GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, + GLhalfNV w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC )( GLuint index, const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC )( GLuint index, GLsizei n, const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC )( GLuint index, GLsizei n, const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC )( GLuint index, GLsizei n, const GLhalfNV *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC )( GLuint index, GLsizei n, const GLhalfNV *v ); #endif #ifndef GL_NV_pixel_data_range -#define GL_NV_pixel_data_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const GLvoid *pointer); -GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); +# define GL_NV_pixel_data_range 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelDataRangeNV( GLenum target, GLsizei length, const GLvoid *pointer ); +GLAPI void APIENTRY glFlushPixelDataRangeNV( GLenum target ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPIXELDATARANGENVPROC )( GLenum target, GLsizei length, + const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC )( GLenum target ); #endif #ifndef GL_NV_primitive_restart -#define GL_NV_primitive_restart 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPrimitiveRestartNV (void); -GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +# define GL_NV_primitive_restart 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPrimitiveRestartNV( void ); +GLAPI void APIENTRY glPrimitiveRestartIndexNV( GLuint index ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPRIMITIVERESTARTNVPROC )( void ); +typedef void( APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC )( GLuint index ); #endif #ifndef GL_NV_texture_expand_normal -#define GL_NV_texture_expand_normal 1 +# define GL_NV_texture_expand_normal 1 #endif #ifndef GL_NV_vertex_program2 -#define GL_NV_vertex_program2 1 +# define GL_NV_vertex_program2 1 #endif #ifndef GL_ATI_map_object_buffer -#define GL_ATI_map_object_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); +# define GL_ATI_map_object_buffer 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLvoid *APIENTRY glMapObjectBufferATI( GLuint buffer ); +GLAPI void APIENTRY glUnmapObjectBufferATI( GLuint buffer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLvoid *( APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC )( GLuint buffer ); #endif #ifndef GL_ATI_separate_stencil -#define GL_ATI_separate_stencil 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +# define GL_ATI_separate_stencil 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilOpSeparateATI( GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass ); +GLAPI void APIENTRY glStencilFuncSeparateATI( GLenum frontfunc, GLenum backfunc, GLint ref, + GLuint mask ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC )( GLenum face, GLenum sfail, GLenum dpfail, + GLenum dppass ); +typedef void( APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC )( GLenum frontfunc, GLenum backfunc, GLint ref, + GLuint mask ); #endif #ifndef GL_ATI_vertex_attrib_array_object -#define GL_ATI_vertex_attrib_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); +# define GL_ATI_vertex_attrib_array_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribArrayObjectATI( GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, GLuint buffer, + GLuint offset ); +GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI( GLuint index, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI( GLuint index, GLenum pname, GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC )( GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, + GLuint buffer, GLuint offset ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC )( GLuint index, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC )( GLuint index, GLenum pname, + GLint *params ); #endif #ifndef GL_OES_read_format -#define GL_OES_read_format 1 +# define GL_OES_read_format 1 #endif #ifndef GL_EXT_depth_bounds_test -#define GL_EXT_depth_bounds_test 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); +# define GL_EXT_depth_bounds_test 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthBoundsEXT( GLclampd zmin, GLclampd zmax ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDEPTHBOUNDSEXTPROC )( GLclampd zmin, GLclampd zmax ); #endif #ifndef GL_EXT_texture_mirror_clamp -#define GL_EXT_texture_mirror_clamp 1 +# define GL_EXT_texture_mirror_clamp 1 #endif #ifndef GL_EXT_blend_equation_separate -#define GL_EXT_blend_equation_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); +# define GL_EXT_blend_equation_separate 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparateEXT( GLenum modeRGB, GLenum modeAlpha ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC )( GLenum modeRGB, GLenum modeAlpha ); #endif #ifndef GL_MESA_pack_invert -#define GL_MESA_pack_invert 1 +# define GL_MESA_pack_invert 1 #endif #ifndef GL_MESA_ycbcr_texture -#define GL_MESA_ycbcr_texture 1 +# define GL_MESA_ycbcr_texture 1 #endif #ifndef GL_EXT_pixel_buffer_object -#define GL_EXT_pixel_buffer_object 1 +# define GL_EXT_pixel_buffer_object 1 #endif #ifndef GL_NV_fragment_program_option -#define GL_NV_fragment_program_option 1 +# define GL_NV_fragment_program_option 1 #endif #ifndef GL_NV_fragment_program2 -#define GL_NV_fragment_program2 1 +# define GL_NV_fragment_program2 1 #endif #ifndef GL_NV_vertex_program2_option -#define GL_NV_vertex_program2_option 1 +# define GL_NV_vertex_program2_option 1 #endif #ifndef GL_NV_vertex_program3 -#define GL_NV_vertex_program3 1 +# define GL_NV_vertex_program3 1 #endif #ifndef GL_EXT_framebuffer_object -#define GL_EXT_framebuffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer); -GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers); -GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer); -GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer); -GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers); -GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers); -GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target); -GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); -typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); +# define GL_EXT_framebuffer_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glIsRenderbufferEXT( GLuint renderbuffer ); +GLAPI void APIENTRY glBindRenderbufferEXT( GLenum target, GLuint renderbuffer ); +GLAPI void APIENTRY glDeleteRenderbuffersEXT( GLsizei n, const GLuint *renderbuffers ); +GLAPI void APIENTRY glGenRenderbuffersEXT( GLsizei n, GLuint *renderbuffers ); +GLAPI void APIENTRY glRenderbufferStorageEXT( GLenum target, GLenum internalformat, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glGetRenderbufferParameterivEXT( GLenum target, GLenum pname, GLint *params ); +GLAPI GLboolean APIENTRY glIsFramebufferEXT( GLuint framebuffer ); +GLAPI void APIENTRY glBindFramebufferEXT( GLenum target, GLuint framebuffer ); +GLAPI void APIENTRY glDeleteFramebuffersEXT( GLsizei n, const GLuint *framebuffers ); +GLAPI void APIENTRY glGenFramebuffersEXT( GLsizei n, GLuint *framebuffers ); +GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT( GLenum target ); +GLAPI void APIENTRY glFramebufferTexture1DEXT( GLenum target, GLenum attachment, GLenum textarget, + GLuint texture, GLint level ); +GLAPI void APIENTRY glFramebufferTexture2DEXT( GLenum target, GLenum attachment, GLenum textarget, + GLuint texture, GLint level ); +GLAPI void APIENTRY glFramebufferTexture3DEXT( GLenum target, GLenum attachment, GLenum textarget, + GLuint texture, GLint level, GLint zoffset ); +GLAPI void APIENTRY glFramebufferRenderbufferEXT( GLenum target, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer ); +GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT( GLenum target, GLenum attachment, + GLenum pname, GLint *params ); +GLAPI void APIENTRY glGenerateMipmapEXT( GLenum target ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean( APIENTRYP PFNGLISRENDERBUFFEREXTPROC )( GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC )( GLenum target, GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC )( GLsizei n, const GLuint *renderbuffers ); +typedef void( APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC )( GLsizei n, GLuint *renderbuffers ); +typedef void( APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC )( GLenum target, GLenum internalformat, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC )( GLenum target, GLenum pname, + GLint *params ); +typedef GLboolean( APIENTRYP PFNGLISFRAMEBUFFEREXTPROC )( GLuint framebuffer ); +typedef void( APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC )( GLenum target, GLuint framebuffer ); +typedef void( APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC )( GLsizei n, const GLuint *framebuffers ); +typedef void( APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC )( GLsizei n, GLuint *framebuffers ); +typedef GLenum( APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC )( GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC )( GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC )( GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level, GLint zoffset ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC )( GLenum target, GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC )( GLenum target, + GLenum attachment, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGENERATEMIPMAPEXTPROC )( GLenum target ); #endif #ifndef GL_GREMEDY_string_marker -#define GL_GREMEDY_string_marker 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const GLvoid *string); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); +# define GL_GREMEDY_string_marker 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStringMarkerGREMEDY( GLsizei len, const GLvoid *string ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC )( GLsizei len, const GLvoid *string ); #endif #ifndef GL_EXT_packed_depth_stencil -#define GL_EXT_packed_depth_stencil 1 +# define GL_EXT_packed_depth_stencil 1 #endif #ifndef GL_EXT_stencil_clear_tag -#define GL_EXT_stencil_clear_tag 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); +# define GL_EXT_stencil_clear_tag 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilClearTagEXT( GLsizei stencilTagBits, GLuint stencilClearTag ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC )( GLsizei stencilTagBits, GLuint stencilClearTag ); #endif #ifndef GL_EXT_texture_sRGB -#define GL_EXT_texture_sRGB 1 +# define GL_EXT_texture_sRGB 1 #endif #ifndef GL_EXT_framebuffer_blit -#define GL_EXT_framebuffer_blit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +# define GL_EXT_framebuffer_blit 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlitFramebufferEXT( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC )( GLint srcX0, GLint srcY0, GLint srcX1, + GLint srcY1, GLint dstX0, GLint dstY0, + GLint dstX1, GLint dstY1, GLbitfield mask, + GLenum filter ); #endif #ifndef GL_EXT_framebuffer_multisample -#define GL_EXT_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +# define GL_EXT_framebuffer_multisample 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT( GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC )( GLenum target, GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height ); #endif #ifndef GL_MESAX_texture_stack -#define GL_MESAX_texture_stack 1 +# define GL_MESAX_texture_stack 1 #endif #ifndef GL_EXT_timer_query -#define GL_EXT_timer_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64EXT *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params); +# define GL_EXT_timer_query 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetQueryObjecti64vEXT( GLuint id, GLenum pname, GLint64EXT *params ); +GLAPI void APIENTRY glGetQueryObjectui64vEXT( GLuint id, GLenum pname, GLuint64EXT *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC )( GLuint id, GLenum pname, GLint64EXT *params ); +typedef void( APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC )( GLuint id, GLenum pname, + GLuint64EXT *params ); #endif #ifndef GL_EXT_gpu_program_parameters -#define GL_EXT_gpu_program_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +# define GL_EXT_gpu_program_parameters 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramEnvParameters4fvEXT( GLenum target, GLuint index, GLsizei count, + const GLfloat *params ); +GLAPI void APIENTRY glProgramLocalParameters4fvEXT( GLenum target, GLuint index, GLsizei count, + const GLfloat *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC )( GLenum target, GLuint index, + GLsizei count, const GLfloat *params ); +typedef void( APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC )( GLenum target, GLuint index, + GLsizei count, const GLfloat *params ); #endif #ifndef GL_APPLE_flush_buffer_range -#define GL_APPLE_flush_buffer_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); +# define GL_APPLE_flush_buffer_range 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferParameteriAPPLE( GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE( GLenum target, GLintptr offset, GLsizeiptr size ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC )( GLenum target, GLenum pname, GLint param ); +typedef void( APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC )( GLenum target, GLintptr offset, + GLsizeiptr size ); #endif #ifndef GL_NV_gpu_program4 -#define GL_NV_gpu_program4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params); -GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +# define GL_NV_gpu_program4 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramLocalParameterI4iNV( GLenum target, GLuint index, GLint x, GLint y, GLint z, + GLint w ); +GLAPI void APIENTRY glProgramLocalParameterI4ivNV( GLenum target, GLuint index, const GLint *params ); +GLAPI void APIENTRY glProgramLocalParametersI4ivNV( GLenum target, GLuint index, GLsizei count, + const GLint *params ); +GLAPI void APIENTRY glProgramLocalParameterI4uiNV( GLenum target, GLuint index, GLuint x, GLuint y, + GLuint z, GLuint w ); +GLAPI void APIENTRY glProgramLocalParameterI4uivNV( GLenum target, GLuint index, const GLuint *params ); +GLAPI void APIENTRY glProgramLocalParametersI4uivNV( GLenum target, GLuint index, GLsizei count, + const GLuint *params ); +GLAPI void APIENTRY glProgramEnvParameterI4iNV( GLenum target, GLuint index, GLint x, GLint y, GLint z, + GLint w ); +GLAPI void APIENTRY glProgramEnvParameterI4ivNV( GLenum target, GLuint index, const GLint *params ); +GLAPI void APIENTRY glProgramEnvParametersI4ivNV( GLenum target, GLuint index, GLsizei count, + const GLint *params ); +GLAPI void APIENTRY glProgramEnvParameterI4uiNV( GLenum target, GLuint index, GLuint x, GLuint y, + GLuint z, GLuint w ); +GLAPI void APIENTRY glProgramEnvParameterI4uivNV( GLenum target, GLuint index, const GLuint *params ); +GLAPI void APIENTRY glProgramEnvParametersI4uivNV( GLenum target, GLuint index, GLsizei count, + const GLuint *params ); +GLAPI void APIENTRY glGetProgramLocalParameterIivNV( GLenum target, GLuint index, GLint *params ); +GLAPI void APIENTRY glGetProgramLocalParameterIuivNV( GLenum target, GLuint index, GLuint *params ); +GLAPI void APIENTRY glGetProgramEnvParameterIivNV( GLenum target, GLuint index, GLint *params ); +GLAPI void APIENTRY glGetProgramEnvParameterIuivNV( GLenum target, GLuint index, GLuint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC )( GLenum target, GLuint index, GLint x, + GLint y, GLint z, GLint w ); +typedef void( APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC )( GLenum target, GLuint index, + const GLint *params ); +typedef void( APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC )( GLenum target, GLuint index, + GLsizei count, const GLint *params ); +typedef void( APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC )( GLenum target, GLuint index, GLuint x, + GLuint y, GLuint z, GLuint w ); +typedef void( APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC )( GLenum target, GLuint index, + const GLuint *params ); +typedef void( APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC )( GLenum target, GLuint index, + GLsizei count, const GLuint *params ); +typedef void( APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC )( GLenum target, GLuint index, GLint x, + GLint y, GLint z, GLint w ); +typedef void( APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC )( GLenum target, GLuint index, + const GLint *params ); +typedef void( APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC )( GLenum target, GLuint index, + GLsizei count, const GLint *params ); +typedef void( APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC )( GLenum target, GLuint index, GLuint x, + GLuint y, GLuint z, GLuint w ); +typedef void( APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC )( GLenum target, GLuint index, + const GLuint *params ); +typedef void( APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC )( GLenum target, GLuint index, + GLsizei count, const GLuint *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC )( GLenum target, GLuint index, + GLint *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC )( GLenum target, GLuint index, + GLuint *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC )( GLenum target, GLuint index, + GLint *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC )( GLenum target, GLuint index, + GLuint *params ); #endif #ifndef GL_NV_geometry_program4 -#define GL_NV_geometry_program4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit); -GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +# define GL_NV_geometry_program4 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramVertexLimitNV( GLenum target, GLint limit ); +GLAPI void APIENTRY glFramebufferTextureEXT( GLenum target, GLenum attachment, GLuint texture, + GLint level ); +GLAPI void APIENTRY glFramebufferTextureLayerEXT( GLenum target, GLenum attachment, GLuint texture, + GLint level, GLint layer ); +GLAPI void APIENTRY glFramebufferTextureFaceEXT( GLenum target, GLenum attachment, GLuint texture, + GLint level, GLenum face ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC )( GLenum target, GLint limit ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level, + GLint layer ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC )( GLenum target, GLenum attachment, + GLuint texture, GLint level, GLenum face ); #endif #ifndef GL_EXT_geometry_shader4 -#define GL_EXT_geometry_shader4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); +# define GL_EXT_geometry_shader4 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriEXT( GLuint program, GLenum pname, GLint value ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC )( GLuint program, GLenum pname, GLint value ); #endif #ifndef GL_NV_vertex_program4 -#define GL_NV_vertex_program4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x); -GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y); -GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x); -GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y); -GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); +# define GL_NV_vertex_program4 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribI1iEXT( GLuint index, GLint x ); +GLAPI void APIENTRY glVertexAttribI2iEXT( GLuint index, GLint x, GLint y ); +GLAPI void APIENTRY glVertexAttribI3iEXT( GLuint index, GLint x, GLint y, GLint z ); +GLAPI void APIENTRY glVertexAttribI4iEXT( GLuint index, GLint x, GLint y, GLint z, GLint w ); +GLAPI void APIENTRY glVertexAttribI1uiEXT( GLuint index, GLuint x ); +GLAPI void APIENTRY glVertexAttribI2uiEXT( GLuint index, GLuint x, GLuint y ); +GLAPI void APIENTRY glVertexAttribI3uiEXT( GLuint index, GLuint x, GLuint y, GLuint z ); +GLAPI void APIENTRY glVertexAttribI4uiEXT( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ); +GLAPI void APIENTRY glVertexAttribI1ivEXT( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI2ivEXT( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI3ivEXT( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI4ivEXT( GLuint index, const GLint *v ); +GLAPI void APIENTRY glVertexAttribI1uivEXT( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI2uivEXT( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI3uivEXT( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI4uivEXT( GLuint index, const GLuint *v ); +GLAPI void APIENTRY glVertexAttribI4bvEXT( GLuint index, const GLbyte *v ); +GLAPI void APIENTRY glVertexAttribI4svEXT( GLuint index, const GLshort *v ); +GLAPI void APIENTRY glVertexAttribI4ubvEXT( GLuint index, const GLubyte *v ); +GLAPI void APIENTRY glVertexAttribI4usvEXT( GLuint index, const GLushort *v ); +GLAPI void APIENTRY glVertexAttribIPointerEXT( GLuint index, GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); +GLAPI void APIENTRY glGetVertexAttribIivEXT( GLuint index, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetVertexAttribIuivEXT( GLuint index, GLenum pname, GLuint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC )( GLuint index, GLint x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC )( GLuint index, GLint x, GLint y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC )( GLuint index, GLint x, GLint y, GLint z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC )( GLuint index, GLint x, GLint y, GLint z, + GLint w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC )( GLuint index, GLuint x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC )( GLuint index, GLuint x, GLuint y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC )( GLuint index, GLuint x, GLuint y, GLuint z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC )( GLuint index, GLuint x, GLuint y, GLuint z, + GLuint w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC )( GLuint index, const GLint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC )( GLuint index, const GLuint *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC )( GLuint index, const GLbyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC )( GLuint index, const GLshort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC )( GLuint index, const GLubyte *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC )( GLuint index, const GLushort *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC )( GLuint index, GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC )( GLuint index, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC )( GLuint index, GLenum pname, GLuint *params ); #endif #ifndef GL_EXT_gpu_shader4 -#define GL_EXT_gpu_shader4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); -GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name); -GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0); -GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +# define GL_EXT_gpu_shader4 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUniformuivEXT( GLuint program, GLint location, GLuint *params ); +GLAPI void APIENTRY glBindFragDataLocationEXT( GLuint program, GLuint color, const GLchar *name ); +GLAPI GLint APIENTRY glGetFragDataLocationEXT( GLuint program, const GLchar *name ); +GLAPI void APIENTRY glUniform1uiEXT( GLint location, GLuint v0 ); +GLAPI void APIENTRY glUniform2uiEXT( GLint location, GLuint v0, GLuint v1 ); +GLAPI void APIENTRY glUniform3uiEXT( GLint location, GLuint v0, GLuint v1, GLuint v2 ); +GLAPI void APIENTRY glUniform4uiEXT( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ); +GLAPI void APIENTRY glUniform1uivEXT( GLint location, GLsizei count, const GLuint *value ); +GLAPI void APIENTRY glUniform2uivEXT( GLint location, GLsizei count, const GLuint *value ); +GLAPI void APIENTRY glUniform3uivEXT( GLint location, GLsizei count, const GLuint *value ); +GLAPI void APIENTRY glUniform4uivEXT( GLint location, GLsizei count, const GLuint *value ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETUNIFORMUIVEXTPROC )( GLuint program, GLint location, GLuint *params ); +typedef void( APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC )( GLuint program, GLuint color, + const GLchar *name ); +typedef GLint( APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC )( GLuint program, const GLchar *name ); +typedef void( APIENTRYP PFNGLUNIFORM1UIEXTPROC )( GLint location, GLuint v0 ); +typedef void( APIENTRYP PFNGLUNIFORM2UIEXTPROC )( GLint location, GLuint v0, GLuint v1 ); +typedef void( APIENTRYP PFNGLUNIFORM3UIEXTPROC )( GLint location, GLuint v0, GLuint v1, GLuint v2 ); +typedef void( APIENTRYP PFNGLUNIFORM4UIEXTPROC )( GLint location, GLuint v0, GLuint v1, GLuint v2, + GLuint v3 ); +typedef void( APIENTRYP PFNGLUNIFORM1UIVEXTPROC )( GLint location, GLsizei count, const GLuint *value ); +typedef void( APIENTRYP PFNGLUNIFORM2UIVEXTPROC )( GLint location, GLsizei count, const GLuint *value ); +typedef void( APIENTRYP PFNGLUNIFORM3UIVEXTPROC )( GLint location, GLsizei count, const GLuint *value ); +typedef void( APIENTRYP PFNGLUNIFORM4UIVEXTPROC )( GLint location, GLsizei count, const GLuint *value ); #endif #ifndef GL_EXT_draw_instanced -#define GL_EXT_draw_instanced 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +# define GL_EXT_draw_instanced 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedEXT( GLenum mode, GLint start, GLsizei count, + GLsizei primcount ); +GLAPI void APIENTRY glDrawElementsInstancedEXT( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLsizei primcount ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC )( GLenum mode, GLint start, GLsizei count, + GLsizei primcount ); +typedef void( APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC )( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLsizei primcount ); #endif #ifndef GL_EXT_packed_float -#define GL_EXT_packed_float 1 +# define GL_EXT_packed_float 1 #endif #ifndef GL_EXT_texture_array -#define GL_EXT_texture_array 1 +# define GL_EXT_texture_array 1 #endif #ifndef GL_EXT_texture_buffer_object -#define GL_EXT_texture_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); +# define GL_EXT_texture_buffer_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferEXT( GLenum target, GLenum internalformat, GLuint buffer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXBUFFEREXTPROC )( GLenum target, GLenum internalformat, GLuint buffer ); #endif #ifndef GL_EXT_texture_compression_latc -#define GL_EXT_texture_compression_latc 1 +# define GL_EXT_texture_compression_latc 1 #endif #ifndef GL_EXT_texture_compression_rgtc -#define GL_EXT_texture_compression_rgtc 1 +# define GL_EXT_texture_compression_rgtc 1 #endif #ifndef GL_EXT_texture_shared_exponent -#define GL_EXT_texture_shared_exponent 1 +# define GL_EXT_texture_shared_exponent 1 #endif #ifndef GL_NV_depth_buffer_float -#define GL_NV_depth_buffer_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glClearDepthdNV (GLdouble depth); -GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); -typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); +# define GL_NV_depth_buffer_float 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthRangedNV( GLdouble zNear, GLdouble zFar ); +GLAPI void APIENTRY glClearDepthdNV( GLdouble depth ); +GLAPI void APIENTRY glDepthBoundsdNV( GLdouble zmin, GLdouble zmax ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDEPTHRANGEDNVPROC )( GLdouble zNear, GLdouble zFar ); +typedef void( APIENTRYP PFNGLCLEARDEPTHDNVPROC )( GLdouble depth ); +typedef void( APIENTRYP PFNGLDEPTHBOUNDSDNVPROC )( GLdouble zmin, GLdouble zmax ); #endif #ifndef GL_NV_fragment_program4 -#define GL_NV_fragment_program4 1 +# define GL_NV_fragment_program4 1 #endif #ifndef GL_NV_framebuffer_multisample_coverage -#define GL_NV_framebuffer_multisample_coverage 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +# define GL_NV_framebuffer_multisample_coverage 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV( GLenum target, GLsizei coverageSamples, + GLsizei colorSamples, + GLenum internalformat, GLsizei width, + GLsizei height ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC )( + GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, + GLsizei height ); #endif #ifndef GL_EXT_framebuffer_sRGB -#define GL_EXT_framebuffer_sRGB 1 +# define GL_EXT_framebuffer_sRGB 1 #endif #ifndef GL_NV_geometry_shader4 -#define GL_NV_geometry_shader4 1 +# define GL_NV_geometry_shader4 1 #endif #ifndef GL_NV_parameter_buffer_object -#define GL_NV_parameter_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); +# define GL_NV_parameter_buffer_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramBufferParametersfvNV( GLenum target, GLuint buffer, GLuint index, + GLsizei count, const GLfloat *params ); +GLAPI void APIENTRY glProgramBufferParametersIivNV( GLenum target, GLuint buffer, GLuint index, + GLsizei count, const GLint *params ); +GLAPI void APIENTRY glProgramBufferParametersIuivNV( GLenum target, GLuint buffer, GLuint index, + GLsizei count, const GLuint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC )( GLenum target, GLuint buffer, + GLuint index, GLsizei count, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC )( GLenum target, GLuint buffer, + GLuint index, GLsizei count, + const GLint *params ); +typedef void( APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC )( GLenum target, GLuint buffer, + GLuint index, GLsizei count, + const GLuint *params ); #endif #ifndef GL_EXT_draw_buffers2 -#define GL_EXT_draw_buffers2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); -GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); -GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index); -GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index); -GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); -typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); +# define GL_EXT_draw_buffers2 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaskIndexedEXT( GLuint index, GLboolean r, GLboolean g, GLboolean b, + GLboolean a ); +GLAPI void APIENTRY glGetBooleanIndexedvEXT( GLenum target, GLuint index, GLboolean *data ); +GLAPI void APIENTRY glGetIntegerIndexedvEXT( GLenum target, GLuint index, GLint *data ); +GLAPI void APIENTRY glEnableIndexedEXT( GLenum target, GLuint index ); +GLAPI void APIENTRY glDisableIndexedEXT( GLenum target, GLuint index ); +GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT( GLenum target, GLuint index ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC )( GLuint index, GLboolean r, GLboolean g, + GLboolean b, GLboolean a ); +typedef void( APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC )( GLenum target, GLuint index, GLboolean *data ); +typedef void( APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC )( GLenum target, GLuint index, GLint *data ); +typedef void( APIENTRYP PFNGLENABLEINDEXEDEXTPROC )( GLenum target, GLuint index ); +typedef void( APIENTRYP PFNGLDISABLEINDEXEDEXTPROC )( GLenum target, GLuint index ); +typedef GLboolean( APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC )( GLenum target, GLuint index ); #endif #ifndef GL_NV_transform_feedback -#define GL_NV_transform_feedback 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedbackNV (void); -GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode); -GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); -GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name); -GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); -GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); -typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); +# define GL_NV_transform_feedback 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackNV( GLenum primitiveMode ); +GLAPI void APIENTRY glEndTransformFeedbackNV( void ); +GLAPI void APIENTRY glTransformFeedbackAttribsNV( GLuint count, const GLint *attribs, + GLenum bufferMode ); +GLAPI void APIENTRY glBindBufferRangeNV( GLenum target, GLuint index, GLuint buffer, GLintptr offset, + GLsizeiptr size ); +GLAPI void APIENTRY glBindBufferOffsetNV( GLenum target, GLuint index, GLuint buffer, GLintptr offset ); +GLAPI void APIENTRY glBindBufferBaseNV( GLenum target, GLuint index, GLuint buffer ); +GLAPI void APIENTRY glTransformFeedbackVaryingsNV( GLuint program, GLsizei count, const GLint *locations, + GLenum bufferMode ); +GLAPI void APIENTRY glActiveVaryingNV( GLuint program, const GLchar *name ); +GLAPI GLint APIENTRY glGetVaryingLocationNV( GLuint program, const GLchar *name ); +GLAPI void APIENTRY glGetActiveVaryingNV( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, + GLsizei *size, GLenum *type, GLchar *name ); +GLAPI void APIENTRY glGetTransformFeedbackVaryingNV( GLuint program, GLuint index, GLint *location ); +GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV( GLsizei count, const GLint *attribs, + GLsizei nbuffers, const GLint *bufstreams, + GLenum bufferMode ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC )( GLenum primitiveMode ); +typedef void( APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC )( void ); +typedef void( APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC )( GLuint count, const GLint *attribs, + GLenum bufferMode ); +typedef void( APIENTRYP PFNGLBINDBUFFERRANGENVPROC )( GLenum target, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +typedef void( APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC )( GLenum target, GLuint index, GLuint buffer, + GLintptr offset ); +typedef void( APIENTRYP PFNGLBINDBUFFERBASENVPROC )( GLenum target, GLuint index, GLuint buffer ); +typedef void( APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC )( GLuint program, GLsizei count, + const GLint *locations, + GLenum bufferMode ); +typedef void( APIENTRYP PFNGLACTIVEVARYINGNVPROC )( GLuint program, const GLchar *name ); +typedef GLint( APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC )( GLuint program, const GLchar *name ); +typedef void( APIENTRYP PFNGLGETACTIVEVARYINGNVPROC )( GLuint program, GLuint index, GLsizei bufSize, + GLsizei *length, GLsizei *size, GLenum *type, + GLchar *name ); +typedef void( APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC )( GLuint program, GLuint index, + GLint *location ); +typedef void( APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC )( GLsizei count, const GLint *attribs, + GLsizei nbuffers, + const GLint *bufstreams, + GLenum bufferMode ); #endif #ifndef GL_EXT_bindable_uniform -#define GL_EXT_bindable_uniform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer); -GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location); -GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); -typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); -typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); +# define GL_EXT_bindable_uniform 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformBufferEXT( GLuint program, GLint location, GLuint buffer ); +GLAPI GLint APIENTRY glGetUniformBufferSizeEXT( GLuint program, GLint location ); +GLAPI GLintptr APIENTRY glGetUniformOffsetEXT( GLuint program, GLint location ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLUNIFORMBUFFEREXTPROC )( GLuint program, GLint location, GLuint buffer ); +typedef GLint( APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC )( GLuint program, GLint location ); +typedef GLintptr( APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC )( GLuint program, GLint location ); #endif #ifndef GL_EXT_texture_integer -#define GL_EXT_texture_integer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha); -GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); -typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); +# define GL_EXT_texture_integer 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexParameterIivEXT( GLenum target, GLenum pname, const GLint *params ); +GLAPI void APIENTRY glTexParameterIuivEXT( GLenum target, GLenum pname, const GLuint *params ); +GLAPI void APIENTRY glGetTexParameterIivEXT( GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetTexParameterIuivEXT( GLenum target, GLenum pname, GLuint *params ); +GLAPI void APIENTRY glClearColorIiEXT( GLint red, GLint green, GLint blue, GLint alpha ); +GLAPI void APIENTRY glClearColorIuiEXT( GLuint red, GLuint green, GLuint blue, GLuint alpha ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC )( GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC )( GLenum target, GLenum pname, + const GLuint *params ); +typedef void( APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC )( GLenum target, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC )( GLenum target, GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLCLEARCOLORIIEXTPROC )( GLint red, GLint green, GLint blue, GLint alpha ); +typedef void( APIENTRYP PFNGLCLEARCOLORIUIEXTPROC )( GLuint red, GLuint green, GLuint blue, + GLuint alpha ); #endif #ifndef GL_GREMEDY_frame_terminator -#define GL_GREMEDY_frame_terminator 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFrameTerminatorGREMEDY (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void); +# define GL_GREMEDY_frame_terminator 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFrameTerminatorGREMEDY( void ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC )( void ); #endif #ifndef GL_NV_conditional_render -#define GL_NV_conditional_render 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); -GLAPI void APIENTRY glEndConditionalRenderNV (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); +# define GL_NV_conditional_render 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginConditionalRenderNV( GLuint id, GLenum mode ); +GLAPI void APIENTRY glEndConditionalRenderNV( void ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC )( GLuint id, GLenum mode ); +typedef void( APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC )( void ); #endif #ifndef GL_NV_present_video -#define GL_NV_present_video 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); -GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); -GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params); -GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); -typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); -typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params); +# define GL_NV_present_video 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPresentFrameKeyedNV( GLuint video_slot, GLuint64EXT minPresentTime, + GLuint beginPresentTimeId, GLuint presentDurationId, + GLenum type, GLenum target0, GLuint fill0, GLuint key0, + GLenum target1, GLuint fill1, GLuint key1 ); +GLAPI void APIENTRY glPresentFrameDualFillNV( GLuint video_slot, GLuint64EXT minPresentTime, + GLuint beginPresentTimeId, GLuint presentDurationId, + GLenum type, GLenum target0, GLuint fill0, GLenum target1, + GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, + GLuint fill3 ); +GLAPI void APIENTRY glGetVideoivNV( GLuint video_slot, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetVideouivNV( GLuint video_slot, GLenum pname, GLuint *params ); +GLAPI void APIENTRY glGetVideoi64vNV( GLuint video_slot, GLenum pname, GLint64EXT *params ); +GLAPI void APIENTRY glGetVideoui64vNV( GLuint video_slot, GLenum pname, GLuint64EXT *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC )( GLuint video_slot, GLuint64EXT minPresentTime, + GLuint beginPresentTimeId, + GLuint presentDurationId, GLenum type, + GLenum target0, GLuint fill0, GLuint key0, + GLenum target1, GLuint fill1, GLuint key1 ); +typedef void( APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC )( GLuint video_slot, GLuint64EXT minPresentTime, + GLuint beginPresentTimeId, + GLuint presentDurationId, GLenum type, + GLenum target0, GLuint fill0, GLenum target1, + GLuint fill1, GLenum target2, GLuint fill2, + GLenum target3, GLuint fill3 ); +typedef void( APIENTRYP PFNGLGETVIDEOIVNVPROC )( GLuint video_slot, GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETVIDEOUIVNVPROC )( GLuint video_slot, GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLGETVIDEOI64VNVPROC )( GLuint video_slot, GLenum pname, GLint64EXT *params ); +typedef void( APIENTRYP PFNGLGETVIDEOUI64VNVPROC )( GLuint video_slot, GLenum pname, + GLuint64EXT *params ); #endif #ifndef GL_EXT_transform_feedback -#define GL_EXT_transform_feedback 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedbackEXT (void); -GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); -GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +# define GL_EXT_transform_feedback 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackEXT( GLenum primitiveMode ); +GLAPI void APIENTRY glEndTransformFeedbackEXT( void ); +GLAPI void APIENTRY glBindBufferRangeEXT( GLenum target, GLuint index, GLuint buffer, GLintptr offset, + GLsizeiptr size ); +GLAPI void APIENTRY glBindBufferOffsetEXT( GLenum target, GLuint index, GLuint buffer, GLintptr offset ); +GLAPI void APIENTRY glBindBufferBaseEXT( GLenum target, GLuint index, GLuint buffer ); +GLAPI void APIENTRY glTransformFeedbackVaryingsEXT( GLuint program, GLsizei count, + const GLchar **varyings, GLenum bufferMode ); +GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT( GLuint program, GLuint index, GLsizei bufSize, + GLsizei *length, GLsizei *size, GLenum *type, + GLchar *name ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC )( GLenum primitiveMode ); +typedef void( APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC )( void ); +typedef void( APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC )( GLenum target, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size ); +typedef void( APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC )( GLenum target, GLuint index, GLuint buffer, + GLintptr offset ); +typedef void( APIENTRYP PFNGLBINDBUFFERBASEEXTPROC )( GLenum target, GLuint index, GLuint buffer ); +typedef void( APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC )( GLuint program, GLsizei count, + const GLchar **varyings, + GLenum bufferMode ); +typedef void( APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC )( GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, + GLsizei *size, GLenum *type, + GLchar *name ); #endif #ifndef GL_EXT_direct_state_access -#define GL_EXT_direct_state_access 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask); -GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask); -GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode); -GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glMatrixPopEXT (GLenum mode); -GLAPI void APIENTRY glMatrixPushEXT (GLenum mode); -GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); -GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); -GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); -GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); -GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); -GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); -GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, GLvoid* *data); -GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, GLvoid *img); -GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, GLvoid *img); -GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); -GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, GLvoid *string); -GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); -GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); -GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); -GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); -GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); -GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); -GLAPI GLvoid* APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access); -GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer); -GLAPI GLvoid* APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, GLvoid* *params); -GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); -GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); -GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); -GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target); -GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); -GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); -GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); -GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); -GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); -GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); -GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); -typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); -typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); -typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); -typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); -typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); -typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); -typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); -typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); -typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); -typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); -typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +# define GL_EXT_direct_state_access 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClientAttribDefaultEXT( GLbitfield mask ); +GLAPI void APIENTRY glPushClientAttribDefaultEXT( GLbitfield mask ); +GLAPI void APIENTRY glMatrixLoadfEXT( GLenum mode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixLoaddEXT( GLenum mode, const GLdouble *m ); +GLAPI void APIENTRY glMatrixMultfEXT( GLenum mode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixMultdEXT( GLenum mode, const GLdouble *m ); +GLAPI void APIENTRY glMatrixLoadIdentityEXT( GLenum mode ); +GLAPI void APIENTRY glMatrixRotatefEXT( GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glMatrixRotatedEXT( GLenum mode, GLdouble angle, GLdouble x, GLdouble y, + GLdouble z ); +GLAPI void APIENTRY glMatrixScalefEXT( GLenum mode, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glMatrixScaledEXT( GLenum mode, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glMatrixTranslatefEXT( GLenum mode, GLfloat x, GLfloat y, GLfloat z ); +GLAPI void APIENTRY glMatrixTranslatedEXT( GLenum mode, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glMatrixFrustumEXT( GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, + GLdouble top, GLdouble zNear, GLdouble zFar ); +GLAPI void APIENTRY glMatrixOrthoEXT( GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, + GLdouble top, GLdouble zNear, GLdouble zFar ); +GLAPI void APIENTRY glMatrixPopEXT( GLenum mode ); +GLAPI void APIENTRY glMatrixPushEXT( GLenum mode ); +GLAPI void APIENTRY glMatrixLoadTransposefEXT( GLenum mode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixLoadTransposedEXT( GLenum mode, const GLdouble *m ); +GLAPI void APIENTRY glMatrixMultTransposefEXT( GLenum mode, const GLfloat *m ); +GLAPI void APIENTRY glMatrixMultTransposedEXT( GLenum mode, const GLdouble *m ); +GLAPI void APIENTRY glTextureParameterfEXT( GLuint texture, GLenum target, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glTextureParameterfvEXT( GLuint texture, GLenum target, GLenum pname, + const GLfloat *params ); +GLAPI void APIENTRY glTextureParameteriEXT( GLuint texture, GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glTextureParameterivEXT( GLuint texture, GLenum target, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glTextureImage1DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLint border, + GLenum format, GLenum type, const GLvoid *pixels ); +GLAPI void APIENTRY glTextureImage2DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); +GLAPI void APIENTRY glTextureSubImage1DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLenum type, + const GLvoid *pixels ); +GLAPI void APIENTRY glTextureSubImage2DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *pixels ); +GLAPI void APIENTRY glCopyTextureImage1DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLint border ); +GLAPI void APIENTRY glCopyTextureImage2DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLsizei height, GLint border ); +GLAPI void APIENTRY glCopyTextureSubImage1DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, GLsizei width ); +GLAPI void APIENTRY glCopyTextureSubImage2DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glGetTextureImageEXT( GLuint texture, GLenum target, GLint level, GLenum format, + GLenum type, GLvoid *pixels ); +GLAPI void APIENTRY glGetTextureParameterfvEXT( GLuint texture, GLenum target, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetTextureParameterivEXT( GLuint texture, GLenum target, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetTextureLevelParameterfvEXT( GLuint texture, GLenum target, GLint level, + GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetTextureLevelParameterivEXT( GLuint texture, GLenum target, GLint level, + GLenum pname, GLint *params ); +GLAPI void APIENTRY glTextureImage3DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); +GLAPI void APIENTRY glTextureSubImage3DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, + const GLvoid *pixels ); +GLAPI void APIENTRY glCopyTextureSubImage3DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLint x, + GLint y, GLsizei width, GLsizei height ); +GLAPI void APIENTRY glMultiTexParameterfEXT( GLenum texunit, GLenum target, GLenum pname, + GLfloat param ); +GLAPI void APIENTRY glMultiTexParameterfvEXT( GLenum texunit, GLenum target, GLenum pname, + const GLfloat *params ); +GLAPI void APIENTRY glMultiTexParameteriEXT( GLenum texunit, GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glMultiTexParameterivEXT( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glMultiTexImage1DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLint border, + GLenum format, GLenum type, const GLvoid *pixels ); +GLAPI void APIENTRY glMultiTexImage2DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); +GLAPI void APIENTRY glMultiTexSubImage1DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, + GLsizei width, GLenum format, GLenum type, + const GLvoid *pixels ); +GLAPI void APIENTRY glMultiTexSubImage2DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *pixels ); +GLAPI void APIENTRY glCopyMultiTexImage1DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLint border ); +GLAPI void APIENTRY glCopyMultiTexImage2DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLsizei height, GLint border ); +GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, GLsizei width ); +GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glGetMultiTexImageEXT( GLenum texunit, GLenum target, GLint level, GLenum format, + GLenum type, GLvoid *pixels ); +GLAPI void APIENTRY glGetMultiTexParameterfvEXT( GLenum texunit, GLenum target, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetMultiTexParameterivEXT( GLenum texunit, GLenum target, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT( GLenum texunit, GLenum target, GLint level, + GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT( GLenum texunit, GLenum target, GLint level, + GLenum pname, GLint *params ); +GLAPI void APIENTRY glMultiTexImage3DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); +GLAPI void APIENTRY glMultiTexSubImage3DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, + const GLvoid *pixels ); +GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLint x, + GLint y, GLsizei width, GLsizei height ); +GLAPI void APIENTRY glBindMultiTextureEXT( GLenum texunit, GLenum target, GLuint texture ); +GLAPI void APIENTRY glEnableClientStateIndexedEXT( GLenum array, GLuint index ); +GLAPI void APIENTRY glDisableClientStateIndexedEXT( GLenum array, GLuint index ); +GLAPI void APIENTRY glMultiTexCoordPointerEXT( GLenum texunit, GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); +GLAPI void APIENTRY glMultiTexEnvfEXT( GLenum texunit, GLenum target, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glMultiTexEnvfvEXT( GLenum texunit, GLenum target, GLenum pname, + const GLfloat *params ); +GLAPI void APIENTRY glMultiTexEnviEXT( GLenum texunit, GLenum target, GLenum pname, GLint param ); +GLAPI void APIENTRY glMultiTexEnvivEXT( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glMultiTexGendEXT( GLenum texunit, GLenum coord, GLenum pname, GLdouble param ); +GLAPI void APIENTRY glMultiTexGendvEXT( GLenum texunit, GLenum coord, GLenum pname, + const GLdouble *params ); +GLAPI void APIENTRY glMultiTexGenfEXT( GLenum texunit, GLenum coord, GLenum pname, GLfloat param ); +GLAPI void APIENTRY glMultiTexGenfvEXT( GLenum texunit, GLenum coord, GLenum pname, + const GLfloat *params ); +GLAPI void APIENTRY glMultiTexGeniEXT( GLenum texunit, GLenum coord, GLenum pname, GLint param ); +GLAPI void APIENTRY glMultiTexGenivEXT( GLenum texunit, GLenum coord, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glGetMultiTexEnvfvEXT( GLenum texunit, GLenum target, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetMultiTexEnvivEXT( GLenum texunit, GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetMultiTexGendvEXT( GLenum texunit, GLenum coord, GLenum pname, + GLdouble *params ); +GLAPI void APIENTRY glGetMultiTexGenfvEXT( GLenum texunit, GLenum coord, GLenum pname, GLfloat *params ); +GLAPI void APIENTRY glGetMultiTexGenivEXT( GLenum texunit, GLenum coord, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetFloatIndexedvEXT( GLenum target, GLuint index, GLfloat *data ); +GLAPI void APIENTRY glGetDoubleIndexedvEXT( GLenum target, GLuint index, GLdouble *data ); +GLAPI void APIENTRY glGetPointerIndexedvEXT( GLenum target, GLuint index, GLvoid **data ); +GLAPI void APIENTRY glCompressedTextureImage3DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLsizei imageSize, + const GLvoid *bits ); +GLAPI void APIENTRY glCompressedTextureImage2DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLint border, GLsizei imageSize, const GLvoid *bits ); +GLAPI void APIENTRY glCompressedTextureImage1DEXT( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLint border, + GLsizei imageSize, const GLvoid *bits ); +GLAPI void APIENTRY glCompressedTextureSubImage3DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, + const GLvoid *bits ); +GLAPI void APIENTRY glCompressedTextureSubImage2DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLsizei imageSize, + const GLvoid *bits ); +GLAPI void APIENTRY glCompressedTextureSubImage1DEXT( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLsizei width, GLenum format, + GLsizei imageSize, const GLvoid *bits ); +GLAPI void APIENTRY glGetCompressedTextureImageEXT( GLuint texture, GLenum target, GLint lod, + GLvoid *img ); +GLAPI void APIENTRY glCompressedMultiTexImage3DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLsizei imageSize, + const GLvoid *bits ); +GLAPI void APIENTRY glCompressedMultiTexImage2DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, + GLint border, GLsizei imageSize, + const GLvoid *bits ); +GLAPI void APIENTRY glCompressedMultiTexImage1DEXT( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLint border, + GLsizei imageSize, const GLvoid *bits ); +GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, + const GLvoid *bits ); +GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLsizei imageSize, + const GLvoid *bits ); +GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLsizei width, GLenum format, + GLsizei imageSize, const GLvoid *bits ); +GLAPI void APIENTRY glGetCompressedMultiTexImageEXT( GLenum texunit, GLenum target, GLint lod, + GLvoid *img ); +GLAPI void APIENTRY glNamedProgramStringEXT( GLuint program, GLenum target, GLenum format, GLsizei len, + const GLvoid *string ); +GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT( GLuint program, GLenum target, GLuint index, + GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT( GLuint program, GLenum target, GLuint index, + const GLdouble *params ); +GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT( GLuint program, GLenum target, GLuint index, + GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT( GLuint program, GLenum target, GLuint index, + const GLfloat *params ); +GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT( GLuint program, GLenum target, GLuint index, + GLdouble *params ); +GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT( GLuint program, GLenum target, GLuint index, + GLfloat *params ); +GLAPI void APIENTRY glGetNamedProgramivEXT( GLuint program, GLenum target, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetNamedProgramStringEXT( GLuint program, GLenum target, GLenum pname, + GLvoid *string ); +GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT( GLuint program, GLenum target, GLuint index, + GLsizei count, const GLfloat *params ); +GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT( GLuint program, GLenum target, GLuint index, + GLint x, GLint y, GLint z, GLint w ); +GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT( GLuint program, GLenum target, GLuint index, + const GLint *params ); +GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT( GLuint program, GLenum target, GLuint index, + GLsizei count, const GLint *params ); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT( GLuint program, GLenum target, GLuint index, + GLuint x, GLuint y, GLuint z, GLuint w ); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT( GLuint program, GLenum target, GLuint index, + const GLuint *params ); +GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT( GLuint program, GLenum target, GLuint index, + GLsizei count, const GLuint *params ); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT( GLuint program, GLenum target, GLuint index, + GLint *params ); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT( GLuint program, GLenum target, GLuint index, + GLuint *params ); +GLAPI void APIENTRY glTextureParameterIivEXT( GLuint texture, GLenum target, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glTextureParameterIuivEXT( GLuint texture, GLenum target, GLenum pname, + const GLuint *params ); +GLAPI void APIENTRY glGetTextureParameterIivEXT( GLuint texture, GLenum target, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetTextureParameterIuivEXT( GLuint texture, GLenum target, GLenum pname, + GLuint *params ); +GLAPI void APIENTRY glMultiTexParameterIivEXT( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +GLAPI void APIENTRY glMultiTexParameterIuivEXT( GLenum texunit, GLenum target, GLenum pname, + const GLuint *params ); +GLAPI void APIENTRY glGetMultiTexParameterIivEXT( GLenum texunit, GLenum target, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetMultiTexParameterIuivEXT( GLenum texunit, GLenum target, GLenum pname, + GLuint *params ); +GLAPI void APIENTRY glProgramUniform1fEXT( GLuint program, GLint location, GLfloat v0 ); +GLAPI void APIENTRY glProgramUniform2fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1 ); +GLAPI void APIENTRY glProgramUniform3fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1, + GLfloat v2 ); +GLAPI void APIENTRY glProgramUniform4fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1, + GLfloat v2, GLfloat v3 ); +GLAPI void APIENTRY glProgramUniform1iEXT( GLuint program, GLint location, GLint v0 ); +GLAPI void APIENTRY glProgramUniform2iEXT( GLuint program, GLint location, GLint v0, GLint v1 ); +GLAPI void APIENTRY glProgramUniform3iEXT( GLuint program, GLint location, GLint v0, GLint v1, + GLint v2 ); +GLAPI void APIENTRY glProgramUniform4iEXT( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, + GLint v3 ); +GLAPI void APIENTRY glProgramUniform1fvEXT( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform2fvEXT( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform3fvEXT( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform4fvEXT( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform1ivEXT( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform2ivEXT( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform3ivEXT( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniform4ivEXT( GLuint program, GLint location, GLsizei count, + const GLint *value ); +GLAPI void APIENTRY glProgramUniformMatrix2fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value ); +GLAPI void APIENTRY glProgramUniform1uiEXT( GLuint program, GLint location, GLuint v0 ); +GLAPI void APIENTRY glProgramUniform2uiEXT( GLuint program, GLint location, GLuint v0, GLuint v1 ); +GLAPI void APIENTRY glProgramUniform3uiEXT( GLuint program, GLint location, GLuint v0, GLuint v1, + GLuint v2 ); +GLAPI void APIENTRY glProgramUniform4uiEXT( GLuint program, GLint location, GLuint v0, GLuint v1, + GLuint v2, GLuint v3 ); +GLAPI void APIENTRY glProgramUniform1uivEXT( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform2uivEXT( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform3uivEXT( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glProgramUniform4uivEXT( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +GLAPI void APIENTRY glNamedBufferDataEXT( GLuint buffer, GLsizeiptr size, const GLvoid *data, + GLenum usage ); +GLAPI void APIENTRY glNamedBufferSubDataEXT( GLuint buffer, GLintptr offset, GLsizeiptr size, + const GLvoid *data ); +GLAPI GLvoid *APIENTRY glMapNamedBufferEXT( GLuint buffer, GLenum access ); +GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT( GLuint buffer ); +GLAPI GLvoid *APIENTRY glMapNamedBufferRangeEXT( GLuint buffer, GLintptr offset, GLsizeiptr length, + GLbitfield access ); +GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT( GLuint buffer, GLintptr offset, + GLsizeiptr length ); +GLAPI void APIENTRY glNamedCopyBufferSubDataEXT( GLuint readBuffer, GLuint writeBuffer, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size ); +GLAPI void APIENTRY glGetNamedBufferParameterivEXT( GLuint buffer, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetNamedBufferPointervEXT( GLuint buffer, GLenum pname, GLvoid **params ); +GLAPI void APIENTRY glGetNamedBufferSubDataEXT( GLuint buffer, GLintptr offset, GLsizeiptr size, + GLvoid *data ); +GLAPI void APIENTRY glTextureBufferEXT( GLuint texture, GLenum target, GLenum internalformat, + GLuint buffer ); +GLAPI void APIENTRY glMultiTexBufferEXT( GLenum texunit, GLenum target, GLenum internalformat, + GLuint buffer ); +GLAPI void APIENTRY glNamedRenderbufferStorageEXT( GLuint renderbuffer, GLenum internalformat, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT( GLuint renderbuffer, GLenum pname, + GLint *params ); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT( GLuint framebuffer, GLenum target ); +GLAPI void APIENTRY glNamedFramebufferTexture1DEXT( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, GLint level ); +GLAPI void APIENTRY glNamedFramebufferTexture2DEXT( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, GLint level ); +GLAPI void APIENTRY glNamedFramebufferTexture3DEXT( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, GLint level, + GLint zoffset ); +GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT( GLuint framebuffer, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer ); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT( GLuint framebuffer, GLenum attachment, + GLenum pname, GLint *params ); +GLAPI void APIENTRY glGenerateTextureMipmapEXT( GLuint texture, GLenum target ); +GLAPI void APIENTRY glGenerateMultiTexMipmapEXT( GLenum texunit, GLenum target ); +GLAPI void APIENTRY glFramebufferDrawBufferEXT( GLuint framebuffer, GLenum mode ); +GLAPI void APIENTRY glFramebufferDrawBuffersEXT( GLuint framebuffer, GLsizei n, const GLenum *bufs ); +GLAPI void APIENTRY glFramebufferReadBufferEXT( GLuint framebuffer, GLenum mode ); +GLAPI void APIENTRY glGetFramebufferParameterivEXT( GLuint framebuffer, GLenum pname, GLint *params ); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT( GLuint renderbuffer, GLsizei samples, + GLenum internalformat, GLsizei width, + GLsizei height ); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT( GLuint renderbuffer, + GLsizei coverageSamples, + GLsizei colorSamples, + GLenum internalformat, + GLsizei width, GLsizei height ); +GLAPI void APIENTRY glNamedFramebufferTextureEXT( GLuint framebuffer, GLenum attachment, GLuint texture, + GLint level ); +GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT( GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level, GLint layer ); +GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT( GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level, GLenum face ); +GLAPI void APIENTRY glTextureRenderbufferEXT( GLuint texture, GLenum target, GLuint renderbuffer ); +GLAPI void APIENTRY glMultiTexRenderbufferEXT( GLenum texunit, GLenum target, GLuint renderbuffer ); +GLAPI void APIENTRY glProgramUniform1dEXT( GLuint program, GLint location, GLdouble x ); +GLAPI void APIENTRY glProgramUniform2dEXT( GLuint program, GLint location, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glProgramUniform3dEXT( GLuint program, GLint location, GLdouble x, GLdouble y, + GLdouble z ); +GLAPI void APIENTRY glProgramUniform4dEXT( GLuint program, GLint location, GLdouble x, GLdouble y, + GLdouble z, GLdouble w ); +GLAPI void APIENTRY glProgramUniform1dvEXT( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform2dvEXT( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform3dvEXT( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniform4dvEXT( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix2dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT( GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLdouble *value ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC )( GLbitfield mask ); +typedef void( APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC )( GLbitfield mask ); +typedef void( APIENTRYP PFNGLMATRIXLOADFEXTPROC )( GLenum mode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXLOADDEXTPROC )( GLenum mode, const GLdouble *m ); +typedef void( APIENTRYP PFNGLMATRIXMULTFEXTPROC )( GLenum mode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXMULTDEXTPROC )( GLenum mode, const GLdouble *m ); +typedef void( APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC )( GLenum mode ); +typedef void( APIENTRYP PFNGLMATRIXROTATEFEXTPROC )( GLenum mode, GLfloat angle, GLfloat x, GLfloat y, + GLfloat z ); +typedef void( APIENTRYP PFNGLMATRIXROTATEDEXTPROC )( GLenum mode, GLdouble angle, GLdouble x, GLdouble y, + GLdouble z ); +typedef void( APIENTRYP PFNGLMATRIXSCALEFEXTPROC )( GLenum mode, GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLMATRIXSCALEDEXTPROC )( GLenum mode, GLdouble x, GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC )( GLenum mode, GLfloat x, GLfloat y, GLfloat z ); +typedef void( APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC )( GLenum mode, GLdouble x, GLdouble y, + GLdouble z ); +typedef void( APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC )( GLenum mode, GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, GLdouble zNear, + GLdouble zFar ); +typedef void( APIENTRYP PFNGLMATRIXORTHOEXTPROC )( GLenum mode, GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, GLdouble zNear, + GLdouble zFar ); +typedef void( APIENTRYP PFNGLMATRIXPOPEXTPROC )( GLenum mode ); +typedef void( APIENTRYP PFNGLMATRIXPUSHEXTPROC )( GLenum mode ); +typedef void( APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC )( GLenum mode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC )( GLenum mode, const GLdouble *m ); +typedef void( APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC )( GLenum mode, const GLfloat *m ); +typedef void( APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC )( GLenum mode, const GLdouble *m ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC )( GLuint texture, GLenum target, GLenum pname, + GLfloat param ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC )( GLuint texture, GLenum target, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLint border, + GLenum format, GLenum type, const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLint border, GLenum format, + GLenum type, const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLsizei width, GLenum format, + GLenum type, const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLenum type, + const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLint border ); +typedef void( APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLsizei height, GLint border ); +typedef void( APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width ); +typedef void( APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, + GLint y, GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC )( GLuint texture, GLenum target, GLint level, + GLenum format, GLenum type, GLvoid *pixels ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC )( GLuint texture, GLenum target, + GLint level, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC )( GLuint texture, GLenum target, + GLint level, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, + GLenum format, GLenum type, const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, + const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC )( GLuint texture, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLint x, GLint y, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLfloat param ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLint border, GLenum format, + GLenum type, const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLsizei width, GLenum format, + GLenum type, const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLenum type, + const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLint border ); +typedef void( APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, + GLsizei width, GLsizei height, GLint border ); +typedef void( APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width ); +typedef void( APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, + GLint y, GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLenum format, GLenum type, GLvoid *pixels ); +typedef void( APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC )( GLenum texunit, GLenum target, + GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC )( GLenum texunit, GLenum target, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, + const GLvoid *pixels ); +typedef void( APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC )( GLenum texunit, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, GLint y, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC )( GLenum texunit, GLenum target, GLuint texture ); +typedef void( APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC )( GLenum array, GLuint index ); +typedef void( APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC )( GLenum array, GLuint index ); +typedef void( APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC )( GLenum texunit, GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLMULTITEXENVFEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLfloat param ); +typedef void( APIENTRYP PFNGLMULTITEXENVFVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLMULTITEXENVIEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLMULTITEXENVIVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLMULTITEXGENDEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLdouble param ); +typedef void( APIENTRYP PFNGLMULTITEXGENDVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + const GLdouble *params ); +typedef void( APIENTRYP PFNGLMULTITEXGENFEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLfloat param ); +typedef void( APIENTRYP PFNGLMULTITEXGENFVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLMULTITEXGENIEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLint param ); +typedef void( APIENTRYP PFNGLMULTITEXGENIVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLdouble *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLfloat *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC )( GLenum texunit, GLenum coord, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC )( GLenum target, GLuint index, GLfloat *data ); +typedef void( APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC )( GLenum target, GLuint index, GLdouble *data ); +typedef void( APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC )( GLenum target, GLuint index, GLvoid **data ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC )( GLuint texture, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLsizei height, + GLsizei depth, GLint border, + GLsizei imageSize, const GLvoid *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC )( GLuint texture, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLsizei height, + GLint border, GLsizei imageSize, + const GLvoid *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC )( GLuint texture, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLint border, + GLsizei imageSize, const GLvoid *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC )( + GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC )( + GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC )( GLuint texture, GLenum target, + GLint level, GLint xoffset, + GLsizei width, GLenum format, + GLsizei imageSize, + const GLvoid *bits ); +typedef void( APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC )( GLuint texture, GLenum target, + GLint lod, GLvoid *img ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLsizei height, + GLsizei depth, GLint border, + GLsizei imageSize, const GLvoid *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLsizei height, + GLint border, GLsizei imageSize, + const GLvoid *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLenum internalformat, + GLsizei width, GLint border, + GLsizei imageSize, const GLvoid *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC )( + GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC )( + GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits ); +typedef void( APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC )( GLenum texunit, GLenum target, + GLint level, GLint xoffset, + GLsizei width, GLenum format, + GLsizei imageSize, + const GLvoid *bits ); +typedef void( APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC )( GLenum texunit, GLenum target, + GLint lod, GLvoid *img ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC )( GLuint program, GLenum target, GLenum format, + GLsizei len, const GLvoid *string ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC )( GLuint program, GLenum target, + GLuint index, GLdouble x, GLdouble y, + GLdouble z, GLdouble w ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC )( GLuint program, GLenum target, + GLuint index, + const GLdouble *params ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC )( GLuint program, GLenum target, + GLuint index, GLfloat x, GLfloat y, + GLfloat z, GLfloat w ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC )( GLuint program, GLenum target, + GLuint index, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLdouble *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC )( GLuint program, GLenum target, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC )( GLuint program, GLenum target, GLenum pname, + GLvoid *string ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLsizei count, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC )( GLuint program, GLenum target, + GLuint index, GLint x, GLint y, + GLint z, GLint w ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC )( GLuint program, GLenum target, + GLuint index, + const GLint *params ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLsizei count, + const GLint *params ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC )( GLuint program, GLenum target, + GLuint index, GLuint x, GLuint y, + GLuint z, GLuint w ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC )( GLuint program, GLenum target, + GLuint index, + const GLuint *params ); +typedef void( APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLsizei count, + const GLuint *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLint *params ); +typedef void( APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC )( GLuint program, GLenum target, + GLuint index, GLuint *params ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC )( GLuint texture, GLenum target, GLenum pname, + const GLuint *params ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC )( GLuint texture, GLenum target, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC )( GLuint texture, GLenum target, + GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC )( GLenum texunit, GLenum target, GLenum pname, + const GLuint *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC )( GLenum texunit, GLenum target, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC )( GLenum texunit, GLenum target, + GLenum pname, GLuint *params ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC )( GLuint program, GLint location, GLfloat v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC )( GLuint program, GLint location, GLfloat v0, + GLfloat v1, GLfloat v2, GLfloat v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC )( GLuint program, GLint location, GLint v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC )( GLuint program, GLint location, GLint v0, + GLint v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC )( GLuint program, GLint location, GLint v0, + GLint v1, GLint v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC )( GLuint program, GLint location, GLint v0, + GLint v1, GLint v2, GLint v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLfloat *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC )( GLuint program, GLint location, GLuint v0 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC )( GLuint program, GLint location, GLuint v0, + GLuint v1, GLuint v2, GLuint v3 ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLuint *value ); +typedef void( APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC )( GLuint buffer, GLsizeiptr size, + const GLvoid *data, GLenum usage ); +typedef void( APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr size, const GLvoid *data ); +typedef GLvoid *( APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC )( GLuint buffer, GLenum access ); +typedef GLboolean( APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC )( GLuint buffer ); +typedef GLvoid *( APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr length, GLbitfield access ); +typedef void( APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr length ); +typedef void( APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC )( GLuint readBuffer, GLuint writeBuffer, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC )( GLuint buffer, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC )( GLuint buffer, GLenum pname, + GLvoid **params ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC )( GLuint buffer, GLintptr offset, + GLsizeiptr size, GLvoid *data ); +typedef void( APIENTRYP PFNGLTEXTUREBUFFEREXTPROC )( GLuint texture, GLenum target, + GLenum internalformat, GLuint buffer ); +typedef void( APIENTRYP PFNGLMULTITEXBUFFEREXTPROC )( GLenum texunit, GLenum target, + GLenum internalformat, GLuint buffer ); +typedef void( APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC )( GLuint renderbuffer, + GLenum internalformat, GLsizei width, + GLsizei height ); +typedef void( APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC )( GLuint renderbuffer, GLenum pname, + GLint *params ); +typedef GLenum( APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC )( GLuint framebuffer, GLenum target ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC )( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC )( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC )( GLuint framebuffer, GLenum attachment, + GLenum textarget, GLuint texture, + GLint level, GLint zoffset ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC )( GLuint framebuffer, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC )( GLuint framebuffer, + GLenum attachment, + GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC )( GLuint texture, GLenum target ); +typedef void( APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC )( GLenum texunit, GLenum target ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC )( GLuint framebuffer, GLenum mode ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC )( GLuint framebuffer, GLsizei n, + const GLenum *bufs ); +typedef void( APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC )( GLuint framebuffer, GLenum mode ); +typedef void( APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC )( GLuint framebuffer, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC )( + GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC )( + GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, + GLsizei width, GLsizei height ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC )( GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC )( GLuint framebuffer, + GLenum attachment, GLuint texture, + GLint level, GLint layer ); +typedef void( APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC )( GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level, + GLenum face ); +typedef void( APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC )( GLuint texture, GLenum target, + GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC )( GLenum texunit, GLenum target, + GLuint renderbuffer ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC )( GLuint program, GLint location, GLdouble x ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC )( GLuint program, GLint location, GLdouble x, + GLdouble y ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC )( GLuint program, GLint location, GLdouble x, + GLdouble y, GLdouble z ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC )( GLuint program, GLint location, GLdouble x, + GLdouble y, GLdouble z, GLdouble w ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC )( GLuint program, GLint location, GLsizei count, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC )( GLuint program, GLint location, + GLsizei count, GLboolean transpose, + const GLdouble *value ); #endif #ifndef GL_EXT_vertex_array_bgra -#define GL_EXT_vertex_array_bgra 1 +# define GL_EXT_vertex_array_bgra 1 #endif #ifndef GL_EXT_texture_swizzle -#define GL_EXT_texture_swizzle 1 +# define GL_EXT_texture_swizzle 1 #endif #ifndef GL_NV_explicit_multisample -#define GL_NV_explicit_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val); -GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask); -GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); -typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); +# define GL_NV_explicit_multisample 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetMultisamplefvNV( GLenum pname, GLuint index, GLfloat *val ); +GLAPI void APIENTRY glSampleMaskIndexedNV( GLuint index, GLbitfield mask ); +GLAPI void APIENTRY glTexRenderbufferNV( GLenum target, GLuint renderbuffer ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC )( GLenum pname, GLuint index, GLfloat *val ); +typedef void( APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC )( GLuint index, GLbitfield mask ); +typedef void( APIENTRYP PFNGLTEXRENDERBUFFERNVPROC )( GLenum target, GLuint renderbuffer ); #endif #ifndef GL_NV_transform_feedback2 -#define GL_NV_transform_feedback2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids); -GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids); -GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id); -GLAPI void APIENTRY glPauseTransformFeedbackNV (void); -GLAPI void APIENTRY glResumeTransformFeedbackNV (void); -GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); -typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); +# define GL_NV_transform_feedback2 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindTransformFeedbackNV( GLenum target, GLuint id ); +GLAPI void APIENTRY glDeleteTransformFeedbacksNV( GLsizei n, const GLuint *ids ); +GLAPI void APIENTRY glGenTransformFeedbacksNV( GLsizei n, GLuint *ids ); +GLAPI GLboolean APIENTRY glIsTransformFeedbackNV( GLuint id ); +GLAPI void APIENTRY glPauseTransformFeedbackNV( void ); +GLAPI void APIENTRY glResumeTransformFeedbackNV( void ); +GLAPI void APIENTRY glDrawTransformFeedbackNV( GLenum mode, GLuint id ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC )( GLenum target, GLuint id ); +typedef void( APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC )( GLsizei n, const GLuint *ids ); +typedef void( APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC )( GLsizei n, GLuint *ids ); +typedef GLboolean( APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC )( GLuint id ); +typedef void( APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC )( void ); +typedef void( APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC )( void ); +typedef void( APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC )( GLenum mode, GLuint id ); #endif #ifndef GL_ATI_meminfo -#define GL_ATI_meminfo 1 +# define GL_ATI_meminfo 1 #endif #ifndef GL_AMD_performance_monitor -#define GL_AMD_performance_monitor 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); -GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); -GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor); -GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor); -GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); -typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +# define GL_AMD_performance_monitor 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetPerfMonitorGroupsAMD( GLint *numGroups, GLsizei groupsSize, GLuint *groups ); +GLAPI void APIENTRY glGetPerfMonitorCountersAMD( GLuint group, GLint *numCounters, + GLint *maxActiveCounters, GLsizei counterSize, + GLuint *counters ); +GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD( GLuint group, GLsizei bufSize, GLsizei *length, + GLchar *groupString ); +GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD( GLuint group, GLuint counter, GLsizei bufSize, + GLsizei *length, GLchar *counterString ); +GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD( GLuint group, GLuint counter, GLenum pname, + GLvoid *data ); +GLAPI void APIENTRY glGenPerfMonitorsAMD( GLsizei n, GLuint *monitors ); +GLAPI void APIENTRY glDeletePerfMonitorsAMD( GLsizei n, GLuint *monitors ); +GLAPI void APIENTRY glSelectPerfMonitorCountersAMD( GLuint monitor, GLboolean enable, GLuint group, + GLint numCounters, GLuint *counterList ); +GLAPI void APIENTRY glBeginPerfMonitorAMD( GLuint monitor ); +GLAPI void APIENTRY glEndPerfMonitorAMD( GLuint monitor ); +GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD( GLuint monitor, GLenum pname, GLsizei dataSize, + GLuint *data, GLint *bytesWritten ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC )( GLint *numGroups, GLsizei groupsSize, + GLuint *groups ); +typedef void( APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC )( GLuint group, GLint *numCounters, + GLint * maxActiveCounters, + GLsizei counterSize, GLuint *counters ); +typedef void( APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC )( GLuint group, GLsizei bufSize, + GLsizei *length, GLchar *groupString ); +typedef void( APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC )( GLuint group, GLuint counter, + GLsizei bufSize, GLsizei *length, + GLchar *counterString ); +typedef void( APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC )( GLuint group, GLuint counter, + GLenum pname, GLvoid *data ); +typedef void( APIENTRYP PFNGLGENPERFMONITORSAMDPROC )( GLsizei n, GLuint *monitors ); +typedef void( APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC )( GLsizei n, GLuint *monitors ); +typedef void( APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC )( GLuint monitor, GLboolean enable, + GLuint group, GLint numCounters, + GLuint *counterList ); +typedef void( APIENTRYP PFNGLBEGINPERFMONITORAMDPROC )( GLuint monitor ); +typedef void( APIENTRYP PFNGLENDPERFMONITORAMDPROC )( GLuint monitor ); +typedef void( APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC )( GLuint monitor, GLenum pname, + GLsizei dataSize, GLuint *data, + GLint *bytesWritten ); #endif #ifndef GL_AMD_texture_texture4 -#define GL_AMD_texture_texture4 1 +# define GL_AMD_texture_texture4 1 #endif #ifndef GL_AMD_vertex_shader_tesselator -#define GL_AMD_vertex_shader_tesselator 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor); -GLAPI void APIENTRY glTessellationModeAMD (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor); -typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode); +# define GL_AMD_vertex_shader_tesselator 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTessellationFactorAMD( GLfloat factor ); +GLAPI void APIENTRY glTessellationModeAMD( GLenum mode ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC )( GLfloat factor ); +typedef void( APIENTRYP PFNGLTESSELLATIONMODEAMDPROC )( GLenum mode ); #endif #ifndef GL_EXT_provoking_vertex -#define GL_EXT_provoking_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode); +# define GL_EXT_provoking_vertex 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProvokingVertexEXT( GLenum mode ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC )( GLenum mode ); #endif #ifndef GL_EXT_texture_snorm -#define GL_EXT_texture_snorm 1 +# define GL_EXT_texture_snorm 1 #endif #ifndef GL_AMD_draw_buffers_blend -#define GL_AMD_draw_buffers_blend 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +# define GL_AMD_draw_buffers_blend 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncIndexedAMD( GLuint buf, GLenum src, GLenum dst ); +GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD( GLuint buf, GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha ); +GLAPI void APIENTRY glBlendEquationIndexedAMD( GLuint buf, GLenum mode ); +GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD( GLuint buf, GLenum modeRGB, GLenum modeAlpha ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC )( GLuint buf, GLenum src, GLenum dst ); +typedef void( APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC )( GLuint buf, GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha ); +typedef void( APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC )( GLuint buf, GLenum mode ); +typedef void( APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC )( GLuint buf, GLenum modeRGB, + GLenum modeAlpha ); #endif #ifndef GL_APPLE_texture_range -#define GL_APPLE_texture_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const GLvoid *pointer); -GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, GLvoid* *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid* *params); +# define GL_APPLE_texture_range 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureRangeAPPLE( GLenum target, GLsizei length, const GLvoid *pointer ); +GLAPI void APIENTRY glGetTexParameterPointervAPPLE( GLenum target, GLenum pname, GLvoid **params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXTURERANGEAPPLEPROC )( GLenum target, GLsizei length, + const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC )( GLenum target, GLenum pname, + GLvoid **params ); #endif #ifndef GL_APPLE_float_pixels -#define GL_APPLE_float_pixels 1 +# define GL_APPLE_float_pixels 1 #endif #ifndef GL_APPLE_vertex_program_evaluators -#define GL_APPLE_vertex_program_evaluators 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname); -GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname); -GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname); -GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); -typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +# define GL_APPLE_vertex_program_evaluators 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glEnableVertexAttribAPPLE( GLuint index, GLenum pname ); +GLAPI void APIENTRY glDisableVertexAttribAPPLE( GLuint index, GLenum pname ); +GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE( GLuint index, GLenum pname ); +GLAPI void APIENTRY glMapVertexAttrib1dAPPLE( GLuint index, GLuint size, GLdouble u1, GLdouble u2, + GLint stride, GLint order, const GLdouble *points ); +GLAPI void APIENTRY glMapVertexAttrib1fAPPLE( GLuint index, GLuint size, GLfloat u1, GLfloat u2, + GLint stride, GLint order, const GLfloat *points ); +GLAPI void APIENTRY glMapVertexAttrib2dAPPLE( GLuint index, GLuint size, GLdouble u1, GLdouble u2, + GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, + GLint vstride, GLint vorder, const GLdouble *points ); +GLAPI void APIENTRY glMapVertexAttrib2fAPPLE( GLuint index, GLuint size, GLfloat u1, GLfloat u2, + GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, + GLint vstride, GLint vorder, const GLfloat *points ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC )( GLuint index, GLenum pname ); +typedef void( APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC )( GLuint index, GLenum pname ); +typedef GLboolean( APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC )( GLuint index, GLenum pname ); +typedef void( APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC )( GLuint index, GLuint size, GLdouble u1, + GLdouble u2, GLint stride, GLint order, + const GLdouble *points ); +typedef void( APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC )( GLuint index, GLuint size, GLfloat u1, + GLfloat u2, GLint stride, GLint order, + const GLfloat *points ); +typedef void( APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC )( GLuint index, GLuint size, GLdouble u1, + GLdouble u2, GLint ustride, GLint uorder, + GLdouble v1, GLdouble v2, GLint vstride, + GLint vorder, const GLdouble *points ); +typedef void( APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC )( GLuint index, GLuint size, GLfloat u1, + GLfloat u2, GLint ustride, GLint uorder, + GLfloat v1, GLfloat v2, GLint vstride, + GLint vorder, const GLfloat *points ); #endif #ifndef GL_APPLE_aux_depth_stencil -#define GL_APPLE_aux_depth_stencil 1 +# define GL_APPLE_aux_depth_stencil 1 #endif #ifndef GL_APPLE_object_purgeable -#define GL_APPLE_object_purgeable 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); -GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); -GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); -typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params); +# define GL_APPLE_object_purgeable 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glObjectPurgeableAPPLE( GLenum objectType, GLuint name, GLenum option ); +GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE( GLenum objectType, GLuint name, GLenum option ); +GLAPI void APIENTRY glGetObjectParameterivAPPLE( GLenum objectType, GLuint name, GLenum pname, + GLint *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLenum( APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC )( GLenum objectType, GLuint name, + GLenum option ); +typedef GLenum( APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC )( GLenum objectType, GLuint name, + GLenum option ); +typedef void( APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC )( GLenum objectType, GLuint name, + GLenum pname, GLint *params ); #endif #ifndef GL_APPLE_row_bytes -#define GL_APPLE_row_bytes 1 +# define GL_APPLE_row_bytes 1 #endif #ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 1 +# define GL_APPLE_rgb_422 1 #endif #ifndef GL_NV_video_capture -#define GL_NV_video_capture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot); -GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); -GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); -GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot); -GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); -GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); -GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); -GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot); -typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); -typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); -typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); +# define GL_NV_video_capture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginVideoCaptureNV( GLuint video_capture_slot ); +GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV( GLuint video_capture_slot, GLuint stream, + GLenum frame_region, GLintptrARB offset ); +GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV( GLuint video_capture_slot, GLuint stream, + GLenum frame_region, GLenum target, + GLuint texture ); +GLAPI void APIENTRY glEndVideoCaptureNV( GLuint video_capture_slot ); +GLAPI void APIENTRY glGetVideoCaptureivNV( GLuint video_capture_slot, GLenum pname, GLint *params ); +GLAPI void APIENTRY glGetVideoCaptureStreamivNV( GLuint video_capture_slot, GLuint stream, GLenum pname, + GLint *params ); +GLAPI void APIENTRY glGetVideoCaptureStreamfvNV( GLuint video_capture_slot, GLuint stream, GLenum pname, + GLfloat *params ); +GLAPI void APIENTRY glGetVideoCaptureStreamdvNV( GLuint video_capture_slot, GLuint stream, GLenum pname, + GLdouble *params ); +GLAPI GLenum APIENTRY glVideoCaptureNV( GLuint video_capture_slot, GLuint *sequence_num, + GLuint64EXT *capture_time ); +GLAPI void APIENTRY glVideoCaptureStreamParameterivNV( GLuint video_capture_slot, GLuint stream, + GLenum pname, const GLint *params ); +GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV( GLuint video_capture_slot, GLuint stream, + GLenum pname, const GLfloat *params ); +GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV( GLuint video_capture_slot, GLuint stream, + GLenum pname, const GLdouble *params ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC )( GLuint video_capture_slot ); +typedef void( APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC )( GLuint video_capture_slot, + GLuint stream, GLenum frame_region, + GLintptrARB offset ); +typedef void( APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC )( GLuint video_capture_slot, + GLuint stream, GLenum frame_region, + GLenum target, GLuint texture ); +typedef void( APIENTRYP PFNGLENDVIDEOCAPTURENVPROC )( GLuint video_capture_slot ); +typedef void( APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC )( GLuint video_capture_slot, GLenum pname, + GLint *params ); +typedef void( APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC )( GLuint video_capture_slot, GLuint stream, + GLenum pname, GLint *params ); +typedef void( APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC )( GLuint video_capture_slot, GLuint stream, + GLenum pname, GLfloat *params ); +typedef void( APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC )( GLuint video_capture_slot, GLuint stream, + GLenum pname, GLdouble *params ); +typedef GLenum( APIENTRYP PFNGLVIDEOCAPTURENVPROC )( GLuint video_capture_slot, GLuint *sequence_num, + GLuint64EXT *capture_time ); +typedef void( APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC )( GLuint video_capture_slot, + GLuint stream, GLenum pname, + const GLint *params ); +typedef void( APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC )( GLuint video_capture_slot, + GLuint stream, GLenum pname, + const GLfloat *params ); +typedef void( APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC )( GLuint video_capture_slot, + GLuint stream, GLenum pname, + const GLdouble *params ); #endif #ifndef GL_NV_copy_image -#define GL_NV_copy_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +# define GL_NV_copy_image 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyImageSubDataNV( GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, + GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, + GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, + GLsizei width, GLsizei height, GLsizei depth ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC )( GLuint srcName, GLenum srcTarget, GLint srcLevel, + GLint srcX, GLint srcY, GLint srcZ, + GLuint dstName, GLenum dstTarget, GLint dstLevel, + GLint dstX, GLint dstY, GLint dstZ, GLsizei width, + GLsizei height, GLsizei depth ); #endif #ifndef GL_EXT_separate_shader_objects -#define GL_EXT_separate_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program); -GLAPI void APIENTRY glActiveProgramEXT (GLuint program); -GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); -typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); +# define GL_EXT_separate_shader_objects 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUseShaderProgramEXT( GLenum type, GLuint program ); +GLAPI void APIENTRY glActiveProgramEXT( GLuint program ); +GLAPI GLuint APIENTRY glCreateShaderProgramEXT( GLenum type, const GLchar *string ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC )( GLenum type, GLuint program ); +typedef void( APIENTRYP PFNGLACTIVEPROGRAMEXTPROC )( GLuint program ); +typedef GLuint( APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC )( GLenum type, const GLchar *string ); #endif #ifndef GL_NV_parameter_buffer_object2 -#define GL_NV_parameter_buffer_object2 1 +# define GL_NV_parameter_buffer_object2 1 #endif #ifndef GL_NV_shader_buffer_load -#define GL_NV_shader_buffer_load 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access); -GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target); -GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target); -GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); -GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer); -GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer); -GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); -GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); -GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); -GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); -GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); -typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); -typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); -typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); -typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); -typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); -typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); -typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +# define GL_NV_shader_buffer_load 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMakeBufferResidentNV( GLenum target, GLenum access ); +GLAPI void APIENTRY glMakeBufferNonResidentNV( GLenum target ); +GLAPI GLboolean APIENTRY glIsBufferResidentNV( GLenum target ); +GLAPI void APIENTRY glMakeNamedBufferResidentNV( GLuint buffer, GLenum access ); +GLAPI void APIENTRY glMakeNamedBufferNonResidentNV( GLuint buffer ); +GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV( GLuint buffer ); +GLAPI void APIENTRY glGetBufferParameterui64vNV( GLenum target, GLenum pname, GLuint64EXT *params ); +GLAPI void APIENTRY glGetNamedBufferParameterui64vNV( GLuint buffer, GLenum pname, GLuint64EXT *params ); +GLAPI void APIENTRY glGetIntegerui64vNV( GLenum value, GLuint64EXT *result ); +GLAPI void APIENTRY glUniformui64NV( GLint location, GLuint64EXT value ); +GLAPI void APIENTRY glUniformui64vNV( GLint location, GLsizei count, const GLuint64EXT *value ); +GLAPI void APIENTRY glGetUniformui64vNV( GLuint program, GLint location, GLuint64EXT *params ); +GLAPI void APIENTRY glProgramUniformui64NV( GLuint program, GLint location, GLuint64EXT value ); +GLAPI void APIENTRY glProgramUniformui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC )( GLenum target, GLenum access ); +typedef void( APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC )( GLenum target ); +typedef GLboolean( APIENTRYP PFNGLISBUFFERRESIDENTNVPROC )( GLenum target ); +typedef void( APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC )( GLuint buffer, GLenum access ); +typedef void( APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC )( GLuint buffer ); +typedef GLboolean( APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC )( GLuint buffer ); +typedef void( APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC )( GLenum target, GLenum pname, + GLuint64EXT *params ); +typedef void( APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC )( GLuint buffer, GLenum pname, + GLuint64EXT *params ); +typedef void( APIENTRYP PFNGLGETINTEGERUI64VNVPROC )( GLenum value, GLuint64EXT *result ); +typedef void( APIENTRYP PFNGLUNIFORMUI64NVPROC )( GLint location, GLuint64EXT value ); +typedef void( APIENTRYP PFNGLUNIFORMUI64VNVPROC )( GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLGETUNIFORMUI64VNVPROC )( GLuint program, GLint location, + GLuint64EXT *params ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC )( GLuint program, GLint location, + GLuint64EXT value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); #endif #ifndef GL_NV_vertex_buffer_unified_memory -#define GL_NV_vertex_buffer_unified_memory 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); -GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride); -GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); -GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); -typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); -typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); +# define GL_NV_vertex_buffer_unified_memory 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferAddressRangeNV( GLenum pname, GLuint index, GLuint64EXT address, + GLsizeiptr length ); +GLAPI void APIENTRY glVertexFormatNV( GLint size, GLenum type, GLsizei stride ); +GLAPI void APIENTRY glNormalFormatNV( GLenum type, GLsizei stride ); +GLAPI void APIENTRY glColorFormatNV( GLint size, GLenum type, GLsizei stride ); +GLAPI void APIENTRY glIndexFormatNV( GLenum type, GLsizei stride ); +GLAPI void APIENTRY glTexCoordFormatNV( GLint size, GLenum type, GLsizei stride ); +GLAPI void APIENTRY glEdgeFlagFormatNV( GLsizei stride ); +GLAPI void APIENTRY glSecondaryColorFormatNV( GLint size, GLenum type, GLsizei stride ); +GLAPI void APIENTRY glFogCoordFormatNV( GLenum type, GLsizei stride ); +GLAPI void APIENTRY glVertexAttribFormatNV( GLuint index, GLint size, GLenum type, GLboolean normalized, + GLsizei stride ); +GLAPI void APIENTRY glVertexAttribIFormatNV( GLuint index, GLint size, GLenum type, GLsizei stride ); +GLAPI void APIENTRY glGetIntegerui64i_vNV( GLenum value, GLuint index, GLuint64EXT *result ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC )( GLenum pname, GLuint index, GLuint64EXT address, + GLsizeiptr length ); +typedef void( APIENTRYP PFNGLVERTEXFORMATNVPROC )( GLint size, GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLNORMALFORMATNVPROC )( GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLCOLORFORMATNVPROC )( GLint size, GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLINDEXFORMATNVPROC )( GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLTEXCOORDFORMATNVPROC )( GLint size, GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLEDGEFLAGFORMATNVPROC )( GLsizei stride ); +typedef void( APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC )( GLint size, GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLFOGCOORDFORMATNVPROC )( GLenum type, GLsizei stride ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC )( GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC )( GLuint index, GLint size, GLenum type, + GLsizei stride ); +typedef void( APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC )( GLenum value, GLuint index, + GLuint64EXT *result ); #endif #ifndef GL_NV_texture_barrier -#define GL_NV_texture_barrier 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureBarrierNV (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void); +# define GL_NV_texture_barrier 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureBarrierNV( void ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXTUREBARRIERNVPROC )( void ); #endif #ifndef GL_AMD_shader_stencil_export -#define GL_AMD_shader_stencil_export 1 +# define GL_AMD_shader_stencil_export 1 #endif #ifndef GL_AMD_seamless_cubemap_per_texture -#define GL_AMD_seamless_cubemap_per_texture 1 +# define GL_AMD_seamless_cubemap_per_texture 1 #endif #ifndef GL_AMD_conservative_depth -#define GL_AMD_conservative_depth 1 +# define GL_AMD_conservative_depth 1 #endif #ifndef GL_EXT_shader_image_load_store -#define GL_EXT_shader_image_load_store 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); -GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); -typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); +# define GL_EXT_shader_image_load_store 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindImageTextureEXT( GLuint index, GLuint texture, GLint level, GLboolean layered, + GLint layer, GLenum access, GLint format ); +GLAPI void APIENTRY glMemoryBarrierEXT( GLbitfield barriers ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC )( GLuint index, GLuint texture, GLint level, + GLboolean layered, GLint layer, GLenum access, + GLint format ); +typedef void( APIENTRYP PFNGLMEMORYBARRIEREXTPROC )( GLbitfield barriers ); #endif #ifndef GL_EXT_vertex_attrib_64bit -#define GL_EXT_vertex_attrib_64bit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +# define GL_EXT_vertex_attrib_64bit 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1dEXT( GLuint index, GLdouble x ); +GLAPI void APIENTRY glVertexAttribL2dEXT( GLuint index, GLdouble x, GLdouble y ); +GLAPI void APIENTRY glVertexAttribL3dEXT( GLuint index, GLdouble x, GLdouble y, GLdouble z ); +GLAPI void APIENTRY glVertexAttribL4dEXT( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +GLAPI void APIENTRY glVertexAttribL1dvEXT( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribL2dvEXT( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribL3dvEXT( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribL4dvEXT( GLuint index, const GLdouble *v ); +GLAPI void APIENTRY glVertexAttribLPointerEXT( GLuint index, GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer ); +GLAPI void APIENTRY glGetVertexAttribLdvEXT( GLuint index, GLenum pname, GLdouble *params ); +GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT( GLuint vaobj, GLuint buffer, GLuint index, + GLint size, GLenum type, GLsizei stride, + GLintptr offset ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC )( GLuint index, GLdouble x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC )( GLuint index, GLdouble x, GLdouble y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC )( GLuint index, GLdouble x, GLdouble y, + GLdouble z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC )( GLuint index, GLdouble x, GLdouble y, GLdouble z, + GLdouble w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC )( GLuint index, const GLdouble *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC )( GLuint index, GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC )( GLuint index, GLenum pname, GLdouble *params ); +typedef void( APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC )( GLuint vaobj, GLuint buffer, + GLuint index, GLint size, + GLenum type, GLsizei stride, + GLintptr offset ); #endif #ifndef GL_NV_gpu_program5 -#define GL_NV_gpu_program5 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); +# define GL_NV_gpu_program5 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramSubroutineParametersuivNV( GLenum target, GLsizei count, + const GLuint *params ); +GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV( GLenum target, GLuint index, GLuint *param ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC )( GLenum target, GLsizei count, + const GLuint *params ); +typedef void( APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC )( GLenum target, GLuint index, + GLuint *param ); #endif #ifndef GL_NV_gpu_shader5 -#define GL_NV_gpu_shader5 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); -GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); -GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); -GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); -GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); -GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); -typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); -typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +# define GL_NV_gpu_shader5 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64NV( GLint location, GLint64EXT x ); +GLAPI void APIENTRY glUniform2i64NV( GLint location, GLint64EXT x, GLint64EXT y ); +GLAPI void APIENTRY glUniform3i64NV( GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z ); +GLAPI void APIENTRY glUniform4i64NV( GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, + GLint64EXT w ); +GLAPI void APIENTRY glUniform1i64vNV( GLint location, GLsizei count, const GLint64EXT *value ); +GLAPI void APIENTRY glUniform2i64vNV( GLint location, GLsizei count, const GLint64EXT *value ); +GLAPI void APIENTRY glUniform3i64vNV( GLint location, GLsizei count, const GLint64EXT *value ); +GLAPI void APIENTRY glUniform4i64vNV( GLint location, GLsizei count, const GLint64EXT *value ); +GLAPI void APIENTRY glUniform1ui64NV( GLint location, GLuint64EXT x ); +GLAPI void APIENTRY glUniform2ui64NV( GLint location, GLuint64EXT x, GLuint64EXT y ); +GLAPI void APIENTRY glUniform3ui64NV( GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z ); +GLAPI void APIENTRY glUniform4ui64NV( GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, + GLuint64EXT w ); +GLAPI void APIENTRY glUniform1ui64vNV( GLint location, GLsizei count, const GLuint64EXT *value ); +GLAPI void APIENTRY glUniform2ui64vNV( GLint location, GLsizei count, const GLuint64EXT *value ); +GLAPI void APIENTRY glUniform3ui64vNV( GLint location, GLsizei count, const GLuint64EXT *value ); +GLAPI void APIENTRY glUniform4ui64vNV( GLint location, GLsizei count, const GLuint64EXT *value ); +GLAPI void APIENTRY glGetUniformi64vNV( GLuint program, GLint location, GLint64EXT *params ); +GLAPI void APIENTRY glProgramUniform1i64NV( GLuint program, GLint location, GLint64EXT x ); +GLAPI void APIENTRY glProgramUniform2i64NV( GLuint program, GLint location, GLint64EXT x, GLint64EXT y ); +GLAPI void APIENTRY glProgramUniform3i64NV( GLuint program, GLint location, GLint64EXT x, GLint64EXT y, + GLint64EXT z ); +GLAPI void APIENTRY glProgramUniform4i64NV( GLuint program, GLint location, GLint64EXT x, GLint64EXT y, + GLint64EXT z, GLint64EXT w ); +GLAPI void APIENTRY glProgramUniform1i64vNV( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +GLAPI void APIENTRY glProgramUniform2i64vNV( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +GLAPI void APIENTRY glProgramUniform3i64vNV( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +GLAPI void APIENTRY glProgramUniform4i64vNV( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +GLAPI void APIENTRY glProgramUniform1ui64NV( GLuint program, GLint location, GLuint64EXT x ); +GLAPI void APIENTRY glProgramUniform2ui64NV( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y ); +GLAPI void APIENTRY glProgramUniform3ui64NV( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y, GLuint64EXT z ); +GLAPI void APIENTRY glProgramUniform4ui64NV( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y, GLuint64EXT z, GLuint64EXT w ); +GLAPI void APIENTRY glProgramUniform1ui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +GLAPI void APIENTRY glProgramUniform2ui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +GLAPI void APIENTRY glProgramUniform3ui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +GLAPI void APIENTRY glProgramUniform4ui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLUNIFORM1I64NVPROC )( GLint location, GLint64EXT x ); +typedef void( APIENTRYP PFNGLUNIFORM2I64NVPROC )( GLint location, GLint64EXT x, GLint64EXT y ); +typedef void( APIENTRYP PFNGLUNIFORM3I64NVPROC )( GLint location, GLint64EXT x, GLint64EXT y, + GLint64EXT z ); +typedef void( APIENTRYP PFNGLUNIFORM4I64NVPROC )( GLint location, GLint64EXT x, GLint64EXT y, + GLint64EXT z, GLint64EXT w ); +typedef void( APIENTRYP PFNGLUNIFORM1I64VNVPROC )( GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM2I64VNVPROC )( GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM3I64VNVPROC )( GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM4I64VNVPROC )( GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM1UI64NVPROC )( GLint location, GLuint64EXT x ); +typedef void( APIENTRYP PFNGLUNIFORM2UI64NVPROC )( GLint location, GLuint64EXT x, GLuint64EXT y ); +typedef void( APIENTRYP PFNGLUNIFORM3UI64NVPROC )( GLint location, GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z ); +typedef void( APIENTRYP PFNGLUNIFORM4UI64NVPROC )( GLint location, GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z, GLuint64EXT w ); +typedef void( APIENTRYP PFNGLUNIFORM1UI64VNVPROC )( GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM2UI64VNVPROC )( GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM3UI64VNVPROC )( GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLUNIFORM4UI64VNVPROC )( GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLGETUNIFORMI64VNVPROC )( GLuint program, GLint location, + GLint64EXT *params ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC )( GLuint program, GLint location, GLint64EXT x ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC )( GLuint program, GLint location, GLint64EXT x, + GLint64EXT y ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC )( GLuint program, GLint location, GLint64EXT x, + GLint64EXT y, GLint64EXT z ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC )( GLuint program, GLint location, GLint64EXT x, + GLint64EXT y, GLint64EXT z, GLint64EXT w ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC )( GLuint program, GLint location, + GLuint64EXT x ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC )( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC )( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y, GLuint64EXT z ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC )( GLuint program, GLint location, GLuint64EXT x, + GLuint64EXT y, GLuint64EXT z, GLuint64EXT w ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC )( GLuint program, GLint location, GLsizei count, + const GLuint64EXT *value ); #endif #ifndef GL_NV_shader_buffer_store -#define GL_NV_shader_buffer_store 1 +# define GL_NV_shader_buffer_store 1 #endif #ifndef GL_NV_tessellation_program5 -#define GL_NV_tessellation_program5 1 +# define GL_NV_tessellation_program5 1 #endif #ifndef GL_NV_vertex_attrib_integer_64bit -#define GL_NV_vertex_attrib_integer_64bit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x); -GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); -GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +# define GL_NV_vertex_attrib_integer_64bit 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1i64NV( GLuint index, GLint64EXT x ); +GLAPI void APIENTRY glVertexAttribL2i64NV( GLuint index, GLint64EXT x, GLint64EXT y ); +GLAPI void APIENTRY glVertexAttribL3i64NV( GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z ); +GLAPI void APIENTRY glVertexAttribL4i64NV( GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, + GLint64EXT w ); +GLAPI void APIENTRY glVertexAttribL1i64vNV( GLuint index, const GLint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL2i64vNV( GLuint index, const GLint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL3i64vNV( GLuint index, const GLint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL4i64vNV( GLuint index, const GLint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL1ui64NV( GLuint index, GLuint64EXT x ); +GLAPI void APIENTRY glVertexAttribL2ui64NV( GLuint index, GLuint64EXT x, GLuint64EXT y ); +GLAPI void APIENTRY glVertexAttribL3ui64NV( GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z ); +GLAPI void APIENTRY glVertexAttribL4ui64NV( GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, + GLuint64EXT w ); +GLAPI void APIENTRY glVertexAttribL1ui64vNV( GLuint index, const GLuint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL2ui64vNV( GLuint index, const GLuint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL3ui64vNV( GLuint index, const GLuint64EXT *v ); +GLAPI void APIENTRY glVertexAttribL4ui64vNV( GLuint index, const GLuint64EXT *v ); +GLAPI void APIENTRY glGetVertexAttribLi64vNV( GLuint index, GLenum pname, GLint64EXT *params ); +GLAPI void APIENTRY glGetVertexAttribLui64vNV( GLuint index, GLenum pname, GLuint64EXT *params ); +GLAPI void APIENTRY glVertexAttribLFormatNV( GLuint index, GLint size, GLenum type, GLsizei stride ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC )( GLuint index, GLint64EXT x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC )( GLuint index, GLint64EXT x, GLint64EXT y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC )( GLuint index, GLint64EXT x, GLint64EXT y, + GLint64EXT z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC )( GLuint index, GLint64EXT x, GLint64EXT y, + GLint64EXT z, GLint64EXT w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC )( GLuint index, const GLint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC )( GLuint index, const GLint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC )( GLuint index, const GLint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC )( GLuint index, const GLint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC )( GLuint index, GLuint64EXT x ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC )( GLuint index, GLuint64EXT x, GLuint64EXT y ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC )( GLuint index, GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC )( GLuint index, GLuint64EXT x, GLuint64EXT y, + GLuint64EXT z, GLuint64EXT w ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC )( GLuint index, const GLuint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC )( GLuint index, const GLuint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC )( GLuint index, const GLuint64EXT *v ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC )( GLuint index, const GLuint64EXT *v ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC )( GLuint index, GLenum pname, + GLint64EXT *params ); +typedef void( APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC )( GLuint index, GLenum pname, + GLuint64EXT *params ); +typedef void( APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC )( GLuint index, GLint size, GLenum type, + GLsizei stride ); #endif #ifndef GL_NV_multisample_coverage -#define GL_NV_multisample_coverage 1 +# define GL_NV_multisample_coverage 1 #endif #ifndef GL_AMD_name_gen_delete -#define GL_AMD_name_gen_delete 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); -GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); -GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); -typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); -typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); +# define GL_AMD_name_gen_delete 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenNamesAMD( GLenum identifier, GLuint num, GLuint *names ); +GLAPI void APIENTRY glDeleteNamesAMD( GLenum identifier, GLuint num, const GLuint *names ); +GLAPI GLboolean APIENTRY glIsNameAMD( GLenum identifier, GLuint name ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLGENNAMESAMDPROC )( GLenum identifier, GLuint num, GLuint *names ); +typedef void( APIENTRYP PFNGLDELETENAMESAMDPROC )( GLenum identifier, GLuint num, const GLuint *names ); +typedef GLboolean( APIENTRYP PFNGLISNAMEAMDPROC )( GLenum identifier, GLuint name ); #endif #ifndef GL_AMD_debug_output -#define GL_AMD_debug_output 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +# define GL_AMD_debug_output 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageEnableAMD( GLenum category, GLenum severity, GLsizei count, + const GLuint *ids, GLboolean enabled ); +GLAPI void APIENTRY glDebugMessageInsertAMD( GLenum category, GLenum severity, GLuint id, GLsizei length, + const GLchar *buf ); +GLAPI void APIENTRY glDebugMessageCallbackAMD( GLDEBUGPROCAMD callback, GLvoid *userParam ); +GLAPI GLuint APIENTRY glGetDebugMessageLogAMD( GLuint count, GLsizei bufsize, GLenum *categories, + GLuint *severities, GLuint *ids, GLsizei *lengths, + GLchar *message ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC )( GLenum category, GLenum severity, + GLsizei count, const GLuint *ids, + GLboolean enabled ); +typedef void( APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC )( GLenum category, GLenum severity, GLuint id, + GLsizei length, const GLchar *buf ); +typedef void( APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC )( GLDEBUGPROCAMD callback, GLvoid *userParam ); +typedef GLuint( APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC )( GLuint count, GLsizei bufsize, + GLenum *categories, GLuint *severities, + GLuint *ids, GLsizei *lengths, + GLchar *message ); #endif #ifndef GL_NV_vdpau_interop -#define GL_NV_vdpau_interop 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVDPAUInitNV (const GLvoid *vdpDevice, const GLvoid *getProcAddress); -GLAPI void APIENTRY glVDPAUFiniNV (void); -GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -GLAPI void APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); -GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); -GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); -GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); -GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const GLvoid *vdpDevice, const GLvoid *getProcAddress); -typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void); -typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -typedef void (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); -typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); -typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); -typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); -typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +# define GL_NV_vdpau_interop 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVDPAUInitNV( const GLvoid *vdpDevice, const GLvoid *getProcAddress ); +GLAPI void APIENTRY glVDPAUFiniNV( void ); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV( const GLvoid *vdpSurface, GLenum target, + GLsizei numTextureNames, + const GLuint *textureNames ); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV( GLvoid *vdpSurface, GLenum target, + GLsizei numTextureNames, + const GLuint *textureNames ); +GLAPI void APIENTRY glVDPAUIsSurfaceNV( GLvdpauSurfaceNV surface ); +GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV( GLvdpauSurfaceNV surface ); +GLAPI void APIENTRY glVDPAUGetSurfaceivNV( GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, + GLsizei *length, GLint *values ); +GLAPI void APIENTRY glVDPAUSurfaceAccessNV( GLvdpauSurfaceNV surface, GLenum access ); +GLAPI void APIENTRY glVDPAUMapSurfacesNV( GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces ); +GLAPI void APIENTRY glVDPAUUnmapSurfacesNV( GLsizei numSurface, const GLvdpauSurfaceNV *surfaces ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLVDPAUINITNVPROC )( const GLvoid *vdpDevice, const GLvoid *getProcAddress ); +typedef void( APIENTRYP PFNGLVDPAUFININVPROC )( void ); +typedef GLvdpauSurfaceNV( APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC )( const GLvoid *vdpSurface, + GLenum target, + GLsizei numTextureNames, + const GLuint *textureNames ); +typedef GLvdpauSurfaceNV( APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC )( + GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames ); +typedef void( APIENTRYP PFNGLVDPAUISSURFACENVPROC )( GLvdpauSurfaceNV surface ); +typedef void( APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC )( GLvdpauSurfaceNV surface ); +typedef void( APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC )( GLvdpauSurfaceNV surface, GLenum pname, + GLsizei bufSize, GLsizei *length, + GLint *values ); +typedef void( APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC )( GLvdpauSurfaceNV surface, GLenum access ); +typedef void( APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC )( GLsizei numSurfaces, + const GLvdpauSurfaceNV *surfaces ); +typedef void( APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC )( GLsizei numSurface, + const GLvdpauSurfaceNV *surfaces ); #endif #ifndef GL_AMD_transform_feedback3_lines_triangles -#define GL_AMD_transform_feedback3_lines_triangles 1 +# define GL_AMD_transform_feedback3_lines_triangles 1 #endif #ifndef GL_AMD_depth_clamp_separate -#define GL_AMD_depth_clamp_separate 1 +# define GL_AMD_depth_clamp_separate 1 #endif #ifndef GL_EXT_texture_sRGB_decode -#define GL_EXT_texture_sRGB_decode 1 +# define GL_EXT_texture_sRGB_decode 1 #endif #ifndef GL_NV_texture_multisample -#define GL_NV_texture_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +# define GL_NV_texture_multisample 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV( GLenum target, GLsizei coverageSamples, + GLsizei colorSamples, GLint internalFormat, + GLsizei width, GLsizei height, + GLboolean fixedSampleLocations ); +GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV( GLenum target, GLsizei coverageSamples, + GLsizei colorSamples, GLint internalFormat, + GLsizei width, GLsizei height, GLsizei depth, + GLboolean fixedSampleLocations ); +GLAPI void APIENTRY glTextureImage2DMultisampleNV( GLuint texture, GLenum target, GLsizei samples, + GLint internalFormat, GLsizei width, GLsizei height, + GLboolean fixedSampleLocations ); +GLAPI void APIENTRY glTextureImage3DMultisampleNV( GLuint texture, GLenum target, GLsizei samples, + GLint internalFormat, GLsizei width, GLsizei height, + GLsizei depth, GLboolean fixedSampleLocations ); +GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV( GLuint texture, GLenum target, + GLsizei coverageSamples, GLsizei colorSamples, + GLint internalFormat, GLsizei width, + GLsizei height, + GLboolean fixedSampleLocations ); +GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV( GLuint texture, GLenum target, + GLsizei coverageSamples, GLsizei colorSamples, + GLint internalFormat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedSampleLocations ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC )( + GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, + GLsizei height, GLboolean fixedSampleLocations ); +typedef void( APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC )( + GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, + GLsizei height, GLsizei depth, GLboolean fixedSampleLocations ); +typedef void( APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC )( GLuint texture, GLenum target, + GLsizei samples, GLint internalFormat, + GLsizei width, GLsizei height, + GLboolean fixedSampleLocations ); +typedef void( APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC )( GLuint texture, GLenum target, + GLsizei samples, GLint internalFormat, + GLsizei width, GLsizei height, + GLsizei depth, + GLboolean fixedSampleLocations ); +typedef void( APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC )( + GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, + GLsizei width, GLsizei height, GLboolean fixedSampleLocations ); +typedef void( APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC )( + GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, + GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations ); #endif #ifndef GL_AMD_blend_minmax_factor -#define GL_AMD_blend_minmax_factor 1 +# define GL_AMD_blend_minmax_factor 1 #endif #ifndef GL_AMD_sample_positions -#define GL_AMD_sample_positions 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); +# define GL_AMD_sample_positions 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSetMultisamplefvAMD( GLenum pname, GLuint index, const GLfloat *val ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC )( GLenum pname, GLuint index, const GLfloat *val ); #endif #ifndef GL_EXT_x11_sync_object -#define GL_EXT_x11_sync_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +# define GL_EXT_x11_sync_object 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glImportSyncEXT( GLenum external_sync_type, GLintptr external_sync, + GLbitfield flags ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLsync( APIENTRYP PFNGLIMPORTSYNCEXTPROC )( GLenum external_sync_type, GLintptr external_sync, + GLbitfield flags ); #endif #ifndef GL_AMD_multi_draw_indirect -#define GL_AMD_multi_draw_indirect 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); -GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +# define GL_AMD_multi_draw_indirect 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysIndirectAMD( GLenum mode, const GLvoid *indirect, GLsizei primcount, + GLsizei stride ); +GLAPI void APIENTRY glMultiDrawElementsIndirectAMD( GLenum mode, GLenum type, const GLvoid *indirect, + GLsizei primcount, GLsizei stride ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC )( GLenum mode, const GLvoid *indirect, + GLsizei primcount, GLsizei stride ); +typedef void( APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC )( GLenum mode, GLenum type, + const GLvoid *indirect, + GLsizei primcount, GLsizei stride ); #endif #ifndef GL_EXT_framebuffer_multisample_blit_scaled -#define GL_EXT_framebuffer_multisample_blit_scaled 1 +# define GL_EXT_framebuffer_multisample_blit_scaled 1 #endif #ifndef GL_NV_path_rendering -#define GL_NV_path_rendering 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range); -GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range); -GLAPI GLboolean APIENTRY glIsPathNV (GLuint path); -GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const GLvoid *pathString); -GLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const GLvoid *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); -GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath); -GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); -GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value); -GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value); -GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value); -GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value); -GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray); -GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units); -GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask); -GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask); -GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func); -GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); -GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); -GLAPI void APIENTRY glPathFogGenNV (GLenum genMode); -GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); -GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); -GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value); -GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands); -GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords); -GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); -GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); -GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); -GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value); -GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value); -GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); -GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); -GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); -GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range); -typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range); -typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path); -typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const GLvoid *coords); -typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const GLvoid *pathString); -typedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const GLvoid *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); -typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath); -typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); -typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value); -typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value); -typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value); -typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray); -typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units); -typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); -typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); -typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); -typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode); -typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); -typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); -typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value); -typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands); -typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords); -typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray); -typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); -typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); -typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const GLvoid *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value); -typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value); -typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); -typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); -typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); -typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +# define GL_NV_path_rendering 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenPathsNV( GLsizei range ); +GLAPI void APIENTRY glDeletePathsNV( GLuint path, GLsizei range ); +GLAPI GLboolean APIENTRY glIsPathNV( GLuint path ); +GLAPI void APIENTRY glPathCommandsNV( GLuint path, GLsizei numCommands, const GLubyte *commands, + GLsizei numCoords, GLenum coordType, const GLvoid *coords ); +GLAPI void APIENTRY glPathCoordsNV( GLuint path, GLsizei numCoords, GLenum coordType, + const GLvoid *coords ); +GLAPI void APIENTRY glPathSubCommandsNV( GLuint path, GLsizei commandStart, GLsizei commandsToDelete, + GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, + GLenum coordType, const GLvoid *coords ); +GLAPI void APIENTRY glPathSubCoordsNV( GLuint path, GLsizei coordStart, GLsizei numCoords, + GLenum coordType, const GLvoid *coords ); +GLAPI void APIENTRY glPathStringNV( GLuint path, GLenum format, GLsizei length, + const GLvoid *pathString ); +GLAPI void APIENTRY glPathGlyphsNV( GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, + GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, + const GLvoid *charcodes, GLenum handleMissingGlyphs, + GLuint pathParameterTemplate, GLfloat emScale ); +GLAPI void APIENTRY glPathGlyphRangeNV( GLuint firstPathName, GLenum fontTarget, const GLvoid *fontName, + GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, + GLenum handleMissingGlyphs, GLuint pathParameterTemplate, + GLfloat emScale ); +GLAPI void APIENTRY glWeightPathsNV( GLuint resultPath, GLsizei numPaths, const GLuint *paths, + const GLfloat *weights ); +GLAPI void APIENTRY glCopyPathNV( GLuint resultPath, GLuint srcPath ); +GLAPI void APIENTRY glInterpolatePathsNV( GLuint resultPath, GLuint pathA, GLuint pathB, + GLfloat weight ); +GLAPI void APIENTRY glTransformPathNV( GLuint resultPath, GLuint srcPath, GLenum transformType, + const GLfloat *transformValues ); +GLAPI void APIENTRY glPathParameterivNV( GLuint path, GLenum pname, const GLint *value ); +GLAPI void APIENTRY glPathParameteriNV( GLuint path, GLenum pname, GLint value ); +GLAPI void APIENTRY glPathParameterfvNV( GLuint path, GLenum pname, const GLfloat *value ); +GLAPI void APIENTRY glPathParameterfNV( GLuint path, GLenum pname, GLfloat value ); +GLAPI void APIENTRY glPathDashArrayNV( GLuint path, GLsizei dashCount, const GLfloat *dashArray ); +GLAPI void APIENTRY glPathStencilFuncNV( GLenum func, GLint ref, GLuint mask ); +GLAPI void APIENTRY glPathStencilDepthOffsetNV( GLfloat factor, GLfloat units ); +GLAPI void APIENTRY glStencilFillPathNV( GLuint path, GLenum fillMode, GLuint mask ); +GLAPI void APIENTRY glStencilStrokePathNV( GLuint path, GLint reference, GLuint mask ); +GLAPI void APIENTRY glStencilFillPathInstancedNV( GLsizei numPaths, GLenum pathNameType, + const GLvoid *paths, GLuint pathBase, GLenum fillMode, + GLuint mask, GLenum transformType, + const GLfloat *transformValues ); +GLAPI void APIENTRY glStencilStrokePathInstancedNV( GLsizei numPaths, GLenum pathNameType, + const GLvoid *paths, GLuint pathBase, + GLint reference, GLuint mask, GLenum transformType, + const GLfloat *transformValues ); +GLAPI void APIENTRY glPathCoverDepthFuncNV( GLenum func ); +GLAPI void APIENTRY glPathColorGenNV( GLenum color, GLenum genMode, GLenum colorFormat, + const GLfloat *coeffs ); +GLAPI void APIENTRY glPathTexGenNV( GLenum texCoordSet, GLenum genMode, GLint components, + const GLfloat *coeffs ); +GLAPI void APIENTRY glPathFogGenNV( GLenum genMode ); +GLAPI void APIENTRY glCoverFillPathNV( GLuint path, GLenum coverMode ); +GLAPI void APIENTRY glCoverStrokePathNV( GLuint path, GLenum coverMode ); +GLAPI void APIENTRY glCoverFillPathInstancedNV( GLsizei numPaths, GLenum pathNameType, + const GLvoid *paths, GLuint pathBase, GLenum coverMode, + GLenum transformType, const GLfloat *transformValues ); +GLAPI void APIENTRY glCoverStrokePathInstancedNV( GLsizei numPaths, GLenum pathNameType, + const GLvoid *paths, GLuint pathBase, GLenum coverMode, + GLenum transformType, const GLfloat *transformValues ); +GLAPI void APIENTRY glGetPathParameterivNV( GLuint path, GLenum pname, GLint *value ); +GLAPI void APIENTRY glGetPathParameterfvNV( GLuint path, GLenum pname, GLfloat *value ); +GLAPI void APIENTRY glGetPathCommandsNV( GLuint path, GLubyte *commands ); +GLAPI void APIENTRY glGetPathCoordsNV( GLuint path, GLfloat *coords ); +GLAPI void APIENTRY glGetPathDashArrayNV( GLuint path, GLfloat *dashArray ); +GLAPI void APIENTRY glGetPathMetricsNV( GLbitfield metricQueryMask, GLsizei numPaths, + GLenum pathNameType, const GLvoid *paths, GLuint pathBase, + GLsizei stride, GLfloat *metrics ); +GLAPI void APIENTRY glGetPathMetricRangeNV( GLbitfield metricQueryMask, GLuint firstPathName, + GLsizei numPaths, GLsizei stride, GLfloat *metrics ); +GLAPI void APIENTRY glGetPathSpacingNV( GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, + const GLvoid *paths, GLuint pathBase, GLfloat advanceScale, + GLfloat kerningScale, GLenum transformType, + GLfloat *returnedSpacing ); +GLAPI void APIENTRY glGetPathColorGenivNV( GLenum color, GLenum pname, GLint *value ); +GLAPI void APIENTRY glGetPathColorGenfvNV( GLenum color, GLenum pname, GLfloat *value ); +GLAPI void APIENTRY glGetPathTexGenivNV( GLenum texCoordSet, GLenum pname, GLint *value ); +GLAPI void APIENTRY glGetPathTexGenfvNV( GLenum texCoordSet, GLenum pname, GLfloat *value ); +GLAPI GLboolean APIENTRY glIsPointInFillPathNV( GLuint path, GLuint mask, GLfloat x, GLfloat y ); +GLAPI GLboolean APIENTRY glIsPointInStrokePathNV( GLuint path, GLfloat x, GLfloat y ); +GLAPI GLfloat APIENTRY glGetPathLengthNV( GLuint path, GLsizei startSegment, GLsizei numSegments ); +GLAPI GLboolean APIENTRY glPointAlongPathNV( GLuint path, GLsizei startSegment, GLsizei numSegments, + GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, + GLfloat *tangentY ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint( APIENTRYP PFNGLGENPATHSNVPROC )( GLsizei range ); +typedef void( APIENTRYP PFNGLDELETEPATHSNVPROC )( GLuint path, GLsizei range ); +typedef GLboolean( APIENTRYP PFNGLISPATHNVPROC )( GLuint path ); +typedef void( APIENTRYP PFNGLPATHCOMMANDSNVPROC )( GLuint path, GLsizei numCommands, + const GLubyte *commands, GLsizei numCoords, + GLenum coordType, const GLvoid *coords ); +typedef void( APIENTRYP PFNGLPATHCOORDSNVPROC )( GLuint path, GLsizei numCoords, GLenum coordType, + const GLvoid *coords ); +typedef void( APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC )( GLuint path, GLsizei commandStart, + GLsizei commandsToDelete, GLsizei numCommands, + const GLubyte *commands, GLsizei numCoords, + GLenum coordType, const GLvoid *coords ); +typedef void( APIENTRYP PFNGLPATHSUBCOORDSNVPROC )( GLuint path, GLsizei coordStart, GLsizei numCoords, + GLenum coordType, const GLvoid *coords ); +typedef void( APIENTRYP PFNGLPATHSTRINGNVPROC )( GLuint path, GLenum format, GLsizei length, + const GLvoid *pathString ); +typedef void( APIENTRYP PFNGLPATHGLYPHSNVPROC )( GLuint firstPathName, GLenum fontTarget, + const GLvoid *fontName, GLbitfield fontStyle, + GLsizei numGlyphs, GLenum type, const GLvoid *charcodes, + GLenum handleMissingGlyphs, + GLuint pathParameterTemplate, GLfloat emScale ); +typedef void( APIENTRYP PFNGLPATHGLYPHRANGENVPROC )( GLuint firstPathName, GLenum fontTarget, + const GLvoid *fontName, GLbitfield fontStyle, + GLuint firstGlyph, GLsizei numGlyphs, + GLenum handleMissingGlyphs, + GLuint pathParameterTemplate, GLfloat emScale ); +typedef void( APIENTRYP PFNGLWEIGHTPATHSNVPROC )( GLuint resultPath, GLsizei numPaths, + const GLuint *paths, const GLfloat *weights ); +typedef void( APIENTRYP PFNGLCOPYPATHNVPROC )( GLuint resultPath, GLuint srcPath ); +typedef void( APIENTRYP PFNGLINTERPOLATEPATHSNVPROC )( GLuint resultPath, GLuint pathA, GLuint pathB, + GLfloat weight ); +typedef void( APIENTRYP PFNGLTRANSFORMPATHNVPROC )( GLuint resultPath, GLuint srcPath, + GLenum transformType, + const GLfloat *transformValues ); +typedef void( APIENTRYP PFNGLPATHPARAMETERIVNVPROC )( GLuint path, GLenum pname, const GLint *value ); +typedef void( APIENTRYP PFNGLPATHPARAMETERINVPROC )( GLuint path, GLenum pname, GLint value ); +typedef void( APIENTRYP PFNGLPATHPARAMETERFVNVPROC )( GLuint path, GLenum pname, const GLfloat *value ); +typedef void( APIENTRYP PFNGLPATHPARAMETERFNVPROC )( GLuint path, GLenum pname, GLfloat value ); +typedef void( APIENTRYP PFNGLPATHDASHARRAYNVPROC )( GLuint path, GLsizei dashCount, + const GLfloat *dashArray ); +typedef void( APIENTRYP PFNGLPATHSTENCILFUNCNVPROC )( GLenum func, GLint ref, GLuint mask ); +typedef void( APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC )( GLfloat factor, GLfloat units ); +typedef void( APIENTRYP PFNGLSTENCILFILLPATHNVPROC )( GLuint path, GLenum fillMode, GLuint mask ); +typedef void( APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC )( GLuint path, GLint reference, GLuint mask ); +typedef void( APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC )( GLsizei numPaths, GLenum pathNameType, + const GLvoid *paths, GLuint pathBase, + GLenum fillMode, GLuint mask, + GLenum transformType, + const GLfloat *transformValues ); +typedef void( APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC )( GLsizei numPaths, GLenum pathNameType, + const GLvoid *paths, GLuint pathBase, + GLint reference, GLuint mask, + GLenum transformType, + const GLfloat *transformValues ); +typedef void( APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC )( GLenum func ); +typedef void( APIENTRYP PFNGLPATHCOLORGENNVPROC )( GLenum color, GLenum genMode, GLenum colorFormat, + const GLfloat *coeffs ); +typedef void( APIENTRYP PFNGLPATHTEXGENNVPROC )( GLenum texCoordSet, GLenum genMode, GLint components, + const GLfloat *coeffs ); +typedef void( APIENTRYP PFNGLPATHFOGGENNVPROC )( GLenum genMode ); +typedef void( APIENTRYP PFNGLCOVERFILLPATHNVPROC )( GLuint path, GLenum coverMode ); +typedef void( APIENTRYP PFNGLCOVERSTROKEPATHNVPROC )( GLuint path, GLenum coverMode ); +typedef void( APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC )( GLsizei numPaths, GLenum pathNameType, + const GLvoid *paths, GLuint pathBase, + GLenum coverMode, GLenum transformType, + const GLfloat *transformValues ); +typedef void( APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC )( GLsizei numPaths, GLenum pathNameType, + const GLvoid *paths, GLuint pathBase, + GLenum coverMode, GLenum transformType, + const GLfloat *transformValues ); +typedef void( APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC )( GLuint path, GLenum pname, GLint *value ); +typedef void( APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC )( GLuint path, GLenum pname, GLfloat *value ); +typedef void( APIENTRYP PFNGLGETPATHCOMMANDSNVPROC )( GLuint path, GLubyte *commands ); +typedef void( APIENTRYP PFNGLGETPATHCOORDSNVPROC )( GLuint path, GLfloat *coords ); +typedef void( APIENTRYP PFNGLGETPATHDASHARRAYNVPROC )( GLuint path, GLfloat *dashArray ); +typedef void( APIENTRYP PFNGLGETPATHMETRICSNVPROC )( GLbitfield metricQueryMask, GLsizei numPaths, + GLenum pathNameType, const GLvoid *paths, + GLuint pathBase, GLsizei stride, GLfloat *metrics ); +typedef void( APIENTRYP PFNGLGETPATHMETRICRANGENVPROC )( GLbitfield metricQueryMask, + GLuint firstPathName, GLsizei numPaths, + GLsizei stride, GLfloat *metrics ); +typedef void( APIENTRYP PFNGLGETPATHSPACINGNVPROC )( GLenum pathListMode, GLsizei numPaths, + GLenum pathNameType, const GLvoid *paths, + GLuint pathBase, GLfloat advanceScale, + GLfloat kerningScale, GLenum transformType, + GLfloat *returnedSpacing ); +typedef void( APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC )( GLenum color, GLenum pname, GLint *value ); +typedef void( APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC )( GLenum color, GLenum pname, GLfloat *value ); +typedef void( APIENTRYP PFNGLGETPATHTEXGENIVNVPROC )( GLenum texCoordSet, GLenum pname, GLint *value ); +typedef void( APIENTRYP PFNGLGETPATHTEXGENFVNVPROC )( GLenum texCoordSet, GLenum pname, GLfloat *value ); +typedef GLboolean( APIENTRYP PFNGLISPOINTINFILLPATHNVPROC )( GLuint path, GLuint mask, GLfloat x, + GLfloat y ); +typedef GLboolean( APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC )( GLuint path, GLfloat x, GLfloat y ); +typedef GLfloat( APIENTRYP PFNGLGETPATHLENGTHNVPROC )( GLuint path, GLsizei startSegment, + GLsizei numSegments ); +typedef GLboolean( APIENTRYP PFNGLPOINTALONGPATHNVPROC )( GLuint path, GLsizei startSegment, + GLsizei numSegments, GLfloat distance, + GLfloat *x, GLfloat *y, GLfloat *tangentX, + GLfloat *tangentY ); #endif #ifndef GL_AMD_pinned_memory -#define GL_AMD_pinned_memory 1 +# define GL_AMD_pinned_memory 1 #endif #ifndef GL_AMD_stencil_operation_extended -#define GL_AMD_stencil_operation_extended 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value); +# define GL_AMD_stencil_operation_extended 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilOpValueAMD( GLenum face, GLuint value ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLSTENCILOPVALUEAMDPROC )( GLenum face, GLuint value ); #endif #ifndef GL_AMD_vertex_shader_viewport_index -#define GL_AMD_vertex_shader_viewport_index 1 +# define GL_AMD_vertex_shader_viewport_index 1 #endif #ifndef GL_AMD_vertex_shader_layer -#define GL_AMD_vertex_shader_layer 1 +# define GL_AMD_vertex_shader_layer 1 #endif #ifndef GL_NV_bindless_texture -#define GL_NV_bindless_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture); -GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler); -GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle); -GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle); -GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access); -GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle); -GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value); -GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value); -GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value); -GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle); -GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture); -typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle); -typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access); -typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); -typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle); +# define GL_NV_bindless_texture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint64 APIENTRY glGetTextureHandleNV( GLuint texture ); +GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV( GLuint texture, GLuint sampler ); +GLAPI void APIENTRY glMakeTextureHandleResidentNV( GLuint64 handle ); +GLAPI void APIENTRY glMakeTextureHandleNonResidentNV( GLuint64 handle ); +GLAPI GLuint64 APIENTRY glGetImageHandleNV( GLuint texture, GLint level, GLboolean layered, GLint layer, + GLenum format ); +GLAPI void APIENTRY glMakeImageHandleResidentNV( GLuint64 handle, GLenum access ); +GLAPI void APIENTRY glMakeImageHandleNonResidentNV( GLuint64 handle ); +GLAPI void APIENTRY glUniformHandleui64NV( GLint location, GLuint64 value ); +GLAPI void APIENTRY glUniformHandleui64vNV( GLint location, GLsizei count, const GLuint64 *value ); +GLAPI void APIENTRY glProgramUniformHandleui64NV( GLuint program, GLint location, GLuint64 value ); +GLAPI void APIENTRY glProgramUniformHandleui64vNV( GLuint program, GLint location, GLsizei count, + const GLuint64 *values ); +GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV( GLuint64 handle ); +GLAPI GLboolean APIENTRY glIsImageHandleResidentNV( GLuint64 handle ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint64( APIENTRYP PFNGLGETTEXTUREHANDLENVPROC )( GLuint texture ); +typedef GLuint64( APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC )( GLuint texture, GLuint sampler ); +typedef void( APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC )( GLuint64 handle ); +typedef void( APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC )( GLuint64 handle ); +typedef GLuint64( APIENTRYP PFNGLGETIMAGEHANDLENVPROC )( GLuint texture, GLint level, GLboolean layered, + GLint layer, GLenum format ); +typedef void( APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC )( GLuint64 handle, GLenum access ); +typedef void( APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC )( GLuint64 handle ); +typedef void( APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC )( GLint location, GLuint64 value ); +typedef void( APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC )( GLint location, GLsizei count, + const GLuint64 *value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC )( GLuint program, GLint location, + GLuint64 value ); +typedef void( APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC )( GLuint program, GLint location, + GLsizei count, const GLuint64 *values ); +typedef GLboolean( APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC )( GLuint64 handle ); +typedef GLboolean( APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC )( GLuint64 handle ); #endif #ifndef GL_NV_shader_atomic_float -#define GL_NV_shader_atomic_float 1 +# define GL_NV_shader_atomic_float 1 #endif #ifndef GL_AMD_query_buffer_object -#define GL_AMD_query_buffer_object 1 +# define GL_AMD_query_buffer_object 1 #endif #ifndef GL_AMD_sparse_texture -#define GL_AMD_sparse_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); -GLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); -typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +# define GL_AMD_sparse_texture 1 +# ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexStorageSparseAMD( GLenum target, GLenum internalFormat, GLsizei width, + GLsizei height, GLsizei depth, GLsizei layers, + GLbitfield flags ); +GLAPI void APIENTRY glTextureStorageSparseAMD( GLuint texture, GLenum target, GLenum internalFormat, + GLsizei width, GLsizei height, GLsizei depth, + GLsizei layers, GLbitfield flags ); +# endif /* GL_GLEXT_PROTOTYPES */ +typedef void( APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC )( GLenum target, GLenum internalFormat, + GLsizei width, GLsizei height, GLsizei depth, + GLsizei layers, GLbitfield flags ); +typedef void( APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC )( GLuint texture, GLenum target, + GLenum internalFormat, GLsizei width, + GLsizei height, GLsizei depth, + GLsizei layers, GLbitfield flags ); #endif - #ifdef __cplusplus } #endif diff --git a/include/GL/glxext.h b/include/GL/glxext.h index 65b1e6e..cf8bcb6 100644 --- a/include/GL/glxext.h +++ b/include/GL/glxext.h @@ -7,7 +7,7 @@ extern "C" { /* ** Copyright (c) 2007-2013 The Khronos Group Inc. -** +** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, including @@ -15,10 +15,10 @@ extern "C" { ** distribute, sublicense, and/or sell copies of the Materials, and to ** permit persons to whom the Materials are furnished to do so, subject to ** the following conditions: -** +** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Materials. -** +** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -30,19 +30,19 @@ extern "C" { /* Function declaration macros - to move into glplatform.h */ -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define WIN32_LEAN_AND_MEAN 1 -#include +#if defined( _WIN32 ) && !defined( APIENTRY ) && !defined( __CYGWIN__ ) && !defined( __SCITECH_SNAP__ ) +# define WIN32_LEAN_AND_MEAN 1 +# include #endif #ifndef APIENTRY -#define APIENTRY +# define APIENTRY #endif #ifndef APIENTRYP -#define APIENTRYP APIENTRY * +# define APIENTRYP APIENTRY * #endif #ifndef GLAPI -#define GLAPI extern +# define GLAPI extern #endif /*************************************************************/ @@ -53,133 +53,133 @@ extern "C" { #define GLX_GLXEXT_VERSION 33 #ifndef GLX_VERSION_1_3 -#define GLX_WINDOW_BIT 0x00000001 -#define GLX_PIXMAP_BIT 0x00000002 -#define GLX_PBUFFER_BIT 0x00000004 -#define GLX_RGBA_BIT 0x00000001 -#define GLX_COLOR_INDEX_BIT 0x00000002 -#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 -#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 -#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 -#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 -#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 -#define GLX_AUX_BUFFERS_BIT 0x00000010 -#define GLX_DEPTH_BUFFER_BIT 0x00000020 -#define GLX_STENCIL_BUFFER_BIT 0x00000040 -#define GLX_ACCUM_BUFFER_BIT 0x00000080 -#define GLX_CONFIG_CAVEAT 0x20 -#define GLX_X_VISUAL_TYPE 0x22 -#define GLX_TRANSPARENT_TYPE 0x23 -#define GLX_TRANSPARENT_INDEX_VALUE 0x24 -#define GLX_TRANSPARENT_RED_VALUE 0x25 -#define GLX_TRANSPARENT_GREEN_VALUE 0x26 -#define GLX_TRANSPARENT_BLUE_VALUE 0x27 -#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 -#define GLX_DONT_CARE 0xFFFFFFFF -#define GLX_NONE 0x8000 -#define GLX_SLOW_CONFIG 0x8001 -#define GLX_TRUE_COLOR 0x8002 -#define GLX_DIRECT_COLOR 0x8003 -#define GLX_PSEUDO_COLOR 0x8004 -#define GLX_STATIC_COLOR 0x8005 -#define GLX_GRAY_SCALE 0x8006 -#define GLX_STATIC_GRAY 0x8007 -#define GLX_TRANSPARENT_RGB 0x8008 -#define GLX_TRANSPARENT_INDEX 0x8009 -#define GLX_VISUAL_ID 0x800B -#define GLX_SCREEN 0x800C -#define GLX_NON_CONFORMANT_CONFIG 0x800D -#define GLX_DRAWABLE_TYPE 0x8010 -#define GLX_RENDER_TYPE 0x8011 -#define GLX_X_RENDERABLE 0x8012 -#define GLX_FBCONFIG_ID 0x8013 -#define GLX_RGBA_TYPE 0x8014 -#define GLX_COLOR_INDEX_TYPE 0x8015 -#define GLX_MAX_PBUFFER_WIDTH 0x8016 -#define GLX_MAX_PBUFFER_HEIGHT 0x8017 -#define GLX_MAX_PBUFFER_PIXELS 0x8018 -#define GLX_PRESERVED_CONTENTS 0x801B -#define GLX_LARGEST_PBUFFER 0x801C -#define GLX_WIDTH 0x801D -#define GLX_HEIGHT 0x801E -#define GLX_EVENT_MASK 0x801F -#define GLX_DAMAGED 0x8020 -#define GLX_SAVED 0x8021 -#define GLX_WINDOW 0x8022 -#define GLX_PBUFFER 0x8023 -#define GLX_PBUFFER_HEIGHT 0x8040 -#define GLX_PBUFFER_WIDTH 0x8041 +# define GLX_WINDOW_BIT 0x00000001 +# define GLX_PIXMAP_BIT 0x00000002 +# define GLX_PBUFFER_BIT 0x00000004 +# define GLX_RGBA_BIT 0x00000001 +# define GLX_COLOR_INDEX_BIT 0x00000002 +# define GLX_PBUFFER_CLOBBER_MASK 0x08000000 +# define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +# define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +# define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +# define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +# define GLX_AUX_BUFFERS_BIT 0x00000010 +# define GLX_DEPTH_BUFFER_BIT 0x00000020 +# define GLX_STENCIL_BUFFER_BIT 0x00000040 +# define GLX_ACCUM_BUFFER_BIT 0x00000080 +# define GLX_CONFIG_CAVEAT 0x20 +# define GLX_X_VISUAL_TYPE 0x22 +# define GLX_TRANSPARENT_TYPE 0x23 +# define GLX_TRANSPARENT_INDEX_VALUE 0x24 +# define GLX_TRANSPARENT_RED_VALUE 0x25 +# define GLX_TRANSPARENT_GREEN_VALUE 0x26 +# define GLX_TRANSPARENT_BLUE_VALUE 0x27 +# define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +# define GLX_DONT_CARE 0xFFFFFFFF +# define GLX_NONE 0x8000 +# define GLX_SLOW_CONFIG 0x8001 +# define GLX_TRUE_COLOR 0x8002 +# define GLX_DIRECT_COLOR 0x8003 +# define GLX_PSEUDO_COLOR 0x8004 +# define GLX_STATIC_COLOR 0x8005 +# define GLX_GRAY_SCALE 0x8006 +# define GLX_STATIC_GRAY 0x8007 +# define GLX_TRANSPARENT_RGB 0x8008 +# define GLX_TRANSPARENT_INDEX 0x8009 +# define GLX_VISUAL_ID 0x800B +# define GLX_SCREEN 0x800C +# define GLX_NON_CONFORMANT_CONFIG 0x800D +# define GLX_DRAWABLE_TYPE 0x8010 +# define GLX_RENDER_TYPE 0x8011 +# define GLX_X_RENDERABLE 0x8012 +# define GLX_FBCONFIG_ID 0x8013 +# define GLX_RGBA_TYPE 0x8014 +# define GLX_COLOR_INDEX_TYPE 0x8015 +# define GLX_MAX_PBUFFER_WIDTH 0x8016 +# define GLX_MAX_PBUFFER_HEIGHT 0x8017 +# define GLX_MAX_PBUFFER_PIXELS 0x8018 +# define GLX_PRESERVED_CONTENTS 0x801B +# define GLX_LARGEST_PBUFFER 0x801C +# define GLX_WIDTH 0x801D +# define GLX_HEIGHT 0x801E +# define GLX_EVENT_MASK 0x801F +# define GLX_DAMAGED 0x8020 +# define GLX_SAVED 0x8021 +# define GLX_WINDOW 0x8022 +# define GLX_PBUFFER 0x8023 +# define GLX_PBUFFER_HEIGHT 0x8040 +# define GLX_PBUFFER_WIDTH 0x8041 #endif #ifndef GLX_VERSION_1_4 -#define GLX_SAMPLE_BUFFERS 100000 -#define GLX_SAMPLES 100001 +# define GLX_SAMPLE_BUFFERS 100000 +# define GLX_SAMPLES 100001 #endif #ifndef GLX_ARB_get_proc_address #endif #ifndef GLX_ARB_multisample -#define GLX_SAMPLE_BUFFERS_ARB 100000 -#define GLX_SAMPLES_ARB 100001 +# define GLX_SAMPLE_BUFFERS_ARB 100000 +# define GLX_SAMPLES_ARB 100001 #endif #ifndef GLX_ARB_vertex_buffer_object -#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095 +# define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095 #endif #ifndef GLX_ARB_fbconfig_float -#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 -#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 +# define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 +# define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 #endif #ifndef GLX_ARB_framebuffer_sRGB -#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2 +# define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2 #endif #ifndef GLX_ARB_create_context -#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 -#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 -#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 -#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 -#define GLX_CONTEXT_FLAGS_ARB 0x2094 +# define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 +# define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +# define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 +# define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 +# define GLX_CONTEXT_FLAGS_ARB 0x2094 #endif #ifndef GLX_ARB_create_context_profile -#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 -#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 -#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 +# define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +# define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +# define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 #endif #ifndef GLX_ARB_create_context_robustness -#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261 +# define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +# define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +# define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +# define GLX_NO_RESET_NOTIFICATION_ARB 0x8261 #endif #ifndef GLX_SGIS_multisample -#define GLX_SAMPLE_BUFFERS_SGIS 100000 -#define GLX_SAMPLES_SGIS 100001 +# define GLX_SAMPLE_BUFFERS_SGIS 100000 +# define GLX_SAMPLES_SGIS 100001 #endif #ifndef GLX_EXT_visual_info -#define GLX_X_VISUAL_TYPE_EXT 0x22 -#define GLX_TRANSPARENT_TYPE_EXT 0x23 -#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 -#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 -#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 -#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 -#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 -#define GLX_NONE_EXT 0x8000 -#define GLX_TRUE_COLOR_EXT 0x8002 -#define GLX_DIRECT_COLOR_EXT 0x8003 -#define GLX_PSEUDO_COLOR_EXT 0x8004 -#define GLX_STATIC_COLOR_EXT 0x8005 -#define GLX_GRAY_SCALE_EXT 0x8006 -#define GLX_STATIC_GRAY_EXT 0x8007 -#define GLX_TRANSPARENT_RGB_EXT 0x8008 -#define GLX_TRANSPARENT_INDEX_EXT 0x8009 +# define GLX_X_VISUAL_TYPE_EXT 0x22 +# define GLX_TRANSPARENT_TYPE_EXT 0x23 +# define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 +# define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 +# define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 +# define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 +# define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 +# define GLX_NONE_EXT 0x8000 +# define GLX_TRUE_COLOR_EXT 0x8002 +# define GLX_DIRECT_COLOR_EXT 0x8003 +# define GLX_PSEUDO_COLOR_EXT 0x8004 +# define GLX_STATIC_COLOR_EXT 0x8005 +# define GLX_GRAY_SCALE_EXT 0x8006 +# define GLX_STATIC_GRAY_EXT 0x8007 +# define GLX_TRANSPARENT_RGB_EXT 0x8008 +# define GLX_TRANSPARENT_INDEX_EXT 0x8009 #endif #ifndef GLX_SGI_swap_control @@ -195,70 +195,70 @@ extern "C" { #endif #ifndef GLX_EXT_visual_rating -#define GLX_VISUAL_CAVEAT_EXT 0x20 -#define GLX_SLOW_VISUAL_EXT 0x8001 -#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D +# define GLX_VISUAL_CAVEAT_EXT 0x20 +# define GLX_SLOW_VISUAL_EXT 0x8001 +# define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D /* reuse GLX_NONE_EXT */ #endif #ifndef GLX_EXT_import_context -#define GLX_SHARE_CONTEXT_EXT 0x800A -#define GLX_VISUAL_ID_EXT 0x800B -#define GLX_SCREEN_EXT 0x800C +# define GLX_SHARE_CONTEXT_EXT 0x800A +# define GLX_VISUAL_ID_EXT 0x800B +# define GLX_SCREEN_EXT 0x800C #endif #ifndef GLX_SGIX_fbconfig -#define GLX_WINDOW_BIT_SGIX 0x00000001 -#define GLX_PIXMAP_BIT_SGIX 0x00000002 -#define GLX_RGBA_BIT_SGIX 0x00000001 -#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 -#define GLX_DRAWABLE_TYPE_SGIX 0x8010 -#define GLX_RENDER_TYPE_SGIX 0x8011 -#define GLX_X_RENDERABLE_SGIX 0x8012 -#define GLX_FBCONFIG_ID_SGIX 0x8013 -#define GLX_RGBA_TYPE_SGIX 0x8014 -#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 +# define GLX_WINDOW_BIT_SGIX 0x00000001 +# define GLX_PIXMAP_BIT_SGIX 0x00000002 +# define GLX_RGBA_BIT_SGIX 0x00000001 +# define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 +# define GLX_DRAWABLE_TYPE_SGIX 0x8010 +# define GLX_RENDER_TYPE_SGIX 0x8011 +# define GLX_X_RENDERABLE_SGIX 0x8012 +# define GLX_FBCONFIG_ID_SGIX 0x8013 +# define GLX_RGBA_TYPE_SGIX 0x8014 +# define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 /* reuse GLX_SCREEN_EXT */ #endif #ifndef GLX_SGIX_pbuffer -#define GLX_PBUFFER_BIT_SGIX 0x00000004 -#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 -#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 -#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 -#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 -#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 -#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 -#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 -#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 -#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 -#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 -#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 -#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 -#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 -#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 -#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A -#define GLX_PRESERVED_CONTENTS_SGIX 0x801B -#define GLX_LARGEST_PBUFFER_SGIX 0x801C -#define GLX_WIDTH_SGIX 0x801D -#define GLX_HEIGHT_SGIX 0x801E -#define GLX_EVENT_MASK_SGIX 0x801F -#define GLX_DAMAGED_SGIX 0x8020 -#define GLX_SAVED_SGIX 0x8021 -#define GLX_WINDOW_SGIX 0x8022 -#define GLX_PBUFFER_SGIX 0x8023 +# define GLX_PBUFFER_BIT_SGIX 0x00000004 +# define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 +# define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 +# define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 +# define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 +# define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 +# define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 +# define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 +# define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 +# define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 +# define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 +# define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 +# define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 +# define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 +# define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 +# define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A +# define GLX_PRESERVED_CONTENTS_SGIX 0x801B +# define GLX_LARGEST_PBUFFER_SGIX 0x801C +# define GLX_WIDTH_SGIX 0x801D +# define GLX_HEIGHT_SGIX 0x801E +# define GLX_EVENT_MASK_SGIX 0x801F +# define GLX_DAMAGED_SGIX 0x8020 +# define GLX_SAVED_SGIX 0x8021 +# define GLX_WINDOW_SGIX 0x8022 +# define GLX_PBUFFER_SGIX 0x8023 #endif #ifndef GLX_SGI_cushion #endif #ifndef GLX_SGIX_video_resize -#define GLX_SYNC_FRAME_SGIX 0x00000000 -#define GLX_SYNC_SWAP_SGIX 0x00000001 +# define GLX_SYNC_FRAME_SGIX 0x00000000 +# define GLX_SYNC_SWAP_SGIX 0x00000001 #endif #ifndef GLX_SGIX_dmbuffer -#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 +# define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 #endif #ifndef GLX_SGIX_swap_group @@ -268,20 +268,20 @@ extern "C" { #endif #ifndef GLX_SGIS_blended_overlay -#define GLX_BLENDED_RGBA_SGIS 0x8025 +# define GLX_BLENDED_RGBA_SGIS 0x8025 #endif #ifndef GLX_SGIS_shared_multisample -#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 -#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 +# define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 +# define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 #endif #ifndef GLX_SUN_get_transparent_index #endif #ifndef GLX_3DFX_multisample -#define GLX_SAMPLE_BUFFERS_3DFX 0x8050 -#define GLX_SAMPLES_3DFX 0x8051 +# define GLX_SAMPLE_BUFFERS_3DFX 0x8050 +# define GLX_SAMPLES_3DFX 0x8051 #endif #ifndef GLX_MESA_copy_sub_buffer @@ -294,165 +294,164 @@ extern "C" { #endif #ifndef GLX_MESA_set_3dfx_mode -#define GLX_3DFX_WINDOW_MODE_MESA 0x1 -#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 +# define GLX_3DFX_WINDOW_MODE_MESA 0x1 +# define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 #endif #ifndef GLX_SGIX_visual_select_group -#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 +# define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 #endif #ifndef GLX_OML_swap_method -#define GLX_SWAP_METHOD_OML 0x8060 -#define GLX_SWAP_EXCHANGE_OML 0x8061 -#define GLX_SWAP_COPY_OML 0x8062 -#define GLX_SWAP_UNDEFINED_OML 0x8063 +# define GLX_SWAP_METHOD_OML 0x8060 +# define GLX_SWAP_EXCHANGE_OML 0x8061 +# define GLX_SWAP_COPY_OML 0x8062 +# define GLX_SWAP_UNDEFINED_OML 0x8063 #endif #ifndef GLX_OML_sync_control #endif #ifndef GLX_NV_float_buffer -#define GLX_FLOAT_COMPONENTS_NV 0x20B0 +# define GLX_FLOAT_COMPONENTS_NV 0x20B0 #endif #ifndef GLX_SGIX_hyperpipe -#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 -#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 -#define GLX_BAD_HYPERPIPE_SGIX 92 -#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 -#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 -#define GLX_PIPE_RECT_SGIX 0x00000001 -#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 -#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 -#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 -#define GLX_HYPERPIPE_ID_SGIX 0x8030 +# define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 +# define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 +# define GLX_BAD_HYPERPIPE_SGIX 92 +# define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 +# define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 +# define GLX_PIPE_RECT_SGIX 0x00000001 +# define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 +# define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 +# define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 +# define GLX_HYPERPIPE_ID_SGIX 0x8030 #endif #ifndef GLX_MESA_agp_offset #endif #ifndef GLX_EXT_fbconfig_packed_float -#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 -#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 +# define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 +# define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 #endif #ifndef GLX_EXT_framebuffer_sRGB -#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 +# define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 #endif #ifndef GLX_EXT_texture_from_pixmap -#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 -#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 -#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 -#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 -#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 -#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 -#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 -#define GLX_Y_INVERTED_EXT 0x20D4 -#define GLX_TEXTURE_FORMAT_EXT 0x20D5 -#define GLX_TEXTURE_TARGET_EXT 0x20D6 -#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 -#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 -#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 -#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA -#define GLX_TEXTURE_1D_EXT 0x20DB -#define GLX_TEXTURE_2D_EXT 0x20DC -#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD -#define GLX_FRONT_LEFT_EXT 0x20DE -#define GLX_FRONT_RIGHT_EXT 0x20DF -#define GLX_BACK_LEFT_EXT 0x20E0 -#define GLX_BACK_RIGHT_EXT 0x20E1 -#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT -#define GLX_BACK_EXT GLX_BACK_LEFT_EXT -#define GLX_AUX0_EXT 0x20E2 -#define GLX_AUX1_EXT 0x20E3 -#define GLX_AUX2_EXT 0x20E4 -#define GLX_AUX3_EXT 0x20E5 -#define GLX_AUX4_EXT 0x20E6 -#define GLX_AUX5_EXT 0x20E7 -#define GLX_AUX6_EXT 0x20E8 -#define GLX_AUX7_EXT 0x20E9 -#define GLX_AUX8_EXT 0x20EA -#define GLX_AUX9_EXT 0x20EB +# define GLX_TEXTURE_1D_BIT_EXT 0x00000001 +# define GLX_TEXTURE_2D_BIT_EXT 0x00000002 +# define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 +# define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 +# define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 +# define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 +# define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 +# define GLX_Y_INVERTED_EXT 0x20D4 +# define GLX_TEXTURE_FORMAT_EXT 0x20D5 +# define GLX_TEXTURE_TARGET_EXT 0x20D6 +# define GLX_MIPMAP_TEXTURE_EXT 0x20D7 +# define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 +# define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 +# define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA +# define GLX_TEXTURE_1D_EXT 0x20DB +# define GLX_TEXTURE_2D_EXT 0x20DC +# define GLX_TEXTURE_RECTANGLE_EXT 0x20DD +# define GLX_FRONT_LEFT_EXT 0x20DE +# define GLX_FRONT_RIGHT_EXT 0x20DF +# define GLX_BACK_LEFT_EXT 0x20E0 +# define GLX_BACK_RIGHT_EXT 0x20E1 +# define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT +# define GLX_BACK_EXT GLX_BACK_LEFT_EXT +# define GLX_AUX0_EXT 0x20E2 +# define GLX_AUX1_EXT 0x20E3 +# define GLX_AUX2_EXT 0x20E4 +# define GLX_AUX3_EXT 0x20E5 +# define GLX_AUX4_EXT 0x20E6 +# define GLX_AUX5_EXT 0x20E7 +# define GLX_AUX6_EXT 0x20E8 +# define GLX_AUX7_EXT 0x20E9 +# define GLX_AUX8_EXT 0x20EA +# define GLX_AUX9_EXT 0x20EB #endif #ifndef GLX_NV_present_video -#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0 +# define GLX_NUM_VIDEO_SLOTS_NV 0x20F0 #endif #ifndef GLX_NV_video_out -#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 -#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 -#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5 -#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 -#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 -#define GLX_VIDEO_OUT_FRAME_NV 0x20C8 -#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 -#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA -#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB -#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC +# define GLX_VIDEO_OUT_COLOR_NV 0x20C3 +# define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 +# define GLX_VIDEO_OUT_DEPTH_NV 0x20C5 +# define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +# define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +# define GLX_VIDEO_OUT_FRAME_NV 0x20C8 +# define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 +# define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA +# define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB +# define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC #endif #ifndef GLX_NV_swap_group #endif #ifndef GLX_NV_video_capture -#define GLX_DEVICE_ID_NV 0x20CD -#define GLX_UNIQUE_ID_NV 0x20CE -#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +# define GLX_DEVICE_ID_NV 0x20CD +# define GLX_UNIQUE_ID_NV 0x20CE +# define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF #endif #ifndef GLX_EXT_swap_control -#define GLX_SWAP_INTERVAL_EXT 0x20F1 -#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2 +# define GLX_SWAP_INTERVAL_EXT 0x20F1 +# define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2 #endif #ifndef GLX_NV_copy_image #endif #ifndef GLX_INTEL_swap_event -#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000 -#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180 -#define GLX_COPY_COMPLETE_INTEL 0x8181 -#define GLX_FLIP_COMPLETE_INTEL 0x8182 +# define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000 +# define GLX_EXCHANGE_COMPLETE_INTEL 0x8180 +# define GLX_COPY_COMPLETE_INTEL 0x8181 +# define GLX_FLIP_COMPLETE_INTEL 0x8182 #endif #ifndef GLX_NV_multisample_coverage -#define GLX_COVERAGE_SAMPLES_NV 100001 -#define GLX_COLOR_SAMPLES_NV 0x20B3 +# define GLX_COVERAGE_SAMPLES_NV 100001 +# define GLX_COLOR_SAMPLES_NV 0x20B3 #endif #ifndef GLX_AMD_gpu_association -#define GLX_GPU_VENDOR_AMD 0x1F00 -#define GLX_GPU_RENDERER_STRING_AMD 0x1F01 -#define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 -#define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 -#define GLX_GPU_RAM_AMD 0x21A3 -#define GLX_GPU_CLOCK_AMD 0x21A4 -#define GLX_GPU_NUM_PIPES_AMD 0x21A5 -#define GLX_GPU_NUM_SIMD_AMD 0x21A6 -#define GLX_GPU_NUM_RB_AMD 0x21A7 -#define GLX_GPU_NUM_SPI_AMD 0x21A8 +# define GLX_GPU_VENDOR_AMD 0x1F00 +# define GLX_GPU_RENDERER_STRING_AMD 0x1F01 +# define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +# define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +# define GLX_GPU_RAM_AMD 0x21A3 +# define GLX_GPU_CLOCK_AMD 0x21A4 +# define GLX_GPU_NUM_PIPES_AMD 0x21A5 +# define GLX_GPU_NUM_SIMD_AMD 0x21A6 +# define GLX_GPU_NUM_RB_AMD 0x21A7 +# define GLX_GPU_NUM_SPI_AMD 0x21A8 #endif #ifndef GLX_EXT_create_context_es2_profile -#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +# define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 #endif #ifndef GLX_EXT_swap_control_tear -#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3 +# define GLX_LATE_SWAPS_TEAR_EXT 0x20F3 #endif #ifndef GLX_EXT_buffer_age -#define GLX_BACK_BUFFER_AGE_EXT 0x20F4 +# define GLX_BACK_BUFFER_AGE_EXT 0x20F4 #endif - /*************************************************************/ #ifndef GLX_ARB_get_proc_address -typedef void (*__GLXextFuncPtr)(void); +typedef void ( *__GLXextFuncPtr )( void ); #endif #ifndef GLX_SGIX_video_source @@ -460,24 +459,25 @@ typedef XID GLXVideoSourceSGIX; #endif #ifndef GLX_SGIX_fbconfig -typedef XID GLXFBConfigIDSGIX; +typedef XID GLXFBConfigIDSGIX; typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; #endif #ifndef GLX_SGIX_pbuffer typedef XID GLXPbufferSGIX; -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came for SendEvent request */ - Display *display; /* display the event was read from */ - GLXDrawable drawable; /* i.d. of Drawable */ - int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ - int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ - unsigned int mask; /* mask indicating which buffers are affected*/ - int x, y; - int width, height; - int count; /* if nonzero, at least this many more */ +typedef struct +{ + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came for SendEvent request */ + Display * display; /* display the event was read from */ + GLXDrawable drawable; /* i.d. of Drawable */ + int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ + int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ + unsigned int mask; /* mask indicating which buffers are affected*/ + int x, y; + int width, height; + int count; /* if nonzero, at least this many more */ } GLXBufferClobberEventSGIX; #endif @@ -491,517 +491,618 @@ typedef XID GLXVideoCaptureDeviceNV; #ifndef GLEXT_64_TYPES_DEFINED /* This code block is duplicated in glext.h, so must be protected */ -#define GLEXT_64_TYPES_DEFINED +# define GLEXT_64_TYPES_DEFINED /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ /* (as used in the GLX_OML_sync_control extension). */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include -#elif defined(__sun__) || defined(__digital__) -#include -#if defined(__STDC__) -#if defined(__arch64__) || defined(_LP64) -typedef long int int64_t; +# if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L +# include +# elif defined( __sun__ ) || defined( __digital__ ) +# include +# if defined( __STDC__ ) +# if defined( __arch64__ ) || defined( _LP64 ) +typedef long int int64_t; typedef unsigned long int uint64_t; -#else -typedef long long int int64_t; +# else +typedef long long int int64_t; typedef unsigned long long int uint64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined( __VMS ) || defined(__sgi) -#include -#elif defined(__SCO__) || defined(__USLC__) -#include -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; +# endif /* __arch64__ */ +# endif /* __STDC__ */ +# elif defined( __VMS ) || defined( __sgi ) +# include +# elif defined( __SCO__ ) || defined( __USLC__ ) +# include +# elif defined( __UNIXOS2__ ) || defined( __SOL64__ ) +typedef long int int32_t; +typedef long long int int64_t; typedef unsigned long long int uint64_t; -#elif defined(_WIN32) && defined(__GNUC__) -#include -#elif defined(_WIN32) -typedef __int32 int32_t; -typedef __int64 int64_t; +# elif defined( _WIN32 ) && defined( __GNUC__ ) +# include +# elif defined( _WIN32 ) +typedef __int32 int32_t; +typedef __int64 int64_t; typedef unsigned __int64 uint64_t; -#else -#include /* Fallback option */ -#endif +# else +# include /* Fallback option */ +# endif #endif #ifndef GLX_VERSION_1_3 -#define GLX_VERSION_1_3 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXFBConfig * glXGetFBConfigs (Display *dpy, int screen, int *nelements); -extern GLXFBConfig * glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements); -extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value); -extern XVisualInfo * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config); -extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); -extern void glXDestroyWindow (Display *dpy, GLXWindow win); -extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); -extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap); -extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list); -extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf); -extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); -extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); -extern Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -extern GLXDrawable glXGetCurrentReadDrawable (void); -extern Display * glXGetCurrentDisplay (void); -extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value); -extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask); -extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); -typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); -typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); -typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); -typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); -typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); -typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); -typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); -typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); -typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); -typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); -typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); -typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void); -typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void); -typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); -typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); -typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); +# define GLX_VERSION_1_3 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen, int *nelements ); +extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen, const int *attrib_list, + int *nelements ); +extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config, int attribute, int *value ); +extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ); +extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config, Window win, const int *attrib_list ); +extern void glXDestroyWindow( Display *dpy, GLXWindow win ); +extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config, Pixmap pixmap, + const int *attrib_list ); +extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap ); +extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config, const int *attrib_list ); +extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf ); +extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute, unsigned int *value ); +extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config, int render_type, + GLXContext share_list, Bool direct ); +extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx ); +extern GLXDrawable glXGetCurrentReadDrawable( void ); +extern Display * glXGetCurrentDisplay( void ); +extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute, int *value ); +extern void glXSelectEvent( Display *dpy, GLXDrawable draw, unsigned long event_mask ); +extern void glXGetSelectedEvent( Display *dpy, GLXDrawable draw, unsigned long *event_mask ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXFBConfig *( *PFNGLXGETFBCONFIGSPROC )( Display *dpy, int screen, int *nelements ); +typedef GLXFBConfig *( *PFNGLXCHOOSEFBCONFIGPROC )( Display *dpy, int screen, const int *attrib_list, + int *nelements ); +typedef int ( *PFNGLXGETFBCONFIGATTRIBPROC )( Display *dpy, GLXFBConfig config, int attribute, + int *value ); +typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGPROC )( Display *dpy, GLXFBConfig config ); +typedef GLXWindow ( *PFNGLXCREATEWINDOWPROC )( Display *dpy, GLXFBConfig config, Window win, + const int *attrib_list ); +typedef void ( *PFNGLXDESTROYWINDOWPROC )( Display *dpy, GLXWindow win ); +typedef GLXPixmap ( *PFNGLXCREATEPIXMAPPROC )( Display *dpy, GLXFBConfig config, Pixmap pixmap, + const int *attrib_list ); +typedef void ( *PFNGLXDESTROYPIXMAPPROC )( Display *dpy, GLXPixmap pixmap ); +typedef GLXPbuffer ( *PFNGLXCREATEPBUFFERPROC )( Display *dpy, GLXFBConfig config, + const int *attrib_list ); +typedef void ( *PFNGLXDESTROYPBUFFERPROC )( Display *dpy, GLXPbuffer pbuf ); +typedef void ( *PFNGLXQUERYDRAWABLEPROC )( Display *dpy, GLXDrawable draw, int attribute, + unsigned int *value ); +typedef GLXContext ( *PFNGLXCREATENEWCONTEXTPROC )( Display *dpy, GLXFBConfig config, int render_type, + GLXContext share_list, Bool direct ); +typedef Bool ( *PFNGLXMAKECONTEXTCURRENTPROC )( Display *dpy, GLXDrawable draw, GLXDrawable read, + GLXContext ctx ); +typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLEPROC )( void ); +typedef Display *( *PFNGLXGETCURRENTDISPLAYPROC )( void ); +typedef int ( *PFNGLXQUERYCONTEXTPROC )( Display *dpy, GLXContext ctx, int attribute, int *value ); +typedef void ( *PFNGLXSELECTEVENTPROC )( Display *dpy, GLXDrawable draw, unsigned long event_mask ); +typedef void ( *PFNGLXGETSELECTEDEVENTPROC )( Display *dpy, GLXDrawable draw, + unsigned long *event_mask ); #endif #ifndef GLX_VERSION_1_4 -#define GLX_VERSION_1_4 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *procName); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); +# define GLX_VERSION_1_4 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern __GLXextFuncPtr glXGetProcAddress( const GLubyte *procName ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSPROC )( const GLubyte *procName ); #endif #ifndef GLX_ARB_get_proc_address -#define GLX_ARB_get_proc_address 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); +# define GLX_ARB_get_proc_address 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern __GLXextFuncPtr glXGetProcAddressARB( const GLubyte *procName ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSARBPROC )( const GLubyte *procName ); #endif #ifndef GLX_ARB_multisample -#define GLX_ARB_multisample 1 +# define GLX_ARB_multisample 1 #endif #ifndef GLX_ARB_fbconfig_float -#define GLX_ARB_fbconfig_float 1 +# define GLX_ARB_fbconfig_float 1 #endif #ifndef GLX_ARB_framebuffer_sRGB -#define GLX_ARB_framebuffer_sRGB 1 +# define GLX_ARB_framebuffer_sRGB 1 #endif #ifndef GLX_ARB_create_context -#define GLX_ARB_create_context 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); +# define GLX_ARB_create_context 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern GLXContext glXCreateContextAttribsARB( Display *dpy, GLXFBConfig config, GLXContext share_context, + Bool direct, const int *attrib_list ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXContext ( *PFNGLXCREATECONTEXTATTRIBSARBPROC )( Display *dpy, GLXFBConfig config, + GLXContext share_context, Bool direct, + const int *attrib_list ); #endif #ifndef GLX_ARB_create_context_profile -#define GLX_ARB_create_context_profile 1 +# define GLX_ARB_create_context_profile 1 #endif #ifndef GLX_ARB_create_context_robustness -#define GLX_ARB_create_context_robustness 1 +# define GLX_ARB_create_context_robustness 1 #endif #ifndef GLX_SGIS_multisample -#define GLX_SGIS_multisample 1 +# define GLX_SGIS_multisample 1 #endif #ifndef GLX_EXT_visual_info -#define GLX_EXT_visual_info 1 +# define GLX_EXT_visual_info 1 #endif #ifndef GLX_SGI_swap_control -#define GLX_SGI_swap_control 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXSwapIntervalSGI (int interval); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval); +# define GLX_SGI_swap_control 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern int glXSwapIntervalSGI( int interval ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( *PFNGLXSWAPINTERVALSGIPROC )( int interval ); #endif #ifndef GLX_SGI_video_sync -#define GLX_SGI_video_sync 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXGetVideoSyncSGI (unsigned int *count); -extern int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count); -typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count); +# define GLX_SGI_video_sync 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern int glXGetVideoSyncSGI( unsigned int *count ); +extern int glXWaitVideoSyncSGI( int divisor, int remainder, unsigned int *count ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( *PFNGLXGETVIDEOSYNCSGIPROC )( unsigned int *count ); +typedef int ( *PFNGLXWAITVIDEOSYNCSGIPROC )( int divisor, int remainder, unsigned int *count ); #endif #ifndef GLX_SGI_make_current_read -#define GLX_SGI_make_current_read 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -extern GLXDrawable glXGetCurrentReadDrawableSGI (void); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); +# define GLX_SGI_make_current_read 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXMakeCurrentReadSGI( Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx ); +extern GLXDrawable glXGetCurrentReadDrawableSGI( void ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( *PFNGLXMAKECURRENTREADSGIPROC )( Display *dpy, GLXDrawable draw, GLXDrawable read, + GLXContext ctx ); +typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLESGIPROC )( void ); #endif #ifndef GLX_SGIX_video_source -#define GLX_SGIX_video_source 1 -#ifdef _VL_H -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); -extern void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); -typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource); -#endif /* _VL_H */ +# define GLX_SGIX_video_source 1 +# ifdef _VL_H +# ifdef GLX_GLXEXT_PROTOTYPES +extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX( Display *display, int screen, VLServer server, + VLPath path, int nodeClass, VLNode drainNode ); +extern void glXDestroyGLXVideoSourceSGIX( Display *dpy, GLXVideoSourceSGIX glxvideosource ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXVideoSourceSGIX ( *PFNGLXCREATEGLXVIDEOSOURCESGIXPROC )( Display *display, int screen, + VLServer server, VLPath path, + int nodeClass, VLNode drainNode ); +typedef void ( *PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC )( Display *dpy, GLXVideoSourceSGIX glxvideosource ); +# endif /* _VL_H */ #endif #ifndef GLX_EXT_visual_rating -#define GLX_EXT_visual_rating 1 +# define GLX_EXT_visual_rating 1 #endif #ifndef GLX_EXT_import_context -#define GLX_EXT_import_context 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Display * glXGetCurrentDisplayEXT (void); -extern int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value); -extern GLXContextID glXGetContextIDEXT (const GLXContext context); -extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID); -extern void glXFreeContextEXT (Display *dpy, GLXContext context); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void); -typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value); -typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); -typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID); -typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context); +# define GLX_EXT_import_context 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern Display *glXGetCurrentDisplayEXT( void ); +extern int glXQueryContextInfoEXT( Display *dpy, GLXContext context, int attribute, int *value ); +extern GLXContextID glXGetContextIDEXT( const GLXContext context ); +extern GLXContext glXImportContextEXT( Display *dpy, GLXContextID contextID ); +extern void glXFreeContextEXT( Display *dpy, GLXContext context ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Display *( *PFNGLXGETCURRENTDISPLAYEXTPROC )( void ); +typedef int ( *PFNGLXQUERYCONTEXTINFOEXTPROC )( Display *dpy, GLXContext context, int attribute, + int *value ); +typedef GLXContextID ( *PFNGLXGETCONTEXTIDEXTPROC )( const GLXContext context ); +typedef GLXContext ( *PFNGLXIMPORTCONTEXTEXTPROC )( Display *dpy, GLXContextID contextID ); +typedef void ( *PFNGLXFREECONTEXTEXTPROC )( Display *dpy, GLXContext context ); #endif #ifndef GLX_SGIX_fbconfig -#define GLX_SGIX_fbconfig 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); -extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements); -extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); -extern GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); -extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config); -extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); -typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements); -typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); -typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); -typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config); -typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis); +# define GLX_SGIX_fbconfig 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern int glXGetFBConfigAttribSGIX( Display *dpy, GLXFBConfigSGIX config, int attribute, int *value ); +extern GLXFBConfigSGIX *glXChooseFBConfigSGIX( Display *dpy, int screen, int *attrib_list, + int *nelements ); +extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX( Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap ); +extern GLXContext glXCreateContextWithConfigSGIX( Display *dpy, GLXFBConfigSGIX config, int render_type, + GLXContext share_list, Bool direct ); +extern XVisualInfo * glXGetVisualFromFBConfigSGIX( Display *dpy, GLXFBConfigSGIX config ); +extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX( Display *dpy, XVisualInfo *vis ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( *PFNGLXGETFBCONFIGATTRIBSGIXPROC )( Display *dpy, GLXFBConfigSGIX config, int attribute, + int *value ); +typedef GLXFBConfigSGIX *( *PFNGLXCHOOSEFBCONFIGSGIXPROC )( Display *dpy, int screen, int *attrib_list, + int *nelements ); +typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC )( Display *dpy, GLXFBConfigSGIX config, + Pixmap pixmap ); +typedef GLXContext ( *PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC )( Display *dpy, GLXFBConfigSGIX config, + int render_type, GLXContext share_list, + Bool direct ); +typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGSGIXPROC )( Display *dpy, GLXFBConfigSGIX config ); +typedef GLXFBConfigSGIX ( *PFNGLXGETFBCONFIGFROMVISUALSGIXPROC )( Display *dpy, XVisualInfo *vis ); #endif #ifndef GLX_SGIX_pbuffer -#define GLX_SGIX_pbuffer 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); -extern void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf); -extern int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); -extern void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask); -extern void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); -typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf); -typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); -typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask); -typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask); +# define GLX_SGIX_pbuffer 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern GLXPbufferSGIX glXCreateGLXPbufferSGIX( Display *dpy, GLXFBConfigSGIX config, unsigned int width, + unsigned int height, int *attrib_list ); +extern void glXDestroyGLXPbufferSGIX( Display *dpy, GLXPbufferSGIX pbuf ); +extern int glXQueryGLXPbufferSGIX( Display *dpy, GLXPbufferSGIX pbuf, int attribute, + unsigned int *value ); +extern void glXSelectEventSGIX( Display *dpy, GLXDrawable drawable, unsigned long mask ); +extern void glXGetSelectedEventSGIX( Display *dpy, GLXDrawable drawable, unsigned long *mask ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXPbufferSGIX ( *PFNGLXCREATEGLXPBUFFERSGIXPROC )( Display *dpy, GLXFBConfigSGIX config, + unsigned int width, unsigned int height, + int *attrib_list ); +typedef void ( *PFNGLXDESTROYGLXPBUFFERSGIXPROC )( Display *dpy, GLXPbufferSGIX pbuf ); +typedef int ( *PFNGLXQUERYGLXPBUFFERSGIXPROC )( Display *dpy, GLXPbufferSGIX pbuf, int attribute, + unsigned int *value ); +typedef void ( *PFNGLXSELECTEVENTSGIXPROC )( Display *dpy, GLXDrawable drawable, unsigned long mask ); +typedef void ( *PFNGLXGETSELECTEDEVENTSGIXPROC )( Display *dpy, GLXDrawable drawable, + unsigned long *mask ); #endif #ifndef GLX_SGI_cushion -#define GLX_SGI_cushion 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXCushionSGI (Display *dpy, Window window, float cushion); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion); +# define GLX_SGI_cushion 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern void glXCushionSGI( Display *dpy, Window window, float cushion ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( *PFNGLXCUSHIONSGIPROC )( Display *dpy, Window window, float cushion ); #endif #ifndef GLX_SGIX_video_resize -#define GLX_SGIX_video_resize 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window); -extern int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h); -extern int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); -extern int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); -extern int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window); -typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h); -typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); -typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); -typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype); +# define GLX_SGIX_video_resize 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern int glXBindChannelToWindowSGIX( Display *display, int screen, int channel, Window window ); +extern int glXChannelRectSGIX( Display *display, int screen, int channel, int x, int y, int w, int h ); +extern int glXQueryChannelRectSGIX( Display *display, int screen, int channel, int *dx, int *dy, int *dw, + int *dh ); +extern int glXQueryChannelDeltasSGIX( Display *display, int screen, int channel, int *x, int *y, int *w, + int *h ); +extern int glXChannelRectSyncSGIX( Display *display, int screen, int channel, GLenum synctype ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( *PFNGLXBINDCHANNELTOWINDOWSGIXPROC )( Display *display, int screen, int channel, + Window window ); +typedef int ( *PFNGLXCHANNELRECTSGIXPROC )( Display *display, int screen, int channel, int x, int y, + int w, int h ); +typedef int ( *PFNGLXQUERYCHANNELRECTSGIXPROC )( Display *display, int screen, int channel, int *dx, + int *dy, int *dw, int *dh ); +typedef int ( *PFNGLXQUERYCHANNELDELTASSGIXPROC )( Display *display, int screen, int channel, int *x, + int *y, int *w, int *h ); +typedef int ( *PFNGLXCHANNELRECTSYNCSGIXPROC )( Display *display, int screen, int channel, + GLenum synctype ); #endif #ifndef GLX_SGIX_dmbuffer -#define GLX_SGIX_dmbuffer 1 -#ifdef _DM_BUFFER_H_ -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); -#endif /* _DM_BUFFER_H_ */ +# define GLX_SGIX_dmbuffer 1 +# ifdef _DM_BUFFER_H_ +# ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXAssociateDMPbufferSGIX( Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, + DMbuffer dmbuffer ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( *PFNGLXASSOCIATEDMPBUFFERSGIXPROC )( Display *dpy, GLXPbufferSGIX pbuffer, + DMparams *params, DMbuffer dmbuffer ); +# endif /* _DM_BUFFER_H_ */ #endif #ifndef GLX_SGIX_swap_group -#define GLX_SGIX_swap_group 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); +# define GLX_SGIX_swap_group 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern void glXJoinSwapGroupSGIX( Display *dpy, GLXDrawable drawable, GLXDrawable member ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( *PFNGLXJOINSWAPGROUPSGIXPROC )( Display *dpy, GLXDrawable drawable, GLXDrawable member ); #endif #ifndef GLX_SGIX_swap_barrier -#define GLX_SGIX_swap_barrier 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier); -extern Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier); -typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max); +# define GLX_SGIX_swap_barrier 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern void glXBindSwapBarrierSGIX( Display *dpy, GLXDrawable drawable, int barrier ); +extern Bool glXQueryMaxSwapBarriersSGIX( Display *dpy, int screen, int *max ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( *PFNGLXBINDSWAPBARRIERSGIXPROC )( Display *dpy, GLXDrawable drawable, int barrier ); +typedef Bool ( *PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC )( Display *dpy, int screen, int *max ); #endif #ifndef GLX_SUN_get_transparent_index -#define GLX_SUN_get_transparent_index 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); +# define GLX_SUN_get_transparent_index 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern Status glXGetTransparentIndexSUN( Display *dpy, Window overlay, Window underlay, + long *pTransparentIndex ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Status ( *PFNGLXGETTRANSPARENTINDEXSUNPROC )( Display *dpy, Window overlay, Window underlay, + long *pTransparentIndex ); #endif #ifndef GLX_MESA_copy_sub_buffer -#define GLX_MESA_copy_sub_buffer 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); +# define GLX_MESA_copy_sub_buffer 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable, int x, int y, int width, + int height ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( *PFNGLXCOPYSUBBUFFERMESAPROC )( Display *dpy, GLXDrawable drawable, int x, int y, + int width, int height ); #endif #ifndef GLX_MESA_pixmap_colormap -#define GLX_MESA_pixmap_colormap 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); +# define GLX_MESA_pixmap_colormap 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, Pixmap pixmap, + Colormap cmap ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPMESAPROC )( Display *dpy, XVisualInfo *visual, Pixmap pixmap, + Colormap cmap ); #endif #ifndef GLX_MESA_release_buffers -#define GLX_MESA_release_buffers 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); +# define GLX_MESA_release_buffers 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable drawable ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC )( Display *dpy, GLXDrawable drawable ); #endif #ifndef GLX_MESA_set_3dfx_mode -#define GLX_MESA_set_3dfx_mode 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXSet3DfxModeMESA (int mode); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode); +# define GLX_MESA_set_3dfx_mode 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXSet3DfxModeMESA( int mode ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( *PFNGLXSET3DFXMODEMESAPROC )( int mode ); #endif #ifndef GLX_SGIX_visual_select_group -#define GLX_SGIX_visual_select_group 1 +# define GLX_SGIX_visual_select_group 1 #endif #ifndef GLX_OML_swap_method -#define GLX_OML_swap_method 1 +# define GLX_OML_swap_method 1 #endif #ifndef GLX_OML_sync_control -#define GLX_OML_sync_control 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); -extern Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); -extern int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); -extern Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); -extern Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); -typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); -typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); -typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); -typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); +# define GLX_OML_sync_control 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXGetSyncValuesOML( Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, + int64_t *sbc ); +extern Bool glXGetMscRateOML( Display *dpy, GLXDrawable drawable, int32_t *numerator, + int32_t *denominator ); +extern int64_t glXSwapBuffersMscOML( Display *dpy, GLXDrawable drawable, int64_t target_msc, + int64_t divisor, int64_t remainder ); +extern Bool glXWaitForMscOML( Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, + int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc ); +extern Bool glXWaitForSbcOML( Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, + int64_t *msc, int64_t *sbc ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( *PFNGLXGETSYNCVALUESOMLPROC )( Display *dpy, GLXDrawable drawable, int64_t *ust, + int64_t *msc, int64_t *sbc ); +typedef Bool ( *PFNGLXGETMSCRATEOMLPROC )( Display *dpy, GLXDrawable drawable, int32_t *numerator, + int32_t *denominator ); +typedef int64_t ( *PFNGLXSWAPBUFFERSMSCOMLPROC )( Display *dpy, GLXDrawable drawable, int64_t target_msc, + int64_t divisor, int64_t remainder ); +typedef Bool ( *PFNGLXWAITFORMSCOMLPROC )( Display *dpy, GLXDrawable drawable, int64_t target_msc, + int64_t divisor, int64_t remainder, int64_t *ust, + int64_t *msc, int64_t *sbc ); +typedef Bool ( *PFNGLXWAITFORSBCOMLPROC )( Display *dpy, GLXDrawable drawable, int64_t target_sbc, + int64_t *ust, int64_t *msc, int64_t *sbc ); #endif #ifndef GLX_NV_float_buffer -#define GLX_NV_float_buffer 1 +# define GLX_NV_float_buffer 1 #endif #ifndef GLX_SGIX_hyperpipe -#define GLX_SGIX_hyperpipe 1 +# define GLX_SGIX_hyperpipe 1 -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int networkId; +typedef struct +{ + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int networkId; } GLXHyperpipeNetworkSGIX; -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int channel; - unsigned int - participationType; - int timeSlice; +typedef struct +{ + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int channel; + unsigned int participationType; + int timeSlice; } GLXHyperpipeConfigSGIX; -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int srcXOrigin, srcYOrigin, srcWidth, srcHeight; - int destXOrigin, destYOrigin, destWidth, destHeight; +typedef struct +{ + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int srcXOrigin, srcYOrigin, srcWidth, srcHeight; + int destXOrigin, destYOrigin, destWidth, destHeight; } GLXPipeRect; -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int XOrigin, YOrigin, maxHeight, maxWidth; +typedef struct +{ + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int XOrigin, YOrigin, maxHeight, maxWidth; } GLXPipeRectLimits; -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes); -extern int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); -extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes); -extern int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId); -extern int glXBindHyperpipeSGIX (Display *dpy, int hpId); -extern int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); -extern int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList); -extern int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes); -typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); -typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes); -typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId); -typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId); -typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); -typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList); -typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); +# ifdef GLX_GLXEXT_PROTOTYPES +extern GLXHyperpipeNetworkSGIX *glXQueryHyperpipeNetworkSGIX( Display *dpy, int *npipes ); +extern int glXHyperpipeConfigSGIX( Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, + int *hpId ); +extern GLXHyperpipeConfigSGIX *glXQueryHyperpipeConfigSGIX( Display *dpy, int hpId, int *npipes ); +extern int glXDestroyHyperpipeConfigSGIX( Display *dpy, int hpId ); +extern int glXBindHyperpipeSGIX( Display *dpy, int hpId ); +extern int glXQueryHyperpipeBestAttribSGIX( Display *dpy, int timeSlice, int attrib, int size, + void *attribList, void *returnAttribList ); +extern int glXHyperpipeAttribSGIX( Display *dpy, int timeSlice, int attrib, int size, void *attribList ); +extern int glXQueryHyperpipeAttribSGIX( Display *dpy, int timeSlice, int attrib, int size, + void *returnAttribList ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXHyperpipeNetworkSGIX *( *PFNGLXQUERYHYPERPIPENETWORKSGIXPROC )( Display *dpy, int *npipes ); +typedef int ( *PFNGLXHYPERPIPECONFIGSGIXPROC )( Display *dpy, int networkId, int npipes, + GLXHyperpipeConfigSGIX *cfg, int *hpId ); +typedef GLXHyperpipeConfigSGIX *( *PFNGLXQUERYHYPERPIPECONFIGSGIXPROC )( Display *dpy, int hpId, + int *npipes ); +typedef int ( *PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC )( Display *dpy, int hpId ); +typedef int ( *PFNGLXBINDHYPERPIPESGIXPROC )( Display *dpy, int hpId ); +typedef int ( *PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC )( Display *dpy, int timeSlice, int attrib, + int size, void *attribList, + void *returnAttribList ); +typedef int ( *PFNGLXHYPERPIPEATTRIBSGIXPROC )( Display *dpy, int timeSlice, int attrib, int size, + void *attribList ); +typedef int ( *PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC )( Display *dpy, int timeSlice, int attrib, int size, + void *returnAttribList ); #endif #ifndef GLX_MESA_agp_offset -#define GLX_MESA_agp_offset 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern unsigned int glXGetAGPOffsetMESA (const void *pointer); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer); +# define GLX_MESA_agp_offset 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern unsigned int glXGetAGPOffsetMESA( const void *pointer ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef unsigned int ( *PFNGLXGETAGPOFFSETMESAPROC )( const void *pointer ); #endif #ifndef GLX_EXT_fbconfig_packed_float -#define GLX_EXT_fbconfig_packed_float 1 +# define GLX_EXT_fbconfig_packed_float 1 #endif #ifndef GLX_EXT_framebuffer_sRGB -#define GLX_EXT_framebuffer_sRGB 1 +# define GLX_EXT_framebuffer_sRGB 1 #endif #ifndef GLX_EXT_texture_from_pixmap -#define GLX_EXT_texture_from_pixmap 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); -extern void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); -typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer); +# define GLX_EXT_texture_from_pixmap 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern void glXBindTexImageEXT( Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list ); +extern void glXReleaseTexImageEXT( Display *dpy, GLXDrawable drawable, int buffer ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( *PFNGLXBINDTEXIMAGEEXTPROC )( Display *dpy, GLXDrawable drawable, int buffer, + const int *attrib_list ); +typedef void ( *PFNGLXRELEASETEXIMAGEEXTPROC )( Display *dpy, GLXDrawable drawable, int buffer ); #endif #ifndef GLX_NV_present_video -#define GLX_NV_present_video 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern unsigned int * glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements); -extern int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef unsigned int * ( * PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements); -typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list); +# define GLX_NV_present_video 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern unsigned int *glXEnumerateVideoDevicesNV( Display *dpy, int screen, int *nelements ); +extern int glXBindVideoDeviceNV( Display *dpy, unsigned int video_slot, unsigned int video_device, + const int *attrib_list ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef unsigned int *( *PFNGLXENUMERATEVIDEODEVICESNVPROC )( Display *dpy, int screen, int *nelements ); +typedef int ( *PFNGLXBINDVIDEODEVICENVPROC )( Display *dpy, unsigned int video_slot, + unsigned int video_device, const int *attrib_list ); #endif #ifndef GLX_NV_video_output -#define GLX_NV_video_output 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice); -extern int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice); -extern int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer); -extern int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf); -extern int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock); -extern int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice); -typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice); -typedef int ( * PFNGLXBINDVIDEOIMAGENVPROC) (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer); -typedef int ( * PFNGLXRELEASEVIDEOIMAGENVPROC) (Display *dpy, GLXPbuffer pbuf); -typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock); -typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +# define GLX_NV_video_output 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern int glXGetVideoDeviceNV( Display *dpy, int screen, int numVideoDevices, + GLXVideoDeviceNV *pVideoDevice ); +extern int glXReleaseVideoDeviceNV( Display *dpy, int screen, GLXVideoDeviceNV VideoDevice ); +extern int glXBindVideoImageNV( Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, + int iVideoBuffer ); +extern int glXReleaseVideoImageNV( Display *dpy, GLXPbuffer pbuf ); +extern int glXSendPbufferToVideoNV( Display *dpy, GLXPbuffer pbuf, int iBufferType, + unsigned long *pulCounterPbuffer, GLboolean bBlock ); +extern int glXGetVideoInfoNV( Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, + unsigned long *pulCounterOutputPbuffer, + unsigned long *pulCounterOutputVideo ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( *PFNGLXGETVIDEODEVICENVPROC )( Display *dpy, int screen, int numVideoDevices, + GLXVideoDeviceNV *pVideoDevice ); +typedef int ( *PFNGLXRELEASEVIDEODEVICENVPROC )( Display *dpy, int screen, + GLXVideoDeviceNV VideoDevice ); +typedef int ( *PFNGLXBINDVIDEOIMAGENVPROC )( Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, + int iVideoBuffer ); +typedef int ( *PFNGLXRELEASEVIDEOIMAGENVPROC )( Display *dpy, GLXPbuffer pbuf ); +typedef int ( *PFNGLXSENDPBUFFERTOVIDEONVPROC )( Display *dpy, GLXPbuffer pbuf, int iBufferType, + unsigned long *pulCounterPbuffer, GLboolean bBlock ); +typedef int ( *PFNGLXGETVIDEOINFONVPROC )( Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, + unsigned long *pulCounterOutputPbuffer, + unsigned long *pulCounterOutputVideo ); #endif #ifndef GLX_NV_swap_group -#define GLX_NV_swap_group 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group); -extern Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier); -extern Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier); -extern Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers); -extern Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count); -extern Bool glXResetFrameCountNV (Display *dpy, int screen); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group); -typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier); -typedef Bool ( * PFNGLXQUERYSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier); -typedef Bool ( * PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers); -typedef Bool ( * PFNGLXQUERYFRAMECOUNTNVPROC) (Display *dpy, int screen, GLuint *count); -typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen); +# define GLX_NV_swap_group 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXJoinSwapGroupNV( Display *dpy, GLXDrawable drawable, GLuint group ); +extern Bool glXBindSwapBarrierNV( Display *dpy, GLuint group, GLuint barrier ); +extern Bool glXQuerySwapGroupNV( Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier ); +extern Bool glXQueryMaxSwapGroupsNV( Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers ); +extern Bool glXQueryFrameCountNV( Display *dpy, int screen, GLuint *count ); +extern Bool glXResetFrameCountNV( Display *dpy, int screen ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( *PFNGLXJOINSWAPGROUPNVPROC )( Display *dpy, GLXDrawable drawable, GLuint group ); +typedef Bool ( *PFNGLXBINDSWAPBARRIERNVPROC )( Display *dpy, GLuint group, GLuint barrier ); +typedef Bool ( *PFNGLXQUERYSWAPGROUPNVPROC )( Display *dpy, GLXDrawable drawable, GLuint *group, + GLuint *barrier ); +typedef Bool ( *PFNGLXQUERYMAXSWAPGROUPSNVPROC )( Display *dpy, int screen, GLuint *maxGroups, + GLuint *maxBarriers ); +typedef Bool ( *PFNGLXQUERYFRAMECOUNTNVPROC )( Display *dpy, int screen, GLuint *count ); +typedef Bool ( *PFNGLXRESETFRAMECOUNTNVPROC )( Display *dpy, int screen ); #endif #ifndef GLX_NV_video_capture -#define GLX_NV_video_capture 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device); -extern GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements); -extern void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device); -extern int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value); -extern void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device); -typedef GLXVideoCaptureDeviceNV * ( * PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements); -typedef void ( * PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); -typedef int ( * PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value); -typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); +# define GLX_NV_video_capture 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern int glXBindVideoCaptureDeviceNV( Display *dpy, unsigned int video_capture_slot, + GLXVideoCaptureDeviceNV device ); +extern GLXVideoCaptureDeviceNV *glXEnumerateVideoCaptureDevicesNV( Display *dpy, int screen, + int *nelements ); +extern void glXLockVideoCaptureDeviceNV( Display *dpy, GLXVideoCaptureDeviceNV device ); +extern int glXQueryVideoCaptureDeviceNV( Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, + int *value ); +extern void glXReleaseVideoCaptureDeviceNV( Display *dpy, GLXVideoCaptureDeviceNV device ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( *PFNGLXBINDVIDEOCAPTUREDEVICENVPROC )( Display *dpy, unsigned int video_capture_slot, + GLXVideoCaptureDeviceNV device ); +typedef GLXVideoCaptureDeviceNV *( *PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC )( Display *dpy, int screen, + int *nelements ); +typedef void ( *PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC )( Display *dpy, GLXVideoCaptureDeviceNV device ); +typedef int ( *PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC )( Display *dpy, GLXVideoCaptureDeviceNV device, + int attribute, int *value ); +typedef void ( *PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC )( Display *dpy, GLXVideoCaptureDeviceNV device ); #endif #ifndef GLX_EXT_swap_control -#define GLX_EXT_swap_control 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval); +# define GLX_EXT_swap_control 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern void glXSwapIntervalEXT( Display *dpy, GLXDrawable drawable, int interval ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( *PFNGLXSWAPINTERVALEXTPROC )( Display *dpy, GLXDrawable drawable, int interval ); #endif #ifndef GLX_NV_copy_image -#define GLX_NV_copy_image 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +# define GLX_NV_copy_image 1 +# ifdef GLX_GLXEXT_PROTOTYPES +extern void glXCopyImageSubDataNV( Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, + GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, + GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, + GLint dstY, GLint dstZ, GLsizei width, GLsizei height, + GLsizei depth ); +# endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( *PFNGLXCOPYIMAGESUBDATANVPROC )( Display *dpy, GLXContext srcCtx, GLuint srcName, + GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, + GLint srcZ, GLXContext dstCtx, GLuint dstName, + GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, + GLint dstZ, GLsizei width, GLsizei height, + GLsizei depth ); #endif #ifndef GLX_INTEL_swap_event -#define GLX_INTEL_swap_event 1 +# define GLX_INTEL_swap_event 1 #endif #ifndef GLX_NV_multisample_coverage -#define GLX_NV_multisample_coverage 1 +# define GLX_NV_multisample_coverage 1 #endif #ifndef GLX_EXT_swap_control_tear -#define GLX_EXT_swap_control_tear 1 +# define GLX_EXT_swap_control_tear 1 #endif #ifndef GLX_EXT_buffer_age -#define GLX_EXT_buffer_age 1 +# define GLX_EXT_buffer_age 1 #endif - #ifdef __cplusplus } #endif diff --git a/include/GL/glxtokens-backup.h b/include/GL/glxtokens-backup.h index d151f73..b6e1230 100644 --- a/include/GL/glxtokens-backup.h +++ b/include/GL/glxtokens-backup.h @@ -10,21 +10,21 @@ ** this file except in compliance with the License. You may obtain a copy ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** +** ** http://oss.sgi.com/projects/FreeB -** +** ** Note that, as provided in the License, the Software is distributed on an ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** +** ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. -** +** ** Additional Notice Provisions: The application programming interfaces ** established by SGI in conjunction with the Original Code are The ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released @@ -48,54 +48,54 @@ extern "C" { /* ** Visual Config Attributes (glXGetConfig, glXGetFBConfigAttrib) */ -#define GLX_USE_GL 1 /* support GLX rendering */ -#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */ -#define GLX_LEVEL 3 /* level in plane stacking */ -#define GLX_RGBA 4 /* true if RGBA mode */ -#define GLX_DOUBLEBUFFER 5 /* double buffering supported */ -#define GLX_STEREO 6 /* stereo buffering supported */ -#define GLX_AUX_BUFFERS 7 /* number of aux buffers */ -#define GLX_RED_SIZE 8 /* number of red component bits */ -#define GLX_GREEN_SIZE 9 /* number of green component bits */ -#define GLX_BLUE_SIZE 10 /* number of blue component bits */ -#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */ -#define GLX_DEPTH_SIZE 12 /* number of depth bits */ -#define GLX_STENCIL_SIZE 13 /* number of stencil bits */ -#define GLX_ACCUM_RED_SIZE 14 /* number of red accum bits */ -#define GLX_ACCUM_GREEN_SIZE 15 /* number of green accum bits */ +#define GLX_USE_GL 1 /* support GLX rendering */ +#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */ +#define GLX_LEVEL 3 /* level in plane stacking */ +#define GLX_RGBA 4 /* true if RGBA mode */ +#define GLX_DOUBLEBUFFER 5 /* double buffering supported */ +#define GLX_STEREO 6 /* stereo buffering supported */ +#define GLX_AUX_BUFFERS 7 /* number of aux buffers */ +#define GLX_RED_SIZE 8 /* number of red component bits */ +#define GLX_GREEN_SIZE 9 /* number of green component bits */ +#define GLX_BLUE_SIZE 10 /* number of blue component bits */ +#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */ +#define GLX_DEPTH_SIZE 12 /* number of depth bits */ +#define GLX_STENCIL_SIZE 13 /* number of stencil bits */ +#define GLX_ACCUM_RED_SIZE 14 /* number of red accum bits */ +#define GLX_ACCUM_GREEN_SIZE 15 /* number of green accum bits */ #define GLX_ACCUM_BLUE_SIZE 16 /* number of blue accum bits */ -#define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */ +#define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */ /* ** FBConfig-specific attributes */ -#define GLX_X_VISUAL_TYPE 0x22 -#define GLX_CONFIG_CAVEAT 0x20 /* Like visual_info VISUAL_CAVEAT_EXT */ -#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_CONFIG_CAVEAT 0x20 /* Like visual_info VISUAL_CAVEAT_EXT */ +#define GLX_TRANSPARENT_TYPE 0x23 #define GLX_TRANSPARENT_INDEX_VALUE 0x24 -#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_RED_VALUE 0x25 #define GLX_TRANSPARENT_GREEN_VALUE 0x26 -#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 #define GLX_TRANSPARENT_ALPHA_VALUE 0x28 -#define GLX_DRAWABLE_TYPE 0x8010 -#define GLX_RENDER_TYPE 0x8011 -#define GLX_X_RENDERABLE 0x8012 -#define GLX_FBCONFIG_ID 0x8013 -#define GLX_MAX_PBUFFER_WIDTH 0x8016 -#define GLX_MAX_PBUFFER_HEIGHT 0x8017 -#define GLX_MAX_PBUFFER_PIXELS 0x8018 -#define GLX_VISUAL_ID 0x800B +#define GLX_DRAWABLE_TYPE 0x8010 +#define GLX_RENDER_TYPE 0x8011 +#define GLX_X_RENDERABLE 0x8012 +#define GLX_FBCONFIG_ID 0x8013 +#define GLX_MAX_PBUFFER_WIDTH 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT 0x8017 +#define GLX_MAX_PBUFFER_PIXELS 0x8018 +#define GLX_VISUAL_ID 0x800B /* ** Error return values from glXGetConfig. Success is indicated by ** a value of 0. */ -#define GLX_BAD_SCREEN 1 /* screen # is bad */ -#define GLX_BAD_ATTRIBUTE 2 /* attribute to get is bad */ -#define GLX_NO_EXTENSION 3 /* no glx extension on server */ -#define GLX_BAD_VISUAL 4 /* visual # not known by GLX */ -#define GLX_BAD_CONTEXT 5 /* returned only by import_context EXT? */ -#define GLX_BAD_VALUE 6 /* returned only by glXSwapIntervalSGI? */ -#define GLX_BAD_ENUM 7 /* unused? */ +#define GLX_BAD_SCREEN 1 /* screen # is bad */ +#define GLX_BAD_ATTRIBUTE 2 /* attribute to get is bad */ +#define GLX_NO_EXTENSION 3 /* no glx extension on server */ +#define GLX_BAD_VISUAL 4 /* visual # not known by GLX */ +#define GLX_BAD_CONTEXT 5 /* returned only by import_context EXT? */ +#define GLX_BAD_VALUE 6 /* returned only by glXSwapIntervalSGI? */ +#define GLX_BAD_ENUM 7 /* unused? */ /* FBConfig attribute values */ @@ -103,126 +103,126 @@ extern "C" { ** Generic "don't care" value for glX ChooseFBConfig attributes (except ** GLX_LEVEL) */ -#define GLX_DONT_CARE 0xFFFFFFFF +#define GLX_DONT_CARE 0xFFFFFFFF /* GLX_RENDER_TYPE bits */ -#define GLX_RGBA_BIT 0x00000001 -#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 /* GLX_DRAWABLE_TYPE bits */ -#define GLX_WINDOW_BIT 0x00000001 -#define GLX_PIXMAP_BIT 0x00000002 -#define GLX_PBUFFER_BIT 0x00000004 +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 /* GLX_CONFIG_CAVEAT attribute values */ -#define GLX_NONE 0x8000 -#define GLX_SLOW_CONFIG 0x8001 -#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_NON_CONFORMANT_CONFIG 0x800D /* GLX_X_VISUAL_TYPE attribute values */ -#define GLX_TRUE_COLOR 0x8002 -#define GLX_DIRECT_COLOR 0x8003 -#define GLX_PSEUDO_COLOR 0x8004 -#define GLX_STATIC_COLOR 0x8005 -#define GLX_GRAY_SCALE 0x8006 -#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 /* GLX_TRANSPARENT_TYPE attribute values */ /* #define GLX_NONE 0x8000 */ -#define GLX_TRANSPARENT_RGB 0x8008 -#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 /* glXCreateGLXPbuffer attributes */ -#define GLX_PRESERVED_CONTENTS 0x801B -#define GLX_LARGEST_PBUFFER 0x801C -#define GLX_PBUFFER_HEIGHT 0x8040 /* New for GLX 1.3 */ -#define GLX_PBUFFER_WIDTH 0x8041 /* New for GLX 1.3 */ +#define GLX_PRESERVED_CONTENTS 0x801B +#define GLX_LARGEST_PBUFFER 0x801C +#define GLX_PBUFFER_HEIGHT 0x8040 /* New for GLX 1.3 */ +#define GLX_PBUFFER_WIDTH 0x8041 /* New for GLX 1.3 */ /* glXQueryGLXPBuffer attributes */ -#define GLX_WIDTH 0x801D -#define GLX_HEIGHT 0x801E -#define GLX_EVENT_MASK 0x801F +#define GLX_WIDTH 0x801D +#define GLX_HEIGHT 0x801E +#define GLX_EVENT_MASK 0x801F /* glXCreateNewContext render_type attribute values */ -#define GLX_RGBA_TYPE 0x8014 -#define GLX_COLOR_INDEX_TYPE 0x8015 +#define GLX_RGBA_TYPE 0x8014 +#define GLX_COLOR_INDEX_TYPE 0x8015 /* glXQueryContext attributes */ /* #define GLX_FBCONFIG_ID 0x8013 */ /* #define GLX_RENDER_TYPE 0x8011 */ -#define GLX_SCREEN 0x800C +#define GLX_SCREEN 0x800C /* glXSelectEvent event mask bits */ -#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 +#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 /* GLXPbufferClobberEvent event_type values */ -#define GLX_DAMAGED 0x8020 -#define GLX_SAVED 0x8021 +#define GLX_DAMAGED 0x8020 +#define GLX_SAVED 0x8021 /* GLXPbufferClobberEvent draw_type values */ -#define GLX_WINDOW 0x8022 -#define GLX_PBUFFER 0x8023 +#define GLX_WINDOW 0x8022 +#define GLX_PBUFFER 0x8023 /* GLXPbufferClobberEvent buffer_mask bits */ -#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 -#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 -#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 -#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 -#define GLX_AUX_BUFFERS_BIT 0x00000010 -#define GLX_DEPTH_BUFFER_BIT 0x00000020 -#define GLX_STENCIL_BUFFER_BIT 0x00000040 -#define GLX_ACCUM_BUFFER_BIT 0x00000080 +#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +#define GLX_AUX_BUFFERS_BIT 0x00000010 +#define GLX_DEPTH_BUFFER_BIT 0x00000020 +#define GLX_STENCIL_BUFFER_BIT 0x00000040 +#define GLX_ACCUM_BUFFER_BIT 0x00000080 /* ** Extension return values from glXGetConfig. These are also ** accepted as parameter values for glXChooseVisual. */ -#define GLX_X_VISUAL_TYPE_EXT 0x22 /* visual_info extension type */ -#define GLX_TRANSPARENT_TYPE_EXT 0x23 /* visual_info extension */ -#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 /* visual_info extension */ -#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 /* visual_info extension */ -#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 /* visual_info extension */ -#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 /* visual_info extension */ -#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 /* visual_info extension */ +#define GLX_X_VISUAL_TYPE_EXT 0x22 /* visual_info extension type */ +#define GLX_TRANSPARENT_TYPE_EXT 0x23 /* visual_info extension */ +#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 /* visual_info extension */ +#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 /* visual_info extension */ +#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 /* visual_info extension */ +#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 /* visual_info extension */ +#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 /* visual_info extension */ /* Property values for visual_type */ -#define GLX_TRUE_COLOR_EXT 0x8002 -#define GLX_DIRECT_COLOR_EXT 0x8003 -#define GLX_PSEUDO_COLOR_EXT 0x8004 -#define GLX_STATIC_COLOR_EXT 0x8005 -#define GLX_GRAY_SCALE_EXT 0x8006 +#define GLX_TRUE_COLOR_EXT 0x8002 +#define GLX_DIRECT_COLOR_EXT 0x8003 +#define GLX_PSEUDO_COLOR_EXT 0x8004 +#define GLX_STATIC_COLOR_EXT 0x8005 +#define GLX_GRAY_SCALE_EXT 0x8006 #define GLX_STATIC_GRAY_EXT 0x8007 /* Property values for transparent pixel */ -#define GLX_NONE_EXT 0x8000 -#define GLX_TRANSPARENT_RGB_EXT 0x8008 -#define GLX_TRANSPARENT_INDEX_EXT 0x8009 +#define GLX_NONE_EXT 0x8000 +#define GLX_TRANSPARENT_RGB_EXT 0x8008 +#define GLX_TRANSPARENT_INDEX_EXT 0x8009 /* Property values for visual_rating */ -#define GLX_VISUAL_CAVEAT_EXT 0x20 /* visual_rating extension type */ -#define GLX_SLOW_VISUAL_EXT 0x8001 -#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D +#define GLX_VISUAL_CAVEAT_EXT 0x20 /* visual_rating extension type */ +#define GLX_SLOW_VISUAL_EXT 0x8001 +#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D /* ** Names for attributes to glXGetClientString. */ -#define GLX_VENDOR 0x1 -#define GLX_VERSION 0x2 -#define GLX_EXTENSIONS 0x3 +#define GLX_VENDOR 0x1 +#define GLX_VERSION 0x2 +#define GLX_EXTENSIONS 0x3 /* ** Names for attributes to glXQueryContextInfoEXT. */ -#define GLX_SHARE_CONTEXT_EXT 0x800A /* id of share context */ -#define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */ -#define GLX_SCREEN_EXT 0x800C /* screen number */ +#define GLX_SHARE_CONTEXT_EXT 0x800A /* id of share context */ +#define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */ +#define GLX_SCREEN_EXT 0x800C /* screen number */ /* * GLX 1.4 and later: */ -#define GLX_SAMPLE_BUFFERS_SGIS 100000 -#define GLX_SAMPLES_SGIS 100001 +#define GLX_SAMPLE_BUFFERS_SGIS 100000 +#define GLX_SAMPLES_SGIS 100001 #ifdef __cplusplus } diff --git a/include/GL/wglext.h b/include/GL/wglext.h index 335a953..dc6524e 100644 --- a/include/GL/wglext.h +++ b/include/GL/wglext.h @@ -7,7 +7,7 @@ extern "C" { /* ** Copyright (c) 2007-2013 The Khronos Group Inc. -** +** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, including @@ -15,10 +15,10 @@ extern "C" { ** distribute, sublicense, and/or sell copies of the Materials, and to ** permit persons to whom the Materials are furnished to do so, subject to ** the following conditions: -** +** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Materials. -** +** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -30,19 +30,19 @@ extern "C" { /* Function declaration macros - to move into glplatform.h */ -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define WIN32_LEAN_AND_MEAN 1 -#include +#if defined( _WIN32 ) && !defined( APIENTRY ) && !defined( __CYGWIN__ ) && !defined( __SCITECH_SNAP__ ) +# define WIN32_LEAN_AND_MEAN 1 +# include #endif #ifndef APIENTRY -#define APIENTRY +# define APIENTRY #endif #ifndef APIENTRYP -#define APIENTRYP APIENTRY * +# define APIENTRYP APIENTRY * #endif #ifndef GLAPI -#define GLAPI extern +# define GLAPI extern #endif /*************************************************************/ @@ -53,373 +53,373 @@ extern "C" { #define WGL_WGLEXT_VERSION 24 #ifndef WGL_ARB_buffer_region -#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 -#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 -#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 -#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 +# define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +# define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +# define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +# define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 #endif #ifndef WGL_ARB_multisample -#define WGL_SAMPLE_BUFFERS_ARB 0x2041 -#define WGL_SAMPLES_ARB 0x2042 +# define WGL_SAMPLE_BUFFERS_ARB 0x2041 +# define WGL_SAMPLES_ARB 0x2042 #endif #ifndef WGL_ARB_extensions_string #endif #ifndef WGL_ARB_pixel_format -#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 -#define WGL_DRAW_TO_WINDOW_ARB 0x2001 -#define WGL_DRAW_TO_BITMAP_ARB 0x2002 -#define WGL_ACCELERATION_ARB 0x2003 -#define WGL_NEED_PALETTE_ARB 0x2004 -#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 -#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 -#define WGL_SWAP_METHOD_ARB 0x2007 -#define WGL_NUMBER_OVERLAYS_ARB 0x2008 -#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 -#define WGL_TRANSPARENT_ARB 0x200A -#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 -#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 -#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 -#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A -#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B -#define WGL_SHARE_DEPTH_ARB 0x200C -#define WGL_SHARE_STENCIL_ARB 0x200D -#define WGL_SHARE_ACCUM_ARB 0x200E -#define WGL_SUPPORT_GDI_ARB 0x200F -#define WGL_SUPPORT_OPENGL_ARB 0x2010 -#define WGL_DOUBLE_BUFFER_ARB 0x2011 -#define WGL_STEREO_ARB 0x2012 -#define WGL_PIXEL_TYPE_ARB 0x2013 -#define WGL_COLOR_BITS_ARB 0x2014 -#define WGL_RED_BITS_ARB 0x2015 -#define WGL_RED_SHIFT_ARB 0x2016 -#define WGL_GREEN_BITS_ARB 0x2017 -#define WGL_GREEN_SHIFT_ARB 0x2018 -#define WGL_BLUE_BITS_ARB 0x2019 -#define WGL_BLUE_SHIFT_ARB 0x201A -#define WGL_ALPHA_BITS_ARB 0x201B -#define WGL_ALPHA_SHIFT_ARB 0x201C -#define WGL_ACCUM_BITS_ARB 0x201D -#define WGL_ACCUM_RED_BITS_ARB 0x201E -#define WGL_ACCUM_GREEN_BITS_ARB 0x201F -#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 -#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 -#define WGL_DEPTH_BITS_ARB 0x2022 -#define WGL_STENCIL_BITS_ARB 0x2023 -#define WGL_AUX_BUFFERS_ARB 0x2024 -#define WGL_NO_ACCELERATION_ARB 0x2025 -#define WGL_GENERIC_ACCELERATION_ARB 0x2026 -#define WGL_FULL_ACCELERATION_ARB 0x2027 -#define WGL_SWAP_EXCHANGE_ARB 0x2028 -#define WGL_SWAP_COPY_ARB 0x2029 -#define WGL_SWAP_UNDEFINED_ARB 0x202A -#define WGL_TYPE_RGBA_ARB 0x202B -#define WGL_TYPE_COLORINDEX_ARB 0x202C +# define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +# define WGL_DRAW_TO_WINDOW_ARB 0x2001 +# define WGL_DRAW_TO_BITMAP_ARB 0x2002 +# define WGL_ACCELERATION_ARB 0x2003 +# define WGL_NEED_PALETTE_ARB 0x2004 +# define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +# define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +# define WGL_SWAP_METHOD_ARB 0x2007 +# define WGL_NUMBER_OVERLAYS_ARB 0x2008 +# define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +# define WGL_TRANSPARENT_ARB 0x200A +# define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +# define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +# define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +# define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +# define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +# define WGL_SHARE_DEPTH_ARB 0x200C +# define WGL_SHARE_STENCIL_ARB 0x200D +# define WGL_SHARE_ACCUM_ARB 0x200E +# define WGL_SUPPORT_GDI_ARB 0x200F +# define WGL_SUPPORT_OPENGL_ARB 0x2010 +# define WGL_DOUBLE_BUFFER_ARB 0x2011 +# define WGL_STEREO_ARB 0x2012 +# define WGL_PIXEL_TYPE_ARB 0x2013 +# define WGL_COLOR_BITS_ARB 0x2014 +# define WGL_RED_BITS_ARB 0x2015 +# define WGL_RED_SHIFT_ARB 0x2016 +# define WGL_GREEN_BITS_ARB 0x2017 +# define WGL_GREEN_SHIFT_ARB 0x2018 +# define WGL_BLUE_BITS_ARB 0x2019 +# define WGL_BLUE_SHIFT_ARB 0x201A +# define WGL_ALPHA_BITS_ARB 0x201B +# define WGL_ALPHA_SHIFT_ARB 0x201C +# define WGL_ACCUM_BITS_ARB 0x201D +# define WGL_ACCUM_RED_BITS_ARB 0x201E +# define WGL_ACCUM_GREEN_BITS_ARB 0x201F +# define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +# define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +# define WGL_DEPTH_BITS_ARB 0x2022 +# define WGL_STENCIL_BITS_ARB 0x2023 +# define WGL_AUX_BUFFERS_ARB 0x2024 +# define WGL_NO_ACCELERATION_ARB 0x2025 +# define WGL_GENERIC_ACCELERATION_ARB 0x2026 +# define WGL_FULL_ACCELERATION_ARB 0x2027 +# define WGL_SWAP_EXCHANGE_ARB 0x2028 +# define WGL_SWAP_COPY_ARB 0x2029 +# define WGL_SWAP_UNDEFINED_ARB 0x202A +# define WGL_TYPE_RGBA_ARB 0x202B +# define WGL_TYPE_COLORINDEX_ARB 0x202C #endif #ifndef WGL_ARB_make_current_read -#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 -#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 +# define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +# define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 #endif #ifndef WGL_ARB_pbuffer -#define WGL_DRAW_TO_PBUFFER_ARB 0x202D -#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E -#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F -#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 -#define WGL_PBUFFER_LARGEST_ARB 0x2033 -#define WGL_PBUFFER_WIDTH_ARB 0x2034 -#define WGL_PBUFFER_HEIGHT_ARB 0x2035 -#define WGL_PBUFFER_LOST_ARB 0x2036 +# define WGL_DRAW_TO_PBUFFER_ARB 0x202D +# define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +# define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +# define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +# define WGL_PBUFFER_LARGEST_ARB 0x2033 +# define WGL_PBUFFER_WIDTH_ARB 0x2034 +# define WGL_PBUFFER_HEIGHT_ARB 0x2035 +# define WGL_PBUFFER_LOST_ARB 0x2036 #endif #ifndef WGL_ARB_render_texture -#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 -#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 -#define WGL_TEXTURE_FORMAT_ARB 0x2072 -#define WGL_TEXTURE_TARGET_ARB 0x2073 -#define WGL_MIPMAP_TEXTURE_ARB 0x2074 -#define WGL_TEXTURE_RGB_ARB 0x2075 -#define WGL_TEXTURE_RGBA_ARB 0x2076 -#define WGL_NO_TEXTURE_ARB 0x2077 -#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 -#define WGL_TEXTURE_1D_ARB 0x2079 -#define WGL_TEXTURE_2D_ARB 0x207A -#define WGL_MIPMAP_LEVEL_ARB 0x207B -#define WGL_CUBE_MAP_FACE_ARB 0x207C -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 -#define WGL_FRONT_LEFT_ARB 0x2083 -#define WGL_FRONT_RIGHT_ARB 0x2084 -#define WGL_BACK_LEFT_ARB 0x2085 -#define WGL_BACK_RIGHT_ARB 0x2086 -#define WGL_AUX0_ARB 0x2087 -#define WGL_AUX1_ARB 0x2088 -#define WGL_AUX2_ARB 0x2089 -#define WGL_AUX3_ARB 0x208A -#define WGL_AUX4_ARB 0x208B -#define WGL_AUX5_ARB 0x208C -#define WGL_AUX6_ARB 0x208D -#define WGL_AUX7_ARB 0x208E -#define WGL_AUX8_ARB 0x208F -#define WGL_AUX9_ARB 0x2090 +# define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +# define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +# define WGL_TEXTURE_FORMAT_ARB 0x2072 +# define WGL_TEXTURE_TARGET_ARB 0x2073 +# define WGL_MIPMAP_TEXTURE_ARB 0x2074 +# define WGL_TEXTURE_RGB_ARB 0x2075 +# define WGL_TEXTURE_RGBA_ARB 0x2076 +# define WGL_NO_TEXTURE_ARB 0x2077 +# define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +# define WGL_TEXTURE_1D_ARB 0x2079 +# define WGL_TEXTURE_2D_ARB 0x207A +# define WGL_MIPMAP_LEVEL_ARB 0x207B +# define WGL_CUBE_MAP_FACE_ARB 0x207C +# define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +# define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +# define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +# define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +# define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +# define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +# define WGL_FRONT_LEFT_ARB 0x2083 +# define WGL_FRONT_RIGHT_ARB 0x2084 +# define WGL_BACK_LEFT_ARB 0x2085 +# define WGL_BACK_RIGHT_ARB 0x2086 +# define WGL_AUX0_ARB 0x2087 +# define WGL_AUX1_ARB 0x2088 +# define WGL_AUX2_ARB 0x2089 +# define WGL_AUX3_ARB 0x208A +# define WGL_AUX4_ARB 0x208B +# define WGL_AUX5_ARB 0x208C +# define WGL_AUX6_ARB 0x208D +# define WGL_AUX7_ARB 0x208E +# define WGL_AUX8_ARB 0x208F +# define WGL_AUX9_ARB 0x2090 #endif #ifndef WGL_ARB_pixel_format_float -#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 +# define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 #endif #ifndef WGL_ARB_framebuffer_sRGB -#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 +# define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 #endif #ifndef WGL_ARB_create_context -#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 -#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 -#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 -#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 -#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 -#define WGL_CONTEXT_FLAGS_ARB 0x2094 -#define ERROR_INVALID_VERSION_ARB 0x2095 +# define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 +# define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +# define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +# define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +# define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 +# define WGL_CONTEXT_FLAGS_ARB 0x2094 +# define ERROR_INVALID_VERSION_ARB 0x2095 #endif #ifndef WGL_ARB_create_context_profile -#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 -#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 -#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 -#define ERROR_INVALID_PROFILE_ARB 0x2096 +# define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 +# define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 +# define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 +# define ERROR_INVALID_PROFILE_ARB 0x2096 #endif #ifndef WGL_ARB_create_context_robustness -#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 +# define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +# define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +# define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +# define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 #endif #ifndef WGL_EXT_make_current_read -#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 +# define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 #endif #ifndef WGL_EXT_pixel_format -#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 -#define WGL_DRAW_TO_WINDOW_EXT 0x2001 -#define WGL_DRAW_TO_BITMAP_EXT 0x2002 -#define WGL_ACCELERATION_EXT 0x2003 -#define WGL_NEED_PALETTE_EXT 0x2004 -#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 -#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 -#define WGL_SWAP_METHOD_EXT 0x2007 -#define WGL_NUMBER_OVERLAYS_EXT 0x2008 -#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 -#define WGL_TRANSPARENT_EXT 0x200A -#define WGL_TRANSPARENT_VALUE_EXT 0x200B -#define WGL_SHARE_DEPTH_EXT 0x200C -#define WGL_SHARE_STENCIL_EXT 0x200D -#define WGL_SHARE_ACCUM_EXT 0x200E -#define WGL_SUPPORT_GDI_EXT 0x200F -#define WGL_SUPPORT_OPENGL_EXT 0x2010 -#define WGL_DOUBLE_BUFFER_EXT 0x2011 -#define WGL_STEREO_EXT 0x2012 -#define WGL_PIXEL_TYPE_EXT 0x2013 -#define WGL_COLOR_BITS_EXT 0x2014 -#define WGL_RED_BITS_EXT 0x2015 -#define WGL_RED_SHIFT_EXT 0x2016 -#define WGL_GREEN_BITS_EXT 0x2017 -#define WGL_GREEN_SHIFT_EXT 0x2018 -#define WGL_BLUE_BITS_EXT 0x2019 -#define WGL_BLUE_SHIFT_EXT 0x201A -#define WGL_ALPHA_BITS_EXT 0x201B -#define WGL_ALPHA_SHIFT_EXT 0x201C -#define WGL_ACCUM_BITS_EXT 0x201D -#define WGL_ACCUM_RED_BITS_EXT 0x201E -#define WGL_ACCUM_GREEN_BITS_EXT 0x201F -#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 -#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 -#define WGL_DEPTH_BITS_EXT 0x2022 -#define WGL_STENCIL_BITS_EXT 0x2023 -#define WGL_AUX_BUFFERS_EXT 0x2024 -#define WGL_NO_ACCELERATION_EXT 0x2025 -#define WGL_GENERIC_ACCELERATION_EXT 0x2026 -#define WGL_FULL_ACCELERATION_EXT 0x2027 -#define WGL_SWAP_EXCHANGE_EXT 0x2028 -#define WGL_SWAP_COPY_EXT 0x2029 -#define WGL_SWAP_UNDEFINED_EXT 0x202A -#define WGL_TYPE_RGBA_EXT 0x202B -#define WGL_TYPE_COLORINDEX_EXT 0x202C +# define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 +# define WGL_DRAW_TO_WINDOW_EXT 0x2001 +# define WGL_DRAW_TO_BITMAP_EXT 0x2002 +# define WGL_ACCELERATION_EXT 0x2003 +# define WGL_NEED_PALETTE_EXT 0x2004 +# define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 +# define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 +# define WGL_SWAP_METHOD_EXT 0x2007 +# define WGL_NUMBER_OVERLAYS_EXT 0x2008 +# define WGL_NUMBER_UNDERLAYS_EXT 0x2009 +# define WGL_TRANSPARENT_EXT 0x200A +# define WGL_TRANSPARENT_VALUE_EXT 0x200B +# define WGL_SHARE_DEPTH_EXT 0x200C +# define WGL_SHARE_STENCIL_EXT 0x200D +# define WGL_SHARE_ACCUM_EXT 0x200E +# define WGL_SUPPORT_GDI_EXT 0x200F +# define WGL_SUPPORT_OPENGL_EXT 0x2010 +# define WGL_DOUBLE_BUFFER_EXT 0x2011 +# define WGL_STEREO_EXT 0x2012 +# define WGL_PIXEL_TYPE_EXT 0x2013 +# define WGL_COLOR_BITS_EXT 0x2014 +# define WGL_RED_BITS_EXT 0x2015 +# define WGL_RED_SHIFT_EXT 0x2016 +# define WGL_GREEN_BITS_EXT 0x2017 +# define WGL_GREEN_SHIFT_EXT 0x2018 +# define WGL_BLUE_BITS_EXT 0x2019 +# define WGL_BLUE_SHIFT_EXT 0x201A +# define WGL_ALPHA_BITS_EXT 0x201B +# define WGL_ALPHA_SHIFT_EXT 0x201C +# define WGL_ACCUM_BITS_EXT 0x201D +# define WGL_ACCUM_RED_BITS_EXT 0x201E +# define WGL_ACCUM_GREEN_BITS_EXT 0x201F +# define WGL_ACCUM_BLUE_BITS_EXT 0x2020 +# define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 +# define WGL_DEPTH_BITS_EXT 0x2022 +# define WGL_STENCIL_BITS_EXT 0x2023 +# define WGL_AUX_BUFFERS_EXT 0x2024 +# define WGL_NO_ACCELERATION_EXT 0x2025 +# define WGL_GENERIC_ACCELERATION_EXT 0x2026 +# define WGL_FULL_ACCELERATION_EXT 0x2027 +# define WGL_SWAP_EXCHANGE_EXT 0x2028 +# define WGL_SWAP_COPY_EXT 0x2029 +# define WGL_SWAP_UNDEFINED_EXT 0x202A +# define WGL_TYPE_RGBA_EXT 0x202B +# define WGL_TYPE_COLORINDEX_EXT 0x202C #endif #ifndef WGL_EXT_pbuffer -#define WGL_DRAW_TO_PBUFFER_EXT 0x202D -#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E -#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F -#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 -#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 -#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 -#define WGL_PBUFFER_LARGEST_EXT 0x2033 -#define WGL_PBUFFER_WIDTH_EXT 0x2034 -#define WGL_PBUFFER_HEIGHT_EXT 0x2035 +# define WGL_DRAW_TO_PBUFFER_EXT 0x202D +# define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E +# define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F +# define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 +# define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 +# define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 +# define WGL_PBUFFER_LARGEST_EXT 0x2033 +# define WGL_PBUFFER_WIDTH_EXT 0x2034 +# define WGL_PBUFFER_HEIGHT_EXT 0x2035 #endif #ifndef WGL_EXT_depth_float -#define WGL_DEPTH_FLOAT_EXT 0x2040 +# define WGL_DEPTH_FLOAT_EXT 0x2040 #endif #ifndef WGL_3DFX_multisample -#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 -#define WGL_SAMPLES_3DFX 0x2061 +# define WGL_SAMPLE_BUFFERS_3DFX 0x2060 +# define WGL_SAMPLES_3DFX 0x2061 #endif #ifndef WGL_EXT_multisample -#define WGL_SAMPLE_BUFFERS_EXT 0x2041 -#define WGL_SAMPLES_EXT 0x2042 +# define WGL_SAMPLE_BUFFERS_EXT 0x2041 +# define WGL_SAMPLES_EXT 0x2042 #endif #ifndef WGL_I3D_digital_video_control -#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 -#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 -#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 -#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 +# define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 +# define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 +# define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 +# define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 #endif #ifndef WGL_I3D_gamma -#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E -#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F +# define WGL_GAMMA_TABLE_SIZE_I3D 0x204E +# define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F #endif #ifndef WGL_I3D_genlock -#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 -#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045 -#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046 -#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047 -#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 -#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 -#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A -#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B -#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C +# define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 +# define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045 +# define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046 +# define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047 +# define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 +# define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 +# define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A +# define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B +# define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C #endif #ifndef WGL_I3D_image_buffer -#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 -#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 +# define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 +# define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 #endif #ifndef WGL_I3D_swap_frame_lock #endif #ifndef WGL_NV_render_depth_texture -#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 -#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 -#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 -#define WGL_DEPTH_COMPONENT_NV 0x20A7 +# define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +# define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +# define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +# define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +# define WGL_DEPTH_COMPONENT_NV 0x20A7 #endif #ifndef WGL_NV_render_texture_rectangle -#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 -#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 +# define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +# define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +# define WGL_TEXTURE_RECTANGLE_NV 0x20A2 #endif #ifndef WGL_ATI_pixel_format_float -#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 +# define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 #endif #ifndef WGL_NV_float_buffer -#define WGL_FLOAT_COMPONENTS_NV 0x20B0 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 -#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 -#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 -#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 -#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +# define WGL_FLOAT_COMPONENTS_NV 0x20B0 +# define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +# define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +# define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +# define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +# define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +# define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +# define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +# define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 #endif #ifndef WGL_3DL_stereo_control -#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 -#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 -#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 -#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 +# define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 +# define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 +# define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 +# define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 #endif #ifndef WGL_EXT_pixel_format_packed_float -#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 +# define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 #endif #ifndef WGL_EXT_framebuffer_sRGB -#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 +# define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 #endif #ifndef WGL_NV_present_video -#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 +# define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 #endif #ifndef WGL_NV_video_out -#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 -#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 -#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 -#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 -#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 -#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 -#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 -#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 -#define WGL_VIDEO_OUT_FRAME 0x20C8 -#define WGL_VIDEO_OUT_FIELD_1 0x20C9 -#define WGL_VIDEO_OUT_FIELD_2 0x20CA -#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB -#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC +# define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 +# define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 +# define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 +# define WGL_VIDEO_OUT_COLOR_NV 0x20C3 +# define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 +# define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 +# define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +# define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +# define WGL_VIDEO_OUT_FRAME 0x20C8 +# define WGL_VIDEO_OUT_FIELD_1 0x20C9 +# define WGL_VIDEO_OUT_FIELD_2 0x20CA +# define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB +# define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC #endif #ifndef WGL_NV_swap_group #endif #ifndef WGL_NV_gpu_affinity -#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 -#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 +# define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 +# define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 #endif #ifndef WGL_AMD_gpu_association -#define WGL_GPU_VENDOR_AMD 0x1F00 -#define WGL_GPU_RENDERER_STRING_AMD 0x1F01 -#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 -#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 -#define WGL_GPU_RAM_AMD 0x21A3 -#define WGL_GPU_CLOCK_AMD 0x21A4 -#define WGL_GPU_NUM_PIPES_AMD 0x21A5 -#define WGL_GPU_NUM_SIMD_AMD 0x21A6 -#define WGL_GPU_NUM_RB_AMD 0x21A7 -#define WGL_GPU_NUM_SPI_AMD 0x21A8 +# define WGL_GPU_VENDOR_AMD 0x1F00 +# define WGL_GPU_RENDERER_STRING_AMD 0x1F01 +# define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +# define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +# define WGL_GPU_RAM_AMD 0x21A3 +# define WGL_GPU_CLOCK_AMD 0x21A4 +# define WGL_GPU_NUM_PIPES_AMD 0x21A5 +# define WGL_GPU_NUM_SIMD_AMD 0x21A6 +# define WGL_GPU_NUM_RB_AMD 0x21A7 +# define WGL_GPU_NUM_SPI_AMD 0x21A8 #endif #ifndef WGL_NV_video_capture -#define WGL_UNIQUE_ID_NV 0x20CE -#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +# define WGL_UNIQUE_ID_NV 0x20CE +# define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF #endif #ifndef WGL_NV_copy_image #endif #ifndef WGL_NV_multisample_coverage -#define WGL_COVERAGE_SAMPLES_NV 0x2042 -#define WGL_COLOR_SAMPLES_NV 0x20B9 +# define WGL_COVERAGE_SAMPLES_NV 0x2042 +# define WGL_COLOR_SAMPLES_NV 0x20B9 #endif #ifndef WGL_EXT_create_context_es2_profile -#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +# define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 #endif #ifndef WGL_NV_DX_interop -#define WGL_ACCESS_READ_ONLY_NV 0x00000000 -#define WGL_ACCESS_READ_WRITE_NV 0x00000001 -#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002 +# define WGL_ACCESS_READ_ONLY_NV 0x00000000 +# define WGL_ACCESS_READ_WRITE_NV 0x00000001 +# define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002 #endif #ifndef WGL_NV_DX_interop2 @@ -428,514 +428,601 @@ extern "C" { #ifndef WGL_EXT_swap_control_tear #endif - /*************************************************************/ #ifndef WGL_ARB_pbuffer -DECLARE_HANDLE(HPBUFFERARB); +DECLARE_HANDLE( HPBUFFERARB ); #endif #ifndef WGL_EXT_pbuffer -DECLARE_HANDLE(HPBUFFEREXT); +DECLARE_HANDLE( HPBUFFEREXT ); #endif #ifndef WGL_NV_present_video -DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); +DECLARE_HANDLE( HVIDEOOUTPUTDEVICENV ); #endif #ifndef WGL_NV_video_output -DECLARE_HANDLE(HPVIDEODEV); +DECLARE_HANDLE( HPVIDEODEV ); #endif #ifndef WGL_NV_gpu_affinity -DECLARE_HANDLE(HPGPUNV); -DECLARE_HANDLE(HGPUNV); - -typedef struct _GPU_DEVICE { - DWORD cb; - CHAR DeviceName[32]; - CHAR DeviceString[128]; - DWORD Flags; - RECT rcVirtualScreen; +DECLARE_HANDLE( HPGPUNV ); +DECLARE_HANDLE( HGPUNV ); + +typedef struct _GPU_DEVICE +{ + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD Flags; + RECT rcVirtualScreen; } GPU_DEVICE, *PGPU_DEVICE; #endif #ifndef WGL_NV_video_capture -DECLARE_HANDLE(HVIDEOINPUTDEVICENV); +DECLARE_HANDLE( HVIDEOINPUTDEVICENV ); #endif #ifndef WGL_ARB_buffer_region -#define WGL_ARB_buffer_region 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType); -extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion); -extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height); -extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); -typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); -typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); -typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +# define WGL_ARB_buffer_region 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern HANDLE WINAPI wglCreateBufferRegionARB( HDC hDC, int iLayerPlane, UINT uType ); +extern VOID WINAPI wglDeleteBufferRegionARB( HANDLE hRegion ); +extern BOOL WINAPI wglSaveBufferRegionARB( HANDLE hRegion, int x, int y, int width, int height ); +extern BOOL WINAPI wglRestoreBufferRegionARB( HANDLE hRegion, int x, int y, int width, int height, + int xSrc, int ySrc ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HANDLE( WINAPI *PFNWGLCREATEBUFFERREGIONARBPROC )( HDC hDC, int iLayerPlane, UINT uType ); +typedef VOID( WINAPI *PFNWGLDELETEBUFFERREGIONARBPROC )( HANDLE hRegion ); +typedef BOOL( WINAPI *PFNWGLSAVEBUFFERREGIONARBPROC )( HANDLE hRegion, int x, int y, int width, + int height ); +typedef BOOL( WINAPI *PFNWGLRESTOREBUFFERREGIONARBPROC )( HANDLE hRegion, int x, int y, int width, + int height, int xSrc, int ySrc ); #endif #ifndef WGL_ARB_multisample -#define WGL_ARB_multisample 1 +# define WGL_ARB_multisample 1 #endif #ifndef WGL_ARB_extensions_string -#define WGL_ARB_extensions_string 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern const char * WINAPI wglGetExtensionsStringARB (HDC hdc); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); +# define WGL_ARB_extensions_string 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern const char *WINAPI wglGetExtensionsStringARB( HDC hdc ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef const char *( WINAPI *PFNWGLGETEXTENSIONSSTRINGARBPROC )( HDC hdc ); #endif #ifndef WGL_ARB_pixel_format -#define WGL_ARB_pixel_format 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); -extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); -extern BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); -typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +# define WGL_ARB_pixel_format 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetPixelFormatAttribivARB( HDC hdc, int iPixelFormat, int iLayerPlane, + UINT nAttributes, const int *piAttributes, + int *piValues ); +extern BOOL WINAPI wglGetPixelFormatAttribfvARB( HDC hdc, int iPixelFormat, int iLayerPlane, + UINT nAttributes, const int *piAttributes, + FLOAT *pfValues ); +extern BOOL WINAPI wglChoosePixelFormatARB( HDC hdc, const int *piAttribIList, + const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, + UINT *nNumFormats ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLGETPIXELFORMATATTRIBIVARBPROC )( HDC hdc, int iPixelFormat, int iLayerPlane, + UINT nAttributes, const int *piAttributes, + int *piValues ); +typedef BOOL( WINAPI *PFNWGLGETPIXELFORMATATTRIBFVARBPROC )( HDC hdc, int iPixelFormat, int iLayerPlane, + UINT nAttributes, const int *piAttributes, + FLOAT *pfValues ); +typedef BOOL( WINAPI *PFNWGLCHOOSEPIXELFORMATARBPROC )( HDC hdc, const int *piAttribIList, + const FLOAT *pfAttribFList, UINT nMaxFormats, + int *piFormats, UINT *nNumFormats ); #endif #ifndef WGL_ARB_make_current_read -#define WGL_ARB_make_current_read 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -extern HDC WINAPI wglGetCurrentReadDCARB (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void); +# define WGL_ARB_make_current_read 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglMakeContextCurrentARB( HDC hDrawDC, HDC hReadDC, HGLRC hglrc ); +extern HDC WINAPI wglGetCurrentReadDCARB( void ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLMAKECONTEXTCURRENTARBPROC )( HDC hDrawDC, HDC hReadDC, HGLRC hglrc ); +typedef HDC( WINAPI *PFNWGLGETCURRENTREADDCARBPROC )( void ); #endif #ifndef WGL_ARB_pbuffer -#define WGL_ARB_pbuffer 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); -extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer); -extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC); -extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer); -extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); -typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); -typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); -typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); -typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +# define WGL_ARB_pbuffer 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern HPBUFFERARB WINAPI wglCreatePbufferARB( HDC hDC, int iPixelFormat, int iWidth, int iHeight, + const int *piAttribList ); +extern HDC WINAPI wglGetPbufferDCARB( HPBUFFERARB hPbuffer ); +extern int WINAPI wglReleasePbufferDCARB( HPBUFFERARB hPbuffer, HDC hDC ); +extern BOOL WINAPI wglDestroyPbufferARB( HPBUFFERARB hPbuffer ); +extern BOOL WINAPI wglQueryPbufferARB( HPBUFFERARB hPbuffer, int iAttribute, int *piValue ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HPBUFFERARB( WINAPI *PFNWGLCREATEPBUFFERARBPROC )( HDC hDC, int iPixelFormat, int iWidth, + int iHeight, const int *piAttribList ); +typedef HDC( WINAPI *PFNWGLGETPBUFFERDCARBPROC )( HPBUFFERARB hPbuffer ); +typedef int( WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC )( HPBUFFERARB hPbuffer, HDC hDC ); +typedef BOOL( WINAPI *PFNWGLDESTROYPBUFFERARBPROC )( HPBUFFERARB hPbuffer ); +typedef BOOL( WINAPI *PFNWGLQUERYPBUFFERARBPROC )( HPBUFFERARB hPbuffer, int iAttribute, int *piValue ); #endif #ifndef WGL_ARB_render_texture -#define WGL_ARB_render_texture 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); -extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); -extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); -typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); -typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); +# define WGL_ARB_render_texture 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglBindTexImageARB( HPBUFFERARB hPbuffer, int iBuffer ); +extern BOOL WINAPI wglReleaseTexImageARB( HPBUFFERARB hPbuffer, int iBuffer ); +extern BOOL WINAPI wglSetPbufferAttribARB( HPBUFFERARB hPbuffer, const int *piAttribList ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLBINDTEXIMAGEARBPROC )( HPBUFFERARB hPbuffer, int iBuffer ); +typedef BOOL( WINAPI *PFNWGLRELEASETEXIMAGEARBPROC )( HPBUFFERARB hPbuffer, int iBuffer ); +typedef BOOL( WINAPI *PFNWGLSETPBUFFERATTRIBARBPROC )( HPBUFFERARB hPbuffer, const int *piAttribList ); #endif #ifndef WGL_ARB_pixel_format_float -#define WGL_ARB_pixel_format_float 1 +# define WGL_ARB_pixel_format_float 1 #endif #ifndef WGL_ARB_framebuffer_sRGB -#define WGL_ARB_framebuffer_sRGB 1 +# define WGL_ARB_framebuffer_sRGB 1 #endif #ifndef WGL_ARB_create_context -#define WGL_ARB_create_context 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); +# define WGL_ARB_create_context 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern HGLRC WINAPI wglCreateContextAttribsARB( HDC hDC, HGLRC hShareContext, const int *attribList ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HGLRC( WINAPI *PFNWGLCREATECONTEXTATTRIBSARBPROC )( HDC hDC, HGLRC hShareContext, + const int *attribList ); #endif #ifndef WGL_ARB_create_context_profile -#define WGL_ARB_create_context_profile 1 +# define WGL_ARB_create_context_profile 1 #endif #ifndef WGL_ARB_create_context_robustness -#define WGL_ARB_create_context_robustness 1 +# define WGL_ARB_create_context_robustness 1 #endif #ifndef WGL_EXT_display_color_table -#define WGL_EXT_display_color_table 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id); -extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length); -extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id); -extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); -typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length); -typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); -typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); +# define WGL_EXT_display_color_table 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern GLboolean WINAPI wglCreateDisplayColorTableEXT( GLushort id ); +extern GLboolean WINAPI wglLoadDisplayColorTableEXT( const GLushort *table, GLuint length ); +extern GLboolean WINAPI wglBindDisplayColorTableEXT( GLushort id ); +extern VOID WINAPI wglDestroyDisplayColorTableEXT( GLushort id ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef GLboolean( WINAPI *PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC )( GLushort id ); +typedef GLboolean( WINAPI *PFNWGLLOADDISPLAYCOLORTABLEEXTPROC )( const GLushort *table, GLuint length ); +typedef GLboolean( WINAPI *PFNWGLBINDDISPLAYCOLORTABLEEXTPROC )( GLushort id ); +typedef VOID( WINAPI *PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC )( GLushort id ); #endif #ifndef WGL_EXT_extensions_string -#define WGL_EXT_extensions_string 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern const char * WINAPI wglGetExtensionsStringEXT (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); +# define WGL_EXT_extensions_string 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern const char *WINAPI wglGetExtensionsStringEXT( void ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef const char *( WINAPI *PFNWGLGETEXTENSIONSSTRINGEXTPROC )( void ); #endif #ifndef WGL_EXT_make_current_read -#define WGL_EXT_make_current_read 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -extern HDC WINAPI wglGetCurrentReadDCEXT (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void); +# define WGL_EXT_make_current_read 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglMakeContextCurrentEXT( HDC hDrawDC, HDC hReadDC, HGLRC hglrc ); +extern HDC WINAPI wglGetCurrentReadDCEXT( void ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLMAKECONTEXTCURRENTEXTPROC )( HDC hDrawDC, HDC hReadDC, HGLRC hglrc ); +typedef HDC( WINAPI *PFNWGLGETCURRENTREADDCEXTPROC )( void ); #endif #ifndef WGL_EXT_pbuffer -#define WGL_EXT_pbuffer 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); -extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer); -extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC); -extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer); -extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); -typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); -typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); -typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); -typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +# define WGL_EXT_pbuffer 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern HPBUFFEREXT WINAPI wglCreatePbufferEXT( HDC hDC, int iPixelFormat, int iWidth, int iHeight, + const int *piAttribList ); +extern HDC WINAPI wglGetPbufferDCEXT( HPBUFFEREXT hPbuffer ); +extern int WINAPI wglReleasePbufferDCEXT( HPBUFFEREXT hPbuffer, HDC hDC ); +extern BOOL WINAPI wglDestroyPbufferEXT( HPBUFFEREXT hPbuffer ); +extern BOOL WINAPI wglQueryPbufferEXT( HPBUFFEREXT hPbuffer, int iAttribute, int *piValue ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HPBUFFEREXT( WINAPI *PFNWGLCREATEPBUFFEREXTPROC )( HDC hDC, int iPixelFormat, int iWidth, + int iHeight, const int *piAttribList ); +typedef HDC( WINAPI *PFNWGLGETPBUFFERDCEXTPROC )( HPBUFFEREXT hPbuffer ); +typedef int( WINAPI *PFNWGLRELEASEPBUFFERDCEXTPROC )( HPBUFFEREXT hPbuffer, HDC hDC ); +typedef BOOL( WINAPI *PFNWGLDESTROYPBUFFEREXTPROC )( HPBUFFEREXT hPbuffer ); +typedef BOOL( WINAPI *PFNWGLQUERYPBUFFEREXTPROC )( HPBUFFEREXT hPbuffer, int iAttribute, int *piValue ); #endif #ifndef WGL_EXT_pixel_format -#define WGL_EXT_pixel_format 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); -extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); -extern BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); -typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +# define WGL_EXT_pixel_format 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetPixelFormatAttribivEXT( HDC hdc, int iPixelFormat, int iLayerPlane, + UINT nAttributes, int *piAttributes, int *piValues ); +extern BOOL WINAPI wglGetPixelFormatAttribfvEXT( HDC hdc, int iPixelFormat, int iLayerPlane, + UINT nAttributes, int *piAttributes, FLOAT *pfValues ); +extern BOOL WINAPI wglChoosePixelFormatEXT( HDC hdc, const int *piAttribIList, + const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, + UINT *nNumFormats ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLGETPIXELFORMATATTRIBIVEXTPROC )( HDC hdc, int iPixelFormat, int iLayerPlane, + UINT nAttributes, int *piAttributes, + int *piValues ); +typedef BOOL( WINAPI *PFNWGLGETPIXELFORMATATTRIBFVEXTPROC )( HDC hdc, int iPixelFormat, int iLayerPlane, + UINT nAttributes, int *piAttributes, + FLOAT *pfValues ); +typedef BOOL( WINAPI *PFNWGLCHOOSEPIXELFORMATEXTPROC )( HDC hdc, const int *piAttribIList, + const FLOAT *pfAttribFList, UINT nMaxFormats, + int *piFormats, UINT *nNumFormats ); #endif #ifndef WGL_EXT_swap_control -#define WGL_EXT_swap_control 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglSwapIntervalEXT (int interval); -extern int WINAPI wglGetSwapIntervalEXT (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); -typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); +# define WGL_EXT_swap_control 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglSwapIntervalEXT( int interval ); +extern int WINAPI wglGetSwapIntervalEXT( void ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLSWAPINTERVALEXTPROC )( int interval ); +typedef int( WINAPI *PFNWGLGETSWAPINTERVALEXTPROC )( void ); #endif #ifndef WGL_EXT_depth_float -#define WGL_EXT_depth_float 1 +# define WGL_EXT_depth_float 1 #endif #ifndef WGL_NV_vertex_array_range -#define WGL_NV_vertex_array_range 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern void* WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -extern void WINAPI wglFreeMemoryNV (void *pointer); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); +# define WGL_NV_vertex_array_range 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern void *WINAPI wglAllocateMemoryNV( GLsizei size, GLfloat readfreq, GLfloat writefreq, + GLfloat priority ); +extern void WINAPI wglFreeMemoryNV( void *pointer ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef void *( WINAPI *PFNWGLALLOCATEMEMORYNVPROC )( GLsizei size, GLfloat readfreq, GLfloat writefreq, + GLfloat priority ); +typedef void( WINAPI *PFNWGLFREEMEMORYNVPROC )( void *pointer ); #endif #ifndef WGL_3DFX_multisample -#define WGL_3DFX_multisample 1 +# define WGL_3DFX_multisample 1 #endif #ifndef WGL_EXT_multisample -#define WGL_EXT_multisample 1 +# define WGL_EXT_multisample 1 #endif #ifndef WGL_OML_sync_control -#define WGL_OML_sync_control 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); -extern BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator); -extern INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); -extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); -extern BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); -extern BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); -typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator); -typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); -typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); -typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); -typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +# define WGL_OML_sync_control 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetSyncValuesOML( HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc ); +extern BOOL WINAPI wglGetMscRateOML( HDC hdc, INT32 *numerator, INT32 *denominator ); +extern INT64 WINAPI wglSwapBuffersMscOML( HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder ); +extern INT64 WINAPI wglSwapLayerBuffersMscOML( HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, + INT64 remainder ); +extern BOOL WINAPI wglWaitForMscOML( HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, + INT64 *ust, INT64 *msc, INT64 *sbc ); +extern BOOL WINAPI wglWaitForSbcOML( HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLGETSYNCVALUESOMLPROC )( HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc ); +typedef BOOL( WINAPI *PFNWGLGETMSCRATEOMLPROC )( HDC hdc, INT32 *numerator, INT32 *denominator ); +typedef INT64( WINAPI *PFNWGLSWAPBUFFERSMSCOMLPROC )( HDC hdc, INT64 target_msc, INT64 divisor, + INT64 remainder ); +typedef INT64( WINAPI *PFNWGLSWAPLAYERBUFFERSMSCOMLPROC )( HDC hdc, int fuPlanes, INT64 target_msc, + INT64 divisor, INT64 remainder ); +typedef BOOL( WINAPI *PFNWGLWAITFORMSCOMLPROC )( HDC hdc, INT64 target_msc, INT64 divisor, + INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc ); +typedef BOOL( WINAPI *PFNWGLWAITFORSBCOMLPROC )( HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, + INT64 *sbc ); #endif #ifndef WGL_I3D_digital_video_control -#define WGL_I3D_digital_video_control 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue); -extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); -typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +# define WGL_I3D_digital_video_control 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetDigitalVideoParametersI3D( HDC hDC, int iAttribute, int *piValue ); +extern BOOL WINAPI wglSetDigitalVideoParametersI3D( HDC hDC, int iAttribute, const int *piValue ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC )( HDC hDC, int iAttribute, int *piValue ); +typedef BOOL( WINAPI *PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC )( HDC hDC, int iAttribute, + const int *piValue ); #endif #ifndef WGL_I3D_gamma -#define WGL_I3D_gamma 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue); -extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue); -extern BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); -extern BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); -typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); -typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); -typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +# define WGL_I3D_gamma 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetGammaTableParametersI3D( HDC hDC, int iAttribute, int *piValue ); +extern BOOL WINAPI wglSetGammaTableParametersI3D( HDC hDC, int iAttribute, const int *piValue ); +extern BOOL WINAPI wglGetGammaTableI3D( HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, + USHORT *puBlue ); +extern BOOL WINAPI wglSetGammaTableI3D( HDC hDC, int iEntries, const USHORT *puRed, + const USHORT *puGreen, const USHORT *puBlue ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLGETGAMMATABLEPARAMETERSI3DPROC )( HDC hDC, int iAttribute, int *piValue ); +typedef BOOL( WINAPI *PFNWGLSETGAMMATABLEPARAMETERSI3DPROC )( HDC hDC, int iAttribute, + const int *piValue ); +typedef BOOL( WINAPI *PFNWGLGETGAMMATABLEI3DPROC )( HDC hDC, int iEntries, USHORT *puRed, + USHORT *puGreen, USHORT *puBlue ); +typedef BOOL( WINAPI *PFNWGLSETGAMMATABLEI3DPROC )( HDC hDC, int iEntries, const USHORT *puRed, + const USHORT *puGreen, const USHORT *puBlue ); #endif #ifndef WGL_I3D_genlock -#define WGL_I3D_genlock 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglEnableGenlockI3D (HDC hDC); -extern BOOL WINAPI wglDisableGenlockI3D (HDC hDC); -extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag); -extern BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource); -extern BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource); -extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge); -extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge); -extern BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate); -extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate); -extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay); -extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay); -extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); -typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); -typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag); -typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource); -typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge); -typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate); -typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay); -typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +# define WGL_I3D_genlock 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnableGenlockI3D( HDC hDC ); +extern BOOL WINAPI wglDisableGenlockI3D( HDC hDC ); +extern BOOL WINAPI wglIsEnabledGenlockI3D( HDC hDC, BOOL *pFlag ); +extern BOOL WINAPI wglGenlockSourceI3D( HDC hDC, UINT uSource ); +extern BOOL WINAPI wglGetGenlockSourceI3D( HDC hDC, UINT *uSource ); +extern BOOL WINAPI wglGenlockSourceEdgeI3D( HDC hDC, UINT uEdge ); +extern BOOL WINAPI wglGetGenlockSourceEdgeI3D( HDC hDC, UINT *uEdge ); +extern BOOL WINAPI wglGenlockSampleRateI3D( HDC hDC, UINT uRate ); +extern BOOL WINAPI wglGetGenlockSampleRateI3D( HDC hDC, UINT *uRate ); +extern BOOL WINAPI wglGenlockSourceDelayI3D( HDC hDC, UINT uDelay ); +extern BOOL WINAPI wglGetGenlockSourceDelayI3D( HDC hDC, UINT *uDelay ); +extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D( HDC hDC, UINT *uMaxLineDelay, + UINT *uMaxPixelDelay ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLENABLEGENLOCKI3DPROC )( HDC hDC ); +typedef BOOL( WINAPI *PFNWGLDISABLEGENLOCKI3DPROC )( HDC hDC ); +typedef BOOL( WINAPI *PFNWGLISENABLEDGENLOCKI3DPROC )( HDC hDC, BOOL *pFlag ); +typedef BOOL( WINAPI *PFNWGLGENLOCKSOURCEI3DPROC )( HDC hDC, UINT uSource ); +typedef BOOL( WINAPI *PFNWGLGETGENLOCKSOURCEI3DPROC )( HDC hDC, UINT *uSource ); +typedef BOOL( WINAPI *PFNWGLGENLOCKSOURCEEDGEI3DPROC )( HDC hDC, UINT uEdge ); +typedef BOOL( WINAPI *PFNWGLGETGENLOCKSOURCEEDGEI3DPROC )( HDC hDC, UINT *uEdge ); +typedef BOOL( WINAPI *PFNWGLGENLOCKSAMPLERATEI3DPROC )( HDC hDC, UINT uRate ); +typedef BOOL( WINAPI *PFNWGLGETGENLOCKSAMPLERATEI3DPROC )( HDC hDC, UINT *uRate ); +typedef BOOL( WINAPI *PFNWGLGENLOCKSOURCEDELAYI3DPROC )( HDC hDC, UINT uDelay ); +typedef BOOL( WINAPI *PFNWGLGETGENLOCKSOURCEDELAYI3DPROC )( HDC hDC, UINT *uDelay ); +typedef BOOL( WINAPI *PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC )( HDC hDC, UINT *uMaxLineDelay, + UINT *uMaxPixelDelay ); #endif #ifndef WGL_I3D_image_buffer -#define WGL_I3D_image_buffer 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags); -extern BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress); -extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); -extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); -typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); -typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); -typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count); +# define WGL_I3D_image_buffer 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern LPVOID WINAPI wglCreateImageBufferI3D( HDC hDC, DWORD dwSize, UINT uFlags ); +extern BOOL WINAPI wglDestroyImageBufferI3D( HDC hDC, LPVOID pAddress ); +extern BOOL WINAPI wglAssociateImageBufferEventsI3D( HDC hDC, const HANDLE *pEvent, + const LPVOID *pAddress, const DWORD *pSize, + UINT count ); +extern BOOL WINAPI wglReleaseImageBufferEventsI3D( HDC hDC, const LPVOID *pAddress, UINT count ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef LPVOID( WINAPI *PFNWGLCREATEIMAGEBUFFERI3DPROC )( HDC hDC, DWORD dwSize, UINT uFlags ); +typedef BOOL( WINAPI *PFNWGLDESTROYIMAGEBUFFERI3DPROC )( HDC hDC, LPVOID pAddress ); +typedef BOOL( WINAPI *PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC )( HDC hDC, const HANDLE *pEvent, + const LPVOID *pAddress, + const DWORD *pSize, UINT count ); +typedef BOOL( WINAPI *PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC )( HDC hDC, const LPVOID *pAddress, + UINT count ); #endif #ifndef WGL_I3D_swap_frame_lock -#define WGL_I3D_swap_frame_lock 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglEnableFrameLockI3D (void); -extern BOOL WINAPI wglDisableFrameLockI3D (void); -extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag); -extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag); -typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag); +# define WGL_I3D_swap_frame_lock 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnableFrameLockI3D( void ); +extern BOOL WINAPI wglDisableFrameLockI3D( void ); +extern BOOL WINAPI wglIsEnabledFrameLockI3D( BOOL *pFlag ); +extern BOOL WINAPI wglQueryFrameLockMasterI3D( BOOL *pFlag ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLENABLEFRAMELOCKI3DPROC )( void ); +typedef BOOL( WINAPI *PFNWGLDISABLEFRAMELOCKI3DPROC )( void ); +typedef BOOL( WINAPI *PFNWGLISENABLEDFRAMELOCKI3DPROC )( BOOL *pFlag ); +typedef BOOL( WINAPI *PFNWGLQUERYFRAMELOCKMASTERI3DPROC )( BOOL *pFlag ); #endif #ifndef WGL_I3D_swap_frame_usage -#define WGL_I3D_swap_frame_usage 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetFrameUsageI3D (float *pUsage); -extern BOOL WINAPI wglBeginFrameTrackingI3D (void); -extern BOOL WINAPI wglEndFrameTrackingI3D (void); -extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage); -typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +# define WGL_I3D_swap_frame_usage 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetFrameUsageI3D( float *pUsage ); +extern BOOL WINAPI wglBeginFrameTrackingI3D( void ); +extern BOOL WINAPI wglEndFrameTrackingI3D( void ); +extern BOOL WINAPI wglQueryFrameTrackingI3D( DWORD *pFrameCount, DWORD *pMissedFrames, + float *pLastMissedUsage ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLGETFRAMEUSAGEI3DPROC )( float *pUsage ); +typedef BOOL( WINAPI *PFNWGLBEGINFRAMETRACKINGI3DPROC )( void ); +typedef BOOL( WINAPI *PFNWGLENDFRAMETRACKINGI3DPROC )( void ); +typedef BOOL( WINAPI *PFNWGLQUERYFRAMETRACKINGI3DPROC )( DWORD *pFrameCount, DWORD *pMissedFrames, + float *pLastMissedUsage ); #endif #ifndef WGL_ATI_pixel_format_float -#define WGL_ATI_pixel_format_float 1 +# define WGL_ATI_pixel_format_float 1 #endif #ifndef WGL_NV_float_buffer -#define WGL_NV_float_buffer 1 +# define WGL_NV_float_buffer 1 #endif #ifndef WGL_3DL_stereo_control -#define WGL_3DL_stereo_control 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState); +# define WGL_3DL_stereo_control 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglSetStereoEmitterState3DL( HDC hDC, UINT uState ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLSETSTEREOEMITTERSTATE3DLPROC )( HDC hDC, UINT uState ); #endif #ifndef WGL_EXT_pixel_format_packed_float -#define WGL_EXT_pixel_format_packed_float 1 +# define WGL_EXT_pixel_format_packed_float 1 #endif #ifndef WGL_EXT_framebuffer_sRGB -#define WGL_EXT_framebuffer_sRGB 1 +# define WGL_EXT_framebuffer_sRGB 1 #endif #ifndef WGL_NV_present_video -#define WGL_NV_present_video 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); -extern BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); -extern BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); -typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); -typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue); +# define WGL_NV_present_video 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern int WINAPI wglEnumerateVideoDevicesNV( HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList ); +extern BOOL WINAPI wglBindVideoDeviceNV( HDC hDC, unsigned int uVideoSlot, + HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList ); +extern BOOL WINAPI wglQueryCurrentContextNV( int iAttribute, int *piValue ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef int( WINAPI *PFNWGLENUMERATEVIDEODEVICESNVPROC )( HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList ); +typedef BOOL( WINAPI *PFNWGLBINDVIDEODEVICENVPROC )( HDC hDC, unsigned int uVideoSlot, + HVIDEOOUTPUTDEVICENV hVideoDevice, + const int * piAttribList ); +typedef BOOL( WINAPI *PFNWGLQUERYCURRENTCONTEXTNVPROC )( int iAttribute, int *piValue ); #endif #ifndef WGL_NV_video_output -#define WGL_NV_video_output 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); -extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice); -extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); -extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer); -extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); -extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); -typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice); -typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); -typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer); -typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); -typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +# define WGL_NV_video_output 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetVideoDeviceNV( HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice ); +extern BOOL WINAPI wglReleaseVideoDeviceNV( HPVIDEODEV hVideoDevice ); +extern BOOL WINAPI wglBindVideoImageNV( HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, + int iVideoBuffer ); +extern BOOL WINAPI wglReleaseVideoImageNV( HPBUFFERARB hPbuffer, int iVideoBuffer ); +extern BOOL WINAPI wglSendPbufferToVideoNV( HPBUFFERARB hPbuffer, int iBufferType, + unsigned long *pulCounterPbuffer, BOOL bBlock ); +extern BOOL WINAPI wglGetVideoInfoNV( HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, + unsigned long *pulCounterOutputVideo ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLGETVIDEODEVICENVPROC )( HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice ); +typedef BOOL( WINAPI *PFNWGLRELEASEVIDEODEVICENVPROC )( HPVIDEODEV hVideoDevice ); +typedef BOOL( WINAPI *PFNWGLBINDVIDEOIMAGENVPROC )( HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, + int iVideoBuffer ); +typedef BOOL( WINAPI *PFNWGLRELEASEVIDEOIMAGENVPROC )( HPBUFFERARB hPbuffer, int iVideoBuffer ); +typedef BOOL( WINAPI *PFNWGLSENDPBUFFERTOVIDEONVPROC )( HPBUFFERARB hPbuffer, int iBufferType, + unsigned long *pulCounterPbuffer, BOOL bBlock ); +typedef BOOL( WINAPI *PFNWGLGETVIDEOINFONVPROC )( HPVIDEODEV hpVideoDevice, + unsigned long *pulCounterOutputPbuffer, + unsigned long *pulCounterOutputVideo ); #endif #ifndef WGL_NV_swap_group -#define WGL_NV_swap_group 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group); -extern BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier); -extern BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier); -extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); -extern BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count); -extern BOOL WINAPI wglResetFrameCountNV (HDC hDC); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); -typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier); -typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier); -typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); -typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count); -typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); +# define WGL_NV_swap_group 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglJoinSwapGroupNV( HDC hDC, GLuint group ); +extern BOOL WINAPI wglBindSwapBarrierNV( GLuint group, GLuint barrier ); +extern BOOL WINAPI wglQuerySwapGroupNV( HDC hDC, GLuint *group, GLuint *barrier ); +extern BOOL WINAPI wglQueryMaxSwapGroupsNV( HDC hDC, GLuint *maxGroups, GLuint *maxBarriers ); +extern BOOL WINAPI wglQueryFrameCountNV( HDC hDC, GLuint *count ); +extern BOOL WINAPI wglResetFrameCountNV( HDC hDC ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLJOINSWAPGROUPNVPROC )( HDC hDC, GLuint group ); +typedef BOOL( WINAPI *PFNWGLBINDSWAPBARRIERNVPROC )( GLuint group, GLuint barrier ); +typedef BOOL( WINAPI *PFNWGLQUERYSWAPGROUPNVPROC )( HDC hDC, GLuint *group, GLuint *barrier ); +typedef BOOL( WINAPI *PFNWGLQUERYMAXSWAPGROUPSNVPROC )( HDC hDC, GLuint *maxGroups, + GLuint *maxBarriers ); +typedef BOOL( WINAPI *PFNWGLQUERYFRAMECOUNTNVPROC )( HDC hDC, GLuint *count ); +typedef BOOL( WINAPI *PFNWGLRESETFRAMECOUNTNVPROC )( HDC hDC ); #endif #ifndef WGL_NV_gpu_affinity -#define WGL_NV_gpu_affinity 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu); -extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); -extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList); -extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); -extern BOOL WINAPI wglDeleteDCNV (HDC hdc); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu); -typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); -typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); -typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); -typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc); +# define WGL_NV_gpu_affinity 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnumGpusNV( UINT iGpuIndex, HGPUNV *phGpu ); +extern BOOL WINAPI wglEnumGpuDevicesNV( HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice ); +extern HDC WINAPI wglCreateAffinityDCNV( const HGPUNV *phGpuList ); +extern BOOL WINAPI wglEnumGpusFromAffinityDCNV( HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu ); +extern BOOL WINAPI wglDeleteDCNV( HDC hdc ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLENUMGPUSNVPROC )( UINT iGpuIndex, HGPUNV *phGpu ); +typedef BOOL( WINAPI *PFNWGLENUMGPUDEVICESNVPROC )( HGPUNV hGpu, UINT iDeviceIndex, + PGPU_DEVICE lpGpuDevice ); +typedef HDC( WINAPI *PFNWGLCREATEAFFINITYDCNVPROC )( const HGPUNV *phGpuList ); +typedef BOOL( WINAPI *PFNWGLENUMGPUSFROMAFFINITYDCNVPROC )( HDC hAffinityDC, UINT iGpuIndex, + HGPUNV *hGpu ); +typedef BOOL( WINAPI *PFNWGLDELETEDCNVPROC )( HDC hdc ); #endif #ifndef WGL_AMD_gpu_association -#define WGL_AMD_gpu_association 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids); -extern INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data); -extern UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc); -extern HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id); -extern HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList); -extern BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc); -extern BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc); -extern HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void); -extern VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids); -typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data); -typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc); -typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id); -typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList); -typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc); -typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc); -typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void); -typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +# define WGL_AMD_gpu_association 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern UINT WINAPI wglGetGPUIDsAMD( UINT maxCount, UINT *ids ); +extern INT WINAPI wglGetGPUInfoAMD( UINT id, int property, GLenum dataType, UINT size, void *data ); +extern UINT WINAPI wglGetContextGPUIDAMD( HGLRC hglrc ); +extern HGLRC WINAPI wglCreateAssociatedContextAMD( UINT id ); +extern HGLRC WINAPI wglCreateAssociatedContextAttribsAMD( UINT id, HGLRC hShareContext, + const int *attribList ); +extern BOOL WINAPI wglDeleteAssociatedContextAMD( HGLRC hglrc ); +extern BOOL WINAPI wglMakeAssociatedContextCurrentAMD( HGLRC hglrc ); +extern HGLRC WINAPI wglGetCurrentAssociatedContextAMD( void ); +extern VOID WINAPI wglBlitContextFramebufferAMD( HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, + GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, + GLint dstY1, GLbitfield mask, GLenum filter ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef UINT( WINAPI *PFNWGLGETGPUIDSAMDPROC )( UINT maxCount, UINT *ids ); +typedef INT( WINAPI *PFNWGLGETGPUINFOAMDPROC )( UINT id, int property, GLenum dataType, UINT size, + void *data ); +typedef UINT( WINAPI *PFNWGLGETCONTEXTGPUIDAMDPROC )( HGLRC hglrc ); +typedef HGLRC( WINAPI *PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC )( UINT id ); +typedef HGLRC( WINAPI *PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC )( UINT id, HGLRC hShareContext, + const int *attribList ); +typedef BOOL( WINAPI *PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC )( HGLRC hglrc ); +typedef BOOL( WINAPI *PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC )( HGLRC hglrc ); +typedef HGLRC( WINAPI *PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC )( void ); +typedef VOID( WINAPI *PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC )( HGLRC dstCtx, GLint srcX0, GLint srcY0, + GLint srcX1, GLint srcY1, GLint dstX0, + GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter ); #endif #ifndef WGL_NV_video_capture -#define WGL_NV_video_capture 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); -extern UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); -extern BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); -extern BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); -extern BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); -typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); -typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); -typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); -typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +# define WGL_NV_video_capture 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglBindVideoCaptureDeviceNV( UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice ); +extern UINT WINAPI wglEnumerateVideoCaptureDevicesNV( HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList ); +extern BOOL WINAPI wglLockVideoCaptureDeviceNV( HDC hDc, HVIDEOINPUTDEVICENV hDevice ); +extern BOOL WINAPI wglQueryVideoCaptureDeviceNV( HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, + int *piValue ); +extern BOOL WINAPI wglReleaseVideoCaptureDeviceNV( HDC hDc, HVIDEOINPUTDEVICENV hDevice ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLBINDVIDEOCAPTUREDEVICENVPROC )( UINT uVideoSlot, + HVIDEOINPUTDEVICENV hDevice ); +typedef UINT( WINAPI *PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC )( HDC hDc, + HVIDEOINPUTDEVICENV *phDeviceList ); +typedef BOOL( WINAPI *PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC )( HDC hDc, HVIDEOINPUTDEVICENV hDevice ); +typedef BOOL( WINAPI *PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC )( HDC hDc, HVIDEOINPUTDEVICENV hDevice, + int iAttribute, int *piValue ); +typedef BOOL( WINAPI *PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC )( HDC hDc, HVIDEOINPUTDEVICENV hDevice ); #endif #ifndef WGL_NV_copy_image -#define WGL_NV_copy_image 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +# define WGL_NV_copy_image 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglCopyImageSubDataNV( HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, + GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, + GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, + GLint dstY, GLint dstZ, GLsizei width, GLsizei height, + GLsizei depth ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLCOPYIMAGESUBDATANVPROC )( HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, + GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, + HGLRC hDstRC, GLuint dstName, GLenum dstTarget, + GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, + GLsizei width, GLsizei height, GLsizei depth ); #endif #ifndef WGL_NV_multisample_coverage -#define WGL_NV_multisample_coverage 1 +# define WGL_NV_multisample_coverage 1 #endif #ifndef WGL_NV_DX_interop -#define WGL_NV_DX_interop 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle); -extern HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice); -extern BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice); -extern HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access); -extern BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject); -extern BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access); -extern BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects); -extern BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle); -typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice); -typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice); -typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access); -typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject); -typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access); -typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects); -typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects); +# define WGL_NV_DX_interop 1 +# ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglDXSetResourceShareHandleNV( void *dxObject, HANDLE shareHandle ); +extern HANDLE WINAPI wglDXOpenDeviceNV( void *dxDevice ); +extern BOOL WINAPI wglDXCloseDeviceNV( HANDLE hDevice ); +extern HANDLE WINAPI wglDXRegisterObjectNV( HANDLE hDevice, void *dxObject, GLuint name, GLenum type, + GLenum access ); +extern BOOL WINAPI wglDXUnregisterObjectNV( HANDLE hDevice, HANDLE hObject ); +extern BOOL WINAPI wglDXObjectAccessNV( HANDLE hObject, GLenum access ); +extern BOOL WINAPI wglDXLockObjectsNV( HANDLE hDevice, GLint count, HANDLE *hObjects ); +extern BOOL WINAPI wglDXUnlockObjectsNV( HANDLE hDevice, GLint count, HANDLE *hObjects ); +# endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL( WINAPI *PFNWGLDXSETRESOURCESHAREHANDLENVPROC )( void *dxObject, HANDLE shareHandle ); +typedef HANDLE( WINAPI *PFNWGLDXOPENDEVICENVPROC )( void *dxDevice ); +typedef BOOL( WINAPI *PFNWGLDXCLOSEDEVICENVPROC )( HANDLE hDevice ); +typedef HANDLE( WINAPI *PFNWGLDXREGISTEROBJECTNVPROC )( HANDLE hDevice, void *dxObject, GLuint name, + GLenum type, GLenum access ); +typedef BOOL( WINAPI *PFNWGLDXUNREGISTEROBJECTNVPROC )( HANDLE hDevice, HANDLE hObject ); +typedef BOOL( WINAPI *PFNWGLDXOBJECTACCESSNVPROC )( HANDLE hObject, GLenum access ); +typedef BOOL( WINAPI *PFNWGLDXLOCKOBJECTSNVPROC )( HANDLE hDevice, GLint count, HANDLE *hObjects ); +typedef BOOL( WINAPI *PFNWGLDXUNLOCKOBJECTSNVPROC )( HANDLE hDevice, GLint count, HANDLE *hObjects ); #endif #ifndef WGL_NV_DX_interop2 -#define WGL_NV_DX_interop2 1 +# define WGL_NV_DX_interop2 1 #endif #ifndef WGL_EXT_swap_control_tear -#define WGL_EXT_swap_control_tear 1 +# define WGL_EXT_swap_control_tear 1 #endif - #ifdef __cplusplus } #endif diff --git a/include/betsy/CpuImage.h b/include/betsy/CpuImage.h index 93e2b7c..5d66355 100644 --- a/include/betsy/CpuImage.h +++ b/include/betsy/CpuImage.h @@ -1,7 +1,8 @@ #pragma once +#include -#include "betsy/EncoderGL.h" +#include "Encoder.h" namespace betsy { @@ -11,18 +12,16 @@ namespace betsy uint32_t width; uint32_t height; - PixelFormat format; + gli::format format; CpuImage(); CpuImage( const char *fullpath ); ~CpuImage(); - static size_t getBytesPerPixel( PixelFormat format ); - - static bool isCompressed( PixelFormat pixelFormat ); + static size_t getBytesPerPixel( gli::format format ); static size_t getSizeBytes( uint32_t width, uint32_t height, uint32_t depth, uint32_t slices, - PixelFormat format, uint32_t rowAlignment = 4u ); + gli::format format, uint32_t rowAlignment = 4u ); protected: void RGB8toRGBA8( uint8_t const *__restrict srcData, size_t bytesPerRow ); diff --git a/include/betsy/Encoder.h b/include/betsy/Encoder.h index 73aa524..be07e65 100644 --- a/include/betsy/Encoder.h +++ b/include/betsy/Encoder.h @@ -1,8 +1,10 @@ #pragma once -#include #include +#include + +#include namespace betsy { @@ -20,11 +22,11 @@ namespace betsy /// alignToNextMultiple( 1, 3 ) = 3; inline uint32_t alignToNextMultiple( uint32_t offset, uint32_t alignment ) { - return ( (offset + alignment - 1u) / alignment ) * alignment; + return ( ( offset + alignment - 1u ) / alignment ) * alignment; } inline size_t alignToNextMultiple( size_t offset, size_t alignment ) { - return ( (offset + alignment - 1u) / alignment ) * alignment; + return ( ( offset + alignment - 1u ) / alignment ) * alignment; } class Encoder diff --git a/include/betsy/File/FormatKTX.h b/include/betsy/File/FormatKTX.h index 0b7327f..12dbd0d 100644 --- a/include/betsy/File/FormatKTX.h +++ b/include/betsy/File/FormatKTX.h @@ -10,4 +10,4 @@ namespace betsy public: static void save( const char *fullpath, const CpuImage &cpuImage ); }; -} +} // namespace betsy diff --git a/include/betsy/EncoderBC1.h b/include/betsy/GL/EncoderBC1.h similarity index 83% rename from include/betsy/EncoderBC1.h rename to include/betsy/GL/EncoderBC1.h index f5ed9f3..df46021 100644 --- a/include/betsy/EncoderBC1.h +++ b/include/betsy/GL/EncoderBC1.h @@ -1,8 +1,7 @@ #pragma once -#include "betsy/EncoderGL.h" - +#include "EncoderGL.h" #include "GL/glcorearb.h" namespace betsy @@ -11,7 +10,7 @@ namespace betsy /** @brief The EncoderBC1 class - Supports BC1 (565) and BC3 (BC1 565 RGB + Alpha encoded using BC4) + Supports BC1 (565) and BC3 (BC1 565 RGB + Alpha encoded using BC4) */ class EncoderBC1 : public EncoderGL { @@ -43,11 +42,11 @@ namespace betsy /** Initialize resources. Must be called before execute*() @param srcImage - Source Image should be RGBA8888, and should NOT be sRGB + Source Image should be RGBA8888, and should NOT be sRGB @param bCompressAlpha - When true, compresses to BC3 + When true, compresses to BC3 @param bDither - Use Floyd-steinberg dithering. Anti-banding method. + Use Floyd-steinberg dithering. Anti-banding method. */ void initResources( const CpuImage &srcImage, const bool useBC3, const bool bDither ); void deinitResources(); diff --git a/include/betsy/EncoderBC4.h b/include/betsy/GL/EncoderBC4.h similarity index 73% rename from include/betsy/EncoderBC4.h rename to include/betsy/GL/EncoderBC4.h index 2b90818..c2f483a 100644 --- a/include/betsy/EncoderBC4.h +++ b/include/betsy/GL/EncoderBC4.h @@ -1,8 +1,7 @@ #pragma once -#include "betsy/EncoderGL.h" - +#include "EncoderGL.h" #include "GL/glcorearb.h" namespace betsy @@ -11,8 +10,8 @@ namespace betsy /** @brief The EncoderBC4 class - Handles BC4 and BC5 compression. - Note that BC5 is just two BC4 blocks together. + Handles BC4 and BC5 compression. + Note that BC5 is just two BC4 blocks together. */ class EncoderBC4 : public EncoderGL { @@ -42,12 +41,12 @@ namespace betsy /** Initialize resources. Must be called before execute*() @param srcImage @param redGreen - When false, compresses to one-channel BC4 - When true, compresses to two-channel BC5 + When false, compresses to one-channel BC4 + When true, compresses to two-channel BC5 @param encodeSNorm - When true, it encodes using BCn_SNORM variant instead of BCn_UNORM one. - Source is still assumed to be UNORM though i.e. in range [0; 1]. - The main use case is normal maps. + When true, it encodes using BCn_SNORM variant instead of BCn_UNORM one. + Source is still assumed to be UNORM though i.e. in range [0; 1]. + The main use case is normal maps. */ void initResources( const CpuImage &srcImage, const bool redGreen, const bool encodeSNorm ); void deinitResources(); diff --git a/include/betsy/EncoderBC6H.h b/include/betsy/GL/EncoderBC6H.h similarity index 95% rename from include/betsy/EncoderBC6H.h rename to include/betsy/GL/EncoderBC6H.h index 0e6beca..347a22a 100644 --- a/include/betsy/EncoderBC6H.h +++ b/include/betsy/GL/EncoderBC6H.h @@ -1,8 +1,7 @@ #pragma once -#include "betsy/EncoderGL.h" - +#include "EncoderGL.h" #include "GL/glcorearb.h" namespace betsy diff --git a/include/betsy/EncoderEAC.h b/include/betsy/GL/EncoderEAC.h similarity index 90% rename from include/betsy/EncoderEAC.h rename to include/betsy/GL/EncoderEAC.h index 64c8669..c593f2c 100644 --- a/include/betsy/EncoderEAC.h +++ b/include/betsy/GL/EncoderEAC.h @@ -1,8 +1,7 @@ #pragma once -#include "betsy/EncoderGL.h" - +#include "EncoderGL.h" #include "GL/glcorearb.h" namespace betsy @@ -34,7 +33,7 @@ namespace betsy /** Initialize resources. Must be called before execute*() @param srcImage @param rg11 - When true, compresses to two-channel RG11 instead of one-channel R11 + When true, compresses to two-channel RG11 instead of one-channel R11 */ void initResources( const CpuImage &srcImage, const bool rg11 ); void deinitResources(); diff --git a/include/betsy/EncoderETC1.h b/include/betsy/GL/EncoderETC1.h similarity index 89% rename from include/betsy/EncoderETC1.h rename to include/betsy/GL/EncoderETC1.h index a472930..db9083c 100644 --- a/include/betsy/EncoderETC1.h +++ b/include/betsy/GL/EncoderETC1.h @@ -1,8 +1,7 @@ #pragma once -#include "betsy/EncoderGL.h" - +#include "EncoderGL.h" #include "GL/glcorearb.h" namespace betsy @@ -49,7 +48,7 @@ namespace betsy bool hasAlpha() const; void initResources( const CpuImage &srcImage, const bool bCompressAlpha, const bool bDither, - const bool bForEtc2 ); + const bool bForEtc2 ); uint32_t getBlockWidth() const { return ( m_width + 3u ) >> 2u; } uint32_t getBlockHeight() const { return ( m_height + 3u ) >> 2u; } @@ -60,11 +59,11 @@ namespace betsy /** Initialize resources. Must be called before execute*() @param srcImage - Source Image should be RGBA8888, and should NOT be sRGB + Source Image should be RGBA8888, and should NOT be sRGB @param bCompressAlpha - When true, compresses to ETC2_RGBA + When true, compresses to ETC2_RGBA @param bDither - Use Floyd-steinberg dithering. Anti-banding method. + Use Floyd-steinberg dithering. Anti-banding method. */ void initResources( const CpuImage &srcImage, const bool bCompressAlpha, const bool bDither ); void deinitResources(); diff --git a/include/betsy/EncoderETC2.h b/include/betsy/GL/EncoderETC2.h similarity index 82% rename from include/betsy/EncoderETC2.h rename to include/betsy/GL/EncoderETC2.h index 85e4111..3e23d8e 100644 --- a/include/betsy/EncoderETC2.h +++ b/include/betsy/GL/EncoderETC2.h @@ -1,8 +1,7 @@ #pragma once -#include "betsy/EncoderETC1.h" - +#include "EncoderETC1.h" #include "GL/glcorearb.h" namespace betsy @@ -30,11 +29,11 @@ namespace betsy /** Initialize resources. Must be called before execute*() @param srcImage - Source Image should be RGBA8888, and should NOT be sRGB + Source Image should be RGBA8888, and should NOT be sRGB @param bCompressAlpha - When true, compresses to ETC2_RGBA + When true, compresses to ETC2_RGBA @param bDither - Use Floyd-steinberg dithering. Anti-banding method. + Use Floyd-steinberg dithering. Anti-banding method. */ void initResources( const CpuImage &srcImage, const bool bCompressAlpha, const bool bDither ); void deinitResources(); diff --git a/include/betsy/EncoderGL.h b/include/betsy/GL/EncoderGL.h similarity index 63% rename from include/betsy/EncoderGL.h rename to include/betsy/GL/EncoderGL.h index 3e8dbc2..b321a97 100644 --- a/include/betsy/EncoderGL.h +++ b/include/betsy/GL/EncoderGL.h @@ -1,37 +1,11 @@ #pragma once -#include "betsy/Encoder.h" - +#include "../Encoder.h" #include "GL/gl3w.h" namespace betsy { - enum PixelFormat - { - PFG_RGBA32_UINT, - PFG_RGBA32_FLOAT, - PFG_RGBA16_FLOAT, - PFG_R32_FLOAT, - PFG_RG32_UINT, - PFG_RGBA8_UNORM, - PFG_RGBA8_UNORM_SRGB, - PFG_RG8_UINT, - PFG_BC1_UNORM, - PFG_BC3_UNORM, - PFG_BC4_UNORM, - PFG_BC4_SNORM, - PFG_BC5_UNORM, - PFG_BC5_SNORM, - /// BC6H format (unsigned 16 bit float) - PFG_BC6H_UF16, - /// ETC1 (Ericsson Texture Compression) - PFG_ETC1_RGB8_UNORM, - PFG_ETC2_RGBA8_UNORM, - PFG_EAC_R11_UNORM, - PFG_EAC_RG11_UNORM - }; - namespace ResourceAccess { /// Enum identifying the texture access privilege @@ -63,13 +37,13 @@ namespace betsy uint8_t numMipmaps; /// numMipmaps = 0 is invalid uint32_t flags; /// See TextureFlags::TextureFlags - PixelFormat format; + gli::format format; const char *debugName; - TextureParams( uint32_t _width, uint32_t _height, PixelFormat _format, - const char *_debugName = 0, uint32_t _flags = 0u, uint32_t _depthOrSlices = 1u, - uint8_t _numMipmaps = 1u ); + TextureParams( uint32_t _width, uint32_t _height, gli::format _format, + const char *_debugName = 0, uint32_t _flags = 0u, uint32_t _depthOrSlices = 1u, + uint8_t _numMipmaps = 1u ); }; struct StagingTexture @@ -78,7 +52,7 @@ namespace betsy size_t bytesPerRow; uint32_t width; uint32_t height; - PixelFormat pixelFormat; + gli::format pixelFormat; void * data; size_t sizeBytes; StagingTexture(); @@ -101,16 +75,16 @@ namespace betsy class EncoderGL : public Encoder { public: - static GLenum get( PixelFormat format ); - static GLenum getBaseFormat( PixelFormat format ); - static void getFormatAndType( PixelFormat pixelFormat, GLenum &format, GLenum &type ); + static GLenum get( gli::format format ); + static GLenum getBaseFormat( gli::format format ); + static void getFormatAndType( gli::format pixelFormat, GLenum &format, GLenum &type ); protected: GLuint createTexture( const TextureParams ¶ms ); void destroyTexture( GLuint texName ); - StagingTexture createStagingTexture( uint32_t width, uint32_t height, PixelFormat format, - bool forUpload ); + StagingTexture createStagingTexture( uint32_t width, uint32_t height, gli::format format, + bool forUpload ); void uploadStagingTexture( const StagingTexture &stagingTex, GLuint dstTexture ); void downloadStagingTexture( GLuint srcTexture, const StagingTexture &stagingTex ); void destroyStagingTexture( const StagingTexture &stagingTex ); @@ -118,14 +92,13 @@ namespace betsy GLuint createUavBuffer( size_t sizeBytes, void *initialData ); void destroyUavBuffer( GLuint bufferName ); - ComputePso createComputePsoFromFile( const char *shaderFilename, const char *relativePath ); ComputePso createComputePso( const char *csShader ); void destroyPso( ComputePso &pso ); void bindComputePso( const ComputePso &pso ); void bindTexture( uint32_t slot, GLuint textureSrv ); - void bindUav( uint32_t slot, GLuint textureSrv, PixelFormat pixelFormat, - ResourceAccess::ResourceAccess access ); + void bindUav( uint32_t slot, GLuint textureSrv, gli::format pixelFormat, + ResourceAccess::ResourceAccess access ); void bindUavBuffer( uint32_t slot, GLuint buffer, size_t offset, size_t bufferSize ); }; } // namespace betsy diff --git a/include/PlatformGL.h b/include/betsy/GL/PlatformGL.h similarity index 100% rename from include/PlatformGL.h rename to include/betsy/GL/PlatformGL.h diff --git a/include/betsy/GL/Shaders.h b/include/betsy/GL/Shaders.h new file mode 100644 index 0000000..22d480b --- /dev/null +++ b/include/betsy/GL/Shaders.h @@ -0,0 +1,21 @@ +#pragma once + +extern const char *bc1_dither_glsl; +extern const char *bc1_glsl; +extern const char *bc4_glsl; +extern const char *bc6h_glsl; + +extern const char *eac_glsl; +extern const char *eac_r11_glsl; + +extern const char *etc1_glsl; +extern const char *etc1_with_error_glsl; + +extern const char *etc2_p_glsl; +extern const char *etc2_rgb_selector_glsl; +extern const char *etc2_rgba_selector_glsl; +extern const char *etc2_rgba_stitch_glsl; +extern const char *etc2_th_glsl; +extern const char *etc2_th_find_best_c0c1_k_means_glsl; + +extern const char *dither555_glsl; \ No newline at end of file diff --git a/include/betsy/IncludeParser.h b/include/betsy/IncludeParser.h deleted file mode 100644 index f539d98..0000000 --- a/include/betsy/IncludeParser.h +++ /dev/null @@ -1,21 +0,0 @@ - -#pragma once - -#include - -namespace betsy -{ - class IncludeParser - { - std::string m_source; - - static bool loadFromFileInto( const char *fullpath, std::string &outSource ); - - bool parseIncludeFiles( const char *relativePath ); - - public: - bool loadFromFile( const char *filename, const char *relativePath ); - - const char *getFinalSource() const; - }; -} // namespace betsy diff --git a/include/sds/sds_algorithm.h b/include/sds/sds_algorithm.h deleted file mode 100644 index 02adda0..0000000 --- a/include/sds/sds_algorithm.h +++ /dev/null @@ -1,23 +0,0 @@ - -#pragma once - -#include -#include - -namespace sds -{ - /// Returns true if s1 > s2, checks for wrap-around. - template - static bool isSequenceMoreRecent( T s1, T s2 ) - { - // clang-format off - const T max = std::numeric_limits::max(); - return - ( ( s1 > s2 ) && - ( s1 - s2 <= (max >> 1u) ) ) - || - ( ( s2 > s1 ) && - ( s2 - s1 > (max >> 1u) ) ); - // clang-format on - } -} // namespace sds diff --git a/include/sds/sds_fstream.h b/include/sds/sds_fstream.h deleted file mode 100644 index db1fff1..0000000 --- a/include/sds/sds_fstream.h +++ /dev/null @@ -1,128 +0,0 @@ - -#pragma once - -#include -#include -#include - -#ifdef _MSC_VER -# include -typedef SSIZE_T ssize_t; -#endif - -namespace sds -{ - /** @ingroup sds - @class fstream - SDS stands for "super duper standard library replacement". Yes, silly name. - - fstream is a near-drop-in replacement for std::ifstream & ofstream which - relies on C fstreams as a backend. - - The main reason for this development is to provide easier read() and write() functions - and to provide fsync which is an important missing function from the STL. - */ - class fstream - { - public: - enum FileOpenMode - { - Input, - /// Same as Input, but starts the cursor at the end of the file - InputEnd, - /// File is kept, must exist - OutputKeep, - /// Same as OutputKeep, but starts the cursor at the end of the file - OutputKeepEnd, - OutputDiscard, - /// Same as OutputKeep, but allows reading - InOutKeep, - /// Same as OutputEnd, but allows reading - InOutEnd, - }; - - enum StatusBits - { - eof = 1u << 0u, - badbit = 1u << 1u, - failbit = 1u << 2u, - }; - enum Whence - { - beg, - cur, - end, - }; - protected: - FILE *m_handle; - uint8_t m_statusBits; - bool m_canRead; - bool m_canWrite; - - public: - fstream(); - fstream( const std::string &fullpath, FileOpenMode mode ); - fstream( const char *fullpath, FileOpenMode mode ); - ~fstream(); - - void open( const std::string &fullpath, FileOpenMode mode ); - void open( const char *fullpath, FileOpenMode mode ); - void close(); - - bool is_open() const; - bool good(); - - size_t read( char *outData, size_t sizeBytes ); - size_t write( const char *inData, size_t sizeBytes ); - - void seek( ssize_t dir, Whence whence ); - size_t tell(); - - int flush(); - - /// Implies calling flush() - void fsync( bool preferDataSync ); - - template - size_t read( T &outValue ) - { - return read( reinterpret_cast( &outValue ), sizeof( T ) ); - } - template - T read() - { - T value = (T)0; - read( reinterpret_cast( &value ), sizeof( T ) ); - return value; - } - template - size_t write( T inValue ) - { - return write( reinterpret_cast( &inValue ), sizeof( T ) ); - } - - /// Same as readString, but assumes the length is an 8-bit value - std::string readString8() - { - const uint8_t strLength = read(); - std::string string; - string.resize( strLength ); - - if( strLength ) - read( reinterpret_cast( &string[0] ), strLength ); - - return string; - } - - /// Same as writeString, but assumes the length is an 8-bit value - void writeString8( const std::string &inValue ) - { - const uint8_t strSize = static_cast( std::min( inValue.size(), 255u ) ); - write( strSize ); - write( inValue.c_str(), strSize ); - } - }; - - template <> size_t fstream::read( bool &outValue ); - template <> size_t fstream::write( bool inValue ); -} diff --git a/include/sds/sds_fstreamNsud.h b/include/sds/sds_fstreamNsud.h deleted file mode 100644 index 1184e6a..0000000 --- a/include/sds/sds_fstreamNsud.h +++ /dev/null @@ -1,148 +0,0 @@ - -#pragma once - -#include -#include -#include - -namespace sds -{ - /** @ingroup sds - @class fstreamNsud - SDS stands for "super duper standard library replacement". Yes, silly name. - - fstreamNsud is an sds::fstream implementation using NSUserDefaults storage as a backend. - - This is required on AppleTV which doesn't offer other forms of persistent storage. - - Beware the storage capacity of NSUserDefaults is very limited (500kb). - This implementation keeps everything in memory, thus don't use it for large files. - */ - class fstreamNsud - { - public: - enum FileOpenMode - { - Input, - /// Same as Input, but starts the cursor at the end of the file - InputEnd, - /// File is kept, must exist - OutputKeep, - /// Same as OutputKeep, but starts the cursor at the end of the file - OutputKeepEnd, - OutputDiscard, - /// Same as OutputKeep, but allows reading - InOutKeep, - /// Same as OutputEnd, but allows reading - InOutEnd, - }; - - enum StatusBits - { - eof = 1u << 0u, - badbit = 1u << 1u, - failbit = 1u << 2u, - }; - enum Whence - { - beg, - cur, - end, - }; - - protected: - uint8_t *m_data; - size_t m_offset; - size_t m_fileSize; - size_t m_size; // It's really capacity - - std::string m_filename; - - uint8_t m_statusBits; - bool m_canRead; - bool m_canWrite; - - /** Checks if we have enough space to write the requested bytes. - If not, makes the memory grow by reallocating. - @remarks - Each time the container grows, it grows by 50% + requestedLength - */ - void growToFit( size_t requestedLength ); - - void readFromNSUserDefaults( bool seekEnd, bool createIfNotFound ); - void writeToNSUserDefaults(); - - public: - fstreamNsud(); - fstreamNsud( const std::string &fullpath, FileOpenMode mode ); - fstreamNsud( const char *fullpath, FileOpenMode mode ); - ~fstreamNsud(); - - void open( const std::string &fullpath, FileOpenMode mode ); - void open( const char *fullpath, FileOpenMode mode ); - void close(); - - bool is_open() const; - bool good(); - - size_t read( char *outData, size_t sizeBytes ); - size_t write( const char *inData, size_t sizeBytes ); - - void seek( ssize_t dir, Whence whence ); - size_t tell(); - - int flush(); - - /// Implies calling flush() - void fsync( bool preferDataSync ); - - /// Changes the name of the file (i.e. where we're saving to) - /// Caller is responsible for ensuring this happens before readFromNSUserDefaults / - /// writeToNSUserDefaults, or that the side effects are irrelant. - void _changeFilename( const std::string &newFilename ); - - template - size_t read( T &outValue ) - { - return read( reinterpret_cast( &outValue ), sizeof( T ) ); - } - template - T read() - { - T value = (T)0; - read( reinterpret_cast( &value ), sizeof( T ) ); - return value; - } - template - size_t write( T inValue ) - { - return write( reinterpret_cast( &inValue ), sizeof( T ) ); - } - - /// Same as readString, but assumes the length is an 8-bit value - std::string readString8() - { - const uint8_t strLength = read(); - std::string string; - string.resize( strLength ); - - if( strLength ) - read( reinterpret_cast( &string[0] ), strLength ); - - return string; - } - - /// Same as writeString, but assumes the length is an 8-bit value - void writeString8( const std::string &inValue ) - { - const uint8_t strSize = static_cast( std::min( inValue.size(), 255u ) ); - write( strSize ); - write( inValue.c_str(), strSize ); - } - }; - - template <> - size_t fstreamNsud::read( bool &outValue ); - template <> - size_t fstreamNsud::write( bool inValue ); -} // namespace sds diff --git a/scripts/EnumIterator/CppHeaderParser.py b/scripts/EnumIterator/CppHeaderParser.py deleted file mode 100644 index c9aacc5..0000000 --- a/scripts/EnumIterator/CppHeaderParser.py +++ /dev/null @@ -1,2347 +0,0 @@ -#!/usr/bin/python2 -# -# Author: Jashua R. Cloutier (contact via sourceforge username:senexcanis) -# -# Copyright (C) 2010, Jashua R. Cloutier -# 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 Jashua R. Cloutier nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -# -# The CppHeaderParser.py script is written in Python 2.4 and released to -# the open source community for continuous improvements under the BSD -# 2.0 new license, which can be found at: -# -# http://www.opensource.org/licenses/bsd-license.php -# -""" -CppHeaderParser2.0: April 2011 - August 2011 - by HartsAntler - http://pyppet.blogspot.com - - Quick Start - User API: - h = CppHeaderParser.CppHeader("someheader.h") - for name in h.classes: - c = h.classes[name] - for method in c['methods']['public']: - print method['name'] - print dir(method) # view the rest of the API here. - - ... TODO document more ... - - - - New Features by Hart: - should be able to parse all c++ files, not just headers - parsing global typedefs with resolution - parsing global structs - fixes nested struct in class changes accessor type - parsing if class is abstract - parsing more info about variables - save ordering of classes, structs, and typedefs - handle forward decl of class in a class - handle mutable, static, and other variable types - handle 1D arrays - handle throw keyword and function prefix __attribute__((__const__)) - handle nameless parameters "void method(void);" - handle simple templates, and global functions. - - Internal Developer Notes: - - 1. double name stacks: - . the main stack is self.nameStack, this stack is simpler and easy to get hints from - . the secondary stack is self.stack is the full name stack, required for parsing somethings - . each stack maybe cleared at different points, since they are used to detect different things - . it looks ugly but it works :) - - 2. Had to make the __repr__ methods simple because some of these dicts are interlinked. - For nice printing, call something.show() - -""" - -import ply.lex as lex -import os -import sys -import re - -import inspect - -def lineno(): - """Returns the current line number in our program.""" - return inspect.currentframe().f_back.f_lineno - -version = __version__ = "1.9.9o" - -tokens = [ - 'NUMBER', - 'NAME', - 'OPEN_PAREN', - 'CLOSE_PAREN', - 'OPEN_BRACE', - 'CLOSE_BRACE', - 'COLON', - 'SEMI_COLON', - 'COMMA', - 'COMMENT_SINGLELINE', - 'COMMENT_MULTILINE', - 'PRECOMP_MACRO', - 'PRECOMP_MACRO_CONT', - 'ASTERISK', - 'AMPERSTAND', - 'EQUALS', - 'MINUS', - 'PLUS', - 'DIVIDE', - 'CHAR_LITERAL', - 'STRING_LITERAL', - 'OPERATOR_DIVIDE_OVERLOAD', - 'NEW_LINE', - - 'OPEN_BRACKET', - 'CLOSE_BRACKET', - -] - -t_OPEN_BRACKET = r'\[' -t_CLOSE_BRACKET = r'\]' - - -#t_ignore = " \t\r[].|!?%@" # (cppheaderparser 1.9x) -#t_ignore = " \t\r[].|!?%@'^\\" -t_ignore = " \t\r.|!?%@'^\\" -t_NUMBER = r'[0-9][0-9XxA-Fa-f]*' -t_NAME = r'[<>A-Za-z_~][A-Za-z0-9_]*' -t_OPERATOR_DIVIDE_OVERLOAD = r'/=' -t_OPEN_PAREN = r'\(' -t_CLOSE_PAREN = r'\)' -t_OPEN_BRACE = r'{' -t_CLOSE_BRACE = r'}' -t_SEMI_COLON = r';' -t_COLON = r':' -t_COMMA = r',' -t_PRECOMP_MACRO = r'\#.*' -t_PRECOMP_MACRO_CONT = r'.*\\\n' -def t_COMMENT_SINGLELINE(t): - r'\/\/.*\n' - global doxygenCommentCache - if t.value.startswith("///") or t.value.startswith("//!"): - if doxygenCommentCache: - doxygenCommentCache += "\n" - if t.value.endswith("\n"): - doxygenCommentCache += t.value[:-1] - else: - doxygenCommentCache += t.value -t_ASTERISK = r'\*' -t_MINUS = r'\-' -t_PLUS = r'\+' -t_DIVIDE = r'/[^/]' # fails to catch "/(" - method operator that overloads divide -t_AMPERSTAND = r'&' -t_EQUALS = r'=' -t_CHAR_LITERAL = "'.'" -#found at http://wordaligned.org/articles/string-literals-and-regular-expressions -#TODO: This does not work with the string "bla \" bla" -t_STRING_LITERAL = r'"([^"\\]|\\.)*"' -#Found at http://ostermiller.org/findcomment.html -def t_COMMENT_MULTILINE(t): - r'/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/' - global doxygenCommentCache - if t.value.startswith("/**") or t.value.startswith("/*!"): - #not sure why, but get double new lines - v = t.value.replace("\n\n", "\n") - #strip prefixing whitespace - v = re.sub("\n[\s]+\*", "\n*", v) - doxygenCommentCache += v -def t_NEWLINE(t): - r'\n+' - t.lexer.lineno += len(t.value) - -def t_error(v): - print( "Lex error: ", v ) - -lex.lex() -debug = 0 -debug_trace = 0 -def trace_print(*arg): - global debug_trace - if debug_trace: print(arg) - -supportedAccessSpecifier = [ - 'public', - 'protected', - 'private' -] - -enumMaintianValueFormat = False -doxygenCommentCache = "" - -def is_namespace(nameStack): - """Determines if a namespace is being specified""" - if len(nameStack) == 0: - return False - if nameStack[0] == "namespace": - return True - return False - -def is_enum_namestack(nameStack): - """Determines if a namestack is an enum namestack""" - if len(nameStack) == 0: - return False - if nameStack[0] == "enum": - return True - if len(nameStack) > 1 and nameStack[0] == "typedef" and nameStack[1] == "enum": - return True - return False - -class CppParseError(Exception): pass - - -class _CppClass(dict): - def _parser_helper( self, stack ): - prev = None - prev2 = None - print('stack IN', ' '.join(stack)) - for i, tok in enumerate(stack): # can not trust the first single ":" or last - if prev and prev2 and tok == ':' and prev != ':' and prev2 != ':': - break - prev = tok - prev2 = prev - - - a = stack[ : i+1 ] - b = stack[ i+1 : ] - while a[-1] == ':': a.pop() - - print( 'HEAD', a ) - print('______________') - print( 'TAIL', b ) - - if ''.join(stack).replace('::','_').count(':') >= 2: - if stack.count('class') == 1: - self['name'] = stack[ stack.index('class') + 1 ] - elif stack.count('struct') == 1: - self['name'] = stack[ stack.index('struct') + 1 ] - else: - self['unsafe_template'] = True - b = [] - - elif a[0] == 'template' and ('class' in a or 'struct' in a): - if '>' not in a: - self['name'] = a[ a.index('class') + 1 ] - self['unsafe_template'] = True - - else: - copy = list( a ) - last = len(a) - 1 - a[::-1].index('>') - self['template_typename'] = a[ a.index('>')-1 ] - a = a[ last+1 : ] - if not a: - a = copy[ copy.index('class')+1 : ] - x = ''.join( a ) - assert '<' in x and '>' in x - self['name'] = x - self['special_template'] = True - - elif 'class' in a: - self['name'] = ''.join( a[1:] ) - - elif 'struct' in a: - self['name'] = ''.join( a[1:] ) - self['struct'] = True - self['struct_template'] = self['template_typename'] - elif 'class' in b: - self['name'] = b[ b.index('class') + 1 ] - b = [] - elif 'struct' in b: - self['name'] = b[ b.index('struct') + 1 ] - b = [] - else: - self['unsafe_template'] = True - assert 0 - - elif a[0] == 'template' and b[-2] in ('class','struct'): - self['name'] = b[-1] - b = [] # b is invalid - elif a[0] == 'class': - self['name'] = ''.join( a[1:] ) - elif 'class' in b: - self['name'] = b[ b.index('class') + 1 ] - b = [] - elif 'struct' in b: - self['name'] = b[ b.index('struct') + 1 ] - self['struct'] = True - b = [] - else: - assert 0 - - - if b: - p = [ {'access':'public', 'class':''} ] - for x in b: - if x in 'public protected private'.split(): - p[-1]['access'] = x - elif x == 'virtual': - p[-1]['virtual'] = True - elif x == ',': - p.append( {'access':'public', 'class':''} ) - else: - p[-1]['class'] += x - self['inherits'] = p - else: - self['inherits'] = [] - - return True - - -class CppClass( _CppClass ): - """Takes a name stack and turns it into a class - - Contains the following Keys: - self['name'] - Name of the class - self['doxygen'] - Doxygen comments associated with the class if they exist - self['inherits'] - List of Classes that this one inherits where the values - are of the form {"access": Anything in supportedAccessSpecifier - "class": Name of the class - self['methods'] - Dictionary where keys are from supportedAccessSpecifier - and values are a lists of CppMethod's - self['properties'] - Dictionary where keys are from supportedAccessSpecifier - and values are lists of CppVariable's - self['enums'] - Dictionary where keys are from supportedAccessSpecifier and - values are lists of CppEnum's - self['structs'] - Dictionary where keys are from supportedAccessSpecifier and - values are lists of nested Struct's - - An example of how this could look is as follows: - #self = - { - 'name': "" - 'inherits':[] - 'methods': - { - 'public':[], - 'protected':[], - 'private':[] - }, - 'properties': - { - 'public':[], - 'protected':[], - 'private':[] - }, - 'enums': - { - 'public':[], - 'protected':[], - 'private':[] - } - } - """ - def __repr__( self ): return self['name'] - - def get_all_methods(self): - r = [] - for typ in 'public protected private'.split(): r += self['methods'][typ] - return r - - def get_all_method_names( self ): - r = [] - for typ in 'public protected private'.split(): r += self.get_method_names(typ) # returns list - return r - - def get_all_pure_virtual_methods( self ): - r = {} - for typ in 'public protected private'.split(): r.update(self.get_pure_virtual_methods(typ)) # returns dict - return r - - - def get_method_names( self, type='public' ): return [ meth['name'] for meth in self['methods'][ type ] ] - - def get_pure_virtual_methods( self, type='public' ): - r = {} - for meth in self['methods'][ type ]: - if meth['pure_virtual']: r[ meth['name'] ] = meth - return r - - def __init__(self, nameStack): - self['nested_classes'] = [] - self['parent'] = None - self['abstract'] = False - self['namespace'] = "" - self._public_enums = {} - self._public_structs = {} - self._public_typedefs = {} - self._public_forward_declares = [] - - if (debug): print( "Class: ", nameStack ) - if (len(nameStack) < 2): - print( "Error detecting class" ) - return - global doxygenCommentCache - if len(doxygenCommentCache): - self["doxygen"] = doxygenCommentCache - doxygenCommentCache = "" - - methodAccessSpecificList = {} - propertyAccessSpecificList = {} - enumAccessSpecificList = {} - structAccessSpecificList = {} - typedefAccessSpecificList = {} - forwardAccessSpecificList = {} - - for accessSpecifier in supportedAccessSpecifier: - methodAccessSpecificList[accessSpecifier] = [] - propertyAccessSpecificList[accessSpecifier] = [] - enumAccessSpecificList[accessSpecifier] = [] - structAccessSpecificList[accessSpecifier] = [] - typedefAccessSpecificList[accessSpecifier] = [] - forwardAccessSpecificList[accessSpecifier] = [] - - self['methods'] = methodAccessSpecificList - self['properties'] = propertyAccessSpecificList - self['enums'] = enumAccessSpecificList - self['structs'] = structAccessSpecificList - self['typedefs'] = typedefAccessSpecificList - self['forward_declares'] = forwardAccessSpecificList - - ok = self._parser_helper( nameStack ) - if not ok: self['invalid'] = True - - def show_all(self): - self.show() - for key in self.keys(): print( ' %s : %s' %(key,self[key]) ) - - def show(self): - """Convert class to a string""" - namespace_prefix = "" - if self["namespace"]: namespace_prefix = self["namespace"] + "::" - rtn = "class %s"%(namespace_prefix + self["name"]) - if self['abstract']: rtn += ' (abstract)\n' - else: rtn += '\n' - - if 'doxygen' in self.keys(): rtn += self["doxygen"] + '\n' - if 'parent' in self.keys() and self['parent']: rtn += 'parent class:' + self['parent'] + '\n' - - if "inherits" in self.keys(): - rtn += " Inherits: " - for inheritClass in self["inherits"]: - rtn += "%s %s, "%(inheritClass["access"], inheritClass["class"]) - rtn += "\n" - rtn += " {\n" - for accessSpecifier in supportedAccessSpecifier: - rtn += " %s\n"%(accessSpecifier) - #Enums - if (len(self["enums"][accessSpecifier])): - rtn += " \n" - for enum in self["enums"][accessSpecifier]: - rtn += " %s\n"%(repr(enum)) - #Properties - if (len(self["properties"][accessSpecifier])): - rtn += " \n" - for property in self["properties"][accessSpecifier]: - rtn += " %s\n"%(repr(property)) - #Methods - if (len(self["methods"][accessSpecifier])): - rtn += " \n" - for method in self["methods"][accessSpecifier]: - rtn += "\t\t" + method.show() + '\n' - rtn += " }\n" - print( rtn ) - -class _CppMethod( dict ): - def _params_helper1( self, stack ): - # new July 7th, deal with defaults that init: vec3(0,0,0) - # so that comma split still works later on parsing the parameters. - - # also deal with "throw" keyword - if 'throw' in stack: stack = stack[ : stack.index('throw') ] - - ## remove GCC keyword __attribute__(...) and preserve returns ## - cleaned = [] - hit = False; hitOpen = 0; hitClose = 0 - for a in stack: - if a == '__attribute__': hit = True - if hit: - if a == '(': hitOpen += 1 - elif a == ')': hitClose += 1 - if a==')' and hitOpen == hitClose: - hit = False - else: - cleaned.append( a ) - stack = cleaned - - # also deal with attribute((const)) function prefix # - # TODO this needs to be better # - if len(stack) > 5: - a = ''.join(stack) - if a.startswith('((__const__))'): stack = stack[ 5 : ] - elif a.startswith('__attribute__((__const__))'): stack = stack[ 6 : ] - - stack = stack[stack.index('(') + 1: ] - if not stack: return [] - if len(stack)>=3 and stack[0]==')' and stack[1]==':': # is this always a constructor? - self['constructor'] = True - return [] - - stack.reverse(); _end_ = stack.index(')'); stack.reverse() - stack = stack[ : len(stack)-(_end_+1) ] - - if '(' not in stack: return stack # safe to return, no defaults that init a class - elif stack.index('(') > stack.index(')'): # deals with: "constructor(int x) : func(x) {}" - return stack[ : stack.index(')') ] # fixed july20 - - # transforms ['someclass', '(', '0', '0', '0', ')'] into "someclass(0,0,0)'" - r = []; hit=False - for a in stack: - if a == '(': hit=True - elif a == ')': hit=False - if hit or a == ')': r[-1] = r[-1] + a - else: r.append( a ) - return r - - def _params_helper2( self, params ): - for p in params: - # if param becomes unresolved - function/parent is marked with 'unresolved_parameters' - if 'function' in self: p['function'] = self - else: p['method'] = self - # force full namespace for nested items, or take method name space as our own (bad idea?) - if '::' in p['type']: - ns = p['type'].split('::')[0] - if ns not in Resolver.NAMESPACES and ns in Resolver.CLASSES: - p['type'] = self['namespace'] + p['type'] - else: p['namespace'] = self[ 'namespace' ] - -class CppMethod( _CppMethod ): - """Takes a name stack and turns it into a method - - Contains the following Keys: - self['returns'] - Return type of the method (ex. "int") - self['name'] - Name of the method (ex. "getSize") - self['doxygen'] - Doxygen comments associated with the method if they exist - self['parameters'] - List of CppVariables - """ - def show(self): - r = ['method name: %s (%s)' %(self['name'],self['debug']) ] - if self['returns']: r.append( 'returns: %s'%self['returns'] ) - if self['parameters']: r.append( 'number arguments: %s' %len(self['parameters'])) - if self['pure_virtual']: r.append( 'pure virtual: %s'%self['pure_virtual'] ) - if self['constructor']: r.append( 'constructor' ) - if self['destructor']: r.append( 'destructor' ) - return '\n\t\t '.join( r ) - - def __init__(self, nameStack, curClass=None, methinfo={} ): - if (debug): print( "Method: ", nameStack ) - global doxygenCommentCache - - if not curClass: self['function'] = True - - if len(doxygenCommentCache): - self["doxygen"] = doxygenCommentCache - doxygenCommentCache = "" - if "operator" in nameStack: - self["name"] = "".join(nameStack[nameStack.index('operator'):nameStack.index('(')]) - else: - self["name"] = " ".join(nameStack[nameStack.index('(') - 1:nameStack.index('(')]) - - self.update( methinfo ) # harts hack - paramsStack = self._params_helper1( nameStack ) - params = [] - #See if there is a doxygen comment for the variable - doxyVarDesc = {} - #TODO: Put this into a class - if self.has_key("doxygen"): - doxyLines = self["doxygen"].split("\n") - lastParamDesc = "" - for doxyLine in doxyLines: - if " @param " in doxyLine or " \param " in doxyLine: - try: - #Strip out the param - doxyLine = doxyLine[doxyLine.find("param ") + 6:] - (var, desc) = doxyLine.split(" ", 1) - doxyVarDesc[var] = desc.strip() - lastParamDesc = var - except: pass - elif " @return " in doxyLine or " \return " in doxyLine: - lastParamDesc = "" - # not handled for now - elif lastParamDesc: - try: - doxyLine = doxyLine.strip() - if " " not in doxyLine: - lastParamDesc = "" - continue - doxyLine = doxyLine[doxyLine.find(" ") + 1:] - doxyVarDesc[lastParamDesc] += " " + doxyLine - except: pass - - #Create the variable now - while (len(paramsStack)): - if (',' in paramsStack): - param = CppVariable(paramsStack[0:paramsStack.index(',')], doxyVarDesc=doxyVarDesc) - if len(param.keys()): params.append(param) - paramsStack = paramsStack[paramsStack.index(',') + 1:] - else: - param = CppVariable(paramsStack, doxyVarDesc=doxyVarDesc) - if len(param.keys()): params.append(param) - break - - self["parameters"] = params - self._params_helper2( params ) # mods params inplace - - -class _CppVariable(dict): - def _name_stack_helper( self, stack, fullStack ): - print('V'*80); print( stack ); print(fullStack); print('_'*80) - stack = list(stack) - if stack[-1].isdigit() and '=' not in stack: # TODO refactor me - was: '=' not in stack or - # check for array[n] and deal with funny array syntax: "int myvar:99" - bits = [] - while stack and stack[-1].isdigit(): bits.append( stack.pop() ) - if bits: - bits.reverse() - self['bitfield'] = int(''.join(bits)) - assert stack[-1] == ':' - stack.pop() - - ## find and strip array def ## - if '[' in stack: - assert stack.count('[') == stack.count(']') - a = ['']; hit = 0; _stack = [] - for s in stack: - if s == '[': hit += 1 - elif s == ']': hit -= 1; a.append( '' ) - elif hit: a[-1] += s - elif not hit: _stack.append( s ) - stack = _stack - - b = [] - for s in a: - if s.isdigit(): b.append( int( s ) ) - elif s != '': self['invalid'] = True - if not b: self['pointer'] += 1 - else: - self['array'] = b[0] - self['array_dimensions'] = b - if len(b)>1: self['multidimensional'] = True - - while stack and not stack[-1]: stack.pop() # can be empty? - return stack - - - -class CppVariable( _CppVariable ): - """Takes a name stack and turns it into a method - - Contains the following Keys: - self['type'] - Type for the variable (ex. "const string &") - self['raw_type'] - Type of variable without pointers or other markup (ex. "string") - self['name'] - Name of the variable (ex. "numItems") - self['namespace'] - Namespace containing the enum - self['desc'] - Description of the variable if part of a method (optional) - self['doxygen'] - Doxygen comments associated with the method if they exist - self['defalt'] - Default value of the variable, this key will only exist if there is a default value - """ - Vars = [] - - def __init__(self, nameStack, fullStack=None, doxyVarDesc=None): # CppMethod will not pass fullStack for params - self['aliases'] = []; self['parent'] = None; self['typedef'] = None - for key in 'constant reference pointer static typedefs class fundamental unresolved mutable'.split(): - self[ key ] = 0 - - - _stack_ = nameStack - nameStack = self._name_stack_helper( nameStack, fullStack ) - global doxygenCommentCache - if len(doxygenCommentCache): - self["doxygen"] = doxygenCommentCache - doxygenCommentCache = "" - - if (debug): print( "Variable: ", nameStack ) - - if (len(nameStack) < 2): - if len(nameStack) == 1: self['type'] = nameStack[0]; self['name'] = '' - else: print(_stack_); assert 0 - - elif ("=" in nameStack): - self["type"] = " ".join(nameStack[:nameStack.index("=") - 1]) - self["name"] = nameStack[nameStack.index("=") - 1] - self['default'] = " ".join(nameStack[nameStack.index("=") + 1:]) - self['default'] = self['default'].replace(' <', '<' ) - self['default'] = self['default'].replace(' >', '>' ) - - elif nameStack[-1] in '*&': # rare cases - function param is an unnamed pointer: "void somemethod( SomeObject* )" - self['type'] = ' '.join(nameStack) - self['name'] = '' - - else: # common case - self["type"] = " ".join(nameStack[:-1]) - self["name"] = nameStack[-1] - - self["type"] = self["type"].replace(" :",":") - self["type"] = self["type"].replace(": ",":") - self["type"] = self["type"].replace(" <","<") - self["type"] = self["type"].replace(" >",">") - #Optional doxygen description - if doxyVarDesc and self['name'] in doxyVarDesc: - self['description'] = doxyVarDesc[ self['name'] ] - - self['type'] = self['type'].strip() - a = [] - for b in self['type'].split(): - if b == '__const__': b = 'const' - a.append( b ) - - if not a: - self['invalid'] = True # void someinvalidfunction( int x, y=INVALID ); - print('WARN - bad variable', self ) - - else: - if a[0] == 'class': - self['explicit_class'] = a[1] - a = a[1:] - elif a[0] == 'struct': - self['explicit_struct'] = a[1] - a = a[1:] - self['type'] = ' '.join( a ) - - if self['name'].count('<') != self['name'].count('>'): self['invalid'] = True - - CppVariable.Vars.append( self ) # save and resolve later - -class _CppEnum(dict): - def resolve_enum_values( self, values ): - """Evaluates the values list of dictionaries passed in and figures out what the enum value - for each enum is editing in place: - - Example: - From: [{'name': 'ORANGE'}, - {'name': 'RED'}, - {'name': 'GREEN', 'value': '8'}] - To: [{'name': 'ORANGE', 'value': 0}, - {'name': 'RED', 'value': 1}, - {'name': 'GREEN', 'value': 8}] - """ - t = 'int'; i = 0 - names = [ v['name'] for v in values ] - for v in values: - if 'value' in v: - a = v['value'].strip() - if a.lower().startswith("0x"): - try: - i = a = int(a , 16) - except:pass - elif a.isdigit(): - i = a = int( a ) - elif a in names: - for other in values: - if other['name'] == a: - v['value'] = other['value'] - break - - elif '"' in a or "'" in a: t = 'char*' # only if there are quotes it this a string enum - else: - try: - a = i = ord(a) - except: pass - if not enumMaintianValueFormat: v['value'] = a - else: v['value'] = i - i += 1 - return t - -class CppEnum(_CppEnum): - """Takes a name stack and turns it into an Enum - - Contains the following Keys: - self['name'] - Name of the enum (ex. "ItemState") - self['namespace'] - Namespace containing the enum - self['values'] - List of values where the values are a dictionary of the - form {"name": name of the key (ex. "PARSING_HEADER"), - "value": Specified value of the enum, this key will only exist - if a value for a given enum value was defined - } - """ - def __init__(self, nameStack): - if len(nameStack) < 4 or "{" not in nameStack or "}" not in nameStack: - #Not enough stuff for an enum - return - global doxygenCommentCache - if len(doxygenCommentCache): - self["doxygen"] = doxygenCommentCache - doxygenCommentCache = "" - valueList = [] - #Figure out what values it has - valueStack = nameStack[nameStack.index('{') + 1: nameStack.index('}')] - while len(valueStack): - tmpStack = [] - if "," in valueStack: - tmpStack = valueStack[:valueStack.index(",")] - valueStack = valueStack[valueStack.index(",") + 1:] - else: - tmpStack = valueStack - valueStack = [] - d = {} - if len(tmpStack) == 1: d["name"] = tmpStack[0] - elif len(tmpStack) >= 3 and tmpStack[1] == "=": - d["name"] = tmpStack[0]; d["value"] = " ".join(tmpStack[2:]) - elif len(tmpStack) == 2 and tmpStack[1] == "=": - if (debug): print( "WARN-enum: parser missed value for %s"%tmpStack[0] ) - d["name"] = tmpStack[0] - - if d: valueList.append( d ) - - if len(valueList): - self['type'] = self.resolve_enum_values( valueList ) # returns int for standard enum - self["values"] = valueList - else: - print( 'WARN-enum: empty enum', nameStack ) - return - #Figure out if it has a name - preBraceStack = nameStack[:nameStack.index("{")] - postBraceStack = nameStack[nameStack.index("}") + 1:] - if (len(preBraceStack) == 2 and "typedef" not in nameStack): - self["name"] = preBraceStack[1] - elif len(postBraceStack) and "typedef" in nameStack: - self["name"] = " ".join(postBraceStack) - else: print( 'WARN-enum: nameless enum', nameStack ) - #See if there are instances of this - if "typedef" not in nameStack and len(postBraceStack): - self["instances"] = [] - for var in postBraceStack: - if "," in var: - continue - self["instances"].append(var) - self["namespace"] = "" - -def is_fundamental(s): - for a in s.split(): - if a not in 'size_t wchar_t struct union unsigned signed bool char short int float double long void *': return False - return True - -def prune_templates( stack ): - x = []; hit = 0 - for a in stack: - if a == '<' or a.startswith('<'): hit += 1 - elif a == '>' or a.endswith('>'): hit -= 1 - elif not hit and a != 'template': x.append( a ) - return x - -def prune_arrays( stack ): - x = []; hit = 0 - for a in stack: - if a == '[' or a.startswith('['): hit += 1 - elif a == ']' or a.endswith(']'): hit -= 1 - elif not hit: x.append( a ) - return x - - -def is_method_namestack(stack): - clean = prune_templates( stack ); print('CLEAN TEMPLATES',clean) - clean = prune_arrays( clean ); print('CLEAN ARRAYS',clean) - - r = False - if 'operator' in stack: r = True # allow all operators - elif not ('(' in stack or '/(' in stack): r = False - elif stack[0]=='mutable': r = False - elif clean and clean[0] in ('class', 'struct'): r = False - elif not ('(' in clean or '/(' in clean): r = False - #elif '__attribute__' in stack: r = False - #elif stack[0] == '__attribute': r = False - elif stack[0] == 'typedef': r = False # TODO deal with typedef function prototypes - elif stack[0] in 'return if else case switch throw +'.split(): print( stack ); assert 0; r = False - elif stack[0] == '}' and stack[1] in 'return if else case switch'.split(): print( stack ); assert 0; r = False - elif '=' in stack:# and stack.index('=') < stack.index('('): - #if 'template' not in stack: r = False - if '=' in clean and clean.index('=') < clean.index('('): r = False - else: r = True - - elif '{' in stack and stack.index('{') < stack.index('('): r = False # struct that looks like a method/class - elif '(' in stack and ')' in stack: - if '{' in stack and '}' in stack: r = True - #elif '/' in stack: r = False - #elif '/ ' in stack: r = False - elif stack[-1] == ';': r = True - elif '{' in stack: r = True - x = ''.join(stack) - if x.endswith('(0,0,0);'): r = False - elif x.endswith('(0);'): r = False - elif x.endswith(',0);'): r = False - elif x.endswith(',1);'): r = False - elif x.endswith(',true);'): r = False - elif x.endswith(',false);'): r = False - elif x.endswith(',0xFF);'): r = False - else: r = False - print( 'is method namestack', r, stack ); print('_'*80) - return r - - -class CppStruct(dict): - Structs = [] - def __init__(self, nameStack): - if nameStack[0] == 'template': self['template'] = True - if nameStack.index('struct')+1 < len(nameStack): - self['type'] = nameStack[ nameStack.index('struct') + 1 ] - else: self['type'] = None - self['fields'] = [] - self['methods'] = [] - self['parent'] = None - self.Structs.append( self ) - -C99_NONSTANDARD = { - 'int8' : 'signed char', - 'int16' : 'short int', - 'int32' : 'int', - 'int64' : 'int64_t', # this can be: long int (64bit), or long long int (32bit) - 'uint' : 'unsigned int', - 'uint8' : 'unsigned char', - 'uint16' : 'unsigned short int', - 'uint32' : 'unsigned int', - 'uint64' : 'uint64_t', # depends on host bits -} - - -def standardize_fundamental( s ): - if s in C99_NONSTANDARD: return C99_NONSTANDARD[ s ] - else: return s - - -class Resolver(object): - C_FUNDAMENTAL = 'size_t unsigned signed bool char wchar short int float double long void'.split() - C_FUNDAMENTAL += 'struct union enum'.split() - - - SubTypedefs = {} # TODO deprecate? - NAMESPACES = [] - CLASSES = {} - STRUCTS = {} - - def initextra(self): - self.typedefs = {} - self.typedefs_info = {} - self.typedefs_order = [] - self.classes_order = [] - self.template_classes = {} - self.template_typedefs = {} - self.structs = Resolver.STRUCTS - self.structs_order = [] - self.namespaces = Resolver.NAMESPACES # save all namespaces - self.curStruct = None - self.stack = [] # full name stack, good idea to keep both stacks? (simple stack and full stack) - self._classes_brace_level = {} # class name : level - self._structs_brace_level = {} # struct type : level - self._method_body = None - self._forward_decls = [] - self._template_typenames = [] # template - self.functions = [] # free functions - - def current_namespace(self): return self.cur_namespace(True) - - def cur_namespace(self, add_double_colon=False): - rtn = "" - i = 0 - while i < len(self.nameSpaces): - rtn += self.nameSpaces[i] - if add_double_colon or i < len(self.nameSpaces) - 1: rtn += "::" - i+=1 - return rtn - - - def guess_ctypes_type( self, string ): - pointers = string.count('*') - string = string.replace('*','') - - a = string.split() - if 'unsigned' in a: u = 'u' - else: u = '' - if 'long' in a and 'double' in a: b = 'longdouble' # there is no ctypes.c_ulongdouble (this is a 64bit float?) - elif a.count('long') == 2 and 'int' in a: b = '%sint64' %u - elif a.count('long') == 2: b = '%slonglong' %u - elif 'long' in a: b = '%slong' %u - elif 'double' in a: b = 'double' # no udouble in ctypes - elif 'short' in a: b = '%sshort' %u - elif 'char' in a: - if u: b = 'ubyte' # no ctypes.c_uchar - else: b = 'char' - elif 'wchar' in a: b = 'wchar' - elif 'bool' in a: b = 'bool' - elif 'float' in a: b = 'float' - - elif 'int' in a: b = '%sint' %u - elif 'int8' in a: b = 'int8' - elif 'int16' in a: b = 'int16' - elif 'int32' in a: b = 'int32' - elif 'int64' in a: b = 'int64' - - elif 'uint' in a: b = 'uint' - elif 'uint8' in a: b = 'uint8' - elif 'uint16' in a: b = 'uint16' - elif 'uint32' in a: b = 'uint32' - elif 'uint64' in a: b = 'uint64' - - elif 'size_t' in a: b = 'size_t' - elif 'void' in a: b = 'void_p' - - elif string in 'struct union'.split(): b = 'void_p' # what should be done here? don't trust struct, it could be a class, no need to expose via ctypes - else: b = 'void_p' - - if not pointers: return 'ctypes.c_%s' %b - else: - x = '' - for i in range(pointers): x += 'ctypes.POINTER(' - x += 'ctypes.c_%s' %b - x += ')' * pointers - return x - - def resolve_type( self, string, result ): # recursive - ''' - keeps track of useful things like: how many pointers, number of typedefs, is fundamental or a class, etc... - ''' - ## be careful with templates, what is inside can be a pointer but the overall type is not a pointer - ## these come before a template - s = string.split('<')[0] - if not result['constant']: result[ 'constant' ] = 'const' in s.split() - if not result['static']: result[ 'static' ] = 'static' in s.split() - if not result['mutable']: result[ 'mutable' ] = 'mutable' in s.split() - - ## these come after a template - s = string.split('>')[-1] - result[ 'pointer' ] += s.count('*') - result[ 'reference' ] += s.count('&') - - - x = string; alias = False - for a in '* & const static mutable'.split(): x = x.replace(a,'') - for y in x.split(): - if y not in self.C_FUNDAMENTAL: alias = y; break - - #if alias == 'class': - # result['class'] = result['name'] # forward decl of class - # result['forward_decl'] = True - if alias == '__extension__': result['fundamental_extension'] = True - elif alias:# and alias not in result['aliases']: - if alias in result['aliases']: return #print( result ); assert 0 # G3D::SkyParameters - result['aliases'].append( alias ) - if alias in C99_NONSTANDARD: - result['type'] = C99_NONSTANDARD[ alias ] - result['typedef'] = alias - result['typedefs'] += 1 - elif alias in self.typedefs: - result['typedefs'] += 1 - result['typedef'] = alias - self.resolve_type( self.typedefs[alias], result ) - - elif 'namespace' in result and result['namespace']+alias in self.typedefs and '::' not in alias: # is this always safe? - alias = result['namespace']+alias - result['typedefs'] += 1 - result['typedef'] = alias - self.resolve_type( self.typedefs[alias], result ) - - elif alias in self.classes: - klass = self.classes[alias]; result['fundamental'] = False - result['class'] = klass - result['unresolved'] = False - #else: result['unresolved'] = True - else: - result['fundamental'] = True - #result['unresolved'] = False - - - def finalize_vars(self): - for s in CppStruct.Structs: # vars within structs can be ignored if they do not resolve - for var in s['fields']: var['parent'] = s['type'] - #for c in self.classes.values(): - # for var in c.get_all_properties(): var['parent'] = c['name'] - - ## RESOLVE ## - for var in CppVariable.Vars: - if 'invalid' in var and var['invalid']: # rare cases where parser fails - if 'method' in var: var['method']['unresolved_parameters'] = True - if 'function' in var: var['function']['unresolved_parameters'] = True - - var['unresolved'] = False # force False - self.resolve_type( var['type'], var ) - - # then find concrete type and best guess ctypes type # - for var in CppVariable.Vars: - if not var['aliases']: #var['fundamental']: - var['ctypes_type'] = self.guess_ctypes_type( var['type'] ) - - else: - - var['unresolved'] = False # below may set to True - if var['class']: - var['ctypes_type'] = 'ctypes.c_void_p' - else: - assert var['aliases'] - tag = var['aliases'][-1] # get the last alias to resolve - - klass = None - nestedEnum = None - nestedStruct = None - nestedTypedef = None - template = None - if 'method' in var and 'parent' in var['method']: # if no 'parent' method of struct - klass = var['method']['parent'] - if tag in klass._public_enums: - nestedEnum = klass._public_enums[ tag ] - elif tag in klass._public_structs: - nestedStruct = klass._public_structs[ tag ] - elif tag in klass._public_typedefs: - nestedTypedef = klass._public_typedefs[ tag ] - elif 'template_typename' in klass and klass['template_typename'] == tag: - template = tag - - ############################ - if template: - var['raw_type'] = '(template)' - var['template'] = template - - elif tag in ('std::string', 'std::basic_string', 'std::basic_string'): - var['std'] = 'string' - var['constant'] = True - var['raw_type'] = 'char' - var['pointer'] = 1 - var['type'] = 'const char*' - var['ctypes_type'] = 'ctypes.c_char_p' - var['reference'] = False # force False - var['fundamental'] = True - - elif '<' in tag: # should also contain '>' - #print(var) - T = tag.split('<')[0]#; print( self.typedefs_info.keys() ) - typename = tag.split('<')[-1].split('>')[0] - Tclass = self.find_template_class( T ) - if not Tclass: - var['unresolved'] = True; var['unresolved_template_class']=True; continue - - var['raw_type'] = Tclass['namespace'] + '::' + tag.split('::')[-1] - var['template'] = Tclass['template_typename']; var['template_class'] = T - var['ctypes_type'] = 'ctypes.c_void_p' - - Tdef = None - h = Tclass['namespace'] + '::' + Tclass['name'] - if h in self.template_typedefs: Tdef = self.template_typedefs[ h ] - - if Tclass['template_typename'] != typename: - if Tdef and typename in Tdef: - var['raw_type'] = Tdef[ typename ]['name'] # the typedef'ed name - else: var['unresolved'] = True - else: - var['template_requires_typename'] = True - - var['typename_fundamental'] = is_fundamental( typename ) - if not var['typename_fundamental']: - con = self.concrete_typedef( typename ) - if con: var['template'] = con - else: var['template_nonfundamental'] = True - - - elif nestedEnum: - enum = nestedEnum - if enum['type'] == 'int': - var['ctypes_type'] = 'ctypes.c_int' - var['raw_type'] = 'int' - - elif enum['type'] == 'char*': - var['ctypes_type'] = 'ctypes.c_char_p' - var['raw_type'] = 'char*' - - var['enum'] = var['method']['path'] + '::' + enum['name'] - var['fundamental'] = True - - elif nestedStruct: - var['ctypes_type'] = 'ctypes.c_void_p' - var['raw_type'] = var['method']['path'] + '::' + nestedStruct['type'] - var['fundamental'] = False - var['struct'] = nestedStruct['type'] - var['nested_struct'] = True # july17th - - elif nestedTypedef: - var['nested_typedef'] = nestedTypedef - var['fundamental'] = is_fundamental( nestedTypedef ) - if not var['fundamental']: - var['raw_type'] = var['method']['path'] + '::' + tag - var['ctypes_type'] = 'ctypes.c_void_p' - else: - var['raw_type'] = nestedTypedef - var['ctypes_type'] = self.guess_ctypes_type( nestedTypedef ) - - else: - - _tag = tag - if '::' in tag and tag.split('::')[0] in self.namespaces: tag = '::'.join(tag.split('::')[1:]) #tag.split('::')[-1] - con = self.concrete_typedef( _tag ) - - if not con: - for ns in self.namespaces: - con = self.concrete_typedef( ns + '::' + _tag ) - if con: break - - if con: - var['concrete_type'] = _tag - var['type'] = con - self.resolve_type( var['type'], var ) - var['ctypes_type'] = self.guess_ctypes_type( var['type'] ) - - elif tag in self.structs: - trace_print( 'STRUCT', var ) - var['struct'] = tag - var['ctypes_type'] = 'ctypes.c_void_p' - var['raw_type'] = self.structs[tag]['namespace'] + '::' + tag - - elif tag in self._forward_decls: - var['forward_declared'] = tag - var['ctypes_type'] = 'ctypes.c_void_p' - - elif tag in self.global_enums: - enum = self.global_enums[ tag ] - if enum['type'] == 'int': - var['ctypes_type'] = 'ctypes.c_int' - var['raw_type'] = 'int' - elif enum['type'] == 'char*': - var['ctypes_type'] = 'ctypes.c_char_p' - var['raw_type'] = 'char*' - var['enum'] = enum['namespace'] + enum['name'] - var['fundamental'] = True - - - elif var['parent']: - print( 'WARN unresolved', _tag) - var['ctypes_type'] = 'ctypes.c_void_p' - var['unresolved'] = True - - - elif tag.count('::')==1: - trace_print( 'trying to find nested something in', tag ) - a = tag.split('::')[0] - b = tag.split('::')[-1] - if a in self.classes: # a::b is most likely something nested in a class - klass = self.classes[ a ] - if b in klass._public_enums: - trace_print( '...found nested enum', b ) - enum = klass._public_enums[ b ] - if enum['type'] == 'int': - var['ctypes_type'] = 'ctypes.c_int' - var['raw_type'] = 'int' - elif enum['type'] == 'char*': - var['ctypes_type'] = 'ctypes.c_char_p' - var['raw_type'] = 'char*' - - if klass['namespace']: var['enum'] = '::'.join( [klass['namespace'], klass['name'], enum['name']] ) - else: var['enum'] = '::'.join( [klass['name'], enum['name']] ) - - var['fundamental'] = True - - else: var['unresolved'] = True # TODO klass._public_xxx - - elif a in self.namespaces: # a::b can also be a nested namespace - if b in self.global_enums: - enum = self.global_enums[ b ] - trace_print(enum) - trace_print(var) - assert 0 - - elif b in self.global_enums: # falling back, this is a big ugly - enum = self.global_enums[ b ] - assert a in enum['namespace'].split('::') - if enum['type'] == 'int': - var['ctypes_type'] = 'ctypes.c_int' - var['raw_type'] = 'int' - elif enum['type'] == 'char*': - var['ctypes_type'] = 'ctypes.c_char_p' - var['raw_type'] = 'char*' - var['enum'] = enum['namespace'] + enum['name'] - var['fundamental'] = True - if '::' in var['enum']: - ns = var['enum'].split('::')[0] - assert ns in self.namespaces - if self.get_parent_namespace( ns ): - var['enum'] = self.get_parent_namespace( ns ) + '::' + var['enum'] - - else: # boost::gets::crazy - trace_print('NAMESPACES', self.namespaces) - trace_print( a, b ) - trace_print( '---- boost gets crazy ----' ) - var['ctypes_type'] = 'ctypes.c_void_p' - var['unresolved'] = True - - - elif 'namespace' in var and self.concrete_typedef(var['namespace']+tag): - #print( 'TRYING WITH NS', var['namespace'] ) - con = self.concrete_typedef( var['namespace']+tag ) - if con: - var['typedef'] = var['namespace']+tag - var['type'] = con - if 'struct' in con.split(): - var['raw_type'] = var['typedef'] - var['ctypes_type'] = 'ctypes.c_void_p' - else: - self.resolve_type( var['type'], var ) - var['ctypes_type'] = self.guess_ctypes_type( var['type'] ) - - elif '::' in var: - var['ctypes_type'] = 'ctypes.c_void_p' - var['unresolved'] = True - - elif tag in self.SubTypedefs: # TODO remove SubTypedefs - if 'property_of_class' in var or 'property_of_struct' in var: - trace_print( 'class:', self.SubTypedefs[ tag ], 'tag:', tag ) - var['typedef'] = self.SubTypedefs[ tag ] # class name - var['ctypes_type'] = 'ctypes.c_void_p' - else: - trace_print( "WARN-this should almost never happen!" ) - trace_print( var ); trace_print('-'*80) - var['unresolved'] = True - - elif tag in self._template_typenames: - var['typename'] = tag - var['ctypes_type'] = 'ctypes.c_void_p' - var['unresolved'] = True # TODO, how to deal with templates? - - elif tag.startswith('_'): # assume starting with underscore is not important for wrapping - print( 'WARN unresolved', _tag) - var['ctypes_type'] = 'ctypes.c_void_p' - var['unresolved'] = True - - else: - trace_print( 'WARN: unknown type', var ) - if not 'property_of_class' in var or not 'property_of_struct' in var: print('TODO - fixme', var['name'], var['type']) - var['unresolved'] = True - - - ## if not resolved and is a method param, not going to wrap these methods ## - if var['unresolved'] and 'method' in var: var['method']['unresolved_parameters'] = True - if var['unresolved'] and 'function' in var: var['function']['unresolved_parameters'] = True - if 'template' in var and 'method' in var: var['method']['template'] = True - - - # create stripped raw_type # - p = '* & const static mutable'.split() - for var in CppVariable.Vars: - if 'raw_type' not in var: - raw = [] - for x in var['type'].split(): - if x not in p: raw.append( x ) - var['raw_type'] = ' '.join( raw ) - - if var['class']: - if '::' not in var['raw_type']: - if not var['class']['parent']: - var['raw_type'] = var['class']['namespace'] + '::' + var['raw_type'] - elif var['class']['parent'] in self.classes: - parent = self.classes[ var['class']['parent'] ] - var['raw_type'] = parent['namespace'] + '::' + var['class']['name'] + '::' + var['raw_type'] - else: - var['unresolved'] = True - - elif '::' in var['raw_type'] and var['raw_type'].split('::')[0] not in self.namespaces: - var['raw_type'] = var['class']['namespace'] + '::' + var['raw_type'] - else: - var['unresolved'] = True - - elif 'forward_declared' in var and 'namespace' in var: - if '::' not in var['raw_type']: - var['raw_type'] = var['namespace'] + var['raw_type'] - elif '::' in var['raw_type'] and var['raw_type'].split('::')[0] in self.namespaces: - pass - else: trace_print('-'*80); trace_print(var); raise NotImplemented - - ## need full name space for classes in raw type ## - if var['raw_type'].startswith( '::' ): - var['unresolved'] = True - - if 'method' in var and var['unresolved']: var['method']['unresolved_parameters'] = True - if 'function' in var and var['unresolved']: var['function']['unresolved_parameters'] = True - - def concrete_typedef( self, key ): - if key not in self.typedefs: - #print( 'FAILED typedef', key ) - return None - checked = [] - while key in self.typedefs and key not in checked: - prev = key - key = self.typedefs[ key ] - if '<' in key or '>' in key: return prev # stop at template - elif key.startswith('std::'): return key # stop at std lib - checked.append( key ) - return key - - def get_parent_namespace(self, ns): - for p in self.namespaces: - if ns != p and ns in p.split('::') and p.split('::')[0] != ns: - return p.split('::')[0] - - def find_template_class( self, T ): - if T in self.template_classes: return self.template_classes[ T ] - else: - for name in self.template_classes: - if T in name: return self.template_classes[ name ] - - -class _CppHeader( Resolver ): - def finalize_return( self, meth, cls=None ): - if meth['returns'] in 'return if else + for inline case break'.split(): - meth['returns_invalid'] = True - return # TODO more irrlicht tests - - - if not meth['returns_fundamental'] and meth['returns'] in C99_NONSTANDARD: - meth['returns'] = C99_NONSTANDARD[meth['returns']] - meth['returns_fundamental'] = True - - elif not meth['returns_fundamental']: # describe the return type - - con = self.concrete_typedef( meth['returns'] ) - if not con and cls: - if cls['parent'] and '::' not in meth['returns']: - parent = self.classes[ cls['parent'] ] - con = self.concrete_typedef( parent['namespace'] + '::' + meth['returns'] ) - elif cls['namespace'] and '::' not in meth['returns']: - con = self.concrete_typedef( cls['namespace'] + '::' + meth['returns'] ) - - if not con: - for ns in self.namespaces: - con = self.concrete_typedef( ns + '::' + meth['returns'] ) - if con: break - - if con: - if con == 'std::size_t': con = 'size_t' - meth['returns_typedef'] = meth['returns'] - meth['returns'] = con - meth['returns_fundamental'] = is_fundamental( con ) - if not meth['returns_fundamental']: - if 'typename' in con.split(): meth['returns_invalid'] = True # TODO - elif con in self.classes: meth['returns_class'] = True - else: meth['returns_unknown'] = True - - elif meth['returns'] in self.classes: - trace_print( 'meth returns class:', meth['returns'] ) - meth['returns_class'] = True - - elif meth['returns'] in self.SubTypedefs: - clsname = self.SubTypedefs[ meth['returns'] ] - meth['returns_nested'] = clsname + '::' + meth['returns'] - klass = self.classes[ clsname ] - if meth['returns'] in klass._public_typedefs: - meth['returns'] = klass._public_typedefs[ meth['returns'] ] - if meth['returns'] in C99_NONSTANDARD: meth['returns'] = C99_NONSTANDARD[ meth['returns'] ] - meth['returns_fundamental'] = is_fundamental( meth['returns'] ) - if not meth['returns_fundamental']: meth['returns_class'] = True - else: - meth['returns_unsafe'] = True # protected or private - - elif cls and meth['returns'] in cls._public_enums: - enum = cls._public_enums[ meth['returns'] ] - meth['returns_enum'] = enum['type'] - meth['returns_fundamental'] = True - if enum['type'] == 'int': meth['returns'] = 'int' - else: meth['returns'] = 'char*' - - elif meth['returns'] in self.global_enums: - enum = self.global_enums[ meth['returns'] ] - meth['returns_enum'] = enum['type'] - meth['returns_fundamental'] = True - if enum['type'] == 'int': meth['returns'] = 'int' - else: meth['returns'] = 'char*' - - elif '::' in meth['returns'] and meth['returns'].split('::')[-1] in self.global_enums: - a = meth['returns'].split('::')[-1] - enum = self.global_enums[ a ] - meth['returns_enum'] = enum['type'] - meth['returns_fundamental'] = True - if enum['type'] == 'int': meth['returns'] = 'int' - else: meth['returns'] = 'char*' - - - elif meth['returns'].count('::')==1: - trace_print( meth ) - a,b = meth['returns'].split('::') - if a in self.namespaces: - if b in self.classes: - klass = self.classes[ b ] - meth['returns_class'] = a + '::' + b - - elif '<' in b and '>' in b: - meth['returns_unknown'] = True - meth['returns_template'] = True - #meth['returns_class'] = b # template returns are always classes? - - elif b in self.global_enums: - enum = self.global_enums[ b ] - meth['returns_enum'] = enum['type'] - meth['returns_fundamental'] = True - if enum['type'] == 'int': meth['returns'] = 'int' - else: meth['returns'] = 'char*' - - else: trace_print( a, b); trace_print( meth); meth['returns_unknown'] = True - - elif a in self.classes: - klass = self.classes[ a ] - if b in klass._public_enums: - trace_print( '...found nested enum', b ) - enum = klass._public_enums[ b ] - meth['returns_enum'] = enum['type'] - meth['returns_fundamental'] = True - if enum['type'] == 'int': meth['returns'] = 'int' - else: meth['returns'] = 'char*' - - elif b in klass._public_forward_declares: - meth['returns_class'] = True - - elif b in klass._public_typedefs: - meth['returns_nested_explicit'] = True - meth['returns_nested'] = meth['returns'] - meth['returns'] = klass._public_typedefs[ b ] - meth['returns_fundamental'] = is_fundamental( meth['returns'] ) - if not meth['returns_fundamental']: meth['returns_class'] = True - - else: - trace_print( meth ) # should be a nested class, TODO fix me. - meth['returns_unknown'] = True - - elif '::' in meth['returns']: - trace_print('TODO namespace or extra nested return:', meth) - meth['returns_unknown'] = True - - elif self.concrete_typedef( meth['namespace'].split('::')[0] + '::' + meth['returns'] ): - con = self.concrete_typedef( meth['namespace'].split('::')[0] + '::' + meth['returns'] ) - if con == 'std::size_t': con = 'size_t' - meth['returns_typedef'] = meth['returns'] - meth['returns'] = con - meth['returns_fundamental'] = is_fundamental( con ) - if not meth['returns_fundamental']: - if 'typename' in con.split(): meth['returns_invalid'] = True # TODO - elif con in self.classes: meth['returns_class'] = True - else: meth['returns_unknown'] = True - - - else: - trace_print( 'WARN: UNKNOWN RETURN', meth['name'], meth['returns']) - #print( self.global_enums.keys() ) - meth['returns_unknown'] = True - - if meth['returns_fundamental']: meth['returns_ctypes'] = self.guess_ctypes_type( meth['returns'] ) - - def finalize(self): - ## finalize templates ## - for typedef in self.typedefs_info: - tdef = self.typedefs_info[ typedef ] - if 'template' in tdef: - T = self.template_typedefs[ tdef['template'] ] - if tdef['template'] not in self.template_classes: continue # TODO fix me - - cls = self.template_classes[ tdef['template'] ] - for info in T.values(): - if ',' in info['typename']: continue # TODO - complex templates - - info['fundamental'] = is_fundamental( info['typename'] ) - - if not info['fundamental']: - tn = info['typename'] - con = self.concrete_typedef( tn ) - if not con and cls: - if cls['parent'] and '::' not in tn: - parent = self.classes[ cls['parent'] ] - con = self.concrete_typedef( parent['namespace'] + '::' + tn ) - elif cls['namespace'] and '::' not in tn: - con = self.concrete_typedef( cls['namespace'] + '::' + tn ) - - if not con: - for ns in self.namespaces: - #print('trying', ns + '::' + tn) - con = self.concrete_typedef( ns + '::' + tn ) - if con: break - if con: - if con == 'std::size_t': con = 'size_t' - info['type'] = info['type'].replace('<%s>'%tn, '<%s>'%con) - info['fundamental'] = is_fundamental( con ) - info['alias'] = tn - info['typename'] = con - info['ctypes_type'] = self.guess_ctypes_type( con ) - cls['template_info'] = T # do not resolve structs now - - elif tn in self.structs: - info['fundamental'] = False - info['struct'] = True - info['ctypes_type'] = 'ctypes.c_void_p' - elif '::' in tn and tn.split('::')[-1] in self.structs: - info['fundamental'] = False - info['struct'] = True - info['ctypes_type'] = 'ctypes.c_void_p' - - else: print('TODO template', tn) - - - ## finalize variables ## - self.finalize_vars() - - # finalize method returns types - for cls in self.classes.values(): - for meth in cls.get_all_methods(): - if meth['pure_virtual']: cls['abstract'] = True - self.finalize_return( meth, cls ) - - ## finalize free function returns ## - for func in self.functions: self.finalize_return( func ) - - - ## find pure virtuals and mark abstract classes ## - for cls in self.classes.values(): - methnames = cls.get_all_method_names() - pvm = cls.get_all_pure_virtual_methods() - - for d in cls['inherits']: - c = d['class'] - a = d['access'] # do not depend on this to be 'public' - trace_print( 'PARENT CLASS:', c ) - if c not in self.classes: trace_print('WARN: parent class not found') - if c in self.classes and self.classes[c]['abstract']: - p = self.classes[ c ] - for meth in p.get_all_methods(): #p["methods"]["public"]: - trace_print( '\t\tmeth', meth['name'], 'pure virtual', meth['pure_virtual'] ) - if meth['pure_virtual'] and meth['name'] not in methnames: cls['abstract'] = True; break - - print self.typedefs.keys() - print '-------------' - for k in self.template_typedefs.keys(): print k - #assert 'irr::core::dimension2d' in self.typedefs - #assert 0 - - - - - def evaluate_struct_stack(self): - """Create a Struct out of the name stack (but not its parts)""" - #print( 'eval struct stack', self.nameStack ) - #if self.braceDepth != len(self.nameSpaces): return - struct = CppStruct(self.nameStack) - struct["namespace"] = self.cur_namespace() - self.structs_order.append( struct ) - parentStruct = self.curStruct - self.curStruct = struct - if not struct['type']: return # struct {} name; - - if self.curClass: - struct['parent'] = self.curClass - klass = self.classes[ self.curClass ] - klass['structs'][self.curAccessSpecifier].append( struct ) - if self.curAccessSpecifier == 'public': klass._public_structs[ struct['type'] ] = struct - self.structs[ self.curClass + '::' + struct['type'] ] = struct - - elif parentStruct: - print( 'TODO - struct in struct' ) - struct['nested'] = True - self.structs[ struct['type'] ] = struct - - else: - self.structs[ struct['type'] ] = struct - - self._structs_brace_level[ struct['type'] ] = self.braceDepth - - ## python style ## - PYTHON_OPERATOR_MAP = { - '()' : '__call__', - '[]' : '__getitem__', - '<' : '__lt__', - '<=' : '__le__', - '==' : '__eq__', - '!=' : '__ne__', - '>' : '__gt__', - '>=' : '__ge__', - '+' : '__add__', - '-' : '__sub__', - '*' : '__mul__', - '%' : '__divmod__', - '**' : '__pow__', - '>>' : '__lshift__', - '<<' : '__rshift__', - '&' : '__and__', - '^' : '__xor__', - '|' : '__or__', - '+=' : '__iadd__', - '-=' : '__isub__', - '*=' : '__imult__', - '/=' : '__idiv__', - '%=' : '__imod__', - '**=' : '__ipow__', - '<<=' : '__ilshift__', - '>>=' : '__irshift__', - '&=' : '__iand__', - '^=' : '__ixor__', - '|=' : '__ior__', - #__neg__ __pos__ __abs__; what are these in c++? - '~' : '__invert__', - '.' : '__getattr__', - } - OPERATOR_MAP = { # do not use double under-scores so no conflicts with python # - '=' : '_assignment_', - '->' : '_select_member_', - '++' : '_increment_', - '--' : '_deincrement_', - 'new' : '_new_', - 'delete' : '_delete_', - } - OPERATOR_MAP.update( PYTHON_OPERATOR_MAP ) - - def parse_method_type( self, stack ): - #print( 'meth type info', stack ) - if stack[0] in ':;': stack = stack[1:] - info = { - 'debug': ' '.join(stack), - 'class':None, - 'namespace':self.current_namespace(), - } - if stack[0] == 'extern': - info['extern'] = True - if stack[1] == '"C"': stack = stack[ 2 : ]; info['C'] = True - elif stack[1] == '"C++"': stack = stack[ 2 : ] - else: stack = stack[ 1 : ] - - for tag in 'defined pure_virtual operator constructor destructor extern template virtual static explicit inline friend returns returns_pointer returns_fundamental returns_class'.split(): info[tag]=False - - for a in ('__attribute__', '__attribute', 'throw'): - if a in stack: - x = []; hit=None; skip=0 - for i,b in enumerate(stack): - if b==a: hit = i - elif hit is not None and b=='(' and i-1 == hit: - skip = 1 - elif hit and b=='(': - skip += 1 - elif skip and b==')': - skip -= 1 - if skip == 0: hit = None - elif not hit and not skip: - x.append( b ) - if x: stack = x - while stack and stack[0]==')': stack.pop(0) - # is_method can be confused by properties like: "__pthread_unwind_buf_t __attribute__((__aligned__));" - # and ends up passing to here thinking its a method. - if '(' not in stack: return None - #print('AFTER------',stack) - - assert stack.count('(') == stack.count(')') - - header = stack[ : stack.index('(') ] - header = ' '.join( header ) - header = header.replace(' : : ', '::' ) - header = header.replace(' < ', '<' ) - header = header.replace(' > ', '> ' ) - header = header.strip() - - if '{' in stack: - info['defined'] = True - self._method_body = self.braceDepth - print( '----------NEW METHOD WITH BODY---------', self.braceDepth ) - elif stack[-1] == ';': - info['defined'] = False - self._method_body = None # this is force cleared in several other places - else: assert 0 - - if len(stack) > 3 and stack[-1] == ';' and stack[-2] == '0' and stack[-3] == '=': - info['pure_virtual'] = True - elif len(stack) > 2 and stack[-1] == ';' and stack[-2] == '=0': - info['pure_virtual'] = True - elif stack[-1] == '=0;': - info['pure_virtual'] = True - - r = header.split() - name = None - if 'operator' in stack: # rare case op overload defined outside of class - op = stack[ stack.index('operator')+1 : stack.index('(') ] - op = ''.join(op) - if not op: - trace_print( 'TODO - parse () operator' ) - return None - else: - info['operator'] = op - if op in self.OPERATOR_MAP: - name = '__operator__' + self.OPERATOR_MAP[ op ] - a = stack[ : stack.index('operator') ] - else: - trace_print('ERROR - not a C++ operator', op) - return None - - elif r: # June 23 2011 - name = r[-1] - a = r[ : -1 ] # strip name - - if name is None: print('HEAD', header); assert 0 #return None - - while a and a[0] == '}': # strip - can have multiple } } - a = a[1:] # july3rd - - print(name) - if '::' in name: - klass = name[ : name.rindex('::') ] - name = name.split('::')[-1] - info['class'] = klass - - if name.startswith('~'): - info['destructor'] = True - name = name[1:] - elif not a: - info['constructor'] = True - - info['name'] = name - - for tag in 'virtual static friend explicit inline __explicit__ __inline__'.split(): - if tag in a: info[ tag.replace('_','') ] = True; a.remove( tag ) # inplace - - - if 'template' in a: - a.remove('template') - b = ' '.join( a ) - if '>' in b: - info['template'] = b[ : b.index('>')+1 ] - info['returns'] = b[ b.index('>')+1 : ] # find return type, could be incorrect... TODO - if '' - if typname not in self._template_typenames: self._template_typenames.append( typname ) - else: info['returns'] = ' '.join( a ) - else: info['returns'] = ' '.join( a ) - - info['returns'] = info['returns'].replace(" <","<") - info['returns'] = info['returns'].replace(" >",">") - info['returns'] = info['returns'].strip() - - ## be careful with templates, do not count pointers inside template - info['returns_pointer'] = info['returns'].split('>')[-1].count('*') - if info['returns_pointer']: info['returns'] = info['returns'].replace('*','').strip() - - info['returns_reference'] = '&' in info['returns'] - if info['returns']: info['returns'] = info['returns'].replace('&','').strip() - - a = [] - for b in info['returns'].split(): - if b == '__const__': info['returns_const'] = True - elif b == 'const': info['returns_const'] = True - else: a.append( b ) - info['returns'] = ' '.join( a ) - - info['returns_fundamental'] = is_fundamental( info['returns'] ) - return info - - def evaluate_method_stack(self): - """Create a method out of the name stack""" - - stack = [] ## fixes "/(" - for a in self.stack: - if a == '/(': stack.append( '/' ); stack.append('(') - else: stack.append( a ) - info = self.parse_method_type( stack ) - - if info: - if info[ 'class' ] and info['class'] in self.classes: # case where methods are defined outside of class - klass = self.classes[ info['class'] ] - if not info['name'] in klass.get_all_method_names(): # do not overwrite header defined method - print('External Method:', info['name']) - newMethod = CppMethod(self.nameStack, info['name'], info) - klass[ 'methods' ][ 'public' ].append( newMethod ) # it could be private, how do we know this. - newMethod['parent'] = klass - if klass['namespace']: newMethod['path'] = klass['namespace'] + '::' + klass['name'] - else: newMethod['path'] = klass['name'] - elif info['class']: pass - elif '::' in info['name']: print( info ); assert 0 - - elif self.curStruct: # struct is a class in c++ - print( 'Struct Method:', info ) - newMethod = CppMethod(self.nameStack, self.curStruct, info) - self.curStruct['methods'].append( newMethod ) - - elif self.curClass: # normal case - trace_print( 'Internal Method:', info ) - newMethod = CppMethod(self.nameStack, self.curClass, info) - klass = self.classes[self.curClass] - klass['methods'][self.curAccessSpecifier].append(newMethod) - newMethod['parent'] = klass - if klass['namespace']: newMethod['path'] = klass['namespace'] + '::' + klass['name'] - else: newMethod['path'] = klass['name'] - - - else: - print( 'free function:', self.nameStack ) - if 'operator' in info and info['operator']: - trace_print( 'skipping external method def with operator', info ) - else: - func = CppMethod(self.nameStack, methinfo=info) - self.functions.append( func ) - if func['name'] == 'setNull': print(info); assert 0 - - self.stack = [] - - def _parse_typedef( self, stack, namespace='' ): - if not stack or 'typedef' not in stack: return - stack = list( stack ) # copy just to be safe - if stack[-1] == ';': stack.pop() - - while stack and stack[-1].isdigit(): stack.pop() # throw away array size for now - - idx = stack.index('typedef') - name = namespace + stack[-1] - s = '' - for a in stack[idx+1:-1]: - if a == '{': break - if not s or s[-1] in ':<>' or a in ':<>': s += a # keep compact - else: s += ' ' + a # spacing - s = s.replace(' <', '<') - r = {'name':name, 'raw':s, 'type':s} - if not is_fundamental(s): - if 'struct' in s.split(): pass # TODO is this right? "struct ns::something" - elif '::' not in s: s = namespace + s # only add the current name space if no namespace given - #elif '::' in s: - # ns = s.split('::')[0] - # if ns not in self.namespaces: - r['type'] = s - if '<' in s: - r['template'] = s.split('<')[0] - r['typename'] = s.split('<')[-1].split('>')[0] - if s: return r - - - def evaluate_typedef(self): - ns = self.cur_namespace(add_double_colon=True) - res = self._parse_typedef( self.stack, ns ) - if res: - name = res['name'] - self.typedefs[ name ] = res['type'] - self.typedefs_info[ name ] = res - if name not in self.typedefs_order: self.typedefs_order.append( name ) - if 'template' in res: - T = res['template'] - if T not in self.template_typedefs: self.template_typedefs[ T ] = {} - self.template_typedefs[ T ][ res['typename'] ] = res - - def evaluate_property_stack(self): - """Create a Property out of the name stack""" - assert self.stack[-1] == ';' - if self.nameStack[0] == 'typedef': - if self.curClass: - typedef = self._parse_typedef( self.stack ) - name = typedef['name'] - klass = self.classes[ self.curClass ] - klass[ 'typedefs' ][ self.curAccessSpecifier ].append( name ) - if self.curAccessSpecifier == 'public': klass._public_typedefs[ name ] = typedef['type'] - Resolver.SubTypedefs[ name ] = self.curClass - else: assert 0 - elif self.curStruct or self.curClass: - newVar = CppVariable(self.nameStack, self.stack) - newVar['namespace'] = self.current_namespace() - if self.curStruct: - self.curStruct[ 'fields' ].append( newVar ) - newVar['property_of_struct'] = self.curStruct - elif self.curClass: - klass = self.classes[self.curClass] - klass["properties"][self.curAccessSpecifier].append(newVar) - newVar['property_of_class'] = klass['name'] - - self.stack = [] # CLEAR STACK - - def evaluate_class_stack(self): - """Create a Class out of the name stack (but not its parts)""" - parent = self.curClass - print('NEWCLASS', ' '.join(self.nameStack)) - - if self.braceDepth > len( self.nameSpaces) and (parent or self.curStruct): - print( 'HIT NESTED SUBCLASS' ) - elif self.braceDepth-1 != len(self.nameSpaces): - print( 'ERROR: WRONG BRACE DEPTH', self.braceDepth, self.nameSpaces ) - assert 0 - - self._method_body = None # force clear - - prevAccess = None - if parent: prevAccess = self.curAccessSpecifier - self.curAccessSpecifier = 'private' # private is default - self._current_access.append( self.curAccessSpecifier ) - - newClass = CppClass(self.nameStack) - if 'name' not in newClass or not newClass['name']: assert 0 - print( 'CLASS OK', newClass['name'] ) - if newClass['name'] in 'RenderQueueInvocationIterator RenderQueueInvocationList'.split(): assert 0 - - if '>' in newClass['name']: print('WARN: strange template class', newClass['name']) - - self.classes_order.append( newClass ) # good idea to save ordering - self.stack = [] # fixes if class declared with ';' in closing brace - - if parent: - newClass["namespace"] = self.classes[ parent ]['namespace'] + '::' + parent - newClass['parent'] = parent - self.classes[ parent ]['nested_classes'].append( newClass ) - ## supports nested classes with the same name ## - self.curClass = key = parent+'::'+newClass['name'] - self._classes_brace_level[ key ] = self.braceDepth - ## nested classes that are protected or private can not be exposed in a C wrapper ## - if prevAccess and prevAccess in ('protected', 'private'): newClass['internal'] = True - elif 'internal' in self.classes[parent]: newClass['internal'] = True - elif 'template_typename' in self.classes[parent]: newClass['internal'] = True; newClass['nested_in_template'] = True - - elif newClass['parent']: # nested class defined outside of parent. A::B {...} - parent = newClass['parent'] - newClass["namespace"] = self.classes[ parent ]['namespace'] + '::' + parent - self.classes[ parent ]['nested_classes'].append( newClass ) - ## supports nested classes with the same name ## - self.curClass = key = parent+'::'+newClass['name'] - self._classes_brace_level[ key ] = self.braceDepth - if 'internal' in self.classes[parent]: newClass['internal'] = True - elif 'template_typename' in self.classes[parent]: newClass['internal'] = True; newClass['nested_in_template'] = True - - else: - newClass["namespace"] = self.cur_namespace() - key = newClass['name'] - self.curClass = newClass["name"] - self._classes_brace_level[ newClass['name'] ] = self.braceDepth - - if newClass['namespace'] in ('std', 'boost'): - self.curClass = key = newClass['namespace'] + '::' + key - self._classes_brace_level[ key ] = self.braceDepth - - if key in self.classes: - print('WARN - name collision', key) - - self.classes[ key ] = newClass - if 'template_typename' in newClass: - self.template_classes[ self.current_namespace() + key ] = newClass - if newClass['name'] not in self.template_classes: - self.template_classes[ newClass['name'] ] = newClass - - - def evaluate_forward_decl(self): - trace_print( 'FORWARD DECL', self.nameStack ) - #assert self.nameStack[0] == 'class' - name = self.nameStack[-1] - if self.curClass: - klass = self.classes[ self.curClass ] - klass['forward_declares'][self.curAccessSpecifier].append( name ) - if self.curAccessSpecifier == 'public': klass._public_forward_declares.append( name ) - else: self._forward_decls.append( name ) - -class CppHeader( _CppHeader ): - """Parsed C++ class header - - Variables produced: - self.classes - Dictionary of classes found in a given header file where the - key is the name of the class - """ - IGNORE_NAMES = '__extension__'.split() - - def show(self): - for className in self.classes.keys(): self.classes[className].show() - - - def evaluate_enum_stack(self): - """Create an Enum out of the name stack""" - newEnum = CppEnum(self.nameStack) - if len(newEnum.keys()): - if len(self.curClass): - newEnum["namespace"] = self.cur_namespace(False) - klass = self.classes[self.curClass] - klass["enums"][self.curAccessSpecifier].append(newEnum) - if self.curAccessSpecifier == 'public': - if 'name' in newEnum and newEnum['name']: - klass._public_enums[ newEnum['name'] ] = newEnum - else: - newEnum["namespace"] = self.cur_namespace(True) - self.enums.append(newEnum) - if 'name' in newEnum and newEnum['name']: self.global_enums[ newEnum['name'] ] = newEnum - - #This enum has instances, turn them into properties - if newEnum.has_key("instances"): - instanceType = "enum" - if newEnum.has_key("name"): - instanceType = newEnum["name"] - for instance in newEnum["instances"]: - self.nameStack = [instanceType, instance] - self.evaluate_property_stack() - del newEnum["instances"] - - - def __init__(self, headerFileName, argType="file", **kwargs): - """Create the parsed C++ header file parse tree - - headerFileName - Name of the file to parse OR actual file contents (depends on argType) - argType - Indicates how to interpret headerFileName as a file string or file name - kwargs - Supports the following keywords - "enumMaintianValueFormat" - Set to true for enum values to maintain the original format ('j' will not convert to 106) - """ - ## reset global state ## - global doxygenCommentCache - doxygenCommentCache = "" - CppVariable.Vars = [] - CppStruct.Structs = [] - - if (argType == "file"): - self.headerFileName = os.path.expandvars(headerFileName) - self.mainClass = os.path.split(self.headerFileName)[1][:-2] - headerFileStr = "" - elif argType == "string": - self.headerFileName = "" - self.mainClass = "???" - headerFileStr = headerFileName - else: - raise Exception("Arg type must be either file or string") - self.curClass = "" - - global enumMaintianValueFormat - if kwargs.has_key("enumMaintianValueFormat"): - enumMaintianValueFormat = kwargs["enumMaintianValueFormat"] - else: - enumMaintianValueFormat = False - - # nested classes have parent::nested, but no extra namespace, - # this keeps the API compatible, TODO proper namespace for everything. - Resolver.CLASSES = {} - self.classes = Resolver.CLASSES - - self.enums = [] - self.global_enums = {} - self.nameStack = [] - self.nameSpaces = [] - self.curAccessSpecifier = 'private' # private is default - self._current_access = [] - self.initextra() # harts hack - - if (len(self.headerFileName)): - headerFileStr = "\n".join(open(self.headerFileName).readlines()) - self.braceDepth = 0 - lex.input(headerFileStr) - curLine = 0 - curChar = 0 - if 1: #try: - while True: - tok = lex.token() - if not tok: break - if tok.type == 'NAME' and tok.value in self.IGNORE_NAMES: continue - if tok.type not in ('PRECOMP_MACRO', 'PRECOMP_MACRO_CONT'): self.stack.append( tok.value ) - curLine = tok.lineno - curChar = tok.lexpos - - if tok.type in ('OPEN_BRACKET', 'CLOSE_BRACKET'): self.nameStack.append( tok.value ) - - elif (tok.type == 'OPEN_BRACE'): - _brace = True - if len(self.nameStack)>=2 and self.nameStack[0]=='extern' and self.nameStack[1]=='"C"': - _brace = False; print( 'extern C') - elif len(self.nameStack)>=2 and self.nameStack[0]=='extern' and self.nameStack[1]=='"C++"': - _brace = False; print( 'extern C++' ) - if _brace: self.braceDepth += 1 - - - if len(self.nameStack) >= 2 and is_namespace(self.nameStack): # namespace {} with no name used in boost, this sets default? - self.nameSpaces.append(self.nameStack[1]) - ns = self.cur_namespace(); self.stack = [] - if ns not in self.namespaces: self.namespaces.append( ns ) - if len(self.nameStack) and not is_enum_namestack(self.nameStack): - self.evaluate_stack() - else: - self.nameStack.append(tok.value) - if self.stack and self.stack[0] == 'class': self.stack = [] - - #if _brace: self.braceDepth += 1 - - elif (tok.type == 'CLOSE_BRACE'): - - if self.braceDepth == 0: - continue - if (self.braceDepth == len(self.nameSpaces)): - tmp = self.nameSpaces.pop() - self.stack = [] # clear stack when namespace ends? - if len(self.nameStack) and is_enum_namestack(self.nameStack): - self.nameStack.append(tok.value) - elif self.braceDepth < 10: - self.evaluate_stack() - else: - self.nameStack = [] - self.braceDepth -= 1 - - if self.braceDepth < 0: - print('---------- END OF EXTERN -----------') - self.braceDepth = 0 - - if self.curClass and debug: print( 'CURBD', self._classes_brace_level[ self.curClass ] ) - - if (self.braceDepth == 0) or (self.curClass and self._classes_brace_level[self.curClass] > self.braceDepth): - if self.curClass: print( '------------END OF CLASS DEF-------------', 'braceDepth:', self.braceDepth ) - - if self._current_access: self._current_access.pop() - - if self.curClass and self.classes[ self.curClass ]['parent']: - self.curClass = self.classes[ self.curClass ]['parent'] - if self._current_access: self.curAccessSpecifier = self._current_access[-1] - else: - self.curClass = "" - self.stack = [] - - #if self.curStruct: self.curStruct = None - if self.braceDepth==0 or (self.curStruct and not self.curStruct['type']) or (self.curStruct and self._structs_brace_level[self.curStruct['type']] > self.braceDepth): - if self.curStruct: print( '---------END OF STRUCT DEF-------------' ) - if self.curStruct and not self.curStruct['type']: self._struct_needs_name = self.curStruct - self.curStruct = None - - if self._method_body and self.braceDepth < self._method_body: - self._method_body = None; self.stack = []; self.nameStack = []; print( 'FORCE CLEAR METHBODY' ) - - if (tok.type == 'OPEN_PAREN'): - self.nameStack.append(tok.value) - - elif (tok.type == 'CLOSE_PAREN'): - self.nameStack.append(tok.value) - - elif (tok.type == 'EQUALS'): - self.nameStack.append(tok.value) - - elif (tok.type == 'COMMA'): - self.nameStack.append(tok.value) - - elif (tok.type == 'NUMBER'): - self.nameStack.append(tok.value) - - elif (tok.type == 'MINUS'): - self.nameStack.append(tok.value) - elif (tok.type == 'PLUS'): - self.nameStack.append(tok.value) - - elif (tok.type == 'STRING_LITERAL'): - self.nameStack.append(tok.value) - - elif (tok.type == 'NAME' or tok.type == 'AMPERSTAND' or tok.type == 'ASTERISK'): - self.nameStack.append(tok.value) - - elif (tok.type == 'COLON'): - #Dont want colon to be first in stack - if len(self.nameStack) == 0: - continue - if self.nameStack and self.nameStack[-1] in supportedAccessSpecifier: - if self.curClass or self.curStruct: - cas = self.nameStack[-1] - self.curAccessSpecifier = cas; print('CURACCESS-set', cas) - if self.curClass: - if self._current_access: self._current_access[-1] = cas - else: self._current_access.append( cas ) - else: print('warning - "public ::namespace"', ' '.join(self.nameStack)) - - self.stack = []; self.nameStack = [] # need to clear nameStack to so that nested structs can be found - else: - self.nameStack.append(tok.value) - - elif (tok.type == 'SEMI_COLON'): - if (self.braceDepth < 10): self.evaluate_stack( tok.type ) - if not self.stack: continue - if self.stack[0]=='typedef' and ( '{' not in self.stack or '}' in self.stack ): self.stack = []; trace_print( "REAL CLEAR") - elif self.stack[0] != 'typedef': self.stack = []; trace_print('CLEAR STACK') - - #except: - # raise CppParseError("Not able to parse %s on line %d evaluating \"%s\"\nError around: %s" - # % (self.headerFileName, tok.lineno, tok.value, " ".join(self.nameStack))) - - self.finalize() - - def evaluate_stack(self, token=None): - """Evaluates the current name stack""" - global doxygenCommentCache - print( "Evaluating stack %s\nBraceDepth: %s" %(self.nameStack,self.braceDepth)) - print( "Evaluating stack %s\nBraceDepth: %s" %(self.stack,self.braceDepth)) - if (len(self.curClass)): - if (debug): print( "%s (%s) "%(self.curClass, self.curAccessSpecifier)) - - #if 'typedef' in self.nameStack: self.evaluate_typedef() # allows nested typedefs, probably a bad idea - if not self.curClass and 'typedef' in self.nameStack: - print('HIT TYPEDEF', self.stack) - if token == 'SEMI_COLON' and ('{' not in self.stack or '}' in self.stack): self.evaluate_typedef() - else: return - - elif (len(self.nameStack) == 0): - if (debug): print( "line ",lineno() ) - if (debug): print( "(Empty Stack)" ) - return - elif (self.nameStack[0] == "namespace"): - #Taken care of outside of here - pass - elif len(self.nameStack) >= 2 and self.nameStack[0] == 'using' and self.nameStack[1] == 'namespace': pass # TODO - - elif is_enum_namestack(self.nameStack): - if (debug): print( "line ",lineno() ) - self.evaluate_enum_stack() - - elif self._method_body and self.braceDepth >= self._method_body: - #print( 'INSIDE METHOD DEF', self.nameStack ) - self.stack = [] - - #elif is_method_namestack(self.stack) and '(' in self.nameStack: # this fails on "operator /(..." - elif ')' in self.nameStack and is_method_namestack(self.stack): - #print( 'eval method', self.nameStack ) - self.evaluate_method_stack() - self.stack = [] - - elif len(self.nameStack) >= 2 and (self.nameStack[0]=='friend' and self.nameStack[1]=='class'): pass - - elif ('class' in self.nameStack or 'struct' in self.nameStack) and self.stack[-1] == ';': self.evaluate_forward_decl() - - elif (self.nameStack[0] == "class") or (self.nameStack[0]=='template' and 'class' in self.nameStack): - #print('^^^^^^^^^^^^^^^^^^^^') - self.evaluate_class_stack() - elif (self.nameStack[0] == "struct") or (len(self.nameStack)>3 and self.stack[-1]=='{' and self.nameStack[-3]=='struct'): - print( '------------new struct-----------' ) - self.evaluate_struct_stack() - self.stack = [] - elif self.nameStack[0]=='template' and self.stack[-1]=='{' and 'struct' in self.nameStack: - print( '------------new struct - unsafe?' ) - self.evaluate_struct_stack() - self.stack = [] - - elif '(' not in self.nameStack and ')' not in self.nameStack and self.stack[-1] == ';': # catching all props? - self.evaluate_property_stack() - - - elif not self.curClass: - if (debug): print( "line ",lineno() ) - if is_enum_namestack(self.nameStack): self.evaluate_enum_stack() - elif self.curStruct and self.stack[-1] == ';': self.evaluate_property_stack() # this catches fields of global structs - self.nameStack = [] - doxygenCommentCache = "" - return - elif (self.braceDepth < 1): - if (debug): print( "line ",lineno() ) - #Ignore global stuff for now - if (debug): print( "Global stuff: ", self.nameStack ) - self.nameStack = [] - self._method_body = None - doxygenCommentCache = "" - return - elif (self.braceDepth > len(self.nameSpaces) + 1): - if (debug): print( "line ",lineno() ) - self.nameStack = [] - doxygenCommentCache = "" - return - - self.nameStack = [] # some if/else above return and others not, so this may or may not be reset - doxygenCommentCache = "" - - - diff --git a/scripts/EnumIterator/EnumIterator.py b/scripts/EnumIterator/EnumIterator.py deleted file mode 100644 index 5d6d119..0000000 --- a/scripts/EnumIterator/EnumIterator.py +++ /dev/null @@ -1,321 +0,0 @@ -#!/usr/bin/python2 - -import CppHeaderParser -import os - -hHeader = \ -"""// EnumIterator.py AUTOGENERATED FILE. ** DO NOT EDIT ** Run "python2 Run.py" -#pragma once - -#include -#include -#include "{1}" -""" - -hBody = \ -"""class {0}Enum -{{ -public: - struct EnumData - {{ - {0} enumValue; - std::string enumString; - - EnumData( {0} _enumValue, const std::string &_enumString ); - }}; - -private: - static EnumData mSortedByEnum[{1}+1]; - static EnumData mSortedByString[{1}+1]; - - struct OrderByEnum; - struct OrderByStr; - -public: - static const EnumData* begin() {{ return &mSortedByEnum[0]; }} - static const EnumData* end() {{ return &mSortedByEnum[{1}]; }} - - /// Returns the min value reached by this enumerator - static int minValue(); - - /// Returns the max value reached by this enumerator - static int maxValue(); - - /// Returns the number of elements in the enum - static size_t count(); - - /// Returns true if integer value can be represented by the enum. - /// O(1) if enum is contiguous, O(log N) otherwise - static bool isValidValue( int value ); - - /// Only available if the enum is contiguous. Otherwise it's a compiler error - /// It's O(1) - /// Returns empty string if value is not a valid enum value - static const std::string& get( {0} value ); - - /// Always available. O(1) if enum is contiguous, O(log N) otherwise - /// Returns empty string if value is not a valid enum value - static const std::string& find( {0} value ); - - /// Will find the enumerator value based on its string representation. - /// Returns false if the string doesn't match any value, leaving the output - /// 'outValue' untouched (i.e. left uninitialized). - static bool find( const std::string &strValue, {0} &outValue ); - - /// Will find the enumerator value based on its string representation. - /// Throws if the string doesn't match any value. - static {0} find( const std::string &strValue ); -}}; -""" - -hEnding = '\n' - -cppHeader = \ -"""// EnumIterator.py AUTOGENERATED FILE. ** DO NOT EDIT ** Run "python2 Run.py" - -#include -#include - -const std::string BLANKSTRING = ""; -""" - -cppArrayDeclaration0 = \ -"""{0}Enum::EnumData {0}Enum::mSortedByEnum[{1}+1] = -{{ -""" - -cppArrayDeclaration1 = \ -"""}}; - -{0}Enum::EnumData {0}Enum::mSortedByString[{1}+1] = -{{""" - - -cppFunction = \ -""" -//--------------------------------------------------------------------------------------- -{0}Enum::EnumData::EnumData( {0} _enumValue, - const std::string &_enumString ) : - enumValue( _enumValue ), - enumString( _enumString ) -{{ -}} -//--------------------------------------------------------------------------------------- -struct {0}Enum::OrderByEnum -{{ - bool operator () ( const {0}Enum::EnumData &_l, {0} _r ) const - {{ - return _l.enumValue < _r; - }} - - bool operator () ( {0} _l, const {0}Enum::EnumData &_r ) const - {{ - return _l < _r.enumValue; - }} - - bool operator () ( const {0}Enum::EnumData &_l, int _r ) const - {{ - return _l.enumValue < _r; - }} - - bool operator () ( int _l, const {0}Enum::EnumData &_r ) const - {{ - return _l < _r.enumValue; - }} -}}; -//--------------------------------------------------------------------------------------- -struct {0}Enum::OrderByStr -{{ - bool operator () ( const {0}Enum::EnumData &_l, const std::string &_r ) const - {{ - return _l.enumString < _r; - }} - - bool operator () ( const std::string &_l, const {0}Enum::EnumData &_r ) const - {{ - return _l < _r.enumString; - }} -}}; -//--------------------------------------------------------------------------------------- -//--------------------------------------------------------------------------------------- -int {0}Enum::minValue() -{{ - return mSortedByEnum[0].enumValue; -}} -//--------------------------------------------------------------------------------------- -int {0}Enum::maxValue() -{{ - return mSortedByEnum[{1}-1].enumValue; -}} -//--------------------------------------------------------------------------------------- -size_t {0}Enum::count() -{{ - return {1}; -}} -//--------------------------------------------------------------------------------------- -bool {0}Enum::find( const std::string &strValue, {0} &outValue ) -{{ - const EnumData* itor = std::lower_bound( &mSortedByString[0], - &mSortedByString[{1}], - strValue, OrderByStr() ); - - if( itor != &mSortedByString[{1}] && itor->enumString == strValue ) - {{ - outValue = itor->enumValue; - return true; - }} - else - {{ - return false; - }} -}} -//--------------------------------------------------------------------------------------- -{0} {0}Enum::find( const std::string &strValue ) -{{ - {0} retVal; - const bool bFound = find( strValue, retVal ); - if( !bFound ) - {{ - throw std::invalid_argument( "String: " + strValue + - " is not a valid enum of type {0}" ); - }} - - return retVal; -}} -""" - -cppFunctionContig = \ -""" -//--------------------------------------------------------------------------------------- -bool {0}Enum::isValidValue( int value ) -{{ - return minValue() >= value && value <= maxValue(); -}} -//--------------------------------------------------------------------------------------- -const std::string& {0}Enum::get( {0} value ) -{{ - const int idx = value - mSortedByEnum[0].enumValue; - if( idx >= count() ) - return BLANKSTRING; - - return mSortedByEnum[idx].enumString; -}} -//--------------------------------------------------------------------------------------- -const std::string& {0}Enum::find( {0} value ) -{{ - return get( value ); -}} -""" - -cppFunctionNonContig = \ -""" -//--------------------------------------------------------------------------------------- -bool {0}Enum::isValidValue( int value ) -{{ - const EnumData* itor = std::lower_bound( &mSortedByString[0], - &mSortedByString[{1}], - value, OrderByEnum() ); - - if( itor != &mSortedByString[{1}] && itor->enumValue == value ) - return true; - - return false; -}} -//--------------------------------------------------------------------------------------- -const std::string& {0}Enum::find( {0} value ) -{{ - const EnumData *itor = std::lower_bound( begin(), end(), value, OrderByEnum() ); - - if( itor != end() && itor->enumValue == value ) - {{ - return itor->enumString; - }} - else - {{ - return BLANKSTRING; - }} -}} -""" - -def wasFileGeneratedByUs( fullPath ): - firstLine = open( fullPath, "r" ).readline() - return firstLine.find( '// EnumIterator.py AUTOGENERATED FILE. ** DO NOT EDIT ** Run "python2 Run.py"' ) != -1 - -def processEnumFileBegin(): - return cppHeader - -def processEnumFile( fullPath, fileName ): - try: - cppParsed = CppHeaderParser.CppHeader( fullPath ) - except CppHeaderParser.CppParseError, e: - print e - sys.exit(1) - - outputCpp = '\n#include "{0}"\n\n#include "{1}Enum.h"\n\n'.format( fileName, os.path.splitext( fileName )[0] ) - outputHeader = hHeader.format( os.path.splitext( fileName )[0], fileName ) - - for cppEnum in cppParsed.enums: - # Grab all data from CppHeaderParser - namespaces = cppEnum['namespace'] - if namespaces: - namespaces = namespaces[0:-2].split( '::' ) - className = cppEnum['name'] - enumsByValue = {} - enumsByString = {} - for values in cppEnum['values']: - enumsByValue[values['value']] = values['name'] - enumsByString[values['name']] = values['value'] - - sortedByString = sorted( enumsByString.keys(), key=lambda x:x.lower() ) - - # Sort enums by value and by string. - enumKeys = enumsByValue.keys() - prevKey = enumKeys[0] - contiguous = True - for i in range( 1, len( enumKeys ) ): - if enumKeys[i] - prevKey != 1: - contiguous = False - break - prevKey = enumKeys[i] - - # Generate .cpp file. - outputStr = '' - - for namespace in namespaces: outputStr += 'namespace {0}\n{{\n'.format( namespace ) - - outputStr += cppArrayDeclaration0.format( className, len( enumsByValue ) ) - - for enumString in sortedByString: - outputStr += '{0}Enum::EnumData( {1}, "{1}" ),//\n'.format( className, enumString ) - outputStr += '{0}Enum::EnumData( {1}, "__INVALID" )\n'.format( className, sortedByString[-1] ) - - outputStr += cppArrayDeclaration1.format( className, len( enumsByValue ) ) - - for enumString in sortedByString: - outputStr += '{0}Enum::EnumData( {1}, "{1}" ),//\n'.format( className, enumString ) - outputStr += '{0}Enum::EnumData( {1}, "__INVALID" )\n'.format( className, sortedByString[-1] ) - - outputStr += '};\n' - - outputStr += cppFunction.format( className, len( enumsByValue ) ) - - if contiguous: - outputStr += cppFunctionContig.format( className, len( enumsByValue ) ) - else: - outputStr += cppFunctionNonContig.format( className, len( enumsByValue ) ) - - for namespace in namespaces: outputStr += '}\n' - - # Generate .h file - headerStr = '' - for namespace in namespaces: headerStr += 'namespace {0}\n{{\n'.format( namespace ) - headerStr += hBody.format( className, len( enumsByValue ) ) - for namespace in namespaces: headerStr += '}\n' - - # Append to final output both .cpp and .h files - outputHeader += headerStr - outputCpp += outputStr - - outputHeader += hEnding - - return outputCpp, outputHeader diff --git a/scripts/EnumIterator/Run.py b/scripts/EnumIterator/Run.py deleted file mode 100755 index d701e33..0000000 --- a/scripts/EnumIterator/Run.py +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/python2 - -import os -import hashlib -import sys -import EnumIterator - -rootFolder = "../../build/" -includeRoot = "../../include/" -srcRoot = "../../src/" -filesToParse = ["CmdLineParams.h"] - -## Opens the given file, verifies if it has changed by comparing its md5 with our records -## If they're different, saves the fileContents. This allows us to avoid unnecessary -## recompilation in C/C++ -## @param outputFolder -## Folder where to store the file. e.g. -## '/home/username/project/outfolder/' -## 'C:/project/outfolder/' -## @param fileName -## Name of the file. e.g. 'MyHeaderEnum.h' -## @param fileContents -## The contents of the file to store -def writeIfModified( outputFolder, fileName, fileContents ): - finalMd5 = hashlib.md5( fileContents ).hexdigest() - - md5FileName = os.path.join( rootFolder, '.tmp', fileName + '.md5' ) - try: - file = open( md5FileName, 'r+b' ) - oldMd5 = file.read() - except: - oldMd5 = "" - - outputPath = os.path.join( outputFolder, fileName ) - if finalMd5 != oldMd5 or not os.path.isfile( outputPath ): - open( md5FileName, 'w+b' ).write( finalMd5 ) - open( outputPath, 'w+b' ).write( fileContents ) - -## Returns True if, according to our records, the modification time of the -## file has changed since the last time we've called this function. -## @param folderPath -## Folder where the file is stored. e.g. -## '/home/username/project/folder/' -## 'C:/project/folder/' -## @param fileName -## Name of the file. e.g. 'MyHeader.h' -def fileWasModified( folderPath, fileName ): - mtFileName = os.path.join( rootFolder, '.tmp', fileName + '.mt' ) - - try: - file = open( mtFileName, 'r+b' ) - oldMt = file.read() - except: - oldMt = -1 - - fullPath = os.path.join( folderPath, fileName ) - try: - mtime = str( os.path.getmtime( fullPath ) ) - except OSError: - mtime = 0 - - if oldMt != mtime: - open( mtFileName, 'w+b' ).write( mtime ) - return True - - return False - - -if not os.path.exists( rootFolder + '.tmp' ): - os.makedirs( rootFolder + '.tmp' ) - -needsRerun = False - -for root, dir, files in os.walk(includeRoot): - for fileName in files: - fullPath = os.path.join( root, fileName ) - if fileName in filesToParse and fileWasModified( root, fileName ) \ - and not EnumIterator.wasFileGeneratedByUs( fullPath ): - needsRerun = True - break - if needsRerun: - break - -if not needsRerun: - print( "All files are up to date or none found" ) - exit(0) - -outputCpp = EnumIterator.processEnumFileBegin() - -print( "A file could be out of date. Updating enums..." ) - -for root, dir, files in os.walk(includeRoot): - for fileName in files: - splitFileName = os.path.splitext( fileName ) - fullPath = os.path.join( root, fileName ) - if fileName in filesToParse and not EnumIterator.wasFileGeneratedByUs( fullPath ): - print( "****************" + fullPath + "****************" ) - print( EnumIterator.wasFileGeneratedByUs( fullPath ) ) - cppData, hppData = EnumIterator.processEnumFile( fullPath, fileName ) - - outputCpp += cppData - writeIfModified( root, splitFileName[0] + 'Enum.h', hppData ) - -writeIfModified( srcRoot, "AmalgamationEnum.cpp", outputCpp ) diff --git a/scripts/EnumIterator/ply/__init__.py b/scripts/EnumIterator/ply/__init__.py deleted file mode 100644 index 2461a44..0000000 --- a/scripts/EnumIterator/ply/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# PLY package -# Author: David Beazley (dave@dabeaz.com) - -__version__ = '3.7' -__all__ = ['lex','yacc'] diff --git a/scripts/EnumIterator/ply/cpp.py b/scripts/EnumIterator/ply/cpp.py deleted file mode 100644 index 2f6a030..0000000 --- a/scripts/EnumIterator/ply/cpp.py +++ /dev/null @@ -1,908 +0,0 @@ -# ----------------------------------------------------------------------------- -# cpp.py -# -# Author: David Beazley (http://www.dabeaz.com) -# Copyright (C) 2007 -# All rights reserved -# -# This module implements an ANSI-C style lexical preprocessor for PLY. -# ----------------------------------------------------------------------------- -from __future__ import generators - -# ----------------------------------------------------------------------------- -# Default preprocessor lexer definitions. These tokens are enough to get -# a basic preprocessor working. Other modules may import these if they want -# ----------------------------------------------------------------------------- - -tokens = ( - 'CPP_ID','CPP_INTEGER', 'CPP_FLOAT', 'CPP_STRING', 'CPP_CHAR', 'CPP_WS', 'CPP_COMMENT1', 'CPP_COMMENT2', 'CPP_POUND','CPP_DPOUND' -) - -literals = "+-*/%|&~^<>=!?()[]{}.,;:\\\'\"" - -# Whitespace -def t_CPP_WS(t): - r'\s+' - t.lexer.lineno += t.value.count("\n") - return t - -t_CPP_POUND = r'\#' -t_CPP_DPOUND = r'\#\#' - -# Identifier -t_CPP_ID = r'[A-Za-z_][\w_]*' - -# Integer literal -def CPP_INTEGER(t): - r'(((((0x)|(0X))[0-9a-fA-F]+)|(\d+))([uU][lL]|[lL][uU]|[uU]|[lL])?)' - return t - -t_CPP_INTEGER = CPP_INTEGER - -# Floating literal -t_CPP_FLOAT = r'((\d+)(\.\d+)(e(\+|-)?(\d+))? | (\d+)e(\+|-)?(\d+))([lL]|[fF])?' - -# String literal -def t_CPP_STRING(t): - r'\"([^\\\n]|(\\(.|\n)))*?\"' - t.lexer.lineno += t.value.count("\n") - return t - -# Character constant 'c' or L'c' -def t_CPP_CHAR(t): - r'(L)?\'([^\\\n]|(\\(.|\n)))*?\'' - t.lexer.lineno += t.value.count("\n") - return t - -# Comment -def t_CPP_COMMENT1(t): - r'(/\*(.|\n)*?\*/)' - ncr = t.value.count("\n") - t.lexer.lineno += ncr - # replace with one space or a number of '\n' - t.type = 'CPP_WS'; t.value = '\n' * ncr if ncr else ' ' - return t - -# Line comment -def t_CPP_COMMENT2(t): - r'(//.*?(\n|$))' - # replace with '/n' - t.type = 'CPP_WS'; t.value = '\n' - -def t_error(t): - t.type = t.value[0] - t.value = t.value[0] - t.lexer.skip(1) - return t - -import re -import copy -import time -import os.path - -# ----------------------------------------------------------------------------- -# trigraph() -# -# Given an input string, this function replaces all trigraph sequences. -# The following mapping is used: -# -# ??= # -# ??/ \ -# ??' ^ -# ??( [ -# ??) ] -# ??! | -# ??< { -# ??> } -# ??- ~ -# ----------------------------------------------------------------------------- - -_trigraph_pat = re.compile(r'''\?\?[=/\'\(\)\!<>\-]''') -_trigraph_rep = { - '=':'#', - '/':'\\', - "'":'^', - '(':'[', - ')':']', - '!':'|', - '<':'{', - '>':'}', - '-':'~' -} - -def trigraph(input): - return _trigraph_pat.sub(lambda g: _trigraph_rep[g.group()[-1]],input) - -# ------------------------------------------------------------------ -# Macro object -# -# This object holds information about preprocessor macros -# -# .name - Macro name (string) -# .value - Macro value (a list of tokens) -# .arglist - List of argument names -# .variadic - Boolean indicating whether or not variadic macro -# .vararg - Name of the variadic parameter -# -# When a macro is created, the macro replacement token sequence is -# pre-scanned and used to create patch lists that are later used -# during macro expansion -# ------------------------------------------------------------------ - -class Macro(object): - def __init__(self,name,value,arglist=None,variadic=False): - self.name = name - self.value = value - self.arglist = arglist - self.variadic = variadic - if variadic: - self.vararg = arglist[-1] - self.source = None - -# ------------------------------------------------------------------ -# Preprocessor object -# -# Object representing a preprocessor. Contains macro definitions, -# include directories, and other information -# ------------------------------------------------------------------ - -class Preprocessor(object): - def __init__(self,lexer=None): - if lexer is None: - lexer = lex.lexer - self.lexer = lexer - self.macros = { } - self.path = [] - self.temp_path = [] - - # Probe the lexer for selected tokens - self.lexprobe() - - tm = time.localtime() - self.define("__DATE__ \"%s\"" % time.strftime("%b %d %Y",tm)) - self.define("__TIME__ \"%s\"" % time.strftime("%H:%M:%S",tm)) - self.parser = None - - # ----------------------------------------------------------------------------- - # tokenize() - # - # Utility function. Given a string of text, tokenize into a list of tokens - # ----------------------------------------------------------------------------- - - def tokenize(self,text): - tokens = [] - self.lexer.input(text) - while True: - tok = self.lexer.token() - if not tok: break - tokens.append(tok) - return tokens - - # --------------------------------------------------------------------- - # error() - # - # Report a preprocessor error/warning of some kind - # ---------------------------------------------------------------------- - - def error(self,file,line,msg): - print("%s:%d %s" % (file,line,msg)) - - # ---------------------------------------------------------------------- - # lexprobe() - # - # This method probes the preprocessor lexer object to discover - # the token types of symbols that are important to the preprocessor. - # If this works right, the preprocessor will simply "work" - # with any suitable lexer regardless of how tokens have been named. - # ---------------------------------------------------------------------- - - def lexprobe(self): - - # Determine the token type for identifiers - self.lexer.input("identifier") - tok = self.lexer.token() - if not tok or tok.value != "identifier": - print("Couldn't determine identifier type") - else: - self.t_ID = tok.type - - # Determine the token type for integers - self.lexer.input("12345") - tok = self.lexer.token() - if not tok or int(tok.value) != 12345: - print("Couldn't determine integer type") - else: - self.t_INTEGER = tok.type - self.t_INTEGER_TYPE = type(tok.value) - - # Determine the token type for strings enclosed in double quotes - self.lexer.input("\"filename\"") - tok = self.lexer.token() - if not tok or tok.value != "\"filename\"": - print("Couldn't determine string type") - else: - self.t_STRING = tok.type - - # Determine the token type for whitespace--if any - self.lexer.input(" ") - tok = self.lexer.token() - if not tok or tok.value != " ": - self.t_SPACE = None - else: - self.t_SPACE = tok.type - - # Determine the token type for newlines - self.lexer.input("\n") - tok = self.lexer.token() - if not tok or tok.value != "\n": - self.t_NEWLINE = None - print("Couldn't determine token for newlines") - else: - self.t_NEWLINE = tok.type - - self.t_WS = (self.t_SPACE, self.t_NEWLINE) - - # Check for other characters used by the preprocessor - chars = [ '<','>','#','##','\\','(',')',',','.'] - for c in chars: - self.lexer.input(c) - tok = self.lexer.token() - if not tok or tok.value != c: - print("Unable to lex '%s' required for preprocessor" % c) - - # ---------------------------------------------------------------------- - # add_path() - # - # Adds a search path to the preprocessor. - # ---------------------------------------------------------------------- - - def add_path(self,path): - self.path.append(path) - - # ---------------------------------------------------------------------- - # group_lines() - # - # Given an input string, this function splits it into lines. Trailing whitespace - # is removed. Any line ending with \ is grouped with the next line. This - # function forms the lowest level of the preprocessor---grouping into text into - # a line-by-line format. - # ---------------------------------------------------------------------- - - def group_lines(self,input): - lex = self.lexer.clone() - lines = [x.rstrip() for x in input.splitlines()] - for i in xrange(len(lines)): - j = i+1 - while lines[i].endswith('\\') and (j < len(lines)): - lines[i] = lines[i][:-1]+lines[j] - lines[j] = "" - j += 1 - - input = "\n".join(lines) - lex.input(input) - lex.lineno = 1 - - current_line = [] - while True: - tok = lex.token() - if not tok: - break - current_line.append(tok) - if tok.type in self.t_WS and '\n' in tok.value: - yield current_line - current_line = [] - - if current_line: - yield current_line - - # ---------------------------------------------------------------------- - # tokenstrip() - # - # Remove leading/trailing whitespace tokens from a token list - # ---------------------------------------------------------------------- - - def tokenstrip(self,tokens): - i = 0 - while i < len(tokens) and tokens[i].type in self.t_WS: - i += 1 - del tokens[:i] - i = len(tokens)-1 - while i >= 0 and tokens[i].type in self.t_WS: - i -= 1 - del tokens[i+1:] - return tokens - - - # ---------------------------------------------------------------------- - # collect_args() - # - # Collects comma separated arguments from a list of tokens. The arguments - # must be enclosed in parenthesis. Returns a tuple (tokencount,args,positions) - # where tokencount is the number of tokens consumed, args is a list of arguments, - # and positions is a list of integers containing the starting index of each - # argument. Each argument is represented by a list of tokens. - # - # When collecting arguments, leading and trailing whitespace is removed - # from each argument. - # - # This function properly handles nested parenthesis and commas---these do not - # define new arguments. - # ---------------------------------------------------------------------- - - def collect_args(self,tokenlist): - args = [] - positions = [] - current_arg = [] - nesting = 1 - tokenlen = len(tokenlist) - - # Search for the opening '('. - i = 0 - while (i < tokenlen) and (tokenlist[i].type in self.t_WS): - i += 1 - - if (i < tokenlen) and (tokenlist[i].value == '('): - positions.append(i+1) - else: - self.error(self.source,tokenlist[0].lineno,"Missing '(' in macro arguments") - return 0, [], [] - - i += 1 - - while i < tokenlen: - t = tokenlist[i] - if t.value == '(': - current_arg.append(t) - nesting += 1 - elif t.value == ')': - nesting -= 1 - if nesting == 0: - if current_arg: - args.append(self.tokenstrip(current_arg)) - positions.append(i) - return i+1,args,positions - current_arg.append(t) - elif t.value == ',' and nesting == 1: - args.append(self.tokenstrip(current_arg)) - positions.append(i+1) - current_arg = [] - else: - current_arg.append(t) - i += 1 - - # Missing end argument - self.error(self.source,tokenlist[-1].lineno,"Missing ')' in macro arguments") - return 0, [],[] - - # ---------------------------------------------------------------------- - # macro_prescan() - # - # Examine the macro value (token sequence) and identify patch points - # This is used to speed up macro expansion later on---we'll know - # right away where to apply patches to the value to form the expansion - # ---------------------------------------------------------------------- - - def macro_prescan(self,macro): - macro.patch = [] # Standard macro arguments - macro.str_patch = [] # String conversion expansion - macro.var_comma_patch = [] # Variadic macro comma patch - i = 0 - while i < len(macro.value): - if macro.value[i].type == self.t_ID and macro.value[i].value in macro.arglist: - argnum = macro.arglist.index(macro.value[i].value) - # Conversion of argument to a string - if i > 0 and macro.value[i-1].value == '#': - macro.value[i] = copy.copy(macro.value[i]) - macro.value[i].type = self.t_STRING - del macro.value[i-1] - macro.str_patch.append((argnum,i-1)) - continue - # Concatenation - elif (i > 0 and macro.value[i-1].value == '##'): - macro.patch.append(('c',argnum,i-1)) - del macro.value[i-1] - continue - elif ((i+1) < len(macro.value) and macro.value[i+1].value == '##'): - macro.patch.append(('c',argnum,i)) - i += 1 - continue - # Standard expansion - else: - macro.patch.append(('e',argnum,i)) - elif macro.value[i].value == '##': - if macro.variadic and (i > 0) and (macro.value[i-1].value == ',') and \ - ((i+1) < len(macro.value)) and (macro.value[i+1].type == self.t_ID) and \ - (macro.value[i+1].value == macro.vararg): - macro.var_comma_patch.append(i-1) - i += 1 - macro.patch.sort(key=lambda x: x[2],reverse=True) - - # ---------------------------------------------------------------------- - # macro_expand_args() - # - # Given a Macro and list of arguments (each a token list), this method - # returns an expanded version of a macro. The return value is a token sequence - # representing the replacement macro tokens - # ---------------------------------------------------------------------- - - def macro_expand_args(self,macro,args): - # Make a copy of the macro token sequence - rep = [copy.copy(_x) for _x in macro.value] - - # Make string expansion patches. These do not alter the length of the replacement sequence - - str_expansion = {} - for argnum, i in macro.str_patch: - if argnum not in str_expansion: - str_expansion[argnum] = ('"%s"' % "".join([x.value for x in args[argnum]])).replace("\\","\\\\") - rep[i] = copy.copy(rep[i]) - rep[i].value = str_expansion[argnum] - - # Make the variadic macro comma patch. If the variadic macro argument is empty, we get rid - comma_patch = False - if macro.variadic and not args[-1]: - for i in macro.var_comma_patch: - rep[i] = None - comma_patch = True - - # Make all other patches. The order of these matters. It is assumed that the patch list - # has been sorted in reverse order of patch location since replacements will cause the - # size of the replacement sequence to expand from the patch point. - - expanded = { } - for ptype, argnum, i in macro.patch: - # Concatenation. Argument is left unexpanded - if ptype == 'c': - rep[i:i+1] = args[argnum] - # Normal expansion. Argument is macro expanded first - elif ptype == 'e': - if argnum not in expanded: - expanded[argnum] = self.expand_macros(args[argnum]) - rep[i:i+1] = expanded[argnum] - - # Get rid of removed comma if necessary - if comma_patch: - rep = [_i for _i in rep if _i] - - return rep - - - # ---------------------------------------------------------------------- - # expand_macros() - # - # Given a list of tokens, this function performs macro expansion. - # The expanded argument is a dictionary that contains macros already - # expanded. This is used to prevent infinite recursion. - # ---------------------------------------------------------------------- - - def expand_macros(self,tokens,expanded=None): - if expanded is None: - expanded = {} - i = 0 - while i < len(tokens): - t = tokens[i] - if t.type == self.t_ID: - if t.value in self.macros and t.value not in expanded: - # Yes, we found a macro match - expanded[t.value] = True - - m = self.macros[t.value] - if not m.arglist: - # A simple macro - ex = self.expand_macros([copy.copy(_x) for _x in m.value],expanded) - for e in ex: - e.lineno = t.lineno - tokens[i:i+1] = ex - i += len(ex) - else: - # A macro with arguments - j = i + 1 - while j < len(tokens) and tokens[j].type in self.t_WS: - j += 1 - if tokens[j].value == '(': - tokcount,args,positions = self.collect_args(tokens[j:]) - if not m.variadic and len(args) != len(m.arglist): - self.error(self.source,t.lineno,"Macro %s requires %d arguments" % (t.value,len(m.arglist))) - i = j + tokcount - elif m.variadic and len(args) < len(m.arglist)-1: - if len(m.arglist) > 2: - self.error(self.source,t.lineno,"Macro %s must have at least %d arguments" % (t.value, len(m.arglist)-1)) - else: - self.error(self.source,t.lineno,"Macro %s must have at least %d argument" % (t.value, len(m.arglist)-1)) - i = j + tokcount - else: - if m.variadic: - if len(args) == len(m.arglist)-1: - args.append([]) - else: - args[len(m.arglist)-1] = tokens[j+positions[len(m.arglist)-1]:j+tokcount-1] - del args[len(m.arglist):] - - # Get macro replacement text - rep = self.macro_expand_args(m,args) - rep = self.expand_macros(rep,expanded) - for r in rep: - r.lineno = t.lineno - tokens[i:j+tokcount] = rep - i += len(rep) - del expanded[t.value] - continue - elif t.value == '__LINE__': - t.type = self.t_INTEGER - t.value = self.t_INTEGER_TYPE(t.lineno) - - i += 1 - return tokens - - # ---------------------------------------------------------------------- - # evalexpr() - # - # Evaluate an expression token sequence for the purposes of evaluating - # integral expressions. - # ---------------------------------------------------------------------- - - def evalexpr(self,tokens): - # tokens = tokenize(line) - # Search for defined macros - i = 0 - while i < len(tokens): - if tokens[i].type == self.t_ID and tokens[i].value == 'defined': - j = i + 1 - needparen = False - result = "0L" - while j < len(tokens): - if tokens[j].type in self.t_WS: - j += 1 - continue - elif tokens[j].type == self.t_ID: - if tokens[j].value in self.macros: - result = "1L" - else: - result = "0L" - if not needparen: break - elif tokens[j].value == '(': - needparen = True - elif tokens[j].value == ')': - break - else: - self.error(self.source,tokens[i].lineno,"Malformed defined()") - j += 1 - tokens[i].type = self.t_INTEGER - tokens[i].value = self.t_INTEGER_TYPE(result) - del tokens[i+1:j+1] - i += 1 - tokens = self.expand_macros(tokens) - for i,t in enumerate(tokens): - if t.type == self.t_ID: - tokens[i] = copy.copy(t) - tokens[i].type = self.t_INTEGER - tokens[i].value = self.t_INTEGER_TYPE("0L") - elif t.type == self.t_INTEGER: - tokens[i] = copy.copy(t) - # Strip off any trailing suffixes - tokens[i].value = str(tokens[i].value) - while tokens[i].value[-1] not in "0123456789abcdefABCDEF": - tokens[i].value = tokens[i].value[:-1] - - expr = "".join([str(x.value) for x in tokens]) - expr = expr.replace("&&"," and ") - expr = expr.replace("||"," or ") - expr = expr.replace("!"," not ") - try: - result = eval(expr) - except StandardError: - self.error(self.source,tokens[0].lineno,"Couldn't evaluate expression") - result = 0 - return result - - # ---------------------------------------------------------------------- - # parsegen() - # - # Parse an input string/ - # ---------------------------------------------------------------------- - def parsegen(self,input,source=None): - - # Replace trigraph sequences - t = trigraph(input) - lines = self.group_lines(t) - - if not source: - source = "" - - self.define("__FILE__ \"%s\"" % source) - - self.source = source - chunk = [] - enable = True - iftrigger = False - ifstack = [] - - for x in lines: - for i,tok in enumerate(x): - if tok.type not in self.t_WS: break - if tok.value == '#': - # Preprocessor directive - - # insert necessary whitespace instead of eaten tokens - for tok in x: - if tok.type in self.t_WS and '\n' in tok.value: - chunk.append(tok) - - dirtokens = self.tokenstrip(x[i+1:]) - if dirtokens: - name = dirtokens[0].value - args = self.tokenstrip(dirtokens[1:]) - else: - name = "" - args = [] - - if name == 'define': - if enable: - for tok in self.expand_macros(chunk): - yield tok - chunk = [] - self.define(args) - elif name == 'include': - if enable: - for tok in self.expand_macros(chunk): - yield tok - chunk = [] - oldfile = self.macros['__FILE__'] - for tok in self.include(args): - yield tok - self.macros['__FILE__'] = oldfile - self.source = source - elif name == 'undef': - if enable: - for tok in self.expand_macros(chunk): - yield tok - chunk = [] - self.undef(args) - elif name == 'ifdef': - ifstack.append((enable,iftrigger)) - if enable: - if not args[0].value in self.macros: - enable = False - iftrigger = False - else: - iftrigger = True - elif name == 'ifndef': - ifstack.append((enable,iftrigger)) - if enable: - if args[0].value in self.macros: - enable = False - iftrigger = False - else: - iftrigger = True - elif name == 'if': - ifstack.append((enable,iftrigger)) - if enable: - result = self.evalexpr(args) - if not result: - enable = False - iftrigger = False - else: - iftrigger = True - elif name == 'elif': - if ifstack: - if ifstack[-1][0]: # We only pay attention if outer "if" allows this - if enable: # If already true, we flip enable False - enable = False - elif not iftrigger: # If False, but not triggered yet, we'll check expression - result = self.evalexpr(args) - if result: - enable = True - iftrigger = True - else: - self.error(self.source,dirtokens[0].lineno,"Misplaced #elif") - - elif name == 'else': - if ifstack: - if ifstack[-1][0]: - if enable: - enable = False - elif not iftrigger: - enable = True - iftrigger = True - else: - self.error(self.source,dirtokens[0].lineno,"Misplaced #else") - - elif name == 'endif': - if ifstack: - enable,iftrigger = ifstack.pop() - else: - self.error(self.source,dirtokens[0].lineno,"Misplaced #endif") - else: - # Unknown preprocessor directive - pass - - else: - # Normal text - if enable: - chunk.extend(x) - - for tok in self.expand_macros(chunk): - yield tok - chunk = [] - - # ---------------------------------------------------------------------- - # include() - # - # Implementation of file-inclusion - # ---------------------------------------------------------------------- - - def include(self,tokens): - # Try to extract the filename and then process an include file - if not tokens: - return - if tokens: - if tokens[0].value != '<' and tokens[0].type != self.t_STRING: - tokens = self.expand_macros(tokens) - - if tokens[0].value == '<': - # Include <...> - i = 1 - while i < len(tokens): - if tokens[i].value == '>': - break - i += 1 - else: - print("Malformed #include <...>") - return - filename = "".join([x.value for x in tokens[1:i]]) - path = self.path + [""] + self.temp_path - elif tokens[0].type == self.t_STRING: - filename = tokens[0].value[1:-1] - path = self.temp_path + [""] + self.path - else: - print("Malformed #include statement") - return - for p in path: - iname = os.path.join(p,filename) - try: - data = open(iname,"r").read() - dname = os.path.dirname(iname) - if dname: - self.temp_path.insert(0,dname) - for tok in self.parsegen(data,filename): - yield tok - if dname: - del self.temp_path[0] - break - except IOError: - pass - else: - print("Couldn't find '%s'" % filename) - - # ---------------------------------------------------------------------- - # define() - # - # Define a new macro - # ---------------------------------------------------------------------- - - def define(self,tokens): - if isinstance(tokens,(str,unicode)): - tokens = self.tokenize(tokens) - - linetok = tokens - try: - name = linetok[0] - if len(linetok) > 1: - mtype = linetok[1] - else: - mtype = None - if not mtype: - m = Macro(name.value,[]) - self.macros[name.value] = m - elif mtype.type in self.t_WS: - # A normal macro - m = Macro(name.value,self.tokenstrip(linetok[2:])) - self.macros[name.value] = m - elif mtype.value == '(': - # A macro with arguments - tokcount, args, positions = self.collect_args(linetok[1:]) - variadic = False - for a in args: - if variadic: - print("No more arguments may follow a variadic argument") - break - astr = "".join([str(_i.value) for _i in a]) - if astr == "...": - variadic = True - a[0].type = self.t_ID - a[0].value = '__VA_ARGS__' - variadic = True - del a[1:] - continue - elif astr[-3:] == "..." and a[0].type == self.t_ID: - variadic = True - del a[1:] - # If, for some reason, "." is part of the identifier, strip off the name for the purposes - # of macro expansion - if a[0].value[-3:] == '...': - a[0].value = a[0].value[:-3] - continue - if len(a) > 1 or a[0].type != self.t_ID: - print("Invalid macro argument") - break - else: - mvalue = self.tokenstrip(linetok[1+tokcount:]) - i = 0 - while i < len(mvalue): - if i+1 < len(mvalue): - if mvalue[i].type in self.t_WS and mvalue[i+1].value == '##': - del mvalue[i] - continue - elif mvalue[i].value == '##' and mvalue[i+1].type in self.t_WS: - del mvalue[i+1] - i += 1 - m = Macro(name.value,mvalue,[x[0].value for x in args],variadic) - self.macro_prescan(m) - self.macros[name.value] = m - else: - print("Bad macro definition") - except LookupError: - print("Bad macro definition") - - # ---------------------------------------------------------------------- - # undef() - # - # Undefine a macro - # ---------------------------------------------------------------------- - - def undef(self,tokens): - id = tokens[0].value - try: - del self.macros[id] - except LookupError: - pass - - # ---------------------------------------------------------------------- - # parse() - # - # Parse input text. - # ---------------------------------------------------------------------- - def parse(self,input,source=None,ignore={}): - self.ignore = ignore - self.parser = self.parsegen(input,source) - - # ---------------------------------------------------------------------- - # token() - # - # Method to return individual tokens - # ---------------------------------------------------------------------- - def token(self): - try: - while True: - tok = next(self.parser) - if tok.type not in self.ignore: return tok - except StopIteration: - self.parser = None - return None - -if __name__ == '__main__': - import ply.lex as lex - lexer = lex.lex() - - # Run a preprocessor - import sys - f = open(sys.argv[1]) - input = f.read() - - p = Preprocessor(lexer) - p.parse(input,sys.argv[1]) - while True: - tok = p.token() - if not tok: break - print(p.source, tok) - - - - - - - - - - - diff --git a/scripts/EnumIterator/ply/ctokens.py b/scripts/EnumIterator/ply/ctokens.py deleted file mode 100644 index f6f6952..0000000 --- a/scripts/EnumIterator/ply/ctokens.py +++ /dev/null @@ -1,133 +0,0 @@ -# ---------------------------------------------------------------------- -# ctokens.py -# -# Token specifications for symbols in ANSI C and C++. This file is -# meant to be used as a library in other tokenizers. -# ---------------------------------------------------------------------- - -# Reserved words - -tokens = [ - # Literals (identifier, integer constant, float constant, string constant, char const) - 'ID', 'TYPEID', 'INTEGER', 'FLOAT', 'STRING', 'CHARACTER', - - # Operators (+,-,*,/,%,|,&,~,^,<<,>>, ||, &&, !, <, <=, >, >=, ==, !=) - 'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'MODULO', - 'OR', 'AND', 'NOT', 'XOR', 'LSHIFT', 'RSHIFT', - 'LOR', 'LAND', 'LNOT', - 'LT', 'LE', 'GT', 'GE', 'EQ', 'NE', - - # Assignment (=, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |=) - 'EQUALS', 'TIMESEQUAL', 'DIVEQUAL', 'MODEQUAL', 'PLUSEQUAL', 'MINUSEQUAL', - 'LSHIFTEQUAL','RSHIFTEQUAL', 'ANDEQUAL', 'XOREQUAL', 'OREQUAL', - - # Increment/decrement (++,--) - 'INCREMENT', 'DECREMENT', - - # Structure dereference (->) - 'ARROW', - - # Ternary operator (?) - 'TERNARY', - - # Delimeters ( ) [ ] { } , . ; : - 'LPAREN', 'RPAREN', - 'LBRACKET', 'RBRACKET', - 'LBRACE', 'RBRACE', - 'COMMA', 'PERIOD', 'SEMI', 'COLON', - - # Ellipsis (...) - 'ELLIPSIS', -] - -# Operators -t_PLUS = r'\+' -t_MINUS = r'-' -t_TIMES = r'\*' -t_DIVIDE = r'/' -t_MODULO = r'%' -t_OR = r'\|' -t_AND = r'&' -t_NOT = r'~' -t_XOR = r'\^' -t_LSHIFT = r'<<' -t_RSHIFT = r'>>' -t_LOR = r'\|\|' -t_LAND = r'&&' -t_LNOT = r'!' -t_LT = r'<' -t_GT = r'>' -t_LE = r'<=' -t_GE = r'>=' -t_EQ = r'==' -t_NE = r'!=' - -# Assignment operators - -t_EQUALS = r'=' -t_TIMESEQUAL = r'\*=' -t_DIVEQUAL = r'/=' -t_MODEQUAL = r'%=' -t_PLUSEQUAL = r'\+=' -t_MINUSEQUAL = r'-=' -t_LSHIFTEQUAL = r'<<=' -t_RSHIFTEQUAL = r'>>=' -t_ANDEQUAL = r'&=' -t_OREQUAL = r'\|=' -t_XOREQUAL = r'\^=' - -# Increment/decrement -t_INCREMENT = r'\+\+' -t_DECREMENT = r'--' - -# -> -t_ARROW = r'->' - -# ? -t_TERNARY = r'\?' - -# Delimeters -t_LPAREN = r'\(' -t_RPAREN = r'\)' -t_LBRACKET = r'\[' -t_RBRACKET = r'\]' -t_LBRACE = r'\{' -t_RBRACE = r'\}' -t_COMMA = r',' -t_PERIOD = r'\.' -t_SEMI = r';' -t_COLON = r':' -t_ELLIPSIS = r'\.\.\.' - -# Identifiers -t_ID = r'[A-Za-z_][A-Za-z0-9_]*' - -# Integer literal -t_INTEGER = r'\d+([uU]|[lL]|[uU][lL]|[lL][uU])?' - -# Floating literal -t_FLOAT = r'((\d+)(\.\d+)(e(\+|-)?(\d+))? | (\d+)e(\+|-)?(\d+))([lL]|[fF])?' - -# String literal -t_STRING = r'\"([^\\\n]|(\\.))*?\"' - -# Character constant 'c' or L'c' -t_CHARACTER = r'(L)?\'([^\\\n]|(\\.))*?\'' - -# Comment (C-Style) -def t_COMMENT(t): - r'/\*(.|\n)*?\*/' - t.lexer.lineno += t.value.count('\n') - return t - -# Comment (C++-Style) -def t_CPPCOMMENT(t): - r'//.*\n' - t.lexer.lineno += 1 - return t - - - - - - diff --git a/scripts/EnumIterator/ply/lex.py b/scripts/EnumIterator/ply/lex.py deleted file mode 100644 index 3a40f62..0000000 --- a/scripts/EnumIterator/ply/lex.py +++ /dev/null @@ -1,1097 +0,0 @@ -# ----------------------------------------------------------------------------- -# ply: lex.py -# -# Copyright (C) 2001-2015, -# David M. Beazley (Dabeaz LLC) -# 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 David Beazley or Dabeaz LLC may be used to -# endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# ----------------------------------------------------------------------------- - -__version__ = '3.8' -__tabversion__ = '3.8' - -import re -import sys -import types -import copy -import os -import inspect - -# This tuple contains known string types -try: - # Python 2.6 - StringTypes = (types.StringType, types.UnicodeType) -except AttributeError: - # Python 3.0 - StringTypes = (str, bytes) - -# This regular expression is used to match valid token names -_is_identifier = re.compile(r'^[a-zA-Z0-9_]+$') - -# Exception thrown when invalid token encountered and no default error -# handler is defined. -class LexError(Exception): - def __init__(self, message, s): - self.args = (message,) - self.text = s - - -# Token class. This class is used to represent the tokens produced. -class LexToken(object): - def __str__(self): - return 'LexToken(%s,%r,%d,%d)' % (self.type, self.value, self.lineno, self.lexpos) - - def __repr__(self): - return str(self) - - -# This object is a stand-in for a logging object created by the -# logging module. - -class PlyLogger(object): - def __init__(self, f): - self.f = f - - def critical(self, msg, *args, **kwargs): - self.f.write((msg % args) + '\n') - - def warning(self, msg, *args, **kwargs): - self.f.write('WARNING: ' + (msg % args) + '\n') - - def error(self, msg, *args, **kwargs): - self.f.write('ERROR: ' + (msg % args) + '\n') - - info = critical - debug = critical - - -# Null logger is used when no output is generated. Does nothing. -class NullLogger(object): - def __getattribute__(self, name): - return self - - def __call__(self, *args, **kwargs): - return self - - -# ----------------------------------------------------------------------------- -# === Lexing Engine === -# -# The following Lexer class implements the lexer runtime. There are only -# a few public methods and attributes: -# -# input() - Store a new string in the lexer -# token() - Get the next token -# clone() - Clone the lexer -# -# lineno - Current line number -# lexpos - Current position in the input string -# ----------------------------------------------------------------------------- - -class Lexer: - def __init__(self): - self.lexre = None # Master regular expression. This is a list of - # tuples (re, findex) where re is a compiled - # regular expression and findex is a list - # mapping regex group numbers to rules - self.lexretext = None # Current regular expression strings - self.lexstatere = {} # Dictionary mapping lexer states to master regexs - self.lexstateretext = {} # Dictionary mapping lexer states to regex strings - self.lexstaterenames = {} # Dictionary mapping lexer states to symbol names - self.lexstate = 'INITIAL' # Current lexer state - self.lexstatestack = [] # Stack of lexer states - self.lexstateinfo = None # State information - self.lexstateignore = {} # Dictionary of ignored characters for each state - self.lexstateerrorf = {} # Dictionary of error functions for each state - self.lexstateeoff = {} # Dictionary of eof functions for each state - self.lexreflags = 0 # Optional re compile flags - self.lexdata = None # Actual input data (as a string) - self.lexpos = 0 # Current position in input text - self.lexlen = 0 # Length of the input text - self.lexerrorf = None # Error rule (if any) - self.lexeoff = None # EOF rule (if any) - self.lextokens = None # List of valid tokens - self.lexignore = '' # Ignored characters - self.lexliterals = '' # Literal characters that can be passed through - self.lexmodule = None # Module - self.lineno = 1 # Current line number - self.lexoptimize = False # Optimized mode - - def clone(self, object=None): - c = copy.copy(self) - - # If the object parameter has been supplied, it means we are attaching the - # lexer to a new object. In this case, we have to rebind all methods in - # the lexstatere and lexstateerrorf tables. - - if object: - newtab = {} - for key, ritem in self.lexstatere.items(): - newre = [] - for cre, findex in ritem: - newfindex = [] - for f in findex: - if not f or not f[0]: - newfindex.append(f) - continue - newfindex.append((getattr(object, f[0].__name__), f[1])) - newre.append((cre, newfindex)) - newtab[key] = newre - c.lexstatere = newtab - c.lexstateerrorf = {} - for key, ef in self.lexstateerrorf.items(): - c.lexstateerrorf[key] = getattr(object, ef.__name__) - c.lexmodule = object - return c - - # ------------------------------------------------------------ - # writetab() - Write lexer information to a table file - # ------------------------------------------------------------ - def writetab(self, lextab, outputdir=''): - if isinstance(lextab, types.ModuleType): - raise IOError("Won't overwrite existing lextab module") - basetabmodule = lextab.split('.')[-1] - filename = os.path.join(outputdir, basetabmodule) + '.py' - with open(filename, 'w') as tf: - tf.write('# %s.py. This file automatically created by PLY (version %s). Don\'t edit!\n' % (basetabmodule, __version__)) - tf.write('_tabversion = %s\n' % repr(__tabversion__)) - tf.write('_lextokens = %s\n' % repr(self.lextokens)) - tf.write('_lexreflags = %s\n' % repr(self.lexreflags)) - tf.write('_lexliterals = %s\n' % repr(self.lexliterals)) - tf.write('_lexstateinfo = %s\n' % repr(self.lexstateinfo)) - - # Rewrite the lexstatere table, replacing function objects with function names - tabre = {} - for statename, lre in self.lexstatere.items(): - titem = [] - for (pat, func), retext, renames in zip(lre, self.lexstateretext[statename], self.lexstaterenames[statename]): - titem.append((retext, _funcs_to_names(func, renames))) - tabre[statename] = titem - - tf.write('_lexstatere = %s\n' % repr(tabre)) - tf.write('_lexstateignore = %s\n' % repr(self.lexstateignore)) - - taberr = {} - for statename, ef in self.lexstateerrorf.items(): - taberr[statename] = ef.__name__ if ef else None - tf.write('_lexstateerrorf = %s\n' % repr(taberr)) - - tabeof = {} - for statename, ef in self.lexstateeoff.items(): - tabeof[statename] = ef.__name__ if ef else None - tf.write('_lexstateeoff = %s\n' % repr(tabeof)) - - # ------------------------------------------------------------ - # readtab() - Read lexer information from a tab file - # ------------------------------------------------------------ - def readtab(self, tabfile, fdict): - if isinstance(tabfile, types.ModuleType): - lextab = tabfile - else: - exec('import %s' % tabfile) - lextab = sys.modules[tabfile] - - if getattr(lextab, '_tabversion', '0.0') != __tabversion__: - raise ImportError('Inconsistent PLY version') - - self.lextokens = lextab._lextokens - self.lexreflags = lextab._lexreflags - self.lexliterals = lextab._lexliterals - self.lextokens_all = self.lextokens | set(self.lexliterals) - self.lexstateinfo = lextab._lexstateinfo - self.lexstateignore = lextab._lexstateignore - self.lexstatere = {} - self.lexstateretext = {} - for statename, lre in lextab._lexstatere.items(): - titem = [] - txtitem = [] - for pat, func_name in lre: - titem.append((re.compile(pat, lextab._lexreflags | re.VERBOSE), _names_to_funcs(func_name, fdict))) - - self.lexstatere[statename] = titem - self.lexstateretext[statename] = txtitem - - self.lexstateerrorf = {} - for statename, ef in lextab._lexstateerrorf.items(): - self.lexstateerrorf[statename] = fdict[ef] - - self.lexstateeoff = {} - for statename, ef in lextab._lexstateeoff.items(): - self.lexstateeoff[statename] = fdict[ef] - - self.begin('INITIAL') - - # ------------------------------------------------------------ - # input() - Push a new string into the lexer - # ------------------------------------------------------------ - def input(self, s): - # Pull off the first character to see if s looks like a string - c = s[:1] - if not isinstance(c, StringTypes): - raise ValueError('Expected a string') - self.lexdata = s - self.lexpos = 0 - self.lexlen = len(s) - - # ------------------------------------------------------------ - # begin() - Changes the lexing state - # ------------------------------------------------------------ - def begin(self, state): - if state not in self.lexstatere: - raise ValueError('Undefined state') - self.lexre = self.lexstatere[state] - self.lexretext = self.lexstateretext[state] - self.lexignore = self.lexstateignore.get(state, '') - self.lexerrorf = self.lexstateerrorf.get(state, None) - self.lexeoff = self.lexstateeoff.get(state, None) - self.lexstate = state - - # ------------------------------------------------------------ - # push_state() - Changes the lexing state and saves old on stack - # ------------------------------------------------------------ - def push_state(self, state): - self.lexstatestack.append(self.lexstate) - self.begin(state) - - # ------------------------------------------------------------ - # pop_state() - Restores the previous state - # ------------------------------------------------------------ - def pop_state(self): - self.begin(self.lexstatestack.pop()) - - # ------------------------------------------------------------ - # current_state() - Returns the current lexing state - # ------------------------------------------------------------ - def current_state(self): - return self.lexstate - - # ------------------------------------------------------------ - # skip() - Skip ahead n characters - # ------------------------------------------------------------ - def skip(self, n): - self.lexpos += n - - # ------------------------------------------------------------ - # opttoken() - Return the next token from the Lexer - # - # Note: This function has been carefully implemented to be as fast - # as possible. Don't make changes unless you really know what - # you are doing - # ------------------------------------------------------------ - def token(self): - # Make local copies of frequently referenced attributes - lexpos = self.lexpos - lexlen = self.lexlen - lexignore = self.lexignore - lexdata = self.lexdata - - while lexpos < lexlen: - # This code provides some short-circuit code for whitespace, tabs, and other ignored characters - if lexdata[lexpos] in lexignore: - lexpos += 1 - continue - - # Look for a regular expression match - for lexre, lexindexfunc in self.lexre: - m = lexre.match(lexdata, lexpos) - if not m: - continue - - # Create a token for return - tok = LexToken() - tok.value = m.group() - tok.lineno = self.lineno - tok.lexpos = lexpos - - i = m.lastindex - func, tok.type = lexindexfunc[i] - - if not func: - # If no token type was set, it's an ignored token - if tok.type: - self.lexpos = m.end() - return tok - else: - lexpos = m.end() - break - - lexpos = m.end() - - # If token is processed by a function, call it - - tok.lexer = self # Set additional attributes useful in token rules - self.lexmatch = m - self.lexpos = lexpos - - newtok = func(tok) - - # Every function must return a token, if nothing, we just move to next token - if not newtok: - lexpos = self.lexpos # This is here in case user has updated lexpos. - lexignore = self.lexignore # This is here in case there was a state change - break - - # Verify type of the token. If not in the token map, raise an error - if not self.lexoptimize: - if newtok.type not in self.lextokens_all: - raise LexError("%s:%d: Rule '%s' returned an unknown token type '%s'" % ( - func.__code__.co_filename, func.__code__.co_firstlineno, - func.__name__, newtok.type), lexdata[lexpos:]) - - return newtok - else: - # No match, see if in literals - if lexdata[lexpos] in self.lexliterals: - tok = LexToken() - tok.value = lexdata[lexpos] - tok.lineno = self.lineno - tok.type = tok.value - tok.lexpos = lexpos - self.lexpos = lexpos + 1 - return tok - - # No match. Call t_error() if defined. - if self.lexerrorf: - tok = LexToken() - tok.value = self.lexdata[lexpos:] - tok.lineno = self.lineno - tok.type = 'error' - tok.lexer = self - tok.lexpos = lexpos - self.lexpos = lexpos - newtok = self.lexerrorf(tok) - if lexpos == self.lexpos: - # Error method didn't change text position at all. This is an error. - raise LexError("Scanning error. Illegal character '%s'" % (lexdata[lexpos]), lexdata[lexpos:]) - lexpos = self.lexpos - if not newtok: - continue - return newtok - - self.lexpos = lexpos - raise LexError("Illegal character '%s' at index %d" % (lexdata[lexpos], lexpos), lexdata[lexpos:]) - - if self.lexeoff: - tok = LexToken() - tok.type = 'eof' - tok.value = '' - tok.lineno = self.lineno - tok.lexpos = lexpos - tok.lexer = self - self.lexpos = lexpos - newtok = self.lexeoff(tok) - return newtok - - self.lexpos = lexpos + 1 - if self.lexdata is None: - raise RuntimeError('No input string given with input()') - return None - - # Iterator interface - def __iter__(self): - return self - - def next(self): - t = self.token() - if t is None: - raise StopIteration - return t - - __next__ = next - -# ----------------------------------------------------------------------------- -# ==== Lex Builder === -# -# The functions and classes below are used to collect lexing information -# and build a Lexer object from it. -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# _get_regex(func) -# -# Returns the regular expression assigned to a function either as a doc string -# or as a .regex attribute attached by the @TOKEN decorator. -# ----------------------------------------------------------------------------- -def _get_regex(func): - return getattr(func, 'regex', func.__doc__) - -# ----------------------------------------------------------------------------- -# get_caller_module_dict() -# -# This function returns a dictionary containing all of the symbols defined within -# a caller further down the call stack. This is used to get the environment -# associated with the yacc() call if none was provided. -# ----------------------------------------------------------------------------- -def get_caller_module_dict(levels): - f = sys._getframe(levels) - ldict = f.f_globals.copy() - if f.f_globals != f.f_locals: - ldict.update(f.f_locals) - return ldict - -# ----------------------------------------------------------------------------- -# _funcs_to_names() -# -# Given a list of regular expression functions, this converts it to a list -# suitable for output to a table file -# ----------------------------------------------------------------------------- -def _funcs_to_names(funclist, namelist): - result = [] - for f, name in zip(funclist, namelist): - if f and f[0]: - result.append((name, f[1])) - else: - result.append(f) - return result - -# ----------------------------------------------------------------------------- -# _names_to_funcs() -# -# Given a list of regular expression function names, this converts it back to -# functions. -# ----------------------------------------------------------------------------- -def _names_to_funcs(namelist, fdict): - result = [] - for n in namelist: - if n and n[0]: - result.append((fdict[n[0]], n[1])) - else: - result.append(n) - return result - -# ----------------------------------------------------------------------------- -# _form_master_re() -# -# This function takes a list of all of the regex components and attempts to -# form the master regular expression. Given limitations in the Python re -# module, it may be necessary to break the master regex into separate expressions. -# ----------------------------------------------------------------------------- -def _form_master_re(relist, reflags, ldict, toknames): - if not relist: - return [] - regex = '|'.join(relist) - try: - lexre = re.compile(regex, re.VERBOSE | reflags) - - # Build the index to function map for the matching engine - lexindexfunc = [None] * (max(lexre.groupindex.values()) + 1) - lexindexnames = lexindexfunc[:] - - for f, i in lexre.groupindex.items(): - handle = ldict.get(f, None) - if type(handle) in (types.FunctionType, types.MethodType): - lexindexfunc[i] = (handle, toknames[f]) - lexindexnames[i] = f - elif handle is not None: - lexindexnames[i] = f - if f.find('ignore_') > 0: - lexindexfunc[i] = (None, None) - else: - lexindexfunc[i] = (None, toknames[f]) - - return [(lexre, lexindexfunc)], [regex], [lexindexnames] - except Exception: - m = int(len(relist)/2) - if m == 0: - m = 1 - llist, lre, lnames = _form_master_re(relist[:m], reflags, ldict, toknames) - rlist, rre, rnames = _form_master_re(relist[m:], reflags, ldict, toknames) - return (llist+rlist), (lre+rre), (lnames+rnames) - -# ----------------------------------------------------------------------------- -# def _statetoken(s,names) -# -# Given a declaration name s of the form "t_" and a dictionary whose keys are -# state names, this function returns a tuple (states,tokenname) where states -# is a tuple of state names and tokenname is the name of the token. For example, -# calling this with s = "t_foo_bar_SPAM" might return (('foo','bar'),'SPAM') -# ----------------------------------------------------------------------------- -def _statetoken(s, names): - nonstate = 1 - parts = s.split('_') - for i, part in enumerate(parts[1:], 1): - if part not in names and part != 'ANY': - break - - if i > 1: - states = tuple(parts[1:i]) - else: - states = ('INITIAL',) - - if 'ANY' in states: - states = tuple(names) - - tokenname = '_'.join(parts[i:]) - return (states, tokenname) - - -# ----------------------------------------------------------------------------- -# LexerReflect() -# -# This class represents information needed to build a lexer as extracted from a -# user's input file. -# ----------------------------------------------------------------------------- -class LexerReflect(object): - def __init__(self, ldict, log=None, reflags=0): - self.ldict = ldict - self.error_func = None - self.tokens = [] - self.reflags = reflags - self.stateinfo = {'INITIAL': 'inclusive'} - self.modules = set() - self.error = False - self.log = PlyLogger(sys.stderr) if log is None else log - - # Get all of the basic information - def get_all(self): - self.get_tokens() - self.get_literals() - self.get_states() - self.get_rules() - - # Validate all of the information - def validate_all(self): - self.validate_tokens() - self.validate_literals() - self.validate_rules() - return self.error - - # Get the tokens map - def get_tokens(self): - tokens = self.ldict.get('tokens', None) - if not tokens: - self.log.error('No token list is defined') - self.error = True - return - - if not isinstance(tokens, (list, tuple)): - self.log.error('tokens must be a list or tuple') - self.error = True - return - - if not tokens: - self.log.error('tokens is empty') - self.error = True - return - - self.tokens = tokens - - # Validate the tokens - def validate_tokens(self): - terminals = {} - for n in self.tokens: - if not _is_identifier.match(n): - self.log.error("Bad token name '%s'", n) - self.error = True - if n in terminals: - self.log.warning("Token '%s' multiply defined", n) - terminals[n] = 1 - - # Get the literals specifier - def get_literals(self): - self.literals = self.ldict.get('literals', '') - if not self.literals: - self.literals = '' - - # Validate literals - def validate_literals(self): - try: - for c in self.literals: - if not isinstance(c, StringTypes) or len(c) > 1: - self.log.error('Invalid literal %s. Must be a single character', repr(c)) - self.error = True - - except TypeError: - self.log.error('Invalid literals specification. literals must be a sequence of characters') - self.error = True - - def get_states(self): - self.states = self.ldict.get('states', None) - # Build statemap - if self.states: - if not isinstance(self.states, (tuple, list)): - self.log.error('states must be defined as a tuple or list') - self.error = True - else: - for s in self.states: - if not isinstance(s, tuple) or len(s) != 2: - self.log.error("Invalid state specifier %s. Must be a tuple (statename,'exclusive|inclusive')", repr(s)) - self.error = True - continue - name, statetype = s - if not isinstance(name, StringTypes): - self.log.error('State name %s must be a string', repr(name)) - self.error = True - continue - if not (statetype == 'inclusive' or statetype == 'exclusive'): - self.log.error("State type for state %s must be 'inclusive' or 'exclusive'", name) - self.error = True - continue - if name in self.stateinfo: - self.log.error("State '%s' already defined", name) - self.error = True - continue - self.stateinfo[name] = statetype - - # Get all of the symbols with a t_ prefix and sort them into various - # categories (functions, strings, error functions, and ignore characters) - - def get_rules(self): - tsymbols = [f for f in self.ldict if f[:2] == 't_'] - - # Now build up a list of functions and a list of strings - self.toknames = {} # Mapping of symbols to token names - self.funcsym = {} # Symbols defined as functions - self.strsym = {} # Symbols defined as strings - self.ignore = {} # Ignore strings by state - self.errorf = {} # Error functions by state - self.eoff = {} # EOF functions by state - - for s in self.stateinfo: - self.funcsym[s] = [] - self.strsym[s] = [] - - if len(tsymbols) == 0: - self.log.error('No rules of the form t_rulename are defined') - self.error = True - return - - for f in tsymbols: - t = self.ldict[f] - states, tokname = _statetoken(f, self.stateinfo) - self.toknames[f] = tokname - - if hasattr(t, '__call__'): - if tokname == 'error': - for s in states: - self.errorf[s] = t - elif tokname == 'eof': - for s in states: - self.eoff[s] = t - elif tokname == 'ignore': - line = t.__code__.co_firstlineno - file = t.__code__.co_filename - self.log.error("%s:%d: Rule '%s' must be defined as a string", file, line, t.__name__) - self.error = True - else: - for s in states: - self.funcsym[s].append((f, t)) - elif isinstance(t, StringTypes): - if tokname == 'ignore': - for s in states: - self.ignore[s] = t - if '\\' in t: - self.log.warning("%s contains a literal backslash '\\'", f) - - elif tokname == 'error': - self.log.error("Rule '%s' must be defined as a function", f) - self.error = True - else: - for s in states: - self.strsym[s].append((f, t)) - else: - self.log.error('%s not defined as a function or string', f) - self.error = True - - # Sort the functions by line number - for f in self.funcsym.values(): - f.sort(key=lambda x: x[1].__code__.co_firstlineno) - - # Sort the strings by regular expression length - for s in self.strsym.values(): - s.sort(key=lambda x: len(x[1]), reverse=True) - - # Validate all of the t_rules collected - def validate_rules(self): - for state in self.stateinfo: - # Validate all rules defined by functions - - for fname, f in self.funcsym[state]: - line = f.__code__.co_firstlineno - file = f.__code__.co_filename - module = inspect.getmodule(f) - self.modules.add(module) - - tokname = self.toknames[fname] - if isinstance(f, types.MethodType): - reqargs = 2 - else: - reqargs = 1 - nargs = f.__code__.co_argcount - if nargs > reqargs: - self.log.error("%s:%d: Rule '%s' has too many arguments", file, line, f.__name__) - self.error = True - continue - - if nargs < reqargs: - self.log.error("%s:%d: Rule '%s' requires an argument", file, line, f.__name__) - self.error = True - continue - - if not _get_regex(f): - self.log.error("%s:%d: No regular expression defined for rule '%s'", file, line, f.__name__) - self.error = True - continue - - try: - c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), re.VERBOSE | self.reflags) - if c.match(''): - self.log.error("%s:%d: Regular expression for rule '%s' matches empty string", file, line, f.__name__) - self.error = True - except re.error as e: - self.log.error("%s:%d: Invalid regular expression for rule '%s'. %s", file, line, f.__name__, e) - if '#' in _get_regex(f): - self.log.error("%s:%d. Make sure '#' in rule '%s' is escaped with '\\#'", file, line, f.__name__) - self.error = True - - # Validate all rules defined by strings - for name, r in self.strsym[state]: - tokname = self.toknames[name] - if tokname == 'error': - self.log.error("Rule '%s' must be defined as a function", name) - self.error = True - continue - - if tokname not in self.tokens and tokname.find('ignore_') < 0: - self.log.error("Rule '%s' defined for an unspecified token %s", name, tokname) - self.error = True - continue - - try: - c = re.compile('(?P<%s>%s)' % (name, r), re.VERBOSE | self.reflags) - if (c.match('')): - self.log.error("Regular expression for rule '%s' matches empty string", name) - self.error = True - except re.error as e: - self.log.error("Invalid regular expression for rule '%s'. %s", name, e) - if '#' in r: - self.log.error("Make sure '#' in rule '%s' is escaped with '\\#'", name) - self.error = True - - if not self.funcsym[state] and not self.strsym[state]: - self.log.error("No rules defined for state '%s'", state) - self.error = True - - # Validate the error function - efunc = self.errorf.get(state, None) - if efunc: - f = efunc - line = f.__code__.co_firstlineno - file = f.__code__.co_filename - module = inspect.getmodule(f) - self.modules.add(module) - - if isinstance(f, types.MethodType): - reqargs = 2 - else: - reqargs = 1 - nargs = f.__code__.co_argcount - if nargs > reqargs: - self.log.error("%s:%d: Rule '%s' has too many arguments", file, line, f.__name__) - self.error = True - - if nargs < reqargs: - self.log.error("%s:%d: Rule '%s' requires an argument", file, line, f.__name__) - self.error = True - - for module in self.modules: - self.validate_module(module) - - # ----------------------------------------------------------------------------- - # validate_module() - # - # This checks to see if there are duplicated t_rulename() functions or strings - # in the parser input file. This is done using a simple regular expression - # match on each line in the source code of the given module. - # ----------------------------------------------------------------------------- - - def validate_module(self, module): - lines, linen = inspect.getsourcelines(module) - - fre = re.compile(r'\s*def\s+(t_[a-zA-Z_0-9]*)\(') - sre = re.compile(r'\s*(t_[a-zA-Z_0-9]*)\s*=') - - counthash = {} - linen += 1 - for line in lines: - m = fre.match(line) - if not m: - m = sre.match(line) - if m: - name = m.group(1) - prev = counthash.get(name) - if not prev: - counthash[name] = linen - else: - filename = inspect.getsourcefile(module) - self.log.error('%s:%d: Rule %s redefined. Previously defined on line %d', filename, linen, name, prev) - self.error = True - linen += 1 - -# ----------------------------------------------------------------------------- -# lex(module) -# -# Build all of the regular expression rules from definitions in the supplied module -# ----------------------------------------------------------------------------- -def lex(module=None, object=None, debug=False, optimize=False, lextab='lextab', - reflags=0, nowarn=False, outputdir=None, debuglog=None, errorlog=None): - - if lextab is None: - lextab = 'lextab' - - global lexer - - ldict = None - stateinfo = {'INITIAL': 'inclusive'} - lexobj = Lexer() - lexobj.lexoptimize = optimize - global token, input - - if errorlog is None: - errorlog = PlyLogger(sys.stderr) - - if debug: - if debuglog is None: - debuglog = PlyLogger(sys.stderr) - - # Get the module dictionary used for the lexer - if object: - module = object - - # Get the module dictionary used for the parser - if module: - _items = [(k, getattr(module, k)) for k in dir(module)] - ldict = dict(_items) - # If no __file__ attribute is available, try to obtain it from the __module__ instead - if '__file__' not in ldict: - ldict['__file__'] = sys.modules[ldict['__module__']].__file__ - else: - ldict = get_caller_module_dict(2) - - # Determine if the module is package of a package or not. - # If so, fix the tabmodule setting so that tables load correctly - pkg = ldict.get('__package__') - if pkg and isinstance(lextab, str): - if '.' not in lextab: - lextab = pkg + '.' + lextab - - # Collect parser information from the dictionary - linfo = LexerReflect(ldict, log=errorlog, reflags=reflags) - linfo.get_all() - if not optimize: - if linfo.validate_all(): - raise SyntaxError("Can't build lexer") - - if optimize and lextab: - try: - lexobj.readtab(lextab, ldict) - token = lexobj.token - input = lexobj.input - lexer = lexobj - return lexobj - - except ImportError: - pass - - # Dump some basic debugging information - if debug: - debuglog.info('lex: tokens = %r', linfo.tokens) - debuglog.info('lex: literals = %r', linfo.literals) - debuglog.info('lex: states = %r', linfo.stateinfo) - - # Build a dictionary of valid token names - lexobj.lextokens = set() - for n in linfo.tokens: - lexobj.lextokens.add(n) - - # Get literals specification - if isinstance(linfo.literals, (list, tuple)): - lexobj.lexliterals = type(linfo.literals[0])().join(linfo.literals) - else: - lexobj.lexliterals = linfo.literals - - lexobj.lextokens_all = lexobj.lextokens | set(lexobj.lexliterals) - - # Get the stateinfo dictionary - stateinfo = linfo.stateinfo - - regexs = {} - # Build the master regular expressions - for state in stateinfo: - regex_list = [] - - # Add rules defined by functions first - for fname, f in linfo.funcsym[state]: - line = f.__code__.co_firstlineno - file = f.__code__.co_filename - regex_list.append('(?P<%s>%s)' % (fname, _get_regex(f))) - if debug: - debuglog.info("lex: Adding rule %s -> '%s' (state '%s')", fname, _get_regex(f), state) - - # Now add all of the simple rules - for name, r in linfo.strsym[state]: - regex_list.append('(?P<%s>%s)' % (name, r)) - if debug: - debuglog.info("lex: Adding rule %s -> '%s' (state '%s')", name, r, state) - - regexs[state] = regex_list - - # Build the master regular expressions - - if debug: - debuglog.info('lex: ==== MASTER REGEXS FOLLOW ====') - - for state in regexs: - lexre, re_text, re_names = _form_master_re(regexs[state], reflags, ldict, linfo.toknames) - lexobj.lexstatere[state] = lexre - lexobj.lexstateretext[state] = re_text - lexobj.lexstaterenames[state] = re_names - if debug: - for i, text in enumerate(re_text): - debuglog.info("lex: state '%s' : regex[%d] = '%s'", state, i, text) - - # For inclusive states, we need to add the regular expressions from the INITIAL state - for state, stype in stateinfo.items(): - if state != 'INITIAL' and stype == 'inclusive': - lexobj.lexstatere[state].extend(lexobj.lexstatere['INITIAL']) - lexobj.lexstateretext[state].extend(lexobj.lexstateretext['INITIAL']) - lexobj.lexstaterenames[state].extend(lexobj.lexstaterenames['INITIAL']) - - lexobj.lexstateinfo = stateinfo - lexobj.lexre = lexobj.lexstatere['INITIAL'] - lexobj.lexretext = lexobj.lexstateretext['INITIAL'] - lexobj.lexreflags = reflags - - # Set up ignore variables - lexobj.lexstateignore = linfo.ignore - lexobj.lexignore = lexobj.lexstateignore.get('INITIAL', '') - - # Set up error functions - lexobj.lexstateerrorf = linfo.errorf - lexobj.lexerrorf = linfo.errorf.get('INITIAL', None) - if not lexobj.lexerrorf: - errorlog.warning('No t_error rule is defined') - - # Set up eof functions - lexobj.lexstateeoff = linfo.eoff - lexobj.lexeoff = linfo.eoff.get('INITIAL', None) - - # Check state information for ignore and error rules - for s, stype in stateinfo.items(): - if stype == 'exclusive': - if s not in linfo.errorf: - errorlog.warning("No error rule is defined for exclusive state '%s'", s) - if s not in linfo.ignore and lexobj.lexignore: - errorlog.warning("No ignore rule is defined for exclusive state '%s'", s) - elif stype == 'inclusive': - if s not in linfo.errorf: - linfo.errorf[s] = linfo.errorf.get('INITIAL', None) - if s not in linfo.ignore: - linfo.ignore[s] = linfo.ignore.get('INITIAL', '') - - # Create global versions of the token() and input() functions - token = lexobj.token - input = lexobj.input - lexer = lexobj - - # If in optimize mode, we write the lextab - if lextab and optimize: - if outputdir is None: - # If no output directory is set, the location of the output files - # is determined according to the following rules: - # - If lextab specifies a package, files go into that package directory - # - Otherwise, files go in the same directory as the specifying module - if isinstance(lextab, types.ModuleType): - srcfile = lextab.__file__ - else: - if '.' not in lextab: - srcfile = ldict['__file__'] - else: - parts = lextab.split('.') - pkgname = '.'.join(parts[:-1]) - exec('import %s' % pkgname) - srcfile = getattr(sys.modules[pkgname], '__file__', '') - outputdir = os.path.dirname(srcfile) - try: - lexobj.writetab(lextab, outputdir) - except IOError as e: - errorlog.warning("Couldn't write lextab module %r. %s" % (lextab, e)) - - return lexobj - -# ----------------------------------------------------------------------------- -# runmain() -# -# This runs the lexer as a main program -# ----------------------------------------------------------------------------- - -def runmain(lexer=None, data=None): - if not data: - try: - filename = sys.argv[1] - f = open(filename) - data = f.read() - f.close() - except IndexError: - sys.stdout.write('Reading from standard input (type EOF to end):\n') - data = sys.stdin.read() - - if lexer: - _input = lexer.input - else: - _input = input - _input(data) - if lexer: - _token = lexer.token - else: - _token = token - - while True: - tok = _token() - if not tok: - break - sys.stdout.write('(%s,%r,%d,%d)\n' % (tok.type, tok.value, tok.lineno, tok.lexpos)) - -# ----------------------------------------------------------------------------- -# @TOKEN(regex) -# -# This decorator function can be used to set the regex expression on a function -# when its docstring might need to be set in an alternative way -# ----------------------------------------------------------------------------- - -def TOKEN(r): - def set_regex(f): - if hasattr(r, '__call__'): - f.regex = _get_regex(r) - else: - f.regex = r - return f - return set_regex - -# Alternative spelling of the TOKEN decorator -Token = TOKEN - diff --git a/scripts/EnumIterator/ply/yacc.py b/scripts/EnumIterator/ply/yacc.py deleted file mode 100644 index e7f36aa..0000000 --- a/scripts/EnumIterator/ply/yacc.py +++ /dev/null @@ -1,3471 +0,0 @@ -# ----------------------------------------------------------------------------- -# ply: yacc.py -# -# Copyright (C) 2001-2015, -# David M. Beazley (Dabeaz LLC) -# 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 David Beazley or Dabeaz LLC may be used to -# endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# ----------------------------------------------------------------------------- -# -# This implements an LR parser that is constructed from grammar rules defined -# as Python functions. The grammer is specified by supplying the BNF inside -# Python documentation strings. The inspiration for this technique was borrowed -# from John Aycock's Spark parsing system. PLY might be viewed as cross between -# Spark and the GNU bison utility. -# -# The current implementation is only somewhat object-oriented. The -# LR parser itself is defined in terms of an object (which allows multiple -# parsers to co-exist). However, most of the variables used during table -# construction are defined in terms of global variables. Users shouldn't -# notice unless they are trying to define multiple parsers at the same -# time using threads (in which case they should have their head examined). -# -# This implementation supports both SLR and LALR(1) parsing. LALR(1) -# support was originally implemented by Elias Ioup (ezioup@alumni.uchicago.edu), -# using the algorithm found in Aho, Sethi, and Ullman "Compilers: Principles, -# Techniques, and Tools" (The Dragon Book). LALR(1) has since been replaced -# by the more efficient DeRemer and Pennello algorithm. -# -# :::::::: WARNING ::::::: -# -# Construction of LR parsing tables is fairly complicated and expensive. -# To make this module run fast, a *LOT* of work has been put into -# optimization---often at the expensive of readability and what might -# consider to be good Python "coding style." Modify the code at your -# own risk! -# ---------------------------------------------------------------------------- - -import re -import types -import sys -import os.path -import inspect -import base64 -import warnings - -__version__ = '3.8' -__tabversion__ = '3.8' - -#----------------------------------------------------------------------------- -# === User configurable parameters === -# -# Change these to modify the default behavior of yacc (if you wish) -#----------------------------------------------------------------------------- - -yaccdebug = True # Debugging mode. If set, yacc generates a - # a 'parser.out' file in the current directory - -debug_file = 'parser.out' # Default name of the debugging file -tab_module = 'parsetab' # Default name of the table module -default_lr = 'LALR' # Default LR table generation method - -error_count = 3 # Number of symbols that must be shifted to leave recovery mode - -yaccdevel = False # Set to True if developing yacc. This turns off optimized - # implementations of certain functions. - -resultlimit = 40 # Size limit of results when running in debug mode. - -pickle_protocol = 0 # Protocol to use when writing pickle files - -# String type-checking compatibility -if sys.version_info[0] < 3: - string_types = basestring -else: - string_types = str - -MAXINT = sys.maxsize - -# This object is a stand-in for a logging object created by the -# logging module. PLY will use this by default to create things -# such as the parser.out file. If a user wants more detailed -# information, they can create their own logging object and pass -# it into PLY. - -class PlyLogger(object): - def __init__(self, f): - self.f = f - - def debug(self, msg, *args, **kwargs): - self.f.write((msg % args) + '\n') - - info = debug - - def warning(self, msg, *args, **kwargs): - self.f.write('WARNING: ' + (msg % args) + '\n') - - def error(self, msg, *args, **kwargs): - self.f.write('ERROR: ' + (msg % args) + '\n') - - critical = debug - -# Null logger is used when no output is generated. Does nothing. -class NullLogger(object): - def __getattribute__(self, name): - return self - - def __call__(self, *args, **kwargs): - return self - -# Exception raised for yacc-related errors -class YaccError(Exception): - pass - -# Format the result message that the parser produces when running in debug mode. -def format_result(r): - repr_str = repr(r) - if '\n' in repr_str: - repr_str = repr(repr_str) - if len(repr_str) > resultlimit: - repr_str = repr_str[:resultlimit] + ' ...' - result = '<%s @ 0x%x> (%s)' % (type(r).__name__, id(r), repr_str) - return result - -# Format stack entries when the parser is running in debug mode -def format_stack_entry(r): - repr_str = repr(r) - if '\n' in repr_str: - repr_str = repr(repr_str) - if len(repr_str) < 16: - return repr_str - else: - return '<%s @ 0x%x>' % (type(r).__name__, id(r)) - -# Panic mode error recovery support. This feature is being reworked--much of the -# code here is to offer a deprecation/backwards compatible transition - -_errok = None -_token = None -_restart = None -_warnmsg = '''PLY: Don't use global functions errok(), token(), and restart() in p_error(). -Instead, invoke the methods on the associated parser instance: - - def p_error(p): - ... - # Use parser.errok(), parser.token(), parser.restart() - ... - - parser = yacc.yacc() -''' - -def errok(): - warnings.warn(_warnmsg) - return _errok() - -def restart(): - warnings.warn(_warnmsg) - return _restart() - -def token(): - warnings.warn(_warnmsg) - return _token() - -# Utility function to call the p_error() function with some deprecation hacks -def call_errorfunc(errorfunc, token, parser): - global _errok, _token, _restart - _errok = parser.errok - _token = parser.token - _restart = parser.restart - r = errorfunc(token) - try: - del _errok, _token, _restart - except NameError: - pass - return r - -#----------------------------------------------------------------------------- -# === LR Parsing Engine === -# -# The following classes are used for the LR parser itself. These are not -# used during table construction and are independent of the actual LR -# table generation algorithm -#----------------------------------------------------------------------------- - -# This class is used to hold non-terminal grammar symbols during parsing. -# It normally has the following attributes set: -# .type = Grammar symbol type -# .value = Symbol value -# .lineno = Starting line number -# .endlineno = Ending line number (optional, set automatically) -# .lexpos = Starting lex position -# .endlexpos = Ending lex position (optional, set automatically) - -class YaccSymbol: - def __str__(self): - return self.type - - def __repr__(self): - return str(self) - -# This class is a wrapper around the objects actually passed to each -# grammar rule. Index lookup and assignment actually assign the -# .value attribute of the underlying YaccSymbol object. -# The lineno() method returns the line number of a given -# item (or 0 if not defined). The linespan() method returns -# a tuple of (startline,endline) representing the range of lines -# for a symbol. The lexspan() method returns a tuple (lexpos,endlexpos) -# representing the range of positional information for a symbol. - -class YaccProduction: - def __init__(self, s, stack=None): - self.slice = s - self.stack = stack - self.lexer = None - self.parser = None - - def __getitem__(self, n): - if isinstance(n, slice): - return [s.value for s in self.slice[n]] - elif n >= 0: - return self.slice[n].value - else: - return self.stack[n].value - - def __setitem__(self, n, v): - self.slice[n].value = v - - def __getslice__(self, i, j): - return [s.value for s in self.slice[i:j]] - - def __len__(self): - return len(self.slice) - - def lineno(self, n): - return getattr(self.slice[n], 'lineno', 0) - - def set_lineno(self, n, lineno): - self.slice[n].lineno = lineno - - def linespan(self, n): - startline = getattr(self.slice[n], 'lineno', 0) - endline = getattr(self.slice[n], 'endlineno', startline) - return startline, endline - - def lexpos(self, n): - return getattr(self.slice[n], 'lexpos', 0) - - def lexspan(self, n): - startpos = getattr(self.slice[n], 'lexpos', 0) - endpos = getattr(self.slice[n], 'endlexpos', startpos) - return startpos, endpos - - def error(self): - raise SyntaxError - -# ----------------------------------------------------------------------------- -# == LRParser == -# -# The LR Parsing engine. -# ----------------------------------------------------------------------------- - -class LRParser: - def __init__(self, lrtab, errorf): - self.productions = lrtab.lr_productions - self.action = lrtab.lr_action - self.goto = lrtab.lr_goto - self.errorfunc = errorf - self.set_defaulted_states() - self.errorok = True - - def errok(self): - self.errorok = True - - def restart(self): - del self.statestack[:] - del self.symstack[:] - sym = YaccSymbol() - sym.type = '$end' - self.symstack.append(sym) - self.statestack.append(0) - - # Defaulted state support. - # This method identifies parser states where there is only one possible reduction action. - # For such states, the parser can make a choose to make a rule reduction without consuming - # the next look-ahead token. This delayed invocation of the tokenizer can be useful in - # certain kinds of advanced parsing situations where the lexer and parser interact with - # each other or change states (i.e., manipulation of scope, lexer states, etc.). - # - # See: http://www.gnu.org/software/bison/manual/html_node/Default-Reductions.html#Default-Reductions - def set_defaulted_states(self): - self.defaulted_states = {} - for state, actions in self.action.items(): - rules = list(actions.values()) - if len(rules) == 1 and rules[0] < 0: - self.defaulted_states[state] = rules[0] - - def disable_defaulted_states(self): - self.defaulted_states = {} - - def parse(self, input=None, lexer=None, debug=False, tracking=False, tokenfunc=None): - if debug or yaccdevel: - if isinstance(debug, int): - debug = PlyLogger(sys.stderr) - return self.parsedebug(input, lexer, debug, tracking, tokenfunc) - elif tracking: - return self.parseopt(input, lexer, debug, tracking, tokenfunc) - else: - return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc) - - - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # parsedebug(). - # - # This is the debugging enabled version of parse(). All changes made to the - # parsing engine should be made here. Optimized versions of this function - # are automatically created by the ply/ygen.py script. This script cuts out - # sections enclosed in markers such as this: - # - # #--! DEBUG - # statements - # #--! DEBUG - # - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - def parsedebug(self, input=None, lexer=None, debug=False, tracking=False, tokenfunc=None): - #--! parsedebug-start - lookahead = None # Current lookahead symbol - lookaheadstack = [] # Stack of lookahead symbols - actions = self.action # Local reference to action table (to avoid lookup on self.) - goto = self.goto # Local reference to goto table (to avoid lookup on self.) - prod = self.productions # Local reference to production list (to avoid lookup on self.) - defaulted_states = self.defaulted_states # Local reference to defaulted states - pslice = YaccProduction(None) # Production object passed to grammar rules - errorcount = 0 # Used during error recovery - - #--! DEBUG - debug.info('PLY: PARSE DEBUG START') - #--! DEBUG - - # If no lexer was given, we will try to use the lex module - if not lexer: - from . import lex - lexer = lex.lexer - - # Set up the lexer and parser objects on pslice - pslice.lexer = lexer - pslice.parser = self - - # If input was supplied, pass to lexer - if input is not None: - lexer.input(input) - - if tokenfunc is None: - # Tokenize function - get_token = lexer.token - else: - get_token = tokenfunc - - # Set the parser() token method (sometimes used in error recovery) - self.token = get_token - - # Set up the state and symbol stacks - - statestack = [] # Stack of parsing states - self.statestack = statestack - symstack = [] # Stack of grammar symbols - self.symstack = symstack - - pslice.stack = symstack # Put in the production - errtoken = None # Err token - - # The start state is assumed to be (0,$end) - - statestack.append(0) - sym = YaccSymbol() - sym.type = '$end' - symstack.append(sym) - state = 0 - while True: - # Get the next symbol on the input. If a lookahead symbol - # is already set, we just use that. Otherwise, we'll pull - # the next token off of the lookaheadstack or from the lexer - - #--! DEBUG - debug.debug('') - debug.debug('State : %s', state) - #--! DEBUG - - if state not in defaulted_states: - if not lookahead: - if not lookaheadstack: - lookahead = get_token() # Get the next token - else: - lookahead = lookaheadstack.pop() - if not lookahead: - lookahead = YaccSymbol() - lookahead.type = '$end' - - # Check the action table - ltype = lookahead.type - t = actions[state].get(ltype) - else: - t = defaulted_states[state] - #--! DEBUG - debug.debug('Defaulted state %s: Reduce using %d', state, -t) - #--! DEBUG - - #--! DEBUG - debug.debug('Stack : %s', - ('%s . %s' % (' '.join([xx.type for xx in symstack][1:]), str(lookahead))).lstrip()) - #--! DEBUG - - if t is not None: - if t > 0: - # shift a symbol on the stack - statestack.append(t) - state = t - - #--! DEBUG - debug.debug('Action : Shift and goto state %s', t) - #--! DEBUG - - symstack.append(lookahead) - lookahead = None - - # Decrease error count on successful shift - if errorcount: - errorcount -= 1 - continue - - if t < 0: - # reduce a symbol on the stack, emit a production - p = prod[-t] - pname = p.name - plen = p.len - - # Get production function - sym = YaccSymbol() - sym.type = pname # Production name - sym.value = None - - #--! DEBUG - if plen: - debug.info('Action : Reduce rule [%s] with %s and goto state %d', p.str, - '['+','.join([format_stack_entry(_v.value) for _v in symstack[-plen:]])+']', - goto[statestack[-1-plen]][pname]) - else: - debug.info('Action : Reduce rule [%s] with %s and goto state %d', p.str, [], - goto[statestack[-1]][pname]) - - #--! DEBUG - - if plen: - targ = symstack[-plen-1:] - targ[0] = sym - - #--! TRACKING - if tracking: - t1 = targ[1] - sym.lineno = t1.lineno - sym.lexpos = t1.lexpos - t1 = targ[-1] - sym.endlineno = getattr(t1, 'endlineno', t1.lineno) - sym.endlexpos = getattr(t1, 'endlexpos', t1.lexpos) - #--! TRACKING - - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # The code enclosed in this section is duplicated - # below as a performance optimization. Make sure - # changes get made in both locations. - - pslice.slice = targ - - try: - # Call the grammar rule with our special slice object - del symstack[-plen:] - del statestack[-plen:] - p.callable(pslice) - #--! DEBUG - debug.info('Result : %s', format_result(pslice[0])) - #--! DEBUG - symstack.append(sym) - state = goto[statestack[-1]][pname] - statestack.append(state) - except SyntaxError: - # If an error was set. Enter error recovery state - lookaheadstack.append(lookahead) - symstack.pop() - statestack.pop() - state = statestack[-1] - sym.type = 'error' - lookahead = sym - errorcount = error_count - self.errorok = False - continue - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - else: - - #--! TRACKING - if tracking: - sym.lineno = lexer.lineno - sym.lexpos = lexer.lexpos - #--! TRACKING - - targ = [sym] - - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # The code enclosed in this section is duplicated - # above as a performance optimization. Make sure - # changes get made in both locations. - - pslice.slice = targ - - try: - # Call the grammar rule with our special slice object - p.callable(pslice) - #--! DEBUG - debug.info('Result : %s', format_result(pslice[0])) - #--! DEBUG - symstack.append(sym) - state = goto[statestack[-1]][pname] - statestack.append(state) - except SyntaxError: - # If an error was set. Enter error recovery state - lookaheadstack.append(lookahead) - symstack.pop() - statestack.pop() - state = statestack[-1] - sym.type = 'error' - lookahead = sym - errorcount = error_count - self.errorok = False - continue - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - if t == 0: - n = symstack[-1] - result = getattr(n, 'value', None) - #--! DEBUG - debug.info('Done : Returning %s', format_result(result)) - debug.info('PLY: PARSE DEBUG END') - #--! DEBUG - return result - - if t is None: - - #--! DEBUG - debug.error('Error : %s', - ('%s . %s' % (' '.join([xx.type for xx in symstack][1:]), str(lookahead))).lstrip()) - #--! DEBUG - - # We have some kind of parsing error here. To handle - # this, we are going to push the current token onto - # the tokenstack and replace it with an 'error' token. - # If there are any synchronization rules, they may - # catch it. - # - # In addition to pushing the error token, we call call - # the user defined p_error() function if this is the - # first syntax error. This function is only called if - # errorcount == 0. - if errorcount == 0 or self.errorok: - errorcount = error_count - self.errorok = False - errtoken = lookahead - if errtoken.type == '$end': - errtoken = None # End of file! - if self.errorfunc: - if errtoken and not hasattr(errtoken, 'lexer'): - errtoken.lexer = lexer - tok = call_errorfunc(self.errorfunc, errtoken, self) - if self.errorok: - # User must have done some kind of panic - # mode recovery on their own. The - # returned token is the next lookahead - lookahead = tok - errtoken = None - continue - else: - if errtoken: - if hasattr(errtoken, 'lineno'): - lineno = lookahead.lineno - else: - lineno = 0 - if lineno: - sys.stderr.write('yacc: Syntax error at line %d, token=%s\n' % (lineno, errtoken.type)) - else: - sys.stderr.write('yacc: Syntax error, token=%s' % errtoken.type) - else: - sys.stderr.write('yacc: Parse error in input. EOF\n') - return - - else: - errorcount = error_count - - # case 1: the statestack only has 1 entry on it. If we're in this state, the - # entire parse has been rolled back and we're completely hosed. The token is - # discarded and we just keep going. - - if len(statestack) <= 1 and lookahead.type != '$end': - lookahead = None - errtoken = None - state = 0 - # Nuke the pushback stack - del lookaheadstack[:] - continue - - # case 2: the statestack has a couple of entries on it, but we're - # at the end of the file. nuke the top entry and generate an error token - - # Start nuking entries on the stack - if lookahead.type == '$end': - # Whoa. We're really hosed here. Bail out - return - - if lookahead.type != 'error': - sym = symstack[-1] - if sym.type == 'error': - # Hmmm. Error is on top of stack, we'll just nuke input - # symbol and continue - #--! TRACKING - if tracking: - sym.endlineno = getattr(lookahead, 'lineno', sym.lineno) - sym.endlexpos = getattr(lookahead, 'lexpos', sym.lexpos) - #--! TRACKING - lookahead = None - continue - - # Create the error symbol for the first time and make it the new lookahead symbol - t = YaccSymbol() - t.type = 'error' - - if hasattr(lookahead, 'lineno'): - t.lineno = t.endlineno = lookahead.lineno - if hasattr(lookahead, 'lexpos'): - t.lexpos = t.endlexpos = lookahead.lexpos - t.value = lookahead - lookaheadstack.append(lookahead) - lookahead = t - else: - sym = symstack.pop() - #--! TRACKING - if tracking: - lookahead.lineno = sym.lineno - lookahead.lexpos = sym.lexpos - #--! TRACKING - statestack.pop() - state = statestack[-1] - - continue - - # Call an error function here - raise RuntimeError('yacc: internal parser error!!!\n') - - #--! parsedebug-end - - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # parseopt(). - # - # Optimized version of parse() method. DO NOT EDIT THIS CODE DIRECTLY! - # This code is automatically generated by the ply/ygen.py script. Make - # changes to the parsedebug() method instead. - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - def parseopt(self, input=None, lexer=None, debug=False, tracking=False, tokenfunc=None): - #--! parseopt-start - lookahead = None # Current lookahead symbol - lookaheadstack = [] # Stack of lookahead symbols - actions = self.action # Local reference to action table (to avoid lookup on self.) - goto = self.goto # Local reference to goto table (to avoid lookup on self.) - prod = self.productions # Local reference to production list (to avoid lookup on self.) - defaulted_states = self.defaulted_states # Local reference to defaulted states - pslice = YaccProduction(None) # Production object passed to grammar rules - errorcount = 0 # Used during error recovery - - - # If no lexer was given, we will try to use the lex module - if not lexer: - from . import lex - lexer = lex.lexer - - # Set up the lexer and parser objects on pslice - pslice.lexer = lexer - pslice.parser = self - - # If input was supplied, pass to lexer - if input is not None: - lexer.input(input) - - if tokenfunc is None: - # Tokenize function - get_token = lexer.token - else: - get_token = tokenfunc - - # Set the parser() token method (sometimes used in error recovery) - self.token = get_token - - # Set up the state and symbol stacks - - statestack = [] # Stack of parsing states - self.statestack = statestack - symstack = [] # Stack of grammar symbols - self.symstack = symstack - - pslice.stack = symstack # Put in the production - errtoken = None # Err token - - # The start state is assumed to be (0,$end) - - statestack.append(0) - sym = YaccSymbol() - sym.type = '$end' - symstack.append(sym) - state = 0 - while True: - # Get the next symbol on the input. If a lookahead symbol - # is already set, we just use that. Otherwise, we'll pull - # the next token off of the lookaheadstack or from the lexer - - - if state not in defaulted_states: - if not lookahead: - if not lookaheadstack: - lookahead = get_token() # Get the next token - else: - lookahead = lookaheadstack.pop() - if not lookahead: - lookahead = YaccSymbol() - lookahead.type = '$end' - - # Check the action table - ltype = lookahead.type - t = actions[state].get(ltype) - else: - t = defaulted_states[state] - - - if t is not None: - if t > 0: - # shift a symbol on the stack - statestack.append(t) - state = t - - - symstack.append(lookahead) - lookahead = None - - # Decrease error count on successful shift - if errorcount: - errorcount -= 1 - continue - - if t < 0: - # reduce a symbol on the stack, emit a production - p = prod[-t] - pname = p.name - plen = p.len - - # Get production function - sym = YaccSymbol() - sym.type = pname # Production name - sym.value = None - - - if plen: - targ = symstack[-plen-1:] - targ[0] = sym - - #--! TRACKING - if tracking: - t1 = targ[1] - sym.lineno = t1.lineno - sym.lexpos = t1.lexpos - t1 = targ[-1] - sym.endlineno = getattr(t1, 'endlineno', t1.lineno) - sym.endlexpos = getattr(t1, 'endlexpos', t1.lexpos) - #--! TRACKING - - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # The code enclosed in this section is duplicated - # below as a performance optimization. Make sure - # changes get made in both locations. - - pslice.slice = targ - - try: - # Call the grammar rule with our special slice object - del symstack[-plen:] - del statestack[-plen:] - p.callable(pslice) - symstack.append(sym) - state = goto[statestack[-1]][pname] - statestack.append(state) - except SyntaxError: - # If an error was set. Enter error recovery state - lookaheadstack.append(lookahead) - symstack.pop() - statestack.pop() - state = statestack[-1] - sym.type = 'error' - lookahead = sym - errorcount = error_count - self.errorok = False - continue - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - else: - - #--! TRACKING - if tracking: - sym.lineno = lexer.lineno - sym.lexpos = lexer.lexpos - #--! TRACKING - - targ = [sym] - - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # The code enclosed in this section is duplicated - # above as a performance optimization. Make sure - # changes get made in both locations. - - pslice.slice = targ - - try: - # Call the grammar rule with our special slice object - p.callable(pslice) - symstack.append(sym) - state = goto[statestack[-1]][pname] - statestack.append(state) - except SyntaxError: - # If an error was set. Enter error recovery state - lookaheadstack.append(lookahead) - symstack.pop() - statestack.pop() - state = statestack[-1] - sym.type = 'error' - lookahead = sym - errorcount = error_count - self.errorok = False - continue - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - if t == 0: - n = symstack[-1] - result = getattr(n, 'value', None) - return result - - if t is None: - - - # We have some kind of parsing error here. To handle - # this, we are going to push the current token onto - # the tokenstack and replace it with an 'error' token. - # If there are any synchronization rules, they may - # catch it. - # - # In addition to pushing the error token, we call call - # the user defined p_error() function if this is the - # first syntax error. This function is only called if - # errorcount == 0. - if errorcount == 0 or self.errorok: - errorcount = error_count - self.errorok = False - errtoken = lookahead - if errtoken.type == '$end': - errtoken = None # End of file! - if self.errorfunc: - if errtoken and not hasattr(errtoken, 'lexer'): - errtoken.lexer = lexer - tok = call_errorfunc(self.errorfunc, errtoken, self) - if self.errorok: - # User must have done some kind of panic - # mode recovery on their own. The - # returned token is the next lookahead - lookahead = tok - errtoken = None - continue - else: - if errtoken: - if hasattr(errtoken, 'lineno'): - lineno = lookahead.lineno - else: - lineno = 0 - if lineno: - sys.stderr.write('yacc: Syntax error at line %d, token=%s\n' % (lineno, errtoken.type)) - else: - sys.stderr.write('yacc: Syntax error, token=%s' % errtoken.type) - else: - sys.stderr.write('yacc: Parse error in input. EOF\n') - return - - else: - errorcount = error_count - - # case 1: the statestack only has 1 entry on it. If we're in this state, the - # entire parse has been rolled back and we're completely hosed. The token is - # discarded and we just keep going. - - if len(statestack) <= 1 and lookahead.type != '$end': - lookahead = None - errtoken = None - state = 0 - # Nuke the pushback stack - del lookaheadstack[:] - continue - - # case 2: the statestack has a couple of entries on it, but we're - # at the end of the file. nuke the top entry and generate an error token - - # Start nuking entries on the stack - if lookahead.type == '$end': - # Whoa. We're really hosed here. Bail out - return - - if lookahead.type != 'error': - sym = symstack[-1] - if sym.type == 'error': - # Hmmm. Error is on top of stack, we'll just nuke input - # symbol and continue - #--! TRACKING - if tracking: - sym.endlineno = getattr(lookahead, 'lineno', sym.lineno) - sym.endlexpos = getattr(lookahead, 'lexpos', sym.lexpos) - #--! TRACKING - lookahead = None - continue - - # Create the error symbol for the first time and make it the new lookahead symbol - t = YaccSymbol() - t.type = 'error' - - if hasattr(lookahead, 'lineno'): - t.lineno = t.endlineno = lookahead.lineno - if hasattr(lookahead, 'lexpos'): - t.lexpos = t.endlexpos = lookahead.lexpos - t.value = lookahead - lookaheadstack.append(lookahead) - lookahead = t - else: - sym = symstack.pop() - #--! TRACKING - if tracking: - lookahead.lineno = sym.lineno - lookahead.lexpos = sym.lexpos - #--! TRACKING - statestack.pop() - state = statestack[-1] - - continue - - # Call an error function here - raise RuntimeError('yacc: internal parser error!!!\n') - - #--! parseopt-end - - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # parseopt_notrack(). - # - # Optimized version of parseopt() with line number tracking removed. - # DO NOT EDIT THIS CODE DIRECTLY. This code is automatically generated - # by the ply/ygen.py script. Make changes to the parsedebug() method instead. - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - def parseopt_notrack(self, input=None, lexer=None, debug=False, tracking=False, tokenfunc=None): - #--! parseopt-notrack-start - lookahead = None # Current lookahead symbol - lookaheadstack = [] # Stack of lookahead symbols - actions = self.action # Local reference to action table (to avoid lookup on self.) - goto = self.goto # Local reference to goto table (to avoid lookup on self.) - prod = self.productions # Local reference to production list (to avoid lookup on self.) - defaulted_states = self.defaulted_states # Local reference to defaulted states - pslice = YaccProduction(None) # Production object passed to grammar rules - errorcount = 0 # Used during error recovery - - - # If no lexer was given, we will try to use the lex module - if not lexer: - from . import lex - lexer = lex.lexer - - # Set up the lexer and parser objects on pslice - pslice.lexer = lexer - pslice.parser = self - - # If input was supplied, pass to lexer - if input is not None: - lexer.input(input) - - if tokenfunc is None: - # Tokenize function - get_token = lexer.token - else: - get_token = tokenfunc - - # Set the parser() token method (sometimes used in error recovery) - self.token = get_token - - # Set up the state and symbol stacks - - statestack = [] # Stack of parsing states - self.statestack = statestack - symstack = [] # Stack of grammar symbols - self.symstack = symstack - - pslice.stack = symstack # Put in the production - errtoken = None # Err token - - # The start state is assumed to be (0,$end) - - statestack.append(0) - sym = YaccSymbol() - sym.type = '$end' - symstack.append(sym) - state = 0 - while True: - # Get the next symbol on the input. If a lookahead symbol - # is already set, we just use that. Otherwise, we'll pull - # the next token off of the lookaheadstack or from the lexer - - - if state not in defaulted_states: - if not lookahead: - if not lookaheadstack: - lookahead = get_token() # Get the next token - else: - lookahead = lookaheadstack.pop() - if not lookahead: - lookahead = YaccSymbol() - lookahead.type = '$end' - - # Check the action table - ltype = lookahead.type - t = actions[state].get(ltype) - else: - t = defaulted_states[state] - - - if t is not None: - if t > 0: - # shift a symbol on the stack - statestack.append(t) - state = t - - - symstack.append(lookahead) - lookahead = None - - # Decrease error count on successful shift - if errorcount: - errorcount -= 1 - continue - - if t < 0: - # reduce a symbol on the stack, emit a production - p = prod[-t] - pname = p.name - plen = p.len - - # Get production function - sym = YaccSymbol() - sym.type = pname # Production name - sym.value = None - - - if plen: - targ = symstack[-plen-1:] - targ[0] = sym - - - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # The code enclosed in this section is duplicated - # below as a performance optimization. Make sure - # changes get made in both locations. - - pslice.slice = targ - - try: - # Call the grammar rule with our special slice object - del symstack[-plen:] - del statestack[-plen:] - p.callable(pslice) - symstack.append(sym) - state = goto[statestack[-1]][pname] - statestack.append(state) - except SyntaxError: - # If an error was set. Enter error recovery state - lookaheadstack.append(lookahead) - symstack.pop() - statestack.pop() - state = statestack[-1] - sym.type = 'error' - lookahead = sym - errorcount = error_count - self.errorok = False - continue - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - else: - - - targ = [sym] - - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # The code enclosed in this section is duplicated - # above as a performance optimization. Make sure - # changes get made in both locations. - - pslice.slice = targ - - try: - # Call the grammar rule with our special slice object - p.callable(pslice) - symstack.append(sym) - state = goto[statestack[-1]][pname] - statestack.append(state) - except SyntaxError: - # If an error was set. Enter error recovery state - lookaheadstack.append(lookahead) - symstack.pop() - statestack.pop() - state = statestack[-1] - sym.type = 'error' - lookahead = sym - errorcount = error_count - self.errorok = False - continue - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - if t == 0: - n = symstack[-1] - result = getattr(n, 'value', None) - return result - - if t is None: - - - # We have some kind of parsing error here. To handle - # this, we are going to push the current token onto - # the tokenstack and replace it with an 'error' token. - # If there are any synchronization rules, they may - # catch it. - # - # In addition to pushing the error token, we call call - # the user defined p_error() function if this is the - # first syntax error. This function is only called if - # errorcount == 0. - if errorcount == 0 or self.errorok: - errorcount = error_count - self.errorok = False - errtoken = lookahead - if errtoken.type == '$end': - errtoken = None # End of file! - if self.errorfunc: - if errtoken and not hasattr(errtoken, 'lexer'): - errtoken.lexer = lexer - tok = call_errorfunc(self.errorfunc, errtoken, self) - if self.errorok: - # User must have done some kind of panic - # mode recovery on their own. The - # returned token is the next lookahead - lookahead = tok - errtoken = None - continue - else: - if errtoken: - if hasattr(errtoken, 'lineno'): - lineno = lookahead.lineno - else: - lineno = 0 - if lineno: - sys.stderr.write('yacc: Syntax error at line %d, token=%s\n' % (lineno, errtoken.type)) - else: - sys.stderr.write('yacc: Syntax error, token=%s' % errtoken.type) - else: - sys.stderr.write('yacc: Parse error in input. EOF\n') - return - - else: - errorcount = error_count - - # case 1: the statestack only has 1 entry on it. If we're in this state, the - # entire parse has been rolled back and we're completely hosed. The token is - # discarded and we just keep going. - - if len(statestack) <= 1 and lookahead.type != '$end': - lookahead = None - errtoken = None - state = 0 - # Nuke the pushback stack - del lookaheadstack[:] - continue - - # case 2: the statestack has a couple of entries on it, but we're - # at the end of the file. nuke the top entry and generate an error token - - # Start nuking entries on the stack - if lookahead.type == '$end': - # Whoa. We're really hosed here. Bail out - return - - if lookahead.type != 'error': - sym = symstack[-1] - if sym.type == 'error': - # Hmmm. Error is on top of stack, we'll just nuke input - # symbol and continue - lookahead = None - continue - - # Create the error symbol for the first time and make it the new lookahead symbol - t = YaccSymbol() - t.type = 'error' - - if hasattr(lookahead, 'lineno'): - t.lineno = t.endlineno = lookahead.lineno - if hasattr(lookahead, 'lexpos'): - t.lexpos = t.endlexpos = lookahead.lexpos - t.value = lookahead - lookaheadstack.append(lookahead) - lookahead = t - else: - sym = symstack.pop() - statestack.pop() - state = statestack[-1] - - continue - - # Call an error function here - raise RuntimeError('yacc: internal parser error!!!\n') - - #--! parseopt-notrack-end - -# ----------------------------------------------------------------------------- -# === Grammar Representation === -# -# The following functions, classes, and variables are used to represent and -# manipulate the rules that make up a grammar. -# ----------------------------------------------------------------------------- - -# regex matching identifiers -_is_identifier = re.compile(r'^[a-zA-Z0-9_-]+$') - -# ----------------------------------------------------------------------------- -# class Production: -# -# This class stores the raw information about a single production or grammar rule. -# A grammar rule refers to a specification such as this: -# -# expr : expr PLUS term -# -# Here are the basic attributes defined on all productions -# -# name - Name of the production. For example 'expr' -# prod - A list of symbols on the right side ['expr','PLUS','term'] -# prec - Production precedence level -# number - Production number. -# func - Function that executes on reduce -# file - File where production function is defined -# lineno - Line number where production function is defined -# -# The following attributes are defined or optional. -# -# len - Length of the production (number of symbols on right hand side) -# usyms - Set of unique symbols found in the production -# ----------------------------------------------------------------------------- - -class Production(object): - reduced = 0 - def __init__(self, number, name, prod, precedence=('right', 0), func=None, file='', line=0): - self.name = name - self.prod = tuple(prod) - self.number = number - self.func = func - self.callable = None - self.file = file - self.line = line - self.prec = precedence - - # Internal settings used during table construction - - self.len = len(self.prod) # Length of the production - - # Create a list of unique production symbols used in the production - self.usyms = [] - for s in self.prod: - if s not in self.usyms: - self.usyms.append(s) - - # List of all LR items for the production - self.lr_items = [] - self.lr_next = None - - # Create a string representation - if self.prod: - self.str = '%s -> %s' % (self.name, ' '.join(self.prod)) - else: - self.str = '%s -> ' % self.name - - def __str__(self): - return self.str - - def __repr__(self): - return 'Production(' + str(self) + ')' - - def __len__(self): - return len(self.prod) - - def __nonzero__(self): - return 1 - - def __getitem__(self, index): - return self.prod[index] - - # Return the nth lr_item from the production (or None if at the end) - def lr_item(self, n): - if n > len(self.prod): - return None - p = LRItem(self, n) - # Precompute the list of productions immediately following. - try: - p.lr_after = Prodnames[p.prod[n+1]] - except (IndexError, KeyError): - p.lr_after = [] - try: - p.lr_before = p.prod[n-1] - except IndexError: - p.lr_before = None - return p - - # Bind the production function name to a callable - def bind(self, pdict): - if self.func: - self.callable = pdict[self.func] - -# This class serves as a minimal standin for Production objects when -# reading table data from files. It only contains information -# actually used by the LR parsing engine, plus some additional -# debugging information. -class MiniProduction(object): - def __init__(self, str, name, len, func, file, line): - self.name = name - self.len = len - self.func = func - self.callable = None - self.file = file - self.line = line - self.str = str - - def __str__(self): - return self.str - - def __repr__(self): - return 'MiniProduction(%s)' % self.str - - # Bind the production function name to a callable - def bind(self, pdict): - if self.func: - self.callable = pdict[self.func] - - -# ----------------------------------------------------------------------------- -# class LRItem -# -# This class represents a specific stage of parsing a production rule. For -# example: -# -# expr : expr . PLUS term -# -# In the above, the "." represents the current location of the parse. Here -# basic attributes: -# -# name - Name of the production. For example 'expr' -# prod - A list of symbols on the right side ['expr','.', 'PLUS','term'] -# number - Production number. -# -# lr_next Next LR item. Example, if we are ' expr -> expr . PLUS term' -# then lr_next refers to 'expr -> expr PLUS . term' -# lr_index - LR item index (location of the ".") in the prod list. -# lookaheads - LALR lookahead symbols for this item -# len - Length of the production (number of symbols on right hand side) -# lr_after - List of all productions that immediately follow -# lr_before - Grammar symbol immediately before -# ----------------------------------------------------------------------------- - -class LRItem(object): - def __init__(self, p, n): - self.name = p.name - self.prod = list(p.prod) - self.number = p.number - self.lr_index = n - self.lookaheads = {} - self.prod.insert(n, '.') - self.prod = tuple(self.prod) - self.len = len(self.prod) - self.usyms = p.usyms - - def __str__(self): - if self.prod: - s = '%s -> %s' % (self.name, ' '.join(self.prod)) - else: - s = '%s -> ' % self.name - return s - - def __repr__(self): - return 'LRItem(' + str(self) + ')' - -# ----------------------------------------------------------------------------- -# rightmost_terminal() -# -# Return the rightmost terminal from a list of symbols. Used in add_production() -# ----------------------------------------------------------------------------- -def rightmost_terminal(symbols, terminals): - i = len(symbols) - 1 - while i >= 0: - if symbols[i] in terminals: - return symbols[i] - i -= 1 - return None - -# ----------------------------------------------------------------------------- -# === GRAMMAR CLASS === -# -# The following class represents the contents of the specified grammar along -# with various computed properties such as first sets, follow sets, LR items, etc. -# This data is used for critical parts of the table generation process later. -# ----------------------------------------------------------------------------- - -class GrammarError(YaccError): - pass - -class Grammar(object): - def __init__(self, terminals): - self.Productions = [None] # A list of all of the productions. The first - # entry is always reserved for the purpose of - # building an augmented grammar - - self.Prodnames = {} # A dictionary mapping the names of nonterminals to a list of all - # productions of that nonterminal. - - self.Prodmap = {} # A dictionary that is only used to detect duplicate - # productions. - - self.Terminals = {} # A dictionary mapping the names of terminal symbols to a - # list of the rules where they are used. - - for term in terminals: - self.Terminals[term] = [] - - self.Terminals['error'] = [] - - self.Nonterminals = {} # A dictionary mapping names of nonterminals to a list - # of rule numbers where they are used. - - self.First = {} # A dictionary of precomputed FIRST(x) symbols - - self.Follow = {} # A dictionary of precomputed FOLLOW(x) symbols - - self.Precedence = {} # Precedence rules for each terminal. Contains tuples of the - # form ('right',level) or ('nonassoc', level) or ('left',level) - - self.UsedPrecedence = set() # Precedence rules that were actually used by the grammer. - # This is only used to provide error checking and to generate - # a warning about unused precedence rules. - - self.Start = None # Starting symbol for the grammar - - - def __len__(self): - return len(self.Productions) - - def __getitem__(self, index): - return self.Productions[index] - - # ----------------------------------------------------------------------------- - # set_precedence() - # - # Sets the precedence for a given terminal. assoc is the associativity such as - # 'left','right', or 'nonassoc'. level is a numeric level. - # - # ----------------------------------------------------------------------------- - - def set_precedence(self, term, assoc, level): - assert self.Productions == [None], 'Must call set_precedence() before add_production()' - if term in self.Precedence: - raise GrammarError('Precedence already specified for terminal %r' % term) - if assoc not in ['left', 'right', 'nonassoc']: - raise GrammarError("Associativity must be one of 'left','right', or 'nonassoc'") - self.Precedence[term] = (assoc, level) - - # ----------------------------------------------------------------------------- - # add_production() - # - # Given an action function, this function assembles a production rule and - # computes its precedence level. - # - # The production rule is supplied as a list of symbols. For example, - # a rule such as 'expr : expr PLUS term' has a production name of 'expr' and - # symbols ['expr','PLUS','term']. - # - # Precedence is determined by the precedence of the right-most non-terminal - # or the precedence of a terminal specified by %prec. - # - # A variety of error checks are performed to make sure production symbols - # are valid and that %prec is used correctly. - # ----------------------------------------------------------------------------- - - def add_production(self, prodname, syms, func=None, file='', line=0): - - if prodname in self.Terminals: - raise GrammarError('%s:%d: Illegal rule name %r. Already defined as a token' % (file, line, prodname)) - if prodname == 'error': - raise GrammarError('%s:%d: Illegal rule name %r. error is a reserved word' % (file, line, prodname)) - if not _is_identifier.match(prodname): - raise GrammarError('%s:%d: Illegal rule name %r' % (file, line, prodname)) - - # Look for literal tokens - for n, s in enumerate(syms): - if s[0] in "'\"": - try: - c = eval(s) - if (len(c) > 1): - raise GrammarError('%s:%d: Literal token %s in rule %r may only be a single character' % - (file, line, s, prodname)) - if c not in self.Terminals: - self.Terminals[c] = [] - syms[n] = c - continue - except SyntaxError: - pass - if not _is_identifier.match(s) and s != '%prec': - raise GrammarError('%s:%d: Illegal name %r in rule %r' % (file, line, s, prodname)) - - # Determine the precedence level - if '%prec' in syms: - if syms[-1] == '%prec': - raise GrammarError('%s:%d: Syntax error. Nothing follows %%prec' % (file, line)) - if syms[-2] != '%prec': - raise GrammarError('%s:%d: Syntax error. %%prec can only appear at the end of a grammar rule' % - (file, line)) - precname = syms[-1] - prodprec = self.Precedence.get(precname) - if not prodprec: - raise GrammarError('%s:%d: Nothing known about the precedence of %r' % (file, line, precname)) - else: - self.UsedPrecedence.add(precname) - del syms[-2:] # Drop %prec from the rule - else: - # If no %prec, precedence is determined by the rightmost terminal symbol - precname = rightmost_terminal(syms, self.Terminals) - prodprec = self.Precedence.get(precname, ('right', 0)) - - # See if the rule is already in the rulemap - map = '%s -> %s' % (prodname, syms) - if map in self.Prodmap: - m = self.Prodmap[map] - raise GrammarError('%s:%d: Duplicate rule %s. ' % (file, line, m) + - 'Previous definition at %s:%d' % (m.file, m.line)) - - # From this point on, everything is valid. Create a new Production instance - pnumber = len(self.Productions) - if prodname not in self.Nonterminals: - self.Nonterminals[prodname] = [] - - # Add the production number to Terminals and Nonterminals - for t in syms: - if t in self.Terminals: - self.Terminals[t].append(pnumber) - else: - if t not in self.Nonterminals: - self.Nonterminals[t] = [] - self.Nonterminals[t].append(pnumber) - - # Create a production and add it to the list of productions - p = Production(pnumber, prodname, syms, prodprec, func, file, line) - self.Productions.append(p) - self.Prodmap[map] = p - - # Add to the global productions list - try: - self.Prodnames[prodname].append(p) - except KeyError: - self.Prodnames[prodname] = [p] - - # ----------------------------------------------------------------------------- - # set_start() - # - # Sets the starting symbol and creates the augmented grammar. Production - # rule 0 is S' -> start where start is the start symbol. - # ----------------------------------------------------------------------------- - - def set_start(self, start=None): - if not start: - start = self.Productions[1].name - if start not in self.Nonterminals: - raise GrammarError('start symbol %s undefined' % start) - self.Productions[0] = Production(0, "S'", [start]) - self.Nonterminals[start].append(0) - self.Start = start - - # ----------------------------------------------------------------------------- - # find_unreachable() - # - # Find all of the nonterminal symbols that can't be reached from the starting - # symbol. Returns a list of nonterminals that can't be reached. - # ----------------------------------------------------------------------------- - - def find_unreachable(self): - - # Mark all symbols that are reachable from a symbol s - def mark_reachable_from(s): - if s in reachable: - return - reachable.add(s) - for p in self.Prodnames.get(s, []): - for r in p.prod: - mark_reachable_from(r) - - reachable = set() - mark_reachable_from(self.Productions[0].prod[0]) - return [s for s in self.Nonterminals if s not in reachable] - - # ----------------------------------------------------------------------------- - # infinite_cycles() - # - # This function looks at the various parsing rules and tries to detect - # infinite recursion cycles (grammar rules where there is no possible way - # to derive a string of only terminals). - # ----------------------------------------------------------------------------- - - def infinite_cycles(self): - terminates = {} - - # Terminals: - for t in self.Terminals: - terminates[t] = True - - terminates['$end'] = True - - # Nonterminals: - - # Initialize to false: - for n in self.Nonterminals: - terminates[n] = False - - # Then propagate termination until no change: - while True: - some_change = False - for (n, pl) in self.Prodnames.items(): - # Nonterminal n terminates iff any of its productions terminates. - for p in pl: - # Production p terminates iff all of its rhs symbols terminate. - for s in p.prod: - if not terminates[s]: - # The symbol s does not terminate, - # so production p does not terminate. - p_terminates = False - break - else: - # didn't break from the loop, - # so every symbol s terminates - # so production p terminates. - p_terminates = True - - if p_terminates: - # symbol n terminates! - if not terminates[n]: - terminates[n] = True - some_change = True - # Don't need to consider any more productions for this n. - break - - if not some_change: - break - - infinite = [] - for (s, term) in terminates.items(): - if not term: - if s not in self.Prodnames and s not in self.Terminals and s != 'error': - # s is used-but-not-defined, and we've already warned of that, - # so it would be overkill to say that it's also non-terminating. - pass - else: - infinite.append(s) - - return infinite - - # ----------------------------------------------------------------------------- - # undefined_symbols() - # - # Find all symbols that were used the grammar, but not defined as tokens or - # grammar rules. Returns a list of tuples (sym, prod) where sym in the symbol - # and prod is the production where the symbol was used. - # ----------------------------------------------------------------------------- - def undefined_symbols(self): - result = [] - for p in self.Productions: - if not p: - continue - - for s in p.prod: - if s not in self.Prodnames and s not in self.Terminals and s != 'error': - result.append((s, p)) - return result - - # ----------------------------------------------------------------------------- - # unused_terminals() - # - # Find all terminals that were defined, but not used by the grammar. Returns - # a list of all symbols. - # ----------------------------------------------------------------------------- - def unused_terminals(self): - unused_tok = [] - for s, v in self.Terminals.items(): - if s != 'error' and not v: - unused_tok.append(s) - - return unused_tok - - # ------------------------------------------------------------------------------ - # unused_rules() - # - # Find all grammar rules that were defined, but not used (maybe not reachable) - # Returns a list of productions. - # ------------------------------------------------------------------------------ - - def unused_rules(self): - unused_prod = [] - for s, v in self.Nonterminals.items(): - if not v: - p = self.Prodnames[s][0] - unused_prod.append(p) - return unused_prod - - # ----------------------------------------------------------------------------- - # unused_precedence() - # - # Returns a list of tuples (term,precedence) corresponding to precedence - # rules that were never used by the grammar. term is the name of the terminal - # on which precedence was applied and precedence is a string such as 'left' or - # 'right' corresponding to the type of precedence. - # ----------------------------------------------------------------------------- - - def unused_precedence(self): - unused = [] - for termname in self.Precedence: - if not (termname in self.Terminals or termname in self.UsedPrecedence): - unused.append((termname, self.Precedence[termname][0])) - - return unused - - # ------------------------------------------------------------------------- - # _first() - # - # Compute the value of FIRST1(beta) where beta is a tuple of symbols. - # - # During execution of compute_first1, the result may be incomplete. - # Afterward (e.g., when called from compute_follow()), it will be complete. - # ------------------------------------------------------------------------- - def _first(self, beta): - - # We are computing First(x1,x2,x3,...,xn) - result = [] - for x in beta: - x_produces_empty = False - - # Add all the non- symbols of First[x] to the result. - for f in self.First[x]: - if f == '': - x_produces_empty = True - else: - if f not in result: - result.append(f) - - if x_produces_empty: - # We have to consider the next x in beta, - # i.e. stay in the loop. - pass - else: - # We don't have to consider any further symbols in beta. - break - else: - # There was no 'break' from the loop, - # so x_produces_empty was true for all x in beta, - # so beta produces empty as well. - result.append('') - - return result - - # ------------------------------------------------------------------------- - # compute_first() - # - # Compute the value of FIRST1(X) for all symbols - # ------------------------------------------------------------------------- - def compute_first(self): - if self.First: - return self.First - - # Terminals: - for t in self.Terminals: - self.First[t] = [t] - - self.First['$end'] = ['$end'] - - # Nonterminals: - - # Initialize to the empty set: - for n in self.Nonterminals: - self.First[n] = [] - - # Then propagate symbols until no change: - while True: - some_change = False - for n in self.Nonterminals: - for p in self.Prodnames[n]: - for f in self._first(p.prod): - if f not in self.First[n]: - self.First[n].append(f) - some_change = True - if not some_change: - break - - return self.First - - # --------------------------------------------------------------------- - # compute_follow() - # - # Computes all of the follow sets for every non-terminal symbol. The - # follow set is the set of all symbols that might follow a given - # non-terminal. See the Dragon book, 2nd Ed. p. 189. - # --------------------------------------------------------------------- - def compute_follow(self, start=None): - # If already computed, return the result - if self.Follow: - return self.Follow - - # If first sets not computed yet, do that first. - if not self.First: - self.compute_first() - - # Add '$end' to the follow list of the start symbol - for k in self.Nonterminals: - self.Follow[k] = [] - - if not start: - start = self.Productions[1].name - - self.Follow[start] = ['$end'] - - while True: - didadd = False - for p in self.Productions[1:]: - # Here is the production set - for i, B in enumerate(p.prod): - if B in self.Nonterminals: - # Okay. We got a non-terminal in a production - fst = self._first(p.prod[i+1:]) - hasempty = False - for f in fst: - if f != '' and f not in self.Follow[B]: - self.Follow[B].append(f) - didadd = True - if f == '': - hasempty = True - if hasempty or i == (len(p.prod)-1): - # Add elements of follow(a) to follow(b) - for f in self.Follow[p.name]: - if f not in self.Follow[B]: - self.Follow[B].append(f) - didadd = True - if not didadd: - break - return self.Follow - - - # ----------------------------------------------------------------------------- - # build_lritems() - # - # This function walks the list of productions and builds a complete set of the - # LR items. The LR items are stored in two ways: First, they are uniquely - # numbered and placed in the list _lritems. Second, a linked list of LR items - # is built for each production. For example: - # - # E -> E PLUS E - # - # Creates the list - # - # [E -> . E PLUS E, E -> E . PLUS E, E -> E PLUS . E, E -> E PLUS E . ] - # ----------------------------------------------------------------------------- - - def build_lritems(self): - for p in self.Productions: - lastlri = p - i = 0 - lr_items = [] - while True: - if i > len(p): - lri = None - else: - lri = LRItem(p, i) - # Precompute the list of productions immediately following - try: - lri.lr_after = self.Prodnames[lri.prod[i+1]] - except (IndexError, KeyError): - lri.lr_after = [] - try: - lri.lr_before = lri.prod[i-1] - except IndexError: - lri.lr_before = None - - lastlri.lr_next = lri - if not lri: - break - lr_items.append(lri) - lastlri = lri - i += 1 - p.lr_items = lr_items - -# ----------------------------------------------------------------------------- -# == Class LRTable == -# -# This basic class represents a basic table of LR parsing information. -# Methods for generating the tables are not defined here. They are defined -# in the derived class LRGeneratedTable. -# ----------------------------------------------------------------------------- - -class VersionError(YaccError): - pass - -class LRTable(object): - def __init__(self): - self.lr_action = None - self.lr_goto = None - self.lr_productions = None - self.lr_method = None - - def read_table(self, module): - if isinstance(module, types.ModuleType): - parsetab = module - else: - exec('import %s' % module) - parsetab = sys.modules[module] - - if parsetab._tabversion != __tabversion__: - raise VersionError('yacc table file version is out of date') - - self.lr_action = parsetab._lr_action - self.lr_goto = parsetab._lr_goto - - self.lr_productions = [] - for p in parsetab._lr_productions: - self.lr_productions.append(MiniProduction(*p)) - - self.lr_method = parsetab._lr_method - return parsetab._lr_signature - - def read_pickle(self, filename): - try: - import cPickle as pickle - except ImportError: - import pickle - - if not os.path.exists(filename): - raise ImportError - - in_f = open(filename, 'rb') - - tabversion = pickle.load(in_f) - if tabversion != __tabversion__: - raise VersionError('yacc table file version is out of date') - self.lr_method = pickle.load(in_f) - signature = pickle.load(in_f) - self.lr_action = pickle.load(in_f) - self.lr_goto = pickle.load(in_f) - productions = pickle.load(in_f) - - self.lr_productions = [] - for p in productions: - self.lr_productions.append(MiniProduction(*p)) - - in_f.close() - return signature - - # Bind all production function names to callable objects in pdict - def bind_callables(self, pdict): - for p in self.lr_productions: - p.bind(pdict) - - -# ----------------------------------------------------------------------------- -# === LR Generator === -# -# The following classes and functions are used to generate LR parsing tables on -# a grammar. -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# digraph() -# traverse() -# -# The following two functions are used to compute set valued functions -# of the form: -# -# F(x) = F'(x) U U{F(y) | x R y} -# -# This is used to compute the values of Read() sets as well as FOLLOW sets -# in LALR(1) generation. -# -# Inputs: X - An input set -# R - A relation -# FP - Set-valued function -# ------------------------------------------------------------------------------ - -def digraph(X, R, FP): - N = {} - for x in X: - N[x] = 0 - stack = [] - F = {} - for x in X: - if N[x] == 0: - traverse(x, N, stack, F, X, R, FP) - return F - -def traverse(x, N, stack, F, X, R, FP): - stack.append(x) - d = len(stack) - N[x] = d - F[x] = FP(x) # F(X) <- F'(x) - - rel = R(x) # Get y's related to x - for y in rel: - if N[y] == 0: - traverse(y, N, stack, F, X, R, FP) - N[x] = min(N[x], N[y]) - for a in F.get(y, []): - if a not in F[x]: - F[x].append(a) - if N[x] == d: - N[stack[-1]] = MAXINT - F[stack[-1]] = F[x] - element = stack.pop() - while element != x: - N[stack[-1]] = MAXINT - F[stack[-1]] = F[x] - element = stack.pop() - -class LALRError(YaccError): - pass - -# ----------------------------------------------------------------------------- -# == LRGeneratedTable == -# -# This class implements the LR table generation algorithm. There are no -# public methods except for write() -# ----------------------------------------------------------------------------- - -class LRGeneratedTable(LRTable): - def __init__(self, grammar, method='LALR', log=None): - if method not in ['SLR', 'LALR']: - raise LALRError('Unsupported method %s' % method) - - self.grammar = grammar - self.lr_method = method - - # Set up the logger - if not log: - log = NullLogger() - self.log = log - - # Internal attributes - self.lr_action = {} # Action table - self.lr_goto = {} # Goto table - self.lr_productions = grammar.Productions # Copy of grammar Production array - self.lr_goto_cache = {} # Cache of computed gotos - self.lr0_cidhash = {} # Cache of closures - - self._add_count = 0 # Internal counter used to detect cycles - - # Diagonistic information filled in by the table generator - self.sr_conflict = 0 - self.rr_conflict = 0 - self.conflicts = [] # List of conflicts - - self.sr_conflicts = [] - self.rr_conflicts = [] - - # Build the tables - self.grammar.build_lritems() - self.grammar.compute_first() - self.grammar.compute_follow() - self.lr_parse_table() - - # Compute the LR(0) closure operation on I, where I is a set of LR(0) items. - - def lr0_closure(self, I): - self._add_count += 1 - - # Add everything in I to J - J = I[:] - didadd = True - while didadd: - didadd = False - for j in J: - for x in j.lr_after: - if getattr(x, 'lr0_added', 0) == self._add_count: - continue - # Add B --> .G to J - J.append(x.lr_next) - x.lr0_added = self._add_count - didadd = True - - return J - - # Compute the LR(0) goto function goto(I,X) where I is a set - # of LR(0) items and X is a grammar symbol. This function is written - # in a way that guarantees uniqueness of the generated goto sets - # (i.e. the same goto set will never be returned as two different Python - # objects). With uniqueness, we can later do fast set comparisons using - # id(obj) instead of element-wise comparison. - - def lr0_goto(self, I, x): - # First we look for a previously cached entry - g = self.lr_goto_cache.get((id(I), x)) - if g: - return g - - # Now we generate the goto set in a way that guarantees uniqueness - # of the result - - s = self.lr_goto_cache.get(x) - if not s: - s = {} - self.lr_goto_cache[x] = s - - gs = [] - for p in I: - n = p.lr_next - if n and n.lr_before == x: - s1 = s.get(id(n)) - if not s1: - s1 = {} - s[id(n)] = s1 - gs.append(n) - s = s1 - g = s.get('$end') - if not g: - if gs: - g = self.lr0_closure(gs) - s['$end'] = g - else: - s['$end'] = gs - self.lr_goto_cache[(id(I), x)] = g - return g - - # Compute the LR(0) sets of item function - def lr0_items(self): - C = [self.lr0_closure([self.grammar.Productions[0].lr_next])] - i = 0 - for I in C: - self.lr0_cidhash[id(I)] = i - i += 1 - - # Loop over the items in C and each grammar symbols - i = 0 - while i < len(C): - I = C[i] - i += 1 - - # Collect all of the symbols that could possibly be in the goto(I,X) sets - asyms = {} - for ii in I: - for s in ii.usyms: - asyms[s] = None - - for x in asyms: - g = self.lr0_goto(I, x) - if not g or id(g) in self.lr0_cidhash: - continue - self.lr0_cidhash[id(g)] = len(C) - C.append(g) - - return C - - # ----------------------------------------------------------------------------- - # ==== LALR(1) Parsing ==== - # - # LALR(1) parsing is almost exactly the same as SLR except that instead of - # relying upon Follow() sets when performing reductions, a more selective - # lookahead set that incorporates the state of the LR(0) machine is utilized. - # Thus, we mainly just have to focus on calculating the lookahead sets. - # - # The method used here is due to DeRemer and Pennelo (1982). - # - # DeRemer, F. L., and T. J. Pennelo: "Efficient Computation of LALR(1) - # Lookahead Sets", ACM Transactions on Programming Languages and Systems, - # Vol. 4, No. 4, Oct. 1982, pp. 615-649 - # - # Further details can also be found in: - # - # J. Tremblay and P. Sorenson, "The Theory and Practice of Compiler Writing", - # McGraw-Hill Book Company, (1985). - # - # ----------------------------------------------------------------------------- - - # ----------------------------------------------------------------------------- - # compute_nullable_nonterminals() - # - # Creates a dictionary containing all of the non-terminals that might produce - # an empty production. - # ----------------------------------------------------------------------------- - - def compute_nullable_nonterminals(self): - nullable = set() - num_nullable = 0 - while True: - for p in self.grammar.Productions[1:]: - if p.len == 0: - nullable.add(p.name) - continue - for t in p.prod: - if t not in nullable: - break - else: - nullable.add(p.name) - if len(nullable) == num_nullable: - break - num_nullable = len(nullable) - return nullable - - # ----------------------------------------------------------------------------- - # find_nonterminal_trans(C) - # - # Given a set of LR(0) items, this functions finds all of the non-terminal - # transitions. These are transitions in which a dot appears immediately before - # a non-terminal. Returns a list of tuples of the form (state,N) where state - # is the state number and N is the nonterminal symbol. - # - # The input C is the set of LR(0) items. - # ----------------------------------------------------------------------------- - - def find_nonterminal_transitions(self, C): - trans = [] - for stateno, state in enumerate(C): - for p in state: - if p.lr_index < p.len - 1: - t = (stateno, p.prod[p.lr_index+1]) - if t[1] in self.grammar.Nonterminals: - if t not in trans: - trans.append(t) - return trans - - # ----------------------------------------------------------------------------- - # dr_relation() - # - # Computes the DR(p,A) relationships for non-terminal transitions. The input - # is a tuple (state,N) where state is a number and N is a nonterminal symbol. - # - # Returns a list of terminals. - # ----------------------------------------------------------------------------- - - def dr_relation(self, C, trans, nullable): - dr_set = {} - state, N = trans - terms = [] - - g = self.lr0_goto(C[state], N) - for p in g: - if p.lr_index < p.len - 1: - a = p.prod[p.lr_index+1] - if a in self.grammar.Terminals: - if a not in terms: - terms.append(a) - - # This extra bit is to handle the start state - if state == 0 and N == self.grammar.Productions[0].prod[0]: - terms.append('$end') - - return terms - - # ----------------------------------------------------------------------------- - # reads_relation() - # - # Computes the READS() relation (p,A) READS (t,C). - # ----------------------------------------------------------------------------- - - def reads_relation(self, C, trans, empty): - # Look for empty transitions - rel = [] - state, N = trans - - g = self.lr0_goto(C[state], N) - j = self.lr0_cidhash.get(id(g), -1) - for p in g: - if p.lr_index < p.len - 1: - a = p.prod[p.lr_index + 1] - if a in empty: - rel.append((j, a)) - - return rel - - # ----------------------------------------------------------------------------- - # compute_lookback_includes() - # - # Determines the lookback and includes relations - # - # LOOKBACK: - # - # This relation is determined by running the LR(0) state machine forward. - # For example, starting with a production "N : . A B C", we run it forward - # to obtain "N : A B C ." We then build a relationship between this final - # state and the starting state. These relationships are stored in a dictionary - # lookdict. - # - # INCLUDES: - # - # Computes the INCLUDE() relation (p,A) INCLUDES (p',B). - # - # This relation is used to determine non-terminal transitions that occur - # inside of other non-terminal transition states. (p,A) INCLUDES (p', B) - # if the following holds: - # - # B -> LAT, where T -> epsilon and p' -L-> p - # - # L is essentially a prefix (which may be empty), T is a suffix that must be - # able to derive an empty string. State p' must lead to state p with the string L. - # - # ----------------------------------------------------------------------------- - - def compute_lookback_includes(self, C, trans, nullable): - lookdict = {} # Dictionary of lookback relations - includedict = {} # Dictionary of include relations - - # Make a dictionary of non-terminal transitions - dtrans = {} - for t in trans: - dtrans[t] = 1 - - # Loop over all transitions and compute lookbacks and includes - for state, N in trans: - lookb = [] - includes = [] - for p in C[state]: - if p.name != N: - continue - - # Okay, we have a name match. We now follow the production all the way - # through the state machine until we get the . on the right hand side - - lr_index = p.lr_index - j = state - while lr_index < p.len - 1: - lr_index = lr_index + 1 - t = p.prod[lr_index] - - # Check to see if this symbol and state are a non-terminal transition - if (j, t) in dtrans: - # Yes. Okay, there is some chance that this is an includes relation - # the only way to know for certain is whether the rest of the - # production derives empty - - li = lr_index + 1 - while li < p.len: - if p.prod[li] in self.grammar.Terminals: - break # No forget it - if p.prod[li] not in nullable: - break - li = li + 1 - else: - # Appears to be a relation between (j,t) and (state,N) - includes.append((j, t)) - - g = self.lr0_goto(C[j], t) # Go to next set - j = self.lr0_cidhash.get(id(g), -1) # Go to next state - - # When we get here, j is the final state, now we have to locate the production - for r in C[j]: - if r.name != p.name: - continue - if r.len != p.len: - continue - i = 0 - # This look is comparing a production ". A B C" with "A B C ." - while i < r.lr_index: - if r.prod[i] != p.prod[i+1]: - break - i = i + 1 - else: - lookb.append((j, r)) - for i in includes: - if i not in includedict: - includedict[i] = [] - includedict[i].append((state, N)) - lookdict[(state, N)] = lookb - - return lookdict, includedict - - # ----------------------------------------------------------------------------- - # compute_read_sets() - # - # Given a set of LR(0) items, this function computes the read sets. - # - # Inputs: C = Set of LR(0) items - # ntrans = Set of nonterminal transitions - # nullable = Set of empty transitions - # - # Returns a set containing the read sets - # ----------------------------------------------------------------------------- - - def compute_read_sets(self, C, ntrans, nullable): - FP = lambda x: self.dr_relation(C, x, nullable) - R = lambda x: self.reads_relation(C, x, nullable) - F = digraph(ntrans, R, FP) - return F - - # ----------------------------------------------------------------------------- - # compute_follow_sets() - # - # Given a set of LR(0) items, a set of non-terminal transitions, a readset, - # and an include set, this function computes the follow sets - # - # Follow(p,A) = Read(p,A) U U {Follow(p',B) | (p,A) INCLUDES (p',B)} - # - # Inputs: - # ntrans = Set of nonterminal transitions - # readsets = Readset (previously computed) - # inclsets = Include sets (previously computed) - # - # Returns a set containing the follow sets - # ----------------------------------------------------------------------------- - - def compute_follow_sets(self, ntrans, readsets, inclsets): - FP = lambda x: readsets[x] - R = lambda x: inclsets.get(x, []) - F = digraph(ntrans, R, FP) - return F - - # ----------------------------------------------------------------------------- - # add_lookaheads() - # - # Attaches the lookahead symbols to grammar rules. - # - # Inputs: lookbacks - Set of lookback relations - # followset - Computed follow set - # - # This function directly attaches the lookaheads to productions contained - # in the lookbacks set - # ----------------------------------------------------------------------------- - - def add_lookaheads(self, lookbacks, followset): - for trans, lb in lookbacks.items(): - # Loop over productions in lookback - for state, p in lb: - if state not in p.lookaheads: - p.lookaheads[state] = [] - f = followset.get(trans, []) - for a in f: - if a not in p.lookaheads[state]: - p.lookaheads[state].append(a) - - # ----------------------------------------------------------------------------- - # add_lalr_lookaheads() - # - # This function does all of the work of adding lookahead information for use - # with LALR parsing - # ----------------------------------------------------------------------------- - - def add_lalr_lookaheads(self, C): - # Determine all of the nullable nonterminals - nullable = self.compute_nullable_nonterminals() - - # Find all non-terminal transitions - trans = self.find_nonterminal_transitions(C) - - # Compute read sets - readsets = self.compute_read_sets(C, trans, nullable) - - # Compute lookback/includes relations - lookd, included = self.compute_lookback_includes(C, trans, nullable) - - # Compute LALR FOLLOW sets - followsets = self.compute_follow_sets(trans, readsets, included) - - # Add all of the lookaheads - self.add_lookaheads(lookd, followsets) - - # ----------------------------------------------------------------------------- - # lr_parse_table() - # - # This function constructs the parse tables for SLR or LALR - # ----------------------------------------------------------------------------- - def lr_parse_table(self): - Productions = self.grammar.Productions - Precedence = self.grammar.Precedence - goto = self.lr_goto # Goto array - action = self.lr_action # Action array - log = self.log # Logger for output - - actionp = {} # Action production array (temporary) - - log.info('Parsing method: %s', self.lr_method) - - # Step 1: Construct C = { I0, I1, ... IN}, collection of LR(0) items - # This determines the number of states - - C = self.lr0_items() - - if self.lr_method == 'LALR': - self.add_lalr_lookaheads(C) - - # Build the parser table, state by state - st = 0 - for I in C: - # Loop over each production in I - actlist = [] # List of actions - st_action = {} - st_actionp = {} - st_goto = {} - log.info('') - log.info('state %d', st) - log.info('') - for p in I: - log.info(' (%d) %s', p.number, p) - log.info('') - - for p in I: - if p.len == p.lr_index + 1: - if p.name == "S'": - # Start symbol. Accept! - st_action['$end'] = 0 - st_actionp['$end'] = p - else: - # We are at the end of a production. Reduce! - if self.lr_method == 'LALR': - laheads = p.lookaheads[st] - else: - laheads = self.grammar.Follow[p.name] - for a in laheads: - actlist.append((a, p, 'reduce using rule %d (%s)' % (p.number, p))) - r = st_action.get(a) - if r is not None: - # Whoa. Have a shift/reduce or reduce/reduce conflict - if r > 0: - # Need to decide on shift or reduce here - # By default we favor shifting. Need to add - # some precedence rules here. - sprec, slevel = Productions[st_actionp[a].number].prec - rprec, rlevel = Precedence.get(a, ('right', 0)) - if (slevel < rlevel) or ((slevel == rlevel) and (rprec == 'left')): - # We really need to reduce here. - st_action[a] = -p.number - st_actionp[a] = p - if not slevel and not rlevel: - log.info(' ! shift/reduce conflict for %s resolved as reduce', a) - self.sr_conflicts.append((st, a, 'reduce')) - Productions[p.number].reduced += 1 - elif (slevel == rlevel) and (rprec == 'nonassoc'): - st_action[a] = None - else: - # Hmmm. Guess we'll keep the shift - if not rlevel: - log.info(' ! shift/reduce conflict for %s resolved as shift', a) - self.sr_conflicts.append((st, a, 'shift')) - elif r < 0: - # Reduce/reduce conflict. In this case, we favor the rule - # that was defined first in the grammar file - oldp = Productions[-r] - pp = Productions[p.number] - if oldp.line > pp.line: - st_action[a] = -p.number - st_actionp[a] = p - chosenp, rejectp = pp, oldp - Productions[p.number].reduced += 1 - Productions[oldp.number].reduced -= 1 - else: - chosenp, rejectp = oldp, pp - self.rr_conflicts.append((st, chosenp, rejectp)) - log.info(' ! reduce/reduce conflict for %s resolved using rule %d (%s)', - a, st_actionp[a].number, st_actionp[a]) - else: - raise LALRError('Unknown conflict in state %d' % st) - else: - st_action[a] = -p.number - st_actionp[a] = p - Productions[p.number].reduced += 1 - else: - i = p.lr_index - a = p.prod[i+1] # Get symbol right after the "." - if a in self.grammar.Terminals: - g = self.lr0_goto(I, a) - j = self.lr0_cidhash.get(id(g), -1) - if j >= 0: - # We are in a shift state - actlist.append((a, p, 'shift and go to state %d' % j)) - r = st_action.get(a) - if r is not None: - # Whoa have a shift/reduce or shift/shift conflict - if r > 0: - if r != j: - raise LALRError('Shift/shift conflict in state %d' % st) - elif r < 0: - # Do a precedence check. - # - if precedence of reduce rule is higher, we reduce. - # - if precedence of reduce is same and left assoc, we reduce. - # - otherwise we shift - rprec, rlevel = Productions[st_actionp[a].number].prec - sprec, slevel = Precedence.get(a, ('right', 0)) - if (slevel > rlevel) or ((slevel == rlevel) and (rprec == 'right')): - # We decide to shift here... highest precedence to shift - Productions[st_actionp[a].number].reduced -= 1 - st_action[a] = j - st_actionp[a] = p - if not rlevel: - log.info(' ! shift/reduce conflict for %s resolved as shift', a) - self.sr_conflicts.append((st, a, 'shift')) - elif (slevel == rlevel) and (rprec == 'nonassoc'): - st_action[a] = None - else: - # Hmmm. Guess we'll keep the reduce - if not slevel and not rlevel: - log.info(' ! shift/reduce conflict for %s resolved as reduce', a) - self.sr_conflicts.append((st, a, 'reduce')) - - else: - raise LALRError('Unknown conflict in state %d' % st) - else: - st_action[a] = j - st_actionp[a] = p - - # Print the actions associated with each terminal - _actprint = {} - for a, p, m in actlist: - if a in st_action: - if p is st_actionp[a]: - log.info(' %-15s %s', a, m) - _actprint[(a, m)] = 1 - log.info('') - # Print the actions that were not used. (debugging) - not_used = 0 - for a, p, m in actlist: - if a in st_action: - if p is not st_actionp[a]: - if not (a, m) in _actprint: - log.debug(' ! %-15s [ %s ]', a, m) - not_used = 1 - _actprint[(a, m)] = 1 - if not_used: - log.debug('') - - # Construct the goto table for this state - - nkeys = {} - for ii in I: - for s in ii.usyms: - if s in self.grammar.Nonterminals: - nkeys[s] = None - for n in nkeys: - g = self.lr0_goto(I, n) - j = self.lr0_cidhash.get(id(g), -1) - if j >= 0: - st_goto[n] = j - log.info(' %-30s shift and go to state %d', n, j) - - action[st] = st_action - actionp[st] = st_actionp - goto[st] = st_goto - st += 1 - - # ----------------------------------------------------------------------------- - # write() - # - # This function writes the LR parsing tables to a file - # ----------------------------------------------------------------------------- - - def write_table(self, tabmodule, outputdir='', signature=''): - if isinstance(tabmodule, types.ModuleType): - raise IOError("Won't overwrite existing tabmodule") - - basemodulename = tabmodule.split('.')[-1] - filename = os.path.join(outputdir, basemodulename) + '.py' - try: - f = open(filename, 'w') - - f.write(''' -# %s -# This file is automatically generated. Do not edit. -_tabversion = %r - -_lr_method = %r - -_lr_signature = %r - ''' % (os.path.basename(filename), __tabversion__, self.lr_method, signature)) - - # Change smaller to 0 to go back to original tables - smaller = 1 - - # Factor out names to try and make smaller - if smaller: - items = {} - - for s, nd in self.lr_action.items(): - for name, v in nd.items(): - i = items.get(name) - if not i: - i = ([], []) - items[name] = i - i[0].append(s) - i[1].append(v) - - f.write('\n_lr_action_items = {') - for k, v in items.items(): - f.write('%r:([' % k) - for i in v[0]: - f.write('%r,' % i) - f.write('],[') - for i in v[1]: - f.write('%r,' % i) - - f.write(']),') - f.write('}\n') - - f.write(''' -_lr_action = {} -for _k, _v in _lr_action_items.items(): - for _x,_y in zip(_v[0],_v[1]): - if not _x in _lr_action: _lr_action[_x] = {} - _lr_action[_x][_k] = _y -del _lr_action_items -''') - - else: - f.write('\n_lr_action = { ') - for k, v in self.lr_action.items(): - f.write('(%r,%r):%r,' % (k[0], k[1], v)) - f.write('}\n') - - if smaller: - # Factor out names to try and make smaller - items = {} - - for s, nd in self.lr_goto.items(): - for name, v in nd.items(): - i = items.get(name) - if not i: - i = ([], []) - items[name] = i - i[0].append(s) - i[1].append(v) - - f.write('\n_lr_goto_items = {') - for k, v in items.items(): - f.write('%r:([' % k) - for i in v[0]: - f.write('%r,' % i) - f.write('],[') - for i in v[1]: - f.write('%r,' % i) - - f.write(']),') - f.write('}\n') - - f.write(''' -_lr_goto = {} -for _k, _v in _lr_goto_items.items(): - for _x, _y in zip(_v[0], _v[1]): - if not _x in _lr_goto: _lr_goto[_x] = {} - _lr_goto[_x][_k] = _y -del _lr_goto_items -''') - else: - f.write('\n_lr_goto = { ') - for k, v in self.lr_goto.items(): - f.write('(%r,%r):%r,' % (k[0], k[1], v)) - f.write('}\n') - - # Write production table - f.write('_lr_productions = [\n') - for p in self.lr_productions: - if p.func: - f.write(' (%r,%r,%d,%r,%r,%d),\n' % (p.str, p.name, p.len, - p.func, os.path.basename(p.file), p.line)) - else: - f.write(' (%r,%r,%d,None,None,None),\n' % (str(p), p.name, p.len)) - f.write(']\n') - f.close() - - except IOError as e: - raise - - - # ----------------------------------------------------------------------------- - # pickle_table() - # - # This function pickles the LR parsing tables to a supplied file object - # ----------------------------------------------------------------------------- - - def pickle_table(self, filename, signature=''): - try: - import cPickle as pickle - except ImportError: - import pickle - with open(filename, 'wb') as outf: - pickle.dump(__tabversion__, outf, pickle_protocol) - pickle.dump(self.lr_method, outf, pickle_protocol) - pickle.dump(signature, outf, pickle_protocol) - pickle.dump(self.lr_action, outf, pickle_protocol) - pickle.dump(self.lr_goto, outf, pickle_protocol) - - outp = [] - for p in self.lr_productions: - if p.func: - outp.append((p.str, p.name, p.len, p.func, os.path.basename(p.file), p.line)) - else: - outp.append((str(p), p.name, p.len, None, None, None)) - pickle.dump(outp, outf, pickle_protocol) - -# ----------------------------------------------------------------------------- -# === INTROSPECTION === -# -# The following functions and classes are used to implement the PLY -# introspection features followed by the yacc() function itself. -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# get_caller_module_dict() -# -# This function returns a dictionary containing all of the symbols defined within -# a caller further down the call stack. This is used to get the environment -# associated with the yacc() call if none was provided. -# ----------------------------------------------------------------------------- - -def get_caller_module_dict(levels): - f = sys._getframe(levels) - ldict = f.f_globals.copy() - if f.f_globals != f.f_locals: - ldict.update(f.f_locals) - return ldict - -# ----------------------------------------------------------------------------- -# parse_grammar() -# -# This takes a raw grammar rule string and parses it into production data -# ----------------------------------------------------------------------------- -def parse_grammar(doc, file, line): - grammar = [] - # Split the doc string into lines - pstrings = doc.splitlines() - lastp = None - dline = line - for ps in pstrings: - dline += 1 - p = ps.split() - if not p: - continue - try: - if p[0] == '|': - # This is a continuation of a previous rule - if not lastp: - raise SyntaxError("%s:%d: Misplaced '|'" % (file, dline)) - prodname = lastp - syms = p[1:] - else: - prodname = p[0] - lastp = prodname - syms = p[2:] - assign = p[1] - if assign != ':' and assign != '::=': - raise SyntaxError("%s:%d: Syntax error. Expected ':'" % (file, dline)) - - grammar.append((file, dline, prodname, syms)) - except SyntaxError: - raise - except Exception: - raise SyntaxError('%s:%d: Syntax error in rule %r' % (file, dline, ps.strip())) - - return grammar - -# ----------------------------------------------------------------------------- -# ParserReflect() -# -# This class represents information extracted for building a parser including -# start symbol, error function, tokens, precedence list, action functions, -# etc. -# ----------------------------------------------------------------------------- -class ParserReflect(object): - def __init__(self, pdict, log=None): - self.pdict = pdict - self.start = None - self.error_func = None - self.tokens = None - self.modules = set() - self.grammar = [] - self.error = False - - if log is None: - self.log = PlyLogger(sys.stderr) - else: - self.log = log - - # Get all of the basic information - def get_all(self): - self.get_start() - self.get_error_func() - self.get_tokens() - self.get_precedence() - self.get_pfunctions() - - # Validate all of the information - def validate_all(self): - self.validate_start() - self.validate_error_func() - self.validate_tokens() - self.validate_precedence() - self.validate_pfunctions() - self.validate_modules() - return self.error - - # Compute a signature over the grammar - def signature(self): - try: - from hashlib import md5 - except ImportError: - from md5 import md5 - try: - sig = md5() - if self.start: - sig.update(self.start.encode('latin-1')) - if self.prec: - sig.update(''.join([''.join(p) for p in self.prec]).encode('latin-1')) - if self.tokens: - sig.update(' '.join(self.tokens).encode('latin-1')) - for f in self.pfuncs: - if f[3]: - sig.update(f[3].encode('latin-1')) - except (TypeError, ValueError): - pass - - digest = base64.b16encode(sig.digest()) - if sys.version_info[0] >= 3: - digest = digest.decode('latin-1') - return digest - - # ----------------------------------------------------------------------------- - # validate_modules() - # - # This method checks to see if there are duplicated p_rulename() functions - # in the parser module file. Without this function, it is really easy for - # users to make mistakes by cutting and pasting code fragments (and it's a real - # bugger to try and figure out why the resulting parser doesn't work). Therefore, - # we just do a little regular expression pattern matching of def statements - # to try and detect duplicates. - # ----------------------------------------------------------------------------- - - def validate_modules(self): - # Match def p_funcname( - fre = re.compile(r'\s*def\s+(p_[a-zA-Z_0-9]*)\(') - - for module in self.modules: - lines, linen = inspect.getsourcelines(module) - - counthash = {} - for linen, line in enumerate(lines): - linen += 1 - m = fre.match(line) - if m: - name = m.group(1) - prev = counthash.get(name) - if not prev: - counthash[name] = linen - else: - filename = inspect.getsourcefile(module) - self.log.warning('%s:%d: Function %s redefined. Previously defined on line %d', - filename, linen, name, prev) - - # Get the start symbol - def get_start(self): - self.start = self.pdict.get('start') - - # Validate the start symbol - def validate_start(self): - if self.start is not None: - if not isinstance(self.start, string_types): - self.log.error("'start' must be a string") - - # Look for error handler - def get_error_func(self): - self.error_func = self.pdict.get('p_error') - - # Validate the error function - def validate_error_func(self): - if self.error_func: - if isinstance(self.error_func, types.FunctionType): - ismethod = 0 - elif isinstance(self.error_func, types.MethodType): - ismethod = 1 - else: - self.log.error("'p_error' defined, but is not a function or method") - self.error = True - return - - eline = self.error_func.__code__.co_firstlineno - efile = self.error_func.__code__.co_filename - module = inspect.getmodule(self.error_func) - self.modules.add(module) - - argcount = self.error_func.__code__.co_argcount - ismethod - if argcount != 1: - self.log.error('%s:%d: p_error() requires 1 argument', efile, eline) - self.error = True - - # Get the tokens map - def get_tokens(self): - tokens = self.pdict.get('tokens') - if not tokens: - self.log.error('No token list is defined') - self.error = True - return - - if not isinstance(tokens, (list, tuple)): - self.log.error('tokens must be a list or tuple') - self.error = True - return - - if not tokens: - self.log.error('tokens is empty') - self.error = True - return - - self.tokens = tokens - - # Validate the tokens - def validate_tokens(self): - # Validate the tokens. - if 'error' in self.tokens: - self.log.error("Illegal token name 'error'. Is a reserved word") - self.error = True - return - - terminals = set() - for n in self.tokens: - if n in terminals: - self.log.warning('Token %r multiply defined', n) - terminals.add(n) - - # Get the precedence map (if any) - def get_precedence(self): - self.prec = self.pdict.get('precedence') - - # Validate and parse the precedence map - def validate_precedence(self): - preclist = [] - if self.prec: - if not isinstance(self.prec, (list, tuple)): - self.log.error('precedence must be a list or tuple') - self.error = True - return - for level, p in enumerate(self.prec): - if not isinstance(p, (list, tuple)): - self.log.error('Bad precedence table') - self.error = True - return - - if len(p) < 2: - self.log.error('Malformed precedence entry %s. Must be (assoc, term, ..., term)', p) - self.error = True - return - assoc = p[0] - if not isinstance(assoc, string_types): - self.log.error('precedence associativity must be a string') - self.error = True - return - for term in p[1:]: - if not isinstance(term, string_types): - self.log.error('precedence items must be strings') - self.error = True - return - preclist.append((term, assoc, level+1)) - self.preclist = preclist - - # Get all p_functions from the grammar - def get_pfunctions(self): - p_functions = [] - for name, item in self.pdict.items(): - if not name.startswith('p_') or name == 'p_error': - continue - if isinstance(item, (types.FunctionType, types.MethodType)): - line = item.__code__.co_firstlineno - module = inspect.getmodule(item) - p_functions.append((line, module, name, item.__doc__)) - - # Sort all of the actions by line number; make sure to stringify - # modules to make them sortable, since `line` may not uniquely sort all - # p functions - p_functions.sort(key=lambda p_function: ( - p_function[0], - str(p_function[1]), - p_function[2], - p_function[3])) - self.pfuncs = p_functions - - # Validate all of the p_functions - def validate_pfunctions(self): - grammar = [] - # Check for non-empty symbols - if len(self.pfuncs) == 0: - self.log.error('no rules of the form p_rulename are defined') - self.error = True - return - - for line, module, name, doc in self.pfuncs: - file = inspect.getsourcefile(module) - func = self.pdict[name] - if isinstance(func, types.MethodType): - reqargs = 2 - else: - reqargs = 1 - if func.__code__.co_argcount > reqargs: - self.log.error('%s:%d: Rule %r has too many arguments', file, line, func.__name__) - self.error = True - elif func.__code__.co_argcount < reqargs: - self.log.error('%s:%d: Rule %r requires an argument', file, line, func.__name__) - self.error = True - elif not func.__doc__: - self.log.warning('%s:%d: No documentation string specified in function %r (ignored)', - file, line, func.__name__) - else: - try: - parsed_g = parse_grammar(doc, file, line) - for g in parsed_g: - grammar.append((name, g)) - except SyntaxError as e: - self.log.error(str(e)) - self.error = True - - # Looks like a valid grammar rule - # Mark the file in which defined. - self.modules.add(module) - - # Secondary validation step that looks for p_ definitions that are not functions - # or functions that look like they might be grammar rules. - - for n, v in self.pdict.items(): - if n.startswith('p_') and isinstance(v, (types.FunctionType, types.MethodType)): - continue - if n.startswith('t_'): - continue - if n.startswith('p_') and n != 'p_error': - self.log.warning('%r not defined as a function', n) - if ((isinstance(v, types.FunctionType) and v.__code__.co_argcount == 1) or - (isinstance(v, types.MethodType) and v.__func__.__code__.co_argcount == 2)): - if v.__doc__: - try: - doc = v.__doc__.split(' ') - if doc[1] == ':': - self.log.warning('%s:%d: Possible grammar rule %r defined without p_ prefix', - v.__code__.co_filename, v.__code__.co_firstlineno, n) - except IndexError: - pass - - self.grammar = grammar - -# ----------------------------------------------------------------------------- -# yacc(module) -# -# Build a parser -# ----------------------------------------------------------------------------- - -def yacc(method='LALR', debug=yaccdebug, module=None, tabmodule=tab_module, start=None, - check_recursion=True, optimize=False, write_tables=True, debugfile=debug_file, - outputdir=None, debuglog=None, errorlog=None, picklefile=None): - - if tabmodule is None: - tabmodule = tab_module - - # Reference to the parsing method of the last built parser - global parse - - # If pickling is enabled, table files are not created - if picklefile: - write_tables = 0 - - if errorlog is None: - errorlog = PlyLogger(sys.stderr) - - # Get the module dictionary used for the parser - if module: - _items = [(k, getattr(module, k)) for k in dir(module)] - pdict = dict(_items) - # If no __file__ attribute is available, try to obtain it from the __module__ instead - if '__file__' not in pdict: - pdict['__file__'] = sys.modules[pdict['__module__']].__file__ - else: - pdict = get_caller_module_dict(2) - - if outputdir is None: - # If no output directory is set, the location of the output files - # is determined according to the following rules: - # - If tabmodule specifies a package, files go into that package directory - # - Otherwise, files go in the same directory as the specifying module - if isinstance(tabmodule, types.ModuleType): - srcfile = tabmodule.__file__ - else: - if '.' not in tabmodule: - srcfile = pdict['__file__'] - else: - parts = tabmodule.split('.') - pkgname = '.'.join(parts[:-1]) - exec('import %s' % pkgname) - srcfile = getattr(sys.modules[pkgname], '__file__', '') - outputdir = os.path.dirname(srcfile) - - # Determine if the module is package of a package or not. - # If so, fix the tabmodule setting so that tables load correctly - pkg = pdict.get('__package__') - if pkg and isinstance(tabmodule, str): - if '.' not in tabmodule: - tabmodule = pkg + '.' + tabmodule - - - - # Set start symbol if it's specified directly using an argument - if start is not None: - pdict['start'] = start - - # Collect parser information from the dictionary - pinfo = ParserReflect(pdict, log=errorlog) - pinfo.get_all() - - if pinfo.error: - raise YaccError('Unable to build parser') - - # Check signature against table files (if any) - signature = pinfo.signature() - - # Read the tables - try: - lr = LRTable() - if picklefile: - read_signature = lr.read_pickle(picklefile) - else: - read_signature = lr.read_table(tabmodule) - if optimize or (read_signature == signature): - try: - lr.bind_callables(pinfo.pdict) - parser = LRParser(lr, pinfo.error_func) - parse = parser.parse - return parser - except Exception as e: - errorlog.warning('There was a problem loading the table file: %r', e) - except VersionError as e: - errorlog.warning(str(e)) - except ImportError: - pass - - if debuglog is None: - if debug: - try: - debuglog = PlyLogger(open(os.path.join(outputdir, debugfile), 'w')) - except IOError as e: - errorlog.warning("Couldn't open %r. %s" % (debugfile, e)) - debuglog = NullLogger() - else: - debuglog = NullLogger() - - debuglog.info('Created by PLY version %s (http://www.dabeaz.com/ply)', __version__) - - errors = False - - # Validate the parser information - if pinfo.validate_all(): - raise YaccError('Unable to build parser') - - if not pinfo.error_func: - errorlog.warning('no p_error() function is defined') - - # Create a grammar object - grammar = Grammar(pinfo.tokens) - - # Set precedence level for terminals - for term, assoc, level in pinfo.preclist: - try: - grammar.set_precedence(term, assoc, level) - except GrammarError as e: - errorlog.warning('%s', e) - - # Add productions to the grammar - for funcname, gram in pinfo.grammar: - file, line, prodname, syms = gram - try: - grammar.add_production(prodname, syms, funcname, file, line) - except GrammarError as e: - errorlog.error('%s', e) - errors = True - - # Set the grammar start symbols - try: - if start is None: - grammar.set_start(pinfo.start) - else: - grammar.set_start(start) - except GrammarError as e: - errorlog.error(str(e)) - errors = True - - if errors: - raise YaccError('Unable to build parser') - - # Verify the grammar structure - undefined_symbols = grammar.undefined_symbols() - for sym, prod in undefined_symbols: - errorlog.error('%s:%d: Symbol %r used, but not defined as a token or a rule', prod.file, prod.line, sym) - errors = True - - unused_terminals = grammar.unused_terminals() - if unused_terminals: - debuglog.info('') - debuglog.info('Unused terminals:') - debuglog.info('') - for term in unused_terminals: - errorlog.warning('Token %r defined, but not used', term) - debuglog.info(' %s', term) - - # Print out all productions to the debug log - if debug: - debuglog.info('') - debuglog.info('Grammar') - debuglog.info('') - for n, p in enumerate(grammar.Productions): - debuglog.info('Rule %-5d %s', n, p) - - # Find unused non-terminals - unused_rules = grammar.unused_rules() - for prod in unused_rules: - errorlog.warning('%s:%d: Rule %r defined, but not used', prod.file, prod.line, prod.name) - - if len(unused_terminals) == 1: - errorlog.warning('There is 1 unused token') - if len(unused_terminals) > 1: - errorlog.warning('There are %d unused tokens', len(unused_terminals)) - - if len(unused_rules) == 1: - errorlog.warning('There is 1 unused rule') - if len(unused_rules) > 1: - errorlog.warning('There are %d unused rules', len(unused_rules)) - - if debug: - debuglog.info('') - debuglog.info('Terminals, with rules where they appear') - debuglog.info('') - terms = list(grammar.Terminals) - terms.sort() - for term in terms: - debuglog.info('%-20s : %s', term, ' '.join([str(s) for s in grammar.Terminals[term]])) - - debuglog.info('') - debuglog.info('Nonterminals, with rules where they appear') - debuglog.info('') - nonterms = list(grammar.Nonterminals) - nonterms.sort() - for nonterm in nonterms: - debuglog.info('%-20s : %s', nonterm, ' '.join([str(s) for s in grammar.Nonterminals[nonterm]])) - debuglog.info('') - - if check_recursion: - unreachable = grammar.find_unreachable() - for u in unreachable: - errorlog.warning('Symbol %r is unreachable', u) - - infinite = grammar.infinite_cycles() - for inf in infinite: - errorlog.error('Infinite recursion detected for symbol %r', inf) - errors = True - - unused_prec = grammar.unused_precedence() - for term, assoc in unused_prec: - errorlog.error('Precedence rule %r defined for unknown symbol %r', assoc, term) - errors = True - - if errors: - raise YaccError('Unable to build parser') - - # Run the LRGeneratedTable on the grammar - if debug: - errorlog.debug('Generating %s tables', method) - - lr = LRGeneratedTable(grammar, method, debuglog) - - if debug: - num_sr = len(lr.sr_conflicts) - - # Report shift/reduce and reduce/reduce conflicts - if num_sr == 1: - errorlog.warning('1 shift/reduce conflict') - elif num_sr > 1: - errorlog.warning('%d shift/reduce conflicts', num_sr) - - num_rr = len(lr.rr_conflicts) - if num_rr == 1: - errorlog.warning('1 reduce/reduce conflict') - elif num_rr > 1: - errorlog.warning('%d reduce/reduce conflicts', num_rr) - - # Write out conflicts to the output file - if debug and (lr.sr_conflicts or lr.rr_conflicts): - debuglog.warning('') - debuglog.warning('Conflicts:') - debuglog.warning('') - - for state, tok, resolution in lr.sr_conflicts: - debuglog.warning('shift/reduce conflict for %s in state %d resolved as %s', tok, state, resolution) - - already_reported = set() - for state, rule, rejected in lr.rr_conflicts: - if (state, id(rule), id(rejected)) in already_reported: - continue - debuglog.warning('reduce/reduce conflict in state %d resolved using rule (%s)', state, rule) - debuglog.warning('rejected rule (%s) in state %d', rejected, state) - errorlog.warning('reduce/reduce conflict in state %d resolved using rule (%s)', state, rule) - errorlog.warning('rejected rule (%s) in state %d', rejected, state) - already_reported.add((state, id(rule), id(rejected))) - - warned_never = [] - for state, rule, rejected in lr.rr_conflicts: - if not rejected.reduced and (rejected not in warned_never): - debuglog.warning('Rule (%s) is never reduced', rejected) - errorlog.warning('Rule (%s) is never reduced', rejected) - warned_never.append(rejected) - - # Write the table file if requested - if write_tables: - try: - lr.write_table(tabmodule, outputdir, signature) - except IOError as e: - errorlog.warning("Couldn't create %r. %s" % (tabmodule, e)) - - # Write a pickled version of the tables - if picklefile: - try: - lr.pickle_table(picklefile, signature) - except IOError as e: - errorlog.warning("Couldn't create %r. %s" % (picklefile, e)) - - # Build the parser - lr.bind_callables(pinfo.pdict) - parser = LRParser(lr, pinfo.error_func) - - parse = parser.parse - return parser diff --git a/scripts/EnumIterator/ply/ygen.py b/scripts/EnumIterator/ply/ygen.py deleted file mode 100644 index acf5ca1..0000000 --- a/scripts/EnumIterator/ply/ygen.py +++ /dev/null @@ -1,74 +0,0 @@ -# ply: ygen.py -# -# This is a support program that auto-generates different versions of the YACC parsing -# function with different features removed for the purposes of performance. -# -# Users should edit the method LParser.parsedebug() in yacc.py. The source code -# for that method is then used to create the other methods. See the comments in -# yacc.py for further details. - -import os.path -import shutil - -def get_source_range(lines, tag): - srclines = enumerate(lines) - start_tag = '#--! %s-start' % tag - end_tag = '#--! %s-end' % tag - - for start_index, line in srclines: - if line.strip().startswith(start_tag): - break - - for end_index, line in srclines: - if line.strip().endswith(end_tag): - break - - return (start_index + 1, end_index) - -def filter_section(lines, tag): - filtered_lines = [] - include = True - tag_text = '#--! %s' % tag - for line in lines: - if line.strip().startswith(tag_text): - include = not include - elif include: - filtered_lines.append(line) - return filtered_lines - -def main(): - dirname = os.path.dirname(__file__) - shutil.copy2(os.path.join(dirname, 'yacc.py'), os.path.join(dirname, 'yacc.py.bak')) - with open(os.path.join(dirname, 'yacc.py'), 'r') as f: - lines = f.readlines() - - parse_start, parse_end = get_source_range(lines, 'parsedebug') - parseopt_start, parseopt_end = get_source_range(lines, 'parseopt') - parseopt_notrack_start, parseopt_notrack_end = get_source_range(lines, 'parseopt-notrack') - - # Get the original source - orig_lines = lines[parse_start:parse_end] - - # Filter the DEBUG sections out - parseopt_lines = filter_section(orig_lines, 'DEBUG') - - # Filter the TRACKING sections out - parseopt_notrack_lines = filter_section(parseopt_lines, 'TRACKING') - - # Replace the parser source sections with updated versions - lines[parseopt_notrack_start:parseopt_notrack_end] = parseopt_notrack_lines - lines[parseopt_start:parseopt_end] = parseopt_lines - - lines = [line.rstrip()+'\n' for line in lines] - with open(os.path.join(dirname, 'yacc.py'), 'w') as f: - f.writelines(lines) - - print('Updated yacc.py') - -if __name__ == '__main__': - main() - - - - - diff --git a/scripts/format.sh b/scripts/format.sh new file mode 100644 index 0000000..4abfd46 --- /dev/null +++ b/scripts/format.sh @@ -0,0 +1,7 @@ +#!/bin/bash +echo "Formatting source code" +find include/ -name *.cpp -or -name *.h | xargs clang-format -i +find src/ -name *.cpp -or -name *.h | xargs clang-format -i +find tools/ -name *.cpp -or -name *.h | xargs clang-format -i +echo "Formatting shader code" +find shaders/ -name *.glsl | xargs clang-format -i \ No newline at end of file diff --git a/shaders/CrossPlatformSettings_piece_all.glsl b/shaders/CrossPlatformSettings_piece_all.glsl new file mode 100644 index 0000000..239303e --- /dev/null +++ b/shaders/CrossPlatformSettings_piece_all.glsl @@ -0,0 +1,76 @@ + +#define min3(a, b, c) min(a, min(b, c)) +#define max3(a, b, c) max(a, max(b, c)) + +#define float2 vec2 +#define float3 vec3 +#define float4 vec4 + +#define int2 ivec2 +#define int3 ivec3 +#define int4 ivec4 + +#define uint2 uvec2 +#define uint3 uvec3 +#define uint4 uvec4 + +#define float2x2 mat2 +#define float3x3 mat3 +#define float4x4 mat4 +#define ogre_float4x3 mat3x4 + +#define ushort uint +#define ushort3 uint3 +#define ushort4 uint4 + +// Short used for read operations. It's an int in GLSL & HLSL. An ushort in Metal +#define rshort int +#define rshort2 int2 +#define rint int +// Short used for write operations. It's an int in GLSL. An ushort in HLSL & Metal +#define wshort2 int2 +#define wshort3 int3 + +#define toFloat3x3(x) mat3(x) +#define buildFloat3x3(row0, row1, row2) mat3(row0, row1, row2) + +#define mul(x, y) ((x) * (y)) +#define saturate(x) clamp((x), 0.0, 1.0) +#define lerp mix +#define rsqrt inversesqrt +#define INLINE +#define NO_INTERPOLATION_PREFIX flat +#define NO_INTERPOLATION_SUFFIX + +#define PARAMS_ARG_DECL +#define PARAMS_ARG + +#define reversebits bitfieldReverse + +#define OGRE_Sample(tex, sampler, uv) texture(tex, uv) +#define OGRE_SampleLevel(tex, sampler, uv, lod) textureLod(tex, uv, lod) +#define OGRE_SampleArray2D(tex, sampler, uv, arrayIdx) texture(tex, vec3(uv, arrayIdx)) +#define OGRE_SampleArray2DLevel(tex, sampler, uv, arrayIdx, lod) textureLod(tex, vec3(uv, arrayIdx), lod) +#define OGRE_SampleArrayCubeLevel(tex, sampler, uv, arrayIdx, lod) textureLod(tex, vec4(uv, arrayIdx), lod) +#define OGRE_SampleGrad(tex, sampler, uv, ddx, ddy) textureGrad(tex, uv, ddx, ddy) +#define OGRE_SampleArray2DGrad(tex, sampler, uv, arrayIdx, ddx, ddy) textureGrad(tex, vec3(uv, arrayIdx), ddx, ddy) +#define OGRE_ddx(val) dFdx(val) +#define OGRE_ddy(val) dFdy(val) +#define OGRE_Load2D(tex, iuv, lod) texelFetch(tex, iuv, lod) +#define OGRE_LoadArray2D(tex, iuv, arrayIdx, lod) texelFetch(tex, ivec3(iuv, arrayIdx), lod) +#define OGRE_Load2DMS(tex, iuv, subsample) texelFetch(tex, iuv, subsample) + +#define OGRE_Load3D(tex, iuv, lod) texelFetch(tex, ivec3(iuv), lod) + +#define OGRE_GatherRed(tex, sampler, uv) textureGather(tex, uv, 0) +#define OGRE_GatherGreen(tex, sampler, uv) textureGather(tex, uv, 1) +#define OGRE_GatherBlue(tex, sampler, uv) textureGather(tex, uv, 2) + +#define bufferFetch1(buffer, idx) texelFetch(buffer, idx).x + +#define OGRE_SAMPLER_ARG_DECL(samplerName) +#define OGRE_SAMPLER_ARG(samplerName) + +#define OGRE_Texture3D_float4 sampler3D +#define OGRE_OUT_REF(declType, variableName) out declType variableName +#define OGRE_INOUT_REF(declType, variableName) inout declType variableName diff --git a/shaders/UavCrossPlatform_piece_all.glsl b/shaders/UavCrossPlatform_piece_all.glsl new file mode 100644 index 0000000..ccfe7e6 --- /dev/null +++ b/shaders/UavCrossPlatform_piece_all.glsl @@ -0,0 +1,19 @@ + +#define OGRE_imageLoad2D(inImage, iuv) imageLoad(inImage, int2(iuv)) +#define OGRE_imageLoad2DArray(inImage, iuvw) imageLoad(inImage, int3(iuvw)) + +#define OGRE_imageWrite2D1(outImage, iuv, value) imageStore(outImage, int2(iuv), float4(value, 0, 0, 0)) +#define OGRE_imageWrite2D2(outImage, iuv, value) imageStore(outImage, int2(iuv), float4(value, 0, 0)) +#define OGRE_imageWrite2D4(outImage, iuv, value) imageStore(outImage, int2(iuv), value) + +#define OGRE_imageLoad3D(inImage, iuv) imageLoad(inImage, int3(iuv)) + +#define OGRE_imageWrite3D1(outImage, iuv, value) imageStore(outImage, int3(iuv), value) +#define OGRE_imageWrite3D4(outImage, iuv, value) imageStore(outImage, int3(iuv), value) + +#define OGRE_imageWrite2DArray1(outImage, iuvw, value) imageStore(outImage, int3(iuvw), value) +#define OGRE_imageWrite2DArray4(outImage, iuvw, value) imageStore(outImage, int3(iuvw), value) + +#define __sharedOnlyBarrier \ + memoryBarrierShared(); \ + barrier(); diff --git a/shaders/bc1.glsl b/shaders/bc1.glsl new file mode 100644 index 0000000..b250ebc --- /dev/null +++ b/shaders/bc1.glsl @@ -0,0 +1,509 @@ +#version 430 core + +// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" + +#include "CrossPlatformSettings_piece_all.glsl" +#include "UavCrossPlatform_piece_all.glsl" + +#define FLT_MAX 340282346638528859811704183484516925440.0f + +uniform uint p_numRefinements; + +uniform sampler2D srcTex; + +layout(rg32ui) uniform restrict writeonly uimage2D dstTexture; + +layout(std430, binding = 1) readonly restrict buffer globalBuffer +{ + float2 c_oMatch5[256]; + float2 c_oMatch6[256]; +}; + +layout(local_size_x = 8, // + local_size_y = 8, // + local_size_z = 1) in; + +float3 rgb565to888(float rgb565) +{ + float3 retVal; + retVal.x = floor(rgb565 / 2048.0f); + retVal.y = floor(mod(rgb565, 2048.0f) / 32.0f); + retVal.z = floor(mod(rgb565, 32.0f)); + + // This is the correct 565 to 888 conversion: + // rgb = floor( rgb * ( 255.0f / float3( 31.0f, 63.0f, 31.0f ) ) + 0.5f ) + // + // However stb_dxt follows a different one: + // rb = floor( rb * ( 256 / 32 + 8 / 32 ) ); + // g = floor( g * ( 256 / 64 + 4 / 64 ) ); + // + // I'm not sure exactly why but it's possible this is how the S3TC specifies it should be decoded + // It's quite possible this is the reason: + // http://www.ludicon.com/castano/blog/2009/03/gpu-dxt-decompression/ + // + // Or maybe it's just because it's cheap to do with integer shifts. + // Anyway, we follow stb_dxt's conversion just in case + // (gives almost the same result, with 1 or -1 of difference for a very few values) + // + // Perhaps when we make 888 -> 565 -> 888 it doesn't matter + // because they end up mapping to the original number + + return floor(retVal * float3(8.25f, 4.0625f, 8.25f)); +} + +float rgb888to565(float3 rgbValue) +{ + rgbValue.rb = floor(rgbValue.rb * 31.0f / 255.0f + 0.5f); + rgbValue.g = floor(rgbValue.g * 63.0f / 255.0f + 0.5f); + + return rgbValue.r * 2048.0f + rgbValue.g * 32.0f + rgbValue.b; +} + +// linear interpolation at 1/3 point between a and b, using desired rounding type +float3 lerp13(float3 a, float3 b) +{ +#ifdef STB_DXT_USE_ROUNDING_BIAS + // with rounding bias + return a + floor((b - a) * (1.0f / 3.0f) + 0.5f); +#else + // without rounding bias + return floor((2.0f * a + b) / 3.0f); +#endif +} + +/// Unpacks a block of 4 colours from two 16-bit endpoints +void EvalColors(out float3 colours[4], float c0, float c1) +{ + colours[0] = rgb565to888(c0); + colours[1] = rgb565to888(c1); + colours[2] = lerp13(colours[0], colours[1]); + colours[3] = lerp13(colours[1], colours[0]); +} + +/** The color optimization function. (Clever code, part 1) +@param outMinEndp16 [out] + Minimum endpoint, in RGB565 +@param outMaxEndp16 [out] + Maximum endpoint, in RGB565 +*/ +void OptimizeColorsBlock(const uint srcPixelsBlock[16], out float outMinEndp16, out float outMaxEndp16) +{ + // determine color distribution + float3 avgColour; + float3 minColour; + float3 maxColour; + + avgColour = minColour = maxColour = unpackUnorm4x8(srcPixelsBlock[0]).xyz; + for (int i = 1; i < 16; ++i) + { + const float3 currColourUnorm = unpackUnorm4x8(srcPixelsBlock[i]).xyz; + avgColour += currColourUnorm; + minColour = min(minColour, currColourUnorm); + maxColour = max(maxColour, currColourUnorm); + } + + avgColour = round(avgColour * 255.0f / 16.0f); + maxColour *= 255.0f; + minColour *= 255.0f; + + // determine covariance matrix + float cov[6]; + for (int i = 0; i < 6; ++i) + cov[i] = 0; + + for (int i = 0; i < 16; ++i) + { + const float3 currColour = unpackUnorm4x8(srcPixelsBlock[i]).xyz * 255.0f; + float3 rgbDiff = currColour - avgColour; + + cov[0] += rgbDiff.r * rgbDiff.r; + cov[1] += rgbDiff.r * rgbDiff.g; + cov[2] += rgbDiff.r * rgbDiff.b; + cov[3] += rgbDiff.g * rgbDiff.g; + cov[4] += rgbDiff.g * rgbDiff.b; + cov[5] += rgbDiff.b * rgbDiff.b; + } + + // convert covariance matrix to float, find principal axis via power iter + for (int i = 0; i < 6; ++i) + cov[i] /= 255.0f; + + float3 vF = maxColour - minColour; + + const int nIterPower = 4; + for (int iter = 0; iter < nIterPower; ++iter) + { + const float r = vF.r * cov[0] + vF.g * cov[1] + vF.b * cov[2]; + const float g = vF.r * cov[1] + vF.g * cov[3] + vF.b * cov[4]; + const float b = vF.r * cov[2] + vF.g * cov[4] + vF.b * cov[5]; + + vF.r = r; + vF.g = g; + vF.b = b; + } + + float magn = max3(abs(vF.r), abs(vF.g), abs(vF.b)); + float3 v; + + if (magn < 4.0f) + { // too small, default to luminance + v.r = 299.0f; // JPEG YCbCr luma coefs, scaled by 1000. + v.g = 587.0f; + v.b = 114.0f; + } + else + { + v = trunc(vF * (512.0f / magn)); + } + + // Pick colors at extreme points + float3 minEndpoint, maxEndpoint; + float minDot = FLT_MAX; + float maxDot = -FLT_MAX; + for (int i = 0; i < 16; ++i) + { + const float3 currColour = unpackUnorm4x8(srcPixelsBlock[i]).xyz * 255.0f; + const float dotValue = dot(currColour, v); + + if (dotValue < minDot) + { + minDot = dotValue; + minEndpoint = currColour; + } + + if (dotValue > maxDot) + { + maxDot = dotValue; + maxEndpoint = currColour; + } + } + + outMinEndp16 = rgb888to565(minEndpoint); + outMaxEndp16 = rgb888to565(maxEndpoint); +} + +// The color matching function +uint MatchColorsBlock(const uint srcPixelsBlock[16], float3 colour[4]) +{ + uint mask = 0u; + float3 dir = colour[0] - colour[1]; + float stops[4]; + + for (int i = 0; i < 4; ++i) + stops[i] = dot(colour[i], dir); + + // think of the colors as arranged on a line; project point onto that line, then choose + // next color out of available ones. we compute the crossover points for "best color in top + // half"/"best in bottom half" and then the same inside that subinterval. + // + // relying on this 1d approximation isn't always optimal in terms of euclidean distance, + // but it's very close and a lot faster. + // http://cbloomrants.blogspot.com/2008/12/12-08-08-dxtc-summary.html + + float c0Point = trunc((stops[1] + stops[3]) * 0.5f); + float halfPoint = trunc((stops[3] + stops[2]) * 0.5f); + float c3Point = trunc((stops[2] + stops[0]) * 0.5f); + +#ifndef BC1_DITHER + // the version without dithering is straightforward + for (uint i = 16u; i-- > 0u;) + { + const float3 currColour = unpackUnorm4x8(srcPixelsBlock[i]).xyz * 255.0f; + + const float dotValue = dot(currColour, dir); + mask <<= 2u; + + if (dotValue < halfPoint) + mask |= ((dotValue < c0Point) ? 1u : 3u); + else + mask |= ((dotValue < c3Point) ? 2u : 0u); + } +#else + // with floyd-steinberg dithering + float4 ep1 = float4(0, 0, 0, 0); + float4 ep2 = float4(0, 0, 0, 0); + + c0Point *= 16.0f; + halfPoint *= 16.0f; + c3Point *= 16.0f; + + for (uint y = 0u; y < 4u; ++y) + { + float ditherDot; + uint lmask, step; + + float3 currColour; + float dotValue; + + currColour = unpackUnorm4x8(srcPixelsBlock[y * 4 + 0]).xyz * 255.0f; + dotValue = dot(currColour, dir); + + ditherDot = (dotValue * 16.0f) + (3 * ep2[1] + 5 * ep2[0]); + if (ditherDot < halfPoint) + step = (ditherDot < c0Point) ? 1u : 3u; + else + step = (ditherDot < c3Point) ? 2u : 0u; + ep1[0] = dotValue - stops[step]; + lmask = step; + + currColour = unpackUnorm4x8(srcPixelsBlock[y * 4 + 1]).xyz * 255.0f; + dotValue = dot(currColour, dir); + + ditherDot = (dotValue * 16.0f) + (7 * ep1[0] + 3 * ep2[2] + 5 * ep2[1] + ep2[0]); + if (ditherDot < halfPoint) + step = (ditherDot < c0Point) ? 1u : 3u; + else + step = (ditherDot < c3Point) ? 2u : 0u; + ep1[1] = dotValue - stops[step]; + lmask |= step << 2u; + + currColour = unpackUnorm4x8(srcPixelsBlock[y * 4 + 2]).xyz * 255.0f; + dotValue = dot(currColour, dir); + + ditherDot = (dotValue * 16.0f) + (7 * ep1[1] + 3 * ep2[3] + 5 * ep2[2] + ep2[1]); + if (ditherDot < halfPoint) + step = (ditherDot < c0Point) ? 1u : 3u; + else + step = (ditherDot < c3Point) ? 2u : 0u; + ep1[2] = dotValue - stops[step]; + lmask |= step << 4u; + + currColour = unpackUnorm4x8(srcPixelsBlock[y * 4 + 2]).xyz * 255.0f; + dotValue = dot(currColour, dir); + + ditherDot = (dotValue * 16.0f) + (7 * ep1[2] + 5 * ep2[3] + ep2[2]); + if (ditherDot < halfPoint) + step = (ditherDot < c0Point) ? 1u : 3u; + else + step = (ditherDot < c3Point) ? 2u : 0u; + ep1[3] = dotValue - stops[step]; + lmask |= step << 6u; + + mask |= lmask << (y * 8u); + { + float4 tmp = ep1; + ep1 = ep2; + ep2 = tmp; + } // swap + } +#endif + + return mask; +} + +// The refinement function. (Clever code, part 2) +// Tries to optimize colors to suit block contents better. +// (By solving a least squares system via normal equations+Cramer's rule) +bool RefineBlock(const uint srcPixelsBlock[16], uint mask, inout float inOutMinEndp16, inout float inOutMaxEndp16) +{ + float newMin16, newMax16; + const float oldMin = inOutMinEndp16; + const float oldMax = inOutMaxEndp16; + + if ((mask ^ (mask << 2u)) < 4u) // all pixels have the same index? + { + // yes, linear system would be singular; solve using optimal + // single-color match on average color + float3 rgbVal = float3(8.0f / 255.0f, 8.0f / 255.0f, 8.0f / 255.0f); + for (int i = 0; i < 16; ++i) + rgbVal += unpackUnorm4x8(srcPixelsBlock[i]).xyz; + + rgbVal = floor(rgbVal * (255.0f / 16.0f)); + + newMax16 = c_oMatch5[uint(rgbVal.r)][0] * 2048.0f + // + c_oMatch6[uint(rgbVal.g)][0] * 32.0f + // + c_oMatch5[uint(rgbVal.b)][0]; + newMin16 = c_oMatch5[uint(rgbVal.r)][1] * 2048.0f + // + c_oMatch6[uint(rgbVal.g)][1] * 32.0f + // + c_oMatch5[uint(rgbVal.b)][1]; + } + else + { + const float w1Tab[4] = {3, 0, 2, 1}; + const float prods[4] = {589824.0f, 2304.0f, 262402.0f, 66562.0f}; + // ^some magic to save a lot of multiplies in the accumulating loop... + // (precomputed products of weights for least squares system, accumulated inside one 32-bit + // register) + + float akku = 0.0f; + uint cm = mask; + float3 at1 = float3(0, 0, 0); + float3 at2 = float3(0, 0, 0); + for (int i = 0; i < 16; ++i, cm >>= 2u) + { + const float3 currColour = unpackUnorm4x8(srcPixelsBlock[i]).xyz * 255.0f; + + const uint step = cm & 3u; + const float w1 = w1Tab[step]; + akku += prods[step]; + at1 += currColour * w1; + at2 += currColour; + } + + at2 = 3.0f * at2 - at1; + + // extract solutions and decide solvability + const float xx = floor(akku / 65535.0f); + const float yy = floor(mod(akku, 65535.0f) / 256.0f); + const float xy = mod(akku, 256.0f); + + float2 f_rb_g; + f_rb_g.x = 3.0f * 31.0f / 255.0f / (xx * yy - xy * xy); + f_rb_g.y = f_rb_g.x * 63.0f / 31.0f; + + // solve. + const float3 newMaxVal = + clamp(floor((at1 * yy - at2 * xy) * f_rb_g.xyx + 0.5f), float3(0.0f, 0.0f, 0.0f), float3(31, 63, 31)); + newMax16 = newMaxVal.x * 2048.0f + newMaxVal.y * 32.0f + newMaxVal.z; + + const float3 newMinVal = + clamp(floor((at2 * xx - at1 * xy) * f_rb_g.xyx + 0.5f), float3(0.0f, 0.0f, 0.0f), float3(31, 63, 31)); + newMin16 = newMinVal.x * 2048.0f + newMinVal.y * 32.0f + newMinVal.z; + } + + inOutMinEndp16 = newMin16; + inOutMaxEndp16 = newMax16; + + return oldMin != newMin16 || oldMax != newMax16; +} + +#ifdef BC1_DITHER +/// Quantizes 'srcValue' which is originally in 888 (full range), +/// converting it to 565 and then back to 888 (quantized) +float3 quant(float3 srcValue) +{ + srcValue = clamp(srcValue, 0.0f, 255.0f); + // Convert 888 -> 565 + srcValue = floor(srcValue * float3(31.0f / 255.0f, 63.0f / 255.0f, 31.0f / 255.0f) + 0.5f); + // Convert 565 -> 888 back + srcValue = floor(srcValue * float3(8.25f, 4.0625f, 8.25f)); + + return srcValue; +} + +void DitherBlock(const uint srcPixBlck[16], out uint dthPixBlck[16]) +{ + float3 ep1[4] = {float3(0, 0, 0), float3(0, 0, 0), float3(0, 0, 0), float3(0, 0, 0)}; + float3 ep2[4] = {float3(0, 0, 0), float3(0, 0, 0), float3(0, 0, 0), float3(0, 0, 0)}; + + for (uint y = 0u; y < 16u; y += 4u) + { + float3 srcPixel, dithPixel; + + srcPixel = unpackUnorm4x8(srcPixBlck[y + 0u]).xyz * 255.0f; + dithPixel = quant(srcPixel + trunc((3 * ep2[1] + 5 * ep2[0]) * (1.0f / 16.0f))); + ep1[0] = srcPixel - dithPixel; + dthPixBlck[y + 0u] = packUnorm4x8(float4(dithPixel * (1.0f / 255.0f), 1.0f)); + + srcPixel = unpackUnorm4x8(srcPixBlck[y + 1u]).xyz * 255.0f; + dithPixel = quant(srcPixel + trunc((7 * ep1[0] + 3 * ep2[2] + 5 * ep2[1] + ep2[0]) * (1.0f / 16.0f))); + ep1[1] = srcPixel - dithPixel; + dthPixBlck[y + 1u] = packUnorm4x8(float4(dithPixel * (1.0f / 255.0f), 1.0f)); + + srcPixel = unpackUnorm4x8(srcPixBlck[y + 2u]).xyz * 255.0f; + dithPixel = quant(srcPixel + trunc((7 * ep1[1] + 3 * ep2[3] + 5 * ep2[2] + ep2[1]) * (1.0f / 16.0f))); + ep1[2] = srcPixel - dithPixel; + dthPixBlck[y + 2u] = packUnorm4x8(float4(dithPixel * (1.0f / 255.0f), 1.0f)); + + srcPixel = unpackUnorm4x8(srcPixBlck[y + 3u]).xyz * 255.0f; + dithPixel = quant(srcPixel + trunc((7 * ep1[2] + 5 * ep2[3] + ep2[2]) * (1.0f / 16.0f))); + ep1[3] = srcPixel - dithPixel; + dthPixBlck[y + 3u] = packUnorm4x8(float4(dithPixel * (1.0f / 255.0f), 1.0f)); + + // swap( ep1, ep2 ) + for (uint i = 0u; i < 4u; ++i) + { + float3 tmp = ep1[i]; + ep1[i] = ep2[i]; + ep2[i] = tmp; + } + } +} +#endif + +void main() +{ + uint srcPixelsBlock[16]; + + bool bAllColoursEqual = true; + + // Load the whole 4x4 block + const uint2 pixelsToLoadBase = gl_GlobalInvocationID.xy << 2u; + for (uint i = 0u; i < 16u; ++i) + { + const uint2 pixelsToLoad = pixelsToLoadBase + uint2(i & 0x03u, i >> 2u); + const float3 srcPixels0 = OGRE_Load2D(srcTex, int2(pixelsToLoad), 0).xyz; + srcPixelsBlock[i] = packUnorm4x8(float4(srcPixels0, 1.0f)); + bAllColoursEqual = bAllColoursEqual && srcPixelsBlock[0] == srcPixelsBlock[i]; + } + + float maxEndp16, minEndp16; + uint mask = 0u; + + if (bAllColoursEqual) + { + const uint3 rgbVal = uint3(unpackUnorm4x8(srcPixelsBlock[0]).xyz * 255.0f); + mask = 0xAAAAAAAAu; + maxEndp16 = c_oMatch5[rgbVal.r][0] * 2048.0f + c_oMatch6[rgbVal.g][0] * 32.0f + c_oMatch5[rgbVal.b][0]; + minEndp16 = c_oMatch5[rgbVal.r][1] * 2048.0f + c_oMatch6[rgbVal.g][1] * 32.0f + c_oMatch5[rgbVal.b][1]; + } + else + { +#ifdef BC1_DITHER + uint ditherPixelsBlock[16]; + // first step: compute dithered version for PCA if desired + DitherBlock(srcPixelsBlock, ditherPixelsBlock); +#else +#define ditherPixelsBlock srcPixelsBlock +#endif + + // second step: pca+map along principal axis + OptimizeColorsBlock(ditherPixelsBlock, minEndp16, maxEndp16); + if (minEndp16 != maxEndp16) + { + float3 colours[4]; + EvalColors(colours, maxEndp16, minEndp16); // Note min/max are inverted + mask = MatchColorsBlock(srcPixelsBlock, colours); + } + + // third step: refine (multiple times if requested) + bool bStopRefinement = false; + for (uint i = 0u; i < p_numRefinements && !bStopRefinement; ++i) + { + const uint lastMask = mask; + + if (RefineBlock(ditherPixelsBlock, mask, minEndp16, maxEndp16)) + { + if (minEndp16 != maxEndp16) + { + float3 colours[4]; + EvalColors(colours, maxEndp16, minEndp16); // Note min/max are inverted + mask = MatchColorsBlock(srcPixelsBlock, colours); + } + else + { + mask = 0u; + bStopRefinement = true; + } + } + + bStopRefinement = mask == lastMask || bStopRefinement; + } + } + + // write the color block + if (maxEndp16 < minEndp16) + { + const float tmpValue = minEndp16; + minEndp16 = maxEndp16; + maxEndp16 = tmpValue; + mask ^= 0x55555555u; + } + + uint2 outputBytes; + outputBytes.x = uint(maxEndp16) | (uint(minEndp16) << 16u); + outputBytes.y = mask; + + uint2 dstUV = gl_GlobalInvocationID.xy; + imageStore(dstTexture, int2(dstUV), uint4(outputBytes.xy, 0u, 0u)); +} diff --git a/bin/Data/bc1_dither.glsl b/shaders/bc1_dither.glsl similarity index 100% rename from bin/Data/bc1_dither.glsl rename to shaders/bc1_dither.glsl diff --git a/shaders/bc4.glsl b/shaders/bc4.glsl new file mode 100644 index 0000000..51d2ac2 --- /dev/null +++ b/shaders/bc4.glsl @@ -0,0 +1,154 @@ +#version 430 core + +// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" + +#include "CrossPlatformSettings_piece_all.glsl" +#include "UavCrossPlatform_piece_all.glsl" + +shared float2 g_minMaxValues[4u * 4u * 4u]; +shared uint2 g_mask[4u * 4u]; + +layout(location = 0) uniform float2 params; + +#define p_channelIdx params.x +#define p_useSNorm params.y + +uniform sampler2D srcTex; + +layout(rg32ui) uniform restrict writeonly uimage2D dstTexture; + +layout(local_size_x = 4, // + local_size_y = 4, // + local_size_z = 4) in; + +/// Each block is 16 pixels +/// Each thread works on 4 pixels +/// Therefore each block needs 4 threads, generating 8 masks +/// At the end these 8 masks get merged into 2 and results written to output +/// +/// **Q: Why 4 pixels per thread? Why not 1 pixel per thread? Why not 2? Why not 16?** +/// +/// A: It's a sweetspot. +/// - Very short threads cannot fill expensive GPUs with enough work (dispatch bound) +/// - Lots of threads means lots of synchronization (e.g. evaluating min/max, merging masks) +/// overhead, and also more LDS usage which reduces occupancy. +/// - Long threads (e.g. 1 thread per block) misses parallelism opportunities +void main() +{ + float minVal, maxVal; + float4 srcPixel; + + const uint blockThreadId = gl_LocalInvocationID.x; + + const uint2 pixelsToLoadBase = gl_GlobalInvocationID.yz << 2u; + + for (uint i = 0u; i < 4u; ++i) + { + const uint2 pixelsToLoad = pixelsToLoadBase + uint2(i, blockThreadId); + + const float4 value = OGRE_Load2D(srcTex, int2(pixelsToLoad), 0).xyzw; + srcPixel[i] = p_channelIdx == 0 ? value.x : (p_channelIdx == 1 ? value.y : value.w); + srcPixel[i] *= 255.0f; + } + + minVal = min3(srcPixel.x, srcPixel.y, srcPixel.z); + maxVal = max3(srcPixel.x, srcPixel.y, srcPixel.z); + minVal = min(minVal, srcPixel.w); + maxVal = max(maxVal, srcPixel.w); + + const uint minMaxIdxBase = (gl_LocalInvocationID.z << 4u) + (gl_LocalInvocationID.y << 2u); + const uint maskIdxBase = (gl_LocalInvocationID.z << 2u) + gl_LocalInvocationID.y; + + g_minMaxValues[minMaxIdxBase + blockThreadId] = float2(minVal, maxVal); + g_mask[maskIdxBase] = uint2(0u, 0u); + + __sharedOnlyBarrier; + + // Have all 4 threads in the block grab the min/max value by comparing what all 4 threads uploaded + for (uint i = 0u; i < 4u; ++i) + { + minVal = min(g_minMaxValues[minMaxIdxBase + i].x, minVal); + maxVal = max(g_minMaxValues[minMaxIdxBase + i].y, maxVal); + } + + // determine bias and emit color indices + // given the choice of maxVal/minVal, these indices are optimal: + // http://fgiesen.wordpress.com/2009/12/15/dxt5-alpha-block-index-determination/ + float dist = maxVal - minVal; + float dist4 = dist * 4.0f; + float dist2 = dist * 2.0f; + float bias = (dist < 8) ? (dist - 1) : (trunc(dist * 0.5f) + 2); + bias -= minVal * 7; + + uint mask0 = 0u, mask1 = 0u; + + for (uint i = 0u; i < 4u; ++i) + { + float a = srcPixel[i] * 7.0f + bias; + + int ind = 0; + + // select index. this is a "linear scale" lerp factor between 0 (val=min) and 7 (val=max). + if (a >= dist4) + { + ind = 4; + a -= dist4; + } + + if (a >= dist2) + { + ind += 2; + a -= dist2; + } + + if (a >= dist) + ind += 1; + + // turn linear scale into DXT index (0/1 are extremal pts) + ind = -ind & 7; + ind ^= (2 > ind) ? 1 : 0; + + // write index + const uint bits = 16u + ((blockThreadId << 2u) + i) * 3u; + if (bits < 32u) + { + mask0 |= uint(ind) << bits; + if (bits + 3u > 32u) + { + mask1 |= uint(ind) >> (32u - bits); + } + } + else + { + mask1 |= uint(ind) << (bits - 32u); + } + } + + if (mask0 != 0u) + atomicOr(g_mask[maskIdxBase].x, mask0); + if (mask1 != 0u) + atomicOr(g_mask[maskIdxBase].y, mask1); + + __sharedOnlyBarrier; + + if (blockThreadId == 0u) + { + // Save data + uint2 outputBytes; + + if (p_useSNorm != 0.0f) + { + outputBytes.x = packSnorm4x8( + float4(maxVal * (1.0f / 255.0f) * 2.0f - 1.0f, minVal * (1.0f / 255.0f) * 2.0f - 1.0f, 0.0f, 0.0f)); + } + else + { + outputBytes.x = packUnorm4x8(float4(maxVal * (1.0f / 255.0f), minVal * (1.0f / 255.0f), 0.0f, 0.0f)); + } + outputBytes.x |= g_mask[maskIdxBase].x; + outputBytes.y = g_mask[maskIdxBase].y; + + uint2 dstUV = gl_GlobalInvocationID.yz; + imageStore(dstTexture, int2(dstUV), uint4(outputBytes.xy, 0u, 0u)); + } +} diff --git a/shaders/bc6h.glsl b/shaders/bc6h.glsl new file mode 100644 index 0000000..db7cef2 --- /dev/null +++ b/shaders/bc6h.glsl @@ -0,0 +1,639 @@ +#version 430 core + +#include "CrossPlatformSettings_piece_all.glsl" +#include "UavCrossPlatform_piece_all.glsl" + +#define QUALITY + +// SIGNED macro is WIP +//#define SIGNED + +float3 f32tof16(float3 value) +{ + return float3(packHalf2x16(float2(value.x, 0.0)), packHalf2x16(float2(value.y, 0.0)), + packHalf2x16(float2(value.z, 0.0))); +} + +float3 f16tof32(uint3 value) +{ + return float3(unpackHalf2x16(value.x).x, unpackHalf2x16(value.y).x, unpackHalf2x16(value.z).x); +} + +float f32tof16(float value) +{ + return packHalf2x16(float2(value.x, 0.0)); +} + +float f16tof32(uint value) +{ + return unpackHalf2x16(value.x).x; +} + +uniform sampler2D srcTexture; + +layout(rgba32ui) uniform restrict writeonly uimage2D dstTexture; + +layout(location = 0) uniform float2 p_textureSizeRcp; + +const float HALF_MAX = 65504.0f; +const uint PATTERN_NUM = 32u; + +float CalcMSLE(float3 a, float3 b) +{ + float3 err = log2((b + 1.0f) / (a + 1.0f)); + ; + err = err * err; + return err.x + err.y + err.z; +} + +uint PatternFixupID(uint i) +{ + uint ret = 15u; + ret = ((3441033216u >> i) & 0x1u) != 0 ? 2u : ret; + ret = ((845414400u >> i) & 0x1u) != 0 ? 8u : ret; + return ret; +} + +uint Pattern(uint p, uint i) +{ + uint p2 = p / 2u; + uint p3 = p - p2 * 2u; + + uint enc = 0u; + enc = p2 == 0u ? 2290666700u : enc; + enc = p2 == 1u ? 3972591342u : enc; + enc = p2 == 2u ? 4276930688u : enc; + enc = p2 == 3u ? 3967876808u : enc; + enc = p2 == 4u ? 4293707776u : enc; + enc = p2 == 5u ? 3892379264u : enc; + enc = p2 == 6u ? 4278255592u : enc; + enc = p2 == 7u ? 4026597360u : enc; + enc = p2 == 8u ? 9369360u : enc; + enc = p2 == 9u ? 147747072u : enc; + enc = p2 == 10u ? 1930428556u : enc; + enc = p2 == 11u ? 2362323200u : enc; + enc = p2 == 12u ? 823134348u : enc; + enc = p2 == 13u ? 913073766u : enc; + enc = p2 == 14u ? 267393000u : enc; + enc = p2 == 15u ? 966553998u : enc; + + enc = p3 != 0u ? enc >> 16u : enc; + uint ret = (enc >> i) & 0x1u; + return ret; +} + +#ifndef SIGNED +// UF +float3 Quantize7(float3 x) +{ + return (f32tof16(x) * 128.0f) / (0x7bff + 1.0f); +} + +float3 Quantize9(float3 x) +{ + return (f32tof16(x) * 512.0f) / (0x7bff + 1.0f); +} + +float3 Quantize10(float3 x) +{ + return (f32tof16(x) * 1024.0f) / (0x7bff + 1.0f); +} + +float3 Unquantize7(float3 x) +{ + return (x * 65536.0f + 0x8000) / 128.0f; +} + +float3 Unquantize9(float3 x) +{ + return (x * 65536.0f + 0x8000) / 512.0f; +} + +float3 Unquantize10(float3 x) +{ + return (x * 65536.0f + 0x8000) / 1024.0f; +} + +float3 FinishUnquantize(float3 endpoint0Unq, float3 endpoint1Unq, float weight) +{ + float3 comp = (endpoint0Unq * (64.0f - weight) + endpoint1Unq * weight + 32.0f) * (31.0f / 4096.0f); + return f16tof32(uint3(comp)); +} +#else +// SF + +float3 cmpSign(float3 value) +{ + float3 signVal; + signVal.x = value.x >= 0.0f ? 1.0f : -1.0f; + signVal.y = value.y >= 0.0f ? 1.0f : -1.0f; + signVal.z = value.z >= 0.0f ? 1.0f : -1.0f; + return signVal; +} + +float3 Quantize7(float3 x) +{ + float3 signVal = cmpSign(x); + return signVal * (f32tof16(abs(x)) * 64.0f) / (0x7bff + 1.0f); +} + +float3 Quantize9(float3 x) +{ + float3 signVal = cmpSign(x); + return signVal * (f32tof16(abs(x)) * 256.0f) / (0x7bff + 1.0f); +} + +float3 Quantize10(float3 x) +{ + float3 signVal = cmpSign(x); + return signVal * (f32tof16(abs(x)) * 512.0f) / (0x7bff + 1.0f); +} + +float3 Unquantize7(float3 x) +{ + float3 signVal = sign(x); + x = abs(x); + float3 finalVal = signVal * (x * 32768.0f + 0x4000) / 64.0f; + finalVal.x = x.x >= 64.0f ? 32767.0 : finalVal.x; + finalVal.y = x.y >= 64.0f ? 32767.0 : finalVal.y; + finalVal.z = x.z >= 64.0f ? 32767.0 : finalVal.z; + return finalVal; +} + +float3 Unquantize9(float3 x) +{ + float3 signVal = sign(x); + x = abs(x); + float3 finalVal = signVal * (x * 32768.0f + 0x4000) / 256.0f; + finalVal.x = x.x >= 256.0f ? 32767.0 : finalVal.x; + finalVal.y = x.y >= 256.0f ? 32767.0 : finalVal.y; + finalVal.z = x.z >= 256.0f ? 32767.0 : finalVal.z; + return finalVal; +} + +float3 Unquantize10(float3 x) +{ + float3 signVal = sign(x); + x = abs(x); + float3 finalVal = signVal * (x * 32768.0f + 0x4000) / 512.0f; + finalVal.x = x.x >= 512.0f ? 32767.0 : finalVal.x; + finalVal.y = x.y >= 512.0f ? 32767.0 : finalVal.y; + finalVal.z = x.z >= 512.0f ? 32767.0 : finalVal.z; + return finalVal; +} + +float3 FinishUnquantize(float3 endpoint0Unq, float3 endpoint1Unq, float weight) +{ + float3 comp = (endpoint0Unq * (64.0f - weight) + endpoint1Unq * weight + 32.0f) * (31.0f / 2048.0f); + /*float3 signVal; + signVal.x = comp.x >= 0.0f ? 0.0f : 0x8000; + signVal.y = comp.y >= 0.0f ? 0.0f : 0x8000; + signVal.z = comp.z >= 0.0f ? 0.0f : 0x8000;*/ + // return f16tof32( uint3( signVal + abs( comp ) ) ); + return f16tof32(uint3(comp)); +} +#endif + +void Swap(inout float3 a, inout float3 b) +{ + float3 tmp = a; + a = b; + b = tmp; +} + +void Swap(inout float a, inout float b) +{ + float tmp = a; + a = b; + b = tmp; +} + +uint ComputeIndex3(float texelPos, float endPoint0Pos, float endPoint1Pos) +{ + float r = (texelPos - endPoint0Pos) / (endPoint1Pos - endPoint0Pos); + return uint(clamp(r * 6.98182f + 0.00909f + 0.5f, 0.0f, 7.0f)); +} + +uint ComputeIndex4(float texelPos, float endPoint0Pos, float endPoint1Pos) +{ + float r = (texelPos - endPoint0Pos) / (endPoint1Pos - endPoint0Pos); + return uint(clamp(r * 14.93333f + 0.03333f + 0.5f, 0.0f, 15.0f)); +} + +void SignExtend(inout float3 v1, uint mask, uint signFlag) +{ + int3 v = int3(v1); + v.x = (v.x & int(mask)) | (v.x < 0 ? int(signFlag) : 0); + v.y = (v.y & int(mask)) | (v.y < 0 ? int(signFlag) : 0); + v.z = (v.z & int(mask)) | (v.z < 0 ? int(signFlag) : 0); + v1 = v; +} + +void EncodeP1(inout uint4 block, inout float blockMSLE, float3 texels[16]) +{ + // compute endpoints (min/max RGB bbox) + float3 blockMin = texels[0]; + float3 blockMax = texels[0]; + for (uint i = 1u; i < 16u; ++i) + { + blockMin = min(blockMin, texels[i]); + blockMax = max(blockMax, texels[i]); + } + + // refine endpoints in log2 RGB space + float3 refinedBlockMin = blockMax; + float3 refinedBlockMax = blockMin; + for (uint i = 0u; i < 16u; ++i) + { + refinedBlockMin = min(refinedBlockMin, texels[i] == blockMin ? refinedBlockMin : texels[i]); + refinedBlockMax = max(refinedBlockMax, texels[i] == blockMax ? refinedBlockMax : texels[i]); + } + + float3 logBlockMax = log2(blockMax + 1.0f); + float3 logBlockMin = log2(blockMin + 1.0f); + float3 logRefinedBlockMax = log2(refinedBlockMax + 1.0f); + float3 logRefinedBlockMin = log2(refinedBlockMin + 1.0f); + float3 logBlockMaxExt = (logBlockMax - logBlockMin) * (1.0f / 32.0f); + logBlockMin += min(logRefinedBlockMin - logBlockMin, logBlockMaxExt); + logBlockMax -= min(logBlockMax - logRefinedBlockMax, logBlockMaxExt); + blockMin = exp2(logBlockMin) - 1.0f; + blockMax = exp2(logBlockMax) - 1.0f; + + float3 blockDir = blockMax - blockMin; + blockDir = blockDir / (blockDir.x + blockDir.y + blockDir.z); + + float3 endpoint0 = Quantize10(blockMin); + float3 endpoint1 = Quantize10(blockMax); + float endPoint0Pos = f32tof16(dot(blockMin, blockDir)); + float endPoint1Pos = f32tof16(dot(blockMax, blockDir)); + + // check if endpoint swap is required + float fixupTexelPos = f32tof16(dot(texels[0], blockDir)); + uint fixupIndex = ComputeIndex4(fixupTexelPos, endPoint0Pos, endPoint1Pos); + if (fixupIndex > 7) + { + Swap(endPoint0Pos, endPoint1Pos); + Swap(endpoint0, endpoint1); + } + + // compute indices + uint indices[16] = {0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u}; + for (uint i = 0u; i < 16u; ++i) + { + float texelPos = f32tof16(dot(texels[i], blockDir)); + indices[i] = ComputeIndex4(texelPos, endPoint0Pos, endPoint1Pos); + } + + // compute compression error (MSLE) + float3 endpoint0Unq = Unquantize10(endpoint0); + float3 endpoint1Unq = Unquantize10(endpoint1); + float msle = 0.0f; + for (uint i = 0u; i < 16u; ++i) + { + float weight = floor((indices[i] * 64.0f) / 15.0f + 0.5f); + float3 texelUnc = FinishUnquantize(endpoint0Unq, endpoint1Unq, weight); + + msle += CalcMSLE(texels[i], texelUnc); + } + + // encode block for mode 11 + blockMSLE = msle; + block.x = 0x03; + + // endpoints + block.x |= uint(endpoint0.x) << 5u; + block.x |= uint(endpoint0.y) << 15u; + block.x |= uint(endpoint0.z) << 25u; + block.y |= uint(endpoint0.z) >> 7u; + block.y |= uint(endpoint1.x) << 3u; + block.y |= uint(endpoint1.y) << 13u; + block.y |= uint(endpoint1.z) << 23u; + block.z |= uint(endpoint1.z) >> 9u; + + // indices + block.z |= indices[0] << 1u; + block.z |= indices[1] << 4u; + block.z |= indices[2] << 8u; + block.z |= indices[3] << 12u; + block.z |= indices[4] << 16u; + block.z |= indices[5] << 20u; + block.z |= indices[6] << 24u; + block.z |= indices[7] << 28u; + block.w |= indices[8] << 0u; + block.w |= indices[9] << 4u; + block.w |= indices[10] << 8u; + block.w |= indices[11] << 12u; + block.w |= indices[12] << 16u; + block.w |= indices[13] << 20u; + block.w |= indices[14] << 24u; + block.w |= indices[15] << 28u; +} + +void EncodeP2Pattern(inout uint4 block, inout float blockMSLE, uint pattern, float3 texels[16]) +{ + float3 p0BlockMin = float3(HALF_MAX, HALF_MAX, HALF_MAX); + float3 p0BlockMax = float3(0.0f, 0.0f, 0.0f); + float3 p1BlockMin = float3(HALF_MAX, HALF_MAX, HALF_MAX); + float3 p1BlockMax = float3(0.0f, 0.0f, 0.0f); + + for (uint i = 0u; i < 16u; ++i) + { + uint paletteID = Pattern(pattern, i); + if (paletteID == 0) + { + p0BlockMin = min(p0BlockMin, texels[i]); + p0BlockMax = max(p0BlockMax, texels[i]); + } + else + { + p1BlockMin = min(p1BlockMin, texels[i]); + p1BlockMax = max(p1BlockMax, texels[i]); + } + } + + float3 p0BlockDir = p0BlockMax - p0BlockMin; + float3 p1BlockDir = p1BlockMax - p1BlockMin; + p0BlockDir = p0BlockDir / (p0BlockDir.x + p0BlockDir.y + p0BlockDir.z); + p1BlockDir = p1BlockDir / (p1BlockDir.x + p1BlockDir.y + p1BlockDir.z); + + float p0Endpoint0Pos = f32tof16(dot(p0BlockMin, p0BlockDir)); + float p0Endpoint1Pos = f32tof16(dot(p0BlockMax, p0BlockDir)); + float p1Endpoint0Pos = f32tof16(dot(p1BlockMin, p1BlockDir)); + float p1Endpoint1Pos = f32tof16(dot(p1BlockMax, p1BlockDir)); + + uint fixupID = PatternFixupID(pattern); + float p0FixupTexelPos = f32tof16(dot(texels[0], p0BlockDir)); + float p1FixupTexelPos = f32tof16(dot(texels[fixupID], p1BlockDir)); + uint p0FixupIndex = ComputeIndex3(p0FixupTexelPos, p0Endpoint0Pos, p0Endpoint1Pos); + uint p1FixupIndex = ComputeIndex3(p1FixupTexelPos, p1Endpoint0Pos, p1Endpoint1Pos); + if (p0FixupIndex > 3u) + { + Swap(p0Endpoint0Pos, p0Endpoint1Pos); + Swap(p0BlockMin, p0BlockMax); + } + if (p1FixupIndex > 3u) + { + Swap(p1Endpoint0Pos, p1Endpoint1Pos); + Swap(p1BlockMin, p1BlockMax); + } + + uint indices[16] = {0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u}; + for (uint i = 0u; i < 16u; ++i) + { + float p0TexelPos = f32tof16(dot(texels[i], p0BlockDir)); + float p1TexelPos = f32tof16(dot(texels[i], p1BlockDir)); + uint p0Index = ComputeIndex3(p0TexelPos, p0Endpoint0Pos, p0Endpoint1Pos); + uint p1Index = ComputeIndex3(p1TexelPos, p1Endpoint0Pos, p1Endpoint1Pos); + + uint paletteID = Pattern(pattern, i); + indices[i] = paletteID == 0u ? p0Index : p1Index; + } + + float3 endpoint760 = floor(Quantize7(p0BlockMin)); + float3 endpoint761 = floor(Quantize7(p0BlockMax)); + float3 endpoint762 = floor(Quantize7(p1BlockMin)); + float3 endpoint763 = floor(Quantize7(p1BlockMax)); + + float3 endpoint950 = floor(Quantize9(p0BlockMin)); + float3 endpoint951 = floor(Quantize9(p0BlockMax)); + float3 endpoint952 = floor(Quantize9(p1BlockMin)); + float3 endpoint953 = floor(Quantize9(p1BlockMax)); + + endpoint761 = endpoint761 - endpoint760; + endpoint762 = endpoint762 - endpoint760; + endpoint763 = endpoint763 - endpoint760; + + endpoint951 = endpoint951 - endpoint950; + endpoint952 = endpoint952 - endpoint950; + endpoint953 = endpoint953 - endpoint950; + + int maxVal76 = 0x1F; + endpoint761 = clamp(endpoint761, -maxVal76, maxVal76); + endpoint762 = clamp(endpoint762, -maxVal76, maxVal76); + endpoint763 = clamp(endpoint763, -maxVal76, maxVal76); + + int maxVal95 = 0xF; + endpoint951 = clamp(endpoint951, -maxVal95, maxVal95); + endpoint952 = clamp(endpoint952, -maxVal95, maxVal95); + endpoint953 = clamp(endpoint953, -maxVal95, maxVal95); + + float3 endpoint760Unq = Unquantize7(endpoint760); + float3 endpoint761Unq = Unquantize7(endpoint760 + endpoint761); + float3 endpoint762Unq = Unquantize7(endpoint760 + endpoint762); + float3 endpoint763Unq = Unquantize7(endpoint760 + endpoint763); + float3 endpoint950Unq = Unquantize9(endpoint950); + float3 endpoint951Unq = Unquantize9(endpoint950 + endpoint951); + float3 endpoint952Unq = Unquantize9(endpoint950 + endpoint952); + float3 endpoint953Unq = Unquantize9(endpoint950 + endpoint953); + + float msle76 = 0.0f; + float msle95 = 0.0f; + for (uint i = 0u; i < 16u; ++i) + { + uint paletteID = Pattern(pattern, i); + + float3 tmp760Unq = paletteID == 0u ? endpoint760Unq : endpoint762Unq; + float3 tmp761Unq = paletteID == 0u ? endpoint761Unq : endpoint763Unq; + float3 tmp950Unq = paletteID == 0u ? endpoint950Unq : endpoint952Unq; + float3 tmp951Unq = paletteID == 0u ? endpoint951Unq : endpoint953Unq; + + float weight = floor((indices[i] * 64.0f) / 7.0f + 0.5f); + float3 texelUnc76 = FinishUnquantize(tmp760Unq, tmp761Unq, weight); + float3 texelUnc95 = FinishUnquantize(tmp950Unq, tmp951Unq, weight); + + msle76 += CalcMSLE(texels[i], texelUnc76); + msle95 += CalcMSLE(texels[i], texelUnc95); + } + + SignExtend(endpoint761, 0x1F, 0x20); + SignExtend(endpoint762, 0x1F, 0x20); + SignExtend(endpoint763, 0x1F, 0x20); + + SignExtend(endpoint951, 0xF, 0x10); + SignExtend(endpoint952, 0xF, 0x10); + SignExtend(endpoint953, 0xF, 0x10); + + // encode block + float p2MSLE = min(msle76, msle95); + if (p2MSLE < blockMSLE) + { + blockMSLE = p2MSLE; + block = uint4(0u, 0u, 0u, 0u); + + if (p2MSLE == msle76) + { + // 7.6 + block.x = 0x1u; + block.x |= (uint(endpoint762.y) & 0x20u) >> 3u; + block.x |= (uint(endpoint763.y) & 0x10u) >> 1u; + block.x |= (uint(endpoint763.y) & 0x20u) >> 1u; + block.x |= uint(endpoint760.x) << 5u; + block.x |= (uint(endpoint763.z) & 0x01u) << 12u; + block.x |= (uint(endpoint763.z) & 0x02u) << 12u; + block.x |= (uint(endpoint762.z) & 0x10u) << 10u; + block.x |= uint(endpoint760.y) << 15u; + block.x |= (uint(endpoint762.z) & 0x20u) << 17u; + block.x |= (uint(endpoint763.z) & 0x04u) << 21u; + block.x |= (uint(endpoint762.y) & 0x10u) << 20u; + block.x |= uint(endpoint760.z) << 25u; + block.y |= (uint(endpoint763.z) & 0x08u) >> 3u; + block.y |= (uint(endpoint763.z) & 0x20u) >> 4u; + block.y |= (uint(endpoint763.z) & 0x10u) >> 2u; + block.y |= uint(endpoint761.x) << 3u; + block.y |= (uint(endpoint762.y) & 0x0Fu) << 9u; + block.y |= uint(endpoint761.y) << 13u; + block.y |= (uint(endpoint763.y) & 0x0Fu) << 19u; + block.y |= uint(endpoint761.z) << 23u; + block.y |= (uint(endpoint762.z) & 0x07u) << 29u; + block.z |= (uint(endpoint762.z) & 0x08u) >> 3u; + block.z |= uint(endpoint762.x) << 1u; + block.z |= uint(endpoint763.x) << 7u; + } + else + { + // 9.5 + block.x = 0xEu; + block.x |= uint(endpoint950.x) << 5u; + block.x |= (uint(endpoint952.z) & 0x10u) << 10u; + block.x |= uint(endpoint950.y) << 15u; + block.x |= (uint(endpoint952.y) & 0x10u) << 20u; + block.x |= uint(endpoint950.z) << 25u; + block.y |= uint(endpoint950.z) >> 7u; + block.y |= (uint(endpoint953.z) & 0x10u) >> 2u; + block.y |= uint(endpoint951.x) << 3u; + block.y |= (uint(endpoint953.y) & 0x10u) << 4u; + block.y |= (uint(endpoint952.y) & 0x0Fu) << 9u; + block.y |= uint(endpoint951.y) << 13u; + block.y |= (uint(endpoint953.z) & 0x01u) << 18u; + block.y |= (uint(endpoint953.y) & 0x0Fu) << 19u; + block.y |= uint(endpoint951.z) << 23u; + block.y |= (uint(endpoint953.z) & 0x02u) << 27u; + block.y |= uint(endpoint952.z) << 29u; + block.z |= (uint(endpoint952.z) & 0x08u) >> 3u; + block.z |= uint(endpoint952.x) << 1u; + block.z |= (uint(endpoint953.z) & 0x04u) << 4u; + block.z |= uint(endpoint953.x) << 7u; + block.z |= (uint(endpoint953.z) & 0x08u) << 9u; + } + + block.z |= pattern << 13u; + uint blockFixupID = PatternFixupID(pattern); + if (blockFixupID == 15u) + { + block.z |= indices[0] << 18u; + block.z |= indices[1] << 20u; + block.z |= indices[2] << 23u; + block.z |= indices[3] << 26u; + block.z |= indices[4] << 29u; + block.w |= indices[5] << 0u; + block.w |= indices[6] << 3u; + block.w |= indices[7] << 6u; + block.w |= indices[8] << 9u; + block.w |= indices[9] << 12u; + block.w |= indices[10] << 15u; + block.w |= indices[11] << 18u; + block.w |= indices[12] << 21u; + block.w |= indices[13] << 24u; + block.w |= indices[14] << 27u; + block.w |= indices[15] << 30u; + } + else if (blockFixupID == 2u) + { + block.z |= indices[0] << 18u; + block.z |= indices[1] << 20u; + block.z |= indices[2] << 23u; + block.z |= indices[3] << 25u; + block.z |= indices[4] << 28u; + block.z |= indices[5] << 31u; + block.w |= indices[5] >> 1u; + block.w |= indices[6] << 2u; + block.w |= indices[7] << 5u; + block.w |= indices[8] << 8u; + block.w |= indices[9] << 11u; + block.w |= indices[10] << 14u; + block.w |= indices[11] << 17u; + block.w |= indices[12] << 20u; + block.w |= indices[13] << 23u; + block.w |= indices[14] << 26u; + block.w |= indices[15] << 29u; + } + else + { + block.z |= indices[0] << 18u; + block.z |= indices[1] << 20u; + block.z |= indices[2] << 23u; + block.z |= indices[3] << 26u; + block.z |= indices[4] << 29u; + block.w |= indices[5] << 0u; + block.w |= indices[6] << 3u; + block.w |= indices[7] << 6u; + block.w |= indices[8] << 9u; + block.w |= indices[9] << 11u; + block.w |= indices[10] << 14u; + block.w |= indices[11] << 17u; + block.w |= indices[12] << 20u; + block.w |= indices[13] << 23u; + block.w |= indices[14] << 26u; + block.w |= indices[15] << 29u; + } + } +} + +layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in; + +void main() +{ + // gather texels for current 4x4 block + // 0 1 2 3 + // 4 5 6 7 + // 8 9 10 11 + // 12 13 14 15 + float2 uv = gl_GlobalInvocationID.xy * p_textureSizeRcp * 4.0f - p_textureSizeRcp; + float2 block0UV = uv; + float2 block1UV = uv + float2(2.0f * p_textureSizeRcp.x, 0.0f); + float2 block2UV = uv + float2(0.0f, 2.0f * p_textureSizeRcp.y); + float2 block3UV = uv + float2(2.0f * p_textureSizeRcp.x, 2.0f * p_textureSizeRcp.y); + float4 block0X = OGRE_GatherRed(srcTexture, pointSampler, block0UV); + float4 block1X = OGRE_GatherRed(srcTexture, pointSampler, block1UV); + float4 block2X = OGRE_GatherRed(srcTexture, pointSampler, block2UV); + float4 block3X = OGRE_GatherRed(srcTexture, pointSampler, block3UV); + float4 block0Y = OGRE_GatherGreen(srcTexture, pointSampler, block0UV); + float4 block1Y = OGRE_GatherGreen(srcTexture, pointSampler, block1UV); + float4 block2Y = OGRE_GatherGreen(srcTexture, pointSampler, block2UV); + float4 block3Y = OGRE_GatherGreen(srcTexture, pointSampler, block3UV); + float4 block0Z = OGRE_GatherBlue(srcTexture, pointSampler, block0UV); + float4 block1Z = OGRE_GatherBlue(srcTexture, pointSampler, block1UV); + float4 block2Z = OGRE_GatherBlue(srcTexture, pointSampler, block2UV); + float4 block3Z = OGRE_GatherBlue(srcTexture, pointSampler, block3UV); + + float3 texels[16]; + texels[0] = float3(block0X.w, block0Y.w, block0Z.w); + texels[1] = float3(block0X.z, block0Y.z, block0Z.z); + texels[2] = float3(block1X.w, block1Y.w, block1Z.w); + texels[3] = float3(block1X.z, block1Y.z, block1Z.z); + texels[4] = float3(block0X.x, block0Y.x, block0Z.x); + texels[5] = float3(block0X.y, block0Y.y, block0Z.y); + texels[6] = float3(block1X.x, block1Y.x, block1Z.x); + texels[7] = float3(block1X.y, block1Y.y, block1Z.y); + texels[8] = float3(block2X.w, block2Y.w, block2Z.w); + texels[9] = float3(block2X.z, block2Y.z, block2Z.z); + texels[10] = float3(block3X.w, block3Y.w, block3Z.w); + texels[11] = float3(block3X.z, block3Y.z, block3Z.z); + texels[12] = float3(block2X.x, block2Y.x, block2Z.x); + texels[13] = float3(block2X.y, block2Y.y, block2Z.y); + texels[14] = float3(block3X.x, block3Y.x, block3Z.x); + texels[15] = float3(block3X.y, block3Y.y, block3Z.y); + + uint4 block = uint4(0u, 0u, 0u, 0u); + float blockMSLE = 0.0f; + + EncodeP1(block, blockMSLE, texels); +#ifdef QUALITY + for (uint i = 0u; i < 32u; ++i) + { + EncodeP2Pattern(block, blockMSLE, i, texels); + } +#endif + + imageStore(dstTexture, int2(gl_GlobalInvocationID.xy), block); +} diff --git a/shaders/dither555.glsl b/shaders/dither555.glsl new file mode 100644 index 0000000..a6c8d25 --- /dev/null +++ b/shaders/dither555.glsl @@ -0,0 +1,91 @@ +#version 430 core + +// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" + +#include "CrossPlatformSettings_piece_all.glsl" +#include "UavCrossPlatform_piece_all.glsl" + +uniform sampler2D srcTex; + +layout(rgba8) uniform restrict writeonly image2D dstTexture; + +layout(local_size_x = 8, // + local_size_y = 8, // + local_size_z = 1) in; + +/// Quantizes 'srcValue' which is originally in 888 (full range), +/// converting it to 555 and then back to 888 (quantized) +float3 quant(float3 srcValue) +{ + srcValue = clamp(srcValue, 0.0f, 255.0f); + // Convert 888 -> 555 + srcValue = floor(srcValue * 31.0f / 255.0f + 0.5f); + // Convert 555 -> 888 back + srcValue = floor(srcValue * 8.25f); + + return srcValue; +} + +void main() +{ + float3 ep1[4] = {float3(0, 0, 0), float3(0, 0, 0), float3(0, 0, 0), float3(0, 0, 0)}; + float3 ep2[4] = {float3(0, 0, 0), float3(0, 0, 0), float3(0, 0, 0), float3(0, 0, 0)}; + + const uint2 pixelsToLoadBase = gl_GlobalInvocationID.xy << 2u; + float3 srcPixel0 = OGRE_Load2D(srcTex, int2(pixelsToLoadBase), 0).xyz * 255.0f; + bool bAllColoursEqual = true; + + for (uint y = 0u; y < 4u; ++y) + { + float3 srcPixel, dithPixel; + int2 iUV; + + iUV = int2(pixelsToLoadBase + uint2(0u, y)); + srcPixel = OGRE_Load2D(srcTex, iUV, 0).xyz * 255.0f; + bAllColoursEqual = bAllColoursEqual && srcPixel0 == srcPixel; + dithPixel = quant(srcPixel + trunc((3 * ep2[1] + 5 * ep2[0]) * (1.0f / 16.0f))); + ep1[0] = srcPixel - dithPixel; + imageStore(dstTexture, iUV, float4(dithPixel * (1.0f / 255.0f), 1.0f)); + + iUV = int2(pixelsToLoadBase + uint2(1u, y)); + srcPixel = OGRE_Load2D(srcTex, iUV, 0).xyz * 255.0f; + bAllColoursEqual = bAllColoursEqual && srcPixel0 == srcPixel; + dithPixel = quant(srcPixel + trunc((7 * ep1[0] + 3 * ep2[2] + 5 * ep2[1] + ep2[0]) * (1.0f / 16.0f))); + ep1[1] = srcPixel - dithPixel; + imageStore(dstTexture, iUV, float4(dithPixel * (1.0f / 255.0f), 1.0f)); + + iUV = int2(pixelsToLoadBase + uint2(2u, y)); + srcPixel = OGRE_Load2D(srcTex, iUV, 0).xyz * 255.0f; + bAllColoursEqual = bAllColoursEqual && srcPixel0 == srcPixel; + dithPixel = quant(srcPixel + trunc((7 * ep1[1] + 3 * ep2[3] + 5 * ep2[2] + ep2[1]) * (1.0f / 16.0f))); + ep1[2] = srcPixel - dithPixel; + imageStore(dstTexture, iUV, float4(dithPixel * (1.0f / 255.0f), 1.0f)); + + iUV = int2(pixelsToLoadBase + uint2(3u, y)); + srcPixel = OGRE_Load2D(srcTex, iUV, 0).xyz * 255.0f; + bAllColoursEqual = bAllColoursEqual && srcPixel0 == srcPixel; + dithPixel = quant(srcPixel + trunc((7 * ep1[2] + 5 * ep2[3] + ep2[2]) * (1.0f / 16.0f))); + ep1[3] = srcPixel - dithPixel; + imageStore(dstTexture, iUV, float4(dithPixel * (1.0f / 255.0f), 1.0f)); + + // swap( ep1, ep2 ) + for (uint i = 0u; i < 4u; ++i) + { + float3 tmp = ep1[i]; + ep1[i] = ep2[i]; + ep2[i] = tmp; + } + } + + if (bAllColoursEqual) + { + // Oops. All colours were equal. We shouldn't have applied dither. + // Overwrite our changes with a raw copy. + for (uint i = 0u; i < 16u; ++i) + { + const int2 iUV = int2(pixelsToLoadBase + uint2(i & 0x03u, i >> 2u)); + const float3 srcPixels0 = OGRE_Load2D(srcTex, iUV, 0).xyz; + imageStore(dstTexture, iUV, float4(srcPixels0, 1.0f)); + } + } +} diff --git a/shaders/eac.glsl b/shaders/eac.glsl new file mode 100644 index 0000000..3344717 --- /dev/null +++ b/shaders/eac.glsl @@ -0,0 +1,312 @@ +#version 430 core + +// Define this to use the compressor to generate data for R11 (or RG11) +// Without defining this, the compressor generates data for ETC2_Alpha +// It's almost the same but there are subtle differences +// (they differ on how multiplier = 0 is handled. ETC2_Alpha just forbids it; also +// due to their 8-bit and 11-bit differences, in Alpha mode we can take a shorcut +// if all pixels in the block are of the same value) +// #define R11_EAC + +#ifndef R11_EAC +// Ballot & group vote are both used as optimization (both must be present or none) +// We have a fallback path if it's not supported +#extension GL_ARB_shader_ballot : enable +#extension GL_ARB_shader_group_vote : enable + +#ifdef GL_ARB_shader_ballot +#ifdef GL_ARB_shader_group_vote +#define WARP_SYNC_AVAILABLE +#endif +#endif +#endif + +// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" + +#include "CrossPlatformSettings_piece_all.glsl" +#include "UavCrossPlatform_piece_all.glsl" + +#define FLT_MAX 340282346638528859811704183484516925440.0f + +#define PotentialSolution uint + +#ifdef R11_EAC +#define EAC_FETCH_SWIZZLE r +#define EAC_RANGE 2047.0f +#define EAC_MULTIPLIER_START 0u +#else +#define EAC_FETCH_SWIZZLE a +#define EAC_RANGE 255.0f +#define EAC_MULTIPLIER_START 1u +#endif + +PotentialSolution storePotentialSolution(const float baseCodeword, const int tableIdx, const float multiplier) +{ + return packUnorm4x8(float4(baseCodeword, float(tableIdx), multiplier, 0.0f) * (1.0f / 255.0f)); +} + +void loadPotentialSolution(PotentialSolution potentialSolution, out float baseCodeword, out uint tableIdx, + out float multiplier) +{ + const float4 val = unpackUnorm4x8(potentialSolution); + baseCodeword = val.x * 255.0f; + tableIdx = uint(val.y * 255.0f); + multiplier = val.z * 255.0f; +} + +// For alpha support +const float kEacModifiers[16][8] = { // + {-3, -6, -9, -15, 2, 5, 8, 14}, // + {-3, -7, -10, -13, 2, 6, 9, 12}, // + {-2, -5, -8, -13, 1, 4, 7, 12}, // + {-2, -4, -6, -13, 1, 3, 5, 12}, // + {-3, -6, -8, -12, 2, 5, 7, 11}, // + {-3, -7, -9, -11, 2, 6, 8, 10}, // + {-4, -7, -8, -11, 3, 6, 7, 10}, // + {-3, -5, -8, -11, 2, 4, 7, 10}, // + {-2, -6, -8, -10, 1, 5, 7, 9}, // + {-2, -5, -8, -10, 1, 4, 7, 9}, // + {-2, -4, -8, -10, 1, 3, 7, 9}, // + {-2, -5, -7, -10, 1, 4, 6, 9}, // + {-3, -4, -7, -10, 2, 3, 6, 9}, // + {-1, -2, -3, -10, 0, 1, 2, 9}, // + {-4, -6, -8, -9, 3, 5, 7, 8}, // + {-3, -5, -7, -9, 2, 4, 6, 8}}; + +// 2 sets of 16 float3 (rgba8_unorm) for each ETC block +// We use rgba8_unorm encoding because it's 6kb vs 1.5kb of LDS. The former kills occupancy +shared float g_srcPixelsBlock[16]; +shared PotentialSolution g_bestSolution[256]; +shared float g_bestError[256]; +#ifndef R11_EAC +shared bool g_allPixelsEqual; + +layout(location = 0) uniform float p_greenChannel; +#endif + +uniform sampler2D srcTex; + +layout(rg32ui) uniform restrict writeonly uimage2D dstTexture; + +layout(local_size_x = 256, // + local_size_y = 1, // + local_size_z = 1) in; + +float calcError(float3 a, float3 b) +{ + float3 diff = a - b; + return dot(diff, diff); +} + +float eac_find_best_error(float baseCodeword, float multiplier, const int tableIdx) +{ + float accumError = 0.0f; + +#ifdef R11_EAC + baseCodeword = baseCodeword * 8.0f + 4.0f; + multiplier = multiplier > 0.0f ? multiplier * 8.0f : 1.0f; +#endif + + for (int i = 0; i < 16; ++i) + { + const float realV = g_srcPixelsBlock[i]; + float bestError = FLT_MAX; + + // Find modifier index through brute force + for (int j = 0; j < 8 && bestError > 0; ++j) + { + const float tryValue = clamp(baseCodeword + kEacModifiers[tableIdx][j] * multiplier, 0.0f, EAC_RANGE); + const float error = abs(realV - tryValue); + if (error < bestError) + bestError = error; + } + + accumError += bestError * bestError; + } + + return accumError; +} + +void eac_pack(float baseCodeword, float multiplier, const uint tableIdx) +{ + const uint iBaseCodeword = uint(baseCodeword); + const uint iMultiplier = uint(multiplier); + +#ifdef R11_EAC + baseCodeword = baseCodeword * 8.0f + 4.0f; + multiplier = multiplier > 0.0f ? multiplier * 8.0f : 1.0f; +#endif + + uint bestIdx[16]; + + for (int i = 0; i < 16; ++i) + { + const float realV = g_srcPixelsBlock[i]; + float bestError = FLT_MAX; + + // Find modifier index through brute force + for (uint j = 0u; j < 8u && bestError > 0; ++j) + { + const float tryValue = clamp(baseCodeword + kEacModifiers[tableIdx][j] * multiplier, 0.0f, EAC_RANGE); + const float error = abs(realV - tryValue); + if (error < bestError) + { + bestError = error; + bestIdx[i] = j; + } + } + } + + uint2 outputBytes; + + // Bits [0; 16) + outputBytes.x = iBaseCodeword | (tableIdx << 8u) | (iMultiplier << 12u); + // Bits [16; 24) + outputBytes.x |= (bestIdx[0] << 21u) | (bestIdx[1] << 18u) | ((bestIdx[2] & 0x06u) << 15u); + // Bits [24; 32) + outputBytes.x |= + ((bestIdx[2] & 0x01u) << 31u) | (bestIdx[3] << 28u) | (bestIdx[4] << 25u) | ((bestIdx[5] & 0x04u) << 22u); + + // Bits [0; 8) + outputBytes.y = ((bestIdx[5] & 0x03u) << 6u) | (bestIdx[6] << 3u) | bestIdx[7]; + // Bits [8; 16) + outputBytes.y |= (bestIdx[8] << 13u) | (bestIdx[9] << 10u) | ((bestIdx[10] & 0x06u) << 7u); + // Bits [16; 24) + outputBytes.y |= + ((bestIdx[10] & 0x01u) << 23u) | (bestIdx[11] << 20u) | (bestIdx[12] << 17u) | ((bestIdx[13] & 0x04u) << 14u); + // Bits [24; 32) + outputBytes.y |= ((bestIdx[13] & 0x03u) << 30u) | (bestIdx[14] << 27u) | (bestIdx[15] << 24u); + + const uint2 dstUV = gl_WorkGroupID.xy; + imageStore(dstTexture, int2(dstUV), uint4(outputBytes.xy, 0u, 0u)); +} + +void main() +{ + // We perform a brute force search: + // + // 256 base codewords + // 16 table indices + // 16 multipliers + // 8 possible indices per pixel (16 pixels) + // + // That means we have to try 256*16*16*(8*16) = 8.388.608 variations per block + const uint baseCodeword = gl_LocalInvocationID.x; + + // Load all pixels. We have 256 threads so have the first 16 load 1 pixel each + if (baseCodeword < 16u) + { + uint2 pixelToLoad = gl_WorkGroupID.xy << 2u; + // Note EAC wants the src pixels transposed! + pixelToLoad.x += baseCodeword >> 2u; //+= baseCodeword / 4 + pixelToLoad.y += baseCodeword & 0x03u; //+= baseCodeword % 4 +#ifdef R11_EAC + float2 value = OGRE_Load2D(srcTex, int2(pixelToLoad), 0).rg; + const float srcPixel = p_greenChannel != 0 ? value.g : value.r; +#else + const float srcPixel = OGRE_Load2D(srcTex, int2(pixelToLoad), 0).a; +#endif + +#ifdef WARP_SYNC_AVAILABLE + if (gl_SubGroupSizeARB >= 16u) + { + // Check if all pixels are equal (when wavefront optimizations are possible) + const bool bSameValue = readFirstInvocationARB(srcPixel) == srcPixel; + const bool allPixelsEqual = allInvocationsARB(bSameValue); + + if (baseCodeword == 0u) + g_allPixelsEqual = allPixelsEqual; + } +#endif + + g_srcPixelsBlock[baseCodeword] = srcPixel * EAC_RANGE; + } + +#ifndef R11_EAC +#ifdef WARP_SYNC_AVAILABLE + if (gl_SubGroupSizeARB < 16u) +#endif + { + // Fallback path when shader ballot cannot be used (wavefront size too small) + // Check if all pixels are equal + __sharedOnlyBarrier; + + bool allPixelsEqual = true; + for (uint i = 1u; i < 16u; ++i) + { + if (g_srcPixelsBlock[0] != g_srcPixelsBlock[i]) + allPixelsEqual = false; + } + g_allPixelsEqual = allPixelsEqual; + } +#endif + + __sharedOnlyBarrier; + +#ifndef R11_EAC + // In alpha mode, the baseCodeword can represent all 255 values exactly. + // In R11 mode, the 8-bit baseCodeword gets converted to 11 bits, and + // added to the modifier from the table thus we can't take the shortcut + if (g_allPixelsEqual) + { + if (baseCodeword == 0u) + { + uint2 outputBytes; + outputBytes.x = uint((g_srcPixelsBlock[0] / EAC_RANGE) * 255.0f); + outputBytes.y = 0u; + const uint2 dstUV = gl_WorkGroupID.xy; + imageStore(dstTexture, int2(dstUV), uint4(outputBytes.xy, 0u, 0u)); + } + } + else +#endif + { + float bestError = FLT_MAX; + PotentialSolution bestSolution = 0u; + const float fBaseCodeword = float(baseCodeword); + + for (int tableIdx = 0; tableIdx < 16; ++tableIdx) + { + for (float multiplier = EAC_MULTIPLIER_START; multiplier < 16; ++multiplier) + { + const float error = eac_find_best_error(fBaseCodeword, multiplier, tableIdx); + if (error < bestError) + { + bestError = error; + bestSolution = storePotentialSolution(fBaseCodeword, tableIdx, multiplier); + } + } + } + + g_bestError[baseCodeword] = bestError; + g_bestSolution[baseCodeword] = bestSolution; + + __sharedOnlyBarrier; + + // Parallel reduction to find the best solution + const uint iterations = 8u; // 256 threads = 256 reductions = 2⁸ -> 8 iterations + for (uint i = 0u; i < iterations; ++i) + { + const uint mask = (1u << (i + 1u)) - 1u; + const uint idx = 1u << i; + if ((baseCodeword & mask) == 0u) + { + if (g_bestError[baseCodeword + idx] < bestError) + { + bestError = g_bestError[baseCodeword + idx]; + g_bestError[baseCodeword] = bestError; + g_bestSolution[baseCodeword] = g_bestSolution[baseCodeword + idx]; + } + } + __sharedOnlyBarrier; + } + + if (baseCodeword == 0u) + { + float bestBaseCodeword, bestMultiplier; + uint bestTableIdx; + loadPotentialSolution(g_bestSolution[0u], bestBaseCodeword, bestTableIdx, bestMultiplier); + eac_pack(bestBaseCodeword, bestMultiplier, bestTableIdx); + } + } +} diff --git a/bin/Data/eac_r11.glsl b/shaders/eac_r11.glsl similarity index 100% rename from bin/Data/eac_r11.glsl rename to shaders/eac_r11.glsl diff --git a/shaders/etc1.glsl b/shaders/etc1.glsl new file mode 100644 index 0000000..bf3b5bb --- /dev/null +++ b/shaders/etc1.glsl @@ -0,0 +1,829 @@ +#version 430 core + +#extension GL_ARB_shader_group_vote : require + +// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" + +#include "CrossPlatformSettings_piece_all.glsl" +#include "UavCrossPlatform_piece_all.glsl" + +#define cETC1ColorDeltaMin -4 +#define cETC1ColorDeltaMax 3 + +#define cETC1IntenModifierNumBits 3 +#define cETC1IntenModifierValues 8 + +#define FLT_MAX 340282346638528859811704183484516925440.0f + +#define cLowQuality 0 +#define cMediumQuality 1 +#define cHighQuality 2 + +// 2 sets of 16 float3 (rgba8_unorm) for each ETC block +// We use rgba8_unorm encoding because it's 6kb vs 1.5kb of LDS. The former kills occupancy +shared uint g_srcPixelsBlock[16 * 2 * 4 * 4]; +shared bool g_allPixelsEqual[4 * 4 * 4]; + +layout(location = 0) uniform float4 params; + +#define p_quality params.x +#define p_scanDeltaAbsMin params.y +#define p_scanDeltaAbsMax params.z +#define p_maxRefinementTrials uint(params.w) + +// srcTex MUST be in rgba8_unorm otherwise severe dataloss could happen (i.e. do NOT use sRGB) +// This is due to packing in g_srcPixelsBlock +uniform sampler2D srcTex; + +layout(rg32ui, binding = 0) uniform restrict writeonly uimage2D dstTexture; + +layout(std430, binding = 1) readonly restrict buffer globalBuffer +{ + // Given an ETC1 diff/inten_table/selector, and an 8-bit desired color, this table encodes the best + // packed_color in the low byte, and the abs error in the high byte. + float pBuff_etc1_inverse_lookup[2 * 8 * 4][256]; // [diff/inten_table/selector][desired_color] + uint pBuff_color8_to_etc_block_config[]; +}; + +#ifdef OUTPUT_ERROR +// Used by ETC2 to decide between this and T, H and P modes +layout(r32f, binding = 2) uniform restrict writeonly image2D dstError; +#endif + +layout(local_size_x = 4, // + local_size_y = 4, // + local_size_z = 4) in; + +const float4 g_etc1_inten_tables[cETC1IntenModifierValues] = { + float4(-8, -2, 2, 8), float4(-17, -5, 5, 17), float4(-29, -9, 9, 29), float4(-42, -13, 13, 42), + float4(-60, -18, 18, 60), float4(-80, -24, 24, 80), float4(-106, -33, 33, 106), float4(-183, -47, 47, 183)}; + +struct PotentialSolution +{ + float3 rgbIntLS; // in range [0; limit] + uint intenTable; + + // Has 8 selectors, 8-bits each. + uint selectors[2]; + float error; +}; + +void storeErrorToLds(float error, uint threadId) +{ + g_srcPixelsBlock[threadId] = floatBitsToUint(error); +} +float loadErrorFromLds(uint threadId) +{ + return uintBitsToFloat(g_srcPixelsBlock[threadId]); +} + +void storeBestBlockThreadIdxToLds(uint bestIdx, uint threadId) +{ + g_srcPixelsBlock[threadId] = bestIdx; +} +uint loadBestBlockThreadIdxFromLds(uint threadId) +{ + return g_srcPixelsBlock[threadId]; +} + +float3 getScaledColor(const float3 rgbInt, const bool bUseColor4) +{ + const float a = bUseColor4 ? 1.0f : 0.25f; + const float b = bUseColor4 ? 16.0f : 8.0f; + return floor(rgbInt * a) + rgbInt * b; +} + +float calcError(float3 a, float3 b) +{ + float3 diff = a - b; + return dot(diff, diff); +} + +bool evaluate_solution(const uint subblockStart, const float3 blockRgbInt, const bool bUseColor4, + const float3 baseColor5, const bool constrainAgainstBaseColor5, + inout PotentialSolution bestSolution) +{ + PotentialSolution trialSolution; + + if (constrainAgainstBaseColor5) + { + const float3 d = blockRgbInt - baseColor5; + + if ((min3(d.r, d.g, d.b) < cETC1ColorDeltaMin) || // + (max3(d.r, d.g, d.b) > cETC1ColorDeltaMax)) + { + return false; + } + } + + const float3 baseColor = getScaledColor(blockRgbInt, bUseColor4); + + trialSolution.error = FLT_MAX; + + for (uint inten_table = 0u; inten_table < cETC1IntenModifierValues; ++inten_table) + { + const float4 pIntenTable = g_etc1_inten_tables[inten_table]; + + float3 blockColorsInt[4]; + for (uint s = 0u; s < 4u; s++) + { + const float yd = pIntenTable[s]; + blockColorsInt[s] = clamp(baseColor + yd, 0.0f, 255.0f); + } + + float total_error = 0; + float4 tempSelectors[2]; + + for (uint c = 0u; c < 8u; ++c) + { + const float3 srcPixel = unpackUnorm4x8(g_srcPixelsBlock[c + subblockStart]).xyz * 255.0f; + + float best_selector_index = 0; + float best_error = calcError(srcPixel, blockColorsInt[0]); + + float trial_error = calcError(srcPixel, blockColorsInt[1]); + if (trial_error < best_error) + { + best_error = trial_error; + best_selector_index = 1; + } + + trial_error = calcError(srcPixel, blockColorsInt[2]); + if (trial_error < best_error) + { + best_error = trial_error; + best_selector_index = 2; + } + + trial_error = calcError(srcPixel, blockColorsInt[3]); + if (trial_error < best_error) + { + best_error = trial_error; + best_selector_index = 3; + } + + tempSelectors[c >> 2u][c & 0x03u] = best_selector_index; + + total_error += best_error; + } + + if (total_error < trialSolution.error) + { + trialSolution.error = total_error; + trialSolution.intenTable = inten_table; + trialSolution.selectors[0] = packUnorm4x8(tempSelectors[0] * (1.0f / 255.0f)); + trialSolution.selectors[1] = packUnorm4x8(tempSelectors[1] * (1.0f / 255.0f)); + // trialSolution.valid = true; + } + } + + trialSolution.rgbIntLS = blockRgbInt; + + bool success = false; + if (trialSolution.error < bestSolution.error) + { + bestSolution = trialSolution; + success = true; + } + + return success; +} + +float getScanDelta(const float iDeltai, const float scanDeltaAbsMin, const float scanDeltaAbsMax) +{ + const float numAbsDeltas = scanDeltaAbsMax - scanDeltaAbsMin + 1.0f; + + if (iDeltai < numAbsDeltas) + return -scanDeltaAbsMax + iDeltai; + else + return scanDeltaAbsMin + iDeltai + (scanDeltaAbsMin == 0.0f ? 1.0f : 0.0f) - numAbsDeltas; +} + +/** +@brief etc1_optimizer_compute +@param scanDeltaAbsMin +@param scanDeltaAbsMax +@param avgColour +@param avgColourLS + Same as avgColour but in limit space, i.e. range [0; limit] +@param bUseColor4 +@param baseColor5 +@param constrainAgainstBaseColor5 +@param bestSolution +@return + True if we found a solution + False if we failed to find any +*/ +void etc1_optimizer_compute(const float scanDeltaAbsMin, const float scanDeltaAbsMax, const uint subblockStart, + const float3 avgColour, const float3 avgColourLS, const bool bUseColor4, + const float3 baseColor5, const bool constrainAgainstBaseColor5, + inout PotentialSolution bestSolution) +{ + // const float numSrcPixels = 8; // Subblock of 2x4 or 4x2 + const float limit = bUseColor4 ? 15 : 31; + + const float scanDeltaSize = (scanDeltaAbsMax - scanDeltaAbsMin) * 2.0f + (scanDeltaAbsMin == 0.0f ? 1.0f : 2.0f); + + for (float di = 0; di < scanDeltaSize * scanDeltaSize * scanDeltaSize; ++di) + { + float3 xyzdi = float3(mod(di, scanDeltaSize), // + mod(floor(di / scanDeltaSize), scanDeltaSize), // + floor(di / (scanDeltaSize * scanDeltaSize))); + float3 blockRgbInt = avgColourLS; + blockRgbInt.x = getScanDelta(xyzdi.x, scanDeltaAbsMin, scanDeltaAbsMax); + blockRgbInt.y = getScanDelta(xyzdi.y, scanDeltaAbsMin, scanDeltaAbsMax); + blockRgbInt.z = getScanDelta(xyzdi.z, scanDeltaAbsMin, scanDeltaAbsMax); + const uint maxRefinementTrials = + (blockRgbInt.x == 0.0f && blockRgbInt.y == 0.0f && blockRgbInt.z == 0.0f) ? p_maxRefinementTrials : 2u; + blockRgbInt += avgColourLS; + + if (blockRgbInt.x >= 0.0f && blockRgbInt.x <= limit && // + blockRgbInt.y >= 0.0f && blockRgbInt.y <= limit && // + blockRgbInt.z >= 0.0f && blockRgbInt.z <= limit) + { + bool bSuccess = evaluate_solution(subblockStart, blockRgbInt, bUseColor4, baseColor5, constrainAgainstBaseColor5, + bestSolution); + + if (bSuccess) + { + // Now we have the input block, the avg. color of the input pixels, a set of trial + // selector indices, and the block color+intensity index. Now, for each component, + // attempt to refine the current solution by solving a simple linear equation. + // So what this means: optimal_block_color = avg_input - avg_inten_delta + // So the optimal block color can be computed by taking the average block color and + // subtracting the current average of the intensity delta. + // Unfortunately, optimal_block_color must then be quantized to 555 or 444 so it's + // not always possible to improve matters using this formula. Also, the formula is + // for unclamped intensity deltas. The actual implementation takes into account + // clamping. + + float4 pSelectors[2]; + pSelectors[0] = unpackUnorm4x8(bestSolution.selectors[0]) * 255.0f; + pSelectors[1] = unpackUnorm4x8(bestSolution.selectors[1]) * 255.0f; + + for (uint refinementTrial = 0u; refinementTrial < maxRefinementTrials && bSuccess; ++refinementTrial) + { + const float4 pIntenTable = g_etc1_inten_tables[bestSolution.intenTable]; + + float3 deltaSum = float3(0.0f, 0.0f, 0.0f); + float3 base_color = getScaledColor(bestSolution.rgbIntLS, bUseColor4); + + for (uint r = 0u; r < 8u; ++r) + { + const uint s = uint(pSelectors[r >> 2u][r & 0x03u] * 255.0f); + const float yd = pIntenTable[s]; + // Compute actual delta being applied to each pixel, + // taking into account clamping. + deltaSum += clamp(base_color + yd, 0.0, 255.0) - base_color; + } + + const float3 avgDelta = deltaSum * 0.125f; + const float3 blockRgbInt1 = clamp(floor((avgColour - avgDelta) * limit * (1.0f / 255.0f) + 0.5f), 0, limit); + + if ((deltaSum.r == 0.0f && deltaSum.g == 0.0f && deltaSum.b == 0.0f) || + (blockRgbInt.r == blockRgbInt1.r && // + blockRgbInt.g == blockRgbInt1.g && // + blockRgbInt.b == blockRgbInt1.b) || + (bestSolution.rgbIntLS.r == blockRgbInt1.r && // + bestSolution.rgbIntLS.g == blockRgbInt1.g && // + bestSolution.rgbIntLS.b == blockRgbInt1.b) || + (avgColourLS.r == blockRgbInt1.r && // + avgColourLS.g == blockRgbInt1.g && // + avgColourLS.b == blockRgbInt1.b)) + { + // Skip refinement + bSuccess = false; + } + else + { + bSuccess = evaluate_solution(subblockStart, blockRgbInt1, bUseColor4, baseColor5, + constrainAgainstBaseColor5, bestSolution); + } + } // refinementTrial + } + } + } +} + +/// Replaces g_selector_index_to_etc1[cETC1SelectorValues] from original code +/// const uint8 g_selector_index_to_etc1[cETC1SelectorValues] = { 3, 2, 0, 1 }; +/// +/// Input is in range [0; 4) +/// Return value is in range [0; 4) +float selector_index_to_etc1(float idx) +{ + return idx < 2.0f ? (3.0f - idx) : (idx - 2.0f); +} + +// Packs solid color blocks efficiently using a set of small precomputed tables. +// For random 888 inputs, MSE results are better than Erricson's ETC1 packer in "slow" mode ~9.5% of +// the time, is slightly worse only ~.01% of the time, and is equal the rest of the time. +void pack_etc1_block_solid_color(const float3 srcPixel) +{ + float bestError = FLT_MAX, bestPacked_c1 = 0, bestPacked_c2 = 0; + uint best_x = 0u, best_i = 0u; + + // For each possible 8-bit value, there is a precomputed list of diff/inten/selector + // configurations that allow that 8-bit value to be encoded with no error. + for (uint i = 0u; i < 3u && bestError > 0; ++i) + { + const float c0 = srcPixel[i]; + const uint c1 = uint(i == 0u ? srcPixel.y : (i == 1u ? srcPixel.z : srcPixel.x)); + const uint c2 = uint(i == 0u ? srcPixel.z : (i == 1u ? srcPixel.x : srcPixel.y)); + + const float deltaRange = 1.0f; + for (float delta = -deltaRange; delta <= deltaRange && bestError > 0; ++delta) + { + const float c_plus_delta = clamp(c0 + delta, 0.0f, 255.0f); + + uint tableOffset; + if (c_plus_delta == 0.0f) + tableOffset = 0u; + else if (c_plus_delta == 255.0f) + tableOffset = 33u; + else + tableOffset = uint(66.0f + (c_plus_delta - 1.0f) * 11.0f); + + const uint numTableEntries = pBuff_color8_to_etc_block_config[tableOffset]; + for (uint j = 0u; j < numTableEntries && bestError > 0; ++j) + { + const uint x = pBuff_color8_to_etc_block_config[tableOffset + j + 1u]; + + float p1 = pBuff_etc1_inverse_lookup[x & 0xFFu][c1]; + float p2 = pBuff_etc1_inverse_lookup[x & 0xFFu][c2]; + + const float3 diffVal = float3(c_plus_delta - c0, // + floor(p1 * (1.0f / 256.0f)), // + floor(p2 * (1.0f / 256.0f))); + const float trialError = dot(diffVal, diffVal); + if (trialError < bestError) + { + bestError = trialError; + best_x = x; + bestPacked_c1 = mod(p1, 256.0f); + bestPacked_c2 = mod(p2, 256.0f); + best_i = i; + } + } + } + } + + const float diff = float(best_x & 1u); + const float inten = float((best_x >> 1u) & 7u); + + float4 bytes; + uint2 outputBytes; + + bytes.w = (inten + (inten * 8.0f)) * 4.0f + diff * 2.0f; + + const float bestPacked_c0 = float((best_x >> 8) & 255u); + float3 bestPacked = float3(bestPacked_c0, bestPacked_c1, bestPacked_c2); + if (diff != 0.0f) + bestPacked = bestPacked * 8.0f; + else + bestPacked = bestPacked + bestPacked * 16.0f; + + bytes.xyz = best_i == 0u ? bestPacked.xyz : (best_i == 1u ? bestPacked.zxy : bestPacked.yzx); + + const float etc1Selector = selector_index_to_etc1(float((best_x >> 4u) & 3u)); + outputBytes.x = packUnorm4x8(bytes * (1.0f / 255.0f)); + outputBytes.y = + (etc1Selector >= 2u ? 0xFFFFu : 0u) | ((etc1Selector == 1.0f || etc1Selector == 3.0f) ? 0xFFFF0000u : 0u); + + uint2 dstUV = gl_GlobalInvocationID.yz; + imageStore(dstTexture, int2(dstUV), uint4(outputBytes.xy, 0u, 0u)); + +#ifdef OUTPUT_ERROR + imageStore(dstError, int2(dstUV), float4(bestError, 0.0f, 0.0f, 0.0f)); +#endif +} + +void pack_etc1_block_solid_color_constrained(const float3 srcPixel, const bool bUseDiff, const float3 baseColor5, + inout PotentialSolution bestSolution) +{ + float bestError = FLT_MAX, bestPacked_c1 = 0, bestPacked_c2 = 0; + uint best_x = 0u, best_i = 0u; + + // For each possible 8-bit value, there is a precomputed list of diff/inten/selector + // configurations that allow that 8-bit value to be encoded with no error. + for (uint i = 0u; i < 3u && bestError > 0; ++i) + { + const float c0 = srcPixel[i]; + const uint c1 = uint(i == 0u ? srcPixel.y : (i == 1u ? srcPixel.z : srcPixel.x)); + const uint c2 = uint(i == 0u ? srcPixel.z : (i == 1u ? srcPixel.x : srcPixel.y)); + + const float deltaRange = 1.0f; + for (float delta = -deltaRange; delta <= deltaRange && bestError > 0; ++delta) + { + const float c_plus_delta = clamp(c0 + delta, 0.0f, 255.0f); + + uint tableOffset; + if (c_plus_delta == 0.0f) + tableOffset = 0u; + else if (c_plus_delta == 255.0f) + tableOffset = 33u; + else + tableOffset = uint(66.0f + (c_plus_delta - 1.0f) * 11.0f); + + const uint numTableEntries = pBuff_color8_to_etc_block_config[tableOffset]; + for (uint j = 0u; j < numTableEntries && bestError > 0; ++j) + { + const uint x = pBuff_color8_to_etc_block_config[tableOffset + j + 1u]; + const bool bCandidateUsesDiff = (x & 1u) != 0u; + + if (bUseDiff == bCandidateUsesDiff) + { + const float p1 = pBuff_etc1_inverse_lookup[x & 0xFFu][c1]; + const float p2 = pBuff_etc1_inverse_lookup[x & 0xFFu][c2]; + + bool bIsValid = true; + + if (bUseDiff) + { + const float p0 = float((x >> 8u) & 255u); + const float3 blockRgbInt = float3(p0, mod(p1, 256.0f), mod(p2, 256.0f)); + const float3 d = blockRgbInt - baseColor5; + + if ((min3(d.r, d.g, d.b) < cETC1ColorDeltaMin) || // + (max3(d.r, d.g, d.b) > cETC1ColorDeltaMax)) + { + bIsValid = false; + } + } + + const float3 diffVal = float3(c_plus_delta - c0, // + floor(p1 * (1.0f / 256.0f)), // + floor(p2 * (1.0f / 256.0f))); + const float trialError = dot(diffVal, diffVal); + if (trialError < bestError && bIsValid) + { + bestError = trialError; + best_x = x; + bestPacked_c1 = mod(p1, 256.0f); + bestPacked_c2 = mod(p2, 256.0f); + best_i = i; + } + } + } + } + } + + bestError *= 8.0f; + + if (bestError < bestSolution.error) + { + const float bestPacked_c0 = float((best_x >> 8) & 255u); + float3 bestPacked = float3(bestPacked_c0, bestPacked_c1, bestPacked_c2); + bestSolution.rgbIntLS = best_i == 0u ? bestPacked.xyz : (best_i == 1u ? bestPacked.zxy : bestPacked.yzx); + + bestSolution.selectors[0] = packUnorm4x8(float4(((best_x >> 4u) & 3u) * (1.0f / 255.0f))); + bestSolution.selectors[1] = bestSolution.selectors[0]; + bestSolution.intenTable = (best_x >> 1u) & 7u; + } +} + +void main() +{ + // 4 threads per ETC block. Each pair of threads tries a different mode + // combination (flip & useColor4); but we do not split subgroups into 2 threads because + // when bUseColor4 = false, subblock1 depends on subblock0 + // + // In Rich Geldrich's implementation the algorithm would stop if the 1st subgroup error + // is already higher the combined error of the best pair of candidates. + // + // We can't do that because: + // 1. There is no "best candidate" because they're all processed in parallel + // 2. Even if there were, GPUs would very likely loop due to branch divergence + // from different ETC blocks being processed by the same threadgroup + const uint blockThreadId = gl_LocalInvocationID.x; + + const bool bFlip = (blockThreadId & 0x01u) != 0u; + const bool bUseColor4 = (blockThreadId & 0x02u) != 0u; + + const uint2 pixelsToLoadBase = gl_GlobalInvocationID.yz << 2u; + + // We need to load a block of 4x4 pixels from src (16 pixels), and we have 4 threads per block + // Thus each thread gets to load 4 pixels: + // 4x1 + // 4x1 + // 4x1 + // 4x1 + // and distribute it into shared memory + uint2 pixelsToLoad = pixelsToLoadBase; + pixelsToLoad.y += blockThreadId; + + const float3 srcPixels0 = OGRE_Load2D(srcTex, int2(pixelsToLoad), 0).xyz; + const float3 srcPixels1 = OGRE_Load2D(srcTex, int2(pixelsToLoad + uint2(1u, 0u)), 0).xyz; + const float3 srcPixels2 = OGRE_Load2D(srcTex, int2(pixelsToLoad + uint2(2u, 0u)), 0).xyz; + const float3 srcPixels3 = OGRE_Load2D(srcTex, int2(pixelsToLoad + uint2(3u, 0u)), 0).xyz; + + const uint blockStart = (gl_LocalInvocationID.y + gl_LocalInvocationID.z * 4u) * 32u; + // const uint blockStart = ( gl_LocalInvocationIndex & 0x60u ) << 3u; + // Linear (horizontal, aka flip = on) + const uint subblockStartH = blockStart + 16u + (blockThreadId << 2u); + g_srcPixelsBlock[subblockStartH + 0u] = packUnorm4x8(float4(srcPixels0, 1.0f)); + g_srcPixelsBlock[subblockStartH + 1u] = packUnorm4x8(float4(srcPixels1, 1.0f)); + g_srcPixelsBlock[subblockStartH + 2u] = packUnorm4x8(float4(srcPixels2, 1.0f)); + g_srcPixelsBlock[subblockStartH + 3u] = packUnorm4x8(float4(srcPixels3, 1.0f)); + + // Non-linear (vertical, aka flip = off) + const uint subblockOffset0 = 0u; // subblockIdx = 0 + const uint subblockStart0 = blockStart + subblockOffset0 + blockThreadId; + g_srcPixelsBlock[subblockStart0 + 0u] = packUnorm4x8(float4(srcPixels0, 1.0f)); + g_srcPixelsBlock[subblockStart0 + 4u] = packUnorm4x8(float4(srcPixels1, 1.0f)); + + const uint subblockOffset1 = 8u; // subblockIdx = 1 + const uint subblockStart1 = blockStart + subblockOffset1 + blockThreadId; + g_srcPixelsBlock[subblockStart1 + 0u] = packUnorm4x8(float4(srcPixels2, 1.0f)); + g_srcPixelsBlock[subblockStart1 + 4u] = packUnorm4x8(float4(srcPixels3, 1.0f)); + + const uint pixelsEqualBlockStart = (gl_LocalInvocationID.y + gl_LocalInvocationID.z * 4u) * 4u; + bool bAllPixelsInThreadEqual = srcPixels0 == srcPixels1 && srcPixels0 == srcPixels2 && srcPixels0 == srcPixels3; + g_allPixelsEqual[pixelsEqualBlockStart + blockThreadId] = bAllPixelsInThreadEqual; + + __sharedOnlyBarrier; + + if (blockThreadId == 0u) + { + // Thread 0 finishes checking if all pixels are equal + for (uint i = 1u; i < 4u; ++i) + { + bAllPixelsInThreadEqual = bAllPixelsInThreadEqual && g_allPixelsEqual[pixelsEqualBlockStart + i]; + + // All 4 pixels in thread 'i' could be equal. But they may be different from *our* pixels + const float3 otherPixels = unpackUnorm4x8(g_srcPixelsBlock[blockStart + i]).xyz; + bAllPixelsInThreadEqual = bAllPixelsInThreadEqual && srcPixels0 == otherPixels; + } + g_allPixelsEqual[pixelsEqualBlockStart] = bAllPixelsInThreadEqual; + } + + __sharedOnlyBarrier; + + PotentialSolution results[2]; + for (uint i = 0u; i < 2u; ++i) + { + results[i].error = FLT_MAX; + results[i].rgbIntLS = float3(0, 0, 0); + results[i].intenTable = 0u; + results[i].selectors[0] = 0u; + results[i].selectors[1] = 0u; + } + + // Check if all colours are equal. If so we can improve quality + const bool bAllColoursEqual = g_allPixelsEqual[pixelsEqualBlockStart]; + if (bAllColoursEqual) + { + if (blockThreadId == 0u) + pack_etc1_block_solid_color(srcPixels0 * 255.0f); + } + + barrier(); // Ensure all threads are done reading from g_allPixelsEqual + + if (!bAllColoursEqual) + { + // Now check if the subblock has all pixels equal. + // There are 4 subblocks to check (2 flipped and 2 non-flipped) + // so we put all 4 threads to work on each. + const uint subblockIdx = (blockThreadId & 0x1u); + const bool bTmpFlip = blockThreadId >= 2u; + + const uint subblockStart = blockStart + (bTmpFlip ? 16u : 0u) + (subblockIdx == 0u ? 0u : 8u); + + bool allPixelsInSubblockEqual = true; + + const float3 srcPixel0 = unpackUnorm4x8(g_srcPixelsBlock[subblockStart]).xyz; + for (uint i = 1u; i < 8u; ++i) + { + const float3 srcPixel = unpackUnorm4x8(g_srcPixelsBlock[i + subblockStart]).xyz; + allPixelsInSubblockEqual = allPixelsInSubblockEqual && srcPixel0 == srcPixel; + } + + // g_allPixelsEqual[start + 0] => subblockIdx = 0 + bFlip = false + // g_allPixelsEqual[start + 1] => subblockIdx = 1 + bFlip = false + // g_allPixelsEqual[start + 2] => subblockIdx = 0 + bFlip = true + // g_allPixelsEqual[start + 3] => subblockIdx = 1 + bFlip = true + g_allPixelsEqual[pixelsEqualBlockStart + blockThreadId] = allPixelsInSubblockEqual; + } + + __sharedOnlyBarrier; + + // Unfortunately subblockIdx = 1 depends on subblockIdx = 0 when bUseColor4 = false + for (uint subblockIdx = 0u; subblockIdx < 2u && !bAllColoursEqual; ++subblockIdx) + { + const bool constrainAgainstBaseColor5 = !bUseColor4 && subblockIdx != 0u; + const float3 baseColor5 = results[0].rgbIntLS; + + const uint subblockStart = blockStart + (bFlip ? 16u : 0u) + (subblockIdx == 0u ? 0u : 8u); + + // Have all threads compute average. + // + // We don't do parallel reduction because it'd consume too + // much LDS and we don't have access to __shfl_down + float3 avgColour = float3(0, 0, 0); + for (uint i = 0; i < 8u; ++i) + { + const float3 srcPixel = unpackUnorm4x8(g_srcPixelsBlock[i + subblockStart]).xyz; + avgColour += srcPixel; + } + avgColour *= 1.0f / 8.0f; + + if (p_quality >= cMediumQuality && (subblockIdx > 0u || bUseColor4) && + g_allPixelsEqual[pixelsEqualBlockStart + subblockIdx + (bFlip ? 2u : 0u)]) + { + pack_etc1_block_solid_color_constrained(unpackUnorm4x8(g_srcPixelsBlock[subblockStart]).xyz * 255.0f, bUseColor4, + baseColor5, results[subblockIdx]); + } + + const float limit = bUseColor4 ? 15 : 31; + const float3 avgColourLS = clamp(floor(avgColour * limit + 0.5f), 0, limit); + avgColour = avgColour * 255.0f; + + etc1_optimizer_compute(p_scanDeltaAbsMin, p_scanDeltaAbsMax, subblockStart, avgColour, avgColourLS, bUseColor4, + baseColor5, constrainAgainstBaseColor5, results[subblockIdx]); + + if (p_quality >= cMediumQuality) + { + const float refinement_error_thresh0 = 3000; + const float refinement_error_thresh1 = 6000; + if (results[subblockIdx].error > refinement_error_thresh0) + { + float scanDeltaAbsMin, scanDeltaAbsMax; + if (p_quality == cMediumQuality) + { + scanDeltaAbsMin = 2; + scanDeltaAbsMax = 3; + } + else + { + scanDeltaAbsMin = 5; + if (results[subblockIdx].error > refinement_error_thresh1) + scanDeltaAbsMax = 8; + else + scanDeltaAbsMax = 5; + } + + etc1_optimizer_compute(scanDeltaAbsMin, scanDeltaAbsMax, subblockStart, avgColour, avgColourLS, bUseColor4, + baseColor5, constrainAgainstBaseColor5, results[subblockIdx]); + } + } + } + + // + // IMPORTANT: From now on g_srcPixelsBlock will be used for sync and + // selecting the best result thus its old contents will become garbage + // + + // Ensure execution reaches here; otherwise we could + // overwrite g_srcPixelsBlock while it's in use + barrier(); + + // Save everyone's error to LDS + storeErrorToLds(results[0].error + results[1].error, gl_LocalInvocationIndex); + __sharedOnlyBarrier; + + if (blockThreadId == 0u) + { + float bestError = results[0].error + results[1].error; + uint bestErrorThread = 0u; + + // Find the best result + for (uint i = 1u; i < 4u; ++i) + { + float otherError = loadErrorFromLds(gl_LocalInvocationIndex + i); + if (otherError < bestError) + { + bestError = otherError; + bestErrorThread = i; + } + } + + // Write down which thread has the best error in our private LDS region + storeBestBlockThreadIdxToLds(bestErrorThread, gl_LocalInvocationIndex); + } + + __sharedOnlyBarrier; + + // Load threadIdx with best error which was written down by thread blockThreadId == 0u + const uint blockThreadWithBestError = loadBestBlockThreadIdxFromLds(gl_LocalInvocationIndex & ~0x03u); + + if (blockThreadWithBestError == blockThreadId && !bAllColoursEqual) + { + // This thread was selected as the one with the best result. + // Thus this one (the winner) will write to output + float4 bytes; + if (bUseColor4) + { + bytes.xyz = results[1].rgbIntLS + results[0].rgbIntLS * 16.0f; + } + else + { + float3 delta = results[1].rgbIntLS - results[0].rgbIntLS; + if (delta.x < 0.0f) + delta.x += 8.0f; + if (delta.y < 0.0f) + delta.y += 8.0f; + if (delta.z < 0.0f) + delta.z += 8.0f; + + bytes.xyz = delta + results[0].rgbIntLS * 8.0f; + } + + bytes.w = (results[1].intenTable * 4.0f) + (results[0].intenTable * 32.0f) + (bUseColor4 ? 0.0f : 2.0f) + + (bFlip ? 1.0f : 0.0f); + + uint2 outputBytes; + outputBytes.x = packUnorm4x8(bytes * (1.0f / 255.0f)); + + float selector0 = 0, selector1 = 0; + if (bFlip) + { + // flipped: + // { 0, 0 }, { 1, 0 }, { 2, 0 }, { 3, 0 }, + // { 0, 1 }, { 1, 1 }, { 2, 1 }, { 3, 1 } + // + // { 0, 2 }, { 1, 2 }, { 2, 2 }, { 3, 2 }, + // { 0, 3 }, { 1, 3 }, { 2, 3 }, { 3, 3 } + float4 pSelectors00 = unpackUnorm4x8(results[0].selectors[0]) * 255.0f; + float4 pSelectors01 = unpackUnorm4x8(results[0].selectors[1]) * 255.0f; + float4 pSelectors10 = unpackUnorm4x8(results[1].selectors[0]) * 255.0f; + float4 pSelectors11 = unpackUnorm4x8(results[1].selectors[1]) * 255.0f; + for (uint x = 4u; x-- > 0u;) + { + float b, bHalf; + b = selector_index_to_etc1(pSelectors11[x]); + bHalf = floor(b * 0.5f); + selector0 = (selector0 * 2.0f) + (b - bHalf * 2.0f); + selector1 = (selector1 * 2.0f) + (bHalf); + + b = selector_index_to_etc1(pSelectors10[x]); + bHalf = floor(b * 0.5f); + selector0 = (selector0 * 2.0f) + (b - bHalf * 2.0f); + selector1 = (selector1 * 2.0f) + (bHalf); + + b = selector_index_to_etc1(pSelectors01[x]); + bHalf = floor(b * 0.5f); + selector0 = (selector0 * 2.0f) + (b - bHalf * 2.0f); + selector1 = (selector1 * 2.0f) + (bHalf); + + b = selector_index_to_etc1(pSelectors00[x]); + bHalf = floor(b * 0.5f); + selector0 = (selector0 * 2.0f) + (b - bHalf * 2.0f); + selector1 = (selector1 * 2.0f) + (bHalf); + } + } + else + { + // non-flipped: + // { 0, 0 }, { 0, 1 }, { 0, 2 }, { 0, 3 }, + // { 1, 0 }, { 1, 1 }, { 1, 2 }, { 1, 3 } + // + // { 2, 0 }, { 2, 1 }, { 2, 2 }, { 2, 3 }, + // { 3, 0 }, { 3, 1 }, { 3, 2 }, { 3, 3 } + for (uint subblockIdx = 2u; subblockIdx-- > 0u;) + { + for (uint i = 2u; i-- > 0u;) + { + float4 pSelectors = unpackUnorm4x8(results[subblockIdx].selectors[i]) * 255.0f; + + float b, bHalf; + b = selector_index_to_etc1(pSelectors[3]); + bHalf = floor(b * 0.5f); + selector0 = (selector0 * 2.0f) + (b - bHalf * 2.0f); + selector1 = (selector1 * 2.0f) + (bHalf); + + b = selector_index_to_etc1(pSelectors[2]); + bHalf = floor(b * 0.5f); + selector0 = (selector0 * 2.0f) + (b - bHalf * 2.0f); + selector1 = (selector1 * 2.0f) + (bHalf); + + b = selector_index_to_etc1(pSelectors[1]); + bHalf = floor(b * 0.5f); + selector0 = (selector0 * 2.0f) + (b - bHalf * 2.0f); + selector1 = (selector1 * 2.0f) + (bHalf); + + b = selector_index_to_etc1(pSelectors[0]); + bHalf = floor(b * 0.5f); + selector0 = (selector0 * 2.0f) + (b - bHalf * 2.0f); + selector1 = (selector1 * 2.0f) + (bHalf); + } + } + } + +#ifdef CHECKING_ORDER + bytes.x = floor(selector1 / 256.0f); + bytes.y = selector1 - floor(selector1 / 256.0f) * 256.0f; + bytes.z = floor(selector0 / 256.0f); + bytes.w = selector0 - floor(selector0 / 256.0f) * 256.0f; + outputBytes.y = packUnorm4x8(bytes * (1.0f / 255.0f)); +#else + outputBytes.y = packUnorm2x16(float2(selector1, selector0) * (1.0f / 65535.0f)); + outputBytes.y = packUnorm4x8(unpackUnorm4x8(outputBytes.y).yxwz); // Byteswap +#endif + + uint2 dstUV = gl_GlobalInvocationID.yz; + imageStore(dstTexture, int2(dstUV), uint4(outputBytes.xy, 0u, 0u)); +#ifdef OUTPUT_ERROR + imageStore(dstError, int2(dstUV), float4(results[0].error + results[1].error, 0.0f, 0.0f, 0.0f)); +#endif + } +} diff --git a/bin/Data/etc1_with_error.glsl b/shaders/etc1_with_error.glsl similarity index 100% rename from bin/Data/etc1_with_error.glsl rename to shaders/etc1_with_error.glsl diff --git a/shaders/etc2_p.glsl b/shaders/etc2_p.glsl new file mode 100644 index 0000000..976937b --- /dev/null +++ b/shaders/etc2_p.glsl @@ -0,0 +1,351 @@ +#version 430 core + +// Planar mode of ETC2 + +// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" + +#include "CrossPlatformSettings_piece_all.glsl" +#include "UavCrossPlatform_piece_all.glsl" + +#define FLT_MAX 340282346638528859811704183484516925440.0f + +uniform sampler2D srcTex; + +layout(rg32ui, binding = 0) uniform restrict writeonly uimage2D dstTexture; +layout(r32f, binding = 1) uniform restrict writeonly image2D dstError; + +shared float2 g_threadBestCandidates[4u][4u * 4u]; + +#define g_bestCandidates g_threadBestCandidates[gl_LocalInvocationID.z] + +layout(local_size_x = 4, // + local_size_y = 4, // + local_size_z = 4) in; + +/* +kPmodeEncoderRG table generated with: + static const int kSigned3bit[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; + #define BITS( byteval, lowbit, highbit ) \ + ( ( ( byteval ) >> ( lowbit ) ) & ( ( 1 << ( ( highbit ) - ( lowbit ) + 1 ) ) - 1 ) ) + #define BIT( byteval, bit ) ( ( ( byteval ) >> ( bit ) ) & 0x1 ) + int main() + { + // kPmodeEncoderRG + for( int GO = 0; GO < 128; GO += 127u ) + { + for( int RO = 0; RO < 64; ++RO ) + { + // RO_6 [2..5] + int R = BITS( RO, 2, 5 ); + // RO_6 [0..1] + GO_7[6] + int dR = ( BITS( RO, 0, 1 ) << 1 ) | BIT( GO, 6 ); + if( !( ( R + kSigned3bit[dR] >= 0 ) && ( R + kSigned3bit[dR] <= 31 ) ) ) + R |= 1 << 4; + assert( ( ( R + kSigned3bit[dR] >= 0 ) && ( R + kSigned3bit[dR] <= 31 ) ) ); + printf( "%i, ", ( R << 3 ) | dR ); + } + } + printf( "\n" ); + return 0; + } +*/ +const float kPmodeEncoderRG[128] = { + 0, 2, 132, 134, 8, 10, 140, 142, 16, 18, 148, 22, 24, 26, 156, 30, 32, 34, 36, 38, 40, 42, + 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, + 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 1, 3, + 133, 135, 9, 11, 141, 15, 17, 19, 149, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, + 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, + 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127}; + +// kPmodeEncoderGB is exactly the same +#define kPmodeEncoderGB kPmodeEncoderRG + +/* +kPmodeEncoderB table generated with: + static const int kSigned3bit[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; + #define BITS( byteval, lowbit, highbit ) \ + ( ( ( byteval ) >> ( lowbit ) ) & ( ( 1 << ( ( highbit ) - ( lowbit ) + 1 ) ) - 1 ) ) + int main() + { + for( int BO = 0; BO < 32; ++BO ) + { + if( !( BO & 0x01 ) ) + { + // BO_6[3..4] + int B = BITS( BO, 3, 4 ); + // BO_6[1..2] + int dB = BITS( BO, 1, 2 ); + // B + dB must be outside the range. + for( int Bx = 0; Bx < 8; Bx++ ) + { + for( int dBx = 0; dBx < 2; dBx++ ) + { + int Btry = B | ( Bx << 2 ); + int dBtry = dB | ( dBx << 2 ); + if( ( Btry + kSigned3bit[dBtry] ) < 0 || ( Btry + kSigned3bit[dBtry] > 31 ) ) + { + B = Btry; + dB = dBtry; + break; + } + } + } + assert( !( ( B + kSigned3bit[dB] >= 0 ) && ( B + kSigned3bit[dB] <= 31 ) ) ); + printf( "%i, ", ( B << 3 ) | dB ); + } + } + printf( "\n" ); + return 0; + } +*/ +const float kPmodeEncoderB[16] = {4, 5, 6, 7, 12, 13, 14, 235, 20, 21, 242, 243, 28, 249, 250, 251}; + +float3 getSrcPixel(uint idx) +{ + const uint2 pixelsToLoadBase = + ((gl_WorkGroupID.xy << 1u) + uint2(gl_LocalInvocationID.z & 0x01u, gl_LocalInvocationID.z >> 1u)) << 2u; + uint2 pixelsToLoad = pixelsToLoadBase; + // Note we are NOT transposing this time! + pixelsToLoad.x += idx & 0x03u; //+= threadId % 4 + pixelsToLoad.y += idx >> 2u; //+= threadId / 4 + const float3 srcPixels0 = OGRE_Load2D(srcTex, int2(pixelsToLoad), 0).xyz; + return srcPixels0; +} + +float3 getSrcPixel(float x, float y) +{ + const uint2 pixelsToLoadBase = + ((gl_WorkGroupID.xy << 1u) + uint2(gl_LocalInvocationID.z & 0x01u, gl_LocalInvocationID.z >> 1u)) << 2u; + uint2 pixelsToLoad = pixelsToLoadBase + uint2(float(x), float(y)); + const float3 srcPixels0 = OGRE_Load2D(srcTex, int2(pixelsToLoad), 0).xyz; + return srcPixels0; +} + +/// Converts rgbValue in fp range [0; 1] to integer range [0; 64) in RB and [0; 128) in G channels +float3 rgbFpTo676(const float3 rgbFp) +{ + return floor(rgbFp * float2(63.0f, 127.0f).xyx + 0.5f); // Convert to 676 +} + +float3 rgb676To888(float3 rgbValue) +{ + return floor(rgbValue * float2(4.0625f, 2.0157f).xyx); // Convert to 888 +} + +float calcError(const float3 colour0, const float3 colour1) +{ + float3 diff = colour0.xyz - colour1.xyz; + return dot(diff, diff); +} + +float calcErrorPMode(float3 cO, float3 cH, float3 cV) +{ + float err = 0.0f; + + cO = rgb676To888(cO); + cH = rgb676To888(cH); + cV = rgb676To888(cV); + + for (uint i = 0u; i < 16u; ++i) + { + const float x = float(i & 0x03u); // i % 4 + const float y = float(i >> 2u); // i / 4 + + // Bilinear interpolation using integer arithmetic (i.e. what the HW does) + float3 rgbn = floor((4.0f * cO + x * (cH - cO) + y * (cV - cO) + 2.0f) * 0.25f); + rgbn = clamp(rgbn, 0.0f, 255.0f); + + err += calcError(getSrcPixel(x, y) * 255.0f, rgbn); + } + + return err; +} + +/** +@param cO + xz in range [0; 64) y in range [0; 128) +@param cH + xz in range [0; 64) y in range [0; 128) +@param cV + xz in range [0; 64) y in range [0; 128) +@param srcPixelsBlock +*/ +void etc2_planar_mode_write(const float3 cO, const float3 cH, const float3 cV) +{ + float4 bytes; + + // cO.r bits [0; 6) + // cO.g bits [6; 7) + bytes.x = kPmodeEncoderRG[uint(cO.x + (cO.y >= 64.0f ? 64.0f : 0.0f))]; + // cO.g bits [0; 6) + // cO.b bits [5; 6) + bytes.y = kPmodeEncoderGB[uint(mod(cO.y, 64.0f) + (cO.z >= 32.0f ? 64.0f : 0.0f))]; + // cO.b bits [1; 5) + bytes.z = kPmodeEncoderB[uint(mod(floor(cO.z * 0.5f), 16.0f))]; + bytes.w = mod(cO.z, 2.0f) * 128.0f + floor(cH.x * 0.5f) * 4.0f + 2.0f + mod(cH.x, 2.0f); + + uint2 outputBytes; + outputBytes.x = packUnorm4x8(bytes * (1.0f / 255.0f)); + + bytes.x = cH.y * 2.0f + floor(cH.z * 0.03125f); + bytes.y = mod(cH.z, 32.0f) * 8.0f + floor(cV.x * 0.125f); + bytes.z = mod(cV.x, 8.0f) * 32.0f + floor(cV.y * 0.25f); + bytes.w = mod(cV.y, 4.0f) * 64.0f + cV.z; + + outputBytes.y = packUnorm4x8(bytes * (1.0f / 255.0f)); + + const uint2 dstUV = (gl_WorkGroupID.xy << 1u) + uint2(gl_LocalInvocationID.z & 0x01u, gl_LocalInvocationID.z >> 1u); + imageStore(dstTexture, int2(dstUV), uint4(outputBytes.xy, 0u, 0u)); +} + +/** Uses a Simple Linear Regression to find the best curve that fits all 4 samples in a row +@param bVertical +@param yOffset + When bVertical = true, yOffset becomes xOffset +@param startIdx +@param endIdx +@param minEndpoint [out] + Value for cO +@param maxEndpoint [out] + Value for either cH (bVertical = false) or cV (bVertical = true) +*/ +void getCoeffSLR(const bool bVertical, const float yOffset, const float startIdx, const float endIdx, + out float3 minEndpoint, out float3 maxEndpoint) +{ + float3 srcCol[4]; + float3 avgCol = float3(0.0f, 0.0f, 0.0f); + for (float i = 0.0f; i < 4.0f; ++i) + { + const float idx = clamp(i, startIdx, endIdx); + float2 uv = float2(idx, yOffset); + uv = bVertical ? uv.yx : uv.xy; + srcCol[uint(i)] = getSrcPixel(uv.x, uv.y); + avgCol += srcCol[uint(i)]; + } + + avgCol *= 0.25f; + + float3 abscissaNum = float3(0.0f, 0.0f, 0.0f); + float3 abscissaDen = float3(0.0f, 0.0f, 0.0f); + + for (float i = 0.0f; i < 4.0f; ++i) + { + abscissaNum += (i - 1.5f) * (srcCol[uint(i)] - avgCol); + abscissaDen += (i - 1.5f) * (i - 1.5f); + } + + const float3 abscissa = abscissaNum / abscissaDen; + const float3 ordinate = avgCol - abscissa * 1.5f; + + minEndpoint = ordinate; + maxEndpoint = ordinate + abscissa * 3.0f; +} + +/** Calculates O, H and V coefficients using SLR (Simple Linear Regression) +@param oIdx + Where to start sampling O from. Must be in range [0; 2) +@param hIdx + Where to end sampling H at. Must be in range [2; 4) +@param vIdx + Where to end sampling V at. Must be in range [2; 4) +@param cO [out] + xz in range [0; 64) y in range [0; 128) +@param cH [out] + xz in range [0; 64) y in range [0; 128) +@param cV [out] + xz in range [0; 64) y in range [0; 128) +*/ +void getCoeffs(const uint2 oIdx, const uint hIdx, const uint vIdx, out float3 cO, out float3 cH, out float3 cV) +{ + float3 cOx, cOy; + getCoeffSLR(false, oIdx.y, oIdx.x, hIdx, cOx, cH); + getCoeffSLR(true, oIdx.x, oIdx.y, vIdx, cOy, cV); + + // We have two cO produced by each SLR. Just average them together and cross fingers + cO = (cOx + cOy) * 0.5f; + + cH = rgbFpTo676(saturate(lerp(cO, cH, 4.0f / 3.0f))); + cV = rgbFpTo676(saturate(lerp(cO, cV, 4.0f / 3.0f))); + cO = rgbFpTo676(saturate(cO)); +} + +void main() +{ + // P mode is for interpolating slowly varying gradients. + // + // O is at (0,0) + // H is at (4,0) + // V is at (0,4) + // So, H and V are outside the block. + // We extrapolate the values from (0,3) and (3,0). + // + // Some gradients are not possible due to clamping, others due to us having + // only 3 endpoints instead of 4. + // For those gradients, modes other than P may be more suitable. + // + // There is an edge case though: What if we have a smooth gradient, + // but O, H and/or V happens to be an outlier? (e.g. a gradient with a bad pixel or two) + // + // To test these edge case we try several cases: + // O starts at: + // 1. (0,0) + // 2. (0,1) + // 3. (1,0) + // 4. (1,1) + // However the same can happen to H and V, thus we try (before extrapolation): + // 1. H at (3, N) -> original case + // 2. H at (2, N) -> alternate case + // 3. V at (N, 3) -> original case + // 4. V at (N, 2) -> alternate case + // + // 'N' depends on the value of O we're trying + // + // Therefore we will try 4x4 = 16 cases in case our block's border(s) are outliers + // + // One of these tries will only use O(1,1) H(2,1) V(1,2) which means a gradient + // in a 2x2 rectangle and we ignore the outside borders. This is the most distorted + // one and surely another ETC2 mode will handle this case better, but we evaluate it anyway + // + // These 16 cases are handled by 1 thread each. + + const uint2 oIdxStart = uint2(gl_LocalInvocationID.x & 0x1u, gl_LocalInvocationID.x >> 1u); + const uint hIdxEnd = 3u - (gl_LocalInvocationID.y & 0x1u); + const uint vIdxEnd = 3u - (gl_LocalInvocationID.y >> 1u); + + float3 cO, cH, cV; + getCoeffs(oIdxStart, hIdxEnd, vIdxEnd, cO, cH, cV); + + const float err = calcErrorPMode(cO, cH, cV); + const uint thisThreadLocalIdx = gl_LocalInvocationID.y * 4u + gl_LocalInvocationID.x; + g_bestCandidates[thisThreadLocalIdx] = float2(err, thisThreadLocalIdx); + + __sharedOnlyBarrier; + + // Parallel reduction to find the thread with the best solution + const uint iterations = 4u; // 16 threads = 16 reductions = 2⁴ -> 4 iterations + for (uint i = 0u; i < iterations; ++i) + { + const uint mask = (1u << (i + 1u)) - 1u; + const uint idx = 1u << i; + if ((thisThreadLocalIdx & mask) == 0u) + { + const uint nextThreadLocalIdx = thisThreadLocalIdx + idx; + const float thisError = g_bestCandidates[thisThreadLocalIdx].x; + const float nextError = g_bestCandidates[nextThreadLocalIdx].x; + if (nextError < thisError) + { + g_bestCandidates[thisThreadLocalIdx] = float2(nextError, g_bestCandidates[nextThreadLocalIdx].y); + } + } + __sharedOnlyBarrier; + } + + if (thisThreadLocalIdx == uint(g_bestCandidates[0u].y)) + { + // This thread is the winner! Save the result + const uint2 dstUV = (gl_WorkGroupID.xy << 1u) + uint2(gl_LocalInvocationID.z & 0x01u, gl_LocalInvocationID.z >> 1u); + imageStore(dstError, int2(dstUV), float4(err, 0.0f, 0.0f, 0.0f)); + + etc2_planar_mode_write(cO, cH, cV); + } +} diff --git a/shaders/etc2_rgb_selector.glsl b/shaders/etc2_rgb_selector.glsl new file mode 100644 index 0000000..b55da42 --- /dev/null +++ b/shaders/etc2_rgb_selector.glsl @@ -0,0 +1,71 @@ +#version 430 core + +// RGB and Alpha components of ETC2 RGBA are computed separately. +// +// ETC2 also adds modes T and H (which we compute together) and mode P +// +// This shader will: +// 1. Select the mode with the lowest error +// 2. If not using Alpha, it will output to where P mode was stored (to save VRAM) +// 3. If using Alpha, it will also stitch the alpha and output to another texture +// +// See etc2_rgba_selector.glsl for this shader performing stitching (defines HAS_ALPHA) + +// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" + +#include "CrossPlatformSettings_piece_all.glsl" +#include "UavCrossPlatform_piece_all.glsl" + +layout(local_size_x = 8, // + local_size_y = 8, // + local_size_z = 1) in; + +layout(binding = 0) uniform sampler2D texErrorEtc1; +layout(binding = 1) uniform sampler2D texErrorTh; +layout(binding = 2) uniform sampler2D texErrorP; + +layout(binding = 3) uniform usampler2D srcEtc1; +layout(binding = 4) uniform usampler2D srcThModes; +#ifdef HAS_ALPHA +layout(binding = 5) uniform usampler2D srcPMode; +layout(binding = 6) uniform usampler2D srcAlpha; + +layout(rgba32ui, binding = 0) uniform restrict writeonly uimage2D dstTexture; +#define outputValue uint4(etcAlpha.xy, etcRgb.xy) +#else +layout(rg32ui, binding = 0) uniform restrict uimage2D inOutPMode; +#define srcPMode inOutPMode +#define dstTexture inOutPMode +#define outputValue uint4(etcRgb.xy, 0u, 0u) +#endif + +void main() +{ + const float errorEtc1 = OGRE_Load2D(texErrorEtc1, int2(gl_GlobalInvocationID.xy), 0).x; + const float errorThModes = OGRE_Load2D(texErrorTh, int2(gl_GlobalInvocationID.xy), 0).x; + const float errorPMode = OGRE_Load2D(texErrorP, int2(gl_GlobalInvocationID.xy), 0).x; + +#ifdef HAS_ALPHA + const uint2 etcAlpha = OGRE_Load2D(srcAlpha, int2(gl_GlobalInvocationID.xy), 0).xy; +#endif + + if (errorEtc1 <= errorThModes && errorEtc1 <= errorPMode) + { + const uint2 etcRgb = OGRE_Load2D(srcEtc1, int2(gl_GlobalInvocationID.xy), 0).xy; + imageStore(dstTexture, int2(gl_GlobalInvocationID.xy), outputValue); + } + else if (errorThModes < errorPMode) + { + const uint2 etcRgb = OGRE_Load2D(srcThModes, int2(gl_GlobalInvocationID.xy), 0).xy; + imageStore(dstTexture, int2(gl_GlobalInvocationID.xy), outputValue); + } + else + { +#ifdef HAS_ALPHA + const uint2 etcRgb = OGRE_Load2D(srcPMode, int2(gl_GlobalInvocationID.xy), 0).xy; +#else + const uint2 etcRgb = OGRE_imageLoad2D(srcPMode, int2(gl_GlobalInvocationID.xy)).xy; +#endif + imageStore(dstTexture, int2(gl_GlobalInvocationID.xy), outputValue); + } +} diff --git a/bin/Data/etc2_rgba_selector.glsl b/shaders/etc2_rgba_selector.glsl similarity index 100% rename from bin/Data/etc2_rgba_selector.glsl rename to shaders/etc2_rgba_selector.glsl diff --git a/shaders/etc2_rgba_stitch.glsl b/shaders/etc2_rgba_stitch.glsl new file mode 100644 index 0000000..8c57982 --- /dev/null +++ b/shaders/etc2_rgba_stitch.glsl @@ -0,0 +1,26 @@ +// RGB and Alpha components of ETC2 RGBA are computed separately. +// This compute shader merely stitches them together to form the final result +// It's also used by RG11 driver to stitch two R11 into one RG11 + +#version 430 core + +// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" + +#include "CrossPlatformSettings_piece_all.glsl" +#include "UavCrossPlatform_piece_all.glsl" + +layout(local_size_x = 8, // + local_size_y = 8, // + local_size_z = 1) in; + +layout(binding = 0) uniform usampler2D srcRGB; +layout(binding = 1) uniform usampler2D srcAlpha; +layout(rgba32ui) uniform restrict writeonly uimage2D dstTexture; + +void main() +{ + uint2 etcRgb = OGRE_Load2D(srcRGB, int2(gl_GlobalInvocationID.xy), 0).xy; + uint2 etcAlpha = OGRE_Load2D(srcAlpha, int2(gl_GlobalInvocationID.xy), 0).xy; + + imageStore(dstTexture, int2(gl_GlobalInvocationID.xy), uint4(etcAlpha.xy, etcRgb.xy)); +} diff --git a/shaders/etc2_th.glsl b/shaders/etc2_th.glsl new file mode 100644 index 0000000..97e0a5b --- /dev/null +++ b/shaders/etc2_th.glsl @@ -0,0 +1,475 @@ +#version 430 core + +// T & H modes of ETC2 + +// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" + +#include "CrossPlatformSettings_piece_all.glsl" +#include "UavCrossPlatform_piece_all.glsl" + +#define FLT_MAX 340282346638528859811704183484516925440.0f + +shared uint g_srcPixelsBlock[16]; +shared float2 g_bestCandidates[120 * 8]; //.x = error; .y = threadId + +uniform sampler2D srcTex; + +layout(rg32ui, binding = 0) uniform restrict writeonly uimage2D dstTexture; +layout(r32f, binding = 1) uniform restrict writeonly image2D dstError; +layout(rg32ui, binding = 2) uniform restrict readonly uimage2DArray c0c1Texture; + +layout(local_size_x = 8, // + local_size_y = 120, // 15 + 14 + 13 + ... + 1 + local_size_z = 1) in; + +const float kDistances[8] = { // + 3.0f / 255.0f, // + 6.0f / 255.0f, // + 11.0f / 255.0f, // + 16.0f / 255.0f, // + 23.0f / 255.0f, // + 32.0f / 255.0f, // + 41.0f / 255.0f, // + 64.0f / 255.0f}; + +/* +kTmodeEncoderR table generated with: + static const int kSigned3bit[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; + int main() + { + for( int r1_4=0;r1_4<16;++r1_4 ) + { + int R = r1_4 >> 2; + int dR = r1_4 & 0x3; + for( int Rx = 0; Rx < 8; Rx++ ) + { + for( int dRx = 0; dRx < 2; dRx++ ) + { + int Rtry = R | ( Rx << 2 ); + int dRtry = dR | ( dRx << 2 ); + if( ( Rtry + kSigned3bit[dRtry] ) < 0 || ( Rtry + kSigned3bit[dRtry] > 31 ) ) + { + R = Rtry; + dR = dRtry; + break; + } + } + } + + if( ( R + kSigned3bit[dR] ) >= 0 && ( R + kSigned3bit[dR] <= 31 ) ) + // this can't happen, should be an assert + return -1; + + printf( "%i, ", ( ( R & 0x1F ) << 3 ) | ( dR & 0x7 ) ); + printf( "\n" ); + } + + return 0; + } +*/ +const float kTmodeEncoderR[16] = {4, 5, 6, 7, 12, 13, 14, 235, 20, 21, 242, 243, 28, 249, 250, 251}; + +/* +kHmodeEncoderRG table generated with: + static const int kSigned3bit[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; + int main() + { + for( int r1_4 = 0; r1_4 < 16; ++r1_4 ) + { + for( int g1_4 = 0; g1_4 < 16; ++g1_4 ) + { + if( !( g1_4 & 0x1 ) ) + { + // R1 + G1a. R + [dR] must be inside [0..31]. Scanning all values. Not smart. + int R = r1_4; + int dR = g1_4 >> 1; + if( ( R + kSigned3bit[dR] ) < 0 || ( R + kSigned3bit[dR] > 31 ) ) + R |= ( 1 << 4 ); + + if( ( R + kSigned3bit[dR] ) < 0 || ( R + kSigned3bit[dR] > 31 ) ) + return -1; // wtf? + + printf( "%i, ", ( ( R & 0x1F ) << 3 ) | ( dR & 0x7 ) ); + } + } + } + printf( "\n" ); + return 0; + } +*/ +const float kHmodeEncoderRG[128] = // + {0, 1, 2, 3, 132, 133, 134, 135, 8, 9, 10, 11, 140, 141, 142, 15, 16, 17, 18, 19, 148, 149, + 22, 23, 24, 25, 26, 27, 156, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127}; + +/* +kHmodeEncoderGB table generated with: + static const int kSigned3bit[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; + #define BITS( byteval, lowbit, highbit ) \ + ( ( ( byteval ) >> ( lowbit ) ) & ( ( 1 << ( ( highbit ) - ( lowbit ) + 1 ) ) - 1 ) ) + + #define BIT( byteval, bit ) ( ( ( byteval ) >> ( bit ) ) & 0x1 ) + + int main() + { + for( int g1_4 = 0; g1_4 < 2; ++g1_4 ) + { + for( int b1_4 = 0; b1_4 < 16; ++b1_4 ) + { + if( !( b1_4 & 0x1 ) ) + { + // G1b + B1a + B1b[2 msb]. G + dG must be outside the range. + int G = ( g1_4 & 0x1 ) << 1; + G |= BIT( b1_4, 3 ); + int dG = BITS( b1_4, 1, 2 ); + for( int Gx = 0; Gx < 8; Gx++ ) + { + for( int dGx = 0; dGx < 2; dGx++ ) + { + int Gtry = G | ( Gx << 2 ); + int dGtry = dG | ( dGx << 2 ); + if( ( Gtry + kSigned3bit[dGtry] ) < 0 || ( Gtry + kSigned3bit[dGtry] > 31 ) ) + { + G = Gtry; + dG = dGtry; + break; + } + } + } + + if( ( G + kSigned3bit[dG] ) >= 0 && ( G + kSigned3bit[dG] <= 31 ) ) + return -1; // wtf? + + printf( "%i, ", ( ( G & 0x1F ) << 3 ) | ( dG & 0x7 ) ); + } + } + } + + printf( "\n" ); + return 0; + } +*/ +const float kHmodeEncoderGB[16] = // + {4, 5, 6, 7, 12, 13, 14, 235, 20, 21, 242, 243, 28, 249, 250, 251}; + +/*float rgb888to444( float3 rgbValue ) +{ + rgbValue = floor( rgbValue * 15.0f / 255.0f + 0.5f ); + return rgbValue.r * 256.0f + rgbValue.g * 16.0f + rgbValue.b; +}*/ +float3 rgb888to444(uint packedRgb) +{ + float3 rgbValue = unpackUnorm4x8(packedRgb).xyz; + rgbValue = floor(rgbValue * 15.0f + 0.5f); + return rgbValue; +} + +/// Quantizes 'srcValue' which is originally in 888 (full range), +/// converting it to 444 and then back to 888 (quantized) +uint quant4(const uint packedRgb) +{ + float3 rgbValue = unpackUnorm4x8(packedRgb).xyz; // Range [0; 1] + rgbValue = floor(rgbValue * 15.0f + 0.5f); // Convert to 444, range [0; 15] + rgbValue = floor(rgbValue * 19.05f); // Convert to 888, range [0; 255] + return packUnorm4x8(float4(rgbValue * (1.0f / 255.0f), 1.0f)); +} + +uint quant4(float3 rgbValue) +{ + rgbValue = floor(rgbValue * 15.0f / 255.0f + 0.5f); // Convert to 444 + rgbValue = floor(rgbValue * 19.05f); // Convert to 888 + return packUnorm4x8(float4(rgbValue * (1.0f / 255.0f), 1.0f)); +} + +float calcError(const uint colour0, const uint colour1) +{ + float3 diff = unpackUnorm4x8(colour0).xyz - unpackUnorm4x8(colour1).xyz; + return dot(diff, diff) * 65025.0f; // 65025 = 255 * 255 +} + +/// Performs: +/// packedRgb = saturate( packedRgb + value ); +/// assuming 'value' is in range [0; 1] +uint addSat(const uint packedRgb, float value) +{ + float3 rgbValue = unpackUnorm4x8(packedRgb).xyz; + rgbValue = saturate(rgbValue + value); + return packUnorm4x8(float4(rgbValue, 1.0f)); +} + +float etc2_th_mode_calcError(const bool hMode, const uint c0, const uint c1, float distance) +{ + uint paintColors[4]; + + if (!hMode) + { + paintColors[0] = c0; + paintColors[1] = addSat(c1, distance); + paintColors[2] = c1; + paintColors[3] = addSat(c1, -distance); + } + else + { + // We don't care about swapping c0 & c1 because we're only calculating error + // and both variations produce the same result + paintColors[0] = addSat(c0, distance); + paintColors[1] = addSat(c0, -distance); + paintColors[2] = addSat(c1, distance); + paintColors[3] = addSat(c1, -distance); + } + + float errAcc = 0; + for (int k = 0; k < 16; ++k) + { + float bestDist = FLT_MAX; + for (int idx = 0; idx < 4; ++idx) + { + const float dist = calcError(g_srcPixelsBlock[k], paintColors[idx]); + bestDist = min(bestDist, dist); + } + + errAcc += bestDist; + } + + return errAcc; +} + +uint etc2_gen_header_t_mode(const uint c0, const uint c1, const uint distIdx) +{ + // 4 bit colors + const float3 rgb0 = rgb888to444(c0); + const float3 rgb1 = rgb888to444(c1); + + const float fDistIdx = float(distIdx); + + float4 bytes; + bytes.x = kTmodeEncoderR[uint(rgb0.x)]; + bytes.y = rgb0.y * 16.0f + rgb0.z; // G0, B0 + bytes.z = rgb1.x * 16.0f + rgb1.y; // R1, G1 + bytes.w = rgb1.z * 16.0f + floor(fDistIdx * 0.5f) * 4.0f + 2.0f + mod(fDistIdx, 2.0f); + // bytes.w = rgb1.z * 16.0f | ( ( distIdx >> 1u ) << 2u ) | ( 1u << 1u ) | ( distIdx & 0x1u ); + + return packUnorm4x8(bytes * (1.0f / 255.0f)); +} + +uint etc2_gen_header_h_mode(const uint colour0, const uint colour1, const uint distIdx, out bool bShouldSwap) +{ + uint c0, c1; + // Note: if c0 == c1, no big deal because H is not the best choice of mode + if ((distIdx & 0x01u) != 0u) + { + c0 = max(colour0, colour1); + c1 = min(colour0, colour1); + bShouldSwap = true; + } + else + { + c0 = min(colour0, colour1); + c1 = max(colour0, colour1); + } + + bShouldSwap = c0 != colour0; + + // 4 bit colors + const float3 rgb0 = rgb888to444(c0); + const float3 rgb1 = rgb888to444(c1); + + const float fDistIdx = float(distIdx); + + float4 bytes; + // R0 (4 bits) + G0 (3 bits msb) + bytes.x = kHmodeEncoderRG[uint(rgb0.x * 8.0f + floor(rgb0.y * 0.5f))]; + // G0 (1 bit lsb) + B0 (3 bits msb) + bytes.y = kHmodeEncoderGB[uint(mod(rgb0.y, 2.0f) * 8.0f + floor(rgb0.z * 0.5f))]; + // B0 (1 bit lsb) + R1 + G1 (3 bits msb) + bytes.z = mod(rgb0.z, 2.0f) * 128.0f + rgb1.x * 8.0f + floor(rgb1.y * 0.5f); + // G1 (1 bit lsb) + B1 + distance (2 bits msb, the 3rd one was implicit in c0 < c1 order) + bytes.w = mod(rgb1.g, 2.0f) * 128.0f + rgb1.z * 8.0f + 2.0f; + bytes.w += mod(floor(fDistIdx * 0.5f), 2.0f) + floor(fDistIdx * (1.0f / 4.0f)) * 4.0f; + // bytes.w = ( rgb1.g & 0x1 ) << 7 | rgb1.z << 3 | 0x2 | + // ( ( distIdx >> 1u ) & 0x01 ) | ( distIdx & 0x04 ); + + return packUnorm4x8(bytes * (1.0f / 255.0f)); +} + +void etc2_th_mode_write(const bool hMode, uint c0, uint c1, float distance, uint distIdx) +{ + uint paintColors[4]; + + uint2 outputBytes; + + if (!hMode) + { + outputBytes.x = etc2_gen_header_t_mode(c0, c1, distIdx); + + paintColors[0] = c0; + paintColors[1] = addSat(c1, distance); + paintColors[2] = c1; + paintColors[3] = addSat(c1, -distance); + } + else + { + bool bShouldSwap; + outputBytes.x = etc2_gen_header_h_mode(c0, c1, distIdx, bShouldSwap); + + if (bShouldSwap) + { + // swap( c0, c1 ) + const uint tmp = c0; + c0 = c1; + c1 = tmp; + } + + paintColors[0] = addSat(c0, distance); + paintColors[1] = addSat(c0, -distance); + paintColors[2] = addSat(c1, distance); + paintColors[3] = addSat(c1, -distance); + } + + outputBytes.y = 0u; + + for (uint k = 0u; k < 16u; ++k) + { + float bestDist = FLT_MAX; + uint bestIdx = 0u; + + for (uint idx = 0u; idx < 4u; ++idx) + { + const float dist = calcError(g_srcPixelsBlock[k], paintColors[idx]); + if (dist < bestDist) + { + bestDist = dist; + bestIdx = idx; + } + } + + // When k < 8 write bestIdx to region bits [8; 16) and [24; 32) + // When k >= 8 write bestIdx to region bits [0; 8) and [16; 24) + const uint bitStart0 = k < 8 ? 8u : 0u; + const uint bitStart1 = k < 8 ? 24u : 16u; + outputBytes.y |= (((bestIdx & 0x2u) != 0u ? 1u : 0u) << (k & 0x7u)) << bitStart0; + outputBytes.y |= ((bestIdx & 0x1u) << (k & 0x7u)) << bitStart1; + } + + const uint2 dstUV = gl_WorkGroupID.xy; + imageStore(dstTexture, int2(dstUV), uint4(outputBytes.xy, 0u, 0u)); +} + +void main() +{ + if (gl_LocalInvocationIndex < 16u) + { + const uint2 pixelsToLoadBase = gl_WorkGroupID.xy << 2u; + uint2 pixelsToLoad = pixelsToLoadBase; + // Note ETC2 wants the src pixels transposed! + pixelsToLoad.x += gl_LocalInvocationIndex >> 2u; //+= threadId / 4 + pixelsToLoad.y += gl_LocalInvocationIndex & 0x03u; //+= threadId % 4 + const float3 srcPixels0 = OGRE_Load2D(srcTex, int2(pixelsToLoad), 0).xyz; + g_srcPixelsBlock[gl_LocalInvocationIndex] = packUnorm4x8(float4(srcPixels0, 1.0f)); + } + + __sharedOnlyBarrier; + + // We have 120 potential pairs of colour candidates (some of these candidates may repeat) + // ETC2 has 8 distance modes (3 bits) for each pair (should have high thread convergence) + // + // So we assign 1 thread to each + const uint distIdx = gl_LocalInvocationID.x; + + const uint2 c0c1 = OGRE_imageLoad2DArray(c0c1Texture, uint3(gl_WorkGroupID.xy, gl_LocalInvocationID.y)).xy; + const uint c0 = c0c1.x; + const uint c1 = c0c1.y; + + float minErr = FLT_MAX; + uint bestC0 = 0u; + uint bestC1 = 0u; + bool bestModeIsH; + + float err; + + const float distance = kDistances[distIdx]; + + // T modes (swapping c0 / c1 makes produces different result) + err = etc2_th_mode_calcError(false, c0, c1, distance); + if (err < minErr) + { + minErr = err; + bestC0 = c0; + bestC1 = c1; + bestModeIsH = false; + } + + err = etc2_th_mode_calcError(false, c1, c0, distance); + if (err < minErr) + { + minErr = err; + bestC0 = c1; + bestC1 = c0; + bestModeIsH = false; + } + + // H mode (swapping c0 / c1 is pointless, and is used in encoding to increase 1 bit) + err = etc2_th_mode_calcError(true, c0, c1, distance); + if (err < minErr) + { + minErr = err; + bestC0 = c0; + bestC1 = c1; + bestModeIsH = true; + } + + g_bestCandidates[gl_LocalInvocationIndex] = float2(minErr, gl_LocalInvocationIndex); + + __sharedOnlyBarrier; + +#if 1 + // Parallel reduction to find the thread with the best solution + // Because 960 != 1024, the last few operations on the last threads will repeat a bit. + // However we don't care because the minimum of 2 values will always be the same. + const uint iterations = 10u; // 960 threads = 960 reductions <= 2¹⁰ -> 10 iterations + for (uint i = 0u; i < iterations; ++i) + { + const uint mask = (1u << (i + 1u)) - 1u; + const uint idx = 1u << i; + if ((gl_LocalInvocationIndex & mask) == 0u) + { + // nextThreadId can overflow (off by 1) since we're not power of 2 + const uint thisThreadId = gl_LocalInvocationIndex; + const uint nextThreadId = min(gl_LocalInvocationIndex + idx, 960u - 1u); + const float thisError = g_bestCandidates[thisThreadId].x; + const float nextError = g_bestCandidates[nextThreadId].x; + if (nextError < thisError) + g_bestCandidates[thisThreadId] = float2(nextError, g_bestCandidates[nextThreadId].y); + } + __sharedOnlyBarrier; + } +#else + // Serial reduction, for ground-truth debugging + if (gl_LocalInvocationIndex == 0u) + { + for (uint i = 1u; i < 960u; ++i) + { + const uint thisThreadId = 0u; + const uint nextThreadId = i; + const float thisError = g_bestCandidates[thisThreadId].x; + const float nextError = g_bestCandidates[nextThreadId].x; + if (nextError < thisError) + g_bestCandidates[thisThreadId] = float2(nextError, nextThreadId); + } + } + + __sharedOnlyBarrier; +#endif + + if (gl_LocalInvocationIndex == uint(g_bestCandidates[0].y)) + { + // This thread is the winner! Save the result + etc2_th_mode_write(bestModeIsH, bestC0, bestC1, kDistances[distIdx], distIdx); + + const uint2 dstUV = gl_WorkGroupID.xy; + imageStore(dstError, int2(dstUV), float4(g_bestCandidates[0].x, 0.0f, 0.0f, 0.0f)); + } +} diff --git a/shaders/etc2_th_find_best_c0c1_k_means.glsl b/shaders/etc2_th_find_best_c0c1_k_means.glsl new file mode 100644 index 0000000..b03c7c3 --- /dev/null +++ b/shaders/etc2_th_find_best_c0c1_k_means.glsl @@ -0,0 +1,196 @@ +#version 430 core + +// T & H modes of ETC2 + +// #include "/media/matias/Datos/SyntaxHighlightingMisc.h" + +#include "CrossPlatformSettings_piece_all.glsl" +#include "UavCrossPlatform_piece_all.glsl" + +uniform sampler2D srcTex; + +layout(rg32ui, binding = 0) uniform restrict writeonly uimage2DArray dstTexture; + +layout(local_size_x = 120, // + local_size_y = 4, // + local_size_z = 2) in; + +/* +kLocalInvocationToPixIdx table generated with: + int main() + { + for( int pix1 = 0; pix1 < 15; pix1++ ) + { + for( int pix2 = pix1 + 1; pix2 < 16; pix2++ ) + printf( "uint2( %iu, %iu ), ", pix1, pix2 ); + } + printf( "\n" ); + return 0; + } +*/ +const uint2 kLocalInvocationToPixIdx[120] = { + uint2(0u, 1u), uint2(0u, 2u), uint2(0u, 3u), uint2(0u, 4u), uint2(0u, 5u), uint2(0u, 6u), + uint2(0u, 7u), uint2(0u, 8u), uint2(0u, 9u), uint2(0u, 10u), uint2(0u, 11u), uint2(0u, 12u), + uint2(0u, 13u), uint2(0u, 14u), uint2(0u, 15u), uint2(1u, 2u), uint2(1u, 3u), uint2(1u, 4u), + uint2(1u, 5u), uint2(1u, 6u), uint2(1u, 7u), uint2(1u, 8u), uint2(1u, 9u), uint2(1u, 10u), + uint2(1u, 11u), uint2(1u, 12u), uint2(1u, 13u), uint2(1u, 14u), uint2(1u, 15u), uint2(2u, 3u), + uint2(2u, 4u), uint2(2u, 5u), uint2(2u, 6u), uint2(2u, 7u), uint2(2u, 8u), uint2(2u, 9u), + uint2(2u, 10u), uint2(2u, 11u), uint2(2u, 12u), uint2(2u, 13u), uint2(2u, 14u), uint2(2u, 15u), + uint2(3u, 4u), uint2(3u, 5u), uint2(3u, 6u), uint2(3u, 7u), uint2(3u, 8u), uint2(3u, 9u), + uint2(3u, 10u), uint2(3u, 11u), uint2(3u, 12u), uint2(3u, 13u), uint2(3u, 14u), uint2(3u, 15u), + uint2(4u, 5u), uint2(4u, 6u), uint2(4u, 7u), uint2(4u, 8u), uint2(4u, 9u), uint2(4u, 10u), + uint2(4u, 11u), uint2(4u, 12u), uint2(4u, 13u), uint2(4u, 14u), uint2(4u, 15u), uint2(5u, 6u), + uint2(5u, 7u), uint2(5u, 8u), uint2(5u, 9u), uint2(5u, 10u), uint2(5u, 11u), uint2(5u, 12u), + uint2(5u, 13u), uint2(5u, 14u), uint2(5u, 15u), uint2(6u, 7u), uint2(6u, 8u), uint2(6u, 9u), + uint2(6u, 10u), uint2(6u, 11u), uint2(6u, 12u), uint2(6u, 13u), uint2(6u, 14u), uint2(6u, 15u), + uint2(7u, 8u), uint2(7u, 9u), uint2(7u, 10u), uint2(7u, 11u), uint2(7u, 12u), uint2(7u, 13u), + uint2(7u, 14u), uint2(7u, 15u), uint2(8u, 9u), uint2(8u, 10u), uint2(8u, 11u), uint2(8u, 12u), + uint2(8u, 13u), uint2(8u, 14u), uint2(8u, 15u), uint2(9u, 10u), uint2(9u, 11u), uint2(9u, 12u), + uint2(9u, 13u), uint2(9u, 14u), uint2(9u, 15u), uint2(10u, 11u), uint2(10u, 12u), uint2(10u, 13u), + uint2(10u, 14u), uint2(10u, 15u), uint2(11u, 12u), uint2(11u, 13u), uint2(11u, 14u), uint2(11u, 15u), + uint2(12u, 13u), uint2(12u, 14u), uint2(12u, 15u), uint2(13u, 14u), uint2(13u, 15u), uint2(14u, 15u)}; + +float3 getSrcPixel(uint idx) +{ + const uint2 pixelsToLoadBase = gl_GlobalInvocationID.yz << 2u; + uint2 pixelsToLoad = pixelsToLoadBase; + // Note ETC2 wants the src pixels transposed! + pixelsToLoad.x += idx >> 2u; //+= threadId / 4 + pixelsToLoad.y += idx & 0x03u; //+= threadId % 4 + const float3 srcPixels0 = OGRE_Load2D(srcTex, int2(pixelsToLoad), 0).xyz; + return srcPixels0; +} + +/// Quantizes 'srcValue' which is originally in 888 (full range), +/// converting it to 444 and then back to 888 (quantized) +uint quant4(const uint packedRgb) +{ + float3 rgbValue = unpackUnorm4x8(packedRgb).xyz; // Range [0; 1] + rgbValue = floor(rgbValue * 15.0f + 0.5f); // Convert to 444, range [0; 15] + rgbValue = floor(rgbValue * 19.05f); // Convert to 888, range [0; 255] + return packUnorm4x8(float4(rgbValue * (1.0f / 255.0f), 1.0f)); +} + +uint quant4(float3 rgbValue) +{ + rgbValue = floor(rgbValue * 15.0f / 255.0f + 0.5f); // Convert to 444 + rgbValue = floor(rgbValue * 19.05f); // Convert to 888 + return packUnorm4x8(float4(rgbValue * (1.0f / 255.0f), 1.0f)); +} + +float calcError(const uint colour0, const uint colour1) +{ + float3 diff = unpackUnorm4x8(colour0).xyz - unpackUnorm4x8(colour1).xyz; + return dot(diff, diff) * 65025.0f; // 65025 = 255 * 255 +} + +float calcError(const uint colour0, const float3 colour1) +{ + float3 diff = unpackUnorm4x8(colour0).xyz - colour1.xyz; + return dot(diff, diff) * 65025.0f; // 65025 = 255 * 255 +} + +void block_main_colors_find(out uint outC0, out uint outC1, uint c0, uint c1) +{ + const int kMaxIterations = 20; + + bool bestMatchFound = false; + + // k-means complexity is O(n^(d.k+1) log n) + // In this case, n = 16, k = 2, d = 3 so 20 loops + + for (int iter = 0; iter < kMaxIterations && !bestMatchFound; ++iter) + { + int cluster0_cnt = 0, cluster1_cnt = 0; + int cluster0[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + int cluster1[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + float maxDist0 = 0, maxDist1 = 0; + + // k-means assignment step + for (int k = 0; k < 16; ++k) + { + const float dist0 = calcError(c0, getSrcPixel(k)); + const float dist1 = calcError(c1, getSrcPixel(k)); + if (dist0 <= dist1) + { + cluster0[cluster0_cnt++] = k; + maxDist0 = max(dist0, maxDist0); + } + else + { + cluster1[cluster1_cnt++] = k; + maxDist1 = max(dist1, maxDist1); + } + } + + // k-means failed + if (cluster0_cnt == 0 || cluster1_cnt == 0) + { + // Actually we did not find the best match. But set this flag to abort + // the loop and keep on going with the original colours (using 'break' + // makes compilers go crazy) + bestMatchFound = true; + } + else + { + float3 rgb0 = float3(0, 0, 0); + float3 rgb1 = float3(0, 0, 0); + + // k-means update step + for (int k = 0; k < cluster0_cnt; ++k) + rgb0 += getSrcPixel(cluster0[k]); + + for (int k = 0; k < cluster1_cnt; ++k) + rgb1 += getSrcPixel(cluster1[k]); + + rgb0 = floor(rgb0 * (255.0f / cluster0_cnt) + 0.5f); + rgb1 = floor(rgb1 * (255.0f / cluster1_cnt) + 0.5f); + + const uint newC0 = quant4(rgb0); + const uint newC1 = quant4(rgb1); + if (newC0 == c0 && newC1 == c1) + { + bestMatchFound = true; + } + else + { + if (newC0 != newC1) + { + c0 = newC0; + c1 = newC1; + } + else if (calcError(newC0, c0) > calcError(newC1, c1)) + { + c0 = newC0; + } + else + { + c1 = newC1; + } + } + } + } + + outC0 = c0; + outC1 = c1; +} + +void main() +{ + const uint pix0 = kLocalInvocationToPixIdx[gl_LocalInvocationID.x].x; + const uint pix1 = kLocalInvocationToPixIdx[gl_LocalInvocationID.x].y; + + uint c0 = quant4(getSrcPixel(pix0) * 255.0f); + uint c1 = quant4(getSrcPixel(pix1) * 255.0f); + + if (c0 != c1) + { + uint newC0, newC1; + block_main_colors_find(newC0, newC1, c0, c1); + c0 = newC0; + c1 = newC1; + } + + const uint2 dstUV = gl_GlobalInvocationID.yz; + imageStore(dstTexture, int3(dstUV, gl_LocalInvocationID.x), uint4(c0, c1, 0u, 0u)); +} diff --git a/src/AmalgamationEnum.cpp b/src/AmalgamationEnum.cpp deleted file mode 100644 index 802fb2a..0000000 --- a/src/AmalgamationEnum.cpp +++ /dev/null @@ -1,127 +0,0 @@ -// EnumIterator.py AUTOGENERATED FILE. ** DO NOT EDIT ** Run "python2 Run.py" - -#include -#include - -const std::string BLANKSTRING = ""; - -#include "CmdLineParams.h" - -#include "CmdLineParamsEnum.h" - -namespace Codec -{ - CodecEnum::EnumData CodecEnum::mSortedByEnum[13 + 1] = { - CodecEnum::EnumData( bc1, "bc1" ), // - CodecEnum::EnumData( bc3, "bc3" ), // - CodecEnum::EnumData( bc4, "bc4" ), // - CodecEnum::EnumData( bc4_snorm, "bc4_snorm" ), // - CodecEnum::EnumData( bc5, "bc5" ), // - CodecEnum::EnumData( bc5_snorm, "bc5_snorm" ), // - CodecEnum::EnumData( bc6h, "bc6h" ), // - CodecEnum::EnumData( eac_r11, "eac_r11" ), // - CodecEnum::EnumData( eac_rg11, "eac_rg11" ), // - CodecEnum::EnumData( etc1, "etc1" ), // - CodecEnum::EnumData( etc2_rgb, "etc2_rgb" ), // - CodecEnum::EnumData( etc2_rgba, "etc2_rgba" ), // - CodecEnum::EnumData( etc2_rgba_etc1, "etc2_rgba_etc1" ), // - CodecEnum::EnumData( etc2_rgba_etc1, "__INVALID" ) - }; - - CodecEnum::EnumData CodecEnum::mSortedByString[13 + 1] = { - CodecEnum::EnumData( bc1, "bc1" ), // - CodecEnum::EnumData( bc3, "bc3" ), // - CodecEnum::EnumData( bc4, "bc4" ), // - CodecEnum::EnumData( bc4_snorm, "bc4_snorm" ), // - CodecEnum::EnumData( bc5, "bc5" ), // - CodecEnum::EnumData( bc5_snorm, "bc5_snorm" ), // - CodecEnum::EnumData( bc6h, "bc6h" ), // - CodecEnum::EnumData( eac_r11, "eac_r11" ), // - CodecEnum::EnumData( eac_rg11, "eac_rg11" ), // - CodecEnum::EnumData( etc1, "etc1" ), // - CodecEnum::EnumData( etc2_rgb, "etc2_rgb" ), // - CodecEnum::EnumData( etc2_rgba, "etc2_rgba" ), // - CodecEnum::EnumData( etc2_rgba_etc1, "etc2_rgba_etc1" ), // - CodecEnum::EnumData( etc2_rgba_etc1, "__INVALID" ) - }; - - //--------------------------------------------------------------------------------------- - CodecEnum::EnumData::EnumData( Codec _enumValue, const std::string &_enumString ) : - enumValue( _enumValue ), - enumString( _enumString ) - { - } - //--------------------------------------------------------------------------------------- - struct CodecEnum::OrderByEnum - { - bool operator()( const CodecEnum::EnumData &_l, Codec _r ) const { return _l.enumValue < _r; } - - bool operator()( Codec _l, const CodecEnum::EnumData &_r ) const { return _l < _r.enumValue; } - - bool operator()( const CodecEnum::EnumData &_l, int _r ) const { return _l.enumValue < _r; } - - bool operator()( int _l, const CodecEnum::EnumData &_r ) const { return _l < _r.enumValue; } - }; - //--------------------------------------------------------------------------------------- - struct CodecEnum::OrderByStr - { - bool operator()( const CodecEnum::EnumData &_l, const std::string &_r ) const - { - return _l.enumString < _r; - } - - bool operator()( const std::string &_l, const CodecEnum::EnumData &_r ) const - { - return _l < _r.enumString; - } - }; - //--------------------------------------------------------------------------------------- - //--------------------------------------------------------------------------------------- - int CodecEnum::minValue() { return mSortedByEnum[0].enumValue; } - //--------------------------------------------------------------------------------------- - int CodecEnum::maxValue() { return mSortedByEnum[13 - 1].enumValue; } - //--------------------------------------------------------------------------------------- - size_t CodecEnum::count() { return 13; } - //--------------------------------------------------------------------------------------- - bool CodecEnum::find( const std::string &strValue, Codec &outValue ) - { - const EnumData *itor = - std::lower_bound( &mSortedByString[0], &mSortedByString[13], strValue, OrderByStr() ); - - if( itor != &mSortedByString[13] && itor->enumString == strValue ) - { - outValue = itor->enumValue; - return true; - } - else - { - return false; - } - } - //--------------------------------------------------------------------------------------- - Codec CodecEnum::find( const std::string &strValue ) - { - Codec retVal; - const bool bFound = find( strValue, retVal ); - if( !bFound ) - { - throw std::invalid_argument( "String: " + strValue + " is not a valid enum of type Codec" ); - } - - return retVal; - } - - //--------------------------------------------------------------------------------------- - bool CodecEnum::isValidValue( int value ) { return minValue() >= value && value <= maxValue(); } - //--------------------------------------------------------------------------------------- - const std::string &CodecEnum::get( Codec value ) - { - const int idx = value - mSortedByEnum[0].enumValue; - if( idx >= count() ) - return BLANKSTRING; - - return mSortedByEnum[idx].enumString; - } - //--------------------------------------------------------------------------------------- - const std::string &CodecEnum::find( Codec value ) { return get( value ); } -} // namespace Codec diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..d51ead4 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(lib) +add_subdirectory(app) \ No newline at end of file diff --git a/src/PlatformGL.cpp b/src/PlatformGL.cpp deleted file mode 100644 index 96ffa00..0000000 --- a/src/PlatformGL.cpp +++ /dev/null @@ -1,126 +0,0 @@ - -#include "GL/gl3w.h" - -#include "FreeImage.h" -#include "SDL.h" - -#include -#include - -namespace betsy -{ - extern void initBetsyPlatform(); - extern void shutdownBetsyPlatform(); - extern void pollPlatformWindow(); - - extern bool g_hasDebugObjectLabel; - static SDL_GLContext g_glContext = 0; - static SDL_Window *g_sdlWindow = 0; - - static void APIENTRY GLDebugCallback( GLenum source, GLenum type, GLuint id, GLenum severity, - GLsizei length, const GLchar *message, const void *userParam ) - { - printf( "%s\n", message ); - } - - void initBetsyPlatform() - { - if( SDL_Init( SDL_INIT_VIDEO ) != 0 ) - { - fprintf( stderr, "Error initializing SDL\n" ); - SDL_Quit(); - abort(); - } - - FreeImage_Initialise( TRUE ); - - int width = 1280; - int height = 720; - - int screen = 0; - int posX = SDL_WINDOWPOS_CENTERED_DISPLAY( screen ); - int posY = SDL_WINDOWPOS_CENTERED_DISPLAY( screen ); - - bool fullscreen = false; - if( fullscreen ) - { - posX = SDL_WINDOWPOS_UNDEFINED_DISPLAY( screen ); - posY = SDL_WINDOWPOS_UNDEFINED_DISPLAY( screen ); - } - - g_sdlWindow = - SDL_CreateWindow( "Betsy Mandatory GL window", // window title - posX, // initial x position - posY, // initial y position - width, // width, in pixels - height, // height, in pixels - SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL | - ( fullscreen ? SDL_WINDOW_FULLSCREEN : 0 ) | SDL_WINDOW_RESIZABLE ); - - SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 4 ); - SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 3 ); - SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE ); -#ifdef DEBUG - SDL_GL_SetAttribute( SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG ); -#endif - - // GL 4.3 mandates GL_KHR_debug - g_hasDebugObjectLabel = true; - - g_glContext = SDL_GL_CreateContext( g_sdlWindow ); - - if( !g_glContext ) - { - fprintf( stderr, "GL Context creation failed.\n" ); - SDL_Quit(); - abort(); - } - else - { - printf( "GL Context creation suceeded.\n" ); - } - - SDL_GL_SetSwapInterval( 1 ); - - const bool gl3wFailed = gl3wInit() != 0; - if( gl3wFailed ) - { - fprintf( stderr, "Failed to initialize GL3W\n" ); - abort(); - } - -#ifdef DEBUG - glDebugMessageCallback( &GLDebugCallback, NULL ); - glEnable( GL_DEBUG_OUTPUT ); - glEnable( GL_DEBUG_OUTPUT_SYNCHRONOUS ); -#endif - } - - void shutdownBetsyPlatform() - { - FreeImage_DeInitialise(); - - SDL_GL_DeleteContext( g_glContext ); - g_glContext = 0; - SDL_Quit(); - } - - void pollPlatformWindow() - { - SDL_Event evt; - while( SDL_PollEvent( &evt ) ) - { - switch( evt.type ) - { - case SDL_WINDOWEVENT: - break; - case SDL_QUIT: - break; - default: - break; - } - } - - SDL_GL_SwapWindow( g_sdlWindow ); - } -} // namespace betsy diff --git a/src/app/AmalgamationEnum.cpp b/src/app/AmalgamationEnum.cpp new file mode 100644 index 0000000..ac4486f --- /dev/null +++ b/src/app/AmalgamationEnum.cpp @@ -0,0 +1,147 @@ +// EnumIterator.py AUTOGENERATED FILE. ** DO NOT EDIT ** Run "python2 Run.py" + +#include +#include + +const std::string BLANKSTRING = ""; + +#include "CmdLineParams.h" +#include "CmdLineParamsEnum.h" + +namespace Codec +{ +CodecEnum::EnumData CodecEnum::mSortedByEnum[13 + 1] = {CodecEnum::EnumData(bc1, "bc1"), // + CodecEnum::EnumData(bc3, "bc3"), // + CodecEnum::EnumData(bc4, "bc4"), // + CodecEnum::EnumData(bc4_snorm, "bc4_snorm"), // + CodecEnum::EnumData(bc5, "bc5"), // + CodecEnum::EnumData(bc5_snorm, "bc5_snorm"), // + CodecEnum::EnumData(bc6h, "bc6h"), // + CodecEnum::EnumData(eac_r11, "eac_r11"), // + CodecEnum::EnumData(eac_rg11, "eac_rg11"), // + CodecEnum::EnumData(etc1, "etc1"), // + CodecEnum::EnumData(etc2_rgb, "etc2_rgb"), // + CodecEnum::EnumData(etc2_rgba, "etc2_rgba"), // + CodecEnum::EnumData(etc2_rgba_etc1, "etc2_rgba_etc1"), // + CodecEnum::EnumData(etc2_rgba_etc1, "__INVALID")}; + +CodecEnum::EnumData CodecEnum::mSortedByString[13 + 1] = {CodecEnum::EnumData(bc1, "bc1"), // + CodecEnum::EnumData(bc3, "bc3"), // + CodecEnum::EnumData(bc4, "bc4"), // + CodecEnum::EnumData(bc4_snorm, "bc4_snorm"), // + CodecEnum::EnumData(bc5, "bc5"), // + CodecEnum::EnumData(bc5_snorm, "bc5_snorm"), // + CodecEnum::EnumData(bc6h, "bc6h"), // + CodecEnum::EnumData(eac_r11, "eac_r11"), // + CodecEnum::EnumData(eac_rg11, "eac_rg11"), // + CodecEnum::EnumData(etc1, "etc1"), // + CodecEnum::EnumData(etc2_rgb, "etc2_rgb"), // + CodecEnum::EnumData(etc2_rgba, "etc2_rgba"), // + CodecEnum::EnumData(etc2_rgba_etc1, "etc2_rgba_etc1"), // + CodecEnum::EnumData(etc2_rgba_etc1, "__INVALID")}; + +//--------------------------------------------------------------------------------------- +CodecEnum::EnumData::EnumData(Codec _enumValue, const std::string &_enumString) + : enumValue(_enumValue), enumString(_enumString) +{ +} +//--------------------------------------------------------------------------------------- +struct CodecEnum::OrderByEnum +{ + bool operator()(const CodecEnum::EnumData &_l, Codec _r) const + { + return _l.enumValue < _r; + } + + bool operator()(Codec _l, const CodecEnum::EnumData &_r) const + { + return _l < _r.enumValue; + } + + bool operator()(const CodecEnum::EnumData &_l, int _r) const + { + return _l.enumValue < _r; + } + + bool operator()(int _l, const CodecEnum::EnumData &_r) const + { + return _l < _r.enumValue; + } +}; +//--------------------------------------------------------------------------------------- +struct CodecEnum::OrderByStr +{ + bool operator()(const CodecEnum::EnumData &_l, const std::string &_r) const + { + return _l.enumString < _r; + } + + bool operator()(const std::string &_l, const CodecEnum::EnumData &_r) const + { + return _l < _r.enumString; + } +}; +//--------------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------------- +int CodecEnum::minValue() +{ + return mSortedByEnum[0].enumValue; +} +//--------------------------------------------------------------------------------------- +int CodecEnum::maxValue() +{ + return mSortedByEnum[13 - 1].enumValue; +} +//--------------------------------------------------------------------------------------- +size_t CodecEnum::count() +{ + return 13; +} +//--------------------------------------------------------------------------------------- +bool CodecEnum::find(const std::string &strValue, Codec &outValue) +{ + const EnumData *itor = std::lower_bound(&mSortedByString[0], &mSortedByString[13], strValue, OrderByStr()); + + if (itor != &mSortedByString[13] && itor->enumString == strValue) + { + outValue = itor->enumValue; + return true; + } + else + { + return false; + } +} +//--------------------------------------------------------------------------------------- +Codec CodecEnum::find(const std::string &strValue) +{ + Codec retVal; + const bool bFound = find(strValue, retVal); + if (!bFound) + { + throw std::invalid_argument("String: " + strValue + " is not a valid enum of type Codec"); + } + + return retVal; +} + +//--------------------------------------------------------------------------------------- +bool CodecEnum::isValidValue(int value) +{ + return minValue() >= value && value <= maxValue(); +} +//--------------------------------------------------------------------------------------- +const std::string &CodecEnum::get(Codec value) +{ + const int idx = value - mSortedByEnum[0].enumValue; + if (idx >= count()) + return BLANKSTRING; + + return mSortedByEnum[idx].enumString; +} +//--------------------------------------------------------------------------------------- +const std::string &CodecEnum::find(Codec value) +{ + return get(value); +} +} // namespace Codec diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt new file mode 100644 index 0000000..e23a932 --- /dev/null +++ b/src/app/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(${PROJECT_NAME} main.cpp AmalgamationEnum.cpp) +target_link_libraries(${PROJECT_NAME} lib${PROJECT_NAME}) \ No newline at end of file diff --git a/src/app/CmdLineParams.h b/src/app/CmdLineParams.h new file mode 100644 index 0000000..5aacee1 --- /dev/null +++ b/src/app/CmdLineParams.h @@ -0,0 +1,38 @@ + +#pragma once + +#include +#include + +namespace Codec +{ +enum Codec +{ + etc1, + etc2_rgba_etc1, + etc2_rgb, + etc2_rgba, + eac_r11, + eac_rg11, + bc1, + bc3, + bc4, + bc4_snorm, + bc5, + bc5_snorm, + bc6h +}; +} // namespace Codec + +struct CmdLineParams +{ + uint8_t quality; + bool dither; + bool usingRenderDoc; + Codec::Codec codec; + std::string filename[2]; + + CmdLineParams() : quality(0), dither(false), usingRenderDoc(false), codec(Codec::etc1) + { + } +}; diff --git a/src/app/CmdLineParamsEnum.h b/src/app/CmdLineParamsEnum.h new file mode 100644 index 0000000..9bfca7d --- /dev/null +++ b/src/app/CmdLineParamsEnum.h @@ -0,0 +1,68 @@ +// EnumIterator.py AUTOGENERATED FILE. ** DO NOT EDIT ** Run "python2 Run.py" +#pragma once + +#include +#include +#include "CmdLineParams.h" +namespace Codec +{ +class CodecEnum +{ +public: + struct EnumData + { + Codec enumValue; + std::string enumString; + + EnumData(Codec _enumValue, const std::string &_enumString); + }; + +private: + static EnumData mSortedByEnum[13 + 1]; + static EnumData mSortedByString[13 + 1]; + + struct OrderByEnum; + struct OrderByStr; + +public: + static const EnumData *begin() + { + return &mSortedByEnum[0]; + } + static const EnumData *end() + { + return &mSortedByEnum[13]; + } + + /// Returns the min value reached by this enumerator + static int minValue(); + + /// Returns the max value reached by this enumerator + static int maxValue(); + + /// Returns the number of elements in the enum + static size_t count(); + + /// Returns true if integer value can be represented by the enum. + /// O(1) if enum is contiguous, O(log N) otherwise + static bool isValidValue(int value); + + /// Only available if the enum is contiguous. Otherwise it's a compiler error + /// It's O(1) + /// Returns empty string if value is not a valid enum value + static const std::string &get(Codec value); + + /// Always available. O(1) if enum is contiguous, O(log N) otherwise + /// Returns empty string if value is not a valid enum value + static const std::string &find(Codec value); + + /// Will find the enumerator value based on its string representation. + /// Returns false if the string doesn't match any value, leaving the output + /// 'outValue' untouched (i.e. left uninitialized). + static bool find(const std::string &strValue, Codec &outValue); + + /// Will find the enumerator value based on its string representation. + /// Throws if the string doesn't match any value. + static Codec find(const std::string &strValue); +}; +} // namespace Codec diff --git a/src/app/main.cpp b/src/app/main.cpp new file mode 100644 index 0000000..5ed6763 --- /dev/null +++ b/src/app/main.cpp @@ -0,0 +1,277 @@ +#define NOMINMAX + +#include +#include +#include + +#include +#include + +#include "CmdLineParams.h" +#include "CmdLineParamsEnum.h" +#include "betsy/CpuImage.h" +#include "betsy/GL/EncoderBC1.h" +#include "betsy/GL/EncoderBC4.h" +#include "betsy/GL/EncoderBC6H.h" +#include "betsy/GL/EncoderEAC.h" +#include "betsy/GL/EncoderETC1.h" +#include "betsy/GL/EncoderETC2.h" +#include "betsy/File/FormatKTX.h" + +namespace betsy +{ +extern void initBetsyPlatform(); +extern void shutdownBetsyPlatform(); +extern void pollPlatformWindow(); +} // namespace betsy + +void printHelp() +{ + printf("Usage:\n"); + printf(" betsy input.hdr --codec=etc2_rgb --quality=2 output.ktx\n\n"); + + printf("Supported input formats:\n"); + printf(" Whatever FreeImage supports (png, jpg, hdr, exr, bmp, ...):\n"); + printf(" Does not read KTX nor DDS\n"); + + printf("Supported output formats:\n"); + printf(" KTX\n"); + + printf("Supported codecs:\n"); + printf(" etc1 0.5 bpp - ETC1 RGB, Works on ETC1 HW. Backwards compatible w/ ETC2 HW\n" + " etc2_rgba_etc1 1.0 bpp - ETC1 RGB + EAC Alpha. Requires ETC2 HW\n" + " etc2_rgb 0.5 bpp - ETC2 RGB\n" + " etc2_rgba 1.0 bpp - ETC2 RGB + EAC Alpha\n" + " eac_r11 0.5 bpp - EAC Red unorm (source 11-bits per pixel)\n" + " eac_rg11 1.0 bpp - EAC RG unorm (11-bits each, useful for normal maps)\n" + " bc6h 1.0 bpp - BC6 Unsigned half-floating point format, RGB\n" + " bc1 0.5 bpp - BC1 RGB aka DXT1\n" + " bc3 1.0 bpp - BC3 RGBA aka DXT5\n" + " bc4 0.5 bpp - BC4 Red unorm\n" + " bc4_snorm 0.5 bpp - BC4 Red snorm\n" + " bc5 1.0 bpp - BC5 RG unorm\n" + " bc5_snorm 1.0 bpp - BC5 RG snorm. Ideal for normal maps\n"); + + printf("\nbpp here stands for 'bytes per pixel', rather than bits per pixel.\n" + "\nOther options:\n"); + printf(" --quality Value in range [0; 2] where 0 is lowest quality.\n" + " Not all codecs support it.\n" + " --dither Use Floyd-steinberg dithering. Anti-banding method.\n" + " Not recommended on images with flat colours (e.g. charts, normal maps)\n" + " Supported by BC1 & ETC1/2\n" + " --renderdoc Use this to ensure RenderDoc capture works (slower)\n"); +} + +/** Returns true if 'str' starts with the text contained in 'what' +@param str +@param what +@param outStartIdx + str[outStartIdx] points to the first letter (including null terminator) + that diverged from 'what', even if we return false +@return + True if there's a match, false otherwise +*/ +bool startsWith(const char *str, const char *what, size_t &outStartIdx) +{ + const char *origStart = str; + + while (*str && *what && *str == *what) + { + ++str; + ++what; + } + + outStartIdx = static_cast(str - origStart); + + return *what == '\0'; +} + +bool parseCmdLine(int nargs, char *const argv[], CmdLineParams &outParams) +{ + if (nargs < 3) + return false; + + size_t currFilename = 0u; + for (int i = 1; i < nargs; ++i) + { + size_t startIdx; + if (startsWith(argv[i], "--codec=", startIdx)) + { + std::string codecName(argv[i] + startIdx); + if (!Codec::CodecEnum::find(codecName, outParams.codec)) + { + printf("No such codec: '%s'\n", argv[i] + startIdx); + return false; + } + } + else if (startsWith(argv[i], "--quality=", startIdx)) + { + outParams.quality = static_cast(atoi(argv[i] + startIdx)); + outParams.quality = std::min(outParams.quality, 2u); + } + else if (startsWith(argv[i], "--dither", startIdx)) + { + outParams.dither = true; + } + else if (startsWith(argv[i], "--renderdoc", startIdx)) + { + outParams.usingRenderDoc = true; + } + else if (startsWith(argv[i], "--help", startIdx)) + { + return false; + } + else if (startsWith(argv[i], "--", startIdx)) + { + printf("Unknown parameter '%s'\n", argv[i]); + return false; + } + else + { + if (currFilename >= 2u) + { + printf("Unknown parameter '%s'\n", argv[i]); + return false; + } + outParams.filename[currFilename] = argv[i]; + ++currFilename; + } + } + + if (currFilename != 2u) + { + printf("Input and output filenames not given"); + return false; + } + + return true; +} + +template void saveToDisk(T &encoder, const CmdLineParams params) +{ + betsy::CpuImage downloadImg; + encoder.startDownload(); + encoder.downloadTo(downloadImg); + betsy::FormatKTX::save(params.filename[1].c_str(), downloadImg); + downloadImg.data = 0; // This pointer is not owned by CpuImage and must not be freed +} + +int main(int nargs, char *const argv[]) +{ + CmdLineParams params; + params.quality = 2; + + if (!parseCmdLine(nargs, argv, params)) + { + printHelp(); + return EXIT_FAILURE; + } + + printf("Initializing API\n"); + betsy::initBetsyPlatform(); + + size_t repeat = params.usingRenderDoc ? 2u : 1u; + + betsy::CpuImage cpuImage(params.filename[0].c_str()); + + switch (params.codec) + { + case Codec::etc1: + case Codec::etc2_rgba_etc1: { + betsy::EncoderETC1 encoder; + encoder.initResources(cpuImage, params.codec == Codec::etc2_rgba_etc1, params.dither); + while (repeat--) + { + encoder.execute00(); + encoder.execute01(static_cast(params.quality)); + encoder.execute02(); + if (params.usingRenderDoc) + encoder.execute03(); // Not needed in offline mode + betsy::pollPlatformWindow(); + } + saveToDisk(encoder, params); + encoder.deinitResources(); + } + break; + case Codec::etc2_rgb: + case Codec::etc2_rgba: { + betsy::EncoderETC2 encoder; + encoder.initResources(cpuImage, params.codec == Codec::etc2_rgba, params.dither); + while (repeat--) + { + encoder.execute00(); + encoder.execute01(static_cast(params.quality)); + encoder.execute02(); + if (params.usingRenderDoc) + encoder.execute03(); // Not needed in offline mode + betsy::pollPlatformWindow(); + } + saveToDisk(encoder, params); + encoder.deinitResources(); + } + break; + case Codec::eac_r11: + case Codec::eac_rg11: { + betsy::EncoderEAC encoder; + encoder.initResources(cpuImage, params.codec == Codec::eac_rg11); + encoder.execute01(); + encoder.execute02(); + betsy::pollPlatformWindow(); + saveToDisk(encoder, params); + encoder.deinitResources(); + } + break; + case Codec::bc1: + case Codec::bc3: { + betsy::EncoderBC1 encoder; + encoder.initResources(cpuImage, params.codec == Codec::bc3, params.dither); + while (repeat--) + { + encoder.execute01(); + encoder.execute02(); + if (params.usingRenderDoc) + encoder.execute03(); // Not needed in offline mode + betsy::pollPlatformWindow(); + } + saveToDisk(encoder, params); + encoder.deinitResources(); + } + break; + case Codec::bc4: + case Codec::bc4_snorm: + case Codec::bc5: + case Codec::bc5_snorm: { + betsy::EncoderBC4 encoder; + encoder.initResources(cpuImage, params.codec == Codec::bc5 || params.codec == Codec::bc5_snorm, + params.codec == Codec::bc4_snorm || params.codec == Codec::bc5_snorm); + while (repeat--) + { + encoder.execute01(); + encoder.execute02(); + if (params.usingRenderDoc) + encoder.execute03(); // Not needed in offline mode + betsy::pollPlatformWindow(); + } + saveToDisk(encoder, params); + encoder.deinitResources(); + } + break; + case Codec::bc6h: { + betsy::EncoderBC6H encoder; + encoder.initResources(cpuImage); + encoder.execute01(); + // encoder.execute02(); Not needed in offline mode + betsy::pollPlatformWindow(); + saveToDisk(encoder, params); + encoder.deinitResources(); + } + break; + } + + betsy::pollPlatformWindow(); + + printf("Shutting down\n"); + betsy::shutdownBetsyPlatform(); + + return EXIT_SUCCESS; +} diff --git a/src/betsy/CpuImage.cpp b/src/betsy/CpuImage.cpp deleted file mode 100644 index e806b32..0000000 --- a/src/betsy/CpuImage.cpp +++ /dev/null @@ -1,349 +0,0 @@ - -#include "betsy/CpuImage.h" - -//#define STB_IMAGE_IMPLEMENTATION -//#include "stb_image.h" - -#define FREEIMAGE_LIB -#include "FreeImage.h" - -#include -#include -#include - -namespace betsy -{ - CpuImage::CpuImage() : data( 0 ), width( 0 ), height( 0 ), format( PFG_RGBA16_FLOAT ) {} - //------------------------------------------------------------------------- - CpuImage::CpuImage( const char *fullpath ) : - data( 0 ), - width( 0 ), - height( 0 ), - format( PFG_RGBA16_FLOAT ) - { - const FREE_IMAGE_FORMAT fif = FreeImage_GetFIFFromFilename( fullpath ); - - FIBITMAP *fiBitmap = FreeImage_Load( fif, fullpath ); - if( !fiBitmap ) - { - fprintf( stderr, "Failed to load %s\n", fullpath ); - return; - } - - // Must derive format first, this may perform conversions - const FREE_IMAGE_TYPE imageType = FreeImage_GetImageType( fiBitmap ); - const FREE_IMAGE_COLOR_TYPE colourType = FreeImage_GetColorType( fiBitmap ); - unsigned bpp = FreeImage_GetBPP( fiBitmap ); - - switch( imageType ) - { - case FIT_UNKNOWN: - case FIT_COMPLEX: - case FIT_DOUBLE: - printf( "Unknown or unsupported image format %s\n", fullpath ); - return; - case FIT_BITMAP: - // Standard image type - // Perform any colour conversions for greyscale - if( colourType == FIC_MINISWHITE || colourType == FIC_MINISBLACK ) - { - FIBITMAP *newBitmap = FreeImage_ConvertToGreyscale( fiBitmap ); - // free old bitmap and replace - FreeImage_Unload( fiBitmap ); - fiBitmap = newBitmap; - // get new formats - bpp = FreeImage_GetBPP( fiBitmap ); - } - // Perform any colour conversions for RGB - else if( bpp < 8 || colourType == FIC_PALETTE || colourType == FIC_CMYK ) - { - FIBITMAP *newBitmap = NULL; - if( FreeImage_IsTransparent( fiBitmap ) ) - { - // convert to 32 bit to preserve the transparency - // (the alpha byte will be 0 if pixel is transparent) - newBitmap = FreeImage_ConvertTo32Bits( fiBitmap ); - } - else - { - // no transparency - only 3 bytes are needed - newBitmap = FreeImage_ConvertTo24Bits( fiBitmap ); - } - - // free old bitmap and replace - FreeImage_Unload( fiBitmap ); - fiBitmap = newBitmap; - // get new formats - bpp = FreeImage_GetBPP( fiBitmap ); - } - - // by this stage, 8-bit is greyscale, 16/24/32 bit are RGB[A] - switch( bpp ) - { - case 8: - printf( "8 bpp Monochrome textures not supported %s\n", fullpath ); - return; - case 16: - printf( "16 bpp textures not supported %s\n", fullpath ); - return; - case 24: - case 32: - format = PFG_RGBA8_UNORM_SRGB; - break; - } - break; - case FIT_UINT16: - case FIT_INT16: - // 16-bit greyscale - printf( "16 bpp Monochrome textures not supported %s\n", fullpath ); - return; - case FIT_UINT32: - case FIT_INT32: - printf( "32 bpp Monochrome textures not supported %s\n", fullpath ); - break; - case FIT_FLOAT: - // Single-component floating point data - format = PFG_RGBA32_FLOAT; - break; - case FIT_RGB16: - case FIT_RGBA16: - printf( "Texture format not supported %s\n", fullpath ); - return; - case FIT_RGBF: - format = PFG_RGBA32_FLOAT; - break; - case FIT_RGBAF: - format = PFG_RGBA32_FLOAT; - break; - } - - width = FreeImage_GetWidth( fiBitmap ); - height = FreeImage_GetHeight( fiBitmap ); - - const size_t neededBytes = getSizeBytes( width, height, 1u, 1u, format ); - data = reinterpret_cast( malloc( neededBytes ) ); - - // Convert data inverting scanlines - const size_t bytesPerRow = FreeImage_GetPitch( fiBitmap ); - const uint8_t *srcData = FreeImage_GetBits( fiBitmap ); - - switch( imageType ) - { - case FIT_BITMAP: - if( bpp == 24 ) - RGB8toRGBA8( srcData, bytesPerRow ); - else if( bpp == 32 ) - BGRANtoRGBAN( srcData, bytesPerRow ); - break; - case FIT_FLOAT: - R32toRGBA32( reinterpret_cast( srcData ), bytesPerRow ); - break; - case FIT_RGBF: - RGB32toRGBA32( reinterpret_cast( srcData ), bytesPerRow ); - break; - case FIT_RGBAF: - BGRANtoRGBAN( reinterpret_cast( srcData ), bytesPerRow ); - break; - default: - break; - } - - FreeImage_Unload( fiBitmap ); - } - //------------------------------------------------------------------------- - CpuImage::~CpuImage() - { - if( data ) - { - free( data ); - data = 0; - } - } - //------------------------------------------------------------------------- - size_t CpuImage::getBytesPerPixel( PixelFormat format ) - { - switch( format ) - { - case PFG_RGBA32_UINT: - case PFG_RGBA32_FLOAT: - return 4u * 4u; - case PFG_RGBA16_FLOAT: - return 2u * 4u; - case PFG_R32_FLOAT: - return 4u; - case PFG_RG32_UINT: - return 4u * 2u; - case PFG_RGBA8_UNORM: - case PFG_RGBA8_UNORM_SRGB: - return 1u * 4u; - case PFG_RG8_UINT: - return 1u * 2u; - case PFG_ETC1_RGB8_UNORM: - case PFG_ETC2_RGBA8_UNORM: - case PFG_EAC_R11_UNORM: - case PFG_EAC_RG11_UNORM: - case PFG_BC1_UNORM: - case PFG_BC3_UNORM: - case PFG_BC4_UNORM: - case PFG_BC4_SNORM: - case PFG_BC5_UNORM: - case PFG_BC5_SNORM: - case PFG_BC6H_UF16: - return 0u; - } - - return 0u; - } - //----------------------------------------------------------------------------------- - bool CpuImage::isCompressed( PixelFormat pixelFormat ) - { - switch( pixelFormat ) - { - case PFG_BC1_UNORM: - case PFG_BC3_UNORM: - case PFG_BC4_UNORM: - case PFG_BC4_SNORM: - case PFG_BC5_UNORM: - case PFG_BC5_SNORM: - case PFG_BC6H_UF16: - case PFG_ETC1_RGB8_UNORM: - case PFG_ETC2_RGBA8_UNORM: - case PFG_EAC_R11_UNORM: - case PFG_EAC_RG11_UNORM: - return true; - default: - return false; - } - } - //------------------------------------------------------------------------- - size_t CpuImage::getSizeBytes( uint32_t width, uint32_t height, uint32_t depth, uint32_t slices, - PixelFormat format, uint32_t rowAlignment ) - { - size_t retVal; - - if( isCompressed( format ) ) - { - switch( format ) - { - case PFG_BC1_UNORM: - case PFG_BC4_UNORM: - case PFG_BC4_SNORM: - case PFG_ETC1_RGB8_UNORM: - case PFG_EAC_R11_UNORM: - retVal = ( ( width + 3u ) / 4u ) * ( ( height + 3u ) / 4u ) * 8u * depth * slices; - break; - case PFG_BC3_UNORM: - case PFG_BC5_UNORM: - case PFG_BC5_SNORM: - case PFG_ETC2_RGBA8_UNORM: - case PFG_EAC_RG11_UNORM: - case PFG_BC6H_UF16: - retVal = ( ( width + 3u ) / 4u ) * ( ( height + 3u ) / 4u ) * 16u * depth * slices; - break; - default: - retVal = 0u; - } - } - else - { - retVal = width * getBytesPerPixel( format ); - retVal = alignToNextMultiple( retVal, (size_t)rowAlignment ); - - retVal *= height * depth * slices; - } - - return retVal; - } - //------------------------------------------------------------------------- - void CpuImage::RGB8toRGBA8( uint8_t const *__restrict srcData, size_t bytesPerRow ) - { - const size_t imgHeight = height; - const size_t imgWidth = width; - for( size_t y = 0u; y < imgHeight; ++y ) - { - uint8_t *__restrict dstData = - reinterpret_cast( data ) + ( imgHeight - y - 1u ) * imgWidth * 4u; - - for( size_t x = 0u; x < imgWidth; ++x ) - { - const uint8_t b = *srcData++; - const uint8_t g = *srcData++; - const uint8_t r = *srcData++; - *dstData++ = r; - *dstData++ = g; - *dstData++ = b; - *dstData++ = 0xff; - } - - // dstData's bytePerRow is already multiple of 4 (our natural alignment) - srcData += bytesPerRow - imgWidth * 3u; - } - } - //------------------------------------------------------------------------- - void CpuImage::R32toRGBA32( uint32_t const *__restrict srcData, size_t bytesPerRow ) - { - const size_t imgWidth = width; - const size_t imgHeight = height; - for( size_t y = 0u; y < imgHeight; ++y ) - { - uint32_t *__restrict dstData = - reinterpret_cast( data ) + ( imgHeight - y - 1u ) * imgWidth * 4u; - for( size_t x = 0u; x < ( bytesPerRow >> 2u ); ++x ) - { - const uint32_t value = *srcData++; - *dstData++ = value; - *dstData++ = value; - *dstData++ = value; - *dstData++ = 0x3f800000; // 1.0f - } - } - } - //------------------------------------------------------------------------- - void CpuImage::RGB32toRGBA32( uint32_t const *__restrict srcData, size_t bytesPerRow ) - { - const size_t imgWidth = width; - const size_t imgHeight = height; - for( size_t y = 0u; y < imgHeight; ++y ) - { - uint32_t *__restrict dstData = - reinterpret_cast( data ) + ( imgHeight - y - 1u ) * imgWidth * 4u; - for( size_t x = 0u; x < ( bytesPerRow >> 2u ) / 3u; ++x ) - { - const uint32_t b = *srcData++; - const uint32_t g = *srcData++; - const uint32_t r = *srcData++; - *dstData++ = r; - *dstData++ = g; - *dstData++ = b; - *dstData++ = 0x3f800000; // 1.0f - } - } - } - //------------------------------------------------------------------------- - template - void CpuImage::BGRANtoRGBAN( T const *__restrict srcData, size_t bytesPerRow ) - { - const size_t imgWidth = width; - const size_t imgHeight = height; - for( size_t y = 0u; y < imgHeight; ++y ) - { - T *__restrict dstData = - reinterpret_cast( data ) + ( imgHeight - y - 1u ) * imgWidth * 4u; - - for( size_t x = 0u; x < imgWidth; ++x ) - { - const T b = *srcData++; - const T g = *srcData++; - const T r = *srcData++; - const T a = *srcData++; - *dstData++ = r; - *dstData++ = g; - *dstData++ = b; - *dstData++ = a; - } - - // dstData's bytePerRow is already multiple of 4 (our natural alignment) - srcData += bytesPerRow - imgWidth * 4u * sizeof( T ); - } - } -} // namespace betsy diff --git a/src/betsy/EncoderBC1.cpp b/src/betsy/EncoderBC1.cpp deleted file mode 100644 index 4cdccd7..0000000 --- a/src/betsy/EncoderBC1.cpp +++ /dev/null @@ -1,190 +0,0 @@ - -#include "betsy/EncoderBC1.h" - -#include "betsy/CpuImage.h" - -#include "BC1_tables.inl" - -#include -#include -#include -#include - -namespace betsy -{ - struct Bc1Tables - { - float oMatch5[256][2]; - float oMatch6[256][2]; - }; - - static Bc1Tables getBc1Tables() - { - Bc1Tables tables; - - for( size_t i = 0u; i < 256; ++i ) - { - tables.oMatch5[i][0] = static_cast( stb__OMatch5[i][0] ); - tables.oMatch5[i][1] = static_cast( stb__OMatch5[i][1] ); - tables.oMatch6[i][0] = static_cast( stb__OMatch6[i][0] ); - tables.oMatch6[i][1] = static_cast( stb__OMatch6[i][1] ); - } - - return tables; - } - - EncoderBC1::EncoderBC1() : - m_width( 0 ), - m_height( 0 ), - m_srcTexture( 0 ), - m_bc1TargetRes( 0 ), - m_bc4TargetRes( 0 ), - m_stitchedTarget( 0 ), - m_dstTexture( 0 ), - m_bc1TablesSsbo( 0 ) - { - } - //------------------------------------------------------------------------- - EncoderBC1::~EncoderBC1() { assert( !m_srcTexture && "deinitResources not called!" ); } - //------------------------------------------------------------------------- - void EncoderBC1::initResources( const CpuImage &srcImage, const bool useBC3, const bool bDither ) - { - m_width = srcImage.width; - m_height = srcImage.height; - - const PixelFormat srcFormat = - srcImage.format == PFG_RGBA8_UNORM_SRGB ? PFG_RGBA8_UNORM : srcImage.format; - - m_srcTexture = createTexture( TextureParams( m_width, m_height, srcFormat, "m_srcTexture" ) ); - - m_bc1TargetRes = createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, - "m_bc1TargetRes", TextureFlags::Uav ) ); - m_dstTexture = createTexture( - TextureParams( m_width, m_height, useBC3 ? PFG_BC3_UNORM : PFG_BC1_UNORM, "m_dstTexture" ) ); - - { - Bc1Tables bc1Tables = getBc1Tables(); - m_bc1TablesSsbo = createUavBuffer( sizeof( Bc1Tables ), &bc1Tables ); - } - - m_bc1Pso = createComputePsoFromFile( bDither ? "bc1_dither.glsl" : "bc1.glsl", "../Data/" ); - - if( useBC3 ) - { - m_bc4TargetRes = - createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, - "m_bc4TargetRes", TextureFlags::Uav ) ); - m_stitchedTarget = - createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RGBA32_UINT, - "m_stitchedTarget", TextureFlags::Uav ) ); - m_bc4Pso = createComputePsoFromFile( "bc4.glsl", "../Data/" ); - m_stitchPso = createComputePsoFromFile( "etc2_rgba_stitch.glsl", "../Data/" ); - } - - StagingTexture stagingTex = createStagingTexture( m_width, m_height, srcImage.format, true ); - memcpy( stagingTex.data, srcImage.data, stagingTex.sizeBytes ); - uploadStagingTexture( stagingTex, m_srcTexture ); - destroyStagingTexture( stagingTex ); - } - //------------------------------------------------------------------------- - void EncoderBC1::deinitResources() - { - if( m_dstTexture ) - { - destroyTexture( m_dstTexture ); - m_dstTexture = 0; - } - if( m_stitchedTarget ) - { - destroyTexture( m_stitchedTarget ); - m_stitchedTarget = 0; - } - destroyTexture( m_bc1TargetRes ); - m_bc1TargetRes = 0; - destroyTexture( m_srcTexture ); - m_srcTexture = 0; - - if( m_downloadStaging.bufferName ) - destroyStagingTexture( m_downloadStaging ); - - destroyPso( m_bc1Pso ); - if( m_stitchPso.computePso ) - destroyPso( m_stitchPso ); - } - //------------------------------------------------------------------------- - void EncoderBC1::execute01() - { - bindTexture( 0u, m_srcTexture ); - bindComputePso( m_bc1Pso ); - bindUav( 0u, m_bc1TargetRes, PFG_RG32_UINT, ResourceAccess::Write ); - bindUavBuffer( 1u, m_bc1TablesSsbo, 0u, sizeof( Bc1Tables ) ); - - glUniform1ui( 0, 2u ); - - glDispatchCompute( alignToNextMultiple( m_width, ( 8u * 4u ) ) / ( 8u * 4u ), - alignToNextMultiple( m_height, ( 8u * 4u ) ) / ( 8u * 4u ), 1u ); - - if( m_bc4TargetRes ) - { - // Compress Alpha too (using BC4) - bindComputePso( m_bc4Pso ); - bindUav( 0u, m_bc4TargetRes, PFG_RG32_UINT, ResourceAccess::Write ); - - // p_channelIdx, p_useSNorm - glUniform2f( 0, 3.0f, 0.0f ); - - glDispatchCompute( 1u, // - alignToNextMultiple( m_width, 16u ) / 16u, - alignToNextMultiple( m_height, 16u ) / 16u ); - } - } - //------------------------------------------------------------------------- - void EncoderBC1::execute02() - { - if( !m_bc4TargetRes ) - return; // This step is only relevant when doing BC3 - - glMemoryBarrier( GL_TEXTURE_FETCH_BARRIER_BIT ); - bindTexture( 0u, m_bc1TargetRes ); - bindTexture( 1u, m_bc4TargetRes ); - bindUav( 0u, m_stitchedTarget, PFG_RGBA32_UINT, ResourceAccess::Write ); - bindComputePso( m_stitchPso ); - glDispatchCompute( alignToNextMultiple( m_width, 32u ) / 32u, - alignToNextMultiple( m_height, 32u ) / 32u, 1u ); - } - //------------------------------------------------------------------------- - void EncoderBC1::execute03() - { - // It's unclear which of these 2 barrier bits GL wants in order for glCopyImageSubData to work - glMemoryBarrier( GL_TEXTURE_UPDATE_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT ); - - // Copy "8x8" PFG_RG32_UINT -> 32x32 PFG_BC1_UNORM - // Copy "8x8" PFG_RGBA32_UINT -> 32x32 PFG_BC3_UNORM - glCopyImageSubData( m_stitchedTarget ? m_stitchedTarget : m_bc1TargetRes, // - GL_TEXTURE_2D, 0, 0, 0, 0, // - m_dstTexture, GL_TEXTURE_2D, 0, 0, 0, 0, // - ( GLsizei )( getBlockWidth() ), ( GLsizei )( getBlockHeight() ), 1 ); - } - //------------------------------------------------------------------------- - void EncoderBC1::startDownload() - { - glMemoryBarrier( GL_PIXEL_BUFFER_BARRIER_BIT ); - - if( m_downloadStaging.bufferName ) - destroyStagingTexture( m_downloadStaging ); - m_downloadStaging = - createStagingTexture( getBlockWidth(), getBlockHeight(), - m_stitchedTarget ? PFG_RGBA32_UINT : PFG_RG32_UINT, false ); - downloadStagingTexture( m_stitchedTarget ? m_stitchedTarget : m_bc1TargetRes, - m_downloadStaging ); - } - //------------------------------------------------------------------------- - void EncoderBC1::downloadTo( CpuImage &outImage ) - { - glFinish(); - outImage.width = m_width; - outImage.height = m_height; - outImage.format = m_stitchedTarget ? PFG_BC3_UNORM : PFG_BC1_UNORM; - outImage.data = reinterpret_cast( m_downloadStaging.data ); - } -} // namespace betsy diff --git a/src/betsy/EncoderBC4.cpp b/src/betsy/EncoderBC4.cpp deleted file mode 100644 index 37b0e1f..0000000 --- a/src/betsy/EncoderBC4.cpp +++ /dev/null @@ -1,172 +0,0 @@ - -#include "betsy/EncoderBC4.h" - -#include "betsy/CpuImage.h" - -#include -#include -#include - -namespace betsy -{ - EncoderBC4::EncoderBC4() : - m_width( 0 ), - m_height( 0 ), - m_srcTexture( 0 ), - m_stitchedTarget( 0 ), - m_dstTexture( 0 ), - m_encodeSNorm( false ) - { - memset( m_bc4TargetRes, 0, sizeof( m_bc4TargetRes ) ); - } - //------------------------------------------------------------------------- - EncoderBC4::~EncoderBC4() { assert( !m_srcTexture && "deinitResources not called!" ); } - //------------------------------------------------------------------------- - void EncoderBC4::initResources( const CpuImage &srcImage, const bool redGreen, - const bool encodeSNorm ) - { - m_width = srcImage.width; - m_height = srcImage.height; - - m_encodeSNorm = encodeSNorm; - - const PixelFormat srcFormat = - srcImage.format == PFG_RGBA8_UNORM_SRGB ? PFG_RGBA8_UNORM : srcImage.format; - - m_srcTexture = createTexture( TextureParams( m_width, m_height, srcFormat, "m_srcTexture" ) ); - - m_bc4TargetRes[0] = createTexture( TextureParams( - getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, "m_bc4TargetRes[0]", TextureFlags::Uav ) ); - if( redGreen ) - { - m_bc4TargetRes[1] = - createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, - "m_bc4TargetRes[1]", TextureFlags::Uav ) ); - } - - m_bc4Pso = createComputePsoFromFile( "bc4.glsl", "../Data/" ); - - if( redGreen ) - { - m_stitchedTarget = - createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RGBA32_UINT, - "m_stitchedTarget", TextureFlags::Uav ) ); - m_stitchPso = createComputePsoFromFile( "etc2_rgba_stitch.glsl", "../Data/" ); - - m_dstTexture = createTexture( TextureParams( - m_width, m_height, m_encodeSNorm ? PFG_BC5_SNORM : PFG_BC5_UNORM, "m_dstTexture" ) ); - } - else - { - m_dstTexture = createTexture( TextureParams( - m_width, m_height, m_encodeSNorm ? PFG_BC4_SNORM : PFG_BC4_UNORM, "m_dstTexture" ) ); - } - - StagingTexture stagingTex = createStagingTexture( m_width, m_height, srcImage.format, true ); - memcpy( stagingTex.data, srcImage.data, stagingTex.sizeBytes ); - uploadStagingTexture( stagingTex, m_srcTexture ); - destroyStagingTexture( stagingTex ); - } - //------------------------------------------------------------------------- - void EncoderBC4::deinitResources() - { - if( m_dstTexture ) - { - destroyTexture( m_dstTexture ); - m_dstTexture = 0; - } - if( m_stitchedTarget ) - { - destroyTexture( m_stitchedTarget ); - m_stitchedTarget = 0; - } - for( size_t i = 0u; i < 2u; ++i ) - { - if( m_bc4TargetRes[i] ) - { - destroyTexture( m_bc4TargetRes[i] ); - m_bc4TargetRes[i] = 0; - } - } - destroyTexture( m_srcTexture ); - m_srcTexture = 0; - - if( m_downloadStaging.bufferName ) - destroyStagingTexture( m_downloadStaging ); - - destroyPso( m_bc4Pso ); - if( m_stitchPso.computePso ) - destroyPso( m_stitchPso ); - } - //------------------------------------------------------------------------- - void EncoderBC4::execute01() - { - bindTexture( 0u, m_srcTexture ); - bindComputePso( m_bc4Pso ); - - const size_t numChannels = m_bc4TargetRes[1] ? 2u : 1u; - for( size_t i = 0u; i < numChannels; ++i ) - { - bindUav( 0u, m_bc4TargetRes[i], PFG_RG32_UINT, ResourceAccess::Write ); - - // p_channelIdx, p_useSNorm - glUniform2f( 0, i == 0u ? 0.0f : 1.0f, m_encodeSNorm ? 1.0f : 0.0f ); - - glDispatchCompute( 1u, // - alignToNextMultiple( m_width, 16u ) / 16u, - alignToNextMultiple( m_height, 16u ) / 16u ); - } - } - //------------------------------------------------------------------------- - void EncoderBC4::execute02() - { - if( !m_bc4TargetRes[1] ) - { - // This step is only relevant when doing BC5 - return; - } - - glMemoryBarrier( GL_TEXTURE_FETCH_BARRIER_BIT ); - bindTexture( 0u, m_bc4TargetRes[1] ); - bindTexture( 1u, m_bc4TargetRes[0] ); - bindUav( 0u, m_stitchedTarget, PFG_RGBA32_UINT, ResourceAccess::Write ); - bindComputePso( m_stitchPso ); - glDispatchCompute( alignToNextMultiple( m_width, 32u ) / 32u, - alignToNextMultiple( m_height, 32u ) / 32u, 1u ); - } - //------------------------------------------------------------------------- - void EncoderBC4::execute03() - { - // It's unclear which of these 2 barrier bits GL wants in order for glCopyImageSubData to work - glMemoryBarrier( GL_TEXTURE_UPDATE_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT ); - - // Copy "8x8" PFG_RG32_UINT -> 32x32 PFG_BC4_UNORM/SNORM - // Copy "8x8" PFG_RGBA32_UINT -> 32x32 PFG_BC5_UNORM/SNORM - glCopyImageSubData( m_bc4TargetRes[1] ? m_stitchedTarget : m_bc4TargetRes[0], // - GL_TEXTURE_2D, 0, 0, 0, 0, // - m_dstTexture, GL_TEXTURE_2D, 0, 0, 0, 0, // - ( GLsizei )( getBlockWidth() ), ( GLsizei )( getBlockHeight() ), 1 ); - } - //------------------------------------------------------------------------- - void EncoderBC4::startDownload() - { - glMemoryBarrier( GL_PIXEL_BUFFER_BARRIER_BIT ); - - if( m_downloadStaging.bufferName ) - destroyStagingTexture( m_downloadStaging ); - m_downloadStaging = - createStagingTexture( getBlockWidth(), getBlockHeight(), - m_bc4TargetRes[1] ? PFG_RGBA32_UINT : PFG_RG32_UINT, false ); - downloadStagingTexture( m_bc4TargetRes[1] ? m_stitchedTarget : m_bc4TargetRes[0], - m_downloadStaging ); - } - //------------------------------------------------------------------------- - void EncoderBC4::downloadTo( CpuImage &outImage ) - { - glFinish(); - outImage.width = m_width; - outImage.height = m_height; - outImage.format = m_bc4TargetRes[1] ? PFG_BC5_UNORM : PFG_BC4_UNORM; - outImage.data = reinterpret_cast( m_downloadStaging.data ); - } -} // namespace betsy diff --git a/src/betsy/EncoderBC6H.cpp b/src/betsy/EncoderBC6H.cpp deleted file mode 100644 index fae7a50..0000000 --- a/src/betsy/EncoderBC6H.cpp +++ /dev/null @@ -1,94 +0,0 @@ - -#include "betsy/EncoderBC6H.h" - -#include "betsy/CpuImage.h" - -#include -#include - -namespace betsy -{ - EncoderBC6H::EncoderBC6H() : m_srcTexture( 0 ), m_compressTargetRes( 0 ), m_dstTexture( 0 ) {} - //------------------------------------------------------------------------- - EncoderBC6H::~EncoderBC6H() { assert( !m_srcTexture && "deinitResources not called!" ); } - //------------------------------------------------------------------------- - void EncoderBC6H::initResources( const CpuImage &srcImage ) - { - m_width = srcImage.width; - m_height = srcImage.height; - - m_srcTexture = - createTexture( TextureParams( m_width, m_height, srcImage.format, "m_srcTexture" ) ); - - m_compressTargetRes = - createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RGBA32_UINT, - "m_compressTargetRes", TextureFlags::Uav ) ); - - m_dstTexture = - createTexture( TextureParams( m_width, m_height, PFG_BC6H_UF16, "m_dstTexture" ) ); - - m_compressPso = createComputePsoFromFile( "bc6h.glsl", "../Data/" ); - - StagingTexture stagingTex = createStagingTexture( m_width, m_height, srcImage.format, true ); - memcpy( stagingTex.data, srcImage.data, stagingTex.sizeBytes ); - uploadStagingTexture( stagingTex, m_srcTexture ); - } - //------------------------------------------------------------------------- - void EncoderBC6H::deinitResources() - { - destroyTexture( m_dstTexture ); - m_dstTexture = 0; - destroyTexture( m_compressTargetRes ); - m_compressTargetRes = 0; - destroyTexture( m_srcTexture ); - m_srcTexture = 0; - - if( m_downloadStaging.bufferName ) - destroyStagingTexture( m_downloadStaging ); - - destroyPso( m_compressPso ); - } - //------------------------------------------------------------------------- - void EncoderBC6H::execute01() - { - bindTexture( 0u, m_srcTexture ); - bindUav( 0u, m_compressTargetRes, PFG_RGBA32_UINT, ResourceAccess::Write ); - bindComputePso( m_compressPso ); - - glUniform2f( 0, 1.0f / m_width, 1.0f / m_height ); - - glDispatchCompute( alignToNextMultiple( m_width, 32u ) / 32u, - alignToNextMultiple( m_height, 32u ) / 32u, 1u ); - } - //------------------------------------------------------------------------- - void EncoderBC6H::execute02() - { - // It's unclear which of these 2 barrier bits GL wants in order for glCopyImageSubData to work - glMemoryBarrier( GL_TEXTURE_UPDATE_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT ); - - // Copy "8x8" PFG_RGBA32_UINT -> 32x32 PFG_BC6H_UF16 - glCopyImageSubData( m_compressTargetRes, GL_TEXTURE_2D, 0, 0, 0, 0, // - m_dstTexture, GL_TEXTURE_2D, 0, 0, 0, 0, // - ( GLsizei )( getBlockWidth() ), ( GLsizei )( getBlockHeight() ), 1 ); - } - //------------------------------------------------------------------------- - void EncoderBC6H::startDownload() - { - glMemoryBarrier( GL_PIXEL_BUFFER_BARRIER_BIT ); - - if( m_downloadStaging.bufferName ) - destroyStagingTexture( m_downloadStaging ); - m_downloadStaging = - createStagingTexture( getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, false ); - downloadStagingTexture( m_compressTargetRes, m_downloadStaging ); - } - //------------------------------------------------------------------------- - void EncoderBC6H::downloadTo( CpuImage &outImage ) - { - glFinish(); - outImage.width = m_width; - outImage.height = m_height; - outImage.format = PFG_BC6H_UF16; - outImage.data = reinterpret_cast( m_downloadStaging.data ); - } -} // namespace betsy diff --git a/src/betsy/EncoderEAC.cpp b/src/betsy/EncoderEAC.cpp deleted file mode 100644 index 43810c1..0000000 --- a/src/betsy/EncoderEAC.cpp +++ /dev/null @@ -1,135 +0,0 @@ - -#include "betsy/EncoderEAC.h" - -#include "betsy/CpuImage.h" - -#include -#include -#include - -namespace betsy -{ - EncoderEAC::EncoderEAC() : m_width( 0 ), m_height( 0 ), m_srcTexture( 0 ), m_stitchedTarget( 0 ) - { - memset( m_eacTargetRes, 0, sizeof( m_eacTargetRes ) ); - } - //------------------------------------------------------------------------- - EncoderEAC::~EncoderEAC() { assert( !m_srcTexture && "deinitResources not called!" ); } - //------------------------------------------------------------------------- - void EncoderEAC::initResources( const CpuImage &srcImage, const bool rg11 ) - { - m_width = srcImage.width; - m_height = srcImage.height; - - const PixelFormat srcFormat = - srcImage.format == PFG_RGBA8_UNORM_SRGB ? PFG_RGBA8_UNORM : srcImage.format; - - m_srcTexture = createTexture( TextureParams( m_width, m_height, srcFormat, "m_srcTexture" ) ); - - m_eacTargetRes[0] = createTexture( TextureParams( - getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, "m_eacTargetRes[0]", TextureFlags::Uav ) ); - if( rg11 ) - { - m_eacTargetRes[1] = - createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, - "m_eacTargetRes[1]", TextureFlags::Uav ) ); - } - - m_eacPso = createComputePsoFromFile( "eac_r11.glsl", "../Data/" ); - - if( rg11 ) - { - m_stitchedTarget = - createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RGBA32_UINT, - "m_stitchedTarget", TextureFlags::Uav ) ); - m_stitchPso = createComputePsoFromFile( "etc2_rgba_stitch.glsl", "../Data/" ); - } - - StagingTexture stagingTex = createStagingTexture( m_width, m_height, srcImage.format, true ); - memcpy( stagingTex.data, srcImage.data, stagingTex.sizeBytes ); - uploadStagingTexture( stagingTex, m_srcTexture ); - destroyStagingTexture( stagingTex ); - } - //------------------------------------------------------------------------- - void EncoderEAC::deinitResources() - { - if( m_stitchedTarget ) - { - destroyTexture( m_stitchedTarget ); - m_stitchedTarget = 0; - } - for( size_t i = 0u; i < 2u; ++i ) - { - if( m_eacTargetRes[i] ) - { - destroyTexture( m_eacTargetRes[i] ); - m_eacTargetRes[i] = 0; - } - } - destroyTexture( m_srcTexture ); - m_srcTexture = 0; - - if( m_downloadStaging.bufferName ) - destroyStagingTexture( m_downloadStaging ); - - destroyPso( m_eacPso ); - if( m_stitchPso.computePso ) - destroyPso( m_stitchPso ); - } - //------------------------------------------------------------------------- - void EncoderEAC::execute01() - { - bindTexture( 0u, m_srcTexture ); - bindComputePso( m_eacPso ); - - const size_t numChannels = m_eacTargetRes[1] ? 2u : 1u; - for( size_t i = 0u; i < numChannels; ++i ) - { - bindUav( 0u, m_eacTargetRes[i], PFG_RG32_UINT, ResourceAccess::Write ); - - glUniform1f( 0, i == 0u ? 0.0f : 1.0f ); - - glDispatchCompute( alignToNextMultiple( m_width, 4u ) / 4u, - alignToNextMultiple( m_height, 4u ) / 4u, 1u ); - } - } - //------------------------------------------------------------------------- - void EncoderEAC::execute02() - { - if( !m_eacTargetRes[1] ) - { - // This step is only relevant when doing RG11 - return; - } - - glMemoryBarrier( GL_TEXTURE_FETCH_BARRIER_BIT ); - bindTexture( 0u, m_eacTargetRes[1] ); - bindTexture( 1u, m_eacTargetRes[0] ); - bindUav( 0u, m_stitchedTarget, PFG_RGBA32_UINT, ResourceAccess::Write ); - bindComputePso( m_stitchPso ); - glDispatchCompute( alignToNextMultiple( m_width, 32u ) / 32u, - alignToNextMultiple( m_height, 32u ) / 32u, 1u ); - } - //------------------------------------------------------------------------- - void EncoderEAC::startDownload() - { - glMemoryBarrier( GL_PIXEL_BUFFER_BARRIER_BIT ); - - if( m_downloadStaging.bufferName ) - destroyStagingTexture( m_downloadStaging ); - m_downloadStaging = - createStagingTexture( getBlockWidth(), getBlockHeight(), - m_eacTargetRes[1] ? PFG_RGBA32_UINT : PFG_RG32_UINT, false ); - downloadStagingTexture( m_eacTargetRes[1] ? m_stitchedTarget : m_eacTargetRes[0], - m_downloadStaging ); - } - //------------------------------------------------------------------------- - void EncoderEAC::downloadTo( CpuImage &outImage ) - { - glFinish(); - outImage.width = m_width; - outImage.height = m_height; - outImage.format = m_eacTargetRes[1] ? PFG_EAC_R11_UNORM : PFG_EAC_RG11_UNORM; - outImage.data = reinterpret_cast( m_downloadStaging.data ); - } -} // namespace betsy diff --git a/src/betsy/EncoderETC1.cpp b/src/betsy/EncoderETC1.cpp deleted file mode 100644 index e787834..0000000 --- a/src/betsy/EncoderETC1.cpp +++ /dev/null @@ -1,347 +0,0 @@ -#define NOMINMAX - -#include "betsy/EncoderETC1.h" - -#include "betsy/CpuImage.h" - -#include "ETC1_tables.inl" - -#include -#include -#include -#include -#include - -namespace betsy -{ - static size_t etc1_decode_value( size_t diff, size_t inten, size_t selector, size_t packed_c ) - { - int c; - if( diff ) - c = int( ( packed_c >> 2u ) | ( packed_c << 3u ) ); - else - c = int( packed_c | ( packed_c << 4u ) ); - c += c_etc1_inten_tables[inten][selector]; - size_t retVal; - retVal = static_cast( std::max( c, 0 ) ); - retVal = std::min( retVal, 255u ); - return retVal; - } - - EncoderETC1::EncoderETC1() : - m_srcTexture( 0 ), - m_ditheredTexture( 0 ), - m_compressTargetRes( 0 ), - m_etc1Error( 0 ), - m_eacTargetRes( 0 ), - m_stitchedTarget( 0 ), - m_dstTexture( 0 ), - m_etc1TablesSsbo( 0 ) - { - } - //------------------------------------------------------------------------- - EncoderETC1::~EncoderETC1() { assert( !m_srcTexture && "deinitResources not called!" ); } - //------------------------------------------------------------------------- - size_t EncoderETC1::getEtc1TablesSize() - { - return sizeof( float ) * 2u * 8u * 4u * 256u + sizeof( uint32_t ) * ( 2u * 33u + 254 * 11u ); - } - //------------------------------------------------------------------------- - uint8_t *EncoderETC1::createFilledEtc1Tables() - { - uint8_t *data = new uint8_t[getEtc1TablesSize()]; - - float *asFloat = reinterpret_cast( data ); - - for( size_t diff = 0u; diff < 2u; ++diff ) - { - const size_t limit = diff ? 32u : 16u; - - for( size_t inten = 0; inten < 8; ++inten ) - { - for( size_t selector = 0u; selector < 4u; ++selector ) - { - const size_t inverse_table_index = diff + ( inten << 1u ) + ( selector << 4u ); - for( size_t color = 0u; color < 256u; ++color ) - { - uint32_t best_error = std::numeric_limits::max(); - size_t best_packed_c = 0u; - for( size_t packed_c = 0; packed_c < limit; ++packed_c ) - { - const size_t v = etc1_decode_value( diff, inten, selector, packed_c ); - uint32_t err = static_cast( abs( static_cast( v - color ) ) ); - if( err < best_error ) - { - best_error = err; - best_packed_c = packed_c; - if( !best_error ) - break; - } - } - asFloat[inverse_table_index * 256u + color] = - static_cast( best_packed_c | ( best_error << 8u ) ); - } - } - } - } - - const size_t startIdx = sizeof( float ) * 2u * 8u * 4u * 256u; - memcpy( data + startIdx, c_color8_to_etc_block_config_0_255, - sizeof( c_color8_to_etc_block_config_0_255 ) ); - memcpy( data + startIdx + sizeof( c_color8_to_etc_block_config_0_255 ), - c_color8_to_etc_block_config_1_to_254, sizeof( c_color8_to_etc_block_config_1_to_254 ) ); - - return data; - } - //------------------------------------------------------------------------- - bool EncoderETC1::hasAlpha() const { return m_eacTargetRes != 0; } - //------------------------------------------------------------------------- - void EncoderETC1::initResources( const CpuImage &srcImage, const bool bCompressAlpha, - const bool bDither, const bool bForEtc2 ) - { - m_width = srcImage.width; - m_height = srcImage.height; - - const PixelFormat srcFormat = - srcImage.format == PFG_RGBA8_UNORM_SRGB ? PFG_RGBA8_UNORM : srcImage.format; - - m_srcTexture = createTexture( TextureParams( m_width, m_height, srcFormat, "m_srcTexture" ) ); - - if( bDither ) - { - m_ditheredTexture = createTexture( TextureParams( m_width, m_height, PFG_RGBA8_UNORM, - "m_ditheredTexture", TextureFlags::Uav ) ); - m_ditherPso = createComputePsoFromFile( "dither555.glsl", "../Data/" ); - } - else - { - m_ditheredTexture = m_srcTexture; - } - - m_compressTargetRes = - createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, - "m_compressTargetRes", TextureFlags::Uav ) ); - - if( bForEtc2 ) - { - m_etc1Error = createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_R32_FLOAT, - "m_etc1Error", TextureFlags::Uav ) ); - } - - m_dstTexture = - createTexture( TextureParams( m_width, m_height, PFG_ETC1_RGB8_UNORM, "m_dstTexture" ) ); - - { - uint8_t *filledTables = createFilledEtc1Tables(); - m_etc1TablesSsbo = createUavBuffer( getEtc1TablesSize(), filledTables ); - delete[] filledTables; - } - - m_compressPso = - createComputePsoFromFile( bForEtc2 ? "etc1_with_error.glsl" : "etc1.glsl", "../Data/" ); - - if( bCompressAlpha ) - { - m_eacTargetRes = - createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, - "m_eacTargetRes", TextureFlags::Uav ) ); - m_stitchedTarget = - createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RGBA32_UINT, - "m_stitchedTarget", TextureFlags::Uav ) ); - m_eacPso = createComputePsoFromFile( "eac.glsl", "../Data/" ); - - // ETC2 codec does its own stitching - if( !bForEtc2 ) - m_stitchPso = createComputePsoFromFile( "etc2_rgba_stitch.glsl", "../Data/" ); - } - - StagingTexture stagingTex = createStagingTexture( m_width, m_height, srcImage.format, true ); - memcpy( stagingTex.data, srcImage.data, stagingTex.sizeBytes ); - uploadStagingTexture( stagingTex, m_srcTexture ); - destroyStagingTexture( stagingTex ); - } - //------------------------------------------------------------------------- - void EncoderETC1::initResources( const CpuImage &srcImage, const bool bCompressAlpha, - const bool bDither ) - { - initResources( srcImage, bCompressAlpha, bDither, false ); - } - //------------------------------------------------------------------------- - void EncoderETC1::deinitResources() - { - destroyUavBuffer( m_etc1TablesSsbo ); - m_etc1TablesSsbo = 0; - - destroyTexture( m_dstTexture ); - m_dstTexture = 0; - if( m_etc1Error ) - { - destroyTexture( m_etc1Error ); - m_etc1Error = 0; - } - destroyTexture( m_compressTargetRes ); - m_compressTargetRes = 0; - if( m_eacTargetRes ) - { - destroyTexture( m_stitchedTarget ); - m_stitchedTarget = 0; - - destroyTexture( m_eacTargetRes ); - m_eacTargetRes = 0; - } - if( m_ditheredTexture != m_srcTexture ) - { - destroyTexture( m_ditheredTexture ); - m_ditheredTexture = 0; - destroyPso( m_ditherPso ); - } - - destroyTexture( m_srcTexture ); - m_srcTexture = 0; - - if( m_downloadStaging.bufferName ) - destroyStagingTexture( m_downloadStaging ); - - if( m_eacPso.computePso ) - { - destroyPso( m_stitchPso ); - destroyPso( m_eacPso ); - } - destroyPso( m_compressPso ); - } - //------------------------------------------------------------------------- - void EncoderETC1::execute00() - { - if( m_ditheredTexture == m_srcTexture ) - return; - - bindTexture( 0u, m_srcTexture ); - bindUav( 0u, m_ditheredTexture, PFG_RGBA8_UNORM, ResourceAccess::Write ); - bindComputePso( m_ditherPso ); - - const uint32_t pixelsPerThreadGroup = 4u * 8u; - glDispatchCompute( alignToNextMultiple( m_width, pixelsPerThreadGroup ) / pixelsPerThreadGroup, - alignToNextMultiple( m_height, pixelsPerThreadGroup ) / pixelsPerThreadGroup, - 1u ); - - glMemoryBarrier( GL_TEXTURE_FETCH_BARRIER_BIT ); - } - //------------------------------------------------------------------------- - void EncoderETC1::execute01( EncoderETC1::Etc1Quality quality ) - { - bindTexture( 0u, m_ditheredTexture ); - bindUav( 0u, m_compressTargetRes, PFG_RG32_UINT, ResourceAccess::Write ); - bindUavBuffer( 1u, m_etc1TablesSsbo, 0u, getEtc1TablesSize() ); - if( m_etc1Error ) - bindUav( 2u, m_etc1Error, PFG_R32_FLOAT, ResourceAccess::Write ); - bindComputePso( m_compressPso ); - - struct Params - { - float quality; - float scanDeltaAbsMin; - float scanDeltaAbsMax; - float maxRefinementTrials; - }; - - Params params; - params.quality = quality; - if( quality == cHighQuality ) - { - params.scanDeltaAbsMin = 0; - params.scanDeltaAbsMax = 4; - } - else if( quality == cMediumQuality ) - { - params.scanDeltaAbsMin = 0; - params.scanDeltaAbsMax = 1; - } - else - { - params.scanDeltaAbsMin = 0; - params.scanDeltaAbsMax = 0; - } - // params.scanDeltaAbsMin = 0; - // params.scanDeltaAbsMax = 0; - params.maxRefinementTrials = quality == cLowQuality ? 2.0f : 4.0f; - - glUniform4fv( 0, 1u, ¶ms.quality ); - - glDispatchCompute( 1u, // - alignToNextMultiple( m_width, 16u ) / 16u, - alignToNextMultiple( m_height, 16u ) / 16u ); - - if( hasAlpha() ) - { - // Compress Alpha too (using EAC compressor) - bindTexture( 0u, m_srcTexture ); - bindUav( 0u, m_eacTargetRes, PFG_RG32_UINT, ResourceAccess::Write ); - bindComputePso( m_eacPso ); - glDispatchCompute( alignToNextMultiple( m_width, 4u ) / 4u, - alignToNextMultiple( m_height, 4u ) / 4u, 1u ); - } - } - //------------------------------------------------------------------------- - void EncoderETC1::execute02() - { - if( !hasAlpha() ) - { - // This step is only relevant when doing ETC2_RGBA - return; - } - - glMemoryBarrier( GL_TEXTURE_FETCH_BARRIER_BIT ); - bindTexture( 0u, m_compressTargetRes ); - bindTexture( 1u, m_eacTargetRes ); - bindUav( 0u, m_stitchedTarget, PFG_RGBA32_UINT, ResourceAccess::Write ); - bindComputePso( m_stitchPso ); - glDispatchCompute( alignToNextMultiple( m_width, 32u ) / 32u, - alignToNextMultiple( m_height, 32u ) / 32u, 1u ); - } - //------------------------------------------------------------------------- - void EncoderETC1::execute03() - { - // It's unclear which of these 2 barrier bits GL wants in order for glCopyImageSubData to work - glMemoryBarrier( GL_TEXTURE_UPDATE_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT ); - - // Copy "8x8" PFG_RG32_UINT -> 32x32 PFG_ETC1_RGB8_UNORM - glCopyImageSubData( m_compressTargetRes, GL_TEXTURE_2D, 0, 0, 0, 0, // - m_dstTexture, GL_TEXTURE_2D, 0, 0, 0, 0, // - ( GLsizei )( getBlockWidth() ), ( GLsizei )( getBlockHeight() ), 1 ); - - StagingTexture stagingTex = - createStagingTexture( getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, false ); - downloadStagingTexture( m_compressTargetRes, stagingTex ); - glFinish(); - - const uint8_t *result = (const uint8_t *)stagingTex.data; - printf( "DUMP START\n" ); - for( size_t b = 0u; b < 1u; ++b ) - { - for( size_t i = 0u; i < 8u; ++i ) - printf( "%02X ", result[b * 8u + i] ); - printf( "\n" ); - } - destroyStagingTexture( stagingTex ); - } - //------------------------------------------------------------------------- - void EncoderETC1::startDownload() - { - glMemoryBarrier( GL_PIXEL_BUFFER_BARRIER_BIT ); - - if( m_downloadStaging.bufferName ) - destroyStagingTexture( m_downloadStaging ); - m_downloadStaging = createStagingTexture( getBlockWidth(), getBlockHeight(), - hasAlpha() ? PFG_RGBA32_UINT : PFG_RG32_UINT, false ); - downloadStagingTexture( hasAlpha() ? m_stitchedTarget : m_compressTargetRes, m_downloadStaging ); - } - //------------------------------------------------------------------------- - void EncoderETC1::downloadTo( CpuImage &outImage ) - { - glFinish(); - outImage.width = m_width; - outImage.height = m_height; - outImage.format = hasAlpha() ? PFG_ETC2_RGBA8_UNORM : PFG_ETC1_RGB8_UNORM; - outImage.data = reinterpret_cast( m_downloadStaging.data ); - } -} // namespace betsy diff --git a/src/betsy/EncoderETC2.cpp b/src/betsy/EncoderETC2.cpp deleted file mode 100644 index 810a18f..0000000 --- a/src/betsy/EncoderETC2.cpp +++ /dev/null @@ -1,158 +0,0 @@ - -#include "betsy/EncoderETC2.h" - -#include "betsy/CpuImage.h" - -#include - -#define TODO_better_barrier - -namespace betsy -{ - EncoderETC2::EncoderETC2() : - m_thModesTargetRes( 0 ), - m_thModesError( 0 ), - m_thModesC0C1( 0 ), - m_pModeTargetRes( 0 ), - m_pModeError( 0 ) - { - } - //------------------------------------------------------------------------- - EncoderETC2::~EncoderETC2() { assert( !m_thModesTargetRes && "deinitResources not called!" ); } - //------------------------------------------------------------------------- - void EncoderETC2::initResources( const CpuImage &srcImage, const bool bCompressAlpha, - const bool bDither ) - { - EncoderETC1::initResources( srcImage, bCompressAlpha, bDither, true ); - - m_thModesTargetRes = - createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, - "m_thModesTargetRes", TextureFlags::Uav ) ); - m_thModesError = createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_R32_FLOAT, - "m_thModesError", TextureFlags::Uav ) ); - m_thModesC0C1 = createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, - "m_thModesC0C1", TextureFlags::Uav, 120u ) ); - - m_pModeTargetRes = createTexture( TextureParams( - getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, "m_pModeTargetRes", TextureFlags::Uav ) ); - m_pModeError = createTexture( TextureParams( getBlockWidth(), getBlockHeight(), PFG_R32_FLOAT, - "m_pModeError", TextureFlags::Uav ) ); - - m_thModesPso = createComputePsoFromFile( "etc2_th.glsl", "../Data/" ); - m_thModesFindBestC0C1 = - createComputePsoFromFile( "etc2_th_find_best_c0c1_k_means.glsl", "../Data/" ); - m_pModePso = createComputePsoFromFile( "etc2_p.glsl", "../Data/" ); - - if( bCompressAlpha ) - m_stitchPso = createComputePsoFromFile( "etc2_rgba_selector.glsl", "../Data/" ); - else - m_stitchPso = createComputePsoFromFile( "etc2_rgb_selector.glsl", "../Data/" ); - } - //------------------------------------------------------------------------- - void EncoderETC2::deinitResources() - { - destroyTexture( m_pModeError ); - m_pModeError = 0; - destroyTexture( m_pModeTargetRes ); - m_pModeTargetRes = 0; - destroyTexture( m_thModesError ); - m_thModesError = 0; - destroyTexture( m_thModesTargetRes ); - m_thModesTargetRes = 0; - destroyPso( m_pModePso ); - destroyPso( m_thModesFindBestC0C1 ); - destroyPso( m_thModesPso ); - - EncoderETC1::deinitResources(); - } - //------------------------------------------------------------------------- - void EncoderETC2::execute00() - { - EncoderETC1::execute00(); - - bindTexture( 0u, m_ditheredTexture ); - bindUav( 0u, m_thModesC0C1, PFG_RG32_UINT, ResourceAccess::Write ); - bindComputePso( m_thModesFindBestC0C1 ); - - glDispatchCompute( 1u, // - alignToNextMultiple( m_width, 16u ) / 16u, - alignToNextMultiple( m_height, 8u ) / 8u ); - - TODO_better_barrier; - glMemoryBarrier( GL_SHADER_IMAGE_ACCESS_BARRIER_BIT ); - } - //------------------------------------------------------------------------- - void EncoderETC2::execute01( EncoderETC2::Etc1Quality quality ) - { - EncoderETC1::execute01( quality ); - - bindTexture( 0u, m_ditheredTexture ); - bindUav( 0u, m_thModesTargetRes, PFG_RG32_UINT, ResourceAccess::Write ); - bindUav( 1u, m_thModesError, PFG_R32_FLOAT, ResourceAccess::Write ); - bindUav( 2u, m_thModesC0C1, PFG_RG32_UINT, ResourceAccess::Write ); - bindComputePso( m_thModesPso ); - glDispatchCompute( alignToNextMultiple( m_width, 4u ) / 4u, - alignToNextMultiple( m_height, 4u ) / 4u, 1u ); - - bindUav( 0u, m_pModeTargetRes, PFG_RG32_UINT, ResourceAccess::Write ); - bindUav( 1u, m_pModeError, PFG_R32_FLOAT, ResourceAccess::Write ); - bindComputePso( m_pModePso ); - glDispatchCompute( alignToNextMultiple( m_width, 8u ) / 8u, - alignToNextMultiple( m_height, 8u ) / 8u, 1u ); - } - //------------------------------------------------------------------------- - void EncoderETC2::execute02() - { - // Decide which the best modes and merge and stitch - glMemoryBarrier( GL_TEXTURE_UPDATE_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT ); - - bindTexture( 0u, m_etc1Error ); - bindTexture( 1u, m_thModesError ); - bindTexture( 2u, m_pModeError ); - - bindTexture( 3u, m_compressTargetRes ); - bindTexture( 4u, m_thModesTargetRes ); - - if( hasAlpha() ) - { - bindTexture( 5u, m_pModeTargetRes ); - bindTexture( 6u, m_eacTargetRes ); - - bindUav( 0u, m_stitchedTarget, PFG_RGBA32_UINT, ResourceAccess::Write ); - } - else - { - bindUav( 0u, m_pModeTargetRes, PFG_RG32_UINT, ResourceAccess::ReadWrite ); - } - - bindComputePso( m_stitchPso ); - glDispatchCompute( alignToNextMultiple( m_width, 32u ) / 32u, - alignToNextMultiple( m_height, 32u ) / 32u, 1u ); - } - //------------------------------------------------------------------------- - void EncoderETC2::execute03() - { - // Copy "8x8" PFG_RG32_UINT -> 32x32 PFG_ETC1_RGB8_UNORM - // Copy "8x8" PFG_RGBA32_UINT -> 32x32 PFG_ETC2_RGBA8_UNORM - glCopyImageSubData( hasAlpha() ? m_stitchedTarget : m_pModeTargetRes, // - GL_TEXTURE_2D, 0, 0, 0, 0, // - m_dstTexture, GL_TEXTURE_2D, 0, 0, 0, 0, // - ( GLsizei )( getBlockWidth() ), ( GLsizei )( getBlockHeight() ), 1 ); - - StagingTexture stagingTex = - createStagingTexture( getBlockWidth(), getBlockHeight(), PFG_RG32_UINT, false ); - downloadStagingTexture( m_pModeTargetRes, stagingTex ); - glFinish(); - } - //------------------------------------------------------------------------- - void EncoderETC2::startDownload() - { - glMemoryBarrier( GL_PIXEL_BUFFER_BARRIER_BIT ); - - if( m_downloadStaging.bufferName ) - destroyStagingTexture( m_downloadStaging ); - m_downloadStaging = createStagingTexture( getBlockWidth(), getBlockHeight(), - hasAlpha() ? PFG_RGBA32_UINT : PFG_RG32_UINT, false ); - downloadStagingTexture( hasAlpha() ? m_stitchedTarget : m_pModeTargetRes, m_downloadStaging ); - } -} // namespace betsy diff --git a/src/betsy/EncoderGL.cpp b/src/betsy/EncoderGL.cpp deleted file mode 100644 index 946acd3..0000000 --- a/src/betsy/EncoderGL.cpp +++ /dev/null @@ -1,451 +0,0 @@ - -#include "betsy/EncoderGL.h" - -#include "betsy/CpuImage.h" -#include "betsy/IncludeParser.h" - -#include -#include - -//#define DUMP_SHADER -//#define DEBUG_LINK_ERRORS - -#if defined( DUMP_SHADER ) || defined( DEBUG_LINK_ERRORS ) -# include -#endif - -namespace betsy -{ - extern bool g_hasDebugObjectLabel; - bool g_hasDebugObjectLabel = false; - void ogreGlObjectLabel( GLenum identifier, GLuint name, const GLchar *label ) - { - if( g_hasDebugObjectLabel ) - glObjectLabel( identifier, name, (GLsizei)strlen( label ), label ); - } - //------------------------------------------------------------------------- - TextureParams::TextureParams( uint32_t _width, uint32_t _height, PixelFormat _format, - const char *_debugName, uint32_t _flags, uint32_t _depthOrSlices, - uint8_t _numMipmaps ) : - width( _width ), - height( _height ), - depthOrSlices( _depthOrSlices ), - numMipmaps( _numMipmaps ), - flags( _flags ), - format( _format ), - debugName( _debugName ) - { - } - //------------------------------------------------------------------------- - StagingTexture::StagingTexture() : - bufferName( 0 ), - bytesPerRow( 0 ), - width( 0 ), - height( 0 ), - pixelFormat( PFG_RGBA16_FLOAT ), - data( 0 ), - sizeBytes( 0 ) - { - } - //------------------------------------------------------------------------- - ComputePso::ComputePso() : computeShader( 0 ), computePso( 0 ) {} - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- - GLenum EncoderGL::get( PixelFormat format ) - { - switch( format ) - { - case PFG_RGBA32_UINT: - return GL_RGBA32UI; - case PFG_RGBA32_FLOAT: - return GL_RGBA32F; - case PFG_RGBA16_FLOAT: - return GL_RGBA16F; - case PFG_R32_FLOAT: - return GL_R32F; - case PFG_RG32_UINT: - return GL_RG32UI; - case PFG_RGBA8_UNORM: - return GL_RGBA8; - case PFG_RGBA8_UNORM_SRGB: - return GL_SRGB8_ALPHA8; - case PFG_RG8_UINT: - return GL_RG8UI; - case PFG_BC1_UNORM: - return GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; - case PFG_BC3_UNORM: - return GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; - case PFG_BC4_UNORM: - return GL_COMPRESSED_RED_RGTC1; - case PFG_BC4_SNORM: - return GL_COMPRESSED_SIGNED_RED_RGTC1; - case PFG_BC5_UNORM: - return GL_COMPRESSED_RG_RGTC2; - case PFG_BC5_SNORM: - return GL_COMPRESSED_SIGNED_RG_RGTC2; - case PFG_BC6H_UF16: - return GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB; - case PFG_ETC1_RGB8_UNORM: - return GL_COMPRESSED_RGB8_ETC2; - case PFG_ETC2_RGBA8_UNORM: - return GL_COMPRESSED_RGBA8_ETC2_EAC; - case PFG_EAC_R11_UNORM: - return GL_COMPRESSED_R11_EAC; - case PFG_EAC_RG11_UNORM: - return GL_COMPRESSED_RG11_EAC; - } - return GL_NONE; - } - //----------------------------------------------------------------------------------- - GLenum EncoderGL::getBaseFormat( PixelFormat format ) - { - switch( format ) - { - case PFG_RGBA32_UINT: - case PFG_RGBA32_FLOAT: - case PFG_RGBA16_FLOAT: - case PFG_RGBA8_UNORM: - case PFG_RGBA8_UNORM_SRGB: - case PFG_BC3_UNORM: - case PFG_ETC2_RGBA8_UNORM: - return GL_RGBA; - case PFG_RG32_UINT: - case PFG_RG8_UINT: - case PFG_BC5_UNORM: - case PFG_BC5_SNORM: - case PFG_EAC_RG11_UNORM: - return GL_RG; - case PFG_BC1_UNORM: - case PFG_BC6H_UF16: - case PFG_ETC1_RGB8_UNORM: - return GL_RGB; - case PFG_R32_FLOAT: - case PFG_BC4_UNORM: - case PFG_BC4_SNORM: - case PFG_EAC_R11_UNORM: - return GL_RED; - } - return GL_NONE; - } - //----------------------------------------------------------------------------------- - void EncoderGL::getFormatAndType( PixelFormat pixelFormat, GLenum &format, GLenum &type ) - { - switch( pixelFormat ) - { - case PFG_RGBA32_UINT: - format = GL_RGBA_INTEGER; - break; - case PFG_R32_FLOAT: - format = GL_RED; - break; - case PFG_RG32_UINT: - case PFG_RG8_UINT: - format = GL_RG_INTEGER; - break; - case PFG_RGBA32_FLOAT: - case PFG_RGBA16_FLOAT: - case PFG_RGBA8_UNORM: - case PFG_RGBA8_UNORM_SRGB: - format = GL_RGBA; - break; - case PFG_BC1_UNORM: - case PFG_BC3_UNORM: - case PFG_BC4_UNORM: - case PFG_BC4_SNORM: - case PFG_BC5_UNORM: - case PFG_BC5_SNORM: - case PFG_BC6H_UF16: - case PFG_ETC1_RGB8_UNORM: - case PFG_ETC2_RGBA8_UNORM: - case PFG_EAC_R11_UNORM: - case PFG_EAC_RG11_UNORM: - format = GL_NONE; - assert( false && - "This should never happen. Compressed formats must use " - "EncoderGL::get instead" ); - break; - } - - switch( pixelFormat ) - { - case PFG_RGBA16_FLOAT: - type = GL_HALF_FLOAT; - break; - case PFG_R32_FLOAT: - case PFG_RGBA32_FLOAT: - type = GL_FLOAT; - break; - case PFG_RGBA32_UINT: - case PFG_RG32_UINT: - type = GL_UNSIGNED_INT; - break; - case PFG_RGBA8_UNORM: - case PFG_RGBA8_UNORM_SRGB: - type = GL_UNSIGNED_INT_8_8_8_8_REV; - break; - case PFG_RG8_UINT: - type = GL_UNSIGNED_BYTE; - break; - case PFG_BC1_UNORM: - case PFG_BC3_UNORM: - case PFG_BC4_UNORM: - case PFG_BC4_SNORM: - case PFG_BC5_UNORM: - case PFG_BC5_SNORM: - case PFG_BC6H_UF16: - case PFG_ETC1_RGB8_UNORM: - case PFG_ETC2_RGBA8_UNORM: - case PFG_EAC_R11_UNORM: - case PFG_EAC_RG11_UNORM: - format = GL_NONE; - assert( false && - "This should never happen. Compressed formats must use " - "EncoderGL::get instead" ); - break; - } - } - //------------------------------------------------------------------------- - GLuint EncoderGL::createTexture( const TextureParams ¶ms ) - { - const GLenum format = EncoderGL::get( params.format ); - - const GLenum textureTarget = params.depthOrSlices > 1u ? GL_TEXTURE_2D_ARRAY : GL_TEXTURE_2D; - - GLuint textureName = 0; - glGenTextures( 1u, &textureName ); - - glBindTexture( textureTarget, textureName ); - glTexParameteri( textureTarget, GL_TEXTURE_BASE_LEVEL, 0 ); - glTexParameteri( textureTarget, GL_TEXTURE_MAX_LEVEL, 0 ); - glTexParameteri( textureTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - glTexParameteri( textureTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - glTexParameteri( textureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); - glTexParameteri( textureTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); - glTexParameteri( textureTarget, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE ); - glTexParameteri( textureTarget, GL_TEXTURE_MAX_LEVEL, params.numMipmaps - 1u ); - - if( params.depthOrSlices > 1u ) - { - glTexStorage3D( GL_TEXTURE_2D_ARRAY, GLsizei( params.numMipmaps ), format, // - GLsizei( params.width ), GLsizei( params.height ), - GLsizei( params.depthOrSlices ) ); - } - else - { - glTexStorage2D( GL_TEXTURE_2D, GLsizei( params.numMipmaps ), format, // - GLsizei( params.width ), GLsizei( params.height ) ); - } - - if( params.debugName ) - ogreGlObjectLabel( GL_TEXTURE, textureName, params.debugName ); - - return textureName; - } - //------------------------------------------------------------------------- - void EncoderGL::destroyTexture( GLuint texName ) { glDeleteTextures( 1u, &texName ); } - //------------------------------------------------------------------------- - StagingTexture EncoderGL::createStagingTexture( uint32_t width, uint32_t height, PixelFormat format, - bool forUpload ) - { - const size_t sizeBytes = CpuImage::getSizeBytes( width, height, 1u, 1u, format ); - - StagingTexture retVal; - glGenBuffers( 1u, &retVal.bufferName ); - glBindBuffer( GL_COPY_WRITE_BUFFER, retVal.bufferName ); - - GLbitfield flags = GL_MAP_PERSISTENT_BIT; - if( forUpload ) - flags |= GL_MAP_WRITE_BIT; - else - flags |= GL_MAP_READ_BIT; - - glBufferStorage( GL_COPY_WRITE_BUFFER, (GLsizeiptr)sizeBytes, 0, flags ); - - GLbitfield mapFlags = GL_MAP_PERSISTENT_BIT; - - if( forUpload ) - mapFlags |= GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_FLUSH_EXPLICIT_BIT; - else - mapFlags |= GL_MAP_READ_BIT; - - retVal.pixelFormat = format; - retVal.bytesPerRow = CpuImage::getSizeBytes( width, 1u, 1u, 1u, format ); - retVal.width = width; - retVal.height = height; - retVal.sizeBytes = sizeBytes; - retVal.data = glMapBufferRange( GL_COPY_WRITE_BUFFER, 0, (GLsizeiptr)sizeBytes, mapFlags ); - - glBindBuffer( GL_COPY_WRITE_BUFFER, 0 ); - - return retVal; - } - //------------------------------------------------------------------------- - void EncoderGL::uploadStagingTexture( const StagingTexture &stagingTex, GLuint dstTexture ) - { - const size_t bytesPerPixel = CpuImage::getBytesPerPixel( stagingTex.pixelFormat ); - - glPixelStorei( GL_UNPACK_ALIGNMENT, 4 ); - glPixelStorei( GL_UNPACK_ROW_LENGTH, ( GLint )( stagingTex.bytesPerRow / bytesPerPixel ) ); - glPixelStorei( GL_UNPACK_IMAGE_HEIGHT, (GLint)stagingTex.height ); - - glBindBuffer( GL_PIXEL_UNPACK_BUFFER, stagingTex.bufferName ); - glBindTexture( GL_TEXTURE_2D, dstTexture ); - - glFlushMappedBufferRange( GL_PIXEL_UNPACK_BUFFER, 0, (GLsizeiptr)stagingTex.sizeBytes ); - - GLenum format, type; - EncoderGL::getFormatAndType( stagingTex.pixelFormat, format, type ); - - glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, (GLsizei)stagingTex.width, (GLsizei)stagingTex.height, - format, type, 0 ); - - glBindBuffer( GL_PIXEL_UNPACK_BUFFER, 0 ); - glBindTexture( GL_TEXTURE_2D, 0 ); - } - //------------------------------------------------------------------------- - void EncoderGL::downloadStagingTexture( GLuint srcTexture, const StagingTexture &stagingTex ) - { - const size_t bytesPerPixel = CpuImage::getBytesPerPixel( stagingTex.pixelFormat ); - - const GLint rowLength = bytesPerPixel > 0 ? GLint( stagingTex.bytesPerRow / bytesPerPixel ) : 0; - const GLint imageHeight = ( stagingTex.bytesPerRow > 0 ) ? GLint( stagingTex.height ) : 0; - - glPixelStorei( GL_PACK_ALIGNMENT, 4 ); - glPixelStorei( GL_PACK_ROW_LENGTH, rowLength ); - glPixelStorei( GL_PACK_IMAGE_HEIGHT, imageHeight ); - - const GLint mipLevel = 0; - - glBindTexture( GL_TEXTURE_2D, srcTexture ); - glBindBuffer( GL_PIXEL_PACK_BUFFER, stagingTex.bufferName ); - - // We can use glGetTexImage & glGetCompressedTexImage (cubemaps need a special path) - if( !CpuImage::isCompressed( stagingTex.pixelFormat ) ) - { - GLenum format, type; - EncoderGL::getFormatAndType( stagingTex.pixelFormat, format, type ); - glGetTexImage( GL_TEXTURE_2D, mipLevel, format, type, 0 ); - } - else - { - glGetCompressedTexImage( GL_TEXTURE_2D, mipLevel, 0 ); - } - } - //------------------------------------------------------------------------- - void EncoderGL::destroyStagingTexture( const StagingTexture &stagingTex ) - { - glBindBuffer( GL_COPY_WRITE_BUFFER, stagingTex.bufferName ); - glUnmapBuffer( GL_COPY_WRITE_BUFFER ); - glBindBuffer( GL_COPY_WRITE_BUFFER, 0 ); - glDeleteBuffers( 1u, &stagingTex.bufferName ); - } - //------------------------------------------------------------------------- - GLuint EncoderGL::createUavBuffer( size_t sizeBytes, void *initialData ) - { - GLuint bufferName; - glGenBuffers( 1u, &bufferName ); - glBindBuffer( GL_SHADER_STORAGE_BUFFER, bufferName ); - glBufferStorage( GL_SHADER_STORAGE_BUFFER, (GLsizeiptr)sizeBytes, initialData, 0u ); - return bufferName; - } - //------------------------------------------------------------------------- - void EncoderGL::destroyUavBuffer( GLuint bufferName ) { glDeleteBuffers( 1u, &bufferName ); } - //------------------------------------------------------------------------- - ComputePso EncoderGL::createComputePsoFromFile( const char *shaderFilename, - const char *relativePath ) - { - IncludeParser parser; - parser.loadFromFile( shaderFilename, relativePath ); - -#ifdef DUMP_SHADER - printf( "%s", parser.getFinalSource() ); -#endif - ComputePso retVal = createComputePso( parser.getFinalSource() ); - return retVal; - } - //------------------------------------------------------------------------- - ComputePso EncoderGL::createComputePso( const char *csShader ) - { - ComputePso retVal; - - retVal.computeShader = glCreateShader( GL_COMPUTE_SHADER ); - glShaderSource( retVal.computeShader, 1, &csShader, 0 ); - glCompileShader( retVal.computeShader ); - -#ifdef DEBUG_LINK_ERRORS - { - GLsizei logLength = 0; - char infoLog[1024]; - glGetShaderiv( retVal.computeShader, GL_INFO_LOG_LENGTH, &logLength ); - glGetShaderInfoLog( retVal.computeShader, sizeof( infoLog ), &logLength, infoLog ); - if( logLength > 0 ) - printf( "%s\n", infoLog ); - } -#endif - - retVal.computePso = glCreateProgram(); - glAttachShader( retVal.computePso, retVal.computeShader ); - glLinkProgram( retVal.computePso ); - -#ifdef DEBUG_LINK_ERRORS - { - GLsizei logLength = 0; - char infoLog[1024]; - glGetProgramInfoLog( retVal.computePso, sizeof( infoLog ), &logLength, infoLog ); - if( logLength > 0 ) - printf( "%s\n", infoLog ); - } -#endif - - return retVal; - } - //------------------------------------------------------------------------- - void EncoderGL::destroyPso( ComputePso &pso ) - { - glDeleteProgram( pso.computePso ); - glDeleteShader( pso.computeShader ); - pso.computePso = 0; - pso.computeShader = 0; - } - //------------------------------------------------------------------------- - void EncoderGL::bindComputePso( const ComputePso &pso ) { glUseProgram( pso.computePso ); } - //------------------------------------------------------------------------- - void EncoderGL::bindTexture( uint32_t slot, GLuint textureSrv ) - { - glActiveTexture( static_cast( GL_TEXTURE0 + slot ) ); - glBindTexture( GL_TEXTURE_2D, textureSrv ); - glActiveTexture( GL_TEXTURE0 ); - } - //------------------------------------------------------------------------- - void EncoderGL::bindUav( uint32_t slot, GLuint textureSrv, PixelFormat pixelFormat, - ResourceAccess::ResourceAccess access ) - { - const GLenum format = EncoderGL::get( pixelFormat ); - GLenum accessGl; - switch( access ) - { - case ResourceAccess::Read: - accessGl = GL_READ_ONLY; - break; - case ResourceAccess::Write: - accessGl = GL_WRITE_ONLY; - break; - case ResourceAccess::ReadWrite: - accessGl = GL_READ_WRITE; - break; - default: - assert( false ); - accessGl = GL_READ_WRITE; - break; - } - - glBindImageTexture( slot, textureSrv, 0, GL_TRUE, 0, accessGl, format ); - } - //------------------------------------------------------------------------- - void EncoderGL::bindUavBuffer( uint32_t slot, GLuint buffer, size_t offset, size_t bufferSize ) - { - glBindBufferRange( GL_SHADER_STORAGE_BUFFER, slot, buffer, (GLintptr)offset, - (GLintptr)bufferSize ); - } -} // namespace betsy diff --git a/src/betsy/File/FormatKTX.cpp b/src/betsy/File/FormatKTX.cpp deleted file mode 100644 index 27c4f7a..0000000 --- a/src/betsy/File/FormatKTX.cpp +++ /dev/null @@ -1,88 +0,0 @@ - -#include "betsy/File/FormatKTX.h" - -#include "betsy/EncoderGL.h" - -#include "sds/sds_fstream.h" - -#include -#include - -#define KTX_ENDIAN_REF ( 0x04030201 ) -#define KTX_ENDIAN_REF_REV ( 0x01020304 ) - -namespace betsy -{ - struct KTXHeader - { - uint8_t identifier[12]; - uint32_t endianness; - uint32_t glType; - uint32_t glTypeSize; - uint32_t glFormat; - uint32_t glInternalFormat; - uint32_t glBaseInternalFormat; - uint32_t pixelWidth; - uint32_t pixelHeight; - uint32_t pixelDepth; - uint32_t numberOfArrayElements; - uint32_t numberOfFaces; - uint32_t numberOfMipmapLevels; - uint32_t bytesOfKeyValueData; - }; - //------------------------------------------------------------------------- - void FormatKTX::save( const char *fullpath, const CpuImage &cpuImage ) - { - sds::fstream file( fullpath, sds::fstream::OutputDiscard ); - - if( !file.is_open() ) - { - fprintf( stderr, "Could not save to '%s' Check write access and whether the disk is full\n", - fullpath ); - return; - } - - KTXHeader header; - memset( &header, 0, sizeof( header ) ); - const uint8_t c_KtxFileIdentifier[12] = { 0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, - 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A }; - memcpy( header.identifier, c_KtxFileIdentifier, sizeof( c_KtxFileIdentifier ) ); - - header.endianness = KTX_ENDIAN_REF; - header.pixelWidth = cpuImage.width; - header.pixelHeight = cpuImage.height; - header.pixelDepth = 1u; - header.numberOfArrayElements = 1u; - header.numberOfFaces = 1u; - header.numberOfMipmapLevels = 1u; - - if( !CpuImage::isCompressed( cpuImage.format ) ) - { - header.glInternalFormat = EncoderGL::get( cpuImage.format ); - header.glBaseInternalFormat = EncoderGL::getBaseFormat( cpuImage.format ); - EncoderGL::getFormatAndType( cpuImage.format, header.glFormat, header.glType ); - header.glTypeSize = static_cast( CpuImage::getBytesPerPixel( cpuImage.format ) ); - } - else - { - header.glInternalFormat = EncoderGL::get( cpuImage.format ); - header.glBaseInternalFormat = EncoderGL::getBaseFormat( cpuImage.format ); - header.glFormat = 0u; - header.glType = 0u; - header.glTypeSize = 1u; - } - - file.write( header ); - - // Now deal with the data - for( uint32_t level = 0u; level < header.numberOfMipmapLevels; ++level ) - { - const size_t imageSize = CpuImage::getSizeBytes( header.pixelWidth, header.pixelHeight, 1u, - 1u, cpuImage.format, 4u ); - file.write( static_cast( imageSize ) ); - - for( uint32_t face = 0u; face < header.numberOfFaces; ++face ) - file.write( reinterpret_cast( cpuImage.data ), imageSize ); - } - } -} // namespace betsy diff --git a/src/betsy/IncludeParser.cpp b/src/betsy/IncludeParser.cpp deleted file mode 100644 index 08b713f..0000000 --- a/src/betsy/IncludeParser.cpp +++ /dev/null @@ -1,116 +0,0 @@ - -#include "betsy/IncludeParser.h" - -#include -#include - -namespace betsy -{ - bool IncludeParser::loadFromFileInto( const char *fullpath, std::string &outSource ) - { - std::ifstream file; - file.open( fullpath, std::ios_base::binary | std::ios_base::in ); - if( file.fail() ) - { - printf( "Error opening %s\n", fullpath ); - return false; - } - - file.seekg( 0, std::ios_base::end ); - const size_t fileSize = static_cast( file.tellg() ); - outSource.resize( fileSize ); - - file.seekg( 0, std::ios_base::beg ); - file.read( &outSource[0], static_cast( fileSize ) ); - - // Remove "#version" from first newline - const size_t firstNewlinePos = outSource.find_first_of( '\n' ); - if( firstNewlinePos != std::string::npos ) - { - const size_t versionPos = outSource.substr( 0u, firstNewlinePos ).find( "#version ", 0u ); - if( versionPos != std::string::npos ) - outSource.erase( 0u, firstNewlinePos + 1u ); - } - - return true; - } - //------------------------------------------------------------------------- - bool IncludeParser::loadFromFile( const char *filename, const char *relativePath ) - { - std::string fullpath = relativePath; - fullpath += filename; - - std::ifstream file; - file.open( fullpath.c_str(), std::ios_base::binary | std::ios_base::in ); - if( file.fail() ) - { - printf( "Error opening %s\n", fullpath.c_str() ); - return false; - } - - file.seekg( 0, std::ios_base::end ); - const size_t fileSize = static_cast( file.tellg() ); - m_source.resize( fileSize ); - - file.seekg( 0, std::ios_base::beg ); - file.read( &m_source[0], static_cast( fileSize ) ); - - return parseIncludeFiles( relativePath ); - } - //------------------------------------------------------------------------- - bool IncludeParser::parseIncludeFiles( const char *relativePath ) - { - size_t startPos = 0; - std::string includeKeyword = "#include "; - - startPos = m_source.find( includeKeyword, startPos ); - while( startPos != std::string::npos ) - { - // Backtrack to see if have to skip commented lines like "// #include". - // We do not support block comments /**/ - const size_t lineStartPos = m_source.rfind( '\n', startPos ); - if( lineStartPos == std::string::npos || lineStartPos + 2u >= m_source.size() || - m_source[lineStartPos + 1] != '/' || m_source[lineStartPos + 2] != '/' ) - { - size_t pos = startPos + includeKeyword.length() + 1u; - size_t eolMarkerPos = m_source.find( '\n', pos ); - size_t endPos0 = m_source.find( '"', pos ); - size_t endPos1 = m_source.find( '>', pos ); - size_t endPos = std::min( endPos0, endPos1 ); - - if( endPos == std::string::npos || - ( endPos >= eolMarkerPos && eolMarkerPos != std::string::npos ) ) - { - printf( - "Invalid #include syntax near %s", - m_source - .substr( startPos, std::min( startPos + 10u, m_source.size() - startPos ) ) - .c_str() ); - return false; - } - - std::string file = m_source.substr( pos, endPos - pos ); - - std::string includeContent; - if( loadFromFileInto( ( relativePath + file ).c_str(), includeContent ) ) - m_source.replace( startPos, ( endPos + 1u ) - startPos, includeContent ); - else - { - // Leave the included header, fallback to the compiler - // (e.g. Metal can include system headers) - startPos = endPos; - } - } - else - { - startPos += sizeof( "#include " ) - 1u; - } - - startPos = m_source.find( includeKeyword, startPos ); - } - - return true; - } - //------------------------------------------------------------------------- - const char *IncludeParser::getFinalSource() const { return m_source.c_str(); } -} // namespace betsy diff --git a/src/betsy/BC1_tables.inl b/src/lib/BC1_tables.inl similarity index 100% rename from src/betsy/BC1_tables.inl rename to src/lib/BC1_tables.inl diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt new file mode 100644 index 0000000..f5457c6 --- /dev/null +++ b/src/lib/CMakeLists.txt @@ -0,0 +1,28 @@ +# Collect shader input files +file(GLOB GLSLS ${CMAKE_SOURCE_DIR}/shaders/*) + +set(GENERATED_GLSL) + +# Iterate through input files +foreach(GLSL ${GLSLS}) + get_filename_component(GLSL_NAME ${GLSL} NAME) + + message(STATUS "Add target for preprocessing ${GLSL_NAME}") + set(OUT_FILE ${CMAKE_BINARY_DIR}/shaders/${GLSL_NAME}.c) + add_custom_command(OUTPUT ${OUT_FILE} + DEPENDS ${GLSL} + COMMAND shader-processor ${GLSL} ${OUT_FILE}) + list(APPEND GENERATED_GLSL ${OUT_FILE}) +endforeach() + +add_recursive( ${CMAKE_SOURCE_DIR}/src/lib SOURCES ) +add_recursive( ${CMAKE_SOURCE_DIR}/include HEADERS ) + +add_library( lib${PROJECT_NAME} ${SOURCES} ${HEADERS} ${RESOURCES} ${GENERATED_GLSL}) + +set(OpenGL_GL_PREFERENCE GLVND) +find_package(OpenGL REQUIRED) +target_link_libraries( lib${PROJECT_NAME} glfw OpenGL::GL) + +target_include_directories( lib${PROJECT_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/contrib/gli ${CMAKE_SOURCE_DIR}/contrib/gli/external) +target_include_directories( lib${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/contrib/stb) diff --git a/src/lib/CpuImage.cpp b/src/lib/CpuImage.cpp new file mode 100644 index 0000000..57ccd70 --- /dev/null +++ b/src/lib/CpuImage.cpp @@ -0,0 +1,190 @@ + +#include "betsy/CpuImage.h" + +//#define STB_IMAGE_IMPLEMENTATION +//#include "stb_image.h" + +#define FREEIMAGE_LIB +#include +#include +#include + +#define STB_IMAGE_IMPLEMENTATION +#include "stb_image.h" + +namespace betsy +{ +CpuImage::CpuImage() : data(0), width(0), height(0), format(gli::FORMAT_RGBA16_SFLOAT_PACK16) +{ +} +//------------------------------------------------------------------------- +CpuImage::CpuImage(const char *fullpath) : data(0), width(0), height(0), format(gli::FORMAT_RGBA16_SFLOAT_PACK16) +{ + bool hdr = stbi_is_hdr(fullpath); + int comp = 0; + if (hdr) + { + format = gli::FORMAT_RGBA32_SFLOAT_PACK32; + data = (uint8_t *)stbi_loadf(fullpath, (int *)&width, (int *)&height, &comp, 0); + } + else + { + format = gli::FORMAT_RGBA8_UNORM_PACK8; + auto tmpData = stbi_load(fullpath, (int *)&width, (int *)&height, &comp, 0); + + if (comp == 3) + { + const size_t neededBytes = getSizeBytes(width, height, 1u, 1u, format); + data = reinterpret_cast(malloc(neededBytes)); + RGB8toRGBA8(tmpData, width * 3); + comp = 4; + stbi_image_free(tmpData); + } + else if (comp == 4) + { + data = tmpData; + } + } + if (comp != 4) + { + printf("Did not get correct amount of components!\n"); + return; + } +} +//------------------------------------------------------------------------- +CpuImage::~CpuImage() +{ + if (data) + { + stbi_image_free(data); + data = nullptr; + } +} +//------------------------------------------------------------------------- +size_t CpuImage::getBytesPerPixel(gli::format format) +{ + if (gli::is_compressed(format)) + return 0; + + int componentSize = 1; + + switch (format) + { + case gli::FORMAT_RGBA8_UINT_PACK32: + case gli::FORMAT_RG32_UINT_PACK32: + case gli::FORMAT_RGBA32_UINT_PACK32: + componentSize = 4; + break; + } + + // TODO: fix + return gli::component_count(format) * componentSize; +} +//------------------------------------------------------------------------- +size_t CpuImage::getSizeBytes(uint32_t width, uint32_t height, uint32_t depth, uint32_t slices, gli::format format, + uint32_t rowAlignment) +{ + size_t retVal; + + if (gli::is_compressed(format)) + { + retVal = ((width + 3u) / 4u) * ((height + 3u) / 4u) * gli::block_size(format) * depth * slices; + } + else + { + retVal = width * getBytesPerPixel(format); + retVal = alignToNextMultiple(retVal, (size_t)rowAlignment); + + retVal *= height * depth * slices; + } + + return retVal; +} +//------------------------------------------------------------------------- +void CpuImage::RGB8toRGBA8(uint8_t const *__restrict srcData, size_t bytesPerRow) +{ + const size_t imgHeight = height; + const size_t imgWidth = width; + for (size_t y = 0u; y < imgHeight; ++y) + { + uint8_t *__restrict dstData = reinterpret_cast(data) + (imgHeight - y - 1u) * imgWidth * 4u; + + for (size_t x = 0u; x < imgWidth; ++x) + { + const uint8_t r = *srcData++; + const uint8_t g = *srcData++; + const uint8_t b = *srcData++; + *dstData++ = r; + *dstData++ = g; + *dstData++ = b; + *dstData++ = 0xff; + } + + // dstData's bytePerRow is already multiple of 4 (our natural alignment) + srcData += bytesPerRow - imgWidth * 3u; + } +} +//------------------------------------------------------------------------- +void CpuImage::R32toRGBA32(uint32_t const *__restrict srcData, size_t bytesPerRow) +{ + const size_t imgWidth = width; + const size_t imgHeight = height; + for (size_t y = 0u; y < imgHeight; ++y) + { + uint32_t *__restrict dstData = reinterpret_cast(data) + (imgHeight - y - 1u) * imgWidth * 4u; + for (size_t x = 0u; x < (bytesPerRow >> 2u); ++x) + { + const uint32_t value = *srcData++; + *dstData++ = value; + *dstData++ = value; + *dstData++ = value; + *dstData++ = 0x3f800000; // 1.0f + } + } +} +//------------------------------------------------------------------------- +void CpuImage::RGB32toRGBA32(uint32_t const *__restrict srcData, size_t bytesPerRow) +{ + const size_t imgWidth = width; + const size_t imgHeight = height; + for (size_t y = 0u; y < imgHeight; ++y) + { + uint32_t *__restrict dstData = reinterpret_cast(data) + (imgHeight - y - 1u) * imgWidth * 4u; + for (size_t x = 0u; x < (bytesPerRow >> 2u) / 3u; ++x) + { + const uint32_t b = *srcData++; + const uint32_t g = *srcData++; + const uint32_t r = *srcData++; + *dstData++ = r; + *dstData++ = g; + *dstData++ = b; + *dstData++ = 0x3f800000; // 1.0f + } + } +} +//------------------------------------------------------------------------- +template void CpuImage::BGRANtoRGBAN(T const *__restrict srcData, size_t bytesPerRow) +{ + const size_t imgWidth = width; + const size_t imgHeight = height; + for (size_t y = 0u; y < imgHeight; ++y) + { + T *__restrict dstData = reinterpret_cast(data) + (imgHeight - y - 1u) * imgWidth * 4u; + + for (size_t x = 0u; x < imgWidth; ++x) + { + const T b = *srcData++; + const T g = *srcData++; + const T r = *srcData++; + const T a = *srcData++; + *dstData++ = r; + *dstData++ = g; + *dstData++ = b; + *dstData++ = a; + } + + // dstData's bytePerRow is already multiple of 4 (our natural alignment) + srcData += bytesPerRow - imgWidth * 4u * sizeof(T); + } +} +} // namespace betsy diff --git a/src/betsy/ETC1_tables.inl b/src/lib/ETC1_tables.inl similarity index 100% rename from src/betsy/ETC1_tables.inl rename to src/lib/ETC1_tables.inl diff --git a/src/betsy/Encoder.cpp b/src/lib/Encoder.cpp similarity index 100% rename from src/betsy/Encoder.cpp rename to src/lib/Encoder.cpp diff --git a/src/lib/File/FormatKTX.cpp b/src/lib/File/FormatKTX.cpp new file mode 100644 index 0000000..b1a171f --- /dev/null +++ b/src/lib/File/FormatKTX.cpp @@ -0,0 +1,90 @@ + +#include "betsy/File/FormatKTX.h" + +#include +#include + +#include + +#include "betsy/GL/EncoderGL.h" + +#define KTX_ENDIAN_REF (0x04030201) +#define KTX_ENDIAN_REF_REV (0x01020304) + +namespace betsy +{ +template static inline void write(std::ofstream &fout, const T &v) +{ + fout.write(reinterpret_cast(&v), sizeof(T)); +} + +struct KTXHeader +{ + uint8_t identifier[12]; + uint32_t endianness; + uint32_t glType; + uint32_t glTypeSize; + uint32_t glFormat; + uint32_t glInternalFormat; + uint32_t glBaseInternalFormat; + uint32_t pixelWidth; + uint32_t pixelHeight; + uint32_t pixelDepth; + uint32_t numberOfArrayElements; + uint32_t numberOfFaces; + uint32_t numberOfMipmapLevels; + uint32_t bytesOfKeyValueData; +}; +//------------------------------------------------------------------------- +void FormatKTX::save(const char *fullpath, const CpuImage &cpuImage) +{ + std::ofstream file(fullpath, std::ios::trunc); + + if (!file.is_open()) + { + fprintf(stderr, "Could not save to '%s' Check write access and whether the disk is full\n", fullpath); + return; + } + + KTXHeader header; + memset(&header, 0, sizeof(header)); + const uint8_t c_KtxFileIdentifier[12] = {0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A}; + memcpy(header.identifier, c_KtxFileIdentifier, sizeof(c_KtxFileIdentifier)); + + header.endianness = KTX_ENDIAN_REF; + header.pixelWidth = cpuImage.width; + header.pixelHeight = cpuImage.height; + header.pixelDepth = 0u; + header.numberOfArrayElements = 0u; + header.numberOfFaces = 1u; + header.numberOfMipmapLevels = 1u; + + if (!gli::is_compressed(cpuImage.format)) + { + header.glInternalFormat = EncoderGL::get(cpuImage.format); + header.glBaseInternalFormat = EncoderGL::getBaseFormat(cpuImage.format); + EncoderGL::getFormatAndType(cpuImage.format, header.glFormat, header.glType); + header.glTypeSize = static_cast(CpuImage::getBytesPerPixel(cpuImage.format)); + } + else + { + header.glInternalFormat = EncoderGL::get(cpuImage.format); + header.glBaseInternalFormat = EncoderGL::getBaseFormat(cpuImage.format); + header.glFormat = 0u; + header.glType = 0u; + header.glTypeSize = 1u; + } + + write(file, header); + + // Now deal with the data + for (uint32_t level = 0u; level < header.numberOfMipmapLevels; ++level) + { + const size_t imageSize = CpuImage::getSizeBytes(header.pixelWidth, header.pixelHeight, 1u, 1u, cpuImage.format, 4u); + write(file, static_cast(imageSize)); + + for (uint32_t face = 0u; face < header.numberOfFaces; ++face) + file.write(reinterpret_cast(cpuImage.data), imageSize); + } +} +} // namespace betsy diff --git a/src/lib/GL/EncoderBC1.cpp b/src/lib/GL/EncoderBC1.cpp new file mode 100644 index 0000000..c8f33b1 --- /dev/null +++ b/src/lib/GL/EncoderBC1.cpp @@ -0,0 +1,184 @@ + +#include "betsy/GL/EncoderBC1.h" + +#include +#include +#include +#include + +#include "../BC1_tables.inl" +#include "betsy/CpuImage.h" +#include "betsy/GL/Shaders.h" + +namespace betsy +{ +struct Bc1Tables +{ + float oMatch5[256][2]; + float oMatch6[256][2]; +}; + +static Bc1Tables getBc1Tables() +{ + Bc1Tables tables; + + for (size_t i = 0u; i < 256; ++i) + { + tables.oMatch5[i][0] = static_cast(stb__OMatch5[i][0]); + tables.oMatch5[i][1] = static_cast(stb__OMatch5[i][1]); + tables.oMatch6[i][0] = static_cast(stb__OMatch6[i][0]); + tables.oMatch6[i][1] = static_cast(stb__OMatch6[i][1]); + } + + return tables; +} + +EncoderBC1::EncoderBC1() + : m_width(0), m_height(0), m_srcTexture(0), m_bc1TargetRes(0), m_bc4TargetRes(0), m_stitchedTarget(0), + m_dstTexture(0), m_bc1TablesSsbo(0) +{ +} +//------------------------------------------------------------------------- +EncoderBC1::~EncoderBC1() +{ + assert(!m_srcTexture && "deinitResources not called!"); +} +//------------------------------------------------------------------------- +void EncoderBC1::initResources(const CpuImage &srcImage, const bool useBC3, const bool bDither) +{ + m_width = srcImage.width; + m_height = srcImage.height; + + const auto srcFormat = srcImage.format; + + m_srcTexture = createTexture(TextureParams(m_width, m_height, srcFormat, "m_srcTexture")); + + m_bc1TargetRes = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::format::FORMAT_RG32_UINT_PACK32, + "m_bc1TargetRes", TextureFlags::Uav)); + m_dstTexture = createTexture( + TextureParams(m_width, m_height, + useBC3 ? gli::format::FORMAT_RGBA_DXT5_UNORM_BLOCK16 : gli::format::FORMAT_RGBA_DXT1_UNORM_BLOCK8, + "m_dstTexture")); + + { + Bc1Tables bc1Tables = getBc1Tables(); + m_bc1TablesSsbo = createUavBuffer(sizeof(Bc1Tables), &bc1Tables); + } + + m_bc1Pso = createComputePso(bDither ? bc1_dither_glsl : bc1_glsl); + + if (useBC3) + { + m_bc4TargetRes = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, + "m_bc4TargetRes", TextureFlags::Uav)); + m_stitchedTarget = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RGBA32_UINT_PACK32, + "m_stitchedTarget", TextureFlags::Uav)); + m_bc4Pso = createComputePso(bc4_glsl); + m_stitchPso = createComputePso(etc2_rgba_stitch_glsl); + } + + StagingTexture stagingTex = createStagingTexture(m_width, m_height, srcImage.format, true); + memcpy(stagingTex.data, srcImage.data, stagingTex.sizeBytes); + uploadStagingTexture(stagingTex, m_srcTexture); + destroyStagingTexture(stagingTex); +} +//------------------------------------------------------------------------- +void EncoderBC1::deinitResources() +{ + if (m_dstTexture) + { + destroyTexture(m_dstTexture); + m_dstTexture = 0; + } + if (m_stitchedTarget) + { + destroyTexture(m_stitchedTarget); + m_stitchedTarget = 0; + } + destroyTexture(m_bc1TargetRes); + m_bc1TargetRes = 0; + destroyTexture(m_srcTexture); + m_srcTexture = 0; + + if (m_downloadStaging.bufferName) + destroyStagingTexture(m_downloadStaging); + + destroyPso(m_bc1Pso); + if (m_stitchPso.computePso) + destroyPso(m_stitchPso); +} +//------------------------------------------------------------------------- +void EncoderBC1::execute01() +{ + bindTexture(0u, m_srcTexture); + bindComputePso(m_bc1Pso); + bindUav(0u, m_bc1TargetRes, gli::FORMAT_RG32_UINT_PACK32, ResourceAccess::Write); + bindUavBuffer(1u, m_bc1TablesSsbo, 0u, sizeof(Bc1Tables)); + + glUniform1ui(0, 2u); + + glDispatchCompute(alignToNextMultiple(m_width, (8u * 4u)) / (8u * 4u), + alignToNextMultiple(m_height, (8u * 4u)) / (8u * 4u), 1u); + + if (m_bc4TargetRes) + { + // Compress Alpha too (using BC4) + bindComputePso(m_bc4Pso); + bindUav(0u, m_bc4TargetRes, gli::FORMAT_RG32_UINT_PACK32, ResourceAccess::Write); + + // p_channelIdx, p_useSNorm + glUniform2f(0, 3.0f, 0.0f); + + glDispatchCompute(1u, // + alignToNextMultiple(m_width, 16u) / 16u, alignToNextMultiple(m_height, 16u) / 16u); + } +} +//------------------------------------------------------------------------- +void EncoderBC1::execute02() +{ + if (!m_bc4TargetRes) + return; // This step is only relevant when doing BC3 + + glMemoryBarrier(GL_TEXTURE_FETCH_BARRIER_BIT); + bindTexture(0u, m_bc1TargetRes); + bindTexture(1u, m_bc4TargetRes); + bindUav(0u, m_stitchedTarget, gli::FORMAT_RGBA32_UINT_PACK32, ResourceAccess::Write); + bindComputePso(m_stitchPso); + glDispatchCompute(alignToNextMultiple(m_width, 32u) / 32u, alignToNextMultiple(m_height, 32u) / 32u, 1u); +} +//------------------------------------------------------------------------- +void EncoderBC1::execute03() +{ + // It's unclear which of these 2 barrier bits GL wants in order for glCopyImageSubData to work + glMemoryBarrier(GL_TEXTURE_UPDATE_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT); + + // Copy "8x8" PFG_RG32_UINT -> 32x32 PFG_BC1_UNORM + // Copy "8x8" PFG_RGBA32_UINT -> 32x32 PFG_BC3_UNORM + glCopyImageSubData(m_stitchedTarget ? m_stitchedTarget : m_bc1TargetRes, // + GL_TEXTURE_2D, 0, 0, 0, 0, // + m_dstTexture, GL_TEXTURE_2D, 0, 0, 0, 0, // + (GLsizei)(getBlockWidth()), (GLsizei)(getBlockHeight()), 1); +} +//------------------------------------------------------------------------- +void EncoderBC1::startDownload() +{ + glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT); + + if (m_downloadStaging.bufferName) + destroyStagingTexture(m_downloadStaging); + m_downloadStaging = + createStagingTexture(getBlockWidth(), getBlockHeight(), + m_stitchedTarget ? gli::FORMAT_RGBA32_UINT_PACK32 : gli::FORMAT_RG32_UINT_PACK32, false); + downloadStagingTexture(m_stitchedTarget ? m_stitchedTarget : m_bc1TargetRes, m_downloadStaging); +} +//------------------------------------------------------------------------- +void EncoderBC1::downloadTo(CpuImage &outImage) +{ + glFinish(); + outImage.width = m_width; + outImage.height = m_height; + outImage.format = + m_stitchedTarget ? gli::format::FORMAT_RGBA_DXT5_UNORM_BLOCK16 : gli::format::FORMAT_RGBA_DXT1_UNORM_BLOCK8; + outImage.data = reinterpret_cast(m_downloadStaging.data); +} +} // namespace betsy diff --git a/src/lib/GL/EncoderBC4.cpp b/src/lib/GL/EncoderBC4.cpp new file mode 100644 index 0000000..29f392d --- /dev/null +++ b/src/lib/GL/EncoderBC4.cpp @@ -0,0 +1,166 @@ + +#include "betsy/GL/EncoderBC4.h" + +#include +#include +#include + +#include "betsy/CpuImage.h" +#include "betsy/GL/Shaders.h" + +namespace betsy +{ +EncoderBC4::EncoderBC4() + : m_width(0), m_height(0), m_srcTexture(0), m_stitchedTarget(0), m_dstTexture(0), m_encodeSNorm(false) +{ + memset(m_bc4TargetRes, 0, sizeof(m_bc4TargetRes)); +} +//------------------------------------------------------------------------- +EncoderBC4::~EncoderBC4() +{ + assert(!m_srcTexture && "deinitResources not called!"); +} +//------------------------------------------------------------------------- +void EncoderBC4::initResources(const CpuImage &srcImage, const bool redGreen, const bool encodeSNorm) +{ + m_width = srcImage.width; + m_height = srcImage.height; + + m_encodeSNorm = encodeSNorm; + + const auto srcFormat = srcImage.format; + + m_srcTexture = createTexture(TextureParams(m_width, m_height, srcFormat, "m_srcTexture")); + + m_bc4TargetRes[0] = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, + "m_bc4TargetRes[0]", TextureFlags::Uav)); + if (redGreen) + { + m_bc4TargetRes[1] = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, + "m_bc4TargetRes[1]", TextureFlags::Uav)); + } + + m_bc4Pso = createComputePso(bc4_glsl); + + if (redGreen) + { + m_stitchedTarget = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RGBA32_UINT_PACK32, + "m_stitchedTarget", TextureFlags::Uav)); + m_stitchPso = createComputePso(etc2_rgba_stitch_glsl); + + m_dstTexture = createTexture(TextureParams( + m_width, m_height, m_encodeSNorm ? gli::FORMAT_RG_ATI2N_SNORM_BLOCK16 : gli::FORMAT_RG_ATI2N_UNORM_BLOCK16, + "m_dstTexture")); + } + else + { + m_dstTexture = createTexture(TextureParams( + m_width, m_height, m_encodeSNorm ? gli::FORMAT_R_ATI1N_SNORM_BLOCK8 : gli::FORMAT_R_ATI1N_UNORM_BLOCK8, + "m_dstTexture")); + } + + StagingTexture stagingTex = createStagingTexture(m_width, m_height, srcImage.format, true); + memcpy(stagingTex.data, srcImage.data, stagingTex.sizeBytes); + uploadStagingTexture(stagingTex, m_srcTexture); + destroyStagingTexture(stagingTex); +} +//------------------------------------------------------------------------- +void EncoderBC4::deinitResources() +{ + if (m_dstTexture) + { + destroyTexture(m_dstTexture); + m_dstTexture = 0; + } + if (m_stitchedTarget) + { + destroyTexture(m_stitchedTarget); + m_stitchedTarget = 0; + } + for (size_t i = 0u; i < 2u; ++i) + { + if (m_bc4TargetRes[i]) + { + destroyTexture(m_bc4TargetRes[i]); + m_bc4TargetRes[i] = 0; + } + } + destroyTexture(m_srcTexture); + m_srcTexture = 0; + + if (m_downloadStaging.bufferName) + destroyStagingTexture(m_downloadStaging); + + destroyPso(m_bc4Pso); + if (m_stitchPso.computePso) + destroyPso(m_stitchPso); +} +//------------------------------------------------------------------------- +void EncoderBC4::execute01() +{ + bindTexture(0u, m_srcTexture); + bindComputePso(m_bc4Pso); + + const size_t numChannels = m_bc4TargetRes[1] ? 2u : 1u; + for (size_t i = 0u; i < numChannels; ++i) + { + bindUav(0u, m_bc4TargetRes[i], gli::FORMAT_RG32_UINT_PACK32, ResourceAccess::Write); + + // p_channelIdx, p_useSNorm + glUniform2f(0, i == 0u ? 0.0f : 1.0f, m_encodeSNorm ? 1.0f : 0.0f); + + glDispatchCompute(1u, // + alignToNextMultiple(m_width, 16u) / 16u, alignToNextMultiple(m_height, 16u) / 16u); + } +} +//------------------------------------------------------------------------- +void EncoderBC4::execute02() +{ + if (!m_bc4TargetRes[1]) + { + // This step is only relevant when doing BC5 + return; + } + + glMemoryBarrier(GL_TEXTURE_FETCH_BARRIER_BIT); + bindTexture(0u, m_bc4TargetRes[1]); + bindTexture(1u, m_bc4TargetRes[0]); + bindUav(0u, m_stitchedTarget, gli::FORMAT_RGBA32_UINT_PACK32, ResourceAccess::Write); + bindComputePso(m_stitchPso); + glDispatchCompute(alignToNextMultiple(m_width, 32u) / 32u, alignToNextMultiple(m_height, 32u) / 32u, 1u); +} +//------------------------------------------------------------------------- +void EncoderBC4::execute03() +{ + // It's unclear which of these 2 barrier bits GL wants in order for glCopyImageSubData to work + glMemoryBarrier(GL_TEXTURE_UPDATE_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT); + + // Copy "8x8" PFG_RG32_UINT -> 32x32 PFG_BC4_UNORM/SNORM + // Copy "8x8" PFG_RGBA32_UINT -> 32x32 PFG_BC5_UNORM/SNORM + glCopyImageSubData(m_bc4TargetRes[1] ? m_stitchedTarget : m_bc4TargetRes[0], // + GL_TEXTURE_2D, 0, 0, 0, 0, // + m_dstTexture, GL_TEXTURE_2D, 0, 0, 0, 0, // + (GLsizei)(getBlockWidth()), (GLsizei)(getBlockHeight()), 1); +} +//------------------------------------------------------------------------- +void EncoderBC4::startDownload() +{ + glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT); + + if (m_downloadStaging.bufferName) + destroyStagingTexture(m_downloadStaging); + m_downloadStaging = + createStagingTexture(getBlockWidth(), getBlockHeight(), + m_bc4TargetRes[1] ? gli::FORMAT_RGBA32_UINT_PACK32 : gli::FORMAT_RG32_UINT_PACK32, false); + downloadStagingTexture(m_bc4TargetRes[1] ? m_stitchedTarget : m_bc4TargetRes[0], m_downloadStaging); +} +//------------------------------------------------------------------------- +void EncoderBC4::downloadTo(CpuImage &outImage) +{ + glFinish(); + outImage.width = m_width; + outImage.height = m_height; + outImage.format = m_bc4TargetRes[1] ? gli::FORMAT_RG_ATI2N_UNORM_BLOCK16 : gli::FORMAT_R_ATI1N_UNORM_BLOCK8; + outImage.data = reinterpret_cast(m_downloadStaging.data); +} +} // namespace betsy diff --git a/src/lib/GL/EncoderBC6H.cpp b/src/lib/GL/EncoderBC6H.cpp new file mode 100644 index 0000000..88e73d9 --- /dev/null +++ b/src/lib/GL/EncoderBC6H.cpp @@ -0,0 +1,95 @@ + +#include "betsy/GL/EncoderBC6H.h" + +#include +#include + +#include "betsy/CpuImage.h" +#include "betsy/GL/Shaders.h" + +namespace betsy +{ +EncoderBC6H::EncoderBC6H() : m_srcTexture(0), m_compressTargetRes(0), m_dstTexture(0) +{ +} +//------------------------------------------------------------------------- +EncoderBC6H::~EncoderBC6H() +{ + assert(!m_srcTexture && "deinitResources not called!"); +} +//------------------------------------------------------------------------- +void EncoderBC6H::initResources(const CpuImage &srcImage) +{ + m_width = srcImage.width; + m_height = srcImage.height; + + m_srcTexture = createTexture(TextureParams(m_width, m_height, srcImage.format, "m_srcTexture")); + + m_compressTargetRes = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RGBA32_UINT_PACK32, + "m_compressTargetRes", TextureFlags::Uav)); + + m_dstTexture = createTexture(TextureParams(m_width, m_height, gli::FORMAT_RGB_BP_UFLOAT_BLOCK16, "m_dstTexture")); + + m_compressPso = createComputePso(bc6h_glsl); + + StagingTexture stagingTex = createStagingTexture(m_width, m_height, srcImage.format, true); + memcpy(stagingTex.data, srcImage.data, stagingTex.sizeBytes); + uploadStagingTexture(stagingTex, m_srcTexture); +} +//------------------------------------------------------------------------- +void EncoderBC6H::deinitResources() +{ + destroyTexture(m_dstTexture); + m_dstTexture = 0; + destroyTexture(m_compressTargetRes); + m_compressTargetRes = 0; + destroyTexture(m_srcTexture); + m_srcTexture = 0; + + if (m_downloadStaging.bufferName) + destroyStagingTexture(m_downloadStaging); + + destroyPso(m_compressPso); +} +//------------------------------------------------------------------------- +void EncoderBC6H::execute01() +{ + bindTexture(0u, m_srcTexture); + bindUav(0u, m_compressTargetRes, gli::FORMAT_RGBA32_UINT_PACK32, ResourceAccess::Write); + bindComputePso(m_compressPso); + + glUniform2f(0, 1.0f / m_width, 1.0f / m_height); + + glDispatchCompute(alignToNextMultiple(m_width, 32u) / 32u, alignToNextMultiple(m_height, 32u) / 32u, 1u); +} +//------------------------------------------------------------------------- +void EncoderBC6H::execute02() +{ + // It's unclear which of these 2 barrier bits GL wants in order for glCopyImageSubData to work + glMemoryBarrier(GL_TEXTURE_UPDATE_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT); + + // Copy "8x8" PFG_RGBA32_UINT -> 32x32 PFG_BC6H_UF16 + glCopyImageSubData(m_compressTargetRes, GL_TEXTURE_2D, 0, 0, 0, 0, // + m_dstTexture, GL_TEXTURE_2D, 0, 0, 0, 0, // + (GLsizei)(getBlockWidth()), (GLsizei)(getBlockHeight()), 1); +} +//------------------------------------------------------------------------- +void EncoderBC6H::startDownload() +{ + glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT); + + if (m_downloadStaging.bufferName) + destroyStagingTexture(m_downloadStaging); + m_downloadStaging = createStagingTexture(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, false); + downloadStagingTexture(m_compressTargetRes, m_downloadStaging); +} +//------------------------------------------------------------------------- +void EncoderBC6H::downloadTo(CpuImage &outImage) +{ + glFinish(); + outImage.width = m_width; + outImage.height = m_height; + outImage.format = gli::FORMAT_RGB_BP_UFLOAT_BLOCK16; + outImage.data = reinterpret_cast(m_downloadStaging.data); +} +} // namespace betsy diff --git a/src/lib/GL/EncoderEAC.cpp b/src/lib/GL/EncoderEAC.cpp new file mode 100644 index 0000000..369024d --- /dev/null +++ b/src/lib/GL/EncoderEAC.cpp @@ -0,0 +1,133 @@ + +#include "betsy/GL/EncoderEAC.h" + +#include +#include +#include + +#include "betsy/CpuImage.h" +#include "betsy/GL/Shaders.h" + +namespace betsy +{ +EncoderEAC::EncoderEAC() : m_width(0), m_height(0), m_srcTexture(0), m_stitchedTarget(0) +{ + memset(m_eacTargetRes, 0, sizeof(m_eacTargetRes)); +} +//------------------------------------------------------------------------- +EncoderEAC::~EncoderEAC() +{ + assert(!m_srcTexture && "deinitResources not called!"); +} +//------------------------------------------------------------------------- +void EncoderEAC::initResources(const CpuImage &srcImage, const bool rg11) +{ + m_width = srcImage.width; + m_height = srcImage.height; + + const auto srcFormat = srcImage.format; + + m_srcTexture = createTexture(TextureParams(m_width, m_height, srcFormat, "m_srcTexture")); + + m_eacTargetRes[0] = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, + "m_eacTargetRes[0]", TextureFlags::Uav)); + if (rg11) + { + m_eacTargetRes[1] = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, + "m_eacTargetRes[1]", TextureFlags::Uav)); + } + + m_eacPso = createComputePso(eac_r11_glsl); + + if (rg11) + { + m_stitchedTarget = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RGBA32_UINT_PACK32, + "m_stitchedTarget", TextureFlags::Uav)); + m_stitchPso = createComputePso(etc2_rgba_stitch_glsl); + } + + StagingTexture stagingTex = createStagingTexture(m_width, m_height, srcImage.format, true); + memcpy(stagingTex.data, srcImage.data, stagingTex.sizeBytes); + uploadStagingTexture(stagingTex, m_srcTexture); + destroyStagingTexture(stagingTex); +} +//------------------------------------------------------------------------- +void EncoderEAC::deinitResources() +{ + if (m_stitchedTarget) + { + destroyTexture(m_stitchedTarget); + m_stitchedTarget = 0; + } + for (size_t i = 0u; i < 2u; ++i) + { + if (m_eacTargetRes[i]) + { + destroyTexture(m_eacTargetRes[i]); + m_eacTargetRes[i] = 0; + } + } + destroyTexture(m_srcTexture); + m_srcTexture = 0; + + if (m_downloadStaging.bufferName) + destroyStagingTexture(m_downloadStaging); + + destroyPso(m_eacPso); + if (m_stitchPso.computePso) + destroyPso(m_stitchPso); +} +//------------------------------------------------------------------------- +void EncoderEAC::execute01() +{ + bindTexture(0u, m_srcTexture); + bindComputePso(m_eacPso); + + const size_t numChannels = m_eacTargetRes[1] ? 2u : 1u; + for (size_t i = 0u; i < numChannels; ++i) + { + bindUav(0u, m_eacTargetRes[i], gli::FORMAT_RG32_UINT_PACK32, ResourceAccess::Write); + + glUniform1f(0, i == 0u ? 0.0f : 1.0f); + + glDispatchCompute(alignToNextMultiple(m_width, 4u) / 4u, alignToNextMultiple(m_height, 4u) / 4u, 1u); + } +} +//------------------------------------------------------------------------- +void EncoderEAC::execute02() +{ + if (!m_eacTargetRes[1]) + { + // This step is only relevant when doing RG11 + return; + } + + glMemoryBarrier(GL_TEXTURE_FETCH_BARRIER_BIT); + bindTexture(0u, m_eacTargetRes[1]); + bindTexture(1u, m_eacTargetRes[0]); + bindUav(0u, m_stitchedTarget, gli::FORMAT_RGBA32_UINT_PACK32, ResourceAccess::Write); + bindComputePso(m_stitchPso); + glDispatchCompute(alignToNextMultiple(m_width, 32u) / 32u, alignToNextMultiple(m_height, 32u) / 32u, 1u); +} +//------------------------------------------------------------------------- +void EncoderEAC::startDownload() +{ + glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT); + + if (m_downloadStaging.bufferName) + destroyStagingTexture(m_downloadStaging); + m_downloadStaging = + createStagingTexture(getBlockWidth(), getBlockHeight(), + m_eacTargetRes[1] ? gli::FORMAT_RGBA32_UINT_PACK32 : gli::FORMAT_RG32_UINT_PACK32, false); + downloadStagingTexture(m_eacTargetRes[1] ? m_stitchedTarget : m_eacTargetRes[0], m_downloadStaging); +} +//------------------------------------------------------------------------- +void EncoderEAC::downloadTo(CpuImage &outImage) +{ + glFinish(); + outImage.width = m_width; + outImage.height = m_height; + outImage.format = m_eacTargetRes[1] ? gli::FORMAT_R_EAC_UNORM_BLOCK8 : gli::FORMAT_RG_EAC_UNORM_BLOCK16; + outImage.data = reinterpret_cast(m_downloadStaging.data); +} +} // namespace betsy diff --git a/src/lib/GL/EncoderETC1.cpp b/src/lib/GL/EncoderETC1.cpp new file mode 100644 index 0000000..caf9267 --- /dev/null +++ b/src/lib/GL/EncoderETC1.cpp @@ -0,0 +1,336 @@ +#define NOMINMAX + +#include "betsy/GL/EncoderETC1.h" + +#include +#include +#include + +#include +#include + +#include "../ETC1_tables.inl" +#include "betsy/CpuImage.h" +#include "betsy/GL/Shaders.h" + +namespace betsy +{ +static size_t etc1_decode_value(size_t diff, size_t inten, size_t selector, size_t packed_c) +{ + int c; + if (diff) + c = int((packed_c >> 2u) | (packed_c << 3u)); + else + c = int(packed_c | (packed_c << 4u)); + c += c_etc1_inten_tables[inten][selector]; + size_t retVal; + retVal = static_cast(std::max(c, 0)); + retVal = std::min(retVal, 255u); + return retVal; +} + +EncoderETC1::EncoderETC1() + : m_srcTexture(0), m_ditheredTexture(0), m_compressTargetRes(0), m_etc1Error(0), m_eacTargetRes(0), + m_stitchedTarget(0), m_dstTexture(0), m_etc1TablesSsbo(0) +{ +} +//------------------------------------------------------------------------- +EncoderETC1::~EncoderETC1() +{ + assert(!m_srcTexture && "deinitResources not called!"); +} +//------------------------------------------------------------------------- +size_t EncoderETC1::getEtc1TablesSize() +{ + return sizeof(float) * 2u * 8u * 4u * 256u + sizeof(uint32_t) * (2u * 33u + 254 * 11u); +} +//------------------------------------------------------------------------- +uint8_t *EncoderETC1::createFilledEtc1Tables() +{ + uint8_t *data = new uint8_t[getEtc1TablesSize()]; + + float *asFloat = reinterpret_cast(data); + + for (size_t diff = 0u; diff < 2u; ++diff) + { + const size_t limit = diff ? 32u : 16u; + + for (size_t inten = 0; inten < 8; ++inten) + { + for (size_t selector = 0u; selector < 4u; ++selector) + { + const size_t inverse_table_index = diff + (inten << 1u) + (selector << 4u); + for (size_t color = 0u; color < 256u; ++color) + { + uint32_t best_error = std::numeric_limits::max(); + size_t best_packed_c = 0u; + for (size_t packed_c = 0; packed_c < limit; ++packed_c) + { + const size_t v = etc1_decode_value(diff, inten, selector, packed_c); + uint32_t err = static_cast(abs(static_cast(v - color))); + if (err < best_error) + { + best_error = err; + best_packed_c = packed_c; + if (!best_error) + break; + } + } + asFloat[inverse_table_index * 256u + color] = static_cast(best_packed_c | (best_error << 8u)); + } + } + } + } + + const size_t startIdx = sizeof(float) * 2u * 8u * 4u * 256u; + memcpy(data + startIdx, c_color8_to_etc_block_config_0_255, sizeof(c_color8_to_etc_block_config_0_255)); + memcpy(data + startIdx + sizeof(c_color8_to_etc_block_config_0_255), c_color8_to_etc_block_config_1_to_254, + sizeof(c_color8_to_etc_block_config_1_to_254)); + + return data; +} +//------------------------------------------------------------------------- +bool EncoderETC1::hasAlpha() const +{ + return m_eacTargetRes != 0; +} +//------------------------------------------------------------------------- +void EncoderETC1::initResources(const CpuImage &srcImage, const bool bCompressAlpha, const bool bDither, + const bool bForEtc2) +{ + m_width = srcImage.width; + m_height = srcImage.height; + + const auto srcFormat = srcImage.format; + + m_srcTexture = createTexture(TextureParams(m_width, m_height, srcFormat, "m_srcTexture")); + + if (bDither) + { + m_ditheredTexture = createTexture( + TextureParams(m_width, m_height, gli::FORMAT_RGBA8_UNORM_PACK8, "m_ditheredTexture", TextureFlags::Uav)); + m_ditherPso = createComputePso(dither555_glsl); + } + else + { + m_ditheredTexture = m_srcTexture; + } + + m_compressTargetRes = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, + "m_compressTargetRes", TextureFlags::Uav)); + + if (bForEtc2) + { + m_etc1Error = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_R32_SFLOAT_PACK32, + "m_etc1Error", TextureFlags::Uav)); + } + + m_dstTexture = createTexture(TextureParams(m_width, m_height, gli::FORMAT_RGB_ETC2_UNORM_BLOCK8, "m_dstTexture")); + + { + uint8_t *filledTables = createFilledEtc1Tables(); + m_etc1TablesSsbo = createUavBuffer(getEtc1TablesSize(), filledTables); + delete[] filledTables; + } + + m_compressPso = createComputePso(bForEtc2 ? etc1_with_error_glsl : etc1_glsl); + + if (bCompressAlpha) + { + m_eacTargetRes = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, + "m_eacTargetRes", TextureFlags::Uav)); + m_stitchedTarget = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RGBA32_UINT_PACK32, + "m_stitchedTarget", TextureFlags::Uav)); + m_eacPso = createComputePso(eac_glsl); + + // ETC2 codec does its own stitching + if (!bForEtc2) + m_stitchPso = createComputePso(etc2_rgba_stitch_glsl); + } + + StagingTexture stagingTex = createStagingTexture(m_width, m_height, srcImage.format, true); + memcpy(stagingTex.data, srcImage.data, stagingTex.sizeBytes); + uploadStagingTexture(stagingTex, m_srcTexture); + destroyStagingTexture(stagingTex); +} +//------------------------------------------------------------------------- +void EncoderETC1::initResources(const CpuImage &srcImage, const bool bCompressAlpha, const bool bDither) +{ + initResources(srcImage, bCompressAlpha, bDither, false); +} +//------------------------------------------------------------------------- +void EncoderETC1::deinitResources() +{ + destroyUavBuffer(m_etc1TablesSsbo); + m_etc1TablesSsbo = 0; + + destroyTexture(m_dstTexture); + m_dstTexture = 0; + if (m_etc1Error) + { + destroyTexture(m_etc1Error); + m_etc1Error = 0; + } + destroyTexture(m_compressTargetRes); + m_compressTargetRes = 0; + if (m_eacTargetRes) + { + destroyTexture(m_stitchedTarget); + m_stitchedTarget = 0; + + destroyTexture(m_eacTargetRes); + m_eacTargetRes = 0; + } + if (m_ditheredTexture != m_srcTexture) + { + destroyTexture(m_ditheredTexture); + m_ditheredTexture = 0; + destroyPso(m_ditherPso); + } + + destroyTexture(m_srcTexture); + m_srcTexture = 0; + + if (m_downloadStaging.bufferName) + destroyStagingTexture(m_downloadStaging); + + if (m_eacPso.computePso) + { + destroyPso(m_stitchPso); + destroyPso(m_eacPso); + } + destroyPso(m_compressPso); +} +//------------------------------------------------------------------------- +void EncoderETC1::execute00() +{ + if (m_ditheredTexture == m_srcTexture) + return; + + bindTexture(0u, m_srcTexture); + bindUav(0u, m_ditheredTexture, gli::FORMAT_RGBA8_UNORM_PACK8, ResourceAccess::Write); + bindComputePso(m_ditherPso); + + const uint32_t pixelsPerThreadGroup = 4u * 8u; + glDispatchCompute(alignToNextMultiple(m_width, pixelsPerThreadGroup) / pixelsPerThreadGroup, + alignToNextMultiple(m_height, pixelsPerThreadGroup) / pixelsPerThreadGroup, 1u); + + glMemoryBarrier(GL_TEXTURE_FETCH_BARRIER_BIT); +} +//------------------------------------------------------------------------- +void EncoderETC1::execute01(EncoderETC1::Etc1Quality quality) +{ + bindTexture(0u, m_ditheredTexture); + bindUav(0u, m_compressTargetRes, gli::FORMAT_RG32_UINT_PACK32, ResourceAccess::Write); + bindUavBuffer(1u, m_etc1TablesSsbo, 0u, getEtc1TablesSize()); + if (m_etc1Error) + bindUav(2u, m_etc1Error, gli::FORMAT_R32_SFLOAT_PACK32, ResourceAccess::Write); + bindComputePso(m_compressPso); + + struct Params + { + float quality; + float scanDeltaAbsMin; + float scanDeltaAbsMax; + float maxRefinementTrials; + }; + + Params params; + params.quality = quality; + if (quality == cHighQuality) + { + params.scanDeltaAbsMin = 0; + params.scanDeltaAbsMax = 4; + } + else if (quality == cMediumQuality) + { + params.scanDeltaAbsMin = 0; + params.scanDeltaAbsMax = 1; + } + else + { + params.scanDeltaAbsMin = 0; + params.scanDeltaAbsMax = 0; + } + // params.scanDeltaAbsMin = 0; + // params.scanDeltaAbsMax = 0; + params.maxRefinementTrials = quality == cLowQuality ? 2.0f : 4.0f; + + glUniform4fv(0, 1u, ¶ms.quality); + + glDispatchCompute(1u, // + alignToNextMultiple(m_width, 16u) / 16u, alignToNextMultiple(m_height, 16u) / 16u); + + if (hasAlpha()) + { + // Compress Alpha too (using EAC compressor) + bindTexture(0u, m_srcTexture); + bindUav(0u, m_eacTargetRes, gli::FORMAT_RG32_UINT_PACK32, ResourceAccess::Write); + bindComputePso(m_eacPso); + glDispatchCompute(alignToNextMultiple(m_width, 4u) / 4u, alignToNextMultiple(m_height, 4u) / 4u, 1u); + } +} +//------------------------------------------------------------------------- +void EncoderETC1::execute02() +{ + if (!hasAlpha()) + { + // This step is only relevant when doing ETC2_RGBA + return; + } + + glMemoryBarrier(GL_TEXTURE_FETCH_BARRIER_BIT); + bindTexture(0u, m_compressTargetRes); + bindTexture(1u, m_eacTargetRes); + bindUav(0u, m_stitchedTarget, gli::FORMAT_RGBA32_UINT_PACK32, ResourceAccess::Write); + bindComputePso(m_stitchPso); + glDispatchCompute(alignToNextMultiple(m_width, 32u) / 32u, alignToNextMultiple(m_height, 32u) / 32u, 1u); +} +//------------------------------------------------------------------------- +void EncoderETC1::execute03() +{ + // It's unclear which of these 2 barrier bits GL wants in order for glCopyImageSubData to work + glMemoryBarrier(GL_TEXTURE_UPDATE_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT); + + // Copy "8x8" PFG_RG32_UINT -> 32x32 PFG_ETC1_RGB8_UNORM + glCopyImageSubData(m_compressTargetRes, GL_TEXTURE_2D, 0, 0, 0, 0, // + m_dstTexture, GL_TEXTURE_2D, 0, 0, 0, 0, // + (GLsizei)(getBlockWidth()), (GLsizei)(getBlockHeight()), 1); + + StagingTexture stagingTex = + createStagingTexture(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, false); + downloadStagingTexture(m_compressTargetRes, stagingTex); + glFinish(); + + const uint8_t *result = (const uint8_t *)stagingTex.data; + printf("DUMP START\n"); + for (size_t b = 0u; b < 1u; ++b) + { + for (size_t i = 0u; i < 8u; ++i) + printf("%02X ", result[b * 8u + i]); + printf("\n"); + } + destroyStagingTexture(stagingTex); +} +//------------------------------------------------------------------------- +void EncoderETC1::startDownload() +{ + glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT); + + if (m_downloadStaging.bufferName) + destroyStagingTexture(m_downloadStaging); + m_downloadStaging = + createStagingTexture(getBlockWidth(), getBlockHeight(), + hasAlpha() ? gli::FORMAT_RGBA32_UINT_PACK32 : gli::FORMAT_RG32_UINT_PACK32, false); + downloadStagingTexture(hasAlpha() ? m_stitchedTarget : m_compressTargetRes, m_downloadStaging); +} +//------------------------------------------------------------------------- +void EncoderETC1::downloadTo(CpuImage &outImage) +{ + glFinish(); + outImage.width = m_width; + outImage.height = m_height; + outImage.format = hasAlpha() ? gli::FORMAT_RGBA_ETC2_UNORM_BLOCK8 : gli::FORMAT_RGB_ETC2_UNORM_BLOCK8; + outImage.data = reinterpret_cast(m_downloadStaging.data); +} +} // namespace betsy diff --git a/src/lib/GL/EncoderETC2.cpp b/src/lib/GL/EncoderETC2.cpp new file mode 100644 index 0000000..1e517e4 --- /dev/null +++ b/src/lib/GL/EncoderETC2.cpp @@ -0,0 +1,148 @@ + +#include "betsy/GL/EncoderETC2.h" + +#include + +#include "betsy/CpuImage.h" +#include "betsy/GL/Shaders.h" + +#define TODO_better_barrier + +namespace betsy +{ +EncoderETC2::EncoderETC2() + : m_thModesTargetRes(0), m_thModesError(0), m_thModesC0C1(0), m_pModeTargetRes(0), m_pModeError(0) +{ +} +//------------------------------------------------------------------------- +EncoderETC2::~EncoderETC2() +{ + assert(!m_thModesTargetRes && "deinitResources not called!"); +} +//------------------------------------------------------------------------- +void EncoderETC2::initResources(const CpuImage &srcImage, const bool bCompressAlpha, const bool bDither) +{ + EncoderETC1::initResources(srcImage, bCompressAlpha, bDither, true); + + m_thModesTargetRes = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, + "m_thModesTargetRes", TextureFlags::Uav)); + m_thModesError = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_R32_SFLOAT_PACK32, + "m_thModesError", TextureFlags::Uav)); + m_thModesC0C1 = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, + "m_thModesC0C1", TextureFlags::Uav, 120u)); + + m_pModeTargetRes = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, + "m_pModeTargetRes", TextureFlags::Uav)); + m_pModeError = createTexture(TextureParams(getBlockWidth(), getBlockHeight(), gli::FORMAT_R32_SFLOAT_PACK32, + "m_pModeError", TextureFlags::Uav)); + + m_thModesPso = createComputePso(etc2_th_glsl); + m_thModesFindBestC0C1 = createComputePso(etc2_th_find_best_c0c1_k_means_glsl); + m_pModePso = createComputePso(etc2_p_glsl); + m_stitchPso = createComputePso(bCompressAlpha ? etc2_rgba_selector_glsl : etc2_rgb_selector_glsl); +} +//------------------------------------------------------------------------- +void EncoderETC2::deinitResources() +{ + destroyTexture(m_pModeError); + m_pModeError = 0; + destroyTexture(m_pModeTargetRes); + m_pModeTargetRes = 0; + destroyTexture(m_thModesError); + m_thModesError = 0; + destroyTexture(m_thModesTargetRes); + m_thModesTargetRes = 0; + destroyPso(m_pModePso); + destroyPso(m_thModesFindBestC0C1); + destroyPso(m_thModesPso); + + EncoderETC1::deinitResources(); +} +//------------------------------------------------------------------------- +void EncoderETC2::execute00() +{ + EncoderETC1::execute00(); + + bindTexture(0u, m_ditheredTexture); + bindUav(0u, m_thModesC0C1, gli::FORMAT_RG32_UINT_PACK32, ResourceAccess::Write); + bindComputePso(m_thModesFindBestC0C1); + + glDispatchCompute(1u, // + alignToNextMultiple(m_width, 16u) / 16u, alignToNextMultiple(m_height, 8u) / 8u); + + TODO_better_barrier; + glMemoryBarrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT); +} +//------------------------------------------------------------------------- +void EncoderETC2::execute01(EncoderETC2::Etc1Quality quality) +{ + EncoderETC1::execute01(quality); + + bindTexture(0u, m_ditheredTexture); + bindUav(0u, m_thModesTargetRes, gli::FORMAT_RG32_UINT_PACK32, ResourceAccess::Write); + bindUav(1u, m_thModesError, gli::FORMAT_R32_SFLOAT_PACK32, ResourceAccess::Write); + bindUav(2u, m_thModesC0C1, gli::FORMAT_RG32_UINT_PACK32, ResourceAccess::Write); + bindComputePso(m_thModesPso); + glDispatchCompute(alignToNextMultiple(m_width, 4u) / 4u, alignToNextMultiple(m_height, 4u) / 4u, 1u); + + bindUav(0u, m_pModeTargetRes, gli::FORMAT_RG32_UINT_PACK32, ResourceAccess::Write); + bindUav(1u, m_pModeError, gli::FORMAT_R32_SFLOAT_PACK32, ResourceAccess::Write); + bindComputePso(m_pModePso); + glDispatchCompute(alignToNextMultiple(m_width, 8u) / 8u, alignToNextMultiple(m_height, 8u) / 8u, 1u); +} +//------------------------------------------------------------------------- +void EncoderETC2::execute02() +{ + // Decide which the best modes and merge and stitch + glMemoryBarrier(GL_TEXTURE_UPDATE_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT); + + bindTexture(0u, m_etc1Error); + bindTexture(1u, m_thModesError); + bindTexture(2u, m_pModeError); + + bindTexture(3u, m_compressTargetRes); + bindTexture(4u, m_thModesTargetRes); + + if (hasAlpha()) + { + bindTexture(5u, m_pModeTargetRes); + bindTexture(6u, m_eacTargetRes); + + bindUav(0u, m_stitchedTarget, gli::FORMAT_RGBA32_UINT_PACK32, ResourceAccess::Write); + } + else + { + bindUav(0u, m_pModeTargetRes, gli::FORMAT_RG32_UINT_PACK32, ResourceAccess::ReadWrite); + } + + bindComputePso(m_stitchPso); + glDispatchCompute(alignToNextMultiple(m_width, 32u) / 32u, alignToNextMultiple(m_height, 32u) / 32u, 1u); +} +//------------------------------------------------------------------------- +void EncoderETC2::execute03() +{ + // Copy "8x8" PFG_RG32_UINT -> 32x32 PFG_ETC1_RGB8_UNORM + // Copy "8x8" PFG_RGBA32_UINT -> 32x32 PFG_ETC2_RGBA8_UNORM + glCopyImageSubData(hasAlpha() ? m_stitchedTarget : m_pModeTargetRes, // + GL_TEXTURE_2D, 0, 0, 0, 0, // + m_dstTexture, GL_TEXTURE_2D, 0, 0, 0, 0, // + (GLsizei)(getBlockWidth()), (GLsizei)(getBlockHeight()), 1); + + StagingTexture stagingTex = + createStagingTexture(getBlockWidth(), getBlockHeight(), gli::FORMAT_RG32_UINT_PACK32, false); + downloadStagingTexture(m_pModeTargetRes, stagingTex); + glFinish(); +} +//------------------------------------------------------------------------- +void EncoderETC2::startDownload() +{ + glMemoryBarrier(GL_PIXEL_BUFFER_BARRIER_BIT); + + if (m_downloadStaging.bufferName) + destroyStagingTexture(m_downloadStaging); + m_downloadStaging = + createStagingTexture(getBlockWidth(), getBlockHeight(), + hasAlpha() ? gli::FORMAT_RGBA32_UINT_PACK32 : gli::FORMAT_RG32_UINT_PACK32, false); + downloadStagingTexture(hasAlpha() ? m_stitchedTarget : m_pModeTargetRes, m_downloadStaging); +} +} // namespace betsy diff --git a/src/lib/GL/EncoderGL.cpp b/src/lib/GL/EncoderGL.cpp new file mode 100644 index 0000000..288d2a0 --- /dev/null +++ b/src/lib/GL/EncoderGL.cpp @@ -0,0 +1,329 @@ + +#include "betsy/GL/EncoderGL.h" + +#include "betsy/CpuImage.h" + +#include +#include + +//#define DEBUG_LINK_ERRORS + +#if defined(DEBUG_LINK_ERRORS) +#include +#endif + +namespace betsy +{ +extern bool g_hasDebugObjectLabel; +bool g_hasDebugObjectLabel = false; +void setObjectLabel(GLenum identifier, GLuint name, const GLchar *label) +{ + if (g_hasDebugObjectLabel) + glObjectLabel(identifier, name, (GLsizei)strlen(label), label); +} +//------------------------------------------------------------------------- +TextureParams::TextureParams(uint32_t _width, uint32_t _height, gli::format _format, const char *_debugName, + uint32_t _flags, uint32_t _depthOrSlices, uint8_t _numMipmaps) + : width(_width), height(_height), depthOrSlices(_depthOrSlices), numMipmaps(_numMipmaps), flags(_flags), + format(_format), debugName(_debugName) +{ +} +//------------------------------------------------------------------------- +StagingTexture::StagingTexture() + : bufferName(0), bytesPerRow(0), width(0), height(0), pixelFormat(gli::FORMAT_RGBA16_SFLOAT_PACK16), data(0), + sizeBytes(0) +{ +} +//------------------------------------------------------------------------- +ComputePso::ComputePso() : computeShader(0), computePso(0) +{ +} +//------------------------------------------------------------------------- +//------------------------------------------------------------------------- +//------------------------------------------------------------------------- +GLenum EncoderGL::get(gli::format pixFmt) +{ + gli::gl GL(gli::gl::PROFILE_GL33); + gli::gl::format const glFormat = GL.translate(pixFmt, gli::swizzles()); + return glFormat.Internal; +} + +//----------------------------------------------------------------------------------- +GLenum EncoderGL::getBaseFormat(gli::format pixFmt) +{ + GLenum baseFormat = GL_NONE; + + switch (pixFmt) + { + case gli::FORMAT_RGBA_ETC2_UNORM_BLOCK8: + case gli::FORMAT_RGBA_DXT5_UNORM_BLOCK16: + case gli::FORMAT_RGBA8_UNORM_PACK8: + case gli::FORMAT_RGBA16_SFLOAT_PACK16: + case gli::FORMAT_RGBA32_UINT_PACK32: + baseFormat = GL_RGBA; + break; + case gli::FORMAT_RGB_ETC2_UNORM_BLOCK8: + case gli::FORMAT_RGB_BP_UFLOAT_BLOCK16: + case gli::FORMAT_RGB_ETC_UNORM_BLOCK8: + case gli::FORMAT_RGBA_DXT1_UNORM_BLOCK8: + baseFormat = GL_RGB; + break; + case gli::FORMAT_RG_EAC_UNORM_BLOCK16: + case gli::FORMAT_RG_ATI2N_UNORM_BLOCK16: + baseFormat = GL_RG; + break; + case gli::FORMAT_R_EAC_UNORM_BLOCK8: + case gli::FORMAT_R_ATI1N_UNORM_BLOCK8: + baseFormat = GL_RED; + break; + default: + printf("Missing: %i\n", pixFmt); + } + + return baseFormat; +} + +//----------------------------------------------------------------------------------- +void EncoderGL::getFormatAndType(gli::format pixFmt, GLenum &format, GLenum &type) +{ + gli::gl GL(gli::gl::PROFILE_GL33); + gli::gl::format const glFormat = GL.translate(pixFmt, gli::swizzles()); + format = glFormat.External; + type = glFormat.Type; +} + +//------------------------------------------------------------------------- +GLuint EncoderGL::createTexture(const TextureParams ¶ms) +{ + const GLenum format = EncoderGL::get(params.format); + + const GLenum textureTarget = params.depthOrSlices > 1u ? GL_TEXTURE_2D_ARRAY : GL_TEXTURE_2D; + + GLuint textureName = 0; + glGenTextures(1u, &textureName); + + glBindTexture(textureTarget, textureName); + glTexParameteri(textureTarget, GL_TEXTURE_BASE_LEVEL, 0); + glTexParameteri(textureTarget, GL_TEXTURE_MAX_LEVEL, 0); + glTexParameteri(textureTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(textureTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(textureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(textureTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(textureTarget, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); + glTexParameteri(textureTarget, GL_TEXTURE_MAX_LEVEL, params.numMipmaps - 1u); + + if (params.depthOrSlices > 1u) + { + glTexStorage3D(GL_TEXTURE_2D_ARRAY, GLsizei(params.numMipmaps), format, // + GLsizei(params.width), GLsizei(params.height), GLsizei(params.depthOrSlices)); + } + else + { + glTexStorage2D(GL_TEXTURE_2D, GLsizei(params.numMipmaps), format, // + GLsizei(params.width), GLsizei(params.height)); + } + + if (params.debugName) + setObjectLabel(GL_TEXTURE, textureName, params.debugName); + + return textureName; +} +//------------------------------------------------------------------------- +void EncoderGL::destroyTexture(GLuint texName) +{ + glDeleteTextures(1u, &texName); +} +//------------------------------------------------------------------------- +StagingTexture EncoderGL::createStagingTexture(uint32_t width, uint32_t height, gli::format pixFmt, bool forUpload) +{ + const size_t sizeBytes = CpuImage::getSizeBytes(width, height, 1u, 1u, pixFmt); + + StagingTexture retVal; + glGenBuffers(1u, &retVal.bufferName); + glBindBuffer(GL_COPY_WRITE_BUFFER, retVal.bufferName); + + GLbitfield flags = GL_MAP_PERSISTENT_BIT; + if (forUpload) + flags |= GL_MAP_WRITE_BIT; + else + flags |= GL_MAP_READ_BIT; + + glBufferStorage(GL_COPY_WRITE_BUFFER, (GLsizeiptr)sizeBytes, 0, flags); + + GLbitfield mapFlags = GL_MAP_PERSISTENT_BIT; + + if (forUpload) + mapFlags |= GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_FLUSH_EXPLICIT_BIT; + else + mapFlags |= GL_MAP_READ_BIT; + + retVal.pixelFormat = pixFmt; + retVal.bytesPerRow = CpuImage::getSizeBytes(width, 1u, 1u, 1u, pixFmt); + retVal.width = width; + retVal.height = height; + retVal.sizeBytes = sizeBytes; + retVal.data = glMapBufferRange(GL_COPY_WRITE_BUFFER, 0, (GLsizeiptr)sizeBytes, mapFlags); + + glBindBuffer(GL_COPY_WRITE_BUFFER, 0); + + return retVal; +} +//------------------------------------------------------------------------- +void EncoderGL::uploadStagingTexture(const StagingTexture &stagingTex, GLuint dstTexture) +{ + const size_t bytesPerPixel = CpuImage::getBytesPerPixel(stagingTex.pixelFormat); + + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint)(stagingTex.bytesPerRow / bytesPerPixel)); + glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint)stagingTex.height); + + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, stagingTex.bufferName); + glBindTexture(GL_TEXTURE_2D, dstTexture); + + glFlushMappedBufferRange(GL_PIXEL_UNPACK_BUFFER, 0, (GLsizeiptr)stagingTex.sizeBytes); + + GLenum format, type; + EncoderGL::getFormatAndType(stagingTex.pixelFormat, format, type); + + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, (GLsizei)stagingTex.width, (GLsizei)stagingTex.height, format, type, 0); + + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); + glBindTexture(GL_TEXTURE_2D, 0); +} +//------------------------------------------------------------------------- +void EncoderGL::downloadStagingTexture(GLuint srcTexture, const StagingTexture &stagingTex) +{ + const size_t bytesPerPixel = CpuImage::getBytesPerPixel(stagingTex.pixelFormat); + + const GLint rowLength = bytesPerPixel > 0 ? GLint(stagingTex.bytesPerRow / bytesPerPixel) : 0; + const GLint imageHeight = (stagingTex.bytesPerRow > 0) ? GLint(stagingTex.height) : 0; + + glPixelStorei(GL_PACK_ALIGNMENT, 4); + glPixelStorei(GL_PACK_ROW_LENGTH, rowLength); + glPixelStorei(GL_PACK_IMAGE_HEIGHT, imageHeight); + + const GLint mipLevel = 0; + + glBindTexture(GL_TEXTURE_2D, srcTexture); + glBindBuffer(GL_PIXEL_PACK_BUFFER, stagingTex.bufferName); + + // We can use glGetTexImage & glGetCompressedTexImage (cubemaps need a special path) + if (!gli::is_compressed(stagingTex.pixelFormat)) + { + GLenum format, type; + EncoderGL::getFormatAndType(stagingTex.pixelFormat, format, type); + glGetTexImage(GL_TEXTURE_2D, mipLevel, format, type, 0); + } + else + { + glGetCompressedTexImage(GL_TEXTURE_2D, mipLevel, 0); + } +} +//------------------------------------------------------------------------- +void EncoderGL::destroyStagingTexture(const StagingTexture &stagingTex) +{ + glBindBuffer(GL_COPY_WRITE_BUFFER, stagingTex.bufferName); + glUnmapBuffer(GL_COPY_WRITE_BUFFER); + glBindBuffer(GL_COPY_WRITE_BUFFER, 0); + glDeleteBuffers(1u, &stagingTex.bufferName); +} +//------------------------------------------------------------------------- +GLuint EncoderGL::createUavBuffer(size_t sizeBytes, void *initialData) +{ + GLuint bufferName; + glGenBuffers(1u, &bufferName); + glBindBuffer(GL_SHADER_STORAGE_BUFFER, bufferName); + glBufferStorage(GL_SHADER_STORAGE_BUFFER, (GLsizeiptr)sizeBytes, initialData, 0u); + return bufferName; +} +//------------------------------------------------------------------------- +void EncoderGL::destroyUavBuffer(GLuint bufferName) +{ + glDeleteBuffers(1u, &bufferName); +} +//------------------------------------------------------------------------- +ComputePso EncoderGL::createComputePso(const char *csShader) +{ + ComputePso retVal; + + retVal.computeShader = glCreateShader(GL_COMPUTE_SHADER); + glShaderSource(retVal.computeShader, 1, &csShader, 0); + glCompileShader(retVal.computeShader); + +#ifdef DEBUG_LINK_ERRORS + { + GLsizei logLength = 0; + char infoLog[1024]; + glGetShaderiv(retVal.computeShader, GL_INFO_LOG_LENGTH, &logLength); + glGetShaderInfoLog(retVal.computeShader, sizeof(infoLog), &logLength, infoLog); + if (logLength > 0) + printf("%s\n", infoLog); + } +#endif + + retVal.computePso = glCreateProgram(); + glAttachShader(retVal.computePso, retVal.computeShader); + glLinkProgram(retVal.computePso); + +#ifdef DEBUG_LINK_ERRORS + { + GLsizei logLength = 0; + char infoLog[1024]; + glGetProgramInfoLog(retVal.computePso, sizeof(infoLog), &logLength, infoLog); + if (logLength > 0) + printf("%s\n", infoLog); + } +#endif + + return retVal; +} +//------------------------------------------------------------------------- +void EncoderGL::destroyPso(ComputePso &pso) +{ + glDeleteProgram(pso.computePso); + glDeleteShader(pso.computeShader); + pso.computePso = 0; + pso.computeShader = 0; +} +//------------------------------------------------------------------------- +void EncoderGL::bindComputePso(const ComputePso &pso) +{ + glUseProgram(pso.computePso); +} +//------------------------------------------------------------------------- +void EncoderGL::bindTexture(uint32_t slot, GLuint textureSrv) +{ + glActiveTexture(static_cast(GL_TEXTURE0 + slot)); + glBindTexture(GL_TEXTURE_2D, textureSrv); + glActiveTexture(GL_TEXTURE0); +} +//------------------------------------------------------------------------- +void EncoderGL::bindUav(uint32_t slot, GLuint textureSrv, gli::format pixFmt, ResourceAccess::ResourceAccess access) +{ + const GLenum format = EncoderGL::get(pixFmt); + GLenum accessGl; + switch (access) + { + case ResourceAccess::Read: + accessGl = GL_READ_ONLY; + break; + case ResourceAccess::Write: + accessGl = GL_WRITE_ONLY; + break; + case ResourceAccess::ReadWrite: + accessGl = GL_READ_WRITE; + break; + default: + assert(false); + accessGl = GL_READ_WRITE; + break; + } + + glBindImageTexture(slot, textureSrv, 0, GL_TRUE, 0, accessGl, format); +} +//------------------------------------------------------------------------- +void EncoderGL::bindUavBuffer(uint32_t slot, GLuint buffer, size_t offset, size_t bufferSize) +{ + glBindBufferRange(GL_SHADER_STORAGE_BUFFER, slot, buffer, (GLintptr)offset, (GLintptr)bufferSize); +} +} // namespace betsy diff --git a/src/lib/GL/PlatformGL.cpp b/src/lib/GL/PlatformGL.cpp new file mode 100644 index 0000000..72763f0 --- /dev/null +++ b/src/lib/GL/PlatformGL.cpp @@ -0,0 +1,81 @@ + +#include +#include + +#include "GL/gl3w.h" +#include + +namespace betsy +{ +extern void initBetsyPlatform(); +extern void shutdownBetsyPlatform(); +extern void pollPlatformWindow(); + +extern bool g_hasDebugObjectLabel; +static GLFWwindow *g_window = 0; + +static void APIENTRY GLDebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, + const GLchar *message, const void *userParam) +{ + printf("%s\n", message); +} + +void initBetsyPlatform() +{ + if (!glfwInit()) + { + // Initialization failed + fprintf(stderr, "Error initializing GLFW\n"); + abort(); + } + + glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); +#ifdef DEBUG + glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, 1); +#endif + g_window = glfwCreateWindow(640, 480, "", NULL, NULL); + if (!g_window) + { + fprintf(stderr, "GL Context creation failed.\n"); + glfwTerminate(); + abort(); + } + else + { + printf("GL Context creation suceeded.\n"); + } + + glfwMakeContextCurrent(g_window); + + // GL 4.3 mandates GL_KHR_debug + g_hasDebugObjectLabel = true; + + const bool gl3wFailed = gl3wInit() != 0; + if (gl3wFailed) + { + fprintf(stderr, "Failed to initialize GL3W\n"); + abort(); + } + +#ifdef DEBUG + glDebugMessageCallback(&GLDebugCallback, NULL); + glEnable(GL_DEBUG_OUTPUT); + glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); +#endif +} + +void shutdownBetsyPlatform() +{ + glfwDestroyWindow(g_window); + glfwTerminate(); +} + +void pollPlatformWindow() +{ + glfwPollEvents(); + glfwSwapBuffers(g_window); +} +} // namespace betsy diff --git a/src/gl3w.cpp b/src/lib/GL/gl3w.cpp similarity index 94% rename from src/gl3w.cpp rename to src/lib/GL/gl3w.cpp index b0141d4..adc8a6a 100644 --- a/src/gl3w.cpp +++ b/src/lib/GL/gl3w.cpp @@ -31,7 +31,7 @@ #include #include -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #if defined(_WIN32) #define WIN32_LEAN_AND_MEAN 1 @@ -41,22 +41,22 @@ static HMODULE libgl; static void open_libgl(void) { - libgl = LoadLibraryA("opengl32.dll"); + libgl = LoadLibraryA("opengl32.dll"); } static void close_libgl(void) { - FreeLibrary(libgl); + FreeLibrary(libgl); } static GL3WglProc get_proc(const char *proc) { - GL3WglProc res; + GL3WglProc res; - res = (GL3WglProc)wglGetProcAddress(proc); - if (!res) - res = (GL3WglProc)GetProcAddress(libgl, proc); - return res; + res = (GL3WglProc)wglGetProcAddress(proc); + if (!res) + res = (GL3WglProc)GetProcAddress(libgl, proc); + return res; } #elif defined(__APPLE__) #include @@ -65,20 +65,20 @@ static void *libgl; static void open_libgl(void) { - libgl = dlopen("/System/Library/Frameworks/OpenGL.framework/OpenGL", RTLD_LAZY | RTLD_GLOBAL); + libgl = dlopen("/System/Library/Frameworks/OpenGL.framework/OpenGL", RTLD_LAZY | RTLD_GLOBAL); } static void close_libgl(void) { - dlclose(libgl); + dlclose(libgl); } static GL3WglProc get_proc(const char *proc) { - GL3WglProc res; + GL3WglProc res; - *(void **)(&res) = dlsym(libgl, proc); - return res; + *(void **)(&res) = dlsym(libgl, proc); + return res; } #else #include @@ -89,73 +89,74 @@ static PFNGLXGETPROCADDRESSPROC glx_get_proc_address; static void open_libgl(void) { - libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL); - *(void **)(&glx_get_proc_address) = dlsym(libgl, "glXGetProcAddressARB"); + libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL); + *(void **)(&glx_get_proc_address) = dlsym(libgl, "glXGetProcAddressARB"); } static void close_libgl(void) { - dlclose(libgl); + dlclose(libgl); } static GL3WglProc get_proc(const char *proc) { - GL3WglProc res; + GL3WglProc res; - res = glx_get_proc_address((const GLubyte *)proc); - if (!res) - *(void **)(&res) = dlsym(libgl, proc); - return res; + res = glx_get_proc_address((const GLubyte *)proc); + if (!res) + *(void **)(&res) = dlsym(libgl, proc); + return res; } #endif -static struct { - int major, minor; +static struct +{ + int major, minor; } version; static int parse_version(void) { - if (!glGetIntegerv) - return -1; + if (!glGetIntegerv) + return -1; - glGetIntegerv(GL_MAJOR_VERSION, &version.major); - glGetIntegerv(GL_MINOR_VERSION, &version.minor); + glGetIntegerv(GL_MAJOR_VERSION, &version.major); + glGetIntegerv(GL_MINOR_VERSION, &version.minor); - if (version.major < 3) - return -1; - return 0; + if (version.major < 3) + return -1; + return 0; } static void load_procs(GL3WGetProcAddressProc proc); int gl3wInit(void) { - open_libgl(); - atexit(close_libgl); - load_procs(get_proc); - return parse_version(); + open_libgl(); + atexit(close_libgl); + load_procs(get_proc); + return parse_version(); } int gl3wInit2(GL3WGetProcAddressProc proc) { - open_libgl(); - atexit(close_libgl); - load_procs(proc); - return parse_version(); + open_libgl(); + atexit(close_libgl); + load_procs(proc); + return parse_version(); } int gl3wIsSupported(int major, int minor) { - if (major < 3) - return 0; - if (version.major == major) - return version.minor >= minor; - return version.major >= major; + if (major < 3) + return 0; + if (version.major == major) + return version.minor >= minor; + return version.major >= major; } GL3WglProc gl3wGetProcAddress(const char *proc) { - return get_proc(proc); + return get_proc(proc); } static const char *proc_names[] = { @@ -937,7 +938,7 @@ union GL3WProcs gl3wProcs; static void load_procs(GL3WGetProcAddressProc proc) { - size_t i; - for (i = 0; i < ARRAY_SIZE(proc_names); i++) - gl3wProcs.ptr[i] = proc(proc_names[i]); + size_t i; + for (i = 0; i < ARRAY_SIZE(proc_names); i++) + gl3wProcs.ptr[i] = proc(proc_names[i]); } diff --git a/src/main.cpp b/src/main.cpp deleted file mode 100644 index 36b4f95..0000000 --- a/src/main.cpp +++ /dev/null @@ -1,286 +0,0 @@ -#define NOMINMAX - -#include "betsy/CpuImage.h" -#include "betsy/EncoderBC1.h" -#include "betsy/EncoderBC4.h" -#include "betsy/EncoderBC6H.h" -#include "betsy/EncoderEAC.h" -#include "betsy/EncoderETC1.h" -#include "betsy/EncoderETC2.h" -#include "betsy/File/FormatKTX.h" - -#include "CmdLineParams.h" -#include "CmdLineParamsEnum.h" - -#include -#include -#include -#include -#include - -namespace betsy -{ - extern void initBetsyPlatform(); - extern void shutdownBetsyPlatform(); - extern void pollPlatformWindow(); -} // namespace betsy - -void printHelp() -{ - printf( "Usage:\n" ); - printf( " betsy input.hdr --codec=etc2_rgb --quality=2 output.ktx\n\n" ); - - printf( "Supported input formats:\n" ); - printf( " Whatever FreeImage supports (png, jpg, hdr, exr, bmp, ...):\n" ); - printf( " Does not read KTX nor DDS\n" ); - - printf( "Supported output formats:\n" ); - printf( " KTX\n" ); - - printf( "Supported codecs:\n" ); - printf( - " etc1 0.5 bpp - ETC1 RGB, Works on ETC1 HW. Backwards compatible w/ ETC2 HW\n" - " etc2_rgba_etc1 1.0 bpp - ETC1 RGB + EAC Alpha. Requires ETC2 HW\n" - " etc2_rgb 0.5 bpp - ETC2 RGB\n" - " etc2_rgba 1.0 bpp - ETC2 RGB + EAC Alpha\n" - " eac_r11 0.5 bpp - EAC Red unorm (source 11-bits per pixel)\n" - " eac_rg11 1.0 bpp - EAC RG unorm (11-bits each, useful for normal maps)\n" - " bc6h 1.0 bpp - BC6 Unsigned half-floating point format, RGB\n" - " bc1 0.5 bpp - BC1 RGB aka DXT1\n" - " bc3 1.0 bpp - BC3 RGBA aka DXT5\n" - " bc4 0.5 bpp - BC4 Red unorm\n" - " bc4_snorm 0.5 bpp - BC4 Red snorm\n" - " bc5 1.0 bpp - BC5 RG unorm\n" - " bc5_snorm 1.0 bpp - BC5 RG snorm. Ideal for normal maps\n" ); - - printf( "\nbpp here stands for 'bytes per pixel', rather than bits per pixel.\n" - "\nOther options:\n" ); - printf( - " --quality Value in range [0; 2] where 0 is lowest quality.\n" - " Not all codecs support it.\n" - " --dither Use Floyd-steinberg dithering. Anti-banding method.\n" - " Not recommended on images with flat colours (e.g. charts, normal maps)\n" - " Supported by BC1 & ETC1/2\n" - " --renderdoc Use this to ensure RenderDoc capture works (slower)\n" ); -} - -/** Returns true if 'str' starts with the text contained in 'what' -@param str -@param what -@param outStartIdx - str[outStartIdx] points to the first letter (including null terminator) - that diverged from 'what', even if we return false -@return - True if there's a match, false otherwise -*/ -bool startsWith( const char *str, const char *what, size_t &outStartIdx ) -{ - const char *origStart = str; - - while( *str && *what && *str == *what ) - { - ++str; - ++what; - } - - outStartIdx = static_cast( str - origStart ); - - return *what == '\0'; -} - -bool parseCmdLine( int nargs, char *const argv[], CmdLineParams &outParams ) -{ - if( nargs < 3 ) - return false; - - size_t currFilename = 0u; - for( int i = 1; i < nargs; ++i ) - { - size_t startIdx; - if( startsWith( argv[i], "--codec=", startIdx ) ) - { - std::string codecName( argv[i] + startIdx ); - if( !Codec::CodecEnum::find( codecName, outParams.codec ) ) - { - printf( "No such codec: '%s'\n", argv[i] + startIdx ); - return false; - } - } - else if( startsWith( argv[i], "--quality=", startIdx ) ) - { - outParams.quality = static_cast( atoi( argv[i] + startIdx ) ); - outParams.quality = std::min( outParams.quality, 2u ); - } - else if( startsWith( argv[i], "--dither", startIdx ) ) - { - outParams.dither = true; - } - else if( startsWith( argv[i], "--renderdoc", startIdx ) ) - { - outParams.usingRenderDoc = true; - } - else if( startsWith( argv[i], "--help", startIdx ) ) - { - return false; - } - else if( startsWith( argv[i], "--", startIdx ) ) - { - printf( "Unknown parameter '%s'\n", argv[i] ); - return false; - } - else - { - if( currFilename >= 2u ) - { - printf( "Unknown parameter '%s'\n", argv[i] ); - return false; - } - outParams.filename[currFilename] = argv[i]; - ++currFilename; - } - } - - if( currFilename != 2u ) - { - printf( "Input and output filenames not given" ); - return false; - } - - return true; -} - -template -void saveToDisk( T &encoder, const CmdLineParams params ) -{ - betsy::CpuImage downloadImg; - encoder.startDownload(); - encoder.downloadTo( downloadImg ); - betsy::FormatKTX::save( params.filename[1].c_str(), downloadImg ); - downloadImg.data = 0; // This pointer is not owned by CpuImage and must not be freed -} - -int main( int nargs, char *const argv[] ) -{ - CmdLineParams params; - params.quality = 2; - - if( !parseCmdLine( nargs, argv, params ) ) - { - printHelp(); - return -1; - } - - printf( "Initializing API\n" ); - betsy::initBetsyPlatform(); - - size_t repeat = params.usingRenderDoc ? 2u : 1u; - - betsy::CpuImage cpuImage( params.filename[0].c_str() ); - - switch( params.codec ) - { - case Codec::etc1: - case Codec::etc2_rgba_etc1: - { - betsy::EncoderETC1 encoder; - encoder.initResources( cpuImage, params.codec == Codec::etc2_rgba_etc1, params.dither ); - while( repeat-- ) - { - encoder.execute00(); - encoder.execute01( static_cast( params.quality ) ); - encoder.execute02(); - if( params.usingRenderDoc ) - encoder.execute03(); // Not needed in offline mode - betsy::pollPlatformWindow(); - } - saveToDisk( encoder, params ); - encoder.deinitResources(); - } - break; - case Codec::etc2_rgb: - case Codec::etc2_rgba: - { - betsy::EncoderETC2 encoder; - encoder.initResources( cpuImage, params.codec == Codec::etc2_rgba, params.dither ); - while( repeat-- ) - { - encoder.execute00(); - encoder.execute01( static_cast( params.quality ) ); - encoder.execute02(); - if( params.usingRenderDoc ) - encoder.execute03(); // Not needed in offline mode - betsy::pollPlatformWindow(); - } - saveToDisk( encoder, params ); - encoder.deinitResources(); - } - break; - case Codec::eac_r11: - case Codec::eac_rg11: - { - betsy::EncoderEAC encoder; - encoder.initResources( cpuImage, params.codec == Codec::eac_rg11 ); - encoder.execute01(); - encoder.execute02(); - betsy::pollPlatformWindow(); - saveToDisk( encoder, params ); - encoder.deinitResources(); - } - break; - case Codec::bc1: - case Codec::bc3: - { - betsy::EncoderBC1 encoder; - encoder.initResources( cpuImage, params.codec == Codec::bc3, params.dither ); - while( repeat-- ) - { - encoder.execute01(); - encoder.execute02(); - if( params.usingRenderDoc ) - encoder.execute03(); // Not needed in offline mode - betsy::pollPlatformWindow(); - } - saveToDisk( encoder, params ); - encoder.deinitResources(); - } - break; - case Codec::bc4: - case Codec::bc4_snorm: - case Codec::bc5: - case Codec::bc5_snorm: - { - betsy::EncoderBC4 encoder; - encoder.initResources( cpuImage, params.codec == Codec::bc5 || params.codec == Codec::bc5_snorm, - params.codec == Codec::bc4_snorm || params.codec == Codec::bc5_snorm ); - while( repeat-- ) - { - encoder.execute01(); - encoder.execute02(); - if( params.usingRenderDoc ) - encoder.execute03(); // Not needed in offline mode - betsy::pollPlatformWindow(); - } - saveToDisk( encoder, params ); - encoder.deinitResources(); - } - break; - case Codec::bc6h: - { - betsy::EncoderBC6H encoder; - encoder.initResources( cpuImage ); - encoder.execute01(); - // encoder.execute02(); Not needed in offline mode - betsy::pollPlatformWindow(); - saveToDisk( encoder, params ); - encoder.deinitResources(); - } - break; - } - - betsy::pollPlatformWindow(); - - printf( "Shutting down\n" ); - betsy::shutdownBetsyPlatform(); - - return 0; -} diff --git a/src/sds/sds_fstream.cpp b/src/sds/sds_fstream.cpp deleted file mode 100644 index 84ec381..0000000 --- a/src/sds/sds_fstream.cpp +++ /dev/null @@ -1,291 +0,0 @@ - -#include "sds/sds_fstream.h" - -#include - -#include - -#ifdef _MSC_VER -# include -#else -# include -#endif - -#ifdef __APPLE__ - #include -#endif - -namespace sds -{ - fstream::fstream() : - m_handle( 0 ), - m_statusBits( 0 ), - m_canRead( false ), - m_canWrite( false ) - { - } - //------------------------------------------------------------------------- - fstream::fstream( const char *fullpath, FileOpenMode mode ) : - m_handle( 0 ), - m_statusBits( 0 ), - m_canRead( false ), - m_canWrite( false ) - { - open( fullpath, mode ); - } - //------------------------------------------------------------------------- - fstream::fstream( const std::string &fullpath, FileOpenMode mode ) : - m_handle( 0 ), - m_statusBits( 0 ), - m_canRead( false ), - m_canWrite( false ) - { - open( fullpath.c_str(), mode ); - } - //------------------------------------------------------------------------- - fstream::~fstream() - { - close(); - } - //------------------------------------------------------------------------- - void fstream::open( const std::string &fullpath, FileOpenMode mode ) - { - open( fullpath.c_str(), mode ); - } - //------------------------------------------------------------------------- - void fstream::open( const char *fullpath, FileOpenMode mode ) - { - close(); - - const char *modeStr = 0; - - switch( mode ) - { - case fstream::Input: - case fstream::InputEnd: - m_canRead = true; - modeStr = "rb"; - break; - case fstream::OutputKeep: - case fstream::OutputKeepEnd: - m_canWrite = true; - modeStr = "r+b"; - break; - case fstream::OutputDiscard: - m_canWrite = true; - modeStr = "w+b"; - break; - case fstream::InOutKeep: - m_canRead = true; - m_canWrite = true; - modeStr = "r+b"; - break; - case fstream::InOutEnd: - m_canRead = true; - m_canWrite = true; - modeStr = "r+b"; - break; - } - - m_handle = fopen( fullpath, modeStr ); - - if( m_handle && (mode == fstream::InputEnd || mode == fstream::InOutEnd || - mode == fstream::OutputKeepEnd) ) - { - seek( 0, fstream::end ); - } - } - //------------------------------------------------------------------------- - void fstream::close() - { - if( m_handle ) - { - fclose( m_handle ); - m_handle = 0; - } - - m_statusBits = 0u; - m_canRead = false; - m_canWrite = false; - } - //------------------------------------------------------------------------- - bool fstream::is_open() const - { - return m_handle != 0; - } - //------------------------------------------------------------------------- - bool fstream::good() - { - if( m_handle == 0 ) - return false; - - if( (m_statusBits & (fstream::badbit|fstream::failbit)) == 0 ) - { - if( ferror( m_handle ) != 0 ) - m_statusBits |= fstream::badbit; - } - - return m_statusBits == 0u || m_statusBits == fstream::eof; - } - //------------------------------------------------------------------------- - size_t fstream::read( char *outData, size_t sizeBytes ) - { - if( m_canRead ) - { - const size_t retVal = fread( outData, 1u, sizeBytes, m_handle ); - - if( retVal != sizeBytes ) - { - if( ferror( m_handle ) != 0 ) - m_statusBits |= fstream::badbit; - if( feof( m_handle ) != 0 ) - m_statusBits |= fstream::eof; - } - - return retVal; - } - else - { - m_statusBits |= fstream::failbit; - return std::numeric_limits::max(); - } - } - //------------------------------------------------------------------------- - size_t fstream::write( const char *inData, size_t sizeBytes ) - { - if( m_canWrite ) - { - const size_t retVal = fwrite( inData, 1u, sizeBytes, m_handle ); - - if( retVal != sizeBytes ) - m_statusBits |= fstream::badbit; - - return retVal; - } - else - { - m_statusBits |= fstream::failbit; - return std::numeric_limits::max(); - } - } - //------------------------------------------------------------------------- - void fstream::seek( ssize_t dir, Whence whence ) - { - if( !good() ) - { - m_statusBits |= fstream::failbit; - return; - } - - int fileWhence = 0; - switch( whence ) - { - case fstream::beg: fileWhence = SEEK_SET; break; - case fstream::cur: fileWhence = SEEK_CUR; break; - case fstream::end: fileWhence = SEEK_END; break; - } - - const int status = fseek( m_handle, dir, fileWhence ); - - if( status != 0 ) - { - m_statusBits |= fstream::failbit; - - if( ferror( m_handle ) != 0 ) - m_statusBits |= fstream::badbit; - } - } - //------------------------------------------------------------------------- - size_t fstream::tell() - { - if( !good() ) - { - m_statusBits |= fstream::failbit; - return std::numeric_limits::max(); - } - - const long int position = ftell( m_handle ); - if( position == -1L ) - m_statusBits |= fstream::badbit; - return static_cast( position ); - } - //------------------------------------------------------------------------- - int fstream::flush() - { - if( m_canWrite ) - { - int status = fflush( m_handle ); - if( status != 0 ) - m_statusBits |= fstream::badbit; - - return status; - } - else - { - m_statusBits |= fstream::failbit; - return -1; - } - } - //------------------------------------------------------------------------- - void fstream::fsync( bool preferDataSync ) - { - if( !m_canWrite ) - { - m_statusBits |= fstream::failbit; - return; - } - - flush(); - - int fileDescriptor = fileno( m_handle ); - - if( fileDescriptor == -1 ) - { - m_statusBits |= fstream::badbit; - return; - } - - int status = 0; -#ifndef _WIN32 - #ifdef __APPLE__ - status = fcntl( fileDescriptor, F_FULLFSYNC, NULL); - if( status ) - { - // If we are not on a file system that supports this, - // then fall back to a plain fsync. - status = ::fsync( fileDescriptor ); - if( status != 0 ) - m_statusBits |= fstream::badbit; - } - #else - if( !preferDataSync ) - status = ::fsync( fileDescriptor ); - else - status = ::fdatasync( fileDescriptor ); - - if( status != 0 ) - m_statusBits |= fstream::badbit; - #endif -#else - status = _commit( fileDescriptor ); - if( status != 0 ) - m_statusBits |= fstream::badbit; -#endif - } - //------------------------------------------------------------------------- - template <> - size_t fstream::read( bool &outValue ) - { - uint8_t value = 0; - const size_t retVal = read( value ); - outValue = value != 0; - return retVal; - } - //------------------------------------------------------------------------- - template <> - size_t fstream::write( bool inValue ) - { - uint8_t value = inValue ? 1u : 0u; - return write( value ); - } -} diff --git a/src/sds/sds_fstreamNsud.mm b/src/sds/sds_fstreamNsud.mm deleted file mode 100644 index 100110a..0000000 --- a/src/sds/sds_fstreamNsud.mm +++ /dev/null @@ -1,275 +0,0 @@ - -#include "sds/sds_fstreamNsud.h" - -#include - -#import -#import -#import - -namespace sds -{ - static const size_t c_defaultBufferSize = 512u; - - fstreamNsud::fstreamNsud() : - m_data( 0 ), - m_offset( 0 ), - m_size( 0 ), - m_statusBits( 0 ), - m_canRead( false ), - m_canWrite( false ) - { - } - //------------------------------------------------------------------------- - fstreamNsud::fstreamNsud( const char *fullpath, FileOpenMode mode ) : - m_data( 0 ), - m_offset( 0 ), - m_size( 0 ), - m_statusBits( 0 ), - m_canRead( false ), - m_canWrite( false ) - { - open( fullpath, mode ); - } - //------------------------------------------------------------------------- - fstreamNsud::fstreamNsud( const std::string &fullpath, FileOpenMode mode ) : - m_data( 0 ), - m_offset( 0 ), - m_size( 0 ), - m_statusBits( 0 ), - m_canRead( false ), - m_canWrite( false ) - { - open( fullpath.c_str(), mode ); - } - //------------------------------------------------------------------------- - fstreamNsud::~fstreamNsud() { close(); } - //------------------------------------------------------------------------- - void fstreamNsud::growToFit( size_t requestedLength ) - { - if( m_offset + requestedLength > m_size ) - { - // Reallocate - size_t newSize = m_offset + ( m_offset >> 1 ) + requestedLength; - uint8_t *tmpBuffer = reinterpret_cast( malloc( newSize ) ); - memcpy( tmpBuffer, m_data, m_size ); - free( m_data ); - m_data = tmpBuffer; - m_size = newSize; - } - } - //------------------------------------------------------------------------- - void fstreamNsud::readFromNSUserDefaults( bool seekEnd, bool createIfNotFound ) - { - NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; - - NSString *filename = [NSString stringWithUTF8String:m_filename.c_str()]; - NSData *data = [userDefaults dataForKey:filename]; - if( data ) - { - m_fileSize = static_cast( data.length ); - growToFit( m_fileSize ); - memcpy( m_data, data.bytes, data.length ); - if( seekEnd ) - m_offset = m_fileSize; - } - else if( createIfNotFound ) - { - growToFit( c_defaultBufferSize ); - } - } - //------------------------------------------------------------------------- - void fstreamNsud::writeToNSUserDefaults() - { - NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; - NSData *data = [NSData dataWithBytesNoCopy:m_data length:m_fileSize freeWhenDone:NO]; - NSString *filename = [NSString stringWithUTF8String:m_filename.c_str()]; - [userDefaults setObject:data forKey:filename]; - [userDefaults synchronize]; - } - //------------------------------------------------------------------------- - void fstreamNsud::open( const std::string &fullpath, FileOpenMode mode ) - { - open( fullpath.c_str(), mode ); - } - //------------------------------------------------------------------------- - void fstreamNsud::open( const char *fullpath, FileOpenMode mode ) - { - close(); - - m_filename = fullpath; - - switch( mode ) - { - case fstreamNsud::Input: - case fstreamNsud::InputEnd: - readFromNSUserDefaults( mode == fstreamNsud::InputEnd, false ); - m_canRead = true; - break; - case fstreamNsud::OutputKeep: - case fstreamNsud::OutputKeepEnd: - readFromNSUserDefaults( mode == fstreamNsud::OutputKeepEnd, true ); - m_canWrite = true; - break; - case fstreamNsud::OutputDiscard: - growToFit( c_defaultBufferSize ); - m_canWrite = true; - break; - case fstreamNsud::InOutKeep: - case fstreamNsud::InOutEnd: - readFromNSUserDefaults( mode == fstreamNsud::InOutEnd, true ); - m_canRead = true; - m_canWrite = true; - break; - } - } - //------------------------------------------------------------------------- - void fstreamNsud::close() - { - if( m_data && m_canWrite ) - writeToNSUserDefaults(); - - if( m_data ) - { - free( m_data ); - m_data = 0; - } - - m_offset = 0u; - m_fileSize = 0u; - m_size = 0u; - - m_statusBits = 0u; - m_canRead = false; - m_canWrite = false; - } - //------------------------------------------------------------------------- - bool fstreamNsud::is_open() const { return m_data != 0; } - //------------------------------------------------------------------------- - bool fstreamNsud::good() - { - if( m_data == 0 ) - return false; - return m_statusBits == 0u || m_statusBits == fstreamNsud::eof; - } - //------------------------------------------------------------------------- - size_t fstreamNsud::read( char *outData, size_t sizeBytes ) - { - if( m_canRead && good() ) - { - assert( m_offset <= m_fileSize ); - const size_t clampedSizeBytes = std::min( sizeBytes, m_fileSize - m_offset ); - memcpy( outData, m_data + m_offset, clampedSizeBytes ); - m_offset += clampedSizeBytes; - - if( m_offset >= m_fileSize ) - m_statusBits |= fstreamNsud::eof; - - return clampedSizeBytes; - } - else - { - m_statusBits |= fstreamNsud::failbit; - return std::numeric_limits::max(); - } - } - //------------------------------------------------------------------------- - size_t fstreamNsud::write( const char *inData, size_t sizeBytes ) - { - if( m_canWrite && good() ) - { - growToFit( sizeBytes ); - memcpy( m_data + m_offset, inData, sizeBytes ); - m_offset += sizeBytes; - m_fileSize = std::max( m_fileSize, m_offset ); - return sizeBytes; - } - else - { - m_statusBits |= fstreamNsud::failbit; - return std::numeric_limits::max(); - } - } - //------------------------------------------------------------------------- - void fstreamNsud::seek( ssize_t dir, Whence whence ) - { - if( !good() ) - { - m_statusBits |= fstreamNsud::failbit; - return; - } - - int fileWhence = 0; - switch( whence ) - { - case fstreamNsud::beg: - m_offset = static_cast( dir ); - break; - case fstreamNsud::cur: - m_offset += static_cast( dir ); - break; - case fstreamNsud::end: - m_offset = m_fileSize + static_cast( dir ); - fileWhence = SEEK_END; - break; - } - - if( m_offset == m_fileSize ) - m_statusBits |= fstreamNsud::eof; - else if( m_offset > m_fileSize ) - m_statusBits |= fstreamNsud::failbit; - } - //------------------------------------------------------------------------- - size_t fstreamNsud::tell() - { - if( !good() ) - { - m_statusBits |= fstreamNsud::failbit; - return std::numeric_limits::max(); - } - return m_offset; - } - //------------------------------------------------------------------------- - int fstreamNsud::flush() - { - if( m_canWrite ) - { - writeToNSUserDefaults(); - return 0; - } - else - { - m_statusBits |= fstreamNsud::failbit; - return -1; - } - } - //------------------------------------------------------------------------- - void fstreamNsud::fsync( bool preferDataSync ) - { - if( !m_canWrite ) - { - m_statusBits |= fstreamNsud::failbit; - return; - } - - flush(); - } - //------------------------------------------------------------------------- - void fstreamNsud::_changeFilename( const std::string &newFilename ) { m_filename = newFilename; } - //------------------------------------------------------------------------- - template <> - size_t fstreamNsud::read( bool &outValue ) - { - uint8_t value = 0; - const size_t retVal = read( value ); - outValue = value != 0; - return retVal; - } - //------------------------------------------------------------------------- - template <> - size_t fstreamNsud::write( bool inValue ) - { - uint8_t value = inValue ? 1u : 0u; - return write( value ); - } -} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..809435c --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,9 @@ +set(CODEC_LIST "bc1" "bc3" "bc4" "bc4_snorm" "bc5" "bc5_snorm" "bc6h" "etc1" "etc2_rgba_etc1" "etc2_rgb" "etc2_rgba" "eac_r11" "eac_rg11") + +foreach(CODEC ${CODEC_LIST}) + add_test(NAME test_cli_${CODEC} + COMMAND ${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/data/bricks.jpg out_${CODEC}.ktx --codec=${CODEC}) + + add_test(NAME test_nrm_cli_${CODEC} + COMMAND ${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/data/bricks_nrm.jpg out_nrm_${CODEC}.ktx --codec=${CODEC}) +endforeach() \ No newline at end of file diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 0000000..e1513ef --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,6 @@ +add_executable(shader-processor +${CMAKE_CURRENT_SOURCE_DIR}/shader-processor/main.cpp +${CMAKE_CURRENT_SOURCE_DIR}/shader-processor/IncludeParser.cpp +${CMAKE_CURRENT_SOURCE_DIR}/shader-processor/IncludeParser.h) + +set_property(TARGET shader-processor PROPERTY CXX_STANDARD 17) \ No newline at end of file diff --git a/tools/shader-processor/IncludeParser.cpp b/tools/shader-processor/IncludeParser.cpp new file mode 100644 index 0000000..2c6b19b --- /dev/null +++ b/tools/shader-processor/IncludeParser.cpp @@ -0,0 +1,118 @@ + +#include "IncludeParser.h" + +#include +#include + +namespace betsy +{ +bool IncludeParser::loadFromFileInto(const std::filesystem::path &fullpath, std::string &outSource) +{ + std::ifstream file; + file.open(fullpath, std::ios_base::binary | std::ios_base::in); + if (file.fail()) + { + printf("Error opening %s\n", fullpath.c_str()); + return false; + } + + file.seekg(0, std::ios_base::end); + const size_t fileSize = static_cast(file.tellg()); + outSource.resize(fileSize); + + file.seekg(0, std::ios_base::beg); + file.read(&outSource[0], static_cast(fileSize)); + + // Remove "#version" from first newline + const size_t firstNewlinePos = outSource.find_first_of('\n'); + if (firstNewlinePos != std::string::npos) + { + const size_t versionPos = outSource.substr(0u, firstNewlinePos).find("#version ", 0u); + if (versionPos != std::string::npos) + outSource.erase(0u, firstNewlinePos + 1u); + } + + return true; +} + +bool IncludeParser::loadFromFile(const std::filesystem::path &path) +{ + return loadFromFile(path, path.parent_path()); +} + +//------------------------------------------------------------------------- +bool IncludeParser::loadFromFile(const std::filesystem::path &filename, const std::filesystem::path &relativePath) +{ + std::ifstream file; + file.open(filename, std::ios_base::binary | std::ios_base::in); + if (file.fail()) + { + printf("Error opening %s\n", filename.c_str()); + return false; + } + + file.seekg(0, std::ios_base::end); + const size_t fileSize = static_cast(file.tellg()); + m_source.resize(fileSize); + + file.seekg(0, std::ios_base::beg); + file.read(&m_source[0], static_cast(fileSize)); + + return parseIncludeFiles(relativePath); +} +//------------------------------------------------------------------------- +bool IncludeParser::parseIncludeFiles(const std::filesystem::path &relativePath) +{ + size_t startPos = 0; + std::string includeKeyword = "#include "; + + startPos = m_source.find(includeKeyword, startPos); + while (startPos != std::string::npos) + { + // Backtrack to see if have to skip commented lines like "// #include". + // We do not support block comments /**/ + const size_t lineStartPos = m_source.rfind('\n', startPos); + if (lineStartPos == std::string::npos || lineStartPos + 2u >= m_source.size() || + m_source[lineStartPos + 1] != '/' || m_source[lineStartPos + 2] != '/') + { + size_t pos = startPos + includeKeyword.length() + 1u; + size_t eolMarkerPos = m_source.find('\n', pos); + size_t endPos0 = m_source.find('"', pos); + size_t endPos1 = m_source.find('>', pos); + size_t endPos = std::min(endPos0, endPos1); + + if (endPos == std::string::npos || (endPos >= eolMarkerPos && eolMarkerPos != std::string::npos)) + { + printf("Invalid #include syntax near %s", + m_source.substr(startPos, std::min(startPos + 10u, m_source.size() - startPos)).c_str()); + return false; + } + + std::string file = m_source.substr(pos, endPos - pos); + + std::string includeContent; + if (loadFromFileInto(relativePath / file, includeContent)) + m_source.replace(startPos, (endPos + 1u) - startPos, includeContent); + else + { + // Leave the included header, fallback to the compiler + // (e.g. Metal can include system headers) + startPos = endPos; + } + } + else + { + startPos += sizeof("#include ") - 1u; + } + + startPos = m_source.find(includeKeyword, startPos); + } + + return true; +} +//------------------------------------------------------------------------- +const char *IncludeParser::getFinalSource() const +{ + return m_source.c_str(); +} +} // namespace betsy diff --git a/tools/shader-processor/IncludeParser.h b/tools/shader-processor/IncludeParser.h new file mode 100644 index 0000000..b5741b7 --- /dev/null +++ b/tools/shader-processor/IncludeParser.h @@ -0,0 +1,23 @@ + +#pragma once + +#include +#include + +namespace betsy +{ +class IncludeParser +{ + std::string m_source; + + static bool loadFromFileInto(const std::filesystem::path &path, std::string &outSource); + + bool parseIncludeFiles(const std::filesystem::path &relativePath); + +public: + bool loadFromFile(const std::filesystem::path &filename); + bool loadFromFile(const std::filesystem::path &filename, const std::filesystem::path &relativePath); + + const char *getFinalSource() const; +}; +} // namespace betsy diff --git a/tools/shader-processor/main.cpp b/tools/shader-processor/main.cpp new file mode 100644 index 0000000..65d43a6 --- /dev/null +++ b/tools/shader-processor/main.cpp @@ -0,0 +1,47 @@ +#include +#include +#include +#include +#include +#include "IncludeParser.h" + +inline void writeString(std::ofstream &fout, std::string_view str) +{ + fout.write(str.data(), str.size()); +} + +int main(int argc, char **argv) +{ + if (argc != 3) + { + std::cerr << "Expected 2 arguments!" << std::endl; + return EXIT_FAILURE; + } + + betsy::IncludeParser parser; + if (!parser.loadFromFile(argv[1])) + { + std::cerr << "Failed to load input: " << argv[1] << std::endl; + return EXIT_FAILURE; + } + + std::filesystem::path outPath = argv[2]; + std::ofstream fout(outPath); + + if (fout.fail()) + { + std::cerr << "Failed to open output: " << argv[2] << std::endl; + return EXIT_FAILURE; + } + + auto identifier = outPath.stem().string(); + std::replace(identifier.begin(), identifier.end(), '.', '_'); // replace all 'x' to 'y' + std::replace(identifier.begin(), identifier.end(), '-', '_'); // replace all 'x' to 'y' + + writeString(fout, "// Generated by shader-processor. DO NOT TOUCH\n"); + writeString(fout, std::string("const char* ") + identifier + " = R\"(\n"); + writeString(fout, parser.getFinalSource()); + writeString(fout, ")\";"); + + return EXIT_SUCCESS; +} \ No newline at end of file